@webx-ui/module-admin 0.16.1 → 0.17.0

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/dist/index.js CHANGED
@@ -1,90 +1,90 @@
1
- import { inject as ne, reactive as pe, defineComponent as R, useModel as de, ref as W, watch as ee, computed as x, openBlock as p, createElementBlock as T, createVNode as b, unref as n, withCtx as g, createElementVNode as O, toDisplayString as L, createBlock as $, createTextVNode as V, createCommentVNode as U, mergeModels as oe, onMounted as Le, Fragment as H, renderList as Q, mergeProps as Ke, withModifiers as qe, useSlots as gt, useTemplateRef as Ye, normalizeClass as ae, renderSlot as F, createSlots as Ae, provide as Xe, normalizeProps as yt, guardReactiveProps as bt, resolveComponent as j, watchEffect as wt, onUnmounted as xt, isRef as Ge, createApp as kt, h as re, nextTick as Je, withKeys as Qe, onBeforeUnmount as Ze } from "vue";
2
- import { RouterLink as _t, useRouter as ge, useRoute as et, createRouter as $t, createWebHistory as Tt, onBeforeRouteLeave as St } from "vue-router";
3
- import { WxSortableList as tt, WxAction as se, WxBadge as ze, WxSelect as at, WxSegmented as Ct, WxAutocomplete as Be, WxText as G, WxInput as ye, WxCheckbox as Ie, WxActions as Wt, WxDropdownItem as Lt, useElementWidth as At, WxHeading as zt, WxButton as Z, WxIcon as Ve, WxTabs as Vt, WxCard as Se, WxRichText as Et, useLocales as nt, WxAlert as be, WxResult as Ut, useResponsiveShell as Rt, shellLayoutFor as Nt, WxToaster as Bt, WebxUI as It, dateLocaleKey as Pt, localesKey as Dt, useModal as Mt, WxDialog as lt, WxFormItem as Ft, WxSpace as Ot, createModal as Ht, WxSkeleton as ue, WxEmpty as ot, WxTooltip as st, toast as D, confirm as he, localizedValue as jt, WxBreadcrumb as Kt, WxBreadcrumbItem as Pe, WxActionBar as qt, WxPopover as Yt, WxAvatar as Xt, WxTextarea as De } from "@webx-ui/core";
4
- import { watchSystemTheme as Gt, applyTheme as Jt, systemTheme as Qt } from "@webx-ui/tokens";
5
- import { WxScreenRenderer as Zt } from "@webx-ui/schema";
6
- const we = /* @__PURE__ */ Symbol("webx-i18n");
7
- function ea() {
8
- const e = ne(we, null);
1
+ import { inject as ne, reactive as he, defineComponent as I, useModel as se, ref as A, watch as Z, computed as w, openBlock as v, createElementBlock as _, createVNode as b, unref as l, withCtx as y, createElementVNode as B, toDisplayString as W, createBlock as T, createTextVNode as V, createCommentVNode as N, mergeModels as ae, useId as kt, Fragment as F, onMounted as Le, renderList as ee, mergeProps as Je, withModifiers as Qe, useSlots as _t, useTemplateRef as Ze, normalizeClass as le, renderSlot as O, createSlots as Ve, provide as et, normalizeProps as $t, guardReactiveProps as Tt, resolveComponent as H, watchEffect as St, onUnmounted as Ct, isRef as tt, createApp as Wt, h as ue, nextTick as at, withKeys as lt, onBeforeUnmount as nt } from "vue";
2
+ import { RouterLink as At, useRouter as ye, useRoute as ot, createRouter as Lt, createWebHistory as Vt, onBeforeRouteLeave as zt } from "vue-router";
3
+ import { WxSortableList as st, WxAction as ie, WxBadge as ze, WxSelect as Ne, WxInputNumber as Nt, WxSwitch as Me, WxButton as Q, WxSegmented as Ut, WxAutocomplete as Pe, WxText as G, WxInput as be, WxCheckbox as De, WxActions as Et, WxDropdownItem as It, useElementWidth as Rt, WxHeading as Bt, WxIcon as Ue, WxTabs as Mt, WxCard as Ce, WxRichText as Pt, useLocales as it, WxAlert as we, WxResult as Dt, useResponsiveShell as Ft, shellLayoutFor as Ot, WxToaster as Ht, WebxUI as jt, dateLocaleKey as Kt, localesKey as qt, useModal as Yt, WxDialog as rt, WxFormItem as Xt, WxSpace as Gt, createModal as Jt, WxSkeleton as de, WxEmpty as ut, WxTooltip as dt, toast as D, confirm as ge, localizedValue as Qt, WxBreadcrumb as Zt, WxBreadcrumbItem as Fe, WxActionBar as ea, WxPopover as ta, WxAvatar as aa, WxTextarea as Oe } from "@webx-ui/core";
4
+ import { watchSystemTheme as la, applyTheme as na, systemTheme as oa } from "@webx-ui/tokens";
5
+ import { WxScreenRenderer as sa } from "@webx-ui/schema";
6
+ const xe = /* @__PURE__ */ Symbol("webx-i18n");
7
+ function ia() {
8
+ const e = ne(xe, null);
9
9
  if (e === null)
10
10
  throw new Error("useI18n() was called outside a panel created by createAdmin().");
11
11
  return e;
12
12
  }
13
13
  function P(e) {
14
- const t = ne(we, null);
14
+ const t = ne(xe, null);
15
15
  return t === null ? Ee().scope(e) : t.scope(e);
16
16
  }
17
- function ta(e, t) {
18
- e.provide(we, t);
17
+ function ra(e, t) {
18
+ e.provide(xe, t);
19
19
  }
20
20
  function Ee(e = {}) {
21
- const t = e.fallback ?? "en", a = pe({
21
+ const t = e.fallback ?? "en", a = he({
22
22
  locale: e.locale ?? t,
23
23
  fallback: t,
24
24
  panelLocales: [],
25
25
  contentLocales: []
26
- }), l = {}, i = pe({ value: {} });
27
- function s(r, u, c) {
28
- let h = r[u]?.[c[0] ?? ""];
29
- for (const m of c.slice(1)) {
26
+ }), o = {}, s = he({ value: {} });
27
+ function i(r, u, d) {
28
+ let h = r[u]?.[d[0] ?? ""];
29
+ for (const m of d.slice(1)) {
30
30
  if (typeof h != "object" || h === null)
31
31
  return null;
32
32
  h = h[m];
33
33
  }
34
34
  return typeof h == "string" ? h : null;
35
35
  }
36
- function o(r, u, c) {
37
- const [h, m] = u.includes("::") ? u.split("::", 2) : [r, u], v = m.split("."), d = s(i.value, h, v) ?? s(l, h, v) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
36
+ function n(r, u, d) {
37
+ const [h, m] = u.includes("::") ? u.split("::", 2) : [r, u], f = m.split("."), c = i(s.value, h, f) ?? i(o, h, f) ?? // Not an empty string: a key on screen is ugly, but it says which key, and a blank
38
38
  // label says nothing to anybody trying to fix it.
39
39
  u;
40
- return c === void 0 ? d : aa(d, c);
40
+ return d === void 0 ? c : ua(c, d);
41
41
  }
42
42
  return {
43
43
  state: a,
44
44
  defaults(r, u) {
45
- l[r] = { ...l[r], ...u };
45
+ o[r] = { ...o[r], ...u };
46
46
  },
47
- load(r, u, c) {
48
- i.value = r ?? {}, a.locale = u ?? a.locale, c !== void 0 && (a.fallback = c);
47
+ load(r, u, d) {
48
+ s.value = r ?? {}, a.locale = u ?? a.locale, d !== void 0 && (a.fallback = d);
49
49
  },
50
50
  scope(r) {
51
- return (u, c) => o(r, u, c);
51
+ return (u, d) => n(r, u, d);
52
52
  },
53
- t: (r, u) => o("", r, u)
53
+ t: (r, u) => n("", r, u)
54
54
  };
55
55
  }
56
- function aa(e, t) {
56
+ function ua(e, t) {
57
57
  let a = e;
58
- for (const [l, i] of Object.entries(t))
59
- a = a.replaceAll(`:${l}`, String(i));
58
+ for (const [o, s] of Object.entries(t))
59
+ a = a.replaceAll(`:${o}`, String(s));
60
60
  return a;
61
61
  }
62
- function xe(e, t) {
63
- const a = `${e.apiPath}/${t.replace(/^\/+|\/+$/g, "")}`, l = (i) => i.data;
62
+ function ce(e, t) {
63
+ const a = `${e.apiPath}/${t.replace(/^\/+|\/+$/g, "")}`, o = (s) => s.data;
64
64
  return {
65
- list: (i = {}) => {
66
- const s = new URLSearchParams();
67
- return i.q && s.set("q", i.q), i.visible && s.set("visible", "1"), e.http.get(s.size > 0 ? `${a}?${s}` : a);
65
+ list: (s = {}) => {
66
+ const i = new URLSearchParams();
67
+ return s.q && i.set("q", s.q), s.visible && i.set("visible", "1"), e.http.get(i.size > 0 ? `${a}?${i}` : a);
68
68
  },
69
- create: (i) => e.http.post(a, i).then(l),
70
- get: (i) => e.http.get(`${a}/${i}`).then(l),
71
- save: (i, s) => e.http.put(`${a}/${i}`, { values: s }).then(l),
72
- remove: (i) => e.http.delete(`${a}/${i}`).then(() => {
69
+ create: (s) => e.http.post(a, s).then(o),
70
+ get: (s) => e.http.get(`${a}/${s}`).then(o),
71
+ save: (s, i) => e.http.put(`${a}/${s}`, { values: i }).then(o),
72
+ remove: (s) => e.http.delete(`${a}/${s}`).then(() => {
73
73
  }),
74
- restore: (i) => e.http.post(`${a}/${i}/restore`, {}).then(l),
75
- reorder: (i) => e.http.post(`${a}/reorder`, { ids: i }).then(() => {
74
+ restore: (s) => e.http.post(`${a}/${s}/restore`, {}).then(o),
75
+ reorder: (s) => e.http.post(`${a}/reorder`, { ids: s }).then(() => {
76
76
  })
77
77
  };
78
78
  }
79
- function na(e, t, a, l = null) {
80
- const i = `${e.apiPath}/${t.replace(/^\/+|\/+$/g, "")}`;
81
- return e.http.post(`${i}/reorder`, l === null ? { ids: a } : { ids: a, category: l }).then(() => {
79
+ function da(e, t, a, o = null) {
80
+ const s = `${e.apiPath}/${t.replace(/^\/+|\/+$/g, "")}`;
81
+ return e.http.post(`${s}/reorder`, o === null ? { ids: a } : { ids: a, category: o }).then(() => {
82
82
  });
83
83
  }
84
- const la = { class: "wx-categories-field" }, oa = { class: "wx-categories-field__name" }, sa = /* @__PURE__ */ R({
84
+ const ca = { class: "wx-categories-field" }, ma = { class: "wx-categories-field__name" }, fa = /* @__PURE__ */ I({
85
85
  name: "WxCategoriesField",
86
86
  __name: "CategoriesField",
87
- props: /* @__PURE__ */ oe({
87
+ props: /* @__PURE__ */ ae({
88
88
  source: {},
89
89
  main: { type: Boolean, default: !0 },
90
90
  disabled: { type: Boolean, default: !1 },
@@ -99,87 +99,244 @@ const la = { class: "wx-categories-field" }, oa = { class: "wx-categories-field_
99
99
  }),
100
100
  emits: ["update:modelValue"],
101
101
  setup(e) {
102
- const t = e, a = de(e, "modelValue"), l = X(), i = P("webx-admin"), s = W([]);
103
- ee(
102
+ const t = e, a = se(e, "modelValue"), o = q(), s = P("webx-admin"), i = A([]);
103
+ Z(
104
104
  () => t.source,
105
- async (v) => {
105
+ async (f) => {
106
106
  try {
107
- const d = await xe(l, v).list();
108
- s.value = d.data.map((w) => ({ id: w.id, name: w.name }));
107
+ const c = await ce(o, f).list();
108
+ i.value = c.data.map((x) => ({ id: x.id, name: x.name }));
109
109
  } catch {
110
- s.value = [];
110
+ i.value = [];
111
111
  }
112
112
  },
113
113
  { immediate: !0 }
114
114
  );
115
- const o = x(() => Array.isArray(a.value) ? a.value : []), r = x(() => new Map(s.value.map((v) => [v.id, v.name]))), u = x({
116
- get: () => o.value.map((v) => ({ id: v, name: r.value.get(v) ?? `#${v}` })),
117
- set: (v) => {
118
- a.value = v.map((d) => d.id);
115
+ const n = w(() => Array.isArray(a.value) ? a.value : []), r = w(() => new Map(i.value.map((f) => [f.id, f.name]))), u = w({
116
+ get: () => n.value.map((f) => ({ id: f, name: r.value.get(f) ?? `#${f}` })),
117
+ set: (f) => {
118
+ a.value = f.map((c) => c.id);
119
119
  }
120
- }), c = x(
121
- () => s.value.filter((v) => !o.value.includes(v.id)).map((v) => ({ label: v.name, value: v.id }))
120
+ }), d = w(
121
+ () => i.value.filter((f) => !n.value.includes(f.id)).map((f) => ({ label: f.name, value: f.id }))
122
122
  );
123
- function h(v) {
124
- typeof v != "number" || o.value.includes(v) || (a.value = [...o.value, v]);
123
+ function h(f) {
124
+ typeof f != "number" || n.value.includes(f) || (a.value = [...n.value, f]);
125
125
  }
126
- function m(v) {
127
- a.value = o.value.filter((d) => d !== v);
126
+ function m(f) {
127
+ a.value = n.value.filter((c) => c !== f);
128
128
  }
129
- return (v, d) => (p(), T("div", la, [
130
- b(n(tt), {
129
+ return (f, c) => (v(), _("div", ca, [
130
+ b(l(st), {
131
131
  modelValue: u.value,
132
- "onUpdate:modelValue": d[0] || (d[0] = (w) => u.value = w),
132
+ "onUpdate:modelValue": c[0] || (c[0] = (x) => u.value = x),
133
133
  plain: "",
134
134
  size: "sm",
135
135
  "item-key": "id",
136
136
  "item-label": "name",
137
137
  disabled: t.disabled,
138
- "empty-text": t.emptyText ?? n(i)("categories.field-empty")
138
+ "empty-text": t.emptyText ?? l(s)("categories.field-empty")
139
139
  }, {
140
- default: g(({ item: w, index: f }) => [
141
- O("span", oa, L(w.name), 1),
142
- t.main && f === 0 ? (p(), $(n(ze), {
140
+ default: y(({ item: x, index: p }) => [
141
+ B("span", ma, W(x.name), 1),
142
+ t.main && p === 0 ? (v(), T(l(ze), {
143
143
  key: 0,
144
144
  type: "primary"
145
145
  }, {
146
- default: g(() => [
147
- V(L(t.mainText ?? n(i)("categories.field-main")), 1)
146
+ default: y(() => [
147
+ V(W(t.mainText ?? l(s)("categories.field-main")), 1)
148
148
  ]),
149
149
  _: 1
150
- })) : U("", !0)
150
+ })) : N("", !0)
151
151
  ]),
152
- actions: g(({ item: w }) => [
153
- b(n(se), {
152
+ actions: y(({ item: x }) => [
153
+ b(l(ie), {
154
154
  type: "remove",
155
155
  size: "sm",
156
156
  disabled: t.disabled,
157
- title: t.removeText ?? n(i)("categories.field-remove"),
158
- onClick: (f) => m(w.id)
157
+ title: t.removeText ?? l(s)("categories.field-remove"),
158
+ onClick: (p) => m(x.id)
159
159
  }, null, 8, ["disabled", "title", "onClick"])
160
160
  ]),
161
161
  _: 1
162
162
  }, 8, ["modelValue", "disabled", "empty-text"]),
163
- b(n(at), {
163
+ b(l(Ne), {
164
164
  "model-value": null,
165
- options: c.value,
166
- placeholder: t.addText ?? n(i)("categories.field-add"),
167
- disabled: t.disabled || c.value.length === 0,
168
- "empty-text": t.noneLeftText ?? n(i)("categories.field-none-left"),
165
+ options: d.value,
166
+ placeholder: t.addText ?? l(s)("categories.field-add"),
167
+ disabled: t.disabled || d.value.length === 0,
168
+ "empty-text": t.noneLeftText ?? l(s)("categories.field-none-left"),
169
169
  filterable: "",
170
170
  teleport: "",
171
- "aria-label": t.addText ?? n(i)("categories.field-add"),
171
+ "aria-label": t.addText ?? l(s)("categories.field-add"),
172
172
  "onUpdate:modelValue": h
173
173
  }, null, 8, ["options", "placeholder", "disabled", "empty-text", "aria-label"])
174
174
  ]));
175
175
  }
176
- }), Y = (e, t) => {
176
+ }), K = (e, t) => {
177
177
  const a = e.__vccOpts || e;
178
- for (const [l, i] of t)
179
- a[l] = i;
178
+ for (const [o, s] of t)
179
+ a[o] = s;
180
180
  return a;
181
- }, ia = /* @__PURE__ */ Y(sa, [["__scopeId", "data-v-640cd836"]]);
182
- function ra() {
181
+ }, va = /* @__PURE__ */ K(fa, [["__scopeId", "data-v-640cd836"]]), ct = 100, Te = /* @__PURE__ */ new WeakMap();
182
+ function pa(e) {
183
+ let t = Te.get(e);
184
+ return t === void 0 && (t = e.http.get(`${e.apiPath}/collections`).then((a) => a.data), t.catch(() => Te.delete(e)), Te.set(e, t)), t;
185
+ }
186
+ function He(e) {
187
+ const t = typeof e == "object" && e !== null && !Array.isArray(e) ? e : {}, a = Array.isArray(t.categories) ? [...new Set(t.categories.map(Number).filter((s) => Number.isInteger(s) && s > 0))] : [], o = typeof t.limit == "number" && Number.isInteger(t.limit) ? t.limit : null;
188
+ return {
189
+ categories: a.sort((s, i) => s - i),
190
+ limit: o !== null && o >= 1 ? Math.min(o, ct) : null,
191
+ filter: t.filter === !0,
192
+ markup: typeof t.markup == "boolean" ? t.markup : null
193
+ };
194
+ }
195
+ function je(e) {
196
+ return e.categories.length === 0;
197
+ }
198
+ const ha = ["aria-busy"], ga = {
199
+ key: 0,
200
+ class: "wx-collection-field__note"
201
+ }, ya = { class: "wx-collection-field__note" }, ba = {
202
+ key: 0,
203
+ class: "wx-collection-field__row"
204
+ }, wa = ["for"], xa = { class: "wx-collection-field__row" }, ka = ["for"], _a = { class: "wx-collection-field__limit" }, $a = {
205
+ key: 2,
206
+ class: "wx-collection-field__markup"
207
+ }, Ta = { class: "wx-collection-field__hint" }, Sa = /* @__PURE__ */ I({
208
+ name: "WxCollectionField",
209
+ __name: "CollectionField",
210
+ props: /* @__PURE__ */ ae({
211
+ source: {},
212
+ disabled: { type: Boolean, default: !1 }
213
+ }, {
214
+ modelValue: { default: null },
215
+ modelModifiers: {}
216
+ }),
217
+ emits: ["update:modelValue"],
218
+ setup(e) {
219
+ const t = e, a = se(e, "modelValue"), o = q(), s = P("webx-admin"), i = kt(), n = A(void 0), r = A([]);
220
+ Z(
221
+ () => t.source,
222
+ async (g) => {
223
+ n.value = void 0, r.value = [];
224
+ try {
225
+ n.value = (await pa(o)).find((k) => k.key === g) ?? null;
226
+ } catch {
227
+ n.value = null;
228
+ }
229
+ if (n.value?.categories)
230
+ try {
231
+ const k = await ce(o, n.value.categories).list();
232
+ r.value = k.data.map((U) => ({ label: U.name, value: U.id }));
233
+ } catch {
234
+ r.value = [];
235
+ }
236
+ },
237
+ { immediate: !0 }
238
+ );
239
+ const u = w(() => He(a.value));
240
+ function d(g) {
241
+ a.value = He({ ...u.value, ...g });
242
+ }
243
+ const h = w(() => {
244
+ const g = new Set(r.value.map((U) => U.value)), k = u.value.categories.filter((U) => !g.has(U)).map((U) => ({ label: `#${U}`, value: U }));
245
+ return [...r.value, ...k];
246
+ });
247
+ function m(g) {
248
+ d({ categories: Array.isArray(g) ? g.map(Number) : [] });
249
+ }
250
+ function f(g) {
251
+ d({ limit: g ?? null });
252
+ }
253
+ const c = w(() => u.value.markup ?? je(u.value));
254
+ function x(g) {
255
+ d({ markup: g === !0 });
256
+ }
257
+ const p = w(
258
+ () => s(
259
+ je(u.value) ? "collections.field-markup-auto-on" : "collections.field-markup-auto-off"
260
+ )
261
+ );
262
+ return (g, k) => (v(), _("div", {
263
+ class: "wx-collection-field",
264
+ "aria-busy": n.value === void 0
265
+ }, [
266
+ n.value === null ? (v(), _("p", ga, W(l(s)("collections.field-unavailable", { source: t.source })), 1)) : n.value ? (v(), _(F, { key: 1 }, [
267
+ B("p", ya, W(l(s)("collections.field-source", { source: n.value.title })), 1),
268
+ n.value.categories ? (v(), _("div", ba, [
269
+ B("label", {
270
+ class: "wx-collection-field__label",
271
+ for: `${l(i)}-categories`
272
+ }, W(l(s)("collections.field-categories")), 9, wa),
273
+ b(l(Ne), {
274
+ id: `${l(i)}-categories`,
275
+ "model-value": u.value.categories,
276
+ options: h.value,
277
+ placeholder: u.value.categories.length === 0 ? l(s)("collections.field-all") : "",
278
+ "empty-text": l(s)("collections.field-no-categories"),
279
+ disabled: t.disabled,
280
+ multiple: "",
281
+ filterable: "",
282
+ clearable: "",
283
+ teleport: "",
284
+ "onUpdate:modelValue": m
285
+ }, null, 8, ["id", "model-value", "options", "placeholder", "empty-text", "disabled"])
286
+ ])) : N("", !0),
287
+ B("div", xa, [
288
+ B("label", {
289
+ class: "wx-collection-field__label",
290
+ for: `${l(i)}-limit`
291
+ }, W(l(s)("collections.field-limit")), 9, ka),
292
+ B("div", _a, [
293
+ b(l(Nt), {
294
+ id: `${l(i)}-limit`,
295
+ "model-value": u.value.limit,
296
+ min: 1,
297
+ max: l(ct),
298
+ step: 1,
299
+ precision: 0,
300
+ placeholder: l(s)("collections.field-limit-all"),
301
+ disabled: t.disabled,
302
+ "onUpdate:modelValue": f
303
+ }, null, 8, ["id", "model-value", "max", "placeholder", "disabled"])
304
+ ])
305
+ ]),
306
+ n.value.categories ? (v(), T(l(Me), {
307
+ key: 1,
308
+ "model-value": u.value.filter,
309
+ label: l(s)("collections.field-filter"),
310
+ disabled: t.disabled,
311
+ "onUpdate:modelValue": k[0] || (k[0] = (U) => d({ filter: U === !0 }))
312
+ }, null, 8, ["model-value", "label", "disabled"])) : N("", !0),
313
+ n.value.markup ? (v(), _("div", $a, [
314
+ b(l(Me), {
315
+ "model-value": c.value,
316
+ label: l(s)("collections.field-markup"),
317
+ disabled: t.disabled,
318
+ "onUpdate:modelValue": x
319
+ }, null, 8, ["model-value", "label", "disabled"]),
320
+ B("p", Ta, W(p.value), 1),
321
+ u.value.markup !== null ? (v(), T(l(Q), {
322
+ key: 0,
323
+ class: "wx-collection-field__reset",
324
+ variant: "text",
325
+ size: "sm",
326
+ disabled: t.disabled,
327
+ onClick: k[1] || (k[1] = (U) => d({ markup: null }))
328
+ }, {
329
+ default: y(() => [
330
+ V(W(l(s)("collections.field-markup-reset")), 1)
331
+ ]),
332
+ _: 1
333
+ }, 8, ["disabled"])) : N("", !0)
334
+ ])) : N("", !0)
335
+ ], 64)) : N("", !0)
336
+ ], 8, ha));
337
+ }
338
+ }), Ca = /* @__PURE__ */ K(Sa, [["__scopeId", "data-v-e86461fd"]]);
339
+ function Wa() {
183
340
  return {
184
341
  target: "entity",
185
342
  entity_type: null,
@@ -190,31 +347,31 @@ function ra() {
190
347
  rel: []
191
348
  };
192
349
  }
193
- function ua(e) {
194
- const t = `${e.apiPath}/links`, a = (l) => l.data;
350
+ function Aa(e) {
351
+ const t = `${e.apiPath}/links`, a = (o) => o.data;
195
352
  return {
196
353
  sources: () => e.http.get(`${t}/sources`).then(a),
197
- search: (l, i, s) => e.http.get(`${t}/search`, { query: { type: l, q: i, locale: s } }).then(a),
198
- resolve: (l, i) => e.http.post(`${t}/resolve`, { links: l, locale: i }).then(a),
354
+ search: (o, s, i) => e.http.get(`${t}/search`, { query: { type: o, q: s, locale: i } }).then(a),
355
+ resolve: (o, s) => e.http.post(`${t}/resolve`, { links: o, locale: s }).then(a),
199
356
  routes: () => e.http.get(`${t}/routes`).then(a)
200
357
  };
201
358
  }
202
- const da = { class: "wx-link-picker" }, ca = {
359
+ const La = { class: "wx-link-picker" }, Va = {
203
360
  key: 0,
204
361
  class: "wx-link-picker__entity"
205
- }, ma = {
362
+ }, za = {
206
363
  key: 1,
207
364
  class: "wx-link-picker__url"
208
- }, va = {
365
+ }, Na = {
209
366
  key: 2,
210
367
  class: "wx-link-picker__hash"
211
- }, fa = {
368
+ }, Ua = {
212
369
  key: 3,
213
370
  class: "wx-link-picker__attributes"
214
- }, pa = { class: "wx-link-picker__rel" }, ha = /* @__PURE__ */ R({
371
+ }, Ea = { class: "wx-link-picker__rel" }, Ia = /* @__PURE__ */ I({
215
372
  name: "WxLinkPicker",
216
373
  __name: "LinkPicker",
217
- props: /* @__PURE__ */ oe({
374
+ props: /* @__PURE__ */ ae({
218
375
  allowNone: { type: Boolean, default: !0 },
219
376
  attributes: { type: Boolean, default: !0 },
220
377
  disabled: { type: Boolean, default: !1 }
@@ -224,207 +381,207 @@ const da = { class: "wx-link-picker" }, ca = {
224
381
  }),
225
382
  emits: ["update:modelValue"],
226
383
  setup(e) {
227
- const t = e, a = de(e, "modelValue"), l = X(), i = ea(), s = ua(l), o = P("webx-admin"), r = W([]), u = W([]), c = W([]), h = W(!1), m = W(null), v = W(""), d = W(null);
228
- let w = null;
229
- const f = x(() => a.value ?? ra()), y = x(() => {
230
- const _ = [
231
- { value: "entity", label: o("links.target-entity") },
232
- { value: "url", label: o("links.target-url") }
384
+ const t = e, a = se(e, "modelValue"), o = q(), s = ia(), i = Aa(o), n = P("webx-admin"), r = A([]), u = A([]), d = A([]), h = A(!1), m = A(null), f = A(""), c = A(null);
385
+ let x = null;
386
+ const p = w(() => a.value ?? Wa()), g = w(() => {
387
+ const $ = [
388
+ { value: "entity", label: n("links.target-entity") },
389
+ { value: "url", label: n("links.target-url") }
233
390
  ];
234
- return t.allowNone ? [..._, { value: "none", label: o("links.target-none") }] : _;
235
- }), k = x(
236
- () => r.value.map((_) => ({ value: _.type, label: _.title }))
237
- ), M = x(
238
- () => u.value.map((_) => ({
239
- value: _.title,
240
- description: z(_),
241
- id: _.id
391
+ return t.allowNone ? [...$, { value: "none", label: n("links.target-none") }] : $;
392
+ }), k = w(
393
+ () => r.value.map(($) => ({ value: $.type, label: $.title }))
394
+ ), U = w(
395
+ () => u.value.map(($) => ({
396
+ value: $.title,
397
+ description: z($),
398
+ id: $.id
242
399
  }))
243
- ), J = x(
244
- () => c.value.map((_) => ({ value: _.path, description: _.name }))
400
+ ), J = w(
401
+ () => d.value.map(($) => ({ value: $.path, description: $.name }))
245
402
  );
246
403
  Le(async () => {
247
- r.value = await s.sources(), m.value = f.value.entity_type ?? r.value[0]?.type ?? null, await Promise.all([S(), B()]);
248
- }), ee(
249
- () => [f.value.entity_type, f.value.entity_id].join(":"),
404
+ r.value = await i.sources(), m.value = p.value.entity_type ?? r.value[0]?.type ?? null, await Promise.all([j(), C()]);
405
+ }), Z(
406
+ () => [p.value.entity_type, p.value.entity_id].join(":"),
250
407
  () => {
251
- S();
408
+ j();
252
409
  }
253
410
  );
254
- async function S() {
255
- const { entity_type: _, entity_id: N } = f.value;
256
- if (_ === null || N === null) {
257
- d.value = null, v.value = "";
411
+ async function j() {
412
+ const { entity_type: $, entity_id: R } = p.value;
413
+ if ($ === null || R === null) {
414
+ c.value = null, f.value = "";
258
415
  return;
259
416
  }
260
- if (d.value?.id === N)
417
+ if (c.value?.id === R)
261
418
  return;
262
- const [I] = await s.resolve([{ type: _, id: N }], i.state.locale);
263
- d.value = I ?? null, v.value = I?.title ?? o("links.missing"), w = v.value;
419
+ const [M] = await i.resolve([{ type: $, id: R }], s.state.locale);
420
+ c.value = M ?? null, f.value = M?.title ?? n("links.missing"), x = f.value;
264
421
  }
265
- async function B() {
266
- c.value = await s.routes();
422
+ async function C() {
423
+ d.value = await i.routes();
267
424
  }
268
- async function C(_) {
269
- if (_ === w) {
270
- w = null;
425
+ async function L($) {
426
+ if ($ === x) {
427
+ x = null;
271
428
  return;
272
429
  }
273
- if (w = null, m.value !== null) {
430
+ if (x = null, m.value !== null) {
274
431
  h.value = !0;
275
432
  try {
276
- u.value = await s.search(m.value, _, i.state.locale);
433
+ u.value = await i.search(m.value, $, s.state.locale);
277
434
  } finally {
278
435
  h.value = !1;
279
436
  }
280
437
  }
281
438
  }
282
- function A(_) {
283
- _ !== void 0 && (a.value = { ...f.value, target: _ });
439
+ function E($) {
440
+ $ !== void 0 && (a.value = { ...p.value, target: $ });
284
441
  }
285
- function E(_) {
286
- m.value = _ == null ? null : String(_), u.value = [], C("");
442
+ function S($) {
443
+ m.value = $ == null ? null : String($), u.value = [], L("");
287
444
  }
288
- function K(_) {
289
- const N = u.value.find((I) => I.id === _.id);
290
- N === void 0 || m.value === null || (d.value = N, v.value = N.title, a.value = { ...f.value, entity_type: m.value, entity_id: N.id });
445
+ function Y($) {
446
+ const R = u.value.find((M) => M.id === $.id);
447
+ R === void 0 || m.value === null || (c.value = R, f.value = R.title, a.value = { ...p.value, entity_type: m.value, entity_id: R.id });
291
448
  }
292
- function le() {
293
- d.value = null, v.value = "", u.value = [], a.value = { ...f.value, entity_type: null, entity_id: null };
449
+ function oe() {
450
+ c.value = null, f.value = "", u.value = [], a.value = { ...p.value, entity_type: null, entity_id: null };
294
451
  }
295
- function ie(_) {
296
- a.value = { ...f.value, url: _ === "" ? null : _ };
452
+ function re($) {
453
+ a.value = { ...p.value, url: $ === "" ? null : $ };
297
454
  }
298
- function te(_) {
299
- const N = (typeof _ == "string" || typeof _ == "number" ? String(_) : "").replace(/^#+/, "").trim();
300
- a.value = { ...f.value, hash: N === "" ? null : N };
455
+ function te($) {
456
+ const R = (typeof $ == "string" || typeof $ == "number" ? String($) : "").replace(/^#+/, "").trim();
457
+ a.value = { ...p.value, hash: R === "" ? null : R };
301
458
  }
302
- function ke(_) {
303
- a.value = { ...f.value, new_tab: _ };
459
+ function ke($) {
460
+ a.value = { ...p.value, new_tab: $ };
304
461
  }
305
- function _e(_, N) {
306
- const I = f.value.rel.filter(($e) => $e !== _);
307
- a.value = { ...f.value, rel: N ? [...I, _] : I };
462
+ function _e($, R) {
463
+ const M = p.value.rel.filter(($e) => $e !== $);
464
+ a.value = { ...p.value, rel: R ? [...M, $] : M };
308
465
  }
309
- function z(_) {
310
- const N = [_.hint, _.url ?? void 0].filter(
311
- (I) => typeof I == "string" && I !== ""
466
+ function z($) {
467
+ const R = [$.hint, $.url ?? void 0].filter(
468
+ (M) => typeof M == "string" && M !== ""
312
469
  );
313
- return _.available || N.push(o("links.unavailable")), N.join(" · ");
470
+ return $.available || R.push(n("links.unavailable")), R.join(" · ");
314
471
  }
315
- const q = ["nofollow", "sponsored", "ugc"];
316
- return (_, N) => (p(), T("div", da, [
317
- b(n(Ct), {
318
- options: y.value,
319
- "model-value": f.value.target,
472
+ const X = ["nofollow", "sponsored", "ugc"];
473
+ return ($, R) => (v(), _("div", La, [
474
+ b(l(Ut), {
475
+ options: g.value,
476
+ "model-value": p.value.target,
320
477
  disabled: t.disabled,
321
- "aria-label": n(o)("links.target-entity"),
322
- "onUpdate:modelValue": A
478
+ "aria-label": l(n)("links.target-entity"),
479
+ "onUpdate:modelValue": E
323
480
  }, null, 8, ["options", "model-value", "disabled", "aria-label"]),
324
- f.value.target === "entity" ? (p(), T("div", ca, [
325
- k.value.length > 1 ? (p(), $(n(at), {
481
+ p.value.target === "entity" ? (v(), _("div", Va, [
482
+ k.value.length > 1 ? (v(), T(l(Ne), {
326
483
  key: 0,
327
484
  class: "wx-link-picker__section",
328
485
  options: k.value,
329
486
  "model-value": m.value,
330
487
  disabled: t.disabled,
331
- "aria-label": n(o)("links.section"),
332
- "onUpdate:modelValue": E
333
- }, null, 8, ["options", "model-value", "disabled", "aria-label"])) : U("", !0),
334
- b(n(Be), {
488
+ "aria-label": l(n)("links.section"),
489
+ "onUpdate:modelValue": S
490
+ }, null, 8, ["options", "model-value", "disabled", "aria-label"])) : N("", !0),
491
+ b(l(Pe), {
335
492
  class: "wx-link-picker__search",
336
- "model-value": v.value,
337
- options: M.value,
493
+ "model-value": f.value,
494
+ options: U.value,
338
495
  remote: "",
339
496
  clearable: "",
340
497
  loading: h.value,
341
- "loading-text": n(o)("links.searching"),
342
- "empty-text": n(o)("links.empty"),
343
- placeholder: n(o)("links.search"),
344
- "aria-label": n(o)("links.search"),
498
+ "loading-text": l(n)("links.searching"),
499
+ "empty-text": l(n)("links.empty"),
500
+ placeholder: l(n)("links.search"),
501
+ "aria-label": l(n)("links.search"),
345
502
  disabled: t.disabled,
346
- "onUpdate:modelValue": N[0] || (N[0] = (I) => v.value = I),
347
- onSearch: C,
348
- onSelect: K,
349
- onClear: le
503
+ "onUpdate:modelValue": R[0] || (R[0] = (M) => f.value = M),
504
+ onSearch: L,
505
+ onSelect: Y,
506
+ onClear: oe
350
507
  }, null, 8, ["model-value", "options", "loading", "loading-text", "empty-text", "placeholder", "aria-label", "disabled"])
351
- ])) : f.value.target === "url" ? (p(), T("div", ma, [
352
- b(n(Be), {
353
- "model-value": f.value.url ?? "",
508
+ ])) : p.value.target === "url" ? (v(), _("div", za, [
509
+ b(l(Pe), {
510
+ "model-value": p.value.url ?? "",
354
511
  options: J.value,
355
512
  clearable: "",
356
513
  "open-on-focus": "",
357
- "empty-text": n(o)("links.url-routes"),
358
- placeholder: n(o)("links.url-placeholder"),
359
- "aria-label": n(o)("links.url-label"),
514
+ "empty-text": l(n)("links.url-routes"),
515
+ placeholder: l(n)("links.url-placeholder"),
516
+ "aria-label": l(n)("links.url-label"),
360
517
  disabled: t.disabled,
361
- "onUpdate:modelValue": ie
518
+ "onUpdate:modelValue": re
362
519
  }, null, 8, ["model-value", "options", "empty-text", "placeholder", "aria-label", "disabled"])
363
- ])) : U("", !0),
364
- f.value.target !== "none" ? (p(), T("label", va, [
365
- b(n(G), {
520
+ ])) : N("", !0),
521
+ p.value.target !== "none" ? (v(), _("label", Na, [
522
+ b(l(G), {
366
523
  size: "sm",
367
524
  tone: "muted"
368
525
  }, {
369
- default: g(() => [
370
- V(L(n(o)("links.hash")), 1)
526
+ default: y(() => [
527
+ V(W(l(n)("links.hash")), 1)
371
528
  ]),
372
529
  _: 1
373
530
  }),
374
- N[2] || (N[2] = O("span", {
531
+ R[2] || (R[2] = B("span", {
375
532
  class: "wx-link-picker__sign",
376
533
  "aria-hidden": "true"
377
534
  }, "#", -1)),
378
- b(n(ye), {
379
- "model-value": f.value.hash ?? "",
380
- placeholder: n(o)("links.hash-placeholder"),
381
- "aria-label": n(o)("links.hash"),
535
+ b(l(be), {
536
+ "model-value": p.value.hash ?? "",
537
+ placeholder: l(n)("links.hash-placeholder"),
538
+ "aria-label": l(n)("links.hash"),
382
539
  disabled: t.disabled,
383
540
  clearable: "",
384
541
  "onUpdate:modelValue": te
385
542
  }, null, 8, ["model-value", "placeholder", "aria-label", "disabled"])
386
- ])) : U("", !0),
387
- t.attributes && f.value.target !== "none" ? (p(), T("div", fa, [
388
- b(n(Ie), {
389
- "model-value": f.value.new_tab,
543
+ ])) : N("", !0),
544
+ t.attributes && p.value.target !== "none" ? (v(), _("div", Ua, [
545
+ b(l(De), {
546
+ "model-value": p.value.new_tab,
390
547
  disabled: t.disabled,
391
- "onUpdate:modelValue": N[1] || (N[1] = (I) => ke(I))
548
+ "onUpdate:modelValue": R[1] || (R[1] = (M) => ke(M))
392
549
  }, {
393
- default: g(() => [
394
- V(L(n(o)("links.new-tab")), 1)
550
+ default: y(() => [
551
+ V(W(l(n)("links.new-tab")), 1)
395
552
  ]),
396
553
  _: 1
397
554
  }, 8, ["model-value", "disabled"]),
398
- O("div", pa, [
399
- b(n(G), {
555
+ B("div", Ea, [
556
+ b(l(G), {
400
557
  size: "sm",
401
558
  tone: "muted"
402
559
  }, {
403
- default: g(() => [
404
- V(L(n(o)("links.rel")), 1)
560
+ default: y(() => [
561
+ V(W(l(n)("links.rel")), 1)
405
562
  ]),
406
563
  _: 1
407
564
  }),
408
- (p(), T(H, null, Q(q, (I) => b(n(Ie), {
409
- key: I,
410
- "model-value": f.value.rel.includes(I),
565
+ (v(), _(F, null, ee(X, (M) => b(l(De), {
566
+ key: M,
567
+ "model-value": p.value.rel.includes(M),
411
568
  disabled: t.disabled,
412
- "onUpdate:modelValue": ($e) => _e(I, $e)
569
+ "onUpdate:modelValue": ($e) => _e(M, $e)
413
570
  }, {
414
- default: g(() => [
415
- V(L(n(o)(`links.rel-${I}`)), 1)
571
+ default: y(() => [
572
+ V(W(l(n)(`links.rel-${M}`)), 1)
416
573
  ]),
417
574
  _: 2
418
575
  }, 1032, ["model-value", "disabled", "onUpdate:modelValue"])), 64))
419
576
  ])
420
- ])) : U("", !0)
577
+ ])) : N("", !0)
421
578
  ]));
422
579
  }
423
- }), ga = /* @__PURE__ */ Y(ha, [["__scopeId", "data-v-e54022e5"]]), ya = /* @__PURE__ */ R({
580
+ }), Ra = /* @__PURE__ */ K(Ia, [["__scopeId", "data-v-e54022e5"]]), Ba = /* @__PURE__ */ I({
424
581
  name: "WxLinkField",
425
582
  inheritAttrs: !1,
426
583
  __name: "LinkField",
427
- props: /* @__PURE__ */ oe({
584
+ props: /* @__PURE__ */ ae({
428
585
  allowNone: { type: Boolean, default: !0 },
429
586
  attributes: { type: Boolean, default: !0 },
430
587
  disabled: { type: Boolean, default: !1 }
@@ -434,17 +591,17 @@ const da = { class: "wx-link-picker" }, ca = {
434
591
  }),
435
592
  emits: ["update:modelValue"],
436
593
  setup(e) {
437
- const t = e, a = de(e, "modelValue");
438
- return (l, i) => (p(), $(ga, Ke({
594
+ const t = e, a = se(e, "modelValue");
595
+ return (o, s) => (v(), T(Ra, Je({
439
596
  modelValue: a.value,
440
- "onUpdate:modelValue": i[0] || (i[0] = (s) => a.value = s)
441
- }, l.$attrs, {
597
+ "onUpdate:modelValue": s[0] || (s[0] = (i) => a.value = i)
598
+ }, o.$attrs, {
442
599
  "allow-none": t.allowNone,
443
600
  attributes: t.attributes,
444
601
  disabled: t.disabled
445
602
  }), null, 16, ["modelValue", "allow-none", "attributes", "disabled"]));
446
603
  }
447
- }), ba = /* @__PURE__ */ R({
604
+ }), Ma = /* @__PURE__ */ I({
448
605
  __name: "BackButton",
449
606
  props: {
450
607
  to: {},
@@ -452,21 +609,21 @@ const da = { class: "wx-link-picker" }, ca = {
452
609
  size: { default: "sm" }
453
610
  },
454
611
  setup(e) {
455
- const t = e, a = P("webx-admin"), l = x(() => t.label ?? a("editor.back"));
456
- return (i, s) => (p(), $(n(se), {
612
+ const t = e, a = P("webx-admin"), o = w(() => t.label ?? a("editor.back"));
613
+ return (s, i) => (v(), T(l(ie), {
457
614
  icon: "arrow-left",
458
615
  class: "wx-back-button",
459
- as: n(_t),
616
+ as: l(At),
460
617
  to: e.to,
461
- title: l.value,
618
+ title: o.value,
462
619
  size: e.size,
463
620
  "tooltip-side": "bottom"
464
621
  }, null, 8, ["as", "to", "title", "size"]));
465
622
  }
466
- }), wa = {
623
+ }), Pa = {
467
624
  key: 0,
468
625
  class: "wx-dropdown__divider"
469
- }, xa = /* @__PURE__ */ R({
626
+ }, Da = /* @__PURE__ */ I({
470
627
  __name: "RowMenu",
471
628
  props: {
472
629
  actions: {},
@@ -474,36 +631,36 @@ const da = { class: "wx-link-picker" }, ca = {
474
631
  size: { default: "sm" }
475
632
  },
476
633
  setup(e) {
477
- const t = P("webx-admin"), a = e, l = x(() => [
478
- ...a.actions.filter((s) => !s.danger),
479
- ...a.actions.filter((s) => s.danger)
480
- ]), i = x(() => {
481
- const s = l.value.find((o) => o.danger);
482
- return s && l.value[0] !== s ? s.key : null;
634
+ const t = P("webx-admin"), a = e, o = w(() => [
635
+ ...a.actions.filter((i) => !i.danger),
636
+ ...a.actions.filter((i) => i.danger)
637
+ ]), s = w(() => {
638
+ const i = o.value.find((n) => n.danger);
639
+ return i && o.value[0] !== i ? i.key : null;
483
640
  });
484
- return (s, o) => l.value.length > 0 ? (p(), $(n(Wt), {
641
+ return (i, n) => o.value.length > 0 ? (v(), T(l(Et), {
485
642
  key: 0,
486
643
  class: "wx-row-menu",
487
644
  collapse: "always",
488
645
  align: "end",
489
646
  size: e.size,
490
647
  "aria-label": e.label,
491
- onClick: o[0] || (o[0] = qe(() => {
648
+ onClick: n[0] || (n[0] = Qe(() => {
492
649
  }, ["stop"]))
493
650
  }, {
494
- trigger: g(() => [
495
- b(n(se), {
651
+ trigger: y(() => [
652
+ b(l(ie), {
496
653
  type: "more",
497
654
  size: e.size,
498
- title: n(t)("editor.more")
655
+ title: l(t)("editor.more")
499
656
  }, null, 8, ["size", "title"])
500
657
  ]),
501
- collapsed: g(() => [
502
- (p(!0), T(H, null, Q(l.value, (r) => (p(), T(H, {
658
+ collapsed: y(() => [
659
+ (v(!0), _(F, null, ee(o.value, (r) => (v(), _(F, {
503
660
  key: r.key
504
661
  }, [
505
- r.key === i.value ? (p(), T("hr", wa)) : U("", !0),
506
- b(n(Lt), {
662
+ r.key === s.value ? (v(), _("hr", Pa)) : N("", !0),
663
+ b(l(It), {
507
664
  icon: r.icon,
508
665
  tone: r.danger ? "danger" : "default",
509
666
  href: r.href,
@@ -511,23 +668,23 @@ const da = { class: "wx-link-picker" }, ca = {
511
668
  disabled: r.disabled,
512
669
  onClick: (u) => r.run?.()
513
670
  }, {
514
- default: g(() => [
515
- V(L(r.label), 1)
671
+ default: y(() => [
672
+ V(W(r.label), 1)
516
673
  ]),
517
674
  _: 2
518
675
  }, 1032, ["icon", "tone", "href", "target", "disabled", "onClick"])
519
676
  ], 64))), 128))
520
677
  ]),
521
678
  _: 1
522
- }, 8, ["size", "aria-label"])) : U("", !0);
679
+ }, 8, ["size", "aria-label"])) : N("", !0);
523
680
  }
524
- }), Ue = /* @__PURE__ */ Y(xa, [["__scopeId", "data-v-cab01f7f"]]), ka = ["data-level"], _a = {
681
+ }), Ie = /* @__PURE__ */ K(Da, [["__scopeId", "data-v-cab01f7f"]]), Fa = ["data-level"], Oa = {
525
682
  key: 0,
526
683
  class: "wx-screen-head__trail"
527
- }, $a = { class: "wx-screen-head__name" }, Ta = {
684
+ }, Ha = { class: "wx-screen-head__name" }, ja = {
528
685
  key: 4,
529
686
  class: "wx-screen-head__actions"
530
- }, Sa = /* @__PURE__ */ R({
687
+ }, Ka = /* @__PURE__ */ I({
531
688
  __name: "ScreenHead",
532
689
  props: {
533
690
  title: { default: void 0 },
@@ -541,75 +698,75 @@ const da = { class: "wx-link-picker" }, ca = {
541
698
  },
542
699
  emits: ["back"],
543
700
  setup(e, { emit: t }) {
544
- const a = e, l = t, i = P("webx-admin"), s = gt(), o = Ye("root"), r = At(o), u = x(() => r.value > 0 && r.value < a.collapseBelow), c = x(() => a.actions ?? []), h = x(
545
- () => c.value.find((f) => f.primary) ?? null
546
- ), m = x(() => u.value ? h.value ? [h.value] : [] : c.value.filter((f) => !f.menu && !f.danger)), v = x(() => u.value ? c.value.filter((f) => f !== h.value) : c.value.filter((f) => f.menu || f.danger)), d = x(
701
+ const a = e, o = t, s = P("webx-admin"), i = _t(), n = Ze("root"), r = Rt(n), u = w(() => r.value > 0 && r.value < a.collapseBelow), d = w(() => a.actions ?? []), h = w(
702
+ () => d.value.find((p) => p.primary) ?? null
703
+ ), m = w(() => u.value ? h.value ? [h.value] : [] : d.value.filter((p) => !p.menu && !p.danger)), f = w(() => u.value ? d.value.filter((p) => p !== h.value) : d.value.filter((p) => p.menu || p.danger)), c = w(
547
704
  () => a.back && a.back !== !0 ? a.back : null
548
- ), w = x(
549
- () => m.value.length > 0 || v.value.length > 0 || !!s.extra
705
+ ), x = w(
706
+ () => m.value.length > 0 || f.value.length > 0 || !!i.extra
550
707
  );
551
- return (f, y) => (p(), T("div", {
708
+ return (p, g) => (v(), _("div", {
552
709
  ref_key: "root",
553
- ref: o,
554
- class: ae(["wx-screen-head", {
710
+ ref: n,
711
+ class: le(["wx-screen-head", {
555
712
  "is-narrow": u.value,
556
713
  "has-button": m.value.length > 0,
557
- "has-trail": !!f.$slots.trail,
714
+ "has-trail": !!p.$slots.trail,
558
715
  "has-divider": e.divider
559
716
  }]),
560
717
  "data-level": e.level
561
718
  }, [
562
- f.$slots.trail ? (p(), T("div", _a, [
563
- F(f.$slots, "trail", {}, void 0, !0)
564
- ])) : U("", !0),
565
- d.value ? (p(), $(ba, {
719
+ p.$slots.trail ? (v(), _("div", Oa, [
720
+ O(p.$slots, "trail", {}, void 0, !0)
721
+ ])) : N("", !0),
722
+ c.value ? (v(), T(Ma, {
566
723
  key: 1,
567
724
  class: "wx-screen-head__back",
568
- to: d.value,
725
+ to: c.value,
569
726
  label: e.backLabel,
570
727
  "tooltip-side": "bottom"
571
- }, null, 8, ["to", "label"])) : e.back ? (p(), $(n(se), {
728
+ }, null, 8, ["to", "label"])) : e.back ? (v(), T(l(ie), {
572
729
  key: 2,
573
730
  class: "wx-screen-head__back",
574
731
  icon: "arrow-left",
575
732
  size: "sm",
576
733
  "tooltip-side": "bottom",
577
- title: e.backLabel ?? n(i)("editor.back"),
578
- onClick: y[0] || (y[0] = (k) => l("back"))
579
- }, null, 8, ["title"])) : U("", !0),
580
- O("div", $a, [
581
- e.title ? (p(), $(n(zt), {
734
+ title: e.backLabel ?? l(s)("editor.back"),
735
+ onClick: g[0] || (g[0] = (k) => o("back"))
736
+ }, null, 8, ["title"])) : N("", !0),
737
+ B("div", Ha, [
738
+ e.title ? (v(), T(l(Bt), {
582
739
  key: 0,
583
740
  level: e.level,
584
741
  truncate: "",
585
742
  class: "wx-screen-head__title"
586
743
  }, {
587
- default: g(() => [
588
- V(L(e.title), 1)
744
+ default: y(() => [
745
+ V(W(e.title), 1)
589
746
  ]),
590
747
  _: 1
591
- }, 8, ["level"])) : U("", !0),
592
- F(f.$slots, "title-after", {}, void 0, !0)
748
+ }, 8, ["level"])) : N("", !0),
749
+ O(p.$slots, "title-after", {}, void 0, !0)
593
750
  ]),
594
- e.subtitle || f.$slots.subtitle ? (p(), $(n(G), {
751
+ e.subtitle || p.$slots.subtitle ? (v(), T(l(G), {
595
752
  key: 3,
596
753
  class: "wx-screen-head__subtitle",
597
754
  size: "sm",
598
755
  tone: "muted",
599
756
  truncate: ""
600
757
  }, {
601
- default: g(() => [
602
- F(f.$slots, "subtitle", {}, () => [
603
- V(L(e.subtitle), 1)
758
+ default: y(() => [
759
+ O(p.$slots, "subtitle", {}, () => [
760
+ V(W(e.subtitle), 1)
604
761
  ], !0)
605
762
  ]),
606
763
  _: 3
607
- })) : U("", !0),
608
- w.value ? (p(), T("div", Ta, [
609
- F(f.$slots, "extra", {}, void 0, !0),
610
- (p(!0), T(H, null, Q(m.value, (k) => (p(), $(n(Z), {
764
+ })) : N("", !0),
765
+ x.value ? (v(), _("div", ja, [
766
+ O(p.$slots, "extra", {}, void 0, !0),
767
+ (v(!0), _(F, null, ee(m.value, (k) => (v(), T(l(Q), {
611
768
  key: k.key,
612
- class: ae(["wx-screen-head__button", { "is-primary": k.primary }]),
769
+ class: le(["wx-screen-head__button", { "is-primary": k.primary }]),
613
770
  type: k.primary ? "primary" : "default",
614
771
  variant: k.primary ? "solid" : k.variant ?? "outline",
615
772
  loading: k.loading,
@@ -617,35 +774,35 @@ const da = { class: "wx-link-picker" }, ca = {
617
774
  href: k.href,
618
775
  target: k.href ? k.target ?? "_blank" : void 0,
619
776
  rel: k.href ? "noopener" : void 0,
620
- onClick: (M) => k.run?.()
621
- }, Ae({
622
- default: g(() => [
623
- V(" " + L(k.label), 1)
777
+ onClick: (U) => k.run?.()
778
+ }, Ve({
779
+ default: y(() => [
780
+ V(" " + W(k.label), 1)
624
781
  ]),
625
782
  _: 2
626
783
  }, [
627
784
  k.icon ? {
628
785
  name: "icon",
629
- fn: g(() => [
630
- b(n(Ve), {
786
+ fn: y(() => [
787
+ b(l(Ue), {
631
788
  name: k.icon
632
789
  }, null, 8, ["name"])
633
790
  ]),
634
791
  key: "0"
635
792
  } : void 0
636
793
  ]), 1032, ["class", "type", "variant", "loading", "disabled", "href", "target", "rel", "onClick"]))), 128)),
637
- v.value.length > 0 ? (p(), $(Ue, {
794
+ f.value.length > 0 ? (v(), T(Ie, {
638
795
  key: 0,
639
- actions: v.value,
796
+ actions: f.value,
640
797
  size: "lg",
641
- label: e.title ?? n(i)("editor.more")
642
- }, null, 8, ["actions", "label"])) : U("", !0)
643
- ])) : U("", !0)
644
- ], 10, ka));
798
+ label: e.title ?? l(s)("editor.more")
799
+ }, null, 8, ["actions", "label"])) : N("", !0)
800
+ ])) : N("", !0)
801
+ ], 10, Fa));
645
802
  }
646
- }), it = /* @__PURE__ */ Y(Sa, [["__scopeId", "data-v-e27d184e"]]), Ca = ["data-wx-fill"], Wa = /* @__PURE__ */ R({
803
+ }), mt = /* @__PURE__ */ K(Ka, [["__scopeId", "data-v-e27d184e"]]), qa = ["data-wx-fill"], Ya = /* @__PURE__ */ I({
647
804
  __name: "ListScreen",
648
- props: /* @__PURE__ */ oe({
805
+ props: /* @__PURE__ */ ae({
649
806
  title: { default: void 0 },
650
807
  subtitle: { default: void 0 },
651
808
  back: { default: void 0 },
@@ -662,12 +819,12 @@ const da = { class: "wx-link-picker" }, ca = {
662
819
  }),
663
820
  emits: ["update:view"],
664
821
  setup(e) {
665
- const t = de(e, "view");
666
- return (a, l) => (p(), T("div", {
667
- class: ae(["wx-list-screen", { "is-fill": e.fill }]),
822
+ const t = se(e, "view");
823
+ return (a, o) => (v(), _("div", {
824
+ class: le(["wx-list-screen", { "is-fill": e.fill }]),
668
825
  "data-wx-fill": e.fill ? "" : void 0
669
826
  }, [
670
- e.title || e.actions || a.$slots.actions ? (p(), $(it, {
827
+ e.title || e.actions || a.$slots.actions ? (v(), T(mt, {
671
828
  key: 0,
672
829
  class: "wx-list-screen__head",
673
830
  title: e.title,
@@ -676,57 +833,57 @@ const da = { class: "wx-link-picker" }, ca = {
676
833
  "back-label": e.backLabel,
677
834
  actions: e.actions,
678
835
  "collapse-below": 480
679
- }, Ae({ _: 2 }, [
836
+ }, Ve({ _: 2 }, [
680
837
  a.$slots.actions ? {
681
838
  name: "extra",
682
- fn: g(() => [
683
- F(a.$slots, "actions", {}, void 0, !0)
839
+ fn: y(() => [
840
+ O(a.$slots, "actions", {}, void 0, !0)
684
841
  ]),
685
842
  key: "0"
686
843
  } : void 0
687
- ]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : U("", !0),
688
- e.views && e.views.length > 0 ? (p(), $(n(Vt), {
844
+ ]), 1032, ["title", "subtitle", "back", "back-label", "actions"])) : N("", !0),
845
+ e.views && e.views.length > 0 ? (v(), T(l(Mt), {
689
846
  key: 1,
690
847
  modelValue: t.value,
691
- "onUpdate:modelValue": l[0] || (l[0] = (i) => t.value = i),
848
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
692
849
  class: "wx-list-screen__views",
693
850
  items: e.views,
694
851
  "collapse-below": e.collapseBelow,
695
852
  "aria-label": e.title
696
853
  }, {
697
- default: g(() => [
698
- e.card ? (p(), $(n(Se), {
854
+ default: y(() => [
855
+ e.card ? (v(), T(l(Ce), {
699
856
  key: 0,
700
857
  class: "wx-list-screen__card",
701
858
  padding: e.padding
702
859
  }, {
703
- default: g(() => [
704
- F(a.$slots, "default", {}, void 0, !0)
860
+ default: y(() => [
861
+ O(a.$slots, "default", {}, void 0, !0)
705
862
  ]),
706
863
  _: 3
707
- }, 8, ["padding"])) : F(a.$slots, "default", {}, void 0, !0, 1)
864
+ }, 8, ["padding"])) : O(a.$slots, "default", {}, void 0, !0, 1)
708
865
  ]),
709
866
  _: 3
710
- }, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (p(), T(H, { key: 2 }, [
711
- e.card ? (p(), $(n(Se), {
867
+ }, 8, ["modelValue", "items", "collapse-below", "aria-label"])) : (v(), _(F, { key: 2 }, [
868
+ e.card ? (v(), T(l(Ce), {
712
869
  key: 0,
713
870
  class: "wx-list-screen__card",
714
871
  padding: e.padding
715
872
  }, {
716
- default: g(() => [
717
- F(a.$slots, "default", {}, void 0, !0)
873
+ default: y(() => [
874
+ O(a.$slots, "default", {}, void 0, !0)
718
875
  ]),
719
876
  _: 3
720
- }, 8, ["padding"])) : F(a.$slots, "default", {}, void 0, !0, 1)
877
+ }, 8, ["padding"])) : O(a.$slots, "default", {}, void 0, !0, 1)
721
878
  ], 64))
722
- ], 10, Ca));
879
+ ], 10, qa));
723
880
  }
724
- }), rt = /* @__PURE__ */ Y(Wa, [["__scopeId", "data-v-8c7e5ad1"]]), La = /* @__PURE__ */ R({
881
+ }), ft = /* @__PURE__ */ K(Ya, [["__scopeId", "data-v-8c7e5ad1"]]), Xa = /* @__PURE__ */ I({
725
882
  name: "WxRichTextField",
726
883
  inheritAttrs: !1,
727
884
  __name: "RichTextField",
728
885
  setup(e) {
729
- const t = X(), a = P("webx-admin"), l = x(() => t.pickImage ?? void 0), i = x(() => ({
886
+ const t = q(), a = P("webx-admin"), o = w(() => t.pickImage ?? void 0), s = w(() => ({
730
887
  bold: a("rich-text.bold"),
731
888
  italic: a("rich-text.italic"),
732
889
  strike: a("rich-text.strike"),
@@ -759,136 +916,138 @@ const da = { class: "wx-link-picker" }, ca = {
759
916
  cancel: a("rich-text.cancel"),
760
917
  uploading: a("rich-text.uploading")
761
918
  }));
762
- return (s, o) => (p(), $(n(Et), Ke(s.$attrs, {
763
- labels: i.value,
764
- "pick-image": l.value
919
+ return (i, n) => (v(), T(l(Pt), Je(i.$attrs, {
920
+ labels: s.value,
921
+ "pick-image": o.value
765
922
  }), null, 16, ["labels", "pick-image"]));
766
923
  }
767
- }), ut = /* @__PURE__ */ Symbol("wx-record-address");
768
- function Aa(e) {
769
- Xe(ut, e);
924
+ }), vt = /* @__PURE__ */ Symbol("wx-record-address");
925
+ function Ga(e) {
926
+ et(vt, e);
770
927
  }
771
- function za() {
772
- return ne(ut, null);
928
+ function Ja() {
929
+ return ne(vt, null);
773
930
  }
774
- const Va = { class: "wx-slug" }, Ea = { class: "wx-slug__prefix" }, Ua = /* @__PURE__ */ R({
931
+ const Qa = { class: "wx-slug" }, Za = { class: "wx-slug__prefix" }, el = /* @__PURE__ */ I({
775
932
  name: "WxSlugField",
776
933
  inheritAttrs: !1,
777
934
  __name: "SlugField",
778
935
  setup(e) {
779
- const t = za(), a = nt(), l = x(() => {
780
- const o = t?.prefix.value ?? "";
781
- return o === "" ? "/" : `/${o}/`;
782
- }), i = x(() => {
783
- const o = t?.values.value.slug;
784
- return typeof o == "string" ? o : o?.[a.active.value] ?? "";
785
- }), s = x(() => {
786
- const o = t?.path.value;
787
- return typeof o == "string" && i.value !== "" && `${l.value}${i.value}` != `/${o}`;
936
+ const t = Ja(), a = it(), o = w(() => {
937
+ const n = t?.prefix.value ?? "";
938
+ return n === "" ? "/" : `/${n}/`;
939
+ }), s = w(() => {
940
+ const n = t?.values.value.slug;
941
+ return typeof n == "string" ? n : n?.[a.active.value] ?? "";
942
+ }), i = w(() => {
943
+ const n = t?.path.value;
944
+ return typeof n == "string" && s.value !== "" && `${o.value}${s.value}` != `/${n}`;
788
945
  });
789
- return (o, r) => (p(), T("div", Va, [
790
- b(n(ye), yt(bt(o.$attrs)), {
791
- prefix: g(() => [
792
- O("span", Ea, L(l.value), 1)
946
+ return (n, r) => (v(), _("div", Qa, [
947
+ b(l(be), $t(Tt(n.$attrs)), {
948
+ prefix: y(() => [
949
+ B("span", Za, W(o.value), 1)
793
950
  ]),
794
951
  _: 1
795
952
  }, 16),
796
- s.value && n(t) ? (p(), $(n(be), {
953
+ i.value && l(t) ? (v(), T(l(we), {
797
954
  key: 0,
798
955
  type: "info",
799
956
  variant: "soft",
800
- description: n(t).moving()
801
- }, null, 8, ["description"])) : U("", !0)
957
+ description: l(t).moving()
958
+ }, null, 8, ["description"])) : N("", !0)
802
959
  ]));
803
960
  }
804
- }), Me = /* @__PURE__ */ Y(Ua, [["__scopeId", "data-v-5921c0dd"]]), Ra = {
805
- "wx-list": { component: rt, kind: "layout", labelProp: "title" },
961
+ }), Ke = /* @__PURE__ */ K(el, [["__scopeId", "data-v-5921c0dd"]]), tl = {
962
+ "wx-list": { component: ft, kind: "layout", labelProp: "title" },
806
963
  // Full width: an editor shares a row with nothing, and a form of two columns would give it
807
964
  // half a line to write a page of text in.
808
- "wx-rich-text": { component: La, kind: "field", wide: !0 },
965
+ "wx-rich-text": { component: Xa, kind: "field", wide: !0 },
809
966
  // Wide as well: a row of the picker is a segmented switch, a section and a search box, and half
810
967
  // a form's width leaves the search box too narrow to read a page title in.
811
- "wx-link": { component: ya, kind: "field", wide: !0 },
812
- "wx-categories": { component: ia, kind: "field" },
813
- "wx-slug": { component: Me, kind: "field" },
814
- "wx-category-slug": { component: Me, kind: "field" }
815
- }, dt = /* @__PURE__ */ Symbol("webx-admin");
816
- function X() {
817
- const e = ne(dt, null);
968
+ "wx-link": { component: Ba, kind: "field", wide: !0 },
969
+ "wx-categories": { component: va, kind: "field" },
970
+ // Wide: four controls in a column, and half a line leaves the category chips one to a row.
971
+ "wx-collection": { component: Ca, kind: "field", wide: !0 },
972
+ "wx-slug": { component: Ke, kind: "field" },
973
+ "wx-category-slug": { component: Ke, kind: "field" }
974
+ }, pt = /* @__PURE__ */ Symbol("webx-admin");
975
+ function q() {
976
+ const e = ne(pt, null);
818
977
  if (e === null)
819
978
  throw new Error("useAdmin() was called outside a panel created by createAdmin().");
820
979
  return e;
821
980
  }
822
- function Na(e) {
823
- const t = pe({
981
+ function al(e) {
982
+ const t = he({
824
983
  status: "loading",
825
984
  manifest: null,
826
985
  user: null,
827
986
  error: null
828
- }), a = x(() => {
829
- const d = t.manifest;
830
- if (d === null)
987
+ }), a = w(() => {
988
+ const c = t.manifest;
989
+ if (c === null)
831
990
  return [];
832
- const w = [];
833
- for (const f of d.modules) {
834
- const y = e.modules.find((M) => M.id === f.id);
835
- if (y === void 0)
991
+ const x = [];
992
+ for (const p of c.modules) {
993
+ const g = e.modules.find((U) => U.id === p.id);
994
+ if (g === void 0)
836
995
  continue;
837
- const k = y.path ?? y.routes?.[0]?.path;
838
- k !== void 0 && w.push({
839
- id: f.id,
840
- title: f.title,
841
- icon: f.icon,
996
+ const k = g.path ?? g.routes?.[0]?.path;
997
+ k !== void 0 && x.push({
998
+ id: p.id,
999
+ title: p.title,
1000
+ icon: p.icon,
842
1001
  path: k,
843
- group: f.group ?? null
1002
+ group: p.group ?? null
844
1003
  });
845
1004
  }
846
- return w;
847
- }), l = x(() => {
848
- const d = t.manifest?.groups ?? [], w = [], f = /* @__PURE__ */ new Map();
849
- for (const y of a.value)
850
- if (y.group !== null && d.some((k) => k.id === y.group)) {
851
- const k = f.get(y.group) ?? [];
852
- k.push(y), f.set(y.group, k);
1005
+ return x;
1006
+ }), o = w(() => {
1007
+ const c = t.manifest?.groups ?? [], x = [], p = /* @__PURE__ */ new Map();
1008
+ for (const g of a.value)
1009
+ if (g.group !== null && c.some((k) => k.id === g.group)) {
1010
+ const k = p.get(g.group) ?? [];
1011
+ k.push(g), p.set(g.group, k);
853
1012
  } else
854
- w.push(y);
1013
+ x.push(g);
855
1014
  return {
856
- top: w,
857
- groups: d.filter((y) => f.has(y.id)).map((y) => ({
858
- id: y.id,
859
- title: y.title,
860
- icon: y.icon ?? null,
861
- entries: f.get(y.id) ?? []
1015
+ top: x,
1016
+ groups: c.filter((g) => p.has(g.id)).map((g) => ({
1017
+ id: g.id,
1018
+ title: g.title,
1019
+ icon: g.icon ?? null,
1020
+ entries: p.get(g.id) ?? []
862
1021
  }))
863
1022
  };
864
- }), i = { ...Ra };
865
- for (const d of e.modules)
866
- Object.assign(i, d.types);
867
- Object.assign(i, e.types);
868
- const s = e.modules.find((d) => d.pickImage !== void 0)?.pickImage, o = /* @__PURE__ */ new Map();
869
- async function r(d) {
870
- const w = `${e.i18n.state.locale}:${d}`;
871
- let f = o.get(w);
872
- return f === void 0 && (f = e.http.get(`${e.apiPath}/screens/${d}`).then((y) => y.data.root).catch((y) => {
873
- throw o.delete(w), y;
874
- }), o.set(w, f)), f;
1023
+ }), s = { ...tl };
1024
+ for (const c of e.modules)
1025
+ Object.assign(s, c.types);
1026
+ Object.assign(s, e.types);
1027
+ const i = e.modules.find((c) => c.pickImage !== void 0)?.pickImage, n = /* @__PURE__ */ new Map();
1028
+ async function r(c) {
1029
+ const x = `${e.i18n.state.locale}:${c}`;
1030
+ let p = n.get(x);
1031
+ return p === void 0 && (p = e.http.get(`${e.apiPath}/screens/${c}`).then((g) => g.data.root).catch((g) => {
1032
+ throw n.delete(x), g;
1033
+ }), n.set(x, p)), p;
875
1034
  }
876
1035
  let u = null;
877
- async function c() {
1036
+ async function d() {
878
1037
  t.status = "loading", t.error = null;
879
1038
  try {
880
1039
  if (u !== null && (t.user = await u(), m(t.user), t.user === null)) {
881
1040
  t.manifest = null, t.status = "unauthenticated";
882
1041
  return;
883
1042
  }
884
- const d = await e.loadManifest();
885
- t.manifest = d, e.i18n.state.contentLocales = d.locales ?? [], e.i18n.state.panelLocales = d.panelLocales ?? e.i18n.state.panelLocales, d.locale !== void 0 && d.locale !== e.i18n.state.locale && await v(d.locale), t.status = "ready";
886
- } catch (d) {
887
- if (Ia(d)) {
1043
+ const c = await e.loadManifest();
1044
+ t.manifest = c, e.i18n.state.contentLocales = c.locales ?? [], e.i18n.state.panelLocales = c.panelLocales ?? e.i18n.state.panelLocales, c.locale !== void 0 && c.locale !== e.i18n.state.locale && await f(c.locale), t.status = "ready";
1045
+ } catch (c) {
1046
+ if (nl(c)) {
888
1047
  t.manifest = null, t.user = null, t.status = "unauthenticated";
889
1048
  return;
890
1049
  }
891
- t.error = d instanceof Error ? d.message : String(d), t.status = "error";
1050
+ t.error = c instanceof Error ? c.message : String(c), t.status = "error";
892
1051
  }
893
1052
  }
894
1053
  async function h() {
@@ -898,15 +1057,15 @@ function Na(e) {
898
1057
  } catch {
899
1058
  }
900
1059
  }
901
- function m(d) {
902
- d !== null && e.theme?.adopt(d.theme);
1060
+ function m(c) {
1061
+ c !== null && e.theme?.adopt(c.theme);
903
1062
  }
904
- async function v(d) {
1063
+ async function f(c) {
905
1064
  if (e.loadDictionary === void 0) {
906
- e.i18n.state.locale = d;
1065
+ e.i18n.state.locale = c;
907
1066
  return;
908
1067
  }
909
- await e.loadDictionary(d), await h();
1068
+ await e.loadDictionary(c), await h();
910
1069
  }
911
1070
  return {
912
1071
  http: e.http,
@@ -916,104 +1075,104 @@ function Na(e) {
916
1075
  i18n: e.i18n,
917
1076
  modules: e.modules,
918
1077
  nav: a,
919
- groups: l,
920
- types: i,
921
- pickImage: s ?? null,
922
- reload: c,
1078
+ groups: o,
1079
+ types: s,
1080
+ pickImage: i ?? null,
1081
+ reload: d,
923
1082
  refreshManifest: h,
924
- setLocale: v,
925
- setUser(d) {
926
- t.user = d, m(d);
1083
+ setLocale: f,
1084
+ setUser(c) {
1085
+ t.user = c, m(c);
927
1086
  },
928
- useSessionLoader(d) {
929
- u = d;
1087
+ useSessionLoader(c) {
1088
+ u = c;
930
1089
  },
931
- can(d) {
932
- const w = t.user;
933
- return w === null ? !1 : w.isSuper || w.permissions.includes(d);
1090
+ can(c) {
1091
+ const x = t.user;
1092
+ return x === null ? !1 : x.isSuper || x.permissions.includes(c);
934
1093
  },
935
1094
  loadScreen: r,
936
- screenPatch(d) {
937
- return e.screens?.[d] ?? [];
1095
+ screenPatch(c) {
1096
+ return e.screens?.[c] ?? [];
938
1097
  }
939
1098
  };
940
1099
  }
941
- function Ba(e, t) {
942
- e.provide(dt, t);
1100
+ function ll(e, t) {
1101
+ e.provide(pt, t);
943
1102
  }
944
- function Ia(e) {
1103
+ function nl(e) {
945
1104
  return typeof e == "object" && e !== null && "status" in e && e.status === 401;
946
1105
  }
947
- const Pa = /* @__PURE__ */ R({
1106
+ const ol = /* @__PURE__ */ I({
948
1107
  __name: "AdminLanding",
949
1108
  props: {
950
1109
  landing: { default: null }
951
1110
  },
952
1111
  setup(e) {
953
- const t = e, a = X(), l = ge(), i = P("webx-admin"), s = x(() => {
954
- const o = a.nav.value;
955
- return o.length === 0 ? null : ((t.landing === null ? void 0 : o.find((u) => u.path === t.landing)) ?? o[0])?.path ?? null;
1112
+ const t = e, a = q(), o = ye(), s = P("webx-admin"), i = w(() => {
1113
+ const n = a.nav.value;
1114
+ return n.length === 0 ? null : ((t.landing === null ? void 0 : n.find((u) => u.path === t.landing)) ?? n[0])?.path ?? null;
956
1115
  });
957
- return ee(
958
- s,
959
- (o) => {
960
- o !== null && l.replace(o);
1116
+ return Z(
1117
+ i,
1118
+ (n) => {
1119
+ n !== null && o.replace(n);
961
1120
  },
962
1121
  { immediate: !0 }
963
- ), (o, r) => s.value === null && n(a).state.status === "ready" ? (p(), $(n(Ut), {
1122
+ ), (n, r) => i.value === null && l(a).state.status === "ready" ? (v(), T(l(Dt), {
964
1123
  key: 0,
965
1124
  status: "info",
966
- title: n(i)("shell.empty-title"),
967
- description: n(i)("shell.empty-description")
968
- }, null, 8, ["title", "description"])) : U("", !0);
1125
+ title: l(s)("shell.empty-title"),
1126
+ description: l(s)("shell.empty-description")
1127
+ }, null, 8, ["title", "description"])) : N("", !0);
969
1128
  }
970
- }), Da = /* @__PURE__ */ R({
1129
+ }), sl = /* @__PURE__ */ I({
971
1130
  __name: "AdminNav",
972
1131
  props: {
973
1132
  collapsed: { type: Boolean }
974
1133
  },
975
1134
  emits: ["select"],
976
1135
  setup(e, { emit: t }) {
977
- const a = t, l = X(), i = P("webx-admin"), s = ge(), o = et(), r = x({
1136
+ const a = t, o = q(), s = P("webx-admin"), i = ye(), n = ot(), r = w({
978
1137
  /*
979
1138
  * The longest path that contains this one, on a segment boundary: a section may live inside
980
1139
  * another's path (`/services/categories` under `/services`), and the first match in the order
981
1140
  * of the menu would light up the outer one.
982
1141
  */
983
- get: () => l.nav.value.filter((c) => o.path === c.path || o.path.startsWith(`${c.path}/`)).sort((c, h) => h.path.length - c.path.length)[0]?.id ?? "",
1142
+ get: () => o.nav.value.filter((d) => n.path === d.path || n.path.startsWith(`${d.path}/`)).sort((d, h) => h.path.length - d.path.length)[0]?.id ?? "",
984
1143
  set: (u) => {
985
- const c = l.nav.value.find((h) => h.id === u);
986
- c !== void 0 && s.push(c.path);
1144
+ const d = o.nav.value.find((h) => h.id === u);
1145
+ d !== void 0 && i.push(d.path);
987
1146
  }
988
1147
  });
989
- return (u, c) => {
990
- const h = j("wx-menu-item"), m = j("wx-submenu"), v = j("wx-menu");
991
- return p(), $(v, {
1148
+ return (u, d) => {
1149
+ const h = H("wx-menu-item"), m = H("wx-submenu"), f = H("wx-menu");
1150
+ return v(), T(f, {
992
1151
  modelValue: r.value,
993
- "onUpdate:modelValue": c[0] || (c[0] = (d) => r.value = d),
1152
+ "onUpdate:modelValue": d[0] || (d[0] = (c) => r.value = c),
994
1153
  collapsed: e.collapsed,
995
- label: n(i)("nav.sections"),
996
- onSelect: c[1] || (c[1] = (d) => a("select"))
1154
+ label: l(s)("nav.sections"),
1155
+ onSelect: d[1] || (d[1] = (c) => a("select"))
997
1156
  }, {
998
- default: g(() => [
999
- (p(!0), T(H, null, Q(n(l).groups.value.top, (d) => (p(), $(h, {
1000
- key: d.id,
1001
- value: d.id,
1002
- icon: d.icon ?? void 0,
1003
- label: d.title
1157
+ default: y(() => [
1158
+ (v(!0), _(F, null, ee(l(o).groups.value.top, (c) => (v(), T(h, {
1159
+ key: c.id,
1160
+ value: c.id,
1161
+ icon: c.icon ?? void 0,
1162
+ label: c.title
1004
1163
  }, null, 8, ["value", "icon", "label"]))), 128)),
1005
- (p(!0), T(H, null, Q(n(l).groups.value.groups, (d) => (p(), $(m, {
1006
- key: d.id,
1007
- value: `group:${d.id}`,
1008
- title: d.title,
1009
- icon: d.icon ?? "gear"
1164
+ (v(!0), _(F, null, ee(l(o).groups.value.groups, (c) => (v(), T(m, {
1165
+ key: c.id,
1166
+ value: `group:${c.id}`,
1167
+ title: c.title,
1168
+ icon: c.icon ?? "gear"
1010
1169
  }, {
1011
- default: g(() => [
1012
- (p(!0), T(H, null, Q(d.entries, (w) => (p(), $(h, {
1013
- key: w.id,
1014
- value: w.id,
1015
- icon: w.icon ?? void 0,
1016
- label: w.title
1170
+ default: y(() => [
1171
+ (v(!0), _(F, null, ee(c.entries, (x) => (v(), T(h, {
1172
+ key: x.id,
1173
+ value: x.id,
1174
+ icon: x.icon ?? void 0,
1175
+ label: x.title
1017
1176
  }, null, 8, ["value", "icon", "label"]))), 128))
1018
1177
  ]),
1019
1178
  _: 2
@@ -1023,68 +1182,68 @@ const Pa = /* @__PURE__ */ R({
1023
1182
  }, 8, ["modelValue", "collapsed", "label"]);
1024
1183
  };
1025
1184
  }
1026
- }), Ma = {
1185
+ }), il = {
1027
1186
  key: 0,
1028
1187
  class: "wx-root wx-admin-plain"
1029
- }, Fa = {
1188
+ }, rl = {
1030
1189
  key: 1,
1031
1190
  class: "wx-root wx-admin-plain"
1032
- }, Oa = {
1191
+ }, ul = {
1033
1192
  key: 2,
1034
1193
  class: "wx-root wx-admin-plain"
1035
- }, Ha = ["src", "alt", "width", "height"], ja = ["src", "alt", "width", "height"], Ka = ["src", "alt"], qa = { class: "wx-admin__user" }, Ya = { class: "wx-admin__user wx-admin__user--drawer" }, Xa = /* @__PURE__ */ R({
1194
+ }, dl = ["src", "alt", "width", "height"], cl = ["src", "alt", "width", "height"], ml = ["src", "alt"], fl = { class: "wx-admin__user" }, vl = { class: "wx-admin__user wx-admin__user--drawer" }, pl = /* @__PURE__ */ I({
1036
1195
  __name: "AdminShell",
1037
1196
  setup(e) {
1038
- const t = X(), a = P("webx-admin"), l = W(null), { width: i, layout: s, collapsed: o, showAside: r, drawerOpen: u, toggle: c, close: h } = Rt(
1039
- l,
1197
+ const t = q(), a = P("webx-admin"), o = A(null), { width: s, layout: i, collapsed: n, showAside: r, drawerOpen: u, toggle: d, close: h } = Ft(
1198
+ o,
1040
1199
  { persist: "webx-admin-shell" }
1041
- ), m = x(() => t.state.manifest?.title ?? ""), v = x(() => t.state.manifest?.branding?.logo ?? null), d = x(() => t.state.manifest?.branding?.mark ?? null), w = x(() => Nt(i.value, null));
1042
- return wt(() => {
1043
- typeof document > "u" || (document.documentElement.dataset.wxShell = w.value);
1044
- }), xt(() => {
1200
+ ), m = w(() => t.state.manifest?.title ?? ""), f = w(() => t.state.manifest?.branding?.logo ?? null), c = w(() => t.state.manifest?.branding?.mark ?? null), x = w(() => Ot(s.value, null));
1201
+ return St(() => {
1202
+ typeof document > "u" || (document.documentElement.dataset.wxShell = x.value);
1203
+ }), Ct(() => {
1045
1204
  typeof document < "u" && delete document.documentElement.dataset.wxShell;
1046
- }), (f, y) => {
1047
- const k = j("router-view"), M = j("wx-loading"), J = j("wx-button"), S = j("wx-result"), B = j("wx-action"), C = j("wx-text"), A = j("wx-header"), E = j("wx-aside"), K = j("wx-main"), le = j("wx-container"), ie = j("wx-drawer");
1048
- return p(), T(H, null, [
1049
- b(n(Bt), { placement: "bottom-center" }),
1050
- n(t).state.status === "unauthenticated" ? (p(), T("div", Ma, [
1205
+ }), (p, g) => {
1206
+ const k = H("router-view"), U = H("wx-loading"), J = H("wx-button"), j = H("wx-result"), C = H("wx-action"), L = H("wx-text"), E = H("wx-header"), S = H("wx-aside"), Y = H("wx-main"), oe = H("wx-container"), re = H("wx-drawer");
1207
+ return v(), _(F, null, [
1208
+ b(l(Ht), { placement: "bottom-center" }),
1209
+ l(t).state.status === "unauthenticated" ? (v(), _("div", il, [
1051
1210
  b(k)
1052
- ])) : n(t).state.status === "loading" ? (p(), T("div", Fa, [
1053
- b(M, {
1054
- label: n(a)("shell.loading")
1211
+ ])) : l(t).state.status === "loading" ? (v(), _("div", rl, [
1212
+ b(U, {
1213
+ label: l(a)("shell.loading")
1055
1214
  }, null, 8, ["label"])
1056
- ])) : n(t).state.status === "error" ? (p(), T("div", Oa, [
1057
- b(S, {
1215
+ ])) : l(t).state.status === "error" ? (v(), _("div", ul, [
1216
+ b(j, {
1058
1217
  status: "error",
1059
- title: n(a)("shell.error-title"),
1060
- description: n(t).state.error
1218
+ title: l(a)("shell.error-title"),
1219
+ description: l(t).state.error
1061
1220
  }, {
1062
- default: g(() => [
1221
+ default: y(() => [
1063
1222
  b(J, {
1064
1223
  type: "primary",
1065
- onClick: y[0] || (y[0] = (te) => n(t).reload())
1224
+ onClick: g[0] || (g[0] = (te) => l(t).reload())
1066
1225
  }, {
1067
- default: g(() => [
1068
- V(L(n(a)("shell.retry")), 1)
1226
+ default: y(() => [
1227
+ V(W(l(a)("shell.retry")), 1)
1069
1228
  ]),
1070
1229
  _: 1
1071
1230
  })
1072
1231
  ]),
1073
1232
  _: 1
1074
1233
  }, 8, ["title", "description"])
1075
- ])) : (p(), T("div", {
1234
+ ])) : (v(), _("div", {
1076
1235
  key: 3,
1077
1236
  ref_key: "shellEl",
1078
- ref: l,
1079
- class: ae(["wx-root wx-admin", `wx-admin--${w.value}`])
1237
+ ref: o,
1238
+ class: le(["wx-root wx-admin", `wx-admin--${x.value}`])
1080
1239
  }, [
1081
- b(le, {
1082
- direction: n(s) === "drawer" ? "vertical" : "horizontal",
1240
+ b(oe, {
1241
+ direction: l(i) === "drawer" ? "vertical" : "horizontal",
1083
1242
  "full-height": "",
1084
1243
  class: "wx-admin__frame"
1085
1244
  }, {
1086
- default: g(() => [
1087
- n(s) === "drawer" ? (p(), $(A, {
1245
+ default: y(() => [
1246
+ l(i) === "drawer" ? (v(), T(E, {
1088
1247
  key: 0,
1089
1248
  class: "wx-admin__header",
1090
1249
  floating: "",
@@ -1093,101 +1252,101 @@ const Pa = /* @__PURE__ */ R({
1093
1252
  padding: "sm",
1094
1253
  height: "var(--wx-admin-header-height)"
1095
1254
  }, {
1096
- end: g(() => [
1097
- F(f.$slots, "user", { expanded: !1 }, void 0, !0)
1255
+ end: y(() => [
1256
+ O(p.$slots, "user", { expanded: !1 }, void 0, !0)
1098
1257
  ]),
1099
- default: g(() => [
1100
- b(B, {
1258
+ default: y(() => [
1259
+ b(C, {
1101
1260
  icon: "menu",
1102
- title: n(a)("nav.menu"),
1103
- onClick: n(c)
1261
+ title: l(a)("nav.menu"),
1262
+ onClick: l(d)
1104
1263
  }, null, 8, ["title", "onClick"]),
1105
- F(f.$slots, "brand", {}, () => [
1106
- v.value ? (p(), T("img", {
1264
+ O(p.$slots, "brand", {}, () => [
1265
+ f.value ? (v(), _("img", {
1107
1266
  key: 0,
1108
1267
  class: "wx-admin__logo",
1109
- src: v.value.url,
1268
+ src: f.value.url,
1110
1269
  alt: m.value,
1111
- width: v.value.width ?? void 0,
1112
- height: v.value.height ?? void 0
1113
- }, null, 8, Ha)) : (p(), $(C, {
1270
+ width: f.value.width ?? void 0,
1271
+ height: f.value.height ?? void 0
1272
+ }, null, 8, dl)) : (v(), T(L, {
1114
1273
  key: 1,
1115
1274
  weight: "semibold",
1116
1275
  truncate: ""
1117
1276
  }, {
1118
- default: g(() => [
1119
- V(L(m.value), 1)
1277
+ default: y(() => [
1278
+ V(W(m.value), 1)
1120
1279
  ]),
1121
1280
  _: 1
1122
1281
  }))
1123
1282
  ], !0)
1124
1283
  ]),
1125
1284
  _: 3
1126
- })) : U("", !0),
1127
- n(r) ? (p(), $(E, {
1285
+ })) : N("", !0),
1286
+ l(r) ? (v(), T(S, {
1128
1287
  key: 1,
1129
1288
  class: "wx-admin__aside",
1130
1289
  sticky: "",
1131
1290
  floating: "",
1132
1291
  scroll: "",
1133
1292
  bordered: !1,
1134
- collapsed: n(o),
1293
+ collapsed: l(n),
1135
1294
  width: 220,
1136
1295
  "collapsed-width": 56
1137
1296
  }, {
1138
- top: g(() => [
1139
- O("div", {
1140
- class: ae(["wx-admin__brand", { "wx-admin__brand--stacked": n(o) && d.value }])
1297
+ top: y(() => [
1298
+ B("div", {
1299
+ class: le(["wx-admin__brand", { "wx-admin__brand--stacked": l(n) && c.value }])
1141
1300
  }, [
1142
- n(o) ? d.value ? (p(), T("img", {
1301
+ l(n) ? c.value ? (v(), _("img", {
1143
1302
  key: 1,
1144
1303
  class: "wx-admin__mark",
1145
- src: d.value.url,
1304
+ src: c.value.url,
1146
1305
  alt: m.value
1147
- }, null, 8, Ka)) : U("", !0) : F(f.$slots, "brand", {}, () => [
1148
- v.value ? (p(), T("img", {
1306
+ }, null, 8, ml)) : N("", !0) : O(p.$slots, "brand", {}, () => [
1307
+ f.value ? (v(), _("img", {
1149
1308
  key: 0,
1150
1309
  class: "wx-admin__logo",
1151
- src: v.value.url,
1310
+ src: f.value.url,
1152
1311
  alt: m.value,
1153
- width: v.value.width ?? void 0,
1154
- height: v.value.height ?? void 0
1155
- }, null, 8, ja)) : (p(), $(C, {
1312
+ width: f.value.width ?? void 0,
1313
+ height: f.value.height ?? void 0
1314
+ }, null, 8, cl)) : (v(), T(L, {
1156
1315
  key: 1,
1157
1316
  weight: "semibold",
1158
1317
  truncate: "",
1159
1318
  class: "wx-admin__title"
1160
1319
  }, {
1161
- default: g(() => [
1162
- V(L(m.value), 1)
1320
+ default: y(() => [
1321
+ V(W(m.value), 1)
1163
1322
  ]),
1164
1323
  _: 1
1165
1324
  }))
1166
1325
  ], !0, 0),
1167
- b(B, {
1326
+ b(C, {
1168
1327
  icon: "sidebar",
1169
- title: n(o) ? n(a)("nav.expand") : n(a)("nav.collapse"),
1170
- onClick: n(c)
1328
+ title: l(n) ? l(a)("nav.expand") : l(a)("nav.collapse"),
1329
+ onClick: l(d)
1171
1330
  }, null, 8, ["title", "onClick"])
1172
1331
  ], 2)
1173
1332
  ]),
1174
- bottom: g(() => [
1175
- O("div", qa, [
1176
- F(f.$slots, "user", {
1177
- expanded: !n(o)
1333
+ bottom: y(() => [
1334
+ B("div", fl, [
1335
+ O(p.$slots, "user", {
1336
+ expanded: !l(n)
1178
1337
  }, void 0, !0)
1179
1338
  ])
1180
1339
  ]),
1181
- default: g(() => [
1182
- F(f.$slots, "nav", { collapsed: n(o) }, void 0, !0)
1340
+ default: y(() => [
1341
+ O(p.$slots, "nav", { collapsed: l(n) }, void 0, !0)
1183
1342
  ]),
1184
1343
  _: 3
1185
- }, 8, ["collapsed"])) : U("", !0),
1186
- b(K, {
1344
+ }, 8, ["collapsed"])) : N("", !0),
1345
+ b(Y, {
1187
1346
  padding: "none",
1188
1347
  class: "wx-admin__screen"
1189
1348
  }, {
1190
- default: g(() => [
1349
+ default: y(() => [
1191
1350
  b(k)
1192
1351
  ]),
1193
1352
  _: 1
@@ -1195,25 +1354,25 @@ const Pa = /* @__PURE__ */ R({
1195
1354
  ]),
1196
1355
  _: 3
1197
1356
  }, 8, ["direction"]),
1198
- b(ie, {
1199
- open: n(u),
1200
- "onUpdate:open": y[1] || (y[1] = (te) => Ge(u) ? u.value = te : null),
1357
+ b(re, {
1358
+ open: l(u),
1359
+ "onUpdate:open": g[1] || (g[1] = (te) => tt(u) ? u.value = te : null),
1201
1360
  class: "wx-admin__drawer",
1202
- title: m.value === "" ? n(a)("nav.menu") : m.value,
1361
+ title: m.value === "" ? l(a)("nav.menu") : m.value,
1203
1362
  side: "left",
1204
1363
  size: 260,
1205
1364
  "full-screen": !1,
1206
1365
  closable: ""
1207
1366
  }, {
1208
- footer: g(() => [
1209
- O("div", Ya, [
1210
- F(f.$slots, "user", { expanded: !0 }, void 0, !0)
1367
+ footer: y(() => [
1368
+ B("div", vl, [
1369
+ O(p.$slots, "user", { expanded: !0 }, void 0, !0)
1211
1370
  ])
1212
1371
  ]),
1213
- default: g(() => [
1214
- F(f.$slots, "nav", {
1372
+ default: y(() => [
1373
+ O(p.$slots, "nav", {
1215
1374
  collapsed: !1,
1216
- select: n(h)
1375
+ select: l(h)
1217
1376
  }, void 0, !0)
1218
1377
  ]),
1219
1378
  _: 3
@@ -1222,10 +1381,10 @@ const Pa = /* @__PURE__ */ R({
1222
1381
  ], 64);
1223
1382
  };
1224
1383
  }
1225
- }), Ga = /* @__PURE__ */ Y(Xa, [["__scopeId", "data-v-819885ab"]]);
1226
- class Ce extends Error {
1227
- constructor(t, a, l = {}, i = null, s = null) {
1228
- super(t), this.status = a, this.errors = l, this.retryAfter = i, this.body = s, this.name = "HttpError";
1384
+ }), hl = /* @__PURE__ */ K(pl, [["__scopeId", "data-v-819885ab"]]);
1385
+ class We extends Error {
1386
+ constructor(t, a, o = {}, s = null, i = null) {
1387
+ super(t), this.status = a, this.errors = o, this.retryAfter = s, this.body = i, this.name = "HttpError";
1229
1388
  }
1230
1389
  status;
1231
1390
  errors;
@@ -1242,126 +1401,126 @@ class Ce extends Error {
1242
1401
  return this.status === 429;
1243
1402
  }
1244
1403
  }
1245
- const Ja = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
1246
- function Qa(e = {}) {
1247
- const t = (e.baseUrl ?? "").replace(/\/$/, ""), a = e.csrfUrl ?? "/api/cms/auth/csrf-cookie", l = e.fetch ?? globalThis.fetch.bind(globalThis), i = e.onUnauthenticated, s = e.headers;
1248
- let o = !1;
1249
- async function r(c = !1) {
1250
- o && !c && Fe("XSRF-TOKEN") !== null || (await l(a, { credentials: "same-origin" }), o = !0);
1404
+ const gl = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
1405
+ function yl(e = {}) {
1406
+ const t = (e.baseUrl ?? "").replace(/\/$/, ""), a = e.csrfUrl ?? "/api/cms/auth/csrf-cookie", o = e.fetch ?? globalThis.fetch.bind(globalThis), s = e.onUnauthenticated, i = e.headers;
1407
+ let n = !1;
1408
+ async function r(d = !1) {
1409
+ n && !d && qe("XSRF-TOKEN") !== null || (await o(a, { credentials: "same-origin" }), n = !0);
1251
1410
  }
1252
- async function u(c, h, m, v = {}, d = !1) {
1253
- const w = Ja.has(c);
1254
- w && await r();
1255
- const f = {
1411
+ async function u(d, h, m, f = {}, c = !1) {
1412
+ const x = gl.has(d);
1413
+ x && await r();
1414
+ const p = {
1256
1415
  Accept: "application/json",
1257
1416
  "X-Requested-With": "XMLHttpRequest",
1258
1417
  // Standing headers first, so a caller can still override one for a single request.
1259
- ...s?.(),
1260
- ...v.headers
1418
+ ...i?.(),
1419
+ ...f.headers
1261
1420
  };
1262
- if (w) {
1263
- const k = Fe("XSRF-TOKEN");
1264
- k !== null && (f["X-XSRF-TOKEN"] = k);
1421
+ if (x) {
1422
+ const k = qe("XSRF-TOKEN");
1423
+ k !== null && (p["X-XSRF-TOKEN"] = k);
1265
1424
  }
1266
- m !== void 0 && (f["Content-Type"] = "application/json");
1267
- const y = await l(en(t, h, v.query), {
1268
- method: c,
1425
+ m !== void 0 && (p["Content-Type"] = "application/json");
1426
+ const g = await o(wl(t, h, f.query), {
1427
+ method: d,
1269
1428
  credentials: "same-origin",
1270
- headers: f,
1271
- signal: v.signal,
1429
+ headers: p,
1430
+ signal: f.signal,
1272
1431
  body: m === void 0 ? void 0 : JSON.stringify(m)
1273
1432
  });
1274
- if (y.status === 419 && w && !d)
1275
- return await r(!0), u(c, h, m, v, !0);
1276
- if (y.status === 401 && i?.(), !y.ok)
1277
- throw await Za(y);
1278
- if (y.status !== 204)
1279
- return await y.json();
1433
+ if (g.status === 419 && x && !c)
1434
+ return await r(!0), u(d, h, m, f, !0);
1435
+ if (g.status === 401 && s?.(), !g.ok)
1436
+ throw await bl(g);
1437
+ if (g.status !== 204)
1438
+ return await g.json();
1280
1439
  }
1281
1440
  return {
1282
- get: (c, h) => u("GET", c, void 0, h),
1283
- post: (c, h, m) => u("POST", c, h, m),
1284
- put: (c, h, m) => u("PUT", c, h, m),
1285
- patch: (c, h, m) => u("PATCH", c, h, m),
1286
- delete: (c, h) => u("DELETE", c, void 0, h)
1441
+ get: (d, h) => u("GET", d, void 0, h),
1442
+ post: (d, h, m) => u("POST", d, h, m),
1443
+ put: (d, h, m) => u("PUT", d, h, m),
1444
+ patch: (d, h, m) => u("PATCH", d, h, m),
1445
+ delete: (d, h) => u("DELETE", d, void 0, h)
1287
1446
  };
1288
1447
  }
1289
- async function Za(e) {
1448
+ async function bl(e) {
1290
1449
  let t = null;
1291
1450
  try {
1292
1451
  t = await e.json();
1293
1452
  } catch {
1294
1453
  }
1295
- const a = t ?? {}, l = typeof a.message == "string" && a.message !== "" ? a.message : e.statusText || `Request failed with ${e.status}`, i = a.errors !== null && typeof a.errors == "object" ? a.errors : {}, s = e.headers.get("Retry-After"), o = s === null ? null : Number.parseInt(s, 10);
1296
- return new Ce(
1297
- l,
1454
+ const a = t ?? {}, o = typeof a.message == "string" && a.message !== "" ? a.message : e.statusText || `Request failed with ${e.status}`, s = a.errors !== null && typeof a.errors == "object" ? a.errors : {}, i = e.headers.get("Retry-After"), n = i === null ? null : Number.parseInt(i, 10);
1455
+ return new We(
1456
+ o,
1298
1457
  e.status,
1299
- i,
1300
- Number.isFinite(o) ? o : null,
1458
+ s,
1459
+ Number.isFinite(n) ? n : null,
1301
1460
  t
1302
1461
  );
1303
1462
  }
1304
- function en(e, t, a) {
1305
- const i = /^https?:\/\//i.test(t) ? t : `${e}/${t.replace(/^\//, "")}`;
1463
+ function wl(e, t, a) {
1464
+ const s = /^https?:\/\//i.test(t) ? t : `${e}/${t.replace(/^\//, "")}`;
1306
1465
  if (a === void 0)
1307
- return i;
1308
- const s = new URLSearchParams();
1466
+ return s;
1467
+ const i = new URLSearchParams();
1309
1468
  for (const [r, u] of Object.entries(a))
1310
- u != null && s.set(r, String(u));
1311
- const o = s.toString();
1312
- return o === "" ? i : `${i}${i.includes("?") ? "&" : "?"}${o}`;
1469
+ u != null && i.set(r, String(u));
1470
+ const n = i.toString();
1471
+ return n === "" ? s : `${s}${s.includes("?") ? "&" : "?"}${n}`;
1313
1472
  }
1314
- function Fe(e) {
1473
+ function qe(e) {
1315
1474
  if (typeof document > "u")
1316
1475
  return null;
1317
1476
  for (const t of document.cookie.split(";")) {
1318
- const [a, ...l] = t.trim().split("=");
1477
+ const [a, ...o] = t.trim().split("=");
1319
1478
  if (a === e)
1320
- return decodeURIComponent(l.join("="));
1479
+ return decodeURIComponent(o.join("="));
1321
1480
  }
1322
1481
  return null;
1323
1482
  }
1324
- const tn = "webx.theme", ct = /* @__PURE__ */ Symbol("webx-theme");
1325
- function Jn() {
1326
- const e = ne(ct, null);
1483
+ const xl = "webx.theme", ht = /* @__PURE__ */ Symbol("webx-theme");
1484
+ function gn() {
1485
+ const e = ne(ht, null);
1327
1486
  if (e === null)
1328
1487
  throw new Error("useTheme() was called outside a panel created by createAdmin().");
1329
1488
  return e;
1330
1489
  }
1331
- function an(e, t) {
1332
- e.provide(ct, t);
1490
+ function kl(e, t) {
1491
+ e.provide(ht, t);
1333
1492
  }
1334
- function nn(e = {}) {
1335
- const t = e.storageKey === void 0 ? tn : e.storageKey, a = pe({
1336
- preference: ln(t) ?? "system",
1493
+ function _l(e = {}) {
1494
+ const t = e.storageKey === void 0 ? xl : e.storageKey, a = he({
1495
+ preference: $l(t) ?? "system",
1337
1496
  resolved: "light"
1338
1497
  });
1339
- function l() {
1340
- Jt(a.preference), a.resolved = a.preference === "system" ? Qt() : a.preference;
1498
+ function o() {
1499
+ na(a.preference), a.resolved = a.preference === "system" ? oa() : a.preference;
1341
1500
  }
1342
- return l(), Gt((i) => {
1343
- a.preference === "system" && (a.resolved = i);
1501
+ return o(), la((s) => {
1502
+ a.preference === "system" && (a.resolved = s);
1344
1503
  }), {
1345
1504
  state: a,
1346
- set(i) {
1347
- a.preference = i, l(), Oe(t, i);
1505
+ set(s) {
1506
+ a.preference = s, o(), Ye(t, s);
1348
1507
  },
1349
- adopt(i) {
1350
- if (i === void 0)
1508
+ adopt(s) {
1509
+ if (s === void 0)
1351
1510
  return;
1352
- const s = i ?? "system";
1353
- s !== a.preference && (a.preference = s, l(), Oe(t, s));
1511
+ const i = s ?? "system";
1512
+ i !== a.preference && (a.preference = i, o(), Ye(t, i));
1354
1513
  }
1355
1514
  };
1356
1515
  }
1357
- function Oe(e, t) {
1516
+ function Ye(e, t) {
1358
1517
  if (e !== null)
1359
1518
  try {
1360
1519
  localStorage.setItem(e, t);
1361
1520
  } catch {
1362
1521
  }
1363
1522
  }
1364
- function ln(e) {
1523
+ function $l(e) {
1365
1524
  if (e === null)
1366
1525
  return null;
1367
1526
  try {
@@ -1371,7 +1530,7 @@ function ln(e) {
1371
1530
  return null;
1372
1531
  }
1373
1532
  }
1374
- const mt = {
1533
+ const gt = {
1375
1534
  shell: {
1376
1535
  loading: "Loading the panel…",
1377
1536
  "error-title": "The panel could not start",
@@ -1585,25 +1744,45 @@ const mt = {
1585
1744
  "order-category": "Drag to change the order inside this category. The rest of the list keeps its own.",
1586
1745
  "order-locked": "Clear the search and the filters to change the order — only a whole list, or one category, can be dragged.",
1587
1746
  unknown: "One of the chosen categories is not there any more."
1747
+ },
1748
+ // What a block shows from another section (`wx-collection`): the server's refusals, then the
1749
+ // words of the field that makes the choice. The name of the section is the server's, translated.
1750
+ collections: {
1751
+ "unknown-source": "There is no “:source” on this site to show records from.",
1752
+ "unknown-category": "One of the chosen categories no longer exists.",
1753
+ limit: "How many to show: a whole number from 1 to :max, or empty for all.",
1754
+ flag: "This switch takes yes or no.",
1755
+ "field-source": "Shows records from “:source”.",
1756
+ "field-unavailable": "Records from “:source” cannot be chosen here: the section is not installed, or you have no access to it.",
1757
+ "field-categories": "Categories",
1758
+ "field-all": "All categories",
1759
+ "field-no-categories": "No such category.",
1760
+ "field-limit": "How many to show",
1761
+ "field-limit-all": "All",
1762
+ "field-filter": "A filter by category above the list",
1763
+ "field-markup": "Markup for search engines",
1764
+ "field-markup-auto-on": "By default it is on: the block shows every category.",
1765
+ "field-markup-auto-off": "By default it is off: search engines ask not to mark the same records up on several pages, and a chosen category usually stands on several.",
1766
+ "field-markup-reset": "Back to the default"
1588
1767
  }
1589
- }, vt = "webx.locale";
1590
- function Qn(e = {}) {
1591
- const t = e.manifestUrl ?? cn() ?? "/api/cms/manifest", a = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), l = e.basePath ?? "/cms", i = e.modules ?? [], s = [...e.routes ?? []];
1592
- for (const y of i)
1593
- s.push(...y.routes ?? []);
1594
- if (!s.some((y) => y.path === "/")) {
1595
- const y = i.find((k) => k.landing === !0);
1596
- s.push({
1768
+ }, yt = "webx.locale";
1769
+ function yn(e = {}) {
1770
+ const t = e.manifestUrl ?? Ll() ?? "/api/cms/manifest", a = e.apiPath ?? t.replace(/\/manifest\/?$/, ""), o = e.basePath ?? "/cms", s = e.modules ?? [], i = [...e.routes ?? []];
1771
+ for (const g of s)
1772
+ i.push(...g.routes ?? []);
1773
+ if (!i.some((g) => g.path === "/")) {
1774
+ const g = s.find((k) => k.landing === !0);
1775
+ i.push({
1597
1776
  path: "/",
1598
1777
  name: "webx.home",
1599
- component: Pa,
1600
- props: { landing: y?.path ?? y?.routes?.[0]?.path ?? null }
1778
+ component: ol,
1779
+ props: { landing: g?.path ?? g?.routes?.[0]?.path ?? null }
1601
1780
  });
1602
1781
  }
1603
- const o = $t({
1604
- history: Tt(l),
1605
- routes: s
1606
- }), r = Ee({ locale: e.locale ?? sn() }), u = nn(), c = e.http ?? Qa({
1782
+ const n = Lt({
1783
+ history: Vt(o),
1784
+ routes: i
1785
+ }), r = Ee({ locale: e.locale ?? Sl() }), u = _l(), d = e.http ?? yl({
1607
1786
  baseUrl: "",
1608
1787
  csrfUrl: `${a}/auth/csrf-cookie`,
1609
1788
  onUnauthenticated: () => {
@@ -1615,174 +1794,174 @@ function Qn(e = {}) {
1615
1794
  // signing in on a Russian sign-in screen lands in an English panel.
1616
1795
  headers: () => ({ "X-Webx-Locale": r.state.locale })
1617
1796
  });
1618
- r.defaults("webx-admin", mt);
1619
- async function h(y) {
1620
- const k = await c.get(`${a}/translations/${y}`);
1621
- r.load(k.data.namespaces, k.data.locale, k.data.fallback), rn(k.data.locale), dn(k.data.locale, r.state.panelLocales);
1797
+ r.defaults("webx-admin", gt);
1798
+ async function h(g) {
1799
+ const k = await d.get(`${a}/translations/${g}`);
1800
+ r.load(k.data.namespaces, k.data.locale, k.data.fallback), Cl(k.data.locale), Al(k.data.locale, r.state.panelLocales);
1622
1801
  }
1623
- const m = Na({
1624
- http: c,
1802
+ const m = al({
1803
+ http: d,
1625
1804
  theme: u,
1626
- basePath: l,
1805
+ basePath: o,
1627
1806
  apiPath: a,
1628
- modules: i,
1807
+ modules: s,
1629
1808
  i18n: r,
1630
1809
  loadDictionary: h,
1631
1810
  types: e.types,
1632
1811
  screens: e.screens,
1633
- loadManifest: async () => (await c.get(t)).data
1634
- }), v = kt(on(e));
1635
- v.use(It), Ba(v, m), ta(v, r), an(v, u);
1636
- const d = W("");
1637
- v.provide(
1638
- Pt,
1639
- x(() => r.state.locale)
1640
- ), v.provide(Dt, {
1641
- list: x(
1642
- () => r.state.contentLocales.map((y) => ({
1643
- code: y.code,
1644
- label: y.code.toUpperCase()
1812
+ loadManifest: async () => (await d.get(t)).data
1813
+ }), f = Wt(Tl(e));
1814
+ f.use(jt), ll(f, m), ra(f, r), kl(f, u);
1815
+ const c = A("");
1816
+ f.provide(
1817
+ Kt,
1818
+ w(() => r.state.locale)
1819
+ ), f.provide(qt, {
1820
+ list: w(
1821
+ () => r.state.contentLocales.map((g) => ({
1822
+ code: g.code,
1823
+ label: g.code.toUpperCase()
1645
1824
  }))
1646
1825
  ),
1647
- active: x({
1648
- get: () => d.value || (r.state.contentLocales[0]?.code ?? ""),
1649
- set: (y) => {
1650
- d.value = y;
1826
+ active: w({
1827
+ get: () => c.value || (r.state.contentLocales[0]?.code ?? ""),
1828
+ set: (g) => {
1829
+ c.value = g;
1651
1830
  }
1652
1831
  })
1653
1832
  });
1654
- const w = {
1655
- app: v,
1656
- router: o,
1833
+ const x = {
1834
+ app: f,
1835
+ router: n,
1657
1836
  context: m,
1658
1837
  i18n: r,
1659
1838
  theme: u,
1660
1839
  async mount() {
1661
- await Promise.all([f(), h(r.state.locale)]).catch(() => {
1662
- }), v.mount(e.el ?? "#webx-app"), await m.reload();
1840
+ await Promise.all([p(), h(r.state.locale)]).catch(() => {
1841
+ }), f.mount(e.el ?? "#webx-app"), await m.reload();
1663
1842
  }
1664
1843
  };
1665
- async function f() {
1666
- const y = await c.get(`${a}/locales`);
1667
- r.state.panelLocales = y.data.panel, r.state.contentLocales = y.data.content;
1844
+ async function p() {
1845
+ const g = await d.get(`${a}/locales`);
1846
+ r.state.panelLocales = g.data.panel, r.state.contentLocales = g.data.content;
1668
1847
  }
1669
- for (const y of e.plugins ?? [])
1670
- y.install(w);
1671
- return v.use(o), w;
1848
+ for (const g of e.plugins ?? [])
1849
+ g.install(x);
1850
+ return f.use(n), x;
1672
1851
  }
1673
- function on(e) {
1852
+ function Tl(e) {
1674
1853
  const t = {
1675
1854
  // The menu is the panel's own: it is the manifest, drawn.
1676
1855
  // The shell hands in what a choice means where it drew the menu — in the drawer it is what
1677
1856
  // closes it, and a drawer that stays open over the section it just opened is a drawer the
1678
1857
  // reader has to dismiss by hand.
1679
- nav: (a) => re(Da, { collapsed: a.collapsed === !0, onSelect: a.select })
1858
+ nav: (a) => ue(sl, { collapsed: a.collapsed === !0, onSelect: a.select })
1680
1859
  };
1681
- return e.brand !== void 0 && (t.brand = () => re(e.brand)), e.userMenu !== void 0 && (t.user = (a) => re(e.userMenu, { expanded: a.expanded === !0 })), { render: () => re(Ga, null, t) };
1860
+ return e.brand !== void 0 && (t.brand = () => ue(e.brand)), e.userMenu !== void 0 && (t.user = (a) => ue(e.userMenu, { expanded: a.expanded === !0 })), { render: () => ue(hl, null, t) };
1682
1861
  }
1683
- function sn() {
1684
- const e = un(vt);
1862
+ function Sl() {
1863
+ const e = Wl(yt);
1685
1864
  return e !== null ? e : typeof document < "u" && document.documentElement.lang !== "" ? document.documentElement.lang : typeof navigator > "u" ? "en" : navigator.language;
1686
1865
  }
1687
- function rn(e) {
1866
+ function Cl(e) {
1688
1867
  try {
1689
- localStorage.setItem(vt, e);
1868
+ localStorage.setItem(yt, e);
1690
1869
  } catch {
1691
1870
  }
1692
1871
  }
1693
- function un(e) {
1872
+ function Wl(e) {
1694
1873
  try {
1695
1874
  return localStorage.getItem(e);
1696
1875
  } catch {
1697
1876
  return null;
1698
1877
  }
1699
1878
  }
1700
- function dn(e, t) {
1879
+ function Al(e, t) {
1701
1880
  typeof document > "u" || (document.documentElement.lang = e, document.documentElement.dir = t.find((a) => a.code === e)?.direction ?? "ltr");
1702
1881
  }
1703
- function cn() {
1882
+ function Ll() {
1704
1883
  return typeof document > "u" ? null : document.querySelector('meta[name="webx-manifest"]')?.getAttribute("content") ?? null;
1705
1884
  }
1706
- function mn(e) {
1885
+ function Vl(e) {
1707
1886
  const t = e.replace(/\r\n?/g, `
1708
1887
  `).split(`
1709
1888
  `), a = [];
1710
- let l = 0;
1711
- for (; l < t.length; ) {
1712
- const i = t[l] ?? "";
1713
- if (i.trim() === "") {
1714
- l += 1;
1889
+ let o = 0;
1890
+ for (; o < t.length; ) {
1891
+ const s = t[o] ?? "";
1892
+ if (s.trim() === "") {
1893
+ o += 1;
1715
1894
  continue;
1716
1895
  }
1717
- if (/^```([\w-]*)\s*$/.exec(i)) {
1896
+ if (/^```([\w-]*)\s*$/.exec(s)) {
1718
1897
  const u = [];
1719
- for (l += 1; l < t.length && !/^```\s*$/.test(t[l] ?? ""); )
1720
- u.push(t[l] ?? ""), l += 1;
1721
- l += 1, a.push(`<pre><code>${We(u.join(`
1898
+ for (o += 1; o < t.length && !/^```\s*$/.test(t[o] ?? ""); )
1899
+ u.push(t[o] ?? ""), o += 1;
1900
+ o += 1, a.push(`<pre><code>${Ae(u.join(`
1722
1901
  `))}</code></pre>`);
1723
1902
  continue;
1724
1903
  }
1725
- const o = /^(#{1,4})\s+(.*)$/.exec(i);
1726
- if (o) {
1727
- const u = Math.min(o[1].length + 1, 5);
1728
- a.push(`<h${u}>${Te(o[2] ?? "")}</h${u}>`), l += 1;
1904
+ const n = /^(#{1,4})\s+(.*)$/.exec(s);
1905
+ if (n) {
1906
+ const u = Math.min(n[1].length + 1, 5);
1907
+ a.push(`<h${u}>${Se(n[2] ?? "")}</h${u}>`), o += 1;
1729
1908
  continue;
1730
1909
  }
1731
- if (me(i)) {
1732
- const u = /^\s*\d+[.)]\s+/.test(i), c = [];
1733
- for (; l < t.length && me(t[l] ?? ""); )
1734
- for (c.push((t[l] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), l += 1; l < t.length; ) {
1735
- const m = t[l] ?? "";
1736
- if (m.trim() === "" || me(m) || /^(#{1,4})\s/.test(m) || /^```/.test(m))
1910
+ if (fe(s)) {
1911
+ const u = /^\s*\d+[.)]\s+/.test(s), d = [];
1912
+ for (; o < t.length && fe(t[o] ?? ""); )
1913
+ for (d.push((t[o] ?? "").replace(/^\s*(?:[-*+]|\d+[.)])\s+/, "")), o += 1; o < t.length; ) {
1914
+ const m = t[o] ?? "";
1915
+ if (m.trim() === "" || fe(m) || /^(#{1,4})\s/.test(m) || /^```/.test(m))
1737
1916
  break;
1738
- c[c.length - 1] += ` ${m.trim()}`, l += 1;
1917
+ d[d.length - 1] += ` ${m.trim()}`, o += 1;
1739
1918
  }
1740
1919
  const h = u ? "ol" : "ul";
1741
- a.push(`<${h}>${c.map((m) => `<li>${Te(m)}</li>`).join("")}</${h}>`);
1920
+ a.push(`<${h}>${d.map((m) => `<li>${Se(m)}</li>`).join("")}</${h}>`);
1742
1921
  continue;
1743
1922
  }
1744
1923
  const r = [];
1745
- for (; l < t.length; ) {
1746
- const u = t[l] ?? "";
1747
- if (u.trim() === "" || me(u) || /^(#{1,4})\s/.test(u) || /^```/.test(u)) break;
1748
- r.push(u.trim()), l += 1;
1924
+ for (; o < t.length; ) {
1925
+ const u = t[o] ?? "";
1926
+ if (u.trim() === "" || fe(u) || /^(#{1,4})\s/.test(u) || /^```/.test(u)) break;
1927
+ r.push(u.trim()), o += 1;
1749
1928
  }
1750
- a.push(`<p>${Te(r.join(" "))}</p>`);
1929
+ a.push(`<p>${Se(r.join(" "))}</p>`);
1751
1930
  }
1752
1931
  return a.join("");
1753
1932
  }
1754
- const ce = "\0";
1755
- function me(e) {
1933
+ const me = "\0";
1934
+ function fe(e) {
1756
1935
  return /^\s*(?:[-*+]|\d+[.)])\s+/.test(e);
1757
1936
  }
1758
- function Te(e) {
1759
- const t = [], a = e.replace(/`([^`]+)`/g, (i, s) => (t.push(`<code>${We(s)}</code>`), `${ce}${t.length - 1}${ce}`));
1760
- return We(a).replace(
1937
+ function Se(e) {
1938
+ const t = [], a = e.replace(/`([^`]+)`/g, (s, i) => (t.push(`<code>${Ae(i)}</code>`), `${me}${t.length - 1}${me}`));
1939
+ return Ae(a).replace(
1761
1940
  /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
1762
1941
  '<a href="$2" target="_blank" rel="noopener">$1</a>'
1763
1942
  ).replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(
1764
- new RegExp(`${ce}(\\d+)${ce}`, "g"),
1765
- (i, s) => t[Number(s)] ?? ""
1943
+ new RegExp(`${me}(\\d+)${me}`, "g"),
1944
+ (s, i) => t[Number(i)] ?? ""
1766
1945
  );
1767
1946
  }
1768
- function We(e) {
1947
+ function Ae(e) {
1769
1948
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1770
1949
  }
1771
- function vn(e) {
1950
+ function zl(e) {
1772
1951
  const t = e.scope("webx-admin"), a = /* @__PURE__ */ new Map();
1773
- function l(s, o, r) {
1774
- const u = e.state.locale, c = `${u}:${s}`;
1775
- let h = a.get(c);
1776
- return h === void 0 && (h = new Intl.DateTimeFormat(u, o), a.set(c, h)), h.format(r);
1952
+ function o(i, n, r) {
1953
+ const u = e.state.locale, d = `${u}:${i}`;
1954
+ let h = a.get(d);
1955
+ return h === void 0 && (h = new Intl.DateTimeFormat(u, n), a.set(d, h)), h.format(r);
1777
1956
  }
1778
- const i = (s) => l("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, s);
1957
+ const s = (i) => o("time", { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }, i);
1779
1958
  return {
1780
- short(s) {
1781
- const o = fe(s);
1782
- if (o === null)
1959
+ short(i) {
1960
+ const n = pe(i);
1961
+ if (n === null)
1783
1962
  return t("dates.never");
1784
- const r = /* @__PURE__ */ new Date(), u = He(o, r);
1785
- return u === 0 ? t("dates.today", { time: i(o) }) : u === -1 ? t("dates.yesterday", { time: i(o) }) : o.getFullYear() === r.getFullYear() ? l(
1963
+ const r = /* @__PURE__ */ new Date(), u = Xe(n, r);
1964
+ return u === 0 ? t("dates.today", { time: s(n) }) : u === -1 ? t("dates.yesterday", { time: s(n) }) : n.getFullYear() === r.getFullYear() ? o(
1786
1965
  "this-year",
1787
1966
  {
1788
1967
  day: "numeric",
@@ -1791,156 +1970,156 @@ function vn(e) {
1791
1970
  minute: "2-digit",
1792
1971
  hourCycle: "h23"
1793
1972
  },
1794
- o
1795
- ) : l("earlier", { day: "numeric", month: "long", year: "numeric" }, o);
1973
+ n
1974
+ ) : o("earlier", { day: "numeric", month: "long", year: "numeric" }, n);
1796
1975
  },
1797
- compact(s) {
1798
- const o = fe(s);
1799
- if (o === null)
1976
+ compact(i) {
1977
+ const n = pe(i);
1978
+ if (n === null)
1800
1979
  return t("dates.never");
1801
1980
  const r = /* @__PURE__ */ new Date();
1802
- return He(o, r) === 0 ? i(o) : o.getFullYear() === r.getFullYear() ? l("compact", { day: "numeric", month: "short" }, o) : l("compact-earlier", { dateStyle: "short" }, o);
1981
+ return Xe(n, r) === 0 ? s(n) : n.getFullYear() === r.getFullYear() ? o("compact", { day: "numeric", month: "short" }, n) : o("compact-earlier", { dateStyle: "short" }, n);
1803
1982
  },
1804
- exact(s) {
1805
- const o = fe(s);
1806
- return o === null ? "" : l("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, o);
1983
+ exact(i) {
1984
+ const n = pe(i);
1985
+ return n === null ? "" : o("exact", { dateStyle: "long", timeStyle: "medium", hourCycle: "h23" }, n);
1807
1986
  },
1808
- iso(s) {
1809
- const o = fe(s);
1810
- return o === null ? "" : o.toISOString();
1987
+ iso(i) {
1988
+ const n = pe(i);
1989
+ return n === null ? "" : n.toISOString();
1811
1990
  }
1812
1991
  };
1813
1992
  }
1814
- function ft() {
1815
- const e = ne(we, null);
1816
- return vn(e ?? fn());
1993
+ function bt() {
1994
+ const e = ne(xe, null);
1995
+ return zl(e ?? Nl());
1817
1996
  }
1818
1997
  let ve = null;
1819
- function fn() {
1820
- return ve === null && (ve = Ee(), ve.defaults("webx-admin", mt)), ve;
1998
+ function Nl() {
1999
+ return ve === null && (ve = Ee(), ve.defaults("webx-admin", gt)), ve;
1821
2000
  }
1822
- function fe(e) {
2001
+ function pe(e) {
1823
2002
  if (e == null || e === "")
1824
2003
  return null;
1825
2004
  const t = e instanceof Date ? e : new Date(e);
1826
2005
  return Number.isNaN(t.getTime()) ? null : t;
1827
2006
  }
1828
- function He(e, t) {
1829
- const a = (l) => Date.UTC(l.getFullYear(), l.getMonth(), l.getDate());
2007
+ function Xe(e, t) {
2008
+ const a = (o) => Date.UTC(o.getFullYear(), o.getMonth(), o.getDate());
1830
2009
  return Math.round((a(e) - a(t)) / 864e5);
1831
2010
  }
1832
- function pn(e, t, a) {
1833
- const l = e instanceof Ce ? e.status : hn(e);
1834
- if (l === 422)
1835
- return gn(e) ?? a ?? t("errors.unknown");
1836
- if (l === 401) return t("errors.signed-out");
1837
- if (l === 403) return t("errors.forbidden");
1838
- if (l === 404) return t("errors.gone");
1839
- if (l === 409) return t("errors.conflict");
1840
- if (l === 429) {
1841
- const i = e instanceof Ce ? e.retryAfter : null;
1842
- return i === null ? t("errors.throttled") : t("errors.throttled-in", { seconds: i });
2011
+ function Ul(e, t, a) {
2012
+ const o = e instanceof We ? e.status : El(e);
2013
+ if (o === 422)
2014
+ return Il(e) ?? a ?? t("errors.unknown");
2015
+ if (o === 401) return t("errors.signed-out");
2016
+ if (o === 403) return t("errors.forbidden");
2017
+ if (o === 404) return t("errors.gone");
2018
+ if (o === 409) return t("errors.conflict");
2019
+ if (o === 429) {
2020
+ const s = e instanceof We ? e.retryAfter : null;
2021
+ return s === null ? t("errors.throttled") : t("errors.throttled-in", { seconds: s });
1843
2022
  }
1844
- return l !== null && l >= 500 ? t("errors.server") : l === null ? t("errors.offline") : a ?? t("errors.unknown");
2023
+ return o !== null && o >= 500 ? t("errors.server") : o === null ? t("errors.offline") : a ?? t("errors.unknown");
1845
2024
  }
1846
2025
  function Re() {
1847
2026
  const e = P("webx-admin");
1848
- return (t, a) => pn(t, e, a);
2027
+ return (t, a) => Ul(t, e, a);
1849
2028
  }
1850
- function hn(e) {
2029
+ function El(e) {
1851
2030
  const t = e?.status;
1852
2031
  return typeof t == "number" ? t : null;
1853
2032
  }
1854
- function gn(e) {
2033
+ function Il(e) {
1855
2034
  const a = e?.body?.message;
1856
2035
  return typeof a == "string" && a !== "" ? a : null;
1857
2036
  }
1858
- function yn(e, t, a) {
1859
- const l = `${e.apiPath}/entities/${t}/${a}/notes`, i = (o) => `${e.apiPath}/notes/${o}`, s = (o) => o.data;
2037
+ function Rl(e, t, a) {
2038
+ const o = `${e.apiPath}/entities/${t}/${a}/notes`, s = (n) => `${e.apiPath}/notes/${n}`, i = (n) => n.data;
1860
2039
  return {
1861
- list: () => e.http.get(l).then(s),
1862
- add: (o) => e.http.post(l, { body: o }).then(s),
1863
- save: (o, r) => e.http.put(i(o), { body: r }).then(s),
1864
- remove: (o) => e.http.delete(i(o)).then(() => {
2040
+ list: () => e.http.get(o).then(i),
2041
+ add: (n) => e.http.post(o, { body: n }).then(i),
2042
+ save: (n, r) => e.http.put(s(n), { body: r }).then(i),
2043
+ remove: (n) => e.http.delete(s(n)).then(() => {
1865
2044
  })
1866
2045
  };
1867
2046
  }
1868
- const pt = /* @__PURE__ */ Symbol("wx-category-editor");
1869
- function bn(e) {
1870
- Xe(pt, e);
2047
+ const wt = /* @__PURE__ */ Symbol("wx-category-editor");
2048
+ function Bl(e) {
2049
+ et(wt, e);
1871
2050
  }
1872
- function Zn() {
1873
- return ne(pt, null);
2051
+ function bn() {
2052
+ return ne(wt, null);
1874
2053
  }
1875
- function wn(e) {
2054
+ function Ml(e) {
1876
2055
  return (e.q ?? "").trim() !== "" || e.filtered ? "locked" : e.category == null ? "all" : "category";
1877
2056
  }
1878
- function el(e, t) {
1879
- const a = X(), l = P("webx-admin"), i = x(() => wn(t()));
2057
+ function wn(e, t) {
2058
+ const a = q(), o = P("webx-admin"), s = w(() => Ml(t()));
1880
2059
  return {
1881
- mode: i,
1882
- sortable: x(() => i.value !== "locked"),
1883
- hint: x(() => l(`categories.order-${i.value}`)),
1884
- move: (s) => na(a, e, s, i.value === "category" ? t().category ?? null : null)
2060
+ mode: s,
2061
+ sortable: w(() => s.value !== "locked"),
2062
+ hint: w(() => o(`categories.order-${s.value}`)),
2063
+ move: (i) => da(a, e, i, s.value === "category" ? t().category ?? null : null)
1885
2064
  };
1886
2065
  }
1887
- function Ne(e = {}) {
2066
+ function Be(e = {}) {
1888
2067
  const t = P("webx-admin");
1889
- return (a, l) => t(e[a] ?? `webx-admin::categories.${a}`, l);
2068
+ return (a, o) => t(e[a] ?? `webx-admin::categories.${a}`, o);
1890
2069
  }
1891
- const xn = /* @__PURE__ */ R({
2070
+ const Pl = /* @__PURE__ */ I({
1892
2071
  name: "WxCategoryCreateDialog",
1893
2072
  __name: "CategoryCreateDialog",
1894
2073
  props: {
1895
2074
  options: {}
1896
2075
  },
1897
2076
  setup(e) {
1898
- const t = e, { open: a, resolve: l, dismiss: i } = Mt(), s = xe(X(), t.options.api), o = Ne(t.options.words), r = W(""), u = W(!1), c = W({}), h = Ye("field");
2077
+ const t = e, { open: a, resolve: o, dismiss: s } = Yt(), i = ce(q(), t.options.api), n = Be(t.options.words), r = A(""), u = A(!1), d = A({}), h = Ze("field");
1899
2078
  Le(async () => {
1900
- await Je(), h.value?.querySelector("input")?.focus();
2079
+ await at(), h.value?.querySelector("input")?.focus();
1901
2080
  });
1902
- function m(d) {
1903
- const w = Object.keys(c.value).find((f) => f === d || f.startsWith(`${d}.`));
1904
- return w === void 0 ? void 0 : c.value[w]?.[0];
2081
+ function m(c) {
2082
+ const x = Object.keys(d.value).find((p) => p === c || p.startsWith(`${c}.`));
2083
+ return x === void 0 ? void 0 : d.value[x]?.[0];
1905
2084
  }
1906
- async function v() {
2085
+ async function f() {
1907
2086
  if (!(r.value.trim() === "" || u.value)) {
1908
- u.value = !0, c.value = {};
2087
+ u.value = !0, d.value = {};
1909
2088
  try {
1910
- l(await s.create({ title: r.value.trim() }));
1911
- } catch (d) {
1912
- c.value = d.body?.errors ?? {};
2089
+ o(await i.create({ title: r.value.trim() }));
2090
+ } catch (c) {
2091
+ d.value = c.body?.errors ?? {};
1913
2092
  } finally {
1914
2093
  u.value = !1;
1915
2094
  }
1916
2095
  }
1917
2096
  }
1918
- return (d, w) => (p(), $(n(lt), {
1919
- open: n(a),
1920
- "onUpdate:open": w[2] || (w[2] = (f) => Ge(a) ? a.value = f : null),
1921
- title: n(o)("new"),
2097
+ return (c, x) => (v(), T(l(rt), {
2098
+ open: l(a),
2099
+ "onUpdate:open": x[2] || (x[2] = (p) => tt(a) ? a.value = p : null),
2100
+ title: l(n)("new"),
1922
2101
  width: 440
1923
2102
  }, {
1924
- footer: g(() => [
1925
- b(n(Ot), { size: "sm" }, {
1926
- default: g(() => [
1927
- b(n(Z), {
2103
+ footer: y(() => [
2104
+ b(l(Gt), { size: "sm" }, {
2105
+ default: y(() => [
2106
+ b(l(Q), {
1928
2107
  variant: "outline",
1929
- onClick: w[1] || (w[1] = (f) => n(i)())
2108
+ onClick: x[1] || (x[1] = (p) => l(s)())
1930
2109
  }, {
1931
- default: g(() => [
1932
- V(L(n(o)("cancel")), 1)
2110
+ default: y(() => [
2111
+ V(W(l(n)("cancel")), 1)
1933
2112
  ]),
1934
2113
  _: 1
1935
2114
  }),
1936
- b(n(Z), {
2115
+ b(l(Q), {
1937
2116
  type: "primary",
1938
2117
  loading: u.value,
1939
2118
  disabled: r.value.trim() === "",
1940
- onClick: v
2119
+ onClick: f
1941
2120
  }, {
1942
- default: g(() => [
1943
- V(L(n(o)("create")), 1)
2121
+ default: y(() => [
2122
+ V(W(l(n)("create")), 1)
1944
2123
  ]),
1945
2124
  _: 1
1946
2125
  }, 8, ["loading", "disabled"])
@@ -1948,22 +2127,22 @@ const xn = /* @__PURE__ */ R({
1948
2127
  _: 1
1949
2128
  })
1950
2129
  ]),
1951
- default: g(() => [
1952
- b(n(Ft), {
1953
- label: n(o)("field-title"),
2130
+ default: y(() => [
2131
+ b(l(Xt), {
2132
+ label: l(n)("field-title"),
1954
2133
  error: m("title") ?? m("slug"),
1955
2134
  required: ""
1956
2135
  }, {
1957
- default: g(() => [
1958
- O("div", {
2136
+ default: y(() => [
2137
+ B("div", {
1959
2138
  ref_key: "field",
1960
2139
  ref: h
1961
2140
  }, [
1962
- b(n(ye), {
2141
+ b(l(be), {
1963
2142
  modelValue: r.value,
1964
- "onUpdate:modelValue": w[0] || (w[0] = (f) => r.value = f),
1965
- "aria-label": n(o)("field-title"),
1966
- onKeyup: Qe(v, ["enter"])
2143
+ "onUpdate:modelValue": x[0] || (x[0] = (p) => r.value = p),
2144
+ "aria-label": l(n)("field-title"),
2145
+ onKeyup: lt(f, ["enter"])
1967
2146
  }, null, 8, ["modelValue", "aria-label"])
1968
2147
  ], 512)
1969
2148
  ]),
@@ -1973,135 +2152,136 @@ const xn = /* @__PURE__ */ R({
1973
2152
  _: 1
1974
2153
  }, 8, ["open", "title"]));
1975
2154
  }
1976
- }), kn = { class: "wx-category-row__name" }, _n = /* @__PURE__ */ R({
2155
+ }), Dl = { class: "wx-category-row__name" }, Fl = /* @__PURE__ */ I({
1977
2156
  name: "WxCategoriesPage",
1978
2157
  __name: "CategoriesPage",
1979
2158
  props: {
1980
2159
  options: {}
1981
2160
  },
1982
2161
  setup(e) {
1983
- const t = e, a = X(), l = xe(a, t.options.api), i = ge(), s = Ne(t.options.words), o = Re(), r = W([]), u = W(!0), c = x(() => a.can(t.options.manage)), h = x(
1984
- () => a.state.manifest?.modules.find((S) => S.id === t.options.module)?.title ?? ""
1985
- ), m = Ht(xn), v = x(
1986
- () => c.value ? [{ key: "new", label: s("new"), icon: "plus", primary: !0, run: () => {
1987
- y();
2162
+ const t = e, a = q(), o = ce(a, t.options.api), s = ye(), i = Be(t.options.words), n = Re(), r = A([]), u = A(!0), d = A(!0), h = w(() => a.can(t.options.manage)), m = w(
2163
+ () => a.state.manifest?.modules.find((C) => C.id === t.options.module)?.title ?? ""
2164
+ ), f = Jt(Pl), c = w(
2165
+ () => h.value ? [{ key: "new", label: i("new"), icon: "plus", primary: !0, run: () => {
2166
+ k();
1988
2167
  } }] : []
1989
2168
  );
1990
- function d(S) {
1991
- return Number(S[t.options.count] ?? 0);
2169
+ function x(C) {
2170
+ return Number(C[t.options.count] ?? 0);
1992
2171
  }
1993
- async function w() {
2172
+ async function p() {
1994
2173
  u.value = !0;
1995
2174
  try {
1996
- r.value = (await l.list()).data;
1997
- } catch (S) {
1998
- D.danger(o(S));
2175
+ const C = await o.list();
2176
+ r.value = C.data, d.value = C.prefix !== null;
2177
+ } catch (C) {
2178
+ D.danger(n(C));
1999
2179
  } finally {
2000
2180
  u.value = !1;
2001
2181
  }
2002
2182
  }
2003
- w();
2004
- function f(S) {
2005
- i.push(`${t.options.path}/${S.id}`);
2183
+ p();
2184
+ function g(C) {
2185
+ s.push(`${t.options.path}/${C.id}`);
2006
2186
  }
2007
- async function y() {
2008
- const S = await m({ options: t.options });
2009
- S !== void 0 && f(S);
2187
+ async function k() {
2188
+ const C = await f({ options: t.options });
2189
+ C !== void 0 && g(C);
2010
2190
  }
2011
- async function k(S) {
2012
- if (d(S) > 0) {
2013
- D.warning(s("delete-blocked"));
2191
+ async function U(C) {
2192
+ if (x(C) > 0) {
2193
+ D.warning(i("delete-blocked"));
2014
2194
  return;
2015
2195
  }
2016
- if (await he({
2017
- title: s("delete-title", { name: S.name }),
2018
- message: s("delete-text"),
2019
- confirmText: s("delete"),
2020
- cancelText: s("cancel"),
2196
+ if (await ge({
2197
+ title: i("delete-title", { name: C.name }),
2198
+ message: i("delete-text"),
2199
+ confirmText: i("delete"),
2200
+ cancelText: i("cancel"),
2021
2201
  tone: "danger"
2022
2202
  }))
2023
2203
  try {
2024
- await l.remove(S.id), D.success(s("deleted")), await w();
2025
- } catch (C) {
2026
- D.danger(o(C));
2204
+ await o.remove(C.id), D.success(i("deleted")), await p();
2205
+ } catch (E) {
2206
+ D.danger(n(E));
2027
2207
  }
2028
2208
  }
2029
- function M(S) {
2030
- const B = [{ key: "edit", label: s("edit"), icon: "edit", run: () => f(S) }], C = t.options.items;
2031
- return C && d(S) > 0 && B.push({
2209
+ function J(C) {
2210
+ const L = [{ key: "edit", label: i("edit"), icon: "edit", run: () => g(C) }], E = t.options.items;
2211
+ return E && x(C) > 0 && L.push({
2032
2212
  key: "items",
2033
- label: s("show-items"),
2213
+ label: i("show-items"),
2034
2214
  icon: "file-txt",
2035
2215
  run: () => {
2036
- i.push(C(S.id));
2216
+ s.push(E(C.id));
2037
2217
  }
2038
- }), S.url && S.is_visible && B.push({ key: "site", label: s("open-on-site"), icon: "link", href: S.url }), c.value && B.push({
2218
+ }), C.url && C.is_visible && L.push({ key: "site", label: i("open-on-site"), icon: "link", href: C.url }), h.value && L.push({
2039
2219
  key: "delete",
2040
- label: s("delete"),
2220
+ label: i("delete"),
2041
2221
  icon: "trash",
2042
2222
  danger: !0,
2043
2223
  run: () => {
2044
- k(S);
2224
+ U(C);
2045
2225
  }
2046
- }), B;
2226
+ }), L;
2047
2227
  }
2048
- async function J() {
2228
+ async function j() {
2049
2229
  try {
2050
- await l.reorder(r.value.map((S) => S.id));
2051
- } catch (S) {
2052
- D.danger(o(S, s("reorder-failed"))), await w();
2230
+ await o.reorder(r.value.map((C) => C.id));
2231
+ } catch (C) {
2232
+ D.danger(n(C, i("reorder-failed"))), await p();
2053
2233
  }
2054
2234
  }
2055
- return (S, B) => {
2056
- const C = j("router-link");
2057
- return p(), $(rt, {
2235
+ return (C, L) => {
2236
+ const E = H("router-link");
2237
+ return v(), T(ft, {
2058
2238
  class: "wx-categories",
2059
- title: h.value,
2060
- actions: v.value,
2239
+ title: m.value,
2240
+ actions: c.value,
2061
2241
  padding: "sm"
2062
2242
  }, {
2063
- default: g(() => [
2064
- u.value ? (p(), $(n(ue), {
2243
+ default: y(() => [
2244
+ u.value ? (v(), T(l(de), {
2065
2245
  key: 0,
2066
2246
  class: "wx-categories__loading",
2067
2247
  rows: 5
2068
- })) : r.value.length === 0 ? (p(), $(n(ot), {
2248
+ })) : r.value.length === 0 ? (v(), T(l(ut), {
2069
2249
  key: 1,
2070
- title: n(s)("empty"),
2071
- description: n(s)("empty-help")
2072
- }, null, 8, ["title", "description"])) : (p(), T(H, { key: 2 }, [
2073
- b(n(tt), {
2250
+ title: l(i)("empty"),
2251
+ description: l(i)("empty-help")
2252
+ }, null, 8, ["title", "description"])) : (v(), _(F, { key: 2 }, [
2253
+ b(l(st), {
2074
2254
  modelValue: r.value,
2075
- "onUpdate:modelValue": B[0] || (B[0] = (A) => r.value = A),
2255
+ "onUpdate:modelValue": L[0] || (L[0] = (S) => r.value = S),
2076
2256
  class: "wx-categories__list",
2077
2257
  plain: "",
2078
2258
  "item-key": "id",
2079
- "item-label": (A) => A.name,
2080
- disabled: !c.value,
2081
- onMove: J
2259
+ "item-label": (S) => S.name,
2260
+ disabled: !h.value,
2261
+ onMove: j
2082
2262
  }, {
2083
- default: g(({ item: A }) => [
2084
- b(C, {
2085
- class: ae(["wx-category-row", { "is-hidden": !A.is_visible }]),
2086
- to: `${t.options.path}/${A.id}`
2263
+ default: y(({ item: S }) => [
2264
+ b(E, {
2265
+ class: le(["wx-category-row", { "is-hidden": !S.is_visible }]),
2266
+ to: `${t.options.path}/${S.id}`
2087
2267
  }, {
2088
- default: g(() => [
2089
- O("span", kn, [
2090
- b(n(G), {
2268
+ default: y(() => [
2269
+ B("span", Dl, [
2270
+ b(l(G), {
2091
2271
  truncate: "",
2092
2272
  weight: "medium"
2093
2273
  }, {
2094
- default: g(() => [
2095
- V(L(A.name), 1)
2274
+ default: y(() => [
2275
+ V(W(S.name), 1)
2096
2276
  ]),
2097
2277
  _: 2
2098
2278
  }, 1024),
2099
- A.is_visible ? U("", !0) : (p(), $(n(st), {
2279
+ S.is_visible ? N("", !0) : (v(), T(l(dt), {
2100
2280
  key: 0,
2101
- content: n(s)("hidden")
2281
+ content: l(i)("hidden")
2102
2282
  }, {
2103
- default: g(() => [
2104
- b(n(Ve), {
2283
+ default: y(() => [
2284
+ b(l(Ue), {
2105
2285
  name: "eye-off",
2106
2286
  size: "sm"
2107
2287
  })
@@ -2109,42 +2289,43 @@ const xn = /* @__PURE__ */ R({
2109
2289
  _: 1
2110
2290
  }, 8, ["content"]))
2111
2291
  ]),
2112
- b(n(G), {
2292
+ d.value ? (v(), T(l(G), {
2293
+ key: 0,
2113
2294
  size: "sm",
2114
2295
  tone: "muted",
2115
2296
  truncate: ""
2116
2297
  }, {
2117
- default: g(() => [
2118
- V(L(A.path === null ? n(s)("no-address") : `/${A.path}`), 1)
2298
+ default: y(() => [
2299
+ V(W(S.path === null ? l(i)("no-address") : `/${S.path}`), 1)
2119
2300
  ]),
2120
2301
  _: 2
2121
- }, 1024)
2302
+ }, 1024)) : N("", !0)
2122
2303
  ]),
2123
2304
  _: 2
2124
2305
  }, 1032, ["class", "to"])
2125
2306
  ]),
2126
- actions: g(({ item: A }) => [
2127
- b(n(G), {
2307
+ actions: y(({ item: S }) => [
2308
+ b(l(G), {
2128
2309
  class: "wx-category-row__count",
2129
2310
  size: "sm",
2130
2311
  tone: "muted"
2131
2312
  }, {
2132
- default: g(() => [
2133
- V(L(n(s)("count", { count: d(A) })), 1)
2313
+ default: y(() => [
2314
+ V(W(l(i)("count", { count: x(S) })), 1)
2134
2315
  ]),
2135
2316
  _: 2
2136
2317
  }, 1024),
2137
- b(Ue, {
2138
- actions: M(A),
2139
- label: A.name
2318
+ b(Ie, {
2319
+ actions: J(S),
2320
+ label: S.name
2140
2321
  }, null, 8, ["actions", "label"])
2141
2322
  ]),
2142
2323
  _: 1
2143
2324
  }, 8, ["modelValue", "item-label", "disabled"]),
2144
- b(n(be), {
2325
+ b(l(we), {
2145
2326
  class: "wx-categories__note",
2146
2327
  type: "info",
2147
- description: n(s)("order")
2328
+ description: l(i)("order")
2148
2329
  }, null, 8, ["description"])
2149
2330
  ], 64))
2150
2331
  ]),
@@ -2152,45 +2333,45 @@ const xn = /* @__PURE__ */ R({
2152
2333
  }, 8, ["title", "actions"]);
2153
2334
  };
2154
2335
  }
2155
- }), $n = {
2336
+ }), Ol = {
2156
2337
  class: "wx-save-state",
2157
2338
  role: "status",
2158
2339
  "aria-live": "polite"
2159
- }, Tn = /* @__PURE__ */ R({
2340
+ }, Hl = /* @__PURE__ */ I({
2160
2341
  __name: "SaveState",
2161
2342
  props: {
2162
2343
  state: {},
2163
2344
  linger: { default: 2e3 }
2164
2345
  },
2165
2346
  setup(e) {
2166
- const t = e, a = P("webx-admin"), l = W(!1);
2167
- let i = null;
2168
- ee(
2347
+ const t = e, a = P("webx-admin"), o = A(!1);
2348
+ let s = null;
2349
+ Z(
2169
2350
  () => t.state,
2170
- (o, r) => {
2171
- i !== null && clearTimeout(i), l.value = r === "saving" && o === "saved", l.value && (i = window.setTimeout(() => {
2172
- l.value = !1, i = null;
2351
+ (n, r) => {
2352
+ s !== null && clearTimeout(s), o.value = r === "saving" && n === "saved", o.value && (s = window.setTimeout(() => {
2353
+ o.value = !1, s = null;
2173
2354
  }, t.linger));
2174
2355
  }
2175
2356
  );
2176
- const s = x(
2177
- () => t.state === "saving" ? "saving" : l.value ? "saved" : null
2357
+ const i = w(
2358
+ () => t.state === "saving" ? "saving" : o.value ? "saved" : null
2178
2359
  );
2179
- return Ze(() => {
2180
- i !== null && clearTimeout(i);
2181
- }), (o, r) => (p(), T("span", $n, [
2182
- s.value ? (p(), $(n(Ve), {
2360
+ return nt(() => {
2361
+ s !== null && clearTimeout(s);
2362
+ }), (n, r) => (v(), _("span", Ol, [
2363
+ i.value ? (v(), T(l(Ue), {
2183
2364
  key: 0,
2184
- class: ae(["wx-save-state__mark", { "is-saved": s.value === "saved" }]),
2185
- name: s.value === "saving" ? "loader" : "check",
2186
- spin: s.value === "saving",
2187
- label: n(a)(`editor.${s.value}`)
2188
- }, null, 8, ["class", "name", "spin", "label"])) : U("", !0)
2365
+ class: le(["wx-save-state__mark", { "is-saved": i.value === "saved" }]),
2366
+ name: i.value === "saving" ? "loader" : "check",
2367
+ spin: i.value === "saving",
2368
+ label: l(a)(`editor.${i.value}`)
2369
+ }, null, 8, ["class", "name", "spin", "label"])) : N("", !0)
2189
2370
  ]));
2190
2371
  }
2191
- }), Sn = /* @__PURE__ */ Y(Tn, [["__scopeId", "data-v-216e5e44"]]), Cn = { class: "wx-screen-host" }, Wn = /* @__PURE__ */ R({
2372
+ }), jl = /* @__PURE__ */ K(Hl, [["__scopeId", "data-v-216e5e44"]]), Kl = { class: "wx-screen-host" }, ql = /* @__PURE__ */ I({
2192
2373
  __name: "Screen",
2193
- props: /* @__PURE__ */ oe({
2374
+ props: /* @__PURE__ */ ae({
2194
2375
  name: {},
2195
2376
  errors: { default: void 0 },
2196
2377
  disabled: { type: Boolean, default: !1 },
@@ -2201,39 +2382,39 @@ const xn = /* @__PURE__ */ R({
2201
2382
  modelValue: { default: () => ({}) },
2202
2383
  modelModifiers: {}
2203
2384
  }),
2204
- emits: /* @__PURE__ */ oe(["loaded"], ["update:modelValue"]),
2385
+ emits: /* @__PURE__ */ ae(["loaded"], ["update:modelValue"]),
2205
2386
  setup(e, { expose: t, emit: a }) {
2206
- const l = e, i = a, s = de(e, "modelValue"), o = X(), r = P("webx-admin"), u = W(null), c = W(null);
2387
+ const o = e, s = a, i = se(e, "modelValue"), n = q(), r = P("webx-admin"), u = A(null), d = A(null);
2207
2388
  async function h() {
2208
- u.value = null, c.value = null;
2389
+ u.value = null, d.value = null;
2209
2390
  try {
2210
- const m = await o.loadScreen(l.name);
2211
- u.value = m, i("loaded", m);
2391
+ const m = await n.loadScreen(o.name);
2392
+ u.value = m, s("loaded", m);
2212
2393
  } catch (m) {
2213
- c.value = m instanceof Error ? m.message : String(m);
2394
+ d.value = m instanceof Error ? m.message : String(m);
2214
2395
  }
2215
2396
  }
2216
- return ee([() => l.name, () => o.i18n.state.locale], () => {
2397
+ return Z([() => o.name, () => n.i18n.state.locale], () => {
2217
2398
  h();
2218
- }, { immediate: !0 }), t({ reload: h }), (m, v) => (p(), T("div", Cn, [
2219
- c.value ? (p(), $(n(be), {
2399
+ }, { immediate: !0 }), t({ reload: h }), (m, f) => (v(), _("div", Kl, [
2400
+ d.value ? (v(), T(l(we), {
2220
2401
  key: 0,
2221
2402
  type: "danger",
2222
- title: n(r)("shell.error-title"),
2223
- description: c.value
2224
- }, null, 8, ["title", "description"])) : u.value === null ? (p(), $(n(ue), {
2403
+ title: l(r)("shell.error-title"),
2404
+ description: d.value
2405
+ }, null, 8, ["title", "description"])) : u.value === null ? (v(), T(l(de), {
2225
2406
  key: 1,
2226
2407
  rows: 4
2227
- })) : (p(), $(n(Zt), {
2408
+ })) : (v(), T(l(sa), {
2228
2409
  key: 2,
2229
- modelValue: s.value,
2230
- "onUpdate:modelValue": v[0] || (v[0] = (d) => s.value = d),
2410
+ modelValue: i.value,
2411
+ "onUpdate:modelValue": f[0] || (f[0] = (c) => i.value = c),
2231
2412
  root: u.value,
2232
- patch: n(o).screenPatch(e.name),
2233
- types: n(o).types,
2413
+ patch: l(n).screenPatch(e.name),
2414
+ types: l(n).types,
2234
2415
  errors: e.errors,
2235
- translate: n(o).i18n.t,
2236
- can: n(o).can,
2416
+ translate: l(n).i18n.t,
2417
+ can: l(n).can,
2237
2418
  disabled: e.disabled,
2238
2419
  "label-position": e.labelPosition,
2239
2420
  "label-width": e.labelWidth,
@@ -2241,54 +2422,54 @@ const xn = /* @__PURE__ */ R({
2241
2422
  }, null, 8, ["modelValue", "root", "patch", "types", "errors", "translate", "can", "disabled", "label-position", "label-width", "size"]))
2242
2423
  ]));
2243
2424
  }
2244
- }), Ln = /* @__PURE__ */ R({
2425
+ }), Yl = /* @__PURE__ */ I({
2245
2426
  name: "WxCategoryEditorPage",
2246
2427
  __name: "CategoryEditorPage",
2247
2428
  props: {
2248
2429
  options: {}
2249
2430
  },
2250
2431
  setup(e) {
2251
- const t = e, a = X(), l = xe(a, t.options.api), i = et(), s = ge(), o = nt(), r = Ne(t.options.words), u = Re(), c = x(() => Number(i.params.id)), h = x(() => t.options.path), m = W(null), v = W({}), d = W(null), w = W(""), f = W(!0), y = W(!1), k = W({}), M = x(() => a.can(t.options.manage)), J = x(() => JSON.stringify(v.value)), S = x(() => w.value !== "" && J.value !== w.value), B = x(() => y.value ? "saving" : S.value ? "unsaved" : "saved"), C = x(
2432
+ const t = e, a = q(), o = ce(a, t.options.api), s = ot(), i = ye(), n = it(), r = Be(t.options.words), u = Re(), d = w(() => Number(s.params.id)), h = w(() => t.options.path), m = A(null), f = A({}), c = A(null), x = A(""), p = A(!0), g = A(!1), k = A({}), U = w(() => a.can(t.options.manage)), J = w(() => JSON.stringify(f.value)), j = w(() => x.value !== "" && J.value !== x.value), C = w(() => g.value ? "saving" : j.value ? "unsaved" : "saved"), L = w(
2252
2433
  () => a.state.manifest?.modules.find((z) => z.id === t.options.module)?.title ?? ""
2253
- ), A = x(() => {
2254
- const z = v.value.title;
2255
- return jt(z, o.active.value, m.value?.name ?? "") || r("untitled");
2434
+ ), E = w(() => {
2435
+ const z = f.value.title;
2436
+ return Qt(z, n.active.value, m.value?.name ?? "") || r("untitled");
2256
2437
  });
2257
- bn({ category: m, values: v, prefix: d, moving: () => r("address-moving") }), Aa({
2258
- values: v,
2259
- prefix: d,
2260
- path: x(() => m.value?.path),
2438
+ Bl({ category: m, values: f, prefix: c, moving: () => r("address-moving") }), Ga({
2439
+ values: f,
2440
+ prefix: c,
2441
+ path: w(() => m.value?.path),
2261
2442
  moving: () => r("address-moving")
2262
2443
  });
2263
- function E(z) {
2264
- m.value = z.category, v.value = z.values, d.value = z.prefix, w.value = JSON.stringify(z.values);
2444
+ function S(z) {
2445
+ m.value = z.category, f.value = z.values, c.value = z.prefix, x.value = JSON.stringify(z.values);
2265
2446
  }
2266
- async function K() {
2267
- f.value = !0;
2447
+ async function Y() {
2448
+ p.value = !0;
2268
2449
  try {
2269
- E(await l.get(c.value));
2450
+ S(await o.get(d.value));
2270
2451
  } catch (z) {
2271
- D.danger(u(z)), s.push(h.value);
2452
+ D.danger(u(z)), i.push(h.value);
2272
2453
  } finally {
2273
- f.value = !1;
2454
+ p.value = !1;
2274
2455
  }
2275
2456
  }
2276
- async function le() {
2277
- if (!(!m.value || y.value || !M.value)) {
2278
- y.value = !0, k.value = {};
2457
+ async function oe() {
2458
+ if (!(!m.value || g.value || !U.value)) {
2459
+ g.value = !0, k.value = {};
2279
2460
  try {
2280
- E(await l.save(m.value.id, v.value)), D.success(r("saved"));
2461
+ S(await o.save(m.value.id, f.value)), D.success(r("saved"));
2281
2462
  } catch (z) {
2282
- const q = z.body;
2283
- q?.errors ? (k.value = q.errors, D.danger(r("save-failed"))) : D.danger(u(z));
2463
+ const X = z.body;
2464
+ X?.errors ? (k.value = X.errors, D.danger(r("save-failed"))) : D.danger(u(z));
2284
2465
  } finally {
2285
- y.value = !1;
2466
+ g.value = !1;
2286
2467
  }
2287
2468
  }
2288
2469
  }
2289
- async function ie() {
2470
+ async function re() {
2290
2471
  const z = m.value;
2291
- if (!(!z || !await he({
2472
+ if (!(!z || !await ge({
2292
2473
  title: r("delete-title", { name: z.name }),
2293
2474
  message: r("delete-text"),
2294
2475
  confirmText: r("delete"),
@@ -2296,86 +2477,86 @@ const xn = /* @__PURE__ */ R({
2296
2477
  tone: "danger"
2297
2478
  })))
2298
2479
  try {
2299
- await l.remove(z.id), D.success(r("deleted")), w.value = J.value, s.push(h.value);
2300
- } catch (_) {
2301
- D.danger(u(_));
2480
+ await o.remove(z.id), D.success(r("deleted")), x.value = J.value, i.push(h.value);
2481
+ } catch ($) {
2482
+ D.danger(u($));
2302
2483
  }
2303
2484
  }
2304
2485
  function te(z) {
2305
- S.value && z.preventDefault();
2486
+ j.value && z.preventDefault();
2306
2487
  }
2307
2488
  function ke(z) {
2308
- (z.ctrlKey || z.metaKey) && z.key.toLowerCase() === "s" && (z.preventDefault(), S.value && le());
2489
+ (z.ctrlKey || z.metaKey) && z.key.toLowerCase() === "s" && (z.preventDefault(), j.value && oe());
2309
2490
  }
2310
- ee(c, () => {
2311
- K();
2491
+ Z(d, () => {
2492
+ Y();
2312
2493
  }), Le(() => {
2313
- K(), window.addEventListener("beforeunload", te);
2314
- }), Ze(() => {
2494
+ Y(), window.addEventListener("beforeunload", te);
2495
+ }), nt(() => {
2315
2496
  window.removeEventListener("beforeunload", te);
2316
- }), St(async () => !S.value || !M.value ? !0 : await he({
2497
+ }), zt(async () => !j.value || !U.value ? !0 : await ge({
2317
2498
  title: r("leave-title"),
2318
2499
  message: r("leave-text"),
2319
2500
  confirmText: r("leave"),
2320
2501
  cancelText: r("cancel"),
2321
2502
  tone: "danger"
2322
2503
  }));
2323
- const _e = x(() => {
2324
- const z = m.value, q = [];
2325
- return z && (z.url && z.is_visible && q.push({ key: "site", label: r("open-on-site"), icon: "link", href: z.url }), M.value && q.push({
2504
+ const _e = w(() => {
2505
+ const z = m.value, X = [];
2506
+ return z && (z.url && z.is_visible && X.push({ key: "site", label: r("open-on-site"), icon: "link", href: z.url }), U.value && X.push({
2326
2507
  key: "delete",
2327
2508
  label: r("delete"),
2328
2509
  icon: "trash",
2329
2510
  danger: !0,
2330
2511
  menu: !0,
2331
2512
  run: () => {
2332
- ie();
2513
+ re();
2333
2514
  }
2334
- })), q;
2515
+ })), X;
2335
2516
  });
2336
- return (z, q) => (p(), T("div", {
2517
+ return (z, X) => (v(), _("div", {
2337
2518
  class: "wx-category-editor",
2338
2519
  onKeydown: ke
2339
2520
  }, [
2340
- f.value || !m.value ? (p(), T(H, { key: 0 }, [
2341
- b(n(ue), {
2521
+ p.value || !m.value ? (v(), _(F, { key: 0 }, [
2522
+ b(l(de), {
2342
2523
  class: "wx-category-editor__ghost",
2343
2524
  title: "",
2344
2525
  rows: 1
2345
2526
  }),
2346
- b(n(Se), null, {
2347
- default: g(() => [
2348
- b(n(ue), { rows: 6 })
2527
+ b(l(Ce), null, {
2528
+ default: y(() => [
2529
+ b(l(de), { rows: 6 })
2349
2530
  ]),
2350
2531
  _: 1
2351
2532
  })
2352
- ], 64)) : (p(), T(H, { key: 1 }, [
2353
- b(it, {
2533
+ ], 64)) : (v(), _(F, { key: 1 }, [
2534
+ b(mt, {
2354
2535
  divider: "",
2355
2536
  back: h.value,
2356
- "back-label": C.value,
2357
- title: A.value,
2537
+ "back-label": L.value,
2538
+ title: E.value,
2358
2539
  subtitle: m.value.path === null ? void 0 : `/${m.value.path}`,
2359
2540
  actions: _e.value
2360
- }, Ae({
2361
- trail: g(() => [
2362
- b(n(Kt), {
2541
+ }, Ve({
2542
+ trail: y(() => [
2543
+ b(l(Zt), {
2363
2544
  size: "sm",
2364
- label: n(r)("trail")
2545
+ label: l(r)("trail")
2365
2546
  }, {
2366
- default: g(() => [
2367
- b(n(Pe), {
2547
+ default: y(() => [
2548
+ b(l(Fe), {
2368
2549
  as: "router-link",
2369
2550
  to: h.value
2370
2551
  }, {
2371
- default: g(() => [
2372
- V(L(C.value), 1)
2552
+ default: y(() => [
2553
+ V(W(L.value), 1)
2373
2554
  ]),
2374
2555
  _: 1
2375
2556
  }, 8, ["to"]),
2376
- b(n(Pe), { current: "" }, {
2377
- default: g(() => [
2378
- V(L(A.value), 1)
2557
+ b(l(Fe), { current: "" }, {
2558
+ default: y(() => [
2559
+ V(W(E.value), 1)
2379
2560
  ]),
2380
2561
  _: 1
2381
2562
  })
@@ -2387,10 +2568,10 @@ const xn = /* @__PURE__ */ R({
2387
2568
  }, [
2388
2569
  m.value.is_visible ? void 0 : {
2389
2570
  name: "title-after",
2390
- fn: g(() => [
2391
- b(n(ze), { dot: "" }, {
2392
- default: g(() => [
2393
- V(L(n(r)("hidden")), 1)
2571
+ fn: y(() => [
2572
+ b(l(ze), { dot: "" }, {
2573
+ default: y(() => [
2574
+ V(W(l(r)("hidden")), 1)
2394
2575
  ]),
2395
2576
  _: 1
2396
2577
  })
@@ -2398,73 +2579,73 @@ const xn = /* @__PURE__ */ R({
2398
2579
  key: "0"
2399
2580
  }
2400
2581
  ]), 1032, ["back", "back-label", "title", "subtitle", "actions"]),
2401
- b(Wn, {
2402
- modelValue: v.value,
2403
- "onUpdate:modelValue": q[0] || (q[0] = (_) => v.value = _),
2582
+ b(ql, {
2583
+ modelValue: f.value,
2584
+ "onUpdate:modelValue": X[0] || (X[0] = ($) => f.value = $),
2404
2585
  name: t.options.screen,
2405
2586
  errors: k.value,
2406
- disabled: !M.value || y.value
2587
+ disabled: !U.value || g.value
2407
2588
  }, null, 8, ["modelValue", "name", "errors", "disabled"]),
2408
- M.value ? (p(), $(n(qt), { key: 0 }, {
2409
- state: g(() => [
2410
- b(Sn, { state: B.value }, null, 8, ["state"])
2589
+ U.value ? (v(), T(l(ea), { key: 0 }, {
2590
+ state: y(() => [
2591
+ b(jl, { state: C.value }, null, 8, ["state"])
2411
2592
  ]),
2412
- default: g(() => [
2413
- b(n(Z), {
2593
+ default: y(() => [
2594
+ b(l(Q), {
2414
2595
  type: "primary",
2415
- loading: y.value,
2416
- disabled: !S.value,
2417
- onClick: le
2596
+ loading: g.value,
2597
+ disabled: !j.value,
2598
+ onClick: oe
2418
2599
  }, {
2419
- default: g(() => [
2420
- V(L(n(r)("save")), 1)
2600
+ default: y(() => [
2601
+ V(W(l(r)("save")), 1)
2421
2602
  ]),
2422
2603
  _: 1
2423
2604
  }, 8, ["loading", "disabled"])
2424
2605
  ]),
2425
2606
  _: 1
2426
- })) : U("", !0)
2607
+ })) : N("", !0)
2427
2608
  ], 64))
2428
2609
  ], 32));
2429
2610
  }
2430
- }), An = /* @__PURE__ */ Y(Ln, [["__scopeId", "data-v-86d85f8c"]]);
2431
- function je(e, t) {
2432
- return R({
2611
+ }), Xl = /* @__PURE__ */ K(Yl, [["__scopeId", "data-v-86d85f8c"]]);
2612
+ function Ge(e, t) {
2613
+ return I({
2433
2614
  name: "WxCategoriesView",
2434
- setup: () => () => re(e, { options: t })
2615
+ setup: () => () => ue(e, { options: t })
2435
2616
  });
2436
2617
  }
2437
- function tl(e) {
2618
+ function xn(e) {
2438
2619
  return [
2439
- { path: e.path, name: e.name, component: je(_n, e) },
2620
+ { path: e.path, name: e.name, component: Ge(Fl, e) },
2440
2621
  {
2441
2622
  path: `${e.path}/:id(\\d+)`,
2442
2623
  name: `${e.name}.edit`,
2443
- component: je(An, e)
2624
+ component: Ge(Xl, e)
2444
2625
  }
2445
2626
  ];
2446
2627
  }
2447
- const al = 76, nl = /* @__PURE__ */ R({
2628
+ const kn = 76, _n = /* @__PURE__ */ I({
2448
2629
  __name: "FilterChips",
2449
2630
  props: {
2450
2631
  filters: {}
2451
2632
  },
2452
2633
  setup(e) {
2453
- return (t, a) => (p(!0), T(H, null, Q(e.filters, (l) => (p(), $(n(ze), {
2454
- key: l.key,
2634
+ return (t, a) => (v(!0), _(F, null, ee(e.filters, (o) => (v(), T(l(ze), {
2635
+ key: o.key,
2455
2636
  class: "wx-filter-chip",
2456
2637
  size: "sm",
2457
2638
  round: "",
2458
2639
  closable: "",
2459
- onClose: (i) => l.clear()
2640
+ onClose: (s) => o.clear()
2460
2641
  }, {
2461
- default: g(() => [
2462
- V(L(l.label), 1)
2642
+ default: y(() => [
2643
+ V(W(o.label), 1)
2463
2644
  ]),
2464
2645
  _: 2
2465
2646
  }, 1032, ["onClose"]))), 128));
2466
2647
  }
2467
- }), zn = { class: "wx-rename__footer" }, Vn = /* @__PURE__ */ R({
2648
+ }), Gl = { class: "wx-rename__footer" }, Jl = /* @__PURE__ */ I({
2468
2649
  __name: "RenameButton",
2469
2650
  props: {
2470
2651
  name: { default: "" },
@@ -2475,57 +2656,57 @@ const al = 76, nl = /* @__PURE__ */ R({
2475
2656
  },
2476
2657
  emits: ["rename"],
2477
2658
  setup(e, { emit: t }) {
2478
- const a = e, l = t, i = P("webx-admin"), s = W(!1), o = W(a.name), r = W(null), u = x(() => a.label ?? i("editor.rename"));
2479
- ee(s, async (h) => {
2480
- h && (o.value = a.name, await Je(), r.value?.focus(), r.value?.select());
2659
+ const a = e, o = t, s = P("webx-admin"), i = A(!1), n = A(a.name), r = A(null), u = w(() => a.label ?? s("editor.rename"));
2660
+ Z(i, async (h) => {
2661
+ h && (n.value = a.name, await at(), r.value?.focus(), r.value?.select());
2481
2662
  });
2482
- function c() {
2483
- const h = o.value.trim();
2663
+ function d() {
2664
+ const h = n.value.trim();
2484
2665
  if (h === "" || h === a.name) {
2485
- s.value = !1;
2666
+ i.value = !1;
2486
2667
  return;
2487
2668
  }
2488
- l("rename", h), s.value = !1;
2669
+ o("rename", h), i.value = !1;
2489
2670
  }
2490
- return (h, m) => (p(), $(n(Yt), {
2491
- open: s.value,
2492
- "onUpdate:open": m[2] || (m[2] = (v) => s.value = v),
2671
+ return (h, m) => (v(), T(l(ta), {
2672
+ open: i.value,
2673
+ "onUpdate:open": m[2] || (m[2] = (f) => i.value = f),
2493
2674
  title: u.value,
2494
2675
  width: 320,
2495
2676
  side: "bottom",
2496
2677
  align: "start",
2497
2678
  teleport: ""
2498
2679
  }, {
2499
- trigger: g(() => [
2500
- b(n(se), {
2680
+ trigger: y(() => [
2681
+ b(l(ie), {
2501
2682
  type: "edit",
2502
2683
  title: u.value,
2503
2684
  size: e.size,
2504
2685
  disabled: e.disabled
2505
2686
  }, null, 8, ["title", "size", "disabled"])
2506
2687
  ]),
2507
- default: g(() => [
2508
- O("form", {
2688
+ default: y(() => [
2689
+ B("form", {
2509
2690
  class: "wx-rename",
2510
- onSubmit: qe(c, ["prevent"])
2691
+ onSubmit: Qe(d, ["prevent"])
2511
2692
  }, [
2512
- b(n(ye), {
2693
+ b(l(be), {
2513
2694
  ref_key: "field",
2514
2695
  ref: r,
2515
- modelValue: o.value,
2516
- "onUpdate:modelValue": m[0] || (m[0] = (v) => o.value = v),
2696
+ modelValue: n.value,
2697
+ "onUpdate:modelValue": m[0] || (m[0] = (f) => n.value = f),
2517
2698
  "aria-label": u.value,
2518
2699
  placeholder: e.placeholder,
2519
- onKeydown: m[1] || (m[1] = Qe((v) => s.value = !1, ["esc"]))
2700
+ onKeydown: m[1] || (m[1] = lt((f) => i.value = !1, ["esc"]))
2520
2701
  }, null, 8, ["modelValue", "aria-label", "placeholder"]),
2521
- O("div", zn, [
2522
- b(n(Z), {
2702
+ B("div", Gl, [
2703
+ b(l(Q), {
2523
2704
  type: "primary",
2524
2705
  size: "sm",
2525
2706
  "native-type": "submit"
2526
2707
  }, {
2527
- default: g(() => [
2528
- V(L(n(i)("editor.save")), 1)
2708
+ default: y(() => [
2709
+ V(W(l(s)("editor.save")), 1)
2529
2710
  ]),
2530
2711
  _: 1
2531
2712
  })
@@ -2535,7 +2716,7 @@ const al = 76, nl = /* @__PURE__ */ R({
2535
2716
  _: 1
2536
2717
  }, 8, ["open", "title"]));
2537
2718
  }
2538
- }), ll = /* @__PURE__ */ Y(Vn, [["__scopeId", "data-v-d879e8d3"]]), En = ["innerHTML"], Un = /* @__PURE__ */ R({
2719
+ }), $n = /* @__PURE__ */ K(Jl, [["__scopeId", "data-v-d879e8d3"]]), Ql = ["innerHTML"], Zl = /* @__PURE__ */ I({
2539
2720
  __name: "HelpButton",
2540
2721
  props: {
2541
2722
  body: {},
@@ -2545,33 +2726,33 @@ const al = 76, nl = /* @__PURE__ */ R({
2545
2726
  width: { default: 720 }
2546
2727
  },
2547
2728
  setup(e) {
2548
- const t = e, a = P("webx-admin"), l = W(!1), i = x(() => t.title ?? a("help.title")), s = x(() => mn(t.body));
2549
- return (o, r) => (p(), T(H, null, [
2550
- b(n(se), {
2729
+ const t = e, a = P("webx-admin"), o = A(!1), s = w(() => t.title ?? a("help.title")), i = w(() => Vl(t.body));
2730
+ return (n, r) => (v(), _(F, null, [
2731
+ b(l(ie), {
2551
2732
  type: "details",
2552
2733
  icon: "question",
2553
2734
  tone: "neutral",
2554
2735
  size: e.size,
2555
- title: e.label ?? i.value,
2556
- onClick: r[0] || (r[0] = (u) => l.value = !0)
2736
+ title: e.label ?? s.value,
2737
+ onClick: r[0] || (r[0] = (u) => o.value = !0)
2557
2738
  }, null, 8, ["size", "title"]),
2558
- b(n(lt), {
2559
- open: l.value,
2560
- "onUpdate:open": r[1] || (r[1] = (u) => l.value = u),
2561
- title: i.value,
2739
+ b(l(rt), {
2740
+ open: o.value,
2741
+ "onUpdate:open": r[1] || (r[1] = (u) => o.value = u),
2742
+ title: s.value,
2562
2743
  width: e.width
2563
2744
  }, {
2564
- default: g(() => [
2565
- O("div", {
2745
+ default: y(() => [
2746
+ B("div", {
2566
2747
  class: "wx-help",
2567
- innerHTML: s.value
2568
- }, null, 8, En)
2748
+ innerHTML: i.value
2749
+ }, null, 8, Ql)
2569
2750
  ]),
2570
2751
  _: 1
2571
2752
  }, 8, ["open", "title", "width"])
2572
2753
  ], 64));
2573
2754
  }
2574
- }), ol = /* @__PURE__ */ Y(Un, [["__scopeId", "data-v-6c280d42"]]), ht = /* @__PURE__ */ R({
2755
+ }), Tn = /* @__PURE__ */ K(Zl, [["__scopeId", "data-v-6c280d42"]]), xt = /* @__PURE__ */ I({
2575
2756
  name: "WxDate",
2576
2757
  __name: "DateText",
2577
2758
  props: {
@@ -2581,46 +2762,46 @@ const al = 76, nl = /* @__PURE__ */ R({
2581
2762
  tone: { default: "muted" }
2582
2763
  },
2583
2764
  setup(e) {
2584
- const t = e, a = ft(), l = x(() => t.compact ? a.compact(t.value) : a.short(t.value)), i = x(() => a.exact(t.value)), s = x(() => a.iso(t.value));
2585
- return (o, r) => i.value ? (p(), $(n(st), {
2765
+ const t = e, a = bt(), o = w(() => t.compact ? a.compact(t.value) : a.short(t.value)), s = w(() => a.exact(t.value)), i = w(() => a.iso(t.value));
2766
+ return (n, r) => s.value ? (v(), T(l(dt), {
2586
2767
  key: 0,
2587
- content: i.value
2768
+ content: s.value
2588
2769
  }, {
2589
- default: g(() => [
2590
- b(n(G), {
2770
+ default: y(() => [
2771
+ b(l(G), {
2591
2772
  as: "time",
2592
- datetime: s.value,
2773
+ datetime: i.value,
2593
2774
  size: e.size,
2594
2775
  tone: e.tone
2595
2776
  }, {
2596
- default: g(() => [
2597
- V(L(l.value), 1)
2777
+ default: y(() => [
2778
+ V(W(o.value), 1)
2598
2779
  ]),
2599
2780
  _: 1
2600
2781
  }, 8, ["datetime", "size", "tone"])
2601
2782
  ]),
2602
2783
  _: 1
2603
- }, 8, ["content"])) : (p(), $(n(G), {
2784
+ }, 8, ["content"])) : (v(), T(l(G), {
2604
2785
  key: 1,
2605
2786
  size: e.size,
2606
2787
  tone: e.tone
2607
2788
  }, {
2608
- default: g(() => [
2609
- V(L(l.value), 1)
2789
+ default: y(() => [
2790
+ V(W(o.value), 1)
2610
2791
  ]),
2611
2792
  _: 1
2612
2793
  }, 8, ["size", "tone"]));
2613
2794
  }
2614
- }), Rn = { class: "wx-notes" }, Nn = {
2795
+ }), en = { class: "wx-notes" }, tn = {
2615
2796
  key: 3,
2616
2797
  class: "wx-notes__list"
2617
- }, Bn = { class: "wx-note__body" }, In = { class: "wx-note__head" }, Pn = { class: "wx-note__buttons" }, Dn = {
2798
+ }, an = { class: "wx-note__body" }, ln = { class: "wx-note__head" }, nn = { class: "wx-note__buttons" }, on = {
2618
2799
  key: 1,
2619
2800
  class: "wx-note__text"
2620
- }, Mn = {
2801
+ }, sn = {
2621
2802
  key: 4,
2622
2803
  class: "wx-notes__new"
2623
- }, Fn = /* @__PURE__ */ R({
2804
+ }, rn = /* @__PURE__ */ I({
2624
2805
  name: "WxNotes",
2625
2806
  __name: "NotesFeed",
2626
2807
  props: {
@@ -2631,304 +2812,309 @@ const al = 76, nl = /* @__PURE__ */ R({
2631
2812
  },
2632
2813
  emits: ["change"],
2633
2814
  setup(e, { emit: t }) {
2634
- const a = e, l = t, i = X(), s = P("webx-admin"), o = Re(), r = W([]), u = W(!0), c = W(""), h = W(!1), m = W(null), v = W(""), d = x(() => yn(i, a.type, a.id)), w = x(() => a.title ?? s("notes.title"));
2635
- async function f() {
2815
+ const a = e, o = t, s = q(), i = P("webx-admin"), n = Re(), r = A([]), u = A(!0), d = A(""), h = A(!1), m = A(null), f = A(""), c = w(() => Rl(s, a.type, a.id)), x = w(() => a.title ?? i("notes.title"));
2816
+ async function p() {
2636
2817
  u.value = !0;
2637
2818
  try {
2638
- r.value = await d.value.list();
2639
- } catch (C) {
2640
- D.danger(o(C));
2819
+ r.value = await c.value.list();
2820
+ } catch (L) {
2821
+ D.danger(n(L));
2641
2822
  } finally {
2642
2823
  u.value = !1;
2643
2824
  }
2644
2825
  }
2645
- ee(
2826
+ Z(
2646
2827
  () => [a.type, a.id],
2647
2828
  () => {
2648
- m.value = null, c.value = "", f();
2829
+ m.value = null, d.value = "", p();
2649
2830
  },
2650
2831
  { immediate: !0 }
2651
2832
  );
2652
- async function y() {
2653
- const C = c.value.trim();
2654
- if (!(C === "" || h.value)) {
2833
+ async function g() {
2834
+ const L = d.value.trim();
2835
+ if (!(L === "" || h.value)) {
2655
2836
  h.value = !0;
2656
2837
  try {
2657
- r.value = [...r.value, await d.value.add(C)], c.value = "", l("change");
2658
- } catch (A) {
2659
- D.danger(o(A));
2838
+ r.value = [...r.value, await c.value.add(L)], d.value = "", o("change");
2839
+ } catch (E) {
2840
+ D.danger(n(E));
2660
2841
  } finally {
2661
2842
  h.value = !1;
2662
2843
  }
2663
2844
  }
2664
2845
  }
2665
- function k(C) {
2666
- m.value = C.id, v.value = C.body;
2846
+ function k(L) {
2847
+ m.value = L.id, f.value = L.body;
2667
2848
  }
2668
- async function M(C) {
2669
- const A = v.value.trim();
2670
- if (A !== "")
2849
+ async function U(L) {
2850
+ const E = f.value.trim();
2851
+ if (E !== "")
2671
2852
  try {
2672
- const E = await d.value.save(C.id, A);
2673
- r.value = r.value.map((K) => K.id === E.id ? E : K), m.value = null, D.success(s("notes.saved")), l("change");
2674
- } catch (E) {
2675
- D.danger(o(E));
2853
+ const S = await c.value.save(L.id, E);
2854
+ r.value = r.value.map((Y) => Y.id === S.id ? S : Y), m.value = null, D.success(i("notes.saved")), o("change");
2855
+ } catch (S) {
2856
+ D.danger(n(S));
2676
2857
  }
2677
2858
  }
2678
- async function J(C) {
2679
- if (await he({
2680
- title: s("notes.delete-title"),
2681
- message: s("notes.delete-text"),
2682
- confirmText: s("notes.delete"),
2683
- cancelText: s("notes.cancel"),
2859
+ async function J(L) {
2860
+ if (await ge({
2861
+ title: i("notes.delete-title"),
2862
+ message: i("notes.delete-text"),
2863
+ confirmText: i("notes.delete"),
2864
+ cancelText: i("notes.cancel"),
2684
2865
  tone: "danger"
2685
2866
  }))
2686
2867
  try {
2687
- await d.value.remove(C.id), r.value = r.value.filter((E) => E.id !== C.id), D.success(s("notes.deleted")), l("change");
2688
- } catch (E) {
2689
- D.danger(o(E));
2868
+ await c.value.remove(L.id), r.value = r.value.filter((S) => S.id !== L.id), D.success(i("notes.deleted")), o("change");
2869
+ } catch (S) {
2870
+ D.danger(n(S));
2690
2871
  }
2691
2872
  }
2692
- function S(C) {
2693
- return !a.can || !C.is_mine ? [] : [
2694
- { key: "edit", icon: "edit", label: s("notes.edit"), run: () => k(C) },
2873
+ function j(L) {
2874
+ return !a.can || !L.is_mine ? [] : [
2875
+ { key: "edit", icon: "edit", label: i("notes.edit"), run: () => k(L) },
2695
2876
  {
2696
2877
  key: "delete",
2697
2878
  icon: "trash",
2698
- label: s("notes.delete"),
2879
+ label: i("notes.delete"),
2699
2880
  danger: !0,
2700
2881
  run: () => {
2701
- J(C);
2882
+ J(L);
2702
2883
  }
2703
2884
  }
2704
2885
  ];
2705
2886
  }
2706
- function B(C) {
2707
- return C.author?.name ?? s("notes.unknown-author");
2887
+ function C(L) {
2888
+ return L.author?.name ?? i("notes.unknown-author");
2708
2889
  }
2709
- return (C, A) => (p(), T("section", Rn, [
2710
- w.value ? (p(), $(n(G), {
2890
+ return (L, E) => (v(), _("section", en, [
2891
+ x.value ? (v(), T(l(G), {
2711
2892
  key: 0,
2712
2893
  weight: "medium",
2713
2894
  class: "wx-notes__title"
2714
2895
  }, {
2715
- default: g(() => [
2716
- V(L(w.value), 1)
2896
+ default: y(() => [
2897
+ V(W(x.value), 1)
2717
2898
  ]),
2718
2899
  _: 1
2719
- })) : U("", !0),
2720
- u.value ? (p(), $(n(ue), {
2900
+ })) : N("", !0),
2901
+ u.value ? (v(), T(l(de), {
2721
2902
  key: 1,
2722
2903
  rows: 2
2723
- })) : r.value.length === 0 ? (p(), $(n(ot), {
2904
+ })) : r.value.length === 0 ? (v(), T(l(ut), {
2724
2905
  key: 2,
2725
2906
  size: "sm",
2726
- description: n(s)("notes.empty")
2727
- }, null, 8, ["description"])) : (p(), T("ul", Nn, [
2728
- (p(!0), T(H, null, Q(r.value, (E) => (p(), T("li", {
2729
- key: E.id,
2907
+ description: l(i)("notes.empty")
2908
+ }, null, 8, ["description"])) : (v(), _("ul", tn, [
2909
+ (v(!0), _(F, null, ee(r.value, (S) => (v(), _("li", {
2910
+ key: S.id,
2730
2911
  class: "wx-note"
2731
2912
  }, [
2732
- b(n(Xt), {
2733
- name: B(E),
2913
+ b(l(aa), {
2914
+ name: C(S),
2734
2915
  size: "sm",
2735
2916
  tone: "auto"
2736
2917
  }, null, 8, ["name"]),
2737
- O("div", Bn, [
2738
- O("div", In, [
2739
- b(n(G), {
2918
+ B("div", an, [
2919
+ B("div", ln, [
2920
+ b(l(G), {
2740
2921
  size: "sm",
2741
2922
  weight: "medium",
2742
2923
  truncate: ""
2743
2924
  }, {
2744
- default: g(() => [
2745
- V(L(B(E)), 1)
2925
+ default: y(() => [
2926
+ V(W(C(S)), 1)
2746
2927
  ]),
2747
2928
  _: 2
2748
2929
  }, 1024),
2749
- b(ht, {
2750
- value: E.created_at
2930
+ b(xt, {
2931
+ value: S.created_at
2751
2932
  }, null, 8, ["value"]),
2752
- b(Ue, {
2753
- actions: S(E),
2754
- label: B(E)
2933
+ b(Ie, {
2934
+ actions: j(S),
2935
+ label: C(S)
2755
2936
  }, null, 8, ["actions", "label"])
2756
2937
  ]),
2757
- m.value === E.id ? (p(), T(H, { key: 0 }, [
2758
- b(n(De), {
2759
- modelValue: v.value,
2760
- "onUpdate:modelValue": A[0] || (A[0] = (K) => v.value = K),
2938
+ m.value === S.id ? (v(), _(F, { key: 0 }, [
2939
+ b(l(Oe), {
2940
+ modelValue: f.value,
2941
+ "onUpdate:modelValue": E[0] || (E[0] = (Y) => f.value = Y),
2761
2942
  autosize: { minRows: 2, maxRows: 10 }
2762
2943
  }, null, 8, ["modelValue"]),
2763
- O("div", Pn, [
2764
- b(n(Z), {
2944
+ B("div", nn, [
2945
+ b(l(Q), {
2765
2946
  size: "sm",
2766
2947
  type: "primary",
2767
- onClick: (K) => M(E)
2948
+ onClick: (Y) => U(S)
2768
2949
  }, {
2769
- default: g(() => [
2770
- V(L(n(s)("notes.save")), 1)
2950
+ default: y(() => [
2951
+ V(W(l(i)("notes.save")), 1)
2771
2952
  ]),
2772
2953
  _: 1
2773
2954
  }, 8, ["onClick"]),
2774
- b(n(Z), {
2955
+ b(l(Q), {
2775
2956
  size: "sm",
2776
2957
  variant: "text",
2777
- onClick: A[1] || (A[1] = (K) => m.value = null)
2958
+ onClick: E[1] || (E[1] = (Y) => m.value = null)
2778
2959
  }, {
2779
- default: g(() => [
2780
- V(L(n(s)("notes.cancel")), 1)
2960
+ default: y(() => [
2961
+ V(W(l(i)("notes.cancel")), 1)
2781
2962
  ]),
2782
2963
  _: 1
2783
2964
  })
2784
2965
  ])
2785
- ], 64)) : (p(), T("p", Dn, L(E.body), 1))
2966
+ ], 64)) : (v(), _("p", on, W(S.body), 1))
2786
2967
  ])
2787
2968
  ]))), 128))
2788
2969
  ])),
2789
- e.can ? (p(), T("div", Mn, [
2790
- b(n(De), {
2791
- modelValue: c.value,
2792
- "onUpdate:modelValue": A[2] || (A[2] = (E) => c.value = E),
2793
- placeholder: n(s)("notes.placeholder"),
2970
+ e.can ? (v(), _("div", sn, [
2971
+ b(l(Oe), {
2972
+ modelValue: d.value,
2973
+ "onUpdate:modelValue": E[2] || (E[2] = (S) => d.value = S),
2974
+ placeholder: l(i)("notes.placeholder"),
2794
2975
  autosize: { minRows: 2, maxRows: 8 }
2795
2976
  }, null, 8, ["modelValue", "placeholder"]),
2796
- b(n(Z), {
2977
+ b(l(Q), {
2797
2978
  size: "sm",
2798
2979
  type: "primary",
2799
- disabled: c.value.trim() === "",
2980
+ disabled: d.value.trim() === "",
2800
2981
  loading: h.value,
2801
- onClick: y
2982
+ onClick: g
2802
2983
  }, {
2803
- default: g(() => [
2804
- V(L(n(s)("notes.add")), 1)
2984
+ default: y(() => [
2985
+ V(W(l(i)("notes.add")), 1)
2805
2986
  ]),
2806
2987
  _: 1
2807
2988
  }, 8, ["disabled", "loading"])
2808
- ])) : U("", !0)
2989
+ ])) : N("", !0)
2809
2990
  ]));
2810
2991
  }
2811
- }), sl = /* @__PURE__ */ Y(Fn, [["__scopeId", "data-v-71004c1a"]]), On = {
2992
+ }), Sn = /* @__PURE__ */ K(rn, [["__scopeId", "data-v-71004c1a"]]), un = {
2812
2993
  key: 1,
2813
2994
  class: "wx-backup-note"
2814
- }, Hn = 48, jn = /* @__PURE__ */ R({
2995
+ }, dn = 48, cn = /* @__PURE__ */ I({
2815
2996
  name: "WxBackupNote",
2816
2997
  __name: "BackupNote",
2817
2998
  setup(e) {
2818
- const t = X(), a = ft(), l = P("webx-admin"), i = x(() => t.state.manifest?.backup ?? null), s = x(() => i.value !== null && t.can("settings.view")), o = x(() => {
2819
- const c = i.value?.at;
2820
- if (c == null) return !0;
2821
- const h = new Date(c).getTime();
2822
- return Number.isNaN(h) || Date.now() - h > Hn * 36e5;
2823
- }), r = x(() => {
2824
- const c = i.value?.bytes;
2825
- if (c == null) return "";
2999
+ const t = q(), a = bt(), o = P("webx-admin"), s = w(() => t.state.manifest?.backup ?? null), i = w(() => s.value !== null && t.can("settings.view")), n = w(() => {
3000
+ const d = s.value?.at;
3001
+ if (d == null) return !0;
3002
+ const h = new Date(d).getTime();
3003
+ return Number.isNaN(h) || Date.now() - h > dn * 36e5;
3004
+ }), r = w(() => {
3005
+ const d = s.value?.bytes;
3006
+ if (d == null) return "";
2826
3007
  const h = ["byte", "kilobyte", "megabyte", "gigabyte", "terabyte"];
2827
- let m = c, v = 0;
2828
- for (; m >= 1024 && v < h.length - 1; )
2829
- m /= 1024, v++;
3008
+ let m = d, f = 0;
3009
+ for (; m >= 1024 && f < h.length - 1; )
3010
+ m /= 1024, f++;
2830
3011
  return new Intl.NumberFormat(t.i18n.state.locale, {
2831
3012
  style: "unit",
2832
- unit: h[v],
3013
+ unit: h[f],
2833
3014
  unitDisplay: "short",
2834
- maximumFractionDigits: m >= 10 || v === 0 ? 0 : 1
3015
+ maximumFractionDigits: m >= 10 || f === 0 ? 0 : 1
2835
3016
  }).format(m);
2836
- }), u = x(
2837
- () => i.value?.at == null ? l("backup.never") : l("backup.stale", { date: a.short(i.value.at) })
3017
+ }), u = w(
3018
+ () => s.value?.at == null ? o("backup.never") : o("backup.stale", { date: a.short(s.value.at) })
2838
3019
  );
2839
- return (c, h) => s.value && o.value ? (p(), $(n(be), {
3020
+ return (d, h) => i.value && n.value ? (v(), T(l(we), {
2840
3021
  key: 0,
2841
3022
  type: "warning",
2842
3023
  variant: "soft",
2843
3024
  description: u.value
2844
- }, null, 8, ["description"])) : s.value ? (p(), T("p", On, [
2845
- b(n(G), {
3025
+ }, null, 8, ["description"])) : i.value ? (v(), _("p", un, [
3026
+ b(l(G), {
2846
3027
  size: "sm",
2847
3028
  tone: "muted"
2848
3029
  }, {
2849
- default: g(() => [
2850
- V(L(n(l)("backup.title")), 1)
3030
+ default: y(() => [
3031
+ V(W(l(o)("backup.title")), 1)
2851
3032
  ]),
2852
3033
  _: 1
2853
3034
  }),
2854
- b(ht, {
2855
- value: i.value?.at
3035
+ b(xt, {
3036
+ value: s.value?.at
2856
3037
  }, null, 8, ["value"]),
2857
- r.value ? (p(), $(n(G), {
3038
+ r.value ? (v(), T(l(G), {
2858
3039
  key: 0,
2859
3040
  size: "sm",
2860
3041
  tone: "muted"
2861
3042
  }, {
2862
- default: g(() => [
2863
- V("· " + L(r.value), 1)
3043
+ default: y(() => [
3044
+ V("· " + W(r.value), 1)
2864
3045
  ]),
2865
3046
  _: 1
2866
- })) : U("", !0)
2867
- ])) : U("", !0);
3047
+ })) : N("", !0)
3048
+ ])) : N("", !0);
2868
3049
  }
2869
- }), il = /* @__PURE__ */ Y(jn, [["__scopeId", "data-v-beeee67e"]]);
3050
+ }), Cn = /* @__PURE__ */ K(cn, [["__scopeId", "data-v-beeee67e"]]);
2870
3051
  export {
2871
- Pa as AdminLanding,
2872
- Da as AdminNav,
2873
- Ga as AdminShell,
2874
- Ce as HttpError,
2875
- ba as WxBackButton,
2876
- il as WxBackupNote,
2877
- ia as WxCategoriesField,
2878
- _n as WxCategoriesPage,
2879
- xn as WxCategoryCreateDialog,
2880
- An as WxCategoryEditorPage,
2881
- Me as WxCategorySlug,
2882
- ht as WxDate,
2883
- nl as WxFilterChips,
2884
- ol as WxHelpButton,
2885
- ya as WxLinkField,
2886
- ga as WxLinkPicker,
2887
- rt as WxListScreen,
2888
- sl as WxNotes,
2889
- ll as WxRenameButton,
2890
- La as WxRichTextField,
2891
- Ue as WxRowMenu,
2892
- Sn as WxSaveState,
2893
- Wn as WxScreen,
2894
- it as WxScreenHead,
2895
- Me as WxSlugField,
2896
- dt as adminKey,
2897
- mt as adminMessages,
2898
- Ra as adminTypes,
2899
- tl as categoryRoutes,
2900
- Qn as createAdmin,
2901
- Na as createAdminContext,
2902
- xe as createCategoriesApi,
2903
- vn as createDates,
2904
- Qa as createHttp,
3052
+ ol as AdminLanding,
3053
+ sl as AdminNav,
3054
+ hl as AdminShell,
3055
+ ct as COLLECTION_MAX_LIMIT,
3056
+ We as HttpError,
3057
+ Ma as WxBackButton,
3058
+ Cn as WxBackupNote,
3059
+ va as WxCategoriesField,
3060
+ Fl as WxCategoriesPage,
3061
+ Pl as WxCategoryCreateDialog,
3062
+ Xl as WxCategoryEditorPage,
3063
+ Ke as WxCategorySlug,
3064
+ Ca as WxCollectionField,
3065
+ xt as WxDate,
3066
+ _n as WxFilterChips,
3067
+ Tn as WxHelpButton,
3068
+ Ba as WxLinkField,
3069
+ Ra as WxLinkPicker,
3070
+ ft as WxListScreen,
3071
+ Sn as WxNotes,
3072
+ $n as WxRenameButton,
3073
+ Xa as WxRichTextField,
3074
+ Ie as WxRowMenu,
3075
+ jl as WxSaveState,
3076
+ ql as WxScreen,
3077
+ mt as WxScreenHead,
3078
+ Ke as WxSlugField,
3079
+ pt as adminKey,
3080
+ gt as adminMessages,
3081
+ tl as adminTypes,
3082
+ xn as categoryRoutes,
3083
+ pa as collectionSources,
3084
+ yn as createAdmin,
3085
+ al as createAdminContext,
3086
+ ce as createCategoriesApi,
3087
+ zl as createDates,
3088
+ yl as createHttp,
2905
3089
  Ee as createI18n,
2906
- ua as createLinksApi,
2907
- yn as createNotesApi,
2908
- nn as createTheme,
2909
- ra as emptyLink,
2910
- pn as errorText,
2911
- we as i18nKey,
2912
- wn as itemOrderMode,
2913
- Ba as provideAdmin,
2914
- ta as provideI18n,
2915
- Aa as provideRecordAddress,
2916
- an as provideTheme,
2917
- Fe as readCookie,
2918
- ut as recordAddressKey,
2919
- mn as renderMarkdown,
2920
- na as reorderItems,
2921
- al as rowMenuWidth,
2922
- ct as themeKey,
2923
- X as useAdmin,
2924
- Zn as useCategoryEditor,
2925
- Ne as useCategoryWords,
2926
- ft as useDates,
3090
+ Aa as createLinksApi,
3091
+ Rl as createNotesApi,
3092
+ _l as createTheme,
3093
+ je as defaultMarkup,
3094
+ Wa as emptyLink,
3095
+ Ul as errorText,
3096
+ xe as i18nKey,
3097
+ Ml as itemOrderMode,
3098
+ He as normaliseCollection,
3099
+ ll as provideAdmin,
3100
+ ra as provideI18n,
3101
+ Ga as provideRecordAddress,
3102
+ kl as provideTheme,
3103
+ qe as readCookie,
3104
+ vt as recordAddressKey,
3105
+ Vl as renderMarkdown,
3106
+ da as reorderItems,
3107
+ kn as rowMenuWidth,
3108
+ ht as themeKey,
3109
+ q as useAdmin,
3110
+ bn as useCategoryEditor,
3111
+ Be as useCategoryWords,
3112
+ bt as useDates,
2927
3113
  Re as useErrorText,
2928
- ea as useI18n,
2929
- el as useItemOrder,
2930
- za as useRecordAddress,
2931
- Jn as useTheme,
3114
+ ia as useI18n,
3115
+ wn as useItemOrder,
3116
+ Ja as useRecordAddress,
3117
+ gn as useTheme,
2932
3118
  P as useTranslate
2933
3119
  };
2934
3120
  //# sourceMappingURL=index.js.map