@agile-team/mach-report 2.21.1 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +16 -2
  2. package/dist/{ExcelBindingWizard-Bu0LUlzl.cjs → ExcelBindingWizard-CW79I6Gl.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-mnAO2qOX.js → ExcelBindingWizard-CZyppD7I.js} +3 -3
  4. package/dist/{ParamEditor-38ZfNrPU.cjs → ParamEditor-CiYCJI0b.cjs} +1 -1
  5. package/dist/{ParamEditor-C8l0EC8m.js → ParamEditor-DQit-Gdf.js} +2 -2
  6. package/dist/{ReportBatchPanel-CfUVhvkO.js → ReportBatchPanel-DKTpV7MU.js} +2 -2
  7. package/dist/{ReportBatchPanel-nCC06Nfp.cjs → ReportBatchPanel-Db6TAfG5.cjs} +1 -1
  8. package/dist/ReportLabelStudio-B0i9ohQj.cjs +1 -0
  9. package/dist/ReportLabelStudio-BYnRqmje.js +780 -0
  10. package/dist/{ReportParamPanel-peB-KEmm.js → ReportParamPanel-BHSKVL8k.js} +231 -224
  11. package/dist/ReportParamPanel-lngONOEz.cjs +1 -0
  12. package/dist/ReportPreview-BDgKssYR.js +5887 -0
  13. package/dist/ReportPreview-Dw-4icG6.cjs +6 -0
  14. package/dist/{ReportTemplateLibrary-B5t_EcIs.js → ReportTemplateLibrary-BZuKn0YK.js} +1 -1
  15. package/dist/{ReportTemplateLibrary-DVlsf72p.cjs → ReportTemplateLibrary-DEXH07ND.cjs} +1 -1
  16. package/dist/{RuleEditor-kT1JsZ9f.js → RuleEditor-CIQn547x.js} +3 -3
  17. package/dist/{RuleEditor-xFkCVlii.cjs → RuleEditor-zSUmPjKa.cjs} +1 -1
  18. package/dist/{TemplateOutlinePanel-CDI6mfWx.cjs → TemplateOutlinePanel-B5SfGYVN.cjs} +1 -1
  19. package/dist/{TemplateOutlinePanel-BesgGR1P.js → TemplateOutlinePanel-D0PgOSQE.js} +2 -2
  20. package/dist/{TemplateReusePanel-BNFU6V-W.js → TemplateReusePanel-BKlAEF8-.js} +2 -2
  21. package/dist/{TemplateReusePanel-BG9Or5-P.cjs → TemplateReusePanel-DAy_Hwqz.cjs} +1 -1
  22. package/dist/TemplateReviewPanel-CowmHaQQ.cjs +1 -0
  23. package/dist/{TemplateReviewPanel-CwvwyCSs.js → TemplateReviewPanel-div-EH_m.js} +2 -2
  24. package/dist/artifact-integrity.json +76 -76
  25. package/dist/{auto-Tq7ReIC1.cjs → auto-DcUHlKob.cjs} +1 -1
  26. package/dist/{auto-BkdGiNtr.js → auto-moShblh1.js} +4 -4
  27. package/dist/{designer-HQi-03R6.js → designer-B7jJeAeG.js} +1500 -1455
  28. package/dist/{designer-DU3yDWgs.cjs → designer-BWQVpJeN.cjs} +2 -2
  29. package/dist/designer.cjs +1 -1
  30. package/dist/designer.d.cts +149 -2
  31. package/dist/designer.d.ts +149 -2
  32. package/dist/designer.js +13 -12
  33. package/dist/{encoding-BSeUwrN7.js → encoding-DbnhbwI8.js} +2 -2
  34. package/dist/{encoding-B79hW4zq.cjs → encoding-ncQAvyOv.cjs} +1 -1
  35. package/dist/index.cjs +5 -5
  36. package/dist/index.d.cts +38 -0
  37. package/dist/index.d.ts +38 -0
  38. package/dist/index.js +299 -279
  39. package/dist/{json-snapshot-Kgn459Oj.js → json-snapshot-DvQbZlD7.js} +2 -2
  40. package/dist/{json-snapshot-I5VI84Vp.cjs → json-snapshot-nyV63AbB.cjs} +1 -1
  41. package/dist/{plugin-BaRUGORD.cjs → plugin-AcAQ2m9X.cjs} +1 -1
  42. package/dist/{plugin-D4kAxfLG.js → plugin-w5Nyt08U.js} +1 -1
  43. package/dist/{prefill-CJSazcVY.js → prefill-BXBxx5We.js} +1 -1
  44. package/dist/{prefill-Bpyn58AZ.cjs → prefill-DUvejVt1.cjs} +1 -1
  45. package/dist/prepared-YXy-fVLw.cjs +1 -0
  46. package/dist/{prepared-BwjwEzFz.js → prepared-rXCKqdHY.js} +35 -34
  47. package/dist/{protocol-C8VWF9An.cjs → protocol-C9ZaylID.cjs} +1 -1
  48. package/dist/{protocol-Bs9-ohHN.js → protocol-fjaeKkjf.js} +3 -3
  49. package/dist/{region-binding-workflow-JNowHd0A.cjs → region-binding-workflow-BiJQ7NU6.cjs} +1 -1
  50. package/dist/{region-binding-workflow-Cy4GIOUo.js → region-binding-workflow-aA8nxmkZ.js} +1 -1
  51. package/dist/report-encoding-worker.cjs +1 -1
  52. package/dist/report-encoding-worker.js +1 -1
  53. package/dist/{runtime-BDf5x1i1.js → runtime-BTtpjF3D.js} +4 -4
  54. package/dist/{runtime-DsJt1PIf.cjs → runtime-Dq0LUsyS.cjs} +1 -1
  55. package/dist/sbom.cdx.json +1 -1
  56. package/dist/server/node.d.cts +9 -0
  57. package/dist/server/node.d.ts +9 -0
  58. package/dist/server-node.cjs +5 -4
  59. package/dist/server-node.js +1838 -1760
  60. package/dist/server.cjs +1 -1
  61. package/dist/server.d.cts +81 -0
  62. package/dist/server.d.ts +81 -0
  63. package/dist/server.js +6 -6
  64. package/dist/style.css +1 -1
  65. package/dist/template-catalog-CLAM4w7H.cjs +1 -0
  66. package/dist/{template-catalog-DFwIS9aN.js → template-catalog-JSxSqk5y.js} +3 -3
  67. package/dist/template-fragments-Ca25Jt7e.cjs +1 -0
  68. package/dist/{template-fragments-Dng-AlHk.js → template-fragments-D2JFj7Du.js} +18 -18
  69. package/dist/{template-outline-DiADphlq.js → template-outline-CDWXptuj.js} +1 -1
  70. package/dist/template-outline-K4jGhATu.cjs +1 -0
  71. package/dist/template-registry-CWnuGqyP.cjs +1 -0
  72. package/dist/{template-registry-DhBqoD7W.js → template-registry-Do1Uav2Z.js} +333 -261
  73. package/dist/template-serialization-CU4n_Miu.js +307 -0
  74. package/dist/template-serialization-CgqBo6s-.cjs +1 -0
  75. package/dist/vue/async.d.cts +97 -2
  76. package/dist/vue/async.d.ts +97 -2
  77. package/dist/vue/index.d.cts +197 -4
  78. package/dist/vue/index.d.ts +197 -4
  79. package/dist/vue-async.cjs +1 -1
  80. package/dist/vue-async.js +3 -3
  81. package/dist/vue.cjs +1 -1
  82. package/dist/vue.js +75 -70
  83. package/dist/{workbook-session-NYv01LHe.cjs → workbook-session-BvEBRRMz.cjs} +1 -1
  84. package/dist/{workbook-session-oinxX3qo.js → workbook-session-f0wVlzst.js} +1 -1
  85. package/dist/workbook-sheets-CaPAulQ6.cjs +2 -0
  86. package/dist/workbook-sheets-D4M7XXBh.js +44 -0
  87. package/dist/worker.cjs +1 -1
  88. package/dist/worker.d.cts +9 -0
  89. package/dist/worker.d.ts +9 -0
  90. package/dist/worker.js +4 -4
  91. package/dist/xlsx.cjs +4 -4
  92. package/dist/xlsx.d.cts +39 -2
  93. package/dist/xlsx.d.ts +39 -2
  94. package/dist/xlsx.js +290 -270
  95. package/package.json +1 -1
  96. package/dist/ReportLabelStudio-CaEvYuSK.cjs +0 -1
  97. package/dist/ReportLabelStudio-DQPBmh4v.js +0 -765
  98. package/dist/ReportParamPanel-CVpK8mFc.cjs +0 -1
  99. package/dist/ReportPreview-BBJNlu2U.js +0 -5740
  100. package/dist/ReportPreview-nf4Dk1Jc.cjs +0 -6
  101. package/dist/TemplateReviewPanel-BmBrjt6P.cjs +0 -1
  102. package/dist/prepared-BiSz_9vN.cjs +0 -1
  103. package/dist/template-bindings-Cg5oBLFT.cjs +0 -1
  104. package/dist/template-bindings-TKnXM7ll.js +0 -62
  105. package/dist/template-catalog-D_2jdnkL.cjs +0 -1
  106. package/dist/template-fragments-DZVUBhuB.cjs +0 -1
  107. package/dist/template-outline-DWkzZXVC.cjs +0 -1
  108. package/dist/template-registry-DpLUSLwF.cjs +0 -1
  109. package/dist/template-serialization-Cc3h-miv.js +0 -247
  110. package/dist/template-serialization-D1R5oAqh.cjs +0 -1
@@ -3,7 +3,7 @@ import { a as Q } from "./injection-keys-e85udZCp.js";
3
3
  import { ReportParamValidationError as we, ReportSourceError as Ee, validateReportParams as oe, parseReportCascaderPath as Se, formatReportCascaderPath as Pe, parseReportParamSelection as Ce, formatReportParamSelection as Oe } from "@agile-team/mach-report";
4
4
  import { w as xe } from "./progress-Hc2vxoCs.js";
5
5
  import { _ as ee, a as X } from "./_plugin-vue_export-helper-8SL1F89S.js";
6
- const Ae = {
6
+ const Re = {
7
7
  printPrepareTimeout: "打印资源准备超时,请检查字体与图片后重试。",
8
8
  printImageFailed: "第 {index} 张图片未能加载,已停止打印,避免输出缺失内容。",
9
9
  printFontFailed: "打印字体 {family} 未能加载,请检查字体资源后重试。",
@@ -14,33 +14,33 @@ const Ae = {
14
14
  printCalibrationTest: "打印校准页",
15
15
  printCalibrationHint: "正值向右/向下移动,负值向左/向上。使用同规格纸张及 100% 比例,先试打一张。系统对话框关闭不代表设备已完成。"
16
16
  };
17
- function Ca(e) {
18
- const l = e?.calibration?.offsetXmm ?? 0, n = e?.calibration?.offsetYmm ?? 0;
19
- if (![l, n].every((t) => Number.isFinite(t) && Math.abs(t) <= 20)) throw new RangeError("Print calibration must be within ±20 mm");
20
- return { x: l, y: n };
17
+ function Oa(e) {
18
+ const t = e?.calibration?.offsetXmm ?? 0, l = e?.calibration?.offsetYmm ?? 0;
19
+ if (![t, l].every((n) => Number.isFinite(n) && Math.abs(n) <= 20)) throw new RangeError("Print calibration must be within ±20 mm");
20
+ return { x: t, y: l };
21
21
  }
22
- function Oa(e = {}) {
22
+ function xa(e = {}) {
23
23
  if (e.fonts && (!Array.isArray(e.fonts) || e.fonts.length > 8)) throw new RangeError("At most eight print font faces are allowed");
24
- return { ...e, ...e.fonts ? { fonts: e.fonts.map((l) => ({ ...l })) } : {}, ...e.calibration ? { calibration: { ...e.calibration } } : {} };
24
+ return { ...e, ...e.fonts ? { fonts: e.fonts.map((t) => ({ ...t })) } : {}, ...e.calibration ? { calibration: { ...e.calibration } } : {} };
25
25
  }
26
- function Re(e = {}) {
27
- const l = k(!1), n = k(null), t = k(null), i = k(null);
26
+ function Ae(e = {}) {
27
+ const t = k(!1), l = k(null), n = k(null), i = k(null);
28
28
  function c(d = !1) {
29
- l.value = !1, d && V(() => t.value?.focus());
29
+ t.value = !1, d && V(() => n.value?.focus());
30
30
  }
31
31
  function g(d) {
32
- d.target instanceof Node && !n.value?.contains(d.target) && c();
32
+ d.target instanceof Node && !l.value?.contains(d.target) && c();
33
33
  }
34
34
  function s(d) {
35
- d.key !== "Escape" || !l.value || d.isComposing || (d.preventDefault(), d.stopPropagation(), c(!0));
35
+ d.key !== "Escape" || !t.value || d.isComposing || (d.preventDefault(), d.stopPropagation(), c(!0));
36
36
  }
37
- return D(l, (d) => {
37
+ return D(t, (d) => {
38
38
  !d || e.focusOnOpen === !1 || V(() => (i.value?.querySelector("input") ?? i.value?.querySelector("button:not(:disabled)"))?.focus());
39
39
  }), ge(() => {
40
40
  document.addEventListener("pointerdown", g), document.addEventListener("focusin", g);
41
41
  }), ie(() => {
42
42
  document.removeEventListener("pointerdown", g), document.removeEventListener("focusin", g);
43
- }), { opened: l, root: n, trigger: t, panel: i, close: c, onKeydown: s };
43
+ }), { opened: t, root: l, trigger: n, panel: i, close: c, onKeydown: s };
44
44
  }
45
45
  const ae = {
46
46
  paramOptionsLoading: "正在搜索选项…",
@@ -90,8 +90,8 @@ const ae = {
90
90
  reviewNext: "下一页",
91
91
  reviewPage: "差异分页"
92
92
  };
93
- function xa(e) {
94
- return { ...de, ...Object.fromEntries(Object.entries(e).filter(([, l]) => l !== void 0)) };
93
+ function Ra(e) {
94
+ return { ...de, ...Object.fromEntries(Object.entries(e).filter(([, t]) => t !== void 0)) };
95
95
  }
96
96
  const ue = {
97
97
  calculationTitle: "选区计算",
@@ -131,14 +131,15 @@ const ue = {
131
131
  calculationErrorPrecision: "数值超出安全精度,或展示小数位不是 0 至 12 的整数。"
132
132
  };
133
133
  function Aa(e) {
134
- const l = { ...ue };
135
- for (const n of Object.keys(l)) {
136
- const t = e[n];
137
- typeof t == "string" && (l[n] = t);
134
+ const t = { ...ue };
135
+ for (const l of Object.keys(t)) {
136
+ const n = e[l];
137
+ typeof n == "string" && (t[l] = n);
138
138
  }
139
- return l;
139
+ return t;
140
140
  }
141
141
  const ke = {
142
+ previousSnapshot: "当前保留上次成功结果,刷新成功后恢复编辑和输出。",
142
143
  ...ae,
143
144
  ...de,
144
145
  reviewTools: "数据工具",
@@ -152,7 +153,7 @@ const ke = {
152
153
  drillOpening: "正在打开…",
153
154
  drillMissingValue: "当前单元格缺少关联参数",
154
155
  drillFailed: "关联内容打开失败,请重试",
155
- ...Ae,
156
+ ...Re,
156
157
  ...ue,
157
158
  exportMenu: "导出",
158
159
  exportMenuDescription: "选择文件格式",
@@ -325,10 +326,10 @@ const ke = {
325
326
  function $e(e = {}) {
326
327
  return { ...e, defaults: e.defaults ?? {}, presets: e.presets ?? {} };
327
328
  }
328
- function Ra(e) {
329
+ function ka(e) {
329
330
  return e;
330
331
  }
331
- const T = {
332
+ const L = {
332
333
  showExport: !0,
333
334
  showPrint: !0,
334
335
  showPdfWindow: !0,
@@ -337,201 +338,207 @@ const T = {
337
338
  gapPx: 18,
338
339
  pdfFontUrl: "/simhei.ttf",
339
340
  logger: console
340
- }, ka = { warn: () => {
341
+ }, Ma = { warn: () => {
341
342
  }, info: () => {
342
343
  } };
343
- function Fe(e, l) {
344
- if (!(!e && !l))
345
- return { ...e, ...l, calibration: { ...e?.calibration, ...l?.calibration } };
344
+ function Fe(e, t) {
345
+ if (!(!e && !t))
346
+ return { ...e, ...t, calibration: { ...e?.calibration, ...t?.calibration } };
346
347
  }
347
- function j(e, l) {
348
+ function Ie(e = {}, t = {}) {
349
+ const l = { ...e, ...t };
350
+ return (e.unavailableReasons || t.unavailableReasons) && (l.unavailableReasons = { ...e.unavailableReasons, ...t.unavailableReasons }), l;
351
+ }
352
+ function j(e, t) {
348
353
  return {
349
354
  ...e,
350
- ...l,
351
- theme: { ...e?.theme, ...l?.theme },
352
- messages: { ...e?.messages, ...l?.messages },
353
- preview: { ...e?.preview, ...l?.preview },
354
- xlsx: { ...e?.xlsx, ...l?.xlsx },
355
- toolbar: { ...e?.toolbar, ...l?.toolbar },
356
- interaction: { ...e?.interaction, ...l?.interaction },
357
- output: { ...e?.output, ...l?.output },
358
- printOptions: Fe(e?.printOptions, l?.printOptions)
355
+ ...t,
356
+ theme: { ...e?.theme, ...t?.theme },
357
+ messages: { ...e?.messages, ...t?.messages },
358
+ preview: { ...e?.preview, ...t?.preview },
359
+ xlsx: { ...e?.xlsx, ...t?.xlsx },
360
+ toolbar: Ie(e?.toolbar, t?.toolbar),
361
+ interaction: { ...e?.interaction, ...t?.interaction },
362
+ refresh: { ...e?.refresh, ...t?.refresh },
363
+ output: { ...e?.output, ...t?.output },
364
+ printOptions: Fe(e?.printOptions, t?.printOptions)
359
365
  };
360
366
  }
361
- function Ie(e) {
367
+ function De(e) {
362
368
  return {
363
- showExport: e.showExport ?? T.showExport,
364
- showPrint: e.showPrint ?? T.showPrint,
365
- showPdfWindow: e.showPdfWindow ?? T.showPdfWindow,
366
- showSettings: e.showSettings ?? T.showSettings,
367
- showParams: e.showParams ?? T.showParams,
368
- gapPx: e.gapPx ?? T.gapPx
369
+ showExport: e.showExport ?? L.showExport,
370
+ showPrint: e.showPrint ?? L.showPrint,
371
+ showPdfWindow: e.showPdfWindow ?? L.showPdfWindow,
372
+ showSettings: e.showSettings ?? L.showSettings,
373
+ showParams: e.showParams ?? L.showParams,
374
+ gapPx: e.gapPx ?? L.gapPx
369
375
  };
370
376
  }
371
- function Ma(e, l) {
372
- const n = l ? e?.presets?.[l] : e?.defaultPreset ? e?.presets?.[e.defaultPreset] : void 0, t = j(e?.defaults, n);
377
+ function $a(e, t) {
378
+ const l = t ? e?.presets?.[t] : e?.defaultPreset ? e?.presets?.[e.defaultPreset] : void 0, n = j(e?.defaults, l);
373
379
  return {
374
- drill: t.drill,
375
- prefill: t.prefill,
376
- dataComparison: t.dataComparison,
377
- exportExecution: t.exportExecution,
378
- loadParamOptions: t.loadParamOptions,
379
- ...Ie(t),
380
- pdfFontUrl: t.pdfFontUrl ?? T.pdfFontUrl,
381
- theme: { ...Me, ...t.theme },
382
- messages: { ...ke, ...t.messages },
383
- logger: t.logger ?? T.logger,
380
+ drill: n.drill,
381
+ prefill: n.prefill,
382
+ dataComparison: n.dataComparison,
383
+ exportExecution: n.exportExecution,
384
+ loadParamOptions: n.loadParamOptions,
385
+ ...De(n),
386
+ pdfFontUrl: n.pdfFontUrl ?? L.pdfFontUrl,
387
+ theme: { ...Me, ...n.theme },
388
+ messages: { ...ke, ...n.messages },
389
+ logger: n.logger ?? L.logger,
384
390
  preview: {
385
- overscanPages: re(t.preview?.overscanPages, 1, 10, !0),
386
- searchDebounceMs: re(t.preview?.searchDebounceMs, 200, 2e3)
391
+ overscanPages: re(n.preview?.overscanPages, 1, 10, !0),
392
+ searchDebounceMs: re(n.preview?.searchDebounceMs, 200, 2e3)
387
393
  },
388
- xlsx: { ...t.xlsx },
389
- editable: t.editable ?? !1,
390
- excelImport: t.excelImport ?? !1,
391
- toolbar: { ...t.toolbar },
392
- interaction: { ...t.interaction },
393
- preferences: t.preferences,
394
- assets: t.assets,
395
- guardChanges: t.guardChanges ?? !0,
396
- beforeDiscard: t.beforeDiscard,
397
- output: { ...t.output },
398
- printOptions: t.printOptions
394
+ xlsx: { ...n.xlsx },
395
+ editable: n.editable ?? !1,
396
+ excelImport: n.excelImport ?? !1,
397
+ toolbar: { ...n.toolbar },
398
+ interaction: { ...n.interaction },
399
+ preferences: n.preferences,
400
+ refresh: n.refresh,
401
+ assets: n.assets,
402
+ guardChanges: n.guardChanges ?? !0,
403
+ beforeDiscard: n.beforeDiscard,
404
+ output: { ...n.output },
405
+ printOptions: n.printOptions
399
406
  };
400
407
  }
401
- function re(e, l, n, t = !1) {
402
- if (e == null || !Number.isFinite(e)) return l;
403
- const i = Math.max(0, Math.min(n, e));
404
- return t ? Math.floor(i) : i;
405
- }
406
- function $a(e) {
407
- const l = {};
408
- return e.emptyAccent != null && (l["--mrp-empty-accent"] = e.emptyAccent), e.shellBg != null && (l["--mrp-shell-bg"] = e.shellBg), e.shellFg != null && (l["--mrp-shell-fg"] = e.shellFg), e.toolbarBg != null && (l["--mrp-toolbar-bg"] = e.toolbarBg), e.toolbarBorder != null && (l["--mrp-toolbar-border"] = e.toolbarBorder), e.toolbarFg != null && (l["--mrp-toolbar-fg"] = e.toolbarFg), e.btnFg != null && (l["--mrp-btn-fg"] = e.btnFg), e.btnBorder != null && (l["--mrp-btn-border"] = e.btnBorder), e.btnHoverBg != null && (l["--mrp-btn-hover-bg"] = e.btnHoverBg), e.btnHoverFg != null && (l["--mrp-btn-hover-fg"] = e.btnHoverFg), e.btnActiveBg != null && (l["--mrp-btn-active-bg"] = e.btnActiveBg), l;
408
+ function re(e, t, l, n = !1) {
409
+ if (e == null || !Number.isFinite(e)) return t;
410
+ const i = Math.max(0, Math.min(l, e));
411
+ return n ? Math.floor(i) : i;
409
412
  }
410
413
  function Fa(e) {
411
- const l = se(Q, null), n = E(() => {
412
- const t = l?.value ?? null, i = "defaults" in e || "presets" in e || "defaultPreset" in e ? $e(e) : { defaults: e, presets: {} };
413
- if (!t) return i;
414
- const c = { ...t.presets, ...i.presets };
414
+ const t = {};
415
+ return e.emptyAccent != null && (t["--mrp-empty-accent"] = e.emptyAccent), e.shellBg != null && (t["--mrp-shell-bg"] = e.shellBg), e.shellFg != null && (t["--mrp-shell-fg"] = e.shellFg), e.toolbarBg != null && (t["--mrp-toolbar-bg"] = e.toolbarBg), e.toolbarBorder != null && (t["--mrp-toolbar-border"] = e.toolbarBorder), e.toolbarFg != null && (t["--mrp-toolbar-fg"] = e.toolbarFg), e.btnFg != null && (t["--mrp-btn-fg"] = e.btnFg), e.btnBorder != null && (t["--mrp-btn-border"] = e.btnBorder), e.btnHoverBg != null && (t["--mrp-btn-hover-bg"] = e.btnHoverBg), e.btnHoverFg != null && (t["--mrp-btn-hover-fg"] = e.btnHoverFg), e.btnActiveBg != null && (t["--mrp-btn-active-bg"] = e.btnActiveBg), t;
416
+ }
417
+ function Ia(e) {
418
+ const t = se(Q, null), l = E(() => {
419
+ const n = t?.value ?? null, i = "defaults" in e || "presets" in e || "defaultPreset" in e ? $e(e) : { defaults: e, presets: {} };
420
+ if (!n) return i;
421
+ const c = { ...n.presets, ...i.presets };
415
422
  for (const g of Object.keys(c))
416
423
  c[g] = j(
417
- j(t.presets[g], i.defaults),
424
+ j(n.presets[g], i.defaults),
418
425
  i.presets[g]
419
426
  );
420
427
  return {
421
- defaults: j(t.defaults, i.defaults),
428
+ defaults: j(n.defaults, i.defaults),
422
429
  presets: c,
423
- defaultPreset: i.defaultPreset ?? t.defaultPreset
430
+ defaultPreset: i.defaultPreset ?? n.defaultPreset
424
431
  };
425
432
  });
426
- be(Q, n);
433
+ be(Q, l);
427
434
  }
428
- function Ia() {
435
+ function Da() {
429
436
  return se(Q, E(() => null));
430
437
  }
431
438
  class B extends Error {
432
- constructor(l, n, t) {
433
- super(n), this.name = "MachReportError", this.code = l, this.cause = t;
439
+ constructor(t, l, n) {
440
+ super(l), this.name = "MachReportError", this.code = t, this.cause = n;
434
441
  }
435
442
  }
436
- function Da(e) {
443
+ function qa(e) {
437
444
  return e instanceof B ? { code: e.code, cause: e.cause } : { code: "render", cause: e };
438
445
  }
439
- function qa(e) {
446
+ function Ta(e) {
440
447
  if (e instanceof B) return e;
441
448
  if (e instanceof we) return new B("param", e.message, e);
442
449
  if (e instanceof Ee) return new B(e.code, e.message, e.cause);
443
450
  if (e instanceof Error) {
444
- const l = { params: "param", config: "config", validate: "validate", fetch: "fetch" }, n = e.code;
445
- if (typeof n == "string" && Object.prototype.hasOwnProperty.call(l, n)) return new B(l[n], e.message, e);
451
+ const t = { params: "param", config: "config", validate: "validate", fetch: "fetch" }, l = e.code;
452
+ if (typeof l == "string" && Object.prototype.hasOwnProperty.call(t, l)) return new B(t[l], e.message, e);
446
453
  }
447
454
  return new B("fetch", e instanceof Error ? e.message : "预览加载失败", e);
448
455
  }
449
- let De = 0;
450
- function qe() {
451
- return `mrp-params-${++De}`;
456
+ let qe = 0;
457
+ function Te() {
458
+ return `mrp-params-${++qe}`;
452
459
  }
453
- function ce(e, l, n) {
454
- const t = (Array.isArray(l) ? l.find((i) => i?.field === e.field)?.label : void 0) ?? e.field;
455
- return e.code === "required" ? n.paramRequired.replace("{label}", t) : (n.paramInvalid ?? "{label}:{message}").replace("{label}", t).replace("{message}", e.message);
460
+ function ce(e, t, l) {
461
+ const n = (Array.isArray(t) ? t.find((i) => i?.field === e.field)?.label : void 0) ?? e.field;
462
+ return e.code === "required" ? l.paramRequired.replace("{label}", n) : (l.paramInvalid ?? "{label}:{message}").replace("{label}", n).replace("{message}", e.message);
456
463
  }
457
464
  function La(e) {
458
- const l = k({}), n = k(!1);
459
- function t() {
465
+ const t = k({}), l = k(!1);
466
+ function n() {
460
467
  const s = {};
461
468
  for (const d of Array.isArray(e.defs.value) ? e.defs.value : [])
462
469
  typeof d?.field == "string" && Object.defineProperty(s, d.field, { value: e.params()[d.field] ?? d.defaultValue ?? "", writable: !0, enumerable: !0, configurable: !0 });
463
- l.value = s, n.value = !1;
470
+ t.value = s, l.value = !1;
464
471
  }
465
- t(), D(e.defs, t), D(e.reportIds, t), D(() => JSON.stringify(e.params()), t);
466
- const i = E(() => oe(e.defs.value, { ...e.params(), ...l.value })), c = E(() => !n.value && i.value.issues.length > 0 && i.value.issues.every((s) => s.code === "required"));
472
+ n(), D(e.defs, n), D(e.reportIds, n), D(() => JSON.stringify(e.params()), n);
473
+ const i = E(() => oe(e.defs.value, { ...e.params(), ...t.value })), c = E(() => !l.value && i.value.issues.length > 0 && i.value.issues.every((s) => s.code === "required"));
467
474
  function g() {
468
475
  const s = i.value;
469
476
  if (!s.ok) {
470
477
  const y = s.issues[0];
471
478
  return { quiet: c.value, error: new B(y.code === "definition" ? "config" : "param", ce(y, e.defs.value, e.messages()), { issues: s.issues }) };
472
479
  }
473
- const d = { ...s.values }, R = new Set(e.defs.value.filter((y) => y.defaultValue !== void 0).map((y) => y.field));
474
- for (const [y, u] of Object.entries(d)) u === "" && !R.has(y) && delete d[y];
480
+ const d = { ...s.values }, A = new Set(e.defs.value.filter((y) => y.defaultValue !== void 0).map((y) => y.field));
481
+ for (const [y, u] of Object.entries(d)) u === "" && !A.has(y) && delete d[y];
475
482
  return { params: d, quiet: !1 };
476
483
  }
477
- return { values: l, attempted: n, validation: i, pendingRequired: c, reset: t, query: g };
484
+ return { values: t, attempted: l, validation: i, pendingRequired: c, reset: n, query: g };
478
485
  }
479
- const Z = 100, Le = 32, Te = 6e4, Ne = 15e3;
480
- function Be(e) {
481
- let l = 0;
482
- const n = /* @__PURE__ */ new Set();
483
- function t(i, c) {
486
+ const Z = 100, Le = 32, Ne = 6e4, Be = 15e3;
487
+ function Ue(e) {
488
+ let t = 0;
489
+ const l = /* @__PURE__ */ new Set();
490
+ function n(i, c) {
484
491
  if (!Array.isArray(i) || c > 16 || i.length > Z) throw new Error("Invalid option response");
485
492
  const g = /* @__PURE__ */ new Set();
486
493
  return Object.freeze(i.map((s) => {
487
- if (++l > Z || !s || n.has(s) || typeof s.value != "string" || !s.value || s.value.length > 1024 || typeof s.label != "string" || s.label.length > 1024 || g.has(s.value)) throw new Error("Invalid option response");
488
- return n.add(s), g.add(s.value), Object.freeze({ label: s.label, value: s.value, ...s.children === void 0 ? {} : { children: t(s.children, c + 1) } });
494
+ if (++t > Z || !s || l.has(s) || typeof s.value != "string" || !s.value || s.value.length > 1024 || typeof s.label != "string" || s.label.length > 1024 || g.has(s.value)) throw new Error("Invalid option response");
495
+ return l.add(s), g.add(s.value), Object.freeze({ label: s.label, value: s.value, ...s.children === void 0 ? {} : { children: n(s.children, c + 1) } });
489
496
  }));
490
497
  }
491
- return t(e, 1);
498
+ return n(e, 1);
492
499
  }
493
500
  function fe(e) {
494
- const l = k(""), n = ye([]), t = k(!1), i = k(!1), c = E(() => Object.fromEntries((Array.isArray(e.def().dependsOn) ? e.def().dependsOn : []).map((A) => [A, e.values()[A] ?? ""]))), g = E(() => Object.values(c.value).some((A) => !A.trim())), s = E(() => !e.loader()), d = /* @__PURE__ */ new Map();
495
- let R, y, u = 0;
501
+ const t = k(""), l = ye([]), n = k(!1), i = k(!1), c = E(() => Object.fromEntries((Array.isArray(e.def().dependsOn) ? e.def().dependsOn : []).map((R) => [R, e.values()[R] ?? ""]))), g = E(() => Object.values(c.value).some((R) => !R.trim())), s = E(() => !e.loader()), d = /* @__PURE__ */ new Map();
502
+ let A, y, u = 0;
496
503
  function h() {
497
- u++, R?.abort(), R = void 0, clearTimeout(y), t.value = !1;
504
+ u++, A?.abort(), A = void 0, clearTimeout(y), n.value = !1;
498
505
  }
499
506
  async function b() {
500
507
  h(), i.value = !1;
501
- const A = e.loader(), M = e.def();
502
- if (!A || !M.optionsSource || g.value || e.disabled() || !e.opened()) return;
503
- const F = { source: M.optionsSource, field: M.field, query: l.value.trim().slice(0, 256), params: Object.freeze({ ...c.value }), limit: Z }, r = JSON.stringify(F), p = d.get(r);
504
- if (p && Date.now() - p.at < Te) {
505
- d.delete(r), d.set(r, p), n.value = p.options;
508
+ const R = e.loader(), M = e.def();
509
+ if (!R || !M.optionsSource || g.value || e.disabled() || !e.opened()) return;
510
+ const F = { source: M.optionsSource, field: M.field, query: t.value.trim().slice(0, 256), params: Object.freeze({ ...c.value }), limit: Z }, r = JSON.stringify(F), p = d.get(r);
511
+ if (p && Date.now() - p.at < Ne) {
512
+ d.delete(r), d.set(r, p), l.value = p.options;
506
513
  return;
507
514
  }
508
515
  const a = u, o = new AbortController();
509
- R = o, t.value = !0;
510
- const S = setTimeout(() => o.abort(), Ne);
516
+ A = o, n.value = !0;
517
+ const S = setTimeout(() => o.abort(), Be);
511
518
  try {
512
- const O = Be(await xe(A(Object.freeze({ ...F, signal: o.signal })), o.signal));
519
+ const O = Ue(await xe(R(Object.freeze({ ...F, signal: o.signal })), o.signal));
513
520
  if (a !== u) return;
514
- for (n.value = O, d.delete(r), d.set(r, { at: Date.now(), options: O }); d.size > Le; ) d.delete(d.keys().next().value);
521
+ for (l.value = O, d.delete(r), d.set(r, { at: Date.now(), options: O }); d.size > Le; ) d.delete(d.keys().next().value);
515
522
  } catch {
516
523
  a === u && (i.value = !0);
517
524
  } finally {
518
- clearTimeout(S), a === u && (t.value = !1, R = void 0);
525
+ clearTimeout(S), a === u && (n.value = !1, A = void 0);
519
526
  }
520
527
  }
521
528
  function C() {
522
- h(), n.value = [], i.value = !1, y = setTimeout(() => {
529
+ h(), l.value = [], i.value = !1, y = setTimeout(() => {
523
530
  b();
524
531
  }, 180);
525
532
  }
526
- return D(l, C, { flush: "sync" }), D([() => e.def().field, () => e.def().type, () => e.def().optionsSource, () => JSON.stringify(c.value), e.loader], () => {
527
- d.clear(), l.value = "", h(), n.value = [], i.value = !1, e.opened() && b();
533
+ return D(t, C, { flush: "sync" }), D([() => e.def().field, () => e.def().type, () => e.def().optionsSource, () => JSON.stringify(c.value), e.loader], () => {
534
+ d.clear(), t.value = "", h(), l.value = [], i.value = !1, e.opened() && b();
528
535
  }, { flush: "sync" }), D([e.opened, e.disabled], () => {
529
536
  !e.opened() || e.disabled() ? h() : b();
530
537
  }, { immediate: !0 }), ie(() => {
531
538
  h(), d.clear();
532
- }), { query: l, options: n, loading: t, failed: i, waiting: g, missingLoader: s, request: b, cancel: h };
539
+ }), { query: t, options: l, loading: n, failed: i, waiting: g, missingLoader: s, request: b, cancel: h };
533
540
  }
534
- const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-invalid", "aria-describedby", "aria-required", "onChange"], Ve = { value: "" }, je = ["value"], Ge = ["id"], ze = /* @__PURE__ */ _({
541
+ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-invalid", "aria-describedby", "aria-required", "onChange"], je = { value: "" }, Ge = ["value"], ze = ["id"], Je = /* @__PURE__ */ _({
535
542
  __name: "ReportCascaderParam",
536
543
  props: {
537
544
  def: {},
@@ -544,29 +551,29 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
544
551
  invalid: { type: Boolean }
545
552
  },
546
553
  emits: ["change"],
547
- setup(e, { emit: l }) {
548
- const n = e, t = l, i = fe({ def: () => n.def, values: () => n.values, loader: () => n.loadOptions, opened: () => !0, disabled: () => n.disabled === !0 }), c = E(() => {
549
- const y = Se(n.value);
554
+ setup(e, { emit: t }) {
555
+ const l = e, n = t, i = fe({ def: () => l.def, values: () => l.values, loader: () => l.loadOptions, opened: () => !0, disabled: () => l.disabled === !0 }), c = E(() => {
556
+ const y = Se(l.value);
550
557
  if (y) return y;
551
558
  try {
552
- const u = JSON.parse(n.value);
559
+ const u = JSON.parse(l.value);
553
560
  return Array.isArray(u) && u.length <= 16 && u[u.length - 1] === null && u.slice(0, -1).every((h) => typeof h == "string") ? u.slice(0, -1) : [];
554
561
  } catch {
555
562
  return [];
556
563
  }
557
- }), g = E(() => ({ ...ae, ...n.messages })), s = E(() => {
564
+ }), g = E(() => ({ ...ae, ...l.messages })), s = E(() => {
558
565
  const y = [];
559
- let u = n.def.optionsSource ? i.options.value : n.def.options ?? [];
566
+ let u = l.def.optionsSource ? i.options.value : l.def.options ?? [];
560
567
  for (let h = 0; h < 16 && u.length; h++)
561
568
  y.push(u), u = u.find((b) => b.value === c.value[h])?.children ?? [];
562
569
  return y;
563
- }), d = E(() => n.def.optionsSource ? i.waiting.value ? g.value.paramOptionsDependencies : i.missingLoader.value ? g.value.paramOptionsMissingLoader : i.failed.value ? g.value.paramOptionsFailed : i.loading.value ? g.value.paramOptionsLoading : s.value.length ? "" : g.value.paramOptionsEmpty : "");
564
- function R(y, u) {
565
- if (n.disabled) return;
570
+ }), d = E(() => l.def.optionsSource ? i.waiting.value ? g.value.paramOptionsDependencies : i.missingLoader.value ? g.value.paramOptionsMissingLoader : i.failed.value ? g.value.paramOptionsFailed : i.loading.value ? g.value.paramOptionsLoading : s.value.length ? "" : g.value.paramOptionsEmpty : "");
571
+ function A(y, u) {
572
+ if (l.disabled) return;
566
573
  const h = c.value.slice(0, y);
567
574
  u && h.push(u);
568
575
  const b = u ? s.value[y]?.find((C) => C.value === u)?.children : s.value[y];
569
- t("change", h.length ? b?.length ? JSON.stringify([...h, null]) : Pe(h) : "");
576
+ n("change", h.length ? b?.length ? JSON.stringify([...h, null]) : Pe(h) : "");
570
577
  }
571
578
  return (y, u) => (f(), m("div", {
572
579
  class: "mrp-cascader",
@@ -582,14 +589,14 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
582
589
  "aria-invalid": e.invalid || void 0,
583
590
  "aria-describedby": e.invalid ? `${e.id}-error` : d.value ? `${e.id}-status` : void 0,
584
591
  "aria-required": e.def.required || void 0,
585
- onChange: (C) => R(b, C.target.value)
592
+ onChange: (C) => A(b, C.target.value)
586
593
  }, [
587
- q("option", Ve, x(e.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", e.def.label ?? e.def.field)), 1),
594
+ q("option", je, x(e.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", e.def.label ?? e.def.field)), 1),
588
595
  (f(!0), m(U, null, H(h, (C) => (f(), m("option", {
589
596
  key: C.value,
590
597
  value: C.value
591
- }, x(C.label), 9, je))), 128))
592
- ], 40, He))), 128)),
598
+ }, x(C.label), 9, Ge))), 128))
599
+ ], 40, Ve))), 128)),
593
600
  d.value ? (f(), m("small", {
594
601
  key: 0,
595
602
  id: `${e.id}-status`,
@@ -602,17 +609,17 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
602
609
  onClick: u[0] || (u[0] = //@ts-ignore
603
610
  (...h) => w(i).request && w(i).request(...h))
604
611
  }, x(e.messages.retry), 1)) : I("", !0)
605
- ], 8, Ge)) : I("", !0)
606
- ], 8, Ue));
612
+ ], 8, ze)) : I("", !0)
613
+ ], 8, He));
607
614
  }
608
- }), Je = /* @__PURE__ */ ee(ze, [["__scopeId", "data-v-734dde49"]]), We = ["id", "value", "aria-labelledby", "aria-invalid", "aria-required", "aria-describedby", "aria-expanded", "aria-controls", "aria-activedescendant", "disabled", "placeholder"], Ke = ["aria-label", "disabled"], Xe = ["aria-label", "disabled"], Ye = ["id"], Qe = ["id", "aria-label", "aria-busy", "aria-multiselectable"], Ze = ["id", "aria-selected", "disabled", "onPointermove", "onClick"], _e = {
615
+ }), We = /* @__PURE__ */ ee(Je, [["__scopeId", "data-v-734dde49"]]), Ke = ["id", "value", "aria-labelledby", "aria-invalid", "aria-required", "aria-describedby", "aria-expanded", "aria-controls", "aria-activedescendant", "disabled", "placeholder"], Xe = ["aria-label", "disabled"], Ye = ["aria-label", "disabled"], Qe = ["id"], Ze = ["id", "aria-label", "aria-busy", "aria-multiselectable"], _e = ["id", "aria-selected", "disabled", "onPointermove", "onClick"], ea = {
609
616
  key: 0,
610
617
  "aria-hidden": "true",
611
618
  class: "mrp-option-check"
612
- }, ea = { key: 0 }, aa = {
619
+ }, aa = { key: 0 }, ta = {
613
620
  key: 0,
614
621
  role: "status"
615
- }, ta = /* @__PURE__ */ _({
622
+ }, la = /* @__PURE__ */ _({
616
623
  __name: "ReportRemoteParamSelect",
617
624
  props: {
618
625
  def: {},
@@ -625,37 +632,37 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
625
632
  invalid: { type: Boolean }
626
633
  },
627
634
  emits: ["change"],
628
- setup(e, { emit: l }) {
629
- const n = e, t = l, i = Re({ focusOnOpen: !1 }), { root: c, panel: g, opened: s } = i, d = fe({ def: () => n.def, values: () => n.values, loader: () => n.loadOptions, opened: () => s.value, disabled: () => n.disabled === !0 }), { query: R, options: y, loading: u, failed: h, waiting: b, missingLoader: C } = d, A = E(() => ({ ...ae, ...n.messages })), M = E(() => n.def.type === "multiSelect"), F = E(() => M.value ? Ce(n.value) ?? [] : [n.value]), r = E(() => n.def.optionsSource ? y.value : (n.def.options ?? []).filter((v) => `${v.label} ${v.value}`.toLocaleLowerCase().includes(R.value.toLocaleLowerCase())).slice(0, 100)), p = /* @__PURE__ */ new Map(), a = E(() => M.value ? F.value.map((v) => p.get(v) ?? n.def.options?.find((P) => P.value === v)?.label ?? v).join("、") : S.value || n.value), o = k(0), S = k(""), O = k(), N = E(() => `${n.id}-options`), L = E(() => b.value ? A.value.paramOptionsDependencies : n.def.optionsSource && C.value ? A.value.paramOptionsMissingLoader : h.value ? A.value.paramOptionsFailed : u.value ? A.value.paramOptionsLoading : r.value.length ? "" : A.value.paramOptionsEmpty);
630
- D(() => n.value, () => {
635
+ setup(e, { emit: t }) {
636
+ const l = e, n = t, i = Ae({ focusOnOpen: !1 }), { root: c, panel: g, opened: s } = i, d = fe({ def: () => l.def, values: () => l.values, loader: () => l.loadOptions, opened: () => s.value, disabled: () => l.disabled === !0 }), { query: A, options: y, loading: u, failed: h, waiting: b, missingLoader: C } = d, R = E(() => ({ ...ae, ...l.messages })), M = E(() => l.def.type === "multiSelect"), F = E(() => M.value ? Ce(l.value) ?? [] : [l.value]), r = E(() => l.def.optionsSource ? y.value : (l.def.options ?? []).filter((v) => `${v.label} ${v.value}`.toLocaleLowerCase().includes(A.value.toLocaleLowerCase())).slice(0, 100)), p = /* @__PURE__ */ new Map(), a = E(() => M.value ? F.value.map((v) => p.get(v) ?? l.def.options?.find((P) => P.value === v)?.label ?? v).join("、") : S.value || l.value), o = k(0), S = k(""), O = k(), N = E(() => `${l.id}-options`), T = E(() => b.value ? R.value.paramOptionsDependencies : l.def.optionsSource && C.value ? R.value.paramOptionsMissingLoader : h.value ? R.value.paramOptionsFailed : u.value ? R.value.paramOptionsLoading : r.value.length ? "" : R.value.paramOptionsEmpty);
637
+ D(() => l.value, () => {
631
638
  S.value = "";
632
639
  }), D(r, () => {
633
640
  o.value = 0;
634
- }), D(() => [n.def.field, n.def.optionsSource, JSON.stringify(n.def.options)], () => {
641
+ }), D(() => [l.def.field, l.def.optionsSource, JSON.stringify(l.def.options)], () => {
635
642
  p.clear(), S.value = "";
636
643
  }), D(s, (v) => {
637
644
  v && V(() => O.value?.focus());
638
645
  });
639
646
  function te(v) {
640
- if (!(n.disabled || b.value || u.value || h.value)) {
647
+ if (!(l.disabled || b.value || u.value || h.value)) {
641
648
  p.set(v.value, v.label);
642
649
  for (const P of p.keys()) P !== v.value && !F.value.includes(P) && p.delete(P);
643
650
  if (M.value) {
644
651
  const P = F.value.includes(v.value) ? F.value.filter(($) => $ !== v.value) : [...F.value, v.value];
645
- if (P.length > Math.min(n.def.maxItems ?? 100, 100)) return;
646
- t("change", P.length ? Oe(P) : "");
652
+ if (P.length > Math.min(l.def.maxItems ?? 100, 100)) return;
653
+ n("change", P.length ? Oe(P) : "");
647
654
  } else
648
- t("change", v.value), i.close();
655
+ n("change", v.value), i.close();
649
656
  V(() => {
650
657
  S.value = v.label, O.value?.focus();
651
658
  });
652
659
  }
653
660
  }
654
661
  function le(v) {
655
- v.isComposing || (s.value = !0, R.value = v.target.value);
662
+ v.isComposing || (s.value = !0, A.value = v.target.value);
656
663
  }
657
664
  function z() {
658
- !n.disabled && !b.value && (!n.def.optionsSource || !C.value) && (R.value = "", s.value = !0);
665
+ !l.disabled && !b.value && (!l.def.optionsSource || !C.value) && (A.value = "", s.value = !0);
659
666
  }
660
667
  function pe(v) {
661
668
  if (!(v.isComposing || v.keyCode === 229)) {
@@ -678,7 +685,7 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
678
685
  }
679
686
  }
680
687
  function ve() {
681
- n.disabled || (t("change", ""), S.value = "", i.close());
688
+ l.disabled || (n("change", ""), S.value = "", i.close());
682
689
  }
683
690
  return (v, P) => (f(), m("div", {
684
691
  ref_key: "root",
@@ -699,7 +706,7 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
699
706
  type: "text",
700
707
  role: "combobox",
701
708
  autocomplete: "off",
702
- value: w(s) ? w(R) : a.value,
709
+ value: w(s) ? w(A) : a.value,
703
710
  maxlength: 256,
704
711
  "aria-labelledby": `${e.id}-label`,
705
712
  "aria-invalid": e.invalid || void 0,
@@ -715,11 +722,11 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
715
722
  onInput: le,
716
723
  onCompositionend: le,
717
724
  onKeydown: pe
718
- }, null, 40, We),
725
+ }, null, 40, Ke),
719
726
  e.value ? (f(), m("button", {
720
727
  key: 0,
721
728
  type: "button",
722
- "aria-label": A.value.paramOptionsClear,
729
+ "aria-label": R.value.paramOptionsClear,
723
730
  disabled: e.disabled,
724
731
  onClick: ve
725
732
  }, [
@@ -727,7 +734,7 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
727
734
  name: "close",
728
735
  size: 12
729
736
  })
730
- ], 8, Ke)) : (f(), m("button", {
737
+ ], 8, Xe)) : (f(), m("button", {
731
738
  key: 1,
732
739
  type: "button",
733
740
  "aria-label": e.def.label ?? e.def.field,
@@ -738,13 +745,13 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
738
745
  name: "chevron-down",
739
746
  size: 12
740
747
  })
741
- ], 8, Xe))
748
+ ], 8, Ye))
742
749
  ], 2),
743
750
  w(b) || e.def.optionsSource && w(C) ? (f(), m("small", {
744
751
  key: 0,
745
752
  id: `${e.id}-remote-status`,
746
753
  role: "status"
747
- }, x(L.value), 9, Ye)) : I("", !0),
754
+ }, x(T.value), 9, Qe)) : I("", !0),
748
755
  w(s) ? (f(), m("div", {
749
756
  key: 1,
750
757
  ref_key: "panel",
@@ -773,14 +780,14 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
773
780
  onClick: (me) => te($)
774
781
  }, [
775
782
  q("span", null, [
776
- M.value ? (f(), m("span", _e, x(F.value.includes($.value) ? "✓" : ""), 1)) : I("", !0),
783
+ M.value ? (f(), m("span", ea, x(F.value.includes($.value) ? "✓" : ""), 1)) : I("", !0),
777
784
  G(x($.label), 1)
778
785
  ]),
779
- $.label !== $.value ? (f(), m("small", ea, x($.value), 1)) : I("", !0)
780
- ], 42, Ze))), 128))
781
- ], 8, Qe),
782
- L.value ? (f(), m("p", aa, [
783
- G(x(L.value), 1),
786
+ $.label !== $.value ? (f(), m("small", aa, x($.value), 1)) : I("", !0)
787
+ ], 42, _e))), 128))
788
+ ], 8, Ze),
789
+ T.value ? (f(), m("p", ta, [
790
+ G(x(T.value), 1),
784
791
  w(h) ? (f(), m("button", {
785
792
  key: 0,
786
793
  type: "button",
@@ -791,17 +798,17 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
791
798
  ], 512)) : I("", !0)
792
799
  ], 512));
793
800
  }
794
- }), la = /* @__PURE__ */ ee(ta, [["__scopeId", "data-v-6ad41cf4"]]), na = {
801
+ }), na = /* @__PURE__ */ ee(la, [["__scopeId", "data-v-6ad41cf4"]]), ra = {
795
802
  key: 0,
796
803
  class: "mrp-params-title"
797
- }, ra = { class: "mrp-params-grid" }, ia = ["id"], sa = {
804
+ }, ia = { class: "mrp-params-grid" }, sa = ["id"], oa = {
798
805
  key: 0,
799
806
  class: "mrp-param-star",
800
807
  "aria-hidden": "true"
801
- }, oa = ["value", "disabled", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onChange"], da = ["disabled", "hidden"], ua = ["value"], ca = ["aria-labelledby"], fa = ["type", "step", "value", "disabled", "min", "max", "aria-label", "aria-invalid", "aria-describedby", "aria-required", "onInput"], pa = ["type", "inputmode", "maxlength", "placeholder", "value", "disabled", "min", "max", "step", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onInput"], va = ["id"], ma = {
808
+ }, da = ["value", "disabled", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onChange"], ua = ["disabled", "hidden"], ca = ["value"], fa = ["aria-labelledby"], pa = ["type", "step", "value", "disabled", "min", "max", "aria-label", "aria-invalid", "aria-describedby", "aria-required", "onInput"], va = ["type", "inputmode", "maxlength", "placeholder", "value", "disabled", "min", "max", "step", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onInput"], ma = ["id"], ga = {
802
809
  key: 1,
803
810
  class: "mrp-params-actions"
804
- }, ga = ["disabled"], ba = ["disabled"], ya = /* @__PURE__ */ _({
811
+ }, ba = ["disabled"], ya = ["disabled"], ha = /* @__PURE__ */ _({
805
812
  __name: "ReportParamPanel",
806
813
  props: {
807
814
  defs: {},
@@ -815,32 +822,32 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
815
822
  loadOptions: { type: Function, default: void 0 }
816
823
  },
817
824
  emits: ["update:modelValue", "query", "reset"],
818
- setup(e, { expose: l, emit: n }) {
819
- const t = e, i = n, c = k({ ...t.modelValue }), g = k(null), s = qe();
825
+ setup(e, { expose: t, emit: l }) {
826
+ const n = e, i = l, c = k({ ...n.modelValue }), g = k(null), s = Te();
820
827
  D(
821
- () => t.modelValue,
828
+ () => n.modelValue,
822
829
  (r) => {
823
830
  c.value = { ...r };
824
831
  }
825
832
  );
826
- const d = E(() => t.issues ?? oe(t.defs, c.value).issues), R = E(
827
- () => (Array.isArray(t.defs) ? t.defs : []).filter((r) => r && typeof r.field == "string").map((r, p) => ({
833
+ const d = E(() => n.issues ?? oe(n.defs, c.value).issues), A = E(
834
+ () => (Array.isArray(n.defs) ? n.defs : []).filter((r) => r && typeof r.field == "string").map((r, p) => ({
828
835
  def: r,
829
836
  id: `${s}-${p}`,
830
837
  label: r.label ?? r.field,
831
838
  value: c.value[r.field] ?? "",
832
- error: t.attempted ? d.value.find((a) => a.field === r.field) : void 0
839
+ error: n.attempted ? d.value.find((a) => a.field === r.field) : void 0
833
840
  }))
834
841
  ), y = E(() => {
835
842
  const r = /* @__PURE__ */ new Map();
836
- for (const p of t.defs) for (const a of Array.isArray(p.dependsOn) ? p.dependsOn : []) {
843
+ for (const p of n.defs) for (const a of Array.isArray(p.dependsOn) ? p.dependsOn : []) {
837
844
  const o = r.get(a) ?? [];
838
845
  o.push(p.field), r.set(a, o);
839
846
  }
840
847
  return r;
841
848
  });
842
849
  function u(r, p) {
843
- if (t.disabled || c.value[r] === p) return;
850
+ if (n.disabled || c.value[r] === p) return;
844
851
  c.value = { ...c.value, [r]: p };
845
852
  const a = /* @__PURE__ */ new Set([r]), o = [r];
846
853
  for (let S = 0; S < o.length; S++) for (const O of y.value.get(o[S]) ?? [])
@@ -862,11 +869,11 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
862
869
  function C(r, p, a) {
863
870
  return a ? !!b(r, 0) != !!b(r, 1) ? !b(r, p) || void 0 : !0 : void 0;
864
871
  }
865
- function A(r, p, a) {
872
+ function R(r, p, a) {
866
873
  const o = r.type === "numberRange", S = c.value[r.field] ?? "", O = [b(S, 0, o), b(S, 1, o)];
867
874
  O[p] = a;
868
- const N = o ? JSON.stringify(O.map((L) => L === "" ? null : Number(L))) : O.join("/");
869
- u(r.field, O.every((L) => !L) ? "" : N);
875
+ const N = o ? JSON.stringify(O.map((T) => T === "" ? null : Number(T))) : O.join("/");
876
+ u(r.field, O.every((T) => !T) ? "" : N);
870
877
  }
871
878
  function M(r) {
872
879
  r.isComposing || i("query");
@@ -874,14 +881,14 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
874
881
  function F() {
875
882
  g.value?.querySelector('[aria-invalid="true"]')?.focus();
876
883
  }
877
- return l({ focusInvalid: F }), (r, p) => (f(), m("div", {
884
+ return t({ focusInvalid: F }), (r, p) => (f(), m("div", {
878
885
  ref_key: "root",
879
886
  ref: g,
880
887
  class: "mrp-params"
881
888
  }, [
882
- e.showTitle !== !1 ? (f(), m("span", na, x(e.messages.paramsTitle), 1)) : I("", !0),
883
- q("div", ra, [
884
- (f(!0), m(U, null, H(R.value, (a) => (f(), m("label", {
889
+ e.showTitle !== !1 ? (f(), m("span", ra, x(e.messages.paramsTitle), 1)) : I("", !0),
890
+ q("div", ia, [
891
+ (f(!0), m(U, null, H(A.value, (a) => (f(), m("label", {
885
892
  key: a.id,
886
893
  class: Y(["mrp-param", { "mrp-param-missing": !!a.error }])
887
894
  }, [
@@ -890,9 +897,9 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
890
897
  class: "mrp-param-label"
891
898
  }, [
892
899
  G(x(a.label), 1),
893
- a.def.required ? (f(), m("i", sa, "*")) : I("", !0)
894
- ], 8, ia),
895
- a.def.type === "cascader" ? (f(), ne(Je, {
900
+ a.def.required ? (f(), m("i", oa, "*")) : I("", !0)
901
+ ], 8, sa),
902
+ a.def.type === "cascader" ? (f(), ne(We, {
896
903
  key: 0,
897
904
  id: a.id,
898
905
  def: a.def,
@@ -903,7 +910,7 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
903
910
  disabled: e.disabled,
904
911
  invalid: !!a.error,
905
912
  onChange: (o) => u(a.def.field, o)
906
- }, null, 8, ["id", "def", "value", "values", "load-options", "messages", "disabled", "invalid", "onChange"])) : a.def.optionsSource || a.def.type === "multiSelect" ? (f(), ne(la, {
913
+ }, null, 8, ["id", "def", "value", "values", "load-options", "messages", "disabled", "invalid", "onChange"])) : a.def.optionsSource || a.def.type === "multiSelect" ? (f(), ne(na, {
907
914
  key: 1,
908
915
  id: a.id,
909
916
  def: a.def,
@@ -930,12 +937,12 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
930
937
  value: "",
931
938
  disabled: a.def.required,
932
939
  hidden: a.def.required
933
- }, x(a.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", a.label)), 9, da),
940
+ }, x(a.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", a.label)), 9, ua),
934
941
  (f(!0), m(U, null, H(a.def.options ?? [], (o) => (f(), m("option", {
935
942
  key: o.value,
936
943
  value: o.value
937
- }, x(o.label), 9, ua))), 128))
938
- ], 40, oa)) : a.def.type === "dateRange" || a.def.type === "numberRange" ? (f(), m("div", {
944
+ }, x(o.label), 9, ca))), 128))
945
+ ], 40, da)) : a.def.type === "dateRange" || a.def.type === "numberRange" ? (f(), m("div", {
939
946
  key: 3,
940
947
  class: "mrp-param-range",
941
948
  role: "group",
@@ -954,10 +961,10 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
954
961
  "aria-invalid": a.def.type === "numberRange" ? !!a.error || void 0 : C(a.value, S, a.error),
955
962
  "aria-describedby": a.error ? `${a.id}-error` : void 0,
956
963
  "aria-required": a.def.required || void 0,
957
- onInput: (O) => A(a.def, S, O.target.value),
964
+ onInput: (O) => R(a.def, S, O.target.value),
958
965
  onKeydown: K(M, ["enter"])
959
- }, null, 40, fa))), 128))
960
- ], 8, ca)) : (f(), m("input", {
966
+ }, null, 40, pa))), 128))
967
+ ], 8, fa)) : (f(), m("input", {
961
968
  key: 4,
962
969
  class: "mrp-param-input",
963
970
  type: h(a.def),
@@ -975,54 +982,54 @@ const Ue = ["aria-labelledby"], He = ["value", "disabled", "aria-label", "aria-i
975
982
  "aria-required": a.def.required || void 0,
976
983
  onInput: (o) => u(a.def.field, o.target.value),
977
984
  onKeydown: K(M, ["enter"])
978
- }, null, 40, pa)),
985
+ }, null, 40, va)),
979
986
  a.error ? (f(), m("small", {
980
987
  key: 5,
981
988
  id: `${a.id}-error`,
982
989
  class: "mrp-param-error",
983
990
  role: "status"
984
- }, x(w(ce)(a.error, e.defs, e.messages)), 9, va)) : I("", !0)
991
+ }, x(w(ce)(a.error, e.defs, e.messages)), 9, ma)) : I("", !0)
985
992
  ], 2))), 128))
986
993
  ]),
987
- e.showActions !== !1 ? (f(), m("div", ma, [
994
+ e.showActions !== !1 ? (f(), m("div", ga, [
988
995
  q("button", {
989
996
  class: "mrp-nav mrp-param-query",
990
997
  type: "button",
991
998
  disabled: e.disabled,
992
999
  onClick: p[0] || (p[0] = (a) => r.$emit("query"))
993
- }, x(e.messages.query), 9, ga),
1000
+ }, x(e.messages.query), 9, ba),
994
1001
  q("button", {
995
1002
  class: "mrp-nav",
996
1003
  type: "button",
997
1004
  disabled: e.disabled,
998
1005
  onClick: p[1] || (p[1] = (a) => r.$emit("reset"))
999
- }, x(e.messages.reset), 9, ba)
1006
+ }, x(e.messages.reset), 9, ya)
1000
1007
  ])) : I("", !0)
1001
1008
  ], 512));
1002
1009
  }
1003
- }), Ta = /* @__PURE__ */ ee(ya, [["__scopeId", "data-v-e74206d7"]]);
1010
+ }), Na = /* @__PURE__ */ ee(ha, [["__scopeId", "data-v-e74206d7"]]);
1004
1011
  export {
1005
1012
  ue as D,
1006
1013
  B as M,
1007
1014
  ae as P,
1008
- Ta as R,
1009
- ka as S,
1015
+ Na as R,
1016
+ Ma as S,
1010
1017
  de as a,
1011
1018
  ke as b,
1012
- Ae as c,
1019
+ Re as c,
1013
1020
  Me as d,
1014
1021
  $e as e,
1015
- Ra as f,
1016
- Fa as g,
1017
- Ma as h,
1018
- xa as i,
1019
- Da as j,
1020
- Re as k,
1022
+ ka as f,
1023
+ Ia as g,
1024
+ $a as h,
1025
+ Ra as i,
1026
+ qa as j,
1027
+ Ae as k,
1021
1028
  La as l,
1022
- qa as n,
1023
- Ca as p,
1029
+ Ta as n,
1030
+ Oa as p,
1024
1031
  Aa as r,
1025
- Oa as s,
1026
- $a as t,
1027
- Ia as u
1032
+ xa as s,
1033
+ Fa as t,
1034
+ Da as u
1028
1035
  };