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