@epam/ai-dial-catalog 1.2.0-dev.21 → 1.2.0-dev.28
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/components/Catalog/Catalog.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +1406 -1401
- package/models/catalog-props.d.ts +23 -0
- package/models/catalog-props.d.ts.map +1 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, y } from "./mapping-DtxJk1HM.js";
|
|
2
|
-
import { CatalogEntityType as b, DESKTOP_BREAKPOINT_PX as x, DeploymentIcon as S, EntityHeader as C, EntityTypeLabel as w, FeaturedChip as T, ItemHeader as E, MarkdownCodeBlock as D, MarkdownRenderer as O, MarkdownWithPlaceholders as
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { ButtonAppearance as
|
|
5
|
-
import { IconAlertTriangleFilled as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { PublishFooter as
|
|
8
|
-
import { Grid as
|
|
2
|
+
import { CatalogEntityType as b, DESKTOP_BREAKPOINT_PX as x, DeploymentIcon as S, EntityHeader as C, EntityTypeLabel as w, FeaturedChip as T, ItemHeader as E, MarkdownCodeBlock as D, MarkdownRenderer as O, MarkdownWithPlaceholders as ee, PanelEmptyState as te, ResourceSummary as ne, SELECT_LIST_MAX_HEIGHT_CLASS_NAME as re, buildCssVars as ie, mergeClasses as k } from "@epam/ai-dial-chat-shared";
|
|
3
|
+
import { Fragment as ae, memo as oe, useCallback as A, useEffect as j, useLayoutEffect as se, useMemo as M, useRef as N, useState as P } from "react";
|
|
4
|
+
import { ButtonAppearance as F, ButtonDropdown as ce, ButtonVariant as le, CardShell as I, CloseButton as ue, DIAL_ICON_SIZE as L, DIAL_KIT_ICON_STROKE as R, DangerButton as de, Dropdown as fe, ElementSize as pe, EllipsisTooltip as me, FolderPath as he, GhostButton as ge, GhostIconButton as _e, Highlight as ve, InlineSelect as ye, InlineSelectTrigger as be, Input as xe, LinkButton as z, MenuItem as Se, MenuItemMark as Ce, NeutralButton as we, NeutralIconButton as Te, PrimaryButton as Ee, ProgressBar as De, RadioGroup as Oe, Search as ke, SegmentedControl as Ae, Skeleton as je, SkeletonAvatarShape as B, Spinner as Me, Tabs as Ne, ToggleIconButton as Pe, Tooltip as Fe, mergeClasses as V } from "@epam/ai-dial-ui-kit";
|
|
5
|
+
import { IconAlertTriangleFilled as Ie, IconArrowRight as Le, IconBuildingCommunity as Re, IconCheck as ze, IconChevronDown as Be, IconChevronLeft as Ve, IconChevronRight as He, IconCircleCheckFilled as Ue, IconDots as We, IconDownload as Ge, IconFilter as Ke, IconFolder as qe, IconKey as Je, IconLayoutGrid as Ye, IconLayoutList as Xe, IconLogin as Ze, IconLogout as Qe, IconPencil as $e, IconPlayerPlayFilled as et, IconPlus as tt, IconShare as nt, IconStar as rt, IconStarFilled as H, IconTrash as it, IconTrashX as at, IconUser as ot, IconUserOff as st, IconWorldOff as ct, IconWorldShare as lt } from "@tabler/icons-react";
|
|
6
|
+
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
7
|
+
import { PublishFooter as ut, PublishPanel as dt, derivePublishState as ft, usePublishFlow as pt } from "@epam/ai-dial-publish-panel";
|
|
8
|
+
import { Grid as mt } from "@epam/ai-dial-ui-kit/grid";
|
|
9
9
|
//#region src/types/code-language.ts
|
|
10
|
-
var
|
|
10
|
+
var ht = /* @__PURE__ */ function(e) {
|
|
11
11
|
return e.Python = "python", e.Curl = "curl", e.JavaScript = "javascript", e;
|
|
12
|
-
}({}),
|
|
12
|
+
}({}), K = /* @__PURE__ */ function(e) {
|
|
13
13
|
return e.About = "about", e.Content = "content", e.Overview = "overview", e.Pricing = "pricing", e.Limits = "limits", e.Api = "api", e.Tools = "tools", e;
|
|
14
|
-
}({}),
|
|
14
|
+
}({}), gt = /* @__PURE__ */ function(e) {
|
|
15
15
|
return e.RunningLow = "runningLow", e.LimitReached = "limitReached", e;
|
|
16
|
-
}({}),
|
|
16
|
+
}({}), q = /* @__PURE__ */ function(e) {
|
|
17
17
|
return e.Delete = "delete", e.Logout = "logout", e.Unshare = "unshare", e.RevokeAccess = "revokeAccess", e.DeleteApiKey = "deleteApiKey", e.Unpublish = "unpublish", e;
|
|
18
|
-
}({}),
|
|
18
|
+
}({}), J = /* @__PURE__ */ function(e) {
|
|
19
19
|
return e.Danger = "danger", e.Info = "info", e;
|
|
20
|
-
}({}),
|
|
20
|
+
}({}), _t = /* @__PURE__ */ function(e) {
|
|
21
21
|
return e.SM = "sm", e.LG = "lg", e;
|
|
22
|
-
}({}),
|
|
22
|
+
}({}), Y = /* @__PURE__ */ function(e) {
|
|
23
23
|
return e.Grid = "grid", e.Cards = "cards", e;
|
|
24
|
-
}({}),
|
|
24
|
+
}({}), X = /* @__PURE__ */ function(e) {
|
|
25
25
|
return e.File = "file", e.Folder = "folder", e;
|
|
26
|
-
}({}),
|
|
26
|
+
}({}), vt = /* @__PURE__ */ function(e) {
|
|
27
27
|
return e.Markdown = "markdown", e.Text = "text", e.Image = "image", e.Unsupported = "unsupported", e;
|
|
28
|
-
}({}),
|
|
29
|
-
let [e, t] =
|
|
30
|
-
return
|
|
28
|
+
}({}), yt = () => {
|
|
29
|
+
let [e, t] = P(() => window.innerWidth);
|
|
30
|
+
return j(() => {
|
|
31
31
|
let e = () => t(window.innerWidth);
|
|
32
32
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
33
33
|
}, []), e >= 1024 ? 4 : e >= 640 ? 2 : 1;
|
|
34
|
-
},
|
|
34
|
+
}, bt = (e) => {
|
|
35
35
|
let { colors: t } = e ?? {};
|
|
36
|
-
return
|
|
36
|
+
return ie({
|
|
37
37
|
"--cat-bg": t?.background,
|
|
38
38
|
"--cat-heading-title-text": t?.headingTitleText
|
|
39
39
|
});
|
|
40
|
-
},
|
|
40
|
+
}, xt = 1180, Z = (e) => e >= 1280 ? 4 : e >= 966 ? 3 : e >= 620 ? 2 : 1, St = (e) => {
|
|
41
41
|
if (!e || e === document.body) return document.documentElement;
|
|
42
42
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
43
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
44
|
-
},
|
|
45
|
-
let r =
|
|
43
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : St(e.parentElement);
|
|
44
|
+
}, Ct = 10, wt = 10, Tt = 30, Et = (e, t, n = Ct) => {
|
|
45
|
+
let r = N(null), [i, a] = P({
|
|
46
46
|
start: 0,
|
|
47
|
-
end:
|
|
47
|
+
end: Tt
|
|
48
48
|
});
|
|
49
|
-
|
|
49
|
+
j(() => {
|
|
50
50
|
let i = r.current;
|
|
51
51
|
if (!i) return;
|
|
52
|
-
let o =
|
|
52
|
+
let o = St(i.parentElement), s = () => {
|
|
53
53
|
let r = o.clientHeight;
|
|
54
54
|
if (r === 0) return;
|
|
55
|
-
let s = i.getBoundingClientRect().top, c = o.getBoundingClientRect().top, l = Math.max(0, c - s), u = Math.floor(l / t), d = Math.ceil(r / t), f = Math.max(0, Math.floor((u - n) /
|
|
55
|
+
let s = i.getBoundingClientRect().top, c = o.getBoundingClientRect().top, l = Math.max(0, c - s), u = Math.floor(l / t), d = Math.ceil(r / t), f = Math.max(0, Math.floor((u - n) / wt) * wt), p = Math.min(e, Math.ceil((u + d + n) / wt) * wt);
|
|
56
56
|
a((e) => e.start === f && e.end === p ? e : {
|
|
57
57
|
start: f,
|
|
58
58
|
end: p
|
|
@@ -68,26 +68,26 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
68
68
|
t,
|
|
69
69
|
n
|
|
70
70
|
]);
|
|
71
|
-
let o = Math.max(0, Math.floor((e - 1) /
|
|
71
|
+
let o = Math.max(0, Math.floor((e - 1) / wt) * wt), s = Math.min(i.start, o);
|
|
72
72
|
return {
|
|
73
73
|
containerRef: r,
|
|
74
74
|
startRow: s,
|
|
75
|
-
endRow: Math.min(e, Math.max(i.end, s +
|
|
75
|
+
endRow: Math.min(e, Math.max(i.end, s + wt))
|
|
76
76
|
};
|
|
77
|
-
},
|
|
78
|
-
let r =
|
|
79
|
-
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= x ? 60 : 0)), i =
|
|
77
|
+
}, Dt = (e, { overscan: t = 3, isFullWidth: n = !1 } = {}) => {
|
|
78
|
+
let r = N(null), [i, a] = P(() => {
|
|
79
|
+
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= x ? 60 : 0)), i = Z((n ? r : Math.min(xt, r)) - 64), a = Math.ceil(e / i);
|
|
80
80
|
return {
|
|
81
81
|
startRow: 0,
|
|
82
82
|
endRow: Math.min(a, 12),
|
|
83
83
|
columnCount: i
|
|
84
84
|
};
|
|
85
85
|
});
|
|
86
|
-
|
|
86
|
+
j(() => {
|
|
87
87
|
let n = r.current;
|
|
88
88
|
if (!n) return;
|
|
89
|
-
let i =
|
|
90
|
-
let r = n.getBoundingClientRect(), o = i.getBoundingClientRect(), s = i.clientHeight, c = n.clientWidth, l =
|
|
89
|
+
let i = St(n.parentElement), o = () => {
|
|
90
|
+
let r = n.getBoundingClientRect(), o = i.getBoundingClientRect(), s = i.clientHeight, c = n.clientWidth, l = Z(c), u = Math.ceil(e / l), d = Math.max(0, o.top - r.top), f = Math.max(0, Math.floor(d / 268) - t);
|
|
91
91
|
a({
|
|
92
92
|
startRow: f,
|
|
93
93
|
endRow: Math.min(u, f + Math.ceil(s / 268) + 2 * t),
|
|
@@ -109,7 +109,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
109
109
|
rowCount: o,
|
|
110
110
|
totalHeight: o * 268
|
|
111
111
|
};
|
|
112
|
-
},
|
|
112
|
+
}, Ot = {
|
|
113
113
|
skeletonColor: "var(--cg-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
|
|
114
114
|
card: "_card_18c2b_2",
|
|
115
115
|
emptyStarHidden: "_emptyStarHidden_18c2b_2",
|
|
@@ -119,106 +119,106 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
119
119
|
selectedCard: "_selectedCard_18c2b_37",
|
|
120
120
|
checkIcon: "_checkIcon_18c2b_42",
|
|
121
121
|
footer: "_footer_18c2b_46"
|
|
122
|
-
},
|
|
122
|
+
}, kt = {
|
|
123
123
|
name: "_name_188yo_1",
|
|
124
124
|
lastUsed: "_lastUsed_188yo_5",
|
|
125
125
|
version: "_version_188yo_9"
|
|
126
|
-
},
|
|
127
|
-
let f = c?.colors, p = c?.typography ?? {}, m = a ===
|
|
126
|
+
}, At = ({ icon: e, type: t, name: n, version: r, lastUsed: i, size: a, query: o, className: s, styles: c, lastUsedTrailing: l, iconClassName: u, iconOverlay: d }) => {
|
|
127
|
+
let f = c?.colors, p = c?.typography ?? {}, m = a === _t.LG, h = m ? "size-[52px] rounded-[14px]" : "size-[44px] rounded-lg", g = m ? 54 : 44, _ = ie({
|
|
128
128
|
"--ai-name-text": f?.nameColor,
|
|
129
129
|
"--ai-last-used-text": f?.lastUsedColor,
|
|
130
130
|
"--ai-version-text": f?.versionColor
|
|
131
131
|
});
|
|
132
|
-
return /* @__PURE__ */
|
|
133
|
-
className:
|
|
132
|
+
return /* @__PURE__ */ G("div", {
|
|
133
|
+
className: k("flex min-w-0 items-start gap-3", s),
|
|
134
134
|
style: _,
|
|
135
|
-
children: [/* @__PURE__ */
|
|
136
|
-
className:
|
|
137
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ G("div", {
|
|
136
|
+
className: k("relative flex-shrink-0", h, u),
|
|
137
|
+
children: [/* @__PURE__ */ W("div", {
|
|
138
138
|
className: "size-full overflow-hidden rounded-[inherit]",
|
|
139
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ W(S, {
|
|
140
140
|
src: e ?? void 0,
|
|
141
141
|
size: g,
|
|
142
142
|
initialsName: n,
|
|
143
|
-
styles: { badgeClassName:
|
|
143
|
+
styles: { badgeClassName: k(m ? "rounded-[14px]" : "rounded-[12px]") }
|
|
144
144
|
})
|
|
145
145
|
}), d]
|
|
146
|
-
}), /* @__PURE__ */
|
|
146
|
+
}), /* @__PURE__ */ G("div", {
|
|
147
147
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
148
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ W(w, {
|
|
149
149
|
type: t,
|
|
150
150
|
className: p?.typeClassName
|
|
151
|
-
}), /* @__PURE__ */
|
|
151
|
+
}), /* @__PURE__ */ G("div", {
|
|
152
152
|
className: "flex min-w-0 flex-col",
|
|
153
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ G("div", {
|
|
154
154
|
className: "flex min-w-0 items-start gap-1 overflow-hidden",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
156
|
-
text: o ? /* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ W(me, {
|
|
156
|
+
text: o ? /* @__PURE__ */ W(ve, {
|
|
157
157
|
text: n,
|
|
158
158
|
query: o
|
|
159
159
|
}) : n,
|
|
160
|
-
className:
|
|
161
|
-
}), r && /* @__PURE__ */
|
|
160
|
+
className: k("min-w-0 flex-1", p?.nameClassName ?? "dial-body-semi-text", kt.name)
|
|
161
|
+
}), r && /* @__PURE__ */ W(me, {
|
|
162
162
|
text: r,
|
|
163
|
-
className:
|
|
163
|
+
className: k("max-w-[30%] shrink-0 tabular-nums", p?.versionClassName ?? "dial-tiny-text", kt.version)
|
|
164
164
|
})]
|
|
165
|
-
}), m && i != null && /* @__PURE__ */
|
|
165
|
+
}), m && i != null && /* @__PURE__ */ G("div", {
|
|
166
166
|
className: "flex items-center gap-2",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
168
|
-
className:
|
|
167
|
+
children: [/* @__PURE__ */ W("span", {
|
|
168
|
+
className: k("tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text", kt.lastUsed),
|
|
169
169
|
children: i
|
|
170
170
|
}), l]
|
|
171
171
|
})]
|
|
172
172
|
})]
|
|
173
173
|
})]
|
|
174
174
|
});
|
|
175
|
-
},
|
|
175
|
+
}, jt = { icon: "_icon_a0p4u_1" }, Mt = ({ credentials: e, loggedOutLabel: t = "Authorize to use this toolset.", className: n, colors: r }) => e == null || g(e) == null ? null : /* @__PURE__ */ W(Fe, {
|
|
176
176
|
tooltip: t,
|
|
177
177
|
asChild: !0,
|
|
178
|
-
children: /* @__PURE__ */
|
|
178
|
+
children: /* @__PURE__ */ W("span", {
|
|
179
179
|
role: "img",
|
|
180
180
|
"aria-label": t,
|
|
181
|
-
style:
|
|
181
|
+
style: ie({
|
|
182
182
|
"--cat-cred-badge-halo": r?.halo,
|
|
183
183
|
"--cat-cred-badge-icon": r?.icon
|
|
184
184
|
}),
|
|
185
|
-
className:
|
|
186
|
-
children: /* @__PURE__ */
|
|
187
|
-
size:
|
|
188
|
-
className:
|
|
185
|
+
className: k("absolute -bottom-1 -end-1 shrink-0", n),
|
|
186
|
+
children: /* @__PURE__ */ W(Ie, {
|
|
187
|
+
size: L.SM,
|
|
188
|
+
className: jt.icon,
|
|
189
189
|
"aria-hidden": !0
|
|
190
190
|
})
|
|
191
191
|
})
|
|
192
|
-
}),
|
|
192
|
+
}), Q = {
|
|
193
193
|
starFilledIcon: "_starFilledIcon_po6zj_1",
|
|
194
194
|
starPop: "_starPop_po6zj_1"
|
|
195
|
-
},
|
|
195
|
+
}, Nt = ({ isStarred: e, onClick: t, size: n, ariaLabel: r = "Toggle favorite", className: i, starFilledColor: a }) => /* @__PURE__ */ W(Pe, {
|
|
196
196
|
size: n,
|
|
197
|
-
style:
|
|
197
|
+
style: ie({ "--cat-star-filled": a }),
|
|
198
198
|
className: i,
|
|
199
|
-
icon: e ? /* @__PURE__ */
|
|
200
|
-
size:
|
|
201
|
-
className:
|
|
202
|
-
}) : /* @__PURE__ */
|
|
203
|
-
size:
|
|
204
|
-
stroke:
|
|
199
|
+
icon: e ? /* @__PURE__ */ W(H, {
|
|
200
|
+
size: L.SM,
|
|
201
|
+
className: Q.starFilledIcon
|
|
202
|
+
}) : /* @__PURE__ */ W(rt, {
|
|
203
|
+
size: L.SM,
|
|
204
|
+
stroke: R
|
|
205
205
|
}),
|
|
206
206
|
"aria-label": r,
|
|
207
207
|
onClick: t
|
|
208
|
-
}),
|
|
209
|
-
style:
|
|
208
|
+
}), Pt = { tag: "_tag_12518_1" }, Ft = ({ label: e, className: t, badgeClassName: n = "dial-tiny-text", colors: r }) => /* @__PURE__ */ W("div", {
|
|
209
|
+
style: ie({
|
|
210
210
|
"--cat-card-tag-bg": r?.background,
|
|
211
211
|
"--cat-card-tag-text": r?.text,
|
|
212
212
|
"--cat-card-tag-border": r?.border
|
|
213
213
|
}),
|
|
214
|
-
className:
|
|
214
|
+
className: k("flex h-6 w-fit items-center justify-center whitespace-nowrap rounded-md border px-2", Pt.tag, n, t),
|
|
215
215
|
children: e
|
|
216
|
-
}),
|
|
216
|
+
}), $ = ({ label: e, className: t = "dial-tiny-text", colors: n }) => /* @__PURE__ */ W(Ft, {
|
|
217
217
|
label: e,
|
|
218
218
|
badgeClassName: t,
|
|
219
219
|
colors: n
|
|
220
220
|
}), It = 8, Lt = ({ topics: e, overflowAriaLabel: t, className: n }) => {
|
|
221
|
-
let r =
|
|
221
|
+
let r = N(null), i = N([]), a = N([]), o = N(null), s = N(Infinity), [c, l] = P(e.length), u = e.join("\0"), d = A(() => {
|
|
222
222
|
let t = r.current;
|
|
223
223
|
if (!t || e.length === 0) return;
|
|
224
224
|
let n = t.clientWidth;
|
|
@@ -234,56 +234,56 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
234
234
|
}
|
|
235
235
|
l(Math.min(f, s.current));
|
|
236
236
|
}, [e.length]);
|
|
237
|
-
if (
|
|
237
|
+
if (se(() => {
|
|
238
238
|
a.current = [], s.current = Infinity, l(e.length);
|
|
239
|
-
}, [u]),
|
|
239
|
+
}, [u]), se(() => {
|
|
240
240
|
d();
|
|
241
|
-
}),
|
|
241
|
+
}), se(() => {
|
|
242
242
|
let e = r.current;
|
|
243
243
|
!e || c === 0 || e.scrollWidth <= e.clientWidth || (s.current = c - 1, l(s.current));
|
|
244
|
-
}, [c]),
|
|
244
|
+
}, [c]), j(() => {
|
|
245
245
|
let e = r.current;
|
|
246
246
|
if (!e) return;
|
|
247
247
|
let t = new ResizeObserver(() => {
|
|
248
248
|
s.current = Infinity, d();
|
|
249
249
|
});
|
|
250
250
|
return t.observe(e), () => t.disconnect();
|
|
251
|
-
}, [d]), e.length === 0) return /* @__PURE__ */
|
|
251
|
+
}, [d]), e.length === 0) return /* @__PURE__ */ W("div", {
|
|
252
252
|
ref: r,
|
|
253
|
-
className:
|
|
253
|
+
className: k("relative flex min-w-0 flex-1 flex-nowrap items-center gap-2 overflow-hidden", n)
|
|
254
254
|
});
|
|
255
255
|
let f = e.length - c;
|
|
256
|
-
return /* @__PURE__ */
|
|
256
|
+
return /* @__PURE__ */ G("div", {
|
|
257
257
|
ref: r,
|
|
258
|
-
className:
|
|
258
|
+
className: k("flex min-w-0 flex-1 flex-nowrap items-center gap-2 overflow-hidden", n),
|
|
259
259
|
children: [
|
|
260
|
-
e.slice(0, c).map((e, t) => /* @__PURE__ */
|
|
260
|
+
e.slice(0, c).map((e, t) => /* @__PURE__ */ W("div", {
|
|
261
261
|
ref: (e) => {
|
|
262
262
|
i.current[t] = e;
|
|
263
263
|
},
|
|
264
|
-
children: /* @__PURE__ */
|
|
264
|
+
children: /* @__PURE__ */ W($, { label: e })
|
|
265
265
|
}, e)),
|
|
266
|
-
f > 0 && /* @__PURE__ */
|
|
266
|
+
f > 0 && /* @__PURE__ */ W(Fe, {
|
|
267
267
|
tooltip: e.slice(c).join(", "),
|
|
268
|
-
children: /* @__PURE__ */
|
|
268
|
+
children: /* @__PURE__ */ W("span", {
|
|
269
269
|
"aria-label": t?.(f) ?? `and ${f} more topics`,
|
|
270
|
-
children: /* @__PURE__ */
|
|
270
|
+
children: /* @__PURE__ */ W($, { label: `+${f}` })
|
|
271
271
|
})
|
|
272
272
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ W("div", {
|
|
274
274
|
ref: o,
|
|
275
275
|
"aria-hidden": !0,
|
|
276
276
|
className: "invisible absolute start-0 top-0",
|
|
277
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ W($, { label: `+${e.length}` })
|
|
278
278
|
})
|
|
279
279
|
]
|
|
280
280
|
});
|
|
281
281
|
}, Rt = { img: () => null }, zt = (e) => e.target instanceof Element && e.target.closest("a") !== null, Bt = ({ item: e, query: t = "", onClick: n, initialIsStarred: r = !1, onToggle: i, isFavoriteVisible: a, featuredLabel: o = "Featured", addToFavoritesAriaLabel: s = "Add to favorites", removeFromFavoritesAriaLabel: c = "Remove from favorites", isSelected: l = !1, className: u, styles: d, credentialsBadgeLoggedOutLabel: f, isReadonly: p = !1 }) => {
|
|
282
|
-
let [m, h] =
|
|
283
|
-
|
|
282
|
+
let [m, h] = P(r);
|
|
283
|
+
j(() => {
|
|
284
284
|
h(r);
|
|
285
285
|
}, [e.id, r]);
|
|
286
|
-
let g = d?.typography?.descriptionClassName ?? "dial-small-paragraph-text", _ = d?.typography?.featuredChipClassName, v = d?.typography?.folderLabelClassName ?? "dial-tiny-text", y = d?.typography?.folderLeafClassName ?? "dial-tiny-semi-text", b =
|
|
286
|
+
let g = d?.typography?.descriptionClassName ?? "dial-small-paragraph-text", _ = d?.typography?.featuredChipClassName, v = d?.typography?.folderLabelClassName ?? "dial-tiny-text", y = d?.typography?.folderLeafClassName ?? "dial-tiny-semi-text", b = ie({
|
|
287
287
|
"--cg-description-text": d?.colors?.textSecondary,
|
|
288
288
|
"--cg-selected-border": d?.colors?.selectedBorder,
|
|
289
289
|
"--cg-selected-bg": d?.colors?.selectedBackground,
|
|
@@ -291,9 +291,9 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
291
291
|
"--cg-footer-border": d?.colors?.footerBorder
|
|
292
292
|
}), x = !p && e.isFeatured === !0, S = !p && a?.(e) !== !1, C = !p || e.folder.length > 0, w = n ? (t) => {
|
|
293
293
|
zt(t) || n(e);
|
|
294
|
-
} : void 0, E =
|
|
294
|
+
} : void 0, E = A((t) => {
|
|
295
295
|
!n || zt(t) || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e));
|
|
296
|
-
}, [n, e]), D =
|
|
296
|
+
}, [n, e]), D = A((t) => {
|
|
297
297
|
t.stopPropagation();
|
|
298
298
|
let n = !m;
|
|
299
299
|
h(n), i?.(e.id, n);
|
|
@@ -302,7 +302,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
302
302
|
i,
|
|
303
303
|
e.id
|
|
304
304
|
]);
|
|
305
|
-
return /* @__PURE__ */
|
|
305
|
+
return /* @__PURE__ */ G(I, {
|
|
306
306
|
...n ? {
|
|
307
307
|
role: "button",
|
|
308
308
|
tabIndex: 0,
|
|
@@ -311,39 +311,39 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
311
311
|
} : {},
|
|
312
312
|
"aria-label": e.name,
|
|
313
313
|
style: b,
|
|
314
|
-
className:
|
|
314
|
+
className: k("box-border cursor-pointer gap-3", Ot.card, x ? Ot.featuredCard : void 0, l ? Ot.selectedCard : void 0, u),
|
|
315
315
|
children: [
|
|
316
|
-
x && /* @__PURE__ */
|
|
316
|
+
x && /* @__PURE__ */ W("div", {
|
|
317
317
|
className: "absolute end-[22px] top-0 -translate-y-1/2",
|
|
318
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ W(T, {
|
|
319
319
|
label: o,
|
|
320
320
|
type: e.type,
|
|
321
321
|
className: _,
|
|
322
322
|
style: d?.colors?.featuredChipStyle
|
|
323
323
|
})
|
|
324
324
|
}),
|
|
325
|
-
l && /* @__PURE__ */
|
|
326
|
-
size:
|
|
327
|
-
className:
|
|
325
|
+
l && /* @__PURE__ */ W(ze, {
|
|
326
|
+
size: L.SM,
|
|
327
|
+
className: k("absolute end-3 top-3 shrink-0", Ot.checkIcon),
|
|
328
328
|
"aria-hidden": !0,
|
|
329
|
-
stroke:
|
|
329
|
+
stroke: R
|
|
330
330
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ W(At, {
|
|
332
332
|
icon: e.iconUrl,
|
|
333
333
|
type: e.type,
|
|
334
334
|
name: e.name,
|
|
335
335
|
version: e.version,
|
|
336
|
-
size:
|
|
336
|
+
size: _t.SM,
|
|
337
337
|
query: t,
|
|
338
|
-
iconClassName:
|
|
339
|
-
iconOverlay: /* @__PURE__ */
|
|
338
|
+
iconClassName: Ot.cardIcon,
|
|
339
|
+
iconOverlay: /* @__PURE__ */ W(Mt, {
|
|
340
340
|
credentials: e.credentials,
|
|
341
341
|
loggedOutLabel: f
|
|
342
342
|
})
|
|
343
343
|
}),
|
|
344
|
-
/* @__PURE__ */
|
|
345
|
-
className:
|
|
346
|
-
children: e.description && /* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ W("div", {
|
|
345
|
+
className: k("line-clamp-2 min-h-[2lh] break-words", Ot.description),
|
|
346
|
+
children: e.description && /* @__PURE__ */ W(O, {
|
|
347
347
|
content: e.description,
|
|
348
348
|
classNames: {
|
|
349
349
|
p: g,
|
|
@@ -359,27 +359,27 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
359
359
|
components: Rt
|
|
360
360
|
})
|
|
361
361
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ W("div", {
|
|
363
363
|
className: "mt-auto flex items-center gap-2",
|
|
364
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ W(Lt, { topics: e.topics })
|
|
365
365
|
}),
|
|
366
|
-
C && /* @__PURE__ */
|
|
367
|
-
className:
|
|
368
|
-
children: /* @__PURE__ */
|
|
366
|
+
C && /* @__PURE__ */ W("div", {
|
|
367
|
+
className: k("pt-3", !p && k("border-t", Ot.footer)),
|
|
368
|
+
children: /* @__PURE__ */ G("div", {
|
|
369
369
|
className: "flex items-center gap-2",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
370
|
+
children: [/* @__PURE__ */ W("div", {
|
|
371
371
|
className: "min-w-0 flex-1",
|
|
372
|
-
children: e.folder.length > 0 && /* @__PURE__ */
|
|
372
|
+
children: e.folder.length > 0 && /* @__PURE__ */ W(he, {
|
|
373
373
|
segments: e.folder,
|
|
374
374
|
labelClassName: v,
|
|
375
375
|
leafClassName: y
|
|
376
376
|
})
|
|
377
|
-
}), S && /* @__PURE__ */
|
|
377
|
+
}), S && /* @__PURE__ */ W(Nt, {
|
|
378
378
|
isStarred: m,
|
|
379
|
-
size:
|
|
379
|
+
size: pe.Small,
|
|
380
380
|
onClick: D,
|
|
381
381
|
ariaLabel: m ? c : s,
|
|
382
|
-
className:
|
|
382
|
+
className: k(Ot.starBtn, !m && Ot.emptyStarHidden)
|
|
383
383
|
})]
|
|
384
384
|
})
|
|
385
385
|
})
|
|
@@ -387,7 +387,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
387
387
|
});
|
|
388
388
|
}, Vt = ({ rowIndex: e, items: t, columnCount: n, query: r, onToggleFavorite: i, isFavoriteVisible: a, onItemClick: o, featuredLabel: s, addToFavoritesAriaLabel: c, removeFromFavoritesAriaLabel: l, selectedItemId: u, credentialsBadgeLoggedOutLabel: d, isReadonly: f, featuredChipStyle: p }) => {
|
|
389
389
|
let m = e * n, h = t.slice(m, m + n);
|
|
390
|
-
return /* @__PURE__ */
|
|
390
|
+
return /* @__PURE__ */ W("div", {
|
|
391
391
|
style: {
|
|
392
392
|
top: e * 268,
|
|
393
393
|
height: 268
|
|
@@ -395,9 +395,9 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
395
395
|
className: "absolute flex w-full gap-5 pb-5",
|
|
396
396
|
children: Array.from({ length: n }, (e, t) => {
|
|
397
397
|
let n = h[t];
|
|
398
|
-
return /* @__PURE__ */
|
|
398
|
+
return /* @__PURE__ */ W("div", {
|
|
399
399
|
className: "h-full min-w-0 flex-1",
|
|
400
|
-
children: n && /* @__PURE__ */
|
|
400
|
+
children: n && /* @__PURE__ */ W(Bt, {
|
|
401
401
|
item: n,
|
|
402
402
|
query: r,
|
|
403
403
|
initialIsStarred: n.isStarred,
|
|
@@ -416,8 +416,8 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
416
416
|
}, n?.id ?? `spacer-${t}`);
|
|
417
417
|
})
|
|
418
418
|
});
|
|
419
|
-
}, Ht =
|
|
420
|
-
let p = a?.noResultsTitle ?? "No results", m = a?.featuredLabel ?? "Featured", h = a?.addToFavoritesAriaLabel ?? "Add to favorites", g = a?.removeFromFavoritesAriaLabel ?? "Remove from favorites", _ = a?.credentialsBadgeLoggedOutLabel ?? "Authorize to use this toolset.", { containerRef: v, startRow: y, endRow: b, columnCount: x, totalHeight: S } =
|
|
419
|
+
}, Ht = oe(({ items: e, query: t = "", onToggleFavorite: n, isFavoriteVisible: r, onItemClick: i, titles: a, isLoading: o, selectedItemId: s, skeletonColor: c = Ot.skeletonColor, skeletonCardBackground: l, isReadonly: u = !1, isFullWidth: d = !1, featuredChipStyle: f }) => {
|
|
420
|
+
let p = a?.noResultsTitle ?? "No results", m = a?.featuredLabel ?? "Featured", h = a?.addToFavoritesAriaLabel ?? "Add to favorites", g = a?.removeFromFavoritesAriaLabel ?? "Remove from favorites", _ = a?.credentialsBadgeLoggedOutLabel ?? "Authorize to use this toolset.", { containerRef: v, startRow: y, endRow: b, columnCount: x, totalHeight: S } = Dt(e.length, { isFullWidth: d }), C = M(() => ({
|
|
421
421
|
items: e,
|
|
422
422
|
columnCount: x,
|
|
423
423
|
query: t,
|
|
@@ -446,19 +446,19 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
446
446
|
u,
|
|
447
447
|
f
|
|
448
448
|
]);
|
|
449
|
-
return o ? /* @__PURE__ */
|
|
449
|
+
return o ? /* @__PURE__ */ W("div", {
|
|
450
450
|
className: "grid gap-5 p-5",
|
|
451
451
|
style: {
|
|
452
452
|
gridTemplateColumns: `repeat(${x}, minmax(0, 1fr))`,
|
|
453
|
-
...
|
|
453
|
+
...ie({ "--cg-skeleton-card-bg": l })
|
|
454
454
|
},
|
|
455
|
-
children: Array.from({ length: x * 3 }, (e, t) => /* @__PURE__ */
|
|
456
|
-
className:
|
|
455
|
+
children: Array.from({ length: x * 3 }, (e, t) => /* @__PURE__ */ W("div", {
|
|
456
|
+
className: k("rounded-md border p-4", Ot.skeletonCard),
|
|
457
457
|
style: { height: 248 },
|
|
458
|
-
children: /* @__PURE__ */
|
|
458
|
+
children: /* @__PURE__ */ W(je, {
|
|
459
459
|
avatar: {
|
|
460
460
|
size: 48,
|
|
461
|
-
shape:
|
|
461
|
+
shape: B.Square
|
|
462
462
|
},
|
|
463
463
|
showTitle: { width: `${60 + t * 17 % 30}%` },
|
|
464
464
|
paragraph: { rows: 3 },
|
|
@@ -466,30 +466,30 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
466
466
|
color: c
|
|
467
467
|
})
|
|
468
468
|
}, t))
|
|
469
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
469
|
+
}) : e.length === 0 ? /* @__PURE__ */ W("div", {
|
|
470
470
|
className: "flex size-full flex-col items-center justify-center",
|
|
471
|
-
children: /* @__PURE__ */
|
|
472
|
-
}) : /* @__PURE__ */
|
|
471
|
+
children: /* @__PURE__ */ W(te, { label: p })
|
|
472
|
+
}) : /* @__PURE__ */ W("div", {
|
|
473
473
|
ref: v,
|
|
474
474
|
className: "relative",
|
|
475
475
|
style: { height: S },
|
|
476
476
|
children: Array.from({ length: b - y }, (e, t) => {
|
|
477
477
|
let n = y + t;
|
|
478
|
-
return /* @__PURE__ */
|
|
478
|
+
return /* @__PURE__ */ W(Vt, {
|
|
479
479
|
rowIndex: n,
|
|
480
480
|
...C
|
|
481
481
|
}, n);
|
|
482
482
|
})
|
|
483
483
|
});
|
|
484
|
-
}), Ut = (e) => e.reduce((e, t) => t.type ===
|
|
484
|
+
}), Ut = (e) => e.reduce((e, t) => t.type === X.File ? e + 1 : e + Ut(t.items), 0), Wt = (e) => {
|
|
485
485
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
486
|
-
for (let r of e) r.type ===
|
|
486
|
+
for (let r of e) r.type === X.Folder && (t.add(r.id), n(r.items));
|
|
487
487
|
};
|
|
488
488
|
return n(e), t;
|
|
489
489
|
}, Gt = (e, t) => {
|
|
490
490
|
if (t != null) for (let n of e) {
|
|
491
491
|
if (n.id === t) return n.name;
|
|
492
|
-
if (n.type ===
|
|
492
|
+
if (n.type === X.Folder) {
|
|
493
493
|
let e = Gt(n.items, t);
|
|
494
494
|
if (e != null) return e;
|
|
495
495
|
}
|
|
@@ -502,21 +502,21 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
502
502
|
valueTrue: "_valueTrue_jnq93_17",
|
|
503
503
|
valueFalse: "_valueFalse_jnq93_21",
|
|
504
504
|
valueText: "_valueText_jnq93_25"
|
|
505
|
-
}, qt = ({ value: e, valueClassName: t, valueTrueClassName: n, checkIconClassName: r, yesLabel: i, noLabel: a }) => e === !0 ? /* @__PURE__ */
|
|
506
|
-
size:
|
|
507
|
-
className:
|
|
508
|
-
}), /* @__PURE__ */
|
|
509
|
-
className:
|
|
505
|
+
}, qt = ({ value: e, valueClassName: t, valueTrueClassName: n, checkIconClassName: r, yesLabel: i, noLabel: a }) => e === !0 ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(Ue, {
|
|
506
|
+
size: L.MD,
|
|
507
|
+
className: k(r, Kt.checkIcon)
|
|
508
|
+
}), /* @__PURE__ */ W("span", {
|
|
509
|
+
className: k(n, Kt.valueTrue),
|
|
510
510
|
children: i
|
|
511
|
-
})] }) : e === !1 ? /* @__PURE__ */
|
|
512
|
-
className:
|
|
511
|
+
})] }) : e === !1 ? /* @__PURE__ */ W("span", {
|
|
512
|
+
className: k(t, Kt.valueFalse),
|
|
513
513
|
children: a
|
|
514
|
-
}) : /* @__PURE__ */
|
|
515
|
-
className:
|
|
514
|
+
}) : /* @__PURE__ */ W("span", {
|
|
515
|
+
className: k("min-w-0 break-words", t, Kt.valueText),
|
|
516
516
|
children: e
|
|
517
|
-
}), Jt = ({ sectionLabel: e = "Section", values: t, labelClassName: n = "dial-small-semi-text", valueClassName: r = "dial-small-text", valueTrueClassName: i = "dial-small-semi-text", checkIconClassName: a, sectionClassName: o = "dial-caption-text", yesLabel: s = "Yes", noLabel: c = "No", colors: l }) => /* @__PURE__ */
|
|
517
|
+
}), Jt = ({ sectionLabel: e = "Section", values: t, labelClassName: n = "dial-small-semi-text", valueClassName: r = "dial-small-text", valueTrueClassName: i = "dial-small-semi-text", checkIconClassName: a, sectionClassName: o = "dial-caption-text", yesLabel: s = "Yes", noLabel: c = "No", colors: l }) => /* @__PURE__ */ W("div", {
|
|
518
518
|
className: "flex flex-col",
|
|
519
|
-
style:
|
|
519
|
+
style: ie({
|
|
520
520
|
"--tv-section-heading": l?.sectionHeading,
|
|
521
521
|
"--tv-row-alt-bg": l?.rowAlt,
|
|
522
522
|
"--tv-label": l?.label,
|
|
@@ -525,19 +525,19 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
525
525
|
"--tv-value-false": l?.valueFalse,
|
|
526
526
|
"--tv-value-text": l?.valueText
|
|
527
527
|
}),
|
|
528
|
-
children: t != null && t.length > 0 && /* @__PURE__ */
|
|
529
|
-
className:
|
|
528
|
+
children: t != null && t.length > 0 && /* @__PURE__ */ G("section", { children: [/* @__PURE__ */ W("p", {
|
|
529
|
+
className: k("mb-3 mt-0", o, Kt.sectionHeading),
|
|
530
530
|
children: e
|
|
531
|
-
}), /* @__PURE__ */
|
|
531
|
+
}), /* @__PURE__ */ W("ul", {
|
|
532
532
|
className: "m-0 list-none p-0",
|
|
533
|
-
children: t.map((e, t) => /* @__PURE__ */
|
|
534
|
-
className:
|
|
535
|
-
children: [/* @__PURE__ */
|
|
536
|
-
className:
|
|
533
|
+
children: t.map((e, t) => /* @__PURE__ */ G("li", {
|
|
534
|
+
className: k("flex items-center rounded px-3 py-2", t % 2 == 0 ? Kt.rowAlt : void 0),
|
|
535
|
+
children: [/* @__PURE__ */ W("span", {
|
|
536
|
+
className: k(n, Kt.label, "w-2/5 shrink-0"),
|
|
537
537
|
children: e.label
|
|
538
|
-
}), /* @__PURE__ */
|
|
538
|
+
}), /* @__PURE__ */ W("div", {
|
|
539
539
|
className: "flex w-3/5 min-w-0 items-center gap-1",
|
|
540
|
-
children: /* @__PURE__ */
|
|
540
|
+
children: /* @__PURE__ */ W(qt, {
|
|
541
541
|
value: e.value,
|
|
542
542
|
valueClassName: r,
|
|
543
543
|
valueTrueClassName: i,
|
|
@@ -549,27 +549,27 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
549
549
|
}, e.label))
|
|
550
550
|
})] })
|
|
551
551
|
}), Yt = { sectionHeading: "_sectionHeading_148lj_1" }, Xt = {
|
|
552
|
-
[
|
|
553
|
-
[
|
|
554
|
-
[
|
|
552
|
+
[ht.Python]: "Python",
|
|
553
|
+
[ht.Curl]: "cURL",
|
|
554
|
+
[ht.JavaScript]: "JavaScript"
|
|
555
555
|
}, Zt = {
|
|
556
|
-
[
|
|
557
|
-
[
|
|
558
|
-
[
|
|
556
|
+
[ht.Python]: "python",
|
|
557
|
+
[ht.Curl]: "bash",
|
|
558
|
+
[ht.JavaScript]: "javascript"
|
|
559
559
|
}, Qt = ({ snippets: e, sectionLabel: t, copyAriaLabel: n = "Copy", copiedStatusLabel: r = "Copied!", codeClassName: i = "dial-code-text", codeTitleClassName: a = "dial-tiny-semi-text", sectionClassName: o = "dial-caption-text" }) => {
|
|
560
|
-
let [s, c] =
|
|
561
|
-
|
|
562
|
-
c(e[0]?.language ??
|
|
560
|
+
let [s, c] = P(e[0]?.language ?? ht.Python);
|
|
561
|
+
j(() => {
|
|
562
|
+
c(e[0]?.language ?? ht.Python);
|
|
563
563
|
}, [e]);
|
|
564
|
-
let l =
|
|
564
|
+
let l = M(() => e.map((e) => ({
|
|
565
565
|
key: e.language,
|
|
566
566
|
label: Xt[e.language] ?? e.language,
|
|
567
567
|
onClick: () => c(e.language)
|
|
568
568
|
})), [e]), u = e.find((e) => e.language === s)?.code ?? "", d = e.length > 1;
|
|
569
|
-
return /* @__PURE__ */
|
|
570
|
-
className:
|
|
569
|
+
return /* @__PURE__ */ G("section", { children: [t != null && /* @__PURE__ */ W("p", {
|
|
570
|
+
className: k("mb-3 mt-0", o, Yt.sectionHeading),
|
|
571
571
|
children: t
|
|
572
|
-
}), /* @__PURE__ */
|
|
572
|
+
}), /* @__PURE__ */ W(D, {
|
|
573
573
|
language: Zt[s] ?? s,
|
|
574
574
|
title: Xt[s] ?? s,
|
|
575
575
|
value: u,
|
|
@@ -578,16 +578,16 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
578
578
|
codeClassName: i,
|
|
579
579
|
languageLabelClassName: a,
|
|
580
580
|
hideDownload: !0,
|
|
581
|
-
titleSlot: d ? /* @__PURE__ */
|
|
581
|
+
titleSlot: d ? /* @__PURE__ */ W(ye, {
|
|
582
582
|
items: l,
|
|
583
583
|
matchReferenceWidth: !1,
|
|
584
584
|
placement: "bottom-end",
|
|
585
|
-
size:
|
|
585
|
+
size: pe.Small,
|
|
586
586
|
selectedKey: s
|
|
587
587
|
}) : void 0
|
|
588
588
|
})] });
|
|
589
589
|
}, $t = ({ api: e, resourceSectionLabel: t = "Resource", endpointSectionLabel: n = "Endpoint", snippetSectionLabel: r = "Code snippet", modelIdLabel: i = "Model ID", endpointLabel: a = "Endpoint", requestExampleLabel: o = "Request example", responseSchemaLabel: s = "Response schema", copyAriaLabel: c = "Copy", copiedStatusLabel: l = "Copied!", labelClassName: u = "dial-small-semi-text", valueClassName: d = "dial-small-text", codeClassName: f = "dial-code-text", codeTitleClassName: p = "dial-tiny-semi-text", sectionClassName: m = "dial-caption-text" }) => {
|
|
590
|
-
let [h, g] =
|
|
590
|
+
let [h, g] = P(0), _ = M(() => e.endpoints ?? [], [e.endpoints]), v = _.length > 0, y = _[h] ?? null, b = M(() => _.map((e, t) => ({
|
|
591
591
|
key: e.url,
|
|
592
592
|
label: e.label,
|
|
593
593
|
onClick: () => g(t)
|
|
@@ -597,17 +597,17 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
597
597
|
value: e.resource.modelId
|
|
598
598
|
});
|
|
599
599
|
let S = _.length > 1, C = x.length > 0, w = v ? null : e.resource?.endpointUrl, T = (e.snippets?.length ?? 0) > 0, E = e.requestExample != null, O = e.responseSchema != null;
|
|
600
|
-
return /* @__PURE__ */
|
|
600
|
+
return /* @__PURE__ */ G("div", {
|
|
601
601
|
className: "flex flex-col gap-6",
|
|
602
602
|
children: [
|
|
603
|
-
C && /* @__PURE__ */
|
|
603
|
+
C && /* @__PURE__ */ W(Jt, {
|
|
604
604
|
sectionLabel: t,
|
|
605
605
|
values: x,
|
|
606
606
|
labelClassName: u,
|
|
607
607
|
valueClassName: d,
|
|
608
608
|
sectionClassName: m
|
|
609
609
|
}),
|
|
610
|
-
w != null && /* @__PURE__ */
|
|
610
|
+
w != null && /* @__PURE__ */ W(D, {
|
|
611
611
|
language: a,
|
|
612
612
|
value: w,
|
|
613
613
|
copyLabel: c,
|
|
@@ -616,12 +616,12 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
616
616
|
languageLabelClassName: p,
|
|
617
617
|
hideDownload: !0
|
|
618
618
|
}),
|
|
619
|
-
v && /* @__PURE__ */
|
|
620
|
-
/* @__PURE__ */
|
|
621
|
-
className:
|
|
619
|
+
v && /* @__PURE__ */ G("section", { children: [
|
|
620
|
+
/* @__PURE__ */ W("p", {
|
|
621
|
+
className: k("mb-3 mt-0", m, Yt.sectionHeading),
|
|
622
622
|
children: n
|
|
623
623
|
}),
|
|
624
|
-
y != null && /* @__PURE__ */
|
|
624
|
+
y != null && /* @__PURE__ */ W(D, {
|
|
625
625
|
language: y.label,
|
|
626
626
|
value: y.url,
|
|
627
627
|
copyLabel: c,
|
|
@@ -629,17 +629,17 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
629
629
|
codeClassName: f,
|
|
630
630
|
languageLabelClassName: p,
|
|
631
631
|
hideDownload: !0,
|
|
632
|
-
titleSlot: S ? /* @__PURE__ */
|
|
632
|
+
titleSlot: S ? /* @__PURE__ */ W(ye, {
|
|
633
633
|
items: b,
|
|
634
634
|
matchReferenceWidth: !1,
|
|
635
635
|
placement: "bottom-end",
|
|
636
|
-
size:
|
|
636
|
+
size: pe.Small,
|
|
637
637
|
selectedKey: y.url
|
|
638
638
|
}) : void 0
|
|
639
639
|
}, h),
|
|
640
|
-
y?.snippets != null && y.snippets.length > 0 && /* @__PURE__ */
|
|
640
|
+
y?.snippets != null && y.snippets.length > 0 && /* @__PURE__ */ W("div", {
|
|
641
641
|
className: "mt-4",
|
|
642
|
-
children: /* @__PURE__ */
|
|
642
|
+
children: /* @__PURE__ */ W(Qt, {
|
|
643
643
|
snippets: y.snippets,
|
|
644
644
|
copyAriaLabel: c,
|
|
645
645
|
copiedStatusLabel: l,
|
|
@@ -649,7 +649,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
649
649
|
}, h)
|
|
650
650
|
})
|
|
651
651
|
] }),
|
|
652
|
-
!v && T && /* @__PURE__ */
|
|
652
|
+
!v && T && /* @__PURE__ */ W(Qt, {
|
|
653
653
|
snippets: e.snippets ?? [],
|
|
654
654
|
sectionLabel: r,
|
|
655
655
|
copyAriaLabel: c,
|
|
@@ -658,10 +658,10 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
658
658
|
codeTitleClassName: p,
|
|
659
659
|
sectionClassName: m
|
|
660
660
|
}),
|
|
661
|
-
E && /* @__PURE__ */
|
|
662
|
-
className:
|
|
661
|
+
E && /* @__PURE__ */ G("section", { children: [/* @__PURE__ */ W("p", {
|
|
662
|
+
className: k("mb-3 mt-0", m, Yt.sectionHeading),
|
|
663
663
|
children: o
|
|
664
|
-
}), /* @__PURE__ */
|
|
664
|
+
}), /* @__PURE__ */ W(D, {
|
|
665
665
|
language: "bash",
|
|
666
666
|
value: e.requestExample ?? "",
|
|
667
667
|
copyLabel: c,
|
|
@@ -669,10 +669,10 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
669
669
|
codeClassName: f,
|
|
670
670
|
hideDownload: !0
|
|
671
671
|
})] }),
|
|
672
|
-
O && /* @__PURE__ */
|
|
673
|
-
className:
|
|
672
|
+
O && /* @__PURE__ */ G("section", { children: [/* @__PURE__ */ W("p", {
|
|
673
|
+
className: k("mb-3 mt-0", m, Yt.sectionHeading),
|
|
674
674
|
children: s
|
|
675
|
-
}), /* @__PURE__ */
|
|
675
|
+
}), /* @__PURE__ */ W(D, {
|
|
676
676
|
language: "json",
|
|
677
677
|
value: e.responseSchema ?? "",
|
|
678
678
|
copyLabel: c,
|
|
@@ -686,30 +686,30 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
686
686
|
message: "_message_13mok_1",
|
|
687
687
|
consequences: "_consequences_13mok_5",
|
|
688
688
|
footer: "_footer_13mok_9"
|
|
689
|
-
}, tn = ({ confirmLabel: e, cancelLabel: t, variant: n =
|
|
690
|
-
let c = n ===
|
|
691
|
-
if (r) return /* @__PURE__ */
|
|
692
|
-
if (c) return /* @__PURE__ */
|
|
693
|
-
size:
|
|
689
|
+
}, tn = ({ confirmLabel: e, cancelLabel: t, variant: n = J.Info, isLoading: r = !1, isConfirmDisabled: i = !1, loadingStatusLabel: a, onConfirm: o, onCancel: s }) => {
|
|
690
|
+
let c = n === J.Danger, l = (() => {
|
|
691
|
+
if (r) return /* @__PURE__ */ W(Me, { size: L.SM });
|
|
692
|
+
if (c) return /* @__PURE__ */ W(at, {
|
|
693
|
+
size: L.MD,
|
|
694
694
|
"aria-hidden": !0,
|
|
695
|
-
stroke:
|
|
695
|
+
stroke: R
|
|
696
696
|
});
|
|
697
|
-
})(), u = c ?
|
|
698
|
-
return /* @__PURE__ */
|
|
699
|
-
className:
|
|
697
|
+
})(), u = c ? de : we;
|
|
698
|
+
return /* @__PURE__ */ G("div", {
|
|
699
|
+
className: k("flex items-center justify-end gap-2 px-6 py-4 rtl:flex-row-reverse rtl:justify-start", en.footer),
|
|
700
700
|
children: [
|
|
701
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ W(ge, {
|
|
702
702
|
label: t,
|
|
703
703
|
disabled: r,
|
|
704
704
|
onClick: s
|
|
705
705
|
}),
|
|
706
|
-
/* @__PURE__ */
|
|
706
|
+
/* @__PURE__ */ W(u, {
|
|
707
707
|
label: e,
|
|
708
708
|
disabled: r || i,
|
|
709
709
|
iconBefore: l,
|
|
710
710
|
onClick: o
|
|
711
711
|
}),
|
|
712
|
-
r && a != null && /* @__PURE__ */
|
|
712
|
+
r && a != null && /* @__PURE__ */ W("span", {
|
|
713
713
|
role: "status",
|
|
714
714
|
"aria-live": "polite",
|
|
715
715
|
className: "sr-only",
|
|
@@ -720,25 +720,25 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
720
720
|
}, nn = {
|
|
721
721
|
info: "_info_lklha_1",
|
|
722
722
|
danger: "_danger_lklha_5"
|
|
723
|
-
}, rn = ({ item: e, variant: t =
|
|
723
|
+
}, rn = ({ item: e, variant: t = J.Info, iconSize: n = 40 }) => /* @__PURE__ */ W(ne, {
|
|
724
724
|
item: e,
|
|
725
725
|
iconSize: n,
|
|
726
726
|
hasVersionTag: !1,
|
|
727
|
-
className: t ===
|
|
728
|
-
}), an = ({ item: e, message: t, consequences: n, variant: r =
|
|
727
|
+
className: t === J.Danger ? nn.danger : nn.info
|
|
728
|
+
}), an = ({ item: e, message: t, consequences: n, variant: r = J.Info, messageClassName: i = "dial-small-text", children: a }) => /* @__PURE__ */ G("div", {
|
|
729
729
|
className: "flex flex-col gap-4 px-6 py-4",
|
|
730
730
|
children: [
|
|
731
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ W(rn, {
|
|
732
732
|
item: e,
|
|
733
733
|
variant: r
|
|
734
734
|
}),
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
className:
|
|
735
|
+
/* @__PURE__ */ W("p", {
|
|
736
|
+
className: k(i, "break-words", en.message),
|
|
737
737
|
children: t
|
|
738
738
|
}),
|
|
739
|
-
n != null && n.length > 0 && /* @__PURE__ */
|
|
740
|
-
className:
|
|
741
|
-
children: n.map((e) => /* @__PURE__ */
|
|
739
|
+
n != null && n.length > 0 && /* @__PURE__ */ W("ul", {
|
|
740
|
+
className: k("flex list-disc flex-col gap-2 ps-5", i, en.consequences),
|
|
741
|
+
children: n.map((e) => /* @__PURE__ */ W("li", { children: e }, e))
|
|
742
742
|
}),
|
|
743
743
|
a
|
|
744
744
|
]
|
|
@@ -751,19 +751,19 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
751
751
|
}({}), cn = {
|
|
752
752
|
sunken: on.sunkenBox,
|
|
753
753
|
raised: on.raisedBox
|
|
754
|
-
}, ln = ({ icon: e, isActive: t = !1, surface: n = "sunken", statusLabel: r }) => /* @__PURE__ */
|
|
754
|
+
}, ln = ({ icon: e, isActive: t = !1, surface: n = "sunken", statusLabel: r }) => /* @__PURE__ */ G("span", {
|
|
755
755
|
className: "relative inline-flex shrink-0",
|
|
756
756
|
children: [
|
|
757
|
-
/* @__PURE__ */
|
|
758
|
-
className:
|
|
757
|
+
/* @__PURE__ */ W("span", {
|
|
758
|
+
className: k("flex size-8 items-center justify-center rounded-lg", cn[n]),
|
|
759
759
|
children: e
|
|
760
760
|
}),
|
|
761
|
-
t && /* @__PURE__ */
|
|
762
|
-
size:
|
|
761
|
+
t && /* @__PURE__ */ W(Ue, {
|
|
762
|
+
size: L.MD,
|
|
763
763
|
"aria-hidden": !0,
|
|
764
|
-
className:
|
|
764
|
+
className: k("absolute -end-2 -top-2", on.activeIcon)
|
|
765
765
|
}),
|
|
766
|
-
r != null && /* @__PURE__ */
|
|
766
|
+
r != null && /* @__PURE__ */ W("span", {
|
|
767
767
|
className: "sr-only",
|
|
768
768
|
children: r
|
|
769
769
|
})
|
|
@@ -773,43 +773,43 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
773
773
|
icon: "_icon_tqnz7_6",
|
|
774
774
|
title: "_title_tqnz7_10",
|
|
775
775
|
description: "_description_tqnz7_14"
|
|
776
|
-
}, dn = ({ icon: e, title: t, description: n, action: r, titleClassName: i = "dial-small-semi-text", descriptionClassName: a = "dial-small-text" }) => /* @__PURE__ */
|
|
776
|
+
}, dn = ({ icon: e, title: t, description: n, action: r, titleClassName: i = "dial-small-semi-text", descriptionClassName: a = "dial-small-text" }) => /* @__PURE__ */ G("div", {
|
|
777
777
|
role: "status",
|
|
778
778
|
"aria-live": "polite",
|
|
779
|
-
className:
|
|
780
|
-
children: [/* @__PURE__ */
|
|
781
|
-
className:
|
|
779
|
+
className: k("flex items-center gap-3 rounded-xl p-3", un.card),
|
|
780
|
+
children: [/* @__PURE__ */ W("span", {
|
|
781
|
+
className: k("shrink-0", un.icon, n != null && "mt-0.5"),
|
|
782
782
|
children: e
|
|
783
|
-
}), /* @__PURE__ */
|
|
783
|
+
}), /* @__PURE__ */ G("div", {
|
|
784
784
|
className: "flex min-w-0 flex-1 items-center justify-between gap-2",
|
|
785
|
-
children: [/* @__PURE__ */
|
|
785
|
+
children: [/* @__PURE__ */ G("div", {
|
|
786
786
|
className: "flex min-w-0 flex-col gap-1",
|
|
787
|
-
children: [/* @__PURE__ */
|
|
788
|
-
className:
|
|
787
|
+
children: [/* @__PURE__ */ W("span", {
|
|
788
|
+
className: k(i, un.title),
|
|
789
789
|
children: t
|
|
790
|
-
}), n != null && /* @__PURE__ */
|
|
791
|
-
className:
|
|
790
|
+
}), n != null && /* @__PURE__ */ W("span", {
|
|
791
|
+
className: k(a, un.description),
|
|
792
792
|
children: n
|
|
793
793
|
})]
|
|
794
|
-
}), r != null && /* @__PURE__ */
|
|
794
|
+
}), r != null && /* @__PURE__ */ W("div", {
|
|
795
795
|
className: "shrink-0 whitespace-nowrap",
|
|
796
796
|
children: r
|
|
797
797
|
})]
|
|
798
798
|
})]
|
|
799
799
|
}), fn = (e) => e === n.ApiKey ? "You are currently using organization API key to access this toolset." : "You are currently using organization credentials to access this toolset.", pn = (e) => e === n.ApiKey ? "Configure your personal API key to have access to your data." : "Login using personal account to have access to your data.", mn = (e) => e === n.ApiKey ? "Signed in with organization API key." : "Signed in with organization credentials.", hn = (e) => e === n.ApiKey ? "Signed in with personal API key." : "Signed in with personal credentials.", gn = 20, _n = ({ state: t, authenticationType: n, texts: r }) => {
|
|
800
|
-
let i = /* @__PURE__ */
|
|
800
|
+
let i = /* @__PURE__ */ W(Re, {
|
|
801
801
|
size: gn,
|
|
802
802
|
"aria-hidden": !0,
|
|
803
|
-
stroke:
|
|
803
|
+
stroke: R
|
|
804
804
|
});
|
|
805
805
|
if (t === e.PersonalCredentialsActive) {
|
|
806
806
|
let e = (r?.personalCredentialsActiveBannerTitle ?? hn)(n);
|
|
807
|
-
return /* @__PURE__ */
|
|
808
|
-
icon: /* @__PURE__ */
|
|
809
|
-
icon: /* @__PURE__ */
|
|
810
|
-
size:
|
|
807
|
+
return /* @__PURE__ */ W(dn, {
|
|
808
|
+
icon: /* @__PURE__ */ W(ln, {
|
|
809
|
+
icon: /* @__PURE__ */ W(ot, {
|
|
810
|
+
size: L.SM,
|
|
811
811
|
"aria-hidden": !0,
|
|
812
|
-
stroke:
|
|
812
|
+
stroke: R
|
|
813
813
|
}),
|
|
814
814
|
isActive: !0,
|
|
815
815
|
surface: sn.Raised
|
|
@@ -819,12 +819,12 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
819
819
|
}
|
|
820
820
|
if (t === e.OrgCredentialsActive) {
|
|
821
821
|
let e = (r?.orgCredentialsActiveBannerTitle ?? mn)(n);
|
|
822
|
-
return /* @__PURE__ */
|
|
823
|
-
icon: /* @__PURE__ */
|
|
824
|
-
icon: /* @__PURE__ */
|
|
825
|
-
size:
|
|
822
|
+
return /* @__PURE__ */ W(dn, {
|
|
823
|
+
icon: /* @__PURE__ */ W(ln, {
|
|
824
|
+
icon: /* @__PURE__ */ W(Re, {
|
|
825
|
+
size: L.SM,
|
|
826
826
|
"aria-hidden": !0,
|
|
827
|
-
stroke:
|
|
827
|
+
stroke: R
|
|
828
828
|
}),
|
|
829
829
|
isActive: !0,
|
|
830
830
|
surface: sn.Raised
|
|
@@ -832,7 +832,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
832
832
|
title: e
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
|
-
return /* @__PURE__ */
|
|
835
|
+
return /* @__PURE__ */ W(dn, {
|
|
836
836
|
icon: i,
|
|
837
837
|
title: (r?.orgFallbackBannerTitle ?? fn)(n),
|
|
838
838
|
description: (r?.orgFallbackBannerDescription ?? pn)(n)
|
|
@@ -843,15 +843,15 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
843
843
|
rowDescription: "_rowDescription_1q3s8_9",
|
|
844
844
|
errorText: "_errorText_1q3s8_13"
|
|
845
845
|
}, yn = ({ item: e, level: t, label: r, description: i, icon: a, status: o, isActive: c, authenticationType: l, apiKeyAddedWhen: u, onLogin: d, onRequestLogout: f, onRequestDeleteApiKey: p, texts: m, labelClassName: h, descriptionClassName: g, errorClassName: _, keyCardTitleClassName: v, keyCardDescriptionClassName: y, deleteActionClassName: b }) => {
|
|
846
|
-
let [x, S] =
|
|
846
|
+
let [x, S] = P(""), [C, w] = P(!1), [T, E] = P(!1), D = o === s.SignedIn, O = A(() => {
|
|
847
847
|
d?.(e, { level: t });
|
|
848
848
|
}, [
|
|
849
849
|
e,
|
|
850
850
|
t,
|
|
851
851
|
d
|
|
852
|
-
]),
|
|
852
|
+
]), ee = A((e) => {
|
|
853
853
|
S(e ?? ""), w(!1);
|
|
854
|
-
}, []),
|
|
854
|
+
}, []), te = A(async () => {
|
|
855
855
|
if (x.trim().length === 0) {
|
|
856
856
|
w(!0);
|
|
857
857
|
return;
|
|
@@ -870,88 +870,88 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
870
870
|
t,
|
|
871
871
|
x,
|
|
872
872
|
d
|
|
873
|
-
]),
|
|
873
|
+
]), ne = A(() => {
|
|
874
874
|
f?.(t);
|
|
875
|
-
}, [t, f]),
|
|
875
|
+
}, [t, f]), re = A(() => {
|
|
876
876
|
p?.(t);
|
|
877
|
-
}, [t, p]),
|
|
878
|
-
return /* @__PURE__ */
|
|
877
|
+
}, [t, p]), ie = m?.loginActionLabel ?? "Log in", ae = m?.logoutActionLabel ?? "Log out", oe = m?.addApiKeyActionLabel ?? "Add", j = m?.deleteActionLabel ?? "Delete", se = m?.credentialsSignedInLabel ?? "Signed in", M = m?.credentialsSignedOutLabel ?? "Signed out", N = m?.addingApiKeyStatusLabel ?? "Adding", ce = m?.apiKeyConfiguredMessage ?? "Key has been configured", le = u == null ? void 0 : (m?.apiKeyAddedLabel ?? ((e) => `Added ${e}`))(u);
|
|
878
|
+
return /* @__PURE__ */ G("div", {
|
|
879
879
|
className: "flex items-start gap-3 rounded-xl p-3",
|
|
880
|
-
children: [/* @__PURE__ */
|
|
880
|
+
children: [/* @__PURE__ */ W(ln, {
|
|
881
881
|
icon: a,
|
|
882
882
|
isActive: c,
|
|
883
|
-
statusLabel: c ?
|
|
884
|
-
}), /* @__PURE__ */
|
|
883
|
+
statusLabel: c ? se : M
|
|
884
|
+
}), /* @__PURE__ */ G("div", {
|
|
885
885
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
886
886
|
children: [
|
|
887
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ G("div", {
|
|
888
888
|
className: "flex items-start justify-between gap-2",
|
|
889
|
-
children: [/* @__PURE__ */
|
|
889
|
+
children: [/* @__PURE__ */ G("div", {
|
|
890
890
|
className: "flex min-w-0 flex-col gap-0.5",
|
|
891
|
-
children: [/* @__PURE__ */
|
|
891
|
+
children: [/* @__PURE__ */ W("span", {
|
|
892
892
|
className: h,
|
|
893
893
|
children: r
|
|
894
|
-
}), /* @__PURE__ */
|
|
895
|
-
className:
|
|
894
|
+
}), /* @__PURE__ */ W("span", {
|
|
895
|
+
className: k(g, vn.rowDescription),
|
|
896
896
|
children: i
|
|
897
897
|
})]
|
|
898
|
-
}), l === n.OAuth && (D ? /* @__PURE__ */
|
|
899
|
-
appearance:
|
|
900
|
-
label:
|
|
898
|
+
}), l === n.OAuth && (D ? /* @__PURE__ */ W(de, {
|
|
899
|
+
appearance: F.Ghost,
|
|
900
|
+
label: ae,
|
|
901
901
|
className: "min-w-28 shrink-0 justify-center whitespace-nowrap",
|
|
902
|
-
onClick:
|
|
903
|
-
}) : /* @__PURE__ */
|
|
904
|
-
label:
|
|
902
|
+
onClick: ne
|
|
903
|
+
}) : /* @__PURE__ */ W(we, {
|
|
904
|
+
label: ie,
|
|
905
905
|
className: "min-w-28 shrink-0 justify-center whitespace-nowrap",
|
|
906
906
|
onClick: O
|
|
907
907
|
}))]
|
|
908
908
|
}),
|
|
909
|
-
l === n.ApiKey && !D && /* @__PURE__ */
|
|
909
|
+
l === n.ApiKey && !D && /* @__PURE__ */ G("div", {
|
|
910
910
|
className: "flex animate-fadeIn flex-col gap-1 pt-1",
|
|
911
|
-
children: [/* @__PURE__ */
|
|
911
|
+
children: [/* @__PURE__ */ G("div", {
|
|
912
912
|
className: "flex items-end gap-2",
|
|
913
|
-
children: [/* @__PURE__ */
|
|
913
|
+
children: [/* @__PURE__ */ W(xe, {
|
|
914
914
|
id: `catalog-item-${e.id}-${t}-api-key`,
|
|
915
915
|
type: "password",
|
|
916
916
|
autoComplete: "current-password",
|
|
917
917
|
value: x,
|
|
918
|
-
onChange:
|
|
918
|
+
onChange: ee,
|
|
919
919
|
labelProps: { label: m?.apiKeyFieldLabel ?? "API key" },
|
|
920
920
|
invalid: C,
|
|
921
921
|
disabled: T,
|
|
922
922
|
containerClassName: "min-w-0 flex-1"
|
|
923
|
-
}), /* @__PURE__ */
|
|
924
|
-
label: T ? void 0 :
|
|
925
|
-
"aria-label": T ?
|
|
926
|
-
iconBefore: T ? /* @__PURE__ */
|
|
927
|
-
size:
|
|
928
|
-
ariaLabel:
|
|
923
|
+
}), /* @__PURE__ */ W(we, {
|
|
924
|
+
label: T ? void 0 : oe,
|
|
925
|
+
"aria-label": T ? N : void 0,
|
|
926
|
+
iconBefore: T ? /* @__PURE__ */ W(Me, {
|
|
927
|
+
size: L.SM,
|
|
928
|
+
ariaLabel: N
|
|
929
929
|
}) : void 0,
|
|
930
930
|
className: "shrink-0 whitespace-nowrap",
|
|
931
|
-
onClick:
|
|
931
|
+
onClick: te,
|
|
932
932
|
disabled: T
|
|
933
933
|
})]
|
|
934
|
-
}), C && /* @__PURE__ */
|
|
935
|
-
className:
|
|
934
|
+
}), C && /* @__PURE__ */ W("span", {
|
|
935
|
+
className: k(_, vn.errorText),
|
|
936
936
|
children: m?.apiKeyRequiredErrorMessage ?? "API key is required."
|
|
937
937
|
})]
|
|
938
938
|
}),
|
|
939
|
-
l === n.ApiKey && D && /* @__PURE__ */
|
|
939
|
+
l === n.ApiKey && D && /* @__PURE__ */ W("div", {
|
|
940
940
|
className: "animate-fadeIn pt-1",
|
|
941
|
-
children: /* @__PURE__ */
|
|
942
|
-
icon: /* @__PURE__ */
|
|
943
|
-
size:
|
|
941
|
+
children: /* @__PURE__ */ W(dn, {
|
|
942
|
+
icon: /* @__PURE__ */ W(Je, {
|
|
943
|
+
size: L.SM,
|
|
944
944
|
"aria-hidden": !0,
|
|
945
|
-
stroke:
|
|
945
|
+
stroke: R
|
|
946
946
|
}),
|
|
947
|
-
title:
|
|
948
|
-
description:
|
|
947
|
+
title: ce,
|
|
948
|
+
description: le,
|
|
949
949
|
titleClassName: v,
|
|
950
950
|
descriptionClassName: y,
|
|
951
|
-
action: /* @__PURE__ */
|
|
952
|
-
label:
|
|
951
|
+
action: /* @__PURE__ */ W(z, {
|
|
952
|
+
label: j,
|
|
953
953
|
className: b,
|
|
954
|
-
onClick:
|
|
954
|
+
onClick: re
|
|
955
955
|
})
|
|
956
956
|
})
|
|
957
957
|
})
|
|
@@ -962,34 +962,34 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
962
962
|
let { credentialsDescriptionClassName: c = "dial-body-paragraph-text", credentialsRowLabelClassName: l = "dial-small-semi-text", credentialsRowDescriptionClassName: u = "dial-small-text", credentialsErrorClassName: d = "dial-caption-text", credentialsKeyCardTitleClassName: f = "dial-tiny-semi-text", credentialsKeyCardDescriptionClassName: p = "dial-tiny-text" } = a?.typography ?? {}, m = e.credentials;
|
|
963
963
|
if (m == null) return null;
|
|
964
964
|
let h = (i?.credentialsManagementDescription ?? bn)(m.authenticationType), g = m.userStatus === s.SignedIn, _ = !g && m.globalStatus === s.SignedIn;
|
|
965
|
-
return /* @__PURE__ */
|
|
965
|
+
return /* @__PURE__ */ G("div", {
|
|
966
966
|
className: "flex flex-col",
|
|
967
|
-
children: [/* @__PURE__ */
|
|
967
|
+
children: [/* @__PURE__ */ W("div", {
|
|
968
968
|
className: "px-6 py-4",
|
|
969
|
-
children: /* @__PURE__ */
|
|
970
|
-
className:
|
|
971
|
-
children: /* @__PURE__ */
|
|
969
|
+
children: /* @__PURE__ */ W("div", {
|
|
970
|
+
className: k("rounded-xl p-3", vn.surface),
|
|
971
|
+
children: /* @__PURE__ */ W(C, {
|
|
972
972
|
item: e,
|
|
973
973
|
iconSize: 40,
|
|
974
974
|
hasFeaturedTag: !1
|
|
975
975
|
})
|
|
976
976
|
})
|
|
977
|
-
}), /* @__PURE__ */
|
|
977
|
+
}), /* @__PURE__ */ G("div", {
|
|
978
978
|
className: "flex flex-col gap-5 px-6 py-4",
|
|
979
|
-
children: [/* @__PURE__ */
|
|
980
|
-
className:
|
|
979
|
+
children: [/* @__PURE__ */ W("span", {
|
|
980
|
+
className: k(c, vn.description),
|
|
981
981
|
children: h
|
|
982
|
-
}), /* @__PURE__ */
|
|
982
|
+
}), /* @__PURE__ */ G("div", {
|
|
983
983
|
className: "flex flex-col",
|
|
984
|
-
children: [/* @__PURE__ */
|
|
984
|
+
children: [/* @__PURE__ */ W(yn, {
|
|
985
985
|
item: e,
|
|
986
986
|
level: v.User,
|
|
987
987
|
label: i?.personalCredentialsLabel ?? "Personal credentials",
|
|
988
988
|
description: i?.personalCredentialsDescription ?? "These credentials apply only to your account.",
|
|
989
|
-
icon: /* @__PURE__ */
|
|
990
|
-
size:
|
|
989
|
+
icon: /* @__PURE__ */ W(ot, {
|
|
990
|
+
size: L.SM,
|
|
991
991
|
"aria-hidden": !0,
|
|
992
|
-
stroke:
|
|
992
|
+
stroke: R
|
|
993
993
|
}),
|
|
994
994
|
status: m.userStatus,
|
|
995
995
|
isActive: g,
|
|
@@ -1005,15 +1005,15 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1005
1005
|
keyCardTitleClassName: f,
|
|
1006
1006
|
keyCardDescriptionClassName: p,
|
|
1007
1007
|
deleteActionClassName: o
|
|
1008
|
-
}), /* @__PURE__ */
|
|
1008
|
+
}), /* @__PURE__ */ W(yn, {
|
|
1009
1009
|
item: e,
|
|
1010
1010
|
level: v.Global,
|
|
1011
1011
|
label: i?.organizationCredentialsLabel ?? "Organization credentials",
|
|
1012
1012
|
description: i?.organizationCredentialsDescription ?? "Once added, these credentials will grant all users in your organization access to this toolset.",
|
|
1013
|
-
icon: /* @__PURE__ */
|
|
1014
|
-
size:
|
|
1013
|
+
icon: /* @__PURE__ */ W(Re, {
|
|
1014
|
+
size: L.SM,
|
|
1015
1015
|
"aria-hidden": !0,
|
|
1016
|
-
stroke:
|
|
1016
|
+
stroke: R
|
|
1017
1017
|
}),
|
|
1018
1018
|
status: m.globalStatus,
|
|
1019
1019
|
isActive: _,
|
|
@@ -1043,9 +1043,9 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1043
1043
|
}, Cn = /* @__PURE__ */ function(e) {
|
|
1044
1044
|
return e.Idle = "idle", e.Loading = "loading", e.Resolved = "resolved", e.Unknown = "unknown", e;
|
|
1045
1045
|
}({}), wn = { divider: "_divider_nhloi_1" }, Tn = 16, En = ({ item: e, level: t, status: n, apiKeyAddedWhen: r, onLogin: i, onLogout: a, onClose: o, texts: c, deleteActionClassName: l = "text-error" }) => {
|
|
1046
|
-
let [u, d] =
|
|
1046
|
+
let [u, d] = P(""), [f, p] = P(!1), [m, h] = P(!1), [g, _] = P(!1), v = n === s.SignedIn, y = A((e) => {
|
|
1047
1047
|
d(e ?? ""), p(!1);
|
|
1048
|
-
}, []), b =
|
|
1048
|
+
}, []), b = A(async () => {
|
|
1049
1049
|
if (u.trim().length === 0) {
|
|
1050
1050
|
p(!0);
|
|
1051
1051
|
return;
|
|
@@ -1065,7 +1065,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1065
1065
|
u,
|
|
1066
1066
|
i,
|
|
1067
1067
|
o
|
|
1068
|
-
]), x =
|
|
1068
|
+
]), x = A(async () => {
|
|
1069
1069
|
_(!0);
|
|
1070
1070
|
try {
|
|
1071
1071
|
await a?.(e, { level: t }), o();
|
|
@@ -1077,23 +1077,23 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1077
1077
|
t,
|
|
1078
1078
|
a,
|
|
1079
1079
|
o
|
|
1080
|
-
]), S = c?.personalApiKeyPanelTitle ?? "Personal API key", C = c?.addApiKeyActionLabel ?? "Add", w = c?.deleteActionLabel ?? "Delete", T = c?.addingApiKeyStatusLabel ?? "Adding", E = c?.deletingStatusLabel ?? "Deleting", D = c?.apiKeyRequiredErrorMessage ?? "API key is required.", O = c?.personalApiKeyAddedMessage ?? "Personal key has been added",
|
|
1081
|
-
return /* @__PURE__ */
|
|
1080
|
+
]), S = c?.personalApiKeyPanelTitle ?? "Personal API key", C = c?.addApiKeyActionLabel ?? "Add", w = c?.deleteActionLabel ?? "Delete", T = c?.addingApiKeyStatusLabel ?? "Adding", E = c?.deletingStatusLabel ?? "Deleting", D = c?.apiKeyRequiredErrorMessage ?? "API key is required.", O = c?.personalApiKeyAddedMessage ?? "Personal key has been added", ee = r == null ? void 0 : (c?.apiKeyAddedLabel ?? ((e) => `Added ${e}`))(r);
|
|
1081
|
+
return /* @__PURE__ */ G("div", {
|
|
1082
1082
|
className: "flex w-[418px] flex-col",
|
|
1083
1083
|
children: [
|
|
1084
|
-
/* @__PURE__ */
|
|
1084
|
+
/* @__PURE__ */ W("div", {
|
|
1085
1085
|
className: "flex items-center gap-2 px-4 py-3",
|
|
1086
|
-
children: /* @__PURE__ */
|
|
1086
|
+
children: /* @__PURE__ */ W("span", {
|
|
1087
1087
|
className: "dial-small-semi-text",
|
|
1088
1088
|
children: S
|
|
1089
1089
|
})
|
|
1090
1090
|
}),
|
|
1091
|
-
/* @__PURE__ */
|
|
1092
|
-
!v && /* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ W("div", { className: k("mx-4 h-px", wn.divider) }),
|
|
1092
|
+
!v && /* @__PURE__ */ G("div", {
|
|
1093
1093
|
className: "flex animate-fadeIn flex-col gap-1 px-4 py-3.5",
|
|
1094
|
-
children: [/* @__PURE__ */
|
|
1094
|
+
children: [/* @__PURE__ */ G("div", {
|
|
1095
1095
|
className: "flex items-end gap-2",
|
|
1096
|
-
children: [/* @__PURE__ */
|
|
1096
|
+
children: [/* @__PURE__ */ W(xe, {
|
|
1097
1097
|
id: `catalog-item-${e.id}-${t}-api-key`,
|
|
1098
1098
|
type: "password",
|
|
1099
1099
|
autoComplete: "current-password",
|
|
@@ -1103,35 +1103,35 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1103
1103
|
invalid: f,
|
|
1104
1104
|
disabled: m,
|
|
1105
1105
|
containerClassName: "min-w-0 flex-1"
|
|
1106
|
-
}), /* @__PURE__ */
|
|
1106
|
+
}), /* @__PURE__ */ W(we, {
|
|
1107
1107
|
label: m ? void 0 : C,
|
|
1108
1108
|
"aria-label": m ? T : void 0,
|
|
1109
|
-
iconBefore: m ? /* @__PURE__ */
|
|
1109
|
+
iconBefore: m ? /* @__PURE__ */ W(Me, {
|
|
1110
1110
|
size: Tn,
|
|
1111
1111
|
ariaLabel: T
|
|
1112
1112
|
}) : void 0,
|
|
1113
1113
|
onClick: b,
|
|
1114
1114
|
disabled: m
|
|
1115
1115
|
})]
|
|
1116
|
-
}), f && /* @__PURE__ */
|
|
1116
|
+
}), f && /* @__PURE__ */ W("span", {
|
|
1117
1117
|
className: "dial-caption-text text-error",
|
|
1118
1118
|
children: D
|
|
1119
1119
|
})]
|
|
1120
1120
|
}),
|
|
1121
|
-
v && /* @__PURE__ */
|
|
1121
|
+
v && /* @__PURE__ */ W("div", {
|
|
1122
1122
|
className: "animate-fadeIn px-4 py-3.5",
|
|
1123
|
-
children: /* @__PURE__ */
|
|
1124
|
-
icon: /* @__PURE__ */
|
|
1123
|
+
children: /* @__PURE__ */ W(dn, {
|
|
1124
|
+
icon: /* @__PURE__ */ W(Je, {
|
|
1125
1125
|
size: 20,
|
|
1126
1126
|
"aria-hidden": !0,
|
|
1127
|
-
stroke:
|
|
1127
|
+
stroke: R
|
|
1128
1128
|
}),
|
|
1129
1129
|
title: O,
|
|
1130
|
-
description:
|
|
1131
|
-
action: /* @__PURE__ */
|
|
1130
|
+
description: ee,
|
|
1131
|
+
action: /* @__PURE__ */ W(z, {
|
|
1132
1132
|
label: g ? void 0 : w,
|
|
1133
1133
|
"aria-label": g ? E : void 0,
|
|
1134
|
-
iconBefore: g ? /* @__PURE__ */
|
|
1134
|
+
iconBefore: g ? /* @__PURE__ */ W(Me, {
|
|
1135
1135
|
size: Tn,
|
|
1136
1136
|
ariaLabel: E
|
|
1137
1137
|
}) : void 0,
|
|
@@ -1144,7 +1144,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1144
1144
|
]
|
|
1145
1145
|
});
|
|
1146
1146
|
}, Dn = { name: "_name_gfs1p_1" }, On = (e) => e.isMyApp === !0, kn = ({ item: e, onShare: t, shareOverlay: n, isShareVisible: r, label: i = "Share" }) => {
|
|
1147
|
-
let [a, o] =
|
|
1147
|
+
let [a, o] = P(!1), s = A(() => {
|
|
1148
1148
|
if (n) {
|
|
1149
1149
|
o((e) => !e);
|
|
1150
1150
|
return;
|
|
@@ -1156,21 +1156,21 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1156
1156
|
n
|
|
1157
1157
|
]);
|
|
1158
1158
|
if (!On(e) || r && !r(e)) return null;
|
|
1159
|
-
let c = /* @__PURE__ */
|
|
1159
|
+
let c = /* @__PURE__ */ W(we, {
|
|
1160
1160
|
label: i,
|
|
1161
|
-
iconBefore: /* @__PURE__ */
|
|
1162
|
-
size:
|
|
1163
|
-
stroke:
|
|
1161
|
+
iconBefore: /* @__PURE__ */ W(nt, {
|
|
1162
|
+
size: L.MD,
|
|
1163
|
+
stroke: R
|
|
1164
1164
|
}),
|
|
1165
|
-
iconAfter: /* @__PURE__ */
|
|
1166
|
-
size:
|
|
1167
|
-
stroke:
|
|
1165
|
+
iconAfter: /* @__PURE__ */ W(Be, {
|
|
1166
|
+
size: L.MD,
|
|
1167
|
+
stroke: R
|
|
1168
1168
|
}),
|
|
1169
1169
|
onClick: s,
|
|
1170
1170
|
"aria-haspopup": n ? "menu" : void 0,
|
|
1171
1171
|
"aria-expanded": n ? a : void 0
|
|
1172
1172
|
});
|
|
1173
|
-
return n ? /* @__PURE__ */
|
|
1173
|
+
return n ? /* @__PURE__ */ W(fe, {
|
|
1174
1174
|
placement: "bottom-end",
|
|
1175
1175
|
matchReferenceWidth: !1,
|
|
1176
1176
|
open: a,
|
|
@@ -1181,48 +1181,48 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1181
1181
|
children: c
|
|
1182
1182
|
}) : c;
|
|
1183
1183
|
}, An = (e) => e === n.ApiKey ? "Manage API keys" : "Manage credentials", jn = {
|
|
1184
|
-
[
|
|
1185
|
-
[
|
|
1186
|
-
}, Mn = ({ status: e, label: t }) => /* @__PURE__ */
|
|
1187
|
-
className:
|
|
1184
|
+
[gt.LimitReached]: "bg-error text-error",
|
|
1185
|
+
[gt.RunningLow]: "bg-warning text-warning"
|
|
1186
|
+
}, Mn = ({ status: e, label: t }) => /* @__PURE__ */ W("div", {
|
|
1187
|
+
className: k("flex h-[24px] items-center justify-center gap-1 whitespace-nowrap rounded-2xl px-2", "dial-caption-lead-semi-text", jn[e]),
|
|
1188
1188
|
children: t
|
|
1189
|
-
}), Nn = ({ item: e, onUseInChat: t, isPrimaryActionVisible: r, onShare: i, shareOverlay: a, isShareVisible: o, isSharePrimary: s, onEdit: c, onDownload: l, isDownloadVisible: u, isDownloadPrimary: d, onDelete: f, onUnshare: p, isUnshareVisible: h, onRevokeShare: g, onFetchRecipientsCount: _, isRevokeShareVisible: x, onLogin: S, onLogout: w, onOpenCredentialsManagement: T, onRequestLogout: E, texts: D, detailsStyles: O, isPublishVisible:
|
|
1190
|
-
let { nameClassName:
|
|
1191
|
-
status:
|
|
1192
|
-
label:
|
|
1193
|
-
}),
|
|
1189
|
+
}), Nn = ({ item: e, onUseInChat: t, isPrimaryActionVisible: r, onShare: i, shareOverlay: a, isShareVisible: o, isSharePrimary: s, onEdit: c, onDownload: l, isDownloadVisible: u, isDownloadPrimary: d, onDelete: f, onUnshare: p, isUnshareVisible: h, onRevokeShare: g, onFetchRecipientsCount: _, isRevokeShareVisible: x, onLogin: S, onLogout: w, onOpenCredentialsManagement: T, onRequestLogout: E, texts: D, detailsStyles: O, isPublishVisible: ee, isPublishPrimary: te, onOpenPublish: ne, isUnpublishVisible: re, hasPublishedFolders: ie = !1, isPublishHistoryResolved: ae = !0, onRequestPublishHistory: oe, onOpenUnpublish: se, isReadonly: F = !1 }) => {
|
|
1190
|
+
let { nameClassName: ce = "dial-body-semi-text", folderLabelClassName: le = "dial-tiny-text", folderLeafClassName: I = "dial-tiny-semi-text" } = O?.typography ?? {}, ue = e.details?.limits?.status, de = ue == null ? void 0 : /* @__PURE__ */ W(Mn, {
|
|
1191
|
+
status: ue,
|
|
1192
|
+
label: ue === gt.LimitReached ? D?.limitReachedLabel ?? "Limit reached" : D?.limitRunningLowLabel ?? "Running low"
|
|
1193
|
+
}), pe = A(() => {
|
|
1194
1194
|
t?.(e);
|
|
1195
|
-
}, [e, t]),
|
|
1195
|
+
}, [e, t]), me = A(() => {
|
|
1196
1196
|
c?.(e);
|
|
1197
|
-
}, [e, c]),
|
|
1198
|
-
|
|
1199
|
-
}, [
|
|
1200
|
-
|
|
1201
|
-
}, [
|
|
1197
|
+
}, [e, c]), ge = A(() => {
|
|
1198
|
+
ne?.();
|
|
1199
|
+
}, [ne]), _e = A(() => {
|
|
1200
|
+
se?.();
|
|
1201
|
+
}, [se]), ve = A(() => {
|
|
1202
1202
|
l?.(e);
|
|
1203
|
-
}, [e, l]), [
|
|
1204
|
-
|
|
1205
|
-
|
|
1203
|
+
}, [e, l]), [ye, be] = P(!1);
|
|
1204
|
+
j(() => {
|
|
1205
|
+
be(!1);
|
|
1206
1206
|
}, [e.id]);
|
|
1207
|
-
let
|
|
1208
|
-
|
|
1207
|
+
let xe = A(() => {
|
|
1208
|
+
ye || (be(!0), (async () => {
|
|
1209
1209
|
try {
|
|
1210
1210
|
await l?.(e);
|
|
1211
1211
|
} catch {} finally {
|
|
1212
|
-
|
|
1212
|
+
be(!1);
|
|
1213
1213
|
}
|
|
1214
1214
|
})());
|
|
1215
1215
|
}, [
|
|
1216
1216
|
e,
|
|
1217
1217
|
l,
|
|
1218
|
-
|
|
1219
|
-
]), [
|
|
1220
|
-
|
|
1221
|
-
|
|
1218
|
+
ye
|
|
1219
|
+
]), [z, Se] = P(!1);
|
|
1220
|
+
j(() => {
|
|
1221
|
+
Se(!1);
|
|
1222
1222
|
}, [e.id]);
|
|
1223
|
-
let
|
|
1223
|
+
let Ce = A(() => {
|
|
1224
1224
|
if (a) {
|
|
1225
|
-
|
|
1225
|
+
Se(!0);
|
|
1226
1226
|
return;
|
|
1227
1227
|
}
|
|
1228
1228
|
i?.(e);
|
|
@@ -1230,29 +1230,29 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1230
1230
|
e,
|
|
1231
1231
|
i,
|
|
1232
1232
|
a
|
|
1233
|
-
]),
|
|
1234
|
-
|
|
1235
|
-
}, []),
|
|
1233
|
+
]), De = A(() => {
|
|
1234
|
+
Se(!1);
|
|
1235
|
+
}, []), Oe = A(() => {
|
|
1236
1236
|
p?.(e);
|
|
1237
|
-
}, [e, p]),
|
|
1237
|
+
}, [e, p]), ke = A(() => {
|
|
1238
1238
|
f?.(e);
|
|
1239
|
-
}, [e, f]),
|
|
1239
|
+
}, [e, f]), Ae = A(() => {
|
|
1240
1240
|
g?.(e);
|
|
1241
|
-
}, [e, g]), [
|
|
1242
|
-
|
|
1243
|
-
|
|
1241
|
+
}, [e, g]), [je, B] = P(Cn.Idle), [Ne, Pe] = P(void 0), Fe = N(null);
|
|
1242
|
+
j(() => {
|
|
1243
|
+
Fe.current = null, B(Cn.Idle), Pe(void 0);
|
|
1244
1244
|
}, [e.id]);
|
|
1245
|
-
let
|
|
1246
|
-
if (!_ ||
|
|
1245
|
+
let V = A(() => {
|
|
1246
|
+
if (!_ || Fe.current === e.id || !g || e.isMyApp !== !0 || x?.(e) === !1) return;
|
|
1247
1247
|
let t = e.id;
|
|
1248
|
-
|
|
1248
|
+
Fe.current = t, B(Cn.Loading), (async () => {
|
|
1249
1249
|
try {
|
|
1250
1250
|
let n = await _(e);
|
|
1251
|
-
if (
|
|
1252
|
-
|
|
1251
|
+
if (Fe.current !== t) return;
|
|
1252
|
+
Pe(n), B(n == null ? Cn.Unknown : Cn.Resolved);
|
|
1253
1253
|
} catch {
|
|
1254
|
-
if (
|
|
1255
|
-
|
|
1254
|
+
if (Fe.current !== t) return;
|
|
1255
|
+
Pe(void 0), B(Cn.Unknown);
|
|
1256
1256
|
}
|
|
1257
1257
|
})();
|
|
1258
1258
|
}, [
|
|
@@ -1260,295 +1260,295 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1260
1260
|
_,
|
|
1261
1261
|
g,
|
|
1262
1262
|
x
|
|
1263
|
-
]),
|
|
1264
|
-
e && (
|
|
1265
|
-
}, [
|
|
1266
|
-
|
|
1267
|
-
}, [
|
|
1268
|
-
|
|
1269
|
-
}, [
|
|
1263
|
+
]), Ie = A((e) => {
|
|
1264
|
+
e && (V(), oe?.());
|
|
1265
|
+
}, [V, oe]), Re = A(() => {
|
|
1266
|
+
V(), oe?.();
|
|
1267
|
+
}, [V, oe]), ze = A(() => {
|
|
1268
|
+
oe?.();
|
|
1269
|
+
}, [oe]), Ve = D?.hasPrimaryAction !== !1 && (r?.(e) ?? (e.type === b.Model || e.type === b.Agent || e.type === b.Prompt)), He = !F && !!se && ie && (re?.(e) ?? !0), Ue = !F && !!se && !ae && re?.(e) === !0, Ke = !F && !He && (ee?.(e) ?? (e.type === b.Model || e.type === b.Toolset || e.type === b.Agent)), qe = !F && !!c && !!e.isEditable, Ye = !F && e.isMyApp === !0 && (o?.(e) ?? !0), Xe = s?.(e) ?? !0, tt = te?.(e) ?? !1, rt = e.credentials?.authenticationType ?? n.None, H = e.credentials != null && rt !== n.None ? m(e.credentials) : void 0, at = !F && H != null && (!!S || !!w), ot = e.type === b.Toolset && at, ut = !!l && (u?.(e) ?? !0), dt = ut && !ot && (d?.(e) ?? (e.type === b.Skill && !Ve)), ft = ut && !dt, pt = !F && e.isMyApp, mt = !F && !!p && e.isMyApp !== !0 && e.sharedWithMe === !0 && (h?.(e) ?? !0), ht = !F && !!g && e.isMyApp === !0 && (!_ || je === Cn.Unknown || je === Cn.Resolved && (Ne ?? 0) > 0) && (x?.(e) ?? !0), K = M(() => {
|
|
1270
1270
|
let e = [];
|
|
1271
|
-
if (!
|
|
1271
|
+
if (!Xe && Ye && e.push({
|
|
1272
1272
|
key: "share",
|
|
1273
1273
|
label: D?.shareLabel ?? "Share",
|
|
1274
|
-
icon: /* @__PURE__ */
|
|
1275
|
-
size:
|
|
1274
|
+
icon: /* @__PURE__ */ W(nt, {
|
|
1275
|
+
size: L.SM,
|
|
1276
1276
|
"aria-hidden": !0,
|
|
1277
1277
|
className: "text-secondary",
|
|
1278
|
-
stroke:
|
|
1278
|
+
stroke: R
|
|
1279
1279
|
}),
|
|
1280
|
-
onClick:
|
|
1281
|
-
}),
|
|
1280
|
+
onClick: Ce
|
|
1281
|
+
}), qe && e.push({
|
|
1282
1282
|
key: "edit",
|
|
1283
1283
|
label: D?.editActionLabel ?? "Edit",
|
|
1284
|
-
icon: /* @__PURE__ */
|
|
1285
|
-
size:
|
|
1284
|
+
icon: /* @__PURE__ */ W($e, {
|
|
1285
|
+
size: L.SM,
|
|
1286
1286
|
"aria-hidden": !0,
|
|
1287
1287
|
className: "text-secondary",
|
|
1288
|
-
stroke:
|
|
1288
|
+
stroke: R
|
|
1289
1289
|
}),
|
|
1290
|
-
onClick:
|
|
1291
|
-
}),
|
|
1290
|
+
onClick: me
|
|
1291
|
+
}), ft && e.push({
|
|
1292
1292
|
key: "download",
|
|
1293
1293
|
label: D?.downloadActionLabel ?? "Download",
|
|
1294
|
-
icon: /* @__PURE__ */
|
|
1295
|
-
size:
|
|
1294
|
+
icon: /* @__PURE__ */ W(Ge, {
|
|
1295
|
+
size: L.SM,
|
|
1296
1296
|
"aria-hidden": !0,
|
|
1297
1297
|
className: "text-secondary",
|
|
1298
|
-
stroke:
|
|
1298
|
+
stroke: R
|
|
1299
1299
|
}),
|
|
1300
|
-
onClick:
|
|
1301
|
-
}), !
|
|
1300
|
+
onClick: ve
|
|
1301
|
+
}), !tt && Ke && e.push({
|
|
1302
1302
|
key: "publish",
|
|
1303
1303
|
label: D?.publishLabel ?? "Publish",
|
|
1304
|
-
icon: /* @__PURE__ */
|
|
1305
|
-
size:
|
|
1304
|
+
icon: /* @__PURE__ */ W(lt, {
|
|
1305
|
+
size: L.SM,
|
|
1306
1306
|
"aria-hidden": !0,
|
|
1307
1307
|
className: "text-secondary",
|
|
1308
|
-
stroke:
|
|
1308
|
+
stroke: R
|
|
1309
1309
|
}),
|
|
1310
|
-
onClick:
|
|
1311
|
-
}), !
|
|
1310
|
+
onClick: ge
|
|
1311
|
+
}), !tt && He && e.push({
|
|
1312
1312
|
key: "unpublish",
|
|
1313
1313
|
label: D?.unpublishLabel ?? "Unpublish",
|
|
1314
|
-
icon: /* @__PURE__ */
|
|
1315
|
-
size:
|
|
1314
|
+
icon: /* @__PURE__ */ W(ct, {
|
|
1315
|
+
size: L.SM,
|
|
1316
1316
|
"aria-hidden": !0,
|
|
1317
1317
|
className: "text-secondary",
|
|
1318
|
-
stroke:
|
|
1318
|
+
stroke: R
|
|
1319
1319
|
}),
|
|
1320
|
-
onClick:
|
|
1321
|
-
}),
|
|
1320
|
+
onClick: _e
|
|
1321
|
+
}), pt && e.push({
|
|
1322
1322
|
key: "delete",
|
|
1323
1323
|
label: D?.deleteActionLabel ?? "Delete",
|
|
1324
|
-
icon: /* @__PURE__ */
|
|
1325
|
-
size:
|
|
1324
|
+
icon: /* @__PURE__ */ W(it, {
|
|
1325
|
+
size: L.SM,
|
|
1326
1326
|
"aria-hidden": !0,
|
|
1327
|
-
stroke:
|
|
1327
|
+
stroke: R
|
|
1328
1328
|
}),
|
|
1329
1329
|
danger: !0,
|
|
1330
|
-
onClick:
|
|
1331
|
-
}),
|
|
1330
|
+
onClick: ke
|
|
1331
|
+
}), ht) {
|
|
1332
1332
|
let t = D?.revokeShareLabel ?? "Revoke access", n = D?.revokeShareLabelWithCount ?? ((e) => `${t} (${e})`);
|
|
1333
1333
|
e.push({
|
|
1334
1334
|
key: "revoke-share",
|
|
1335
|
-
label:
|
|
1336
|
-
icon: /* @__PURE__ */
|
|
1337
|
-
size:
|
|
1335
|
+
label: Ne == null ? t : n(Ne),
|
|
1336
|
+
icon: /* @__PURE__ */ W(st, {
|
|
1337
|
+
size: L.SM,
|
|
1338
1338
|
"aria-hidden": !0,
|
|
1339
|
-
stroke:
|
|
1339
|
+
stroke: R
|
|
1340
1340
|
}),
|
|
1341
1341
|
danger: !0,
|
|
1342
|
-
onClick:
|
|
1342
|
+
onClick: Ae
|
|
1343
1343
|
});
|
|
1344
1344
|
}
|
|
1345
|
-
return
|
|
1345
|
+
return mt && e.push({
|
|
1346
1346
|
key: "unshare",
|
|
1347
1347
|
label: D?.unshareLabel ?? "Remove from My List",
|
|
1348
|
-
icon: /* @__PURE__ */
|
|
1349
|
-
size:
|
|
1348
|
+
icon: /* @__PURE__ */ W(it, {
|
|
1349
|
+
size: L.SM,
|
|
1350
1350
|
"aria-hidden": !0,
|
|
1351
|
-
stroke:
|
|
1351
|
+
stroke: R
|
|
1352
1352
|
}),
|
|
1353
|
-
onClick:
|
|
1353
|
+
onClick: Oe
|
|
1354
1354
|
}), e;
|
|
1355
1355
|
}, [
|
|
1356
|
+
Xe,
|
|
1356
1357
|
Ye,
|
|
1357
|
-
|
|
1358
|
+
qe,
|
|
1359
|
+
ft,
|
|
1360
|
+
tt,
|
|
1358
1361
|
Ke,
|
|
1359
|
-
|
|
1360
|
-
et,
|
|
1361
|
-
Ge,
|
|
1362
|
-
Ve,
|
|
1363
|
-
dt,
|
|
1362
|
+
He,
|
|
1364
1363
|
pt,
|
|
1365
|
-
|
|
1366
|
-
|
|
1364
|
+
ht,
|
|
1365
|
+
Ne,
|
|
1366
|
+
mt,
|
|
1367
1367
|
D,
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
he,
|
|
1368
|
+
Ce,
|
|
1369
|
+
me,
|
|
1370
|
+
ve,
|
|
1372
1371
|
ge,
|
|
1373
|
-
|
|
1372
|
+
_e,
|
|
1374
1373
|
ke,
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1374
|
+
Ae,
|
|
1375
|
+
Oe
|
|
1376
|
+
]), [q, J] = P(!1), _t = rt === n.ApiKey && H !== y.ManageCredentials, Y = rt === n.ApiKey && H === y.LogOut, X = rt !== n.ApiKey && H !== y.ManageCredentials && H === y.LogOut, vt = A(() => {
|
|
1377
|
+
if (H === y.ManageCredentials) {
|
|
1378
1378
|
T?.();
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
|
-
if (
|
|
1382
|
-
|
|
1381
|
+
if (_t) {
|
|
1382
|
+
J((e) => !e);
|
|
1383
1383
|
return;
|
|
1384
1384
|
}
|
|
1385
|
-
if (
|
|
1385
|
+
if (H === y.LogOut) {
|
|
1386
1386
|
E?.();
|
|
1387
1387
|
return;
|
|
1388
1388
|
}
|
|
1389
1389
|
S?.(e, { level: v.User });
|
|
1390
1390
|
}, [
|
|
1391
|
-
|
|
1392
|
-
|
|
1391
|
+
H,
|
|
1392
|
+
_t,
|
|
1393
1393
|
e,
|
|
1394
1394
|
S,
|
|
1395
1395
|
T,
|
|
1396
1396
|
E
|
|
1397
|
-
]),
|
|
1398
|
-
size:
|
|
1399
|
-
stroke:
|
|
1400
|
-
}) :
|
|
1401
|
-
size:
|
|
1402
|
-
stroke:
|
|
1403
|
-
}) : /* @__PURE__ */
|
|
1404
|
-
size:
|
|
1405
|
-
stroke:
|
|
1406
|
-
}),
|
|
1407
|
-
size:
|
|
1397
|
+
]), yt = H === y.ManageCredentials ? (D?.manageCredentialsActionLabel ?? An)(rt) : rt === n.ApiKey ? H === y.LogOut ? D?.changeApiKeyActionLabel ?? "Change API key" : D?.apiKeyActionLabel ?? "API key" : H === y.LogOut ? D?.logoutActionLabel ?? "Log out" : D?.loginActionLabel ?? "Log in", bt = H === y.ManageCredentials || rt === n.ApiKey ? /* @__PURE__ */ W(Je, {
|
|
1398
|
+
size: L.MD,
|
|
1399
|
+
stroke: R
|
|
1400
|
+
}) : H === y.LogOut ? /* @__PURE__ */ W(Qe, {
|
|
1401
|
+
size: L.MD,
|
|
1402
|
+
stroke: R
|
|
1403
|
+
}) : /* @__PURE__ */ W(Ze, {
|
|
1404
|
+
size: L.MD,
|
|
1405
|
+
stroke: R
|
|
1406
|
+
}), xt = H === y.ManageCredentials ? /* @__PURE__ */ W(Le, {
|
|
1407
|
+
size: L.MD,
|
|
1408
1408
|
className: "rtl:scale-x-[-1]",
|
|
1409
|
-
stroke:
|
|
1410
|
-
}) :
|
|
1411
|
-
size:
|
|
1412
|
-
stroke:
|
|
1413
|
-
}) : void 0,
|
|
1414
|
-
let n = /* @__PURE__ */
|
|
1415
|
-
label:
|
|
1416
|
-
iconBefore:
|
|
1417
|
-
iconAfter:
|
|
1418
|
-
onClick:
|
|
1419
|
-
"aria-haspopup":
|
|
1420
|
-
"aria-expanded":
|
|
1409
|
+
stroke: R
|
|
1410
|
+
}) : _t ? /* @__PURE__ */ W(Be, {
|
|
1411
|
+
size: L.MD,
|
|
1412
|
+
stroke: R
|
|
1413
|
+
}) : void 0, Z = (t) => {
|
|
1414
|
+
let n = /* @__PURE__ */ W(t, {
|
|
1415
|
+
label: yt,
|
|
1416
|
+
iconBefore: bt,
|
|
1417
|
+
iconAfter: xt,
|
|
1418
|
+
onClick: vt,
|
|
1419
|
+
"aria-haspopup": _t ? "dialog" : void 0,
|
|
1420
|
+
"aria-expanded": _t ? q : void 0
|
|
1421
1421
|
});
|
|
1422
|
-
return !
|
|
1422
|
+
return !_t || e.credentials == null ? n : /* @__PURE__ */ W(fe, {
|
|
1423
1423
|
placement: "bottom-start",
|
|
1424
1424
|
matchReferenceWidth: !1,
|
|
1425
|
-
open:
|
|
1426
|
-
onOpenChange:
|
|
1425
|
+
open: q,
|
|
1426
|
+
onOpenChange: J,
|
|
1427
1427
|
trigger: [],
|
|
1428
1428
|
outsideClosable: !0,
|
|
1429
|
-
renderOverlay: () => /* @__PURE__ */
|
|
1429
|
+
renderOverlay: () => /* @__PURE__ */ W(En, {
|
|
1430
1430
|
item: e,
|
|
1431
1431
|
level: v.User,
|
|
1432
1432
|
status: e.credentials?.userStatus,
|
|
1433
1433
|
apiKeyAddedWhen: e.credentials?.userApiKeyAddedWhen,
|
|
1434
1434
|
onLogin: S,
|
|
1435
1435
|
onLogout: w,
|
|
1436
|
-
onClose: () =>
|
|
1436
|
+
onClose: () => J(!1),
|
|
1437
1437
|
texts: D
|
|
1438
1438
|
}),
|
|
1439
1439
|
children: n
|
|
1440
1440
|
});
|
|
1441
|
-
},
|
|
1442
|
-
let t = /* @__PURE__ */
|
|
1443
|
-
items:
|
|
1441
|
+
}, St = () => {
|
|
1442
|
+
let t = /* @__PURE__ */ W(fe, {
|
|
1443
|
+
items: K,
|
|
1444
1444
|
placement: "bottom-end",
|
|
1445
1445
|
matchReferenceWidth: !1,
|
|
1446
|
-
onOpenChange:
|
|
1447
|
-
children: /* @__PURE__ */
|
|
1448
|
-
icon: /* @__PURE__ */
|
|
1449
|
-
size:
|
|
1446
|
+
onOpenChange: Ie,
|
|
1447
|
+
children: /* @__PURE__ */ W(Te, {
|
|
1448
|
+
icon: /* @__PURE__ */ W(We, {
|
|
1449
|
+
size: L.LG,
|
|
1450
1450
|
"aria-hidden": !0,
|
|
1451
|
-
stroke:
|
|
1451
|
+
stroke: R
|
|
1452
1452
|
}),
|
|
1453
1453
|
"aria-label": D?.manageActionLabel ?? "Manage",
|
|
1454
1454
|
"aria-haspopup": "menu",
|
|
1455
|
-
onMouseEnter:
|
|
1456
|
-
onFocus:
|
|
1455
|
+
onMouseEnter: Re,
|
|
1456
|
+
onFocus: Re
|
|
1457
1457
|
})
|
|
1458
1458
|
});
|
|
1459
|
-
return
|
|
1459
|
+
return Xe || !a || !Ye ? t : /* @__PURE__ */ W(fe, {
|
|
1460
1460
|
placement: "bottom-end",
|
|
1461
1461
|
matchReferenceWidth: !1,
|
|
1462
|
-
open:
|
|
1463
|
-
onOpenChange:
|
|
1462
|
+
open: z,
|
|
1463
|
+
onOpenChange: Se,
|
|
1464
1464
|
trigger: [],
|
|
1465
1465
|
outsideClosable: !0,
|
|
1466
|
-
renderOverlay: () => a(e,
|
|
1466
|
+
renderOverlay: () => a(e, De),
|
|
1467
1467
|
children: t
|
|
1468
1468
|
});
|
|
1469
|
-
},
|
|
1470
|
-
return /* @__PURE__ */
|
|
1469
|
+
}, Ct = ot || Ve || dt || Xe && Ye || tt && He || tt && Ke || at && !ot || K.length > 0 || Ue;
|
|
1470
|
+
return /* @__PURE__ */ G("div", {
|
|
1471
1471
|
className: "flex flex-col gap-3 px-6 py-4",
|
|
1472
|
-
children: [/* @__PURE__ */
|
|
1472
|
+
children: [/* @__PURE__ */ W(C, {
|
|
1473
1473
|
item: e,
|
|
1474
1474
|
iconSize: 52,
|
|
1475
|
-
nameClassName:
|
|
1475
|
+
nameClassName: k(ce, Dn.name),
|
|
1476
1476
|
featuredLabel: D?.featuredLabel ?? "Featured",
|
|
1477
1477
|
featuredChipStyle: O?.colors?.featuredChipStyle,
|
|
1478
|
-
statusBadge:
|
|
1479
|
-
footer: e.folder.length > 0 ? /* @__PURE__ */
|
|
1478
|
+
statusBadge: de,
|
|
1479
|
+
footer: e.folder.length > 0 ? /* @__PURE__ */ W(he, {
|
|
1480
1480
|
segments: e.folder,
|
|
1481
|
-
labelClassName:
|
|
1482
|
-
leafClassName:
|
|
1481
|
+
labelClassName: le,
|
|
1482
|
+
leafClassName: I
|
|
1483
1483
|
}) : void 0
|
|
1484
|
-
}),
|
|
1484
|
+
}), Ct && /* @__PURE__ */ G("div", {
|
|
1485
1485
|
className: "flex flex-wrap items-center gap-2 ps-[60px]",
|
|
1486
1486
|
children: [
|
|
1487
|
-
|
|
1488
|
-
|
|
1487
|
+
ot && Z(Y || X ? we : Ee),
|
|
1488
|
+
Ve && /* @__PURE__ */ W(Ee, {
|
|
1489
1489
|
label: D?.primaryActionLabel ?? "Use in chat",
|
|
1490
|
-
iconBefore: /* @__PURE__ */
|
|
1491
|
-
onClick:
|
|
1492
|
-
disabled:
|
|
1490
|
+
iconBefore: /* @__PURE__ */ W(et, { size: L.MD }),
|
|
1491
|
+
onClick: pe,
|
|
1492
|
+
disabled: ue === gt.LimitReached
|
|
1493
1493
|
}),
|
|
1494
|
-
|
|
1494
|
+
dt && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(Ee, {
|
|
1495
1495
|
label: D?.downloadActionLabel ?? "Download",
|
|
1496
|
-
iconBefore:
|
|
1497
|
-
size:
|
|
1496
|
+
iconBefore: ye ? /* @__PURE__ */ W(Me, {
|
|
1497
|
+
size: L.MD,
|
|
1498
1498
|
"aria-hidden": !0
|
|
1499
|
-
}) : /* @__PURE__ */
|
|
1500
|
-
size:
|
|
1499
|
+
}) : /* @__PURE__ */ W(Ge, {
|
|
1500
|
+
size: L.MD,
|
|
1501
1501
|
"aria-hidden": !0,
|
|
1502
|
-
stroke:
|
|
1502
|
+
stroke: R
|
|
1503
1503
|
}),
|
|
1504
|
-
onClick:
|
|
1505
|
-
disabled:
|
|
1506
|
-
"aria-busy":
|
|
1507
|
-
}),
|
|
1504
|
+
onClick: xe,
|
|
1505
|
+
disabled: ye,
|
|
1506
|
+
"aria-busy": ye
|
|
1507
|
+
}), ye && /* @__PURE__ */ W("span", {
|
|
1508
1508
|
role: "status",
|
|
1509
1509
|
"aria-live": "polite",
|
|
1510
1510
|
className: "sr-only",
|
|
1511
1511
|
children: D?.downloadingStatusLabel ?? "Downloading"
|
|
1512
1512
|
})] }),
|
|
1513
|
-
|
|
1513
|
+
Xe && Ye && /* @__PURE__ */ W(kn, {
|
|
1514
1514
|
item: e,
|
|
1515
1515
|
onShare: i,
|
|
1516
1516
|
shareOverlay: a,
|
|
1517
1517
|
isShareVisible: o,
|
|
1518
1518
|
label: D?.shareLabel
|
|
1519
1519
|
}),
|
|
1520
|
-
|
|
1520
|
+
tt && He && /* @__PURE__ */ W(we, {
|
|
1521
1521
|
label: D?.unpublishLabel ?? "Unpublish",
|
|
1522
|
-
iconBefore: /* @__PURE__ */
|
|
1523
|
-
size:
|
|
1522
|
+
iconBefore: /* @__PURE__ */ W(ct, {
|
|
1523
|
+
size: L.MD,
|
|
1524
1524
|
"aria-hidden": !0,
|
|
1525
|
-
stroke:
|
|
1525
|
+
stroke: R
|
|
1526
1526
|
}),
|
|
1527
|
-
onClick:
|
|
1528
|
-
onMouseEnter:
|
|
1529
|
-
onFocus:
|
|
1527
|
+
onClick: _e,
|
|
1528
|
+
onMouseEnter: ze,
|
|
1529
|
+
onFocus: ze
|
|
1530
1530
|
}),
|
|
1531
|
-
|
|
1531
|
+
tt && Ke && /* @__PURE__ */ W(we, {
|
|
1532
1532
|
label: D?.publishLabel ?? "Publish",
|
|
1533
|
-
iconBefore: /* @__PURE__ */
|
|
1534
|
-
size:
|
|
1533
|
+
iconBefore: /* @__PURE__ */ W(lt, {
|
|
1534
|
+
size: L.MD,
|
|
1535
1535
|
"aria-hidden": !0,
|
|
1536
|
-
stroke:
|
|
1536
|
+
stroke: R
|
|
1537
1537
|
}),
|
|
1538
|
-
onClick:
|
|
1539
|
-
onMouseEnter:
|
|
1540
|
-
onFocus:
|
|
1538
|
+
onClick: ge,
|
|
1539
|
+
onMouseEnter: ze,
|
|
1540
|
+
onFocus: ze
|
|
1541
1541
|
}),
|
|
1542
|
-
|
|
1543
|
-
(
|
|
1542
|
+
at && !ot && Z(we),
|
|
1543
|
+
(K.length > 0 || Ue) && St()
|
|
1544
1544
|
]
|
|
1545
1545
|
})]
|
|
1546
1546
|
});
|
|
1547
1547
|
}, Pn = ({ topics: e, content: t, detailsStyles: n }) => {
|
|
1548
1548
|
let r = n?.typography?.contentHeadingClassName ?? "dial-small-semi-text", i = n?.typography?.contentClassName ?? "dial-small-text";
|
|
1549
|
-
return /* @__PURE__ */
|
|
1549
|
+
return /* @__PURE__ */ G("div", {
|
|
1550
1550
|
className: "flex flex-col gap-5",
|
|
1551
|
-
children: [/* @__PURE__ */
|
|
1551
|
+
children: [/* @__PURE__ */ W(O, {
|
|
1552
1552
|
content: t,
|
|
1553
1553
|
classNames: {
|
|
1554
1554
|
h1: r,
|
|
@@ -1561,9 +1561,9 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1561
1561
|
ul: i,
|
|
1562
1562
|
ol: i
|
|
1563
1563
|
}
|
|
1564
|
-
}), e && e.length > 0 && /* @__PURE__ */
|
|
1564
|
+
}), e && e.length > 0 && /* @__PURE__ */ W("div", {
|
|
1565
1565
|
className: "flex flex-wrap gap-2",
|
|
1566
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1566
|
+
children: e.map((e) => /* @__PURE__ */ W($, { label: e }, e))
|
|
1567
1567
|
})]
|
|
1568
1568
|
});
|
|
1569
1569
|
}, Fn = {
|
|
@@ -1575,10 +1575,10 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1575
1575
|
node: e,
|
|
1576
1576
|
parentId: n
|
|
1577
1577
|
};
|
|
1578
|
-
return e.type ===
|
|
1578
|
+
return e.type === X.File || !t.has(e.id) ? [r] : [r, ...In(e.items, t, e.id)];
|
|
1579
1579
|
}), Ln = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o = "Select file", rowNameClassName: s = "dial-small-text" }) => {
|
|
1580
|
-
let c =
|
|
1581
|
-
|
|
1580
|
+
let c = M(() => In(e, n), [e, n]), l = N({}), [u, d] = P(() => t ?? c[0]?.node.id);
|
|
1581
|
+
j(() => {
|
|
1582
1582
|
u != null && l.current[u]?.focus();
|
|
1583
1583
|
}, []);
|
|
1584
1584
|
let f = (e) => {
|
|
@@ -1601,42 +1601,42 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1601
1601
|
break;
|
|
1602
1602
|
}
|
|
1603
1603
|
case "ArrowRight":
|
|
1604
|
-
e.preventDefault(), o.node.type ===
|
|
1604
|
+
e.preventDefault(), o.node.type === X.Folder && !n.has(o.node.id) && r(o.node.id);
|
|
1605
1605
|
break;
|
|
1606
1606
|
case "ArrowLeft":
|
|
1607
|
-
e.preventDefault(), o.node.type ===
|
|
1607
|
+
e.preventDefault(), o.node.type === X.Folder && n.has(o.node.id) ? r(o.node.id) : o.parentId != null && f(o.parentId);
|
|
1608
1608
|
break;
|
|
1609
1609
|
case "Enter":
|
|
1610
1610
|
case " ":
|
|
1611
|
-
e.preventDefault(), o.node.type ===
|
|
1611
|
+
e.preventDefault(), o.node.type === X.Folder ? r(o.node.id) : i(o.node.id);
|
|
1612
1612
|
break;
|
|
1613
1613
|
case "Escape":
|
|
1614
1614
|
e.preventDefault(), a();
|
|
1615
1615
|
break;
|
|
1616
1616
|
default: break;
|
|
1617
1617
|
}
|
|
1618
|
-
}, m = (e) =>
|
|
1618
|
+
}, m = (e) => k("flex h-10 shrink-0 cursor-pointer items-center gap-2 rounded-2 px-3 outline-none", "hover:bg-control-accent-alpha-hover focus-visible:bg-control-accent-alpha-hover", e && "bg-control-accent-alpha-hover"), h = (e) => {
|
|
1619
1619
|
let a = e.id === u;
|
|
1620
|
-
if (e.type ===
|
|
1620
|
+
if (e.type === X.File) {
|
|
1621
1621
|
let n = e.id === t;
|
|
1622
|
-
return /* @__PURE__ */
|
|
1622
|
+
return /* @__PURE__ */ W("div", {
|
|
1623
1623
|
ref: (t) => {
|
|
1624
1624
|
l.current[e.id] = t;
|
|
1625
1625
|
},
|
|
1626
1626
|
role: "treeitem",
|
|
1627
1627
|
"aria-selected": n,
|
|
1628
1628
|
tabIndex: a ? 0 : -1,
|
|
1629
|
-
className:
|
|
1629
|
+
className: k(m(a), n && "bg-control-accent-alpha-active"),
|
|
1630
1630
|
onClick: () => i(e.id),
|
|
1631
1631
|
onFocus: () => d(e.id),
|
|
1632
|
-
children: /* @__PURE__ */
|
|
1633
|
-
className:
|
|
1632
|
+
children: /* @__PURE__ */ W("span", {
|
|
1633
|
+
className: k("min-w-0 flex-1 truncate", s),
|
|
1634
1634
|
children: e.name
|
|
1635
1635
|
})
|
|
1636
1636
|
}, e.id);
|
|
1637
1637
|
}
|
|
1638
1638
|
let o = n.has(e.id);
|
|
1639
|
-
return /* @__PURE__ */
|
|
1639
|
+
return /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ G("div", {
|
|
1640
1640
|
ref: (t) => {
|
|
1641
1641
|
l.current[e.id] = t;
|
|
1642
1642
|
},
|
|
@@ -1647,30 +1647,30 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1647
1647
|
onClick: () => r(e.id),
|
|
1648
1648
|
onFocus: () => d(e.id),
|
|
1649
1649
|
children: [
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
size:
|
|
1650
|
+
/* @__PURE__ */ W(qe, {
|
|
1651
|
+
size: L.SM,
|
|
1652
1652
|
className: "shrink-0",
|
|
1653
1653
|
"aria-hidden": !0,
|
|
1654
|
-
stroke:
|
|
1654
|
+
stroke: R
|
|
1655
1655
|
}),
|
|
1656
|
-
/* @__PURE__ */
|
|
1657
|
-
className:
|
|
1656
|
+
/* @__PURE__ */ W("span", {
|
|
1657
|
+
className: k("min-w-0 flex-1 truncate", s),
|
|
1658
1658
|
children: e.name
|
|
1659
1659
|
}),
|
|
1660
|
-
/* @__PURE__ */
|
|
1661
|
-
size:
|
|
1662
|
-
className:
|
|
1660
|
+
/* @__PURE__ */ W(Be, {
|
|
1661
|
+
size: L.SM,
|
|
1662
|
+
className: k("shrink-0 transition-transform", !o && "-rotate-90 rtl:rotate-90"),
|
|
1663
1663
|
"aria-hidden": !0,
|
|
1664
|
-
stroke:
|
|
1664
|
+
stroke: R
|
|
1665
1665
|
})
|
|
1666
1666
|
]
|
|
1667
|
-
}), o && e.items.length > 0 && /* @__PURE__ */
|
|
1667
|
+
}), o && e.items.length > 0 && /* @__PURE__ */ W("div", {
|
|
1668
1668
|
role: "group",
|
|
1669
1669
|
className: "ps-6",
|
|
1670
1670
|
children: e.items.map((e) => h(e))
|
|
1671
1671
|
})] }, e.id);
|
|
1672
1672
|
};
|
|
1673
|
-
return /* @__PURE__ */
|
|
1673
|
+
return /* @__PURE__ */ W("div", {
|
|
1674
1674
|
role: "tree",
|
|
1675
1675
|
"aria-label": o,
|
|
1676
1676
|
onKeyDown: p,
|
|
@@ -1680,25 +1680,25 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1680
1680
|
let _ = g?.typography?.contentClassName ?? "dial-small-text", v = g?.typography?.contentHeadingClassName ?? "dial-small-semi-text", y = g?.typography?.contentFileCountClassName ?? "dial-tiny-text", b = t != null && t !== "", x = n ?? [], S = Ut(x) > 1, C = Gt(x, r) ?? "", w = (e) => {
|
|
1681
1681
|
i?.(e), l(!1);
|
|
1682
1682
|
}, T = a ? {
|
|
1683
|
-
type:
|
|
1683
|
+
type: vt.Text,
|
|
1684
1684
|
text: ""
|
|
1685
1685
|
} : m ?? {
|
|
1686
|
-
type:
|
|
1686
|
+
type: vt.Markdown,
|
|
1687
1687
|
text: e
|
|
1688
1688
|
};
|
|
1689
|
-
return /* @__PURE__ */
|
|
1689
|
+
return /* @__PURE__ */ G("div", {
|
|
1690
1690
|
className: "flex h-full flex-col gap-4 pb-6",
|
|
1691
1691
|
children: [
|
|
1692
|
-
S && /* @__PURE__ */
|
|
1692
|
+
S && /* @__PURE__ */ G("div", {
|
|
1693
1693
|
className: "flex shrink-0 items-center gap-3",
|
|
1694
|
-
children: [/* @__PURE__ */
|
|
1694
|
+
children: [/* @__PURE__ */ W(fe, {
|
|
1695
1695
|
open: c,
|
|
1696
1696
|
onOpenChange: l,
|
|
1697
1697
|
trigger: [],
|
|
1698
1698
|
matchReferenceWidth: !1,
|
|
1699
1699
|
listClassName: "w-[280px]",
|
|
1700
1700
|
placement: "bottom-start",
|
|
1701
|
-
renderOverlay: () => /* @__PURE__ */
|
|
1701
|
+
renderOverlay: () => /* @__PURE__ */ W(Ln, {
|
|
1702
1702
|
nodes: x,
|
|
1703
1703
|
selectedFileId: r,
|
|
1704
1704
|
expandedFolderIds: o,
|
|
@@ -1708,45 +1708,45 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1708
1708
|
ariaLabel: u,
|
|
1709
1709
|
rowNameClassName: _
|
|
1710
1710
|
}),
|
|
1711
|
-
children: /* @__PURE__ */
|
|
1711
|
+
children: /* @__PURE__ */ W(be, {
|
|
1712
1712
|
label: C,
|
|
1713
|
-
size:
|
|
1713
|
+
size: pe.Small,
|
|
1714
1714
|
isOpen: c,
|
|
1715
1715
|
onClick: () => l(!c)
|
|
1716
1716
|
})
|
|
1717
|
-
}), /* @__PURE__ */
|
|
1718
|
-
className:
|
|
1717
|
+
}), /* @__PURE__ */ W("span", {
|
|
1718
|
+
className: k("shrink-0", y, Fn.fileCount),
|
|
1719
1719
|
children: d(Ut(x))
|
|
1720
1720
|
})]
|
|
1721
1721
|
}),
|
|
1722
|
-
b && /* @__PURE__ */
|
|
1723
|
-
className:
|
|
1722
|
+
b && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("p", {
|
|
1723
|
+
className: k("m-0", _),
|
|
1724
1724
|
children: t
|
|
1725
|
-
}), /* @__PURE__ */
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
-
className:
|
|
1728
|
-
children: [a && /* @__PURE__ */
|
|
1725
|
+
}), /* @__PURE__ */ W("div", { className: k("shrink-0", Fn.divider) })] }),
|
|
1726
|
+
/* @__PURE__ */ G("div", {
|
|
1727
|
+
className: k("min-h-0 flex-1 text-start", h == null ? "overflow-auto break-words" : "overflow-hidden", h == null && Fn.body, h == null && _),
|
|
1728
|
+
children: [a && /* @__PURE__ */ W("span", {
|
|
1729
1729
|
role: "status",
|
|
1730
1730
|
className: "sr-only",
|
|
1731
1731
|
children: f
|
|
1732
1732
|
}), (() => {
|
|
1733
1733
|
if (h != null) return h;
|
|
1734
1734
|
switch (T.type) {
|
|
1735
|
-
case
|
|
1735
|
+
case vt.Markdown: return /* @__PURE__ */ W(ee, {
|
|
1736
1736
|
content: T.text,
|
|
1737
1737
|
headingClassName: v
|
|
1738
1738
|
});
|
|
1739
|
-
case
|
|
1739
|
+
case vt.Text: return /* @__PURE__ */ W(D, {
|
|
1740
1740
|
language: T.language ?? "",
|
|
1741
1741
|
value: T.text,
|
|
1742
1742
|
hideDownload: !0
|
|
1743
1743
|
});
|
|
1744
|
-
case
|
|
1744
|
+
case vt.Image: return /* @__PURE__ */ W("img", {
|
|
1745
1745
|
src: T.url,
|
|
1746
1746
|
alt: C,
|
|
1747
1747
|
className: "max-w-full"
|
|
1748
1748
|
});
|
|
1749
|
-
case
|
|
1749
|
+
case vt.Unsupported: return /* @__PURE__ */ W("p", {
|
|
1750
1750
|
className: "m-0",
|
|
1751
1751
|
children: p
|
|
1752
1752
|
});
|
|
@@ -1771,56 +1771,56 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1771
1771
|
progressFillDanger: "_progressFillDanger_ltnqp_32"
|
|
1772
1772
|
}, Xn = ({ row: e, labelClassName: t, captionClassName: n, valueClassName: r, noteValueClassName: i, noteClassName: a }) => {
|
|
1773
1773
|
let o = Wn(e);
|
|
1774
|
-
return /* @__PURE__ */
|
|
1775
|
-
className:
|
|
1776
|
-
children: [/* @__PURE__ */
|
|
1774
|
+
return /* @__PURE__ */ G("li", {
|
|
1775
|
+
className: k("flex items-center justify-between gap-5 border-b py-4 first:pt-0 last:border-b-0 last:pb-0", Yn.divider),
|
|
1776
|
+
children: [/* @__PURE__ */ G("div", {
|
|
1777
1777
|
className: "flex min-w-0 flex-1 flex-col",
|
|
1778
|
-
children: [/* @__PURE__ */
|
|
1779
|
-
className:
|
|
1778
|
+
children: [/* @__PURE__ */ W("span", {
|
|
1779
|
+
className: k("break-words", t, Yn.label),
|
|
1780
1780
|
children: e.label
|
|
1781
|
-
}), e.captionLabel != null && /* @__PURE__ */
|
|
1782
|
-
className:
|
|
1781
|
+
}), e.captionLabel != null && /* @__PURE__ */ W("span", {
|
|
1782
|
+
className: k("break-words", n, Yn.label),
|
|
1783
1783
|
children: e.captionLabel
|
|
1784
1784
|
})]
|
|
1785
|
-
}), Kn(e) ? /* @__PURE__ */
|
|
1785
|
+
}), Kn(e) ? /* @__PURE__ */ G("div", {
|
|
1786
1786
|
className: "flex w-32 shrink-0 flex-col items-end gap-2",
|
|
1787
|
-
children: [/* @__PURE__ */
|
|
1788
|
-
className:
|
|
1789
|
-
children: e.usedLabel != null && e.totalLabel != null ? /* @__PURE__ */
|
|
1787
|
+
children: [/* @__PURE__ */ W("div", {
|
|
1788
|
+
className: k("flex gap-1", r),
|
|
1789
|
+
children: e.usedLabel != null && e.totalLabel != null ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", {
|
|
1790
1790
|
className: Yn.valuePrimary,
|
|
1791
1791
|
children: e.usedLabel
|
|
1792
|
-
}), /* @__PURE__ */
|
|
1792
|
+
}), /* @__PURE__ */ W("span", {
|
|
1793
1793
|
className: Yn.label,
|
|
1794
1794
|
children: ` / ${e.totalLabel}`
|
|
1795
|
-
})] }) : /* @__PURE__ */
|
|
1795
|
+
})] }) : /* @__PURE__ */ W("span", {
|
|
1796
1796
|
className: Yn.label,
|
|
1797
1797
|
children: o
|
|
1798
1798
|
})
|
|
1799
|
-
}), /* @__PURE__ */
|
|
1799
|
+
}), /* @__PURE__ */ W(De, {
|
|
1800
1800
|
value: Hn(e),
|
|
1801
1801
|
max: Un(e.total),
|
|
1802
|
-
size:
|
|
1803
|
-
className:
|
|
1802
|
+
size: pe.Small,
|
|
1803
|
+
className: k("!h-1 w-full", Yn.progressTrack, Jn(e) === Vn.Default && Yn.progressFillDefault, Jn(e) === Vn.Warning && Yn.progressFillWarning, Jn(e) === Vn.Danger && Yn.progressFillDanger),
|
|
1804
1804
|
"aria-label": e.label,
|
|
1805
1805
|
"aria-valuetext": e.ariaLabel ?? o
|
|
1806
1806
|
})]
|
|
1807
|
-
}) : /* @__PURE__ */
|
|
1807
|
+
}) : /* @__PURE__ */ G("div", {
|
|
1808
1808
|
className: "flex shrink-0 flex-col items-end",
|
|
1809
|
-
children: [/* @__PURE__ */
|
|
1810
|
-
className:
|
|
1809
|
+
children: [/* @__PURE__ */ W("span", {
|
|
1810
|
+
className: k(i, Yn.valuePrimary),
|
|
1811
1811
|
children: o
|
|
1812
|
-
}), e.noteLabel != null && /* @__PURE__ */
|
|
1813
|
-
className:
|
|
1812
|
+
}), e.noteLabel != null && /* @__PURE__ */ W("span", {
|
|
1813
|
+
className: k(a, Yn.label),
|
|
1814
1814
|
children: e.noteLabel
|
|
1815
1815
|
})]
|
|
1816
1816
|
})]
|
|
1817
1817
|
});
|
|
1818
|
-
}, Zn = ({ group: e, sectionClassName: t, labelClassName: n, captionClassName: r, valueClassName: i, noteValueClassName: a, noteClassName: o }) => /* @__PURE__ */
|
|
1819
|
-
className:
|
|
1818
|
+
}, Zn = ({ group: e, sectionClassName: t, labelClassName: n, captionClassName: r, valueClassName: i, noteValueClassName: a, noteClassName: o }) => /* @__PURE__ */ G("section", { children: [/* @__PURE__ */ W("p", {
|
|
1819
|
+
className: k("mb-3 mt-0", t, Yn.sectionHeading),
|
|
1820
1820
|
children: e.label
|
|
1821
|
-
}), /* @__PURE__ */
|
|
1821
|
+
}), /* @__PURE__ */ W("ul", {
|
|
1822
1822
|
className: "m-0 flex list-none flex-col p-0",
|
|
1823
|
-
children: e.rows.map((e) => /* @__PURE__ */
|
|
1823
|
+
children: e.rows.map((e) => /* @__PURE__ */ W(Xn, {
|
|
1824
1824
|
row: e,
|
|
1825
1825
|
labelClassName: n,
|
|
1826
1826
|
captionClassName: r,
|
|
@@ -1830,9 +1830,9 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1830
1830
|
}, e.label))
|
|
1831
1831
|
})] }), Qn = ({ limits: e, labelClassName: t = "dial-small-semi-text", captionClassName: n = "dial-caption-text", valueClassName: r = "dial-tiny-text", noteValueClassName: i = "dial-tiny-semi-text", noteClassName: a = "dial-caption-text", sectionClassName: o = "dial-caption-text", footerClassName: s = "dial-caption-text", footerNote: c, colors: l }) => {
|
|
1832
1832
|
let u = e?.groups.filter((e) => e.rows.length > 0);
|
|
1833
|
-
return u == null || u.length === 0 ? null : /* @__PURE__ */
|
|
1833
|
+
return u == null || u.length === 0 ? null : /* @__PURE__ */ G("div", {
|
|
1834
1834
|
className: "flex flex-col gap-6",
|
|
1835
|
-
style:
|
|
1835
|
+
style: ie({
|
|
1836
1836
|
"--lt-section-heading": l?.sectionHeading,
|
|
1837
1837
|
"--lt-label": l?.label,
|
|
1838
1838
|
"--lt-value-primary": l?.valuePrimary,
|
|
@@ -1842,7 +1842,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1842
1842
|
"--lt-progress-fill-warning": l?.progressFillWarning,
|
|
1843
1843
|
"--lt-progress-fill-danger": l?.progressFillDanger
|
|
1844
1844
|
}),
|
|
1845
|
-
children: [u.map((e) => /* @__PURE__ */
|
|
1845
|
+
children: [u.map((e) => /* @__PURE__ */ W(Zn, {
|
|
1846
1846
|
group: e,
|
|
1847
1847
|
sectionClassName: o,
|
|
1848
1848
|
labelClassName: t,
|
|
@@ -1850,18 +1850,18 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1850
1850
|
valueClassName: r,
|
|
1851
1851
|
noteValueClassName: i,
|
|
1852
1852
|
noteClassName: a
|
|
1853
|
-
}, e.label)), c != null && /* @__PURE__ */
|
|
1854
|
-
className:
|
|
1853
|
+
}, e.label)), c != null && /* @__PURE__ */ W("p", {
|
|
1854
|
+
className: k("m-0 border-t pt-4", s, Yn.divider, Yn.label),
|
|
1855
1855
|
children: c
|
|
1856
1856
|
})]
|
|
1857
1857
|
});
|
|
1858
|
-
}, $n = ({ sections: e, sectionClassName: t, labelClassName: n, valueClassName: r, valueTrueClassName: i, yesLabel: a, noLabel: o }) => e ? /* @__PURE__ */
|
|
1858
|
+
}, $n = ({ sections: e, sectionClassName: t, labelClassName: n, valueClassName: r, valueTrueClassName: i, yesLabel: a, noLabel: o }) => e ? /* @__PURE__ */ W("div", {
|
|
1859
1859
|
className: "flex flex-col gap-4",
|
|
1860
|
-
children: e.map((e, s) => /* @__PURE__ */
|
|
1860
|
+
children: e.map((e, s) => /* @__PURE__ */ G("div", {
|
|
1861
1861
|
className: "flex flex-col gap-4",
|
|
1862
|
-
children: [s > 0 && /* @__PURE__ */
|
|
1862
|
+
children: [s > 0 && /* @__PURE__ */ W("div", { className: k("shrink-0 border-b", Sn.divider) }), /* @__PURE__ */ W("div", {
|
|
1863
1863
|
className: "px-6",
|
|
1864
|
-
children: /* @__PURE__ */
|
|
1864
|
+
children: /* @__PURE__ */ W(Jt, {
|
|
1865
1865
|
sectionLabel: e.title,
|
|
1866
1866
|
values: e.specs,
|
|
1867
1867
|
sectionClassName: t,
|
|
@@ -1882,15 +1882,15 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1882
1882
|
label: e.label,
|
|
1883
1883
|
value: e.value
|
|
1884
1884
|
}));
|
|
1885
|
-
return /* @__PURE__ */
|
|
1885
|
+
return /* @__PURE__ */ G("div", {
|
|
1886
1886
|
className: "flex flex-col gap-4",
|
|
1887
|
-
children: [/* @__PURE__ */
|
|
1887
|
+
children: [/* @__PURE__ */ W(Jt, {
|
|
1888
1888
|
sectionLabel: t,
|
|
1889
1889
|
values: o ?? [],
|
|
1890
1890
|
labelClassName: r,
|
|
1891
1891
|
valueClassName: i,
|
|
1892
1892
|
sectionClassName: a
|
|
1893
|
-
}), /* @__PURE__ */
|
|
1893
|
+
}), /* @__PURE__ */ W(Jt, {
|
|
1894
1894
|
sectionLabel: n,
|
|
1895
1895
|
values: s ?? [],
|
|
1896
1896
|
labelClassName: r,
|
|
@@ -1905,14 +1905,14 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1905
1905
|
evenRow: "_evenRow_ddi3i_17"
|
|
1906
1906
|
}, nr = ({ columns: e, rows: t, columnsTemplate: n, headingClassName: r = "dial-caption-lead-semi-text", cellClassName: i = "dial-tiny-text" }) => {
|
|
1907
1907
|
let a = n ?? `repeat(${e.length}, 1fr)`;
|
|
1908
|
-
return /* @__PURE__ */
|
|
1909
|
-
className:
|
|
1908
|
+
return /* @__PURE__ */ G("div", {
|
|
1909
|
+
className: k(tr.container, "grid overflow-hidden rounded-md"),
|
|
1910
1910
|
style: { gridTemplateColumns: a },
|
|
1911
|
-
children: [e.map((e) => /* @__PURE__ */
|
|
1912
|
-
className:
|
|
1911
|
+
children: [e.map((e) => /* @__PURE__ */ W("div", {
|
|
1912
|
+
className: k("px-2 py-1 text-start", r, tr.header),
|
|
1913
1913
|
children: e
|
|
1914
|
-
}, e)), t.map((e, t) => /* @__PURE__ */
|
|
1915
|
-
className:
|
|
1914
|
+
}, e)), t.map((e, t) => /* @__PURE__ */ W(ae, { children: e.map((e, n) => /* @__PURE__ */ W("div", {
|
|
1915
|
+
className: k("px-2 py-1.5", i, tr.cell, t % 2 == 1 ? tr.evenRow : void 0),
|
|
1916
1916
|
children: e
|
|
1917
1917
|
}, n)) }, t))]
|
|
1918
1918
|
});
|
|
@@ -1920,22 +1920,22 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1920
1920
|
divider: "_divider_1f796_1",
|
|
1921
1921
|
description: "_description_1f796_5",
|
|
1922
1922
|
code: "_code_1f796_9"
|
|
1923
|
-
}, ir = ({ tools: e, toolNameClassName: t = "dial-small-semi-text", descriptionClassName: n = "dial-small-text", tableHeadingClassName: r = "dial-caption-text", tableCellClassName: i = "dial-tiny-text" }) => e == null ? null : /* @__PURE__ */
|
|
1923
|
+
}, ir = ({ tools: e, toolNameClassName: t = "dial-small-semi-text", descriptionClassName: n = "dial-small-text", tableHeadingClassName: r = "dial-caption-text", tableCellClassName: i = "dial-tiny-text" }) => e == null ? null : /* @__PURE__ */ W("div", {
|
|
1924
1924
|
className: "flex flex-col",
|
|
1925
|
-
children: e.tools.map((e, a) => /* @__PURE__ */
|
|
1926
|
-
className:
|
|
1925
|
+
children: e.tools.map((e, a) => /* @__PURE__ */ G("div", {
|
|
1926
|
+
className: k("flex flex-col gap-3 px-[22px] py-4", a > 0 ? rr.divider : void 0),
|
|
1927
1927
|
children: [
|
|
1928
|
-
/* @__PURE__ */
|
|
1928
|
+
/* @__PURE__ */ G("div", {
|
|
1929
1929
|
className: "flex flex-col gap-1",
|
|
1930
|
-
children: [/* @__PURE__ */
|
|
1930
|
+
children: [/* @__PURE__ */ W("span", {
|
|
1931
1931
|
className: t,
|
|
1932
1932
|
children: e.name
|
|
1933
|
-
}), e.description != null && /* @__PURE__ */
|
|
1934
|
-
className:
|
|
1933
|
+
}), e.description != null && /* @__PURE__ */ W("p", {
|
|
1934
|
+
className: k("m-0", n, rr.description),
|
|
1935
1935
|
children: e.description
|
|
1936
1936
|
})]
|
|
1937
1937
|
}),
|
|
1938
|
-
e.inputParams != null && e.inputParams.length > 0 && /* @__PURE__ */
|
|
1938
|
+
e.inputParams != null && e.inputParams.length > 0 && /* @__PURE__ */ W(nr, {
|
|
1939
1939
|
columns: [
|
|
1940
1940
|
"Name",
|
|
1941
1941
|
"Type",
|
|
@@ -1943,12 +1943,12 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1943
1943
|
],
|
|
1944
1944
|
columnsTemplate: "1fr 1fr auto",
|
|
1945
1945
|
rows: e.inputParams.map((e) => [
|
|
1946
|
-
/* @__PURE__ */
|
|
1947
|
-
className:
|
|
1946
|
+
/* @__PURE__ */ W("code", {
|
|
1947
|
+
className: k("text-inherit border-none bg-transparent p-0", rr.code),
|
|
1948
1948
|
children: e.name
|
|
1949
1949
|
}, "name"),
|
|
1950
|
-
/* @__PURE__ */
|
|
1951
|
-
className:
|
|
1950
|
+
/* @__PURE__ */ W("code", {
|
|
1951
|
+
className: k("text-inherit border-none bg-transparent p-0", rr.code),
|
|
1952
1952
|
children: e.type
|
|
1953
1953
|
}, "type"),
|
|
1954
1954
|
e.isRequired ? "✓" : "—"
|
|
@@ -1956,10 +1956,10 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1956
1956
|
headingClassName: r,
|
|
1957
1957
|
cellClassName: i
|
|
1958
1958
|
}),
|
|
1959
|
-
e.annotations != null && e.annotations.length > 0 && /* @__PURE__ */
|
|
1959
|
+
e.annotations != null && e.annotations.length > 0 && /* @__PURE__ */ W(nr, {
|
|
1960
1960
|
columns: ["Key", "Value"],
|
|
1961
|
-
rows: e.annotations.map((e) => [/* @__PURE__ */
|
|
1962
|
-
className:
|
|
1961
|
+
rows: e.annotations.map((e) => [/* @__PURE__ */ W("code", {
|
|
1962
|
+
className: k("text-inherit border-none bg-transparent p-0", rr.code),
|
|
1963
1963
|
children: e.key
|
|
1964
1964
|
}, "key"), e.value]),
|
|
1965
1965
|
headingClassName: r,
|
|
@@ -1983,166 +1983,166 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1983
1983
|
"Everyone you shared it with loses access",
|
|
1984
1984
|
"Existing share links stop working",
|
|
1985
1985
|
"You keep full access — nothing is deleted"
|
|
1986
|
-
], hr = (e) => e === n.ApiKey ? "Toolset API keys" : "Toolset credentials", gr = (e) => e === v.Global ? "Are you sure you want to delete the organization API key?" : "Are you sure you want to delete your personal API key?", _r = new Set([
|
|
1987
|
-
let { subViewTitleClassName:
|
|
1988
|
-
"--cat-details-backdrop":
|
|
1989
|
-
"--cat-details-bg":
|
|
1990
|
-
"--cat-details-border":
|
|
1991
|
-
"--cat-details-divider":
|
|
1992
|
-
"--cat-details-scrollbar":
|
|
1993
|
-
"--cat-details-skeleton":
|
|
1994
|
-
"--cat-details-name-text":
|
|
1995
|
-
"--cat-details-publish-title-text":
|
|
1996
|
-
"--cat-details-content-text":
|
|
1997
|
-
"--cat-details-variable-text":
|
|
1998
|
-
"--cat-details-file-count-text":
|
|
1999
|
-
"--cat-api-heading-text":
|
|
2000
|
-
"--cat-tools-divider":
|
|
2001
|
-
"--cat-tools-description-text":
|
|
2002
|
-
"--cat-grid-border":
|
|
2003
|
-
"--cat-grid-header-text":
|
|
2004
|
-
"--cat-grid-header-bg":
|
|
2005
|
-
"--cat-grid-cell-text":
|
|
2006
|
-
"--cat-grid-cell-divider":
|
|
2007
|
-
"--cat-grid-row-even-bg":
|
|
2008
|
-
"--cat-info-card-bg":
|
|
2009
|
-
"--cat-info-card-danger-bg":
|
|
2010
|
-
"--cat-confirm-message-text":
|
|
2011
|
-
"--cat-confirm-consequence-text":
|
|
2012
|
-
"--cat-confirm-footer-border":
|
|
2013
|
-
"--cat-cred-surface-bg":
|
|
2014
|
-
"--cat-cred-active-icon":
|
|
2015
|
-
"--cat-cred-banner-icon-bg":
|
|
2016
|
-
"--cat-cred-description-text":
|
|
2017
|
-
"--cat-cred-row-description-text":
|
|
2018
|
-
"--cat-cred-error-text":
|
|
2019
|
-
"--cat-cred-card-bg":
|
|
2020
|
-
"--cat-cred-card-icon":
|
|
2021
|
-
"--cat-cred-card-title-text":
|
|
2022
|
-
"--cat-cred-card-description-text":
|
|
2023
|
-
}), [
|
|
2024
|
-
let t =
|
|
2025
|
-
t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t),
|
|
1986
|
+
], hr = (e) => e === n.ApiKey ? "Toolset API keys" : "Toolset credentials", gr = (e) => e === v.Global ? "Are you sure you want to delete the organization API key?" : "Are you sure you want to delete your personal API key?", _r = new Set([q.Delete, q.Unshare]), vr = ({ item: e, isOpen: t, isStarred: n = !1, isDetailsLoading: r = !1, isReadonly: i = !1, onClose: a, onToggleFavorite: o, isFavoriteVisible: s, onUseInChat: l, isPrimaryActionVisible: u, onShare: f, isPublishVisible: p, isPublishPrimary: m, getPublishHistory: h, publishFolderItems: g = lr, publishExpandedPaths: _, onPublishExpandedPathsChange: y, publishLoadingPaths: b, hasPublishWriteAccess: x, publishDefaultAuthor: S, onPublish: C, onPublishSuccess: w, onPublishError: T, onCreatePublishFolder: E, publishLabels: D, ruleSourceOptions: O = ur, onFetchExistingRules: ee, shareOverlay: te, isShareVisible: ne, isSharePrimary: re, onEdit: ae, onDownload: oe, isDownloadVisible: se, isDownloadPrimary: F, onLoadContentFile: ce, onLoadContentFilePreview: le, renderContentFilePreview: I, onDelete: L, onUnshare: de, isUnshareVisible: fe, onRevokeShare: me, onFetchRecipientsCount: he, isRevokeShareVisible: ge, onUnpublish: ve, isUnpublishVisible: ye, onLogin: be, onLogout: xe, texts: z, styles: Se, limitsFooterNote: Ce }) => {
|
|
1987
|
+
let { subViewTitleClassName: we = "dial-body-semi-text", overviewSectionClassName: Te = "dial-caption-text", overviewLabelClassName: Ee = "dial-small-semi-text", overviewValueClassName: De = "dial-small-text", overviewValueTrueClassName: ke = "dial-small-text", confirmMessageClassName: Ae = "dial-small-text" } = Se?.typography ?? {}, B = Se?.colors, Me = ie({
|
|
1988
|
+
"--cat-details-backdrop": B?.backdrop,
|
|
1989
|
+
"--cat-details-bg": B?.background,
|
|
1990
|
+
"--cat-details-border": B?.border,
|
|
1991
|
+
"--cat-details-divider": B?.divider,
|
|
1992
|
+
"--cat-details-scrollbar": B?.scrollbar,
|
|
1993
|
+
"--cat-details-skeleton": B?.skeleton,
|
|
1994
|
+
"--cat-details-name-text": B?.nameText,
|
|
1995
|
+
"--cat-details-publish-title-text": B?.publishTitleText,
|
|
1996
|
+
"--cat-details-content-text": B?.contentText,
|
|
1997
|
+
"--cat-details-variable-text": B?.variableText,
|
|
1998
|
+
"--cat-details-file-count-text": B?.contentFileCountText,
|
|
1999
|
+
"--cat-api-heading-text": B?.apiHeadingText,
|
|
2000
|
+
"--cat-tools-divider": B?.toolsDivider,
|
|
2001
|
+
"--cat-tools-description-text": B?.toolsDescriptionText,
|
|
2002
|
+
"--cat-grid-border": B?.gridBorder,
|
|
2003
|
+
"--cat-grid-header-text": B?.gridHeaderText,
|
|
2004
|
+
"--cat-grid-header-bg": B?.gridHeaderBackground,
|
|
2005
|
+
"--cat-grid-cell-text": B?.gridCellText,
|
|
2006
|
+
"--cat-grid-cell-divider": B?.gridCellDivider,
|
|
2007
|
+
"--cat-grid-row-even-bg": B?.gridRowEvenBackground,
|
|
2008
|
+
"--cat-info-card-bg": B?.infoCardBackground,
|
|
2009
|
+
"--cat-info-card-danger-bg": B?.infoCardDangerBackground,
|
|
2010
|
+
"--cat-confirm-message-text": B?.confirmMessageText,
|
|
2011
|
+
"--cat-confirm-consequence-text": B?.confirmConsequenceText,
|
|
2012
|
+
"--cat-confirm-footer-border": B?.confirmFooterBorder,
|
|
2013
|
+
"--cat-cred-surface-bg": B?.credentialsSurfaceBackground,
|
|
2014
|
+
"--cat-cred-active-icon": B?.credentialsActiveIcon,
|
|
2015
|
+
"--cat-cred-banner-icon-bg": B?.credentialsBannerIconBackground,
|
|
2016
|
+
"--cat-cred-description-text": B?.credentialsDescriptionText,
|
|
2017
|
+
"--cat-cred-row-description-text": B?.credentialsRowDescriptionText,
|
|
2018
|
+
"--cat-cred-error-text": B?.credentialsErrorText,
|
|
2019
|
+
"--cat-cred-card-bg": B?.credentialsCardBackground,
|
|
2020
|
+
"--cat-cred-card-icon": B?.credentialsCardIcon,
|
|
2021
|
+
"--cat-cred-card-title-text": B?.credentialsCardTitleText,
|
|
2022
|
+
"--cat-cred-card-description-text": B?.credentialsCardDescriptionText
|
|
2023
|
+
}), [Pe, Fe] = P(n), [V, Ie] = P(""), [Le, Re] = P(!1), [ze, Be] = P([]), [He, Ue] = P(!1), [We, Ge] = P(!1), [Ke, qe] = P(!1), Je = N(null), Ye = e.details?.promptContent, Xe = Ye?.selectedFileId, [Ze, Qe] = P(null), [$e, et] = P(!1), [tt, nt] = P(/* @__PURE__ */ new Set()), [rt, H] = P(!1), it = N(null), at = N(0), ot = A((e) => {
|
|
2024
|
+
let t = it.current, n = e?.preview?.type === vt.Image ? e.preview.url : null;
|
|
2025
|
+
t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t), it.current = n, Qe(e);
|
|
2026
2026
|
}, []);
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
}, [e.id,
|
|
2030
|
-
let e =
|
|
2027
|
+
j(() => {
|
|
2028
|
+
at.current += 1, ot(null), et(!1), nt(Wt(Ye?.files ?? [])), H(!1);
|
|
2029
|
+
}, [e.id, Xe]), j(() => () => {
|
|
2030
|
+
let e = it.current;
|
|
2031
2031
|
e != null && e.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
2032
2032
|
}, []);
|
|
2033
|
-
let
|
|
2034
|
-
|
|
2033
|
+
let st = A((e) => {
|
|
2034
|
+
nt((t) => {
|
|
2035
2035
|
let n = new Set(t);
|
|
2036
2036
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
2037
2037
|
});
|
|
2038
|
-
}, []),
|
|
2039
|
-
if (e ===
|
|
2040
|
-
|
|
2038
|
+
}, []), ct = A(async (e) => {
|
|
2039
|
+
if (e === Xe) {
|
|
2040
|
+
at.current += 1, ot(null), et(!1);
|
|
2041
2041
|
return;
|
|
2042
2042
|
}
|
|
2043
|
-
if (
|
|
2044
|
-
if (
|
|
2045
|
-
|
|
2043
|
+
if (I == null && ce == null && le == null) return;
|
|
2044
|
+
if (I != null) {
|
|
2045
|
+
at.current += 1, ot({
|
|
2046
2046
|
id: e,
|
|
2047
2047
|
preview: null
|
|
2048
|
-
}),
|
|
2048
|
+
}), et(!1);
|
|
2049
2049
|
return;
|
|
2050
2050
|
}
|
|
2051
|
-
let t = ++
|
|
2052
|
-
|
|
2051
|
+
let t = ++at.current;
|
|
2052
|
+
ot({
|
|
2053
2053
|
id: e,
|
|
2054
2054
|
preview: null
|
|
2055
|
-
}),
|
|
2055
|
+
}), et(!0);
|
|
2056
2056
|
try {
|
|
2057
|
-
let n =
|
|
2058
|
-
type:
|
|
2057
|
+
let n = le == null ? await ce?.(e).then((e) => e == null ? void 0 : {
|
|
2058
|
+
type: vt.Markdown,
|
|
2059
2059
|
text: e
|
|
2060
|
-
}) : await
|
|
2061
|
-
if (
|
|
2062
|
-
n?.type ===
|
|
2060
|
+
}) : await le(e);
|
|
2061
|
+
if (at.current !== t) {
|
|
2062
|
+
n?.type === vt.Image && n.url.startsWith("blob:") && URL.revokeObjectURL(n.url);
|
|
2063
2063
|
return;
|
|
2064
2064
|
}
|
|
2065
|
-
|
|
2065
|
+
ot({
|
|
2066
2066
|
id: e,
|
|
2067
2067
|
preview: n ?? null
|
|
2068
2068
|
});
|
|
2069
2069
|
} catch {
|
|
2070
|
-
if (
|
|
2071
|
-
|
|
2070
|
+
if (at.current !== t) return;
|
|
2071
|
+
ot({
|
|
2072
2072
|
id: e,
|
|
2073
2073
|
preview: null
|
|
2074
2074
|
});
|
|
2075
2075
|
} finally {
|
|
2076
|
-
|
|
2076
|
+
at.current === t && et(!1);
|
|
2077
2077
|
}
|
|
2078
2078
|
}, [
|
|
2079
|
-
|
|
2080
|
-
se,
|
|
2079
|
+
Xe,
|
|
2081
2080
|
ce,
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2081
|
+
le,
|
|
2082
|
+
I,
|
|
2083
|
+
ot
|
|
2084
|
+
]), lt = Ze?.id ?? Xe, mt = () => Ze == null ? null : Ze.preview == null ? {
|
|
2085
|
+
type: vt.Text,
|
|
2086
|
+
text: z?.contentFileErrorLabel ?? "Failed to load this file."
|
|
2087
|
+
} : Ze.preview, ht = Ze != null && I != null ? I(Ze.id, Gt(Ye?.files ?? [], Ze.id) ?? "") : void 0, gt = A(() => {
|
|
2088
|
+
if (!h || Je.current === e.id) return;
|
|
2089
2089
|
let t = e.id;
|
|
2090
|
-
|
|
2090
|
+
Je.current = t, Ue(!0), Ge(!1), (async () => {
|
|
2091
2091
|
try {
|
|
2092
2092
|
let n = await h(e);
|
|
2093
|
-
if (
|
|
2094
|
-
|
|
2093
|
+
if (Je.current !== t) return;
|
|
2094
|
+
Be(n), qe(!0), Ue(!1);
|
|
2095
2095
|
} catch {
|
|
2096
|
-
if (
|
|
2097
|
-
|
|
2096
|
+
if (Je.current !== t) return;
|
|
2097
|
+
Ge(!0), Ue(!1), Je.current = null;
|
|
2098
2098
|
}
|
|
2099
2099
|
})();
|
|
2100
2100
|
}, [h, e]);
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
}, [
|
|
2104
|
-
let
|
|
2105
|
-
|
|
2106
|
-
}, [
|
|
2101
|
+
j(() => {
|
|
2102
|
+
Le && gt();
|
|
2103
|
+
}, [Le, gt]);
|
|
2104
|
+
let _t = A((e, t) => {
|
|
2105
|
+
Je.current = null, qe(!1), gt(), w?.(e, t);
|
|
2106
|
+
}, [gt, w]), Y = pt({
|
|
2107
2107
|
item: e,
|
|
2108
|
-
history:
|
|
2108
|
+
history: ze,
|
|
2109
2109
|
folderItems: g,
|
|
2110
2110
|
hasWriteAccess: x,
|
|
2111
2111
|
defaultAuthor: S,
|
|
2112
2112
|
onCreateFolder: E,
|
|
2113
2113
|
onPublish: C ?? cr,
|
|
2114
|
-
onPublishSuccess:
|
|
2114
|
+
onPublishSuccess: _t,
|
|
2115
2115
|
onPublishError: T,
|
|
2116
|
-
onFetchExistingRules:
|
|
2117
|
-
}),
|
|
2118
|
-
hasSelectedFolder:
|
|
2119
|
-
hasExistingPublicationInFolder:
|
|
2120
|
-
hasWriteAccess:
|
|
2121
|
-
isSubmitting:
|
|
2122
|
-
hasSubmitError:
|
|
2116
|
+
onFetchExistingRules: ee
|
|
2117
|
+
}), X = M(() => ft({
|
|
2118
|
+
hasSelectedFolder: Y.selectedFolderPath != null,
|
|
2119
|
+
hasExistingPublicationInFolder: Y.hasExistingPublicationInFolder,
|
|
2120
|
+
hasWriteAccess: Y.hasWriteAccess,
|
|
2121
|
+
isSubmitting: Y.isSubmitting,
|
|
2122
|
+
hasSubmitError: Y.hasSubmitError
|
|
2123
2123
|
}), [
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
]), [
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
}, [e.id, n]),
|
|
2133
|
-
|
|
2124
|
+
Y.selectedFolderPath,
|
|
2125
|
+
Y.hasExistingPublicationInFolder,
|
|
2126
|
+
Y.hasWriteAccess,
|
|
2127
|
+
Y.isSubmitting,
|
|
2128
|
+
Y.hasSubmitError
|
|
2129
|
+
]), [yt, bt] = P(!1), [xt, Z] = P(null), [St, Ct] = P(!1), [wt, Tt] = P(null), [Et, Dt] = P(null), [Ot, kt] = P(null);
|
|
2130
|
+
j(() => {
|
|
2131
|
+
Fe(n);
|
|
2132
|
+
}, [e.id, n]), j(() => {
|
|
2133
|
+
Ie(""), Re(!1), Y.reset(), Be([]), Ge(!1), Ue(!1), qe(!1), Je.current = null, kt(null), bt(!1), Z(null), Ct(!1), Tt(null), Dt(null);
|
|
2134
2134
|
}, [e.id]);
|
|
2135
|
-
let
|
|
2136
|
-
|
|
2137
|
-
}, []),
|
|
2138
|
-
|
|
2139
|
-
}, [e.credentials]),
|
|
2140
|
-
|
|
2141
|
-
}, []),
|
|
2142
|
-
|
|
2143
|
-
}, []),
|
|
2135
|
+
let At = A(() => bt(!0), []), jt = A(() => bt(!1), []), Mt = A(() => {
|
|
2136
|
+
Z(q.Delete);
|
|
2137
|
+
}, []), Q = A((t) => {
|
|
2138
|
+
Dt(t ?? (e.credentials == null ? null : c(e.credentials))), Z(q.Logout);
|
|
2139
|
+
}, [e.credentials]), Pt = A(() => {
|
|
2140
|
+
Z(q.Unshare);
|
|
2141
|
+
}, []), Ft = A(() => {
|
|
2142
|
+
Z(q.RevokeAccess);
|
|
2143
|
+
}, []), $ = M(() => {
|
|
2144
2144
|
let e = /* @__PURE__ */ new Set(), t = [];
|
|
2145
|
-
for (let n of
|
|
2145
|
+
for (let n of ze) {
|
|
2146
2146
|
let r = n.folderPath.join("/");
|
|
2147
2147
|
e.has(r) || (e.add(r), t.push({
|
|
2148
2148
|
key: r,
|
|
@@ -2150,65 +2150,65 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2150
2150
|
}));
|
|
2151
2151
|
}
|
|
2152
2152
|
return t;
|
|
2153
|
-
}, [
|
|
2154
|
-
|
|
2155
|
-
}, []), zt =
|
|
2156
|
-
|
|
2157
|
-
}, []), Bt =
|
|
2158
|
-
|
|
2159
|
-
}, [
|
|
2160
|
-
if (!(
|
|
2161
|
-
|
|
2153
|
+
}, [ze]), It = Ke && $.length > 0, Lt = A((e) => e || (D?.rootFolderLabel ?? "Organization"), [D]), Rt = A(() => {
|
|
2154
|
+
Z(q.Unpublish);
|
|
2155
|
+
}, []), zt = A((e) => {
|
|
2156
|
+
Tt(e), Z(q.DeleteApiKey);
|
|
2157
|
+
}, []), Bt = A(() => {
|
|
2158
|
+
St || (Z(null), Tt(null), Dt(null), kt(null));
|
|
2159
|
+
}, [St]), Vt = A(async () => {
|
|
2160
|
+
if (!(St || xt == null)) {
|
|
2161
|
+
Ct(!0);
|
|
2162
2162
|
try {
|
|
2163
|
-
switch (
|
|
2164
|
-
case
|
|
2165
|
-
await
|
|
2163
|
+
switch (xt) {
|
|
2164
|
+
case q.Delete:
|
|
2165
|
+
await L?.(e);
|
|
2166
2166
|
break;
|
|
2167
|
-
case
|
|
2168
|
-
await
|
|
2167
|
+
case q.Unshare:
|
|
2168
|
+
await de?.(e);
|
|
2169
2169
|
break;
|
|
2170
|
-
case
|
|
2171
|
-
await
|
|
2170
|
+
case q.RevokeAccess:
|
|
2171
|
+
await me?.(e);
|
|
2172
2172
|
break;
|
|
2173
|
-
case
|
|
2174
|
-
|
|
2173
|
+
case q.Logout:
|
|
2174
|
+
Et != null && await xe?.(e, { level: Et });
|
|
2175
2175
|
break;
|
|
2176
|
-
case
|
|
2177
|
-
|
|
2176
|
+
case q.DeleteApiKey:
|
|
2177
|
+
wt != null && await xe?.(e, { level: wt });
|
|
2178
2178
|
break;
|
|
2179
|
-
case
|
|
2180
|
-
let t = sr(
|
|
2181
|
-
t != null && await
|
|
2179
|
+
case q.Unpublish: {
|
|
2180
|
+
let t = sr($, Ot);
|
|
2181
|
+
t != null && await ve?.(e, t.segments);
|
|
2182
2182
|
break;
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
|
-
|
|
2185
|
+
Z(null), Tt(null), Dt(null), kt(null), _r.has(xt) && a();
|
|
2186
2186
|
} catch {
|
|
2187
|
-
|
|
2187
|
+
Z(null), Tt(null), Dt(null), kt(null);
|
|
2188
2188
|
} finally {
|
|
2189
|
-
|
|
2189
|
+
Ct(!1);
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
2192
|
}, [
|
|
2193
|
+
St,
|
|
2193
2194
|
xt,
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
Tt,
|
|
2195
|
+
wt,
|
|
2196
|
+
Et,
|
|
2197
2197
|
e,
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2198
|
+
L,
|
|
2199
|
+
de,
|
|
2200
|
+
me,
|
|
2201
|
+
ve,
|
|
2202
|
+
Ot,
|
|
2202
2203
|
$,
|
|
2203
|
-
|
|
2204
|
-
be,
|
|
2204
|
+
xe,
|
|
2205
2205
|
a
|
|
2206
2206
|
]);
|
|
2207
|
-
|
|
2207
|
+
j(() => {
|
|
2208
2208
|
if (!t) return;
|
|
2209
2209
|
let e = (e) => {
|
|
2210
2210
|
if (e.key === "Escape") {
|
|
2211
|
-
if (
|
|
2211
|
+
if (xt != null) {
|
|
2212
2212
|
Bt();
|
|
2213
2213
|
return;
|
|
2214
2214
|
}
|
|
@@ -2219,330 +2219,330 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2219
2219
|
}, [
|
|
2220
2220
|
t,
|
|
2221
2221
|
a,
|
|
2222
|
-
|
|
2222
|
+
xt,
|
|
2223
2223
|
Bt
|
|
2224
2224
|
]);
|
|
2225
|
-
let Ht =
|
|
2226
|
-
|
|
2227
|
-
}, [
|
|
2228
|
-
await
|
|
2229
|
-
}, [
|
|
2230
|
-
let t = !
|
|
2231
|
-
|
|
2225
|
+
let Ht = A(() => Re(!0), []), Ut = A(() => {
|
|
2226
|
+
Re(!1), Y.reset();
|
|
2227
|
+
}, [Y]), Kt = A(async () => {
|
|
2228
|
+
await Y.handleSubmit() && Ut();
|
|
2229
|
+
}, [Y, Ut]), qt = A(() => {
|
|
2230
|
+
let t = !Pe;
|
|
2231
|
+
Fe(t), o?.(e.id, t);
|
|
2232
2232
|
}, [
|
|
2233
|
-
|
|
2233
|
+
Pe,
|
|
2234
2234
|
e.id,
|
|
2235
2235
|
o
|
|
2236
|
-
]), Jt =
|
|
2236
|
+
]), Jt = M(() => {
|
|
2237
2237
|
let t = [], n = ar.has(e.type);
|
|
2238
2238
|
return n || t.push({
|
|
2239
|
-
id:
|
|
2240
|
-
label:
|
|
2239
|
+
id: K.About,
|
|
2240
|
+
label: z?.tabAboutLabel ?? "About"
|
|
2241
2241
|
}), (n || e.details?.promptContent != null) && t.push({
|
|
2242
|
-
id:
|
|
2243
|
-
label:
|
|
2242
|
+
id: K.Content,
|
|
2243
|
+
label: z?.tabContentLabel ?? "Details"
|
|
2244
2244
|
}), e.details?.overview != null && t.push({
|
|
2245
|
-
id:
|
|
2246
|
-
label:
|
|
2245
|
+
id: K.Overview,
|
|
2246
|
+
label: z?.tabOverviewLabel ?? "Overview"
|
|
2247
2247
|
}), e.details?.pricing != null && t.push({
|
|
2248
|
-
id:
|
|
2249
|
-
label:
|
|
2248
|
+
id: K.Pricing,
|
|
2249
|
+
label: z?.tabPricingLabel ?? "Pricing"
|
|
2250
2250
|
}), e.details?.limits != null && t.push({
|
|
2251
|
-
id:
|
|
2252
|
-
label:
|
|
2251
|
+
id: K.Limits,
|
|
2252
|
+
label: z?.tabLimitsLabel ?? "Limits"
|
|
2253
2253
|
}), e.details?.tools != null && t.push({
|
|
2254
|
-
id:
|
|
2255
|
-
label:
|
|
2254
|
+
id: K.Tools,
|
|
2255
|
+
label: z?.tabToolsLabel ?? "Tools"
|
|
2256
2256
|
}), or(e.details?.api) && t.push({
|
|
2257
|
-
id:
|
|
2258
|
-
label:
|
|
2257
|
+
id: K.Api,
|
|
2258
|
+
label: z?.tabConnectLabel ?? "Connect"
|
|
2259
2259
|
}), t;
|
|
2260
|
-
}, [e,
|
|
2261
|
-
|
|
2260
|
+
}, [e, z]), Yt = N(null);
|
|
2261
|
+
j(() => {
|
|
2262
2262
|
let t = Yt.current !== e.id;
|
|
2263
|
-
Yt.current = e.id, (t || !Jt.some((e) => e.id ===
|
|
2263
|
+
Yt.current = e.id, (t || !Jt.some((e) => e.id === V)) && Ie(Jt[0]?.id ?? "");
|
|
2264
2264
|
}, [
|
|
2265
2265
|
e.id,
|
|
2266
2266
|
Jt,
|
|
2267
|
-
|
|
2267
|
+
V
|
|
2268
2268
|
]);
|
|
2269
|
-
let Xt =
|
|
2270
|
-
switch (
|
|
2271
|
-
case
|
|
2272
|
-
let t =
|
|
2269
|
+
let Xt = z?.overviewYesLabel ?? "Yes", Zt = z?.overviewNoLabel ?? "No", Qt = z?.ariaLabel ?? "Item details", en = z?.closeAriaLabel ?? "Close", nn = Pe ? z?.removeFromFavoritesAriaLabel ?? "Remove from favorites" : z?.addToFavoritesAriaLabel ?? "Add to favorites", rn = z?.publishTitle ?? "Publish", on = z?.backToDetailsAriaLabel ?? "Back", sn = z?.cancelLabel ?? "Cancel", cn = M(() => {
|
|
2270
|
+
switch (xt) {
|
|
2271
|
+
case q.Delete: {
|
|
2272
|
+
let t = z?.deleteActionLabel ?? "Delete";
|
|
2273
2273
|
return {
|
|
2274
|
-
title:
|
|
2275
|
-
message:
|
|
2274
|
+
title: z?.deleteConfirmTitle ?? t,
|
|
2275
|
+
message: z?.deleteConfirmMessage?.(e.name) ?? /* @__PURE__ */ G(U, { children: [
|
|
2276
2276
|
"Are you sure you want to delete ",
|
|
2277
|
-
/* @__PURE__ */
|
|
2277
|
+
/* @__PURE__ */ W("strong", { children: e.name }),
|
|
2278
2278
|
"? This action is permanent and cannot be undone."
|
|
2279
2279
|
] }),
|
|
2280
|
-
consequences:
|
|
2280
|
+
consequences: z?.deleteConfirmConsequences ?? dr,
|
|
2281
2281
|
confirmLabel: t,
|
|
2282
|
-
loadingStatusLabel:
|
|
2283
|
-
variant:
|
|
2282
|
+
loadingStatusLabel: z?.deletingStatusLabel ?? "Deleting",
|
|
2283
|
+
variant: J.Danger
|
|
2284
2284
|
};
|
|
2285
2285
|
}
|
|
2286
|
-
case
|
|
2287
|
-
let t =
|
|
2286
|
+
case q.Unshare: {
|
|
2287
|
+
let t = z?.unshareLabel ?? "Remove from My List";
|
|
2288
2288
|
return {
|
|
2289
|
-
title:
|
|
2290
|
-
message:
|
|
2289
|
+
title: z?.unshareConfirmTitle ?? t,
|
|
2290
|
+
message: z?.unshareConfirmMessage?.(e.name) ?? /* @__PURE__ */ G(U, { children: [
|
|
2291
2291
|
"Remove ",
|
|
2292
|
-
/* @__PURE__ */
|
|
2292
|
+
/* @__PURE__ */ W("strong", { children: e.name }),
|
|
2293
2293
|
" from your list? You'll need a new invitation to access it again."
|
|
2294
2294
|
] }),
|
|
2295
|
-
consequences:
|
|
2295
|
+
consequences: z?.unshareConfirmConsequences ?? fr,
|
|
2296
2296
|
confirmLabel: t,
|
|
2297
|
-
loadingStatusLabel:
|
|
2298
|
-
variant:
|
|
2297
|
+
loadingStatusLabel: z?.unsharingStatusLabel ?? "Removing",
|
|
2298
|
+
variant: J.Info
|
|
2299
2299
|
};
|
|
2300
2300
|
}
|
|
2301
|
-
case
|
|
2302
|
-
let t =
|
|
2301
|
+
case q.RevokeAccess: {
|
|
2302
|
+
let t = z?.revokeShareLabel ?? "Revoke access";
|
|
2303
2303
|
return {
|
|
2304
|
-
title:
|
|
2305
|
-
message:
|
|
2304
|
+
title: z?.revokeShareConfirmTitle ?? t,
|
|
2305
|
+
message: z?.revokeShareConfirmMessage?.(e.name) ?? /* @__PURE__ */ G(U, { children: [
|
|
2306
2306
|
"Revoke shared access to ",
|
|
2307
|
-
/* @__PURE__ */
|
|
2307
|
+
/* @__PURE__ */ W("strong", { children: e.name }),
|
|
2308
2308
|
"? Anyone you shared it with will lose access."
|
|
2309
2309
|
] }),
|
|
2310
|
-
consequences:
|
|
2310
|
+
consequences: z?.revokeShareConfirmConsequences ?? mr,
|
|
2311
2311
|
confirmLabel: t,
|
|
2312
|
-
loadingStatusLabel:
|
|
2313
|
-
variant:
|
|
2312
|
+
loadingStatusLabel: z?.revokingShareStatusLabel ?? "Revoking access",
|
|
2313
|
+
variant: J.Danger
|
|
2314
2314
|
};
|
|
2315
2315
|
}
|
|
2316
|
-
case
|
|
2317
|
-
let t =
|
|
2316
|
+
case q.Unpublish: {
|
|
2317
|
+
let t = z?.unpublishLabel ?? "Unpublish", n = $.length === 1, r = n ? Lt($[0].key) : "", i = z?.unpublishConfirmMessage?.(e.name, r) ?? /* @__PURE__ */ G(U, { children: [
|
|
2318
2318
|
"Unpublish ",
|
|
2319
|
-
/* @__PURE__ */
|
|
2319
|
+
/* @__PURE__ */ W("strong", { children: e.name }),
|
|
2320
2320
|
" from \"",
|
|
2321
2321
|
r,
|
|
2322
2322
|
"\"? The request is submitted for admin approval."
|
|
2323
|
-
] }), a =
|
|
2323
|
+
] }), a = z?.unpublishSelectFolderMessage?.(e.name) ?? /* @__PURE__ */ G(U, { children: [
|
|
2324
2324
|
"Choose which folder to unpublish ",
|
|
2325
|
-
/* @__PURE__ */
|
|
2325
|
+
/* @__PURE__ */ W("strong", { children: e.name }),
|
|
2326
2326
|
" from. The request is submitted for admin approval."
|
|
2327
2327
|
] });
|
|
2328
2328
|
return {
|
|
2329
|
-
title:
|
|
2329
|
+
title: z?.unpublishConfirmTitle ?? t,
|
|
2330
2330
|
message: n ? i : a,
|
|
2331
|
-
consequences:
|
|
2331
|
+
consequences: z?.unpublishConfirmConsequences ?? pr,
|
|
2332
2332
|
confirmLabel: t,
|
|
2333
|
-
loadingStatusLabel:
|
|
2334
|
-
variant:
|
|
2333
|
+
loadingStatusLabel: z?.unpublishingStatusLabel ?? "Requesting unpublish",
|
|
2334
|
+
variant: J.Danger
|
|
2335
2335
|
};
|
|
2336
2336
|
}
|
|
2337
|
-
case
|
|
2338
|
-
let e =
|
|
2337
|
+
case q.Logout: {
|
|
2338
|
+
let e = z?.logoutActionLabel ?? "Log out";
|
|
2339
2339
|
return {
|
|
2340
2340
|
title: e,
|
|
2341
|
-
message:
|
|
2341
|
+
message: z?.logoutConfirmMessage ?? "Are you sure you want to log out?",
|
|
2342
2342
|
consequences: void 0,
|
|
2343
2343
|
confirmLabel: e,
|
|
2344
|
-
loadingStatusLabel:
|
|
2345
|
-
variant:
|
|
2344
|
+
loadingStatusLabel: z?.loggingOutStatusLabel ?? "Logging out",
|
|
2345
|
+
variant: J.Info
|
|
2346
2346
|
};
|
|
2347
2347
|
}
|
|
2348
|
-
case
|
|
2349
|
-
let e =
|
|
2348
|
+
case q.DeleteApiKey: {
|
|
2349
|
+
let e = z?.deleteActionLabel ?? "Delete", t = wt ?? v.User;
|
|
2350
2350
|
return {
|
|
2351
2351
|
title: e,
|
|
2352
|
-
message: (
|
|
2352
|
+
message: (z?.deleteApiKeyConfirmMessage ?? gr)(t),
|
|
2353
2353
|
consequences: void 0,
|
|
2354
2354
|
confirmLabel: e,
|
|
2355
|
-
loadingStatusLabel:
|
|
2356
|
-
variant:
|
|
2357
|
-
cardVariant:
|
|
2355
|
+
loadingStatusLabel: z?.deletingStatusLabel ?? "Deleting",
|
|
2356
|
+
variant: J.Danger,
|
|
2357
|
+
cardVariant: J.Info
|
|
2358
2358
|
};
|
|
2359
2359
|
}
|
|
2360
2360
|
default: return null;
|
|
2361
2361
|
}
|
|
2362
2362
|
}, [
|
|
2363
|
-
|
|
2363
|
+
xt,
|
|
2364
2364
|
e.name,
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2365
|
+
wt,
|
|
2366
|
+
z,
|
|
2367
|
+
$,
|
|
2368
2368
|
Lt
|
|
2369
|
-
]), ln = cn != null, un =
|
|
2369
|
+
]), ln = cn != null, un = xt === q.Unpublish && sr($, Ot) == null, dn = ln || Le || yt, fn = e.credentials == null ? "" : (z?.credentialsManagementTitle ?? hr)(e.credentials.authenticationType), pn = ln ? {
|
|
2370
2370
|
title: cn.title,
|
|
2371
|
-
isBackDisabled:
|
|
2371
|
+
isBackDisabled: St,
|
|
2372
2372
|
onBack: Bt
|
|
2373
|
-
} :
|
|
2373
|
+
} : Le ? {
|
|
2374
2374
|
title: rn,
|
|
2375
|
-
isBackDisabled:
|
|
2375
|
+
isBackDisabled: Y.isSubmitting,
|
|
2376
2376
|
onBack: Ut
|
|
2377
|
-
} :
|
|
2377
|
+
} : yt ? {
|
|
2378
2378
|
title: fn,
|
|
2379
2379
|
isBackDisabled: !1,
|
|
2380
|
-
onBack:
|
|
2380
|
+
onBack: jt
|
|
2381
2381
|
} : null, mn = pn?.title ?? Qt;
|
|
2382
|
-
return /* @__PURE__ */
|
|
2383
|
-
style:
|
|
2384
|
-
className:
|
|
2382
|
+
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
|
|
2383
|
+
style: Me,
|
|
2384
|
+
className: k("fixed inset-0 z-50 transition-opacity duration-300", Sn.backdrop, t ? "opacity-100" : "pointer-events-none opacity-0"),
|
|
2385
2385
|
onClick: a,
|
|
2386
2386
|
"aria-hidden": "true"
|
|
2387
|
-
}), /* @__PURE__ */
|
|
2387
|
+
}), /* @__PURE__ */ G("div", {
|
|
2388
2388
|
role: "dialog",
|
|
2389
2389
|
"aria-modal": "true",
|
|
2390
2390
|
"aria-label": mn,
|
|
2391
|
-
style:
|
|
2392
|
-
className:
|
|
2391
|
+
style: Me,
|
|
2392
|
+
className: k("fixed inset-y-0 end-0 z-50 flex flex-col overflow-hidden mobile:w-full", "desktop:rounded-ts-xl desktop:rounded-bs-xl desktop:w-[540px] desktop:border-s", "transition-transform duration-300", Sn.panel, t ? "translate-x-0" : "translate-x-full rtl:-translate-x-full"),
|
|
2393
2393
|
children: [
|
|
2394
|
-
/* @__PURE__ */
|
|
2394
|
+
/* @__PURE__ */ G("div", {
|
|
2395
2395
|
className: "flex shrink-0 items-center gap-2 px-6 py-3",
|
|
2396
|
-
children: [pn != null && /* @__PURE__ */
|
|
2397
|
-
icon: /* @__PURE__ */
|
|
2396
|
+
children: [pn != null && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(_e, {
|
|
2397
|
+
icon: /* @__PURE__ */ W(Ve, {
|
|
2398
2398
|
className: "rtl:scale-x-[-1]",
|
|
2399
|
-
stroke:
|
|
2399
|
+
stroke: R
|
|
2400
2400
|
}),
|
|
2401
2401
|
"aria-label": on,
|
|
2402
2402
|
disabled: pn.isBackDisabled,
|
|
2403
2403
|
onClick: pn.onBack
|
|
2404
|
-
}), /* @__PURE__ */
|
|
2405
|
-
className:
|
|
2404
|
+
}), /* @__PURE__ */ W("span", {
|
|
2405
|
+
className: k("flex-1", we, Sn.publishTitle),
|
|
2406
2406
|
children: pn.title
|
|
2407
|
-
})] }), pn == null && /* @__PURE__ */
|
|
2408
|
-
/* @__PURE__ */
|
|
2409
|
-
!i && s?.(e) !== !1 && /* @__PURE__ */
|
|
2410
|
-
isStarred:
|
|
2407
|
+
})] }), pn == null && /* @__PURE__ */ G(U, { children: [
|
|
2408
|
+
/* @__PURE__ */ W("div", { className: "flex-1" }),
|
|
2409
|
+
!i && s?.(e) !== !1 && /* @__PURE__ */ W(Nt, {
|
|
2410
|
+
isStarred: Pe,
|
|
2411
2411
|
ariaLabel: nn,
|
|
2412
2412
|
onClick: qt
|
|
2413
2413
|
}),
|
|
2414
|
-
/* @__PURE__ */
|
|
2414
|
+
/* @__PURE__ */ W(ue, {
|
|
2415
2415
|
onClose: a,
|
|
2416
|
-
size:
|
|
2416
|
+
size: pe.Standard,
|
|
2417
2417
|
ariaLabel: en
|
|
2418
2418
|
})
|
|
2419
2419
|
] })]
|
|
2420
2420
|
}),
|
|
2421
|
-
/* @__PURE__ */
|
|
2422
|
-
/* @__PURE__ */
|
|
2423
|
-
className:
|
|
2421
|
+
/* @__PURE__ */ W("div", { className: k("shrink-0", Sn.divider) }),
|
|
2422
|
+
/* @__PURE__ */ G("div", {
|
|
2423
|
+
className: k("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto", Sn.content),
|
|
2424
2424
|
children: [
|
|
2425
|
-
ln && /* @__PURE__ */
|
|
2425
|
+
ln && /* @__PURE__ */ W(an, {
|
|
2426
2426
|
item: e,
|
|
2427
2427
|
message: cn.message,
|
|
2428
2428
|
consequences: cn.consequences,
|
|
2429
2429
|
variant: cn.cardVariant ?? cn.variant,
|
|
2430
|
-
messageClassName:
|
|
2431
|
-
children:
|
|
2432
|
-
ariaLabel:
|
|
2433
|
-
value:
|
|
2434
|
-
onChange:
|
|
2435
|
-
disabled:
|
|
2436
|
-
items:
|
|
2430
|
+
messageClassName: Ae,
|
|
2431
|
+
children: xt === q.Unpublish && $.length > 1 && /* @__PURE__ */ W(Oe, {
|
|
2432
|
+
ariaLabel: z?.unpublishFolderGroupAriaLabel ?? "Published folders",
|
|
2433
|
+
value: Ot ?? void 0,
|
|
2434
|
+
onChange: kt,
|
|
2435
|
+
disabled: St,
|
|
2436
|
+
items: $.map((e) => ({
|
|
2437
2437
|
value: e.key,
|
|
2438
2438
|
label: Lt(e.key)
|
|
2439
2439
|
})),
|
|
2440
|
-
radioClassName:
|
|
2440
|
+
radioClassName: Ae
|
|
2441
2441
|
})
|
|
2442
2442
|
}),
|
|
2443
|
-
!ln && !
|
|
2443
|
+
!ln && !Le && yt && /* @__PURE__ */ W(xn, {
|
|
2444
2444
|
item: e,
|
|
2445
|
-
onLogin:
|
|
2446
|
-
onRequestLogout:
|
|
2445
|
+
onLogin: be,
|
|
2446
|
+
onRequestLogout: Q,
|
|
2447
2447
|
onRequestDeleteApiKey: zt,
|
|
2448
|
-
texts:
|
|
2449
|
-
detailsStyles:
|
|
2448
|
+
texts: z,
|
|
2449
|
+
detailsStyles: Se
|
|
2450
2450
|
}),
|
|
2451
|
-
!ln &&
|
|
2451
|
+
!ln && Le && /* @__PURE__ */ W("div", {
|
|
2452
2452
|
className: "p-[22px]",
|
|
2453
|
-
children: /* @__PURE__ */
|
|
2453
|
+
children: /* @__PURE__ */ W(dt, {
|
|
2454
2454
|
resource: {
|
|
2455
2455
|
title: e.name,
|
|
2456
2456
|
version: e.version,
|
|
2457
2457
|
type: e.type,
|
|
2458
2458
|
iconUrl: e.iconUrl
|
|
2459
2459
|
},
|
|
2460
|
-
history:
|
|
2461
|
-
isHistoryLoading:
|
|
2462
|
-
hasHistoryError:
|
|
2463
|
-
folderItems:
|
|
2464
|
-
selectedFolderPath:
|
|
2465
|
-
onSelectedFolderPathChange:
|
|
2466
|
-
onCreateFolder:
|
|
2460
|
+
history: ze,
|
|
2461
|
+
isHistoryLoading: He,
|
|
2462
|
+
hasHistoryError: We,
|
|
2463
|
+
folderItems: Y.folderItems,
|
|
2464
|
+
selectedFolderPath: Y.selectedFolderPath,
|
|
2465
|
+
onSelectedFolderPathChange: Y.setSelectedFolderPath,
|
|
2466
|
+
onCreateFolder: Y.handleCreateFolder,
|
|
2467
2467
|
expandedPaths: _,
|
|
2468
2468
|
onExpandedPathsChange: y,
|
|
2469
2469
|
loadingPaths: b,
|
|
2470
|
-
hasExistingPublicationInFolder:
|
|
2471
|
-
hasWriteAccess:
|
|
2472
|
-
isSubmitting:
|
|
2473
|
-
hasSubmitError:
|
|
2474
|
-
author:
|
|
2475
|
-
onAuthorChange:
|
|
2476
|
-
rules:
|
|
2477
|
-
onRulesChange:
|
|
2470
|
+
hasExistingPublicationInFolder: Y.hasExistingPublicationInFolder,
|
|
2471
|
+
hasWriteAccess: Y.hasWriteAccess,
|
|
2472
|
+
isSubmitting: Y.isSubmitting,
|
|
2473
|
+
hasSubmitError: Y.hasSubmitError,
|
|
2474
|
+
author: Y.author,
|
|
2475
|
+
onAuthorChange: Y.setAuthor,
|
|
2476
|
+
rules: Y.rules,
|
|
2477
|
+
onRulesChange: Y.setRules,
|
|
2478
2478
|
ruleSourceOptions: O,
|
|
2479
|
-
isRulesLoading:
|
|
2480
|
-
hasRulesLoadError:
|
|
2479
|
+
isRulesLoading: Y.isRulesLoading,
|
|
2480
|
+
hasRulesLoadError: Y.hasRulesLoadError,
|
|
2481
2481
|
labels: D,
|
|
2482
2482
|
styles: { colors: {
|
|
2483
|
-
summaryVersionTagBorder:
|
|
2484
|
-
summaryVersionTagBackground:
|
|
2485
|
-
summaryVersionTagText:
|
|
2483
|
+
summaryVersionTagBorder: B?.versionTagBorder,
|
|
2484
|
+
summaryVersionTagBackground: B?.versionTagBackground,
|
|
2485
|
+
summaryVersionTagText: B?.versionTagText
|
|
2486
2486
|
} }
|
|
2487
2487
|
})
|
|
2488
2488
|
}),
|
|
2489
|
-
!dn && /* @__PURE__ */
|
|
2490
|
-
/* @__PURE__ */
|
|
2489
|
+
!dn && /* @__PURE__ */ G(U, { children: [
|
|
2490
|
+
/* @__PURE__ */ W(Nn, {
|
|
2491
2491
|
item: e,
|
|
2492
2492
|
onUseInChat: l,
|
|
2493
2493
|
isPrimaryActionVisible: u,
|
|
2494
2494
|
onShare: f,
|
|
2495
|
-
shareOverlay:
|
|
2496
|
-
isShareVisible:
|
|
2497
|
-
isSharePrimary:
|
|
2495
|
+
shareOverlay: te,
|
|
2496
|
+
isShareVisible: ne,
|
|
2497
|
+
isSharePrimary: re,
|
|
2498
2498
|
isPublishVisible: p,
|
|
2499
2499
|
isPublishPrimary: m,
|
|
2500
2500
|
onOpenPublish: Ht,
|
|
2501
|
-
isUnpublishVisible:
|
|
2501
|
+
isUnpublishVisible: ye,
|
|
2502
2502
|
hasPublishedFolders: It,
|
|
2503
|
-
isPublishHistoryResolved: h == null ||
|
|
2504
|
-
onRequestPublishHistory:
|
|
2505
|
-
onOpenUnpublish:
|
|
2506
|
-
onEdit:
|
|
2507
|
-
onDownload:
|
|
2508
|
-
isDownloadVisible:
|
|
2509
|
-
isDownloadPrimary:
|
|
2510
|
-
onDelete:
|
|
2511
|
-
onUnshare:
|
|
2512
|
-
isUnshareVisible:
|
|
2513
|
-
onRevokeShare:
|
|
2514
|
-
onFetchRecipientsCount:
|
|
2515
|
-
isRevokeShareVisible:
|
|
2516
|
-
onLogin:
|
|
2517
|
-
onLogout:
|
|
2518
|
-
onOpenCredentialsManagement:
|
|
2519
|
-
onRequestLogout:
|
|
2520
|
-
texts:
|
|
2521
|
-
detailsStyles:
|
|
2503
|
+
isPublishHistoryResolved: h == null || Ke,
|
|
2504
|
+
onRequestPublishHistory: gt,
|
|
2505
|
+
onOpenUnpublish: ve ? Rt : void 0,
|
|
2506
|
+
onEdit: ae,
|
|
2507
|
+
onDownload: oe,
|
|
2508
|
+
isDownloadVisible: se,
|
|
2509
|
+
isDownloadPrimary: F,
|
|
2510
|
+
onDelete: L ? Mt : void 0,
|
|
2511
|
+
onUnshare: de ? Pt : void 0,
|
|
2512
|
+
isUnshareVisible: fe,
|
|
2513
|
+
onRevokeShare: me ? Ft : void 0,
|
|
2514
|
+
onFetchRecipientsCount: he,
|
|
2515
|
+
isRevokeShareVisible: ge,
|
|
2516
|
+
onLogin: be,
|
|
2517
|
+
onLogout: xe,
|
|
2518
|
+
onOpenCredentialsManagement: At,
|
|
2519
|
+
onRequestLogout: Q,
|
|
2520
|
+
texts: z,
|
|
2521
|
+
detailsStyles: Se,
|
|
2522
2522
|
isReadonly: i
|
|
2523
2523
|
}),
|
|
2524
2524
|
e.credentials != null && (() => {
|
|
2525
2525
|
let t = d(e.credentials);
|
|
2526
|
-
return t != null && /* @__PURE__ */
|
|
2526
|
+
return t != null && /* @__PURE__ */ W("div", {
|
|
2527
2527
|
className: "px-6",
|
|
2528
|
-
children: /* @__PURE__ */
|
|
2528
|
+
children: /* @__PURE__ */ W(_n, {
|
|
2529
2529
|
state: t,
|
|
2530
2530
|
authenticationType: e.credentials.authenticationType,
|
|
2531
|
-
texts:
|
|
2531
|
+
texts: z
|
|
2532
2532
|
})
|
|
2533
2533
|
});
|
|
2534
2534
|
})(),
|
|
2535
|
-
/* @__PURE__ */
|
|
2535
|
+
/* @__PURE__ */ G("div", {
|
|
2536
2536
|
className: "flex items-center px-6",
|
|
2537
|
-
children: [/* @__PURE__ */
|
|
2537
|
+
children: [/* @__PURE__ */ W(Ne, {
|
|
2538
2538
|
tabs: Jt,
|
|
2539
|
-
activeTabId:
|
|
2540
|
-
onTabChange:
|
|
2541
|
-
}), r && /* @__PURE__ */
|
|
2539
|
+
activeTabId: V,
|
|
2540
|
+
onTabChange: Ie
|
|
2541
|
+
}), r && /* @__PURE__ */ W("div", {
|
|
2542
2542
|
role: "status",
|
|
2543
|
-
"aria-label":
|
|
2543
|
+
"aria-label": z?.detailsLoadingAriaLabel ?? "Loading details",
|
|
2544
2544
|
className: "shrink-0",
|
|
2545
|
-
children: /* @__PURE__ */
|
|
2545
|
+
children: /* @__PURE__ */ W(je, {
|
|
2546
2546
|
showTitle: !1,
|
|
2547
2547
|
paragraph: {
|
|
2548
2548
|
rows: 1,
|
|
@@ -2553,84 +2553,84 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2553
2553
|
})
|
|
2554
2554
|
})]
|
|
2555
2555
|
}),
|
|
2556
|
-
/* @__PURE__ */
|
|
2557
|
-
className:
|
|
2556
|
+
/* @__PURE__ */ G("div", {
|
|
2557
|
+
className: k("min-h-0 flex-1 overflow-y-auto", V !== K.Overview && "px-6"),
|
|
2558
2558
|
children: [
|
|
2559
|
-
|
|
2559
|
+
V === K.About && /* @__PURE__ */ W(Pn, {
|
|
2560
2560
|
content: e.description,
|
|
2561
2561
|
topics: e.topics,
|
|
2562
|
-
detailsStyles:
|
|
2562
|
+
detailsStyles: Se
|
|
2563
2563
|
}),
|
|
2564
|
-
|
|
2565
|
-
content:
|
|
2566
|
-
filePreview:
|
|
2567
|
-
filePreviewContent:
|
|
2568
|
-
description:
|
|
2569
|
-
files:
|
|
2570
|
-
selectedFileId:
|
|
2571
|
-
onSelectFile: (e) => void
|
|
2572
|
-
isFileLoading:
|
|
2573
|
-
expandedFolderIds:
|
|
2574
|
-
onToggleFolder:
|
|
2575
|
-
isFileSelectorOpen:
|
|
2576
|
-
onFileSelectorOpenChange:
|
|
2577
|
-
fileSelectorAriaLabel:
|
|
2578
|
-
fileCountLabel:
|
|
2579
|
-
fileLoadingLabel:
|
|
2580
|
-
fileUnsupportedLabel:
|
|
2581
|
-
detailsStyles:
|
|
2564
|
+
V === K.Content && /* @__PURE__ */ W(zn, {
|
|
2565
|
+
content: Ye?.content ?? "",
|
|
2566
|
+
filePreview: mt(),
|
|
2567
|
+
filePreviewContent: ht,
|
|
2568
|
+
description: Ye?.description ?? e.description,
|
|
2569
|
+
files: Ye?.files,
|
|
2570
|
+
selectedFileId: lt,
|
|
2571
|
+
onSelectFile: (e) => void ct(e),
|
|
2572
|
+
isFileLoading: $e,
|
|
2573
|
+
expandedFolderIds: tt,
|
|
2574
|
+
onToggleFolder: st,
|
|
2575
|
+
isFileSelectorOpen: rt,
|
|
2576
|
+
onFileSelectorOpenChange: H,
|
|
2577
|
+
fileSelectorAriaLabel: z?.contentFileSelectorAriaLabel,
|
|
2578
|
+
fileCountLabel: z?.contentFileCountLabel,
|
|
2579
|
+
fileLoadingLabel: z?.contentFileLoadingLabel,
|
|
2580
|
+
fileUnsupportedLabel: z?.contentFileUnsupportedLabel,
|
|
2581
|
+
detailsStyles: Se
|
|
2582
2582
|
}),
|
|
2583
|
-
|
|
2583
|
+
V === K.Overview && /* @__PURE__ */ W($n, {
|
|
2584
2584
|
sections: e.details?.overview?.sections,
|
|
2585
|
-
sectionClassName:
|
|
2586
|
-
labelClassName:
|
|
2587
|
-
valueClassName:
|
|
2588
|
-
valueTrueClassName:
|
|
2585
|
+
sectionClassName: Te,
|
|
2586
|
+
labelClassName: Ee,
|
|
2587
|
+
valueClassName: De,
|
|
2588
|
+
valueTrueClassName: ke,
|
|
2589
2589
|
yesLabel: Xt,
|
|
2590
2590
|
noLabel: Zt
|
|
2591
2591
|
}),
|
|
2592
|
-
|
|
2592
|
+
V === K.Pricing && /* @__PURE__ */ W(er, {
|
|
2593
2593
|
pricing: e.details?.pricing,
|
|
2594
|
-
pricesSectionLabel:
|
|
2595
|
-
limitsSectionLabel:
|
|
2594
|
+
pricesSectionLabel: z?.pricingPricesSectionLabel,
|
|
2595
|
+
limitsSectionLabel: z?.pricingLimitsSectionLabel
|
|
2596
2596
|
}),
|
|
2597
|
-
|
|
2597
|
+
V === K.Limits && /* @__PURE__ */ W(Qn, {
|
|
2598
2598
|
limits: e.details?.limits,
|
|
2599
|
-
footerNote:
|
|
2599
|
+
footerNote: Ce
|
|
2600
2600
|
}),
|
|
2601
|
-
|
|
2601
|
+
V === K.Api && or(e.details?.api) && /* @__PURE__ */ W($t, {
|
|
2602
2602
|
api: e.details?.api,
|
|
2603
|
-
resourceSectionLabel:
|
|
2604
|
-
snippetSectionLabel:
|
|
2605
|
-
modelIdLabel:
|
|
2606
|
-
endpointLabel:
|
|
2607
|
-
endpointSectionLabel:
|
|
2608
|
-
requestExampleLabel:
|
|
2609
|
-
responseSchemaLabel:
|
|
2610
|
-
copyAriaLabel:
|
|
2611
|
-
copiedStatusLabel:
|
|
2603
|
+
resourceSectionLabel: z?.apiResourceSectionLabel,
|
|
2604
|
+
snippetSectionLabel: z?.apiSnippetSectionLabel,
|
|
2605
|
+
modelIdLabel: z?.apiModelIdLabel,
|
|
2606
|
+
endpointLabel: z?.apiEndpointLabel,
|
|
2607
|
+
endpointSectionLabel: z?.apiEndpointSectionLabel,
|
|
2608
|
+
requestExampleLabel: z?.apiRequestExampleLabel,
|
|
2609
|
+
responseSchemaLabel: z?.apiResponseSchemaLabel,
|
|
2610
|
+
copyAriaLabel: z?.copyCodeAriaLabel,
|
|
2611
|
+
copiedStatusLabel: z?.copiedCodeStatusLabel
|
|
2612
2612
|
}),
|
|
2613
|
-
|
|
2613
|
+
V === K.Tools && /* @__PURE__ */ W(ir, { tools: e.details?.tools })
|
|
2614
2614
|
]
|
|
2615
2615
|
})
|
|
2616
2616
|
] })
|
|
2617
2617
|
]
|
|
2618
2618
|
}),
|
|
2619
|
-
ln && /* @__PURE__ */
|
|
2619
|
+
ln && /* @__PURE__ */ W(tn, {
|
|
2620
2620
|
confirmLabel: cn.confirmLabel,
|
|
2621
2621
|
cancelLabel: sn,
|
|
2622
2622
|
variant: cn.variant,
|
|
2623
|
-
isLoading:
|
|
2623
|
+
isLoading: St,
|
|
2624
2624
|
isConfirmDisabled: un,
|
|
2625
2625
|
loadingStatusLabel: cn.loadingStatusLabel,
|
|
2626
2626
|
onConfirm: Vt,
|
|
2627
2627
|
onCancel: Bt
|
|
2628
2628
|
}),
|
|
2629
|
-
!ln &&
|
|
2629
|
+
!ln && Le && /* @__PURE__ */ W(ut, {
|
|
2630
2630
|
version: e.version,
|
|
2631
|
-
hasExistingPublicationInFolder:
|
|
2632
|
-
isSubmitDisabled:
|
|
2633
|
-
isSubmitLoading:
|
|
2631
|
+
hasExistingPublicationInFolder: Y.hasExistingPublicationInFolder,
|
|
2632
|
+
isSubmitDisabled: X.isSubmitDisabled,
|
|
2633
|
+
isSubmitLoading: X.isSubmitLoading,
|
|
2634
2634
|
onCancel: Ut,
|
|
2635
2635
|
onSubmit: Kt,
|
|
2636
2636
|
labels: D
|
|
@@ -2653,44 +2653,44 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2653
2653
|
cardLeaving: "_cardLeaving_14qfn_54",
|
|
2654
2654
|
cardFadeOut: "_cardFadeOut_14qfn_1"
|
|
2655
2655
|
}, br = ({ item: e, initialIsStarred: t = !0, onToggle: n, isFavoriteVisible: r, onClick: i, nameClassName: a, colors: o, versionClassName: s, lastUsedClassName: c, query: l, addToFavoritesAriaLabel: u = "Add to favorites", removeFromFavoritesAriaLabel: d = "Remove from favorites", isSelected: f = !1, credentialsBadgeLoggedOutLabel: p }) => {
|
|
2656
|
-
let [m, h] =
|
|
2656
|
+
let [m, h] = P(t), [g, _] = P(!1), v = (t) => {
|
|
2657
2657
|
t.stopPropagation();
|
|
2658
2658
|
let r = !m;
|
|
2659
2659
|
h(r), r ? n?.(e.id, r) : _(!0);
|
|
2660
|
-
}, y = i && !g ? () => i(e) : void 0, b =
|
|
2660
|
+
}, y = i && !g ? () => i(e) : void 0, b = A((t) => {
|
|
2661
2661
|
!i || g || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), i(e));
|
|
2662
2662
|
}, [
|
|
2663
2663
|
i,
|
|
2664
2664
|
e,
|
|
2665
2665
|
g
|
|
2666
2666
|
]);
|
|
2667
|
-
return /* @__PURE__ */
|
|
2667
|
+
return /* @__PURE__ */ G(I, {
|
|
2668
2668
|
"data-card-id": e.id,
|
|
2669
2669
|
role: y == null ? void 0 : "button",
|
|
2670
2670
|
tabIndex: y == null ? void 0 : 0,
|
|
2671
2671
|
"aria-label": e.name,
|
|
2672
|
-
className:
|
|
2672
|
+
className: k("box-border min-w-0 cursor-pointer flex-row items-start gap-1 text-start", g && yr.cardLeaving, f && yr.selectedCard),
|
|
2673
2673
|
onClick: y,
|
|
2674
2674
|
onKeyDown: b,
|
|
2675
2675
|
onAnimationEnd: g ? (t) => {
|
|
2676
2676
|
t.currentTarget === t.target && n?.(e.id, !1);
|
|
2677
2677
|
} : void 0,
|
|
2678
2678
|
children: [
|
|
2679
|
-
f && /* @__PURE__ */
|
|
2680
|
-
size:
|
|
2681
|
-
className:
|
|
2679
|
+
f && /* @__PURE__ */ W(ze, {
|
|
2680
|
+
size: L.SM,
|
|
2681
|
+
className: k("absolute end-3 top-3 shrink-0", yr.selectedCheck),
|
|
2682
2682
|
"aria-hidden": !0,
|
|
2683
|
-
stroke:
|
|
2683
|
+
stroke: R
|
|
2684
2684
|
}),
|
|
2685
|
-
/* @__PURE__ */
|
|
2685
|
+
/* @__PURE__ */ W("div", {
|
|
2686
2686
|
className: "flex min-w-0 flex-1 flex-col items-start gap-1",
|
|
2687
|
-
children: /* @__PURE__ */
|
|
2687
|
+
children: /* @__PURE__ */ W(At, {
|
|
2688
2688
|
icon: e.iconUrl,
|
|
2689
2689
|
type: e.type,
|
|
2690
2690
|
name: e.name,
|
|
2691
2691
|
version: e.version,
|
|
2692
2692
|
lastUsed: e.lastUsed,
|
|
2693
|
-
size:
|
|
2693
|
+
size: _t.LG,
|
|
2694
2694
|
query: l,
|
|
2695
2695
|
className: "min-w-0 self-stretch",
|
|
2696
2696
|
styles: {
|
|
@@ -2701,15 +2701,15 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2701
2701
|
lastUsedClassName: c
|
|
2702
2702
|
}
|
|
2703
2703
|
},
|
|
2704
|
-
iconOverlay: /* @__PURE__ */
|
|
2704
|
+
iconOverlay: /* @__PURE__ */ W(Mt, {
|
|
2705
2705
|
credentials: e.credentials,
|
|
2706
2706
|
loggedOutLabel: p
|
|
2707
2707
|
})
|
|
2708
2708
|
})
|
|
2709
2709
|
}),
|
|
2710
|
-
r?.(e) !== !1 && /* @__PURE__ */
|
|
2710
|
+
r?.(e) !== !1 && /* @__PURE__ */ W(Nt, {
|
|
2711
2711
|
isStarred: m,
|
|
2712
|
-
size:
|
|
2712
|
+
size: pe.Small,
|
|
2713
2713
|
onClick: v,
|
|
2714
2714
|
ariaLabel: m ? d : u,
|
|
2715
2715
|
className: "self-end"
|
|
@@ -2726,7 +2726,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2726
2726
|
return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2727
2727
|
}
|
|
2728
2728
|
}, Cr = ({ items: e, totalCount: t, title: n = "Your Favorites", onToggleFavorite: r, isFavoriteVisible: i, onItemClick: a, styles: o, isLeaving: s, onExitComplete: c, prevPageAriaLabel: l = "Previous page", nextPageAriaLabel: u = "Next page", addToFavoritesAriaLabel: d, removeFromFavoritesAriaLabel: f, selectedItemId: p, credentialsBadgeLoggedOutLabel: m }) => {
|
|
2729
|
-
let h = o?.typography?.titleClassName ?? "dial-body-semi-text", g = o?.typography?.countClassName ?? "dial-tiny-semi-text", _ =
|
|
2729
|
+
let h = o?.typography?.titleClassName ?? "dial-body-semi-text", g = o?.typography?.countClassName ?? "dial-tiny-semi-text", _ = ie({
|
|
2730
2730
|
"--cat-fav-title-text": o?.colors?.titleText,
|
|
2731
2731
|
"--cat-fav-count-text": o?.colors?.countText,
|
|
2732
2732
|
"--cat-fav-selected-check": o?.colors?.selectedCheckIcon,
|
|
@@ -2738,53 +2738,53 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2738
2738
|
"--cat-fav-nav-btn-active-bg": o?.colors?.navButtonActiveBackground,
|
|
2739
2739
|
"--cat-fav-page-nav-border": o?.colors?.pageNavBorder,
|
|
2740
2740
|
"--cat-fav-page-nav-bg": o?.colors?.pageNavBackground
|
|
2741
|
-
}), v =
|
|
2741
|
+
}), v = M(() => [...e].sort((e, t) => (new Date(t.updatedAt || "").getTime() ?? 0) - (new Date(e.updatedAt || "").getTime() ?? 0)), [e]), [y, b] = P(1), x = yt(), S = x * xr, C = (y - 1) * S, w = M(() => v.slice(C, C + S), [
|
|
2742
2742
|
v,
|
|
2743
2743
|
C,
|
|
2744
2744
|
S
|
|
2745
|
-
]), T = Math.ceil(v.length / S), D = t ?? e.length, O =
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
}, [x]),
|
|
2745
|
+
]), T = Math.ceil(v.length / S), D = t ?? e.length, O = N(null), ee = N(null), te = N(null), [ne, re] = P(), [ae, oe] = P(), A = N(x);
|
|
2746
|
+
j(() => {
|
|
2747
|
+
A.current !== x && (A.current = x, b(1), re(void 0), oe(void 0));
|
|
2748
|
+
}, [x]), j(() => {
|
|
2749
2749
|
y > T && T > 0 && b(T);
|
|
2750
|
-
}, [y, T]),
|
|
2751
|
-
T <= 1 && (
|
|
2750
|
+
}, [y, T]), j(() => {
|
|
2751
|
+
T <= 1 && (ne !== void 0 || ae !== void 0) && (re(void 0), oe(void 0));
|
|
2752
2752
|
}, [
|
|
2753
2753
|
T,
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
]),
|
|
2757
|
-
!
|
|
2754
|
+
ne,
|
|
2755
|
+
ae
|
|
2756
|
+
]), se(() => {
|
|
2757
|
+
!te.current || !ee.current || T <= 1 || y !== 1 || ne !== void 0 || (re(te.current.offsetHeight), oe(ee.current.offsetHeight));
|
|
2758
2758
|
}, [
|
|
2759
2759
|
T,
|
|
2760
2760
|
y,
|
|
2761
|
-
|
|
2761
|
+
ne
|
|
2762
2762
|
]);
|
|
2763
|
-
let
|
|
2764
|
-
return
|
|
2765
|
-
if (!
|
|
2766
|
-
if (O.current && !
|
|
2763
|
+
let F = N(/* @__PURE__ */ new Map()), ce = N(y), le = N(x), I = N(0), ue = N(!1);
|
|
2764
|
+
return se(() => {
|
|
2765
|
+
if (!te.current || s) return;
|
|
2766
|
+
if (O.current && !ue.current) {
|
|
2767
2767
|
let e = O.current;
|
|
2768
2768
|
e.style.height = "", e.style.transition = "";
|
|
2769
2769
|
}
|
|
2770
|
-
let e =
|
|
2771
|
-
|
|
2772
|
-
let n =
|
|
2770
|
+
let e = ce.current !== y, t = le.current !== x;
|
|
2771
|
+
ce.current = y, le.current = x;
|
|
2772
|
+
let n = te.current.querySelectorAll("[data-card-id]"), r = /* @__PURE__ */ new Map();
|
|
2773
2773
|
if (n.forEach((e) => {
|
|
2774
2774
|
r.set(e.dataset.cardId, Sr(e));
|
|
2775
2775
|
}), !e && !t) {
|
|
2776
|
-
let e =
|
|
2776
|
+
let e = ee.current, t = I.current, i = 0;
|
|
2777
2777
|
if (e) {
|
|
2778
2778
|
let t = e.style.height;
|
|
2779
2779
|
t && (e.style.height = ""), i = e.offsetHeight, t && (e.style.height = t);
|
|
2780
2780
|
}
|
|
2781
2781
|
let a = e != null && t > 0 && Math.abs(i - t) > 2, o = i > t ? 280 : 220, s = [];
|
|
2782
2782
|
if (n.forEach((e) => {
|
|
2783
|
-
let t = e.dataset.cardId, n =
|
|
2783
|
+
let t = e.dataset.cardId, n = F.current.get(t), i = r.get(t);
|
|
2784
2784
|
if (!n || !i) return;
|
|
2785
2785
|
let o = n.left - i.left, c = n.top - i.top;
|
|
2786
2786
|
!a && Math.abs(c) > .5 || Math.abs(o) < .5 && Math.abs(c) < .5 || (e.style.transition = "none", e.style.transform = `translate(${o}px, ${c}px)`, s.push(e));
|
|
2787
|
-
}), a && e && (e.style.height = `${t}px`, e.style.overflow = "clip"), (s.length > 0 || a) &&
|
|
2787
|
+
}), a && e && (e.style.height = `${t}px`, e.style.overflow = "clip"), (s.length > 0 || a) && te.current.offsetHeight, s.forEach((e) => {
|
|
2788
2788
|
e.style.transition = `transform ${o}ms cubic-bezier(0, 0, 0.2, 1)`, e.style.transform = "", e.addEventListener("transitionend", () => {
|
|
2789
2789
|
e.style.transition = "";
|
|
2790
2790
|
}, { once: !0 });
|
|
@@ -2796,93 +2796,93 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2796
2796
|
e.addEventListener("transitionend", t);
|
|
2797
2797
|
}
|
|
2798
2798
|
}
|
|
2799
|
-
if (
|
|
2800
|
-
let e =
|
|
2801
|
-
|
|
2799
|
+
if (F.current = r, ee.current) {
|
|
2800
|
+
let e = ee.current, t = e.style.height ? parseFloat(e.style.height) : NaN;
|
|
2801
|
+
I.current = Number.isNaN(t) ? e.offsetHeight : t;
|
|
2802
2802
|
}
|
|
2803
2803
|
}, [
|
|
2804
2804
|
w,
|
|
2805
2805
|
y,
|
|
2806
2806
|
x,
|
|
2807
2807
|
s
|
|
2808
|
-
]),
|
|
2808
|
+
]), se(() => {
|
|
2809
2809
|
let e = O.current;
|
|
2810
2810
|
if (!e) return;
|
|
2811
2811
|
let t = e.offsetHeight;
|
|
2812
2812
|
if (t === 0) return;
|
|
2813
|
-
|
|
2813
|
+
ue.current = !0, e.style.height = "0px", e.offsetHeight, e.style.transition = "height 300ms cubic-bezier(0, 0, 0.2, 1)", e.style.height = `${t}px`;
|
|
2814
2814
|
let n = (t) => {
|
|
2815
2815
|
t.target !== e || t.propertyName !== "height" || r();
|
|
2816
2816
|
}, r = () => {
|
|
2817
|
-
|
|
2817
|
+
ue.current = !1, parseFloat(e.style.height || "0") > 0 && (e.style.height = "", e.style.transition = ""), clearTimeout(i), e.removeEventListener("transitionend", n);
|
|
2818
2818
|
}, i = setTimeout(r, 400);
|
|
2819
2819
|
return e.addEventListener("transitionend", n), () => {
|
|
2820
2820
|
clearTimeout(i), e.removeEventListener("transitionend", n);
|
|
2821
2821
|
};
|
|
2822
|
-
}, []),
|
|
2822
|
+
}, []), se(() => {
|
|
2823
2823
|
if (!s || !O.current) return;
|
|
2824
2824
|
let e = O.current, t = e.offsetHeight;
|
|
2825
2825
|
t !== 0 && (e.style.height = `${t}px`, e.offsetHeight, e.style.transition = "height 260ms ease-in", e.style.height = "0px");
|
|
2826
|
-
}, [s]), /* @__PURE__ */
|
|
2826
|
+
}, [s]), /* @__PURE__ */ W("div", {
|
|
2827
2827
|
ref: O,
|
|
2828
|
-
children: /* @__PURE__ */
|
|
2829
|
-
ref:
|
|
2830
|
-
className:
|
|
2828
|
+
children: /* @__PURE__ */ G("section", {
|
|
2829
|
+
ref: ee,
|
|
2830
|
+
className: k("flex flex-shrink-0 flex-col gap-4 pb-2 pt-2", yr.section, s && yr.sectionLeaving),
|
|
2831
2831
|
style: {
|
|
2832
2832
|
..._,
|
|
2833
|
-
minHeight:
|
|
2833
|
+
minHeight: ae
|
|
2834
2834
|
},
|
|
2835
2835
|
onAnimationEnd: (e) => {
|
|
2836
|
-
e.target ===
|
|
2836
|
+
e.target === ee.current && s && c?.();
|
|
2837
2837
|
},
|
|
2838
|
-
children: [/* @__PURE__ */
|
|
2838
|
+
children: [/* @__PURE__ */ W(E, {
|
|
2839
2839
|
title: n,
|
|
2840
2840
|
postfix: D,
|
|
2841
|
-
titleClassName:
|
|
2842
|
-
postfixClassName:
|
|
2843
|
-
trailing: T > 1 ? /* @__PURE__ */
|
|
2844
|
-
className:
|
|
2841
|
+
titleClassName: k(h, yr.titleText),
|
|
2842
|
+
postfixClassName: k(g, yr.countText),
|
|
2843
|
+
trailing: T > 1 ? /* @__PURE__ */ G("div", {
|
|
2844
|
+
className: k("inline-flex items-center gap-[2px] rounded-full px-[6px] py-[3px]", yr.pageNav),
|
|
2845
2845
|
children: [
|
|
2846
|
-
/* @__PURE__ */
|
|
2846
|
+
/* @__PURE__ */ W("button", {
|
|
2847
2847
|
"aria-label": l,
|
|
2848
2848
|
disabled: y === 1,
|
|
2849
2849
|
onClick: () => b((e) => e - 1),
|
|
2850
|
-
className:
|
|
2851
|
-
children: /* @__PURE__ */
|
|
2850
|
+
className: k("flex size-[22px] cursor-pointer items-center justify-center rounded-full border-none bg-transparent", yr.navBtn),
|
|
2851
|
+
children: /* @__PURE__ */ W(Ve, {
|
|
2852
2852
|
size: 14,
|
|
2853
2853
|
className: "rtl:scale-x-[-1]",
|
|
2854
|
-
stroke:
|
|
2854
|
+
stroke: R
|
|
2855
2855
|
})
|
|
2856
2856
|
}),
|
|
2857
|
-
/* @__PURE__ */
|
|
2858
|
-
className:
|
|
2857
|
+
/* @__PURE__ */ G("span", {
|
|
2858
|
+
className: k("min-w-[32px] select-none px-1 text-center", g, yr.countText),
|
|
2859
2859
|
children: [
|
|
2860
2860
|
y,
|
|
2861
2861
|
" / ",
|
|
2862
2862
|
T
|
|
2863
2863
|
]
|
|
2864
2864
|
}),
|
|
2865
|
-
/* @__PURE__ */
|
|
2865
|
+
/* @__PURE__ */ W("button", {
|
|
2866
2866
|
"aria-label": u,
|
|
2867
2867
|
disabled: y === T,
|
|
2868
2868
|
onClick: () => b((e) => e + 1),
|
|
2869
|
-
className:
|
|
2870
|
-
children: /* @__PURE__ */
|
|
2869
|
+
className: k("flex size-[22px] cursor-pointer items-center justify-center rounded-full border-none bg-transparent", yr.navBtn),
|
|
2870
|
+
children: /* @__PURE__ */ W(He, {
|
|
2871
2871
|
size: 14,
|
|
2872
2872
|
className: "rtl:scale-x-[-1]",
|
|
2873
|
-
stroke:
|
|
2873
|
+
stroke: R
|
|
2874
2874
|
})
|
|
2875
2875
|
})
|
|
2876
2876
|
]
|
|
2877
2877
|
}) : void 0
|
|
2878
|
-
}), /* @__PURE__ */
|
|
2879
|
-
ref:
|
|
2880
|
-
className:
|
|
2878
|
+
}), /* @__PURE__ */ W("div", {
|
|
2879
|
+
ref: te,
|
|
2880
|
+
className: k("grid content-start gap-5", yr.gridPage),
|
|
2881
2881
|
style: {
|
|
2882
2882
|
gridTemplateColumns: `repeat(${x}, minmax(0, 1fr))`,
|
|
2883
|
-
minHeight:
|
|
2883
|
+
minHeight: ne
|
|
2884
2884
|
},
|
|
2885
|
-
children: w.map((e) => /* @__PURE__ */
|
|
2885
|
+
children: w.map((e) => /* @__PURE__ */ W(br, {
|
|
2886
2886
|
item: e,
|
|
2887
2887
|
onToggle: r,
|
|
2888
2888
|
isFavoriteVisible: i,
|
|
@@ -2904,35 +2904,35 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2904
2904
|
selectedCheck: "_selectedCheck_145s6_55",
|
|
2905
2905
|
starToggleOff: "_starToggleOff_145s6_59",
|
|
2906
2906
|
selectedRow: "_selectedRow_145s6_72"
|
|
2907
|
-
}, Tr = ({ data: e }) => e ? /* @__PURE__ */
|
|
2907
|
+
}, Tr = ({ data: e }) => e ? /* @__PURE__ */ W("div", {
|
|
2908
2908
|
className: "flex h-full items-center",
|
|
2909
|
-
children: /* @__PURE__ */
|
|
2909
|
+
children: /* @__PURE__ */ W(w, { type: e.type })
|
|
2910
2910
|
}) : null, Er = " / ", Dr = ({ data: e, context: t }) => {
|
|
2911
2911
|
if (!e || e.folder.length === 0) return null;
|
|
2912
2912
|
let n = e.folder.join(Er), r = e.folder[e.folder.length - 1], i = e.folder.length > 1, a = t?.typography?.folderClassName ?? "dial-small-text", o = t?.typography?.folderLastSegmentClassName ?? "dial-small-semi-text";
|
|
2913
|
-
return /* @__PURE__ */
|
|
2913
|
+
return /* @__PURE__ */ G("div", {
|
|
2914
2914
|
className: "flex h-full w-full min-w-0 items-center gap-1.5",
|
|
2915
2915
|
children: [
|
|
2916
|
-
/* @__PURE__ */
|
|
2917
|
-
size:
|
|
2918
|
-
stroke:
|
|
2919
|
-
className:
|
|
2916
|
+
/* @__PURE__ */ W(qe, {
|
|
2917
|
+
size: L.SM,
|
|
2918
|
+
stroke: R,
|
|
2919
|
+
className: k("shrink-0", wr.folderIcon),
|
|
2920
2920
|
"aria-hidden": !0
|
|
2921
2921
|
}),
|
|
2922
|
-
/* @__PURE__ */
|
|
2923
|
-
tooltip: /* @__PURE__ */
|
|
2922
|
+
/* @__PURE__ */ W(Fe, {
|
|
2923
|
+
tooltip: /* @__PURE__ */ W("span", {
|
|
2924
2924
|
className: a,
|
|
2925
2925
|
children: n
|
|
2926
2926
|
}),
|
|
2927
2927
|
hideTooltip: !i,
|
|
2928
2928
|
triggerClassName: "min-w-0 flex-1",
|
|
2929
|
-
children: /* @__PURE__ */
|
|
2929
|
+
children: /* @__PURE__ */ W(me, {
|
|
2930
2930
|
text: r,
|
|
2931
2931
|
className: o,
|
|
2932
2932
|
hideTooltip: i
|
|
2933
2933
|
})
|
|
2934
2934
|
}),
|
|
2935
|
-
i && /* @__PURE__ */
|
|
2935
|
+
i && /* @__PURE__ */ W("span", {
|
|
2936
2936
|
className: "sr-only",
|
|
2937
2937
|
children: n
|
|
2938
2938
|
})
|
|
@@ -2940,41 +2940,41 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2940
2940
|
});
|
|
2941
2941
|
}, Or = ({ data: e, context: t }) => {
|
|
2942
2942
|
let n = t?.searchQuery ?? "", r = t?.typography, i = r?.nameClassName ?? "dial-small-semi-text", a = r?.versionClassName ?? "dial-tiny-text", o = e != null && e.id === t?.selectedItemId;
|
|
2943
|
-
return e ? /* @__PURE__ */
|
|
2943
|
+
return e ? /* @__PURE__ */ G("div", {
|
|
2944
2944
|
className: "flex h-full w-full min-w-0 items-center gap-2.5",
|
|
2945
|
-
children: [/* @__PURE__ */
|
|
2945
|
+
children: [/* @__PURE__ */ G("div", {
|
|
2946
2946
|
className: "relative shrink-0",
|
|
2947
|
-
children: [/* @__PURE__ */
|
|
2947
|
+
children: [/* @__PURE__ */ W(S, {
|
|
2948
2948
|
src: e.iconUrl,
|
|
2949
2949
|
size: 36,
|
|
2950
2950
|
initialsName: e.name,
|
|
2951
2951
|
styles: { badgeClassName: "rounded-[10px]" }
|
|
2952
|
-
}), /* @__PURE__ */
|
|
2952
|
+
}), /* @__PURE__ */ W(Mt, {
|
|
2953
2953
|
credentials: e.credentials,
|
|
2954
2954
|
loggedOutLabel: t?.credentialsBadgeLoggedOutLabel
|
|
2955
2955
|
})]
|
|
2956
|
-
}), /* @__PURE__ */
|
|
2956
|
+
}), /* @__PURE__ */ W(E, {
|
|
2957
2957
|
title: e.name,
|
|
2958
2958
|
postfix: e.version,
|
|
2959
2959
|
postfixClassName: a,
|
|
2960
2960
|
query: n,
|
|
2961
2961
|
titleClassName: i,
|
|
2962
2962
|
className: "min-w-0 flex-1 items-baseline gap-1.5",
|
|
2963
|
-
trailing: o ? /* @__PURE__ */
|
|
2964
|
-
size:
|
|
2965
|
-
className:
|
|
2963
|
+
trailing: o ? /* @__PURE__ */ W(ze, {
|
|
2964
|
+
size: L.SM,
|
|
2965
|
+
className: k("shrink-0", wr.selectedCheck),
|
|
2966
2966
|
"aria-hidden": !0,
|
|
2967
|
-
stroke:
|
|
2967
|
+
stroke: R
|
|
2968
2968
|
}) : void 0
|
|
2969
2969
|
})]
|
|
2970
2970
|
}) : null;
|
|
2971
2971
|
}, kr = ({ data: e, context: t }) => {
|
|
2972
|
-
let [n, r] =
|
|
2973
|
-
return
|
|
2972
|
+
let [n, r] = P(e?.isStarred ?? !1);
|
|
2973
|
+
return j(() => {
|
|
2974
2974
|
r(e?.isStarred ?? !1);
|
|
2975
|
-
}, [e?.id, e?.isStarred]), !e || t?.isFavoriteVisible?.(e) === !1 ? null : /* @__PURE__ */
|
|
2975
|
+
}, [e?.id, e?.isStarred]), !e || t?.isFavoriteVisible?.(e) === !1 ? null : /* @__PURE__ */ W("div", {
|
|
2976
2976
|
className: "flex h-full items-center justify-end pe-4",
|
|
2977
|
-
children: /* @__PURE__ */
|
|
2977
|
+
children: /* @__PURE__ */ W(Nt, {
|
|
2978
2978
|
isStarred: n,
|
|
2979
2979
|
onClick: (i) => {
|
|
2980
2980
|
i.stopPropagation();
|
|
@@ -2984,9 +2984,9 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2984
2984
|
className: n ? void 0 : wr.starToggleOff
|
|
2985
2985
|
})
|
|
2986
2986
|
});
|
|
2987
|
-
}, Ar = ({ data: e }) => !e || e.topics.length === 0 ? null : /* @__PURE__ */
|
|
2987
|
+
}, Ar = ({ data: e }) => !e || e.topics.length === 0 ? null : /* @__PURE__ */ W("div", {
|
|
2988
2988
|
className: "flex h-full w-full min-w-0 items-center",
|
|
2989
|
-
children: /* @__PURE__ */
|
|
2989
|
+
children: /* @__PURE__ */ W(Lt, { topics: e.topics })
|
|
2990
2990
|
}), jr = {
|
|
2991
2991
|
folder: (e) => e !== b.Model,
|
|
2992
2992
|
tags: () => !0,
|
|
@@ -3052,9 +3052,9 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3052
3052
|
}
|
|
3053
3053
|
];
|
|
3054
3054
|
}, Pr = 60, Fr = ({ items: e, type: t, query: n = "", ariaLabel: r = "Catalog", emptyStateTitle: i, styles: a, onToggleFavorite: o, isFavoriteVisible: s, onItemClick: c, stickyHeaderTop: l, selectedItemId: u, credentialsBadgeLoggedOutLabel: d, isReadonly: f = !1, columnVisibility: p }) => {
|
|
3055
|
-
if (e.length === 0) return /* @__PURE__ */
|
|
3055
|
+
if (e.length === 0) return /* @__PURE__ */ W("div", {
|
|
3056
3056
|
className: "flex size-full flex-col items-center justify-center",
|
|
3057
|
-
children: /* @__PURE__ */
|
|
3057
|
+
children: /* @__PURE__ */ W(te, { label: i ?? "No results" })
|
|
3058
3058
|
});
|
|
3059
3059
|
let m = a?.typography ?? {}, h = a?.colors, g = {
|
|
3060
3060
|
"--cat-list-bg": h?.background,
|
|
@@ -3068,29 +3068,29 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3068
3068
|
"--cat-list-selected-bg": h?.selectedRowBackground,
|
|
3069
3069
|
"--cat-list-selected-check": h?.selectedRowCheckIcon,
|
|
3070
3070
|
...l == null ? {} : { "--list-header-sticky-top": `${l}px` }
|
|
3071
|
-
}, _ =
|
|
3071
|
+
}, _ = N(null), { containerRef: v, startRow: y, endRow: b } = Et(e.length, Pr), x = M(() => e.slice(y, b), [
|
|
3072
3072
|
e,
|
|
3073
3073
|
y,
|
|
3074
3074
|
b
|
|
3075
3075
|
]);
|
|
3076
|
-
return
|
|
3076
|
+
return j(() => {
|
|
3077
3077
|
_.current?.refreshCells({ force: !0 });
|
|
3078
|
-
}, [n]),
|
|
3078
|
+
}, [n]), j(() => {
|
|
3079
3079
|
_.current?.redrawRows();
|
|
3080
|
-
}, [u]),
|
|
3080
|
+
}, [u]), j(() => {
|
|
3081
3081
|
_.current?.setGridOption("domLayout", e.length > 0 ? "autoHeight" : "normal");
|
|
3082
|
-
}, [e]), /* @__PURE__ */
|
|
3082
|
+
}, [e]), /* @__PURE__ */ W("div", {
|
|
3083
3083
|
style: g,
|
|
3084
|
-
className:
|
|
3085
|
-
children: /* @__PURE__ */
|
|
3084
|
+
className: V("w-full rounded-xl border", wr.listContainer),
|
|
3085
|
+
children: /* @__PURE__ */ G("div", {
|
|
3086
3086
|
ref: v,
|
|
3087
|
-
className:
|
|
3087
|
+
className: V("rounded-xl", wr.gridClip),
|
|
3088
3088
|
children: [
|
|
3089
|
-
y > 0 && /* @__PURE__ */
|
|
3089
|
+
y > 0 && /* @__PURE__ */ W("div", {
|
|
3090
3090
|
style: { height: y * Pr },
|
|
3091
3091
|
"aria-hidden": !0
|
|
3092
3092
|
}),
|
|
3093
|
-
/* @__PURE__ */
|
|
3093
|
+
/* @__PURE__ */ W(mt, {
|
|
3094
3094
|
columnDefs: Nr(t, f, p),
|
|
3095
3095
|
rowData: x,
|
|
3096
3096
|
getRowId: (e) => e.id,
|
|
@@ -3123,7 +3123,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3123
3123
|
},
|
|
3124
3124
|
ariaLabel: r
|
|
3125
3125
|
}),
|
|
3126
|
-
b < e.length && /* @__PURE__ */
|
|
3126
|
+
b < e.length && /* @__PURE__ */ W("div", {
|
|
3127
3127
|
style: { height: (e.length - b) * Pr },
|
|
3128
3128
|
"aria-hidden": !0
|
|
3129
3129
|
})
|
|
@@ -3149,7 +3149,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3149
3149
|
let n = new Set(t);
|
|
3150
3150
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
3151
3151
|
}, zr = ({ checked: e, onChange: t, values: n, isMyAppsActive: r, onMyAppsChange: i, myAppsLabel: a = "My", topicsLabel: o = "Topics", defaultLabel: s = "From", clearLabel: c = "Clear", applyLabel: l = "Apply", typography: u, colors: d }) => {
|
|
3152
|
-
let f = (r ?? !1) || e.size > 0, [p, m] =
|
|
3152
|
+
let f = (r ?? !1) || e.size > 0, [p, m] = P(!1), h = ie({
|
|
3153
3153
|
"--cat-filter-btn-bg": d?.buttonBackground,
|
|
3154
3154
|
"--cat-filter-btn-border": d?.buttonBorder,
|
|
3155
3155
|
"--cat-filter-btn-border-hover": d?.buttonBorderHover,
|
|
@@ -3165,19 +3165,19 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3165
3165
|
"--cat-filter-section-label": d?.sectionLabel,
|
|
3166
3166
|
"--cat-filter-divider": d?.divider,
|
|
3167
3167
|
"--cat-filter-footer-border": d?.footerBorder
|
|
3168
|
-
}), g =
|
|
3169
|
-
|
|
3168
|
+
}), g = M(() => n == null ? [] : [...n].sort(), [n]), _ = Lr(e, n, r, a, s), [v, y] = P(() => new Set(e)), [b, x] = P(r ?? !1);
|
|
3169
|
+
j(() => {
|
|
3170
3170
|
p && (y(new Set(e)), x(r ?? !1));
|
|
3171
3171
|
}, [
|
|
3172
3172
|
p,
|
|
3173
3173
|
e,
|
|
3174
3174
|
r
|
|
3175
3175
|
]);
|
|
3176
|
-
let S = g.length + 1, [C, w] =
|
|
3176
|
+
let S = g.length + 1, [C, w] = P(-1), T = N([]), E = N(null), D = A((e) => {
|
|
3177
3177
|
let t = (e + S) % S;
|
|
3178
3178
|
w(t), T.current[t]?.focus();
|
|
3179
3179
|
}, [S]);
|
|
3180
|
-
|
|
3180
|
+
j(() => {
|
|
3181
3181
|
if (!p) {
|
|
3182
3182
|
w(-1);
|
|
3183
3183
|
return;
|
|
@@ -3187,22 +3187,22 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3187
3187
|
}, [p, D]);
|
|
3188
3188
|
let O = (e) => {
|
|
3189
3189
|
m(e), e || E.current?.focus();
|
|
3190
|
-
}, k = (e) => {
|
|
3191
|
-
e.key === "ArrowDown" && !p && (e.preventDefault(), m(!0));
|
|
3192
3190
|
}, ee = (e) => {
|
|
3191
|
+
e.key === "ArrowDown" && !p && (e.preventDefault(), m(!0));
|
|
3192
|
+
}, te = (e) => {
|
|
3193
3193
|
e.key === "ArrowDown" ? (e.preventDefault(), D(C + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), D(C - 1)) : e.key === "Escape" && (e.preventDefault(), m(!1), E.current?.focus());
|
|
3194
|
-
},
|
|
3194
|
+
}, ne = () => {
|
|
3195
3195
|
t(v), i?.(b), O(!1);
|
|
3196
|
-
},
|
|
3196
|
+
}, ae = () => {
|
|
3197
3197
|
t(/* @__PURE__ */ new Set()), i?.(!1), O(!1);
|
|
3198
3198
|
};
|
|
3199
|
-
return /* @__PURE__ */
|
|
3199
|
+
return /* @__PURE__ */ W(fe, {
|
|
3200
3200
|
matchReferenceWidth: !1,
|
|
3201
3201
|
placement: "bottom-start",
|
|
3202
3202
|
open: p,
|
|
3203
3203
|
onOpenChange: O,
|
|
3204
3204
|
listClassName: "!bg-transparent !shadow-none !p-0",
|
|
3205
|
-
renderOverlay: () => /* @__PURE__ */
|
|
3205
|
+
renderOverlay: () => /* @__PURE__ */ G("div", {
|
|
3206
3206
|
role: "menu",
|
|
3207
3207
|
"aria-label": s,
|
|
3208
3208
|
tabIndex: -1,
|
|
@@ -3210,16 +3210,16 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3210
3210
|
...h,
|
|
3211
3211
|
maxHeight: "calc(var(--fui-available-height, 9999px) - 8px)"
|
|
3212
3212
|
},
|
|
3213
|
-
className:
|
|
3214
|
-
onKeyDown:
|
|
3213
|
+
className: k("flex min-w-[360px] flex-col rounded-xl p-[6px]", Ir.overlay),
|
|
3214
|
+
onKeyDown: te,
|
|
3215
3215
|
children: [
|
|
3216
|
-
/* @__PURE__ */
|
|
3216
|
+
/* @__PURE__ */ W(Se, {
|
|
3217
3217
|
role: "menuitemcheckbox",
|
|
3218
3218
|
"aria-checked": b,
|
|
3219
|
-
mark:
|
|
3219
|
+
mark: Ce.Checkbox,
|
|
3220
3220
|
selected: b,
|
|
3221
3221
|
label: a,
|
|
3222
|
-
labelClassName:
|
|
3222
|
+
labelClassName: k(Ir.rowLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3223
3223
|
className: "shrink-0",
|
|
3224
3224
|
tabIndex: C === 0 ? 0 : -1,
|
|
3225
3225
|
ref: (e) => {
|
|
@@ -3227,25 +3227,25 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3227
3227
|
},
|
|
3228
3228
|
onClick: () => x(!b)
|
|
3229
3229
|
}),
|
|
3230
|
-
g.length > 0 && /* @__PURE__ */
|
|
3231
|
-
/* @__PURE__ */
|
|
3230
|
+
g.length > 0 && /* @__PURE__ */ G(U, { children: [
|
|
3231
|
+
/* @__PURE__ */ W("div", {
|
|
3232
3232
|
role: "separator",
|
|
3233
|
-
className:
|
|
3233
|
+
className: k("my-1 h-px", Ir.divider),
|
|
3234
3234
|
"aria-hidden": !0
|
|
3235
3235
|
}),
|
|
3236
|
-
/* @__PURE__ */
|
|
3237
|
-
className:
|
|
3236
|
+
/* @__PURE__ */ W("div", {
|
|
3237
|
+
className: k("px-[10px] pb-1 pt-[10px]", u?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text", Ir.sectionLabel),
|
|
3238
3238
|
"aria-hidden": !0,
|
|
3239
3239
|
children: o
|
|
3240
3240
|
}),
|
|
3241
|
-
/* @__PURE__ */
|
|
3242
|
-
className:
|
|
3241
|
+
/* @__PURE__ */ W("div", {
|
|
3242
|
+
className: k(re, "flex min-h-0 flex-col gap-1 overflow-y-auto"),
|
|
3243
3243
|
children: g.map((e, t) => {
|
|
3244
3244
|
let n = v.has(e), r = t + 1;
|
|
3245
|
-
return /* @__PURE__ */
|
|
3245
|
+
return /* @__PURE__ */ W(Se, {
|
|
3246
3246
|
role: "menuitemcheckbox",
|
|
3247
3247
|
"aria-checked": n,
|
|
3248
|
-
mark:
|
|
3248
|
+
mark: Ce.Checkbox,
|
|
3249
3249
|
selected: n,
|
|
3250
3250
|
label: e,
|
|
3251
3251
|
labelClassName: Ir.rowLabel,
|
|
@@ -3259,45 +3259,45 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3259
3259
|
})
|
|
3260
3260
|
})
|
|
3261
3261
|
] }),
|
|
3262
|
-
/* @__PURE__ */
|
|
3263
|
-
className:
|
|
3262
|
+
/* @__PURE__ */ G("div", {
|
|
3263
|
+
className: k("mt-1 flex shrink-0 items-center px-1 py-3", Ir.footer),
|
|
3264
3264
|
onKeyDown: (e) => {
|
|
3265
3265
|
(e.key === "ArrowUp" || e.key === "ArrowDown") && e.stopPropagation();
|
|
3266
3266
|
},
|
|
3267
|
-
children: [/* @__PURE__ */
|
|
3267
|
+
children: [/* @__PURE__ */ W(ge, {
|
|
3268
3268
|
label: c,
|
|
3269
|
-
onClick:
|
|
3270
|
-
}), /* @__PURE__ */
|
|
3269
|
+
onClick: ae
|
|
3270
|
+
}), /* @__PURE__ */ W(Ee, {
|
|
3271
3271
|
label: l,
|
|
3272
3272
|
className: "ms-auto",
|
|
3273
|
-
onClick:
|
|
3273
|
+
onClick: ne
|
|
3274
3274
|
})]
|
|
3275
3275
|
})
|
|
3276
3276
|
]
|
|
3277
3277
|
}),
|
|
3278
|
-
children: /* @__PURE__ */
|
|
3278
|
+
children: /* @__PURE__ */ G("button", {
|
|
3279
3279
|
ref: E,
|
|
3280
3280
|
type: "button",
|
|
3281
3281
|
"aria-haspopup": "menu",
|
|
3282
3282
|
"aria-expanded": p,
|
|
3283
|
-
onKeyDown:
|
|
3283
|
+
onKeyDown: ee,
|
|
3284
3284
|
style: h,
|
|
3285
|
-
className:
|
|
3285
|
+
className: k("flex h-12 shrink-0 cursor-pointer items-center gap-[7px] whitespace-nowrap rounded-lg px-[18px]", Ir.filterBtn, f && Ir.filterBtnActive, p && Ir.filterBtnOpen),
|
|
3286
3286
|
children: [
|
|
3287
|
-
/* @__PURE__ */
|
|
3288
|
-
size:
|
|
3289
|
-
stroke:
|
|
3290
|
-
className:
|
|
3287
|
+
/* @__PURE__ */ W(Ke, {
|
|
3288
|
+
size: L.SM,
|
|
3289
|
+
stroke: R,
|
|
3290
|
+
className: k("shrink-0", Ir.filterBtnFunnel),
|
|
3291
3291
|
"aria-hidden": !0
|
|
3292
3292
|
}),
|
|
3293
|
-
/* @__PURE__ */
|
|
3294
|
-
className:
|
|
3293
|
+
/* @__PURE__ */ W("span", {
|
|
3294
|
+
className: k(Ir.filterBtnLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3295
3295
|
children: _
|
|
3296
3296
|
}),
|
|
3297
|
-
/* @__PURE__ */
|
|
3297
|
+
/* @__PURE__ */ W(Be, {
|
|
3298
3298
|
size: 14,
|
|
3299
|
-
stroke:
|
|
3300
|
-
className:
|
|
3299
|
+
stroke: R,
|
|
3300
|
+
className: k("shrink-0 transition-transform duration-150", Ir.filterBtnChevron, p && "rotate-180"),
|
|
3301
3301
|
"aria-hidden": !0
|
|
3302
3302
|
})
|
|
3303
3303
|
]
|
|
@@ -3307,28 +3307,28 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3307
3307
|
section: "_section_mh952_1",
|
|
3308
3308
|
divider: "_divider_mh952_5"
|
|
3309
3309
|
}, Vr = ({ totalCount: e, viewMode: t, onViewModeChange: n, title: r = "Browse", browseHeaderRenderer: i, styles: a, query: o, onQueryChange: s, searchPlaceholder: c, gridViewLabel: l = "Grid view", listViewLabel: u = "List view", viewToggleLabel: d = "View mode", sortKey: f, sortOptions: p, onSortChange: m, sortLabel: h = "Sort", filters: g, onFiltersChange: _, filterValues: v, isMyAppsActive: y, onMyAppsChange: b, filterFromLabel: x, filterMyAppsLabel: S, filterTopicsLabel: C }) => {
|
|
3310
|
-
let w = a?.typography?.titleClassName ?? "dial-body-semi-text", T = a?.typography?.countClassName ?? "dial-tiny-semi-text", D =
|
|
3311
|
-
value:
|
|
3312
|
-
icon: /* @__PURE__ */
|
|
3313
|
-
size:
|
|
3310
|
+
let w = a?.typography?.titleClassName ?? "dial-body-semi-text", T = a?.typography?.countClassName ?? "dial-tiny-semi-text", D = M(() => [{
|
|
3311
|
+
value: Y.Grid,
|
|
3312
|
+
icon: /* @__PURE__ */ W(Ye, {
|
|
3313
|
+
size: L.SM,
|
|
3314
3314
|
"aria-hidden": !0,
|
|
3315
|
-
stroke:
|
|
3315
|
+
stroke: R
|
|
3316
3316
|
}),
|
|
3317
3317
|
"aria-label": l
|
|
3318
3318
|
}, {
|
|
3319
|
-
value:
|
|
3320
|
-
icon: /* @__PURE__ */
|
|
3321
|
-
size:
|
|
3319
|
+
value: Y.Cards,
|
|
3320
|
+
icon: /* @__PURE__ */ W(Xe, {
|
|
3321
|
+
size: L.SM,
|
|
3322
3322
|
"aria-hidden": !0,
|
|
3323
|
-
stroke:
|
|
3323
|
+
stroke: R
|
|
3324
3324
|
}),
|
|
3325
3325
|
"aria-label": u
|
|
3326
3326
|
}], [l, u]), O = (e) => {
|
|
3327
3327
|
s(e ?? "");
|
|
3328
|
-
},
|
|
3328
|
+
}, ee = p?.find((e) => e.value === f)?.label ?? h, te = M(() => (p ?? []).map((e) => ({
|
|
3329
3329
|
key: e.value,
|
|
3330
3330
|
label: e.label,
|
|
3331
|
-
mark:
|
|
3331
|
+
mark: Ce.Check,
|
|
3332
3332
|
checked: e.value === f,
|
|
3333
3333
|
onClick: () => m?.(e.value)
|
|
3334
3334
|
})), [
|
|
@@ -3336,11 +3336,11 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3336
3336
|
f,
|
|
3337
3337
|
m
|
|
3338
3338
|
]);
|
|
3339
|
-
return /* @__PURE__ */
|
|
3339
|
+
return /* @__PURE__ */ G("div", {
|
|
3340
3340
|
className: "flex flex-col gap-3",
|
|
3341
|
-
children: [/* @__PURE__ */
|
|
3341
|
+
children: [/* @__PURE__ */ G("div", {
|
|
3342
3342
|
className: "flex items-center gap-2",
|
|
3343
|
-
children: [i ?? /* @__PURE__ */
|
|
3343
|
+
children: [i ?? /* @__PURE__ */ W(E, {
|
|
3344
3344
|
title: r,
|
|
3345
3345
|
postfix: e,
|
|
3346
3346
|
titleClassName: w,
|
|
@@ -3351,34 +3351,34 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3351
3351
|
title: a?.colors?.titleText,
|
|
3352
3352
|
count: a?.colors?.countText
|
|
3353
3353
|
}
|
|
3354
|
-
}), /* @__PURE__ */
|
|
3354
|
+
}), /* @__PURE__ */ G("div", {
|
|
3355
3355
|
className: "ms-auto flex shrink-0 items-center gap-2",
|
|
3356
|
-
children: [/* @__PURE__ */
|
|
3356
|
+
children: [/* @__PURE__ */ W(Ae, {
|
|
3357
3357
|
"aria-label": d,
|
|
3358
3358
|
value: t,
|
|
3359
3359
|
onChange: n,
|
|
3360
3360
|
items: D
|
|
3361
|
-
}), p != null && p.length > 0 && /* @__PURE__ */
|
|
3362
|
-
items:
|
|
3363
|
-
label:
|
|
3364
|
-
variant:
|
|
3365
|
-
appearance:
|
|
3361
|
+
}), p != null && p.length > 0 && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", { className: k("h-4 w-px shrink-0", Br.divider) }), /* @__PURE__ */ W(ce, {
|
|
3362
|
+
items: te,
|
|
3363
|
+
label: ee,
|
|
3364
|
+
variant: le.Primary,
|
|
3365
|
+
appearance: F.Ghost
|
|
3366
3366
|
})] })]
|
|
3367
3367
|
})]
|
|
3368
|
-
}), /* @__PURE__ */
|
|
3368
|
+
}), /* @__PURE__ */ G("div", {
|
|
3369
3369
|
className: "mb-5 flex items-center gap-3",
|
|
3370
|
-
children: [/* @__PURE__ */
|
|
3370
|
+
children: [/* @__PURE__ */ W("div", {
|
|
3371
3371
|
role: "search",
|
|
3372
3372
|
className: "flex-1",
|
|
3373
|
-
children: /* @__PURE__ */
|
|
3373
|
+
children: /* @__PURE__ */ W(ke, {
|
|
3374
3374
|
value: o,
|
|
3375
3375
|
onChange: O,
|
|
3376
|
-
size:
|
|
3376
|
+
size: pe.Large,
|
|
3377
3377
|
wrapperClassName: "dial-kit-input-large",
|
|
3378
3378
|
placeholder: c,
|
|
3379
3379
|
"aria-label": c
|
|
3380
3380
|
})
|
|
3381
|
-
}), /* @__PURE__ */
|
|
3381
|
+
}), /* @__PURE__ */ W(zr, {
|
|
3382
3382
|
checked: g ?? /* @__PURE__ */ new Set(),
|
|
3383
3383
|
onChange: _ ?? (() => void 0),
|
|
3384
3384
|
values: v,
|
|
@@ -3393,10 +3393,10 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3393
3393
|
});
|
|
3394
3394
|
}, Hr = ({ query: e, onQueryChange: t, searchPlaceholder: n = "Search models, tools, agents…", styles: r, filters: i, onFiltersChange: a, filterValues: o, isMyAppsActive: s, onMyAppsChange: c, filterFromLabel: l, filterMyAppsLabel: u, filterTopicsLabel: d, gridViewLabel: f, listViewLabel: p, viewToggleLabel: m, sortKey: h, sortOptions: g, onSortChange: _, sortLabel: v, ...y }) => {
|
|
3395
3395
|
let b = { "--cat-browse-divider": r?.colors?.divider };
|
|
3396
|
-
return /* @__PURE__ */
|
|
3397
|
-
className:
|
|
3396
|
+
return /* @__PURE__ */ W("section", {
|
|
3397
|
+
className: k("flex-shrink-0 px-4", Br.section),
|
|
3398
3398
|
style: b,
|
|
3399
|
-
children: /* @__PURE__ */
|
|
3399
|
+
children: /* @__PURE__ */ W(Vr, {
|
|
3400
3400
|
styles: r,
|
|
3401
3401
|
query: e,
|
|
3402
3402
|
onQueryChange: t,
|
|
@@ -3424,25 +3424,25 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3424
3424
|
heading: "_heading_1h83l_5",
|
|
3425
3425
|
headingTitle: "_headingTitle_1h83l_9"
|
|
3426
3426
|
}, Wr = ({ label: e, options: t, onClick: n }) => {
|
|
3427
|
-
let r =
|
|
3428
|
-
return t?.length ? /* @__PURE__ */
|
|
3427
|
+
let r = N(null);
|
|
3428
|
+
return t?.length ? /* @__PURE__ */ W("div", {
|
|
3429
3429
|
ref: r,
|
|
3430
|
-
children: /* @__PURE__ */
|
|
3431
|
-
appearance:
|
|
3430
|
+
children: /* @__PURE__ */ W(ce, {
|
|
3431
|
+
appearance: F.Solid,
|
|
3432
3432
|
label: e,
|
|
3433
|
-
variant:
|
|
3433
|
+
variant: le.Primary,
|
|
3434
3434
|
items: t
|
|
3435
3435
|
})
|
|
3436
|
-
}) : /* @__PURE__ */
|
|
3436
|
+
}) : /* @__PURE__ */ W(Ee, {
|
|
3437
3437
|
label: e,
|
|
3438
|
-
iconBefore: /* @__PURE__ */
|
|
3439
|
-
size:
|
|
3440
|
-
stroke:
|
|
3438
|
+
iconBefore: /* @__PURE__ */ W(tt, {
|
|
3439
|
+
size: L.SM,
|
|
3440
|
+
stroke: R
|
|
3441
3441
|
}),
|
|
3442
3442
|
onClick: n
|
|
3443
3443
|
});
|
|
3444
|
-
}, Gr = 3, Kr = 300, qr = ({ items: e, tabs: n, topicOptions: a, favorites: o, titles: s, browseHeaderRenderer: c, onToggleFavorite: d, isFavoriteVisible: m, columnVisibility: g, onUseInChat: v, isPrimaryActionVisible: y, onShare: b, isPublishVisible: x, isPublishPrimary: S, getPublishHistory: C, publishFolderItems: w, publishExpandedPaths: T, onPublishExpandedPathsChange: E, publishLoadingPaths: D, hasPublishWriteAccess: O, publishDefaultAuthor:
|
|
3445
|
-
let { typography:
|
|
3444
|
+
}, Gr = 3, Kr = 300, qr = ({ items: e, tabs: n, topicOptions: a, favorites: o, titles: s, browseHeaderRenderer: c, onToggleFavorite: d, isFavoriteVisible: m, columnVisibility: g, onUseInChat: v, isPrimaryActionVisible: y, onShare: b, isPublishVisible: x, isPublishPrimary: S, getPublishHistory: C, publishFolderItems: w, publishExpandedPaths: T, onPublishExpandedPathsChange: E, publishLoadingPaths: D, hasPublishWriteAccess: O, publishDefaultAuthor: ee, onPublish: te, onPublishSuccess: ne, onPublishError: re, onCreatePublishFolder: ie, publishLabels: ae, ruleSourceOptions: oe, onFetchExistingRules: se, shareOverlay: F, isShareVisible: ce, isSharePrimary: le, onFetchDetails: I, onEdit: ue, onDownload: L, isDownloadVisible: R, isDownloadPrimary: de, onLoadContentFile: fe, onLoadContentFilePreview: pe, renderContentFilePreview: me, onDelete: he, onUnshare: ge, isUnshareVisible: _e, onRevokeShare: ve, onFetchRecipientsCount: ye, isRevokeShareVisible: be, onUnpublish: xe, isUnpublishVisible: z, onLogin: Se, onLogout: Ce, onCreateClick: we, createOptions: Te, hideCreateButton: Ee = !1, hidePageTitle: De = !1, isReadonly: Oe = !1, initialViewMode: ke = Y.Grid, isFullWidth: Ae = !1, selectedItemId: je, onCardClick: B, isLoading: Pe, styles: Fe, detailsTexts: V, detailsLimitsFooterNote: Ie, initialDetailsItemId: Le, sortKey: Re, onSortChange: ze, filterTopics: Be, onFilterTopicsChange: Ve, isMyAppsActive: He, onMyAppsActiveChange: Ue, activeTab: We, onActiveTabChange: Ge, renderEmptyState: Ke }) => {
|
|
3445
|
+
let { typography: qe } = Fe ?? {}, Je = bt(Fe), Ye = s?.pageTitle ?? "Catalog", Xe = s?.createLabel ?? "Create", Ze = s?.favoritesTitle ?? "Your favorites", Qe = s?.browseTitle ?? "Browse", $e = s?.searchPlaceholder ?? "Search models, tools, agents…", et = s?.noResultsTitle ?? ((e) => `No results for "${e}"`), tt = s?.featuredLabel ?? "Featured", nt = s?.gridViewLabel ?? "Grid view", rt = s?.listViewLabel ?? "List view", H = s?.viewToggleLabel ?? "View mode", it = s?.ariaLabel ?? "Catalog", at = s?.sortLabel ?? "Sort", ot = [
|
|
3446
3446
|
{
|
|
3447
3447
|
value: u.RecentlyUpdated,
|
|
3448
3448
|
label: s?.sortRecentlyUpdatedLabel ?? "Recently Updated"
|
|
@@ -3455,228 +3455,233 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3455
3455
|
value: u.NameAZ,
|
|
3456
3456
|
label: s?.sortNameAZLabel ?? "Name A-Z"
|
|
3457
3457
|
}
|
|
3458
|
-
], [
|
|
3458
|
+
], [st, ct] = P(""), [lt, ut] = P(ke), [dt, ft] = P(ke === Y.Cards), [pt, mt] = P(u.RecentlyUpdated), [ht, K] = P(/* @__PURE__ */ new Set()), [gt, q] = P(!1), J = Re ?? pt, _t = Be ?? ht, X = He ?? gt, vt = A((e) => {
|
|
3459
3459
|
let t = e;
|
|
3460
|
-
|
|
3461
|
-
}, [
|
|
3462
|
-
|
|
3463
|
-
}, [
|
|
3464
|
-
|
|
3465
|
-
}, [
|
|
3460
|
+
mt(t), ze?.(t);
|
|
3461
|
+
}, [ze]), yt = A((e) => {
|
|
3462
|
+
K(e), Ve?.(e);
|
|
3463
|
+
}, [Ve]), xt = A((e) => {
|
|
3464
|
+
q(e), Ue?.(e);
|
|
3465
|
+
}, [Ue]), Z = M(() => e.filter((e) => !e.isHidden), [e]), St = M(() => a ?? p(Z), [a, Z]), Ct = M(() => n ?? h(Z, s?.tabLabels), [
|
|
3466
3466
|
n,
|
|
3467
|
-
|
|
3467
|
+
Z,
|
|
3468
3468
|
s?.tabLabels
|
|
3469
|
-
]),
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
}, [
|
|
3473
|
-
let
|
|
3474
|
-
|
|
3475
|
-
}, [
|
|
3476
|
-
|
|
3477
|
-
o.length > 0 && !
|
|
3478
|
-
}, [o.length,
|
|
3479
|
-
let
|
|
3480
|
-
|
|
3481
|
-
}, []),
|
|
3482
|
-
if (
|
|
3483
|
-
|
|
3469
|
+
]), wt = Ct[0]?.id ?? "", [Tt, Et] = P(wt);
|
|
3470
|
+
j(() => {
|
|
3471
|
+
Et((e) => e || wt);
|
|
3472
|
+
}, [wt]);
|
|
3473
|
+
let Dt = We ?? Tt, Ot = A((e) => {
|
|
3474
|
+
Et(e), Ge?.(e);
|
|
3475
|
+
}, [Ge]), [kt, At] = P(o.length > 0);
|
|
3476
|
+
j(() => {
|
|
3477
|
+
o.length > 0 && !kt && At(!0);
|
|
3478
|
+
}, [o.length, kt]);
|
|
3479
|
+
let jt = A(() => {
|
|
3480
|
+
At(!1);
|
|
3481
|
+
}, []), Mt = kt && o.length === 0, [Q, Nt] = P(null), [Pt, Ft] = P(!1), [$, It] = P(void 0), [Lt, Rt] = P(!1), zt = N(null), Bt = A(async (e) => {
|
|
3482
|
+
if (zt.current = e.id, I) {
|
|
3483
|
+
Rt(!0);
|
|
3484
3484
|
try {
|
|
3485
|
-
let t = await
|
|
3486
|
-
return
|
|
3485
|
+
let t = await I(e);
|
|
3486
|
+
return zt.current === e.id && It(t), t;
|
|
3487
3487
|
} finally {
|
|
3488
|
-
|
|
3488
|
+
zt.current === e.id && Rt(!1);
|
|
3489
3489
|
}
|
|
3490
3490
|
}
|
|
3491
|
-
}, [
|
|
3491
|
+
}, [I]), Vt = A(async (e) => (Nt(e), It(void 0), Bt(e)), [Bt]), Ut = A(async (e, t) => {
|
|
3492
3492
|
for (let n = 0; n < Gr; n++) {
|
|
3493
|
-
if (
|
|
3493
|
+
if (zt.current !== e.id || t(await Bt(e))) return;
|
|
3494
3494
|
n < Gr - 1 && await f(Kr);
|
|
3495
3495
|
}
|
|
3496
|
-
}, [
|
|
3497
|
-
|
|
3498
|
-
if (!
|
|
3499
|
-
|
|
3496
|
+
}, [Bt]), Wt = N(null);
|
|
3497
|
+
j(() => {
|
|
3498
|
+
if (!Le) {
|
|
3499
|
+
Wt.current = null;
|
|
3500
3500
|
return;
|
|
3501
3501
|
}
|
|
3502
|
-
if (
|
|
3503
|
-
let t = e.find((e) => e.id ===
|
|
3504
|
-
t && (
|
|
3502
|
+
if (Wt.current === Le) return;
|
|
3503
|
+
let t = e.find((e) => e.id === Le);
|
|
3504
|
+
t && (Wt.current = Le, Vt(t));
|
|
3505
3505
|
}, [
|
|
3506
|
-
|
|
3506
|
+
Le,
|
|
3507
3507
|
e,
|
|
3508
|
-
|
|
3509
|
-
]),
|
|
3510
|
-
if (
|
|
3511
|
-
let t = e.find((e) => e.id ===
|
|
3512
|
-
t && t !==
|
|
3513
|
-
}, [e,
|
|
3514
|
-
let
|
|
3515
|
-
await
|
|
3516
|
-
}, [
|
|
3517
|
-
xe,
|
|
3518
|
-
L,
|
|
3519
|
-
Bt
|
|
3520
|
-
]), Wt = j(async (e, n) => {
|
|
3521
|
-
await Se?.(e, n), L && await Bt(e, (e) => !t(e?.credentials, n.level));
|
|
3508
|
+
Vt
|
|
3509
|
+
]), j(() => {
|
|
3510
|
+
if (Q == null) return;
|
|
3511
|
+
let t = e.find((e) => e.id === Q.id);
|
|
3512
|
+
t && t !== Q && Nt(t);
|
|
3513
|
+
}, [e, Q]);
|
|
3514
|
+
let Gt = A(async (e, n) => {
|
|
3515
|
+
await Se?.(e, n), I && await Ut(e, (e) => t(e?.credentials, n.level));
|
|
3522
3516
|
}, [
|
|
3523
3517
|
Se,
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
]),
|
|
3527
|
-
|
|
3528
|
-
|
|
3518
|
+
I,
|
|
3519
|
+
Ut
|
|
3520
|
+
]), Kt = A(async (e, n) => {
|
|
3521
|
+
await Ce?.(e, n), I && await Ut(e, (e) => !t(e?.credentials, n.level));
|
|
3522
|
+
}, [
|
|
3523
|
+
Ce,
|
|
3524
|
+
I,
|
|
3525
|
+
Ut
|
|
3526
|
+
]), qt = A(() => {
|
|
3527
|
+
Ft(!1), zt.current = null, setTimeout(() => {
|
|
3528
|
+
Nt(null), It(void 0), Rt(!1);
|
|
3529
3529
|
}, 300);
|
|
3530
|
-
}, []),
|
|
3531
|
-
if (
|
|
3532
|
-
if (
|
|
3533
|
-
let { credentials: e, ...t } =
|
|
3530
|
+
}, []), Jt = M(() => {
|
|
3531
|
+
if (Q == null) return null;
|
|
3532
|
+
if ($ == null) return Q;
|
|
3533
|
+
let { credentials: e, ...t } = $;
|
|
3534
3534
|
return {
|
|
3535
|
-
...
|
|
3535
|
+
...Q,
|
|
3536
3536
|
details: t,
|
|
3537
|
-
credentials: e ??
|
|
3537
|
+
credentials: e ?? Q.credentials
|
|
3538
3538
|
};
|
|
3539
|
-
}, [
|
|
3540
|
-
|
|
3541
|
-
if (
|
|
3542
|
-
let e = requestAnimationFrame(() =>
|
|
3539
|
+
}, [Q, $]), Yt = M(() => r(Z, J), [Z, J]), Xt = M(() => i(Yt, st), [Yt, st]), Zt = M(() => _t.size > 0 ? _(Xt, _t) : Xt, [Xt, _t]), Qt = M(() => X ? l(Zt) : Zt, [Zt, X]), $t = M(() => Dt ? Qt.filter((e) => e.type === Dt) : Qt, [Qt, Dt]), en = Q != null && o.some((e) => e.id === Q.id);
|
|
3540
|
+
j(() => {
|
|
3541
|
+
if (Q == null) return;
|
|
3542
|
+
let e = requestAnimationFrame(() => Ft(!0));
|
|
3543
3543
|
return () => cancelAnimationFrame(e);
|
|
3544
|
-
}, [
|
|
3545
|
-
let
|
|
3546
|
-
e ===
|
|
3547
|
-
}, []),
|
|
3548
|
-
noResultsTitle:
|
|
3549
|
-
featuredLabel:
|
|
3550
|
-
credentialsBadgeLoggedOutLabel:
|
|
3544
|
+
}, [Q]);
|
|
3545
|
+
let tn = A((e) => {
|
|
3546
|
+
e === Y.Cards && ft(!0), ut(e);
|
|
3547
|
+
}, []), nn = !Ee && !Oe, rn = kt && !Oe, an = st ? et(st) : "No items", on = M(() => ({
|
|
3548
|
+
noResultsTitle: an,
|
|
3549
|
+
featuredLabel: tt,
|
|
3550
|
+
credentialsBadgeLoggedOutLabel: V?.credentialsBadgeLoggedOutLabel
|
|
3551
3551
|
}), [
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
])
|
|
3556
|
-
|
|
3552
|
+
an,
|
|
3553
|
+
tt,
|
|
3554
|
+
V?.credentialsBadgeLoggedOutLabel
|
|
3555
|
+
]), sn = !Pe && $t.length === 0 ? Ke?.({
|
|
3556
|
+
query: st,
|
|
3557
|
+
activeTab: Dt,
|
|
3558
|
+
hasTopicFilters: _t.size > 0,
|
|
3559
|
+
isMyAppsActive: X
|
|
3560
|
+
}) : void 0;
|
|
3561
|
+
return Pe ? /* @__PURE__ */ W("div", {
|
|
3557
3562
|
className: "flex size-full min-h-0 flex-1 items-center justify-center",
|
|
3558
|
-
children: /* @__PURE__ */
|
|
3559
|
-
}) : /* @__PURE__ */
|
|
3560
|
-
"aria-label":
|
|
3561
|
-
className:
|
|
3562
|
-
style:
|
|
3563
|
+
children: /* @__PURE__ */ W(Me, {})
|
|
3564
|
+
}) : /* @__PURE__ */ G("section", {
|
|
3565
|
+
"aria-label": it,
|
|
3566
|
+
className: k("flex size-full min-h-0 flex-1 flex-col", Ur.root),
|
|
3567
|
+
style: Je,
|
|
3563
3568
|
children: [
|
|
3564
|
-
(!
|
|
3565
|
-
className:
|
|
3566
|
-
children: /* @__PURE__ */
|
|
3569
|
+
(!De || nn) && /* @__PURE__ */ W("div", {
|
|
3570
|
+
className: k("shrink-0", Ur.heading),
|
|
3571
|
+
children: /* @__PURE__ */ G("div", {
|
|
3567
3572
|
className: "flex h-[64px] w-full items-center justify-between px-8",
|
|
3568
|
-
children: [!
|
|
3569
|
-
className:
|
|
3570
|
-
children:
|
|
3571
|
-
}),
|
|
3572
|
-
label:
|
|
3573
|
-
options:
|
|
3574
|
-
onClick:
|
|
3573
|
+
children: [!De && /* @__PURE__ */ W("h1", {
|
|
3574
|
+
className: k(qe?.pageHeadingFontClassName ?? "dial-display2-text", Ur.headingTitle),
|
|
3575
|
+
children: Ye
|
|
3576
|
+
}), nn && /* @__PURE__ */ W(Wr, {
|
|
3577
|
+
label: Xe,
|
|
3578
|
+
options: Te,
|
|
3579
|
+
onClick: we
|
|
3575
3580
|
})]
|
|
3576
3581
|
})
|
|
3577
3582
|
}),
|
|
3578
|
-
/* @__PURE__ */
|
|
3583
|
+
/* @__PURE__ */ G("div", {
|
|
3579
3584
|
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden",
|
|
3580
3585
|
children: [
|
|
3581
|
-
|
|
3586
|
+
rn && /* @__PURE__ */ W("div", {
|
|
3582
3587
|
className: "w-full px-8",
|
|
3583
|
-
children: /* @__PURE__ */
|
|
3588
|
+
children: /* @__PURE__ */ W(Cr, {
|
|
3584
3589
|
items: o,
|
|
3585
3590
|
totalCount: o.length,
|
|
3586
|
-
title:
|
|
3591
|
+
title: Ze,
|
|
3587
3592
|
onToggleFavorite: d,
|
|
3588
3593
|
isFavoriteVisible: m,
|
|
3589
|
-
onItemClick:
|
|
3590
|
-
isLeaving:
|
|
3591
|
-
onExitComplete:
|
|
3592
|
-
selectedItemId:
|
|
3593
|
-
credentialsBadgeLoggedOutLabel:
|
|
3594
|
+
onItemClick: B ?? Vt,
|
|
3595
|
+
isLeaving: Mt,
|
|
3596
|
+
onExitComplete: jt,
|
|
3597
|
+
selectedItemId: je,
|
|
3598
|
+
credentialsBadgeLoggedOutLabel: V?.credentialsBadgeLoggedOutLabel
|
|
3594
3599
|
})
|
|
3595
3600
|
}),
|
|
3596
|
-
/* @__PURE__ */
|
|
3601
|
+
/* @__PURE__ */ W("div", {
|
|
3597
3602
|
className: "w-full px-4 pt-6",
|
|
3598
|
-
children: /* @__PURE__ */
|
|
3599
|
-
totalCount:
|
|
3600
|
-
viewMode:
|
|
3601
|
-
onViewModeChange:
|
|
3602
|
-
sortKey:
|
|
3603
|
-
query:
|
|
3604
|
-
onQueryChange:
|
|
3605
|
-
title:
|
|
3603
|
+
children: /* @__PURE__ */ W(Hr, {
|
|
3604
|
+
totalCount: Qt.length,
|
|
3605
|
+
viewMode: lt,
|
|
3606
|
+
onViewModeChange: tn,
|
|
3607
|
+
sortKey: J,
|
|
3608
|
+
query: st,
|
|
3609
|
+
onQueryChange: ct,
|
|
3610
|
+
title: Qe,
|
|
3606
3611
|
browseHeaderRenderer: c,
|
|
3607
|
-
searchPlaceholder:
|
|
3608
|
-
gridViewLabel:
|
|
3609
|
-
listViewLabel:
|
|
3610
|
-
viewToggleLabel:
|
|
3611
|
-
sortOptions:
|
|
3612
|
-
onSortChange:
|
|
3613
|
-
sortLabel:
|
|
3614
|
-
filters:
|
|
3615
|
-
onFiltersChange:
|
|
3616
|
-
filterValues:
|
|
3612
|
+
searchPlaceholder: $e,
|
|
3613
|
+
gridViewLabel: nt,
|
|
3614
|
+
listViewLabel: rt,
|
|
3615
|
+
viewToggleLabel: H,
|
|
3616
|
+
sortOptions: ot,
|
|
3617
|
+
onSortChange: vt,
|
|
3618
|
+
sortLabel: at,
|
|
3619
|
+
filters: _t,
|
|
3620
|
+
onFiltersChange: yt,
|
|
3621
|
+
filterValues: St,
|
|
3617
3622
|
isMyAppsActive: X,
|
|
3618
|
-
onMyAppsChange:
|
|
3623
|
+
onMyAppsChange: xt,
|
|
3619
3624
|
filterFromLabel: s?.filterFromLabel,
|
|
3620
3625
|
filterMyAppsLabel: s?.filterMyAppsLabel,
|
|
3621
3626
|
filterTopicsLabel: s?.filterTopicsLabel
|
|
3622
3627
|
})
|
|
3623
3628
|
}),
|
|
3624
|
-
|
|
3629
|
+
Ct.length > 1 && /* @__PURE__ */ W("div", {
|
|
3625
3630
|
className: "min-w-0 shrink-0 overflow-x-auto px-8",
|
|
3626
|
-
children: /* @__PURE__ */
|
|
3627
|
-
tabs:
|
|
3631
|
+
children: /* @__PURE__ */ W(Ne, {
|
|
3632
|
+
tabs: Ct.map((e) => ({
|
|
3628
3633
|
id: e.id,
|
|
3629
3634
|
label: typeof e.label == "string" ? e.label : String(e.label),
|
|
3630
|
-
count:
|
|
3635
|
+
count: Qt.filter((t) => t.type === e.id).length
|
|
3631
3636
|
})),
|
|
3632
|
-
activeTabId:
|
|
3633
|
-
onTabChange:
|
|
3637
|
+
activeTabId: Dt,
|
|
3638
|
+
onTabChange: Ot
|
|
3634
3639
|
})
|
|
3635
3640
|
}),
|
|
3636
|
-
/* @__PURE__ */
|
|
3637
|
-
className:
|
|
3638
|
-
children: [/* @__PURE__ */
|
|
3639
|
-
className:
|
|
3640
|
-
children: /* @__PURE__ */
|
|
3641
|
-
items:
|
|
3642
|
-
query:
|
|
3641
|
+
/* @__PURE__ */ W("div", {
|
|
3642
|
+
className: k($t.length > 0 ? ["min-h-full w-full px-8 py-6", !Ae && "mx-auto max-w-[1180px]"] : "min-h-[180px] flex-1", $t.length === 0 && "px-8 py-6"),
|
|
3643
|
+
children: sn ?? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
|
|
3644
|
+
className: k($t.length > 0 ? "pb-8" : "size-full flex-1", lt !== Y.Grid && "hidden"),
|
|
3645
|
+
children: /* @__PURE__ */ W(Ht, {
|
|
3646
|
+
items: $t,
|
|
3647
|
+
query: st,
|
|
3643
3648
|
onToggleFavorite: d,
|
|
3644
3649
|
isFavoriteVisible: m,
|
|
3645
|
-
onItemClick:
|
|
3646
|
-
titles:
|
|
3647
|
-
selectedItemId:
|
|
3648
|
-
isReadonly:
|
|
3649
|
-
isFullWidth:
|
|
3650
|
-
featuredChipStyle:
|
|
3650
|
+
onItemClick: B ?? Vt,
|
|
3651
|
+
titles: on,
|
|
3652
|
+
selectedItemId: je,
|
|
3653
|
+
isReadonly: Oe,
|
|
3654
|
+
isFullWidth: Ae,
|
|
3655
|
+
featuredChipStyle: Fe?.colors?.featuredChipStyle
|
|
3651
3656
|
})
|
|
3652
|
-
}),
|
|
3653
|
-
className:
|
|
3654
|
-
children: /* @__PURE__ */
|
|
3655
|
-
type:
|
|
3656
|
-
items:
|
|
3657
|
-
query:
|
|
3658
|
-
ariaLabel:
|
|
3659
|
-
emptyStateTitle:
|
|
3657
|
+
}), dt && /* @__PURE__ */ W("div", {
|
|
3658
|
+
className: k("pb-8", lt !== Y.Cards && "hidden", $t.length === 0 && "h-full"),
|
|
3659
|
+
children: /* @__PURE__ */ W(Fr, {
|
|
3660
|
+
type: Dt,
|
|
3661
|
+
items: $t,
|
|
3662
|
+
query: st,
|
|
3663
|
+
ariaLabel: it,
|
|
3664
|
+
emptyStateTitle: an,
|
|
3660
3665
|
onToggleFavorite: d,
|
|
3661
3666
|
isFavoriteVisible: m,
|
|
3662
3667
|
columnVisibility: g,
|
|
3663
|
-
onItemClick:
|
|
3668
|
+
onItemClick: B ?? Vt,
|
|
3664
3669
|
stickyHeaderTop: 0,
|
|
3665
|
-
selectedItemId:
|
|
3666
|
-
credentialsBadgeLoggedOutLabel:
|
|
3667
|
-
isReadonly:
|
|
3670
|
+
selectedItemId: je,
|
|
3671
|
+
credentialsBadgeLoggedOutLabel: V?.credentialsBadgeLoggedOutLabel,
|
|
3672
|
+
isReadonly: Oe
|
|
3668
3673
|
})
|
|
3669
|
-
})]
|
|
3674
|
+
})] })
|
|
3670
3675
|
})
|
|
3671
3676
|
]
|
|
3672
3677
|
}),
|
|
3673
|
-
|
|
3674
|
-
item:
|
|
3675
|
-
isOpen:
|
|
3676
|
-
isStarred:
|
|
3677
|
-
isDetailsLoading:
|
|
3678
|
-
isReadonly:
|
|
3679
|
-
onClose:
|
|
3678
|
+
Jt != null && /* @__PURE__ */ W(vr, {
|
|
3679
|
+
item: Jt,
|
|
3680
|
+
isOpen: Pt,
|
|
3681
|
+
isStarred: en,
|
|
3682
|
+
isDetailsLoading: Lt,
|
|
3683
|
+
isReadonly: Oe,
|
|
3684
|
+
onClose: qt,
|
|
3680
3685
|
onToggleFavorite: d,
|
|
3681
3686
|
isFavoriteVisible: m,
|
|
3682
3687
|
onUseInChat: v,
|
|
@@ -3690,40 +3695,40 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3690
3695
|
onPublishExpandedPathsChange: E,
|
|
3691
3696
|
publishLoadingPaths: D,
|
|
3692
3697
|
hasPublishWriteAccess: O,
|
|
3693
|
-
publishDefaultAuthor:
|
|
3694
|
-
onPublish:
|
|
3695
|
-
onPublishSuccess:
|
|
3696
|
-
onPublishError:
|
|
3697
|
-
onCreatePublishFolder:
|
|
3698
|
-
publishLabels:
|
|
3699
|
-
ruleSourceOptions:
|
|
3700
|
-
onFetchExistingRules:
|
|
3701
|
-
shareOverlay:
|
|
3702
|
-
isShareVisible:
|
|
3703
|
-
isSharePrimary:
|
|
3704
|
-
onEdit:
|
|
3705
|
-
onDownload:
|
|
3706
|
-
isDownloadVisible:
|
|
3707
|
-
isDownloadPrimary:
|
|
3708
|
-
onLoadContentFile:
|
|
3709
|
-
onLoadContentFilePreview:
|
|
3710
|
-
renderContentFilePreview:
|
|
3711
|
-
onDelete:
|
|
3712
|
-
onUnshare:
|
|
3713
|
-
isUnshareVisible:
|
|
3714
|
-
onRevokeShare:
|
|
3715
|
-
onFetchRecipientsCount:
|
|
3716
|
-
isRevokeShareVisible:
|
|
3717
|
-
onUnpublish:
|
|
3718
|
-
isUnpublishVisible:
|
|
3719
|
-
onLogin:
|
|
3720
|
-
onLogout:
|
|
3721
|
-
texts:
|
|
3722
|
-
limitsFooterNote:
|
|
3723
|
-
styles: { colors: { featuredChipStyle:
|
|
3698
|
+
publishDefaultAuthor: ee,
|
|
3699
|
+
onPublish: te,
|
|
3700
|
+
onPublishSuccess: ne,
|
|
3701
|
+
onPublishError: re,
|
|
3702
|
+
onCreatePublishFolder: ie,
|
|
3703
|
+
publishLabels: ae,
|
|
3704
|
+
ruleSourceOptions: oe,
|
|
3705
|
+
onFetchExistingRules: se,
|
|
3706
|
+
shareOverlay: F,
|
|
3707
|
+
isShareVisible: ce,
|
|
3708
|
+
isSharePrimary: le,
|
|
3709
|
+
onEdit: ue,
|
|
3710
|
+
onDownload: L,
|
|
3711
|
+
isDownloadVisible: R,
|
|
3712
|
+
isDownloadPrimary: de,
|
|
3713
|
+
onLoadContentFile: fe,
|
|
3714
|
+
onLoadContentFilePreview: pe,
|
|
3715
|
+
renderContentFilePreview: me,
|
|
3716
|
+
onDelete: he,
|
|
3717
|
+
onUnshare: ge,
|
|
3718
|
+
isUnshareVisible: _e,
|
|
3719
|
+
onRevokeShare: ve,
|
|
3720
|
+
onFetchRecipientsCount: ye,
|
|
3721
|
+
isRevokeShareVisible: be,
|
|
3722
|
+
onUnpublish: xe,
|
|
3723
|
+
isUnpublishVisible: z,
|
|
3724
|
+
onLogin: Gt,
|
|
3725
|
+
onLogout: Kt,
|
|
3726
|
+
texts: V,
|
|
3727
|
+
limitsFooterNote: Ie,
|
|
3728
|
+
styles: { colors: { featuredChipStyle: Fe?.colors?.featuredChipStyle } }
|
|
3724
3729
|
})
|
|
3725
3730
|
]
|
|
3726
3731
|
});
|
|
3727
3732
|
};
|
|
3728
3733
|
//#endregion
|
|
3729
|
-
export {
|
|
3734
|
+
export { At as AppIdentity, Bt as Card, Ht as CardGrid, Vt as CardRowRenderer, qr as Catalog, X as CatalogContentNodeType, vt as CatalogContentPreviewType, K as CatalogDetailsTab, gt as CatalogLimitStatus, u as CatalogSortKey, Y as CatalogViewMode, ht as CodeLanguage, zn as ContentTab, s as CredentialStatus, Mt as CredentialsBadge, o as CredentialsBadgeState, v as CredentialsLevel, y as CredentialsUiState, _t as DeploymentSize, q as DetailsConfirmationKind, J as DetailsConfirmationVariant, vr as DetailsPanel, br as FavoriteCard, Cr as Favorites, zr as Filter, rn as InfoCard, Fr as ListView, Hr as Toolbar, n as ToolsetAuthenticationType, $ as TopicTag, h as buildCatalogTabs, i as filterCatalogItems, g as getCredentialsBadgeState, m as getCredentialsUiState, c as getSignedInLevel, p as getTopicOptions, r as sortCatalogItems, yt as useFavColumns, Dt as useScrollVirtualizer };
|