@webx-ui/module-inbox 0.1.0 → 0.2.0

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