ooxml-core 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (833) hide show
  1. package/README.md +18 -18
  2. package/dist/{PptxHandler-75LOVF7I.mjs → PptxHandler-SJTINPU4.mjs} +3 -3
  3. package/dist/automation/index.cjs +6550 -4115
  4. package/dist/automation/index.mjs +6550 -4115
  5. package/dist/chart/color-palettes.d.ts +2 -2
  6. package/dist/chart/color-palettes.d.ts.map +1 -1
  7. package/dist/chart/data-cache.d.ts +6 -0
  8. package/dist/chart/data-cache.d.ts.map +1 -0
  9. package/dist/chart/gradient-coincident-stops.d.ts +17 -0
  10. package/dist/chart/gradient-coincident-stops.d.ts.map +1 -0
  11. package/dist/chart/gradient-definition.d.ts +3 -3
  12. package/dist/chart/gradient-definition.d.ts.map +1 -1
  13. package/dist/chart/index.cjs +3065 -139
  14. package/dist/chart/index.d.ts +7 -0
  15. package/dist/chart/index.d.ts.map +1 -1
  16. package/dist/chart/index.mjs +3045 -140
  17. package/dist/chart/model-chrome.d.ts +39 -0
  18. package/dist/chart/model-chrome.d.ts.map +1 -0
  19. package/dist/chart/model-series.d.ts +189 -0
  20. package/dist/chart/model-series.d.ts.map +1 -0
  21. package/dist/chart/model.d.ts +202 -0
  22. package/dist/chart/model.d.ts.map +1 -0
  23. package/dist/chart/parse-chrome.d.ts +16 -0
  24. package/dist/chart/parse-chrome.d.ts.map +1 -0
  25. package/dist/chart/parse-plot.d.ts +11 -0
  26. package/dist/chart/parse-plot.d.ts.map +1 -0
  27. package/dist/chart/parse-series.d.ts +8 -0
  28. package/dist/chart/parse-series.d.ts.map +1 -0
  29. package/dist/chart/parse-space.d.ts +8 -0
  30. package/dist/chart/parse-space.d.ts.map +1 -0
  31. package/dist/chart/parse-text.d.ts +12 -0
  32. package/dist/chart/parse-text.d.ts.map +1 -0
  33. package/dist/chart/parse-util.d.ts +42 -0
  34. package/dist/chart/parse-util.d.ts.map +1 -0
  35. package/dist/{xlsx/layout → chart/render}/chart-appearance.d.ts +4 -4
  36. package/dist/chart/render/chart-appearance.d.ts.map +1 -0
  37. package/dist/chart/render/chart-colors.d.ts +9 -0
  38. package/dist/chart/render/chart-colors.d.ts.map +1 -0
  39. package/dist/chart/render/chart-scale.d.ts.map +1 -0
  40. package/dist/chart/render/chart-spacing.d.ts +6 -0
  41. package/dist/chart/render/chart-spacing.d.ts.map +1 -0
  42. package/dist/{xlsx/layout → chart/render}/chart-svg-appearance.d.ts +1 -1
  43. package/dist/chart/render/chart-svg-appearance.d.ts.map +1 -0
  44. package/dist/chart/render/chart-svg-bars.d.ts.map +1 -0
  45. package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -0
  46. package/dist/chart/render/chart-svg-legend.d.ts.map +1 -0
  47. package/dist/chart/render/chart-svg-radial.d.ts.map +1 -0
  48. package/dist/chart/render/chart-svg-text-metrics.d.ts.map +1 -0
  49. package/dist/chart/render/chart-svg-title-text.d.ts.map +1 -0
  50. package/dist/chart/render/chart-svg-util.d.ts.map +1 -0
  51. package/dist/chart/render/chart-svg.d.ts.map +1 -0
  52. package/dist/chart/render/chart-title-text.d.ts +14 -0
  53. package/dist/chart/render/chart-title-text.d.ts.map +1 -0
  54. package/dist/chart/render/chart-value-axis.d.ts +6 -0
  55. package/dist/chart/render/chart-value-axis.d.ts.map +1 -0
  56. package/dist/chart/render/chart-view.d.ts +71 -0
  57. package/dist/chart/render/chart-view.d.ts.map +1 -0
  58. package/dist/chart/render/index.d.ts +9 -0
  59. package/dist/chart/render/index.d.ts.map +1 -0
  60. package/dist/chart/render/render-space.d.ts +34 -0
  61. package/dist/chart/render/render-space.d.ts.map +1 -0
  62. package/dist/chart/render/summary-from-space.d.ts +15 -0
  63. package/dist/chart/render/summary-from-space.d.ts.map +1 -0
  64. package/dist/chart/render/summary.d.ts +51 -0
  65. package/dist/chart/render/summary.d.ts.map +1 -0
  66. package/dist/chart/render/theme-palette.d.ts +8 -0
  67. package/dist/chart/render/theme-palette.d.ts.map +1 -0
  68. package/dist/chart/style-definition.d.ts +7 -7
  69. package/dist/chart/style-definition.d.ts.map +1 -1
  70. package/dist/chart/write-axes.d.ts +5 -0
  71. package/dist/chart/write-axes.d.ts.map +1 -0
  72. package/dist/chart/write-chrome.d.ts +9 -0
  73. package/dist/chart/write-chrome.d.ts.map +1 -0
  74. package/dist/chart/write-plot.d.ts +7 -0
  75. package/dist/chart/write-plot.d.ts.map +1 -0
  76. package/dist/chart/write-series.d.ts +7 -0
  77. package/dist/chart/write-series.d.ts.map +1 -0
  78. package/dist/chart/write-shape.d.ts +21 -0
  79. package/dist/chart/write-shape.d.ts.map +1 -0
  80. package/dist/chart/write-space.d.ts +15 -0
  81. package/dist/chart/write-space.d.ts.map +1 -0
  82. package/dist/chart/write-text-body.d.ts +6 -0
  83. package/dist/chart/write-text-body.d.ts.map +1 -0
  84. package/dist/chart/write-text.d.ts +15 -0
  85. package/dist/chart/write-text.d.ts.map +1 -0
  86. package/dist/chart/write-util.d.ts +24 -0
  87. package/dist/chart/write-util.d.ts.map +1 -0
  88. package/dist/chart/xml-fragment.d.ts +13 -0
  89. package/dist/chart/xml-fragment.d.ts.map +1 -0
  90. package/dist/{chunk-HUBK4EOT.mjs → chunk-3IT6ZD7K.mjs} +2 -0
  91. package/dist/{chunk-TS3E27NK.mjs → chunk-3UMDVJRN.mjs} +12 -1
  92. package/dist/{chunk-P22OKTRK.mjs → chunk-54S5A5PZ.mjs} +208 -159
  93. package/dist/{chunk-75LA7H3F.mjs → chunk-CQQAPUAG.mjs} +27440 -27402
  94. package/dist/{chunk-Q27H4HFS.mjs → chunk-FI4RSJ24.mjs} +1 -1
  95. package/dist/{chunk-OJI3N5AY.cjs → chunk-FRUB573B.cjs} +2 -0
  96. package/dist/{chunk-OMGH6IKY.mjs → chunk-TEOAOAIF.mjs} +42 -5
  97. package/dist/{chunk-RFX7AJDZ.mjs → chunk-VYTA2OUN.mjs} +2 -2
  98. package/dist/{chunk-LA7D6ZYQ.mjs → chunk-XCZ7U3GZ.mjs} +3569 -2075
  99. package/dist/{chunk-2C72N64G.cjs → chunk-XROY25LN.cjs} +12 -0
  100. package/dist/collab/index.cjs +1 -0
  101. package/dist/collab/index.mjs +1 -0
  102. package/dist/collab/transport-provider.d.ts.map +1 -1
  103. package/dist/color/hex-rgb.d.ts +5 -0
  104. package/dist/color/hex-rgb.d.ts.map +1 -0
  105. package/dist/color/index.cjs +12 -0
  106. package/dist/color/index.d.ts +1 -0
  107. package/dist/color/index.d.ts.map +1 -1
  108. package/dist/color/index.mjs +11 -1
  109. package/dist/diagram/engine/alg-composite.d.ts +18 -0
  110. package/dist/diagram/engine/alg-composite.d.ts.map +1 -0
  111. package/dist/diagram/engine/alg-connector.d.ts +17 -0
  112. package/dist/diagram/engine/alg-connector.d.ts.map +1 -0
  113. package/dist/diagram/engine/alg-cycle.d.ts +28 -0
  114. package/dist/diagram/engine/alg-cycle.d.ts.map +1 -0
  115. package/dist/diagram/engine/alg-hier.d.ts +33 -0
  116. package/dist/diagram/engine/alg-hier.d.ts.map +1 -0
  117. package/dist/diagram/engine/alg-linear.d.ts +24 -0
  118. package/dist/diagram/engine/alg-linear.d.ts.map +1 -0
  119. package/dist/diagram/engine/alg-pyra.d.ts +117 -0
  120. package/dist/diagram/engine/alg-pyra.d.ts.map +1 -0
  121. package/dist/diagram/engine/alg-snake.d.ts +21 -0
  122. package/dist/diagram/engine/alg-snake.d.ts.map +1 -0
  123. package/dist/diagram/engine/axis.d.ts +24 -0
  124. package/dist/diagram/engine/axis.d.ts.map +1 -0
  125. package/dist/diagram/engine/conditions.d.ts +12 -0
  126. package/dist/diagram/engine/conditions.d.ts.map +1 -0
  127. package/dist/diagram/engine/connector-shape.d.ts +25 -0
  128. package/dist/diagram/engine/connector-shape.d.ts.map +1 -0
  129. package/dist/diagram/engine/connector-size.d.ts +30 -0
  130. package/dist/diagram/engine/connector-size.d.ts.map +1 -0
  131. package/dist/diagram/engine/constraint-eval.d.ts +37 -0
  132. package/dist/diagram/engine/constraint-eval.d.ts.map +1 -0
  133. package/dist/diagram/engine/constraint-fill-idiom.d.ts +61 -0
  134. package/dist/diagram/engine/constraint-fill-idiom.d.ts.map +1 -0
  135. package/dist/diagram/engine/constraint-units.d.ts +35 -0
  136. package/dist/diagram/engine/constraint-units.d.ts.map +1 -0
  137. package/dist/diagram/engine/data-points.d.ts +48 -0
  138. package/dist/diagram/engine/data-points.d.ts.map +1 -0
  139. package/dist/diagram/engine/engine-context.d.ts +21 -0
  140. package/dist/diagram/engine/engine-context.d.ts.map +1 -0
  141. package/dist/diagram/engine/engine-first-allowlist.d.ts +31 -0
  142. package/dist/diagram/engine/engine-first-allowlist.d.ts.map +1 -0
  143. package/dist/diagram/engine/engine-fonts.d.ts +26 -0
  144. package/dist/diagram/engine/engine-fonts.d.ts.map +1 -0
  145. package/dist/diagram/engine/engine-node.d.ts +72 -0
  146. package/dist/diagram/engine/engine-node.d.ts.map +1 -0
  147. package/dist/diagram/engine/engine-to-result.d.ts +43 -0
  148. package/dist/diagram/engine/engine-to-result.d.ts.map +1 -0
  149. package/dist/diagram/engine/engine.d.ts +18 -0
  150. package/dist/diagram/engine/engine.d.ts.map +1 -0
  151. package/dist/diagram/engine/font-groups.d.ts +33 -0
  152. package/dist/diagram/engine/font-groups.d.ts.map +1 -0
  153. package/dist/diagram/engine/font-length.d.ts +26 -0
  154. package/dist/diagram/engine/font-length.d.ts.map +1 -0
  155. package/dist/diagram/engine/font-search.d.ts +38 -0
  156. package/dist/diagram/engine/font-search.d.ts.map +1 -0
  157. package/dist/diagram/engine/hier-assistants.d.ts +47 -0
  158. package/dist/diagram/engine/hier-assistants.d.ts.map +1 -0
  159. package/dist/diagram/engine/hier-hang.d.ts +28 -0
  160. package/dist/diagram/engine/hier-hang.d.ts.map +1 -0
  161. package/dist/diagram/engine/hier-measure.d.ts +33 -0
  162. package/dist/diagram/engine/hier-measure.d.ts.map +1 -0
  163. package/dist/diagram/engine/hier-node-size.d.ts +23 -0
  164. package/dist/diagram/engine/hier-node-size.d.ts.map +1 -0
  165. package/dist/diagram/engine/hier-shape.d.ts +31 -0
  166. package/dist/diagram/engine/hier-shape.d.ts.map +1 -0
  167. package/dist/diagram/engine/index.d.ts +6 -0
  168. package/dist/diagram/engine/index.d.ts.map +1 -0
  169. package/dist/diagram/engine/layout-def-parse.d.ts +13 -0
  170. package/dist/diagram/engine/layout-def-parse.d.ts.map +1 -0
  171. package/dist/diagram/engine/layout-def-types.d.ts +118 -0
  172. package/dist/diagram/engine/layout-def-types.d.ts.map +1 -0
  173. package/dist/diagram/engine/layout-driver.d.ts +41 -0
  174. package/dist/diagram/engine/layout-driver.d.ts.map +1 -0
  175. package/dist/diagram/engine/layout-font.d.ts +27 -0
  176. package/dist/diagram/engine/layout-font.d.ts.map +1 -0
  177. package/dist/diagram/engine/move-with-merge.d.ts +49 -0
  178. package/dist/diagram/engine/move-with-merge.d.ts.map +1 -0
  179. package/dist/diagram/engine/node-text.d.ts +20 -0
  180. package/dist/diagram/engine/node-text.d.ts.map +1 -0
  181. package/dist/diagram/engine/ordered-xml.d.ts +30 -0
  182. package/dist/diagram/engine/ordered-xml.d.ts.map +1 -0
  183. package/dist/diagram/engine/preferred-size.d.ts +28 -0
  184. package/dist/diagram/engine/preferred-size.d.ts.map +1 -0
  185. package/dist/diagram/engine/pres-tree.d.ts +58 -0
  186. package/dist/diagram/engine/pres-tree.d.ts.map +1 -0
  187. package/dist/diagram/engine/registry.d.ts +7 -0
  188. package/dist/diagram/engine/registry.d.ts.map +1 -0
  189. package/dist/diagram/engine/render-filter.d.ts +43 -0
  190. package/dist/diagram/engine/render-filter.d.ts.map +1 -0
  191. package/dist/diagram/engine/shape-adjust.d.ts +16 -0
  192. package/dist/diagram/engine/shape-adjust.d.ts.map +1 -0
  193. package/dist/diagram/engine/shape-transform.d.ts +14 -0
  194. package/dist/diagram/engine/shape-transform.d.ts.map +1 -0
  195. package/dist/diagram/engine/snake-rule-fit.d.ts +34 -0
  196. package/dist/diagram/engine/snake-rule-fit.d.ts.map +1 -0
  197. package/dist/diagram/engine/style-label.d.ts +24 -0
  198. package/dist/diagram/engine/style-label.d.ts.map +1 -0
  199. package/dist/diagram/engine/text-fit.d.ts +61 -0
  200. package/dist/diagram/engine/text-fit.d.ts.map +1 -0
  201. package/dist/diagram/engine/text-grow.d.ts +33 -0
  202. package/dist/diagram/engine/text-grow.d.ts.map +1 -0
  203. package/dist/diagram/engine/text-measure.d.ts +77 -0
  204. package/dist/diagram/engine/text-measure.d.ts.map +1 -0
  205. package/dist/diagram/hierarchy/index.d.ts +5 -0
  206. package/dist/diagram/hierarchy/index.d.ts.map +1 -0
  207. package/dist/diagram/hierarchy/smartart-hierarchy-axis-pitch.d.ts +65 -0
  208. package/dist/diagram/hierarchy/smartart-hierarchy-axis-pitch.d.ts.map +1 -0
  209. package/dist/diagram/hierarchy/smartart-hierarchy-axis-swap-orientation.d.ts +68 -0
  210. package/dist/diagram/hierarchy/smartart-hierarchy-axis-swap-orientation.d.ts.map +1 -0
  211. package/dist/diagram/hierarchy/smartart-hierarchy-branch-mode.d.ts +54 -0
  212. package/dist/diagram/hierarchy/smartart-hierarchy-branch-mode.d.ts.map +1 -0
  213. package/dist/diagram/hierarchy/smartart-hierarchy-cascade.d.ts +58 -0
  214. package/dist/diagram/hierarchy/smartart-hierarchy-cascade.d.ts.map +1 -0
  215. package/dist/diagram/hierarchy/smartart-hierarchy-centered-fan-axis.d.ts +63 -0
  216. package/dist/diagram/hierarchy/smartart-hierarchy-centered-fan-axis.d.ts.map +1 -0
  217. package/dist/diagram/hierarchy/smartart-hierarchy-child-order.d.ts +41 -0
  218. package/dist/diagram/hierarchy/smartart-hierarchy-child-order.d.ts.map +1 -0
  219. package/dist/diagram/hierarchy/smartart-hierarchy-composite-child.d.ts +129 -0
  220. package/dist/diagram/hierarchy/smartart-hierarchy-composite-child.d.ts.map +1 -0
  221. package/dist/diagram/hierarchy/smartart-hierarchy-constraint-lookup.d.ts +76 -0
  222. package/dist/diagram/hierarchy/smartart-hierarchy-constraint-lookup.d.ts.map +1 -0
  223. package/dist/diagram/hierarchy/smartart-hierarchy-corner-plan.d.ts +49 -0
  224. package/dist/diagram/hierarchy/smartart-hierarchy-corner-plan.d.ts.map +1 -0
  225. package/dist/diagram/hierarchy/smartart-hierarchy-dispatch-lindir.d.ts +58 -0
  226. package/dist/diagram/hierarchy/smartart-hierarchy-dispatch-lindir.d.ts.map +1 -0
  227. package/dist/diagram/hierarchy/smartart-hierarchy-fan-aware-width.d.ts +48 -0
  228. package/dist/diagram/hierarchy/smartart-hierarchy-fan-aware-width.d.ts.map +1 -0
  229. package/dist/diagram/hierarchy/smartart-hierarchy-fan.d.ts +97 -0
  230. package/dist/diagram/hierarchy/smartart-hierarchy-fan.d.ts.map +1 -0
  231. package/dist/diagram/hierarchy/smartart-hierarchy-fanned-hang-geometry.d.ts +42 -0
  232. package/dist/diagram/hierarchy/smartart-hierarchy-fanned-hang-geometry.d.ts.map +1 -0
  233. package/dist/diagram/hierarchy/smartart-hierarchy-fanned-hang.d.ts +74 -0
  234. package/dist/diagram/hierarchy/smartart-hierarchy-fanned-hang.d.ts.map +1 -0
  235. package/dist/diagram/hierarchy/smartart-hierarchy-fit-item-box.d.ts +111 -0
  236. package/dist/diagram/hierarchy/smartart-hierarchy-fit-item-box.d.ts.map +1 -0
  237. package/dist/diagram/hierarchy/smartart-hierarchy-fold-depth.d.ts +44 -0
  238. package/dist/diagram/hierarchy/smartart-hierarchy-fold-depth.d.ts.map +1 -0
  239. package/dist/diagram/hierarchy/smartart-hierarchy-generation-gap.d.ts +60 -0
  240. package/dist/diagram/hierarchy/smartart-hierarchy-generation-gap.d.ts.map +1 -0
  241. package/dist/diagram/hierarchy/smartart-hierarchy-generation-templates.d.ts +106 -0
  242. package/dist/diagram/hierarchy/smartart-hierarchy-generation-templates.d.ts.map +1 -0
  243. package/dist/diagram/hierarchy/smartart-hierarchy-hang-depth.d.ts +133 -0
  244. package/dist/diagram/hierarchy/smartart-hierarchy-hang-depth.d.ts.map +1 -0
  245. package/dist/diagram/hierarchy/smartart-hierarchy-hang-dispatch.d.ts +28 -0
  246. package/dist/diagram/hierarchy/smartart-hierarchy-hang-dispatch.d.ts.map +1 -0
  247. package/dist/diagram/hierarchy/smartart-hierarchy-hanging-arrange.d.ts +28 -0
  248. package/dist/diagram/hierarchy/smartart-hierarchy-hanging-arrange.d.ts.map +1 -0
  249. package/dist/diagram/hierarchy/smartart-hierarchy-hanging-box.d.ts +86 -0
  250. package/dist/diagram/hierarchy/smartart-hierarchy-hanging-box.d.ts.map +1 -0
  251. package/dist/diagram/hierarchy/smartart-hierarchy-hanging-fold.d.ts +36 -0
  252. package/dist/diagram/hierarchy/smartart-hierarchy-hanging-fold.d.ts.map +1 -0
  253. package/dist/diagram/hierarchy/smartart-hierarchy-hanging.d.ts +118 -0
  254. package/dist/diagram/hierarchy/smartart-hierarchy-hanging.d.ts.map +1 -0
  255. package/dist/diagram/hierarchy/smartart-hierarchy-item-template.d.ts +64 -0
  256. package/dist/diagram/hierarchy/smartart-hierarchy-item-template.d.ts.map +1 -0
  257. package/dist/diagram/hierarchy/smartart-hierarchy-orgchart-tree.d.ts +53 -0
  258. package/dist/diagram/hierarchy/smartart-hierarchy-orgchart-tree.d.ts.map +1 -0
  259. package/dist/diagram/hierarchy/smartart-hierarchy-orientation-resolve.d.ts +36 -0
  260. package/dist/diagram/hierarchy/smartart-hierarchy-orientation-resolve.d.ts.map +1 -0
  261. package/dist/diagram/hierarchy/smartart-hierarchy-orientation-types.d.ts +81 -0
  262. package/dist/diagram/hierarchy/smartart-hierarchy-orientation-types.d.ts.map +1 -0
  263. package/dist/diagram/hierarchy/smartart-hierarchy-orientation.d.ts +78 -0
  264. package/dist/diagram/hierarchy/smartart-hierarchy-orientation.d.ts.map +1 -0
  265. package/dist/diagram/hierarchy/smartart-hierarchy-pitch.d.ts +140 -0
  266. package/dist/diagram/hierarchy/smartart-hierarchy-pitch.d.ts.map +1 -0
  267. package/dist/diagram/hierarchy/smartart-hierarchy-shared.d.ts +131 -0
  268. package/dist/diagram/hierarchy/smartart-hierarchy-shared.d.ts.map +1 -0
  269. package/dist/diagram/hierarchy/smartart-hierarchy-standard-options.d.ts +91 -0
  270. package/dist/diagram/hierarchy/smartart-hierarchy-standard-options.d.ts.map +1 -0
  271. package/dist/diagram/hierarchy/smartart-hierarchy-standard-rows.d.ts +21 -0
  272. package/dist/diagram/hierarchy/smartart-hierarchy-standard-rows.d.ts.map +1 -0
  273. package/dist/diagram/hierarchy/smartart-hierarchy-standard.d.ts +36 -0
  274. package/dist/diagram/hierarchy/smartart-hierarchy-standard.d.ts.map +1 -0
  275. package/dist/diagram/hierarchy/smartart-hierarchy-tailed-placer.d.ts +20 -0
  276. package/dist/diagram/hierarchy/smartart-hierarchy-tailed-placer.d.ts.map +1 -0
  277. package/dist/diagram/hierarchy/smartart-hierarchy-tailed-transpose.d.ts +50 -0
  278. package/dist/diagram/hierarchy/smartart-hierarchy-tailed-transpose.d.ts.map +1 -0
  279. package/dist/diagram/hierarchy/smartart-hierarchy-transpose.d.ts +23 -0
  280. package/dist/diagram/hierarchy/smartart-hierarchy-transpose.d.ts.map +1 -0
  281. package/dist/diagram/hierarchy/smartart-hierarchy-transposed-orientation.d.ts +22 -0
  282. package/dist/diagram/hierarchy/smartart-hierarchy-transposed-orientation.d.ts.map +1 -0
  283. package/dist/diagram/hierarchy/smartart-hierarchy-wrapped-groups.d.ts +93 -0
  284. package/dist/diagram/hierarchy/smartart-hierarchy-wrapped-groups.d.ts.map +1 -0
  285. package/dist/diagram/hierarchy/smartart-layout-interpreter-hierarchy.d.ts +49 -0
  286. package/dist/diagram/hierarchy/smartart-layout-interpreter-hierarchy.d.ts.map +1 -0
  287. package/dist/diagram/index.cjs +22537 -80
  288. package/dist/diagram/index.d.ts +4 -0
  289. package/dist/diagram/index.d.ts.map +1 -1
  290. package/dist/diagram/index.mjs +22453 -81
  291. package/dist/diagram/layout/index.d.ts +38 -0
  292. package/dist/diagram/layout/index.d.ts.map +1 -0
  293. package/dist/diagram/layout/smartart-choose-xml.d.ts +32 -0
  294. package/dist/diagram/layout/smartart-choose-xml.d.ts.map +1 -0
  295. package/dist/diagram/layout/smartart-constraint-branch-index.d.ts +49 -0
  296. package/dist/diagram/layout/smartart-constraint-branch-index.d.ts.map +1 -0
  297. package/dist/diagram/layout/smartart-constraint-declared-by.d.ts +64 -0
  298. package/dist/diagram/layout/smartart-constraint-declared-by.d.ts.map +1 -0
  299. package/dist/diagram/layout/smartart-constraint-ratio-fallback.d.ts +18 -0
  300. package/dist/diagram/layout/smartart-constraint-ratio-fallback.d.ts.map +1 -0
  301. package/dist/diagram/layout/smartart-constraint-resolve.d.ts +24 -0
  302. package/dist/diagram/layout/smartart-constraint-resolve.d.ts.map +1 -0
  303. package/dist/diagram/layout/smartart-constraint-rules.d.ts +26 -0
  304. package/dist/diagram/layout/smartart-constraint-rules.d.ts.map +1 -0
  305. package/dist/diagram/layout/smartart-constraint-sibling-roles.d.ts +100 -0
  306. package/dist/diagram/layout/smartart-constraint-sibling-roles.d.ts.map +1 -0
  307. package/dist/diagram/layout/smartart-constraint-solver.d.ts +133 -0
  308. package/dist/diagram/layout/smartart-constraint-solver.d.ts.map +1 -0
  309. package/dist/diagram/layout/smartart-constraint-values.d.ts +5 -0
  310. package/dist/diagram/layout/smartart-constraint-values.d.ts.map +1 -0
  311. package/dist/diagram/layout/smartart-font-table.d.ts +14 -0
  312. package/dist/diagram/layout/smartart-font-table.d.ts.map +1 -0
  313. package/dist/diagram/layout/smartart-interpreter-fold-text.d.ts +75 -0
  314. package/dist/diagram/layout/smartart-interpreter-fold-text.d.ts.map +1 -0
  315. package/dist/diagram/layout/smartart-layout-control-flow.d.ts +25 -0
  316. package/dist/diagram/layout/smartart-layout-control-flow.d.ts.map +1 -0
  317. package/dist/diagram/layout/smartart-layout-interpreter-arranged-selection.d.ts +56 -0
  318. package/dist/diagram/layout/smartart-layout-interpreter-arranged-selection.d.ts.map +1 -0
  319. package/dist/diagram/layout/smartart-layout-interpreter-arrangement-kind.d.ts +37 -0
  320. package/dist/diagram/layout/smartart-layout-interpreter-arrangement-kind.d.ts.map +1 -0
  321. package/dist/diagram/layout/smartart-layout-interpreter-aux.d.ts +66 -0
  322. package/dist/diagram/layout/smartart-layout-interpreter-aux.d.ts.map +1 -0
  323. package/dist/diagram/layout/smartart-layout-interpreter-axis-count.d.ts +128 -0
  324. package/dist/diagram/layout/smartart-layout-interpreter-axis-count.d.ts.map +1 -0
  325. package/dist/diagram/layout/smartart-layout-interpreter-axis-depth.d.ts +73 -0
  326. package/dist/diagram/layout/smartart-layout-interpreter-axis-depth.d.ts.map +1 -0
  327. package/dist/diagram/layout/smartart-layout-interpreter-axis-hop.d.ts +48 -0
  328. package/dist/diagram/layout/smartart-layout-interpreter-axis-hop.d.ts.map +1 -0
  329. package/dist/diagram/layout/smartart-layout-interpreter-axis-range.d.ts +19 -0
  330. package/dist/diagram/layout/smartart-layout-interpreter-axis-range.d.ts.map +1 -0
  331. package/dist/diagram/layout/smartart-layout-interpreter-choose-algorithm.d.ts +60 -0
  332. package/dist/diagram/layout/smartart-layout-interpreter-choose-algorithm.d.ts.map +1 -0
  333. package/dist/diagram/layout/smartart-layout-interpreter-choose-branch.d.ts +36 -0
  334. package/dist/diagram/layout/smartart-layout-interpreter-choose-branch.d.ts.map +1 -0
  335. package/dist/diagram/layout/smartart-layout-interpreter-choose-composite.d.ts +42 -0
  336. package/dist/diagram/layout/smartart-layout-interpreter-choose-composite.d.ts.map +1 -0
  337. package/dist/diagram/layout/smartart-layout-interpreter-choose-depth.d.ts +102 -0
  338. package/dist/diagram/layout/smartart-layout-interpreter-choose-depth.d.ts.map +1 -0
  339. package/dist/diagram/layout/smartart-layout-interpreter-choose-resolve.d.ts +32 -0
  340. package/dist/diagram/layout/smartart-layout-interpreter-choose-resolve.d.ts.map +1 -0
  341. package/dist/diagram/layout/smartart-layout-interpreter-composite-alternative.d.ts +33 -0
  342. package/dist/diagram/layout/smartart-layout-interpreter-composite-alternative.d.ts.map +1 -0
  343. package/dist/diagram/layout/smartart-layout-interpreter-composite-anchor.d.ts +95 -0
  344. package/dist/diagram/layout/smartart-layout-interpreter-composite-anchor.d.ts.map +1 -0
  345. package/dist/diagram/layout/smartart-layout-interpreter-composite-aspect.d.ts +84 -0
  346. package/dist/diagram/layout/smartart-layout-interpreter-composite-aspect.d.ts.map +1 -0
  347. package/dist/diagram/layout/smartart-layout-interpreter-composite-candidates.d.ts +60 -0
  348. package/dist/diagram/layout/smartart-layout-interpreter-composite-candidates.d.ts.map +1 -0
  349. package/dist/diagram/layout/smartart-layout-interpreter-composite-children.d.ts +86 -0
  350. package/dist/diagram/layout/smartart-layout-interpreter-composite-children.d.ts.map +1 -0
  351. package/dist/diagram/layout/smartart-layout-interpreter-composite-choose-groups.d.ts +44 -0
  352. package/dist/diagram/layout/smartart-layout-interpreter-composite-choose-groups.d.ts.map +1 -0
  353. package/dist/diagram/layout/smartart-layout-interpreter-composite-choose.d.ts +109 -0
  354. package/dist/diagram/layout/smartart-layout-interpreter-composite-choose.d.ts.map +1 -0
  355. package/dist/diagram/layout/smartart-layout-interpreter-composite-detect.d.ts +182 -0
  356. package/dist/diagram/layout/smartart-layout-interpreter-composite-detect.d.ts.map +1 -0
  357. package/dist/diagram/layout/smartart-layout-interpreter-composite-fontfit.d.ts +60 -0
  358. package/dist/diagram/layout/smartart-layout-interpreter-composite-fontfit.d.ts.map +1 -0
  359. package/dist/diagram/layout/smartart-layout-interpreter-composite-foreach.d.ts +36 -0
  360. package/dist/diagram/layout/smartart-layout-interpreter-composite-foreach.d.ts.map +1 -0
  361. package/dist/diagram/layout/smartart-layout-interpreter-composite-group-slots.d.ts +92 -0
  362. package/dist/diagram/layout/smartart-layout-interpreter-composite-group-slots.d.ts.map +1 -0
  363. package/dist/diagram/layout/smartart-layout-interpreter-composite-iteration.d.ts +45 -0
  364. package/dist/diagram/layout/smartart-layout-interpreter-composite-iteration.d.ts.map +1 -0
  365. package/dist/diagram/layout/smartart-layout-interpreter-composite-nested-cycle.d.ts +57 -0
  366. package/dist/diagram/layout/smartart-layout-interpreter-composite-nested-cycle.d.ts.map +1 -0
  367. package/dist/diagram/layout/smartart-layout-interpreter-composite-order-fallback.d.ts +24 -0
  368. package/dist/diagram/layout/smartart-layout-interpreter-composite-order-fallback.d.ts.map +1 -0
  369. package/dist/diagram/layout/smartart-layout-interpreter-composite-order.d.ts +41 -0
  370. package/dist/diagram/layout/smartart-layout-interpreter-composite-order.d.ts.map +1 -0
  371. package/dist/diagram/layout/smartart-layout-interpreter-composite-pairs.d.ts +34 -0
  372. package/dist/diagram/layout/smartart-layout-interpreter-composite-pairs.d.ts.map +1 -0
  373. package/dist/diagram/layout/smartart-layout-interpreter-composite-render.d.ts +29 -0
  374. package/dist/diagram/layout/smartart-layout-interpreter-composite-render.d.ts.map +1 -0
  375. package/dist/diagram/layout/smartart-layout-interpreter-composite-ring.d.ts +40 -0
  376. package/dist/diagram/layout/smartart-layout-interpreter-composite-ring.d.ts.map +1 -0
  377. package/dist/diagram/layout/smartart-layout-interpreter-composite-slot-dim.d.ts +22 -0
  378. package/dist/diagram/layout/smartart-layout-interpreter-composite-slot-dim.d.ts.map +1 -0
  379. package/dist/diagram/layout/smartart-layout-interpreter-composite-slots.d.ts +69 -0
  380. package/dist/diagram/layout/smartart-layout-interpreter-composite-slots.d.ts.map +1 -0
  381. package/dist/diagram/layout/smartart-layout-interpreter-composite.d.ts +56 -0
  382. package/dist/diagram/layout/smartart-layout-interpreter-composite.d.ts.map +1 -0
  383. package/dist/diagram/layout/smartart-layout-interpreter-conn-path.d.ts +42 -0
  384. package/dist/diagram/layout/smartart-layout-interpreter-conn-path.d.ts.map +1 -0
  385. package/dist/diagram/layout/smartart-layout-interpreter-connector-order.d.ts +23 -0
  386. package/dist/diagram/layout/smartart-layout-interpreter-connector-order.d.ts.map +1 -0
  387. package/dist/diagram/layout/smartart-layout-interpreter-constraints.d.ts +28 -0
  388. package/dist/diagram/layout/smartart-layout-interpreter-constraints.d.ts.map +1 -0
  389. package/dist/diagram/layout/smartart-layout-interpreter-custom.d.ts +31 -0
  390. package/dist/diagram/layout/smartart-layout-interpreter-custom.d.ts.map +1 -0
  391. package/dist/diagram/layout/smartart-layout-interpreter-cycle-boxes.d.ts +36 -0
  392. package/dist/diagram/layout/smartart-layout-interpreter-cycle-boxes.d.ts.map +1 -0
  393. package/dist/diagram/layout/smartart-layout-interpreter-cycle-connectors.d.ts +21 -0
  394. package/dist/diagram/layout/smartart-layout-interpreter-cycle-connectors.d.ts.map +1 -0
  395. package/dist/diagram/layout/smartart-layout-interpreter-cycle-constraints.d.ts +116 -0
  396. package/dist/diagram/layout/smartart-layout-interpreter-cycle-constraints.d.ts.map +1 -0
  397. package/dist/diagram/layout/smartart-layout-interpreter-cycle-extension.d.ts +110 -0
  398. package/dist/diagram/layout/smartart-layout-interpreter-cycle-extension.d.ts.map +1 -0
  399. package/dist/diagram/layout/smartart-layout-interpreter-cycle-fontfit.d.ts +50 -0
  400. package/dist/diagram/layout/smartart-layout-interpreter-cycle-fontfit.d.ts.map +1 -0
  401. package/dist/diagram/layout/smartart-layout-interpreter-cycle-hub-detect.d.ts +66 -0
  402. package/dist/diagram/layout/smartart-layout-interpreter-cycle-hub-detect.d.ts.map +1 -0
  403. package/dist/diagram/layout/smartart-layout-interpreter-cycle-hub-ratio-usersize.d.ts +81 -0
  404. package/dist/diagram/layout/smartart-layout-interpreter-cycle-hub-ratio-usersize.d.ts.map +1 -0
  405. package/dist/diagram/layout/smartart-layout-interpreter-cycle-hub-ratio.d.ts +109 -0
  406. package/dist/diagram/layout/smartart-layout-interpreter-cycle-hub-ratio.d.ts.map +1 -0
  407. package/dist/diagram/layout/smartart-layout-interpreter-cycle-item-aspect.d.ts +121 -0
  408. package/dist/diagram/layout/smartart-layout-interpreter-cycle-item-aspect.d.ts.map +1 -0
  409. package/dist/diagram/layout/smartart-layout-interpreter-cycle-item-node.d.ts +57 -0
  410. package/dist/diagram/layout/smartart-layout-interpreter-cycle-item-node.d.ts.map +1 -0
  411. package/dist/diagram/layout/smartart-layout-interpreter-cycle-ring-bulge.d.ts +34 -0
  412. package/dist/diagram/layout/smartart-layout-interpreter-cycle-ring-bulge.d.ts.map +1 -0
  413. package/dist/diagram/layout/smartart-layout-interpreter-cycle-ring-item.d.ts +39 -0
  414. package/dist/diagram/layout/smartart-layout-interpreter-cycle-ring-item.d.ts.map +1 -0
  415. package/dist/diagram/layout/smartart-layout-interpreter-cycle-ring-nested-hub.d.ts +22 -0
  416. package/dist/diagram/layout/smartart-layout-interpreter-cycle-ring-nested-hub.d.ts.map +1 -0
  417. package/dist/diagram/layout/smartart-layout-interpreter-cycle-ring-offset.d.ts +43 -0
  418. package/dist/diagram/layout/smartart-layout-interpreter-cycle-ring-offset.d.ts.map +1 -0
  419. package/dist/diagram/layout/smartart-layout-interpreter-cycle-ring.d.ts +76 -0
  420. package/dist/diagram/layout/smartart-layout-interpreter-cycle-ring.d.ts.map +1 -0
  421. package/dist/diagram/layout/smartart-layout-interpreter-cycle-sibtrans.d.ts +40 -0
  422. package/dist/diagram/layout/smartart-layout-interpreter-cycle-sibtrans.d.ts.map +1 -0
  423. package/dist/diagram/layout/smartart-layout-interpreter-cycle.d.ts +69 -0
  424. package/dist/diagram/layout/smartart-layout-interpreter-cycle.d.ts.map +1 -0
  425. package/dist/diagram/layout/smartart-layout-interpreter-dispatch.d.ts +18 -0
  426. package/dist/diagram/layout/smartart-layout-interpreter-dispatch.d.ts.map +1 -0
  427. package/dist/diagram/layout/smartart-layout-interpreter-flow-direction.d.ts +29 -0
  428. package/dist/diagram/layout/smartart-layout-interpreter-flow-direction.d.ts.map +1 -0
  429. package/dist/diagram/layout/smartart-layout-interpreter-flow.d.ts +49 -0
  430. package/dist/diagram/layout/smartart-layout-interpreter-flow.d.ts.map +1 -0
  431. package/dist/diagram/layout/smartart-layout-interpreter-hierarchy-descendant.d.ts +60 -0
  432. package/dist/diagram/layout/smartart-layout-interpreter-hierarchy-descendant.d.ts.map +1 -0
  433. package/dist/diagram/layout/smartart-layout-interpreter-hierarchy-fontfit.d.ts +45 -0
  434. package/dist/diagram/layout/smartart-layout-interpreter-hierarchy-fontfit.d.ts.map +1 -0
  435. package/dist/diagram/layout/smartart-layout-interpreter-hub-detect.d.ts +26 -0
  436. package/dist/diagram/layout/smartart-layout-interpreter-hub-detect.d.ts.map +1 -0
  437. package/dist/diagram/layout/smartart-layout-interpreter-hub.d.ts +62 -0
  438. package/dist/diagram/layout/smartart-layout-interpreter-hub.d.ts.map +1 -0
  439. package/dist/diagram/layout/smartart-layout-interpreter-item-role-compound.d.ts +36 -0
  440. package/dist/diagram/layout/smartart-layout-interpreter-item-role-compound.d.ts.map +1 -0
  441. package/dist/diagram/layout/smartart-layout-interpreter-item-role-orientation.d.ts +80 -0
  442. package/dist/diagram/layout/smartart-layout-interpreter-item-role-orientation.d.ts.map +1 -0
  443. package/dist/diagram/layout/smartart-layout-interpreter-item-role-shared.d.ts +102 -0
  444. package/dist/diagram/layout/smartart-layout-interpreter-item-role-shared.d.ts.map +1 -0
  445. package/dist/diagram/layout/smartart-layout-interpreter-item-role-stack-columns.d.ts +23 -0
  446. package/dist/diagram/layout/smartart-layout-interpreter-item-role-stack-columns.d.ts.map +1 -0
  447. package/dist/diagram/layout/smartart-layout-interpreter-item-role-stack-fields.d.ts +77 -0
  448. package/dist/diagram/layout/smartart-layout-interpreter-item-role-stack-fields.d.ts.map +1 -0
  449. package/dist/diagram/layout/smartart-layout-interpreter-item-role-stack-rect.d.ts +20 -0
  450. package/dist/diagram/layout/smartart-layout-interpreter-item-role-stack-rect.d.ts.map +1 -0
  451. package/dist/diagram/layout/smartart-layout-interpreter-item-role-stack.d.ts +53 -0
  452. package/dist/diagram/layout/smartart-layout-interpreter-item-role-stack.d.ts.map +1 -0
  453. package/dist/diagram/layout/smartart-layout-interpreter-item-role-transition.d.ts +50 -0
  454. package/dist/diagram/layout/smartart-layout-interpreter-item-role-transition.d.ts.map +1 -0
  455. package/dist/diagram/layout/smartart-layout-interpreter-item-roles-recursive.d.ts +87 -0
  456. package/dist/diagram/layout/smartart-layout-interpreter-item-roles-recursive.d.ts.map +1 -0
  457. package/dist/diagram/layout/smartart-layout-interpreter-item-roles-unwrap.d.ts +57 -0
  458. package/dist/diagram/layout/smartart-layout-interpreter-item-roles-unwrap.d.ts.map +1 -0
  459. package/dist/diagram/layout/smartart-layout-interpreter-item-roles.d.ts +109 -0
  460. package/dist/diagram/layout/smartart-layout-interpreter-item-roles.d.ts.map +1 -0
  461. package/dist/diagram/layout/smartart-layout-interpreter-linear-content-size.d.ts +42 -0
  462. package/dist/diagram/layout/smartart-layout-interpreter-linear-content-size.d.ts.map +1 -0
  463. package/dist/diagram/layout/smartart-layout-interpreter-linear-item-aspect.d.ts +94 -0
  464. package/dist/diagram/layout/smartart-layout-interpreter-linear-item-aspect.d.ts.map +1 -0
  465. package/dist/diagram/layout/smartart-layout-interpreter-linear-main-axis.d.ts +17 -0
  466. package/dist/diagram/layout/smartart-layout-interpreter-linear-main-axis.d.ts.map +1 -0
  467. package/dist/diagram/layout/smartart-layout-interpreter-linear-shared.d.ts +21 -0
  468. package/dist/diagram/layout/smartart-layout-interpreter-linear-shared.d.ts.map +1 -0
  469. package/dist/diagram/layout/smartart-layout-interpreter-linear-table.d.ts +76 -0
  470. package/dist/diagram/layout/smartart-layout-interpreter-linear-table.d.ts.map +1 -0
  471. package/dist/diagram/layout/smartart-layout-interpreter-linear.d.ts +20 -0
  472. package/dist/diagram/layout/smartart-layout-interpreter-linear.d.ts.map +1 -0
  473. package/dist/diagram/layout/smartart-layout-interpreter-model.d.ts +77 -0
  474. package/dist/diagram/layout/smartart-layout-interpreter-model.d.ts.map +1 -0
  475. package/dist/diagram/layout/smartart-layout-interpreter-named-rules.d.ts +93 -0
  476. package/dist/diagram/layout/smartart-layout-interpreter-named-rules.d.ts.map +1 -0
  477. package/dist/diagram/layout/smartart-layout-interpreter-position-family.d.ts +58 -0
  478. package/dist/diagram/layout/smartart-layout-interpreter-position-family.d.ts.map +1 -0
  479. package/dist/diagram/layout/smartart-layout-interpreter-preset-node.d.ts +61 -0
  480. package/dist/diagram/layout/smartart-layout-interpreter-preset-node.d.ts.map +1 -0
  481. package/dist/diagram/layout/smartart-layout-interpreter-presof-choose.d.ts +29 -0
  482. package/dist/diagram/layout/smartart-layout-interpreter-presof-choose.d.ts.map +1 -0
  483. package/dist/diagram/layout/smartart-layout-interpreter-pyramid-bands.d.ts +41 -0
  484. package/dist/diagram/layout/smartart-layout-interpreter-pyramid-bands.d.ts.map +1 -0
  485. package/dist/diagram/layout/smartart-layout-interpreter-pyramid.d.ts +100 -0
  486. package/dist/diagram/layout/smartart-layout-interpreter-pyramid.d.ts.map +1 -0
  487. package/dist/diagram/layout/smartart-layout-interpreter-render.d.ts +86 -0
  488. package/dist/diagram/layout/smartart-layout-interpreter-render.d.ts.map +1 -0
  489. package/dist/diagram/layout/smartart-layout-interpreter-snake.d.ts +18 -0
  490. package/dist/diagram/layout/smartart-layout-interpreter-snake.d.ts.map +1 -0
  491. package/dist/diagram/layout/smartart-layout-interpreter-tree-location.d.ts +28 -0
  492. package/dist/diagram/layout/smartart-layout-interpreter-tree-location.d.ts.map +1 -0
  493. package/dist/diagram/layout/smartart-layout-interpreter-when-numeric.d.ts +15 -0
  494. package/dist/diagram/layout/smartart-layout-interpreter-when-numeric.d.ts.map +1 -0
  495. package/dist/diagram/layout/smartart-layout-interpreter-when-var.d.ts +12 -0
  496. package/dist/diagram/layout/smartart-layout-interpreter-when-var.d.ts.map +1 -0
  497. package/dist/diagram/layout/smartart-layout-interpreter-when.d.ts +69 -0
  498. package/dist/diagram/layout/smartart-layout-interpreter-when.d.ts.map +1 -0
  499. package/dist/diagram/layout/smartart-layout-interpreter.d.ts +80 -0
  500. package/dist/diagram/layout/smartart-layout-interpreter.d.ts.map +1 -0
  501. package/dist/diagram/layout/smartart-layout-item-font-role.d.ts +80 -0
  502. package/dist/diagram/layout/smartart-layout-item-font-role.d.ts.map +1 -0
  503. package/dist/diagram/layout/smartart-layout-item-font-size.d.ts +129 -0
  504. package/dist/diagram/layout/smartart-layout-item-font-size.d.ts.map +1 -0
  505. package/dist/diagram/layout/smartart-layout-item-font-tier-fit.d.ts +70 -0
  506. package/dist/diagram/layout/smartart-layout-item-font-tier-fit.d.ts.map +1 -0
  507. package/dist/diagram/layout/smartart-layout-item-font-tier.d.ts +139 -0
  508. package/dist/diagram/layout/smartart-layout-item-font-tier.d.ts.map +1 -0
  509. package/dist/diagram/layout/smartart-layout-item-tx-anchor.d.ts +105 -0
  510. package/dist/diagram/layout/smartart-layout-item-tx-anchor.d.ts.map +1 -0
  511. package/dist/diagram/layout/smartart-layout-shape-polygon.d.ts +17 -0
  512. package/dist/diagram/layout/smartart-layout-shape-polygon.d.ts.map +1 -0
  513. package/dist/diagram/layout/smartart-layout-shape-preset.d.ts +127 -0
  514. package/dist/diagram/layout/smartart-layout-shape-preset.d.ts.map +1 -0
  515. package/dist/diagram/layout/smartart-layout-snake-grid.d.ts +43 -0
  516. package/dist/diagram/layout/smartart-layout-snake-grid.d.ts.map +1 -0
  517. package/dist/diagram/layout/smartart-layout-style-helpers.d.ts +84 -0
  518. package/dist/diagram/layout/smartart-layout-style-helpers.d.ts.map +1 -0
  519. package/dist/diagram/layout/smartart-layout-types.d.ts +253 -0
  520. package/dist/diagram/layout/smartart-layout-types.d.ts.map +1 -0
  521. package/dist/diagram/layout/smartart-line-pitch.d.ts +29 -0
  522. package/dist/diagram/layout/smartart-line-pitch.d.ts.map +1 -0
  523. package/dist/diagram/layout/smartart-node-role-colors.d.ts +30 -0
  524. package/dist/diagram/layout/smartart-node-role-colors.d.ts.map +1 -0
  525. package/dist/diagram/layout/smartart-node-tree-axis.d.ts +91 -0
  526. package/dist/diagram/layout/smartart-node-tree-axis.d.ts.map +1 -0
  527. package/dist/diagram/layout/smartart-text-wrap-fit.d.ts +84 -0
  528. package/dist/diagram/layout/smartart-text-wrap-fit.d.ts.map +1 -0
  529. package/dist/diagram/layout/smartart-tree.d.ts +33 -0
  530. package/dist/diagram/layout/smartart-tree.d.ts.map +1 -0
  531. package/dist/diagram/model/constraint-rules.d.ts +31 -0
  532. package/dist/diagram/model/constraint-rules.d.ts.map +1 -0
  533. package/dist/diagram/model/data.d.ts +109 -0
  534. package/dist/diagram/model/data.d.ts.map +1 -0
  535. package/dist/diagram/model/index.d.ts +7 -0
  536. package/dist/diagram/model/index.d.ts.map +1 -0
  537. package/dist/diagram/model/layout-definition.d.ts +276 -0
  538. package/dist/diagram/model/layout-definition.d.ts.map +1 -0
  539. package/dist/diagram/model/layout-primitives.d.ts +82 -0
  540. package/dist/diagram/model/layout-primitives.d.ts.map +1 -0
  541. package/dist/diagram/model/node.d.ts +194 -0
  542. package/dist/diagram/model/node.d.ts.map +1 -0
  543. package/dist/diagram/model/style-definition.d.ts +131 -0
  544. package/dist/diagram/model/style-definition.d.ts.map +1 -0
  545. package/dist/docx/chart-paint.d.ts +14 -0
  546. package/dist/docx/chart-paint.d.ts.map +1 -0
  547. package/dist/docx/chart.d.ts +43 -0
  548. package/dist/docx/chart.d.ts.map +1 -0
  549. package/dist/docx/drawing.d.ts.map +1 -1
  550. package/dist/docx/embedded.cjs +1393 -326
  551. package/dist/docx/embedded.mjs +1393 -326
  552. package/dist/docx/index.cjs +4042 -683
  553. package/dist/docx/index.d.ts +2 -0
  554. package/dist/docx/index.d.ts.map +1 -1
  555. package/dist/docx/index.mjs +4038 -684
  556. package/dist/docx/inline-model.d.ts +3 -0
  557. package/dist/docx/inline-model.d.ts.map +1 -1
  558. package/dist/docx/layout/adapter.d.ts.map +1 -1
  559. package/dist/docx/layout/index.cjs +2672 -88
  560. package/dist/docx/layout/index.mjs +2673 -89
  561. package/dist/docx/layout/input.d.ts +5 -0
  562. package/dist/docx/layout/input.d.ts.map +1 -1
  563. package/dist/docx/load/index.cjs +1616 -549
  564. package/dist/docx/load/index.mjs +1616 -549
  565. package/dist/docx/parse.d.ts.map +1 -1
  566. package/dist/docx/ui/chart-spec.d.ts +10 -0
  567. package/dist/docx/ui/chart-spec.d.ts.map +1 -0
  568. package/dist/docx/ui/index.cjs +2600 -186
  569. package/dist/docx/ui/index.d.ts +1 -0
  570. package/dist/docx/ui/index.d.ts.map +1 -1
  571. package/dist/docx/ui/index.mjs +2599 -188
  572. package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
  573. package/dist/docx/ui/run-adapter.d.ts.map +1 -1
  574. package/dist/drawingml/write-line.d.ts +7 -0
  575. package/dist/drawingml/write-line.d.ts.map +1 -0
  576. package/dist/geometry/ooxml-arc.d.ts +31 -0
  577. package/dist/geometry/ooxml-arc.d.ts.map +1 -0
  578. package/dist/geometry/preset-shape-evaluator.d.ts +73 -0
  579. package/dist/geometry/preset-shape-evaluator.d.ts.map +1 -0
  580. package/dist/index.cjs +34835 -18367
  581. package/dist/index.mjs +34831 -18367
  582. package/dist/opc/embedded-packages.d.ts +11 -0
  583. package/dist/opc/embedded-packages.d.ts.map +1 -0
  584. package/dist/opc/index.cjs +365 -70
  585. package/dist/opc/index.d.ts +1 -0
  586. package/dist/opc/index.d.ts.map +1 -1
  587. package/dist/opc/index.mjs +353 -71
  588. package/dist/opc/properties/app.d.ts +9 -3
  589. package/dist/opc/properties/app.d.ts.map +1 -1
  590. package/dist/opc/properties/core.d.ts +5 -1
  591. package/dist/opc/properties/core.d.ts.map +1 -1
  592. package/dist/opc/properties/custom.d.ts +19 -0
  593. package/dist/opc/properties/custom.d.ts.map +1 -1
  594. package/dist/opc/properties/index.d.ts +6 -3
  595. package/dist/opc/properties/index.d.ts.map +1 -1
  596. package/dist/opc/properties/patch.d.ts +38 -0
  597. package/dist/opc/properties/patch.d.ts.map +1 -0
  598. package/dist/opc/properties/title-groups.d.ts +30 -0
  599. package/dist/opc/properties/title-groups.d.ts.map +1 -0
  600. package/dist/opc/properties/types.d.ts +15 -0
  601. package/dist/opc/properties/types.d.ts.map +1 -1
  602. package/dist/pptx/automation/index.cjs +9023 -7151
  603. package/dist/pptx/automation/index.d.ts +4 -4
  604. package/dist/pptx/automation/index.mjs +6 -6
  605. package/dist/pptx/chunks/{index-BYkdcS8J.d.ts → index-EZJZ7USt.d.ts} +907 -962
  606. package/dist/pptx/chunks/index-EZJZ7USt.d.ts.map +1 -0
  607. package/dist/pptx/chunks/{index-BHqL5KXH.d.ts → index-JNv7AJx5.d.ts} +163 -210
  608. package/dist/pptx/chunks/index-JNv7AJx5.d.ts.map +1 -0
  609. package/dist/pptx/chunks/{smart-art-CO2jmJFf.d.ts → smart-art-Q2kZQtHh.d.ts} +436 -374
  610. package/dist/pptx/chunks/smart-art-Q2kZQtHh.d.ts.map +1 -0
  611. package/dist/pptx/chunks/{text-operations-DEJ7alZR.d.ts → text-operations-DtCxXrMh.d.ts} +55 -4
  612. package/dist/pptx/chunks/text-operations-DtCxXrMh.d.ts.map +1 -0
  613. package/dist/pptx/cli/index.cjs +8702 -6830
  614. package/dist/pptx/cli/index.d.ts +1 -1
  615. package/dist/pptx/cli/index.mjs +5 -5
  616. package/dist/pptx/converter/index.cjs +7124 -7136
  617. package/dist/pptx/converter/index.d.ts +1 -1
  618. package/dist/pptx/converter/index.mjs +3 -3
  619. package/dist/pptx/editor/render/table-cell-edit.cjs +7 -3
  620. package/dist/pptx/editor/render/table-cell-edit.d.ts +16 -1
  621. package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
  622. package/dist/pptx/editor/render/table-cell-edit.mjs +1 -1
  623. package/dist/pptx/editor/render/table-cell-merge.cjs +3 -3
  624. package/dist/pptx/editor/render/table-cell-merge.mjs +1 -1
  625. package/dist/pptx/editor/render/table-data-grid-ops.cjs +7 -7
  626. package/dist/pptx/editor/render/table-data-grid-ops.mjs +2 -2
  627. package/dist/pptx/editor/render/table-layout.cjs +6 -6
  628. package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
  629. package/dist/pptx/editor/render/table-layout.mjs +1 -1
  630. package/dist/pptx/editor/render/table-merge.cjs +5 -5
  631. package/dist/pptx/editor/render/table-merge.mjs +1 -1
  632. package/dist/pptx/index.cjs +9345 -7304
  633. package/dist/pptx/index.d.ts +5 -5
  634. package/dist/pptx/index.mjs +6 -6
  635. package/dist/pptx/smartart-layouts/index.cjs +135 -106
  636. package/dist/pptx/smartart-layouts/index.d.ts +1 -1
  637. package/dist/pptx/smartart-layouts/index.mjs +1 -1
  638. package/dist/teams/content.d.ts.map +1 -1
  639. package/dist/teams/index.cjs +3778 -1999
  640. package/dist/teams/index.d.ts +1 -0
  641. package/dist/teams/index.d.ts.map +1 -1
  642. package/dist/teams/index.mjs +3777 -1999
  643. package/dist/teams/server-file-storage.d.ts +11 -0
  644. package/dist/teams/server-file-storage.d.ts.map +1 -0
  645. package/dist/teams/store.d.ts +2 -0
  646. package/dist/teams/store.d.ts.map +1 -1
  647. package/dist/teams/stored-file.d.ts.map +1 -1
  648. package/dist/{xlsx/layout/font-family.d.ts → text/css-font-family.d.ts} +1 -1
  649. package/dist/text/css-font-family.d.ts.map +1 -0
  650. package/dist/text/font-metrics/font-advance-widths-aptos-display.generated.d.ts +10 -0
  651. package/dist/text/font-metrics/font-advance-widths-aptos-display.generated.d.ts.map +1 -0
  652. package/dist/text/font-metrics/font-advance-widths-aptos.generated.d.ts +10 -0
  653. package/dist/text/font-metrics/font-advance-widths-aptos.generated.d.ts.map +1 -0
  654. package/dist/text/font-metrics/font-advance-widths-arial.generated.d.ts +10 -0
  655. package/dist/text/font-metrics/font-advance-widths-arial.generated.d.ts.map +1 -0
  656. package/dist/text/font-metrics/font-advance-widths-calibri-light.generated.d.ts +10 -0
  657. package/dist/text/font-metrics/font-advance-widths-calibri-light.generated.d.ts.map +1 -0
  658. package/dist/text/font-metrics/font-advance-widths-calibri.generated.d.ts +10 -0
  659. package/dist/text/font-metrics/font-advance-widths-calibri.generated.d.ts.map +1 -0
  660. package/dist/text/font-metrics/font-advance-widths-segoe-ui.generated.d.ts +10 -0
  661. package/dist/text/font-metrics/font-advance-widths-segoe-ui.generated.d.ts.map +1 -0
  662. package/dist/text/font-metrics/font-advance-widths-times-new-roman.generated.d.ts +10 -0
  663. package/dist/text/font-metrics/font-advance-widths-times-new-roman.generated.d.ts.map +1 -0
  664. package/dist/text/font-metrics/font-advance-widths.generated.d.ts +48 -0
  665. package/dist/text/font-metrics/font-advance-widths.generated.d.ts.map +1 -0
  666. package/dist/text/font-metrics/font-kerning.d.ts +19 -0
  667. package/dist/text/font-metrics/font-kerning.d.ts.map +1 -0
  668. package/dist/visio/index.cjs +645 -119
  669. package/dist/visio/index.mjs +645 -119
  670. package/dist/visio/theme-color.d.ts +13 -3
  671. package/dist/visio/theme-color.d.ts.map +1 -1
  672. package/dist/visio/theme-resolve.d.ts +2 -1
  673. package/dist/visio/theme-resolve.d.ts.map +1 -1
  674. package/dist/visio/theme.d.ts +5 -2
  675. package/dist/visio/theme.d.ts.map +1 -1
  676. package/dist/xlsx/collab/adapter.d.ts +18 -0
  677. package/dist/xlsx/collab/adapter.d.ts.map +1 -0
  678. package/dist/xlsx/collab/apply.d.ts +8 -0
  679. package/dist/xlsx/collab/apply.d.ts.map +1 -0
  680. package/dist/xlsx/collab/bind.d.ts +34 -0
  681. package/dist/xlsx/collab/bind.d.ts.map +1 -0
  682. package/dist/xlsx/collab/codec.d.ts +35 -0
  683. package/dist/xlsx/collab/codec.d.ts.map +1 -0
  684. package/dist/xlsx/collab/dirty.d.ts +23 -0
  685. package/dist/xlsx/collab/dirty.d.ts.map +1 -0
  686. package/dist/xlsx/collab/index.cjs +1245 -0
  687. package/dist/xlsx/collab/index.d.ts +10 -0
  688. package/dist/xlsx/collab/index.d.ts.map +1 -0
  689. package/dist/xlsx/collab/index.mjs +1207 -0
  690. package/dist/xlsx/collab/lines.d.ts +22 -0
  691. package/dist/xlsx/collab/lines.d.ts.map +1 -0
  692. package/dist/xlsx/collab/names.d.ts +16 -0
  693. package/dist/xlsx/collab/names.d.ts.map +1 -0
  694. package/dist/xlsx/collab/presence.d.ts +31 -0
  695. package/dist/xlsx/collab/presence.d.ts.map +1 -0
  696. package/dist/xlsx/collab/schema.d.ts +30 -0
  697. package/dist/xlsx/collab/schema.d.ts.map +1 -0
  698. package/dist/xlsx/collab/sheets.d.ts +34 -0
  699. package/dist/xlsx/collab/sheets.d.ts.map +1 -0
  700. package/dist/xlsx/collab/styles.d.ts +26 -0
  701. package/dist/xlsx/collab/styles.d.ts.map +1 -0
  702. package/dist/xlsx/collab/write.d.ts +14 -0
  703. package/dist/xlsx/collab/write.d.ts.map +1 -0
  704. package/dist/xlsx/edit/chart-colors.d.ts +2 -2
  705. package/dist/xlsx/edit/chart-colors.d.ts.map +1 -1
  706. package/dist/xlsx/edit/chart-element-fill.d.ts +3 -3
  707. package/dist/xlsx/edit/chart-element-fill.d.ts.map +1 -1
  708. package/dist/xlsx/edit/chart-series-fill.d.ts +2 -2
  709. package/dist/xlsx/edit/chart-series-fill.d.ts.map +1 -1
  710. package/dist/xlsx/edit/chart-series-gradient.d.ts +3 -3
  711. package/dist/xlsx/edit/chart-series-gradient.d.ts.map +1 -1
  712. package/dist/xlsx/edit/chart-series-target.d.ts +15 -0
  713. package/dist/xlsx/edit/chart-series-target.d.ts.map +1 -0
  714. package/dist/xlsx/edit/chart-series-transparency.d.ts +2 -2
  715. package/dist/xlsx/edit/chart-series-transparency.d.ts.map +1 -1
  716. package/dist/xlsx/edit/external.d.ts +28 -0
  717. package/dist/xlsx/edit/external.d.ts.map +1 -0
  718. package/dist/xlsx/edit/index.d.ts +1 -0
  719. package/dist/xlsx/edit/index.d.ts.map +1 -1
  720. package/dist/xlsx/edit/session-calc.d.ts +7 -0
  721. package/dist/xlsx/edit/session-calc.d.ts.map +1 -1
  722. package/dist/xlsx/edit/session.d.ts.map +1 -1
  723. package/dist/xlsx/edit/types.d.ts +14 -1
  724. package/dist/xlsx/edit/types.d.ts.map +1 -1
  725. package/dist/xlsx/formula/engine.d.ts.map +1 -1
  726. package/dist/xlsx/formula/lexemes.d.ts +6 -0
  727. package/dist/xlsx/formula/lexemes.d.ts.map +1 -1
  728. package/dist/xlsx/formula/tokenizer.d.ts.map +1 -1
  729. package/dist/xlsx/index.cjs +4599 -2399
  730. package/dist/xlsx/index.mjs +4589 -2400
  731. package/dist/xlsx/layout/cell-view.d.ts.map +1 -1
  732. package/dist/xlsx/layout/chart-view.d.ts +3 -54
  733. package/dist/xlsx/layout/chart-view.d.ts.map +1 -1
  734. package/dist/xlsx/layout/colors.d.ts +1 -4
  735. package/dist/xlsx/layout/colors.d.ts.map +1 -1
  736. package/dist/xlsx/layout/index.d.ts +7 -4
  737. package/dist/xlsx/layout/index.d.ts.map +1 -1
  738. package/dist/xlsx/layout/remote-selections.d.ts +40 -0
  739. package/dist/xlsx/layout/remote-selections.d.ts.map +1 -0
  740. package/dist/xlsx/layout/sparkline-data.d.ts +19 -0
  741. package/dist/xlsx/layout/sparkline-data.d.ts.map +1 -0
  742. package/dist/xlsx/layout/sparkline-view.d.ts +52 -0
  743. package/dist/xlsx/layout/sparkline-view.d.ts.map +1 -0
  744. package/dist/xlsx/layout/tint.d.ts +3 -12
  745. package/dist/xlsx/layout/tint.d.ts.map +1 -1
  746. package/dist/xlsx/layout/types.d.ts +3 -0
  747. package/dist/xlsx/layout/types.d.ts.map +1 -1
  748. package/dist/xlsx/load/index.cjs +3036 -1286
  749. package/dist/xlsx/load/index.mjs +3036 -1286
  750. package/dist/xlsx/model-sparklines.d.ts +52 -0
  751. package/dist/xlsx/model-sparklines.d.ts.map +1 -0
  752. package/dist/xlsx/model.d.ts +10 -47
  753. package/dist/xlsx/model.d.ts.map +1 -1
  754. package/dist/xlsx/read/chart.d.ts +1 -4
  755. package/dist/xlsx/read/chart.d.ts.map +1 -1
  756. package/dist/xlsx/read/index.d.ts +1 -0
  757. package/dist/xlsx/read/index.d.ts.map +1 -1
  758. package/dist/xlsx/read/sheet-data-source.d.ts +10 -0
  759. package/dist/xlsx/read/sheet-data-source.d.ts.map +1 -0
  760. package/dist/xlsx/read/sparklines.d.ts +12 -0
  761. package/dist/xlsx/read/sparklines.d.ts.map +1 -0
  762. package/dist/xlsx/read/worksheet.d.ts.map +1 -1
  763. package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
  764. package/dist/xlsx/ui/context.d.ts +15 -1
  765. package/dist/xlsx/ui/context.d.ts.map +1 -1
  766. package/dist/xlsx/ui/grid/cell-items.d.ts.map +1 -1
  767. package/dist/xlsx/ui/grid/cell-paint.d.ts +1 -1
  768. package/dist/xlsx/ui/grid/cell-paint.d.ts.map +1 -1
  769. package/dist/xlsx/ui/grid/view-cache.d.ts.map +1 -1
  770. package/dist/xlsx/ui/index.cjs +1127 -559
  771. package/dist/xlsx/ui/index.mjs +1127 -560
  772. package/dist/xlsx/ui/locales/de/collab.d.ts +2 -0
  773. package/dist/xlsx/ui/locales/de/collab.d.ts.map +1 -0
  774. package/dist/xlsx/ui/locales/de/index.d.ts.map +1 -1
  775. package/dist/xlsx/ui/locales/en/collab.d.ts +2 -0
  776. package/dist/xlsx/ui/locales/en/collab.d.ts.map +1 -0
  777. package/dist/xlsx/ui/locales/en/index.d.ts.map +1 -1
  778. package/dist/xlsx/ui/locales/es/collab.d.ts +2 -0
  779. package/dist/xlsx/ui/locales/es/collab.d.ts.map +1 -0
  780. package/dist/xlsx/ui/locales/es/index.d.ts.map +1 -1
  781. package/dist/xlsx/ui/locales/fr/collab.d.ts +2 -0
  782. package/dist/xlsx/ui/locales/fr/collab.d.ts.map +1 -0
  783. package/dist/xlsx/ui/locales/fr/index.d.ts.map +1 -1
  784. package/dist/xlsx/ui/locales/zh-CN/collab.d.ts +2 -0
  785. package/dist/xlsx/ui/locales/zh-CN/collab.d.ts.map +1 -0
  786. package/dist/xlsx/ui/locales/zh-CN/index.d.ts.map +1 -1
  787. package/dist/xlsx/ui/ribbon/icon-paths.d.ts.map +1 -1
  788. package/dist/xlsx/write/chart-colors.d.ts +3 -0
  789. package/dist/xlsx/write/chart-colors.d.ts.map +1 -1
  790. package/dist/xlsx/write/chart-space.d.ts +5 -0
  791. package/dist/xlsx/write/chart-space.d.ts.map +1 -0
  792. package/dist/xlsx/write/chart-title.d.ts +4 -1
  793. package/dist/xlsx/write/chart-title.d.ts.map +1 -1
  794. package/dist/xlsx/write/chart.d.ts +4 -1
  795. package/dist/xlsx/write/chart.d.ts.map +1 -1
  796. package/dist/xml/index.cjs +162 -0
  797. package/dist/xml/index.d.ts +1 -0
  798. package/dist/xml/index.d.ts.map +1 -1
  799. package/dist/xml/index.mjs +161 -1
  800. package/dist/xml/lite.d.ts +30 -0
  801. package/dist/xml/lite.d.ts.map +1 -0
  802. package/package.json +6 -1
  803. package/dist/pptx/chunks/index-BHqL5KXH.d.ts.map +0 -1
  804. package/dist/pptx/chunks/index-BYkdcS8J.d.ts.map +0 -1
  805. package/dist/pptx/chunks/smart-art-CO2jmJFf.d.ts.map +0 -1
  806. package/dist/pptx/chunks/text-operations-DEJ7alZR.d.ts.map +0 -1
  807. package/dist/xlsx/layout/chart-appearance.d.ts.map +0 -1
  808. package/dist/xlsx/layout/chart-colors.d.ts +0 -9
  809. package/dist/xlsx/layout/chart-colors.d.ts.map +0 -1
  810. package/dist/xlsx/layout/chart-scale.d.ts.map +0 -1
  811. package/dist/xlsx/layout/chart-spacing.d.ts +0 -6
  812. package/dist/xlsx/layout/chart-spacing.d.ts.map +0 -1
  813. package/dist/xlsx/layout/chart-svg-appearance.d.ts.map +0 -1
  814. package/dist/xlsx/layout/chart-svg-bars.d.ts.map +0 -1
  815. package/dist/xlsx/layout/chart-svg-cartesian.d.ts.map +0 -1
  816. package/dist/xlsx/layout/chart-svg-legend.d.ts.map +0 -1
  817. package/dist/xlsx/layout/chart-svg-radial.d.ts.map +0 -1
  818. package/dist/xlsx/layout/chart-svg-text-metrics.d.ts.map +0 -1
  819. package/dist/xlsx/layout/chart-svg-title-text.d.ts.map +0 -1
  820. package/dist/xlsx/layout/chart-svg-util.d.ts.map +0 -1
  821. package/dist/xlsx/layout/chart-svg.d.ts.map +0 -1
  822. package/dist/xlsx/layout/chart-title-text.d.ts +0 -14
  823. package/dist/xlsx/layout/chart-title-text.d.ts.map +0 -1
  824. package/dist/xlsx/layout/font-family.d.ts.map +0 -1
  825. /package/dist/{xlsx/layout → chart/render}/chart-scale.d.ts +0 -0
  826. /package/dist/{xlsx/layout → chart/render}/chart-svg-bars.d.ts +0 -0
  827. /package/dist/{xlsx/layout → chart/render}/chart-svg-cartesian.d.ts +0 -0
  828. /package/dist/{xlsx/layout → chart/render}/chart-svg-legend.d.ts +0 -0
  829. /package/dist/{xlsx/layout → chart/render}/chart-svg-radial.d.ts +0 -0
  830. /package/dist/{xlsx/layout → chart/render}/chart-svg-text-metrics.d.ts +0 -0
  831. /package/dist/{xlsx/layout → chart/render}/chart-svg-title-text.d.ts +0 -0
  832. /package/dist/{xlsx/layout → chart/render}/chart-svg-util.d.ts +0 -0
  833. /package/dist/{xlsx/layout → chart/render}/chart-svg.d.ts +0 -0
@@ -105,31 +105,31 @@ function quoteSheetName(name) {
105
105
  }
106
106
 
107
107
  // xlsx/address-r1c1.ts
108
- var dimension = (text, base, size) => {
109
- if (!text) return base;
110
- if (text.startsWith("[")) {
111
- const offset2 = Number(text.slice(1, -1));
108
+ var dimension = (text2, base, size) => {
109
+ if (!text2) return base;
110
+ if (text2.startsWith("[")) {
111
+ const offset2 = Number(text2.slice(1, -1));
112
112
  if (Math.abs(offset2) >= size) return void 0;
113
113
  return ((base + offset2) % size + size) % size;
114
114
  }
115
- const at = Number(text) - 1;
115
+ const at = Number(text2) - 1;
116
116
  return at >= 0 && at < size ? at : void 0;
117
117
  };
118
- function corner(text, base) {
119
- const cell = /^R(\[[+-]?\d+\]|\d+)?C(\[[+-]?\d+\]|\d+)?$/i.exec(text);
118
+ function corner(text2, base) {
119
+ const cell = /^R(\[[+-]?\d+\]|\d+)?C(\[[+-]?\d+\]|\d+)?$/i.exec(text2);
120
120
  if (cell) {
121
121
  const row2 = dimension(cell[1], base.row, MAX_ROW + 1);
122
122
  const col = dimension(cell[2], base.col, MAX_COL + 1);
123
123
  if (row2 === void 0 || col === void 0) return void 0;
124
124
  return { kind: "cell", range: { start: { row: row2, col }, end: { row: row2, col } } };
125
125
  }
126
- const rowMatch = /^R(\[[+-]?\d+\]|\d+)?$/i.exec(text);
126
+ const rowMatch = /^R(\[[+-]?\d+\]|\d+)?$/i.exec(text2);
127
127
  if (rowMatch) {
128
128
  const row2 = dimension(rowMatch[1], base.row, MAX_ROW + 1);
129
129
  if (row2 === void 0) return void 0;
130
130
  return { kind: "row", range: { start: { row: row2, col: 0 }, end: { row: row2, col: MAX_COL } } };
131
131
  }
132
- const colMatch = /^C(\[[+-]?\d+\]|\d+)?$/i.exec(text);
132
+ const colMatch = /^C(\[[+-]?\d+\]|\d+)?$/i.exec(text2);
133
133
  if (colMatch) {
134
134
  const col = dimension(colMatch[1], base.col, MAX_COL + 1);
135
135
  if (col === void 0) return void 0;
@@ -137,10 +137,10 @@ function corner(text, base) {
137
137
  }
138
138
  return void 0;
139
139
  }
140
- function parseR1C1Range(text, base) {
140
+ function parseR1C1Range(text2, base) {
141
141
  if (!Number.isInteger(base.row) || !Number.isInteger(base.col) || base.row < 0 || base.row > MAX_ROW || base.col < 0 || base.col > MAX_COL)
142
142
  return void 0;
143
- const parts = text.trim().split(":");
143
+ const parts = text2.trim().split(":");
144
144
  if (parts.length > 2) return void 0;
145
145
  const a = corner(parts[0] ?? "", base);
146
146
  const b = parts.length === 1 ? a : corner(parts[1] ?? "", base);
@@ -325,27 +325,27 @@ function styleAt(workbook, styleId) {
325
325
  }
326
326
  function internStyle(workbook, style2) {
327
327
  const key = styleKey(style2);
328
- const cache2 = styleCache(workbook);
329
- const known = cache2.get(key);
328
+ const cache3 = styleCache(workbook);
329
+ const known = cache3.get(key);
330
330
  if (known !== void 0 && workbook.styles[known] && styleKey(workbook.styles[known]) === key)
331
331
  return known;
332
332
  const index2 = workbook.styles.findIndex((candidate) => styleKey(candidate) === key);
333
333
  if (index2 >= 0) {
334
- cache2.set(key, index2);
334
+ cache3.set(key, index2);
335
335
  return index2;
336
336
  }
337
337
  workbook.styles.push(style2);
338
- cache2.set(key, workbook.styles.length - 1);
338
+ cache3.set(key, workbook.styles.length - 1);
339
339
  return workbook.styles.length - 1;
340
340
  }
341
341
  var caches = /* @__PURE__ */ new WeakMap();
342
342
  function styleCache(workbook) {
343
- let cache2 = caches.get(workbook);
344
- if (!cache2) {
345
- cache2 = /* @__PURE__ */ new Map();
346
- caches.set(workbook, cache2);
343
+ let cache3 = caches.get(workbook);
344
+ if (!cache3) {
345
+ cache3 = /* @__PURE__ */ new Map();
346
+ caches.set(workbook, cache3);
347
347
  }
348
- return cache2;
348
+ return cache3;
349
349
  }
350
350
  function compact(value2) {
351
351
  const out = {};
@@ -671,15 +671,15 @@ function isElapsedOnly(tokens) {
671
671
  }
672
672
  function renderElapsedOnly(serial, tokens) {
673
673
  const seconds = Math.round(Math.abs(serial) * 86400);
674
- let text = "";
674
+ let text2 = "";
675
675
  for (const tok of tokens) {
676
- if (tok.t === "lit") text += tok.v;
676
+ if (tok.t === "lit") text2 += tok.v;
677
677
  else if (tok.t === "elapsed") {
678
678
  const amount = tok.unit === "h" ? Math.floor(seconds / 3600) : tok.unit === "m" ? Math.floor(seconds / 60) : seconds;
679
- text += String(amount).padStart(tok.width, "0");
679
+ text2 += String(amount).padStart(tok.width, "0");
680
680
  }
681
681
  }
682
- return text;
682
+ return text2;
683
683
  }
684
684
  function renderDate(serial, tokens, date1904) {
685
685
  if (!(serial >= 0) || serial >= MAX_DATE_SERIAL + 1) return void 0;
@@ -688,21 +688,21 @@ function renderDate(serial, tokens, date1904) {
688
688
  if (p.year > 9999) return void 0;
689
689
  const twelve = tokens.some((t) => t.t === "ampm");
690
690
  const hour12 = p.hours % 12 === 0 ? 12 : p.hours % 12;
691
- let text = "";
691
+ let text2 = "";
692
692
  for (const tok of tokens) {
693
- if (tok.t === "lit") text += tok.v;
693
+ if (tok.t === "lit") text2 += tok.v;
694
694
  else if (tok.t === "ampm") {
695
695
  const pm = p.hours >= 12;
696
- text += tok.kind === "AM/PM" ? pm ? "PM" : "AM" : tok.kind === "A/P" ? pm ? "P" : "A" : pm ? "p" : "a";
696
+ text2 += tok.kind === "AM/PM" ? pm ? "PM" : "AM" : tok.kind === "A/P" ? pm ? "P" : "A" : pm ? "p" : "a";
697
697
  } else if (tok.t === "subsec") {
698
698
  const digits2 = String(p.subsec).padStart(precision, "0");
699
- text += `.${digits2.slice(0, tok.digits).padEnd(tok.digits, "0")}`;
699
+ text2 += `.${digits2.slice(0, tok.digits).padEnd(tok.digits, "0")}`;
700
700
  } else if (tok.t === "elapsed") {
701
701
  const amount = tok.unit === "h" ? Math.floor(p.totalSeconds / 3600) : tok.unit === "m" ? Math.floor(p.totalSeconds / 60) : p.totalSeconds;
702
- text += String(amount).padStart(tok.width, "0");
703
- } else if (tok.t === "date") text += datePart(tok.part, p, twelve ? hour12 : p.hours);
702
+ text2 += String(amount).padStart(tok.width, "0");
703
+ } else if (tok.t === "date") text2 += datePart(tok.part, p, twelve ? hour12 : p.hours);
704
704
  }
705
- return text;
705
+ return text2;
706
706
  }
707
707
  function datePart(part, p, hour) {
708
708
  switch (part) {
@@ -941,25 +941,25 @@ function renderFraction(value2, plan) {
941
941
  const dropSeparator = hideFraction || hasInt && intText === "" && numHash;
942
942
  const lastInt = plan.tokens.reduce((last, t, i2) => t.r === "int" ? i2 : last, -1);
943
943
  const firstNum = plan.tokens.findIndex((t) => t.r === "num");
944
- let text = "";
944
+ let text2 = "";
945
945
  let intDone = false;
946
946
  plan.tokens.forEach((tok, i2) => {
947
947
  if (tok.r === "lit") {
948
- if (!(dropSeparator && i2 > lastInt && i2 < firstNum)) text += tok.v;
948
+ if (!(dropSeparator && i2 > lastInt && i2 < firstNum)) text2 += tok.v;
949
949
  } else if (tok.r === "int") {
950
- if (!intDone) text += intText;
950
+ if (!intDone) text2 += intText;
951
951
  intDone = true;
952
952
  } else if (hideFraction) ; else if (blank) {
953
- if (tok.r === "num") text += " ";
954
- else if (tok.r === "slash") text += " ";
955
- else text += " ".repeat(plan.fixedDenominator ? plan.denWidth : 1);
953
+ if (tok.r === "num") text2 += " ";
954
+ else if (tok.r === "slash") text2 += " ";
955
+ else text2 += " ".repeat(plan.fixedDenominator ? plan.denWidth : 1);
956
956
  } else if (tok.r === "num") {
957
- if (tok.index === 0) text += padLeft(String(n), plan.numDigits);
958
- } else if (tok.r === "slash") text += "/";
959
- else if (plan.fixedDenominator) text += String(d);
960
- else if (tok.index === 0) text += padRight(String(d), plan.denDigits);
957
+ if (tok.index === 0) text2 += padLeft(String(n), plan.numDigits);
958
+ } else if (tok.r === "slash") text2 += "/";
959
+ else if (plan.fixedDenominator) text2 += String(d);
960
+ else if (tok.index === 0) text2 += padRight(String(d), plan.denDigits);
961
961
  });
962
- return { text, zero };
962
+ return { text: text2, zero };
963
963
  }
964
964
 
965
965
  // xlsx/numfmt/decimal.ts
@@ -1164,18 +1164,18 @@ function renderNumber(value2, plan) {
1164
1164
  } else rounded = roundDecimals(v, plan.fracDigits.length);
1165
1165
  const ints = plan.exponent && isZero(rounded) ? plan.intDigits.map(() => "0") : placeIntegers(integerPart(rounded), plan.intDigits, plan.grouping);
1166
1166
  const fracs = placeFraction(fractionPart(rounded, plan.fracDigits.length), plan.fracDigits);
1167
- let text = "";
1167
+ let text2 = "";
1168
1168
  for (const tok of plan.tokens) {
1169
- if (tok.r === "lit") text += tok.v;
1170
- else if (tok.r === "int") text += ints[tok.index] ?? "";
1171
- else if (tok.r === "frac") text += fracs[tok.index] ?? "";
1172
- else if (tok.r === "point") text += ".";
1169
+ if (tok.r === "lit") text2 += tok.v;
1170
+ else if (tok.r === "int") text2 += ints[tok.index] ?? "";
1171
+ else if (tok.r === "frac") text2 += fracs[tok.index] ?? "";
1172
+ else if (tok.r === "point") text2 += ".";
1173
1173
  else if (plan.exponent) {
1174
1174
  const sign2 = exp2 < 0 ? "-" : plan.exponent.plus ? "+" : "";
1175
- text += `E${sign2}${String(Math.abs(exp2)).padStart(plan.exponent.digits, "0")}`;
1175
+ text2 += `E${sign2}${String(Math.abs(exp2)).padStart(plan.exponent.digits, "0")}`;
1176
1176
  }
1177
1177
  }
1178
- return { text, zero: isZero(rounded) };
1178
+ return { text: text2, zero: isZero(rounded) };
1179
1179
  }
1180
1180
 
1181
1181
  // xlsx/numfmt/tokenizer.ts
@@ -1466,14 +1466,14 @@ function compileFormat(format) {
1466
1466
  const code = format.trim() === "" ? "General" : format;
1467
1467
  const sections = splitSections(code).slice(0, 4).map(compileSection);
1468
1468
  let numeric2;
1469
- let text;
1469
+ let text2;
1470
1470
  const last = sections[sections.length - 1];
1471
1471
  if (sections.length === 4) {
1472
1472
  numeric2 = sections.slice(0, 3);
1473
- text = sections[3];
1473
+ text2 = sections[3];
1474
1474
  } else if (last && last.kind === "text") {
1475
1475
  numeric2 = sections.slice(0, -1);
1476
- text = last;
1476
+ text2 = last;
1477
1477
  } else numeric2 = sections;
1478
1478
  if (numeric2.length === 0) numeric2 = [generalSection()];
1479
1479
  const conditional = numeric2.some((s) => s.condition !== void 0);
@@ -1483,7 +1483,7 @@ function compileFormat(format) {
1483
1483
  conditional,
1484
1484
  isDate: numeric2.some((s) => s.kind === "date")
1485
1485
  };
1486
- if (text) compiled.text = text;
1486
+ if (text2) compiled.text = text2;
1487
1487
  if (cache.size >= CACHE_LIMIT) cache.clear();
1488
1488
  cache.set(format, compiled);
1489
1489
  return compiled;
@@ -1557,16 +1557,16 @@ function generalDigits(v, width) {
1557
1557
  }
1558
1558
  function formatGeneral(value2, width = GENERAL_WIDTH) {
1559
1559
  if (!Number.isFinite(value2)) return "#NUM!";
1560
- const text = generalDigits(
1560
+ const text2 = generalDigits(
1561
1561
  toDigits(value2),
1562
1562
  Math.max(1, Math.min(GENERAL_WIDTH, Math.floor(width)))
1563
1563
  );
1564
- return value2 < 0 && text !== "0" ? `-${text}` : text;
1564
+ return value2 < 0 && text2 !== "0" ? `-${text2}` : text2;
1565
1565
  }
1566
1566
 
1567
1567
  // xlsx/numfmt/format.ts
1568
1568
  var OVERFLOW_TEXT = "########";
1569
- var result = (text, section) => section?.color ? { text, color: section.color } : { text };
1569
+ var result = (text2, section) => section?.color ? { text: text2, color: section.color } : { text: text2 };
1570
1570
  function tokenSource(tok) {
1571
1571
  switch (tok.t) {
1572
1572
  case "lit":
@@ -1599,21 +1599,21 @@ function tokenSource(tok) {
1599
1599
  return "";
1600
1600
  }
1601
1601
  }
1602
- function formatText(text, section) {
1603
- if (!section) return { text };
1602
+ function formatText(text2, section) {
1603
+ if (!section) return { text: text2 };
1604
1604
  let out = "";
1605
- for (const tok of section.tokens) out += tok.t === "text" ? text : tokenSource(tok);
1605
+ for (const tok of section.tokens) out += tok.t === "text" ? text2 : tokenSource(tok);
1606
1606
  return result(out, section);
1607
1607
  }
1608
1608
  function renderAbs(v, section, generalWidth) {
1609
1609
  if (section.fraction) return renderFraction(v, section.fraction);
1610
1610
  if (section.number) return renderNumber(v, section.number);
1611
1611
  const general = formatGeneral(Math.abs(v), generalWidth);
1612
- let text = "";
1612
+ let text2 = "";
1613
1613
  for (const tok of section.tokens) {
1614
- text += tok.t === "general" || tok.t === "text" ? general : tokenSource(tok);
1614
+ text2 += tok.t === "general" || tok.t === "text" ? general : tokenSource(tok);
1615
1615
  }
1616
- return { text, zero: general === "0" };
1616
+ return { text: text2, zero: general === "0" };
1617
1617
  }
1618
1618
  function hashFill(options) {
1619
1619
  const width = options.width ?? 0;
@@ -1623,7 +1623,7 @@ function hashFill(options) {
1623
1623
  function fitNumber(value2, format, options) {
1624
1624
  const date1904 = options.date1904 ?? false;
1625
1625
  const width = options.width ?? 0;
1626
- const fits = (text) => (options.measure ? options.measure(text) : text.length) <= width;
1626
+ const fits = (text2) => (options.measure ? options.measure(text2) : text2.length) <= width;
1627
1627
  const first2 = formatNumber(value2, format, date1904);
1628
1628
  if (fits(first2.text) || first2.text === OVERFLOW_TEXT) return first2;
1629
1629
  const choice = chooseSection(compileFormat(format), value2);
@@ -1646,15 +1646,15 @@ function formatNumber(value2, format, date1904, generalWidth) {
1646
1646
  if (section.kind === "date") {
1647
1647
  const serial = abs2 ? Math.abs(value2) : value2;
1648
1648
  if (isElapsedOnly(section.tokens)) {
1649
- const text3 = renderElapsedOnly(serial, section.tokens);
1650
- return result(serial < 0 ? `-${text3}` : text3, section);
1649
+ const text4 = renderElapsedOnly(serial, section.tokens);
1650
+ return result(serial < 0 ? `-${text4}` : text4, section);
1651
1651
  }
1652
- const text2 = renderDate(serial, section.tokens, date1904);
1653
- return text2 === void 0 ? { text: OVERFLOW_TEXT } : result(text2, section);
1652
+ const text3 = renderDate(serial, section.tokens, date1904);
1653
+ return text3 === void 0 ? { text: OVERFLOW_TEXT } : result(text3, section);
1654
1654
  }
1655
- const { text, zero } = renderAbs(value2, section, generalWidth);
1655
+ const { text: text2, zero } = renderAbs(value2, section, generalWidth);
1656
1656
  const minus = value2 < 0 && !abs2 && !zero;
1657
- return result(minus ? `-${text}` : text, section);
1657
+ return result(minus ? `-${text2}` : text2, section);
1658
1658
  }
1659
1659
  function formatValue(value2, format, options = {}) {
1660
1660
  if (value2 === null) return { text: "" };
@@ -1691,9 +1691,9 @@ function monthFromName(name) {
1691
1691
  );
1692
1692
  return index2 < 0 ? void 0 : index2 + 1;
1693
1693
  }
1694
- function fullYear(text) {
1695
- const y = Number(text);
1696
- if (text.length > 2) return y;
1694
+ function fullYear(text2) {
1695
+ const y = Number(text2);
1696
+ if (text2.length > 2) return y;
1697
1697
  return y < 30 ? 2e3 + y : 1900 + y;
1698
1698
  }
1699
1699
  function serialOf(year, month, day, date1904) {
@@ -1707,8 +1707,8 @@ function serialOf(year, month, day, date1904) {
1707
1707
  return serial < minimum ? void 0 : serial;
1708
1708
  }
1709
1709
  var TIME_RE = /^(\d{1,5}):(\d{1,2})(?::(\d{1,2}))?(?:\.(\d+))?\s*(am|pm|a|p)?$/i;
1710
- function parseTime(text) {
1711
- const m = TIME_RE.exec(text);
1710
+ function parseTime(text2) {
1711
+ const m = TIME_RE.exec(text2);
1712
1712
  if (!m) return void 0;
1713
1713
  const [, a = "0", b = "0", c, frac, ampm] = m;
1714
1714
  let hours = Number(a);
@@ -1735,11 +1735,11 @@ function parseTime(text) {
1735
1735
  return { fraction: (hours * 3600 + minutes * 60 + seconds) / 86400, format };
1736
1736
  }
1737
1737
  var currentYear = () => (/* @__PURE__ */ new Date()).getFullYear();
1738
- function parseDay(text) {
1739
- let m = /^(\d{4})[-/](\d{1,2})[-/](\d{1,2})$/.exec(text);
1738
+ function parseDay(text2) {
1739
+ let m = /^(\d{4})[-/](\d{1,2})[-/](\d{1,2})$/.exec(text2);
1740
1740
  if (m)
1741
1741
  return { year: Number(m[1]), month: Number(m[2]), day: Number(m[3]), format: "yyyy-mm-dd" };
1742
- m = /^(\d{1,2})([-/])(\d{1,2})\2(\d{2}|\d{4})$/.exec(text);
1742
+ m = /^(\d{1,2})([-/])(\d{1,2})\2(\d{2}|\d{4})$/.exec(text2);
1743
1743
  if (m)
1744
1744
  return {
1745
1745
  year: fullYear(m[4] ?? ""),
@@ -1747,9 +1747,9 @@ function parseDay(text) {
1747
1747
  day: Number(m[3]),
1748
1748
  format: "m/d/yyyy"
1749
1749
  };
1750
- m = /^(\d{1,2})\/(\d{1,2})$/.exec(text);
1750
+ m = /^(\d{1,2})\/(\d{1,2})$/.exec(text2);
1751
1751
  if (m) return { year: currentYear(), month: Number(m[1]), day: Number(m[2]), format: "d-mmm" };
1752
- m = /^(\d{1,2})[- ]([a-z]+)\.?(?:[- ,]+(\d{2}|\d{4}))?$/i.exec(text);
1752
+ m = /^(\d{1,2})[- ]([a-z]+)\.?(?:[- ,]+(\d{2}|\d{4}))?$/i.exec(text2);
1753
1753
  if (m) {
1754
1754
  const month = monthFromName(m[2] ?? "");
1755
1755
  if (!month) return void 0;
@@ -1757,12 +1757,12 @@ function parseDay(text) {
1757
1757
  return { year: currentYear(), month, day: Number(m[1]), format: "d-mmm" };
1758
1758
  return { year: fullYear(m[3]), month, day: Number(m[1]), format: "d-mmm-yy" };
1759
1759
  }
1760
- m = /^([a-z]+)\.?[- ](\d{1,2}),?[- ](\d{4})$/i.exec(text);
1760
+ m = /^([a-z]+)\.?[- ](\d{1,2}),?[- ](\d{4})$/i.exec(text2);
1761
1761
  if (m) {
1762
1762
  const month = monthFromName(m[1] ?? "");
1763
1763
  return month ? { year: Number(m[3]), month, day: Number(m[2]), format: "d-mmm-yy" } : void 0;
1764
1764
  }
1765
- m = /^([a-z]{3,})[- ]?(\d{1,2})$/i.exec(text);
1765
+ m = /^([a-z]{3,})[- ]?(\d{1,2})$/i.exec(text2);
1766
1766
  if (m) {
1767
1767
  const month = monthFromName(m[1] ?? "");
1768
1768
  if (!month) return void 0;
@@ -1772,19 +1772,19 @@ function parseDay(text) {
1772
1772
  return { year, month, day: n, format: "d-mmm" };
1773
1773
  return { year: fullYear(m[2] ?? ""), month, day: 1, format: "mmm-yy" };
1774
1774
  }
1775
- m = /^([a-z]+)\.?[- ](\d{4})$/i.exec(text);
1775
+ m = /^([a-z]+)\.?[- ](\d{4})$/i.exec(text2);
1776
1776
  if (m) {
1777
1777
  const month = monthFromName(m[1] ?? "");
1778
1778
  return month ? { year: Number(m[2]), month, day: 1, format: "mmm-yy" } : void 0;
1779
1779
  }
1780
1780
  return void 0;
1781
1781
  }
1782
- function parseDateTimeInput(text, date1904) {
1783
- const time = parseTime(text);
1782
+ function parseDateTimeInput(text2, date1904) {
1783
+ const time = parseTime(text2);
1784
1784
  if (time) return { value: time.fraction, numFmt: time.format };
1785
- const tail = /(?:\s{1,8}|T)(\d{1,2}:\d{1,2}(?::\d{1,2})?(?:\s{0,8}(?:am|pm|a|p))?)$/i.exec(text);
1786
- const split = tail && tail.index > 0 ? [tail[0], text.slice(0, tail.index), tail[1]] : null;
1787
- const dayText = split ? split[1] ?? "" : text;
1785
+ const tail = /(?:\s{1,8}|T)(\d{1,2}:\d{1,2}(?::\d{1,2})?(?:\s{0,8}(?:am|pm|a|p))?)$/i.exec(text2);
1786
+ const split = tail && tail.index > 0 ? [tail[0], text2.slice(0, tail.index), tail[1]] : null;
1787
+ const dayText = split ? split[1] ?? "" : text2;
1788
1788
  const day = parseDay(dayText);
1789
1789
  if (!day) return void 0;
1790
1790
  const serial = serialOf(day.year, day.month, day.day, date1904);
@@ -1803,8 +1803,8 @@ function currencyFormat(symbol2, decimals2) {
1803
1803
  if (symbol2 === "$") return `$${body2}_);[Red]($${body2})`;
1804
1804
  return `${symbol2}${body2}`;
1805
1805
  }
1806
- function parseNumberInput(text) {
1807
- let s = text.trim();
1806
+ function parseNumberInput(text2) {
1807
+ let s = text2.trim();
1808
1808
  let negative = false;
1809
1809
  let parenthesized = false;
1810
1810
  if (s.startsWith("(") && s.endsWith(")")) {
@@ -1861,8 +1861,8 @@ function parseNumberInput(text) {
1861
1861
  if (grouped) return { value: value2, numFmt: decimals2 ? "#,##0.00" : "#,##0" };
1862
1862
  return { value: value2 };
1863
1863
  }
1864
- function parseFractionInput(text) {
1865
- const m = /^([-+]?)(\d+)\s+(\d+)\/(\d+)$/.exec(text.trim());
1864
+ function parseFractionInput(text2) {
1865
+ const m = /^([-+]?)(\d+)\s+(\d+)\/(\d+)$/.exec(text2.trim());
1866
1866
  if (!m) return void 0;
1867
1867
  const den = Number(m[4]);
1868
1868
  const num2 = Number(m[3]);
@@ -1873,27 +1873,27 @@ function parseFractionInput(text) {
1873
1873
  numFmt: den < 10 ? "# ?/?" : "# ??/??"
1874
1874
  };
1875
1875
  }
1876
- function parseCellInput(text, options = {}) {
1877
- if (text === "") return { value: null };
1878
- if (text.startsWith("=") && text.length > 1) return { value: null, formula: text.slice(1) };
1879
- if (text.startsWith("'")) return { value: text.slice(1) };
1880
- const trimmed = text.trim();
1881
- if (trimmed === "") return { value: text };
1876
+ function parseCellInput(text2, options = {}) {
1877
+ if (text2 === "") return { value: null };
1878
+ if (text2.startsWith("=") && text2.length > 1) return { value: null, formula: text2.slice(1) };
1879
+ if (text2.startsWith("'")) return { value: text2.slice(1) };
1880
+ const trimmed = text2.trim();
1881
+ if (trimmed === "") return { value: text2 };
1882
1882
  const upper2 = trimmed.toUpperCase();
1883
- if (trimmed === text) {
1883
+ if (trimmed === text2) {
1884
1884
  if (upper2 === "TRUE" || upper2 === "FALSE") return { value: upper2 === "TRUE" };
1885
1885
  if (isErrorCode(upper2)) return { value: cellError(upper2) };
1886
1886
  }
1887
1887
  const parsed = parseNumberInput(trimmed) ?? parseFractionInput(trimmed) ?? parseDateTimeInput(trimmed, options.date1904 ?? false);
1888
- if (!parsed) return { value: text };
1888
+ if (!parsed) return { value: text2 };
1889
1889
  return parsed.numFmt ? { value: parsed.value, numFmt: parsed.numFmt } : { value: parsed.value };
1890
1890
  }
1891
1891
 
1892
1892
  // xlsx/numfmt/decimals.ts
1893
1893
  function fromGeneral(delta, sample) {
1894
- const text = typeof sample === "number" ? formatGeneral(Math.abs(sample)) : "";
1895
- const sci = /^(\d)(?:\.(\d+))?E/.exec(text);
1896
- const shown = sci ? sci[2]?.length ?? 0 : /\.(\d+)/.exec(text)?.[1]?.length ?? 0;
1894
+ const text2 = typeof sample === "number" ? formatGeneral(Math.abs(sample)) : "";
1895
+ const sci = /^(\d)(?:\.(\d+))?E/.exec(text2);
1896
+ const shown = sci ? sci[2]?.length ?? 0 : /\.(\d+)/.exec(text2)?.[1]?.length ?? 0;
1897
1897
  const next = Math.max(0, shown + delta);
1898
1898
  const body2 = next ? `0.${"0".repeat(next)}` : "0";
1899
1899
  return sci ? `${body2}E+00` : body2;
@@ -1967,15 +1967,15 @@ var SPECIALS = {
1967
1967
  "#totals": "#Totals",
1968
1968
  "#this row": "#This Row"
1969
1969
  };
1970
- var unescape = (text) => text.replace(/'(.)/g, "$1");
1971
- function splitItems(text) {
1970
+ var unescape = (text2) => text2.replace(/'(.)/g, "$1");
1971
+ function splitItems(text2) {
1972
1972
  const items = [];
1973
1973
  let depth = 0;
1974
1974
  let current = "";
1975
- for (let i2 = 0; i2 < text.length; i2++) {
1976
- const ch = text[i2] ?? "";
1975
+ for (let i2 = 0; i2 < text2.length; i2++) {
1976
+ const ch = text2[i2] ?? "";
1977
1977
  if (ch === "'") {
1978
- current += ch + (text[i2 + 1] ?? "");
1978
+ current += ch + (text2[i2 + 1] ?? "");
1979
1979
  i2++;
1980
1980
  continue;
1981
1981
  }
@@ -1992,9 +1992,9 @@ function splitItems(text) {
1992
1992
  return items;
1993
1993
  }
1994
1994
  var strip = (item) => item.startsWith("[") && item.endsWith("]") ? item.slice(1, -1) : item;
1995
- function parseStructured(text, tableName) {
1996
- const open = text.indexOf("[");
1997
- const inner2 = text.slice(open + 1, -1);
1995
+ function parseStructured(text2, tableName) {
1996
+ const open = text2.indexOf("[");
1997
+ const inner2 = text2.slice(open + 1, -1);
1998
1998
  const out = { specials: [] };
1999
1999
  if (tableName) out.table = tableName;
2000
2000
  const addColumns = (spec2) => {
@@ -2019,7 +2019,7 @@ function parseStructured(text, tableName) {
2019
2019
  out.specials.push(special);
2020
2020
  return;
2021
2021
  }
2022
- if (out.column !== void 0) throw new FormulaError(`Invalid structured reference ${text}`);
2022
+ if (out.column !== void 0) throw new FormulaError(`Invalid structured reference ${text2}`);
2023
2023
  addColumns(item);
2024
2024
  };
2025
2025
  if (!inner2.includes("[")) {
@@ -2038,13 +2038,28 @@ function parseStructured(text, tableName) {
2038
2038
 
2039
2039
  // xlsx/formula/lexemes.ts
2040
2040
  var ERRORS_BY_LENGTH = [...ERROR_CODES].sort((a, b) => b.length - a.length);
2041
- var NAME_START = /[A-Za-z_\\\u00A1-\uFFFF]/;
2042
- var NAME_CHAR = /[A-Za-z0-9_.?\\\u00A1-\uFFFF]/;
2043
2041
  var NAME_RE = /^[A-Za-z_\\\u00A1-\uFFFF][A-Za-z0-9_.?\\\u00A1-\uFFFF]*/;
2044
2042
  var CELL_RE = /^(\$?)([A-Za-z]{1,3})(\$?)(\d{1,7})/;
2045
2043
  var COLS_RE = /^(\$?)([A-Za-z]{1,3}):(\$?)([A-Za-z]{1,3})/;
2046
2044
  var ROWS_RE = /^(\$?)(\d{1,7}):(\$?)(\d{1,7})/;
2047
2045
  var NUMBER_RE2 = /^(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/;
2046
+ var sticky = (re) => new RegExp(re.source.replace(/^\^/, ""), "y");
2047
+ var CELL_AT = sticky(CELL_RE);
2048
+ var COLS_AT = sticky(COLS_RE);
2049
+ var ROWS_AT = sticky(ROWS_RE);
2050
+ var NAME_AT = sticky(NAME_RE);
2051
+ var NUMBER_AT = sticky(NUMBER_RE2);
2052
+ function matchAt(re, source, at) {
2053
+ re.lastIndex = at;
2054
+ return re.exec(source);
2055
+ }
2056
+ var isDigitAt = (source, at) => isDigitCode(source.charCodeAt(at));
2057
+ function rangeStartAt(source, at, accept, max) {
2058
+ let i2 = source[at] === "$" ? at + 1 : at;
2059
+ const from = i2;
2060
+ while (i2 - from <= max && accept(source.charCodeAt(i2))) i2++;
2061
+ return i2 > from && i2 - from <= max && source[i2] === ":";
2062
+ }
2048
2063
  var OPERATORS = [
2049
2064
  "<=",
2050
2065
  ">=",
@@ -2062,7 +2077,12 @@ var OPERATORS = [
2062
2077
  ":",
2063
2078
  "@"
2064
2079
  ];
2065
- var isNameChar = (ch) => ch !== void 0 && NAME_CHAR.test(ch);
2080
+ var isLetterCode = (code) => code >= 65 && code <= 90 || code >= 97 && code <= 122;
2081
+ var isDigitCode = (code) => code >= 48 && code <= 57;
2082
+ var isNameStartCode = (code) => isLetterCode(code) || code === 95 || code === 92 || code >= 161;
2083
+ var isNameCharCode = (code) => isNameStartCode(code) || isDigitCode(code) || code === 46 || code === 63;
2084
+ var isSheetCharCode = (code) => isLetterCode(code) || isDigitCode(code) || code === 95 || code === 46 || code >= 161;
2085
+ var isNameChar = (ch) => ch !== void 0 && ch !== "" && isNameCharCode(ch.charCodeAt(0));
2066
2086
  function matchError(source, at) {
2067
2087
  const upper2 = source.slice(at, at + 14).toUpperCase();
2068
2088
  return ERRORS_BY_LENGTH.find((code) => upper2.startsWith(code));
@@ -2078,14 +2098,13 @@ var boundary = (source, end) => {
2078
2098
  return !isNameChar(next) && next !== "(" && next !== "!" && next !== "[";
2079
2099
  };
2080
2100
  function readReference(source, at) {
2081
- const rest = source.slice(at);
2082
- const cell = CELL_RE.exec(rest);
2101
+ const cell = matchAt(CELL_AT, source, at);
2083
2102
  if (cell) {
2084
2103
  const start = corner2(cell[1] ?? "", cell[2] ?? "", cell[3] ?? "", cell[4] ?? "");
2085
2104
  let length = cell[0].length;
2086
2105
  if (start) {
2087
- if (rest[length] === ":") {
2088
- const second = CELL_RE.exec(rest.slice(length + 1));
2106
+ if (source[at + length] === ":") {
2107
+ const second = matchAt(CELL_AT, source, at + length + 1);
2089
2108
  if (second) {
2090
2109
  const end = corner2(second[1] ?? "", second[2] ?? "", second[3] ?? "", second[4] ?? "");
2091
2110
  const total2 = length + 1 + second[0].length;
@@ -2099,8 +2118,8 @@ function readReference(source, at) {
2099
2118
  }
2100
2119
  length = 0;
2101
2120
  }
2102
- const cols = COLS_RE.exec(rest);
2103
- if (cols && boundary(source, at + cols[0].length) && !/^\d/.test(rest.slice(cols[0].length))) {
2121
+ const cols = rangeStartAt(source, at, isLetterCode, 3) ? matchAt(COLS_AT, source, at) : null;
2122
+ if (cols && boundary(source, at + cols[0].length) && !isDigitAt(source, at + cols[0].length)) {
2104
2123
  const c1 = columnIndex(cols[2] ?? "");
2105
2124
  const c2 = columnIndex(cols[4] ?? "");
2106
2125
  if (c1 >= 0 && c1 <= MAX_COL && c2 >= 0 && c2 <= MAX_COL) {
@@ -2114,7 +2133,7 @@ function readReference(source, at) {
2114
2133
  };
2115
2134
  }
2116
2135
  }
2117
- const rows2 = ROWS_RE.exec(rest);
2136
+ const rows2 = rangeStartAt(source, at, isDigitCode, 7) ? matchAt(ROWS_AT, source, at) : null;
2118
2137
  if (rows2 && boundary(source, at + rows2[0].length) && source[at + rows2[0].length] !== ".") {
2119
2138
  const r1 = Number(rows2[2]) - 1;
2120
2139
  const r2 = Number(rows2[4]) - 1;
@@ -2167,8 +2186,8 @@ function readBrackets(source, at) {
2167
2186
  }
2168
2187
  throw new FormulaError("Unterminated structured reference", at);
2169
2188
  }
2170
- function splitSheets(text) {
2171
- let rest = text;
2189
+ function splitSheets(text2) {
2190
+ let rest = text2;
2172
2191
  let book;
2173
2192
  const bookMatch = /^\[([^\]]*)\]/.exec(rest);
2174
2193
  if (bookMatch) {
@@ -2183,6 +2202,7 @@ function splitSheets(text) {
2183
2202
  if (book !== void 0) out.book = book;
2184
2203
  return out;
2185
2204
  }
2205
+ var PREFIX_AT = /(\[\d+\])?([A-Za-z0-9_.\u00A1-\uFFFF]+)(?::([A-Za-z0-9_.\u00A1-\uFFFF]+))?!/y;
2186
2206
  function readPrefix(source, at) {
2187
2207
  const ch = source[at];
2188
2208
  if (ch === "'") {
@@ -2191,19 +2211,27 @@ function readPrefix(source, at) {
2191
2211
  const length = quoted.length + 1;
2192
2212
  return { prefix: { text: source.slice(at, at + length), ...splitSheets(quoted.name) }, length };
2193
2213
  }
2194
- const m = /^(\[\d+\])?([A-Za-z0-9_.\u00A1-\uFFFF]+)(?::([A-Za-z0-9_.\u00A1-\uFFFF]+))?!/.exec(
2195
- source.slice(at)
2196
- );
2214
+ let i2 = at;
2215
+ if (ch === "[") {
2216
+ i2++;
2217
+ while (isDigitCode(source.charCodeAt(i2))) i2++;
2218
+ if (i2 === at + 1 || source[i2] !== "]") return void 0;
2219
+ i2++;
2220
+ }
2221
+ while (i2 < source.length && isSheetCharCode(source.charCodeAt(i2))) i2++;
2222
+ if (source[i2] !== "!" && source[i2] !== ":") return void 0;
2223
+ const m = matchAt(PREFIX_AT, source, at);
2197
2224
  if (!m) return void 0;
2198
2225
  if (!m[1] && /^\d/.test(m[2] ?? "") && !m[3]) return void 0;
2199
2226
  const raw = m[0].slice(0, -1);
2200
2227
  return { prefix: { text: m[0], ...splitSheets(raw) }, length: m[0].length };
2201
2228
  }
2202
- function numberLiteral(text) {
2203
- const [mantissa = "", exponent] = text.toLowerCase().split("e");
2229
+ function numberLiteral(text2) {
2230
+ if (text2.length <= 15) return Number(text2);
2231
+ const [mantissa = "", exponent] = text2.toLowerCase().split("e");
2204
2232
  const digits2 = mantissa.replace(".", "");
2205
2233
  const firstSignificant = digits2.search(/[1-9]/);
2206
- if (firstSignificant < 0 || digits2.length - firstSignificant <= 15) return Number(text);
2234
+ if (firstSignificant < 0 || digits2.length - firstSignificant <= 15) return Number(text2);
2207
2235
  const point = mantissa.includes(".") ? mantissa.indexOf(".") : mantissa.length;
2208
2236
  const kept = digits2.slice(0, firstSignificant + 15);
2209
2237
  const truncated = kept.length >= point ? `${kept.slice(0, point)}.${kept.slice(point)}` : kept + "0".repeat(point - kept.length);
@@ -2211,6 +2239,17 @@ function numberLiteral(text) {
2211
2239
  }
2212
2240
 
2213
2241
  // xlsx/formula/tokenizer.ts
2242
+ var SINGLE = {
2243
+ "(": "open",
2244
+ ")": "close",
2245
+ ",": "comma",
2246
+ ";": "semicolon",
2247
+ "{": "lbrace",
2248
+ "}": "rbrace"
2249
+ };
2250
+ var BOOK_INDEX = /\[\d+\]/y;
2251
+ var isSpace = (code) => code === 32 || code === 9 || code === 13 || code === 10;
2252
+ var isDigit3 = (code) => code >= 48 && code <= 57;
2214
2253
  function tokenize(formula) {
2215
2254
  const source = formula;
2216
2255
  const tokens = [];
@@ -2222,61 +2261,55 @@ function tokenize(formula) {
2222
2261
  };
2223
2262
  while (i2 < source.length) {
2224
2263
  const ch = source[i2] ?? "";
2264
+ const code = source.charCodeAt(i2);
2225
2265
  const start = i2;
2226
- if (/[ \t\r\n]/.test(ch)) {
2227
- const m = /^[ \t\r\n]+/.exec(source.slice(i2));
2228
- push3({ kind: "ws", text: m?.[0] ?? ch, start });
2266
+ if (isSpace(code)) {
2267
+ let j = i2 + 1;
2268
+ while (j < source.length && isSpace(source.charCodeAt(j))) j++;
2269
+ push3({ kind: "ws", text: source.slice(i2, j), start });
2229
2270
  continue;
2230
2271
  }
2231
2272
  if (ch === '"') {
2232
2273
  let j = i2 + 1;
2233
2274
  let value2 = "";
2234
2275
  for (; ; ) {
2235
- if (j >= source.length) throw new FormulaError("Unterminated string", start);
2236
- if (source[j] === '"') {
2237
- if (source[j + 1] === '"') {
2238
- value2 += '"';
2239
- j += 2;
2240
- continue;
2241
- }
2242
- break;
2276
+ const quote = source.indexOf('"', j);
2277
+ if (quote < 0) throw new FormulaError("Unterminated string", start);
2278
+ value2 += source.slice(j, quote);
2279
+ if (source[quote + 1] === '"') {
2280
+ value2 += '"';
2281
+ j = quote + 2;
2282
+ continue;
2243
2283
  }
2244
- value2 += source[j];
2245
- j++;
2284
+ j = quote;
2285
+ break;
2246
2286
  }
2247
2287
  push3({ kind: "string", text: source.slice(start, j + 1), start, value: value2 });
2248
2288
  continue;
2249
2289
  }
2250
2290
  if (ch === "#") {
2251
- const code = matchError(source, i2);
2252
- if (!code) throw new FormulaError(`Unexpected '#'`, start);
2291
+ const code2 = matchError(source, i2);
2292
+ if (!code2) throw new FormulaError(`Unexpected '#'`, start);
2253
2293
  push3({
2254
- kind: code === "#REF!" ? "ref" : "error",
2255
- text: source.slice(i2, i2 + code.length),
2294
+ kind: code2 === "#REF!" ? "ref" : "error",
2295
+ text: source.slice(i2, i2 + code2.length),
2256
2296
  start,
2257
- value: code
2297
+ value: code2
2258
2298
  });
2259
2299
  continue;
2260
2300
  }
2261
- const single = {
2262
- "(": "open",
2263
- ")": "close",
2264
- ",": "comma",
2265
- ";": "semicolon",
2266
- "{": "lbrace",
2267
- "}": "rbrace"
2268
- };
2269
- const kind = single[ch];
2301
+ const kind = SINGLE[ch];
2270
2302
  if (kind) {
2271
2303
  push3({ kind, text: ch, start });
2272
2304
  continue;
2273
2305
  }
2274
- if (ch === "[" && !/^\[\d+\]/.test(source.slice(i2))) {
2306
+ if (ch === "[" && !matchAt(BOOK_INDEX, source, i2)) {
2275
2307
  const length = readBrackets(source, i2);
2276
2308
  push3({ kind: "structured", text: source.slice(i2, i2 + length), start, value: "" });
2277
2309
  continue;
2278
2310
  }
2279
- const prefixed = ch === "'" || ch === "[" || NAME_START.test(ch) || /\d/.test(ch);
2311
+ const nameStart = isNameStartCode(code);
2312
+ const prefixed = ch === "'" || ch === "[" || nameStart || isDigit3(code);
2280
2313
  if (prefixed) {
2281
2314
  const prefix = readPrefix(source, i2);
2282
2315
  if (prefix) {
@@ -2285,14 +2318,15 @@ function tokenize(formula) {
2285
2318
  }
2286
2319
  if (ch === "'" || ch === "[") throw new FormulaError("Malformed sheet reference", start);
2287
2320
  }
2288
- if (/[\d.]/.test(ch) || ch === "$" || NAME_START.test(ch)) {
2321
+ const numeric2 = isDigit3(code) || ch === ".";
2322
+ if (numeric2 || ch === "$" || nameStart) {
2289
2323
  const ref = readReference(source, i2);
2290
2324
  if (ref) {
2291
2325
  push3(refToken(source, start, i2 + ref.length, ref.ref, void 0));
2292
2326
  continue;
2293
2327
  }
2294
- if (/[\d.]/.test(ch)) {
2295
- const m = NUMBER_RE2.exec(source.slice(i2));
2328
+ if (numeric2) {
2329
+ const m = matchAt(NUMBER_AT, source, i2);
2296
2330
  if (!m) throw new FormulaError(`Unexpected '${ch}'`, start);
2297
2331
  push3({ kind: "number", text: m[0], start, value: numberLiteral(m[0]) });
2298
2332
  continue;
@@ -2329,11 +2363,12 @@ function readAfterPrefix(source, at, start, prefix) {
2329
2363
  }
2330
2364
  const ref = readReference(source, at);
2331
2365
  if (ref) return refToken(source, start, at + ref.length, ref.ref, prefix);
2332
- if (NAME_START.test(source[at] ?? "")) return readName(source, at, start, prefix);
2366
+ if (at < source.length && isNameStartCode(source.charCodeAt(at)))
2367
+ return readName(source, at, start, prefix);
2333
2368
  throw new FormulaError("Invalid reference after sheet name", at);
2334
2369
  }
2335
2370
  function readName(source, at, start, prefix) {
2336
- const m = NAME_RE.exec(source.slice(at));
2371
+ const m = matchAt(NAME_AT, source, at);
2337
2372
  if (!m) throw new FormulaError("Invalid name", at);
2338
2373
  const name = m[0];
2339
2374
  let end = at + name.length;
@@ -2689,8 +2724,8 @@ function monthFromName2(name) {
2689
2724
  }
2690
2725
  var NUMBER_RE3 = /^(\d+(?:,\d{3,})+|\d*)(\.\d*)?(?:e([+-]?\d+))?$/i;
2691
2726
  var TIME_RE2 = /^(\d{1,4})(?::(\d+))?(?::(\d+(?:\.\d*)?))?(?:\s+(am|pm|a|p))?$/i;
2692
- function parsePlainNumber(text) {
2693
- const match2 = NUMBER_RE3.exec(text);
2727
+ function parsePlainNumber(text2) {
2728
+ const match2 = NUMBER_RE3.exec(text2);
2694
2729
  if (!match2) return void 0;
2695
2730
  const int2 = (match2[1] ?? "").replace(/,/g, "");
2696
2731
  const frac = match2[2] ?? "";
@@ -2698,8 +2733,8 @@ function parsePlainNumber(text) {
2698
2733
  const value2 = Number(`${int2 || "0"}${frac === "." ? "" : frac}${match2[3] ? `e${match2[3]}` : ""}`);
2699
2734
  return Number.isFinite(value2) ? value2 : void 0;
2700
2735
  }
2701
- function parseTime2(text) {
2702
- const match2 = TIME_RE2.exec(text);
2736
+ function parseTime2(text2) {
2737
+ const match2 = TIME_RE2.exec(text2);
2703
2738
  if (!match2) return void 0;
2704
2739
  let hours = Number(match2[1]);
2705
2740
  const minutes = Number(match2[2] ?? 0);
@@ -2722,28 +2757,28 @@ function serialOrUndefined(year, month, day) {
2722
2757
  }
2723
2758
  return ymdToSerial(year, month, day, currentDate1904());
2724
2759
  }
2725
- var fullYear2 = (text) => {
2726
- const year = Number(text);
2727
- if (text.length > 2) return year;
2760
+ var fullYear2 = (text2) => {
2761
+ const year = Number(text2);
2762
+ if (text2.length > 2) return year;
2728
2763
  return year < 30 ? 2e3 + year : 1900 + year;
2729
2764
  };
2730
- function parseDate(text) {
2765
+ function parseDate(text2) {
2731
2766
  const thisYear = (/* @__PURE__ */ new Date()).getFullYear();
2732
- let m = /^(\d{4})[-/](\d{1,2})[-/](\d{1,2})$/.exec(text);
2767
+ let m = /^(\d{4})[-/](\d{1,2})[-/](\d{1,2})$/.exec(text2);
2733
2768
  if (m) return serialOrUndefined(Number(m[1]), Number(m[2]), Number(m[3]));
2734
- m = /^(\d{1,2})\/(\d{1,2})(?:\/(\d{2}|\d{4}))?$/.exec(text);
2769
+ m = /^(\d{1,2})\/(\d{1,2})(?:\/(\d{2}|\d{4}))?$/.exec(text2);
2735
2770
  if (m) return serialOrUndefined(m[3] ? fullYear2(m[3]) : thisYear, Number(m[1]), Number(m[2]));
2736
- m = /^(\d{1,2})[-\s]([a-z]+)\.?(?:[-\s,]+(\d{2}|\d{4}))?$/i.exec(text);
2771
+ m = /^(\d{1,2})[-\s]([a-z]+)\.?(?:[-\s,]+(\d{2}|\d{4}))?$/i.exec(text2);
2737
2772
  if (m) {
2738
2773
  const month = monthFromName2(m[2] ?? "");
2739
2774
  if (month) return serialOrUndefined(m[3] ? fullYear2(m[3]) : thisYear, month, Number(m[1]));
2740
2775
  }
2741
- m = /^([a-z]+)\.?[-\s](\d{1,2})(?:,?\s*(\d{4}))?$/i.exec(text);
2776
+ m = /^([a-z]+)\.?[-\s](\d{1,2})(?:,?\s*(\d{4}))?$/i.exec(text2);
2742
2777
  if (m) {
2743
2778
  const month = monthFromName2(m[1] ?? "");
2744
2779
  if (month) return serialOrUndefined(m[3] ? Number(m[3]) : thisYear, month, Number(m[2]));
2745
2780
  }
2746
- m = /^([a-z]+)\.?[-\s](\d{4})$/i.exec(text);
2781
+ m = /^([a-z]+)\.?[-\s](\d{4})$/i.exec(text2);
2747
2782
  if (m) {
2748
2783
  const month = monthFromName2(m[1] ?? "");
2749
2784
  if (month) return serialOrUndefined(Number(m[2]), month, 1);
@@ -2751,43 +2786,43 @@ function parseDate(text) {
2751
2786
  return void 0;
2752
2787
  }
2753
2788
  function parseNumberText(input) {
2754
- let text = input.trim();
2755
- if (text === "") return void 0;
2789
+ let text2 = input.trim();
2790
+ if (text2 === "") return void 0;
2756
2791
  let scale2 = 1;
2757
- if (text.endsWith("%")) {
2792
+ if (text2.endsWith("%")) {
2758
2793
  scale2 = 0.01;
2759
- text = text.slice(0, -1).trimEnd();
2794
+ text2 = text2.slice(0, -1).trimEnd();
2760
2795
  }
2761
2796
  let sign2 = 1;
2762
- if (text.startsWith("(") && text.endsWith(")")) {
2797
+ if (text2.startsWith("(") && text2.endsWith(")")) {
2763
2798
  sign2 = -1;
2764
- text = text.slice(1, -1).trim();
2799
+ text2 = text2.slice(1, -1).trim();
2765
2800
  }
2766
- const signed = /^([+-]?)\s*\$?\s*([+-]?)\s*/.exec(text);
2801
+ const signed = /^([+-]?)\s*\$?\s*([+-]?)\s*/.exec(text2);
2767
2802
  const signText = `${signed?.[1] ?? ""}${signed?.[2] ?? ""}`;
2768
2803
  if (signText.length <= 1) {
2769
- const body2 = text.slice(signed?.[0].length ?? 0);
2804
+ const body2 = text2.slice(signed?.[0].length ?? 0);
2770
2805
  const plain2 = parsePlainNumber(body2);
2771
2806
  if (plain2 !== void 0) return (signText === "-" ? -1 : 1) * sign2 * plain2 * scale2;
2772
2807
  }
2773
2808
  if (scale2 !== 1 || sign2 !== 1) return void 0;
2774
- const fraction = /^([+-]?)(?:(\d+)\s+)?(\d+)\/(\d+)$/.exec(text);
2809
+ const fraction = /^([+-]?)(?:(\d+)\s+)?(\d+)\/(\d+)$/.exec(text2);
2775
2810
  if (fraction && fraction[2] !== void 0) {
2776
2811
  const den = Number(fraction[4]);
2777
2812
  if (den === 0) return void 0;
2778
2813
  const value2 = Number(fraction[2]) + Number(fraction[3]) / den;
2779
2814
  return fraction[1] === "-" ? -value2 : value2;
2780
2815
  }
2781
- const time = parseTime2(text);
2816
+ const time = parseTime2(text2);
2782
2817
  if (time !== void 0) return time;
2783
- const date = parseDate(text);
2818
+ const date = parseDate(text2);
2784
2819
  if (date !== void 0) return date;
2785
- const space = text.lastIndexOf(" ");
2820
+ const space = text2.lastIndexOf(" ");
2786
2821
  if (space > 0) {
2787
- const datePart2 = parseDate(text.slice(0, space).trim());
2788
- const timePart = parseTime2(text.slice(space + 1).trim());
2822
+ const datePart2 = parseDate(text2.slice(0, space).trim());
2823
+ const timePart = parseTime2(text2.slice(space + 1).trim());
2789
2824
  if (datePart2 !== void 0 && timePart !== void 0) return datePart2 + timePart;
2790
- const amPm = /^(.*\S)\s+(\S+\s*(?:am|pm))$/i.exec(text);
2825
+ const amPm = /^(.*\S)\s+(\S+\s*(?:am|pm))$/i.exec(text2);
2791
2826
  if (amPm) {
2792
2827
  const d = parseDate(amPm[1] ?? "");
2793
2828
  const t = parseTime2(amPm[2] ?? "");
@@ -3111,8 +3146,8 @@ function wildcardRegex(pattern) {
3111
3146
  }
3112
3147
  return new RegExp(`^${source}$`, "i");
3113
3148
  }
3114
- var escapeRegex = (text) => text.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
3115
- var hasWildcards = (text) => /[*?~]/.test(text);
3149
+ var escapeRegex = (text2) => text2.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
3150
+ var hasWildcards = (text2) => /[*?~]/.test(text2);
3116
3151
  function makeCriteria(criteria) {
3117
3152
  if (isError(criteria)) return (value2) => isError(value2) && value2.error === criteria.error;
3118
3153
  if (typeof criteria === "number") {
@@ -4364,22 +4399,22 @@ var NUMBER = String.raw`(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?`;
4364
4399
  var REAL_ONLY = new RegExp(`^([+-]?${NUMBER})$`);
4365
4400
  var IMAGINARY_ONLY = new RegExp(`^([+-]?(?:${NUMBER})?)([ij])$`);
4366
4401
  var BOTH = new RegExp(`^([+-]?${NUMBER})([+-])((?:${NUMBER})?)([ij])$`);
4367
- var coefficient = (text) => text === "" || text === "+" ? 1 : text === "-" ? -1 : Number(text);
4402
+ var coefficient = (text2) => text2 === "" || text2 === "+" ? 1 : text2 === "-" ? -1 : Number(text2);
4368
4403
  function parseComplex(value2) {
4369
4404
  if (isError(value2)) fail(value2);
4370
4405
  if (typeof value2 === "number") return { re: value2, im: 0, suffix: "i" };
4371
- const text = toText(value2);
4372
- if (text === "") return { re: 0, im: 0, suffix: "i" };
4373
- const real = REAL_ONLY.exec(text);
4406
+ const text2 = toText(value2);
4407
+ if (text2 === "") return { re: 0, im: 0, suffix: "i" };
4408
+ const real = REAL_ONLY.exec(text2);
4374
4409
  if (real) return { re: Number(real[1]), im: 0, suffix: "i" };
4375
- const imaginary = IMAGINARY_ONLY.exec(text);
4410
+ const imaginary = IMAGINARY_ONLY.exec(text2);
4376
4411
  if (imaginary)
4377
4412
  return {
4378
4413
  re: 0,
4379
4414
  im: coefficient(imaginary[1] ?? ""),
4380
4415
  suffix: imaginary[2] === "j" ? "j" : "i"
4381
4416
  };
4382
- const both = BOTH.exec(text);
4417
+ const both = BOTH.exec(text2);
4383
4418
  if (!both) return fail(ERR.NUM);
4384
4419
  const sign2 = both[2] === "-" ? -1 : 1;
4385
4420
  return {
@@ -4389,9 +4424,9 @@ function parseComplex(value2) {
4389
4424
  };
4390
4425
  }
4391
4426
  function digits(n) {
4392
- const text = Number(n.toPrecision(15)).toString();
4393
- const match2 = /^(-?[\d.]+)e([+-])(\d+)$/.exec(text);
4394
- return match2 ? `${match2[1]}E${match2[2]}${(match2[3] ?? "").padStart(2, "0")}` : text;
4427
+ const text2 = Number(n.toPrecision(15)).toString();
4428
+ const match2 = /^(-?[\d.]+)e([+-])(\d+)$/.exec(text2);
4429
+ return match2 ? `${match2[1]}E${match2[2]}${(match2[3] ?? "").padStart(2, "0")}` : text2;
4395
4430
  }
4396
4431
  function formatComplex({ re, im, suffix }) {
4397
4432
  const r = Math.abs(re) < 1e-15 * Math.max(1, Math.abs(im)) ? 0 : re;
@@ -4743,15 +4778,15 @@ var C7 = "Engineering";
4743
4778
  var BASES = { BIN: 2, OCT: 8, DEC: 10, HEX: 16 };
4744
4779
  var BITS = { BIN: 10, OCT: 30, DEC: 0, HEX: 40 };
4745
4780
  function parseBase(value2, base) {
4746
- const text = toText(scalar(value2)).trim().toUpperCase();
4781
+ const text2 = toText(scalar(value2)).trim().toUpperCase();
4747
4782
  if (base === "DEC") return Math.trunc(num(value2));
4748
4783
  const radix = BASES[base];
4749
4784
  const digits2 = radix === 2 ? /^[01]{1,10}$/ : radix === 8 ? /^[0-7]{1,10}$/ : /^[0-9A-F]{1,10}$/;
4750
- if (text === "") return 0;
4751
- if (!digits2.test(text)) fail(ERR.NUM);
4752
- let n = parseInt(text, radix);
4785
+ if (text2 === "") return 0;
4786
+ if (!digits2.test(text2)) fail(ERR.NUM);
4787
+ let n = parseInt(text2, radix);
4753
4788
  const bits = BITS[base];
4754
- if (text.length === 10 && n >= Math.pow(2, bits - 1)) n -= Math.pow(2, bits);
4789
+ if (text2.length === 10 && n >= Math.pow(2, bits - 1)) n -= Math.pow(2, bits);
4755
4790
  return n;
4756
4791
  }
4757
4792
  function formatBase(n, base, places) {
@@ -4760,10 +4795,10 @@ function formatBase(n, base, places) {
4760
4795
  const limit2 = Math.pow(2, bits - 1);
4761
4796
  if (n < -limit2 || n >= limit2) fail(ERR.NUM);
4762
4797
  if (n < 0) return (Math.pow(2, bits) + n).toString(radix).toUpperCase();
4763
- const text = n.toString(radix).toUpperCase();
4764
- if (places === void 0) return text;
4765
- if (places < text.length || places > 10) fail(ERR.NUM);
4766
- return text.padStart(Math.trunc(places), "0");
4798
+ const text2 = n.toString(radix).toUpperCase();
4799
+ if (places === void 0) return text2;
4800
+ if (places < text2.length || places > 10) fail(ERR.NUM);
4801
+ return text2.padStart(Math.trunc(places), "0");
4767
4802
  }
4768
4803
  var conversions = [];
4769
4804
  for (const from of Object.keys(BASES)) {
@@ -4898,9 +4933,9 @@ var ENGINEERING_FUNCTIONS = [
4898
4933
  1,
4899
4934
  1,
4900
4935
  (args) => {
4901
- const text = str(args[0]).trim().toUpperCase();
4902
- const negative = text.startsWith("-");
4903
- const body2 = negative ? text.slice(1) : text;
4936
+ const text2 = str(args[0]).trim().toUpperCase();
4937
+ const negative = text2.startsWith("-");
4938
+ const body2 = negative ? text2.slice(1) : text2;
4904
4939
  if (!/^[MDCLXVI]*$/.test(body2)) fail(ERR.VALUE);
4905
4940
  const value2 = { M: 1e3, D: 500, C: 100, L: 50, X: 10, V: 5, I: 1 };
4906
4941
  let total2 = 0;
@@ -4934,11 +4969,11 @@ var ENGINEERING_FUNCTIONS = [
4934
4969
  2,
4935
4970
  2,
4936
4971
  (args) => {
4937
- const text = str(args[0]).trim().toLowerCase();
4972
+ const text2 = str(args[0]).trim().toLowerCase();
4938
4973
  const radix = Math.trunc(num(args[1]));
4939
4974
  if (radix < 2 || radix > 36) fail(ERR.NUM);
4940
4975
  let total2 = 0;
4941
- for (const ch of text) {
4976
+ for (const ch of text2) {
4942
4977
  const d = parseInt(ch, 36);
4943
4978
  if (Number.isNaN(d) || d >= radix) fail(ERR.NUM);
4944
4979
  total2 = total2 * radix + d;
@@ -4975,14 +5010,14 @@ function couponFacts(settlement, maturity, frequency2, basis, ctx) {
4975
5010
  const daysToNext = basis === 0 ? daysInPeriod - daysSincePrevious : basis === 4 ? days360(s, next, true, ctx) : next - s;
4976
5011
  return { previous, next, count: count2, daysSincePrevious, daysInPeriod, daysToNext };
4977
5012
  }
4978
- var security = (name, description, pick2) => spec(
5013
+ var security = (name, description, pick3) => spec(
4979
5014
  name,
4980
5015
  C8,
4981
5016
  `${name}(settlement, maturity, frequency, [basis])`,
4982
5017
  description,
4983
5018
  3,
4984
5019
  4,
4985
- (args, ctx) => pick2(
5020
+ (args, ctx) => pick3(
4986
5021
  couponFacts(
4987
5022
  serialArg(args[0]),
4988
5023
  serialArg(args[1]),
@@ -6859,15 +6894,15 @@ function offset(args) {
6859
6894
  { sheet: area.sheet, range: { start: { row: r1, col: c1 }, end: { row: r2, col: c2 } } }
6860
6895
  ]);
6861
6896
  }
6862
- function parseR1C1(text, ctx) {
6863
- const bang = text.lastIndexOf("!");
6897
+ function parseR1C1(text2, ctx) {
6898
+ const bang = text2.lastIndexOf("!");
6864
6899
  let sheet = ctx.sheet;
6865
- let body2 = text;
6900
+ let body2 = text2;
6866
6901
  if (bang >= 0) {
6867
- const name = text.slice(0, bang).replace(/^'(.*)'$/, "$1").replace(/''/g, "'");
6902
+ const name = text2.slice(0, bang).replace(/^'(.*)'$/, "$1").replace(/''/g, "'");
6868
6903
  sheet = sheetIndex(ctx.frame.host, name);
6869
6904
  if (sheet < 0) return void 0;
6870
- body2 = text.slice(bang + 1);
6905
+ body2 = text2.slice(bang + 1);
6871
6906
  }
6872
6907
  const range2 = parseR1C1Range(body2, { row: ctx.row, col: ctx.col });
6873
6908
  if (!range2) return void 0;
@@ -6930,9 +6965,9 @@ var REFERENCE_FUNCTIONS = [
6930
6965
  1,
6931
6966
  2,
6932
6967
  (args, ctx) => {
6933
- const text = str(args[0]).trim();
6968
+ const text2 = str(args[0]).trim();
6934
6969
  const a1 = args.length > 1 ? bool(args[1]) : true;
6935
- const ref = a1 ? ctx.parseReference(text) : parseR1C1(text, ctx);
6970
+ const ref = a1 ? ctx.parseReference(text2) : parseR1C1(text2, ctx);
6936
6971
  return ref ?? ERR.REF;
6937
6972
  },
6938
6973
  void 0,
@@ -7303,13 +7338,13 @@ var numberKey = (n) => `n${round15(n)}`;
7303
7338
  function equalityKey(criteria) {
7304
7339
  if (typeof criteria === "number") return numberKey(criteria);
7305
7340
  if (typeof criteria !== "string") return void 0;
7306
- const text = criteria.startsWith("=") ? criteria.slice(1) : criteria;
7307
- if (/^(<|>)/.test(text) || text === "" || hasWildcards(text) || text.startsWith("#"))
7341
+ const text2 = criteria.startsWith("=") ? criteria.slice(1) : criteria;
7342
+ if (/^(<|>)/.test(text2) || text2 === "" || hasWildcards(text2) || text2.startsWith("#"))
7308
7343
  return void 0;
7309
- const upper2 = text.toUpperCase();
7344
+ const upper2 = text2.toUpperCase();
7310
7345
  if (upper2 === "TRUE" || upper2 === "FALSE") return void 0;
7311
- const n = parseNumberText(text);
7312
- return n !== void 0 ? numberKey(n) : `s${text.toLowerCase()}`;
7346
+ const n = parseNumberText(text2);
7347
+ return n !== void 0 ? numberKey(n) : `s${text2.toLowerCase()}`;
7313
7348
  }
7314
7349
  function valueKeys(value2, out) {
7315
7350
  out.length = 0;
@@ -10415,12 +10450,12 @@ function fixed(value2, decimals2, commas) {
10415
10450
  const d = Math.trunc(decimals2);
10416
10451
  const rounded = roundTo(value2, d, "half");
10417
10452
  const abs2 = Math.abs(rounded);
10418
- let text = abs2.toFixed(Math.max(0, Math.min(d, 99)));
10453
+ let text2 = abs2.toFixed(Math.max(0, Math.min(d, 99)));
10419
10454
  if (commas) {
10420
- const [int2 = "", frac] = text.split(".");
10421
- text = int2.replace(/\B(?=(\d{3})+(?!\d))/g, ",") + (frac !== void 0 ? `.${frac}` : "");
10455
+ const [int2 = "", frac] = text2.split(".");
10456
+ text2 = int2.replace(/\B(?=(\d{3})+(?!\d))/g, ",") + (frac !== void 0 ? `.${frac}` : "");
10422
10457
  }
10423
- return rounded < 0 ? `-${text}` : text;
10458
+ return rounded < 0 ? `-${text2}` : text2;
10424
10459
  }
10425
10460
  var TEXT_CONVERT = [
10426
10461
  spec(
@@ -10456,19 +10491,19 @@ var TEXT_CONVERT = [
10456
10491
  (args) => {
10457
10492
  const decimal = (args.length > 1 ? str(args[1]) : ".").charAt(0) || ".";
10458
10493
  const group = (args.length > 2 ? str(args[2]) : ",").charAt(0) || ",";
10459
- let text = str(args[0]).replace(/\s+/g, "");
10460
- if (text === "") return 0;
10494
+ let text2 = str(args[0]).replace(/\s+/g, "");
10495
+ if (text2 === "") return 0;
10461
10496
  let percent = 0;
10462
- while (text.endsWith("%")) {
10497
+ while (text2.endsWith("%")) {
10463
10498
  percent++;
10464
- text = text.slice(0, -1);
10499
+ text2 = text2.slice(0, -1);
10465
10500
  }
10466
- const decimalAt = text.indexOf(decimal);
10467
- if (decimalAt >= 0 && text.slice(decimalAt + 1).includes(group)) fail(ERR.VALUE);
10468
- text = text.split(group).join("");
10469
- if (decimal !== ".") text = text.replace(decimal, ".");
10470
- const value2 = Number(text);
10471
- if (!/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i.test(text) || !Number.isFinite(value2))
10501
+ const decimalAt = text2.indexOf(decimal);
10502
+ if (decimalAt >= 0 && text2.slice(decimalAt + 1).includes(group)) fail(ERR.VALUE);
10503
+ text2 = text2.split(group).join("");
10504
+ if (decimal !== ".") text2 = text2.replace(decimal, ".");
10505
+ const value2 = Number(text2);
10506
+ if (!/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i.test(text2) || !Number.isFinite(value2))
10472
10507
  fail(ERR.VALUE);
10473
10508
  return value2 / Math.pow(100, percent);
10474
10509
  }
@@ -10491,8 +10526,8 @@ var TEXT_CONVERT = [
10491
10526
  2,
10492
10527
  (args) => {
10493
10528
  const value2 = num(args[0]);
10494
- const text = fixed(Math.abs(value2), optNum(args, 1, 2), true);
10495
- return value2 < 0 && text.replace(/[0.,]/g, "") !== "" ? `($${text})` : `$${text}`;
10529
+ const text2 = fixed(Math.abs(value2), optNum(args, 1, 2), true);
10530
+ return value2 < 0 && text2.replace(/[0.,]/g, "") !== "" ? `($${text2})` : `$${text2}`;
10496
10531
  }
10497
10532
  ),
10498
10533
  spec("CHAR", C33, "CHAR(number)", "The character for a code (Windows-1252).", 1, 1, (args) => {
@@ -10501,9 +10536,9 @@ var TEXT_CONVERT = [
10501
10536
  return String.fromCharCode(CP1252[n] ?? n);
10502
10537
  }),
10503
10538
  spec("CODE", C33, "CODE(text)", "The code of the first character (Windows-1252).", 1, 1, (args) => {
10504
- const text = str(args[0]);
10505
- if (text === "") fail(ERR.VALUE);
10506
- const code = text.charCodeAt(0);
10539
+ const text2 = str(args[0]);
10540
+ if (text2 === "") fail(ERR.VALUE);
10541
+ const code = text2.charCodeAt(0);
10507
10542
  return CP1252_REVERSE.get(code) ?? (code <= 255 ? code : 63);
10508
10543
  }),
10509
10544
  spec("UNICHAR", C33, "UNICHAR(number)", "The Unicode character for a code point.", 1, 1, (args) => {
@@ -10512,9 +10547,9 @@ var TEXT_CONVERT = [
10512
10547
  return String.fromCodePoint(n);
10513
10548
  }),
10514
10549
  spec("UNICODE", C33, "UNICODE(text)", "The code point of the first character.", 1, 1, (args) => {
10515
- const text = str(args[0]);
10516
- if (text === "") fail(ERR.VALUE);
10517
- return text.codePointAt(0) ?? fail(ERR.VALUE);
10550
+ const text2 = str(args[0]);
10551
+ if (text2 === "") fail(ERR.VALUE);
10552
+ return text2.codePointAt(0) ?? fail(ERR.VALUE);
10518
10553
  }),
10519
10554
  spec("T", C33, "T(value)", "The text of a value, or empty text.", 1, 1, (args) => {
10520
10555
  const v = scalar(args[0]);
@@ -10538,37 +10573,37 @@ function lowerChar(ch, before, after) {
10538
10573
  const points = [...low];
10539
10574
  return points.length === 1 ? low : points[0] ?? ch;
10540
10575
  }
10541
- function mapChars(text, fn) {
10542
- const chars = [...text];
10576
+ function mapChars(text2, fn) {
10577
+ const chars = [...text2];
10543
10578
  let out = "";
10544
10579
  for (let i2 = 0; i2 < chars.length; i2++) out += fn(chars[i2], i2, chars);
10545
10580
  return out;
10546
10581
  }
10547
- var upper = (text) => mapChars(text, upperChar);
10548
- var lower = (text) => mapChars(text, (ch, i2, all2) => lowerChar(ch, all2[i2 - 1], all2[i2 + 1]));
10549
- var proper = (text) => mapChars(text, (ch, i2, all2) => {
10582
+ var upper = (text2) => mapChars(text2, upperChar);
10583
+ var lower = (text2) => mapChars(text2, (ch, i2, all2) => lowerChar(ch, all2[i2 - 1], all2[i2 + 1]));
10584
+ var proper = (text2) => mapChars(text2, (ch, i2, all2) => {
10550
10585
  if (!isLetter(ch)) return ch;
10551
10586
  const before = all2[i2 - 1];
10552
10587
  return before !== void 0 && isLetter(before) ? lowerChar(ch, before, all2[i2 + 1]) : upperChar(ch);
10553
10588
  });
10554
10589
  var isHigh = (code) => code >= 55296 && code <= 56319;
10555
10590
  var isLow = (code) => code >= 56320 && code <= 57343;
10556
- function left(text, n) {
10557
- let end = Math.min(n, text.length);
10558
- if (end > 0 && end < text.length && isHigh(text.charCodeAt(end - 1))) end++;
10559
- return text.slice(0, end);
10591
+ function left(text2, n) {
10592
+ let end = Math.min(n, text2.length);
10593
+ if (end > 0 && end < text2.length && isHigh(text2.charCodeAt(end - 1))) end++;
10594
+ return text2.slice(0, end);
10560
10595
  }
10561
- function right(text, n) {
10596
+ function right(text2, n) {
10562
10597
  if (n <= 0) return "";
10563
- let start = Math.max(0, text.length - n);
10564
- if (start > 0 && isLow(text.charCodeAt(start))) start--;
10565
- return text.slice(start);
10598
+ let start = Math.max(0, text2.length - n);
10599
+ if (start > 0 && isLow(text2.charCodeAt(start))) start--;
10600
+ return text2.slice(start);
10566
10601
  }
10567
10602
 
10568
10603
  // xlsx/formula/functions/text.ts
10569
10604
  var C34 = "Text";
10570
10605
  var MAX_TEXT = 32767;
10571
- var limit = (text) => text.length > MAX_TEXT ? fail(ERR.VALUE) : text;
10606
+ var limit = (text2) => text2.length > MAX_TEXT ? fail(ERR.VALUE) : text2;
10572
10607
  function find(args, insensitive) {
10573
10608
  const needle = str(args[0]);
10574
10609
  const haystack = str(args[1]);
@@ -10733,19 +10768,19 @@ var TEXT_FUNCTIONS = [
10733
10768
  3,
10734
10769
  4,
10735
10770
  (args) => {
10736
- const text = str(args[0]);
10771
+ const text2 = str(args[0]);
10737
10772
  const oldText = str(args[1]);
10738
10773
  const newText = str(args[2]);
10739
- if (oldText === "") return text;
10740
- if (args.length < 4) return limit(text.split(oldText).join(newText));
10774
+ if (oldText === "") return text2;
10775
+ if (args.length < 4) return limit(text2.split(oldText).join(newText));
10741
10776
  const instance = Math.trunc(num(args[3]));
10742
10777
  if (instance < 1) fail(ERR.VALUE);
10743
10778
  let at = -1;
10744
10779
  for (let i2 = 0; i2 < instance; i2++) {
10745
- at = text.indexOf(oldText, at + 1);
10746
- if (at < 0) return text;
10780
+ at = text2.indexOf(oldText, at + 1);
10781
+ if (at < 0) return text2;
10747
10782
  }
10748
- return limit(text.slice(0, at) + newText + text.slice(at + oldText.length));
10783
+ return limit(text2.slice(0, at) + newText + text2.slice(at + oldText.length));
10749
10784
  }
10750
10785
  ),
10751
10786
  ...["REPLACE", "REPLACEB"].map(
@@ -10757,11 +10792,11 @@ var TEXT_FUNCTIONS = [
10757
10792
  4,
10758
10793
  4,
10759
10794
  (args) => {
10760
- const text = str(args[0]);
10795
+ const text2 = str(args[0]);
10761
10796
  const start = Math.trunc(num(args[1]));
10762
10797
  const n = Math.trunc(num(args[2]));
10763
10798
  if (start < 1 || n < 0) fail(ERR.VALUE);
10764
- return limit(text.slice(0, start - 1) + str(args[3]) + text.slice(start - 1 + n));
10799
+ return limit(text2.slice(0, start - 1) + str(args[3]) + text2.slice(start - 1 + n));
10765
10800
  }
10766
10801
  )
10767
10802
  ),
@@ -10789,9 +10824,9 @@ var TEXT_FUNCTIONS = [
10789
10824
  ),
10790
10825
  spec("REPT", C34, "REPT(text, number_times)", "Repeats a text.", 2, 2, (args) => {
10791
10826
  const n = Math.trunc(num(args[1]));
10792
- const text = str(args[0]);
10793
- if (n < 0 || text.length * n > MAX_TEXT) fail(ERR.VALUE);
10794
- return text.repeat(n);
10827
+ const text2 = str(args[0]);
10828
+ if (n < 0 || text2.length * n > MAX_TEXT) fail(ERR.VALUE);
10829
+ return text2.repeat(n);
10795
10830
  }),
10796
10831
  spec(
10797
10832
  "EXACT",
@@ -10815,8 +10850,8 @@ function compile(pattern, caseMode2, global) {
10815
10850
  }
10816
10851
  }
10817
10852
  var caseMode = (args, index2) => optNum(args, index2, 0);
10818
- function encodeUrl(text) {
10819
- return encodeURIComponent(text).replace(
10853
+ function encodeUrl(text2) {
10854
+ return encodeURIComponent(text2).replace(
10820
10855
  /[!'()*]/g,
10821
10856
  (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`
10822
10857
  );
@@ -10861,15 +10896,15 @@ var TEXT_REGEX_FUNCTIONS = [
10861
10896
  3,
10862
10897
  5,
10863
10898
  (args) => {
10864
- const text = str(args[0]);
10899
+ const text2 = str(args[0]);
10865
10900
  const regex = compile(str(args[1]), caseMode(args, 4), true);
10866
10901
  const replacement = str(args[2]);
10867
10902
  const occurrence = args.length > 3 && args[3] !== null ? int(args[3]) : 0;
10868
- if (occurrence === 0) return text.replace(regex, replacement);
10869
- const matches2 = [...text.matchAll(regex)];
10903
+ if (occurrence === 0) return text2.replace(regex, replacement);
10904
+ const matches2 = [...text2.matchAll(regex)];
10870
10905
  const picked = occurrence > 0 ? matches2[occurrence - 1] : matches2.at(occurrence);
10871
- if (!picked || picked.index === void 0) return text;
10872
- return text.slice(0, picked.index) + picked[0].replace(new RegExp(regex.source, regex.flags.replace("g", "")), replacement) + text.slice(picked.index + picked[0].length);
10906
+ if (!picked || picked.index === void 0) return text2;
10907
+ return text2.slice(0, picked.index) + picked[0].replace(new RegExp(regex.source, regex.flags.replace("g", "")), replacement) + text2.slice(picked.index + picked[0].length);
10873
10908
  }
10874
10909
  )
10875
10910
  ];
@@ -10883,8 +10918,8 @@ function delimitersOf(ctx, value2) {
10883
10918
  return toText(v);
10884
10919
  });
10885
10920
  }
10886
- function occurrences(text, delimiters, insensitive) {
10887
- const hay = insensitive ? text.toLowerCase() : text;
10921
+ function occurrences(text2, delimiters, insensitive) {
10922
+ const hay = insensitive ? text2.toLowerCase() : text2;
10888
10923
  const needles = delimiters.map((d) => insensitive ? d.toLowerCase() : d);
10889
10924
  const out = [];
10890
10925
  let i2 = 0;
@@ -10904,35 +10939,35 @@ function occurrences(text, delimiters, insensitive) {
10904
10939
  return out;
10905
10940
  }
10906
10941
  function textAround(args, ctx, before) {
10907
- const text = str(args[0]);
10942
+ const text2 = str(args[0]);
10908
10943
  const delimiters = delimitersOf(ctx, args[1]);
10909
10944
  const instance = Math.trunc(optNum(args, 2, 1));
10910
10945
  const insensitive = optNum(args, 3, 0) === 1;
10911
10946
  const matchEnd = optBool(args, 4, false);
10912
10947
  const notFound = args.length > 5 ? scalar(args[5]) ?? ERR.NA : ERR.NA;
10913
- if (instance === 0 || Math.abs(instance) > text.length + 1) fail(ERR.VALUE);
10948
+ if (instance === 0 || Math.abs(instance) > text2.length + 1) fail(ERR.VALUE);
10914
10949
  if (delimiters.length === 0 || delimiters.every((d) => d === "")) {
10915
- return before ? instance > 0 ? "" : text : instance > 0 ? text : "";
10950
+ return before ? instance > 0 ? "" : text2 : instance > 0 ? text2 : "";
10916
10951
  }
10917
- const found = occurrences(text, delimiters, insensitive);
10952
+ const found = occurrences(text2, delimiters, insensitive);
10918
10953
  if (matchEnd) {
10919
- if (instance > 0) found.push({ at: text.length, length: 0 });
10954
+ if (instance > 0) found.push({ at: text2.length, length: 0 });
10920
10955
  else found.unshift({ at: 0, length: 0 });
10921
10956
  }
10922
10957
  const index2 = instance > 0 ? instance - 1 : found.length + instance;
10923
10958
  const hit = found[index2];
10924
10959
  if (!hit || index2 < 0) return notFound;
10925
- return before ? text.slice(0, hit.at) : text.slice(hit.at + hit.length);
10960
+ return before ? text2.slice(0, hit.at) : text2.slice(hit.at + hit.length);
10926
10961
  }
10927
- function splitText(text, delimiters, insensitive, ignoreEmpty) {
10928
- if (delimiters.length === 0) return [text];
10962
+ function splitText(text2, delimiters, insensitive, ignoreEmpty) {
10963
+ if (delimiters.length === 0) return [text2];
10929
10964
  const parts = [];
10930
10965
  let last = 0;
10931
- for (const hit of occurrences(text, delimiters, insensitive)) {
10932
- parts.push(text.slice(last, hit.at));
10966
+ for (const hit of occurrences(text2, delimiters, insensitive)) {
10967
+ parts.push(text2.slice(last, hit.at));
10933
10968
  last = hit.at + hit.length;
10934
10969
  }
10935
- parts.push(text.slice(last));
10970
+ parts.push(text2.slice(last));
10936
10971
  return ignoreEmpty ? parts.filter((p) => p !== "") : parts;
10937
10972
  }
10938
10973
  function valueToText(value2, strict) {
@@ -10970,14 +11005,14 @@ var TEXT_EXTRA_FUNCTIONS = [
10970
11005
  2,
10971
11006
  6,
10972
11007
  (args, ctx) => {
10973
- const text = str(ctx.toScalar(args[0] ?? null));
11008
+ const text2 = str(ctx.toScalar(args[0] ?? null));
10974
11009
  const colDelims = delimitersOf(ctx, args[1]);
10975
11010
  const rowDelims = delimitersOf(ctx, args[2]);
10976
11011
  const ignoreEmpty = args.length > 3 && args[3] !== null && Boolean(scalar(ctx.toScalar(args[3] ?? null)));
10977
11012
  const insensitive = args.length > 4 && optNum([ctx.toScalar(args[4] ?? null)], 0, 0) === 1;
10978
11013
  const pad4 = args.length > 5 ? ctx.toScalar(args[5] ?? null) : ERR.NA;
10979
11014
  if (colDelims.length === 0 && rowDelims.length === 0) fail(ERR.VALUE);
10980
- const rows2 = splitText(text, rowDelims, insensitive, ignoreEmpty).map(
11015
+ const rows2 = splitText(text2, rowDelims, insensitive, ignoreEmpty).map(
10981
11016
  (line2) => splitText(line2, colDelims, insensitive, ignoreEmpty)
10982
11017
  );
10983
11018
  const width = rows2.reduce((w, r) => Math.max(w, r.length), 0);
@@ -11171,10 +11206,10 @@ function createContext(frame) {
11171
11206
  scope ? { ...frame, scope, root: void 0 } : { ...frame, root: void 0 }
11172
11207
  ),
11173
11208
  callLambda: (fn, args) => invokeLambda(fn, args, frame),
11174
- parseReference(text) {
11209
+ parseReference(text2) {
11175
11210
  let ast;
11176
11211
  try {
11177
- ast = parseFormula(text.trim());
11212
+ ast = parseFormula(text2.trim());
11178
11213
  } catch (e) {
11179
11214
  if (e instanceof FormulaError) return void 0;
11180
11215
  throw e;
@@ -12396,11 +12431,17 @@ var Engine = class extends EngineCore {
12396
12431
  this.run(new Set(this.allNodes()), true);
12397
12432
  }
12398
12433
  recalculateFrom(changes) {
12399
- if (!this.built || this.needsFull) {
12434
+ const seeds = /* @__PURE__ */ new Set();
12435
+ if (!this.built && !this.needsFull) {
12436
+ this.build();
12437
+ if (!this.trustsStoredValues(changes, seeds)) {
12438
+ this.recalculateAll();
12439
+ return;
12440
+ }
12441
+ } else if (!this.built || this.needsFull) {
12400
12442
  this.recalculateAll();
12401
12443
  return;
12402
12444
  }
12403
- const seeds = /* @__PURE__ */ new Set();
12404
12445
  const changed = [];
12405
12446
  let structural = false;
12406
12447
  for (const change of changes) {
@@ -12441,6 +12482,22 @@ var Engine = class extends EngineCore {
12441
12482
  for (const node of this.allNodes()) if (node.volatile) seeds.add(node);
12442
12483
  this.run(seeds, false);
12443
12484
  }
12485
+ /**
12486
+ * Whether the stored results can stand for a fresh graph: apart from the changed cells, every
12487
+ * formula has legacy or CSE array semantics (none can spill). Collects the formulas stored
12488
+ * without a value into `missing`.
12489
+ */
12490
+ trustsStoredValues(changes, missing) {
12491
+ const changed = new Set(changes.map((c) => `${c.sheet}:${cellKey(c.row, c.col)}`));
12492
+ for (const node of this.allNodes()) {
12493
+ const legacyOrArray = node.legacy || node.arrayRange;
12494
+ if (!legacyOrArray && !changed.has(`${node.sheet}:${cellKey(node.row, node.col)}`))
12495
+ return false;
12496
+ const cell = this.workbook.sheets[node.sheet]?.rows.get(node.row)?.get(node.col);
12497
+ if (cell && cell.value === null && !node.keepCached) missing.add(node);
12498
+ }
12499
+ return true;
12500
+ }
12444
12501
  /**
12445
12502
  * Whether a spilled cell is still part of its anchor's live spill, so a change reported for it
12446
12503
  * is a user overwrite. A cell whose anchor is blocked (or gone) keeps its marker: it was
@@ -12572,10 +12629,10 @@ function mergeSpacedAreas(tokens) {
12572
12629
  const colon = tokens[j];
12573
12630
  const last = tokens[k];
12574
12631
  if (plainCell(first2) && colon?.kind === "op" && colon.text === ":" && plainCell(last) && !last?.prefix && k > i2 + 2 && first2.ref && last?.ref) {
12575
- const text = tokens.slice(i2, k + 1).map((t) => t.text).join("");
12632
+ const text2 = tokens.slice(i2, k + 1).map((t) => t.text).join("");
12576
12633
  out.push({
12577
12634
  ...first2,
12578
- text,
12635
+ text: text2,
12579
12636
  ref: { kind: "area", start: first2.ref.start, end: last.ref.start }
12580
12637
  });
12581
12638
  i2 = k;
@@ -12638,9 +12695,9 @@ function renameSheetInFormula(formula, oldName, newName) {
12638
12695
  if (!first2 && !second) continue;
12639
12696
  const renamed = { ...prefix, sheet: first2 ? newName : prefix.sheet };
12640
12697
  if (prefix.sheet2 !== void 0) renamed.sheet2 = second ? newName : prefix.sheet2;
12641
- const text = prefixText(renamed);
12642
- token.text = text + token.text.slice(prefix.text.length);
12643
- renamed.text = text;
12698
+ const text2 = prefixText(renamed);
12699
+ token.text = text2 + token.text.slice(prefix.text.length);
12700
+ renamed.text = text2;
12644
12701
  token.prefix = renamed;
12645
12702
  }
12646
12703
  return joinTokens(tokens);
@@ -12940,6 +12997,16 @@ function parseColor(element2, palette) {
12940
12997
  return Object.keys(color).length ? color : void 0;
12941
12998
  }
12942
12999
 
13000
+ // color/hex-rgb.ts
13001
+ function parseArgbHex(hex2) {
13002
+ const clean2 = hex2.replace(/^#/, "");
13003
+ const rgb2 = clean2.length === 8 ? clean2.slice(2) : clean2;
13004
+ if (!/^[0-9a-fA-F]{6}$/.test(rgb2)) return void 0;
13005
+ return [0, 2, 4].map((i2) => parseInt(rgb2.slice(i2, i2 + 2), 16));
13006
+ }
13007
+ var clamp255 = (v) => Math.max(0, Math.min(255, v));
13008
+ var rgbToUpperHex = (rgb2) => `#${rgb2.map((v) => clamp255(Math.round(v)).toString(16).padStart(2, "0")).join("").toUpperCase()}`;
13009
+
12943
13010
  // xlsx/read/sheet-props.ts
12944
13011
  function parseSqref(sqref) {
12945
13012
  if (!sqref) return [];
@@ -12970,6 +13037,104 @@ function rewriteConditionalExtension(rule, rewrite2) {
12970
13037
  if (changed) rule.extensionXml = buildXml(doc);
12971
13038
  }
12972
13039
 
13040
+ // xlsx/read/sparklines.ts
13041
+ var XM2 = "http://schemas.microsoft.com/office/excel/2006/main";
13042
+ var TYPES = ["line", "column", "stacked"];
13043
+ var EMPTY = ["gap", "zero", "span"];
13044
+ var AXES = ["individual", "group", "custom"];
13045
+ var COLORS = [
13046
+ "colorSeries",
13047
+ "colorNegative",
13048
+ "colorAxis",
13049
+ "colorMarkers",
13050
+ "colorFirst",
13051
+ "colorLast",
13052
+ "colorHigh",
13053
+ "colorLow"
13054
+ ];
13055
+ function pick2(value2, allowed, fallback) {
13056
+ return allowed.includes(value2) ? value2 : fallback;
13057
+ }
13058
+ var text = (element2) => {
13059
+ const value2 = element2?.textContent?.trim();
13060
+ return value2 ? value2 : void 0;
13061
+ };
13062
+ function readSparklineGroup(node) {
13063
+ const attr = (name) => node.hasAttribute(name) ? node.getAttribute(name) : null;
13064
+ const group = {
13065
+ type: pick2(attr("type"), TYPES, "line"),
13066
+ lineWeight: numAttr(node, "lineWeight") ?? 0.75,
13067
+ dateAxis: boolAttr(node, "dateAxis", false),
13068
+ markers: boolAttr(node, "markers", false),
13069
+ high: boolAttr(node, "high", false),
13070
+ low: boolAttr(node, "low", false),
13071
+ first: boolAttr(node, "first", false),
13072
+ last: boolAttr(node, "last", false),
13073
+ negative: boolAttr(node, "negative", false),
13074
+ displayEmptyCellsAs: pick2(attr("displayEmptyCellsAs"), EMPTY, "zero"),
13075
+ displayXAxis: boolAttr(node, "displayXAxis", false),
13076
+ displayHidden: boolAttr(node, "displayHidden", false),
13077
+ rightToLeft: boolAttr(node, "rightToLeft", false),
13078
+ minAxisType: pick2(attr("minAxisType"), AXES, "individual"),
13079
+ maxAxisType: pick2(attr("maxAxisType"), AXES, "individual"),
13080
+ sparklines: []
13081
+ };
13082
+ const manualMin = numAttr(node, "manualMin");
13083
+ const manualMax = numAttr(node, "manualMax");
13084
+ if (manualMin !== void 0) group.manualMin = manualMin;
13085
+ if (manualMax !== void 0) group.manualMax = manualMax;
13086
+ for (const name of COLORS) {
13087
+ const color = parseColor(first(node, name, NS.x14));
13088
+ if (color) group[name] = color;
13089
+ }
13090
+ const dates = text(first(node, "f", XM2));
13091
+ if (dates) group.dateFormula = dates;
13092
+ for (const line2 of children(first(node, "sparklines", NS.x14) ?? node, "sparkline", NS.x14)) {
13093
+ const host = parseRange(text(first(line2, "sqref", XM2)) ?? "");
13094
+ if (!host) continue;
13095
+ const formula = text(first(line2, "f", XM2));
13096
+ group.sparklines.push(formula ? { formula, host } : { host });
13097
+ }
13098
+ return group;
13099
+ }
13100
+ function readSparklineGroups(extLst) {
13101
+ const groups = [];
13102
+ for (const xml of extLst) {
13103
+ if (!xml.includes("sparklineGroup")) continue;
13104
+ let root;
13105
+ try {
13106
+ root = parseXml(xml).documentElement;
13107
+ } catch {
13108
+ continue;
13109
+ }
13110
+ for (const node of descendants(root, "sparklineGroup", NS.x14))
13111
+ groups.push(readSparklineGroup(node));
13112
+ }
13113
+ return groups;
13114
+ }
13115
+ var cache2 = /* @__PURE__ */ new WeakMap();
13116
+ function sheetSparklineGroups(sheet) {
13117
+ const source = sheet.preserved.get("extLst") ?? [];
13118
+ const hit = cache2.get(sheet);
13119
+ if (hit && hit.source.length === source.length && hit.source.every((xml, i2) => xml === source[i2]))
13120
+ return hit.groups;
13121
+ const groups = readSparklineGroups(source);
13122
+ cache2.set(sheet, { source: [...source], groups });
13123
+ return groups;
13124
+ }
13125
+
13126
+ // chart/bar-cluster-geometry.ts
13127
+ function assertBarClusterOptions(options) {
13128
+ for (const [field, min, max] of [
13129
+ ["barGapWidth", 0, 500],
13130
+ ["barOverlap", -100, 100]
13131
+ ]) {
13132
+ const value2 = options[field];
13133
+ if (value2 !== void 0 && (!Number.isInteger(value2) || value2 < min || value2 > max))
13134
+ throw new RangeError(`${field} must be an integer from ${min} to ${max}`);
13135
+ }
13136
+ }
13137
+
12973
13138
  // chart/color-palettes.ts
12974
13139
  var COLORFUL_VARIATIONS = [
12975
13140
  {},
@@ -13155,24 +13320,19 @@ function hueToRgb(n1, n2, hue) {
13155
13320
  return n1 + idiv((n2 - n1) * (idiv(HLSMAX * 2, 3) - h2) + idiv(HLSMAX, 12), sixth);
13156
13321
  return n1;
13157
13322
  }
13158
- var clamp255 = (v) => Math.max(0, Math.min(255, v));
13323
+ var clamp2552 = (v) => Math.max(0, Math.min(255, v));
13159
13324
  function hls240ToRgb({ h: h2, l, s }) {
13160
13325
  if (s === 0) {
13161
- const v = clamp255(Math.round(l * RGBMAX / HLSMAX));
13326
+ const v = clamp2552(Math.round(l * RGBMAX / HLSMAX));
13162
13327
  return [v, v, v];
13163
13328
  }
13164
13329
  const m2 = l <= HLSMAX / 2 ? idiv(l * (HLSMAX + s) + idiv(HLSMAX, 2), HLSMAX) : l + s - idiv(l * s + idiv(HLSMAX, 2), HLSMAX);
13165
13330
  const m1 = 2 * l - m2;
13166
- const channel = (hue) => clamp255(idiv(hueToRgb(m1, m2, hue) * RGBMAX + idiv(HLSMAX, 2), HLSMAX));
13331
+ const channel = (hue) => clamp2552(idiv(hueToRgb(m1, m2, hue) * RGBMAX + idiv(HLSMAX, 2), HLSMAX));
13167
13332
  return [channel(h2 + idiv(HLSMAX, 3)), channel(h2), channel(h2 - idiv(HLSMAX, 3))];
13168
13333
  }
13169
- function parseHex(hex2) {
13170
- const clean2 = hex2.replace(/^#/, "");
13171
- const rgb2 = clean2.length === 8 ? clean2.slice(2) : clean2;
13172
- if (!/^[0-9a-fA-F]{6}$/.test(rgb2)) return void 0;
13173
- return [0, 2, 4].map((i2) => parseInt(rgb2.slice(i2, i2 + 2), 16));
13174
- }
13175
- var toHexColor = (rgb2) => `#${rgb2.map((v) => clamp255(Math.round(v)).toString(16).padStart(2, "0")).join("").toUpperCase()}`;
13334
+ var parseHex = parseArgbHex;
13335
+ var toHexColor = rgbToUpperHex;
13176
13336
  function applyTint(hex2, tint) {
13177
13337
  const rgb2 = parseHex(hex2) ?? [0, 0, 0];
13178
13338
  if (!tint) return toHexColor(rgb2);
@@ -13182,6 +13342,40 @@ function applyTint(hex2, tint) {
13182
13342
  return toHexColor(hls240ToRgb({ ...hls, l: Math.max(0, Math.min(HLSMAX, l)) }));
13183
13343
  }
13184
13344
 
13345
+ // chart/render/theme-palette.ts
13346
+ var THEME_SLOTS = [
13347
+ "lt1",
13348
+ "dk1",
13349
+ "lt2",
13350
+ "dk2",
13351
+ "accent1",
13352
+ "accent2",
13353
+ "accent3",
13354
+ "accent4",
13355
+ "accent5",
13356
+ "accent6",
13357
+ "hlink",
13358
+ "folHlink"
13359
+ ];
13360
+ var DEFAULT_THEME_COLORS = [
13361
+ "FFFFFF",
13362
+ "000000",
13363
+ "E7E6E6",
13364
+ "44546A",
13365
+ "4472C4",
13366
+ "ED7D31",
13367
+ "A5A5A5",
13368
+ "FFC000",
13369
+ "5B9BD5",
13370
+ "70AD47",
13371
+ "0563C1",
13372
+ "954F72"
13373
+ ];
13374
+ function themeColor(theme2, index2) {
13375
+ const hex2 = theme2.colors[index2] ?? DEFAULT_THEME_COLORS[index2];
13376
+ return hex2 && parseArgbHex(hex2) ? hex2.replace(/^#/, "") : void 0;
13377
+ }
13378
+
13185
13379
  // xlsx/layout/colors.ts
13186
13380
  var INDEXED_COLORS = [
13187
13381
  "000000",
@@ -13251,38 +13445,6 @@ var INDEXED_COLORS = [
13251
13445
  "000000",
13252
13446
  "FFFFFF"
13253
13447
  ];
13254
- var THEME_SLOTS = [
13255
- "lt1",
13256
- "dk1",
13257
- "lt2",
13258
- "dk2",
13259
- "accent1",
13260
- "accent2",
13261
- "accent3",
13262
- "accent4",
13263
- "accent5",
13264
- "accent6",
13265
- "hlink",
13266
- "folHlink"
13267
- ];
13268
- var FALLBACK_THEME = [
13269
- "FFFFFF",
13270
- "000000",
13271
- "E7E6E6",
13272
- "44546A",
13273
- "4472C4",
13274
- "ED7D31",
13275
- "A5A5A5",
13276
- "FFC000",
13277
- "5B9BD5",
13278
- "70AD47",
13279
- "0563C1",
13280
- "954F72"
13281
- ];
13282
- function themeColor(theme2, index2) {
13283
- const hex2 = theme2.colors[index2] ?? FALLBACK_THEME[index2];
13284
- return hex2 && parseHex(hex2) ? hex2.replace(/^#/, "") : void 0;
13285
- }
13286
13448
  function resolveColor(color, theme2, fallback, indexed = INDEXED_COLORS) {
13287
13449
  if (!color) return fallback;
13288
13450
  let base;
@@ -13305,18 +13467,6 @@ function mixColors(a, b, t, rounding = "nearest") {
13305
13467
  );
13306
13468
  }
13307
13469
 
13308
- // chart/bar-cluster-geometry.ts
13309
- function assertBarClusterOptions(options) {
13310
- for (const [field, min, max] of [
13311
- ["barGapWidth", 0, 500],
13312
- ["barOverlap", -100, 100]
13313
- ]) {
13314
- const value2 = options[field];
13315
- if (value2 !== void 0 && (!Number.isInteger(value2) || value2 < min || value2 > max))
13316
- throw new RangeError(`${field} must be an integer from ${min} to ${max}`);
13317
- }
13318
- }
13319
-
13320
13470
  // xlsx/edit/range-math.ts
13321
13471
  var axisMax = (axis) => axis === "row" ? MAX_ROW : MAX_COL;
13322
13472
  function shiftSpan(start, end, shift2) {
@@ -13525,8 +13675,8 @@ function syncTableHeader(ctx, sheet, row2, col) {
13525
13675
  if (!table2) return;
13526
13676
  const column = table2.columns[col - table2.range.start.col];
13527
13677
  if (!column) return;
13528
- const text = displayText(ctx.workbook, getCell(sheet, row2, col)).trim();
13529
- if (text) column.name = text;
13678
+ const text2 = displayText(ctx.workbook, getCell(sheet, row2, col)).trim();
13679
+ if (text2) column.name = text2;
13530
13680
  }
13531
13681
  function writeScopes(sheet, index2, range2, parts = []) {
13532
13682
  const r = normalizeRange(range2);
@@ -13541,11 +13691,11 @@ function writeScopes(sheet, index2, range2, parts = []) {
13541
13691
  if (all2.length) scopes.push({ kind: "parts", sheet: index2, parts: all2 });
13542
13692
  return scopes;
13543
13693
  }
13544
- function writeInput(ctx, sheet, row2, col, text) {
13694
+ function writeInput(ctx, sheet, row2, col, text2) {
13545
13695
  const { workbook } = ctx;
13546
13696
  const existing = getCell(sheet, row2, col);
13547
13697
  const format = styleAt(workbook, existing?.styleId ?? baseStyleId(sheet, row2, col)).numFmt;
13548
- if (text === "") {
13698
+ if (text2 === "") {
13549
13699
  if (existing) clearContents(existing);
13550
13700
  pruneCell(sheet, row2, col);
13551
13701
  return;
@@ -13553,10 +13703,10 @@ function writeInput(ctx, sheet, row2, col, text) {
13553
13703
  const cell = ensureCell(sheet, row2, col);
13554
13704
  clearContents(cell);
13555
13705
  if (format === "@") {
13556
- cell.value = text;
13706
+ cell.value = text2;
13557
13707
  return;
13558
13708
  }
13559
- const parsed = parseCellInput(text, { date1904: workbook.date1904 });
13709
+ const parsed = parseCellInput(text2, { date1904: workbook.date1904 });
13560
13710
  if (parsed.formula !== void 0) cell.formula = parsed.formula;
13561
13711
  else cell.value = parsed.value;
13562
13712
  if (parsed.numFmt && format === "General")
@@ -13582,7 +13732,7 @@ function clearContents(cell) {
13582
13732
  delete cell.legacyFormula;
13583
13733
  delete cell.spillAnchor;
13584
13734
  }
13585
- function setCellInput(ctx, s, row2, col, text) {
13735
+ function setCellInput(ctx, s, row2, col, text2) {
13586
13736
  const sheet = sheetAt(ctx.workbook, s);
13587
13737
  const range2 = cellRange(row2, col);
13588
13738
  ctx.run(
@@ -13590,7 +13740,7 @@ function setCellInput(ctx, s, row2, col, text) {
13590
13740
  "cells",
13591
13741
  writeScopes(sheet, s, range2),
13592
13742
  () => {
13593
- writeInput(ctx, sheet, row2, col, text);
13743
+ writeInput(ctx, sheet, row2, col, text2);
13594
13744
  syncTableHeader(ctx, sheet, row2, col);
13595
13745
  },
13596
13746
  { sheet: s, ranges: [range2] }
@@ -13658,10 +13808,10 @@ function clearRange(ctx, s, range2, what) {
13658
13808
  );
13659
13809
  }
13660
13810
  function clearIn(ctx, sheet, r, what) {
13661
- const positions = [];
13662
- forEachCellInRange(sheet, r, (_cell, row2, col) => positions.push([row2, col]));
13811
+ const positions2 = [];
13812
+ forEachCellInRange(sheet, r, (_cell, row2, col) => positions2.push([row2, col]));
13663
13813
  if (what === "contents" || what === "all" || what === "formats") {
13664
- for (const [row2, col] of positions) {
13814
+ for (const [row2, col] of positions2) {
13665
13815
  const cell = getCell(sheet, row2, col);
13666
13816
  if (!cell) continue;
13667
13817
  if (what === "all") deleteCell(sheet, row2, col);
@@ -13672,7 +13822,7 @@ function clearIn(ctx, sheet, r, what) {
13672
13822
  }
13673
13823
  }
13674
13824
  if (what === "contents")
13675
- for (const [row2, col] of positions) syncTableHeader(ctx, sheet, row2, col);
13825
+ for (const [row2, col] of positions2) syncTableHeader(ctx, sheet, row2, col);
13676
13826
  }
13677
13827
  if (what === "all" || what === "formats") {
13678
13828
  sheet.merges = sheet.merges.filter((m) => !rangesIntersect(m, r));
@@ -13879,8 +14029,8 @@ var LISTS = [
13879
14029
  "December"
13880
14030
  ]
13881
14031
  ];
13882
- function listMatch(text) {
13883
- const lower2 = text.toLowerCase();
14032
+ function listMatch(text2) {
14033
+ const lower2 = text2.toLowerCase();
13884
14034
  for (const list of LISTS) {
13885
14035
  const index2 = list.findIndex((item) => item.toLowerCase() === lower2);
13886
14036
  if (index2 >= 0) return { list, index: index2 };
@@ -13905,14 +14055,14 @@ function linearTrend(values2) {
13905
14055
  const slope = den ? num2 / den : 0;
13906
14056
  return (k) => Number((meanY + slope * (k - meanX)).toPrecision(15));
13907
14057
  }
13908
- var isDigit3 = (ch) => ch !== void 0 && ch >= "0" && ch <= "9";
13909
- function matchTextNumber(text) {
13910
- let end = text.length;
13911
- while (end > 0 && !isDigit3(text[end - 1])) end--;
14058
+ var isDigit4 = (ch) => ch !== void 0 && ch >= "0" && ch <= "9";
14059
+ function matchTextNumber(text2) {
14060
+ let end = text2.length;
14061
+ while (end > 0 && !isDigit4(text2[end - 1])) end--;
13912
14062
  if (end === 0) return null;
13913
14063
  let start = end;
13914
- while (start > 0 && isDigit3(text[start - 1])) start--;
13915
- return [text, text.slice(0, start), text.slice(start, end), text.slice(end)];
14064
+ while (start > 0 && isDigit4(text2[start - 1])) start--;
14065
+ return [text2, text2.slice(0, start), text2.slice(start, end), text2.slice(end)];
13916
14066
  }
13917
14067
  var QUARTER = /^(q|qtr|quarter)(\s?)([1-4])$/i;
13918
14068
  function textSeries(texts) {
@@ -14317,26 +14467,26 @@ function pasteConditionalFormats(sheet, dest, cells, transpose2, skipBlanks, cut
14317
14467
  }
14318
14468
 
14319
14469
  // xlsx/edit/annotations.ts
14320
- function setComment(ctx, s, at, text, author) {
14470
+ function setComment(ctx, s, at, text2, author) {
14321
14471
  const sheet = sheetAt(ctx.workbook, s);
14322
14472
  const index2 = sheet.comments.findIndex(
14323
14473
  (c) => c.address.row === at.row && c.address.col === at.col
14324
14474
  );
14325
- if (index2 < 0 && text === void 0) return;
14475
+ if (index2 < 0 && text2 === void 0) return;
14326
14476
  ctx.run(
14327
- text === void 0 ? "Delete comment" : index2 < 0 ? "New comment" : "Edit comment",
14477
+ text2 === void 0 ? "Delete comment" : index2 < 0 ? "New comment" : "Edit comment",
14328
14478
  "annotations",
14329
14479
  [{ kind: "sheet", sheet: s }],
14330
14480
  () => {
14331
- if (text === void 0) {
14481
+ if (text2 === void 0) {
14332
14482
  sheet.comments.splice(index2, 1);
14333
14483
  return;
14334
14484
  }
14335
14485
  const existing = sheet.comments[index2];
14336
14486
  if (existing) {
14337
- existing.text = text;
14487
+ existing.text = text2;
14338
14488
  existing.author = author;
14339
- } else sheet.comments.push({ address: { row: at.row, col: at.col }, author, text });
14489
+ } else sheet.comments.push({ address: { row: at.row, col: at.col }, author, text: text2 });
14340
14490
  },
14341
14491
  { sheet: s, ranges: [{ start: at, end: at }] }
14342
14492
  );
@@ -14525,7 +14675,7 @@ function setBorders(ctx, s, range2, preset, edge = { style: "thin" }) {
14525
14675
  }
14526
14676
 
14527
14677
  // xlsx/edit/shift-preserved.ts
14528
- var XM2 = "http://schemas.microsoft.com/office/excel/2006/main";
14678
+ var XM3 = "http://schemas.microsoft.com/office/excel/2006/main";
14529
14679
  function descendants2(root, ns, local) {
14530
14680
  return Array.from(root.getElementsByTagNameNS(ns, local));
14531
14681
  }
@@ -14585,14 +14735,14 @@ function removeUpwards(node, root) {
14585
14735
  }
14586
14736
  function shiftSqrefs(root, moveRange) {
14587
14737
  let changed = false;
14588
- for (const sqref of descendants2(root, XM2, "sqref")) {
14738
+ for (const sqref of descendants2(root, XM3, "sqref")) {
14589
14739
  const old = sqref.textContent ?? "";
14590
14740
  const ranges = parseSqref(old).map(moveRange).filter((r) => !!r);
14591
- const text = ranges.map(formatRange).join(" ");
14592
- if (text === old.trim()) continue;
14741
+ const text2 = ranges.map(formatRange).join(" ");
14742
+ if (text2 === old.trim()) continue;
14593
14743
  changed = true;
14594
14744
  const owner = sqref.parentNode;
14595
- if (ranges.length) sqref.textContent = text;
14745
+ if (ranges.length) sqref.textContent = text2;
14596
14746
  else if (owner) removeUpwards(owner, root);
14597
14747
  }
14598
14748
  if (!changed) return "same";
@@ -14622,15 +14772,15 @@ function rewritePreservedFormulas(sheet, rewrite2) {
14622
14772
  "extLst",
14623
14773
  (root) => {
14624
14774
  let changed = false;
14625
- for (const f6 of descendants2(root, XM2, "f")) {
14626
- const text = f6.textContent ?? "";
14627
- let next = text;
14775
+ for (const f6 of descendants2(root, XM3, "f")) {
14776
+ const text2 = f6.textContent ?? "";
14777
+ let next = text2;
14628
14778
  try {
14629
- next = rewrite2(text, sheet.name);
14779
+ next = rewrite2(text2, sheet.name);
14630
14780
  } catch {
14631
- next = text;
14781
+ next = text2;
14632
14782
  }
14633
- if (next === text) continue;
14783
+ if (next === text2) continue;
14634
14784
  f6.textContent = next;
14635
14785
  changed = true;
14636
14786
  }
@@ -14981,7 +15131,7 @@ function pasteHyperlinks(sheet, dest, cells, transpose2, skipBlanks, cutLocation
14981
15131
  }
14982
15132
 
14983
15133
  // xlsx/edit/clipboard-html.ts
14984
- var escapeHtml = (text) => text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
15134
+ var escapeHtml = (text2) => text2.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
14985
15135
  function cssColor(color, theme2) {
14986
15136
  if (!color || color.auto) return void 0;
14987
15137
  if (color.rgb) return `#${color.rgb.slice(-6)}`;
@@ -15046,12 +15196,12 @@ function toHtml(cells, theme2) {
15046
15196
  if (cell && typeof cell.value === "number") attrs.push(`x:num="${cell.value}"`);
15047
15197
  const css = cssFor(cell?.style, theme2);
15048
15198
  if (css) attrs.push(`style="${escapeHtml(css)}"`);
15049
- let text = escapeHtml(cell?.text ?? "").replace(/\n/g, "<br>");
15199
+ let text2 = escapeHtml(cell?.text ?? "").replace(/\n/g, "<br>");
15050
15200
  const link = links.get(`${r},${c}`);
15051
15201
  const href = htmlHref(link);
15052
15202
  if (href)
15053
- text = `<a href="${escapeHtml(href)}"${link?.tooltip ? ` title="${escapeHtml(link.tooltip)}"` : ""}>${text}</a>`;
15054
- tds.push(`<td${attrs.length ? ` ${attrs.join(" ")}` : ""}>${text}</td>`);
15203
+ text2 = `<a href="${escapeHtml(href)}"${link?.tooltip ? ` title="${escapeHtml(link.tooltip)}"` : ""}>${text2}</a>`;
15204
+ tds.push(`<td${attrs.length ? ` ${attrs.join(" ")}` : ""}>${text2}</td>`);
15055
15205
  }
15056
15206
  rows2.push(`<tr>${tds.join("")}</tr>`);
15057
15207
  }
@@ -15079,8 +15229,8 @@ var NAMED_COLORS2 = {
15079
15229
  aqua: "00FFFF",
15080
15230
  fuchsia: "FF00FF"
15081
15231
  };
15082
- function parseCssColor(text) {
15083
- const value2 = text.trim().toLowerCase();
15232
+ function parseCssColor(text2) {
15233
+ const value2 = text2.trim().toLowerCase();
15084
15234
  const hex2 = /^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(value2)?.[1];
15085
15235
  if (hex2)
15086
15236
  return {
@@ -15102,33 +15252,33 @@ var ENTITIES = {
15102
15252
  apos: "'",
15103
15253
  nbsp: " "
15104
15254
  };
15105
- function decodeEntities(text) {
15106
- return text.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (whole, name) => {
15255
+ function decodeEntities(text2) {
15256
+ return text2.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (whole, name) => {
15107
15257
  if (name.startsWith("#x") || name.startsWith("#X"))
15108
15258
  return String.fromCodePoint(parseInt(name.slice(2), 16));
15109
15259
  if (name.startsWith("#")) return String.fromCodePoint(Number(name.slice(1)));
15110
15260
  return ENTITIES[name.toLowerCase()] ?? whole;
15111
15261
  });
15112
15262
  }
15113
- function parseAttributes(text) {
15263
+ function parseAttributes(text2) {
15114
15264
  const attrs = /* @__PURE__ */ new Map();
15115
- for (const m of text.matchAll(
15265
+ for (const m of text2.matchAll(
15116
15266
  /([\w:-]{1,64})\s{0,16}=\s{0,16}(?:"([^"]*)"|'([^']*)'|([^\s>]+))/g
15117
15267
  ))
15118
15268
  attrs.set((m[1] ?? "").toLowerCase(), decodeEntities(m[2] ?? m[3] ?? m[4] ?? ""));
15119
15269
  return attrs;
15120
15270
  }
15121
- function parseCss(text) {
15271
+ function parseCss(text2) {
15122
15272
  const out = /* @__PURE__ */ new Map();
15123
- for (const decl of text.split(";")) {
15273
+ for (const decl of text2.split(";")) {
15124
15274
  const colon = decl.indexOf(":");
15125
15275
  if (colon < 0) continue;
15126
15276
  out.set(decl.slice(0, colon).trim().toLowerCase(), decl.slice(colon + 1).trim());
15127
15277
  }
15128
15278
  return out;
15129
15279
  }
15130
- function decodeNumberFormat(text) {
15131
- return text.replace(/^["']|["']$/g, "").replace(/\\([0-9A-Fa-f]{4})/g, (_m, hex2) => String.fromCharCode(parseInt(hex2, 16))).replace(/\\(.)/g, "$1");
15280
+ function decodeNumberFormat(text2) {
15281
+ return text2.replace(/^["']|["']$/g, "").replace(/\\([0-9A-Fa-f]{4})/g, (_m, hex2) => String.fromCharCode(parseInt(hex2, 16))).replace(/\\(.)/g, "$1");
15132
15282
  }
15133
15283
  var H_ALIGN = {
15134
15284
  left: "left",
@@ -15169,26 +15319,26 @@ function stylePatchFromCss(css, inner2) {
15169
15319
  if (numFmt) patch.numFmt = decodeNumberFormat(numFmt);
15170
15320
  return patch;
15171
15321
  }
15172
- function removeComments(text) {
15322
+ function removeComments(text2) {
15173
15323
  let out = "";
15174
15324
  let from = 0;
15175
15325
  for (; ; ) {
15176
- const open = text.indexOf("<!--", from);
15177
- const close = open < 0 ? -1 : text.indexOf("-->", open + 4);
15178
- if (close < 0) return out + text.slice(from);
15179
- out += text.slice(from, open);
15326
+ const open = text2.indexOf("<!--", from);
15327
+ const close = open < 0 ? -1 : text2.indexOf("-->", open + 4);
15328
+ if (close < 0) return out + text2.slice(from);
15329
+ out += text2.slice(from, open);
15180
15330
  from = close + 3;
15181
15331
  }
15182
15332
  }
15183
- function removeTags(text) {
15333
+ function removeTags(text2) {
15184
15334
  let out = "";
15185
15335
  let i2 = 0;
15186
- while (i2 < text.length) {
15187
- const ch = text[i2];
15336
+ while (i2 < text2.length) {
15337
+ const ch = text2[i2];
15188
15338
  if (ch === "<") {
15189
15339
  let j = i2 + 1;
15190
- while (j < text.length && text[j] !== "<" && text[j] !== ">") j++;
15191
- if (text[j] === ">") {
15340
+ while (j < text2.length && text2[j] !== "<" && text2[j] !== ">") j++;
15341
+ if (text2[j] === ">") {
15192
15342
  i2 = j + 1;
15193
15343
  continue;
15194
15344
  }
@@ -15200,15 +15350,15 @@ function removeTags(text) {
15200
15350
  }
15201
15351
  function stripTags(markup) {
15202
15352
  let previous;
15203
- let text = markup;
15353
+ let text2 = markup;
15204
15354
  do {
15205
- previous = text;
15206
- text = removeTags(removeComments(text));
15207
- } while (text !== previous);
15208
- return removeAll(text, ["<!--", "-->"]);
15355
+ previous = text2;
15356
+ text2 = removeTags(removeComments(text2));
15357
+ } while (text2 !== previous);
15358
+ return removeAll(text2, ["<!--", "-->"]);
15209
15359
  }
15210
- function removeAll(text, tokens) {
15211
- let current = text;
15360
+ function removeAll(text2, tokens) {
15361
+ let current = text2;
15212
15362
  let previous;
15213
15363
  do {
15214
15364
  previous = current;
@@ -15250,8 +15400,8 @@ function parseHtmlTable(html, base) {
15250
15400
  for (const [k, v] of parseCss(attrs.get("style") ?? "")) css.set(k, v);
15251
15401
  const patch = stylePatchFromCss(css, inner2);
15252
15402
  if (td[1]?.toLowerCase() === "h") patch.font = { bold: true, ...patch.font };
15253
- const text = cellText(inner2);
15254
- row2[c] = text === "" && !Object.keys(patch).length ? null : toCell(text, attrs, patch, base);
15403
+ const text2 = cellText(inner2);
15404
+ row2[c] = text2 === "" && !Object.keys(patch).length ? null : toCell(text2, attrs, patch, base);
15255
15405
  const rowSpan = Math.max(1, Number(attrs.get("rowspan") ?? 1) || 1);
15256
15406
  const colSpan = Math.max(1, Number(attrs.get("colspan") ?? 1) || 1);
15257
15407
  const anchor = /<a\b([^>]*)>/i.exec(inner2);
@@ -15283,35 +15433,35 @@ function parseHtmlTable(html, base) {
15283
15433
  );
15284
15434
  return rows2 && cols ? { rows: rows2, cols, data, merges, hyperlinks } : void 0;
15285
15435
  }
15286
- function toCell(text, attrs, patch, base) {
15287
- let value2 = text;
15436
+ function toCell(text2, attrs, patch, base) {
15437
+ let value2 = text2;
15288
15438
  const num2 = attrs.get("x:num");
15289
15439
  if (num2 !== void 0 && num2 !== "" && Number.isFinite(Number(num2))) value2 = Number(num2);
15290
- else if (attrs.has("x:bool")) value2 = text.toUpperCase() === "TRUE";
15291
- else if (patch.numFmt !== "@" && text !== "") {
15292
- const parsed = parseCellInput(text);
15440
+ else if (attrs.has("x:bool")) value2 = text2.toUpperCase() === "TRUE";
15441
+ else if (patch.numFmt !== "@" && text2 !== "") {
15442
+ const parsed = parseCellInput(text2);
15293
15443
  if (parsed.formula === void 0) value2 = parsed.value;
15294
15444
  if (!patch.numFmt && parsed.numFmt && typeof value2 === "number") patch.numFmt = parsed.numFmt;
15295
15445
  }
15296
- return { value: value2, text, style: patchStyle(base, patch) };
15446
+ return { value: value2, text: text2, style: patchStyle(base, patch) };
15297
15447
  }
15298
15448
 
15299
15449
  // xlsx/edit/clipboard-text.ts
15300
- function quoteField(text) {
15301
- return /[\t\r\n"]/.test(text) ? `"${text.replace(/"/g, '""')}"` : text;
15450
+ function quoteField(text2) {
15451
+ return /[\t\r\n"]/.test(text2) ? `"${text2.replace(/"/g, '""')}"` : text2;
15302
15452
  }
15303
15453
  function toTsv(rows2) {
15304
15454
  if (!rows2.length) return "";
15305
15455
  return rows2.map((row2) => row2.map(quoteField).join(" ")).join("\r\n") + "\r\n";
15306
15456
  }
15307
- function parseTsv(text) {
15457
+ function parseTsv(text2) {
15308
15458
  const rows2 = [];
15309
15459
  let row2 = [];
15310
15460
  let field = "";
15311
15461
  let i2 = 0;
15312
15462
  let atFieldStart = true;
15313
- const body2 = text.replace(/\r\n?/g, "\n").replace(/\n$/, "");
15314
- if (body2 === "") return text === "" ? [] : [[""]];
15463
+ const body2 = text2.replace(/\r\n?/g, "\n").replace(/\n$/, "");
15464
+ if (body2 === "") return text2 === "" ? [] : [[""]];
15315
15465
  while (i2 < body2.length) {
15316
15466
  const ch = body2[i2] ?? "";
15317
15467
  if (atFieldStart && ch === '"') {
@@ -15346,10 +15496,10 @@ function parseTsv(text) {
15346
15496
  for (const r of rows2) while (r.length < width) r.push("");
15347
15497
  return rows2;
15348
15498
  }
15349
- function findClosingQuote(text, from) {
15350
- for (let i2 = from; i2 < text.length; i2++) {
15351
- if (text[i2] !== '"') continue;
15352
- if (text[i2 + 1] === '"') {
15499
+ function findClosingQuote(text2, from) {
15500
+ for (let i2 = from; i2 < text2.length; i2++) {
15501
+ if (text2[i2] !== '"') continue;
15502
+ if (text2[i2 + 1] === '"') {
15353
15503
  i2++;
15354
15504
  continue;
15355
15505
  }
@@ -15626,12 +15776,12 @@ function copyRange(workbook, s, range2) {
15626
15776
  cells
15627
15777
  };
15628
15778
  }
15629
- function cellsFromText(workbook, text) {
15630
- if (/<table\b/i.test(text)) {
15631
- const parsed = parseHtmlTable(text, styleAt(workbook, 0));
15779
+ function cellsFromText(workbook, text2) {
15780
+ if (/<table\b/i.test(text2)) {
15781
+ const parsed = parseHtmlTable(text2, styleAt(workbook, 0));
15632
15782
  if (parsed) return parsed;
15633
15783
  }
15634
- const grid6 = parseTsv(text);
15784
+ const grid6 = parseTsv(text2);
15635
15785
  const data = grid6.map(
15636
15786
  (line2) => line2.map((field) => {
15637
15787
  if (field === "") return null;
@@ -15826,13 +15976,32 @@ function pasteSelection(ctx, sheet, selection, payload, request) {
15826
15976
  );
15827
15977
  }
15828
15978
 
15979
+ // xlsx/edit/external.ts
15980
+ function applyExternal(host, apply) {
15981
+ if (host.busy()) throw new Error("Cannot apply an external change inside an edit");
15982
+ const change = apply();
15983
+ if (!change) return false;
15984
+ const structural = change.structural ?? false;
15985
+ host.calculator.afterExternal(structural, change.cells ?? []);
15986
+ const out = {
15987
+ kind: change.kind ?? "remote",
15988
+ label: change.label,
15989
+ structural,
15990
+ external: true
15991
+ };
15992
+ if (change.sheet !== void 0) out.sheet = change.sheet;
15993
+ if (change.ranges?.length) out.ranges = change.ranges;
15994
+ host.emit(out);
15995
+ return true;
15996
+ }
15997
+
15829
15998
  // xlsx/edit/dimensions.ts
15830
15999
  var MDW = 7;
15831
16000
  var MAX_WIDTH = 255;
15832
16001
  var MAX_HEIGHT = 409;
15833
- function estimateWidth(text, style2) {
16002
+ function estimateWidth(text2, style2) {
15834
16003
  const scale2 = (style2.font.size ?? 11) / 11;
15835
- const longest = Math.max(...text.split("\n").map((line2) => line2.length));
16004
+ const longest = Math.max(...text2.split("\n").map((line2) => line2.length));
15836
16005
  return longest * MDW * scale2 * (style2.font.bold ? 1.1 : 1);
15837
16006
  }
15838
16007
  var pixelsToWidth = (px) => Math.round((px + 5) / MDW * 256) / 256;
@@ -15841,9 +16010,9 @@ function fitColumnWidth(ctx, sheet, col, measure2) {
15841
16010
  for (const [row2, cells] of sheet.rows) {
15842
16011
  const cell = cells.get(col);
15843
16012
  if (!cell || sheet.rowInfo.get(row2)?.hidden) continue;
15844
- const text = displayText(ctx.workbook, cell);
15845
- if (!text) continue;
15846
- widest = Math.max(widest, measure2(text, styleAt(ctx.workbook, cell.styleId)));
16013
+ const text2 = displayText(ctx.workbook, cell);
16014
+ if (!text2) continue;
16015
+ widest = Math.max(widest, measure2(text2, styleAt(ctx.workbook, cell.styleId)));
15847
16016
  }
15848
16017
  return widest < 0 ? void 0 : Math.min(MAX_WIDTH, pixelsToWidth(widest));
15849
16018
  }
@@ -16094,8 +16263,8 @@ function applyFilter(ctx, sheet, filter2) {
16094
16263
  for (let row2 = range2.start.row + 1; row2 <= range2.end.row; row2++) {
16095
16264
  const visible = (filter2.columns ?? []).every((fc) => {
16096
16265
  if (!fc.values && !fc.blank) return true;
16097
- const text = displayText(ctx.workbook, getCell(sheet, row2, range2.start.col + fc.offset));
16098
- return text === "" ? !!fc.blank : (fc.values ?? []).includes(text);
16266
+ const text2 = displayText(ctx.workbook, getCell(sheet, row2, range2.start.col + fc.offset));
16267
+ return text2 === "" ? !!fc.blank : (fc.values ?? []).includes(text2);
16099
16268
  });
16100
16269
  const info = { ...sheet.rowInfo.get(row2) };
16101
16270
  if (visible) delete info.hidden;
@@ -16194,11 +16363,11 @@ function formulaBarText(workbook, cell, options = {}) {
16194
16363
  styleAt(workbook, cell.styleId).numFmt || "General",
16195
16364
  workbook.date1904
16196
16365
  );
16197
- const text = cell.richText?.length ? cell.richText.map((run) => run.text).join("") : value2;
16198
- if (text === "" || options.quote === false) return text;
16199
- const parsed = parseCellInput(text, { date1904: workbook.date1904 });
16200
- const literal2 = parsed.formula === void 0 && parsed.value === text;
16201
- return literal2 ? text : `'${text}`;
16366
+ const text2 = cell.richText?.length ? cell.richText.map((run) => run.text).join("") : value2;
16367
+ if (text2 === "" || options.quote === false) return text2;
16368
+ const parsed = parseCellInput(text2, { date1904: workbook.date1904 });
16369
+ const literal2 = parsed.formula === void 0 && parsed.value === text2;
16370
+ return literal2 ? text2 : `'${text2}`;
16202
16371
  }
16203
16372
 
16204
16373
  // xlsx/edit/find.ts
@@ -16217,7 +16386,7 @@ function queryPattern(query, global = false) {
16217
16386
  if (query.wholeCell) source = `^(?:${source})$`;
16218
16387
  return new RegExp(source, `${query.matchCase ? "" : "i"}${global ? "g" : ""}`);
16219
16388
  }
16220
- var escapeRegex2 = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
16389
+ var escapeRegex2 = (text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
16221
16390
  function searchText(workbook, query, sheet, row2, col) {
16222
16391
  const ws = workbook.sheets[sheet];
16223
16392
  if (!ws) return "";
@@ -16234,25 +16403,25 @@ function findAll(workbook, query) {
16234
16403
  for (const s of indices) {
16235
16404
  const sheet = workbook.sheets[s];
16236
16405
  if (!sheet) continue;
16237
- const positions = [];
16406
+ const positions2 = [];
16238
16407
  if (query.lookIn === "comments")
16239
- for (const c of sheet.comments) positions.push([c.address.row, c.address.col]);
16240
- else forEachCell(sheet, (_cell, row2, col) => positions.push([row2, col]));
16241
- if (query.order === "columns") positions.sort((a, b) => a[1] - b[1] || a[0] - b[0]);
16242
- else positions.sort((a, b) => a[0] - b[0] || a[1] - b[1]);
16243
- for (const [row2, col] of positions) {
16408
+ for (const c of sheet.comments) positions2.push([c.address.row, c.address.col]);
16409
+ else forEachCell(sheet, (_cell, row2, col) => positions2.push([row2, col]));
16410
+ if (query.order === "columns") positions2.sort((a, b) => a[1] - b[1] || a[0] - b[0]);
16411
+ else positions2.sort((a, b) => a[0] - b[0] || a[1] - b[1]);
16412
+ for (const [row2, col] of positions2) {
16244
16413
  if (query.range && query.sheet !== void 0 && !rangeContains(query.range, { row: row2, col }))
16245
16414
  continue;
16246
- const text = searchText(workbook, query, s, row2, col);
16247
- if (text && pattern.test(text)) matches2.push({ sheet: s, row: row2, col, text });
16415
+ const text2 = searchText(workbook, query, s, row2, col);
16416
+ if (text2 && pattern.test(text2)) matches2.push({ sheet: s, row: row2, col, text: text2 });
16248
16417
  }
16249
16418
  }
16250
16419
  return matches2;
16251
16420
  }
16252
- function replaceText(text, query, replacement) {
16421
+ function replaceText(text2, query, replacement) {
16253
16422
  const pattern = queryPattern(query, true);
16254
- if (!pattern) return text;
16255
- return text.replace(pattern, (match2) => match2 === "" ? "" : replacement);
16423
+ if (!pattern) return text2;
16424
+ return text2.replace(pattern, (match2) => match2 === "" ? "" : replacement);
16256
16425
  }
16257
16426
  var isSpilledAt = (workbook, at) => {
16258
16427
  const sheet = workbook.sheets[at.sheet];
@@ -16311,10 +16480,10 @@ function replaceOne(ctx, query, replacement, at) {
16311
16480
  const q = replaceQuery(query);
16312
16481
  if (q.lookIn !== "comments" && isSpilledAt(ctx.workbook, at)) return false;
16313
16482
  const pattern = queryPattern(q);
16314
- const text = searchText(ctx.workbook, q, at.sheet, at.row, at.col);
16315
- if (!pattern || !text || !pattern.test(text)) return false;
16316
- const match2 = { ...at, text };
16317
- if (replaceText(text, q, replacement) === text) return false;
16483
+ const text2 = searchText(ctx.workbook, q, at.sheet, at.row, at.col);
16484
+ if (!pattern || !text2 || !pattern.test(text2)) return false;
16485
+ const match2 = { ...at, text: text2 };
16486
+ if (replaceText(text2, q, replacement) === text2) return false;
16318
16487
  ctx.run(
16319
16488
  "Replace",
16320
16489
  "cells",
@@ -16680,10 +16849,22 @@ var SessionCalculator = class {
16680
16849
  if (isStructural(step)) this.staleGraph = true;
16681
16850
  return;
16682
16851
  }
16852
+ this.recalc(isStructural(step), () => touchedCells(step));
16853
+ }
16854
+ /** Recalculates after a change applied outside the history (a collaborator's edit). */
16855
+ afterExternal(structural, cells) {
16856
+ if (!this.enabled) return;
16857
+ if (calcModeOf(this.workbook) === "manual") {
16858
+ if (structural) this.staleGraph = true;
16859
+ return;
16860
+ }
16861
+ this.recalc(structural, () => cells);
16862
+ }
16863
+ recalc(structural, cells) {
16683
16864
  try {
16684
- if (this.staleGraph || isStructural(step)) this.full();
16865
+ if (this.staleGraph || structural) this.full();
16685
16866
  else {
16686
- const changed = touchedCells(step);
16867
+ const changed = cells();
16687
16868
  if (changed.length) this.calc.recalculateFrom(changed);
16688
16869
  }
16689
16870
  } catch (error) {
@@ -17016,8 +17197,8 @@ function nextTableName(workbook) {
17016
17197
  }
17017
17198
  function uniqueHeaders(texts) {
17018
17199
  const used = /* @__PURE__ */ new Set();
17019
- return texts.map((text, i2) => {
17020
- let base = text.trim() || `Column${i2 + 1}`;
17200
+ return texts.map((text2, i2) => {
17201
+ let base = text2.trim() || `Column${i2 + 1}`;
17021
17202
  if (!used.has(base.toLowerCase())) {
17022
17203
  used.add(base.toLowerCase());
17023
17204
  return base;
@@ -17492,8 +17673,8 @@ function normalizeDigestAlgorithmName(name) {
17492
17673
  // digest/base64.ts
17493
17674
  var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
17494
17675
  var VALUES = new Map([...ALPHABET].map((char, index2) => [char, index2]));
17495
- function decodeBase64(text) {
17496
- const compact3 = text.replace(/\s+/g, "");
17676
+ function decodeBase64(text2) {
17677
+ const compact3 = text2.replace(/\s+/g, "");
17497
17678
  const body2 = compact3.replace(/={1,2}$/, "");
17498
17679
  if (body2.length % 4 === 1) return void 0;
17499
17680
  if (compact3.length !== body2.length && compact3.length % 4 !== 0) return void 0;
@@ -19502,6 +19683,222 @@ function bordersView(border, theme2) {
19502
19683
  return out;
19503
19684
  }
19504
19685
 
19686
+ // xlsx/layout/sparkline-view.ts
19687
+ var DEFAULTS = {
19688
+ colorSeries: "#376092",
19689
+ colorNegative: "#D00000",
19690
+ colorAxis: "#000000",
19691
+ colorMarkers: "#D00000",
19692
+ colorFirst: "#D00000",
19693
+ colorLast: "#D00000",
19694
+ colorHigh: "#D00000",
19695
+ colorLow: "#D00000"
19696
+ };
19697
+ var COLUMN_GAP = 0.2;
19698
+ function extent(values2) {
19699
+ let min = Infinity;
19700
+ let max = -Infinity;
19701
+ for (const v of values2) {
19702
+ if (v === null) continue;
19703
+ if (v < min) min = v;
19704
+ if (v > max) max = v;
19705
+ }
19706
+ return min <= max ? { min, max } : void 0;
19707
+ }
19708
+ function sparklineValues(group, values2) {
19709
+ return group.displayEmptyCellsAs === "zero" ? values2.map((v) => v ?? 0) : [...values2];
19710
+ }
19711
+ function sparklineScale(group, all2, index2) {
19712
+ const own = extent(sparklineValues(group, all2[index2]?.values ?? []));
19713
+ const needsGroup = group.minAxisType === "group" || group.maxAxisType === "group";
19714
+ const shared = needsGroup ? extent(all2.flatMap((data) => sparklineValues(group, data.values))) : void 0;
19715
+ const end = (type, manual, key) => {
19716
+ if (type === "custom" && manual !== void 0) return manual;
19717
+ if (type === "group" && shared) return shared[key];
19718
+ return own?.[key];
19719
+ };
19720
+ const min = end(group.minAxisType, group.manualMin, "min");
19721
+ const max = end(group.maxAxisType, group.manualMax, "max");
19722
+ return min === void 0 || max === void 0 ? void 0 : { min, max };
19723
+ }
19724
+ function positions(group, data, n) {
19725
+ const dates = data.dates;
19726
+ if (group.dateAxis && dates && dates.length === n) {
19727
+ const span4 = extent(dates);
19728
+ if (span4) {
19729
+ const width = span4.max - span4.min;
19730
+ return dates.map((d) => d === null ? null : width ? (d - span4.min) / width : 0.5);
19731
+ }
19732
+ }
19733
+ return Array.from({ length: n }, (_, i2) => n === 1 ? 0.5 : i2 / (n - 1));
19734
+ }
19735
+ function pointFacts(values2) {
19736
+ const numbers3 = values2.filter((x) => x !== null);
19737
+ let last = values2.length - 1;
19738
+ while (last >= 0 && values2[last] === null) last--;
19739
+ return {
19740
+ high: Math.max(...numbers3),
19741
+ low: Math.min(...numbers3),
19742
+ first: values2.findIndex((x) => x !== null),
19743
+ last
19744
+ };
19745
+ }
19746
+ function pointColor(group, v, i2, facts, colors, markers) {
19747
+ let color = markers && group.markers ? colors.colorMarkers : void 0;
19748
+ if (group.negative && v < 0) color = colors.colorNegative;
19749
+ if (group.high && v === facts.high) color = colors.colorHigh;
19750
+ if (group.low && v === facts.low) color = colors.colorLow;
19751
+ if (group.first && i2 === facts.first) color = colors.colorFirst;
19752
+ if (group.last && i2 === facts.last) color = colors.colorLast;
19753
+ return color;
19754
+ }
19755
+ function resolveColors(group, theme2) {
19756
+ const out = { ...DEFAULTS };
19757
+ for (const key of Object.keys(DEFAULTS)) {
19758
+ const color = group[key];
19759
+ out[key] = resolveColor(color, theme2, DEFAULTS[key]) ?? DEFAULTS[key];
19760
+ }
19761
+ return out;
19762
+ }
19763
+ function sparklineView(group, data, scale2, theme2) {
19764
+ const colors = resolveColors(group, theme2);
19765
+ const view = {
19766
+ type: group.type,
19767
+ color: colors.colorSeries,
19768
+ lineWeightPt: group.lineWeight,
19769
+ lines: [],
19770
+ markers: [],
19771
+ columns: []
19772
+ };
19773
+ const values2 = sparklineValues(group, data.values);
19774
+ const n = values2.length;
19775
+ if (!n || !scale2) return view;
19776
+ const facts = pointFacts(values2);
19777
+ const xs = positions(group, data, n);
19778
+ const flip = (x) => group.rightToLeft ? 1 - x : x;
19779
+ const range2 = scale2.max - scale2.min;
19780
+ const yOf = (v) => range2 ? Math.max(0, Math.min(1, (scale2.max - v) / range2)) : 0.5;
19781
+ if (group.type === "line") {
19782
+ let segment = [];
19783
+ values2.forEach((v, i2) => {
19784
+ const x = xs[i2];
19785
+ if (v === null || x === null || x === void 0) {
19786
+ if (group.displayEmptyCellsAs === "gap" && segment.length) {
19787
+ view.lines.push(segment);
19788
+ segment = [];
19789
+ }
19790
+ return;
19791
+ }
19792
+ const point = { x: flip(x), y: yOf(v) };
19793
+ segment.push(point);
19794
+ const color = pointColor(group, v, i2, facts, colors, true);
19795
+ if (color) view.markers.push({ ...point, color });
19796
+ });
19797
+ if (segment.length) view.lines.push(segment);
19798
+ } else {
19799
+ const slot = 1 / n;
19800
+ const w = slot * (1 - COLUMN_GAP);
19801
+ const base = yOf(Math.max(scale2.min, Math.min(scale2.max, 0)));
19802
+ values2.forEach((v, i2) => {
19803
+ const position = xs[i2];
19804
+ if (v === null || position === null || position === void 0) return;
19805
+ if (v === 0) return;
19806
+ let top;
19807
+ let bottom;
19808
+ if (group.type === "stacked") [top, bottom] = v > 0 ? [0, 0.5] : [0.5, 1];
19809
+ else if (!range2) [top, bottom] = [0, 1];
19810
+ else [top, bottom] = [Math.min(base, yOf(v)), Math.max(base, yOf(v))];
19811
+ const centre = flip(slot / 2 + position * (1 - slot));
19812
+ const color = pointColor(group, v, i2, facts, colors, false) ?? view.color;
19813
+ view.columns.push({ x: centre - w / 2, y: top, w, h: bottom - top, color });
19814
+ });
19815
+ }
19816
+ if (group.type === "stacked") {
19817
+ if (group.displayXAxis) view.axis = { y: 0.5, color: colors.colorAxis };
19818
+ } else if (group.displayXAxis && range2 && scale2.min <= 0 && scale2.max >= 0)
19819
+ view.axis = { y: yOf(0), color: colors.colorAxis };
19820
+ return view;
19821
+ }
19822
+
19823
+ // xlsx/layout/sparkline-data.ts
19824
+ var MAX_POINTS = 1e4;
19825
+ var hostIndex = /* @__PURE__ */ new WeakMap();
19826
+ function hosts(sheet) {
19827
+ const groups = sheetSparklineGroups(sheet);
19828
+ let index2 = hostIndex.get(groups);
19829
+ if (!index2) {
19830
+ index2 = /* @__PURE__ */ new Map();
19831
+ for (const group of groups)
19832
+ group.sparklines.forEach((line2, i2) => {
19833
+ const key = cellKey(line2.host.start.row, line2.host.start.col);
19834
+ if (!index2.has(key)) index2.set(key, { group, index: i2 });
19835
+ });
19836
+ hostIndex.set(groups, index2);
19837
+ }
19838
+ return index2;
19839
+ }
19840
+ function hasSparklineAt(sheet, row2, col) {
19841
+ return hosts(sheet).has(cellKey(row2, col));
19842
+ }
19843
+ function resolveSparklineRange(workbook, sheet, formula) {
19844
+ const ref = formula.trim().replace(/^=/, "");
19845
+ const bang = ref.lastIndexOf("!");
19846
+ let target2 = sheet;
19847
+ if (bang >= 0) {
19848
+ const raw = ref.slice(0, bang);
19849
+ const name = /^'.*'$/.test(raw) ? raw.slice(1, -1).replace(/''/g, "'") : raw;
19850
+ target2 = sheetByName(workbook, name);
19851
+ }
19852
+ const range2 = parseRange(ref.slice(bang + 1).replace(/\$/g, ""));
19853
+ return target2 && range2 ? { sheet: target2, range: normalizeRange(range2) } : void 0;
19854
+ }
19855
+ var rowHidden = (sheet, row2) => sheet.rowInfo.get(row2)?.hidden === true;
19856
+ var colHidden = (sheet, col) => sheet.columns.some((c) => c.hidden === true && col >= c.min && col <= c.max);
19857
+ function readSparklineValues(sheet, range2, displayHidden) {
19858
+ let endRow = range2.end.row;
19859
+ if (endRow - range2.start.row >= MAX_POINTS) {
19860
+ let lastRow = range2.start.row;
19861
+ for (const row2 of sheet.rows.keys()) if (row2 > lastRow) lastRow = row2;
19862
+ endRow = Math.min(endRow, lastRow);
19863
+ }
19864
+ const out = [];
19865
+ for (let row2 = range2.start.row; row2 <= endRow && out.length < MAX_POINTS; row2++) {
19866
+ if (!displayHidden && rowHidden(sheet, row2)) continue;
19867
+ for (let col = range2.start.col; col <= range2.end.col && out.length < MAX_POINTS; col++) {
19868
+ if (!displayHidden && colHidden(sheet, col)) continue;
19869
+ const value2 = getCell(sheet, row2, col)?.value;
19870
+ out.push(typeof value2 === "number" && Number.isFinite(value2) ? value2 : null);
19871
+ }
19872
+ }
19873
+ return out;
19874
+ }
19875
+ function groupData(workbook, sheet, group) {
19876
+ const dateRange = group.dateAxis && group.dateFormula;
19877
+ const dates = dateRange ? resolveSparklineRange(workbook, sheet, dateRange) : void 0;
19878
+ const dateValues = dates ? readSparklineValues(dates.sheet, dates.range, group.displayHidden) : void 0;
19879
+ return group.sparklines.map((line2) => {
19880
+ const source = line2.formula ? resolveSparklineRange(workbook, sheet, line2.formula) : void 0;
19881
+ const values2 = source ? readSparklineValues(source.sheet, source.range, group.displayHidden) : [];
19882
+ return dateValues ? { values: values2, dates: dateValues } : { values: values2 };
19883
+ });
19884
+ }
19885
+ function sparklineViewAt(workbook, sheetIndex2, row2, col) {
19886
+ const sheet = workbook.sheets[sheetIndex2];
19887
+ if (!sheet) return void 0;
19888
+ const entry = hosts(sheet).get(cellKey(row2, col));
19889
+ if (!entry) return void 0;
19890
+ const { group, index: index2 } = entry;
19891
+ const needsGroup = group.minAxisType === "group" || group.maxAxisType === "group";
19892
+ const data = needsGroup ? groupData(workbook, sheet, group) : groupData(workbook, sheet, { ...group, sparklines: [group.sparklines[index2]] });
19893
+ const at = needsGroup ? index2 : 0;
19894
+ return sparklineView(
19895
+ group,
19896
+ data[at] ?? { values: [] },
19897
+ sparklineScale(group, data, at),
19898
+ workbook.theme
19899
+ );
19900
+ }
19901
+
19505
19902
  // xlsx/layout/units.ts
19506
19903
  var DEFAULT_MAX_DIGIT_WIDTH = 7;
19507
19904
  var DEFAULT_BASE_COL_WIDTH = 8;
@@ -19605,6 +20002,8 @@ function cellView(workbook, sheetIndex2, row2, col, cf, options = {}) {
19605
20002
  if (fill) view.fill = fill;
19606
20003
  if (conditional?.dataBar) view.dataBar = conditional.dataBar;
19607
20004
  if (conditional?.icon) view.icon = conditional.icon;
20005
+ const sparkline = sparklineViewAt(workbook, sheetIndex2, row2, col);
20006
+ if (sparkline) view.sparkline = sparkline;
19608
20007
  const link = sheet.hyperlinks.find((h2) => rangeContains(h2.range, { row: row2, col }));
19609
20008
  if (link) {
19610
20009
  view.hasHyperlink = true;
@@ -19811,9 +20210,9 @@ function lineHeightPoints(sizePt) {
19811
20210
  }
19812
20211
  return Math.max(0.75, Math.ceil(height / 0.75 - 1e-9) * 0.75);
19813
20212
  }
19814
- function wrappedLineCount(text, width, measure2) {
20213
+ function wrappedLineCount(text2, width, measure2) {
19815
20214
  let lines = 0;
19816
- for (const paragraph of text.split(/\r?\n/)) {
20215
+ for (const paragraph of text2.split(/\r?\n/)) {
19817
20216
  lines++;
19818
20217
  if (width <= 0) continue;
19819
20218
  let current = "";
@@ -19854,13 +20253,13 @@ function autoFitRowHeight(workbook, sheetIndex2, row2, measure2) {
19854
20253
  let lines = 1;
19855
20254
  if (view.wrap) {
19856
20255
  const width = metrics.colWidth(col) - COLUMN_PADDING_PX - 1 - view.indentPx;
19857
- lines = wrappedLineCount(view.text, width, (text) => measure2(text, view.font));
20256
+ lines = wrappedLineCount(view.text, width, (text2) => measure2(text2, view.font));
19858
20257
  }
19859
20258
  tallest = Math.max(tallest, lines * lineHeightPoints(sizePt));
19860
20259
  }
19861
20260
  return tallest > 0 ? tallest : sheet.defaultRowHeight;
19862
20261
  }
19863
- var approximateMeasure = (text, font) => text.length * font.sizePx * (font.bold ? 0.58 : 0.53);
20262
+ var approximateMeasure = (text2, font) => text2.length * font.sizePx * (font.bold ? 0.58 : 0.53);
19864
20263
 
19865
20264
  // xlsx/edit/row-autofit.ts
19866
20265
  var MAX_HEIGHT2 = 409;
@@ -20123,19 +20522,19 @@ function setTabColor(ctx, index2, color) {
20123
20522
 
20124
20523
  // xlsx/edit/validation-list.ts
20125
20524
  function listSource(workbook, sheet, formula, evaluate, at, depth = 0) {
20126
- const text = formula.replace(/^=/, "").trim();
20127
- const literal2 = /^"((?:[^"]|"")*)"$/.exec(text);
20525
+ const text2 = formula.replace(/^=/, "").trim();
20526
+ const literal2 = /^"((?:[^"]|"")*)"$/.exec(text2);
20128
20527
  if (literal2)
20129
20528
  return (literal2[1] ?? "").replace(/""/g, '"').split(",").map((s) => s.trim()).filter((s) => s !== "").map((s) => ({ text: s, value: parseCellInput(s, { date1904: workbook.date1904 }).value }));
20130
20529
  const named2 = workbook.definedNames.find(
20131
- (n) => n.name.toLowerCase() === text.toLowerCase() && (n.localSheet === void 0 || n.localSheet === sheet)
20530
+ (n) => n.name.toLowerCase() === text2.toLowerCase() && (n.localSheet === void 0 || n.localSheet === sheet)
20132
20531
  );
20133
20532
  if (named2 && depth < 4)
20134
20533
  return listSource(workbook, sheet, named2.formula, evaluate, at, depth + 1);
20135
- const ref = /^(?:'((?:[^']|'')+)'|([^'!]+))!(.+)$/.exec(text);
20534
+ const ref = /^(?:'((?:[^']|'')+)'|([^'!]+))!(.+)$/.exec(text2);
20136
20535
  const sheetName = ref ? ref[1]?.replace(/''/g, "'") ?? ref[2] : void 0;
20137
20536
  const target2 = sheetName ? sheetByName(workbook, sheetName) : workbook.sheets[sheet];
20138
- const range2 = parseRange((ref ? ref[3] ?? "" : text).replace(/\$/g, ""));
20537
+ const range2 = parseRange((ref ? ref[3] ?? "" : text2).replace(/\$/g, ""));
20139
20538
  if (target2 && range2) {
20140
20539
  const out = [];
20141
20540
  forEachCellInRange(target2, range2, (cell) => {
@@ -20146,7 +20545,7 @@ function listSource(workbook, sheet, formula, evaluate, at, depth = 0) {
20146
20545
  }
20147
20546
  if (!evaluate) return void 0;
20148
20547
  try {
20149
- const value2 = evaluate(text, at);
20548
+ const value2 = evaluate(text2, at);
20150
20549
  return value2 === null ? [] : [{ text: rawText(value2), value: value2 }];
20151
20550
  } catch {
20152
20551
  return void 0;
@@ -20185,12 +20584,12 @@ function validationAt(workbook, sheet, row2, col) {
20185
20584
  }
20186
20585
  function operand3(formula, evaluate, at) {
20187
20586
  if (formula === void 0) return void 0;
20188
- const text = formula.replace(/^=/, "").trim();
20189
- if (text !== "" && Number.isFinite(Number(text))) return Number(text);
20190
- const quoted = /^"((?:[^"]|"")*)"$/.exec(text);
20587
+ const text2 = formula.replace(/^=/, "").trim();
20588
+ if (text2 !== "" && Number.isFinite(Number(text2))) return Number(text2);
20589
+ const quoted = /^"((?:[^"]|"")*)"$/.exec(text2);
20191
20590
  if (quoted) return (quoted[1] ?? "").replace(/""/g, '"');
20192
20591
  try {
20193
- return evaluate(text, at);
20592
+ return evaluate(text2, at);
20194
20593
  } catch {
20195
20594
  return void 0;
20196
20595
  }
@@ -20232,8 +20631,8 @@ function relativeTo(dv, formula, at) {
20232
20631
  const dRow = at.row - top;
20233
20632
  const dCol = at.col - left2;
20234
20633
  if (dRow === 0 && dCol === 0) return formula;
20235
- const text = formula.replace(/^=/, "");
20236
- return translateFormula(text, dRow, dCol);
20634
+ const text2 = formula.replace(/^=/, "");
20635
+ return translateFormula(text2, dRow, dCol);
20237
20636
  }
20238
20637
  function withProposedValue(workbook, at, value2, fn) {
20239
20638
  const sheet = workbook.sheets[at.sheet];
@@ -20456,7 +20855,7 @@ function createEditSession(workbook, options = {}) {
20456
20855
  return {
20457
20856
  workbook,
20458
20857
  calc,
20459
- setCellInput: (s, r, c, text) => setCellInput(ctx, s, r, c, text),
20858
+ setCellInput: (s, r, c, text2) => setCellInput(ctx, s, r, c, text2),
20460
20859
  setCellValue: (s, r, c, value2) => setCellValue(ctx, s, r, c, value2),
20461
20860
  setRangeValues: (s, at, rows2) => setRangeValues(ctx, s, at, rows2),
20462
20861
  clearRange: (s, range2, what) => clearRange(ctx, s, range2, what),
@@ -20489,7 +20888,7 @@ function createEditSession(workbook, options = {}) {
20489
20888
  setSheetState: (i2, state) => setSheetState(ctx, i2, state),
20490
20889
  setTabColor: (i2, color) => setTabColor(ctx, i2, color),
20491
20890
  setFreeze: (s, freeze) => setFreeze(ctx, s, freeze),
20492
- setComment: (s, at, text, author) => setComment(ctx, s, at, text, author),
20891
+ setComment: (s, at, text2, author) => setComment(ctx, s, at, text2, author),
20493
20892
  setHyperlink: (s, range2, link) => setHyperlink(ctx, s, range2, link),
20494
20893
  addConditionalFormat: (s, cf) => addConditionalFormat(ctx, s, cf),
20495
20894
  clearConditionalFormats: (s, range2) => clearConditionalFormats(ctx, s, range2),
@@ -20566,18 +20965,19 @@ function createEditSession(workbook, options = {}) {
20566
20965
  onChange(listener) {
20567
20966
  listeners2.add(listener);
20568
20967
  return () => listeners2.delete(listener);
20569
- }
20968
+ },
20969
+ applyExternal: (apply) => applyExternal({ calculator, emit, busy: () => !!open }, apply)
20570
20970
  };
20571
20971
  }
20572
20972
 
20573
20973
  // xlsx/layout/cf-helpers.ts
20574
20974
  function literal(formula) {
20575
- const text = formula.trim();
20576
- if (/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i.test(text)) return Number(text);
20577
- const quoted = /^"((?:[^"]|"")*)"$/.exec(text);
20975
+ const text2 = formula.trim();
20976
+ if (/^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i.test(text2)) return Number(text2);
20977
+ const quoted = /^"((?:[^"]|"")*)"$/.exec(text2);
20578
20978
  if (quoted) return (quoted[1] ?? "").replace(/""/g, '"');
20579
- if (/^TRUE$/i.test(text)) return true;
20580
- if (/^FALSE$/i.test(text)) return false;
20979
+ if (/^TRUE$/i.test(text2)) return true;
20980
+ if (/^FALSE$/i.test(text2)) return false;
20581
20981
  return void 0;
20582
20982
  }
20583
20983
  function localTodaySerial(date1904) {
@@ -20924,12 +21324,12 @@ function createConditionalFormatEvaluator(workbook, sheetIndex2, evaluate, optio
20924
21324
  case "beginsWith":
20925
21325
  case "endsWith": {
20926
21326
  if (isCellError(value2)) return false;
20927
- const text = valueText(value2).toLowerCase();
21327
+ const text2 = valueText(value2).toLowerCase();
20928
21328
  const needle = rule.text.toLowerCase();
20929
- if (rule.type === "containsText") return text.includes(needle);
20930
- if (rule.type === "notContainsText") return !text.includes(needle);
20931
- if (rule.type === "beginsWith") return text.startsWith(needle);
20932
- return text.endsWith(needle);
21329
+ if (rule.type === "containsText") return text2.includes(needle);
21330
+ if (rule.type === "notContainsText") return !text2.includes(needle);
21331
+ if (rule.type === "beginsWith") return text2.startsWith(needle);
21332
+ return text2.endsWith(needle);
20933
21333
  }
20934
21334
  case "timePeriod":
20935
21335
  return typeof value2 === "number" && inTimePeriod(rule.timePeriod, value2, today(), workbook.date1904);
@@ -21060,7 +21460,7 @@ function overflowExtent(sheet, metrics, row2, col, textWidth, hAlign, maxSpan =
21060
21460
  return result2();
21061
21461
  }
21062
21462
 
21063
- // xlsx/layout/font-family.ts
21463
+ // text/css-font-family.ts
21064
21464
  var FALLBACKS = {
21065
21465
  calibri: '"Calibri", "Carlito", "Segoe UI", Arial, sans-serif',
21066
21466
  "calibri light": '"Calibri Light", "Calibri", "Carlito", "Segoe UI", Arial, sans-serif',
@@ -21461,7 +21861,7 @@ function styleCssFont(style2) {
21461
21861
  }
21462
21862
  function measure(ctx) {
21463
21863
  const grid6 = ctx.grid();
21464
- return grid6 ? (text, style2) => grid6.measureText(text, styleCssFont(style2)) : void 0;
21864
+ return grid6 ? (text2, style2) => grid6.measureText(text2, styleCssFont(style2)) : void 0;
21465
21865
  }
21466
21866
  var UNSET = void 0;
21467
21867
 
@@ -21840,19 +22240,19 @@ function mergeMessageModules(modules) {
21840
22240
  for (const value2 of Object.values(module)) {
21841
22241
  if (!value2 || typeof value2 !== "object" || Array.isArray(value2)) continue;
21842
22242
  const entries = Object.entries(value2);
21843
- if (!entries.every(([, text]) => typeof text === "string")) continue;
21844
- for (const [key, text] of entries) merged[key] = text;
22243
+ if (!entries.every(([, text2]) => typeof text2 === "string")) continue;
22244
+ for (const [key, text2] of entries) merged[key] = text2;
21845
22245
  }
21846
22246
  }
21847
22247
  return merged;
21848
22248
  }
21849
22249
 
21850
22250
  // i18n/translator.ts
21851
- var SINGLE = /\{(\w+)\}/g;
22251
+ var SINGLE2 = /\{(\w+)\}/g;
21852
22252
  var DOUBLE = /\{\{\s*(\w+)\s*\}\}/g;
21853
22253
  function interpolate(template, params, placeholder = "single") {
21854
22254
  if (!params) return template;
21855
- const pattern = placeholder === "double" ? DOUBLE : SINGLE;
22255
+ const pattern = placeholder === "double" ? DOUBLE : SINGLE2;
21856
22256
  return template.replace(
21857
22257
  pattern,
21858
22258
  (match2, name) => Object.prototype.hasOwnProperty.call(params, name) && params[name] !== void 0 ? String(params[name]) : match2
@@ -21861,15 +22261,45 @@ function interpolate(template, params, placeholder = "single") {
21861
22261
  function createTranslator(messages, fallbacks = [], options = {}) {
21862
22262
  const placeholder = options.placeholder ?? "single";
21863
22263
  return (key, params) => {
21864
- let text = messages?.[key];
21865
- for (let i2 = 0; text === void 0 && i2 < fallbacks.length; i2++) text = fallbacks[i2]?.[key];
21866
- return interpolate(text ?? options.missing?.(key) ?? key, params, placeholder);
22264
+ let text2 = messages?.[key];
22265
+ for (let i2 = 0; text2 === void 0 && i2 < fallbacks.length; i2++) text2 = fallbacks[i2]?.[key];
22266
+ return interpolate(text2 ?? options.missing?.(key) ?? key, params, placeholder);
21867
22267
  };
21868
22268
  }
21869
22269
 
21870
22270
  // xlsx/ui/locales/merge.ts
21871
22271
  var mergeStringModules = mergeMessageModules;
21872
22272
 
22273
+ // xlsx/ui/locales/de/collab.ts
22274
+ var collab_exports = {};
22275
+ __export(collab_exports, {
22276
+ collab: () => collab
22277
+ });
22278
+ var collab = {
22279
+ Share: "Freigeben",
22280
+ "Session name": "Sitzungsname",
22281
+ "Start sharing": "Freigabe starten",
22282
+ "Stop sharing": "Freigabe beenden",
22283
+ "People in this session": "Personen in dieser Sitzung",
22284
+ "Session: {room}": "Sitzung: {room}",
22285
+ "Not sharing.": "Keine Freigabe aktiv.",
22286
+ "Connecting...": "Verbindung wird hergestellt...",
22287
+ "Connected.": "Verbunden.",
22288
+ "Joining the session...": "Sitzung wird beigetreten...",
22289
+ "Disconnected. Changes are kept and sent when the connection returns.": "Getrennt. \xC4nderungen bleiben erhalten und werden gesendet, sobald die Verbindung zur\xFCck ist.",
22290
+ "The connection failed. Changes are kept and sent when the connection returns.": "Die Verbindung ist fehlgeschlagen. \xC4nderungen bleiben erhalten und werden gesendet, sobald die Verbindung zur\xFCck ist.",
22291
+ "Edit this workbook together with other people. Everyone who joins the same session sees changes as they are made.": "Bearbeiten Sie diese Arbeitsmappe gemeinsam mit anderen. Alle, die derselben Sitzung beitreten, sehen \xC4nderungen sofort.",
22292
+ "Cell values, formulas, formats, sheets, rows, columns, merges and names are shared. Charts, pictures, comments, conditional formats, data validation, tables and page setup stay in this window.": "Zellwerte, Formeln, Formate, Bl\xE4tter, Zeilen, Spalten, verbundene Zellen und Namen werden geteilt. Diagramme, Bilder, Kommentare, bedingte Formatierungen, Daten\xFCberpr\xFCfung, Tabellen und Seiteneinrichtung bleiben in diesem Fenster.",
22293
+ "Without a server set by the page, a session connects only windows and tabs of this browser. Nothing is uploaded.": "Ohne einen von der Seite festgelegten Server verbindet eine Sitzung nur Fenster und Tabs dieses Browsers. Es wird nichts hochgeladen.",
22294
+ "Reconnected. Changes made while offline were sent.": "Wieder verbunden. Offline vorgenommene \xC4nderungen wurden gesendet.",
22295
+ "Connection lost. Keep working; your changes are sent when it returns.": "Verbindung verloren. Arbeiten Sie weiter; Ihre \xC4nderungen werden gesendet, sobald sie zur\xFCck ist.",
22296
+ "Sharing stopped because another workbook was opened.": "Die Freigabe wurde beendet, weil eine andere Arbeitsmappe ge\xF6ffnet wurde.",
22297
+ "Open or create a workbook before sharing it.": "\xD6ffnen oder erstellen Sie eine Arbeitsmappe, bevor Sie sie freigeben.",
22298
+ "Use 1 to 128 letters, digits, hyphens or underscores for the room name.": "Verwenden Sie f\xFCr den Sitzungsnamen 1 bis 128 Buchstaben, Ziffern, Bindestriche oder Unterstriche.",
22299
+ "This browser cannot share between windows; pass a server URL.": "Dieser Browser kann nicht zwischen Fenstern teilen; geben Sie eine Server-URL an.",
22300
+ "Stop the current collaboration session first.": "Beenden Sie zuerst die aktuelle Zusammenarbeitssitzung."
22301
+ };
22302
+
21873
22303
  // xlsx/ui/locales/de/commands.ts
21874
22304
  var commands_exports = {};
21875
22305
  __export(commands_exports, {
@@ -23439,11 +23869,17 @@ var NAVIGATION_STRINGS = {
23439
23869
  Hyperlinks: ["Liens hypertexte", "Hyperlinks", "Hiperv\xEDnculos", "\u8D85\u94FE\u63A5"],
23440
23870
  "Sort and filter": ["Tri et filtre", "Sortieren und Filtern", "Ordenar y filtrar", "\u6392\u5E8F\u548C\u7B5B\u9009"],
23441
23871
  "Freeze panes": ["Figer les volets", "Fenster fixieren", "Inmovilizar paneles", "\u51BB\u7ED3\u7A97\u683C"],
23442
- "Pivot tables and sparklines (kept in the file but not shown)": [
23443
- "Tableaux crois\xE9s dynamiques et graphiques sparkline (conserv\xE9s dans le fichier mais non affich\xE9s)",
23444
- "PivotTables und Sparklines (in der Datei erhalten, aber nicht angezeigt)",
23445
- "Tablas din\xE1micas y minigr\xE1ficos (se conservan en el archivo, pero no se muestran)",
23446
- "\u6570\u636E\u900F\u89C6\u8868\u548C\u8FF7\u4F60\u56FE(\u4FDD\u7559\u5728\u6587\u4EF6\u4E2D\u4F46\u4E0D\u663E\u793A)"
23872
+ "Pivot tables (kept in the file but not shown)": [
23873
+ "Tableaux crois\xE9s dynamiques (conserv\xE9s dans le fichier mais non affich\xE9s)",
23874
+ "PivotTables (in der Datei erhalten, aber nicht angezeigt)",
23875
+ "Tablas din\xE1micas (se conservan en el archivo, pero no se muestran)",
23876
+ "\u6570\u636E\u900F\u89C6\u8868(\u4FDD\u7559\u5728\u6587\u4EF6\u4E2D\u4F46\u4E0D\u663E\u793A)"
23877
+ ],
23878
+ "Creating or editing sparklines (existing ones are shown)": [
23879
+ "Cr\xE9ation ou modification de graphiques sparkline (ceux existants sont affich\xE9s)",
23880
+ "Sparklines erstellen oder bearbeiten (vorhandene werden angezeigt)",
23881
+ "Crear o editar minigr\xE1ficos (los existentes se muestran)",
23882
+ "\u521B\u5EFA\u6216\u7F16\u8F91\u8FF7\u4F60\u56FE(\u73B0\u6709\u8FF7\u4F60\u56FE\u4F1A\u663E\u793A)"
23447
23883
  ],
23448
23884
  "Show Formulas": ["Afficher les formules", "Formeln anzeigen", "Mostrar f\xF3rmulas", "\u663E\u793A\u516C\u5F0F"],
23449
23885
  "Manual calculation": ["Calcul manuel", "Manuelle Berechnung", "C\xE1lculo manual", "\u624B\u52A8\u8BA1\u7B97"],
@@ -25942,7 +26378,7 @@ var shell = {
25942
26378
  "Inspect Workbook": "Arbeitsmappe pr\xFCfen",
25943
26379
  "Compatibility notes": "Kompatibilit\xE4tshinweise",
25944
26380
  "No compatibility notes for this workbook.": "Keine Kompatibilit\xE4tshinweise f\xFCr diese Arbeitsmappe.",
25945
- "Charts are shown but not edited; pivot tables, sparklines, macros and other unsupported parts are kept in the file but not shown.": "Diagramme werden angezeigt, aber nicht bearbeitet; PivotTables, Sparklines, Makros und andere nicht unterst\xFCtzte Teile bleiben in der Datei erhalten, werden aber nicht angezeigt.",
26381
+ "Charts and sparklines are shown but not edited; pivot tables, macros and other unsupported parts are kept in the file but not shown.": "Diagramme und Sparklines werden angezeigt, aber nicht bearbeitet; PivotTables, Makros und andere nicht unterst\xFCtzte Teile bleiben in der Datei erhalten, werden aber nicht angezeigt.",
25946
26382
  "This workbook was opened from an Excel 97-2003 file (.xls). Save writes an Excel Workbook (.xlsx); the original .xls file is not changed.": "Diese Arbeitsmappe wurde aus einer Excel 97-2003-Datei (.xls) ge\xF6ffnet. Beim Speichern entsteht eine Excel-Arbeitsmappe (.xlsx); die urspr\xFCngliche .xls-Datei bleibt unver\xE4ndert.",
25947
26383
  "This workbook was opened from a CSV file, which keeps values only. Save writes an Excel Workbook (.xlsx); use Export to write CSV.": "Diese Arbeitsmappe wurde aus einer CSV-Datei ge\xF6ffnet, die nur Werte enth\xE4lt. Beim Speichern entsteht eine Excel-Arbeitsmappe (.xlsx); verwenden Sie Exportieren, um CSV zu schreiben.",
25948
26384
  "Macros are kept in the file but do not run in this editor.": "Makros bleiben in der Datei erhalten, werden in diesem Editor aber nicht ausgef\xFChrt.",
@@ -26059,11 +26495,42 @@ var shell = {
26059
26495
 
26060
26496
  // xlsx/ui/locales/de/index.ts
26061
26497
  var de = mergeStringModules({
26498
+ "./collab.ts": collab_exports,
26062
26499
  "./commands.ts": commands_exports,
26063
26500
  "./grid.ts": grid_exports,
26064
26501
  "./shell.ts": shell_exports
26065
26502
  });
26066
26503
 
26504
+ // xlsx/ui/locales/en/collab.ts
26505
+ var collab_exports2 = {};
26506
+ __export(collab_exports2, {
26507
+ collab: () => collab2
26508
+ });
26509
+ var collab2 = {
26510
+ Share: "Share",
26511
+ "Session name": "Session name",
26512
+ "Start sharing": "Start sharing",
26513
+ "Stop sharing": "Stop sharing",
26514
+ "People in this session": "People in this session",
26515
+ "Session: {room}": "Session: {room}",
26516
+ "Not sharing.": "Not sharing.",
26517
+ "Connecting...": "Connecting...",
26518
+ "Connected.": "Connected.",
26519
+ "Joining the session...": "Joining the session...",
26520
+ "Disconnected. Changes are kept and sent when the connection returns.": "Disconnected. Changes are kept and sent when the connection returns.",
26521
+ "The connection failed. Changes are kept and sent when the connection returns.": "The connection failed. Changes are kept and sent when the connection returns.",
26522
+ "Edit this workbook together with other people. Everyone who joins the same session sees changes as they are made.": "Edit this workbook together with other people. Everyone who joins the same session sees changes as they are made.",
26523
+ "Cell values, formulas, formats, sheets, rows, columns, merges and names are shared. Charts, pictures, comments, conditional formats, data validation, tables and page setup stay in this window.": "Cell values, formulas, formats, sheets, rows, columns, merges and names are shared. Charts, pictures, comments, conditional formats, data validation, tables and page setup stay in this window.",
26524
+ "Without a server set by the page, a session connects only windows and tabs of this browser. Nothing is uploaded.": "Without a server set by the page, a session connects only windows and tabs of this browser. Nothing is uploaded.",
26525
+ "Reconnected. Changes made while offline were sent.": "Reconnected. Changes made while offline were sent.",
26526
+ "Connection lost. Keep working; your changes are sent when it returns.": "Connection lost. Keep working; your changes are sent when it returns.",
26527
+ "Sharing stopped because another workbook was opened.": "Sharing stopped because another workbook was opened.",
26528
+ "Open or create a workbook before sharing it.": "Open or create a workbook before sharing it.",
26529
+ "Use 1 to 128 letters, digits, hyphens or underscores for the room name.": "Use 1 to 128 letters, digits, hyphens or underscores for the room name.",
26530
+ "This browser cannot share between windows; pass a server URL.": "This browser cannot share between windows; pass a server URL.",
26531
+ "Stop the current collaboration session first.": "Stop the current collaboration session first."
26532
+ };
26533
+
26067
26534
  // xlsx/ui/locales/en/commands.ts
26068
26535
  var commands_exports2 = {};
26069
26536
  __export(commands_exports2, {
@@ -26296,7 +26763,7 @@ var shell2 = {
26296
26763
  "Inspect Workbook": "Inspect Workbook",
26297
26764
  "Compatibility notes": "Compatibility notes",
26298
26765
  "No compatibility notes for this workbook.": "No compatibility notes for this workbook.",
26299
- "Charts are shown but not edited; pivot tables, sparklines, macros and other unsupported parts are kept in the file but not shown.": "Charts are shown but not edited; pivot tables, sparklines, macros and other unsupported parts are kept in the file but not shown.",
26766
+ "Charts and sparklines are shown but not edited; pivot tables, macros and other unsupported parts are kept in the file but not shown.": "Charts and sparklines are shown but not edited; pivot tables, macros and other unsupported parts are kept in the file but not shown.",
26300
26767
  "This workbook was opened from an Excel 97-2003 file (.xls). Save writes an Excel Workbook (.xlsx); the original .xls file is not changed.": "This workbook was opened from an Excel 97-2003 file (.xls). Save writes an Excel Workbook (.xlsx); the original .xls file is not changed.",
26301
26768
  "This workbook was opened from a CSV file, which keeps values only. Save writes an Excel Workbook (.xlsx); use Export to write CSV.": "This workbook was opened from a CSV file, which keeps values only. Save writes an Excel Workbook (.xlsx); use Export to write CSV.",
26302
26769
  "Macros are kept in the file but do not run in this editor.": "Macros are kept in the file but do not run in this editor.",
@@ -26413,11 +26880,42 @@ var shell2 = {
26413
26880
 
26414
26881
  // xlsx/ui/locales/en/index.ts
26415
26882
  var en = mergeStringModules({
26883
+ "./collab.ts": collab_exports2,
26416
26884
  "./commands.ts": commands_exports2,
26417
26885
  "./grid.ts": grid_exports2,
26418
26886
  "./shell.ts": shell_exports2
26419
26887
  });
26420
26888
 
26889
+ // xlsx/ui/locales/es/collab.ts
26890
+ var collab_exports3 = {};
26891
+ __export(collab_exports3, {
26892
+ collab: () => collab3
26893
+ });
26894
+ var collab3 = {
26895
+ Share: "Compartir",
26896
+ "Session name": "Nombre de la sesi\xF3n",
26897
+ "Start sharing": "Empezar a compartir",
26898
+ "Stop sharing": "Dejar de compartir",
26899
+ "People in this session": "Personas en esta sesi\xF3n",
26900
+ "Session: {room}": "Sesi\xF3n: {room}",
26901
+ "Not sharing.": "No se est\xE1 compartiendo.",
26902
+ "Connecting...": "Conectando...",
26903
+ "Connected.": "Conectado.",
26904
+ "Joining the session...": "Uni\xE9ndose a la sesi\xF3n...",
26905
+ "Disconnected. Changes are kept and sent when the connection returns.": "Desconectado. Los cambios se conservan y se env\xEDan cuando vuelva la conexi\xF3n.",
26906
+ "The connection failed. Changes are kept and sent when the connection returns.": "La conexi\xF3n fall\xF3. Los cambios se conservan y se env\xEDan cuando vuelva la conexi\xF3n.",
26907
+ "Edit this workbook together with other people. Everyone who joins the same session sees changes as they are made.": "Edite este libro junto con otras personas. Todos los que se unan a la misma sesi\xF3n ver\xE1n los cambios a medida que se hacen.",
26908
+ "Cell values, formulas, formats, sheets, rows, columns, merges and names are shared. Charts, pictures, comments, conditional formats, data validation, tables and page setup stay in this window.": "Se comparten los valores, f\xF3rmulas, formatos, hojas, filas, columnas, celdas combinadas y nombres. Los gr\xE1ficos, im\xE1genes, comentarios, formatos condicionales, validaci\xF3n de datos, tablas y la configuraci\xF3n de p\xE1gina permanecen en esta ventana.",
26909
+ "Without a server set by the page, a session connects only windows and tabs of this browser. Nothing is uploaded.": "Sin un servidor definido por la p\xE1gina, una sesi\xF3n solo conecta ventanas y pesta\xF1as de este navegador. No se sube nada.",
26910
+ "Reconnected. Changes made while offline were sent.": "Reconectado. Se enviaron los cambios hechos sin conexi\xF3n.",
26911
+ "Connection lost. Keep working; your changes are sent when it returns.": "Se perdi\xF3 la conexi\xF3n. Siga trabajando; sus cambios se enviar\xE1n cuando vuelva.",
26912
+ "Sharing stopped because another workbook was opened.": "Se dej\xF3 de compartir porque se abri\xF3 otro libro.",
26913
+ "Open or create a workbook before sharing it.": "Abra o cree un libro antes de compartirlo.",
26914
+ "Use 1 to 128 letters, digits, hyphens or underscores for the room name.": "Use de 1 a 128 letras, d\xEDgitos, guiones o guiones bajos para el nombre de la sesi\xF3n.",
26915
+ "This browser cannot share between windows; pass a server URL.": "Este navegador no puede compartir entre ventanas; indique la URL de un servidor.",
26916
+ "Stop the current collaboration session first.": "Detenga primero la sesi\xF3n de colaboraci\xF3n actual."
26917
+ };
26918
+
26421
26919
  // xlsx/ui/locales/es/commands.ts
26422
26920
  var commands_exports3 = {};
26423
26921
  __export(commands_exports3, {
@@ -26650,7 +27148,7 @@ var shell3 = {
26650
27148
  "Inspect Workbook": "Inspeccionar libro",
26651
27149
  "Compatibility notes": "Notas de compatibilidad",
26652
27150
  "No compatibility notes for this workbook.": "No hay notas de compatibilidad para este libro.",
26653
- "Charts are shown but not edited; pivot tables, sparklines, macros and other unsupported parts are kept in the file but not shown.": "Los gr\xE1ficos se muestran pero no se editan; las tablas din\xE1micas, minigr\xE1ficos, macros y otras partes no compatibles se conservan en el archivo pero no se muestran.",
27151
+ "Charts and sparklines are shown but not edited; pivot tables, macros and other unsupported parts are kept in the file but not shown.": "Los gr\xE1ficos y minigr\xE1ficos se muestran pero no se editan; las tablas din\xE1micas, macros y otras partes no compatibles se conservan en el archivo pero no se muestran.",
26654
27152
  "This workbook was opened from an Excel 97-2003 file (.xls). Save writes an Excel Workbook (.xlsx); the original .xls file is not changed.": "Este libro se abri\xF3 desde un archivo de Excel 97-2003 (.xls). Al guardar se escribe un libro de Excel (.xlsx); el archivo .xls original no se modifica.",
26655
27153
  "This workbook was opened from a CSV file, which keeps values only. Save writes an Excel Workbook (.xlsx); use Export to write CSV.": "Este libro se abri\xF3 desde un archivo CSV, que solo conserva valores. Al guardar se escribe un libro de Excel (.xlsx); use Exportar para escribir CSV.",
26656
27154
  "Macros are kept in the file but do not run in this editor.": "Las macros se conservan en el archivo pero no se ejecutan en este editor.",
@@ -26767,11 +27265,42 @@ var shell3 = {
26767
27265
 
26768
27266
  // xlsx/ui/locales/es/index.ts
26769
27267
  var es = mergeStringModules({
27268
+ "./collab.ts": collab_exports3,
26770
27269
  "./commands.ts": commands_exports3,
26771
27270
  "./grid.ts": grid_exports3,
26772
27271
  "./shell.ts": shell_exports3
26773
27272
  });
26774
27273
 
27274
+ // xlsx/ui/locales/fr/collab.ts
27275
+ var collab_exports4 = {};
27276
+ __export(collab_exports4, {
27277
+ collab: () => collab4
27278
+ });
27279
+ var collab4 = {
27280
+ Share: "Partager",
27281
+ "Session name": "Nom de la session",
27282
+ "Start sharing": "Commencer le partage",
27283
+ "Stop sharing": "Arr\xEAter le partage",
27284
+ "People in this session": "Personnes dans cette session",
27285
+ "Session: {room}": "Session : {room}",
27286
+ "Not sharing.": "Aucun partage en cours.",
27287
+ "Connecting...": "Connexion...",
27288
+ "Connected.": "Connect\xE9.",
27289
+ "Joining the session...": "Connexion \xE0 la session...",
27290
+ "Disconnected. Changes are kept and sent when the connection returns.": "D\xE9connect\xE9. Les modifications sont conserv\xE9es et envoy\xE9es au retour de la connexion.",
27291
+ "The connection failed. Changes are kept and sent when the connection returns.": "La connexion a \xE9chou\xE9. Les modifications sont conserv\xE9es et envoy\xE9es au retour de la connexion.",
27292
+ "Edit this workbook together with other people. Everyone who joins the same session sees changes as they are made.": "Modifiez ce classeur avec d'autres personnes. Toutes les personnes qui rejoignent la m\xEAme session voient les modifications au fur et \xE0 mesure.",
27293
+ "Cell values, formulas, formats, sheets, rows, columns, merges and names are shared. Charts, pictures, comments, conditional formats, data validation, tables and page setup stay in this window.": "Les valeurs, formules, formats, feuilles, lignes, colonnes, fusions et noms sont partag\xE9s. Les graphiques, images, commentaires, mises en forme conditionnelles, validations des donn\xE9es, tableaux et la mise en page restent dans cette fen\xEAtre.",
27294
+ "Without a server set by the page, a session connects only windows and tabs of this browser. Nothing is uploaded.": "Sans serveur d\xE9fini par la page, une session ne relie que les fen\xEAtres et onglets de ce navigateur. Rien n'est t\xE9l\xE9vers\xE9.",
27295
+ "Reconnected. Changes made while offline were sent.": "Reconnect\xE9. Les modifications faites hors connexion ont \xE9t\xE9 envoy\xE9es.",
27296
+ "Connection lost. Keep working; your changes are sent when it returns.": "Connexion perdue. Continuez \xE0 travailler ; vos modifications seront envoy\xE9es \xE0 son retour.",
27297
+ "Sharing stopped because another workbook was opened.": "Le partage s'est arr\xEAt\xE9 car un autre classeur a \xE9t\xE9 ouvert.",
27298
+ "Open or create a workbook before sharing it.": "Ouvrez ou cr\xE9ez un classeur avant de le partager.",
27299
+ "Use 1 to 128 letters, digits, hyphens or underscores for the room name.": "Utilisez de 1 \xE0 128 lettres, chiffres, traits d'union ou traits de soulignement pour le nom de la session.",
27300
+ "This browser cannot share between windows; pass a server URL.": "Ce navigateur ne peut pas partager entre fen\xEAtres ; indiquez l'URL d'un serveur.",
27301
+ "Stop the current collaboration session first.": "Arr\xEAtez d'abord la session de collaboration en cours."
27302
+ };
27303
+
26775
27304
  // xlsx/ui/locales/fr/commands.ts
26776
27305
  var commands_exports4 = {};
26777
27306
  __export(commands_exports4, {
@@ -27004,7 +27533,7 @@ var shell4 = {
27004
27533
  "Inspect Workbook": "Inspecter le classeur",
27005
27534
  "Compatibility notes": "Notes de compatibilit\xE9",
27006
27535
  "No compatibility notes for this workbook.": "Aucune note de compatibilit\xE9 pour ce classeur.",
27007
- "Charts are shown but not edited; pivot tables, sparklines, macros and other unsupported parts are kept in the file but not shown.": "Les graphiques sont affich\xE9s mais non modifiables ; les tableaux crois\xE9s dynamiques, graphiques sparkline, macros et autres \xE9l\xE9ments non pris en charge sont conserv\xE9s dans le fichier mais pas affich\xE9s.",
27536
+ "Charts and sparklines are shown but not edited; pivot tables, macros and other unsupported parts are kept in the file but not shown.": "Les graphiques et graphiques sparkline sont affich\xE9s mais non modifiables ; les tableaux crois\xE9s dynamiques, macros et autres \xE9l\xE9ments non pris en charge sont conserv\xE9s dans le fichier mais pas affich\xE9s.",
27008
27537
  "This workbook was opened from an Excel 97-2003 file (.xls). Save writes an Excel Workbook (.xlsx); the original .xls file is not changed.": "Ce classeur a \xE9t\xE9 ouvert \xE0 partir d'un fichier Excel 97-2003 (.xls). L'enregistrement cr\xE9e un classeur Excel (.xlsx) ; le fichier .xls d'origine n'est pas modifi\xE9.",
27009
27538
  "This workbook was opened from a CSV file, which keeps values only. Save writes an Excel Workbook (.xlsx); use Export to write CSV.": "Ce classeur a \xE9t\xE9 ouvert \xE0 partir d'un fichier CSV, qui ne conserve que les valeurs. L'enregistrement cr\xE9e un classeur Excel (.xlsx) ; utilisez Exporter pour \xE9crire un CSV.",
27010
27539
  "Macros are kept in the file but do not run in this editor.": "Les macros sont conserv\xE9es dans le fichier mais ne s'ex\xE9cutent pas dans cet \xE9diteur.",
@@ -27121,11 +27650,42 @@ var shell4 = {
27121
27650
 
27122
27651
  // xlsx/ui/locales/fr/index.ts
27123
27652
  var fr = mergeStringModules({
27653
+ "./collab.ts": collab_exports4,
27124
27654
  "./commands.ts": commands_exports4,
27125
27655
  "./grid.ts": grid_exports4,
27126
27656
  "./shell.ts": shell_exports4
27127
27657
  });
27128
27658
 
27659
+ // xlsx/ui/locales/zh-CN/collab.ts
27660
+ var collab_exports5 = {};
27661
+ __export(collab_exports5, {
27662
+ collab: () => collab5
27663
+ });
27664
+ var collab5 = {
27665
+ Share: "\u5171\u4EAB",
27666
+ "Session name": "\u4F1A\u8BDD\u540D\u79F0",
27667
+ "Start sharing": "\u5F00\u59CB\u5171\u4EAB",
27668
+ "Stop sharing": "\u505C\u6B62\u5171\u4EAB",
27669
+ "People in this session": "\u6B64\u4F1A\u8BDD\u4E2D\u7684\u4EBA\u5458",
27670
+ "Session: {room}": "\u4F1A\u8BDD\uFF1A{room}",
27671
+ "Not sharing.": "\u672A\u5728\u5171\u4EAB\u3002",
27672
+ "Connecting...": "\u6B63\u5728\u8FDE\u63A5...",
27673
+ "Connected.": "\u5DF2\u8FDE\u63A5\u3002",
27674
+ "Joining the session...": "\u6B63\u5728\u52A0\u5165\u4F1A\u8BDD...",
27675
+ "Disconnected. Changes are kept and sent when the connection returns.": "\u5DF2\u65AD\u5F00\u8FDE\u63A5\u3002\u66F4\u6539\u4F1A\u88AB\u4FDD\u7559\uFF0C\u5E76\u5728\u8FDE\u63A5\u6062\u590D\u540E\u53D1\u9001\u3002",
27676
+ "The connection failed. Changes are kept and sent when the connection returns.": "\u8FDE\u63A5\u5931\u8D25\u3002\u66F4\u6539\u4F1A\u88AB\u4FDD\u7559\uFF0C\u5E76\u5728\u8FDE\u63A5\u6062\u590D\u540E\u53D1\u9001\u3002",
27677
+ "Edit this workbook together with other people. Everyone who joins the same session sees changes as they are made.": "\u4E0E\u4ED6\u4EBA\u4E00\u8D77\u7F16\u8F91\u6B64\u5DE5\u4F5C\u7C3F\u3002\u52A0\u5165\u540C\u4E00\u4F1A\u8BDD\u7684\u6BCF\u4E2A\u4EBA\u90FD\u4F1A\u5B9E\u65F6\u770B\u5230\u66F4\u6539\u3002",
27678
+ "Cell values, formulas, formats, sheets, rows, columns, merges and names are shared. Charts, pictures, comments, conditional formats, data validation, tables and page setup stay in this window.": "\u5355\u5143\u683C\u503C\u3001\u516C\u5F0F\u3001\u683C\u5F0F\u3001\u5DE5\u4F5C\u8868\u3001\u884C\u3001\u5217\u3001\u5408\u5E76\u5355\u5143\u683C\u548C\u540D\u79F0\u4F1A\u88AB\u5171\u4EAB\u3002\u56FE\u8868\u3001\u56FE\u7247\u3001\u6279\u6CE8\u3001\u6761\u4EF6\u683C\u5F0F\u3001\u6570\u636E\u9A8C\u8BC1\u3001\u8868\u683C\u548C\u9875\u9762\u8BBE\u7F6E\u4EC5\u4FDD\u7559\u5728\u6B64\u7A97\u53E3\u4E2D\u3002",
27679
+ "Without a server set by the page, a session connects only windows and tabs of this browser. Nothing is uploaded.": "\u5982\u679C\u9875\u9762\u672A\u8BBE\u7F6E\u670D\u52A1\u5668\uFF0C\u4F1A\u8BDD\u53EA\u8FDE\u63A5\u6B64\u6D4F\u89C8\u5668\u4E2D\u7684\u7A97\u53E3\u548C\u6807\u7B7E\u9875\u3002\u4E0D\u4F1A\u4E0A\u4F20\u4EFB\u4F55\u5185\u5BB9\u3002",
27680
+ "Reconnected. Changes made while offline were sent.": "\u5DF2\u91CD\u65B0\u8FDE\u63A5\u3002\u79BB\u7EBF\u65F6\u6240\u505A\u7684\u66F4\u6539\u5DF2\u53D1\u9001\u3002",
27681
+ "Connection lost. Keep working; your changes are sent when it returns.": "\u8FDE\u63A5\u5DF2\u65AD\u5F00\u3002\u8BF7\u7EE7\u7EED\u5DE5\u4F5C\uFF0C\u8FDE\u63A5\u6062\u590D\u540E\u4F1A\u53D1\u9001\u60A8\u7684\u66F4\u6539\u3002",
27682
+ "Sharing stopped because another workbook was opened.": "\u7531\u4E8E\u6253\u5F00\u4E86\u53E6\u4E00\u4E2A\u5DE5\u4F5C\u7C3F\uFF0C\u5171\u4EAB\u5DF2\u505C\u6B62\u3002",
27683
+ "Open or create a workbook before sharing it.": "\u8BF7\u5148\u6253\u5F00\u6216\u521B\u5EFA\u5DE5\u4F5C\u7C3F\uFF0C\u7136\u540E\u518D\u5171\u4EAB\u3002",
27684
+ "Use 1 to 128 letters, digits, hyphens or underscores for the room name.": "\u4F1A\u8BDD\u540D\u79F0\u8BF7\u4F7F\u7528 1 \u5230 128 \u4E2A\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u8FDE\u5B57\u7B26\u6216\u4E0B\u5212\u7EBF\u3002",
27685
+ "This browser cannot share between windows; pass a server URL.": "\u6B64\u6D4F\u89C8\u5668\u65E0\u6CD5\u5728\u7A97\u53E3\u4E4B\u95F4\u5171\u4EAB\uFF1B\u8BF7\u63D0\u4F9B\u670D\u52A1\u5668 URL\u3002",
27686
+ "Stop the current collaboration session first.": "\u8BF7\u5148\u505C\u6B62\u5F53\u524D\u534F\u4F5C\u4F1A\u8BDD\u3002"
27687
+ };
27688
+
27129
27689
  // xlsx/ui/locales/zh-CN/commands.ts
27130
27690
  var commands_exports5 = {};
27131
27691
  __export(commands_exports5, {
@@ -27358,7 +27918,7 @@ var shell5 = {
27358
27918
  "Inspect Workbook": "\u68C0\u67E5\u5DE5\u4F5C\u7C3F",
27359
27919
  "Compatibility notes": "\u517C\u5BB9\u6027\u8BF4\u660E",
27360
27920
  "No compatibility notes for this workbook.": "\u6B64\u5DE5\u4F5C\u7C3F\u6CA1\u6709\u517C\u5BB9\u6027\u8BF4\u660E\u3002",
27361
- "Charts are shown but not edited; pivot tables, sparklines, macros and other unsupported parts are kept in the file but not shown.": "\u56FE\u8868\u4EC5\u663E\u793A\uFF0C\u4E0D\u53EF\u7F16\u8F91\uFF1B\u6570\u636E\u900F\u89C6\u8868\u3001\u8FF7\u4F60\u56FE\u3001\u5B8F\u548C\u5176\u4ED6\u4E0D\u652F\u6301\u7684\u90E8\u5206\u4F1A\u4FDD\u7559\u5728\u6587\u4EF6\u4E2D\uFF0C\u4F46\u4E0D\u663E\u793A\u3002",
27921
+ "Charts and sparklines are shown but not edited; pivot tables, macros and other unsupported parts are kept in the file but not shown.": "\u56FE\u8868\u548C\u8FF7\u4F60\u56FE\u4EC5\u663E\u793A\uFF0C\u4E0D\u53EF\u7F16\u8F91\uFF1B\u6570\u636E\u900F\u89C6\u8868\u3001\u5B8F\u548C\u5176\u4ED6\u4E0D\u652F\u6301\u7684\u90E8\u5206\u4F1A\u4FDD\u7559\u5728\u6587\u4EF6\u4E2D\uFF0C\u4F46\u4E0D\u663E\u793A\u3002",
27362
27922
  "This workbook was opened from an Excel 97-2003 file (.xls). Save writes an Excel Workbook (.xlsx); the original .xls file is not changed.": "\u6B64\u5DE5\u4F5C\u7C3F\u662F\u4ECE Excel 97-2003 \u6587\u4EF6 (.xls) \u6253\u5F00\u7684\u3002\u4FDD\u5B58\u65F6\u4F1A\u5199\u5165 Excel \u5DE5\u4F5C\u7C3F (.xlsx)\uFF1B\u539F\u59CB .xls \u6587\u4EF6\u4E0D\u4F1A\u66F4\u6539\u3002",
27363
27923
  "This workbook was opened from a CSV file, which keeps values only. Save writes an Excel Workbook (.xlsx); use Export to write CSV.": "\u6B64\u5DE5\u4F5C\u7C3F\u662F\u4ECE\u4EC5\u4FDD\u7559\u503C\u7684 CSV \u6587\u4EF6\u6253\u5F00\u7684\u3002\u4FDD\u5B58\u65F6\u4F1A\u5199\u5165 Excel \u5DE5\u4F5C\u7C3F (.xlsx)\uFF1B\u4F7F\u7528\u201C\u5BFC\u51FA\u201D\u5199\u5165 CSV\u3002",
27364
27924
  "Macros are kept in the file but do not run in this editor.": "\u5B8F\u4F1A\u4FDD\u7559\u5728\u6587\u4EF6\u4E2D\uFF0C\u4F46\u4E0D\u4F1A\u5728\u6B64\u7F16\u8F91\u5668\u4E2D\u8FD0\u884C\u3002",
@@ -27475,6 +28035,7 @@ var shell5 = {
27475
28035
 
27476
28036
  // xlsx/ui/locales/zh-CN/index.ts
27477
28037
  var zhCN = mergeStringModules({
28038
+ "./collab.ts": collab_exports5,
27478
28039
  "./commands.ts": commands_exports5,
27479
28040
  "./grid.ts": grid_exports5,
27480
28041
  "./shell.ts": shell_exports5
@@ -27492,8 +28053,8 @@ var STRINGS = {
27492
28053
  function normalizeEditorLocale(value2) {
27493
28054
  return normalizeLocale(value2, EDITOR_LOCALES, "en");
27494
28055
  }
27495
- function fillTemplate(text, vars) {
27496
- return interpolate(text, vars);
28056
+ function fillTemplate(text2, vars) {
28057
+ return interpolate(text2, vars);
27497
28058
  }
27498
28059
  function translate(locale, key, vars) {
27499
28060
  return createTranslator(STRINGS[locale], [STRINGS.en])(key, vars);
@@ -27510,8 +28071,8 @@ function formatNumber2(locale, value2, digits2 = 10) {
27510
28071
  }
27511
28072
  function sheetBaseName(t) {
27512
28073
  const key = "sheet.default-name";
27513
- const text = t(key);
27514
- return text && text !== key ? text : "Sheet";
28074
+ const text2 = t(key);
28075
+ return text2 && text2 !== key ? text2 : "Sheet";
27515
28076
  }
27516
28077
 
27517
28078
  // xlsx/ui/commands/cells.ts
@@ -29271,6 +29832,11 @@ function tabMenu(state, actions) {
29271
29832
  );
29272
29833
  }
29273
29834
 
29835
+ // xlsx/ui/context.ts
29836
+ function historyOf(ctx) {
29837
+ return ctx.history ? ctx.history() : ctx.session();
29838
+ }
29839
+
29274
29840
  // xlsx/ui/dialogs.ts
29275
29841
  function createDialogRegistry(context, onError) {
29276
29842
  const openers = /* @__PURE__ */ new Map();
@@ -29526,8 +30092,8 @@ var DirtyState = class {
29526
30092
  };
29527
30093
 
29528
30094
  // xlsx/ui/formula-bar/name-resolve.ts
29529
- function parseSheetReference(workbook, activeSheet, text) {
29530
- const ref = text.trim().replace(/^=/, "");
30095
+ function parseSheetReference(workbook, activeSheet, text2) {
30096
+ const ref = text2.trim().replace(/^=/, "");
29531
30097
  const bang = ref.lastIndexOf("!");
29532
30098
  let sheet = activeSheet;
29533
30099
  if (bang >= 0) {
@@ -29545,8 +30111,8 @@ function findDefinedName2(workbook, sheet, name) {
29545
30111
  const matches2 = workbook.definedNames.filter((d) => d.name.toLowerCase() === lower2);
29546
30112
  return matches2.find((d) => d.localSheet === sheet) ?? matches2.find((d) => d.localSheet === void 0);
29547
30113
  }
29548
- function resolveNameBox(workbook, activeSheet, text) {
29549
- const input = text.trim();
30114
+ function resolveNameBox(workbook, activeSheet, text2) {
30115
+ const input = text2.trim();
29550
30116
  if (!input) return { kind: "invalid" };
29551
30117
  const ref = parseSheetReference(workbook, activeSheet, input);
29552
30118
  if (ref) return { kind: "go", ...ref };
@@ -29657,10 +30223,10 @@ function textAlign(hAlign) {
29657
30223
  if (hAlign === "justify" || hAlign === "distributed") return "justify";
29658
30224
  return "left";
29659
30225
  }
29660
- function repeatToFill(text, textWidth, cellWidth) {
29661
- if (!text || textWidth <= 0) return text;
30226
+ function repeatToFill(text2, textWidth, cellWidth) {
30227
+ if (!text2 || textWidth <= 0) return text2;
29662
30228
  const times = Math.max(1, Math.floor(cellWidth / textWidth));
29663
- return text.repeat(Math.min(times, 500));
30229
+ return text2.repeat(Math.min(times, 500));
29664
30230
  }
29665
30231
  function hashes(cellInnerWidth, hashWidth) {
29666
30232
  const n = Math.max(1, Math.floor(cellInnerWidth / Math.max(1, hashWidth)));
@@ -29670,9 +30236,9 @@ function hashes(cellInnerWidth, hashWidth) {
29670
30236
  // xlsx/ui/grid/cell-items.ts
29671
30237
  var PADDING = 2;
29672
30238
  function isBlankView(view) {
29673
- return view.text === "" && !view.fill && !hasBorders(view.borders) && !view.dataBar && !view.icon && !view.hasComment;
30239
+ return view.text === "" && !view.fill && !hasBorders(view.borders) && !view.dataBar && !view.icon && !view.sparkline && !view.hasComment;
29674
30240
  }
29675
- function textWidthOf(input, view, text) {
30241
+ function textWidthOf(input, view, text2) {
29676
30242
  if (view.rich?.length)
29677
30243
  return view.rich.reduce(
29678
30244
  (sum2, run) => sum2 + input.measure(run.text, cssFont(run.font, input.zoom)),
@@ -29680,7 +30246,7 @@ function textWidthOf(input, view, text) {
29680
30246
  );
29681
30247
  const font = cssFont(view.font, input.zoom);
29682
30248
  let widest = 0;
29683
- for (const line2 of text.split("\n")) widest = Math.max(widest, input.measure(line2, font));
30249
+ for (const line2 of text2.split("\n")) widest = Math.max(widest, input.measure(line2, font));
29684
30250
  return widest;
29685
30251
  }
29686
30252
  function makeItem(input, row2, col, view, merge2) {
@@ -29723,7 +30289,7 @@ function makeItem(input, row2, col, view, merge2) {
29723
30289
  return item;
29724
30290
  }
29725
30291
  if (view.overflow && !merge2 && measured > inner2) {
29726
- const extent = overflowExtent(
30292
+ const extent2 = overflowExtent(
29727
30293
  input.sheet,
29728
30294
  metrics,
29729
30295
  row2,
@@ -29731,9 +30297,9 @@ function makeItem(input, row2, col, view, merge2) {
29731
30297
  measured + 2 * PADDING,
29732
30298
  view.hAlign
29733
30299
  );
29734
- item.textLeft = extent.left - x;
29735
- item.textWidth = extent.right - extent.left;
29736
- item.overflowing = extent.startCol !== col || extent.endCol !== col;
30300
+ item.textLeft = extent2.left - x;
30301
+ item.textWidth = extent2.right - extent2.left;
30302
+ item.overflowing = extent2.startCol !== col || extent2.endCol !== col;
29737
30303
  }
29738
30304
  return item;
29739
30305
  }
@@ -29842,9 +30408,9 @@ function createEditBridge() {
29842
30408
  return () => listeners2.delete(listener);
29843
30409
  },
29844
30410
  begin: (options = {}) => driver?.begin(options) ?? false,
29845
- update(text, caret, source) {
30411
+ update(text2, caret, source) {
29846
30412
  if (!state.editing) return;
29847
- state = { ...state, text, caret, source };
30413
+ state = { ...state, text: text2, caret, source };
29848
30414
  driver?.changed(source);
29849
30415
  emit(source);
29850
30416
  },
@@ -30209,18 +30775,18 @@ function activeRef(selection) {
30209
30775
  return formatAddress(selection.active);
30210
30776
  }
30211
30777
  function parseSelectionRef(ref, workbook) {
30212
- let text = ref.trim();
30778
+ let text2 = ref.trim();
30213
30779
  let sheet;
30214
- const bang = text.lastIndexOf("!");
30780
+ const bang = text2.lastIndexOf("!");
30215
30781
  if (bang > 0) {
30216
- const name = text.slice(0, bang).replace(/^'(.*)'$/, "$1").replace(/''/g, "'");
30782
+ const name = text2.slice(0, bang).replace(/^'(.*)'$/, "$1").replace(/''/g, "'");
30217
30783
  const index2 = workbook?.sheets.findIndex((item) => item.name.toLowerCase() === name.toLowerCase()) ?? -1;
30218
30784
  if (index2 < 0) return void 0;
30219
30785
  sheet = index2;
30220
- text = text.slice(bang + 1);
30786
+ text2 = text2.slice(bang + 1);
30221
30787
  }
30222
30788
  const ranges = [];
30223
- for (const part of text.split(",")) {
30789
+ for (const part of text2.split(",")) {
30224
30790
  const range2 = parseRange(part.trim());
30225
30791
  if (!range2) return void 0;
30226
30792
  ranges.push(range2);
@@ -30386,7 +30952,7 @@ var CellViewCache = class {
30386
30952
  let result2 = null;
30387
30953
  if (workbook && sheet) {
30388
30954
  const stored = getCell(sheet, row2, col);
30389
- const plain2 = !stored && effectiveStyleId(sheet, row2, col) === 0 && !cfCovers(sheet, row2, col);
30955
+ const plain2 = !stored && effectiveStyleId(sheet, row2, col) === 0 && !cfCovers(sheet, row2, col) && !hasSparklineAt(sheet, row2, col);
30390
30956
  if (!plain2) {
30391
30957
  const view = cellView(workbook, this.#source.sheetIndex(), row2, col, this.#evaluator());
30392
30958
  result2 = isBlankView(view) ? null : view;
@@ -30449,6 +31015,7 @@ var ICON_PATHS = {
30449
31015
  link: "M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1 M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1",
30450
31016
  comment: "M4 5h16v11H10l-4 4v-4H4z M8 9h8 M8 12h5",
30451
31017
  comments: "M3 4h13v9H9l-3 3v-3H3z M9 17h6l3 3v-3h3V8h-3",
31018
+ share: "M14 4l6 6-6 6M20 10h-8a8 8 0 0 0-8 8",
30452
31019
  deleteComment: "M4 5h16v11H10l-4 4v-4H4z M9 8.5l5 5 M14 8.5l-5 5",
30453
31020
  previous: "M6 14l6-6 6 6",
30454
31021
  next: "M6 10l6 6 6-6",
@@ -31009,6 +31576,7 @@ exports.hasBorders = hasBorders;
31009
31576
  exports.hasWorkbook = hasWorkbook;
31010
31577
  exports.hashes = hashes;
31011
31578
  exports.helpTab = helpTab;
31579
+ exports.historyOf = historyOf;
31012
31580
  exports.icon = icon;
31013
31581
  exports.iconCount = iconCount;
31014
31582
  exports.iconSetRule = iconSetRule;