@epam/ai-dial-catalog 1.2.0-dev.337 → 1.2.0-dev.339
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/index.js
CHANGED
|
@@ -17,56 +17,56 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
17
17
|
return e.Delete = "delete", e.Logout = "logout", e.Unshare = "unshare", e.RevokeAccess = "revokeAccess", e.DeleteApiKey = "deleteApiKey", e.Unpublish = "unpublish", e;
|
|
18
18
|
}({}), Ot = /* @__PURE__ */ function(e) {
|
|
19
19
|
return e.SM = "sm", e.LG = "lg", e;
|
|
20
|
-
}({}),
|
|
20
|
+
}({}), Q = /* @__PURE__ */ function(e) {
|
|
21
21
|
return e.Grid = "grid", e.Cards = "cards", e;
|
|
22
|
-
}({}),
|
|
22
|
+
}({}), kt = /* @__PURE__ */ function(e) {
|
|
23
23
|
return e.Single = "single", e.Multiple = "multiple", e;
|
|
24
|
-
}({}),
|
|
24
|
+
}({}), At = /* @__PURE__ */ function(e) {
|
|
25
25
|
return e.Inline = "inline", e.Stacked = "stacked", e;
|
|
26
|
-
}({}),
|
|
26
|
+
}({}), jt = /* @__PURE__ */ function(e) {
|
|
27
27
|
return e.File = "file", e.Folder = "folder", e;
|
|
28
|
-
}({}),
|
|
28
|
+
}({}), Mt = /* @__PURE__ */ function(e) {
|
|
29
29
|
return e.Markdown = "markdown", e.Text = "text", e.Image = "image", e.Unsupported = "unsupported", e;
|
|
30
|
-
}({}),
|
|
30
|
+
}({}), Nt = () => {
|
|
31
31
|
let [e, t] = z(() => window.innerWidth);
|
|
32
32
|
return I(() => {
|
|
33
33
|
let e = () => t(window.innerWidth);
|
|
34
34
|
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
35
35
|
}, []), e >= 1024 ? 4 : e >= 640 ? 2 : 1;
|
|
36
|
-
},
|
|
36
|
+
}, Pt = {
|
|
37
37
|
root: "dial-catalog-root",
|
|
38
38
|
toolbar: "dial-catalog-toolbar",
|
|
39
39
|
card: "dial-catalog-card",
|
|
40
40
|
favoriteCard: "dial-catalog-favorite-card",
|
|
41
41
|
listView: "dial-catalog-list-view"
|
|
42
|
-
},
|
|
42
|
+
}, Ft = (e) => ({
|
|
43
43
|
codeBlockCopyLabel: e?.copyCodeAriaLabel,
|
|
44
44
|
codeBlockCopiedLabel: e?.copiedCodeStatusLabel,
|
|
45
45
|
codeBlockDownloadLabel: e?.downloadCodeAriaLabel,
|
|
46
46
|
tableScrollRegionAriaLabel: e?.tableScrollRegionAriaLabel,
|
|
47
47
|
mathScrollRegionAriaLabel: e?.mathScrollRegionAriaLabel
|
|
48
|
-
}),
|
|
48
|
+
}), It = (e) => {
|
|
49
49
|
let { colors: t } = e ?? {};
|
|
50
50
|
return ie({
|
|
51
51
|
"--cat-bg": t?.background,
|
|
52
52
|
"--cat-heading-title-text": t?.headingTitleText
|
|
53
53
|
});
|
|
54
|
-
},
|
|
54
|
+
}, Lt = 1180, Rt = (e) => e >= 1280 ? 4 : e >= 966 ? 3 : e >= 620 ? 2 : 1, zt = (e) => {
|
|
55
55
|
if (!e || e === document.body) return document.documentElement;
|
|
56
56
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
57
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
58
|
-
},
|
|
57
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : zt(e.parentElement);
|
|
58
|
+
}, Bt = 10, Vt = 10, Ht = 30, Ut = (e, t, n = Bt) => {
|
|
59
59
|
let r = R(null), [i, a] = z({
|
|
60
60
|
start: 0,
|
|
61
|
-
end:
|
|
61
|
+
end: Ht
|
|
62
62
|
});
|
|
63
63
|
I(() => {
|
|
64
64
|
let i = r.current;
|
|
65
65
|
if (!i) return;
|
|
66
|
-
let o =
|
|
66
|
+
let o = zt(i.parentElement), s = () => {
|
|
67
67
|
let r = o.clientHeight;
|
|
68
68
|
if (r === 0 || i.clientWidth === 0 || getComputedStyle(i).visibility === "hidden") return;
|
|
69
|
-
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) /
|
|
69
|
+
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) / Vt) * Vt), p = Math.min(e, Math.ceil((u + d + n) / Vt) * Vt);
|
|
70
70
|
a((e) => e.start === f && e.end === p ? e : {
|
|
71
71
|
start: f,
|
|
72
72
|
end: p
|
|
@@ -82,15 +82,15 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
82
82
|
t,
|
|
83
83
|
n
|
|
84
84
|
]);
|
|
85
|
-
let o = Math.max(0, Math.floor((e - 1) /
|
|
85
|
+
let o = Math.max(0, Math.floor((e - 1) / Vt) * Vt), s = Math.min(i.start, o);
|
|
86
86
|
return {
|
|
87
87
|
containerRef: r,
|
|
88
88
|
startRow: s,
|
|
89
|
-
endRow: Math.min(e, Math.max(i.end, s +
|
|
89
|
+
endRow: Math.min(e, Math.max(i.end, s + Vt))
|
|
90
90
|
};
|
|
91
|
-
},
|
|
91
|
+
}, Wt = (e, { overscan: t = 3, isFullWidth: n = !1 } = {}) => {
|
|
92
92
|
let r = R(null), [i, a] = z(() => {
|
|
93
|
-
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= D ? 60 : 0)), i =
|
|
93
|
+
let t = typeof window < "u" ? window.innerWidth : 1440, r = Math.max(0, t - (t >= D ? 60 : 0)), i = Rt((n ? r : Math.min(Lt, r)) - 64), a = Math.ceil(e / i);
|
|
94
94
|
return {
|
|
95
95
|
startRow: 0,
|
|
96
96
|
endRow: Math.min(a, 12),
|
|
@@ -100,10 +100,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
100
100
|
I(() => {
|
|
101
101
|
let n = r.current;
|
|
102
102
|
if (!n) return;
|
|
103
|
-
let i =
|
|
103
|
+
let i = zt(n.parentElement), o = () => {
|
|
104
104
|
let r = n.clientWidth, o = i.clientHeight;
|
|
105
105
|
if (r === 0 || o === 0) return;
|
|
106
|
-
let s = n.getBoundingClientRect(), c = i.getBoundingClientRect(), l =
|
|
106
|
+
let s = n.getBoundingClientRect(), c = i.getBoundingClientRect(), l = Rt(r), u = Math.ceil(e / l), d = Math.max(0, c.top - s.top), f = Math.max(0, Math.floor(d / 268) - t), p = Math.min(u, f + Math.ceil(o / 268) + 2 * t);
|
|
107
107
|
a((e) => e.startRow === f && e.endRow === p && e.columnCount === l ? e : {
|
|
108
108
|
startRow: f,
|
|
109
109
|
endRow: p,
|
|
@@ -125,7 +125,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
125
125
|
rowCount: o,
|
|
126
126
|
totalHeight: o * 268
|
|
127
127
|
};
|
|
128
|
-
},
|
|
128
|
+
}, Gt = {
|
|
129
129
|
skeletonColor: "var(--cg-skeleton-color, var(--bg-control-disable-primary, #dce0e8))",
|
|
130
130
|
card: "_card_18c2b_2",
|
|
131
131
|
emptyStarHidden: "_emptyStarHidden_18c2b_2",
|
|
@@ -135,11 +135,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
135
135
|
selectedCard: "_selectedCard_18c2b_37",
|
|
136
136
|
checkIcon: "_checkIcon_18c2b_42",
|
|
137
137
|
footer: "_footer_18c2b_46"
|
|
138
|
-
}, qt = {
|
|
138
|
+
}, Kt = 1, qt = (e) => {
|
|
139
|
+
let t = R(null), [n, r] = z(!1), i = F(() => {
|
|
140
|
+
let e = t.current;
|
|
141
|
+
e && r(e.scrollHeight - e.clientHeight > Kt);
|
|
142
|
+
}, []);
|
|
143
|
+
return fe(() => {
|
|
144
|
+
i();
|
|
145
|
+
let e = t.current;
|
|
146
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
147
|
+
let n = new ResizeObserver(i);
|
|
148
|
+
return n.observe(e), () => n.disconnect();
|
|
149
|
+
}, [i, e]), {
|
|
150
|
+
ref: t,
|
|
151
|
+
isClamped: n
|
|
152
|
+
};
|
|
153
|
+
}, Jt = {
|
|
139
154
|
name: "_name_188yo_1",
|
|
140
155
|
lastUsed: "_lastUsed_188yo_5",
|
|
141
156
|
version: "_version_188yo_9"
|
|
142
|
-
},
|
|
157
|
+
}, Yt = ({ icon: e, type: t, name: n, version: r, lastUsed: i, size: a, query: o, className: s, styles: c, lastUsedTrailing: l, iconClassName: u, iconOverlay: d }) => {
|
|
143
158
|
let f = c?.colors, p = c?.typography ?? {}, m = a === Ot.LG, h = m ? "size-[52px] rounded-[14px]" : "size-[44px] rounded-lg", g = m ? 54 : 44, _ = ie({
|
|
144
159
|
"--ai-name-text": f?.nameColor,
|
|
145
160
|
"--ai-last-used-text": f?.lastUsedColor,
|
|
@@ -173,22 +188,22 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
173
188
|
text: n,
|
|
174
189
|
query: o
|
|
175
190
|
}) : n,
|
|
176
|
-
className: P("min-w-0 flex-1", p?.nameClassName ?? "dial-body-semi-text",
|
|
191
|
+
className: P("min-w-0 flex-1", p?.nameClassName ?? "dial-body-semi-text", Jt.name)
|
|
177
192
|
}), r && /* @__PURE__ */ J(Te, {
|
|
178
193
|
text: r,
|
|
179
|
-
className: P("min-w-0 text-end tabular-nums", p?.versionClassName ?? "dial-tiny-text",
|
|
194
|
+
className: P("min-w-0 text-end tabular-nums", p?.versionClassName ?? "dial-tiny-text", Jt.version)
|
|
180
195
|
})]
|
|
181
196
|
}), m && i != null && /* @__PURE__ */ Y("div", {
|
|
182
197
|
className: "flex items-center gap-2",
|
|
183
198
|
children: [/* @__PURE__ */ J("span", {
|
|
184
|
-
className: P("tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text",
|
|
199
|
+
className: P("tabular-nums", p?.lastUsedClassName ?? "dial-tiny-text", Jt.lastUsed),
|
|
185
200
|
children: i
|
|
186
201
|
}), l]
|
|
187
202
|
})]
|
|
188
203
|
})]
|
|
189
204
|
})]
|
|
190
205
|
});
|
|
191
|
-
},
|
|
206
|
+
}, Xt = { icon: "_icon_a0p4u_1" }, Zt = ({ credentials: e, loggedOutLabel: t = "Authorize to use this toolset.", className: n, colors: r }) => e == null || p(e) == null ? null : /* @__PURE__ */ J(G, {
|
|
192
207
|
tooltip: t,
|
|
193
208
|
asChild: !0,
|
|
194
209
|
children: /* @__PURE__ */ J("span", {
|
|
@@ -201,14 +216,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
201
216
|
className: P("absolute -bottom-1 -end-1 shrink-0", n),
|
|
202
217
|
children: /* @__PURE__ */ J(qe, {
|
|
203
218
|
size: B.SM,
|
|
204
|
-
className:
|
|
219
|
+
className: Xt.icon,
|
|
205
220
|
"aria-hidden": !0
|
|
206
221
|
})
|
|
207
222
|
})
|
|
208
|
-
}),
|
|
223
|
+
}), Qt = {
|
|
209
224
|
starFilledIcon: "_starFilledIcon_po6zj_1",
|
|
210
225
|
starPop: "_starPop_po6zj_1"
|
|
211
|
-
},
|
|
226
|
+
}, $t = ({ isStarred: e, onClick: t, size: n, ariaLabel: r = "Toggle favorite", className: i, starFilledColor: a }) => /* @__PURE__ */ J(Ke, {
|
|
212
227
|
size: n,
|
|
213
228
|
style: ie({ "--cat-star-filled": a }),
|
|
214
229
|
className: i,
|
|
@@ -220,12 +235,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
220
235
|
}),
|
|
221
236
|
selectedIcon: /* @__PURE__ */ J(mt, {
|
|
222
237
|
size: B.SM,
|
|
223
|
-
className:
|
|
238
|
+
className: Qt.starFilledIcon,
|
|
224
239
|
"aria-hidden": !0
|
|
225
240
|
}),
|
|
226
241
|
"aria-label": r,
|
|
227
242
|
onClick: t
|
|
228
|
-
}),
|
|
243
|
+
}), en = { tag: "_tag_iqin5_3" }, tn = ({ label: e, className: t, badgeClassName: n = "dial-tiny-text", colors: r }) => /* @__PURE__ */ J(pe, {
|
|
229
244
|
label: e,
|
|
230
245
|
textClassName: n,
|
|
231
246
|
style: ie({
|
|
@@ -233,12 +248,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
233
248
|
"--cat-card-tag-text": r?.text,
|
|
234
249
|
"--cat-card-tag-border": r?.border
|
|
235
250
|
}),
|
|
236
|
-
className: P(
|
|
237
|
-
}),
|
|
251
|
+
className: P(en.tag, t)
|
|
252
|
+
}), nn = ({ label: e, className: t = "dial-tiny-text", colors: n }) => /* @__PURE__ */ J(tn, {
|
|
238
253
|
label: e,
|
|
239
254
|
badgeClassName: t,
|
|
240
255
|
colors: n
|
|
241
|
-
}),
|
|
256
|
+
}), rn = 8, an = ({ topics: e, overflowAriaLabel: t, className: n }) => {
|
|
242
257
|
let r = R(null), i = R([]), a = R([]), o = R(null), s = R(Infinity), [c, l] = z(e.length), u = e.join("\0"), d = F(() => {
|
|
243
258
|
let t = r.current;
|
|
244
259
|
if (!t || e.length === 0) return;
|
|
@@ -250,8 +265,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
250
265
|
let u = o.current?.offsetWidth ?? 0, d = 0, f = 0;
|
|
251
266
|
for (let t = 0; t < e.length; t++) {
|
|
252
267
|
let r = e.length - (t + 1) > 0;
|
|
253
|
-
if (d + (t > 0 ?
|
|
254
|
-
d += (t > 0 ?
|
|
268
|
+
if (d + (t > 0 ? rn : 0) + c[t] + (r ? rn + u : 0) > n) break;
|
|
269
|
+
d += (t > 0 ? rn : 0) + c[t], f = t + 1;
|
|
255
270
|
}
|
|
256
271
|
l(Math.min(f, s.current));
|
|
257
272
|
}, [e.length]);
|
|
@@ -282,39 +297,59 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
282
297
|
ref: (e) => {
|
|
283
298
|
i.current[t] = e;
|
|
284
299
|
},
|
|
285
|
-
children: /* @__PURE__ */ J(
|
|
300
|
+
children: /* @__PURE__ */ J(nn, { label: e })
|
|
286
301
|
}, e)),
|
|
287
302
|
f > 0 && /* @__PURE__ */ J(G, {
|
|
288
303
|
tooltip: e.slice(c).join(", "),
|
|
289
304
|
children: /* @__PURE__ */ J("span", {
|
|
290
305
|
"aria-label": t?.(f) ?? `and ${f} more topics`,
|
|
291
|
-
children: /* @__PURE__ */ J(
|
|
306
|
+
children: /* @__PURE__ */ J(nn, { label: `+${f}` })
|
|
292
307
|
})
|
|
293
308
|
}),
|
|
294
309
|
/* @__PURE__ */ J("div", {
|
|
295
310
|
ref: o,
|
|
296
311
|
"aria-hidden": !0,
|
|
297
312
|
className: "invisible absolute start-0 top-0",
|
|
298
|
-
children: /* @__PURE__ */ J(
|
|
313
|
+
children: /* @__PURE__ */ J(nn, { label: `+${e.length}` })
|
|
299
314
|
})
|
|
300
315
|
]
|
|
301
316
|
});
|
|
302
|
-
},
|
|
317
|
+
}, on = { img: () => null }, sn = "dial-small-text", cn = {
|
|
318
|
+
p: sn,
|
|
319
|
+
ul: sn,
|
|
320
|
+
ol: sn,
|
|
321
|
+
h1: sn,
|
|
322
|
+
h2: sn,
|
|
323
|
+
h3: sn,
|
|
324
|
+
h4: sn,
|
|
325
|
+
h5: sn,
|
|
326
|
+
h6: sn,
|
|
327
|
+
strong: "dial-small-semi-text"
|
|
328
|
+
}, ln = {
|
|
329
|
+
img: () => null,
|
|
330
|
+
a: ({ children: e }) => /* @__PURE__ */ J("span", { children: e })
|
|
331
|
+
}, un = {
|
|
332
|
+
blockquoteText: "currentColor",
|
|
333
|
+
tableHeaderText: "currentColor",
|
|
334
|
+
headingSixText: "currentColor",
|
|
335
|
+
inlineCodeBackground: "transparent",
|
|
336
|
+
inlineCodeText: "currentColor"
|
|
337
|
+
}, dn = (e) => e.target instanceof Element && e.target.closest("a") !== null, fn = ({ 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, markdownLabels: m }) => {
|
|
303
338
|
let [h, g] = z(r);
|
|
304
339
|
I(() => {
|
|
305
340
|
g(r);
|
|
306
341
|
}, [e.id, r]);
|
|
307
|
-
let _ = d?.typography?.descriptionClassName ?? "dial-small-paragraph-text",
|
|
342
|
+
let { ref: _, isClamped: v } = qt(e.description), y = d?.typography?.descriptionClassName ?? "dial-small-paragraph-text", b = d?.typography?.featuredChipClassName, x = d?.typography?.folderLabelClassName ?? "dial-tiny-text", S = d?.typography?.folderLeafClassName ?? "dial-tiny-semi-text", C = ie({
|
|
308
343
|
"--cg-description-text": d?.colors?.textSecondary,
|
|
309
344
|
"--cg-selected-border": d?.colors?.selectedBorder,
|
|
310
345
|
"--cg-selected-bg": d?.colors?.selectedBackground,
|
|
311
346
|
"--cg-check-icon": d?.colors?.checkIcon,
|
|
312
347
|
"--cg-footer-border": d?.colors?.footerBorder
|
|
313
|
-
}),
|
|
314
|
-
|
|
315
|
-
} : void 0,
|
|
316
|
-
!n ||
|
|
317
|
-
}, [n, e]),
|
|
348
|
+
}), w = !p && e.isFeatured === !0, T = !p && a?.(e) !== !1, E = !p || e.folder.length > 0, D = n ? (t) => {
|
|
349
|
+
dn(t) || n(e);
|
|
350
|
+
} : void 0, O = F((t) => {
|
|
351
|
+
!n || dn(t) || (t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e));
|
|
352
|
+
}, [n, e]), k = F((t) => {
|
|
318
353
|
t.stopPropagation();
|
|
319
354
|
let n = !h;
|
|
320
355
|
g(n), i?.(e.id, n);
|
|
@@ -327,87 +362,100 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
327
362
|
...n ? {
|
|
328
363
|
role: "button",
|
|
329
364
|
tabIndex: 0,
|
|
330
|
-
onClick:
|
|
331
|
-
onKeyDown:
|
|
365
|
+
onClick: D,
|
|
366
|
+
onKeyDown: O
|
|
332
367
|
} : {},
|
|
333
368
|
"aria-label": e.name,
|
|
334
|
-
style:
|
|
335
|
-
className: P("box-border cursor-pointer gap-3",
|
|
369
|
+
style: C,
|
|
370
|
+
className: P("box-border cursor-pointer gap-3", Gt.card, w ? Gt.featuredCard : void 0, l ? Gt.selectedCard : void 0, u, Pt.card),
|
|
336
371
|
children: [
|
|
337
|
-
|
|
372
|
+
w && /* @__PURE__ */ J("div", {
|
|
338
373
|
className: "absolute end-[22px] top-0 -translate-y-1/2",
|
|
339
374
|
children: /* @__PURE__ */ J(A, {
|
|
340
375
|
label: o,
|
|
341
376
|
type: e.type,
|
|
342
|
-
className:
|
|
377
|
+
className: b,
|
|
343
378
|
style: d?.colors?.featuredChipStyle
|
|
344
379
|
})
|
|
345
380
|
}),
|
|
346
381
|
l && /* @__PURE__ */ J(Xe, {
|
|
347
382
|
size: B.SM,
|
|
348
|
-
className: P("absolute end-3 top-3 shrink-0",
|
|
383
|
+
className: P("absolute end-3 top-3 shrink-0", Gt.checkIcon),
|
|
349
384
|
"aria-hidden": !0,
|
|
350
385
|
stroke: V
|
|
351
386
|
}),
|
|
352
|
-
/* @__PURE__ */ J(
|
|
387
|
+
/* @__PURE__ */ J(Yt, {
|
|
353
388
|
icon: e.iconUrl,
|
|
354
389
|
type: e.type,
|
|
355
390
|
name: e.name,
|
|
356
391
|
version: e.version,
|
|
357
392
|
size: Ot.SM,
|
|
358
393
|
query: t,
|
|
359
|
-
iconClassName:
|
|
360
|
-
iconOverlay: /* @__PURE__ */ J(
|
|
394
|
+
iconClassName: Gt.cardIcon,
|
|
395
|
+
iconOverlay: /* @__PURE__ */ J(Zt, {
|
|
361
396
|
credentials: e.credentials,
|
|
362
397
|
loggedOutLabel: f
|
|
363
398
|
})
|
|
364
399
|
}),
|
|
365
|
-
/* @__PURE__ */ J(
|
|
366
|
-
|
|
367
|
-
|
|
400
|
+
/* @__PURE__ */ J(G, {
|
|
401
|
+
asChild: !0,
|
|
402
|
+
hideTooltip: !v,
|
|
403
|
+
contentClassName: "whitespace-normal",
|
|
404
|
+
tooltip: e.description && /* @__PURE__ */ J(ne, {
|
|
368
405
|
content: e.description,
|
|
369
|
-
classNames:
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
ol: _,
|
|
373
|
-
h1: _,
|
|
374
|
-
h2: _,
|
|
375
|
-
h3: _,
|
|
376
|
-
h4: _,
|
|
377
|
-
h5: _,
|
|
378
|
-
h6: _
|
|
379
|
-
},
|
|
380
|
-
components: an,
|
|
406
|
+
classNames: cn,
|
|
407
|
+
colors: un,
|
|
408
|
+
components: ln,
|
|
381
409
|
...m
|
|
410
|
+
}),
|
|
411
|
+
children: /* @__PURE__ */ J("div", {
|
|
412
|
+
ref: _,
|
|
413
|
+
className: P("line-clamp-2 min-h-[2lh] break-words", Gt.description),
|
|
414
|
+
children: e.description && /* @__PURE__ */ J(ne, {
|
|
415
|
+
content: e.description,
|
|
416
|
+
classNames: {
|
|
417
|
+
p: y,
|
|
418
|
+
ul: y,
|
|
419
|
+
ol: y,
|
|
420
|
+
h1: y,
|
|
421
|
+
h2: y,
|
|
422
|
+
h3: y,
|
|
423
|
+
h4: y,
|
|
424
|
+
h5: y,
|
|
425
|
+
h6: y
|
|
426
|
+
},
|
|
427
|
+
components: on,
|
|
428
|
+
...m
|
|
429
|
+
})
|
|
382
430
|
})
|
|
383
431
|
}),
|
|
384
432
|
/* @__PURE__ */ J("div", {
|
|
385
433
|
className: "mt-auto flex items-center gap-2",
|
|
386
|
-
children: /* @__PURE__ */ J(
|
|
434
|
+
children: /* @__PURE__ */ J(an, { topics: e.topics })
|
|
387
435
|
}),
|
|
388
|
-
|
|
389
|
-
className: P("pt-3", !p && P("border-t",
|
|
436
|
+
E && /* @__PURE__ */ J("div", {
|
|
437
|
+
className: P("pt-3", !p && P("border-t", Gt.footer)),
|
|
390
438
|
children: /* @__PURE__ */ Y("div", {
|
|
391
439
|
className: "flex items-center gap-2",
|
|
392
440
|
children: [/* @__PURE__ */ J("div", {
|
|
393
441
|
className: "min-w-0 flex-1",
|
|
394
442
|
children: e.folder.length > 0 && /* @__PURE__ */ J(Ee, {
|
|
395
443
|
segments: e.folder,
|
|
396
|
-
labelClassName:
|
|
397
|
-
leafClassName:
|
|
444
|
+
labelClassName: x,
|
|
445
|
+
leafClassName: S
|
|
398
446
|
})
|
|
399
|
-
}),
|
|
447
|
+
}), T && /* @__PURE__ */ J($t, {
|
|
400
448
|
isStarred: h,
|
|
401
449
|
size: H.Small,
|
|
402
|
-
onClick:
|
|
450
|
+
onClick: k,
|
|
403
451
|
ariaLabel: h ? c : s,
|
|
404
|
-
className: P(
|
|
452
|
+
className: P(Gt.starBtn, !h && Gt.emptyStarHidden)
|
|
405
453
|
})]
|
|
406
454
|
})
|
|
407
455
|
})
|
|
408
456
|
]
|
|
409
457
|
});
|
|
410
|
-
},
|
|
458
|
+
}, pn = ce(({ rowIndex: e, items: t, columnCount: n, query: r, onToggleFavorite: i, isFavoriteVisible: a, onItemClick: o, featuredLabel: s, addToFavoritesAriaLabel: c, removeFromFavoritesAriaLabel: l, selectedItemId: u, credentialsBadgeLoggedOutLabel: d, isReadonly: f, featuredChipStyle: p, markdownLabels: m }) => {
|
|
411
459
|
let h = e * n, g = t.slice(h, h + n);
|
|
412
460
|
return /* @__PURE__ */ J("div", {
|
|
413
461
|
style: {
|
|
@@ -419,7 +467,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
419
467
|
let n = g[t];
|
|
420
468
|
return /* @__PURE__ */ J("div", {
|
|
421
469
|
className: "h-full min-w-0 flex-1",
|
|
422
|
-
children: n && /* @__PURE__ */ J(
|
|
470
|
+
children: n && /* @__PURE__ */ J(fn, {
|
|
423
471
|
item: n,
|
|
424
472
|
query: r,
|
|
425
473
|
initialIsStarred: n.isStarred,
|
|
@@ -439,8 +487,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
439
487
|
}, n?.id ?? `spacer-${t}`);
|
|
440
488
|
})
|
|
441
489
|
});
|
|
442
|
-
}),
|
|
443
|
-
let m = a?.noResultsTitle ?? "No results", h = a?.featuredLabel ?? "Featured", g = a?.addToFavoritesAriaLabel ?? "Add to favorites", _ = a?.removeFromFavoritesAriaLabel ?? "Remove from favorites", v = a?.credentialsBadgeLoggedOutLabel ?? "Authorize to use this toolset.", { containerRef: y, startRow: b, endRow: x, columnCount: S, totalHeight: C } =
|
|
490
|
+
}), mn = ce(({ items: e, query: t = "", onToggleFavorite: n, isFavoriteVisible: r, onItemClick: i, titles: a, isLoading: o, selectedItemId: s, skeletonColor: c = Gt.skeletonColor, skeletonCardBackground: l, isReadonly: u = !1, isFullWidth: d = !1, featuredChipStyle: f, markdownLabels: p }) => {
|
|
491
|
+
let m = a?.noResultsTitle ?? "No results", h = a?.featuredLabel ?? "Featured", g = a?.addToFavoritesAriaLabel ?? "Add to favorites", _ = a?.removeFromFavoritesAriaLabel ?? "Remove from favorites", v = a?.credentialsBadgeLoggedOutLabel ?? "Authorize to use this toolset.", { containerRef: y, startRow: b, endRow: x, columnCount: S, totalHeight: C } = Wt(e.length, { isFullWidth: d }), w = L(() => ({
|
|
444
492
|
items: e,
|
|
445
493
|
columnCount: S,
|
|
446
494
|
query: t,
|
|
@@ -478,7 +526,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
478
526
|
...ie({ "--cg-skeleton-card-bg": l })
|
|
479
527
|
},
|
|
480
528
|
children: Array.from({ length: S * 3 }, (e, t) => /* @__PURE__ */ J("div", {
|
|
481
|
-
className: P("rounded-md border p-4",
|
|
529
|
+
className: P("rounded-md border p-4", Gt.skeletonCard),
|
|
482
530
|
style: { height: 248 },
|
|
483
531
|
children: /* @__PURE__ */ J(He, {
|
|
484
532
|
avatar: {
|
|
@@ -500,26 +548,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
500
548
|
style: { height: C },
|
|
501
549
|
children: Array.from({ length: x - b }, (e, t) => {
|
|
502
550
|
let n = b + t;
|
|
503
|
-
return /* @__PURE__ */ J(
|
|
551
|
+
return /* @__PURE__ */ J(pn, {
|
|
504
552
|
rowIndex: n,
|
|
505
553
|
...w
|
|
506
554
|
}, n);
|
|
507
555
|
})
|
|
508
556
|
});
|
|
509
|
-
}),
|
|
557
|
+
}), hn = (e) => e.reduce((e, t) => t.type === jt.File ? e + 1 : e + hn(t.items), 0), gn = (e) => {
|
|
510
558
|
let t = /* @__PURE__ */ new Set(), n = (e) => {
|
|
511
|
-
for (let r of e) r.type ===
|
|
559
|
+
for (let r of e) r.type === jt.Folder && (t.add(r.id), n(r.items));
|
|
512
560
|
};
|
|
513
561
|
return n(e), t;
|
|
514
|
-
},
|
|
562
|
+
}, _n = (e, t) => {
|
|
515
563
|
if (t != null) for (let n of e) {
|
|
516
564
|
if (n.id === t) return n.name;
|
|
517
|
-
if (n.type ===
|
|
518
|
-
let e =
|
|
565
|
+
if (n.type === jt.Folder) {
|
|
566
|
+
let e = _n(n.items, t);
|
|
519
567
|
if (e != null) return e;
|
|
520
568
|
}
|
|
521
569
|
}
|
|
522
|
-
},
|
|
570
|
+
}, vn = {
|
|
523
571
|
sectionHeading: "_sectionHeading_jnq93_1",
|
|
524
572
|
rowAlt: "_rowAlt_jnq93_5",
|
|
525
573
|
label: "_label_jnq93_9",
|
|
@@ -527,19 +575,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
527
575
|
valueTrue: "_valueTrue_jnq93_17",
|
|
528
576
|
valueFalse: "_valueFalse_jnq93_21",
|
|
529
577
|
valueText: "_valueText_jnq93_25"
|
|
530
|
-
},
|
|
578
|
+
}, yn = ({ value: e, valueClassName: t, valueTrueClassName: n, checkIconClassName: r, yesLabel: i, noLabel: a }) => e === !0 ? /* @__PURE__ */ Y(bt, { children: [/* @__PURE__ */ J(et, {
|
|
531
579
|
size: B.MD,
|
|
532
|
-
className: P(r,
|
|
580
|
+
className: P(r, vn.checkIcon)
|
|
533
581
|
}), /* @__PURE__ */ J("span", {
|
|
534
|
-
className: P(n,
|
|
582
|
+
className: P(n, vn.valueTrue),
|
|
535
583
|
children: i
|
|
536
584
|
})] }) : e === !1 ? /* @__PURE__ */ J("span", {
|
|
537
|
-
className: P(t,
|
|
585
|
+
className: P(t, vn.valueFalse),
|
|
538
586
|
children: a
|
|
539
587
|
}) : /* @__PURE__ */ J("span", {
|
|
540
|
-
className: P("min-w-0 break-words", t,
|
|
588
|
+
className: P("min-w-0 break-words", t, vn.valueText),
|
|
541
589
|
children: e
|
|
542
|
-
}),
|
|
590
|
+
}), bn = ({ 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__ */ J("div", {
|
|
543
591
|
className: "flex flex-col",
|
|
544
592
|
style: ie({
|
|
545
593
|
"--tv-section-heading": l?.sectionHeading,
|
|
@@ -551,18 +599,18 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
551
599
|
"--tv-value-text": l?.valueText
|
|
552
600
|
}),
|
|
553
601
|
children: t != null && t.length > 0 && /* @__PURE__ */ Y("section", { children: [/* @__PURE__ */ J("p", {
|
|
554
|
-
className: P("mb-3 mt-0", o,
|
|
602
|
+
className: P("mb-3 mt-0", o, vn.sectionHeading),
|
|
555
603
|
children: e
|
|
556
604
|
}), /* @__PURE__ */ J("ul", {
|
|
557
605
|
className: "m-0 list-none p-0",
|
|
558
606
|
children: t.map((e, t) => /* @__PURE__ */ Y("li", {
|
|
559
|
-
className: P("flex items-center rounded px-3 py-2", t % 2 == 0 ?
|
|
607
|
+
className: P("flex items-center rounded px-3 py-2", t % 2 == 0 ? vn.rowAlt : void 0),
|
|
560
608
|
children: [/* @__PURE__ */ J("span", {
|
|
561
|
-
className: P(n,
|
|
609
|
+
className: P(n, vn.label, "w-2/5 shrink-0"),
|
|
562
610
|
children: e.label
|
|
563
611
|
}), /* @__PURE__ */ J("div", {
|
|
564
612
|
className: "flex w-3/5 min-w-0 items-center gap-1",
|
|
565
|
-
children: /* @__PURE__ */ J(
|
|
613
|
+
children: /* @__PURE__ */ J(yn, {
|
|
566
614
|
value: e.value,
|
|
567
615
|
valueClassName: r,
|
|
568
616
|
valueTrueClassName: i,
|
|
@@ -573,30 +621,30 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
573
621
|
})]
|
|
574
622
|
}, e.label))
|
|
575
623
|
})] })
|
|
576
|
-
}),
|
|
624
|
+
}), xn = { sectionHeading: "_sectionHeading_148lj_1" }, Sn = {
|
|
577
625
|
[X.Python]: "Python",
|
|
578
626
|
[X.Curl]: "cURL",
|
|
579
627
|
[X.JavaScript]: "JavaScript"
|
|
580
|
-
},
|
|
628
|
+
}, Cn = {
|
|
581
629
|
[X.Python]: "python",
|
|
582
630
|
[X.Curl]: "bash",
|
|
583
631
|
[X.JavaScript]: "javascript"
|
|
584
|
-
},
|
|
632
|
+
}, wn = ({ 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" }) => {
|
|
585
633
|
let [s, c] = z(e[0]?.language ?? X.Python);
|
|
586
634
|
I(() => {
|
|
587
635
|
c(e[0]?.language ?? X.Python);
|
|
588
636
|
}, [e]);
|
|
589
637
|
let l = L(() => e.map((e) => ({
|
|
590
638
|
key: e.language,
|
|
591
|
-
label:
|
|
639
|
+
label: Sn[e.language] ?? e.language,
|
|
592
640
|
onClick: () => c(e.language)
|
|
593
641
|
})), [e]), u = e.find((e) => e.language === s)?.code ?? "", d = e.length > 1;
|
|
594
642
|
return /* @__PURE__ */ Y("section", { children: [t != null && /* @__PURE__ */ J("p", {
|
|
595
|
-
className: P("mb-3 mt-0", o,
|
|
643
|
+
className: P("mb-3 mt-0", o, xn.sectionHeading),
|
|
596
644
|
children: t
|
|
597
645
|
}), /* @__PURE__ */ J(j, {
|
|
598
|
-
language:
|
|
599
|
-
title:
|
|
646
|
+
language: Cn[s] ?? s,
|
|
647
|
+
title: Sn[s] ?? s,
|
|
600
648
|
value: u,
|
|
601
649
|
copyLabel: n,
|
|
602
650
|
copiedLabel: r,
|
|
@@ -611,7 +659,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
611
659
|
selectedKey: s
|
|
612
660
|
}) : void 0
|
|
613
661
|
})] });
|
|
614
|
-
},
|
|
662
|
+
}, Tn = ({ 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" }) => {
|
|
615
663
|
let [h, g] = z(0), _ = L(() => e.endpoints ?? [], [e.endpoints]), v = _.length > 0, y = _[h] ?? null, b = L(() => _.map((e, t) => ({
|
|
616
664
|
key: e.url,
|
|
617
665
|
label: e.label,
|
|
@@ -625,7 +673,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
625
673
|
return /* @__PURE__ */ Y("div", {
|
|
626
674
|
className: "flex flex-col gap-6",
|
|
627
675
|
children: [
|
|
628
|
-
C && /* @__PURE__ */ J(
|
|
676
|
+
C && /* @__PURE__ */ J(bn, {
|
|
629
677
|
sectionLabel: t,
|
|
630
678
|
values: x,
|
|
631
679
|
labelClassName: u,
|
|
@@ -643,7 +691,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
643
691
|
}),
|
|
644
692
|
v && /* @__PURE__ */ Y("section", { children: [
|
|
645
693
|
/* @__PURE__ */ J("p", {
|
|
646
|
-
className: P("mb-3 mt-0", m,
|
|
694
|
+
className: P("mb-3 mt-0", m, xn.sectionHeading),
|
|
647
695
|
children: n
|
|
648
696
|
}),
|
|
649
697
|
y != null && /* @__PURE__ */ J(j, {
|
|
@@ -664,7 +712,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
664
712
|
}, h),
|
|
665
713
|
y?.snippets != null && y.snippets.length > 0 && /* @__PURE__ */ J("div", {
|
|
666
714
|
className: "mt-4",
|
|
667
|
-
children: /* @__PURE__ */ J(
|
|
715
|
+
children: /* @__PURE__ */ J(wn, {
|
|
668
716
|
snippets: y.snippets,
|
|
669
717
|
copyAriaLabel: c,
|
|
670
718
|
copiedStatusLabel: l,
|
|
@@ -674,7 +722,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
674
722
|
}, h)
|
|
675
723
|
})
|
|
676
724
|
] }),
|
|
677
|
-
!v && T && /* @__PURE__ */ J(
|
|
725
|
+
!v && T && /* @__PURE__ */ J(wn, {
|
|
678
726
|
snippets: e.snippets ?? [],
|
|
679
727
|
sectionLabel: r,
|
|
680
728
|
copyAriaLabel: c,
|
|
@@ -684,7 +732,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
684
732
|
sectionClassName: m
|
|
685
733
|
}),
|
|
686
734
|
E && /* @__PURE__ */ Y("section", { children: [/* @__PURE__ */ J("p", {
|
|
687
|
-
className: P("mb-3 mt-0", m,
|
|
735
|
+
className: P("mb-3 mt-0", m, xn.sectionHeading),
|
|
688
736
|
children: o
|
|
689
737
|
}), /* @__PURE__ */ J(j, {
|
|
690
738
|
language: "bash",
|
|
@@ -695,7 +743,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
695
743
|
hideDownload: !0
|
|
696
744
|
})] }),
|
|
697
745
|
D && /* @__PURE__ */ Y("section", { children: [/* @__PURE__ */ J("p", {
|
|
698
|
-
className: P("mb-3 mt-0", m,
|
|
746
|
+
className: P("mb-3 mt-0", m, xn.sectionHeading),
|
|
699
747
|
children: s
|
|
700
748
|
}), /* @__PURE__ */ J(j, {
|
|
701
749
|
language: "json",
|
|
@@ -707,26 +755,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
707
755
|
})] })
|
|
708
756
|
]
|
|
709
757
|
});
|
|
710
|
-
},
|
|
758
|
+
}, En = {
|
|
711
759
|
sunkenBox: "_sunkenBox_1lqi3_1",
|
|
712
760
|
raisedBox: "_raisedBox_1lqi3_5",
|
|
713
761
|
activeIcon: "_activeIcon_1lqi3_9"
|
|
714
|
-
},
|
|
762
|
+
}, Dn = /* @__PURE__ */ function(e) {
|
|
715
763
|
return e.Sunken = "sunken", e.Raised = "raised", e;
|
|
716
|
-
}({}),
|
|
717
|
-
sunken:
|
|
718
|
-
raised:
|
|
719
|
-
},
|
|
764
|
+
}({}), On = {
|
|
765
|
+
sunken: En.sunkenBox,
|
|
766
|
+
raised: En.raisedBox
|
|
767
|
+
}, kn = ({ icon: e, isActive: t = !1, surface: n = "sunken", statusLabel: r }) => /* @__PURE__ */ Y("span", {
|
|
720
768
|
className: "relative inline-flex shrink-0",
|
|
721
769
|
children: [
|
|
722
770
|
/* @__PURE__ */ J("span", {
|
|
723
|
-
className: P("flex size-8 items-center justify-center rounded-lg",
|
|
771
|
+
className: P("flex size-8 items-center justify-center rounded-lg", On[n]),
|
|
724
772
|
children: e
|
|
725
773
|
}),
|
|
726
774
|
t && /* @__PURE__ */ J(et, {
|
|
727
775
|
size: B.MD,
|
|
728
776
|
"aria-hidden": !0,
|
|
729
|
-
className: P("absolute -end-2 -top-2",
|
|
777
|
+
className: P("absolute -end-2 -top-2", En.activeIcon)
|
|
730
778
|
}),
|
|
731
779
|
r != null && /* @__PURE__ */ J("span", {
|
|
732
780
|
role: "status",
|
|
@@ -734,27 +782,27 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
734
782
|
children: r
|
|
735
783
|
})
|
|
736
784
|
]
|
|
737
|
-
}),
|
|
785
|
+
}), An = {
|
|
738
786
|
card: "_card_tqnz7_1",
|
|
739
787
|
icon: "_icon_tqnz7_6",
|
|
740
788
|
title: "_title_tqnz7_10",
|
|
741
789
|
description: "_description_tqnz7_14"
|
|
742
|
-
},
|
|
790
|
+
}, jn = ({ icon: e, title: t, description: n, action: r, titleClassName: i = "dial-small-semi-text", descriptionClassName: a = "dial-small-text" }) => /* @__PURE__ */ Y("div", {
|
|
743
791
|
role: "status",
|
|
744
792
|
"aria-live": "polite",
|
|
745
|
-
className: P("flex items-center gap-3 rounded-xl p-3",
|
|
793
|
+
className: P("flex items-center gap-3 rounded-xl p-3", An.card),
|
|
746
794
|
children: [/* @__PURE__ */ J("span", {
|
|
747
|
-
className: P("shrink-0",
|
|
795
|
+
className: P("shrink-0", An.icon, n != null && "mt-0.5"),
|
|
748
796
|
children: e
|
|
749
797
|
}), /* @__PURE__ */ Y("div", {
|
|
750
798
|
className: "flex min-w-0 flex-1 items-center justify-between gap-2",
|
|
751
799
|
children: [/* @__PURE__ */ Y("div", {
|
|
752
800
|
className: "flex min-w-0 flex-col gap-1",
|
|
753
801
|
children: [/* @__PURE__ */ J("span", {
|
|
754
|
-
className: P(i,
|
|
802
|
+
className: P(i, An.title),
|
|
755
803
|
children: t
|
|
756
804
|
}), n != null && /* @__PURE__ */ J("span", {
|
|
757
|
-
className: P(a,
|
|
805
|
+
className: P(a, An.description),
|
|
758
806
|
children: n
|
|
759
807
|
})]
|
|
760
808
|
}), r != null && /* @__PURE__ */ J("div", {
|
|
@@ -762,53 +810,53 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
762
810
|
children: r
|
|
763
811
|
})]
|
|
764
812
|
})]
|
|
765
|
-
}),
|
|
813
|
+
}), Mn = (e) => e === x.ApiKey ? "You are currently using organization API key to access this toolset." : "You are currently using organization credentials to access this toolset.", Nn = (e) => e === x.ApiKey ? "Configure your personal API key to have access to your data." : "Login using personal account to have access to your data.", Pn = (e) => e === x.ApiKey ? "Signed in with organization API key." : "Signed in with organization credentials.", Fn = (e) => e === x.ApiKey ? "Signed in with personal API key." : "Signed in with personal credentials.", In = 20, Ln = ({ state: e, authenticationType: t, texts: n }) => {
|
|
766
814
|
let r = /* @__PURE__ */ J(Ye, {
|
|
767
|
-
size:
|
|
815
|
+
size: In,
|
|
768
816
|
"aria-hidden": !0,
|
|
769
817
|
stroke: V
|
|
770
818
|
});
|
|
771
819
|
if (e === S.PersonalCredentialsActive) {
|
|
772
|
-
let e = (n?.personalCredentialsActiveBannerTitle ??
|
|
773
|
-
return /* @__PURE__ */ J(
|
|
774
|
-
icon: /* @__PURE__ */ J(
|
|
820
|
+
let e = (n?.personalCredentialsActiveBannerTitle ?? Fn)(t);
|
|
821
|
+
return /* @__PURE__ */ J(jn, {
|
|
822
|
+
icon: /* @__PURE__ */ J(kn, {
|
|
775
823
|
icon: /* @__PURE__ */ J(gt, {
|
|
776
824
|
size: B.SM,
|
|
777
825
|
"aria-hidden": !0,
|
|
778
826
|
stroke: V
|
|
779
827
|
}),
|
|
780
828
|
isActive: !0,
|
|
781
|
-
surface:
|
|
829
|
+
surface: Dn.Raised
|
|
782
830
|
}),
|
|
783
831
|
title: e
|
|
784
832
|
});
|
|
785
833
|
}
|
|
786
834
|
if (e === S.OrgCredentialsActive) {
|
|
787
|
-
let e = (n?.orgCredentialsActiveBannerTitle ??
|
|
788
|
-
return /* @__PURE__ */ J(
|
|
789
|
-
icon: /* @__PURE__ */ J(
|
|
835
|
+
let e = (n?.orgCredentialsActiveBannerTitle ?? Pn)(t);
|
|
836
|
+
return /* @__PURE__ */ J(jn, {
|
|
837
|
+
icon: /* @__PURE__ */ J(kn, {
|
|
790
838
|
icon: /* @__PURE__ */ J(Ye, {
|
|
791
839
|
size: B.SM,
|
|
792
840
|
"aria-hidden": !0,
|
|
793
841
|
stroke: V
|
|
794
842
|
}),
|
|
795
843
|
isActive: !0,
|
|
796
|
-
surface:
|
|
844
|
+
surface: Dn.Raised
|
|
797
845
|
}),
|
|
798
846
|
title: e
|
|
799
847
|
});
|
|
800
848
|
}
|
|
801
|
-
return /* @__PURE__ */ J(
|
|
849
|
+
return /* @__PURE__ */ J(jn, {
|
|
802
850
|
icon: r,
|
|
803
|
-
title: (n?.orgFallbackBannerTitle ??
|
|
804
|
-
description: (n?.orgFallbackBannerDescription ??
|
|
851
|
+
title: (n?.orgFallbackBannerTitle ?? Mn)(t),
|
|
852
|
+
description: (n?.orgFallbackBannerDescription ?? Nn)(t)
|
|
805
853
|
});
|
|
806
|
-
},
|
|
854
|
+
}, Rn = {
|
|
807
855
|
surface: "_surface_1q3s8_1",
|
|
808
856
|
description: "_description_1q3s8_5",
|
|
809
857
|
rowDescription: "_rowDescription_1q3s8_9",
|
|
810
858
|
errorText: "_errorText_1q3s8_13"
|
|
811
|
-
},
|
|
859
|
+
}, zn = ({ label: e, description: t, icon: n, status: r, isActive: i, authenticationType: a, apiKeyAddedWhen: o, apiKeyHeader: s, onLogin: c, onRequestLogout: l, onRequestDeleteApiKey: u, texts: d, labelClassName: f, descriptionClassName: p, errorClassName: m, keyCardTitleClassName: h, keyCardDescriptionClassName: g, deleteActionClassName: _, disabled: v = !1, isPending: y = !1, renderLoginOptions: b, children: S }) => {
|
|
812
860
|
let w = de(), [T, E] = z(), [D, O] = z(""), [k, ee] = z(!1), [A, te] = z(!1), j = r === C.SignedIn, ne = F((e) => {
|
|
813
861
|
O(e ?? ""), ee(!1), E(void 0);
|
|
814
862
|
}, []), re = async () => {
|
|
@@ -832,7 +880,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
832
880
|
"aria-label": e,
|
|
833
881
|
"aria-busy": A || y,
|
|
834
882
|
className: "flex min-w-0 items-start gap-3 rounded-xl p-3",
|
|
835
|
-
children: [/* @__PURE__ */ J(
|
|
883
|
+
children: [/* @__PURE__ */ J(kn, {
|
|
836
884
|
icon: n,
|
|
837
885
|
isActive: i,
|
|
838
886
|
statusLabel: i ? oe : se
|
|
@@ -847,7 +895,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
847
895
|
className: f,
|
|
848
896
|
children: e
|
|
849
897
|
}), /* @__PURE__ */ J("span", {
|
|
850
|
-
className: P(p,
|
|
898
|
+
className: P(p, Rn.rowDescription),
|
|
851
899
|
children: t
|
|
852
900
|
})]
|
|
853
901
|
}), a === x.OAuth && (j ? l && /* @__PURE__ */ J(Se, {
|
|
@@ -898,19 +946,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
898
946
|
}),
|
|
899
947
|
I && /* @__PURE__ */ J("span", {
|
|
900
948
|
id: ue,
|
|
901
|
-
className: P(p,
|
|
949
|
+
className: P(p, Rn.rowDescription),
|
|
902
950
|
children: I
|
|
903
951
|
}),
|
|
904
952
|
k && /* @__PURE__ */ J("span", {
|
|
905
953
|
role: "alert",
|
|
906
|
-
className: P(m,
|
|
954
|
+
className: P(m, Rn.errorText),
|
|
907
955
|
children: d?.apiKeyRequiredErrorMessage ?? "API key is required."
|
|
908
956
|
})
|
|
909
957
|
]
|
|
910
958
|
}),
|
|
911
959
|
a === x.ApiKey && j && /* @__PURE__ */ J("div", {
|
|
912
960
|
className: "animate-fadeIn pt-1",
|
|
913
|
-
children: /* @__PURE__ */ J(
|
|
961
|
+
children: /* @__PURE__ */ J(jn, {
|
|
914
962
|
icon: /* @__PURE__ */ J(at, {
|
|
915
963
|
size: B.SM,
|
|
916
964
|
"aria-hidden": !0,
|
|
@@ -931,23 +979,23 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
931
979
|
!j && b?.(A || v),
|
|
932
980
|
T && /* @__PURE__ */ J("p", {
|
|
933
981
|
role: "alert",
|
|
934
|
-
className: P(m,
|
|
982
|
+
className: P(m, Rn.errorText),
|
|
935
983
|
children: T
|
|
936
984
|
}),
|
|
937
985
|
S
|
|
938
986
|
]
|
|
939
987
|
})]
|
|
940
988
|
});
|
|
941
|
-
},
|
|
989
|
+
}, Bn = (e) => e === x.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: n, onRequestLogout: r, onRequestDeleteApiKey: i, texts: a, detailsStyles: o, deleteActionClassName: s = "text-error" }) => {
|
|
942
990
|
let { credentialsDescriptionClassName: c = "dial-body-paragraph-text", credentialsRowLabelClassName: l = "dial-small-semi-text", credentialsRowDescriptionClassName: u = "dial-small-text", credentialsErrorClassName: d = "dial-caption-text", credentialsKeyCardTitleClassName: f = "dial-tiny-semi-text", credentialsKeyCardDescriptionClassName: p = "dial-tiny-text" } = o?.typography ?? {}, m = e.credentials;
|
|
943
991
|
if (m == null) return null;
|
|
944
|
-
let h = (a?.credentialsManagementDescription ??
|
|
992
|
+
let h = (a?.credentialsManagementDescription ?? Bn)(m.authenticationType), g = m.userStatus === C.SignedIn, _ = !g && m.globalStatus === C.SignedIn;
|
|
945
993
|
return /* @__PURE__ */ Y("div", {
|
|
946
994
|
className: "flex flex-col",
|
|
947
995
|
children: [/* @__PURE__ */ J("div", {
|
|
948
996
|
className: "px-6 py-4",
|
|
949
997
|
children: /* @__PURE__ */ J("div", {
|
|
950
|
-
className: P("rounded-xl p-3",
|
|
998
|
+
className: P("rounded-xl p-3", Rn.surface),
|
|
951
999
|
children: /* @__PURE__ */ J(k, {
|
|
952
1000
|
item: e,
|
|
953
1001
|
iconSize: 40,
|
|
@@ -957,11 +1005,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
957
1005
|
}), /* @__PURE__ */ Y("div", {
|
|
958
1006
|
className: "flex flex-col gap-5 px-6 py-4",
|
|
959
1007
|
children: [/* @__PURE__ */ J("span", {
|
|
960
|
-
className: P(c,
|
|
1008
|
+
className: P(c, Rn.description),
|
|
961
1009
|
children: h
|
|
962
1010
|
}), /* @__PURE__ */ Y("div", {
|
|
963
1011
|
className: "flex flex-col",
|
|
964
|
-
children: [/* @__PURE__ */ J(
|
|
1012
|
+
children: [/* @__PURE__ */ J(zn, {
|
|
965
1013
|
label: a?.personalCredentialsLabel ?? "Personal credentials",
|
|
966
1014
|
description: a?.personalCredentialsDescription ?? "These credentials apply only to your account.",
|
|
967
1015
|
icon: /* @__PURE__ */ J(gt, {
|
|
@@ -987,7 +1035,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
987
1035
|
keyCardTitleClassName: f,
|
|
988
1036
|
keyCardDescriptionClassName: p,
|
|
989
1037
|
deleteActionClassName: s
|
|
990
|
-
}), /* @__PURE__ */ J(
|
|
1038
|
+
}), /* @__PURE__ */ J(zn, {
|
|
991
1039
|
label: a?.organizationCredentialsLabel ?? "Organization credentials",
|
|
992
1040
|
description: a?.organizationCredentialsDescription ?? "Once added, these credentials will grant all users in your organization access to this toolset.",
|
|
993
1041
|
icon: /* @__PURE__ */ J(Ye, {
|
|
@@ -1017,19 +1065,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1017
1065
|
})]
|
|
1018
1066
|
})]
|
|
1019
1067
|
});
|
|
1020
|
-
},
|
|
1068
|
+
}, Hn = {
|
|
1021
1069
|
skeletonColor: "var(--cat-details-skeleton, var(--bg-control-disable-primary, #dce0e8))",
|
|
1022
1070
|
backdrop: "_backdrop_1i04q_7",
|
|
1023
1071
|
panel: "_panel_1i04q_11",
|
|
1024
1072
|
divider: "_divider_1i04q_16",
|
|
1025
1073
|
content: "_content_1i04q_20",
|
|
1026
1074
|
publishTitle: "_publishTitle_1i04q_25"
|
|
1027
|
-
},
|
|
1075
|
+
}, Un = /* @__PURE__ */ function(e) {
|
|
1028
1076
|
return e.Idle = "idle", e.Loading = "loading", e.Resolved = "resolved", e.Unknown = "unknown", e;
|
|
1029
|
-
}({}),
|
|
1077
|
+
}({}), Wn = {
|
|
1030
1078
|
divider: "_divider_1ae8j_1",
|
|
1031
1079
|
hint: "_hint_1ae8j_5"
|
|
1032
|
-
},
|
|
1080
|
+
}, Gn = 16, Kn = ({ item: e, level: t, status: n, apiKeyAddedWhen: r, apiKeyHeader: i, onLogin: a, onLogout: o, onClose: s, texts: c, colors: l, deleteActionClassName: u = "text-error" }) => {
|
|
1033
1081
|
let [d, f] = z(""), [p, m] = z(!1), [h, g] = z(!1), [_, v] = z(!1), y = n === C.SignedIn, b = F((e) => {
|
|
1034
1082
|
f(e ?? ""), m(!1);
|
|
1035
1083
|
}, []), x = F(async () => {
|
|
@@ -1083,7 +1131,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1083
1131
|
children: w
|
|
1084
1132
|
})
|
|
1085
1133
|
}),
|
|
1086
|
-
/* @__PURE__ */ J("div", { className: P("mx-4 h-px",
|
|
1134
|
+
/* @__PURE__ */ J("div", { className: P("mx-4 h-px", Wn.divider) }),
|
|
1087
1135
|
!y && /* @__PURE__ */ Y("div", {
|
|
1088
1136
|
className: "flex animate-fadeIn flex-col gap-1 px-4 py-3.5",
|
|
1089
1137
|
children: [
|
|
@@ -1104,7 +1152,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1104
1152
|
label: h ? void 0 : T,
|
|
1105
1153
|
"aria-label": h ? D : void 0,
|
|
1106
1154
|
iconBefore: h ? /* @__PURE__ */ J(We, {
|
|
1107
|
-
size:
|
|
1155
|
+
size: Gn,
|
|
1108
1156
|
ariaLabel: D
|
|
1109
1157
|
}) : void 0,
|
|
1110
1158
|
onClick: x,
|
|
@@ -1113,7 +1161,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1113
1161
|
}),
|
|
1114
1162
|
j && /* @__PURE__ */ J("span", {
|
|
1115
1163
|
id: te,
|
|
1116
|
-
className: P("dial-caption-text",
|
|
1164
|
+
className: P("dial-caption-text", Wn.hint),
|
|
1117
1165
|
children: j
|
|
1118
1166
|
}),
|
|
1119
1167
|
p && /* @__PURE__ */ J("span", {
|
|
@@ -1124,7 +1172,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1124
1172
|
}),
|
|
1125
1173
|
y && /* @__PURE__ */ J("div", {
|
|
1126
1174
|
className: "animate-fadeIn px-4 py-3.5",
|
|
1127
|
-
children: /* @__PURE__ */ J(
|
|
1175
|
+
children: /* @__PURE__ */ J(jn, {
|
|
1128
1176
|
icon: /* @__PURE__ */ J(at, {
|
|
1129
1177
|
size: 20,
|
|
1130
1178
|
"aria-hidden": !0,
|
|
@@ -1136,7 +1184,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1136
1184
|
label: _ ? void 0 : E,
|
|
1137
1185
|
"aria-label": _ ? O : void 0,
|
|
1138
1186
|
iconBefore: _ ? /* @__PURE__ */ J(We, {
|
|
1139
|
-
size:
|
|
1187
|
+
size: Gn,
|
|
1140
1188
|
ariaLabel: O
|
|
1141
1189
|
}) : void 0,
|
|
1142
1190
|
className: u,
|
|
@@ -1147,7 +1195,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1147
1195
|
})
|
|
1148
1196
|
]
|
|
1149
1197
|
});
|
|
1150
|
-
},
|
|
1198
|
+
}, qn = { name: "_name_gfs1p_1" }, Jn = (e) => e.isMyApp === !0, Yn = ({ item: e, onShare: t, shareOverlay: n, isShareVisible: r, label: i = "Share" }) => {
|
|
1151
1199
|
let [a, o] = z(!1), s = F(() => {
|
|
1152
1200
|
if (n) {
|
|
1153
1201
|
o((e) => !e);
|
|
@@ -1159,7 +1207,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1159
1207
|
t,
|
|
1160
1208
|
n
|
|
1161
1209
|
]);
|
|
1162
|
-
if (!
|
|
1210
|
+
if (!Jn(e) || r && !r(e)) return null;
|
|
1163
1211
|
let c = /* @__PURE__ */ J(W, {
|
|
1164
1212
|
label: i,
|
|
1165
1213
|
iconBefore: /* @__PURE__ */ J(ft, {
|
|
@@ -1184,14 +1232,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1184
1232
|
renderOverlay: () => n(e, () => o(!1)),
|
|
1185
1233
|
children: c
|
|
1186
1234
|
}) : c;
|
|
1187
|
-
},
|
|
1235
|
+
}, Xn = (e) => e === x.ApiKey ? "Manage API keys" : "Manage credentials", Zn = {
|
|
1188
1236
|
[Et.LimitReached]: "bg-error text-error",
|
|
1189
1237
|
[Et.RunningLow]: "bg-warning text-warning"
|
|
1190
|
-
},
|
|
1191
|
-
className: P("flex h-[24px] items-center justify-center gap-1 whitespace-nowrap rounded-2xl px-2", "dial-caption-lead-semi-text",
|
|
1238
|
+
}, Qn = ({ status: e, label: t }) => /* @__PURE__ */ J("div", {
|
|
1239
|
+
className: P("flex h-[24px] items-center justify-center gap-1 whitespace-nowrap rounded-2xl px-2", "dial-caption-lead-semi-text", Zn[e]),
|
|
1192
1240
|
children: t
|
|
1193
|
-
}),
|
|
1194
|
-
let { nameClassName: ie = "dial-body-semi-text", folderLabelClassName: ae = "dial-tiny-text", folderLeafClassName: oe = "dial-tiny-semi-text" } = D?.typography ?? {}, se = n.details?.limits?.status, ce = se == null ? void 0 : /* @__PURE__ */ J(
|
|
1241
|
+
}), $n = ({ item: n, onUseInChat: r, isPrimaryActionVisible: i, onShare: a, shareOverlay: o, isShareVisible: s, isSharePrimary: c, onEdit: l, onDownload: d, isDownloadVisible: f, isDownloadPrimary: p, onDelete: m, onUnshare: h, isUnshareVisible: g, onRevokeShare: _, onFetchRecipientsCount: v, isRevokeShareVisible: y, onLogin: b, onLogout: S, onOpenCredentialsManagement: C, onRequestLogout: T, texts: E, detailsStyles: D, isPublishVisible: O, isPublishPrimary: ee, onOpenPublish: A, isUnpublishVisible: te, hasPublishedFolders: j = !1, isPublishHistoryResolved: ne = !0, onRequestPublishHistory: re, onOpenUnpublish: M, isReadonly: N = !1 }) => {
|
|
1242
|
+
let { nameClassName: ie = "dial-body-semi-text", folderLabelClassName: ae = "dial-tiny-text", folderLeafClassName: oe = "dial-tiny-semi-text" } = D?.typography ?? {}, se = n.details?.limits?.status, ce = se == null ? void 0 : /* @__PURE__ */ J(Qn, {
|
|
1195
1243
|
status: se,
|
|
1196
1244
|
label: se === Et.LimitReached ? E?.limitReachedLabel ?? "Limit reached" : E?.limitRunningLowLabel ?? "Running low"
|
|
1197
1245
|
}), le = F(() => {
|
|
@@ -1242,21 +1290,21 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1242
1290
|
m?.(n);
|
|
1243
1291
|
}, [n, m]), H = F(() => {
|
|
1244
1292
|
_?.(n);
|
|
1245
|
-
}, [n, _]), [Te, De] = z(
|
|
1293
|
+
}, [n, _]), [Te, De] = z(Un.Idle), [Oe, ke] = z(void 0), Ae = R(null);
|
|
1246
1294
|
I(() => {
|
|
1247
|
-
Ae.current = null, De(
|
|
1295
|
+
Ae.current = null, De(Un.Idle), ke(void 0);
|
|
1248
1296
|
}, [n.id]);
|
|
1249
1297
|
let je = F(() => {
|
|
1250
1298
|
if (!v || Ae.current === n.id || !_ || n.isMyApp !== !0 || y?.(n) === !1) return;
|
|
1251
1299
|
let e = n.id;
|
|
1252
|
-
Ae.current = e, De(
|
|
1300
|
+
Ae.current = e, De(Un.Loading), (async () => {
|
|
1253
1301
|
try {
|
|
1254
1302
|
let t = await v(n);
|
|
1255
1303
|
if (Ae.current !== e) return;
|
|
1256
|
-
ke(t), De(t == null ?
|
|
1304
|
+
ke(t), De(t == null ? Un.Unknown : Un.Resolved);
|
|
1257
1305
|
} catch {
|
|
1258
1306
|
if (Ae.current !== e) return;
|
|
1259
|
-
ke(void 0), De(
|
|
1307
|
+
ke(void 0), De(Un.Unknown);
|
|
1260
1308
|
}
|
|
1261
1309
|
})();
|
|
1262
1310
|
}, [
|
|
@@ -1274,7 +1322,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1274
1322
|
je(), re?.();
|
|
1275
1323
|
}, [je, re]), Le = F(() => {
|
|
1276
1324
|
re?.();
|
|
1277
|
-
}, [re]), Re = E?.hasPrimaryAction !== !1 && (i?.(n) ?? (n.type === w.Model || n.type === w.Agent || n.type === w.Prompt)), ze = !N && !!M && j && (te?.(n) ?? !0), Be = !N && !!M && !ne && te?.(n) === !0, Ve = !N && !ze && (O?.(n) ?? (n.type === w.Model || n.type === w.Toolset || n.type === w.Agent)), He = !N && !!l && !!n.isEditable, Ue = !N && n.isMyApp === !0 && (s?.(n) ?? !0), Ge = c?.(n) ?? !0, Ke = ee?.(n) ?? !1, G = n.credentials?.authenticationType ?? x.None, K = n.credentials != null && G !== x.None ? u(n.credentials) : void 0, qe = !N && K != null && (!!b || !!S), Ye = n.type === w.Toolset && qe, Xe = !!d && (f?.(n) ?? !0), Qe = Xe && !Ye && (p?.(n) ?? (n.type === w.Skill && !Re)), $e = Xe && !Qe, et = !N && n.isMyApp, rt = !N && !!h && n.isMyApp !== !0 && n.sharedWithMe === !0 && (g?.(n) ?? !0), it = !N && !!_ && n.isMyApp === !0 && (!v || Te ===
|
|
1325
|
+
}, [re]), Re = E?.hasPrimaryAction !== !1 && (i?.(n) ?? (n.type === w.Model || n.type === w.Agent || n.type === w.Prompt)), ze = !N && !!M && j && (te?.(n) ?? !0), Be = !N && !!M && !ne && te?.(n) === !0, Ve = !N && !ze && (O?.(n) ?? (n.type === w.Model || n.type === w.Toolset || n.type === w.Agent)), He = !N && !!l && !!n.isEditable, Ue = !N && n.isMyApp === !0 && (s?.(n) ?? !0), Ge = c?.(n) ?? !0, Ke = ee?.(n) ?? !1, G = n.credentials?.authenticationType ?? x.None, K = n.credentials != null && G !== x.None ? u(n.credentials) : void 0, qe = !N && K != null && (!!b || !!S), Ye = n.type === w.Toolset && qe, Xe = !!d && (f?.(n) ?? !0), Qe = Xe && !Ye && (p?.(n) ?? (n.type === w.Skill && !Re)), $e = Xe && !Qe, et = !N && n.isMyApp, rt = !N && !!h && n.isMyApp !== !0 && n.sharedWithMe === !0 && (g?.(n) ?? !0), it = !N && !!_ && n.isMyApp === !0 && (!v || Te === Un.Unknown || Te === Un.Resolved && (Oe ?? 0) > 0) && (y?.(n) ?? !0), ot = L(() => {
|
|
1278
1326
|
let e = [];
|
|
1279
1327
|
if (!Ge && Ue && e.push({
|
|
1280
1328
|
key: "share",
|
|
@@ -1381,7 +1429,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1381
1429
|
b,
|
|
1382
1430
|
C,
|
|
1383
1431
|
T
|
|
1384
|
-
]), Dt = K === e.ManageCredentials ? (E?.manageCredentialsActionLabel ??
|
|
1432
|
+
]), Dt = K === e.ManageCredentials ? (E?.manageCredentialsActionLabel ?? Xn)(G) : G === x.ApiKey ? K === e.LogOut ? E?.changeApiKeyActionLabel ?? "Change API key" : E?.apiKeyActionLabel ?? "API key" : K === e.LogOut ? E?.logoutActionLabel ?? "Log out" : E?.loginActionLabel ?? "Log in", Z = K === e.ManageCredentials || G === x.ApiKey ? /* @__PURE__ */ J(at, {
|
|
1385
1433
|
size: B.MD,
|
|
1386
1434
|
stroke: V
|
|
1387
1435
|
}) : K === e.LogOut ? /* @__PURE__ */ J(lt, {
|
|
@@ -1397,7 +1445,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1397
1445
|
}) : Ct ? /* @__PURE__ */ J(Ze, {
|
|
1398
1446
|
size: B.MD,
|
|
1399
1447
|
stroke: V
|
|
1400
|
-
}) : void 0,
|
|
1448
|
+
}) : void 0, Q = (e) => {
|
|
1401
1449
|
let r = /* @__PURE__ */ J(e, {
|
|
1402
1450
|
label: Dt,
|
|
1403
1451
|
iconBefore: Z,
|
|
@@ -1413,7 +1461,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1413
1461
|
onOpenChange: St,
|
|
1414
1462
|
trigger: [],
|
|
1415
1463
|
outsideClosable: !0,
|
|
1416
|
-
renderOverlay: () => /* @__PURE__ */ J(
|
|
1464
|
+
renderOverlay: () => /* @__PURE__ */ J(Kn, {
|
|
1417
1465
|
item: n,
|
|
1418
1466
|
level: t.User,
|
|
1419
1467
|
status: n.credentials?.userStatus,
|
|
@@ -1427,7 +1475,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1427
1475
|
}),
|
|
1428
1476
|
children: r
|
|
1429
1477
|
});
|
|
1430
|
-
},
|
|
1478
|
+
}, kt = ({ key: e, label: t, Icon: r, danger: i, onClick: c }) => e === "share" ? /* @__PURE__ */ J(Yn, {
|
|
1431
1479
|
item: n,
|
|
1432
1480
|
onShare: a,
|
|
1433
1481
|
shareOverlay: o,
|
|
@@ -1441,7 +1489,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1441
1489
|
stroke: V
|
|
1442
1490
|
}),
|
|
1443
1491
|
onClick: c
|
|
1444
|
-
}),
|
|
1492
|
+
}), At = () => {
|
|
1445
1493
|
let e = /* @__PURE__ */ J(Ce, {
|
|
1446
1494
|
items: st,
|
|
1447
1495
|
placement: "bottom-end",
|
|
@@ -1469,13 +1517,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1469
1517
|
renderOverlay: () => o(n, be),
|
|
1470
1518
|
children: e
|
|
1471
1519
|
});
|
|
1472
|
-
},
|
|
1520
|
+
}, jt = Ye || Re || Qe || Ge && Ue || Ke && ze || Ke && Ve || qe && !Ye || st.length > 0 || Be;
|
|
1473
1521
|
return /* @__PURE__ */ Y("div", {
|
|
1474
1522
|
className: "flex flex-col gap-3 px-6 py-4",
|
|
1475
1523
|
children: [/* @__PURE__ */ J(k, {
|
|
1476
1524
|
item: n,
|
|
1477
1525
|
iconSize: 52,
|
|
1478
|
-
nameClassName: P(ie,
|
|
1526
|
+
nameClassName: P(ie, qn.name),
|
|
1479
1527
|
featuredLabel: E?.featuredLabel ?? "Featured",
|
|
1480
1528
|
typeLabel: E?.entityTypeLabels?.[n.type],
|
|
1481
1529
|
featuredChipStyle: D?.colors?.featuredChipStyle,
|
|
@@ -1485,10 +1533,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1485
1533
|
labelClassName: ae,
|
|
1486
1534
|
leafClassName: oe
|
|
1487
1535
|
}) : void 0
|
|
1488
|
-
}),
|
|
1536
|
+
}), jt && /* @__PURE__ */ Y("div", {
|
|
1489
1537
|
className: "flex flex-wrap items-center gap-2 ps-[60px]",
|
|
1490
1538
|
children: [
|
|
1491
|
-
Ye &&
|
|
1539
|
+
Ye && Q(wt || Tt ? W : Ie),
|
|
1492
1540
|
Re && /* @__PURE__ */ J(Ie, {
|
|
1493
1541
|
label: E?.primaryActionLabel ?? "Use in chat",
|
|
1494
1542
|
iconBefore: /* @__PURE__ */ J(dt, { size: B.MD }),
|
|
@@ -1514,7 +1562,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1514
1562
|
className: "sr-only",
|
|
1515
1563
|
children: E?.downloadingStatusLabel ?? "Downloading"
|
|
1516
1564
|
})] }),
|
|
1517
|
-
Ge && Ue && /* @__PURE__ */ J(
|
|
1565
|
+
Ge && Ue && /* @__PURE__ */ J(Yn, {
|
|
1518
1566
|
item: n,
|
|
1519
1567
|
onShare: a,
|
|
1520
1568
|
shareOverlay: o,
|
|
@@ -1543,12 +1591,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1543
1591
|
onMouseEnter: Le,
|
|
1544
1592
|
onFocus: Le
|
|
1545
1593
|
}),
|
|
1546
|
-
qe && !Ye &&
|
|
1547
|
-
gt ?
|
|
1594
|
+
qe && !Ye && Q(W),
|
|
1595
|
+
gt ? kt(gt) : (st.length > 0 || Be) && At()
|
|
1548
1596
|
]
|
|
1549
1597
|
})]
|
|
1550
1598
|
});
|
|
1551
|
-
},
|
|
1599
|
+
}, er = ({ topics: e, content: t, detailsStyles: n, markdownLabels: r }) => {
|
|
1552
1600
|
let i = n?.typography?.contentHeadingClassName ?? "dial-small-semi-text", a = n?.typography?.contentClassName ?? "dial-small-text";
|
|
1553
1601
|
return /* @__PURE__ */ Y("div", {
|
|
1554
1602
|
className: "flex flex-col gap-5",
|
|
@@ -1568,21 +1616,21 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1568
1616
|
...r
|
|
1569
1617
|
}), e && e.length > 0 && /* @__PURE__ */ J("div", {
|
|
1570
1618
|
className: "flex flex-wrap gap-2",
|
|
1571
|
-
children: e.map((e) => /* @__PURE__ */ J(
|
|
1619
|
+
children: e.map((e) => /* @__PURE__ */ J(nn, { label: e }, e))
|
|
1572
1620
|
})]
|
|
1573
1621
|
});
|
|
1574
|
-
},
|
|
1622
|
+
}, tr = {
|
|
1575
1623
|
divider: "_divider_1gzl9_1",
|
|
1576
1624
|
fileCount: "_fileCount_1gzl9_5",
|
|
1577
1625
|
body: "_body_1gzl9_9"
|
|
1578
|
-
},
|
|
1626
|
+
}, nr = (e, t, n = void 0) => e.flatMap((e) => {
|
|
1579
1627
|
let r = {
|
|
1580
1628
|
node: e,
|
|
1581
1629
|
parentId: n
|
|
1582
1630
|
};
|
|
1583
|
-
return e.type ===
|
|
1584
|
-
}),
|
|
1585
|
-
let c = L(() =>
|
|
1631
|
+
return e.type === jt.File || !t.has(e.id) ? [r] : [r, ...nr(e.items, t, e.id)];
|
|
1632
|
+
}), rr = ({ nodes: e, selectedFileId: t, expandedFolderIds: n, onToggleFolder: r, onSelectFile: i, onClose: a, ariaLabel: o = "Select file", rowNameClassName: s = "dial-small-text" }) => {
|
|
1633
|
+
let c = L(() => nr(e, n), [e, n]), l = R({}), [u, d] = z(() => t ?? c[0]?.node.id);
|
|
1586
1634
|
I(() => {
|
|
1587
1635
|
u != null && l.current[u]?.focus();
|
|
1588
1636
|
}, []);
|
|
@@ -1606,14 +1654,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1606
1654
|
break;
|
|
1607
1655
|
}
|
|
1608
1656
|
case "ArrowRight":
|
|
1609
|
-
e.preventDefault(), o.node.type ===
|
|
1657
|
+
e.preventDefault(), o.node.type === jt.Folder && !n.has(o.node.id) && r(o.node.id);
|
|
1610
1658
|
break;
|
|
1611
1659
|
case "ArrowLeft":
|
|
1612
|
-
e.preventDefault(), o.node.type ===
|
|
1660
|
+
e.preventDefault(), o.node.type === jt.Folder && n.has(o.node.id) ? r(o.node.id) : o.parentId != null && f(o.parentId);
|
|
1613
1661
|
break;
|
|
1614
1662
|
case "Enter":
|
|
1615
1663
|
case " ":
|
|
1616
|
-
e.preventDefault(), o.node.type ===
|
|
1664
|
+
e.preventDefault(), o.node.type === jt.Folder ? r(o.node.id) : i(o.node.id);
|
|
1617
1665
|
break;
|
|
1618
1666
|
case "Escape":
|
|
1619
1667
|
e.preventDefault(), a();
|
|
@@ -1622,7 +1670,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1622
1670
|
}
|
|
1623
1671
|
}, m = (e) => P("flex h-10 shrink-0 cursor-pointer items-center gap-2 rounded-2 px-3 outline-none", "hover:bg-control-accent-alpha-hover focus-visible:bg-control-accent-alpha-hover", e && "bg-control-accent-alpha-hover"), h = (e) => {
|
|
1624
1672
|
let a = e.id === u;
|
|
1625
|
-
if (e.type ===
|
|
1673
|
+
if (e.type === jt.File) {
|
|
1626
1674
|
let n = e.id === t;
|
|
1627
1675
|
return /* @__PURE__ */ J("div", {
|
|
1628
1676
|
ref: (t) => {
|
|
@@ -1681,8 +1729,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1681
1729
|
onKeyDown: p,
|
|
1682
1730
|
children: e.map((e) => h(e))
|
|
1683
1731
|
});
|
|
1684
|
-
},
|
|
1685
|
-
let y = _?.typography?.contentClassName ?? "dial-small-text", b = _?.typography?.contentHeadingClassName ?? "dial-small-semi-text", x = _?.typography?.contentFileCountClassName ?? "dial-tiny-text", S = de(), C = t != null && t !== "", w = n ?? [], T =
|
|
1732
|
+
}, ir = () => void 0, ar = ({ content: e, description: t, files: n, selectedFileId: r, onSelectFile: i, isFileLoading: a = !1, expandedFolderIds: o = /* @__PURE__ */ new Set(), onToggleFolder: s = ir, isFileSelectorOpen: c = !1, onFileSelectorOpenChange: l = ir, 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, renderFileTree: g, detailsStyles: _, markdownLabels: v }) => {
|
|
1733
|
+
let y = _?.typography?.contentClassName ?? "dial-small-text", b = _?.typography?.contentHeadingClassName ?? "dial-small-semi-text", x = _?.typography?.contentFileCountClassName ?? "dial-tiny-text", S = de(), C = t != null && t !== "", w = n ?? [], T = hn(w) > 1, E = _n(w, r) ?? "", D = {
|
|
1686
1734
|
nodes: w,
|
|
1687
1735
|
selectedFileId: r,
|
|
1688
1736
|
expandedFolderIds: o,
|
|
@@ -1694,10 +1742,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1694
1742
|
ariaLabel: u,
|
|
1695
1743
|
rowNameClassName: y
|
|
1696
1744
|
}, O = a ? {
|
|
1697
|
-
type:
|
|
1745
|
+
type: Mt.Text,
|
|
1698
1746
|
text: ""
|
|
1699
1747
|
} : m ?? {
|
|
1700
|
-
type:
|
|
1748
|
+
type: Mt.Markdown,
|
|
1701
1749
|
text: e
|
|
1702
1750
|
};
|
|
1703
1751
|
return /* @__PURE__ */ Y("div", {
|
|
@@ -1712,7 +1760,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1712
1760
|
matchReferenceWidth: !1,
|
|
1713
1761
|
listClassName: "w-[280px] shadow-md",
|
|
1714
1762
|
placement: "bottom-start",
|
|
1715
|
-
renderOverlay: () => g ? g(D) : /* @__PURE__ */ J(
|
|
1763
|
+
renderOverlay: () => g ? g(D) : /* @__PURE__ */ J(rr, { ...D }),
|
|
1716
1764
|
children: /* @__PURE__ */ J(je, {
|
|
1717
1765
|
id: S,
|
|
1718
1766
|
label: E,
|
|
@@ -1721,18 +1769,18 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1721
1769
|
onClick: () => l(!c)
|
|
1722
1770
|
})
|
|
1723
1771
|
}), /* @__PURE__ */ J("span", {
|
|
1724
|
-
className: P("shrink-0", x,
|
|
1725
|
-
children: d(
|
|
1772
|
+
className: P("shrink-0", x, tr.fileCount),
|
|
1773
|
+
children: d(hn(w))
|
|
1726
1774
|
})]
|
|
1727
1775
|
}),
|
|
1728
1776
|
C && /* @__PURE__ */ Y(bt, { children: [/* @__PURE__ */ J("p", {
|
|
1729
1777
|
className: P("m-0", y),
|
|
1730
1778
|
children: t
|
|
1731
|
-
}), /* @__PURE__ */ J("div", { className: P("shrink-0",
|
|
1779
|
+
}), /* @__PURE__ */ J("div", { className: P("shrink-0", tr.divider) })] }),
|
|
1732
1780
|
/* @__PURE__ */ Y("div", {
|
|
1733
1781
|
role: T ? "region" : void 0,
|
|
1734
1782
|
"aria-labelledby": T ? S : void 0,
|
|
1735
|
-
className: P("min-h-0 flex-1 text-start", h == null ? "overflow-auto break-words" : "overflow-hidden", h == null &&
|
|
1783
|
+
className: P("min-h-0 flex-1 text-start", h == null ? "overflow-auto break-words" : "overflow-hidden", h == null && tr.body, h == null && y),
|
|
1736
1784
|
children: [a && /* @__PURE__ */ J("span", {
|
|
1737
1785
|
role: "status",
|
|
1738
1786
|
className: "sr-only",
|
|
@@ -1740,24 +1788,24 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1740
1788
|
}), (() => {
|
|
1741
1789
|
if (h != null) return h;
|
|
1742
1790
|
switch (O.type) {
|
|
1743
|
-
case
|
|
1791
|
+
case Mt.Markdown: return /* @__PURE__ */ J(re, {
|
|
1744
1792
|
content: O.text,
|
|
1745
1793
|
headingClassName: b,
|
|
1746
1794
|
...v
|
|
1747
1795
|
});
|
|
1748
|
-
case
|
|
1796
|
+
case Mt.Text: return /* @__PURE__ */ J(j, {
|
|
1749
1797
|
language: O.language ?? "",
|
|
1750
1798
|
value: O.text,
|
|
1751
1799
|
copyLabel: v?.codeBlockCopyLabel,
|
|
1752
1800
|
copiedLabel: v?.codeBlockCopiedLabel,
|
|
1753
1801
|
hideDownload: !0
|
|
1754
1802
|
});
|
|
1755
|
-
case
|
|
1803
|
+
case Mt.Image: return /* @__PURE__ */ J("img", {
|
|
1756
1804
|
src: O.url,
|
|
1757
1805
|
alt: E,
|
|
1758
1806
|
className: "max-w-full"
|
|
1759
1807
|
});
|
|
1760
|
-
case
|
|
1808
|
+
case Mt.Unsupported: return /* @__PURE__ */ J("p", {
|
|
1761
1809
|
className: "m-0",
|
|
1762
1810
|
children: p
|
|
1763
1811
|
});
|
|
@@ -1766,10 +1814,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1766
1814
|
})
|
|
1767
1815
|
]
|
|
1768
1816
|
});
|
|
1769
|
-
},
|
|
1817
|
+
}, or = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), sr = /* @__PURE__ */ function(e) {
|
|
1770
1818
|
return e.Default = "default", e.Warning = "warning", e.Danger = "danger", e;
|
|
1771
|
-
}({}),
|
|
1772
|
-
let t =
|
|
1819
|
+
}({}), cr = (e) => !Number.isFinite(e.used) || !Number.isFinite(e.total) ? 0 : Math.min(Math.max(e.used, 0), Math.max(e.total, 0)), lr = (e) => Number.isFinite(e) && e > 0 ? e : 1, ur = ({ used: e, total: t, valueLabel: n }) => n ?? `${or.format(e)} / ${or.format(t)}`, dr = ({ total: e }) => Number.isFinite(e) && e > 0, fr = (e) => e.isUnlimited !== !0 && dr(e), pr = (e) => dr(e) ? Math.max(e.used, 0) / e.total : 0, mr = (e) => {
|
|
1820
|
+
let t = pr(e);
|
|
1773
1821
|
return t >= 1 ? "danger" : t >= .75 ? "warning" : "default";
|
|
1774
1822
|
}, $ = {
|
|
1775
1823
|
sectionHeading: "_sectionHeading_1v3yh_2",
|
|
@@ -1782,12 +1830,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1782
1830
|
progressFillDanger: "_progressFillDanger_1v3yh_33",
|
|
1783
1831
|
resetLabel: "_resetLabel_1v3yh_38",
|
|
1784
1832
|
valueDanger: "_valueDanger_1v3yh_43"
|
|
1785
|
-
},
|
|
1786
|
-
let s =
|
|
1787
|
-
value:
|
|
1788
|
-
max:
|
|
1833
|
+
}, hr = ({ row: e, layout: t, labelClassName: n, captionClassName: r, valueClassName: i, noteValueClassName: a, noteClassName: o }) => {
|
|
1834
|
+
let s = ur(e), c = mr(e), l = /* @__PURE__ */ J(Le, {
|
|
1835
|
+
value: cr(e),
|
|
1836
|
+
max: lr(e.total),
|
|
1789
1837
|
size: H.Small,
|
|
1790
|
-
className: P("!h-1 w-full", $.progressTrack, c ===
|
|
1838
|
+
className: P("!h-1 w-full", $.progressTrack, c === sr.Default && $.progressFillDefault, c === sr.Warning && $.progressFillWarning, c === sr.Danger && $.progressFillDanger),
|
|
1791
1839
|
"aria-label": e.label,
|
|
1792
1840
|
"aria-valuetext": e.ariaLabel ?? s
|
|
1793
1841
|
}), u = e.captionLabel != null && /* @__PURE__ */ J("span", {
|
|
@@ -1802,7 +1850,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1802
1850
|
className: "sr-only",
|
|
1803
1851
|
children: e.resetAriaLabel
|
|
1804
1852
|
})] });
|
|
1805
|
-
return t ===
|
|
1853
|
+
return t === At.Stacked ? /* @__PURE__ */ Y("li", {
|
|
1806
1854
|
className: P("flex flex-col gap-2 border-b py-3 first:pt-0 last:border-b-0 last:pb-0", $.divider),
|
|
1807
1855
|
children: [
|
|
1808
1856
|
/* @__PURE__ */ Y("div", {
|
|
@@ -1811,12 +1859,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1811
1859
|
className: P("min-w-0 break-words", n, $.valuePrimary),
|
|
1812
1860
|
children: e.label
|
|
1813
1861
|
}), /* @__PURE__ */ J("span", {
|
|
1814
|
-
className: P("shrink-0", i, c ===
|
|
1862
|
+
className: P("shrink-0", i, c === sr.Danger ? $.valueDanger : $.valuePrimary),
|
|
1815
1863
|
children: s
|
|
1816
1864
|
})]
|
|
1817
1865
|
}),
|
|
1818
1866
|
u,
|
|
1819
|
-
|
|
1867
|
+
fr(e) ? l : e.noteLabel != null && /* @__PURE__ */ J("span", {
|
|
1820
1868
|
className: P(o, $.label),
|
|
1821
1869
|
children: e.noteLabel
|
|
1822
1870
|
}),
|
|
@@ -1834,7 +1882,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1834
1882
|
u,
|
|
1835
1883
|
d
|
|
1836
1884
|
]
|
|
1837
|
-
}),
|
|
1885
|
+
}), fr(e) ? /* @__PURE__ */ Y("div", {
|
|
1838
1886
|
className: "flex w-32 shrink-0 flex-col items-end gap-2",
|
|
1839
1887
|
children: [/* @__PURE__ */ J("div", {
|
|
1840
1888
|
className: P("flex gap-1", i),
|
|
@@ -1860,12 +1908,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1860
1908
|
})]
|
|
1861
1909
|
})]
|
|
1862
1910
|
});
|
|
1863
|
-
},
|
|
1911
|
+
}, gr = ({ group: e, sectionClassName: t, layout: n, labelClassName: r, captionClassName: i, valueClassName: a, noteValueClassName: o, noteClassName: s }) => /* @__PURE__ */ Y("section", { children: [/* @__PURE__ */ J("p", {
|
|
1864
1912
|
className: P("mb-3 mt-0", t, $.sectionHeading),
|
|
1865
1913
|
children: e.label
|
|
1866
1914
|
}), /* @__PURE__ */ J("ul", {
|
|
1867
1915
|
className: "m-0 flex list-none flex-col p-0",
|
|
1868
|
-
children: e.rows.map((e) => /* @__PURE__ */ J(
|
|
1916
|
+
children: e.rows.map((e) => /* @__PURE__ */ J(hr, {
|
|
1869
1917
|
row: e,
|
|
1870
1918
|
layout: n,
|
|
1871
1919
|
labelClassName: r,
|
|
@@ -1874,7 +1922,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1874
1922
|
noteValueClassName: o,
|
|
1875
1923
|
noteClassName: s
|
|
1876
1924
|
}, e.label))
|
|
1877
|
-
})] }),
|
|
1925
|
+
})] }), _r = ({ limits: e, layout: t = At.Inline, labelClassName: n = "dial-small-semi-text", captionClassName: r = "dial-caption-text", valueClassName: i = "dial-tiny-text", noteValueClassName: a = "dial-tiny-semi-text", noteClassName: o = "dial-caption-text", sectionClassName: s = "dial-caption-text", footerClassName: c = "dial-caption-text", footerNote: l, colors: u }) => {
|
|
1878
1926
|
let d = e?.groups.filter((e) => e.rows.length > 0);
|
|
1879
1927
|
return d == null || d.length === 0 ? null : /* @__PURE__ */ Y("div", {
|
|
1880
1928
|
className: "flex flex-col gap-6",
|
|
@@ -1889,7 +1937,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1889
1937
|
"--lt-progress-fill-warning": u?.progressFillWarning,
|
|
1890
1938
|
"--lt-progress-fill-danger": u?.progressFillDanger
|
|
1891
1939
|
}),
|
|
1892
|
-
children: [d.map((e) => /* @__PURE__ */ J(
|
|
1940
|
+
children: [d.map((e) => /* @__PURE__ */ J(gr, {
|
|
1893
1941
|
group: e,
|
|
1894
1942
|
layout: t,
|
|
1895
1943
|
sectionClassName: s,
|
|
@@ -1903,13 +1951,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1903
1951
|
children: l
|
|
1904
1952
|
})]
|
|
1905
1953
|
});
|
|
1906
|
-
},
|
|
1954
|
+
}, vr = ({ sections: e, sectionClassName: t, labelClassName: n, valueClassName: r, valueTrueClassName: i, yesLabel: a, noLabel: o, sectionContainerClassName: s = "px-6" }) => e ? /* @__PURE__ */ J("div", {
|
|
1907
1955
|
className: "flex flex-col gap-4",
|
|
1908
1956
|
children: e.map((e, c) => /* @__PURE__ */ Y("div", {
|
|
1909
1957
|
className: "flex flex-col gap-4",
|
|
1910
|
-
children: [c > 0 && /* @__PURE__ */ J("div", { className: P("shrink-0 border-b",
|
|
1958
|
+
children: [c > 0 && /* @__PURE__ */ J("div", { className: P("shrink-0 border-b", Hn.divider) }), /* @__PURE__ */ J("div", {
|
|
1911
1959
|
className: s,
|
|
1912
|
-
children: /* @__PURE__ */ J(
|
|
1960
|
+
children: /* @__PURE__ */ J(bn, {
|
|
1913
1961
|
sectionLabel: e.title,
|
|
1914
1962
|
values: e.specs,
|
|
1915
1963
|
sectionClassName: t,
|
|
@@ -1921,7 +1969,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1921
1969
|
})
|
|
1922
1970
|
})]
|
|
1923
1971
|
}, c))
|
|
1924
|
-
}) : null,
|
|
1972
|
+
}) : null, yr = ({ pricing: e, pricesSectionLabel: t = "Token pricing", characterPricesSectionLabel: n = "Character pricing", limitsSectionLabel: r = "Usage limits", labelClassName: i = "dial-small-semi-text", valueClassName: a = "dial-small-text", sectionClassName: o = "dial-caption-text" }) => {
|
|
1925
1973
|
if (e == null) return null;
|
|
1926
1974
|
let s = e.prices?.map((e) => ({
|
|
1927
1975
|
label: e.label,
|
|
@@ -1932,13 +1980,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1932
1980
|
}));
|
|
1933
1981
|
return /* @__PURE__ */ Y("div", {
|
|
1934
1982
|
className: "flex flex-col gap-4",
|
|
1935
|
-
children: [/* @__PURE__ */ J(
|
|
1983
|
+
children: [/* @__PURE__ */ J(bn, {
|
|
1936
1984
|
sectionLabel: e.unit === Dt.Character ? n : t,
|
|
1937
1985
|
values: s ?? [],
|
|
1938
1986
|
labelClassName: i,
|
|
1939
1987
|
valueClassName: a,
|
|
1940
1988
|
sectionClassName: o
|
|
1941
|
-
}), /* @__PURE__ */ J(
|
|
1989
|
+
}), /* @__PURE__ */ J(bn, {
|
|
1942
1990
|
sectionLabel: r,
|
|
1943
1991
|
values: c ?? [],
|
|
1944
1992
|
labelClassName: i,
|
|
@@ -1946,30 +1994,30 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1946
1994
|
sectionClassName: o
|
|
1947
1995
|
})]
|
|
1948
1996
|
});
|
|
1949
|
-
},
|
|
1997
|
+
}, br = {
|
|
1950
1998
|
container: "_container_ddi3i_1",
|
|
1951
1999
|
header: "_header_ddi3i_5",
|
|
1952
2000
|
cell: "_cell_ddi3i_10",
|
|
1953
2001
|
evenRow: "_evenRow_ddi3i_17"
|
|
1954
|
-
},
|
|
2002
|
+
}, xr = ({ columns: e, rows: t, columnsTemplate: n, headingClassName: r = "dial-caption-lead-semi-text", cellClassName: i = "dial-tiny-text" }) => {
|
|
1955
2003
|
let a = n ?? `repeat(${e.length}, 1fr)`;
|
|
1956
2004
|
return /* @__PURE__ */ Y("div", {
|
|
1957
|
-
className: P(
|
|
2005
|
+
className: P(br.container, "grid overflow-hidden rounded-md"),
|
|
1958
2006
|
style: { gridTemplateColumns: a },
|
|
1959
2007
|
children: [e.map((e) => /* @__PURE__ */ J("div", {
|
|
1960
|
-
className: P("px-2 py-1 text-start", r,
|
|
2008
|
+
className: P("px-2 py-1 text-start", r, br.header),
|
|
1961
2009
|
children: e
|
|
1962
2010
|
}, e)), t.map((e, t) => /* @__PURE__ */ J(oe, { children: e.map((e, n) => /* @__PURE__ */ J("div", {
|
|
1963
|
-
className: P("px-2 py-1.5", i,
|
|
2011
|
+
className: P("px-2 py-1.5", i, br.cell, t % 2 == 1 ? br.evenRow : void 0),
|
|
1964
2012
|
children: e
|
|
1965
2013
|
}, n)) }, t))]
|
|
1966
2014
|
});
|
|
1967
|
-
},
|
|
2015
|
+
}, Sr = {
|
|
1968
2016
|
divider: "_divider_4udep_1",
|
|
1969
2017
|
count: "_count_4udep_5",
|
|
1970
2018
|
description: "_description_4udep_9",
|
|
1971
2019
|
code: "_code_4udep_13"
|
|
1972
|
-
},
|
|
2020
|
+
}, Cr = {
|
|
1973
2021
|
inputName: "Name",
|
|
1974
2022
|
inputType: "Type",
|
|
1975
2023
|
inputRequired: "Required",
|
|
@@ -1979,13 +2027,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
1979
2027
|
searchClearLabel: "Clear search",
|
|
1980
2028
|
toolCount: (e) => `${e} tools`,
|
|
1981
2029
|
noResults: "No results found"
|
|
1982
|
-
},
|
|
2030
|
+
}, wr = (e, t) => e.name.toLowerCase().includes(t) || (e.description?.toLowerCase().includes(t) ?? !1), Tr = ({ tools: e, toolNameClassName: t = "dial-small-semi-text", descriptionClassName: n = "dial-small-text", tableHeadingClassName: r = "dial-caption-text", tableCellClassName: i = "dial-tiny-text", countClassName: a = "dial-tiny-text", labels: o }) => {
|
|
1983
2031
|
let s = {
|
|
1984
|
-
...
|
|
2032
|
+
...Cr,
|
|
1985
2033
|
...o
|
|
1986
2034
|
}, [c, l] = z(""), u = L(() => {
|
|
1987
2035
|
let t = c.trim().toLowerCase(), n = e?.tools ?? [];
|
|
1988
|
-
return t === "" ? n : n.filter((e) =>
|
|
2036
|
+
return t === "" ? n : n.filter((e) => wr(e, t));
|
|
1989
2037
|
}, [e, c]);
|
|
1990
2038
|
return e == null ? null : /* @__PURE__ */ Y("div", {
|
|
1991
2039
|
className: "flex flex-col",
|
|
@@ -2001,13 +2049,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2001
2049
|
}), /* @__PURE__ */ J("span", {
|
|
2002
2050
|
role: "status",
|
|
2003
2051
|
"aria-live": "polite",
|
|
2004
|
-
className: P(a,
|
|
2052
|
+
className: P(a, Sr.count),
|
|
2005
2053
|
children: s.toolCount(u.length)
|
|
2006
2054
|
})]
|
|
2007
2055
|
}),
|
|
2008
2056
|
u.length === 0 && c.trim() !== "" && /* @__PURE__ */ J(M, { label: s.noResults }),
|
|
2009
2057
|
u.map((e, a) => /* @__PURE__ */ Y("div", {
|
|
2010
|
-
className: P("flex flex-col gap-3 px-[22px] py-4", a > 0 ?
|
|
2058
|
+
className: P("flex flex-col gap-3 px-[22px] py-4", a > 0 ? Sr.divider : void 0),
|
|
2011
2059
|
children: [
|
|
2012
2060
|
/* @__PURE__ */ Y("div", {
|
|
2013
2061
|
className: "flex flex-col gap-1",
|
|
@@ -2015,11 +2063,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2015
2063
|
className: t,
|
|
2016
2064
|
children: e.name
|
|
2017
2065
|
}), e.description != null && /* @__PURE__ */ J("p", {
|
|
2018
|
-
className: P("m-0", n,
|
|
2066
|
+
className: P("m-0", n, Sr.description),
|
|
2019
2067
|
children: e.description
|
|
2020
2068
|
})]
|
|
2021
2069
|
}),
|
|
2022
|
-
e.inputParams != null && e.inputParams.length > 0 && /* @__PURE__ */ J(
|
|
2070
|
+
e.inputParams != null && e.inputParams.length > 0 && /* @__PURE__ */ J(xr, {
|
|
2023
2071
|
columns: [
|
|
2024
2072
|
s.inputName,
|
|
2025
2073
|
s.inputType,
|
|
@@ -2028,11 +2076,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2028
2076
|
columnsTemplate: "1fr 1fr auto",
|
|
2029
2077
|
rows: e.inputParams.map((e) => [
|
|
2030
2078
|
/* @__PURE__ */ J("code", {
|
|
2031
|
-
className: P("text-inherit border-none bg-transparent p-0",
|
|
2079
|
+
className: P("text-inherit border-none bg-transparent p-0", Sr.code),
|
|
2032
2080
|
children: e.name
|
|
2033
2081
|
}, "name"),
|
|
2034
2082
|
/* @__PURE__ */ J("code", {
|
|
2035
|
-
className: P("text-inherit border-none bg-transparent p-0",
|
|
2083
|
+
className: P("text-inherit border-none bg-transparent p-0", Sr.code),
|
|
2036
2084
|
children: e.type
|
|
2037
2085
|
}, "type"),
|
|
2038
2086
|
e.isRequired ? "✓" : "—"
|
|
@@ -2040,10 +2088,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2040
2088
|
headingClassName: r,
|
|
2041
2089
|
cellClassName: i
|
|
2042
2090
|
}),
|
|
2043
|
-
e.annotations != null && e.annotations.length > 0 && /* @__PURE__ */ J(
|
|
2091
|
+
e.annotations != null && e.annotations.length > 0 && /* @__PURE__ */ J(xr, {
|
|
2044
2092
|
columns: [s.annotationKey, s.annotationValue],
|
|
2045
2093
|
rows: e.annotations.map((e) => [/* @__PURE__ */ J("code", {
|
|
2046
|
-
className: P("text-inherit border-none bg-transparent p-0",
|
|
2094
|
+
className: P("text-inherit border-none bg-transparent p-0", Sr.code),
|
|
2047
2095
|
children: e.key
|
|
2048
2096
|
}, "key"), e.value]),
|
|
2049
2097
|
headingClassName: r,
|
|
@@ -2053,23 +2101,23 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2053
2101
|
}, e.name))
|
|
2054
2102
|
]
|
|
2055
2103
|
});
|
|
2056
|
-
},
|
|
2104
|
+
}, Er = (e, t) => t == null ? e.length === 1 ? e[0] : void 0 : e.find((e) => e.key === t), Dr = async () => void 0, Or = [], kr = [], Ar = [
|
|
2057
2105
|
"All shared configurations will be lost",
|
|
2058
2106
|
"Users who rely on it will lose access",
|
|
2059
2107
|
"Cannot be undone"
|
|
2060
|
-
],
|
|
2108
|
+
], jr = [
|
|
2061
2109
|
"You will lose access to this item",
|
|
2062
2110
|
"Other people keep their access",
|
|
2063
2111
|
"You will need a new invitation to get it back"
|
|
2064
|
-
],
|
|
2112
|
+
], Mr = [
|
|
2065
2113
|
"Everyone loses access to the published copy",
|
|
2066
2114
|
"Your own copy is not deleted",
|
|
2067
2115
|
"You can publish it again later"
|
|
2068
|
-
],
|
|
2116
|
+
], Nr = [
|
|
2069
2117
|
"Everyone you shared it with loses access",
|
|
2070
2118
|
"Existing share links stop working",
|
|
2071
2119
|
"You keep full access — nothing is deleted"
|
|
2072
|
-
],
|
|
2120
|
+
], Pr = (e) => e === x.ApiKey ? "Toolset API keys" : "Toolset credentials", Fr = (e) => e === t.Global ? "Are you sure you want to delete the organization API key?" : "Are you sure you want to delete your personal API key?", Ir = new Set([Z.Delete, Z.Unshare]), Lr = ({ item: e, isOpen: i, isStarred: o = !1, isDetailsLoading: s = !1, isReadonly: c = !1, onClose: l, onToggleFavorite: u, isFavoriteVisible: f, onUseInChat: p, isPrimaryActionVisible: m, onShare: h, isPublishVisible: _, isPublishPrimary: y, getPublishHistory: b, publishFolderItems: x = Or, publishExpandedPaths: S, onPublishExpandedPathsChange: C, publishLoadingPaths: D, hasPublishWriteAccess: O, publishDefaultAuthor: k, onPublish: ee, onPublishSuccess: A, onPublishError: te, onCreatePublishFolder: j, publishLabels: ne, ruleSourceOptions: re = kr, onFetchExistingRules: M, shareOverlay: N, isShareVisible: ae, isSharePrimary: oe, onEdit: se, onDownload: ce, isDownloadVisible: le, isDownloadPrimary: ue, onLoadContentFile: de, onLoadContentFilePreview: fe, renderContentFilePreview: pe, renderContentFileTree: me, renderCredentials: he, onDelete: ge, onUnshare: _e, isUnshareVisible: ve, onRevokeShare: ye, onFetchRecipientsCount: be, isRevokeShareVisible: B, onUnpublish: V, isUnpublishVisible: Se, onLogin: Ce, onLogout: we, texts: H, styles: Te, limitsFooterNote: Ee }) => {
|
|
2073
2121
|
let { subViewTitleClassName: De = "dial-body-semi-text", overviewSectionClassName: Oe = "dial-caption-text", overviewLabelClassName: ke = "dial-small-semi-text", overviewValueClassName: Ae = "dial-small-text", overviewValueTrueClassName: je = "dial-small-text", confirmMessageClassName: Me = "dial-small-text" } = Te?.typography ?? {}, U = Te?.colors, Ne = ie({
|
|
2074
2122
|
"--cat-details-backdrop": U?.backdrop,
|
|
2075
2123
|
"--cat-details-bg": U?.background,
|
|
@@ -2103,11 +2151,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2103
2151
|
"--cat-cred-card-title-text": U?.credentialsCardTitleText,
|
|
2104
2152
|
"--cat-cred-card-description-text": U?.credentialsCardDescriptionText
|
|
2105
2153
|
}), [Pe, W] = z(o), [Fe, Ie] = z(""), [Le, ze] = z(!1), [Be, Ue] = z([]), [We, Ke] = z(!1), G = R(null), K = e.details?.promptContent, qe = K?.selectedFileId, [Je, Ye] = z(null), [Xe, Ze] = z(!1), [Qe, $e] = z(/* @__PURE__ */ new Set()), [et, tt] = z(!1), nt = R(null), rt = R(0), it = F((e) => {
|
|
2106
|
-
let t = nt.current, n = e?.preview?.type ===
|
|
2154
|
+
let t = nt.current, n = e?.preview?.type === Mt.Image ? e.preview.url : null;
|
|
2107
2155
|
t != null && t !== n && t.startsWith("blob:") && URL.revokeObjectURL(t), nt.current = n, Ye(e);
|
|
2108
2156
|
}, []);
|
|
2109
2157
|
I(() => {
|
|
2110
|
-
rt.current += 1, it(null), Ze(!1), $e(
|
|
2158
|
+
rt.current += 1, it(null), Ze(!1), $e(gn(K?.files ?? [])), tt(!1);
|
|
2111
2159
|
}, [e.id, qe]), I(() => () => {
|
|
2112
2160
|
let e = nt.current;
|
|
2113
2161
|
e != null && e.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
@@ -2137,11 +2185,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2137
2185
|
}), Ze(!0);
|
|
2138
2186
|
try {
|
|
2139
2187
|
let n = fe == null ? await de?.(e).then((e) => e == null ? void 0 : {
|
|
2140
|
-
type:
|
|
2188
|
+
type: Mt.Markdown,
|
|
2141
2189
|
text: e
|
|
2142
2190
|
}) : await fe(e);
|
|
2143
2191
|
if (rt.current !== t) {
|
|
2144
|
-
n?.type ===
|
|
2192
|
+
n?.type === Mt.Image && n.url.startsWith("blob:") && URL.revokeObjectURL(n.url);
|
|
2145
2193
|
return;
|
|
2146
2194
|
}
|
|
2147
2195
|
it({
|
|
@@ -2164,9 +2212,9 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2164
2212
|
pe,
|
|
2165
2213
|
it
|
|
2166
2214
|
]), st = Je?.id ?? qe, ct = () => Je == null ? null : Je.preview == null ? {
|
|
2167
|
-
type:
|
|
2215
|
+
type: Mt.Text,
|
|
2168
2216
|
text: H?.contentFileErrorLabel ?? "Failed to load this file."
|
|
2169
|
-
} : Je.preview, lt = Je != null && pe != null ? pe(Je.id,
|
|
2217
|
+
} : Je.preview, lt = Je != null && pe != null ? pe(Je.id, _n(K?.files ?? [], Je.id) ?? "") : void 0, ut = F(() => {
|
|
2170
2218
|
if (!b || G.current === e.id) return;
|
|
2171
2219
|
let t = e.id;
|
|
2172
2220
|
G.current = t, (async () => {
|
|
@@ -2192,7 +2240,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2192
2240
|
hasWriteAccess: O,
|
|
2193
2241
|
defaultAuthor: k,
|
|
2194
2242
|
onCreateFolder: j,
|
|
2195
|
-
onPublish: ee ??
|
|
2243
|
+
onPublish: ee ?? Dr,
|
|
2196
2244
|
onPublishSuccess: dt,
|
|
2197
2245
|
onPublishError: te,
|
|
2198
2246
|
onFetchExistingRules: M
|
|
@@ -2208,25 +2256,25 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2208
2256
|
q.hasWriteAccess,
|
|
2209
2257
|
q.isSubmitting,
|
|
2210
2258
|
q.hasSubmitError
|
|
2211
|
-
]), [mt, ht] = z(!1), [gt, _t] = z(null), [vt, yt] = z(!1), [Tt, X] = z(null), [Et, Dt] = z(null), [Ot,
|
|
2259
|
+
]), [mt, ht] = z(!1), [gt, _t] = z(null), [vt, yt] = z(!1), [Tt, X] = z(null), [Et, Dt] = z(null), [Ot, Q] = z(null);
|
|
2212
2260
|
I(() => {
|
|
2213
2261
|
W(o);
|
|
2214
2262
|
}, [e.id, o]), I(() => {
|
|
2215
|
-
Ie(""), ze(!1), q.reset(), Ue([]), Ke(!1), G.current = null,
|
|
2263
|
+
Ie(""), ze(!1), q.reset(), Ue([]), Ke(!1), G.current = null, Q(null), ht(!1), _t(null), yt(!1), X(null), Dt(null);
|
|
2216
2264
|
}, [e.id]);
|
|
2217
|
-
let
|
|
2265
|
+
let kt = !c && !!V && Se?.(e) === !0;
|
|
2218
2266
|
I(() => {
|
|
2219
|
-
|
|
2220
|
-
}, [
|
|
2221
|
-
let
|
|
2267
|
+
kt && ut();
|
|
2268
|
+
}, [kt, ut]);
|
|
2269
|
+
let At = F(() => ht(!0), []), jt = F(() => ht(!1), []), Nt = F(() => {
|
|
2222
2270
|
_t(Z.Delete);
|
|
2223
|
-
}, []),
|
|
2271
|
+
}, []), Pt = F((t) => {
|
|
2224
2272
|
Dt(t ?? (e.credentials == null ? null : r(e.credentials))), _t(Z.Logout);
|
|
2225
|
-
}, [e.credentials]),
|
|
2273
|
+
}, [e.credentials]), It = F(() => {
|
|
2226
2274
|
_t(Z.Unshare);
|
|
2227
|
-
}, []),
|
|
2275
|
+
}, []), Lt = F(() => {
|
|
2228
2276
|
_t(Z.RevokeAccess);
|
|
2229
|
-
}, []),
|
|
2277
|
+
}, []), Rt = L(() => {
|
|
2230
2278
|
let e = /* @__PURE__ */ new Set(), t = [];
|
|
2231
2279
|
for (let n of Be) {
|
|
2232
2280
|
let r = n.folderPath.join("/");
|
|
@@ -2236,13 +2284,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2236
2284
|
}));
|
|
2237
2285
|
}
|
|
2238
2286
|
return t;
|
|
2239
|
-
}, [Be]),
|
|
2287
|
+
}, [Be]), zt = We && Rt.length > 0, Bt = F((e) => e || (ne?.rootFolderLabel ?? "Organization"), [ne]), Vt = F(() => {
|
|
2240
2288
|
_t(Z.Unpublish);
|
|
2241
|
-
}, []),
|
|
2289
|
+
}, []), Ht = F((e) => {
|
|
2242
2290
|
X(e), _t(Z.DeleteApiKey);
|
|
2243
|
-
}, []),
|
|
2244
|
-
vt || (_t(null), X(null), Dt(null),
|
|
2245
|
-
}, [vt]),
|
|
2291
|
+
}, []), Ut = F(() => {
|
|
2292
|
+
vt || (_t(null), X(null), Dt(null), Q(null));
|
|
2293
|
+
}, [vt]), Wt = F(async () => {
|
|
2246
2294
|
if (!(vt || gt == null)) {
|
|
2247
2295
|
yt(!0);
|
|
2248
2296
|
try {
|
|
@@ -2263,14 +2311,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2263
2311
|
Tt != null && await we?.(e, { level: Tt });
|
|
2264
2312
|
break;
|
|
2265
2313
|
case Z.Unpublish: {
|
|
2266
|
-
let t =
|
|
2314
|
+
let t = Er(Rt, Ot);
|
|
2267
2315
|
t != null && await V?.(e, t.segments);
|
|
2268
2316
|
break;
|
|
2269
2317
|
}
|
|
2270
2318
|
}
|
|
2271
|
-
_t(null), X(null), Dt(null),
|
|
2319
|
+
_t(null), X(null), Dt(null), Q(null), Ir.has(gt) && l();
|
|
2272
2320
|
} catch {
|
|
2273
|
-
_t(null), X(null), Dt(null),
|
|
2321
|
+
_t(null), X(null), Dt(null), Q(null);
|
|
2274
2322
|
} finally {
|
|
2275
2323
|
yt(!1);
|
|
2276
2324
|
}
|
|
@@ -2286,33 +2334,33 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2286
2334
|
ye,
|
|
2287
2335
|
V,
|
|
2288
2336
|
Ot,
|
|
2289
|
-
|
|
2337
|
+
Rt,
|
|
2290
2338
|
we,
|
|
2291
2339
|
l
|
|
2292
2340
|
]);
|
|
2293
2341
|
I(() => {
|
|
2294
2342
|
if (!i || gt == null) return;
|
|
2295
2343
|
let e = (e) => {
|
|
2296
|
-
e.key === "Escape" && (e.stopPropagation(),
|
|
2344
|
+
e.key === "Escape" && (e.stopPropagation(), Ut());
|
|
2297
2345
|
};
|
|
2298
2346
|
return document.addEventListener("keydown", e, !0), () => document.removeEventListener("keydown", e, !0);
|
|
2299
2347
|
}, [
|
|
2300
2348
|
i,
|
|
2301
2349
|
gt,
|
|
2302
|
-
|
|
2350
|
+
Ut
|
|
2303
2351
|
]);
|
|
2304
|
-
let
|
|
2352
|
+
let Gt = F(() => ze(!0), []), Kt = F(() => {
|
|
2305
2353
|
ze(!1), q.reset();
|
|
2306
|
-
}, [q]),
|
|
2307
|
-
await q.handleSubmit() &&
|
|
2308
|
-
}, [q,
|
|
2354
|
+
}, [q]), qt = F(async () => {
|
|
2355
|
+
await q.handleSubmit() && Kt();
|
|
2356
|
+
}, [q, Kt]), Jt = F(() => {
|
|
2309
2357
|
let t = !Pe;
|
|
2310
2358
|
W(t), u?.(e.id, t);
|
|
2311
2359
|
}, [
|
|
2312
2360
|
Pe,
|
|
2313
2361
|
e.id,
|
|
2314
2362
|
u
|
|
2315
|
-
]),
|
|
2363
|
+
]), Yt = L(() => {
|
|
2316
2364
|
let t = {
|
|
2317
2365
|
[n.About]: H?.tabAboutLabel ?? "About",
|
|
2318
2366
|
[n.Content]: H?.tabContentLabel ?? "Details",
|
|
@@ -2326,19 +2374,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2326
2374
|
id: e,
|
|
2327
2375
|
label: t[e]
|
|
2328
2376
|
}));
|
|
2329
|
-
}, [e, H]),
|
|
2377
|
+
}, [e, H]), Xt = R(null);
|
|
2330
2378
|
I(() => {
|
|
2331
|
-
let t =
|
|
2332
|
-
|
|
2379
|
+
let t = Xt.current !== e.id;
|
|
2380
|
+
Xt.current = e.id, (t || !Yt.some((e) => e.id === Fe)) && Ie(Yt[0]?.id ?? "");
|
|
2333
2381
|
}, [
|
|
2334
2382
|
e.id,
|
|
2335
|
-
|
|
2383
|
+
Yt,
|
|
2336
2384
|
Fe
|
|
2337
2385
|
]);
|
|
2338
|
-
let
|
|
2386
|
+
let Zt = L(() => Ft(H), [H]), Qt = L(() => {
|
|
2339
2387
|
let e = {};
|
|
2340
2388
|
return H?.toolsSearchPlaceholder != null && (e.searchPlaceholder = H.toolsSearchPlaceholder), H?.toolsSearchClearLabel != null && (e.searchClearLabel = H.toolsSearchClearLabel), H?.toolsCountLabel != null && (e.toolCount = H.toolsCountLabel), H?.toolsNoResultsLabel != null && (e.noResults = H.toolsNoResultsLabel), e;
|
|
2341
|
-
}, [H]),
|
|
2389
|
+
}, [H]), en = H?.overviewYesLabel ?? "Yes", tn = H?.overviewNoLabel ?? "No", nn = H?.ariaLabel ?? "Item details", rn = H?.closeAriaLabel ?? "Close", an = Pe ? H?.removeFromFavoritesAriaLabel ?? "Remove from favorites" : H?.addToFavoritesAriaLabel ?? "Add to favorites", on = H?.publishTitle ?? "Publish", sn = H?.backToDetailsAriaLabel ?? "Back", cn = H?.cancelLabel ?? "Cancel", ln = L(() => {
|
|
2342
2390
|
switch (gt) {
|
|
2343
2391
|
case Z.Delete: {
|
|
2344
2392
|
let t = H?.deleteActionLabel ?? "Delete";
|
|
@@ -2349,7 +2397,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2349
2397
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2350
2398
|
"? This action is permanent and cannot be undone."
|
|
2351
2399
|
] }),
|
|
2352
|
-
consequences: H?.deleteConfirmConsequences ??
|
|
2400
|
+
consequences: H?.deleteConfirmConsequences ?? Ar,
|
|
2353
2401
|
confirmLabel: t,
|
|
2354
2402
|
loadingStatusLabel: H?.deletingStatusLabel ?? "Deleting",
|
|
2355
2403
|
variant: xe.Danger
|
|
@@ -2364,7 +2412,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2364
2412
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2365
2413
|
" from your list? You'll need a new invitation to access it again."
|
|
2366
2414
|
] }),
|
|
2367
|
-
consequences: H?.unshareConfirmConsequences ??
|
|
2415
|
+
consequences: H?.unshareConfirmConsequences ?? jr,
|
|
2368
2416
|
confirmLabel: t,
|
|
2369
2417
|
loadingStatusLabel: H?.unsharingStatusLabel ?? "Removing",
|
|
2370
2418
|
variant: xe.Info
|
|
@@ -2379,14 +2427,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2379
2427
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2380
2428
|
"? Anyone you shared it with will lose access."
|
|
2381
2429
|
] }),
|
|
2382
|
-
consequences: H?.revokeShareConfirmConsequences ??
|
|
2430
|
+
consequences: H?.revokeShareConfirmConsequences ?? Nr,
|
|
2383
2431
|
confirmLabel: t,
|
|
2384
2432
|
loadingStatusLabel: H?.revokingShareStatusLabel ?? "Revoking access",
|
|
2385
2433
|
variant: xe.Danger
|
|
2386
2434
|
};
|
|
2387
2435
|
}
|
|
2388
2436
|
case Z.Unpublish: {
|
|
2389
|
-
let t = H?.unpublishLabel ?? "Unpublish", n =
|
|
2437
|
+
let t = H?.unpublishLabel ?? "Unpublish", n = Rt.length === 1, r = n ? Bt(Rt[0].key) : "", i = H?.unpublishConfirmMessage?.(e.name, r) ?? /* @__PURE__ */ Y(bt, { children: [
|
|
2390
2438
|
"Unpublish ",
|
|
2391
2439
|
/* @__PURE__ */ J("strong", { children: e.name }),
|
|
2392
2440
|
" from \"",
|
|
@@ -2400,7 +2448,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2400
2448
|
return {
|
|
2401
2449
|
title: H?.unpublishConfirmTitle ?? t,
|
|
2402
2450
|
message: n ? i : a,
|
|
2403
|
-
consequences: H?.unpublishConfirmConsequences ??
|
|
2451
|
+
consequences: H?.unpublishConfirmConsequences ?? Mr,
|
|
2404
2452
|
confirmLabel: t,
|
|
2405
2453
|
loadingStatusLabel: H?.unpublishingStatusLabel ?? "Requesting unpublish",
|
|
2406
2454
|
variant: xe.Danger
|
|
@@ -2421,7 +2469,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2421
2469
|
let e = H?.deleteActionLabel ?? "Delete", n = Tt ?? t.User;
|
|
2422
2470
|
return {
|
|
2423
2471
|
title: e,
|
|
2424
|
-
message: (H?.deleteApiKeyConfirmMessage ??
|
|
2472
|
+
message: (H?.deleteApiKeyConfirmMessage ?? Fr)(n),
|
|
2425
2473
|
consequences: void 0,
|
|
2426
2474
|
confirmLabel: e,
|
|
2427
2475
|
loadingStatusLabel: H?.deletingStatusLabel ?? "Deleting",
|
|
@@ -2436,52 +2484,52 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2436
2484
|
e.name,
|
|
2437
2485
|
Tt,
|
|
2438
2486
|
H,
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
]),
|
|
2442
|
-
title:
|
|
2487
|
+
Rt,
|
|
2488
|
+
Bt
|
|
2489
|
+
]), un = ln != null, dn = gt === Z.Unpublish && Er(Rt, Ot) == null, fn = un || Le || mt, pn = e.credentials == null ? "" : (H?.credentialsManagementTitle ?? Pr)(e.credentials.authenticationType), mn = un ? {
|
|
2490
|
+
title: ln.title,
|
|
2443
2491
|
isBackDisabled: vt,
|
|
2444
|
-
onBack:
|
|
2492
|
+
onBack: Ut
|
|
2445
2493
|
} : Le ? {
|
|
2446
|
-
title:
|
|
2494
|
+
title: on,
|
|
2447
2495
|
isBackDisabled: q.isSubmitting,
|
|
2448
|
-
onBack:
|
|
2496
|
+
onBack: Kt
|
|
2449
2497
|
} : mt ? {
|
|
2450
|
-
title:
|
|
2498
|
+
title: pn,
|
|
2451
2499
|
isBackDisabled: !1,
|
|
2452
|
-
onBack:
|
|
2453
|
-
} : null,
|
|
2500
|
+
onBack: jt
|
|
2501
|
+
} : null, hn = mn?.title ?? nn;
|
|
2454
2502
|
return /* @__PURE__ */ Y(Ve, {
|
|
2455
2503
|
open: i,
|
|
2456
2504
|
onClose: l,
|
|
2457
|
-
header:
|
|
2458
|
-
ariaLabel:
|
|
2459
|
-
onBack:
|
|
2460
|
-
backAriaLabel:
|
|
2461
|
-
backDisabled:
|
|
2462
|
-
hideClose:
|
|
2463
|
-
closeAriaLabel:
|
|
2464
|
-
headerActions:
|
|
2505
|
+
header: mn?.title,
|
|
2506
|
+
ariaLabel: hn,
|
|
2507
|
+
onBack: mn?.onBack,
|
|
2508
|
+
backAriaLabel: sn,
|
|
2509
|
+
backDisabled: mn?.isBackDisabled,
|
|
2510
|
+
hideClose: mn != null,
|
|
2511
|
+
closeAriaLabel: rn,
|
|
2512
|
+
headerActions: mn == null && !c && f?.(e) !== !1 ? /* @__PURE__ */ J($t, {
|
|
2465
2513
|
isStarred: Pe,
|
|
2466
|
-
ariaLabel:
|
|
2467
|
-
onClick:
|
|
2514
|
+
ariaLabel: an,
|
|
2515
|
+
onClick: Jt
|
|
2468
2516
|
}) : void 0,
|
|
2469
2517
|
style: Ne,
|
|
2470
2518
|
overlayStyle: Ne,
|
|
2471
|
-
className:
|
|
2472
|
-
overlayClassName:
|
|
2473
|
-
headerClassName:
|
|
2474
|
-
titleClassName: P(De,
|
|
2519
|
+
className: Hn.panel,
|
|
2520
|
+
overlayClassName: Hn.backdrop,
|
|
2521
|
+
headerClassName: Hn.divider,
|
|
2522
|
+
titleClassName: P(De, Hn.publishTitle),
|
|
2475
2523
|
bodyClassName: "flex flex-col overflow-hidden",
|
|
2476
2524
|
children: [
|
|
2477
2525
|
/* @__PURE__ */ Y("div", {
|
|
2478
|
-
className: P("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto",
|
|
2526
|
+
className: P("flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto", Hn.content),
|
|
2479
2527
|
children: [
|
|
2480
|
-
|
|
2528
|
+
un && /* @__PURE__ */ J(E, {
|
|
2481
2529
|
item: e,
|
|
2482
|
-
message:
|
|
2483
|
-
consequences:
|
|
2484
|
-
variant:
|
|
2530
|
+
message: ln.message,
|
|
2531
|
+
consequences: ln.consequences,
|
|
2532
|
+
variant: ln.cardVariant ?? ln.variant,
|
|
2485
2533
|
messageClassName: Me,
|
|
2486
2534
|
styles: { colors: {
|
|
2487
2535
|
messageText: U?.confirmMessageText,
|
|
@@ -2489,27 +2537,27 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2489
2537
|
cardBackground: U?.infoCardBackground,
|
|
2490
2538
|
cardDangerBackground: U?.infoCardDangerBackground
|
|
2491
2539
|
} },
|
|
2492
|
-
children: gt === Z.Unpublish &&
|
|
2540
|
+
children: gt === Z.Unpublish && Rt.length > 1 && /* @__PURE__ */ J(Re, {
|
|
2493
2541
|
ariaLabel: H?.unpublishFolderGroupAriaLabel ?? "Published folders",
|
|
2494
2542
|
value: Ot ?? void 0,
|
|
2495
|
-
onChange:
|
|
2543
|
+
onChange: Q,
|
|
2496
2544
|
disabled: vt,
|
|
2497
|
-
items:
|
|
2545
|
+
items: Rt.map((e) => ({
|
|
2498
2546
|
value: e.key,
|
|
2499
|
-
label:
|
|
2547
|
+
label: Bt(e.key)
|
|
2500
2548
|
})),
|
|
2501
2549
|
radioClassName: Me
|
|
2502
2550
|
})
|
|
2503
2551
|
}),
|
|
2504
|
-
!
|
|
2552
|
+
!un && !Le && mt && /* @__PURE__ */ J(Vn, {
|
|
2505
2553
|
item: e,
|
|
2506
2554
|
onLogin: Ce,
|
|
2507
|
-
onRequestLogout:
|
|
2508
|
-
onRequestDeleteApiKey:
|
|
2555
|
+
onRequestLogout: Pt,
|
|
2556
|
+
onRequestDeleteApiKey: Ht,
|
|
2509
2557
|
texts: H,
|
|
2510
2558
|
detailsStyles: Te
|
|
2511
2559
|
}),
|
|
2512
|
-
!
|
|
2560
|
+
!un && Le && /* @__PURE__ */ J("div", {
|
|
2513
2561
|
className: "p-[22px]",
|
|
2514
2562
|
children: /* @__PURE__ */ J(St, {
|
|
2515
2563
|
resource: {
|
|
@@ -2546,8 +2594,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2546
2594
|
} }
|
|
2547
2595
|
})
|
|
2548
2596
|
}),
|
|
2549
|
-
!
|
|
2550
|
-
/* @__PURE__ */ J(
|
|
2597
|
+
!fn && /* @__PURE__ */ Y(bt, { children: [
|
|
2598
|
+
/* @__PURE__ */ J($n, {
|
|
2551
2599
|
item: e,
|
|
2552
2600
|
onUseInChat: p,
|
|
2553
2601
|
isPrimaryActionVisible: m,
|
|
@@ -2557,26 +2605,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2557
2605
|
isSharePrimary: oe,
|
|
2558
2606
|
isPublishVisible: _,
|
|
2559
2607
|
isPublishPrimary: y,
|
|
2560
|
-
onOpenPublish:
|
|
2608
|
+
onOpenPublish: Gt,
|
|
2561
2609
|
isUnpublishVisible: Se,
|
|
2562
|
-
hasPublishedFolders:
|
|
2610
|
+
hasPublishedFolders: zt,
|
|
2563
2611
|
isPublishHistoryResolved: b == null || We,
|
|
2564
2612
|
onRequestPublishHistory: ut,
|
|
2565
|
-
onOpenUnpublish: V ?
|
|
2613
|
+
onOpenUnpublish: V ? Vt : void 0,
|
|
2566
2614
|
onEdit: se,
|
|
2567
2615
|
onDownload: ce,
|
|
2568
2616
|
isDownloadVisible: le,
|
|
2569
2617
|
isDownloadPrimary: ue,
|
|
2570
|
-
onDelete: ge ?
|
|
2571
|
-
onUnshare: _e ?
|
|
2618
|
+
onDelete: ge ? Nt : void 0,
|
|
2619
|
+
onUnshare: _e ? It : void 0,
|
|
2572
2620
|
isUnshareVisible: ve,
|
|
2573
|
-
onRevokeShare: ye ?
|
|
2621
|
+
onRevokeShare: ye ? Lt : void 0,
|
|
2574
2622
|
onFetchRecipientsCount: be,
|
|
2575
2623
|
isRevokeShareVisible: B,
|
|
2576
2624
|
onLogin: Ce,
|
|
2577
2625
|
onLogout: we,
|
|
2578
|
-
onOpenCredentialsManagement:
|
|
2579
|
-
onRequestLogout:
|
|
2626
|
+
onOpenCredentialsManagement: At,
|
|
2627
|
+
onRequestLogout: Pt,
|
|
2580
2628
|
texts: H,
|
|
2581
2629
|
detailsStyles: Te,
|
|
2582
2630
|
isReadonly: c
|
|
@@ -2585,7 +2633,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2585
2633
|
let t = g(e.credentials);
|
|
2586
2634
|
return t != null && /* @__PURE__ */ J("div", {
|
|
2587
2635
|
className: "px-6",
|
|
2588
|
-
children: /* @__PURE__ */ J(
|
|
2636
|
+
children: /* @__PURE__ */ J(Ln, {
|
|
2589
2637
|
state: t,
|
|
2590
2638
|
authenticationType: e.credentials.authenticationType,
|
|
2591
2639
|
texts: H
|
|
@@ -2596,7 +2644,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2596
2644
|
/* @__PURE__ */ Y("div", {
|
|
2597
2645
|
className: "flex items-center px-6",
|
|
2598
2646
|
children: [/* @__PURE__ */ J(Ge, {
|
|
2599
|
-
tabs:
|
|
2647
|
+
tabs: Yt,
|
|
2600
2648
|
activeTabId: Fe,
|
|
2601
2649
|
onTabChange: Ie
|
|
2602
2650
|
}), s && /* @__PURE__ */ J("div", {
|
|
@@ -2610,20 +2658,20 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2610
2658
|
width: "72px"
|
|
2611
2659
|
},
|
|
2612
2660
|
active: !0,
|
|
2613
|
-
color:
|
|
2661
|
+
color: Hn.skeletonColor
|
|
2614
2662
|
})
|
|
2615
2663
|
})]
|
|
2616
2664
|
}),
|
|
2617
2665
|
/* @__PURE__ */ Y("div", {
|
|
2618
2666
|
className: P("min-h-0 flex-1 overflow-y-auto", Fe !== n.Overview && "px-6"),
|
|
2619
2667
|
children: [
|
|
2620
|
-
Fe === n.About && /* @__PURE__ */ J(
|
|
2668
|
+
Fe === n.About && /* @__PURE__ */ J(er, {
|
|
2621
2669
|
content: e.description,
|
|
2622
2670
|
topics: e.topics,
|
|
2623
2671
|
detailsStyles: Te,
|
|
2624
|
-
markdownLabels:
|
|
2672
|
+
markdownLabels: Zt
|
|
2625
2673
|
}),
|
|
2626
|
-
Fe === n.Content && /* @__PURE__ */ J(
|
|
2674
|
+
Fe === n.Content && /* @__PURE__ */ J(ar, {
|
|
2627
2675
|
content: K?.content ?? "",
|
|
2628
2676
|
filePreview: ct(),
|
|
2629
2677
|
filePreviewContent: lt,
|
|
@@ -2642,28 +2690,28 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2642
2690
|
fileLoadingLabel: H?.contentFileLoadingLabel,
|
|
2643
2691
|
fileUnsupportedLabel: H?.contentFileUnsupportedLabel,
|
|
2644
2692
|
detailsStyles: Te,
|
|
2645
|
-
markdownLabels:
|
|
2693
|
+
markdownLabels: Zt
|
|
2646
2694
|
}),
|
|
2647
|
-
Fe === n.Overview && /* @__PURE__ */ J(
|
|
2695
|
+
Fe === n.Overview && /* @__PURE__ */ J(vr, {
|
|
2648
2696
|
sections: e.details?.overview?.sections,
|
|
2649
2697
|
sectionClassName: Oe,
|
|
2650
2698
|
labelClassName: ke,
|
|
2651
2699
|
valueClassName: Ae,
|
|
2652
2700
|
valueTrueClassName: je,
|
|
2653
|
-
yesLabel:
|
|
2654
|
-
noLabel:
|
|
2701
|
+
yesLabel: en,
|
|
2702
|
+
noLabel: tn
|
|
2655
2703
|
}),
|
|
2656
|
-
Fe === n.Pricing && /* @__PURE__ */ J(
|
|
2704
|
+
Fe === n.Pricing && /* @__PURE__ */ J(yr, {
|
|
2657
2705
|
pricing: e.details?.pricing,
|
|
2658
2706
|
pricesSectionLabel: H?.pricingPricesSectionLabel,
|
|
2659
2707
|
characterPricesSectionLabel: H?.pricingCharacterPricesSectionLabel,
|
|
2660
2708
|
limitsSectionLabel: H?.pricingLimitsSectionLabel
|
|
2661
2709
|
}),
|
|
2662
|
-
Fe === n.Limits && /* @__PURE__ */ J(
|
|
2710
|
+
Fe === n.Limits && /* @__PURE__ */ J(_r, {
|
|
2663
2711
|
limits: e.details?.limits,
|
|
2664
2712
|
footerNote: Ee
|
|
2665
2713
|
}),
|
|
2666
|
-
Fe === n.Api && d(e.details?.api) && /* @__PURE__ */ J(
|
|
2714
|
+
Fe === n.Api && d(e.details?.api) && /* @__PURE__ */ J(Tn, {
|
|
2667
2715
|
api: e.details?.api,
|
|
2668
2716
|
resourceSectionLabel: H?.apiResourceSectionLabel,
|
|
2669
2717
|
snippetSectionLabel: H?.apiSnippetSectionLabel,
|
|
@@ -2675,38 +2723,38 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2675
2723
|
copyAriaLabel: H?.copyCodeAriaLabel,
|
|
2676
2724
|
copiedStatusLabel: H?.copiedCodeStatusLabel
|
|
2677
2725
|
}),
|
|
2678
|
-
Fe === n.Tools && /* @__PURE__ */ J(
|
|
2726
|
+
Fe === n.Tools && /* @__PURE__ */ J(Tr, {
|
|
2679
2727
|
tools: e.details?.tools,
|
|
2680
|
-
labels:
|
|
2728
|
+
labels: Qt
|
|
2681
2729
|
})
|
|
2682
2730
|
]
|
|
2683
2731
|
})
|
|
2684
2732
|
] })
|
|
2685
2733
|
]
|
|
2686
2734
|
}),
|
|
2687
|
-
|
|
2688
|
-
confirmLabel:
|
|
2689
|
-
cancelLabel:
|
|
2690
|
-
variant:
|
|
2735
|
+
un && /* @__PURE__ */ J(T, {
|
|
2736
|
+
confirmLabel: ln.confirmLabel,
|
|
2737
|
+
cancelLabel: cn,
|
|
2738
|
+
variant: ln.variant,
|
|
2691
2739
|
isLoading: vt,
|
|
2692
|
-
isConfirmDisabled:
|
|
2693
|
-
loadingStatusLabel:
|
|
2740
|
+
isConfirmDisabled: dn,
|
|
2741
|
+
loadingStatusLabel: ln.loadingStatusLabel,
|
|
2694
2742
|
styles: { colors: { border: U?.confirmFooterBorder } },
|
|
2695
|
-
onConfirm:
|
|
2696
|
-
onCancel:
|
|
2743
|
+
onConfirm: Wt,
|
|
2744
|
+
onCancel: Ut
|
|
2697
2745
|
}),
|
|
2698
|
-
!
|
|
2746
|
+
!un && Le && /* @__PURE__ */ J(xt, {
|
|
2699
2747
|
version: e.version,
|
|
2700
2748
|
hasExistingPublicationInFolder: q.hasExistingPublicationInFolder,
|
|
2701
2749
|
isSubmitDisabled: pt.isSubmitDisabled,
|
|
2702
2750
|
isSubmitLoading: pt.isSubmitLoading,
|
|
2703
|
-
onCancel:
|
|
2704
|
-
onSubmit:
|
|
2751
|
+
onCancel: Kt,
|
|
2752
|
+
onSubmit: qt,
|
|
2705
2753
|
labels: ne
|
|
2706
2754
|
})
|
|
2707
2755
|
]
|
|
2708
2756
|
});
|
|
2709
|
-
},
|
|
2757
|
+
}, Rr = {
|
|
2710
2758
|
pageNav: "_pageNav_14qfn_1",
|
|
2711
2759
|
navBtn: "_navBtn_14qfn_6",
|
|
2712
2760
|
titleText: "_titleText_14qfn_23",
|
|
@@ -2721,7 +2769,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2721
2769
|
favFadeIn: "_favFadeIn_14qfn_1",
|
|
2722
2770
|
cardLeaving: "_cardLeaving_14qfn_54",
|
|
2723
2771
|
cardFadeOut: "_cardFadeOut_14qfn_1"
|
|
2724
|
-
},
|
|
2772
|
+
}, zr = ({ 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 }) => {
|
|
2725
2773
|
let [m, h] = z(t), [g, _] = z(!1), v = (t) => {
|
|
2726
2774
|
t.stopPropagation();
|
|
2727
2775
|
let r = !m;
|
|
@@ -2738,7 +2786,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2738
2786
|
role: y == null ? void 0 : "button",
|
|
2739
2787
|
tabIndex: y == null ? void 0 : 0,
|
|
2740
2788
|
"aria-label": e.name,
|
|
2741
|
-
className: P("box-border min-w-0 cursor-pointer flex-row items-start gap-1 text-start", g &&
|
|
2789
|
+
className: P("box-border min-w-0 cursor-pointer flex-row items-start gap-1 text-start", g && Rr.cardLeaving, f && Rr.selectedCard, Pt.favoriteCard),
|
|
2742
2790
|
onClick: y,
|
|
2743
2791
|
onKeyDown: b,
|
|
2744
2792
|
onAnimationEnd: g ? (t) => {
|
|
@@ -2747,13 +2795,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2747
2795
|
children: [
|
|
2748
2796
|
f && /* @__PURE__ */ J(Xe, {
|
|
2749
2797
|
size: B.SM,
|
|
2750
|
-
className: P("absolute end-3 top-3 shrink-0",
|
|
2798
|
+
className: P("absolute end-3 top-3 shrink-0", Rr.selectedCheck),
|
|
2751
2799
|
"aria-hidden": !0,
|
|
2752
2800
|
stroke: V
|
|
2753
2801
|
}),
|
|
2754
2802
|
/* @__PURE__ */ J("div", {
|
|
2755
2803
|
className: "flex min-w-0 flex-1 flex-col items-start gap-1",
|
|
2756
|
-
children: /* @__PURE__ */ J(
|
|
2804
|
+
children: /* @__PURE__ */ J(Yt, {
|
|
2757
2805
|
icon: e.iconUrl,
|
|
2758
2806
|
type: e.type,
|
|
2759
2807
|
name: e.name,
|
|
@@ -2770,13 +2818,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2770
2818
|
lastUsedClassName: c
|
|
2771
2819
|
}
|
|
2772
2820
|
},
|
|
2773
|
-
iconOverlay: /* @__PURE__ */ J(
|
|
2821
|
+
iconOverlay: /* @__PURE__ */ J(Zt, {
|
|
2774
2822
|
credentials: e.credentials,
|
|
2775
2823
|
loggedOutLabel: p
|
|
2776
2824
|
})
|
|
2777
2825
|
})
|
|
2778
2826
|
}),
|
|
2779
|
-
r?.(e) !== !1 && /* @__PURE__ */ J(
|
|
2827
|
+
r?.(e) !== !1 && /* @__PURE__ */ J($t, {
|
|
2780
2828
|
isStarred: m,
|
|
2781
2829
|
size: H.Small,
|
|
2782
2830
|
onClick: v,
|
|
@@ -2785,7 +2833,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2785
2833
|
})
|
|
2786
2834
|
]
|
|
2787
2835
|
});
|
|
2788
|
-
},
|
|
2836
|
+
}, Br = 2, Vr = (e) => {
|
|
2789
2837
|
let t = e.getBoundingClientRect(), n = window.scrollX, r = window.scrollY, i = window.getComputedStyle(e).transform;
|
|
2790
2838
|
if (!i || i === "none") return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2791
2839
|
try {
|
|
@@ -2794,7 +2842,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2794
2842
|
} catch {
|
|
2795
2843
|
return new DOMRect(t.x + n, t.y + r, t.width, t.height);
|
|
2796
2844
|
}
|
|
2797
|
-
},
|
|
2845
|
+
}, Hr = ({ 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 }) => {
|
|
2798
2846
|
let h = o?.typography?.titleClassName ?? "dial-body-semi-text", g = o?.typography?.countClassName ?? "dial-tiny-semi-text", _ = ie({
|
|
2799
2847
|
"--cat-fav-title-text": o?.colors?.titleText,
|
|
2800
2848
|
"--cat-fav-count-text": o?.colors?.countText,
|
|
@@ -2807,7 +2855,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2807
2855
|
"--cat-fav-nav-btn-active-bg": o?.colors?.navButtonActiveBackground,
|
|
2808
2856
|
"--cat-fav-page-nav-border": o?.colors?.pageNavBorder,
|
|
2809
2857
|
"--cat-fav-page-nav-bg": o?.colors?.pageNavBackground
|
|
2810
|
-
}), v = L(() => [...e].sort((e, t) => (new Date(t.updatedAt || "").getTime() ?? 0) - (new Date(e.updatedAt || "").getTime() ?? 0)), [e]), [y, b] = z(1), x =
|
|
2858
|
+
}), v = L(() => [...e].sort((e, t) => (new Date(t.updatedAt || "").getTime() ?? 0) - (new Date(e.updatedAt || "").getTime() ?? 0)), [e]), [y, b] = z(1), x = Nt(), S = x * Br, C = (y - 1) * S, w = L(() => v.slice(C, C + S), [
|
|
2811
2859
|
v,
|
|
2812
2860
|
C,
|
|
2813
2861
|
S
|
|
@@ -2840,7 +2888,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2840
2888
|
N.current = y, ae.current = x;
|
|
2841
2889
|
let n = k.current.querySelectorAll("[data-card-id]"), r = /* @__PURE__ */ new Map();
|
|
2842
2890
|
if (n.forEach((e) => {
|
|
2843
|
-
r.set(e.dataset.cardId,
|
|
2891
|
+
r.set(e.dataset.cardId, Vr(e));
|
|
2844
2892
|
}), !e && !t) {
|
|
2845
2893
|
let e = O.current, t = oe.current, i = 0;
|
|
2846
2894
|
if (e) {
|
|
@@ -2896,7 +2944,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2896
2944
|
ref: D,
|
|
2897
2945
|
children: /* @__PURE__ */ Y("section", {
|
|
2898
2946
|
ref: O,
|
|
2899
|
-
className: P("flex flex-shrink-0 flex-col gap-4 pb-2 pt-2",
|
|
2947
|
+
className: P("flex flex-shrink-0 flex-col gap-4 pb-2 pt-2", Rr.section, s && Rr.sectionLeaving),
|
|
2900
2948
|
style: {
|
|
2901
2949
|
..._,
|
|
2902
2950
|
minHeight: j
|
|
@@ -2907,17 +2955,17 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2907
2955
|
children: [/* @__PURE__ */ J(te, {
|
|
2908
2956
|
title: n,
|
|
2909
2957
|
postfix: E,
|
|
2910
|
-
titleClassName: P(h,
|
|
2911
|
-
postfixClassName: P(g,
|
|
2958
|
+
titleClassName: P(h, Rr.titleText),
|
|
2959
|
+
postfixClassName: P(g, Rr.countText),
|
|
2912
2960
|
trailing: T > 1 ? /* @__PURE__ */ Y("div", {
|
|
2913
|
-
className: P("inline-flex items-center gap-[2px] rounded-full px-[6px] py-[3px]",
|
|
2961
|
+
className: P("inline-flex items-center gap-[2px] rounded-full px-[6px] py-[3px]", Rr.pageNav),
|
|
2914
2962
|
children: [
|
|
2915
2963
|
/* @__PURE__ */ J(Oe, {
|
|
2916
2964
|
size: H.Small,
|
|
2917
2965
|
"aria-label": l,
|
|
2918
2966
|
disabled: y === 1,
|
|
2919
2967
|
onClick: () => b((e) => e - 1),
|
|
2920
|
-
className: P("rounded-full",
|
|
2968
|
+
className: P("rounded-full", Rr.navBtn),
|
|
2921
2969
|
icon: /* @__PURE__ */ J(Qe, {
|
|
2922
2970
|
size: 14,
|
|
2923
2971
|
"aria-hidden": !0,
|
|
@@ -2926,7 +2974,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2926
2974
|
})
|
|
2927
2975
|
}),
|
|
2928
2976
|
/* @__PURE__ */ Y("span", {
|
|
2929
|
-
className: P("min-w-[32px] select-none px-1 text-center", g,
|
|
2977
|
+
className: P("min-w-[32px] select-none px-1 text-center", g, Rr.countText),
|
|
2930
2978
|
children: [
|
|
2931
2979
|
y,
|
|
2932
2980
|
" / ",
|
|
@@ -2938,7 +2986,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2938
2986
|
"aria-label": u,
|
|
2939
2987
|
disabled: y === T,
|
|
2940
2988
|
onClick: () => b((e) => e + 1),
|
|
2941
|
-
className: P("rounded-full",
|
|
2989
|
+
className: P("rounded-full", Rr.navBtn),
|
|
2942
2990
|
icon: /* @__PURE__ */ J($e, {
|
|
2943
2991
|
size: 14,
|
|
2944
2992
|
"aria-hidden": !0,
|
|
@@ -2950,12 +2998,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2950
2998
|
}) : void 0
|
|
2951
2999
|
}), /* @__PURE__ */ J("div", {
|
|
2952
3000
|
ref: k,
|
|
2953
|
-
className: P("grid content-start gap-5",
|
|
3001
|
+
className: P("grid content-start gap-5", Rr.gridPage),
|
|
2954
3002
|
style: {
|
|
2955
3003
|
gridTemplateColumns: `repeat(${x}, minmax(0, 1fr))`,
|
|
2956
3004
|
minHeight: ee
|
|
2957
3005
|
},
|
|
2958
|
-
children: w.map((e) => /* @__PURE__ */ J(
|
|
3006
|
+
children: w.map((e) => /* @__PURE__ */ J(zr, {
|
|
2959
3007
|
item: e,
|
|
2960
3008
|
onToggle: r,
|
|
2961
3009
|
isFavoriteVisible: i,
|
|
@@ -2968,15 +3016,15 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2968
3016
|
})]
|
|
2969
3017
|
})
|
|
2970
3018
|
});
|
|
2971
|
-
},
|
|
3019
|
+
}, Ur = (e, t) => {
|
|
2972
3020
|
let n = new Set(e);
|
|
2973
3021
|
return n.has(t) ? n.delete(t) : n.add(t), n;
|
|
2974
|
-
},
|
|
3022
|
+
}, Wr = (e, t) => {
|
|
2975
3023
|
let n = new Set(e), r = t.length > 0 && t.every((t) => e.has(t));
|
|
2976
3024
|
return t.forEach((e) => {
|
|
2977
3025
|
r ? n.delete(e) : n.add(e);
|
|
2978
3026
|
}), n;
|
|
2979
|
-
},
|
|
3027
|
+
}, Gr = {
|
|
2980
3028
|
listContainer: "_listContainer_uwfwj_1",
|
|
2981
3029
|
gridClip: "_gridClip_uwfwj_6",
|
|
2982
3030
|
favHeader: "_favHeader_uwfwj_35",
|
|
@@ -2985,19 +3033,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
2985
3033
|
selectedCheck: "_selectedCheck_uwfwj_47",
|
|
2986
3034
|
starToggleOff: "_starToggleOff_uwfwj_51",
|
|
2987
3035
|
selectedRow: "_selectedRow_uwfwj_64"
|
|
2988
|
-
},
|
|
3036
|
+
}, Kr = ({ data: e }) => e ? /* @__PURE__ */ J("div", {
|
|
2989
3037
|
className: "flex h-full items-center",
|
|
2990
3038
|
children: /* @__PURE__ */ J(ee, { type: e.type })
|
|
2991
|
-
}) : null,
|
|
3039
|
+
}) : null, qr = " / ", Jr = ({ data: e, context: t }) => {
|
|
2992
3040
|
if (!e || e.folder.length === 0) return null;
|
|
2993
|
-
let n = e.folder.join(
|
|
3041
|
+
let n = e.folder.join(qr), 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";
|
|
2994
3042
|
return /* @__PURE__ */ Y("div", {
|
|
2995
3043
|
className: "flex h-full w-full min-w-0 items-center gap-1.5",
|
|
2996
3044
|
children: [
|
|
2997
3045
|
/* @__PURE__ */ J(it, {
|
|
2998
3046
|
size: B.SM,
|
|
2999
3047
|
stroke: V,
|
|
3000
|
-
className: P("shrink-0",
|
|
3048
|
+
className: P("shrink-0", Gr.folderIcon),
|
|
3001
3049
|
"aria-hidden": !0
|
|
3002
3050
|
}),
|
|
3003
3051
|
/* @__PURE__ */ J(G, {
|
|
@@ -3019,7 +3067,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3019
3067
|
})
|
|
3020
3068
|
]
|
|
3021
3069
|
});
|
|
3022
|
-
},
|
|
3070
|
+
}, Yr = ({ data: e, context: t }) => {
|
|
3023
3071
|
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;
|
|
3024
3072
|
return e ? /* @__PURE__ */ Y("div", {
|
|
3025
3073
|
className: "flex h-full w-full min-w-0 items-center gap-2.5",
|
|
@@ -3030,7 +3078,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3030
3078
|
size: 36,
|
|
3031
3079
|
initialsName: e.name,
|
|
3032
3080
|
styles: { badgeClassName: "rounded-[10px]" }
|
|
3033
|
-
}), /* @__PURE__ */ J(
|
|
3081
|
+
}), /* @__PURE__ */ J(Zt, {
|
|
3034
3082
|
credentials: e.credentials,
|
|
3035
3083
|
loggedOutLabel: t?.credentialsBadgeLoggedOutLabel
|
|
3036
3084
|
})]
|
|
@@ -3043,18 +3091,18 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3043
3091
|
className: "min-w-0 flex-1 items-baseline gap-1.5",
|
|
3044
3092
|
trailing: o ? /* @__PURE__ */ J(Xe, {
|
|
3045
3093
|
size: B.SM,
|
|
3046
|
-
className: P("shrink-0",
|
|
3094
|
+
className: P("shrink-0", Gr.selectedCheck),
|
|
3047
3095
|
"aria-hidden": !0,
|
|
3048
3096
|
stroke: V
|
|
3049
3097
|
}) : void 0
|
|
3050
3098
|
})]
|
|
3051
3099
|
}) : null;
|
|
3052
|
-
},
|
|
3053
|
-
let e = ue(
|
|
3100
|
+
}, Xr = se(null), Zr = () => {
|
|
3101
|
+
let e = ue(Xr);
|
|
3054
3102
|
if (e == null) throw Error("useListSelection must be used inside a ListView in multiple selection mode.");
|
|
3055
3103
|
return e;
|
|
3056
|
-
},
|
|
3057
|
-
let { selectedIds: t, toggle: n, getRowAriaLabel: r } =
|
|
3104
|
+
}, Qr = ({ data: e }) => {
|
|
3105
|
+
let { selectedIds: t, toggle: n, getRowAriaLabel: r } = Zr();
|
|
3058
3106
|
return e ? /* @__PURE__ */ J("div", {
|
|
3059
3107
|
className: "flex size-full items-center",
|
|
3060
3108
|
children: /* @__PURE__ */ J(be, {
|
|
@@ -3063,8 +3111,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3063
3111
|
onChange: () => n(e.id)
|
|
3064
3112
|
})
|
|
3065
3113
|
}) : null;
|
|
3066
|
-
},
|
|
3067
|
-
let { isAllSelected: e, isSomeSelected: t, hasItems: n, toggleAll: r, selectAllAriaLabel: i } =
|
|
3114
|
+
}, $r = () => {
|
|
3115
|
+
let { isAllSelected: e, isSomeSelected: t, hasItems: n, toggleAll: r, selectAllAriaLabel: i } = Zr();
|
|
3068
3116
|
return /* @__PURE__ */ J("div", {
|
|
3069
3117
|
className: "flex size-full items-center",
|
|
3070
3118
|
children: /* @__PURE__ */ J(be, {
|
|
@@ -3075,48 +3123,48 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3075
3123
|
onChange: r
|
|
3076
3124
|
})
|
|
3077
3125
|
});
|
|
3078
|
-
},
|
|
3126
|
+
}, ei = ({ data: e, context: t }) => {
|
|
3079
3127
|
let [n, r] = z(e?.isStarred ?? !1);
|
|
3080
3128
|
return I(() => {
|
|
3081
3129
|
r(e?.isStarred ?? !1);
|
|
3082
3130
|
}, [e?.id, e?.isStarred]), !e || t?.isFavoriteVisible?.(e) === !1 ? null : /* @__PURE__ */ J("div", {
|
|
3083
3131
|
className: "flex size-full items-center justify-end",
|
|
3084
|
-
children: /* @__PURE__ */ J(
|
|
3132
|
+
children: /* @__PURE__ */ J($t, {
|
|
3085
3133
|
isStarred: n,
|
|
3086
3134
|
onClick: (i) => {
|
|
3087
3135
|
i.stopPropagation();
|
|
3088
3136
|
let a = !n;
|
|
3089
3137
|
r(a), t?.onToggleFavorite?.(e.id, a);
|
|
3090
3138
|
},
|
|
3091
|
-
className: n ? void 0 :
|
|
3139
|
+
className: n ? void 0 : Gr.starToggleOff
|
|
3092
3140
|
})
|
|
3093
3141
|
});
|
|
3094
|
-
},
|
|
3142
|
+
}, ti = ({ data: e }) => !e || e.topics.length === 0 ? null : /* @__PURE__ */ J("div", {
|
|
3095
3143
|
className: "flex h-full w-full min-w-0 items-center",
|
|
3096
|
-
children: /* @__PURE__ */ J(
|
|
3097
|
-
}),
|
|
3144
|
+
children: /* @__PURE__ */ J(an, { topics: e.topics })
|
|
3145
|
+
}), ni = "selection", ri = 52, ii = {
|
|
3098
3146
|
folder: (e) => e !== w.Model,
|
|
3099
3147
|
tags: () => !0,
|
|
3100
3148
|
favorite: () => !0
|
|
3101
|
-
},
|
|
3149
|
+
}, ai = (e, t) => Object.fromEntries([
|
|
3102
3150
|
"folder",
|
|
3103
3151
|
"tags",
|
|
3104
3152
|
"favorite"
|
|
3105
|
-
].map((n) => [n, (t?.[n] ??
|
|
3106
|
-
let i =
|
|
3153
|
+
].map((n) => [n, (t?.[n] ?? ii[n])(e)])), oi = (e, t = !1, n, r = !1) => {
|
|
3154
|
+
let i = ai(e, n);
|
|
3107
3155
|
return [
|
|
3108
3156
|
...r ? [{
|
|
3109
|
-
colId:
|
|
3157
|
+
colId: ni,
|
|
3110
3158
|
headerName: "",
|
|
3111
|
-
width:
|
|
3112
|
-
minWidth:
|
|
3113
|
-
maxWidth:
|
|
3159
|
+
width: ri,
|
|
3160
|
+
minWidth: ri,
|
|
3161
|
+
maxWidth: ri,
|
|
3114
3162
|
filter: !1,
|
|
3115
3163
|
sortable: !1,
|
|
3116
3164
|
resizable: !1,
|
|
3117
3165
|
suppressMovable: !0,
|
|
3118
|
-
headerComponent:
|
|
3119
|
-
cellRenderer:
|
|
3166
|
+
headerComponent: $r,
|
|
3167
|
+
cellRenderer: Qr
|
|
3120
3168
|
}] : [],
|
|
3121
3169
|
{
|
|
3122
3170
|
headerName: "Name",
|
|
@@ -3124,7 +3172,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3124
3172
|
minWidth: 220,
|
|
3125
3173
|
field: "name",
|
|
3126
3174
|
filter: !1,
|
|
3127
|
-
cellRenderer:
|
|
3175
|
+
cellRenderer: Yr,
|
|
3128
3176
|
valueGetter: (e) => e.data?.name
|
|
3129
3177
|
},
|
|
3130
3178
|
{
|
|
@@ -3134,7 +3182,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3134
3182
|
field: "type",
|
|
3135
3183
|
filter: !1,
|
|
3136
3184
|
sortable: !1,
|
|
3137
|
-
cellRenderer:
|
|
3185
|
+
cellRenderer: Kr,
|
|
3138
3186
|
valueGetter: (e) => e.data?.type
|
|
3139
3187
|
},
|
|
3140
3188
|
{
|
|
@@ -3144,7 +3192,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3144
3192
|
minWidth: 170,
|
|
3145
3193
|
filter: !1,
|
|
3146
3194
|
hide: !i.folder,
|
|
3147
|
-
cellRenderer:
|
|
3195
|
+
cellRenderer: Jr,
|
|
3148
3196
|
valueGetter: (e) => e.data?.folder
|
|
3149
3197
|
},
|
|
3150
3198
|
{
|
|
@@ -3155,7 +3203,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3155
3203
|
filter: !1,
|
|
3156
3204
|
sortable: !1,
|
|
3157
3205
|
hide: !i.tags,
|
|
3158
|
-
cellRenderer:
|
|
3206
|
+
cellRenderer: ti,
|
|
3159
3207
|
valueGetter: (e) => e.data?.topics
|
|
3160
3208
|
},
|
|
3161
3209
|
{
|
|
@@ -3167,15 +3215,15 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3167
3215
|
sortable: !1,
|
|
3168
3216
|
resizable: !1,
|
|
3169
3217
|
hide: t || !i.favorite,
|
|
3170
|
-
headerClass:
|
|
3171
|
-
cellRenderer:
|
|
3218
|
+
headerClass: Gr.favHeader,
|
|
3219
|
+
cellRenderer: ei
|
|
3172
3220
|
}
|
|
3173
3221
|
];
|
|
3174
|
-
},
|
|
3175
|
-
className: K("flex size-full flex-col items-center justify-center",
|
|
3222
|
+
}, si = 60, ci = {}, li = /* @__PURE__ */ new Set(), ui = "Select all", di = (e) => e.id, fi = (e) => `Select ${e.name}`, pi = (e) => e.items.length === 0 ? /* @__PURE__ */ J("div", {
|
|
3223
|
+
className: K("flex size-full flex-col items-center justify-center", Pt.listView),
|
|
3176
3224
|
children: /* @__PURE__ */ J(M, { label: e.emptyStateTitle ?? "No results" })
|
|
3177
|
-
}) : /* @__PURE__ */ J(
|
|
3178
|
-
let y = m ===
|
|
3225
|
+
}) : /* @__PURE__ */ J(mi, { ...e }), mi = ({ 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, selectionMode: m = kt.Single, selectedItemIds: h = li, onSelectionChange: g, selectRowAriaLabel: _ = fi, selectAllAriaLabel: v = ui }) => {
|
|
3226
|
+
let y = m === kt.Multiple, b = y ? void 0 : u, x = a?.typography ?? ci, S = a?.colors, C = {
|
|
3179
3227
|
"--cat-list-bg": S?.background,
|
|
3180
3228
|
"--cat-list-border": S?.border,
|
|
3181
3229
|
"--cat-list-header-bg": S?.headerBackground,
|
|
@@ -3189,12 +3237,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3189
3237
|
...l == null ? {} : { "--list-header-sticky-top": `${l}px` }
|
|
3190
3238
|
}, w = R(null), T = F((e) => {
|
|
3191
3239
|
w.current = e;
|
|
3192
|
-
}, []), E = L(() =>
|
|
3240
|
+
}, []), E = L(() => oi(t, f, p, y), [
|
|
3193
3241
|
t,
|
|
3194
3242
|
f,
|
|
3195
3243
|
p,
|
|
3196
3244
|
y
|
|
3197
|
-
]), D = L(() => e.map(
|
|
3245
|
+
]), D = L(() => e.map(di), [e]), O = L(() => D.filter((e) => h.has(e)).length, [D, h]), k = F((e) => g?.(Ur(h, e)), [g, h]), ee = F(() => g?.(Wr(h, D)), [
|
|
3198
3246
|
g,
|
|
3199
3247
|
h,
|
|
3200
3248
|
D
|
|
@@ -3224,7 +3272,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3224
3272
|
t != null && (e.preventDefault(), k(t));
|
|
3225
3273
|
}, [k]), ne = L(() => ({
|
|
3226
3274
|
domLayout: "autoHeight",
|
|
3227
|
-
rowHeight:
|
|
3275
|
+
rowHeight: si,
|
|
3228
3276
|
animateRows: !1,
|
|
3229
3277
|
suppressAnimationFrame: !0,
|
|
3230
3278
|
suppressScrollOnNewData: !0,
|
|
@@ -3246,7 +3294,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3246
3294
|
t.field !== "isStarred" && t.colId !== "selection" && e.data && (y && te.current(e.data.id), c?.(e.data));
|
|
3247
3295
|
} : void 0,
|
|
3248
3296
|
rowClass: c || y ? "cursor-pointer" : void 0,
|
|
3249
|
-
getRowClass: (e) => e.data?.id === b ?
|
|
3297
|
+
getRowClass: (e) => e.data?.id === b ? Gr.selectedRow : void 0
|
|
3250
3298
|
}), [
|
|
3251
3299
|
n,
|
|
3252
3300
|
x,
|
|
@@ -3257,7 +3305,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3257
3305
|
f,
|
|
3258
3306
|
c,
|
|
3259
3307
|
y
|
|
3260
|
-
]), { containerRef: re, startRow: M, endRow: N } =
|
|
3308
|
+
]), { containerRef: re, startRow: M, endRow: N } = Ut(e.length, si), ie = L(() => e.slice(M, N), [
|
|
3261
3309
|
e,
|
|
3262
3310
|
M,
|
|
3263
3311
|
N
|
|
@@ -3268,22 +3316,22 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3268
3316
|
w.current?.redrawRows();
|
|
3269
3317
|
}, [b]), /* @__PURE__ */ J("div", {
|
|
3270
3318
|
style: C,
|
|
3271
|
-
className: K("w-full rounded-xl border",
|
|
3319
|
+
className: K("w-full rounded-xl border", Gr.listContainer, Pt.listView),
|
|
3272
3320
|
children: /* @__PURE__ */ Y("div", {
|
|
3273
3321
|
ref: re,
|
|
3274
3322
|
onKeyDown: y ? j : void 0,
|
|
3275
|
-
className: K("rounded-xl [&_.ag-cell.ag-column-first]:ps-4 [&_.ag-cell.ag-column-last]:pe-4 [&_.ag-header-cell.ag-column-first]:ps-4 [&_.ag-header-cell.ag-column-last]:pe-4",
|
|
3323
|
+
className: K("rounded-xl [&_.ag-cell.ag-column-first]:ps-4 [&_.ag-cell.ag-column-last]:pe-4 [&_.ag-header-cell.ag-column-first]:ps-4 [&_.ag-header-cell.ag-column-last]:pe-4", Gr.gridClip),
|
|
3276
3324
|
children: [
|
|
3277
3325
|
M > 0 && /* @__PURE__ */ J("div", {
|
|
3278
|
-
style: { height: M *
|
|
3326
|
+
style: { height: M * si },
|
|
3279
3327
|
"aria-hidden": !0
|
|
3280
3328
|
}),
|
|
3281
|
-
/* @__PURE__ */ J(
|
|
3329
|
+
/* @__PURE__ */ J(Xr.Provider, {
|
|
3282
3330
|
value: A,
|
|
3283
3331
|
children: /* @__PURE__ */ J(Tt, {
|
|
3284
3332
|
columnDefs: E,
|
|
3285
3333
|
rowData: ie,
|
|
3286
|
-
getRowId:
|
|
3334
|
+
getRowId: di,
|
|
3287
3335
|
withoutHeaderBorders: !0,
|
|
3288
3336
|
wrapCustomCellRenderers: !1,
|
|
3289
3337
|
onGridApiChange: T,
|
|
@@ -3293,13 +3341,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3293
3341
|
})
|
|
3294
3342
|
}),
|
|
3295
3343
|
N < e.length && /* @__PURE__ */ J("div", {
|
|
3296
|
-
style: { height: (e.length - N) *
|
|
3344
|
+
style: { height: (e.length - N) * si },
|
|
3297
3345
|
"aria-hidden": !0
|
|
3298
3346
|
})
|
|
3299
3347
|
]
|
|
3300
3348
|
})
|
|
3301
3349
|
});
|
|
3302
|
-
},
|
|
3350
|
+
}, hi = {
|
|
3303
3351
|
filterBtn: "_filterBtn_5r8a5_7",
|
|
3304
3352
|
filterBtnActive: "_filterBtnActive_5r8a5_24",
|
|
3305
3353
|
filterBtnOpen: "_filterBtnOpen_5r8a5_28",
|
|
@@ -3311,13 +3359,13 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3311
3359
|
divider: "_divider_5r8a5_63",
|
|
3312
3360
|
sectionLabel: "_sectionLabel_5r8a5_67",
|
|
3313
3361
|
footer: "_footer_5r8a5_71"
|
|
3314
|
-
},
|
|
3362
|
+
}, gi = (e, t, n, r, i) => {
|
|
3315
3363
|
let a = e.size > 0;
|
|
3316
3364
|
return n && a ? `${r} · ${e.size}` : n ? r : a ? l(e, t, i) : i;
|
|
3317
|
-
},
|
|
3365
|
+
}, _i = (e, t) => {
|
|
3318
3366
|
let n = new Set(t);
|
|
3319
3367
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
3320
|
-
},
|
|
3368
|
+
}, vi = ({ 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 }) => {
|
|
3321
3369
|
let f = (r ?? !1) || e.size > 0, [p, m] = z(!1), h = ie({
|
|
3322
3370
|
"--cat-filter-btn-bg": d?.buttonBackground,
|
|
3323
3371
|
"--cat-filter-btn-border": d?.buttonBorder,
|
|
@@ -3334,7 +3382,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3334
3382
|
"--cat-filter-section-label": d?.sectionLabel,
|
|
3335
3383
|
"--cat-filter-divider": d?.divider,
|
|
3336
3384
|
"--cat-filter-footer-border": d?.footerBorder
|
|
3337
|
-
}), g = L(() => n == null ? [] : [...n].sort(), [n]), _ =
|
|
3385
|
+
}), g = L(() => n == null ? [] : [...n].sort(), [n]), _ = gi(e, n, r, a, s), [v, y] = z(() => new Set(e)), [b, x] = z(r ?? !1);
|
|
3338
3386
|
I(() => {
|
|
3339
3387
|
p && (y(new Set(e)), x(r ?? !1));
|
|
3340
3388
|
}, [
|
|
@@ -3379,7 +3427,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3379
3427
|
...h,
|
|
3380
3428
|
maxHeight: "calc(var(--fui-available-height, 9999px) - 8px)"
|
|
3381
3429
|
},
|
|
3382
|
-
className: P("flex min-w-[360px] flex-col rounded-xl p-[6px]",
|
|
3430
|
+
className: P("flex min-w-[360px] flex-col rounded-xl p-[6px]", hi.overlay),
|
|
3383
3431
|
onKeyDown: ee,
|
|
3384
3432
|
children: [
|
|
3385
3433
|
/* @__PURE__ */ J(Ne, {
|
|
@@ -3388,7 +3436,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3388
3436
|
mark: Pe.Checkbox,
|
|
3389
3437
|
selected: b,
|
|
3390
3438
|
label: a,
|
|
3391
|
-
labelClassName: P(
|
|
3439
|
+
labelClassName: P(hi.rowLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3392
3440
|
className: "shrink-0",
|
|
3393
3441
|
tabIndex: C === 0 ? 0 : -1,
|
|
3394
3442
|
ref: (e) => {
|
|
@@ -3399,11 +3447,11 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3399
3447
|
g.length > 0 && /* @__PURE__ */ Y(bt, { children: [
|
|
3400
3448
|
/* @__PURE__ */ J("div", {
|
|
3401
3449
|
role: "separator",
|
|
3402
|
-
className: P("my-1 h-px",
|
|
3450
|
+
className: P("my-1 h-px", hi.divider),
|
|
3403
3451
|
"aria-hidden": !0
|
|
3404
3452
|
}),
|
|
3405
3453
|
/* @__PURE__ */ J("div", {
|
|
3406
|
-
className: P("px-[10px] pb-1 pt-[10px]", u?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text",
|
|
3454
|
+
className: P("px-[10px] pb-1 pt-[10px]", u?.filterSectionLabelClassName ?? "dial-tiny-lead-semi-text", hi.sectionLabel),
|
|
3407
3455
|
"aria-hidden": !0,
|
|
3408
3456
|
children: o
|
|
3409
3457
|
}),
|
|
@@ -3417,19 +3465,19 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3417
3465
|
mark: Pe.Checkbox,
|
|
3418
3466
|
selected: n,
|
|
3419
3467
|
label: e,
|
|
3420
|
-
labelClassName:
|
|
3468
|
+
labelClassName: hi.rowLabel,
|
|
3421
3469
|
className: "shrink-0",
|
|
3422
3470
|
tabIndex: C === r ? 0 : -1,
|
|
3423
3471
|
ref: (e) => {
|
|
3424
3472
|
T.current[r] = e;
|
|
3425
3473
|
},
|
|
3426
|
-
onClick: () => y(
|
|
3474
|
+
onClick: () => y(_i(e, v))
|
|
3427
3475
|
}, e);
|
|
3428
3476
|
})
|
|
3429
3477
|
})
|
|
3430
3478
|
] }),
|
|
3431
3479
|
/* @__PURE__ */ Y("div", {
|
|
3432
|
-
className: P("mt-1 flex shrink-0 items-center px-1 py-3",
|
|
3480
|
+
className: P("mt-1 flex shrink-0 items-center px-1 py-3", hi.footer),
|
|
3433
3481
|
onKeyDown: (e) => {
|
|
3434
3482
|
(e.key === "ArrowUp" || e.key === "ArrowDown") && e.stopPropagation();
|
|
3435
3483
|
},
|
|
@@ -3453,26 +3501,26 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3453
3501
|
iconBefore: /* @__PURE__ */ J(rt, {
|
|
3454
3502
|
size: B.SM,
|
|
3455
3503
|
stroke: V,
|
|
3456
|
-
className: P("shrink-0",
|
|
3504
|
+
className: P("shrink-0", hi.filterBtnFunnel),
|
|
3457
3505
|
"aria-hidden": !0
|
|
3458
3506
|
}),
|
|
3459
3507
|
label: _,
|
|
3460
|
-
textClassName: P(
|
|
3508
|
+
textClassName: P(hi.filterBtnLabel, u?.filterButtonClassName ?? "dial-small-semi-text"),
|
|
3461
3509
|
iconAfter: /* @__PURE__ */ J(Ze, {
|
|
3462
3510
|
size: 14,
|
|
3463
3511
|
stroke: V,
|
|
3464
|
-
className: P("shrink-0 transition-transform duration-150",
|
|
3512
|
+
className: P("shrink-0 transition-transform duration-150", hi.filterBtnChevron, p && "rotate-180"),
|
|
3465
3513
|
"aria-hidden": !0
|
|
3466
3514
|
}),
|
|
3467
|
-
className: P("h-12 shrink-0 gap-[7px] whitespace-nowrap !rounded-lg px-[18px]",
|
|
3515
|
+
className: P("h-12 shrink-0 gap-[7px] whitespace-nowrap !rounded-lg px-[18px]", hi.filterBtn, f && hi.filterBtnActive, p && hi.filterBtnOpen)
|
|
3468
3516
|
})
|
|
3469
3517
|
});
|
|
3470
|
-
},
|
|
3518
|
+
}, yi = {
|
|
3471
3519
|
section: "_section_mh952_1",
|
|
3472
3520
|
divider: "_divider_mh952_5"
|
|
3473
|
-
},
|
|
3521
|
+
}, bi = ({ totalCount: e, viewMode: t, onViewModeChange: n, title: r = "Browse", browseHeaderRenderer: i, styles: a, query: o, onQueryChange: s, searchPlaceholder: c, gridViewLabel: l = "Grid view", listViewLabel: u = "List view", viewToggleLabel: d = "View mode", sortKey: f, sortOptions: p, onSortChange: m, sortLabel: h = "Sort", filters: g, onFiltersChange: _, filterValues: v, isMyAppsActive: y, onMyAppsChange: b, filterFromLabel: x, filterMyAppsLabel: S, filterTopicsLabel: C }) => {
|
|
3474
3522
|
let w = a?.typography?.titleClassName ?? "dial-body-semi-text", T = a?.typography?.countClassName ?? "dial-tiny-semi-text", E = L(() => [{
|
|
3475
|
-
value:
|
|
3523
|
+
value: Q.Grid,
|
|
3476
3524
|
icon: /* @__PURE__ */ J(ot, {
|
|
3477
3525
|
size: B.SM,
|
|
3478
3526
|
"aria-hidden": !0,
|
|
@@ -3480,7 +3528,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3480
3528
|
}),
|
|
3481
3529
|
"aria-label": l
|
|
3482
3530
|
}, {
|
|
3483
|
-
value:
|
|
3531
|
+
value: Q.Cards,
|
|
3484
3532
|
icon: /* @__PURE__ */ J(st, {
|
|
3485
3533
|
size: B.SM,
|
|
3486
3534
|
"aria-hidden": !0,
|
|
@@ -3522,7 +3570,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3522
3570
|
value: t,
|
|
3523
3571
|
onChange: n,
|
|
3524
3572
|
items: E
|
|
3525
|
-
}), p != null && p.length > 0 && /* @__PURE__ */ Y(bt, { children: [/* @__PURE__ */ J("div", { className: P("h-4 w-px shrink-0",
|
|
3573
|
+
}), p != null && p.length > 0 && /* @__PURE__ */ Y(bt, { children: [/* @__PURE__ */ J("div", { className: P("h-4 w-px shrink-0", yi.divider) }), /* @__PURE__ */ J(_e, {
|
|
3526
3574
|
items: k,
|
|
3527
3575
|
label: O,
|
|
3528
3576
|
variant: ve.Primary,
|
|
@@ -3542,7 +3590,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3542
3590
|
placeholder: c,
|
|
3543
3591
|
"aria-label": c
|
|
3544
3592
|
})
|
|
3545
|
-
}), /* @__PURE__ */ J(
|
|
3593
|
+
}), /* @__PURE__ */ J(vi, {
|
|
3546
3594
|
checked: g ?? /* @__PURE__ */ new Set(),
|
|
3547
3595
|
onChange: _ ?? (() => void 0),
|
|
3548
3596
|
values: v,
|
|
@@ -3555,12 +3603,12 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3555
3603
|
})]
|
|
3556
3604
|
})]
|
|
3557
3605
|
});
|
|
3558
|
-
},
|
|
3606
|
+
}, xi = ({ 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 }) => {
|
|
3559
3607
|
let b = { "--cat-browse-divider": r?.colors?.divider };
|
|
3560
3608
|
return /* @__PURE__ */ J("section", {
|
|
3561
|
-
className: P("flex-shrink-0 px-4",
|
|
3609
|
+
className: P("flex-shrink-0 px-4", yi.section, Pt.toolbar),
|
|
3562
3610
|
style: b,
|
|
3563
|
-
children: /* @__PURE__ */ J(
|
|
3611
|
+
children: /* @__PURE__ */ J(bi, {
|
|
3564
3612
|
styles: r,
|
|
3565
3613
|
query: e,
|
|
3566
3614
|
onQueryChange: t,
|
|
@@ -3583,20 +3631,20 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3583
3631
|
...y
|
|
3584
3632
|
})
|
|
3585
3633
|
});
|
|
3586
|
-
},
|
|
3634
|
+
}, Si = {
|
|
3587
3635
|
root: "_root_1h83l_1",
|
|
3588
3636
|
heading: "_heading_1h83l_5",
|
|
3589
3637
|
headingTitle: "_headingTitle_1h83l_9"
|
|
3590
|
-
},
|
|
3638
|
+
}, Ci = "w-[320px]", wi = (e, t) => e.map((e) => ({
|
|
3591
3639
|
...e,
|
|
3592
3640
|
label: typeof e.label == "string" ? /* @__PURE__ */ J(ke, {
|
|
3593
3641
|
text: e.label,
|
|
3594
3642
|
query: t,
|
|
3595
3643
|
maxLines: 1
|
|
3596
3644
|
}) : e.label,
|
|
3597
|
-
children: e.children ?
|
|
3598
|
-
})),
|
|
3599
|
-
let [u, d] = z(null), f = u ? r.find((e) => e.key === u) : void 0, p = f?.children ?? r, m = i ?
|
|
3645
|
+
children: e.children ? wi(e.children, t) : void 0
|
|
3646
|
+
})), Ti = ({ open: e, onClose: t, title: n, options: r, search: i, searchPlaceholder: a, searchClearLabel: o, noResultsLabel: s, backLabel: c, closeLabel: l }) => {
|
|
3647
|
+
let [u, d] = z(null), f = u ? r.find((e) => e.key === u) : void 0, p = f?.children ?? r, m = i ? wi(p, i.value) : p, h = () => {
|
|
3600
3648
|
d(null), t();
|
|
3601
3649
|
}, g = (e, t) => {
|
|
3602
3650
|
if (e.children?.length) {
|
|
@@ -3649,7 +3697,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3649
3697
|
children: s
|
|
3650
3698
|
})]
|
|
3651
3699
|
});
|
|
3652
|
-
},
|
|
3700
|
+
}, Ei = ({ label: e, options: t, onClick: n, search: r, searchPlaceholder: i = "Search", searchClearLabel: a = "Clear search", noResultsLabel: o = "No results found", backLabel: s = "Back", closeLabel: c = "Close" }) => {
|
|
3653
3701
|
let l = R(null), [u, d] = z(!1), f = ae(), p = /* @__PURE__ */ J(Ze, {
|
|
3654
3702
|
size: B.SM,
|
|
3655
3703
|
stroke: V,
|
|
@@ -3664,7 +3712,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3664
3712
|
"aria-haspopup": "dialog",
|
|
3665
3713
|
"aria-expanded": u,
|
|
3666
3714
|
onClick: () => d(!0)
|
|
3667
|
-
}), /* @__PURE__ */ J(
|
|
3715
|
+
}), /* @__PURE__ */ J(Ti, {
|
|
3668
3716
|
open: u,
|
|
3669
3717
|
onClose: () => {
|
|
3670
3718
|
d(!1), r?.onChange("");
|
|
@@ -3680,7 +3728,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3680
3728
|
})] }) : r ? /* @__PURE__ */ J("div", {
|
|
3681
3729
|
ref: l,
|
|
3682
3730
|
children: /* @__PURE__ */ J(Ce, {
|
|
3683
|
-
items: t?.length ?
|
|
3731
|
+
items: t?.length ? wi(t, r.value) : [{
|
|
3684
3732
|
key: "no-results",
|
|
3685
3733
|
type: we.PlainText,
|
|
3686
3734
|
label: /* @__PURE__ */ J("span", {
|
|
@@ -3691,7 +3739,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3691
3739
|
maxDropdownHeight: 344,
|
|
3692
3740
|
placement: "bottom-end",
|
|
3693
3741
|
matchReferenceWidth: !1,
|
|
3694
|
-
listClassName:
|
|
3742
|
+
listClassName: Ci,
|
|
3695
3743
|
menuHeader: /* @__PURE__ */ J("div", {
|
|
3696
3744
|
className: "sticky -top-1 z-10 bg-layer-raised px-2 pb-1 pt-2",
|
|
3697
3745
|
children: /* @__PURE__ */ J(ze, {
|
|
@@ -3731,8 +3779,8 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3731
3779
|
}),
|
|
3732
3780
|
onClick: n
|
|
3733
3781
|
});
|
|
3734
|
-
},
|
|
3735
|
-
let { typography: K } = Pe ?? {}, qe =
|
|
3782
|
+
}, Di = 3, Oi = 300, ki = ({ items: e, tabs: t, topicOptions: n, favorites: r, titles: i, browseHeaderRenderer: a, onToggleFavorite: l, isFavoriteVisible: u, columnVisibility: d, onUseInChat: p, isPrimaryActionVisible: g, onShare: v, isPublishVisible: x, isPublishPrimary: S, getPublishHistory: C, publishFolderItems: w, publishExpandedPaths: T, onPublishExpandedPathsChange: E, publishLoadingPaths: D, hasPublishWriteAccess: O, publishDefaultAuthor: k, onPublish: ee, onPublishSuccess: A, onPublishError: te, onCreatePublishFolder: j, publishLabels: ne, ruleSourceOptions: re, onFetchExistingRules: M, shareOverlay: N, isShareVisible: ie, isSharePrimary: ae, onFetchDetails: oe, renderCredentials: se, onEdit: ce, onDownload: ue, isDownloadVisible: de, isDownloadPrimary: fe, onLoadContentFile: pe, onLoadContentFilePreview: me, renderContentFilePreview: he, renderContentFileTree: ge, onDelete: _e, onUnshare: ve, isUnshareVisible: ye, onRevokeShare: be, onFetchRecipientsCount: xe, isRevokeShareVisible: B, onUnpublish: V, isUnpublishVisible: Se, onLogin: Ce, onLogout: we, onCreateClick: H, createOptions: Te, createSearch: Ee, hideCreateButton: De = !1, hidePageTitle: Oe = !1, isReadonly: ke = !1, initialViewMode: Ae = Q.Grid, isFullWidth: je = !1, selectedItemId: Me, onCardClick: U, isLoading: Ne, styles: Pe, detailsTexts: W, detailsLimitsFooterNote: Fe, initialDetailsItemId: Ie, sortKey: Le, onSortChange: Re, filterTopics: ze, onFilterTopicsChange: Be, isMyAppsActive: Ve, onMyAppsActiveChange: He, activeTab: Ue, onActiveTabChange: Ke, renderEmptyState: G }) => {
|
|
3783
|
+
let { typography: K } = Pe ?? {}, qe = It(Pe), Je = i?.pageTitle ?? "Catalog", Ye = i?.createLabel ?? "Create", Xe = i?.favoritesTitle ?? "Your favorites", Ze = i?.browseTitle ?? "Browse", Qe = i?.searchPlaceholder ?? "Search models, tools, agents…", $e = i?.noResultsTitle ?? ((e) => `No results for "${e}"`), et = i?.featuredLabel ?? "Featured", tt = i?.gridViewLabel ?? "Grid view", nt = i?.listViewLabel ?? "List view", rt = i?.viewToggleLabel ?? "View mode", it = i?.ariaLabel ?? "Catalog", at = i?.sortLabel ?? "Sort", ot = [
|
|
3736
3784
|
{
|
|
3737
3785
|
value: b.RecentlyUpdated,
|
|
3738
3786
|
label: i?.sortRecentlyUpdatedLabel ?? "Recently Updated"
|
|
@@ -3745,7 +3793,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3745
3793
|
value: b.NameAZ,
|
|
3746
3794
|
label: i?.sortNameAZLabel ?? "Name A-Z"
|
|
3747
3795
|
}
|
|
3748
|
-
], [st, ct] = z(""), [lt, ut] = z(Ae), [dt, q] = z(Ae ===
|
|
3796
|
+
], [st, ct] = z(""), [lt, ut] = z(Ae), [dt, q] = z(Ae === Q.Cards ? "shown" : "unmounted"), [ft, pt] = z(b.RecentlyUpdated), [mt, ht] = z(/* @__PURE__ */ new Set()), [gt, _t] = z(!1), vt = Le ?? ft, yt = ze ?? mt, xt = Ve ?? gt, St = F((e) => {
|
|
3749
3797
|
let t = e;
|
|
3750
3798
|
pt(t), Re?.(t);
|
|
3751
3799
|
}, [Re]), Ct = F((e) => {
|
|
@@ -3756,81 +3804,81 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3756
3804
|
t,
|
|
3757
3805
|
Tt,
|
|
3758
3806
|
i?.tabLabels
|
|
3759
|
-
]), Z = Dt[0]?.id ?? "", [Ot,
|
|
3807
|
+
]), Z = Dt[0]?.id ?? "", [Ot, kt] = z(Z);
|
|
3760
3808
|
I(() => {
|
|
3761
|
-
|
|
3809
|
+
kt((e) => e || Z);
|
|
3762
3810
|
}, [Z]);
|
|
3763
|
-
let
|
|
3764
|
-
|
|
3765
|
-
}, [Ke]), [
|
|
3811
|
+
let At = Ue ?? Ot, jt = F((e) => {
|
|
3812
|
+
kt(e), Ke?.(e);
|
|
3813
|
+
}, [Ke]), [Mt, Nt] = z(X.length > 0);
|
|
3766
3814
|
I(() => {
|
|
3767
|
-
X.length > 0 && !
|
|
3768
|
-
}, [X.length,
|
|
3769
|
-
let
|
|
3770
|
-
|
|
3771
|
-
}, []),
|
|
3772
|
-
|
|
3773
|
-
let t = ++
|
|
3815
|
+
X.length > 0 && !Mt && Nt(!0);
|
|
3816
|
+
}, [X.length, Mt]);
|
|
3817
|
+
let Lt = F(() => {
|
|
3818
|
+
Nt(!1);
|
|
3819
|
+
}, []), Rt = Mt && X.length === 0, [zt, Bt] = z(null), [Vt, Ht] = z(!1), [Ut, Wt] = z(void 0), [Gt, Kt] = z(!1), qt = R(null), Jt = R(0), Yt = F(async (e) => {
|
|
3820
|
+
qt.current = e.id;
|
|
3821
|
+
let t = ++Jt.current;
|
|
3774
3822
|
if (oe) {
|
|
3775
|
-
|
|
3823
|
+
Kt(!0);
|
|
3776
3824
|
try {
|
|
3777
3825
|
let n = await oe(e);
|
|
3778
|
-
return
|
|
3826
|
+
return Jt.current === t && Wt(n), n;
|
|
3779
3827
|
} finally {
|
|
3780
|
-
|
|
3828
|
+
Jt.current === t && Kt(!1);
|
|
3781
3829
|
}
|
|
3782
3830
|
}
|
|
3783
|
-
}, [oe]),
|
|
3784
|
-
for (let n = 0; n <
|
|
3785
|
-
if (
|
|
3786
|
-
n <
|
|
3831
|
+
}, [oe]), Xt = F(async (e) => (Bt(e), Wt(void 0), Yt(e)), [Yt]), Zt = F(async (e, t) => {
|
|
3832
|
+
for (let n = 0; n < Di; n++) {
|
|
3833
|
+
if (qt.current !== e.id || t(await Yt(e))) return;
|
|
3834
|
+
n < Di - 1 && await _(Oi);
|
|
3787
3835
|
}
|
|
3788
|
-
}, [
|
|
3836
|
+
}, [Yt]), Qt = R(null);
|
|
3789
3837
|
I(() => {
|
|
3790
3838
|
if (!Ie) {
|
|
3791
|
-
|
|
3839
|
+
Qt.current = null;
|
|
3792
3840
|
return;
|
|
3793
3841
|
}
|
|
3794
|
-
if (
|
|
3842
|
+
if (Qt.current === Ie) return;
|
|
3795
3843
|
let t = e.find((e) => e.id === Ie);
|
|
3796
|
-
t && (
|
|
3844
|
+
t && (Qt.current = Ie, Xt(t));
|
|
3797
3845
|
}, [
|
|
3798
3846
|
Ie,
|
|
3799
3847
|
e,
|
|
3800
|
-
|
|
3848
|
+
Xt
|
|
3801
3849
|
]), I(() => {
|
|
3802
|
-
if (
|
|
3803
|
-
let t = e.find((e) => e.id ===
|
|
3804
|
-
t && t !==
|
|
3805
|
-
}, [e,
|
|
3806
|
-
let
|
|
3807
|
-
await Ce?.(e, t), oe && await
|
|
3850
|
+
if (zt == null) return;
|
|
3851
|
+
let t = e.find((e) => e.id === zt.id);
|
|
3852
|
+
t && t !== zt && Bt(t);
|
|
3853
|
+
}, [e, zt]);
|
|
3854
|
+
let $t = F(async (e, t) => {
|
|
3855
|
+
await Ce?.(e, t), oe && await Zt(e, (e) => m(e?.credentials, t.level));
|
|
3808
3856
|
}, [
|
|
3809
3857
|
Ce,
|
|
3810
3858
|
oe,
|
|
3811
|
-
|
|
3812
|
-
]),
|
|
3813
|
-
await we?.(e, t), oe && await
|
|
3859
|
+
Zt
|
|
3860
|
+
]), en = F(async (e, t) => {
|
|
3861
|
+
await we?.(e, t), oe && await Zt(e, (e) => !m(e?.credentials, t.level));
|
|
3814
3862
|
}, [
|
|
3815
3863
|
we,
|
|
3816
3864
|
oe,
|
|
3817
|
-
|
|
3818
|
-
]),
|
|
3819
|
-
|
|
3820
|
-
|
|
3865
|
+
Zt
|
|
3866
|
+
]), tn = F(() => {
|
|
3867
|
+
Ht(!1), qt.current = null, Jt.current += 1, setTimeout(() => {
|
|
3868
|
+
Bt(null), Wt(void 0), Kt(!1);
|
|
3821
3869
|
}, 300);
|
|
3822
|
-
}, []),
|
|
3823
|
-
if (
|
|
3824
|
-
if (
|
|
3825
|
-
let { credentials: e, ...t } =
|
|
3870
|
+
}, []), nn = L(() => {
|
|
3871
|
+
if (zt == null) return null;
|
|
3872
|
+
if (Ut == null) return zt;
|
|
3873
|
+
let { credentials: e, ...t } = Ut;
|
|
3826
3874
|
return {
|
|
3827
|
-
...
|
|
3875
|
+
...zt,
|
|
3828
3876
|
details: t,
|
|
3829
|
-
credentials: e ??
|
|
3877
|
+
credentials: e ?? zt.credentials
|
|
3830
3878
|
};
|
|
3831
|
-
}, [
|
|
3879
|
+
}, [zt, Ut]), rn = L(() => o(Tt, vt), [Tt, vt]), an = L(() => f(rn, st), [rn, st]), on = L(() => yt.size > 0 ? h(an, yt) : an, [an, yt]), sn = L(() => xt ? s(on) : on, [on, xt]), cn = L(() => At ? sn.filter((e) => e.type === At) : sn, [sn, At]);
|
|
3832
3880
|
I(() => {
|
|
3833
|
-
if (dt !== "unmounted" || Ne ||
|
|
3881
|
+
if (dt !== "unmounted" || Ne || cn.length === 0) return;
|
|
3834
3882
|
let e = () => {
|
|
3835
3883
|
le(() => {
|
|
3836
3884
|
q((e) => e === "unmounted" ? "prepared" : e);
|
|
@@ -3845,17 +3893,17 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3845
3893
|
}, [
|
|
3846
3894
|
dt,
|
|
3847
3895
|
Ne,
|
|
3848
|
-
|
|
3896
|
+
cn.length
|
|
3849
3897
|
]);
|
|
3850
|
-
let
|
|
3898
|
+
let ln = zt != null && X.some((e) => e.id === zt.id);
|
|
3851
3899
|
I(() => {
|
|
3852
|
-
if (
|
|
3853
|
-
let e = requestAnimationFrame(() =>
|
|
3900
|
+
if (zt == null) return;
|
|
3901
|
+
let e = requestAnimationFrame(() => Ht(!0));
|
|
3854
3902
|
return () => cancelAnimationFrame(e);
|
|
3855
|
-
}, [
|
|
3856
|
-
let
|
|
3857
|
-
e ===
|
|
3858
|
-
}, []),
|
|
3903
|
+
}, [zt]);
|
|
3904
|
+
let un = F((e) => {
|
|
3905
|
+
e === Q.Cards && q("shown"), ut(e);
|
|
3906
|
+
}, []), dn = !De && !ke, fn = Mt && !ke, pn = st ? $e(st) : "No items", { copyCodeAriaLabel: hn, copiedCodeStatusLabel: gn, downloadCodeAriaLabel: _n, tableScrollRegionAriaLabel: vn, mathScrollRegionAriaLabel: yn } = W ?? {}, bn = L(() => Ft({
|
|
3859
3907
|
copyCodeAriaLabel: hn,
|
|
3860
3908
|
copiedCodeStatusLabel: gn,
|
|
3861
3909
|
downloadCodeAriaLabel: _n,
|
|
@@ -3868,16 +3916,16 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3868
3916
|
vn,
|
|
3869
3917
|
yn
|
|
3870
3918
|
]), xn = L(() => ({
|
|
3871
|
-
noResultsTitle:
|
|
3919
|
+
noResultsTitle: pn,
|
|
3872
3920
|
featuredLabel: et,
|
|
3873
3921
|
credentialsBadgeLoggedOutLabel: W?.credentialsBadgeLoggedOutLabel
|
|
3874
3922
|
}), [
|
|
3875
|
-
|
|
3923
|
+
pn,
|
|
3876
3924
|
et,
|
|
3877
3925
|
W?.credentialsBadgeLoggedOutLabel
|
|
3878
|
-
]), Sn = !Ne &&
|
|
3926
|
+
]), Sn = !Ne && cn.length === 0 ? G?.({
|
|
3879
3927
|
query: st,
|
|
3880
|
-
activeTab:
|
|
3928
|
+
activeTab: At,
|
|
3881
3929
|
hasTopicFilters: yt.size > 0,
|
|
3882
3930
|
isMyAppsActive: xt
|
|
3883
3931
|
}) : void 0;
|
|
@@ -3886,17 +3934,17 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3886
3934
|
children: /* @__PURE__ */ J(We, {})
|
|
3887
3935
|
}) : /* @__PURE__ */ Y("section", {
|
|
3888
3936
|
"aria-label": it,
|
|
3889
|
-
className: P("flex size-full min-h-0 flex-1 flex-col",
|
|
3937
|
+
className: P("flex size-full min-h-0 flex-1 flex-col", Si.root, Pt.root),
|
|
3890
3938
|
style: qe,
|
|
3891
3939
|
children: [
|
|
3892
|
-
(!Oe ||
|
|
3893
|
-
className: P("shrink-0",
|
|
3940
|
+
(!Oe || dn) && /* @__PURE__ */ J("div", {
|
|
3941
|
+
className: P("shrink-0", Si.heading),
|
|
3894
3942
|
children: /* @__PURE__ */ Y("div", {
|
|
3895
3943
|
className: "flex h-[64px] w-full items-center justify-between px-8",
|
|
3896
3944
|
children: [!Oe && /* @__PURE__ */ J("h1", {
|
|
3897
|
-
className: P(K?.pageHeadingFontClassName ?? "dial-display2-text",
|
|
3945
|
+
className: P(K?.pageHeadingFontClassName ?? "dial-display2-text", Si.headingTitle),
|
|
3898
3946
|
children: Je
|
|
3899
|
-
}),
|
|
3947
|
+
}), dn && /* @__PURE__ */ J(Ei, {
|
|
3900
3948
|
label: Ye,
|
|
3901
3949
|
options: Te,
|
|
3902
3950
|
onClick: H,
|
|
@@ -3912,27 +3960,27 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3912
3960
|
/* @__PURE__ */ Y("div", {
|
|
3913
3961
|
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden",
|
|
3914
3962
|
children: [
|
|
3915
|
-
|
|
3963
|
+
fn && /* @__PURE__ */ J("div", {
|
|
3916
3964
|
className: "w-full px-8",
|
|
3917
|
-
children: /* @__PURE__ */ J(
|
|
3965
|
+
children: /* @__PURE__ */ J(Hr, {
|
|
3918
3966
|
items: X,
|
|
3919
3967
|
totalCount: X.length,
|
|
3920
3968
|
title: Xe,
|
|
3921
3969
|
onToggleFavorite: l,
|
|
3922
3970
|
isFavoriteVisible: u,
|
|
3923
|
-
onItemClick: U ??
|
|
3924
|
-
isLeaving:
|
|
3925
|
-
onExitComplete:
|
|
3971
|
+
onItemClick: U ?? Xt,
|
|
3972
|
+
isLeaving: Rt,
|
|
3973
|
+
onExitComplete: Lt,
|
|
3926
3974
|
selectedItemId: Me,
|
|
3927
3975
|
credentialsBadgeLoggedOutLabel: W?.credentialsBadgeLoggedOutLabel
|
|
3928
3976
|
})
|
|
3929
3977
|
}),
|
|
3930
3978
|
/* @__PURE__ */ J("div", {
|
|
3931
3979
|
className: "w-full px-4 pt-6",
|
|
3932
|
-
children: /* @__PURE__ */ J(
|
|
3933
|
-
totalCount:
|
|
3980
|
+
children: /* @__PURE__ */ J(xi, {
|
|
3981
|
+
totalCount: sn.length,
|
|
3934
3982
|
viewMode: lt,
|
|
3935
|
-
onViewModeChange:
|
|
3983
|
+
onViewModeChange: un,
|
|
3936
3984
|
sortKey: vt,
|
|
3937
3985
|
query: st,
|
|
3938
3986
|
onQueryChange: ct,
|
|
@@ -3961,23 +4009,23 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3961
4009
|
tabs: Dt.map((e) => ({
|
|
3962
4010
|
id: e.id,
|
|
3963
4011
|
label: typeof e.label == "string" ? e.label : String(e.label),
|
|
3964
|
-
count:
|
|
4012
|
+
count: sn.filter((t) => t.type === e.id).length
|
|
3965
4013
|
})),
|
|
3966
|
-
activeTabId:
|
|
3967
|
-
onTabChange:
|
|
4014
|
+
activeTabId: At,
|
|
4015
|
+
onTabChange: jt
|
|
3968
4016
|
})
|
|
3969
4017
|
}),
|
|
3970
4018
|
/* @__PURE__ */ J("div", {
|
|
3971
|
-
className: P(
|
|
4019
|
+
className: P(cn.length > 0 ? ["w-full flex-1 px-8 py-6", !je && "mx-auto max-w-[1180px]"] : "min-h-[180px] flex-1", cn.length === 0 && "px-8 py-6"),
|
|
3972
4020
|
children: Sn ?? /* @__PURE__ */ Y(bt, { children: [/* @__PURE__ */ J("div", {
|
|
3973
|
-
inert: lt !==
|
|
3974
|
-
className: P(
|
|
3975
|
-
children: /* @__PURE__ */ J(
|
|
3976
|
-
items:
|
|
4021
|
+
inert: lt !== Q.Grid,
|
|
4022
|
+
className: P(cn.length > 0 ? "pb-8" : "size-full flex-1", lt !== Q.Grid && "hidden"),
|
|
4023
|
+
children: /* @__PURE__ */ J(mn, {
|
|
4024
|
+
items: cn,
|
|
3977
4025
|
query: st,
|
|
3978
4026
|
onToggleFavorite: l,
|
|
3979
4027
|
isFavoriteVisible: u,
|
|
3980
|
-
onItemClick: U ??
|
|
4028
|
+
onItemClick: U ?? Xt,
|
|
3981
4029
|
titles: xn,
|
|
3982
4030
|
selectedItemId: Me,
|
|
3983
4031
|
isReadonly: ke,
|
|
@@ -3986,18 +4034,18 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
3986
4034
|
markdownLabels: bn
|
|
3987
4035
|
})
|
|
3988
4036
|
}), dt !== "unmounted" && /* @__PURE__ */ J("div", {
|
|
3989
|
-
inert: lt !==
|
|
3990
|
-
className: P("pb-8", lt !==
|
|
3991
|
-
children: /* @__PURE__ */ J(
|
|
3992
|
-
type:
|
|
3993
|
-
items:
|
|
4037
|
+
inert: lt !== Q.Cards,
|
|
4038
|
+
className: P("pb-8", lt !== Q.Cards && (dt === "prepared" ? "invisible h-0 overflow-hidden p-0" : "hidden"), cn.length === 0 && lt === Q.Cards && "h-full"),
|
|
4039
|
+
children: /* @__PURE__ */ J(pi, {
|
|
4040
|
+
type: At,
|
|
4041
|
+
items: cn,
|
|
3994
4042
|
query: st,
|
|
3995
4043
|
ariaLabel: it,
|
|
3996
|
-
emptyStateTitle:
|
|
4044
|
+
emptyStateTitle: pn,
|
|
3997
4045
|
onToggleFavorite: l,
|
|
3998
4046
|
isFavoriteVisible: u,
|
|
3999
4047
|
columnVisibility: d,
|
|
4000
|
-
onItemClick: U ??
|
|
4048
|
+
onItemClick: U ?? Xt,
|
|
4001
4049
|
stickyHeaderTop: 0,
|
|
4002
4050
|
selectedItemId: Me,
|
|
4003
4051
|
credentialsBadgeLoggedOutLabel: W?.credentialsBadgeLoggedOutLabel,
|
|
@@ -4007,14 +4055,14 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4007
4055
|
})
|
|
4008
4056
|
]
|
|
4009
4057
|
}),
|
|
4010
|
-
|
|
4058
|
+
nn != null && /* @__PURE__ */ J(Lr, {
|
|
4011
4059
|
renderCredentials: se,
|
|
4012
|
-
item:
|
|
4013
|
-
isOpen:
|
|
4014
|
-
isStarred:
|
|
4015
|
-
isDetailsLoading:
|
|
4060
|
+
item: nn,
|
|
4061
|
+
isOpen: Vt,
|
|
4062
|
+
isStarred: ln,
|
|
4063
|
+
isDetailsLoading: Gt,
|
|
4016
4064
|
isReadonly: ke,
|
|
4017
|
-
onClose:
|
|
4065
|
+
onClose: tn,
|
|
4018
4066
|
onToggleFavorite: l,
|
|
4019
4067
|
isFavoriteVisible: u,
|
|
4020
4068
|
onUseInChat: p,
|
|
@@ -4055,15 +4103,15 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4055
4103
|
isRevokeShareVisible: B,
|
|
4056
4104
|
onUnpublish: V,
|
|
4057
4105
|
isUnpublishVisible: Se,
|
|
4058
|
-
onLogin:
|
|
4059
|
-
onLogout:
|
|
4106
|
+
onLogin: $t,
|
|
4107
|
+
onLogout: en,
|
|
4060
4108
|
texts: W,
|
|
4061
4109
|
limitsFooterNote: Fe,
|
|
4062
4110
|
styles: { colors: { featuredChipStyle: Pe?.colors?.featuredChipStyle } }
|
|
4063
4111
|
})
|
|
4064
4112
|
]
|
|
4065
4113
|
});
|
|
4066
|
-
},
|
|
4114
|
+
}, Ai = ({ selectedId: e, records: t, selectedLabel: n, placeholder: r, labels: i, onSelect: a, onBrowse: o, extraOptions: s = [], isLoading: c = !1, error: l, isDisabled: u = !1, isInvalid: d = !1, labelledById: f, ariaHasPopup: p = "listbox", className: m, panelClassName: h, iconAfter: g, renderPanel: _, open: v, onOpenChange: y, renderOverlay: b }) => {
|
|
4067
4115
|
let [x, S] = z(!1), C = v ?? x, w = (e) => {
|
|
4068
4116
|
e && u || (v === void 0 && S(e), y?.(e));
|
|
4069
4117
|
}, [T, E] = z(""), D = R(null), O = L(() => [...s, ...t].filter((e) => e.label.toLocaleLowerCase().includes(T.toLocaleLowerCase())), [
|
|
@@ -4163,9 +4211,9 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4163
4211
|
renderOverlay: () => A,
|
|
4164
4212
|
children: te
|
|
4165
4213
|
});
|
|
4166
|
-
},
|
|
4214
|
+
}, ji = ({ service: e, texts: n, onLogin: r, onLogout: i }) => {
|
|
4167
4215
|
let [a, o] = z(!1), [s, c] = z(!1), [l, u] = z(!1), [d, f] = z(), p = e.authenticationType === x.ApiKey, m = p ? n?.deleteActionLabel ?? "Delete" : n?.logoutActionLabel ?? "Log out", h = p ? n?.deleteApiKeyConfirmMessage?.(t.User) ?? "Are you sure you want to delete your personal API key?" : n?.logoutConfirmMessage ?? "Are you sure you want to log out?";
|
|
4168
|
-
return /* @__PURE__ */ Y(
|
|
4216
|
+
return /* @__PURE__ */ Y(zn, {
|
|
4169
4217
|
label: e.name,
|
|
4170
4218
|
description: e.description,
|
|
4171
4219
|
icon: /* @__PURE__ */ J(gt, {
|
|
@@ -4190,7 +4238,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4190
4238
|
errorClassName: "dial-caption-text",
|
|
4191
4239
|
keyCardTitleClassName: "dial-tiny-semi-text",
|
|
4192
4240
|
keyCardDescriptionClassName: "dial-tiny-text",
|
|
4193
|
-
deleteActionClassName:
|
|
4241
|
+
deleteActionClassName: Rn.errorText,
|
|
4194
4242
|
renderLoginOptions: e.canConsentToOfflineUsage ? (e) => /* @__PURE__ */ J(be, {
|
|
4195
4243
|
isSelected: a,
|
|
4196
4244
|
onChange: o,
|
|
@@ -4200,10 +4248,10 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4200
4248
|
}) : void 0,
|
|
4201
4249
|
children: [
|
|
4202
4250
|
e.hint && /* @__PURE__ */ J("p", {
|
|
4203
|
-
className: P("dial-small-text break-words",
|
|
4251
|
+
className: P("dial-small-text break-words", Rn.description),
|
|
4204
4252
|
children: e.hint
|
|
4205
4253
|
}),
|
|
4206
|
-
e.hasSharedCredentials && /* @__PURE__ */ J(
|
|
4254
|
+
e.hasSharedCredentials && /* @__PURE__ */ J(jn, {
|
|
4207
4255
|
icon: /* @__PURE__ */ J(Ye, {
|
|
4208
4256
|
size: B.SM,
|
|
4209
4257
|
"aria-hidden": !0,
|
|
@@ -4217,7 +4265,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4217
4265
|
/* @__PURE__ */ J("p", { children: h }),
|
|
4218
4266
|
d && /* @__PURE__ */ J("p", {
|
|
4219
4267
|
role: "alert",
|
|
4220
|
-
className:
|
|
4268
|
+
className: Rn.errorText,
|
|
4221
4269
|
children: d
|
|
4222
4270
|
}),
|
|
4223
4271
|
/* @__PURE__ */ Y("div", {
|
|
@@ -4251,7 +4299,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4251
4299
|
})
|
|
4252
4300
|
]
|
|
4253
4301
|
});
|
|
4254
|
-
},
|
|
4302
|
+
}, Mi = ({ services: e, isLoading: t = !1, hasError: n = !1, showEmptyState: r = !1, onRetry: i, onLogin: a, onLogout: o, texts: s }) => t && !e.length ? /* @__PURE__ */ J("p", {
|
|
4255
4303
|
role: "status",
|
|
4256
4304
|
className: "px-6 py-3",
|
|
4257
4305
|
children: s?.loading ?? "Loading…"
|
|
@@ -4273,7 +4321,7 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4273
4321
|
children: s?.title ?? "Credentials"
|
|
4274
4322
|
}), /* @__PURE__ */ J("div", {
|
|
4275
4323
|
className: "flex min-w-0 flex-col",
|
|
4276
|
-
children: e.map((e) => /* @__PURE__ */ J(
|
|
4324
|
+
children: e.map((e) => /* @__PURE__ */ J(ji, {
|
|
4277
4325
|
service: e,
|
|
4278
4326
|
texts: s,
|
|
4279
4327
|
onLogin: a,
|
|
@@ -4286,4 +4334,4 @@ var X = /* @__PURE__ */ function(e) {
|
|
|
4286
4334
|
children: s?.empty ?? "No credentials required"
|
|
4287
4335
|
}) : null;
|
|
4288
4336
|
//#endregion
|
|
4289
|
-
export {
|
|
4337
|
+
export { er as AboutTab, Tn as ApiTab, Yt as AppIdentity, Mi as ApplicationCredentials, Pt as CATALOG_CLASS, fn as Card, mn as CardGrid, pn as CardRowRenderer, ki as Catalog, jt as CatalogContentNodeType, Mt as CatalogContentPreviewType, n as CatalogDetailsTab, Et as CatalogLimitStatus, Dt as CatalogPricingUnit, kt as CatalogSelectionMode, b as CatalogSortKey, Q as CatalogViewMode, X as CodeLanguage, ar as ContentTab, C as CredentialStatus, Kn as CredentialsApiKeyOverlay, Zt as CredentialsBadge, i as CredentialsBadgeState, Ln as CredentialsBanner, S as CredentialsBannerState, t as CredentialsLevel, Vn as CredentialsManagementPanel, e as CredentialsUiState, Ai as DeploymentSelectorField, Ot as DeploymentSize, Z as DetailsConfirmationKind, $n as DetailsHeader, Lr as DetailsPanel, zr as FavoriteCard, Hr as Favorites, vi as Filter, At as LimitRowLayout, _r as LimitsTab, pi as ListView, vr as OverviewTab, yr as PricingTab, xi as Toolbar, Tr as ToolsTab, x as ToolsetAuthenticationType, nn as TopicTag, y as buildCatalogTabs, f as filterCatalogItems, a as getCatalogDetailsTabs, p as getCredentialsBadgeState, g as getCredentialsBannerState, u as getCredentialsUiState, r as getSignedInLevel, c as getTopicOptions, o as sortCatalogItems, Nt as useFavColumns, Wt as useScrollVirtualizer };
|