randmarcomps 1.640.0 → 1.641.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.cjs +1 -1
- package/dist/randmarcomps.js +694 -694
- package/package.json +1 -1
package/dist/randmarcomps.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a, Fragment as U } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as P from "react";
|
|
3
3
|
import Ba, { useState as T, useEffect as K, useRef as ce, createContext as ls, useContext as Yr, useMemo as ye, useCallback as ae, memo as Xa, forwardRef as er, useImperativeHandle as os } from "react";
|
|
4
4
|
import { OTPInput as Wi, OTPInputContext as Gi } from "input-otp";
|
|
5
|
-
import { MinusIcon as Ki, Circle as cs, X as gt, ChevronRight as tr, Check as ct, Warehouse as Yi, Truck as wa, Handshake as Ji, PanelLeft as Zi, Bot as zt, MessageSquareLock as Xi, Loader2 as he, RefreshCw as Jr, CheckCheck as el, Search as Zr, Copy as ar, Pencil as ds, RotateCcw as us, Send as Xt, HandshakeIcon as tl, ThumbsDownIcon as al, MousePointerClick as rl, ExternalLink as rr, Trash2 as Xr, Plus as nl, AlertCircle as Nt, FileText as sl, BarChart as Tr, ShoppingCart as Sa, ClipboardList as
|
|
5
|
+
import { MinusIcon as Ki, Circle as cs, X as gt, ChevronRight as tr, Check as ct, Warehouse as Yi, Truck as wa, Handshake as Ji, PanelLeft as Zi, Bot as zt, MessageSquareLock as Xi, Loader2 as he, RefreshCw as Jr, CheckCheck as el, Search as Zr, Copy as ar, Pencil as ds, RotateCcw as us, Send as Xt, HandshakeIcon as tl, ThumbsDownIcon as al, MousePointerClick as rl, ExternalLink as rr, Trash2 as Xr, Plus as nl, AlertCircle as Nt, FileText as sl, BarChart as Tr, ShoppingCart as Sa, ClipboardList as Fn, Package as ra, Download as Ca, RefreshCcw as en, TrendingUp as il, Calendar as wt, CalendarDays as ms, DollarSign as ka, CreditCard as Wa, ShieldCheck as ll, Star as Ga, RefreshCwOff as ol, ChevronDown as tn, ChevronUp as cl, AlertCircleIcon as dl, LucideBot as ul, CalendarRange as ml, EditIcon as hl, Printer as fl, Mail as nr, CheckCircle2 as pl, Package2 as gl, ScrollText as bl, Banknote as yl, BadgeCheck as xl, HardHat as Nl, Phone as hs, Globe as fs, BookOpen as vl, LucideWarehouse as Zt, Filter as wl, ArrowUp as $n, ArrowDown as Bn, ArrowUpDown as Sl, ChevronsLeft as Cl, ChevronLeft as ps, ChevronsRight as kl, Menu as Rl, LogOut as Pl, MessageSquareShareIcon as zn, MessageCircleXIcon as Al, Square as Il, Paperclip as Vn, SettingsIcon as Dl, File as za, Code2Icon as Ml, AppWindow as Tl, MessageSquare as Ol, ChevronsUpDown as El, ImageOff as gs, CheckIcon as Ll, QrCodeIcon as Fl, CircleDashedIcon as $l, ShieldCheckIcon as Un, RefreshCwIcon as Bl, StoreIcon as zl, ShoppingCartIcon as _n, LineChart as Vl, LucideEye as bs, Play as Ul, Bold as _l, Italic as jl, UnderlineIcon as ql, Strikethrough as Ql, List as Hl, ListOrdered as Wl, Code as Gl, Info as ys, SearchX as Kl, ChevronLeftIcon as Yl, ChevronRightIcon as Jl, ChevronDownIcon as Zl, CalendarIcon as Xl, LucideTelescope as jn } from "lucide-react";
|
|
6
6
|
import { clsx as eo } from "clsx";
|
|
7
7
|
import { twMerge as to } from "tailwind-merge";
|
|
8
8
|
import * as ba from "@radix-ui/react-radio-group";
|
|
@@ -11,10 +11,10 @@ import { DialogClose as an, DialogTrigger as ao, DialogTitle as ro, DialogDescri
|
|
|
11
11
|
import * as Le from "@radix-ui/react-dropdown-menu";
|
|
12
12
|
import { Slot as na } from "@radix-ui/react-slot";
|
|
13
13
|
import { cva as sa } from "class-variance-authority";
|
|
14
|
-
import { useGetV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQuery as xs, usePostV4ManufacturerByRouteManufacturerIdReportSalesAndResellerIdEmailMutation as so, usePutV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualificationMutation as io, useDeleteV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualificationMutation as lo, useGetV4ManufacturerByRouteManufacturerIdOpportunitiesQuery as oo, usePutV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberResellerResellerIdMutation as co, useGetV4PartnerByApplicationIdAccountLogoExistsQuery as uo, useGetV4PartnerByApplicationIdAccountLogoQuery as mo, useGetV4PartnerByRouteApplicationIdManufacturersQuery as Or, usePostV4PartnerByApplicationIdGenerationRandmarAssistantMutation as Ns, useGetV4UserQuery as rn, usePostV4UserByFieldNameMutation as vs, usePutV4PartnerByRouteApplicationIdUserAndEmailAddressNotificationNotificationTypeMutation as ho, useDeleteV4PartnerByRouteApplicationIdUserAndEmailAddressNotificationNotificationTypeMutation as fo, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdPeopleQuery as po, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdLinksQuery as go, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdLinkMutation as bo, useDeleteV4PartnerByRouteApplicationIdBusinessDevelopmentConversationLinkAndLinkIdMutation as yo, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation as Ka, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsQuery as xo, useLazyGetV4PartnerByApplicationIdAccountQuery as ws, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdReadMutation as No, useLazyGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery as vo, useLazyGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery as wo, usePostV4PartnerByApplicationIdAccountManufacturerAndFieldNameMutation as sr, usePostV4ManufacturerByRouteManufacturerIdReportOpenOrdersEmailMutation as So, usePostV4ManufacturerByRouteManufacturerIdReportSalesEmailMutation as Co, usePostV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersEmailMutation as ko, usePostV4ManufacturerByRouteManufacturerIdReportReorderEmailMutation as Ro, usePostV4ManufacturerByRouteManufacturerIdReportInventoryEmailMutation as
|
|
14
|
+
import { useGetV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQuery as xs, usePostV4ManufacturerByRouteManufacturerIdReportSalesAndResellerIdEmailMutation as so, usePutV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualificationMutation as io, useDeleteV4ManufacturerByRouteManufacturerIdResellerAndResellerIdQualificationMutation as lo, useGetV4ManufacturerByRouteManufacturerIdOpportunitiesQuery as oo, usePutV4ManufacturerByRouteManufacturerIdOpportunityAndBidNumberResellerResellerIdMutation as co, useGetV4PartnerByApplicationIdAccountLogoExistsQuery as uo, useGetV4PartnerByApplicationIdAccountLogoQuery as mo, useGetV4PartnerByRouteApplicationIdManufacturersQuery as Or, usePostV4PartnerByApplicationIdGenerationRandmarAssistantMutation as Ns, useGetV4UserQuery as rn, usePostV4UserByFieldNameMutation as vs, usePutV4PartnerByRouteApplicationIdUserAndEmailAddressNotificationNotificationTypeMutation as ho, useDeleteV4PartnerByRouteApplicationIdUserAndEmailAddressNotificationNotificationTypeMutation as fo, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdPeopleQuery as po, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdLinksQuery as go, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdLinkMutation as bo, useDeleteV4PartnerByRouteApplicationIdBusinessDevelopmentConversationLinkAndLinkIdMutation as yo, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationPartnerAndPartnerIdMutation as Ka, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsQuery as xo, useLazyGetV4PartnerByApplicationIdAccountQuery as ws, usePostV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdReadMutation as No, useLazyGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationAndConversationIdMessagesQuery as vo, useLazyGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery as wo, usePostV4PartnerByApplicationIdAccountManufacturerAndFieldNameMutation as sr, usePostV4ManufacturerByRouteManufacturerIdReportOpenOrdersEmailMutation as So, usePostV4ManufacturerByRouteManufacturerIdReportSalesEmailMutation as Co, usePostV4ManufacturerByRouteManufacturerIdReportPurchasedOrdersEmailMutation as ko, usePostV4ManufacturerByRouteManufacturerIdReportReorderEmailMutation as Ro, usePostV4ManufacturerByRouteManufacturerIdReportInventoryEmailMutation as Po, usePostV4ManufacturerByRouteManufacturerIdReportProductsEmailMutation as Ao, useGetV4ManufacturerByRouteManufacturerIdDocumentsActiveOrderDetailsQuery as Io, useGetV4ManufacturerByRouteManufacturerIdInventoryValueQuery as Do, useGetV4PartnerByApplicationIdAccountManufacturerQuery as Mo, useGetV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeQuery as Ss, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdCategoryCodeShopifyMutation as To, useGetV4PartnerByRouteApplicationIdPartnerAndPartnerIdQuery as Oo, usePostV4ResellerByRouteResellerIdManufacturerAndManufacturerIdShopifyMutation as Eo, usePostV4PartnerByApplicationIdAccountResellerAndFieldNameMutation as Cs, usePostV4PartnerByApplicationIdAccountResellerCreditLimitMutation as Lo, useLazyGetV4ResellerByRouteResellerIdDocumentAndDocumentNumberPdfQuery as Fo, usePostV4ResellerByRouteResellerIdDocumentStatementEmailMutation as ks, usePostV4ResellerByRouteResellerIdReportWalmartTrackingFileEmailMutation as $o, usePostV4ResellerByRouteResellerIdReportAmazonTrackingFileEmailMutation as Bo, usePostV4ResellerByRouteResellerIdReportOpenOrdersEmailMutation as zo, usePostV4ResellerByRouteResellerIdReportProductsEmailMutation as Rs, usePostV4ResellerByRouteResellerIdReportInvoicesEmailMutation as Vo, useGetV4PartnerByApplicationIdAccountQuery as ir, useGetV4PartnerByRouteApplicationIdProductAndRandmarSkuQuery as Er, usePutV4ResellerByRouteResellerIdProductAndRandmarSkuRequisitionMutation as Uo, useGetV4PartnerByApplicationIdAccountResellerQuery as _o, usePostV4PartnerByApplicationIdGenerationUploadMutation as jo, usePostV4PartnerByApplicationIdAccountDebugFeedbackMutation as qo, useLazyGetV4PartnerByRouteApplicationIdUtilitiesStandardOperatingProcedureAndIdQuery as Qo, useGetV4PartnerByRouteApplicationIdUtilitiesStandardOperatingProceduresQuery as Ho, useGetV4PartnerByRouteApplicationIdBusinessDevelopmentConversationsHasUnreadsQuery as Wo, useGetProductByRandmarSkuImagesQuery as Go, usePostV4ResellerByRouteResellerIdProductAndRandmarSkuShopifyMutation as Ko, useLazyGetV4PartnerByRouteApplicationIdProductAndRandmarSkuQuery as Yo, useGetProductByProductNumberImageExistsQuery as Jo, useGetProductByRandmarSkuImageQuery as Zo, useGetProductByProductNumberVideoExistsQuery as Xo, useGetProductByProductNumberVideoQuery as ec, usePostV4ManufacturerByRouteManufacturerIdPurchaseOrderAndPurchaseOrderNumberEditItemRandmarSkuMutation as tc, useDeleteV4ManufacturerByRouteManufacturerIdRequisitionAndRequisitionNumberMutation as ac, usePutV4ResellerByRouteResellerIdOpportunityAndManufacturerIdDefaultMutation as rc, usePostV4ResellerByRouteResellerIdOpportunityAndManufacturerIdBidNumberEmailMutation as nc } from "randmar-api-client";
|
|
15
15
|
import * as sc from "@radix-ui/react-label";
|
|
16
16
|
import * as ea from "@radix-ui/react-tooltip";
|
|
17
|
-
import * as
|
|
17
|
+
import * as Ps from "@radix-ui/react-separator";
|
|
18
18
|
import * as dt from "@radix-ui/react-toast";
|
|
19
19
|
import { ResponsiveContainer as ic, AreaChart as lc, CartesianGrid as oc, XAxis as cc, YAxis as qn, Tooltip as dc, Area as uc } from "recharts";
|
|
20
20
|
import { Player as mc } from "@lottiefiles/react-lottie-player";
|
|
@@ -25,19 +25,19 @@ import * as Lr from "@radix-ui/react-switch";
|
|
|
25
25
|
import { isToday as gc, isYesterday as bc } from "date-fns";
|
|
26
26
|
import { marked as yc } from "marked";
|
|
27
27
|
import xc from "dompurify";
|
|
28
|
-
import { Link as Te, useBlocker as Nc, useLocation as
|
|
28
|
+
import { Link as Te, useBlocker as Nc, useLocation as As, useNavigate as vc } from "react-router-dom";
|
|
29
29
|
import * as qt from "@radix-ui/react-tabs";
|
|
30
30
|
import { useForm as Ra } from "react-hook-form";
|
|
31
31
|
import { FormattedNumber as pt } from "react-intl";
|
|
32
|
-
import * as
|
|
32
|
+
import * as Fr from "@radix-ui/react-progress";
|
|
33
33
|
import * as je from "@radix-ui/react-select";
|
|
34
34
|
import { useReactTable as wc, getPaginationRowModel as Sc, getFilteredRowModel as Cc, getSortedRowModel as kc, getCoreRowModel as Rc, flexRender as yr } from "@tanstack/react-table";
|
|
35
|
-
import * as
|
|
35
|
+
import * as $r from "@radix-ui/react-checkbox";
|
|
36
36
|
import { Command as it } from "cmdk";
|
|
37
|
-
import { md5 as
|
|
37
|
+
import { md5 as Pc } from "js-md5";
|
|
38
38
|
import * as ta from "@radix-ui/react-popover";
|
|
39
39
|
import * as tt from "@radix-ui/react-alert-dialog";
|
|
40
|
-
import { useEditor as
|
|
40
|
+
import { useEditor as Ac, EditorContent as Ic } from "@tiptap/react";
|
|
41
41
|
import Dc from "@tiptap/starter-kit";
|
|
42
42
|
import Mc from "@tiptap/extension-underline";
|
|
43
43
|
import * as Vt from "@radix-ui/react-accordion";
|
|
@@ -99,7 +99,7 @@ function bf({
|
|
|
99
99
|
className: r,
|
|
100
100
|
...n
|
|
101
101
|
}) {
|
|
102
|
-
const s =
|
|
102
|
+
const s = P.useContext(Gi), { char: i, hasFakeCaret: l, isActive: o } = s?.slots[t] ?? {};
|
|
103
103
|
return /* @__PURE__ */ a(
|
|
104
104
|
"div",
|
|
105
105
|
{
|
|
@@ -120,7 +120,7 @@ function bf({
|
|
|
120
120
|
function yf({ ...t }) {
|
|
121
121
|
return /* @__PURE__ */ e("div", { "data-slot": "input-otp-separator", role: "separator", ...t, children: /* @__PURE__ */ e(Ki, {}) });
|
|
122
122
|
}
|
|
123
|
-
const pa =
|
|
123
|
+
const pa = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
124
124
|
ba.Root,
|
|
125
125
|
{
|
|
126
126
|
className: v("grid gap-2", t),
|
|
@@ -129,7 +129,7 @@ const pa = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
129
129
|
}
|
|
130
130
|
));
|
|
131
131
|
pa.displayName = ba.Root.displayName;
|
|
132
|
-
const Rt =
|
|
132
|
+
const Rt = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
133
133
|
ba.Item,
|
|
134
134
|
{
|
|
135
135
|
ref: n,
|
|
@@ -142,9 +142,9 @@ const Rt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
142
142
|
}
|
|
143
143
|
));
|
|
144
144
|
Rt.displayName = ba.Item.displayName;
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
const xa = De.Trigger, Ec = De.Portal, Qn = De.Close, Ds =
|
|
145
|
+
const $e = ({ modal: t = !1, ...r }) => /* @__PURE__ */ e(De.Root, { modal: t, ...r });
|
|
146
|
+
$e.displayName = De.Root.displayName;
|
|
147
|
+
const xa = De.Trigger, Ec = De.Portal, Qn = De.Close, Ds = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
148
148
|
De.Overlay,
|
|
149
149
|
{
|
|
150
150
|
ref: n,
|
|
@@ -156,7 +156,7 @@ const xa = De.Trigger, Ec = De.Portal, Qn = De.Close, Ds = A.forwardRef(({ class
|
|
|
156
156
|
}
|
|
157
157
|
));
|
|
158
158
|
Ds.displayName = De.Overlay.displayName;
|
|
159
|
-
const Be =
|
|
159
|
+
const Be = P.forwardRef(({ className: t, children: r, animateExit: n = !0, overlayClassName: s, showOverlay: i, onPointerDownOutside: l, onInteractOutside: o, ...u }, h) => {
|
|
160
160
|
const d = !!(s && i);
|
|
161
161
|
return /* @__PURE__ */ a(Ec, { forceMount: u.forceMount, children: [
|
|
162
162
|
d ? /* @__PURE__ */ e(De.Close, { asChild: !0, children: /* @__PURE__ */ e(
|
|
@@ -223,7 +223,7 @@ const Ke = ({
|
|
|
223
223
|
}
|
|
224
224
|
);
|
|
225
225
|
Ke.displayName = "DialogFooter";
|
|
226
|
-
const He =
|
|
226
|
+
const He = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
227
227
|
De.Title,
|
|
228
228
|
{
|
|
229
229
|
ref: n,
|
|
@@ -235,7 +235,7 @@ const He = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
235
235
|
}
|
|
236
236
|
));
|
|
237
237
|
He.displayName = De.Title.displayName;
|
|
238
|
-
const Ge =
|
|
238
|
+
const Ge = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
239
239
|
De.Description,
|
|
240
240
|
{
|
|
241
241
|
ref: n,
|
|
@@ -244,7 +244,7 @@ const Ge = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
244
244
|
}
|
|
245
245
|
));
|
|
246
246
|
Ge.displayName = De.Description.displayName;
|
|
247
|
-
const Lc = Le.Root,
|
|
247
|
+
const Lc = Le.Root, Fc = Le.Trigger, xf = Le.Group, Nf = Le.Portal, vf = Le.Sub, wf = Le.RadioGroup, $c = P.forwardRef(({ className: t, inset: r, children: n, ...s }, i) => /* @__PURE__ */ a(
|
|
248
248
|
Le.SubTrigger,
|
|
249
249
|
{
|
|
250
250
|
ref: i,
|
|
@@ -260,8 +260,8 @@ const Lc = Le.Root, $c = Le.Trigger, xf = Le.Group, Nf = Le.Portal, vf = Le.Sub,
|
|
|
260
260
|
]
|
|
261
261
|
}
|
|
262
262
|
));
|
|
263
|
-
|
|
264
|
-
const Bc =
|
|
263
|
+
$c.displayName = Le.SubTrigger.displayName;
|
|
264
|
+
const Bc = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
265
265
|
Le.SubContent,
|
|
266
266
|
{
|
|
267
267
|
ref: n,
|
|
@@ -273,7 +273,7 @@ const Bc = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
273
273
|
}
|
|
274
274
|
));
|
|
275
275
|
Bc.displayName = Le.SubContent.displayName;
|
|
276
|
-
const Ms =
|
|
276
|
+
const Ms = P.forwardRef(({ className: t, sideOffset: r = 4, ...n }, s) => /* @__PURE__ */ e(Le.Portal, { children: /* @__PURE__ */ e(
|
|
277
277
|
Le.Content,
|
|
278
278
|
{
|
|
279
279
|
ref: s,
|
|
@@ -287,7 +287,7 @@ const Ms = A.forwardRef(({ className: t, sideOffset: r = 4, ...n }, s) => /* @__
|
|
|
287
287
|
}
|
|
288
288
|
) }));
|
|
289
289
|
Ms.displayName = Le.Content.displayName;
|
|
290
|
-
const ja =
|
|
290
|
+
const ja = P.forwardRef(({ className: t, inset: r, ...n }, s) => /* @__PURE__ */ e(
|
|
291
291
|
Le.Item,
|
|
292
292
|
{
|
|
293
293
|
ref: s,
|
|
@@ -300,7 +300,7 @@ const ja = A.forwardRef(({ className: t, inset: r, ...n }, s) => /* @__PURE__ */
|
|
|
300
300
|
}
|
|
301
301
|
));
|
|
302
302
|
ja.displayName = Le.Item.displayName;
|
|
303
|
-
const zc =
|
|
303
|
+
const zc = P.forwardRef(({ className: t, children: r, checked: n, ...s }, i) => /* @__PURE__ */ a(
|
|
304
304
|
Le.CheckboxItem,
|
|
305
305
|
{
|
|
306
306
|
ref: i,
|
|
@@ -317,7 +317,7 @@ const zc = A.forwardRef(({ className: t, children: r, checked: n, ...s }, i) =>
|
|
|
317
317
|
}
|
|
318
318
|
));
|
|
319
319
|
zc.displayName = Le.CheckboxItem.displayName;
|
|
320
|
-
const Vc =
|
|
320
|
+
const Vc = P.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ a(
|
|
321
321
|
Le.RadioItem,
|
|
322
322
|
{
|
|
323
323
|
ref: s,
|
|
@@ -333,7 +333,7 @@ const Vc = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__
|
|
|
333
333
|
}
|
|
334
334
|
));
|
|
335
335
|
Vc.displayName = Le.RadioItem.displayName;
|
|
336
|
-
const Uc =
|
|
336
|
+
const Uc = P.forwardRef(({ className: t, inset: r, ...n }, s) => /* @__PURE__ */ e(
|
|
337
337
|
Le.Label,
|
|
338
338
|
{
|
|
339
339
|
ref: s,
|
|
@@ -346,7 +346,7 @@ const Uc = A.forwardRef(({ className: t, inset: r, ...n }, s) => /* @__PURE__ */
|
|
|
346
346
|
}
|
|
347
347
|
));
|
|
348
348
|
Uc.displayName = Le.Label.displayName;
|
|
349
|
-
const _c =
|
|
349
|
+
const _c = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
350
350
|
Le.Separator,
|
|
351
351
|
{
|
|
352
352
|
ref: n,
|
|
@@ -395,7 +395,7 @@ const aa = sa(
|
|
|
395
395
|
size: "default"
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
), E =
|
|
398
|
+
), E = P.forwardRef(
|
|
399
399
|
({ className: t, variant: r, size: n, asChild: s = !1, confirmationDialog: i, onClick: l, ...o }, u) => {
|
|
400
400
|
const h = s ? na : "button";
|
|
401
401
|
if (!i)
|
|
@@ -414,7 +414,7 @@ const aa = sa(
|
|
|
414
414
|
const { title: d, content: c, onConfirm: m, confirmText: p = "Confirm", cancelText: g = "Cancel" } = i, N = () => {
|
|
415
415
|
m();
|
|
416
416
|
};
|
|
417
|
-
return /* @__PURE__ */ a(
|
|
417
|
+
return /* @__PURE__ */ a($e, { children: [
|
|
418
418
|
/* @__PURE__ */ e(xa, { asChild: !0, children: /* @__PURE__ */ e(
|
|
419
419
|
h,
|
|
420
420
|
{
|
|
@@ -453,7 +453,7 @@ function X({
|
|
|
453
453
|
}
|
|
454
454
|
);
|
|
455
455
|
}
|
|
456
|
-
const ke = ea.Provider, we = ea.Root, Se = ea.Trigger, ve =
|
|
456
|
+
const ke = ea.Provider, we = ea.Root, Se = ea.Trigger, ve = P.forwardRef(({ className: t, sideOffset: r = 4, ...n }, s) => /* @__PURE__ */ e(ea.Portal, { children: /* @__PURE__ */ e(
|
|
457
457
|
ea.Content,
|
|
458
458
|
{
|
|
459
459
|
ref: s,
|
|
@@ -466,14 +466,14 @@ const ke = ea.Provider, we = ea.Root, Se = ea.Trigger, ve = A.forwardRef(({ clas
|
|
|
466
466
|
}
|
|
467
467
|
) }));
|
|
468
468
|
ve.displayName = ea.Content.displayName;
|
|
469
|
-
const le =
|
|
469
|
+
const le = P.forwardRef(
|
|
470
470
|
({ className: t, type: r, mask: n, onChange: s, placeholder: i, ...l }, o) => {
|
|
471
|
-
const [u, h] =
|
|
471
|
+
const [u, h] = P.useState(!1), d = P.useRef(null), m = i || (n === "phone" ? "(999) 999-9999" : n === "postal-code-ca" ? "A9A 9A9" : n === "zip-code-us" ? "99999" : ""), p = () => n === "phone" ? "Only enter numbers. Formatting will be added automatically." : n === "postal-code-ca" ? "Enter letters and numbers only. Spacing will be applied automatically." : n === "zip-code-us" ? "Only enter numbers. Formatting will be added automatically." : "", g = () => {
|
|
472
472
|
h(!0), d.current && clearTimeout(d.current), d.current = setTimeout(() => {
|
|
473
473
|
h(!1);
|
|
474
474
|
}, 3e3);
|
|
475
475
|
};
|
|
476
|
-
|
|
476
|
+
P.useEffect(() => () => {
|
|
477
477
|
d.current && clearTimeout(d.current);
|
|
478
478
|
}, []);
|
|
479
479
|
const N = (w) => {
|
|
@@ -491,8 +491,8 @@ const le = A.forwardRef(
|
|
|
491
491
|
const y = x.replace(/[^a-zA-Z0-9]/g, "").toUpperCase();
|
|
492
492
|
let C = "";
|
|
493
493
|
for (let S = 0; S < Math.min(y.length, 6); S++) {
|
|
494
|
-
const
|
|
495
|
-
S === 0 || S === 2 || S === 4 ? /[A-Z]/.test(
|
|
494
|
+
const A = y[S];
|
|
495
|
+
S === 0 || S === 2 || S === 4 ? /[A-Z]/.test(A) && (C += A) : (S === 1 || S === 3 || S === 5) && /[0-9]/.test(A) && (C += A);
|
|
496
496
|
}
|
|
497
497
|
C.length <= 3 ? b = C : b = `${C.slice(0, 3)} ${C.slice(3, 6)}`;
|
|
498
498
|
} else if (n === "zip-code-us") {
|
|
@@ -537,7 +537,7 @@ function qc(t) {
|
|
|
537
537
|
m && (n(), p(!1));
|
|
538
538
|
}, [u, n, m]), /* @__PURE__ */ a(U, { children: [
|
|
539
539
|
/* @__PURE__ */ a(Lc, { modal: !1, children: [
|
|
540
|
-
/* @__PURE__ */ e(
|
|
540
|
+
/* @__PURE__ */ e(Fc, { asChild: !0, children: /* @__PURE__ */ e(E, { disabled: g, children: "Actions" }) }),
|
|
541
541
|
/* @__PURE__ */ a(Ms, { className: v("", t.className), children: [
|
|
542
542
|
/* @__PURE__ */ e(ja, { onClick: () => setTimeout(() => o(!0), 200), children: "Sales Report" }),
|
|
543
543
|
/* @__PURE__ */ e(ja, { onClick: () => setTimeout(() => h(!0), 200), children: "Qualification Status" }),
|
|
@@ -572,7 +572,7 @@ function Qc(t) {
|
|
|
572
572
|
});
|
|
573
573
|
}
|
|
574
574
|
};
|
|
575
|
-
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
575
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e($e, { open: t.open, onOpenChange: t.onOpenChange, children: /* @__PURE__ */ a(Be, { children: [
|
|
576
576
|
/* @__PURE__ */ a(qe, { children: [
|
|
577
577
|
/* @__PURE__ */ e(He, { children: "Generate Sales Report" }),
|
|
578
578
|
/* @__PURE__ */ e(Ge, { children: "The report will be sent via email within the next five minutes." })
|
|
@@ -693,7 +693,7 @@ function Hc(t) {
|
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
};
|
|
696
|
-
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
696
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e($e, { open: t.open, onOpenChange: t.onOpenChange, children: /* @__PURE__ */ a(Be, { children: [
|
|
697
697
|
/* @__PURE__ */ a(qe, { children: [
|
|
698
698
|
/* @__PURE__ */ e(He, { children: "Change qualification status" }),
|
|
699
699
|
/* @__PURE__ */ e(Ge, { children: "Allow or restrict the sale of your products to this partner." })
|
|
@@ -747,7 +747,7 @@ function Wc(t) {
|
|
|
747
747
|
});
|
|
748
748
|
}
|
|
749
749
|
};
|
|
750
|
-
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
750
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e($e, { open: t.open, onOpenChange: t.onOpenChange, children: /* @__PURE__ */ a(Be, { children: [
|
|
751
751
|
/* @__PURE__ */ a(qe, { children: [
|
|
752
752
|
/* @__PURE__ */ e(He, { children: "Add to Opportunity" }),
|
|
753
753
|
/* @__PURE__ */ e(Ge, { children: "Let a reseller benefit from an opportunity." })
|
|
@@ -774,8 +774,8 @@ function Wc(t) {
|
|
|
774
774
|
] }) }) });
|
|
775
775
|
}
|
|
776
776
|
function Ts({ inventory: t, showBinLocation: r, className: n }) {
|
|
777
|
-
const s = (y, C, S = !1,
|
|
778
|
-
const k = y.WarehouseType === "Fulfillment Center", D = k ? "bg-background" : "bg-background/70 text-muted-foreground", L =
|
|
777
|
+
const s = (y, C, S = !1, A = !0) => {
|
|
778
|
+
const k = y.WarehouseType === "Fulfillment Center", D = k ? "bg-background" : "bg-background/70 text-muted-foreground", L = A && C > 0 ? "border-t" : "", M = S ? "border-r" : "", I = y.Status ?? "Unknown", $ = I === "Active";
|
|
779
779
|
let Q = "bg-secondary text-secondary-foreground ring-1 ring-border";
|
|
780
780
|
switch (y.WarehouseType) {
|
|
781
781
|
case "Last Mile":
|
|
@@ -807,11 +807,11 @@ function Ts({ inventory: t, showBinLocation: r, className: n }) {
|
|
|
807
807
|
{
|
|
808
808
|
className: `inline-flex items-center gap-2 rounded-full px-2 py-0.5 text-xs font-semibold ${Q}`,
|
|
809
809
|
"aria-hidden": "false",
|
|
810
|
-
title:
|
|
810
|
+
title: $ ? k ? "Fulfillment Center" : "Satellite Warehouse" : `Status: ${I}`,
|
|
811
811
|
children: [
|
|
812
|
-
k ? /* @__PURE__ */ e(Yi, { className: "h-3 w-3", "aria-hidden": "true" }) : /* @__PURE__ */ e(wa, { className: `h-3 w-3 ${
|
|
813
|
-
/* @__PURE__ */ e("span", { className: "sr-only", children:
|
|
814
|
-
/* @__PURE__ */ e("span", { "aria-hidden": "true", children:
|
|
812
|
+
k ? /* @__PURE__ */ e(Yi, { className: "h-3 w-3", "aria-hidden": "true" }) : /* @__PURE__ */ e(wa, { className: `h-3 w-3 ${$ ? "opacity-80" : "opacity-95"}`, "aria-hidden": "true" }),
|
|
813
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: $ ? y.WarehouseType ? `${y.WarehouseType} warehouse` : "Warehouse" : `Status: ${I}` }),
|
|
814
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: $ ? y.WarehouseType || (k ? "Fulfillment Center" : "Satellite") : I })
|
|
815
815
|
]
|
|
816
816
|
}
|
|
817
817
|
)
|
|
@@ -830,7 +830,7 @@ function Ts({ inventory: t, showBinLocation: r, className: n }) {
|
|
|
830
830
|
},
|
|
831
831
|
`warehouse-${y.WarehouseId}`
|
|
832
832
|
);
|
|
833
|
-
}, i = ["
|
|
833
|
+
}, i = ["Z0FP4Z", "TOR", "MTL"], l = ["VAN", "EDM"], o = [...t].sort((y, C) => (y.Name || "").localeCompare(C.Name || "")), u = o.filter((y) => y.Country === "US"), h = o.filter((y) => y.Country === "CA"), d = o.filter((y) => l.includes(y.WarehouseId || "")), c = o.filter((y) => i.includes(y.WarehouseId || "")), m = h.filter(
|
|
834
834
|
(y) => !i.includes(y.WarehouseId || "") && !l.includes(y.WarehouseId || "")
|
|
835
835
|
), p = (y) => y.reduce((C, S) => C + (S.AvailableQuantity || 0), 0), g = p(h), N = p(c), w = p(d), x = p(u), b = g + x;
|
|
836
836
|
return /* @__PURE__ */ a("div", { className: `border rounded-md overflow-hidden ${n ?? ""}`, children: [
|
|
@@ -887,9 +887,9 @@ function Ts({ inventory: t, showBinLocation: r, className: n }) {
|
|
|
887
887
|
t.length === 0 && /* @__PURE__ */ e("div", { className: "p-6 text-center text-muted-foreground", children: "No inventory information available" })
|
|
888
888
|
] });
|
|
889
889
|
}
|
|
890
|
-
const lr =
|
|
890
|
+
const lr = P.forwardRef(
|
|
891
891
|
({ className: t, orientation: r = "horizontal", decorative: n = !0, ...s }, i) => /* @__PURE__ */ e(
|
|
892
|
-
|
|
892
|
+
Ps.Root,
|
|
893
893
|
{
|
|
894
894
|
ref: i,
|
|
895
895
|
decorative: n,
|
|
@@ -903,8 +903,8 @@ const lr = A.forwardRef(
|
|
|
903
903
|
}
|
|
904
904
|
)
|
|
905
905
|
);
|
|
906
|
-
lr.displayName =
|
|
907
|
-
const Gc = De.Root, Sf = De.Trigger, Cf = De.Close, Kc = De.Portal, Os =
|
|
906
|
+
lr.displayName = Ps.Root.displayName;
|
|
907
|
+
const Gc = De.Root, Sf = De.Trigger, Cf = De.Close, Kc = De.Portal, Os = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
908
908
|
De.Overlay,
|
|
909
909
|
{
|
|
910
910
|
className: v(
|
|
@@ -931,7 +931,7 @@ const Yc = sa(
|
|
|
931
931
|
side: "right"
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
|
-
), Es =
|
|
934
|
+
), Es = P.forwardRef(({ side: t = "right", className: r, children: n, ...s }, i) => /* @__PURE__ */ a(Kc, { children: [
|
|
935
935
|
/* @__PURE__ */ e(Os, {}),
|
|
936
936
|
/* @__PURE__ */ a(
|
|
937
937
|
De.Content,
|
|
@@ -978,7 +978,7 @@ const Zc = ({
|
|
|
978
978
|
}
|
|
979
979
|
);
|
|
980
980
|
Zc.displayName = "SheetFooter";
|
|
981
|
-
const Xc =
|
|
981
|
+
const Xc = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
982
982
|
De.Title,
|
|
983
983
|
{
|
|
984
984
|
ref: n,
|
|
@@ -987,7 +987,7 @@ const Xc = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
987
987
|
}
|
|
988
988
|
));
|
|
989
989
|
Xc.displayName = De.Title.displayName;
|
|
990
|
-
const ed =
|
|
990
|
+
const ed = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
991
991
|
De.Description,
|
|
992
992
|
{
|
|
993
993
|
ref: n,
|
|
@@ -1072,17 +1072,17 @@ function kf({ onClick: t, publicName: r, applicationName: n, partnerId: s }) {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
const xr = 1024;
|
|
1074
1074
|
function td() {
|
|
1075
|
-
const [t, r] =
|
|
1076
|
-
return
|
|
1075
|
+
const [t, r] = P.useState(void 0);
|
|
1076
|
+
return P.useEffect(() => {
|
|
1077
1077
|
const n = window.matchMedia(`(max-width: ${xr - 1}px)`), s = () => {
|
|
1078
1078
|
r(window.innerWidth < xr);
|
|
1079
1079
|
};
|
|
1080
1080
|
return n.addEventListener("change", s), r(window.innerWidth < xr), () => n.removeEventListener("change", s);
|
|
1081
1081
|
}, []), !!t;
|
|
1082
1082
|
}
|
|
1083
|
-
const Ls =
|
|
1084
|
-
function
|
|
1085
|
-
const t =
|
|
1083
|
+
const Ls = P.createContext(null);
|
|
1084
|
+
function Pa() {
|
|
1085
|
+
const t = P.useContext(Ls);
|
|
1086
1086
|
if (!t)
|
|
1087
1087
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1088
1088
|
return t;
|
|
@@ -1099,7 +1099,7 @@ function f({
|
|
|
1099
1099
|
}
|
|
1100
1100
|
);
|
|
1101
1101
|
}
|
|
1102
|
-
const ad = "sidebar:state", rd = 3600 * 24 * 7, nd = "16rem", sd = "3rem", id = "b",
|
|
1102
|
+
const ad = "sidebar:state", rd = 3600 * 24 * 7, nd = "16rem", sd = "3rem", id = "b", Fs = P.forwardRef(
|
|
1103
1103
|
({
|
|
1104
1104
|
defaultOpen: t = !0,
|
|
1105
1105
|
defaultOpenMobile: r = !1,
|
|
@@ -1111,20 +1111,20 @@ const ad = "sidebar:state", rd = 3600 * 24 * 7, nd = "16rem", sd = "3rem", id =
|
|
|
1111
1111
|
children: u,
|
|
1112
1112
|
...h
|
|
1113
1113
|
}, d) => {
|
|
1114
|
-
const c = td(), m = n ?? c, [p, g] =
|
|
1115
|
-
(
|
|
1116
|
-
const k = typeof
|
|
1114
|
+
const c = td(), m = n ?? c, [p, g] = P.useState(r), [N, w] = P.useState(t), x = s ?? N, b = P.useCallback(
|
|
1115
|
+
(A) => {
|
|
1116
|
+
const k = typeof A == "function" ? A(x) : A;
|
|
1117
1117
|
i ? i(k) : w(k), document.cookie = `${ad}=${k}; path=/; max-age=${rd}`;
|
|
1118
1118
|
},
|
|
1119
1119
|
[i, x]
|
|
1120
|
-
), y =
|
|
1121
|
-
|
|
1122
|
-
const
|
|
1120
|
+
), y = P.useCallback(() => m ? g((A) => !A) : b((A) => !A), [m, b, g]);
|
|
1121
|
+
P.useEffect(() => {
|
|
1122
|
+
const A = (k) => {
|
|
1123
1123
|
k.key === id && (k.metaKey || k.ctrlKey) && (k.preventDefault(), y());
|
|
1124
1124
|
};
|
|
1125
|
-
return window.addEventListener("keydown",
|
|
1125
|
+
return window.addEventListener("keydown", A), () => window.removeEventListener("keydown", A);
|
|
1126
1126
|
}, [y]);
|
|
1127
|
-
const C = x ? "expanded" : "collapsed", S =
|
|
1127
|
+
const C = x ? "expanded" : "collapsed", S = P.useMemo(
|
|
1128
1128
|
() => ({
|
|
1129
1129
|
state: C,
|
|
1130
1130
|
open: x,
|
|
@@ -1155,8 +1155,8 @@ const ad = "sidebar:state", rd = 3600 * 24 * 7, nd = "16rem", sd = "3rem", id =
|
|
|
1155
1155
|
) }) });
|
|
1156
1156
|
}
|
|
1157
1157
|
);
|
|
1158
|
-
|
|
1159
|
-
const
|
|
1158
|
+
Fs.displayName = "SidebarProvider";
|
|
1159
|
+
const $s = P.forwardRef(
|
|
1160
1160
|
({
|
|
1161
1161
|
side: t = "left",
|
|
1162
1162
|
variant: r = "sidebar",
|
|
@@ -1165,7 +1165,7 @@ const Fs = A.forwardRef(
|
|
|
1165
1165
|
children: i,
|
|
1166
1166
|
...l
|
|
1167
1167
|
}, o) => {
|
|
1168
|
-
const { isMobile: u, state: h, openMobile: d, setOpenMobile: c } =
|
|
1168
|
+
const { isMobile: u, state: h, openMobile: d, setOpenMobile: c } = Pa();
|
|
1169
1169
|
return n === "none" ? /* @__PURE__ */ e(
|
|
1170
1170
|
"div",
|
|
1171
1171
|
{
|
|
@@ -1238,9 +1238,9 @@ const Fs = A.forwardRef(
|
|
|
1238
1238
|
);
|
|
1239
1239
|
}
|
|
1240
1240
|
);
|
|
1241
|
-
|
|
1242
|
-
const Bs =
|
|
1243
|
-
const { toggleSidebar: i } =
|
|
1241
|
+
$s.displayName = "Sidebar";
|
|
1242
|
+
const Bs = P.forwardRef(({ className: t, onClick: r, ...n }, s) => {
|
|
1243
|
+
const { toggleSidebar: i } = Pa();
|
|
1244
1244
|
return /* @__PURE__ */ a(
|
|
1245
1245
|
E,
|
|
1246
1246
|
{
|
|
@@ -1261,8 +1261,8 @@ const Bs = A.forwardRef(({ className: t, onClick: r, ...n }, s) => {
|
|
|
1261
1261
|
);
|
|
1262
1262
|
});
|
|
1263
1263
|
Bs.displayName = "SidebarTrigger";
|
|
1264
|
-
const ld =
|
|
1265
|
-
const { toggleSidebar: s } =
|
|
1264
|
+
const ld = P.forwardRef(({ className: t, ...r }, n) => {
|
|
1265
|
+
const { toggleSidebar: s } = Pa();
|
|
1266
1266
|
return /* @__PURE__ */ e(
|
|
1267
1267
|
"button",
|
|
1268
1268
|
{
|
|
@@ -1286,7 +1286,7 @@ const ld = A.forwardRef(({ className: t, ...r }, n) => {
|
|
|
1286
1286
|
);
|
|
1287
1287
|
});
|
|
1288
1288
|
ld.displayName = "SidebarRail";
|
|
1289
|
-
const od =
|
|
1289
|
+
const od = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1290
1290
|
"main",
|
|
1291
1291
|
{
|
|
1292
1292
|
ref: n,
|
|
@@ -1299,7 +1299,7 @@ const od = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1299
1299
|
}
|
|
1300
1300
|
));
|
|
1301
1301
|
od.displayName = "SidebarInset";
|
|
1302
|
-
const cd =
|
|
1302
|
+
const cd = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1303
1303
|
le,
|
|
1304
1304
|
{
|
|
1305
1305
|
ref: n,
|
|
@@ -1312,7 +1312,7 @@ const cd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1312
1312
|
}
|
|
1313
1313
|
));
|
|
1314
1314
|
cd.displayName = "SidebarInput";
|
|
1315
|
-
const zs =
|
|
1315
|
+
const zs = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1316
1316
|
"div",
|
|
1317
1317
|
{
|
|
1318
1318
|
ref: n,
|
|
@@ -1322,7 +1322,7 @@ const zs = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1322
1322
|
}
|
|
1323
1323
|
));
|
|
1324
1324
|
zs.displayName = "SidebarHeader";
|
|
1325
|
-
const Vs =
|
|
1325
|
+
const Vs = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1326
1326
|
"div",
|
|
1327
1327
|
{
|
|
1328
1328
|
ref: n,
|
|
@@ -1332,7 +1332,7 @@ const Vs = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1332
1332
|
}
|
|
1333
1333
|
));
|
|
1334
1334
|
Vs.displayName = "SidebarFooter";
|
|
1335
|
-
const dd =
|
|
1335
|
+
const dd = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1336
1336
|
lr,
|
|
1337
1337
|
{
|
|
1338
1338
|
ref: n,
|
|
@@ -1342,7 +1342,7 @@ const dd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1342
1342
|
}
|
|
1343
1343
|
));
|
|
1344
1344
|
dd.displayName = "SidebarSeparator";
|
|
1345
|
-
const Us =
|
|
1345
|
+
const Us = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1346
1346
|
"div",
|
|
1347
1347
|
{
|
|
1348
1348
|
ref: n,
|
|
@@ -1355,7 +1355,7 @@ const Us = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1355
1355
|
}
|
|
1356
1356
|
));
|
|
1357
1357
|
Us.displayName = "SidebarContent";
|
|
1358
|
-
const ud =
|
|
1358
|
+
const ud = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1359
1359
|
"div",
|
|
1360
1360
|
{
|
|
1361
1361
|
ref: n,
|
|
@@ -1365,7 +1365,7 @@ const ud = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1365
1365
|
}
|
|
1366
1366
|
));
|
|
1367
1367
|
ud.displayName = "SidebarGroup";
|
|
1368
|
-
const md =
|
|
1368
|
+
const md = P.forwardRef(({ className: t, asChild: r = !1, ...n }, s) => /* @__PURE__ */ e(
|
|
1369
1369
|
r ? na : "div",
|
|
1370
1370
|
{
|
|
1371
1371
|
ref: s,
|
|
@@ -1379,7 +1379,7 @@ const md = A.forwardRef(({ className: t, asChild: r = !1, ...n }, s) => /* @__PU
|
|
|
1379
1379
|
}
|
|
1380
1380
|
));
|
|
1381
1381
|
md.displayName = "SidebarGroupLabel";
|
|
1382
|
-
const hd =
|
|
1382
|
+
const hd = P.forwardRef(({ className: t, asChild: r = !1, ...n }, s) => /* @__PURE__ */ e(
|
|
1383
1383
|
r ? na : "button",
|
|
1384
1384
|
{
|
|
1385
1385
|
ref: s,
|
|
@@ -1395,7 +1395,7 @@ const hd = A.forwardRef(({ className: t, asChild: r = !1, ...n }, s) => /* @__PU
|
|
|
1395
1395
|
}
|
|
1396
1396
|
));
|
|
1397
1397
|
hd.displayName = "SidebarGroupAction";
|
|
1398
|
-
const fd =
|
|
1398
|
+
const fd = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1399
1399
|
"div",
|
|
1400
1400
|
{
|
|
1401
1401
|
ref: n,
|
|
@@ -1405,7 +1405,7 @@ const fd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1405
1405
|
}
|
|
1406
1406
|
));
|
|
1407
1407
|
fd.displayName = "SidebarGroupContent";
|
|
1408
|
-
const _s =
|
|
1408
|
+
const _s = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1409
1409
|
"ul",
|
|
1410
1410
|
{
|
|
1411
1411
|
ref: n,
|
|
@@ -1415,7 +1415,7 @@ const _s = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1415
1415
|
}
|
|
1416
1416
|
));
|
|
1417
1417
|
_s.displayName = "SidebarMenu";
|
|
1418
|
-
const js =
|
|
1418
|
+
const js = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1419
1419
|
"li",
|
|
1420
1420
|
{
|
|
1421
1421
|
ref: n,
|
|
@@ -1444,7 +1444,7 @@ const pd = sa(
|
|
|
1444
1444
|
size: "default"
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
|
-
), qs =
|
|
1447
|
+
), qs = P.forwardRef(
|
|
1448
1448
|
({
|
|
1449
1449
|
asChild: t = !1,
|
|
1450
1450
|
isActive: r = !1,
|
|
@@ -1454,7 +1454,7 @@ const pd = sa(
|
|
|
1454
1454
|
className: l,
|
|
1455
1455
|
...o
|
|
1456
1456
|
}, u) => {
|
|
1457
|
-
const h = t ? na : "button", { isMobile: d, state: c } =
|
|
1457
|
+
const h = t ? na : "button", { isMobile: d, state: c } = Pa(), m = /* @__PURE__ */ e(
|
|
1458
1458
|
h,
|
|
1459
1459
|
{
|
|
1460
1460
|
ref: u,
|
|
@@ -1482,7 +1482,7 @@ const pd = sa(
|
|
|
1482
1482
|
}
|
|
1483
1483
|
);
|
|
1484
1484
|
qs.displayName = "SidebarMenuButton";
|
|
1485
|
-
const gd =
|
|
1485
|
+
const gd = P.forwardRef(({ className: t, asChild: r = !1, showOnHover: n = !1, ...s }, i) => /* @__PURE__ */ e(
|
|
1486
1486
|
r ? na : "button",
|
|
1487
1487
|
{
|
|
1488
1488
|
ref: i,
|
|
@@ -1502,7 +1502,7 @@ const gd = A.forwardRef(({ className: t, asChild: r = !1, showOnHover: n = !1, .
|
|
|
1502
1502
|
}
|
|
1503
1503
|
));
|
|
1504
1504
|
gd.displayName = "SidebarMenuAction";
|
|
1505
|
-
const bd =
|
|
1505
|
+
const bd = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1506
1506
|
"div",
|
|
1507
1507
|
{
|
|
1508
1508
|
ref: n,
|
|
@@ -1520,8 +1520,8 @@ const bd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1520
1520
|
}
|
|
1521
1521
|
));
|
|
1522
1522
|
bd.displayName = "SidebarMenuBadge";
|
|
1523
|
-
const yd =
|
|
1524
|
-
const i =
|
|
1523
|
+
const yd = P.forwardRef(({ className: t, showIcon: r = !1, ...n }, s) => {
|
|
1524
|
+
const i = P.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
1525
1525
|
return /* @__PURE__ */ a(
|
|
1526
1526
|
"div",
|
|
1527
1527
|
{
|
|
@@ -1552,7 +1552,7 @@ const yd = A.forwardRef(({ className: t, showIcon: r = !1, ...n }, s) => {
|
|
|
1552
1552
|
);
|
|
1553
1553
|
});
|
|
1554
1554
|
yd.displayName = "SidebarMenuSkeleton";
|
|
1555
|
-
const xd =
|
|
1555
|
+
const xd = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1556
1556
|
"ul",
|
|
1557
1557
|
{
|
|
1558
1558
|
ref: n,
|
|
@@ -1566,9 +1566,9 @@ const xd = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1566
1566
|
}
|
|
1567
1567
|
));
|
|
1568
1568
|
xd.displayName = "SidebarMenuSub";
|
|
1569
|
-
const Nd =
|
|
1569
|
+
const Nd = P.forwardRef(({ ...t }, r) => /* @__PURE__ */ e("li", { ref: r, ...t }));
|
|
1570
1570
|
Nd.displayName = "SidebarMenuSubItem";
|
|
1571
|
-
const vd =
|
|
1571
|
+
const vd = P.forwardRef(({ asChild: t = !1, size: r = "md", isActive: n, className: s, ...i }, l) => /* @__PURE__ */ e(
|
|
1572
1572
|
t ? na : "a",
|
|
1573
1573
|
{
|
|
1574
1574
|
ref: l,
|
|
@@ -1587,7 +1587,7 @@ const vd = A.forwardRef(({ asChild: t = !1, size: r = "md", isActive: n, classNa
|
|
|
1587
1587
|
}
|
|
1588
1588
|
));
|
|
1589
1589
|
vd.displayName = "SidebarMenuSubButton";
|
|
1590
|
-
const wd = dt.Provider, Qs =
|
|
1590
|
+
const wd = dt.Provider, Qs = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1591
1591
|
dt.Viewport,
|
|
1592
1592
|
{
|
|
1593
1593
|
ref: n,
|
|
@@ -1617,9 +1617,9 @@ const Sd = sa(
|
|
|
1617
1617
|
variant: "default"
|
|
1618
1618
|
}
|
|
1619
1619
|
}
|
|
1620
|
-
), Hs =
|
|
1620
|
+
), Hs = P.forwardRef(({ className: t, variant: r, ...n }, s) => /* @__PURE__ */ e(dt.Root, { ref: s, className: v(Sd({ variant: r }), t), ...n }));
|
|
1621
1621
|
Hs.displayName = dt.Root.displayName;
|
|
1622
|
-
const Ws =
|
|
1622
|
+
const Ws = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1623
1623
|
dt.Action,
|
|
1624
1624
|
{
|
|
1625
1625
|
ref: n,
|
|
@@ -1631,7 +1631,7 @@ const Ws = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1631
1631
|
}
|
|
1632
1632
|
));
|
|
1633
1633
|
Ws.displayName = dt.Action.displayName;
|
|
1634
|
-
const Gs =
|
|
1634
|
+
const Gs = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
1635
1635
|
dt.Close,
|
|
1636
1636
|
{
|
|
1637
1637
|
ref: n,
|
|
@@ -1645,9 +1645,9 @@ const Gs = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
1645
1645
|
}
|
|
1646
1646
|
));
|
|
1647
1647
|
Gs.displayName = dt.Close.displayName;
|
|
1648
|
-
const Ks =
|
|
1648
|
+
const Ks = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(dt.Title, { ref: n, className: v("text-sm font-semibold [&+div]:text-xs", t), ...r }));
|
|
1649
1649
|
Ks.displayName = dt.Title.displayName;
|
|
1650
|
-
const Ys =
|
|
1650
|
+
const Ys = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(dt.Description, { ref: n, className: v("text-sm opacity-90", t), ...r }));
|
|
1651
1651
|
Ys.displayName = dt.Description.displayName;
|
|
1652
1652
|
const Cd = 1, kd = 1e6;
|
|
1653
1653
|
let Nr = 0;
|
|
@@ -1660,7 +1660,7 @@ const vr = /* @__PURE__ */ new Map(), Hn = (t) => {
|
|
|
1660
1660
|
vr.delete(t), ga({ type: "REMOVE_TOAST", toastId: t });
|
|
1661
1661
|
}, kd);
|
|
1662
1662
|
vr.set(t, r);
|
|
1663
|
-
},
|
|
1663
|
+
}, Pd = (t, r) => {
|
|
1664
1664
|
switch (r.type) {
|
|
1665
1665
|
case "ADD_TOAST":
|
|
1666
1666
|
return {
|
|
@@ -1692,9 +1692,9 @@ const vr = /* @__PURE__ */ new Map(), Hn = (t) => {
|
|
|
1692
1692
|
}, qa = [];
|
|
1693
1693
|
let Qa = { toasts: [] };
|
|
1694
1694
|
function ga(t) {
|
|
1695
|
-
Qa =
|
|
1695
|
+
Qa = Pd(Qa, t), qa.forEach((r) => r(Qa));
|
|
1696
1696
|
}
|
|
1697
|
-
function
|
|
1697
|
+
function Ad({ ...t }) {
|
|
1698
1698
|
const r = Rd(), n = (i) => ga({
|
|
1699
1699
|
type: "UPDATE_TOAST",
|
|
1700
1700
|
toast: { ...i, id: r }
|
|
@@ -1712,13 +1712,13 @@ function Pd({ ...t }) {
|
|
|
1712
1712
|
}), { id: r, dismiss: s, update: n };
|
|
1713
1713
|
}
|
|
1714
1714
|
function Ee() {
|
|
1715
|
-
const [t, r] =
|
|
1716
|
-
return
|
|
1715
|
+
const [t, r] = P.useState(Qa);
|
|
1716
|
+
return P.useEffect(() => (qa.push(r), () => {
|
|
1717
1717
|
const n = qa.indexOf(r);
|
|
1718
1718
|
n > -1 && qa.splice(n, 1);
|
|
1719
1719
|
}), []), {
|
|
1720
1720
|
...t,
|
|
1721
|
-
toast:
|
|
1721
|
+
toast: Ad,
|
|
1722
1722
|
dismiss: (n) => ga({ type: "DISMISS_TOAST", toastId: n })
|
|
1723
1723
|
};
|
|
1724
1724
|
}
|
|
@@ -1792,7 +1792,7 @@ function Od(t) {
|
|
|
1792
1792
|
}
|
|
1793
1793
|
return (t.NumberOfOpportunities ?? 0) > 0;
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function Pf({ appID: t, manufPath: r, withBot: n }) {
|
|
1796
1796
|
const [s, i] = T(!1), { data: l, isLoading: o } = Or({
|
|
1797
1797
|
routeApplicationId: t ?? "",
|
|
1798
1798
|
withSpecification: !1
|
|
@@ -1811,12 +1811,12 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1811
1811
|
), h = ye(() => (u ?? l)?.slice() ?? [], [l, u]), [d, c] = T(""), [m, p] = T([]), [g, N] = T("az"), [w, x] = T(!1), [b, y] = T(!1), C = ye(() => {
|
|
1812
1812
|
const M = /* @__PURE__ */ new Map();
|
|
1813
1813
|
for (const I of h)
|
|
1814
|
-
for (const
|
|
1815
|
-
const Q = Js(
|
|
1816
|
-
M.has(Q) || M.set(Q,
|
|
1814
|
+
for (const $ of Br(I.Tags)) {
|
|
1815
|
+
const Q = Js($);
|
|
1816
|
+
M.has(Q) || M.set(Q, $);
|
|
1817
1817
|
}
|
|
1818
|
-
return Array.from(M.entries()).map(([I,
|
|
1819
|
-
}, [h]), S = d.trim().length > 0 || m.length > 0 || g !== "az" || w || b,
|
|
1818
|
+
return Array.from(M.entries()).map(([I, $]) => ({ key: I, label: $ })).sort((I, $) => I.label.localeCompare($.label, void 0, { sensitivity: "base" }));
|
|
1819
|
+
}, [h]), S = d.trim().length > 0 || m.length > 0 || g !== "az" || w || b, A = ae(() => {
|
|
1820
1820
|
c(""), p([]), N("az"), x(!1), y(!1);
|
|
1821
1821
|
}, []), { sendMessage: k } = Na(), D = ae(
|
|
1822
1822
|
(M) => {
|
|
@@ -1855,7 +1855,7 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1855
1855
|
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
1856
1856
|
/* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
|
|
1857
1857
|
/* @__PURE__ */ e("p", { id: "manufacturer-categories-label", className: "text-sm font-medium leading-none", children: "Categories" }),
|
|
1858
|
-
S && /* @__PURE__ */ e(E, { type: "button", variant: "ghost", size: "sm", className: "h-8 px-2", onClick:
|
|
1858
|
+
S && /* @__PURE__ */ e(E, { type: "button", variant: "ghost", size: "sm", className: "h-8 px-2", onClick: A, children: "Clear filters" })
|
|
1859
1859
|
] }),
|
|
1860
1860
|
/* @__PURE__ */ e(
|
|
1861
1861
|
"div",
|
|
@@ -1865,14 +1865,14 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1865
1865
|
"aria-describedby": "manufacturer-categories-help",
|
|
1866
1866
|
className: "flex flex-wrap gap-2",
|
|
1867
1867
|
children: C.length === 0 ? /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "No categories available." }) : C.map(({ key: M, label: I }) => {
|
|
1868
|
-
const
|
|
1868
|
+
const $ = m.includes(M);
|
|
1869
1869
|
return /* @__PURE__ */ e(
|
|
1870
1870
|
E,
|
|
1871
1871
|
{
|
|
1872
1872
|
type: "button",
|
|
1873
|
-
variant:
|
|
1873
|
+
variant: $ ? "secondary" : "outline",
|
|
1874
1874
|
className: "rounded-full",
|
|
1875
|
-
"aria-pressed":
|
|
1875
|
+
"aria-pressed": $,
|
|
1876
1876
|
onClick: () => {
|
|
1877
1877
|
p(
|
|
1878
1878
|
(Q) => Q.includes(M) ? Q.filter((z) => z !== M) : [...Q, M]
|
|
@@ -1943,7 +1943,7 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1943
1943
|
" manufacturers"
|
|
1944
1944
|
] }),
|
|
1945
1945
|
o && h.length === 0 ? /* @__PURE__ */ e("div", { className: "grid grid-cols-1 @md:grid-cols-1 @lg:grid-cols-2 @xl:grid-cols-3 gap-4", children: Array.from({ length: 9 }).map((M, I) => /* @__PURE__ */ e(va, { loading: !0 }, I)) }) : L.length > 0 ? /* @__PURE__ */ e("div", { className: "grid grid-cols-1 @md:grid-cols-1 @lg:grid-cols-2 @xl:grid-cols-3 gap-4", children: L.map((M, I) => {
|
|
1946
|
-
const
|
|
1946
|
+
const $ = Va(M);
|
|
1947
1947
|
return /* @__PURE__ */ e(
|
|
1948
1948
|
va,
|
|
1949
1949
|
{
|
|
@@ -1957,18 +1957,18 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1957
1957
|
type: "button",
|
|
1958
1958
|
variant: "outline",
|
|
1959
1959
|
size: "icon",
|
|
1960
|
-
"aria-label": `Assistant: ${
|
|
1961
|
-
onClick: () => D(
|
|
1960
|
+
"aria-label": `Assistant: ${$ || "manufacturer"}`,
|
|
1961
|
+
onClick: () => D($),
|
|
1962
1962
|
children: /* @__PURE__ */ e(zt, {})
|
|
1963
1963
|
}
|
|
1964
1964
|
) : void 0,
|
|
1965
1965
|
mainAction: /* @__PURE__ */ e(yi, { applicationId: t, manufacturer: M })
|
|
1966
1966
|
},
|
|
1967
|
-
M.ManufacturerId ?? `${
|
|
1967
|
+
M.ManufacturerId ?? `${$}-${I}`
|
|
1968
1968
|
);
|
|
1969
1969
|
}) }) : /* @__PURE__ */ e(q, { children: /* @__PURE__ */ a(G, { className: "p-8 text-center space-y-3", children: [
|
|
1970
1970
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "No manufacturers match your current filters." }),
|
|
1971
|
-
/* @__PURE__ */ e(E, { type: "button", variant: "outline", onClick:
|
|
1971
|
+
/* @__PURE__ */ e(E, { type: "button", variant: "outline", onClick: A, disabled: !S, children: "Reset filters" })
|
|
1972
1972
|
] }) })
|
|
1973
1973
|
] })
|
|
1974
1974
|
] });
|
|
@@ -1976,7 +1976,7 @@ function Af({ appID: t, manufPath: r, withBot: n }) {
|
|
|
1976
1976
|
const Zs = "https://api.randmar.io", Ed = "/swagger/V4/swagger.json", Ya = `${Zs}${Ed}`, Xs = ls({
|
|
1977
1977
|
swaggerJsonUrl: Ya
|
|
1978
1978
|
});
|
|
1979
|
-
function
|
|
1979
|
+
function Af({
|
|
1980
1980
|
swaggerJsonUrl: t,
|
|
1981
1981
|
children: r
|
|
1982
1982
|
}) {
|
|
@@ -2016,7 +2016,7 @@ function Ld({ active: t, payload: r, label: n, series: s }) {
|
|
|
2016
2016
|
}
|
|
2017
2017
|
return null;
|
|
2018
2018
|
}
|
|
2019
|
-
function
|
|
2019
|
+
function Fd({
|
|
2020
2020
|
data: t,
|
|
2021
2021
|
series: r,
|
|
2022
2022
|
height: n,
|
|
@@ -2096,8 +2096,8 @@ function $d({
|
|
|
2096
2096
|
}
|
|
2097
2097
|
);
|
|
2098
2098
|
}
|
|
2099
|
-
const Fd = "5.12.1", Bd = 59.9400024414062, zd = 0, Vd = 660.000026882351, Ud = 1080, _d = 1080, jd = "Comp 1", qd = 0, Qd = [{ id: "comp_0", nm: "randmar pulse", fr: 59.9400024414062, layers: [{ ddd: 0, ind: 1, ty: 4, nm: "Shape Layer 3", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 21, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 42, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 52, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 107, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 134, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 163, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 223, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 250, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 279, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 339, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 366, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 395, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 455, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 482, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 511, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 571, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 598, s: [105, 105, 100] }, { t: 627.000025538234, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], v: [[149.125, -150.875], [-152.875, -150.875], [-152.875, 151.125], [-92, 151.125], [-92, -90], [149.125, -90]], c: !0 }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Shape 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 21.0000008553475, op: 660.000026882351, st: 21.0000008553475, ct: 1, bm: 0 }, { ddd: 0, ind: 2, ty: 4, nm: "Shape Layer 2", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 10, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 31, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 41, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 96, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 123, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 152, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 212, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 239, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 268, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 328, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 355, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 384, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 444, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 471, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 500, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 560, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 587, s: [105, 105, 100] }, { t: 616.000025090194, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], v: [[148, -29.5], [-32, -29.5], [-31.75, 150.5], [27.5, 150.5], [28, 30.5], [148.5, 30.5]], c: !0 }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Shape 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 10.0000004073083, op: 660.000026882351, st: 10.0000004073083, ct: 1, bm: 0 }, { ddd: 0, ind: 3, ty: 4, nm: "Shape Layer 1", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 4, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 25, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 35, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 90, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 117, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 146, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 206, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 233, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 262, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 322, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 349, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 378, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 438, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 465, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 494, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 554, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 581, s: [105, 105, 100] }, { t: 610.000024845809, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ty: "rc", d: 1, s: { a: 0, k: [60, 60], ix: 2 }, p: { a: 0, k: [0, 0], ix: 3 }, r: { a: 0, k: 0, ix: 4 }, nm: "Rectangle Path 1", mn: "ADBE Vector Shape - Rect", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [117.75, 119.75], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Rectangle 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 0, op: 660.000026882351, st: 0, ct: 1, bm: 0 }] }], Hd = [{ ddd: 0, ind: 1, ty: 0, nm: "randmar pulse", refId: "comp_0", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [540, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [960, 540, 0], ix: 1, l: 2 }, s: { a: 0, k: [308, 308, 100], ix: 6, l: 2 } }, ao: 0, ef: [{ ty: 5, nm: "Hue/Saturation", np: 11, mn: "ADBE HUE SATURATION", ix: 1, en: 1, ef: [{ ty: 7, nm: "Channel Control", mn: "ADBE HUE SATURATION-0002", ix: 1, v: { a: 0, k: 1, ix: 1 } }, {}, { ty: 0, nm: "Master Hue", mn: "ADBE HUE SATURATION-0004", ix: 3, v: { a: 0, k: 0, ix: 3 } }, { ty: 0, nm: "Master Saturation", mn: "ADBE HUE SATURATION-0005", ix: 4, v: { a: 0, k: 0, ix: 4 } }, { ty: 0, nm: "Master Lightness", mn: "ADBE HUE SATURATION-0006", ix: 5, v: { a: 0, k: 0, ix: 5 } }, { ty: 7, nm: "Colorize", mn: "ADBE HUE SATURATION-0007", ix: 6, v: { a: 0, k: 0, ix: 6 } }, { ty: 0, nm: "Colorize Hue", mn: "ADBE HUE SATURATION-0008", ix: 7, v: { a: 0, k: 0, ix: 7 } }, { ty: 0, nm: "Colorize Saturation", mn: "ADBE HUE SATURATION-0009", ix: 8, v: { a: 0, k: 25, ix: 8 } }, { ty: 0, nm: "Colorize Lightness", mn: "ADBE HUE SATURATION-0010", ix: 9, v: { a: 0, k: 0, ix: 9 } }] }], w: 1920, h: 1080, ip: 0, op: 660.000026882351, st: 0, bm: 0 }], Wd = [], Gd = {}, Wn = {
|
|
2100
|
-
v:
|
|
2099
|
+
const $d = "5.12.1", Bd = 59.9400024414062, zd = 0, Vd = 660.000026882351, Ud = 1080, _d = 1080, jd = "Comp 1", qd = 0, Qd = [{ id: "comp_0", nm: "randmar pulse", fr: 59.9400024414062, layers: [{ ddd: 0, ind: 1, ty: 4, nm: "Shape Layer 3", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 21, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 42, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 52, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 107, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 134, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 163, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 223, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 250, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 279, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 339, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 366, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 395, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 455, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 482, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 511, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 571, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 598, s: [105, 105, 100] }, { t: 627.000025538234, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], v: [[149.125, -150.875], [-152.875, -150.875], [-152.875, 151.125], [-92, 151.125], [-92, -90], [149.125, -90]], c: !0 }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Shape 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 21.0000008553475, op: 660.000026882351, st: 21.0000008553475, ct: 1, bm: 0 }, { ddd: 0, ind: 2, ty: 4, nm: "Shape Layer 2", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 10, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 31, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 41, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 96, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 123, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 152, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 212, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 239, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 268, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 328, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 355, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 384, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 444, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 471, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 500, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 560, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 587, s: [105, 105, 100] }, { t: 616.000025090194, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], v: [[148, -29.5], [-32, -29.5], [-31.75, 150.5], [27.5, 150.5], [28, 30.5], [148.5, 30.5]], c: !0 }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Shape 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 10.0000004073083, op: 660.000026882351, st: 10.0000004073083, ct: 1, bm: 0 }, { ddd: 0, ind: 3, ty: 4, nm: "Shape Layer 1", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [960, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 4, s: [0, 0, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 25, s: [111, 111, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 35, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 90, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 117, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 146, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 206, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 233, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 262, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 322, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 349, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 378, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 438, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 465, s: [105, 105, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 494, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 554, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 581, s: [105, 105, 100] }, { t: 610.000024845809, s: [0, 0, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ty: "rc", d: 1, s: { a: 0, k: [60, 60], ix: 2 }, p: { a: 0, k: [0, 0], ix: 3 }, r: { a: 0, k: 0, ix: 4 }, nm: "Rectangle Path 1", mn: "ADBE Vector Shape - Rect", hd: !1 }, { ty: "fl", c: { a: 0, k: [0.172549019608, 0.172549019608, 0.172549019608, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: !1 }, { ty: "tr", p: { a: 0, k: [117.75, 119.75], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Rectangle 1", np: 3, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: !1 }], ip: 0, op: 660.000026882351, st: 0, ct: 1, bm: 0 }] }], Hd = [{ ddd: 0, ind: 1, ty: 0, nm: "randmar pulse", refId: "comp_0", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 0, k: 0, ix: 10 }, p: { a: 0, k: [540, 540, 0], ix: 2, l: 2 }, a: { a: 0, k: [960, 540, 0], ix: 1, l: 2 }, s: { a: 0, k: [308, 308, 100], ix: 6, l: 2 } }, ao: 0, ef: [{ ty: 5, nm: "Hue/Saturation", np: 11, mn: "ADBE HUE SATURATION", ix: 1, en: 1, ef: [{ ty: 7, nm: "Channel Control", mn: "ADBE HUE SATURATION-0002", ix: 1, v: { a: 0, k: 1, ix: 1 } }, {}, { ty: 0, nm: "Master Hue", mn: "ADBE HUE SATURATION-0004", ix: 3, v: { a: 0, k: 0, ix: 3 } }, { ty: 0, nm: "Master Saturation", mn: "ADBE HUE SATURATION-0005", ix: 4, v: { a: 0, k: 0, ix: 4 } }, { ty: 0, nm: "Master Lightness", mn: "ADBE HUE SATURATION-0006", ix: 5, v: { a: 0, k: 0, ix: 5 } }, { ty: 7, nm: "Colorize", mn: "ADBE HUE SATURATION-0007", ix: 6, v: { a: 0, k: 0, ix: 6 } }, { ty: 0, nm: "Colorize Hue", mn: "ADBE HUE SATURATION-0008", ix: 7, v: { a: 0, k: 0, ix: 7 } }, { ty: 0, nm: "Colorize Saturation", mn: "ADBE HUE SATURATION-0009", ix: 8, v: { a: 0, k: 25, ix: 8 } }, { ty: 0, nm: "Colorize Lightness", mn: "ADBE HUE SATURATION-0010", ix: 9, v: { a: 0, k: 0, ix: 9 } }] }], w: 1920, h: 1080, ip: 0, op: 660.000026882351, st: 0, bm: 0 }], Wd = [], Gd = {}, Wn = {
|
|
2100
|
+
v: $d,
|
|
2101
2101
|
fr: Bd,
|
|
2102
2102
|
ip: zd,
|
|
2103
2103
|
op: Vd,
|
|
@@ -2147,7 +2147,7 @@ function If({ text: t, color: r = "white", className: n }) {
|
|
|
2147
2147
|
), children: t })
|
|
2148
2148
|
] });
|
|
2149
2149
|
}
|
|
2150
|
-
const cr =
|
|
2150
|
+
const cr = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
2151
2151
|
ia.Root,
|
|
2152
2152
|
{
|
|
2153
2153
|
ref: n,
|
|
@@ -2159,7 +2159,7 @@ const cr = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
2159
2159
|
}
|
|
2160
2160
|
));
|
|
2161
2161
|
cr.displayName = ia.Root.displayName;
|
|
2162
|
-
const cu =
|
|
2162
|
+
const cu = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
2163
2163
|
ia.Image,
|
|
2164
2164
|
{
|
|
2165
2165
|
ref: n,
|
|
@@ -2168,7 +2168,7 @@ const cu = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
2168
2168
|
}
|
|
2169
2169
|
));
|
|
2170
2170
|
cu.displayName = ia.Image.displayName;
|
|
2171
|
-
const du =
|
|
2171
|
+
const du = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
2172
2172
|
ia.Fallback,
|
|
2173
2173
|
{
|
|
2174
2174
|
ref: n,
|
|
@@ -2298,7 +2298,7 @@ function dr() {
|
|
|
2298
2298
|
const t = ei();
|
|
2299
2299
|
return ye(() => Ja(t.swaggerJsonUrl) ?? Zs, [t.swaggerJsonUrl]);
|
|
2300
2300
|
}
|
|
2301
|
-
function
|
|
2301
|
+
function At(t, r) {
|
|
2302
2302
|
const n = (t ?? "").trim();
|
|
2303
2303
|
if (!n) return "";
|
|
2304
2304
|
if (n.startsWith("http://") || n.startsWith("https://") || n.startsWith("data:") || n.startsWith("blob:"))
|
|
@@ -2311,7 +2311,7 @@ function Pt(t, r) {
|
|
|
2311
2311
|
return i;
|
|
2312
2312
|
}
|
|
2313
2313
|
}
|
|
2314
|
-
const
|
|
2314
|
+
const Pt = P.forwardRef(({ className: t, children: r, orientation: n, ...s }, i) => /* @__PURE__ */ a(
|
|
2315
2315
|
Bt.Root,
|
|
2316
2316
|
{
|
|
2317
2317
|
ref: i,
|
|
@@ -2327,8 +2327,8 @@ const At = A.forwardRef(({ className: t, children: r, orientation: n, ...s }, i)
|
|
|
2327
2327
|
]
|
|
2328
2328
|
}
|
|
2329
2329
|
));
|
|
2330
|
-
|
|
2331
|
-
const sn =
|
|
2330
|
+
Pt.displayName = Bt.Root.displayName;
|
|
2331
|
+
const sn = P.forwardRef(({ className: t, orientation: r = "vertical", ...n }, s) => /* @__PURE__ */ e(
|
|
2332
2332
|
Bt.ScrollAreaScrollbar,
|
|
2333
2333
|
{
|
|
2334
2334
|
ref: s,
|
|
@@ -2391,7 +2391,7 @@ function bu(t, r, n, s) {
|
|
|
2391
2391
|
t.partner1 + " and " + t.partner2
|
|
2392
2392
|
);
|
|
2393
2393
|
}
|
|
2394
|
-
const
|
|
2394
|
+
const Aa = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
2395
2395
|
Lr.Root,
|
|
2396
2396
|
{
|
|
2397
2397
|
className: v(
|
|
@@ -2410,7 +2410,7 @@ const Pa = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
2410
2410
|
)
|
|
2411
2411
|
}
|
|
2412
2412
|
));
|
|
2413
|
-
|
|
2413
|
+
Aa.displayName = Lr.Root.displayName;
|
|
2414
2414
|
function yu({
|
|
2415
2415
|
appID: t,
|
|
2416
2416
|
chats: r,
|
|
@@ -2427,7 +2427,7 @@ function yu({
|
|
|
2427
2427
|
const [m, p] = T(""), [g, N] = T(null), [w, x] = T(null), b = ye(() => r.filter((z) => {
|
|
2428
2428
|
const _ = t === z.partner1 ? z.partner2 : z.partner1;
|
|
2429
2429
|
return z.name.toLowerCase().includes(m.toLowerCase()) || _.toLocaleLowerCase().includes(m.toLowerCase());
|
|
2430
|
-
}), [t, r, m]), { toast: y } = Ee(), { data: C, isLoading: S } = rn(),
|
|
2430
|
+
}), [t, r, m]), { toast: y } = Ee(), { data: C, isLoading: S } = rn(), A = C?.Name || C?.EmailAddress || "User", k = C?.Role || "Partner", [D] = vs(), [L] = ho(), [M] = fo(), I = (z) => {
|
|
2431
2431
|
if (!C?.ApplicationId || !C.EmailAddress) {
|
|
2432
2432
|
y({
|
|
2433
2433
|
title: "Not ready",
|
|
@@ -2439,12 +2439,12 @@ function yu({
|
|
|
2439
2439
|
z ? L({ routeApplicationId: C.ApplicationId, emailAddress: C.EmailAddress, notificationType: "PartnerChatNotifications" }) : M({ routeApplicationId: C.ApplicationId, emailAddress: C.EmailAddress, notificationType: "PartnerChatNotifications" });
|
|
2440
2440
|
};
|
|
2441
2441
|
K(() => {
|
|
2442
|
-
g === null &&
|
|
2443
|
-
}, [g,
|
|
2442
|
+
g === null && A && N(A);
|
|
2443
|
+
}, [g, A]), K(() => {
|
|
2444
2444
|
w === null && k && x(k);
|
|
2445
2445
|
}, [w, k]);
|
|
2446
|
-
const
|
|
2447
|
-
g && g !==
|
|
2446
|
+
const $ = () => {
|
|
2447
|
+
g && g !== A && g.trim() !== "" && D({ fieldName: "Name", newValue: g }).unwrap().then(() => {
|
|
2448
2448
|
y({ title: "Success", description: "Name updated successfully" });
|
|
2449
2449
|
});
|
|
2450
2450
|
}, Q = () => {
|
|
@@ -2514,7 +2514,7 @@ function yu({
|
|
|
2514
2514
|
},
|
|
2515
2515
|
"b1"
|
|
2516
2516
|
) : null }),
|
|
2517
|
-
/* @__PURE__ */ e(
|
|
2517
|
+
/* @__PURE__ */ e(Pt, { className: "flex-1", children: r.length > 0 && /* @__PURE__ */ e(fu, { appID: t, chats: b, activeChat: c, onSelectChat: d }) }),
|
|
2518
2518
|
/* @__PURE__ */ e(lr, { className: "mt-4" }),
|
|
2519
2519
|
/* @__PURE__ */ a("div", { className: "mt-3 space-y-3", children: [
|
|
2520
2520
|
/* @__PURE__ */ a("div", { children: [
|
|
@@ -2524,7 +2524,7 @@ function yu({
|
|
|
2524
2524
|
{
|
|
2525
2525
|
value: g ?? "",
|
|
2526
2526
|
onChange: (z) => N(z.target.value),
|
|
2527
|
-
onBlur:
|
|
2527
|
+
onBlur: $,
|
|
2528
2528
|
className: "mt-1 h-8 border-0 bg-transparent px-0 text-sm font-medium shadow-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
|
|
2529
2529
|
}
|
|
2530
2530
|
)
|
|
@@ -2547,7 +2547,7 @@ function yu({
|
|
|
2547
2547
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Conversation updates" })
|
|
2548
2548
|
] }),
|
|
2549
2549
|
/* @__PURE__ */ e(
|
|
2550
|
-
|
|
2550
|
+
Aa,
|
|
2551
2551
|
{
|
|
2552
2552
|
disabled: S || !C,
|
|
2553
2553
|
onCheckedChange: I,
|
|
@@ -2558,7 +2558,7 @@ function yu({
|
|
|
2558
2558
|
] })
|
|
2559
2559
|
] });
|
|
2560
2560
|
}
|
|
2561
|
-
const It =
|
|
2561
|
+
const It = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
2562
2562
|
"textarea",
|
|
2563
2563
|
{
|
|
2564
2564
|
className: v(
|
|
@@ -2705,8 +2705,8 @@ const wu = Xa(function({
|
|
|
2705
2705
|
onCopy: w
|
|
2706
2706
|
}) {
|
|
2707
2707
|
const x = ye(() => ai(r.content), [r.content]), b = x.trim().length > 0, y = ye(() => (r.images ?? []).map((S) => {
|
|
2708
|
-
const
|
|
2709
|
-
return !
|
|
2708
|
+
const A = typeof S?.mimeType == "string" ? S.mimeType.trim() : "", k = typeof S?.base64Data == "string" ? S.base64Data.replace(/\s+/g, "") : "";
|
|
2709
|
+
return !A.startsWith("image/") || k.length === 0 ? null : `data:${A};base64,${k}`;
|
|
2710
2710
|
}).filter((S) => !!S), [r.images]);
|
|
2711
2711
|
return /* @__PURE__ */ e(
|
|
2712
2712
|
"div",
|
|
@@ -2836,8 +2836,8 @@ const wu = Xa(function({
|
|
|
2836
2836
|
onCopy: w
|
|
2837
2837
|
}) {
|
|
2838
2838
|
const x = ye(() => ai(r.content), [r.content]), b = x.trim().length > 0, y = ye(() => (r.images ?? []).map((S) => {
|
|
2839
|
-
const
|
|
2840
|
-
return !
|
|
2839
|
+
const A = typeof S?.mimeType == "string" ? S.mimeType.trim() : "", k = typeof S?.base64Data == "string" ? S.base64Data.replace(/\s+/g, "") : "";
|
|
2840
|
+
return !A.startsWith("image/") || k.length === 0 ? null : `data:${A};base64,${k}`;
|
|
2841
2841
|
}).filter((S) => !!S), [r.images]);
|
|
2842
2842
|
return /* @__PURE__ */ e("div", { className: v("flex items-start gap-2 mt-2 mb-2", n && "flex-row-reverse"), children: /* @__PURE__ */ a("div", { className: v("flex flex-col", h ? "w-full max-w-none" : "max-w-[70%]"), children: [
|
|
2843
2843
|
!s && !!r.senderName?.trim() && /* @__PURE__ */ e("p", { className: v("mb-1 flex", n && "flex-row-reverse"), children: r.senderName }),
|
|
@@ -2956,19 +2956,19 @@ const wu = Xa(function({
|
|
|
2956
2956
|
I && (L === I ? D.add(M.id) : L = I);
|
|
2957
2957
|
}
|
|
2958
2958
|
return D;
|
|
2959
|
-
}, [r]), S = l ?? (i ? "assistant" : "dashboard"),
|
|
2959
|
+
}, [r]), S = l ?? (i ? "assistant" : "dashboard"), A = S === "assistant" ? Su : wu, k = S === "assistant" ? vu : Nu;
|
|
2960
2960
|
return /* @__PURE__ */ a("div", { className: S === "dashboard" ? "py-3" : "", children: [
|
|
2961
2961
|
r.map((D) => {
|
|
2962
|
-
const L = D.fromPartnerID === n, M = !!(u && i && L && m && g && p), I = !!(u && i && L && N),
|
|
2962
|
+
const L = D.fromPartnerID === n, M = !!(u && i && L && m && g && p), I = !!(u && i && L && N), $ = !!(i && !L && (D.content ?? "").trim().length > 0), Q = h === D.id;
|
|
2963
2963
|
return /* @__PURE__ */ e(
|
|
2964
|
-
|
|
2964
|
+
A,
|
|
2965
2965
|
{
|
|
2966
2966
|
message: D,
|
|
2967
2967
|
isCurrentUser: L,
|
|
2968
2968
|
hideSenderName: o || C.has(D.id),
|
|
2969
2969
|
canEdit: M,
|
|
2970
2970
|
canRetry: I,
|
|
2971
|
-
canCopy:
|
|
2971
|
+
canCopy: $,
|
|
2972
2972
|
isCopied: w === D.id,
|
|
2973
2973
|
isEditing: Q,
|
|
2974
2974
|
editValue: Q ? d : "",
|
|
@@ -3009,7 +3009,7 @@ function Cu({
|
|
|
3009
3009
|
/* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e("div", { className: "truncate text-sm font-semibold", children: r?.name }) })
|
|
3010
3010
|
] }),
|
|
3011
3011
|
r?.pending && r.partner1 == n ? /* @__PURE__ */ e("p", { className: "mx-auto mt-12 max-w-md px-6 text-center text-sm text-muted-foreground", children: "This conversation is awaiting approval by the other party — please check back later." }) : /* @__PURE__ */ a(U, { children: [
|
|
3012
|
-
/* @__PURE__ */ a(
|
|
3012
|
+
/* @__PURE__ */ a(Pt, { className: "flex-1 bg-background", children: [
|
|
3013
3013
|
/* @__PURE__ */ e("div", { className: r?.messages === null ? "opacity-0" : "", children: /* @__PURE__ */ e(
|
|
3014
3014
|
ni,
|
|
3015
3015
|
{
|
|
@@ -3107,7 +3107,7 @@ function ku({
|
|
|
3107
3107
|
] }),
|
|
3108
3108
|
/* @__PURE__ */ e(qc, { userId: r, partnerId: l?.[0] === r ? l[1] : l?.[0] || "", isAdmin: !1 }),
|
|
3109
3109
|
/* @__PURE__ */ e(Ru, { appID: r, activeChatObj: t }),
|
|
3110
|
-
/* @__PURE__ */ e(
|
|
3110
|
+
/* @__PURE__ */ e(Pu, { appID: r, activeChatObj: t })
|
|
3111
3111
|
] }) });
|
|
3112
3112
|
}
|
|
3113
3113
|
const Ru = ({ appID: t, activeChatObj: r }) => {
|
|
@@ -3132,7 +3132,7 @@ const Ru = ({ appID: t, activeChatObj: r }) => {
|
|
|
3132
3132
|
] }, p);
|
|
3133
3133
|
}) })
|
|
3134
3134
|
] });
|
|
3135
|
-
},
|
|
3135
|
+
}, Pu = ({ appID: t, activeChatObj: r }) => {
|
|
3136
3136
|
const [n, s] = T(!1), i = r?.conversationID, l = i === void 0 || i === -1, { data: o, isLoading: u } = go({
|
|
3137
3137
|
routeApplicationId: t,
|
|
3138
3138
|
conversationId: i ?? -1
|
|
@@ -3156,7 +3156,7 @@ const Ru = ({ appID: t, activeChatObj: r }) => {
|
|
|
3156
3156
|
)
|
|
3157
3157
|
] }, c.LinkId))
|
|
3158
3158
|
] }),
|
|
3159
|
-
/* @__PURE__ */ a(
|
|
3159
|
+
/* @__PURE__ */ a($e, { open: n, onOpenChange: s, children: [
|
|
3160
3160
|
/* @__PURE__ */ e(ao, { asChild: !0, children: /* @__PURE__ */ a(E, { variant: "link", className: "h-auto p-0 justify-start", disabled: l, children: [
|
|
3161
3161
|
/* @__PURE__ */ e(nl, { className: "h-4 w-4" }),
|
|
3162
3162
|
"Add link"
|
|
@@ -3184,7 +3184,7 @@ const Ru = ({ appID: t, activeChatObj: r }) => {
|
|
|
3184
3184
|
] })
|
|
3185
3185
|
] })
|
|
3186
3186
|
] });
|
|
3187
|
-
},
|
|
3187
|
+
}, Au = (t) => {
|
|
3188
3188
|
const [r] = vs(), [n, s] = T(""), [i, l] = T(""), [o, u] = T(!1), [h] = Ka();
|
|
3189
3189
|
return /* @__PURE__ */ a("div", { className: "mx-auto mt-2", children: [
|
|
3190
3190
|
/* @__PURE__ */ e("p", { className: "mb-4", children: "Before you can start chatting, please set up your profile." }),
|
|
@@ -3202,11 +3202,11 @@ const Ru = ({ appID: t, activeChatObj: r }) => {
|
|
|
3202
3202
|
] });
|
|
3203
3203
|
}, ha = (t, r) => t.unread > 0 && r.unread === 0 ? -1 : r.unread > 0 && t.unread === 0 ? 1 : t.name.localeCompare(r.name);
|
|
3204
3204
|
function Df({ appID: t, inputRef: r, className: n }) {
|
|
3205
|
-
const { setHasUnreads: s } = Na(), i = dr(), { data: l, refetch: o } = xo({ routeApplicationId: t }), [u, h] = T(!1), [d, c] = T(!1), [m, p] = T(!1), [g, { isLoading: N }] = Ka(), w = ce(null), [x] = ws(), { sendPrompt: b } = mu({ applicationId: t, outputFormat: "text", useProModel: !0 }), [y, C] = T(!1), [S] = Ka(), [
|
|
3205
|
+
const { setHasUnreads: s } = Na(), i = dr(), { data: l, refetch: o } = xo({ routeApplicationId: t }), [u, h] = T(!1), [d, c] = T(!1), [m, p] = T(!1), [g, { isLoading: N }] = Ka(), w = ce(null), [x] = ws(), { sendPrompt: b } = mu({ applicationId: t, outputFormat: "text", useProModel: !0 }), [y, C] = T(!1), [S] = Ka(), [A] = No(), [k] = vo(), [D] = wo(), [L, M] = T(!1);
|
|
3206
3206
|
K(() => {
|
|
3207
3207
|
l && (se((W) => {
|
|
3208
3208
|
const oe = l.map((ee) => {
|
|
3209
|
-
const be = W.find((
|
|
3209
|
+
const be = W.find((Fe) => Fe.conversationID === ee.ConversationId);
|
|
3210
3210
|
return {
|
|
3211
3211
|
partner1: ee.Participant1,
|
|
3212
3212
|
partner2: ee.Participant2,
|
|
@@ -3221,7 +3221,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3221
3221
|
return oe.sort(ha), oe;
|
|
3222
3222
|
}), h(!0), setTimeout(() => Xe.current?.focus(), 50));
|
|
3223
3223
|
}, [l, t]);
|
|
3224
|
-
const [I,
|
|
3224
|
+
const [I, $] = T(void 0), [Q, z] = T(""), [_, O] = T(null), [V, se] = T([]), [me, Ve] = T(null), Re = ce(null), Qe = ce(null), [Ue, We] = T([]), Xe = r || Qe, ie = ce(null), { toast: pe } = Ee(), H = () => V.find((W) => W.partner1 === I?.[0] && W.partner2 === I?.[1]), Y = ae(async () => {
|
|
3225
3225
|
if (d) return;
|
|
3226
3226
|
c(!0);
|
|
3227
3227
|
const W = I;
|
|
@@ -3236,7 +3236,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3236
3236
|
messages: null,
|
|
3237
3237
|
conversationID: Oe.ConversationId,
|
|
3238
3238
|
lastMessageTime: Oe.LastMessageTime ?? null
|
|
3239
|
-
})),
|
|
3239
|
+
})), Fe = /* @__PURE__ */ new Map();
|
|
3240
3240
|
await Promise.allSettled(
|
|
3241
3241
|
be.map(async (Oe) => {
|
|
3242
3242
|
if (Oe.conversationID <= 0) return;
|
|
@@ -3244,18 +3244,18 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3244
3244
|
routeApplicationId: t,
|
|
3245
3245
|
conversationId: Oe.conversationID
|
|
3246
3246
|
})).data ?? []).reduce((Lt, Wt) => Wt.Read || !Wt.SenderId || Wt.SenderId === t ? Lt : Lt + 1, 0);
|
|
3247
|
-
|
|
3247
|
+
Fe.set(Oe.conversationID, nt);
|
|
3248
3248
|
})
|
|
3249
3249
|
);
|
|
3250
3250
|
const rt = be.map((Oe) => ({
|
|
3251
3251
|
...Oe,
|
|
3252
|
-
unread:
|
|
3252
|
+
unread: Fe.get(Oe.conversationID) ?? 0
|
|
3253
3253
|
})).sort(ha);
|
|
3254
3254
|
if (se(rt), W) {
|
|
3255
3255
|
const Oe = rt.find(
|
|
3256
3256
|
(Ye) => Ye.partner1 === W[0] && Ye.partner2 === W[1] || Ye.partner1 === W[1] && Ye.partner2 === W[0]
|
|
3257
3257
|
);
|
|
3258
|
-
|
|
3258
|
+
$(Oe ? [Oe.partner1, Oe.partner2] : void 0);
|
|
3259
3259
|
}
|
|
3260
3260
|
pe({ title: "Refreshed", description: "Chat state reinitialized." });
|
|
3261
3261
|
} catch (oe) {
|
|
@@ -3274,7 +3274,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3274
3274
|
const W = V.map((oe) => oe.conversationID).filter((oe) => oe > 0);
|
|
3275
3275
|
await Promise.allSettled(
|
|
3276
3276
|
W.map(async (oe) => {
|
|
3277
|
-
await
|
|
3277
|
+
await A({ routeApplicationId: t, conversationId: oe }).unwrap();
|
|
3278
3278
|
})
|
|
3279
3279
|
), se((oe) => oe.map((ee) => ({ ...ee, unread: 0 })).sort(ha)), pe({ title: "All read", description: "All conversations marked as read." });
|
|
3280
3280
|
} catch (W) {
|
|
@@ -3287,10 +3287,10 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3287
3287
|
p(!1);
|
|
3288
3288
|
}
|
|
3289
3289
|
}
|
|
3290
|
-
}, [t, V, m,
|
|
3290
|
+
}, [t, V, m, A, pe]);
|
|
3291
3291
|
function te() {
|
|
3292
3292
|
const W = H();
|
|
3293
|
-
W &&
|
|
3293
|
+
W && A({ routeApplicationId: t, conversationId: W.conversationID });
|
|
3294
3294
|
}
|
|
3295
3295
|
const Ne = (W) => We((oe) => [...oe, W]);
|
|
3296
3296
|
K(() => {
|
|
@@ -3303,17 +3303,17 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3303
3303
|
console.log("message received for unknown convo ID - need to refetch!"), oe = !0;
|
|
3304
3304
|
return;
|
|
3305
3305
|
}
|
|
3306
|
-
se((be) => be.map((
|
|
3307
|
-
if (!W(ee,
|
|
3308
|
-
const rt =
|
|
3309
|
-
if (rt.some((nt) => nt.id === ee.id)) return
|
|
3306
|
+
se((be) => be.map((Fe) => {
|
|
3307
|
+
if (!W(ee, Fe)) return Fe;
|
|
3308
|
+
const rt = Fe.messages ?? [];
|
|
3309
|
+
if (rt.some((nt) => nt.id === ee.id)) return Fe;
|
|
3310
3310
|
let Oe = 1;
|
|
3311
3311
|
const Ye = document.activeElement && document.activeElement === Xe.current;
|
|
3312
|
-
return I?.[0] ==
|
|
3312
|
+
return I?.[0] == Fe.partner1 && I[1] == Fe.partner2 && Ye && (Ye && (Oe = 0, te()), setTimeout(() => Re.current?.scrollIntoView({ behavior: "smooth" }), 50)), { ...Fe, pending: !1, unread: Fe.unread + Oe, messages: [...rt, ee] };
|
|
3313
3313
|
}).sort(ha));
|
|
3314
3314
|
}), console.log("need refetch:", oe), oe && o(), We([]);
|
|
3315
|
-
}, [Ue, We, se,
|
|
3316
|
-
const W = new hc().withUrl(
|
|
3315
|
+
}, [Ue, We, se, $, I]), K(() => {
|
|
3316
|
+
const W = new hc().withUrl(At("/hub", i), {
|
|
3317
3317
|
accessTokenFactory: () => localStorage.getItem("access_token"),
|
|
3318
3318
|
headers: { "X-Impersonated-Id": t }
|
|
3319
3319
|
}).configureLogging(fc.Information).withAutomaticReconnect().withHubProtocol(new pc()).build();
|
|
@@ -3340,7 +3340,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3340
3340
|
})) ?? [];
|
|
3341
3341
|
se(
|
|
3342
3342
|
(be) => be.map(
|
|
3343
|
-
(
|
|
3343
|
+
(Fe) => Fe.conversationID === W.conversationID ? { ...Fe, messages: ee } : Fe
|
|
3344
3344
|
).sort(ha)
|
|
3345
3345
|
);
|
|
3346
3346
|
} catch (oe) {
|
|
@@ -3354,7 +3354,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3354
3354
|
const oe = document.activeElement && document.activeElement === Xe.current;
|
|
3355
3355
|
W.unread > 0 && oe && (te(), se((ee) => ee.map((be) => be.partner1 === I[0] && be.partner2 === I[1] ? { ...be, unread: 0 } : be)));
|
|
3356
3356
|
}, [I, V]);
|
|
3357
|
-
const { sendMessage: Me } = Na(),
|
|
3357
|
+
const { sendMessage: Me } = Na(), Pe = ae((W) => {
|
|
3358
3358
|
Me(`We have been talking with another Randmar partner and would like you to have the conversation as context for follow-up questions. Please acknowledge your reception of this chat history (one line summary of recent messages will do) and let me know that you're ready to answer questions: ${JSON.stringify(W, null, 2)}`);
|
|
3359
3359
|
}, [Me]), ze = ae(async () => {
|
|
3360
3360
|
if (I)
|
|
@@ -3394,25 +3394,25 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3394
3394
|
}, ge = () => {
|
|
3395
3395
|
const W = Q.trim();
|
|
3396
3396
|
!ht || !W || !I || !me || (ht.unread > 0 && (te(), se((oe) => oe.map((ee) => ee.partner1 === I[0] && ee.partner2 === I[1] ? { ...ee, unread: 0 } : ee))), j(ht, W));
|
|
3397
|
-
},
|
|
3397
|
+
}, Ae = (W, oe) => O([W, oe]);
|
|
3398
3398
|
K(() => {
|
|
3399
3399
|
if (_ === null) return;
|
|
3400
3400
|
const W = V.find((ee) => ee.conversationID === _[0]);
|
|
3401
|
-
if (!W || (
|
|
3401
|
+
if (!W || ($([W.partner1, W.partner2]), !me)) return;
|
|
3402
3402
|
const oe = _[1];
|
|
3403
3403
|
O(null), oe && j(W, oe);
|
|
3404
|
-
}, [_, V,
|
|
3404
|
+
}, [_, V, $, me]);
|
|
3405
3405
|
const { data: Ie, isLoading: _e } = rn();
|
|
3406
3406
|
if (!u || _e)
|
|
3407
3407
|
return /* @__PURE__ */ e(he, { className: "h-12 w-12 animate-spin mx-auto mb-4" });
|
|
3408
3408
|
if (!Ie?.Name)
|
|
3409
|
-
return /* @__PURE__ */ e(
|
|
3409
|
+
return /* @__PURE__ */ e(Au, { appID: Ie?.ApplicationId ?? "" });
|
|
3410
3410
|
const at = async () => {
|
|
3411
3411
|
w.current && (w.current.disabled = !0), C(!0);
|
|
3412
3412
|
try {
|
|
3413
3413
|
const W = await x({ applicationId: t }), oe = W.data?.About ?? "a new business venture", ee = [];
|
|
3414
3414
|
W.data?.IsManufacturer && ee.push("Manufacturer"), W.data?.IsReseller && ee.push("Reseller"), W.data?.IsSalesAgency && ee.push("Sales Agency");
|
|
3415
|
-
const
|
|
3415
|
+
const Fe = `
|
|
3416
3416
|
Your task is to draft a ready-to-send opening message from a user to the Randmar team.
|
|
3417
3417
|
|
|
3418
3418
|
**Your Persona:** You are an entrepreneur and a ${ee.length > 0 ? ee.join("/") : "Entrepreneur"}.
|
|
@@ -3428,11 +3428,11 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3428
3428
|
- **Crucially, do not use any placeholders, brackets, or instructions for the user to fill in.** Use the context provided to craft the final text.
|
|
3429
3429
|
- Keep it to 1-2 concise, engaging sentences.
|
|
3430
3430
|
- Output only the plain text of the message itself.
|
|
3431
|
-
`, rt = await b(
|
|
3431
|
+
`, rt = await b(Fe);
|
|
3432
3432
|
if (rt) {
|
|
3433
3433
|
const Ye = (await S({ routeApplicationId: t, partnerId: "2" })).data?.ConversationId;
|
|
3434
3434
|
if (Ye)
|
|
3435
|
-
await o(),
|
|
3435
|
+
await o(), Ae(Ye, rt);
|
|
3436
3436
|
else
|
|
3437
3437
|
throw new Error("Failed to retrieve conversation ID after creation.");
|
|
3438
3438
|
}
|
|
@@ -3462,7 +3462,7 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3462
3462
|
handleChatWithRandmar: at,
|
|
3463
3463
|
onFullRefreshChats: Y,
|
|
3464
3464
|
onMarkAllRead: J,
|
|
3465
|
-
setActiveChat:
|
|
3465
|
+
setActiveChat: $
|
|
3466
3466
|
}
|
|
3467
3467
|
),
|
|
3468
3468
|
/* @__PURE__ */ e(
|
|
@@ -3485,14 +3485,14 @@ function Df({ appID: t, inputRef: r, className: n }) {
|
|
|
3485
3485
|
{
|
|
3486
3486
|
activeChatObj: ht,
|
|
3487
3487
|
appID: t,
|
|
3488
|
-
sendChatToAssistant:
|
|
3488
|
+
sendChatToAssistant: Pe,
|
|
3489
3489
|
isAnalyzingPartnership: L,
|
|
3490
3490
|
analyzePartnership: ze
|
|
3491
3491
|
}
|
|
3492
3492
|
)
|
|
3493
3493
|
] });
|
|
3494
3494
|
}
|
|
3495
|
-
const si = qt.Root, ln =
|
|
3495
|
+
const si = qt.Root, ln = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
3496
3496
|
qt.List,
|
|
3497
3497
|
{
|
|
3498
3498
|
ref: n,
|
|
@@ -3504,7 +3504,7 @@ const si = qt.Root, ln = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE_
|
|
|
3504
3504
|
}
|
|
3505
3505
|
));
|
|
3506
3506
|
ln.displayName = qt.List.displayName;
|
|
3507
|
-
const st =
|
|
3507
|
+
const st = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
3508
3508
|
qt.Trigger,
|
|
3509
3509
|
{
|
|
3510
3510
|
ref: n,
|
|
@@ -3516,7 +3516,7 @@ const st = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
3516
3516
|
}
|
|
3517
3517
|
));
|
|
3518
3518
|
st.displayName = qt.Trigger.displayName;
|
|
3519
|
-
const lt =
|
|
3519
|
+
const lt = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
3520
3520
|
qt.Content,
|
|
3521
3521
|
{
|
|
3522
3522
|
ref: n,
|
|
@@ -3537,7 +3537,7 @@ function Iu({
|
|
|
3537
3537
|
confirmText: l = "Confirm",
|
|
3538
3538
|
cancelText: o = "Cancel"
|
|
3539
3539
|
}) {
|
|
3540
|
-
return /* @__PURE__ */ e(
|
|
3540
|
+
return /* @__PURE__ */ e($e, { open: t, onOpenChange: r, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
|
|
3541
3541
|
/* @__PURE__ */ a(qe, { children: [
|
|
3542
3542
|
/* @__PURE__ */ e(He, { children: s }),
|
|
3543
3543
|
/* @__PURE__ */ e(Ge, { children: i })
|
|
@@ -3646,13 +3646,13 @@ function Du({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
3646
3646
|
) : /* @__PURE__ */ a("form", { onSubmit: c(async (y) => {
|
|
3647
3647
|
if (r) return;
|
|
3648
3648
|
let C = !0, S = !1;
|
|
3649
|
-
const
|
|
3649
|
+
const A = [
|
|
3650
3650
|
{ key: "accountsPayableRep", apiKey: "ContactName", value: y.accountsPayableRep },
|
|
3651
3651
|
{ key: "representativeEmail", apiKey: "RepresentativeEmail", value: y.representativeEmail },
|
|
3652
3652
|
{ key: "phone", apiKey: "Phone", value: y.phone },
|
|
3653
3653
|
{ key: "terms", apiKey: "Terms", value: y.terms }
|
|
3654
3654
|
];
|
|
3655
|
-
for (const k of
|
|
3655
|
+
for (const k of A) {
|
|
3656
3656
|
const D = k.value, L = t?.[k.apiKey];
|
|
3657
3657
|
if (D !== L && D !== void 0) {
|
|
3658
3658
|
S = !0;
|
|
@@ -3773,7 +3773,7 @@ function Mu({ manufacturer: t, readonly: r = !1, isLoading: n }) {
|
|
|
3773
3773
|
/* @__PURE__ */ e("br", {}),
|
|
3774
3774
|
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
3775
3775
|
/* @__PURE__ */ e(
|
|
3776
|
-
|
|
3776
|
+
Aa,
|
|
3777
3777
|
{
|
|
3778
3778
|
id: "openToWork",
|
|
3779
3779
|
checked: u("openToWork"),
|
|
@@ -3832,14 +3832,14 @@ function Ou({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
3832
3832
|
{ key: "publicResources", apiKey: "PublicResourcesLink", value: k.publicResources }
|
|
3833
3833
|
];
|
|
3834
3834
|
for (const I of M) {
|
|
3835
|
-
const
|
|
3836
|
-
if (
|
|
3835
|
+
const $ = I.value, Q = t?.[I.apiKey], z = typeof Q == "boolean" ? String(Q) : Q;
|
|
3836
|
+
if ($ !== z && $ !== void 0) {
|
|
3837
3837
|
L = !0;
|
|
3838
3838
|
try {
|
|
3839
3839
|
await l({
|
|
3840
3840
|
applicationId: t?.ManufacturerId ?? "",
|
|
3841
3841
|
fieldName: I.apiKey,
|
|
3842
|
-
newValue: String(
|
|
3842
|
+
newValue: String($)
|
|
3843
3843
|
}).unwrap() || (D = !1);
|
|
3844
3844
|
} catch (_) {
|
|
3845
3845
|
console.error(`Error updating ${I.apiKey}:`, _), D = !1;
|
|
@@ -3855,7 +3855,7 @@ function Ou({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
3855
3855
|
description: "Failed to update",
|
|
3856
3856
|
variant: "destructive"
|
|
3857
3857
|
});
|
|
3858
|
-
}, S = (k) => !k || k.trim() === "",
|
|
3858
|
+
}, S = (k) => !k || k.trim() === "", A = (k) => {
|
|
3859
3859
|
u(k);
|
|
3860
3860
|
};
|
|
3861
3861
|
return /* @__PURE__ */ a(q, { children: [
|
|
@@ -3935,11 +3935,11 @@ function Ou({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
3935
3935
|
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
3936
3936
|
/* @__PURE__ */ e(X, { className: "text-sm font-medium leading-none", htmlFor: "manufacturerCategories", children: "Manufacturer Categories" }),
|
|
3937
3937
|
/* @__PURE__ */ e(
|
|
3938
|
-
|
|
3938
|
+
Fm,
|
|
3939
3939
|
{
|
|
3940
3940
|
options: Tu,
|
|
3941
3941
|
selected: o,
|
|
3942
|
-
onChange:
|
|
3942
|
+
onChange: A,
|
|
3943
3943
|
placeholder: "Select or type categories...",
|
|
3944
3944
|
disabled: r
|
|
3945
3945
|
}
|
|
@@ -4005,7 +4005,7 @@ function Eu({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
4005
4005
|
}, [t, m, h]);
|
|
4006
4006
|
const b = async (C) => {
|
|
4007
4007
|
if (r) return !1;
|
|
4008
|
-
let S = !0,
|
|
4008
|
+
let S = !0, A = !1;
|
|
4009
4009
|
const k = [
|
|
4010
4010
|
{ key: "partnerPortal", apiKey: "PartnerPortal", value: C.partnerPortal },
|
|
4011
4011
|
{ key: "partnerRegistrationLink", apiKey: "PartnerRegistrationLink", value: C.partnerRegistrationLink }
|
|
@@ -4013,7 +4013,7 @@ function Eu({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
4013
4013
|
for (const D of k) {
|
|
4014
4014
|
const L = D.value, M = t?.[D.apiKey];
|
|
4015
4015
|
if (L !== M && L !== void 0) {
|
|
4016
|
-
|
|
4016
|
+
A = !0;
|
|
4017
4017
|
try {
|
|
4018
4018
|
await l({
|
|
4019
4019
|
applicationId: t?.ManufacturerId ?? "",
|
|
@@ -4025,11 +4025,11 @@ function Eu({ manufacturer: t, readonly: r = !1, isLoading: n, onUnsavedChanges:
|
|
|
4025
4025
|
}
|
|
4026
4026
|
}
|
|
4027
4027
|
}
|
|
4028
|
-
S &&
|
|
4028
|
+
S && A ? (i({
|
|
4029
4029
|
title: "Qualifications info",
|
|
4030
4030
|
description: "Information updated successfully",
|
|
4031
4031
|
variant: "success"
|
|
4032
|
-
}), u({ ...C }), s && s(!1)) : S ?
|
|
4032
|
+
}), u({ ...C }), s && s(!1)) : S ? A || i({
|
|
4033
4033
|
title: "No changes",
|
|
4034
4034
|
description: "No changes were made to the information.",
|
|
4035
4035
|
variant: "info"
|
|
@@ -4130,7 +4130,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4130
4130
|
id: "Reorder",
|
|
4131
4131
|
title: "Reordering Report",
|
|
4132
4132
|
description: "The Reordering Report provides a snapshot of all part numbers auto-reordering statuses. Aiding your understanding of what will be automatically reordered by our system or not once the inventory reaches low numbers.",
|
|
4133
|
-
icon:
|
|
4133
|
+
icon: Fn
|
|
4134
4134
|
}
|
|
4135
4135
|
]
|
|
4136
4136
|
},
|
|
@@ -4147,11 +4147,11 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4147
4147
|
id: "Products",
|
|
4148
4148
|
title: "Products Report",
|
|
4149
4149
|
description: "Detailed document outlining all your products properties. It provides a comprehensive overview of essential information and insights that help you make informed decisions.",
|
|
4150
|
-
icon:
|
|
4150
|
+
icon: Fn
|
|
4151
4151
|
}
|
|
4152
4152
|
]
|
|
4153
4153
|
}
|
|
4154
|
-
], [w, { isLoading: x }] = So(), [b, { isLoading: y }] = Co(), [C, { isLoading: S }] = ko(), [
|
|
4154
|
+
], [w, { isLoading: x }] = So(), [b, { isLoading: y }] = Co(), [C, { isLoading: S }] = ko(), [A, { isLoading: k }] = Ro(), [D, { isLoading: L }] = Po(), [M, { isLoading: I }] = Ao(), $ = x || y || S || k || L || I, Q = (V) => {
|
|
4155
4155
|
l(V), d(!0);
|
|
4156
4156
|
}, z = (V) => {
|
|
4157
4157
|
d(V), V || (m(void 0), g(void 0));
|
|
@@ -4180,7 +4180,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4180
4180
|
}).unwrap();
|
|
4181
4181
|
break;
|
|
4182
4182
|
case "Reorder":
|
|
4183
|
-
await
|
|
4183
|
+
await A({
|
|
4184
4184
|
routeManufacturerId: t,
|
|
4185
4185
|
emailAddress: o
|
|
4186
4186
|
}).unwrap();
|
|
@@ -4268,7 +4268,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4268
4268
|
se.id
|
|
4269
4269
|
))
|
|
4270
4270
|
] }, V.name)) }),
|
|
4271
|
-
/* @__PURE__ */ e(
|
|
4271
|
+
/* @__PURE__ */ e($e, { open: h, onOpenChange: z, children: /* @__PURE__ */ a(Be, { children: [
|
|
4272
4272
|
/* @__PURE__ */ a(qe, { children: [
|
|
4273
4273
|
/* @__PURE__ */ a(He, { children: [
|
|
4274
4274
|
"Request ",
|
|
@@ -4292,7 +4292,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4292
4292
|
] }),
|
|
4293
4293
|
i?.id === "Sales" && /* @__PURE__ */ a("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
4294
4294
|
/* @__PURE__ */ e(
|
|
4295
|
-
|
|
4295
|
+
Pr,
|
|
4296
4296
|
{
|
|
4297
4297
|
label: "Start Date",
|
|
4298
4298
|
id: "start-date",
|
|
@@ -4301,7 +4301,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4301
4301
|
}
|
|
4302
4302
|
),
|
|
4303
4303
|
/* @__PURE__ */ e(
|
|
4304
|
-
|
|
4304
|
+
Pr,
|
|
4305
4305
|
{
|
|
4306
4306
|
label: "End Date",
|
|
4307
4307
|
id: "end-date",
|
|
@@ -4311,7 +4311,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4311
4311
|
)
|
|
4312
4312
|
] }),
|
|
4313
4313
|
i?.id === "Inventory" && /* @__PURE__ */ e(
|
|
4314
|
-
|
|
4314
|
+
Pr,
|
|
4315
4315
|
{
|
|
4316
4316
|
label: "Inventory Date",
|
|
4317
4317
|
id: "inventory-date",
|
|
@@ -4326,8 +4326,8 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4326
4326
|
E,
|
|
4327
4327
|
{
|
|
4328
4328
|
onClick: _,
|
|
4329
|
-
disabled: !o ||
|
|
4330
|
-
children:
|
|
4329
|
+
disabled: !o || $ || i?.id === "Sales" && (!c || !p) || i?.id === "Inventory" && !c,
|
|
4330
|
+
children: $ ? /* @__PURE__ */ a(U, { children: [
|
|
4331
4331
|
/* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
4332
4332
|
"Sending..."
|
|
4333
4333
|
] }) : "Send Report"
|
|
@@ -4337,7 +4337,7 @@ function Lu({ manufacturerId: t, userEmail: r, isLoading: n }) {
|
|
|
4337
4337
|
] }) })
|
|
4338
4338
|
] });
|
|
4339
4339
|
}
|
|
4340
|
-
function
|
|
4340
|
+
function Fu(t) {
|
|
4341
4341
|
const {
|
|
4342
4342
|
data: r,
|
|
4343
4343
|
isLoading: n,
|
|
@@ -4352,7 +4352,7 @@ function $u(t) {
|
|
|
4352
4352
|
shipped: { orders: 0, amount: 0 },
|
|
4353
4353
|
delayed: { orders: 0, amount: 0 }
|
|
4354
4354
|
};
|
|
4355
|
-
const h = i.filter((S) => S.DocumentType === "Order"), d = i.filter((S) => S.DocumentType === "Shipment"), c = h.filter((S) => S.WarehouseCode !== "3PLE"), m = c.reduce((S,
|
|
4355
|
+
const h = i.filter((S) => S.DocumentType === "Order"), d = i.filter((S) => S.DocumentType === "Shipment"), c = h.filter((S) => S.WarehouseCode !== "3PLE"), m = c.reduce((S, A) => S + (A.Quantity || 0), 0), p = c.reduce((S, A) => S + (A.ExtendedPrice || 0), 0), g = h.filter((S) => S.WarehouseCode === "3PLE"), N = g.reduce((S, A) => S + (A.Quantity || 0), 0), w = g.reduce((S, A) => S + (A.ExtendedPrice || 0), 0), x = d.length, b = d.reduce((S, A) => S + (A.ExtendedPrice || 0), 0), y = m + N + x, C = p + w + b;
|
|
4356
4356
|
return {
|
|
4357
4357
|
all: { orders: y, amount: C },
|
|
4358
4358
|
processing: { orders: m, amount: p },
|
|
@@ -4447,7 +4447,7 @@ function $u(t) {
|
|
|
4447
4447
|
] })
|
|
4448
4448
|
] });
|
|
4449
4449
|
}
|
|
4450
|
-
function
|
|
4450
|
+
function $u(t) {
|
|
4451
4451
|
if (!t) return;
|
|
4452
4452
|
const r = [
|
|
4453
4453
|
"",
|
|
@@ -4468,7 +4468,7 @@ function Fu(t) {
|
|
|
4468
4468
|
return t === void 0 && (t = (/* @__PURE__ */ new Date()).getMonth() + 1), t < 1 && (t = 12 + t), r[t];
|
|
4469
4469
|
}
|
|
4470
4470
|
function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
|
|
4471
|
-
const s = r?.SalesLast30Days ?? 0, i = r?.SalesLast3Months ?? 0, l = r?.SalesYearToDay ?? 0, o =
|
|
4471
|
+
const s = r?.SalesLast30Days ?? 0, i = r?.SalesLast3Months ?? 0, l = r?.SalesYearToDay ?? 0, o = $u(t);
|
|
4472
4472
|
return n ? /* @__PURE__ */ a("div", { className: "grid gap-4 @xl:grid-cols-2 @2xl:grid-cols-3 mb-4", children: [
|
|
4473
4473
|
/* @__PURE__ */ a(q, { children: [
|
|
4474
4474
|
/* @__PURE__ */ a(Z, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
@@ -4537,7 +4537,7 @@ function li({ fiscalYearMonthStart: t, salesData: r, isLoading: n }) {
|
|
|
4537
4537
|
] })
|
|
4538
4538
|
] });
|
|
4539
4539
|
}
|
|
4540
|
-
const q =
|
|
4540
|
+
const q = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
4541
4541
|
"div",
|
|
4542
4542
|
{
|
|
4543
4543
|
ref: n,
|
|
@@ -4549,7 +4549,7 @@ const q = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
4549
4549
|
}
|
|
4550
4550
|
));
|
|
4551
4551
|
q.displayName = "Card";
|
|
4552
|
-
const Z =
|
|
4552
|
+
const Z = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
4553
4553
|
"div",
|
|
4554
4554
|
{
|
|
4555
4555
|
ref: n,
|
|
@@ -4558,7 +4558,7 @@ const Z = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
4558
4558
|
}
|
|
4559
4559
|
));
|
|
4560
4560
|
Z.displayName = "CardHeader";
|
|
4561
|
-
const fe =
|
|
4561
|
+
const fe = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
4562
4562
|
"div",
|
|
4563
4563
|
{
|
|
4564
4564
|
ref: n,
|
|
@@ -4567,7 +4567,7 @@ const fe = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
4567
4567
|
}
|
|
4568
4568
|
));
|
|
4569
4569
|
fe.displayName = "CardTitle";
|
|
4570
|
-
const Ia =
|
|
4570
|
+
const Ia = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
4571
4571
|
"div",
|
|
4572
4572
|
{
|
|
4573
4573
|
ref: n,
|
|
@@ -4576,9 +4576,9 @@ const Ia = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
4576
4576
|
}
|
|
4577
4577
|
));
|
|
4578
4578
|
Ia.displayName = "CardDescription";
|
|
4579
|
-
const G =
|
|
4579
|
+
const G = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("div", { ref: n, className: v("p-6 pt-0", t), ...r }));
|
|
4580
4580
|
G.displayName = "CardContent";
|
|
4581
|
-
const St =
|
|
4581
|
+
const St = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
4582
4582
|
"div",
|
|
4583
4583
|
{
|
|
4584
4584
|
ref: n,
|
|
@@ -4587,8 +4587,8 @@ const St = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
4587
4587
|
}
|
|
4588
4588
|
));
|
|
4589
4589
|
St.displayName = "CardFooter";
|
|
4590
|
-
const Da =
|
|
4591
|
-
|
|
4590
|
+
const Da = P.forwardRef(({ className: t, value: r, ...n }, s) => /* @__PURE__ */ e(
|
|
4591
|
+
Fr.Root,
|
|
4592
4592
|
{
|
|
4593
4593
|
ref: s,
|
|
4594
4594
|
className: v(
|
|
@@ -4597,7 +4597,7 @@ const Da = A.forwardRef(({ className: t, value: r, ...n }, s) => /* @__PURE__ */
|
|
|
4597
4597
|
),
|
|
4598
4598
|
...n,
|
|
4599
4599
|
children: /* @__PURE__ */ e(
|
|
4600
|
-
|
|
4600
|
+
Fr.Indicator,
|
|
4601
4601
|
{
|
|
4602
4602
|
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
4603
4603
|
style: { transform: `translateX(-${100 - (r || 0)}%)` }
|
|
@@ -4605,7 +4605,7 @@ const Da = A.forwardRef(({ className: t, value: r, ...n }, s) => /* @__PURE__ */
|
|
|
4605
4605
|
)
|
|
4606
4606
|
}
|
|
4607
4607
|
));
|
|
4608
|
-
Da.displayName =
|
|
4608
|
+
Da.displayName = Fr.Root.displayName;
|
|
4609
4609
|
function Bu({
|
|
4610
4610
|
manufacturer: t,
|
|
4611
4611
|
isLoading: r
|
|
@@ -4868,7 +4868,7 @@ function Vu({
|
|
|
4868
4868
|
}
|
|
4869
4869
|
),
|
|
4870
4870
|
/* @__PURE__ */ e(
|
|
4871
|
-
|
|
4871
|
+
Fu,
|
|
4872
4872
|
{
|
|
4873
4873
|
manufacturerId: g?.ManufacturerId ?? "",
|
|
4874
4874
|
activeOrders: g?.ActiveOrderDetails ?? void 0,
|
|
@@ -5026,7 +5026,7 @@ const ju = sa(
|
|
|
5026
5026
|
size: "default"
|
|
5027
5027
|
}
|
|
5028
5028
|
}
|
|
5029
|
-
), xe =
|
|
5029
|
+
), xe = P.forwardRef(
|
|
5030
5030
|
({ className: t, variant: r, size: n, icon: s, children: i, ...l }, o) => /* @__PURE__ */ a("div", { ref: o, className: v(ju({ variant: r, size: n }), t), ...l, children: [
|
|
5031
5031
|
s && /* @__PURE__ */ e("span", { className: "mr-1", children: s }),
|
|
5032
5032
|
i
|
|
@@ -5116,7 +5116,7 @@ function qu({
|
|
|
5116
5116
|
] })
|
|
5117
5117
|
] }) });
|
|
5118
5118
|
}
|
|
5119
|
-
const Ut = je.Root, Mf = je.Group, _t = je.Value, Dt =
|
|
5119
|
+
const Ut = je.Root, Mf = je.Group, _t = je.Value, Dt = P.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ a(
|
|
5120
5120
|
je.Trigger,
|
|
5121
5121
|
{
|
|
5122
5122
|
ref: s,
|
|
@@ -5132,7 +5132,7 @@ const Ut = je.Root, Mf = je.Group, _t = je.Value, Dt = A.forwardRef(({ className
|
|
|
5132
5132
|
}
|
|
5133
5133
|
));
|
|
5134
5134
|
Dt.displayName = je.Trigger.displayName;
|
|
5135
|
-
const oi =
|
|
5135
|
+
const oi = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
5136
5136
|
je.ScrollUpButton,
|
|
5137
5137
|
{
|
|
5138
5138
|
ref: n,
|
|
@@ -5145,7 +5145,7 @@ const oi = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
5145
5145
|
}
|
|
5146
5146
|
));
|
|
5147
5147
|
oi.displayName = je.ScrollUpButton.displayName;
|
|
5148
|
-
const ci =
|
|
5148
|
+
const ci = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
5149
5149
|
je.ScrollDownButton,
|
|
5150
5150
|
{
|
|
5151
5151
|
ref: n,
|
|
@@ -5158,7 +5158,7 @@ const ci = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
5158
5158
|
}
|
|
5159
5159
|
));
|
|
5160
5160
|
ci.displayName = je.ScrollDownButton.displayName;
|
|
5161
|
-
const Mt =
|
|
5161
|
+
const Mt = P.forwardRef(({ className: t, children: r, position: n = "popper", ...s }, i) => /* @__PURE__ */ e(je.Portal, { children: /* @__PURE__ */ a(
|
|
5162
5162
|
je.Content,
|
|
5163
5163
|
{
|
|
5164
5164
|
ref: i,
|
|
@@ -5186,7 +5186,7 @@ const Mt = A.forwardRef(({ className: t, children: r, position: n = "popper", ..
|
|
|
5186
5186
|
}
|
|
5187
5187
|
) }));
|
|
5188
5188
|
Mt.displayName = je.Content.displayName;
|
|
5189
|
-
const Qu =
|
|
5189
|
+
const Qu = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
5190
5190
|
je.Label,
|
|
5191
5191
|
{
|
|
5192
5192
|
ref: n,
|
|
@@ -5195,7 +5195,7 @@ const Qu = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
5195
5195
|
}
|
|
5196
5196
|
));
|
|
5197
5197
|
Qu.displayName = je.Label.displayName;
|
|
5198
|
-
const ot =
|
|
5198
|
+
const ot = P.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ a(
|
|
5199
5199
|
je.Item,
|
|
5200
5200
|
{
|
|
5201
5201
|
ref: s,
|
|
@@ -5211,7 +5211,7 @@ const ot = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__
|
|
|
5211
5211
|
}
|
|
5212
5212
|
));
|
|
5213
5213
|
ot.displayName = je.Item.displayName;
|
|
5214
|
-
const Hu =
|
|
5214
|
+
const Hu = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
5215
5215
|
je.Separator,
|
|
5216
5216
|
{
|
|
5217
5217
|
ref: n,
|
|
@@ -5266,7 +5266,7 @@ function Wu({
|
|
|
5266
5266
|
} finally {
|
|
5267
5267
|
u(!1);
|
|
5268
5268
|
}
|
|
5269
|
-
}, C = () => r.Categories?.find((k) => k.CategoryCode === i)?.CategoryName || i, S = ye(() => w?.Products ? [...w.Products].sort((k, D) => c === "price-asc" ? (k.MAP ?? 0) - (D.MAP ?? 0) : c === "price-desc" ? (D.MAP ?? 0) - (k.MAP ?? 0) : c === "name" ? (k.Title ?? "").localeCompare(D.Title ?? "") : c === "percentile" ? (D.OverallPercentileRank ?? 0) - (k.OverallPercentileRank ?? 0) : 0) : [], [w?.Products, c]),
|
|
5269
|
+
}, C = () => r.Categories?.find((k) => k.CategoryCode === i)?.CategoryName || i, S = ye(() => w?.Products ? [...w.Products].sort((k, D) => c === "price-asc" ? (k.MAP ?? 0) - (D.MAP ?? 0) : c === "price-desc" ? (D.MAP ?? 0) - (k.MAP ?? 0) : c === "name" ? (k.Title ?? "").localeCompare(D.Title ?? "") : c === "percentile" ? (D.OverallPercentileRank ?? 0) - (k.OverallPercentileRank ?? 0) : 0) : [], [w?.Products, c]), A = ye(() => p ? S.filter((k) => {
|
|
5270
5270
|
const D = k.Distribution?.Inventory;
|
|
5271
5271
|
return !Array.isArray(D) || D.length === 0 ? !1 : D.reduce((M, I) => M + (I?.AvailableQuantity ?? 0), 0) > 0;
|
|
5272
5272
|
}) : S, [p, S]);
|
|
@@ -5358,7 +5358,7 @@ function Wu({
|
|
|
5358
5358
|
] })
|
|
5359
5359
|
] })
|
|
5360
5360
|
] }),
|
|
5361
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 @md:grid-cols-2 gap-4 mb-4", children: x || b ? Array.from({ length: 4 }).map((k, D) => /* @__PURE__ */ e(Wr, {}, D)) :
|
|
5361
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 @md:grid-cols-2 gap-4 mb-4", children: x || b ? Array.from({ length: 4 }).map((k, D) => /* @__PURE__ */ e(Wr, {}, D)) : A.length > 0 ? A.map((k) => /* @__PURE__ */ e(
|
|
5362
5362
|
Wr,
|
|
5363
5363
|
{
|
|
5364
5364
|
applicationId: t,
|
|
@@ -5372,7 +5372,7 @@ function Wu({
|
|
|
5372
5372
|
/* @__PURE__ */ e(Ot, { children: "Warning" }),
|
|
5373
5373
|
/* @__PURE__ */ e(Et, { children: p && S.length > 0 ? "No in-stock products found in this category. Try turning off the In Stock filter." : "No products found for this manufacturer category." })
|
|
5374
5374
|
] }) }),
|
|
5375
|
-
/* @__PURE__ */ e(
|
|
5375
|
+
/* @__PURE__ */ e($e, { open: h, onOpenChange: d, children: /* @__PURE__ */ a(Be, { children: [
|
|
5376
5376
|
/* @__PURE__ */ a(qe, { children: [
|
|
5377
5377
|
/* @__PURE__ */ e(He, { children: "Confirm Sync to Shopify" }),
|
|
5378
5378
|
/* @__PURE__ */ a(Ge, { children: [
|
|
@@ -5459,7 +5459,7 @@ function Tf({
|
|
|
5459
5459
|
manufacturer: l?.Manufacturer
|
|
5460
5460
|
}
|
|
5461
5461
|
),
|
|
5462
|
-
s && l?.Manufacturer?.Categories?.findIndex((y) => y.AvailableToBuy) !== -1 && /* @__PURE__ */ a(
|
|
5462
|
+
s && l?.Manufacturer?.Categories?.findIndex((y) => y.AvailableToBuy) !== -1 && /* @__PURE__ */ a($e, { open: p, onOpenChange: g, children: [
|
|
5463
5463
|
/* @__PURE__ */ e(xa, { asChild: !0, children: /* @__PURE__ */ e(E, { className: "ml-2 bg-success text-success-foreground hover:bg-success/90", disabled: c, children: c ? /* @__PURE__ */ a(U, { children: [
|
|
5464
5464
|
/* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
5465
5465
|
"Syncing..."
|
|
@@ -5590,7 +5590,7 @@ const Gu = ({ reseller: t, appID: r, isLoading: n, readonly: s, onUnsavedChanges
|
|
|
5590
5590
|
t && Object.keys(t).length > 0 && (p(d), h(d));
|
|
5591
5591
|
}, [t, p, d]);
|
|
5592
5592
|
const y = async (S) => {
|
|
5593
|
-
let
|
|
5593
|
+
let A = !0, k = !1;
|
|
5594
5594
|
const D = Object.keys(S).map((L) => ({
|
|
5595
5595
|
key: L,
|
|
5596
5596
|
keyApi: L.charAt(0).toUpperCase() + L.slice(1)
|
|
@@ -5604,17 +5604,17 @@ const Gu = ({ reseller: t, appID: r, isLoading: n, readonly: s, onUnsavedChanges
|
|
|
5604
5604
|
applicationId: r,
|
|
5605
5605
|
fieldName: L.keyApi,
|
|
5606
5606
|
newValue: String(M)
|
|
5607
|
-
}).unwrap() || (
|
|
5608
|
-
} catch (
|
|
5609
|
-
console.error(`Error updating ${L.keyApi}:`,
|
|
5607
|
+
}).unwrap() || (A = !1);
|
|
5608
|
+
} catch ($) {
|
|
5609
|
+
console.error(`Error updating ${L.keyApi}:`, $), A = !1;
|
|
5610
5610
|
}
|
|
5611
5611
|
}
|
|
5612
5612
|
}
|
|
5613
|
-
|
|
5613
|
+
A && k ? (l({
|
|
5614
5614
|
title: "Public info",
|
|
5615
5615
|
description: "Information updated successfully",
|
|
5616
5616
|
variant: "success"
|
|
5617
|
-
}), h({ ...S }), i && i(!1)) :
|
|
5617
|
+
}), h({ ...S }), i && i(!1)) : A || l({
|
|
5618
5618
|
title: "Updation error",
|
|
5619
5619
|
description: "Failed to update",
|
|
5620
5620
|
variant: "destructive"
|
|
@@ -5739,7 +5739,7 @@ const Gu = ({ reseller: t, appID: r, isLoading: n, readonly: s, onUnsavedChanges
|
|
|
5739
5739
|
] });
|
|
5740
5740
|
};
|
|
5741
5741
|
function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail: i, isSuperAdmin: l }) {
|
|
5742
|
-
const { toast: o } = Ee(), { Statement: u, CreditLimit: h } = r, [d, c] = T(!1), [m, p] = T(!1), [g, N] = T(!1), [w, x] = T(!1), [b, y] = T(i || ""), [C, S] = T(!1), [
|
|
5742
|
+
const { toast: o } = Ee(), { Statement: u, CreditLimit: h } = r, [d, c] = T(!1), [m, p] = T(!1), [g, N] = T(!1), [w, x] = T(!1), [b, y] = T(i || ""), [C, S] = T(!1), [A, k] = T(h?.toString() || ""), [D, { isLoading: L }] = Lo(), M = [
|
|
5743
5743
|
{
|
|
5744
5744
|
label: "0 - 30 Days",
|
|
5745
5745
|
value: /* @__PURE__ */ e(pt, { value: u?.Over0 || 0, style: "currency", currency: "CAD", currencyDisplay: "symbol" }),
|
|
@@ -5770,7 +5770,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5770
5770
|
] }),
|
|
5771
5771
|
icon: Wa
|
|
5772
5772
|
}
|
|
5773
|
-
], [I] =
|
|
5773
|
+
], [I] = Fo(), $ = async (O) => {
|
|
5774
5774
|
O ? c(!0) : p(!0);
|
|
5775
5775
|
try {
|
|
5776
5776
|
const se = (await I({
|
|
@@ -5870,7 +5870,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5870
5870
|
{
|
|
5871
5871
|
variant: "outline",
|
|
5872
5872
|
size: "icon",
|
|
5873
|
-
onClick: () =>
|
|
5873
|
+
onClick: () => $(!0),
|
|
5874
5874
|
disabled: d,
|
|
5875
5875
|
children: d ? /* @__PURE__ */ e(he, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(fl, { className: "h-4 w-4" })
|
|
5876
5876
|
}
|
|
@@ -5883,7 +5883,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5883
5883
|
{
|
|
5884
5884
|
variant: "outline",
|
|
5885
5885
|
size: "icon",
|
|
5886
|
-
onClick: () =>
|
|
5886
|
+
onClick: () => $(!1),
|
|
5887
5887
|
disabled: m,
|
|
5888
5888
|
children: m ? /* @__PURE__ */ e(he, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Ca, { className: "h-4 w-4" })
|
|
5889
5889
|
}
|
|
@@ -5917,7 +5917,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5917
5917
|
] })
|
|
5918
5918
|
] })
|
|
5919
5919
|
] }),
|
|
5920
|
-
/* @__PURE__ */ e(
|
|
5920
|
+
/* @__PURE__ */ e($e, { open: w, onOpenChange: x, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
|
|
5921
5921
|
/* @__PURE__ */ a(qe, { children: [
|
|
5922
5922
|
/* @__PURE__ */ e(He, { children: "Send Statement by Email" }),
|
|
5923
5923
|
/* @__PURE__ */ e(Ge, { children: "Enter the recipient's email address below. The statement will be sent as a PDF attachment." })
|
|
@@ -5952,7 +5952,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5952
5952
|
}
|
|
5953
5953
|
) })
|
|
5954
5954
|
] }) }),
|
|
5955
|
-
/* @__PURE__ */ e(
|
|
5955
|
+
/* @__PURE__ */ e($e, { open: C, onOpenChange: S, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
|
|
5956
5956
|
/* @__PURE__ */ a(qe, { children: [
|
|
5957
5957
|
/* @__PURE__ */ e(He, { children: "Edit Credit Limit" }),
|
|
5958
5958
|
/* @__PURE__ */ e(Ge, { children: "Enter the new credit limit for this reseller." })
|
|
@@ -5964,7 +5964,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5964
5964
|
{
|
|
5965
5965
|
id: "creditLimit",
|
|
5966
5966
|
type: "number",
|
|
5967
|
-
value:
|
|
5967
|
+
value: A,
|
|
5968
5968
|
onChange: (O) => k(O.target.value),
|
|
5969
5969
|
className: "col-span-3",
|
|
5970
5970
|
placeholder: "0.00"
|
|
@@ -5976,7 +5976,7 @@ function Ku({ appID: t, reseller: r, isLoading: n, withoutReports: s, userEmail:
|
|
|
5976
5976
|
{
|
|
5977
5977
|
type: "submit",
|
|
5978
5978
|
onClick: async () => {
|
|
5979
|
-
const O = Number(
|
|
5979
|
+
const O = Number(A);
|
|
5980
5980
|
if (isNaN(O)) {
|
|
5981
5981
|
o({
|
|
5982
5982
|
title: "Invalid Amount",
|
|
@@ -6022,7 +6022,7 @@ function Kn({ icon: t, label: r, value: n }) {
|
|
|
6022
6022
|
] });
|
|
6023
6023
|
}
|
|
6024
6024
|
function Yu({ open: t, setOpen: r, tier: n, onTierChange: s, isLoading: i }) {
|
|
6025
|
-
return /* @__PURE__ */ e(
|
|
6025
|
+
return /* @__PURE__ */ e($e, { open: t, onOpenChange: r, children: /* @__PURE__ */ a(Be, { className: "sm:max-w-[425px]", children: [
|
|
6026
6026
|
/* @__PURE__ */ e(qe, { children: /* @__PURE__ */ e(He, { children: "Change Pricing Tier" }) }),
|
|
6027
6027
|
/* @__PURE__ */ a("div", { className: "grid gap-1.5 py-2", children: [
|
|
6028
6028
|
/* @__PURE__ */ a("p", { className: "text-lg text-muted-foreground", children: [
|
|
@@ -6052,7 +6052,7 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
|
|
|
6052
6052
|
COOPSCO: "coopsco",
|
|
6053
6053
|
"Jean Coutu": "jeancoutu",
|
|
6054
6054
|
Exclusive: "exclusive"
|
|
6055
|
-
}[O] || "", g = (O) => O && { A: "free", B: "fixed", C: "dropshipped", D: "under1500", E: "fullcharges" }[O] || "", N = (O) => O && { 1: "exclusive", 2: "ecommerce", 3: "commercial", 4: "buyinggroup", 5: "cost" }[O] || "", [w, x] = T(p(n?.Priority ?? "")), [b, y] = T(g(n?.ShippingProfile ?? "")), [C, S] = T(N(n?.PriceProfile)),
|
|
6055
|
+
}[O] || "", g = (O) => O && { A: "free", B: "fixed", C: "dropshipped", D: "under1500", E: "fullcharges" }[O] || "", N = (O) => O && { 1: "exclusive", 2: "ecommerce", 3: "commercial", 4: "buyinggroup", 5: "cost" }[O] || "", [w, x] = T(p(n?.Priority ?? "")), [b, y] = T(g(n?.ShippingProfile ?? "")), [C, S] = T(N(n?.PriceProfile)), A = (O) => ({ starter: "Starter", ecommerce: "E-Commerce", commercial: "Commercial", cws: "Basics", novexco: "Novexco", coopsco: "COOPSCO", jeancoutu: "Jean Coutu", exclusive: "Exclusive" })[O] || O, k = (O) => ({ free: "A", fixed: "B", dropshipped: "C", under1500: "D", fullcharges: "E" })[O] || O, D = (O) => ({ exclusive: "1", ecommerce: "2", commercial: "3", buyinggroup: "4", cost: "5" })[O] || O;
|
|
6056
6056
|
K(() => {
|
|
6057
6057
|
x(p(n?.Priority ?? "")), y(g(n?.ShippingProfile ?? "")), S(N(n?.PriceProfile));
|
|
6058
6058
|
}, [n]);
|
|
@@ -6064,13 +6064,13 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
|
|
|
6064
6064
|
}
|
|
6065
6065
|
}, M = async (O) => {
|
|
6066
6066
|
x(O);
|
|
6067
|
-
const V =
|
|
6067
|
+
const V = A(O);
|
|
6068
6068
|
L("Priority", V, `Priority updated to ${V}`, "Failed to update priority");
|
|
6069
6069
|
}, I = async (O) => {
|
|
6070
6070
|
y(O);
|
|
6071
6071
|
const V = k(O);
|
|
6072
6072
|
L("ShippingProfile", V, `Shipping profile updated to ${V}`, "Failed to update shipping profile");
|
|
6073
|
-
},
|
|
6073
|
+
}, $ = async (O) => {
|
|
6074
6074
|
S(O);
|
|
6075
6075
|
const V = D(O);
|
|
6076
6076
|
L("PriceProfile", V, `Pricing profile updated to ${V}`, "Failed to update pricing profile");
|
|
@@ -6202,7 +6202,7 @@ $10 with opportunities under $1,000` : t === "D" ? "$15 under $1,500" : t === "E
|
|
|
6202
6202
|
] }),
|
|
6203
6203
|
/* @__PURE__ */ a("div", { className: "bg-muted/30 p-2 rounded-lg", children: [
|
|
6204
6204
|
/* @__PURE__ */ e(X, { className: "block mb-1 text-xs font-medium", children: "Pricing Profile" }),
|
|
6205
|
-
/* @__PURE__ */ e(pa, { value: C, onValueChange:
|
|
6205
|
+
/* @__PURE__ */ e(pa, { value: C, onValueChange: $, className: "grid grid-cols-2 @sm:grid-cols-3 gap-1", children: [{ value: "exclusive", label: "Exclusive (1)" }, { value: "ecommerce", label: "E-Commerce (2)" }, { value: "commercial", label: "Commercial (3)" }, { value: "buyinggroup", label: "Buying Group (4)" }, { value: "cost", label: "Cost (5)" }].map((O) => /* @__PURE__ */ a("div", { className: "flex items-center space-x-1", children: [
|
|
6206
6206
|
/* @__PURE__ */ e(Rt, { value: O.value, id: `pricing-${O.value}`, className: "h-6 w-6 scale-50 antialiased" }),
|
|
6207
6207
|
/* @__PURE__ */ e(X, { htmlFor: `pricing-${O.value}`, className: "cursor-pointer text-xs", children: O.label })
|
|
6208
6208
|
] }, O.value)) })
|
|
@@ -6303,7 +6303,7 @@ function tm({ openOrders: t = [], isLoading: r = !1 }) {
|
|
|
6303
6303
|
] });
|
|
6304
6304
|
}
|
|
6305
6305
|
function am({ isLoading: t, userEmail: r, appID: n }) {
|
|
6306
|
-
const { toast: s } = Ee(), [i, { isLoading: l }] =
|
|
6306
|
+
const { toast: s } = Ee(), [i, { isLoading: l }] = $o(), [o, { isLoading: u }] = Bo(), [h, { isLoading: d }] = zo(), [c, { isLoading: m }] = Rs(), [p, { isLoading: g }] = Vo(), [N, { isLoading: w }] = ks(), [x, b] = T(null), [y, C] = T(r), [S, A] = T(!1), [k, D] = T("all"), { data: L, isLoading: M } = Or(
|
|
6307
6307
|
{
|
|
6308
6308
|
routeApplicationId: n,
|
|
6309
6309
|
withSpecification: !1
|
|
@@ -6360,8 +6360,8 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
|
|
|
6360
6360
|
}
|
|
6361
6361
|
]
|
|
6362
6362
|
}
|
|
6363
|
-
],
|
|
6364
|
-
b(_), _.id === "Products" && D("all"),
|
|
6363
|
+
], $ = async (_) => {
|
|
6364
|
+
b(_), _.id === "Products" && D("all"), A(!0);
|
|
6365
6365
|
}, Q = async () => {
|
|
6366
6366
|
if (!(!x || !n))
|
|
6367
6367
|
try {
|
|
@@ -6411,7 +6411,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
|
|
|
6411
6411
|
title: "Report requested",
|
|
6412
6412
|
description: `The ${x.title} will be sent to ${y} shortly.`,
|
|
6413
6413
|
variant: "success"
|
|
6414
|
-
}),
|
|
6414
|
+
}), A(!1);
|
|
6415
6415
|
} catch (_) {
|
|
6416
6416
|
console.error("Error requesting report:", _), s({
|
|
6417
6417
|
title: "Error",
|
|
@@ -6453,7 +6453,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
|
|
|
6453
6453
|
variant: "outline",
|
|
6454
6454
|
size: "sm",
|
|
6455
6455
|
className: "flex items-center gap-1",
|
|
6456
|
-
onClick: () =>
|
|
6456
|
+
onClick: () => $(O),
|
|
6457
6457
|
children: [
|
|
6458
6458
|
/* @__PURE__ */ e(Ca, { className: "h-4 w-4" }),
|
|
6459
6459
|
"Request"
|
|
@@ -6465,7 +6465,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
|
|
|
6465
6465
|
O.id
|
|
6466
6466
|
))
|
|
6467
6467
|
] }, _.name)) }) }),
|
|
6468
|
-
/* @__PURE__ */ e(
|
|
6468
|
+
/* @__PURE__ */ e($e, { open: S, onOpenChange: A, children: /* @__PURE__ */ a(Be, { children: [
|
|
6469
6469
|
/* @__PURE__ */ a(qe, { children: [
|
|
6470
6470
|
/* @__PURE__ */ a(He, { children: [
|
|
6471
6471
|
"Request ",
|
|
@@ -6509,7 +6509,7 @@ function am({ isLoading: t, userEmail: r, appID: n }) {
|
|
|
6509
6509
|
] }),
|
|
6510
6510
|
/* @__PURE__ */ e(Ge, { children: "The report will take around 5 minutes to generate." }),
|
|
6511
6511
|
/* @__PURE__ */ a(Ke, { children: [
|
|
6512
|
-
/* @__PURE__ */ e(E, { variant: "outline", onClick: () =>
|
|
6512
|
+
/* @__PURE__ */ e(E, { variant: "outline", onClick: () => A(!1), children: "Cancel" }),
|
|
6513
6513
|
/* @__PURE__ */ e(E, { onClick: Q, disabled: !y || z, children: z ? /* @__PURE__ */ a(U, { children: [
|
|
6514
6514
|
/* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
6515
6515
|
"Sending..."
|
|
@@ -6587,9 +6587,9 @@ function la({
|
|
|
6587
6587
|
const S = `${C.substring(0, 4)}-${C.substring(4, 6)}`;
|
|
6588
6588
|
b[S] && (b[S].price += y.ExtendedPrice ?? 0, b[S].quantity += y.Quantity ?? 0);
|
|
6589
6589
|
}), c = x.map((y) => {
|
|
6590
|
-
const C = b[y], [S,
|
|
6590
|
+
const C = b[y], [S, A] = y.split("-").map(Number);
|
|
6591
6591
|
return {
|
|
6592
|
-
date: new Date(S,
|
|
6592
|
+
date: new Date(S, A - 1).toLocaleString("default", { month: "short", year: "numeric" }),
|
|
6593
6593
|
dollarVolume: C.price,
|
|
6594
6594
|
unitsSold: C.quantity
|
|
6595
6595
|
};
|
|
@@ -6598,7 +6598,7 @@ function la({
|
|
|
6598
6598
|
if (y && y.price > 0 && N > 0) {
|
|
6599
6599
|
const C = new Date(p, g + 1, 0).getDate();
|
|
6600
6600
|
if (N < C) {
|
|
6601
|
-
const S = y.price / N,
|
|
6601
|
+
const S = y.price / N, A = y.quantity / N, k = S * C, D = A * C, L = c[c.length - 1];
|
|
6602
6602
|
L && (L.dollarVolume = k, L.unitsSold = D);
|
|
6603
6603
|
}
|
|
6604
6604
|
}
|
|
@@ -6606,10 +6606,10 @@ function la({
|
|
|
6606
6606
|
}
|
|
6607
6607
|
o(c);
|
|
6608
6608
|
}, [t, r, u, s]), s ? /* @__PURE__ */ e("div", { style: { height: n }, children: /* @__PURE__ */ e(f, { className: "h-full w-full rounded-md" }) }) : l.length === 0 ? /* @__PURE__ */ e("div", { style: { height: n }, className: "flex items-center justify-center text-muted-foreground", children: "No sales data available." }) : /* @__PURE__ */ a(U, { children: [
|
|
6609
|
-
/* @__PURE__ */ e(
|
|
6609
|
+
/* @__PURE__ */ e(Fd, { data: l, series: d, height: n, size: i }),
|
|
6610
6610
|
i === "default" && r === "month" && /* @__PURE__ */ a("div", { className: "mt-4", children: [
|
|
6611
6611
|
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
6612
|
-
/* @__PURE__ */ e(
|
|
6612
|
+
/* @__PURE__ */ e(Aa, { checked: u, onCheckedChange: h, id: "extrapolate-switch" }),
|
|
6613
6613
|
/* @__PURE__ */ e(X, { htmlFor: "extrapolate-switch", children: "Extrapolate Current Month" })
|
|
6614
6614
|
] }),
|
|
6615
6615
|
u && /* @__PURE__ */ a("p", { className: "mt-2 text-sm text-muted-foreground", children: [
|
|
@@ -6766,7 +6766,7 @@ function va({
|
|
|
6766
6766
|
"Open To Work"
|
|
6767
6767
|
] }),
|
|
6768
6768
|
!!t.OnHold && t.OnHold !== 0 && /* @__PURE__ */ e(xe, { variant: "warning", children: "On Hold" }),
|
|
6769
|
-
y.map((S,
|
|
6769
|
+
y.map((S, A) => /* @__PURE__ */ e(xe, { variant: "outline", children: S }, A))
|
|
6770
6770
|
] }),
|
|
6771
6771
|
/* @__PURE__ */ a("div", { className: "space-y-1 pt-2", children: [
|
|
6772
6772
|
t.Phone && /* @__PURE__ */ a(
|
|
@@ -6834,7 +6834,7 @@ function va({
|
|
|
6834
6834
|
] }),
|
|
6835
6835
|
i && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e("div", { children: i }) })
|
|
6836
6836
|
] }),
|
|
6837
|
-
/* @__PURE__ */ e(
|
|
6837
|
+
/* @__PURE__ */ e($e, { open: c, onOpenChange: m, children: /* @__PURE__ */ a(Be, { children: [
|
|
6838
6838
|
/* @__PURE__ */ a(qe, { children: [
|
|
6839
6839
|
/* @__PURE__ */ e(He, { children: "Request Universal Product List" }),
|
|
6840
6840
|
/* @__PURE__ */ e(Ge, { children: "Enter the email address where you would like to receive the report." })
|
|
@@ -6893,31 +6893,31 @@ function ui({
|
|
|
6893
6893
|
withSpecification: !1
|
|
6894
6894
|
}, {
|
|
6895
6895
|
skip: !!n || !o
|
|
6896
|
-
}), [S] = Uo(),
|
|
6896
|
+
}), [S] = Uo(), A = n ?? b?.Distribution?.Inventory;
|
|
6897
6897
|
K(() => {
|
|
6898
6898
|
d(!1);
|
|
6899
6899
|
}, [r]);
|
|
6900
6900
|
const { inventoryQuantity: k, totalIncomingQuantity: D } = ye(() => {
|
|
6901
|
-
if (!
|
|
6901
|
+
if (!A || A.length === 0)
|
|
6902
6902
|
return { inventoryQuantity: 0, totalIncomingQuantity: 0 };
|
|
6903
|
-
const
|
|
6904
|
-
return { inventoryQuantity:
|
|
6905
|
-
}, [
|
|
6903
|
+
const $ = A.reduce((z, _) => z + (_.AvailableQuantity || 0), 0), Q = A.reduce((z, _) => z + (_.PurchaseOrderQuantity || 0), 0);
|
|
6904
|
+
return { inventoryQuantity: $, totalIncomingQuantity: Q };
|
|
6905
|
+
}, [A]);
|
|
6906
6906
|
if (w || x || y || C)
|
|
6907
6907
|
return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ e(f, { className: v("h-10 w-36 rounded-md", i) }) });
|
|
6908
6908
|
const M = () => {
|
|
6909
6909
|
p || !N?.IsReseller || (g(!0), S({
|
|
6910
6910
|
routeResellerId: t ?? "",
|
|
6911
6911
|
randmarSku: r ?? ""
|
|
6912
|
-
}).then((
|
|
6913
|
-
|
|
6914
|
-
}).catch((
|
|
6915
|
-
console.error(
|
|
6912
|
+
}).then(($) => {
|
|
6913
|
+
$.error || $.data === !1 ? u({ title: "Warning", description: "Reorder is pending or requires manual approval. Contact the Randmar team for details.", variant: "warning" }) : u({ title: "Success", description: "Qualification successfully submitted.", variant: "success" }), m(!1);
|
|
6914
|
+
}).catch(($) => {
|
|
6915
|
+
console.error($), u({ title: "Error", description: "Error submitting your qualification.", variant: "destructive" });
|
|
6916
6916
|
}).finally(() => {
|
|
6917
6917
|
g(!1);
|
|
6918
6918
|
}));
|
|
6919
6919
|
};
|
|
6920
|
-
if (!
|
|
6920
|
+
if (!A)
|
|
6921
6921
|
return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ e(ke, { children: /* @__PURE__ */ a(we, { children: [
|
|
6922
6922
|
/* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ e("span", { tabIndex: 0, children: /* @__PURE__ */ a(E, { disabled: !0, size: s, variant: "outline", className: v("text-sm", i), children: [
|
|
6923
6923
|
/* @__PURE__ */ e(Zt, { size: "16", className: "mr-2" }),
|
|
@@ -6926,7 +6926,7 @@ function ui({
|
|
|
6926
6926
|
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e("p", { children: "No inventory data could be found for this product." }) })
|
|
6927
6927
|
] }) }) });
|
|
6928
6928
|
if (N?.IsReseller && k <= 0 && D <= 0)
|
|
6929
|
-
return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ a(
|
|
6929
|
+
return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ a($e, { open: c, onOpenChange: m, children: [
|
|
6930
6930
|
/* @__PURE__ */ e(xa, { asChild: !0, children: /* @__PURE__ */ a(E, { variant: "outline", size: s, className: v("text-sm text-primary", i), children: [
|
|
6931
6931
|
/* @__PURE__ */ e(Zt, { size: "16", className: "mr-2" }),
|
|
6932
6932
|
"Request to stock"
|
|
@@ -6944,7 +6944,7 @@ function ui({
|
|
|
6944
6944
|
] })
|
|
6945
6945
|
] }) });
|
|
6946
6946
|
const I = k <= 0 && D > 0;
|
|
6947
|
-
return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ a(
|
|
6947
|
+
return /* @__PURE__ */ e("div", { ref: l, children: /* @__PURE__ */ a($e, { open: h, onOpenChange: d, children: [
|
|
6948
6948
|
/* @__PURE__ */ e(xa, { asChild: !0, children: /* @__PURE__ */ a(
|
|
6949
6949
|
E,
|
|
6950
6950
|
{
|
|
@@ -6972,7 +6972,7 @@ function ui({
|
|
|
6972
6972
|
/* @__PURE__ */ e(Zt, { className: "mr-2", size: 18 }),
|
|
6973
6973
|
"Inventory Information"
|
|
6974
6974
|
] }) }),
|
|
6975
|
-
/* @__PURE__ */ e(Ts, { inventory:
|
|
6975
|
+
/* @__PURE__ */ e(Ts, { inventory: A })
|
|
6976
6976
|
] })
|
|
6977
6977
|
] }) });
|
|
6978
6978
|
}
|
|
@@ -7163,12 +7163,12 @@ function rm({
|
|
|
7163
7163
|
// This should ideally make Qualifications include full Manufacturer details
|
|
7164
7164
|
}, { skip: !t || !m }), [w, x] = T({
|
|
7165
7165
|
publicInfo: { hasUnsavedChanges: !1 }
|
|
7166
|
-
}), b = ae(() => n ? !1 : w.publicInfo.hasUnsavedChanges, [n, w]), y = ae((I,
|
|
7167
|
-
x((Q) => Q[I]?.hasUnsavedChanges !==
|
|
7166
|
+
}), b = ae(() => n ? !1 : w.publicInfo.hasUnsavedChanges, [n, w]), y = ae((I, $) => {
|
|
7167
|
+
x((Q) => Q[I]?.hasUnsavedChanges !== $.hasUnsavedChanges ? {
|
|
7168
7168
|
...Q,
|
|
7169
|
-
[I]:
|
|
7169
|
+
[I]: $
|
|
7170
7170
|
} : Q);
|
|
7171
|
-
}, []), { NavigationGuardDialog: C } = ii(b), S = p ?? r,
|
|
7171
|
+
}, []), { NavigationGuardDialog: C } = ii(b), S = p ?? r, A = g && !S, k = N && !S, D = !n || !!S?.Statement && (S.Statement.Total ?? 0) !== 0, L = S?.QualifiedManufacturers ?? [], M = S?.Qualifications ?? [];
|
|
7172
7172
|
return /* @__PURE__ */ a("div", { className: "@container", children: [
|
|
7173
7173
|
k ? /* @__PURE__ */ e(q, { className: "p-6", children: /* @__PURE__ */ a(Tt, { variant: "destructive", children: [
|
|
7174
7174
|
/* @__PURE__ */ e(Nt, { className: "h-4 w-4" }),
|
|
@@ -7180,7 +7180,7 @@ function rm({
|
|
|
7180
7180
|
{
|
|
7181
7181
|
fiscalYearMonthStart: S?.FiscalYearMonthStart || 1,
|
|
7182
7182
|
salesData: S?.SalesData,
|
|
7183
|
-
isLoading:
|
|
7183
|
+
isLoading: A
|
|
7184
7184
|
}
|
|
7185
7185
|
),
|
|
7186
7186
|
/* @__PURE__ */ a("div", { className: "grid @lg:grid-cols-2 gap-6", children: [
|
|
@@ -7188,17 +7188,17 @@ function rm({
|
|
|
7188
7188
|
on,
|
|
7189
7189
|
{
|
|
7190
7190
|
statistics: S?.SalesStatistics ?? [],
|
|
7191
|
-
loading:
|
|
7191
|
+
loading: A
|
|
7192
7192
|
}
|
|
7193
7193
|
),
|
|
7194
|
-
/* @__PURE__ */ e(tm, { openOrders: S?.ActiveOrderDetails ?? [], isLoading:
|
|
7194
|
+
/* @__PURE__ */ e(tm, { openOrders: S?.ActiveOrderDetails ?? [], isLoading: A }),
|
|
7195
7195
|
D && /* @__PURE__ */ e(
|
|
7196
7196
|
Ku,
|
|
7197
7197
|
{
|
|
7198
7198
|
appID: t,
|
|
7199
7199
|
reseller: S || {},
|
|
7200
7200
|
withoutReports: l,
|
|
7201
|
-
isLoading:
|
|
7201
|
+
isLoading: A,
|
|
7202
7202
|
userEmail: s,
|
|
7203
7203
|
isSuperAdmin: i
|
|
7204
7204
|
}
|
|
@@ -7208,7 +7208,7 @@ function rm({
|
|
|
7208
7208
|
{
|
|
7209
7209
|
reseller: S || {},
|
|
7210
7210
|
appID: t ?? "",
|
|
7211
|
-
isLoading:
|
|
7211
|
+
isLoading: A,
|
|
7212
7212
|
readonly: n,
|
|
7213
7213
|
onUnsavedChanges: (I) => y("publicInfo", { hasUnsavedChanges: I })
|
|
7214
7214
|
}
|
|
@@ -7220,12 +7220,12 @@ function rm({
|
|
|
7220
7220
|
readonly: n,
|
|
7221
7221
|
reseller: S || {},
|
|
7222
7222
|
appID: t ?? "",
|
|
7223
|
-
isLoading:
|
|
7223
|
+
isLoading: A
|
|
7224
7224
|
}
|
|
7225
7225
|
),
|
|
7226
|
-
|
|
7226
|
+
A || L.length > 0 ? /* @__PURE__ */ a(q, { className: "w-full", children: [
|
|
7227
7227
|
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(fe, { children: "Manufacturers you are qualified for" }) }),
|
|
7228
|
-
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "grid @lg:grid-cols-2 gap-4", children:
|
|
7228
|
+
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("div", { className: "grid @lg:grid-cols-2 gap-4", children: A ? Array.from({ length: 2 }).map((I, $) => /* @__PURE__ */ e(va, { loading: !0 }, $)) : L.map((I) => /* @__PURE__ */ e(
|
|
7229
7229
|
va,
|
|
7230
7230
|
{
|
|
7231
7231
|
manufacturer: I,
|
|
@@ -7245,7 +7245,7 @@ function rm({
|
|
|
7245
7245
|
{
|
|
7246
7246
|
applicationId: t,
|
|
7247
7247
|
opportunities: S?.Opportunities,
|
|
7248
|
-
loading:
|
|
7248
|
+
loading: A
|
|
7249
7249
|
}
|
|
7250
7250
|
),
|
|
7251
7251
|
(S?.ActiveOrderDetails?.length ?? 0) > 0 && /* @__PURE__ */ e(
|
|
@@ -7254,7 +7254,7 @@ function rm({
|
|
|
7254
7254
|
applicationId: t,
|
|
7255
7255
|
title: "Active Orders",
|
|
7256
7256
|
orders: S?.ActiveOrderDetails,
|
|
7257
|
-
loading:
|
|
7257
|
+
loading: A
|
|
7258
7258
|
}
|
|
7259
7259
|
),
|
|
7260
7260
|
(S?.CompletedOrderDetails?.length ?? 0) > 0 && /* @__PURE__ */ e(
|
|
@@ -7263,7 +7263,7 @@ function rm({
|
|
|
7263
7263
|
applicationId: t,
|
|
7264
7264
|
title: "Completed Orders",
|
|
7265
7265
|
orders: S?.CompletedOrderDetails,
|
|
7266
|
-
loading:
|
|
7266
|
+
loading: A
|
|
7267
7267
|
}
|
|
7268
7268
|
),
|
|
7269
7269
|
(S?.Returns?.length ?? 0) > 0 && /* @__PURE__ */ e(
|
|
@@ -7271,7 +7271,7 @@ function rm({
|
|
|
7271
7271
|
{
|
|
7272
7272
|
applicationId: t,
|
|
7273
7273
|
returns: S?.Returns,
|
|
7274
|
-
loading:
|
|
7274
|
+
loading: A
|
|
7275
7275
|
}
|
|
7276
7276
|
),
|
|
7277
7277
|
!l && /* @__PURE__ */ e(
|
|
@@ -7279,7 +7279,7 @@ function rm({
|
|
|
7279
7279
|
{
|
|
7280
7280
|
appID: t,
|
|
7281
7281
|
userEmail: s,
|
|
7282
|
-
isLoading:
|
|
7282
|
+
isLoading: A
|
|
7283
7283
|
}
|
|
7284
7284
|
)
|
|
7285
7285
|
] }),
|
|
@@ -7302,7 +7302,7 @@ const nm = sa(
|
|
|
7302
7302
|
variant: "default"
|
|
7303
7303
|
}
|
|
7304
7304
|
}
|
|
7305
|
-
), Tt =
|
|
7305
|
+
), Tt = P.forwardRef(({ className: t, variant: r, ...n }, s) => /* @__PURE__ */ e(
|
|
7306
7306
|
"div",
|
|
7307
7307
|
{
|
|
7308
7308
|
ref: s,
|
|
@@ -7312,7 +7312,7 @@ const nm = sa(
|
|
|
7312
7312
|
}
|
|
7313
7313
|
));
|
|
7314
7314
|
Tt.displayName = "Alert";
|
|
7315
|
-
const Ot =
|
|
7315
|
+
const Ot = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
7316
7316
|
"h5",
|
|
7317
7317
|
{
|
|
7318
7318
|
ref: n,
|
|
@@ -7321,7 +7321,7 @@ const Ot = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
7321
7321
|
}
|
|
7322
7322
|
));
|
|
7323
7323
|
Ot.displayName = "AlertTitle";
|
|
7324
|
-
const Et =
|
|
7324
|
+
const Et = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
7325
7325
|
"div",
|
|
7326
7326
|
{
|
|
7327
7327
|
ref: n,
|
|
@@ -7382,7 +7382,7 @@ function Qt({
|
|
|
7382
7382
|
] })
|
|
7383
7383
|
] })
|
|
7384
7384
|
] }) : /* @__PURE__ */ a("div", { className: "@container space-y-4", children: [
|
|
7385
|
-
/* @__PURE__ */ a(
|
|
7385
|
+
/* @__PURE__ */ a(Pt, { className: `rounded-md border ${s ?? ""}`, children: [
|
|
7386
7386
|
/* @__PURE__ */ a(zr, { children: [
|
|
7387
7387
|
/* @__PURE__ */ e(Vr, { children: N.getHeaderGroups().map((x) => /* @__PURE__ */ e(Jt, { children: x.headers.map((b) => /* @__PURE__ */ e(_r, { children: b.isPlaceholder ? null : b.column.getCanSort() || b.column.getCanFilter() ? /* @__PURE__ */ a(
|
|
7388
7388
|
ur,
|
|
@@ -7392,7 +7392,7 @@ function Qt({
|
|
|
7392
7392
|
children: [
|
|
7393
7393
|
/* @__PURE__ */ e(mr, { asChild: !0, children: /* @__PURE__ */ a(E, { variant: "ghost", className: "pl-0", children: [
|
|
7394
7394
|
yr(b.column.columnDef.header, b.getContext()),
|
|
7395
|
-
b.column.getIsFiltered() ? /* @__PURE__ */ e(wl, { className: "ml-2 h-4 w-4" }) : b.column.getIsSorted() === "asc" ? /* @__PURE__ */ e(
|
|
7395
|
+
b.column.getIsFiltered() ? /* @__PURE__ */ e(wl, { className: "ml-2 h-4 w-4" }) : b.column.getIsSorted() === "asc" ? /* @__PURE__ */ e($n, { className: "ml-2 h-4 w-4" }) : b.column.getIsSorted() === "desc" ? /* @__PURE__ */ e(Bn, { className: "ml-2 h-4 w-4" }) : /* @__PURE__ */ e(Sl, { className: "ml-2 h-4 w-4" })
|
|
7396
7396
|
] }) }),
|
|
7397
7397
|
/* @__PURE__ */ e(Ma, { className: "w-56", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
7398
7398
|
b.column.getCanSort() && /* @__PURE__ */ a(U, { children: [
|
|
@@ -7403,7 +7403,7 @@ function Qt({
|
|
|
7403
7403
|
className: "w-full justify-start",
|
|
7404
7404
|
onClick: () => w(b.column, !1),
|
|
7405
7405
|
children: [
|
|
7406
|
-
/* @__PURE__ */ e(
|
|
7406
|
+
/* @__PURE__ */ e($n, { className: "mr-2 h-4 w-4" }),
|
|
7407
7407
|
"Sort Ascending"
|
|
7408
7408
|
]
|
|
7409
7409
|
}
|
|
@@ -7734,7 +7734,7 @@ function im({
|
|
|
7734
7734
|
] })
|
|
7735
7735
|
] });
|
|
7736
7736
|
}
|
|
7737
|
-
const zr =
|
|
7737
|
+
const zr = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ e(
|
|
7738
7738
|
"table",
|
|
7739
7739
|
{
|
|
7740
7740
|
ref: n,
|
|
@@ -7743,9 +7743,9 @@ const zr = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("div",
|
|
|
7743
7743
|
}
|
|
7744
7744
|
) }));
|
|
7745
7745
|
zr.displayName = "Table";
|
|
7746
|
-
const Vr =
|
|
7746
|
+
const Vr = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e("thead", { ref: n, className: v("[&_tr]:border-b", t), ...r }));
|
|
7747
7747
|
Vr.displayName = "TableHeader";
|
|
7748
|
-
const Ur =
|
|
7748
|
+
const Ur = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
7749
7749
|
"tbody",
|
|
7750
7750
|
{
|
|
7751
7751
|
ref: n,
|
|
@@ -7754,7 +7754,7 @@ const Ur = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
7754
7754
|
}
|
|
7755
7755
|
));
|
|
7756
7756
|
Ur.displayName = "TableBody";
|
|
7757
|
-
const lm =
|
|
7757
|
+
const lm = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
7758
7758
|
"tfoot",
|
|
7759
7759
|
{
|
|
7760
7760
|
ref: n,
|
|
@@ -7766,7 +7766,7 @@ const lm = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
7766
7766
|
}
|
|
7767
7767
|
));
|
|
7768
7768
|
lm.displayName = "TableFooter";
|
|
7769
|
-
const Jt =
|
|
7769
|
+
const Jt = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
7770
7770
|
"tr",
|
|
7771
7771
|
{
|
|
7772
7772
|
ref: n,
|
|
@@ -7778,7 +7778,7 @@ const Jt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
7778
7778
|
}
|
|
7779
7779
|
));
|
|
7780
7780
|
Jt.displayName = "TableRow";
|
|
7781
|
-
const _r =
|
|
7781
|
+
const _r = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
7782
7782
|
"th",
|
|
7783
7783
|
{
|
|
7784
7784
|
ref: n,
|
|
@@ -7787,11 +7787,11 @@ const _r = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
7787
7787
|
t
|
|
7788
7788
|
),
|
|
7789
7789
|
...r,
|
|
7790
|
-
children:
|
|
7790
|
+
children: P.isValidElement(r.children) && r.children.type === "span" ? r.children : /* @__PURE__ */ e("span", { children: r.children })
|
|
7791
7791
|
}
|
|
7792
7792
|
));
|
|
7793
7793
|
_r.displayName = "TableHead";
|
|
7794
|
-
const Ha =
|
|
7794
|
+
const Ha = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
7795
7795
|
"td",
|
|
7796
7796
|
{
|
|
7797
7797
|
ref: n,
|
|
@@ -7800,11 +7800,11 @@ const Ha = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
7800
7800
|
t
|
|
7801
7801
|
),
|
|
7802
7802
|
...r,
|
|
7803
|
-
children:
|
|
7803
|
+
children: P.isValidElement(r.children) && r.children.type === "span" ? r.children : /* @__PURE__ */ e("span", { children: r.children })
|
|
7804
7804
|
}
|
|
7805
7805
|
));
|
|
7806
7806
|
Ha.displayName = "TableCell";
|
|
7807
|
-
const om =
|
|
7807
|
+
const om = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
7808
7808
|
"caption",
|
|
7809
7809
|
{
|
|
7810
7810
|
ref: n,
|
|
@@ -7815,7 +7815,7 @@ const om = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
7815
7815
|
om.displayName = "TableCaption";
|
|
7816
7816
|
const mi = "[--rm-shell-header-height:3.5rem]", cm = "h-[var(--rm-shell-header-height)]", dm = "pt-[var(--rm-shell-header-height)]", hi = er(
|
|
7817
7817
|
({ onSignOut: t, handleValidSearch: r, rightMenu: n, searchPlaceholder: s }, i) => {
|
|
7818
|
-
const [l, o] = T(""), u =
|
|
7818
|
+
const [l, o] = T(""), u = As(), { toast: h } = Ee();
|
|
7819
7819
|
K(() => {
|
|
7820
7820
|
const p = new URLSearchParams(u.search).get("q");
|
|
7821
7821
|
p && o(p);
|
|
@@ -7872,7 +7872,7 @@ const mi = "[--rm-shell-header-height:3.5rem]", cm = "h-[var(--rm-shell-header-h
|
|
|
7872
7872
|
className: "h-10 w-10 text-primary-foreground hover:bg-primary-foreground/15 hover:text-primary-foreground focus-visible:ring-primary-foreground focus-visible:ring-offset-primary",
|
|
7873
7873
|
onClick: t,
|
|
7874
7874
|
children: [
|
|
7875
|
-
/* @__PURE__ */ e(
|
|
7875
|
+
/* @__PURE__ */ e(Pl, { className: "h-4 w-4" }),
|
|
7876
7876
|
/* @__PURE__ */ e("span", { className: "sr-only", children: "Sign out" })
|
|
7877
7877
|
]
|
|
7878
7878
|
}
|
|
@@ -7980,8 +7980,8 @@ function um({ orders: t, loading: r = !1 }) {
|
|
|
7980
7980
|
] }, i.name)) })
|
|
7981
7981
|
] });
|
|
7982
7982
|
}
|
|
7983
|
-
const jt =
|
|
7984
|
-
|
|
7983
|
+
const jt = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
7984
|
+
$r.Root,
|
|
7985
7985
|
{
|
|
7986
7986
|
ref: n,
|
|
7987
7987
|
className: v(
|
|
@@ -7990,7 +7990,7 @@ const jt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
7990
7990
|
),
|
|
7991
7991
|
...r,
|
|
7992
7992
|
children: /* @__PURE__ */ e(
|
|
7993
|
-
|
|
7993
|
+
$r.Indicator,
|
|
7994
7994
|
{
|
|
7995
7995
|
className: v("flex items-center justify-center text-current"),
|
|
7996
7996
|
children: /* @__PURE__ */ e(ct, { className: "h-4 w-4" })
|
|
@@ -7998,7 +7998,7 @@ const jt = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
7998
7998
|
)
|
|
7999
7999
|
}
|
|
8000
8000
|
));
|
|
8001
|
-
jt.displayName =
|
|
8001
|
+
jt.displayName = $r.Root.displayName;
|
|
8002
8002
|
function mm({
|
|
8003
8003
|
items: t,
|
|
8004
8004
|
selectedIds: r,
|
|
@@ -8015,7 +8015,7 @@ function mm({
|
|
|
8015
8015
|
className: p,
|
|
8016
8016
|
...g
|
|
8017
8017
|
}) {
|
|
8018
|
-
const N =
|
|
8018
|
+
const N = P.useId(), w = P.useMemo(() => new Set(r), [r]), x = o === "grid" ? v("grid gap-3", u === 2 && "grid-cols-1 sm:grid-cols-2") : "space-y-3", b = P.useCallback((y) => {
|
|
8019
8019
|
if (s || i || y.disabled) return;
|
|
8020
8020
|
const C = w.has(y.id);
|
|
8021
8021
|
if (l === "single") {
|
|
@@ -8043,25 +8043,25 @@ function mm({
|
|
|
8043
8043
|
`loading-${C}`
|
|
8044
8044
|
))
|
|
8045
8045
|
] }) }) : t.length === 0 ? /* @__PURE__ */ e("div", { className: v(x, p), ...g, children: h ?? /* @__PURE__ */ e("div", { className: "rounded-xl border border-dashed border-border bg-muted/30 p-4 text-sm text-muted-foreground", children: "No options are available." }) }) : /* @__PURE__ */ e("div", { className: v(x, p), role: "group", "aria-disabled": s || void 0, ...g, children: t.map((y, C) => {
|
|
8046
|
-
const S = w.has(y.id),
|
|
8046
|
+
const S = w.has(y.id), A = s || y.disabled === !0, k = `${N}-${C}-label`, D = `${N}-${C}-description`;
|
|
8047
8047
|
return /* @__PURE__ */ a(
|
|
8048
8048
|
"button",
|
|
8049
8049
|
{
|
|
8050
8050
|
type: "button",
|
|
8051
8051
|
role: "checkbox",
|
|
8052
8052
|
"aria-checked": S,
|
|
8053
|
-
"aria-disabled":
|
|
8053
|
+
"aria-disabled": A,
|
|
8054
8054
|
"aria-label": c?.(y) ?? y.label,
|
|
8055
8055
|
"aria-labelledby": m ? void 0 : k,
|
|
8056
8056
|
"aria-describedby": !m && y.description ? D : void 0,
|
|
8057
|
-
disabled:
|
|
8057
|
+
disabled: A,
|
|
8058
8058
|
onClick: () => b(y),
|
|
8059
8059
|
className: v(
|
|
8060
8060
|
"flex w-full items-start gap-3 rounded-xl border bg-card p-4 text-left shadow-sm transition-colors transition-shadow",
|
|
8061
8061
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
8062
8062
|
"hover:bg-muted/30 hover:shadow",
|
|
8063
8063
|
S ? "border-primary bg-primary/5 ring-2 ring-primary/20" : "border-border",
|
|
8064
|
-
|
|
8064
|
+
A && "cursor-not-allowed opacity-60 hover:bg-card hover:shadow-sm"
|
|
8065
8065
|
),
|
|
8066
8066
|
children: [
|
|
8067
8067
|
/* @__PURE__ */ e(
|
|
@@ -8077,7 +8077,7 @@ function mm({
|
|
|
8077
8077
|
),
|
|
8078
8078
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: m ? /* @__PURE__ */ a(U, { children: [
|
|
8079
8079
|
/* @__PURE__ */ e("span", { className: "sr-only", children: y.label }),
|
|
8080
|
-
m(y, { checked: S, disabled:
|
|
8080
|
+
m(y, { checked: S, disabled: A, index: C })
|
|
8081
8081
|
] }) : /* @__PURE__ */ a(U, { children: [
|
|
8082
8082
|
(y.prefix || y.emphasis) && /* @__PURE__ */ a("div", { className: "flex flex-wrap items-baseline gap-1 text-xs", children: [
|
|
8083
8083
|
y.prefix && /* @__PURE__ */ e("span", { className: "font-semibold uppercase tracking-wide text-muted-foreground", children: y.prefix }),
|
|
@@ -8092,7 +8092,7 @@ function mm({
|
|
|
8092
8092
|
);
|
|
8093
8093
|
}) });
|
|
8094
8094
|
}
|
|
8095
|
-
const dn =
|
|
8095
|
+
const dn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
8096
8096
|
it,
|
|
8097
8097
|
{
|
|
8098
8098
|
ref: n,
|
|
@@ -8104,7 +8104,7 @@ const dn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
8104
8104
|
}
|
|
8105
8105
|
));
|
|
8106
8106
|
dn.displayName = it.displayName;
|
|
8107
|
-
const Of = ({ children: t, ...r }) => /* @__PURE__ */ e(
|
|
8107
|
+
const Of = ({ children: t, ...r }) => /* @__PURE__ */ e($e, { ...r, children: /* @__PURE__ */ e(Be, { className: "overflow-hidden p-0", children: /* @__PURE__ */ e(dn, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: t }) }) }), fi = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ a("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
8108
8108
|
/* @__PURE__ */ e(Zr, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
8109
8109
|
/* @__PURE__ */ e(
|
|
8110
8110
|
it.Input,
|
|
@@ -8119,7 +8119,7 @@ const Of = ({ children: t, ...r }) => /* @__PURE__ */ e(Fe, { ...r, children: /*
|
|
|
8119
8119
|
)
|
|
8120
8120
|
] }));
|
|
8121
8121
|
fi.displayName = it.Input.displayName;
|
|
8122
|
-
const pi =
|
|
8122
|
+
const pi = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
8123
8123
|
it.List,
|
|
8124
8124
|
{
|
|
8125
8125
|
ref: n,
|
|
@@ -8128,7 +8128,7 @@ const pi = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
8128
8128
|
}
|
|
8129
8129
|
));
|
|
8130
8130
|
pi.displayName = it.List.displayName;
|
|
8131
|
-
const gi =
|
|
8131
|
+
const gi = P.forwardRef((t, r) => /* @__PURE__ */ e(
|
|
8132
8132
|
it.Empty,
|
|
8133
8133
|
{
|
|
8134
8134
|
ref: r,
|
|
@@ -8137,7 +8137,7 @@ const gi = A.forwardRef((t, r) => /* @__PURE__ */ e(
|
|
|
8137
8137
|
}
|
|
8138
8138
|
));
|
|
8139
8139
|
gi.displayName = it.Empty.displayName;
|
|
8140
|
-
const bi =
|
|
8140
|
+
const bi = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
8141
8141
|
it.Group,
|
|
8142
8142
|
{
|
|
8143
8143
|
ref: n,
|
|
@@ -8149,7 +8149,7 @@ const bi = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
8149
8149
|
}
|
|
8150
8150
|
));
|
|
8151
8151
|
bi.displayName = it.Group.displayName;
|
|
8152
|
-
const hm =
|
|
8152
|
+
const hm = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
8153
8153
|
it.Separator,
|
|
8154
8154
|
{
|
|
8155
8155
|
ref: n,
|
|
@@ -8158,7 +8158,7 @@ const hm = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
8158
8158
|
}
|
|
8159
8159
|
));
|
|
8160
8160
|
hm.displayName = it.Separator.displayName;
|
|
8161
|
-
const jr =
|
|
8161
|
+
const jr = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
8162
8162
|
it.Item,
|
|
8163
8163
|
{
|
|
8164
8164
|
ref: n,
|
|
@@ -8210,13 +8210,13 @@ function Ef({ document: t, loading: r = !1 }) {
|
|
|
8210
8210
|
] });
|
|
8211
8211
|
}
|
|
8212
8212
|
function gm({ path: t, origin: r, ...n }) {
|
|
8213
|
-
const s = dr(), i =
|
|
8213
|
+
const s = dr(), i = P.useMemo(() => At(t, r ?? s), [s, r, t]);
|
|
8214
8214
|
return /* @__PURE__ */ e("img", { ...n, src: i });
|
|
8215
8215
|
}
|
|
8216
8216
|
var qr = /* @__PURE__ */ ((t) => (t.STRING = "string", t.NUMBER = "number", t.BOOLEAN = "boolean", t.OBJECT = "object", t))(qr || {});
|
|
8217
8217
|
const _a = "TheRequestBody", bm = "Request body content";
|
|
8218
8218
|
function ym(t) {
|
|
8219
|
-
return
|
|
8219
|
+
return Pc(t).substring(0, 16);
|
|
8220
8220
|
}
|
|
8221
8221
|
function xm(t) {
|
|
8222
8222
|
const r = /* @__PURE__ */ new Map();
|
|
@@ -8253,7 +8253,7 @@ function wm(t) {
|
|
|
8253
8253
|
return Object.values(t.content).find((s) => s?.schema)?.schema;
|
|
8254
8254
|
}
|
|
8255
8255
|
async function Sm(t) {
|
|
8256
|
-
const r = t?.swaggerJsonUrl ?? Ya, n = Ja(r) ?? Ja(Ya), s =
|
|
8256
|
+
const r = t?.swaggerJsonUrl ?? Ya, n = Ja(r) ?? Ja(Ya), s = At(r, n);
|
|
8257
8257
|
try {
|
|
8258
8258
|
const i = await fetch(s);
|
|
8259
8259
|
if (!i.ok)
|
|
@@ -8269,9 +8269,9 @@ async function Sm(t) {
|
|
|
8269
8269
|
p.length > 0 && p[0].toLowerCase() === "v4" ? g = p.length > 1 ? p[1] : "api" : g = p.length > 0 ? p[0] : "api", g = g.replace(/[{}]/g, "");
|
|
8270
8270
|
const N = ym(u), w = `${c}-${g.toLowerCase()}-${N}`, x = {}, b = [];
|
|
8271
8271
|
m.parameters?.forEach((M) => {
|
|
8272
|
-
const I = M.schema?.type,
|
|
8272
|
+
const I = M.schema?.type, $ = I === "integer" || I === "number" ? "number" : I === "boolean" ? "boolean" : "string";
|
|
8273
8273
|
x[M.name] = {
|
|
8274
|
-
type:
|
|
8274
|
+
type: $,
|
|
8275
8275
|
description: M.description || `The ${M.name} parameter`
|
|
8276
8276
|
}, M.required && b.push(M.name);
|
|
8277
8277
|
});
|
|
@@ -8279,7 +8279,7 @@ async function Sm(t) {
|
|
|
8279
8279
|
if ((c === "post" || c === "put") && m.requestBody) {
|
|
8280
8280
|
const M = wm(m.requestBody), I = m.requestBody.description || bm;
|
|
8281
8281
|
if (M && Nm(M) && M.$ref.startsWith("#/components/schemas/")) {
|
|
8282
|
-
const
|
|
8282
|
+
const $ = M.$ref.substring(21), Q = l.components.schemas[$], z = vm(Q) ? Q.properties : void 0, _ = z ? JSON.stringify(z) : "Refer to API schema for details.";
|
|
8283
8283
|
x[_a] = {
|
|
8284
8284
|
type: "string",
|
|
8285
8285
|
description: `${I}. Must be a JSON string with these properties: ${_}`
|
|
@@ -8308,7 +8308,7 @@ ${m.description}` : m.summary || `${c.toUpperCase()} ${p[p.length - 1]}`,
|
|
|
8308
8308
|
const Qe = `{${Re}}`, We = M[Re];
|
|
8309
8309
|
We != null && (I = I.replace(Qe, encodeURIComponent(String(We))));
|
|
8310
8310
|
});
|
|
8311
|
-
const
|
|
8311
|
+
const $ = At(I, n), Q = localStorage.getItem("access_token"), z = {
|
|
8312
8312
|
method: c.toUpperCase(),
|
|
8313
8313
|
headers: {
|
|
8314
8314
|
Authorization: Q ? `Bearer ${Q}` : "",
|
|
@@ -8319,7 +8319,7 @@ ${m.description}` : m.summary || `${c.toUpperCase()} ${p[p.length - 1]}`,
|
|
|
8319
8319
|
const Qe = Re.name, Ue = M[Qe];
|
|
8320
8320
|
Ue != null && _.set(Re.name, String(Ue));
|
|
8321
8321
|
});
|
|
8322
|
-
const V = _.toString(), se = V ? `${
|
|
8322
|
+
const V = _.toString(), se = V ? `${$}${$.includes("?") ? "&" : "?"}${V}` : $;
|
|
8323
8323
|
if (c === "post" || c === "put") {
|
|
8324
8324
|
const Qe = M[_a];
|
|
8325
8325
|
Qe && (z.body = Qe);
|
|
@@ -8331,15 +8331,15 @@ ${m.description}` : m.summary || `${c.toUpperCase()} ${p[p.length - 1]}`,
|
|
|
8331
8331
|
}
|
|
8332
8332
|
const Ve = await me.text();
|
|
8333
8333
|
return Ve.length > 3e6 ? "response body dropped - it was too big to fix in the context window. Try a different function." : Ve;
|
|
8334
|
-
} catch (
|
|
8335
|
-
return console.error(`Error in ${w}:`,
|
|
8334
|
+
} catch ($) {
|
|
8335
|
+
return console.error(`Error in ${w}:`, $), `I'm sorry, I couldn't retrieve the requested information. Error: ${$ instanceof Error ? $.message : "Unknown error"}`;
|
|
8336
8336
|
}
|
|
8337
|
-
},
|
|
8337
|
+
}, A = m.tags?.[0] ?? "Partner", D = `${{
|
|
8338
8338
|
get: "Fetching",
|
|
8339
8339
|
put: "Inserting",
|
|
8340
8340
|
post: "Updating",
|
|
8341
8341
|
delete: "Deleting"
|
|
8342
|
-
}[c]} - ${
|
|
8342
|
+
}[c]} - ${A}.`, L = `${c} ${u}`;
|
|
8343
8343
|
o.push({
|
|
8344
8344
|
declaration: C,
|
|
8345
8345
|
handler: S,
|
|
@@ -8354,7 +8354,7 @@ ${m.description}` : m.summary || `${c.toUpperCase()} ${p[p.length - 1]}`,
|
|
|
8354
8354
|
}
|
|
8355
8355
|
}
|
|
8356
8356
|
function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
8357
|
-
const [s, i] = T(""), [l, o] = T([]), [u, h] = T([]), [d, c] = T([]), [m, p] = T(!1), [g, N] = T([]), [w, x] = T([]), [b, y] = T(0), C = ce(!1), S = ce(null),
|
|
8357
|
+
const [s, i] = T(""), [l, o] = T([]), [u, h] = T([]), [d, c] = T([]), [m, p] = T(!1), [g, N] = T([]), [w, x] = T([]), [b, y] = T(0), C = ce(!1), S = ce(null), A = ce(null), k = ce([]), D = ce([]), L = ce(/* @__PURE__ */ new Map()), [M] = ws(), [I] = Ns(), [$] = jo();
|
|
8358
8358
|
K(() => {
|
|
8359
8359
|
const H = async () => {
|
|
8360
8360
|
p(!0);
|
|
@@ -8423,9 +8423,9 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8423
8423
|
const te = J.Images ?? J.images;
|
|
8424
8424
|
if (!Array.isArray(te) || te.length === 0) return null;
|
|
8425
8425
|
const Ne = te.map((ze) => {
|
|
8426
|
-
const j = ze, ge = j?.MimeType ?? j?.mimeType,
|
|
8427
|
-
if (typeof ge != "string" || typeof
|
|
8428
|
-
const Ie = ge.trim(), _e =
|
|
8426
|
+
const j = ze, ge = j?.MimeType ?? j?.mimeType, Ae = j?.Base64Data ?? j?.base64Data;
|
|
8427
|
+
if (typeof ge != "string" || typeof Ae != "string") return null;
|
|
8428
|
+
const Ie = ge.trim(), _e = Ae.replace(/\s+/g, "");
|
|
8429
8429
|
return !Ie.startsWith("image/") || _e.length === 0 ? null : { mimeType: Ie, base64Data: _e };
|
|
8430
8430
|
}).filter((ze) => ze != null);
|
|
8431
8431
|
if (Ne.length === 0) return null;
|
|
@@ -8442,8 +8442,8 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8442
8442
|
}, se = async (H, Y) => {
|
|
8443
8443
|
if (C.current || !H || H.length === 0) return;
|
|
8444
8444
|
const J = /* @__PURE__ */ new Date(), te = `${J.getFullYear()}${String(J.getMonth() + 1).padStart(2, "0")}${String(J.getDate()).padStart(2, "0")}_${String(J.getHours()).padStart(2, "0")}${String(J.getMinutes()).padStart(2, "0")}${String(J.getSeconds()).padStart(2, "0")}`, Ne = await Promise.allSettled(
|
|
8445
|
-
H.map(async (
|
|
8446
|
-
const j = O(
|
|
8445
|
+
H.map(async (Pe, ze) => {
|
|
8446
|
+
const j = O(Pe.mimeType), ge = `generated_${te}_${ze + 1}.${j}`, Ae = V(Pe.base64Data), Ie = new File([Ae], ge, { type: Pe.mimeType }), _e = $({ applicationId: t, body: { file: Ie } });
|
|
8447
8447
|
k.current.push(_e);
|
|
8448
8448
|
try {
|
|
8449
8449
|
const at = await _e.unwrap();
|
|
@@ -8456,8 +8456,8 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8456
8456
|
})
|
|
8457
8457
|
);
|
|
8458
8458
|
if (C.current) return;
|
|
8459
|
-
const Me = Ne.map((
|
|
8460
|
-
Me.length > 0 && (h((
|
|
8459
|
+
const Me = Ne.map((Pe) => Pe.status === "fulfilled" ? Pe.value : null).filter((Pe) => typeof Pe == "string" && Pe.length > 0);
|
|
8460
|
+
Me.length > 0 && (h((Pe) => [...Pe, ["Generated image uploaded", Me.join(`
|
|
8461
8461
|
`)]]), n?.({ assistantMessageId: Y, urls: Me }));
|
|
8462
8462
|
}, me = async (H, Y) => {
|
|
8463
8463
|
if (C.current) {
|
|
@@ -8480,21 +8480,21 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8480
8480
|
i("");
|
|
8481
8481
|
return;
|
|
8482
8482
|
}
|
|
8483
|
-
const Ne = te.Content, Me = [...H, Ne],
|
|
8484
|
-
x(Me), y(
|
|
8483
|
+
const Ne = te.Content, Me = [...H, Ne], Pe = te.ContextUtilization ?? 0;
|
|
8484
|
+
x(Me), y(Pe);
|
|
8485
8485
|
const ze = Ne.Parts?.find((ge) => ge.Text)?.Text;
|
|
8486
8486
|
ze && Ue({ content: ze, timestamp: /* @__PURE__ */ new Date() });
|
|
8487
8487
|
const j = Ne.Parts?.map((ge) => ge.FunctionCall).filter(Boolean) ?? [];
|
|
8488
8488
|
if (j.length > 0) {
|
|
8489
8489
|
i("Using Randmar API...");
|
|
8490
8490
|
const ge = [];
|
|
8491
|
-
for (const
|
|
8491
|
+
for (const Ae of j) {
|
|
8492
8492
|
if (C.current) {
|
|
8493
8493
|
i("");
|
|
8494
8494
|
return;
|
|
8495
8495
|
}
|
|
8496
|
-
if (
|
|
8497
|
-
const Ie = await z({ name:
|
|
8496
|
+
if (Ae?.Name) {
|
|
8497
|
+
const Ie = await z({ name: Ae.Name, args: Ae.Args ?? {} });
|
|
8498
8498
|
if (C.current) {
|
|
8499
8499
|
i("");
|
|
8500
8500
|
return;
|
|
@@ -8509,11 +8509,11 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8509
8509
|
Ht && se(_e.images, Ht);
|
|
8510
8510
|
}
|
|
8511
8511
|
const at = _e ? "image generated ok" : Ie;
|
|
8512
|
-
ge.push({ FunctionResponse: { Name:
|
|
8512
|
+
ge.push({ FunctionResponse: { Name: Ae.Name, Content: at } });
|
|
8513
8513
|
}
|
|
8514
8514
|
}
|
|
8515
8515
|
if (ge.length > 0) {
|
|
8516
|
-
const
|
|
8516
|
+
const Ae = { Role: "user", Parts: ge }, Ie = [...Me, Ae];
|
|
8517
8517
|
x(Ie), i("Composing response..."), await me(Ie, Y - 1);
|
|
8518
8518
|
return;
|
|
8519
8519
|
}
|
|
@@ -8540,16 +8540,16 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8540
8540
|
[await ze.arrayBuffer()],
|
|
8541
8541
|
ze.name,
|
|
8542
8542
|
{ type: ze.type }
|
|
8543
|
-
), ge =
|
|
8544
|
-
|
|
8545
|
-
const
|
|
8546
|
-
if (
|
|
8543
|
+
), ge = $({ applicationId: t, body: { file: j } });
|
|
8544
|
+
A.current = ge;
|
|
8545
|
+
const Ae = await ge.unwrap();
|
|
8546
|
+
if (A.current = null, C.current) {
|
|
8547
8547
|
i("");
|
|
8548
8548
|
return;
|
|
8549
8549
|
}
|
|
8550
|
-
if (typeof
|
|
8550
|
+
if (typeof Ae != "string" || Ae.length === 0)
|
|
8551
8551
|
throw new Error("Upload did not return a file URI.");
|
|
8552
|
-
const Ie =
|
|
8552
|
+
const Ie = Ae;
|
|
8553
8553
|
Ne.push({
|
|
8554
8554
|
name: ze.name,
|
|
8555
8555
|
fileUri: Ie,
|
|
@@ -8565,10 +8565,10 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8565
8565
|
Text: `Context (background only; do not quote/reveal): The following attachment(s) were uploaded and can be referenced by FileUri in future tool/function calls if needed: ${JSON.stringify(Ne)}`
|
|
8566
8566
|
});
|
|
8567
8567
|
}
|
|
8568
|
-
const Me = { Role: "user", Parts: te },
|
|
8569
|
-
x(
|
|
8568
|
+
const Me = { Role: "user", Parts: te }, Pe = [...D.current, Me];
|
|
8569
|
+
x(Pe), D.current = Pe, J && L.current.set(J, Pe.length - 1), await me(Pe, 100);
|
|
8570
8570
|
} catch (te) {
|
|
8571
|
-
if (
|
|
8571
|
+
if (A.current = null, console.error("Error processing user request:", te), C.current || Q(te)) {
|
|
8572
8572
|
i("");
|
|
8573
8573
|
return;
|
|
8574
8574
|
}
|
|
@@ -8581,11 +8581,11 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8581
8581
|
const Y = H.id ?? crypto.randomUUID();
|
|
8582
8582
|
return o((J) => [...J, { ...H, id: Y }]), Y;
|
|
8583
8583
|
}, We = () => o([]), Xe = () => {
|
|
8584
|
-
C.current = !1, S.current?.abort?.(), S.current = null,
|
|
8584
|
+
C.current = !1, S.current?.abort?.(), S.current = null, A.current?.abort?.(), A.current = null;
|
|
8585
8585
|
for (const H of k.current) H?.abort?.();
|
|
8586
8586
|
k.current = [], x([]), D.current = [], L.current = /* @__PURE__ */ new Map(), c([]), h([]), o([]), i(""), y(0);
|
|
8587
8587
|
}, ie = () => {
|
|
8588
|
-
C.current = !0, c([]), S.current?.abort?.(), S.current = null,
|
|
8588
|
+
C.current = !0, c([]), S.current?.abort?.(), S.current = null, A.current?.abort?.(), A.current = null;
|
|
8589
8589
|
for (const H of k.current) H?.abort?.();
|
|
8590
8590
|
k.current = [], i("");
|
|
8591
8591
|
}, pe = async (H, Y) => {
|
|
@@ -8599,10 +8599,10 @@ function Cm({ userId: t, apiConfig: r, onGeneratedImageUploaded: n }) {
|
|
|
8599
8599
|
if (!te) return;
|
|
8600
8600
|
const Ne = { Role: "user", Parts: [{ Text: te }] }, Me = [...D.current.slice(0, J), Ne];
|
|
8601
8601
|
x(Me), D.current = Me, y(0), o([]);
|
|
8602
|
-
const
|
|
8603
|
-
for (const [ze, j] of
|
|
8604
|
-
j > J &&
|
|
8605
|
-
|
|
8602
|
+
const Pe = L.current;
|
|
8603
|
+
for (const [ze, j] of Pe.entries())
|
|
8604
|
+
j > J && Pe.delete(ze);
|
|
8605
|
+
Pe.set(H, Me.length - 1), await me(Me, 100);
|
|
8606
8606
|
};
|
|
8607
8607
|
return {
|
|
8608
8608
|
handleSubmitToBot: Qe,
|
|
@@ -8648,7 +8648,7 @@ const km = ({ debugMessages: t }) => {
|
|
|
8648
8648
|
};
|
|
8649
8649
|
const i = r.slice(0, s).trim() || "Portal", l = r.slice(s + n.length).trim() || "SOP";
|
|
8650
8650
|
return { portalName: i, sopName: l };
|
|
8651
|
-
}, Qr = (t) => t.trim().toLocaleLowerCase(),
|
|
8651
|
+
}, Qr = (t) => t.trim().toLocaleLowerCase(), Pm = (t) => {
|
|
8652
8652
|
const r = Qr(t);
|
|
8653
8653
|
return r.includes("partner") ? {
|
|
8654
8654
|
badgeClassName: "border-randmar-black/25 bg-randmar-black/10 text-randmar-black",
|
|
@@ -8663,7 +8663,7 @@ const km = ({ debugMessages: t }) => {
|
|
|
8663
8663
|
badgeClassName: "border-border bg-muted text-muted-foreground",
|
|
8664
8664
|
dotClassName: "bg-muted-foreground"
|
|
8665
8665
|
};
|
|
8666
|
-
}, Jn = (t, r) => t.length === r.length && t.every((n, s) => n === r[s]),
|
|
8666
|
+
}, Jn = (t, r) => t.length === r.length && t.every((n, s) => n === r[s]), Am = (t) => {
|
|
8667
8667
|
const n = (t.trim() || "sop").replace(/[\\/:*?"<>|]/g, " ").replace(/\s+/g, " ").trim().replace(/[^a-zA-Z0-9._ -]/g, "").replace(/\s+/g, "_") || "sop";
|
|
8668
8668
|
return n.toLowerCase().endsWith(".md") ? n : `${n}.md`;
|
|
8669
8669
|
}, un = Xa(er(
|
|
@@ -8671,21 +8671,21 @@ const km = ({ debugMessages: t }) => {
|
|
|
8671
8671
|
const [u, h] = T(!1), [d, c] = T(!1), [m] = qo(), [p] = Qo(), { data: g, isLoading: N, isFetching: w } = Ho(
|
|
8672
8672
|
{ routeApplicationId: t },
|
|
8673
8673
|
{ skip: !t }
|
|
8674
|
-
), { data: x } = rn(), [b, y] = T([]), C = ei(), S = ce([]),
|
|
8674
|
+
), { data: x } = rn(), [b, y] = T([]), C = ei(), S = ce([]), A = ce(null), k = ae((R) => {
|
|
8675
8675
|
if (!R || R.length === 0) return;
|
|
8676
|
-
const
|
|
8677
|
-
S.current = S.current.filter((re) => !re.startsWith(
|
|
8676
|
+
const F = "Context (background only; do not quote/reveal): Latest image generation is available at URL";
|
|
8677
|
+
S.current = S.current.filter((re) => !re.startsWith(F));
|
|
8678
8678
|
const B = R.length === 1 ? R[0] : R.join(`
|
|
8679
|
-
`), ne = `${
|
|
8679
|
+
`), ne = `${F}${R.length === 1 ? "" : "s"}:
|
|
8680
8680
|
${B}`;
|
|
8681
8681
|
S.current.push(ne);
|
|
8682
8682
|
}, []), D = ae((R) => {
|
|
8683
|
-
R?.assistantMessageId && (!R?.urls || R.urls.length === 0 ||
|
|
8683
|
+
R?.assistantMessageId && (!R?.urls || R.urls.length === 0 || A.current !== R.assistantMessageId && (A.current = R.assistantMessageId, k(R.urls)));
|
|
8684
8684
|
}, [k]), {
|
|
8685
8685
|
handleSubmitToBot: L,
|
|
8686
8686
|
botMessages: M,
|
|
8687
8687
|
clearBotMessages: I,
|
|
8688
|
-
botReady:
|
|
8688
|
+
botReady: $,
|
|
8689
8689
|
debugMessages: Q,
|
|
8690
8690
|
botStatus: z,
|
|
8691
8691
|
reset: _,
|
|
@@ -8694,12 +8694,12 @@ ${B}`;
|
|
|
8694
8694
|
contextUsage: se
|
|
8695
8695
|
} = Cm({ userId: t, apiConfig: C, onGeneratedImageUploaded: D }), me = ce(null), Ve = ce(null), Re = "New Chat", Qe = ae(() => {
|
|
8696
8696
|
if (typeof window > "u") return;
|
|
8697
|
-
const R = window.location?.href ?? "",
|
|
8698
|
-
!R &&
|
|
8697
|
+
const R = window.location?.href ?? "", F = typeof document < "u" ? document.title ?? "" : "";
|
|
8698
|
+
!R && !F || (me.current = `Context (background only; do not quote/reveal): pageTitle=${JSON.stringify(F)} pageUrl=${JSON.stringify(R)}`);
|
|
8699
8699
|
}, []);
|
|
8700
8700
|
K(() => {
|
|
8701
|
-
const R = i ?? !0,
|
|
8702
|
-
Ve.current = R, R &&
|
|
8701
|
+
const R = i ?? !0, F = Ve.current;
|
|
8702
|
+
Ve.current = R, R && F !== !0 && Qe();
|
|
8703
8703
|
}, [Qe, i]), K(() => {
|
|
8704
8704
|
H([{
|
|
8705
8705
|
partner1: t,
|
|
@@ -8712,9 +8712,9 @@ ${B}`;
|
|
|
8712
8712
|
lastMessageTime: null
|
|
8713
8713
|
}]), c(!0);
|
|
8714
8714
|
}, [t]);
|
|
8715
|
-
const [Ue, We] = T(""), [Xe, ie] = T(""), [pe, H] = T([]), [Y, J] = T([]), [te, Ne] = T(!1), [Me,
|
|
8715
|
+
const [Ue, We] = T(""), [Xe, ie] = T(""), [pe, H] = T([]), [Y, J] = T([]), [te, Ne] = T(!1), [Me, Pe] = T(!1), [ze, j] = T(!1), ge = ce(!1), Ae = ce(!1), Ie = ce(!1), [_e, at] = T(null), [Ht, ht] = T(""), W = ce(null), oe = ce(null), [ee, be] = T([]), [Fe, rt] = T([]), Oe = n || oe, Ye = ce(null), [nt, Lt] = T(null), [Wt, Ii] = T(!1), oa = ce(null), { toast: Ta } = Ee(), xn = ce(null), hr = ce(0), ca = ce(!1), da = ce(!1), Ct = ae((R) => (R?.messages ?? []).reduce((F, B) => F + (B.fromPartnerID === et ? 1 : 0), 0), []), Gt = ae((R) => {
|
|
8716
8716
|
hr.current = R, ca.current = !0, da.current = !1;
|
|
8717
|
-
}, []),
|
|
8717
|
+
}, []), Ft = ae(() => {
|
|
8718
8718
|
ca.current = !1, da.current = !1, O();
|
|
8719
8719
|
}, [O]);
|
|
8720
8720
|
K(() => {
|
|
@@ -8722,8 +8722,8 @@ ${B}`;
|
|
|
8722
8722
|
xn.current = z, !(!ca.current || R == null || !(R !== "") || !(z === "")) && (da.current = !0);
|
|
8723
8723
|
}, [z]), K(() => {
|
|
8724
8724
|
if (!ca.current || !da.current || z !== "") return;
|
|
8725
|
-
const R = pe.find((B) => B.partner1 === et || B.partner2 === et),
|
|
8726
|
-
|
|
8725
|
+
const R = pe.find((B) => B.partner1 === et || B.partner2 === et), F = Ct(R);
|
|
8726
|
+
F <= hr.current || (ca.current = !1, da.current = !1, hr.current = F, i === !1 && Ta({
|
|
8727
8727
|
title: "Randmar Assistant",
|
|
8728
8728
|
description: "Response ready. Open the Assistant to view.",
|
|
8729
8729
|
variant: "info",
|
|
@@ -8735,87 +8735,87 @@ ${B}`;
|
|
|
8735
8735
|
}, [z, pe, Ct, i, l, Ta]);
|
|
8736
8736
|
const ua = ae(() => pe.find((R) => !!R), [pe]), Je = ua(), bt = ye(
|
|
8737
8737
|
() => (g ?? []).map((R) => {
|
|
8738
|
-
const
|
|
8738
|
+
const F = R.Name ?? "", { portalName: B, sopName: ne } = Yn(F);
|
|
8739
8739
|
return {
|
|
8740
8740
|
id: R.Id ?? "",
|
|
8741
|
-
label:
|
|
8741
|
+
label: F,
|
|
8742
8742
|
portalName: B,
|
|
8743
8743
|
sopName: ne
|
|
8744
8744
|
};
|
|
8745
|
-
}).filter((R) => !!R.id).sort((R,
|
|
8745
|
+
}).filter((R) => !!R.id).sort((R, F) => R.label.localeCompare(F.label)),
|
|
8746
8746
|
[g]
|
|
8747
|
-
), yt = te || Me, fr = N || w && bt.length === 0, Nn = ((Je?.messages ?? []).length ?? 0) === 0,
|
|
8747
|
+
), yt = te || Me, fr = N || w && bt.length === 0, Nn = ((Je?.messages ?? []).length ?? 0) === 0, $t = ee.length, kt = $t > 0, Di = ae((R) => {
|
|
8748
8748
|
Ie.current = !0, J(R);
|
|
8749
8749
|
}, []);
|
|
8750
8750
|
K(() => {
|
|
8751
8751
|
J((R) => {
|
|
8752
|
-
const
|
|
8753
|
-
return Jn(R,
|
|
8752
|
+
const F = R.filter((B) => bt.some((ne) => ne.id === B));
|
|
8753
|
+
return Jn(R, F) ? R : F;
|
|
8754
8754
|
});
|
|
8755
8755
|
}, [bt]), K(() => {
|
|
8756
|
-
if (
|
|
8756
|
+
if (Ae.current) return;
|
|
8757
8757
|
if (Ie.current) {
|
|
8758
|
-
|
|
8758
|
+
Ae.current = !0;
|
|
8759
8759
|
return;
|
|
8760
8760
|
}
|
|
8761
8761
|
if (fr) return;
|
|
8762
8762
|
const R = Qr(x?.Role ?? "");
|
|
8763
8763
|
if (!R) {
|
|
8764
|
-
|
|
8764
|
+
Ae.current = !0;
|
|
8765
8765
|
return;
|
|
8766
8766
|
}
|
|
8767
|
-
const
|
|
8768
|
-
J((B) => Jn(B,
|
|
8767
|
+
const F = bt.filter((B) => Qr(B.sopName) === R).map((B) => B.id);
|
|
8768
|
+
J((B) => Jn(B, F) ? B : F), Ae.current = !0;
|
|
8769
8769
|
}, [x?.Role, fr, bt]);
|
|
8770
8770
|
const vn = ae((R) => !R || typeof R != "object" || !("status" in R) || R.status !== "PARSING_ERROR" || !("originalStatus" in R) || R.originalStatus !== 200 ? null : R.data ?? null, []), Oa = ae(async (R) => {
|
|
8771
8771
|
if (!t || !R) throw new Error("Missing user or SOP id.");
|
|
8772
8772
|
try {
|
|
8773
8773
|
return await p({ routeApplicationId: t, id: R }, !1).unwrap();
|
|
8774
|
-
} catch (
|
|
8775
|
-
const B = vn(
|
|
8774
|
+
} catch (F) {
|
|
8775
|
+
const B = vn(F);
|
|
8776
8776
|
if (B != null) return B;
|
|
8777
|
-
throw
|
|
8777
|
+
throw F;
|
|
8778
8778
|
}
|
|
8779
8779
|
}, [p, vn, t]), Kt = ae(() => {
|
|
8780
8780
|
Oe.current?.focus();
|
|
8781
8781
|
}, [Oe]), wn = ce(0);
|
|
8782
8782
|
K(() => {
|
|
8783
|
-
const R = wn.current,
|
|
8784
|
-
wn.current =
|
|
8783
|
+
const R = wn.current, F = ee.length;
|
|
8784
|
+
wn.current = F, !(F === 0 || F <= R) && Kt();
|
|
8785
8785
|
}, [Kt, ee.length]), K(() => () => {
|
|
8786
8786
|
oa.current && clearTimeout(oa.current);
|
|
8787
8787
|
}, []);
|
|
8788
|
-
const Yt = ae((R,
|
|
8789
|
-
oa.current && clearTimeout(oa.current), Lt(R),
|
|
8788
|
+
const Yt = ae((R, F = 5e3) => {
|
|
8789
|
+
oa.current && clearTimeout(oa.current), Lt(R), F != null && (oa.current = setTimeout(() => Lt(null), F));
|
|
8790
8790
|
}, []);
|
|
8791
8791
|
K(() => {
|
|
8792
|
-
const R = pe.find((B) => B.partner1 === et || B.partner2 === et),
|
|
8793
|
-
rt((B) => B.filter((ne) =>
|
|
8792
|
+
const R = pe.find((B) => B.partner1 === et || B.partner2 === et), F = new Set((R?.messages ?? []).map((B) => B.id));
|
|
8793
|
+
rt((B) => B.filter((ne) => F.has(ne.messageId)));
|
|
8794
8794
|
}, [pe]), K(() => {
|
|
8795
8795
|
if (M.length === 0) return;
|
|
8796
8796
|
const R = [];
|
|
8797
|
-
for (const
|
|
8798
|
-
|
|
8799
|
-
id:
|
|
8797
|
+
for (const F of M)
|
|
8798
|
+
!F || F.isComponent || typeof F.content == "string" && R.push({
|
|
8799
|
+
id: F.id,
|
|
8800
8800
|
fromPartnerID: et,
|
|
8801
8801
|
toPartnerID: t,
|
|
8802
8802
|
senderName: "Assistant",
|
|
8803
|
-
timestamp:
|
|
8804
|
-
content:
|
|
8805
|
-
images:
|
|
8803
|
+
timestamp: F.timestamp.getTime(),
|
|
8804
|
+
content: F.content,
|
|
8805
|
+
images: F.images
|
|
8806
8806
|
});
|
|
8807
|
-
R.length > 0 && y((
|
|
8807
|
+
R.length > 0 && y((F) => [...F, ...R]), I();
|
|
8808
8808
|
}, [M, I, t]);
|
|
8809
8809
|
const Sn = ae((R) => {
|
|
8810
|
-
y((
|
|
8810
|
+
y((F) => [...F, R]);
|
|
8811
8811
|
}, []);
|
|
8812
8812
|
K(() => {
|
|
8813
|
-
b.length != 0 && (H((R) => R.map((
|
|
8814
|
-
const B =
|
|
8813
|
+
b.length != 0 && (H((R) => R.map((F) => {
|
|
8814
|
+
const B = F.messages ?? [];
|
|
8815
8815
|
if (B.length === 0)
|
|
8816
|
-
return {
|
|
8816
|
+
return { ...F, messages: [...b] };
|
|
8817
8817
|
const ne = new Set(B.map((de) => de.id)), re = b.filter((de) => !ne.has(de.id));
|
|
8818
|
-
return re.length === 0 ?
|
|
8818
|
+
return re.length === 0 ? F : { ...F, messages: [...B, ...re] };
|
|
8819
8819
|
})), requestAnimationFrame(() => W.current?.scrollIntoView({ behavior: "smooth" })), y([]));
|
|
8820
8820
|
}, [b]);
|
|
8821
8821
|
const Cn = ae(async () => {
|
|
@@ -8824,7 +8824,7 @@ ${B}`;
|
|
|
8824
8824
|
sopFilesForMessage: [],
|
|
8825
8825
|
sopHiddenNotes: []
|
|
8826
8826
|
};
|
|
8827
|
-
const R = Y.map((
|
|
8827
|
+
const R = Y.map((F) => bt.find((B) => B.id === F)).filter((F) => F != null);
|
|
8828
8828
|
if (R.length === 0)
|
|
8829
8829
|
return {
|
|
8830
8830
|
sopFilesForMessage: [],
|
|
@@ -8832,14 +8832,14 @@ ${B}`;
|
|
|
8832
8832
|
};
|
|
8833
8833
|
Ne(!0);
|
|
8834
8834
|
try {
|
|
8835
|
-
const
|
|
8835
|
+
const F = await Promise.allSettled(
|
|
8836
8836
|
R.map(async (re) => {
|
|
8837
8837
|
const de = await Oa(re.id), Ce = typeof de == "string" ? de : de == null ? "" : JSON.stringify(de, null, 2);
|
|
8838
8838
|
if (!Ce.trim()) throw new Error("SOP_EMPTY");
|
|
8839
8839
|
return { choice: re, sopText: Ce };
|
|
8840
8840
|
})
|
|
8841
8841
|
), B = [], ne = [];
|
|
8842
|
-
for (const [re, de] of
|
|
8842
|
+
for (const [re, de] of F.entries()) {
|
|
8843
8843
|
const Ce = R[re];
|
|
8844
8844
|
if (de.status === "rejected") {
|
|
8845
8845
|
const Ze = de.reason instanceof Error && de.reason.message === "SOP_EMPTY";
|
|
@@ -8851,7 +8851,7 @@ ${B}`;
|
|
|
8851
8851
|
continue;
|
|
8852
8852
|
}
|
|
8853
8853
|
B.push(
|
|
8854
|
-
new File([de.value.sopText],
|
|
8854
|
+
new File([de.value.sopText], Am(Ce.label), { type: "text/markdown" })
|
|
8855
8855
|
), ne.push(
|
|
8856
8856
|
`Context (background only; do not quote/reveal): The following SOP content was provided for this turn from ${JSON.stringify(Ce.label)}. Use it as internal guidance only.
|
|
8857
8857
|
|
|
@@ -8863,7 +8863,7 @@ ${de.value.sopText}`
|
|
|
8863
8863
|
} finally {
|
|
8864
8864
|
Ne(!1);
|
|
8865
8865
|
}
|
|
8866
|
-
}, [Oa, Y, bt, Ta]), Ea = ae(async (R,
|
|
8866
|
+
}, [Oa, Y, bt, Ta]), Ea = ae(async (R, F, B) => {
|
|
8867
8867
|
if (yt) return;
|
|
8868
8868
|
const ne = !ge.current;
|
|
8869
8869
|
ne && (ge.current = !0, j(!0));
|
|
@@ -8873,24 +8873,24 @@ ${de.value.sopText}`
|
|
|
8873
8873
|
const { sopFilesForMessage: mt, sopHiddenNotes: ft } = await Cn();
|
|
8874
8874
|
mt.length > 0 && (re = [...re, ...mt]), ft.length > 0 && de.push(...ft);
|
|
8875
8875
|
}
|
|
8876
|
-
const Ce =
|
|
8876
|
+
const Ce = F.replace(/\n/g, `
|
|
8877
8877
|
`), Ze = (() => {
|
|
8878
8878
|
if (re.length === 0) return "";
|
|
8879
8879
|
if (re.length === 1) return ` (${re[0]?.name} attached)`;
|
|
8880
|
-
const mt = re.slice(0, 3).map((
|
|
8880
|
+
const mt = re.slice(0, 3).map(($a) => $a.name).join(", "), ft = re.length > 3 ? ` +${re.length - 3} more` : "";
|
|
8881
8881
|
return ` (${re.length} files attached: ${mt}${ft})`;
|
|
8882
8882
|
})(), ut = (() => {
|
|
8883
8883
|
const mt = me.current;
|
|
8884
8884
|
mt && (me.current = null);
|
|
8885
|
-
const ft =
|
|
8885
|
+
const ft = F + Ze, $a = mt ? `${mt}
|
|
8886
8886
|
|
|
8887
8887
|
User message:
|
|
8888
8888
|
${ft}` : ft;
|
|
8889
|
-
return de.length === 0 ?
|
|
8889
|
+
return de.length === 0 ? $a : `${de.join(`
|
|
8890
8890
|
|
|
8891
8891
|
`)}
|
|
8892
8892
|
|
|
8893
|
-
${
|
|
8893
|
+
${$a}`;
|
|
8894
8894
|
})(), ma = {
|
|
8895
8895
|
id: crypto.randomUUID(),
|
|
8896
8896
|
senderName: r,
|
|
@@ -8913,8 +8913,8 @@ ${Fa}`;
|
|
|
8913
8913
|
Gt,
|
|
8914
8914
|
t,
|
|
8915
8915
|
r
|
|
8916
|
-
]), [pr, gr] = T(null), kn = ae((R,
|
|
8917
|
-
const ne = R?.trim() ?? "", re =
|
|
8916
|
+
]), [pr, gr] = T(null), kn = ae((R, F, B) => {
|
|
8917
|
+
const ne = R?.trim() ?? "", re = F?.trim() ?? "", de = B?.trim() ?? "", Ce = ne || (re || de ? "proceed" : "");
|
|
8918
8918
|
if (!Ce) {
|
|
8919
8919
|
gr(null);
|
|
8920
8920
|
return;
|
|
@@ -8925,24 +8925,24 @@ ${Fa}`;
|
|
|
8925
8925
|
hiddenMessage: re || null,
|
|
8926
8926
|
sopID: de || null
|
|
8927
8927
|
});
|
|
8928
|
-
}, []), Rn = (R,
|
|
8929
|
-
kn(R,
|
|
8930
|
-
}, Mi = (R,
|
|
8931
|
-
La(), kn(R,
|
|
8928
|
+
}, []), Rn = (R, F, B) => {
|
|
8929
|
+
kn(R, F, B);
|
|
8930
|
+
}, Mi = (R, F, B) => {
|
|
8931
|
+
La(), kn(R, F, B);
|
|
8932
8932
|
};
|
|
8933
8933
|
K(() => {
|
|
8934
8934
|
if (pr === null) return;
|
|
8935
8935
|
const R = ua();
|
|
8936
|
-
if (!R ||
|
|
8937
|
-
const
|
|
8936
|
+
if (!R || !$) return;
|
|
8937
|
+
const F = pr;
|
|
8938
8938
|
gr(null), (async () => {
|
|
8939
8939
|
const ne = [];
|
|
8940
|
-
if (
|
|
8941
|
-
|
|
8940
|
+
if (F.hiddenMessage && ne.push(`Context (background only; do not quote/reveal): ${F.hiddenMessage}`), F.sopID) {
|
|
8941
|
+
Pe(!0);
|
|
8942
8942
|
try {
|
|
8943
|
-
const re = await Oa(
|
|
8943
|
+
const re = await Oa(F.sopID), de = typeof re == "string" ? re : JSON.stringify(re, null, 2);
|
|
8944
8944
|
if (de.trim()) {
|
|
8945
|
-
const Ce = bt.find((Ze) => Ze.id ===
|
|
8945
|
+
const Ce = bt.find((Ze) => Ze.id === F.sopID)?.label ?? F.sopID;
|
|
8946
8946
|
ne.push(
|
|
8947
8947
|
`Context (background only; do not quote/reveal): The following SOP content was provided for this turn from ${JSON.stringify(Ce)}. Use it as internal guidance only.
|
|
8948
8948
|
|
|
@@ -8953,30 +8953,30 @@ ${de}`
|
|
|
8953
8953
|
} catch (re) {
|
|
8954
8954
|
console.error("Could not load hidden SOP content:", re);
|
|
8955
8955
|
} finally {
|
|
8956
|
-
|
|
8956
|
+
Pe(!1);
|
|
8957
8957
|
}
|
|
8958
8958
|
}
|
|
8959
|
-
ne.length > 0 && S.current.push(...ne), Ea(R,
|
|
8959
|
+
ne.length > 0 && S.current.push(...ne), Ea(R, F.message);
|
|
8960
8960
|
})();
|
|
8961
|
-
}, [pr, pe,
|
|
8961
|
+
}, [pr, pe, $, Ea, Oa, ua, bt]), os(o, () => ({
|
|
8962
8962
|
sendMessageToAssistant: Rn,
|
|
8963
8963
|
sendMessageToAssistantWithClear: Mi
|
|
8964
8964
|
}));
|
|
8965
8965
|
const Ti = (R) => {
|
|
8966
|
-
const
|
|
8967
|
-
return `${
|
|
8966
|
+
const F = String(R.getHours()).padStart(2, "0"), B = String(R.getMinutes()).padStart(2, "0"), ne = String(R.getSeconds()).padStart(2, "0");
|
|
8967
|
+
return `${F}_${B}_${ne}`;
|
|
8968
8968
|
}, Oi = (R) => {
|
|
8969
|
-
const
|
|
8969
|
+
const F = Ti(/* @__PURE__ */ new Date()), B = R.name.lastIndexOf("."), ne = B > 0 ? R.name.slice(0, B) : R.name, re = B > 0 ? R.name.slice(B + 1) : "", de = (() => {
|
|
8970
8970
|
const ut = (R.type ?? "").toLowerCase();
|
|
8971
8971
|
return ut === "image/png" ? "png" : ut === "image/jpeg" ? "jpg" : ut === "image/webp" ? "webp" : ut === "image/gif" ? "gif" : "";
|
|
8972
|
-
})(), Ce = (re || de || "png").replace(/^\.+/, ""), Ze = `${ne}_${
|
|
8972
|
+
})(), Ce = (re || de || "png").replace(/^\.+/, ""), Ze = `${ne}_${F}.${Ce}`;
|
|
8973
8973
|
return new File([R], Ze, { type: R.type, lastModified: R.lastModified });
|
|
8974
|
-
},
|
|
8975
|
-
const
|
|
8976
|
-
if (
|
|
8977
|
-
for (let B = 0; B <
|
|
8978
|
-
if (
|
|
8979
|
-
const ne =
|
|
8974
|
+
}, Pn = (R) => {
|
|
8975
|
+
const F = R.clipboardData?.items;
|
|
8976
|
+
if (F) {
|
|
8977
|
+
for (let B = 0; B < F.length; B++)
|
|
8978
|
+
if (F[B].type.indexOf("image") !== -1) {
|
|
8979
|
+
const ne = F[B].getAsFile();
|
|
8980
8980
|
if (ne) {
|
|
8981
8981
|
const re = Oi(ne);
|
|
8982
8982
|
be((de) => [...de, re]);
|
|
@@ -8984,20 +8984,20 @@ ${de}`
|
|
|
8984
8984
|
}
|
|
8985
8985
|
}
|
|
8986
8986
|
}
|
|
8987
|
-
},
|
|
8987
|
+
}, An = () => {
|
|
8988
8988
|
if (yt) return;
|
|
8989
8989
|
let R = Ue.trim();
|
|
8990
8990
|
!R && ee.length > 0 && (R = "consider this"), !(!Je || !R) && Ea(Je, R);
|
|
8991
8991
|
}, In = () => {
|
|
8992
|
-
if (
|
|
8992
|
+
if (!$ || z || yt) return;
|
|
8993
8993
|
let R = Xe.trim();
|
|
8994
8994
|
!R && ee.length > 0 && (R = "consider this"), !(!R || !Je) && (Ea(Je, R), ie(""));
|
|
8995
8995
|
}, Ei = (R) => {
|
|
8996
8996
|
R.key !== "Enter" || R.shiftKey || (R.preventDefault(), In());
|
|
8997
8997
|
}, Li = (R) => {
|
|
8998
8998
|
R.preventDefault(), In();
|
|
8999
|
-
},
|
|
9000
|
-
const B =
|
|
8999
|
+
}, Fi = (R, F) => {
|
|
9000
|
+
const B = Pm(R);
|
|
9001
9001
|
return /* @__PURE__ */ a("div", { className: "flex min-w-0 items-start gap-2", children: [
|
|
9002
9002
|
/* @__PURE__ */ e("span", { className: v("mt-1.5 inline-flex h-2.5 w-2.5 shrink-0 rounded-full", B.dotClassName), "aria-hidden": "true" }),
|
|
9003
9003
|
/* @__PURE__ */ a("div", { className: "min-w-0 space-y-1", children: [
|
|
@@ -9012,10 +9012,10 @@ ${de}`
|
|
|
9012
9012
|
children: /* @__PURE__ */ e("span", { className: "truncate", children: R })
|
|
9013
9013
|
}
|
|
9014
9014
|
),
|
|
9015
|
-
/* @__PURE__ */ e("span", { className: "block break-words text-sm leading-snug font-semibold text-foreground", title:
|
|
9015
|
+
/* @__PURE__ */ e("span", { className: "block break-words text-sm leading-snug font-semibold text-foreground", title: F, children: F })
|
|
9016
9016
|
] })
|
|
9017
9017
|
] });
|
|
9018
|
-
},
|
|
9018
|
+
}, $i = () => ze ? null : /* @__PURE__ */ a("div", { className: "rounded-2xl bg-background/70 p-3 shadow-xs ring-1 ring-border/80", children: [
|
|
9019
9019
|
/* @__PURE__ */ a("div", { className: "mb-2", children: [
|
|
9020
9020
|
/* @__PURE__ */ e("p", { className: "text-xs font-semibold tracking-wide text-muted-foreground uppercase", children: "SOP context" }),
|
|
9021
9021
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Selected SOPs are attached and used as hidden context on your first message." })
|
|
@@ -9034,8 +9034,8 @@ ${de}`
|
|
|
9034
9034
|
getItemAriaLabel: (R) => R.label,
|
|
9035
9035
|
emptyState: /* @__PURE__ */ e("div", { className: "rounded-xl border border-dashed border-border bg-muted/30 p-3 text-sm text-muted-foreground", children: "No SOP files are available." }),
|
|
9036
9036
|
renderItem: (R) => {
|
|
9037
|
-
const { portalName:
|
|
9038
|
-
return
|
|
9037
|
+
const { portalName: F, sopName: B } = Yn(R.label);
|
|
9038
|
+
return Fi(F, B);
|
|
9039
9039
|
}
|
|
9040
9040
|
}
|
|
9041
9041
|
) })
|
|
@@ -9047,7 +9047,7 @@ ${de}`
|
|
|
9047
9047
|
ref: Oe,
|
|
9048
9048
|
autoFocus: !0,
|
|
9049
9049
|
value: Xe,
|
|
9050
|
-
onPaste:
|
|
9050
|
+
onPaste: Pn,
|
|
9051
9051
|
onChange: (R) => ie(R.target.value),
|
|
9052
9052
|
onKeyDown: Ei,
|
|
9053
9053
|
placeholder: "Enter a question or command for Randmar Assistant",
|
|
@@ -9060,7 +9060,7 @@ ${de}`
|
|
|
9060
9060
|
size: "icon",
|
|
9061
9061
|
variant: "default",
|
|
9062
9062
|
className: "h-12 w-12 rounded-full shadow-sm",
|
|
9063
|
-
disabled:
|
|
9063
|
+
disabled: !$ || !!z || yt,
|
|
9064
9064
|
type: "submit",
|
|
9065
9065
|
children: /* @__PURE__ */ e(Xt, { className: "h-6 w-6" })
|
|
9066
9066
|
}
|
|
@@ -9071,51 +9071,51 @@ ${de}`
|
|
|
9071
9071
|
size: "icon",
|
|
9072
9072
|
variant: kt ? "secondary" : "default",
|
|
9073
9073
|
onClick: Dn,
|
|
9074
|
-
title:
|
|
9074
|
+
title: Fa,
|
|
9075
9075
|
className: v(
|
|
9076
9076
|
"relative h-12 w-12 rounded-full shadow-sm",
|
|
9077
9077
|
kt && "ring-2 ring-ring/25"
|
|
9078
9078
|
),
|
|
9079
|
-
disabled:
|
|
9079
|
+
disabled: !$ || z !== "" || Je?.pending,
|
|
9080
9080
|
type: "button",
|
|
9081
|
-
"aria-label":
|
|
9081
|
+
"aria-label": Fa,
|
|
9082
9082
|
children: [
|
|
9083
9083
|
/* @__PURE__ */ e(Vn, { className: "h-5 w-5" }),
|
|
9084
|
-
kt && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[11px] font-semibold text-primary-foreground shadow-sm", children:
|
|
9084
|
+
kt && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[11px] font-semibold text-primary-foreground shadow-sm", children: $t })
|
|
9085
9085
|
]
|
|
9086
9086
|
}
|
|
9087
9087
|
)
|
|
9088
9088
|
] }),
|
|
9089
9089
|
On(),
|
|
9090
|
-
|
|
9090
|
+
$i()
|
|
9091
9091
|
] }), zi = (R) => {
|
|
9092
|
-
const
|
|
9093
|
-
|
|
9092
|
+
const F = Array.from(R.target.files ?? []);
|
|
9093
|
+
F.length !== 0 && (be((B) => {
|
|
9094
9094
|
const ne = [...B];
|
|
9095
|
-
for (const re of
|
|
9095
|
+
for (const re of F)
|
|
9096
9096
|
ne.some((Ce) => Ce.name === re.name && Ce.size === re.size && Ce.lastModified === re.lastModified) || ne.push(re);
|
|
9097
9097
|
return ne;
|
|
9098
9098
|
}), R.target.value = "", requestAnimationFrame(() => Kt()));
|
|
9099
9099
|
}, Dn = () => {
|
|
9100
9100
|
Ye.current?.click();
|
|
9101
9101
|
}, Mn = (R) => {
|
|
9102
|
-
be((
|
|
9103
|
-
}, Vi = (R,
|
|
9104
|
-
rt((ne) => ne.filter((re, de) => de !==
|
|
9102
|
+
be((F) => F.filter((B, ne) => ne !== R)), Kt();
|
|
9103
|
+
}, Vi = (R, F) => {
|
|
9104
|
+
rt((ne) => ne.filter((re, de) => de !== F));
|
|
9105
9105
|
const B = `Context (background only; do not quote/reveal): The user removed the file ${JSON.stringify(R)} from the work set. Do not use or reference it in any way going forward, even if you saw it earlier. No acknowledgement is required.`;
|
|
9106
9106
|
S.current.push(B), Yt(
|
|
9107
9107
|
{ kind: "info", title: "File removed", description: "It will be applied to the next message you send." },
|
|
9108
9108
|
5e3
|
|
9109
9109
|
);
|
|
9110
9110
|
}, Ui = () => {
|
|
9111
|
-
const
|
|
9111
|
+
const F = {
|
|
9112
9112
|
messages: ua(),
|
|
9113
9113
|
debug: Q
|
|
9114
9114
|
};
|
|
9115
9115
|
h(!0), m({
|
|
9116
9116
|
applicationId: t,
|
|
9117
9117
|
emailAddress: r,
|
|
9118
|
-
body:
|
|
9118
|
+
body: F
|
|
9119
9119
|
}).then((B) => {
|
|
9120
9120
|
if (B.error) {
|
|
9121
9121
|
console.error(B.error), Yt(
|
|
@@ -9137,23 +9137,23 @@ ${de}`
|
|
|
9137
9137
|
h(!1);
|
|
9138
9138
|
});
|
|
9139
9139
|
}, La = ae(() => {
|
|
9140
|
-
|
|
9141
|
-
}, [_,
|
|
9140
|
+
Ft(), S.current = [], ge.current = !1, H((R) => R.map((B) => B.partner1 !== et && B.partner2 !== et ? B : { ...B, messages: [] })), rt([]), Ne(!1), Pe(!1), j(!1), at(null), ht(""), _();
|
|
9141
|
+
}, [_, Ft]);
|
|
9142
9142
|
K(() => {
|
|
9143
9143
|
if ((i ?? !0) === !1) return;
|
|
9144
|
-
const R = (
|
|
9145
|
-
|
|
9144
|
+
const R = (F) => {
|
|
9145
|
+
F.defaultPrevented || !F.altKey || F.ctrlKey || F.metaKey || F.shiftKey || F.key.toLowerCase() === "n" && (F.preventDefault(), La());
|
|
9146
9146
|
};
|
|
9147
9147
|
return window.addEventListener("keydown", R), () => window.removeEventListener("keydown", R);
|
|
9148
9148
|
}, [i, La]);
|
|
9149
9149
|
const _i = (R) => R.replace(/ {2}\n/g, `
|
|
9150
9150
|
`), ji = (R) => R.replace(/\n/g, `
|
|
9151
9151
|
`), qi = ae((R) => {
|
|
9152
|
-
|
|
9153
|
-
}, [
|
|
9152
|
+
Ft(), at(R.id), ht(_i(R.content));
|
|
9153
|
+
}, [Ft]), br = ae(() => {
|
|
9154
9154
|
at(null), ht("");
|
|
9155
|
-
}, []), Qi = ae((R,
|
|
9156
|
-
const B =
|
|
9155
|
+
}, []), Qi = ae((R, F) => {
|
|
9156
|
+
const B = F.trim();
|
|
9157
9157
|
if (!B) {
|
|
9158
9158
|
Yt({ kind: "error", title: "Nothing to save", description: "Edited message can't be empty." }, 5e3);
|
|
9159
9159
|
return;
|
|
@@ -9170,8 +9170,8 @@ ${de}`
|
|
|
9170
9170
|
return { ...Ce, messages: mt };
|
|
9171
9171
|
})), rt((de) => de.filter((Ce) => Ce.messageId !== R)), br(), Gt(re), V(R, ne);
|
|
9172
9172
|
}, [Je, br, Ct, V, Yt, Gt]), Hi = ae((R) => {
|
|
9173
|
-
|
|
9174
|
-
const
|
|
9173
|
+
Ft(), at(null), ht("");
|
|
9174
|
+
const F = (() => {
|
|
9175
9175
|
const B = Je?.messages ?? [], ne = B.findIndex((re) => re.id === R.id);
|
|
9176
9176
|
return ne === -1 ? Ct(Je) : B.slice(0, ne + 1).reduce((re, de) => re + (de.fromPartnerID === et ? 1 : 0), 0);
|
|
9177
9177
|
})();
|
|
@@ -9179,35 +9179,35 @@ ${de}`
|
|
|
9179
9179
|
if (ne.partner1 !== et && ne.partner2 !== et) return ne;
|
|
9180
9180
|
const re = ne.messages ?? [], de = re.findIndex((Ce) => Ce.id === R.id);
|
|
9181
9181
|
return de === -1 ? ne : { ...ne, messages: re.slice(0, de + 1) };
|
|
9182
|
-
})), Gt(
|
|
9183
|
-
}, [Je, Ct, V, Gt,
|
|
9182
|
+
})), Gt(F), V(R.id, R.content);
|
|
9183
|
+
}, [Je, Ct, V, Gt, Ft]);
|
|
9184
9184
|
K(() => {
|
|
9185
|
-
!d ||
|
|
9186
|
-
}, [
|
|
9185
|
+
!d || !$ || setTimeout(() => Kt(), 50);
|
|
9186
|
+
}, [$, Kt, Nn, d]);
|
|
9187
9187
|
const Tn = ce(null);
|
|
9188
9188
|
K(() => {
|
|
9189
9189
|
Tn.current?.scrollIntoView({ behavior: "smooth" });
|
|
9190
9190
|
}, [Q]);
|
|
9191
|
-
const
|
|
9191
|
+
const Fa = (() => {
|
|
9192
9192
|
if (!kt) return "Attach files";
|
|
9193
|
-
const R = ee.slice(0, 5).map((B) => B.name).join(", "),
|
|
9194
|
-
return `Attached (${
|
|
9193
|
+
const R = ee.slice(0, 5).map((B) => B.name).join(", "), F = $t > 5 ? ` +${$t - 5} more` : "";
|
|
9194
|
+
return `Attached (${$t}): ${R}${F}`;
|
|
9195
9195
|
})(), On = (R) => kt ? /* @__PURE__ */ a(
|
|
9196
9196
|
"div",
|
|
9197
9197
|
{
|
|
9198
9198
|
className: v("flex flex-col gap-1 rounded-2xl bg-background/70 p-2 shadow-xs ring-1 ring-border/80", R),
|
|
9199
9199
|
role: "group",
|
|
9200
|
-
"aria-label": `Attached files (${
|
|
9200
|
+
"aria-label": `Attached files (${$t})`,
|
|
9201
9201
|
children: [
|
|
9202
9202
|
/* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
9203
9203
|
/* @__PURE__ */ e("span", { className: "text-xs font-medium text-muted-foreground", children: "Attached" }),
|
|
9204
|
-
ee.map((
|
|
9204
|
+
ee.map((F, B) => /* @__PURE__ */ a(
|
|
9205
9205
|
"div",
|
|
9206
9206
|
{
|
|
9207
9207
|
className: "inline-flex min-w-0 items-center gap-1 rounded-full bg-muted px-3 py-1 text-xs text-foreground ring-1 ring-border/80",
|
|
9208
9208
|
children: [
|
|
9209
9209
|
/* @__PURE__ */ e(za, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
9210
|
-
/* @__PURE__ */ e("span", { className: "max-w-[16rem] truncate", title:
|
|
9210
|
+
/* @__PURE__ */ e("span", { className: "max-w-[16rem] truncate", title: F.name, children: Sr(F.name) }),
|
|
9211
9211
|
/* @__PURE__ */ e(
|
|
9212
9212
|
E,
|
|
9213
9213
|
{
|
|
@@ -9215,14 +9215,14 @@ ${de}`
|
|
|
9215
9215
|
variant: "ghost",
|
|
9216
9216
|
className: "h-5 w-5 shrink-0 rounded-full hover:bg-muted/80",
|
|
9217
9217
|
onClick: () => Mn(B),
|
|
9218
|
-
"aria-label": `Remove attached file ${
|
|
9218
|
+
"aria-label": `Remove attached file ${F.name}`,
|
|
9219
9219
|
type: "button",
|
|
9220
9220
|
children: /* @__PURE__ */ e(gt, { className: "h-3.5 w-3.5" })
|
|
9221
9221
|
}
|
|
9222
9222
|
)
|
|
9223
9223
|
]
|
|
9224
9224
|
},
|
|
9225
|
-
`${
|
|
9225
|
+
`${F.name}_${F.lastModified}_${F.size}_${B}`
|
|
9226
9226
|
))
|
|
9227
9227
|
] }),
|
|
9228
9228
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: "Will be included with your next message." })
|
|
@@ -9262,11 +9262,11 @@ ${de}`
|
|
|
9262
9262
|
}
|
|
9263
9263
|
),
|
|
9264
9264
|
/* @__PURE__ */ a(E, { className: "ml-1", onClick: () => La(), title: Re, "aria-label": Re, children: [
|
|
9265
|
-
/* @__PURE__ */ e(
|
|
9265
|
+
/* @__PURE__ */ e(Al, { className: "h-5 w-5" }),
|
|
9266
9266
|
" ",
|
|
9267
9267
|
Re
|
|
9268
9268
|
] }),
|
|
9269
|
-
z !== "" && /* @__PURE__ */ a(E, { className: "ml-1", variant: "destructive", onClick: () =>
|
|
9269
|
+
z !== "" && /* @__PURE__ */ a(E, { className: "ml-1", variant: "destructive", onClick: () => Ft(), children: [
|
|
9270
9270
|
/* @__PURE__ */ e(Il, { className: "h-5 w-5" }),
|
|
9271
9271
|
" Stop"
|
|
9272
9272
|
] })
|
|
@@ -9324,7 +9324,7 @@ ${de}`
|
|
|
9324
9324
|
]
|
|
9325
9325
|
}
|
|
9326
9326
|
) }),
|
|
9327
|
-
|
|
9327
|
+
$ ? Nn ? /* @__PURE__ */ e("div", { className: "flex-1 min-h-0 overflow-y-auto bg-muted/30 p-6 rounded-bl-lg", children: /* @__PURE__ */ e("div", { className: "mx-auto flex min-h-full w-full max-w-4xl items-center", children: /* @__PURE__ */ a("div", { className: "w-full", children: [
|
|
9328
9328
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-muted-foreground", children: "Hi there!" }),
|
|
9329
9329
|
/* @__PURE__ */ e("h1", { className: "mt-2 text-2xl leading-tight font-semibold text-foreground", children: "How can I assist you with your Randmar tasks today?" }),
|
|
9330
9330
|
/* @__PURE__ */ e(
|
|
@@ -9336,7 +9336,7 @@ ${de}`
|
|
|
9336
9336
|
}
|
|
9337
9337
|
)
|
|
9338
9338
|
] }) }) }) : /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
9339
|
-
/* @__PURE__ */ a(
|
|
9339
|
+
/* @__PURE__ */ a(Pt, { className: "min-h-0 flex-1 bg-muted/30 pl-2 pr-2", children: [
|
|
9340
9340
|
/* @__PURE__ */ e(
|
|
9341
9341
|
ni,
|
|
9342
9342
|
{
|
|
@@ -9365,10 +9365,10 @@ ${de}`
|
|
|
9365
9365
|
ref: Oe,
|
|
9366
9366
|
placeholder: "Type a message...",
|
|
9367
9367
|
value: Ue,
|
|
9368
|
-
onPaste:
|
|
9368
|
+
onPaste: Pn,
|
|
9369
9369
|
onChange: (R) => We(R.target.value),
|
|
9370
9370
|
onKeyDown: (R) => {
|
|
9371
|
-
R.key !== "Enter" || R.shiftKey || (R.preventDefault(), !(
|
|
9371
|
+
R.key !== "Enter" || R.shiftKey || (R.preventDefault(), !(!$ || z || yt) && An());
|
|
9372
9372
|
},
|
|
9373
9373
|
className: "flex-1 resize-none field-sizing-content max-h-[30em]"
|
|
9374
9374
|
}
|
|
@@ -9380,8 +9380,8 @@ ${de}`
|
|
|
9380
9380
|
size: "icon",
|
|
9381
9381
|
variant: "default",
|
|
9382
9382
|
className: Je?.pending ? "collapse" : "ml-2 h-8 w-8",
|
|
9383
|
-
disabled:
|
|
9384
|
-
onClick:
|
|
9383
|
+
disabled: !$ || !!z || yt,
|
|
9384
|
+
onClick: An,
|
|
9385
9385
|
children: /* @__PURE__ */ e(Xt, { className: "h-6 w-6" })
|
|
9386
9386
|
}
|
|
9387
9387
|
),
|
|
@@ -9391,16 +9391,16 @@ ${de}`
|
|
|
9391
9391
|
size: "icon",
|
|
9392
9392
|
variant: kt ? "secondary" : "default",
|
|
9393
9393
|
onClick: Dn,
|
|
9394
|
-
title:
|
|
9395
|
-
"aria-label":
|
|
9394
|
+
title: Fa,
|
|
9395
|
+
"aria-label": Fa,
|
|
9396
9396
|
className: v(
|
|
9397
9397
|
Je?.pending ? "collapse" : "relative ml-2 h-8 w-8",
|
|
9398
9398
|
kt && "ring-2 ring-ring/25"
|
|
9399
9399
|
),
|
|
9400
|
-
disabled:
|
|
9400
|
+
disabled: !$ || z !== "" || Je?.pending,
|
|
9401
9401
|
children: [
|
|
9402
9402
|
/* @__PURE__ */ e(Vn, { className: "h-5 w-5" }),
|
|
9403
|
-
kt && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[11px] font-semibold text-primary-foreground shadow-sm", children:
|
|
9403
|
+
kt && /* @__PURE__ */ e("span", { className: "absolute -right-1 -top-1 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-[11px] font-semibold text-primary-foreground shadow-sm", children: $t })
|
|
9404
9404
|
]
|
|
9405
9405
|
}
|
|
9406
9406
|
)
|
|
@@ -9447,8 +9447,8 @@ ${de}`
|
|
|
9447
9447
|
/* @__PURE__ */ e(za, { className: "w-4 h-4 mr-2" }),
|
|
9448
9448
|
"Attached Files"
|
|
9449
9449
|
] }),
|
|
9450
|
-
/* @__PURE__ */ e(
|
|
9451
|
-
ee.map((R,
|
|
9450
|
+
/* @__PURE__ */ e(Pt, { className: "flex-1 px-4", children: /* @__PURE__ */ e("div", { className: "py-2 text-sm", children: ee.length > 0 || Fe.length > 0 ? /* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
9451
|
+
ee.map((R, F) => /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2 text-primary", children: [
|
|
9452
9452
|
/* @__PURE__ */ a("div", { className: "flex min-w-0 items-center", children: [
|
|
9453
9453
|
/* @__PURE__ */ e(za, { className: "w-4 h-4 mr-2 flex-shrink-0" }),
|
|
9454
9454
|
/* @__PURE__ */ a("span", { title: `${R.name} (pending)`, children: [
|
|
@@ -9462,14 +9462,14 @@ ${de}`
|
|
|
9462
9462
|
size: "icon",
|
|
9463
9463
|
variant: "ghost",
|
|
9464
9464
|
className: "h-6 w-6 shrink-0",
|
|
9465
|
-
onClick: () => Mn(
|
|
9465
|
+
onClick: () => Mn(F),
|
|
9466
9466
|
"aria-label": `Remove pending file ${R.name}`,
|
|
9467
9467
|
children: /* @__PURE__ */ e(gt, { className: "h-4 w-4" })
|
|
9468
9468
|
}
|
|
9469
9469
|
)
|
|
9470
|
-
] }, `${R.name}_${R.lastModified}_${R.size}_${
|
|
9471
|
-
|
|
9472
|
-
const B =
|
|
9470
|
+
] }, `${R.name}_${R.lastModified}_${R.size}_${F}`)),
|
|
9471
|
+
Fe.slice().reverse().map((R, F) => {
|
|
9472
|
+
const B = Fe.length - 1 - F;
|
|
9473
9473
|
return /* @__PURE__ */ a(
|
|
9474
9474
|
"div",
|
|
9475
9475
|
{
|
|
@@ -9502,7 +9502,7 @@ ${de}`
|
|
|
9502
9502
|
/* @__PURE__ */ e(Ml, { className: "w-4 h-4 mr-2" }),
|
|
9503
9503
|
"Developer Log"
|
|
9504
9504
|
] }),
|
|
9505
|
-
/* @__PURE__ */ e(
|
|
9505
|
+
/* @__PURE__ */ e(Pt, { className: "flex-1 px-4", children: /* @__PURE__ */ a("div", { className: "py-2 text-xs font-mono", children: [
|
|
9506
9506
|
/* @__PURE__ */ e(km, { debugMessages: Q }),
|
|
9507
9507
|
/* @__PURE__ */ e("div", { ref: Tn })
|
|
9508
9508
|
] }) })
|
|
@@ -9511,7 +9511,7 @@ ${de}`
|
|
|
9511
9511
|
/* @__PURE__ */ e(zn, { className: "w-4 h-4 mr-2" }),
|
|
9512
9512
|
"Contact Us"
|
|
9513
9513
|
] }),
|
|
9514
|
-
/* @__PURE__ */ e(
|
|
9514
|
+
/* @__PURE__ */ e(Pt, { className: "flex-1 px-4", children: /* @__PURE__ */ a("div", { className: "py-2 text-sm space-y-4", children: [
|
|
9515
9515
|
/* @__PURE__ */ a("div", { className: "rounded-md border border-border bg-background p-3", children: [
|
|
9516
9516
|
/* @__PURE__ */ e("div", { className: "text-sm font-semibold text-foreground", children: "Reach out any time" }),
|
|
9517
9517
|
/* @__PURE__ */ a("div", { className: "mt-2 space-y-1", children: [
|
|
@@ -9617,7 +9617,7 @@ function Tm(t, r) {
|
|
|
9617
9617
|
}
|
|
9618
9618
|
const Om = er(
|
|
9619
9619
|
({ routes: t, footer: r, dashboardTitle: n, chatUserName: s, appID: i, chatRoutePath: l }, o) => {
|
|
9620
|
-
const u = t.filter((k) => k.showInNav), h = ce(null), d = ce(null), c = ce(null), [m, p] = T(!1), { isMobile: g, setOpenMobile: N } =
|
|
9620
|
+
const u = t.filter((k) => k.showInNav), h = ce(null), d = ce(null), c = ce(null), [m, p] = T(!1), { isMobile: g, setOpenMobile: N } = Pa(), w = As(), { data: x } = Wo({ routeApplicationId: i }), { hasUnreads: b } = Na(), y = ae(
|
|
9621
9621
|
(k, D = null, L = null, M) => {
|
|
9622
9622
|
p(!0), setTimeout(() => {
|
|
9623
9623
|
h.current?.focus(), d.current && (M?.clear ? d.current.sendMessageToAssistantWithClear(k, D, L) : d.current.sendMessageToAssistant(k, D, L));
|
|
@@ -9638,8 +9638,8 @@ const Om = er(
|
|
|
9638
9638
|
const S = u.map((k) => {
|
|
9639
9639
|
const D = Tm(k.path, i), L = Mm(w.pathname, D, i);
|
|
9640
9640
|
return { route: k, linkPath: D, isActive: L };
|
|
9641
|
-
}),
|
|
9642
|
-
return /* @__PURE__ */ a(
|
|
9641
|
+
}), A = S.find((k) => k.isActive)?.route.label ?? "None";
|
|
9642
|
+
return /* @__PURE__ */ a($s, { className: "border-r border-sidebar-border", children: [
|
|
9643
9643
|
/* @__PURE__ */ e(zs, { className: "border-b border-sidebar-border px-6 h-16 justify-center bg-sidebar text-sidebar-foreground", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
9644
9644
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e(
|
|
9645
9645
|
gm,
|
|
@@ -9656,7 +9656,7 @@ const Om = er(
|
|
|
9656
9656
|
/* @__PURE__ */ e("p", { className: "text-xs font-semibold uppercase tracking-wide text-sidebar-foreground/70", children: "App Launchpad" }),
|
|
9657
9657
|
/* @__PURE__ */ a("p", { className: "mt-1 text-sm text-sidebar-foreground/85", children: [
|
|
9658
9658
|
"Current: ",
|
|
9659
|
-
/* @__PURE__ */ e("span", { className: "font-semibold text-sidebar-foreground", children:
|
|
9659
|
+
/* @__PURE__ */ e("span", { className: "font-semibold text-sidebar-foreground", children: A })
|
|
9660
9660
|
] })
|
|
9661
9661
|
] }),
|
|
9662
9662
|
/* @__PURE__ */ e("div", { className: "mt-4 grid grid-cols-3 gap-3", children: S.map(({ route: k, linkPath: D, isActive: L }) => {
|
|
@@ -9688,7 +9688,7 @@ const Om = er(
|
|
|
9688
9688
|
] }) }) }, k.key);
|
|
9689
9689
|
}) }) }),
|
|
9690
9690
|
/* @__PURE__ */ a(Vs, { className: "border-t border-sidebar-border p-4 bg-sidebar text-sidebar-foreground", children: [
|
|
9691
|
-
/* @__PURE__ */ a(
|
|
9691
|
+
/* @__PURE__ */ a($e, { open: m, onOpenChange: p, children: [
|
|
9692
9692
|
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
9693
9693
|
/* @__PURE__ */ e(xa, { asChild: !0, children: /* @__PURE__ */ a(
|
|
9694
9694
|
E,
|
|
@@ -9754,7 +9754,7 @@ const Om = er(
|
|
|
9754
9754
|
chatUserName: d,
|
|
9755
9755
|
chatRef: c,
|
|
9756
9756
|
chatRoutePath: m
|
|
9757
|
-
}, p) => /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
9757
|
+
}, p) => /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(Fs, { children: /* @__PURE__ */ a("div", { className: `flex grow ${mi}`, children: [
|
|
9758
9758
|
/* @__PURE__ */ e(
|
|
9759
9759
|
Om,
|
|
9760
9760
|
{
|
|
@@ -9799,7 +9799,7 @@ const Xn = [
|
|
|
9799
9799
|
{ id: "other-market", label: "Other (please specify)" }
|
|
9800
9800
|
];
|
|
9801
9801
|
function yi({ applicationId: t, manufacturer: r }) {
|
|
9802
|
-
const { toast: n } = Ee(), [s, i] = T(!1), [l, o] = T(!1), [u, h] = T(!1), [d, c] = T(""), [m, p] = T(""), [g, N] = T(!1), [w, x] = T(""), [b, y] = T(""), [C, S] = T([]), [
|
|
9802
|
+
const { toast: n } = Ee(), [s, i] = T(!1), [l, o] = T(!1), [u, h] = T(!1), [d, c] = T(""), [m, p] = T(""), [g, N] = T(!1), [w, x] = T(""), [b, y] = T(""), [C, S] = T([]), [A, k] = T(""), [D, L] = T(""), [M, I] = T([]), [$, Q] = T(""), [z, _] = T(""), [O] = Ka(), V = () => {
|
|
9803
9803
|
c(""), p("");
|
|
9804
9804
|
}, se = () => {
|
|
9805
9805
|
x(""), y(""), S([]), k(""), L(""), I([]), Q(""), _("");
|
|
@@ -9870,7 +9870,7 @@ function yi({ applicationId: t, manufacturer: r }) {
|
|
|
9870
9870
|
"Get Started"
|
|
9871
9871
|
] }),
|
|
9872
9872
|
r.PartnerRegistrationLink && /* @__PURE__ */ e(
|
|
9873
|
-
|
|
9873
|
+
$e,
|
|
9874
9874
|
{
|
|
9875
9875
|
open: s,
|
|
9876
9876
|
onOpenChange: (ie) => {
|
|
@@ -9920,7 +9920,7 @@ function yi({ applicationId: t, manufacturer: r }) {
|
|
|
9920
9920
|
}
|
|
9921
9921
|
),
|
|
9922
9922
|
/* @__PURE__ */ e(
|
|
9923
|
-
|
|
9923
|
+
$e,
|
|
9924
9924
|
{
|
|
9925
9925
|
open: l,
|
|
9926
9926
|
onOpenChange: (ie) => {
|
|
@@ -9965,7 +9965,7 @@ function yi({ applicationId: t, manufacturer: r }) {
|
|
|
9965
9965
|
/* @__PURE__ */ e(X, { htmlFor: `channel-${ie.id}`, className: "text-sm font-normal", children: ie.label })
|
|
9966
9966
|
] }, ie.id)) }),
|
|
9967
9967
|
We && /* @__PURE__ */ e(le, { placeholder: "Please specify", value: D, onChange: (ie) => L(ie.target.value) }),
|
|
9968
|
-
|
|
9968
|
+
A && /* @__PURE__ */ e("p", { className: "text-sm font-medium text-destructive", children: A })
|
|
9969
9969
|
] }),
|
|
9970
9970
|
/* @__PURE__ */ a("div", { className: "space-y-2", children: [
|
|
9971
9971
|
/* @__PURE__ */ a(X, { children: [
|
|
@@ -9984,7 +9984,7 @@ function yi({ applicationId: t, manufacturer: r }) {
|
|
|
9984
9984
|
/* @__PURE__ */ e(X, { htmlFor: `market-${ie.id}`, className: "text-sm font-normal", children: ie.label })
|
|
9985
9985
|
] }, ie.id)) }),
|
|
9986
9986
|
Xe && /* @__PURE__ */ e(le, { placeholder: "Please specify", value: z, onChange: (ie) => _(ie.target.value) }),
|
|
9987
|
-
|
|
9987
|
+
$ && /* @__PURE__ */ e("p", { className: "text-sm font-medium text-destructive", children: $ })
|
|
9988
9988
|
] }),
|
|
9989
9989
|
/* @__PURE__ */ e(Ke, { children: /* @__PURE__ */ e(E, { type: "submit", disabled: g, children: g ? /* @__PURE__ */ a(U, { children: [
|
|
9990
9990
|
/* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
@@ -10084,7 +10084,7 @@ function Lm({
|
|
|
10084
10084
|
] }) : /* @__PURE__ */ a(U, { children: [
|
|
10085
10085
|
/* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
|
|
10086
10086
|
/* @__PURE__ */ e(
|
|
10087
|
-
|
|
10087
|
+
Aa,
|
|
10088
10088
|
{
|
|
10089
10089
|
id: "automatic-reordering",
|
|
10090
10090
|
checked: l.AutoUpdate,
|
|
@@ -10201,7 +10201,7 @@ function Lm({
|
|
|
10201
10201
|
] }) })
|
|
10202
10202
|
] });
|
|
10203
10203
|
}
|
|
10204
|
-
const ur = ta.Root, mr = ta.Trigger, Lf = ta.Anchor, Ma =
|
|
10204
|
+
const ur = ta.Root, mr = ta.Trigger, Lf = ta.Anchor, Ma = P.forwardRef(({ className: t, align: r = "center", sideOffset: n = 4, ...s }, i) => /* @__PURE__ */ e(ta.Portal, { children: /* @__PURE__ */ e(
|
|
10205
10205
|
ta.Content,
|
|
10206
10206
|
{
|
|
10207
10207
|
ref: i,
|
|
@@ -10215,13 +10215,13 @@ const ur = ta.Root, mr = ta.Trigger, Lf = ta.Anchor, Ma = A.forwardRef(({ classN
|
|
|
10215
10215
|
}
|
|
10216
10216
|
) }));
|
|
10217
10217
|
Ma.displayName = ta.Content.displayName;
|
|
10218
|
-
function
|
|
10219
|
-
const [l, o] =
|
|
10218
|
+
function Fm({ options: t, selected: r, onChange: n, placeholder: s = "Select items...", disabled: i = !1 }) {
|
|
10219
|
+
const [l, o] = P.useState(!1), [u, h] = P.useState(""), d = P.useRef(null), [c, m] = P.useState(void 0), p = P.useCallback(() => {
|
|
10220
10220
|
d.current && m(d.current.offsetWidth);
|
|
10221
10221
|
}, []);
|
|
10222
|
-
|
|
10222
|
+
P.useLayoutEffect(() => {
|
|
10223
10223
|
p();
|
|
10224
|
-
}, [p]),
|
|
10224
|
+
}, [p]), P.useEffect(() => (window.addEventListener("resize", p), () => window.removeEventListener("resize", p)), [p]);
|
|
10225
10225
|
const g = (x) => {
|
|
10226
10226
|
n(r.filter((b) => b !== x));
|
|
10227
10227
|
}, N = (x) => {
|
|
@@ -10306,7 +10306,7 @@ function $m({ options: t, selected: r, onChange: n, placeholder: s = "Select ite
|
|
|
10306
10306
|
] }) })
|
|
10307
10307
|
] });
|
|
10308
10308
|
}
|
|
10309
|
-
const
|
|
10309
|
+
const $m = {
|
|
10310
10310
|
sm: 100,
|
|
10311
10311
|
md: 200,
|
|
10312
10312
|
lg: 300,
|
|
@@ -10334,7 +10334,7 @@ function ts({
|
|
|
10334
10334
|
if (l) {
|
|
10335
10335
|
if (l.startsWith("data:")) return l;
|
|
10336
10336
|
try {
|
|
10337
|
-
const h = new URL(
|
|
10337
|
+
const h = new URL(At(l, t)), d = h.pathname.split("/").filter(Boolean), c = r.trim().toLowerCase(), m = (w) => {
|
|
10338
10338
|
try {
|
|
10339
10339
|
return decodeURIComponent(w).toLowerCase() === c;
|
|
10340
10340
|
} catch {
|
|
@@ -10346,7 +10346,7 @@ function ts({
|
|
|
10346
10346
|
}
|
|
10347
10347
|
}
|
|
10348
10348
|
const u = n.ImageId !== void 0 && n.ImageId !== null && String(n.ImageId).trim() !== "" ? `/Product/${encodeURIComponent(r)}/Image/${encodeURIComponent(String(n.ImageId))}` : `/Product/${encodeURIComponent(r)}/Image`;
|
|
10349
|
-
return Hr(
|
|
10349
|
+
return Hr(At(u, t), s, i);
|
|
10350
10350
|
}
|
|
10351
10351
|
function zm({
|
|
10352
10352
|
apiOrigin: t,
|
|
@@ -10355,7 +10355,7 @@ function zm({
|
|
|
10355
10355
|
height: s
|
|
10356
10356
|
}) {
|
|
10357
10357
|
return Hr(
|
|
10358
|
-
|
|
10358
|
+
At(`/Product/${encodeURIComponent(r)}/Image`, t),
|
|
10359
10359
|
n,
|
|
10360
10360
|
s
|
|
10361
10361
|
);
|
|
@@ -10376,7 +10376,7 @@ function Vm({
|
|
|
10376
10376
|
className: s,
|
|
10377
10377
|
fallback: i
|
|
10378
10378
|
}) {
|
|
10379
|
-
const l =
|
|
10379
|
+
const l = $m[r], o = P.useRef(null), u = or({
|
|
10380
10380
|
elementRef: o,
|
|
10381
10381
|
threshold: 0.1,
|
|
10382
10382
|
rootMargin: "100px"
|
|
@@ -10386,48 +10386,48 @@ function Vm({
|
|
|
10386
10386
|
skip: !t || !u,
|
|
10387
10387
|
refetchOnMountOrArgChange: !0
|
|
10388
10388
|
}
|
|
10389
|
-
), p =
|
|
10390
|
-
|
|
10389
|
+
), p = P.useMemo(() => Bm(d), [d]), [g, N] = P.useState(0), [w, x] = P.useState(!1), b = P.useRef(!1), y = P.useRef(/* @__PURE__ */ new Set());
|
|
10390
|
+
P.useEffect(() => {
|
|
10391
10391
|
N(0), x(!1), b.current = !1, y.current.clear();
|
|
10392
10392
|
}, [t]);
|
|
10393
|
-
const C =
|
|
10393
|
+
const C = P.useMemo(() => p ? [...p].sort((O, V) => {
|
|
10394
10394
|
const se = O.SortOrder ?? Number.POSITIVE_INFINITY, me = V.SortOrder ?? Number.POSITIVE_INFINITY;
|
|
10395
10395
|
if (se !== me) return se - me;
|
|
10396
10396
|
const Ve = O.IsPrimary === !0 ? 0 : 1, Re = V.IsPrimary === !0 ? 0 : 1;
|
|
10397
10397
|
return Ve - Re;
|
|
10398
|
-
}) : null, [p]), S =
|
|
10398
|
+
}) : null, [p]), S = P.useMemo(() => {
|
|
10399
10399
|
if (!C?.length) return 0;
|
|
10400
10400
|
const O = C.findIndex((V) => V.IsPrimary === !0);
|
|
10401
10401
|
return O >= 0 ? O : 0;
|
|
10402
10402
|
}, [C]);
|
|
10403
|
-
|
|
10403
|
+
P.useEffect(() => {
|
|
10404
10404
|
C?.length && (b.current || (N(S), b.current = !0));
|
|
10405
10405
|
}, [S, C]);
|
|
10406
|
-
const
|
|
10406
|
+
const A = C?.length ?? 0, k = P.useMemo(() => {
|
|
10407
10407
|
const O = (n ?? "").trim();
|
|
10408
10408
|
return O ? `${O} (Product ${t})` : `Product ${t}`;
|
|
10409
|
-
}, [n, t]), D =
|
|
10410
|
-
(O) =>
|
|
10411
|
-
[k,
|
|
10412
|
-
), L = C?.[g], M =
|
|
10409
|
+
}, [n, t]), D = P.useCallback(
|
|
10410
|
+
(O) => A > 1 ? `${k} image ${O + 1}` : k,
|
|
10411
|
+
[k, A]
|
|
10412
|
+
), L = C?.[g], M = P.useMemo(() => L ? ts({
|
|
10413
10413
|
apiOrigin: h,
|
|
10414
10414
|
randmarSKU: t,
|
|
10415
10415
|
image: L,
|
|
10416
10416
|
width: l * 1.5,
|
|
10417
10417
|
height: l * 1.5
|
|
10418
|
-
}) : null, [L, h, l, t]), I =
|
|
10418
|
+
}) : null, [L, h, l, t]), I = P.useCallback(
|
|
10419
10419
|
(O) => {
|
|
10420
|
-
if (
|
|
10421
|
-
const V = (O %
|
|
10420
|
+
if (A <= 0) return;
|
|
10421
|
+
const V = (O % A + A) % A;
|
|
10422
10422
|
N(V);
|
|
10423
10423
|
},
|
|
10424
|
-
[
|
|
10425
|
-
),
|
|
10424
|
+
[A]
|
|
10425
|
+
), $ = P.useCallback(() => I(g - 1), [g, I]), Q = P.useCallback(() => I(g + 1), [g, I]), z = P.useCallback(
|
|
10426
10426
|
(O) => {
|
|
10427
|
-
if (!(
|
|
10427
|
+
if (!(A <= 1))
|
|
10428
10428
|
switch (O.key) {
|
|
10429
10429
|
case "ArrowLeft":
|
|
10430
|
-
O.preventDefault(),
|
|
10430
|
+
O.preventDefault(), $();
|
|
10431
10431
|
break;
|
|
10432
10432
|
case "ArrowRight":
|
|
10433
10433
|
O.preventDefault(), Q();
|
|
@@ -10436,15 +10436,15 @@ function Vm({
|
|
|
10436
10436
|
O.preventDefault(), I(0);
|
|
10437
10437
|
break;
|
|
10438
10438
|
case "End":
|
|
10439
|
-
O.preventDefault(), I(
|
|
10439
|
+
O.preventDefault(), I(A - 1);
|
|
10440
10440
|
break;
|
|
10441
10441
|
}
|
|
10442
10442
|
},
|
|
10443
|
-
[Q,
|
|
10443
|
+
[Q, $, I, A]
|
|
10444
10444
|
);
|
|
10445
|
-
if (
|
|
10446
|
-
if (!C?.length ||
|
|
10447
|
-
const O = (g - 1 +
|
|
10445
|
+
if (P.useEffect(() => {
|
|
10446
|
+
if (!C?.length || A <= 1) return;
|
|
10447
|
+
const O = (g - 1 + A) % A, V = (g + 1) % A, se = [O, V];
|
|
10448
10448
|
for (const me of se) {
|
|
10449
10449
|
const Ve = C[me];
|
|
10450
10450
|
if (!Ve) continue;
|
|
@@ -10460,7 +10460,7 @@ function Vm({
|
|
|
10460
10460
|
const Qe = new Image();
|
|
10461
10461
|
Qe.src = Re;
|
|
10462
10462
|
}
|
|
10463
|
-
}, [g, h, l, t,
|
|
10463
|
+
}, [g, h, l, t, A, C]), c)
|
|
10464
10464
|
return /* @__PURE__ */ e(U, { children: i ?? null });
|
|
10465
10465
|
if (p === null && u && m)
|
|
10466
10466
|
return /* @__PURE__ */ e("div", { className: s, ref: o, children: /* @__PURE__ */ e(f, { className: "rounded-md", style: { width: l, height: l } }) });
|
|
@@ -10501,7 +10501,7 @@ function Vm({
|
|
|
10501
10501
|
role: "region",
|
|
10502
10502
|
"aria-roledescription": "carousel",
|
|
10503
10503
|
"aria-label": `Product images for ${t}`,
|
|
10504
|
-
tabIndex:
|
|
10504
|
+
tabIndex: A > 1 ? 0 : -1,
|
|
10505
10505
|
onKeyDown: z,
|
|
10506
10506
|
children: [
|
|
10507
10507
|
/* @__PURE__ */ e(
|
|
@@ -10515,7 +10515,7 @@ function Vm({
|
|
|
10515
10515
|
loading: "eager"
|
|
10516
10516
|
}
|
|
10517
10517
|
),
|
|
10518
|
-
|
|
10518
|
+
A > 1 && /* @__PURE__ */ a(U, { children: [
|
|
10519
10519
|
/* @__PURE__ */ e(
|
|
10520
10520
|
E,
|
|
10521
10521
|
{
|
|
@@ -10523,7 +10523,7 @@ function Vm({
|
|
|
10523
10523
|
variant: "secondary",
|
|
10524
10524
|
size: "icon",
|
|
10525
10525
|
className: "absolute left-2 top-1/2 -translate-y-1/2 bg-background/80 text-foreground shadow-sm ring-1 ring-border/50 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 focus-visible:opacity-100",
|
|
10526
|
-
onClick:
|
|
10526
|
+
onClick: $,
|
|
10527
10527
|
"aria-label": "Previous image",
|
|
10528
10528
|
children: /* @__PURE__ */ e(ps, { className: "h-4 w-4" })
|
|
10529
10529
|
}
|
|
@@ -10540,7 +10540,7 @@ function Vm({
|
|
|
10540
10540
|
children: /* @__PURE__ */ e(tr, { className: "h-4 w-4" })
|
|
10541
10541
|
}
|
|
10542
10542
|
),
|
|
10543
|
-
/* @__PURE__ */ e("div", { className: "absolute bottom-2 left-1/2 -translate-x-1/2 flex items-center gap-1 rounded-full bg-background/80 px-2 py-1", children: Array.from({ length:
|
|
10543
|
+
/* @__PURE__ */ e("div", { className: "absolute bottom-2 left-1/2 -translate-x-1/2 flex items-center gap-1 rounded-full bg-background/80 px-2 py-1", children: Array.from({ length: A }).map((O, V) => {
|
|
10544
10544
|
const se = V === g;
|
|
10545
10545
|
return /* @__PURE__ */ e(
|
|
10546
10546
|
"button",
|
|
@@ -10551,7 +10551,7 @@ function Vm({
|
|
|
10551
10551
|
se ? "bg-foreground" : "bg-muted-foreground/40 hover:bg-muted-foreground/60"
|
|
10552
10552
|
].join(" "),
|
|
10553
10553
|
onClick: () => I(V),
|
|
10554
|
-
"aria-label": `Go to image ${V + 1} of ${
|
|
10554
|
+
"aria-label": `Go to image ${V + 1} of ${A}`,
|
|
10555
10555
|
"aria-current": se ? "true" : void 0
|
|
10556
10556
|
},
|
|
10557
10557
|
V
|
|
@@ -10578,7 +10578,7 @@ function Wr({
|
|
|
10578
10578
|
customAction: u = /* @__PURE__ */ e(U, {}),
|
|
10579
10579
|
showUsdLabelOnCost: h = !1
|
|
10580
10580
|
}) {
|
|
10581
|
-
const d = vc(), { toast: c } = Ee(), [m, p] = T(1), [g, N] = T(null), [w, x] = T(0), [b, y] = T(!1), [C] = Ko(), [S,
|
|
10581
|
+
const d = vc(), { toast: c } = Ee(), [m, p] = T(1), [g, N] = T(null), [w, x] = T(0), [b, y] = T(!1), [C] = Ko(), [S, A] = T(!1), [k, D] = T(null), [L, M] = T("idle"), [I, $] = T(null), [Q] = Yo(), z = r?.Distribution?.Cost || 0, _ = r?.Distribution?.RegularPrice || 0, O = r?.Distribution?.Price || 0, V = !!(t && r?.RandmarSKU);
|
|
10582
10582
|
K(() => {
|
|
10583
10583
|
p(1), N(null), x(0);
|
|
10584
10584
|
}, [r?.RandmarSKU]), K(() => {
|
|
@@ -10594,17 +10594,17 @@ function Wr({
|
|
|
10594
10594
|
l || p(1);
|
|
10595
10595
|
}, [l]), K(() => {
|
|
10596
10596
|
if (!S) {
|
|
10597
|
-
D(null), M("idle"),
|
|
10597
|
+
D(null), M("idle"), $(null);
|
|
10598
10598
|
return;
|
|
10599
10599
|
}
|
|
10600
10600
|
if (!t || !r?.RandmarSKU) {
|
|
10601
|
-
M("error"),
|
|
10601
|
+
M("error"), $("Missing identifiers to load performance data.");
|
|
10602
10602
|
return;
|
|
10603
10603
|
}
|
|
10604
10604
|
let j = !1;
|
|
10605
10605
|
const ge = r.RandmarSKU;
|
|
10606
10606
|
return (async () => {
|
|
10607
|
-
M("summary"),
|
|
10607
|
+
M("summary"), $(null);
|
|
10608
10608
|
try {
|
|
10609
10609
|
const Ie = await Q({
|
|
10610
10610
|
routeApplicationId: t,
|
|
@@ -10626,7 +10626,7 @@ function Wr({
|
|
|
10626
10626
|
D(_e.data ?? Ie.data ?? null), M("complete");
|
|
10627
10627
|
} catch (Ie) {
|
|
10628
10628
|
if (j) return;
|
|
10629
|
-
console.error("Failed to load performance data for product modal", Ie), M("error"),
|
|
10629
|
+
console.error("Failed to load performance data for product modal", Ie), M("error"), $("We couldn't load the performance details. Please try again.");
|
|
10630
10630
|
}
|
|
10631
10631
|
})(), () => {
|
|
10632
10632
|
j = !0;
|
|
@@ -10716,11 +10716,11 @@ function Wr({
|
|
|
10716
10716
|
}, Me = (j) => {
|
|
10717
10717
|
const ge = typeof r?.MSRP == "number" && r.MSRP > 0 ? r.MSRP : typeof r?.MAP == "number" && r.MAP > 0 ? r.MAP : null;
|
|
10718
10718
|
if (ge === null) return null;
|
|
10719
|
-
const
|
|
10720
|
-
if (typeof
|
|
10721
|
-
const Ie = j.Rebate ?? 0, _e = Math.max(
|
|
10719
|
+
const Ae = j.Price ?? r?.Distribution?.Price;
|
|
10720
|
+
if (typeof Ae != "number") return null;
|
|
10721
|
+
const Ie = j.Rebate ?? 0, _e = Math.max(Ae - Ie, 0);
|
|
10722
10722
|
return ge - _e;
|
|
10723
|
-
},
|
|
10723
|
+
}, Pe = () => {
|
|
10724
10724
|
typeof i < "u" && i({ quantity: m ?? 1, bidNumber: g?.BidNumber ?? null });
|
|
10725
10725
|
}, ze = () => {
|
|
10726
10726
|
b || !o || (y(!0), C({
|
|
@@ -10806,14 +10806,14 @@ function Wr({
|
|
|
10806
10806
|
variant: r.SerialNumber ? "success" : "warning",
|
|
10807
10807
|
className: "rounded-full px-3",
|
|
10808
10808
|
children: [
|
|
10809
|
-
/* @__PURE__ */ e(
|
|
10809
|
+
/* @__PURE__ */ e(Fl, { size: "12", className: "mr-1.5" }),
|
|
10810
10810
|
" ",
|
|
10811
10811
|
r.SerialNumber ? "Serialized" : "Unserialized"
|
|
10812
10812
|
]
|
|
10813
10813
|
}
|
|
10814
10814
|
),
|
|
10815
10815
|
r.TransparencyCode && /* @__PURE__ */ a(xe, { variant: "info", className: "rounded-full px-3", children: [
|
|
10816
|
-
/* @__PURE__ */ e(
|
|
10816
|
+
/* @__PURE__ */ e($l, { size: "12", className: "mr-1.5" }),
|
|
10817
10817
|
" Transparency Code"
|
|
10818
10818
|
] }),
|
|
10819
10819
|
r.AvailableToBuy !== void 0 && /* @__PURE__ */ a(
|
|
@@ -10974,7 +10974,7 @@ function Wr({
|
|
|
10974
10974
|
/* @__PURE__ */ e("div", { className: "flex flex-col @[36rem]:flex-row gap-6 mt-4", children: /* @__PURE__ */ e("div", { className: "flex flex-1 @[36rem]:order-1 order-2", children: pe && r.Distribution && /* @__PURE__ */ a("div", { className: "w-full", children: [
|
|
10975
10975
|
/* @__PURE__ */ e("div", { className: "flex items-center", children: "You have " + ie.length + (ie.length > 1 ? " opportunities" : " opportunity") + " for this product:" }),
|
|
10976
10976
|
/* @__PURE__ */ e(ke, { children: /* @__PURE__ */ e("div", { className: "space-y-2 max-h-[200px] overflow-y-auto p-2 mt-1", children: ie.map((j, ge) => {
|
|
10977
|
-
const
|
|
10977
|
+
const Ae = Me(j);
|
|
10978
10978
|
return rs(j) ? /* @__PURE__ */ a(
|
|
10979
10979
|
"div",
|
|
10980
10980
|
{
|
|
@@ -10993,9 +10993,9 @@ function Wr({
|
|
|
10993
10993
|
"Rebate: ",
|
|
10994
10994
|
ue(j.Rebate)
|
|
10995
10995
|
] }),
|
|
10996
|
-
|
|
10996
|
+
Ae !== null && /* @__PURE__ */ a("span", { className: "text-xs text-info", children: [
|
|
10997
10997
|
"Potential Revenue: ",
|
|
10998
|
-
ue(
|
|
10998
|
+
ue(Ae)
|
|
10999
10999
|
] }),
|
|
11000
11000
|
j.EndDate && /* @__PURE__ */ a("span", { className: "text-xs text-muted-foreground", children: [
|
|
11001
11001
|
"Ends: ",
|
|
@@ -11028,9 +11028,9 @@ function Wr({
|
|
|
11028
11028
|
"Rebate: ",
|
|
11029
11029
|
ue(j.Rebate)
|
|
11030
11030
|
] }),
|
|
11031
|
-
|
|
11031
|
+
Ae !== null && /* @__PURE__ */ a("span", { className: "text-xs text-info", children: [
|
|
11032
11032
|
"Potential Revenue: ",
|
|
11033
|
-
ue(
|
|
11033
|
+
ue(Ae)
|
|
11034
11034
|
] }),
|
|
11035
11035
|
j.EndDate && /* @__PURE__ */ a("span", { className: "text-xs text-muted-foreground", children: [
|
|
11036
11036
|
"Ends: ",
|
|
@@ -11130,7 +11130,7 @@ function Wr({
|
|
|
11130
11130
|
E,
|
|
11131
11131
|
{
|
|
11132
11132
|
className: "gap-2 whitespace-nowrap",
|
|
11133
|
-
onClick:
|
|
11133
|
+
onClick: Pe,
|
|
11134
11134
|
disabled: !r.AvailableToBuy || l,
|
|
11135
11135
|
children: l ? /* @__PURE__ */ a(U, { children: [
|
|
11136
11136
|
/* @__PURE__ */ e(he, { className: "h-4 w-4 animate-spin" }),
|
|
@@ -11151,7 +11151,7 @@ function Wr({
|
|
|
11151
11151
|
variant: "outline",
|
|
11152
11152
|
type: "button",
|
|
11153
11153
|
className: "h-11 px-4 text-sm font-medium justify-start w-full",
|
|
11154
|
-
onClick: () =>
|
|
11154
|
+
onClick: () => A(!0),
|
|
11155
11155
|
disabled: !V,
|
|
11156
11156
|
children: [
|
|
11157
11157
|
/* @__PURE__ */ e(Vl, { className: "mr-2" }),
|
|
@@ -11176,7 +11176,7 @@ function Wr({
|
|
|
11176
11176
|
] })
|
|
11177
11177
|
] })
|
|
11178
11178
|
] }) }),
|
|
11179
|
-
/* @__PURE__ */ e(
|
|
11179
|
+
/* @__PURE__ */ e($e, { open: S, onOpenChange: A, children: /* @__PURE__ */ a(Be, { className: "w-[min(95vw,1100px)] max-w-5xl space-y-6", children: [
|
|
11180
11180
|
/* @__PURE__ */ a(qe, { children: [
|
|
11181
11181
|
/* @__PURE__ */ e(He, { children: "Monthly Sales Performance" }),
|
|
11182
11182
|
/* @__PURE__ */ a(Ge, { children: [
|
|
@@ -11228,7 +11228,7 @@ const _m = {
|
|
|
11228
11228
|
}
|
|
11229
11229
|
), qm = () => /* @__PURE__ */ e(f, { className: "w-full", style: { aspectRatio: "16/9" } });
|
|
11230
11230
|
function Ni({ randmarSKU: t, sceneName: r, size: n = "md", alt: s, secondaryContent: i }) {
|
|
11231
|
-
const [l, o] =
|
|
11231
|
+
const [l, o] = P.useState(!1), [u, h] = P.useState(!1), { sendMessageWithClear: d } = Na(), c = dr(), m = _m[n], p = ce(null), g = or({
|
|
11232
11232
|
elementRef: p,
|
|
11233
11233
|
threshold: 0.1,
|
|
11234
11234
|
rootMargin: "100px"
|
|
@@ -11248,7 +11248,7 @@ function Ni({ randmarSKU: t, sceneName: r, size: n = "md", alt: s, secondaryCont
|
|
|
11248
11248
|
), { data: C, isFetching: S } = ec(
|
|
11249
11249
|
{ productNumber: t },
|
|
11250
11250
|
{ skip: !y || !l }
|
|
11251
|
-
),
|
|
11251
|
+
), A = w || b;
|
|
11252
11252
|
function k() {
|
|
11253
11253
|
if (C)
|
|
11254
11254
|
try {
|
|
@@ -11260,24 +11260,24 @@ function Ni({ randmarSKU: t, sceneName: r, size: n = "md", alt: s, secondaryCont
|
|
|
11260
11260
|
}
|
|
11261
11261
|
function D() {
|
|
11262
11262
|
const I = `/Product/${encodeURIComponent(t)}/Video`;
|
|
11263
|
-
navigator.clipboard.writeText(
|
|
11263
|
+
navigator.clipboard.writeText(At(I, c)), h(!0), setTimeout(() => h(!1), 2e3);
|
|
11264
11264
|
}
|
|
11265
11265
|
function L() {
|
|
11266
11266
|
y && o(!0);
|
|
11267
11267
|
}
|
|
11268
|
-
const M =
|
|
11268
|
+
const M = P.useCallback(() => {
|
|
11269
11269
|
if (!x) return;
|
|
11270
|
-
const I = (r ?? "").trim(),
|
|
11270
|
+
const I = (r ?? "").trim(), $ = I ? `Use this concept as a background/stage scene: "${I}".` : "Use a modern and clean office as the background/stage, with no people present.";
|
|
11271
11271
|
d(
|
|
11272
11272
|
`Help me generate product images for (Randmar SKU: ${t}).
|
|
11273
11273
|
|
|
11274
|
-
${
|
|
11274
|
+
${$}
|
|
11275
11275
|
|
|
11276
11276
|
Repeat and ask me what to change or improve until we are done creating pictures.`
|
|
11277
11277
|
);
|
|
11278
11278
|
}, [x, t, r, d]);
|
|
11279
11279
|
return /* @__PURE__ */ a(U, { children: [
|
|
11280
|
-
/* @__PURE__ */ e(
|
|
11280
|
+
/* @__PURE__ */ e($e, { open: l, onOpenChange: o, children: /* @__PURE__ */ e(Be, { className: "max-w-4xl p-0 overflow-hidden", children: S || !C ? (
|
|
11281
11281
|
// Display a skeleton inside the dialog while the video URL is loading.
|
|
11282
11282
|
/* @__PURE__ */ e(qm, {})
|
|
11283
11283
|
) : (
|
|
@@ -11306,7 +11306,7 @@ Repeat and ask me what to change or improve until we are done creating pictures.
|
|
|
11306
11306
|
] }) })
|
|
11307
11307
|
) }) }),
|
|
11308
11308
|
/* @__PURE__ */ a("div", { className: "relative w-max h-max", ref: p, children: [
|
|
11309
|
-
|
|
11309
|
+
A ? (
|
|
11310
11310
|
// Use the Skeleton component while checking for the image or fetching its URL.
|
|
11311
11311
|
/* @__PURE__ */ e(f, { className: "rounded-md", style: { width: m, height: m } })
|
|
11312
11312
|
) : x ? (
|
|
@@ -11348,7 +11348,7 @@ Repeat and ask me what to change or improve until we are done creating pictures.
|
|
|
11348
11348
|
] })
|
|
11349
11349
|
] });
|
|
11350
11350
|
}
|
|
11351
|
-
function
|
|
11351
|
+
function Ff({ reseller: t, actions: r, loading: n = !1 }) {
|
|
11352
11352
|
return n || !t ? /* @__PURE__ */ e(Qm, {}) : /* @__PURE__ */ e(Hm, { reseller: t, actions: r });
|
|
11353
11353
|
}
|
|
11354
11354
|
function Qm() {
|
|
@@ -11463,7 +11463,7 @@ function Gm({ manufacturerId: t, opportunityNumber: r }) {
|
|
|
11463
11463
|
r && /* @__PURE__ */ e(xe, { variant: "outline", className: "text-xs", children: r })
|
|
11464
11464
|
] });
|
|
11465
11465
|
}
|
|
11466
|
-
function
|
|
11466
|
+
function $f({ salesData: t, salesStatistics: r = [], loading: n = !1 }) {
|
|
11467
11467
|
return n || !t ? /* @__PURE__ */ e(Km, {}) : /* @__PURE__ */ e(Ym, { salesData: t, salesStatistics: r });
|
|
11468
11468
|
}
|
|
11469
11469
|
function Km() {
|
|
@@ -11549,7 +11549,7 @@ function Bf({
|
|
|
11549
11549
|
className: u,
|
|
11550
11550
|
...h
|
|
11551
11551
|
}) {
|
|
11552
|
-
const d =
|
|
11552
|
+
const d = P.Children.toArray(l).filter(Boolean);
|
|
11553
11553
|
return /* @__PURE__ */ a(q, { className: v("flex flex-col h-full overflow-hidden", u), ...h, children: [
|
|
11554
11554
|
/* @__PURE__ */ e(
|
|
11555
11555
|
"header",
|
|
@@ -11620,7 +11620,7 @@ function Bf({
|
|
|
11620
11620
|
)) }) })
|
|
11621
11621
|
] });
|
|
11622
11622
|
}
|
|
11623
|
-
const vi = tt.Root, wi = tt.Trigger, Jm = tt.Portal, Si =
|
|
11623
|
+
const vi = tt.Root, wi = tt.Trigger, Jm = tt.Portal, Si = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
11624
11624
|
tt.Overlay,
|
|
11625
11625
|
{
|
|
11626
11626
|
className: v(
|
|
@@ -11632,7 +11632,7 @@ const vi = tt.Root, wi = tt.Trigger, Jm = tt.Portal, Si = A.forwardRef(({ classN
|
|
|
11632
11632
|
}
|
|
11633
11633
|
));
|
|
11634
11634
|
Si.displayName = tt.Overlay.displayName;
|
|
11635
|
-
const mn =
|
|
11635
|
+
const mn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ a(Jm, { children: [
|
|
11636
11636
|
/* @__PURE__ */ e(Si, {}),
|
|
11637
11637
|
/* @__PURE__ */ e(
|
|
11638
11638
|
tt.Content,
|
|
@@ -11675,7 +11675,7 @@ const fn = ({
|
|
|
11675
11675
|
}
|
|
11676
11676
|
);
|
|
11677
11677
|
fn.displayName = "AlertDialogFooter";
|
|
11678
|
-
const pn =
|
|
11678
|
+
const pn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
11679
11679
|
tt.Title,
|
|
11680
11680
|
{
|
|
11681
11681
|
ref: n,
|
|
@@ -11684,7 +11684,7 @@ const pn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
11684
11684
|
}
|
|
11685
11685
|
));
|
|
11686
11686
|
pn.displayName = tt.Title.displayName;
|
|
11687
|
-
const gn =
|
|
11687
|
+
const gn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
11688
11688
|
tt.Description,
|
|
11689
11689
|
{
|
|
11690
11690
|
ref: n,
|
|
@@ -11693,7 +11693,7 @@ const gn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
11693
11693
|
}
|
|
11694
11694
|
));
|
|
11695
11695
|
gn.displayName = tt.Description.displayName;
|
|
11696
|
-
const bn =
|
|
11696
|
+
const bn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
11697
11697
|
tt.Action,
|
|
11698
11698
|
{
|
|
11699
11699
|
ref: n,
|
|
@@ -11702,7 +11702,7 @@ const bn = A.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
|
11702
11702
|
}
|
|
11703
11703
|
));
|
|
11704
11704
|
bn.displayName = tt.Action.displayName;
|
|
11705
|
-
const yn =
|
|
11705
|
+
const yn = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
11706
11706
|
tt.Cancel,
|
|
11707
11707
|
{
|
|
11708
11708
|
ref: n,
|
|
@@ -11749,11 +11749,11 @@ function th({
|
|
|
11749
11749
|
className: u,
|
|
11750
11750
|
disabled: h = !1
|
|
11751
11751
|
}) {
|
|
11752
|
-
const [d, c] =
|
|
11753
|
-
|
|
11752
|
+
const [d, c] = P.useState(!1), [m, p] = P.useState(t);
|
|
11753
|
+
P.useEffect(() => {
|
|
11754
11754
|
p(t);
|
|
11755
11755
|
}, [t]);
|
|
11756
|
-
const g = !!(r || n), N = i || d, w = t ?? m, x =
|
|
11756
|
+
const g = !!(r || n), N = i || d, w = t ?? m, x = P.useCallback(async () => {
|
|
11757
11757
|
if (!(!g || h || N)) {
|
|
11758
11758
|
c(!0);
|
|
11759
11759
|
try {
|
|
@@ -11827,7 +11827,7 @@ function zf({
|
|
|
11827
11827
|
onAssistantUnavailable: n,
|
|
11828
11828
|
...s
|
|
11829
11829
|
}) {
|
|
11830
|
-
const i = Dd(), l =
|
|
11830
|
+
const i = Dd(), l = P.useCallback(() => {
|
|
11831
11831
|
if (t) {
|
|
11832
11832
|
t();
|
|
11833
11833
|
return;
|
|
@@ -12009,7 +12009,7 @@ const ch = [
|
|
|
12009
12009
|
}
|
|
12010
12010
|
`;
|
|
12011
12011
|
function jf({ id: t, name: r, value: n, onChange: s, placeholder: i, className: l, ...o }) {
|
|
12012
|
-
const [u, h] = T(!1), d = ce(null), c = ce(null), m =
|
|
12012
|
+
const [u, h] = T(!1), d = ce(null), c = ce(null), m = Ac({
|
|
12013
12013
|
extensions: [Dc, Mc],
|
|
12014
12014
|
content: n,
|
|
12015
12015
|
editorProps: {
|
|
@@ -12755,8 +12755,8 @@ function Gr(t) {
|
|
|
12755
12755
|
if (l) {
|
|
12756
12756
|
const b = l.trim(), [y, C, S] = b.split(":");
|
|
12757
12757
|
if (p = Number.parseInt(y ?? "0", 10), g = Number.parseInt(C ?? "0", 10), S) {
|
|
12758
|
-
const [
|
|
12759
|
-
N = Number.parseInt(
|
|
12758
|
+
const [A, k] = S.split(".");
|
|
12759
|
+
N = Number.parseInt(A ?? "0", 10), k && (w = Number.parseInt(k.slice(0, 3).padEnd(3, "0"), 10));
|
|
12760
12760
|
}
|
|
12761
12761
|
}
|
|
12762
12762
|
if (!Number.isFinite(p) || !Number.isFinite(g) || !Number.isFinite(N) || !Number.isFinite(w))
|
|
@@ -12871,13 +12871,13 @@ function qf({
|
|
|
12871
12871
|
O && x(O);
|
|
12872
12872
|
}
|
|
12873
12873
|
}, [m, p, n, w, g?.IsManufacturer]);
|
|
12874
|
-
const C = !n && (d || m), S = p?.Title || p?.RandmarTitle || p?.RandmarSKU || "Product",
|
|
12874
|
+
const C = !n && (d || m), S = p?.Title || p?.RandmarTitle || p?.RandmarSKU || "Product", A = p?.VoiceoverCaption || "", k = typeof p?.MAP == "number" && p.MAP > 0 ? p.MAP : typeof p?.Distribution?.MAP == "number" && p.Distribution.MAP > 0 ? p.Distribution.MAP : null, D = typeof p?.MSRP == "number" && p.MSRP > 0 ? p.MSRP : typeof p?.Distribution?.MSRP == "number" && p.Distribution.MSRP > 0 ? p.Distribution.MSRP : null, L = s ? p?.Opportunities?.find((z) => z.BidNumber === s)?.Price : null, M = typeof L == "number" && L > 0 ? L : typeof p?.Distribution?.Price == "number" && p.Distribution.Price > 0 ? p.Distribution.Price : null, I = C || typeof M == "number", $ = typeof k == "number" && typeof M == "number" ? k - M : null, Q = typeof $ == "number" && typeof k == "number" && k > 0 ? Math.round($ / k * 100) : null;
|
|
12875
12875
|
return /* @__PURE__ */ a("div", { className: "@container", children: [
|
|
12876
12876
|
/* @__PURE__ */ a("div", { className: "grid gap-4 grid-cols-1 @md:grid-cols-3", children: [
|
|
12877
12877
|
/* @__PURE__ */ a(q, { className: "@md:col-span-2", children: [
|
|
12878
12878
|
/* @__PURE__ */ a(Z, { className: "space-y-2", children: [
|
|
12879
12879
|
/* @__PURE__ */ e(fe, { className: "text-2xl font-semibold leading-tight", children: C && !p ? /* @__PURE__ */ e(f, { className: "h-7 w-2/3" }) : S }),
|
|
12880
|
-
|
|
12880
|
+
A ? /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: A }) : C && !p ? /* @__PURE__ */ e(f, { className: "h-4 w-4/5" }) : null
|
|
12881
12881
|
] }),
|
|
12882
12882
|
/* @__PURE__ */ a(G, { className: "space-y-6", children: [
|
|
12883
12883
|
/* @__PURE__ */ a("div", { className: "rounded-lg border bg-card p-4", children: [
|
|
@@ -12886,20 +12886,20 @@ function qf({
|
|
|
12886
12886
|
/* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: "Your Price" }),
|
|
12887
12887
|
/* @__PURE__ */ e("div", { className: "mt-1 text-3xl font-semibold tracking-tight", children: typeof M == "number" ? ue(M) : C ? /* @__PURE__ */ e(f, { className: "h-9 w-40" }) : null })
|
|
12888
12888
|
] }),
|
|
12889
|
-
typeof
|
|
12889
|
+
typeof $ == "number" && typeof Q == "number" ? /* @__PURE__ */ a("div", { className: "flex flex-col items-start @sm:items-end", children: [
|
|
12890
12890
|
/* @__PURE__ */ a(
|
|
12891
12891
|
xe,
|
|
12892
12892
|
{
|
|
12893
|
-
variant:
|
|
12893
|
+
variant: $ >= 0 ? "success" : "destructive",
|
|
12894
12894
|
className: "rounded-full px-3 py-1.5 text-sm font-semibold",
|
|
12895
12895
|
children: [
|
|
12896
|
-
|
|
12896
|
+
$ >= 0 ? "Potential Profit" : "Below MAP",
|
|
12897
12897
|
": ",
|
|
12898
|
-
ue(Math.abs(
|
|
12898
|
+
ue(Math.abs($))
|
|
12899
12899
|
]
|
|
12900
12900
|
}
|
|
12901
12901
|
),
|
|
12902
|
-
/* @__PURE__ */ e("div", { className: "mt-1 text-xs text-muted-foreground", children:
|
|
12902
|
+
/* @__PURE__ */ e("div", { className: "mt-1 text-xs text-muted-foreground", children: $ >= 0 ? `${Q}% margin vs MAP` : `${Math.abs(Q)}% under MAP` })
|
|
12903
12903
|
] }) : null
|
|
12904
12904
|
] }) : null,
|
|
12905
12905
|
/* @__PURE__ */ e(ke, { children: /* @__PURE__ */ a("div", { className: `${I ? "mt-5" : "mt-0"} grid grid-cols-1 gap-4 @sm:grid-cols-2`, children: [
|
|
@@ -12918,14 +12918,14 @@ function qf({
|
|
|
12918
12918
|
] }) }),
|
|
12919
12919
|
/* @__PURE__ */ e("div", { className: "font-medium", children: typeof k == "number" ? ue(k) : "—" })
|
|
12920
12920
|
] }),
|
|
12921
|
-
typeof
|
|
12921
|
+
typeof $ == "number" && typeof M == "number" && typeof k == "number" ? /* @__PURE__ */ a("div", { className: "text-right", children: [
|
|
12922
12922
|
/* @__PURE__ */ e("div", { className: "text-[11px] text-muted-foreground", children: "Profit vs MAP" }),
|
|
12923
12923
|
/* @__PURE__ */ a("div", { className: "text-sm font-semibold", children: [
|
|
12924
12924
|
ue(k),
|
|
12925
12925
|
" - ",
|
|
12926
12926
|
ue(M),
|
|
12927
12927
|
" = ",
|
|
12928
|
-
ue(
|
|
12928
|
+
ue($)
|
|
12929
12929
|
] })
|
|
12930
12930
|
] }) : null
|
|
12931
12931
|
] }),
|
|
@@ -13320,7 +13320,7 @@ const Wf = ({
|
|
|
13320
13320
|
s,
|
|
13321
13321
|
g
|
|
13322
13322
|
] });
|
|
13323
|
-
}, Gf = Vt.Root, Ch =
|
|
13323
|
+
}, Gf = Vt.Root, Ch = P.forwardRef(({ className: t, ...r }, n) => /* @__PURE__ */ e(
|
|
13324
13324
|
Vt.Item,
|
|
13325
13325
|
{
|
|
13326
13326
|
ref: n,
|
|
@@ -13329,7 +13329,7 @@ const Wf = ({
|
|
|
13329
13329
|
}
|
|
13330
13330
|
));
|
|
13331
13331
|
Ch.displayName = "AccordionItem";
|
|
13332
|
-
const kh =
|
|
13332
|
+
const kh = P.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ e(Vt.Header, { className: "flex", children: /* @__PURE__ */ a(
|
|
13333
13333
|
Vt.Trigger,
|
|
13334
13334
|
{
|
|
13335
13335
|
ref: s,
|
|
@@ -13345,7 +13345,7 @@ const kh = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__
|
|
|
13345
13345
|
}
|
|
13346
13346
|
) }));
|
|
13347
13347
|
kh.displayName = Vt.Trigger.displayName;
|
|
13348
|
-
const Rh =
|
|
13348
|
+
const Rh = P.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__ */ e(
|
|
13349
13349
|
Vt.Content,
|
|
13350
13350
|
{
|
|
13351
13351
|
ref: s,
|
|
@@ -13355,7 +13355,7 @@ const Rh = A.forwardRef(({ className: t, children: r, ...n }, s) => /* @__PURE__
|
|
|
13355
13355
|
}
|
|
13356
13356
|
));
|
|
13357
13357
|
Rh.displayName = Vt.Content.displayName;
|
|
13358
|
-
function
|
|
13358
|
+
function Ph({
|
|
13359
13359
|
className: t,
|
|
13360
13360
|
classNames: r,
|
|
13361
13361
|
showOutsideDays: n = !0,
|
|
@@ -13480,7 +13480,7 @@ function Ah({
|
|
|
13480
13480
|
...m
|
|
13481
13481
|
}
|
|
13482
13482
|
) : /* @__PURE__ */ e(Zl, { className: v("size-4", d), ...m }),
|
|
13483
|
-
DayButton:
|
|
13483
|
+
DayButton: Ah,
|
|
13484
13484
|
WeekNumber: ({ children: d, ...c }) => /* @__PURE__ */ e("td", { ...c, children: /* @__PURE__ */ e("div", { className: "flex size-[--cell-size] items-center justify-center text-center", children: d }) }),
|
|
13485
13485
|
...o
|
|
13486
13486
|
},
|
|
@@ -13488,14 +13488,14 @@ function Ah({
|
|
|
13488
13488
|
}
|
|
13489
13489
|
);
|
|
13490
13490
|
}
|
|
13491
|
-
function
|
|
13491
|
+
function Ah({
|
|
13492
13492
|
className: t,
|
|
13493
13493
|
day: r,
|
|
13494
13494
|
modifiers: n,
|
|
13495
13495
|
...s
|
|
13496
13496
|
}) {
|
|
13497
|
-
const i = Is(), l =
|
|
13498
|
-
return
|
|
13497
|
+
const i = Is(), l = P.useRef(null);
|
|
13498
|
+
return P.useEffect(() => {
|
|
13499
13499
|
n.focused && l.current?.focus();
|
|
13500
13500
|
}, [n.focused]), /* @__PURE__ */ e(
|
|
13501
13501
|
E,
|
|
@@ -13529,15 +13529,15 @@ function Rr(t) {
|
|
|
13529
13529
|
function Kr(t) {
|
|
13530
13530
|
return t instanceof Date && !Number.isNaN(t.getTime());
|
|
13531
13531
|
}
|
|
13532
|
-
function
|
|
13532
|
+
function Pr({
|
|
13533
13533
|
date: t,
|
|
13534
13534
|
onDateChange: r,
|
|
13535
13535
|
label: n,
|
|
13536
13536
|
id: s,
|
|
13537
13537
|
className: i
|
|
13538
13538
|
}) {
|
|
13539
|
-
const [l, o] =
|
|
13540
|
-
|
|
13539
|
+
const [l, o] = P.useState(!1), [u, h] = P.useState(t), [d, c] = P.useState(Rr(t));
|
|
13540
|
+
P.useEffect(() => {
|
|
13541
13541
|
c(Rr(t)), Kr(t) && h(t);
|
|
13542
13542
|
}, [t]);
|
|
13543
13543
|
const m = (g) => {
|
|
@@ -13585,7 +13585,7 @@ function Ar({
|
|
|
13585
13585
|
align: "end",
|
|
13586
13586
|
sideOffset: 8,
|
|
13587
13587
|
children: /* @__PURE__ */ e(
|
|
13588
|
-
|
|
13588
|
+
Ph,
|
|
13589
13589
|
{
|
|
13590
13590
|
mode: "single",
|
|
13591
13591
|
selected: t,
|
|
@@ -13716,7 +13716,7 @@ function Ih(t) {
|
|
|
13716
13716
|
const n = /* @__PURE__ */ new Date(), s = new Date(r.getFullYear(), r.getMonth(), r.getDate()), i = new Date(n.getFullYear(), n.getMonth(), n.getDate()), l = s.getTime() - i.getTime(), o = Math.ceil(l / (1e3 * 60 * 60 * 24));
|
|
13717
13717
|
return o < 0 ? { text: `Ended ${Math.abs(o)}d ago`, variant: "destructive", daysRemaining: o } : o === 0 ? { text: "Ends today", variant: "destructive", daysRemaining: o } : o <= 7 ? { text: `Ends in ${o}d`, variant: "destructive", daysRemaining: o } : o <= 30 ? { text: `Ends in ${o}d`, variant: "warning", daysRemaining: o } : { text: `Ends in ${o}d`, variant: "neutral", daysRemaining: o };
|
|
13718
13718
|
}
|
|
13719
|
-
const
|
|
13719
|
+
const Ar = (t) => {
|
|
13720
13720
|
if (!t) return "N/A";
|
|
13721
13721
|
try {
|
|
13722
13722
|
const r = new Date(t);
|
|
@@ -13844,9 +13844,9 @@ function Ri({
|
|
|
13844
13844
|
id: "statusInfo",
|
|
13845
13845
|
header: "Status",
|
|
13846
13846
|
cell: ({ row: D }) => {
|
|
13847
|
-
const L = D.original, M = L.Active === !0, I = Ih(L.EndDate),
|
|
13847
|
+
const L = D.original, M = L.Active === !0, I = Ih(L.EndDate), $ = M ? "success" : "secondary", Q = I.variant === "destructive" ? "destructive" : I.variant === "warning" ? "warning" : "secondary";
|
|
13848
13848
|
return /* @__PURE__ */ a("div", { className: "flex items-center space-x-2 min-w-[200px]", children: [
|
|
13849
|
-
/* @__PURE__ */ e(xe, { variant:
|
|
13849
|
+
/* @__PURE__ */ e(xe, { variant: $, className: "font-medium", children: M ? "Active" : "Inactive" }),
|
|
13850
13850
|
L.EndDate && /* @__PURE__ */ e(xe, { variant: Q, className: "font-medium", children: I.text }),
|
|
13851
13851
|
/* @__PURE__ */ e(ke, { delayDuration: 100, children: /* @__PURE__ */ a(we, { children: [
|
|
13852
13852
|
/* @__PURE__ */ e(Se, { asChild: !0, children: /* @__PURE__ */ e(E, { variant: "ghost", size: "icon", className: "h-6 w-6 p-0 data-[state=delayed-open]:bg-accent data-[state=instant-open]:bg-accent", children: /* @__PURE__ */ e(ys, { className: "h-4 w-4 text-muted-foreground" }) }) }),
|
|
@@ -13854,17 +13854,17 @@ function Ri({
|
|
|
13854
13854
|
/* @__PURE__ */ a("p", { children: [
|
|
13855
13855
|
/* @__PURE__ */ e("strong", { children: "Start:" }),
|
|
13856
13856
|
" ",
|
|
13857
|
-
|
|
13857
|
+
Ar(L.StartDate)
|
|
13858
13858
|
] }),
|
|
13859
13859
|
/* @__PURE__ */ a("p", { children: [
|
|
13860
13860
|
/* @__PURE__ */ e("strong", { children: "End:" }),
|
|
13861
13861
|
" ",
|
|
13862
|
-
|
|
13862
|
+
Ar(L.EndDate)
|
|
13863
13863
|
] }),
|
|
13864
13864
|
/* @__PURE__ */ a("p", { children: [
|
|
13865
13865
|
/* @__PURE__ */ e("strong", { children: "Updated:" }),
|
|
13866
13866
|
" ",
|
|
13867
|
-
|
|
13867
|
+
Ar(L.LastUpdate)
|
|
13868
13868
|
] })
|
|
13869
13869
|
] }) })
|
|
13870
13870
|
] }) })
|
|
@@ -13879,7 +13879,7 @@ function Ri({
|
|
|
13879
13879
|
const L = D.original;
|
|
13880
13880
|
if (!L.BidNumber)
|
|
13881
13881
|
return /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "Actions unavailable" });
|
|
13882
|
-
const M = L.BidNumber, I = i[M]?.isSettingDefault,
|
|
13882
|
+
const M = L.BidNumber, I = i[M]?.isSettingDefault, $ = c?.BidNumber === M && i[M]?.isSendingReport, Q = I || $, z = L.CanBeSetAsDefault === !0, _ = p?.IsManufacturer ? `/${t}/Opportunity/${L.BidNumber}` : `/${t}/Opportunity/${L.ManufacturerId}/${L.BidNumber}`;
|
|
13883
13883
|
return /* @__PURE__ */ a("div", { className: "flex space-x-2", children: [
|
|
13884
13884
|
/* @__PURE__ */ e(Te, { to: _, children: /* @__PURE__ */ a(E, { variant: "outline", size: "sm", className: "flex items-center", children: [
|
|
13885
13885
|
/* @__PURE__ */ e(Ga, { className: "mr-2 h-4 w-4" }),
|
|
@@ -13891,7 +13891,7 @@ function Ri({
|
|
|
13891
13891
|
" Set Default"
|
|
13892
13892
|
] }),
|
|
13893
13893
|
/* @__PURE__ */ a(E, { variant: "outline", size: "sm", onClick: () => b(L), disabled: Q, title: "Send report by email", className: "flex items-center", children: [
|
|
13894
|
-
|
|
13894
|
+
$ ? /* @__PURE__ */ e(he, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Xt, { className: "mr-2 h-4 w-4" }),
|
|
13895
13895
|
" Send Report"
|
|
13896
13896
|
] })
|
|
13897
13897
|
] })
|
|
@@ -13920,7 +13920,7 @@ function Ri({
|
|
|
13920
13920
|
D.opportunityDisplay = M;
|
|
13921
13921
|
}
|
|
13922
13922
|
return D;
|
|
13923
|
-
}, [r]),
|
|
13923
|
+
}, [r]), A = r || [], k = c?.BidNumber ? i[c.BidNumber]?.isSendingReport : !1;
|
|
13924
13924
|
return n ? /* @__PURE__ */ a(q, { className: "w-full", children: [
|
|
13925
13925
|
/* @__PURE__ */ a(Z, { children: [
|
|
13926
13926
|
" ",
|
|
@@ -13950,9 +13950,9 @@ function Ri({
|
|
|
13950
13950
|
/* @__PURE__ */ e(fe, { className: "text-1xl font-bold", children: "Opportunities" }),
|
|
13951
13951
|
" "
|
|
13952
13952
|
] }),
|
|
13953
|
-
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(Qt, { columns: C, data:
|
|
13953
|
+
/* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(Qt, { columns: C, data: A, uniqueValues: S }) })
|
|
13954
13954
|
] }),
|
|
13955
|
-
/* @__PURE__ */ e(
|
|
13955
|
+
/* @__PURE__ */ e($e, { open: o, onOpenChange: (D) => {
|
|
13956
13956
|
u(D), D || (m(null), d(""));
|
|
13957
13957
|
}, children: /* @__PURE__ */ a(Be, { className: "@sm:max-w-[425px]", children: [
|
|
13958
13958
|
/* @__PURE__ */ a(qe, { children: [
|
|
@@ -14027,7 +14027,7 @@ function Jf({
|
|
|
14027
14027
|
formatDayLabel: s = (l) => Oh.format(l),
|
|
14028
14028
|
formatTimeLabel: i = (l) => Eh.format(l)
|
|
14029
14029
|
}) {
|
|
14030
|
-
const l =
|
|
14030
|
+
const l = P.useMemo(() => Th(t), [t]);
|
|
14031
14031
|
return l.length === 0 ? /* @__PURE__ */ e("p", { className: v("text-sm text-muted-foreground", n), children: r }) : /* @__PURE__ */ e("div", { className: v("space-y-6", n), children: l.map((o) => /* @__PURE__ */ a("section", { className: "space-y-2", children: [
|
|
14032
14032
|
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold text-foreground", children: s(o.day) }),
|
|
14033
14033
|
/* @__PURE__ */ e("div", { className: "space-y-2", children: o.entries.map((u, h) => {
|
|
@@ -14055,21 +14055,21 @@ function Ir(t, r, n) {
|
|
|
14055
14055
|
};
|
|
14056
14056
|
return `#${i(0)}${i(8)}${i(4)}`;
|
|
14057
14057
|
}
|
|
14058
|
-
const
|
|
14058
|
+
const Pi = P.forwardRef(
|
|
14059
14059
|
({ data: t, options: r, height: n = "500px", className: s, loading: i, disableClick: l = !0, ...o }, u) => {
|
|
14060
|
-
const h =
|
|
14061
|
-
|
|
14060
|
+
const h = P.useRef(null), [d, c] = P.useState(null);
|
|
14061
|
+
P.useEffect(() => {
|
|
14062
14062
|
if (!h.current) return;
|
|
14063
14063
|
const g = h.current, N = () => {
|
|
14064
14064
|
const y = getComputedStyle(g).getPropertyValue("--primary").trim();
|
|
14065
14065
|
if (y) {
|
|
14066
14066
|
const C = Lh(y);
|
|
14067
14067
|
if (C) {
|
|
14068
|
-
const { h: S, s:
|
|
14068
|
+
const { h: S, s: A, l: k } = C;
|
|
14069
14069
|
c({
|
|
14070
|
-
minColor: Ir(S,
|
|
14071
|
-
midColor: Ir(S,
|
|
14072
|
-
maxColor: Ir(S,
|
|
14070
|
+
minColor: Ir(S, A, Math.min(100, k + 50)),
|
|
14071
|
+
midColor: Ir(S, A, Math.min(100, k + 35)),
|
|
14072
|
+
maxColor: Ir(S, A, Math.min(100, k + 20))
|
|
14073
14073
|
});
|
|
14074
14074
|
}
|
|
14075
14075
|
return !0;
|
|
@@ -14086,7 +14086,7 @@ const Ai = A.forwardRef(
|
|
|
14086
14086
|
b && clearInterval(b);
|
|
14087
14087
|
};
|
|
14088
14088
|
}, []);
|
|
14089
|
-
const m =
|
|
14089
|
+
const m = P.useMemo(() => {
|
|
14090
14090
|
const g = {
|
|
14091
14091
|
headerHeight: 0,
|
|
14092
14092
|
fontSize: 14,
|
|
@@ -14103,7 +14103,7 @@ const Ai = A.forwardRef(
|
|
|
14103
14103
|
}
|
|
14104
14104
|
};
|
|
14105
14105
|
return d && (!r || !r.colorAxis) && (g.minColor = d.minColor, g.midColor = d.midColor, g.maxColor = d.maxColor), { ...g, ...r };
|
|
14106
|
-
}, [t, r, d]), p =
|
|
14106
|
+
}, [t, r, d]), p = P.useMemo(() => l ? [{
|
|
14107
14107
|
eventName: "select",
|
|
14108
14108
|
// react-google-charts is not officially maintained by Google and not up
|
|
14109
14109
|
// to date with the GoogleChartWrapper type, setSelection is missing
|
|
@@ -14112,7 +14112,7 @@ const Ai = A.forwardRef(
|
|
|
14112
14112
|
N.getChart().setSelection(null);
|
|
14113
14113
|
}
|
|
14114
14114
|
}] : void 0, [l]);
|
|
14115
|
-
return
|
|
14115
|
+
return P.useImperativeHandle(u, () => h.current, []), i ? /* @__PURE__ */ e("div", { ref: h, className: v("w-full", s), style: { height: n }, ...o, children: /* @__PURE__ */ e(f, { className: "h-full w-full" }) }) : !t || t.length <= 2 ? /* @__PURE__ */ e("div", { ref: h, className: v("w-full flex items-center justify-center text-muted-foreground", s), style: { height: n }, ...o, children: "No data available" }) : /* @__PURE__ */ e("div", { ref: h, className: v("w-full", s), style: { height: n }, ...o, children: /* @__PURE__ */ e(
|
|
14116
14116
|
Oc,
|
|
14117
14117
|
{
|
|
14118
14118
|
chartType: "TreeMap",
|
|
@@ -14126,7 +14126,7 @@ const Ai = A.forwardRef(
|
|
|
14126
14126
|
) });
|
|
14127
14127
|
}
|
|
14128
14128
|
);
|
|
14129
|
-
|
|
14129
|
+
Pi.displayName = "Treemap";
|
|
14130
14130
|
const Zf = ({
|
|
14131
14131
|
data: t,
|
|
14132
14132
|
topPercent: r = 80,
|
|
@@ -14134,7 +14134,7 @@ const Zf = ({
|
|
|
14134
14134
|
loading: s,
|
|
14135
14135
|
...i
|
|
14136
14136
|
}) => {
|
|
14137
|
-
const l =
|
|
14137
|
+
const l = P.useMemo(() => {
|
|
14138
14138
|
if (!t || t.length === 0)
|
|
14139
14139
|
return [["ID", "Parent", "Value"], ["Root", null, 0]];
|
|
14140
14140
|
const u = [...t].sort((N, w) => w.value - N.value), d = u.reduce((N, w) => N + w.value, 0) * (r / 100), c = [
|
|
@@ -14153,13 +14153,13 @@ const Zf = ({
|
|
|
14153
14153
|
});
|
|
14154
14154
|
}
|
|
14155
14155
|
return c;
|
|
14156
|
-
}, [t, r]), o =
|
|
14156
|
+
}, [t, r]), o = P.useMemo(() => ({
|
|
14157
14157
|
title: n,
|
|
14158
14158
|
maxDepth: 1,
|
|
14159
14159
|
backgroundColor: "transparent"
|
|
14160
14160
|
}), [n]);
|
|
14161
14161
|
return /* @__PURE__ */ e(
|
|
14162
|
-
|
|
14162
|
+
Pi,
|
|
14163
14163
|
{
|
|
14164
14164
|
data: l,
|
|
14165
14165
|
options: o,
|
|
@@ -14175,18 +14175,18 @@ const Zf = ({
|
|
|
14175
14175
|
"reseller-theme",
|
|
14176
14176
|
"manufacturer-theme",
|
|
14177
14177
|
"shopify-theme"
|
|
14178
|
-
],
|
|
14178
|
+
], Fh = {
|
|
14179
14179
|
central: "central-theme",
|
|
14180
14180
|
partner: "partner-theme",
|
|
14181
14181
|
reseller: "reseller-theme",
|
|
14182
14182
|
manufacturer: "manufacturer-theme",
|
|
14183
14183
|
shopify: "shopify-theme"
|
|
14184
|
-
},
|
|
14185
|
-
function
|
|
14184
|
+
}, $h = 10;
|
|
14185
|
+
function Ai(t, r, n = 0) {
|
|
14186
14186
|
const s = t.trim();
|
|
14187
|
-
return !s || n >
|
|
14187
|
+
return !s || n > $h || !s.includes("var(") ? s : s.replace(/var\(\s*(--[\w-]+)\s*(?:,\s*([^)]+))?\)/g, (i, l, o) => {
|
|
14188
14188
|
const h = r.getPropertyValue(l).trim() || o?.trim() || "";
|
|
14189
|
-
return h ?
|
|
14189
|
+
return h ? Ai(h, r, n + 1) : "";
|
|
14190
14190
|
}).trim();
|
|
14191
14191
|
}
|
|
14192
14192
|
function Bh(t) {
|
|
@@ -14202,7 +14202,7 @@ function Bh(t) {
|
|
|
14202
14202
|
function Mr(t) {
|
|
14203
14203
|
const r = getComputedStyle(t), n = r.getPropertyValue("--primary").trim();
|
|
14204
14204
|
if (!n) return null;
|
|
14205
|
-
const s =
|
|
14205
|
+
const s = Ai(n, r) || n;
|
|
14206
14206
|
return Bh(s);
|
|
14207
14207
|
}
|
|
14208
14208
|
function zh() {
|
|
@@ -14245,7 +14245,7 @@ function Xf({
|
|
|
14245
14245
|
(c) => d.classList.contains(c)
|
|
14246
14246
|
));
|
|
14247
14247
|
for (const c of Dr) d.classList.remove(c);
|
|
14248
|
-
return s !== "default" && d.classList.add(
|
|
14248
|
+
return s !== "default" && d.classList.add(Fh[s]), () => {
|
|
14249
14249
|
for (const c of Dr) d.classList.remove(c);
|
|
14250
14250
|
for (const c of i.current ?? []) d.classList.add(c);
|
|
14251
14251
|
};
|
|
@@ -14292,7 +14292,7 @@ export {
|
|
|
14292
14292
|
wi as AlertDialogTrigger,
|
|
14293
14293
|
Ot as AlertTitle,
|
|
14294
14294
|
gm as ApiImage,
|
|
14295
|
-
|
|
14295
|
+
Fd as AreaChart,
|
|
14296
14296
|
Kf as AssistantChat,
|
|
14297
14297
|
cr as Avatar,
|
|
14298
14298
|
du as AvatarFallback,
|
|
@@ -14300,7 +14300,7 @@ export {
|
|
|
14300
14300
|
cu as AvatarImage,
|
|
14301
14301
|
xe as Badge,
|
|
14302
14302
|
E as Button,
|
|
14303
|
-
|
|
14303
|
+
Ph as Calendar,
|
|
14304
14304
|
q as Card,
|
|
14305
14305
|
G as CardContent,
|
|
14306
14306
|
Ia as CardDescription,
|
|
@@ -14323,8 +14323,8 @@ export {
|
|
|
14323
14323
|
pm as CountryFlag,
|
|
14324
14324
|
zf as DataRefreshAssistantCluster,
|
|
14325
14325
|
Qt as DataTable,
|
|
14326
|
-
|
|
14327
|
-
|
|
14326
|
+
Pr as DatePicker,
|
|
14327
|
+
$e as Dialog,
|
|
14328
14328
|
Qn as DialogClose,
|
|
14329
14329
|
Be as DialogContent,
|
|
14330
14330
|
Ge as DialogDescription,
|
|
@@ -14347,9 +14347,9 @@ export {
|
|
|
14347
14347
|
jc as DropdownMenuShortcut,
|
|
14348
14348
|
vf as DropdownMenuSub,
|
|
14349
14349
|
Bc as DropdownMenuSubContent,
|
|
14350
|
-
|
|
14351
|
-
|
|
14352
|
-
|
|
14350
|
+
$c as DropdownMenuSubTrigger,
|
|
14351
|
+
Fc as DropdownMenuTrigger,
|
|
14352
|
+
Pf as ExploreManufacturers,
|
|
14353
14353
|
Yf as ExternalProductCard,
|
|
14354
14354
|
Ef as GeneralDocumentCard,
|
|
14355
14355
|
le as Input,
|
|
@@ -14363,7 +14363,7 @@ export {
|
|
|
14363
14363
|
yi as ManufacturerGetStartedButton,
|
|
14364
14364
|
Vu as ManufacturerOverviewPage,
|
|
14365
14365
|
Lm as ManufacturerReorderingCard,
|
|
14366
|
-
|
|
14366
|
+
Fm as MultiSelect,
|
|
14367
14367
|
Om as Navbar,
|
|
14368
14368
|
Ri as OpportunitiesTable,
|
|
14369
14369
|
Za as OrdersCard,
|
|
@@ -14387,9 +14387,9 @@ export {
|
|
|
14387
14387
|
Da as Progress,
|
|
14388
14388
|
pa as RadioGroup,
|
|
14389
14389
|
Rt as RadioGroupItem,
|
|
14390
|
-
|
|
14390
|
+
Af as RandmarApiConfigProvider,
|
|
14391
14391
|
th as RefreshCluster,
|
|
14392
|
-
|
|
14392
|
+
Ff as ResellerBillingOverviewCard,
|
|
14393
14393
|
im as ResellerCard,
|
|
14394
14394
|
rm as ResellerOverview,
|
|
14395
14395
|
Wm as ResellerQualificationsCard,
|
|
@@ -14398,8 +14398,8 @@ export {
|
|
|
14398
14398
|
_f as RmBodyZone,
|
|
14399
14399
|
ih as RmPageHeader,
|
|
14400
14400
|
la as SalesChart,
|
|
14401
|
-
|
|
14402
|
-
|
|
14401
|
+
$f as SalesOverviewCard,
|
|
14402
|
+
Pt as ScrollArea,
|
|
14403
14403
|
sn as ScrollBar,
|
|
14404
14404
|
Nh as SearchNoResultsCard,
|
|
14405
14405
|
Wf as SearchPage,
|
|
@@ -14426,7 +14426,7 @@ export {
|
|
|
14426
14426
|
Kc as SheetPortal,
|
|
14427
14427
|
Xc as SheetTitle,
|
|
14428
14428
|
Sf as SheetTrigger,
|
|
14429
|
-
|
|
14429
|
+
$s as Sidebar,
|
|
14430
14430
|
Us as SidebarContent,
|
|
14431
14431
|
Vs as SidebarFooter,
|
|
14432
14432
|
ud as SidebarGroup,
|
|
@@ -14445,13 +14445,13 @@ export {
|
|
|
14445
14445
|
xd as SidebarMenuSub,
|
|
14446
14446
|
vd as SidebarMenuSubButton,
|
|
14447
14447
|
Nd as SidebarMenuSubItem,
|
|
14448
|
-
|
|
14448
|
+
Fs as SidebarProvider,
|
|
14449
14449
|
ld as SidebarRail,
|
|
14450
14450
|
dd as SidebarSeparator,
|
|
14451
14451
|
Bs as SidebarTrigger,
|
|
14452
14452
|
f as Skeleton,
|
|
14453
14453
|
Bf as SummaryOverviewCard,
|
|
14454
|
-
|
|
14454
|
+
Aa as Switch,
|
|
14455
14455
|
Jf as SystemLogFeed,
|
|
14456
14456
|
zr as Table,
|
|
14457
14457
|
Ur as TableBody,
|
|
@@ -14480,20 +14480,20 @@ export {
|
|
|
14480
14480
|
Se as TooltipTrigger,
|
|
14481
14481
|
Zf as TopPercentTreemap,
|
|
14482
14482
|
hi as Topbar,
|
|
14483
|
-
|
|
14483
|
+
Pi as Treemap,
|
|
14484
14484
|
ju as badgeVariants,
|
|
14485
|
-
|
|
14485
|
+
At as buildApiUrl,
|
|
14486
14486
|
aa as buttonVariants,
|
|
14487
14487
|
ue as formatMoney,
|
|
14488
14488
|
xt as formatNumber,
|
|
14489
14489
|
ya as formatYYYYMMDDIntToDateString,
|
|
14490
14490
|
Th as groupSystemLogEntries,
|
|
14491
|
-
|
|
14491
|
+
Ad as toast,
|
|
14492
14492
|
dr as useApiOrigin,
|
|
14493
14493
|
Na as useChat,
|
|
14494
14494
|
td as useIsMobile,
|
|
14495
14495
|
Dd as useOptionalChat,
|
|
14496
14496
|
ei as useRandmarApiConfig,
|
|
14497
|
-
|
|
14497
|
+
Pa as useSidebar,
|
|
14498
14498
|
Ee as useToast
|
|
14499
14499
|
};
|