@webx-ui/module-inbox 0.3.2 → 0.4.1

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,8 +1,8 @@
1
- import { defineComponent as ae, useModel as Ve, computed as W, unref as e, openBlock as p, createBlock as g, withCtx as a, createVNode as t, mergeModels as Me, ref as q, watch as Ue, isRef as ne, createElementVNode as j, createElementBlock as K, Fragment as ee, createCommentVNode as P, createTextVNode as F, toDisplayString as w, renderList as we, createSlots as tl, onMounted as rl, reactive as dl, useTemplateRef as cl, normalizeClass as al } from "vue";
2
- import { useRoute as De, useRouter as Le } from "vue-router";
3
- import { useAdmin as ie, useTranslate as te, useErrorText as ve, WxRowMenu as ze, WxScreenHead as Ke, rowMenuWidth as pl, WxDate as Ie, WxListScreen as nl, WxNotes as ml } from "@webx-ui/module-admin";
4
- import { useLocales as xe, WxLocales as vl, WxRichText as Ye, useModal as Ee, WxDialog as Oe, WxFormItem as G, WxSelect as he, WxInput as X, WxText as J, WxAction as $e, WxButton as oe, WxIcon as Te, WxInputNumber as _e, WxDatePicker as je, WxTagsInput as fl, WxCheckbox as be, WxSpace as Fe, toast as E, createModal as Pe, WxCard as se, WxEmpty as We, WxSortableList as Ze, WxBadge as ke, localizedValue as me, confirm as Se, WxSwitch as sl, WxTable as ol, WxAlert as Ne, WxSkeleton as Re, WxTabs as Qe, WxTab as ge, WxActionBar as bl, WxTextarea as hl, WxRadioGroup as yl, WxCheckboxGroup as gl, useElementWidth as xl, WxEntityCard as _l, WxAvatar as Je, WxTooltip as wl, WxListDetail as kl, WxIndicator as Xe, WxDescriptions as el, WxDescriptionsItem as Ae, WxFileCard as Vl, WxTimeline as $l, WxTimelineItem as Ul } from "@webx-ui/core";
5
- const il = /* @__PURE__ */ ae({
1
+ import { defineComponent as ae, useModel as $e, computed as F, unref as e, openBlock as u, createBlock as _, withCtx as a, createVNode as t, mergeModels as Me, ref as W, watch as Se, isRef as ne, createElementVNode as G, createElementBlock as j, Fragment as ee, createCommentVNode as H, createTextVNode as z, toDisplayString as k, renderList as we, createSlots as Ie, onMounted as dl, reactive as cl, useTemplateRef as nl, normalizeClass as Je } from "vue";
2
+ import { useRoute as Le, useRouter as Oe } from "vue-router";
3
+ import { useAdmin as oe, useTranslate as te, useErrorText as me, WxRowMenu as Te, WxScreenHead as Ye, rowMenuWidth as pl, WxDate as Ne, WxListScreen as sl, WxNotes as ml } from "@webx-ui/module-admin";
4
+ import { useLocales as xe, WxLocales as vl, WxRichText as Xe, useModal as Ee, WxDialog as Pe, WxFormItem as B, WxSelect as fe, WxInput as X, WxText as J, WxAction as ke, WxButton as le, WxIcon as Ve, WxInputNumber as _e, WxDatePicker as Ke, WxTagsInput as fl, WxCheckbox as ve, WxSpace as We, toast as E, createModal as Re, WxCard as se, WxEmpty as Be, WxSortableList as Ze, WxBadge as Ue, localizedValue as pe, confirm as Ce, WxSwitch as ol, WxTable as il, WxAlert as De, WxSkeleton as Fe, WxTabs as Qe, WxTab as ge, WxActionBar as bl, WxTextarea as hl, WxRadioGroup as yl, WxCheckboxGroup as gl, useElementWidth as xl, WxEntityCard as _l, WxAvatar as el, WxTooltip as wl, WxListDetail as kl, WxIndicator as ll, WxDescriptions as tl, WxDescriptionsItem as Ae, WxFileCard as Vl, WxTimeline as $l, WxTimelineItem as Ul } from "@webx-ui/core";
5
+ const ul = /* @__PURE__ */ ae({
6
6
  __name: "LocalizedRichText",
7
7
  props: /* @__PURE__ */ Me({
8
8
  placeholder: { default: void 0 },
@@ -12,93 +12,93 @@ const il = /* @__PURE__ */ ae({
12
12
  modelModifiers: {}
13
13
  }),
14
14
  emits: ["update:modelValue"],
15
- setup(i) {
16
- const o = Ve(i, "modelValue"), s = i, v = xe(), n = W(() => {
17
- const d = v.active.value;
18
- return v.list.value.some((C) => C.code === d) ? d : v.list.value[0]?.code ?? "";
19
- }), r = W({
15
+ setup(r) {
16
+ const s = $e(r, "modelValue"), o = r, v = xe(), n = F(() => {
17
+ const m = v.active.value;
18
+ return v.list.value.some(($) => $.code === m) ? m : v.list.value[0]?.code ?? "";
19
+ }), d = F({
20
20
  get: () => {
21
- const d = o.value;
22
- return typeof d == "string" ? n.value === "" || n.value === v.list.value[0]?.code ? d : "" : d[n.value] ?? "";
21
+ const m = s.value;
22
+ return typeof m == "string" ? n.value === "" || n.value === v.list.value[0]?.code ? m : "" : m[n.value] ?? "";
23
23
  },
24
- set: (d) => {
24
+ set: (m) => {
25
25
  if (n.value === "") {
26
- o.value = d;
26
+ s.value = m;
27
27
  return;
28
28
  }
29
- const l = typeof o.value == "string" ? { [n.value]: o.value } : o.value;
30
- o.value = { ...l, [n.value]: d };
29
+ const l = typeof s.value == "string" ? { [n.value]: s.value } : s.value;
30
+ s.value = { ...l, [n.value]: m };
31
31
  }
32
32
  });
33
- return (d, l) => e(v).list.value.length > 0 ? (p(), g(e(vl), { key: 0 }, {
33
+ return (m, l) => e(v).list.value.length > 0 ? (u(), _(e(vl), { key: 0 }, {
34
34
  default: a(() => [
35
- t(e(Ye), {
36
- modelValue: r.value,
37
- "onUpdate:modelValue": l[0] || (l[0] = (C) => r.value = C),
38
- placeholder: s.placeholder,
39
- "min-height": s.minHeight
35
+ t(e(Xe), {
36
+ modelValue: d.value,
37
+ "onUpdate:modelValue": l[0] || (l[0] = ($) => d.value = $),
38
+ placeholder: o.placeholder,
39
+ "min-height": o.minHeight
40
40
  }, null, 8, ["modelValue", "placeholder", "min-height"])
41
41
  ]),
42
42
  _: 1
43
- })) : (p(), g(e(Ye), {
43
+ })) : (u(), _(e(Xe), {
44
44
  key: 1,
45
- modelValue: r.value,
46
- "onUpdate:modelValue": l[1] || (l[1] = (C) => r.value = C),
47
- placeholder: s.placeholder,
48
- "min-height": s.minHeight
45
+ modelValue: d.value,
46
+ "onUpdate:modelValue": l[1] || (l[1] = ($) => d.value = $),
47
+ placeholder: o.placeholder,
48
+ "min-height": o.minHeight
49
49
  }, null, 8, ["modelValue", "placeholder", "min-height"]));
50
50
  }
51
51
  });
52
- function re(i) {
53
- const o = `${i.apiPath}/inbox`, s = (n) => n.data, v = () => {
52
+ function re(r) {
53
+ const s = `${r.apiPath}/inbox`, o = (n) => n.data, v = () => {
54
54
  };
55
55
  return {
56
- forms: () => i.http.get(`${o}/forms`).then(s),
57
- form: (n) => i.http.get(`${o}/forms/${n}`).then(s),
58
- createForm: (n) => i.http.post(`${o}/forms`, n).then(s),
59
- saveForm: (n, r) => i.http.put(`${o}/forms/${n}`, r).then(s),
60
- removeForm: (n) => i.http.delete(`${o}/forms/${n}`).then(v),
61
- duplicateForm: (n) => i.http.post(`${o}/forms/${n}/duplicate`, {}).then(s),
62
- sortForms: (n) => i.http.post(`${o}/forms/sorting`, { ids: n }).then(v),
63
- fields: (n) => i.http.get(`${o}/forms/${n}/fields`).then(s),
64
- createField: (n, r) => i.http.post(`${o}/forms/${n}/fields`, r).then(s),
65
- saveField: (n, r) => i.http.put(`${o}/fields/${n}`, r).then(s),
66
- removeField: (n) => i.http.delete(`${o}/fields/${n}`).then(v),
67
- sortFields: (n, r) => i.http.post(`${o}/forms/${n}/fields/sorting`, { ids: r }).then(v),
68
- statuses: () => i.http.get(`${o}/statuses`).then(s),
69
- createStatus: (n) => i.http.post(`${o}/statuses`, n).then(s),
70
- saveStatus: (n, r) => i.http.put(`${o}/statuses/${n}`, r).then(s),
71
- removeStatus: (n) => i.http.delete(`${o}/statuses/${n}`).then(v),
72
- sortStatuses: (n) => i.http.post(`${o}/statuses/sorting`, { ids: n }).then(v),
73
- recipients: () => i.http.get(`${o}/recipients`).then(s),
74
- submissions: (n, r = {}) => i.http.get(`${o}/forms/${n}/submissions`, { query: Ge(r) }).then((d) => ({
75
- ...d.meta,
76
- data: d.data,
77
- columns: d.columns,
78
- counts: d.counts
56
+ forms: () => r.http.get(`${s}/forms`).then(o),
57
+ form: (n) => r.http.get(`${s}/forms/${n}`).then(o),
58
+ createForm: (n) => r.http.post(`${s}/forms`, n).then(o),
59
+ saveForm: (n, d) => r.http.put(`${s}/forms/${n}`, d).then(o),
60
+ removeForm: (n) => r.http.delete(`${s}/forms/${n}`).then(v),
61
+ duplicateForm: (n) => r.http.post(`${s}/forms/${n}/duplicate`, {}).then(o),
62
+ sortForms: (n) => r.http.post(`${s}/forms/sorting`, { ids: n }).then(v),
63
+ fields: (n) => r.http.get(`${s}/forms/${n}/fields`).then(o),
64
+ createField: (n, d) => r.http.post(`${s}/forms/${n}/fields`, d).then(o),
65
+ saveField: (n, d) => r.http.put(`${s}/fields/${n}`, d).then(o),
66
+ removeField: (n) => r.http.delete(`${s}/fields/${n}`).then(v),
67
+ sortFields: (n, d) => r.http.post(`${s}/forms/${n}/fields/sorting`, { ids: d }).then(v),
68
+ statuses: () => r.http.get(`${s}/statuses`).then(o),
69
+ createStatus: (n) => r.http.post(`${s}/statuses`, n).then(o),
70
+ saveStatus: (n, d) => r.http.put(`${s}/statuses/${n}`, d).then(o),
71
+ removeStatus: (n) => r.http.delete(`${s}/statuses/${n}`).then(v),
72
+ sortStatuses: (n) => r.http.post(`${s}/statuses/sorting`, { ids: n }).then(v),
73
+ recipients: () => r.http.get(`${s}/recipients`).then(o),
74
+ submissions: (n, d = {}) => r.http.get(`${s}/forms/${n}/submissions`, { query: je(d) }).then((m) => ({
75
+ ...m.meta,
76
+ data: m.data,
77
+ columns: m.columns,
78
+ counts: m.counts
79
79
  })),
80
- submission: (n, r = {}) => i.http.get(`${o}/submissions/${n}`, { query: Ge(r) }).then(s),
81
- createSubmission: (n, r) => i.http.post(`${o}/forms/${n}/submissions`, { fields: r }).then(s),
82
- saveSubmission: (n, r) => i.http.put(`${o}/submissions/${n}`, r).then(s),
83
- removeSubmission: (n) => i.http.delete(`${o}/submissions/${n}`).then(v),
84
- massSubmissions: (n) => i.http.post(`${o}/submissions/mass`, n).then(s),
85
- exportUrl: (n, r = {}) => {
86
- const d = new URLSearchParams();
87
- for (const [C, m] of Object.entries(Ge(r)))
88
- m != null && m !== "" && d.set(C, String(m));
89
- const l = d.toString();
90
- return `${o}/forms/${n}/submissions/export${l === "" ? "" : `?${l}`}`;
80
+ submission: (n, d = {}) => r.http.get(`${s}/submissions/${n}`, { query: je(d) }).then(o),
81
+ createSubmission: (n, d) => r.http.post(`${s}/forms/${n}/submissions`, { fields: d }).then(o),
82
+ saveSubmission: (n, d) => r.http.put(`${s}/submissions/${n}`, d).then(o),
83
+ removeSubmission: (n) => r.http.delete(`${s}/submissions/${n}`).then(v),
84
+ massSubmissions: (n) => r.http.post(`${s}/submissions/mass`, n).then(o),
85
+ exportUrl: (n, d = {}) => {
86
+ const m = new URLSearchParams();
87
+ for (const [$, p] of Object.entries(je(d)))
88
+ p != null && p !== "" && m.set($, String(p));
89
+ const l = m.toString();
90
+ return `${s}/forms/${n}/submissions/export${l === "" ? "" : `?${l}`}`;
91
91
  }
92
92
  };
93
93
  }
94
- function Ge(i) {
94
+ function je(r) {
95
95
  return {
96
- view: i.view === void 0 || i.view === "" ? void 0 : i.view,
97
- search: i.search === void 0 || i.search === "" ? void 0 : i.search,
98
- assignee: i.assignee ?? void 0,
99
- sort: i.sort ?? void 0,
100
- page: i.page,
101
- per_page: i.per_page
96
+ view: r.view === void 0 || r.view === "" ? void 0 : r.view,
97
+ search: r.search === void 0 || r.search === "" ? void 0 : r.search,
98
+ assignee: r.assignee ?? void 0,
99
+ sort: r.sort ?? void 0,
100
+ page: r.page,
101
+ per_page: r.per_page
102
102
  };
103
103
  }
104
104
  const Sl = {
@@ -110,7 +110,6 @@ const Sl = {
110
110
  "new-form": "New form",
111
111
  "no-forms": "No forms yet.",
112
112
  "no-forms-help": "A form is a few questions and a list of who hears the answers.",
113
- "choose-form": "Choose a form to see what has come in.",
114
113
  unread: "Unread",
115
114
  submissions: "Submissions in all",
116
115
  off: "Off",
@@ -201,7 +200,7 @@ const Sl = {
201
200
  "view-all": "All",
202
201
  "view-unread": "Unread",
203
202
  export: "Export",
204
- "new-submission": "Add by hand",
203
+ "new-submission": "New submission",
205
204
  "new-submission-title": "A submission by hand",
206
205
  "new-submission-help": "For one that came by telephone or on paper. It is written the same way and lands in the same list.",
207
206
  created: "Added.",
@@ -296,11 +295,11 @@ const Sl = {
296
295
  "type-file": "File",
297
296
  "type-hidden": "Hidden"
298
297
  }
299
- }, ll = /* @__PURE__ */ new WeakSet();
298
+ }, al = /* @__PURE__ */ new WeakSet();
300
299
  function de() {
301
300
  try {
302
- const { i18n: i } = ie();
303
- ll.has(i) || (i.defaults("webx-inbox", Sl), ll.add(i));
301
+ const { i18n: r } = oe();
302
+ al.has(r) || (r.defaults("webx-inbox", Sl), al.add(r));
304
303
  } catch {
305
304
  }
306
305
  }
@@ -316,7 +315,7 @@ const Cl = [
316
315
  "date",
317
316
  "file",
318
317
  "hidden"
319
- ], zl = ["default", "primary", "success", "warning", "info", "danger"], Tl = { class: "wx-inbox-field-form" }, Wl = { class: "wx-inbox-field-form__row" }, Fl = {
318
+ ], zl = ["default", "primary", "success", "warning", "info", "danger"], Tl = { class: "wx-inbox-field-form" }, Fl = { class: "wx-inbox-field-form__row" }, Wl = {
320
319
  key: 2,
321
320
  class: "wx-inbox-choices"
322
321
  }, ql = { class: "wx-inbox-field-form__row" }, Al = { class: "wx-inbox-field-form__checks" }, Il = /* @__PURE__ */ ae({
@@ -325,99 +324,99 @@ const Cl = [
325
324
  field: {},
326
325
  form: {}
327
326
  },
328
- setup(i) {
329
- const o = i, { resolve: s, dismiss: v, open: n } = Ee(), r = ie(), d = re(r);
327
+ setup(r) {
328
+ const s = r, { resolve: o, dismiss: v, open: n } = Ee(), d = oe(), m = re(d);
330
329
  de();
331
- const l = te("webx-inbox"), C = ve(), m = q(!1), c = q({}), N = q(""), f = q("text"), T = q({}), S = q({}), z = q({}), u = q({}), _ = q(!0), b = q(!1), L = q(!0), k = q(!1);
332
- Ue(
333
- () => o.field,
334
- (O) => {
335
- N.value = O?.name ?? "", f.value = O?.type ?? "text", T.value = { ...O?.title ?? {} }, S.value = { ...O?.placeholder ?? {} }, z.value = { ...O?.help ?? {} }, u.value = { ...O?.options ?? {} }, _.value = O?.is_enabled ?? !0, b.value = O?.is_required ?? !1, L.value = O?.is_fullsize ?? !0, k.value = O?.in_table ?? !1, c.value = {};
330
+ const l = te("webx-inbox"), $ = me(), p = W(!1), i = W({}), O = W(""), S = W("text"), T = W({}), b = W({}), q = W({}), c = W({}), U = W(!0), f = W(!1), I = W(!0), w = W(!1);
331
+ Se(
332
+ () => s.field,
333
+ (D) => {
334
+ O.value = D?.name ?? "", S.value = D?.type ?? "text", T.value = { ...D?.title ?? {} }, b.value = { ...D?.placeholder ?? {} }, q.value = { ...D?.help ?? {} }, c.value = { ...D?.options ?? {} }, U.value = D?.is_enabled ?? !0, f.value = D?.is_required ?? !1, I.value = D?.is_fullsize ?? !0, w.value = D?.in_table ?? !1, i.value = {};
336
335
  },
337
336
  { immediate: !0 }
338
337
  );
339
- const R = W(
340
- () => Cl.map((O) => ({ value: O, label: l(`fields.type-${O}`) }))
341
- ), A = W(() => ["select", "radio", "checkbox"].includes(f.value)), V = W(
342
- () => Array.isArray(u.value.choices) ? u.value.choices : []
343
- ), D = W({
344
- get: () => Array.isArray(u.value.extensions) ? u.value.extensions : [],
345
- set: (O) => y(
338
+ const P = F(
339
+ () => Cl.map((D) => ({ value: D, label: l(`fields.type-${D}`) }))
340
+ ), M = F(() => ["select", "radio", "checkbox"].includes(S.value)), A = F(
341
+ () => Array.isArray(c.value.choices) ? c.value.choices : []
342
+ ), C = F({
343
+ get: () => Array.isArray(c.value.extensions) ? c.value.extensions : [],
344
+ set: (D) => g(
346
345
  "extensions",
347
- O.map(($) => $.replace(/^\./, ""))
346
+ D.map((x) => x.replace(/^\./, ""))
348
347
  )
349
348
  });
350
- function y(O, $) {
351
- u.value = { ...u.value, [O]: $ };
349
+ function g(D, x) {
350
+ c.value = { ...c.value, [D]: x };
352
351
  }
353
- function Y() {
354
- y("choices", [...V.value, { value: "", label: {} }]);
352
+ function Q() {
353
+ g("choices", [...A.value, { value: "", label: {} }]);
355
354
  }
356
- function M(O) {
357
- y(
355
+ function be(D) {
356
+ g(
358
357
  "choices",
359
- V.value.filter(($, U) => U !== O)
358
+ A.value.filter((x, h) => h !== D)
360
359
  );
361
360
  }
362
- function le(O, $) {
363
- y(
361
+ function he(D, x) {
362
+ g(
364
363
  "choices",
365
- V.value.map((U, ce) => ce === O ? { ...U, ...$ } : U)
364
+ A.value.map((h, ue) => ue === D ? { ...h, ...x } : h)
366
365
  );
367
366
  }
368
- function B(O) {
369
- return c.value[O]?.[0];
367
+ function N(D) {
368
+ return i.value[D]?.[0];
370
369
  }
371
- async function ye() {
372
- m.value = !0, c.value = {};
373
- const O = {
374
- name: N.value.trim() === "" ? null : N.value.trim(),
375
- type: f.value,
370
+ async function K() {
371
+ p.value = !0, i.value = {};
372
+ const D = {
373
+ name: O.value.trim() === "" ? null : O.value.trim(),
374
+ type: S.value,
376
375
  title: T.value,
377
- placeholder: S.value,
378
- help: z.value,
379
- options: u.value,
380
- is_enabled: _.value,
381
- is_required: b.value,
382
- is_fullsize: L.value,
383
- in_table: k.value
376
+ placeholder: b.value,
377
+ help: q.value,
378
+ options: c.value,
379
+ is_enabled: U.value,
380
+ is_required: f.value,
381
+ is_fullsize: I.value,
382
+ in_table: w.value
384
383
  };
385
384
  try {
386
- s(
387
- o.field === null ? await d.createField(o.form.id, O) : await d.saveField(o.field.id, O)
385
+ o(
386
+ s.field === null ? await m.createField(s.form.id, D) : await m.saveField(s.field.id, D)
388
387
  );
389
- } catch ($) {
390
- const U = $.body;
391
- U?.errors ? (c.value = U.errors, E.danger(l("panel.failed"))) : E.danger(C($));
388
+ } catch (x) {
389
+ const h = x.body;
390
+ h?.errors ? (i.value = h.errors, E.danger(l("panel.failed"))) : E.danger($(x));
392
391
  } finally {
393
- m.value = !1;
392
+ p.value = !1;
394
393
  }
395
394
  }
396
- return (O, $) => (p(), g(e(Oe), {
395
+ return (D, x) => (u(), _(e(Pe), {
397
396
  open: e(n),
398
- "onUpdate:open": $[21] || ($[21] = (U) => ne(n) ? n.value = U : null),
399
- title: i.field ? e(l)("fields.edit-field") : e(l)("fields.new-field"),
397
+ "onUpdate:open": x[21] || (x[21] = (h) => ne(n) ? n.value = h : null),
398
+ title: r.field ? e(l)("fields.edit-field") : e(l)("fields.new-field"),
400
399
  width: 720
401
400
  }, {
402
401
  footer: a(() => [
403
- t(e(Fe), { size: "sm" }, {
402
+ t(e(We), { size: "sm" }, {
404
403
  default: a(() => [
405
- t(e(oe), {
404
+ t(e(le), {
406
405
  variant: "outline",
407
- onClick: $[20] || ($[20] = (U) => e(v)())
406
+ onClick: x[20] || (x[20] = (h) => e(v)())
408
407
  }, {
409
408
  default: a(() => [
410
- F(w(e(l)("fields.cancel")), 1)
409
+ z(k(e(l)("fields.cancel")), 1)
411
410
  ]),
412
411
  _: 1
413
412
  }),
414
- t(e(oe), {
413
+ t(e(le), {
415
414
  type: "primary",
416
- loading: m.value,
417
- onClick: ye
415
+ loading: p.value,
416
+ onClick: K
418
417
  }, {
419
418
  default: a(() => [
420
- F(w(e(l)("fields.save")), 1)
419
+ z(k(e(l)("fields.save")), 1)
421
420
  ]),
422
421
  _: 1
423
422
  }, 8, ["loading"])
@@ -426,292 +425,292 @@ const Cl = [
426
425
  })
427
426
  ]),
428
427
  default: a(() => [
429
- j("div", Tl, [
430
- j("div", Wl, [
431
- t(e(G), {
428
+ G("div", Tl, [
429
+ G("div", Fl, [
430
+ t(e(B), {
432
431
  label: e(l)("fields.type")
433
432
  }, {
434
433
  default: a(() => [
435
- t(e(he), {
436
- modelValue: f.value,
437
- "onUpdate:modelValue": $[0] || ($[0] = (U) => f.value = U),
438
- options: R.value
434
+ t(e(fe), {
435
+ modelValue: S.value,
436
+ "onUpdate:modelValue": x[0] || (x[0] = (h) => S.value = h),
437
+ options: P.value
439
438
  }, null, 8, ["modelValue", "options"])
440
439
  ]),
441
440
  _: 1
442
441
  }, 8, ["label"]),
443
- t(e(G), {
442
+ t(e(B), {
444
443
  label: e(l)("fields.name"),
445
444
  help: e(l)("fields.name-help"),
446
- error: B("name")
445
+ error: N("name")
447
446
  }, {
448
447
  default: a(() => [
449
448
  t(e(X), {
450
- modelValue: N.value,
451
- "onUpdate:modelValue": $[1] || ($[1] = (U) => N.value = U),
449
+ modelValue: O.value,
450
+ "onUpdate:modelValue": x[1] || (x[1] = (h) => O.value = h),
452
451
  placeholder: "email"
453
452
  }, null, 8, ["modelValue"])
454
453
  ]),
455
454
  _: 1
456
455
  }, 8, ["label", "help", "error"])
457
456
  ]),
458
- t(e(G), {
457
+ t(e(B), {
459
458
  label: e(l)("fields.title"),
460
- error: B("title"),
459
+ error: N("title"),
461
460
  required: ""
462
461
  }, {
463
462
  default: a(() => [
464
463
  t(e(X), {
465
464
  modelValue: T.value,
466
- "onUpdate:modelValue": $[2] || ($[2] = (U) => T.value = U),
465
+ "onUpdate:modelValue": x[2] || (x[2] = (h) => T.value = h),
467
466
  localized: ""
468
467
  }, null, 8, ["modelValue"])
469
468
  ]),
470
469
  _: 1
471
470
  }, 8, ["label", "error"]),
472
- f.value !== "hidden" ? (p(), K(ee, { key: 0 }, [
473
- f.value !== "consent" ? (p(), g(e(G), {
471
+ S.value !== "hidden" ? (u(), j(ee, { key: 0 }, [
472
+ S.value !== "consent" ? (u(), _(e(B), {
474
473
  key: 0,
475
474
  label: e(l)("fields.placeholder")
476
475
  }, {
477
476
  default: a(() => [
478
477
  t(e(X), {
479
- modelValue: S.value,
480
- "onUpdate:modelValue": $[3] || ($[3] = (U) => S.value = U),
478
+ modelValue: b.value,
479
+ "onUpdate:modelValue": x[3] || (x[3] = (h) => b.value = h),
481
480
  localized: ""
482
481
  }, null, 8, ["modelValue"])
483
482
  ]),
484
483
  _: 1
485
- }, 8, ["label"])) : P("", !0),
486
- t(e(G), {
484
+ }, 8, ["label"])) : H("", !0),
485
+ t(e(B), {
487
486
  label: e(l)("fields.help")
488
487
  }, {
489
488
  default: a(() => [
490
489
  t(e(X), {
491
- modelValue: z.value,
492
- "onUpdate:modelValue": $[4] || ($[4] = (U) => z.value = U),
490
+ modelValue: q.value,
491
+ "onUpdate:modelValue": x[4] || (x[4] = (h) => q.value = h),
493
492
  localized: ""
494
493
  }, null, 8, ["modelValue"])
495
494
  ]),
496
495
  _: 1
497
496
  }, 8, ["label"])
498
- ], 64)) : P("", !0),
499
- f.value === "consent" ? (p(), g(e(G), {
497
+ ], 64)) : H("", !0),
498
+ S.value === "consent" ? (u(), _(e(B), {
500
499
  key: 1,
501
500
  label: e(l)("fields.consent-text"),
502
501
  help: e(l)("fields.consent-text-help")
503
502
  }, {
504
503
  default: a(() => [
505
- t(il, {
506
- "model-value": u.value.text ?? {},
504
+ t(ul, {
505
+ "model-value": c.value.text ?? {},
507
506
  "min-height": "100px",
508
- "onUpdate:modelValue": $[5] || ($[5] = (U) => y("text", U))
507
+ "onUpdate:modelValue": x[5] || (x[5] = (h) => g("text", h))
509
508
  }, null, 8, ["model-value"])
510
509
  ]),
511
510
  _: 1
512
- }, 8, ["label", "help"])) : P("", !0),
513
- A.value ? (p(), K("div", Fl, [
511
+ }, 8, ["label", "help"])) : H("", !0),
512
+ M.value ? (u(), j("div", Wl, [
514
513
  t(e(J), {
515
514
  size: "sm",
516
515
  weight: "medium"
517
516
  }, {
518
517
  default: a(() => [
519
- F(w(e(l)("fields.choices")), 1)
518
+ z(k(e(l)("fields.choices")), 1)
520
519
  ]),
521
520
  _: 1
522
521
  }),
523
- V.value.length === 0 ? (p(), g(e(J), {
522
+ A.value.length === 0 ? (u(), _(e(J), {
524
523
  key: 0,
525
524
  size: "sm",
526
525
  tone: "placeholder"
527
526
  }, {
528
527
  default: a(() => [
529
- F(w(e(l)("fields.no-choices")), 1)
528
+ z(k(e(l)("fields.no-choices")), 1)
530
529
  ]),
531
530
  _: 1
532
- })) : P("", !0),
533
- (p(!0), K(ee, null, we(V.value, (U, ce) => (p(), K("div", {
534
- key: ce,
531
+ })) : H("", !0),
532
+ (u(!0), j(ee, null, we(A.value, (h, ue) => (u(), j("div", {
533
+ key: ue,
535
534
  class: "wx-inbox-choices__row"
536
535
  }, [
537
536
  t(e(X), {
538
- "model-value": U.value,
537
+ "model-value": h.value,
539
538
  placeholder: e(l)("fields.choice-value"),
540
- "onUpdate:modelValue": (fe) => le(ce, { value: String(fe) })
539
+ "onUpdate:modelValue": (ye) => he(ue, { value: String(ye) })
541
540
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
542
541
  t(e(X), {
543
- "model-value": U.label,
542
+ "model-value": h.label,
544
543
  localized: "",
545
544
  placeholder: e(l)("fields.choice-label"),
546
- "onUpdate:modelValue": (fe) => le(ce, { label: fe })
545
+ "onUpdate:modelValue": (ye) => he(ue, { label: ye })
547
546
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]),
548
- t(e($e), {
547
+ t(e(ke), {
549
548
  icon: "trash",
550
549
  title: e(l)("fields.delete"),
551
- onClick: (fe) => M(ce)
550
+ onClick: (ye) => be(ue)
552
551
  }, null, 8, ["title", "onClick"])
553
552
  ]))), 128)),
554
- t(e(oe), {
553
+ t(e(le), {
555
554
  variant: "outline",
556
555
  size: "sm",
557
- onClick: Y
556
+ onClick: Q
558
557
  }, {
559
558
  icon: a(() => [
560
- t(e(Te), { name: "plus" })
559
+ t(e(Ve), { name: "plus" })
561
560
  ]),
562
561
  default: a(() => [
563
- F(" " + w(e(l)("fields.add-choice")), 1)
562
+ z(" " + k(e(l)("fields.add-choice")), 1)
564
563
  ]),
565
564
  _: 1
566
565
  })
567
- ])) : P("", !0),
568
- j("div", ql, [
569
- f.value === "textarea" ? (p(), g(e(G), {
566
+ ])) : H("", !0),
567
+ G("div", ql, [
568
+ S.value === "textarea" ? (u(), _(e(B), {
570
569
  key: 0,
571
570
  label: e(l)("fields.rows")
572
571
  }, {
573
572
  default: a(() => [
574
573
  t(e(_e), {
575
- "model-value": u.value.rows ?? 5,
574
+ "model-value": c.value.rows ?? 5,
576
575
  min: 2,
577
576
  max: 30,
578
- "onUpdate:modelValue": $[6] || ($[6] = (U) => y("rows", U))
577
+ "onUpdate:modelValue": x[6] || (x[6] = (h) => g("rows", h))
579
578
  }, null, 8, ["model-value"])
580
579
  ]),
581
580
  _: 1
582
- }, 8, ["label"])) : P("", !0),
583
- ["text", "email", "textarea"].includes(f.value) ? (p(), g(e(G), {
581
+ }, 8, ["label"])) : H("", !0),
582
+ ["text", "email", "textarea"].includes(S.value) ? (u(), _(e(B), {
584
583
  key: 1,
585
584
  label: e(l)("fields.maxlength")
586
585
  }, {
587
586
  default: a(() => [
588
587
  t(e(_e), {
589
- "model-value": u.value.maxlength ?? null,
588
+ "model-value": c.value.maxlength ?? null,
590
589
  min: 1,
591
590
  max: 2e4,
592
- "onUpdate:modelValue": $[7] || ($[7] = (U) => y("maxlength", U))
591
+ "onUpdate:modelValue": x[7] || (x[7] = (h) => g("maxlength", h))
593
592
  }, null, 8, ["model-value"])
594
593
  ]),
595
594
  _: 1
596
- }, 8, ["label"])) : P("", !0),
597
- f.value === "tel" ? (p(), g(e(G), {
595
+ }, 8, ["label"])) : H("", !0),
596
+ S.value === "tel" ? (u(), _(e(B), {
598
597
  key: 2,
599
598
  label: e(l)("fields.pattern"),
600
599
  help: e(l)("fields.pattern-help")
601
600
  }, {
602
601
  default: a(() => [
603
602
  t(e(X), {
604
- "model-value": u.value.pattern ?? "",
605
- "onUpdate:modelValue": $[8] || ($[8] = (U) => y("pattern", U))
603
+ "model-value": c.value.pattern ?? "",
604
+ "onUpdate:modelValue": x[8] || (x[8] = (h) => g("pattern", h))
606
605
  }, null, 8, ["model-value"])
607
606
  ]),
608
607
  _: 1
609
- }, 8, ["label", "help"])) : P("", !0),
610
- f.value === "date" ? (p(), K(ee, { key: 3 }, [
611
- t(e(G), {
608
+ }, 8, ["label", "help"])) : H("", !0),
609
+ S.value === "date" ? (u(), j(ee, { key: 3 }, [
610
+ t(e(B), {
612
611
  label: e(l)("fields.earliest")
613
612
  }, {
614
613
  default: a(() => [
615
- t(e(je), {
614
+ t(e(Ke), {
616
615
  clearable: "",
617
- "model-value": u.value.min ?? null,
618
- "onUpdate:modelValue": $[9] || ($[9] = (U) => y("min", U))
616
+ "model-value": c.value.min ?? null,
617
+ "onUpdate:modelValue": x[9] || (x[9] = (h) => g("min", h))
619
618
  }, null, 8, ["model-value"])
620
619
  ]),
621
620
  _: 1
622
621
  }, 8, ["label"]),
623
- t(e(G), {
622
+ t(e(B), {
624
623
  label: e(l)("fields.latest")
625
624
  }, {
626
625
  default: a(() => [
627
- t(e(je), {
626
+ t(e(Ke), {
628
627
  clearable: "",
629
- "model-value": u.value.max ?? null,
630
- "onUpdate:modelValue": $[10] || ($[10] = (U) => y("max", U))
628
+ "model-value": c.value.max ?? null,
629
+ "onUpdate:modelValue": x[10] || (x[10] = (h) => g("max", h))
631
630
  }, null, 8, ["model-value"])
632
631
  ]),
633
632
  _: 1
634
633
  }, 8, ["label"])
635
- ], 64)) : P("", !0),
636
- f.value === "checkbox" ? (p(), K(ee, { key: 4 }, [
637
- t(e(G), {
634
+ ], 64)) : H("", !0),
635
+ S.value === "checkbox" ? (u(), j(ee, { key: 4 }, [
636
+ t(e(B), {
638
637
  label: e(l)("fields.min-choices")
639
638
  }, {
640
639
  default: a(() => [
641
640
  t(e(_e), {
642
- "model-value": u.value.min ?? null,
641
+ "model-value": c.value.min ?? null,
643
642
  min: 0,
644
- "onUpdate:modelValue": $[11] || ($[11] = (U) => y("min", U))
643
+ "onUpdate:modelValue": x[11] || (x[11] = (h) => g("min", h))
645
644
  }, null, 8, ["model-value"])
646
645
  ]),
647
646
  _: 1
648
647
  }, 8, ["label"]),
649
- t(e(G), {
648
+ t(e(B), {
650
649
  label: e(l)("fields.max-choices")
651
650
  }, {
652
651
  default: a(() => [
653
652
  t(e(_e), {
654
- "model-value": u.value.max ?? null,
653
+ "model-value": c.value.max ?? null,
655
654
  min: 0,
656
- "onUpdate:modelValue": $[12] || ($[12] = (U) => y("max", U))
655
+ "onUpdate:modelValue": x[12] || (x[12] = (h) => g("max", h))
657
656
  }, null, 8, ["model-value"])
658
657
  ]),
659
658
  _: 1
660
659
  }, 8, ["label"])
661
- ], 64)) : P("", !0),
662
- f.value === "file" ? (p(), g(e(G), {
660
+ ], 64)) : H("", !0),
661
+ S.value === "file" ? (u(), _(e(B), {
663
662
  key: 5,
664
663
  label: e(l)("fields.max-size")
665
664
  }, {
666
665
  default: a(() => [
667
666
  t(e(_e), {
668
- "model-value": u.value.max_size ?? null,
667
+ "model-value": c.value.max_size ?? null,
669
668
  min: 1,
670
- "onUpdate:modelValue": $[13] || ($[13] = (U) => y("max_size", U))
669
+ "onUpdate:modelValue": x[13] || (x[13] = (h) => g("max_size", h))
671
670
  }, null, 8, ["model-value"])
672
671
  ]),
673
672
  _: 1
674
- }, 8, ["label"])) : P("", !0)
673
+ }, 8, ["label"])) : H("", !0)
675
674
  ]),
676
- f.value === "file" ? (p(), K(ee, { key: 3 }, [
677
- t(e(G), {
675
+ S.value === "file" ? (u(), j(ee, { key: 3 }, [
676
+ t(e(B), {
678
677
  label: e(l)("fields.extensions"),
679
678
  help: e(l)("fields.extensions-help")
680
679
  }, {
681
680
  default: a(() => [
682
681
  t(e(fl), {
683
- modelValue: D.value,
684
- "onUpdate:modelValue": $[14] || ($[14] = (U) => D.value = U)
682
+ modelValue: C.value,
683
+ "onUpdate:modelValue": x[14] || (x[14] = (h) => C.value = h)
685
684
  }, null, 8, ["modelValue"])
686
685
  ]),
687
686
  _: 1
688
687
  }, 8, ["label", "help"]),
689
- t(e(be), {
690
- "model-value": !!u.value.multiple,
688
+ t(e(ve), {
689
+ "model-value": !!c.value.multiple,
691
690
  label: e(l)("fields.multiple"),
692
- "onUpdate:modelValue": $[15] || ($[15] = (U) => y("multiple", U))
691
+ "onUpdate:modelValue": x[15] || (x[15] = (h) => g("multiple", h))
693
692
  }, null, 8, ["model-value", "label"])
694
- ], 64)) : P("", !0),
695
- j("div", Al, [
696
- t(e(be), {
697
- modelValue: _.value,
698
- "onUpdate:modelValue": $[16] || ($[16] = (U) => _.value = U),
693
+ ], 64)) : H("", !0),
694
+ G("div", Al, [
695
+ t(e(ve), {
696
+ modelValue: U.value,
697
+ "onUpdate:modelValue": x[16] || (x[16] = (h) => U.value = h),
699
698
  label: e(l)("fields.is-enabled")
700
699
  }, null, 8, ["modelValue", "label"]),
701
- t(e(be), {
702
- modelValue: b.value,
703
- "onUpdate:modelValue": $[17] || ($[17] = (U) => b.value = U),
700
+ t(e(ve), {
701
+ modelValue: f.value,
702
+ "onUpdate:modelValue": x[17] || (x[17] = (h) => f.value = h),
704
703
  label: e(l)("fields.is-required")
705
704
  }, null, 8, ["modelValue", "label"]),
706
- f.value !== "hidden" ? (p(), g(e(be), {
705
+ S.value !== "hidden" ? (u(), _(e(ve), {
707
706
  key: 0,
708
- modelValue: L.value,
709
- "onUpdate:modelValue": $[18] || ($[18] = (U) => L.value = U),
707
+ modelValue: I.value,
708
+ "onUpdate:modelValue": x[18] || (x[18] = (h) => I.value = h),
710
709
  label: e(l)("fields.is-fullsize")
711
- }, null, 8, ["modelValue", "label"])) : P("", !0),
712
- t(e(be), {
713
- modelValue: k.value,
714
- "onUpdate:modelValue": $[19] || ($[19] = (U) => k.value = U),
710
+ }, null, 8, ["modelValue", "label"])) : H("", !0),
711
+ t(e(ve), {
712
+ modelValue: w.value,
713
+ "onUpdate:modelValue": x[19] || (x[19] = (h) => w.value = h),
715
714
  label: e(l)("fields.in-table")
716
715
  }, null, 8, ["modelValue", "label"])
717
716
  ])
@@ -720,12 +719,12 @@ const Cl = [
720
719
  _: 1
721
720
  }, 8, ["open", "title"]));
722
721
  }
723
- }), ue = (i, o) => {
724
- const s = i.__vccOpts || i;
725
- for (const [v, n] of o)
726
- s[v] = n;
727
- return s;
728
- }, Nl = /* @__PURE__ */ ue(Il, [["__scopeId", "data-v-6696bbc1"]]), Ml = { class: "wx-inbox-field" }, Dl = { class: "wx-inbox-field__name" }, Ll = /* @__PURE__ */ ae({
722
+ }), ie = (r, s) => {
723
+ const o = r.__vccOpts || r;
724
+ for (const [v, n] of s)
725
+ o[v] = n;
726
+ return o;
727
+ }, Nl = /* @__PURE__ */ ie(Il, [["__scopeId", "data-v-6696bbc1"]]), Dl = { class: "wx-inbox-field" }, Ml = { class: "wx-inbox-field__name" }, Ll = /* @__PURE__ */ ae({
729
728
  __name: "FieldList",
730
729
  props: /* @__PURE__ */ Me({
731
730
  form: {},
@@ -735,103 +734,103 @@ const Cl = [
735
734
  modelModifiers: {}
736
735
  }),
737
736
  emits: ["update:modelValue"],
738
- setup(i) {
739
- const o = i, s = Ve(i, "modelValue"), v = ie(), n = re(v), r = xe();
737
+ setup(r) {
738
+ const s = r, o = $e(r, "modelValue"), v = oe(), n = re(v), d = xe();
740
739
  de();
741
- const d = te("webx-inbox"), l = ve(), C = Pe(Nl);
742
- function m(u) {
743
- return me(u.title, r.active.value, u.key);
740
+ const m = te("webx-inbox"), l = me(), $ = Re(Nl);
741
+ function p(c) {
742
+ return pe(c.title, d.active.value, c.key);
744
743
  }
745
- function c(u) {
744
+ function i(c) {
746
745
  return [
747
- d(`fields.type-${u.type}`),
748
- ...u.is_required ? [d("fields.is-required")] : [],
749
- ...u.in_table ? [d("fields.in-table")] : [],
750
- ...u.is_fullsize ? [] : [d("fields.is-fullsize")]
746
+ m(`fields.type-${c.type}`),
747
+ ...c.is_required ? [m("fields.is-required")] : [],
748
+ ...c.in_table ? [m("fields.in-table")] : [],
749
+ ...c.is_fullsize ? [] : [m("fields.is-fullsize")]
751
750
  ];
752
751
  }
753
- const N = W(() => s.value.length === 0);
754
- async function f(u) {
755
- const _ = await C({ field: u, form: o.form });
756
- _ && (s.value = u === null ? [...s.value, _] : s.value.map((b) => b.id === _.id ? _ : b));
757
- }
758
- async function T(u) {
759
- if (await Se({
760
- title: d("fields.delete-title", { field: m(u) }),
761
- message: d("fields.delete-text"),
762
- confirmText: d("fields.delete"),
763
- cancelText: d("fields.cancel"),
752
+ const O = F(() => o.value.length === 0);
753
+ async function S(c) {
754
+ const U = await $({ field: c, form: s.form });
755
+ U && (o.value = c === null ? [...o.value, U] : o.value.map((f) => f.id === U.id ? U : f));
756
+ }
757
+ async function T(c) {
758
+ if (await Ce({
759
+ title: m("fields.delete-title", { field: p(c) }),
760
+ message: m("fields.delete-text"),
761
+ confirmText: m("fields.delete"),
762
+ cancelText: m("fields.cancel"),
764
763
  tone: "danger"
765
764
  }))
766
765
  try {
767
- await n.removeField(u.id), s.value = s.value.filter((b) => b.id !== u.id), E.success(d("panel.deleted"));
768
- } catch (b) {
769
- E.danger(l(b));
766
+ await n.removeField(c.id), o.value = o.value.filter((f) => f.id !== c.id), E.success(m("panel.deleted"));
767
+ } catch (f) {
768
+ E.danger(l(f));
770
769
  }
771
770
  }
772
- function S(u) {
773
- return o.canManage ? [
774
- { key: "edit", icon: "edit", label: d("fields.edit-field"), run: () => {
775
- f(u);
771
+ function b(c) {
772
+ return s.canManage ? [
773
+ { key: "edit", icon: "edit", label: m("fields.edit-field"), run: () => {
774
+ S(c);
776
775
  } },
777
776
  {
778
777
  key: "delete",
779
778
  icon: "trash",
780
- label: d("fields.delete"),
779
+ label: m("fields.delete"),
781
780
  danger: !0,
782
781
  run: () => {
783
- T(u);
782
+ T(c);
784
783
  }
785
784
  }
786
785
  ] : [];
787
786
  }
788
- async function z() {
787
+ async function q() {
789
788
  try {
790
789
  await n.sortFields(
791
- o.form.id,
792
- s.value.map((u) => u.id)
790
+ s.form.id,
791
+ o.value.map((c) => c.id)
793
792
  );
794
- } catch (u) {
795
- E.danger(l(u, d("panel.reorder-failed")));
793
+ } catch (c) {
794
+ E.danger(l(c, m("panel.reorder-failed")));
796
795
  }
797
796
  }
798
- return (u, _) => (p(), g(e(se), {
799
- title: e(d)("panel.tab-fields")
800
- }, tl({
797
+ return (c, U) => (u(), _(e(se), {
798
+ title: e(m)("panel.tab-fields")
799
+ }, Ie({
801
800
  default: a(() => [
802
- N.value ? (p(), g(e(We), {
801
+ O.value ? (u(), _(e(Be), {
803
802
  key: 0,
804
- title: e(d)("fields.no-fields"),
805
- description: e(d)("fields.no-fields-help")
806
- }, null, 8, ["title", "description"])) : (p(), g(e(Ze), {
803
+ title: e(m)("fields.no-fields"),
804
+ description: e(m)("fields.no-fields-help")
805
+ }, null, 8, ["title", "description"])) : (u(), _(e(Ze), {
807
806
  key: 1,
808
- modelValue: s.value,
809
- "onUpdate:modelValue": _[1] || (_[1] = (b) => s.value = b),
807
+ modelValue: o.value,
808
+ "onUpdate:modelValue": U[1] || (U[1] = (f) => o.value = f),
810
809
  plain: "",
811
810
  "item-key": "id",
812
- "item-label": m,
813
- disabled: !i.canManage,
814
- "aria-label": e(d)("panel.tab-fields"),
815
- onMove: z
811
+ "item-label": p,
812
+ disabled: !r.canManage,
813
+ "aria-label": e(m)("panel.tab-fields"),
814
+ onMove: q
816
815
  }, {
817
- default: a(({ item: b }) => [
818
- j("div", Ml, [
819
- j("div", Dl, [
816
+ default: a(({ item: f }) => [
817
+ G("div", Dl, [
818
+ G("div", Ml, [
820
819
  t(e(J), {
821
820
  weight: "medium",
822
821
  truncate: ""
823
822
  }, {
824
823
  default: a(() => [
825
- F(w(m(b)), 1)
824
+ z(k(p(f)), 1)
826
825
  ]),
827
826
  _: 2
828
827
  }, 1024),
829
- b.is_enabled ? P("", !0) : (p(), g(e(ke), {
828
+ f.is_enabled ? H("", !0) : (u(), _(e(Ue), {
830
829
  key: 0,
831
830
  type: "default"
832
831
  }, {
833
832
  default: a(() => [
834
- F(w(e(d)("panel.off")), 1)
833
+ z(k(e(m)("panel.off")), 1)
835
834
  ]),
836
835
  _: 1
837
836
  }))
@@ -842,17 +841,17 @@ const Cl = [
842
841
  truncate: ""
843
842
  }, {
844
843
  default: a(() => [
845
- j("code", null, "fields[" + w(b.key) + "]", 1),
846
- F(" · " + w(c(b).join(" · ")), 1)
844
+ G("code", null, "fields[" + k(f.key) + "]", 1),
845
+ z(" · " + k(i(f).join(" · ")), 1)
847
846
  ]),
848
847
  _: 2
849
848
  }, 1024)
850
849
  ])
851
850
  ]),
852
- actions: a(({ item: b }) => [
853
- t(e(ze), {
854
- actions: S(b),
855
- label: m(b)
851
+ actions: a(({ item: f }) => [
852
+ t(e(Te), {
853
+ actions: b(f),
854
+ label: p(f)
856
855
  }, null, 8, ["actions", "label"])
857
856
  ]),
858
857
  _: 1
@@ -860,19 +859,19 @@ const Cl = [
860
859
  ]),
861
860
  _: 2
862
861
  }, [
863
- i.canManage ? {
862
+ r.canManage ? {
864
863
  name: "extra",
865
864
  fn: a(() => [
866
- t(e(oe), {
865
+ t(e(le), {
867
866
  type: "primary",
868
867
  size: "sm",
869
- onClick: _[0] || (_[0] = (b) => f(null))
868
+ onClick: U[0] || (U[0] = (f) => S(null))
870
869
  }, {
871
870
  icon: a(() => [
872
- t(e(Te), { name: "plus" })
871
+ t(e(Ve), { name: "plus" })
873
872
  ]),
874
873
  default: a(() => [
875
- F(" " + w(e(d)("fields.new-field")), 1)
874
+ z(" " + k(e(m)("fields.new-field")), 1)
876
875
  ]),
877
876
  _: 1
878
877
  })
@@ -881,79 +880,79 @@ const Cl = [
881
880
  } : void 0
882
881
  ]), 1032, ["title"]));
883
882
  }
884
- }), El = /* @__PURE__ */ ue(Ll, [["__scopeId", "data-v-421ed0af"]]);
885
- function pe(i, o, s) {
886
- return W({
887
- get: () => i.value[o] ?? s,
883
+ }), Ol = /* @__PURE__ */ ie(Ll, [["__scopeId", "data-v-421ed0af"]]);
884
+ function ce(r, s, o) {
885
+ return F({
886
+ get: () => r.value[s] ?? o,
888
887
  set: (v) => {
889
- const n = { ...i.value };
890
- v === "" || v === null || v === void 0 ? delete n[o] : n[o] = v, i.value = n;
888
+ const n = { ...r.value };
889
+ v === "" || v === null || v === void 0 ? delete n[s] : n[s] = v, r.value = n;
891
890
  }
892
891
  });
893
892
  }
894
- const Ol = /* @__PURE__ */ ae({
893
+ const El = /* @__PURE__ */ ae({
895
894
  __name: "FormAntispam",
896
895
  props: {
897
896
  modelValue: { required: !0 },
898
897
  modelModifiers: {}
899
898
  },
900
899
  emits: ["update:modelValue"],
901
- setup(i) {
902
- const o = Ve(i, "modelValue"), s = te("webx-inbox"), v = pe(o, "antispam.honeypot", !0), n = pe(o, "antispam.min_seconds", 3), r = pe(o, "antispam.throttle", 5), d = pe(o, "antispam.captcha", "off"), l = W(() => [
903
- { value: "off", label: s("panel.captcha-off") },
904
- { value: "recaptcha", label: s("panel.captcha-recaptcha") },
905
- { value: "turnstile", label: s("panel.captcha-turnstile") }
900
+ setup(r) {
901
+ const s = $e(r, "modelValue"), o = te("webx-inbox"), v = ce(s, "antispam.honeypot", !0), n = ce(s, "antispam.min_seconds", 3), d = ce(s, "antispam.throttle", 5), m = ce(s, "antispam.captcha", "off"), l = F(() => [
902
+ { value: "off", label: o("panel.captcha-off") },
903
+ { value: "recaptcha", label: o("panel.captcha-recaptcha") },
904
+ { value: "turnstile", label: o("panel.captcha-turnstile") }
906
905
  ]);
907
- return (C, m) => (p(), g(e(se), null, {
906
+ return ($, p) => (u(), _(e(se), null, {
908
907
  default: a(() => [
909
- t(e(G), {
910
- label: e(s)("panel.honeypot"),
911
- help: e(s)("panel.honeypot-help")
908
+ t(e(B), {
909
+ label: e(o)("panel.honeypot"),
910
+ help: e(o)("panel.honeypot-help")
912
911
  }, {
913
912
  default: a(() => [
914
- t(e(sl), {
913
+ t(e(ol), {
915
914
  modelValue: e(v),
916
- "onUpdate:modelValue": m[0] || (m[0] = (c) => ne(v) ? v.value = c : null)
915
+ "onUpdate:modelValue": p[0] || (p[0] = (i) => ne(v) ? v.value = i : null)
917
916
  }, null, 8, ["modelValue"])
918
917
  ]),
919
918
  _: 1
920
919
  }, 8, ["label", "help"]),
921
- t(e(G), {
922
- label: e(s)("panel.min-seconds"),
923
- help: e(s)("panel.min-seconds-help")
920
+ t(e(B), {
921
+ label: e(o)("panel.min-seconds"),
922
+ help: e(o)("panel.min-seconds-help")
924
923
  }, {
925
924
  default: a(() => [
926
925
  t(e(_e), {
927
926
  modelValue: e(n),
928
- "onUpdate:modelValue": m[1] || (m[1] = (c) => ne(n) ? n.value = c : null),
927
+ "onUpdate:modelValue": p[1] || (p[1] = (i) => ne(n) ? n.value = i : null),
929
928
  min: 0,
930
929
  max: 120
931
930
  }, null, 8, ["modelValue"])
932
931
  ]),
933
932
  _: 1
934
933
  }, 8, ["label", "help"]),
935
- t(e(G), {
936
- label: e(s)("panel.throttle"),
937
- help: e(s)("panel.throttle-help")
934
+ t(e(B), {
935
+ label: e(o)("panel.throttle"),
936
+ help: e(o)("panel.throttle-help")
938
937
  }, {
939
938
  default: a(() => [
940
939
  t(e(_e), {
941
- modelValue: e(r),
942
- "onUpdate:modelValue": m[2] || (m[2] = (c) => ne(r) ? r.value = c : null),
940
+ modelValue: e(d),
941
+ "onUpdate:modelValue": p[2] || (p[2] = (i) => ne(d) ? d.value = i : null),
943
942
  min: 0,
944
943
  max: 120
945
944
  }, null, 8, ["modelValue"])
946
945
  ]),
947
946
  _: 1
948
947
  }, 8, ["label", "help"]),
949
- t(e(G), {
950
- label: e(s)("panel.captcha"),
951
- help: e(s)("panel.captcha-help")
948
+ t(e(B), {
949
+ label: e(o)("panel.captcha"),
950
+ help: e(o)("panel.captcha-help")
952
951
  }, {
953
952
  default: a(() => [
954
- t(e(he), {
955
- modelValue: e(d),
956
- "onUpdate:modelValue": m[3] || (m[3] = (c) => ne(d) ? d.value = c : null),
953
+ t(e(fe), {
954
+ modelValue: e(m),
955
+ "onUpdate:modelValue": p[3] || (p[3] = (i) => ne(m) ? m.value = i : null),
957
956
  options: l.value
958
957
  }, null, 8, ["modelValue", "options"])
959
958
  ]),
@@ -970,26 +969,26 @@ const Ol = /* @__PURE__ */ ae({
970
969
  slug: {},
971
970
  fields: {}
972
971
  },
973
- setup(i) {
974
- const o = i;
972
+ setup(r) {
973
+ const s = r;
975
974
  de();
976
- const s = te("webx-inbox"), v = W(() => `<x-webx-form slug="${o.slug}" />`), n = W(
975
+ const o = te("webx-inbox"), v = F(() => `<x-webx-form slug="${s.slug}" />`), n = F(
977
976
  () => `{{-- resources/views/blocks/contact.blade.php --}}
978
- <x-webx-form slug="${o.slug}" />`
979
- ), r = W(() => [
980
- { key: "key", label: s("fields.name") },
981
- { key: "title", label: s("fields.title") },
982
- { key: "type", label: s("fields.type"), hideBelow: 520 }
983
- ]), d = W(() => o.fields.filter((C) => C.is_enabled));
984
- async function l(C) {
977
+ <x-webx-form slug="${s.slug}" />`
978
+ ), d = F(() => [
979
+ { key: "key", label: o("fields.name") },
980
+ { key: "title", label: o("fields.title") },
981
+ { key: "type", label: o("fields.type"), hideBelow: 520 }
982
+ ]), m = F(() => s.fields.filter(($) => $.is_enabled));
983
+ async function l($) {
985
984
  try {
986
- await navigator.clipboard.writeText(C), E.success(s("panel.copied"));
985
+ await navigator.clipboard.writeText($), E.success(o("panel.copied"));
987
986
  } catch {
988
987
  }
989
988
  }
990
- return (C, m) => (p(), K("div", Pl, [
989
+ return ($, p) => (u(), j("div", Pl, [
991
990
  t(e(se), {
992
- title: e(s)("panel.embed-blade")
991
+ title: e(o)("panel.embed-blade")
993
992
  }, {
994
993
  default: a(() => [
995
994
  t(e(J), {
@@ -997,23 +996,23 @@ const Ol = /* @__PURE__ */ ae({
997
996
  tone: "muted"
998
997
  }, {
999
998
  default: a(() => [
1000
- F(w(e(s)("panel.embed-blade-help")), 1)
999
+ z(k(e(o)("panel.embed-blade-help")), 1)
1001
1000
  ]),
1002
1001
  _: 1
1003
1002
  }),
1004
- j("div", Rl, [
1005
- j("code", null, w(v.value), 1),
1006
- t(e($e), {
1003
+ G("div", Rl, [
1004
+ G("code", null, k(v.value), 1),
1005
+ t(e(ke), {
1007
1006
  icon: "copy",
1008
- title: e(s)("panel.copy"),
1009
- onClick: m[0] || (m[0] = (c) => l(v.value))
1007
+ title: e(o)("panel.copy"),
1008
+ onClick: p[0] || (p[0] = (i) => l(v.value))
1010
1009
  }, null, 8, ["title"])
1011
1010
  ])
1012
1011
  ]),
1013
1012
  _: 1
1014
1013
  }, 8, ["title"]),
1015
1014
  t(e(se), {
1016
- title: e(s)("panel.embed-block")
1015
+ title: e(o)("panel.embed-block")
1017
1016
  }, {
1018
1017
  default: a(() => [
1019
1018
  t(e(J), {
@@ -1021,23 +1020,23 @@ const Ol = /* @__PURE__ */ ae({
1021
1020
  tone: "muted"
1022
1021
  }, {
1023
1022
  default: a(() => [
1024
- F(w(e(s)("panel.embed-block-help")), 1)
1023
+ z(k(e(o)("panel.embed-block-help")), 1)
1025
1024
  ]),
1026
1025
  _: 1
1027
1026
  }),
1028
- j("div", Bl, [
1029
- j("code", null, w(n.value), 1),
1030
- t(e($e), {
1027
+ G("div", Bl, [
1028
+ G("code", null, k(n.value), 1),
1029
+ t(e(ke), {
1031
1030
  icon: "copy",
1032
- title: e(s)("panel.copy"),
1033
- onClick: m[1] || (m[1] = (c) => l(n.value))
1031
+ title: e(o)("panel.copy"),
1032
+ onClick: p[1] || (p[1] = (i) => l(n.value))
1034
1033
  }, null, 8, ["title"])
1035
1034
  ])
1036
1035
  ]),
1037
1036
  _: 1
1038
1037
  }, 8, ["title"]),
1039
1038
  t(e(se), {
1040
- title: e(s)("panel.embed-names")
1039
+ title: e(o)("panel.embed-names")
1041
1040
  }, {
1042
1041
  default: a(() => [
1043
1042
  t(e(J), {
@@ -1045,33 +1044,33 @@ const Ol = /* @__PURE__ */ ae({
1045
1044
  tone: "muted"
1046
1045
  }, {
1047
1046
  default: a(() => [
1048
- F(w(e(s)("panel.embed-names-help")), 1)
1047
+ z(k(e(o)("panel.embed-names-help")), 1)
1049
1048
  ]),
1050
1049
  _: 1
1051
1050
  }),
1052
- t(e(ol), {
1053
- data: d.value,
1054
- columns: r.value,
1051
+ t(e(il), {
1052
+ data: m.value,
1053
+ columns: d.value,
1055
1054
  "row-key": "id",
1056
1055
  flush: "",
1057
- "empty-text": e(s)("fields.no-fields")
1056
+ "empty-text": e(o)("fields.no-fields")
1058
1057
  }, {
1059
- "cell-key": a(({ row: c }) => [
1058
+ "cell-key": a(({ row: i }) => [
1060
1059
  t(e(J), {
1061
1060
  mono: "",
1062
1061
  size: "sm"
1063
1062
  }, {
1064
1063
  default: a(() => [
1065
- F("fields[" + w(c.key) + "]", 1)
1064
+ z("fields[" + k(i.key) + "]", 1)
1066
1065
  ]),
1067
1066
  _: 2
1068
1067
  }, 1024)
1069
1068
  ]),
1070
- "cell-title": a(({ row: c }) => [
1071
- F(w(Object.values(c.title)[0] ?? c.key), 1)
1069
+ "cell-title": a(({ row: i }) => [
1070
+ z(k(Object.values(i.title)[0] ?? i.key), 1)
1072
1071
  ]),
1073
- "cell-type": a(({ row: c }) => [
1074
- F(w(e(s)(`fields.type-${c.type}`)), 1)
1072
+ "cell-type": a(({ row: i }) => [
1073
+ z(k(e(o)(`fields.type-${i.type}`)), 1)
1075
1074
  ]),
1076
1075
  _: 1
1077
1076
  }, 8, ["data", "columns", "empty-text"])
@@ -1080,7 +1079,7 @@ const Ol = /* @__PURE__ */ ae({
1080
1079
  }, 8, ["title"])
1081
1080
  ]));
1082
1081
  }
1083
- }), Gl = /* @__PURE__ */ ue(Hl, [["__scopeId", "data-v-fdabb537"]]), jl = { class: "wx-inbox-general" }, Kl = /* @__PURE__ */ ae({
1082
+ }), Gl = /* @__PURE__ */ ie(Hl, [["__scopeId", "data-v-fdabb537"]]), jl = { class: "wx-inbox-general" }, Kl = /* @__PURE__ */ ae({
1084
1083
  __name: "FormGeneral",
1085
1084
  props: /* @__PURE__ */ Me({
1086
1085
  errors: {}
@@ -1091,51 +1090,51 @@ const Ol = /* @__PURE__ */ ae({
1091
1090
  optionsModifiers: {}
1092
1091
  }),
1093
1092
  emits: ["update:settings", "update:options"],
1094
- setup(i) {
1095
- const o = Ve(
1096
- i,
1093
+ setup(r) {
1094
+ const s = $e(
1095
+ r,
1097
1096
  "settings"
1098
- ), s = Ve(i, "options"), v = te("webx-inbox"), n = pe(s, "thank-you.heading", {}), r = pe(s, "thank-you.text", {}), d = pe(s, "design.submit-text", {}), l = pe(s, "redirect", "");
1099
- return (C, m) => (p(), K("div", jl, [
1097
+ ), o = $e(r, "options"), v = te("webx-inbox"), n = ce(o, "thank-you.heading", {}), d = ce(o, "thank-you.text", {}), m = ce(o, "design.submit-text", {}), l = ce(o, "redirect", "");
1098
+ return ($, p) => (u(), j("div", jl, [
1100
1099
  t(e(se), null, {
1101
1100
  default: a(() => [
1102
- t(e(G), {
1101
+ t(e(B), {
1103
1102
  label: e(v)("panel.title"),
1104
- error: i.errors.title?.[0],
1103
+ error: r.errors.title?.[0],
1105
1104
  required: ""
1106
1105
  }, {
1107
1106
  default: a(() => [
1108
1107
  t(e(X), {
1109
- modelValue: o.value.title,
1110
- "onUpdate:modelValue": m[0] || (m[0] = (c) => o.value.title = c),
1108
+ modelValue: s.value.title,
1109
+ "onUpdate:modelValue": p[0] || (p[0] = (i) => s.value.title = i),
1111
1110
  localized: ""
1112
1111
  }, null, 8, ["modelValue"])
1113
1112
  ]),
1114
1113
  _: 1
1115
1114
  }, 8, ["label", "error"]),
1116
- t(e(G), {
1115
+ t(e(B), {
1117
1116
  label: e(v)("panel.slug"),
1118
1117
  help: e(v)("panel.slug-help"),
1119
- error: i.errors.slug?.[0],
1118
+ error: r.errors.slug?.[0],
1120
1119
  required: ""
1121
1120
  }, {
1122
1121
  default: a(() => [
1123
1122
  t(e(X), {
1124
- modelValue: o.value.slug,
1125
- "onUpdate:modelValue": m[1] || (m[1] = (c) => o.value.slug = c),
1123
+ modelValue: s.value.slug,
1124
+ "onUpdate:modelValue": p[1] || (p[1] = (i) => s.value.slug = i),
1126
1125
  placeholder: "contact"
1127
1126
  }, null, 8, ["modelValue"])
1128
1127
  ]),
1129
1128
  _: 1
1130
1129
  }, 8, ["label", "help", "error"]),
1131
- t(e(G), {
1130
+ t(e(B), {
1132
1131
  label: e(v)("panel.is-enabled"),
1133
1132
  help: e(v)("panel.is-enabled-help")
1134
1133
  }, {
1135
1134
  default: a(() => [
1136
- t(e(sl), {
1137
- modelValue: o.value.is_enabled,
1138
- "onUpdate:modelValue": m[2] || (m[2] = (c) => o.value.is_enabled = c)
1135
+ t(e(ol), {
1136
+ modelValue: s.value.is_enabled,
1137
+ "onUpdate:modelValue": p[2] || (p[2] = (i) => s.value.is_enabled = i)
1139
1138
  }, null, 8, ["modelValue"])
1140
1139
  ]),
1141
1140
  _: 1
@@ -1147,49 +1146,49 @@ const Ol = /* @__PURE__ */ ae({
1147
1146
  title: e(v)("panel.after-sending")
1148
1147
  }, {
1149
1148
  default: a(() => [
1150
- t(e(G), {
1149
+ t(e(B), {
1151
1150
  label: e(v)("panel.submit-text")
1152
1151
  }, {
1153
1152
  default: a(() => [
1154
1153
  t(e(X), {
1155
- modelValue: e(d),
1156
- "onUpdate:modelValue": m[3] || (m[3] = (c) => ne(d) ? d.value = c : null),
1154
+ modelValue: e(m),
1155
+ "onUpdate:modelValue": p[3] || (p[3] = (i) => ne(m) ? m.value = i : null),
1157
1156
  localized: ""
1158
1157
  }, null, 8, ["modelValue"])
1159
1158
  ]),
1160
1159
  _: 1
1161
1160
  }, 8, ["label"]),
1162
- t(e(G), {
1161
+ t(e(B), {
1163
1162
  label: e(v)("panel.thank-you-heading")
1164
1163
  }, {
1165
1164
  default: a(() => [
1166
1165
  t(e(X), {
1167
1166
  modelValue: e(n),
1168
- "onUpdate:modelValue": m[4] || (m[4] = (c) => ne(n) ? n.value = c : null),
1167
+ "onUpdate:modelValue": p[4] || (p[4] = (i) => ne(n) ? n.value = i : null),
1169
1168
  localized: ""
1170
1169
  }, null, 8, ["modelValue"])
1171
1170
  ]),
1172
1171
  _: 1
1173
1172
  }, 8, ["label"]),
1174
- t(e(G), {
1173
+ t(e(B), {
1175
1174
  label: e(v)("panel.thank-you-text")
1176
1175
  }, {
1177
1176
  default: a(() => [
1178
- t(il, {
1179
- modelValue: e(r),
1180
- "onUpdate:modelValue": m[5] || (m[5] = (c) => ne(r) ? r.value = c : null)
1177
+ t(ul, {
1178
+ modelValue: e(d),
1179
+ "onUpdate:modelValue": p[5] || (p[5] = (i) => ne(d) ? d.value = i : null)
1181
1180
  }, null, 8, ["modelValue"])
1182
1181
  ]),
1183
1182
  _: 1
1184
1183
  }, 8, ["label"]),
1185
- t(e(G), {
1184
+ t(e(B), {
1186
1185
  label: e(v)("panel.redirect"),
1187
1186
  help: e(v)("panel.redirect-help")
1188
1187
  }, {
1189
1188
  default: a(() => [
1190
1189
  t(e(X), {
1191
1190
  modelValue: e(l),
1192
- "onUpdate:modelValue": m[6] || (m[6] = (c) => ne(l) ? l.value = c : null),
1191
+ "onUpdate:modelValue": p[6] || (p[6] = (i) => ne(l) ? l.value = i : null),
1193
1192
  placeholder: "/thank-you"
1194
1193
  }, null, 8, ["modelValue"])
1195
1194
  ]),
@@ -1200,7 +1199,7 @@ const Ol = /* @__PURE__ */ ae({
1200
1199
  }, 8, ["title"])
1201
1200
  ]));
1202
1201
  }
1203
- }), Zl = /* @__PURE__ */ ue(Kl, [["__scopeId", "data-v-35e56e3d"]]), Ql = { class: "wx-inbox-recipients" }, Yl = /* @__PURE__ */ ae({
1202
+ }), Yl = /* @__PURE__ */ ie(Kl, [["__scopeId", "data-v-35e56e3d"]]), Zl = { class: "wx-inbox-recipients" }, Ql = /* @__PURE__ */ ae({
1204
1203
  __name: "FormNotifications",
1205
1204
  props: /* @__PURE__ */ Me({
1206
1205
  fields: {},
@@ -1210,44 +1209,44 @@ const Ol = /* @__PURE__ */ ae({
1210
1209
  modelModifiers: {}
1211
1210
  }),
1212
1211
  emits: ["update:modelValue"],
1213
- setup(i) {
1214
- const o = i, s = Ve(i, "modelValue"), v = ie(), n = re(v), r = te("webx-inbox"), d = q([]), l = pe(s, "recipients", []), C = pe(s, "email_field", "");
1215
- rl(async () => {
1212
+ setup(r) {
1213
+ const s = r, o = $e(r, "modelValue"), v = oe(), n = re(v), d = te("webx-inbox"), m = W([]), l = ce(o, "recipients", []), $ = ce(o, "email_field", "");
1214
+ dl(async () => {
1216
1215
  try {
1217
- d.value = await n.recipients();
1216
+ m.value = await n.recipients();
1218
1217
  } catch {
1219
1218
  }
1220
1219
  });
1221
- const m = W(
1222
- () => d.value.map((u) => ({ value: u.id, label: `${u.name} · ${u.email}` }))
1223
- ), c = W(() => [
1224
- { value: "", label: r("panel.no-email-field") },
1225
- ...o.fields.filter((u) => u.type === "email").map((u) => ({ value: u.key, label: u.key }))
1220
+ const p = F(
1221
+ () => m.value.map((c) => ({ value: c.id, label: `${c.name} · ${c.email}` }))
1222
+ ), i = F(() => [
1223
+ { value: "", label: d("panel.no-email-field") },
1224
+ ...s.fields.filter((c) => c.type === "email").map((c) => ({ value: c.key, label: c.key }))
1226
1225
  ]);
1227
- function N(u) {
1228
- return "admin_id" in u;
1229
- }
1230
- function f(u) {
1231
- l.value = [...l.value, u];
1232
- }
1233
- async function T(u) {
1234
- const _ = l.value[u];
1235
- _ !== void 0 && (N(_) || (_.email ?? "").trim() !== "") && !await Se({
1236
- title: r("panel.remove-recipient-title"),
1237
- message: r("panel.remove-recipient-text"),
1238
- confirmText: r("panel.remove"),
1239
- cancelText: r("panel.cancel"),
1226
+ function O(c) {
1227
+ return "admin_id" in c;
1228
+ }
1229
+ function S(c) {
1230
+ l.value = [...l.value, c];
1231
+ }
1232
+ async function T(c) {
1233
+ const U = l.value[c];
1234
+ U !== void 0 && (O(U) || (U.email ?? "").trim() !== "") && !await Ce({
1235
+ title: d("panel.remove-recipient-title"),
1236
+ message: d("panel.remove-recipient-text"),
1237
+ confirmText: d("panel.remove"),
1238
+ cancelText: d("panel.cancel"),
1240
1239
  tone: "danger"
1241
- }) || (l.value = l.value.filter((L, k) => k !== u));
1240
+ }) || (l.value = l.value.filter((I, w) => w !== c));
1242
1241
  }
1243
- function S(u, _) {
1244
- l.value = l.value.map((b, L) => L === u ? { admin_id: _ } : b);
1242
+ function b(c, U) {
1243
+ l.value = l.value.map((f, I) => I === c ? { admin_id: U } : f);
1245
1244
  }
1246
- function z(u, _) {
1247
- l.value = l.value.map((b, L) => L === u ? { email: _ } : b);
1245
+ function q(c, U) {
1246
+ l.value = l.value.map((f, I) => I === c ? { email: U } : f);
1248
1247
  }
1249
- return (u, _) => (p(), g(e(se), {
1250
- title: e(r)("panel.recipients")
1248
+ return (c, U) => (u(), _(e(se), {
1249
+ title: e(d)("panel.recipients")
1251
1250
  }, {
1252
1251
  default: a(() => [
1253
1252
  t(e(J), {
@@ -1255,88 +1254,88 @@ const Ol = /* @__PURE__ */ ae({
1255
1254
  tone: "muted"
1256
1255
  }, {
1257
1256
  default: a(() => [
1258
- F(w(e(r)("panel.recipients-help")), 1)
1257
+ z(k(e(d)("panel.recipients-help")), 1)
1259
1258
  ]),
1260
1259
  _: 1
1261
1260
  }),
1262
- i.errors["options.recipients"] ? (p(), g(e(Ne), {
1261
+ r.errors["options.recipients"] ? (u(), _(e(De), {
1263
1262
  key: 0,
1264
1263
  type: "danger",
1265
1264
  variant: "soft",
1266
- description: i.errors["options.recipients"]?.[0]
1267
- }, null, 8, ["description"])) : P("", !0),
1268
- j("div", Ql, [
1269
- e(l).length === 0 ? (p(), g(e(J), {
1265
+ description: r.errors["options.recipients"]?.[0]
1266
+ }, null, 8, ["description"])) : H("", !0),
1267
+ G("div", Zl, [
1268
+ e(l).length === 0 ? (u(), _(e(J), {
1270
1269
  key: 0,
1271
1270
  size: "sm",
1272
1271
  tone: "placeholder"
1273
1272
  }, {
1274
1273
  default: a(() => [
1275
- F(w(e(r)("panel.no-recipients")), 1)
1274
+ z(k(e(d)("panel.no-recipients")), 1)
1276
1275
  ]),
1277
1276
  _: 1
1278
- })) : P("", !0),
1279
- (p(!0), K(ee, null, we(e(l), (b, L) => (p(), K("div", {
1280
- key: L,
1277
+ })) : H("", !0),
1278
+ (u(!0), j(ee, null, we(e(l), (f, I) => (u(), j("div", {
1279
+ key: I,
1281
1280
  class: "wx-inbox-recipients__row"
1282
1281
  }, [
1283
- N(b) ? (p(), g(e(he), {
1282
+ O(f) ? (u(), _(e(fe), {
1284
1283
  key: 0,
1285
- "model-value": b.admin_id,
1286
- options: m.value,
1287
- "onUpdate:modelValue": (k) => S(L, Number(k))
1288
- }, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : (p(), g(e(X), {
1284
+ "model-value": f.admin_id,
1285
+ options: p.value,
1286
+ "onUpdate:modelValue": (w) => b(I, Number(w))
1287
+ }, null, 8, ["model-value", "options", "onUpdate:modelValue"])) : (u(), _(e(X), {
1289
1288
  key: 1,
1290
- "model-value": b.email,
1289
+ "model-value": f.email,
1291
1290
  type: "email",
1292
1291
  placeholder: "sales@example.com",
1293
- "onUpdate:modelValue": (k) => z(L, String(k))
1292
+ "onUpdate:modelValue": (w) => q(I, String(w))
1294
1293
  }, null, 8, ["model-value", "onUpdate:modelValue"])),
1295
- t(e($e), {
1294
+ t(e(ke), {
1296
1295
  icon: "trash",
1297
1296
  tone: "danger",
1298
- title: e(r)("panel.remove"),
1299
- onClick: (k) => T(L)
1297
+ title: e(d)("panel.remove"),
1298
+ onClick: (w) => T(I)
1300
1299
  }, null, 8, ["title", "onClick"])
1301
1300
  ]))), 128))
1302
1301
  ]),
1303
- t(e(Fe), { size: "sm" }, {
1302
+ t(e(We), { size: "sm" }, {
1304
1303
  default: a(() => [
1305
- t(e(oe), {
1304
+ t(e(le), {
1306
1305
  variant: "outline",
1307
1306
  icon: "user",
1308
- disabled: m.value.length === 0,
1309
- onClick: _[0] || (_[0] = (b) => f({ admin_id: Number(m.value[0]?.value) }))
1307
+ disabled: p.value.length === 0,
1308
+ onClick: U[0] || (U[0] = (f) => S({ admin_id: Number(p.value[0]?.value) }))
1310
1309
  }, {
1311
1310
  default: a(() => [
1312
- F(w(e(r)("panel.add-admin")), 1)
1311
+ z(k(e(d)("panel.add-admin")), 1)
1313
1312
  ]),
1314
1313
  _: 1
1315
1314
  }, 8, ["disabled"]),
1316
- t(e(oe), {
1315
+ t(e(le), {
1317
1316
  variant: "outline",
1318
- onClick: _[1] || (_[1] = (b) => f({ email: "" }))
1317
+ onClick: U[1] || (U[1] = (f) => S({ email: "" }))
1319
1318
  }, {
1320
1319
  icon: a(() => [
1321
- t(e(Te), { name: "mail" })
1320
+ t(e(Ve), { name: "mail" })
1322
1321
  ]),
1323
1322
  default: a(() => [
1324
- F(" " + w(e(r)("panel.add-email")), 1)
1323
+ z(" " + k(e(d)("panel.add-email")), 1)
1325
1324
  ]),
1326
1325
  _: 1
1327
1326
  })
1328
1327
  ]),
1329
1328
  _: 1
1330
1329
  }),
1331
- t(e(G), {
1332
- label: e(r)("panel.email-field"),
1333
- help: e(r)("panel.email-field-help")
1330
+ t(e(B), {
1331
+ label: e(d)("panel.email-field"),
1332
+ help: e(d)("panel.email-field-help")
1334
1333
  }, {
1335
1334
  default: a(() => [
1336
- t(e(he), {
1337
- modelValue: e(C),
1338
- "onUpdate:modelValue": _[2] || (_[2] = (b) => ne(C) ? C.value = b : null),
1339
- options: c.value
1335
+ t(e(fe), {
1336
+ modelValue: e($),
1337
+ "onUpdate:modelValue": U[2] || (U[2] = (f) => ne($) ? $.value = f : null),
1338
+ options: i.value
1340
1339
  }, null, 8, ["modelValue", "options"])
1341
1340
  ]),
1342
1341
  _: 1
@@ -1345,78 +1344,78 @@ const Ol = /* @__PURE__ */ ae({
1345
1344
  _: 1
1346
1345
  }, 8, ["title"]));
1347
1346
  }
1348
- }), Jl = /* @__PURE__ */ ue(Yl, [["__scopeId", "data-v-a5998eb4"]]), Xl = { class: "wx-inbox-editor" }, et = /* @__PURE__ */ ae({
1347
+ }), Jl = /* @__PURE__ */ ie(Ql, [["__scopeId", "data-v-a5998eb4"]]), Xl = { class: "wx-inbox-editor" }, et = /* @__PURE__ */ ae({
1349
1348
  __name: "FormEditorPage",
1350
1349
  props: {
1351
1350
  base: { default: "/inbox" }
1352
1351
  },
1353
- setup(i) {
1354
- const o = i, s = ie(), v = re(s), n = De(), r = Le(), d = xe();
1352
+ setup(r) {
1353
+ const s = r, o = oe(), v = re(o), n = Le(), d = Oe(), m = xe();
1355
1354
  de();
1356
- const l = te("webx-inbox"), C = ve(), m = q(null), c = q([]), N = q(!0), f = q(!1), T = q({});
1357
- let S = dl({
1355
+ const l = te("webx-inbox"), $ = me(), p = W(null), i = W([]), O = W(!0), S = W(!1), T = W({});
1356
+ let b = cl({
1358
1357
  slug: "",
1359
1358
  title: {},
1360
1359
  is_enabled: !0
1361
1360
  });
1362
- const z = q({}), u = W(() => s.can("inbox.manage")), _ = W(() => Number(n.params.id)), b = W(
1363
- () => m.value === null ? "" : me(S.title, d.active.value, S.slug)
1364
- ), L = W(() => `${o.base}?form=${_.value}`);
1365
- async function k() {
1366
- N.value = !0;
1361
+ const q = W({}), c = F(() => o.can("inbox.manage")), U = F(() => Number(n.params.id)), f = F(
1362
+ () => p.value === null ? "" : pe(b.title, m.active.value, b.slug)
1363
+ ), I = F(() => `${s.base}?form=${U.value}`);
1364
+ async function w() {
1365
+ O.value = !0;
1367
1366
  try {
1368
- const A = await v.form(_.value);
1369
- m.value = A, c.value = A.fields ?? [], S.slug = A.slug, S.title = { ...A.title }, S.is_enabled = A.is_enabled, z.value = { ...A.options };
1370
- } catch (A) {
1371
- E.danger(C(A)), r.replace(o.base);
1367
+ const M = await v.form(U.value);
1368
+ p.value = M, i.value = M.fields ?? [], b.slug = M.slug, b.title = { ...M.title }, b.is_enabled = M.is_enabled, q.value = { ...M.options };
1369
+ } catch (M) {
1370
+ E.danger($(M)), d.replace(s.base);
1372
1371
  } finally {
1373
- N.value = !1;
1372
+ O.value = !1;
1374
1373
  }
1375
1374
  }
1376
- Ue(_, () => {
1377
- k();
1375
+ Se(U, () => {
1376
+ w();
1378
1377
  }, { immediate: !0 });
1379
- async function R() {
1380
- f.value = !0, T.value = {};
1378
+ async function P() {
1379
+ S.value = !0, T.value = {};
1381
1380
  try {
1382
- const A = await v.saveForm(_.value, {
1383
- slug: S.slug.trim(),
1384
- title: S.title,
1385
- is_enabled: S.is_enabled,
1386
- options: z.value
1381
+ const M = await v.saveForm(U.value, {
1382
+ slug: b.slug.trim(),
1383
+ title: b.title,
1384
+ is_enabled: b.is_enabled,
1385
+ options: q.value
1387
1386
  });
1388
- m.value = A, E.success(l("panel.saved"));
1389
- } catch (A) {
1390
- const V = A.body;
1391
- V?.errors ? (T.value = V.errors, E.danger(l("panel.failed"))) : E.danger(C(A));
1387
+ p.value = M, E.success(l("panel.saved"));
1388
+ } catch (M) {
1389
+ const A = M.body;
1390
+ A?.errors ? (T.value = A.errors, E.danger(l("panel.failed"))) : E.danger($(M));
1392
1391
  } finally {
1393
- f.value = !1;
1392
+ S.value = !1;
1394
1393
  }
1395
1394
  }
1396
- return (A, V) => (p(), K("div", Xl, [
1397
- N.value ? (p(), g(e(se), { key: 0 }, {
1395
+ return (M, A) => (u(), j("div", Xl, [
1396
+ O.value ? (u(), _(e(se), { key: 0 }, {
1398
1397
  default: a(() => [
1399
- t(e(Re), {
1398
+ t(e(Fe), {
1400
1399
  title: "",
1401
1400
  rows: 8
1402
1401
  })
1403
1402
  ]),
1404
1403
  _: 1
1405
- })) : m.value ? (p(), K(ee, { key: 1 }, [
1406
- t(e(Ke), {
1404
+ })) : p.value ? (u(), j(ee, { key: 1 }, [
1405
+ t(e(Ye), {
1407
1406
  class: "wx-inbox-editor__head",
1408
- title: b.value,
1409
- subtitle: m.value.slug,
1410
- back: L.value,
1407
+ title: f.value,
1408
+ subtitle: p.value.slug,
1409
+ back: I.value,
1411
1410
  "back-label": e(l)("panel.forms")
1412
1411
  }, {
1413
1412
  "title-after": a(() => [
1414
- e(S).is_enabled ? P("", !0) : (p(), g(e(ke), {
1413
+ e(b).is_enabled ? H("", !0) : (u(), _(e(Ue), {
1415
1414
  key: 0,
1416
1415
  type: "default"
1417
1416
  }, {
1418
1417
  default: a(() => [
1419
- F(w(e(l)("panel.off")), 1)
1418
+ z(k(e(l)("panel.off")), 1)
1420
1419
  ]),
1421
1420
  _: 1
1422
1421
  }))
@@ -1433,11 +1432,11 @@ const Ol = /* @__PURE__ */ ae({
1433
1432
  label: e(l)("panel.tab-general")
1434
1433
  }, {
1435
1434
  default: a(() => [
1436
- t(Zl, {
1437
- settings: e(S),
1438
- "onUpdate:settings": V[0] || (V[0] = (D) => ne(S) ? S.value = D : S = D),
1439
- options: z.value,
1440
- "onUpdate:options": V[1] || (V[1] = (D) => z.value = D),
1435
+ t(Yl, {
1436
+ settings: e(b),
1437
+ "onUpdate:settings": A[0] || (A[0] = (C) => ne(b) ? b.value = C : b = C),
1438
+ options: q.value,
1439
+ "onUpdate:options": A[1] || (A[1] = (C) => q.value = C),
1441
1440
  errors: T.value
1442
1441
  }, null, 8, ["settings", "options", "errors"])
1443
1442
  ]),
@@ -1448,11 +1447,11 @@ const Ol = /* @__PURE__ */ ae({
1448
1447
  label: e(l)("panel.tab-fields")
1449
1448
  }, {
1450
1449
  default: a(() => [
1451
- t(El, {
1452
- modelValue: c.value,
1453
- "onUpdate:modelValue": V[2] || (V[2] = (D) => c.value = D),
1454
- form: m.value,
1455
- "can-manage": u.value
1450
+ t(Ol, {
1451
+ modelValue: i.value,
1452
+ "onUpdate:modelValue": A[2] || (A[2] = (C) => i.value = C),
1453
+ form: p.value,
1454
+ "can-manage": c.value
1456
1455
  }, null, 8, ["modelValue", "form", "can-manage"])
1457
1456
  ]),
1458
1457
  _: 1
@@ -1463,9 +1462,9 @@ const Ol = /* @__PURE__ */ ae({
1463
1462
  }, {
1464
1463
  default: a(() => [
1465
1464
  t(Jl, {
1466
- modelValue: z.value,
1467
- "onUpdate:modelValue": V[3] || (V[3] = (D) => z.value = D),
1468
- fields: c.value,
1465
+ modelValue: q.value,
1466
+ "onUpdate:modelValue": A[3] || (A[3] = (C) => q.value = C),
1467
+ fields: i.value,
1469
1468
  errors: T.value
1470
1469
  }, null, 8, ["modelValue", "fields", "errors"])
1471
1470
  ]),
@@ -1476,9 +1475,9 @@ const Ol = /* @__PURE__ */ ae({
1476
1475
  label: e(l)("panel.tab-antispam")
1477
1476
  }, {
1478
1477
  default: a(() => [
1479
- t(Ol, {
1480
- modelValue: z.value,
1481
- "onUpdate:modelValue": V[4] || (V[4] = (D) => z.value = D)
1478
+ t(El, {
1479
+ modelValue: q.value,
1480
+ "onUpdate:modelValue": A[4] || (A[4] = (C) => q.value = C)
1482
1481
  }, null, 8, ["modelValue"])
1483
1482
  ]),
1484
1483
  _: 1
@@ -1489,9 +1488,9 @@ const Ol = /* @__PURE__ */ ae({
1489
1488
  }, {
1490
1489
  default: a(() => [
1491
1490
  t(Gl, {
1492
- form: m.value,
1493
- slug: e(S).slug,
1494
- fields: c.value
1491
+ form: p.value,
1492
+ slug: e(b).slug,
1493
+ fields: i.value
1495
1494
  }, null, 8, ["form", "slug", "fields"])
1496
1495
  ]),
1497
1496
  _: 1
@@ -1499,76 +1498,76 @@ const Ol = /* @__PURE__ */ ae({
1499
1498
  ]),
1500
1499
  _: 1
1501
1500
  }),
1502
- u.value ? (p(), g(e(bl), { key: 0 }, {
1501
+ c.value ? (u(), _(e(bl), { key: 0 }, {
1503
1502
  default: a(() => [
1504
- t(e(oe), {
1503
+ t(e(le), {
1505
1504
  type: "primary",
1506
- loading: f.value,
1507
- onClick: R
1505
+ loading: S.value,
1506
+ onClick: P
1508
1507
  }, {
1509
1508
  default: a(() => [
1510
- F(w(e(l)("panel.save")), 1)
1509
+ z(k(e(l)("panel.save")), 1)
1511
1510
  ]),
1512
1511
  _: 1
1513
1512
  }, 8, ["loading"])
1514
1513
  ]),
1515
1514
  _: 1
1516
- })) : P("", !0)
1517
- ], 64)) : P("", !0)
1515
+ })) : H("", !0)
1516
+ ], 64)) : H("", !0)
1518
1517
  ]));
1519
1518
  }
1520
- }), lt = /* @__PURE__ */ ue(et, [["__scopeId", "data-v-11c10bb6"]]), tt = { class: "wx-inbox-create" }, at = /* @__PURE__ */ ae({
1519
+ }), lt = /* @__PURE__ */ ie(et, [["__scopeId", "data-v-11c10bb6"]]), tt = { class: "wx-inbox-create" }, at = /* @__PURE__ */ ae({
1521
1520
  __name: "FormCreateDialog",
1522
- setup(i) {
1523
- const { resolve: o, dismiss: s, open: v } = Ee(), n = ie(), r = re(n);
1521
+ setup(r) {
1522
+ const { resolve: s, dismiss: o, open: v } = Ee(), n = oe(), d = re(n);
1524
1523
  de();
1525
- const d = te("webx-inbox"), l = ve(), C = q({}), m = q(""), c = q(!1), N = q({});
1526
- function f(S) {
1527
- return N.value[S]?.[0];
1524
+ const m = te("webx-inbox"), l = me(), $ = W({}), p = W(""), i = W(!1), O = W({});
1525
+ function S(b) {
1526
+ return O.value[b]?.[0];
1528
1527
  }
1529
1528
  async function T() {
1530
- c.value = !0, N.value = {};
1529
+ i.value = !0, O.value = {};
1531
1530
  try {
1532
- o(
1533
- await r.createForm({
1534
- title: C.value,
1535
- slug: m.value.trim(),
1531
+ s(
1532
+ await d.createForm({
1533
+ title: $.value,
1534
+ slug: p.value.trim(),
1536
1535
  is_enabled: !0,
1537
1536
  options: {}
1538
1537
  })
1539
1538
  );
1540
- } catch (S) {
1541
- const z = S.body;
1542
- z?.errors ? (N.value = z.errors, E.danger(d("panel.failed"))) : E.danger(l(S));
1539
+ } catch (b) {
1540
+ const q = b.body;
1541
+ q?.errors ? (O.value = q.errors, E.danger(m("panel.failed"))) : E.danger(l(b));
1543
1542
  } finally {
1544
- c.value = !1;
1543
+ i.value = !1;
1545
1544
  }
1546
1545
  }
1547
- return (S, z) => (p(), g(e(Oe), {
1546
+ return (b, q) => (u(), _(e(Pe), {
1548
1547
  open: e(v),
1549
- "onUpdate:open": z[3] || (z[3] = (u) => ne(v) ? v.value = u : null),
1550
- title: e(d)("panel.new-form-title"),
1548
+ "onUpdate:open": q[3] || (q[3] = (c) => ne(v) ? v.value = c : null),
1549
+ title: e(m)("panel.new-form-title"),
1551
1550
  width: 520
1552
1551
  }, {
1553
1552
  footer: a(() => [
1554
- t(e(Fe), { size: "sm" }, {
1553
+ t(e(We), { size: "sm" }, {
1555
1554
  default: a(() => [
1556
- t(e(oe), {
1555
+ t(e(le), {
1557
1556
  variant: "outline",
1558
- onClick: z[2] || (z[2] = (u) => e(s)())
1557
+ onClick: q[2] || (q[2] = (c) => e(o)())
1559
1558
  }, {
1560
1559
  default: a(() => [
1561
- F(w(e(d)("panel.cancel")), 1)
1560
+ z(k(e(m)("panel.cancel")), 1)
1562
1561
  ]),
1563
1562
  _: 1
1564
1563
  }),
1565
- t(e(oe), {
1564
+ t(e(le), {
1566
1565
  type: "primary",
1567
- loading: c.value,
1566
+ loading: i.value,
1568
1567
  onClick: T
1569
1568
  }, {
1570
1569
  default: a(() => [
1571
- F(w(e(d)("panel.save")), 1)
1570
+ z(k(e(m)("panel.save")), 1)
1572
1571
  ]),
1573
1572
  _: 1
1574
1573
  }, 8, ["loading"])
@@ -1577,31 +1576,31 @@ const Ol = /* @__PURE__ */ ae({
1577
1576
  })
1578
1577
  ]),
1579
1578
  default: a(() => [
1580
- j("div", tt, [
1581
- t(e(G), {
1582
- label: e(d)("panel.title"),
1583
- error: f("title"),
1579
+ G("div", tt, [
1580
+ t(e(B), {
1581
+ label: e(m)("panel.title"),
1582
+ error: S("title"),
1584
1583
  required: ""
1585
1584
  }, {
1586
1585
  default: a(() => [
1587
1586
  t(e(X), {
1588
- modelValue: C.value,
1589
- "onUpdate:modelValue": z[0] || (z[0] = (u) => C.value = u),
1587
+ modelValue: $.value,
1588
+ "onUpdate:modelValue": q[0] || (q[0] = (c) => $.value = c),
1590
1589
  localized: "",
1591
1590
  autofocus: ""
1592
1591
  }, null, 8, ["modelValue"])
1593
1592
  ]),
1594
1593
  _: 1
1595
1594
  }, 8, ["label", "error"]),
1596
- t(e(G), {
1597
- label: e(d)("panel.slug"),
1598
- help: e(d)("panel.slug-help"),
1599
- error: f("slug")
1595
+ t(e(B), {
1596
+ label: e(m)("panel.slug"),
1597
+ help: e(m)("panel.slug-help"),
1598
+ error: S("slug")
1600
1599
  }, {
1601
1600
  default: a(() => [
1602
1601
  t(e(X), {
1603
- modelValue: m.value,
1604
- "onUpdate:modelValue": z[1] || (z[1] = (u) => m.value = u),
1602
+ modelValue: p.value,
1603
+ "onUpdate:modelValue": q[1] || (q[1] = (c) => p.value = c),
1605
1604
  placeholder: "contact"
1606
1605
  }, null, 8, ["modelValue"])
1607
1606
  ]),
@@ -1612,84 +1611,84 @@ const Ol = /* @__PURE__ */ ae({
1612
1611
  _: 1
1613
1612
  }, 8, ["open", "title"]));
1614
1613
  }
1615
- }), nt = /* @__PURE__ */ ue(at, [["__scopeId", "data-v-55fb40d8"]]), st = { class: "wx-inbox-by-hand" }, ot = /* @__PURE__ */ ae({
1614
+ }), nt = /* @__PURE__ */ ie(at, [["__scopeId", "data-v-55fb40d8"]]), st = { class: "wx-inbox-by-hand" }, ot = /* @__PURE__ */ ae({
1616
1615
  __name: "SubmissionCreateDialog",
1617
1616
  props: {
1618
1617
  form: {}
1619
1618
  },
1620
- setup(i) {
1621
- const o = i, { resolve: s, dismiss: v, open: n } = Ee(), r = ie(), d = re(r), l = xe();
1619
+ setup(r) {
1620
+ const s = r, { resolve: o, dismiss: v, open: n } = Ee(), d = oe(), m = re(d), l = xe();
1622
1621
  de();
1623
- const C = te("webx-inbox"), m = ve(), c = q([]), N = q(!0), f = q(!1), T = q({}), S = q({}), z = W(() => c.value.filter((V) => V.type !== "file")), u = W(() => c.value.some((V) => V.type === "file"));
1624
- function _(V) {
1625
- return S.value[`fields.${V.key}`]?.[0];
1622
+ const $ = te("webx-inbox"), p = me(), i = W([]), O = W(!0), S = W(!1), T = W({}), b = W({}), q = F(() => i.value.filter((A) => A.type !== "file")), c = F(() => i.value.some((A) => A.type === "file"));
1623
+ function U(A) {
1624
+ return b.value[`fields.${A.key}`]?.[0];
1626
1625
  }
1627
- function b(V) {
1628
- return me(V.title, l.active.value, V.key);
1626
+ function f(A) {
1627
+ return pe(A.title, l.active.value, A.key);
1629
1628
  }
1630
- function L(V, D = "") {
1631
- return me(
1632
- V,
1629
+ function I(A, C = "") {
1630
+ return pe(
1631
+ A,
1633
1632
  l.active.value,
1634
- D
1633
+ C
1635
1634
  );
1636
1635
  }
1637
- function k(V) {
1638
- return (V.options.choices ?? []).map((D) => ({
1639
- value: D.value,
1640
- label: L(D.label, D.value)
1636
+ function w(A) {
1637
+ return (A.options.choices ?? []).map((C) => ({
1638
+ value: C.value,
1639
+ label: I(C.label, C.value)
1641
1640
  }));
1642
1641
  }
1643
- async function R() {
1642
+ async function P() {
1644
1643
  try {
1645
- const V = await d.form(o.form.id);
1646
- c.value = (V.fields ?? []).filter((D) => D.is_enabled);
1647
- for (const D of c.value)
1648
- T.value[D.key] = D.type === "checkbox" ? [] : D.type === "consent" ? !1 : "";
1649
- } catch (V) {
1650
- E.danger(m(V));
1644
+ const A = await m.form(s.form.id);
1645
+ i.value = (A.fields ?? []).filter((C) => C.is_enabled);
1646
+ for (const C of i.value)
1647
+ T.value[C.key] = C.type === "checkbox" ? [] : C.type === "consent" ? !1 : "";
1648
+ } catch (A) {
1649
+ E.danger(p(A));
1651
1650
  } finally {
1652
- N.value = !1;
1651
+ O.value = !1;
1653
1652
  }
1654
1653
  }
1655
- R();
1656
- async function A() {
1657
- f.value = !0, S.value = {};
1654
+ P();
1655
+ async function M() {
1656
+ S.value = !0, b.value = {};
1658
1657
  try {
1659
- s(await d.createSubmission(o.form.id, T.value));
1660
- } catch (V) {
1661
- const D = V.body;
1662
- D?.errors ? (S.value = D.errors, E.danger(C("panel.failed"))) : E.danger(m(V));
1658
+ o(await m.createSubmission(s.form.id, T.value));
1659
+ } catch (A) {
1660
+ const C = A.body;
1661
+ C?.errors ? (b.value = C.errors, E.danger($("panel.failed"))) : E.danger(p(A));
1663
1662
  } finally {
1664
- f.value = !1;
1663
+ S.value = !1;
1665
1664
  }
1666
1665
  }
1667
- return (V, D) => (p(), g(e(Oe), {
1666
+ return (A, C) => (u(), _(e(Pe), {
1668
1667
  open: e(n),
1669
- "onUpdate:open": D[1] || (D[1] = (y) => ne(n) ? n.value = y : null),
1670
- title: e(C)("panel.new-submission-title"),
1668
+ "onUpdate:open": C[1] || (C[1] = (g) => ne(n) ? n.value = g : null),
1669
+ title: e($)("panel.new-submission-title"),
1671
1670
  width: 560
1672
1671
  }, {
1673
1672
  footer: a(() => [
1674
- t(e(Fe), { size: "sm" }, {
1673
+ t(e(We), { size: "sm" }, {
1675
1674
  default: a(() => [
1676
- t(e(oe), {
1675
+ t(e(le), {
1677
1676
  variant: "outline",
1678
- onClick: D[0] || (D[0] = (y) => e(v)())
1677
+ onClick: C[0] || (C[0] = (g) => e(v)())
1679
1678
  }, {
1680
1679
  default: a(() => [
1681
- F(w(e(C)("panel.cancel")), 1)
1680
+ z(k(e($)("panel.cancel")), 1)
1682
1681
  ]),
1683
1682
  _: 1
1684
1683
  }),
1685
- t(e(oe), {
1684
+ t(e(le), {
1686
1685
  type: "primary",
1687
- loading: f.value,
1688
- disabled: N.value,
1689
- onClick: A
1686
+ loading: S.value,
1687
+ disabled: O.value,
1688
+ onClick: M
1690
1689
  }, {
1691
1690
  default: a(() => [
1692
- F(w(e(C)("panel.save")), 1)
1691
+ z(k(e($)("panel.save")), 1)
1693
1692
  ]),
1694
1693
  _: 1
1695
1694
  }, 8, ["loading", "disabled"])
@@ -1698,133 +1697,132 @@ const Ol = /* @__PURE__ */ ae({
1698
1697
  })
1699
1698
  ]),
1700
1699
  default: a(() => [
1701
- j("div", st, [
1702
- t(e(Ne), {
1700
+ G("div", st, [
1701
+ t(e(De), {
1703
1702
  type: "info",
1704
1703
  closable: !1
1705
1704
  }, {
1706
1705
  default: a(() => [
1707
- F(w(e(C)("panel.new-submission-help")), 1)
1706
+ z(k(e($)("panel.new-submission-help")), 1)
1708
1707
  ]),
1709
1708
  _: 1
1710
1709
  }),
1711
- N.value ? (p(), g(e(Re), {
1710
+ O.value ? (u(), _(e(Fe), {
1712
1711
  key: 0,
1713
1712
  rows: 4
1714
- })) : (p(), K(ee, { key: 1 }, [
1715
- (p(!0), K(ee, null, we(z.value, (y) => (p(), g(e(G), {
1716
- key: y.id,
1717
- label: b(y),
1718
- help: L(y.help),
1719
- error: _(y),
1720
- required: y.is_required
1713
+ })) : (u(), j(ee, { key: 1 }, [
1714
+ (u(!0), j(ee, null, we(q.value, (g) => (u(), _(e(B), {
1715
+ key: g.id,
1716
+ label: f(g),
1717
+ help: I(g.help),
1718
+ error: U(g),
1719
+ required: g.is_required
1721
1720
  }, {
1722
1721
  default: a(() => [
1723
- y.type === "textarea" ? (p(), g(e(hl), {
1722
+ g.type === "textarea" ? (u(), _(e(hl), {
1724
1723
  key: 0,
1725
- modelValue: T.value[y.key],
1726
- "onUpdate:modelValue": (Y) => T.value[y.key] = Y,
1727
- rows: y.options.rows ?? 4,
1728
- placeholder: L(y.placeholder)
1729
- }, null, 8, ["modelValue", "onUpdate:modelValue", "rows", "placeholder"])) : y.type === "select" ? (p(), g(e(he), {
1724
+ modelValue: T.value[g.key],
1725
+ "onUpdate:modelValue": (Q) => T.value[g.key] = Q,
1726
+ rows: g.options.rows ?? 4,
1727
+ placeholder: I(g.placeholder)
1728
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "rows", "placeholder"])) : g.type === "select" ? (u(), _(e(fe), {
1730
1729
  key: 1,
1731
- modelValue: T.value[y.key],
1732
- "onUpdate:modelValue": (Y) => T.value[y.key] = Y,
1733
- options: k(y),
1730
+ modelValue: T.value[g.key],
1731
+ "onUpdate:modelValue": (Q) => T.value[g.key] = Q,
1732
+ options: w(g),
1734
1733
  clearable: "",
1735
- placeholder: L(y.placeholder)
1736
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder"])) : y.type === "radio" ? (p(), g(e(yl), {
1734
+ placeholder: I(g.placeholder)
1735
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options", "placeholder"])) : g.type === "radio" ? (u(), _(e(yl), {
1737
1736
  key: 2,
1738
- modelValue: T.value[y.key],
1739
- "onUpdate:modelValue": (Y) => T.value[y.key] = Y,
1740
- options: k(y)
1741
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : y.type === "checkbox" ? (p(), g(e(gl), {
1737
+ modelValue: T.value[g.key],
1738
+ "onUpdate:modelValue": (Q) => T.value[g.key] = Q,
1739
+ options: w(g)
1740
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : g.type === "checkbox" ? (u(), _(e(gl), {
1742
1741
  key: 3,
1743
- modelValue: T.value[y.key],
1744
- "onUpdate:modelValue": (Y) => T.value[y.key] = Y,
1745
- options: k(y)
1746
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : y.type === "consent" ? (p(), g(e(be), {
1742
+ modelValue: T.value[g.key],
1743
+ "onUpdate:modelValue": (Q) => T.value[g.key] = Q,
1744
+ options: w(g)
1745
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : g.type === "consent" ? (u(), _(e(ve), {
1747
1746
  key: 4,
1748
- modelValue: T.value[y.key],
1749
- "onUpdate:modelValue": (Y) => T.value[y.key] = Y,
1750
- label: L(y.options.text, b(y))
1751
- }, null, 8, ["modelValue", "onUpdate:modelValue", "label"])) : y.type === "date" ? (p(), g(e(je), {
1747
+ modelValue: T.value[g.key],
1748
+ "onUpdate:modelValue": (Q) => T.value[g.key] = Q,
1749
+ label: I(g.options.text, f(g))
1750
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "label"])) : g.type === "date" ? (u(), _(e(Ke), {
1752
1751
  key: 5,
1753
- modelValue: T.value[y.key],
1754
- "onUpdate:modelValue": (Y) => T.value[y.key] = Y,
1755
- placeholder: L(y.placeholder)
1756
- }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (p(), g(e(X), {
1752
+ modelValue: T.value[g.key],
1753
+ "onUpdate:modelValue": (Q) => T.value[g.key] = Q,
1754
+ placeholder: I(g.placeholder)
1755
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])) : (u(), _(e(X), {
1757
1756
  key: 6,
1758
- modelValue: T.value[y.key],
1759
- "onUpdate:modelValue": (Y) => T.value[y.key] = Y,
1760
- type: y.type === "email" ? "email" : y.type === "tel" ? "tel" : "text",
1761
- placeholder: L(y.placeholder),
1762
- maxlength: y.options.maxlength
1757
+ modelValue: T.value[g.key],
1758
+ "onUpdate:modelValue": (Q) => T.value[g.key] = Q,
1759
+ type: g.type === "email" ? "email" : g.type === "tel" ? "tel" : "text",
1760
+ placeholder: I(g.placeholder),
1761
+ maxlength: g.options.maxlength
1763
1762
  }, null, 8, ["modelValue", "onUpdate:modelValue", "type", "placeholder", "maxlength"]))
1764
1763
  ]),
1765
1764
  _: 2
1766
1765
  }, 1032, ["label", "help", "error", "required"]))), 128)),
1767
- u.value ? (p(), g(e(Ne), {
1766
+ c.value ? (u(), _(e(De), {
1768
1767
  key: 0,
1769
1768
  type: "warning",
1770
1769
  closable: !1
1771
1770
  }, {
1772
1771
  default: a(() => [
1773
- F(w(e(C)("panel.no-files-by-hand")), 1)
1772
+ z(k(e($)("panel.no-files-by-hand")), 1)
1774
1773
  ]),
1775
1774
  _: 1
1776
- })) : P("", !0)
1775
+ })) : H("", !0)
1777
1776
  ], 64))
1778
1777
  ])
1779
1778
  ]),
1780
1779
  _: 1
1781
1780
  }, 8, ["open", "title"]));
1782
1781
  }
1783
- }), it = /* @__PURE__ */ ue(ot, [["__scopeId", "data-v-72006299"]]), ut = { class: "wx-submissions__mass" }, rt = { class: "wx-submissions__state" }, dt = 640, ct = /* @__PURE__ */ ae({
1782
+ }), it = /* @__PURE__ */ ie(ot, [["__scopeId", "data-v-72006299"]]), ut = { class: "wx-submissions__mass" }, rt = { class: "wx-submissions__state" }, dt = 640, ct = /* @__PURE__ */ ae({
1784
1783
  __name: "SubmissionList",
1785
1784
  props: {
1786
1785
  form: {},
1787
- base: { default: "/inbox" },
1788
- inline: { type: Boolean, default: !0 }
1786
+ base: { default: "/inbox" }
1789
1787
  },
1790
- emits: ["back", "changed"],
1791
- setup(i, { emit: o }) {
1792
- const s = i, v = o, n = ie(), r = re(n), d = De(), l = Le(), C = xe();
1788
+ emits: ["changed"],
1789
+ setup(r, { expose: s, emit: o }) {
1790
+ const v = r, n = o, d = oe(), m = re(d), l = Le(), $ = Oe(), p = xe();
1793
1791
  de();
1794
- const m = cl("root"), c = xl(m), N = W(() => c.value > 0 && c.value < dt), f = te("webx-inbox"), T = ve(), S = q(null), z = q([]), u = q(!1), _ = q([]), b = q(!1), L = W(() => n.can("inbox.update")), k = W(() => n.can("inbox.manage")), R = Pe(it), A = W({
1795
- get: () => typeof d.query.view == "string" && d.query.view !== "" ? d.query.view : "all",
1796
- set: (x) => {
1797
- l.replace({
1798
- query: { ...d.query, view: x === "all" ? void 0 : x, page: void 0 }
1792
+ const i = nl("root"), O = xl(i), S = F(() => O.value > 0 && O.value < dt), T = F(() => S.value ? Number.POSITIVE_INFINITY : 0), b = te("webx-inbox"), q = me(), c = W(null), U = W([]), f = W(!1), I = W([]), w = W(!1), P = F(() => d.can("inbox.update")), M = Re(it), A = F({
1793
+ get: () => typeof l.query.view == "string" && l.query.view !== "" ? l.query.view : "all",
1794
+ set: (V) => {
1795
+ $.replace({
1796
+ query: { ...l.query, view: V === "all" ? void 0 : V, page: void 0 }
1799
1797
  });
1800
1798
  }
1801
- }), V = W(() => ({
1799
+ }), C = F(() => ({
1802
1800
  view: A.value,
1803
- search: typeof d.query.search == "string" ? d.query.search : "",
1804
- assignee: typeof d.query.assignee == "string" ? d.query.assignee : null,
1805
- sort: typeof d.query.sort == "string" ? d.query.sort : null,
1806
- page: Number(d.query.page ?? 1) || 1
1807
- })), D = W(() => {
1808
- const x = S.value?.counts, Z = [
1809
- { value: "all", label: f("panel.view-all"), badge: x?.all || void 0 },
1810
- { value: "unread", label: f("panel.view-unread"), badge: x?.unread || void 0 }
1801
+ search: typeof l.query.search == "string" ? l.query.search : "",
1802
+ assignee: typeof l.query.assignee == "string" ? l.query.assignee : null,
1803
+ sort: typeof l.query.sort == "string" ? l.query.sort : null,
1804
+ page: Number(l.query.page ?? 1) || 1
1805
+ })), g = F(() => {
1806
+ const V = c.value?.counts, Z = [
1807
+ { value: "all", label: b("panel.view-all"), badge: V?.all || void 0 },
1808
+ { value: "unread", label: b("panel.view-unread"), badge: V?.unread || void 0 }
1811
1809
  ];
1812
- for (const I of z.value)
1810
+ for (const L of U.value)
1813
1811
  Z.push({
1814
- value: I.key,
1815
- label: B(I),
1816
- badge: x?.statuses[I.key] || void 0
1812
+ value: L.key,
1813
+ label: K(L),
1814
+ badge: V?.statuses[L.key] || void 0
1817
1815
  });
1818
1816
  return Z;
1819
1817
  });
1820
- function y(x, Z) {
1821
- const I = S.value?.columns?.[Z];
1822
- return I ? x.values[I.key] ?? "" : "";
1823
- }
1824
- const Y = W(() => {
1825
- const x = S.value?.columns ?? [];
1826
- return N.value ? [{ key: "card", label: "" }] : [
1827
- ...x.map((Z, I) => ({
1818
+ function Q(V, Z) {
1819
+ const L = c.value?.columns?.[Z];
1820
+ return L ? V.values[L.key] ?? "" : "";
1821
+ }
1822
+ const be = F(() => {
1823
+ const V = c.value?.columns ?? [];
1824
+ return S.value ? [{ key: "card", label: "" }] : [
1825
+ ...V.map((Z, L) => ({
1828
1826
  key: `values.${Z.key}`,
1829
1827
  label: Z.label,
1830
1828
  sortable: !0,
@@ -1833,15 +1831,15 @@ const Ol = /* @__PURE__ */ ae({
1833
1831
  // wide — 640, 960 — because an answer is a sentence and not a number: two of them plus
1834
1832
  // the status and the date is already what a 755px pane holds without scrolling sideways,
1835
1833
  // which is what the pane beside the forms actually is on a 1280 screen (§11).
1836
- hideBelow: I === 0 ? void 0 : 320 + I * 320
1834
+ hideBelow: L === 0 ? void 0 : 320 + L * 320
1837
1835
  })),
1838
1836
  // A floor rather than a width: the cell holds a badge, sometimes an avatar and sometimes
1839
1837
  // a paperclip, and a fixed width that any of them overflows makes the whole table scroll
1840
1838
  // sideways by two pixels.
1841
- { key: "status", label: f("panel.status"), minWidth: 100 },
1839
+ { key: "status", label: b("panel.status"), minWidth: 100 },
1842
1840
  {
1843
1841
  key: "created_at",
1844
- label: f("panel.received"),
1842
+ label: b("panel.received"),
1845
1843
  sortable: !0,
1846
1844
  width: 120,
1847
1845
  // "today at 16:22" is three words the table will break over two lines given half a
@@ -1853,294 +1851,279 @@ const Ol = /* @__PURE__ */ ae({
1853
1851
  },
1854
1852
  { key: "actions", label: "", width: pl, align: "right", hideOnCards: !0 }
1855
1853
  ];
1856
- }), M = W(
1857
- () => V.value.view === "all" && V.value.search === "" && V.value.assignee === null ? f("panel.submissions-empty") : f("panel.submissions-none")
1858
- ), le = W(
1859
- () => z.value.map((x) => ({ value: x.id, label: B(x) }))
1854
+ }), he = F(
1855
+ () => C.value.view === "all" && C.value.search === "" && C.value.assignee === null ? b("panel.submissions-empty") : b("panel.submissions-none")
1856
+ ), N = F(
1857
+ () => U.value.map((V) => ({ value: V.id, label: K(V) }))
1860
1858
  );
1861
- function B(x) {
1862
- return me(x.title, C.active.value, x.key);
1859
+ function K(V) {
1860
+ return pe(V.title, p.active.value, V.key);
1863
1861
  }
1864
- function ye() {
1865
- return me(s.form.title, C.active.value, s.form.slug);
1862
+ function D() {
1863
+ return pe(v.form.title, p.active.value, v.form.slug);
1866
1864
  }
1867
- async function O(x) {
1868
- u.value = !0;
1865
+ async function x(V) {
1866
+ f.value = !0;
1869
1867
  try {
1870
- S.value = await r.submissions(s.form.id, {
1871
- view: V.value.view,
1872
- search: x?.search ?? V.value.search,
1873
- assignee: V.value.assignee,
1874
- sort: x?.sort ? `${x.sort.order === "desc" ? "-" : ""}${x.sort.key}` : null,
1875
- page: x?.page ?? V.value.page,
1876
- per_page: x?.perPage
1868
+ c.value = await m.submissions(v.form.id, {
1869
+ view: C.value.view,
1870
+ search: V?.search ?? C.value.search,
1871
+ assignee: C.value.assignee,
1872
+ sort: V?.sort ? `${V.sort.order === "desc" ? "-" : ""}${V.sort.key}` : null,
1873
+ page: V?.page ?? C.value.page,
1874
+ per_page: V?.perPage
1877
1875
  });
1878
1876
  } catch (Z) {
1879
- E.danger(T(Z));
1877
+ E.danger(q(Z));
1880
1878
  } finally {
1881
- u.value = !1;
1879
+ f.value = !1;
1882
1880
  }
1883
1881
  }
1884
- function $(x) {
1882
+ function h(V) {
1885
1883
  const Z = {
1886
- ...d.query,
1887
- search: x.search === "" ? void 0 : x.search,
1888
- sort: x.sort === null ? void 0 : `${x.sort.order === "desc" ? "-" : ""}${x.sort.key}`,
1889
- page: x.page === 1 ? void 0 : String(x.page)
1884
+ ...l.query,
1885
+ search: V.search === "" ? void 0 : V.search,
1886
+ sort: V.sort === null ? void 0 : `${V.sort.order === "desc" ? "-" : ""}${V.sort.key}`,
1887
+ page: V.page === 1 ? void 0 : String(V.page)
1890
1888
  };
1891
- l.replace({ query: Z }), O(x);
1889
+ $.replace({ query: Z }), x(V);
1892
1890
  }
1893
- Ue(
1894
- () => [s.form.id, A.value, V.value.assignee],
1891
+ Se(
1892
+ () => [v.form.id, A.value, C.value.assignee],
1895
1893
  () => {
1896
- _.value = [], O();
1894
+ I.value = [], x();
1897
1895
  }
1898
- ), O(), U();
1899
- async function U() {
1896
+ ), x(), ue();
1897
+ async function ue() {
1900
1898
  try {
1901
- z.value = await r.statuses();
1902
- } catch (x) {
1903
- E.danger(T(x));
1899
+ U.value = await m.statuses();
1900
+ } catch (V) {
1901
+ E.danger(q(V));
1904
1902
  }
1905
1903
  }
1906
- function ce(x) {
1907
- l.push({ path: `${s.base}/submissions/${x.id}`, query: { ...d.query } });
1904
+ function ye(V) {
1905
+ $.push({ path: `${v.base}/submissions/${V.id}`, query: { ...l.query } });
1908
1906
  }
1909
- function fe(x) {
1910
- return L.value ? [
1907
+ function qe(V) {
1908
+ return P.value ? [
1911
1909
  {
1912
1910
  key: "read",
1913
- icon: x.is_read ? "eye-off" : "eye",
1914
- label: x.is_read ? f("panel.mark-unread") : f("panel.mark-read"),
1911
+ icon: V.is_read ? "eye-off" : "eye",
1912
+ label: V.is_read ? b("panel.mark-unread") : b("panel.mark-read"),
1915
1913
  run: () => {
1916
- h([x.id], x.is_read ? "unread" : "read");
1914
+ Y([V.id], V.is_read ? "unread" : "read");
1917
1915
  }
1918
1916
  },
1919
1917
  {
1920
1918
  key: "delete",
1921
1919
  icon: "trash",
1922
- label: f("panel.delete"),
1920
+ label: b("panel.delete"),
1923
1921
  danger: !0,
1924
1922
  run: () => {
1925
- qe([x.id]);
1923
+ y([V.id]);
1926
1924
  }
1927
1925
  }
1928
1926
  ] : [];
1929
1927
  }
1930
- async function Be(x) {
1931
- typeof x == "number" && (b.value = !0, await h(
1932
- _.value.map((Z) => Z.id),
1928
+ async function He(V) {
1929
+ typeof V == "number" && (w.value = !0, await Y(
1930
+ I.value.map((Z) => Z.id),
1933
1931
  "status",
1934
- x
1935
- ), b.value = !1);
1936
- }
1937
- async function qe(x) {
1938
- await Se({
1939
- title: x.length === 1 ? f("panel.delete-submission-title") : f("panel.delete-selected-title", { count: x.length }),
1940
- message: f("panel.delete-submission-text"),
1941
- confirmText: f("panel.delete"),
1942
- cancelText: f("panel.cancel"),
1932
+ V
1933
+ ), w.value = !1);
1934
+ }
1935
+ async function y(V) {
1936
+ await Ce({
1937
+ title: V.length === 1 ? b("panel.delete-submission-title") : b("panel.delete-selected-title", { count: V.length }),
1938
+ message: b("panel.delete-submission-text"),
1939
+ confirmText: b("panel.delete"),
1940
+ cancelText: b("panel.cancel"),
1943
1941
  tone: "danger"
1944
- }) && await h(x, "delete");
1942
+ }) && await Y(V, "delete");
1945
1943
  }
1946
- async function h(x, Z, I) {
1947
- if (x.length !== 0)
1944
+ async function Y(V, Z, L) {
1945
+ if (V.length !== 0)
1948
1946
  try {
1949
- await r.massSubmissions({ ids: x, action: Z, status_id: I }), _.value = [], await O(), v("changed");
1950
- } catch (Ce) {
1951
- E.danger(T(Ce));
1947
+ await m.massSubmissions({ ids: V, action: Z, status_id: L }), I.value = [], await x(), n("changed");
1948
+ } catch (ze) {
1949
+ E.danger(q(ze));
1952
1950
  }
1953
1951
  }
1954
- async function Q() {
1955
- const x = await R({ form: s.form });
1956
- x && (E.success(f("panel.created")), await O(), v("changed"), l.push({ path: `${s.base}/submissions/${x.id}`, query: { ...d.query } }));
1957
- }
1958
- const H = W(
1959
- () => r.exportUrl(s.form.id, {
1960
- view: V.value.view,
1961
- search: V.value.search,
1962
- assignee: V.value.assignee,
1963
- sort: V.value.sort
1952
+ async function R() {
1953
+ const V = await M({ form: v.form });
1954
+ V && (E.success(b("panel.created")), await x(), n("changed"), $.push({ path: `${v.base}/submissions/${V.id}`, query: { ...l.query } }));
1955
+ }
1956
+ const Ge = F(
1957
+ () => m.exportUrl(v.form.id, {
1958
+ view: C.value.view,
1959
+ search: C.value.search,
1960
+ assignee: C.value.assignee,
1961
+ sort: C.value.sort
1964
1962
  })
1965
- );
1966
- function He() {
1967
- l.push(`${s.base}/forms/${s.form.id}`);
1968
- }
1969
- const ul = W(() => {
1970
- const x = [];
1971
- return L.value && x.push({
1972
- key: "new",
1973
- label: f("panel.new-submission"),
1974
- icon: "plus",
1975
- run: () => {
1976
- Q();
1977
- }
1978
- }), x.push({ key: "export", label: f("panel.export"), icon: "download", href: H.value }), k.value && x.push({ key: "settings", label: f("panel.settings"), icon: "settings", run: He }), x;
1979
- });
1980
- return (x, Z) => (p(), K("div", {
1963
+ ), rl = F(() => [
1964
+ { key: "export", label: b("panel.export"), icon: "download", href: Ge.value }
1965
+ ]);
1966
+ return s({ create: R }), (V, Z) => (u(), j("div", {
1981
1967
  ref_key: "root",
1982
- ref: m,
1983
- class: al(["wx-submissions", { "is-pane": i.inline }])
1968
+ ref: i,
1969
+ class: "wx-submissions"
1984
1970
  }, [
1985
- t(e(Ke), {
1971
+ t(e(Ye), {
1986
1972
  class: "wx-submissions__head",
1987
1973
  level: 3,
1988
- title: ye(),
1989
- subtitle: i.form.slug,
1990
- back: !i.inline,
1991
- "back-label": e(f)("panel.forms"),
1992
- actions: ul.value,
1993
- onBack: Z[0] || (Z[0] = (I) => v("back"))
1994
- }, null, 8, ["title", "subtitle", "back", "back-label", "actions"]),
1974
+ title: D(),
1975
+ subtitle: r.form.slug,
1976
+ actions: rl.value
1977
+ }, null, 8, ["title", "subtitle", "actions"]),
1995
1978
  t(e(Qe), {
1996
1979
  modelValue: A.value,
1997
- "onUpdate:modelValue": Z[3] || (Z[3] = (I) => A.value = I),
1980
+ "onUpdate:modelValue": Z[2] || (Z[2] = (L) => A.value = L),
1998
1981
  class: "wx-submissions__views",
1999
- items: D.value,
1982
+ items: g.value,
2000
1983
  "collapse-below": 560,
2001
- "aria-label": e(f)("panel.status")
1984
+ "aria-label": e(b)("panel.status")
2002
1985
  }, {
2003
1986
  default: a(() => [
2004
- t(e(ol), {
2005
- data: S.value,
2006
- columns: Y.value,
1987
+ t(e(il), {
1988
+ data: c.value,
1989
+ columns: be.value,
2007
1990
  "row-key": "id",
2008
1991
  searchable: "",
2009
1992
  clickable: "",
2010
1993
  hover: "",
2011
1994
  flush: "",
2012
- loading: u.value,
2013
- selectable: L.value,
2014
- "row-class": (I) => I.is_read ? void 0 : "is-unread",
2015
- "search-placeholder": e(f)("panel.search-submissions"),
2016
- "empty-text": M.value,
2017
- "cards-below": 640,
2018
- onRowClick: ce,
2019
- onStateChange: $,
2020
- onSelectionChange: Z[2] || (Z[2] = (I, Ce) => _.value = Ce)
2021
- }, tl({
2022
- "cell-status": a(({ row: I }) => [
2023
- j("div", rt, [
2024
- I.status ? (p(), g(e(ke), {
1995
+ loading: f.value,
1996
+ selectable: P.value,
1997
+ "row-class": (L) => L.is_read ? void 0 : "is-unread",
1998
+ "search-placeholder": e(b)("panel.search-submissions"),
1999
+ "empty-text": he.value,
2000
+ "cards-below": T.value,
2001
+ onRowClick: ye,
2002
+ onStateChange: h,
2003
+ onSelectionChange: Z[1] || (Z[1] = (L, ze) => I.value = ze)
2004
+ }, Ie({
2005
+ "cell-status": a(({ row: L }) => [
2006
+ G("div", rt, [
2007
+ L.status ? (u(), _(e(Ue), {
2025
2008
  key: 0,
2026
- type: I.status.color
2009
+ type: L.status.color
2027
2010
  }, {
2028
2011
  default: a(() => [
2029
- F(w(B(I.status)), 1)
2012
+ z(k(K(L.status)), 1)
2030
2013
  ]),
2031
2014
  _: 2
2032
- }, 1032, ["type"])) : P("", !0),
2033
- I.assignee ? (p(), g(e(Je), {
2015
+ }, 1032, ["type"])) : H("", !0),
2016
+ L.assignee ? (u(), _(e(el), {
2034
2017
  key: 1,
2035
- name: I.assignee.name,
2036
- title: I.assignee.name,
2018
+ name: L.assignee.name,
2019
+ title: L.assignee.name,
2037
2020
  size: "xs",
2038
2021
  tone: "auto"
2039
- }, null, 8, ["name", "title"])) : P("", !0),
2040
- I.files_count > 0 ? (p(), g(e(wl), {
2022
+ }, null, 8, ["name", "title"])) : H("", !0),
2023
+ L.files_count > 0 ? (u(), _(e(wl), {
2041
2024
  key: 2,
2042
- content: e(f)("panel.attachments")
2025
+ content: e(b)("panel.attachments")
2043
2026
  }, {
2044
2027
  default: a(() => [
2045
- t(e(Te), {
2028
+ t(e(Ve), {
2046
2029
  name: "file",
2047
2030
  size: "sm"
2048
2031
  })
2049
2032
  ]),
2050
2033
  _: 1
2051
- }, 8, ["content"])) : P("", !0)
2034
+ }, 8, ["content"])) : H("", !0)
2052
2035
  ])
2053
2036
  ]),
2054
- "cell-created_at": a(({ row: I }) => [
2055
- t(e(Ie), {
2056
- value: I.created_at,
2037
+ "cell-created_at": a(({ row: L }) => [
2038
+ t(e(Ne), {
2039
+ value: L.created_at,
2057
2040
  compact: ""
2058
2041
  }, null, 8, ["value"])
2059
2042
  ]),
2060
- "cell-card": a(({ row: I }) => [
2043
+ "cell-card": a(({ row: L }) => [
2061
2044
  t(e(_l), {
2062
2045
  variant: "plain",
2063
2046
  shape: "circle",
2064
- title: y(I, 0)
2047
+ title: Q(L, 0)
2065
2048
  }, {
2066
2049
  subtitle: a(() => [
2067
- F(w(y(I, 1)), 1)
2050
+ z(k(Q(L, 1)), 1)
2068
2051
  ]),
2069
2052
  meta: a(() => [
2070
- I.status ? (p(), g(e(ke), {
2053
+ L.status ? (u(), _(e(Ue), {
2071
2054
  key: 0,
2072
- type: I.status.color,
2055
+ type: L.status.color,
2073
2056
  size: "sm"
2074
2057
  }, {
2075
2058
  default: a(() => [
2076
- F(w(B(I.status)), 1)
2059
+ z(k(K(L.status)), 1)
2077
2060
  ]),
2078
2061
  _: 2
2079
- }, 1032, ["type"])) : P("", !0),
2080
- I.assignee ? (p(), g(e(Je), {
2062
+ }, 1032, ["type"])) : H("", !0),
2063
+ L.assignee ? (u(), _(e(el), {
2081
2064
  key: 1,
2082
- name: I.assignee.name,
2083
- title: I.assignee.name,
2065
+ name: L.assignee.name,
2066
+ title: L.assignee.name,
2084
2067
  size: "xs",
2085
2068
  tone: "auto"
2086
- }, null, 8, ["name", "title"])) : P("", !0),
2087
- I.files_count > 0 ? (p(), g(e(Te), {
2069
+ }, null, 8, ["name", "title"])) : H("", !0),
2070
+ L.files_count > 0 ? (u(), _(e(Ve), {
2088
2071
  key: 2,
2089
2072
  name: "file",
2090
2073
  size: "sm"
2091
- })) : P("", !0),
2092
- t(e(Ie), {
2093
- value: I.created_at
2074
+ })) : H("", !0),
2075
+ t(e(Ne), {
2076
+ value: L.created_at
2094
2077
  }, null, 8, ["value"])
2095
2078
  ]),
2096
2079
  _: 2
2097
2080
  }, 1032, ["title"])
2098
2081
  ]),
2099
- "card-actions": a(({ row: I }) => [
2100
- t(e(ze), {
2101
- actions: fe(I),
2102
- label: String(I.id)
2082
+ "card-actions": a(({ row: L }) => [
2083
+ t(e(Te), {
2084
+ actions: qe(L),
2085
+ label: String(L.id)
2103
2086
  }, null, 8, ["actions", "label"])
2104
2087
  ]),
2105
- "cell-actions": a(({ row: I }) => [
2106
- t(e(ze), {
2107
- actions: fe(I),
2108
- label: String(I.id)
2088
+ "cell-actions": a(({ row: L }) => [
2089
+ t(e(Te), {
2090
+ actions: qe(L),
2091
+ label: String(L.id)
2109
2092
  }, null, 8, ["actions", "label"])
2110
2093
  ]),
2111
2094
  _: 2
2112
2095
  }, [
2113
- _.value.length > 0 ? {
2096
+ I.value.length > 0 ? {
2114
2097
  name: "actions",
2115
2098
  fn: a(() => [
2116
- j("div", ut, [
2099
+ G("div", ut, [
2117
2100
  t(e(J), {
2118
2101
  size: "sm",
2119
2102
  weight: "medium"
2120
2103
  }, {
2121
2104
  default: a(() => [
2122
- F(w(e(f)("panel.selected", { count: _.value.length })), 1)
2105
+ z(k(e(b)("panel.selected", { count: I.value.length })), 1)
2123
2106
  ]),
2124
2107
  _: 1
2125
2108
  }),
2126
- t(e(he), {
2109
+ t(e(fe), {
2127
2110
  "model-value": null,
2128
- options: le.value,
2129
- placeholder: e(f)("panel.move-to"),
2130
- disabled: b.value,
2111
+ options: N.value,
2112
+ placeholder: e(b)("panel.move-to"),
2113
+ disabled: w.value,
2131
2114
  size: "sm",
2132
2115
  style: { width: "180px" },
2133
- "onUpdate:modelValue": Be
2116
+ "onUpdate:modelValue": He
2134
2117
  }, null, 8, ["options", "placeholder", "disabled"]),
2135
- t(e(oe), {
2118
+ t(e(le), {
2136
2119
  size: "sm",
2137
2120
  variant: "outline",
2138
2121
  type: "danger",
2139
2122
  icon: "trash",
2140
- onClick: Z[1] || (Z[1] = (I) => qe(_.value.map((Ce) => Ce.id)))
2123
+ onClick: Z[0] || (Z[0] = (L) => y(I.value.map((ze) => ze.id)))
2141
2124
  }, {
2142
2125
  default: a(() => [
2143
- F(w(e(f)("panel.delete")), 1)
2126
+ z(k(e(b)("panel.delete")), 1)
2144
2127
  ]),
2145
2128
  _: 1
2146
2129
  })
@@ -2148,129 +2131,126 @@ const Ol = /* @__PURE__ */ ae({
2148
2131
  ]),
2149
2132
  key: "0"
2150
2133
  } : void 0
2151
- ]), 1032, ["data", "columns", "loading", "selectable", "row-class", "search-placeholder", "empty-text"])
2134
+ ]), 1032, ["data", "columns", "loading", "selectable", "row-class", "search-placeholder", "empty-text", "cards-below"])
2152
2135
  ]),
2153
2136
  _: 1
2154
2137
  }, 8, ["modelValue", "items", "aria-label"])
2155
- ], 2));
2138
+ ], 512));
2156
2139
  }
2157
- }), pt = /* @__PURE__ */ ue(ct, [["__scopeId", "data-v-95b9683d"]]), mt = ["onClick"], vt = { class: "wx-inbox-form__name" }, ft = /* @__PURE__ */ ae({
2140
+ }), pt = /* @__PURE__ */ ie(ct, [["__scopeId", "data-v-aed84c27"]]), mt = ["onClick"], vt = { class: "wx-inbox-form__name" }, ft = /* @__PURE__ */ ae({
2158
2141
  __name: "InboxPage",
2159
2142
  props: {
2160
2143
  base: { default: "/inbox" }
2161
2144
  },
2162
- setup(i) {
2163
- const o = i, s = ie(), v = re(s), n = De(), r = Le(), d = xe();
2145
+ setup(r) {
2146
+ const s = r, o = oe(), v = re(o), n = Le(), d = Oe(), m = xe();
2164
2147
  de();
2165
- const l = te("webx-inbox"), C = ve(), m = q([]), c = q(!0), N = q(!1), f = W(() => s.can("inbox.manage")), T = Pe(nt), S = W(
2166
- () => s.state.manifest?.modules.find((M) => M.id === "inbox")?.title ?? l("module.title")
2167
- ), z = W(() => {
2168
- const M = n.query.form;
2169
- return typeof M == "string" && M !== "" ? Number(M) : null;
2170
- }), u = W(() => m.value.find((M) => M.id === z.value) ?? null);
2171
- function _(M) {
2172
- return me(M.title, d.active.value, M.slug);
2173
- }
2174
- async function b() {
2175
- c.value = !0;
2148
+ const l = te("webx-inbox"), $ = me(), p = W([]), i = W(!0), O = nl("pane"), S = W(!0), T = W(!1), b = F(() => o.can("inbox.manage")), q = Re(nt), c = F(
2149
+ () => o.state.manifest?.modules.find((N) => N.id === "inbox")?.title ?? l("module.title")
2150
+ ), U = F(() => {
2151
+ const N = n.query.form;
2152
+ return typeof N == "string" && N !== "" ? Number(N) : null;
2153
+ }), f = F(() => p.value.find((N) => N.id === U.value) ?? null);
2154
+ function I(N) {
2155
+ return pe(N.title, m.active.value, N.slug);
2156
+ }
2157
+ async function w() {
2158
+ i.value = !0;
2176
2159
  try {
2177
- m.value = await v.forms();
2178
- } catch (M) {
2179
- E.danger(C(M));
2160
+ p.value = await v.forms();
2161
+ } catch (N) {
2162
+ E.danger($(N));
2180
2163
  } finally {
2181
- c.value = !1;
2164
+ i.value = !1;
2182
2165
  }
2183
2166
  }
2184
- b(), Ue(u, (M) => {
2185
- M !== null && (N.value = !0);
2167
+ w(), Se([p, f], () => {
2168
+ p.value.length === 0 || f.value !== null || d.replace({ query: { ...n.query, form: String(p.value[0].id) } });
2186
2169
  });
2187
- function L(M) {
2188
- r.replace({ query: { ...n.query, form: String(M.id) } }), N.value = !0;
2170
+ function P(N, K) {
2171
+ d.replace({ query: { ...n.query, form: String(N.id) } }), K();
2189
2172
  }
2190
- function k(M) {
2191
- r.push(`${o.base}/forms/${M.id}`);
2173
+ function M(N) {
2174
+ d.push(`${s.base}/forms/${N.id}`);
2192
2175
  }
2193
- function R(M) {
2194
- return f.value ? [
2195
- { key: "settings", icon: "settings", label: l("panel.settings"), run: () => k(M) },
2196
- { key: "duplicate", icon: "copy", label: l("panel.duplicate"), run: () => V(M) },
2176
+ function A(N) {
2177
+ return b.value ? [
2178
+ { key: "settings", icon: "settings", label: l("panel.settings"), run: () => M(N) },
2179
+ { key: "duplicate", icon: "copy", label: l("panel.duplicate"), run: () => g(N) },
2197
2180
  // A form that has taken submissions is switched off, never deleted (§2.4). The line is
2198
2181
  // left out rather than greyed: a menu is a list of what is possible.
2199
- ...M.submissions_count === 0 ? [
2182
+ ...N.submissions_count === 0 ? [
2200
2183
  {
2201
2184
  key: "delete",
2202
2185
  icon: "trash",
2203
2186
  label: l("panel.delete"),
2204
2187
  danger: !0,
2205
- run: () => D(M)
2188
+ run: () => Q(N)
2206
2189
  }
2207
2190
  ] : []
2208
2191
  ] : [];
2209
2192
  }
2210
- async function A() {
2211
- const M = await T({});
2212
- M && (await b(), k(M));
2193
+ async function C() {
2194
+ const N = await q({});
2195
+ N && (await w(), M(N));
2213
2196
  }
2214
- async function V(M) {
2197
+ async function g(N) {
2215
2198
  try {
2216
- const le = await v.duplicateForm(M.id);
2217
- E.success(l("panel.duplicated")), await b(), k(le);
2218
- } catch (le) {
2219
- E.danger(C(le));
2199
+ const K = await v.duplicateForm(N.id);
2200
+ E.success(l("panel.duplicated")), await w(), M(K);
2201
+ } catch (K) {
2202
+ E.danger($(K));
2220
2203
  }
2221
2204
  }
2222
- async function D(M) {
2223
- if (await Se({
2224
- title: l("panel.delete-form-title", { form: _(M) }),
2205
+ async function Q(N) {
2206
+ if (await Ce({
2207
+ title: l("panel.delete-form-title", { form: I(N) }),
2225
2208
  message: l("panel.delete-form-text"),
2226
2209
  confirmText: l("panel.delete"),
2227
2210
  cancelText: l("panel.cancel"),
2228
2211
  tone: "danger"
2229
2212
  }))
2230
2213
  try {
2231
- if (await v.removeForm(M.id), E.success(l("panel.deleted")), z.value === M.id) {
2232
- const B = { ...n.query };
2233
- delete B.form, r.replace({ query: B }), N.value = !1;
2214
+ if (await v.removeForm(N.id), E.success(l("panel.deleted")), U.value === N.id) {
2215
+ const D = { ...n.query };
2216
+ delete D.form, d.replace({ query: D });
2234
2217
  }
2235
- await b();
2236
- } catch (B) {
2237
- E.danger(C(B));
2218
+ await w();
2219
+ } catch (D) {
2220
+ E.danger($(D));
2238
2221
  }
2239
2222
  }
2240
- async function y() {
2223
+ async function be() {
2241
2224
  try {
2242
- await v.sortForms(m.value.map((M) => M.id));
2243
- } catch (M) {
2244
- E.danger(C(M, l("panel.reorder-failed"))), await b();
2225
+ await v.sortForms(p.value.map((N) => N.id));
2226
+ } catch (N) {
2227
+ E.danger($(N, l("panel.reorder-failed"))), await w();
2245
2228
  }
2246
2229
  }
2247
- const Y = W(
2248
- () => f.value ? [
2249
- {
2250
- key: "statuses",
2251
- label: l("panel.statuses"),
2252
- icon: "tag",
2253
- run: () => {
2254
- r.push(`${o.base}/statuses`);
2255
- }
2256
- },
2257
- {
2258
- key: "new",
2259
- label: l("panel.new-form"),
2260
- icon: "plus",
2261
- primary: !0,
2262
- run: () => {
2263
- A();
2264
- }
2230
+ const he = F(() => {
2231
+ const N = [];
2232
+ return b.value && N.push({
2233
+ key: "statuses",
2234
+ label: l("panel.statuses"),
2235
+ icon: "tag",
2236
+ run: () => {
2237
+ d.push(`${s.base}/statuses`);
2265
2238
  }
2266
- ] : []
2267
- );
2268
- return (M, le) => (p(), g(e(nl), {
2269
- title: S.value,
2270
- actions: Y.value,
2271
- card: !1,
2272
- fill: ""
2273
- }, {
2239
+ }), o.can("inbox.update") && f.value !== null && N.push({
2240
+ key: "new-submission",
2241
+ label: l("panel.new-submission"),
2242
+ icon: "plus",
2243
+ primary: !0,
2244
+ run: () => {
2245
+ O.value?.create();
2246
+ }
2247
+ }), N;
2248
+ });
2249
+ return (N, K) => (u(), _(e(sl), {
2250
+ title: c.value,
2251
+ actions: he.value,
2252
+ card: !1
2253
+ }, Ie({
2274
2254
  default: a(() => [
2275
2255
  t(e(se), {
2276
2256
  class: "wx-inbox",
@@ -2278,187 +2258,227 @@ const Ol = /* @__PURE__ */ ae({
2278
2258
  }, {
2279
2259
  default: a(() => [
2280
2260
  t(e(kl), {
2281
- open: N.value,
2282
- "onUpdate:open": le[1] || (le[1] = (B) => N.value = B),
2261
+ "filters-open": T.value,
2262
+ "onUpdate:filtersOpen": K[2] || (K[2] = (D) => T.value = D),
2283
2263
  class: "wx-inbox__panes",
2284
- "list-width": 270,
2264
+ "filters-width": 270,
2285
2265
  "detail-min": 420,
2286
- "detail-label": u.value ? _(u.value) : e(l)("panel.forms")
2266
+ "filters-title": e(l)("panel.forms"),
2267
+ onFiltersInline: K[3] || (K[3] = (D) => S.value = D)
2287
2268
  }, {
2288
- list: a(() => [
2289
- c.value ? (p(), g(e(Re), {
2269
+ filters: a(({ inline: D, close: x }) => [
2270
+ i.value ? (u(), _(e(Fe), {
2290
2271
  key: 0,
2291
2272
  class: "wx-inbox__loading",
2292
2273
  rows: 5
2293
- })) : m.value.length === 0 ? (p(), g(e(We), {
2294
- key: 1,
2295
- title: e(l)("panel.no-forms"),
2296
- description: e(l)("panel.no-forms-help")
2297
- }, null, 8, ["title", "description"])) : (p(), g(e(Ze), {
2298
- key: 2,
2299
- modelValue: m.value,
2300
- "onUpdate:modelValue": le[0] || (le[0] = (B) => m.value = B),
2301
- class: "wx-inbox__forms",
2302
- plain: "",
2303
- size: "sm",
2304
- "item-key": "id",
2305
- "item-label": _,
2306
- disabled: !f.value,
2307
- title: e(l)("panel.forms"),
2308
- onMove: y
2309
- }, {
2310
- default: a(({ item: B }) => [
2311
- j("button", {
2312
- type: "button",
2313
- class: al(["wx-inbox-form", { "is-current": B.id === z.value }]),
2314
- onClick: (ye) => L(B)
2315
- }, [
2316
- j("span", vt, [
2274
+ })) : (u(), j(ee, { key: 1 }, [
2275
+ !D && b.value ? (u(), _(e(le), {
2276
+ key: 0,
2277
+ class: "wx-inbox__new-form",
2278
+ variant: "outline",
2279
+ block: "",
2280
+ onClick: C
2281
+ }, {
2282
+ icon: a(() => [
2283
+ t(e(Ve), { name: "plus" })
2284
+ ]),
2285
+ default: a(() => [
2286
+ z(" " + k(e(l)("panel.new-form")), 1)
2287
+ ]),
2288
+ _: 1
2289
+ })) : H("", !0),
2290
+ t(e(Ze), {
2291
+ modelValue: p.value,
2292
+ "onUpdate:modelValue": K[1] || (K[1] = (h) => p.value = h),
2293
+ class: Je(["wx-inbox__forms", { "is-panel": !D }]),
2294
+ plain: "",
2295
+ size: "sm",
2296
+ "item-key": "id",
2297
+ "item-label": I,
2298
+ disabled: !b.value,
2299
+ title: D ? e(l)("panel.forms") : void 0,
2300
+ onMove: be
2301
+ }, Ie({
2302
+ default: a(({ item: h }) => [
2303
+ G("button", {
2304
+ type: "button",
2305
+ class: Je(["wx-inbox-form", { "is-current": h.id === U.value, "is-off": !h.is_enabled }]),
2306
+ onClick: (ue) => P(h, x)
2307
+ }, [
2308
+ G("span", vt, [
2309
+ t(e(J), {
2310
+ truncate: "",
2311
+ weight: "medium",
2312
+ tone: h.is_enabled ? "default" : "muted"
2313
+ }, {
2314
+ default: a(() => [
2315
+ z(k(I(h)), 1)
2316
+ ]),
2317
+ _: 2
2318
+ }, 1032, ["tone"]),
2319
+ h.unread_count ? (u(), _(e(ll), {
2320
+ key: 0,
2321
+ class: "wx-inbox-form__count",
2322
+ type: "primary",
2323
+ value: h.unread_count,
2324
+ label: e(l)("panel.unread")
2325
+ }, null, 8, ["value", "label"])) : h.submissions_count ? (u(), _(e(ll), {
2326
+ key: 1,
2327
+ class: "wx-inbox-form__count",
2328
+ type: "neutral",
2329
+ value: h.submissions_count,
2330
+ label: e(l)("panel.submissions")
2331
+ }, null, 8, ["value", "label"])) : H("", !0)
2332
+ ]),
2317
2333
  t(e(J), {
2318
- truncate: "",
2319
- weight: "medium"
2334
+ size: "sm",
2335
+ tone: "muted",
2336
+ truncate: ""
2320
2337
  }, {
2321
2338
  default: a(() => [
2322
- F(w(_(B)), 1)
2339
+ z(k(h.slug), 1)
2323
2340
  ]),
2324
2341
  _: 2
2325
- }, 1024),
2326
- B.is_enabled ? P("", !0) : (p(), g(e(ke), {
2327
- key: 0,
2328
- type: "default"
2329
- }, {
2330
- default: a(() => [
2331
- F(w(e(l)("panel.off")), 1)
2332
- ]),
2333
- _: 1
2334
- })),
2335
- B.unread_count ? (p(), g(e(Xe), {
2336
- key: 1,
2337
- class: "wx-inbox-form__count",
2338
- type: "primary",
2339
- value: B.unread_count,
2340
- label: e(l)("panel.unread")
2341
- }, null, 8, ["value", "label"])) : B.submissions_count ? (p(), g(e(Xe), {
2342
- key: 2,
2343
- class: "wx-inbox-form__count",
2344
- type: "neutral",
2345
- value: B.submissions_count,
2346
- label: e(l)("panel.submissions")
2347
- }, null, 8, ["value", "label"])) : P("", !0)
2342
+ }, 1024)
2343
+ ], 10, mt)
2344
+ ]),
2345
+ actions: a(({ item: h }) => [
2346
+ t(e(Te), {
2347
+ actions: A(h),
2348
+ label: I(h)
2349
+ }, null, 8, ["actions", "label"])
2350
+ ]),
2351
+ _: 2
2352
+ }, [
2353
+ D && b.value ? {
2354
+ name: "extra",
2355
+ fn: a(() => [
2356
+ t(e(ke), {
2357
+ icon: "plus",
2358
+ size: "sm",
2359
+ title: e(l)("panel.new-form"),
2360
+ onClick: C
2361
+ }, null, 8, ["title"])
2348
2362
  ]),
2349
- t(e(J), {
2350
- size: "sm",
2351
- tone: "muted",
2352
- truncate: ""
2353
- }, {
2354
- default: a(() => [
2355
- F(w(B.slug), 1)
2356
- ]),
2357
- _: 2
2358
- }, 1024)
2359
- ], 10, mt)
2360
- ]),
2361
- actions: a(({ item: B }) => [
2362
- t(e(ze), {
2363
- actions: R(B),
2364
- label: _(B)
2365
- }, null, 8, ["actions", "label"])
2366
- ]),
2367
- _: 1
2368
- }, 8, ["modelValue", "disabled", "title"]))
2369
- ]),
2370
- empty: a(() => [
2371
- t(e(We), {
2372
- description: e(l)("panel.choose-form")
2373
- }, null, 8, ["description"])
2363
+ key: "0"
2364
+ } : void 0
2365
+ ]), 1032, ["modelValue", "class", "disabled", "title"])
2366
+ ], 64))
2374
2367
  ]),
2375
- detail: a(({ inline: B, back: ye }) => [
2376
- u.value ? (p(), g(pt, {
2377
- key: u.value.id,
2378
- form: u.value,
2379
- base: o.base,
2380
- inline: B,
2381
- onBack: ye,
2382
- onChanged: b
2383
- }, null, 8, ["form", "base", "inline", "onBack"])) : P("", !0)
2368
+ list: a(() => [
2369
+ i.value ? (u(), _(e(Fe), {
2370
+ key: 0,
2371
+ class: "wx-inbox__loading",
2372
+ rows: 6
2373
+ })) : f.value ? (u(), _(pt, {
2374
+ ref_key: "pane",
2375
+ ref: O,
2376
+ key: f.value.id,
2377
+ form: f.value,
2378
+ base: s.base,
2379
+ onChanged: w
2380
+ }, null, 8, ["form", "base"])) : (u(), _(e(Be), {
2381
+ key: 2,
2382
+ title: e(l)("panel.no-forms"),
2383
+ description: e(l)("panel.no-forms-help")
2384
+ }, null, 8, ["title", "description"]))
2384
2385
  ]),
2385
2386
  _: 1
2386
- }, 8, ["open", "detail-label"])
2387
+ }, 8, ["filters-open", "filters-title"])
2387
2388
  ]),
2388
2389
  _: 1
2389
2390
  })
2390
2391
  ]),
2391
- _: 1
2392
- }, 8, ["title", "actions"]));
2392
+ _: 2
2393
+ }, [
2394
+ S.value ? void 0 : {
2395
+ name: "actions",
2396
+ fn: a(() => [
2397
+ t(e(le), {
2398
+ variant: "outline",
2399
+ onClick: K[0] || (K[0] = (D) => T.value = !0)
2400
+ }, {
2401
+ icon: a(() => [
2402
+ t(e(Ve), { name: "list" })
2403
+ ]),
2404
+ default: a(() => [
2405
+ z(" " + k(e(l)("panel.forms")), 1)
2406
+ ]),
2407
+ _: 1
2408
+ })
2409
+ ]),
2410
+ key: "0"
2411
+ }
2412
+ ]), 1032, ["title", "actions"]));
2393
2413
  }
2394
2414
  }), bt = { class: "wx-inbox-status-form" }, ht = { class: "wx-inbox-status-form__checks" }, yt = /* @__PURE__ */ ae({
2395
2415
  __name: "StatusDialog",
2396
2416
  props: {
2397
2417
  status: {}
2398
2418
  },
2399
- setup(i) {
2400
- const o = i, { resolve: s, dismiss: v, open: n } = Ee(), r = ie(), d = re(r);
2419
+ setup(r) {
2420
+ const s = r, { resolve: o, dismiss: v, open: n } = Ee(), d = oe(), m = re(d);
2401
2421
  de();
2402
- const l = te("webx-inbox"), C = ve(), m = q(""), c = q({}), N = q("default"), f = q(!1), T = q(!1), S = q(!1), z = q(!1), u = q({});
2403
- Ue(
2404
- () => o.status,
2405
- (k) => {
2406
- m.value = k?.key ?? "", c.value = { ...k?.title ?? {} }, N.value = k?.color ?? "default", f.value = k?.is_default ?? !1, T.value = k?.is_spam ?? !1, S.value = k?.is_closed ?? !1, u.value = {};
2422
+ const l = te("webx-inbox"), $ = me(), p = W(""), i = W({}), O = W("default"), S = W(!1), T = W(!1), b = W(!1), q = W(!1), c = W({});
2423
+ Se(
2424
+ () => s.status,
2425
+ (w) => {
2426
+ p.value = w?.key ?? "", i.value = { ...w?.title ?? {} }, O.value = w?.color ?? "default", S.value = w?.is_default ?? !1, T.value = w?.is_spam ?? !1, b.value = w?.is_closed ?? !1, c.value = {};
2407
2427
  },
2408
2428
  { immediate: !0 }
2409
2429
  );
2410
- const _ = W(
2411
- () => zl.map((k) => ({ value: k, label: l(`panel.color-${k}`) }))
2430
+ const U = F(
2431
+ () => zl.map((w) => ({ value: w, label: l(`panel.color-${w}`) }))
2412
2432
  );
2413
- function b(k) {
2414
- return u.value[k]?.[0];
2415
- }
2416
- async function L() {
2417
- z.value = !0, u.value = {};
2418
- const k = {
2419
- key: m.value.trim(),
2420
- title: c.value,
2421
- color: N.value,
2422
- is_default: f.value,
2433
+ function f(w) {
2434
+ return c.value[w]?.[0];
2435
+ }
2436
+ async function I() {
2437
+ q.value = !0, c.value = {};
2438
+ const w = {
2439
+ key: p.value.trim(),
2440
+ title: i.value,
2441
+ color: O.value,
2442
+ is_default: S.value,
2423
2443
  is_spam: T.value,
2424
- is_closed: S.value
2444
+ is_closed: b.value
2425
2445
  };
2426
2446
  try {
2427
- s(
2428
- o.status === null ? await d.createStatus(k) : await d.saveStatus(o.status.id, k)
2447
+ o(
2448
+ s.status === null ? await m.createStatus(w) : await m.saveStatus(s.status.id, w)
2429
2449
  );
2430
- } catch (R) {
2431
- const A = R.body;
2432
- A?.errors ? (u.value = A.errors, E.danger(l("panel.failed"))) : E.danger(C(R));
2450
+ } catch (P) {
2451
+ const M = P.body;
2452
+ M?.errors ? (c.value = M.errors, E.danger(l("panel.failed"))) : E.danger($(P));
2433
2453
  } finally {
2434
- z.value = !1;
2454
+ q.value = !1;
2435
2455
  }
2436
2456
  }
2437
- return (k, R) => (p(), g(e(Oe), {
2457
+ return (w, P) => (u(), _(e(Pe), {
2438
2458
  open: e(n),
2439
- "onUpdate:open": R[7] || (R[7] = (A) => ne(n) ? n.value = A : null),
2440
- title: i.status ? e(l)("panel.settings") : e(l)("panel.new-status"),
2459
+ "onUpdate:open": P[7] || (P[7] = (M) => ne(n) ? n.value = M : null),
2460
+ title: r.status ? e(l)("panel.settings") : e(l)("panel.new-status"),
2441
2461
  width: 520
2442
2462
  }, {
2443
2463
  footer: a(() => [
2444
- t(e(Fe), { size: "sm" }, {
2464
+ t(e(We), { size: "sm" }, {
2445
2465
  default: a(() => [
2446
- t(e(oe), {
2466
+ t(e(le), {
2447
2467
  variant: "outline",
2448
- onClick: R[6] || (R[6] = (A) => e(v)())
2468
+ onClick: P[6] || (P[6] = (M) => e(v)())
2449
2469
  }, {
2450
2470
  default: a(() => [
2451
- F(w(e(l)("panel.cancel")), 1)
2471
+ z(k(e(l)("panel.cancel")), 1)
2452
2472
  ]),
2453
2473
  _: 1
2454
2474
  }),
2455
- t(e(oe), {
2475
+ t(e(le), {
2456
2476
  type: "primary",
2457
- loading: z.value,
2458
- onClick: L
2477
+ loading: q.value,
2478
+ onClick: I
2459
2479
  }, {
2460
2480
  default: a(() => [
2461
- F(w(e(l)("panel.save")), 1)
2481
+ z(k(e(l)("panel.save")), 1)
2462
2482
  ]),
2463
2483
  _: 1
2464
2484
  }, 8, ["loading"])
@@ -2467,62 +2487,62 @@ const Ol = /* @__PURE__ */ ae({
2467
2487
  })
2468
2488
  ]),
2469
2489
  default: a(() => [
2470
- j("div", bt, [
2471
- t(e(G), {
2490
+ G("div", bt, [
2491
+ t(e(B), {
2472
2492
  label: e(l)("panel.title"),
2473
- error: b("title"),
2493
+ error: f("title"),
2474
2494
  required: ""
2475
2495
  }, {
2476
2496
  default: a(() => [
2477
2497
  t(e(X), {
2478
- modelValue: c.value,
2479
- "onUpdate:modelValue": R[0] || (R[0] = (A) => c.value = A),
2498
+ modelValue: i.value,
2499
+ "onUpdate:modelValue": P[0] || (P[0] = (M) => i.value = M),
2480
2500
  localized: ""
2481
2501
  }, null, 8, ["modelValue"])
2482
2502
  ]),
2483
2503
  _: 1
2484
2504
  }, 8, ["label", "error"]),
2485
- t(e(G), {
2505
+ t(e(B), {
2486
2506
  label: e(l)("panel.status-key"),
2487
- error: b("key"),
2507
+ error: f("key"),
2488
2508
  required: ""
2489
2509
  }, {
2490
2510
  default: a(() => [
2491
2511
  t(e(X), {
2492
- modelValue: m.value,
2493
- "onUpdate:modelValue": R[1] || (R[1] = (A) => m.value = A),
2512
+ modelValue: p.value,
2513
+ "onUpdate:modelValue": P[1] || (P[1] = (M) => p.value = M),
2494
2514
  placeholder: "in-progress"
2495
2515
  }, null, 8, ["modelValue"])
2496
2516
  ]),
2497
2517
  _: 1
2498
2518
  }, 8, ["label", "error"]),
2499
- t(e(G), {
2519
+ t(e(B), {
2500
2520
  label: e(l)("panel.status-color"),
2501
- error: b("color")
2521
+ error: f("color")
2502
2522
  }, {
2503
2523
  default: a(() => [
2504
- t(e(he), {
2505
- modelValue: N.value,
2506
- "onUpdate:modelValue": R[2] || (R[2] = (A) => N.value = A),
2507
- options: _.value
2524
+ t(e(fe), {
2525
+ modelValue: O.value,
2526
+ "onUpdate:modelValue": P[2] || (P[2] = (M) => O.value = M),
2527
+ options: U.value
2508
2528
  }, null, 8, ["modelValue", "options"])
2509
2529
  ]),
2510
2530
  _: 1
2511
2531
  }, 8, ["label", "error"]),
2512
- j("div", ht, [
2513
- t(e(be), {
2514
- modelValue: f.value,
2515
- "onUpdate:modelValue": R[3] || (R[3] = (A) => f.value = A),
2532
+ G("div", ht, [
2533
+ t(e(ve), {
2534
+ modelValue: S.value,
2535
+ "onUpdate:modelValue": P[3] || (P[3] = (M) => S.value = M),
2516
2536
  label: e(l)("panel.status-default")
2517
2537
  }, null, 8, ["modelValue", "label"]),
2518
- t(e(be), {
2538
+ t(e(ve), {
2519
2539
  modelValue: T.value,
2520
- "onUpdate:modelValue": R[4] || (R[4] = (A) => T.value = A),
2540
+ "onUpdate:modelValue": P[4] || (P[4] = (M) => T.value = M),
2521
2541
  label: e(l)("panel.status-spam")
2522
2542
  }, null, 8, ["modelValue", "label"]),
2523
- t(e(be), {
2524
- modelValue: S.value,
2525
- "onUpdate:modelValue": R[5] || (R[5] = (A) => S.value = A),
2543
+ t(e(ve), {
2544
+ modelValue: b.value,
2545
+ "onUpdate:modelValue": P[5] || (P[5] = (M) => b.value = M),
2526
2546
  disabled: T.value,
2527
2547
  label: e(l)("panel.status-closed")
2528
2548
  }, null, 8, ["modelValue", "disabled", "label"])
@@ -2532,71 +2552,71 @@ const Ol = /* @__PURE__ */ ae({
2532
2552
  _: 1
2533
2553
  }, 8, ["open", "title"]));
2534
2554
  }
2535
- }), gt = /* @__PURE__ */ ue(yt, [["__scopeId", "data-v-b520b53b"]]), xt = { class: "wx-inbox-statuses" }, _t = { class: "wx-inbox-status" }, wt = /* @__PURE__ */ ae({
2555
+ }), gt = /* @__PURE__ */ ie(yt, [["__scopeId", "data-v-b520b53b"]]), xt = { class: "wx-inbox-statuses" }, _t = { class: "wx-inbox-status" }, wt = /* @__PURE__ */ ae({
2536
2556
  __name: "StatusesPage",
2537
2557
  props: {
2538
2558
  base: { default: "/inbox" }
2539
2559
  },
2540
- setup(i) {
2541
- const o = i, s = ie(), v = re(s), n = xe();
2560
+ setup(r) {
2561
+ const s = r, o = oe(), v = re(o), n = xe();
2542
2562
  de();
2543
- const r = te("webx-inbox"), d = ve(), l = q([]), C = q(!0), m = s.can("inbox.manage"), c = Pe(gt);
2544
- function N(b) {
2545
- return me(b.title, n.active.value, b.key);
2563
+ const d = te("webx-inbox"), m = me(), l = W([]), $ = W(!0), p = o.can("inbox.manage"), i = Re(gt);
2564
+ function O(f) {
2565
+ return pe(f.title, n.active.value, f.key);
2546
2566
  }
2547
- async function f() {
2548
- C.value = !0;
2567
+ async function S() {
2568
+ $.value = !0;
2549
2569
  try {
2550
2570
  l.value = await v.statuses();
2551
- } catch (b) {
2552
- E.danger(d(b));
2571
+ } catch (f) {
2572
+ E.danger(m(f));
2553
2573
  } finally {
2554
- C.value = !1;
2574
+ $.value = !1;
2555
2575
  }
2556
2576
  }
2557
- f();
2558
- async function T(b) {
2559
- await c({ status: b }) && await f();
2577
+ S();
2578
+ async function T(f) {
2579
+ await i({ status: f }) && await S();
2560
2580
  }
2561
- async function S(b) {
2562
- if (await Se({
2563
- title: r("panel.delete-status-title", { status: N(b) }),
2564
- message: r("panel.delete-status-text"),
2565
- confirmText: r("panel.delete"),
2566
- cancelText: r("panel.cancel"),
2581
+ async function b(f) {
2582
+ if (await Ce({
2583
+ title: d("panel.delete-status-title", { status: O(f) }),
2584
+ message: d("panel.delete-status-text"),
2585
+ confirmText: d("panel.delete"),
2586
+ cancelText: d("panel.cancel"),
2567
2587
  tone: "danger"
2568
2588
  }))
2569
2589
  try {
2570
- await v.removeStatus(b.id), E.success(r("panel.deleted")), await f();
2571
- } catch (k) {
2572
- E.danger(d(k));
2590
+ await v.removeStatus(f.id), E.success(d("panel.deleted")), await S();
2591
+ } catch (w) {
2592
+ E.danger(m(w));
2573
2593
  }
2574
2594
  }
2575
- function z(b) {
2576
- return m ? [
2577
- { key: "edit", icon: "edit", label: r("panel.settings"), run: () => {
2578
- T(b);
2595
+ function q(f) {
2596
+ return p ? [
2597
+ { key: "edit", icon: "edit", label: d("panel.settings"), run: () => {
2598
+ T(f);
2579
2599
  } },
2580
2600
  // A status with submissions in them cannot go: they would have nothing to be in. The
2581
2601
  // line is left out rather than greyed, the way every list of the panel does it.
2582
- ...b.submissions_count === 0 ? [
2602
+ ...f.submissions_count === 0 ? [
2583
2603
  {
2584
2604
  key: "delete",
2585
2605
  icon: "trash",
2586
- label: r("panel.delete"),
2606
+ label: d("panel.delete"),
2587
2607
  danger: !0,
2588
2608
  run: () => {
2589
- S(b);
2609
+ b(f);
2590
2610
  }
2591
2611
  }
2592
2612
  ] : []
2593
2613
  ] : [];
2594
2614
  }
2595
- const u = W(
2596
- () => m ? [
2615
+ const c = F(
2616
+ () => p ? [
2597
2617
  {
2598
2618
  key: "new",
2599
- label: r("panel.new-status"),
2619
+ label: d("panel.new-status"),
2600
2620
  icon: "plus",
2601
2621
  primary: !0,
2602
2622
  run: () => {
@@ -2605,42 +2625,42 @@ const Ol = /* @__PURE__ */ ae({
2605
2625
  }
2606
2626
  ] : []
2607
2627
  );
2608
- async function _() {
2628
+ async function U() {
2609
2629
  try {
2610
- await v.sortStatuses(l.value.map((b) => b.id));
2611
- } catch (b) {
2612
- E.danger(d(b, r("panel.reorder-failed"))), await f();
2630
+ await v.sortStatuses(l.value.map((f) => f.id));
2631
+ } catch (f) {
2632
+ E.danger(m(f, d("panel.reorder-failed"))), await S();
2613
2633
  }
2614
2634
  }
2615
- return (b, L) => (p(), K("div", xt, [
2616
- t(e(nl), {
2617
- title: e(r)("panel.statuses"),
2618
- back: o.base,
2619
- "back-label": e(r)("panel.forms"),
2620
- actions: u.value
2635
+ return (f, I) => (u(), j("div", xt, [
2636
+ t(e(sl), {
2637
+ title: e(d)("panel.statuses"),
2638
+ back: s.base,
2639
+ "back-label": e(d)("panel.forms"),
2640
+ actions: c.value
2621
2641
  }, {
2622
2642
  default: a(() => [
2623
- !C.value && l.value.length === 0 ? (p(), g(e(We), {
2643
+ !$.value && l.value.length === 0 ? (u(), _(e(Be), {
2624
2644
  key: 0,
2625
- title: e(r)("panel.no-statuses")
2626
- }, null, 8, ["title"])) : (p(), g(e(Ze), {
2645
+ title: e(d)("panel.no-statuses")
2646
+ }, null, 8, ["title"])) : (u(), _(e(Ze), {
2627
2647
  key: 1,
2628
2648
  modelValue: l.value,
2629
- "onUpdate:modelValue": L[0] || (L[0] = (k) => l.value = k),
2649
+ "onUpdate:modelValue": I[0] || (I[0] = (w) => l.value = w),
2630
2650
  plain: "",
2631
2651
  "item-key": "id",
2632
- "item-label": N,
2633
- disabled: !e(m),
2634
- "aria-label": e(r)("panel.statuses"),
2635
- onMove: _
2652
+ "item-label": O,
2653
+ disabled: !e(p),
2654
+ "aria-label": e(d)("panel.statuses"),
2655
+ onMove: U
2636
2656
  }, {
2637
- default: a(({ item: k }) => [
2638
- j("div", _t, [
2639
- t(e(ke), {
2640
- type: k.color
2657
+ default: a(({ item: w }) => [
2658
+ G("div", _t, [
2659
+ t(e(Ue), {
2660
+ type: w.color
2641
2661
  }, {
2642
2662
  default: a(() => [
2643
- F(w(N(k)), 1)
2663
+ z(k(O(w)), 1)
2644
2664
  ]),
2645
2665
  _: 2
2646
2666
  }, 1032, ["type"]),
@@ -2650,27 +2670,27 @@ const Ol = /* @__PURE__ */ ae({
2650
2670
  truncate: ""
2651
2671
  }, {
2652
2672
  default: a(() => [
2653
- j("code", null, w(k.key), 1),
2654
- k.is_default ? (p(), K(ee, { key: 0 }, [
2655
- F(" · " + w(e(r)("panel.status-default")), 1)
2656
- ], 64)) : P("", !0),
2657
- k.is_spam ? (p(), K(ee, { key: 1 }, [
2658
- F(" · " + w(e(r)("panel.status-spam")), 1)
2659
- ], 64)) : k.is_closed ? (p(), K(ee, { key: 2 }, [
2660
- F(" · " + w(e(r)("panel.status-closed")), 1)
2661
- ], 64)) : P("", !0),
2662
- k.submissions_count ? (p(), K(ee, { key: 3 }, [
2663
- F(" · " + w(e(r)("panel.in-use")) + " (" + w(k.submissions_count) + ") ", 1)
2664
- ], 64)) : P("", !0)
2673
+ G("code", null, k(w.key), 1),
2674
+ w.is_default ? (u(), j(ee, { key: 0 }, [
2675
+ z(" · " + k(e(d)("panel.status-default")), 1)
2676
+ ], 64)) : H("", !0),
2677
+ w.is_spam ? (u(), j(ee, { key: 1 }, [
2678
+ z(" · " + k(e(d)("panel.status-spam")), 1)
2679
+ ], 64)) : w.is_closed ? (u(), j(ee, { key: 2 }, [
2680
+ z(" · " + k(e(d)("panel.status-closed")), 1)
2681
+ ], 64)) : H("", !0),
2682
+ w.submissions_count ? (u(), j(ee, { key: 3 }, [
2683
+ z(" · " + k(e(d)("panel.in-use")) + " (" + k(w.submissions_count) + ") ", 1)
2684
+ ], 64)) : H("", !0)
2665
2685
  ]),
2666
2686
  _: 2
2667
2687
  }, 1024)
2668
2688
  ])
2669
2689
  ]),
2670
- actions: a(({ item: k }) => [
2671
- t(e(ze), {
2672
- actions: z(k),
2673
- label: N(k)
2690
+ actions: a(({ item: w }) => [
2691
+ t(e(Te), {
2692
+ actions: q(w),
2693
+ label: O(w)
2674
2694
  }, null, 8, ["actions", "label"])
2675
2695
  ]),
2676
2696
  _: 1
@@ -2680,90 +2700,90 @@ const Ol = /* @__PURE__ */ ae({
2680
2700
  }, 8, ["title", "back", "back-label", "actions"])
2681
2701
  ]));
2682
2702
  }
2683
- }), kt = /* @__PURE__ */ ue(wt, [["__scopeId", "data-v-f94bf140"]]), Vt = { class: "wx-submission" }, $t = {
2703
+ }), kt = /* @__PURE__ */ ie(wt, [["__scopeId", "data-v-f94bf140"]]), Vt = { class: "wx-submission" }, $t = {
2684
2704
  key: 1,
2685
2705
  class: "wx-submission__panes"
2686
- }, Ut = { class: "wx-submission__main" }, St = { class: "wx-submission__value" }, Ct = { class: "wx-submission__files" }, zt = { class: "wx-submission__by" }, Tt = { class: "wx-submission__fields" }, Wt = ["href"], Ft = {
2706
+ }, Ut = { class: "wx-submission__main" }, St = { class: "wx-submission__value" }, Ct = { class: "wx-submission__files" }, zt = { class: "wx-submission__by" }, Tt = { class: "wx-submission__fields" }, Ft = ["href"], Wt = {
2687
2707
  key: 1,
2688
2708
  class: "wx-submission__detail"
2689
- }, qt = { class: "wx-submission__aside" }, At = { class: "wx-submission__fields" }, It = { class: "wx-submission__field" }, Nt = { class: "wx-submission__field" }, Mt = /* @__PURE__ */ ae({
2709
+ }, qt = { class: "wx-submission__aside" }, At = { class: "wx-submission__fields" }, It = { class: "wx-submission__field" }, Nt = { class: "wx-submission__field" }, Dt = /* @__PURE__ */ ae({
2690
2710
  __name: "SubmissionPage",
2691
2711
  props: {
2692
2712
  base: { default: "/inbox" }
2693
2713
  },
2694
- setup(i) {
2695
- const o = i, s = ie(), v = re(s), n = De(), r = Le(), d = xe();
2714
+ setup(r) {
2715
+ const s = r, o = oe(), v = re(o), n = Le(), d = Oe(), m = xe();
2696
2716
  de();
2697
- const l = te("webx-inbox"), C = te("webx-admin"), m = ve(), c = q(null), N = q([]), f = q([]), T = q(!0), S = W(() => s.can("inbox.update")), z = W(() => Number(n.params.id)), u = W(() => ({
2717
+ const l = te("webx-inbox"), $ = te("webx-admin"), p = me(), i = W(null), O = W([]), S = W([]), T = W(!0), b = F(() => o.can("inbox.update")), q = F(() => Number(n.params.id)), c = F(() => ({
2698
2718
  view: typeof n.query.view == "string" ? n.query.view : void 0,
2699
2719
  search: typeof n.query.search == "string" ? n.query.search : void 0,
2700
2720
  assignee: typeof n.query.assignee == "string" ? n.query.assignee : void 0
2701
- })), _ = W(() => ({ path: o.base, query: { ...n.query } })), b = W(
2702
- () => N.value.map((h) => ({ value: h.id, label: k(h) }))
2703
- ), L = W(
2704
- () => f.value.map((h) => ({ value: h.id, label: h.name }))
2721
+ })), U = F(() => ({ path: s.base, query: { ...n.query } })), f = F(
2722
+ () => O.value.map((y) => ({ value: y.id, label: w(y) }))
2723
+ ), I = F(
2724
+ () => S.value.map((y) => ({ value: y.id, label: y.name }))
2705
2725
  );
2706
- function k(h) {
2707
- return me(h.title, d.active.value, h.key);
2708
- }
2709
- const R = W(() => l("panel.submission", { id: String(z.value) })), A = W(() => {
2710
- const h = c.value?.form;
2711
- return h === void 0 ? "" : me(h.title ?? {}, d.active.value, h.slug ?? "");
2712
- }), V = W(() => (c.value?.values ?? []).find((H) => H.type === "email" && (H.value ?? "") !== "")?.value ?? null), D = W(() => {
2713
- if (V.value === null) return null;
2714
- const h = encodeURIComponent(`${A.value} — ${R.value}`);
2715
- return `mailto:${V.value}?subject=${h}`;
2726
+ function w(y) {
2727
+ return pe(y.title, m.active.value, y.key);
2728
+ }
2729
+ const P = F(() => l("panel.submission", { id: String(q.value) })), M = F(() => {
2730
+ const y = i.value?.form;
2731
+ return y === void 0 ? "" : pe(y.title ?? {}, m.active.value, y.slug ?? "");
2732
+ }), A = F(() => (i.value?.values ?? []).find((R) => R.type === "email" && (R.value ?? "") !== "")?.value ?? null), C = F(() => {
2733
+ if (A.value === null) return null;
2734
+ const y = encodeURIComponent(`${M.value} — ${P.value}`);
2735
+ return `mailto:${A.value}?subject=${y}`;
2716
2736
  });
2717
- async function y() {
2737
+ async function g() {
2718
2738
  T.value = !0;
2719
2739
  try {
2720
- c.value = await v.submission(z.value, u.value);
2721
- } catch (h) {
2722
- E.danger(m(h)), r.replace(_.value);
2740
+ i.value = await v.submission(q.value, c.value);
2741
+ } catch (y) {
2742
+ E.danger(p(y)), d.replace(U.value);
2723
2743
  } finally {
2724
2744
  T.value = !1;
2725
2745
  }
2726
2746
  }
2727
- async function Y() {
2747
+ async function Q() {
2728
2748
  try {
2729
- N.value = await v.statuses(), S.value && (f.value = await v.recipients());
2730
- } catch (h) {
2731
- E.danger(m(h));
2749
+ O.value = await v.statuses(), b.value && (S.value = await v.recipients());
2750
+ } catch (y) {
2751
+ E.danger(p(y));
2732
2752
  }
2733
2753
  }
2734
- Ue(z, () => {
2735
- y();
2736
- }, { immediate: !0 }), Y();
2737
- async function M(h) {
2754
+ Se(q, () => {
2755
+ g();
2756
+ }, { immediate: !0 }), Q();
2757
+ async function be(y) {
2738
2758
  try {
2739
- c.value = await v.saveSubmission(z.value, h), E.success(l("panel.saved"));
2740
- } catch (Q) {
2741
- E.danger(m(Q)), await y();
2759
+ i.value = await v.saveSubmission(q.value, y), E.success(l("panel.saved"));
2760
+ } catch (Y) {
2761
+ E.danger(p(Y)), await g();
2742
2762
  }
2743
2763
  }
2744
- function le(h) {
2745
- typeof h == "number" && M({ status_id: h });
2764
+ function he(y) {
2765
+ typeof y == "number" && be({ status_id: y });
2746
2766
  }
2747
- function B(h) {
2748
- M({ assignee_id: typeof h == "number" ? h : null });
2767
+ function N(y) {
2768
+ be({ assignee_id: typeof y == "number" ? y : null });
2749
2769
  }
2750
- const ye = W(() => {
2751
- const h = [];
2752
- return D.value && h.push({
2770
+ const K = F(() => {
2771
+ const y = [];
2772
+ return C.value && y.push({
2753
2773
  key: "reply",
2754
2774
  label: l("panel.reply"),
2755
2775
  icon: "mail",
2756
2776
  primary: !0,
2757
- href: D.value,
2777
+ href: C.value,
2758
2778
  target: "_self"
2759
- }), S.value && c.value !== null && h.push(
2779
+ }), b.value && i.value !== null && y.push(
2760
2780
  {
2761
2781
  key: "unread",
2762
2782
  icon: "eye-off",
2763
2783
  label: l("panel.mark-unread"),
2764
2784
  menu: !0,
2765
2785
  run: () => {
2766
- O();
2786
+ D();
2767
2787
  }
2768
2788
  },
2769
2789
  {
@@ -2772,20 +2792,20 @@ const Ol = /* @__PURE__ */ ae({
2772
2792
  label: l("panel.delete"),
2773
2793
  danger: !0,
2774
2794
  run: () => {
2775
- $();
2795
+ x();
2776
2796
  }
2777
2797
  }
2778
- ), h;
2798
+ ), y;
2779
2799
  });
2780
- async function O() {
2800
+ async function D() {
2781
2801
  try {
2782
- await v.massSubmissions({ ids: [z.value], action: "unread" }), r.push(_.value);
2783
- } catch (h) {
2784
- E.danger(m(h));
2802
+ await v.massSubmissions({ ids: [q.value], action: "unread" }), d.push(U.value);
2803
+ } catch (y) {
2804
+ E.danger(p(y));
2785
2805
  }
2786
2806
  }
2787
- async function $() {
2788
- if (await Se({
2807
+ async function x() {
2808
+ if (await Ce({
2789
2809
  title: l("panel.delete-submission-title"),
2790
2810
  message: l("panel.delete-submission-text"),
2791
2811
  confirmText: l("panel.delete"),
@@ -2793,94 +2813,94 @@ const Ol = /* @__PURE__ */ ae({
2793
2813
  tone: "danger"
2794
2814
  }))
2795
2815
  try {
2796
- await v.removeSubmission(z.value), E.success(l("panel.deleted")), r.push(_.value);
2797
- } catch (Q) {
2798
- E.danger(m(Q));
2816
+ await v.removeSubmission(q.value), E.success(l("panel.deleted")), d.push(U.value);
2817
+ } catch (Y) {
2818
+ E.danger(p(Y));
2799
2819
  }
2800
2820
  }
2801
- function U(h) {
2802
- h !== null && r.push({ path: `${o.base}/submissions/${h}`, query: { ...n.query } });
2821
+ function h(y) {
2822
+ y !== null && d.push({ path: `${s.base}/submissions/${y}`, query: { ...n.query } });
2803
2823
  }
2804
- function ce(h) {
2805
- const Q = N.value.find((H) => H.key === h);
2806
- return Q === void 0 ? h : k(Q);
2824
+ function ue(y) {
2825
+ const Y = O.value.find((R) => R.key === y);
2826
+ return Y === void 0 ? y : w(Y);
2807
2827
  }
2808
- function fe(h) {
2809
- switch (h.type) {
2828
+ function ye(y) {
2829
+ switch (y.type) {
2810
2830
  case "created":
2811
2831
  return l("panel.event-created");
2812
2832
  case "status":
2813
- return l("panel.event-status", { to: ce(h.to ?? "") });
2833
+ return l("panel.event-status", { to: ue(y.to ?? "") });
2814
2834
  case "assignee":
2815
- return h.to === null || h.to === "" ? l("panel.event-unassigned") : l("panel.event-assignee", { to: h.to });
2835
+ return y.to === null || y.to === "" ? l("panel.event-unassigned") : l("panel.event-assignee", { to: y.to });
2816
2836
  case "note":
2817
2837
  return l("panel.event-note");
2818
2838
  case "notified":
2819
2839
  return l("panel.event-notified");
2820
2840
  default:
2821
- return h.type;
2841
+ return y.type;
2822
2842
  }
2823
2843
  }
2824
- function Be(h) {
2825
- return `${Math.max(1, Math.round(h / 1024))} KB`;
2844
+ function qe(y) {
2845
+ return `${Math.max(1, Math.round(y / 1024))} KB`;
2826
2846
  }
2827
- const qe = W(() => {
2828
- const h = c.value?.meta ?? {}, Q = [];
2829
- typeof h.page == "string" && h.page !== "" && Q.push({ label: l("panel.meta-page"), value: h.page, link: !0 }), typeof h.referrer == "string" && h.referrer !== "" && Q.push({ label: l("panel.meta-referrer"), value: h.referrer, link: !0 });
2830
- for (const [H, He] of Object.entries(h.utm ?? {}))
2831
- Q.push({ label: H, value: String(He) });
2832
- return typeof h.locale == "string" && h.locale !== "" && Q.push({ label: l("panel.meta-locale"), value: h.locale }), typeof h.ip == "string" && h.ip !== "" && Q.push({ label: l("panel.meta-ip"), value: h.ip }), typeof h.user_agent == "string" && h.user_agent !== "" && Q.push({ label: l("panel.meta-agent"), value: h.user_agent }), Q;
2847
+ const He = F(() => {
2848
+ const y = i.value?.meta ?? {}, Y = [];
2849
+ typeof y.page == "string" && y.page !== "" && Y.push({ label: l("panel.meta-page"), value: y.page, link: !0 }), typeof y.referrer == "string" && y.referrer !== "" && Y.push({ label: l("panel.meta-referrer"), value: y.referrer, link: !0 });
2850
+ for (const [R, Ge] of Object.entries(y.utm ?? {}))
2851
+ Y.push({ label: R, value: String(Ge) });
2852
+ return typeof y.locale == "string" && y.locale !== "" && Y.push({ label: l("panel.meta-locale"), value: y.locale }), typeof y.ip == "string" && y.ip !== "" && Y.push({ label: l("panel.meta-ip"), value: y.ip }), typeof y.user_agent == "string" && y.user_agent !== "" && Y.push({ label: l("panel.meta-agent"), value: y.user_agent }), Y;
2833
2853
  });
2834
- return (h, Q) => (p(), K("div", Vt, [
2835
- t(e(Ke), {
2836
- title: R.value,
2837
- subtitle: A.value,
2838
- back: _.value,
2839
- actions: ye.value
2854
+ return (y, Y) => (u(), j("div", Vt, [
2855
+ t(e(Ye), {
2856
+ title: P.value,
2857
+ subtitle: M.value,
2858
+ back: U.value,
2859
+ actions: K.value
2840
2860
  }, {
2841
2861
  extra: a(() => [
2842
- t(e($e), {
2862
+ t(e(ke), {
2843
2863
  icon: "chevron-left",
2844
2864
  size: "lg",
2845
2865
  title: e(l)("panel.previous"),
2846
- disabled: !c.value?.previous_id,
2847
- onClick: Q[0] || (Q[0] = (H) => U(c.value?.previous_id ?? null))
2866
+ disabled: !i.value?.previous_id,
2867
+ onClick: Y[0] || (Y[0] = (R) => h(i.value?.previous_id ?? null))
2848
2868
  }, null, 8, ["title", "disabled"]),
2849
- t(e($e), {
2869
+ t(e(ke), {
2850
2870
  icon: "chevron-right",
2851
2871
  size: "lg",
2852
2872
  title: e(l)("panel.next"),
2853
- disabled: !c.value?.next_id,
2854
- onClick: Q[1] || (Q[1] = (H) => U(c.value?.next_id ?? null))
2873
+ disabled: !i.value?.next_id,
2874
+ onClick: Y[1] || (Y[1] = (R) => h(i.value?.next_id ?? null))
2855
2875
  }, null, 8, ["title", "disabled"])
2856
2876
  ]),
2857
2877
  _: 1
2858
2878
  }, 8, ["title", "subtitle", "back", "actions"]),
2859
- T.value ? (p(), g(e(Re), {
2879
+ T.value ? (u(), _(e(Fe), {
2860
2880
  key: 0,
2861
2881
  rows: 6
2862
- })) : c.value ? (p(), K("div", $t, [
2863
- j("div", Ut, [
2882
+ })) : i.value ? (u(), j("div", $t, [
2883
+ G("div", Ut, [
2864
2884
  t(e(se), {
2865
2885
  title: e(l)("panel.answers")
2866
2886
  }, {
2867
2887
  default: a(() => [
2868
- c.value.values.length === 0 ? (p(), g(e(We), {
2888
+ i.value.values.length === 0 ? (u(), _(e(Be), {
2869
2889
  key: 0,
2870
2890
  size: "sm",
2871
2891
  description: e(l)("panel.no-answers")
2872
- }, null, 8, ["description"])) : (p(), g(e(el), {
2892
+ }, null, 8, ["description"])) : (u(), _(e(tl), {
2873
2893
  key: 1,
2874
2894
  columns: 1,
2875
2895
  layout: "vertical"
2876
2896
  }, {
2877
2897
  default: a(() => [
2878
- (p(!0), K(ee, null, we(c.value.values, (H) => (p(), g(e(Ae), {
2879
- key: H.id,
2880
- label: H.label ?? H.name
2898
+ (u(!0), j(ee, null, we(i.value.values, (R) => (u(), _(e(Ae), {
2899
+ key: R.id,
2900
+ label: R.label ?? R.name
2881
2901
  }, {
2882
2902
  default: a(() => [
2883
- j("p", St, w(H.value || "—"), 1)
2903
+ G("p", St, k(R.value || "—"), 1)
2884
2904
  ]),
2885
2905
  _: 2
2886
2906
  }, 1032, ["label"]))), 128))
@@ -2890,47 +2910,47 @@ const Ol = /* @__PURE__ */ ae({
2890
2910
  ]),
2891
2911
  _: 1
2892
2912
  }, 8, ["title"]),
2893
- c.value.files.length > 0 ? (p(), g(e(se), {
2913
+ i.value.files.length > 0 ? (u(), _(e(se), {
2894
2914
  key: 0,
2895
2915
  title: e(l)("panel.attachments")
2896
2916
  }, {
2897
2917
  default: a(() => [
2898
- j("div", Ct, [
2899
- (p(!0), K(ee, null, we(c.value.files, (H) => (p(), g(e(Vl), {
2900
- key: H.id,
2901
- name: H.name,
2902
- type: H.mime ?? void 0,
2903
- "download-url": H.url,
2918
+ G("div", Ct, [
2919
+ (u(!0), j(ee, null, we(i.value.files, (R) => (u(), _(e(Vl), {
2920
+ key: R.id,
2921
+ name: R.name,
2922
+ type: R.mime ?? void 0,
2923
+ "download-url": R.url,
2904
2924
  "download-label": e(l)("panel.download"),
2905
2925
  size: "sm"
2906
2926
  }, {
2907
2927
  meta: a(() => [
2908
- F(w(Be(H.size)), 1)
2928
+ z(k(qe(R.size)), 1)
2909
2929
  ]),
2910
2930
  _: 2
2911
2931
  }, 1032, ["name", "type", "download-url", "download-label"]))), 128))
2912
2932
  ])
2913
2933
  ]),
2914
2934
  _: 1
2915
- }, 8, ["title"])) : P("", !0),
2935
+ }, 8, ["title"])) : H("", !0),
2916
2936
  t(e(se), { class: "wx-submission__more" }, {
2917
2937
  default: a(() => [
2918
2938
  t(e(Qe), {
2919
2939
  variant: "pill",
2920
- "aria-label": R.value
2940
+ "aria-label": P.value
2921
2941
  }, {
2922
2942
  default: a(() => [
2923
2943
  t(e(ge), {
2924
2944
  value: "notes",
2925
- label: e(C)("notes.title")
2945
+ label: e($)("notes.title")
2926
2946
  }, {
2927
2947
  default: a(() => [
2928
2948
  t(e(ml), {
2929
- id: c.value.id,
2949
+ id: i.value.id,
2930
2950
  type: "inbox_submission",
2931
2951
  title: "",
2932
- can: S.value,
2933
- onChange: y
2952
+ can: b.value,
2953
+ onChange: g
2934
2954
  }, null, 8, ["id", "can"])
2935
2955
  ]),
2936
2956
  _: 1
@@ -2942,8 +2962,8 @@ const Ol = /* @__PURE__ */ ae({
2942
2962
  default: a(() => [
2943
2963
  t(e($l), { size: "sm" }, {
2944
2964
  default: a(() => [
2945
- (p(!0), K(ee, null, we(c.value.events, (H) => (p(), g(e(Ul), {
2946
- key: H.id
2965
+ (u(!0), j(ee, null, we(i.value.events, (R) => (u(), _(e(Ul), {
2966
+ key: R.id
2947
2967
  }, {
2948
2968
  default: a(() => [
2949
2969
  t(e(J), {
@@ -2952,22 +2972,22 @@ const Ol = /* @__PURE__ */ ae({
2952
2972
  class: "wx-submission__event"
2953
2973
  }, {
2954
2974
  default: a(() => [
2955
- F(w(fe(H)), 1)
2975
+ z(k(ye(R)), 1)
2956
2976
  ]),
2957
2977
  _: 2
2958
2978
  }, 1024),
2959
- j("p", zt, [
2979
+ G("p", zt, [
2960
2980
  t(e(J), {
2961
2981
  size: "sm",
2962
2982
  tone: "muted"
2963
2983
  }, {
2964
2984
  default: a(() => [
2965
- F(w(H.author?.name ?? e(l)("panel.system")), 1)
2985
+ z(k(R.author?.name ?? e(l)("panel.system")), 1)
2966
2986
  ]),
2967
2987
  _: 2
2968
2988
  }, 1024),
2969
- t(e(Ie), {
2970
- value: H.created_at
2989
+ t(e(Ne), {
2990
+ value: R.created_at
2971
2991
  }, null, 8, ["value"])
2972
2992
  ])
2973
2993
  ]),
@@ -2984,8 +3004,8 @@ const Ol = /* @__PURE__ */ ae({
2984
3004
  label: e(l)("panel.details")
2985
3005
  }, {
2986
3006
  default: a(() => [
2987
- j("div", Tt, [
2988
- t(e(el), {
3007
+ G("div", Tt, [
3008
+ t(e(tl), {
2989
3009
  columns: 1,
2990
3010
  layout: "vertical",
2991
3011
  size: "sm"
@@ -2995,8 +3015,8 @@ const Ol = /* @__PURE__ */ ae({
2995
3015
  label: e(l)("panel.received")
2996
3016
  }, {
2997
3017
  default: a(() => [
2998
- t(e(Ie), {
2999
- value: c.value.created_at,
3018
+ t(e(Ne), {
3019
+ value: i.value.created_at,
3000
3020
  tone: "default"
3001
3021
  }, null, 8, ["value"])
3002
3022
  ]),
@@ -3006,59 +3026,59 @@ const Ol = /* @__PURE__ */ ae({
3006
3026
  label: e(l)("panel.meta-source")
3007
3027
  }, {
3008
3028
  default: a(() => [
3009
- t(e(ke), {
3010
- type: c.value.source === "panel" ? "info" : "default"
3029
+ t(e(Ue), {
3030
+ type: i.value.source === "panel" ? "info" : "default"
3011
3031
  }, {
3012
3032
  default: a(() => [
3013
- F(w(c.value.source === "panel" ? e(l)("panel.source-panel") : e(l)("panel.source-web")), 1)
3033
+ z(k(i.value.source === "panel" ? e(l)("panel.source-panel") : e(l)("panel.source-web")), 1)
3014
3034
  ]),
3015
3035
  _: 1
3016
3036
  }, 8, ["type"])
3017
3037
  ]),
3018
3038
  _: 1
3019
3039
  }, 8, ["label"]),
3020
- (p(!0), K(ee, null, we(qe.value, (H) => (p(), g(e(Ae), {
3021
- key: H.label,
3022
- label: H.label
3040
+ (u(!0), j(ee, null, we(He.value, (R) => (u(), _(e(Ae), {
3041
+ key: R.label,
3042
+ label: R.label
3023
3043
  }, {
3024
3044
  default: a(() => [
3025
- H.link ? (p(), K("a", {
3045
+ R.link ? (u(), j("a", {
3026
3046
  key: 0,
3027
- href: H.value,
3047
+ href: R.value,
3028
3048
  target: "_blank",
3029
3049
  rel: "noreferrer"
3030
- }, w(H.value), 9, Wt)) : (p(), K("span", Ft, w(H.value), 1))
3050
+ }, k(R.value), 9, Ft)) : (u(), j("span", Wt, k(R.value), 1))
3031
3051
  ]),
3032
3052
  _: 2
3033
3053
  }, 1032, ["label"]))), 128))
3034
3054
  ]),
3035
3055
  _: 1
3036
3056
  }),
3037
- c.value.notify_error ? (p(), g(e(Ne), {
3057
+ i.value.notify_error ? (u(), _(e(De), {
3038
3058
  key: 0,
3039
3059
  type: "warning",
3040
3060
  closable: !1
3041
3061
  }, {
3042
3062
  default: a(() => [
3043
- F(w(e(l)("panel.notify-failed")), 1)
3063
+ z(k(e(l)("panel.notify-failed")), 1)
3044
3064
  ]),
3045
3065
  _: 1
3046
- })) : c.value.notified_at ? (p(), g(e(J), {
3066
+ })) : i.value.notified_at ? (u(), _(e(J), {
3047
3067
  key: 1,
3048
3068
  size: "sm",
3049
3069
  tone: "muted"
3050
3070
  }, {
3051
3071
  default: a(() => [
3052
- F(w(e(l)("panel.notified")), 1)
3072
+ z(k(e(l)("panel.notified")), 1)
3053
3073
  ]),
3054
3074
  _: 1
3055
- })) : (p(), g(e(J), {
3075
+ })) : (u(), _(e(J), {
3056
3076
  key: 2,
3057
3077
  size: "sm",
3058
3078
  tone: "muted"
3059
3079
  }, {
3060
3080
  default: a(() => [
3061
- F(w(e(l)("panel.not-notified")), 1)
3081
+ z(k(e(l)("panel.not-notified")), 1)
3062
3082
  ]),
3063
3083
  _: 1
3064
3084
  }))
@@ -3073,44 +3093,44 @@ const Ol = /* @__PURE__ */ ae({
3073
3093
  _: 1
3074
3094
  })
3075
3095
  ]),
3076
- j("aside", qt, [
3096
+ G("aside", qt, [
3077
3097
  t(e(se), null, {
3078
3098
  default: a(() => [
3079
- j("div", At, [
3080
- j("label", It, [
3099
+ G("div", At, [
3100
+ G("label", It, [
3081
3101
  t(e(J), {
3082
3102
  size: "sm",
3083
3103
  tone: "muted"
3084
3104
  }, {
3085
3105
  default: a(() => [
3086
- F(w(e(l)("panel.status")), 1)
3106
+ z(k(e(l)("panel.status")), 1)
3087
3107
  ]),
3088
3108
  _: 1
3089
3109
  }),
3090
- t(e(he), {
3091
- "model-value": c.value.status?.id ?? null,
3092
- options: b.value,
3093
- disabled: !S.value,
3094
- "onUpdate:modelValue": le
3110
+ t(e(fe), {
3111
+ "model-value": i.value.status?.id ?? null,
3112
+ options: f.value,
3113
+ disabled: !b.value,
3114
+ "onUpdate:modelValue": he
3095
3115
  }, null, 8, ["model-value", "options", "disabled"])
3096
3116
  ]),
3097
- j("label", Nt, [
3117
+ G("label", Nt, [
3098
3118
  t(e(J), {
3099
3119
  size: "sm",
3100
3120
  tone: "muted"
3101
3121
  }, {
3102
3122
  default: a(() => [
3103
- F(w(e(l)("panel.assignee")), 1)
3123
+ z(k(e(l)("panel.assignee")), 1)
3104
3124
  ]),
3105
3125
  _: 1
3106
3126
  }),
3107
- t(e(he), {
3108
- "model-value": c.value.assignee?.id ?? null,
3109
- options: L.value,
3110
- disabled: !S.value,
3127
+ t(e(fe), {
3128
+ "model-value": i.value.assignee?.id ?? null,
3129
+ options: I.value,
3130
+ disabled: !b.value,
3111
3131
  clearable: "",
3112
3132
  placeholder: e(l)("panel.unassigned"),
3113
- "onUpdate:modelValue": B
3133
+ "onUpdate:modelValue": N
3114
3134
  }, null, 8, ["model-value", "options", "disabled", "placeholder"])
3115
3135
  ])
3116
3136
  ])
@@ -3118,39 +3138,39 @@ const Ol = /* @__PURE__ */ ae({
3118
3138
  _: 1
3119
3139
  })
3120
3140
  ])
3121
- ])) : P("", !0)
3141
+ ])) : H("", !0)
3122
3142
  ]));
3123
3143
  }
3124
- }), Dt = /* @__PURE__ */ ue(Mt, [["__scopeId", "data-v-2163fca6"]]);
3125
- function Rt(i = {}) {
3126
- const o = i.path ?? "/inbox";
3144
+ }), Mt = /* @__PURE__ */ ie(Dt, [["__scopeId", "data-v-2163fca6"]]);
3145
+ function Rt(r = {}) {
3146
+ const s = r.path ?? "/inbox";
3127
3147
  return {
3128
3148
  id: "inbox",
3129
- path: o,
3130
- landing: i.landing ?? !0,
3149
+ path: s,
3150
+ landing: r.landing ?? !0,
3131
3151
  routes: [
3132
3152
  // The section's own path travels as a prop, so a panel that mounted it somewhere else
3133
3153
  // still links between its screens correctly.
3134
- { path: o, name: "webx.inbox", component: ft, props: { base: o } },
3154
+ { path: s, name: "webx.inbox", component: ft, props: { base: s } },
3135
3155
  {
3136
- path: `${o}/statuses`,
3156
+ path: `${s}/statuses`,
3137
3157
  name: "webx.inbox.statuses",
3138
3158
  component: kt,
3139
- props: { base: o }
3159
+ props: { base: s }
3140
3160
  },
3141
3161
  {
3142
- path: `${o}/forms/:id(\\d+)`,
3162
+ path: `${s}/forms/:id(\\d+)`,
3143
3163
  name: "webx.inbox.form",
3144
3164
  component: lt,
3145
- props: { base: o }
3165
+ props: { base: s }
3146
3166
  },
3147
3167
  // A submission has an address of its own, not a dialog over the list (§11): it goes in
3148
3168
  // the mail to whoever deals with it, it gets pasted into a chat, an agent links to it.
3149
3169
  {
3150
- path: `${o}/submissions/:id(\\d+)`,
3170
+ path: `${s}/submissions/:id(\\d+)`,
3151
3171
  name: "webx.inbox.submission",
3152
- component: Dt,
3153
- props: { base: o }
3172
+ component: Mt,
3173
+ props: { base: s }
3154
3174
  }
3155
3175
  ]
3156
3176
  };
@@ -3158,15 +3178,15 @@ function Rt(i = {}) {
3158
3178
  export {
3159
3179
  Cl as FIELD_TYPES,
3160
3180
  zl as STATUS_COLORS,
3161
- El as WxInboxFieldList,
3181
+ Ol as WxInboxFieldList,
3162
3182
  lt as WxInboxFormEditor,
3163
3183
  ft as WxInboxPage,
3164
3184
  kt as WxInboxStatusesPage,
3165
3185
  pt as WxInboxSubmissionList,
3166
- Dt as WxInboxSubmissionPage,
3186
+ Mt as WxInboxSubmissionPage,
3167
3187
  re as createInboxApi,
3168
3188
  Rt as inbox,
3169
3189
  Sl as inboxMessages,
3170
- pe as option
3190
+ ce as option
3171
3191
  };
3172
3192
  //# sourceMappingURL=index.js.map