@agile-team/mach-report 2.11.0 → 2.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/designer.js CHANGED
@@ -1,48 +1,48 @@
1
- import { ref as N, computed as z, watch as ee, onMounted as mt, onBeforeUnmount as Ae, nextTick as me, defineComponent as Ge, openBlock as h, createElementBlock as M, createElementVNode as a, toDisplayString as l, unref as e, createTextVNode as O, withDirectives as ue, isRef as Oe, createCommentVNode as F, vModelSelect as He, normalizeStyle as fe, Fragment as K, renderList as Q, normalizeClass as Pe, withModifiers as vt, createVNode as le, shallowRef as pt, defineAsyncComponent as pe, getCurrentInstance as St, withKeys as Ye, createBlock as Me, vShow as Te, vModelText as rt } from "vue";
2
- import { provideMachReportConfig as _t, createLocalFetcher as It, ReportPreview as $t } from "@agile-team/mach-report/vue";
3
- import { resolveGridLayout as Ce, parseReportTemplate as ne, serializeReportTemplate as xe, validateReportTemplateDocument as dt } from "@agile-team/mach-report";
4
- import { _ as ze, a as re } from "./_plugin-vue_export-helper-8SL1F89S.js";
5
- import { r as Et, a as Lt, b as Rt } from "./list-cell-ClFra1zS.js";
6
- import { c as At } from "./tree-CqcQ99NM.js";
7
- import { r as Ve } from "./style-CQ1PK8ZB.js";
8
- function Dt(t, d, i = 3) {
9
- if (!t.tree) return d.slice(0, i).map((s) => t.columns.map((o) => Et(t, o, s)));
10
- if (d.length > 200) return [];
1
+ import { ref as z, computed as F, watch as ee, onMounted as pt, onBeforeUnmount as Le, nextTick as ce, defineComponent as Ge, openBlock as g, createElementBlock as b, createElementVNode as a, toDisplayString as l, unref as e, createTextVNode as O, withDirectives as ue, isRef as Ve, createCommentVNode as N, vModelSelect as He, normalizeStyle as be, Fragment as q, renderList as Q, normalizeClass as Pe, withModifiers as gt, createVNode as le, shallowRef as ht, defineAsyncComponent as ge, getCurrentInstance as $t, withKeys as Ze, createBlock as Me, vShow as Ae, vModelText as ut } from "vue";
2
+ import { provideMachReportConfig as Et, createLocalFetcher as Rt, ReportPreview as Tt } from "@agile-team/mach-report/vue";
3
+ import { resolveGridLayout as Se, parseReportTemplate as ae, serializeReportTemplate as ke, validateReportTemplateDocument as ct } from "@agile-team/mach-report";
4
+ import { _ as Fe, a as re } from "./_plugin-vue_export-helper-8SL1F89S.js";
5
+ import { r as Lt, a as Dt, b as At } from "./list-cell-ClFra1zS.js";
6
+ import { c as Pt } from "./tree-CqcQ99NM.js";
7
+ import { r as je } from "./style-CQ1PK8ZB.js";
8
+ function Ht(t, c, i = 3) {
9
+ if (!t.tree) return c.slice(0, i).map((s) => t.columns.map((o) => Lt(t, o, s)));
10
+ if (c.length > 200) return [];
11
11
  try {
12
- return At(d, { ...t.tree, maxRows: Math.min(200, t.tree.maxRows ?? 200), maxAggregationVisits: Math.min(2e3, t.tree.maxAggregationVisits ?? 2e3) }, { computed: t.computed?.length ? { fields: t.computed, maxRows: 200, maxCells: 4096 } : void 0 }).entries.slice(0, i).map((o) => t.columns.map((p) => Lt(t, p, o)));
12
+ return Pt(c, { ...t.tree, maxRows: Math.min(200, t.tree.maxRows ?? 200), maxAggregationVisits: Math.min(2e3, t.tree.maxAggregationVisits ?? 2e3) }, { computed: t.computed?.length ? { fields: t.computed, maxRows: 200, maxCells: 4096 } : void 0 }).entries.slice(0, i).map((o) => t.columns.map((p) => Dt(t, p, o)));
13
13
  } catch {
14
14
  return [];
15
15
  }
16
16
  }
17
- const Qe = 96 / 25.4;
18
- function tt(t) {
17
+ const et = 96 / 25.4;
18
+ function at(t) {
19
19
  return t.kind === "list" ? Math.max(
20
20
  16,
21
21
  (t.headerGrid?.rowHeightsMm?.reduce(
22
- (d, i) => d + i,
22
+ (c, i) => c + i,
23
23
  0
24
24
  ) ?? 8) + (t.rowHeightMm ?? 8) * 3
25
25
  ) : t.heightMm;
26
26
  }
27
- function be(t) {
27
+ function ye(t) {
28
28
  return {
29
29
  leftMm: t.leftMm,
30
30
  topMm: t.topMm,
31
31
  widthMm: t.widthMm,
32
- heightMm: tt(t)
32
+ heightMm: at(t)
33
33
  };
34
34
  }
35
- function Re(t, d) {
36
- return d ? t.template.pages[d.pageIndex]?.components[d.componentIndex] : void 0;
35
+ function Te(t, c) {
36
+ return c ? t.template.pages[c.pageIndex]?.components[c.componentIndex] : void 0;
37
37
  }
38
- function Tt(t, d = "detail") {
38
+ function Gt(t, c = "detail") {
39
39
  const i = { leftMm: 10, topMm: 10, widthMm: 60, heightMm: 10 };
40
40
  return t === "list" ? {
41
41
  kind: t,
42
42
  leftMm: 10,
43
43
  topMm: 30,
44
44
  widthMm: 90,
45
- dataset: d,
45
+ dataset: c,
46
46
  columns: [
47
47
  { header: "字段", field: "field", widthMm: 45 },
48
48
  { header: "数值", field: "value", widthMm: 45 }
@@ -71,27 +71,27 @@ function Tt(t, d = "detail") {
71
71
  imageData: `data:image/svg+xml;charset=utf-8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="180" height="90" viewBox="0 0 180 90"><rect width="180" height="90" rx="5" fill="#eff6ff"/><path d="m25 68 32-32 25 23 27-35 45 44" fill="none" stroke="#94b8e5" stroke-width="3"/><circle cx="45" cy="24" r="7" fill="#bfd5ef"/></svg>')}`
72
72
  };
73
73
  }
74
- function Ze(t, d, i = !1) {
75
- const s = Math.max(2, Math.min(d.widthMm, t.widthMm)), o = Math.max(2, Math.min(d.heightMm, t.heightMm));
74
+ function tt(t, c, i = !1) {
75
+ const s = Math.max(2, Math.min(c.widthMm, t.widthMm)), o = Math.max(2, Math.min(c.heightMm, t.heightMm));
76
76
  return {
77
- leftMm: Math.max(0, Math.min(d.widthMm - s, t.leftMm)),
77
+ leftMm: Math.max(0, Math.min(c.widthMm - s, t.leftMm)),
78
78
  topMm: Math.max(
79
79
  0,
80
- Math.min(d.heightMm - (i ? 2 : o), t.topMm)
80
+ Math.min(c.heightMm - (i ? 2 : o), t.topMm)
81
81
  ),
82
82
  widthMm: s,
83
83
  heightMm: o
84
84
  };
85
85
  }
86
- function je(t, d) {
86
+ function Ue(t, c) {
87
87
  const i = t.widthMm;
88
88
  if (Object.assign(t, {
89
- leftMm: d.leftMm,
90
- topMm: d.topMm,
91
- widthMm: d.widthMm
92
- }), t.kind !== "list") t.heightMm = d.heightMm;
93
- else if (i > 0 && d.widthMm !== i) {
94
- const s = d.widthMm / i;
89
+ leftMm: c.leftMm,
90
+ topMm: c.topMm,
91
+ widthMm: c.widthMm
92
+ }), t.kind !== "list") t.heightMm = c.heightMm;
93
+ else if (i > 0 && c.widthMm !== i) {
94
+ const s = c.widthMm / i;
95
95
  t.columns.forEach((o) => {
96
96
  o.widthMm = Math.round(o.widthMm * s * 100) / 100;
97
97
  }), t.widthMm = t.columns.reduce(
@@ -102,235 +102,235 @@ function je(t, d) {
102
102
  ));
103
103
  }
104
104
  }
105
- function Pt(t, d, i) {
106
- if (d === i || !t.columns[d] || !t.columns[i]) return !1;
105
+ function Ft(t, c, i) {
106
+ if (c === i || !t.columns[c] || !t.columns[i]) return !1;
107
107
  if (t.headerGrid) {
108
- if (Ce(t.headerGrid, t.widthMm, 100).cells.some(({ cell: p }) => (p.colSpan ?? 1) > 1))
108
+ if (Se(t.headerGrid, t.widthMm, 100).cells.some(({ cell: p }) => (p.colSpan ?? 1) > 1))
109
109
  throw new Error("请先拆分跨列合并表头,再调整列顺序,避免改变业务分组。");
110
110
  const o = We(t);
111
111
  o.forEach((p) => {
112
- p.splice(i, 0, p.splice(d, 1)[0]);
113
- }), t.headerGrid = Ue(
112
+ p.splice(i, 0, p.splice(c, 1)[0]);
113
+ }), t.headerGrid = Ke(
114
114
  o,
115
115
  t.columns.map((p) => p.widthMm),
116
116
  t.headerGrid.rowHeightsMm ?? o.map(() => 8)
117
117
  );
118
118
  }
119
- return t.columns.splice(i, 0, t.columns.splice(d, 1)[0]), t.headerGrid && (t.headerGrid.colWidthsMm = t.columns.map((s) => s.widthMm)), !0;
119
+ return t.columns.splice(i, 0, t.columns.splice(c, 1)[0]), t.headerGrid && (t.headerGrid.colWidthsMm = t.columns.map((s) => s.widthMm)), !0;
120
120
  }
121
121
  function We(t) {
122
122
  if (!t.headerGrid)
123
123
  return [t.columns.map((i) => ({ text: i.header }))];
124
- const d = Array.from(
124
+ const c = Array.from(
125
125
  { length: t.headerGrid.cells.length },
126
126
  () => Array.from({ length: t.columns.length }, () => null)
127
127
  );
128
- for (const { cell: i, ri: s, ci: o } of Ce(
128
+ for (const { cell: i, ri: s, ci: o } of Se(
129
129
  t.headerGrid,
130
130
  t.widthMm,
131
131
  100
132
132
  ).cells)
133
- d[s][o] = i;
134
- return d;
133
+ c[s][o] = i;
134
+ return c;
135
135
  }
136
- function Ue(t, d, i) {
136
+ function Ke(t, c, i) {
137
137
  const s = /* @__PURE__ */ new Set();
138
138
  return { cells: t.map(
139
- (p, g) => p.flatMap((x, f) => {
140
- if (s.has(`${g}:${f}`)) return [];
141
- if (!x) return [null];
142
- for (let m = g; m < g + (x.rowSpan ?? 1); m++)
143
- for (let b = f; b < f + (x.colSpan ?? 1); b++)
144
- (m !== g || b !== f) && s.add(`${m}:${b}`);
145
- return [x];
139
+ (p, h) => p.flatMap((M, f) => {
140
+ if (s.has(`${h}:${f}`)) return [];
141
+ if (!M) return [null];
142
+ for (let m = h; m < h + (M.rowSpan ?? 1); m++)
143
+ for (let y = f; y < f + (M.colSpan ?? 1); y++)
144
+ (m !== h || y !== f) && s.add(`${m}:${y}`);
145
+ return [M];
146
146
  })
147
- ), colWidthsMm: d, rowHeightsMm: i };
147
+ ), colWidthsMm: c, rowHeightsMm: i };
148
148
  }
149
- function Ht(t) {
150
- const d = We(t), i = t.headerGrid?.rowHeightsMm ?? d.map(() => 8);
151
- d.unshift(
149
+ function Nt(t) {
150
+ const c = We(t), i = t.headerGrid?.rowHeightsMm ?? c.map(() => 8);
151
+ c.unshift(
152
152
  t.columns.map(() => ({
153
153
  text: "分组",
154
154
  style: { align: "center", backgroundColor: "#eaf2fc", bold: !0 }
155
155
  }))
156
- ), t.headerGrid = Ue(
157
- d,
156
+ ), t.headerGrid = Ke(
157
+ c,
158
158
  t.columns.map((s) => s.widthMm),
159
159
  [8, ...i]
160
160
  );
161
161
  }
162
- function Gt(t, d, i, s) {
162
+ function zt(t, c, i, s) {
163
163
  if (i >= s || i < 0 || s >= t.columns.length)
164
164
  throw new Error("请选择同一行的至少两个连续表头。");
165
- const o = We(t), p = o[d];
165
+ const o = We(t), p = o[c];
166
166
  if (!p) throw new Error("表头行不存在。");
167
- const g = p.slice(i, s + 1);
168
- if (g.some(
167
+ const h = p.slice(i, s + 1);
168
+ if (h.some(
169
169
  (f) => !f || (f.colSpan ?? 1) !== 1 || (f.rowSpan ?? 1) !== 1
170
170
  ))
171
171
  throw new Error("选择包含合并区域,请先拆分,再重新合并。");
172
- const x = g[0];
173
- p[i] = { ...x, colSpan: s - i + 1 };
172
+ const M = h[0];
173
+ p[i] = { ...M, colSpan: s - i + 1 };
174
174
  for (let f = i + 1; f <= s; f++) p[f] = null;
175
- t.headerGrid = Ue(
175
+ t.headerGrid = Ke(
176
176
  o,
177
177
  t.columns.map((f) => f.widthMm),
178
178
  t.headerGrid?.rowHeightsMm ?? [8]
179
179
  );
180
180
  }
181
- function zt(t, d, i) {
181
+ function Ot(t, c, i) {
182
182
  if (!t.headerGrid) return;
183
- const o = Ce(t.headerGrid, t.widthMm, 100).cells.find(
184
- ({ ri: m, ci: b, cell: T }) => d >= m && d < m + (T.rowSpan ?? 1) && i >= b && i < b + (T.colSpan ?? 1)
183
+ const o = Se(t.headerGrid, t.widthMm, 100).cells.find(
184
+ ({ ri: m, ci: y, cell: A }) => c >= m && c < m + (A.rowSpan ?? 1) && i >= y && i < y + (A.colSpan ?? 1)
185
185
  );
186
186
  if (!o) return;
187
- const p = We(t), { ri: g, ci: x, cell: f } = o;
188
- for (let m = g; m < g + (f.rowSpan ?? 1); m++)
189
- for (let b = x; b < x + (f.colSpan ?? 1); b++) {
190
- const T = {
187
+ const p = We(t), { ri: h, ci: M, cell: f } = o;
188
+ for (let m = h; m < h + (f.rowSpan ?? 1); m++)
189
+ for (let y = M; y < M + (f.colSpan ?? 1); y++) {
190
+ const A = {
191
191
  ...f,
192
- text: m === p.length - 1 ? t.columns[b].header : f.text
192
+ text: m === p.length - 1 ? t.columns[y].header : f.text
193
193
  };
194
- delete T.colSpan, delete T.rowSpan, p[m][b] = T;
194
+ delete A.colSpan, delete A.rowSpan, p[m][y] = A;
195
195
  }
196
- t.headerGrid = Ue(
196
+ t.headerGrid = Ke(
197
197
  p,
198
198
  t.columns.map((m) => m.widthMm),
199
199
  t.headerGrid.rowHeightsMm ?? p.map(() => 8)
200
200
  );
201
201
  }
202
- function Ft(t) {
203
- const d = N(), i = N(0.8), s = N(0), o = N(0), p = z(() => i.value * Qe), g = z(() => t.document.template.pages[t.pageIndex]), x = z(() => g.value.widthMm * p.value > o.value - 40);
202
+ function Bt(t) {
203
+ const c = z(), i = z(0.8), s = z(0), o = z(0), p = F(() => i.value * et), h = F(() => t.document.template.pages[t.pageIndex]), M = F(() => h.value.widthMm * p.value > o.value - 40);
204
204
  let f;
205
205
  function m(I) {
206
- const v = d.value;
206
+ const v = c.value;
207
207
  if (!v) return;
208
- let u = { leftMm: 0, topMm: 0, widthMm: g.value.widthMm, heightMm: g.value.heightMm };
209
- const S = t.selection?.pageIndex === t.pageIndex ? g.value.components[t.selection.componentIndex] : void 0;
210
- I === "selection" && S && (u = be(S));
211
- const C = (v.clientWidth - 40) / (u.widthMm * Qe), L = (v.clientHeight - 40) / (u.heightMm * Qe);
212
- i.value = Math.max(0.05, Math.min(2, I === "width" ? C : Math.min(C, L))), me(() => {
213
- v.scrollLeft = u.leftMm * p.value, v.scrollTop = u.topMm * p.value;
208
+ let d = { leftMm: 0, topMm: 0, widthMm: h.value.widthMm, heightMm: h.value.heightMm };
209
+ const C = t.selection?.pageIndex === t.pageIndex ? h.value.components[t.selection.componentIndex] : void 0;
210
+ I === "selection" && C && (d = ye(C));
211
+ const S = (v.clientWidth - 40) / (d.widthMm * et), R = (v.clientHeight - 40) / (d.heightMm * et);
212
+ i.value = Math.max(0.05, Math.min(2, I === "width" ? S : Math.min(S, R))), ce(() => {
213
+ v.scrollLeft = d.leftMm * p.value, v.scrollTop = d.topMm * p.value;
214
214
  });
215
215
  }
216
- function b() {
217
- const I = d.value;
216
+ function y() {
217
+ const I = c.value;
218
218
  I && (o.value = I.clientWidth, s.value = I.scrollWidth > I.clientWidth ? Math.round(I.scrollLeft / (I.scrollWidth - I.clientWidth) * 100) : 0);
219
219
  }
220
- function T(I) {
221
- const v = d.value;
220
+ function A(I) {
221
+ const v = c.value;
222
222
  v && (v.scrollLeft = (v.scrollWidth - v.clientWidth) * I / 100), s.value = I;
223
223
  }
224
- async function R() {
225
- await me();
226
- const I = d.value, v = t.selection;
224
+ async function T() {
225
+ await ce();
226
+ const I = c.value, v = t.selection;
227
227
  if (!I || v?.pageIndex !== t.pageIndex) return;
228
- const u = g.value.components[v.componentIndex];
229
- if (!u) return;
230
- const S = be(u);
231
- if (u.kind === "list" && t.columnIndex !== void 0 && t.columnIndex >= 0) {
232
- const $ = u;
233
- S.leftMm += $.columns.slice(0, t.columnIndex).reduce((D, H) => D + H.widthMm, 0), S.widthMm = $.columns[t.columnIndex]?.widthMm ?? S.widthMm;
228
+ const d = h.value.components[v.componentIndex];
229
+ if (!d) return;
230
+ const C = ye(d);
231
+ if (d.kind === "list" && t.columnIndex !== void 0 && t.columnIndex >= 0) {
232
+ const E = d;
233
+ C.leftMm += E.columns.slice(0, t.columnIndex).reduce((D, H) => D + H.widthMm, 0), C.widthMm = E.columns[t.columnIndex]?.widthMm ?? C.widthMm;
234
234
  }
235
- const C = S.leftMm * p.value, L = S.topMm * p.value, y = C + S.widthMm * p.value, _ = L + S.heightMm * p.value;
236
- C < I.scrollLeft ? I.scrollLeft = C : y > I.scrollLeft + I.clientWidth - 40 && (I.scrollLeft = Math.max(0, Math.min(C, y - I.clientWidth + 40))), L < I.scrollTop ? I.scrollTop = L : _ > I.scrollTop + I.clientHeight - 40 && (I.scrollTop = Math.max(0, Math.min(L, _ - I.clientHeight + 40))), b();
235
+ const S = C.leftMm * p.value, R = C.topMm * p.value, w = S + C.widthMm * p.value, _ = R + C.heightMm * p.value;
236
+ S < I.scrollLeft ? I.scrollLeft = S : w > I.scrollLeft + I.clientWidth - 40 && (I.scrollLeft = Math.max(0, Math.min(S, w - I.clientWidth + 40))), R < I.scrollTop ? I.scrollTop = R : _ > I.scrollTop + I.clientHeight - 40 && (I.scrollTop = Math.max(0, Math.min(R, _ - I.clientHeight + 40))), y();
237
237
  }
238
238
  return ee(() => [t.selection, t.columnIndex, t.pageIndex], () => {
239
- R();
240
- }), mt(() => {
241
- b(), typeof ResizeObserver < "u" && d.value && (f = new ResizeObserver(b), f.observe(d.value));
242
- }), Ae(() => f?.disconnect()), { viewport: d, zoom: i, scale: p, page: g, wide: x, fraction: s, fit: m, sync: b, navigate: T };
239
+ T();
240
+ }), pt(() => {
241
+ y(), typeof ResizeObserver < "u" && c.value && (f = new ResizeObserver(y), f.observe(c.value));
242
+ }), Le(() => f?.disconnect()), { viewport: c, zoom: i, scale: p, page: h, wide: M, fraction: s, fit: m, sync: y, navigate: A };
243
243
  }
244
- function ut(t, d, i) {
245
- const s = t.filter((o) => o !== d).flatMap((o) => {
246
- const p = o[i], g = i === "leftMm" ? o.widthMm : tt(o);
247
- return [p, p + g / 2, p + g];
244
+ function mt(t, c, i) {
245
+ const s = t.filter((o) => o !== c).flatMap((o) => {
246
+ const p = o[i], h = i === "leftMm" ? o.widthMm : at(o);
247
+ return [p, p + h / 2, p + h];
248
248
  });
249
249
  return [...new Set(s)].sort((o, p) => o - p);
250
250
  }
251
- function Nt(t, d) {
251
+ function Vt(t, c) {
252
252
  if (!t.length) return;
253
253
  let i = 0, s = t.length;
254
254
  for (; i < s; ) {
255
- const g = i + s >>> 1;
256
- t[g] < d ? i = g + 1 : s = g;
255
+ const h = i + s >>> 1;
256
+ t[h] < c ? i = h + 1 : s = h;
257
257
  }
258
258
  const o = t[Math.max(0, i - 1)], p = t[Math.min(t.length - 1, i)];
259
- return Math.abs(o - d) < Math.abs(p - d) ? o : p;
259
+ return Math.abs(o - c) < Math.abs(p - c) ? o : p;
260
260
  }
261
- function ct(t, d, i, s) {
261
+ function vt(t, c, i, s) {
262
262
  let o = 1 / 0, p = {
263
263
  value: Math.round(t * 2) / 2
264
264
  };
265
- for (const g of [0, d / 2, d]) {
266
- const x = Nt(i, t + g);
267
- if (x === void 0) continue;
268
- const f = Math.abs(x - t - g);
269
- f <= s && f < o && (o = f, p = { value: x - g, guide: x });
265
+ for (const h of [0, c / 2, c]) {
266
+ const M = Vt(i, t + h);
267
+ if (M === void 0) continue;
268
+ const f = Math.abs(M - t - h);
269
+ f <= s && f < o && (o = f, p = { value: M - h, guide: M });
270
270
  }
271
271
  return p;
272
272
  }
273
- function Bt(t) {
274
- let d;
273
+ function jt(t) {
274
+ let c;
275
275
  function i(s, o, p = !1) {
276
276
  if (t.disabled() || s.button !== 0) return;
277
- s.preventDefault(), s.stopPropagation(), d?.();
278
- const g = s.currentTarget.closest(
277
+ s.preventDefault(), s.stopPropagation(), c?.();
278
+ const h = s.currentTarget.closest(
279
279
  "[data-canvas-component]"
280
- ), x = be(o), f = s.clientX, m = s.clientY;
281
- let b = x, T = 0;
282
- const R = t.scale.value, I = g.parentElement;
283
- let v, u;
284
- const S = () => {
285
- for (const [G, B] of [
280
+ ), M = ye(o), f = s.clientX, m = s.clientY;
281
+ let y = M, A = 0;
282
+ const T = t.scale.value, I = h.parentElement;
283
+ let v, d;
284
+ const C = () => {
285
+ for (const [G, U] of [
286
286
  ["x", v],
287
- ["y", u]
287
+ ["y", d]
288
288
  ])
289
289
  I.style.setProperty(
290
290
  `--mr-canvas-guide-${G}-display`,
291
- B === void 0 ? "none" : "block"
292
- ), B !== void 0 && I.style.setProperty(
291
+ U === void 0 ? "none" : "block"
292
+ ), U !== void 0 && I.style.setProperty(
293
293
  `--mr-canvas-guide-${G}`,
294
- `${B * R}px`
294
+ `${U * T}px`
295
295
  );
296
- }, C = () => {
297
- T = 0, S(), g.style.left = `${b.leftMm * R}px`, g.style.top = `${b.topMm * R}px`, g.style.width = `${b.widthMm * R}px`, g.style.height = `${b.heightMm * R}px`;
298
- }, L = {
299
- leftMm: ut(t.page().components, o, "leftMm"),
300
- topMm: ut(t.page().components, o, "topMm")
301
- }, y = (G) => {
302
- const B = (G.clientX - f) / R, q = (G.clientY - m) / R, ae = ct(
303
- x.leftMm + B,
304
- x.widthMm,
305
- L.leftMm,
306
- 5 / R
307
- ), n = ct(
308
- x.topMm + q,
309
- x.heightMm,
310
- L.topMm,
311
- 5 / R
296
+ }, S = () => {
297
+ A = 0, C(), h.style.left = `${y.leftMm * T}px`, h.style.top = `${y.topMm * T}px`, h.style.width = `${y.widthMm * T}px`, h.style.height = `${y.heightMm * T}px`;
298
+ }, R = {
299
+ leftMm: mt(t.page().components, o, "leftMm"),
300
+ topMm: mt(t.page().components, o, "topMm")
301
+ }, w = (G) => {
302
+ const U = (G.clientX - f) / T, X = (G.clientY - m) / T, te = vt(
303
+ M.leftMm + U,
304
+ M.widthMm,
305
+ R.leftMm,
306
+ 5 / T
307
+ ), n = vt(
308
+ M.topMm + X,
309
+ M.heightMm,
310
+ R.topMm,
311
+ 5 / T
312
312
  );
313
- v = p ? void 0 : ae.guide, u = p ? void 0 : n.guide, b = Ze(
313
+ v = p ? void 0 : te.guide, d = p ? void 0 : n.guide, y = tt(
314
314
  p ? {
315
- ...x,
316
- widthMm: Math.round((x.widthMm + B) * 2) / 2,
317
- heightMm: Math.round((x.heightMm + q) * 2) / 2
318
- } : { ...x, leftMm: ae.value, topMm: n.value },
315
+ ...M,
316
+ widthMm: Math.round((M.widthMm + U) * 2) / 2,
317
+ heightMm: Math.round((M.heightMm + X) * 2) / 2
318
+ } : { ...M, leftMm: te.value, topMm: n.value },
319
319
  t.page(),
320
320
  o.kind === "list"
321
- ), T || (T = requestAnimationFrame(C));
321
+ ), A || (A = requestAnimationFrame(S));
322
322
  }, _ = (G) => {
323
- window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", D), window.removeEventListener("keydown", H), T && cancelAnimationFrame(T), b = G ? b : x, v = void 0, u = void 0, C(), d = void 0, G && JSON.stringify(b) !== JSON.stringify(x) && t.commit(b);
324
- }, $ = () => _(!0), D = () => _(!1), H = (G) => {
323
+ window.removeEventListener("pointermove", w), window.removeEventListener("pointerup", E), window.removeEventListener("pointercancel", D), window.removeEventListener("keydown", H), A && cancelAnimationFrame(A), y = G ? y : M, v = void 0, d = void 0, S(), c = void 0, G && JSON.stringify(y) !== JSON.stringify(M) && t.commit(y);
324
+ }, E = () => _(!0), D = () => _(!1), H = (G) => {
325
325
  G.key === "Escape" && (G.preventDefault(), D());
326
326
  };
327
- window.addEventListener("pointermove", y), window.addEventListener("pointerup", $), window.addEventListener("pointercancel", D), window.addEventListener("keydown", H), d = D;
327
+ window.addEventListener("pointermove", w), window.addEventListener("pointerup", E), window.addEventListener("pointercancel", D), window.addEventListener("keydown", H), c = D;
328
328
  }
329
329
  return ee(t.disabled, (s) => {
330
- s && d?.();
331
- }), ee(t.page, () => d?.()), Ae(() => d?.()), { start: i };
330
+ s && c?.();
331
+ }), ee(t.page, () => c?.()), Le(() => c?.()), { start: i };
332
332
  }
333
- const Ot = {
333
+ const Ut = {
334
334
  title: "报表模板设计器",
335
335
  heading: "模板设计",
336
336
  unpublished: "未发布",
@@ -363,7 +363,7 @@ const Ot = {
363
363
  applyJson: "校验并应用 JSON",
364
364
  note: "字段映射应与数据源契约一致。此编辑器维护模板属性;保存由接入方提供的版本服务处理。",
365
365
  invalid: "请先修正模板错误,再预览或保存。"
366
- }, Vt = {
366
+ }, Wt = {
367
367
  repeatPage: "每页重复",
368
368
  repeatNone: "不重复",
369
369
  repeatHeader: "页眉",
@@ -424,6 +424,15 @@ const Ot = {
424
424
  rulesTool: "计算与规则",
425
425
  reviewTool: "发布检查",
426
426
  toolsDescription: "按需绑定数据、定义规则并验证模板。",
427
+ unapplied: "待应用",
428
+ pendingToolsLabel: "待处理配置",
429
+ pendingToolsHint: "应用或恢复后可保存",
430
+ saveReadonly: "当前为只读,无法保存",
431
+ saveConfirmation: "请先处理修改确认",
432
+ saveUnchanged: "没有需要保存的修改",
433
+ saveInvalid: "模板有错误,请先修正",
434
+ saveJsonPending: "完整 JSON 待应用",
435
+ returnToConfiguration: "返回配置",
427
436
  rulesNeedList: "请先在字段区域选择明细表。",
428
437
  undo: "撤销",
429
438
  redo: "重做",
@@ -466,7 +475,7 @@ const Ot = {
466
475
  technicalDetails: "标识与修订",
467
476
  fieldPosition: "当前字段",
468
477
  previewFieldDirectory: "定位字段"
469
- }, Ke = {
478
+ }, Je = {
470
479
  fitWidth: "适宽",
471
480
  fitPage: "适页",
472
481
  fitSelection: "选区",
@@ -484,24 +493,24 @@ const Ot = {
484
493
  unlockSelection: "解锁位置",
485
494
  sessionLock: "位置锁定仅当前设计会话有效。",
486
495
  toolsPending: "工具中还有未应用的配置,请先应用或恢复后再保存模板。",
487
- ...Ot,
488
- ...Vt
489
- }, jt = { class: "mr-canvas" }, Wt = { class: "mr-canvas-heading" }, Ut = { class: "mr-canvas-view-tools" }, Kt = ["disabled"], Jt = ["aria-label"], qt = ["value"], Xt = ["data-canvas-component", "aria-label", "aria-pressed", "tabindex", "onFocus", "onPointerdown", "onClick", "onKeydown"], Yt = { class: "mr-canvas-table" }, Qt = {
496
+ ...Ut,
497
+ ...Wt
498
+ }, Kt = { class: "mr-canvas" }, Jt = { class: "mr-canvas-heading" }, qt = { class: "mr-canvas-view-tools" }, Xt = ["disabled"], Yt = ["aria-label"], Qt = ["value"], Zt = ["data-canvas-component", "aria-label", "aria-pressed", "tabindex", "onFocus", "onPointerdown", "onClick", "onKeydown"], en = { class: "mr-canvas-table" }, tn = {
490
499
  key: 1,
491
500
  class: "mr-canvas-table-row is-header"
492
- }, Zt = ["onPointerdown"], en = {
501
+ }, nn = ["onPointerdown"], an = {
493
502
  key: 2,
494
503
  class: "mr-canvas-placeholder"
495
- }, tn = ["aria-label", "onPointerdown"], nn = {
504
+ }, on = ["aria-label", "onPointerdown"], ln = {
496
505
  key: 1,
497
506
  class: "mr-canvas-static-grid"
498
- }, an = {
507
+ }, sn = {
499
508
  key: 0,
500
509
  class: "mr-canvas-grid-limit"
501
- }, on = ["src"], ln = ["aria-label", "onPointerdown"], sn = {
510
+ }, rn = ["src"], dn = ["aria-label", "onPointerdown"], un = {
502
511
  key: 0,
503
512
  class: "mr-canvas-navigator"
504
- }, rn = ["value", "aria-label"], dn = /* @__PURE__ */ Ge({
513
+ }, cn = ["value", "aria-label"], mn = /* @__PURE__ */ Ge({
505
514
  __name: "TemplateDesignCanvas",
506
515
  props: {
507
516
  document: {},
@@ -516,8 +525,8 @@ const Ot = {
516
525
  messages: {}
517
526
  },
518
527
  emits: ["select", "geometry", "column", "width"],
519
- setup(t, { emit: d }) {
520
- const i = t, s = d, o = z(() => ({ ...Ke, ...i.messages })), { viewport: p, zoom: g, scale: x, page: f, wide: m, fraction: b, fit: T, sync: R, navigate: I } = Ft({ get document() {
528
+ setup(t, { emit: c }) {
529
+ const i = t, s = c, o = F(() => ({ ...Je, ...i.messages })), { viewport: p, zoom: h, scale: M, page: f, wide: m, fraction: y, fit: A, sync: T, navigate: I } = Bt({ get document() {
521
530
  return i.document;
522
531
  }, get pageIndex() {
523
532
  return i.pageIndex;
@@ -525,134 +534,134 @@ const Ot = {
525
534
  return i.selection;
526
535
  }, get columnIndex() {
527
536
  return i.activeColumnIndex;
528
- } }), v = z(() => i.disabled === !0 || i.geometryDisabled === !0 || !!f.value.flow), u = z(() => f.value.components.map((n) => n.kind === "list" ? Dt(n, i.datasets?.[n.dataset] ?? [], f.value.flow || n.cardinality === "record" ? 1 : 3) : []));
529
- function S(n, w, k) {
530
- return { width: `${w * x.value}px`, opacity: k ? 0.35 : 1, textAlign: n.style?.align, paddingLeft: n.indentMm ? `${n.indentMm * x.value}px` : void 0, color: n.style?.color, backgroundColor: n.style?.backgroundColor, fontWeight: n.style?.bold ? "700" : "400", fontSize: `${Ve(n.style).fontSizePx * g.value}px` };
537
+ } }), v = F(() => i.disabled === !0 || i.geometryDisabled === !0 || !!f.value.flow), d = F(() => f.value.components.map((n) => n.kind === "list" ? Ht(n, i.datasets?.[n.dataset] ?? [], f.value.flow || n.cardinality === "record" ? 1 : 3) : []));
538
+ function C(n, x, k) {
539
+ return { width: `${x * M.value}px`, opacity: k ? 0.35 : 1, textAlign: n.style?.align, paddingLeft: n.indentMm ? `${n.indentMm * M.value}px` : void 0, color: n.style?.color, backgroundColor: n.style?.backgroundColor, fontWeight: n.style?.bold ? "700" : "400", fontSize: `${je(n.style).fontSizePx * h.value}px` };
531
540
  }
532
- function C(n) {
541
+ function S(n) {
533
542
  return i.locked?.({ pageIndex: i.pageIndex, componentIndex: n }) === !0;
534
543
  }
535
- function L(n, w) {
536
- s("select", { pageIndex: i.pageIndex, componentIndex: w, additive: n.ctrlKey || n.metaKey || n.shiftKey }), !n.ctrlKey && !n.metaKey && !n.shiftKey && !C(w) && y.start(n, f.value.components[w]);
544
+ function R(n, x) {
545
+ s("select", { pageIndex: i.pageIndex, componentIndex: x, additive: n.ctrlKey || n.metaKey || n.shiftKey }), !n.ctrlKey && !n.metaKey && !n.shiftKey && !S(x) && w.start(n, f.value.components[x]);
537
546
  }
538
- const y = Bt({
539
- scale: x,
547
+ const w = jt({
548
+ scale: M,
540
549
  page: () => f.value,
541
550
  disabled: () => v.value,
542
551
  commit: (n) => s("geometry", n)
543
552
  });
544
553
  function _(n) {
545
- return (i.selections ?? (i.selection ? [i.selection] : [])).some((w) => w.pageIndex === i.pageIndex && w.componentIndex === n);
554
+ return (i.selections ?? (i.selection ? [i.selection] : [])).some((x) => x.pageIndex === i.pageIndex && x.componentIndex === n);
546
555
  }
547
- function $(n) {
548
- const w = f.value.components[n], k = w.kind === "list" ? w.id : w.nid, A = f.value.flow?.bands.find((P) => P.componentIds.includes(k ?? "")), E = A && w.kind === "list" ? A.topMm + A.heightMm - w.topMm : tt(w);
556
+ function E(n) {
557
+ const x = f.value.components[n], k = x.kind === "list" ? x.id : x.nid, L = f.value.flow?.bands.find((P) => P.componentIds.includes(k ?? "")), $ = L && x.kind === "list" ? L.topMm + L.heightMm - x.topMm : at(x);
549
558
  return {
550
- left: `${w.leftMm * x.value}px`,
551
- top: `${w.topMm * x.value}px`,
552
- width: `${w.widthMm * x.value}px`,
553
- height: `${E * x.value}px`
559
+ left: `${x.leftMm * M.value}px`,
560
+ top: `${x.topMm * M.value}px`,
561
+ width: `${x.widthMm * M.value}px`,
562
+ height: `${$ * M.value}px`
554
563
  };
555
564
  }
556
- function D(n, w) {
557
- const k = f.value.components[w];
558
- if (v.value || C(w) || !_(w)) return;
559
- const A = {
565
+ function D(n, x) {
566
+ const k = f.value.components[x];
567
+ if (v.value || S(x) || !_(x)) return;
568
+ const L = {
560
569
  ArrowLeft: [-1, 0],
561
570
  ArrowRight: [1, 0],
562
571
  ArrowUp: [0, -1],
563
572
  ArrowDown: [0, 1]
564
- }, E = A[n.key];
565
- if (!E) return;
573
+ }, $ = L[n.key];
574
+ if (!$) return;
566
575
  n.preventDefault(), n.stopPropagation();
567
- const P = be(k), W = n.shiftKey ? 5 : 0.5;
568
- P.leftMm += E[0] * W, P.topMm += E[1] * W, s("geometry", P);
576
+ const P = ye(k), B = n.shiftKey ? 5 : 0.5;
577
+ P.leftMm += $[0] * B, P.topMm += $[1] * B, s("geometry", P);
569
578
  }
570
579
  function H(n) {
571
- let w = 0;
572
- return n.columns.map((k) => (w += k.widthMm, w));
580
+ let x = 0;
581
+ return n.columns.map((k) => (x += k.widthMm, x));
573
582
  }
574
583
  function G(n) {
575
- return n.grid ? Ce(
584
+ return n.grid ? Se(
576
585
  n.grid,
577
586
  n.widthMm,
578
587
  n.heightMm
579
588
  ).cells.slice(0, 2e3) : [];
580
589
  }
581
- function B(n) {
582
- return n.headerGrid ? Ce(
590
+ function U(n) {
591
+ return n.headerGrid ? Se(
583
592
  n.headerGrid,
584
593
  n.widthMm,
585
594
  n.headerGrid.rowHeightsMm?.reduce(
586
- (w, k) => w + k,
595
+ (x, k) => x + k,
587
596
  0
588
597
  ) ?? n.headerGrid.cells.length * 8
589
598
  ).cells : [];
590
599
  }
591
- let q;
600
+ let X;
592
601
  ee(
593
602
  () => v.value,
594
603
  (n) => {
595
- n && q?.();
604
+ n && X?.();
596
605
  }
597
606
  ), ee(
598
607
  () => i.document,
599
- () => q?.()
600
- ), Ae(() => q?.());
601
- function ae(n, w, k) {
608
+ () => X?.()
609
+ ), Le(() => X?.());
610
+ function te(n, x, k) {
602
611
  if (v.value || n.button !== 0) return;
603
- n.preventDefault(), n.stopPropagation(), q?.();
604
- const A = n.clientX, E = w.columns[k].widthMm;
605
- let P = E;
606
- const W = n.currentTarget, Z = (oe) => {
612
+ n.preventDefault(), n.stopPropagation(), X?.();
613
+ const L = n.clientX, $ = x.columns[k].widthMm;
614
+ let P = $;
615
+ const B = n.currentTarget, Z = (oe) => {
607
616
  P = Math.max(
608
617
  2,
609
- Math.round((E + (oe.clientX - A) / x.value) * 2) / 2
610
- ), W.style.transform = `translateX(${(P - E) * x.value}px)`;
611
- }, Se = () => {
612
- window.removeEventListener("pointermove", Z), window.removeEventListener("pointerup", se), window.removeEventListener("pointercancel", ge), window.removeEventListener("keydown", ce), W.style.transform = "", q = void 0;
613
- }, se = () => {
614
- Se(), P !== E && s("width", k, P);
615
- }, ge = () => Se(), ce = (oe) => {
616
- oe.key === "Escape" && (oe.preventDefault(), ge());
618
+ Math.round(($ + (oe.clientX - L) / M.value) * 2) / 2
619
+ ), B.style.transform = `translateX(${(P - $) * M.value}px)`;
620
+ }, he = () => {
621
+ window.removeEventListener("pointermove", Z), window.removeEventListener("pointerup", fe), window.removeEventListener("pointercancel", se), window.removeEventListener("keydown", me), B.style.transform = "", X = void 0;
622
+ }, fe = () => {
623
+ he(), P !== $ && s("width", k, P);
624
+ }, se = () => he(), me = (oe) => {
625
+ oe.key === "Escape" && (oe.preventDefault(), se());
617
626
  };
618
- window.addEventListener("pointermove", Z), window.addEventListener("pointerup", se), window.addEventListener("pointercancel", ge), window.addEventListener("keydown", ce), q = ge;
627
+ window.addEventListener("pointermove", Z), window.addEventListener("pointerup", fe), window.addEventListener("pointercancel", se), window.addEventListener("keydown", me), X = se;
619
628
  }
620
- return (n, w) => (h(), M("div", jt, [
621
- a("div", Wt, [
629
+ return (n, x) => (g(), b("div", Kt, [
630
+ a("div", Jt, [
622
631
  a("span", null, l(o.value.canvasHint), 1),
623
- a("nav", Ut, [
632
+ a("nav", qt, [
624
633
  a("button", {
625
634
  type: "button",
626
- onClick: w[0] || (w[0] = (k) => e(T)("width"))
635
+ onClick: x[0] || (x[0] = (k) => e(A)("width"))
627
636
  }, l(o.value.fitWidth), 1),
628
637
  a("button", {
629
638
  type: "button",
630
- onClick: w[1] || (w[1] = (k) => e(T)("page"))
639
+ onClick: x[1] || (x[1] = (k) => e(A)("page"))
631
640
  }, l(o.value.fitPage), 1),
632
641
  a("button", {
633
642
  type: "button",
634
643
  disabled: !t.selection,
635
- onClick: w[2] || (w[2] = (k) => e(T)("selection"))
636
- }, l(o.value.fitSelection), 9, Kt)
644
+ onClick: x[2] || (x[2] = (k) => e(A)("selection"))
645
+ }, l(o.value.fitSelection), 9, Xt)
637
646
  ]),
638
647
  a("label", null, [
639
648
  O(l(o.value.zoom), 1),
640
649
  ue(a("select", {
641
- "onUpdate:modelValue": w[3] || (w[3] = (k) => Oe(g) ? g.value = k : null),
650
+ "onUpdate:modelValue": x[3] || (x[3] = (k) => Ve(h) ? h.value = k : null),
642
651
  "aria-label": o.value.zoom
643
652
  }, [
644
- [0.5, 0.8, 1, 1.25].includes(e(g)) ? F("", !0) : (h(), M("option", {
653
+ [0.5, 0.8, 1, 1.25].includes(e(h)) ? N("", !0) : (g(), b("option", {
645
654
  key: 0,
646
- value: e(g)
647
- }, l(Math.round(e(g) * 100)) + "%", 9, qt)),
648
- w[6] || (w[6] = a("option", { value: 0.5 }, "50%", -1)),
649
- w[7] || (w[7] = a("option", { value: 0.8 }, "80%", -1)),
650
- w[8] || (w[8] = a("option", { value: 1 }, "100%", -1)),
651
- w[9] || (w[9] = a("option", { value: 1.25 }, "125%", -1))
652
- ], 8, Jt), [
655
+ value: e(h)
656
+ }, l(Math.round(e(h) * 100)) + "%", 9, Qt)),
657
+ x[6] || (x[6] = a("option", { value: 0.5 }, "50%", -1)),
658
+ x[7] || (x[7] = a("option", { value: 0.8 }, "80%", -1)),
659
+ x[8] || (x[8] = a("option", { value: 1 }, "100%", -1)),
660
+ x[9] || (x[9] = a("option", { value: 1.25 }, "125%", -1))
661
+ ], 8, Yt), [
653
662
  [
654
663
  He,
655
- e(g),
664
+ e(h),
656
665
  void 0,
657
666
  { number: !0 }
658
667
  ]
@@ -663,152 +672,152 @@ const Ot = {
663
672
  ref_key: "viewport",
664
673
  ref: p,
665
674
  class: "mr-canvas-scroll",
666
- onScrollPassive: w[4] || (w[4] = //@ts-ignore
667
- (...k) => e(R) && e(R)(...k))
675
+ onScrollPassive: x[4] || (x[4] = //@ts-ignore
676
+ (...k) => e(T) && e(T)(...k))
668
677
  }, [
669
678
  a("div", {
670
679
  class: "mr-canvas-paper",
671
- style: fe({
672
- width: `${e(f).widthMm * e(x)}px`,
673
- height: `${e(f).heightMm * e(x)}px`
680
+ style: be({
681
+ width: `${e(f).widthMm * e(M)}px`,
682
+ height: `${e(f).heightMm * e(M)}px`
674
683
  })
675
684
  }, [
676
- (h(!0), M(K, null, Q(e(f).components, (k, A) => (h(), M("div", {
677
- key: A,
678
- class: Pe(["mr-canvas-component", { "is-selected": _(A), "is-locked": C(A) }]),
679
- "data-canvas-component": A,
680
- style: fe($(A)),
685
+ (g(!0), b(q, null, Q(e(f).components, (k, L) => (g(), b("div", {
686
+ key: L,
687
+ class: Pe(["mr-canvas-component", { "is-selected": _(L), "is-locked": S(L) }]),
688
+ "data-canvas-component": L,
689
+ style: be(E(L)),
681
690
  role: "button",
682
- "aria-label": `${o.value.component} ${A + 1} ${k.kind}`,
683
- "aria-pressed": _(A),
684
- tabindex: _(A) ? 0 : -1,
685
- onFocus: (E) => !_(A) && s("select", { pageIndex: t.pageIndex, componentIndex: A }),
686
- onPointerdown: (E) => L(E, A),
687
- onClick: (E) => E.detail === 0 && !_(A) && s("select", { pageIndex: t.pageIndex, componentIndex: A }),
688
- onKeydown: (E) => D(E, A)
691
+ "aria-label": `${o.value.component} ${L + 1} ${k.kind}`,
692
+ "aria-pressed": _(L),
693
+ tabindex: _(L) ? 0 : -1,
694
+ onFocus: ($) => !_(L) && s("select", { pageIndex: t.pageIndex, componentIndex: L }),
695
+ onPointerdown: ($) => R($, L),
696
+ onClick: ($) => $.detail === 0 && !_(L) && s("select", { pageIndex: t.pageIndex, componentIndex: L }),
697
+ onKeydown: ($) => D($, L)
689
698
  }, [
690
- k.kind === "list" ? (h(), M(K, { key: 0 }, [
691
- a("div", Yt, [
692
- k.header !== !1 && k.headerGrid ? (h(), M("div", {
699
+ k.kind === "list" ? (g(), b(q, { key: 0 }, [
700
+ a("div", en, [
701
+ k.header !== !1 && k.headerGrid ? (g(), b("div", {
693
702
  key: 0,
694
703
  class: "mr-canvas-merged",
695
- style: fe({
696
- height: `${(k.headerGrid.rowHeightsMm?.reduce((E, P) => E + P, 0) ?? k.headerGrid.cells.length * 8) * e(x)}px`
704
+ style: be({
705
+ height: `${(k.headerGrid.rowHeightsMm?.reduce(($, P) => $ + P, 0) ?? k.headerGrid.cells.length * 8) * e(M)}px`
697
706
  })
698
707
  }, [
699
- (h(!0), M(K, null, Q(B(k), (E, P) => (h(), M("div", {
708
+ (g(!0), b(q, null, Q(U(k), ($, P) => (g(), b("div", {
700
709
  key: P,
701
- style: fe({
702
- left: `${E.xMm * e(x)}px`,
703
- top: `${E.yMm * e(x)}px`,
704
- width: `${E.widthMm * e(x)}px`,
705
- height: `${E.heightMm * e(x)}px`,
706
- textAlign: E.cell.style?.align ?? "center"
710
+ style: be({
711
+ left: `${$.xMm * e(M)}px`,
712
+ top: `${$.yMm * e(M)}px`,
713
+ width: `${$.widthMm * e(M)}px`,
714
+ height: `${$.heightMm * e(M)}px`,
715
+ textAlign: $.cell.style?.align ?? "center"
707
716
  })
708
- }, l(E.cell.text), 5))), 128))
709
- ], 4)) : k.header !== !1 ? (h(), M("div", Qt, [
710
- (h(!0), M(K, null, Q(k.columns, (E, P) => (h(), M("div", {
717
+ }, l($.cell.text), 5))), 128))
718
+ ], 4)) : k.header !== !1 ? (g(), b("div", tn, [
719
+ (g(!0), b(q, null, Q(k.columns, ($, P) => (g(), b("div", {
711
720
  key: P,
712
- style: fe(S({ text: E.header, style: e(Rt)(k, E) }, E.widthMm, E.hidden)),
713
- onPointerdown: vt((W) => {
714
- s("select", { pageIndex: t.pageIndex, componentIndex: A }), s("column", P);
721
+ style: be(C({ text: $.header, style: e(At)(k, $) }, $.widthMm, $.hidden)),
722
+ onPointerdown: gt((B) => {
723
+ s("select", { pageIndex: t.pageIndex, componentIndex: L }), s("column", P);
715
724
  }, ["stop"])
716
- }, l(E.header), 45, Zt))), 128))
717
- ])) : F("", !0),
718
- (h(!0), M(K, null, Q(u.value[A], (E, P) => (h(), M("div", {
725
+ }, l($.header), 45, nn))), 128))
726
+ ])) : N("", !0),
727
+ (g(!0), b(q, null, Q(d.value[L], ($, P) => (g(), b("div", {
719
728
  key: P,
720
729
  class: "mr-canvas-table-row"
721
730
  }, [
722
- (h(!0), M(K, null, Q(k.columns, (W, Z) => (h(), M("div", {
731
+ (g(!0), b(q, null, Q(k.columns, (B, Z) => (g(), b("div", {
723
732
  key: Z,
724
- style: fe(S(E[Z], W.widthMm, W.hidden))
725
- }, l(E[Z].text), 5))), 128))
733
+ style: be(C($[Z], B.widthMm, B.hidden))
734
+ }, l($[Z].text), 5))), 128))
726
735
  ]))), 128)),
727
- u.value[A]?.length ? F("", !0) : (h(), M("div", en, l(k.dataset) + " · " + l(k.tree && t.datasets?.[k.dataset]?.length ? o.value.treeSampleHint : o.value.sampleRows), 1))
736
+ d.value[L]?.length ? N("", !0) : (g(), b("div", an, l(k.dataset) + " · " + l(k.tree && t.datasets?.[k.dataset]?.length ? o.value.treeSampleHint : o.value.sampleRows), 1))
728
737
  ]),
729
- _(A) && !v.value && !C(A) ? (h(!0), M(K, { key: 0 }, Q(H(k), (E, P) => (h(), M("span", {
738
+ _(L) && !v.value && !S(L) ? (g(!0), b(q, { key: 0 }, Q(H(k), ($, P) => (g(), b("span", {
730
739
  key: P,
731
740
  class: "mr-canvas-column-handle",
732
741
  "aria-label": `${o.value.resizeColumn} ${k.columns[P]?.header}`,
733
742
  role: "separator",
734
743
  "aria-orientation": "vertical",
735
- style: fe({ left: `${E * e(x)}px` }),
736
- onPointerdown: (W) => ae(W, k, P)
737
- }, null, 44, tn))), 128)) : F("", !0)
738
- ], 64)) : k.grid ? (h(), M("div", nn, [
739
- (h(!0), M(K, null, Q(G(k), (E, P) => (h(), M("div", {
744
+ style: be({ left: `${$ * e(M)}px` }),
745
+ onPointerdown: (B) => te(B, k, P)
746
+ }, null, 44, on))), 128)) : N("", !0)
747
+ ], 64)) : k.grid ? (g(), b("div", ln, [
748
+ (g(!0), b(q, null, Q(G(k), ($, P) => (g(), b("div", {
740
749
  key: P,
741
- style: fe({
742
- left: `${E.xMm * e(x)}px`,
743
- top: `${E.yMm * e(x)}px`,
744
- width: `${E.widthMm * e(x)}px`,
745
- height: `${E.heightMm * e(x)}px`,
746
- backgroundColor: E.cell.style?.backgroundColor,
747
- color: E.cell.style?.color,
748
- fontWeight: E.cell.style?.bold ? "700" : "400",
749
- fontSize: `${e(Ve)(E.cell.style).fontSizePx * e(g)}px`,
750
- textAlign: E.cell.style?.align ?? "left"
750
+ style: be({
751
+ left: `${$.xMm * e(M)}px`,
752
+ top: `${$.yMm * e(M)}px`,
753
+ width: `${$.widthMm * e(M)}px`,
754
+ height: `${$.heightMm * e(M)}px`,
755
+ backgroundColor: $.cell.style?.backgroundColor,
756
+ color: $.cell.style?.color,
757
+ fontWeight: $.cell.style?.bold ? "700" : "400",
758
+ fontSize: `${e(je)($.cell.style).fontSizePx * e(h)}px`,
759
+ textAlign: $.cell.style?.align ?? "left"
751
760
  })
752
- }, l(E.cell.text), 5))), 128)),
753
- k.grid.cells.reduce((E, P) => E + P.length, 0) > 2e3 ? (h(), M("span", an, l(o.value.canvasGridLimited), 1)) : F("", !0)
754
- ])) : k.imageData ? (h(), M("img", {
761
+ }, l($.cell.text), 5))), 128)),
762
+ k.grid.cells.reduce(($, P) => $ + P.length, 0) > 2e3 ? (g(), b("span", sn, l(o.value.canvasGridLimited), 1)) : N("", !0)
763
+ ])) : k.imageData ? (g(), b("img", {
755
764
  key: 2,
756
765
  src: k.imageData,
757
766
  alt: "",
758
767
  draggable: "false"
759
- }, null, 8, on)) : (h(), M("div", {
768
+ }, null, 8, rn)) : (g(), b("div", {
760
769
  key: 3,
761
770
  class: "mr-canvas-content",
762
- style: fe({
771
+ style: be({
763
772
  color: k.style?.color,
764
773
  backgroundColor: k.style?.backgroundColor,
765
774
  fontWeight: k.style?.bold ? "700" : "400",
766
- fontSize: `${e(Ve)(k.style).fontSizePx * e(g)}px`,
775
+ fontSize: `${e(je)(k.style).fontSizePx * e(h)}px`,
767
776
  textAlign: k.style?.align
768
777
  })
769
778
  }, l(k.text ?? k.fallbackText ?? (k.kind === "rect" ? "" : k.kind)), 5)),
770
- _(A) && !v.value && !C(A) ? (h(), M("span", {
779
+ _(L) && !v.value && !S(L) ? (g(), b("span", {
771
780
  key: 4,
772
781
  class: "mr-canvas-resize",
773
782
  "aria-label": o.value.resizeComponent,
774
783
  role: "separator",
775
- onPointerdown: (E) => e(y).start(E, k, !0)
776
- }, null, 40, ln)) : F("", !0)
777
- ], 46, Xt))), 128))
784
+ onPointerdown: ($) => e(w).start($, k, !0)
785
+ }, null, 40, dn)) : N("", !0)
786
+ ], 46, Zt))), 128))
778
787
  ], 4)
779
788
  ], 544),
780
- e(m) ? (h(), M("footer", sn, [
789
+ e(m) ? (g(), b("footer", un, [
781
790
  a("span", null, l(o.value.wideNavigation), 1),
782
791
  a("input", {
783
792
  type: "range",
784
793
  min: "0",
785
794
  max: "100",
786
- value: e(b),
795
+ value: e(y),
787
796
  "aria-label": o.value.wideNavigation,
788
- onInput: w[5] || (w[5] = (k) => e(I)(Number(k.target.value)))
789
- }, null, 40, rn),
790
- a("span", null, l(e(b)) + "%", 1)
791
- ])) : F("", !0)
797
+ onInput: x[5] || (x[5] = (k) => e(I)(Number(k.target.value)))
798
+ }, null, 40, cn),
799
+ a("span", null, l(e(y)) + "%", 1)
800
+ ])) : N("", !0)
792
801
  ]));
793
802
  }
794
- }), un = /* @__PURE__ */ ze(dn, [["__scopeId", "data-v-b9edde8c"]]), cn = ["aria-label"], mn = ["data-align", "aria-label", "title", "aria-checked", "tabindex", "onClick", "onKeydown"], vn = { key: 0 }, pn = {
803
+ }), vn = /* @__PURE__ */ Fe(mn, [["__scopeId", "data-v-b9edde8c"]]), pn = ["aria-label"], gn = ["data-align", "aria-label", "title", "aria-checked", "tabindex", "onClick", "onKeydown"], hn = { key: 0 }, fn = {
795
804
  key: 1,
796
805
  viewBox: "0 0 20 20",
797
806
  fill: "none",
798
807
  "aria-hidden": "true"
799
- }, gn = {
808
+ }, bn = {
800
809
  key: 0,
801
810
  d: "M3 4h14M3 8h9M3 12h14M3 16h9"
802
- }, hn = {
811
+ }, yn = {
803
812
  key: 1,
804
813
  d: "M3 4h14M6 8h8M3 12h14M6 16h8"
805
- }, fn = {
814
+ }, wn = {
806
815
  key: 2,
807
816
  d: "M3 4h14M8 8h9M3 12h14M8 16h9"
808
- }, bn = {
817
+ }, xn = {
809
818
  key: 3,
810
819
  d: "M3 4h14M3 8h14M3 12h14M3 16h14"
811
- }, yn = /* @__PURE__ */ Ge({
820
+ }, Mn = /* @__PURE__ */ Ge({
812
821
  __name: "AlignmentControl",
813
822
  props: {
814
823
  modelValue: {},
@@ -818,22 +827,22 @@ const Ot = {
818
827
  allowAuto: { type: Boolean }
819
828
  },
820
829
  emits: ["update:modelValue"],
821
- setup(t, { emit: d }) {
822
- const i = t, s = d, o = () => i.allowAuto ? ["auto", "left", "center", "right", "justify"] : ["left", "center", "right", "justify"];
823
- async function p(g, x) {
824
- if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(g.key)) return;
825
- g.preventDefault();
826
- const m = o(), b = m.indexOf(x), T = g.key === "Home" ? 0 : g.key === "End" ? m.length - 1 : (b + (g.key === "ArrowRight" ? 1 : -1) + m.length) % m.length;
827
- s("update:modelValue", m[T]);
828
- const R = g.currentTarget.parentElement;
829
- await me(), R?.querySelector(`[data-align="${m[T]}"]`)?.focus();
830
+ setup(t, { emit: c }) {
831
+ const i = t, s = c, o = () => i.allowAuto ? ["auto", "left", "center", "right", "justify"] : ["left", "center", "right", "justify"];
832
+ async function p(h, M) {
833
+ if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(h.key)) return;
834
+ h.preventDefault();
835
+ const m = o(), y = m.indexOf(M), A = h.key === "Home" ? 0 : h.key === "End" ? m.length - 1 : (y + (h.key === "ArrowRight" ? 1 : -1) + m.length) % m.length;
836
+ s("update:modelValue", m[A]);
837
+ const T = h.currentTarget.parentElement;
838
+ await ce(), T?.querySelector(`[data-align="${m[A]}"]`)?.focus();
830
839
  }
831
- return (g, x) => (h(), M("div", {
840
+ return (h, M) => (g(), b("div", {
832
841
  class: "mr-designer-alignment",
833
842
  role: "radiogroup",
834
843
  "aria-label": t.label
835
844
  }, [
836
- (h(!0), M(K, null, Q(o(), (f) => (h(), M("button", {
845
+ (g(!0), b(q, null, Q(o(), (f) => (g(), b("button", {
837
846
  key: f,
838
847
  type: "button",
839
848
  role: "radio",
@@ -845,19 +854,19 @@ const Ot = {
845
854
  onClick: (m) => s("update:modelValue", f),
846
855
  onKeydown: (m) => p(m, f)
847
856
  }, [
848
- f === "auto" ? (h(), M("span", vn, l(t.autoLabel), 1)) : (h(), M("svg", pn, [
849
- f === "left" ? (h(), M("path", gn)) : f === "center" ? (h(), M("path", hn)) : f === "right" ? (h(), M("path", fn)) : (h(), M("path", bn))
857
+ f === "auto" ? (g(), b("span", hn, l(t.autoLabel), 1)) : (g(), b("svg", fn, [
858
+ f === "left" ? (g(), b("path", bn)) : f === "center" ? (g(), b("path", yn)) : f === "right" ? (g(), b("path", wn)) : (g(), b("path", xn))
850
859
  ]))
851
- ], 40, mn))), 128))
852
- ], 8, cn));
860
+ ], 40, gn))), 128))
861
+ ], 8, pn));
853
862
  }
854
- }), et = /* @__PURE__ */ ze(yn, [["__scopeId", "data-v-c85770c4"]]), wn = ["disabled"], Mn = { class: "mr-component-dimensions" }, xn = ["min", "value", "disabled", "onChange"], kn = { key: 0 }, Cn = ["value", "disabled"], Sn = { value: "" }, _n = { value: "header" }, In = { value: "footer" }, $n = { key: 1 }, En = ["value"], Ln = ["value"], Rn = { class: "mr-component-upload" }, An = ["aria-label"], Dn = {
863
+ }), nt = /* @__PURE__ */ Fe(Mn, [["__scopeId", "data-v-c85770c4"]]), kn = ["disabled"], Cn = { class: "mr-component-dimensions" }, Sn = ["min", "value", "disabled", "onChange"], _n = { key: 0 }, In = ["value", "disabled"], $n = { value: "" }, En = { value: "header" }, Rn = { value: "footer" }, Tn = { key: 1 }, Ln = ["value"], Dn = ["value"], An = { class: "mr-component-upload" }, Pn = ["aria-label"], Hn = {
855
864
  key: 0,
856
865
  role: "alert"
857
- }, Tn = {
866
+ }, Gn = {
858
867
  key: 3,
859
868
  class: "mr-component-type"
860
- }, Pn = { class: "mr-component-dimensions" }, Hn = ["value"], Gn = ["checked"], zn = { class: "mr-component-dimensions" }, Fn = ["value"], Nn = ["value"], Bn = { key: 4 }, On = ["value"], Vn = /* @__PURE__ */ Ge({
869
+ }, Fn = { class: "mr-component-dimensions" }, Nn = ["value"], zn = ["checked"], On = { class: "mr-component-dimensions" }, Bn = ["value"], Vn = ["value"], jn = { key: 4 }, Un = ["value"], Wn = /* @__PURE__ */ Ge({
861
870
  __name: "CanvasComponentInspector",
862
871
  props: {
863
872
  component: {},
@@ -866,8 +875,8 @@ const Ot = {
866
875
  messages: {}
867
876
  },
868
877
  emits: ["geometry", "patch"],
869
- setup(t, { emit: d }) {
870
- const i = t, s = d, o = z(() => ({ ...Ke, ...i.messages })), p = N(""), g = ["leftMm", "topMm", "widthMm", "heightMm"], x = z(() => [
878
+ setup(t, { emit: c }) {
879
+ const i = t, s = c, o = F(() => ({ ...Je, ...i.messages })), p = z(""), h = ["leftMm", "topMm", "widthMm", "heightMm"], M = F(() => [
871
880
  o.value.leftPosition,
872
881
  o.value.topPosition,
873
882
  o.value.componentWidth,
@@ -875,163 +884,163 @@ const Ot = {
875
884
  ]);
876
885
  function f(I, v) {
877
886
  if (i.disabled || i.geometryDisabled) return;
878
- const u = Number(v.target.value);
879
- Number.isFinite(u) && s("geometry", { ...be(i.component), [I]: u });
887
+ const d = Number(v.target.value);
888
+ Number.isFinite(d) && s("geometry", { ...ye(i.component), [I]: d });
880
889
  }
881
890
  function m(I, v) {
882
891
  if (i.component.kind === "list") return;
883
- const u = { ...i.component.style, [I]: v };
884
- I === "fontSize" && delete u.fontSizePx, s("patch", { style: u });
892
+ const d = { ...i.component.style, [I]: v };
893
+ I === "fontSize" && delete d.fontSizePx, s("patch", { style: d });
885
894
  }
886
- const b = z(() => ({
895
+ const y = F(() => ({
887
896
  auto: o.value.auto,
888
897
  left: o.value.left,
889
898
  center: o.value.center,
890
899
  right: o.value.right,
891
900
  justify: o.value.justify
892
901
  }));
893
- function T(I) {
902
+ function A(I) {
894
903
  return I.target.value;
895
904
  }
896
- async function R(I) {
897
- const v = I.target, u = v.files?.[0];
898
- if (!u) return;
905
+ async function T(I) {
906
+ const v = I.target, d = v.files?.[0];
907
+ if (!d) return;
899
908
  p.value = "";
900
- const S = i.component;
909
+ const C = i.component;
901
910
  try {
902
- if (u.size > 4 * 1024 * 1024 || !["image/png", "image/jpeg", "image/webp", "image/svg+xml"].includes(
903
- u.type
911
+ if (d.size > 4 * 1024 * 1024 || !["image/png", "image/jpeg", "image/webp", "image/svg+xml"].includes(
912
+ d.type
904
913
  ))
905
914
  throw new Error(o.value.imageBudget);
906
- const C = new FileReader(), L = await new Promise((y, _) => {
907
- C.onload = () => y(String(C.result)), C.onerror = () => _(C.error), C.readAsDataURL(u);
915
+ const S = new FileReader(), R = await new Promise((w, _) => {
916
+ S.onload = () => w(String(S.result)), S.onerror = () => _(S.error), S.readAsDataURL(d);
908
917
  });
909
- !i.disabled && i.component === S && s("patch", { imageData: L });
910
- } catch (C) {
911
- p.value = C instanceof Error ? C.message : String(C);
918
+ !i.disabled && i.component === C && s("patch", { imageData: R });
919
+ } catch (S) {
920
+ p.value = S instanceof Error ? S.message : String(S);
912
921
  } finally {
913
922
  v.value = "";
914
923
  }
915
924
  }
916
- return (I, v) => (h(), M("fieldset", {
925
+ return (I, v) => (g(), b("fieldset", {
917
926
  class: "mr-component-properties",
918
927
  disabled: t.disabled
919
928
  }, [
920
929
  a("h3", null, l(o.value.positionGroup), 1),
921
- a("div", Mn, [
922
- (h(!0), M(K, null, Q(g.filter(
923
- (u) => t.component.kind !== "list" || u !== "heightMm"
924
- ), (u, S) => (h(), M("label", { key: u }, [
925
- O(l(x.value[S]), 1),
930
+ a("div", Cn, [
931
+ (g(!0), b(q, null, Q(h.filter(
932
+ (d) => t.component.kind !== "list" || d !== "heightMm"
933
+ ), (d, C) => (g(), b("label", { key: d }, [
934
+ O(l(M.value[C]), 1),
926
935
  a("input", {
927
936
  type: "number",
928
937
  step: "0.5",
929
- min: u === "widthMm" || u === "heightMm" ? 2 : 0,
930
- value: e(be)(t.component)[u],
938
+ min: d === "widthMm" || d === "heightMm" ? 2 : 0,
939
+ value: e(ye)(t.component)[d],
931
940
  disabled: t.geometryDisabled,
932
- onChange: (C) => f(u, C)
933
- }, null, 40, xn)
941
+ onChange: (S) => f(d, S)
942
+ }, null, 40, Sn)
934
943
  ]))), 128))
935
944
  ]),
936
- t.component.kind !== "list" ? (h(), M("label", kn, [
945
+ t.component.kind !== "list" ? (g(), b("label", _n, [
937
946
  O(l(o.value.repeatPage), 1),
938
947
  a("select", {
939
948
  value: t.component.pageAnchor ?? "",
940
949
  disabled: t.geometryDisabled,
941
- onChange: v[0] || (v[0] = (u) => s("patch", { pageAnchor: T(u) || void 0 }))
950
+ onChange: v[0] || (v[0] = (d) => s("patch", { pageAnchor: A(d) || void 0 }))
942
951
  }, [
943
- a("option", Sn, l(o.value.repeatNone), 1),
944
- a("option", _n, l(o.value.repeatHeader), 1),
945
- a("option", In, l(o.value.repeatFooter), 1)
946
- ], 40, Cn)
947
- ])) : F("", !0),
952
+ a("option", $n, l(o.value.repeatNone), 1),
953
+ a("option", En, l(o.value.repeatHeader), 1),
954
+ a("option", Rn, l(o.value.repeatFooter), 1)
955
+ ], 40, In)
956
+ ])) : N("", !0),
948
957
  a("h3", null, l(o.value.componentContent), 1),
949
- t.component.kind === "text" ? (h(), M("label", $n, [
958
+ t.component.kind === "text" ? (g(), b("label", Tn, [
950
959
  O(l(o.value.componentText), 1),
951
960
  a("textarea", {
952
961
  rows: "4",
953
962
  value: t.component.text,
954
- onChange: v[1] || (v[1] = (u) => s("patch", { text: T(u) }))
955
- }, null, 40, En)
956
- ])) : F("", !0),
957
- t.component.kind === "image" ? (h(), M(K, { key: 2 }, [
963
+ onChange: v[1] || (v[1] = (d) => s("patch", { text: A(d) }))
964
+ }, null, 40, Ln)
965
+ ])) : N("", !0),
966
+ t.component.kind === "image" ? (g(), b(q, { key: 2 }, [
958
967
  a("label", null, [
959
968
  O(l(o.value.imageSource), 1),
960
969
  a("textarea", {
961
970
  rows: "2",
962
971
  value: t.component.imageData,
963
- onChange: v[2] || (v[2] = (u) => s("patch", { imageData: T(u) }))
964
- }, null, 40, Ln)
972
+ onChange: v[2] || (v[2] = (d) => s("patch", { imageData: A(d) }))
973
+ }, null, 40, Dn)
965
974
  ]),
966
- a("label", Rn, [
975
+ a("label", An, [
967
976
  O(l(o.value.imageUpload), 1),
968
977
  a("input", {
969
978
  type: "file",
970
979
  accept: "image/png,image/jpeg,image/webp,image/svg+xml",
971
980
  "aria-label": o.value.imageUpload,
972
- onChange: R
973
- }, null, 40, An)
981
+ onChange: T
982
+ }, null, 40, Pn)
974
983
  ]),
975
- p.value ? (h(), M("p", Dn, l(p.value), 1)) : F("", !0)
976
- ], 64)) : F("", !0),
977
- t.component.kind === "text" ? (h(), M("div", Tn, [
984
+ p.value ? (g(), b("p", Hn, l(p.value), 1)) : N("", !0)
985
+ ], 64)) : N("", !0),
986
+ t.component.kind === "text" ? (g(), b("div", Gn, [
978
987
  a("h3", null, l(o.value.textFormat), 1),
979
- a("div", Pn, [
988
+ a("div", Fn, [
980
989
  a("label", null, [
981
990
  O(l(o.value.fontSize), 1),
982
991
  a("input", {
983
992
  type: "number",
984
993
  min: "1",
985
994
  max: "200",
986
- value: e(Ve)(t.component.style).fontSizePt,
987
- onChange: v[3] || (v[3] = (u) => m("fontSize", Number(T(u))))
988
- }, null, 40, Hn)
995
+ value: e(je)(t.component.style).fontSizePt,
996
+ onChange: v[3] || (v[3] = (d) => m("fontSize", Number(A(d))))
997
+ }, null, 40, Nn)
989
998
  ]),
990
999
  a("label", null, [
991
1000
  O(l(o.value.fontBold), 1),
992
1001
  a("input", {
993
1002
  type: "checkbox",
994
1003
  checked: t.component.style?.bold === !0,
995
- onChange: v[4] || (v[4] = (u) => m("bold", u.target.checked))
996
- }, null, 40, Gn)
1004
+ onChange: v[4] || (v[4] = (d) => m("bold", d.target.checked))
1005
+ }, null, 40, zn)
997
1006
  ])
998
1007
  ]),
999
- le(et, {
1008
+ le(nt, {
1000
1009
  "model-value": t.component.style?.align ?? "left",
1001
1010
  label: o.value.bodyAlign,
1002
- labels: b.value,
1011
+ labels: y.value,
1003
1012
  "auto-label": o.value.autoShort,
1004
- "onUpdate:modelValue": v[5] || (v[5] = (u) => m("align", u))
1013
+ "onUpdate:modelValue": v[5] || (v[5] = (d) => m("align", d))
1005
1014
  }, null, 8, ["model-value", "label", "labels", "auto-label"]),
1006
- a("div", zn, [
1015
+ a("div", On, [
1007
1016
  a("label", null, [
1008
1017
  O(l(o.value.textColor), 1),
1009
1018
  a("input", {
1010
1019
  type: "color",
1011
1020
  value: t.component.style?.color ?? "#233c5c",
1012
- onChange: v[6] || (v[6] = (u) => m("color", T(u)))
1013
- }, null, 40, Fn)
1021
+ onChange: v[6] || (v[6] = (d) => m("color", A(d)))
1022
+ }, null, 40, Bn)
1014
1023
  ]),
1015
1024
  a("label", null, [
1016
1025
  O(l(o.value.backgroundColor), 1),
1017
1026
  a("input", {
1018
1027
  type: "color",
1019
1028
  value: t.component.style?.backgroundColor ?? "#ffffff",
1020
- onChange: v[7] || (v[7] = (u) => m("backgroundColor", T(u)))
1021
- }, null, 40, Nn)
1029
+ onChange: v[7] || (v[7] = (d) => m("backgroundColor", A(d)))
1030
+ }, null, 40, Vn)
1022
1031
  ])
1023
1032
  ])
1024
- ])) : F("", !0),
1025
- t.component.kind === "list" ? (h(), M("label", Bn, [
1033
+ ])) : N("", !0),
1034
+ t.component.kind === "list" ? (g(), b("label", jn, [
1026
1035
  O(l(o.value.listDataset), 1),
1027
1036
  a("input", {
1028
1037
  value: t.component.dataset,
1029
- onChange: v[8] || (v[8] = (u) => s("patch", { dataset: T(u) }))
1030
- }, null, 40, On)
1031
- ])) : F("", !0)
1032
- ], 8, wn));
1038
+ onChange: v[8] || (v[8] = (d) => s("patch", { dataset: A(d) }))
1039
+ }, null, 40, Un)
1040
+ ])) : N("", !0)
1041
+ ], 8, kn));
1033
1042
  }
1034
- }), jn = /* @__PURE__ */ ze(Vn, [["__scopeId", "data-v-5f04c2ed"]]), Wn = { class: "mr-header-editor" }, Un = ["disabled"], Kn = ["value"], Jn = ["value"], qn = ["value"], Xn = ["disabled"], Yn = /* @__PURE__ */ Ge({
1043
+ }), Kn = /* @__PURE__ */ Fe(Wn, [["__scopeId", "data-v-5f04c2ed"]]), Jn = { class: "mr-header-editor" }, qn = ["disabled"], Xn = ["value"], Yn = ["value"], Qn = ["value"], Zn = ["disabled"], ea = /* @__PURE__ */ Ge({
1035
1044
  __name: "HeaderStructureEditor",
1036
1045
  props: {
1037
1046
  list: {},
@@ -1039,14 +1048,14 @@ const Ot = {
1039
1048
  messages: {}
1040
1049
  },
1041
1050
  emits: ["command"],
1042
- setup(t, { emit: d }) {
1043
- const i = t, s = d, o = z(() => ({ ...Ke, ...i.messages })), p = N(0), g = N(0), x = N(Math.min(1, i.list.columns.length - 1));
1051
+ setup(t, { emit: c }) {
1052
+ const i = t, s = c, o = F(() => ({ ...Je, ...i.messages })), p = z(0), h = z(0), M = z(Math.min(1, i.list.columns.length - 1));
1044
1053
  return ee(
1045
1054
  () => i.list.columns.length,
1046
1055
  (f) => {
1047
- g.value = Math.min(g.value, f - 1), x.value = Math.min(x.value, f - 1);
1056
+ h.value = Math.min(h.value, f - 1), M.value = Math.min(M.value, f - 1);
1048
1057
  }
1049
- ), (f, m) => (h(), M("details", Wn, [
1058
+ ), (f, m) => (g(), b("details", Jn, [
1050
1059
  a("summary", null, [
1051
1060
  O(l(o.value.headerStructure), 1),
1052
1061
  a("span", null, l(t.list.headerGrid?.cells.length ?? 1) + " " + l(o.value.headerRow), 1)
@@ -1055,12 +1064,12 @@ const Ot = {
1055
1064
  a("label", null, [
1056
1065
  O(l(o.value.headerRow), 1),
1057
1066
  ue(a("select", {
1058
- "onUpdate:modelValue": m[0] || (m[0] = (b) => p.value = b)
1067
+ "onUpdate:modelValue": m[0] || (m[0] = (y) => p.value = y)
1059
1068
  }, [
1060
- (h(!0), M(K, null, Q(t.list.headerGrid?.cells.length ?? 1, (b) => (h(), M("option", {
1061
- key: b,
1062
- value: b - 1
1063
- }, l(b), 9, Kn))), 128))
1069
+ (g(!0), b(q, null, Q(t.list.headerGrid?.cells.length ?? 1, (y) => (g(), b("option", {
1070
+ key: y,
1071
+ value: y - 1
1072
+ }, l(y), 9, Xn))), 128))
1064
1073
  ], 512), [
1065
1074
  [
1066
1075
  He,
@@ -1073,16 +1082,16 @@ const Ot = {
1073
1082
  a("label", null, [
1074
1083
  O(l(o.value.headerFirst), 1),
1075
1084
  ue(a("select", {
1076
- "onUpdate:modelValue": m[1] || (m[1] = (b) => g.value = b)
1085
+ "onUpdate:modelValue": m[1] || (m[1] = (y) => h.value = y)
1077
1086
  }, [
1078
- (h(!0), M(K, null, Q(t.list.columns, (b, T) => (h(), M("option", {
1079
- key: T,
1080
- value: T
1081
- }, l(T + 1) + " · " + l(b.header), 9, Jn))), 128))
1087
+ (g(!0), b(q, null, Q(t.list.columns, (y, A) => (g(), b("option", {
1088
+ key: A,
1089
+ value: A
1090
+ }, l(A + 1) + " · " + l(y.header), 9, Yn))), 128))
1082
1091
  ], 512), [
1083
1092
  [
1084
1093
  He,
1085
- g.value,
1094
+ h.value,
1086
1095
  void 0,
1087
1096
  { number: !0 }
1088
1097
  ]
@@ -1091,16 +1100,16 @@ const Ot = {
1091
1100
  a("label", null, [
1092
1101
  O(l(o.value.headerLast), 1),
1093
1102
  ue(a("select", {
1094
- "onUpdate:modelValue": m[2] || (m[2] = (b) => x.value = b)
1103
+ "onUpdate:modelValue": m[2] || (m[2] = (y) => M.value = y)
1095
1104
  }, [
1096
- (h(!0), M(K, null, Q(t.list.columns, (b, T) => (h(), M("option", {
1097
- key: T,
1098
- value: T
1099
- }, l(T + 1) + " · " + l(b.header), 9, qn))), 128))
1105
+ (g(!0), b(q, null, Q(t.list.columns, (y, A) => (g(), b("option", {
1106
+ key: A,
1107
+ value: A
1108
+ }, l(A + 1) + " · " + l(y.header), 9, Qn))), 128))
1100
1109
  ], 512), [
1101
1110
  [
1102
1111
  He,
1103
- x.value,
1112
+ M.value,
1104
1113
  void 0,
1105
1114
  { number: !0 }
1106
1115
  ]
@@ -1109,273 +1118,273 @@ const Ot = {
1109
1118
  a("div", null, [
1110
1119
  a("button", {
1111
1120
  type: "button",
1112
- onClick: m[3] || (m[3] = (b) => s("command", { action: "add", row: p.value, first: g.value, last: x.value }))
1121
+ onClick: m[3] || (m[3] = (y) => s("command", { action: "add", row: p.value, first: h.value, last: M.value }))
1113
1122
  }, l(o.value.addHeaderRow), 1),
1114
1123
  a("button", {
1115
1124
  type: "button",
1116
- disabled: g.value >= x.value,
1117
- onClick: m[4] || (m[4] = (b) => s("command", { action: "merge", row: p.value, first: g.value, last: x.value }))
1118
- }, l(o.value.mergeHeader), 9, Xn),
1125
+ disabled: h.value >= M.value,
1126
+ onClick: m[4] || (m[4] = (y) => s("command", { action: "merge", row: p.value, first: h.value, last: M.value }))
1127
+ }, l(o.value.mergeHeader), 9, Zn),
1119
1128
  a("button", {
1120
1129
  type: "button",
1121
- onClick: m[5] || (m[5] = (b) => s("command", { action: "split", row: p.value, first: g.value, last: x.value }))
1130
+ onClick: m[5] || (m[5] = (y) => s("command", { action: "split", row: p.value, first: h.value, last: M.value }))
1122
1131
  }, l(o.value.splitHeader), 1)
1123
1132
  ])
1124
- ], 8, Un)
1133
+ ], 8, qn)
1125
1134
  ]));
1126
1135
  }
1127
- }), Qn = /* @__PURE__ */ ze(Yn, [["__scopeId", "data-v-acd607ef"]]), ke = (t) => `${t.pageIndex}:${t.componentIndex}`;
1128
- function Zn(t, d, i) {
1129
- const s = N([]), o = N(/* @__PURE__ */ new Set());
1136
+ }), ta = /* @__PURE__ */ Fe(ea, [["__scopeId", "data-v-acd607ef"]]), Ce = (t) => `${t.pageIndex}:${t.componentIndex}`;
1137
+ function na(t, c, i) {
1138
+ const s = z([]), o = z(/* @__PURE__ */ new Set());
1130
1139
  ee(() => t.value.id, () => {
1131
1140
  s.value = [], o.value = /* @__PURE__ */ new Set();
1132
1141
  });
1133
- const p = (R) => !!R && o.value.has(ke(R));
1134
- function g(R) {
1135
- const I = { pageIndex: R.pageIndex, componentIndex: R.componentIndex };
1136
- if (R.additive && s.value.every((v) => v.pageIndex === R.pageIndex)) {
1137
- const v = s.value.some((u) => ke(u) === ke(R));
1138
- s.value = v ? s.value.filter((u) => ke(u) !== ke(R)) : [...s.value, I], d.value = v ? s.value.at(-1) : I;
1142
+ const p = (T) => !!T && o.value.has(Ce(T));
1143
+ function h(T) {
1144
+ const I = { pageIndex: T.pageIndex, componentIndex: T.componentIndex };
1145
+ if (T.additive && s.value.every((v) => v.pageIndex === T.pageIndex)) {
1146
+ const v = s.value.some((d) => Ce(d) === Ce(T));
1147
+ s.value = v ? s.value.filter((d) => Ce(d) !== Ce(T)) : [...s.value, I], c.value = v ? s.value.at(-1) : I;
1139
1148
  } else
1140
- s.value = [I], d.value = I;
1149
+ s.value = [I], c.value = I;
1141
1150
  }
1142
- const x = z(() => s.value.filter((R) => !p(R)));
1151
+ const M = F(() => s.value.filter((T) => !p(T)));
1143
1152
  function f() {
1144
- const R = new Set(o.value), I = s.value.every(p);
1153
+ const T = new Set(o.value), I = s.value.every(p);
1145
1154
  for (const v of s.value)
1146
- I ? R.delete(ke(v)) : R.add(ke(v));
1147
- o.value = R;
1148
- }
1149
- function m(R) {
1150
- x.value.length < 2 || i((I) => {
1151
- const v = x.value.map((_) => Re(I, _)).filter(Boolean), u = v.map(be), S = Math.min(...u.map((_) => _.leftMm)), C = Math.min(...u.map((_) => _.topMm)), L = Math.max(...u.map((_) => _.leftMm + _.widthMm)), y = Math.max(...u.map((_) => _.topMm + _.heightMm));
1152
- v.forEach((_, $) => {
1153
- const D = u[$], H = { left: S, center: (S + L - D.widthMm) / 2, right: L - D.widthMm }, G = { top: C, middle: (C + y - D.heightMm) / 2, bottom: y - D.heightMm };
1154
- R in H ? D.leftMm = H[R] : D.topMm = G[R], je(_, D);
1155
+ I ? T.delete(Ce(v)) : T.add(Ce(v));
1156
+ o.value = T;
1157
+ }
1158
+ function m(T) {
1159
+ M.value.length < 2 || i((I) => {
1160
+ const v = M.value.map((_) => Te(I, _)).filter(Boolean), d = v.map(ye), C = Math.min(...d.map((_) => _.leftMm)), S = Math.min(...d.map((_) => _.topMm)), R = Math.max(...d.map((_) => _.leftMm + _.widthMm)), w = Math.max(...d.map((_) => _.topMm + _.heightMm));
1161
+ v.forEach((_, E) => {
1162
+ const D = d[E], H = { left: C, center: (C + R - D.widthMm) / 2, right: R - D.widthMm }, G = { top: S, middle: (S + w - D.heightMm) / 2, bottom: w - D.heightMm };
1163
+ T in H ? D.leftMm = H[T] : D.topMm = G[T], Ue(_, D);
1155
1164
  });
1156
1165
  });
1157
1166
  }
1158
- function b(R) {
1159
- x.value.length < 3 || i((I) => {
1160
- const v = R === "horizontal" ? "leftMm" : "topMm", u = R === "horizontal" ? "widthMm" : "heightMm", S = x.value.map(($) => ({ component: Re(I, $), box: be(Re(I, $)) })).sort(($, D) => $.box[v] - D.box[v]), C = S[0].box[v], y = (Math.max(...S.map(($) => $.box[v] + $.box[u])) - C - S.reduce(($, D) => $ + D.box[u], 0)) / (S.length - 1);
1161
- let _ = C;
1162
- for (const $ of S)
1163
- $.box[v] = _, je($.component, $.box), _ += $.box[u] + y;
1167
+ function y(T) {
1168
+ M.value.length < 3 || i((I) => {
1169
+ const v = T === "horizontal" ? "leftMm" : "topMm", d = T === "horizontal" ? "widthMm" : "heightMm", C = M.value.map((E) => ({ component: Te(I, E), box: ye(Te(I, E)) })).sort((E, D) => E.box[v] - D.box[v]), S = C[0].box[v], w = (Math.max(...C.map((E) => E.box[v] + E.box[d])) - S - C.reduce((E, D) => E + D.box[d], 0)) / (C.length - 1);
1170
+ let _ = S;
1171
+ for (const E of C)
1172
+ E.box[v] = _, Ue(E.component, E.box), _ += E.box[d] + w;
1164
1173
  });
1165
1174
  }
1166
- function T(R, I, v) {
1167
- function u(S) {
1168
- if (S.pageIndex !== R) return S;
1169
- const C = S.componentIndex;
1170
- return v === void 0 ? C === I ? void 0 : { ...S, componentIndex: C > I ? C - 1 : C } : { ...S, componentIndex: C === I ? v : C === v ? I : C };
1175
+ function A(T, I, v) {
1176
+ function d(C) {
1177
+ if (C.pageIndex !== T) return C;
1178
+ const S = C.componentIndex;
1179
+ return v === void 0 ? S === I ? void 0 : { ...C, componentIndex: S > I ? S - 1 : S } : { ...C, componentIndex: S === I ? v : S === v ? I : S };
1171
1180
  }
1172
- o.value = new Set([...o.value].flatMap((S) => {
1173
- const [C, L] = S.split(":").map(Number), y = u({ pageIndex: C, componentIndex: L });
1174
- return y ? [ke(y)] : [];
1175
- })), s.value = s.value.flatMap((S) => {
1176
- const C = u(S);
1177
- return C ? [C] : [];
1181
+ o.value = new Set([...o.value].flatMap((C) => {
1182
+ const [S, R] = C.split(":").map(Number), w = d({ pageIndex: S, componentIndex: R });
1183
+ return w ? [Ce(w)] : [];
1184
+ })), s.value = s.value.flatMap((C) => {
1185
+ const S = d(C);
1186
+ return S ? [S] : [];
1178
1187
  });
1179
1188
  }
1180
1189
  return { clearLocks: () => {
1181
1190
  o.value = /* @__PURE__ */ new Set();
1182
- }, selections: s, locked: p, allLocked: z(() => !!s.value.length && s.value.every(p)), toggleLock: f, align: m, distribute: b, select: g, remap: T };
1191
+ }, selections: s, locked: p, allLocked: F(() => !!s.value.length && s.value.every(p)), toggleLock: f, align: m, distribute: y, select: h, remap: A };
1183
1192
  }
1184
- function ea(t, d) {
1185
- const i = N("preview"), s = N(), o = N(0), p = z(() => !!t.value.template.pages[s.value?.pageIndex ?? o.value]?.flow), g = Zn(t, s, (u) => p.value ? !1 : d(u)), x = z(
1186
- () => Re(t.value, s.value)
1193
+ function aa(t, c) {
1194
+ const i = z("preview"), s = z(), o = z(0), p = F(() => !!t.value.template.pages[s.value?.pageIndex ?? o.value]?.flow), h = na(t, s, (d) => p.value ? !1 : c(d)), M = F(
1195
+ () => Te(t.value, s.value)
1187
1196
  );
1188
1197
  ee(t, () => {
1189
- x.value || (s.value = void 0), t.value.template.pages[o.value] || (o.value = 0);
1198
+ M.value || (s.value = void 0), t.value.template.pages[o.value] || (o.value = 0);
1190
1199
  });
1191
- function f(u) {
1192
- g.select(u), o.value = u.pageIndex;
1193
- }
1194
- function m(u) {
1195
- const S = s.value;
1196
- return !S || g.locked(S) ? !1 : d((C) => {
1197
- const L = Re(C, S);
1198
- L && u(L, C);
1200
+ function f(d) {
1201
+ h.select(d), o.value = d.pageIndex;
1202
+ }
1203
+ function m(d) {
1204
+ const C = s.value;
1205
+ return !C || h.locked(C) ? !1 : c((S) => {
1206
+ const R = Te(S, C);
1207
+ R && d(R, S);
1199
1208
  });
1200
1209
  }
1201
- function b(u) {
1202
- p.value || m((S, C) => {
1203
- const L = C.template.pages[s.value.pageIndex];
1204
- je(
1205
- S,
1206
- Ze(u, L, S.kind === "list")
1210
+ function y(d) {
1211
+ p.value || m((C, S) => {
1212
+ const R = S.template.pages[s.value.pageIndex];
1213
+ Ue(
1214
+ C,
1215
+ tt(d, R, C.kind === "list")
1207
1216
  );
1208
1217
  });
1209
1218
  }
1210
- function T(u) {
1219
+ function A(d) {
1211
1220
  if (t.value.template.pages[o.value]?.flow) return;
1212
- let S = -1;
1213
- const C = o.value;
1214
- d((L) => {
1215
- const y = L.template.pages[C].components;
1216
- y.push(Tt(u)), S = y.length - 1;
1217
- }) && f({ pageIndex: C, componentIndex: S });
1218
- }
1219
- function R() {
1221
+ let C = -1;
1222
+ const S = o.value;
1223
+ c((R) => {
1224
+ const w = R.template.pages[S].components;
1225
+ w.push(Gt(d)), C = w.length - 1;
1226
+ }) && f({ pageIndex: S, componentIndex: C });
1227
+ }
1228
+ function T() {
1220
1229
  if (p.value) return;
1221
- const u = s.value;
1222
- u && !g.locked(u) && d((S) => {
1223
- S.template.pages[u.pageIndex].components.splice(
1224
- u.componentIndex,
1230
+ const d = s.value;
1231
+ d && !h.locked(d) && c((C) => {
1232
+ C.template.pages[d.pageIndex].components.splice(
1233
+ d.componentIndex,
1225
1234
  1
1226
1235
  );
1227
- }) && (g.remap(u.pageIndex, u.componentIndex), s.value = void 0);
1236
+ }) && (h.remap(d.pageIndex, d.componentIndex), s.value = void 0);
1228
1237
  }
1229
1238
  function I() {
1230
1239
  if (p.value) return;
1231
- const u = s.value;
1232
- if (!u) return;
1233
- let S = -1;
1234
- d((C) => {
1235
- const L = C.template.pages[u.pageIndex], y = JSON.parse(JSON.stringify(Re(C, u))), _ = be(y);
1236
- _.leftMm += 4, _.topMm += 4, je(
1237
- y,
1238
- Ze(_, L, y.kind === "list")
1239
- ), y.kind === "list" ? delete y.id : (delete y.nid, delete y.rkey), L.components.push(y), S = L.components.length - 1;
1240
- }) && f({ pageIndex: u.pageIndex, componentIndex: S });
1241
- }
1242
- function v(u) {
1240
+ const d = s.value;
1241
+ if (!d) return;
1242
+ let C = -1;
1243
+ c((S) => {
1244
+ const R = S.template.pages[d.pageIndex], w = JSON.parse(JSON.stringify(Te(S, d))), _ = ye(w);
1245
+ _.leftMm += 4, _.topMm += 4, Ue(
1246
+ w,
1247
+ tt(_, R, w.kind === "list")
1248
+ ), w.kind === "list" ? delete w.id : (delete w.nid, delete w.rkey), R.components.push(w), C = R.components.length - 1;
1249
+ }) && f({ pageIndex: d.pageIndex, componentIndex: C });
1250
+ }
1251
+ function v(d) {
1243
1252
  if (p.value) return;
1244
- const S = s.value;
1245
- if (!S || g.locked(S)) return;
1246
- const C = S.componentIndex + u;
1247
- t.value.template.pages[S.pageIndex]?.components[C] && d((L) => {
1248
- const y = L.template.pages[S.pageIndex].components;
1249
- y.splice(C, 0, y.splice(S.componentIndex, 1)[0]);
1250
- }) && (g.remap(S.pageIndex, S.componentIndex, C), f({ pageIndex: S.pageIndex, componentIndex: C }));
1253
+ const C = s.value;
1254
+ if (!C || h.locked(C)) return;
1255
+ const S = C.componentIndex + d;
1256
+ t.value.template.pages[C.pageIndex]?.components[S] && c((R) => {
1257
+ const w = R.template.pages[C.pageIndex].components;
1258
+ w.splice(S, 0, w.splice(C.componentIndex, 1)[0]);
1259
+ }) && (h.remap(C.pageIndex, C.componentIndex, S), f({ pageIndex: C.pageIndex, componentIndex: S }));
1251
1260
  }
1252
1261
  return {
1253
- ...g,
1262
+ ...h,
1254
1263
  mode: i,
1255
1264
  selection: s,
1256
1265
  pageIndex: o,
1257
- active: x,
1266
+ active: M,
1258
1267
  geometryDisabled: p,
1259
1268
  select: f,
1260
1269
  mutate: m,
1261
- geometry: b,
1262
- insert: T,
1263
- remove: R,
1270
+ geometry: y,
1271
+ insert: A,
1272
+ remove: T,
1264
1273
  duplicate: I,
1265
1274
  reorder: v
1266
1275
  };
1267
1276
  }
1268
- function ta(t, d, i) {
1269
- const { draft: s, lists: o, selected: p, activeList: g, blocked: x, jsonPending: f, error: m } = t, { section: b, activeIndex: T } = d, R = ea(s, t.transaction), {
1277
+ function oa(t, c, i) {
1278
+ const { draft: s, lists: o, selected: p, activeList: h, blocked: M, jsonPending: f, error: m } = t, { section: y, activeIndex: A } = c, T = aa(s, t.transaction), {
1270
1279
  mode: I,
1271
1280
  selection: v,
1272
- pageIndex: u,
1273
- active: S
1274
- } = R, C = N("excel"), L = N(/* @__PURE__ */ new Set());
1275
- ee([b, C], () => {
1276
- b.value === "tools" && (L.value = /* @__PURE__ */ new Set([...L.value, C.value]));
1277
- }), ee(v, (w) => {
1278
- if (!w) return;
1281
+ pageIndex: d,
1282
+ active: C
1283
+ } = T, S = z("excel"), R = z(/* @__PURE__ */ new Set());
1284
+ ee([y, S], () => {
1285
+ y.value === "tools" && (R.value = /* @__PURE__ */ new Set([...R.value, S.value]));
1286
+ }), ee(v, (x) => {
1287
+ if (!x) return;
1279
1288
  const k = o.value.findIndex(
1280
- (A) => A.pageIndex === w.pageIndex && A.componentIndex === w.componentIndex
1289
+ (L) => L.pageIndex === x.pageIndex && L.componentIndex === x.componentIndex
1281
1290
  );
1282
1291
  k >= 0 && (p.value = k);
1283
- }), ee([T, p, I, b], () => {
1284
- if (I.value !== "design" || b.value !== "fields") return;
1285
- const w = o.value[p.value];
1286
- w && (v.value?.pageIndex !== w.pageIndex || v.value.componentIndex !== w.componentIndex) && R.select({ pageIndex: w.pageIndex, componentIndex: w.componentIndex });
1292
+ }), ee([A, p, I, y], () => {
1293
+ if (I.value !== "design" || y.value !== "fields") return;
1294
+ const x = o.value[p.value];
1295
+ x && (v.value?.pageIndex !== x.pageIndex || v.value.componentIndex !== x.componentIndex) && T.select({ pageIndex: x.pageIndex, componentIndex: x.componentIndex });
1287
1296
  });
1288
- const y = z(
1289
- () => t.editingReadonly.value || x.value || f.value
1290
- ), _ = z(
1291
- () => i()?.[g.value?.dataset ?? ""]
1297
+ const w = F(
1298
+ () => t.editingReadonly.value || M.value || f.value
1299
+ ), _ = F(
1300
+ () => i()?.[h.value?.dataset ?? ""]
1292
1301
  );
1293
- function $(w) {
1294
- I.value = w, b.value === "tools" && (b.value = w === "design" ? "component" : "fields");
1302
+ function E(x) {
1303
+ I.value = x, y.value === "tools" && (y.value = x === "design" ? "component" : "fields");
1295
1304
  }
1296
- function D(w) {
1297
- if (!s.value.template.pages[w.pageIndex]?.components[w.componentIndex])
1305
+ function D(x) {
1306
+ if (!s.value.template.pages[x.pageIndex]?.components[x.componentIndex])
1298
1307
  return;
1299
- if (R.select(w), s.value.template.pages[w.pageIndex]?.components[w.componentIndex]?.kind === "list") {
1300
- const A = o.value.findIndex(
1301
- (E) => E.pageIndex === w.pageIndex && E.componentIndex === w.componentIndex
1308
+ if (T.select(x), s.value.template.pages[x.pageIndex]?.components[x.componentIndex]?.kind === "list") {
1309
+ const L = o.value.findIndex(
1310
+ ($) => $.pageIndex === x.pageIndex && $.componentIndex === x.componentIndex
1302
1311
  );
1303
- A >= 0 && (p.value = A), b.value = "fields";
1304
- } else b.value = "component";
1305
- }
1306
- function H(w) {
1307
- const k = w.target;
1308
- k.value && (R.insert(k.value), I.value = "design", b.value = "component", k.value = "");
1309
- }
1310
- function G(w) {
1311
- s.value.template.pages[u.value]?.flow && ["leftMm", "topMm", "widthMm", "heightMm", "pageAnchor", "grid"].some((k) => k in w) || R.mutate((k, A) => {
1312
- if (k.kind !== "list" && w.pageAnchor !== k.pageAnchor) {
1313
- const P = A.template.pages[v.value.pageIndex];
1314
- w.pageAnchor === "header" && (k.topMm = P.marginTopMm ?? 0), w.pageAnchor === "footer" && (k.topMm = Math.max(
1312
+ L >= 0 && (p.value = L), y.value = "fields";
1313
+ } else y.value = "component";
1314
+ }
1315
+ function H(x) {
1316
+ const k = x.target;
1317
+ k.value && (T.insert(k.value), I.value = "design", y.value = "component", k.value = "");
1318
+ }
1319
+ function G(x) {
1320
+ s.value.template.pages[d.value]?.flow && ["leftMm", "topMm", "widthMm", "heightMm", "pageAnchor", "grid"].some((k) => k in x) || T.mutate((k, L) => {
1321
+ if (k.kind !== "list" && x.pageAnchor !== k.pageAnchor) {
1322
+ const P = L.template.pages[v.value.pageIndex];
1323
+ x.pageAnchor === "header" && (k.topMm = P.marginTopMm ?? 0), x.pageAnchor === "footer" && (k.topMm = Math.max(
1315
1324
  0,
1316
1325
  P.heightMm - (P.marginBottomMm ?? 0) - k.heightMm
1317
1326
  ));
1318
1327
  }
1319
- const E = k;
1320
- for (const [P, W] of Object.entries(w))
1321
- W === void 0 ? delete E[P] : E[P] = W;
1328
+ const $ = k;
1329
+ for (const [P, B] of Object.entries(x))
1330
+ B === void 0 ? delete $[P] : $[P] = B;
1322
1331
  });
1323
1332
  }
1324
- function B(w) {
1333
+ function U(x) {
1325
1334
  const k = o.value[p.value];
1326
- k && t.transaction((A) => {
1327
- A.template.pages[k.pageIndex].components[k.componentIndex] = w;
1335
+ k && t.transaction((L) => {
1336
+ L.template.pages[k.pageIndex].components[k.componentIndex] = x;
1328
1337
  });
1329
1338
  }
1330
- function q(w) {
1331
- const k = g.value;
1339
+ function X(x) {
1340
+ const k = h.value;
1332
1341
  if (!k || s.value.template.pages[o.value[p.value]?.pageIndex ?? -1]?.flow) return;
1333
- const A = JSON.parse(JSON.stringify(k));
1342
+ const L = JSON.parse(JSON.stringify(k));
1334
1343
  try {
1335
- Pt(A, T.value, T.value + w) && (B(A), d.activate(T.value + w));
1336
- } catch (E) {
1337
- m.value = E instanceof Error ? E.message : String(E);
1344
+ Ft(L, A.value, A.value + x) && (U(L), c.activate(A.value + x));
1345
+ } catch ($) {
1346
+ m.value = $ instanceof Error ? $.message : String($);
1338
1347
  }
1339
1348
  }
1340
- function ae(w) {
1349
+ function te(x) {
1341
1350
  const k = o.value[p.value];
1342
- !k || s.value.template.pages[k.pageIndex]?.flow || t.transaction((A) => {
1343
- const E = A.template.pages[k.pageIndex].components[k.componentIndex];
1344
- E?.kind === "list" && (w.action === "add" ? Ht(E) : w.action === "merge" ? Gt(E, w.row, w.first, w.last) : zt(E, w.row, w.first));
1351
+ !k || s.value.template.pages[k.pageIndex]?.flow || t.transaction((L) => {
1352
+ const $ = L.template.pages[k.pageIndex].components[k.componentIndex];
1353
+ $?.kind === "list" && (x.action === "add" ? Nt($) : x.action === "merge" ? zt($, x.row, x.first, x.last) : Ot($, x.row, x.first));
1345
1354
  });
1346
1355
  }
1347
- function n(w) {
1348
- const k = /\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(w.path ?? ""), A = w.pageIndex ?? (k ? Number(k[1]) : void 0), E = w.componentIndex ?? (k ? Number(k[2]) : void 0);
1349
- if (!(A === void 0 || E === void 0) && (I.value = "design", D({ pageIndex: A, componentIndex: E }), w.field)) {
1350
- const P = g.value?.columns.findIndex(
1351
- (W) => W.field === w.field
1356
+ function n(x) {
1357
+ const k = /\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(x.path ?? ""), L = x.pageIndex ?? (k ? Number(k[1]) : void 0), $ = x.componentIndex ?? (k ? Number(k[2]) : void 0);
1358
+ if (!(L === void 0 || $ === void 0) && (I.value = "design", D({ pageIndex: L, componentIndex: $ }), x.field)) {
1359
+ const P = h.value?.columns.findIndex(
1360
+ (B) => B.field === x.field
1352
1361
  );
1353
- P !== void 0 && P >= 0 && d.activate(P);
1362
+ P !== void 0 && P >= 0 && c.activate(P);
1354
1363
  }
1355
1364
  }
1356
1365
  return {
1357
1366
  mode: I,
1358
- setMode: $,
1367
+ setMode: E,
1359
1368
  canvasSelection: v,
1360
- canvasPage: u,
1361
- canvasActive: S,
1362
- tool: C,
1363
- visitedTools: L,
1364
- editDisabled: y,
1369
+ canvasPage: d,
1370
+ canvasActive: C,
1371
+ tool: S,
1372
+ visitedTools: R,
1373
+ editDisabled: w,
1365
1374
  dataSchema: _,
1366
1375
  chooseCanvas: D,
1367
1376
  insertComponent: H,
1368
1377
  patchCanvas: G,
1369
- changeList: B,
1370
- moveColumn: q,
1371
- headerCommand: ae,
1378
+ changeList: U,
1379
+ moveColumn: X,
1380
+ headerCommand: te,
1372
1381
  locateReview: n,
1373
- canvas: R
1382
+ canvas: T
1374
1383
  };
1375
1384
  }
1376
- function na(t, d, i) {
1385
+ function la(t, c, i) {
1377
1386
  if (!t.length) return;
1378
- const s = Math.max(0, t.indexOf(d)), p = {
1387
+ const s = Math.max(0, t.indexOf(c)), p = {
1379
1388
  ArrowDown: Math.min(s + 1, t.length - 1),
1380
1389
  ArrowUp: Math.max(s - 1, 0),
1381
1390
  Home: 0,
@@ -1383,159 +1392,159 @@ function na(t, d, i) {
1383
1392
  }[i];
1384
1393
  return p === void 0 ? void 0 : t[p];
1385
1394
  }
1386
- function aa(t, d, i) {
1387
- const s = N(!1), o = N(t.activeIndex.value), p = N(null), g = N(null), x = N(null), f = N(null);
1388
- function m(L = !1) {
1389
- const y = f.value, _ = y?.querySelector(
1395
+ function ia(t, c, i) {
1396
+ const s = z(!1), o = z(t.activeIndex.value), p = z(null), h = z(null), M = z(null), f = z(null);
1397
+ function m(R = !1) {
1398
+ const w = f.value, _ = w?.querySelector(
1390
1399
  `button[data-column-index="${o.value}"]`
1391
1400
  );
1392
- if (!y || !_) return;
1393
- L && _.focus({ preventScroll: !0 });
1394
- const $ = y.getBoundingClientRect(), D = _.getBoundingClientRect(), H = $.top + y.clientTop, G = H + y.clientHeight;
1395
- D.top < H ? y.scrollTop += D.top - H : D.bottom > G && (y.scrollTop += D.bottom - G);
1401
+ if (!w || !_) return;
1402
+ R && _.focus({ preventScroll: !0 });
1403
+ const E = w.getBoundingClientRect(), D = _.getBoundingClientRect(), H = E.top + w.clientTop, G = H + w.clientHeight;
1404
+ D.top < H ? w.scrollTop += D.top - H : D.bottom > G && (w.scrollTop += D.bottom - G);
1396
1405
  }
1397
- async function b(L = !1) {
1398
- s.value && (s.value = !1, L && (await me(), p.value?.focus({ preventScroll: !0 })));
1406
+ async function y(R = !1) {
1407
+ s.value && (s.value = !1, R && (await ce(), p.value?.focus({ preventScroll: !0 })));
1399
1408
  }
1400
- async function T() {
1401
- if (s.value) return b(!0);
1402
- const L = i.value.map((y) => y.index);
1403
- o.value = L.includes(t.activeIndex.value) ? t.activeIndex.value : L[0] ?? -1, s.value = !0, await me(), x.value?.focus({ preventScroll: !0 }), m();
1409
+ async function A() {
1410
+ if (s.value) return y(!0);
1411
+ const R = i.value.map((w) => w.index);
1412
+ o.value = R.includes(t.activeIndex.value) ? t.activeIndex.value : R[0] ?? -1, s.value = !0, await ce(), M.value?.focus({ preventScroll: !0 }), m();
1404
1413
  }
1405
- function R(L) {
1406
- t.activate(L), b(!0);
1414
+ function T(R) {
1415
+ t.activate(R), y(!0);
1407
1416
  }
1408
- function I(L) {
1409
- s.value && (L.preventDefault(), L.stopPropagation(), b(!0));
1417
+ function I(R) {
1418
+ s.value && (R.preventDefault(), R.stopPropagation(), y(!0));
1410
1419
  }
1411
- async function v(L) {
1412
- const y = na(
1420
+ async function v(R) {
1421
+ const w = la(
1413
1422
  i.value.map((_) => _.index),
1414
1423
  o.value,
1415
- L.key
1424
+ R.key
1416
1425
  );
1417
- y !== void 0 && (o.value = y, L.preventDefault(), await me(), m(!0));
1418
- }
1419
- async function u(L) {
1420
- if (!["ArrowDown", "ArrowUp", "Enter"].includes(L.key)) return;
1421
- L.preventDefault(), L.stopPropagation();
1422
- const y = i.value.map((_) => _.index);
1423
- if (y.length) {
1424
- if (L.key === "Enter") {
1425
- y.includes(o.value) && R(o.value);
1426
+ w !== void 0 && (o.value = w, R.preventDefault(), await ce(), m(!0));
1427
+ }
1428
+ async function d(R) {
1429
+ if (!["ArrowDown", "ArrowUp", "Enter"].includes(R.key)) return;
1430
+ R.preventDefault(), R.stopPropagation();
1431
+ const w = i.value.map((_) => _.index);
1432
+ if (w.length) {
1433
+ if (R.key === "Enter") {
1434
+ w.includes(o.value) && T(o.value);
1426
1435
  return;
1427
1436
  }
1428
- L.key === "ArrowUp" && (o.value = y.at(-1)), await me(), m(!0);
1437
+ R.key === "ArrowUp" && (o.value = w.at(-1)), await ce(), m(!0);
1429
1438
  }
1430
1439
  }
1431
- function S(L) {
1432
- const y = L.target;
1433
- !s.value || g.value?.contains(y) || p.value?.contains(y) || b();
1440
+ function C(R) {
1441
+ const w = R.target;
1442
+ !s.value || h.value?.contains(w) || p.value?.contains(w) || y();
1434
1443
  }
1435
- function C(L) {
1436
- const y = L.relatedTarget;
1437
- !y || g.value?.contains(y) || p.value?.contains(y) || b();
1444
+ function S(R) {
1445
+ const w = R.relatedTarget;
1446
+ !w || h.value?.contains(w) || p.value?.contains(w) || y();
1438
1447
  }
1439
- return ee(i, (L) => {
1440
- L.some((y) => y.index === o.value) || (o.value = L[0]?.index ?? -1);
1441
- }), ee(d, () => {
1442
- b();
1443
- }), mt(() => document.addEventListener("pointerdown", S)), Ae(() => document.removeEventListener("pointerdown", S)), {
1448
+ return ee(i, (R) => {
1449
+ R.some((w) => w.index === o.value) || (o.value = R[0]?.index ?? -1);
1450
+ }), ee(c, () => {
1451
+ y();
1452
+ }), pt(() => document.addEventListener("pointerdown", C)), Le(() => document.removeEventListener("pointerdown", C)), {
1444
1453
  open: s,
1445
1454
  cursor: o,
1446
1455
  trigger: p,
1447
- panel: g,
1448
- search: x,
1456
+ panel: h,
1457
+ search: M,
1449
1458
  list: f,
1450
- toggle: T,
1451
- close: b,
1452
- choose: R,
1459
+ toggle: A,
1460
+ close: y,
1461
+ choose: T,
1453
1462
  escape: I,
1454
1463
  navigate: v,
1455
- searchKeydown: u,
1456
- leave: C
1464
+ searchKeydown: d,
1465
+ leave: S
1457
1466
  };
1458
1467
  }
1459
- function oa(t, d, i, s) {
1460
- const o = N(0), p = N(""), g = N([]), x = z(
1468
+ function sa(t, c, i, s) {
1469
+ const o = z(0), p = z(""), h = z([]), M = F(
1461
1470
  () => t.value.template.pages.flatMap(
1462
- (y, _) => y.components.flatMap(
1463
- ($, D) => $.kind === "list" ? [{ component: $, pageIndex: _, componentIndex: D }] : []
1471
+ (w, _) => w.components.flatMap(
1472
+ (E, D) => E.kind === "list" ? [{ component: E, pageIndex: _, componentIndex: D }] : []
1464
1473
  )
1465
1474
  )
1466
- ), f = z(
1467
- () => x.value[o.value]?.component
1468
- ), m = z(() => {
1469
- const y = f.value;
1470
- if (!y) return [];
1471
- const _ = y.columns.map(
1472
- ($) => $.headerStyle?.align ?? $.headerAlign ?? y.headerStyle?.align ?? y.headerAlign ?? $.style?.align ?? "center"
1475
+ ), f = F(
1476
+ () => M.value[o.value]?.component
1477
+ ), m = F(() => {
1478
+ const w = f.value;
1479
+ if (!w) return [];
1480
+ const _ = w.columns.map(
1481
+ (E) => E.headerStyle?.align ?? E.headerAlign ?? w.headerStyle?.align ?? w.headerAlign ?? E.style?.align ?? "center"
1473
1482
  );
1474
- if (y.headerGrid && d())
1475
- for (const $ of Ce(y.headerGrid, y.widthMm, 100).cells)
1476
- for (let D = $.ci; D < $.ci + ($.cell.colSpan ?? 1); D++)
1477
- _[D] = $.cell.style?.align ?? "left";
1483
+ if (w.headerGrid && c())
1484
+ for (const E of Se(w.headerGrid, w.widthMm, 100).cells)
1485
+ for (let D = E.ci; D < E.ci + (E.cell.colSpan ?? 1); D++)
1486
+ _[D] = E.cell.style?.align ?? "left";
1478
1487
  return _;
1479
- }), b = z(() => {
1480
- const y = p.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
1481
- return (f.value?.columns ?? []).flatMap((_, $) => {
1488
+ }), y = F(() => {
1489
+ const w = p.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
1490
+ return (f.value?.columns ?? []).flatMap((_, E) => {
1482
1491
  const D = `${_.header} ${_.field}`.toLocaleLowerCase();
1483
- return y.every((H) => D.includes(H)) ? [{ column: _, index: $ }] : [];
1492
+ return w.every((H) => D.includes(H)) ? [{ column: _, index: E }] : [];
1484
1493
  });
1485
1494
  });
1486
- function T(y, _) {
1487
- g.value = _ ? [.../* @__PURE__ */ new Set([...g.value, y])] : g.value.filter(($) => $ !== y);
1495
+ function A(w, _) {
1496
+ h.value = _ ? [.../* @__PURE__ */ new Set([...h.value, w])] : h.value.filter((E) => E !== w);
1488
1497
  }
1489
- function R(y) {
1490
- for (const _ of b.value) T(_.index, y);
1498
+ function T(w) {
1499
+ for (const _ of y.value) A(_.index, w);
1491
1500
  }
1492
1501
  function I() {
1493
- g.value = [];
1502
+ h.value = [];
1494
1503
  }
1495
- function v(y, _, $) {
1504
+ function v(w, _, E) {
1496
1505
  if (!i()) return;
1497
- const D = x.value[o.value];
1506
+ const D = M.value[o.value];
1498
1507
  if ((_ === "widthMm" || _ === "hidden") && D && t.value.template.pages[D.pageIndex]?.flow) return;
1499
- const H = f.value?.columns[y];
1500
- H && (_ === "hidden" && $ === !0 && !f.value?.columns.some(
1501
- (G, B) => B !== y && !G.hidden
1502
- ) || (Object.assign(H, { [_]: _ === "widthMm" ? Number($) : $ }), _ === "header" && S(y, String($)), _ === "headerAlign" && C(
1503
- y,
1504
- $
1505
- ), _ === "widthMm" && u(), s()));
1506
- }
1507
- function u() {
1508
- const y = x.value[o.value];
1509
- if (!y) return;
1510
- const _ = y.component, $ = t.value.template.pages[y.pageIndex], D = _.columns.map((H) => H.widthMm);
1511
- _.headerGrid && (_.headerGrid.colWidthsMm = D), $.layout === "wide" && D.every((H) => Number.isFinite(H) && H > 0) && (_.widthMm = D.reduce((H, G) => H + G, 0), $.widthMm = Math.max(
1512
- ...$.components.map(
1508
+ const H = f.value?.columns[w];
1509
+ H && (_ === "hidden" && E === !0 && !f.value?.columns.some(
1510
+ (G, U) => U !== w && !G.hidden
1511
+ ) || (Object.assign(H, { [_]: _ === "widthMm" ? Number(E) : E }), _ === "header" && C(w, String(E)), _ === "headerAlign" && S(
1512
+ w,
1513
+ E
1514
+ ), _ === "widthMm" && d(), s()));
1515
+ }
1516
+ function d() {
1517
+ const w = M.value[o.value];
1518
+ if (!w) return;
1519
+ const _ = w.component, E = t.value.template.pages[w.pageIndex], D = _.columns.map((H) => H.widthMm);
1520
+ _.headerGrid && (_.headerGrid.colWidthsMm = D), E.layout === "wide" && D.every((H) => Number.isFinite(H) && H > 0) && (_.widthMm = D.reduce((H, G) => H + G, 0), E.widthMm = Math.max(
1521
+ ...E.components.map(
1513
1522
  (H) => H.leftMm + H.widthMm
1514
1523
  )
1515
- ) + ($.marginRightMm ?? 0));
1524
+ ) + (E.marginRightMm ?? 0));
1516
1525
  }
1517
- function S(y, _) {
1518
- const $ = f.value;
1519
- if (!$?.headerGrid) return;
1520
- const H = Ce($.headerGrid, $.widthMm, 100).cells.filter(({ ci: G, cell: B }) => G <= y && G + (B.colSpan ?? 1) > y).slice(-1)[0];
1521
- H && (Object.assign(H.cell, { text: _, rawText: _, value: _ }), $.columns.slice(H.ci, H.ci + (H.cell.colSpan ?? 1)).forEach((G) => {
1526
+ function C(w, _) {
1527
+ const E = f.value;
1528
+ if (!E?.headerGrid) return;
1529
+ const H = Se(E.headerGrid, E.widthMm, 100).cells.filter(({ ci: G, cell: U }) => G <= w && G + (U.colSpan ?? 1) > w).slice(-1)[0];
1530
+ H && (Object.assign(H.cell, { text: _, rawText: _, value: _ }), E.columns.slice(H.ci, H.ci + (H.cell.colSpan ?? 1)).forEach((G) => {
1522
1531
  G.header = _;
1523
1532
  }));
1524
1533
  }
1525
- function C(y, _) {
1526
- const $ = f.value, D = $?.columns[y];
1527
- if (D?.headerStyle?.align !== void 0 && (D.headerStyle = { ...D.headerStyle, align: _ }), !$?.headerGrid) return;
1528
- const G = Ce($.headerGrid, $.widthMm, 100).cells.filter(({ ci: B, cell: q }) => B <= y && B + (q.colSpan ?? 1) > y).slice(-1)[0];
1529
- G && (G.cell.style = { ...G.cell.style, align: _ }, $.columns.slice(G.ci, G.ci + (G.cell.colSpan ?? 1)).forEach((B) => {
1530
- B.headerAlign = _, B.headerStyle?.align !== void 0 && (B.headerStyle = { ...B.headerStyle, align: _ });
1534
+ function S(w, _) {
1535
+ const E = f.value, D = E?.columns[w];
1536
+ if (D?.headerStyle?.align !== void 0 && (D.headerStyle = { ...D.headerStyle, align: _ }), !E?.headerGrid) return;
1537
+ const G = Se(E.headerGrid, E.widthMm, 100).cells.filter(({ ci: U, cell: X }) => U <= w && U + (X.colSpan ?? 1) > w).slice(-1)[0];
1538
+ G && (G.cell.style = { ...G.cell.style, align: _ }, E.columns.slice(G.ci, G.ci + (G.cell.colSpan ?? 1)).forEach((U) => {
1539
+ U.headerAlign = _, U.headerStyle?.align !== void 0 && (U.headerStyle = { ...U.headerStyle, align: _ });
1531
1540
  }));
1532
1541
  }
1533
- function L(y, _) {
1534
- if (!(!i() || y === "headerAlign" && _ === "auto")) {
1535
- for (const $ of g.value) {
1536
- const D = f.value?.columns[$];
1537
- D && (Object.assign(D, { [y]: _ }), y === "headerAlign" && C(
1538
- $,
1542
+ function R(w, _) {
1543
+ if (!(!i() || w === "headerAlign" && _ === "auto")) {
1544
+ for (const E of h.value) {
1545
+ const D = f.value?.columns[E];
1546
+ D && (Object.assign(D, { [w]: _ }), w === "headerAlign" && S(
1547
+ E,
1539
1548
  _
1540
1549
  ));
1541
1550
  }
@@ -1545,108 +1554,108 @@ function oa(t, d, i, s) {
1545
1554
  return {
1546
1555
  selected: o,
1547
1556
  query: p,
1548
- selectedColumns: g,
1549
- lists: x,
1557
+ selectedColumns: h,
1558
+ lists: M,
1550
1559
  activeList: f,
1551
1560
  headerAlignments: m,
1552
- visibleColumns: b,
1553
- toggleColumn: T,
1554
- selectVisible: R,
1561
+ visibleColumns: y,
1562
+ toggleColumn: A,
1563
+ selectVisible: T,
1555
1564
  clearSelection: I,
1556
1565
  setColumn: v,
1557
- alignColumns: L
1566
+ alignColumns: R
1558
1567
  };
1559
1568
  }
1560
- function Ie(t) {
1569
+ function $e(t) {
1561
1570
  return t.kind === "snapshot" ? t.value.length * 2 : (t.removed.length + t.inserted.length) * 2 + 16;
1562
1571
  }
1563
- function la(t, d, i = !1) {
1564
- const s = { kind: "snapshot", value: d };
1572
+ function ra(t, c, i = !1) {
1573
+ const s = { kind: "snapshot", value: c };
1565
1574
  if (i) return s;
1566
1575
  let o = 0;
1567
- const p = Math.min(t.length, d.length);
1568
- for (; o < p && t.charCodeAt(o) === d.charCodeAt(o); ) o++;
1569
- let g = t.length, x = d.length;
1570
- for (; g > o && x > o && t.charCodeAt(g - 1) === d.charCodeAt(x - 1); )
1571
- g--, x--;
1572
- const f = { kind: "patch", start: o, removed: t.slice(o, g), inserted: d.slice(o, x) };
1573
- return Ie(f) < Ie(s) ? f : s;
1576
+ const p = Math.min(t.length, c.length);
1577
+ for (; o < p && t.charCodeAt(o) === c.charCodeAt(o); ) o++;
1578
+ let h = t.length, M = c.length;
1579
+ for (; h > o && M > o && t.charCodeAt(h - 1) === c.charCodeAt(M - 1); )
1580
+ h--, M--;
1581
+ const f = { kind: "patch", start: o, removed: t.slice(o, h), inserted: c.slice(o, M) };
1582
+ return $e(f) < $e(s) ? f : s;
1574
1583
  }
1575
- function Be(t, d, i = !1) {
1576
- if (d.kind === "snapshot") return d.value;
1577
- const s = i ? d.inserted : d.removed, o = i ? d.removed : d.inserted;
1578
- return t.slice(0, d.start) + o + t.slice(d.start + s.length);
1584
+ function Be(t, c, i = !1) {
1585
+ if (c.kind === "snapshot") return c.value;
1586
+ const s = i ? c.inserted : c.removed, o = i ? c.removed : c.inserted;
1587
+ return t.slice(0, c.start) + o + t.slice(c.start + s.length);
1579
1588
  }
1580
- function ia(t, d = { entries: 100, bytes: 16 * 1024 * 1024 }) {
1581
- if (![d.entries, d.bytes].every((v) => Number.isSafeInteger(v) && v > 0)) throw new RangeError("History budgets must be positive safe integers");
1582
- const i = pt([{ kind: "snapshot", value: t }]), s = N(0), o = N(t), p = z(() => s.value > 0), g = z(() => s.value + 1 < i.value.length), x = z(() => o.value), f = z(() => i.value.reduce((v, u) => v + Ie(u), 0));
1589
+ function da(t, c = { entries: 100, bytes: 16 * 1024 * 1024 }) {
1590
+ if (![c.entries, c.bytes].every((v) => Number.isSafeInteger(v) && v > 0)) throw new RangeError("History budgets must be positive safe integers");
1591
+ const i = ht([{ kind: "snapshot", value: t }]), s = z(0), o = z(t), p = F(() => s.value > 0), h = F(() => s.value + 1 < i.value.length), M = F(() => o.value), f = F(() => i.value.reduce((v, d) => v + $e(d), 0));
1583
1592
  function m(v) {
1584
1593
  i.value = [{ kind: "snapshot", value: v }], s.value = 0, o.value = v;
1585
1594
  }
1586
- function b(v) {
1587
- let u = v;
1588
- for (; u > 0 && i.value[u].kind !== "snapshot"; ) u--;
1589
- let S = "";
1590
- for (; u <= v; u++) S = Be(S, i.value[u]);
1591
- return S;
1592
- }
1593
- function T(v) {
1594
- let u = v.reduce((S, C) => S + Ie(C), 0);
1595
- for (; v.length > 1 && (v.length > d.entries || u > d.bytes); ) {
1596
- const S = v[0], C = v[1], L = { kind: "snapshot", value: Be(S.value, C) };
1597
- u += Ie(L) - Ie(S) - Ie(C), v.splice(0, 2, L);
1595
+ function y(v) {
1596
+ let d = v;
1597
+ for (; d > 0 && i.value[d].kind !== "snapshot"; ) d--;
1598
+ let C = "";
1599
+ for (; d <= v; d++) C = Be(C, i.value[d]);
1600
+ return C;
1601
+ }
1602
+ function A(v) {
1603
+ let d = v.reduce((C, S) => C + $e(S), 0);
1604
+ for (; v.length > 1 && (v.length > c.entries || d > c.bytes); ) {
1605
+ const C = v[0], S = v[1], R = { kind: "snapshot", value: Be(C.value, S) };
1606
+ d += $e(R) - $e(C) - $e(S), v.splice(0, 2, R);
1598
1607
  }
1599
1608
  return v;
1600
1609
  }
1601
- function R(v) {
1610
+ function T(v) {
1602
1611
  if (o.value === v) return;
1603
- const u = i.value.slice(0, s.value + 1);
1604
- u.push(la(o.value, v, u.length % 20 === 0)), i.value = T(u), s.value = i.value.length - 1, o.value = v;
1612
+ const d = i.value.slice(0, s.value + 1);
1613
+ d.push(ra(o.value, v, d.length % 20 === 0)), i.value = A(d), s.value = i.value.length - 1, o.value = v;
1605
1614
  }
1606
1615
  function I(v) {
1607
- if (v < 0 ? !p.value : !g.value) return;
1608
- const u = i.value[s.value];
1609
- return v < 0 && u.kind === "patch" ? o.value = Be(o.value, u, !0) : v > 0 ? o.value = Be(o.value, i.value[s.value + 1]) : o.value = b(s.value - 1), s.value += v, o.value;
1616
+ if (v < 0 ? !p.value : !h.value) return;
1617
+ const d = i.value[s.value];
1618
+ return v < 0 && d.kind === "patch" ? o.value = Be(o.value, d, !0) : v > 0 ? o.value = Be(o.value, i.value[s.value + 1]) : o.value = y(s.value - 1), s.value += v, o.value;
1610
1619
  }
1611
- return { canUndo: p, canRedo: g, current: x, retainedBytes: f, reset: m, record: R, move: I };
1620
+ return { canUndo: p, canRedo: h, current: M, retainedBytes: f, reset: m, record: T, move: I };
1612
1621
  }
1613
- function sa(t) {
1614
- const d = pt(null), i = N(!1);
1622
+ function ua(t) {
1623
+ const c = ht(null), i = z(!1);
1615
1624
  let s, o = 0;
1616
1625
  function p(f) {
1617
- s?.(f), s = void 0, d.value = null;
1626
+ s?.(f), s = void 0, c.value = null;
1618
1627
  }
1619
- function g() {
1628
+ function h() {
1620
1629
  o++, p(!1), i.value = !1;
1621
1630
  }
1622
- async function x(f) {
1623
- g();
1624
- const m = o, b = t();
1631
+ async function M(f) {
1632
+ h();
1633
+ const m = o, y = t();
1625
1634
  i.value = !0;
1626
1635
  try {
1627
- const T = await new Promise((R, I) => {
1628
- if (s = R, !b) {
1629
- d.value = f;
1636
+ const A = await new Promise((T, I) => {
1637
+ if (s = T, !y) {
1638
+ c.value = f;
1630
1639
  return;
1631
1640
  }
1632
- Promise.resolve().then(() => o === m ? b(f) : !1).then((v) => {
1641
+ Promise.resolve().then(() => o === m ? y(f) : !1).then((v) => {
1633
1642
  o === m && p(v === !0);
1634
1643
  }, (v) => {
1635
- o === m && (s = void 0, d.value = null, I(v));
1644
+ o === m && (s = void 0, c.value = null, I(v));
1636
1645
  });
1637
1646
  });
1638
- return o === m && T === !0;
1647
+ return o === m && A === !0;
1639
1648
  } finally {
1640
1649
  o === m && (i.value = !1);
1641
1650
  }
1642
1651
  }
1643
- return Ae(g), { confirmation: d, pending: i, decide: p, request: x, cancel: g };
1652
+ return Le(h), { confirmation: c, pending: i, decide: p, request: M, cancel: h };
1644
1653
  }
1645
- function ra(t, d) {
1646
- const i = N(ne(t.modelValue)), s = N(xe(i.value)), o = N(xe(i.value)), p = N(""), g = N(!1), x = z(() => ({
1647
- ...Ke,
1654
+ function ca(t, c) {
1655
+ const i = z(ae(t.modelValue)), s = z(ke(i.value)), o = z(ke(i.value)), p = z(""), h = z(!1), M = F(() => ({
1656
+ ...Je,
1648
1657
  ...t.messages
1649
- })), f = z(() => ({
1658
+ })), f = F(() => ({
1650
1659
  showExport: !1,
1651
1660
  showPrint: !1,
1652
1661
  showPdfWindow: !1,
@@ -1665,39 +1674,39 @@ function ra(t, d) {
1665
1674
  ...t.preview?.theme
1666
1675
  }
1667
1676
  }));
1668
- _t({
1677
+ Et({
1669
1678
  get defaults() {
1670
1679
  return f.value;
1671
1680
  }
1672
1681
  });
1673
- let m, b = 0;
1674
- const T = z(
1675
- () => dt(i.value)
1676
- ), R = z(() => {
1682
+ let m, y = 0;
1683
+ const A = F(
1684
+ () => ct(i.value)
1685
+ ), T = F(() => {
1677
1686
  try {
1678
- return xe(i.value) !== s.value;
1687
+ return ke(i.value) !== s.value;
1679
1688
  } catch {
1680
1689
  return !0;
1681
1690
  }
1682
- }), I = N(o.value), v = z(() => o.value !== I.value), u = N({}), S = N(0), C = N(0), L = z(() => Object.values(u.value).some(Boolean));
1683
- function y(V, j) {
1684
- u.value = { ...u.value, [V]: j }, S.value++;
1691
+ }), I = z(o.value), v = F(() => o.value !== I.value), d = z({}), C = z(0), S = z(0), R = F(() => Object.values(d.value).some(Boolean)), w = F(() => Object.keys(d.value).filter((j) => d.value[j]));
1692
+ function _(j, W) {
1693
+ d.value = { ...d.value, [j]: W }, C.value++;
1685
1694
  }
1686
- const _ = z(
1687
- () => R.value || o.value !== I.value || L.value
1688
- ), $ = () => JSON.stringify({
1695
+ const E = F(
1696
+ () => T.value || o.value !== I.value || R.value
1697
+ ), D = () => JSON.stringify({
1689
1698
  document: i.value,
1690
1699
  json: o.value,
1691
1700
  appliedJson: I.value
1692
- }), D = ia($()), H = sa(() => t.beforeDiscard), G = z(() => g.value || H.pending.value), B = () => !t.readonly && !G.value && !v.value, q = oa(
1701
+ }), H = da(D()), G = ua(() => t.beforeDiscard), U = F(() => h.value || G.pending.value), X = () => !t.readonly && !U.value && !v.value, te = sa(
1693
1702
  i,
1694
- () => T.value.ok,
1695
- B,
1703
+ () => A.value.ok,
1704
+ X,
1696
1705
  se
1697
- ), { selected: ae, lists: n, activeList: w, headerAlignments: k, setColumn: A } = q;
1698
- ee(ae, () => q.clearSelection());
1699
- const E = z(
1700
- () => T.value.ok ? It({
1706
+ ), { selected: n, lists: x, activeList: k, headerAlignments: L, setColumn: $ } = te;
1707
+ ee(n, () => te.clearSelection());
1708
+ const P = F(
1709
+ () => A.value.ok ? Rt({
1701
1710
  draft: {
1702
1711
  template: i.value.template,
1703
1712
  datasets: t.datasets ?? {},
@@ -1705,261 +1714,270 @@ function ra(t, d) {
1705
1714
  }
1706
1715
  }) : void 0
1707
1716
  );
1708
- function P() {
1709
- b++, m?.abort(), m = void 0, g.value = !1;
1717
+ function B() {
1718
+ y++, m?.abort(), m = void 0, h.value = !1;
1710
1719
  }
1711
- let W = 0;
1712
- async function Z(V = "replace", j) {
1713
- if (!_.value) return !0;
1714
- const Y = $(), ve = S.value;
1720
+ let Z = 0;
1721
+ async function he(j = "replace", W) {
1722
+ if (!E.value) return !0;
1723
+ const Y = D(), pe = C.value;
1715
1724
  try {
1716
- return await H.request({
1717
- reason: V,
1725
+ return await G.request({
1726
+ reason: j,
1718
1727
  document: JSON.parse(
1719
1728
  JSON.stringify(i.value)
1720
1729
  ),
1721
- replacement: j ? ne(j) : void 0,
1730
+ replacement: W ? ae(W) : void 0,
1722
1731
  pendingLocalChanges: !0
1723
- }) && Y === $() && ve === S.value;
1724
- } catch (Ee) {
1725
- return p.value = Ee instanceof Error ? Ee.message : String(Ee), !1;
1732
+ }) && Y === D() && pe === C.value;
1733
+ } catch (J) {
1734
+ return p.value = J instanceof Error ? J.message : String(J), !1;
1726
1735
  }
1727
1736
  }
1728
- function Se(V) {
1729
- P(), i.value = V, s.value = xe(V), o.value = s.value, I.value = o.value, p.value = "", ae.value = 0, q.clearSelection(), u.value = {}, S.value++, C.value++, D.reset($());
1737
+ function fe(j) {
1738
+ B(), i.value = j, s.value = ke(j), o.value = s.value, I.value = o.value, p.value = "", n.value = 0, te.clearSelection(), d.value = {}, C.value++, S.value++, H.reset(D());
1730
1739
  }
1731
1740
  ee(
1732
1741
  () => t.modelValue,
1733
- async (V) => {
1734
- let j;
1742
+ async (j) => {
1743
+ let W;
1735
1744
  try {
1736
- j = ne(V);
1737
- } catch (ve) {
1738
- p.value = ve instanceof Error ? ve.message : String(ve);
1745
+ W = ae(j);
1746
+ } catch (pe) {
1747
+ p.value = pe instanceof Error ? pe.message : String(pe);
1739
1748
  return;
1740
1749
  }
1741
1750
  try {
1742
- if (xe(j) === xe(i.value))
1751
+ if (ke(W) === ke(i.value))
1743
1752
  return;
1744
1753
  } catch {
1745
1754
  }
1746
- const Y = ++W;
1747
- if (P(), !await Z("replace", j)) {
1748
- Y === W && T.value.ok && d("update:modelValue", ne(i.value));
1755
+ const Y = ++Z;
1756
+ if (B(), !await he("replace", W)) {
1757
+ Y === Z && A.value.ok && c("update:modelValue", ae(i.value));
1749
1758
  return;
1750
1759
  }
1751
- Y === W && Se(j);
1760
+ Y === Z && fe(W);
1752
1761
  }
1753
- ), Ae(() => {
1754
- W++, P();
1762
+ ), Le(() => {
1763
+ Z++, B();
1755
1764
  });
1756
1765
  function se() {
1757
- H.cancel(), p.value = "", T.value.ok && (o.value = xe(i.value), I.value = o.value, d("update:modelValue", ne(i.value))), D.record($());
1766
+ G.cancel(), p.value = "", A.value.ok && (o.value = ke(i.value), I.value = o.value, c("update:modelValue", ae(i.value))), H.record(D());
1758
1767
  }
1759
- function ge(V) {
1760
- if (!B()) return !1;
1768
+ function me(j) {
1769
+ if (!X()) return !1;
1761
1770
  try {
1762
- const j = ne(i.value);
1763
- V(j);
1764
- const Y = dt(j);
1771
+ const W = ae(i.value);
1772
+ j(W);
1773
+ const Y = ct(W);
1765
1774
  if (!Y.ok)
1766
1775
  throw new Error(
1767
- Y.errors.map((ve) => `${ve.path}: ${ve.message}`).join(`
1776
+ Y.errors.map((pe) => `${pe.path}: ${pe.message}`).join(`
1768
1777
  `)
1769
1778
  );
1770
- return i.value = j, se(), !0;
1771
- } catch (j) {
1772
- return p.value = j instanceof Error ? j.message : String(j), !1;
1779
+ return i.value = W, se(), !0;
1780
+ } catch (W) {
1781
+ return p.value = W instanceof Error ? W.message : String(W), !1;
1773
1782
  }
1774
1783
  }
1775
- async function ce(V) {
1776
- if (!B()) return !1;
1784
+ async function oe(j) {
1785
+ if (!X()) return !1;
1777
1786
  try {
1778
- const j = ne(V);
1779
- return !await Z("replace", j) || !B() ? !1 : (i.value = j, ae.value = 0, q.clearSelection(), se(), !0);
1780
- } catch (j) {
1781
- return p.value = j instanceof Error ? j.message : String(j), !1;
1787
+ const W = ae(j);
1788
+ return !await he("replace", W) || !X() ? !1 : (i.value = W, n.value = 0, te.clearSelection(), se(), !0);
1789
+ } catch (W) {
1790
+ return p.value = W instanceof Error ? W.message : String(W), !1;
1782
1791
  }
1783
1792
  }
1784
- function oe(V) {
1785
- B() && (i.value.name = V, se());
1793
+ function we(j) {
1794
+ X() && (i.value.name = j, se());
1786
1795
  }
1787
- function ye(V) {
1788
- B() && (i.value.description = V, se());
1796
+ function ve(j) {
1797
+ X() && (i.value.description = j, se());
1789
1798
  }
1790
- function he() {
1791
- if (!(t.readonly || G.value))
1799
+ function _e() {
1800
+ if (!(t.readonly || U.value))
1792
1801
  try {
1793
- const V = ne(o.value);
1794
- if (V.id !== i.value.id)
1802
+ const j = ae(o.value);
1803
+ if (j.id !== i.value.id)
1795
1804
  throw new Error("属性编辑不允许更换模板 ID,请另存为新模板");
1796
- if (V.revision !== i.value.revision)
1805
+ if (j.revision !== i.value.revision)
1797
1806
  throw new Error("修订号由保存服务管理,不能在 JSON 中修改");
1798
- i.value = V, ae.value = 0, q.clearSelection(), se();
1799
- } catch (V) {
1800
- p.value = V instanceof Error ? V.message : String(V);
1807
+ i.value = j, n.value = 0, te.clearSelection(), se();
1808
+ } catch (j) {
1809
+ p.value = j instanceof Error ? j.message : String(j);
1801
1810
  }
1802
1811
  }
1803
- async function _e() {
1804
- G.value || t.readonly || !await Z("reset") || (Se(ne(s.value)), d("update:modelValue", ne(i.value)));
1805
- }
1806
- function te(V) {
1807
- if (G.value || t.readonly) return;
1808
- D.record($());
1809
- const j = D.move(V);
1810
- if (!j) return;
1811
- H.cancel();
1812
- const Y = JSON.parse(j);
1813
- i.value = Y.document, o.value = Y.json, I.value = Y.appliedJson, p.value = "", ae.value = 0, q.clearSelection(), T.value.ok && d("update:modelValue", ne(i.value));
1814
- }
1815
- async function $e() {
1816
- if (!t.save || !B() || !T.value.ok) return;
1817
- if (L.value) {
1818
- p.value = x.value.toolsPending;
1812
+ async function ne() {
1813
+ U.value || t.readonly || !await he("reset") || (fe(ae(s.value)), c("update:modelValue", ae(i.value)));
1814
+ }
1815
+ function Ie(j) {
1816
+ if (U.value || t.readonly) return;
1817
+ H.record(D());
1818
+ const W = H.move(j);
1819
+ if (!W) return;
1820
+ G.cancel();
1821
+ const Y = JSON.parse(W);
1822
+ i.value = Y.document, o.value = Y.json, I.value = Y.appliedJson, p.value = "", n.value = 0, te.clearSelection(), A.value.ok && c("update:modelValue", ae(i.value));
1823
+ }
1824
+ async function qe() {
1825
+ if (!t.save || !X() || !A.value.ok) return;
1826
+ if (R.value) {
1827
+ p.value = M.value.toolsPending;
1819
1828
  return;
1820
1829
  }
1821
- const V = ++b;
1822
- m = new AbortController(), g.value = !0, p.value = "";
1823
- const j = ne(i.value);
1830
+ const j = ++y;
1831
+ m = new AbortController(), h.value = !0, p.value = "";
1832
+ const W = ae(i.value);
1824
1833
  try {
1825
- const Y = ne(
1826
- await t.save(j, {
1827
- expectedRevision: j.revision,
1834
+ const Y = ae(
1835
+ await t.save(W, {
1836
+ expectedRevision: W.revision,
1828
1837
  signal: m.signal
1829
1838
  })
1830
1839
  );
1831
- if (V !== b) return;
1832
- if (Y.id !== j.id)
1840
+ if (j !== y) return;
1841
+ if (Y.id !== W.id)
1833
1842
  throw new Error("保存服务返回了其他模板的文档");
1834
- i.value = Y, s.value = xe(Y), o.value = s.value, I.value = o.value, D.reset($()), d("saved", ne(Y)), d("update:modelValue", ne(Y));
1843
+ i.value = Y, s.value = ke(Y), o.value = s.value, I.value = o.value, H.reset(D()), c("saved", ae(Y)), c("update:modelValue", ae(Y));
1835
1844
  } catch (Y) {
1836
- V === b && (p.value = Y instanceof Error ? Y.message : String(Y));
1845
+ j === y && (p.value = Y instanceof Error ? Y.message : String(Y));
1837
1846
  } finally {
1838
- V === b && (g.value = !1, m = void 0);
1847
+ j === y && (h.value = !1, m = void 0);
1839
1848
  }
1840
1849
  }
1841
- const Je = z(
1842
- () => D.canUndo.value || $() !== D.current.value
1843
- ), Fe = z(
1844
- () => D.canRedo.value && $() === D.current.value
1850
+ const Ne = F(
1851
+ () => H.canUndo.value || D() !== H.current.value
1852
+ ), Xe = F(
1853
+ () => H.canRedo.value && D() === H.current.value
1845
1854
  );
1846
1855
  return {
1847
- ...q,
1848
- editingReadonly: z(() => t.readonly === !0),
1849
- transaction: ge,
1850
- replaceDocument: ce,
1851
- originalDocument: z(() => ne(s.value)),
1852
- canUndo: Je,
1853
- canRedo: Fe,
1854
- undo: () => te(-1),
1855
- redo: () => te(1),
1856
- pendingLocalChanges: _,
1857
- setToolPending: y,
1858
- isToolPending: (V) => u.value[V] === !0,
1859
- toolEpoch: C,
1860
- toolPending: L,
1856
+ ...te,
1857
+ editingReadonly: F(() => t.readonly === !0),
1858
+ transaction: me,
1859
+ replaceDocument: oe,
1860
+ originalDocument: F(() => ae(s.value)),
1861
+ canUndo: Ne,
1862
+ canRedo: Xe,
1863
+ undo: () => Ie(-1),
1864
+ redo: () => Ie(1),
1865
+ pendingLocalChanges: E,
1866
+ setToolPending: _,
1867
+ isToolPending: (j) => d.value[j] === !0,
1868
+ toolEpoch: S,
1869
+ toolPending: R,
1870
+ pendingTools: w,
1861
1871
  jsonPending: v,
1862
- blocked: G,
1863
- confirmation: H.confirmation,
1864
- decideDiscard: H.decide,
1865
- guardChanges: Z,
1872
+ blocked: U,
1873
+ confirmation: G.confirmation,
1874
+ decideDiscard: G.decide,
1875
+ guardChanges: he,
1866
1876
  draft: i,
1867
1877
  json: o,
1868
- selected: ae,
1878
+ selected: n,
1869
1879
  error: p,
1870
- saving: g,
1871
- dirty: R,
1872
- validation: T,
1873
- lists: n,
1874
- activeList: w,
1875
- headerAlignments: k,
1880
+ saving: h,
1881
+ dirty: T,
1882
+ validation: A,
1883
+ lists: x,
1884
+ activeList: k,
1885
+ headerAlignments: L,
1876
1886
  previewOptions: f,
1877
- fetcher: E,
1878
- messages: x,
1879
- setName: oe,
1880
- setDescription: ye,
1881
- setColumn: A,
1882
- applyJson: he,
1883
- reset: _e,
1884
- save: $e
1887
+ fetcher: P,
1888
+ messages: M,
1889
+ setName: we,
1890
+ setDescription: ve,
1891
+ setColumn: $,
1892
+ applyJson: _e,
1893
+ reset: ne,
1894
+ save: qe
1885
1895
  };
1886
1896
  }
1887
- function da(t, d) {
1888
- const i = N("fields"), s = () => d.value?.columns.length ? 0 : -1, o = N(s()), p = z(() => {
1889
- const f = d.value?.columns[o.value];
1897
+ function ma(t, c) {
1898
+ const i = z("fields"), s = () => c.value?.columns.length ? 0 : -1, o = z(s()), p = F(() => {
1899
+ const f = c.value?.columns[o.value];
1890
1900
  return f ? { column: f, index: o.value } : void 0;
1891
1901
  });
1892
1902
  ee(t, () => {
1893
1903
  o.value = s();
1894
- }), ee(d, (f) => {
1904
+ }), ee(c, (f) => {
1895
1905
  f?.columns[o.value] || (o.value = s());
1896
1906
  });
1897
- function g(f) {
1898
- d.value?.columns[f] && (o.value = f);
1907
+ function h(f) {
1908
+ c.value?.columns[f] && (o.value = f);
1899
1909
  }
1900
- function x(f) {
1901
- const m = d.value?.columns.length ?? 0;
1910
+ function M(f) {
1911
+ const m = c.value?.columns.length ?? 0;
1902
1912
  m && (o.value = Math.max(
1903
1913
  0,
1904
1914
  Math.min(m - 1, o.value + f)
1905
1915
  ));
1906
1916
  }
1907
- return { section: i, activeIndex: o, activeColumn: p, activate: g, stepColumn: x };
1917
+ return { section: i, activeIndex: o, activeColumn: p, activate: h, stepColumn: M };
1908
1918
  }
1909
- const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma = { class: "mr-designer-heading" }, va = ["aria-label"], pa = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], ga = ["aria-label"], ha = ["aria-pressed"], fa = ["aria-pressed"], ba = { class: "mr-designer-actions" }, ya = { class: "mr-designer-history" }, wa = ["aria-label", "title", "disabled"], Ma = ["aria-label", "title", "disabled"], xa = ["disabled"], ka = ["disabled"], Ca = ["aria-label"], Sa = ["aria-label"], _a = ["aria-pressed", "onClick"], Ia = { class: "mr-designer-tool-content" }, $a = {
1919
+ const va = ["aria-label", "aria-busy"], pa = { class: "mr-designer-bar" }, ga = { class: "mr-designer-heading" }, ha = ["aria-label"], fa = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], ba = {
1920
+ key: 0,
1921
+ class: "mr-designer-pending-dot",
1922
+ "aria-hidden": "true"
1923
+ }, ya = ["aria-label"], wa = ["aria-pressed"], xa = ["aria-pressed"], Ma = { class: "mr-designer-actions" }, ka = { class: "mr-designer-history" }, Ca = ["aria-label", "title", "disabled"], Sa = ["aria-label", "title", "disabled"], _a = ["disabled"], Ia = ["title", "aria-describedby", "disabled"], $a = ["id"], Ea = ["id"], Ra = ["aria-label", "onClick"], Ta = ["aria-label"], La = ["aria-label"], Da = ["id", "aria-pressed", "aria-describedby", "onClick"], Aa = {
1924
+ key: 0,
1925
+ class: "mr-designer-pending-dot",
1926
+ "aria-hidden": "true"
1927
+ }, Pa = { class: "mr-designer-tool-content" }, Ha = {
1910
1928
  key: 3,
1911
1929
  class: "mr-designer-rule-workspace"
1912
- }, Ea = { key: 0 }, La = ["value"], Ra = ["value"], Aa = {
1930
+ }, Ga = { key: 0 }, Fa = ["value"], Na = ["value"], za = {
1913
1931
  key: 2,
1914
1932
  class: "mr-designer-note"
1915
- }, Da = {
1933
+ }, Oa = {
1916
1934
  key: 1,
1917
1935
  class: "mr-designer-inspector"
1918
- }, Ta = ["id", "aria-labelledby"], Pa = {
1936
+ }, Ba = ["id", "aria-labelledby"], Va = {
1919
1937
  key: 0,
1920
1938
  class: "mr-designer-flow-note"
1921
- }, Ha = {
1939
+ }, ja = {
1922
1940
  key: 0,
1923
1941
  class: "mr-designer-area"
1924
- }, Ga = ["value"], za = ["value"], Fa = { class: "mr-designer-current" }, Na = ["aria-expanded", "aria-controls"], Ba = { class: "mr-designer-current-name" }, Oa = { class: "mr-designer-directory-entry" }, Va = { class: "mr-designer-field-position" }, ja = ["aria-label"], Wa = ["aria-label", "title", "disabled"], Ua = ["aria-label", "title", "disabled"], Ka = ["disabled", "aria-label"], Ja = { class: "mr-designer-property-group" }, qa = ["value"], Xa = ["value", "list"], Ya = ["id"], Qa = ["value"], Za = { class: "mr-designer-property-group" }, eo = { class: "mr-designer-format-pair" }, to = { class: "mr-designer-stacked" }, no = ["value", "disabled"], ao = { class: "mr-designer-stacked" }, oo = ["value"], lo = { value: "identifier" }, io = { value: "dimension" }, so = { value: "measure" }, ro = { value: "date" }, uo = { value: "text" }, co = { class: "mr-designer-control-row" }, mo = { class: "mr-designer-control-row" }, vo = { class: "mr-designer-toggle" }, po = ["checked"], go = { class: "mr-designer-column-structure" }, ho = ["aria-label", "title", "disabled"], fo = ["aria-label", "title", "disabled"], bo = ["checked", "disabled"], yo = ["id", "aria-label"], wo = { class: "mr-designer-directory-heading" }, Mo = ["aria-label"], xo = { class: "mr-designer-search" }, ko = ["aria-label", "placeholder"], Co = ["aria-label", "title"], So = { class: "mr-designer-column-tools" }, _o = ["disabled"], Io = {
1942
+ }, Ua = ["value"], Wa = ["value"], Ka = { class: "mr-designer-current" }, Ja = ["aria-expanded", "aria-controls"], qa = { class: "mr-designer-current-name" }, Xa = { class: "mr-designer-directory-entry" }, Ya = { class: "mr-designer-field-position" }, Qa = ["aria-label"], Za = ["aria-label", "title", "disabled"], eo = ["aria-label", "title", "disabled"], to = ["disabled", "aria-label"], no = { class: "mr-designer-property-group" }, ao = ["value"], oo = ["value", "list"], lo = ["id"], io = ["value"], so = { class: "mr-designer-property-group" }, ro = { class: "mr-designer-format-pair" }, uo = { class: "mr-designer-stacked" }, co = ["value", "disabled"], mo = { class: "mr-designer-stacked" }, vo = ["value"], po = { value: "identifier" }, go = { value: "dimension" }, ho = { value: "measure" }, fo = { value: "date" }, bo = { value: "text" }, yo = { class: "mr-designer-control-row" }, wo = { class: "mr-designer-control-row" }, xo = { class: "mr-designer-toggle" }, Mo = ["checked"], ko = { class: "mr-designer-column-structure" }, Co = ["aria-label", "title", "disabled"], So = ["aria-label", "title", "disabled"], _o = ["checked", "disabled"], Io = ["id", "aria-label"], $o = { class: "mr-designer-directory-heading" }, Eo = ["aria-label"], Ro = { class: "mr-designer-search" }, To = ["aria-label", "placeholder"], Lo = ["aria-label", "title"], Do = { class: "mr-designer-column-tools" }, Ao = ["disabled"], Po = {
1925
1943
  key: 1,
1926
1944
  role: "status"
1927
- }, $o = { key: 2 }, Eo = ["aria-label"], Lo = ["aria-label", "checked", "disabled", "onChange"], Ro = ["data-column-index", "aria-pressed", "tabindex", "onClick"], Ao = { class: "mr-designer-column-number" }, Do = { class: "mr-designer-column-name" }, To = {
1945
+ }, Ho = { key: 2 }, Go = ["aria-label"], Fo = ["aria-label", "checked", "disabled", "onChange"], No = ["data-column-index", "aria-pressed", "tabindex", "onClick"], zo = { class: "mr-designer-column-number" }, Oo = { class: "mr-designer-column-name" }, Bo = {
1928
1946
  key: 0,
1929
1947
  role: "status",
1930
1948
  class: "mr-designer-empty"
1931
- }, Po = {
1949
+ }, Vo = {
1932
1950
  key: 0,
1933
1951
  class: "mr-designer-batch"
1934
- }, Ho = ["aria-label", "disabled"], Go = { value: "" }, zo = { value: "auto" }, Fo = { value: "left" }, No = { value: "center" }, Bo = { value: "right" }, Oo = { value: "justify" }, Vo = ["aria-label", "disabled"], jo = { value: "" }, Wo = { value: "left" }, Uo = { value: "center" }, Ko = { value: "right" }, Jo = { value: "justify" }, qo = {
1952
+ }, jo = ["aria-label", "disabled"], Uo = { value: "" }, Wo = { value: "auto" }, Ko = { value: "left" }, Jo = { value: "center" }, qo = { value: "right" }, Xo = { value: "justify" }, Yo = ["aria-label", "disabled"], Qo = { value: "" }, Zo = { value: "left" }, el = { value: "center" }, tl = { value: "right" }, nl = { value: "justify" }, al = {
1935
1953
  key: 2,
1936
1954
  role: "status",
1937
1955
  class: "mr-designer-empty"
1938
- }, Xo = { class: "mr-designer-object-tools" }, Yo = ["aria-label", "disabled"], Qo = { value: "" }, Zo = { value: "text" }, el = { value: "list" }, tl = { value: "image" }, nl = { value: "rect" }, al = ["title", "aria-label", "disabled"], ol = ["title", "aria-label", "disabled"], ll = { key: 0 }, il = ["value"], sl = { class: "mr-designer-stacked" }, rl = ["value"], dl = {
1956
+ }, ol = { class: "mr-designer-object-tools" }, ll = ["aria-label", "disabled"], il = { value: "" }, sl = { value: "text" }, rl = { value: "list" }, dl = { value: "image" }, ul = { value: "rect" }, cl = ["title", "aria-label", "disabled"], ml = ["title", "aria-label", "disabled"], vl = { key: 0 }, pl = ["value"], gl = { class: "mr-designer-stacked" }, hl = ["value"], fl = {
1939
1957
  value: -1,
1940
1958
  disabled: ""
1941
- }, ul = ["value"], cl = {
1959
+ }, bl = ["value"], yl = {
1942
1960
  key: 1,
1943
1961
  class: "mr-designer-arrange"
1944
- }, ml = ["disabled"], vl = ["aria-label", "disabled"], pl = { value: "" }, gl = { value: "left" }, hl = { value: "center" }, fl = { value: "right" }, bl = { value: "top" }, yl = { value: "middle" }, wl = { value: "bottom" }, Ml = ["disabled"], xl = ["disabled"], kl = { key: 0 }, Cl = { class: "mr-designer-layer-tools" }, Sl = ["disabled"], _l = ["disabled"], Il = {
1962
+ }, wl = ["disabled"], xl = ["aria-label", "disabled"], Ml = { value: "" }, kl = { value: "left" }, Cl = { value: "center" }, Sl = { value: "right" }, _l = { value: "top" }, Il = { value: "middle" }, $l = { value: "bottom" }, El = ["disabled"], Rl = ["disabled"], Tl = { key: 0 }, Ll = { class: "mr-designer-layer-tools" }, Dl = ["disabled"], Al = ["disabled"], Pl = {
1945
1963
  key: 3,
1946
1964
  class: "mr-designer-empty"
1947
- }, $l = { class: "mr-designer-stacked" }, El = ["value", "disabled"], Ll = { class: "mr-designer-stacked" }, Rl = ["value", "disabled"], Al = { class: "mr-designer-technical" }, Dl = { class: "mr-designer-identity" }, Tl = { class: "mr-designer-stacked mr-designer-json-label" }, Pl = ["aria-label", "disabled"], Hl = ["disabled"], Gl = {
1965
+ }, Hl = { class: "mr-designer-stacked" }, Gl = ["value", "disabled"], Fl = { class: "mr-designer-stacked" }, Nl = ["value", "disabled"], zl = { class: "mr-designer-technical" }, Ol = { class: "mr-designer-identity" }, Bl = { class: "mr-designer-stacked mr-designer-json-label" }, Vl = ["aria-label", "disabled"], jl = ["disabled"], Ul = {
1948
1966
  key: 5,
1949
1967
  role: "status",
1950
1968
  class: "mr-designer-note mr-designer-pending"
1951
- }, zl = ["aria-label"], Fl = {
1969
+ }, Wl = ["aria-label"], Kl = {
1952
1970
  key: 0,
1953
1971
  role: "alert",
1954
1972
  class: "mr-designer-error"
1955
- }, Nl = {
1973
+ }, Jl = {
1956
1974
  key: 1,
1957
1975
  role: "alert",
1958
1976
  class: "mr-designer-error"
1959
- }, Bl = {
1977
+ }, ql = {
1960
1978
  key: 4,
1961
1979
  class: "mr-designer-note mr-designer-invalid"
1962
- }, Ol = /* @__PURE__ */ Ge({
1980
+ }, Xl = /* @__PURE__ */ Ge({
1963
1981
  __name: "ReportTemplateEditor",
1964
1982
  props: {
1965
1983
  modelValue: {},
@@ -1974,186 +1992,198 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
1974
1992
  save: { type: Function }
1975
1993
  },
1976
1994
  emits: ["update:modelValue", "saved", "excel-bound"],
1977
- setup(t, { expose: d, emit: i }) {
1978
- const s = pe(
1979
- () => import("./ExcelBindingWizard-Dxm-K5HL.js")
1980
- ), o = pe(() => import("./ParamEditor-DRGxzxeO.js")), p = pe(() => import("./RuleEditor-D9wQHrkf.js")), g = pe(
1995
+ setup(t, { expose: c, emit: i }) {
1996
+ const s = ge(
1997
+ () => import("./ExcelBindingWizard-LWX6G1A2.js")
1998
+ ), o = ge(() => import("./ParamEditor-BLaE5q5W.js")), p = ge(() => import("./RuleEditor-D9wQHrkf.js")), h = ge(
1981
1999
  () => import("./TemplateReviewPanel-BKofGrV9.js")
1982
- ), x = t, f = i, m = ra(x, (J, c) => {
1983
- f(J === "saved" ? "saved" : "update:modelValue", c);
2000
+ ), M = t, f = i, m = ca(M, (V, u) => {
2001
+ f(V === "saved" ? "saved" : "update:modelValue", u);
1984
2002
  }), {
1985
- draft: b,
1986
- json: T,
1987
- selected: R,
2003
+ draft: y,
2004
+ json: A,
2005
+ selected: T,
1988
2006
  error: I,
1989
2007
  saving: v,
1990
- pendingLocalChanges: u,
1991
- jsonPending: S,
1992
- blocked: C,
1993
- confirmation: L,
1994
- canUndo: y,
2008
+ pendingLocalChanges: d,
2009
+ jsonPending: C,
2010
+ blocked: S,
2011
+ confirmation: R,
2012
+ canUndo: w,
1995
2013
  canRedo: _,
1996
- validation: $,
2014
+ validation: E,
1997
2015
  lists: D,
1998
2016
  activeList: H,
1999
2017
  visibleColumns: G,
2000
- query: B,
2001
- selectedColumns: q,
2002
- fetcher: ae,
2018
+ query: U,
2019
+ selectedColumns: X,
2020
+ fetcher: te,
2003
2021
  messages: n
2004
2022
  } = m;
2005
- function w(J) {
2006
- return m.transaction((c) => {
2007
- c.template.params = J;
2023
+ function x(V) {
2024
+ return m.transaction((u) => {
2025
+ u.template.params = V;
2008
2026
  });
2009
2027
  }
2010
- const k = da(R, H), { section: A, activeIndex: E, activeColumn: P } = k, W = `mr-designer-${St()?.uid ?? 0}`, Z = [
2028
+ const k = ma(T, H), { section: L, activeIndex: $, activeColumn: P } = k, B = `mr-designer-${$t()?.uid ?? 0}`, Z = [
2011
2029
  "fields",
2012
2030
  "component",
2013
2031
  "template",
2014
2032
  "tools",
2015
2033
  "advanced"
2016
- ], Se = ta(
2034
+ ], he = oa(
2017
2035
  m,
2018
2036
  k,
2019
- () => x.dataSchemas
2037
+ () => M.dataSchemas
2020
2038
  ), {
2021
- mode: se,
2022
- setMode: ge,
2023
- canvasSelection: ce,
2039
+ mode: fe,
2040
+ setMode: se,
2041
+ canvasSelection: me,
2024
2042
  canvasPage: oe,
2025
- canvasActive: ye,
2026
- tool: he,
2043
+ canvasActive: we,
2044
+ tool: ve,
2027
2045
  visitedTools: _e,
2028
- editDisabled: te,
2029
- dataSchema: $e,
2030
- chooseCanvas: Je,
2031
- insertComponent: Fe,
2032
- patchCanvas: V,
2046
+ editDisabled: ne,
2047
+ dataSchema: Ie,
2048
+ chooseCanvas: qe,
2049
+ insertComponent: Ne,
2050
+ patchCanvas: Xe,
2033
2051
  changeList: j,
2034
- moveColumn: Y,
2035
- headerCommand: ve,
2036
- locateReview: Ee,
2037
- canvas: X
2038
- } = Se, de = z(() => !!b.value.template.pages[oe.value]?.flow), De = z(() => !!b.value.template.pages[D.value[R.value]?.pageIndex ?? -1]?.flow);
2039
- function gt() {
2040
- A.value = "tools", he.value = "excel";
2052
+ moveColumn: W,
2053
+ headerCommand: Y,
2054
+ locateReview: pe,
2055
+ canvas: J
2056
+ } = he, de = F(() => !!y.value.template.pages[oe.value]?.flow), De = F(() => !!y.value.template.pages[D.value[T.value]?.pageIndex ?? -1]?.flow);
2057
+ function ft() {
2058
+ L.value = "tools", ve.value = "excel";
2059
+ }
2060
+ const Ee = F(() => {
2061
+ const V = ["excel", "rules", "params"].filter((u) => m.pendingTools.value.includes(u)).map((u) => ({ target: u, label: n.value[`${u}Tool`] }));
2062
+ return C.value && V.push({ target: "json", label: n.value.json }), V;
2063
+ }), ze = F(() => v.value ? n.value.saving : M.readonly ? n.value.saveReadonly : S.value ? n.value.saveConfirmation : Ee.value.length ? Ee.value.map((V) => `${V.label} · ${n.value.unapplied}`).join(";") : E.value.ok ? d.value ? "" : n.value.saveUnchanged : n.value.saveInvalid);
2064
+ async function bt(V) {
2065
+ V === "json" ? L.value = "advanced" : (L.value = "tools", ve.value = V), await ce();
2066
+ const u = V === "json" ? `#${B}-panel-advanced textarea` : `#${B}-tool-${V}`;
2067
+ document.querySelector(u)?.focus({ preventScroll: !0 });
2041
2068
  }
2042
- const ht = z(
2043
- () => v.value ? n.value.saving : x.readonly ? n.value.readonly : u.value ? n.value.dirty : n.value.ready
2044
- ), nt = N(null), qe = N(null), ie = aa(k, A, G), {
2045
- open: at,
2046
- cursor: ft,
2047
- trigger: bt,
2048
- panel: yt,
2049
- search: wt,
2050
- list: Mt
2069
+ const yt = F(
2070
+ () => v.value ? n.value.saving : M.readonly ? n.value.readonly : d.value ? n.value.dirty : n.value.ready
2071
+ ), ot = z(null), Ye = z(null), ie = ia(k, L, G), {
2072
+ open: lt,
2073
+ cursor: wt,
2074
+ trigger: xt,
2075
+ panel: Mt,
2076
+ search: kt,
2077
+ list: Ct
2051
2078
  } = ie;
2052
- ee(A, async () => {
2053
- await me(), qe.value && (qe.value.scrollTop = 0);
2079
+ ee(L, async () => {
2080
+ await ce(), Ye.value && (Ye.value.scrollTop = 0);
2054
2081
  });
2055
- const ot = z(() => ({
2082
+ const it = F(() => ({
2056
2083
  auto: n.value.auto,
2057
2084
  left: n.value.left,
2058
2085
  center: n.value.center,
2059
2086
  right: n.value.right,
2060
2087
  justify: n.value.justify
2061
2088
  }));
2062
- let Ne = null;
2063
- ee(L, async (J) => {
2064
- J ? (Ne = document.activeElement, await me(), nt.value?.focus()) : (await me(), Ne?.isConnected && Ne.focus(), Ne = null);
2065
- }), d({
2089
+ let Oe = null;
2090
+ ee(R, async (V) => {
2091
+ V ? (Oe = document.activeElement, await ce(), ot.value?.focus()) : (await ce(), Oe?.isConnected && Oe.focus(), Oe = null);
2092
+ }), c({
2066
2093
  get pendingLocalChanges() {
2067
- return u.value;
2094
+ return d.value;
2068
2095
  },
2069
2096
  get saving() {
2070
2097
  return v.value;
2071
2098
  },
2072
2099
  get blocked() {
2073
- return C.value;
2100
+ return S.value;
2074
2101
  },
2075
2102
  guardChanges: m.guardChanges,
2076
2103
  reset: m.reset,
2077
2104
  save: m.save
2078
2105
  });
2079
- async function xt(J) {
2080
- const c = { ...J.document, id: b.value.id };
2081
- if (b.value.revision === void 0 ? delete c.revision : c.revision = b.value.revision, !await m.replaceDocument(c)) return !1;
2082
- const r = ne(m.draft.value);
2083
- return f("excel-bound", { ...J, document: r, session: { ...J.session, identity: { id: r.id, name: r.name } } }), !0;
2106
+ async function St(V) {
2107
+ const u = { ...V.document, id: y.value.id };
2108
+ if (y.value.revision === void 0 ? delete u.revision : u.revision = y.value.revision, !await m.replaceDocument(u)) return !1;
2109
+ const r = ae(m.draft.value);
2110
+ return f("excel-bound", { ...V, document: r, session: { ...V.session, identity: { id: r.id, name: r.name } } }), !0;
2084
2111
  }
2085
- async function lt(J) {
2086
- const c = D.value.findIndex((r) => r.pageIndex === J.pageIndex && r.componentIndex === J.componentIndex);
2087
- c >= 0 && c !== R.value && m.isToolPending("rules") && !await m.guardChanges() || Je(J);
2112
+ async function st(V) {
2113
+ const u = D.value.findIndex((r) => r.pageIndex === V.pageIndex && r.componentIndex === V.componentIndex);
2114
+ u >= 0 && u !== T.value && m.isToolPending("rules") && !await m.guardChanges() || qe(V);
2088
2115
  }
2089
- async function it(J) {
2090
- const c = J.target, r = Number(c.value);
2116
+ async function rt(V) {
2117
+ const u = V.target, r = Number(u.value);
2091
2118
  if (m.isToolPending("rules") && !await m.guardChanges()) {
2092
- c.value = String(R.value);
2119
+ u.value = String(T.value);
2093
2120
  return;
2094
2121
  }
2095
- R.value = r;
2122
+ T.value = r;
2096
2123
  }
2097
- function we(J) {
2098
- return J.target.value;
2124
+ function xe(V) {
2125
+ return V.target.value;
2099
2126
  }
2100
- function Xe(J) {
2101
- return J.target.checked;
2127
+ function Qe(V) {
2128
+ return V.target.checked;
2102
2129
  }
2103
- function st(J, c) {
2104
- const r = J.target;
2130
+ function dt(V, u) {
2131
+ const r = V.target;
2105
2132
  m.alignColumns(
2106
- c,
2133
+ u,
2107
2134
  r.value
2108
2135
  ), r.value = "";
2109
2136
  }
2110
- async function kt(J) {
2137
+ async function _t(V) {
2111
2138
  const r = {
2112
2139
  ArrowRight: 1,
2113
2140
  ArrowLeft: -1,
2114
2141
  Home: -Z.length,
2115
2142
  End: Z.length
2116
- }[J.key];
2143
+ }[V.key];
2117
2144
  if (r === void 0) return;
2118
- J.preventDefault();
2119
- const U = Z.indexOf(A.value), Le = J.key === "Home" ? 0 : J.key === "End" ? Z.length - 1 : (U + r + Z.length) % Z.length;
2120
- A.value = Z[Le];
2121
- const Ct = J.currentTarget.parentElement;
2122
- await me(), Ct?.querySelector(`#${W}-tab-${A.value}`)?.focus();
2145
+ V.preventDefault();
2146
+ const K = Z.indexOf(L.value), Re = V.key === "Home" ? 0 : V.key === "End" ? Z.length - 1 : (K + r + Z.length) % Z.length;
2147
+ L.value = Z[Re];
2148
+ const It = V.currentTarget.parentElement;
2149
+ await ce(), It?.querySelector(`#${B}-tab-${L.value}`)?.focus();
2123
2150
  }
2124
- return (J, c) => (h(), M("section", {
2151
+ return (V, u) => (g(), b("section", {
2125
2152
  class: "mr-designer",
2126
2153
  "aria-label": e(n).title,
2127
2154
  "aria-busy": e(v)
2128
2155
  }, [
2129
- a("header", ca, [
2130
- a("div", ma, [
2156
+ a("header", pa, [
2157
+ a("div", ga, [
2131
2158
  le(re, {
2132
2159
  name: "columns",
2133
2160
  size: 15
2134
2161
  }),
2135
2162
  a("strong", null, l(e(n).heading), 1),
2136
2163
  a("span", {
2137
- class: Pe({ "mr-designer-dirty": e(u) })
2138
- }, l(ht.value), 3)
2164
+ class: Pe({ "mr-designer-dirty": e(d) })
2165
+ }, l(yt.value), 3)
2139
2166
  ]),
2140
2167
  a("nav", {
2141
2168
  class: "mr-designer-tabs",
2142
2169
  role: "tablist",
2143
2170
  "aria-label": e(n).sectionsLabel
2144
2171
  }, [
2145
- (h(), M(K, null, Q(Z, (r) => a("button", {
2146
- id: `${W}-tab-${r}`,
2172
+ (g(), b(q, null, Q(Z, (r) => a("button", {
2173
+ id: `${B}-tab-${r}`,
2147
2174
  key: r,
2148
2175
  type: "button",
2149
2176
  role: "tab",
2150
- "aria-selected": e(A) === r,
2151
- "aria-controls": `${W}-panel-${r}`,
2152
- tabindex: e(A) === r ? 0 : -1,
2153
- onClick: (U) => A.value = r,
2154
- onKeydown: kt
2155
- }, l(e(n)[`${r}Section`]), 41, pa)), 64))
2156
- ], 8, va),
2177
+ "aria-selected": e(L) === r,
2178
+ "aria-controls": `${B}-panel-${r}`,
2179
+ tabindex: e(L) === r ? 0 : -1,
2180
+ onClick: (K) => L.value = r,
2181
+ onKeydown: _t
2182
+ }, [
2183
+ O(l(e(n)[`${r}Section`]) + " ", 1),
2184
+ r === "tools" && e(m).toolPending.value || r === "advanced" && e(C) ? (g(), b("span", ba)) : N("", !0)
2185
+ ], 40, fa)), 64))
2186
+ ], 8, ha),
2157
2187
  a("div", {
2158
2188
  class: "mr-designer-mode",
2159
2189
  role: "group",
@@ -2161,27 +2191,27 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2161
2191
  }, [
2162
2192
  a("button", {
2163
2193
  type: "button",
2164
- "aria-pressed": e(se) === "design",
2165
- onClick: c[0] || (c[0] = (r) => e(ge)("design"))
2166
- }, l(e(n).design), 9, ha),
2194
+ "aria-pressed": e(fe) === "design",
2195
+ onClick: u[0] || (u[0] = (r) => e(se)("design"))
2196
+ }, l(e(n).design), 9, wa),
2167
2197
  a("button", {
2168
2198
  type: "button",
2169
- "aria-pressed": e(se) === "preview",
2170
- onClick: c[1] || (c[1] = (r) => e(ge)("preview"))
2171
- }, l(e(n).preview), 9, fa)
2172
- ], 8, ga),
2173
- a("div", ba, [
2174
- a("div", ya, [
2199
+ "aria-pressed": e(fe) === "preview",
2200
+ onClick: u[1] || (u[1] = (r) => e(se)("preview"))
2201
+ }, l(e(n).preview), 9, xa)
2202
+ ], 8, ya),
2203
+ a("div", Ma, [
2204
+ a("div", ka, [
2175
2205
  a("button", {
2176
2206
  type: "button",
2177
2207
  class: "mr-designer-icon-button",
2178
2208
  "aria-label": e(n).undo,
2179
2209
  title: e(n).undo,
2180
- disabled: t.readonly || e(C) || !e(y),
2181
- onClick: c[2] || (c[2] = (r) => {
2182
- e(X).clearLocks(), e(m).undo();
2210
+ disabled: t.readonly || e(S) || !e(w),
2211
+ onClick: u[2] || (u[2] = (r) => {
2212
+ e(J).clearLocks(), e(m).undo();
2183
2213
  })
2184
- }, [...c[53] || (c[53] = [
2214
+ }, [...u[53] || (u[53] = [
2185
2215
  a("svg", {
2186
2216
  viewBox: "0 0 24 24",
2187
2217
  fill: "none",
@@ -2189,17 +2219,17 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2189
2219
  }, [
2190
2220
  a("path", { d: "M4 10h10a6 6 0 0 1 0 12M4 10l5-5M4 10l5 5" })
2191
2221
  ], -1)
2192
- ])], 8, wa),
2222
+ ])], 8, Ca),
2193
2223
  a("button", {
2194
2224
  type: "button",
2195
2225
  class: "mr-designer-icon-button",
2196
2226
  "aria-label": e(n).redo,
2197
2227
  title: e(n).redo,
2198
- disabled: t.readonly || e(C) || !e(_),
2199
- onClick: c[3] || (c[3] = (r) => {
2200
- e(X).clearLocks(), e(m).redo();
2228
+ disabled: t.readonly || e(S) || !e(_),
2229
+ onClick: u[3] || (u[3] = (r) => {
2230
+ e(J).clearLocks(), e(m).redo();
2201
2231
  })
2202
- }, [...c[54] || (c[54] = [
2232
+ }, [...u[54] || (u[54] = [
2203
2233
  a("svg", {
2204
2234
  viewBox: "0 0 24 24",
2205
2235
  fill: "none",
@@ -2207,21 +2237,23 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2207
2237
  }, [
2208
2238
  a("path", { d: "M20 10H10a6 6 0 0 0 0 12m10-12-5-5m5 5-5 5" })
2209
2239
  ], -1)
2210
- ])], 8, Ma)
2240
+ ])], 8, Sa)
2211
2241
  ]),
2212
2242
  a("button", {
2213
2243
  type: "button",
2214
2244
  class: "mr-designer-reset",
2215
- disabled: t.readonly || e(C) || !e(u),
2216
- onClick: c[4] || (c[4] = //@ts-ignore
2245
+ disabled: t.readonly || e(S) || !e(d),
2246
+ onClick: u[4] || (u[4] = //@ts-ignore
2217
2247
  (...r) => e(m).reset && e(m).reset(...r))
2218
- }, l(e(n).reset), 9, xa),
2219
- t.save ? (h(), M("button", {
2248
+ }, l(e(n).reset), 9, _a),
2249
+ t.save ? (g(), b("button", {
2220
2250
  key: 0,
2221
2251
  type: "button",
2222
2252
  class: "mr-designer-save",
2223
- disabled: t.readonly || e(C) || e(S) || e(m).toolPending.value || !e($).ok || !e(u),
2224
- onClick: c[5] || (c[5] = //@ts-ignore
2253
+ title: ze.value || e(n).save,
2254
+ "aria-describedby": Ee.value.length ? `${B}-pending` : ze.value ? `${B}-save-reason` : void 0,
2255
+ disabled: t.readonly || e(S) || e(C) || e(m).toolPending.value || !e(E).ok || !e(d),
2256
+ onClick: u[5] || (u[5] = //@ts-ignore
2225
2257
  (...r) => e(m).save && e(m).save(...r))
2226
2258
  }, [
2227
2259
  le(re, {
@@ -2229,15 +2261,38 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2229
2261
  size: 13
2230
2262
  }),
2231
2263
  O(l(e(v) ? e(n).saving : e(n).save), 1)
2232
- ], 8, ka)) : F("", !0)
2264
+ ], 8, Ia)) : N("", !0),
2265
+ t.save && ze.value && !Ee.value.length ? (g(), b("span", {
2266
+ key: 1,
2267
+ id: `${B}-save-reason`,
2268
+ class: "mr-designer-save-reason"
2269
+ }, l(ze.value), 9, $a)) : N("", !0)
2233
2270
  ])
2234
2271
  ]),
2235
- e(L) ? (h(), M("div", {
2272
+ Ee.value.length ? (g(), b("div", {
2236
2273
  key: 0,
2274
+ id: `${B}-pending`,
2275
+ class: "mr-designer-pending",
2276
+ role: "status"
2277
+ }, [
2278
+ a("span", null, l(e(n).pendingToolsLabel), 1),
2279
+ (g(!0), b(q, null, Q(Ee.value, (r) => (g(), b("button", {
2280
+ key: r.target,
2281
+ type: "button",
2282
+ "aria-label": `${r.label} · ${e(n).unapplied} · ${e(n).returnToConfiguration}`,
2283
+ onClick: (K) => bt(r.target)
2284
+ }, [
2285
+ O(l(r.label), 1),
2286
+ a("span", null, l(e(n).unapplied) + " ↗", 1)
2287
+ ], 8, Ra))), 128)),
2288
+ a("small", null, l(e(n).pendingToolsHint), 1)
2289
+ ], 8, Ea)) : N("", !0),
2290
+ e(R) ? (g(), b("div", {
2291
+ key: 1,
2237
2292
  role: "alertdialog",
2238
2293
  "aria-label": e(n).discardTitle,
2239
2294
  class: "mr-designer-confirm",
2240
- onKeydown: c[8] || (c[8] = Ye(vt((r) => e(m).decideDiscard(!1), ["prevent", "stop"]), ["esc"]))
2295
+ onKeydown: u[8] || (u[8] = Ze(gt((r) => e(m).decideDiscard(!1), ["prevent", "stop"]), ["esc"]))
2241
2296
  }, [
2242
2297
  a("div", null, [
2243
2298
  a("strong", null, l(e(n).discardTitle), 1),
@@ -2246,20 +2301,20 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2246
2301
  a("div", null, [
2247
2302
  a("button", {
2248
2303
  ref_key: "keepButton",
2249
- ref: nt,
2304
+ ref: ot,
2250
2305
  type: "button",
2251
- onClick: c[6] || (c[6] = (r) => e(m).decideDiscard(!1))
2306
+ onClick: u[6] || (u[6] = (r) => e(m).decideDiscard(!1))
2252
2307
  }, l(e(n).keepEditing), 513),
2253
2308
  a("button", {
2254
2309
  type: "button",
2255
- onClick: c[7] || (c[7] = (r) => e(m).decideDiscard(!0))
2310
+ onClick: u[7] || (u[7] = (r) => e(m).decideDiscard(!0))
2256
2311
  }, l(e(n).discard), 1)
2257
2312
  ])
2258
- ], 40, Ca)) : F("", !0),
2313
+ ], 40, Ta)) : N("", !0),
2259
2314
  a("div", {
2260
- class: Pe(["mr-designer-body", { "is-tools": e(A) === "tools" }])
2315
+ class: Pe(["mr-designer-body", { "is-tools": e(L) === "tools" }])
2261
2316
  }, [
2262
- e(_e).size ? ue((h(), M("div", {
2317
+ e(_e).size ? ue((g(), b("div", {
2263
2318
  key: e(m).toolEpoch.value,
2264
2319
  class: "mr-designer-tools"
2265
2320
  }, [
@@ -2267,128 +2322,133 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2267
2322
  class: "mr-designer-tool-tabs",
2268
2323
  "aria-label": e(n).toolsSection
2269
2324
  }, [
2270
- (h(), M(K, null, Q(["excel", "rules", "params", "review"], (r) => a("button", {
2325
+ (g(), b(q, null, Q(["excel", "rules", "params", "review"], (r) => a("button", {
2271
2326
  key: r,
2327
+ id: `${B}-tool-${r}`,
2272
2328
  type: "button",
2273
- "aria-pressed": e(he) === r,
2274
- onClick: (U) => he.value = r
2275
- }, l(e(n)[`${r}Tool`]), 9, _a)), 64)),
2329
+ "aria-pressed": e(ve) === r,
2330
+ "aria-describedby": e(m).isToolPending(r) ? `${B}-pending` : void 0,
2331
+ onClick: (K) => ve.value = r
2332
+ }, [
2333
+ O(l(e(n)[`${r}Tool`]) + " ", 1),
2334
+ e(m).isToolPending(r) ? (g(), b("span", Aa)) : N("", !0)
2335
+ ], 8, Da)), 64)),
2276
2336
  a("span", null, l(e(n).toolsDescription), 1)
2277
- ], 8, Sa),
2278
- a("div", Ia, [
2279
- e(_e).has("params") ? ue((h(), Me(e(o), {
2337
+ ], 8, La),
2338
+ a("div", Pa, [
2339
+ e(_e).has("params") ? ue((g(), Me(e(o), {
2280
2340
  key: 0,
2281
- document: e(b),
2282
- readonly: e(te),
2283
- accept: w,
2284
- onDirty: c[9] || (c[9] = (r) => e(m).setToolPending("params", r))
2341
+ document: e(y),
2342
+ readonly: e(ne),
2343
+ accept: x,
2344
+ onDirty: u[9] || (u[9] = (r) => e(m).setToolPending("params", r))
2285
2345
  }, null, 8, ["document", "readonly"])), [
2286
- [Te, e(he) === "params"]
2287
- ]) : F("", !0),
2288
- e(_e).has("excel") ? ue((h(), Me(e(s), {
2346
+ [Ae, e(ve) === "params"]
2347
+ ]) : N("", !0),
2348
+ e(_e).has("excel") ? ue((g(), Me(e(s), {
2289
2349
  key: 1,
2290
2350
  datasets: t.bindingDatasets ?? [],
2291
2351
  session: t.bindingSession,
2292
- identity: { id: e(b).id, name: e(b).name },
2352
+ identity: { id: e(y).id, name: e(y).name },
2293
2353
  "lock-id": "",
2294
- readonly: e(te),
2295
- accept: xt,
2296
- onDirty: c[10] || (c[10] = (r) => e(m).setToolPending("excel", r))
2354
+ readonly: e(ne),
2355
+ accept: St,
2356
+ onDirty: u[10] || (u[10] = (r) => e(m).setToolPending("excel", r))
2297
2357
  }, null, 8, ["datasets", "session", "identity", "readonly"])), [
2298
- [Te, e(he) === "excel"]
2299
- ]) : F("", !0),
2300
- e(_e).has("review") ? ue((h(), Me(e(g), {
2358
+ [Ae, e(ve) === "excel"]
2359
+ ]) : N("", !0),
2360
+ e(_e).has("review") ? ue((g(), Me(e(h), {
2301
2361
  key: 2,
2302
- document: e(b),
2362
+ document: e(y),
2303
2363
  previous: e(m).originalDocument.value,
2304
2364
  datasets: t.datasets,
2305
2365
  "data-schemas": t.dataSchemas,
2306
- onLocate: e(Ee)
2366
+ onLocate: e(pe)
2307
2367
  }, null, 8, ["document", "previous", "datasets", "data-schemas", "onLocate"])), [
2308
- [Te, e(he) === "review"]
2309
- ]) : F("", !0),
2310
- e(_e).has("rules") ? ue((h(), M("div", $a, [
2311
- e(D).length > 1 ? (h(), M("label", Ea, [
2368
+ [Ae, e(ve) === "review"]
2369
+ ]) : N("", !0),
2370
+ e(_e).has("rules") ? ue((g(), b("div", Ha, [
2371
+ e(D).length > 1 ? (g(), b("label", Ga, [
2312
2372
  O(l(e(n).area), 1),
2313
2373
  a("select", {
2314
- value: e(R),
2315
- onChange: it
2374
+ value: e(T),
2375
+ onChange: rt
2316
2376
  }, [
2317
- (h(!0), M(K, null, Q(e(D), (r, U) => (h(), M("option", {
2318
- key: U,
2319
- value: U
2320
- }, l(r.component.title || r.component.dataset), 9, Ra))), 128))
2321
- ], 40, La)
2322
- ])) : F("", !0),
2323
- e(H) ? (h(), Me(e(p), {
2377
+ (g(!0), b(q, null, Q(e(D), (r, K) => (g(), b("option", {
2378
+ key: K,
2379
+ value: K
2380
+ }, l(r.component.title || r.component.dataset), 9, Na))), 128))
2381
+ ], 40, Fa)
2382
+ ])) : N("", !0),
2383
+ e(H) ? (g(), Me(e(p), {
2324
2384
  key: 1,
2325
2385
  list: e(H),
2326
2386
  datasets: t.datasets,
2327
- "dataset-schema": e($e),
2387
+ "dataset-schema": e(Ie),
2328
2388
  "dataset-schemas": t.dataSchemas,
2329
- readonly: e(te),
2389
+ readonly: e(ne),
2330
2390
  onChange: e(j),
2331
- onDirty: c[11] || (c[11] = (r) => e(m).setToolPending("rules", r))
2332
- }, null, 8, ["list", "datasets", "dataset-schema", "dataset-schemas", "readonly", "onChange"])) : (h(), M("p", Aa, l(e(n).rulesNeedList), 1))
2391
+ onDirty: u[11] || (u[11] = (r) => e(m).setToolPending("rules", r))
2392
+ }, null, 8, ["list", "datasets", "dataset-schema", "dataset-schemas", "readonly", "onChange"])) : (g(), b("p", za, l(e(n).rulesNeedList), 1))
2333
2393
  ], 512)), [
2334
- [Te, e(he) === "rules"]
2335
- ]) : F("", !0)
2394
+ [Ae, e(ve) === "rules"]
2395
+ ]) : N("", !0)
2336
2396
  ])
2337
2397
  ])), [
2338
- [Te, e(A) === "tools"]
2339
- ]) : F("", !0),
2340
- e(A) !== "tools" ? (h(), M("aside", Da, [
2398
+ [Ae, e(L) === "tools"]
2399
+ ]) : N("", !0),
2400
+ e(L) !== "tools" ? (g(), b("aside", Oa, [
2341
2401
  a("div", {
2342
2402
  ref_key: "inspectorPanel",
2343
- ref: qe,
2344
- id: `${W}-panel-${e(A)}`,
2345
- class: Pe(["mr-designer-panel", { "is-advanced": e(A) === "advanced" }]),
2403
+ ref: Ye,
2404
+ id: `${B}-panel-${e(L)}`,
2405
+ class: Pe(["mr-designer-panel", { "is-advanced": e(L) === "advanced" }]),
2346
2406
  role: "tabpanel",
2347
- "aria-labelledby": `${W}-tab-${e(A)}`
2407
+ "aria-labelledby": `${B}-tab-${e(L)}`
2348
2408
  }, [
2349
- de.value || De.value ? (h(), M("div", Pa, [
2409
+ de.value || De.value ? (g(), b("div", Va, [
2350
2410
  a("small", null, l(e(n).flowLayout), 1),
2351
2411
  a("button", {
2352
2412
  type: "button",
2353
- onClick: gt
2413
+ onClick: ft
2354
2414
  }, l(e(n).excelTool) + " ↗", 1)
2355
- ])) : F("", !0),
2356
- e(A) === "fields" ? (h(), M(K, { key: 1 }, [
2357
- e(D).length > 1 ? (h(), M("label", Ha, [
2415
+ ])) : N("", !0),
2416
+ e(L) === "fields" ? (g(), b(q, { key: 1 }, [
2417
+ e(D).length > 1 ? (g(), b("label", ja, [
2358
2418
  O(l(e(n).area), 1),
2359
2419
  a("select", {
2360
- value: e(R),
2361
- onChange: it
2420
+ value: e(T),
2421
+ onChange: rt
2362
2422
  }, [
2363
- (h(!0), M(K, null, Q(e(D), (r, U) => (h(), M("option", {
2364
- key: U,
2365
- value: U
2366
- }, l(r.pageIndex + 1) + " " + l(e(n).page) + " · " + l(r.component.title || r.component.dataset), 9, za))), 128))
2367
- ], 40, Ga)
2368
- ])) : F("", !0),
2369
- e(H) ? (h(), M(K, { key: 1 }, [
2370
- a("div", Fa, [
2423
+ (g(!0), b(q, null, Q(e(D), (r, K) => (g(), b("option", {
2424
+ key: K,
2425
+ value: K
2426
+ }, l(r.pageIndex + 1) + " " + l(e(n).page) + " · " + l(r.component.title || r.component.dataset), 9, Wa))), 128))
2427
+ ], 40, Ua)
2428
+ ])) : N("", !0),
2429
+ e(H) ? (g(), b(q, { key: 1 }, [
2430
+ a("div", Ka, [
2371
2431
  a("button", {
2372
2432
  ref_key: "directoryTrigger",
2373
- ref: bt,
2433
+ ref: xt,
2374
2434
  type: "button",
2375
2435
  class: "mr-designer-field-trigger",
2376
- "aria-expanded": e(at),
2377
- "aria-controls": `${W}-directory`,
2436
+ "aria-expanded": e(lt),
2437
+ "aria-controls": `${B}-directory`,
2378
2438
  "aria-haspopup": "dialog",
2379
- onClick: c[12] || (c[12] = //@ts-ignore
2439
+ onClick: u[12] || (u[12] = //@ts-ignore
2380
2440
  (...r) => e(ie).toggle && e(ie).toggle(...r)),
2381
- onKeydown: c[13] || (c[13] = Ye(
2441
+ onKeydown: u[13] || (u[13] = Ze(
2382
2442
  //@ts-ignore
2383
2443
  (...r) => e(ie).escape && e(ie).escape(...r),
2384
2444
  ["esc"]
2385
2445
  ))
2386
2446
  }, [
2387
- a("span", Ba, [
2447
+ a("span", qa, [
2388
2448
  a("strong", null, l(e(P)?.column.header || e(n).noColumns), 1),
2389
2449
  a("small", null, l(e(P)?.column.field || "—"), 1)
2390
2450
  ]),
2391
- a("span", Oa, [
2451
+ a("span", Xa, [
2392
2452
  O(l(e(n).columnDirectory) + " ", 1),
2393
2453
  a("b", null, l(e(H).columns.length), 1),
2394
2454
  le(re, {
@@ -2396,88 +2456,88 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2396
2456
  size: 13
2397
2457
  })
2398
2458
  ])
2399
- ], 40, Na),
2400
- a("div", Va, [
2459
+ ], 40, Ja),
2460
+ a("div", Ya, [
2401
2461
  a("span", {
2402
2462
  "aria-label": e(n).fieldPosition
2403
2463
  }, [
2404
- O(l(e(E) >= 0 ? e(E) + 1 : 0), 1),
2405
- c[55] || (c[55] = a("i", null, "/", -1)),
2464
+ O(l(e($) >= 0 ? e($) + 1 : 0), 1),
2465
+ u[55] || (u[55] = a("i", null, "/", -1)),
2406
2466
  O(l(e(H).columns.length), 1)
2407
- ], 8, ja),
2467
+ ], 8, Qa),
2408
2468
  a("button", {
2409
2469
  type: "button",
2410
2470
  class: "mr-designer-icon-button",
2411
2471
  "aria-label": e(n).previousColumn,
2412
2472
  title: e(n).previousColumn,
2413
- disabled: e(E) <= 0,
2414
- onClick: c[14] || (c[14] = (r) => e(k).stepColumn(-1))
2473
+ disabled: e($) <= 0,
2474
+ onClick: u[14] || (u[14] = (r) => e(k).stepColumn(-1))
2415
2475
  }, [
2416
2476
  le(re, {
2417
2477
  name: "chevron-left",
2418
2478
  size: 14
2419
2479
  })
2420
- ], 8, Wa),
2480
+ ], 8, Za),
2421
2481
  a("button", {
2422
2482
  type: "button",
2423
2483
  class: "mr-designer-icon-button",
2424
2484
  "aria-label": e(n).nextColumn,
2425
2485
  title: e(n).nextColumn,
2426
- disabled: e(E) >= e(H).columns.length - 1,
2427
- onClick: c[15] || (c[15] = (r) => e(k).stepColumn(1))
2486
+ disabled: e($) >= e(H).columns.length - 1,
2487
+ onClick: u[15] || (u[15] = (r) => e(k).stepColumn(1))
2428
2488
  }, [
2429
2489
  le(re, {
2430
2490
  name: "chevron-right",
2431
2491
  size: 14
2432
2492
  })
2433
- ], 8, Ua)
2493
+ ], 8, eo)
2434
2494
  ])
2435
2495
  ]),
2436
- e(P) ? (h(), M("fieldset", {
2496
+ e(P) ? (g(), b("fieldset", {
2437
2497
  key: 0,
2438
2498
  class: "mr-designer-properties",
2439
- disabled: t.readonly || e(C) || e(S),
2499
+ disabled: t.readonly || e(S) || e(C),
2440
2500
  "aria-label": e(n).columnProperties
2441
2501
  }, [
2442
- a("div", Ja, [
2502
+ a("div", no, [
2443
2503
  a("h3", null, l(e(n).contentGroup), 1),
2444
2504
  a("label", null, [
2445
2505
  O(l(e(n).header), 1),
2446
2506
  a("input", {
2447
2507
  value: e(P).column.header,
2448
- onInput: c[16] || (c[16] = (r) => e(m).setColumn(
2508
+ onInput: u[16] || (u[16] = (r) => e(m).setColumn(
2449
2509
  e(P).index,
2450
2510
  "header",
2451
- we(r)
2511
+ xe(r)
2452
2512
  ))
2453
- }, null, 40, qa)
2513
+ }, null, 40, ao)
2454
2514
  ]),
2455
2515
  a("label", null, [
2456
2516
  O(l(e(n).field), 1),
2457
2517
  a("input", {
2458
2518
  value: e(P).column.field,
2459
- list: e($e) ? `${W}-fields` : void 0,
2460
- onChange: c[17] || (c[17] = (r) => e(m).setColumn(
2519
+ list: e(Ie) ? `${B}-fields` : void 0,
2520
+ onChange: u[17] || (u[17] = (r) => e(m).setColumn(
2461
2521
  e(P).index,
2462
2522
  "field",
2463
- we(r)
2523
+ xe(r)
2464
2524
  ))
2465
- }, null, 40, Xa)
2525
+ }, null, 40, oo)
2466
2526
  ]),
2467
- e($e) ? (h(), M("datalist", {
2527
+ e(Ie) ? (g(), b("datalist", {
2468
2528
  key: 0,
2469
- id: `${W}-fields`
2529
+ id: `${B}-fields`
2470
2530
  }, [
2471
- (h(!0), M(K, null, Q(e($e).fields, (r) => (h(), M("option", {
2531
+ (g(!0), b(q, null, Q(e(Ie).fields, (r) => (g(), b("option", {
2472
2532
  key: r.field,
2473
2533
  value: r.field
2474
- }, l(r.label) + " · " + l(r.type) + " " + l(r.unit), 9, Qa))), 128))
2475
- ], 8, Ya)) : F("", !0)
2534
+ }, l(r.label) + " · " + l(r.type) + " " + l(r.unit), 9, io))), 128))
2535
+ ], 8, lo)) : N("", !0)
2476
2536
  ]),
2477
- a("div", Za, [
2537
+ a("div", so, [
2478
2538
  a("h3", null, l(e(n).formatGroup), 1),
2479
- a("div", eo, [
2480
- a("label", to, [
2539
+ a("div", ro, [
2540
+ a("label", uo, [
2481
2541
  O(l(e(n).width), 1),
2482
2542
  a("input", {
2483
2543
  type: "number",
@@ -2485,50 +2545,50 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2485
2545
  step: "0.5",
2486
2546
  value: e(P).column.widthMm,
2487
2547
  disabled: De.value,
2488
- onChange: c[18] || (c[18] = (r) => e(m).setColumn(
2548
+ onChange: u[18] || (u[18] = (r) => e(m).setColumn(
2489
2549
  e(P).index,
2490
2550
  "widthMm",
2491
- we(r)
2551
+ xe(r)
2492
2552
  ))
2493
- }, null, 40, no)
2553
+ }, null, 40, co)
2494
2554
  ]),
2495
- a("label", ao, [
2555
+ a("label", mo, [
2496
2556
  O(l(e(n).semantic), 1),
2497
2557
  a("select", {
2498
2558
  value: e(P).column.semanticRole || "text",
2499
- onChange: c[19] || (c[19] = (r) => e(m).setColumn(
2559
+ onChange: u[19] || (u[19] = (r) => e(m).setColumn(
2500
2560
  e(P).index,
2501
2561
  "semanticRole",
2502
- we(r)
2562
+ xe(r)
2503
2563
  ))
2504
2564
  }, [
2505
- a("option", lo, l(e(n).identifier), 1),
2506
- a("option", io, l(e(n).dimension), 1),
2507
- a("option", so, l(e(n).measure), 1),
2508
- a("option", ro, l(e(n).date), 1),
2509
- a("option", uo, l(e(n).text), 1)
2510
- ], 40, oo)
2565
+ a("option", po, l(e(n).identifier), 1),
2566
+ a("option", go, l(e(n).dimension), 1),
2567
+ a("option", ho, l(e(n).measure), 1),
2568
+ a("option", fo, l(e(n).date), 1),
2569
+ a("option", bo, l(e(n).text), 1)
2570
+ ], 40, vo)
2511
2571
  ])
2512
2572
  ]),
2513
- a("div", co, [
2573
+ a("div", yo, [
2514
2574
  a("span", null, l(e(n).bodyAlign), 1),
2515
- le(et, {
2575
+ le(nt, {
2516
2576
  "model-value": e(P).column.align ?? e(P).column.style?.align ?? e(H).align ?? "left",
2517
2577
  label: e(n).bodyAlign,
2518
- labels: ot.value,
2578
+ labels: it.value,
2519
2579
  "auto-label": e(n).autoShort,
2520
2580
  "allow-auto": "",
2521
- "onUpdate:modelValue": c[20] || (c[20] = (r) => e(m).setColumn(e(P).index, "align", r))
2581
+ "onUpdate:modelValue": u[20] || (u[20] = (r) => e(m).setColumn(e(P).index, "align", r))
2522
2582
  }, null, 8, ["model-value", "label", "labels", "auto-label"])
2523
2583
  ]),
2524
- a("div", mo, [
2584
+ a("div", wo, [
2525
2585
  a("span", null, l(e(n).headerAlign), 1),
2526
- le(et, {
2586
+ le(nt, {
2527
2587
  "model-value": e(m).headerAlignments.value[e(P).index] || "left",
2528
2588
  label: e(n).headerAlign,
2529
- labels: ot.value,
2589
+ labels: it.value,
2530
2590
  "auto-label": e(n).autoShort,
2531
- "onUpdate:modelValue": c[21] || (c[21] = (r) => e(m).setColumn(
2591
+ "onUpdate:modelValue": u[21] || (u[21] = (r) => e(m).setColumn(
2532
2592
  e(P).index,
2533
2593
  "headerAlign",
2534
2594
  r
@@ -2536,77 +2596,77 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2536
2596
  }, null, 8, ["model-value", "label", "labels", "auto-label"])
2537
2597
  ])
2538
2598
  ]),
2539
- a("label", vo, [
2599
+ a("label", xo, [
2540
2600
  O(l(e(n).editable), 1),
2541
2601
  a("input", {
2542
2602
  type: "checkbox",
2543
2603
  role: "switch",
2544
2604
  checked: e(P).column.editable === !0,
2545
- onChange: c[22] || (c[22] = (r) => e(m).setColumn(
2605
+ onChange: u[22] || (u[22] = (r) => e(m).setColumn(
2546
2606
  e(P).index,
2547
2607
  "editable",
2548
- Xe(r)
2608
+ Qe(r)
2549
2609
  ))
2550
- }, null, 40, po)
2610
+ }, null, 40, Mo)
2551
2611
  ]),
2552
- a("div", go, [
2612
+ a("div", ko, [
2553
2613
  a("span", null, l(e(n).columnOrder), 1),
2554
2614
  a("button", {
2555
2615
  type: "button",
2556
2616
  "aria-label": e(n).moveColumnLeft,
2557
2617
  title: e(n).moveColumnLeft,
2558
- disabled: De.value || e(E) <= 0,
2559
- onClick: c[23] || (c[23] = (r) => e(Y)(-1))
2618
+ disabled: De.value || e($) <= 0,
2619
+ onClick: u[23] || (u[23] = (r) => e(W)(-1))
2560
2620
  }, [
2561
2621
  le(re, {
2562
2622
  name: "chevron-left",
2563
2623
  size: 13
2564
2624
  })
2565
- ], 8, ho),
2625
+ ], 8, Co),
2566
2626
  a("button", {
2567
2627
  type: "button",
2568
2628
  "aria-label": e(n).moveColumnRight,
2569
2629
  title: e(n).moveColumnRight,
2570
- disabled: De.value || e(E) >= e(H).columns.length - 1,
2571
- onClick: c[24] || (c[24] = (r) => e(Y)(1))
2630
+ disabled: De.value || e($) >= e(H).columns.length - 1,
2631
+ onClick: u[24] || (u[24] = (r) => e(W)(1))
2572
2632
  }, [
2573
2633
  le(re, {
2574
2634
  name: "chevron-right",
2575
2635
  size: 13
2576
2636
  })
2577
- ], 8, fo),
2637
+ ], 8, So),
2578
2638
  a("label", null, [
2579
2639
  O(l(e(n).columnVisible), 1),
2580
2640
  a("input", {
2581
2641
  type: "checkbox",
2582
2642
  checked: e(P).column.hidden !== !0,
2583
2643
  disabled: De.value || e(P).column.hidden !== !0 && e(H).columns.filter((r) => !r.hidden).length === 1,
2584
- onChange: c[25] || (c[25] = (r) => e(m).setColumn(
2644
+ onChange: u[25] || (u[25] = (r) => e(m).setColumn(
2585
2645
  e(P).index,
2586
2646
  "hidden",
2587
- !Xe(r)
2647
+ !Qe(r)
2588
2648
  ))
2589
- }, null, 40, bo)
2649
+ }, null, 40, _o)
2590
2650
  ])
2591
2651
  ])
2592
- ], 8, Ka)) : F("", !0),
2593
- e(at) ? (h(), M("div", {
2652
+ ], 8, to)) : N("", !0),
2653
+ e(lt) ? (g(), b("div", {
2594
2654
  key: 1,
2595
- id: `${W}-directory`,
2655
+ id: `${B}-directory`,
2596
2656
  ref_key: "directoryPanel",
2597
- ref: yt,
2657
+ ref: Mt,
2598
2658
  role: "dialog",
2599
2659
  "aria-label": e(n).columnDirectory,
2600
2660
  class: "mr-designer-directory",
2601
- onKeydown: c[35] || (c[35] = Ye(
2661
+ onKeydown: u[35] || (u[35] = Ze(
2602
2662
  //@ts-ignore
2603
2663
  (...r) => e(ie).escape && e(ie).escape(...r),
2604
2664
  ["esc"]
2605
2665
  )),
2606
- onFocusout: c[36] || (c[36] = //@ts-ignore
2666
+ onFocusout: u[36] || (u[36] = //@ts-ignore
2607
2667
  (...r) => e(ie).leave && e(ie).leave(...r))
2608
2668
  }, [
2609
- a("div", wo, [
2669
+ a("div", $o, [
2610
2670
  a("strong", null, [
2611
2671
  O(l(e(n).columnDirectory) + " ", 1),
2612
2672
  a("span", null, l(e(H).columns.length), 1)
@@ -2615,184 +2675,184 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2615
2675
  type: "button",
2616
2676
  class: "mr-designer-icon-button",
2617
2677
  "aria-label": e(n).closeDirectory,
2618
- onClick: c[26] || (c[26] = (r) => e(ie).close(!0))
2678
+ onClick: u[26] || (u[26] = (r) => e(ie).close(!0))
2619
2679
  }, [
2620
2680
  le(re, {
2621
2681
  name: "close",
2622
2682
  size: 15
2623
2683
  })
2624
- ], 8, Mo)
2684
+ ], 8, Eo)
2625
2685
  ]),
2626
- a("div", xo, [
2686
+ a("div", Ro, [
2627
2687
  le(re, {
2628
2688
  name: "search",
2629
2689
  size: 14
2630
2690
  }),
2631
2691
  ue(a("input", {
2632
2692
  ref_key: "directorySearch",
2633
- ref: wt,
2634
- "onUpdate:modelValue": c[27] || (c[27] = (r) => Oe(B) ? B.value = r : null),
2693
+ ref: kt,
2694
+ "onUpdate:modelValue": u[27] || (u[27] = (r) => Ve(U) ? U.value = r : null),
2635
2695
  type: "search",
2636
2696
  "aria-label": e(n).columnsSearch,
2637
2697
  placeholder: e(n).columnsSearch,
2638
- onKeydown: c[28] || (c[28] = //@ts-ignore
2698
+ onKeydown: u[28] || (u[28] = //@ts-ignore
2639
2699
  (...r) => e(ie).searchKeydown && e(ie).searchKeydown(...r))
2640
- }, null, 40, ko), [
2641
- [rt, e(B)]
2700
+ }, null, 40, To), [
2701
+ [ut, e(U)]
2642
2702
  ]),
2643
- e(B) ? (h(), M("button", {
2703
+ e(U) ? (g(), b("button", {
2644
2704
  key: 0,
2645
2705
  type: "button",
2646
2706
  class: "mr-designer-icon-button",
2647
2707
  "aria-label": e(n).clearSearch,
2648
2708
  title: e(n).clearSearch,
2649
- onClick: c[29] || (c[29] = (r) => B.value = "")
2709
+ onClick: u[29] || (u[29] = (r) => U.value = "")
2650
2710
  }, [
2651
2711
  le(re, {
2652
2712
  name: "close",
2653
2713
  size: 13
2654
2714
  })
2655
- ], 8, Co)) : F("", !0)
2715
+ ], 8, Lo)) : N("", !0)
2656
2716
  ]),
2657
- a("div", So, [
2717
+ a("div", Do, [
2658
2718
  a("button", {
2659
2719
  type: "button",
2660
- disabled: t.readonly || e(C) || e(S) || !e(G).length,
2661
- onClick: c[30] || (c[30] = (r) => e(m).selectVisible(!0))
2662
- }, l(e(n).selectVisible), 9, _o),
2663
- e(q).length ? (h(), M("button", {
2720
+ disabled: t.readonly || e(S) || e(C) || !e(G).length,
2721
+ onClick: u[30] || (u[30] = (r) => e(m).selectVisible(!0))
2722
+ }, l(e(n).selectVisible), 9, Ao),
2723
+ e(X).length ? (g(), b("button", {
2664
2724
  key: 0,
2665
2725
  type: "button",
2666
- onClick: c[31] || (c[31] = //@ts-ignore
2726
+ onClick: u[31] || (u[31] = //@ts-ignore
2667
2727
  (...r) => e(m).clearSelection && e(m).clearSelection(...r))
2668
- }, l(e(n).clearSelection), 1)) : F("", !0),
2669
- e(q).length ? (h(), M("span", Io, l(e(n).columnsSelected) + " " + l(e(q).length), 1)) : (h(), M("span", $o, l(e(G).length) + " / " + l(e(H).columns.length), 1))
2728
+ }, l(e(n).clearSelection), 1)) : N("", !0),
2729
+ e(X).length ? (g(), b("span", Po, l(e(n).columnsSelected) + " " + l(e(X).length), 1)) : (g(), b("span", Ho, l(e(G).length) + " / " + l(e(H).columns.length), 1))
2670
2730
  ]),
2671
2731
  a("div", {
2672
2732
  ref_key: "columnList",
2673
- ref: Mt,
2733
+ ref: Ct,
2674
2734
  class: "mr-designer-column-list",
2675
2735
  "aria-label": e(n).columnDirectory,
2676
2736
  role: "group"
2677
2737
  }, [
2678
- (h(!0), M(K, null, Q(e(G), ({ column: r, index: U }) => (h(), M("div", {
2679
- key: U,
2680
- class: Pe(["mr-designer-column-row", { "is-active": e(E) === U }])
2738
+ (g(!0), b(q, null, Q(e(G), ({ column: r, index: K }) => (g(), b("div", {
2739
+ key: K,
2740
+ class: Pe(["mr-designer-column-row", { "is-active": e($) === K }])
2681
2741
  }, [
2682
2742
  a("input", {
2683
2743
  type: "checkbox",
2684
2744
  "aria-label": `${e(n).selectColumn} ${r.header}`,
2685
- checked: e(q).includes(U),
2686
- disabled: t.readonly || e(C) || e(S),
2687
- onChange: (Le) => e(m).toggleColumn(U, Xe(Le))
2688
- }, null, 40, Lo),
2745
+ checked: e(X).includes(K),
2746
+ disabled: t.readonly || e(S) || e(C),
2747
+ onChange: (Re) => e(m).toggleColumn(K, Qe(Re))
2748
+ }, null, 40, Fo),
2689
2749
  a("button", {
2690
2750
  type: "button",
2691
- "data-column-index": U,
2692
- "aria-pressed": e(E) === U,
2693
- tabindex: e(ft) === U ? 0 : -1,
2694
- onClick: (Le) => e(ie).choose(U),
2695
- onKeydown: c[32] || (c[32] = //@ts-ignore
2696
- (...Le) => e(ie).navigate && e(ie).navigate(...Le))
2751
+ "data-column-index": K,
2752
+ "aria-pressed": e($) === K,
2753
+ tabindex: e(wt) === K ? 0 : -1,
2754
+ onClick: (Re) => e(ie).choose(K),
2755
+ onKeydown: u[32] || (u[32] = //@ts-ignore
2756
+ (...Re) => e(ie).navigate && e(ie).navigate(...Re))
2697
2757
  }, [
2698
- a("span", Ao, l(U + 1), 1),
2699
- a("span", Do, [
2758
+ a("span", zo, l(K + 1), 1),
2759
+ a("span", Oo, [
2700
2760
  a("strong", null, l(r.header), 1),
2701
2761
  a("small", null, l(r.field), 1)
2702
2762
  ]),
2703
- e(E) === U ? (h(), Me(re, {
2763
+ e($) === K ? (g(), Me(re, {
2704
2764
  key: 0,
2705
2765
  name: "chevron-right",
2706
2766
  size: 13
2707
- })) : F("", !0)
2708
- ], 40, Ro)
2767
+ })) : N("", !0)
2768
+ ], 40, No)
2709
2769
  ], 2))), 128)),
2710
- e(G).length ? F("", !0) : (h(), M("p", To, [
2770
+ e(G).length ? N("", !0) : (g(), b("p", Bo, [
2711
2771
  le(re, {
2712
2772
  name: "search",
2713
2773
  size: 20
2714
2774
  }),
2715
2775
  O(l(e(n).noColumns), 1)
2716
2776
  ]))
2717
- ], 8, Eo),
2718
- e(q).length ? (h(), M("div", Po, [
2777
+ ], 8, Go),
2778
+ e(X).length ? (g(), b("div", Vo, [
2719
2779
  a("label", null, [
2720
2780
  O(l(e(n).batchBody), 1),
2721
2781
  a("select", {
2722
2782
  "aria-label": e(n).batchBody,
2723
- disabled: t.readonly || e(C) || e(S),
2724
- onChange: c[33] || (c[33] = (r) => st(r, "align"))
2783
+ disabled: t.readonly || e(S) || e(C),
2784
+ onChange: u[33] || (u[33] = (r) => dt(r, "align"))
2725
2785
  }, [
2726
- a("option", Go, l(e(n).chooseAlignment), 1),
2727
- a("option", zo, l(e(n).auto), 1),
2728
- a("option", Fo, l(e(n).left), 1),
2729
- a("option", No, l(e(n).center), 1),
2730
- a("option", Bo, l(e(n).right), 1),
2731
- a("option", Oo, l(e(n).justify), 1)
2732
- ], 40, Ho)
2786
+ a("option", Uo, l(e(n).chooseAlignment), 1),
2787
+ a("option", Wo, l(e(n).auto), 1),
2788
+ a("option", Ko, l(e(n).left), 1),
2789
+ a("option", Jo, l(e(n).center), 1),
2790
+ a("option", qo, l(e(n).right), 1),
2791
+ a("option", Xo, l(e(n).justify), 1)
2792
+ ], 40, jo)
2733
2793
  ]),
2734
2794
  a("label", null, [
2735
2795
  O(l(e(n).batchHeader), 1),
2736
2796
  a("select", {
2737
2797
  "aria-label": e(n).batchHeader,
2738
- disabled: t.readonly || e(C) || e(S),
2739
- onChange: c[34] || (c[34] = (r) => st(r, "headerAlign"))
2798
+ disabled: t.readonly || e(S) || e(C),
2799
+ onChange: u[34] || (u[34] = (r) => dt(r, "headerAlign"))
2740
2800
  }, [
2741
- a("option", jo, l(e(n).chooseAlignment), 1),
2742
- a("option", Wo, l(e(n).left), 1),
2743
- a("option", Uo, l(e(n).center), 1),
2744
- a("option", Ko, l(e(n).right), 1),
2745
- a("option", Jo, l(e(n).justify), 1)
2746
- ], 40, Vo)
2801
+ a("option", Qo, l(e(n).chooseAlignment), 1),
2802
+ a("option", Zo, l(e(n).left), 1),
2803
+ a("option", el, l(e(n).center), 1),
2804
+ a("option", tl, l(e(n).right), 1),
2805
+ a("option", nl, l(e(n).justify), 1)
2806
+ ], 40, Yo)
2747
2807
  ])
2748
- ])) : F("", !0)
2749
- ], 40, yo)) : F("", !0)
2750
- ], 64)) : (h(), M("p", qo, l(e(n).noColumns), 1))
2751
- ], 64)) : e(A) === "component" ? (h(), M(K, { key: 2 }, [
2752
- a("div", Xo, [
2808
+ ])) : N("", !0)
2809
+ ], 40, Io)) : N("", !0)
2810
+ ], 64)) : (g(), b("p", al, l(e(n).noColumns), 1))
2811
+ ], 64)) : e(L) === "component" ? (g(), b(q, { key: 2 }, [
2812
+ a("div", ol, [
2753
2813
  a("select", {
2754
2814
  "aria-label": e(n).insertComponent,
2755
- disabled: e(te) || de.value,
2756
- onChange: c[37] || (c[37] = //@ts-ignore
2757
- (...r) => e(Fe) && e(Fe)(...r))
2815
+ disabled: e(ne) || de.value,
2816
+ onChange: u[37] || (u[37] = //@ts-ignore
2817
+ (...r) => e(Ne) && e(Ne)(...r))
2758
2818
  }, [
2759
- a("option", Qo, l(e(n).insertComponent), 1),
2760
- a("option", Zo, l(e(n).insertText), 1),
2761
- a("option", el, l(e(n).insertList), 1),
2762
- a("option", tl, l(e(n).insertImage), 1),
2763
- a("option", nl, l(e(n).insertRect), 1)
2764
- ], 40, Yo),
2819
+ a("option", il, l(e(n).insertComponent), 1),
2820
+ a("option", sl, l(e(n).insertText), 1),
2821
+ a("option", rl, l(e(n).insertList), 1),
2822
+ a("option", dl, l(e(n).insertImage), 1),
2823
+ a("option", ul, l(e(n).insertRect), 1)
2824
+ ], 40, ll),
2765
2825
  a("button", {
2766
2826
  type: "button",
2767
2827
  title: e(n).duplicateComponent,
2768
2828
  "aria-label": e(n).duplicateComponent,
2769
- disabled: e(te) || de.value || !e(ye),
2770
- onClick: c[38] || (c[38] = //@ts-ignore
2771
- (...r) => e(X).duplicate && e(X).duplicate(...r))
2772
- }, " + ", 8, al),
2829
+ disabled: e(ne) || de.value || !e(we),
2830
+ onClick: u[38] || (u[38] = //@ts-ignore
2831
+ (...r) => e(J).duplicate && e(J).duplicate(...r))
2832
+ }, " + ", 8, cl),
2773
2833
  a("button", {
2774
2834
  type: "button",
2775
2835
  title: e(n).removeComponent,
2776
2836
  "aria-label": e(n).removeComponent,
2777
- disabled: e(te) || de.value || !e(ye),
2778
- onClick: c[39] || (c[39] = //@ts-ignore
2779
- (...r) => e(X).remove && e(X).remove(...r))
2837
+ disabled: e(ne) || de.value || !e(we),
2838
+ onClick: u[39] || (u[39] = //@ts-ignore
2839
+ (...r) => e(J).remove && e(J).remove(...r))
2780
2840
  }, [
2781
2841
  le(re, {
2782
2842
  name: "close",
2783
2843
  size: 14
2784
2844
  })
2785
- ], 8, ol)
2845
+ ], 8, ml)
2786
2846
  ]),
2787
- e(b).template.pages.length > 1 ? (h(), M("label", ll, [
2847
+ e(y).template.pages.length > 1 ? (g(), b("label", vl, [
2788
2848
  O(l(e(n).page), 1),
2789
2849
  ue(a("select", {
2790
- "onUpdate:modelValue": c[40] || (c[40] = (r) => Oe(oe) ? oe.value = r : null)
2850
+ "onUpdate:modelValue": u[40] || (u[40] = (r) => Ve(oe) ? oe.value = r : null)
2791
2851
  }, [
2792
- (h(!0), M(K, null, Q(e(b).template.pages, (r, U) => (h(), M("option", {
2793
- key: U,
2794
- value: U
2795
- }, l(U + 1), 9, il))), 128))
2852
+ (g(!0), b(q, null, Q(e(y).template.pages, (r, K) => (g(), b("option", {
2853
+ key: K,
2854
+ value: K
2855
+ }, l(K + 1), 9, pl))), 128))
2796
2856
  ], 512), [
2797
2857
  [
2798
2858
  He,
@@ -2801,170 +2861,170 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2801
2861
  { number: !0 }
2802
2862
  ]
2803
2863
  ])
2804
- ])) : F("", !0),
2805
- a("label", sl, [
2864
+ ])) : N("", !0),
2865
+ a("label", gl, [
2806
2866
  O(l(e(n).components), 1),
2807
2867
  a("select", {
2808
- value: e(ce)?.pageIndex === e(oe) ? e(ce).componentIndex : -1,
2809
- onChange: c[41] || (c[41] = (r) => lt({
2868
+ value: e(me)?.pageIndex === e(oe) ? e(me).componentIndex : -1,
2869
+ onChange: u[41] || (u[41] = (r) => st({
2810
2870
  pageIndex: e(oe),
2811
- componentIndex: Number(we(r))
2871
+ componentIndex: Number(xe(r))
2812
2872
  }))
2813
2873
  }, [
2814
- a("option", dl, l(e(n).noComponent), 1),
2815
- (h(!0), M(K, null, Q(e(b).template.pages[e(oe)]?.components, (r, U) => (h(), M("option", {
2816
- key: U,
2817
- value: U
2818
- }, l(U + 1) + " · " + l(r.kind === "list" ? r.title || r.dataset : r.text || r.kind), 9, ul))), 128))
2819
- ], 40, rl)
2874
+ a("option", fl, l(e(n).noComponent), 1),
2875
+ (g(!0), b(q, null, Q(e(y).template.pages[e(oe)]?.components, (r, K) => (g(), b("option", {
2876
+ key: K,
2877
+ value: K
2878
+ }, l(K + 1) + " · " + l(r.kind === "list" ? r.title || r.dataset : r.text || r.kind), 9, bl))), 128))
2879
+ ], 40, hl)
2820
2880
  ]),
2821
- e(X).selections.value.length ? (h(), M("div", cl, [
2822
- a("strong", null, l(e(X).selections.value.length) + " " + l(e(n).component), 1),
2881
+ e(J).selections.value.length ? (g(), b("div", yl, [
2882
+ a("strong", null, l(e(J).selections.value.length) + " " + l(e(n).component), 1),
2823
2883
  a("button", {
2824
2884
  type: "button",
2825
- disabled: e(te),
2826
- onClick: c[42] || (c[42] = //@ts-ignore
2827
- (...r) => e(X).toggleLock && e(X).toggleLock(...r))
2828
- }, l(e(X).allLocked.value ? e(n).unlockSelection : e(n).lockSelection), 9, ml),
2885
+ disabled: e(ne),
2886
+ onClick: u[42] || (u[42] = //@ts-ignore
2887
+ (...r) => e(J).toggleLock && e(J).toggleLock(...r))
2888
+ }, l(e(J).allLocked.value ? e(n).unlockSelection : e(n).lockSelection), 9, wl),
2829
2889
  a("select", {
2830
2890
  "aria-label": e(n).alignSelection,
2831
- disabled: e(te) || de.value || e(X).selections.value.length < 2,
2832
- onChange: c[43] || (c[43] = (r) => {
2833
- e(X).align(we(r)), r.target.value = "";
2891
+ disabled: e(ne) || de.value || e(J).selections.value.length < 2,
2892
+ onChange: u[43] || (u[43] = (r) => {
2893
+ e(J).align(xe(r)), r.target.value = "";
2834
2894
  })
2835
2895
  }, [
2836
- a("option", pl, l(e(n).alignSelection), 1),
2837
- a("option", gl, l(e(n).leftEdges), 1),
2838
- a("option", hl, l(e(n).centers), 1),
2839
- a("option", fl, l(e(n).rightEdges), 1),
2840
- a("option", bl, l(e(n).topEdges), 1),
2841
- a("option", yl, l(e(n).middles), 1),
2842
- a("option", wl, l(e(n).bottomEdges), 1)
2843
- ], 40, vl),
2896
+ a("option", Ml, l(e(n).alignSelection), 1),
2897
+ a("option", kl, l(e(n).leftEdges), 1),
2898
+ a("option", Cl, l(e(n).centers), 1),
2899
+ a("option", Sl, l(e(n).rightEdges), 1),
2900
+ a("option", _l, l(e(n).topEdges), 1),
2901
+ a("option", Il, l(e(n).middles), 1),
2902
+ a("option", $l, l(e(n).bottomEdges), 1)
2903
+ ], 40, xl),
2844
2904
  a("button", {
2845
2905
  type: "button",
2846
- disabled: e(te) || de.value || e(X).selections.value.length < 3,
2847
- onClick: c[44] || (c[44] = (r) => e(X).distribute("horizontal"))
2848
- }, l(e(n).horizontalSpacing), 9, Ml),
2906
+ disabled: e(ne) || de.value || e(J).selections.value.length < 3,
2907
+ onClick: u[44] || (u[44] = (r) => e(J).distribute("horizontal"))
2908
+ }, l(e(n).horizontalSpacing), 9, El),
2849
2909
  a("button", {
2850
2910
  type: "button",
2851
- disabled: e(te) || de.value || e(X).selections.value.length < 3,
2852
- onClick: c[45] || (c[45] = (r) => e(X).distribute("vertical"))
2853
- }, l(e(n).verticalSpacing), 9, xl),
2854
- e(X).allLocked.value ? (h(), M("small", kl, l(e(n).sessionLock), 1)) : F("", !0)
2855
- ])) : F("", !0),
2856
- e(ye) ? (h(), M(K, { key: 2 }, [
2857
- a("div", Cl, [
2911
+ disabled: e(ne) || de.value || e(J).selections.value.length < 3,
2912
+ onClick: u[45] || (u[45] = (r) => e(J).distribute("vertical"))
2913
+ }, l(e(n).verticalSpacing), 9, Rl),
2914
+ e(J).allLocked.value ? (g(), b("small", Tl, l(e(n).sessionLock), 1)) : N("", !0)
2915
+ ])) : N("", !0),
2916
+ e(we) ? (g(), b(q, { key: 2 }, [
2917
+ a("div", Ll, [
2858
2918
  a("button", {
2859
2919
  type: "button",
2860
- disabled: e(te) || de.value || e(ce)?.componentIndex === 0,
2861
- onClick: c[46] || (c[46] = (r) => e(X).reorder(-1))
2862
- }, l(e(n).backward), 9, Sl),
2920
+ disabled: e(ne) || de.value || e(me)?.componentIndex === 0,
2921
+ onClick: u[46] || (u[46] = (r) => e(J).reorder(-1))
2922
+ }, l(e(n).backward), 9, Dl),
2863
2923
  a("button", {
2864
2924
  type: "button",
2865
- disabled: e(te) || de.value || e(ce)?.componentIndex === (e(b).template.pages[e(oe)]?.components.length ?? 0) - 1,
2866
- onClick: c[47] || (c[47] = (r) => e(X).reorder(1))
2867
- }, l(e(n).forward), 9, _l)
2925
+ disabled: e(ne) || de.value || e(me)?.componentIndex === (e(y).template.pages[e(oe)]?.components.length ?? 0) - 1,
2926
+ onClick: u[47] || (u[47] = (r) => e(J).reorder(1))
2927
+ }, l(e(n).forward), 9, Al)
2868
2928
  ]),
2869
- le(jn, {
2870
- component: e(ye),
2929
+ le(Kn, {
2930
+ component: e(we),
2871
2931
  "geometry-disabled": de.value,
2872
- disabled: e(te) || e(X).locked(e(ce)),
2932
+ disabled: e(ne) || e(J).locked(e(me)),
2873
2933
  messages: e(n),
2874
- onGeometry: e(X).geometry,
2875
- onPatch: e(V)
2934
+ onGeometry: e(J).geometry,
2935
+ onPatch: e(Xe)
2876
2936
  }, null, 8, ["component", "geometry-disabled", "disabled", "messages", "onGeometry", "onPatch"]),
2877
- e(ye).kind === "list" ? (h(), Me(Qn, {
2937
+ e(we).kind === "list" ? (g(), Me(ta, {
2878
2938
  key: 0,
2879
- list: e(ye),
2880
- disabled: e(te) || de.value,
2939
+ list: e(we),
2940
+ disabled: e(ne) || de.value,
2881
2941
  messages: e(n),
2882
- onCommand: e(ve)
2883
- }, null, 8, ["list", "disabled", "messages", "onCommand"])) : F("", !0)
2884
- ], 64)) : (h(), M("p", Il, l(e(n).noComponent), 1))
2885
- ], 64)) : e(A) === "template" ? (h(), M(K, { key: 3 }, [
2942
+ onCommand: e(Y)
2943
+ }, null, 8, ["list", "disabled", "messages", "onCommand"])) : N("", !0)
2944
+ ], 64)) : (g(), b("p", Pl, l(e(n).noComponent), 1))
2945
+ ], 64)) : e(L) === "template" ? (g(), b(q, { key: 3 }, [
2886
2946
  a("h3", null, l(e(n).templateDetails), 1),
2887
- a("label", $l, [
2947
+ a("label", Hl, [
2888
2948
  O(l(e(n).name), 1),
2889
2949
  a("input", {
2890
- value: e(b).name,
2891
- disabled: t.readonly || e(C) || e(S),
2892
- onInput: c[48] || (c[48] = (r) => e(m).setName(we(r)))
2893
- }, null, 40, El)
2950
+ value: e(y).name,
2951
+ disabled: t.readonly || e(S) || e(C),
2952
+ onInput: u[48] || (u[48] = (r) => e(m).setName(xe(r)))
2953
+ }, null, 40, Gl)
2894
2954
  ]),
2895
- a("label", Ll, [
2955
+ a("label", Fl, [
2896
2956
  O(l(e(n).description), 1),
2897
2957
  a("textarea", {
2898
2958
  rows: "2",
2899
- value: e(b).description,
2900
- disabled: t.readonly || e(C) || e(S),
2901
- onInput: c[49] || (c[49] = (r) => e(m).setDescription(we(r)))
2902
- }, null, 40, Rl)
2959
+ value: e(y).description,
2960
+ disabled: t.readonly || e(S) || e(C),
2961
+ onInput: u[49] || (u[49] = (r) => e(m).setDescription(xe(r)))
2962
+ }, null, 40, Nl)
2903
2963
  ]),
2904
- a("details", Al, [
2964
+ a("details", zl, [
2905
2965
  a("summary", null, l(e(n).technicalDetails), 1),
2906
- a("dl", Dl, [
2966
+ a("dl", Ol, [
2907
2967
  a("dt", null, l(e(n).templateIdentity), 1),
2908
- a("dd", null, l(e(b).id), 1),
2968
+ a("dd", null, l(e(y).id), 1),
2909
2969
  a("dt", null, l(e(n).templateRevision), 1),
2910
- a("dd", null, l(e(b).revision || e(n).unpublished), 1)
2970
+ a("dd", null, l(e(y).revision || e(n).unpublished), 1)
2911
2971
  ])
2912
2972
  ])
2913
- ], 64)) : (h(), M(K, { key: 4 }, [
2973
+ ], 64)) : (g(), b(q, { key: 4 }, [
2914
2974
  a("h3", null, l(e(n).advancedTitle), 1),
2915
- a("label", Tl, [
2975
+ a("label", Bl, [
2916
2976
  O(l(e(n).json), 1),
2917
2977
  ue(a("textarea", {
2918
- "onUpdate:modelValue": c[50] || (c[50] = (r) => Oe(T) ? T.value = r : null),
2978
+ "onUpdate:modelValue": u[50] || (u[50] = (r) => Ve(A) ? A.value = r : null),
2919
2979
  class: "mr-designer-json",
2920
2980
  "aria-label": e(n).json,
2921
- disabled: t.readonly || e(C),
2981
+ disabled: t.readonly || e(S),
2922
2982
  spellcheck: "false"
2923
- }, null, 8, Pl), [
2924
- [rt, e(T)]
2983
+ }, null, 8, Vl), [
2984
+ [ut, e(A)]
2925
2985
  ])
2926
2986
  ]),
2927
2987
  a("button", {
2928
2988
  type: "button",
2929
2989
  class: "mr-designer-apply-json",
2930
- disabled: t.readonly || e(C),
2931
- onClick: c[51] || (c[51] = //@ts-ignore
2990
+ disabled: t.readonly || e(S),
2991
+ onClick: u[51] || (u[51] = //@ts-ignore
2932
2992
  (...r) => e(m).applyJson && e(m).applyJson(...r))
2933
- }, l(e(n).applyJson), 9, Hl)
2993
+ }, l(e(n).applyJson), 9, jl)
2934
2994
  ], 64)),
2935
- e(S) ? (h(), M("p", Gl, l(e(n).jsonPending), 1)) : F("", !0)
2936
- ], 10, Ta)
2937
- ])) : F("", !0),
2938
- e(A) !== "tools" ? (h(), M("div", {
2995
+ e(C) ? (g(), b("p", Ul, l(e(n).jsonPending), 1)) : N("", !0)
2996
+ ], 10, Ba)
2997
+ ])) : N("", !0),
2998
+ e(L) !== "tools" ? (g(), b("div", {
2939
2999
  key: 2,
2940
3000
  class: "mr-designer-preview",
2941
3001
  "aria-label": e(n).previewTitle
2942
3002
  }, [
2943
- e(I) ? (h(), M("div", Fl, l(e(I)), 1)) : F("", !0),
2944
- e($).ok ? F("", !0) : (h(), M("ul", Nl, [
2945
- (h(!0), M(K, null, Q(e($).errors, (r) => (h(), M("li", {
3003
+ e(I) ? (g(), b("div", Kl, l(e(I)), 1)) : N("", !0),
3004
+ e(E).ok ? N("", !0) : (g(), b("ul", Jl, [
3005
+ (g(!0), b(q, null, Q(e(E).errors, (r) => (g(), b("li", {
2946
3006
  key: r.path
2947
3007
  }, l(r.path) + ":" + l(r.message), 1))), 128))
2948
3008
  ])),
2949
- e(se) === "design" && e($).ok ? (h(), Me(un, {
3009
+ e(fe) === "design" && e(E).ok ? (g(), Me(vn, {
2950
3010
  key: 2,
2951
- document: e(b),
2952
- selection: e(ce),
2953
- selections: e(X).selections.value,
2954
- locked: e(X).locked,
2955
- "active-column-index": e(E),
3011
+ document: e(y),
3012
+ selection: e(me),
3013
+ selections: e(J).selections.value,
3014
+ locked: e(J).locked,
3015
+ "active-column-index": e($),
2956
3016
  "page-index": e(oe),
2957
3017
  datasets: t.datasets,
2958
- disabled: e(te) || de.value || e(m).isToolPending("rules"),
3018
+ disabled: e(ne) || de.value || e(m).isToolPending("rules"),
2959
3019
  messages: e(n),
2960
- onSelect: lt,
2961
- onGeometry: e(X).geometry,
3020
+ onSelect: st,
3021
+ onGeometry: e(J).geometry,
2962
3022
  onColumn: e(k).activate,
2963
- onWidth: c[52] || (c[52] = (r, U) => e(m).setColumn(r, "widthMm", String(U)))
2964
- }, null, 8, ["document", "selection", "selections", "locked", "active-column-index", "page-index", "datasets", "disabled", "messages", "onGeometry", "onColumn"])) : e(ae) && e($).ok ? (h(), Me(e($t), {
3023
+ onWidth: u[52] || (u[52] = (r, K) => e(m).setColumn(r, "widthMm", String(K)))
3024
+ }, null, 8, ["document", "selection", "selections", "locked", "active-column-index", "page-index", "datasets", "disabled", "messages", "onGeometry", "onColumn"])) : e(te) && e(E).ok ? (g(), Me(e(Tt), {
2965
3025
  key: 3,
2966
3026
  "report-id": "draft",
2967
- fetcher: e(ae),
3027
+ fetcher: e(te),
2968
3028
  messages: {
2969
3029
  title: e(n).previewTitle,
2970
3030
  columnDirectory: e(n).previewFieldDirectory
@@ -2973,12 +3033,12 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
2973
3033
  editable: !1,
2974
3034
  "excel-import": !1,
2975
3035
  height: "100%"
2976
- }, null, 8, ["fetcher", "messages"])) : (h(), M("p", Bl, l(e(n).invalid), 1))
2977
- ], 8, zl)) : F("", !0)
3036
+ }, null, 8, ["fetcher", "messages"])) : (g(), b("p", ql, l(e(n).invalid), 1))
3037
+ ], 8, Wl)) : N("", !0)
2978
3038
  ], 2)
2979
- ], 8, ua));
3039
+ ], 8, va));
2980
3040
  }
2981
- }), Xl = /* @__PURE__ */ ze(Ol, [["__scopeId", "data-v-b0c623cb"]]), Yl = {
3041
+ }), oi = /* @__PURE__ */ Fe(Xl, [["__scopeId", "data-v-af7ee097"]]), li = {
2982
3042
  stale: "输入或验收范围已变化,旧结果已失效,请重新运行检查。",
2983
3043
  scope: "上次实测范围",
2984
3044
  datasets: "个数据集",
@@ -3011,13 +3071,32 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
3011
3071
  checked: "检查结果对应本次样例,不代替服务端发布权限与全量数据校验。",
3012
3072
  categories: { metadata: "信息", structure: "结构", binding: "字段", calculation: "计算", format: "样式" },
3013
3073
  kinds: { added: "新增", removed: "删除", modified: "修改", moved: "调序" }
3014
- }, Ql = {
3074
+ }, ii = {
3015
3075
  tableMode: "传统整表",
3016
3076
  multiRegions: "多区域绑定",
3017
3077
  multiHint: "点击单元格选择起点,Shift 点击选择终点;每个动态区域选择一行原型。",
3018
3078
  addRegion: "创建区域",
3019
3079
  removeRegion: "删除区域",
3020
3080
  regionProperties: "当前区域",
3081
+ regionReady: "就绪",
3082
+ regionPending: "待补齐",
3083
+ regionError: "需修正",
3084
+ locateIssue: "定位并修正",
3085
+ nextDataset: "下一步:选择业务数据集",
3086
+ nextRowKey: "下一步:选择稳定业务主键",
3087
+ nextField: "下一步:补齐或修正逐列字段映射",
3088
+ nextRange: "下一步:检查原型范围及区域重叠",
3089
+ nextRegion: "下一步:在原始模板中选择一行并创建区域",
3090
+ nextHeader: "下一步:选择整行并标记表头和明细",
3091
+ nextFooter: "下一步:检查重复页尾范围",
3092
+ nextContract: "下一步:检查数据集契约和样例",
3093
+ dataContract: "数据集契约",
3094
+ inspectIssues: "查看待修正项",
3095
+ previousIssues: "上一组问题",
3096
+ nextIssues: "下一组问题",
3097
+ noCellSelection: "请先点击单元格,Shift 点击选择一行范围",
3098
+ limitRegions: "最多创建 128 个区域",
3099
+ applying: "正在确认模板…",
3021
3100
  regionCoordinates: "原型范围",
3022
3101
  regionMode: "填充方式",
3023
3102
  recordMode: "单记录",
@@ -3105,7 +3184,7 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
3105
3184
  mappedTo: "绑定到",
3106
3185
  sampleOnly: "仅契约样例",
3107
3186
  schemaOnly: "契约字段,不执行接口查询"
3108
- }, Zl = {
3187
+ }, si = {
3109
3188
  restoreDraft: "恢复工具草稿",
3110
3189
  catalog: "规则与字段",
3111
3190
  searchFields: "搜索字段、类型或单位",
@@ -3252,7 +3331,7 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
3252
3331
  sampleError: "验算未通过",
3253
3332
  new: "新增",
3254
3333
  enabled: "启用"
3255
- }, ei = {
3334
+ }, ri = {
3256
3335
  paramsTool: "查询参数",
3257
3336
  paramsDescription: "配置一次,预览与服务端使用同一份校验规则。",
3258
3337
  paramsDirectory: "参数目录",
@@ -3283,6 +3362,11 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
3283
3362
  paramPending: "尚未应用",
3284
3363
  paramReady: "规则有效",
3285
3364
  paramInvalid: "规则待修正",
3365
+ paramIssueCount: "待修正问题",
3366
+ paramLocateFirst: "定位首个问题",
3367
+ paramUnnamed: "未命名参数",
3368
+ paramRangeStart: "默认开始日期",
3369
+ paramRangeEnd: "默认结束日期",
3286
3370
  paramConflict: "模板参数已在其他操作中变更。请先恢复参数草稿,再继续编辑。",
3287
3371
  paramApplyFailed: "参数未应用,请检查模板校验信息。",
3288
3372
  paramRenameHint: "参数标识决定接口取数键。新增、删除或改名后,请同步检查接入方的数据查询;插件不会修改外部接口。",
@@ -3299,25 +3383,32 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
3299
3383
  paramYear: "年份",
3300
3384
  paramDateRange: "日期范围",
3301
3385
  paramSelect: "下拉选择"
3302
- }, ti = {
3386
+ }, di = {
3303
3387
  batchTitle: "批量生成",
3304
3388
  batchDescription: "每组参数独立生成;成功结果由接入方保存,当前页面仅保留回执。",
3305
3389
  batchAdd: "添加一组",
3306
3390
  batchDuplicate: "复制参数",
3391
+ batchDuplicateCompleted: "复制为新任务",
3307
3392
  batchRemove: "删除参数组",
3308
- batchRun: "生成全部",
3393
+ batchRun: "生成待处理",
3394
+ batchContinue: "继续未完成",
3309
3395
  batchRunning: "正在生成",
3310
3396
  batchRetry: "仅重试失败项",
3311
3397
  batchCancel: "取消剩余任务",
3312
3398
  batchCancelling: "正在取消…",
3313
3399
  batchPending: "待生成",
3314
3400
  batchCompleted: "已完成",
3401
+ batchCompletedHint: "此组已生成并保留回执;需修改参数或再次生成,请复制为新任务。",
3315
3402
  batchFailed: "失败",
3316
3403
  batchCancelled: "已取消",
3317
3404
  batchCase: "参数组",
3318
- batchProgress: "已结束 {completed}/{total} · 失败 {failed} · 取消 {cancelled}",
3405
+ batchProgress: "本轮已结束 {completed}/{total} · 失败 {failed} · 取消 {cancelled}",
3319
3406
  batchInvalid: "请修正参数错误后再生成;本次未启动任何任务。",
3320
3407
  batchEmpty: "添加一组参数开始批量生成",
3408
+ batchNoMatches: "当前状态没有参数组",
3409
+ batchFilter: "按生成状态筛选",
3410
+ batchAll: "全部",
3411
+ batchNextFailure: "下一失败项",
3321
3412
  batchNoInstance: "已完成,接入方未返回可打开的实例标识。",
3322
3413
  batchOpen: "打开报表实例",
3323
3414
  batchLimit: "当前最多支持 {count} 组参数。",
@@ -3326,7 +3417,18 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
3326
3417
  batchPrevious: "上一页",
3327
3418
  batchNext: "下一页",
3328
3419
  batchPage: "第 {page}/{pages} 页 · 共 {total} 组"
3329
- }, ni = {
3420
+ }, ui = {
3421
+ publicationChanged: "发布修订与目录不一致,请刷新目录后重新查看",
3422
+ continueDraft: "继续编辑草稿",
3423
+ viewPublished: "查看发布版",
3424
+ draft: "草稿",
3425
+ published: "已发布",
3426
+ draftPending: "草稿待发布",
3427
+ retrySearch: "重试目录查询",
3428
+ retryOpen: "重试打开模板",
3429
+ retryCopy: "重试创建副本",
3430
+ openingTarget: "正在打开 {name}…",
3431
+ creatingTarget: "正在创建 {name} 的副本…",
3330
3432
  title: "模板库",
3331
3433
  subtitle: "按业务分类查找、打开或复制模板",
3332
3434
  search: "搜索名称、编号或标签",
@@ -3351,20 +3453,20 @@ const ua = ["aria-label", "aria-busy"], ca = { class: "mr-designer-bar" }, ma =
3351
3453
  missing: "模板不存在或已不可访问",
3352
3454
  stale: "目录返回了重复项或无效分页游标",
3353
3455
  invalid: "模板目录响应格式无效"
3354
- }, ai = pe(() => import("./TemplateReviewPanel-BKofGrV9.js")), oi = pe(() => import("./ExcelBindingWizard-Dxm-K5HL.js")), li = pe(() => import("./RuleEditor-D9wQHrkf.js")), ii = pe(() => import("./ParamEditor-DRGxzxeO.js")), si = pe(() => import("./ReportBatchPanel-Bby5yLzU.js")), ri = pe(() => import("./ReportTemplateLibrary-DfzDXRvr.js"));
3456
+ }, ci = ge(() => import("./TemplateReviewPanel-BKofGrV9.js")), mi = ge(() => import("./ExcelBindingWizard-LWX6G1A2.js")), vi = ge(() => import("./RuleEditor-D9wQHrkf.js")), pi = ge(() => import("./ParamEditor-BLaE5q5W.js")), gi = ge(() => import("./ReportBatchPanel-B5ClP9tm.js")), hi = ge(() => import("./ReportTemplateLibrary-BZB-XWjj.js"));
3355
3457
  export {
3356
- Ql as EXCEL_BINDING_MESSAGES,
3357
- oi as ExcelBindingWizard,
3358
- ei as PARAM_EDITOR_MESSAGES,
3359
- ii as ParamEditor,
3360
- ti as REPORT_BATCH_MESSAGES,
3361
- Zl as RULE_EDITOR_MESSAGES,
3362
- si as ReportBatchPanel,
3363
- Xl as ReportTemplateEditor,
3364
- ri as ReportTemplateLibrary,
3365
- li as RuleEditor,
3366
- Ke as TEMPLATE_EDITOR_MESSAGES,
3367
- ni as TEMPLATE_LIBRARY_MESSAGES,
3368
- Yl as TEMPLATE_REVIEW_MESSAGES,
3369
- ai as TemplateReviewPanel
3458
+ ii as EXCEL_BINDING_MESSAGES,
3459
+ mi as ExcelBindingWizard,
3460
+ ri as PARAM_EDITOR_MESSAGES,
3461
+ pi as ParamEditor,
3462
+ di as REPORT_BATCH_MESSAGES,
3463
+ si as RULE_EDITOR_MESSAGES,
3464
+ gi as ReportBatchPanel,
3465
+ oi as ReportTemplateEditor,
3466
+ hi as ReportTemplateLibrary,
3467
+ vi as RuleEditor,
3468
+ Je as TEMPLATE_EDITOR_MESSAGES,
3469
+ ui as TEMPLATE_LIBRARY_MESSAGES,
3470
+ li as TEMPLATE_REVIEW_MESSAGES,
3471
+ ci as TemplateReviewPanel
3370
3472
  };