randmarcomps 1.290.0 → 1.291.0
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/randmarcomps.js +351 -350
- package/dist/randmarcomps.umd.cjs +19 -19
- package/package.json +1 -1
package/dist/randmarcomps.js
CHANGED
|
@@ -68,34 +68,34 @@ var jt = React.createContext({}), Lt = React.forwardRef((t, e) => {
|
|
|
68
68
|
l == null || l(Je), ne(Je);
|
|
69
69
|
}, [l]), Ae = React.useMemo(() => g ? typeof g == "string" ? new RegExp(g) : g : null, [g]), $e = React.useRef(null), Ne = React.useRef(null), Ve = React.useRef({ value: oe, onChange: se, isIOS: typeof window < "u" && ((z = (q = window == null ? void 0 : window.CSS) == null ? void 0 : q.supports) == null ? void 0 : z.call(q, "-webkit-touch-callout", "none")) }), je = React.useRef({ prev: [(Q = $e.current) == null ? void 0 : Q.selectionStart, (j = $e.current) == null ? void 0 : j.selectionEnd, (F = $e.current) == null ? void 0 : F.selectionDirection] });
|
|
70
70
|
React.useImperativeHandle(e, () => $e.current, []), React.useEffect(() => {
|
|
71
|
-
let Je = $e.current,
|
|
72
|
-
if (!Je || !
|
|
71
|
+
let Je = $e.current, yt = Ne.current;
|
|
72
|
+
if (!Je || !yt) return;
|
|
73
73
|
Ve.current.value !== Je.value && Ve.current.onChange(Je.value), je.current.prev = [Je.selectionStart, Je.selectionEnd, Je.selectionDirection];
|
|
74
74
|
function Mt() {
|
|
75
75
|
if (document.activeElement !== Je) {
|
|
76
76
|
He(null), tt(null);
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
let Ft = Je.selectionStart, Ke = Je.selectionEnd, at = Je.selectionDirection, Qe = Je.maxLength, ut = Je.value, ft = je.current.prev, dt = -1,
|
|
79
|
+
let Ft = Je.selectionStart, Ke = Je.selectionEnd, at = Je.selectionDirection, Qe = Je.maxLength, ut = Je.value, ft = je.current.prev, dt = -1, Ct = -1, zt;
|
|
80
80
|
if (ut.length !== 0 && Ft !== null && Ke !== null) {
|
|
81
|
-
let
|
|
82
|
-
if (
|
|
83
|
-
let
|
|
84
|
-
if (
|
|
85
|
-
else if (
|
|
81
|
+
let pt = Ft === Ke, xr = Ft === ut.length && ut.length < Qe;
|
|
82
|
+
if (pt && !xr) {
|
|
83
|
+
let mt = Ft;
|
|
84
|
+
if (mt === 0) dt = 0, Ct = 1, zt = "forward";
|
|
85
|
+
else if (mt === Qe) dt = mt - 1, Ct = mt, zt = "backward";
|
|
86
86
|
else if (Qe > 1 && ut.length > 1) {
|
|
87
87
|
let Zt = 0;
|
|
88
88
|
if (ft[0] !== null && ft[1] !== null) {
|
|
89
|
-
zt =
|
|
90
|
-
let
|
|
91
|
-
zt === "backward" && !
|
|
89
|
+
zt = mt < ft[1] ? "backward" : "forward";
|
|
90
|
+
let Wt = ft[0] === ft[1] && ft[0] < Qe;
|
|
91
|
+
zt === "backward" && !Wt && (Zt = -1);
|
|
92
92
|
}
|
|
93
|
-
dt = Zt +
|
|
93
|
+
dt = Zt + mt, Ct = Zt + mt + 1;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
dt !== -1 &&
|
|
96
|
+
dt !== -1 && Ct !== -1 && dt !== Ct && $e.current.setSelectionRange(dt, Ct, zt);
|
|
97
97
|
}
|
|
98
|
-
let Yt = dt !== -1 ? dt : Ft, ar =
|
|
98
|
+
let Yt = dt !== -1 ? dt : Ft, ar = Ct !== -1 ? Ct : Ke, cr = zt ?? at;
|
|
99
99
|
He(Yt), tt(ar), je.current.prev = [Yt, ar, cr];
|
|
100
100
|
}
|
|
101
101
|
if (document.addEventListener("selectionchange", Mt, { capture: !0 }), Mt(), document.activeElement === Je && qe(!0), !document.getElementById("input-otp-style")) {
|
|
@@ -106,7 +106,7 @@ var jt = React.createContext({}), Lt = React.forwardRef((t, e) => {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
let qt = () => {
|
|
109
|
-
|
|
109
|
+
yt && yt.style.setProperty("--root-height", `${Je.clientHeight}px`);
|
|
110
110
|
};
|
|
111
111
|
qt();
|
|
112
112
|
let Ht = new ResizeObserver(qt);
|
|
@@ -117,57 +117,57 @@ var jt = React.createContext({}), Lt = React.forwardRef((t, e) => {
|
|
|
117
117
|
let [ze, Oe] = React.useState(!1), [Le, qe] = React.useState(!1), [Ge, He] = React.useState(null), [Ze, tt] = React.useState(null);
|
|
118
118
|
React.useEffect(() => {
|
|
119
119
|
ht(() => {
|
|
120
|
-
var Je,
|
|
120
|
+
var Je, yt, Mt, qt;
|
|
121
121
|
(Je = $e.current) == null || Je.dispatchEvent(new Event("input"));
|
|
122
|
-
let Ht = (
|
|
122
|
+
let Ht = (yt = $e.current) == null ? void 0 : yt.selectionStart, Ft = (Mt = $e.current) == null ? void 0 : Mt.selectionEnd, Ke = (qt = $e.current) == null ? void 0 : qt.selectionDirection;
|
|
123
123
|
Ht !== null && Ft !== null && (He(Ht), tt(Ft), je.current.prev = [Ht, Ft, Ke]);
|
|
124
124
|
});
|
|
125
125
|
}, [oe, Le]), React.useEffect(() => {
|
|
126
126
|
ge !== void 0 && oe !== ge && ge.length < d && oe.length === d && (_ == null || _(oe));
|
|
127
127
|
}, [d, _, ge, oe]);
|
|
128
128
|
let Ye = Tt({ containerRef: Ne, inputRef: $e, pushPasswordManagerStrategy: C, isFocused: Le }), rt = React.useCallback((Je) => {
|
|
129
|
-
let
|
|
130
|
-
if (
|
|
129
|
+
let yt = Je.currentTarget.value.slice(0, d);
|
|
130
|
+
if (yt.length > 0 && Ae && !Ae.test(yt)) {
|
|
131
131
|
Je.preventDefault();
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
|
-
typeof ge == "string" &&
|
|
134
|
+
typeof ge == "string" && yt.length < ge.length && document.dispatchEvent(new Event("selectionchange")), se(yt);
|
|
135
135
|
}, [d, se, ge, Ae]), Xe = React.useCallback(() => {
|
|
136
136
|
var Je;
|
|
137
137
|
if ($e.current) {
|
|
138
|
-
let
|
|
139
|
-
(Je = $e.current) == null || Je.setSelectionRange(
|
|
138
|
+
let yt = Math.min($e.current.value.length, d - 1), Mt = $e.current.value.length;
|
|
139
|
+
(Je = $e.current) == null || Je.setSelectionRange(yt, Mt), He(yt), tt(Mt);
|
|
140
140
|
}
|
|
141
141
|
qe(!0);
|
|
142
142
|
}, [d]), it = React.useCallback((Je) => {
|
|
143
|
-
var
|
|
143
|
+
var yt, Mt;
|
|
144
144
|
let qt = $e.current;
|
|
145
145
|
if (!E && (!Ve.current.isIOS || !Je.clipboardData || !qt)) return;
|
|
146
146
|
let Ht = Je.clipboardData.getData("text/plain"), Ft = E ? E(Ht) : Ht;
|
|
147
147
|
Je.preventDefault();
|
|
148
|
-
let Ke = (
|
|
148
|
+
let Ke = (yt = $e.current) == null ? void 0 : yt.selectionStart, at = (Mt = $e.current) == null ? void 0 : Mt.selectionEnd, Qe = (Ke !== at ? oe.slice(0, Ke) + Ft + oe.slice(at) : oe.slice(0, Ke) + Ft + oe.slice(Ke)).slice(0, d);
|
|
149
149
|
if (Qe.length > 0 && Ae && !Ae.test(Qe)) return;
|
|
150
150
|
qt.value = Qe, se(Qe);
|
|
151
151
|
let ut = Math.min(Qe.length, d - 1), ft = Qe.length;
|
|
152
152
|
qt.setSelectionRange(ut, ft), He(ut), tt(ft);
|
|
153
153
|
}, [d, se, Ae, oe]), et = React.useMemo(() => ({ position: "relative", cursor: O.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [O.disabled]), ot = React.useMemo(() => ({ position: "absolute", inset: 0, width: Ye.willPushPWMBadge ? `calc(100% + ${Ye.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: Ye.willPushPWMBadge ? `inset(0 ${Ye.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: f, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [Ye.PWM_BADGE_SPACE_WIDTH, Ye.willPushPWMBadge, f]), st = React.useMemo(() => React.createElement("input", bt(St({ autoComplete: O.autoComplete || "one-time-code" }, O), { "data-input-otp": !0, "data-input-otp-placeholder-shown": oe.length === 0 || void 0, "data-input-otp-mss": Ge, "data-input-otp-mse": Ze, inputMode: S, pattern: Ae == null ? void 0 : Ae.source, "aria-placeholder": b, style: ot, maxLength: d, value: oe, ref: $e, onPaste: (Je) => {
|
|
154
|
-
var
|
|
155
|
-
it(Je), (
|
|
154
|
+
var yt;
|
|
155
|
+
it(Je), (yt = O.onPaste) == null || yt.call(O, Je);
|
|
156
156
|
}, onChange: rt, onMouseOver: (Je) => {
|
|
157
|
-
var
|
|
158
|
-
Oe(!0), (
|
|
157
|
+
var yt;
|
|
158
|
+
Oe(!0), (yt = O.onMouseOver) == null || yt.call(O, Je);
|
|
159
159
|
}, onMouseLeave: (Je) => {
|
|
160
|
-
var
|
|
161
|
-
Oe(!1), (
|
|
160
|
+
var yt;
|
|
161
|
+
Oe(!1), (yt = O.onMouseLeave) == null || yt.call(O, Je);
|
|
162
162
|
}, onFocus: (Je) => {
|
|
163
|
-
var
|
|
164
|
-
Xe(), (
|
|
163
|
+
var yt;
|
|
164
|
+
Xe(), (yt = O.onFocus) == null || yt.call(O, Je);
|
|
165
165
|
}, onBlur: (Je) => {
|
|
166
|
-
var
|
|
167
|
-
qe(!1), (
|
|
168
|
-
} })), [rt, Xe, it, S, ot, d, Ze, Ge, O, Ae == null ? void 0 : Ae.source, oe]), Ue = React.useMemo(() => ({ slots: Array.from({ length: d }).map((Je,
|
|
166
|
+
var yt;
|
|
167
|
+
qe(!1), (yt = O.onBlur) == null || yt.call(O, Je);
|
|
168
|
+
} })), [rt, Xe, it, S, ot, d, Ze, Ge, O, Ae == null ? void 0 : Ae.source, oe]), Ue = React.useMemo(() => ({ slots: Array.from({ length: d }).map((Je, yt) => {
|
|
169
169
|
var Mt;
|
|
170
|
-
let qt = Le && Ge !== null && Ze !== null && (Ge === Ze &&
|
|
170
|
+
let qt = Le && Ge !== null && Ze !== null && (Ge === Ze && yt === Ge || yt >= Ge && yt < Ze), Ht = oe[yt] !== void 0 ? oe[yt] : null, Ft = oe[0] !== void 0 ? null : (Mt = b == null ? void 0 : b[yt]) != null ? Mt : null;
|
|
171
171
|
return { char: Ht, placeholderChar: Ft, isActive: qt, hasFakeCaret: qt && Ht === null };
|
|
172
172
|
}), isFocused: Le, isHovering: !O.disabled && ze }), [Le, ze, d, Ze, Ge, O.disabled, oe]), Rt = React.useMemo(() => I ? I(Ue) : React.createElement(jt.Provider, { value: Ue }, M), [M, Ue, I]);
|
|
173
173
|
return React.createElement(React.Fragment, null, A !== null && React.createElement("noscript", null, React.createElement("style", null, A)), React.createElement("div", { ref: Ne, "data-input-otp-container": !0, style: et, className: R }, Rt, React.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, st)));
|
|
@@ -7267,9 +7267,9 @@ var CONTENT_NAME$7 = "PopperContent", [PopperContentProvider, useContentContext]
|
|
|
7267
7267
|
b && flip({ ...$e }),
|
|
7268
7268
|
size({
|
|
7269
7269
|
...$e,
|
|
7270
|
-
apply: ({ elements: Rt, rects: Je, availableWidth:
|
|
7270
|
+
apply: ({ elements: Rt, rects: Je, availableWidth: yt, availableHeight: Mt }) => {
|
|
7271
7271
|
const { width: qt, height: Ht } = Je.reference, Ft = Rt.floating.style;
|
|
7272
|
-
Ft.setProperty("--radix-popper-available-width", `${
|
|
7272
|
+
Ft.setProperty("--radix-popper-available-width", `${yt}px`), Ft.setProperty("--radix-popper-available-height", `${Mt}px`), Ft.setProperty("--radix-popper-anchor-width", `${qt}px`), Ft.setProperty("--radix-popper-anchor-height", `${Ht}px`);
|
|
7273
7273
|
}
|
|
7274
7274
|
}),
|
|
7275
7275
|
Q && arrow$2({ element: Q, padding: g }),
|
|
@@ -12259,13 +12259,13 @@ function buildThunks({
|
|
|
12259
12259
|
const Je = {
|
|
12260
12260
|
queryArg: se.originalArgs,
|
|
12261
12261
|
pageParam: st
|
|
12262
|
-
},
|
|
12262
|
+
}, yt = await et(Je), Mt = Rt ? C : E;
|
|
12263
12263
|
return {
|
|
12264
12264
|
data: {
|
|
12265
|
-
pages: Mt(ot.pages,
|
|
12265
|
+
pages: Mt(ot.pages, yt.data, Ue),
|
|
12266
12266
|
pageParams: Mt(ot.pageParams, st, Ue)
|
|
12267
12267
|
},
|
|
12268
|
-
meta:
|
|
12268
|
+
meta: yt.meta
|
|
12269
12269
|
};
|
|
12270
12270
|
};
|
|
12271
12271
|
async function et(ot) {
|
|
@@ -12274,7 +12274,7 @@ function buildThunks({
|
|
|
12274
12274
|
extraOptions: Ue,
|
|
12275
12275
|
argSchema: Rt,
|
|
12276
12276
|
rawResponseSchema: Je,
|
|
12277
|
-
responseSchema:
|
|
12277
|
+
responseSchema: yt
|
|
12278
12278
|
} = Le;
|
|
12279
12279
|
if (Rt && !Ge && (ot = await parseWithSchema(
|
|
12280
12280
|
Rt,
|
|
@@ -12310,7 +12310,7 @@ function buildThunks({
|
|
|
12310
12310
|
} = st;
|
|
12311
12311
|
Je && !Ge && (Mt = await parseWithSchema(Je, st.data, "rawResponseSchema", st.meta));
|
|
12312
12312
|
let qt = await tt(Mt, st.meta, ot);
|
|
12313
|
-
return
|
|
12313
|
+
return yt && !Ge && (qt = await parseWithSchema(yt, qt, "responseSchema", st.meta)), {
|
|
12314
12314
|
...st,
|
|
12315
12315
|
data: qt
|
|
12316
12316
|
};
|
|
@@ -18122,8 +18122,8 @@ function requireReactIs_development$2() {
|
|
|
18122
18122
|
}
|
|
18123
18123
|
function j(Je) {
|
|
18124
18124
|
if (typeof Je == "object" && Je !== null) {
|
|
18125
|
-
var
|
|
18126
|
-
switch (
|
|
18125
|
+
var yt = Je.$$typeof;
|
|
18126
|
+
switch (yt) {
|
|
18127
18127
|
case t:
|
|
18128
18128
|
var Mt = Je.type;
|
|
18129
18129
|
switch (Mt) {
|
|
@@ -18144,11 +18144,11 @@ function requireReactIs_development$2() {
|
|
|
18144
18144
|
case d:
|
|
18145
18145
|
return qt;
|
|
18146
18146
|
default:
|
|
18147
|
-
return
|
|
18147
|
+
return yt;
|
|
18148
18148
|
}
|
|
18149
18149
|
}
|
|
18150
18150
|
case e:
|
|
18151
|
-
return
|
|
18151
|
+
return yt;
|
|
18152
18152
|
}
|
|
18153
18153
|
}
|
|
18154
18154
|
}
|
|
@@ -24424,28 +24424,28 @@ function formatLocale(t) {
|
|
|
24424
24424
|
z.x = F(n, z), z.X = F(o, z), z.c = F(e, z), Q.x = F(n, Q), Q.X = F(o, Q), Q.c = F(e, Q);
|
|
24425
24425
|
function F(et, ot) {
|
|
24426
24426
|
return function(st) {
|
|
24427
|
-
var Ue = [], Rt = -1, Je = 0,
|
|
24428
|
-
for (st instanceof Date || (st = /* @__PURE__ */ new Date(+st)); ++Rt <
|
|
24427
|
+
var Ue = [], Rt = -1, Je = 0, yt = et.length, Mt, qt, Ht;
|
|
24428
|
+
for (st instanceof Date || (st = /* @__PURE__ */ new Date(+st)); ++Rt < yt; )
|
|
24429
24429
|
et.charCodeAt(Rt) === 37 && (Ue.push(et.slice(Je, Rt)), (qt = pads[Mt = et.charAt(++Rt)]) != null ? Mt = et.charAt(++Rt) : qt = Mt === "e" ? " " : "0", (Ht = ot[Mt]) && (Mt = Ht(st, qt)), Ue.push(Mt), Je = Rt + 1);
|
|
24430
24430
|
return Ue.push(et.slice(Je, Rt)), Ue.join("");
|
|
24431
24431
|
};
|
|
24432
24432
|
}
|
|
24433
24433
|
function te(et, ot) {
|
|
24434
24434
|
return function(st) {
|
|
24435
|
-
var Ue = newDate(1900, void 0, 1), Rt = ne(Ue, et, st += "", 0), Je,
|
|
24435
|
+
var Ue = newDate(1900, void 0, 1), Rt = ne(Ue, et, st += "", 0), Je, yt;
|
|
24436
24436
|
if (Rt != st.length) return null;
|
|
24437
24437
|
if ("Q" in Ue) return new Date(Ue.Q);
|
|
24438
24438
|
if ("s" in Ue) return new Date(Ue.s * 1e3 + ("L" in Ue ? Ue.L : 0));
|
|
24439
24439
|
if (ot && !("Z" in Ue) && (Ue.Z = 0), "p" in Ue && (Ue.H = Ue.H % 12 + Ue.p * 12), Ue.m === void 0 && (Ue.m = "q" in Ue ? Ue.q : 0), "V" in Ue) {
|
|
24440
24440
|
if (Ue.V < 1 || Ue.V > 53) return null;
|
|
24441
|
-
"w" in Ue || (Ue.w = 1), "Z" in Ue ? (Je = utcDate(newDate(Ue.y, 0, 1)),
|
|
24442
|
-
} else ("W" in Ue || "U" in Ue) && ("w" in Ue || (Ue.w = "u" in Ue ? Ue.u % 7 : "W" in Ue ? 1 : 0),
|
|
24441
|
+
"w" in Ue || (Ue.w = 1), "Z" in Ue ? (Je = utcDate(newDate(Ue.y, 0, 1)), yt = Je.getUTCDay(), Je = yt > 4 || yt === 0 ? utcMonday.ceil(Je) : utcMonday(Je), Je = utcDay.offset(Je, (Ue.V - 1) * 7), Ue.y = Je.getUTCFullYear(), Ue.m = Je.getUTCMonth(), Ue.d = Je.getUTCDate() + (Ue.w + 6) % 7) : (Je = localDate(newDate(Ue.y, 0, 1)), yt = Je.getDay(), Je = yt > 4 || yt === 0 ? timeMonday.ceil(Je) : timeMonday(Je), Je = timeDay.offset(Je, (Ue.V - 1) * 7), Ue.y = Je.getFullYear(), Ue.m = Je.getMonth(), Ue.d = Je.getDate() + (Ue.w + 6) % 7);
|
|
24442
|
+
} else ("W" in Ue || "U" in Ue) && ("w" in Ue || (Ue.w = "u" in Ue ? Ue.u % 7 : "W" in Ue ? 1 : 0), yt = "Z" in Ue ? utcDate(newDate(Ue.y, 0, 1)).getUTCDay() : localDate(newDate(Ue.y, 0, 1)).getDay(), Ue.m = 0, Ue.d = "W" in Ue ? (Ue.w + 6) % 7 + Ue.W * 7 - (yt + 5) % 7 : Ue.w + Ue.U * 7 - (yt + 6) % 7);
|
|
24443
24443
|
return "Z" in Ue ? (Ue.H += Ue.Z / 100 | 0, Ue.M += Ue.Z % 100, utcDate(Ue)) : localDate(Ue);
|
|
24444
24444
|
};
|
|
24445
24445
|
}
|
|
24446
24446
|
function ne(et, ot, st, Ue) {
|
|
24447
|
-
for (var Rt = 0, Je = ot.length,
|
|
24448
|
-
if (Ue >=
|
|
24447
|
+
for (var Rt = 0, Je = ot.length, yt = st.length, Mt, qt; Rt < Je; ) {
|
|
24448
|
+
if (Ue >= yt) return -1;
|
|
24449
24449
|
if (Mt = ot.charCodeAt(Rt++), Mt === 37) {
|
|
24450
24450
|
if (Mt = ot.charAt(Rt++), qt = j[Mt in pads ? ot.charAt(Rt++) : Mt], !qt || (Ue = qt(et, st, Ue)) < 0) return -1;
|
|
24451
24451
|
} else if (Mt != st.charCodeAt(Ue++))
|
|
@@ -27725,14 +27725,14 @@ function requireReactIs_development$1() {
|
|
|
27725
27725
|
case C:
|
|
27726
27726
|
return Je;
|
|
27727
27727
|
default:
|
|
27728
|
-
var
|
|
27729
|
-
switch (
|
|
27728
|
+
var yt = Je && Je.$$typeof;
|
|
27729
|
+
switch (yt) {
|
|
27730
27730
|
case g:
|
|
27731
27731
|
case _:
|
|
27732
27732
|
case A:
|
|
27733
27733
|
case R:
|
|
27734
27734
|
case f:
|
|
27735
|
-
return
|
|
27735
|
+
return yt;
|
|
27736
27736
|
default:
|
|
27737
27737
|
return Rt;
|
|
27738
27738
|
}
|
|
@@ -34531,14 +34531,14 @@ var getTooltipContent = function(e, n, o, l) {
|
|
|
34531
34531
|
dataStartIndex: te,
|
|
34532
34532
|
dataEndIndex: ne
|
|
34533
34533
|
}), He = Le.type.defaultProps !== void 0 ? _objectSpread(_objectSpread({}, Le.type.defaultProps), Le.props) : Le.props, Ze = He.dataKey, tt = He.maxBarSize, Ye = He["".concat(Ve, "Id")], rt = He["".concat(je, "Id")], Xe = {}, it = b.reduce(function(at, Qe) {
|
|
34534
|
-
var ut, ft, dt = q["".concat(Qe.axisType, "Map")],
|
|
34535
|
-
dt && dt[
|
|
34534
|
+
var ut, ft, dt = q["".concat(Qe.axisType, "Map")], Ct = He["".concat(Qe.axisType, "Id")];
|
|
34535
|
+
dt && dt[Ct] || Qe.axisType === "zAxis" || (process.env.NODE_ENV !== "production" ? invariant$1(!1, "Specifying a(n) ".concat(Qe.axisType, "Id requires a corresponding ").concat(
|
|
34536
34536
|
Qe.axisType,
|
|
34537
34537
|
"Id on the targeted graphical component "
|
|
34538
34538
|
).concat((ut = Le == null || (ft = Le.type) === null || ft === void 0 ? void 0 : ft.displayName) !== null && ut !== void 0 ? ut : "")) : invariant$1());
|
|
34539
|
-
var zt = dt[
|
|
34539
|
+
var zt = dt[Ct];
|
|
34540
34540
|
return _objectSpread(_objectSpread({}, at), {}, _defineProperty(_defineProperty({}, Qe.axisType, zt), "".concat(Qe.axisType, "Ticks"), getTicksOfAxis(zt)));
|
|
34541
|
-
}, Xe), et = it[je], ot = it["".concat(je, "Ticks")], st = Q && Q[Ye] && Q[Ye].hasStack && getStackedDataOfItem(Le, Q[Ye].stackGroups), Ue = getDisplayName(Le.type).indexOf("Bar") >= 0, Rt = getBandSizeOfAxis(et, ot), Je = [],
|
|
34541
|
+
}, Xe), et = it[je], ot = it["".concat(je, "Ticks")], st = Q && Q[Ye] && Q[Ye].hasStack && getStackedDataOfItem(Le, Q[Ye].stackGroups), Ue = getDisplayName(Le.type).indexOf("Bar") >= 0, Rt = getBandSizeOfAxis(et, ot), Je = [], yt = ze && getBarSizeList({
|
|
34542
34542
|
barSize: oe,
|
|
34543
34543
|
stackGroups: Q,
|
|
34544
34544
|
totalSize: getCartesianAxisSize(it, je)
|
|
@@ -34549,7 +34549,7 @@ var getTooltipContent = function(e, n, o, l) {
|
|
|
34549
34549
|
barGap: se,
|
|
34550
34550
|
barCategoryGap: Ae,
|
|
34551
34551
|
bandSize: Ft !== Rt ? Ft : Rt,
|
|
34552
|
-
sizeList:
|
|
34552
|
+
sizeList: yt[rt],
|
|
34553
34553
|
maxBarSize: Ht
|
|
34554
34554
|
}), Ft !== Rt && (Je = Je.map(function(at) {
|
|
34555
34555
|
return _objectSpread(_objectSpread({}, at), {}, {
|
|
@@ -34947,7 +34947,7 @@ var getTooltipContent = function(e, n, o, l) {
|
|
|
34947
34947
|
isRange: qe
|
|
34948
34948
|
})));
|
|
34949
34949
|
} else {
|
|
34950
|
-
var
|
|
34950
|
+
var yt, Mt = (yt = j.getItemByXY(j.state.activeCoordinate)) !== null && yt !== void 0 ? yt : {
|
|
34951
34951
|
graphicalItem: et
|
|
34952
34952
|
}, qt = Mt.graphicalItem, Ht = qt.item, Ft = Ht === void 0 ? F : Ht, Ke = qt.childIndex, at = _objectSpread(_objectSpread(_objectSpread({}, oe.props), it), {}, {
|
|
34953
34953
|
activeIndex: Ke
|
|
@@ -37009,8 +37009,8 @@ var lottie = createCommonjsModule(function(module, exports) {
|
|
|
37009
37009
|
function I(Oe, Le, qe, Ge, He, Ze, tt, Ye, rt, Xe, it, et, ot, st, Ue, Rt) {
|
|
37010
37010
|
var Je = this.props;
|
|
37011
37011
|
if (Oe === 1 && Le === 0 && qe === 0 && Ge === 0 && He === 0 && Ze === 1 && tt === 0 && Ye === 0 && rt === 0 && Xe === 0 && it === 1 && et === 0) return Je[12] = Je[12] * Oe + Je[15] * ot, Je[13] = Je[13] * Ze + Je[15] * st, Je[14] = Je[14] * it + Je[15] * Ue, Je[15] *= Rt, this._identityCalculated = !1, this;
|
|
37012
|
-
var
|
|
37013
|
-
return Je[0] =
|
|
37012
|
+
var yt = Je[0], Mt = Je[1], qt = Je[2], Ht = Je[3], Ft = Je[4], Ke = Je[5], at = Je[6], Qe = Je[7], ut = Je[8], ft = Je[9], dt = Je[10], Ct = Je[11], zt = Je[12], Yt = Je[13], ar = Je[14], cr = Je[15];
|
|
37013
|
+
return Je[0] = yt * Oe + Mt * He + qt * rt + Ht * ot, Je[1] = yt * Le + Mt * Ze + qt * Xe + Ht * st, Je[2] = yt * qe + Mt * tt + qt * it + Ht * Ue, Je[3] = yt * Ge + Mt * Ye + qt * et + Ht * Rt, Je[4] = Ft * Oe + Ke * He + at * rt + Qe * ot, Je[5] = Ft * Le + Ke * Ze + at * Xe + Qe * st, Je[6] = Ft * qe + Ke * tt + at * it + Qe * Ue, Je[7] = Ft * Ge + Ke * Ye + at * et + Qe * Rt, Je[8] = ut * Oe + ft * He + dt * rt + Ct * ot, Je[9] = ut * Le + ft * Ze + dt * Xe + Ct * st, Je[10] = ut * qe + ft * tt + dt * it + Ct * Ue, Je[11] = ut * Ge + ft * Ye + dt * et + Ct * Rt, Je[12] = zt * Oe + Yt * He + ar * rt + cr * ot, Je[13] = zt * Le + Yt * Ze + ar * Xe + cr * st, Je[14] = zt * qe + Yt * tt + ar * it + cr * Ue, Je[15] = zt * Ge + Yt * Ye + ar * et + cr * Rt, this._identityCalculated = !1, this;
|
|
37014
37014
|
}
|
|
37015
37015
|
function M(Oe) {
|
|
37016
37016
|
var Le = Oe.props;
|
|
@@ -38740,7 +38740,7 @@ var lottie = createCommonjsModule(function(module, exports) {
|
|
|
38740
38740
|
d = se.length, n = 0, o = 0;
|
|
38741
38741
|
var Ne, Ve, je, ze, Oe, Le = 1.2 * t.finalSize * 0.714, qe = !0;
|
|
38742
38742
|
je = F.length;
|
|
38743
|
-
var Ge, He, Ze, tt, Ye, rt, Xe, it, et, ot, st, Ue, Rt = -1, Je = g,
|
|
38743
|
+
var Ge, He, Ze, tt, Ye, rt, Xe, it, et, ot, st, Ue, Rt = -1, Je = g, yt = E, Mt = C, qt = -1, Ht = "", Ft = this.defaultPropsArray;
|
|
38744
38744
|
if (t.j === 2 || t.j === 1) {
|
|
38745
38745
|
var Ke = 0, at = 0, Qe = t.j === 2 ? -0.5 : -1, ut = 0, ft = !0;
|
|
38746
38746
|
for (l = 0; l < d; l += 1) if (se[l].n) {
|
|
@@ -38753,7 +38753,7 @@ var lottie = createCommonjsModule(function(module, exports) {
|
|
|
38753
38753
|
for (Ke && (Ke += at); ut < l; ) se[ut].animatorJustifyOffset = Ke, ut += 1;
|
|
38754
38754
|
}
|
|
38755
38755
|
for (l = 0; l < d; l += 1) {
|
|
38756
|
-
if (ne.reset(), tt = 1, se[l].n) n = 0, o += t.yOffset, o += qe ? 1 : 0, g = Je, qe = !1, this._hasMaskedPath && (C = Mt, R = (A = I[E =
|
|
38756
|
+
if (ne.reset(), tt = 1, se[l].n) n = 0, o += t.yOffset, o += qe ? 1 : 0, g = Je, qe = !1, this._hasMaskedPath && (C = Mt, R = (A = I[E = yt].points)[C - 1], M = (b = A[C]).partialLength, S = 0), Ht = "", st = "", et = "", Ue = "", Ft = this.defaultPropsArray;
|
|
38757
38757
|
else {
|
|
38758
38758
|
if (this._hasMaskedPath) {
|
|
38759
38759
|
if (qt !== se[l].line) {
|
|
@@ -38786,8 +38786,8 @@ var lottie = createCommonjsModule(function(module, exports) {
|
|
|
38786
38786
|
if (t.strokeWidthAnim && (et = rt < 0 ? 0 : rt), t.strokeColorAnim && (ot = "rgb(" + Math.round(255 * Ye[0]) + "," + Math.round(255 * Ye[1]) + "," + Math.round(255 * Ye[2]) + ")"), t.fillColorAnim && t.fc && (st = "rgb(" + Math.round(255 * Xe[0]) + "," + Math.round(255 * Xe[1]) + "," + Math.round(255 * Xe[2]) + ")"), this._hasMaskedPath) {
|
|
38787
38787
|
if (ne.translate(0, -t.ls), ne.translate(0, j[1] * Le * 0.01 + o, 0), this._pathData.p.v) {
|
|
38788
38788
|
z = (b.point[1] - R.point[1]) / (b.point[0] - R.point[0]);
|
|
38789
|
-
var
|
|
38790
|
-
b.point[0] < R.point[0] && (
|
|
38789
|
+
var Ct = 180 * Math.atan(z) / Math.PI;
|
|
38790
|
+
b.point[0] < R.point[0] && (Ct += 180), ne.rotate(-Ct * Math.PI / 180);
|
|
38791
38791
|
}
|
|
38792
38792
|
ne.translate(He, Ze, 0), g -= j[0] * se[l].an * 5e-3, se[l + 1] && Rt !== se[l + 1].ind && (g += se[l].an / 2, g += 1e-3 * t.tr * t.finalSize);
|
|
38793
38793
|
} else {
|
|
@@ -55916,20 +55916,18 @@ const Textarea = React.forwardRef(({ className: t, ...e }, n) => /* @__PURE__ */
|
|
|
55916
55916
|
}
|
|
55917
55917
|
));
|
|
55918
55918
|
Textarea.displayName = "Textarea";
|
|
55919
|
-
function ChatList({ userId: t, chats: e, activeChat: n, onSelectChat: o,
|
|
55920
|
-
|
|
55921
|
-
|
|
55922
|
-
|
|
55923
|
-
|
|
55924
|
-
|
|
55925
|
-
|
|
55926
|
-
|
|
55927
|
-
|
|
55928
|
-
|
|
55929
|
-
|
|
55930
|
-
|
|
55931
|
-
] })
|
|
55932
|
-
] });
|
|
55919
|
+
function ChatList({ userId: t, chats: e, activeChat: n, onSelectChat: o, assistantStickyMode: l }) {
|
|
55920
|
+
if (l) {
|
|
55921
|
+
const d = e[0];
|
|
55922
|
+
return d ? /* @__PURE__ */ jsx("div", { className: "space-y-1", children: display(d, n, o, /* @__PURE__ */ jsx(Bot, { className: "text-primary fill-white min-h-full" })) }) : null;
|
|
55923
|
+
}
|
|
55924
|
+
return /* @__PURE__ */ jsx("div", { className: "space-y-1", children: e.map((d) => {
|
|
55925
|
+
const f = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
55926
|
+
/* @__PURE__ */ jsx(AvatarImage, { src: `https://api.randmar.io/v4/Partner/${d.partner1 === t ? d.partner2 : d.partner1}/Account/Logo?height=72&width=72`, className: " object-contain " }),
|
|
55927
|
+
/* @__PURE__ */ jsx(AvatarFallback, { children: /* @__PURE__ */ jsx(Handshake, { className: "text-primary fill-white min-h-full" }) })
|
|
55928
|
+
] });
|
|
55929
|
+
return display(d, n, o, f);
|
|
55930
|
+
}) });
|
|
55933
55931
|
}
|
|
55934
55932
|
function display(t, e, n, o) {
|
|
55935
55933
|
var l;
|
|
@@ -59734,7 +59732,7 @@ const NODE_TYPE = {
|
|
|
59734
59732
|
};
|
|
59735
59733
|
function createDOMPurify() {
|
|
59736
59734
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
59737
|
-
const e = (
|
|
59735
|
+
const e = (Kt) => createDOMPurify(Kt);
|
|
59738
59736
|
if (e.version = "3.2.6", e.removed = [], !t || !t.document || t.document.nodeType !== NODE_TYPE.document || !t.Element)
|
|
59739
59737
|
return e.isSupported = !1, e;
|
|
59740
59738
|
let {
|
|
@@ -59752,8 +59750,8 @@ function createDOMPurify() {
|
|
|
59752
59750
|
trustedTypes: R
|
|
59753
59751
|
} = t, A = b.prototype, I = lookupGetter(A, "cloneNode"), M = lookupGetter(A, "remove"), O = lookupGetter(A, "nextSibling"), q = lookupGetter(A, "childNodes"), z = lookupGetter(A, "parentNode");
|
|
59754
59752
|
if (typeof f == "function") {
|
|
59755
|
-
const
|
|
59756
|
-
|
|
59753
|
+
const Kt = n.createElement("template");
|
|
59754
|
+
Kt.content && Kt.content.ownerDocument && (n = Kt.content.ownerDocument);
|
|
59757
59755
|
}
|
|
59758
59756
|
let Q, j = "";
|
|
59759
59757
|
const {
|
|
@@ -59801,16 +59799,16 @@ function createDOMPurify() {
|
|
|
59801
59799
|
enumerable: !0,
|
|
59802
59800
|
value: !1
|
|
59803
59801
|
}
|
|
59804
|
-
})), rt = null, Xe = null, it = !0, et = !0, ot = !1, st = !0, Ue = !1, Rt = !0, Je = !1,
|
|
59802
|
+
})), rt = null, Xe = null, it = !0, et = !0, ot = !1, st = !0, Ue = !1, Rt = !0, Je = !1, yt = !1, Mt = !1, qt = !1, Ht = !1, Ft = !1, Ke = !0, at = !1;
|
|
59805
59803
|
const Qe = "user-content-";
|
|
59806
|
-
let ut = !0, ft = !1, dt = {},
|
|
59804
|
+
let ut = !0, ft = !1, dt = {}, Ct = null;
|
|
59807
59805
|
const zt = addToSet({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
59808
59806
|
let Yt = null;
|
|
59809
59807
|
const ar = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
59810
59808
|
let cr = null;
|
|
59811
|
-
const
|
|
59812
|
-
let
|
|
59813
|
-
const Ar = addToSet({}, [xr,
|
|
59809
|
+
const pt = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), xr = "http://www.w3.org/1998/Math/MathML", mt = "http://www.w3.org/2000/svg", Zt = "http://www.w3.org/1999/xhtml";
|
|
59810
|
+
let Wt = Zt, rr = !1, sr = null;
|
|
59811
|
+
const Ar = addToSet({}, [xr, mt, Zt], stringToString);
|
|
59814
59812
|
let Cr = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]), pr = addToSet({}, ["annotation-xml"]);
|
|
59815
59813
|
const yr = addToSet({}, ["title", "style", "font", "a", "script"]);
|
|
59816
59814
|
let er = null;
|
|
@@ -59822,7 +59820,7 @@ function createDOMPurify() {
|
|
|
59822
59820
|
let nt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
59823
59821
|
if (!(Rr && Rr === nt)) {
|
|
59824
59822
|
if ((!nt || typeof nt != "object") && (nt = {}), nt = clone(nt), er = // eslint-disable-next-line unicorn/prefer-includes
|
|
59825
|
-
Ir.indexOf(nt.PARSER_MEDIA_TYPE) === -1 ? Xt : nt.PARSER_MEDIA_TYPE, dr = er === "application/xhtml+xml" ? stringToString : stringToLowerCase, Ge = objectHasOwnProperty(nt, "ALLOWED_TAGS") ? addToSet({}, nt.ALLOWED_TAGS, dr) : He, Ze = objectHasOwnProperty(nt, "ALLOWED_ATTR") ? addToSet({}, nt.ALLOWED_ATTR, dr) : tt, sr = objectHasOwnProperty(nt, "ALLOWED_NAMESPACES") ? addToSet({}, nt.ALLOWED_NAMESPACES, stringToString) : Ar, cr = objectHasOwnProperty(nt, "ADD_URI_SAFE_ATTR") ? addToSet(clone(
|
|
59823
|
+
Ir.indexOf(nt.PARSER_MEDIA_TYPE) === -1 ? Xt : nt.PARSER_MEDIA_TYPE, dr = er === "application/xhtml+xml" ? stringToString : stringToLowerCase, Ge = objectHasOwnProperty(nt, "ALLOWED_TAGS") ? addToSet({}, nt.ALLOWED_TAGS, dr) : He, Ze = objectHasOwnProperty(nt, "ALLOWED_ATTR") ? addToSet({}, nt.ALLOWED_ATTR, dr) : tt, sr = objectHasOwnProperty(nt, "ALLOWED_NAMESPACES") ? addToSet({}, nt.ALLOWED_NAMESPACES, stringToString) : Ar, cr = objectHasOwnProperty(nt, "ADD_URI_SAFE_ATTR") ? addToSet(clone(pt), nt.ADD_URI_SAFE_ATTR, dr) : pt, Yt = objectHasOwnProperty(nt, "ADD_DATA_URI_TAGS") ? addToSet(clone(ar), nt.ADD_DATA_URI_TAGS, dr) : ar, Ct = objectHasOwnProperty(nt, "FORBID_CONTENTS") ? addToSet({}, nt.FORBID_CONTENTS, dr) : zt, rt = objectHasOwnProperty(nt, "FORBID_TAGS") ? addToSet({}, nt.FORBID_TAGS, dr) : clone({}), Xe = objectHasOwnProperty(nt, "FORBID_ATTR") ? addToSet({}, nt.FORBID_ATTR, dr) : clone({}), dt = objectHasOwnProperty(nt, "USE_PROFILES") ? nt.USE_PROFILES : !1, it = nt.ALLOW_ARIA_ATTR !== !1, et = nt.ALLOW_DATA_ATTR !== !1, ot = nt.ALLOW_UNKNOWN_PROTOCOLS || !1, st = nt.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ue = nt.SAFE_FOR_TEMPLATES || !1, Rt = nt.SAFE_FOR_XML !== !1, Je = nt.WHOLE_DOCUMENT || !1, qt = nt.RETURN_DOM || !1, Ht = nt.RETURN_DOM_FRAGMENT || !1, Ft = nt.RETURN_TRUSTED_TYPE || !1, Mt = nt.FORCE_BODY || !1, Ke = nt.SANITIZE_DOM !== !1, at = nt.SANITIZE_NAMED_PROPS || !1, ut = nt.KEEP_CONTENT !== !1, ft = nt.IN_PLACE || !1, qe = nt.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, Wt = nt.NAMESPACE || Zt, Cr = nt.MATHML_TEXT_INTEGRATION_POINTS || Cr, pr = nt.HTML_INTEGRATION_POINTS || pr, Ye = nt.CUSTOM_ELEMENT_HANDLING || {}, nt.CUSTOM_ELEMENT_HANDLING && Vr(nt.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Ye.tagNameCheck = nt.CUSTOM_ELEMENT_HANDLING.tagNameCheck), nt.CUSTOM_ELEMENT_HANDLING && Vr(nt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Ye.attributeNameCheck = nt.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), nt.CUSTOM_ELEMENT_HANDLING && typeof nt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Ye.allowCustomizedBuiltInElements = nt.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ue && (et = !1), Ht && (qt = !0), dt && (Ge = addToSet({}, text$1), Ze = [], dt.html === !0 && (addToSet(Ge, html$1), addToSet(Ze, html)), dt.svg === !0 && (addToSet(Ge, svg$1), addToSet(Ze, svg), addToSet(Ze, xml)), dt.svgFilters === !0 && (addToSet(Ge, svgFilters), addToSet(Ze, svg), addToSet(Ze, xml)), dt.mathMl === !0 && (addToSet(Ge, mathMl$1), addToSet(Ze, mathMl), addToSet(Ze, xml))), nt.ADD_TAGS && (Ge === He && (Ge = clone(Ge)), addToSet(Ge, nt.ADD_TAGS, dr)), nt.ADD_ATTR && (Ze === tt && (Ze = clone(Ze)), addToSet(Ze, nt.ADD_ATTR, dr)), nt.ADD_URI_SAFE_ATTR && addToSet(cr, nt.ADD_URI_SAFE_ATTR, dr), nt.FORBID_CONTENTS && (Ct === zt && (Ct = clone(Ct)), addToSet(Ct, nt.FORBID_CONTENTS, dr)), ut && (Ge["#text"] = !0), Je && addToSet(Ge, ["html", "head", "body"]), Ge.table && (addToSet(Ge, ["tbody"]), delete rt.tbody), nt.TRUSTED_TYPES_POLICY) {
|
|
59826
59824
|
if (typeof nt.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
59827
59825
|
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
59828
59826
|
if (typeof nt.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -59835,11 +59833,11 @@ function createDOMPurify() {
|
|
|
59835
59833
|
}, Qr = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]), $r = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), Dr = function(nt) {
|
|
59836
59834
|
let It = z(nt);
|
|
59837
59835
|
(!It || !It.tagName) && (It = {
|
|
59838
|
-
namespaceURI:
|
|
59836
|
+
namespaceURI: Wt,
|
|
59839
59837
|
tagName: "template"
|
|
59840
59838
|
});
|
|
59841
59839
|
const Ut = stringToLowerCase(nt.tagName), lr = stringToLowerCase(It.tagName);
|
|
59842
|
-
return sr[nt.namespaceURI] ? nt.namespaceURI ===
|
|
59840
|
+
return sr[nt.namespaceURI] ? nt.namespaceURI === mt ? It.namespaceURI === Zt ? Ut === "svg" : It.namespaceURI === xr ? Ut === "svg" && (lr === "annotation-xml" || Cr[lr]) : !!Qr[Ut] : nt.namespaceURI === xr ? It.namespaceURI === Zt ? Ut === "math" : It.namespaceURI === mt ? Ut === "math" && pr[lr] : !!$r[Ut] : nt.namespaceURI === Zt ? It.namespaceURI === mt && !pr[lr] || It.namespaceURI === xr && !Cr[lr] ? !1 : !$r[Ut] && (yr[Ut] || !Qr[Ut]) : !!(er === "application/xhtml+xml" && sr[nt.namespaceURI]) : !1;
|
|
59843
59841
|
}, Sr = function(nt) {
|
|
59844
59842
|
arrayPush(e.removed, {
|
|
59845
59843
|
element: nt
|
|
@@ -59880,22 +59878,22 @@ function createDOMPurify() {
|
|
|
59880
59878
|
const ur = stringMatch(nt, /^[\r\n\t ]+/);
|
|
59881
59879
|
Ut = ur && ur[0];
|
|
59882
59880
|
}
|
|
59883
|
-
er === "application/xhtml+xml" &&
|
|
59881
|
+
er === "application/xhtml+xml" && Wt === Zt && (nt = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + nt + "</body></html>");
|
|
59884
59882
|
const lr = Q ? Q.createHTML(nt) : nt;
|
|
59885
|
-
if (
|
|
59883
|
+
if (Wt === Zt)
|
|
59886
59884
|
try {
|
|
59887
59885
|
It = new E().parseFromString(lr, er);
|
|
59888
59886
|
} catch {
|
|
59889
59887
|
}
|
|
59890
59888
|
if (!It || !It.documentElement) {
|
|
59891
|
-
It = F.createDocument(
|
|
59889
|
+
It = F.createDocument(Wt, "template", null);
|
|
59892
59890
|
try {
|
|
59893
59891
|
It.documentElement.innerHTML = rr ? j : lr;
|
|
59894
59892
|
} catch {
|
|
59895
59893
|
}
|
|
59896
59894
|
}
|
|
59897
59895
|
const gr = It.body || It.documentElement;
|
|
59898
|
-
return nt && Ut && gr.insertBefore(n.createTextNode(Ut), gr.childNodes[0] || null),
|
|
59896
|
+
return nt && Ut && gr.insertBefore(n.createTextNode(Ut), gr.childNodes[0] || null), Wt === Zt ? oe.call(It, Je ? "html" : "body")[0] : Je ? It.documentElement : gr;
|
|
59899
59897
|
}, Wr = function(nt) {
|
|
59900
59898
|
return te.call(
|
|
59901
59899
|
nt.ownerDocument || nt,
|
|
@@ -59909,8 +59907,8 @@ function createDOMPurify() {
|
|
|
59909
59907
|
}, Kr = function(nt) {
|
|
59910
59908
|
return typeof g == "function" && nt instanceof g;
|
|
59911
59909
|
};
|
|
59912
|
-
function Er(
|
|
59913
|
-
arrayForEach(
|
|
59910
|
+
function Er(Kt, nt, It) {
|
|
59911
|
+
arrayForEach(Kt, (Ut) => {
|
|
59914
59912
|
Ut.call(e, nt, It, Rr);
|
|
59915
59913
|
});
|
|
59916
59914
|
}
|
|
@@ -59927,7 +59925,7 @@ function createDOMPurify() {
|
|
|
59927
59925
|
if (!Ge[Ut] || rt[Ut]) {
|
|
59928
59926
|
if (!rt[Ut] && rn(Ut) && (Ye.tagNameCheck instanceof RegExp && regExpTest(Ye.tagNameCheck, Ut) || Ye.tagNameCheck instanceof Function && Ye.tagNameCheck(Ut)))
|
|
59929
59927
|
return !1;
|
|
59930
|
-
if (ut && !
|
|
59928
|
+
if (ut && !Ct[Ut]) {
|
|
59931
59929
|
const lr = z(nt) || nt.parentNode, gr = q(nt) || nt.childNodes;
|
|
59932
59930
|
if (gr && lr) {
|
|
59933
59931
|
const ur = gr.length;
|
|
@@ -60036,44 +60034,44 @@ function createDOMPurify() {
|
|
|
60036
60034
|
}
|
|
60037
60035
|
}
|
|
60038
60036
|
Er(se.afterSanitizeAttributes, nt, null);
|
|
60039
|
-
}, nn = function
|
|
60037
|
+
}, nn = function Kt(nt) {
|
|
60040
60038
|
let It = null;
|
|
60041
60039
|
const Ut = Wr(nt);
|
|
60042
60040
|
for (Er(se.beforeSanitizeShadowDOM, nt, null); It = Ut.nextNode(); )
|
|
60043
|
-
Er(se.uponSanitizeShadowNode, It, null), en(It), Yr(It), It.content instanceof d &&
|
|
60041
|
+
Er(se.uponSanitizeShadowNode, It, null), en(It), Yr(It), It.content instanceof d && Kt(It.content);
|
|
60044
60042
|
Er(se.afterSanitizeShadowDOM, nt, null);
|
|
60045
60043
|
};
|
|
60046
|
-
return e.sanitize = function(
|
|
60044
|
+
return e.sanitize = function(Kt) {
|
|
60047
60045
|
let nt = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, It = null, Ut = null, lr = null, gr = null;
|
|
60048
|
-
if (rr = !
|
|
60049
|
-
if (typeof
|
|
60050
|
-
if (
|
|
60046
|
+
if (rr = !Kt, rr && (Kt = "<!-->"), typeof Kt != "string" && !Kr(Kt))
|
|
60047
|
+
if (typeof Kt.toString == "function") {
|
|
60048
|
+
if (Kt = Kt.toString(), typeof Kt != "string")
|
|
60051
60049
|
throw typeErrorCreate("dirty is not a string, aborting");
|
|
60052
60050
|
} else
|
|
60053
60051
|
throw typeErrorCreate("toString is not a function");
|
|
60054
60052
|
if (!e.isSupported)
|
|
60055
|
-
return
|
|
60056
|
-
if (
|
|
60057
|
-
if (
|
|
60058
|
-
const _r = dr(
|
|
60053
|
+
return Kt;
|
|
60054
|
+
if (yt || Tr(nt), e.removed = [], typeof Kt == "string" && (ft = !1), ft) {
|
|
60055
|
+
if (Kt.nodeName) {
|
|
60056
|
+
const _r = dr(Kt.nodeName);
|
|
60059
60057
|
if (!Ge[_r] || rt[_r])
|
|
60060
60058
|
throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
60061
60059
|
}
|
|
60062
|
-
} else if (
|
|
60063
|
-
It = Gr("<!---->"), Ut = It.ownerDocument.importNode(
|
|
60060
|
+
} else if (Kt instanceof g)
|
|
60061
|
+
It = Gr("<!---->"), Ut = It.ownerDocument.importNode(Kt, !0), Ut.nodeType === NODE_TYPE.element && Ut.nodeName === "BODY" || Ut.nodeName === "HTML" ? It = Ut : It.appendChild(Ut);
|
|
60064
60062
|
else {
|
|
60065
60063
|
if (!qt && !Ue && !Je && // eslint-disable-next-line unicorn/prefer-includes
|
|
60066
|
-
|
|
60067
|
-
return Q && Ft ? Q.createHTML(
|
|
60068
|
-
if (It = Gr(
|
|
60064
|
+
Kt.indexOf("<") === -1)
|
|
60065
|
+
return Q && Ft ? Q.createHTML(Kt) : Kt;
|
|
60066
|
+
if (It = Gr(Kt), !It)
|
|
60069
60067
|
return qt ? null : Ft ? j : "";
|
|
60070
60068
|
}
|
|
60071
60069
|
It && Mt && Sr(It.firstChild);
|
|
60072
|
-
const ur = Wr(ft ?
|
|
60070
|
+
const ur = Wr(ft ? Kt : It);
|
|
60073
60071
|
for (; lr = ur.nextNode(); )
|
|
60074
60072
|
en(lr), Yr(lr), lr.content instanceof d && nn(lr.content);
|
|
60075
60073
|
if (ft)
|
|
60076
|
-
return
|
|
60074
|
+
return Kt;
|
|
60077
60075
|
if (qt) {
|
|
60078
60076
|
if (Ht)
|
|
60079
60077
|
for (gr = ne.call(It.ownerDocument); It.firstChild; )
|
|
@@ -60088,24 +60086,24 @@ function createDOMPurify() {
|
|
|
60088
60086
|
vr = stringReplace(vr, _r, " ");
|
|
60089
60087
|
}), Q && Ft ? Q.createHTML(vr) : vr;
|
|
60090
60088
|
}, e.setConfig = function() {
|
|
60091
|
-
let
|
|
60092
|
-
Tr(
|
|
60089
|
+
let Kt = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
60090
|
+
Tr(Kt), yt = !0;
|
|
60093
60091
|
}, e.clearConfig = function() {
|
|
60094
|
-
Rr = null,
|
|
60095
|
-
}, e.isValidAttribute = function(
|
|
60092
|
+
Rr = null, yt = !1;
|
|
60093
|
+
}, e.isValidAttribute = function(Kt, nt, It) {
|
|
60096
60094
|
Rr || Tr({});
|
|
60097
|
-
const Ut = dr(
|
|
60095
|
+
const Ut = dr(Kt), lr = dr(nt);
|
|
60098
60096
|
return tn(Ut, lr, It);
|
|
60099
|
-
}, e.addHook = function(
|
|
60100
|
-
typeof nt == "function" && arrayPush(se[
|
|
60101
|
-
}, e.removeHook = function(
|
|
60097
|
+
}, e.addHook = function(Kt, nt) {
|
|
60098
|
+
typeof nt == "function" && arrayPush(se[Kt], nt);
|
|
60099
|
+
}, e.removeHook = function(Kt, nt) {
|
|
60102
60100
|
if (nt !== void 0) {
|
|
60103
|
-
const It = arrayLastIndexOf(se[
|
|
60104
|
-
return It === -1 ? void 0 : arraySplice(se[
|
|
60101
|
+
const It = arrayLastIndexOf(se[Kt], nt);
|
|
60102
|
+
return It === -1 ? void 0 : arraySplice(se[Kt], It, 1)[0];
|
|
60105
60103
|
}
|
|
60106
|
-
return arrayPop(se[
|
|
60107
|
-
}, e.removeHooks = function(
|
|
60108
|
-
se[
|
|
60104
|
+
return arrayPop(se[Kt]);
|
|
60105
|
+
}, e.removeHooks = function(Kt) {
|
|
60106
|
+
se[Kt] = [];
|
|
60109
60107
|
}, e.removeAllHooks = function() {
|
|
60110
60108
|
se = _createHooksMap();
|
|
60111
60109
|
}, e;
|
|
@@ -60414,7 +60412,7 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60414
60412
|
reset: oe
|
|
60415
60413
|
} = useAIAssistant({ userId: t, smartAndSlow: E });
|
|
60416
60414
|
useEffect(() => {
|
|
60417
|
-
const
|
|
60415
|
+
const mt = {
|
|
60418
60416
|
partner1: t,
|
|
60419
60417
|
partner2: ASSISTANT_ID,
|
|
60420
60418
|
name: "Randmar Assistant",
|
|
@@ -60424,12 +60422,12 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60424
60422
|
conversationID: -1
|
|
60425
60423
|
};
|
|
60426
60424
|
if (o === !0) {
|
|
60427
|
-
Ge([
|
|
60425
|
+
Ge([mt]);
|
|
60428
60426
|
return;
|
|
60429
60427
|
}
|
|
60430
60428
|
if (!g) return;
|
|
60431
60429
|
(async () => {
|
|
60432
|
-
const
|
|
60430
|
+
const Wt = g.map(async (sr) => {
|
|
60433
60431
|
var Cr, pr, yr;
|
|
60434
60432
|
const Ar = await q({
|
|
60435
60433
|
routeApplicationId: t,
|
|
@@ -60451,89 +60449,90 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60451
60449
|
}))) ?? [],
|
|
60452
60450
|
conversationID: sr.ConversationId
|
|
60453
60451
|
};
|
|
60454
|
-
}), rr = await Promise.all(
|
|
60455
|
-
rr.sort(sortChats), Ge([
|
|
60452
|
+
}), rr = await Promise.all(Wt);
|
|
60453
|
+
rr.sort(sortChats), Ge([mt, ...rr]), setTimeout(() => {
|
|
60456
60454
|
var sr;
|
|
60457
60455
|
return (sr = Ue.current) == null ? void 0 : sr.focus();
|
|
60458
60456
|
}, 50);
|
|
60459
60457
|
})();
|
|
60460
60458
|
}, [g, o, t]);
|
|
60461
|
-
const [ge, se] = useState("approved"), [Ae, $e] = useState([t, ASSISTANT_ID]), [Ne, Ve] = useState(""), [je, ze] = useState(null), [Oe, Le] = useState(null), [qe, Ge] = useState([]), [He, Ze] = useState(""), [tt, Ye] = useState(null), rt = useRef(null), Xe = useRef(null), [it, et] = useState(null), [ot, st] = useState([]), Ue = n || Xe, Rt = useRef(null), { toast: Je } = useToast(),
|
|
60459
|
+
const [ge, se] = useState("approved"), [Ae, $e] = useState([t, ASSISTANT_ID]), [Ne, Ve] = useState(""), [je, ze] = useState(null), [Oe, Le] = useState(null), [qe, Ge] = useState([]), [He, Ze] = useState(""), [tt, Ye] = useState(null), rt = useRef(null), Xe = useRef(null), [it, et] = useState(null), [ot, st] = useState([]), Ue = n || Xe, Rt = useRef(null), { toast: Je } = useToast(), yt = () => qe.find((mt) => mt.partner1 === (Ae == null ? void 0 : Ae[0]) && mt.partner2 === (Ae == null ? void 0 : Ae[1])), Mt = () => (Ae == null ? void 0 : Ae[0]) === ASSISTANT_ID || (Ae == null ? void 0 : Ae[1]) === ASSISTANT_ID;
|
|
60462
60460
|
function qt() {
|
|
60463
|
-
const
|
|
60464
|
-
|
|
60461
|
+
const mt = yt();
|
|
60462
|
+
mt && (Mt() || O({ routeApplicationId: t, conversationId: mt.conversationID }));
|
|
60465
60463
|
}
|
|
60466
60464
|
useEffect(() => {
|
|
60467
60465
|
d && F && (I.current || Mt() && (I.current = !0, Ke(d)));
|
|
60468
60466
|
}, [d, F, Ae, I]), useEffect(() => {
|
|
60469
60467
|
je && Ae && (Ke(je), ze(null));
|
|
60470
60468
|
}, [je, Ae]);
|
|
60471
|
-
const Ht = useMemo(() => qe.filter((
|
|
60472
|
-
|
|
60473
|
-
|
|
60469
|
+
const Ht = useMemo(() => qe.filter((mt) => {
|
|
60470
|
+
if (mt.partner1 === ASSISTANT_ID || mt.partner2 === ASSISTANT_ID) return !0;
|
|
60471
|
+
const Wt = mt.name.toLowerCase().includes(He.toLowerCase());
|
|
60472
|
+
return ge === "approved" ? Wt && !mt.pending : ge === "pending" ? Wt && mt.pending : Wt;
|
|
60474
60473
|
}), [qe, He, ge]);
|
|
60475
60474
|
useEffect(() => {
|
|
60476
|
-
var
|
|
60477
|
-
it !== null && (Je({ title: "File attached", description: "Add your instruction before sending.", variant: "success" }), (
|
|
60475
|
+
var mt;
|
|
60476
|
+
it !== null && (Je({ title: "File attached", description: "Add your instruction before sending.", variant: "success" }), (mt = Ue.current) == null || mt.focus());
|
|
60478
60477
|
}, [it]), useEffect(() => {
|
|
60479
|
-
Q.length !== 0 && (Q.forEach((
|
|
60480
|
-
if (!
|
|
60478
|
+
Q.length !== 0 && (Q.forEach((mt) => {
|
|
60479
|
+
if (!mt || mt.isComponent)
|
|
60481
60480
|
return;
|
|
60482
60481
|
const Zt = {
|
|
60483
|
-
id:
|
|
60482
|
+
id: mt.timestamp.toString(),
|
|
60484
60483
|
fromPartnerID: ASSISTANT_ID,
|
|
60485
60484
|
toPartnerID: t,
|
|
60486
60485
|
senderName: "Assistant",
|
|
60487
|
-
timestamp:
|
|
60488
|
-
content:
|
|
60486
|
+
timestamp: mt.timestamp.getTime(),
|
|
60487
|
+
content: mt.content
|
|
60489
60488
|
};
|
|
60490
60489
|
Ft(Zt);
|
|
60491
60490
|
}), j());
|
|
60492
60491
|
}, [Q]);
|
|
60493
|
-
function Ft(
|
|
60494
|
-
Ge((Zt) => Zt.map((
|
|
60495
|
-
let rr =
|
|
60496
|
-
return rr || (rr =
|
|
60492
|
+
function Ft(mt) {
|
|
60493
|
+
Ge((Zt) => Zt.map((Wt) => {
|
|
60494
|
+
let rr = Wt.partner1 === mt.fromPartnerID && Wt.partner2 === mt.toPartnerID;
|
|
60495
|
+
return rr || (rr = Wt.partner1 === mt.toPartnerID && Wt.partner2 === mt.fromPartnerID), !rr || Wt.messages.some((sr) => sr.id === mt.id) ? Wt : (Le([Wt.partner1, Wt.partner2]), { ...Wt, unread: Wt.unread + 1, messages: [...Wt.messages, mt] });
|
|
60497
60496
|
}).sort(sortChats));
|
|
60498
60497
|
}
|
|
60499
60498
|
useEffect(() => {
|
|
60500
60499
|
if (o === !0) return;
|
|
60501
|
-
const
|
|
60500
|
+
const mt = new HubConnectionBuilder().withUrl("https://api.randmar.io/hub", {
|
|
60502
60501
|
accessTokenFactory: () => localStorage.getItem("access_token"),
|
|
60503
60502
|
headers: { "X-Impersonated-Id": t }
|
|
60504
60503
|
}).configureLogging(LogLevel.Information).withAutomaticReconnect().withHubProtocol(new JsonHubProtocol()).build();
|
|
60505
|
-
return
|
|
60506
|
-
|
|
60504
|
+
return mt.on("ReceiveMessage", Ft), mt.start().catch((Zt) => console.error("Error connecting to SignalR hub:", Zt)), Ye(mt), () => {
|
|
60505
|
+
mt && mt.stop();
|
|
60507
60506
|
};
|
|
60508
60507
|
}, [t, o]), useEffect(() => {
|
|
60509
|
-
(Oe == null ? void 0 : Oe[0]) !== (Ae == null ? void 0 : Ae[0]) || (Oe == null ? void 0 : Oe[1]) !== (Ae == null ? void 0 : Ae[1]) || (qt(), Ge((
|
|
60510
|
-
var
|
|
60511
|
-
return (
|
|
60508
|
+
(Oe == null ? void 0 : Oe[0]) !== (Ae == null ? void 0 : Ae[0]) || (Oe == null ? void 0 : Oe[1]) !== (Ae == null ? void 0 : Ae[1]) || (qt(), Ge((mt) => mt.map((Zt) => Zt.partner1 === (Ae == null ? void 0 : Ae[0]) && Zt.partner2 === (Ae == null ? void 0 : Ae[1]) ? { ...Zt, unread: 0 } : Zt)), setTimeout(() => {
|
|
60509
|
+
var mt;
|
|
60510
|
+
return (mt = rt.current) == null ? void 0 : mt.scrollIntoView({ behavior: "smooth" });
|
|
60512
60511
|
}, 50));
|
|
60513
60512
|
}, [Oe, Ae]), useEffect(() => {
|
|
60514
60513
|
var Zt;
|
|
60515
60514
|
if (!Ae) return;
|
|
60516
|
-
const
|
|
60517
|
-
|
|
60518
|
-
var
|
|
60519
|
-
return (
|
|
60515
|
+
const mt = yt();
|
|
60516
|
+
mt && ((Zt = Ue.current) == null || Zt.focus(), mt.unread > 0 && (qt(), Ge((Wt) => Wt.map((rr) => rr.partner1 === Ae[0] && rr.partner2 === Ae[1] ? { ...rr, unread: 0 } : rr))), setTimeout(() => {
|
|
60517
|
+
var Wt;
|
|
60518
|
+
return (Wt = rt.current) == null ? void 0 : Wt.scrollIntoView({ behavior: "smooth" });
|
|
60520
60519
|
}, 50));
|
|
60521
60520
|
}, [qe, Ae]);
|
|
60522
|
-
const Ke = (
|
|
60521
|
+
const Ke = (mt) => {
|
|
60523
60522
|
if (!Ae) return;
|
|
60524
60523
|
const Zt = {
|
|
60525
60524
|
id: crypto.randomUUID(),
|
|
60526
60525
|
senderName: e,
|
|
60527
60526
|
fromPartnerID: t,
|
|
60528
60527
|
toPartnerID: Ae[0] === t ? Ae[1] : Ae[0],
|
|
60529
|
-
content:
|
|
60528
|
+
content: mt + (it ? ` (${it == null ? void 0 : it.name} attached)` : ""),
|
|
60530
60529
|
timestamp: Date.now()
|
|
60531
60530
|
};
|
|
60532
|
-
Ge((
|
|
60533
|
-
}, at = (
|
|
60531
|
+
Ge((Wt) => Wt.map((rr) => rr.partner1 === Ae[0] && rr.partner2 === Ae[1] ? { ...rr, messages: [...rr.messages, Zt] } : rr)), Le([Ae[0], Ae[1]]), Zt.toPartnerID == ASSISTANT_ID ? (z(Zt.content, it ?? void 0), it && st((Wt) => [...Wt, it.name])) : tt.invoke("NewMessage", Zt).catch((Wt) => console.error("Error sending message:", Wt)), Ve(""), et(null), Rt.current && (Rt.current.value = "");
|
|
60532
|
+
}, at = (mt, Zt) => {
|
|
60534
60533
|
if (!qe.length || o !== !0 && !tt || !F) return !1;
|
|
60535
|
-
const
|
|
60536
|
-
return
|
|
60534
|
+
const Wt = qe.find((rr) => rr.conversationID === mt);
|
|
60535
|
+
return Wt ? (Wt.pending && setTimeout(() => se("pending"), 300), $e([Wt.partner1, Wt.partner2]), Zt && ze(Zt), !0) : !1;
|
|
60537
60536
|
};
|
|
60538
60537
|
if (useImperativeHandle(f, () => ({
|
|
60539
60538
|
setActiveChatAndSendMessage: at
|
|
@@ -60542,10 +60541,10 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60542
60541
|
/* @__PURE__ */ jsx("div", { className: "animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4" }),
|
|
60543
60542
|
/* @__PURE__ */ jsx("p", { children: "Loading API functions..." })
|
|
60544
60543
|
] }) }) });
|
|
60545
|
-
const Qe = (
|
|
60546
|
-
var
|
|
60544
|
+
const Qe = (mt) => {
|
|
60545
|
+
var Wt;
|
|
60547
60546
|
if (!Mt()) return;
|
|
60548
|
-
const Zt = (
|
|
60547
|
+
const Zt = (Wt = mt.clipboardData) == null ? void 0 : Wt.items;
|
|
60549
60548
|
if (Zt) {
|
|
60550
60549
|
for (let rr = 0; rr < Zt.length; rr++)
|
|
60551
60550
|
if (Zt[rr].type.indexOf("image") !== -1) {
|
|
@@ -60558,17 +60557,17 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60558
60557
|
}
|
|
60559
60558
|
}, ut = () => {
|
|
60560
60559
|
!Ne.trim() || !Ae || o !== !0 && !tt || Ke(Ne);
|
|
60561
|
-
}, ft = (
|
|
60562
|
-
|
|
60560
|
+
}, ft = (mt) => {
|
|
60561
|
+
mt.target.files && mt.target.files[0] ? et(mt.target.files[0]) : et(null);
|
|
60563
60562
|
}, dt = () => {
|
|
60564
|
-
var
|
|
60565
|
-
(
|
|
60566
|
-
},
|
|
60567
|
-
var
|
|
60568
|
-
et(null), Je({ title: "File removed", description: "No file will be sent to the assistant.", variant: "secondary" }), (
|
|
60563
|
+
var mt;
|
|
60564
|
+
(mt = Rt.current) == null || mt.click();
|
|
60565
|
+
}, Ct = () => {
|
|
60566
|
+
var mt;
|
|
60567
|
+
et(null), Je({ title: "File removed", description: "No file will be sent to the assistant.", variant: "secondary" }), (mt = Ue.current) == null || mt.focus();
|
|
60569
60568
|
}, zt = () => {
|
|
60570
60569
|
const Zt = {
|
|
60571
|
-
messages: qe.find((
|
|
60570
|
+
messages: qe.find((Wt) => Wt.partner1 === ASSISTANT_ID || Wt.partner2 === ASSISTANT_ID),
|
|
60572
60571
|
debug: te
|
|
60573
60572
|
};
|
|
60574
60573
|
S({
|
|
@@ -60579,12 +60578,12 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60579
60578
|
}, Yt = async () => {
|
|
60580
60579
|
A.current && (A.current.disabled = !0), await M({ routeApplicationId: t, partnerId: "2" }), await b();
|
|
60581
60580
|
}, ar = () => {
|
|
60582
|
-
Ge((
|
|
60581
|
+
Ge((mt) => mt.map((Wt) => Wt.partner1 !== ASSISTANT_ID && Wt.partner2 !== ASSISTANT_ID ? Wt : { ...Wt, messages: [] })), st([]), oe();
|
|
60583
60582
|
}, cr = () => {
|
|
60584
60583
|
Ae && _({ routeApplicationId: t, partnerId: Ae[0] == t ? Ae[1] : Ae[0] }).then(() => {
|
|
60585
60584
|
se("approved");
|
|
60586
60585
|
});
|
|
60587
|
-
},
|
|
60586
|
+
}, pt = yt(), xr = qe.filter((mt) => mt.pending).length;
|
|
60588
60587
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex overflow-hidden", l), children: [
|
|
60589
60588
|
o !== !0 && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs("div", { className: "w-[260px] p-4 pt-3 flex flex-col border-r", children: [
|
|
60590
60589
|
/* @__PURE__ */ jsx("div", { className: "p-4 font-semibold border-b", children: "Communications" }),
|
|
@@ -60597,7 +60596,7 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60597
60596
|
placeholder: "Search chats...",
|
|
60598
60597
|
className: "pl-8 h-9",
|
|
60599
60598
|
value: He,
|
|
60600
|
-
onChange: (
|
|
60599
|
+
onChange: (mt) => Ze(mt.target.value)
|
|
60601
60600
|
}
|
|
60602
60601
|
)
|
|
60603
60602
|
] }) }),
|
|
@@ -60609,16 +60608,18 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60609
60608
|
] })
|
|
60610
60609
|
] }) })
|
|
60611
60610
|
] }),
|
|
60612
|
-
/* @__PURE__ */ jsx("div", { className: "mt-1 mb-1", children: qe.findIndex((
|
|
60613
|
-
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: qe.length
|
|
60611
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1 mb-1", children: qe.findIndex((mt) => mt.partner1 === "2" || mt.partner2 === "2") < 0 ? /* @__PURE__ */ jsx(Button, { className: "w-full", ref: A, onClick: () => Yt(), children: "Chat with Randmar" }, "b1") : ge === "approved" && qe.length >= 5 ? null : /* @__PURE__ */ jsx("a", { target: "_blank", href: `https://dashboard.randmar.io/${t}/ExploreManufacturers`, children: /* @__PURE__ */ jsx(Button, { className: "w-full", children: "Explore manufacturers" }, "b2") }) }),
|
|
60612
|
+
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: qe.length > 0 && /* @__PURE__ */ jsx(ChatList, { userId: t, chats: Ht.filter((mt) => mt.partner1 !== ASSISTANT_ID && mt.partner2 !== ASSISTANT_ID), activeChat: pt ?? null, onSelectChat: $e }) }),
|
|
60613
|
+
/* @__PURE__ */ jsx(Separator$1, { className: "mt-auto" }),
|
|
60614
|
+
/* @__PURE__ */ jsx("div", { className: "pt-1", children: qe.find((mt) => mt.partner1 === ASSISTANT_ID || mt.partner2 === ASSISTANT_ID) && /* @__PURE__ */ jsx(ChatList, { userId: t, chats: Ht.filter((mt) => mt.partner1 === ASSISTANT_ID || mt.partner2 === ASSISTANT_ID), activeChat: pt ?? null, onSelectChat: $e, assistantStickyMode: !0 }) })
|
|
60614
60615
|
] }) }),
|
|
60615
60616
|
/* @__PURE__ */ jsx("div", { className: "flex-5 flex flex-col", children: Ae ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
60616
60617
|
/* @__PURE__ */ jsx("div", { className: "flex items-center p-4 border-b", children: Ae[0] == ASSISTANT_ID || Ae[1] == ASSISTANT_ID ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
60617
60618
|
/* @__PURE__ */ jsx(Avatar, { className: "h-8 w-8 flex-shrink-0 rounded-none", children: /* @__PURE__ */ jsx(Bot, { className: "text-primary fill-white min-h-full" }) }),
|
|
60618
60619
|
/* @__PURE__ */ jsx("div", { className: "ml-3 font-medium", children: "Randmar Assistant" }),
|
|
60619
60620
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2 ml-auto", children: [
|
|
60620
|
-
/* @__PURE__ */ jsx(Switch, { id: "smartSwitch", disabled: !!ne, checked: E, onCheckedChange: (
|
|
60621
|
-
ar(), setTimeout(() => R(
|
|
60621
|
+
/* @__PURE__ */ jsx(Switch, { id: "smartSwitch", disabled: !!ne, checked: E, onCheckedChange: (mt) => {
|
|
60622
|
+
ar(), setTimeout(() => R(mt), 20);
|
|
60622
60623
|
} }),
|
|
60623
60624
|
/* @__PURE__ */ jsx(Label$2, { htmlFor: "smartSwitch", children: "Think harder" })
|
|
60624
60625
|
] }),
|
|
@@ -60629,15 +60630,15 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60629
60630
|
/* @__PURE__ */ jsx(AvatarImage, { src: `https://api.randmar.io/v4/Partner/${Ae[0] === t ? Ae[1] : Ae[0]}/Account/Logo?height=72&width=72`, className: " object-contain " }),
|
|
60630
60631
|
/* @__PURE__ */ jsx(AvatarFallback, { children: /* @__PURE__ */ jsx(Handshake, { className: "text-primary fill-white min-h-full" }) })
|
|
60631
60632
|
] }),
|
|
60632
|
-
/* @__PURE__ */ jsx("div", { className: "ml-3 font-medium", children:
|
|
60633
|
+
/* @__PURE__ */ jsx("div", { className: "ml-3 font-medium", children: pt == null ? void 0 : pt.name }),
|
|
60633
60634
|
/* @__PURE__ */ jsx("div", { className: "flex items-center space-x-2 ml-auto", children: /* @__PURE__ */ jsx("a", { href: `https://dashboard.randmar.io/${t}/Partner/${Ae[0] === t ? Ae[1] : Ae[0]}`, target: "_blank", children: /* @__PURE__ */ jsx(Button, { children: "View Partner" }) }) })
|
|
60634
60635
|
] }) }),
|
|
60635
|
-
|
|
60636
|
+
pt != null && pt.pending && pt.partner1 == t ? /* @__PURE__ */ jsx("p", { className: "mt-8 p-2 mx-auto", children: "This conversation is awaiting approval by the other party — please check back later." }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
60636
60637
|
/* @__PURE__ */ jsxs(ScrollArea, { className: "flex-1 pl-2 pr-2 bg-slate-50", children: [
|
|
60637
60638
|
/* @__PURE__ */ jsx(
|
|
60638
60639
|
ChatMessages,
|
|
60639
60640
|
{
|
|
60640
|
-
messages: (
|
|
60641
|
+
messages: (pt == null ? void 0 : pt.messages) ?? [],
|
|
60641
60642
|
currentUserId: t,
|
|
60642
60643
|
isAssistantChat: Mt(),
|
|
60643
60644
|
botStatus: Mt() ? ne : ""
|
|
@@ -60646,7 +60647,7 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60646
60647
|
/* @__PURE__ */ jsx("div", { ref: rt })
|
|
60647
60648
|
] }),
|
|
60648
60649
|
/* @__PURE__ */ jsxs("div", { className: "p-4 border-t border-r flex", children: [
|
|
60649
|
-
(
|
|
60650
|
+
(pt == null ? void 0 : pt.pending) && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
60650
60651
|
/* @__PURE__ */ jsxs(Button, { disabled: C, onClick: () => cr(), children: [
|
|
60651
60652
|
/* @__PURE__ */ jsx(Handshake, {}),
|
|
60652
60653
|
"Accept Conversation Request"
|
|
@@ -60663,11 +60664,11 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60663
60664
|
placeholder: "Type a message...",
|
|
60664
60665
|
value: Ne,
|
|
60665
60666
|
onPaste: Qe,
|
|
60666
|
-
onChange: (
|
|
60667
|
-
onKeyDown: (
|
|
60668
|
-
|
|
60667
|
+
onChange: (mt) => Ve(mt.target.value),
|
|
60668
|
+
onKeyDown: (mt) => {
|
|
60669
|
+
mt.key !== "Enter" || mt.shiftKey || (mt.preventDefault(), ut());
|
|
60669
60670
|
},
|
|
60670
|
-
className:
|
|
60671
|
+
className: pt != null && pt.pending ? "collapse" : "flex-1 resize-none"
|
|
60671
60672
|
}
|
|
60672
60673
|
),
|
|
60673
60674
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -60676,8 +60677,8 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60676
60677
|
{
|
|
60677
60678
|
size: "icon",
|
|
60678
60679
|
variant: "default",
|
|
60679
|
-
className:
|
|
60680
|
-
disabled: !!ne || (
|
|
60680
|
+
className: pt != null && pt.pending ? "collapse" : "ml-2 h-8 w-8",
|
|
60681
|
+
disabled: !!ne || (pt == null ? void 0 : pt.pending),
|
|
60681
60682
|
onClick: ut,
|
|
60682
60683
|
children: /* @__PURE__ */ jsx(Send, { className: "h-6 w-6" })
|
|
60683
60684
|
}
|
|
@@ -60698,8 +60699,8 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60698
60699
|
size: "icon",
|
|
60699
60700
|
variant: "default",
|
|
60700
60701
|
onClick: dt,
|
|
60701
|
-
className:
|
|
60702
|
-
disabled: ne !== "" || (
|
|
60702
|
+
className: pt != null && pt.pending ? "collapse" : "ml-2 h-8 w-8",
|
|
60703
|
+
disabled: ne !== "" || (pt == null ? void 0 : pt.pending) || !!it,
|
|
60703
60704
|
children: /* @__PURE__ */ jsx(Paperclip, { className: "h-5 w-5" })
|
|
60704
60705
|
}
|
|
60705
60706
|
),
|
|
@@ -60708,9 +60709,9 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60708
60709
|
{
|
|
60709
60710
|
size: "icon",
|
|
60710
60711
|
variant: "default",
|
|
60711
|
-
onClick:
|
|
60712
|
-
className:
|
|
60713
|
-
disabled: ne !== "" || (
|
|
60712
|
+
onClick: Ct,
|
|
60713
|
+
className: pt != null && pt.pending ? "collapse" : "ml-2 h-8 w-8",
|
|
60714
|
+
disabled: ne !== "" || (pt == null ? void 0 : pt.pending) || !it,
|
|
60714
60715
|
children: /* @__PURE__ */ jsx(Trash, { className: "h-5 w-5" })
|
|
60715
60716
|
}
|
|
60716
60717
|
)
|
|
@@ -60728,10 +60729,10 @@ const DebugMessageDisplay = ({ debugMessages: t }) => {
|
|
|
60728
60729
|
it.name,
|
|
60729
60730
|
" (pending send...)"
|
|
60730
60731
|
] }) }) : ot.length ? /* @__PURE__ */ jsx(Fragment$1, {}) : /* @__PURE__ */ jsx("p", { children: "No files attached to this conversation yet." }),
|
|
60731
|
-
ot.slice().reverse().map((
|
|
60732
|
+
ot.slice().reverse().map((mt) => /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
|
|
60732
60733
|
/* @__PURE__ */ jsx(File, {}),
|
|
60733
60734
|
" ",
|
|
60734
|
-
|
|
60735
|
+
mt
|
|
60735
60736
|
] }) }))
|
|
60736
60737
|
] }) }),
|
|
60737
60738
|
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-4 border-t pl-2 pr-2 bg-slate-50", children: /* @__PURE__ */ jsx("div", { className: "space-y-2", children: /* @__PURE__ */ jsx(DebugMessageDisplay, { debugMessages: te }) }) })
|
|
@@ -61238,16 +61239,16 @@ function createFormControl(t = {}) {
|
|
|
61238
61239
|
}, O = (Ke, at = [], Qe, ut, ft = !0, dt = !0) => {
|
|
61239
61240
|
if (ut && Qe && !e.disabled) {
|
|
61240
61241
|
if (f.action = !0, dt && Array.isArray(get(o, Ke))) {
|
|
61241
|
-
const
|
|
61242
|
-
ft && set(o, Ke,
|
|
61242
|
+
const Ct = Qe(get(o, Ke), ut.argA, ut.argB);
|
|
61243
|
+
ft && set(o, Ke, Ct);
|
|
61243
61244
|
}
|
|
61244
61245
|
if (dt && Array.isArray(get(n.errors, Ke))) {
|
|
61245
|
-
const
|
|
61246
|
-
ft && set(n.errors, Ke,
|
|
61246
|
+
const Ct = Qe(get(n.errors, Ke), ut.argA, ut.argB);
|
|
61247
|
+
ft && set(n.errors, Ke, Ct), unsetEmptyArray(n.errors, Ke);
|
|
61247
61248
|
}
|
|
61248
61249
|
if ((_.touchedFields || C.touchedFields) && dt && Array.isArray(get(n.touchedFields, Ke))) {
|
|
61249
|
-
const
|
|
61250
|
-
ft && set(n.touchedFields, Ke,
|
|
61250
|
+
const Ct = Qe(get(n.touchedFields, Ke), ut.argA, ut.argB);
|
|
61251
|
+
ft && set(n.touchedFields, Ke, Ct);
|
|
61251
61252
|
}
|
|
61252
61253
|
(_.dirtyFields || C.dirtyFields) && (n.dirtyFields = getDirtyFields(l, d)), E.state.next({
|
|
61253
61254
|
name: Ke,
|
|
@@ -61274,15 +61275,15 @@ function createFormControl(t = {}) {
|
|
|
61274
61275
|
isUndefined(dt) || ut && ut.defaultChecked || at ? set(d, Ke, at ? dt : getFieldValue(ft._f)) : Ne(Ke, dt), f.mount && I();
|
|
61275
61276
|
}
|
|
61276
61277
|
}, j = (Ke, at, Qe, ut, ft) => {
|
|
61277
|
-
let dt = !1,
|
|
61278
|
+
let dt = !1, Ct = !1;
|
|
61278
61279
|
const zt = {
|
|
61279
61280
|
name: Ke
|
|
61280
61281
|
};
|
|
61281
61282
|
if (!e.disabled) {
|
|
61282
61283
|
if (!Qe || ut) {
|
|
61283
|
-
(_.isDirty || C.isDirty) && (
|
|
61284
|
+
(_.isDirty || C.isDirty) && (Ct = n.isDirty, n.isDirty = zt.isDirty = se(), dt = Ct !== zt.isDirty);
|
|
61284
61285
|
const Yt = deepEqual$1(get(l, Ke), at);
|
|
61285
|
-
|
|
61286
|
+
Ct = !!get(n.dirtyFields, Ke), Yt ? unset(n.dirtyFields, Ke) : set(n.dirtyFields, Ke, !0), zt.dirtyFields = n.dirtyFields, dt = dt || (_.dirtyFields || C.dirtyFields) && Ct !== !Yt;
|
|
61286
61287
|
}
|
|
61287
61288
|
if (Qe) {
|
|
61288
61289
|
const Yt = get(n.touchedFields, Ke);
|
|
@@ -61294,7 +61295,7 @@ function createFormControl(t = {}) {
|
|
|
61294
61295
|
}, F = (Ke, at, Qe, ut) => {
|
|
61295
61296
|
const ft = get(n.errors, Ke), dt = (_.isValid || C.isValid) && isBoolean(at) && n.isValid !== at;
|
|
61296
61297
|
if (e.delayError && Qe ? (b = A(() => q(Ke, Qe)), b(e.delayError)) : (clearTimeout(S), b = null, Qe ? set(n.errors, Ke, Qe) : unset(n.errors, Ke)), (Qe ? !deepEqual$1(ft, Qe) : ft) || !isEmptyObject$1(ut) || dt) {
|
|
61297
|
-
const
|
|
61298
|
+
const Ct = {
|
|
61298
61299
|
...ut,
|
|
61299
61300
|
...dt && isBoolean(at) ? { isValid: at } : {},
|
|
61300
61301
|
errors: n.errors,
|
|
@@ -61302,8 +61303,8 @@ function createFormControl(t = {}) {
|
|
|
61302
61303
|
};
|
|
61303
61304
|
n = {
|
|
61304
61305
|
...n,
|
|
61305
|
-
...
|
|
61306
|
-
}, E.state.next(
|
|
61306
|
+
...Ct
|
|
61307
|
+
}, E.state.next(Ct);
|
|
61307
61308
|
}
|
|
61308
61309
|
}, te = async (Ke) => {
|
|
61309
61310
|
M(Ke, !0);
|
|
@@ -61325,7 +61326,7 @@ function createFormControl(t = {}) {
|
|
|
61325
61326
|
for (const ut in Ke) {
|
|
61326
61327
|
const ft = Ke[ut];
|
|
61327
61328
|
if (ft) {
|
|
61328
|
-
const { _f: dt, ...
|
|
61329
|
+
const { _f: dt, ...Ct } = ft;
|
|
61329
61330
|
if (dt) {
|
|
61330
61331
|
const zt = g.array.has(dt.name), Yt = ft._f && hasPromiseValidation(ft._f);
|
|
61331
61332
|
Yt && _.validatingFields && M([ut], !0);
|
|
@@ -61334,7 +61335,7 @@ function createFormControl(t = {}) {
|
|
|
61334
61335
|
break;
|
|
61335
61336
|
!at && (get(ar, dt.name) ? zt ? updateFieldArrayRootError(n.errors, ar, dt.name) : set(n.errors, dt.name, ar[dt.name]) : unset(n.errors, dt.name));
|
|
61336
61337
|
}
|
|
61337
|
-
!isEmptyObject$1(
|
|
61338
|
+
!isEmptyObject$1(Ct) && await oe(Ct, at, Qe);
|
|
61338
61339
|
}
|
|
61339
61340
|
}
|
|
61340
61341
|
return Qe.valid;
|
|
@@ -61351,9 +61352,9 @@ function createFormControl(t = {}) {
|
|
|
61351
61352
|
let ft = at;
|
|
61352
61353
|
if (ut) {
|
|
61353
61354
|
const dt = ut._f;
|
|
61354
|
-
dt && (!dt.disabled && set(d, Ke, getFieldValueAs(at, dt)), ft = isHTMLElement(dt.ref) && isNullOrUndefined(at) ? "" : at, isMultipleSelect(dt.ref) ? [...dt.ref.options].forEach((
|
|
61355
|
-
(!
|
|
61356
|
-
}) : dt.refs.forEach((
|
|
61355
|
+
dt && (!dt.disabled && set(d, Ke, getFieldValueAs(at, dt)), ft = isHTMLElement(dt.ref) && isNullOrUndefined(at) ? "" : at, isMultipleSelect(dt.ref) ? [...dt.ref.options].forEach((Ct) => Ct.selected = ft.includes(Ct.value)) : dt.refs ? isCheckBoxInput(dt.ref) ? dt.refs.forEach((Ct) => {
|
|
61356
|
+
(!Ct.defaultChecked || !Ct.disabled) && (Array.isArray(ft) ? Ct.checked = !!ft.find((zt) => zt === Ct.value) : Ct.checked = ft === Ct.value || !!ft);
|
|
61357
|
+
}) : dt.refs.forEach((Ct) => Ct.checked = Ct.value === ft) : isFileInput(dt.ref) ? dt.ref.value = "" : (dt.ref.value = ft, dt.ref.type || E.state.next({
|
|
61357
61358
|
name: Ke,
|
|
61358
61359
|
values: cloneObject(d)
|
|
61359
61360
|
})));
|
|
@@ -61363,8 +61364,8 @@ function createFormControl(t = {}) {
|
|
|
61363
61364
|
for (const ut in at) {
|
|
61364
61365
|
if (!at.hasOwnProperty(ut))
|
|
61365
61366
|
return;
|
|
61366
|
-
const ft = at[ut], dt = Ke + "." + ut,
|
|
61367
|
-
(g.array.has(Ke) || isObject(ft) ||
|
|
61367
|
+
const ft = at[ut], dt = Ke + "." + ut, Ct = get(o, dt);
|
|
61368
|
+
(g.array.has(Ke) || isObject(ft) || Ct && !Ct._f) && !isDateObject(ft) ? Ve(dt, ft, Qe) : Ne(dt, ft, Qe);
|
|
61368
61369
|
}
|
|
61369
61370
|
}, je = (Ke, at, Qe = {}) => {
|
|
61370
61371
|
const ut = get(o, Ke), ft = g.array.has(Ke), dt = cloneObject(at);
|
|
@@ -61385,19 +61386,19 @@ function createFormControl(t = {}) {
|
|
|
61385
61386
|
let Qe = at.name, ut = !0;
|
|
61386
61387
|
const ft = get(o, Qe), dt = (Yt) => {
|
|
61387
61388
|
ut = Number.isNaN(Yt) || isDateObject(Yt) && isNaN(Yt.getTime()) || deepEqual$1(Yt, get(d, Qe, Yt));
|
|
61388
|
-
},
|
|
61389
|
+
}, Ct = getValidationModes(e.mode), zt = getValidationModes(e.reValidateMode);
|
|
61389
61390
|
if (ft) {
|
|
61390
61391
|
let Yt, ar;
|
|
61391
|
-
const cr = at.type ? getFieldValue(ft._f) : getEventValue(Ke),
|
|
61392
|
-
set(d, Qe, cr),
|
|
61393
|
-
const Zt = j(Qe, cr,
|
|
61394
|
-
if (!
|
|
61392
|
+
const cr = at.type ? getFieldValue(ft._f) : getEventValue(Ke), pt = Ke.type === EVENTS.BLUR || Ke.type === EVENTS.FOCUS_OUT, xr = !hasValidation(ft._f) && !e.resolver && !get(n.errors, Qe) && !ft._f.deps || skipValidation(pt, get(n.touchedFields, Qe), n.isSubmitted, zt, Ct), mt = isWatched(Qe, g, pt);
|
|
61393
|
+
set(d, Qe, cr), pt ? (ft._f.onBlur && ft._f.onBlur(Ke), b && b(0)) : ft._f.onChange && ft._f.onChange(Ke);
|
|
61394
|
+
const Zt = j(Qe, cr, pt), Wt = !isEmptyObject$1(Zt) || mt;
|
|
61395
|
+
if (!pt && E.state.next({
|
|
61395
61396
|
name: Qe,
|
|
61396
61397
|
type: Ke.type,
|
|
61397
61398
|
values: cloneObject(d)
|
|
61398
61399
|
}), xr)
|
|
61399
|
-
return (_.isValid || C.isValid) && (e.mode === "onBlur" ?
|
|
61400
|
-
if (!
|
|
61400
|
+
return (_.isValid || C.isValid) && (e.mode === "onBlur" ? pt && I() : pt || I()), Wt && E.state.next({ name: Qe, ...mt ? {} : Zt });
|
|
61401
|
+
if (!pt && mt && E.state.next({ ...n }), e.resolver) {
|
|
61401
61402
|
const { errors: rr } = await te([Qe]);
|
|
61402
61403
|
if (dt(cr), ut) {
|
|
61403
61404
|
const sr = schemaErrorLookup(n.errors, o, Qe), Ar = schemaErrorLookup(rr, o, sr.name || Qe);
|
|
@@ -61415,10 +61416,10 @@ function createFormControl(t = {}) {
|
|
|
61415
61416
|
const ft = convertToArrayPayload(Ke);
|
|
61416
61417
|
if (e.resolver) {
|
|
61417
61418
|
const dt = await ne(isUndefined(Ke) ? Ke : ft);
|
|
61418
|
-
Qe = isEmptyObject$1(dt), ut = Ke ? !ft.some((
|
|
61419
|
+
Qe = isEmptyObject$1(dt), ut = Ke ? !ft.some((Ct) => get(dt, Ct)) : Qe;
|
|
61419
61420
|
} else Ke ? (ut = (await Promise.all(ft.map(async (dt) => {
|
|
61420
|
-
const
|
|
61421
|
-
return await oe(
|
|
61421
|
+
const Ct = get(o, dt);
|
|
61422
|
+
return await oe(Ct && Ct._f ? { [dt]: Ct } : Ct);
|
|
61422
61423
|
}))).every(Boolean), !(!ut && !n.isValid) && I()) : ut = Qe = await oe(o);
|
|
61423
61424
|
return E.state.next({
|
|
61424
61425
|
...!isString(Ke) || (_.isValid || C.isValid) && Qe !== n.isValid ? {} : { name: Ke },
|
|
@@ -61441,7 +61442,7 @@ function createFormControl(t = {}) {
|
|
|
61441
61442
|
errors: Ke ? n.errors : {}
|
|
61442
61443
|
});
|
|
61443
61444
|
}, Ze = (Ke, at, Qe) => {
|
|
61444
|
-
const ut = (get(o, Ke, { _f: {} })._f || {}).ref, ft = get(n.errors, Ke) || {}, { ref: dt, message:
|
|
61445
|
+
const ut = (get(o, Ke, { _f: {} })._f || {}).ref, ft = get(n.errors, Ke) || {}, { ref: dt, message: Ct, type: zt, ...Yt } = ft;
|
|
61445
61446
|
set(n.errors, Ke, {
|
|
61446
61447
|
...Yt,
|
|
61447
61448
|
...at,
|
|
@@ -61508,13 +61509,13 @@ function createFormControl(t = {}) {
|
|
|
61508
61509
|
ref: (ft) => {
|
|
61509
61510
|
if (ft) {
|
|
61510
61511
|
et(Ke, at), Qe = get(o, Ke);
|
|
61511
|
-
const dt = isUndefined(ft.value) && ft.querySelectorAll && ft.querySelectorAll("input,select,textarea")[0] || ft,
|
|
61512
|
-
if (
|
|
61512
|
+
const dt = isUndefined(ft.value) && ft.querySelectorAll && ft.querySelectorAll("input,select,textarea")[0] || ft, Ct = isRadioOrCheckbox(dt), zt = Qe._f.refs || [];
|
|
61513
|
+
if (Ct ? zt.find((Yt) => Yt === dt) : dt === Qe._f.ref)
|
|
61513
61514
|
return;
|
|
61514
61515
|
set(o, Ke, {
|
|
61515
61516
|
_f: {
|
|
61516
61517
|
...Qe._f,
|
|
61517
|
-
...
|
|
61518
|
+
...Ct ? {
|
|
61518
61519
|
refs: [
|
|
61519
61520
|
...zt.filter(live),
|
|
61520
61521
|
dt,
|
|
@@ -61542,8 +61543,8 @@ function createFormControl(t = {}) {
|
|
|
61542
61543
|
if (E.state.next({
|
|
61543
61544
|
isSubmitting: !0
|
|
61544
61545
|
}), e.resolver) {
|
|
61545
|
-
const { errors: dt, values:
|
|
61546
|
-
n.errors = dt, ft =
|
|
61546
|
+
const { errors: dt, values: Ct } = await te();
|
|
61547
|
+
n.errors = dt, ft = Ct;
|
|
61547
61548
|
} else
|
|
61548
61549
|
await oe(o);
|
|
61549
61550
|
if (g.disabled.size)
|
|
@@ -61574,16 +61575,16 @@ function createFormControl(t = {}) {
|
|
|
61574
61575
|
const Qe = Ke ? cloneObject(Ke) : l, ut = cloneObject(Qe), ft = isEmptyObject$1(Ke), dt = ft ? l : ut;
|
|
61575
61576
|
if (at.keepDefaultValues || (l = Qe), !at.keepValues) {
|
|
61576
61577
|
if (at.keepDirtyValues) {
|
|
61577
|
-
const
|
|
61578
|
+
const Ct = /* @__PURE__ */ new Set([
|
|
61578
61579
|
...g.mount,
|
|
61579
61580
|
...Object.keys(getDirtyFields(l, d))
|
|
61580
61581
|
]);
|
|
61581
|
-
for (const zt of Array.from(
|
|
61582
|
+
for (const zt of Array.from(Ct))
|
|
61582
61583
|
get(n.dirtyFields, zt) ? set(dt, zt, get(d, zt)) : je(zt, get(dt, zt));
|
|
61583
61584
|
} else {
|
|
61584
61585
|
if (isWeb && isUndefined(Ke))
|
|
61585
|
-
for (const
|
|
61586
|
-
const zt = get(o,
|
|
61586
|
+
for (const Ct of g.mount) {
|
|
61587
|
+
const zt = get(o, Ct);
|
|
61587
61588
|
if (zt && zt._f) {
|
|
61588
61589
|
const Yt = Array.isArray(zt._f.refs) ? zt._f.refs[0] : zt._f.ref;
|
|
61589
61590
|
if (isHTMLElement(Yt)) {
|
|
@@ -61595,8 +61596,8 @@ function createFormControl(t = {}) {
|
|
|
61595
61596
|
}
|
|
61596
61597
|
}
|
|
61597
61598
|
}
|
|
61598
|
-
for (const
|
|
61599
|
-
je(
|
|
61599
|
+
for (const Ct of g.mount)
|
|
61600
|
+
je(Ct, get(dt, Ct));
|
|
61600
61601
|
}
|
|
61601
61602
|
d = cloneObject(dt), E.array.next({
|
|
61602
61603
|
values: { ...dt }
|
|
@@ -61622,7 +61623,7 @@ function createFormControl(t = {}) {
|
|
|
61622
61623
|
isSubmitSuccessful: at.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
|
|
61623
61624
|
isSubmitting: !1
|
|
61624
61625
|
});
|
|
61625
|
-
},
|
|
61626
|
+
}, yt = (Ke, at) => Je(isFunction$3(Ke) ? Ke(d) : Ke, at), Mt = (Ke, at = {}) => {
|
|
61626
61627
|
const Qe = get(o, Ke), ut = Qe && Qe._f;
|
|
61627
61628
|
if (ut) {
|
|
61628
61629
|
const ft = ut.refs ? ut.refs[0] : ut.ref;
|
|
@@ -61652,7 +61653,7 @@ function createFormControl(t = {}) {
|
|
|
61652
61653
|
_getFieldArray: $e,
|
|
61653
61654
|
_reset: Je,
|
|
61654
61655
|
_resetDefaultValues: () => isFunction$3(e.defaultValues) && e.defaultValues().then((Ke) => {
|
|
61655
|
-
|
|
61656
|
+
yt(Ke, e.resetOptions), E.state.next({
|
|
61656
61657
|
isLoading: !1
|
|
61657
61658
|
});
|
|
61658
61659
|
}),
|
|
@@ -61701,7 +61702,7 @@ function createFormControl(t = {}) {
|
|
|
61701
61702
|
watch: tt,
|
|
61702
61703
|
setValue: je,
|
|
61703
61704
|
getValues: qe,
|
|
61704
|
-
reset:
|
|
61705
|
+
reset: yt,
|
|
61705
61706
|
resetField: Rt,
|
|
61706
61707
|
clearErrors: He,
|
|
61707
61708
|
unregister: Xe,
|
|
@@ -61897,14 +61898,14 @@ function requireReactIs_development() {
|
|
|
61897
61898
|
case C:
|
|
61898
61899
|
return Je;
|
|
61899
61900
|
default:
|
|
61900
|
-
var
|
|
61901
|
-
switch (
|
|
61901
|
+
var yt = Je && Je.$$typeof;
|
|
61902
|
+
switch (yt) {
|
|
61902
61903
|
case g:
|
|
61903
61904
|
case _:
|
|
61904
61905
|
case A:
|
|
61905
61906
|
case R:
|
|
61906
61907
|
case f:
|
|
61907
|
-
return
|
|
61908
|
+
return yt;
|
|
61908
61909
|
default:
|
|
61909
61910
|
return Rt;
|
|
61910
61911
|
}
|
|
@@ -67867,11 +67868,11 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
67867
67868
|
V.locations && (Dt.loc = new Ze(this, ct, $t)), V.ranges && (Dt.range = [We, lt]), ae.push(Dt);
|
|
67868
67869
|
};
|
|
67869
67870
|
}
|
|
67870
|
-
var et = 1, ot = 2, st = 4, Ue = 8, Rt = 16, Je = 32,
|
|
67871
|
+
var et = 1, ot = 2, st = 4, Ue = 8, Rt = 16, Je = 32, yt = 64, Mt = 128, qt = 256, Ht = et | ot | qt;
|
|
67871
67872
|
function Ft(V, ae) {
|
|
67872
67873
|
return ot | (V ? st : 0) | (ae ? Ue : 0);
|
|
67873
67874
|
}
|
|
67874
|
-
var Ke = 0, at = 1, Qe = 2, ut = 3, ft = 4, dt = 5,
|
|
67875
|
+
var Ke = 0, at = 1, Qe = 2, ut = 3, ft = 4, dt = 5, Ct = function(ae, Be, Fe) {
|
|
67875
67876
|
this.options = ae = Xe(ae), this.sourceFile = ae.sourceFile, this.keywords = Le(S[ae.ecmaVersion >= 6 ? 6 : ae.sourceType === "module" ? "5module" : 5]);
|
|
67876
67877
|
var We = "";
|
|
67877
67878
|
ae.allowReserved !== !0 && (We = g[ae.ecmaVersion >= 6 ? 6 : ae.ecmaVersion === 5 ? 5 : 3], ae.sourceType === "module" && (We += " await")), this.reservedWords = Le(We);
|
|
@@ -67879,7 +67880,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
67879
67880
|
this.reservedWordsStrict = Le(lt), this.reservedWordsStrictBind = Le(lt + " " + g.strictBind), this.input = String(Be), this.containsEsc = !1, Fe ? (this.pos = Fe, this.lineStart = this.input.lastIndexOf(`
|
|
67880
67881
|
`, Fe - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(te).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = F.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = ae.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && ae.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(et), this.regexpState = null, this.privateNameStack = [];
|
|
67881
67882
|
}, zt = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
67882
|
-
|
|
67883
|
+
Ct.prototype.parse = function() {
|
|
67883
67884
|
var ae = this.options.program || this.startNode();
|
|
67884
67885
|
return this.nextToken(), this.parseTopLevel(ae);
|
|
67885
67886
|
}, zt.inFunction.get = function() {
|
|
@@ -67899,7 +67900,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
67899
67900
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
67900
67901
|
}, zt.allowSuper.get = function() {
|
|
67901
67902
|
var V = this.currentThisScope(), ae = V.flags, Be = V.inClassFieldInit;
|
|
67902
|
-
return (ae &
|
|
67903
|
+
return (ae & yt) > 0 || Be || this.options.allowSuperOutsideMethod;
|
|
67903
67904
|
}, zt.allowDirectSuper.get = function() {
|
|
67904
67905
|
return (this.currentThisScope().flags & Mt) > 0;
|
|
67905
67906
|
}, zt.treatFunctionsAsVar.get = function() {
|
|
@@ -67909,21 +67910,21 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
67909
67910
|
return (ae & (ot | qt)) > 0 || Be;
|
|
67910
67911
|
}, zt.inClassStaticBlock.get = function() {
|
|
67911
67912
|
return (this.currentVarScope().flags & qt) > 0;
|
|
67912
|
-
},
|
|
67913
|
+
}, Ct.extend = function() {
|
|
67913
67914
|
for (var ae = [], Be = arguments.length; Be--; )
|
|
67914
67915
|
ae[Be] = arguments[Be];
|
|
67915
67916
|
for (var Fe = this, We = 0; We < ae.length; We++)
|
|
67916
67917
|
Fe = ae[We](Fe);
|
|
67917
67918
|
return Fe;
|
|
67918
|
-
},
|
|
67919
|
+
}, Ct.parse = function(ae, Be) {
|
|
67919
67920
|
return new this(Be, ae).parse();
|
|
67920
|
-
},
|
|
67921
|
+
}, Ct.parseExpressionAt = function(ae, Be, Fe) {
|
|
67921
67922
|
var We = new this(Fe, ae, Be);
|
|
67922
67923
|
return We.nextToken(), We.parseExpression();
|
|
67923
|
-
},
|
|
67924
|
+
}, Ct.tokenizer = function(ae, Be) {
|
|
67924
67925
|
return new this(Be, ae);
|
|
67925
|
-
}, Object.defineProperties(
|
|
67926
|
-
var Yt =
|
|
67926
|
+
}, Object.defineProperties(Ct.prototype, zt);
|
|
67927
|
+
var Yt = Ct.prototype, ar = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
67927
67928
|
Yt.strictDirective = function(V) {
|
|
67928
67929
|
if (this.options.ecmaVersion < 5)
|
|
67929
67930
|
return !1;
|
|
@@ -67983,8 +67984,8 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
67983
67984
|
}, Yt.isSimpleAssignTarget = function(V) {
|
|
67984
67985
|
return V.type === "ParenthesizedExpression" ? this.isSimpleAssignTarget(V.expression) : V.type === "Identifier" || V.type === "MemberExpression";
|
|
67985
67986
|
};
|
|
67986
|
-
var
|
|
67987
|
-
|
|
67987
|
+
var pt = Ct.prototype;
|
|
67988
|
+
pt.parseTopLevel = function(V) {
|
|
67988
67989
|
var ae = /* @__PURE__ */ Object.create(null);
|
|
67989
67990
|
for (V.body || (V.body = []); this.type !== F.eof; ) {
|
|
67990
67991
|
var Be = this.parseStatement(null, !0, ae);
|
|
@@ -67997,8 +67998,8 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
67997
67998
|
}
|
|
67998
67999
|
return this.adaptDirectivePrologue(V.body), this.next(), V.sourceType = this.options.sourceType, this.finishNode(V, "Program");
|
|
67999
68000
|
};
|
|
68000
|
-
var xr = { kind: "loop" },
|
|
68001
|
-
|
|
68001
|
+
var xr = { kind: "loop" }, mt = { kind: "switch" };
|
|
68002
|
+
pt.isLet = function(V) {
|
|
68002
68003
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let"))
|
|
68003
68004
|
return !1;
|
|
68004
68005
|
Ae.lastIndex = this.pos;
|
|
@@ -68019,13 +68020,13 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68019
68020
|
return !0;
|
|
68020
68021
|
}
|
|
68021
68022
|
return !1;
|
|
68022
|
-
},
|
|
68023
|
+
}, pt.isAsyncFunction = function() {
|
|
68023
68024
|
if (this.options.ecmaVersion < 8 || !this.isContextual("async"))
|
|
68024
68025
|
return !1;
|
|
68025
68026
|
Ae.lastIndex = this.pos;
|
|
68026
68027
|
var V = Ae.exec(this.input), ae = this.pos + V[0].length, Be;
|
|
68027
68028
|
return !te.test(this.input.slice(this.pos, ae)) && this.input.slice(ae, ae + 8) === "function" && (ae + 8 === this.input.length || !(I(Be = this.input.charCodeAt(ae + 8)) || Be > 55295 && Be < 56320));
|
|
68028
|
-
},
|
|
68029
|
+
}, pt.parseStatement = function(V, ae, Be) {
|
|
68029
68030
|
var Fe = this.type, We = this.startNode(), lt;
|
|
68030
68031
|
switch (this.isLet(V) && (Fe = F._var, lt = "let"), Fe) {
|
|
68031
68032
|
case F._break:
|
|
@@ -68077,7 +68078,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68077
68078
|
var Qt = this.value, Jt = this.parseExpression();
|
|
68078
68079
|
return Fe === F.name && Jt.type === "Identifier" && this.eat(F.colon) ? this.parseLabeledStatement(We, Qt, Jt, V) : this.parseExpressionStatement(We, Jt);
|
|
68079
68080
|
}
|
|
68080
|
-
},
|
|
68081
|
+
}, pt.parseBreakContinueStatement = function(V, ae) {
|
|
68081
68082
|
var Be = ae === "break";
|
|
68082
68083
|
this.next(), this.eat(F.semi) || this.insertSemicolon() ? V.label = null : this.type !== F.name ? this.unexpected() : (V.label = this.parseIdent(), this.semicolon());
|
|
68083
68084
|
for (var Fe = 0; Fe < this.labels.length; ++Fe) {
|
|
@@ -68086,11 +68087,11 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68086
68087
|
break;
|
|
68087
68088
|
}
|
|
68088
68089
|
return Fe === this.labels.length && this.raise(V.start, "Unsyntactic " + ae), this.finishNode(V, Be ? "BreakStatement" : "ContinueStatement");
|
|
68089
|
-
},
|
|
68090
|
+
}, pt.parseDebuggerStatement = function(V) {
|
|
68090
68091
|
return this.next(), this.semicolon(), this.finishNode(V, "DebuggerStatement");
|
|
68091
|
-
},
|
|
68092
|
+
}, pt.parseDoStatement = function(V) {
|
|
68092
68093
|
return this.next(), this.labels.push(xr), V.body = this.parseStatement("do"), this.labels.pop(), this.expect(F._while), V.test = this.parseParenExpression(), this.options.ecmaVersion >= 6 ? this.eat(F.semi) : this.semicolon(), this.finishNode(V, "DoWhileStatement");
|
|
68093
|
-
},
|
|
68094
|
+
}, pt.parseForStatement = function(V) {
|
|
68094
68095
|
this.next();
|
|
68095
68096
|
var ae = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1;
|
|
68096
68097
|
if (this.labels.push(xr), this.enterScope(0), this.expect(F.parenL), this.type === F.semi)
|
|
@@ -68102,14 +68103,14 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68102
68103
|
}
|
|
68103
68104
|
var lt = this.isContextual("let"), ct = !1, $t = this.containsEsc, Dt = new cr(), Qt = this.start, Jt = ae > -1 ? this.parseExprSubscripts(Dt, "await") : this.parseExpression(!0, Dt);
|
|
68104
68105
|
return this.type === F._in || (ct = this.options.ecmaVersion >= 6 && this.isContextual("of")) ? (ae > -1 ? (this.type === F._in && this.unexpected(ae), V.await = !0) : ct && this.options.ecmaVersion >= 8 && (Jt.start === Qt && !$t && Jt.type === "Identifier" && Jt.name === "async" ? this.unexpected() : this.options.ecmaVersion >= 9 && (V.await = !1)), lt && ct && this.raise(Jt.start, "The left-hand side of a for-of loop may not start with 'let'."), this.toAssignable(Jt, !1, Dt), this.checkLValPattern(Jt), this.parseForIn(V, Jt)) : (this.checkExpressionErrors(Dt, !0), ae > -1 && this.unexpected(ae), this.parseFor(V, Jt));
|
|
68105
|
-
},
|
|
68106
|
-
return this.next(), this.parseFunction(V,
|
|
68107
|
-
},
|
|
68106
|
+
}, pt.parseFunctionStatement = function(V, ae, Be) {
|
|
68107
|
+
return this.next(), this.parseFunction(V, Wt | (Be ? 0 : rr), !1, ae);
|
|
68108
|
+
}, pt.parseIfStatement = function(V) {
|
|
68108
68109
|
return this.next(), V.test = this.parseParenExpression(), V.consequent = this.parseStatement("if"), V.alternate = this.eat(F._else) ? this.parseStatement("if") : null, this.finishNode(V, "IfStatement");
|
|
68109
|
-
},
|
|
68110
|
+
}, pt.parseReturnStatement = function(V) {
|
|
68110
68111
|
return !this.inFunction && !this.options.allowReturnOutsideFunction && this.raise(this.start, "'return' outside of function"), this.next(), this.eat(F.semi) || this.insertSemicolon() ? V.argument = null : (V.argument = this.parseExpression(), this.semicolon()), this.finishNode(V, "ReturnStatement");
|
|
68111
|
-
},
|
|
68112
|
-
this.next(), V.discriminant = this.parseParenExpression(), V.cases = [], this.expect(F.braceL), this.labels.push(
|
|
68112
|
+
}, pt.parseSwitchStatement = function(V) {
|
|
68113
|
+
this.next(), V.discriminant = this.parseParenExpression(), V.cases = [], this.expect(F.braceL), this.labels.push(mt), this.enterScope(0);
|
|
68113
68114
|
for (var ae, Be = !1; this.type !== F.braceR; )
|
|
68114
68115
|
if (this.type === F._case || this.type === F._default) {
|
|
68115
68116
|
var Fe = this.type === F._case;
|
|
@@ -68117,28 +68118,28 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68117
68118
|
} else
|
|
68118
68119
|
ae || this.unexpected(), ae.consequent.push(this.parseStatement(null));
|
|
68119
68120
|
return this.exitScope(), ae && this.finishNode(ae, "SwitchCase"), this.next(), this.labels.pop(), this.finishNode(V, "SwitchStatement");
|
|
68120
|
-
},
|
|
68121
|
+
}, pt.parseThrowStatement = function(V) {
|
|
68121
68122
|
return this.next(), te.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, "Illegal newline after throw"), V.argument = this.parseExpression(), this.semicolon(), this.finishNode(V, "ThrowStatement");
|
|
68122
68123
|
};
|
|
68123
68124
|
var Zt = [];
|
|
68124
|
-
|
|
68125
|
+
pt.parseCatchClauseParam = function() {
|
|
68125
68126
|
var V = this.parseBindingAtom(), ae = V.type === "Identifier";
|
|
68126
68127
|
return this.enterScope(ae ? Je : 0), this.checkLValPattern(V, ae ? ft : Qe), this.expect(F.parenR), V;
|
|
68127
|
-
},
|
|
68128
|
+
}, pt.parseTryStatement = function(V) {
|
|
68128
68129
|
if (this.next(), V.block = this.parseBlock(), V.handler = null, this.type === F._catch) {
|
|
68129
68130
|
var ae = this.startNode();
|
|
68130
68131
|
this.next(), this.eat(F.parenL) ? ae.param = this.parseCatchClauseParam() : (this.options.ecmaVersion < 10 && this.unexpected(), ae.param = null, this.enterScope(0)), ae.body = this.parseBlock(!1), this.exitScope(), V.handler = this.finishNode(ae, "CatchClause");
|
|
68131
68132
|
}
|
|
68132
68133
|
return V.finalizer = this.eat(F._finally) ? this.parseBlock() : null, !V.handler && !V.finalizer && this.raise(V.start, "Missing catch or finally clause"), this.finishNode(V, "TryStatement");
|
|
68133
|
-
},
|
|
68134
|
+
}, pt.parseVarStatement = function(V, ae, Be) {
|
|
68134
68135
|
return this.next(), this.parseVar(V, !1, ae, Be), this.semicolon(), this.finishNode(V, "VariableDeclaration");
|
|
68135
|
-
},
|
|
68136
|
+
}, pt.parseWhileStatement = function(V) {
|
|
68136
68137
|
return this.next(), V.test = this.parseParenExpression(), this.labels.push(xr), V.body = this.parseStatement("while"), this.labels.pop(), this.finishNode(V, "WhileStatement");
|
|
68137
|
-
},
|
|
68138
|
+
}, pt.parseWithStatement = function(V) {
|
|
68138
68139
|
return this.strict && this.raise(this.start, "'with' in strict mode"), this.next(), V.object = this.parseParenExpression(), V.body = this.parseStatement("with"), this.finishNode(V, "WithStatement");
|
|
68139
|
-
},
|
|
68140
|
+
}, pt.parseEmptyStatement = function(V) {
|
|
68140
68141
|
return this.next(), this.finishNode(V, "EmptyStatement");
|
|
68141
|
-
},
|
|
68142
|
+
}, pt.parseLabeledStatement = function(V, ae, Be, Fe) {
|
|
68142
68143
|
for (var We = 0, lt = this.labels; We < lt.length; We += 1) {
|
|
68143
68144
|
var ct = lt[We];
|
|
68144
68145
|
ct.name === ae && this.raise(Be.start, "Label '" + ae + "' is already declared");
|
|
@@ -68151,37 +68152,37 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68151
68152
|
break;
|
|
68152
68153
|
}
|
|
68153
68154
|
return this.labels.push({ name: ae, kind: $t, statementStart: this.start }), V.body = this.parseStatement(Fe ? Fe.indexOf("label") === -1 ? Fe + "label" : Fe : "label"), this.labels.pop(), V.label = Be, this.finishNode(V, "LabeledStatement");
|
|
68154
|
-
},
|
|
68155
|
+
}, pt.parseExpressionStatement = function(V, ae) {
|
|
68155
68156
|
return V.expression = ae, this.semicolon(), this.finishNode(V, "ExpressionStatement");
|
|
68156
|
-
},
|
|
68157
|
+
}, pt.parseBlock = function(V, ae, Be) {
|
|
68157
68158
|
for (V === void 0 && (V = !0), ae === void 0 && (ae = this.startNode()), ae.body = [], this.expect(F.braceL), V && this.enterScope(0); this.type !== F.braceR; ) {
|
|
68158
68159
|
var Fe = this.parseStatement(null);
|
|
68159
68160
|
ae.body.push(Fe);
|
|
68160
68161
|
}
|
|
68161
68162
|
return Be && (this.strict = !1), this.next(), V && this.exitScope(), this.finishNode(ae, "BlockStatement");
|
|
68162
|
-
},
|
|
68163
|
+
}, pt.parseFor = function(V, ae) {
|
|
68163
68164
|
return V.init = ae, this.expect(F.semi), V.test = this.type === F.semi ? null : this.parseExpression(), this.expect(F.semi), V.update = this.type === F.parenR ? null : this.parseExpression(), this.expect(F.parenR), V.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(V, "ForStatement");
|
|
68164
|
-
},
|
|
68165
|
+
}, pt.parseForIn = function(V, ae) {
|
|
68165
68166
|
var Be = this.type === F._in;
|
|
68166
68167
|
return this.next(), ae.type === "VariableDeclaration" && ae.declarations[0].init != null && (!Be || this.options.ecmaVersion < 8 || this.strict || ae.kind !== "var" || ae.declarations[0].id.type !== "Identifier") && this.raise(ae.start, (Be ? "for-in" : "for-of") + " loop variable declaration may not have an initializer"), V.left = ae, V.right = Be ? this.parseExpression() : this.parseMaybeAssign(), this.expect(F.parenR), V.body = this.parseStatement("for"), this.exitScope(), this.labels.pop(), this.finishNode(V, Be ? "ForInStatement" : "ForOfStatement");
|
|
68167
|
-
},
|
|
68168
|
+
}, pt.parseVar = function(V, ae, Be, Fe) {
|
|
68168
68169
|
for (V.declarations = [], V.kind = Be; ; ) {
|
|
68169
68170
|
var We = this.startNode();
|
|
68170
68171
|
if (this.parseVarId(We, Be), this.eat(F.eq) ? We.init = this.parseMaybeAssign(ae) : !Fe && Be === "const" && !(this.type === F._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) ? this.unexpected() : !Fe && We.id.type !== "Identifier" && !(ae && (this.type === F._in || this.isContextual("of"))) ? this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value") : We.init = null, V.declarations.push(this.finishNode(We, "VariableDeclarator")), !this.eat(F.comma))
|
|
68171
68172
|
break;
|
|
68172
68173
|
}
|
|
68173
68174
|
return V;
|
|
68174
|
-
},
|
|
68175
|
+
}, pt.parseVarId = function(V, ae) {
|
|
68175
68176
|
V.id = this.parseBindingAtom(), this.checkLValPattern(V.id, ae === "var" ? at : Qe, !1);
|
|
68176
68177
|
};
|
|
68177
|
-
var
|
|
68178
|
-
|
|
68179
|
-
this.initFunction(V), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !Fe) && (this.type === F.star && ae & rr && this.unexpected(), V.generator = this.eat(F.star)), this.options.ecmaVersion >= 8 && (V.async = !!Fe), ae &
|
|
68178
|
+
var Wt = 1, rr = 2, sr = 4;
|
|
68179
|
+
pt.parseFunction = function(V, ae, Be, Fe, We) {
|
|
68180
|
+
this.initFunction(V), (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !Fe) && (this.type === F.star && ae & rr && this.unexpected(), V.generator = this.eat(F.star)), this.options.ecmaVersion >= 8 && (V.async = !!Fe), ae & Wt && (V.id = ae & sr && this.type !== F.name ? null : this.parseIdent(), V.id && !(ae & rr) && this.checkLValSimple(V.id, this.strict || V.generator || V.async ? this.treatFunctionsAsVar ? at : Qe : ut));
|
|
68180
68181
|
var lt = this.yieldPos, ct = this.awaitPos, $t = this.awaitIdentPos;
|
|
68181
|
-
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ft(V.async, V.generator)), ae &
|
|
68182
|
-
},
|
|
68182
|
+
return this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ft(V.async, V.generator)), ae & Wt || (V.id = this.type === F.name ? this.parseIdent() : null), this.parseFunctionParams(V), this.parseFunctionBody(V, Be, !1, We), this.yieldPos = lt, this.awaitPos = ct, this.awaitIdentPos = $t, this.finishNode(V, ae & Wt ? "FunctionDeclaration" : "FunctionExpression");
|
|
68183
|
+
}, pt.parseFunctionParams = function(V) {
|
|
68183
68184
|
this.expect(F.parenL), V.params = this.parseBindingList(F.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams();
|
|
68184
|
-
},
|
|
68185
|
+
}, pt.parseClass = function(V, ae) {
|
|
68185
68186
|
this.next();
|
|
68186
68187
|
var Be = this.strict;
|
|
68187
68188
|
this.strict = !0, this.parseClassId(V, ae), this.parseClassSuper(V);
|
|
@@ -68191,7 +68192,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68191
68192
|
ct && (We.body.push(ct), ct.type === "MethodDefinition" && ct.kind === "constructor" ? (lt && this.raiseRecoverable(ct.start, "Duplicate constructor in the same class"), lt = !0) : ct.key && ct.key.type === "PrivateIdentifier" && Ar(Fe, ct) && this.raiseRecoverable(ct.key.start, "Identifier '#" + ct.key.name + "' has already been declared"));
|
|
68192
68193
|
}
|
|
68193
68194
|
return this.strict = Be, this.next(), V.body = this.finishNode(We, "ClassBody"), this.exitClassBody(), this.finishNode(V, ae ? "ClassDeclaration" : "ClassExpression");
|
|
68194
|
-
},
|
|
68195
|
+
}, pt.parseClassElement = function(V) {
|
|
68195
68196
|
if (this.eat(F.semi))
|
|
68196
68197
|
return null;
|
|
68197
68198
|
var ae = this.options.ecmaVersion, Be = this.startNode(), Fe = "", We = !1, lt = !1, ct = "method", $t = !1;
|
|
@@ -68210,38 +68211,38 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68210
68211
|
} else
|
|
68211
68212
|
this.parseClassField(Be);
|
|
68212
68213
|
return Be;
|
|
68213
|
-
},
|
|
68214
|
+
}, pt.isClassElementNameStart = function() {
|
|
68214
68215
|
return this.type === F.name || this.type === F.privateId || this.type === F.num || this.type === F.string || this.type === F.bracketL || this.type.keyword;
|
|
68215
|
-
},
|
|
68216
|
+
}, pt.parseClassElementName = function(V) {
|
|
68216
68217
|
this.type === F.privateId ? (this.value === "constructor" && this.raise(this.start, "Classes can't have an element named '#constructor'"), V.computed = !1, V.key = this.parsePrivateIdent()) : this.parsePropertyName(V);
|
|
68217
|
-
},
|
|
68218
|
+
}, pt.parseClassMethod = function(V, ae, Be, Fe) {
|
|
68218
68219
|
var We = V.key;
|
|
68219
68220
|
V.kind === "constructor" ? (ae && this.raise(We.start, "Constructor can't be a generator"), Be && this.raise(We.start, "Constructor can't be an async method")) : V.static && Cr(V, "prototype") && this.raise(We.start, "Classes may not have a static property named prototype");
|
|
68220
68221
|
var lt = V.value = this.parseMethod(ae, Be, Fe);
|
|
68221
68222
|
return V.kind === "get" && lt.params.length !== 0 && this.raiseRecoverable(lt.start, "getter should have no params"), V.kind === "set" && lt.params.length !== 1 && this.raiseRecoverable(lt.start, "setter should have exactly one param"), V.kind === "set" && lt.params[0].type === "RestElement" && this.raiseRecoverable(lt.params[0].start, "Setter cannot use rest params"), this.finishNode(V, "MethodDefinition");
|
|
68222
|
-
},
|
|
68223
|
+
}, pt.parseClassField = function(V) {
|
|
68223
68224
|
if (Cr(V, "constructor") ? this.raise(V.key.start, "Classes can't have a field named 'constructor'") : V.static && Cr(V, "prototype") && this.raise(V.key.start, "Classes can't have a static field named 'prototype'"), this.eat(F.eq)) {
|
|
68224
68225
|
var ae = this.currentThisScope(), Be = ae.inClassFieldInit;
|
|
68225
68226
|
ae.inClassFieldInit = !0, V.value = this.parseMaybeAssign(), ae.inClassFieldInit = Be;
|
|
68226
68227
|
} else
|
|
68227
68228
|
V.value = null;
|
|
68228
68229
|
return this.semicolon(), this.finishNode(V, "PropertyDefinition");
|
|
68229
|
-
},
|
|
68230
|
+
}, pt.parseClassStaticBlock = function(V) {
|
|
68230
68231
|
V.body = [];
|
|
68231
68232
|
var ae = this.labels;
|
|
68232
|
-
for (this.labels = [], this.enterScope(qt |
|
|
68233
|
+
for (this.labels = [], this.enterScope(qt | yt); this.type !== F.braceR; ) {
|
|
68233
68234
|
var Be = this.parseStatement(null);
|
|
68234
68235
|
V.body.push(Be);
|
|
68235
68236
|
}
|
|
68236
68237
|
return this.next(), this.exitScope(), this.labels = ae, this.finishNode(V, "StaticBlock");
|
|
68237
|
-
},
|
|
68238
|
+
}, pt.parseClassId = function(V, ae) {
|
|
68238
68239
|
this.type === F.name ? (V.id = this.parseIdent(), ae && this.checkLValSimple(V.id, Qe, !1)) : (ae === !0 && this.unexpected(), V.id = null);
|
|
68239
|
-
},
|
|
68240
|
+
}, pt.parseClassSuper = function(V) {
|
|
68240
68241
|
V.superClass = this.eat(F._extends) ? this.parseExprSubscripts(null, !1) : null;
|
|
68241
|
-
},
|
|
68242
|
+
}, pt.enterClassBody = function() {
|
|
68242
68243
|
var V = { declared: /* @__PURE__ */ Object.create(null), used: [] };
|
|
68243
68244
|
return this.privateNameStack.push(V), V.declared;
|
|
68244
|
-
},
|
|
68245
|
+
}, pt.exitClassBody = function() {
|
|
68245
68246
|
var V = this.privateNameStack.pop(), ae = V.declared, Be = V.used;
|
|
68246
68247
|
if (this.options.checkPrivateFields)
|
|
68247
68248
|
for (var Fe = this.privateNameStack.length, We = Fe === 0 ? null : this.privateNameStack[Fe - 1], lt = 0; lt < Be.length; ++lt) {
|
|
@@ -68257,9 +68258,9 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68257
68258
|
var Be = V.computed, Fe = V.key;
|
|
68258
68259
|
return !Be && (Fe.type === "Identifier" && Fe.name === ae || Fe.type === "Literal" && Fe.value === ae);
|
|
68259
68260
|
}
|
|
68260
|
-
|
|
68261
|
+
pt.parseExportAllDeclaration = function(V, ae) {
|
|
68261
68262
|
return this.options.ecmaVersion >= 11 && (this.eatContextual("as") ? (V.exported = this.parseModuleExportName(), this.checkExport(ae, V.exported, this.lastTokStart)) : V.exported = null), this.expectContextual("from"), this.type !== F.string && this.unexpected(), V.source = this.parseExprAtom(), this.semicolon(), this.finishNode(V, "ExportAllDeclaration");
|
|
68262
|
-
},
|
|
68263
|
+
}, pt.parseExport = function(V, ae) {
|
|
68263
68264
|
if (this.next(), this.eat(F.star))
|
|
68264
68265
|
return this.parseExportAllDeclaration(V, ae);
|
|
68265
68266
|
if (this.eat(F._default))
|
|
@@ -68279,13 +68280,13 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68279
68280
|
this.semicolon();
|
|
68280
68281
|
}
|
|
68281
68282
|
return this.finishNode(V, "ExportNamedDeclaration");
|
|
68282
|
-
},
|
|
68283
|
+
}, pt.parseExportDeclaration = function(V) {
|
|
68283
68284
|
return this.parseStatement(null);
|
|
68284
|
-
},
|
|
68285
|
+
}, pt.parseExportDefaultDeclaration = function() {
|
|
68285
68286
|
var V;
|
|
68286
68287
|
if (this.type === F._function || (V = this.isAsyncFunction())) {
|
|
68287
68288
|
var ae = this.startNode();
|
|
68288
|
-
return this.next(), V && this.next(), this.parseFunction(ae,
|
|
68289
|
+
return this.next(), V && this.next(), this.parseFunction(ae, Wt | sr, !1, V);
|
|
68289
68290
|
} else if (this.type === F._class) {
|
|
68290
68291
|
var Be = this.startNode();
|
|
68291
68292
|
return this.parseClass(Be, "nullableID");
|
|
@@ -68293,9 +68294,9 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68293
68294
|
var Fe = this.parseMaybeAssign();
|
|
68294
68295
|
return this.semicolon(), Fe;
|
|
68295
68296
|
}
|
|
68296
|
-
},
|
|
68297
|
+
}, pt.checkExport = function(V, ae, Be) {
|
|
68297
68298
|
V && (typeof ae != "string" && (ae = ae.type === "Identifier" ? ae.name : ae.value), je(V, ae) && this.raiseRecoverable(Be, "Duplicate export '" + ae + "'"), V[ae] = !0);
|
|
68298
|
-
},
|
|
68299
|
+
}, pt.checkPatternExport = function(V, ae) {
|
|
68299
68300
|
var Be = ae.type;
|
|
68300
68301
|
if (Be === "Identifier")
|
|
68301
68302
|
this.checkExport(V, ae, ae.start);
|
|
@@ -68310,18 +68311,18 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68310
68311
|
Dt && this.checkPatternExport(V, Dt);
|
|
68311
68312
|
}
|
|
68312
68313
|
else Be === "Property" ? this.checkPatternExport(V, ae.value) : Be === "AssignmentPattern" ? this.checkPatternExport(V, ae.left) : Be === "RestElement" && this.checkPatternExport(V, ae.argument);
|
|
68313
|
-
},
|
|
68314
|
+
}, pt.checkVariableExport = function(V, ae) {
|
|
68314
68315
|
if (V)
|
|
68315
68316
|
for (var Be = 0, Fe = ae; Be < Fe.length; Be += 1) {
|
|
68316
68317
|
var We = Fe[Be];
|
|
68317
68318
|
this.checkPatternExport(V, We.id);
|
|
68318
68319
|
}
|
|
68319
|
-
},
|
|
68320
|
+
}, pt.shouldParseExportStatement = function() {
|
|
68320
68321
|
return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
|
|
68321
|
-
},
|
|
68322
|
+
}, pt.parseExportSpecifier = function(V) {
|
|
68322
68323
|
var ae = this.startNode();
|
|
68323
68324
|
return ae.local = this.parseModuleExportName(), ae.exported = this.eatContextual("as") ? this.parseModuleExportName() : ae.local, this.checkExport(V, ae.exported, ae.exported.start), this.finishNode(ae, "ExportSpecifier");
|
|
68324
|
-
},
|
|
68325
|
+
}, pt.parseExportSpecifiers = function(V) {
|
|
68325
68326
|
var ae = [], Be = !0;
|
|
68326
68327
|
for (this.expect(F.braceL); !this.eat(F.braceR); ) {
|
|
68327
68328
|
if (Be)
|
|
@@ -68331,18 +68332,18 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68331
68332
|
ae.push(this.parseExportSpecifier(V));
|
|
68332
68333
|
}
|
|
68333
68334
|
return ae;
|
|
68334
|
-
},
|
|
68335
|
+
}, pt.parseImport = function(V) {
|
|
68335
68336
|
return this.next(), this.type === F.string ? (V.specifiers = Zt, V.source = this.parseExprAtom()) : (V.specifiers = this.parseImportSpecifiers(), this.expectContextual("from"), V.source = this.type === F.string ? this.parseExprAtom() : this.unexpected()), this.semicolon(), this.finishNode(V, "ImportDeclaration");
|
|
68336
|
-
},
|
|
68337
|
+
}, pt.parseImportSpecifier = function() {
|
|
68337
68338
|
var V = this.startNode();
|
|
68338
68339
|
return V.imported = this.parseModuleExportName(), this.eatContextual("as") ? V.local = this.parseIdent() : (this.checkUnreserved(V.imported), V.local = V.imported), this.checkLValSimple(V.local, Qe), this.finishNode(V, "ImportSpecifier");
|
|
68339
|
-
},
|
|
68340
|
+
}, pt.parseImportDefaultSpecifier = function() {
|
|
68340
68341
|
var V = this.startNode();
|
|
68341
68342
|
return V.local = this.parseIdent(), this.checkLValSimple(V.local, Qe), this.finishNode(V, "ImportDefaultSpecifier");
|
|
68342
|
-
},
|
|
68343
|
+
}, pt.parseImportNamespaceSpecifier = function() {
|
|
68343
68344
|
var V = this.startNode();
|
|
68344
68345
|
return this.next(), this.expectContextual("as"), V.local = this.parseIdent(), this.checkLValSimple(V.local, Qe), this.finishNode(V, "ImportNamespaceSpecifier");
|
|
68345
|
-
},
|
|
68346
|
+
}, pt.parseImportSpecifiers = function() {
|
|
68346
68347
|
var V = [], ae = !0;
|
|
68347
68348
|
if (this.type === F.name && (V.push(this.parseImportDefaultSpecifier()), !this.eat(F.comma)))
|
|
68348
68349
|
return V;
|
|
@@ -68356,19 +68357,19 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68356
68357
|
V.push(this.parseImportSpecifier());
|
|
68357
68358
|
}
|
|
68358
68359
|
return V;
|
|
68359
|
-
},
|
|
68360
|
+
}, pt.parseModuleExportName = function() {
|
|
68360
68361
|
if (this.options.ecmaVersion >= 13 && this.type === F.string) {
|
|
68361
68362
|
var V = this.parseLiteral(this.value);
|
|
68362
68363
|
return Ge.test(V.value) && this.raise(V.start, "An export name cannot include a lone surrogate."), V;
|
|
68363
68364
|
}
|
|
68364
68365
|
return this.parseIdent(!0);
|
|
68365
|
-
},
|
|
68366
|
+
}, pt.adaptDirectivePrologue = function(V) {
|
|
68366
68367
|
for (var ae = 0; ae < V.length && this.isDirectiveCandidate(V[ae]); ++ae)
|
|
68367
68368
|
V[ae].directive = V[ae].expression.raw.slice(1, -1);
|
|
68368
|
-
},
|
|
68369
|
+
}, pt.isDirectiveCandidate = function(V) {
|
|
68369
68370
|
return this.options.ecmaVersion >= 5 && V.type === "ExpressionStatement" && V.expression.type === "Literal" && typeof V.expression.value == "string" && (this.input[V.start] === '"' || this.input[V.start] === "'");
|
|
68370
68371
|
};
|
|
68371
|
-
var pr =
|
|
68372
|
+
var pr = Ct.prototype;
|
|
68372
68373
|
pr.toAssignable = function(V, ae, Be) {
|
|
68373
68374
|
if (this.options.ecmaVersion >= 6 && V)
|
|
68374
68375
|
switch (V.type) {
|
|
@@ -68529,7 +68530,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68529
68530
|
f_expr: new yr("function", !0),
|
|
68530
68531
|
f_expr_gen: new yr("function", !0, !1, null, !0),
|
|
68531
68532
|
f_gen: new yr("function", !1, !1, null, !0)
|
|
68532
|
-
}, Ir =
|
|
68533
|
+
}, Ir = Ct.prototype;
|
|
68533
68534
|
Ir.initialContext = function() {
|
|
68534
68535
|
return [er.b_stat];
|
|
68535
68536
|
}, Ir.curContext = function() {
|
|
@@ -68580,7 +68581,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68580
68581
|
var ae = !1;
|
|
68581
68582
|
this.options.ecmaVersion >= 6 && V !== F.dot && (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) && (ae = !0), this.exprAllowed = ae;
|
|
68582
68583
|
};
|
|
68583
|
-
var Xt =
|
|
68584
|
+
var Xt = Ct.prototype;
|
|
68584
68585
|
Xt.checkPropClash = function(V, ae, Be) {
|
|
68585
68586
|
if (!(this.options.ecmaVersion >= 9 && V.type === "SpreadElement") && !(this.options.ecmaVersion >= 6 && (V.computed || V.method || V.shorthand))) {
|
|
68586
68587
|
var Fe = V.key, We;
|
|
@@ -68923,7 +68924,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68923
68924
|
V.id = null, this.options.ecmaVersion >= 6 && (V.generator = V.expression = !1), this.options.ecmaVersion >= 8 && (V.async = !1);
|
|
68924
68925
|
}, Xt.parseMethod = function(V, ae, Be) {
|
|
68925
68926
|
var Fe = this.startNode(), We = this.yieldPos, lt = this.awaitPos, ct = this.awaitIdentPos;
|
|
68926
|
-
return this.initFunction(Fe), this.options.ecmaVersion >= 6 && (Fe.generator = V), this.options.ecmaVersion >= 8 && (Fe.async = !!ae), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ft(ae, Fe.generator) |
|
|
68927
|
+
return this.initFunction(Fe), this.options.ecmaVersion >= 6 && (Fe.generator = V), this.options.ecmaVersion >= 8 && (Fe.async = !!ae), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, this.enterScope(Ft(ae, Fe.generator) | yt | (Be ? Mt : 0)), this.expect(F.parenL), Fe.params = this.parseBindingList(F.parenR, !1, this.options.ecmaVersion >= 8), this.checkYieldAwaitInDefaultParams(), this.parseFunctionBody(Fe, !1, !0, !1), this.yieldPos = We, this.awaitPos = lt, this.awaitIdentPos = ct, this.finishNode(Fe, "FunctionExpression");
|
|
68927
68928
|
}, Xt.parseArrowExpression = function(V, ae, Be, Fe) {
|
|
68928
68929
|
var We = this.yieldPos, lt = this.awaitPos, ct = this.awaitIdentPos;
|
|
68929
68930
|
return this.enterScope(Ft(Be, !1) | Rt), this.initFunction(V), this.options.ecmaVersion >= 8 && (V.async = !!Be), this.yieldPos = 0, this.awaitPos = 0, this.awaitIdentPos = 0, V.params = this.toAssignableList(ae, !0), this.parseFunctionBody(V, !0, !1, Fe), this.yieldPos = We, this.awaitPos = lt, this.awaitIdentPos = ct, this.finishNode(V, "ArrowFunctionExpression");
|
|
@@ -68984,7 +68985,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68984
68985
|
var ae = this.startNode();
|
|
68985
68986
|
return this.next(), ae.argument = this.parseMaybeUnary(null, !0, !1, V), this.finishNode(ae, "AwaitExpression");
|
|
68986
68987
|
};
|
|
68987
|
-
var Vr =
|
|
68988
|
+
var Vr = Ct.prototype;
|
|
68988
68989
|
Vr.raise = function(V, ae) {
|
|
68989
68990
|
var Be = tt(this.input, V);
|
|
68990
68991
|
ae += " (" + Be.line + ":" + Be.column + ")";
|
|
@@ -68994,7 +68995,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
68994
68995
|
if (this.options.locations)
|
|
68995
68996
|
return new He(this.curLine, this.pos - this.lineStart);
|
|
68996
68997
|
};
|
|
68997
|
-
var Tr =
|
|
68998
|
+
var Tr = Ct.prototype, Qr = function(ae) {
|
|
68998
68999
|
this.flags = ae, this.var = [], this.lexical = [], this.functions = [], this.inClassFieldInit = !1;
|
|
68999
69000
|
};
|
|
69000
69001
|
Tr.enterScope = function(V) {
|
|
@@ -69044,7 +69045,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69044
69045
|
};
|
|
69045
69046
|
var $r = function(ae, Be, Fe) {
|
|
69046
69047
|
this.type = "", this.start = Be, this.end = 0, ae.options.locations && (this.loc = new Ze(ae, Fe)), ae.options.directSourceFile && (this.sourceFile = ae.options.directSourceFile), ae.options.ranges && (this.range = [Be, 0]);
|
|
69047
|
-
}, Dr =
|
|
69048
|
+
}, Dr = Ct.prototype;
|
|
69048
69049
|
Dr.startNode = function() {
|
|
69049
69050
|
return new $r(this, this.start, this.startLoc);
|
|
69050
69051
|
}, Dr.startNodeAt = function(V, ae) {
|
|
@@ -69077,9 +69078,9 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69077
69078
|
12: "",
|
|
69078
69079
|
13: "",
|
|
69079
69080
|
14: tn
|
|
69080
|
-
}, Yr = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", nn = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",
|
|
69081
|
+
}, Yr = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu", nn = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb", Kt = nn + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd", nt = Kt + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho", It = nt + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", Ut = It + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith", lr = Ut + " Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz", gr = {
|
|
69081
69082
|
9: nn,
|
|
69082
|
-
10:
|
|
69083
|
+
10: Kt,
|
|
69083
69084
|
11: nt,
|
|
69084
69085
|
12: It,
|
|
69085
69086
|
13: Ut,
|
|
@@ -69100,7 +69101,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69100
69101
|
var Zr = Or[_r];
|
|
69101
69102
|
vr(Zr);
|
|
69102
69103
|
}
|
|
69103
|
-
var Vt =
|
|
69104
|
+
var Vt = Ct.prototype, Br = function(ae, Be) {
|
|
69104
69105
|
this.parent = ae, this.base = Be || this;
|
|
69105
69106
|
};
|
|
69106
69107
|
Br.prototype.separatedFrom = function(ae) {
|
|
@@ -69642,7 +69643,7 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
69642
69643
|
};
|
|
69643
69644
|
var on = function(ae) {
|
|
69644
69645
|
this.type = ae.type, this.value = ae.value, this.start = ae.start, this.end = ae.end, ae.options.locations && (this.loc = new Ze(ae, ae.startLoc, ae.endLoc)), ae.options.ranges && (this.range = [ae.start, ae.end]);
|
|
69645
|
-
}, tr =
|
|
69646
|
+
}, tr = Ct.prototype;
|
|
69646
69647
|
tr.next = function(V) {
|
|
69647
69648
|
!V && this.type.keyword && this.containsEsc && this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword), this.options.onToken && this.options.onToken(new on(this)), this.lastTokEnd = this.end, this.lastTokStart = this.start, this.lastTokEndLoc = this.endLoc, this.lastTokStartLoc = this.startLoc, this.nextToken();
|
|
69648
69649
|
}, tr.getToken = function() {
|
|
@@ -70069,8 +70070,8 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
70069
70070
|
return this.keywords.test(V) && (ae = Q[V]), this.finishToken(ae, V);
|
|
70070
70071
|
};
|
|
70071
70072
|
var In = "8.12.1";
|
|
70072
|
-
|
|
70073
|
-
Parser:
|
|
70073
|
+
Ct.acorn = {
|
|
70074
|
+
Parser: Ct,
|
|
70074
70075
|
version: In,
|
|
70075
70076
|
defaultOptions: Ye,
|
|
70076
70077
|
Position: He,
|
|
@@ -70091,15 +70092,15 @@ Defaulting to 2020, but this will stop working in the future.`)), ae.ecmaVersion
|
|
|
70091
70092
|
nonASCIIwhitespace: se
|
|
70092
70093
|
};
|
|
70093
70094
|
function Un(V, ae) {
|
|
70094
|
-
return
|
|
70095
|
+
return Ct.parse(V, ae);
|
|
70095
70096
|
}
|
|
70096
70097
|
function Hn(V, ae, Be) {
|
|
70097
|
-
return
|
|
70098
|
+
return Ct.parseExpressionAt(V, ae, Be);
|
|
70098
70099
|
}
|
|
70099
70100
|
function zn(V, ae) {
|
|
70100
|
-
return
|
|
70101
|
+
return Ct.tokenizer(V, ae);
|
|
70101
70102
|
}
|
|
70102
|
-
n.Node = $r, n.Parser =
|
|
70103
|
+
n.Node = $r, n.Parser = Ct, n.Position = He, n.SourceLocation = Ze, n.TokContext = yr, n.Token = on, n.TokenType = M, n.defaultOptions = Ye, n.getLineInfo = tt, n.isIdentifierChar = I, n.isIdentifierStart = A, n.isNewLine = oe, n.keywordTypes = Q, n.lineBreak = te, n.lineBreakG = ne, n.nonASCIIwhitespace = se, n.parse = Un, n.parseExpressionAt = Hn, n.tokContexts = er, n.tokTypes = F, n.tokenizer = zn, n.version = In;
|
|
70103
70104
|
});
|
|
70104
70105
|
}), require_acorn_jsx = __commonJS((t, e) => {
|
|
70105
70106
|
var n = require_xhtml(), o = /^[\da-fA-F]+$/, l = /^\d+$/, d = /* @__PURE__ */ new WeakMap();
|
|
@@ -73407,7 +73408,7 @@ function ProductCard({
|
|
|
73407
73408
|
shopifyHostname: f,
|
|
73408
73409
|
customAction: g = /* @__PURE__ */ jsx(Fragment$1, {})
|
|
73409
73410
|
}) {
|
|
73410
|
-
var ot, st, Ue, Rt, Je,
|
|
73411
|
+
var ot, st, Ue, Rt, Je, yt, Mt, qt, Ht, Ft, Ke, at;
|
|
73411
73412
|
const b = useRef(null), S = useIntersectionObserver({
|
|
73412
73413
|
elementRef: b,
|
|
73413
73414
|
threshold: 0.1,
|
|
@@ -73536,7 +73537,7 @@ function ProductCard({
|
|
|
73536
73537
|
}).finally(() => {
|
|
73537
73538
|
Q(!1);
|
|
73538
73539
|
}));
|
|
73539
|
-
}, rt = ((
|
|
73540
|
+
}, rt = ((yt = (Je = e.Distribution) == null ? void 0 : Je.Inventory) == null ? void 0 : yt.reduce((Qe, ut) => Qe + (ut.AvailableQuantity || 0), 0)) || 0, Xe = (Qe) => {
|
|
73540
73541
|
try {
|
|
73541
73542
|
return new Date(Qe).toLocaleDateString("en-US", { year: "numeric", month: "short", day: "numeric" });
|
|
73542
73543
|
} catch (ut) {
|
|
@@ -75326,20 +75327,20 @@ var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition", SelectItemAlignedP
|
|
|
75326
75327
|
if (d.trigger && d.valueNode && g && S && I && M && O) {
|
|
75327
75328
|
const te = d.trigger.getBoundingClientRect(), ne = S.getBoundingClientRect(), oe = d.valueNode.getBoundingClientRect(), ge = O.getBoundingClientRect();
|
|
75328
75329
|
if (d.dir !== "rtl") {
|
|
75329
|
-
const st = ge.left - ne.left, Ue = oe.left - st, Rt = te.left - Ue, Je = te.width + Rt,
|
|
75330
|
+
const st = ge.left - ne.left, Ue = oe.left - st, Rt = te.left - Ue, Je = te.width + Rt, yt = Math.max(Je, ne.width), Mt = window.innerWidth - CONTENT_MARGIN, qt = clamp(Ue, [
|
|
75330
75331
|
CONTENT_MARGIN,
|
|
75331
75332
|
// Prevents the content from going off the starting edge of the
|
|
75332
75333
|
// viewport. It may still go off the ending edge, but this can be
|
|
75333
75334
|
// controlled by the user since they may want to manage overflow in a
|
|
75334
75335
|
// specific way.
|
|
75335
75336
|
// https://github.com/radix-ui/primitives/issues/2049
|
|
75336
|
-
Math.max(CONTENT_MARGIN, Mt -
|
|
75337
|
+
Math.max(CONTENT_MARGIN, Mt - yt)
|
|
75337
75338
|
]);
|
|
75338
75339
|
g.style.minWidth = Je + "px", g.style.left = qt + "px";
|
|
75339
75340
|
} else {
|
|
75340
|
-
const st = ne.right - ge.right, Ue = window.innerWidth - oe.right - st, Rt = window.innerWidth - te.right - Ue, Je = te.width + Rt,
|
|
75341
|
+
const st = ne.right - ge.right, Ue = window.innerWidth - oe.right - st, Rt = window.innerWidth - te.right - Ue, Je = te.width + Rt, yt = Math.max(Je, ne.width), Mt = window.innerWidth - CONTENT_MARGIN, qt = clamp(Ue, [
|
|
75341
75342
|
CONTENT_MARGIN,
|
|
75342
|
-
Math.max(CONTENT_MARGIN, Mt -
|
|
75343
|
+
Math.max(CONTENT_MARGIN, Mt - yt)
|
|
75343
75344
|
]);
|
|
75344
75345
|
g.style.minWidth = Je + "px", g.style.right = qt + "px";
|
|
75345
75346
|
}
|