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