@epam/ai-dial-skill-editor 1.3.0-dev.326 → 1.3.0-dev.331

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.
Files changed (2) hide show
  1. package/index.js +402 -396
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { MARKDOWN_EDITOR_FILL_HEIGHT_CLASS_NAME as e, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as t, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as n, RESIZABLE_TEXTAREA_CLASS_NAME as r, TAG_INPUT_TAG_CLASS_NAME as i, TextRefinementField as a, buildCssVars as o, formatFileSize as s, mergeClasses as c, useAvailableHeightCap as l, useControlErrorAssociation as u, useIsMobile as d, useTextRefinement as f } from "@epam/ai-dial-chat-shared";
2
2
  import { Accordion as p, BottomSheet as m, Breadcrumbs as h, ButtonAppearance as g, ButtonDropdown as _, ButtonVariant as v, CaptionText as y, DIAL_ICON_SIZE as b, DIAL_KIT_ICON_STROKE as x, DangerIconButton as S, DialItemType as C, EditorThemes as w, ElementSize as T, ErrorMessageNotification as E, ErrorText as D, FileDropzone as O, FileName as k, GhostButton as A, GhostIconButton as ee, Input as j, Label as te, LinkButton as ne, LiveRegion as re, LiveRegionElement as ie, LiveRegionPoliteness as M, NeutralButton as ae, NoDataContent as oe, Popup as N, PopupSize as se, PrimaryButton as ce, RadioGroup as le, ResizeHandle as ue, Select as de, Spinner as fe, TagInput as pe, Textarea as me, TextareaResize as he } from "@epam/ai-dial-ui-kit";
3
3
  import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
4
- import { IconArrowNarrowLeft as ge, IconDatabase as _e, IconFileZip as ve, IconFolderPlus as ye, IconPhoto as be, IconPlus as xe, IconTrashX as Se, IconUpload as Ce } from "@tabler/icons-react";
5
- import { Suspense as we, lazy as Te, memo as Ee, useCallback as L, useEffect as De, useId as Oe, useMemo as R, useRef as z, useState as B } from "react";
6
- import { DialFileNodeType as ke, DialFoldersTree as Ae } from "@epam/ai-dial-react-file-manager";
7
- import { LazyMarkdownEditor as je } from "@epam/ai-dial-ui-kit/editors";
4
+ import { IconArrowNarrowLeft as ge, IconDatabase as L, IconFileZip as _e, IconFolderPlus as ve, IconPhoto as ye, IconPlus as be, IconTrashX as xe, IconUpload as Se } from "@tabler/icons-react";
5
+ import { Suspense as Ce, lazy as we, memo as Te, useCallback as R, useEffect as Ee, useId as De, useMemo as z, useRef as B, useState as V } from "react";
6
+ import { DialFileNodeType as Oe, DialFoldersTree as ke } from "@epam/ai-dial-react-file-manager";
7
+ import { LazyMarkdownEditor as Ae } from "@epam/ai-dial-ui-kit/editors";
8
8
  c("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", {
9
9
  body: "_body_1xd7h_2",
10
10
  sideColumn: "_sideColumn_1xd7h_6",
@@ -12,42 +12,42 @@ c("flex flex-col desktop:min-h-0 desktop:overflow-y-auto", {
12
12
  }.sideColumn);
13
13
  //#endregion
14
14
  //#region ../builder-form/src/constants/public-class-names.ts
15
- var V = {
15
+ var H = {
16
16
  layout: "dial-builder-form-layout",
17
17
  section: "dial-builder-form-section",
18
18
  metadataSection: "dial-builder-form-metadata-section",
19
19
  setupSection: "dial-builder-form-setup-section",
20
20
  asideSection: "dial-builder-form-aside-section"
21
- }, Me = {
21
+ }, je = {
22
22
  section: "_section_l1mnx_1",
23
23
  title: "_title_l1mnx_5"
24
- }, Ne = ({ title: e, children: t, styles: n, className: r }) => {
24
+ }, Me = ({ title: e, children: t, styles: n, className: r }) => {
25
25
  let i = o({
26
26
  "--es-border-color": n?.colors?.borderColor,
27
27
  "--es-title-color": n?.colors?.titleColor
28
28
  });
29
29
  return /* @__PURE__ */ I("section", {
30
- className: c("flex h-full flex-col gap-4 rounded border", Me.section, r, V.section),
30
+ className: c("flex h-full flex-col gap-4 rounded border", je.section, r, H.section),
31
31
  style: i,
32
32
  children: [e != null && /* @__PURE__ */ F("h2", {
33
- className: c(n?.typography?.titleClassName ?? "dial-h3-text", Me.title),
33
+ className: c(n?.typography?.titleClassName ?? "dial-h3-text", je.title),
34
34
  children: e
35
35
  }), t]
36
36
  });
37
- }, Pe = (e, { min: t = 280, max: n = 640, containerWidth: r } = {}) => {
37
+ }, Ne = (e, { min: t = 280, max: n = 640, containerWidth: r } = {}) => {
38
38
  let i = r != null && r > 0 ? r - 360 : n;
39
39
  return Math.round(Math.min(Math.max(t, Math.min(n, i)), Math.max(t, Number.isFinite(e) ? e : t)));
40
- }, H = {
40
+ }, U = {
41
41
  headerBorder: "_headerBorder_1adw2_1",
42
42
  footerBorder: "_footerBorder_1adw2_5",
43
43
  columnBorder: "_columnBorder_1adw2_10"
44
- }, Fe = ({ title: e, onBack: t, backAriaLabel: n = "Back", actions: r, leftContent: i, centerContent: a, rightContent: s, resizableLeftColumn: l, isSaving: u = !1, labels: d, styles: f, dir: p }) => {
45
- let m = Oe(), h = u ? d?.savingStatusLabel ?? "Saving" : "", g = z(null), [_, v] = B(), y = l != null && a != null, S = l?.minWidth, C = l?.maxWidth, w = {
44
+ }, Pe = ({ title: e, onBack: t, backAriaLabel: n = "Back", actions: r, leftContent: i, centerContent: a, rightContent: s, resizableLeftColumn: l, isSaving: u = !1, labels: d, styles: f, dir: p }) => {
45
+ let m = De(), h = u ? d?.savingStatusLabel ?? "Saving" : "", g = B(null), [_, v] = V(), y = l != null && a != null, S = l?.minWidth, C = l?.maxWidth, w = {
46
46
  min: S,
47
47
  max: C,
48
48
  containerWidth: _
49
- }, T = y ? Pe(l.width, w) : void 0, E = Pe(C ?? 640, w);
50
- De(() => {
49
+ }, T = y ? Ne(l.width, w) : void 0, E = Ne(C ?? 640, w);
50
+ Ee(() => {
51
51
  let e = g.current;
52
52
  if (!y || e == null || typeof ResizeObserver > "u") return;
53
53
  let t = new ResizeObserver(() => v(e.clientWidth));
@@ -59,7 +59,7 @@ var V = {
59
59
  });
60
60
  return /* @__PURE__ */ I("div", {
61
61
  dir: p,
62
- className: c("flex min-h-0 flex-1 flex-col", V.layout),
62
+ className: c("flex min-h-0 flex-1 flex-col", H.layout),
63
63
  style: D,
64
64
  children: [
65
65
  /* @__PURE__ */ F(re, {
@@ -69,7 +69,7 @@ var V = {
69
69
  children: h
70
70
  }),
71
71
  /* @__PURE__ */ I("div", {
72
- className: c("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pt-3 desktop:pb-3", H.headerBorder),
72
+ className: c("flex items-center justify-between gap-2 border-b px-4 py-2 desktop:px-8 desktop:pt-3 desktop:pb-3", U.headerBorder),
73
73
  children: [/* @__PURE__ */ I("div", {
74
74
  className: "flex min-w-0 flex-1 items-center gap-2",
75
75
  children: [/* @__PURE__ */ F(ee, {
@@ -95,7 +95,7 @@ var V = {
95
95
  className: "flex flex-1 flex-col overflow-y-auto desktop:flex-row desktop:overflow-hidden",
96
96
  children: [
97
97
  /* @__PURE__ */ F("div", {
98
- className: c(a == null ? "desktop:flex-1" : "desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", a != null && !y && "desktop:w-[400px]", y && "desktop:relative desktop:w-(--el-left-width)", "desktop:overflow-y-auto", a == null ? void 0 : H.columnBorder),
98
+ className: c(a == null ? "desktop:flex-1" : "desktop:shrink-0 desktop:overflow-y-auto desktop:border-e", a != null && !y && "desktop:w-[400px]", y && "desktop:relative desktop:w-(--el-left-width)", "desktop:overflow-y-auto", a == null ? void 0 : U.columnBorder),
99
99
  style: T == null ? void 0 : { "--el-left-width": `${T}px` },
100
100
  children: i
101
101
  }),
@@ -116,22 +116,22 @@ var V = {
116
116
  children: a
117
117
  }),
118
118
  s != null && /* @__PURE__ */ F("div", {
119
- className: c("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s", H.columnBorder),
119
+ className: c("desktop:w-[400px] desktop:shrink-0 desktop:overflow-y-auto desktop:border-s", U.columnBorder),
120
120
  children: s
121
121
  })
122
122
  ]
123
123
  }),
124
124
  r != null && /* @__PURE__ */ F("div", {
125
- className: c("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 *:flex-1 desktop:hidden", H.footerBorder),
125
+ className: c("flex shrink-0 flex-row-reverse items-center gap-2 border-t px-4 py-2 *:flex-1 desktop:hidden", U.footerBorder),
126
126
  children: r
127
127
  })
128
128
  ]
129
129
  });
130
- }, Ie = {
130
+ }, Fe = {
131
131
  box: "_box_c9as8_1",
132
132
  icon: "_icon_c9as8_6",
133
133
  caption: "_caption_c9as8_10"
134
- }, Le = ({ label: e, avatarUrl: t, avatarAlt: n = "", addAvatarLabel: r = "Add avatar", captionText: i = "PNG, JPG or SVG (max 1 MB)", onAddAvatarClick: a, captionClassName: s = "dial-tiny-text", styles: l, className: u }) => {
134
+ }, Ie = ({ label: e, avatarUrl: t, avatarAlt: n = "", addAvatarLabel: r = "Add avatar", captionText: i = "PNG, JPG or SVG (max 1 MB)", onAddAvatarClick: a, captionClassName: s = "dial-tiny-text", styles: l, className: u }) => {
135
135
  let d = o({
136
136
  "--aa-box-bg": l?.colors?.boxBackgroundColor,
137
137
  "--aa-box-border": l?.colors?.boxBorderColor,
@@ -144,22 +144,22 @@ var V = {
144
144
  children: [/* @__PURE__ */ F(te, { label: e }), /* @__PURE__ */ I("div", {
145
145
  className: "flex items-start gap-3",
146
146
  children: [/* @__PURE__ */ F("div", {
147
- className: c("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", Ie.box),
147
+ className: c("flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-lg border", Fe.box),
148
148
  children: t ? /* @__PURE__ */ F("img", {
149
149
  src: t,
150
150
  alt: n,
151
151
  className: "h-16 w-16 object-cover"
152
- }) : /* @__PURE__ */ F(be, {
152
+ }) : /* @__PURE__ */ F(ye, {
153
153
  size: b.LG,
154
154
  stroke: x,
155
155
  "aria-hidden": !0,
156
- className: Ie.icon
156
+ className: Fe.icon
157
157
  })
158
158
  }), /* @__PURE__ */ I("div", {
159
159
  className: "flex flex-col gap-3",
160
160
  children: [/* @__PURE__ */ F(A, {
161
161
  size: T.Small,
162
- iconBefore: /* @__PURE__ */ F(xe, {
162
+ iconBefore: /* @__PURE__ */ F(be, {
163
163
  size: b.SM,
164
164
  stroke: x,
165
165
  "aria-hidden": !0
@@ -168,29 +168,29 @@ var V = {
168
168
  label: r,
169
169
  onClick: a
170
170
  }), /* @__PURE__ */ F("span", {
171
- className: c(s, Ie.caption),
171
+ className: c(s, Fe.caption),
172
172
  children: i
173
173
  })]
174
174
  })]
175
175
  })]
176
176
  });
177
- }, Re = {
177
+ }, Le = {
178
178
  confirmText: "_confirmText_19ec1_1",
179
179
  confirmItem: "_confirmItem_19ec1_5"
180
- }, ze = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: s, labels: l, confirmBodyClassName: u = "dial-small-text", styles: d }) => {
181
- let f = d?.colors?.confirmText, p = d?.colors?.confirmItemText, m = L((e) => e.length === 1 ? l.deleteConfirmTitleSingle : l.deleteConfirmTitleMultiple, [l.deleteConfirmTitleSingle, l.deleteConfirmTitleMultiple]), h = L((e) => /* @__PURE__ */ F("div", {
180
+ }, Re = ({ isOpen: e, onClose: t, onAttach: n, bucket: r, FileManagerModal: i, allowedMimeTypes: a, maxFileSizeBytes: s, labels: l, confirmBodyClassName: u = "dial-small-text", styles: d }) => {
181
+ let f = d?.colors?.confirmText, p = d?.colors?.confirmItemText, m = R((e) => e.length === 1 ? l.deleteConfirmTitleSingle : l.deleteConfirmTitleMultiple, [l.deleteConfirmTitleSingle, l.deleteConfirmTitleMultiple]), h = R((e) => /* @__PURE__ */ F("div", {
182
182
  className: c(u, "px-6 py-3"),
183
183
  style: o({
184
184
  "--apm-confirm-text": f,
185
185
  "--apm-confirm-item-text": p
186
186
  }),
187
187
  children: /* @__PURE__ */ F("p", {
188
- className: c("mb-3", Re.confirmText),
188
+ className: c("mb-3", Le.confirmText),
189
189
  children: e.length === 1 ? /* @__PURE__ */ I(P, { children: [
190
190
  l.deleteConfirmSingleText,
191
191
  " ",
192
192
  /* @__PURE__ */ I("span", {
193
- className: c("wrap-break-word", Re.confirmItem),
193
+ className: c("wrap-break-word", Le.confirmItem),
194
194
  children: [
195
195
  "\"",
196
196
  e[0].split("/").pop(),
@@ -201,7 +201,7 @@ var V = {
201
201
  l.deleteConfirmMultipleText,
202
202
  " ",
203
203
  /* @__PURE__ */ I("span", {
204
- className: Re.confirmItem,
204
+ className: Le.confirmItem,
205
205
  children: [
206
206
  e.length,
207
207
  " ",
@@ -218,7 +218,7 @@ var V = {
218
218
  p,
219
219
  u
220
220
  ]);
221
- return /* @__PURE__ */ F(we, {
221
+ return /* @__PURE__ */ F(Ce, {
222
222
  fallback: null,
223
223
  children: e && /* @__PURE__ */ F(i, {
224
224
  isOpen: e,
@@ -251,30 +251,30 @@ var V = {
251
251
  deleteCancelLabel: l.deleteCancelLabel
252
252
  })
253
253
  });
254
- }, U = /* @__PURE__ */ function(e) {
254
+ }, W = /* @__PURE__ */ function(e) {
255
255
  return e.Avatar = "avatar", e.Name = "name", e.Version = "version", e.Description = "description", e.Locales = "locales", e.Tags = "tags", e;
256
- }({}), Be = [
256
+ }({}), ze = [
257
257
  "avatar",
258
258
  "name",
259
259
  "version",
260
260
  "description",
261
261
  "locales",
262
262
  "tags"
263
- ], Ve = {
263
+ ], Be = {
264
264
  summary: "_summary_1hlc9_1",
265
265
  rowLabel: "_rowLabel_1hlc9_5"
266
- }, He = (e, t, n) => ({
266
+ }, Ve = (e, t, n) => ({
267
267
  id: e,
268
268
  language: n.find((e) => !t.has(e.code))?.code ?? "",
269
269
  name: "",
270
270
  description: ""
271
- }), Ue = (e) => e.toUpperCase(), We = ({ value: e, onChange: t, availableLocaleOptions: n = [], formatLocaleLabel: i = Ue, labels: a, className: s, summaryClassName: l = "dial-body-text", rowLabelClassName: u = "dial-tiny-lead-text", colors: d }) => {
271
+ }), He = (e) => e.toUpperCase(), Ue = ({ value: e, onChange: t, availableLocaleOptions: n = [], formatLocaleLabel: i = He, labels: a, className: s, summaryClassName: l = "dial-body-text", rowLabelClassName: u = "dial-tiny-lead-text", colors: d }) => {
272
272
  let f = o({
273
273
  "--dlf-summary-text": d?.summaryText,
274
274
  "--dlf-row-label-text": d?.rowLabelText
275
- }), { summaryLabel: p, addLabel: m, editLabel: h, popupTitle: _, addLocaleLabel: y, localeRowLabel: C = "Locale", languageLabel: w, nameLabel: E, namePlaceholder: D, descriptionLabel: O, descriptionPlaceholder: k, deleteAriaLabel: A, cancelLabel: ee = "Cancel", saveLabel: te = "Save" } = a, [re, ie] = B(!1), [M, ae] = B([]), oe = z(0);
276
- De(() => {
277
- re && ae(e.length > 0 ? e : [He(`locale-row-${++oe.current}`, /* @__PURE__ */ new Set(), n)]);
275
+ }), { summaryLabel: p, addLabel: m, editLabel: h, popupTitle: _, addLocaleLabel: y, localeRowLabel: C = "Locale", languageLabel: w, nameLabel: E, namePlaceholder: D, descriptionLabel: O, descriptionPlaceholder: k, deleteAriaLabel: A, cancelLabel: ee = "Cancel", saveLabel: te = "Save" } = a, [re, ie] = V(!1), [M, ae] = V([]), oe = B(0);
276
+ Ee(() => {
277
+ re && ae(e.length > 0 ? e : [Ve(`locale-row-${++oe.current}`, /* @__PURE__ */ new Set(), n)]);
278
278
  }, [
279
279
  re,
280
280
  e,
@@ -284,7 +284,7 @@ var V = {
284
284
  t(M.filter((e) => e.language && e.name)), ie(!1);
285
285
  }, ue = () => {
286
286
  let e = new Set(M.map((e) => e.language).filter(Boolean));
287
- ae((t) => [...t, He(`locale-row-${++oe.current}`, e, n)]);
287
+ ae((t) => [...t, Ve(`locale-row-${++oe.current}`, e, n)]);
288
288
  }, fe = (e, t) => {
289
289
  ae((n) => n.map((n) => n.id === e ? {
290
290
  ...n,
@@ -292,7 +292,7 @@ var V = {
292
292
  } : n));
293
293
  }, pe = (e) => {
294
294
  ae((t) => t.filter((t) => t.id !== e));
295
- }, P = new Set(n.map((e) => e.code)), ge = (e) => e !== "" && !P.has(e), _e = e.some((e) => ge(e.language)), ve = new Set(M.map((e) => e.language).filter((e) => P.has(e))).size, ye = (t, r) => {
295
+ }, P = new Set(n.map((e) => e.code)), ge = (e) => e !== "" && !P.has(e), L = e.some((e) => ge(e.language)), _e = new Set(M.map((e) => e.language).filter((e) => P.has(e))).size, ve = (t, r) => {
296
296
  let a = e.find((e) => e.id === t.id)?.language, o = [...new Set([a ?? "", t.language].filter(ge))];
297
297
  return [...n.map((e) => ({
298
298
  value: e.code,
@@ -303,18 +303,18 @@ var V = {
303
303
  label: i(e),
304
304
  disabled: r.has(e)
305
305
  }))];
306
- }, be = M.some((e) => !e.language || !e.name);
307
- return n.length === 0 && !_e ? null : /* @__PURE__ */ I("div", {
306
+ }, ye = M.some((e) => !e.language || !e.name);
307
+ return n.length === 0 && !L ? null : /* @__PURE__ */ I("div", {
308
308
  className: c("flex items-center gap-2", s),
309
309
  style: f,
310
310
  children: [
311
311
  e.length > 0 && /* @__PURE__ */ F("span", {
312
- className: c(Ve.summary, l),
312
+ className: c(Be.summary, l),
313
313
  children: `${p}: ${e.map((e) => `[${e.language.toUpperCase()}]`).join(", ")}`
314
314
  }),
315
315
  /* @__PURE__ */ F(ne, {
316
316
  label: e.length > 0 ? h : m,
317
- iconBefore: /* @__PURE__ */ F(xe, {
317
+ iconBefore: /* @__PURE__ */ F(be, {
318
318
  size: b.SM,
319
319
  "aria-hidden": !0,
320
320
  stroke: x
@@ -332,7 +332,7 @@ var V = {
332
332
  }, {
333
333
  label: te,
334
334
  variant: v.Primary,
335
- disabled: be,
335
+ disabled: ye,
336
336
  onClick: le
337
337
  }],
338
338
  children: /* @__PURE__ */ I("div", {
@@ -345,7 +345,7 @@ var V = {
345
345
  children: [/* @__PURE__ */ I("div", {
346
346
  className: "flex items-center justify-between",
347
347
  children: [/* @__PURE__ */ I("span", {
348
- className: c(Ve.rowLabel, u),
348
+ className: c(Be.rowLabel, u),
349
349
  children: [
350
350
  C,
351
351
  " ",
@@ -354,7 +354,7 @@ var V = {
354
354
  }), /* @__PURE__ */ F(S, {
355
355
  appearance: g.Ghost,
356
356
  size: T.Small,
357
- icon: /* @__PURE__ */ F(Se, {
357
+ icon: /* @__PURE__ */ F(xe, {
358
358
  size: b.SM,
359
359
  "aria-hidden": !0,
360
360
  stroke: x
@@ -375,7 +375,7 @@ var V = {
375
375
  required: !0
376
376
  },
377
377
  className: "desktop:shrink-0 desktop:basis-40",
378
- options: ye(e, n),
378
+ options: ve(e, n),
379
379
  value: e.language,
380
380
  onChange: (t) => fe(e.id, { language: t })
381
381
  }), /* @__PURE__ */ F(j, {
@@ -403,48 +403,48 @@ var V = {
403
403
  }, e.id);
404
404
  }), /* @__PURE__ */ F(ne, {
405
405
  label: y,
406
- iconBefore: /* @__PURE__ */ F(xe, {
406
+ iconBefore: /* @__PURE__ */ F(be, {
407
407
  size: b.SM,
408
408
  "aria-hidden": !0,
409
409
  stroke: x
410
410
  }),
411
411
  className: "self-start",
412
412
  onClick: ue,
413
- disabled: ve >= n.length
413
+ disabled: _e >= n.length
414
414
  })]
415
415
  })
416
416
  })
417
417
  ]
418
418
  });
419
- }, Ge = "Add tags, comma separated", Ke = "deployment-creation-form-description", qe = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], formatLocaleLabel: p, fields: m = Be, isNameReadOnly: h = !1, nameReadOnlyTooltip: g, nameCaption: _, isDescriptionRequired: v = !1, descriptionCaption: y, renderDescription: b, focusRequestKey: x }) => {
420
- let S = z(null), C = z(null), w = z(null), T = z(!1), E = (e) => m.includes(e), D = E(U.Name), O = E(U.Version), k = !!(t.name || t.version || t.description), A = z(x);
421
- De(() => {
419
+ }, We = "Add tags, comma separated", Ge = "The version is changed with \"Save as new version\"", Ke = "deployment-creation-form-description", qe = ({ values: e, errors: t, onChange: n, onNameBlur: a, onVersionBlur: o, iconPreviewUrl: s, onAddAvatarClick: l, labels: u, styles: d, availableLocaleOptions: f = [], formatLocaleLabel: p, fields: m = ze, isNameReadOnly: h = !1, nameReadOnlyTooltip: g, isVersionReadOnly: _ = !1, versionReadOnlyTooltip: v = Ge, nameCaption: y, isDescriptionRequired: b = !1, descriptionCaption: x, renderDescription: S, focusRequestKey: C }) => {
420
+ let w = B(null), T = B(null), E = B(null), D = B(!1), O = (e) => m.includes(e), k = O(W.Name), A = O(W.Version), ee = !!(t.name || t.version || t.description), te = B(C);
421
+ Ee(() => {
422
422
  let e = () => {
423
- t.name ? S.current?.focus() : t.version ? C.current?.focus() : t.description && w.current?.focus();
423
+ t.name ? w.current?.focus() : t.version ? T.current?.focus() : t.description && E.current?.focus();
424
424
  };
425
- x === void 0 ? (k && !T.current && e(), T.current = k) : x !== A.current && (A.current = x, e());
425
+ C === void 0 ? (ee && !D.current && e(), D.current = ee) : C !== te.current && (te.current = C, e());
426
426
  }, [
427
- x,
428
- k,
427
+ C,
428
+ ee,
429
429
  t.name,
430
430
  t.version,
431
431
  t.description
432
432
  ]);
433
- let ee = /* @__PURE__ */ F(me, {
433
+ let ne = /* @__PURE__ */ F(me, {
434
434
  id: Ke,
435
- ref: w,
435
+ ref: E,
436
436
  value: e.description,
437
437
  onChange: (e) => n({ description: e }),
438
- "aria-required": v || void 0,
439
- labelProps: b ? void 0 : {
438
+ "aria-required": b || void 0,
439
+ labelProps: S ? void 0 : {
440
440
  label: u.description.label,
441
- required: v
441
+ required: b
442
442
  },
443
443
  placeholder: u.description.placeholder,
444
- caption: y,
444
+ caption: x,
445
445
  error: t.description || void 0,
446
446
  invalid: !!t.description,
447
- containerClassName: b ? void 0 : d?.field,
447
+ containerClassName: S ? void 0 : d?.field,
448
448
  className: r,
449
449
  resize: he.Vertical
450
450
  });
@@ -453,7 +453,7 @@ var V = {
453
453
  "aria-label": u.ariaLabel,
454
454
  className: c("flex flex-col gap-4", d?.root),
455
455
  children: [
456
- E(U.Avatar) && /* @__PURE__ */ F(Le, {
456
+ O(W.Avatar) && /* @__PURE__ */ F(Ie, {
457
457
  label: u.iconUrl.label,
458
458
  avatarUrl: s,
459
459
  addAvatarLabel: u.iconUrl.addAvatarLabel,
@@ -461,11 +461,11 @@ var V = {
461
461
  onAddAvatarClick: l,
462
462
  className: d?.field
463
463
  }),
464
- (D || O) && /* @__PURE__ */ I("div", {
464
+ (k || A) && /* @__PURE__ */ I("div", {
465
465
  className: c("flex items-start gap-4", d?.field),
466
- children: [D && /* @__PURE__ */ F(j, {
466
+ children: [k && /* @__PURE__ */ F(j, {
467
467
  id: "deployment-creation-form-name",
468
- inputRef: S,
468
+ inputRef: w,
469
469
  value: e.name,
470
470
  onChange: (e) => n({ name: e ?? "" }),
471
471
  onBlur: a,
@@ -476,28 +476,32 @@ var V = {
476
476
  required: !0
477
477
  },
478
478
  placeholder: u.name.placeholder,
479
- caption: _,
479
+ caption: y,
480
480
  error: t.name || void 0,
481
481
  invalid: !!t.name,
482
- containerClassName: O ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
483
- }), O && /* @__PURE__ */ F(j, {
482
+ containerClassName: A ? "min-w-0 basis-0 grow-[2]" : "min-w-0 flex-1"
483
+ }), A && /* @__PURE__ */ F(j, {
484
484
  id: "deployment-creation-form-version",
485
- inputRef: C,
485
+ inputRef: T,
486
486
  value: e.version,
487
- onChange: (e) => n({ version: e ?? "" }),
488
- onBlur: o,
487
+ onChange: (e) => {
488
+ _ || n({ version: e ?? "" });
489
+ },
490
+ onBlur: _ ? void 0 : o,
491
+ readOnly: _,
492
+ tooltipText: _ ? v : void 0,
489
493
  labelProps: { label: u.version.label },
490
494
  placeholder: u.version.placeholder,
491
495
  error: t.version || void 0,
492
496
  invalid: !!t.version,
493
- containerClassName: D ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
497
+ containerClassName: k ? "min-w-0 basis-0 grow-[1]" : "min-w-0 flex-1"
494
498
  })]
495
499
  }),
496
- E(U.Description) && (b ? /* @__PURE__ */ F("div", {
500
+ O(W.Description) && (S ? /* @__PURE__ */ F("div", {
497
501
  className: d?.field,
498
- children: b(ee, Ke)
499
- }) : ee),
500
- E(U.Locales) && /* @__PURE__ */ F(We, {
502
+ children: S(ne, Ke)
503
+ }) : ne),
504
+ O(W.Locales) && /* @__PURE__ */ F(Ue, {
501
505
  value: e.otherLocales,
502
506
  onChange: (e) => n({ otherLocales: e }),
503
507
  availableLocaleOptions: f,
@@ -506,12 +510,12 @@ var V = {
506
510
  className: d?.field,
507
511
  colors: d?.localesColors
508
512
  }),
509
- E(U.Tags) && /* @__PURE__ */ F("div", {
513
+ O(W.Tags) && /* @__PURE__ */ F("div", {
510
514
  className: d?.field,
511
515
  children: /* @__PURE__ */ F(pe, {
512
516
  id: "deployment-creation-form-topics",
513
517
  labelProps: { label: u.topics.label },
514
- placeholder: u.topics.placeholder ?? Ge,
518
+ placeholder: u.topics.placeholder ?? We,
515
519
  value: e.topics,
516
520
  onChange: (e) => n({ topics: e }),
517
521
  tagClassName: i
@@ -519,13 +523,13 @@ var V = {
519
523
  })
520
524
  ]
521
525
  });
522
- }, Je = "border-0 p-4 desktop:p-8", Ye = "border-0", Xe = "desktop:flex-1", Ze = "px-4 pt-4 desktop:px-6 desktop:pt-6", Qe = Ee(({ title: e, onBack: t, onCancel: n, onSubmit: r, submitLabel: i, isSubmitting: a = !1, isSubmitDisabled: o = !1, extraActions: s, hideStandardActions: l = !1, metadata: u, metadataTitle: d, metadataFooter: f, setup: p, setupTitle: m, asideData: h, asideTitle: g, asideSectionClassName: _, alert: v, resizableLeftColumn: y, metadataSectionClassName: b, setupSectionClassName: x, hasSetupSectionPadding: S = !0, labels: C, styles: w, dir: T }) => {
526
+ }, Je = "border-0 p-4 desktop:p-8", Ye = "border-0", Xe = "desktop:flex-1", Ze = "px-4 pt-4 desktop:px-6 desktop:pt-6", Qe = Te(({ title: e, onBack: t, onCancel: n, onSubmit: r, submitLabel: i, isSubmitting: a = !1, isSubmitDisabled: o = !1, extraActions: s, hideStandardActions: l = !1, metadata: u, metadataTitle: d, metadataFooter: f, setup: p, setupTitle: m, asideData: h, asideTitle: g, asideSectionClassName: _, alert: v, resizableLeftColumn: y, metadataSectionClassName: b, setupSectionClassName: x, hasSetupSectionPadding: S = !0, labels: C, styles: w, dir: T }) => {
523
527
  let E = /* @__PURE__ */ F(re, {
524
528
  politeness: M.Assertive,
525
529
  className: v == null ? void 0 : Ze,
526
530
  children: v
527
531
  }), D = p != null;
528
- return /* @__PURE__ */ F(Fe, {
532
+ return /* @__PURE__ */ F(Pe, {
529
533
  title: e,
530
534
  onBack: t,
531
535
  backAriaLabel: C?.backAriaLabel ?? "Back",
@@ -536,10 +540,10 @@ var V = {
536
540
  resizeHandleLabel: C?.resizeHandleLabel,
537
541
  resizeHandleTooltip: C?.resizeHandleTooltip
538
542
  },
539
- rightContent: h == null ? void 0 : /* @__PURE__ */ F(Ne, {
543
+ rightContent: h == null ? void 0 : /* @__PURE__ */ F(Me, {
540
544
  title: g,
541
545
  styles: w?.section,
542
- className: c(Je, _, V.asideSection),
546
+ className: c(Je, _, H.asideSection),
543
547
  children: h
544
548
  }),
545
549
  styles: w?.layout,
@@ -555,18 +559,18 @@ var V = {
555
559
  })] })] }),
556
560
  leftContent: /* @__PURE__ */ I(P, { children: [
557
561
  !D && E,
558
- /* @__PURE__ */ F(Ne, {
562
+ /* @__PURE__ */ F(Me, {
559
563
  title: d === null ? void 0 : d ?? C?.metadataTitle ?? "Metadata",
560
564
  styles: w?.section,
561
- className: c(Je, b, V.metadataSection),
565
+ className: c(Je, b, H.metadataSection),
562
566
  children: u
563
567
  }),
564
568
  f
565
569
  ] }),
566
- centerContent: D ? /* @__PURE__ */ I(P, { children: [E, /* @__PURE__ */ F(Ne, {
570
+ centerContent: D ? /* @__PURE__ */ I(P, { children: [E, /* @__PURE__ */ F(Me, {
567
571
  title: m === null ? void 0 : m ?? C?.setupTitle ?? "Setup",
568
572
  styles: w?.section,
569
- className: c(S ? Je : Ye, Xe, x, V.setupSection),
573
+ className: c(S ? Je : Ye, Xe, x, H.setupSection),
570
574
  children: p
571
575
  })] }) : void 0
572
576
  });
@@ -633,57 +637,59 @@ var V = {
633
637
  deleteConfirmItemsLabel: "items?",
634
638
  deleteConfirmLabel: "Delete",
635
639
  deleteCancelLabel: "Cancel"
636
- }, tt = Ee(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, formatLocaleLabel: s, fields: c = Be, isNameReadOnly: l, nameReadOnlyTooltip: u, nameCaption: d, isDescriptionRequired: f, descriptionCaption: p, renderDescription: m, focusRequestKey: h, labels: g }) => {
637
- let [_, v] = B(!1), y = R(() => a ? c : c.filter((e) => e !== U.Avatar), [a, c]), b = e.iconUrl, x = a?.resolveIconUrl, S = R(() => x ? x(b) : void 0, [b, x]), C = L(() => v(!0), []), w = L(() => v(!1), []), T = a?.resolveAttachedIconUrl, E = L((e) => {
638
- let t = T?.(e);
639
- t && n({ iconUrl: t }), v(!1);
640
- }, [n, T]);
640
+ }, tt = Te(({ values: e, errors: t, onChange: n, onNameBlur: r, onVersionBlur: i, avatarPicker: a, availableLocaleOptions: o, formatLocaleLabel: s, fields: c = ze, isNameReadOnly: l, nameReadOnlyTooltip: u, isVersionReadOnly: d, versionReadOnlyTooltip: f, nameCaption: p, isDescriptionRequired: m, descriptionCaption: h, renderDescription: g, focusRequestKey: _, labels: v }) => {
641
+ let [y, b] = V(!1), x = z(() => a ? c : c.filter((e) => e !== W.Avatar), [a, c]), S = e.iconUrl, C = a?.resolveIconUrl, w = z(() => C ? C(S) : void 0, [S, C]), T = R(() => b(!0), []), E = R(() => b(!1), []), D = a?.resolveAttachedIconUrl, O = R((e) => {
642
+ let t = D?.(e);
643
+ t && n({ iconUrl: t }), b(!1);
644
+ }, [n, D]);
641
645
  return /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(qe, {
642
646
  values: e,
643
647
  errors: t,
644
648
  onChange: n,
645
649
  onNameBlur: r,
646
650
  onVersionBlur: i,
647
- iconPreviewUrl: S,
648
- onAddAvatarClick: C,
649
- labels: g?.form ?? $e,
651
+ iconPreviewUrl: w,
652
+ onAddAvatarClick: T,
653
+ labels: v?.form ?? $e,
650
654
  availableLocaleOptions: o,
651
655
  formatLocaleLabel: s,
652
- fields: y,
656
+ fields: x,
653
657
  isNameReadOnly: l,
654
658
  nameReadOnlyTooltip: u,
655
- nameCaption: d,
656
- isDescriptionRequired: f,
657
- descriptionCaption: p,
658
- renderDescription: m,
659
- focusRequestKey: h
660
- }), a && /* @__PURE__ */ F(ze, {
661
- isOpen: _,
662
- onClose: w,
663
- onAttach: E,
659
+ isVersionReadOnly: d,
660
+ versionReadOnlyTooltip: f,
661
+ nameCaption: p,
662
+ isDescriptionRequired: m,
663
+ descriptionCaption: h,
664
+ renderDescription: g,
665
+ focusRequestKey: _
666
+ }), a && /* @__PURE__ */ F(Re, {
667
+ isOpen: y,
668
+ onClose: E,
669
+ onAttach: O,
664
670
  bucket: a.bucket,
665
671
  FileManagerModal: a.FileManagerModal,
666
672
  allowedMimeTypes: a.allowedMimeTypes,
667
673
  maxFileSizeBytes: a.maxFileSizeBytes,
668
- labels: g?.avatarPicker ?? et
674
+ labels: v?.avatarPicker ?? et
669
675
  })] });
670
- }), nt = /* @__PURE__ */ function(e) {
676
+ }), G = /* @__PURE__ */ function(e) {
671
677
  return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e.ControlCharacters = "control-characters", e;
672
678
  }({});
673
- nt.TooLong, nt.ControlCharacters;
679
+ G.TooLong, G.ControlCharacters;
674
680
  //#endregion
675
681
  //#region src/constants/public-class-names.ts
676
- var rt = {
682
+ var nt = {
677
683
  root: "dial-skill-editor-root",
678
684
  refineFeedback: "dial-skill-editor-refine-feedback"
679
- }, W = "SKILL.md", G = /* @__PURE__ */ function(e) {
685
+ }, K = "SKILL.md", q = /* @__PURE__ */ function(e) {
680
686
  return e.File = "file", e.Folder = "folder", e;
681
- }({}), it = /* @__PURE__ */ function(e) {
687
+ }({}), rt = /* @__PURE__ */ function(e) {
682
688
  return e.Header = "header", e.Child = "child", e;
683
- }({}), K = (e) => {
689
+ }({}), J = (e) => {
684
690
  let t = e.lastIndexOf("/");
685
691
  return t === -1 ? null : e.slice(0, t);
686
- }, q = (e) => {
692
+ }, it = (e) => {
687
693
  let t = e.lastIndexOf("/");
688
694
  return t === -1 ? e : e.slice(t + 1);
689
695
  }, at = (e) => {
@@ -692,24 +698,24 @@ var rt = {
692
698
  if (n) return n;
693
699
  let r = {
694
700
  path: e,
695
- name: q(e),
696
- nodeType: ke.FOLDER,
697
- parentPath: K(e),
701
+ name: it(e),
702
+ nodeType: Oe.FOLDER,
703
+ parentPath: J(e),
698
704
  folderId: e,
699
705
  items: []
700
706
  };
701
707
  return t.set(e, r), r;
702
708
  };
703
- for (let r of e) r.kind === G.Folder ? n(r.path).name = r.name : t.set(r.path, {
709
+ for (let r of e) r.kind === q.Folder ? n(r.path).name = r.name : t.set(r.path, {
704
710
  path: r.path,
705
711
  name: r.name,
706
- nodeType: ke.ITEM,
707
- parentPath: K(r.path),
708
- folderId: K(r.path) ?? ""
712
+ nodeType: Oe.ITEM,
713
+ parentPath: J(r.path),
714
+ folderId: J(r.path) ?? ""
709
715
  });
710
716
  for (let t of [...e]) {
711
- let e = K(t.path);
712
- for (; e != null;) n(e), e = K(e);
717
+ let e = J(t.path);
718
+ for (; e != null;) n(e), e = J(e);
713
719
  }
714
720
  let r = [];
715
721
  for (let e of t.values()) {
@@ -728,8 +734,8 @@ var rt = {
728
734
  }, ct = (e, t) => {
729
735
  if (!t) return "";
730
736
  switch (e) {
731
- case it.Child: return t.path;
732
- case it.Header: return t.kind === G.Folder ? t.path : "";
737
+ case rt.Child: return t.path;
738
+ case rt.Header: return t.kind === q.Folder ? t.path : "";
733
739
  }
734
740
  }, lt = (e, t) => new Set(dt(e, t).map((e) => e.name)), ut = (e, t, n) => {
735
741
  let r = e.trim();
@@ -740,7 +746,7 @@ var rt = {
740
746
  let n = t ? `${t}/` : "", r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
741
747
  for (let a of e) {
742
748
  if (!a.path.startsWith(n) || a.path === t) continue;
743
- let e = a.path.slice(n.length), o = e.indexOf("/"), s = o === -1, c = s ? e : e.slice(0, o), l = `${n}${c}`, u = s && a.kind === G.File ? G.File : G.Folder;
749
+ let e = a.path.slice(n.length), o = e.indexOf("/"), s = o === -1, c = s ? e : e.slice(0, o), l = `${n}${c}`, u = s && a.kind === q.File ? q.File : q.Folder;
744
750
  if (r.has(l) || r.set(l, {
745
751
  path: l,
746
752
  name: c,
@@ -754,28 +760,28 @@ var rt = {
754
760
  return [...r.values()].map((e) => ({
755
761
  ...e,
756
762
  childCount: i.get(e.path)?.size ?? 0
757
- })).sort((e, t) => e.kind === t.kind ? e.name.localeCompare(t.name) : e.kind === G.Folder ? -1 : 1);
763
+ })).sort((e, t) => e.kind === t.kind ? e.name.localeCompare(t.name) : e.kind === q.Folder ? -1 : 1);
758
764
  }, ft = (e) => {
759
765
  let t = e.split("/").slice(0, -1);
760
766
  return t.map((e, n) => t.slice(0, n + 1).join("/"));
761
767
  }, pt = "\\new-folder", mt = ({ files: e, fileActions: t, defaultName: n, messages: r, onRevealFolder: i, onCreated: a }) => {
762
- let [o, s] = B(null), c = o?.parentPath ?? null, l = z([]), u = c == null ? void 0 : ot(c, pt), d = R(() => u == null ? void 0 : {
768
+ let [o, s] = V(null), c = o?.parentPath ?? null, l = B([]), u = c == null ? void 0 : ot(c, pt), d = z(() => u == null ? void 0 : {
763
769
  path: u,
764
770
  name: n,
765
- kind: G.Folder
766
- }, [u, n]), f = L((n, i) => {
771
+ kind: q.Folder
772
+ }, [u, n]), f = R((n, i) => {
767
773
  let a = lt(e, i);
768
- return i === "" && a.add(W), ut(n, a, r) ?? t.validateFolderPath?.(ot(i, n.trim()));
774
+ return i === "" && a.add(K), ut(n, a, r) ?? t.validateFolderPath?.(ot(i, n.trim()));
769
775
  }, [
770
776
  e,
771
777
  r,
772
778
  t
773
- ]), p = L((e, t) => {
779
+ ]), p = R((e, t) => {
774
780
  l.current = [], s({
775
781
  parentPath: e,
776
782
  pane: t
777
783
  }), e !== "" && i(e);
778
- }, [i]), m = L((e, t) => {
784
+ }, [i]), m = R((e, t) => {
779
785
  if (c == null || t.path !== u) return null;
780
786
  let n = f(e, c);
781
787
  return l.current = [...l.current.slice(-1), {
@@ -786,16 +792,16 @@ var rt = {
786
792
  c,
787
793
  u,
788
794
  f
789
- ]), h = L(() => {
795
+ ]), h = R(() => {
790
796
  l.current = [], s(null);
791
- }, []), g = L((e, n) => {
797
+ }, []), g = R((e, n) => {
792
798
  let r = ot(n, e.trim());
793
799
  t.onCreateFolder?.(r), n !== "" && i(n), a(r);
794
800
  }, [
795
801
  t,
796
802
  i,
797
803
  a
798
- ]), _ = L((e) => {
804
+ ]), _ = R((e) => {
799
805
  if (c == null) return;
800
806
  let [t] = l.current;
801
807
  l.current.length === 2 && t != null && !t.isValid && t.value !== e || f(e, c) != null ? h() : (h(), g(e, c));
@@ -817,20 +823,20 @@ var rt = {
817
823
  createFolder: g
818
824
  };
819
825
  }, ht = (e) => !!e.dataTransfer?.types.includes("Files"), gt = (e) => {
820
- let [t, n] = B(!1), r = z(0);
826
+ let [t, n] = V(!1), r = B(0);
821
827
  return {
822
828
  isDragActive: t,
823
829
  dropZoneHandlers: {
824
- onDragEnter: L((e) => {
830
+ onDragEnter: R((e) => {
825
831
  ht(e) && (e.preventDefault(), r.current += 1, n(!0));
826
832
  }, []),
827
- onDragLeave: L((e) => {
833
+ onDragLeave: R((e) => {
828
834
  ht(e) && (--r.current, r.current <= 0 && (r.current = 0, n(!1)));
829
835
  }, []),
830
- onDragOver: L((e) => {
836
+ onDragOver: R((e) => {
831
837
  ht(e) && e.preventDefault();
832
838
  }, []),
833
- onDrop: L((t) => {
839
+ onDrop: R((t) => {
834
840
  if (!ht(t)) return;
835
841
  t.preventDefault(), r.current = 0, n(!1);
836
842
  let i = Array.from(t.dataTransfer?.files ?? []);
@@ -840,7 +846,7 @@ var rt = {
840
846
  };
841
847
  }, _t = /* @__PURE__ */ function(e) {
842
848
  return e.Files = "files", e.Archive = "archive", e;
843
- }({}), J = /* @__PURE__ */ function(e) {
849
+ }({}), Y = /* @__PURE__ */ function(e) {
844
850
  return e.Mobile = "mobile", e.Desktop = "desktop", e;
845
851
  }({}), vt = (e, t, n = b.MD, r) => /* @__PURE__ */ F(e, {
846
852
  size: n,
@@ -901,8 +907,8 @@ var rt = {
901
907
  children: p
902
908
  });
903
909
  }, xt = ({ isOpen: e, onClose: t, validateName: n, onCreate: r, title: i, nameLabel: a, namePlaceholder: o, createLabel: s, cancelLabel: c, closeAriaLabel: l, dialogColors: u }) => {
904
- let d = Oe(), [f, p] = B(""), [m, h] = B(!1);
905
- De(() => {
910
+ let d = De(), [f, p] = V(""), [m, h] = V(!1);
911
+ Ee(() => {
906
912
  e && (p(""), h(!1));
907
913
  }, [e]);
908
914
  let g = m ? n(f) : void 0, _ = () => {
@@ -950,7 +956,7 @@ var rt = {
950
956
  "aria-hidden": !0,
951
957
  className: "flex flex-col items-center text-center",
952
958
  children: [
953
- /* @__PURE__ */ F(Ce, {
959
+ /* @__PURE__ */ F(Se, {
954
960
  size: 100,
955
961
  className: St.icon,
956
962
  "aria-hidden": !0,
@@ -967,51 +973,51 @@ var rt = {
967
973
  ]
968
974
  })
969
975
  })] }) : s;
970
- }, Y = {
976
+ }, wt = {
971
977
  card: "_card_1tr87_2",
972
978
  label: "_label_1tr87_7",
973
979
  fileName: "_fileName_1tr87_11",
974
980
  header: "_header_1tr87_16"
975
- }, wt = ({ label: e, fileName: t, isExpanded: n, onToggle: r, children: i, labelClassName: a = "dial-tiny-lead-text", fileNameClassName: o = "dial-small-text" }) => /* @__PURE__ */ F(p, {
981
+ }, Tt = ({ label: e, fileName: t, isExpanded: n, onToggle: r, children: i, labelClassName: a = "dial-tiny-lead-text", fileNameClassName: o = "dial-small-text" }) => /* @__PURE__ */ F(p, {
976
982
  expanded: n,
977
983
  onToggle: r,
978
984
  title: /* @__PURE__ */ F("span", {
979
- className: c("block", Y.label, a),
985
+ className: c("block", wt.label, a),
980
986
  children: e
981
987
  }),
982
988
  description: /* @__PURE__ */ F(k, {
983
989
  name: t,
984
- nameClassName: c(Y.fileName, o)
990
+ nameClassName: c(wt.fileName, o)
985
991
  }),
986
- className: c("rounded-lg border py-0 shadow-xs", Y.card),
987
- headerClassName: c("gap-4 rounded-lg py-2 ps-3 pe-2 text-start [&>span]:flex-1 [&>span]:gap-1 [&>svg]:size-6", n ? "[&>svg]:-rotate-90" : "[&>svg]:rotate-90", Y.header),
992
+ className: c("rounded-lg border py-0 shadow-xs", wt.card),
993
+ headerClassName: c("gap-4 rounded-lg py-2 ps-3 pe-2 text-start [&>span]:flex-1 [&>span]:gap-1 [&>svg]:size-6", n ? "[&>svg]:-rotate-90" : "[&>svg]:rotate-90", wt.header),
988
994
  contentClassName: "max-h-[416px] overflow-y-auto pt-4 pb-2 ps-3 pe-2",
989
995
  children: i
990
- }), Tt = /* @__PURE__ */ function(e) {
996
+ }), Et = /* @__PURE__ */ function(e) {
991
997
  return e.SupportingFile = "supporting-file", e.Manifest = "manifest", e;
992
- }({}), Et = /* @__PURE__ */ function(e) {
998
+ }({}), Dt = /* @__PURE__ */ function(e) {
993
999
  return e.Valid = "valid", e.Invalid = "invalid", e;
994
1000
  }({}), X = /* @__PURE__ */ function(e) {
995
1001
  return e.Replace = "replace", e.Duplicate = "duplicate", e;
996
- }({}), Dt = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), Z = {
1002
+ }({}), Z = (e) => (e.webkitRelativePath || e.name).replace(/\\/g, "/"), Q = {
997
1003
  invalidDropZone: "_invalidDropZone_j9j9q_1",
998
1004
  row: "_row_j9j9q_5"
999
- }, Q = ".zip,application/zip", $ = [], Ot = 0, kt = () => `skill-file-candidate-${++Ot}`, At = (e, t, n) => ({
1000
- id: kt(),
1005
+ }, $ = ".zip,application/zip", Ot = [], kt = 0, At = () => `skill-file-candidate-${++kt}`, jt = (e, t, n) => ({
1006
+ id: At(),
1001
1007
  file: e,
1002
1008
  path: ot(n, t.replace(/\\/g, "/"))
1003
- }), jt = ({ isOpen: e, onClose: t, fileActions: n, mode: r = _t.Files, targetFolderPath: i = "", initialFiles: a, initialEntries: l, existingFilePaths: u = $, onCommitted: d, messageClassName: f = "dial-small-text", rowCaptionClassName: p, labels: m, dialogColors: h, colors: g }) => {
1004
- let _ = m ?? {}, [v, b] = B([]), [S, C] = B([]), [w, T] = B(X.Replace), E = R(() => new Set(u), [u]), [A, j] = B(/* @__PURE__ */ new Map()), [te, ne] = B([]), [ae, oe] = B(!1), [N, se] = B(), [ce, ue] = B(!1), [de, pe] = B(), [me, he] = B(0), ge = z(0), _e = r === _t.Archive, ve = _.uploadArchiveErrorMessage ?? "Couldn't read this archive", ye = Oe(), be = Oe(), xe = Oe(), Ce = z(null), we = z(!1), Te = S[0]?.id;
1005
- De(() => {
1006
- e && (Te == null ? we.current && (we.current = !1, document.getElementById(be)?.focus()) : (we.current = !0, Ce.current?.focus()));
1009
+ }), Mt = ({ isOpen: e, onClose: t, fileActions: n, mode: r = _t.Files, targetFolderPath: i = "", initialFiles: a, initialEntries: l, existingFilePaths: u = Ot, onCommitted: d, messageClassName: f = "dial-small-text", rowCaptionClassName: p, labels: m, dialogColors: h, colors: g }) => {
1010
+ let _ = m ?? {}, [v, b] = V([]), [S, C] = V([]), [w, T] = V(X.Replace), E = z(() => new Set(u), [u]), [A, j] = V(/* @__PURE__ */ new Map()), [te, ne] = V([]), [ae, oe] = V(!1), [N, se] = V(), [ce, ue] = V(!1), [de, pe] = V(), [me, he] = V(0), ge = B(0), L = r === _t.Archive, _e = _.uploadArchiveErrorMessage ?? "Couldn't read this archive", ve = De(), ye = De(), be = De(), Se = B(null), Ce = B(!1), we = S[0]?.id;
1011
+ Ee(() => {
1012
+ e && (we == null ? Ce.current && (Ce.current = !1, document.getElementById(ye)?.focus()) : (Ce.current = !0, Se.current?.focus()));
1007
1013
  }, [
1008
- Te,
1014
+ we,
1009
1015
  e,
1010
- be
1016
+ ye
1011
1017
  ]);
1012
- let Ee = (e) => e.path !== "SKILL.md" && E.has(e.path), L = (e) => {
1013
- se(void 0), b((t) => [...t, ...e.filter((e) => !Ee(e))]), C((t) => [...t, ...e.filter(Ee)]);
1014
- }, ke = (e) => {
1018
+ let Te = (e) => e.path !== "SKILL.md" && E.has(e.path), R = (e) => {
1019
+ se(void 0), b((t) => [...t, ...e.filter((e) => !Te(e))]), C((t) => [...t, ...e.filter(Te)]);
1020
+ }, Oe = (e) => {
1015
1021
  let [t, ...n] = S;
1016
1022
  t && (C(n), T(X.Replace), e != null && (se(void 0), b((r) => {
1017
1023
  if (e === X.Replace) return [...r, {
@@ -1028,7 +1034,7 @@ var rt = {
1028
1034
  path: st(t.path, i)
1029
1035
  }];
1030
1036
  })));
1031
- }, Ae = async (e) => {
1037
+ }, ke = async (e) => {
1032
1038
  let { extractArchive: t } = n;
1033
1039
  if (!t) return;
1034
1040
  let r = ge.current;
@@ -1041,24 +1047,24 @@ var rt = {
1041
1047
  pe(_.uploadArchiveEmptyMessage ?? "This archive has no files");
1042
1048
  return;
1043
1049
  }
1044
- L(a.map((e) => At(e.file, e.path, i)));
1050
+ R(a.map((e) => jt(e.file, e.path, i)));
1045
1051
  } catch {
1046
1052
  if (r !== ge.current) return;
1047
- pe(ve);
1053
+ pe(_e);
1048
1054
  } finally {
1049
1055
  r === ge.current && he((e) => e - 1);
1050
1056
  }
1051
- }, je = (e) => {
1052
- _e ? Ae(e) : L(e.map((e) => At(e, Dt(e), i)));
1053
- }, V = (e) => {
1057
+ }, Ae = (e) => {
1058
+ L ? ke(e) : R(e.map((e) => jt(e, Z(e), i)));
1059
+ }, H = (e) => {
1054
1060
  b((t) => t.filter((t) => t.id !== e));
1055
1061
  };
1056
- De(() => {
1062
+ Ee(() => {
1057
1063
  if (!e) return;
1058
1064
  ge.current += 1;
1059
- let t = [...(a ?? []).map((e) => At(e, Dt(e), i)), ...(l ?? []).map((e) => At(e.file, e.path, i))];
1060
- b(t.filter((e) => !Ee(e))), C(t.filter(Ee)), T(X.Replace), j(/* @__PURE__ */ new Map()), ne([]), se(void 0), pe(void 0), he(0);
1061
- }, [e]), De(() => {
1065
+ let t = [...(a ?? []).map((e) => jt(e, Z(e), i)), ...(l ?? []).map((e) => jt(e.file, e.path, i))];
1066
+ b(t.filter((e) => !Te(e))), C(t.filter(Te)), T(X.Replace), j(/* @__PURE__ */ new Map()), ne([]), se(void 0), pe(void 0), he(0);
1067
+ }, [e]), Ee(() => {
1062
1068
  if (!e) return;
1063
1069
  let t = !1;
1064
1070
  if (v.length === 0) j(/* @__PURE__ */ new Map()), ne([]);
@@ -1070,14 +1076,14 @@ var rt = {
1070
1076
  t = !0;
1071
1077
  };
1072
1078
  }, [v, e]);
1073
- let Me = v.some((e) => A.get(e.id)?.status === Et.Invalid), Ne = v.length > 0 && v.every((e) => A.get(e.id)?.status === Et.Invalid), Pe = [...te, ...v.flatMap((e) => {
1079
+ let je = v.some((e) => A.get(e.id)?.status === Dt.Invalid), Me = v.length > 0 && v.every((e) => A.get(e.id)?.status === Dt.Invalid), Ne = [...te, ...v.flatMap((e) => {
1074
1080
  let t = A.get(e.id);
1075
- return t?.status === Et.Invalid && t.error ? [`${e.path}: ${t.error}`] : [];
1076
- })], H = v.length > 0 && !Me && te.length === 0 && !ae && !ce && me === 0, Fe = async () => {
1081
+ return t?.status === Dt.Invalid && t.error ? [`${e.path}: ${t.error}`] : [];
1082
+ })], U = v.length > 0 && !je && te.length === 0 && !ae && !ce && me === 0, Pe = async () => {
1077
1083
  ue(!0), se(void 0);
1078
1084
  try {
1079
1085
  let { results: e, batchErrors: r } = await n.validateBatch(v), i = new Map(e.map((e) => [e.candidateId, e]));
1080
- if (j(i), ne(r.map((e) => e.message)), v.some((e) => i.get(e.id)?.status === Et.Invalid) || r.length > 0) return;
1086
+ if (j(i), ne(r.map((e) => e.message)), v.some((e) => i.get(e.id)?.status === Dt.Invalid) || r.length > 0) return;
1081
1087
  let a = await n.commitBatch(v);
1082
1088
  if (a.error) {
1083
1089
  se(a.error);
@@ -1087,26 +1093,26 @@ var rt = {
1087
1093
  } finally {
1088
1094
  ue(!1);
1089
1095
  }
1090
- }, Ie = _.uploadDialogCloseAriaLabel ?? "Close", Le = _.uploadCancelLabel ?? "Cancel", [Re] = S;
1091
- if (Re) {
1096
+ }, Fe = _.uploadDialogCloseAriaLabel ?? "Close", Ie = _.uploadCancelLabel ?? "Cancel", [Le] = S;
1097
+ if (Le) {
1092
1098
  let t = _.uploadConflictTitle ?? "Replace or duplicate it?";
1093
1099
  return /* @__PURE__ */ F(bt, {
1094
1100
  isOpen: e,
1095
1101
  title: t,
1096
- closeAriaLabel: Ie,
1097
- onClose: () => ke(null),
1102
+ closeAriaLabel: Fe,
1103
+ onClose: () => Oe(null),
1098
1104
  confirmLabel: _.uploadConflictConfirmLabel ?? "Confirm",
1099
- onConfirm: () => ke(w),
1100
- cancelLabel: Le,
1101
- onCancel: () => ke(null),
1105
+ onConfirm: () => Oe(w),
1106
+ cancelLabel: Ie,
1107
+ onCancel: () => Oe(null),
1102
1108
  colors: h,
1103
1109
  children: /* @__PURE__ */ I("div", {
1104
1110
  className: "flex flex-col gap-4 px-4 py-4 desktop:px-6",
1105
1111
  children: [/* @__PURE__ */ F("p", {
1106
- ref: Ce,
1112
+ ref: Se,
1107
1113
  tabIndex: -1,
1108
1114
  className: c("outline-hidden", f),
1109
- children: _.uploadConflictMessage?.(Re.path) ?? `Item with the same name "${Re.path}" already exists.`
1115
+ children: _.uploadConflictMessage?.(Le.path) ?? `Item with the same name "${Le.path}" already exists.`
1110
1116
  }), /* @__PURE__ */ F(le, {
1111
1117
  ariaLabel: t,
1112
1118
  value: w,
@@ -1124,14 +1130,14 @@ var rt = {
1124
1130
  }
1125
1131
  return /* @__PURE__ */ F(bt, {
1126
1132
  isOpen: e,
1127
- title: _e ? _.uploadArchiveDialogTitle ?? "Upload archive from device" : _.uploadDialogTitle ?? "Upload files from device",
1128
- closeAriaLabel: Ie,
1133
+ title: L ? _.uploadArchiveDialogTitle ?? "Upload archive from device" : _.uploadDialogTitle ?? "Upload files from device",
1134
+ closeAriaLabel: Fe,
1129
1135
  onClose: t,
1130
1136
  confirmLabel: _.uploadConfirmLabel ?? "Add",
1131
- onConfirm: () => void Fe(),
1132
- isConfirmDisabled: !H,
1137
+ onConfirm: () => void Pe(),
1138
+ isConfirmDisabled: !U,
1133
1139
  isConfirming: ce,
1134
- cancelLabel: Le,
1140
+ cancelLabel: Ie,
1135
1141
  onCancel: t,
1136
1142
  colors: h,
1137
1143
  children: /* @__PURE__ */ I("div", {
@@ -1144,19 +1150,19 @@ var rt = {
1144
1150
  /* @__PURE__ */ F(O, {
1145
1151
  label: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("span", {
1146
1152
  className: "desktop:hidden",
1147
- children: _e ? _.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : _.uploadDropZoneMobileLabel ?? "Click here to upload"
1153
+ children: L ? _.uploadArchiveDropZoneMobileLabel ?? "Click here to upload a .zip archive" : _.uploadDropZoneMobileLabel ?? "Click here to upload"
1148
1154
  }), /* @__PURE__ */ F("span", {
1149
1155
  className: "hidden desktop:inline",
1150
- children: _e ? _.uploadArchiveDropZoneLabel ?? "Drag and drop a .zip archive or click here to upload" : _.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
1156
+ children: L ? _.uploadArchiveDropZoneLabel ?? "Drag and drop a .zip archive or click here to upload" : _.uploadDropZoneLabel ?? "Drag and drop it or click here to upload"
1151
1157
  })] }),
1152
- description: _e ? _.uploadArchiveDropZoneDescription : _.uploadDropZoneDescription,
1153
- id: be,
1158
+ description: L ? _.uploadArchiveDropZoneDescription : _.uploadDropZoneDescription,
1159
+ id: ye,
1154
1160
  ariaLabel: _.uploadDropZoneAriaLabel ?? "Upload files",
1155
1161
  multiple: !0,
1156
- accept: _e ? Q : void 0,
1157
- className: Ne ? Z.invalidDropZone : void 0,
1158
- onChange: je,
1159
- onReject: _e ? () => pe(ve) : void 0
1162
+ accept: L ? $ : void 0,
1163
+ className: Me ? Q.invalidDropZone : void 0,
1164
+ onChange: Ae,
1165
+ onReject: L ? () => pe(_e) : void 0
1160
1166
  }),
1161
1167
  me > 0 && /* @__PURE__ */ F(fe, { ariaLabel: _.uploadArchiveExtractingAriaLabel ?? "Reading archive" }),
1162
1168
  /* @__PURE__ */ F(D, {
@@ -1166,16 +1172,16 @@ var rt = {
1166
1172
  /* @__PURE__ */ F(re, {
1167
1173
  visuallyHidden: !0,
1168
1174
  as: ie.Span,
1169
- id: ye,
1170
- children: Pe.map((e) => `${_.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
1175
+ id: ve,
1176
+ children: Ne.map((e) => `${_.uploadBatchErrorAriaPrefix ?? "Upload error: "}${e}`).join(" ")
1171
1177
  }),
1172
1178
  te.map((e) => /* @__PURE__ */ F(D, { text: e }, e)),
1173
1179
  v.length > 0 && /* @__PURE__ */ F("ul", {
1174
1180
  className: "flex flex-col gap-2",
1175
1181
  children: v.map((e) => {
1176
- let t = A.get(e.id), n = t?.kind === Tt.Manifest, r = t?.status === Et.Invalid, i = r ? t?.error : void 0, a = `${xe}${e.id}`;
1182
+ let t = A.get(e.id), n = t?.kind === Et.Manifest, r = t?.status === Dt.Invalid, i = r ? t?.error : void 0, a = `${be}${e.id}`;
1177
1183
  return /* @__PURE__ */ I("li", {
1178
- className: c("flex items-center gap-2 rounded-lg border p-2", Z.row),
1184
+ className: c("flex items-center gap-2 rounded-lg border p-2", Q.row),
1179
1185
  children: [/* @__PURE__ */ F(k, {
1180
1186
  name: e.path,
1181
1187
  className: "min-w-0 flex-1",
@@ -1198,14 +1204,14 @@ var rt = {
1198
1204
  })
1199
1205
  ] })
1200
1206
  }), /* @__PURE__ */ F(ee, {
1201
- icon: /* @__PURE__ */ F(Se, {
1207
+ icon: /* @__PURE__ */ F(xe, {
1202
1208
  size: 16,
1203
1209
  "aria-hidden": !0,
1204
1210
  stroke: x
1205
1211
  }),
1206
1212
  "aria-label": _.uploadRemoveCandidateLabel?.(e.path) ?? `Remove ${e.path}`,
1207
1213
  "aria-describedby": i ? a : void 0,
1208
- onClick: () => V(e.id)
1214
+ onClick: () => H(e.id)
1209
1215
  })]
1210
1216
  }, e.id);
1211
1217
  })
@@ -1217,19 +1223,19 @@ var rt = {
1217
1223
  ]
1218
1224
  })
1219
1225
  });
1220
- }, Mt = {
1226
+ }, Nt = {
1221
1227
  list: "_list_1hpyi_1",
1222
1228
  row: "_row_1hpyi_5",
1223
1229
  count: "_count_1hpyi_14"
1224
- }, Nt = (e) => e === 1 ? "1 item" : `${e} items`, Pt = ({ folderPath: e, entries: t, onOpen: n, rootLabel: r = "Skill", breadcrumbAriaLabel: i = "Folder path", overflowAriaLabel: a = "Show hidden path segments", listAriaLabel: o = "Folder content", emptyTitle: s = "This folder is empty", emptyDescription: l = "Use Add to upload files or create a subfolder.", itemCountLabel: u = Nt, itemCountClassName: d = "dial-tiny-text" }) => {
1230
+ }, Pt = (e) => e === 1 ? "1 item" : `${e} items`, Ft = ({ folderPath: e, entries: t, onOpen: n, rootLabel: r = "Skill", breadcrumbAriaLabel: i = "Folder path", overflowAriaLabel: a = "Show hidden path segments", listAriaLabel: o = "Folder content", emptyTitle: s = "This folder is empty", emptyDescription: l = "Use Add to upload files or create a subfolder.", itemCountLabel: u = Pt, itemCountClassName: d = "dial-tiny-text" }) => {
1225
1231
  let f = e.split("/"), p = [{
1226
1232
  label: r,
1227
- onClick: () => n("", G.Folder)
1233
+ onClick: () => n("", q.Folder)
1228
1234
  }, ...f.map((e, t) => {
1229
1235
  let r = f.slice(0, t + 1).join("/");
1230
1236
  return t === f.length - 1 ? { label: e } : {
1231
1237
  label: e,
1232
- onClick: () => n(r, G.Folder)
1238
+ onClick: () => n(r, q.Folder)
1233
1239
  };
1234
1240
  })];
1235
1241
  return /* @__PURE__ */ I("div", {
@@ -1244,21 +1250,21 @@ var rt = {
1244
1250
  live: !0
1245
1251
  }) : /* @__PURE__ */ F("ul", {
1246
1252
  "aria-label": o,
1247
- className: c("m-0 flex list-none flex-col overflow-hidden rounded-lg border p-0", Mt.list),
1253
+ className: c("m-0 flex list-none flex-col overflow-hidden rounded-lg border p-0", Nt.list),
1248
1254
  children: t.map((e) => {
1249
- let t = e.kind === G.Folder;
1255
+ let t = e.kind === q.Folder;
1250
1256
  return /* @__PURE__ */ F("li", {
1251
1257
  className: "m-0 p-0",
1252
1258
  children: /* @__PURE__ */ I("button", {
1253
1259
  type: "button",
1254
1260
  onClick: () => n(e.path, e.kind),
1255
- className: c("flex w-full cursor-pointer items-center justify-between gap-4 border-b bg-transparent px-3 py-2 text-start last:border-b-0", Mt.row),
1261
+ className: c("flex w-full cursor-pointer items-center justify-between gap-4 border-b bg-transparent px-3 py-2 text-start last:border-b-0", Nt.row),
1256
1262
  children: [/* @__PURE__ */ F(k, {
1257
1263
  name: e.name,
1258
1264
  type: t ? C.Folder : C.File,
1259
1265
  className: "min-w-0 flex-1"
1260
1266
  }), t && /* @__PURE__ */ F("span", {
1261
- className: c("shrink-0", Mt.count, d),
1267
+ className: c("shrink-0", Nt.count, d),
1262
1268
  children: u(e.childCount)
1263
1269
  })]
1264
1270
  })
@@ -1266,102 +1272,102 @@ var rt = {
1266
1272
  })
1267
1273
  })]
1268
1274
  });
1269
- }, Ft = {
1275
+ }, It = {
1270
1276
  title: "_title_lgmx6_1",
1271
1277
  helperText: "_helperText_lgmx6_5",
1272
1278
  refineFeedback: "_refineFeedback_lgmx6_9",
1273
1279
  refineError: "_refineError_lgmx6_13",
1274
1280
  menuIcon: "_menuIcon_lgmx6_17"
1275
- }, It = {
1281
+ }, Lt = {
1276
1282
  mode: _t.Files,
1277
1283
  targetFolderPath: ""
1278
- }, Lt = [U.Name, U.Description], Rt = 24, zt = 300, Bt = "pb-0 desktop:px-8 desktop:py-6", Vt = "desktop:px-8 desktop:py-6", Ht = "gap-4 px-4 pt-5 pb-6 desktop:gap-5 desktop:px-8 desktop:py-6", Ut = Te(async () => {
1279
- let { MarkdownEditor: e } = await je();
1284
+ }, Rt = [W.Name, W.Description], zt = 24, Bt = 300, Vt = "pb-0 desktop:px-8 desktop:py-6", Ht = "desktop:px-8 desktop:py-6", Ut = "gap-4 px-4 pt-5 pb-6 desktop:gap-5 desktop:px-8 desktop:py-6", Wt = we(async () => {
1285
+ let { MarkdownEditor: e } = await Ae();
1280
1286
  return { default: e };
1281
- }), Wt = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: d, expandedPaths: p, onExpandedPathsChange: m, isLoading: h = !1, hasLoadError: S = !1, isSubmitting: C = !1, errors: O, submitError: k, conflict: j, onReloadLatest: ne, isNameReadOnly: re = !1, onDirtyChange: ie, onValuesChange: M, onRefineDescription: ae, onRefineInstructions: oe, fileActions: N, supportingFileContent: se, asideData: le, onSubmit: ue, onCancel: de, onBack: pe, backAriaLabel: me, title: he, onRetry: ge, onRetrySubmit: be, labels: xe, styles: Te, dir: Ee, instructionsEditorTheme: je = w.light }) => {
1282
- let [V, Me] = B({
1287
+ }), Gt = ({ initialValues: r, files: i, selectedPath: s, onSelectedPathChange: d, expandedPaths: p, onExpandedPathsChange: m, isLoading: h = !1, hasLoadError: S = !1, isSubmitting: C = !1, errors: O, submitError: k, conflict: j, onReloadLatest: ne, isNameReadOnly: re = !1, onDirtyChange: ie, onValuesChange: M, onRefineDescription: ae, onRefineInstructions: oe, fileActions: N, supportingFileContent: se, asideData: le, onSubmit: ue, onCancel: de, onBack: pe, backAriaLabel: me, title: he, onRetry: ge, onRetrySubmit: ye, labels: be, styles: we, dir: Te, instructionsEditorTheme: Ae = w.light }) => {
1288
+ let [H, je] = V({
1283
1289
  name: r?.name ?? "",
1284
1290
  description: r?.description ?? "",
1285
1291
  instructions: r?.instructions ?? ""
1286
- }), Ne = Oe(), Pe = Oe();
1287
- u(() => document.getElementById(Ne), Pe, !!O?.instructions);
1288
- let H = z(void 0), Fe = l({
1289
- bottomGap: Rt,
1290
- minHeight: zt
1291
- }), Ie = z(V), Le = (e) => {
1292
+ }), Me = De(), Ne = De();
1293
+ u(() => document.getElementById(Me), Ne, !!O?.instructions);
1294
+ let U = B(void 0), Pe = l({
1295
+ bottomGap: zt,
1296
+ minHeight: Bt
1297
+ }), Fe = B(H), Ie = (e) => {
1292
1298
  let t = {
1293
- ...Ie.current,
1299
+ ...Fe.current,
1294
1300
  ...e
1295
1301
  };
1296
- Ie.current = t, Me(t), M?.(t);
1297
- }, Re = (e) => e ? async (t, n) => {
1298
- if (H.current && !H.current.aborted) throw new DOMException("Busy", "AbortError");
1299
- H.current = n;
1302
+ Fe.current = t, je(t), M?.(t);
1303
+ }, Le = (e) => e ? async (t, n) => {
1304
+ if (U.current && !U.current.aborted) throw new DOMException("Busy", "AbortError");
1305
+ U.current = n;
1300
1306
  try {
1301
1307
  return await e(t, n);
1302
1308
  } finally {
1303
- H.current === n && (H.current = void 0);
1309
+ U.current === n && (U.current = void 0);
1304
1310
  }
1305
- } : void 0, ze = f({
1306
- value: V.description,
1307
- onChange: (e) => Le({ description: e }),
1308
- onRefine: Re(ae),
1311
+ } : void 0, Re = f({
1312
+ value: H.description,
1313
+ onChange: (e) => Ie({ description: e }),
1314
+ onRefine: Le(ae),
1309
1315
  disabled: C || h || S,
1310
1316
  resetKey: r
1311
- }), U = f({
1312
- value: V.instructions,
1313
- onChange: (e) => Le({ instructions: e }),
1314
- onRefine: Re(oe),
1317
+ }), W = f({
1318
+ value: H.instructions,
1319
+ onChange: (e) => Ie({ instructions: e }),
1320
+ onRefine: Le(oe),
1315
1321
  disabled: C || h || S,
1316
1322
  resetKey: r
1317
- }), Be = ze.isPending || U.isPending, Ve = () => {
1318
- ze.reset(), U.reset();
1323
+ }), ze = Re.isPending || W.isPending, Be = () => {
1324
+ Re.reset(), W.reset();
1325
+ }, Ve = () => {
1326
+ Be(), de();
1319
1327
  }, He = () => {
1320
- Ve(), de();
1328
+ Be(), pe();
1321
1329
  }, Ue = () => {
1322
- Ve(), pe();
1323
- }, We = () => {
1324
- C || h || S || H.current && !H.current.aborted || ue(V);
1325
- }, Ge = z(r), Ke = Ge.current !== r, qe = z(i), [Je, Ye] = B(!1);
1326
- De(() => {
1327
- Ge.current = r;
1330
+ C || h || S || U.current && !U.current.aborted || ue(H);
1331
+ }, We = B(r), Ge = We.current !== r, Ke = B(i), [qe, Je] = V(!1);
1332
+ Ee(() => {
1333
+ We.current = r;
1328
1334
  let e = {
1329
1335
  name: r?.name ?? "",
1330
1336
  description: r?.description ?? "",
1331
1337
  instructions: r?.instructions ?? ""
1332
1338
  };
1333
- Ie.current = e, Me(e), qe.current = i, Ye(!1);
1339
+ Fe.current = e, je(e), Ke.current = i, Je(!1);
1334
1340
  }, [r]);
1335
- let Xe = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), Ze = z(!1);
1336
- De(() => {
1337
- if (Ke) return;
1341
+ let Ye = (e) => JSON.stringify([...e].sort((e, t) => e.path.localeCompare(t.path))), Xe = B(!1);
1342
+ Ee(() => {
1343
+ if (Ge) return;
1338
1344
  let e = {
1339
1345
  name: r?.name ?? "",
1340
1346
  description: r?.description ?? "",
1341
1347
  instructions: r?.instructions ?? ""
1342
- }, t = JSON.stringify(V) !== JSON.stringify(e) || Xe(i) !== Xe(qe.current) || Je;
1343
- t !== Ze.current && (Ze.current = t, ie?.(t));
1348
+ }, t = JSON.stringify(H) !== JSON.stringify(e) || Ye(i) !== Ye(Ke.current) || qe;
1349
+ t !== Xe.current && (Xe.current = t, ie?.(t));
1344
1350
  }, [
1345
- V,
1351
+ H,
1346
1352
  i,
1347
1353
  r,
1348
- Ke,
1349
- Je,
1354
+ Ge,
1355
+ qe,
1350
1356
  ie
1351
1357
  ]);
1352
- let [et, nt] = B(W), K = s ?? et, q = L((e) => {
1353
- nt(e), d?.(e);
1354
- }, [d]), [ot, st] = B([]), lt = p ?? ot, ut = R(() => new Set(lt), [lt]), pt = L((e) => {
1358
+ let [Ze, et] = V(K), G = s ?? Ze, J = R((e) => {
1359
+ et(e), d?.(e);
1360
+ }, [d]), [it, ot] = V([]), st = p ?? it, lt = z(() => new Set(st), [st]), ut = R((e) => {
1355
1361
  let t = [...e];
1356
- st(t), m?.(t);
1357
- }, [m]), [ht, yt] = B(!1), [bt, St] = B(It), Y = L((e) => {
1358
- St(e), yt(!0);
1359
- }, []), [Tt, Et] = B(!1), { isDragActive: X, dropZoneHandlers: Dt } = gt(L((e) => {
1360
- ht || Y({
1361
- ...It,
1362
+ ot(t), m?.(t);
1363
+ }, [m]), [pt, ht] = V(!1), [yt, bt] = V(Lt), St = R((e) => {
1364
+ bt(e), ht(!0);
1365
+ }, []), [wt, Et] = V(!1), { isDragActive: Dt, dropZoneHandlers: X } = gt(R((e) => {
1366
+ pt || St({
1367
+ ...Lt,
1362
1368
  initialFiles: e
1363
1369
  });
1364
- }, [ht, Y])), Z = xe ?? {}, Q = Te?.colors, $ = Te?.typography ?? {}, Ot = $.titleClassName ?? "dial-body-semi-text", kt = $.helperTextClassName ?? "dial-tiny-semi-text", At = $.removeIconClassName, Mt = R(() => o({ "--se-menu-icon": Q?.menuIcon }), [Q?.menuIcon]), Nt = o({
1370
+ }, [pt, St])), Z = be ?? {}, Q = we?.colors, $ = we?.typography ?? {}, Ot = $.titleClassName ?? "dial-body-semi-text", kt = $.helperTextClassName ?? "dial-tiny-semi-text", At = $.removeIconClassName, jt = z(() => o({ "--se-menu-icon": Q?.menuIcon }), [Q?.menuIcon]), Nt = o({
1365
1371
  "--se-title-color": Q?.title,
1366
1372
  "--se-helper-text-color": Q?.helperText,
1367
1373
  "--se-refine-action-text": Q?.refineActionText,
@@ -1371,19 +1377,19 @@ var rt = {
1371
1377
  "--se-folder-row-border": Q?.folderRowBorder,
1372
1378
  "--se-folder-row-hover-bg": Q?.folderRowHoverBackground,
1373
1379
  "--se-drop-overlay-icon": Q?.dropOverlayIcon
1374
- }), Wt = {
1380
+ }), Pt = {
1375
1381
  footerBackground: Q?.dialogFooterBackground,
1376
1382
  footerBorder: Q?.dialogFooterBorder
1377
1383
  }, Gt = {
1378
- feedbackClassName: c(Q?.refineActionText && Ft.refineFeedback, $.refineFeedbackClassName, rt.refineFeedback),
1379
- errorClassName: Ft.refineError
1384
+ feedbackClassName: c(Q?.refineActionText && It.refineFeedback, $.refineFeedbackClassName, nt.refineFeedback),
1385
+ errorClassName: It.refineError
1380
1386
  }, Kt = {
1381
1387
  layout: Q?.border ? { colors: {
1382
1388
  headerBorderColor: Q.border,
1383
1389
  sidebarBorderColor: Q.border
1384
1390
  } } : void 0,
1385
1391
  section: Q?.title ? { colors: { titleColor: Q.title } } : void 0
1386
- }, qt = R(() => ({
1392
+ }, qt = z(() => ({
1387
1393
  required: Z.folderNameRequiredError ?? "Enter a folder name",
1388
1394
  invalid: Z.folderNameInvalidError ?? "Folder name can't contain / or \\, or be . or ..",
1389
1395
  duplicate: Z.folderNameDuplicateError ?? "An item with this name already exists here"
@@ -1391,9 +1397,9 @@ var rt = {
1391
1397
  Z.folderNameRequiredError,
1392
1398
  Z.folderNameInvalidError,
1393
1399
  Z.folderNameDuplicateError
1394
- ]), Jt = L((e) => {
1395
- ut.has(e) || pt(/* @__PURE__ */ new Set([...ut, e]));
1396
- }, [ut, pt]), Yt = bt.targetFolderPath, Xt = R(() => ({
1400
+ ]), Jt = R((e) => {
1401
+ lt.has(e) || ut(/* @__PURE__ */ new Set([...lt, e]));
1402
+ }, [lt, ut]), Yt = yt.targetFolderPath, Xt = z(() => ({
1397
1403
  ...N,
1398
1404
  commitBatch: async (e) => {
1399
1405
  let t = await N.commitBatch(e);
@@ -1409,16 +1415,16 @@ var rt = {
1409
1415
  defaultName: Z.newFolderDefaultName ?? "New folder",
1410
1416
  messages: qt,
1411
1417
  onRevealFolder: Jt,
1412
- onCreated: q
1413
- }), { draftNode: Qt, draftPath: $t, draftPane: en } = Zt, tn = R(() => at([{
1414
- path: W,
1415
- name: W,
1416
- kind: G.File
1417
- }, ...i]), [i]), nn = R(() => Qt ? at([
1418
+ onCreated: J
1419
+ }), { draftNode: Qt, draftPath: $t, draftPane: en } = Zt, tn = z(() => at([{
1420
+ path: K,
1421
+ name: K,
1422
+ kind: q.File
1423
+ }, ...i]), [i]), nn = z(() => Qt ? at([
1418
1424
  {
1419
- path: W,
1420
- name: W,
1421
- kind: G.File
1425
+ path: K,
1426
+ name: K,
1427
+ kind: q.File
1422
1428
  },
1423
1429
  ...i,
1424
1430
  Qt
@@ -1426,66 +1432,66 @@ var rt = {
1426
1432
  i,
1427
1433
  Qt,
1428
1434
  tn
1429
- ]), rn = R(() => i.find((e) => e.path === K), [i, K]), an = R(() => dt(i, K), [i, K]), on = rn?.kind === G.Folder || an.length > 0, sn = L((e) => {
1430
- e.path !== $t && q(e.path);
1431
- }, [q, $t]), cn = L((e, t) => {
1435
+ ]), rn = z(() => i.find((e) => e.path === G), [i, G]), an = z(() => dt(i, G), [i, G]), on = rn?.kind === q.Folder || an.length > 0, sn = R((e) => {
1436
+ e.path !== $t && J(e.path);
1437
+ }, [J, $t]), cn = R((e, t) => {
1432
1438
  if (e === "") {
1433
- q(W);
1439
+ J(K);
1434
1440
  return;
1435
1441
  }
1436
- let n = [...ft(e), ...t === G.Folder ? [e] : []].filter((e) => !ut.has(e));
1437
- n.length > 0 && pt(/* @__PURE__ */ new Set([...ut, ...n])), q(e);
1442
+ let n = [...ft(e), ...t === q.Folder ? [e] : []].filter((e) => !lt.has(e));
1443
+ n.length > 0 && ut(/* @__PURE__ */ new Set([...lt, ...n])), J(e);
1438
1444
  }, [
1445
+ lt,
1439
1446
  ut,
1440
- pt,
1441
- q
1442
- ]), ln = L((e) => {
1443
- N.onRemoveNode(e), (K === e || K.startsWith(`${e}/`)) && q(W);
1447
+ J
1448
+ ]), ln = R((e) => {
1449
+ N.onRemoveNode(e), (G === e || G.startsWith(`${e}/`)) && J(K);
1444
1450
  }, [
1445
1451
  N,
1446
- K,
1447
- q
1448
- ]), { startDraft: un } = Zt, { onCreateFolder: dn, extractArchive: fn, pickFromFileSystem: pn } = N, [mn, hn] = B(null), gn = L((e, t) => {
1449
- t === J.Mobile ? hn(e) : un(e, t);
1450
- }, [un]), _n = R(() => i.filter((e) => e.kind === G.File).map((e) => e.path), [i]), vn = L(async (e) => {
1452
+ G,
1453
+ J
1454
+ ]), { startDraft: un } = Zt, { onCreateFolder: dn, extractArchive: fn, pickFromFileSystem: pn } = N, [mn, hn] = V(null), gn = R((e, t) => {
1455
+ t === Y.Mobile ? hn(e) : un(e, t);
1456
+ }, [un]), _n = z(() => i.filter((e) => e.kind === q.File).map((e) => e.path), [i]), vn = R(async (e) => {
1451
1457
  if (!pn) return;
1452
1458
  let t = await pn();
1453
- t?.length && Y({
1459
+ t?.length && St({
1454
1460
  mode: _t.Files,
1455
1461
  targetFolderPath: e,
1456
1462
  initialEntries: t
1457
1463
  });
1458
- }, [pn, Y]), yn = L((e, t) => {
1459
- let n = (e) => vt(e, Ft.menuIcon, void 0, Mt), r = [];
1464
+ }, [pn, St]), yn = R((e, t) => {
1465
+ let n = (e) => vt(e, It.menuIcon, void 0, jt), r = [];
1460
1466
  return dn && r.push({
1461
1467
  key: "create-folder",
1462
1468
  label: Z.createFolderLabel ?? "Create folder",
1463
- icon: n(ye),
1469
+ icon: n(ve),
1464
1470
  onClick: () => gn(e, t)
1465
1471
  }), r.push({
1466
1472
  key: "upload-files",
1467
1473
  label: Z.uploadFilesLabel ?? "Upload files from device",
1468
- icon: n(Ce),
1469
- onClick: () => Y({
1474
+ icon: n(Se),
1475
+ onClick: () => St({
1470
1476
  mode: _t.Files,
1471
1477
  targetFolderPath: e
1472
1478
  })
1473
1479
  }), fn && r.push({
1474
1480
  key: "upload-archive",
1475
1481
  label: Z.uploadArchiveLabel ?? "Upload archive from device",
1476
- icon: n(ve),
1477
- onClick: () => Y({
1482
+ icon: n(_e),
1483
+ onClick: () => St({
1478
1484
  mode: _t.Archive,
1479
1485
  targetFolderPath: e
1480
1486
  })
1481
1487
  }), pn && r.push({
1482
1488
  key: "open-file-system",
1483
1489
  label: Z.openFileSystemLabel ?? "Open DIAL file system",
1484
- icon: n(_e),
1490
+ icon: n(L),
1485
1491
  onClick: () => void vn(e)
1486
1492
  }), r;
1487
1493
  }, [
1488
- Mt,
1494
+ jt,
1489
1495
  dn,
1490
1496
  fn,
1491
1497
  pn,
@@ -1494,30 +1500,30 @@ var rt = {
1494
1500
  Z.uploadArchiveLabel,
1495
1501
  Z.openFileSystemLabel,
1496
1502
  gn,
1497
- Y,
1503
+ St,
1498
1504
  vn
1499
- ]), bn = R(() => {
1500
- let e = ct(it.Header, i.find((e) => e.path === K));
1505
+ ]), bn = z(() => {
1506
+ let e = ct(rt.Header, i.find((e) => e.path === G));
1501
1507
  return {
1502
- [J.Mobile]: yn(e, J.Mobile),
1503
- [J.Desktop]: yn(e, J.Desktop)
1508
+ [Y.Mobile]: yn(e, Y.Mobile),
1509
+ [Y.Desktop]: yn(e, Y.Desktop)
1504
1510
  };
1505
1511
  }, [
1506
1512
  yn,
1507
1513
  i,
1508
- K
1509
- ]), xn = L((e, t) => {
1510
- if (e.path === $t || e.nodeType !== ke.FOLDER) return [];
1514
+ G
1515
+ ]), xn = R((e, t) => {
1516
+ if (e.path === $t || e.nodeType !== Oe.FOLDER) return [];
1511
1517
  let n = {
1512
1518
  path: e.path,
1513
1519
  name: e.name,
1514
- kind: G.Folder
1515
- }, r = yn(ct(it.Child, n), t);
1520
+ kind: q.Folder
1521
+ }, r = yn(ct(rt.Child, n), t);
1516
1522
  return r.push({
1517
1523
  key: "delete",
1518
1524
  label: Z.deleteLabel ?? "Delete",
1519
1525
  danger: !0,
1520
- icon: vt(Se, At),
1526
+ icon: vt(xe, At),
1521
1527
  onClick: () => ln(e.path)
1522
1528
  }), r;
1523
1529
  }, [
@@ -1526,12 +1532,12 @@ var rt = {
1526
1532
  At,
1527
1533
  yn,
1528
1534
  ln
1529
- ]), Sn = R(() => ({
1530
- [J.Mobile]: (e) => xn(e, J.Mobile),
1531
- [J.Desktop]: (e) => xn(e, J.Desktop)
1532
- }), [xn]), Cn = L((e) => e.nodeType === ke.FOLDER || e.path === "SKILL.md" ? null : /* @__PURE__ */ F(ee, {
1535
+ ]), Sn = z(() => ({
1536
+ [Y.Mobile]: (e) => xn(e, Y.Mobile),
1537
+ [Y.Desktop]: (e) => xn(e, Y.Desktop)
1538
+ }), [xn]), Cn = R((e) => e.nodeType === Oe.FOLDER || e.path === "SKILL.md" ? null : /* @__PURE__ */ F(ee, {
1533
1539
  size: T.Small,
1534
- icon: vt(Se, At, b.SM),
1540
+ icon: vt(xe, At, b.SM),
1535
1541
  "aria-label": Z.deleteLabel ?? "Delete",
1536
1542
  onClick: () => ln(e.path)
1537
1543
  }), [
@@ -1543,7 +1549,7 @@ var rt = {
1543
1549
  children: [/* @__PURE__ */ I("div", {
1544
1550
  className: "flex items-center justify-between",
1545
1551
  children: [/* @__PURE__ */ F("span", {
1546
- className: c(Ft.title, Ot),
1552
+ className: c(It.title, Ot),
1547
1553
  children: Z.filesHeading ?? "Files"
1548
1554
  }), /* @__PURE__ */ F(_, {
1549
1555
  label: Z.addLabel ?? "Add",
@@ -1555,12 +1561,12 @@ var rt = {
1555
1561
  }), /* @__PURE__ */ F("div", {
1556
1562
  role: "tree",
1557
1563
  "aria-label": Z.filesTreeAriaLabel ?? "Skill files",
1558
- children: /* @__PURE__ */ F(Ae, {
1564
+ children: /* @__PURE__ */ F(ke, {
1559
1565
  items: en === e ? nn : tn,
1560
1566
  showFiles: !0,
1561
- selectedPath: K,
1562
- expandedPaths: ut,
1563
- onExpandedPathsChange: pt,
1567
+ selectedPath: G,
1568
+ expandedPaths: lt,
1569
+ onExpandedPathsChange: ut,
1564
1570
  onItemClick: sn,
1565
1571
  getContextMenuItems: Sn[e],
1566
1572
  renderItemActions: Cn,
@@ -1571,17 +1577,17 @@ var rt = {
1571
1577
  rootItemPath: ""
1572
1578
  })
1573
1579
  })]
1574
- }), Tn = R(() => ({
1575
- name: V.name,
1576
- description: V.description,
1580
+ }), Tn = z(() => ({
1581
+ name: H.name,
1582
+ description: H.description,
1577
1583
  iconUrl: "",
1578
1584
  version: "",
1579
1585
  topics: [],
1580
1586
  otherLocales: []
1581
- }), [V.name, V.description]), En = R(() => ({
1587
+ }), [H.name, H.description]), En = z(() => ({
1582
1588
  name: O?.name,
1583
1589
  description: O?.description
1584
- }), [O?.name, O?.description]), Dn = R(() => ({ form: {
1590
+ }), [O?.name, O?.description]), Dn = z(() => ({ form: {
1585
1591
  ...$e,
1586
1592
  name: {
1587
1593
  label: Z.nameLabel ?? "Name",
@@ -1598,24 +1604,24 @@ var rt = {
1598
1604
  Z.descriptionLabel,
1599
1605
  Z.descriptionPlaceholder
1600
1606
  ]), On = (e) => {
1601
- e.name !== void 0 && Le({ name: e.name }), e.description !== void 0 && (ze.reset(), Le({ description: e.description }));
1607
+ e.name !== void 0 && Ie({ name: e.name }), e.description !== void 0 && (Re.reset(), Ie({ description: e.description }));
1602
1608
  }, kn = ae ? (e, t) => /* @__PURE__ */ F(a, {
1603
1609
  isEnabled: !0,
1604
1610
  fieldId: t,
1605
1611
  required: !0,
1606
1612
  label: Z.descriptionLabel ?? "Description",
1607
1613
  labels: Z,
1608
- refinement: ze,
1609
- disabled: Be || C,
1614
+ refinement: Re,
1615
+ disabled: ze || C,
1610
1616
  ...Gt,
1611
1617
  children: e
1612
1618
  }) : void 0, An = {
1613
1619
  title: he,
1614
- onBack: Ue,
1615
- onCancel: He,
1616
- onSubmit: We,
1620
+ onBack: He,
1621
+ onCancel: Ve,
1622
+ onSubmit: Ue,
1617
1623
  submitLabel: Z.createLabel ?? "Create",
1618
- isSubmitDisabled: Be || h || S,
1624
+ isSubmitDisabled: ze || h || S,
1619
1625
  labels: {
1620
1626
  cancelLabel: Z.cancelLabel ?? "Cancel",
1621
1627
  backAriaLabel: me ?? "Back",
@@ -1625,7 +1631,7 @@ var rt = {
1625
1631
  metadataTitle: null
1626
1632
  };
1627
1633
  if (h) return /* @__PURE__ */ F("div", {
1628
- dir: Ee,
1634
+ dir: Te,
1629
1635
  className: "relative flex min-h-0 flex-1 flex-col",
1630
1636
  children: /* @__PURE__ */ F(Qe, {
1631
1637
  ...An,
@@ -1636,7 +1642,7 @@ var rt = {
1636
1642
  })
1637
1643
  });
1638
1644
  if (S) return /* @__PURE__ */ F("div", {
1639
- dir: Ee,
1645
+ dir: Te,
1640
1646
  className: "relative flex min-h-0 flex-1 flex-col",
1641
1647
  children: /* @__PURE__ */ F(Qe, {
1642
1648
  ...An,
@@ -1653,13 +1659,13 @@ var rt = {
1653
1659
  })
1654
1660
  })
1655
1661
  });
1656
- let jn = K === W, Mn = rn?.name ?? K.slice(K.lastIndexOf("/") + 1), Nn = jn ? W : Z.selectedFileHeading?.(Mn) ?? Mn, Pn = k != null || j != null ? /* @__PURE__ */ I("div", {
1662
+ let jn = G === K, Mn = rn?.name ?? G.slice(G.lastIndexOf("/") + 1), Nn = jn ? K : Z.selectedFileHeading?.(Mn) ?? Mn, Pn = k != null || j != null ? /* @__PURE__ */ I("div", {
1657
1663
  className: "flex flex-col gap-2",
1658
1664
  children: [k != null && /* @__PURE__ */ I("div", {
1659
1665
  className: "flex items-center gap-2",
1660
- children: [/* @__PURE__ */ F(D, { text: k }), be != null && /* @__PURE__ */ F(A, {
1666
+ children: [/* @__PURE__ */ F(D, { text: k }), ye != null && /* @__PURE__ */ F(A, {
1661
1667
  label: Z.retryLabel ?? "Retry",
1662
- onClick: be
1668
+ onClick: ye
1663
1669
  })]
1664
1670
  }), j != null && /* @__PURE__ */ I("div", {
1665
1671
  className: "flex items-center gap-2",
@@ -1670,97 +1676,97 @@ var rt = {
1670
1676
  })]
1671
1677
  }) : void 0, Fn = /* @__PURE__ */ F(a, {
1672
1678
  isEnabled: !!oe,
1673
- fieldId: Ne,
1679
+ fieldId: Me,
1674
1680
  required: !0,
1675
- labelClassName: c(Ft.helperText, kt),
1681
+ labelClassName: c(It.helperText, kt),
1676
1682
  label: Z.instructionsLabel ?? "Instructions",
1677
1683
  labels: Z,
1678
- refinement: U,
1679
- disabled: Be || C,
1684
+ refinement: W,
1685
+ disabled: ze || C,
1680
1686
  ...Gt,
1681
1687
  children: /* @__PURE__ */ I("div", {
1682
1688
  className: "flex flex-1 flex-col gap-2",
1683
1689
  children: [
1684
1690
  !oe && /* @__PURE__ */ F(te, {
1685
- htmlFor: Ne,
1686
- className: c(Ft.helperText, kt),
1691
+ htmlFor: Me,
1692
+ className: c(It.helperText, kt),
1687
1693
  label: Z.instructionsLabel ?? "Instructions",
1688
1694
  required: !0
1689
1695
  }),
1690
1696
  /* @__PURE__ */ F("div", {
1691
- ref: Fe,
1697
+ ref: Pe,
1692
1698
  className: c(t, e, n),
1693
- children: /* @__PURE__ */ F(we, {
1699
+ children: /* @__PURE__ */ F(Ce, {
1694
1700
  fallback: /* @__PURE__ */ F(fe, { ariaLabel: Z.instructionsLoadingAriaLabel ?? "Loading" }),
1695
- children: /* @__PURE__ */ F(Ut, {
1696
- id: Ne,
1701
+ children: /* @__PURE__ */ F(Wt, {
1702
+ id: Me,
1697
1703
  ariaLabel: Z.instructionsLabel ?? "Instructions",
1698
- value: V.instructions,
1704
+ value: H.instructions,
1699
1705
  onChange: (e) => {
1700
- U.reset(), Le({ instructions: e });
1706
+ W.reset(), Ie({ instructions: e });
1701
1707
  },
1702
- theme: je,
1708
+ theme: Ae,
1703
1709
  showDragbar: !1,
1704
1710
  placeholder: Z.instructionsPlaceholder ?? "Write the skill instructions in Markdown"
1705
1711
  })
1706
1712
  })
1707
1713
  }),
1708
1714
  O?.instructions != null && /* @__PURE__ */ F(D, {
1709
- id: Pe,
1715
+ id: Ne,
1710
1716
  text: O.instructions
1711
1717
  })
1712
1718
  ]
1713
1719
  })
1714
1720
  });
1715
1721
  return /* @__PURE__ */ I("div", {
1716
- dir: Ee,
1717
- className: c("relative flex min-h-0 min-w-0 flex-1 flex-col", rt.root),
1722
+ dir: Te,
1723
+ className: c("relative flex min-h-0 min-w-0 flex-1 flex-col", nt.root),
1718
1724
  style: Nt,
1719
- ...Dt,
1725
+ ...X,
1720
1726
  children: [
1721
1727
  /* @__PURE__ */ F(Ct, {
1722
- isVisible: X && !ht,
1723
- labels: xe,
1728
+ isVisible: Dt && !pt,
1729
+ labels: be,
1724
1730
  titleClassName: $.dropOverlayTitleClassName,
1725
1731
  subtitleClassName: $.dropOverlaySubtitleClassName
1726
1732
  }),
1727
1733
  /* @__PURE__ */ F(Qe, {
1728
1734
  ...An,
1729
1735
  asideData: le,
1730
- asideSectionClassName: Vt,
1736
+ asideSectionClassName: Ht,
1731
1737
  isSubmitting: C,
1732
- metadataSectionClassName: Bt,
1738
+ metadataSectionClassName: Vt,
1733
1739
  metadata: /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F("div", {
1734
1740
  className: "desktop:hidden",
1735
- children: /* @__PURE__ */ F(wt, {
1741
+ children: /* @__PURE__ */ F(Tt, {
1736
1742
  label: Z.editingFileLabel ?? "Editing file",
1737
- fileName: jn ? W : Mn,
1738
- isExpanded: Tt,
1743
+ fileName: jn ? K : Mn,
1744
+ isExpanded: wt,
1739
1745
  onToggle: Et,
1740
1746
  labelClassName: $.editingFileLabelClassName,
1741
1747
  fileNameClassName: $.editingFileNameClassName,
1742
- children: wn(J.Mobile)
1748
+ children: wn(Y.Mobile)
1743
1749
  })
1744
1750
  }), /* @__PURE__ */ F("div", {
1745
1751
  className: "hidden desktop:block",
1746
- children: wn(J.Desktop)
1752
+ children: wn(Y.Desktop)
1747
1753
  })] }),
1748
1754
  alert: Pn,
1749
1755
  setupTitle: Nn,
1750
- setupSectionClassName: Ht,
1756
+ setupSectionClassName: Ut,
1751
1757
  setup: jn ? /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(tt, {
1752
1758
  values: Tn,
1753
1759
  errors: En,
1754
1760
  onChange: On,
1755
- fields: Lt,
1761
+ fields: Rt,
1756
1762
  isDescriptionRequired: !0,
1757
1763
  isNameReadOnly: re,
1758
1764
  nameReadOnlyTooltip: Z.nameReadOnlyTooltip ?? "The skill name can't be changed after creation",
1759
1765
  nameCaption: O?.name ? void 0 : Z.nameCaption ?? "Lowercase letters and hyphens only, no spaces. We'll reformat automatically if needed.",
1760
1766
  renderDescription: kn,
1761
1767
  labels: Dn
1762
- }), Fn] }) : /* @__PURE__ */ I(P, { children: [on && K !== $t && /* @__PURE__ */ F(Pt, {
1763
- folderPath: K,
1768
+ }), Fn] }) : /* @__PURE__ */ I(P, { children: [on && G !== $t && /* @__PURE__ */ F(Ft, {
1769
+ folderPath: G,
1764
1770
  entries: an,
1765
1771
  onOpen: cn,
1766
1772
  rootLabel: Z.folderPreviewRootLabel,
@@ -1771,27 +1777,27 @@ var rt = {
1771
1777
  emptyDescription: Z.folderEmptyDescription,
1772
1778
  itemCountLabel: Z.folderItemCountLabel,
1773
1779
  itemCountClassName: $.folderItemCountClassName
1774
- }), rn?.kind === G.File && /* @__PURE__ */ F("div", {
1780
+ }), rn?.kind === q.File && /* @__PURE__ */ F("div", {
1775
1781
  className: "flex h-[max(320px,60dvh)] min-h-0 min-w-0 flex-none flex-col desktop:h-auto desktop:flex-1",
1776
1782
  children: se ?? /* @__PURE__ */ F(y, { text: Z.supportingFileNote ?? "This supporting file is included in the skill package as-is. Remove it from the Files panel to replace its content." })
1777
1783
  })] })
1778
1784
  }),
1779
- /* @__PURE__ */ F(jt, {
1780
- isOpen: ht,
1781
- onClose: () => yt(!1),
1785
+ /* @__PURE__ */ F(Mt, {
1786
+ isOpen: pt,
1787
+ onClose: () => ht(!1),
1782
1788
  fileActions: Xt,
1783
- mode: bt.mode,
1784
- targetFolderPath: bt.targetFolderPath,
1785
- initialFiles: bt.initialFiles,
1786
- initialEntries: bt.initialEntries,
1789
+ mode: yt.mode,
1790
+ targetFolderPath: yt.targetFolderPath,
1791
+ initialFiles: yt.initialFiles,
1792
+ initialEntries: yt.initialEntries,
1787
1793
  existingFilePaths: _n,
1788
1794
  onCommitted: (e) => {
1789
- e.some((e) => e.replacesExisting) && Ye(!0);
1795
+ e.some((e) => e.replacesExisting) && Je(!0);
1790
1796
  },
1791
1797
  messageClassName: $.uploadMessageClassName,
1792
1798
  rowCaptionClassName: $.uploadRowCaptionClassName,
1793
- labels: xe,
1794
- dialogColors: Wt,
1799
+ labels: be,
1800
+ dialogColors: Pt,
1795
1801
  colors: {
1796
1802
  invalidDropZoneBorder: Q?.uploadInvalidDropZoneBorder,
1797
1803
  rowBorder: Q?.uploadRowBorder
@@ -1808,10 +1814,10 @@ var rt = {
1808
1814
  createLabel: Z.createFolderConfirmLabel ?? "Create",
1809
1815
  cancelLabel: Z.cancelLabel ?? "Cancel",
1810
1816
  closeAriaLabel: Z.createFolderCloseAriaLabel ?? "Close",
1811
- dialogColors: Wt
1817
+ dialogColors: Pt
1812
1818
  })
1813
1819
  ]
1814
1820
  });
1815
1821
  };
1816
1822
  //#endregion
1817
- export { rt as SKILL_EDITOR_CLASS, Wt as SkillEditor, Tt as SkillFileCandidateKind, G as SkillFileNodeKind, _t as SkillFileUploadMode, Et as SkillFileValidationStatus };
1823
+ export { nt as SKILL_EDITOR_CLASS, Gt as SkillEditor, Et as SkillFileCandidateKind, q as SkillFileNodeKind, _t as SkillFileUploadMode, Dt as SkillFileValidationStatus };