@epam/ai-dial-catalog 1.2.0-dev.3 → 1.2.0-dev.38
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 +1233 -1214
- package/{mapping-FVCFAmAc.js → mapping-DtxJk1HM.js} +4 -4
- package/mapping.js +2 -2
- package/models/catalog-props.d.ts +23 -0
- package/models/catalog-props.d.ts.map +1 -1
- package/package.json +3 -3
- package/utils/toolset-credentials.d.ts +4 -0
- package/utils/toolset-credentials.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { _ as e, a as t,
|
|
2
|
-
import { CatalogEntityType as
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { ButtonAppearance as
|
|
5
|
-
import { IconAlertTriangleFilled as
|
|
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 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
6
|
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
7
|
-
import { PublishFooter as
|
|
8
|
-
import { Grid as
|
|
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
|
+
}({}), Y = /* @__PURE__ */ function(e) {
|
|
21
21
|
return e.SM = "sm", e.LG = "lg", e;
|
|
22
|
-
}({}),
|
|
22
|
+
}({}), X = /* @__PURE__ */ function(e) {
|
|
23
23
|
return e.Grid = "grid", e.Cards = "cards", e;
|
|
24
|
-
}({}),
|
|
24
|
+
}({}), Z = /* @__PURE__ */ function(e) {
|
|
25
25
|
return e.File = "file", e.Folder = "folder", e;
|
|
26
26
|
}({}), _t = /* @__PURE__ */ function(e) {
|
|
27
27
|
return e.Markdown = "markdown", e.Text = "text", e.Image = "image", e.Unsupported = "unsupported", e;
|
|
28
|
-
}({}),
|
|
28
|
+
}({}), vt = () => {
|
|
29
29
|
let [e, t] = P(() => window.innerWidth);
|
|
30
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
|
+
}, yt = (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
|
+
}, bt = 1180, Q = (e) => e >= 1280 ? 4 : e >= 966 ? 3 : e >= 620 ? 2 : 1, xt = (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
|
-
},
|
|
43
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : xt(e.parentElement);
|
|
44
|
+
}, St = 10, Ct = 10, wt = 30, Tt = (e, t, n = St) => {
|
|
45
45
|
let r = N(null), [i, a] = P({
|
|
46
46
|
start: 0,
|
|
47
|
-
end:
|
|
47
|
+
end: wt
|
|
48
48
|
});
|
|
49
49
|
j(() => {
|
|
50
50
|
let i = r.current;
|
|
51
51
|
if (!i) return;
|
|
52
|
-
let o =
|
|
52
|
+
let o = xt(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) / Ct) * Ct), p = Math.min(e, Math.ceil((u + d + n) / Ct) * Ct);
|
|
56
56
|
a((e) => e.start === f && e.end === p ? e : {
|
|
57
57
|
start: f,
|
|
58
58
|
end: p
|
|
@@ -68,15 +68,15 @@ 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) / Ct) * Ct), 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 + Ct))
|
|
76
76
|
};
|
|
77
|
-
},
|
|
77
|
+
}, Et = (e, { overscan: t = 3, isFullWidth: n = !1 } = {}) => {
|
|
78
78
|
let r = N(null), [i, a] = P(() => {
|
|
79
|
-
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >=
|
|
79
|
+
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= x ? 60 : 0)), i = Q((n ? r : Math.min(bt, r)) - 64), a = Math.ceil(e / i);
|
|
80
80
|
return {
|
|
81
81
|
startRow: 0,
|
|
82
82
|
endRow: Math.min(a, 12),
|
|
@@ -86,8 +86,8 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
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 = xt(n.parentElement), o = () => {
|
|
90
|
+
let r = n.getBoundingClientRect(), o = i.getBoundingClientRect(), s = i.clientHeight, c = n.clientWidth, l = Q(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
|
+
}, Dt = {
|
|
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,12 +119,12 @@ 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
|
+
}, Ot = {
|
|
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
|
+
}, kt = ({ 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 === Y.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
|
|
@@ -136,7 +136,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
136
136
|
className: k("relative flex-shrink-0", h, u),
|
|
137
137
|
children: [/* @__PURE__ */ W("div", {
|
|
138
138
|
className: "size-full overflow-hidden rounded-[inherit]",
|
|
139
|
-
children: /* @__PURE__ */ W(
|
|
139
|
+
children: /* @__PURE__ */ W(S, {
|
|
140
140
|
src: e ?? void 0,
|
|
141
141
|
size: g,
|
|
142
142
|
initialsName: n,
|
|
@@ -145,79 +145,79 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
145
145
|
}), d]
|
|
146
146
|
}), /* @__PURE__ */ G("div", {
|
|
147
147
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
148
|
-
children: [/* @__PURE__ */ W(
|
|
148
|
+
children: [/* @__PURE__ */ W(w, {
|
|
149
149
|
type: t,
|
|
150
150
|
className: p?.typeClassName
|
|
151
151
|
}), /* @__PURE__ */ G("div", {
|
|
152
152
|
className: "flex min-w-0 flex-col",
|
|
153
153
|
children: [/* @__PURE__ */ G("div", {
|
|
154
154
|
className: "flex min-w-0 items-start gap-1 overflow-hidden",
|
|
155
|
-
children: [/* @__PURE__ */ W(
|
|
156
|
-
text: o ? /* @__PURE__ */ W(
|
|
155
|
+
children: [/* @__PURE__ */ W(me, {
|
|
156
|
+
text: o ? /* @__PURE__ */ W(ve, {
|
|
157
157
|
text: n,
|
|
158
158
|
query: o
|
|
159
159
|
}) : n,
|
|
160
|
-
className: k("min-w-0 flex-1", p?.nameClassName ?? "dial-body-semi-text",
|
|
161
|
-
}), r && /* @__PURE__ */ W(
|
|
160
|
+
className: k("min-w-0 flex-1", p?.nameClassName ?? "dial-body-semi-text", Ot.name)
|
|
161
|
+
}), r && /* @__PURE__ */ W(me, {
|
|
162
162
|
text: r,
|
|
163
|
-
className: k("max-w-[30%] shrink-0 tabular-nums", p?.versionClassName ?? "dial-tiny-text",
|
|
163
|
+
className: k("max-w-[30%] shrink-0 tabular-nums", p?.versionClassName ?? "dial-tiny-text", Ot.version)
|
|
164
164
|
})]
|
|
165
165
|
}), m && i != null && /* @__PURE__ */ G("div", {
|
|
166
166
|
className: "flex items-center gap-2",
|
|
167
167
|
children: [/* @__PURE__ */ W("span", {
|
|
168
|
-
className: k("tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text",
|
|
168
|
+
className: k("tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text", Ot.lastUsed),
|
|
169
169
|
children: i
|
|
170
170
|
}), l]
|
|
171
171
|
})]
|
|
172
172
|
})]
|
|
173
173
|
})]
|
|
174
174
|
});
|
|
175
|
-
},
|
|
175
|
+
}, At = { icon: "_icon_a0p4u_1" }, jt = ({ 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
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
185
|
className: k("absolute -bottom-1 -end-1 shrink-0", n),
|
|
186
|
-
children: /* @__PURE__ */ W(
|
|
187
|
-
size:
|
|
188
|
-
className:
|
|
186
|
+
children: /* @__PURE__ */ W(Ie, {
|
|
187
|
+
size: L.SM,
|
|
188
|
+
className: At.icon,
|
|
189
189
|
"aria-hidden": !0
|
|
190
190
|
})
|
|
191
191
|
})
|
|
192
|
-
}),
|
|
192
|
+
}), Mt = {
|
|
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__ */ W(
|
|
200
|
-
size:
|
|
201
|
-
className:
|
|
202
|
-
}) : /* @__PURE__ */ W(
|
|
203
|
-
size:
|
|
204
|
-
stroke:
|
|
199
|
+
icon: e ? /* @__PURE__ */ W(H, {
|
|
200
|
+
size: L.SM,
|
|
201
|
+
className: Mt.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: k("flex h-6 w-fit items-center justify-center whitespace-nowrap rounded-md border px-2",
|
|
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
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;
|
|
@@ -229,16 +229,16 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
229
229
|
let u = o.current?.offsetWidth ?? 0, d = 0, f = 0;
|
|
230
230
|
for (let t = 0; t < e.length; t++) {
|
|
231
231
|
let r = e.length - (t + 1) > 0;
|
|
232
|
-
if (d + (t > 0 ?
|
|
233
|
-
d += (t > 0 ?
|
|
232
|
+
if (d + (t > 0 ? It : 0) + c[t] + (r ? It + u : 0) > n) break;
|
|
233
|
+
d += (t > 0 ? It : 0) + c[t], f = t + 1;
|
|
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
244
|
}, [c]), j(() => {
|
|
@@ -261,39 +261,39 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
261
261
|
ref: (e) => {
|
|
262
262
|
i.current[t] = e;
|
|
263
263
|
},
|
|
264
|
-
children: /* @__PURE__ */ W(
|
|
264
|
+
children: /* @__PURE__ */ W($, { label: e })
|
|
265
265
|
}, e)),
|
|
266
|
-
f > 0 && /* @__PURE__ */ W(
|
|
266
|
+
f > 0 && /* @__PURE__ */ W(Fe, {
|
|
267
267
|
tooltip: e.slice(c).join(", "),
|
|
268
268
|
children: /* @__PURE__ */ W("span", {
|
|
269
269
|
"aria-label": t?.(f) ?? `and ${f} more topics`,
|
|
270
|
-
children: /* @__PURE__ */ W(
|
|
270
|
+
children: /* @__PURE__ */ W($, { label: `+${f}` })
|
|
271
271
|
})
|
|
272
272
|
}),
|
|
273
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__ */ W(
|
|
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
282
|
let [m, h] = P(r);
|
|
283
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,
|
|
290
290
|
"--cg-check-icon": d?.colors?.checkIcon,
|
|
291
291
|
"--cg-footer-border": d?.colors?.footerBorder
|
|
292
|
-
}), x = !p && e.isFeatured === !0, S = !p && a?.(e) !== !1,
|
|
293
|
-
|
|
294
|
-
} : void 0,
|
|
295
|
-
!n ||
|
|
296
|
-
}, [n, e]),
|
|
292
|
+
}), x = !p && e.isFeatured === !0, S = !p && a?.(e) !== !1, C = !p || e.folder.length > 0, w = n ? (t) => {
|
|
293
|
+
zt(t) || n(e);
|
|
294
|
+
} : void 0, E = A((t) => {
|
|
295
|
+
!n || zt(t) || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e));
|
|
296
|
+
}, [n, e]), D = A((t) => {
|
|
297
297
|
t.stopPropagation();
|
|
298
298
|
let n = !m;
|
|
299
299
|
h(n), i?.(e.id, n);
|
|
@@ -302,48 +302,48 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
302
302
|
i,
|
|
303
303
|
e.id
|
|
304
304
|
]);
|
|
305
|
-
return /* @__PURE__ */ G(
|
|
305
|
+
return /* @__PURE__ */ G(I, {
|
|
306
306
|
...n ? {
|
|
307
307
|
role: "button",
|
|
308
308
|
tabIndex: 0,
|
|
309
|
-
onClick:
|
|
310
|
-
onKeyDown:
|
|
309
|
+
onClick: w,
|
|
310
|
+
onKeyDown: E
|
|
311
311
|
} : {},
|
|
312
312
|
"aria-label": e.name,
|
|
313
313
|
style: b,
|
|
314
|
-
className: k("box-border cursor-pointer gap-3",
|
|
314
|
+
className: k("box-border cursor-pointer gap-3", Dt.card, x ? Dt.featuredCard : void 0, l ? Dt.selectedCard : void 0, u),
|
|
315
315
|
children: [
|
|
316
316
|
x && /* @__PURE__ */ W("div", {
|
|
317
317
|
className: "absolute end-[22px] top-0 -translate-y-1/2",
|
|
318
|
-
children: /* @__PURE__ */ W(
|
|
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__ */ W(
|
|
326
|
-
size:
|
|
327
|
-
className: k("absolute end-3 top-3 shrink-0",
|
|
325
|
+
l && /* @__PURE__ */ W(ze, {
|
|
326
|
+
size: L.SM,
|
|
327
|
+
className: k("absolute end-3 top-3 shrink-0", Dt.checkIcon),
|
|
328
328
|
"aria-hidden": !0,
|
|
329
|
-
stroke:
|
|
329
|
+
stroke: R
|
|
330
330
|
}),
|
|
331
|
-
/* @__PURE__ */ W(
|
|
331
|
+
/* @__PURE__ */ W(kt, {
|
|
332
332
|
icon: e.iconUrl,
|
|
333
333
|
type: e.type,
|
|
334
334
|
name: e.name,
|
|
335
335
|
version: e.version,
|
|
336
|
-
size:
|
|
336
|
+
size: Y.SM,
|
|
337
337
|
query: t,
|
|
338
|
-
iconClassName:
|
|
339
|
-
iconOverlay: /* @__PURE__ */ W(
|
|
338
|
+
iconClassName: Dt.cardIcon,
|
|
339
|
+
iconOverlay: /* @__PURE__ */ W(jt, {
|
|
340
340
|
credentials: e.credentials,
|
|
341
341
|
loggedOutLabel: f
|
|
342
342
|
})
|
|
343
343
|
}),
|
|
344
344
|
/* @__PURE__ */ W("div", {
|
|
345
|
-
className: k("line-clamp-2 min-h-[2lh] break-words",
|
|
346
|
-
children: e.description && /* @__PURE__ */ W(
|
|
345
|
+
className: k("line-clamp-2 min-h-[2lh] break-words", Dt.description),
|
|
346
|
+
children: e.description && /* @__PURE__ */ W(O, {
|
|
347
347
|
content: e.description,
|
|
348
348
|
classNames: {
|
|
349
349
|
p: g,
|
|
@@ -356,36 +356,36 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
356
356
|
h5: g,
|
|
357
357
|
h6: g
|
|
358
358
|
},
|
|
359
|
-
components:
|
|
359
|
+
components: Rt
|
|
360
360
|
})
|
|
361
361
|
}),
|
|
362
362
|
/* @__PURE__ */ W("div", {
|
|
363
363
|
className: "mt-auto flex items-center gap-2",
|
|
364
|
-
children: /* @__PURE__ */ W(
|
|
364
|
+
children: /* @__PURE__ */ W(Lt, { topics: e.topics })
|
|
365
365
|
}),
|
|
366
|
-
|
|
367
|
-
className: k("pt-3", !p && k("border-t",
|
|
366
|
+
C && /* @__PURE__ */ W("div", {
|
|
367
|
+
className: k("pt-3", !p && k("border-t", Dt.footer)),
|
|
368
368
|
children: /* @__PURE__ */ G("div", {
|
|
369
369
|
className: "flex items-center gap-2",
|
|
370
370
|
children: [/* @__PURE__ */ W("div", {
|
|
371
371
|
className: "min-w-0 flex-1",
|
|
372
|
-
children: e.folder.length > 0 && /* @__PURE__ */ W(
|
|
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__ */ W(
|
|
377
|
+
}), S && /* @__PURE__ */ W(Nt, {
|
|
378
378
|
isStarred: m,
|
|
379
|
-
size:
|
|
380
|
-
onClick:
|
|
379
|
+
size: pe.Small,
|
|
380
|
+
onClick: D,
|
|
381
381
|
ariaLabel: m ? c : s,
|
|
382
|
-
className: k(
|
|
382
|
+
className: k(Dt.starBtn, !m && Dt.emptyStarHidden)
|
|
383
383
|
})]
|
|
384
384
|
})
|
|
385
385
|
})
|
|
386
386
|
]
|
|
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
390
|
return /* @__PURE__ */ W("div", {
|
|
391
391
|
style: {
|
|
@@ -397,7 +397,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
397
397
|
let n = h[t];
|
|
398
398
|
return /* @__PURE__ */ W("div", {
|
|
399
399
|
className: "h-full min-w-0 flex-1",
|
|
400
|
-
children: n && /* @__PURE__ */ W(
|
|
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
|
-
},
|
|
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 = Dt.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 } = Et(e.length, { isFullWidth: d }), C = M(() => ({
|
|
421
421
|
items: e,
|
|
422
422
|
columnCount: x,
|
|
423
423
|
query: t,
|
|
@@ -450,15 +450,15 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
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
455
|
children: Array.from({ length: x * 3 }, (e, t) => /* @__PURE__ */ W("div", {
|
|
456
|
-
className: k("rounded-md border p-4",
|
|
456
|
+
className: k("rounded-md border p-4", Dt.skeletonCard),
|
|
457
457
|
style: { height: 248 },
|
|
458
|
-
children: /* @__PURE__ */ W(
|
|
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 },
|
|
@@ -468,33 +468,33 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
468
468
|
}, t))
|
|
469
469
|
}) : e.length === 0 ? /* @__PURE__ */ W("div", {
|
|
470
470
|
className: "flex size-full flex-col items-center justify-center",
|
|
471
|
-
children: /* @__PURE__ */ W(
|
|
471
|
+
children: /* @__PURE__ */ W(te, { label: p })
|
|
472
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__ */ W(
|
|
478
|
+
return /* @__PURE__ */ W(Vt, {
|
|
479
479
|
rowIndex: n,
|
|
480
480
|
...C
|
|
481
481
|
}, n);
|
|
482
482
|
})
|
|
483
483
|
});
|
|
484
|
-
}),
|
|
484
|
+
}), Ut = (e) => e.reduce((e, t) => t.type === Z.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 === Z.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 ===
|
|
493
|
-
let e =
|
|
492
|
+
if (n.type === Z.Folder) {
|
|
493
|
+
let e = Gt(n.items, t);
|
|
494
494
|
if (e != null) return e;
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
},
|
|
497
|
+
}, Kt = {
|
|
498
498
|
sectionHeading: "_sectionHeading_jnq93_1",
|
|
499
499
|
rowAlt: "_rowAlt_jnq93_5",
|
|
500
500
|
label: "_label_jnq93_9",
|
|
@@ -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
|
-
},
|
|
506
|
-
size:
|
|
507
|
-
className: k(r,
|
|
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
508
|
}), /* @__PURE__ */ W("span", {
|
|
509
|
-
className: k(n,
|
|
509
|
+
className: k(n, Kt.valueTrue),
|
|
510
510
|
children: i
|
|
511
511
|
})] }) : e === !1 ? /* @__PURE__ */ W("span", {
|
|
512
|
-
className: k(t,
|
|
512
|
+
className: k(t, Kt.valueFalse),
|
|
513
513
|
children: a
|
|
514
514
|
}) : /* @__PURE__ */ W("span", {
|
|
515
|
-
className: k("min-w-0 break-words", t,
|
|
515
|
+
className: k("min-w-0 break-words", t, Kt.valueText),
|
|
516
516
|
children: e
|
|
517
|
-
}),
|
|
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,
|
|
@@ -526,18 +526,18 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
526
526
|
"--tv-value-text": l?.valueText
|
|
527
527
|
}),
|
|
528
528
|
children: t != null && t.length > 0 && /* @__PURE__ */ G("section", { children: [/* @__PURE__ */ W("p", {
|
|
529
|
-
className: k("mb-3 mt-0", o,
|
|
529
|
+
className: k("mb-3 mt-0", o, Kt.sectionHeading),
|
|
530
530
|
children: e
|
|
531
531
|
}), /* @__PURE__ */ W("ul", {
|
|
532
532
|
className: "m-0 list-none p-0",
|
|
533
533
|
children: t.map((e, t) => /* @__PURE__ */ G("li", {
|
|
534
|
-
className: k("flex items-center rounded px-3 py-2", t % 2 == 0 ?
|
|
534
|
+
className: k("flex items-center rounded px-3 py-2", t % 2 == 0 ? Kt.rowAlt : void 0),
|
|
535
535
|
children: [/* @__PURE__ */ W("span", {
|
|
536
|
-
className: k(n,
|
|
536
|
+
className: k(n, Kt.label, "w-2/5 shrink-0"),
|
|
537
537
|
children: e.label
|
|
538
538
|
}), /* @__PURE__ */ W("div", {
|
|
539
539
|
className: "flex w-3/5 min-w-0 items-center gap-1",
|
|
540
|
-
children: /* @__PURE__ */ W(
|
|
540
|
+
children: /* @__PURE__ */ W(qt, {
|
|
541
541
|
value: e.value,
|
|
542
542
|
valueClassName: r,
|
|
543
543
|
valueTrueClassName: i,
|
|
@@ -548,45 +548,45 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
548
548
|
})]
|
|
549
549
|
}, e.label))
|
|
550
550
|
})] })
|
|
551
|
-
}),
|
|
552
|
-
[
|
|
553
|
-
[
|
|
554
|
-
[
|
|
555
|
-
},
|
|
556
|
-
[
|
|
557
|
-
[
|
|
558
|
-
[
|
|
559
|
-
},
|
|
560
|
-
let [s, c] = P(e[0]?.language ??
|
|
551
|
+
}), Yt = { sectionHeading: "_sectionHeading_148lj_1" }, Xt = {
|
|
552
|
+
[ht.Python]: "Python",
|
|
553
|
+
[ht.Curl]: "cURL",
|
|
554
|
+
[ht.JavaScript]: "JavaScript"
|
|
555
|
+
}, Zt = {
|
|
556
|
+
[ht.Python]: "python",
|
|
557
|
+
[ht.Curl]: "bash",
|
|
558
|
+
[ht.JavaScript]: "javascript"
|
|
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] = P(e[0]?.language ?? ht.Python);
|
|
561
561
|
j(() => {
|
|
562
|
-
c(e[0]?.language ??
|
|
562
|
+
c(e[0]?.language ?? ht.Python);
|
|
563
563
|
}, [e]);
|
|
564
564
|
let l = M(() => e.map((e) => ({
|
|
565
565
|
key: e.language,
|
|
566
|
-
label:
|
|
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
569
|
return /* @__PURE__ */ G("section", { children: [t != null && /* @__PURE__ */ W("p", {
|
|
570
|
-
className: k("mb-3 mt-0", o,
|
|
570
|
+
className: k("mb-3 mt-0", o, Yt.sectionHeading),
|
|
571
571
|
children: t
|
|
572
|
-
}), /* @__PURE__ */ W(
|
|
573
|
-
language:
|
|
574
|
-
title:
|
|
572
|
+
}), /* @__PURE__ */ W(D, {
|
|
573
|
+
language: Zt[s] ?? s,
|
|
574
|
+
title: Xt[s] ?? s,
|
|
575
575
|
value: u,
|
|
576
576
|
copyLabel: n,
|
|
577
577
|
copiedLabel: r,
|
|
578
578
|
codeClassName: i,
|
|
579
579
|
languageLabelClassName: a,
|
|
580
580
|
hideDownload: !0,
|
|
581
|
-
titleSlot: d ? /* @__PURE__ */ W(
|
|
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
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,
|
|
@@ -596,18 +596,18 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
596
596
|
label: i,
|
|
597
597
|
value: e.resource.modelId
|
|
598
598
|
});
|
|
599
|
-
let S = _.length > 1, C = x.length > 0, w = v ? null : e.resource?.endpointUrl,
|
|
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
600
|
return /* @__PURE__ */ G("div", {
|
|
601
601
|
className: "flex flex-col gap-6",
|
|
602
602
|
children: [
|
|
603
|
-
C && /* @__PURE__ */ W(
|
|
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__ */ W(
|
|
610
|
+
w != null && /* @__PURE__ */ W(D, {
|
|
611
611
|
language: a,
|
|
612
612
|
value: w,
|
|
613
613
|
copyLabel: c,
|
|
@@ -618,10 +618,10 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
618
618
|
}),
|
|
619
619
|
v && /* @__PURE__ */ G("section", { children: [
|
|
620
620
|
/* @__PURE__ */ W("p", {
|
|
621
|
-
className: k("mb-3 mt-0", m,
|
|
621
|
+
className: k("mb-3 mt-0", m, Yt.sectionHeading),
|
|
622
622
|
children: n
|
|
623
623
|
}),
|
|
624
|
-
y != null && /* @__PURE__ */ W(
|
|
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__ */ W(
|
|
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
640
|
y?.snippets != null && y.snippets.length > 0 && /* @__PURE__ */ W("div", {
|
|
641
641
|
className: "mt-4",
|
|
642
|
-
children: /* @__PURE__ */ W(
|
|
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 &&
|
|
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
|
-
|
|
662
|
-
className: k("mb-3 mt-0", m,
|
|
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__ */ W(
|
|
664
|
+
}), /* @__PURE__ */ W(D, {
|
|
665
665
|
language: "bash",
|
|
666
666
|
value: e.requestExample ?? "",
|
|
667
667
|
copyLabel: c,
|
|
@@ -670,9 +670,9 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
670
670
|
hideDownload: !0
|
|
671
671
|
})] }),
|
|
672
672
|
O && /* @__PURE__ */ G("section", { children: [/* @__PURE__ */ W("p", {
|
|
673
|
-
className: k("mb-3 mt-0", m,
|
|
673
|
+
className: k("mb-3 mt-0", m, Yt.sectionHeading),
|
|
674
674
|
children: s
|
|
675
|
-
}), /* @__PURE__ */ W(
|
|
675
|
+
}), /* @__PURE__ */ W(D, {
|
|
676
676
|
language: "json",
|
|
677
677
|
value: e.responseSchema ?? "",
|
|
678
678
|
copyLabel: c,
|
|
@@ -682,23 +682,23 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
682
682
|
})] })
|
|
683
683
|
]
|
|
684
684
|
});
|
|
685
|
-
},
|
|
685
|
+
}, en = {
|
|
686
686
|
message: "_message_13mok_1",
|
|
687
687
|
consequences: "_consequences_13mok_5",
|
|
688
688
|
footer: "_footer_13mok_9"
|
|
689
|
-
},
|
|
689
|
+
}, tn = ({ confirmLabel: e, cancelLabel: t, variant: n = J.Info, isLoading: r = !1, isConfirmDisabled: i = !1, loadingStatusLabel: a, onConfirm: o, onCancel: s }) => {
|
|
690
690
|
let c = n === J.Danger, l = (() => {
|
|
691
|
-
if (r) return /* @__PURE__ */ W(
|
|
692
|
-
if (c) return /* @__PURE__ */ W(
|
|
693
|
-
size:
|
|
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 ?
|
|
697
|
+
})(), u = c ? de : we;
|
|
698
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",
|
|
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__ */ W(
|
|
701
|
+
/* @__PURE__ */ W(ge, {
|
|
702
702
|
label: t,
|
|
703
703
|
disabled: r,
|
|
704
704
|
onClick: s
|
|
@@ -717,78 +717,78 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
717
717
|
})
|
|
718
718
|
]
|
|
719
719
|
});
|
|
720
|
-
},
|
|
720
|
+
}, nn = {
|
|
721
721
|
info: "_info_lklha_1",
|
|
722
722
|
danger: "_danger_lklha_5"
|
|
723
|
-
},
|
|
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 === J.Danger ?
|
|
728
|
-
}),
|
|
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__ */ W(
|
|
731
|
+
/* @__PURE__ */ W(rn, {
|
|
732
732
|
item: e,
|
|
733
733
|
variant: r
|
|
734
734
|
}),
|
|
735
735
|
/* @__PURE__ */ W("p", {
|
|
736
|
-
className: k(i, "break-words",
|
|
736
|
+
className: k(i, "break-words", en.message),
|
|
737
737
|
children: t
|
|
738
738
|
}),
|
|
739
739
|
n != null && n.length > 0 && /* @__PURE__ */ W("ul", {
|
|
740
|
-
className: k("flex list-disc flex-col gap-2 ps-5", i,
|
|
740
|
+
className: k("flex list-disc flex-col gap-2 ps-5", i, en.consequences),
|
|
741
741
|
children: n.map((e) => /* @__PURE__ */ W("li", { children: e }, e))
|
|
742
742
|
}),
|
|
743
743
|
a
|
|
744
744
|
]
|
|
745
|
-
}),
|
|
745
|
+
}), on = {
|
|
746
746
|
sunkenBox: "_sunkenBox_1lqi3_1",
|
|
747
747
|
raisedBox: "_raisedBox_1lqi3_5",
|
|
748
748
|
activeIcon: "_activeIcon_1lqi3_9"
|
|
749
|
-
},
|
|
749
|
+
}, sn = /* @__PURE__ */ function(e) {
|
|
750
750
|
return e.Sunken = "sunken", e.Raised = "raised", e;
|
|
751
|
-
}({}),
|
|
752
|
-
sunken:
|
|
753
|
-
raised:
|
|
754
|
-
},
|
|
751
|
+
}({}), cn = {
|
|
752
|
+
sunken: on.sunkenBox,
|
|
753
|
+
raised: on.raisedBox
|
|
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
757
|
/* @__PURE__ */ W("span", {
|
|
758
|
-
className: k("flex size-8 items-center justify-center rounded-lg",
|
|
758
|
+
className: k("flex size-8 items-center justify-center rounded-lg", cn[n]),
|
|
759
759
|
children: e
|
|
760
760
|
}),
|
|
761
|
-
t && /* @__PURE__ */ W(
|
|
762
|
-
size:
|
|
761
|
+
t && /* @__PURE__ */ W(Ue, {
|
|
762
|
+
size: L.MD,
|
|
763
763
|
"aria-hidden": !0,
|
|
764
|
-
className: k("absolute -end-2 -top-2",
|
|
764
|
+
className: k("absolute -end-2 -top-2", on.activeIcon)
|
|
765
765
|
}),
|
|
766
766
|
r != null && /* @__PURE__ */ W("span", {
|
|
767
767
|
className: "sr-only",
|
|
768
768
|
children: r
|
|
769
769
|
})
|
|
770
770
|
]
|
|
771
|
-
}),
|
|
771
|
+
}), un = {
|
|
772
772
|
card: "_card_tqnz7_1",
|
|
773
773
|
icon: "_icon_tqnz7_6",
|
|
774
774
|
title: "_title_tqnz7_10",
|
|
775
775
|
description: "_description_tqnz7_14"
|
|
776
|
-
},
|
|
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: k("flex items-center gap-3 rounded-xl p-3",
|
|
779
|
+
className: k("flex items-center gap-3 rounded-xl p-3", un.card),
|
|
780
780
|
children: [/* @__PURE__ */ W("span", {
|
|
781
|
-
className: k("shrink-0",
|
|
781
|
+
className: k("shrink-0", un.icon, n != null && "mt-0.5"),
|
|
782
782
|
children: e
|
|
783
783
|
}), /* @__PURE__ */ G("div", {
|
|
784
784
|
className: "flex min-w-0 flex-1 items-center justify-between gap-2",
|
|
785
785
|
children: [/* @__PURE__ */ G("div", {
|
|
786
786
|
className: "flex min-w-0 flex-col gap-1",
|
|
787
787
|
children: [/* @__PURE__ */ W("span", {
|
|
788
|
-
className: k(i,
|
|
788
|
+
className: k(i, un.title),
|
|
789
789
|
children: t
|
|
790
790
|
}), n != null && /* @__PURE__ */ W("span", {
|
|
791
|
-
className: k(a,
|
|
791
|
+
className: k(a, un.description),
|
|
792
792
|
children: n
|
|
793
793
|
})]
|
|
794
794
|
}), r != null && /* @__PURE__ */ W("div", {
|
|
@@ -796,59 +796,59 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
796
796
|
children: r
|
|
797
797
|
})]
|
|
798
798
|
})]
|
|
799
|
-
}),
|
|
800
|
-
let
|
|
801
|
-
size:
|
|
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__ */ W(Re, {
|
|
801
|
+
size: gn,
|
|
802
802
|
"aria-hidden": !0,
|
|
803
|
-
stroke:
|
|
803
|
+
stroke: R
|
|
804
804
|
});
|
|
805
|
-
if (
|
|
806
|
-
let e = (
|
|
807
|
-
return /* @__PURE__ */ W(
|
|
808
|
-
icon: /* @__PURE__ */ W(
|
|
809
|
-
icon: /* @__PURE__ */ W(
|
|
810
|
-
size:
|
|
805
|
+
if (t === e.PersonalCredentialsActive) {
|
|
806
|
+
let e = (r?.personalCredentialsActiveBannerTitle ?? hn)(n);
|
|
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
|
-
surface:
|
|
815
|
+
surface: sn.Raised
|
|
816
816
|
}),
|
|
817
817
|
title: e
|
|
818
818
|
});
|
|
819
819
|
}
|
|
820
|
-
if (
|
|
821
|
-
let e = (
|
|
822
|
-
return /* @__PURE__ */ W(
|
|
823
|
-
icon: /* @__PURE__ */ W(
|
|
824
|
-
icon: /* @__PURE__ */ W(
|
|
825
|
-
size:
|
|
820
|
+
if (t === e.OrgCredentialsActive) {
|
|
821
|
+
let e = (r?.orgCredentialsActiveBannerTitle ?? mn)(n);
|
|
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
|
-
surface:
|
|
830
|
+
surface: sn.Raised
|
|
831
831
|
}),
|
|
832
832
|
title: e
|
|
833
833
|
});
|
|
834
834
|
}
|
|
835
|
-
return /* @__PURE__ */ W(
|
|
836
|
-
icon:
|
|
837
|
-
title: (
|
|
838
|
-
description: (
|
|
835
|
+
return /* @__PURE__ */ W(dn, {
|
|
836
|
+
icon: i,
|
|
837
|
+
title: (r?.orgFallbackBannerTitle ?? fn)(n),
|
|
838
|
+
description: (r?.orgFallbackBannerDescription ?? pn)(n)
|
|
839
839
|
});
|
|
840
|
-
},
|
|
840
|
+
}, vn = {
|
|
841
841
|
surface: "_surface_1q3s8_1",
|
|
842
842
|
description: "_description_1q3s8_5",
|
|
843
843
|
rowDescription: "_rowDescription_1q3s8_9",
|
|
844
844
|
errorText: "_errorText_1q3s8_13"
|
|
845
|
-
},
|
|
846
|
-
let [x, S] = P(""), [C, w] = P(!1), [T, E] = P(!1), D =
|
|
847
|
-
|
|
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] = P(""), [C, w] = P(!1), [T, E] = P(!1), D = o === s.SignedIn, O = A(() => {
|
|
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 () => {
|
|
@@ -858,7 +858,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
858
858
|
}
|
|
859
859
|
E(!0);
|
|
860
860
|
try {
|
|
861
|
-
await
|
|
861
|
+
await d?.(e, {
|
|
862
862
|
level: t,
|
|
863
863
|
apiKey: x
|
|
864
864
|
}), S("");
|
|
@@ -869,18 +869,18 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
869
869
|
e,
|
|
870
870
|
t,
|
|
871
871
|
x,
|
|
872
|
-
|
|
872
|
+
d
|
|
873
873
|
]), ne = A(() => {
|
|
874
|
-
|
|
875
|
-
}, [t,
|
|
876
|
-
|
|
877
|
-
}, [t,
|
|
874
|
+
f?.(t);
|
|
875
|
+
}, [t, f]), re = A(() => {
|
|
876
|
+
p?.(t);
|
|
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
878
|
return /* @__PURE__ */ G("div", {
|
|
879
879
|
className: "flex items-start gap-3 rounded-xl p-3",
|
|
880
|
-
children: [/* @__PURE__ */ W(
|
|
881
|
-
icon:
|
|
882
|
-
isActive:
|
|
883
|
-
statusLabel:
|
|
880
|
+
children: [/* @__PURE__ */ W(ln, {
|
|
881
|
+
icon: a,
|
|
882
|
+
isActive: c,
|
|
883
|
+
statusLabel: c ? se : M
|
|
884
884
|
}), /* @__PURE__ */ G("div", {
|
|
885
885
|
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
886
886
|
children: [
|
|
@@ -889,67 +889,67 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
889
889
|
children: [/* @__PURE__ */ G("div", {
|
|
890
890
|
className: "flex min-w-0 flex-col gap-0.5",
|
|
891
891
|
children: [/* @__PURE__ */ W("span", {
|
|
892
|
-
className:
|
|
893
|
-
children: n
|
|
894
|
-
}), /* @__PURE__ */ W("span", {
|
|
895
|
-
className: k(h, gn.rowDescription),
|
|
892
|
+
className: h,
|
|
896
893
|
children: r
|
|
894
|
+
}), /* @__PURE__ */ W("span", {
|
|
895
|
+
className: k(g, vn.rowDescription),
|
|
896
|
+
children: i
|
|
897
897
|
})]
|
|
898
|
-
}),
|
|
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
902
|
onClick: ne
|
|
903
|
-
}) : /* @__PURE__ */ W(
|
|
903
|
+
}) : /* @__PURE__ */ W(we, {
|
|
904
904
|
label: ie,
|
|
905
905
|
className: "min-w-28 shrink-0 justify-center whitespace-nowrap",
|
|
906
906
|
onClick: O
|
|
907
907
|
}))]
|
|
908
908
|
}),
|
|
909
|
-
|
|
909
|
+
l === n.ApiKey && !D && /* @__PURE__ */ G("div", {
|
|
910
910
|
className: "flex animate-fadeIn flex-col gap-1 pt-1",
|
|
911
911
|
children: [/* @__PURE__ */ G("div", {
|
|
912
912
|
className: "flex items-end gap-2",
|
|
913
|
-
children: [/* @__PURE__ */ W(
|
|
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
918
|
onChange: ee,
|
|
919
|
-
labelProps: { label:
|
|
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__ */ W(
|
|
924
|
-
label: T ? void 0 :
|
|
925
|
-
"aria-label": T ?
|
|
926
|
-
iconBefore: T ? /* @__PURE__ */ W(
|
|
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
931
|
onClick: te,
|
|
932
932
|
disabled: T
|
|
933
933
|
})]
|
|
934
934
|
}), C && /* @__PURE__ */ W("span", {
|
|
935
|
-
className: k(
|
|
936
|
-
children:
|
|
935
|
+
className: k(_, vn.errorText),
|
|
936
|
+
children: m?.apiKeyRequiredErrorMessage ?? "API key is required."
|
|
937
937
|
})]
|
|
938
938
|
}),
|
|
939
|
-
|
|
939
|
+
l === n.ApiKey && D && /* @__PURE__ */ W("div", {
|
|
940
940
|
className: "animate-fadeIn pt-1",
|
|
941
|
-
children: /* @__PURE__ */ W(
|
|
942
|
-
icon: /* @__PURE__ */ W(
|
|
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
947
|
title: ce,
|
|
948
948
|
description: le,
|
|
949
949
|
titleClassName: v,
|
|
950
950
|
descriptionClassName: y,
|
|
951
|
-
action: /* @__PURE__ */ W(
|
|
952
|
-
label:
|
|
951
|
+
action: /* @__PURE__ */ W(z, {
|
|
952
|
+
label: j,
|
|
953
953
|
className: b,
|
|
954
954
|
onClick: re
|
|
955
955
|
})
|
|
@@ -958,17 +958,17 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
958
958
|
]
|
|
959
959
|
})]
|
|
960
960
|
});
|
|
961
|
-
},
|
|
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:
|
|
963
|
-
if (
|
|
964
|
-
let
|
|
961
|
+
}, bn = (e) => e === n.ApiKey ? "Select which account to use with this toolset — personal or organization. If both are configured, personal credentials will be used by default for toolset access." : "Select which account to use with this toolset — personal or organization. If both are configured, personal credentials will be used by default.", xn = ({ item: e, onLogin: t, onRequestLogout: n, onRequestDeleteApiKey: r, texts: i, detailsStyles: a, deleteActionClassName: o = "text-error" }) => {
|
|
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
|
+
if (m == null) return null;
|
|
964
|
+
let h = (i?.credentialsManagementDescription ?? bn)(m.authenticationType), g = m.userStatus === s.SignedIn, _ = !g && m.globalStatus === s.SignedIn;
|
|
965
965
|
return /* @__PURE__ */ G("div", {
|
|
966
966
|
className: "flex flex-col",
|
|
967
967
|
children: [/* @__PURE__ */ W("div", {
|
|
968
968
|
className: "px-6 py-4",
|
|
969
969
|
children: /* @__PURE__ */ W("div", {
|
|
970
|
-
className: k("rounded-xl p-3",
|
|
971
|
-
children: /* @__PURE__ */ W(
|
|
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
|
|
@@ -977,24 +977,24 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
977
977
|
}), /* @__PURE__ */ G("div", {
|
|
978
978
|
className: "flex flex-col gap-5 px-6 py-4",
|
|
979
979
|
children: [/* @__PURE__ */ W("span", {
|
|
980
|
-
className: k(c,
|
|
981
|
-
children:
|
|
980
|
+
className: k(c, vn.description),
|
|
981
|
+
children: h
|
|
982
982
|
}), /* @__PURE__ */ G("div", {
|
|
983
983
|
className: "flex flex-col",
|
|
984
|
-
children: [/* @__PURE__ */ W(
|
|
984
|
+
children: [/* @__PURE__ */ W(yn, {
|
|
985
985
|
item: e,
|
|
986
|
-
level:
|
|
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__ */ W(
|
|
990
|
-
size:
|
|
989
|
+
icon: /* @__PURE__ */ W(ot, {
|
|
990
|
+
size: L.SM,
|
|
991
991
|
"aria-hidden": !0,
|
|
992
|
-
stroke:
|
|
992
|
+
stroke: R
|
|
993
993
|
}),
|
|
994
|
-
status:
|
|
995
|
-
isActive:
|
|
996
|
-
authenticationType:
|
|
997
|
-
apiKeyAddedWhen:
|
|
994
|
+
status: m.userStatus,
|
|
995
|
+
isActive: g,
|
|
996
|
+
authenticationType: m.authenticationType,
|
|
997
|
+
apiKeyAddedWhen: m.userApiKeyAddedWhen,
|
|
998
998
|
onLogin: t,
|
|
999
999
|
onRequestLogout: n,
|
|
1000
1000
|
onRequestDeleteApiKey: r,
|
|
@@ -1002,23 +1002,23 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1002
1002
|
labelClassName: l,
|
|
1003
1003
|
descriptionClassName: u,
|
|
1004
1004
|
errorClassName: d,
|
|
1005
|
-
keyCardTitleClassName:
|
|
1006
|
-
keyCardDescriptionClassName:
|
|
1007
|
-
deleteActionClassName:
|
|
1008
|
-
}), /* @__PURE__ */ W(
|
|
1005
|
+
keyCardTitleClassName: f,
|
|
1006
|
+
keyCardDescriptionClassName: p,
|
|
1007
|
+
deleteActionClassName: o
|
|
1008
|
+
}), /* @__PURE__ */ W(yn, {
|
|
1009
1009
|
item: e,
|
|
1010
|
-
level:
|
|
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__ */ W(
|
|
1014
|
-
size:
|
|
1013
|
+
icon: /* @__PURE__ */ W(Re, {
|
|
1014
|
+
size: L.SM,
|
|
1015
1015
|
"aria-hidden": !0,
|
|
1016
|
-
stroke:
|
|
1016
|
+
stroke: R
|
|
1017
1017
|
}),
|
|
1018
|
-
status:
|
|
1019
|
-
isActive:
|
|
1020
|
-
authenticationType:
|
|
1021
|
-
apiKeyAddedWhen:
|
|
1018
|
+
status: m.globalStatus,
|
|
1019
|
+
isActive: _,
|
|
1020
|
+
authenticationType: m.authenticationType,
|
|
1021
|
+
apiKeyAddedWhen: m.globalApiKeyAddedWhen,
|
|
1022
1022
|
onLogin: t,
|
|
1023
1023
|
onRequestLogout: n,
|
|
1024
1024
|
onRequestDeleteApiKey: r,
|
|
@@ -1026,27 +1026,27 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1026
1026
|
labelClassName: l,
|
|
1027
1027
|
descriptionClassName: u,
|
|
1028
1028
|
errorClassName: d,
|
|
1029
|
-
keyCardTitleClassName:
|
|
1030
|
-
keyCardDescriptionClassName:
|
|
1031
|
-
deleteActionClassName:
|
|
1029
|
+
keyCardTitleClassName: f,
|
|
1030
|
+
keyCardDescriptionClassName: p,
|
|
1031
|
+
deleteActionClassName: o
|
|
1032
1032
|
})]
|
|
1033
1033
|
})]
|
|
1034
1034
|
})]
|
|
1035
1035
|
});
|
|
1036
|
-
},
|
|
1036
|
+
}, Sn = {
|
|
1037
1037
|
skeletonColor: "var(--cat-details-skeleton, var(--bg-control-disable-primary, #dce0e8))",
|
|
1038
1038
|
backdrop: "_backdrop_16ka5_2",
|
|
1039
1039
|
panel: "_panel_16ka5_6",
|
|
1040
1040
|
divider: "_divider_16ka5_11",
|
|
1041
1041
|
content: "_content_16ka5_15",
|
|
1042
1042
|
publishTitle: "_publishTitle_16ka5_20"
|
|
1043
|
-
},
|
|
1043
|
+
}, Cn = /* @__PURE__ */ function(e) {
|
|
1044
1044
|
return e.Idle = "idle", e.Loading = "loading", e.Resolved = "resolved", e.Unknown = "unknown", e;
|
|
1045
|
-
}({}),
|
|
1046
|
-
let [
|
|
1047
|
-
|
|
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] = P(""), [f, p] = P(!1), [m, h] = P(!1), [g, _] = P(!1), v = n === s.SignedIn, y = A((e) => {
|
|
1047
|
+
d(e ?? ""), p(!1);
|
|
1048
1048
|
}, []), b = A(async () => {
|
|
1049
|
-
if (
|
|
1049
|
+
if (u.trim().length === 0) {
|
|
1050
1050
|
p(!0);
|
|
1051
1051
|
return;
|
|
1052
1052
|
}
|
|
@@ -1054,7 +1054,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1054
1054
|
try {
|
|
1055
1055
|
await i?.(e, {
|
|
1056
1056
|
level: t,
|
|
1057
|
-
apiKey:
|
|
1057
|
+
apiKey: u
|
|
1058
1058
|
}), o();
|
|
1059
1059
|
} finally {
|
|
1060
1060
|
h(!1);
|
|
@@ -1062,7 +1062,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1062
1062
|
}, [
|
|
1063
1063
|
e,
|
|
1064
1064
|
t,
|
|
1065
|
-
|
|
1065
|
+
u,
|
|
1066
1066
|
i,
|
|
1067
1067
|
o
|
|
1068
1068
|
]), x = A(async () => {
|
|
@@ -1077,7 +1077,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1077
1077
|
t,
|
|
1078
1078
|
a,
|
|
1079
1079
|
o
|
|
1080
|
-
]), S =
|
|
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
1081
|
return /* @__PURE__ */ G("div", {
|
|
1082
1082
|
className: "flex w-[418px] flex-col",
|
|
1083
1083
|
children: [
|
|
@@ -1088,54 +1088,54 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1088
1088
|
children: S
|
|
1089
1089
|
})
|
|
1090
1090
|
}),
|
|
1091
|
-
/* @__PURE__ */ W("div", { className: k("mx-4 h-px",
|
|
1091
|
+
/* @__PURE__ */ W("div", { className: k("mx-4 h-px", wn.divider) }),
|
|
1092
1092
|
!v && /* @__PURE__ */ G("div", {
|
|
1093
1093
|
className: "flex animate-fadeIn flex-col gap-1 px-4 py-3.5",
|
|
1094
1094
|
children: [/* @__PURE__ */ G("div", {
|
|
1095
1095
|
className: "flex items-end gap-2",
|
|
1096
|
-
children: [/* @__PURE__ */ W(
|
|
1096
|
+
children: [/* @__PURE__ */ W(xe, {
|
|
1097
1097
|
id: `catalog-item-${e.id}-${t}-api-key`,
|
|
1098
1098
|
type: "password",
|
|
1099
1099
|
autoComplete: "current-password",
|
|
1100
|
-
value:
|
|
1100
|
+
value: u,
|
|
1101
1101
|
onChange: y,
|
|
1102
|
-
labelProps: { label:
|
|
1103
|
-
invalid:
|
|
1102
|
+
labelProps: { label: c?.apiKeyFieldLabel ?? "API key" },
|
|
1103
|
+
invalid: f,
|
|
1104
1104
|
disabled: m,
|
|
1105
1105
|
containerClassName: "min-w-0 flex-1"
|
|
1106
|
-
}), /* @__PURE__ */ W(
|
|
1106
|
+
}), /* @__PURE__ */ W(we, {
|
|
1107
1107
|
label: m ? void 0 : C,
|
|
1108
1108
|
"aria-label": m ? T : void 0,
|
|
1109
|
-
iconBefore: m ? /* @__PURE__ */ W(
|
|
1110
|
-
size:
|
|
1109
|
+
iconBefore: m ? /* @__PURE__ */ W(Me, {
|
|
1110
|
+
size: Tn,
|
|
1111
1111
|
ariaLabel: T
|
|
1112
1112
|
}) : void 0,
|
|
1113
1113
|
onClick: b,
|
|
1114
1114
|
disabled: m
|
|
1115
1115
|
})]
|
|
1116
|
-
}),
|
|
1116
|
+
}), f && /* @__PURE__ */ W("span", {
|
|
1117
1117
|
className: "dial-caption-text text-error",
|
|
1118
1118
|
children: D
|
|
1119
1119
|
})]
|
|
1120
1120
|
}),
|
|
1121
1121
|
v && /* @__PURE__ */ W("div", {
|
|
1122
1122
|
className: "animate-fadeIn px-4 py-3.5",
|
|
1123
|
-
children: /* @__PURE__ */ W(
|
|
1124
|
-
icon: /* @__PURE__ */ W(
|
|
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
1130
|
description: ee,
|
|
1131
|
-
action: /* @__PURE__ */ W(
|
|
1131
|
+
action: /* @__PURE__ */ W(z, {
|
|
1132
1132
|
label: g ? void 0 : w,
|
|
1133
1133
|
"aria-label": g ? E : void 0,
|
|
1134
|
-
iconBefore: g ? /* @__PURE__ */ W(
|
|
1135
|
-
size:
|
|
1134
|
+
iconBefore: g ? /* @__PURE__ */ W(Me, {
|
|
1135
|
+
size: Tn,
|
|
1136
1136
|
ariaLabel: E
|
|
1137
1137
|
}) : void 0,
|
|
1138
|
-
className:
|
|
1138
|
+
className: l,
|
|
1139
1139
|
onClick: x,
|
|
1140
1140
|
disabled: g
|
|
1141
1141
|
})
|
|
@@ -1143,7 +1143,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1143
1143
|
})
|
|
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
1147
|
let [a, o] = P(!1), s = A(() => {
|
|
1148
1148
|
if (n) {
|
|
1149
1149
|
o((e) => !e);
|
|
@@ -1155,22 +1155,22 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1155
1155
|
t,
|
|
1156
1156
|
n
|
|
1157
1157
|
]);
|
|
1158
|
-
if (!
|
|
1159
|
-
let c = /* @__PURE__ */ W(
|
|
1158
|
+
if (!On(e) || r && !r(e)) return null;
|
|
1159
|
+
let c = /* @__PURE__ */ W(we, {
|
|
1160
1160
|
label: i,
|
|
1161
|
-
iconBefore: /* @__PURE__ */ W(
|
|
1162
|
-
size:
|
|
1163
|
-
stroke:
|
|
1161
|
+
iconBefore: /* @__PURE__ */ W(nt, {
|
|
1162
|
+
size: L.MD,
|
|
1163
|
+
stroke: R
|
|
1164
1164
|
}),
|
|
1165
|
-
iconAfter: /* @__PURE__ */ W(
|
|
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__ */ W(
|
|
1173
|
+
return n ? /* @__PURE__ */ W(fe, {
|
|
1174
1174
|
placement: "bottom-end",
|
|
1175
1175
|
matchReferenceWidth: !1,
|
|
1176
1176
|
open: a,
|
|
@@ -1180,375 +1180,375 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1180
1180
|
renderOverlay: () => n(e, () => o(!1)),
|
|
1181
1181
|
children: c
|
|
1182
1182
|
}) : c;
|
|
1183
|
-
},
|
|
1184
|
-
[
|
|
1185
|
-
[
|
|
1186
|
-
},
|
|
1187
|
-
className: k("flex h-[24px] items-center justify-center gap-1 whitespace-nowrap rounded-2xl px-2", "dial-caption-lead-semi-text",
|
|
1183
|
+
}, An = (e) => e === n.ApiKey ? "Manage API keys" : "Manage credentials", jn = {
|
|
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
|
-
}),
|
|
1190
|
-
let { nameClassName: ce = "dial-body-semi-text", folderLabelClassName: le = "dial-tiny-text", folderLeafClassName:
|
|
1191
|
-
status:
|
|
1192
|
-
label:
|
|
1193
|
-
}),
|
|
1194
|
-
|
|
1195
|
-
}, [
|
|
1196
|
-
|
|
1197
|
-
}, [
|
|
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
|
+
t?.(e);
|
|
1195
|
+
}, [e, t]), me = A(() => {
|
|
1196
|
+
c?.(e);
|
|
1197
|
+
}, [e, c]), ge = A(() => {
|
|
1198
1198
|
ne?.();
|
|
1199
|
-
}, [ne]),
|
|
1199
|
+
}, [ne]), _e = A(() => {
|
|
1200
1200
|
se?.();
|
|
1201
|
-
}, [se]),
|
|
1202
|
-
|
|
1203
|
-
}, [
|
|
1201
|
+
}, [se]), ve = A(() => {
|
|
1202
|
+
l?.(e);
|
|
1203
|
+
}, [e, l]), [ye, be] = P(!1);
|
|
1204
1204
|
j(() => {
|
|
1205
|
-
|
|
1206
|
-
}, [
|
|
1207
|
-
let
|
|
1208
|
-
|
|
1205
|
+
be(!1);
|
|
1206
|
+
}, [e.id]);
|
|
1207
|
+
let xe = A(() => {
|
|
1208
|
+
ye || (be(!0), (async () => {
|
|
1209
1209
|
try {
|
|
1210
|
-
await
|
|
1210
|
+
await l?.(e);
|
|
1211
1211
|
} catch {} finally {
|
|
1212
|
-
|
|
1212
|
+
be(!1);
|
|
1213
1213
|
}
|
|
1214
1214
|
})());
|
|
1215
1215
|
}, [
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
]), [
|
|
1216
|
+
e,
|
|
1217
|
+
l,
|
|
1218
|
+
ye
|
|
1219
|
+
]), [z, Se] = P(!1);
|
|
1220
1220
|
j(() => {
|
|
1221
|
-
|
|
1222
|
-
}, [
|
|
1223
|
-
let
|
|
1224
|
-
if (
|
|
1225
|
-
|
|
1221
|
+
Se(!1);
|
|
1222
|
+
}, [e.id]);
|
|
1223
|
+
let Ce = A(() => {
|
|
1224
|
+
if (a) {
|
|
1225
|
+
Se(!0);
|
|
1226
1226
|
return;
|
|
1227
1227
|
}
|
|
1228
|
-
i?.(
|
|
1228
|
+
i?.(e);
|
|
1229
1229
|
}, [
|
|
1230
|
-
|
|
1230
|
+
e,
|
|
1231
1231
|
i,
|
|
1232
|
-
|
|
1232
|
+
a
|
|
1233
1233
|
]), De = A(() => {
|
|
1234
|
-
|
|
1234
|
+
Se(!1);
|
|
1235
1235
|
}, []), Oe = A(() => {
|
|
1236
|
-
|
|
1237
|
-
}, [
|
|
1238
|
-
|
|
1239
|
-
}, [
|
|
1240
|
-
|
|
1241
|
-
}, [
|
|
1236
|
+
p?.(e);
|
|
1237
|
+
}, [e, p]), ke = A(() => {
|
|
1238
|
+
f?.(e);
|
|
1239
|
+
}, [e, f]), Ae = A(() => {
|
|
1240
|
+
g?.(e);
|
|
1241
|
+
}, [e, g]), [je, B] = P(Cn.Idle), [Ne, Pe] = P(void 0), Fe = N(null);
|
|
1242
1242
|
j(() => {
|
|
1243
|
-
Fe.current = null, B(
|
|
1244
|
-
}, [
|
|
1245
|
-
let
|
|
1246
|
-
if (!
|
|
1247
|
-
let
|
|
1248
|
-
Fe.current =
|
|
1243
|
+
Fe.current = null, B(Cn.Idle), Pe(void 0);
|
|
1244
|
+
}, [e.id]);
|
|
1245
|
+
let V = A(() => {
|
|
1246
|
+
if (!_ || Fe.current === e.id || !g || e.isMyApp !== !0 || x?.(e) === !1) return;
|
|
1247
|
+
let t = e.id;
|
|
1248
|
+
Fe.current = t, B(Cn.Loading), (async () => {
|
|
1249
1249
|
try {
|
|
1250
|
-
let n = await
|
|
1251
|
-
if (Fe.current !==
|
|
1252
|
-
Pe(n), B(n == null ?
|
|
1250
|
+
let n = await _(e);
|
|
1251
|
+
if (Fe.current !== t) return;
|
|
1252
|
+
Pe(n), B(n == null ? Cn.Unknown : Cn.Resolved);
|
|
1253
1253
|
} catch {
|
|
1254
|
-
if (Fe.current !==
|
|
1255
|
-
Pe(void 0), B(
|
|
1254
|
+
if (Fe.current !== t) return;
|
|
1255
|
+
Pe(void 0), B(Cn.Unknown);
|
|
1256
1256
|
}
|
|
1257
1257
|
})();
|
|
1258
1258
|
}, [
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
]),
|
|
1264
|
-
e && (
|
|
1265
|
-
}, [
|
|
1266
|
-
|
|
1267
|
-
}, [
|
|
1259
|
+
e,
|
|
1260
|
+
_,
|
|
1261
|
+
g,
|
|
1262
|
+
x
|
|
1263
|
+
]), Ie = A((e) => {
|
|
1264
|
+
e && (V(), oe?.());
|
|
1265
|
+
}, [V, oe]), Re = A(() => {
|
|
1266
|
+
V(), oe?.();
|
|
1267
|
+
}, [V, oe]), ze = A(() => {
|
|
1268
1268
|
oe?.();
|
|
1269
|
-
}, [oe]), Ve = D?.hasPrimaryAction !== !1 && (r?.(
|
|
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__ */ W(
|
|
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__ */ W(
|
|
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:
|
|
1290
|
+
onClick: me
|
|
1291
1291
|
}), ft && e.push({
|
|
1292
1292
|
key: "download",
|
|
1293
1293
|
label: D?.downloadActionLabel ?? "Download",
|
|
1294
|
-
icon: /* @__PURE__ */ W(
|
|
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__ */ W(
|
|
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__ */ W(
|
|
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:
|
|
1320
|
+
onClick: _e
|
|
1321
1321
|
}), pt && e.push({
|
|
1322
1322
|
key: "delete",
|
|
1323
1323
|
label: D?.deleteActionLabel ?? "Delete",
|
|
1324
|
-
icon: /* @__PURE__ */ W(
|
|
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
1330
|
onClick: ke
|
|
1331
|
-
}),
|
|
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
1335
|
label: Ne == null ? t : n(Ne),
|
|
1336
|
-
icon: /* @__PURE__ */ W(
|
|
1337
|
-
size:
|
|
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
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__ */ W(
|
|
1349
|
-
size:
|
|
1348
|
+
icon: /* @__PURE__ */ W(it, {
|
|
1349
|
+
size: L.SM,
|
|
1350
1350
|
"aria-hidden": !0,
|
|
1351
|
-
stroke:
|
|
1351
|
+
stroke: R
|
|
1352
1352
|
}),
|
|
1353
1353
|
onClick: Oe
|
|
1354
1354
|
}), e;
|
|
1355
1355
|
}, [
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
Je,
|
|
1359
|
-
ft,
|
|
1360
|
-
nt,
|
|
1356
|
+
Xe,
|
|
1357
|
+
Ye,
|
|
1361
1358
|
qe,
|
|
1362
|
-
|
|
1359
|
+
ft,
|
|
1360
|
+
tt,
|
|
1361
|
+
Ke,
|
|
1362
|
+
He,
|
|
1363
1363
|
pt,
|
|
1364
|
-
|
|
1364
|
+
ht,
|
|
1365
1365
|
Ne,
|
|
1366
|
-
|
|
1366
|
+
mt,
|
|
1367
1367
|
D,
|
|
1368
|
-
|
|
1368
|
+
Ce,
|
|
1369
|
+
me,
|
|
1370
|
+
ve,
|
|
1369
1371
|
ge,
|
|
1370
|
-
ye,
|
|
1371
1372
|
_e,
|
|
1372
|
-
ve,
|
|
1373
1373
|
ke,
|
|
1374
1374
|
Ae,
|
|
1375
1375
|
Oe
|
|
1376
|
-
]), [
|
|
1377
|
-
if (H ===
|
|
1376
|
+
]), [q, J] = P(!1), Y = rt === n.ApiKey && H !== y.ManageCredentials, X = rt === n.ApiKey && H === y.LogOut, Z = rt !== n.ApiKey && H !== y.ManageCredentials && H === y.LogOut, _t = A(() => {
|
|
1377
|
+
if (H === y.ManageCredentials) {
|
|
1378
1378
|
T?.();
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
1381
|
if (Y) {
|
|
1382
|
-
|
|
1382
|
+
J((e) => !e);
|
|
1383
1383
|
return;
|
|
1384
1384
|
}
|
|
1385
|
-
if (H ===
|
|
1385
|
+
if (H === y.LogOut) {
|
|
1386
1386
|
E?.();
|
|
1387
1387
|
return;
|
|
1388
1388
|
}
|
|
1389
|
-
|
|
1389
|
+
S?.(e, { level: v.User });
|
|
1390
1390
|
}, [
|
|
1391
1391
|
H,
|
|
1392
1392
|
Y,
|
|
1393
|
-
|
|
1394
|
-
|
|
1393
|
+
e,
|
|
1394
|
+
S,
|
|
1395
1395
|
T,
|
|
1396
1396
|
E
|
|
1397
|
-
]),
|
|
1398
|
-
size:
|
|
1399
|
-
stroke:
|
|
1400
|
-
}) : H ===
|
|
1401
|
-
size:
|
|
1402
|
-
stroke:
|
|
1403
|
-
}) : /* @__PURE__ */ W(
|
|
1404
|
-
size:
|
|
1405
|
-
stroke:
|
|
1406
|
-
}),
|
|
1407
|
-
size:
|
|
1397
|
+
]), vt = 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", yt = 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
|
+
}), bt = H === y.ManageCredentials ? /* @__PURE__ */ W(Le, {
|
|
1407
|
+
size: L.MD,
|
|
1408
1408
|
className: "rtl:scale-x-[-1]",
|
|
1409
|
-
stroke:
|
|
1410
|
-
}) : Y ? /* @__PURE__ */ W(
|
|
1411
|
-
size:
|
|
1412
|
-
stroke:
|
|
1413
|
-
}) : void 0,
|
|
1414
|
-
let n = /* @__PURE__ */ W(
|
|
1415
|
-
label:
|
|
1416
|
-
iconBefore:
|
|
1417
|
-
iconAfter:
|
|
1418
|
-
onClick:
|
|
1409
|
+
stroke: R
|
|
1410
|
+
}) : Y ? /* @__PURE__ */ W(Be, {
|
|
1411
|
+
size: L.MD,
|
|
1412
|
+
stroke: R
|
|
1413
|
+
}) : void 0, Q = (t) => {
|
|
1414
|
+
let n = /* @__PURE__ */ W(t, {
|
|
1415
|
+
label: vt,
|
|
1416
|
+
iconBefore: yt,
|
|
1417
|
+
iconAfter: bt,
|
|
1418
|
+
onClick: _t,
|
|
1419
1419
|
"aria-haspopup": Y ? "dialog" : void 0,
|
|
1420
|
-
"aria-expanded": Y ?
|
|
1420
|
+
"aria-expanded": Y ? q : void 0
|
|
1421
1421
|
});
|
|
1422
|
-
return !Y ||
|
|
1422
|
+
return !Y || 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__ */ W(
|
|
1430
|
-
item:
|
|
1431
|
-
level:
|
|
1432
|
-
status:
|
|
1433
|
-
apiKeyAddedWhen:
|
|
1434
|
-
onLogin:
|
|
1429
|
+
renderOverlay: () => /* @__PURE__ */ W(En, {
|
|
1430
|
+
item: e,
|
|
1431
|
+
level: v.User,
|
|
1432
|
+
status: e.credentials?.userStatus,
|
|
1433
|
+
apiKeyAddedWhen: e.credentials?.userApiKeyAddedWhen,
|
|
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
|
|
1443
|
-
items:
|
|
1441
|
+
}, xt = () => {
|
|
1442
|
+
let t = /* @__PURE__ */ W(fe, {
|
|
1443
|
+
items: K,
|
|
1444
1444
|
placement: "bottom-end",
|
|
1445
1445
|
matchReferenceWidth: !1,
|
|
1446
|
-
onOpenChange:
|
|
1447
|
-
children: /* @__PURE__ */ W(
|
|
1448
|
-
icon: /* @__PURE__ */ W(
|
|
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: () =>
|
|
1467
|
-
children:
|
|
1466
|
+
renderOverlay: () => a(e, De),
|
|
1467
|
+
children: t
|
|
1468
1468
|
});
|
|
1469
|
-
}, St =
|
|
1469
|
+
}, St = ot || Ve || dt || Xe && Ye || tt && He || tt && Ke || at && !ot || K.length > 0 || Ue;
|
|
1470
1470
|
return /* @__PURE__ */ G("div", {
|
|
1471
1471
|
className: "flex flex-col gap-3 px-6 py-4",
|
|
1472
|
-
children: [/* @__PURE__ */ W(
|
|
1473
|
-
item:
|
|
1472
|
+
children: [/* @__PURE__ */ W(C, {
|
|
1473
|
+
item: e,
|
|
1474
1474
|
iconSize: 52,
|
|
1475
|
-
nameClassName: k(ce,
|
|
1475
|
+
nameClassName: k(ce, Dn.name),
|
|
1476
1476
|
featuredLabel: D?.featuredLabel ?? "Featured",
|
|
1477
1477
|
featuredChipStyle: O?.colors?.featuredChipStyle,
|
|
1478
|
-
statusBadge:
|
|
1479
|
-
footer:
|
|
1480
|
-
segments:
|
|
1478
|
+
statusBadge: de,
|
|
1479
|
+
footer: e.folder.length > 0 ? /* @__PURE__ */ W(he, {
|
|
1480
|
+
segments: e.folder,
|
|
1481
1481
|
labelClassName: le,
|
|
1482
|
-
leafClassName:
|
|
1482
|
+
leafClassName: I
|
|
1483
1483
|
}) : void 0
|
|
1484
1484
|
}), St && /* @__PURE__ */ G("div", {
|
|
1485
1485
|
className: "flex flex-wrap items-center gap-2 ps-[60px]",
|
|
1486
1486
|
children: [
|
|
1487
|
-
|
|
1488
|
-
Ve && /* @__PURE__ */ W(
|
|
1487
|
+
ot && Q(X || Z ? we : Ee),
|
|
1488
|
+
Ve && /* @__PURE__ */ W(Ee, {
|
|
1489
1489
|
label: D?.primaryActionLabel ?? "Use in chat",
|
|
1490
|
-
iconBefore: /* @__PURE__ */ W(
|
|
1491
|
-
onClick:
|
|
1492
|
-
disabled:
|
|
1490
|
+
iconBefore: /* @__PURE__ */ W(et, { size: L.MD }),
|
|
1491
|
+
onClick: pe,
|
|
1492
|
+
disabled: ue === gt.LimitReached
|
|
1493
1493
|
}),
|
|
1494
|
-
dt && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(
|
|
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__ */ W(
|
|
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
|
-
|
|
1514
|
-
item:
|
|
1513
|
+
Xe && Ye && /* @__PURE__ */ W(kn, {
|
|
1514
|
+
item: e,
|
|
1515
1515
|
onShare: i,
|
|
1516
|
-
shareOverlay:
|
|
1517
|
-
isShareVisible:
|
|
1516
|
+
shareOverlay: a,
|
|
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__ */ W(
|
|
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__ */ W(
|
|
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 && Q(we),
|
|
1543
|
+
(K.length > 0 || Ue) && xt()
|
|
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
1549
|
return /* @__PURE__ */ G("div", {
|
|
1550
1550
|
className: "flex flex-col gap-5",
|
|
1551
|
-
children: [/* @__PURE__ */ W(
|
|
1551
|
+
children: [/* @__PURE__ */ W(O, {
|
|
1552
1552
|
content: t,
|
|
1553
1553
|
classNames: {
|
|
1554
1554
|
h1: r,
|
|
@@ -1563,21 +1563,21 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1563
1563
|
}
|
|
1564
1564
|
}), e && e.length > 0 && /* @__PURE__ */ W("div", {
|
|
1565
1565
|
className: "flex flex-wrap gap-2",
|
|
1566
|
-
children: e.map((e) => /* @__PURE__ */ W(
|
|
1566
|
+
children: e.map((e) => /* @__PURE__ */ W($, { label: e }, e))
|
|
1567
1567
|
})]
|
|
1568
1568
|
});
|
|
1569
|
-
},
|
|
1569
|
+
}, Fn = {
|
|
1570
1570
|
divider: "_divider_1gzl9_1",
|
|
1571
1571
|
fileCount: "_fileCount_1gzl9_5",
|
|
1572
1572
|
body: "_body_1gzl9_9"
|
|
1573
|
-
},
|
|
1573
|
+
}, In = (e, t, n = void 0) => e.flatMap((e) => {
|
|
1574
1574
|
let r = {
|
|
1575
1575
|
node: e,
|
|
1576
1576
|
parentId: n
|
|
1577
1577
|
};
|
|
1578
|
-
return e.type ===
|
|
1579
|
-
}),
|
|
1580
|
-
let c = M(() =>
|
|
1578
|
+
return e.type === Z.File || !t.has(e.id) ? [r] : [r, ...In(e.items, t, e.id)];
|
|
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 = M(() => In(e, n), [e, n]), l = N({}), [u, d] = P(() => t ?? c[0]?.node.id);
|
|
1581
1581
|
j(() => {
|
|
1582
1582
|
u != null && l.current[u]?.focus();
|
|
1583
1583
|
}, []);
|
|
@@ -1601,14 +1601,14 @@ 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 === Z.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 === Z.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 === Z.Folder ? r(o.node.id) : i(o.node.id);
|
|
1612
1612
|
break;
|
|
1613
1613
|
case "Escape":
|
|
1614
1614
|
e.preventDefault(), a();
|
|
@@ -1617,7 +1617,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1617
1617
|
}
|
|
1618
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 === Z.File) {
|
|
1621
1621
|
let n = e.id === t;
|
|
1622
1622
|
return /* @__PURE__ */ W("div", {
|
|
1623
1623
|
ref: (t) => {
|
|
@@ -1647,21 +1647,21 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1647
1647
|
onClick: () => r(e.id),
|
|
1648
1648
|
onFocus: () => d(e.id),
|
|
1649
1649
|
children: [
|
|
1650
|
-
/* @__PURE__ */ W(
|
|
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
1656
|
/* @__PURE__ */ W("span", {
|
|
1657
1657
|
className: k("min-w-0 flex-1 truncate", s),
|
|
1658
1658
|
children: e.name
|
|
1659
1659
|
}),
|
|
1660
|
-
/* @__PURE__ */ W(
|
|
1661
|
-
size:
|
|
1660
|
+
/* @__PURE__ */ W(Be, {
|
|
1661
|
+
size: L.SM,
|
|
1662
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
1667
|
}), o && e.items.length > 0 && /* @__PURE__ */ W("div", {
|
|
@@ -1676,10 +1676,10 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1676
1676
|
onKeyDown: p,
|
|
1677
1677
|
children: e.map((e) => h(e))
|
|
1678
1678
|
});
|
|
1679
|
-
},
|
|
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 =
|
|
1679
|
+
}, Rn = () => void 0, zn = ({ content: e, description: t, files: n, selectedFileId: r, onSelectFile: i, isFileLoading: a = !1, expandedFolderIds: o = /* @__PURE__ */ new Set(), onToggleFolder: s = Rn, isFileSelectorOpen: c = !1, onFileSelectorOpenChange: l = Rn, fileSelectorAriaLabel: u = "Select file", fileCountLabel: d = (e) => `${e} files`, fileLoadingLabel: f = "Loading file", fileUnsupportedLabel: p = "Preview is not supported for this file", filePreview: m, filePreviewContent: h, detailsStyles: g }) => {
|
|
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
1683
|
type: _t.Text,
|
|
1684
1684
|
text: ""
|
|
1685
1685
|
} : m ?? {
|
|
@@ -1691,14 +1691,14 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1691
1691
|
children: [
|
|
1692
1692
|
S && /* @__PURE__ */ G("div", {
|
|
1693
1693
|
className: "flex shrink-0 items-center gap-3",
|
|
1694
|
-
children: [/* @__PURE__ */ W(
|
|
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__ */ W(
|
|
1701
|
+
renderOverlay: () => /* @__PURE__ */ W(Ln, {
|
|
1702
1702
|
nodes: x,
|
|
1703
1703
|
selectedFileId: r,
|
|
1704
1704
|
expandedFolderIds: o,
|
|
@@ -1708,41 +1708,41 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1708
1708
|
ariaLabel: u,
|
|
1709
1709
|
rowNameClassName: _
|
|
1710
1710
|
}),
|
|
1711
|
-
children: /* @__PURE__ */ W(
|
|
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
1717
|
}), /* @__PURE__ */ W("span", {
|
|
1718
|
-
className: k("shrink-0", y,
|
|
1719
|
-
children: d(
|
|
1718
|
+
className: k("shrink-0", y, Fn.fileCount),
|
|
1719
|
+
children: d(Ut(x))
|
|
1720
1720
|
})]
|
|
1721
1721
|
}),
|
|
1722
1722
|
b && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("p", {
|
|
1723
1723
|
className: k("m-0", _),
|
|
1724
1724
|
children: t
|
|
1725
|
-
}), /* @__PURE__ */ W("div", { className: k("shrink-0",
|
|
1725
|
+
}), /* @__PURE__ */ W("div", { className: k("shrink-0", Fn.divider) })] }),
|
|
1726
1726
|
/* @__PURE__ */ G("div", {
|
|
1727
|
-
className: k("min-h-0 flex-1 text-start", h == null ? "overflow-auto break-words" : "overflow-hidden", h == null &&
|
|
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
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
|
-
switch (
|
|
1735
|
-
case _t.Markdown: return /* @__PURE__ */ W(
|
|
1736
|
-
content:
|
|
1734
|
+
switch (T.type) {
|
|
1735
|
+
case _t.Markdown: return /* @__PURE__ */ W(ee, {
|
|
1736
|
+
content: T.text,
|
|
1737
1737
|
headingClassName: v
|
|
1738
1738
|
});
|
|
1739
|
-
case _t.Text: return /* @__PURE__ */ W(
|
|
1740
|
-
language:
|
|
1741
|
-
value:
|
|
1739
|
+
case _t.Text: return /* @__PURE__ */ W(D, {
|
|
1740
|
+
language: T.language ?? "",
|
|
1741
|
+
value: T.text,
|
|
1742
1742
|
hideDownload: !0
|
|
1743
1743
|
});
|
|
1744
1744
|
case _t.Image: return /* @__PURE__ */ W("img", {
|
|
1745
|
-
src:
|
|
1745
|
+
src: T.url,
|
|
1746
1746
|
alt: C,
|
|
1747
1747
|
className: "max-w-full"
|
|
1748
1748
|
});
|
|
@@ -1755,12 +1755,12 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1755
1755
|
})
|
|
1756
1756
|
]
|
|
1757
1757
|
});
|
|
1758
|
-
},
|
|
1758
|
+
}, Bn = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), Vn = /* @__PURE__ */ function(e) {
|
|
1759
1759
|
return e.Default = "default", e.Warning = "warning", e.Danger = "danger", e;
|
|
1760
|
-
}({}),
|
|
1761
|
-
let t =
|
|
1760
|
+
}({}), Hn = (e) => !Number.isFinite(e.used) || !Number.isFinite(e.total) ? 0 : Math.min(Math.max(e.used, 0), Math.max(e.total, 0)), Un = (e) => Number.isFinite(e) && e > 0 ? e : 1, Wn = ({ used: e, total: t, valueLabel: n }) => n ?? `${Bn.format(e)} / ${Bn.format(t)}`, Gn = ({ total: e }) => Number.isFinite(e) && e > 0, Kn = (e) => e.isUnlimited !== !0 && Gn(e), qn = (e) => Gn(e) ? Math.max(e.used, 0) / e.total : 0, Jn = (e) => {
|
|
1761
|
+
let t = qn(e);
|
|
1762
1762
|
return t >= 1 ? "danger" : t >= .75 ? "warning" : "default";
|
|
1763
|
-
},
|
|
1763
|
+
}, Yn = {
|
|
1764
1764
|
sectionHeading: "_sectionHeading_ltnqp_1",
|
|
1765
1765
|
label: "_label_ltnqp_5",
|
|
1766
1766
|
valuePrimary: "_valuePrimary_ltnqp_9",
|
|
@@ -1769,58 +1769,58 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1769
1769
|
progressFillDefault: "_progressFillDefault_ltnqp_24",
|
|
1770
1770
|
progressFillWarning: "_progressFillWarning_ltnqp_28",
|
|
1771
1771
|
progressFillDanger: "_progressFillDanger_ltnqp_32"
|
|
1772
|
-
},
|
|
1773
|
-
let o =
|
|
1772
|
+
}, Xn = ({ row: e, labelClassName: t, captionClassName: n, valueClassName: r, noteValueClassName: i, noteClassName: a }) => {
|
|
1773
|
+
let o = Wn(e);
|
|
1774
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",
|
|
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
1776
|
children: [/* @__PURE__ */ G("div", {
|
|
1777
1777
|
className: "flex min-w-0 flex-1 flex-col",
|
|
1778
1778
|
children: [/* @__PURE__ */ W("span", {
|
|
1779
|
-
className: k("break-words", t,
|
|
1779
|
+
className: k("break-words", t, Yn.label),
|
|
1780
1780
|
children: e.label
|
|
1781
1781
|
}), e.captionLabel != null && /* @__PURE__ */ W("span", {
|
|
1782
|
-
className: k("break-words", n,
|
|
1782
|
+
className: k("break-words", n, Yn.label),
|
|
1783
1783
|
children: e.captionLabel
|
|
1784
1784
|
})]
|
|
1785
|
-
}),
|
|
1785
|
+
}), Kn(e) ? /* @__PURE__ */ G("div", {
|
|
1786
1786
|
className: "flex w-32 shrink-0 flex-col items-end gap-2",
|
|
1787
1787
|
children: [/* @__PURE__ */ W("div", {
|
|
1788
1788
|
className: k("flex gap-1", r),
|
|
1789
1789
|
children: e.usedLabel != null && e.totalLabel != null ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", {
|
|
1790
|
-
className:
|
|
1790
|
+
className: Yn.valuePrimary,
|
|
1791
1791
|
children: e.usedLabel
|
|
1792
1792
|
}), /* @__PURE__ */ W("span", {
|
|
1793
|
-
className:
|
|
1793
|
+
className: Yn.label,
|
|
1794
1794
|
children: ` / ${e.totalLabel}`
|
|
1795
1795
|
})] }) : /* @__PURE__ */ W("span", {
|
|
1796
|
-
className:
|
|
1796
|
+
className: Yn.label,
|
|
1797
1797
|
children: o
|
|
1798
1798
|
})
|
|
1799
|
-
}), /* @__PURE__ */ W(
|
|
1800
|
-
value:
|
|
1801
|
-
max:
|
|
1802
|
-
size:
|
|
1803
|
-
className: k("!h-1 w-full",
|
|
1799
|
+
}), /* @__PURE__ */ W(De, {
|
|
1800
|
+
value: Hn(e),
|
|
1801
|
+
max: Un(e.total),
|
|
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
1807
|
}) : /* @__PURE__ */ G("div", {
|
|
1808
1808
|
className: "flex shrink-0 flex-col items-end",
|
|
1809
1809
|
children: [/* @__PURE__ */ W("span", {
|
|
1810
|
-
className: k(i,
|
|
1810
|
+
className: k(i, Yn.valuePrimary),
|
|
1811
1811
|
children: o
|
|
1812
1812
|
}), e.noteLabel != null && /* @__PURE__ */ W("span", {
|
|
1813
|
-
className: k(a,
|
|
1813
|
+
className: k(a, Yn.label),
|
|
1814
1814
|
children: e.noteLabel
|
|
1815
1815
|
})]
|
|
1816
1816
|
})]
|
|
1817
1817
|
});
|
|
1818
|
-
},
|
|
1819
|
-
className: k("mb-3 mt-0", t,
|
|
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
1821
|
}), /* @__PURE__ */ W("ul", {
|
|
1822
1822
|
className: "m-0 flex list-none flex-col p-0",
|
|
1823
|
-
children: e.rows.map((e) => /* @__PURE__ */ W(
|
|
1823
|
+
children: e.rows.map((e) => /* @__PURE__ */ W(Xn, {
|
|
1824
1824
|
row: e,
|
|
1825
1825
|
labelClassName: n,
|
|
1826
1826
|
captionClassName: r,
|
|
@@ -1828,11 +1828,11 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1828
1828
|
noteValueClassName: a,
|
|
1829
1829
|
noteClassName: o
|
|
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
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__ */ W(
|
|
1845
|
+
children: [u.map((e) => /* @__PURE__ */ W(Zn, {
|
|
1846
1846
|
group: e,
|
|
1847
1847
|
sectionClassName: o,
|
|
1848
1848
|
labelClassName: t,
|
|
@@ -1851,17 +1851,17 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1851
1851
|
noteValueClassName: i,
|
|
1852
1852
|
noteClassName: a
|
|
1853
1853
|
}, e.label)), c != null && /* @__PURE__ */ W("p", {
|
|
1854
|
-
className: k("m-0 border-t pt-4", s,
|
|
1854
|
+
className: k("m-0 border-t pt-4", s, Yn.divider, Yn.label),
|
|
1855
1855
|
children: c
|
|
1856
1856
|
})]
|
|
1857
1857
|
});
|
|
1858
|
-
},
|
|
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
1860
|
children: e.map((e, s) => /* @__PURE__ */ G("div", {
|
|
1861
1861
|
className: "flex flex-col gap-4",
|
|
1862
|
-
children: [s > 0 && /* @__PURE__ */ W("div", { className: k("shrink-0 border-b",
|
|
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__ */ W(
|
|
1864
|
+
children: /* @__PURE__ */ W(Jt, {
|
|
1865
1865
|
sectionLabel: e.title,
|
|
1866
1866
|
values: e.specs,
|
|
1867
1867
|
sectionClassName: t,
|
|
@@ -1873,7 +1873,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1873
1873
|
})
|
|
1874
1874
|
})]
|
|
1875
1875
|
}, s))
|
|
1876
|
-
}) : null,
|
|
1876
|
+
}) : null, er = ({ pricing: e, pricesSectionLabel: t = "Token pricing", limitsSectionLabel: n = "Usage limits", labelClassName: r = "dial-small-semi-text", valueClassName: i = "dial-small-text", sectionClassName: a = "dial-caption-text" }) => {
|
|
1877
1877
|
if (e == null) return null;
|
|
1878
1878
|
let o = e.prices?.map((e) => ({
|
|
1879
1879
|
label: e.label,
|
|
@@ -1884,13 +1884,13 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1884
1884
|
}));
|
|
1885
1885
|
return /* @__PURE__ */ G("div", {
|
|
1886
1886
|
className: "flex flex-col gap-4",
|
|
1887
|
-
children: [/* @__PURE__ */ W(
|
|
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__ */ W(
|
|
1893
|
+
}), /* @__PURE__ */ W(Jt, {
|
|
1894
1894
|
sectionLabel: n,
|
|
1895
1895
|
values: s ?? [],
|
|
1896
1896
|
labelClassName: r,
|
|
@@ -1898,32 +1898,32 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1898
1898
|
sectionClassName: a
|
|
1899
1899
|
})]
|
|
1900
1900
|
});
|
|
1901
|
-
},
|
|
1901
|
+
}, tr = {
|
|
1902
1902
|
container: "_container_ddi3i_1",
|
|
1903
1903
|
header: "_header_ddi3i_5",
|
|
1904
1904
|
cell: "_cell_ddi3i_10",
|
|
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
1908
|
return /* @__PURE__ */ G("div", {
|
|
1909
|
-
className: k(
|
|
1909
|
+
className: k(tr.container, "grid overflow-hidden rounded-md"),
|
|
1910
1910
|
style: { gridTemplateColumns: a },
|
|
1911
1911
|
children: [e.map((e) => /* @__PURE__ */ W("div", {
|
|
1912
|
-
className: k("px-2 py-1 text-start", r,
|
|
1912
|
+
className: k("px-2 py-1 text-start", r, tr.header),
|
|
1913
1913
|
children: e
|
|
1914
|
-
}, e)), t.map((e, t) => /* @__PURE__ */ W(
|
|
1915
|
-
className: k("px-2 py-1.5", i,
|
|
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
|
});
|
|
1919
|
-
},
|
|
1919
|
+
}, rr = {
|
|
1920
1920
|
divider: "_divider_1f796_1",
|
|
1921
1921
|
description: "_description_1f796_5",
|
|
1922
1922
|
code: "_code_1f796_9"
|
|
1923
|
-
},
|
|
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
1925
|
children: e.tools.map((e, a) => /* @__PURE__ */ G("div", {
|
|
1926
|
-
className: k("flex flex-col gap-3 px-[22px] py-4", a > 0 ?
|
|
1926
|
+
className: k("flex flex-col gap-3 px-[22px] py-4", a > 0 ? rr.divider : void 0),
|
|
1927
1927
|
children: [
|
|
1928
1928
|
/* @__PURE__ */ G("div", {
|
|
1929
1929
|
className: "flex flex-col gap-1",
|
|
@@ -1931,11 +1931,11 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1931
1931
|
className: t,
|
|
1932
1932
|
children: e.name
|
|
1933
1933
|
}), e.description != null && /* @__PURE__ */ W("p", {
|
|
1934
|
-
className: k("m-0", n,
|
|
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__ */ W(
|
|
1938
|
+
e.inputParams != null && e.inputParams.length > 0 && /* @__PURE__ */ W(nr, {
|
|
1939
1939
|
columns: [
|
|
1940
1940
|
"Name",
|
|
1941
1941
|
"Type",
|
|
@@ -1944,11 +1944,11 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1944
1944
|
columnsTemplate: "1fr 1fr auto",
|
|
1945
1945
|
rows: e.inputParams.map((e) => [
|
|
1946
1946
|
/* @__PURE__ */ W("code", {
|
|
1947
|
-
className: k("text-inherit border-none bg-transparent p-0",
|
|
1947
|
+
className: k("text-inherit border-none bg-transparent p-0", rr.code),
|
|
1948
1948
|
children: e.name
|
|
1949
1949
|
}, "name"),
|
|
1950
1950
|
/* @__PURE__ */ W("code", {
|
|
1951
|
-
className: k("text-inherit border-none bg-transparent p-0",
|
|
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__ */ W(
|
|
1959
|
+
e.annotations != null && e.annotations.length > 0 && /* @__PURE__ */ W(nr, {
|
|
1960
1960
|
columns: ["Key", "Value"],
|
|
1961
1961
|
rows: e.annotations.map((e) => [/* @__PURE__ */ W("code", {
|
|
1962
|
-
className: k("text-inherit border-none bg-transparent p-0",
|
|
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,
|
|
@@ -1967,24 +1967,24 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
1967
1967
|
})
|
|
1968
1968
|
]
|
|
1969
1969
|
}, e.name))
|
|
1970
|
-
}),
|
|
1970
|
+
}), ar = new Set([b.Prompt, b.Skill]), or = (e) => e?.resource?.endpointUrl != null || (e?.endpoints?.length ?? 0) > 0, sr = (e, t) => t == null ? e.length === 1 ? e[0] : void 0 : e.find((e) => e.key === t), cr = async () => void 0, lr = [], ur = [], dr = [
|
|
1971
1971
|
"All shared configurations will be lost",
|
|
1972
1972
|
"Users who rely on it will lose access",
|
|
1973
1973
|
"Cannot be undone"
|
|
1974
|
-
],
|
|
1974
|
+
], fr = [
|
|
1975
1975
|
"You will lose access to this item",
|
|
1976
1976
|
"Other people keep their access",
|
|
1977
1977
|
"You will need a new invitation to get it back"
|
|
1978
|
-
],
|
|
1978
|
+
], pr = [
|
|
1979
1979
|
"Everyone loses access to the published copy",
|
|
1980
1980
|
"Your own copy is not deleted",
|
|
1981
1981
|
"You can publish it again later"
|
|
1982
|
-
],
|
|
1982
|
+
], mr = [
|
|
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
|
-
],
|
|
1987
|
-
let { subViewTitleClassName: we = "dial-body-semi-text", overviewSectionClassName: Te = "dial-caption-text", overviewLabelClassName:
|
|
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
1988
|
"--cat-details-backdrop": B?.backdrop,
|
|
1989
1989
|
"--cat-details-bg": B?.background,
|
|
1990
1990
|
"--cat-details-border": B?.border,
|
|
@@ -2020,14 +2020,14 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2020
2020
|
"--cat-cred-card-icon": B?.credentialsCardIcon,
|
|
2021
2021
|
"--cat-cred-card-title-text": B?.credentialsCardTitleText,
|
|
2022
2022
|
"--cat-cred-card-description-text": B?.credentialsCardDescriptionText
|
|
2023
|
-
}), [Pe, Fe] = P(n), [V, Ie] = P(""), [Le, Re] = P(!1), [
|
|
2024
|
-
let t =
|
|
2025
|
-
t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t),
|
|
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 === _t.Image ? e.preview.url : null;
|
|
2025
|
+
t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t), it.current = n, Qe(e);
|
|
2026
2026
|
}, []);
|
|
2027
2027
|
j(() => {
|
|
2028
|
-
at.current += 1, ot(null), et(!1), nt(
|
|
2028
|
+
at.current += 1, ot(null), et(!1), nt(Wt(Ye?.files ?? [])), H(!1);
|
|
2029
2029
|
}, [e.id, Xe]), j(() => () => {
|
|
2030
|
-
let e =
|
|
2030
|
+
let e = it.current;
|
|
2031
2031
|
e != null && e.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
2032
2032
|
}, []);
|
|
2033
2033
|
let st = A((e) => {
|
|
@@ -2035,13 +2035,13 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2035
2035
|
let n = new Set(t);
|
|
2036
2036
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
2037
2037
|
});
|
|
2038
|
-
}, []),
|
|
2038
|
+
}, []), ct = A(async (e) => {
|
|
2039
2039
|
if (e === Xe) {
|
|
2040
2040
|
at.current += 1, ot(null), et(!1);
|
|
2041
2041
|
return;
|
|
2042
2042
|
}
|
|
2043
|
-
if (
|
|
2044
|
-
if (
|
|
2043
|
+
if (I == null && ce == null && le == null) return;
|
|
2044
|
+
if (I != null) {
|
|
2045
2045
|
at.current += 1, ot({
|
|
2046
2046
|
id: e,
|
|
2047
2047
|
preview: null
|
|
@@ -2054,10 +2054,10 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2054
2054
|
preview: null
|
|
2055
2055
|
}), et(!0);
|
|
2056
2056
|
try {
|
|
2057
|
-
let n =
|
|
2057
|
+
let n = le == null ? await ce?.(e).then((e) => e == null ? void 0 : {
|
|
2058
2058
|
type: _t.Markdown,
|
|
2059
2059
|
text: e
|
|
2060
|
-
}) : await
|
|
2060
|
+
}) : await le(e);
|
|
2061
2061
|
if (at.current !== t) {
|
|
2062
2062
|
n?.type === _t.Image && n.url.startsWith("blob:") && URL.revokeObjectURL(n.url);
|
|
2063
2063
|
return;
|
|
@@ -2078,43 +2078,43 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2078
2078
|
}, [
|
|
2079
2079
|
Xe,
|
|
2080
2080
|
ce,
|
|
2081
|
+
le,
|
|
2081
2082
|
I,
|
|
2082
|
-
ue,
|
|
2083
2083
|
ot
|
|
2084
|
-
]),
|
|
2084
|
+
]), lt = Ze?.id ?? Xe, mt = () => Ze == null ? null : Ze.preview == null ? {
|
|
2085
2085
|
type: _t.Text,
|
|
2086
|
-
text:
|
|
2087
|
-
} : Ze.preview, ht = Ze != null &&
|
|
2088
|
-
if (!
|
|
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
|
-
let n = await
|
|
2092
|
+
let n = await h(e);
|
|
2093
2093
|
if (Je.current !== t) return;
|
|
2094
|
-
|
|
2094
|
+
Be(n), qe(!0), Ue(!1);
|
|
2095
2095
|
} catch {
|
|
2096
2096
|
if (Je.current !== t) return;
|
|
2097
2097
|
Ge(!0), Ue(!1), Je.current = null;
|
|
2098
2098
|
}
|
|
2099
2099
|
})();
|
|
2100
|
-
}, [
|
|
2100
|
+
}, [h, e]);
|
|
2101
2101
|
j(() => {
|
|
2102
2102
|
Le && gt();
|
|
2103
2103
|
}, [Le, gt]);
|
|
2104
2104
|
let Y = A((e, t) => {
|
|
2105
2105
|
Je.current = null, qe(!1), gt(), w?.(e, t);
|
|
2106
|
-
}, [gt, w]), X =
|
|
2106
|
+
}, [gt, w]), X = pt({
|
|
2107
2107
|
item: e,
|
|
2108
|
-
history:
|
|
2109
|
-
folderItems:
|
|
2108
|
+
history: ze,
|
|
2109
|
+
folderItems: g,
|
|
2110
2110
|
hasWriteAccess: x,
|
|
2111
2111
|
defaultAuthor: S,
|
|
2112
2112
|
onCreateFolder: E,
|
|
2113
|
-
onPublish: C ??
|
|
2113
|
+
onPublish: C ?? cr,
|
|
2114
2114
|
onPublishSuccess: Y,
|
|
2115
2115
|
onPublishError: T,
|
|
2116
2116
|
onFetchExistingRules: ee
|
|
2117
|
-
}),
|
|
2117
|
+
}), Z = M(() => ft({
|
|
2118
2118
|
hasSelectedFolder: X.selectedFolderPath != null,
|
|
2119
2119
|
hasExistingPublicationInFolder: X.hasExistingPublicationInFolder,
|
|
2120
2120
|
hasWriteAccess: X.hasWriteAccess,
|
|
@@ -2126,23 +2126,23 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2126
2126
|
X.hasWriteAccess,
|
|
2127
2127
|
X.isSubmitting,
|
|
2128
2128
|
X.hasSubmitError
|
|
2129
|
-
]), [
|
|
2129
|
+
]), [vt, yt] = P(!1), [bt, Q] = P(null), [xt, St] = P(!1), [Ct, wt] = P(null), [Tt, Et] = P(null), [Dt, Ot] = P(null);
|
|
2130
2130
|
j(() => {
|
|
2131
2131
|
Fe(n);
|
|
2132
2132
|
}, [e.id, n]), j(() => {
|
|
2133
|
-
Ie(""), Re(!1), X.reset(),
|
|
2133
|
+
Ie(""), Re(!1), X.reset(), Be([]), Ge(!1), Ue(!1), qe(!1), Je.current = null, Ot(null), yt(!1), Q(null), St(!1), wt(null), Et(null);
|
|
2134
2134
|
}, [e.id]);
|
|
2135
|
-
let
|
|
2136
|
-
|
|
2135
|
+
let kt = A(() => yt(!0), []), At = A(() => yt(!1), []), jt = A(() => {
|
|
2136
|
+
Q(q.Delete);
|
|
2137
2137
|
}, []), Mt = A((t) => {
|
|
2138
|
-
Et(t ?? (e.credentials == null ? null :
|
|
2139
|
-
}, [e.credentials]),
|
|
2140
|
-
|
|
2141
|
-
}, []),
|
|
2142
|
-
|
|
2143
|
-
}, []),
|
|
2138
|
+
Et(t ?? (e.credentials == null ? null : c(e.credentials))), Q(q.Logout);
|
|
2139
|
+
}, [e.credentials]), Pt = A(() => {
|
|
2140
|
+
Q(q.Unshare);
|
|
2141
|
+
}, []), Ft = A(() => {
|
|
2142
|
+
Q(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,114 +2150,114 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2150
2150
|
}));
|
|
2151
2151
|
}
|
|
2152
2152
|
return t;
|
|
2153
|
-
}, [
|
|
2154
|
-
|
|
2153
|
+
}, [ze]), It = Ke && $.length > 0, Lt = A((e) => e || (D?.rootFolderLabel ?? "Organization"), [D]), Rt = A(() => {
|
|
2154
|
+
Q(q.Unpublish);
|
|
2155
2155
|
}, []), zt = A((e) => {
|
|
2156
|
-
wt(e),
|
|
2156
|
+
wt(e), Q(q.DeleteApiKey);
|
|
2157
2157
|
}, []), Bt = A(() => {
|
|
2158
|
-
|
|
2159
|
-
}, [
|
|
2160
|
-
if (!(
|
|
2158
|
+
xt || (Q(null), wt(null), Et(null), Ot(null));
|
|
2159
|
+
}, [xt]), Vt = A(async () => {
|
|
2160
|
+
if (!(xt || bt == null)) {
|
|
2161
2161
|
St(!0);
|
|
2162
2162
|
try {
|
|
2163
|
-
switch (
|
|
2163
|
+
switch (bt) {
|
|
2164
2164
|
case q.Delete:
|
|
2165
|
-
await
|
|
2165
|
+
await L?.(e);
|
|
2166
2166
|
break;
|
|
2167
2167
|
case q.Unshare:
|
|
2168
|
-
await
|
|
2168
|
+
await de?.(e);
|
|
2169
2169
|
break;
|
|
2170
2170
|
case q.RevokeAccess:
|
|
2171
|
-
await
|
|
2171
|
+
await me?.(e);
|
|
2172
2172
|
break;
|
|
2173
2173
|
case q.Logout:
|
|
2174
|
-
Tt != null && await
|
|
2174
|
+
Tt != null && await xe?.(e, { level: Tt });
|
|
2175
2175
|
break;
|
|
2176
2176
|
case q.DeleteApiKey:
|
|
2177
|
-
Ct != null && await
|
|
2177
|
+
Ct != null && await xe?.(e, { level: Ct });
|
|
2178
2178
|
break;
|
|
2179
2179
|
case q.Unpublish: {
|
|
2180
|
-
let t =
|
|
2181
|
-
t != null && await
|
|
2180
|
+
let t = sr($, Dt);
|
|
2181
|
+
t != null && await ve?.(e, t.segments);
|
|
2182
2182
|
break;
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
|
-
|
|
2185
|
+
Q(null), wt(null), Et(null), Ot(null), _r.has(bt) && a();
|
|
2186
2186
|
} catch {
|
|
2187
|
-
|
|
2187
|
+
Q(null), wt(null), Et(null), Ot(null);
|
|
2188
2188
|
} finally {
|
|
2189
2189
|
St(!1);
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
2192
|
}, [
|
|
2193
|
-
|
|
2194
|
-
|
|
2193
|
+
xt,
|
|
2194
|
+
bt,
|
|
2195
2195
|
Ct,
|
|
2196
2196
|
Tt,
|
|
2197
2197
|
e,
|
|
2198
|
+
L,
|
|
2198
2199
|
de,
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
ye,
|
|
2200
|
+
me,
|
|
2201
|
+
ve,
|
|
2202
2202
|
Dt,
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2203
|
+
$,
|
|
2204
|
+
xe,
|
|
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 (bt != null) {
|
|
2212
2212
|
Bt();
|
|
2213
2213
|
return;
|
|
2214
2214
|
}
|
|
2215
|
-
|
|
2215
|
+
a();
|
|
2216
2216
|
}
|
|
2217
2217
|
};
|
|
2218
2218
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
2219
2219
|
}, [
|
|
2220
2220
|
t,
|
|
2221
|
-
|
|
2222
|
-
|
|
2221
|
+
a,
|
|
2222
|
+
bt,
|
|
2223
2223
|
Bt
|
|
2224
2224
|
]);
|
|
2225
|
-
let
|
|
2225
|
+
let Ht = A(() => Re(!0), []), Ut = A(() => {
|
|
2226
2226
|
Re(!1), X.reset();
|
|
2227
2227
|
}, [X]), Kt = A(async () => {
|
|
2228
|
-
await X.handleSubmit() &&
|
|
2229
|
-
}, [X,
|
|
2228
|
+
await X.handleSubmit() && Ut();
|
|
2229
|
+
}, [X, Ut]), qt = A(() => {
|
|
2230
2230
|
let t = !Pe;
|
|
2231
|
-
Fe(t),
|
|
2231
|
+
Fe(t), o?.(e.id, t);
|
|
2232
2232
|
}, [
|
|
2233
2233
|
Pe,
|
|
2234
2234
|
e.id,
|
|
2235
|
-
|
|
2235
|
+
o
|
|
2236
2236
|
]), Jt = M(() => {
|
|
2237
|
-
let t = [], n =
|
|
2237
|
+
let t = [], n = ar.has(e.type);
|
|
2238
2238
|
return n || t.push({
|
|
2239
2239
|
id: K.About,
|
|
2240
|
-
label:
|
|
2240
|
+
label: z?.tabAboutLabel ?? "About"
|
|
2241
2241
|
}), (n || e.details?.promptContent != null) && t.push({
|
|
2242
2242
|
id: K.Content,
|
|
2243
|
-
label:
|
|
2243
|
+
label: z?.tabContentLabel ?? "Details"
|
|
2244
2244
|
}), e.details?.overview != null && t.push({
|
|
2245
2245
|
id: K.Overview,
|
|
2246
|
-
label:
|
|
2246
|
+
label: z?.tabOverviewLabel ?? "Overview"
|
|
2247
2247
|
}), e.details?.pricing != null && t.push({
|
|
2248
2248
|
id: K.Pricing,
|
|
2249
|
-
label:
|
|
2249
|
+
label: z?.tabPricingLabel ?? "Pricing"
|
|
2250
2250
|
}), e.details?.limits != null && t.push({
|
|
2251
2251
|
id: K.Limits,
|
|
2252
|
-
label:
|
|
2252
|
+
label: z?.tabLimitsLabel ?? "Limits"
|
|
2253
2253
|
}), e.details?.tools != null && t.push({
|
|
2254
2254
|
id: K.Tools,
|
|
2255
|
-
label:
|
|
2256
|
-
}),
|
|
2255
|
+
label: z?.tabToolsLabel ?? "Tools"
|
|
2256
|
+
}), or(e.details?.api) && t.push({
|
|
2257
2257
|
id: K.Api,
|
|
2258
|
-
label:
|
|
2258
|
+
label: z?.tabConnectLabel ?? "Connect"
|
|
2259
2259
|
}), t;
|
|
2260
|
-
}, [e,
|
|
2260
|
+
}, [e, z]), Yt = N(null);
|
|
2261
2261
|
j(() => {
|
|
2262
2262
|
let t = Yt.current !== e.id;
|
|
2263
2263
|
Yt.current = e.id, (t || !Jt.some((e) => e.id === V)) && Ie(Jt[0]?.id ?? "");
|
|
@@ -2266,93 +2266,93 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2266
2266
|
Jt,
|
|
2267
2267
|
V
|
|
2268
2268
|
]);
|
|
2269
|
-
let Xt =
|
|
2270
|
-
switch (
|
|
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 (bt) {
|
|
2271
2271
|
case q.Delete: {
|
|
2272
|
-
let t =
|
|
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
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:
|
|
2282
|
+
loadingStatusLabel: z?.deletingStatusLabel ?? "Deleting",
|
|
2283
2283
|
variant: J.Danger
|
|
2284
2284
|
};
|
|
2285
2285
|
}
|
|
2286
2286
|
case q.Unshare: {
|
|
2287
|
-
let t =
|
|
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
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:
|
|
2297
|
+
loadingStatusLabel: z?.unsharingStatusLabel ?? "Removing",
|
|
2298
2298
|
variant: J.Info
|
|
2299
2299
|
};
|
|
2300
2300
|
}
|
|
2301
2301
|
case q.RevokeAccess: {
|
|
2302
|
-
let t =
|
|
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
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:
|
|
2312
|
+
loadingStatusLabel: z?.revokingShareStatusLabel ?? "Revoking access",
|
|
2313
2313
|
variant: J.Danger
|
|
2314
2314
|
};
|
|
2315
2315
|
}
|
|
2316
2316
|
case q.Unpublish: {
|
|
2317
|
-
let t =
|
|
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
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
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:
|
|
2333
|
+
loadingStatusLabel: z?.unpublishingStatusLabel ?? "Requesting unpublish",
|
|
2334
2334
|
variant: J.Danger
|
|
2335
2335
|
};
|
|
2336
2336
|
}
|
|
2337
2337
|
case q.Logout: {
|
|
2338
|
-
let e =
|
|
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:
|
|
2344
|
+
loadingStatusLabel: z?.loggingOutStatusLabel ?? "Logging out",
|
|
2345
2345
|
variant: J.Info
|
|
2346
2346
|
};
|
|
2347
2347
|
}
|
|
2348
2348
|
case q.DeleteApiKey: {
|
|
2349
|
-
let e =
|
|
2349
|
+
let e = z?.deleteActionLabel ?? "Delete", t = Ct ?? 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:
|
|
2355
|
+
loadingStatusLabel: z?.deletingStatusLabel ?? "Deleting",
|
|
2356
2356
|
variant: J.Danger,
|
|
2357
2357
|
cardVariant: J.Info
|
|
2358
2358
|
};
|
|
@@ -2360,111 +2360,111 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2360
2360
|
default: return null;
|
|
2361
2361
|
}
|
|
2362
2362
|
}, [
|
|
2363
|
-
|
|
2363
|
+
bt,
|
|
2364
2364
|
e.name,
|
|
2365
2365
|
Ct,
|
|
2366
|
-
|
|
2367
|
-
|
|
2366
|
+
z,
|
|
2367
|
+
$,
|
|
2368
2368
|
Lt
|
|
2369
|
-
]), ln = cn != null, un =
|
|
2369
|
+
]), ln = cn != null, un = bt === q.Unpublish && sr($, Dt) == null, dn = ln || Le || vt, fn = e.credentials == null ? "" : (z?.credentialsManagementTitle ?? hr)(e.credentials.authenticationType), pn = ln ? {
|
|
2370
2370
|
title: cn.title,
|
|
2371
|
-
isBackDisabled:
|
|
2371
|
+
isBackDisabled: xt,
|
|
2372
2372
|
onBack: Bt
|
|
2373
2373
|
} : Le ? {
|
|
2374
|
-
title:
|
|
2374
|
+
title: rn,
|
|
2375
2375
|
isBackDisabled: X.isSubmitting,
|
|
2376
|
-
onBack:
|
|
2377
|
-
} :
|
|
2376
|
+
onBack: Ut
|
|
2377
|
+
} : vt ? {
|
|
2378
2378
|
title: fn,
|
|
2379
2379
|
isBackDisabled: !1,
|
|
2380
|
-
onBack:
|
|
2381
|
-
} : null, mn = pn?.title ??
|
|
2380
|
+
onBack: At
|
|
2381
|
+
} : null, mn = pn?.title ?? Qt;
|
|
2382
2382
|
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
|
|
2383
|
-
style:
|
|
2384
|
-
className: k("fixed inset-0 z-50 transition-opacity duration-300",
|
|
2385
|
-
onClick:
|
|
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
|
+
onClick: a,
|
|
2386
2386
|
"aria-hidden": "true"
|
|
2387
2387
|
}), /* @__PURE__ */ G("div", {
|
|
2388
2388
|
role: "dialog",
|
|
2389
2389
|
"aria-modal": "true",
|
|
2390
2390
|
"aria-label": mn,
|
|
2391
|
-
style:
|
|
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",
|
|
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
2394
|
/* @__PURE__ */ G("div", {
|
|
2395
2395
|
className: "flex shrink-0 items-center gap-2 px-6 py-3",
|
|
2396
|
-
children: [pn != null && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(
|
|
2397
|
-
icon: /* @__PURE__ */ W(
|
|
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
2404
|
}), /* @__PURE__ */ W("span", {
|
|
2405
|
-
className: k("flex-1", we,
|
|
2405
|
+
className: k("flex-1", we, Sn.publishTitle),
|
|
2406
2406
|
children: pn.title
|
|
2407
2407
|
})] }), pn == null && /* @__PURE__ */ G(U, { children: [
|
|
2408
2408
|
/* @__PURE__ */ W("div", { className: "flex-1" }),
|
|
2409
|
-
!i &&
|
|
2409
|
+
!i && s?.(e) !== !1 && /* @__PURE__ */ W(Nt, {
|
|
2410
2410
|
isStarred: Pe,
|
|
2411
|
-
ariaLabel:
|
|
2411
|
+
ariaLabel: nn,
|
|
2412
2412
|
onClick: qt
|
|
2413
2413
|
}),
|
|
2414
|
-
/* @__PURE__ */ W(
|
|
2415
|
-
onClose:
|
|
2416
|
-
size:
|
|
2417
|
-
ariaLabel:
|
|
2414
|
+
/* @__PURE__ */ W(ue, {
|
|
2415
|
+
onClose: a,
|
|
2416
|
+
size: pe.Standard,
|
|
2417
|
+
ariaLabel: en
|
|
2418
2418
|
})
|
|
2419
2419
|
] })]
|
|
2420
2420
|
}),
|
|
2421
|
-
/* @__PURE__ */ W("div", { className: k("shrink-0",
|
|
2421
|
+
/* @__PURE__ */ W("div", { className: k("shrink-0", Sn.divider) }),
|
|
2422
2422
|
/* @__PURE__ */ G("div", {
|
|
2423
|
-
className: k("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto",
|
|
2423
|
+
className: k("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto", Sn.content),
|
|
2424
2424
|
children: [
|
|
2425
|
-
ln && /* @__PURE__ */ W(
|
|
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:
|
|
2430
|
+
messageClassName: Ae,
|
|
2431
|
+
children: bt === q.Unpublish && $.length > 1 && /* @__PURE__ */ W(Oe, {
|
|
2432
|
+
ariaLabel: z?.unpublishFolderGroupAriaLabel ?? "Published folders",
|
|
2433
2433
|
value: Dt ?? void 0,
|
|
2434
|
-
onChange:
|
|
2435
|
-
disabled:
|
|
2436
|
-
items:
|
|
2434
|
+
onChange: Ot,
|
|
2435
|
+
disabled: xt,
|
|
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 && !Le &&
|
|
2443
|
+
!ln && !Le && vt && /* @__PURE__ */ W(xn, {
|
|
2444
2444
|
item: e,
|
|
2445
|
-
onLogin:
|
|
2445
|
+
onLogin: be,
|
|
2446
2446
|
onRequestLogout: Mt,
|
|
2447
2447
|
onRequestDeleteApiKey: zt,
|
|
2448
|
-
texts:
|
|
2449
|
-
detailsStyles:
|
|
2448
|
+
texts: z,
|
|
2449
|
+
detailsStyles: Se
|
|
2450
2450
|
}),
|
|
2451
2451
|
!ln && Le && /* @__PURE__ */ W("div", {
|
|
2452
2452
|
className: "p-[22px]",
|
|
2453
|
-
children: /* @__PURE__ */ W(
|
|
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:
|
|
2460
|
+
history: ze,
|
|
2461
2461
|
isHistoryLoading: He,
|
|
2462
2462
|
hasHistoryError: We,
|
|
2463
2463
|
folderItems: X.folderItems,
|
|
2464
2464
|
selectedFolderPath: X.selectedFolderPath,
|
|
2465
2465
|
onSelectedFolderPathChange: X.setSelectedFolderPath,
|
|
2466
2466
|
onCreateFolder: X.handleCreateFolder,
|
|
2467
|
-
expandedPaths:
|
|
2467
|
+
expandedPaths: _,
|
|
2468
2468
|
onExpandedPathsChange: y,
|
|
2469
2469
|
loadingPaths: b,
|
|
2470
2470
|
hasExistingPublicationInFolder: X.hasExistingPublicationInFolder,
|
|
@@ -2487,157 +2487,157 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2487
2487
|
})
|
|
2488
2488
|
}),
|
|
2489
2489
|
!dn && /* @__PURE__ */ G(U, { children: [
|
|
2490
|
-
/* @__PURE__ */ W(
|
|
2490
|
+
/* @__PURE__ */ W(Nn, {
|
|
2491
2491
|
item: e,
|
|
2492
|
-
onUseInChat:
|
|
2493
|
-
isPrimaryActionVisible:
|
|
2494
|
-
onShare:
|
|
2492
|
+
onUseInChat: l,
|
|
2493
|
+
isPrimaryActionVisible: u,
|
|
2494
|
+
onShare: f,
|
|
2495
2495
|
shareOverlay: te,
|
|
2496
|
-
isShareVisible:
|
|
2497
|
-
isSharePrimary:
|
|
2498
|
-
isPublishVisible:
|
|
2499
|
-
isPublishPrimary:
|
|
2500
|
-
onOpenPublish:
|
|
2501
|
-
isUnpublishVisible:
|
|
2496
|
+
isShareVisible: ne,
|
|
2497
|
+
isSharePrimary: re,
|
|
2498
|
+
isPublishVisible: p,
|
|
2499
|
+
isPublishPrimary: m,
|
|
2500
|
+
onOpenPublish: Ht,
|
|
2501
|
+
isUnpublishVisible: ye,
|
|
2502
2502
|
hasPublishedFolders: It,
|
|
2503
|
-
isPublishHistoryResolved:
|
|
2503
|
+
isPublishHistoryResolved: h == null || Ke,
|
|
2504
2504
|
onRequestPublishHistory: gt,
|
|
2505
|
-
onOpenUnpublish:
|
|
2505
|
+
onOpenUnpublish: ve ? Rt : void 0,
|
|
2506
2506
|
onEdit: ae,
|
|
2507
2507
|
onDownload: oe,
|
|
2508
2508
|
isDownloadVisible: se,
|
|
2509
2509
|
isDownloadPrimary: F,
|
|
2510
|
-
onDelete:
|
|
2511
|
-
onUnshare:
|
|
2512
|
-
isUnshareVisible:
|
|
2513
|
-
onRevokeShare:
|
|
2514
|
-
onFetchRecipientsCount:
|
|
2515
|
-
isRevokeShareVisible:
|
|
2516
|
-
onLogin:
|
|
2517
|
-
onLogout:
|
|
2518
|
-
onOpenCredentialsManagement:
|
|
2510
|
+
onDelete: L ? jt : 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: kt,
|
|
2519
2519
|
onRequestLogout: Mt,
|
|
2520
|
-
texts:
|
|
2521
|
-
detailsStyles:
|
|
2520
|
+
texts: z,
|
|
2521
|
+
detailsStyles: Se,
|
|
2522
2522
|
isReadonly: i
|
|
2523
2523
|
}),
|
|
2524
2524
|
e.credentials != null && (() => {
|
|
2525
|
-
let t =
|
|
2525
|
+
let t = d(e.credentials);
|
|
2526
2526
|
return t != null && /* @__PURE__ */ W("div", {
|
|
2527
2527
|
className: "px-6",
|
|
2528
|
-
children: /* @__PURE__ */ W(
|
|
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
2535
|
/* @__PURE__ */ G("div", {
|
|
2536
2536
|
className: "flex items-center px-6",
|
|
2537
|
-
children: [/* @__PURE__ */ W(
|
|
2537
|
+
children: [/* @__PURE__ */ W(Ne, {
|
|
2538
2538
|
tabs: Jt,
|
|
2539
2539
|
activeTabId: V,
|
|
2540
2540
|
onTabChange: Ie
|
|
2541
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__ */ W(
|
|
2545
|
+
children: /* @__PURE__ */ W(je, {
|
|
2546
2546
|
showTitle: !1,
|
|
2547
2547
|
paragraph: {
|
|
2548
2548
|
rows: 1,
|
|
2549
2549
|
width: "72px"
|
|
2550
2550
|
},
|
|
2551
2551
|
active: !0,
|
|
2552
|
-
color:
|
|
2552
|
+
color: Sn.skeletonColor
|
|
2553
2553
|
})
|
|
2554
2554
|
})]
|
|
2555
2555
|
}),
|
|
2556
2556
|
/* @__PURE__ */ G("div", {
|
|
2557
2557
|
className: k("min-h-0 flex-1 overflow-y-auto", V !== K.Overview && "px-6"),
|
|
2558
2558
|
children: [
|
|
2559
|
-
V === K.About && /* @__PURE__ */ W(
|
|
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
|
-
V === K.Content && /* @__PURE__ */ W(
|
|
2564
|
+
V === K.Content && /* @__PURE__ */ W(zn, {
|
|
2565
2565
|
content: Ye?.content ?? "",
|
|
2566
2566
|
filePreview: mt(),
|
|
2567
2567
|
filePreviewContent: ht,
|
|
2568
2568
|
description: Ye?.description ?? e.description,
|
|
2569
2569
|
files: Ye?.files,
|
|
2570
|
-
selectedFileId:
|
|
2571
|
-
onSelectFile: (e) => void
|
|
2570
|
+
selectedFileId: lt,
|
|
2571
|
+
onSelectFile: (e) => void ct(e),
|
|
2572
2572
|
isFileLoading: $e,
|
|
2573
2573
|
expandedFolderIds: tt,
|
|
2574
2574
|
onToggleFolder: st,
|
|
2575
2575
|
isFileSelectorOpen: rt,
|
|
2576
|
-
onFileSelectorOpenChange:
|
|
2577
|
-
fileSelectorAriaLabel:
|
|
2578
|
-
fileCountLabel:
|
|
2579
|
-
fileLoadingLabel:
|
|
2580
|
-
fileUnsupportedLabel:
|
|
2581
|
-
detailsStyles:
|
|
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
|
-
V === K.Overview && /* @__PURE__ */ W(
|
|
2583
|
+
V === K.Overview && /* @__PURE__ */ W($n, {
|
|
2584
2584
|
sections: e.details?.overview?.sections,
|
|
2585
2585
|
sectionClassName: Te,
|
|
2586
|
-
labelClassName:
|
|
2587
|
-
valueClassName:
|
|
2588
|
-
valueTrueClassName:
|
|
2586
|
+
labelClassName: Ee,
|
|
2587
|
+
valueClassName: De,
|
|
2588
|
+
valueTrueClassName: ke,
|
|
2589
2589
|
yesLabel: Xt,
|
|
2590
|
-
noLabel:
|
|
2590
|
+
noLabel: Zt
|
|
2591
2591
|
}),
|
|
2592
|
-
V === K.Pricing && /* @__PURE__ */ W(
|
|
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
|
-
V === K.Limits && /* @__PURE__ */ W(
|
|
2597
|
+
V === K.Limits && /* @__PURE__ */ W(Qn, {
|
|
2598
2598
|
limits: e.details?.limits,
|
|
2599
2599
|
footerNote: Ce
|
|
2600
2600
|
}),
|
|
2601
|
-
V === K.Api &&
|
|
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
|
-
V === K.Tools && /* @__PURE__ */ W(
|
|
2613
|
+
V === K.Tools && /* @__PURE__ */ W(ir, { tools: e.details?.tools })
|
|
2614
2614
|
]
|
|
2615
2615
|
})
|
|
2616
2616
|
] })
|
|
2617
2617
|
]
|
|
2618
2618
|
}),
|
|
2619
|
-
ln && /* @__PURE__ */ W(
|
|
2619
|
+
ln && /* @__PURE__ */ W(tn, {
|
|
2620
2620
|
confirmLabel: cn.confirmLabel,
|
|
2621
2621
|
cancelLabel: sn,
|
|
2622
2622
|
variant: cn.variant,
|
|
2623
|
-
isLoading:
|
|
2623
|
+
isLoading: xt,
|
|
2624
2624
|
isConfirmDisabled: un,
|
|
2625
2625
|
loadingStatusLabel: cn.loadingStatusLabel,
|
|
2626
2626
|
onConfirm: Vt,
|
|
2627
2627
|
onCancel: Bt
|
|
2628
2628
|
}),
|
|
2629
|
-
!ln && Le && /* @__PURE__ */ W(
|
|
2629
|
+
!ln && Le && /* @__PURE__ */ W(ut, {
|
|
2630
2630
|
version: e.version,
|
|
2631
2631
|
hasExistingPublicationInFolder: X.hasExistingPublicationInFolder,
|
|
2632
|
-
isSubmitDisabled:
|
|
2633
|
-
isSubmitLoading:
|
|
2634
|
-
onCancel:
|
|
2632
|
+
isSubmitDisabled: Z.isSubmitDisabled,
|
|
2633
|
+
isSubmitLoading: Z.isSubmitLoading,
|
|
2634
|
+
onCancel: Ut,
|
|
2635
2635
|
onSubmit: Kt,
|
|
2636
2636
|
labels: D
|
|
2637
2637
|
})
|
|
2638
2638
|
]
|
|
2639
2639
|
})] });
|
|
2640
|
-
},
|
|
2640
|
+
}, yr = {
|
|
2641
2641
|
pageNav: "_pageNav_14qfn_1",
|
|
2642
2642
|
navBtn: "_navBtn_14qfn_6",
|
|
2643
2643
|
titleText: "_titleText_14qfn_23",
|
|
@@ -2652,7 +2652,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2652
2652
|
favFadeIn: "_favFadeIn_14qfn_1",
|
|
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
2656
|
let [m, h] = P(t), [g, _] = P(!1), v = (t) => {
|
|
2657
2657
|
t.stopPropagation();
|
|
2658
2658
|
let r = !m;
|
|
@@ -2664,33 +2664,33 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2664
2664
|
e,
|
|
2665
2665
|
g
|
|
2666
2666
|
]);
|
|
2667
|
-
return /* @__PURE__ */ G(
|
|
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: k("box-border min-w-0 cursor-pointer flex-row items-start gap-1 text-start", g &&
|
|
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__ */ W(
|
|
2680
|
-
size:
|
|
2681
|
-
className: k("absolute end-3 top-3 shrink-0",
|
|
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
2685
|
/* @__PURE__ */ W("div", {
|
|
2686
2686
|
className: "flex min-w-0 flex-1 flex-col items-start gap-1",
|
|
2687
|
-
children: /* @__PURE__ */ W(
|
|
2687
|
+
children: /* @__PURE__ */ W(kt, {
|
|
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: Y.LG,
|
|
2694
2694
|
query: l,
|
|
2695
2695
|
className: "min-w-0 self-stretch",
|
|
2696
2696
|
styles: {
|
|
@@ -2701,22 +2701,22 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2701
2701
|
lastUsedClassName: c
|
|
2702
2702
|
}
|
|
2703
2703
|
},
|
|
2704
|
-
iconOverlay: /* @__PURE__ */ W(
|
|
2704
|
+
iconOverlay: /* @__PURE__ */ W(jt, {
|
|
2705
2705
|
credentials: e.credentials,
|
|
2706
2706
|
loggedOutLabel: p
|
|
2707
2707
|
})
|
|
2708
2708
|
})
|
|
2709
2709
|
}),
|
|
2710
|
-
r?.(e) !== !1 && /* @__PURE__ */ W(
|
|
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"
|
|
2716
2716
|
})
|
|
2717
2717
|
]
|
|
2718
2718
|
});
|
|
2719
|
-
},
|
|
2719
|
+
}, xr = 2, Sr = (e) => {
|
|
2720
2720
|
let t = e.getBoundingClientRect(), n = window.scrollX, r = window.scrollY, i = window.getComputedStyle(e).transform;
|
|
2721
2721
|
if (!i || i === "none") return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2722
2722
|
try {
|
|
@@ -2725,8 +2725,8 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2725
2725
|
} catch {
|
|
2726
2726
|
return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2727
2727
|
}
|
|
2728
|
-
},
|
|
2729
|
-
let h = o?.typography?.titleClassName ?? "dial-body-semi-text", g = o?.typography?.countClassName ?? "dial-tiny-semi-text", _ =
|
|
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", _ = 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,30 +2738,30 @@ 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 = M(() => [...e].sort((e, t) => (new Date(t.updatedAt || "").getTime() ?? 0) - (new Date(e.updatedAt || "").getTime() ?? 0)), [e]), [y, b] = P(1), x =
|
|
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 = vt(), S = x * xr, C = (y - 1) * S, w = M(() => v.slice(C, C + S), [
|
|
2742
2742
|
v,
|
|
2743
2743
|
C,
|
|
2744
2744
|
S
|
|
2745
|
-
]),
|
|
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
2746
|
j(() => {
|
|
2747
|
-
|
|
2747
|
+
A.current !== x && (A.current = x, b(1), re(void 0), oe(void 0));
|
|
2748
2748
|
}, [x]), j(() => {
|
|
2749
|
-
y >
|
|
2750
|
-
}, [y,
|
|
2751
|
-
|
|
2749
|
+
y > T && T > 0 && b(T);
|
|
2750
|
+
}, [y, T]), j(() => {
|
|
2751
|
+
T <= 1 && (ne !== void 0 || ae !== void 0) && (re(void 0), oe(void 0));
|
|
2752
2752
|
}, [
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
]),
|
|
2757
|
-
!te.current || !ee.current ||
|
|
2753
|
+
T,
|
|
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
2763
|
let F = N(/* @__PURE__ */ new Map()), ce = N(y), le = N(x), I = N(0), ue = N(!1);
|
|
2764
|
-
return
|
|
2764
|
+
return se(() => {
|
|
2765
2765
|
if (!te.current || s) return;
|
|
2766
2766
|
if (O.current && !ue.current) {
|
|
2767
2767
|
let e = O.current;
|
|
@@ -2771,7 +2771,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2771
2771
|
ce.current = y, le.current = x;
|
|
2772
2772
|
let n = te.current.querySelectorAll("[data-card-id]"), r = /* @__PURE__ */ new Map();
|
|
2773
2773
|
if (n.forEach((e) => {
|
|
2774
|
-
r.set(e.dataset.cardId,
|
|
2774
|
+
r.set(e.dataset.cardId, Sr(e));
|
|
2775
2775
|
}), !e && !t) {
|
|
2776
2776
|
let e = ee.current, t = I.current, i = 0;
|
|
2777
2777
|
if (e) {
|
|
@@ -2801,11 +2801,11 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2801
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;
|
|
@@ -2819,7 +2819,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
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");
|
|
@@ -2827,62 +2827,62 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2827
2827
|
ref: O,
|
|
2828
2828
|
children: /* @__PURE__ */ G("section", {
|
|
2829
2829
|
ref: ee,
|
|
2830
|
-
className: k("flex flex-shrink-0 flex-col gap-4 pb-2 pt-2",
|
|
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
2836
|
e.target === ee.current && s && c?.();
|
|
2837
2837
|
},
|
|
2838
|
-
children: [/* @__PURE__ */ W(
|
|
2838
|
+
children: [/* @__PURE__ */ W(E, {
|
|
2839
2839
|
title: n,
|
|
2840
2840
|
postfix: D,
|
|
2841
|
-
titleClassName: k(h,
|
|
2842
|
-
postfixClassName: k(g,
|
|
2843
|
-
trailing:
|
|
2844
|
-
className: k("inline-flex items-center gap-[2px] rounded-full px-[6px] py-[3px]",
|
|
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
2846
|
/* @__PURE__ */ W("button", {
|
|
2847
2847
|
"aria-label": l,
|
|
2848
2848
|
disabled: y === 1,
|
|
2849
2849
|
onClick: () => b((e) => e - 1),
|
|
2850
|
-
className: k("flex size-[22px] cursor-pointer items-center justify-center rounded-full border-none bg-transparent",
|
|
2851
|
-
children: /* @__PURE__ */ W(
|
|
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
2857
|
/* @__PURE__ */ G("span", {
|
|
2858
|
-
className: k("min-w-[32px] select-none px-1 text-center", g,
|
|
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
2865
|
/* @__PURE__ */ W("button", {
|
|
2866
2866
|
"aria-label": u,
|
|
2867
|
-
disabled: y ===
|
|
2867
|
+
disabled: y === T,
|
|
2868
2868
|
onClick: () => b((e) => e + 1),
|
|
2869
|
-
className: k("flex size-[22px] cursor-pointer items-center justify-center rounded-full border-none bg-transparent",
|
|
2870
|
-
children: /* @__PURE__ */ W(
|
|
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
2878
|
}), /* @__PURE__ */ W("div", {
|
|
2879
2879
|
ref: te,
|
|
2880
|
-
className: k("grid content-start gap-5",
|
|
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:
|
|
2885
|
+
children: w.map((e) => /* @__PURE__ */ W(br, {
|
|
2886
2886
|
item: e,
|
|
2887
2887
|
onToggle: r,
|
|
2888
2888
|
isFavoriteVisible: i,
|
|
@@ -2895,7 +2895,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2895
2895
|
})]
|
|
2896
2896
|
})
|
|
2897
2897
|
});
|
|
2898
|
-
},
|
|
2898
|
+
}, wr = {
|
|
2899
2899
|
listContainer: "_listContainer_145s6_1",
|
|
2900
2900
|
gridClip: "_gridClip_145s6_6",
|
|
2901
2901
|
favHeader: "_favHeader_145s6_43",
|
|
@@ -2904,29 +2904,29 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2904
2904
|
selectedCheck: "_selectedCheck_145s6_55",
|
|
2905
2905
|
starToggleOff: "_starToggleOff_145s6_59",
|
|
2906
2906
|
selectedRow: "_selectedRow_145s6_72"
|
|
2907
|
-
},
|
|
2907
|
+
}, Tr = ({ data: e }) => e ? /* @__PURE__ */ W("div", {
|
|
2908
2908
|
className: "flex h-full items-center",
|
|
2909
|
-
children: /* @__PURE__ */ W(
|
|
2910
|
-
}) : null,
|
|
2909
|
+
children: /* @__PURE__ */ W(w, { type: e.type })
|
|
2910
|
+
}) : null, Er = " / ", Dr = ({ data: e, context: t }) => {
|
|
2911
2911
|
if (!e || e.folder.length === 0) return null;
|
|
2912
|
-
let n = e.folder.join(
|
|
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
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__ */ W(
|
|
2917
|
-
size:
|
|
2918
|
-
stroke:
|
|
2919
|
-
className: k("shrink-0",
|
|
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__ */ W(
|
|
2922
|
+
/* @__PURE__ */ W(Fe, {
|
|
2923
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__ */ W(
|
|
2929
|
+
children: /* @__PURE__ */ W(me, {
|
|
2930
2930
|
text: r,
|
|
2931
2931
|
className: o,
|
|
2932
2932
|
hideTooltip: i
|
|
@@ -2938,65 +2938,65 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
2938
2938
|
})
|
|
2939
2939
|
]
|
|
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
2943
|
return e ? /* @__PURE__ */ G("div", {
|
|
2944
2944
|
className: "flex h-full w-full min-w-0 items-center gap-2.5",
|
|
2945
2945
|
children: [/* @__PURE__ */ G("div", {
|
|
2946
2946
|
className: "relative shrink-0",
|
|
2947
|
-
children: [/* @__PURE__ */ W(
|
|
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__ */ W(
|
|
2952
|
+
}), /* @__PURE__ */ W(jt, {
|
|
2953
2953
|
credentials: e.credentials,
|
|
2954
2954
|
loggedOutLabel: t?.credentialsBadgeLoggedOutLabel
|
|
2955
2955
|
})]
|
|
2956
|
-
}), /* @__PURE__ */ W(
|
|
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__ */ W(
|
|
2964
|
-
size:
|
|
2965
|
-
className: k("shrink-0",
|
|
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
2972
|
let [n, r] = P(e?.isStarred ?? !1);
|
|
2973
2973
|
return j(() => {
|
|
2974
2974
|
r(e?.isStarred ?? !1);
|
|
2975
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__ */ W(
|
|
2977
|
+
children: /* @__PURE__ */ W(Nt, {
|
|
2978
2978
|
isStarred: n,
|
|
2979
2979
|
onClick: (i) => {
|
|
2980
2980
|
i.stopPropagation();
|
|
2981
2981
|
let a = !n;
|
|
2982
2982
|
r(a), t?.onToggleFavorite?.(e.id, a);
|
|
2983
2983
|
},
|
|
2984
|
-
className: n ? void 0 :
|
|
2984
|
+
className: n ? void 0 : wr.starToggleOff
|
|
2985
2985
|
})
|
|
2986
2986
|
});
|
|
2987
|
-
},
|
|
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__ */ W(
|
|
2990
|
-
}),
|
|
2991
|
-
folder: (e) => e !==
|
|
2989
|
+
children: /* @__PURE__ */ W(Lt, { topics: e.topics })
|
|
2990
|
+
}), jr = {
|
|
2991
|
+
folder: (e) => e !== b.Model,
|
|
2992
2992
|
tags: () => !0,
|
|
2993
2993
|
favorite: () => !0
|
|
2994
|
-
},
|
|
2994
|
+
}, Mr = (e, t) => Object.fromEntries([
|
|
2995
2995
|
"folder",
|
|
2996
2996
|
"tags",
|
|
2997
2997
|
"favorite"
|
|
2998
|
-
].map((n) => [n, (t?.[n] ??
|
|
2999
|
-
let r =
|
|
2998
|
+
].map((n) => [n, (t?.[n] ?? jr[n])(e)])), Nr = (e, t = !1, n) => {
|
|
2999
|
+
let r = Mr(e, n);
|
|
3000
3000
|
return [
|
|
3001
3001
|
{
|
|
3002
3002
|
headerName: "Name",
|
|
@@ -3004,7 +3004,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3004
3004
|
minWidth: 220,
|
|
3005
3005
|
field: "name",
|
|
3006
3006
|
filter: !1,
|
|
3007
|
-
cellRenderer:
|
|
3007
|
+
cellRenderer: Or,
|
|
3008
3008
|
valueGetter: (e) => e.data?.name
|
|
3009
3009
|
},
|
|
3010
3010
|
{
|
|
@@ -3014,7 +3014,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3014
3014
|
field: "type",
|
|
3015
3015
|
filter: !1,
|
|
3016
3016
|
sortable: !1,
|
|
3017
|
-
cellRenderer:
|
|
3017
|
+
cellRenderer: Tr,
|
|
3018
3018
|
valueGetter: (e) => e.data?.type
|
|
3019
3019
|
},
|
|
3020
3020
|
{
|
|
@@ -3024,7 +3024,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3024
3024
|
minWidth: 170,
|
|
3025
3025
|
filter: !1,
|
|
3026
3026
|
hide: !r.folder,
|
|
3027
|
-
cellRenderer:
|
|
3027
|
+
cellRenderer: Dr,
|
|
3028
3028
|
valueGetter: (e) => e.data?.folder
|
|
3029
3029
|
},
|
|
3030
3030
|
{
|
|
@@ -3035,7 +3035,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3035
3035
|
filter: !1,
|
|
3036
3036
|
sortable: !1,
|
|
3037
3037
|
hide: !r.tags,
|
|
3038
|
-
cellRenderer:
|
|
3038
|
+
cellRenderer: Ar,
|
|
3039
3039
|
valueGetter: (e) => e.data?.topics
|
|
3040
3040
|
},
|
|
3041
3041
|
{
|
|
@@ -3047,14 +3047,14 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3047
3047
|
sortable: !1,
|
|
3048
3048
|
resizable: !1,
|
|
3049
3049
|
hide: t || !r.favorite,
|
|
3050
|
-
headerClass:
|
|
3051
|
-
cellRenderer:
|
|
3050
|
+
headerClass: wr.favHeader,
|
|
3051
|
+
cellRenderer: kr
|
|
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
3055
|
if (e.length === 0) return /* @__PURE__ */ W("div", {
|
|
3056
3056
|
className: "flex size-full flex-col items-center justify-center",
|
|
3057
|
-
children: /* @__PURE__ */ W(
|
|
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,7 +3068,7 @@ 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
|
-
}, _ = N(null), { containerRef: v, startRow: y, endRow: b } =
|
|
3071
|
+
}, _ = N(null), { containerRef: v, startRow: y, endRow: b } = Tt(e.length, Pr), x = M(() => e.slice(y, b), [
|
|
3072
3072
|
e,
|
|
3073
3073
|
y,
|
|
3074
3074
|
b
|
|
@@ -3081,17 +3081,17 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3081
3081
|
_.current?.setGridOption("domLayout", e.length > 0 ? "autoHeight" : "normal");
|
|
3082
3082
|
}, [e]), /* @__PURE__ */ W("div", {
|
|
3083
3083
|
style: g,
|
|
3084
|
-
className:
|
|
3084
|
+
className: V("w-full rounded-xl border", wr.listContainer),
|
|
3085
3085
|
children: /* @__PURE__ */ G("div", {
|
|
3086
3086
|
ref: v,
|
|
3087
|
-
className:
|
|
3087
|
+
className: V("rounded-xl", wr.gridClip),
|
|
3088
3088
|
children: [
|
|
3089
3089
|
y > 0 && /* @__PURE__ */ W("div", {
|
|
3090
|
-
style: { height: y *
|
|
3090
|
+
style: { height: y * Pr },
|
|
3091
3091
|
"aria-hidden": !0
|
|
3092
3092
|
}),
|
|
3093
|
-
/* @__PURE__ */ W(
|
|
3094
|
-
columnDefs:
|
|
3093
|
+
/* @__PURE__ */ W(mt, {
|
|
3094
|
+
columnDefs: Nr(t, f, p),
|
|
3095
3095
|
rowData: x,
|
|
3096
3096
|
getRowId: (e) => e.id,
|
|
3097
3097
|
withoutHeaderBorders: !0,
|
|
@@ -3101,7 +3101,7 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3101
3101
|
},
|
|
3102
3102
|
emptyStateTitle: i,
|
|
3103
3103
|
additionalGridOptions: {
|
|
3104
|
-
rowHeight:
|
|
3104
|
+
rowHeight: Pr,
|
|
3105
3105
|
defaultColDef: {
|
|
3106
3106
|
filter: !1,
|
|
3107
3107
|
floatingFilter: !1
|
|
@@ -3119,18 +3119,18 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3119
3119
|
e.column.getColDef().field !== "isStarred" && e.data && c(e.data);
|
|
3120
3120
|
} : void 0,
|
|
3121
3121
|
rowClass: c ? "cursor-pointer" : void 0,
|
|
3122
|
-
getRowClass: (e) => e.data?.id === u ?
|
|
3122
|
+
getRowClass: (e) => e.data?.id === u ? wr.selectedRow : void 0
|
|
3123
3123
|
},
|
|
3124
3124
|
ariaLabel: r
|
|
3125
3125
|
}),
|
|
3126
3126
|
b < e.length && /* @__PURE__ */ W("div", {
|
|
3127
|
-
style: { height: (e.length - b) *
|
|
3127
|
+
style: { height: (e.length - b) * Pr },
|
|
3128
3128
|
"aria-hidden": !0
|
|
3129
3129
|
})
|
|
3130
3130
|
]
|
|
3131
3131
|
})
|
|
3132
3132
|
});
|
|
3133
|
-
},
|
|
3133
|
+
}, Ir = {
|
|
3134
3134
|
filterBtn: "_filterBtn_1ngmc_2",
|
|
3135
3135
|
filterBtnActive: "_filterBtnActive_1ngmc_19",
|
|
3136
3136
|
filterBtnOpen: "_filterBtnOpen_1ngmc_23",
|
|
@@ -3142,14 +3142,14 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3142
3142
|
divider: "_divider_1ngmc_58",
|
|
3143
3143
|
sectionLabel: "_sectionLabel_1ngmc_62",
|
|
3144
3144
|
footer: "_footer_1ngmc_66"
|
|
3145
|
-
},
|
|
3146
|
-
let
|
|
3147
|
-
return n &&
|
|
3148
|
-
},
|
|
3145
|
+
}, Lr = (e, t, n, r, i) => {
|
|
3146
|
+
let o = e.size > 0;
|
|
3147
|
+
return n && o ? `${r} · ${e.size}` : n ? r : o ? a(e, t, i) : i;
|
|
3148
|
+
}, Rr = (e, t) => {
|
|
3149
3149
|
let n = new Set(t);
|
|
3150
3150
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
3151
|
-
},
|
|
3152
|
-
let f = (r ?? !1) || e.size > 0, [p, m] = P(!1), h =
|
|
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] = 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,7 +3165,7 @@ 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 = M(() => n == null ? [] : [...n].sort(), [n]), _ =
|
|
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
3169
|
j(() => {
|
|
3170
3170
|
p && (y(new Set(e)), x(r ?? !1));
|
|
3171
3171
|
}, [
|
|
@@ -3189,14 +3189,14 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3189
3189
|
m(e), e || E.current?.focus();
|
|
3190
3190
|
}, ee = (e) => {
|
|
3191
3191
|
e.key === "ArrowDown" && !p && (e.preventDefault(), m(!0));
|
|
3192
|
-
},
|
|
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__ */ W(
|
|
3199
|
+
return /* @__PURE__ */ W(fe, {
|
|
3200
3200
|
matchReferenceWidth: !1,
|
|
3201
3201
|
placement: "bottom-start",
|
|
3202
3202
|
open: p,
|
|
@@ -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: k("flex min-w-[360px] flex-col rounded-xl p-[6px]",
|
|
3214
|
-
onKeyDown:
|
|
3213
|
+
className: k("flex min-w-[360px] flex-col rounded-xl p-[6px]", Ir.overlay),
|
|
3214
|
+
onKeyDown: te,
|
|
3215
3215
|
children: [
|
|
3216
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: k(
|
|
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) => {
|
|
@@ -3230,47 +3230,47 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3230
3230
|
g.length > 0 && /* @__PURE__ */ G(U, { children: [
|
|
3231
3231
|
/* @__PURE__ */ W("div", {
|
|
3232
3232
|
role: "separator",
|
|
3233
|
-
className: k("my-1 h-px",
|
|
3233
|
+
className: k("my-1 h-px", Ir.divider),
|
|
3234
3234
|
"aria-hidden": !0
|
|
3235
3235
|
}),
|
|
3236
3236
|
/* @__PURE__ */ W("div", {
|
|
3237
|
-
className: k("px-[10px] pb-1 pt-[10px]", u?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text",
|
|
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
3241
|
/* @__PURE__ */ W("div", {
|
|
3242
|
-
className: k(
|
|
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
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
|
-
labelClassName:
|
|
3251
|
+
labelClassName: Ir.rowLabel,
|
|
3252
3252
|
className: "shrink-0",
|
|
3253
3253
|
tabIndex: C === r ? 0 : -1,
|
|
3254
3254
|
ref: (e) => {
|
|
3255
3255
|
T.current[r] = e;
|
|
3256
3256
|
},
|
|
3257
|
-
onClick: () => y(
|
|
3257
|
+
onClick: () => y(Rr(e, v))
|
|
3258
3258
|
}, e);
|
|
3259
3259
|
})
|
|
3260
3260
|
})
|
|
3261
3261
|
] }),
|
|
3262
3262
|
/* @__PURE__ */ G("div", {
|
|
3263
|
-
className: k("mt-1 flex shrink-0 items-center px-1 py-3",
|
|
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__ */ W(
|
|
3267
|
+
children: [/* @__PURE__ */ W(ge, {
|
|
3268
3268
|
label: c,
|
|
3269
3269
|
onClick: ae
|
|
3270
|
-
}), /* @__PURE__ */ W(
|
|
3270
|
+
}), /* @__PURE__ */ W(Ee, {
|
|
3271
3271
|
label: l,
|
|
3272
3272
|
className: "ms-auto",
|
|
3273
|
-
onClick:
|
|
3273
|
+
onClick: ne
|
|
3274
3274
|
})]
|
|
3275
3275
|
})
|
|
3276
3276
|
]
|
|
@@ -3282,45 +3282,45 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3282
3282
|
"aria-expanded": p,
|
|
3283
3283
|
onKeyDown: ee,
|
|
3284
3284
|
style: h,
|
|
3285
|
-
className: k("flex h-12 shrink-0 cursor-pointer items-center gap-[7px] whitespace-nowrap rounded-lg px-[18px]",
|
|
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__ */ W(
|
|
3288
|
-
size:
|
|
3289
|
-
stroke:
|
|
3290
|
-
className: k("shrink-0",
|
|
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
3293
|
/* @__PURE__ */ W("span", {
|
|
3294
|
-
className: k(
|
|
3294
|
+
className: k(Ir.filterBtnLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3295
3295
|
children: _
|
|
3296
3296
|
}),
|
|
3297
|
-
/* @__PURE__ */ W(
|
|
3297
|
+
/* @__PURE__ */ W(Be, {
|
|
3298
3298
|
size: 14,
|
|
3299
|
-
stroke:
|
|
3300
|
-
className: k("shrink-0 transition-transform duration-150",
|
|
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
|
]
|
|
3304
3304
|
})
|
|
3305
3305
|
});
|
|
3306
|
-
},
|
|
3306
|
+
}, Br = {
|
|
3307
3307
|
section: "_section_mh952_1",
|
|
3308
3308
|
divider: "_divider_mh952_5"
|
|
3309
|
-
},
|
|
3310
|
-
let
|
|
3311
|
-
value:
|
|
3312
|
-
icon: /* @__PURE__ */ W(
|
|
3313
|
-
size:
|
|
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 = M(() => [{
|
|
3311
|
+
value: X.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__ */ W(
|
|
3321
|
-
size:
|
|
3319
|
+
value: X.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) => {
|
|
@@ -3328,7 +3328,7 @@ var pt = /* @__PURE__ */ function(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
|
})), [
|
|
@@ -3340,11 +3340,11 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3340
3340
|
className: "flex flex-col gap-3",
|
|
3341
3341
|
children: [/* @__PURE__ */ G("div", {
|
|
3342
3342
|
className: "flex items-center gap-2",
|
|
3343
|
-
children: [i ?? /* @__PURE__ */ W(
|
|
3343
|
+
children: [i ?? /* @__PURE__ */ W(E, {
|
|
3344
3344
|
title: r,
|
|
3345
3345
|
postfix: e,
|
|
3346
|
-
titleClassName:
|
|
3347
|
-
postfixClassName:
|
|
3346
|
+
titleClassName: w,
|
|
3347
|
+
postfixClassName: T,
|
|
3348
3348
|
className: "shrink-0",
|
|
3349
3349
|
shouldTruncateTitle: !1,
|
|
3350
3350
|
colors: {
|
|
@@ -3353,16 +3353,16 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3353
3353
|
}
|
|
3354
3354
|
}), /* @__PURE__ */ G("div", {
|
|
3355
3355
|
className: "ms-auto flex shrink-0 items-center gap-2",
|
|
3356
|
-
children: [/* @__PURE__ */ W(
|
|
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__ */ G(U, { children: [/* @__PURE__ */ W("div", { className: k("h-4 w-px shrink-0",
|
|
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
3362
|
items: te,
|
|
3363
3363
|
label: ee,
|
|
3364
|
-
variant:
|
|
3365
|
-
appearance:
|
|
3364
|
+
variant: le.Primary,
|
|
3365
|
+
appearance: F.Ghost
|
|
3366
3366
|
})] })]
|
|
3367
3367
|
})]
|
|
3368
3368
|
}), /* @__PURE__ */ G("div", {
|
|
@@ -3370,15 +3370,15 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3370
3370
|
children: [/* @__PURE__ */ W("div", {
|
|
3371
3371
|
role: "search",
|
|
3372
3372
|
className: "flex-1",
|
|
3373
|
-
children: /* @__PURE__ */ W(
|
|
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__ */ W(
|
|
3381
|
+
}), /* @__PURE__ */ W(zr, {
|
|
3382
3382
|
checked: g ?? /* @__PURE__ */ new Set(),
|
|
3383
3383
|
onChange: _ ?? (() => void 0),
|
|
3384
3384
|
values: v,
|
|
@@ -3391,12 +3391,12 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3391
3391
|
})]
|
|
3392
3392
|
})]
|
|
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
3396
|
return /* @__PURE__ */ W("section", {
|
|
3397
|
-
className: k("flex-shrink-0 px-4",
|
|
3397
|
+
className: k("flex-shrink-0 px-4", Br.section),
|
|
3398
3398
|
style: b,
|
|
3399
|
-
children: /* @__PURE__ */ W(
|
|
3399
|
+
children: /* @__PURE__ */ W(Vr, {
|
|
3400
3400
|
styles: r,
|
|
3401
3401
|
query: e,
|
|
3402
3402
|
onQueryChange: t,
|
|
@@ -3419,299 +3419,318 @@ var pt = /* @__PURE__ */ function(e) {
|
|
|
3419
3419
|
...y
|
|
3420
3420
|
})
|
|
3421
3421
|
});
|
|
3422
|
-
},
|
|
3422
|
+
}, Ur = {
|
|
3423
3423
|
root: "_root_1h83l_1",
|
|
3424
3424
|
heading: "_heading_1h83l_5",
|
|
3425
3425
|
headingTitle: "_headingTitle_1h83l_9"
|
|
3426
|
-
},
|
|
3426
|
+
}, Wr = ({ label: e, options: t, onClick: n }) => {
|
|
3427
3427
|
let r = N(null);
|
|
3428
3428
|
return t?.length ? /* @__PURE__ */ W("div", {
|
|
3429
3429
|
ref: r,
|
|
3430
|
-
children: /* @__PURE__ */ W(
|
|
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__ */ W(
|
|
3436
|
+
}) : /* @__PURE__ */ W(Ee, {
|
|
3437
3437
|
label: e,
|
|
3438
|
-
iconBefore: /* @__PURE__ */ W(
|
|
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
|
-
},
|
|
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 = X.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 = yt(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
|
-
value:
|
|
3448
|
-
label:
|
|
3447
|
+
value: u.RecentlyUpdated,
|
|
3448
|
+
label: s?.sortRecentlyUpdatedLabel ?? "Recently Updated"
|
|
3449
3449
|
},
|
|
3450
3450
|
{
|
|
3451
|
-
value:
|
|
3452
|
-
label:
|
|
3451
|
+
value: u.Newest,
|
|
3452
|
+
label: s?.sortNewestLabel ?? "Newest"
|
|
3453
3453
|
},
|
|
3454
3454
|
{
|
|
3455
|
-
value:
|
|
3456
|
-
label:
|
|
3455
|
+
value: u.NameAZ,
|
|
3456
|
+
label: s?.sortNameAZLabel ?? "Name A-Z"
|
|
3457
3457
|
}
|
|
3458
|
-
], [
|
|
3458
|
+
], [st, ct] = P(""), [lt, ut] = P(ke), [dt, ft] = P(ke === X.Cards), [pt, mt] = P(u.RecentlyUpdated), [ht, K] = P(/* @__PURE__ */ new Set()), [gt, q] = P(!1), J = Re ?? pt, Y = Be ?? ht, Z = He ?? gt, _t = A((e) => {
|
|
3459
3459
|
let t = e;
|
|
3460
|
-
|
|
3461
|
-
}, [
|
|
3462
|
-
ft(e), ze?.(e);
|
|
3463
|
-
}, [ze]), _t = A((e) => {
|
|
3460
|
+
mt(t), ze?.(t);
|
|
3461
|
+
}, [ze]), vt = A((e) => {
|
|
3464
3462
|
K(e), Ve?.(e);
|
|
3465
|
-
}, [Ve]),
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3463
|
+
}, [Ve]), bt = A((e) => {
|
|
3464
|
+
q(e), Ue?.(e);
|
|
3465
|
+
}, [Ue]), Q = M(() => e.filter((e) => !e.isHidden), [e]), xt = M(() => a ?? p(Q), [a, Q]), St = M(() => n ?? h(Q, s?.tabLabels), [
|
|
3466
|
+
n,
|
|
3467
|
+
Q,
|
|
3468
|
+
s?.tabLabels
|
|
3469
|
+
]), Ct = St[0]?.id ?? "", [wt, Tt] = P(Ct);
|
|
3470
3470
|
j(() => {
|
|
3471
|
-
|
|
3472
|
-
}, [
|
|
3473
|
-
let
|
|
3474
|
-
|
|
3475
|
-
}, [
|
|
3471
|
+
Tt((e) => e || Ct);
|
|
3472
|
+
}, [Ct]);
|
|
3473
|
+
let Et = We ?? wt, Dt = A((e) => {
|
|
3474
|
+
Tt(e), Ge?.(e);
|
|
3475
|
+
}, [Ge]), [Ot, kt] = P(o.length > 0);
|
|
3476
3476
|
j(() => {
|
|
3477
|
-
|
|
3478
|
-
}, [
|
|
3479
|
-
let
|
|
3480
|
-
|
|
3481
|
-
}, []),
|
|
3482
|
-
|
|
3483
|
-
let t =
|
|
3484
|
-
|
|
3477
|
+
o.length > 0 && !Ot && kt(!0);
|
|
3478
|
+
}, [o.length, Ot]);
|
|
3479
|
+
let At = A(() => {
|
|
3480
|
+
kt(!1);
|
|
3481
|
+
}, []), jt = Ot && o.length === 0, [Mt, Nt] = P(null), [Pt, Ft] = P(!1), [$, It] = P(void 0), [Lt, Rt] = P(!1), zt = N(null), Bt = N(0), Vt = A(async (e) => {
|
|
3482
|
+
zt.current = e.id;
|
|
3483
|
+
let t = ++Bt.current;
|
|
3484
|
+
if (I) {
|
|
3485
|
+
Rt(!0);
|
|
3485
3486
|
try {
|
|
3486
|
-
let
|
|
3487
|
-
|
|
3487
|
+
let n = await I(e);
|
|
3488
|
+
return Bt.current === t && It(n), n;
|
|
3488
3489
|
} finally {
|
|
3489
|
-
|
|
3490
|
+
Bt.current === t && Rt(!1);
|
|
3490
3491
|
}
|
|
3491
|
-
}
|
|
3492
|
-
}, [
|
|
3492
|
+
}
|
|
3493
|
+
}, [I]), Ut = A(async (e) => (Nt(e), It(void 0), Vt(e)), [Vt]), Wt = A(async (e, t) => {
|
|
3494
|
+
for (let n = 0; n < Gr; n++) {
|
|
3495
|
+
if (zt.current !== e.id || t(await Vt(e))) return;
|
|
3496
|
+
n < Gr - 1 && await f(Kr);
|
|
3497
|
+
}
|
|
3498
|
+
}, [Vt]), Gt = N(null);
|
|
3493
3499
|
j(() => {
|
|
3494
|
-
if (!
|
|
3495
|
-
|
|
3500
|
+
if (!Le) {
|
|
3501
|
+
Gt.current = null;
|
|
3496
3502
|
return;
|
|
3497
3503
|
}
|
|
3498
|
-
if (
|
|
3499
|
-
let t = e.find((e) => e.id ===
|
|
3500
|
-
t && (
|
|
3504
|
+
if (Gt.current === Le) return;
|
|
3505
|
+
let t = e.find((e) => e.id === Le);
|
|
3506
|
+
t && (Gt.current = Le, Ut(t));
|
|
3501
3507
|
}, [
|
|
3502
|
-
|
|
3508
|
+
Le,
|
|
3503
3509
|
e,
|
|
3504
|
-
|
|
3510
|
+
Ut
|
|
3505
3511
|
]), j(() => {
|
|
3506
|
-
if (
|
|
3507
|
-
let t = e.find((e) => e.id ===
|
|
3508
|
-
t && t !==
|
|
3509
|
-
}, [e,
|
|
3510
|
-
let
|
|
3511
|
-
await Se?.(e,
|
|
3512
|
-
}, [
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3512
|
+
if (Mt == null) return;
|
|
3513
|
+
let t = e.find((e) => e.id === Mt.id);
|
|
3514
|
+
t && t !== Mt && Nt(t);
|
|
3515
|
+
}, [e, Mt]);
|
|
3516
|
+
let Kt = A(async (e, n) => {
|
|
3517
|
+
await Se?.(e, n), I && await Wt(e, (e) => t(e?.credentials, n.level));
|
|
3518
|
+
}, [
|
|
3519
|
+
Se,
|
|
3520
|
+
I,
|
|
3521
|
+
Wt
|
|
3522
|
+
]), qt = A(async (e, n) => {
|
|
3523
|
+
await Ce?.(e, n), I && await Wt(e, (e) => !t(e?.credentials, n.level));
|
|
3524
|
+
}, [
|
|
3525
|
+
Ce,
|
|
3526
|
+
I,
|
|
3527
|
+
Wt
|
|
3528
|
+
]), Jt = A(() => {
|
|
3529
|
+
Ft(!1), zt.current = null, Bt.current += 1, setTimeout(() => {
|
|
3530
|
+
Nt(null), It(void 0), Rt(!1);
|
|
3517
3531
|
}, 300);
|
|
3518
|
-
}, []),
|
|
3519
|
-
if (
|
|
3520
|
-
if (
|
|
3521
|
-
let { credentials: e, ...t } =
|
|
3532
|
+
}, []), Yt = M(() => {
|
|
3533
|
+
if (Mt == null) return null;
|
|
3534
|
+
if ($ == null) return Mt;
|
|
3535
|
+
let { credentials: e, ...t } = $;
|
|
3522
3536
|
return {
|
|
3523
|
-
|
|
3537
|
+
...Mt,
|
|
3524
3538
|
details: t,
|
|
3525
|
-
credentials: e ??
|
|
3539
|
+
credentials: e ?? Mt.credentials
|
|
3526
3540
|
};
|
|
3527
|
-
}, [
|
|
3541
|
+
}, [Mt, $]), Xt = M(() => r(Q, J), [Q, J]), Zt = M(() => i(Xt, st), [Xt, st]), Qt = M(() => Y.size > 0 ? _(Zt, Y) : Zt, [Zt, Y]), $t = M(() => Z ? l(Qt) : Qt, [Qt, Z]), en = M(() => Et ? $t.filter((e) => e.type === Et) : $t, [$t, Et]), tn = Mt != null && o.some((e) => e.id === Mt.id);
|
|
3528
3542
|
j(() => {
|
|
3529
|
-
if (
|
|
3530
|
-
let e = requestAnimationFrame(() =>
|
|
3543
|
+
if (Mt == null) return;
|
|
3544
|
+
let e = requestAnimationFrame(() => Ft(!0));
|
|
3531
3545
|
return () => cancelAnimationFrame(e);
|
|
3532
|
-
}, [
|
|
3533
|
-
let
|
|
3534
|
-
e ===
|
|
3535
|
-
}, []),
|
|
3536
|
-
noResultsTitle:
|
|
3537
|
-
featuredLabel:
|
|
3538
|
-
credentialsBadgeLoggedOutLabel:
|
|
3546
|
+
}, [Mt]);
|
|
3547
|
+
let nn = A((e) => {
|
|
3548
|
+
e === X.Cards && ft(!0), ut(e);
|
|
3549
|
+
}, []), rn = !Ee && !Oe, an = Ot && !Oe, on = st ? et(st) : "No items", sn = M(() => ({
|
|
3550
|
+
noResultsTitle: on,
|
|
3551
|
+
featuredLabel: tt,
|
|
3552
|
+
credentialsBadgeLoggedOutLabel: V?.credentialsBadgeLoggedOutLabel
|
|
3539
3553
|
}), [
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
])
|
|
3544
|
-
|
|
3554
|
+
on,
|
|
3555
|
+
tt,
|
|
3556
|
+
V?.credentialsBadgeLoggedOutLabel
|
|
3557
|
+
]), cn = !Pe && en.length === 0 ? Ke?.({
|
|
3558
|
+
query: st,
|
|
3559
|
+
activeTab: Et,
|
|
3560
|
+
hasTopicFilters: Y.size > 0,
|
|
3561
|
+
isMyAppsActive: Z
|
|
3562
|
+
}) : void 0;
|
|
3563
|
+
return Pe ? /* @__PURE__ */ W("div", {
|
|
3545
3564
|
className: "flex size-full min-h-0 flex-1 items-center justify-center",
|
|
3546
|
-
children: /* @__PURE__ */ W(
|
|
3565
|
+
children: /* @__PURE__ */ W(Me, {})
|
|
3547
3566
|
}) : /* @__PURE__ */ G("section", {
|
|
3548
|
-
"aria-label":
|
|
3549
|
-
className: k("flex size-full min-h-0 flex-1 flex-col",
|
|
3550
|
-
style:
|
|
3567
|
+
"aria-label": it,
|
|
3568
|
+
className: k("flex size-full min-h-0 flex-1 flex-col", Ur.root),
|
|
3569
|
+
style: Je,
|
|
3551
3570
|
children: [
|
|
3552
|
-
(!
|
|
3553
|
-
className: k("shrink-0",
|
|
3571
|
+
(!De || rn) && /* @__PURE__ */ W("div", {
|
|
3572
|
+
className: k("shrink-0", Ur.heading),
|
|
3554
3573
|
children: /* @__PURE__ */ G("div", {
|
|
3555
3574
|
className: "flex h-[64px] w-full items-center justify-between px-8",
|
|
3556
|
-
children: [!
|
|
3557
|
-
className: k(
|
|
3558
|
-
children:
|
|
3559
|
-
}),
|
|
3560
|
-
label:
|
|
3561
|
-
options:
|
|
3562
|
-
onClick:
|
|
3575
|
+
children: [!De && /* @__PURE__ */ W("h1", {
|
|
3576
|
+
className: k(qe?.pageHeadingFontClassName ?? "dial-display2-text", Ur.headingTitle),
|
|
3577
|
+
children: Ye
|
|
3578
|
+
}), rn && /* @__PURE__ */ W(Wr, {
|
|
3579
|
+
label: Xe,
|
|
3580
|
+
options: Te,
|
|
3581
|
+
onClick: we
|
|
3563
3582
|
})]
|
|
3564
3583
|
})
|
|
3565
3584
|
}),
|
|
3566
3585
|
/* @__PURE__ */ G("div", {
|
|
3567
3586
|
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden",
|
|
3568
3587
|
children: [
|
|
3569
|
-
|
|
3588
|
+
an && /* @__PURE__ */ W("div", {
|
|
3570
3589
|
className: "w-full px-8",
|
|
3571
|
-
children: /* @__PURE__ */ W(
|
|
3572
|
-
items:
|
|
3573
|
-
totalCount:
|
|
3574
|
-
title:
|
|
3575
|
-
onToggleFavorite:
|
|
3576
|
-
isFavoriteVisible:
|
|
3577
|
-
onItemClick:
|
|
3578
|
-
isLeaving:
|
|
3579
|
-
onExitComplete:
|
|
3580
|
-
selectedItemId:
|
|
3581
|
-
credentialsBadgeLoggedOutLabel:
|
|
3590
|
+
children: /* @__PURE__ */ W(Cr, {
|
|
3591
|
+
items: o,
|
|
3592
|
+
totalCount: o.length,
|
|
3593
|
+
title: Ze,
|
|
3594
|
+
onToggleFavorite: d,
|
|
3595
|
+
isFavoriteVisible: m,
|
|
3596
|
+
onItemClick: B ?? Ut,
|
|
3597
|
+
isLeaving: jt,
|
|
3598
|
+
onExitComplete: At,
|
|
3599
|
+
selectedItemId: je,
|
|
3600
|
+
credentialsBadgeLoggedOutLabel: V?.credentialsBadgeLoggedOutLabel
|
|
3582
3601
|
})
|
|
3583
3602
|
}),
|
|
3584
3603
|
/* @__PURE__ */ W("div", {
|
|
3585
3604
|
className: "w-full px-4 pt-6",
|
|
3586
|
-
children: /* @__PURE__ */ W(
|
|
3587
|
-
totalCount:
|
|
3588
|
-
viewMode:
|
|
3589
|
-
onViewModeChange:
|
|
3590
|
-
sortKey:
|
|
3591
|
-
query:
|
|
3592
|
-
onQueryChange:
|
|
3593
|
-
title:
|
|
3594
|
-
browseHeaderRenderer:
|
|
3595
|
-
searchPlaceholder:
|
|
3596
|
-
gridViewLabel:
|
|
3597
|
-
listViewLabel:
|
|
3598
|
-
viewToggleLabel:
|
|
3599
|
-
sortOptions:
|
|
3600
|
-
onSortChange:
|
|
3601
|
-
sortLabel:
|
|
3602
|
-
filters:
|
|
3603
|
-
onFiltersChange:
|
|
3604
|
-
filterValues:
|
|
3605
|
-
isMyAppsActive:
|
|
3606
|
-
onMyAppsChange:
|
|
3607
|
-
filterFromLabel:
|
|
3608
|
-
filterMyAppsLabel:
|
|
3609
|
-
filterTopicsLabel:
|
|
3605
|
+
children: /* @__PURE__ */ W(Hr, {
|
|
3606
|
+
totalCount: $t.length,
|
|
3607
|
+
viewMode: lt,
|
|
3608
|
+
onViewModeChange: nn,
|
|
3609
|
+
sortKey: J,
|
|
3610
|
+
query: st,
|
|
3611
|
+
onQueryChange: ct,
|
|
3612
|
+
title: Qe,
|
|
3613
|
+
browseHeaderRenderer: c,
|
|
3614
|
+
searchPlaceholder: $e,
|
|
3615
|
+
gridViewLabel: nt,
|
|
3616
|
+
listViewLabel: rt,
|
|
3617
|
+
viewToggleLabel: H,
|
|
3618
|
+
sortOptions: ot,
|
|
3619
|
+
onSortChange: _t,
|
|
3620
|
+
sortLabel: at,
|
|
3621
|
+
filters: Y,
|
|
3622
|
+
onFiltersChange: vt,
|
|
3623
|
+
filterValues: xt,
|
|
3624
|
+
isMyAppsActive: Z,
|
|
3625
|
+
onMyAppsChange: bt,
|
|
3626
|
+
filterFromLabel: s?.filterFromLabel,
|
|
3627
|
+
filterMyAppsLabel: s?.filterMyAppsLabel,
|
|
3628
|
+
filterTopicsLabel: s?.filterTopicsLabel
|
|
3610
3629
|
})
|
|
3611
3630
|
}),
|
|
3612
|
-
|
|
3631
|
+
St.length > 1 && /* @__PURE__ */ W("div", {
|
|
3613
3632
|
className: "min-w-0 shrink-0 overflow-x-auto px-8",
|
|
3614
|
-
children: /* @__PURE__ */ W(
|
|
3615
|
-
tabs:
|
|
3633
|
+
children: /* @__PURE__ */ W(Ne, {
|
|
3634
|
+
tabs: St.map((e) => ({
|
|
3616
3635
|
id: e.id,
|
|
3617
3636
|
label: typeof e.label == "string" ? e.label : String(e.label),
|
|
3618
|
-
count:
|
|
3637
|
+
count: $t.filter((t) => t.type === e.id).length
|
|
3619
3638
|
})),
|
|
3620
|
-
activeTabId:
|
|
3621
|
-
onTabChange:
|
|
3639
|
+
activeTabId: Et,
|
|
3640
|
+
onTabChange: Dt
|
|
3622
3641
|
})
|
|
3623
3642
|
}),
|
|
3624
|
-
/* @__PURE__ */
|
|
3625
|
-
className: k(
|
|
3626
|
-
children: [/* @__PURE__ */ W("div", {
|
|
3627
|
-
className: k(
|
|
3628
|
-
children: /* @__PURE__ */ W(
|
|
3629
|
-
items:
|
|
3630
|
-
query:
|
|
3631
|
-
onToggleFavorite:
|
|
3632
|
-
isFavoriteVisible:
|
|
3633
|
-
onItemClick:
|
|
3634
|
-
titles:
|
|
3635
|
-
selectedItemId:
|
|
3636
|
-
isReadonly:
|
|
3637
|
-
isFullWidth:
|
|
3638
|
-
featuredChipStyle:
|
|
3643
|
+
/* @__PURE__ */ W("div", {
|
|
3644
|
+
className: k(en.length > 0 ? ["min-h-full w-full px-8 py-6", !Ae && "mx-auto max-w-[1180px]"] : "min-h-[180px] flex-1", en.length === 0 && "px-8 py-6"),
|
|
3645
|
+
children: cn ?? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
|
|
3646
|
+
className: k(en.length > 0 ? "pb-8" : "size-full flex-1", lt !== X.Grid && "hidden"),
|
|
3647
|
+
children: /* @__PURE__ */ W(Ht, {
|
|
3648
|
+
items: en,
|
|
3649
|
+
query: st,
|
|
3650
|
+
onToggleFavorite: d,
|
|
3651
|
+
isFavoriteVisible: m,
|
|
3652
|
+
onItemClick: B ?? Ut,
|
|
3653
|
+
titles: sn,
|
|
3654
|
+
selectedItemId: je,
|
|
3655
|
+
isReadonly: Oe,
|
|
3656
|
+
isFullWidth: Ae,
|
|
3657
|
+
featuredChipStyle: Fe?.colors?.featuredChipStyle
|
|
3639
3658
|
})
|
|
3640
|
-
}),
|
|
3641
|
-
className: k("pb-8",
|
|
3642
|
-
children: /* @__PURE__ */ W(
|
|
3643
|
-
type:
|
|
3644
|
-
items:
|
|
3645
|
-
query:
|
|
3646
|
-
ariaLabel:
|
|
3647
|
-
emptyStateTitle:
|
|
3648
|
-
onToggleFavorite:
|
|
3649
|
-
isFavoriteVisible:
|
|
3650
|
-
columnVisibility:
|
|
3651
|
-
onItemClick:
|
|
3659
|
+
}), dt && /* @__PURE__ */ W("div", {
|
|
3660
|
+
className: k("pb-8", lt !== X.Cards && "hidden", en.length === 0 && "h-full"),
|
|
3661
|
+
children: /* @__PURE__ */ W(Fr, {
|
|
3662
|
+
type: Et,
|
|
3663
|
+
items: en,
|
|
3664
|
+
query: st,
|
|
3665
|
+
ariaLabel: it,
|
|
3666
|
+
emptyStateTitle: on,
|
|
3667
|
+
onToggleFavorite: d,
|
|
3668
|
+
isFavoriteVisible: m,
|
|
3669
|
+
columnVisibility: g,
|
|
3670
|
+
onItemClick: B ?? Ut,
|
|
3652
3671
|
stickyHeaderTop: 0,
|
|
3653
|
-
selectedItemId:
|
|
3654
|
-
credentialsBadgeLoggedOutLabel:
|
|
3655
|
-
isReadonly:
|
|
3672
|
+
selectedItemId: je,
|
|
3673
|
+
credentialsBadgeLoggedOutLabel: V?.credentialsBadgeLoggedOutLabel,
|
|
3674
|
+
isReadonly: Oe
|
|
3656
3675
|
})
|
|
3657
|
-
})]
|
|
3676
|
+
})] })
|
|
3658
3677
|
})
|
|
3659
3678
|
]
|
|
3660
3679
|
}),
|
|
3661
|
-
|
|
3662
|
-
item:
|
|
3663
|
-
isOpen:
|
|
3664
|
-
isStarred:
|
|
3665
|
-
isDetailsLoading:
|
|
3666
|
-
isReadonly:
|
|
3667
|
-
onClose:
|
|
3668
|
-
onToggleFavorite:
|
|
3669
|
-
isFavoriteVisible:
|
|
3670
|
-
onUseInChat:
|
|
3671
|
-
isPrimaryActionVisible:
|
|
3672
|
-
onShare:
|
|
3673
|
-
isPublishVisible:
|
|
3674
|
-
isPublishPrimary:
|
|
3675
|
-
getPublishHistory:
|
|
3676
|
-
publishFolderItems:
|
|
3677
|
-
publishExpandedPaths:
|
|
3678
|
-
onPublishExpandedPathsChange:
|
|
3679
|
-
publishLoadingPaths:
|
|
3680
|
-
hasPublishWriteAccess:
|
|
3681
|
-
publishDefaultAuthor:
|
|
3682
|
-
onPublish:
|
|
3683
|
-
onPublishSuccess:
|
|
3684
|
-
onPublishError:
|
|
3685
|
-
onCreatePublishFolder:
|
|
3686
|
-
publishLabels:
|
|
3687
|
-
ruleSourceOptions:
|
|
3688
|
-
onFetchExistingRules:
|
|
3689
|
-
shareOverlay:
|
|
3690
|
-
isShareVisible:
|
|
3691
|
-
isSharePrimary:
|
|
3692
|
-
onEdit:
|
|
3693
|
-
onDownload:
|
|
3694
|
-
isDownloadVisible:
|
|
3695
|
-
isDownloadPrimary:
|
|
3696
|
-
onLoadContentFile:
|
|
3697
|
-
onLoadContentFilePreview:
|
|
3698
|
-
renderContentFilePreview:
|
|
3699
|
-
onDelete:
|
|
3700
|
-
onUnshare:
|
|
3701
|
-
isUnshareVisible:
|
|
3702
|
-
onRevokeShare:
|
|
3703
|
-
onFetchRecipientsCount:
|
|
3704
|
-
isRevokeShareVisible:
|
|
3705
|
-
onUnpublish:
|
|
3706
|
-
isUnpublishVisible:
|
|
3707
|
-
onLogin:
|
|
3708
|
-
onLogout:
|
|
3709
|
-
texts:
|
|
3710
|
-
limitsFooterNote:
|
|
3711
|
-
styles: { colors: { featuredChipStyle:
|
|
3680
|
+
Yt != null && /* @__PURE__ */ W(vr, {
|
|
3681
|
+
item: Yt,
|
|
3682
|
+
isOpen: Pt,
|
|
3683
|
+
isStarred: tn,
|
|
3684
|
+
isDetailsLoading: Lt,
|
|
3685
|
+
isReadonly: Oe,
|
|
3686
|
+
onClose: Jt,
|
|
3687
|
+
onToggleFavorite: d,
|
|
3688
|
+
isFavoriteVisible: m,
|
|
3689
|
+
onUseInChat: v,
|
|
3690
|
+
isPrimaryActionVisible: y,
|
|
3691
|
+
onShare: b,
|
|
3692
|
+
isPublishVisible: x,
|
|
3693
|
+
isPublishPrimary: S,
|
|
3694
|
+
getPublishHistory: C,
|
|
3695
|
+
publishFolderItems: w,
|
|
3696
|
+
publishExpandedPaths: T,
|
|
3697
|
+
onPublishExpandedPathsChange: E,
|
|
3698
|
+
publishLoadingPaths: D,
|
|
3699
|
+
hasPublishWriteAccess: O,
|
|
3700
|
+
publishDefaultAuthor: ee,
|
|
3701
|
+
onPublish: te,
|
|
3702
|
+
onPublishSuccess: ne,
|
|
3703
|
+
onPublishError: re,
|
|
3704
|
+
onCreatePublishFolder: ie,
|
|
3705
|
+
publishLabels: ae,
|
|
3706
|
+
ruleSourceOptions: oe,
|
|
3707
|
+
onFetchExistingRules: se,
|
|
3708
|
+
shareOverlay: F,
|
|
3709
|
+
isShareVisible: ce,
|
|
3710
|
+
isSharePrimary: le,
|
|
3711
|
+
onEdit: ue,
|
|
3712
|
+
onDownload: L,
|
|
3713
|
+
isDownloadVisible: R,
|
|
3714
|
+
isDownloadPrimary: de,
|
|
3715
|
+
onLoadContentFile: fe,
|
|
3716
|
+
onLoadContentFilePreview: pe,
|
|
3717
|
+
renderContentFilePreview: me,
|
|
3718
|
+
onDelete: he,
|
|
3719
|
+
onUnshare: ge,
|
|
3720
|
+
isUnshareVisible: _e,
|
|
3721
|
+
onRevokeShare: ve,
|
|
3722
|
+
onFetchRecipientsCount: ye,
|
|
3723
|
+
isRevokeShareVisible: be,
|
|
3724
|
+
onUnpublish: xe,
|
|
3725
|
+
isUnpublishVisible: z,
|
|
3726
|
+
onLogin: Kt,
|
|
3727
|
+
onLogout: qt,
|
|
3728
|
+
texts: V,
|
|
3729
|
+
limitsFooterNote: Ie,
|
|
3730
|
+
styles: { colors: { featuredChipStyle: Fe?.colors?.featuredChipStyle } }
|
|
3712
3731
|
})
|
|
3713
3732
|
]
|
|
3714
3733
|
});
|
|
3715
3734
|
};
|
|
3716
3735
|
//#endregion
|
|
3717
|
-
export {
|
|
3736
|
+
export { kt as AppIdentity, Bt as Card, Ht as CardGrid, Vt as CardRowRenderer, qr as Catalog, Z as CatalogContentNodeType, _t as CatalogContentPreviewType, K as CatalogDetailsTab, gt as CatalogLimitStatus, u as CatalogSortKey, X as CatalogViewMode, ht as CodeLanguage, zn as ContentTab, s as CredentialStatus, jt as CredentialsBadge, o as CredentialsBadgeState, v as CredentialsLevel, y as CredentialsUiState, Y 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, vt as useFavColumns, Et as useScrollVirtualizer };
|