@agile-team/mach-report 2.26.1 → 2.27.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 (155) hide show
  1. package/README.md +16 -5
  2. package/dist/ExcelBindingWizard-CnjjpYxD.cjs +1 -0
  3. package/dist/{ExcelBindingWizard-Bzndrp_z.js → ExcelBindingWizard-DAprCgn-.js} +4 -4
  4. package/dist/{ParamEditor-BrUrInJH.js → ParamEditor-CY9d8QZD.js} +3 -3
  5. package/dist/ParamEditor-CiVjpbc-.cjs +1 -0
  6. package/dist/ReportBatchPanel-0-Oymcdm.cjs +1 -0
  7. package/dist/{ReportBatchPanel-2mXS1uol.js → ReportBatchPanel-CDp7xRHp.js} +4 -4
  8. package/dist/ReportLabelStudio-CsyHqBco.cjs +1 -0
  9. package/dist/{ReportLabelStudio-BUKNmYUY.js → ReportLabelStudio-DtKxk9n0.js} +4 -4
  10. package/dist/ReportParamPanel-CoKcXzSy.cjs +1 -0
  11. package/dist/{ReportParamPanel-Czm3OPo_.js → ReportParamPanel-jKDJVar2.js} +2 -2
  12. package/dist/ReportPreview-D0UTiSpz.js +7507 -0
  13. package/dist/ReportPreview-ratPQxxZ.cjs +6 -0
  14. package/dist/ReportTemplateLibrary-CsUm6edm.cjs +1 -0
  15. package/dist/{ReportTemplateLibrary-ovj03u0F.js → ReportTemplateLibrary-qPQX0Dt_.js} +2 -2
  16. package/dist/RuleEditor-CJBibiLY.cjs +1 -0
  17. package/dist/{RuleEditor-4JTKq_N7.js → RuleEditor-Di-JZ2Lb.js} +6 -6
  18. package/dist/{TemplateOutlinePanel-DfFRc91I.js → TemplateOutlinePanel-D0mKfVWf.js} +3 -3
  19. package/dist/TemplateOutlinePanel-RiRgXnnH.cjs +1 -0
  20. package/dist/TemplateReusePanel-BdK91T7z.cjs +1 -0
  21. package/dist/{TemplateReusePanel-CmX1rq69.js → TemplateReusePanel-J6PvD2Sf.js} +3 -3
  22. package/dist/TemplateReviewPanel-B5yUgOgb.cjs +1 -0
  23. package/dist/{TemplateReviewPanel-BKMo7Qd7.js → TemplateReviewPanel-BlUbD2GY.js} +3 -3
  24. package/dist/analytics.cjs +1 -1
  25. package/dist/analytics.js +5 -5
  26. package/dist/artifact-integrity.json +112 -114
  27. package/dist/assets-CylgPA6P.cjs +1 -0
  28. package/dist/assets-Vt10jCtl.js +136 -0
  29. package/dist/auto-D3UNXBrM.cjs +1 -0
  30. package/dist/{auto-C7udkeAa.js → auto-Hq-xgrvS.js} +28 -25
  31. package/dist/{batch-DGCt44XM.js → batch-Be_NbW7U.js} +1 -1
  32. package/dist/{batch-DYcokH4v.cjs → batch-CI4ZpuoX.cjs} +1 -1
  33. package/dist/{charts-D-Vg-ak9.cjs → charts-Cy7muNWi.cjs} +1 -1
  34. package/dist/{charts-D48XCefN.js → charts-DLTz0OEG.js} +1 -1
  35. package/dist/{computed-BQgBrma-.cjs → computed-8nFyVnok.cjs} +1 -1
  36. package/dist/{computed-CH3NYPOW.js → computed-BR_O8uAv.js} +14 -20
  37. package/dist/{data-bar-DzceAVeR.cjs → data-bar--_aPWr-W.cjs} +1 -1
  38. package/dist/{data-bar-DjOgTLqu.js → data-bar-BVnzVbE9.js} +1 -1
  39. package/dist/designer-Bc5AXS38.cjs +2 -0
  40. package/dist/designer-CZqnLTyE.js +8350 -0
  41. package/dist/designer.cjs +1 -1
  42. package/dist/designer.d.cts +108 -1
  43. package/dist/designer.d.ts +108 -1
  44. package/dist/designer.js +1 -1
  45. package/dist/{diagnostic-collector-C-JBA016.js → diagnostic-collector-CZ8DV6wA.js} +208 -186
  46. package/dist/diagnostic-collector-DwMJWEHo.cjs +1 -0
  47. package/dist/{dom-DgWc-DY1.js → dom-CbOWY7KE.js} +5 -5
  48. package/dist/dom-VuLh_fhL.cjs +1 -0
  49. package/dist/{encoding-tWc2Wn89.cjs → encoding-D0ITsCCp.cjs} +1 -1
  50. package/dist/{encoding-D480EM2r.js → encoding-TbA3oQLr.js} +2 -2
  51. package/dist/{execution-result-Ba65gieT.js → execution-result-BUPPNlaS.js} +3 -3
  52. package/dist/{execution-result-7sG_mdcD.cjs → execution-result-BgZtqlOT.cjs} +1 -1
  53. package/dist/{font-loader-CHmEwkHl.js → font-loader-BSRR-a0C.js} +1 -1
  54. package/dist/{font-loader-BIxme_9g.cjs → font-loader-BZ4CRPys.cjs} +1 -1
  55. package/dist/{grid-strokes-DsoICRjZ.js → grid-strokes-CovSH3A2.js} +1 -1
  56. package/dist/{grid-strokes-RFMR91jn.cjs → grid-strokes-G5omPT3s.cjs} +1 -1
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.js +23 -23
  59. package/dist/{json-snapshot-BZ0CIQln.js → json-snapshot-DRQmh_k5.js} +718 -683
  60. package/dist/json-snapshot-HR8bez8j.cjs +2 -0
  61. package/dist/{matrix-CB9TqTEy.js → matrix-6wjFVN0Z.js} +149 -142
  62. package/dist/matrix-DeA6__cd.cjs +1 -0
  63. package/dist/media-IV_r4Sp7.cjs +1 -0
  64. package/dist/media-jiLdCn3i.js +208 -0
  65. package/dist/{pdf-DTR7fAIr.js → pdf-BqnoP1L_.js} +14 -15
  66. package/dist/{pdf-d9oJ6V0P.cjs → pdf-Ddm0HCuT.cjs} +48 -48
  67. package/dist/pdf.cjs +1 -1
  68. package/dist/pdf.js +2 -2
  69. package/dist/{plugin-OKDFQFS4.js → plugin-CK8Mm9VY.js} +1 -1
  70. package/dist/{plugin-B7Bi-1te.cjs → plugin-CmkPYdRI.cjs} +1 -1
  71. package/dist/{prefill-C8fF91JB.js → prefill-BqbuktRt.js} +3 -3
  72. package/dist/{prefill-C_Bf_AMo.cjs → prefill-DPLV68I7.cjs} +1 -1
  73. package/dist/prepared-Cl7C69N7.cjs +1 -0
  74. package/dist/{prepared-DhgQ0d-h.js → prepared-V7tYf1qj.js} +68 -64
  75. package/dist/{protocol-CZ-BILne.cjs → protocol-BVhKnBmX.cjs} +1 -1
  76. package/dist/{protocol-DHO91-Jt.js → protocol-Bf33Gu9J.js} +3 -3
  77. package/dist/{record-bindings-KEs-DKCS.cjs → record-bindings-DVs_g_No.cjs} +1 -1
  78. package/dist/{record-bindings-DBrCu6zO.js → record-bindings-hxJqcLSK.js} +3 -3
  79. package/dist/{region-binding-workflow-ikpY1Kbw.cjs → region-binding-workflow-Bu31bqCr.cjs} +1 -1
  80. package/dist/{region-binding-workflow-FSyIZge8.js → region-binding-workflow-DRvX25XH.js} +2 -2
  81. package/dist/report-encoding-worker.cjs +1 -1
  82. package/dist/report-encoding-worker.js +1 -1
  83. package/dist/{rich-text-layout-BYbIc3eJ.cjs → rich-text-layout-6VphrIcj.cjs} +1 -1
  84. package/dist/{rich-text-layout-BtygMWZC.js → rich-text-layout-BCdxMT4m.js} +1 -1
  85. package/dist/{runtime-BsvAqz4a.js → runtime-ChdUbPvs.js} +9 -9
  86. package/dist/{runtime-B5HG8poy.cjs → runtime-D2noLfgC.cjs} +1 -1
  87. package/dist/sbom.cdx.json +1 -1
  88. package/dist/server-node.cjs +5 -5
  89. package/dist/server-node.js +2099 -1959
  90. package/dist/server.cjs +1 -1
  91. package/dist/server.js +17 -13
  92. package/dist/sha256-C26wdjDi.cjs +1 -0
  93. package/dist/sha256-D-msitGX.js +166 -0
  94. package/dist/style.css +1 -1
  95. package/dist/{template-catalog-BbrN9dgu.js → template-catalog-CZfnMXKc.js} +4 -4
  96. package/dist/template-catalog-Dv4sOYaB.cjs +1 -0
  97. package/dist/{template-fragments-CUTE8-_I.js → template-fragments-BO6i19kt.js} +3 -3
  98. package/dist/{template-fragments-cyAQu7aw.cjs → template-fragments-CTfJeHoM.cjs} +1 -1
  99. package/dist/{template-registry-PSuLsnyq.js → template-registry-CIaC6qBW.js} +168 -171
  100. package/dist/template-registry-CKo-bogM.cjs +1 -0
  101. package/dist/template-serialization-Cb1ospyK.js +367 -0
  102. package/dist/template-serialization-D4Fofl9c.cjs +1 -0
  103. package/dist/{textwrap-LhJkHWb1.cjs → textwrap-BYSqmGGV.cjs} +1 -1
  104. package/dist/{textwrap-Bt_tnI6V.js → textwrap-CGjFy7gf.js} +1 -1
  105. package/dist/usePopoverBounds-C3hn7F1s.js +84 -0
  106. package/dist/usePopoverBounds-mJhJ-VqG.cjs +1 -0
  107. package/dist/vue/async.d.cts +28 -0
  108. package/dist/vue/async.d.ts +28 -0
  109. package/dist/vue/index.d.cts +36 -0
  110. package/dist/vue/index.d.ts +36 -0
  111. package/dist/vue-async.cjs +1 -1
  112. package/dist/vue-async.js +3 -3
  113. package/dist/vue.cjs +1 -1
  114. package/dist/vue.js +164 -157
  115. package/dist/{workbook-session-BJfZVp4q.cjs → workbook-session-DL3uBAl8.cjs} +1 -1
  116. package/dist/{workbook-session-DRnMjIFK.js → workbook-session-nkvroJUE.js} +2 -2
  117. package/dist/worker.cjs +1 -1
  118. package/dist/worker.js +4 -4
  119. package/dist/xlsx.cjs +4 -4
  120. package/dist/xlsx.js +28 -29
  121. package/package.json +1 -1
  122. package/dist/ExcelBindingWizard-D1LZxm93.cjs +0 -1
  123. package/dist/ParamEditor-BTIx9UDt.cjs +0 -1
  124. package/dist/ReportBatchPanel-CU2BbpBg.cjs +0 -1
  125. package/dist/ReportLabelStudio-BXKE0GVs.cjs +0 -1
  126. package/dist/ReportParamPanel-Chxu4MTx.cjs +0 -1
  127. package/dist/ReportPreview-C9c0Rp7Y.js +0 -7380
  128. package/dist/ReportPreview-CIMR4ERo.cjs +0 -6
  129. package/dist/ReportTemplateLibrary-tv1sNa78.cjs +0 -1
  130. package/dist/RuleEditor-CvyjPyR6.cjs +0 -1
  131. package/dist/TemplateOutlinePanel-hb8cKkKR.cjs +0 -1
  132. package/dist/TemplateReusePanel-CR5jF00y.cjs +0 -1
  133. package/dist/TemplateReviewPanel-BU35FHwG.cjs +0 -1
  134. package/dist/_plugin-vue_export-helper-8SL1F89S.js +0 -53
  135. package/dist/_plugin-vue_export-helper-BLmdZLlg.cjs +0 -1
  136. package/dist/assets-BFTP-0WR.js +0 -137
  137. package/dist/assets-CZiZhTf2.cjs +0 -1
  138. package/dist/auto-CXd2E2aZ.cjs +0 -1
  139. package/dist/capabilities-D8UU2clQ.cjs +0 -1
  140. package/dist/capabilities-g0a2j9Yy.js +0 -125
  141. package/dist/designer-CEMTZomv.cjs +0 -2
  142. package/dist/designer-_IKm_n5N.js +0 -8002
  143. package/dist/diagnostic-collector-wASg6Fzs.cjs +0 -1
  144. package/dist/dom-Fk4NF-gN.cjs +0 -1
  145. package/dist/json-snapshot-DGFeI30h.cjs +0 -2
  146. package/dist/matrix-CcqYOuq_.cjs +0 -1
  147. package/dist/media-B7vnpD8k.cjs +0 -1
  148. package/dist/media-Y90dHK9z.js +0 -70
  149. package/dist/prepared-BLhV7vdE.cjs +0 -1
  150. package/dist/sha256-BDQ1Qk7A.js +0 -158
  151. package/dist/sha256-DgZAKXqI.cjs +0 -1
  152. package/dist/template-catalog-DDH-5J57.cjs +0 -1
  153. package/dist/template-registry-D24Z8aQf.cjs +0 -1
  154. package/dist/template-serialization-BOUidUlh.cjs +0 -1
  155. package/dist/template-serialization-BgGWYV_1.js +0 -307
@@ -1,232 +1,254 @@
1
- const it = 1.35, at = 10.5, ct = '"Microsoft YaHei", sans-serif', ut = 0.75, G = "#333333", K = "#000000", V = "1.0.0-mach", ft = 25.4, lt = 96;
2
- function R(t = 96) {
1
+ const at = 1.35, ut = 10.5, ft = '"Microsoft YaHei", sans-serif', lt = 0.75, K = "#333333", V = "#000000", q = "1.0.0-mach", dt = 25.4, ht = 96;
2
+ function k(t = 96) {
3
3
  return t / 25.4;
4
4
  }
5
- function dt(t, e = 96) {
6
- return (t || 0) * R(e);
5
+ function pt(t, e = 96) {
6
+ return (t || 0) * k(e);
7
7
  }
8
- function ht(t, e = 96) {
9
- return t / R(e);
8
+ function mt(t, e = 96) {
9
+ return t / k(e);
10
10
  }
11
- function q(t, e = 96) {
11
+ function W(t, e = 96) {
12
12
  return t * e / 72;
13
13
  }
14
- function pt(t, e) {
14
+ function gt(t, e) {
15
15
  const n = 10 ** e;
16
16
  return Math.round(t * n) / n;
17
17
  }
18
- const mt = {
18
+ const bt = {
19
19
  a3: { widthMm: 297, heightMm: 420 },
20
20
  a4: { widthMm: 210, heightMm: 297 },
21
21
  a5: { widthMm: 148, heightMm: 210 },
22
22
  b4: { widthMm: 250, heightMm: 353 },
23
23
  b5: { widthMm: 176, heightMm: 250 }
24
24
  };
25
- function gt(t, e = 96, n = 10.5) {
25
+ function St(t, e = 96, n = 10.5) {
26
26
  if (t?.fontSizePx != null)
27
27
  return { fontSizePt: t.fontSizePx * 72 / e, fontSizePx: t.fontSizePx };
28
28
  const o = t?.fontSize ?? n;
29
- return { fontSizePt: o, fontSizePx: q(o, e) };
29
+ return { fontSizePt: o, fontSizePx: W(o, e) };
30
30
  }
31
- function bt(t, e = G) {
31
+ function yt(t, e = K) {
32
32
  return {
33
33
  color: t?.borderColor ?? t?.lineColor ?? e,
34
34
  widthPt: t?.lineWidthPt ?? 0.75
35
35
  };
36
36
  }
37
- function St(t, e = K) {
37
+ function Et(t, e = V) {
38
38
  return t?.color ?? e;
39
39
  }
40
- function yt(t) {
40
+ function At(t) {
41
41
  return t?.lineHeight ?? 1.35;
42
42
  }
43
- function Et(t) {
43
+ function wt(t) {
44
44
  const e = t?.borderTop !== !1, n = t?.borderRight !== !1, o = t?.borderBottom !== !1, r = t?.borderLeft !== !1;
45
45
  return { top: e, right: n, bottom: o, left: r, inner: e || n || o || r };
46
46
  }
47
- function W(t, e) {
47
+ function X(t, e) {
48
48
  const n = { ...t, ...e };
49
49
  return e?.fontSize != null && e.fontSizePx == null && delete n.fontSizePx, e?.fontSizePx != null && e.fontSize == null && delete n.fontSize, n;
50
50
  }
51
- function X(t, e = !1) {
51
+ function Y(t, e = !1) {
52
52
  return e || typeof t == "boolean" || t instanceof Date || typeof t == "number" && Number.isFinite(t) ? "center" : "left";
53
53
  }
54
- function Y(t) {
54
+ function J(t) {
55
55
  return t !== void 0 && /[0#?]/.test(t.replace(/"[^"]*"|\\.|\[[^\]]*\]/g, ""));
56
56
  }
57
- function J(t, e) {
58
- return e.style?.align ?? t?.align ?? X(
57
+ function Z(t, e) {
58
+ return e.style?.align ?? t?.align ?? Y(
59
59
  e.value,
60
- e.valueType === "number" || e.valueType === "boolean" || e.value == null && Y(e.numberFormat)
60
+ e.valueType === "number" || e.valueType === "boolean" || e.value == null && J(e.numberFormat)
61
61
  );
62
62
  }
63
- function At(t, e) {
64
- const n = W(t, e.style);
65
- return n.align = J(t, e), n;
63
+ function xt(t, e) {
64
+ const n = X(t, e.style);
65
+ return n.align = Z(t, e), n;
66
66
  }
67
- function Z(t, e) {
67
+ function Q(t, e) {
68
68
  const n = t.length;
69
69
  if (n === 0) return [];
70
- const o = t.reduce((l, d) => l + d, 0), r = o > 0 && e > 0 ? e / o : 1, i = [];
70
+ const o = t.reduce((f, d) => f + d, 0), r = o > 0 && e > 0 ? e / o : 1, i = [];
71
71
  let u = 0;
72
- for (let l = 0; l < n; l++) {
73
- const d = Math.max(0, t[l] * r);
72
+ for (let f = 0; f < n; f++) {
73
+ const d = Math.max(0, t[f] * r);
74
74
  i.push({ pos: u, size: d }), u += d;
75
75
  }
76
76
  return i;
77
77
  }
78
78
  function L(t, e, n) {
79
- return t?.length ? Z(t, e) : Array.from({ length: n }, (o, r) => ({
79
+ return t?.length ? Q(t, e) : Array.from({ length: n }, (o, r) => ({
80
80
  pos: e * r / n,
81
81
  size: e / n
82
82
  }));
83
83
  }
84
- function xt(t, e, n) {
85
- const o = t.cells ?? [], r = Math.max(o.length, 1), i = t.colWidthsMm?.length ?? o.reduce((s, a) => Math.max(s, Array.isArray(a) ? a.length : 0), 1), u = L(t.colWidthsMm, e, i), l = (s) => s <= 0 ? 0 : s >= i ? u[u.length - 1].pos + u[u.length - 1].size : u[s].pos, d = L(t.rowHeightsMm, n, r), S = (s) => s <= 0 ? 0 : s >= r ? d[d.length - 1].pos + d[d.length - 1].size : d[s].pos, E = /* @__PURE__ */ new Set(), y = (s, a) => `${s}:${a}`, T = [], P = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set(), f = (s, a) => `v${s}:${a}`, p = (s, a) => `h${s}:${a}`;
86
- o.forEach((s, a) => {
84
+ function Tt(t, e, n) {
85
+ const o = t.cells ?? [], r = Math.max(o.length, 1), i = t.colWidthsMm?.length ?? o.reduce((s, c) => Math.max(s, Array.isArray(c) ? c.length : 0), 1), u = L(t.colWidthsMm, e, i), f = (s) => s <= 0 ? 0 : s >= i ? u[u.length - 1].pos + u[u.length - 1].size : u[s].pos, d = L(t.rowHeightsMm, n, r), g = (s) => s <= 0 ? 0 : s >= r ? d[d.length - 1].pos + d[d.length - 1].size : d[s].pos, y = /* @__PURE__ */ new Set(), E = (s, c) => `${s}:${c}`, A = [], P = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set(), l = (s, c) => `v${s}:${c}`, p = (s, c) => `h${s}:${c}`;
86
+ o.forEach((s, c) => {
87
87
  if (!Array.isArray(s)) return;
88
- let c = 0;
88
+ let a = 0;
89
89
  for (const m of s) {
90
- for (; c < i && E.has(y(a, c)); ) c++;
91
- if (c >= i) break;
92
- const H = Math.max(1, Math.min(m?.colSpan ?? 1, i - c)), U = Math.max(1, m?.rowSpan ?? 1), M = Math.min(r, a + U), A = Math.min(i, c + H);
93
- for (let g = a; g < M; g++)
94
- for (let b = c; b < A; b++)
95
- E.add(y(g, b));
96
- for (let g = c + 1; g < A; g++)
97
- for (let b = a; b < M; b++) P.add(f(g, b));
98
- for (let g = a + 1; g < M; g++)
99
- for (let b = c; b < A; b++) _.add(p(g, b));
100
- const I = l(c), v = S(a);
101
- T.push({
102
- ri: a,
103
- ci: c,
90
+ for (; a < i && y.has(E(c, a)); ) a++;
91
+ if (a >= i) break;
92
+ const U = Math.max(1, Math.min(m?.colSpan ?? 1, i - a)), G = Math.max(1, m?.rowSpan ?? 1), M = Math.min(r, c + G), w = Math.min(i, a + U);
93
+ for (let b = c; b < M; b++)
94
+ for (let S = a; S < w; S++)
95
+ y.add(E(b, S));
96
+ for (let b = a + 1; b < w; b++)
97
+ for (let S = c; S < M; S++) P.add(l(b, S));
98
+ for (let b = c + 1; b < M; b++)
99
+ for (let S = a; S < w; S++) _.add(p(b, S));
100
+ const $ = f(a), v = g(c);
101
+ A.push({
102
+ ri: c,
103
+ ci: a,
104
104
  cell: m ?? {},
105
- xMm: I,
105
+ xMm: $,
106
106
  yMm: v,
107
- widthMm: l(A) - I,
108
- heightMm: S(M) - v
109
- }), c = A;
107
+ widthMm: f(w) - $,
108
+ heightMm: g(M) - v
109
+ }), a = w;
110
110
  }
111
111
  });
112
112
  const h = [];
113
113
  for (let s = 1; s < i; s++) {
114
- let a = -1;
115
- for (let c = 0; c <= r; c++) {
116
- const m = c < r && !P.has(f(s, c));
117
- m && a < 0 && (a = c), !m && a >= 0 && (h.push({ kind: "v", pos: l(s), from: S(a), to: S(c) }), a = -1);
114
+ let c = -1;
115
+ for (let a = 0; a <= r; a++) {
116
+ const m = a < r && !P.has(l(s, a));
117
+ m && c < 0 && (c = a), !m && c >= 0 && (h.push({ kind: "v", pos: f(s), from: g(c), to: g(a) }), c = -1);
118
118
  }
119
119
  }
120
120
  for (let s = 1; s < r; s++) {
121
- let a = -1;
122
- for (let c = 0; c <= i; c++) {
123
- const m = c < i && !_.has(p(s, c));
124
- m && a < 0 && (a = c), !m && a >= 0 && (h.push({ kind: "h", pos: S(s), from: l(a), to: l(c) }), a = -1);
121
+ let c = -1;
122
+ for (let a = 0; a <= i; a++) {
123
+ const m = a < i && !_.has(p(s, a));
124
+ m && c < 0 && (c = a), !m && c >= 0 && (h.push({ kind: "h", pos: g(s), from: f(c), to: f(a) }), c = -1);
125
125
  }
126
126
  }
127
- return { columns: u, rows: d, cells: T, edges: h };
127
+ return { columns: u, rows: d, cells: A, edges: h };
128
128
  }
129
- function wt(t) {
129
+ function Pt(t) {
130
130
  if (!t || typeof t != "object" || Array.isArray(t)) return !1;
131
131
  const { start: e, end: n, color: o } = t;
132
132
  return typeof e == "number" && typeof n == "number" && Number.isFinite(e) && Number.isFinite(n) && e >= 0 && n <= 1 && e <= n && typeof o == "string" && /^#[0-9a-f]{6}$/i.test(o);
133
133
  }
134
- const Tt = V;
135
- function Pt(t) {
134
+ const _t = q;
135
+ function Mt(t) {
136
136
  return (t.kind === "image" || t.kind === "barcode" || t.kind === "qrcode" || t.kind === "chart") && !!t.imageData;
137
137
  }
138
- function _t(t) {
138
+ function Ot(t) {
139
139
  return t.kind === "text" && Array.isArray(t.richParagraphs) && t.richParagraphs.length > 0;
140
140
  }
141
141
  function O(t) {
142
142
  return !!t && typeof t == "object";
143
143
  }
144
+ function C(t, e) {
145
+ t.collection && (t.collection.invalidContainer ??= e);
146
+ }
147
+ function tt(t, e, n, o, r) {
148
+ for (const [i, u] of t.entries()) {
149
+ if (!Array.isArray(u)) {
150
+ C(r, `${e}.grid.cells.${i}`);
151
+ continue;
152
+ }
153
+ for (const [f, d] of u.entries()) {
154
+ if (++r.nodes > 1e6) return { path: e, message: "组件树超过100万个结构节点预算" };
155
+ if (!O(d)) continue;
156
+ const g = d.children;
157
+ if (!Array.isArray(g)) {
158
+ g != null && C(r, `${e}.grid.cells.${i}.${f}.children`);
159
+ continue;
160
+ }
161
+ for (const [y, E] of g.entries()) {
162
+ const A = N(E, `${e}.grid.cells.${i}.${f}.children.${y}`, n + 1, o, r);
163
+ if (A) return A;
164
+ }
165
+ }
166
+ }
167
+ }
144
168
  function N(t, e, n, o, r) {
145
169
  if (++r.nodes > 1e6) return { path: e, message: "组件树超过100万个结构节点预算" };
146
- if (O(t)) {
170
+ if (r.collection?.components.add(t), !!O(t)) {
147
171
  if (n > 64) return { path: e, message: "组件嵌套超过64层预算" };
148
172
  if (o.has(t)) return { path: e, message: "组件树包含循环引用" };
149
- if (!(!O(t.grid) || !Array.isArray(t.grid.cells))) {
173
+ if (O(t.grid)) {
174
+ if (!Array.isArray(t.grid.cells)) {
175
+ t.grid.cells != null && C(r, `${e}.grid.cells`);
176
+ return;
177
+ }
150
178
  o.add(t);
151
179
  try {
152
- for (const [i, u] of t.grid.cells.entries())
153
- if (Array.isArray(u))
154
- for (const [l, d] of u.entries()) {
155
- if (++r.nodes > 1e6) return { path: e, message: "组件树超过100万个结构节点预算" };
156
- if (!(!O(d) || !Array.isArray(d.children)))
157
- for (const [S, E] of d.children.entries()) {
158
- const y = N(E, `${e}.grid.cells.${i}.${l}.children.${S}`, n + 1, o, r);
159
- if (y) return y;
160
- }
161
- }
180
+ return tt(t.grid.cells, e, n, o, r);
162
181
  } finally {
163
182
  o.delete(t);
164
183
  }
165
184
  }
166
185
  }
167
186
  }
168
- function Q(t, e = "$.components", n = { nodes: 0 }) {
187
+ function et(t, e = "$.components", n = { nodes: 0 }) {
169
188
  for (const [o, r] of t.entries()) {
170
189
  const i = N(r, `${e}.${o}`, 0, /* @__PURE__ */ new Set(), n);
171
190
  if (i) return i;
172
191
  }
173
192
  }
174
- function tt(t) {
175
- const e = { nodes: 0 };
176
- for (const [n, o] of t.entries()) {
177
- if (!O(o) || !Array.isArray(o.components)) continue;
178
- const r = Q(o.components, `$.pages.${n}.components`, e);
179
- if (r) return r;
193
+ function nt(t, e) {
194
+ const n = { nodes: 0, collection: e };
195
+ for (const [o, r] of t.entries()) {
196
+ if (!O(r) || !Array.isArray(r.components)) {
197
+ C(n, `$.pages.${o}.components`);
198
+ continue;
199
+ }
200
+ const i = et(r.components, `$.pages.${o}.components`, n);
201
+ if (i) return i;
180
202
  }
181
203
  }
182
- function Mt(t) {
183
- const e = tt(t.pages);
184
- if (e) throw new TypeError(`${e.path}: ${e.message}`);
204
+ function Ct(t, e) {
205
+ const n = nt(t.pages, e);
206
+ if (n) throw new TypeError(`${n.path}: ${n.message}`);
185
207
  }
186
- function w(t) {
208
+ function T(t) {
187
209
  if (t?.aborted) throw t.reason ?? new DOMException("The operation was aborted.", "AbortError");
188
210
  }
189
- function et(t) {
211
+ function ot(t) {
190
212
  try {
191
213
  Promise.resolve(t()).catch(() => {
192
214
  });
193
215
  } catch {
194
216
  }
195
217
  }
196
- function nt(t, e, n) {
197
- w(t.signal), et(() => t.onProgress?.(e, n)), w(t.signal);
218
+ function rt(t, e, n) {
219
+ T(t.signal), ot(() => t.onProgress?.(e, n)), T(t.signal);
198
220
  }
199
- function Ot(t, e) {
221
+ function Dt(t, e) {
200
222
  const n = Promise.resolve(t);
201
223
  return e?.aborted ? (n.catch(() => {
202
224
  }), Promise.reject(e.reason ?? new DOMException("The operation was aborted.", "AbortError"))) : e ? new Promise((o, r) => {
203
225
  const i = () => e.removeEventListener("abort", u), u = () => {
204
226
  i(), r(e.reason ?? new DOMException("The operation was aborted.", "AbortError"));
205
227
  };
206
- e.addEventListener("abort", u, { once: !0 }), n.then((l) => {
207
- i(), o(l);
208
- }, (l) => {
209
- i(), r(l);
228
+ e.addEventListener("abort", u, { once: !0 }), n.then((f) => {
229
+ i(), o(f);
230
+ }, (f) => {
231
+ i(), r(f);
210
232
  }), e.aborted && u();
211
233
  }) : n;
212
234
  }
213
- function Dt(t, e) {
235
+ function It(t, e) {
214
236
  const n = () => e.abort(t?.reason);
215
237
  return t?.addEventListener("abort", n, { once: !0 }), t?.aborted && n(), () => t?.removeEventListener("abort", n);
216
238
  }
217
- async function Ct(t, e, n) {
218
- nt(t, e, n), (t.signal || t.onProgress) && await new Promise((o) => setTimeout(o, 0)), w(t.signal);
239
+ async function $t(t, e, n) {
240
+ rt(t, e, n), (t.signal || t.onProgress) && await new Promise((o) => setTimeout(o, 0)), T(t.signal);
219
241
  }
220
- function It(t) {
242
+ function vt(t) {
221
243
  let e = 0, n = Date.now();
222
244
  return (o = 1) => {
223
- if (w(t.signal), e += o, !(e < 4096 && Date.now() - n < 8))
245
+ if (T(t.signal), e += o, !(e < 4096 && Date.now() - n < 8))
224
246
  return e = 0, new Promise((r) => setTimeout(r, 0)).then(() => {
225
- n = Date.now(), w(t.signal);
247
+ n = Date.now(), T(t.signal);
226
248
  });
227
249
  };
228
250
  }
229
- const vt = 200, $ = 1e3, F = 128, x = "other", j = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]), ot = {
251
+ const Lt = 200, F = 1e3, j = 128, x = "other", z = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]), st = {
230
252
  "invalid-image-data": !0,
231
253
  "image-budget-exceeded": !0,
232
254
  "component-render-failed": !0,
@@ -242,99 +264,99 @@ const vt = 200, $ = 1e3, F = 128, x = "other", j = /* @__PURE__ */ new Set(["__p
242
264
  "image-decode-failed": !0,
243
265
  "asset-render-failed": !0,
244
266
  "asset-budget-exceeded": !0
245
- }, C = /* @__PURE__ */ new Set([...Object.keys(ot), "pdf-page", "pdf-font", "pdf-fidelity", "xlsx-fidelity", "xlsx-snapshot", "prepared-layout-preserved", "prepared-font-metrics", "layout"]);
246
- function z(t) {
267
+ }, I = /* @__PURE__ */ new Set([...Object.keys(st), "pdf-page", "pdf-font", "pdf-fidelity", "xlsx-fidelity", "xlsx-snapshot", "prepared-layout-preserved", "prepared-font-metrics", "layout"]);
268
+ function B(t) {
247
269
  if (t === void 0) return 1 / 0;
248
- if (!Number.isInteger(t) || t < 0 || t > $) throw new RangeError("diagnosticLimit must be an integer between 0 and 1000");
270
+ if (!Number.isInteger(t) || t < 0 || t > F) throw new RangeError("diagnosticLimit must be an integer between 0 and 1000");
249
271
  return t;
250
272
  }
251
- function Lt(t) {
252
- const e = z(t), n = [], o = [], r = /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ Object.create(null);
253
- let l = 0, d = 0, S = 0;
254
- function E(f, p) {
255
- const h = f.length <= 128 && !j.has(f) && (r[f] !== void 0 || S < F || C.has(f)) ? f : x;
256
- return r[h] === void 0 && S++, r[h] = (r[h] ?? 0) + p, h;
273
+ function Rt(t) {
274
+ const e = B(t), n = [], o = [], r = /* @__PURE__ */ Object.create(null), i = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ Object.create(null);
275
+ let f = 0, d = 0, g = 0;
276
+ function y(l, p) {
277
+ const h = l.length <= 128 && !z.has(l) && (r[l] !== void 0 || g < j || I.has(l)) ? l : x;
278
+ return r[h] === void 0 && g++, r[h] = (r[h] ?? 0) + p, h;
257
279
  }
258
- function y(f, p) {
280
+ function E(l, p) {
259
281
  if (e === 1 / 0) {
260
- n.push(f);
282
+ n.push(l);
261
283
  return;
262
284
  }
263
- const h = `${D(f) ? "e" : "o"}:${p}`;
285
+ const h = `${D(l) ? "e" : "o"}:${p}`;
264
286
  if (n.length < e) {
265
- n.push(f), o.push(h), i.set(h, (i.get(h) ?? 0) + 1);
287
+ n.push(l), o.push(h), i.set(h, (i.get(h) ?? 0) + 1);
266
288
  return;
267
289
  }
268
290
  if (!(!e || i.has(h)))
269
291
  for (let s = n.length - 1; s >= 0; s--) {
270
- const a = o[s], c = i.get(a) ?? 0;
271
- if (!(c <= 1)) {
272
- n[s] = f, o[s] = h, i.set(a, c - 1), i.set(h, 1);
292
+ const c = o[s], a = i.get(c) ?? 0;
293
+ if (!(a <= 1)) {
294
+ n[s] = l, o[s] = h, i.set(c, a - 1), i.set(h, 1);
273
295
  return;
274
296
  }
275
297
  }
276
298
  }
277
- function T(f) {
299
+ function A(l) {
278
300
  d++;
279
- const p = E(f.code, 1);
280
- D(f) && (l++, u[p] = (u[p] ?? 0) + 1), y(f, p);
301
+ const p = y(l.code, 1);
302
+ D(l) && (f++, u[p] = (u[p] ?? 0) + 1), E(l, p);
281
303
  }
282
- function P(f) {
283
- d += f.total;
304
+ function P(l) {
305
+ d += l.total;
284
306
  const p = /* @__PURE__ */ new Map();
285
- for (const [s, a] of Object.entries(f.counts)) {
286
- const c = E(s, a), m = f.explanations?.counts[s] ?? 0;
287
- p.set(s, c), m && (l += m, u[c] = (u[c] ?? 0) + m);
307
+ for (const [s, c] of Object.entries(l.counts)) {
308
+ const a = y(s, c), m = l.explanations?.counts[s] ?? 0;
309
+ p.set(s, a), m && (f += m, u[a] = (u[a] ?? 0) + m);
288
310
  }
289
311
  if (e === 1 / 0) {
290
- for (const s of f.entries) n.push(s);
312
+ for (const s of l.entries) n.push(s);
291
313
  return;
292
314
  }
293
315
  const h = /* @__PURE__ */ new Map();
294
- for (const s of f.entries) {
295
- const a = B(f, s, h);
296
- a !== void 0 && y(s, p.get(a));
316
+ for (const s of l.entries) {
317
+ const c = H(l, s, h);
318
+ c !== void 0 && E(s, p.get(c));
297
319
  }
298
320
  }
299
321
  function _() {
300
- return { total: d, counts: { ...r }, entries: n.slice(), omitted: d - n.length, ...l ? { explanations: { total: l, counts: { ...u } } } : {} };
322
+ return { total: d, counts: { ...r }, entries: n.slice(), omitted: d - n.length, ...f ? { explanations: { total: f, counts: { ...u } } } : {} };
301
323
  }
302
- return { entries: n, push: T, merge: P, snapshot: _, get total() {
324
+ return { entries: n, push: A, merge: P, snapshot: _, get total() {
303
325
  return d;
304
326
  } };
305
327
  }
306
328
  function kt(t) {
307
329
  if (!t || typeof t != "object" || Array.isArray(t)) return !1;
308
330
  const e = t;
309
- if (!Number.isSafeInteger(e.total) || e.total < 0 || !Number.isSafeInteger(e.omitted) || e.omitted < 0 || !Array.isArray(e.entries) || e.entries.length > $ || e.total !== e.entries.length + e.omitted || !e.counts || typeof e.counts != "object" || Array.isArray(e.counts) || Object.keys(e.counts).some((o) => o.length > 128 || j.has(o))) return !1;
331
+ if (!Number.isSafeInteger(e.total) || e.total < 0 || !Number.isSafeInteger(e.omitted) || e.omitted < 0 || !Array.isArray(e.entries) || e.entries.length > F || e.total !== e.entries.length + e.omitted || !e.counts || typeof e.counts != "object" || Array.isArray(e.counts) || Object.keys(e.counts).some((o) => o.length > 128 || z.has(o))) return !1;
310
332
  const n = Object.values(e.counts);
311
- return n.length > F + C.size + 1 || n.some((o) => !Number.isSafeInteger(o) || o <= 0) || n.reduce((o, r) => o + r, 0) !== e.total ? !1 : st(e) && rt(e);
333
+ return n.length > j + I.size + 1 || n.some((o) => !Number.isSafeInteger(o) || o <= 0) || n.reduce((o, r) => o + r, 0) !== e.total ? !1 : ct(e) && it(e);
312
334
  }
313
- function rt(t) {
335
+ function it(t) {
314
336
  const e = /* @__PURE__ */ new Map();
315
- return t.entries.every((n) => B(t, n, e) !== void 0);
337
+ return t.entries.every((n) => H(t, n, e) !== void 0);
316
338
  }
317
- function k(t, e, n, o) {
339
+ function R(t, e, n, o) {
318
340
  const r = `${n ? "e" : "o"}:${e}`, i = (o.get(r) ?? 0) + 1, u = t.explanations?.counts[e] ?? 0;
319
341
  return (n ? u : (t.counts[e] ?? 0) - u) < i ? !1 : (o.set(r, i), !0);
320
342
  }
321
- function B(t, e, n) {
343
+ function H(t, e, n) {
322
344
  const o = e && typeof e == "object" && typeof e.code == "string" ? e.code : "unknown", r = Object.prototype.hasOwnProperty.call(t.counts, o) ? o : x, i = !!e && typeof e == "object" && D(e);
323
- if (k(t, r, i, n)) return r;
324
- if (r !== x && !C.has(o) && k(t, x, i, n)) return x;
345
+ if (R(t, r, i, n)) return r;
346
+ if (r !== x && !I.has(o) && R(t, x, i, n)) return x;
325
347
  }
326
348
  function D(t) {
327
349
  return t.valueState !== void 0;
328
350
  }
329
- function st(t) {
351
+ function ct(t) {
330
352
  if (t.explanations === void 0) return !0;
331
353
  const e = t.explanations;
332
354
  if (!e || typeof e != "object" || Array.isArray(e) || !Number.isSafeInteger(e.total) || e.total < 0 || e.total > t.total || !e.counts || typeof e.counts != "object" || Array.isArray(e.counts)) return !1;
333
355
  const n = Object.entries(e.counts);
334
356
  return n.every(([o, r]) => Number.isSafeInteger(r) && r > 0 && r <= (t.counts[o] ?? 0)) && n.reduce((o, [, r]) => o + r, 0) === e.total;
335
357
  }
336
- function Rt(t, e) {
337
- const n = z(t), o = [];
358
+ function Nt(t, e) {
359
+ const n = B(t), o = [];
338
360
  let r = 0;
339
361
  return { entries: o, get total() {
340
362
  return r;
@@ -345,48 +367,48 @@ function Rt(t, e) {
345
367
  } };
346
368
  }
347
369
  export {
348
- et as A,
349
- nt as B,
350
- lt as C,
351
- ct as D,
352
- wt as E,
353
- Dt as F,
354
- vt as G,
370
+ ot as A,
371
+ rt as B,
372
+ ht as C,
373
+ ft as D,
374
+ Pt as E,
375
+ It as F,
376
+ Lt as G,
355
377
  kt as H,
356
- X as I,
357
- Q as J,
358
- tt as K,
359
- it as L,
360
- ft as M,
361
- Mt as N,
362
- Y as O,
363
- mt as P,
364
- Tt as R,
365
- V as S,
366
- gt as a,
367
- At as b,
368
- yt as c,
369
- St as d,
370
- bt as e,
371
- Et as f,
372
- _t as g,
373
- K as h,
374
- Pt as i,
375
- ut as j,
376
- at as k,
377
- G as l,
378
- W as m,
379
- dt as n,
380
- Ct as o,
381
- q as p,
382
- R as q,
383
- xt as r,
384
- ht as s,
385
- pt as t,
386
- J as u,
387
- Rt as v,
388
- Ot as w,
389
- Lt as x,
390
- It as y,
391
- w as z
378
+ Y as I,
379
+ et as J,
380
+ nt as K,
381
+ at as L,
382
+ dt as M,
383
+ Ct as N,
384
+ J as O,
385
+ bt as P,
386
+ _t as R,
387
+ q as S,
388
+ St as a,
389
+ xt as b,
390
+ At as c,
391
+ Et as d,
392
+ yt as e,
393
+ wt as f,
394
+ Ot as g,
395
+ V as h,
396
+ Mt as i,
397
+ lt as j,
398
+ ut as k,
399
+ K as l,
400
+ X as m,
401
+ pt as n,
402
+ $t as o,
403
+ W as p,
404
+ k as q,
405
+ Tt as r,
406
+ mt as s,
407
+ gt as t,
408
+ Z as u,
409
+ Nt as v,
410
+ Dt as w,
411
+ Rt as x,
412
+ vt as y,
413
+ T as z
392
414
  };
@@ -0,0 +1 @@
1
+ "use strict";const ot='"Microsoft YaHei", sans-serif';const $="#333333",k="#000000",H="1.0.0-mach";function M(t=96){return t/25.4}function rt(t,e=96){return(t||0)*M(e)}function st(t,e=96){return t/M(e)}function B(t,e=96){return t*e/72}function it(t,e){const n=10**e;return Math.round(t*n)/n}const ct={a3:{widthMm:297,heightMm:420},a4:{widthMm:210,heightMm:297},a5:{widthMm:148,heightMm:210},b4:{widthMm:250,heightMm:353},b5:{widthMm:176,heightMm:250}};function at(t,e=96,n=10.5){if(t?.fontSizePx!=null)return{fontSizePt:t.fontSizePx*72/e,fontSizePx:t.fontSizePx};const o=t?.fontSize??n;return{fontSizePt:o,fontSizePx:B(o,e)}}function ut(t,e=$){return{color:t?.borderColor??t?.lineColor??e,widthPt:t?.lineWidthPt??.75}}function ft(t,e=k){return t?.color??e}function lt(t){return t?.lineHeight??1.35}function dt(t){const e=t?.borderTop!==!1,n=t?.borderRight!==!1,o=t?.borderBottom!==!1,r=t?.borderLeft!==!1;return{top:e,right:n,bottom:o,left:r,inner:e||n||o||r}}function U(t,e){const n={...t,...e};return e?.fontSize!=null&&e.fontSizePx==null&&delete n.fontSizePx,e?.fontSizePx!=null&&e.fontSize==null&&delete n.fontSize,n}function z(t,e=!1){return e||typeof t=="boolean"||t instanceof Date||typeof t=="number"&&Number.isFinite(t)?"center":"left"}function j(t){return t!==void 0&&/[0#?]/.test(t.replace(/"[^"]*"|\\.|\[[^\]]*\]/g,""))}function G(t,e){return e.style?.align??t?.align??z(e.value,e.valueType==="number"||e.valueType==="boolean"||e.value==null&&j(e.numberFormat))}function pt(t,e){const n=U(t,e.style);return n.align=G(t,e),n}function mt(t,e){const n=t.length;if(n===0)return[];const o=t.reduce((f,d)=>f+d,0),r=o>0&&e>0?e/o:1,i=[];let u=0;for(let f=0;f<n;f++){const d=Math.max(0,t[f]*r);i.push({pos:u,size:d}),u+=d}return i}function F(t,e,n){return t?.length?mt(t,e):Array.from({length:n},(o,r)=>({pos:e*r/n,size:e/n}))}function ht(t,e,n){const o=t.cells??[],r=Math.max(o.length,1),i=t.colWidthsMm?.length??o.reduce((s,c)=>Math.max(s,Array.isArray(c)?c.length:0),1),u=F(t.colWidthsMm,e,i),f=s=>s<=0?0:s>=i?u[u.length-1].pos+u[u.length-1].size:u[s].pos,d=F(t.rowHeightsMm,n,r),g=s=>s<=0?0:s>=r?d[d.length-1].pos+d[d.length-1].size:d[s].pos,T=new Set,_=(s,c)=>`${s}:${c}`,A=[],O=new Set,x=new Set,l=(s,c)=>`v${s}:${c}`,m=(s,c)=>`h${s}:${c}`;o.forEach((s,c)=>{if(!Array.isArray(s))return;let a=0;for(const h of s){for(;a<i&&T.has(_(c,a));)a++;if(a>=i)break;const et=Math.max(1,Math.min(h?.colSpan??1,i-a)),nt=Math.max(1,h?.rowSpan??1),C=Math.min(r,c+nt),y=Math.min(i,a+et);for(let S=c;S<C;S++)for(let E=a;E<y;E++)T.add(_(S,E));for(let S=a+1;S<y;S++)for(let E=c;E<C;E++)O.add(l(S,E));for(let S=c+1;S<C;S++)for(let E=a;E<y;E++)x.add(m(S,E));const R=f(a),v=g(c);A.push({ri:c,ci:a,cell:h??{},xMm:R,yMm:v,widthMm:f(y)-R,heightMm:g(C)-v}),a=y}});const p=[];for(let s=1;s<i;s++){let c=-1;for(let a=0;a<=r;a++){const h=a<r&&!O.has(l(s,a));h&&c<0&&(c=a),!h&&c>=0&&(p.push({kind:"v",pos:f(s),from:g(c),to:g(a)}),c=-1)}}for(let s=1;s<r;s++){let c=-1;for(let a=0;a<=i;a++){const h=a<i&&!x.has(m(s,a));h&&c<0&&(c=a),!h&&c>=0&&(p.push({kind:"h",pos:g(s),from:f(c),to:f(a)}),c=-1)}}return{columns:u,rows:d,cells:A,edges:p}}function gt(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const{start:e,end:n,color:o}=t;return typeof e=="number"&&typeof n=="number"&&Number.isFinite(e)&&Number.isFinite(n)&&e>=0&&n<=1&&e<=n&&typeof o=="string"&&/^#[0-9a-f]{6}$/i.test(o)}const St=H;function Et(t){return(t.kind==="image"||t.kind==="barcode"||t.kind==="qrcode"||t.kind==="chart")&&!!t.imageData}function Tt(t){return t.kind==="text"&&Array.isArray(t.richParagraphs)&&t.richParagraphs.length>0}function D(t){return!!t&&typeof t=="object"}function I(t,e){t.collection&&(t.collection.invalidContainer??=e)}function _t(t,e,n,o,r){for(const[i,u]of t.entries()){if(!Array.isArray(u)){I(r,`${e}.grid.cells.${i}`);continue}for(const[f,d]of u.entries()){if(++r.nodes>1e6)return{path:e,message:"组件树超过100万个结构节点预算"};if(!D(d))continue;const g=d.children;if(!Array.isArray(g)){g!=null&&I(r,`${e}.grid.cells.${i}.${f}.children`);continue}for(const[T,_]of g.entries()){const A=V(_,`${e}.grid.cells.${i}.${f}.children.${T}`,n+1,o,r);if(A)return A}}}}function V(t,e,n,o,r){if(++r.nodes>1e6)return{path:e,message:"组件树超过100万个结构节点预算"};if(r.collection?.components.add(t),!!D(t)){if(n>64)return{path:e,message:"组件嵌套超过64层预算"};if(o.has(t))return{path:e,message:"组件树包含循环引用"};if(D(t.grid)){if(!Array.isArray(t.grid.cells)){t.grid.cells!=null&&I(r,`${e}.grid.cells`);return}o.add(t);try{return _t(t.grid.cells,e,n,o,r)}finally{o.delete(t)}}}}function K(t,e="$.components",n={nodes:0}){for(const[o,r]of t.entries()){const i=V(r,`${e}.${o}`,0,new Set,n);if(i)return i}}function X(t,e){const n={nodes:0,collection:e};for(const[o,r]of t.entries()){if(!D(r)||!Array.isArray(r.components)){I(n,`$.pages.${o}.components`);continue}const i=K(r.components,`$.pages.${o}.components`,n);if(i)return i}}function At(t,e){const n=X(t.pages,e);if(n)throw new TypeError(`${n.path}: ${n.message}`)}function b(t){if(t?.aborted)throw t.reason??new DOMException("The operation was aborted.","AbortError")}function W(t){try{Promise.resolve(t()).catch(()=>{})}catch{}}function Y(t,e,n){b(t.signal),W(()=>t.onProgress?.(e,n)),b(t.signal)}function bt(t,e){const n=Promise.resolve(t);return e?.aborted?(n.catch(()=>{}),Promise.reject(e.reason??new DOMException("The operation was aborted.","AbortError"))):e?new Promise((o,r)=>{const i=()=>e.removeEventListener("abort",u),u=()=>{i(),r(e.reason??new DOMException("The operation was aborted.","AbortError"))};e.addEventListener("abort",u,{once:!0}),n.then(f=>{i(),o(f)},f=>{i(),r(f)}),e.aborted&&u()}):n}function yt(t,e){const n=()=>e.abort(t?.reason);return t?.addEventListener("abort",n,{once:!0}),t?.aborted&&n(),()=>t?.removeEventListener("abort",n)}async function Pt(t,e,n){Y(t,e,n),(t.signal||t.onProgress)&&await new Promise(o=>setTimeout(o,0)),b(t.signal)}function Ot(t){let e=0,n=Date.now();return(o=1)=>{if(b(t.signal),e+=o,!(e<4096&&Date.now()-n<8))return e=0,new Promise(r=>setTimeout(r,0)).then(()=>{n=Date.now(),b(t.signal)})}}const xt=200,q=1e3,Z=128,P="other",J=new Set(["__proto__","prototype","constructor"]),Ct={"invalid-image-data":!0,"image-budget-exceeded":!0,"component-render-failed":!0,"unsupported-text":!0,"output-degraded":!0,"missing-image":!0,"unsupported-component":!0,"unsupported-image-format":!0,"unsupported-style":!0,"rich-text-flattened":!0,"nested-components-omitted":!0,"async-image-required":!0,"image-decode-failed":!0,"asset-render-failed":!0,"asset-budget-exceeded":!0},L=new Set([...Object.keys(Ct),"pdf-page","pdf-font","pdf-fidelity","xlsx-fidelity","xlsx-snapshot","prepared-layout-preserved","prepared-font-metrics","layout"]);function Q(t){if(t===void 0)return 1/0;if(!Number.isInteger(t)||t<0||t>q)throw new RangeError("diagnosticLimit must be an integer between 0 and 1000");return t}function Dt(t){const e=Q(t),n=[],o=[],r=Object.create(null),i=new Map,u=Object.create(null);let f=0,d=0,g=0;function T(l,m){const p=l.length<=128&&!J.has(l)&&(r[l]!==void 0||g<Z||L.has(l))?l:P;return r[p]===void 0&&g++,r[p]=(r[p]??0)+m,p}function _(l,m){if(e===1/0){n.push(l);return}const p=`${w(l)?"e":"o"}:${m}`;if(n.length<e){n.push(l),o.push(p),i.set(p,(i.get(p)??0)+1);return}if(!(!e||i.has(p)))for(let s=n.length-1;s>=0;s--){const c=o[s],a=i.get(c)??0;if(!(a<=1)){n[s]=l,o[s]=p,i.set(c,a-1),i.set(p,1);return}}}function A(l){d++;const m=T(l.code,1);w(l)&&(f++,u[m]=(u[m]??0)+1),_(l,m)}function O(l){d+=l.total;const m=new Map;for(const[s,c]of Object.entries(l.counts)){const a=T(s,c),h=l.explanations?.counts[s]??0;m.set(s,a),h&&(f+=h,u[a]=(u[a]??0)+h)}if(e===1/0){for(const s of l.entries)n.push(s);return}const p=new Map;for(const s of l.entries){const c=tt(l,s,p);c!==void 0&&_(s,m.get(c))}}function x(){return{total:d,counts:{...r},entries:n.slice(),omitted:d-n.length,...f?{explanations:{total:f,counts:{...u}}}:{}}}return{entries:n,push:A,merge:O,snapshot:x,get total(){return d}}}function It(t){if(!t||typeof t!="object"||Array.isArray(t))return!1;const e=t;if(!Number.isSafeInteger(e.total)||e.total<0||!Number.isSafeInteger(e.omitted)||e.omitted<0||!Array.isArray(e.entries)||e.entries.length>q||e.total!==e.entries.length+e.omitted||!e.counts||typeof e.counts!="object"||Array.isArray(e.counts)||Object.keys(e.counts).some(o=>o.length>128||J.has(o)))return!1;const n=Object.values(e.counts);return n.length>Z+L.size+1||n.some(o=>!Number.isSafeInteger(o)||o<=0)||n.reduce((o,r)=>o+r,0)!==e.total?!1:Mt(e)&&wt(e)}function wt(t){const e=new Map;return t.entries.every(n=>tt(t,n,e)!==void 0)}function N(t,e,n,o){const r=`${n?"e":"o"}:${e}`,i=(o.get(r)??0)+1,u=t.explanations?.counts[e]??0;return(n?u:(t.counts[e]??0)-u)<i?!1:(o.set(r,i),!0)}function tt(t,e,n){const o=e&&typeof e=="object"&&typeof e.code=="string"?e.code:"unknown",r=Object.prototype.hasOwnProperty.call(t.counts,o)?o:P,i=!!e&&typeof e=="object"&&w(e);if(N(t,r,i,n))return r;if(r!==P&&!L.has(o)&&N(t,P,i,n))return P}function w(t){return t.valueState!==void 0}function Mt(t){if(t.explanations===void 0)return!0;const e=t.explanations;if(!e||typeof e!="object"||Array.isArray(e)||!Number.isSafeInteger(e.total)||e.total<0||e.total>t.total||!e.counts||typeof e.counts!="object"||Array.isArray(e.counts))return!1;const n=Object.entries(e.counts);return n.every(([o,r])=>Number.isSafeInteger(r)&&r>0&&r<=(t.counts[o]??0))&&n.reduce((o,[,r])=>o+r,0)===e.total}function Lt(t,e){const n=Q(t),o=[];let r=0;return{entries:o,get total(){return r},push(...i){for(const u of i)r++,o.length<n&&o.push(u),e?.(u);return r}}}exports.CSS_DPI=96;exports.DEFAULT_BORDER_PT=.75;exports.DEFAULT_DIAGNOSTIC_LIMIT=xt;exports.DEFAULT_FONT_FAMILY=ot;exports.DEFAULT_FONT_PT=10.5;exports.DEFAULT_STROKE_COLOR=$;exports.DEFAULT_TEXT_COLOR=k;exports.LINE_HEIGHT=1.35;exports.MM_PER_INCH=25.4;exports.PAPER_SIZES=ct;exports.RENDER_PLAN_SCHEMA_VERSION=St;exports.SCHEMA_VERSION_MACH=H;exports.assertBoundedRenderTree=At;exports.assertOutputActive=b;exports.automaticCellAlignment=z;exports.componentTreeIssue=K;exports.createDiagnosticCollector=Dt;exports.createDiagnosticMessages=Lt;exports.createOutputScheduler=Ot;exports.forwardOutputAbort=yt;exports.gridCellAlignment=G;exports.hasNumericCellFormat=j;exports.isImageBackedComponent=Et;exports.isRichText=Tt;exports.mergeComponentStyles=U;exports.mmToPx=rt;exports.mmToPxFactor=M;exports.notifyOutputProgress=Y;exports.observeOutput=W;exports.outputCheckpoint=Pt;exports.ptToPx=B;exports.pxToMm=st;exports.renderTreeIssue=X;exports.resolveBoxBorders=dt;exports.resolveFontSize=at;exports.resolveGridCellStyle=pt;exports.resolveGridLayout=ht;exports.resolveLineHeight=lt;exports.resolveStroke=ut;exports.resolveTextColor=ft;exports.round=it;exports.validDataBar=gt;exports.validDiagnosticSummary=It;exports.waitForOutput=bt;
@@ -1,9 +1,9 @@
1
- import { b as P } from "./template-serialization-BgGWYV_1.js";
2
- import { d as U } from "./data-bar-DjOgTLqu.js";
1
+ import { b as P } from "./template-serialization-Cb1ospyK.js";
2
+ import { d as U } from "./data-bar-BVnzVbE9.js";
3
3
  import { s as D } from "./dom-cell-address-Fn-8nk7D.js";
4
- import { r as B, i as _, e as G, f as W, n as y, t as b, c as F, a as k, g as X, u as Y, b as J, D as q, h as Q } from "./diagnostic-collector-C-JBA016.js";
5
- import { r as H } from "./grid-strokes-DsoICRjZ.js";
6
- import { r as Z } from "./capabilities-g0a2j9Yy.js";
4
+ import { r as B, i as _, e as G, f as W, n as y, t as b, c as F, a as k, g as X, u as Y, b as J, D as q, h as Q } from "./diagnostic-collector-CZ8DV6wA.js";
5
+ import { r as H } from "./grid-strokes-CovSH3A2.js";
6
+ import { r as Z } from "./media-jiLdCn3i.js";
7
7
  function ee(e) {
8
8
  const t = /\.pages\[(\d+)\](?:\.components\[(\d+)\])?/.exec(e);
9
9
  return t ? {