@epam/ai-dial-publish-panel 1.3.0-dev.245 → 1.3.0-dev.248

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