@epam/ai-dial-publish-panel 1.3.0-dev.253 → 1.3.0-dev.256

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
@@ -1,9 +1,9 @@
1
1
  import { useCallback as e, useEffect as t, useId as n, useMemo as r, useRef as i, useState as a } from "react";
2
- import { ButtonVariant as o, Checkbox as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, DialFileNodeType as u, ErrorText as d, GhostButton as f, GhostIconButton as p, Highlight as m, Input as h, LiveRegion as g, LiveRegionElement as _, NeutralButton as v, Notification as ee, NotificationType as y, NotificationVariant as b, Search as x, Select as S, SideDrawer as te, Spinner as C, Tag as w, TagInput as T } from "@epam/ai-dial-ui-kit";
3
- import { ResourceSummary as E, TAG_INPUT_TAG_CLASS_NAME as D, buildCssVars as O, mergeClasses as k } from "@epam/ai-dial-chat-shared";
4
- import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
5
- import { IconFolderPlus as ne, IconPlus as re, IconTrashX as ie } from "@tabler/icons-react";
6
- import { DialFileNodeType as N, DialFoldersTree as ae } from "@epam/ai-dial-react-file-manager";
2
+ import { ButtonVariant as o, Checkbox as s, DIAL_ICON_SIZE as c, DIAL_KIT_ICON_STROKE as l, DialFileNodeType as u, ErrorText as d, GhostButton as f, GhostIconButton as p, Highlight as m, Input as h, LiveRegion as g, LiveRegionElement as _, NeutralButton as v, Notification as y, NotificationType as b, NotificationVariant as x, Search as S, Select as C, SideDrawer as ee, Spinner as w, Tag as T, TagInput as E } from "@epam/ai-dial-ui-kit";
3
+ import { ResourceSummary as D, TAG_INPUT_TAG_CLASS_NAME as O, buildCssVars as k, mergeClasses as A } from "@epam/ai-dial-chat-shared";
4
+ import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
5
+ import { IconFolderPlus as te, IconPlus as ne, IconTrashX as re } from "@tabler/icons-react";
6
+ import { DialFileNodeType as ie, DialFoldersTree as ae } from "@epam/ai-dial-react-file-manager";
7
7
  //#region src/models/publish.ts
8
8
  var P = /* @__PURE__ */ function(e) {
9
9
  return e.Equal = "EQUAL", e.Contain = "CONTAIN", e.Regex = "REGEX", e;
@@ -33,14 +33,14 @@ var P = /* @__PURE__ */ function(e) {
33
33
  calloutKind: F.None,
34
34
  isSubmitDisabled: !0,
35
35
  isSubmitLoading: !1
36
- }, se = 864e5, I = (e, t = Date.now(), n) => {
37
- let r = Math.floor((t - e) / se);
36
+ }, I = 864e5, L = (e, t = Date.now(), n) => {
37
+ let r = Math.floor((t - e) / I);
38
38
  return r <= 0 ? "Today" : r === 1 ? "Yesterday" : r < 7 ? `${r} days ago` : new Date(e).toLocaleDateString(n, {
39
39
  month: "short",
40
40
  day: "numeric",
41
41
  year: "numeric"
42
42
  });
43
- }, L = (e, t, n) => t.length === 0 ? [...e, {
43
+ }, R = (e, t, n) => t.length === 0 ? [...e, {
44
44
  path: [n],
45
45
  name: n
46
46
  }] : e.map((e) => e.path.join("/") === t.join("/") ? {
@@ -51,46 +51,46 @@ var P = /* @__PURE__ */ function(e) {
51
51
  }]
52
52
  } : {
53
53
  ...e,
54
- children: e.children ? L(e.children, t, n) : e.children
55
- }), R = (e, t, n) => {
54
+ children: e.children ? R(e.children, t, n) : e.children
55
+ }), z = (e, t, n) => {
56
56
  let r = [...t, n].join("/");
57
57
  return t.length === 0 ? e.filter((e) => e.path.join("/") !== r) : e.map((e) => e.path.join("/") === t.join("/") ? {
58
58
  ...e,
59
59
  children: (e.children ?? []).filter((e) => e.path.join("/") !== r)
60
60
  } : {
61
61
  ...e,
62
- children: e.children ? R(e.children, t, n) : e.children
62
+ children: e.children ? z(e.children, t, n) : e.children
63
63
  });
64
- }, ce = ({ item: n, history: i, folderItems: o, hasWriteAccess: s = () => !0, defaultAuthor: c = "", onCreateFolder: l, onPublish: u, onPublishSuccess: d, onPublishError: f, onFetchExistingRules: p }) => {
64
+ }, B = ({ item: n, history: i, folderItems: o, hasWriteAccess: s = () => !0, defaultAuthor: c = "", onCreateFolder: l, onPublish: u, onPublishSuccess: d, onPublishError: f, onFetchExistingRules: p }) => {
65
65
  let [m, h] = a(o);
66
66
  t(() => {
67
67
  h(o);
68
68
  }, [o]);
69
- let [g, _] = a(), [v, ee] = a(!1), [y, b] = a(!1), [x, S] = a([]), [te, C] = a(!1), [w, T] = a(!1), [E, D] = a(c), [O, k] = a(!1), [A, j] = a(!1);
69
+ let [g, _] = a(), [v, y] = a(!1), [b, x] = a(!1), [S, C] = a([]), [ee, w] = a(!1), [T, E] = a(!1), [D, O] = a(c), [k, A] = a(!1), [j, M] = a(!1);
70
70
  t(() => {
71
- A || D(c);
72
- }, [c, A]);
73
- let M = e((e) => {
74
- j(!0), D(e);
71
+ j || O(c);
72
+ }, [c, j]);
73
+ let N = e((e) => {
74
+ M(!0), O(e);
75
75
  }, []);
76
76
  t(() => {
77
77
  if (g == null) {
78
- S([]), T(!1);
78
+ C([]), E(!1);
79
79
  return;
80
80
  }
81
81
  if (!p) return;
82
82
  let e = !1;
83
- return C(!0), T(!1), p(g).then((t) => {
84
- e || S(t);
83
+ return w(!0), E(!1), p(g).then((t) => {
84
+ e || C(t);
85
85
  }).catch(() => {
86
- e || T(!0);
86
+ e || E(!0);
87
87
  }).finally(() => {
88
- e || C(!1);
88
+ e || w(!1);
89
89
  }), () => {
90
90
  e = !0;
91
91
  };
92
92
  }, [g]);
93
- let ne = r(() => {
93
+ let te = r(() => {
94
94
  if (!g) return !1;
95
95
  let e = g.join("/");
96
96
  return i.some((t) => t.folderPath.join("/") === e ? n.version == null || t.version === n.version : !1);
@@ -98,126 +98,126 @@ var P = /* @__PURE__ */ function(e) {
98
98
  i,
99
99
  n.version,
100
100
  g
101
- ]), re = e(async (e, t) => {
102
- h((n) => L(n, e, t));
101
+ ]), ne = e(async (e, t) => {
102
+ h((n) => R(n, e, t));
103
103
  try {
104
104
  await l?.(e, t);
105
105
  } catch {
106
- h((n) => R(n, e, t)), b(!0);
106
+ h((n) => z(n, e, t)), x(!0);
107
107
  }
108
- }, [l]), ie = e(async () => {
108
+ }, [l]), re = e(async () => {
109
109
  if (!g) return !1;
110
- ee(!0), b(!1);
110
+ y(!0), x(!1);
111
111
  try {
112
- return await u(n, g, x, E.trim(), O), d?.(n, g), !0;
112
+ return await u(n, g, S, D.trim(), k), d?.(n, g), !0;
113
113
  } catch (e) {
114
- return b(!0), f?.(n, g, e), !1;
114
+ return x(!0), f?.(n, g, e), !1;
115
115
  } finally {
116
- ee(!1);
116
+ y(!1);
117
117
  }
118
118
  }, [
119
- E,
119
+ D,
120
120
  n,
121
121
  u,
122
122
  f,
123
123
  d,
124
- O,
125
- x,
124
+ k,
125
+ S,
126
126
  g
127
- ]), N = e(() => {
128
- h(o), _(void 0), b(!1), S([]), T(!1), D(c), j(!1), k(!1);
127
+ ]), ie = e(() => {
128
+ h(o), _(void 0), x(!1), C([]), E(!1), O(c), M(!1), A(!1);
129
129
  }, [c, o]);
130
130
  return {
131
131
  folderItems: m,
132
132
  selectedFolderPath: g,
133
133
  setSelectedFolderPath: _,
134
- handleCreateFolder: re,
135
- hasExistingPublicationInFolder: ne,
134
+ handleCreateFolder: ne,
135
+ hasExistingPublicationInFolder: te,
136
136
  hasWriteAccess: !g || s(g),
137
137
  isSubmitting: v,
138
- hasSubmitError: y,
139
- handleSubmit: ie,
140
- reset: N,
141
- rules: x,
142
- setRules: S,
143
- author: E,
144
- setAuthor: M,
145
- publishCredentials: O,
146
- setPublishCredentials: k,
147
- isRulesLoading: te,
148
- hasRulesLoadError: w
138
+ hasSubmitError: b,
139
+ handleSubmit: re,
140
+ reset: ie,
141
+ rules: S,
142
+ setRules: C,
143
+ author: D,
144
+ setAuthor: N,
145
+ publishCredentials: k,
146
+ setPublishCredentials: A,
147
+ isRulesLoading: ee,
148
+ hasRulesLoadError: T
149
149
  };
150
- }, le = (e, t) => {
150
+ }, se = (e, t) => {
151
151
  let n = t.trim().toLowerCase();
152
152
  return n ? e.reduce((e, r) => {
153
- let i = r.children ? le(r.children, t) : void 0;
153
+ let i = r.children ? se(r.children, t) : void 0;
154
154
  return r.name.toLowerCase().includes(n) ? e.push(r) : i?.length && e.push({
155
155
  ...r,
156
156
  children: i
157
157
  }), e;
158
158
  }, []) : e;
159
- }, z = (e, t) => e.localeCompare(t, void 0, {
159
+ }, V = (e, t) => e.localeCompare(t, void 0, {
160
160
  sensitivity: "base",
161
161
  numeric: !0
162
- }), ue = (e) => [...e].sort((e, t) => z(e.name, t.name)).map((e) => e.children ? {
162
+ }), ce = (e) => [...e].sort((e, t) => V(e.name, t.name)).map((e) => e.children ? {
163
163
  ...e,
164
- children: ue(e.children)
165
- } : e), B = (e, t, n) => {
164
+ children: ce(e.children)
165
+ } : e), H = (e, t, n) => {
166
166
  let [r, ...i] = t;
167
167
  if (r == null) return e;
168
168
  let a = [...n, r], o = e.find((e) => e.name === r);
169
169
  return o ? i.length ? e.map((e) => e === o ? {
170
170
  ...e,
171
- children: B(e.children ?? [], i, a)
171
+ children: H(e.children ?? [], i, a)
172
172
  } : e) : e : [...e, {
173
173
  path: a,
174
174
  name: r,
175
- children: i.length ? B([], i, a) : void 0
175
+ children: i.length ? H([], i, a) : void 0
176
176
  }];
177
- }, V = (e, t) => t.reduce((e, t) => t.length ? B(e, t, []) : e, e), H = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? H(e.children) : []]), U = (e) => e.join("/"), W = (e) => e.split("/").filter(Boolean), de = (e) => e.map((e) => {
178
- let t = U(e.path);
177
+ }, U = (e, t) => t.reduce((e, t) => t.length ? H(e, t, []) : e, e), W = (e) => e.flatMap((e) => [e.path.join("/"), ...e.children ? W(e.children) : []]), G = (e) => e.join("/"), K = (e) => e.split("/").filter(Boolean), le = (e) => e.map((e) => {
178
+ let t = G(e.path);
179
179
  return {
180
180
  path: t,
181
181
  name: e.name,
182
182
  folderId: t,
183
183
  nodeType: u.FOLDER,
184
- items: e.children ? de(e.children) : void 0
184
+ items: e.children ? le(e.children) : void 0
185
185
  };
186
- }), G = /[/\\:;,={}&"]/, K = (e, t, n) => {
186
+ }), q = /[/\\:;,={}&"]/, ue = (e, t, n) => {
187
187
  let r = e.trim();
188
- return r ? r.includes("..") || G.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
189
- }, q = (e, t) => {
188
+ return r ? r.includes("..") || q.test(r) ? n.invalid : t.some((e) => e.toLowerCase() === r.toLowerCase()) ? n.duplicate : null : n.empty;
189
+ }, J = (e, t) => {
190
190
  let n = new Set(t.map((e) => e.toLowerCase()));
191
191
  if (!n.has(e.toLowerCase())) return e;
192
192
  let r = 2;
193
193
  for (; n.has(`${e} ${r}`.toLowerCase());) r += 1;
194
194
  return `${e} ${r}`;
195
- }, fe = (e, t) => {
195
+ }, de = (e, t) => {
196
196
  if (t.length === 0) return e.map((e) => e.name);
197
- let n = U(t), r = (e) => {
197
+ let n = G(t), r = (e) => {
198
198
  for (let t of e) {
199
- if (U(t.path) === n) return t;
199
+ if (G(t.path) === n) return t;
200
200
  let e = t.children ? r(t.children) : void 0;
201
201
  if (e) return e;
202
202
  }
203
203
  };
204
204
  return (r(e)?.children ?? []).map((e) => e.name);
205
- }, J = {
205
+ }, Y = {
206
206
  dialog: "_dialog_jqcm2_5",
207
207
  error: "_error_jqcm2_14",
208
208
  selectField: "_selectField_jqcm2_28",
209
209
  selectFieldOpen: "_selectFieldOpen_jqcm2_40"
210
- }, pe = 20, Y = 200, me = 8, he = (e) => {
210
+ }, fe = 20, X = 200, pe = 8, me = (e) => {
211
211
  let t = e.trim();
212
- if (t.length === 0 || t.length > Y) return !1;
212
+ if (t.length === 0 || t.length > X) return !1;
213
213
  try {
214
214
  return new RegExp(t) instanceof RegExp;
215
215
  } catch {
216
216
  return !1;
217
217
  }
218
- }, ge = ({ sourceOptions: e, onSave: o, onCancel: s, disabled: c = !1, maxTargets: l = pe, labels: u = {}, errorClassName: p = "dial-tiny-text", styles: g = {} }) => {
218
+ }, he = ({ sourceOptions: e, onSave: o, onCancel: s, disabled: c = !1, maxTargets: l = fe, labels: u = {}, errorClassName: p = "dial-tiny-text", styles: g = {} }) => {
219
219
  let _ = {
220
- ...O({
220
+ ...k({
221
221
  "--pare-mobile-bg": g.colors?.mobileBackground,
222
222
  "--pare-bg": g.colors?.background,
223
223
  "--pare-error-text": g.colors?.errorText,
@@ -227,129 +227,129 @@ var P = /* @__PURE__ */ function(e) {
227
227
  "--pare-select-border-focus": g.colors?.selectBorderFocus
228
228
  }),
229
229
  ...g.cssVars
230
- }, { sourceLabel: ee = "Source", sourcePlaceholder: y = "Select...", functionLabel: b = "Function", equalOptionLabel: x = "Equal", containOptionLabel: te = "Contain", regexOptionLabel: C = "Regex", targetsLabel: w = "Targets", targetsPlaceholder: E = "Add a target", targetsHintLabel: A = "Press Enter or comma to add a target.", patternLabel: ne = "Pattern", patternPlaceholder: re = "Enter a regular expression", invalidRegexError: ie = "Enter a valid regular expression.", requiredFieldError: N = "This field is required.", targetsRequiredError: ae = "Add at least one target.", saveLabel: F = "Save", cancelLabel: oe = "Cancel", dialogAriaLabel: se = "Add access rule" } = u, I = n(), L = n(), R = n(), ce = n(), le = i(null);
230
+ }, { sourceLabel: y = "Source", sourcePlaceholder: b = "Select...", functionLabel: x = "Function", equalOptionLabel: S = "Equal", containOptionLabel: ee = "Contain", regexOptionLabel: w = "Regex", targetsLabel: T = "Targets", targetsPlaceholder: D = "Add a target", targetsHintLabel: j = "Press Enter or comma to add a target.", patternLabel: te = "Pattern", patternPlaceholder: ne = "Enter a regular expression", invalidRegexError: re = "Enter a valid regular expression.", requiredFieldError: ie = "This field is required.", targetsRequiredError: ae = "Add at least one target.", saveLabel: F = "Save", cancelLabel: oe = "Cancel", dialogAriaLabel: I = "Add access rule" } = u, L = n(), R = n(), z = n(), B = n(), se = i(null);
231
231
  t(() => {
232
- le.current?.focus();
232
+ se.current?.focus();
233
233
  }, []);
234
- let [z, ue] = a(), [B, V] = a(), [H, U] = a([]), [W, de] = a(""), [G, K] = a(!1), [q, fe] = a(""), [Y, ge] = a(!1), [X, _e] = a(!1), ve = k(J.selectField, G && J.selectFieldOpen), ye = k(J.selectField, Y && J.selectFieldOpen), Z = r(() => e.map((e) => ({
234
+ let [V, ce] = a(), [H, U] = a(), [W, G] = a([]), [K, le] = a(""), [q, ue] = a(!1), [J, de] = a(""), [X, he] = a(!1), [Z, ge] = a(!1), _e = A(Y.selectField, q && Y.selectFieldOpen), ve = A(Y.selectField, X && Y.selectFieldOpen), Q = r(() => e.map((e) => ({
235
235
  value: e,
236
236
  label: e,
237
- labelNode: q.trim() ? /* @__PURE__ */ j(m, {
237
+ labelNode: J.trim() ? /* @__PURE__ */ M(m, {
238
238
  text: e,
239
- query: q,
239
+ query: J,
240
240
  maxLines: 1
241
241
  }) : void 0
242
- })), [e, q]), be = r(() => [
242
+ })), [e, J]), ye = r(() => [
243
243
  {
244
244
  value: P.Equal,
245
- label: x
245
+ label: S
246
246
  },
247
247
  {
248
248
  value: P.Contain,
249
- label: te
249
+ label: ee
250
250
  },
251
251
  {
252
252
  value: P.Regex,
253
- label: C
253
+ label: w
254
254
  }
255
255
  ], [
256
- x,
257
- te,
258
- C
259
- ]), Q = B === P.Regex, $ = he(W), xe = z != null && B != null && (Q ? $ : H.length > 0);
260
- return /* @__PURE__ */ M("div", {
261
- ref: le,
256
+ S,
257
+ ee,
258
+ w
259
+ ]), be = H === P.Regex, $ = me(K), xe = V != null && H != null && (be ? $ : W.length > 0);
260
+ return /* @__PURE__ */ N("div", {
261
+ ref: se,
262
262
  role: "dialog",
263
263
  "aria-modal": "true",
264
- "aria-label": se,
264
+ "aria-label": I,
265
265
  tabIndex: -1,
266
266
  onKeyDown: (e) => {
267
267
  e.key === "Escape" && (e.stopPropagation(), s());
268
268
  },
269
269
  style: _,
270
- className: k("fixed inset-0 z-[60] flex flex-col gap-3 overflow-y-auto p-4", "desktop:static desktop:z-auto desktop:flex-none desktop:overflow-visible desktop:rounded-lg desktop:p-3", J.dialog),
270
+ className: A("fixed inset-0 z-60 flex flex-col gap-3 overflow-y-auto p-4", "desktop:static desktop:z-auto desktop:flex-none desktop:overflow-visible desktop:rounded-lg desktop:p-3", Y.dialog),
271
271
  children: [
272
- /* @__PURE__ */ j(S, {
273
- id: L,
274
- labelProps: { label: ee },
275
- options: Z,
276
- value: z,
272
+ /* @__PURE__ */ M(C, {
273
+ id: R,
274
+ labelProps: { label: y },
275
+ options: Q,
276
+ value: V,
277
277
  onChange: (e) => {
278
- ue(Array.isArray(e) ? e[0] : e), K(!1);
278
+ ce(Array.isArray(e) ? e[0] : e), ue(!1);
279
279
  },
280
- placeholder: y,
281
- searchable: e.length > me,
282
- searchPlaceholder: y,
283
- onSearchQueryChange: fe,
280
+ placeholder: b,
281
+ searchable: e.length > pe,
282
+ searchPlaceholder: b,
283
+ onSearchQueryChange: de,
284
284
  disabled: c,
285
- open: G,
286
- onOpenChange: K,
287
- fieldClassName: ve,
288
- invalid: X && z == null,
289
- error: X && z == null ? N : void 0
285
+ open: q,
286
+ onOpenChange: ue,
287
+ fieldClassName: _e,
288
+ invalid: Z && V == null,
289
+ error: Z && V == null ? ie : void 0
290
290
  }),
291
- /* @__PURE__ */ j(S, {
292
- labelProps: { label: b },
293
- id: R,
294
- options: be,
295
- value: B,
291
+ /* @__PURE__ */ M(C, {
292
+ labelProps: { label: x },
293
+ id: z,
294
+ options: ye,
295
+ value: H,
296
296
  onChange: (e) => {
297
297
  let t = Array.isArray(e) ? e[0] : e;
298
- B === P.Regex != (t === P.Regex) && (U([]), de("")), V(t), ge(!1);
298
+ H === P.Regex != (t === P.Regex) && (G([]), le("")), U(t), he(!1);
299
299
  },
300
- placeholder: b,
300
+ placeholder: x,
301
301
  disabled: c,
302
- open: Y,
303
- onOpenChange: ge,
304
- fieldClassName: ye,
305
- invalid: X && B == null,
306
- error: X && B == null ? N : void 0
302
+ open: X,
303
+ onOpenChange: he,
304
+ fieldClassName: ve,
305
+ invalid: Z && H == null,
306
+ error: Z && H == null ? ie : void 0
307
307
  }),
308
- Q ? /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(h, {
309
- id: `${I}-input`,
310
- labelProps: { label: ne },
311
- placeholder: re,
312
- value: W,
313
- onChange: (e) => de(e ?? ""),
314
- invalid: (W.length > 0 || X) && !$,
315
- "aria-describedby": (W.length > 0 || X) && !$ ? I : void 0,
308
+ be ? /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M(h, {
309
+ id: `${L}-input`,
310
+ labelProps: { label: te },
311
+ placeholder: ne,
312
+ value: K,
313
+ onChange: (e) => le(e ?? ""),
314
+ invalid: (K.length > 0 || Z) && !$,
315
+ "aria-describedby": (K.length > 0 || Z) && !$ ? L : void 0,
316
316
  disabled: c
317
- }), (W.length > 0 || X) && !$ && /* @__PURE__ */ j(d, {
318
- id: I,
319
- className: k("mt-1 block", p, J.error),
320
- text: ie
321
- })] }) : /* @__PURE__ */ j(T, {
322
- id: ce,
323
- labelProps: { label: w },
324
- placeholder: E,
325
- caption: X && H.length === 0 ? void 0 : A,
326
- error: X && H.length === 0 ? ae : void 0,
327
- invalid: X && H.length === 0,
328
- value: H,
317
+ }), (K.length > 0 || Z) && !$ && /* @__PURE__ */ M(d, {
318
+ id: L,
319
+ className: A("mt-1 block", p, Y.error),
320
+ text: re
321
+ })] }) : /* @__PURE__ */ M(E, {
322
+ id: B,
323
+ labelProps: { label: T },
324
+ placeholder: D,
325
+ caption: Z && W.length === 0 ? void 0 : j,
326
+ error: Z && W.length === 0 ? ae : void 0,
327
+ invalid: Z && W.length === 0,
328
+ value: W,
329
329
  onChange: (e) => {
330
330
  let t = [];
331
331
  for (let n of e) {
332
332
  let e = n.trim();
333
333
  if (!(e.length === 0 || t.includes(e)) && (t.push(e), t.length >= l)) break;
334
334
  }
335
- U(t);
335
+ G(t);
336
336
  },
337
337
  disabled: c,
338
- tagClassName: D
338
+ tagClassName: O
339
339
  }),
340
- /* @__PURE__ */ M("div", {
340
+ /* @__PURE__ */ N("div", {
341
341
  className: "mt-auto flex justify-end gap-2 desktop:mt-2",
342
- children: [/* @__PURE__ */ j(f, {
342
+ children: [/* @__PURE__ */ M(f, {
343
343
  label: oe,
344
344
  onClick: s,
345
345
  disabled: c
346
- }), /* @__PURE__ */ j(v, {
346
+ }), /* @__PURE__ */ M(v, {
347
347
  label: F,
348
348
  onClick: () => {
349
- !xe || z == null || B == null ? _e(!0) : o({
350
- source: z,
351
- function: B,
352
- targets: Q ? [W.trim()] : H
349
+ !xe || V == null || H == null ? ge(!0) : o({
350
+ source: V,
351
+ function: H,
352
+ targets: be ? [K.trim()] : W
353
353
  });
354
354
  },
355
355
  disabled: c
@@ -357,164 +357,164 @@ var P = /* @__PURE__ */ function(e) {
357
357
  })
358
358
  ]
359
359
  });
360
- }, X = {
360
+ }, Z = {
361
361
  ruleRow: "_ruleRow_nx0en_1",
362
362
  heading: "_heading_nx0en_5",
363
363
  hint: "_hint_nx0en_9",
364
364
  loading: "_loading_nx0en_13",
365
365
  ruleText: "_ruleText_nx0en_17"
366
- }, _e = 20, ve = (e, t) => e === P.Equal ? t.equal : e === P.Contain ? t.contain : t.regex, ye = ({ rules: e, onRulesChange: r, sourceOptions: s, folderName: u, disabled: d = !1, isLoading: m = !1, hasLoadError: h = !1, maxRules: v = _e, maxTargetsPerRule: x, labels: S = {}, headingClassName: te = "dial-body-semi-text", hintClassName: w = "dial-small-text", loadingClassName: T = "dial-small-text", ruleTextClassName: E = "dial-small-text", ruleSourceClassName: D = "dial-small-semi-text", styles: A = {} }) => {
367
- let ne = {
368
- ...O({
369
- "--par-rule-bg": A.colors?.ruleBackground,
370
- "--par-heading-text": A.colors?.headingText,
371
- "--par-hint-text": A.colors?.hintText,
372
- "--par-loading-text": A.colors?.loadingText,
373
- "--par-rule-text": A.colors?.ruleText
366
+ }, ge = 20, _e = (e, t) => e === P.Equal ? t.equal : e === P.Contain ? t.contain : t.regex, ve = ({ rules: e, onRulesChange: r, sourceOptions: s, folderName: u, disabled: d = !1, isLoading: m = !1, hasLoadError: h = !1, maxRules: v = ge, maxTargetsPerRule: S, labels: C = {}, headingClassName: ee = "dial-body-semi-text", hintClassName: T = "dial-small-text", loadingClassName: E = "dial-small-text", ruleTextClassName: D = "dial-small-text", ruleSourceClassName: O = "dial-small-semi-text", styles: j = {} }) => {
367
+ let te = {
368
+ ...k({
369
+ "--par-rule-bg": j.colors?.ruleBackground,
370
+ "--par-heading-text": j.colors?.headingText,
371
+ "--par-hint-text": j.colors?.hintText,
372
+ "--par-loading-text": j.colors?.loadingText,
373
+ "--par-rule-text": j.colors?.ruleText
374
374
  }),
375
- ...A.cssVars
376
- }, { heading: N = "Allow access if all match", folderScopeHint: ae = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: P = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: F = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: oe = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: se = "Add rule", clearAllLabel: I = "Clear all", orSeparatorLabel: L = "Or", removeRuleAriaLabelTemplate: R = "Remove rule for {source}: {targets}", equalFunctionLabel: ce = "Equal", containFunctionLabel: le = "Contain", regexFunctionLabel: z = "Regex", loadingLabel: ue = "Loading existing rules…", loadErrorLabel: B = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: V = "Rule added.", ruleRemovedAnnouncement: H = "Rule removed.", rulesClearedAnnouncement: U = "All rules cleared.", rulesLoadedAnnouncement: W = "Existing rules loaded for the selected folder.", editorLabels: de } = S, G = n(), [K, q] = a(!1), [fe, J] = a(""), pe = i(null), Y = i(m);
375
+ ...j.cssVars
376
+ }, { heading: ie = "Allow access if all match", folderScopeHint: ae = "These rules apply to \"{folder}\". Selecting another folder loads that folder's own rules instead.", noFolderScopeHint: P = "Access rules apply to the destination folder — pick a folder above to set its rules.", rulesWithoutFolderWarning: F = "These rules have no destination yet. Select a folder above to apply them.", maxRulesReachedLabel: oe = "Rule limit reached ({max}). Remove a rule to add another.", addRuleLabel: I = "Add rule", clearAllLabel: L = "Clear all", orSeparatorLabel: R = "Or", removeRuleAriaLabelTemplate: z = "Remove rule for {source}: {targets}", equalFunctionLabel: B = "Equal", containFunctionLabel: se = "Contain", regexFunctionLabel: V = "Regex", loadingLabel: ce = "Loading existing rules…", loadErrorLabel: H = "Couldn't load existing rules for this folder. You can still add rules manually.", ruleAddedAnnouncement: U = "Rule added.", ruleRemovedAnnouncement: W = "Rule removed.", rulesClearedAnnouncement: G = "All rules cleared.", rulesLoadedAnnouncement: K = "Existing rules loaded for the selected folder.", editorLabels: le } = C, q = n(), [ue, J] = a(!1), [de, Y] = a(""), fe = i(null), X = i(m);
377
377
  t(() => {
378
- Y.current && !m && e.length > 0 && J(W), Y.current = m;
378
+ X.current && !m && e.length > 0 && Y(K), X.current = m;
379
379
  }, [
380
380
  m,
381
381
  e,
382
- W
382
+ K
383
383
  ]);
384
- let me = () => {
385
- pe.current = document.activeElement, q(!0);
386
- }, he = () => {
387
- q(!1), pe.current?.focus?.();
388
- }, ye = (t) => {
389
- r([...e, t]), J(V), he();
390
- }, Z = (t) => {
391
- r(e.filter((e, n) => n !== t)), J(H);
392
- }, be = () => {
393
- r([]), J(U);
394
- }, Q = {
395
- equal: ce,
396
- contain: le,
397
- regex: z
384
+ let pe = () => {
385
+ fe.current = document.activeElement, J(!0);
386
+ }, me = () => {
387
+ J(!1), fe.current?.focus?.();
388
+ }, ve = (t) => {
389
+ r([...e, t]), Y(U), me();
390
+ }, Q = (t) => {
391
+ r(e.filter((e, n) => n !== t)), Y(W);
392
+ }, ye = () => {
393
+ r([]), Y(G);
394
+ }, be = {
395
+ equal: B,
396
+ contain: se,
397
+ regex: V
398
398
  }, $ = e.length >= v, xe = d || $, Se = u != null && u !== "";
399
- return /* @__PURE__ */ M("div", {
399
+ return /* @__PURE__ */ N("div", {
400
400
  role: "group",
401
- "aria-labelledby": G,
402
- style: ne,
403
- className: k(d && "pointer-events-none opacity-60"),
401
+ "aria-labelledby": q,
402
+ style: te,
403
+ className: A(d && "pointer-events-none opacity-60"),
404
404
  children: [
405
- /* @__PURE__ */ j(g, {
405
+ /* @__PURE__ */ M(g, {
406
406
  visuallyHidden: !0,
407
407
  as: _.Span,
408
- children: fe
408
+ children: de
409
409
  }),
410
- /* @__PURE__ */ M("div", {
410
+ /* @__PURE__ */ N("div", {
411
411
  className: "mb-1 flex items-center justify-between gap-2",
412
- children: [/* @__PURE__ */ j("div", {
413
- id: G,
414
- className: k(te, X.heading),
415
- children: N
416
- }), e.length > 0 && /* @__PURE__ */ j(f, {
412
+ children: [/* @__PURE__ */ M("div", {
413
+ id: q,
414
+ className: A(ee, Z.heading),
415
+ children: ie
416
+ }), e.length > 0 && /* @__PURE__ */ M(f, {
417
417
  variant: o.Primary,
418
- label: I,
419
- onClick: be,
418
+ label: L,
419
+ onClick: ye,
420
420
  disabled: d
421
421
  })]
422
422
  }),
423
- /* @__PURE__ */ j("p", {
424
- className: k("mb-2", w, X.hint),
423
+ /* @__PURE__ */ M("p", {
424
+ className: A("mb-2", T, Z.hint),
425
425
  children: Se ? ae.replace("{folder}", u) : P
426
426
  }),
427
- e.length > 0 && !Se && /* @__PURE__ */ j("div", {
427
+ e.length > 0 && !Se && /* @__PURE__ */ M("div", {
428
428
  className: "mb-2",
429
- children: /* @__PURE__ */ j(ee, {
430
- type: y.SectionMessage,
431
- variant: b.Warning,
429
+ children: /* @__PURE__ */ M(y, {
430
+ type: b.SectionMessage,
431
+ variant: x.Warning,
432
432
  message: F
433
433
  })
434
434
  }),
435
- m && /* @__PURE__ */ M("div", {
436
- className: k("mb-2 flex items-center gap-2", T, X.loading),
437
- children: [/* @__PURE__ */ j(C, {
435
+ m && /* @__PURE__ */ N("div", {
436
+ className: A("mb-2 flex items-center gap-2", E, Z.loading),
437
+ children: [/* @__PURE__ */ M(w, {
438
438
  size: 16,
439
- ariaLabel: ue
440
- }), /* @__PURE__ */ j("span", { children: ue })]
439
+ ariaLabel: ce
440
+ }), /* @__PURE__ */ M("span", { children: ce })]
441
441
  }),
442
- h && /* @__PURE__ */ j("div", {
442
+ h && /* @__PURE__ */ M("div", {
443
443
  className: "mb-2",
444
- children: /* @__PURE__ */ j(ee, {
445
- type: y.SectionMessage,
446
- variant: b.Warning,
447
- message: B
444
+ children: /* @__PURE__ */ M(y, {
445
+ type: b.SectionMessage,
446
+ variant: x.Warning,
447
+ message: H
448
448
  })
449
449
  }),
450
- e.length > 0 && /* @__PURE__ */ j("ul", {
450
+ e.length > 0 && /* @__PURE__ */ M("ul", {
451
451
  className: "mb-3 flex flex-col gap-2",
452
452
  children: e.map((e, t) => {
453
- let n = e.targets.join(` ${L} `), r = R.replace("{source}", e.source).replace("{targets}", n);
454
- return /* @__PURE__ */ M("li", {
455
- className: k("flex items-center justify-between gap-2 rounded-lg px-3 py-2", X.ruleRow),
456
- children: [/* @__PURE__ */ M("span", {
457
- className: k("truncate", E, X.ruleText),
453
+ let n = e.targets.join(` ${R} `), r = z.replace("{source}", e.source).replace("{targets}", n);
454
+ return /* @__PURE__ */ N("li", {
455
+ className: A("flex items-center justify-between gap-2 rounded-lg px-3 py-2", Z.ruleRow),
456
+ children: [/* @__PURE__ */ N("span", {
457
+ className: A("truncate", D, Z.ruleText),
458
458
  children: [
459
- /* @__PURE__ */ j("span", {
460
- className: D,
459
+ /* @__PURE__ */ M("span", {
460
+ className: O,
461
461
  children: e.source
462
462
  }),
463
463
  " ",
464
- ve(e.function, Q),
464
+ _e(e.function, be),
465
465
  ": ",
466
466
  n
467
467
  ]
468
- }), /* @__PURE__ */ j(p, {
469
- icon: /* @__PURE__ */ j(ie, {
468
+ }), /* @__PURE__ */ M(p, {
469
+ icon: /* @__PURE__ */ M(re, {
470
470
  size: c.SM,
471
471
  "aria-hidden": !0,
472
472
  stroke: l
473
473
  }),
474
474
  "aria-label": r,
475
- onClick: () => Z(t),
475
+ onClick: () => Q(t),
476
476
  disabled: d
477
477
  })]
478
478
  }, t);
479
479
  })
480
480
  }),
481
- K && /* @__PURE__ */ j(ge, {
481
+ ue && /* @__PURE__ */ M(he, {
482
482
  sourceOptions: s,
483
- onSave: ye,
484
- onCancel: he,
483
+ onSave: ve,
484
+ onCancel: me,
485
485
  disabled: d,
486
- maxTargets: x,
487
- labels: de,
488
- styles: A.editor
486
+ maxTargets: S,
487
+ labels: le,
488
+ styles: j.editor
489
489
  }),
490
- /* @__PURE__ */ j("div", {
490
+ /* @__PURE__ */ M("div", {
491
491
  className: "flex flex-wrap items-center gap-2",
492
- children: /* @__PURE__ */ j(f, {
493
- label: se,
494
- iconBefore: /* @__PURE__ */ j(re, {
492
+ children: /* @__PURE__ */ M(f, {
493
+ label: I,
494
+ iconBefore: /* @__PURE__ */ M(ne, {
495
495
  size: c.SM,
496
496
  "aria-hidden": !0,
497
497
  stroke: l
498
498
  }),
499
- onClick: me,
499
+ onClick: pe,
500
500
  disabled: xe
501
501
  })
502
502
  }),
503
- $ && /* @__PURE__ */ j("p", {
504
- className: k("mt-2", w, X.hint),
503
+ $ && /* @__PURE__ */ M("p", {
504
+ className: A("mt-2", T, Z.hint),
505
505
  children: oe.replace("{max}", String(v))
506
506
  })
507
507
  ]
508
508
  });
509
- }, Z = {
509
+ }, Q = {
510
510
  currentBadge: "_currentBadge_d0adf_1",
511
511
  sharedCredentialsBadge: "_sharedCredentialsBadge_d0adf_7",
512
512
  version: "_version_d0adf_13",
513
513
  date: "_date_d0adf_17",
514
514
  emptyState: "_emptyState_d0adf_21",
515
515
  stripedRow: "_stripedRow_d0adf_25"
516
- }, be = ({ entries: e, currentVersion: t, isLoading: n = !1, hasError: r = !1, versionPrefix: i = "Version", currentBadgeLabel: a = "Current", sharedCredentialsLabel: o = "Shared credentials", emptyStateLabel: s = "Not published to this folder yet — this will be the first version here.", loadingLabel: c = "Loading history…", errorLabel: l = "Failed to load publish history.", versionClassName: u = "dial-small-text", dateClassName: d = "dial-small-text", emptyStateClassName: f = "dial-small-text", colors: p }) => {
517
- let m = O({
516
+ }, ye = ({ entries: e, currentVersion: t, isLoading: n = !1, hasError: r = !1, versionPrefix: i = "Version", currentBadgeLabel: a = "Current", sharedCredentialsLabel: o = "Shared credentials", emptyStateLabel: s = "Not published to this folder yet — this will be the first version here.", loadingLabel: c = "Loading history…", errorLabel: l = "Failed to load publish history.", versionClassName: u = "dial-small-text", dateClassName: d = "dial-small-text", emptyStateClassName: f = "dial-small-text", colors: p }) => {
517
+ let m = k({
518
518
  "--phl-badge-border": p?.currentBadgeBorder,
519
519
  "--phl-badge-bg": p?.currentBadgeBackground,
520
520
  "--phl-badge-text": p?.currentBadgeText,
@@ -525,165 +525,165 @@ var P = /* @__PURE__ */ function(e) {
525
525
  "--phl-date-text": p?.dateText,
526
526
  "--phl-empty-text": p?.emptyStateText,
527
527
  "--phl-striped-bg": p?.stripedBackground
528
- }), h = k(f, Z.emptyState);
529
- return n ? /* @__PURE__ */ j("p", {
528
+ }), h = A(f, Q.emptyState);
529
+ return n ? /* @__PURE__ */ M("p", {
530
530
  style: m,
531
531
  className: h,
532
532
  children: c
533
- }) : r ? /* @__PURE__ */ j("p", {
533
+ }) : r ? /* @__PURE__ */ M("p", {
534
534
  style: m,
535
535
  className: h,
536
536
  role: "status",
537
537
  children: l
538
- }) : e.length === 0 ? /* @__PURE__ */ j("p", {
538
+ }) : e.length === 0 ? /* @__PURE__ */ M("p", {
539
539
  style: m,
540
540
  className: h,
541
541
  children: s
542
- }) : /* @__PURE__ */ j("ul", {
542
+ }) : /* @__PURE__ */ M("ul", {
543
543
  style: m,
544
- children: e.map((e, n) => /* @__PURE__ */ M("li", {
545
- className: k("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Z.stripedRow),
546
- children: [/* @__PURE__ */ M("span", {
544
+ children: e.map((e, n) => /* @__PURE__ */ N("li", {
545
+ className: A("flex items-center justify-between gap-2 rounded-lg px-3 py-[11px]", n % 2 == 0 && Q.stripedRow),
546
+ children: [/* @__PURE__ */ N("span", {
547
547
  className: "flex min-w-0 items-center gap-2",
548
548
  style: m,
549
549
  children: [
550
- /* @__PURE__ */ M("span", {
551
- className: k(u, Z.version),
550
+ /* @__PURE__ */ N("span", {
551
+ className: A(u, Q.version),
552
552
  children: [
553
553
  i,
554
554
  " ",
555
555
  e.version
556
556
  ]
557
557
  }),
558
- e.version === t && /* @__PURE__ */ j(w, {
558
+ e.version === t && /* @__PURE__ */ M(T, {
559
559
  label: a,
560
- className: k("shrink-0 whitespace-nowrap", Z.currentBadge)
560
+ className: A("shrink-0 whitespace-nowrap", Q.currentBadge)
561
561
  }),
562
- e.publishCredentials === !0 && /* @__PURE__ */ j(w, {
562
+ e.publishCredentials === !0 && /* @__PURE__ */ M(T, {
563
563
  label: o,
564
- className: k("shrink-0 whitespace-nowrap", Z.sharedCredentialsBadge)
564
+ className: A("shrink-0 whitespace-nowrap", Q.sharedCredentialsBadge)
565
565
  })
566
566
  ]
567
- }), /* @__PURE__ */ j("span", {
568
- className: k(d, Z.date),
569
- children: I(e.publishedAt)
567
+ }), /* @__PURE__ */ M("span", {
568
+ className: A(d, Q.date),
569
+ children: L(e.publishedAt)
570
570
  })]
571
571
  }, `${e.version}-${n}`))
572
572
  });
573
- }, Q = {
573
+ }, be = {
574
574
  divider: "_divider_1gs31_1",
575
575
  tree: "_tree_1gs31_17"
576
- }, $ = "data-cancel-creating-folder", xe = ({ items: e, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, searchQuery: u, disabled: d = !1, createFolderLabel: p = "Create new folder", cancelCreatingFolderLabel: m = "Cancel", addSiblingFolderLabel: h = "Add sibling", addChildFolderLabel: g = "Add child", newFolderDefaultName: _ = "New folder", noResultsLabel: v = "No folders match \"{query}\".", emptyFolderNameError: ee = "Folder name cannot be empty.", invalidFolderNameError: y = "Folder name contains invalid characters.", duplicateFolderNameError: b = "A folder with this name already exists.", rootLabel: x = "Organization", expandedPaths: S, onExpandedPathsChange: te, loadingPaths: C, styles: w = {} }) => {
577
- let T = {
578
- ...O({ "--pft-divider": w.colors?.divider }),
579
- ...w.cssVars
580
- }, [E, D] = a(() => new Set(n?.map((e, t) => U(n.slice(0, t + 1))) ?? [])), A = S ?? E, ie = (e) => {
576
+ }, $ = "data-cancel-creating-folder", xe = ({ items: e, selectedPath: n, onSelectedPathChange: o, onCreateFolder: s, searchQuery: u, disabled: d = !1, createFolderLabel: p = "Create new folder", cancelCreatingFolderLabel: m = "Cancel", addSiblingFolderLabel: h = "Add sibling", addChildFolderLabel: g = "Add child", newFolderDefaultName: _ = "New folder", noResultsLabel: v = "No folders match \"{query}\".", emptyFolderNameError: y = "Folder name cannot be empty.", invalidFolderNameError: b = "Folder name contains invalid characters.", duplicateFolderNameError: x = "A folder with this name already exists.", rootLabel: S = "Organization", expandedPaths: C, onExpandedPathsChange: ee, loadingPaths: w, styles: T = {} }) => {
577
+ let E = {
578
+ ...k({ "--pft-divider": T.colors?.divider }),
579
+ ...T.cssVars
580
+ }, [D, O] = a(() => new Set(n?.map((e, t) => G(n.slice(0, t + 1))) ?? [])), j = C ?? D, re = (e) => {
581
581
  let t = new Set(e);
582
- t.delete(""), te ? te(t) : D(t);
583
- }, [P, F] = a(null), [oe, se] = a(_), I = i(null), L = i(!1);
582
+ t.delete(""), ee ? ee(t) : O(t);
583
+ }, [P, F] = a(null), [oe, I] = a(_), L = i(null), R = i(!1);
584
584
  t(() => {
585
585
  let e = (e) => {
586
- e.target instanceof Element && e.target.closest(`[${$}]`) && (L.current = !0);
586
+ e.target instanceof Element && e.target.closest(`[${$}]`) && (R.current = !0);
587
587
  };
588
588
  return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
589
589
  }, []);
590
- let R = u.trim(), ce = P != null, z = r(() => le(e, u), [e, u]), B = R.length > 0 && z.length === 0, V = !ce && R.length > 0, G = r(() => ue(V ? z : e), [
590
+ let z = u.trim(), B = P != null, V = r(() => se(e, u), [e, u]), H = z.length > 0 && V.length === 0, U = !B && z.length > 0, q = r(() => ce(U ? V : e), [
591
+ U,
591
592
  V,
592
- z,
593
593
  e
594
- ]), J = r(() => /* @__PURE__ */ new Set(["", ...H(G)]), [G]), pe = r(() => /* @__PURE__ */ new Set(["", ...V ? J : A]), [
595
- V,
596
- J,
597
- A
598
- ]), Y = r(() => de(G), [G]), me = r(() => V && Y.length === 0 ? [] : [{
594
+ ]), Y = r(() => /* @__PURE__ */ new Set(["", ...W(q)]), [q]), fe = r(() => /* @__PURE__ */ new Set(["", ...U ? Y : j]), [
595
+ U,
596
+ Y,
597
+ j
598
+ ]), X = r(() => le(q), [q]), pe = r(() => U && X.length === 0 ? [] : [{
599
599
  path: "",
600
- name: x,
600
+ name: S,
601
601
  folderId: "",
602
- nodeType: N.FOLDER,
603
- items: Y
602
+ nodeType: ie.FOLDER,
603
+ items: X
604
604
  }], [
605
- Y,
606
- x,
607
- V
608
- ]), he = P ? U(P) : null, ge = {
609
- empty: ee,
610
- invalid: y,
611
- duplicate: b
612
- }, X = (t) => q(B && K(R, [], ge) == null ? R : _, fe(e, t)), _e = (e) => {
613
- F(e), se(X(e)), I.current = null, L.current = !1;
614
- let t = U(e);
615
- t && ie(new Set(A).add(t));
616
- }, ve = () => _e(n ?? []), ye = (e) => {
617
- let t = W(e.path), n = [{
605
+ X,
606
+ S,
607
+ U
608
+ ]), me = P ? G(P) : null, he = {
609
+ empty: y,
610
+ invalid: b,
611
+ duplicate: x
612
+ }, Z = (t) => J(H && ue(z, [], he) == null ? z : _, de(e, t)), ge = (e) => {
613
+ F(e), I(Z(e)), L.current = null, R.current = !1;
614
+ let t = G(e);
615
+ t && re(new Set(j).add(t));
616
+ }, _e = () => ge(n ?? []), ve = (e) => {
617
+ let t = K(e.path), n = [{
618
618
  key: "add-child",
619
619
  label: g,
620
- icon: /* @__PURE__ */ j(ne, {
620
+ icon: /* @__PURE__ */ M(te, {
621
621
  size: c.SM,
622
622
  "aria-hidden": !0,
623
623
  stroke: l
624
624
  }),
625
- onClick: () => _e(t)
625
+ onClick: () => ge(t)
626
626
  }];
627
627
  return e.path !== "" && n.push({
628
628
  key: "add-sibling",
629
629
  label: h,
630
- icon: /* @__PURE__ */ j(re, {
630
+ icon: /* @__PURE__ */ M(ne, {
631
631
  size: c.SM,
632
632
  "aria-hidden": !0,
633
633
  stroke: l
634
634
  }),
635
- onClick: () => _e(t.slice(0, -1))
635
+ onClick: () => ge(t.slice(0, -1))
636
636
  }), n;
637
- }, Z = (t) => {
637
+ }, Q = (t) => {
638
638
  if (!P) return null;
639
- let n = K(t, fe(e, P), ge);
640
- return I.current = n, n;
641
- }, be = (e) => {
642
- if (!P || L.current) return;
643
- let t = e.trim(), n = I.current;
644
- (Z(e) ?? n) || (s(P, t), o([...P, t])), F(null);
639
+ let n = ue(t, de(e, P), he);
640
+ return L.current = n, n;
641
+ }, ye = (e) => {
642
+ if (!P || R.current) return;
643
+ let t = e.trim(), n = L.current;
644
+ (Q(e) ?? n) || (s(P, t), o([...P, t])), F(null);
645
645
  }, xe = () => F(null);
646
- return /* @__PURE__ */ M("div", {
647
- style: T,
648
- className: k(d && "pointer-events-none opacity-60", w.className),
646
+ return /* @__PURE__ */ N("div", {
647
+ style: E,
648
+ className: A(d && "pointer-events-none opacity-60", T.className),
649
649
  children: [
650
- /* @__PURE__ */ j("div", {
651
- className: k("w-full max-w-full min-w-0", Q.tree),
652
- children: /* @__PURE__ */ j(ae, {
653
- items: me,
650
+ /* @__PURE__ */ M("div", {
651
+ className: A("w-full max-w-full min-w-0", be.tree),
652
+ children: /* @__PURE__ */ M(ae, {
653
+ items: pe,
654
654
  showFiles: !1,
655
- selectedPath: n == null ? void 0 : U(n),
656
- expandedPaths: pe,
657
- onExpandedPathsChange: ie,
658
- loadingPaths: C,
655
+ selectedPath: n == null ? void 0 : G(n),
656
+ expandedPaths: fe,
657
+ onExpandedPathsChange: re,
658
+ loadingPaths: w,
659
659
  onItemClick: (e) => {
660
- o(n != null && U(n) === e.path ? void 0 : W(e.path));
660
+ o(n != null && G(n) === e.path ? void 0 : K(e.path));
661
661
  },
662
- getContextMenuItems: ye,
663
- createdFolderPath: he,
662
+ getContextMenuItems: ve,
663
+ createdFolderPath: me,
664
664
  newFolderDefaultName: oe,
665
- onCreateFolderSave: be,
665
+ onCreateFolderSave: ye,
666
666
  onCreateFolderCancel: xe,
667
- onRenameValidate: (e) => Z(e),
668
- emptyStateTitle: V ? v.replace("{query}", R) : void 0
667
+ onRenameValidate: (e) => Q(e),
668
+ emptyStateTitle: U ? v.replace("{query}", z) : void 0
669
669
  })
670
670
  }),
671
- /* @__PURE__ */ j("div", {
672
- className: k("my-2 h-px", Q.divider),
671
+ /* @__PURE__ */ M("div", {
672
+ className: A("my-2 h-px", be.divider),
673
673
  "aria-hidden": !0
674
674
  }),
675
- /* @__PURE__ */ M("div", {
675
+ /* @__PURE__ */ N("div", {
676
676
  className: "mb-4 flex flex-wrap items-center gap-2",
677
- children: [/* @__PURE__ */ j(f, {
678
- onClick: ve,
677
+ children: [/* @__PURE__ */ M(f, {
678
+ onClick: _e,
679
679
  label: p,
680
- iconBefore: /* @__PURE__ */ j(re, {
680
+ iconBefore: /* @__PURE__ */ M(ne, {
681
681
  size: c.SM,
682
682
  "aria-hidden": !0,
683
683
  stroke: l
684
684
  }),
685
- disabled: d || ce
686
- }), ce && /* @__PURE__ */ j(f, {
685
+ disabled: d || B
686
+ }), B && /* @__PURE__ */ M(f, {
687
687
  label: m,
688
688
  onClick: xe,
689
689
  disabled: d,
@@ -695,71 +695,71 @@ var P = /* @__PURE__ */ function(e) {
695
695
  }, Se = { panel: "dial-publish-panel-panel" }, Ce = {
696
696
  summaryTitle: "_summaryTitle_tf20a_1",
697
697
  sectionHeading: "_sectionHeading_tf20a_5"
698
- }, we = 200, Te = ({ resource: e, renderSummary: t, folderItems: i, selectedFolderPath: o, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: g, hasSubmitError: _ = !1, allowReplace: v = !0, author: b, onAuthorChange: S, publishCredentials: te = !1, onPublishCredentialsChange: C, rules: w, onRulesChange: T, ruleSourceOptions: D, isRulesLoading: A = !1, hasRulesLoadError: ne = !1, labels: re = {}, summaryTitleClassName: ie = "dial-body-semi-text", headingClassName: N = "dial-body-semi-text", styles: ae = {} }) => {
699
- let { colors: P, folderTree: se, accessRules: I } = ae, L = {
700
- ...O({
701
- "--pp-summary-title-text": P?.summaryTitleText,
702
- "--pp-heading-text": P?.headingText
698
+ }, we = 200, Te = ({ resource: e, renderSummary: t, folderItems: i, selectedFolderPath: o, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: g, hasSubmitError: _ = !1, allowReplace: v = !0, author: x, onAuthorChange: C, publishCredentials: ee = !1, onPublishCredentialsChange: w, rules: T, onRulesChange: E, ruleSourceOptions: O, isRulesLoading: j = !1, hasRulesLoadError: te = !1, labels: ne = {}, summaryTitleClassName: re = "dial-body-semi-text", headingClassName: ie = "dial-body-semi-text", calloutFolderNameClassName: ae = "dial-small-paragraph-semi-text", styles: P = {} }) => {
699
+ let { colors: I, folderTree: L, accessRules: R } = P, z = {
700
+ ...k({
701
+ "--pp-summary-title-text": I?.summaryTitleText,
702
+ "--pp-heading-text": I?.headingText
703
703
  }),
704
- ...ae.cssVars
705
- }, R = {
706
- border: P?.summaryBorder,
707
- background: P?.summaryBackground,
708
- versionTagBorder: P?.summaryVersionTagBorder,
709
- versionTagBackground: P?.summaryVersionTagBackground,
710
- versionTagText: P?.summaryVersionTagText
711
- }, { folderLabel: ce = "Publish to folder", replaceWarning: le = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: z = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: ue = "Publishing failed. Please try again.", folderEmptyStateLabel: B, addSiblingFolderLabel: V, addChildFolderLabel: H, cancelCreatingFolderLabel: U, createFolderEmptyNameError: W, createFolderInvalidNameError: de, createFolderDuplicateNameError: G, rootFolderLabel: K = "Organization", summaryVersionLabel: q, accessRulesLabels: fe, searchPlaceholder: J, clearSearchAriaLabel: pe, authorLabel: Y = "Author", authorPlaceholder: me = "Author name", authorHint: he = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: ge = "Publish with my credentials", credentialsHint: X = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = re, [_e, ve] = a(""), Z = n(), be = (e) => {
712
- ve(e ?? "");
713
- }, Q = o != null, $ = r(() => oe({
714
- hasSelectedFolder: Q,
704
+ ...P.cssVars
705
+ }, B = {
706
+ border: I?.summaryBorder,
707
+ background: I?.summaryBackground,
708
+ versionTagBorder: I?.summaryVersionTagBorder,
709
+ versionTagBackground: I?.summaryVersionTagBackground,
710
+ versionTagText: I?.summaryVersionTagText
711
+ }, { folderLabel: se = "Publish to folder", replaceWarning: V = "Version {version} is already published in {folder}. Publishing will replace it.", noAccessError: ce = "You don't have permission to publish to {folder}. Pick another, or ask an owner for access.", submitError: H = "Publishing failed. Please try again.", folderEmptyStateLabel: U, addSiblingFolderLabel: W, addChildFolderLabel: G, cancelCreatingFolderLabel: K, createFolderEmptyNameError: le, createFolderInvalidNameError: q, createFolderDuplicateNameError: ue, rootFolderLabel: J = "Organization", summaryVersionLabel: de, accessRulesLabels: Y, searchPlaceholder: fe, clearSearchAriaLabel: X, authorLabel: pe = "Author", authorPlaceholder: me = "Author name", authorHint: he = "Shown as the publication’s author. Defaults to you — replace it to credit a team instead.", credentialsLabel: Z = "Publish with my credentials", credentialsHint: ge = "Members will use this without signing in themselves. Your credential itself is never shown to them." } = ne, [_e, Q] = a(""), ye = n(), be = (e) => {
712
+ Q(e ?? "");
713
+ }, $ = o != null, Te = r(() => oe({
714
+ hasSelectedFolder: $,
715
715
  hasExistingPublicationInFolder: p,
716
716
  hasWriteAccess: m,
717
717
  isSubmitting: g,
718
718
  hasSubmitError: _,
719
719
  allowReplace: v
720
720
  }), [
721
- Q,
721
+ $,
722
722
  p,
723
723
  m,
724
724
  g,
725
725
  _,
726
726
  v
727
- ]), Te = Q ? o[o.length - 1] ?? K : "", De = t ? t() : /* @__PURE__ */ j("span", {
728
- className: k("truncate", ie, Ce.summaryTitle),
727
+ ]), De = $ ? o[o.length - 1] ?? J : "", ke = t ? t() : /* @__PURE__ */ M("span", {
728
+ className: A("truncate", re, Ce.summaryTitle),
729
729
  children: e?.title
730
730
  });
731
- return /* @__PURE__ */ M("div", {
732
- className: k("flex flex-col gap-5", Se.panel),
733
- style: L,
734
- children: [e?.type == null ? /* @__PURE__ */ j(E, {
735
- colors: R,
736
- children: De
737
- }) : /* @__PURE__ */ j(E, {
731
+ return /* @__PURE__ */ N("div", {
732
+ className: A("flex flex-col gap-5", Se.panel),
733
+ style: z,
734
+ children: [e?.type == null ? /* @__PURE__ */ M(D, {
735
+ colors: B,
736
+ children: ke
737
+ }) : /* @__PURE__ */ M(D, {
738
738
  item: {
739
739
  type: e.type,
740
740
  name: e.title,
741
741
  version: e.version ?? "",
742
742
  iconUrl: e.iconUrl
743
743
  },
744
- versionLabel: q,
745
- colors: R
746
- }), /* @__PURE__ */ M("div", { children: [
747
- /* @__PURE__ */ j("div", {
748
- className: k("mb-2", N, Ce.sectionHeading),
749
- children: ce
744
+ versionLabel: de,
745
+ colors: B
746
+ }), /* @__PURE__ */ N("div", { children: [
747
+ /* @__PURE__ */ M("div", {
748
+ className: A("mb-2", ie, Ce.sectionHeading),
749
+ children: se
750
750
  }),
751
- /* @__PURE__ */ j("div", {
751
+ /* @__PURE__ */ M("div", {
752
752
  role: "search",
753
753
  className: "mb-3",
754
- children: /* @__PURE__ */ j(x, {
754
+ children: /* @__PURE__ */ M(S, {
755
755
  value: _e,
756
756
  onChange: be,
757
- placeholder: J,
758
- clearLabel: pe,
759
- "aria-label": J
757
+ placeholder: fe,
758
+ clearLabel: X,
759
+ "aria-label": fe
760
760
  })
761
761
  }),
762
- /* @__PURE__ */ j(xe, {
762
+ /* @__PURE__ */ M(xe, {
763
763
  items: i,
764
764
  selectedPath: o,
765
765
  onSelectedPathChange: c,
@@ -769,94 +769,95 @@ var P = /* @__PURE__ */ function(e) {
769
769
  loadingPaths: f,
770
770
  searchQuery: _e,
771
771
  disabled: g,
772
- noResultsLabel: B,
773
- addSiblingFolderLabel: V,
774
- addChildFolderLabel: H,
775
- cancelCreatingFolderLabel: U,
776
- emptyFolderNameError: W,
777
- invalidFolderNameError: de,
778
- duplicateFolderNameError: G,
779
- rootLabel: K,
780
- styles: se
772
+ noResultsLabel: U,
773
+ addSiblingFolderLabel: W,
774
+ addChildFolderLabel: G,
775
+ cancelCreatingFolderLabel: K,
776
+ emptyFolderNameError: le,
777
+ invalidFolderNameError: q,
778
+ duplicateFolderNameError: ue,
779
+ rootLabel: J,
780
+ styles: L
781
781
  }),
782
- $.calloutKind !== F.None && $.calloutKind !== F.Info && /* @__PURE__ */ j("div", {
782
+ Te.calloutKind !== F.None && Te.calloutKind !== F.Info && /* @__PURE__ */ M("div", {
783
783
  className: "mt-3",
784
- children: /* @__PURE__ */ j(ee, {
785
- type: y.SectionMessage,
786
- variant: Ee($.calloutKind),
787
- message: Oe($.calloutKind, {
788
- replaceWarning: le,
789
- noAccessError: z,
790
- submitError: ue,
791
- folderName: Te,
792
- version: e?.version
784
+ children: /* @__PURE__ */ M(y, {
785
+ type: b.SectionMessage,
786
+ variant: Ee(Te.calloutKind),
787
+ message: Oe(Te.calloutKind, {
788
+ replaceWarning: V,
789
+ noAccessError: ce,
790
+ submitError: H,
791
+ folderName: De,
792
+ version: e?.version,
793
+ folderNameClassName: ae
793
794
  })
794
795
  })
795
796
  }),
796
- /* @__PURE__ */ j("div", {
797
+ /* @__PURE__ */ M("div", {
797
798
  className: "mt-4",
798
- children: /* @__PURE__ */ j(h, {
799
- id: Z,
800
- labelProps: { label: Y },
799
+ children: /* @__PURE__ */ M(h, {
800
+ id: ye,
801
+ labelProps: { label: pe },
801
802
  placeholder: me,
802
803
  caption: he,
803
- value: b,
804
- onChange: (e) => S(e ?? ""),
804
+ value: x,
805
+ onChange: (e) => C(e ?? ""),
805
806
  maxLength: we,
806
807
  disabled: g
807
808
  })
808
809
  }),
809
- C != null && /* @__PURE__ */ j("div", {
810
+ w != null && /* @__PURE__ */ M("div", {
810
811
  className: "mt-4",
811
- children: /* @__PURE__ */ j(s, {
812
- labelProps: { label: ge },
813
- caption: X,
814
- isSelected: te,
815
- onChange: C,
812
+ children: /* @__PURE__ */ M(s, {
813
+ labelProps: { label: Z },
814
+ caption: ge,
815
+ isSelected: ee,
816
+ onChange: w,
816
817
  disabled: g
817
818
  })
818
819
  }),
819
- /* @__PURE__ */ j("div", {
820
+ /* @__PURE__ */ M("div", {
820
821
  className: "mt-4",
821
- children: /* @__PURE__ */ j(ye, {
822
- rules: w,
823
- onRulesChange: T,
824
- sourceOptions: D,
825
- folderName: Q ? Te : void 0,
822
+ children: /* @__PURE__ */ M(ve, {
823
+ rules: T,
824
+ onRulesChange: E,
825
+ sourceOptions: O,
826
+ folderName: $ ? De : void 0,
826
827
  disabled: g,
827
- isLoading: A,
828
- hasLoadError: ne,
829
- labels: fe,
830
- styles: I
828
+ isLoading: j,
829
+ hasLoadError: te,
830
+ labels: Y,
831
+ styles: R
831
832
  })
832
833
  })
833
834
  ] })]
834
835
  });
835
- }, Ee = (e) => e === F.ReplaceWarning ? b.Warning : b.Error, De = (e, t) => {
836
- let [n, r, ...i] = e.split("{folder}");
837
- return r === void 0 || i.length > 0 ? e : /* @__PURE__ */ M(A, { children: [
838
- n,
839
- /* @__PURE__ */ j("strong", {
840
- className: "dial-small-paragraph-semi-text",
836
+ }, Ee = (e) => e === F.ReplaceWarning ? x.Warning : x.Error, De = (e, t, n) => {
837
+ let [r, i, ...a] = e.split("{folder}");
838
+ return i === void 0 || a.length > 0 ? e : /* @__PURE__ */ N(j, { children: [
839
+ r,
840
+ /* @__PURE__ */ M("strong", {
841
+ className: n,
841
842
  children: t
842
843
  }),
843
- r
844
+ i
844
845
  ] });
845
- }, Oe = (e, t) => e === F.ReplaceWarning ? De(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName) : e === F.NoAccess ? De(t.noAccessError, t.folderName) : t.submitError, ke = { footer: "_footer_dks1v_1" }, Ae = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, labels: s = {}, colors: l }) => {
846
- let u = O({ "--pf-border": l?.border }), { cancelLabel: d = "Cancel", publishDefaultLabel: p = "Publish", updateLabel: m = "Update version {version}", publishingInProgressLabel: h = "Publishing…" } = s, g = i ? h : n && t && e != null ? m.replace("{version}", e) : p;
847
- return /* @__PURE__ */ M("div", {
846
+ }, Oe = (e, t) => e === F.ReplaceWarning ? De(t.replaceWarning.replace("{version}", t.version ?? ""), t.folderName, t.folderNameClassName) : e === F.NoAccess ? De(t.noAccessError, t.folderName, t.folderNameClassName) : t.submitError, ke = { footer: "_footer_dks1v_1" }, Ae = ({ version: e, hasExistingPublicationInFolder: t, allowReplace: n = !0, isSubmitDisabled: r, isSubmitLoading: i, onCancel: a, onSubmit: o, labels: s = {}, colors: l }) => {
847
+ let u = k({ "--pf-border": l?.border }), { cancelLabel: d = "Cancel", publishDefaultLabel: p = "Publish", updateLabel: m = "Update version {version}", publishingInProgressLabel: h = "Publishing…" } = s, g = i ? h : n && t && e != null ? m.replace("{version}", e) : p;
848
+ return /* @__PURE__ */ N("div", {
848
849
  style: u,
849
- className: k("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", ke.footer),
850
- children: [/* @__PURE__ */ j(f, {
850
+ className: A("flex items-center justify-end gap-2 border-t px-4 py-4 rtl:flex-row-reverse rtl:justify-start desktop:px-3.5", ke.footer),
851
+ children: [/* @__PURE__ */ M(f, {
851
852
  label: d,
852
853
  className: "mobile:flex-1",
853
854
  disabled: i,
854
855
  onClick: a
855
- }), /* @__PURE__ */ j(v, {
856
+ }), /* @__PURE__ */ M(v, {
856
857
  label: g,
857
858
  className: "mobile:flex-1",
858
859
  disabled: r,
859
- iconBefore: i ? /* @__PURE__ */ j(C, { size: c.SM }) : void 0,
860
+ iconBefore: i ? /* @__PURE__ */ M(w, { size: c.SM }) : void 0,
860
861
  onClick: o
861
862
  })]
862
863
  });
@@ -866,15 +867,15 @@ var P = /* @__PURE__ */ function(e) {
866
867
  divider: "_divider_16jmd_15",
867
868
  content: "_content_16jmd_19",
868
869
  title: "_title_16jmd_24"
869
- }, Me = ({ isOpen: e, resource: n, renderSummary: i, folderItems: o, selectedFolderPath: s, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: h, hasSubmitError: g = !1, allowReplace: _ = !0, author: v, onAuthorChange: ee, rules: y, onRulesChange: b, ruleSourceOptions: x, isRulesLoading: S = !1, hasRulesLoadError: C = !1, onClose: w, returnFocusRef: T, onSubmit: E, panelLabels: D, panelStyles: A, footerLabels: ne, labels: re = {}, titleClassName: ie = "dial-body-semi-text", colors: N }) => {
870
- let ae = O({
871
- "--spp-backdrop-bg": N?.backdropBackground,
872
- "--spp-panel-bg": N?.panelBackground,
873
- "--spp-panel-border": N?.panelBorder,
874
- "--spp-divider-border": N?.dividerBorder,
875
- "--spp-scrollbar-thumb": N?.scrollbarThumb,
876
- "--spp-title-text": N?.titleText
877
- }), [P, F] = a(null), { title: se = "Publish", ariaLabel: I = "Publish", closeAriaLabel: L = "Close" } = re, R = r(() => oe({
870
+ }, Me = ({ isOpen: e, resource: n, renderSummary: i, folderItems: o, selectedFolderPath: s, onSelectedFolderPathChange: c, onCreateFolder: l, expandedPaths: u, onExpandedPathsChange: d, loadingPaths: f, hasExistingPublicationInFolder: p, hasWriteAccess: m, isSubmitting: h, hasSubmitError: g = !1, allowReplace: _ = !0, author: v, onAuthorChange: y, rules: b, onRulesChange: x, ruleSourceOptions: S, isRulesLoading: C = !1, hasRulesLoadError: w = !1, onClose: T, returnFocusRef: E, onSubmit: D, panelLabels: O, panelStyles: j, panelSummaryTitleClassName: te, panelHeadingClassName: ne, panelCalloutFolderNameClassName: re, footerLabels: ie, labels: ae = {}, titleClassName: P = "dial-body-semi-text", colors: F }) => {
871
+ let I = k({
872
+ "--spp-backdrop-bg": F?.backdropBackground,
873
+ "--spp-panel-bg": F?.panelBackground,
874
+ "--spp-panel-border": F?.panelBorder,
875
+ "--spp-divider-border": F?.dividerBorder,
876
+ "--spp-scrollbar-thumb": F?.scrollbarThumb,
877
+ "--spp-title-text": F?.titleText
878
+ }), [L, R] = a(null), { title: z = "Publish", ariaLabel: B = "Publish", closeAriaLabel: se = "Close" } = ae, V = r(() => oe({
878
879
  hasSelectedFolder: s != null,
879
880
  hasExistingPublicationInFolder: p,
880
881
  hasWriteAccess: m,
@@ -890,7 +891,7 @@ var P = /* @__PURE__ */ function(e) {
890
891
  _
891
892
  ]);
892
893
  return t(() => {
893
- let t = P?.closest("[role=\"dialog\"]");
894
+ let t = L?.closest("[role=\"dialog\"]");
894
895
  if (!e || !t) return;
895
896
  let n = () => t.focus({ preventScroll: !0 });
896
897
  n();
@@ -900,36 +901,36 @@ var P = /* @__PURE__ */ function(e) {
900
901
  document.addEventListener("focusin", r);
901
902
  let i = requestAnimationFrame(() => {
902
903
  document.removeEventListener("focusin", r);
903
- }), a = T?.current;
904
+ }), a = E?.current;
904
905
  return () => {
905
906
  cancelAnimationFrame(i), document.removeEventListener("focusin", r), a?.isConnected && a.focus({ preventScroll: !0 });
906
907
  };
907
908
  }, [
908
909
  e,
909
- P,
910
- T
911
- ]), /* @__PURE__ */ M(te, {
910
+ L,
911
+ E
912
+ ]), /* @__PURE__ */ N(ee, {
912
913
  open: e,
913
- onClose: w,
914
- header: /* @__PURE__ */ j("span", {
915
- className: k("block truncate text-center", ie, je.title),
916
- children: se
914
+ onClose: T,
915
+ header: /* @__PURE__ */ M("span", {
916
+ className: A("block truncate text-center", P, je.title),
917
+ children: z
917
918
  }),
918
- ariaLabel: I,
919
- closeAriaLabel: L,
919
+ ariaLabel: B,
920
+ closeAriaLabel: se,
920
921
  closeDisabled: h,
921
- style: ae,
922
- overlayStyle: ae,
922
+ style: I,
923
+ overlayStyle: I,
923
924
  className: je.panel,
924
925
  overlayClassName: je.backdrop,
925
- headerClassName: k("px-[22px]", je.divider),
926
+ headerClassName: A("px-[22px]", je.divider),
926
927
  bodyClassName: "flex flex-col overflow-hidden",
927
- children: [/* @__PURE__ */ j("div", {
928
- ref: F,
929
- className: k("min-h-0 flex-1 overflow-y-auto", je.content),
930
- children: /* @__PURE__ */ j("div", {
928
+ children: [/* @__PURE__ */ M("div", {
929
+ ref: R,
930
+ className: A("min-h-0 flex-1 overflow-y-auto", je.content),
931
+ children: /* @__PURE__ */ M("div", {
931
932
  className: "p-[22px]",
932
- children: /* @__PURE__ */ j(Te, {
933
+ children: /* @__PURE__ */ M(Te, {
933
934
  resource: n,
934
935
  renderSummary: i,
935
936
  folderItems: o,
@@ -945,27 +946,30 @@ var P = /* @__PURE__ */ function(e) {
945
946
  hasSubmitError: g,
946
947
  allowReplace: _,
947
948
  author: v,
948
- onAuthorChange: ee,
949
- rules: y,
950
- onRulesChange: b,
951
- ruleSourceOptions: x,
952
- isRulesLoading: S,
953
- hasRulesLoadError: C,
954
- labels: D,
955
- styles: A
949
+ onAuthorChange: y,
950
+ rules: b,
951
+ onRulesChange: x,
952
+ ruleSourceOptions: S,
953
+ isRulesLoading: C,
954
+ hasRulesLoadError: w,
955
+ labels: O,
956
+ styles: j,
957
+ summaryTitleClassName: te,
958
+ headingClassName: ne,
959
+ calloutFolderNameClassName: re
956
960
  })
957
961
  })
958
- }), /* @__PURE__ */ j(Ae, {
962
+ }), /* @__PURE__ */ M(Ae, {
959
963
  version: n?.version,
960
964
  hasExistingPublicationInFolder: p,
961
965
  allowReplace: _,
962
- isSubmitDisabled: R.isSubmitDisabled,
963
- isSubmitLoading: R.isSubmitLoading,
964
- onCancel: w,
965
- onSubmit: E,
966
- labels: ne
966
+ isSubmitDisabled: V.isSubmitDisabled,
967
+ isSubmitLoading: V.isSubmitLoading,
968
+ onCancel: T,
969
+ onSubmit: D,
970
+ labels: ie
967
971
  })]
968
972
  });
969
973
  };
970
974
  //#endregion
971
- export { Se as PUBLISH_PANEL_CLASS, P as PublicationRuleFunction, ge as PublishAccessRuleEditor, ye as PublishAccessRules, F as PublishCalloutKind, xe as PublishFoldersTree, Ae as PublishFooter, be as PublishHistoryList, Te as PublishPanel, Me as StandalonePublishPanel, H as collectFolderKeys, oe as derivePublishState, le as filterFolderTree, I as formatPublishedDate, W as fromFolderPathKey, fe as getSiblingFolderNames, q as getUniqueFolderName, V as mergeFolderPaths, ue as sortFolderTree, de as toDialFileTree, U as toFolderPathKey, ce as usePublishFlow, K as validateFolderName };
975
+ export { Se as PUBLISH_PANEL_CLASS, P as PublicationRuleFunction, he as PublishAccessRuleEditor, ve as PublishAccessRules, F as PublishCalloutKind, xe as PublishFoldersTree, Ae as PublishFooter, ye as PublishHistoryList, Te as PublishPanel, Me as StandalonePublishPanel, W as collectFolderKeys, oe as derivePublishState, se as filterFolderTree, L as formatPublishedDate, K as fromFolderPathKey, de as getSiblingFolderNames, J as getUniqueFolderName, U as mergeFolderPaths, ce as sortFolderTree, le as toDialFileTree, G as toFolderPathKey, B as usePublishFlow, ue as validateFolderName };