ooxml-core 1.50.2 → 1.51.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. package/README.md +11 -0
  2. package/dist/{PptxHandler-PVQW47CY.mjs → PptxHandler-6GRVJRHP.mjs} +2 -2
  3. package/dist/PptxHandler-E6QYPF7X.mjs +8 -0
  4. package/dist/PptxHandler-UNQVCIGM.cjs +17 -0
  5. package/dist/PresentationBuilder-DVDJSV5R.mjs +8 -0
  6. package/dist/PresentationBuilder-F5UWRF6H.cjs +25 -0
  7. package/dist/{PresentationBuilder-ZOOVSBPR.mjs → PresentationBuilder-T6YKWPF7.mjs} +2 -2
  8. package/dist/automation/index.cjs +5806 -4494
  9. package/dist/automation/index.mjs +5806 -4494
  10. package/dist/chunk-25IJEN7R.cjs +36 -0
  11. package/dist/chunk-25JN3ZQM.mjs +58 -0
  12. package/dist/{chunk-7XYVFUB3.cjs → chunk-2IO523MM.cjs} +1 -0
  13. package/dist/{chunk-53KMIHYN.mjs → chunk-4LUZHBTT.mjs} +83 -31
  14. package/dist/chunk-554UZLPS.mjs +237 -0
  15. package/dist/{chunk-VLKUMQGT.mjs → chunk-63RAF3TS.mjs} +1 -1
  16. package/dist/{chunk-7UM5IFPR.mjs → chunk-6IUYKP77.mjs} +1 -1
  17. package/dist/{chunk-VK2G4BGX.mjs → chunk-BIMV5FVL.mjs} +481 -193
  18. package/dist/{chunk-CODMW5KF.cjs → chunk-CVUMILG3.cjs} +1 -0
  19. package/dist/{chunk-NBMXEVHL.mjs → chunk-FX6WL42B.mjs} +1 -0
  20. package/dist/chunk-GI4Y6BBX.mjs +21 -0
  21. package/dist/{chunk-MX2GFMZS.mjs → chunk-GZL4ERW3.mjs} +1 -1
  22. package/dist/chunk-HWL2AGLD.cjs +98 -0
  23. package/dist/chunk-HZAB3YDO.cjs +234 -0
  24. package/dist/chunk-IDATIFCG.mjs +226 -0
  25. package/dist/chunk-LO55N7VL.cjs +247 -0
  26. package/dist/{chunk-FFLU4LUQ.cjs → chunk-LUBPW5NP.cjs} +1629 -1609
  27. package/dist/chunk-MUNEIE2J.cjs +62 -0
  28. package/dist/{chunk-ZCKEKP7N.mjs → chunk-RYUADJV6.mjs} +4 -4
  29. package/dist/chunk-TOBK5FC4.mjs +88 -0
  30. package/dist/chunk-UV4LMGVZ.mjs +31 -0
  31. package/dist/{chunk-O3YGBYGZ.mjs → chunk-VRVHM6TJ.mjs} +1 -0
  32. package/dist/chunk-W7LVJC32.cjs +25 -0
  33. package/dist/chunk-WAZ7T2BL.cjs +169 -0
  34. package/dist/{chunk-3OKY56UM.mjs → chunk-YX33WEKS.mjs} +411 -391
  35. package/dist/docx/auto-number-fields.d.ts +22 -0
  36. package/dist/docx/auto-number-fields.d.ts.map +1 -0
  37. package/dist/docx/block-parser.d.ts.map +1 -1
  38. package/dist/docx/character-styles.d.ts.map +1 -1
  39. package/dist/docx/clipboard/css.d.ts +21 -0
  40. package/dist/docx/clipboard/css.d.ts.map +1 -0
  41. package/dist/docx/clipboard/html-tokens.d.ts +38 -0
  42. package/dist/docx/clipboard/html-tokens.d.ts.map +1 -0
  43. package/dist/docx/clipboard/index.d.ts +6 -0
  44. package/dist/docx/clipboard/index.d.ts.map +1 -0
  45. package/dist/docx/clipboard/word-fields.d.ts +13 -0
  46. package/dist/docx/clipboard/word-fields.d.ts.map +1 -0
  47. package/dist/docx/clipboard/word-fragment.d.ts +14 -0
  48. package/dist/docx/clipboard/word-fragment.d.ts.map +1 -0
  49. package/dist/docx/clipboard/word-html.d.ts +22 -0
  50. package/dist/docx/clipboard/word-html.d.ts.map +1 -0
  51. package/dist/docx/clipboard/word-list-scan.d.ts +25 -0
  52. package/dist/docx/clipboard/word-list-scan.d.ts.map +1 -0
  53. package/dist/docx/clipboard/word-lists.d.ts +13 -0
  54. package/dist/docx/clipboard/word-lists.d.ts.map +1 -0
  55. package/dist/docx/clipboard/word-runs.d.ts +18 -0
  56. package/dist/docx/clipboard/word-runs.d.ts.map +1 -0
  57. package/dist/docx/clipboard/word-styles.d.ts +35 -0
  58. package/dist/docx/clipboard/word-styles.d.ts.map +1 -0
  59. package/dist/docx/compare/build.d.ts +48 -0
  60. package/dist/docx/compare/build.d.ts.map +1 -0
  61. package/dist/docx/compare/compare.d.ts +18 -0
  62. package/dist/docx/compare/compare.d.ts.map +1 -0
  63. package/dist/docx/compare/context.d.ts +42 -0
  64. package/dist/docx/compare/context.d.ts.map +1 -0
  65. package/dist/docx/compare/diff.d.ts +20 -0
  66. package/dist/docx/compare/diff.d.ts.map +1 -0
  67. package/dist/docx/compare/index.d.ts +4 -0
  68. package/dist/docx/compare/index.d.ts.map +1 -0
  69. package/dist/docx/compare/slide.d.ts +9 -0
  70. package/dist/docx/compare/slide.d.ts.map +1 -0
  71. package/dist/docx/compare/spans.d.ts +13 -0
  72. package/dist/docx/compare/spans.d.ts.map +1 -0
  73. package/dist/docx/compare/story.d.ts +7 -0
  74. package/dist/docx/compare/story.d.ts.map +1 -0
  75. package/dist/docx/compare/table.d.ts +23 -0
  76. package/dist/docx/compare/table.d.ts.map +1 -0
  77. package/dist/docx/compare/tokens.d.ts +50 -0
  78. package/dist/docx/compare/tokens.d.ts.map +1 -0
  79. package/dist/docx/compare/types.d.ts +51 -0
  80. package/dist/docx/compare/types.d.ts.map +1 -0
  81. package/dist/docx/compatibility.d.ts +46 -0
  82. package/dist/docx/compatibility.d.ts.map +1 -0
  83. package/dist/docx/computed-fields.d.ts +39 -0
  84. package/dist/docx/computed-fields.d.ts.map +1 -0
  85. package/dist/docx/doc-property-field.d.ts +17 -0
  86. package/dist/docx/doc-property-field.d.ts.map +1 -0
  87. package/dist/docx/document-parts.d.ts +2 -0
  88. package/dist/docx/document-parts.d.ts.map +1 -1
  89. package/dist/docx/drawing-wrap.d.ts +21 -0
  90. package/dist/docx/drawing-wrap.d.ts.map +1 -0
  91. package/dist/docx/drawing.d.ts.map +1 -1
  92. package/dist/docx/embedded.cjs +3965 -2313
  93. package/dist/docx/embedded.mjs +3965 -2313
  94. package/dist/docx/field-format.d.ts +45 -0
  95. package/dist/docx/field-format.d.ts.map +1 -0
  96. package/dist/docx/field-result-spans.d.ts +62 -0
  97. package/dist/docx/field-result-spans.d.ts.map +1 -0
  98. package/dist/docx/field-runs.d.ts.map +1 -1
  99. package/dist/docx/field-stories.d.ts +9 -0
  100. package/dist/docx/field-stories.d.ts.map +1 -0
  101. package/dist/docx/find-stories.d.ts +27 -0
  102. package/dist/docx/find-stories.d.ts.map +1 -0
  103. package/dist/docx/highlight.d.ts +19 -0
  104. package/dist/docx/highlight.d.ts.map +1 -1
  105. package/dist/docx/hyperlink.d.ts +7 -0
  106. package/dist/docx/hyperlink.d.ts.map +1 -1
  107. package/dist/docx/index.cjs +7359 -3476
  108. package/dist/docx/index.d.ts +13 -1
  109. package/dist/docx/index.d.ts.map +1 -1
  110. package/dist/docx/index.mjs +7327 -3476
  111. package/dist/docx/inline-model.d.ts +21 -0
  112. package/dist/docx/inline-model.d.ts.map +1 -1
  113. package/dist/docx/inline-slots.d.ts.map +1 -1
  114. package/dist/docx/inspect-document.d.ts +21 -0
  115. package/dist/docx/inspect-document.d.ts.map +1 -0
  116. package/dist/docx/kinsoku-settings.d.ts +9 -0
  117. package/dist/docx/kinsoku-settings.d.ts.map +1 -0
  118. package/dist/docx/layout/adapt-table-floating.d.ts +11 -0
  119. package/dist/docx/layout/adapt-table-floating.d.ts.map +1 -0
  120. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  121. package/dist/docx/layout/adapter.d.ts.map +1 -1
  122. package/dist/docx/layout/computed-field-runs.d.ts +8 -0
  123. package/dist/docx/layout/computed-field-runs.d.ts.map +1 -0
  124. package/dist/docx/layout/floats.d.ts +3 -1
  125. package/dist/docx/layout/floats.d.ts.map +1 -1
  126. package/dist/docx/layout/flow-floating-table.d.ts +13 -0
  127. package/dist/docx/layout/flow-floating-table.d.ts.map +1 -0
  128. package/dist/docx/layout/flow-table.d.ts +1 -1
  129. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  130. package/dist/docx/layout/index.cjs +2280 -941
  131. package/dist/docx/layout/index.mjs +2276 -942
  132. package/dist/docx/layout/input.d.ts +50 -0
  133. package/dist/docx/layout/input.d.ts.map +1 -1
  134. package/dist/docx/layout/layout.d.ts.map +1 -1
  135. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  136. package/dist/docx/layout/page-flow.d.ts.map +1 -1
  137. package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
  138. package/dist/docx/layout/paragraph-tokens.d.ts +6 -0
  139. package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
  140. package/dist/docx/layout/result.d.ts +12 -0
  141. package/dist/docx/layout/result.d.ts.map +1 -1
  142. package/dist/docx/layout/section-flow.d.ts.map +1 -1
  143. package/dist/docx/layout/table-autofit-distribute.d.ts +18 -0
  144. package/dist/docx/layout/table-autofit-distribute.d.ts.map +1 -0
  145. package/dist/docx/layout/table-autofit-measure.d.ts +15 -0
  146. package/dist/docx/layout/table-autofit-measure.d.ts.map +1 -0
  147. package/dist/docx/layout/table-autofit.d.ts +10 -0
  148. package/dist/docx/layout/table-autofit.d.ts.map +1 -0
  149. package/dist/docx/layout/table-cell-layout.d.ts.map +1 -1
  150. package/dist/docx/layout/text-breaks.d.ts +38 -13
  151. package/dist/docx/layout/text-breaks.d.ts.map +1 -1
  152. package/dist/docx/layout/wrap.d.ts +1 -1
  153. package/dist/docx/layout/wrap.d.ts.map +1 -1
  154. package/dist/docx/list-number-fields.d.ts +25 -0
  155. package/dist/docx/list-number-fields.d.ts.map +1 -0
  156. package/dist/docx/load/index.cjs +4355 -2703
  157. package/dist/docx/load/index.mjs +4355 -2703
  158. package/dist/docx/model-paragraph.d.ts +12 -1
  159. package/dist/docx/model-paragraph.d.ts.map +1 -1
  160. package/dist/docx/model.d.ts +26 -1
  161. package/dist/docx/model.d.ts.map +1 -1
  162. package/dist/docx/note-convert.d.ts +45 -0
  163. package/dist/docx/note-convert.d.ts.map +1 -0
  164. package/dist/docx/numbering-counters.d.ts +17 -0
  165. package/dist/docx/numbering-counters.d.ts.map +1 -0
  166. package/dist/docx/numbering-format.d.ts +11 -2
  167. package/dist/docx/numbering-format.d.ts.map +1 -1
  168. package/dist/docx/outline-numbering.d.ts +6 -0
  169. package/dist/docx/outline-numbering.d.ts.map +1 -0
  170. package/dist/docx/package-information-save.d.ts +9 -0
  171. package/dist/docx/package-information-save.d.ts.map +1 -0
  172. package/dist/docx/package-information.d.ts +43 -0
  173. package/dist/docx/package-information.d.ts.map +1 -0
  174. package/dist/docx/package-properties.d.ts +5 -0
  175. package/dist/docx/package-properties.d.ts.map +1 -0
  176. package/dist/docx/paragraph-styles.d.ts +2 -0
  177. package/dist/docx/paragraph-styles.d.ts.map +1 -1
  178. package/dist/docx/parse-revisions.d.ts +2 -0
  179. package/dist/docx/parse-revisions.d.ts.map +1 -1
  180. package/dist/docx/parse-table-floating.d.ts +5 -0
  181. package/dist/docx/parse-table-floating.d.ts.map +1 -0
  182. package/dist/docx/parse-table.d.ts.map +1 -1
  183. package/dist/docx/parse.d.ts.map +1 -1
  184. package/dist/docx/part-relationships.d.ts.map +1 -1
  185. package/dist/docx/personal-information.d.ts +18 -0
  186. package/dist/docx/personal-information.d.ts.map +1 -0
  187. package/dist/docx/picture-crop-edit.d.ts +18 -0
  188. package/dist/docx/picture-crop-edit.d.ts.map +1 -0
  189. package/dist/docx/picture-watermark.d.ts +29 -0
  190. package/dist/docx/picture-watermark.d.ts.map +1 -0
  191. package/dist/docx/relationship-allocator.d.ts.map +1 -1
  192. package/dist/docx/remove-document-information.d.ts +8 -0
  193. package/dist/docx/remove-document-information.d.ts.map +1 -0
  194. package/dist/docx/revision-commands.d.ts +6 -1
  195. package/dist/docx/revision-commands.d.ts.map +1 -1
  196. package/dist/docx/revision-ids.d.ts.map +1 -1
  197. package/dist/docx/run-language.d.ts +9 -0
  198. package/dist/docx/run-language.d.ts.map +1 -0
  199. package/dist/docx/run-properties-snapshot.d.ts +9 -0
  200. package/dist/docx/run-properties-snapshot.d.ts.map +1 -0
  201. package/dist/docx/run-style-model.d.ts +4 -0
  202. package/dist/docx/run-style-model.d.ts.map +1 -1
  203. package/dist/docx/save-modified.d.ts +2 -1
  204. package/dist/docx/save-modified.d.ts.map +1 -1
  205. package/dist/docx/save.d.ts.map +1 -1
  206. package/dist/docx/style-ref-fields.d.ts +1 -8
  207. package/dist/docx/style-ref-fields.d.ts.map +1 -1
  208. package/dist/docx/symbol-field.d.ts +21 -0
  209. package/dist/docx/symbol-field.d.ts.map +1 -0
  210. package/dist/docx/table-cell-write.d.ts.map +1 -1
  211. package/dist/docx/table-defaults.d.ts +2 -0
  212. package/dist/docx/table-defaults.d.ts.map +1 -1
  213. package/dist/docx/table-margins.d.ts +18 -0
  214. package/dist/docx/table-margins.d.ts.map +1 -0
  215. package/dist/docx/table-model.d.ts +23 -0
  216. package/dist/docx/table-model.d.ts.map +1 -1
  217. package/dist/docx/table-structure-check.d.ts.map +1 -1
  218. package/dist/docx/table-styles.d.ts.map +1 -1
  219. package/dist/docx/ui/index.cjs +787 -435
  220. package/dist/docx/ui/index.d.ts +1 -0
  221. package/dist/docx/ui/index.d.ts.map +1 -1
  222. package/dist/docx/ui/index.mjs +784 -436
  223. package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
  224. package/dist/docx/ui/paragraph-attributes.d.ts +6 -0
  225. package/dist/docx/ui/paragraph-attributes.d.ts.map +1 -1
  226. package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
  227. package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
  228. package/dist/docx/ui/ribbon-legacy-labels.d.ts +1 -1
  229. package/dist/docx/ui/ribbon-legacy-labels.d.ts.map +1 -1
  230. package/dist/docx/ui/run-adapter.d.ts.map +1 -1
  231. package/dist/docx/ui/schema-marks.d.ts +2 -19
  232. package/dist/docx/ui/schema-marks.d.ts.map +1 -1
  233. package/dist/docx/ui/track-run-formatting.d.ts.map +1 -1
  234. package/dist/docx/ui/yjs-document-attributes.d.ts +5 -0
  235. package/dist/docx/ui/yjs-document-attributes.d.ts.map +1 -1
  236. package/dist/docx/write-drawing-wrap.d.ts +22 -0
  237. package/dist/docx/write-drawing-wrap.d.ts.map +1 -0
  238. package/dist/docx/write-drawing.d.ts.map +1 -1
  239. package/dist/docx/write-revisions.d.ts +3 -1
  240. package/dist/docx/write-revisions.d.ts.map +1 -1
  241. package/dist/docx/write-shape.d.ts.map +1 -1
  242. package/dist/docx/write-table-properties.d.ts.map +1 -1
  243. package/dist/docx/write.d.ts.map +1 -1
  244. package/dist/drawingml/html-text-paste.d.ts +28 -0
  245. package/dist/drawingml/html-text-paste.d.ts.map +1 -0
  246. package/dist/drawingml/html-text-style.d.ts +18 -0
  247. package/dist/drawingml/html-text-style.d.ts.map +1 -0
  248. package/dist/drawingml/index.cjs +762 -0
  249. package/dist/drawingml/index.d.ts +1 -0
  250. package/dist/drawingml/index.d.ts.map +1 -1
  251. package/dist/drawingml/index.mjs +760 -1
  252. package/dist/index.cjs +1237 -285
  253. package/dist/index.mjs +1237 -285
  254. package/dist/pptx/automation/index.cjs +561 -180
  255. package/dist/pptx/automation/index.d.ts +4 -4
  256. package/dist/pptx/automation/index.mjs +6 -5
  257. package/dist/pptx/chunks/{index-BCy58n13.d.ts → index-8ZfPndYR.d.ts} +2 -2
  258. package/dist/pptx/chunks/{index-BCy58n13.d.ts.map → index-8ZfPndYR.d.ts.map} +1 -1
  259. package/dist/pptx/chunks/{index-OwiX5IVw.d.ts → index-DVhD9Kd5.d.ts} +4 -4
  260. package/dist/pptx/chunks/{index-OwiX5IVw.d.ts.map → index-DVhD9Kd5.d.ts.map} +1 -1
  261. package/dist/pptx/chunks/{index-oQHWAO7M.d.ts → index-DsUnUj-V.d.ts} +5 -5
  262. package/dist/pptx/chunks/{index-oQHWAO7M.d.ts.map → index-DsUnUj-V.d.ts.map} +1 -1
  263. package/dist/pptx/chunks/{index-AZN38e6S.d.ts → index-xB7MDLI7.d.ts} +4 -4
  264. package/dist/pptx/chunks/{index-AZN38e6S.d.ts.map → index-xB7MDLI7.d.ts.map} +1 -1
  265. package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts → presentation-BvnVkFPJ.d.ts} +26 -2
  266. package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts.map → presentation-BvnVkFPJ.d.ts.map} +1 -1
  267. package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts → text-operations-D7TCPhlv.d.ts} +2 -2
  268. package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts.map → text-operations-D7TCPhlv.d.ts.map} +1 -1
  269. package/dist/pptx/cli/index.cjs +504 -124
  270. package/dist/pptx/cli/index.d.ts +1 -1
  271. package/dist/pptx/cli/index.mjs +4 -4
  272. package/dist/pptx/converter/index.d.ts +1 -1
  273. package/dist/pptx/converter/index.mjs +2 -2
  274. package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
  275. package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
  276. package/dist/pptx/editor/render/find-replace.cjs +16 -15
  277. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  278. package/dist/pptx/editor/render/find-replace.mjs +3 -2
  279. package/dist/pptx/editor/render/font-family-update.d.ts +2 -2
  280. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +2 -2
  281. package/dist/pptx/editor/render/segments-text-edit.cjs +159 -0
  282. package/dist/pptx/editor/render/segments-text-edit.d.ts +26 -0
  283. package/dist/pptx/editor/render/segments-text-edit.d.ts.map +1 -0
  284. package/dist/pptx/editor/render/segments-text-edit.mjs +156 -0
  285. package/dist/pptx/editor/render/slide-operations.cjs +12 -9
  286. package/dist/pptx/editor/render/slide-operations.mjs +6 -3
  287. package/dist/pptx/editor/render/table-cell-edit.cjs +5 -5
  288. package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
  289. package/dist/pptx/editor/render/table-cell-edit.mjs +1 -1
  290. package/dist/pptx/editor/render/table-cell-merge.cjs +3 -3
  291. package/dist/pptx/editor/render/table-cell-merge.mjs +1 -1
  292. package/dist/pptx/editor/render/table-cell-rich-text.cjs +41 -0
  293. package/dist/pptx/editor/render/table-cell-rich-text.d.ts +50 -0
  294. package/dist/pptx/editor/render/table-cell-rich-text.d.ts.map +1 -0
  295. package/dist/pptx/editor/render/table-cell-rich-text.mjs +8 -0
  296. package/dist/pptx/editor/render/table-cell-source.cjs +23 -0
  297. package/dist/pptx/editor/render/table-cell-source.d.ts +31 -0
  298. package/dist/pptx/editor/render/table-cell-source.d.ts.map +1 -0
  299. package/dist/pptx/editor/render/table-cell-source.mjs +6 -0
  300. package/dist/pptx/editor/render/table-cells-text-style.cjs +116 -0
  301. package/dist/pptx/editor/render/table-cells-text-style.d.ts +37 -0
  302. package/dist/pptx/editor/render/table-cells-text-style.d.ts.map +1 -0
  303. package/dist/pptx/editor/render/table-cells-text-style.mjs +113 -0
  304. package/dist/pptx/editor/render/table-data-grid-ops.cjs +40 -94
  305. package/dist/pptx/editor/render/table-data-grid-ops.mjs +3 -88
  306. package/dist/pptx/editor/render/table-grid-fill.cjs +30 -0
  307. package/dist/pptx/editor/render/table-grid-fill.d.ts +34 -0
  308. package/dist/pptx/editor/render/table-grid-fill.d.ts.map +1 -0
  309. package/dist/pptx/editor/render/table-grid-fill.mjs +28 -0
  310. package/dist/pptx/editor/render/table-layout.cjs +6 -6
  311. package/dist/pptx/editor/render/table-layout.d.ts +2 -2
  312. package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
  313. package/dist/pptx/editor/render/table-layout.mjs +1 -1
  314. package/dist/pptx/editor/render/table-merge.cjs +5 -5
  315. package/dist/pptx/editor/render/table-merge.mjs +1 -1
  316. package/dist/pptx/editor/render/text-content-style.d.ts +2 -2
  317. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
  318. package/dist/pptx/editor/render/text-style-scope.d.ts +2 -2
  319. package/dist/pptx/editor/render/update-text-segment-style.d.ts +2 -2
  320. package/dist/pptx/index.cjs +519 -201
  321. package/dist/pptx/index.d.ts +7 -7
  322. package/dist/pptx/index.mjs +5 -5
  323. package/dist/pptx/node/index.d.ts +1 -1
  324. package/dist/pptx/smartart-layouts/index.d.ts +2 -2
  325. package/dist/teams/index.cjs +35 -25
  326. package/dist/teams/index.mjs +35 -25
  327. package/dist/text/complex-breaks.d.ts +24 -0
  328. package/dist/text/complex-breaks.d.ts.map +1 -0
  329. package/dist/text/east-asian.d.ts +32 -0
  330. package/dist/text/east-asian.d.ts.map +1 -0
  331. package/dist/text/html-tokens.d.ts +45 -0
  332. package/dist/text/html-tokens.d.ts.map +1 -0
  333. package/dist/text/index.cjs +567 -96
  334. package/dist/text/index.d.ts +6 -0
  335. package/dist/text/index.d.ts.map +1 -1
  336. package/dist/text/index.mjs +544 -97
  337. package/dist/text/kinsoku.d.ts +55 -0
  338. package/dist/text/kinsoku.d.ts.map +1 -0
  339. package/dist/text/truetype/embedding.d.ts +42 -0
  340. package/dist/text/truetype/embedding.d.ts.map +1 -0
  341. package/dist/text/truetype/glyphless.d.ts +5 -0
  342. package/dist/text/truetype/glyphless.d.ts.map +1 -0
  343. package/dist/text/truetype/sfnt-write.d.ts +10 -0
  344. package/dist/text/truetype/sfnt-write.d.ts.map +1 -0
  345. package/dist/text/truetype/subset.d.ts.map +1 -1
  346. package/dist/text/windows-1252.d.ts +10 -0
  347. package/dist/text/windows-1252.d.ts.map +1 -0
  348. package/dist/xlsx/collab/index.cjs +10 -6
  349. package/dist/xlsx/collab/index.mjs +10 -6
  350. package/dist/xlsx/edit/clipboard-html-parse.d.ts +1 -0
  351. package/dist/xlsx/edit/clipboard-html-parse.d.ts.map +1 -1
  352. package/dist/xlsx/formula/functions/text-convert.d.ts.map +1 -1
  353. package/dist/xlsx/index.cjs +96 -51
  354. package/dist/xlsx/index.mjs +96 -51
  355. package/dist/xlsx/load/index.cjs +10 -6
  356. package/dist/xlsx/load/index.mjs +10 -6
  357. package/dist/xlsx/ui/index.cjs +97 -52
  358. package/dist/xlsx/ui/index.mjs +97 -52
  359. package/package.json +1 -1
  360. package/dist/PptxHandler-72NTA5ZY.cjs +0 -14
  361. package/dist/PptxHandler-O4IJ3TKZ.mjs +0 -5
  362. package/dist/PresentationBuilder-ORM22QGC.mjs +0 -5
  363. package/dist/PresentationBuilder-T2ETYT3L.cjs +0 -22
  364. package/dist/chunk-X4RL5AZ7.cjs +0 -120
  365. package/dist/{chunk-PRGXRAAU.mjs → chunk-4Y76EAKK.mjs} +131 -131
  366. package/dist/{chunk-EN3KSEW5.cjs → chunk-MMULWQOM.cjs} +131 -131
@@ -12492,6 +12492,15 @@ var init_raster_image = __esm({
12492
12492
  }
12493
12493
  });
12494
12494
 
12495
+ // opc/safe-href.ts
12496
+ var OPEN_SCHEMES;
12497
+ var init_safe_href = __esm({
12498
+ "opc/safe-href.ts"() {
12499
+ OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
12500
+ /* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
12501
+ }
12502
+ });
12503
+
12495
12504
  // chart/region-map/value-color-positions.ts
12496
12505
  function schemaPosition(node2, end) {
12497
12506
  for (const kind of ["number", "percent"]) {
@@ -62812,15 +62821,6 @@ var init_clone_part_graph = __esm({
62812
62821
  init_relationships();
62813
62822
  }
62814
62823
  });
62815
-
62816
- // opc/safe-href.ts
62817
- var OPEN_SCHEMES;
62818
- var init_safe_href = __esm({
62819
- "opc/safe-href.ts"() {
62820
- OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
62821
- /* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
62822
- }
62823
- });
62824
62824
  var init_embedded_packages = __esm({
62825
62825
  "opc/embedded-packages.ts"() {
62826
62826
  }
@@ -89270,9 +89270,9 @@ var init_table_cell_fill_border_helpers = __esm({
89270
89270
  });
89271
89271
 
89272
89272
  // pptx/core/core/builders/table-cell-paragraphs.ts
89273
- function sizePt(runProperties3) {
89273
+ function sizePt(runProperties4) {
89274
89274
  const size = Number.parseInt(
89275
- String(runProperties3?.["@_sz"] ?? ""),
89275
+ String(runProperties4?.["@_sz"] ?? ""),
89276
89276
  10
89277
89277
  );
89278
89278
  return Number.isFinite(size) && size > 0 ? size / 100 : void 0;
@@ -89588,9 +89588,9 @@ var init_paragraph_sibling_order = __esm({
89588
89588
  });
89589
89589
 
89590
89590
  // pptx/core/core/builders/table-cell-runs.ts
89591
- function runFontFamily(runProperties3) {
89591
+ function runFontFamily(runProperties4) {
89592
89592
  for (const key2 of ["a:latin", "a:ea", "a:cs"]) {
89593
- const typeface = runProperties3?.[key2]?.["@_typeface"];
89593
+ const typeface = runProperties4?.[key2]?.["@_typeface"];
89594
89594
  const name = String(typeface ?? "").trim();
89595
89595
  if (name) {
89596
89596
  return name;
@@ -89598,45 +89598,45 @@ function runFontFamily(runProperties3) {
89598
89598
  }
89599
89599
  return void 0;
89600
89600
  }
89601
- function runLanguage(runProperties3) {
89602
- return String(runProperties3?.["@_lang"] ?? "").trim() || void 0;
89601
+ function runLanguage(runProperties4) {
89602
+ return String(runProperties4?.["@_lang"] ?? "").trim() || void 0;
89603
89603
  }
89604
- function applyRunProperties(run2, runProperties3, context) {
89605
- if (!runProperties3) {
89604
+ function applyRunProperties(run2, runProperties4, context) {
89605
+ if (!runProperties4) {
89606
89606
  return;
89607
89607
  }
89608
- if (runProperties3["@_b"] === "1") {
89608
+ if (runProperties4["@_b"] === "1") {
89609
89609
  run2.bold = true;
89610
89610
  }
89611
- if (runProperties3["@_i"] === "1") {
89611
+ if (runProperties4["@_i"] === "1") {
89612
89612
  run2.italic = true;
89613
89613
  }
89614
- const underline = runProperties3["@_u"];
89614
+ const underline = runProperties4["@_u"];
89615
89615
  if (underline !== void 0 && underline !== null && String(underline) !== "none") {
89616
89616
  run2.underline = true;
89617
89617
  }
89618
- if (runProperties3["@_strike"] && String(runProperties3["@_strike"]) !== "noStrike") {
89618
+ if (runProperties4["@_strike"] && String(runProperties4["@_strike"]) !== "noStrike") {
89619
89619
  run2.strikethrough = true;
89620
89620
  }
89621
- const size = parseInt(String(runProperties3["@_sz"] ?? ""), 10);
89621
+ const size = parseInt(String(runProperties4["@_sz"] ?? ""), 10);
89622
89622
  if (Number.isFinite(size) && size > 0) {
89623
89623
  run2.fontSize = size / 100;
89624
89624
  }
89625
- if (runProperties3["a:solidFill"]) {
89626
- const color3 = context.parseColor(runProperties3["a:solidFill"]);
89625
+ if (runProperties4["a:solidFill"]) {
89626
+ const color3 = context.parseColor(runProperties4["a:solidFill"]);
89627
89627
  if (color3) {
89628
89628
  run2.color = color3;
89629
89629
  }
89630
89630
  }
89631
- const fontFamily = runFontFamily(runProperties3);
89631
+ const fontFamily = runFontFamily(runProperties4);
89632
89632
  if (fontFamily) {
89633
89633
  run2.fontFamily = fontFamily;
89634
89634
  }
89635
- const baseline = parseInt(String(runProperties3["@_baseline"] ?? ""), 10);
89635
+ const baseline = parseInt(String(runProperties4["@_baseline"] ?? ""), 10);
89636
89636
  if (Number.isFinite(baseline) && baseline !== 0) {
89637
89637
  run2.baseline = baseline;
89638
89638
  }
89639
- const spacing2 = parseInt(String(runProperties3["@_spc"] ?? ""), 10);
89639
+ const spacing2 = parseInt(String(runProperties4["@_spc"] ?? ""), 10);
89640
89640
  if (Number.isFinite(spacing2) && spacing2 !== 0) {
89641
89641
  run2.characterSpacing = spacing2;
89642
89642
  }
@@ -89738,14 +89738,14 @@ function applyCellTextFormat(tableCell, style, context) {
89738
89738
  hasStyle = true;
89739
89739
  }
89740
89740
  const firstRun = context.ensureArray(firstParagraph["a:r"])[0];
89741
- const runProperties3 = firstRun?.["a:rPr"];
89742
- if (!runProperties3) {
89741
+ const runProperties4 = firstRun?.["a:rPr"];
89742
+ if (!runProperties4) {
89743
89743
  if (!hasContent2(tableCell, context)) {
89744
89744
  hasStyle = applyEndParagraphSize(firstParagraph, style) || hasStyle;
89745
89745
  }
89746
89746
  return hasStyle;
89747
89747
  }
89748
- hasStyle = applyRunProperties2(runProperties3, style, context) || hasStyle;
89748
+ hasStyle = applyRunProperties2(runProperties4, style, context) || hasStyle;
89749
89749
  return hasStyle;
89750
89750
  }
89751
89751
  function hasContent2(tableCell, context) {
@@ -89767,26 +89767,26 @@ function applyEndParagraphSize(paragraph2, style) {
89767
89767
  style.fontSize = size / 100;
89768
89768
  return true;
89769
89769
  }
89770
- function applyRunProperties2(runProperties3, style, context) {
89770
+ function applyRunProperties2(runProperties4, style, context) {
89771
89771
  let hasStyle = false;
89772
- if (runProperties3["@_b"] === "1") {
89772
+ if (runProperties4["@_b"] === "1") {
89773
89773
  style.bold = true;
89774
89774
  hasStyle = true;
89775
89775
  }
89776
- if (runProperties3["@_i"] === "1") {
89776
+ if (runProperties4["@_i"] === "1") {
89777
89777
  style.italic = true;
89778
89778
  hasStyle = true;
89779
89779
  }
89780
- if (runProperties3["@_u"] && runProperties3["@_u"] !== "none") {
89780
+ if (runProperties4["@_u"] && runProperties4["@_u"] !== "none") {
89781
89781
  style.underline = true;
89782
89782
  hasStyle = true;
89783
89783
  }
89784
- if (runProperties3["@_sz"]) {
89785
- style.fontSize = parseInt(String(runProperties3["@_sz"]), 10) / 100;
89784
+ if (runProperties4["@_sz"]) {
89785
+ style.fontSize = parseInt(String(runProperties4["@_sz"]), 10) / 100;
89786
89786
  hasStyle = true;
89787
89787
  }
89788
- if (runProperties3["a:solidFill"]) {
89789
- const textColor = context.parseColor(runProperties3["a:solidFill"]);
89788
+ if (runProperties4["a:solidFill"]) {
89789
+ const textColor = context.parseColor(runProperties4["a:solidFill"]);
89790
89790
  if (textColor) {
89791
89791
  style.color = textColor;
89792
89792
  hasStyle = true;
@@ -89794,7 +89794,7 @@ function applyRunProperties2(runProperties3, style, context) {
89794
89794
  }
89795
89795
  for (const key2 of ["a:latin", "a:ea", "a:cs"]) {
89796
89796
  const typeface = String(
89797
- runProperties3[key2]?.["@_typeface"] ?? ""
89797
+ runProperties4[key2]?.["@_typeface"] ?? ""
89798
89798
  ).trim();
89799
89799
  if (typeface) {
89800
89800
  style.fontFamily = typeface;
@@ -89802,11 +89802,11 @@ function applyRunProperties2(runProperties3, style, context) {
89802
89802
  break;
89803
89803
  }
89804
89804
  }
89805
- hasStyle = applyTextEffects(runProperties3, style, context) || hasStyle;
89805
+ hasStyle = applyTextEffects(runProperties4, style, context) || hasStyle;
89806
89806
  return hasStyle;
89807
89807
  }
89808
- function applyTextEffects(runProperties3, style, context) {
89809
- const effectLst = runProperties3["a:effectLst"];
89808
+ function applyTextEffects(runProperties4, style, context) {
89809
+ const effectLst = runProperties4["a:effectLst"];
89810
89810
  if (!effectLst) {
89811
89811
  return false;
89812
89812
  }
@@ -118625,6 +118625,9 @@ function isEotFormat(data) {
118625
118625
  const magic = readUint16LE(data, EOT_MAGIC_OFFSET);
118626
118626
  return magic === EOT_MAGIC;
118627
118627
  }
118628
+ function readEotFsType(data) {
118629
+ return isEotFormat(data) ? readUint16LE(data, 32) : void 0;
118630
+ }
118628
118631
  function parseEotHeader(data) {
118629
118632
  if (!isEotFormat(data)) {
118630
118633
  return null;
@@ -118723,6 +118726,9 @@ var init_eot_parser = __esm({
118723
118726
  });
118724
118727
 
118725
118728
  // pptx/core/utils/deferred-embedded-font.ts
118729
+ function fsTypeField(source2) {
118730
+ return source2.fsType === void 0 ? {} : { fsType: source2.fsType };
118731
+ }
118726
118732
  function resolveEmbeddedFontGuid(source2) {
118727
118733
  if (isEotFormat(source2.originalPartBytes)) {
118728
118734
  return void 0;
@@ -118822,15 +118828,16 @@ function decodeEmbeddedFontPart(source2) {
118822
118828
  partPath,
118823
118829
  fontGuid,
118824
118830
  originalRId: source2.originalRId,
118825
- originalPartBytes
118831
+ originalPartBytes,
118832
+ ...fsTypeField(source2)
118826
118833
  };
118827
118834
  } catch {
118828
118835
  return null;
118829
118836
  }
118830
118837
  }
118831
- function createDeferredEmbeddedFont(source2) {
118838
+ function createDeferredEmbeddedFont(source2, options2 = {}) {
118832
118839
  const fontGuid = resolveEmbeddedFontGuid(source2);
118833
- let fields;
118840
+ let fields = options2.withheld ? { dataUrl: "", format: void 0, rawFontData: void 0 } : void 0;
118834
118841
  let pending;
118835
118842
  const decode3 = () => {
118836
118843
  if (!fields) {
@@ -118868,7 +118875,8 @@ function createDeferredEmbeddedFont(source2) {
118868
118875
  partPath: source2.partPath,
118869
118876
  fontGuid,
118870
118877
  originalRId: source2.originalRId,
118871
- originalPartBytes: source2.originalPartBytes
118878
+ originalPartBytes: source2.originalPartBytes,
118879
+ ...fsTypeField(source2)
118872
118880
  };
118873
118881
  Object.defineProperties(font, {
118874
118882
  load: {
@@ -118880,11 +118888,11 @@ function createDeferredEmbeddedFont(source2) {
118880
118888
  });
118881
118889
  return font;
118882
118890
  }
118891
+ function createWithheldEmbeddedFont(source2) {
118892
+ return createDeferredEmbeddedFont(source2, { withheld: true });
118893
+ }
118883
118894
  function shouldSaveEmbeddedFontVerbatim(font) {
118884
- if (font.isLoaded === void 0 || !font.originalPartBytes?.length) {
118885
- return false;
118886
- }
118887
- if (!font.originalRId || !font.partPath) {
118895
+ if (!font.originalPartBytes?.length || !font.originalRId || !font.partPath) {
118888
118896
  return false;
118889
118897
  }
118890
118898
  return font.isLoaded === false || !font.rawFontData?.length;
@@ -118896,6 +118904,99 @@ var init_deferred_embedded_font = __esm({
118896
118904
  }
118897
118905
  });
118898
118906
 
118907
+ // text/truetype/embedding.ts
118908
+ function embeddingPermission(fsType) {
118909
+ const licence = fsType & EDITABLE ? "editable" : fsType & PREVIEW_PRINT ? "preview-print" : fsType & RESTRICTED ? "restricted" : "installable";
118910
+ return {
118911
+ licence,
118912
+ noSubsetting: (fsType & NO_SUBSETTING) !== 0,
118913
+ bitmapOnly: (fsType & BITMAP_ONLY) !== 0
118914
+ };
118915
+ }
118916
+ function mayDisplayEmbeddedFont(permission) {
118917
+ return permission.licence !== "restricted";
118918
+ }
118919
+ function mayEmbedFontInEditableDocument(permission) {
118920
+ return (permission.licence === "installable" || permission.licence === "editable") && !permission.bitmapOnly;
118921
+ }
118922
+ function readSfntFsType(data, header) {
118923
+ const byte = (offset) => header && offset < header.length ? header[offset] : data[offset];
118924
+ const u16 = (offset) => {
118925
+ const hi = byte(offset);
118926
+ const lo = byte(offset + 1);
118927
+ return hi === void 0 || lo === void 0 ? void 0 : hi << 8 | lo;
118928
+ };
118929
+ const u32 = (offset) => {
118930
+ const hi = u16(offset);
118931
+ const lo = u16(offset + 2);
118932
+ return hi === void 0 || lo === void 0 ? void 0 : hi * 65536 + lo;
118933
+ };
118934
+ let base2 = 0;
118935
+ if (u32(0) === TTC_TAG) {
118936
+ const first2 = u32(12);
118937
+ if (first2 === void 0) return void 0;
118938
+ base2 = first2;
118939
+ }
118940
+ const version2 = u32(base2);
118941
+ if (version2 === void 0 || !SFNT_VERSIONS.has(version2)) return void 0;
118942
+ const numTables = u16(base2 + 4) ?? 0;
118943
+ for (let i2 = 0; i2 < numTables; i2++) {
118944
+ const record3 = base2 + 12 + i2 * 16;
118945
+ const tag = u32(record3);
118946
+ if (tag === void 0) return void 0;
118947
+ if (tag === OS2_TAG) {
118948
+ const offset = u32(record3 + 8);
118949
+ return offset === void 0 ? void 0 : u16(offset + 8);
118950
+ }
118951
+ }
118952
+ return void 0;
118953
+ }
118954
+ var RESTRICTED, PREVIEW_PRINT, EDITABLE, NO_SUBSETTING, BITMAP_ONLY, SFNT_VERSIONS, TTC_TAG, OS2_TAG;
118955
+ var init_embedding = __esm({
118956
+ "text/truetype/embedding.ts"() {
118957
+ RESTRICTED = 2;
118958
+ PREVIEW_PRINT = 4;
118959
+ EDITABLE = 8;
118960
+ NO_SUBSETTING = 256;
118961
+ BITMAP_ONLY = 512;
118962
+ SFNT_VERSIONS = /* @__PURE__ */ new Set([65536, 1330926671, 1953658213]);
118963
+ TTC_TAG = 1953784678;
118964
+ OS2_TAG = 1330851634;
118965
+ }
118966
+ });
118967
+
118968
+ // pptx/core/utils/embedded-font-permission.ts
118969
+ function readEmbeddedFontPartFsType(partBytes, guid3) {
118970
+ const eot = readEotFsType(partBytes);
118971
+ if (eot !== void 0) {
118972
+ return eot;
118973
+ }
118974
+ if (!guid3) {
118975
+ return readSfntFsType(partBytes);
118976
+ }
118977
+ const header = deobfuscateFont(
118978
+ partBytes.subarray(0, Math.min(partBytes.length, OBFUSCATED_HEADER_BYTES)),
118979
+ guid3
118980
+ );
118981
+ return readSfntFsType(partBytes, header);
118982
+ }
118983
+ function mayDisplayFontWithFsType(fsType) {
118984
+ return fsType === void 0 || mayDisplayEmbeddedFont(embeddingPermission(fsType));
118985
+ }
118986
+ function mayNewlyEmbedFontData(font, fontData) {
118987
+ const fsType = readSfntFsType(fontData) ?? font.fsType;
118988
+ return fsType === void 0 || mayEmbedFontInEditableDocument(embeddingPermission(fsType));
118989
+ }
118990
+ var OBFUSCATED_HEADER_BYTES;
118991
+ var init_embedded_font_permission = __esm({
118992
+ "pptx/core/utils/embedded-font-permission.ts"() {
118993
+ init_embedding();
118994
+ init_eot_parser();
118995
+ init_font_deobfuscation();
118996
+ OBFUSCATED_HEADER_BYTES = 32;
118997
+ }
118998
+ });
118999
+
118899
119000
  // pptx/core/core/runtime/header-footer-parts.ts
118900
119001
  function asArray3(value) {
118901
119002
  if (Array.isArray(value)) {
@@ -144800,9 +144901,9 @@ function buildGroupPropertiesXml(rawGroupXml, xfrm) {
144800
144901
  if (!rawProps) {
144801
144902
  return { "a:xfrm": xfrm };
144802
144903
  }
144803
- const clone4 = cloneXmlNode(rawProps);
144804
- delete clone4["a:xfrm"];
144805
- return { "a:xfrm": xfrm, ...clone4 };
144904
+ const clone5 = cloneXmlNode(rawProps);
144905
+ delete clone5["a:xfrm"];
144906
+ return { "a:xfrm": xfrm, ...clone5 };
144806
144907
  }
144807
144908
  function appendGroupChildren2(grpXml2, entries) {
144808
144909
  const extLst = grpXml2["p:extLst"];
@@ -145988,8 +146089,8 @@ var init_PptxHandlerRuntimeTextRunEffects = __esm({
145988
146089
  * Parse hyperlink-related properties (a:hlinkClick, a:hlinkMouseOver) from
145989
146090
  * run-level XML and apply them to the given TextStyle.
145990
146091
  */
145991
- applyHyperlinkStyle(style, runProperties3, relationshipMap) {
145992
- const hyperlinkNode = runProperties3["a:hlinkClick"];
146092
+ applyHyperlinkStyle(style, runProperties4, relationshipMap) {
146093
+ const hyperlinkNode = runProperties4["a:hlinkClick"];
145993
146094
  const hyperlinkRelationshipId = String(
145994
146095
  hyperlinkNode?.["@_r:id"] || hyperlinkNode?.["@_id"] || ""
145995
146096
  ).trim();
@@ -146057,7 +146158,7 @@ var init_PptxHandlerRuntimeTextRunEffects = __esm({
146057
146158
  }
146058
146159
  }
146059
146160
  }
146060
- const hlinkMouseOver = runProperties3["a:hlinkMouseOver"];
146161
+ const hlinkMouseOver = runProperties4["a:hlinkMouseOver"];
146061
146162
  if (hlinkMouseOver) {
146062
146163
  const mouseOverRelId = String(
146063
146164
  hlinkMouseOver["@_r:id"] || hlinkMouseOver["@_id"] || ""
@@ -146305,8 +146406,8 @@ var init_PptxHandlerRuntimeTextRunEffects = __esm({
146305
146406
  * (e.g. `a:outerShdw`, `a:glow`, `a:alphaInv`) is captured opaquely as
146306
146407
  * raw XML so we don't duplicate the entire effect taxonomy here.
146307
146408
  */
146308
- applyTextRunEffectDag(style, runProperties3) {
146309
- const effectDag = runProperties3["a:effectDag"];
146409
+ applyTextRunEffectDag(style, runProperties4) {
146410
+ const effectDag = runProperties4["a:effectDag"];
146310
146411
  if (!effectDag) {
146311
146412
  return;
146312
146413
  }
@@ -146337,28 +146438,28 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
146337
146438
  "a:grpFill"
146338
146439
  ];
146339
146440
  PptxHandlerRuntime19 = class _PptxHandlerRuntime extends PptxHandlerRuntime18 {
146340
- extractTextRunStyle(runProperties3, align, relationshipMap, includeDefaultAlignment = true, slidePath) {
146441
+ extractTextRunStyle(runProperties4, align, relationshipMap, includeDefaultAlignment = true, slidePath) {
146341
146442
  const style = includeDefaultAlignment ? { align } : {};
146342
- if (!runProperties3) {
146443
+ if (!runProperties4) {
146343
146444
  return style;
146344
146445
  }
146345
- if (runProperties3["@_sz"]) {
146346
- const points7 = parseInt(runProperties3["@_sz"]) / 100;
146446
+ if (runProperties4["@_sz"]) {
146447
+ const points7 = parseInt(runProperties4["@_sz"]) / 100;
146347
146448
  style.fontSize = points7 * (96 / 72);
146348
146449
  }
146349
- const bold = this.parseOptionalBooleanAttr(runProperties3["@_b"]);
146450
+ const bold = this.parseOptionalBooleanAttr(runProperties4["@_b"]);
146350
146451
  if (bold !== void 0) {
146351
146452
  style.bold = bold;
146352
146453
  }
146353
- const italic = this.parseOptionalBooleanAttr(runProperties3["@_i"]);
146454
+ const italic = this.parseOptionalBooleanAttr(runProperties4["@_i"]);
146354
146455
  if (italic !== void 0) {
146355
146456
  style.italic = italic;
146356
146457
  }
146357
- if (runProperties3["@_u"] !== void 0) {
146358
- const underlineToken = String(runProperties3["@_u"] || "").trim().toLowerCase();
146458
+ if (runProperties4["@_u"] !== void 0) {
146459
+ const underlineToken = String(runProperties4["@_u"] || "").trim().toLowerCase();
146359
146460
  style.underline = underlineToken.length > 0 && underlineToken !== "none" && underlineToken !== "0" && underlineToken !== "false";
146360
146461
  if (style.underline) {
146361
- const rawU = String(runProperties3["@_u"] || "").trim();
146462
+ const rawU = String(runProperties4["@_u"] || "").trim();
146362
146463
  if (rawU.length > 0 && rawU !== "none") {
146363
146464
  style.underlineStyle = rawU;
146364
146465
  }
@@ -146366,8 +146467,8 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
146366
146467
  style.underlineExplicitNone = true;
146367
146468
  }
146368
146469
  }
146369
- const uFill = runProperties3["a:uFill"];
146370
- const uLn = runProperties3["a:uLn"];
146470
+ const uFill = runProperties4["a:uFill"];
146471
+ const uLn = runProperties4["a:uLn"];
146371
146472
  const underlineColorSource = uFill?.["a:solidFill"] || uLn?.["a:solidFill"];
146372
146473
  if (underlineColorSource) {
146373
146474
  const underlineColor = this.parseColor(underlineColorSource);
@@ -146409,20 +146510,20 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
146409
146510
  style.underlineLine = line2;
146410
146511
  }
146411
146512
  }
146412
- if (runProperties3["a:uLnTx"] !== void 0) {
146513
+ if (runProperties4["a:uLnTx"] !== void 0) {
146413
146514
  style.underlineLineFollowsText = true;
146414
146515
  }
146415
- if (runProperties3["a:uFillTx"] !== void 0) {
146516
+ if (runProperties4["a:uFillTx"] !== void 0) {
146416
146517
  style.underlineFillFollowsText = true;
146417
146518
  }
146418
- if (runProperties3["@_strike"] !== void 0) {
146419
- const strikeToken = String(runProperties3["@_strike"] || "").trim().toLowerCase();
146519
+ if (runProperties4["@_strike"] !== void 0) {
146520
+ const strikeToken = String(runProperties4["@_strike"] || "").trim().toLowerCase();
146420
146521
  style.strikethrough = strikeToken.length > 0 && strikeToken !== "nostrike" && strikeToken !== "none" && strikeToken !== "0" && strikeToken !== "false";
146421
146522
  if (style.strikethrough) {
146422
146523
  style.strikeType = strikeToken === "dblstrike" ? "dblStrike" : "sngStrike";
146423
146524
  }
146424
146525
  }
146425
- const textLn = runProperties3["a:ln"];
146526
+ const textLn = runProperties4["a:ln"];
146426
146527
  if (textLn) {
146427
146528
  const textOutlineW = Number.parseInt(String(textLn["@_w"] || ""), 10);
146428
146529
  if (Number.isFinite(textOutlineW) && textOutlineW > 0) {
@@ -146440,31 +146541,31 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
146440
146541
  }
146441
146542
  }
146442
146543
  }
146443
- if (runProperties3["a:noFill"] !== void 0) {
146544
+ if (runProperties4["a:noFill"] !== void 0) {
146444
146545
  style.textFillNone = true;
146445
- } else if (TEXT_FILL_ELEMENTS.some((name) => runProperties3[name] !== void 0)) {
146546
+ } else if (TEXT_FILL_ELEMENTS.some((name) => runProperties4[name] !== void 0)) {
146446
146547
  style.textFillNone = false;
146447
146548
  }
146448
- if (runProperties3["@_baseline"] !== void 0) {
146449
- const baselineVal = Number.parseInt(String(runProperties3["@_baseline"]), 10);
146549
+ if (runProperties4["@_baseline"] !== void 0) {
146550
+ const baselineVal = Number.parseInt(String(runProperties4["@_baseline"]), 10);
146450
146551
  if (Number.isFinite(baselineVal)) {
146451
146552
  style.baseline = baselineVal;
146452
146553
  }
146453
146554
  }
146454
- if (runProperties3["@_spc"] !== void 0) {
146455
- const spcVal = Number.parseInt(String(runProperties3["@_spc"]), 10);
146555
+ if (runProperties4["@_spc"] !== void 0) {
146556
+ const spcVal = Number.parseInt(String(runProperties4["@_spc"]), 10);
146456
146557
  if (Number.isFinite(spcVal)) {
146457
146558
  style.characterSpacing = spcVal;
146458
146559
  }
146459
146560
  }
146460
- if (runProperties3["@_kern"] !== void 0) {
146461
- const kernVal = Number.parseInt(String(runProperties3["@_kern"]), 10);
146561
+ if (runProperties4["@_kern"] !== void 0) {
146562
+ const kernVal = Number.parseInt(String(runProperties4["@_kern"]), 10);
146462
146563
  if (Number.isFinite(kernVal)) {
146463
146564
  style.kerning = kernVal;
146464
146565
  }
146465
146566
  }
146466
- if (runProperties3["a:highlight"]) {
146467
- const highlightNode = xmlChild(runProperties3, "a:highlight");
146567
+ if (runProperties4["a:highlight"]) {
146568
+ const highlightNode = xmlChild(runProperties4, "a:highlight");
146468
146569
  const highlightHex = this.parseColor(highlightNode);
146469
146570
  if (highlightHex) {
146470
146571
  style.highlightColor = highlightHex;
@@ -146474,7 +146575,7 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
146474
146575
  style.highlightColorXml = highlightXml;
146475
146576
  }
146476
146577
  }
146477
- const textFillVariants = this.extractTextFillVariants(runProperties3);
146578
+ const textFillVariants = this.extractTextFillVariants(runProperties4);
146478
146579
  if (textFillVariants.textFillGradient) {
146479
146580
  style.textFillGradient = textFillVariants.textFillGradient;
146480
146581
  style.textFillGradientStops = textFillVariants.textFillGradientStops;
@@ -146500,14 +146601,14 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
146500
146601
  style.textFillBlipMode = resolved.mode;
146501
146602
  }
146502
146603
  }
146503
- const rtlElement = runProperties3["a:rtl"];
146504
- const runRtl = rtlElement !== void 0 ? this.parseOptionalBooleanAttr(xmlAttr(xmlChild(runProperties3, "a:rtl"), "val")) ?? true : this.parseOptionalBooleanAttr(runProperties3["@_rtl"]);
146604
+ const rtlElement = runProperties4["a:rtl"];
146605
+ const runRtl = rtlElement !== void 0 ? this.parseOptionalBooleanAttr(xmlAttr(xmlChild(runProperties4, "a:rtl"), "val")) ?? true : this.parseOptionalBooleanAttr(runProperties4["@_rtl"]);
146505
146606
  if (runRtl !== void 0) {
146506
146607
  style.rtl = runRtl;
146507
146608
  }
146508
- const latin = xmlChild(runProperties3, "a:latin");
146509
- const eastAsian = xmlChild(runProperties3, "a:ea");
146510
- const complexScript = xmlChild(runProperties3, "a:cs");
146609
+ const latin = xmlChild(runProperties4, "a:latin");
146610
+ const eastAsian = xmlChild(runProperties4, "a:ea");
146611
+ const complexScript = xmlChild(runProperties4, "a:cs");
146511
146612
  const latinTypefaceToken = xmlAttr(latin, "typeface");
146512
146613
  const eaTypefaceToken = xmlAttr(eastAsian, "typeface");
146513
146614
  const csTypefaceToken = xmlAttr(complexScript, "typeface");
@@ -146533,7 +146634,7 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
146533
146634
  if (csTypeface) {
146534
146635
  style.complexScriptFont = csTypeface;
146535
146636
  }
146536
- const solidFill3 = xmlChild(runProperties3, "a:solidFill");
146637
+ const solidFill3 = xmlChild(runProperties4, "a:solidFill");
146537
146638
  if (solidFill3) {
146538
146639
  style.color = this.parseColor(solidFill3);
146539
146640
  const colorXml2 = extractColorChoiceXml(solidFill3);
@@ -146545,59 +146646,59 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
146545
146646
  style.colorRef = colorRef;
146546
146647
  }
146547
146648
  }
146548
- this.applyHyperlinkStyle(style, runProperties3, relationshipMap);
146549
- const capAttr = String(runProperties3["@_cap"] || "").trim().toLowerCase();
146649
+ this.applyHyperlinkStyle(style, runProperties4, relationshipMap);
146650
+ const capAttr = String(runProperties4["@_cap"] || "").trim().toLowerCase();
146550
146651
  if (capAttr === "all" || capAttr === "small") {
146551
146652
  style.textCaps = capAttr;
146552
146653
  } else if (capAttr === "none") {
146553
146654
  style.textCaps = "none";
146554
146655
  style.textCapsExplicitNone = true;
146555
146656
  }
146556
- const symNode = xmlChild(runProperties3, "a:sym");
146657
+ const symNode = xmlChild(runProperties4, "a:sym");
146557
146658
  if (symNode) {
146558
146659
  const symTypeface = this.normalizeTypefaceToken(xmlAttr(symNode, "typeface") || "");
146559
146660
  if (symTypeface) {
146560
146661
  style.symbolFont = symTypeface;
146561
146662
  }
146562
146663
  }
146563
- const langAttr = String(runProperties3["@_lang"] || "").trim();
146664
+ const langAttr = String(runProperties4["@_lang"] || "").trim();
146564
146665
  if (langAttr) {
146565
146666
  style.language = langAttr;
146566
146667
  }
146567
- const kumimoji = this.parseOptionalBooleanAttr(runProperties3["@_kumimoji"]);
146668
+ const kumimoji = this.parseOptionalBooleanAttr(runProperties4["@_kumimoji"]);
146568
146669
  if (kumimoji !== void 0) {
146569
146670
  style.kumimoji = kumimoji;
146570
146671
  }
146571
- const normalizeH = this.parseOptionalBooleanAttr(runProperties3["@_normalizeH"]);
146672
+ const normalizeH = this.parseOptionalBooleanAttr(runProperties4["@_normalizeH"]);
146572
146673
  if (normalizeH !== void 0) {
146573
146674
  style.normalizeHeight = normalizeH;
146574
146675
  }
146575
- const noProof = this.parseOptionalBooleanAttr(runProperties3["@_noProof"]);
146676
+ const noProof = this.parseOptionalBooleanAttr(runProperties4["@_noProof"]);
146576
146677
  if (noProof !== void 0) {
146577
146678
  style.noProof = noProof;
146578
146679
  }
146579
- const dirty = this.parseOptionalBooleanAttr(runProperties3["@_dirty"]);
146680
+ const dirty = this.parseOptionalBooleanAttr(runProperties4["@_dirty"]);
146580
146681
  if (dirty !== void 0) {
146581
146682
  style.dirty = dirty;
146582
146683
  }
146583
- const err = this.parseOptionalBooleanAttr(runProperties3["@_err"]);
146684
+ const err = this.parseOptionalBooleanAttr(runProperties4["@_err"]);
146584
146685
  if (err !== void 0) {
146585
146686
  style.spellingError = err;
146586
146687
  }
146587
- const smtClean = this.parseOptionalBooleanAttr(runProperties3["@_smtClean"]);
146688
+ const smtClean = this.parseOptionalBooleanAttr(runProperties4["@_smtClean"]);
146588
146689
  if (smtClean !== void 0) {
146589
146690
  style.smartTagClean = smtClean;
146590
146691
  }
146591
- const bmk = String(runProperties3["@_bmk"] || "").trim();
146692
+ const bmk = String(runProperties4["@_bmk"] || "").trim();
146592
146693
  if (bmk) {
146593
146694
  style.bookmark = bmk;
146594
146695
  }
146595
- const altLang = String(runProperties3["@_altLang"] || "").trim();
146696
+ const altLang = String(runProperties4["@_altLang"] || "").trim();
146596
146697
  if (altLang) {
146597
146698
  style.altLanguage = altLang;
146598
146699
  }
146599
- if (runProperties3["@_smtId"] !== void 0) {
146600
- const smtIdRaw = Number.parseInt(String(runProperties3["@_smtId"]), 10);
146700
+ if (runProperties4["@_smtId"] !== void 0) {
146701
+ const smtIdRaw = Number.parseInt(String(runProperties4["@_smtId"]), 10);
146601
146702
  if (Number.isFinite(smtIdRaw)) {
146602
146703
  style.smartTagId = smtIdRaw;
146603
146704
  }
@@ -146606,16 +146707,16 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
146606
146707
  this.applyTextFontMetadata(style, eastAsian, "eastAsia");
146607
146708
  this.applyTextFontMetadata(style, complexScript, "complexScript");
146608
146709
  this.applyTextFontMetadata(style, symNode, "symbol");
146609
- const runEffectList = runProperties3["a:effectLst"];
146710
+ const runEffectList = runProperties4["a:effectLst"];
146610
146711
  if (runEffectList && typeof runEffectList === "object") {
146611
146712
  this.applyTextRunEffects(style, runEffectList);
146612
146713
  }
146613
146714
  if (includeDefaultAlignment && runEffectList !== void 0 && (typeof runEffectList !== "object" || Object.keys(runEffectList).length === 0)) {
146614
146715
  style.textEffectsExplicitNone = true;
146615
146716
  }
146616
- this.applyTextRunEffectDag(style, runProperties3);
146717
+ this.applyTextRunEffectDag(style, runProperties4);
146617
146718
  if (includeDefaultAlignment) {
146618
- const runExtLst = runProperties3["a:extLst"];
146719
+ const runExtLst = runProperties4["a:extLst"];
146619
146720
  if (runExtLst && typeof runExtLst === "object") {
146620
146721
  style.runPropertiesExtLstXml = runExtLst;
146621
146722
  }
@@ -146733,7 +146834,7 @@ var init_PptxHandlerRuntimeTextEditing = __esm({
146733
146834
  authoredRunStyle: authored,
146734
146835
  inheritedRunStyle: paragraphDefaultStyle
146735
146836
  });
146736
- const appendRunSegment = (value, runProperties3) => {
146837
+ const appendRunSegment = (value, runProperties4) => {
146737
146838
  if (value === void 0 || value === null) {
146738
146839
  return;
146739
146840
  }
@@ -146742,7 +146843,7 @@ var init_PptxHandlerRuntimeTextEditing = __esm({
146742
146843
  return;
146743
146844
  }
146744
146845
  const runStyle2 = withAuthoredSplit(
146745
- this.extractTextRunStyle(runProperties3, paragraphAlign, relationshipMap)
146846
+ this.extractTextRunStyle(runProperties4, paragraphAlign, relationshipMap)
146746
146847
  );
146747
146848
  segments.push({
146748
146849
  text: runText2,
@@ -147651,7 +147752,7 @@ var init_PptxHandlerRuntimeSaveTableStyles = __esm({
147651
147752
  * `paragraphs` gives each paragraph's own alignment; without it only the
147652
147753
  * first paragraph takes the cell's.
147653
147754
  */
147654
- writeTableCellStyle(xmlCell, style, paragraphs) {
147755
+ writeTableCellStyle(xmlCell, style, paragraphs, runsCarryFormatting = false) {
147655
147756
  const rawTcPr = xmlCell["a:tcPr"];
147656
147757
  const existingTcPr = rawTcPr && typeof rawTcPr === "object" ? rawTcPr : void 0;
147657
147758
  const tcPr = existingTcPr ?? {};
@@ -147698,7 +147799,7 @@ var init_PptxHandlerRuntimeSaveTableStyles = __esm({
147698
147799
  }
147699
147800
  delete tcPr["a:tcMar"];
147700
147801
  writeDiagonalBorders(tcPr, style, _PptxHandlerRuntime.EMU_PER_PX);
147701
- if (!isRichCellTxBody(xmlCell["a:txBody"], this.ensureArray.bind(this))) {
147802
+ if (!runsCarryFormatting && !isRichCellTxBody(xmlCell["a:txBody"], this.ensureArray.bind(this))) {
147702
147803
  writeCellTextFormatting(xmlCell, style, this.ensureArray.bind(this), paragraphs);
147703
147804
  }
147704
147805
  const reordered = reorderObjectKeys(tcPr, TC_PR_BORDERS_ORDER);
@@ -148466,6 +148567,91 @@ var init_table_xml_rebuild = __esm({
148466
148567
  }
148467
148568
  });
148468
148569
 
148570
+ // pptx/core/core/runtime/table-cell-run-style-xml.ts
148571
+ function setRunFlag(rPr, attribute7, value, on) {
148572
+ if (value) {
148573
+ rPr[attribute7] = on;
148574
+ } else {
148575
+ delete rPr[attribute7];
148576
+ }
148577
+ }
148578
+ function setRunLatinTypeface(rPr, typeface) {
148579
+ const existing = rPr["a:latin"];
148580
+ const latin = {
148581
+ ...existing && typeof existing === "object" ? existing : {},
148582
+ "@_typeface": typeface
148583
+ };
148584
+ const tail = [];
148585
+ for (const key2 of AFTER_LATIN) {
148586
+ if (key2 in rPr) {
148587
+ tail.push([key2, rPr[key2]]);
148588
+ delete rPr[key2];
148589
+ }
148590
+ }
148591
+ delete rPr["a:latin"];
148592
+ rPr["a:latin"] = latin;
148593
+ for (const [key2, value] of tail) {
148594
+ rPr[key2] = value;
148595
+ }
148596
+ }
148597
+ function applyCellRunStyleUpdates(rPr, styleUpdates) {
148598
+ if ("bold" in styleUpdates) {
148599
+ setRunFlag(rPr, "@_b", styleUpdates.bold, "1");
148600
+ }
148601
+ if ("italic" in styleUpdates) {
148602
+ setRunFlag(rPr, "@_i", styleUpdates.italic, "1");
148603
+ }
148604
+ if ("underline" in styleUpdates) {
148605
+ setRunFlag(rPr, "@_u", styleUpdates.underline, "sng");
148606
+ }
148607
+ if ("strikethrough" in styleUpdates) {
148608
+ setRunFlag(rPr, "@_strike", styleUpdates.strikethrough, "sngStrike");
148609
+ }
148610
+ if (typeof styleUpdates.fontSize === "number" && styleUpdates.fontSize > 0) {
148611
+ rPr["@_sz"] = String(Math.round(styleUpdates.fontSize * 100));
148612
+ }
148613
+ if ("color" in styleUpdates && typeof styleUpdates.color === "string") {
148614
+ const hex5 = styleUpdates.color.replace("#", "");
148615
+ const tail = [];
148616
+ for (const key2 of Object.keys(rPr)) {
148617
+ if (key2.startsWith("a:") && !["a:ln"].includes(key2)) {
148618
+ tail.push([key2, rPr[key2]]);
148619
+ delete rPr[key2];
148620
+ }
148621
+ }
148622
+ rPr["a:solidFill"] = { "a:srgbClr": { "@_val": hex5 } };
148623
+ for (const [key2, value] of tail) {
148624
+ if (![
148625
+ "a:solidFill",
148626
+ "a:noFill",
148627
+ "a:gradFill",
148628
+ "a:pattFill",
148629
+ "a:blipFill",
148630
+ "a:grpFill"
148631
+ ].includes(key2)) {
148632
+ rPr[key2] = value;
148633
+ }
148634
+ }
148635
+ }
148636
+ if (typeof styleUpdates.fontFamily === "string" && styleUpdates.fontFamily) {
148637
+ setRunLatinTypeface(rPr, styleUpdates.fontFamily);
148638
+ }
148639
+ }
148640
+ var AFTER_LATIN;
148641
+ var init_table_cell_run_style_xml = __esm({
148642
+ "pptx/core/core/runtime/table-cell-run-style-xml.ts"() {
148643
+ AFTER_LATIN = [
148644
+ "a:ea",
148645
+ "a:cs",
148646
+ "a:sym",
148647
+ "a:hlinkClick",
148648
+ "a:hlinkMouseOver",
148649
+ "a:rtl",
148650
+ "a:extLst"
148651
+ ];
148652
+ }
148653
+ });
148654
+
148469
148655
  // pptx/core/core/runtime/table-structure-edit-xml.ts
148470
148656
  function cells(row) {
148471
148657
  return ensureArray19(row["a:tc"]);
@@ -148901,9 +149087,11 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
148901
149087
  */
148902
149088
  serializeTableDataToXml(shape2, tableData, writeRichCellText) {
148903
149089
  const writeCellText = (xmlCell, cell2) => {
148904
- if (!writeRichCellText?.(xmlCell, cell2)) {
148905
- this.writeTableCellText(xmlCell, cell2.text);
149090
+ if (writeRichCellText?.(xmlCell, cell2)) {
149091
+ return true;
148906
149092
  }
149093
+ this.writeTableCellText(xmlCell, cell2.text);
149094
+ return false;
148907
149095
  };
148908
149096
  try {
148909
149097
  const graphicData = xmlPath(shape2, "a:graphic", "a:graphicData");
@@ -148941,14 +149129,12 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
148941
149129
  if (!xmlCell) {
148942
149130
  continue;
148943
149131
  }
148944
- if (cell2.text !== void 0) {
148945
- writeCellText(xmlCell, cell2);
148946
- }
149132
+ const richText = cell2.text !== void 0 && writeCellText(xmlCell, cell2);
148947
149133
  if (styleChanged) {
148948
149134
  clearCellFormattingForStyleChange(xmlCell, cell2.style);
148949
149135
  }
148950
149136
  if (cell2.style) {
148951
- this.writeTableCellStyle(xmlCell, cell2.style, cell2.paragraphs);
149137
+ this.writeTableCellStyle(xmlCell, cell2.style, cell2.paragraphs, richText);
148952
149138
  }
148953
149139
  serializeCellExtraAttributes(xmlCell, cell2.extraAttributes);
148954
149140
  }
@@ -148967,14 +149153,12 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
148967
149153
  const cell2 = dataRow.cells[cIdx];
148968
149154
  const xmlCell = xmlCells[cIdx];
148969
149155
  serializeCellMergeAttributes(xmlCell, cell2);
148970
- if (cell2.text !== void 0) {
148971
- writeCellText(xmlCell, cell2);
148972
- }
149156
+ const richText = cell2.text !== void 0 && writeCellText(xmlCell, cell2);
148973
149157
  if (styleChanged) {
148974
149158
  clearCellFormattingForStyleChange(xmlCell, cell2.style);
148975
149159
  }
148976
149160
  if (cell2.style) {
148977
- this.writeTableCellStyle(xmlCell, cell2.style, cell2.paragraphs);
149161
+ this.writeTableCellStyle(xmlCell, cell2.style, cell2.paragraphs, richText);
148978
149162
  }
148979
149163
  serializeCellExtraAttributes(xmlCell, cell2.extraAttributes);
148980
149164
  recordTableParagraphOrder(xmlCell, cell2.textRuns);
@@ -150144,37 +150328,37 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
150144
150328
  */
150145
150329
  buildNewSeriesXml(seriesIndex, seriesData, categories, templateSeries, dateCategories, isLineFamily = false) {
150146
150330
  if (templateSeries) {
150147
- const clone4 = JSON.parse(JSON.stringify(templateSeries));
150148
- regenerateClonedUniqueId(clone4, (key2) => this.compatibilityService.getXmlLocalName(key2));
150149
- const idxNode = this.xmlLookupService.getChildByLocalName(clone4, "idx");
150331
+ const clone5 = JSON.parse(JSON.stringify(templateSeries));
150332
+ regenerateClonedUniqueId(clone5, (key2) => this.compatibilityService.getXmlLocalName(key2));
150333
+ const idxNode = this.xmlLookupService.getChildByLocalName(clone5, "idx");
150150
150334
  if (idxNode) {
150151
150335
  idxNode["@_val"] = String(seriesIndex);
150152
150336
  }
150153
- const orderNode = this.xmlLookupService.getChildByLocalName(clone4, "order");
150337
+ const orderNode = this.xmlLookupService.getChildByLocalName(clone5, "order");
150154
150338
  if (orderNode) {
150155
150339
  orderNode["@_val"] = String(seriesIndex);
150156
150340
  }
150157
- const txNode = this.xmlLookupService.getChildByLocalName(clone4, "tx");
150341
+ const txNode = this.xmlLookupService.getChildByLocalName(clone5, "tx");
150158
150342
  if (txNode) {
150159
150343
  this.updateChartCacheValues(txNode, false, [seriesData.name]);
150160
150344
  }
150161
- const catNode = this.xmlLookupService.getChildByLocalName(clone4, "cat") || this.xmlLookupService.getChildByLocalName(clone4, "xVal");
150345
+ const catNode = this.xmlLookupService.getChildByLocalName(clone5, "cat") || this.xmlLookupService.getChildByLocalName(clone5, "xVal");
150162
150346
  if (catNode) {
150163
150347
  const dateValues = dateCategories?.values.map(String);
150164
150348
  this.updateChartCacheValues(catNode, Boolean(dateValues), dateValues ?? categories);
150165
150349
  }
150166
- const valNode = this.xmlLookupService.getChildByLocalName(clone4, "val") || this.xmlLookupService.getChildByLocalName(clone4, "yVal");
150350
+ const valNode = this.xmlLookupService.getChildByLocalName(clone5, "val") || this.xmlLookupService.getChildByLocalName(clone5, "yVal");
150167
150351
  if (valNode) {
150168
150352
  this.updateChartCacheValues(valNode, true, seriesData.values.map(String));
150169
150353
  }
150170
150354
  applySeriesGradientToXml(
150171
- clone4,
150355
+ clone5,
150172
150356
  seriesData.gradientFill,
150173
150357
  (key2) => this.compatibilityService.getXmlLocalName(key2),
150174
150358
  this.chartGradientWriteOptions(isLineFamily)
150175
150359
  );
150176
150360
  if (seriesData.color && !(seriesData.gradientFill && !isLineFamily)) {
150177
- const spPr = this.xmlLookupService.getChildByLocalName(clone4, "spPr");
150361
+ const spPr = this.xmlLookupService.getChildByLocalName(clone5, "spPr");
150178
150362
  if (spPr) {
150179
150363
  writeSeriesColorToSpPr(
150180
150364
  spPr,
@@ -150185,7 +150369,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
150185
150369
  );
150186
150370
  }
150187
150371
  }
150188
- return clone4;
150372
+ return clone5;
150189
150373
  }
150190
150374
  const colorHex = (seriesData.color || "#4472C4").replace("#", "");
150191
150375
  const ser = {
@@ -151011,6 +151195,7 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
151011
151195
  init_customer_data_package();
151012
151196
  init_deferred_embedded_font();
151013
151197
  init_embedded_font_list();
151198
+ init_embedded_font_permission();
151014
151199
  init_font_deobfuscation();
151015
151200
  init_safe_path();
151016
151201
  init_smartart_connector_labels();
@@ -151575,6 +151760,15 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
151575
151760
  rId = variant.originalRId;
151576
151761
  bytesToWrite = variant.originalPartBytes;
151577
151762
  } else {
151763
+ if (!mayNewlyEmbedFontData(variant, fontData)) {
151764
+ this.compatibilityService.reportWarning({
151765
+ code: "EMBEDDED_FONT_NOT_EMBEDDABLE",
151766
+ message: `Font "${typeface}" was not embedded: its licence (OS/2 fsType) does not allow embedding it in an editable presentation.`,
151767
+ scope: "save",
151768
+ xmlPath: `/p:presentation/p:embeddedFontLst/p:embeddedFont[@typeface="${typeface}"]`
151769
+ });
151770
+ continue;
151771
+ }
151578
151772
  guid3 = variant.fontGuid ?? generateFontGuid();
151579
151773
  const fileName = `{${guid3}}.fntdata`;
151580
151774
  fontPartPath = `ppt/fonts/${fileName}`;
@@ -151599,6 +151793,9 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
151599
151793
  const variantKey = variant.bold && variant.italic ? "p:boldItalic" : variant.bold ? "p:bold" : variant.italic ? "p:italic" : "p:regular";
151600
151794
  entry2[variantKey] = { "@_r:id": rId };
151601
151795
  }
151796
+ if (Object.keys(entry2).length === 1) {
151797
+ continue;
151798
+ }
151602
151799
  embeddedFontEntries.push(entry2);
151603
151800
  }
151604
151801
  relsRoot.Relationship = relationships3;
@@ -151609,7 +151806,10 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
151609
151806
  "p:embeddedFont": embeddedFontEntries.length === 1 ? embeddedFontEntries[0] : embeddedFontEntries
151610
151807
  };
151611
151808
  const metadata = explicitFontList ? serializeEmbeddedFontList(explicitFontList) : explicitFonts === void 0 && this.loadedEmbeddedFontList ? serializeEmbeddedFontList(this.loadedEmbeddedFontList) : generatedList;
151612
- setEmbeddedFontList(this.presentationData, metadata);
151809
+ setEmbeddedFontList(
151810
+ this.presentationData,
151811
+ metadata === generatedList && embeddedFontEntries.length === 0 ? null : metadata
151812
+ );
151613
151813
  }
151614
151814
  const ctXml = await this.zip.file("[Content_Types].xml")?.async("string");
151615
151815
  if (ctXml) {
@@ -153127,6 +153327,161 @@ var init_save_picture_fill = __esm({
153127
153327
  }
153128
153328
  });
153129
153329
 
153330
+ // pptx/core/core/runtime/table-cell-rich-xml.ts
153331
+ function hasTableCellSource(segments) {
153332
+ return segments.some((segment) => segment.tableRun || segment.tableParagraph);
153333
+ }
153334
+ function clone3(value) {
153335
+ return value === void 0 ? value : structuredClone(value);
153336
+ }
153337
+ function sourceRunProperties(source2) {
153338
+ const rPr = source2.xml["a:rPr"];
153339
+ if (rPr === void 0) {
153340
+ return void 0;
153341
+ }
153342
+ return rPr && typeof rPr === "object" ? clone3(rPr) : {};
153343
+ }
153344
+ function runProperties3(segment, source2) {
153345
+ const rPr = sourceRunProperties(source2);
153346
+ const before = source2.style;
153347
+ const after = segment.style ?? {};
153348
+ const updates = {};
153349
+ for (const key2 of DIFF_KEYS) {
153350
+ if (before[key2] !== after[key2]) {
153351
+ updates[key2] = after[key2];
153352
+ }
153353
+ }
153354
+ if (Object.keys(updates).length === 0) {
153355
+ return rPr;
153356
+ }
153357
+ const target = rPr ?? {};
153358
+ if (typeof updates.fontSize === "number") {
153359
+ updates.fontSize = Math.round(updates.fontSize * PT_PER_PX3 * 100) / 100;
153360
+ }
153361
+ applyCellRunStyleUpdates(target, updates);
153362
+ const off = {
153363
+ bold: ["@_b", "0"],
153364
+ italic: ["@_i", "0"],
153365
+ underline: ["@_u", "none"],
153366
+ strikethrough: ["@_strike", "noStrike"]
153367
+ };
153368
+ for (const [key2, [attribute7, value]] of Object.entries(off)) {
153369
+ if (key2 in updates && updates[key2] === false) {
153370
+ target[attribute7] = value;
153371
+ }
153372
+ }
153373
+ if ("baseline" in updates) {
153374
+ if (updates.baseline) {
153375
+ target["@_baseline"] = String(updates.baseline);
153376
+ } else {
153377
+ delete target["@_baseline"];
153378
+ }
153379
+ }
153380
+ if ("characterSpacing" in updates) {
153381
+ if (updates.characterSpacing) {
153382
+ target["@_spc"] = String(updates.characterSpacing);
153383
+ } else {
153384
+ delete target["@_spc"];
153385
+ }
153386
+ }
153387
+ return target;
153388
+ }
153389
+ function textRun2(rPr, text2) {
153390
+ const run2 = {};
153391
+ if (rPr !== void 0) {
153392
+ run2["a:rPr"] = rPr;
153393
+ }
153394
+ run2["a:t"] = text2;
153395
+ return run2;
153396
+ }
153397
+ function segmentChild(segment, runPropertiesFromStyle) {
153398
+ const source2 = segment.tableRun;
153399
+ if (segment.isLineBreak) {
153400
+ const br = source2?.tag === "a:br" && source2.xml ? clone3(source2.xml) : {};
153401
+ return { tag: "a:br", value: br && typeof br === "object" ? br : {} };
153402
+ }
153403
+ if (!segment.text) {
153404
+ return void 0;
153405
+ }
153406
+ if (!source2 || source2.tag === "a:br") {
153407
+ return {
153408
+ tag: "a:r",
153409
+ value: textRun2(runPropertiesFromStyle(segment.style ?? {}), segment.text)
153410
+ };
153411
+ }
153412
+ const rPr = runProperties3(segment, source2);
153413
+ const unchangedField = source2.tag === "a:fld" && segment.fieldType !== void 0 && segment.text === (xmlText(source2.xml["a:t"]) ?? "");
153414
+ if (!unchangedField) {
153415
+ return { tag: "a:r", value: textRun2(rPr, segment.text) };
153416
+ }
153417
+ const field = {};
153418
+ for (const [key2, value] of Object.entries(source2.xml)) {
153419
+ if (key2.startsWith("@_")) {
153420
+ field[key2] = value;
153421
+ }
153422
+ }
153423
+ if (rPr !== void 0) {
153424
+ field["a:rPr"] = rPr;
153425
+ }
153426
+ if (source2.xml["a:pPr"] !== void 0) {
153427
+ field["a:pPr"] = clone3(source2.xml["a:pPr"]);
153428
+ }
153429
+ field["a:t"] = segment.text;
153430
+ return { tag: "a:fld", value: field };
153431
+ }
153432
+ function paragraphsOf(segments) {
153433
+ const paragraphs = [[]];
153434
+ for (const segment of segments) {
153435
+ if (segment.isParagraphBreak) {
153436
+ paragraphs.push([]);
153437
+ } else {
153438
+ paragraphs.at(-1).push(segment);
153439
+ }
153440
+ }
153441
+ return paragraphs;
153442
+ }
153443
+ function buildRichCellParagraphs(segments, runPropertiesFromStyle) {
153444
+ let lastSource;
153445
+ return paragraphsOf(segments).map((paragraphSegments) => {
153446
+ const source2 = paragraphSegments.find((segment) => segment.tableParagraph)?.tableParagraph;
153447
+ const layout = source2 ?? lastSource;
153448
+ lastSource = layout;
153449
+ const paragraph2 = {};
153450
+ if (layout?.["a:pPr"] !== void 0) {
153451
+ paragraph2["a:pPr"] = clone3(layout["a:pPr"]);
153452
+ }
153453
+ const children16 = paragraphSegments.flatMap((segment) => {
153454
+ const child33 = segmentChild(segment, runPropertiesFromStyle);
153455
+ return child33 ? [child33] : [];
153456
+ });
153457
+ writeParagraphChildren(paragraph2, children16);
153458
+ if (layout?.["a:endParaRPr"] !== void 0) {
153459
+ paragraph2["a:endParaRPr"] = clone3(layout["a:endParaRPr"]);
153460
+ }
153461
+ return paragraph2;
153462
+ });
153463
+ }
153464
+ var PT_PER_PX3, DIFF_KEYS;
153465
+ var init_table_cell_rich_xml = __esm({
153466
+ "pptx/core/core/runtime/table-cell-rich-xml.ts"() {
153467
+ init_utils();
153468
+ init_paragraph_child_assembly();
153469
+ init_table_cell_run_style_xml();
153470
+ PT_PER_PX3 = 72 / 96;
153471
+ DIFF_KEYS = [
153472
+ "bold",
153473
+ "italic",
153474
+ "underline",
153475
+ "strikethrough",
153476
+ "color",
153477
+ "fontFamily",
153478
+ "fontSize",
153479
+ "baseline",
153480
+ "characterSpacing"
153481
+ ];
153482
+ }
153483
+ });
153484
+
153130
153485
  // pptx/core/core/runtime/table-cell-segments-xml.ts
153131
153486
  function tableCellSegmentsText(segments) {
153132
153487
  return segments.map((segment) => segment.isParagraphBreak ? "\n" : segment.text ?? "").join("");
@@ -153177,6 +153532,7 @@ var init_PptxHandlerRuntimeSaveElementEmbedding = __esm({
153177
153532
  init_PptxHandlerRuntimeSaveTextWriter();
153178
153533
  init_save_picture_geometry_gate();
153179
153534
  init_save_picture_fill();
153535
+ init_table_cell_rich_xml();
153180
153536
  init_table_cell_segments_xml();
153181
153537
  PptxHandlerRuntime32 = class _PptxHandlerRuntime extends PptxHandlerRuntime31 {
153182
153538
  /** Serialize table, chart, and SmartArt data when applicable. */
@@ -153209,6 +153565,16 @@ var init_PptxHandlerRuntimeSaveElementEmbedding = __esm({
153209
153565
  if (!segments) {
153210
153566
  return false;
153211
153567
  }
153568
+ if (hasTableCellSource(segments)) {
153569
+ xmlCell["a:txBody"] = buildCellTextBody(
153570
+ xmlCell["a:txBody"],
153571
+ buildRichCellParagraphs(
153572
+ segments,
153573
+ (style) => this.createRunPropertiesFromTextStyle(style, links?.resolveHyperlinkRelationshipId)
153574
+ )
153575
+ );
153576
+ return true;
153577
+ }
153212
153578
  const paragraphs = this.createParagraphsFromTextContent(
153213
153579
  cell2.text,
153214
153580
  cell2.style?.align ? { align: cell2.style.align } : void 0,
@@ -170550,6 +170916,7 @@ var PptxHandlerRuntime99;
170550
170916
  var init_PptxHandlerRuntimeEmbeddedFonts = __esm({
170551
170917
  "pptx/core/core/runtime/PptxHandlerRuntimeEmbeddedFonts.ts"() {
170552
170918
  init_deferred_embedded_font();
170919
+ init_embedded_font_permission();
170553
170920
  init_layout_display_name();
170554
170921
  init_strip_parent_dir_segments();
170555
170922
  init_xml_access();
@@ -170653,6 +171020,19 @@ var init_PptxHandlerRuntimeEmbeddedFonts = __esm({
170653
171020
  originalPartBytes: new Uint8Array(fontBinary),
170654
171021
  fontKey
170655
171022
  };
171023
+ source2.fsType = readEmbeddedFontPartFsType(
171024
+ source2.originalPartBytes,
171025
+ resolveEmbeddedFontGuid(source2)
171026
+ );
171027
+ if (!mayDisplayFontWithFsType(source2.fsType)) {
171028
+ this.compatibilityService.reportWarning({
171029
+ code: "EMBEDDED_FONT_RESTRICTED",
171030
+ message: `Embedded font "${typeface}" has a restricted licence (OS/2 fsType) and is not used for display; its font part is kept unchanged on save.`,
171031
+ scope: "presentation",
171032
+ xmlPath: fontPath
171033
+ });
171034
+ return createWithheldEmbeddedFont(source2);
171035
+ }
170656
171036
  if (this.eagerDecodeEmbeddedFonts) {
170657
171037
  return decodeEmbeddedFontPart(source2);
170658
171038
  }
@@ -172515,9 +172895,9 @@ var init_PptxHandlerRuntimeFactory = __esm({
172515
172895
 
172516
172896
  // pptx/core/core/runtime/table-style-editor.ts
172517
172897
  function deepClone(value) {
172518
- const clone4 = globalThis.structuredClone;
172519
- if (clone4) {
172520
- return clone4(value);
172898
+ const clone5 = globalThis.structuredClone;
172899
+ if (clone5) {
172900
+ return clone5(value);
172521
172901
  }
172522
172902
  return JSON.parse(JSON.stringify(value));
172523
172903
  }
@@ -181479,11 +181859,11 @@ function duplicateSlide2(ctx, params) {
181479
181859
  throw new Error(err);
181480
181860
  }
181481
181861
  const original = slides[params.slideIndex];
181482
- const clone4 = duplicateSlide(original, slides.length + 1);
181483
- clone4.id = generateSlideId();
181484
- clone4.rId = "";
181862
+ const clone5 = duplicateSlide(original, slides.length + 1);
181863
+ clone5.id = generateSlideId();
181864
+ clone5.rId = "";
181485
181865
  const insertIndex = params.targetIndex ?? params.slideIndex + 1;
181486
- slides.splice(insertIndex, 0, clone4);
181866
+ slides.splice(insertIndex, 0, clone5);
181487
181867
  slides.forEach((s, i2) => {
181488
181868
  s.slideNumber = i2 + 1;
181489
181869
  });
@@ -182344,14 +182724,14 @@ function cloneElement2(ctx, params) {
182344
182724
  if (terr) {
182345
182725
  throw new Error(terr);
182346
182726
  }
182347
- const clone4 = cloneElement(original);
182727
+ const clone5 = cloneElement(original);
182348
182728
  const intoTemplate = isTemplateElementId(original.id);
182349
- clone4.id = makeStoreAwareId(intoTemplate, original.id);
182350
- reassignDescendantIds(clone4, () => makeStoreAwareId(intoTemplate, original.id));
182351
- clone4.x += offsetX;
182352
- clone4.y += offsetY;
182353
- ctx.pptxData.slides[targetIdx].elements.push(clone4);
182354
- clonedIds.push(clone4.id);
182729
+ clone5.id = makeStoreAwareId(intoTemplate, original.id);
182730
+ reassignDescendantIds(clone5, () => makeStoreAwareId(intoTemplate, original.id));
182731
+ clone5.x += offsetX;
182732
+ clone5.y += offsetY;
182733
+ ctx.pptxData.slides[targetIdx].elements.push(clone5);
182734
+ clonedIds.push(clone5.id);
182355
182735
  }
182356
182736
  return {
182357
182737
  pptxData: ctx.pptxData,
@@ -182546,6 +182926,7 @@ function updateIntersectingMerges(source2, rows, edit) {
182546
182926
  ...cell2,
182547
182927
  text: content2.text,
182548
182928
  textRuns: content2.textRuns,
182929
+ textSegments: content2.textSegments,
182549
182930
  paragraphs: content2.paragraphs,
182550
182931
  style: promote2 ? cell2.style ?? anchor2.style : cell2.style,
182551
182932
  rowSpan: firstRow && height > 1 ? height : void 0,
@@ -185098,7 +185479,7 @@ __export(external_exports, {
185098
185479
  check: () => check,
185099
185480
  cidrv4: () => cidrv42,
185100
185481
  cidrv6: () => cidrv62,
185101
- clone: () => clone3,
185482
+ clone: () => clone4,
185102
185483
  codec: () => codec,
185103
185484
  coerce: () => coerce_exports,
185104
185485
  compile: () => compile,
@@ -185511,7 +185892,7 @@ __export(core_exports2, {
185511
185892
  base64Charset: () => base64Charset,
185512
185893
  base64urlCharset: () => base64urlCharset,
185513
185894
  canParseURL: () => canParseURL,
185514
- clone: () => clone3,
185895
+ clone: () => clone4,
185515
185896
  compile: () => compile,
185516
185897
  compileFn: () => compileFn,
185517
185898
  config: () => config,
@@ -185596,7 +185977,7 @@ __export(util_exports, {
185596
185977
  captureStackTrace: () => captureStackTrace,
185597
185978
  cleanEnum: () => cleanEnum,
185598
185979
  cleanRegex: () => cleanRegex,
185599
- clone: () => clone3,
185980
+ clone: () => clone4,
185600
185981
  cloneDef: () => cloneDef,
185601
185982
  codePointLength: () => codePointLength,
185602
185983
  constantCatch: () => constantCatch,
@@ -185953,7 +186334,7 @@ var primitiveTypes = /* @__PURE__ */ new Set([
185953
186334
  function escapeRegex2(str) {
185954
186335
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
185955
186336
  }
185956
- function clone3(inst, def, params) {
186337
+ function clone4(inst, def, params) {
185957
186338
  const cl = new inst._zod.constr(def ?? inst._zod.def);
185958
186339
  if (!def || params?.parent)
185959
186340
  cl._zod.parent = inst;
@@ -186040,7 +186421,7 @@ function pick2(schema, mask) {
186040
186421
  }
186041
186422
  const newShape = {};
186042
186423
  mirrorShape(newShape, schema, maskedKeys(schema, mask));
186043
- return clone3(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
186424
+ return clone4(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
186044
186425
  }
186045
186426
  function maskedKeys(schema, mask) {
186046
186427
  const raw2 = sourceShape(schema);
@@ -186064,7 +186445,7 @@ function omit(schema, mask) {
186064
186445
  const omitted = new Set(maskedKeys(schema, mask));
186065
186446
  const newShape = {};
186066
186447
  mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key2) => !omitted.has(key2)));
186067
- return clone3(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
186448
+ return clone4(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));
186068
186449
  }
186069
186450
  function extend(schema, shape2) {
186070
186451
  if (!isPlainObject(shape2)) {
@@ -186080,7 +186461,7 @@ function extend(schema, shape2) {
186080
186461
  }
186081
186462
  }
186082
186463
  }
186083
- return clone3(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape2) }));
186464
+ return clone4(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape2) }));
186084
186465
  }
186085
186466
  function extended(schema, shape2) {
186086
186467
  const newShape = {};
@@ -186092,7 +186473,7 @@ function safeExtend(schema, shape2) {
186092
186473
  if (!isPlainObject(shape2)) {
186093
186474
  throw new Error("Invalid input to safeExtend: expected a plain object");
186094
186475
  }
186095
- return clone3(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape2) }));
186476
+ return clone4(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape2) }));
186096
186477
  }
186097
186478
  function merge(a, b) {
186098
186479
  if (!b?._zod?.def) {
@@ -186111,7 +186492,7 @@ function merge(a, b) {
186111
186492
  },
186112
186493
  checks: b._zod.def.checks ?? []
186113
186494
  });
186114
- return clone3(a, def);
186495
+ return clone4(a, def);
186115
186496
  }
186116
186497
  function partial(Class2, schema, mask, name = "partial") {
186117
186498
  const currDef = schema._zod.def;
@@ -186123,7 +186504,7 @@ function partial(Class2, schema, mask, name = "partial") {
186123
186504
  const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
186124
186505
  const newShape = {};
186125
186506
  mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class2 && ((value, key2) => selected && !selected.has(key2) ? value : new Class2({ type: "optional", innerType: value })));
186126
- return clone3(schema, mergeDefs(schema._zod.def, { shape: newShape, checks: [] }));
186507
+ return clone4(schema, mergeDefs(schema._zod.def, { shape: newShape, checks: [] }));
186127
186508
  }
186128
186509
  function required2(Class2, schema, mask) {
186129
186510
  const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
@@ -186132,7 +186513,7 @@ function required2(Class2, schema, mask) {
186132
186513
  // overwrite with non-optional
186133
186514
  selected && !selected.has(key2) ? value : new Class2({ type: "nonoptional", innerType: value })
186134
186515
  ));
186135
- return clone3(schema, mergeDefs(schema._zod.def, { shape: newShape }));
186516
+ return clone4(schema, mergeDefs(schema._zod.def, { shape: newShape }));
186136
186517
  }
186137
186518
  function aborted(x, startIndex = 0) {
186138
186519
  if (x.aborted === true)
@@ -197961,9 +198342,9 @@ function compileValidator(schema, parser) {
197961
198342
  function compile(schema, options2) {
197962
198343
  try {
197963
198344
  const parser = compileFn(schema);
197964
- const clone4 = withParser(schema, parser);
197965
- clone4._zod.bag.validator = compileValidator(schema, parser);
197966
- return clone4;
198345
+ const clone5 = withParser(schema, parser);
198346
+ clone5._zod.bag.validator = compileValidator(schema, parser);
198347
+ return clone5;
197967
198348
  } catch (err) {
197968
198349
  if (options2?.strict)
197969
198350
  throw err;
@@ -197974,7 +198355,7 @@ function withParser(schema, parser) {
197974
198355
  if (isRecursiveSchema(schema)) {
197975
198356
  throw new ZodCompileUnsupportedError("a schema whose subtree contains a reference cycle");
197976
198357
  }
197977
- const clone4 = clone3(schema);
198358
+ const clone5 = clone4(schema);
197978
198359
  const liveRun = schema._zod.run;
197979
198360
  const originalRun = liveRun.__originalRun ?? liveRun;
197980
198361
  const wrapped = (payload, ctx) => {
@@ -197994,12 +198375,12 @@ function withParser(schema, parser) {
197994
198375
  return originalRun(payload, ctx);
197995
198376
  };
197996
198377
  wrapped.__originalRun = originalRun;
197997
- clone4._zod.bag.fallbackRun = originalRun;
197998
- clone4._zod.bag.validator = parser;
197999
- clone4._zod.run = wrapped;
198378
+ clone5._zod.bag.fallbackRun = originalRun;
198379
+ clone5._zod.bag.validator = parser;
198380
+ clone5._zod.run = wrapped;
198000
198381
  if (!liveRun.__originalRun)
198001
- installCompiledUserMethods(clone4, schema, parser);
198002
- return clone4;
198382
+ installCompiledUserMethods(clone5, schema, parser);
198383
+ return clone5;
198003
198384
  }
198004
198385
  function installCompiledUserMethods(target, source2, parser) {
198005
198386
  const targetAny = target;
@@ -202259,7 +202640,7 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
202259
202640
  return this.check(...chks);
202260
202641
  },
202261
202642
  clone(def, params) {
202262
- return clone3(this, def, params);
202643
+ return clone4(this, def, params);
202263
202644
  },
202264
202645
  brand() {
202265
202646
  return this;
@@ -204524,11 +204905,11 @@ function visit(schema, fnOrHandlers) {
204524
204905
  if (newCatchall !== def.catchall)
204525
204906
  changed = true;
204526
204907
  }
204527
- return changed ? clone3(s, { ...def, shape: newShape, catchall: newCatchall }) : s;
204908
+ return changed ? clone4(s, { ...def, shape: newShape, catchall: newCatchall }) : s;
204528
204909
  }
204529
204910
  case "array": {
204530
204911
  const mapped = run2(def.element);
204531
- return mapped === def.element ? s : clone3(s, { ...def, element: mapped });
204912
+ return mapped === def.element ? s : clone4(s, { ...def, element: mapped });
204532
204913
  }
204533
204914
  case "tuple": {
204534
204915
  const oldItems = def.items;
@@ -204546,17 +204927,17 @@ function visit(schema, fnOrHandlers) {
204546
204927
  if (newRest !== def.rest)
204547
204928
  changed = true;
204548
204929
  }
204549
- return changed ? clone3(s, { ...def, items: newItems, rest: newRest }) : s;
204930
+ return changed ? clone4(s, { ...def, items: newItems, rest: newRest }) : s;
204550
204931
  }
204551
204932
  case "record":
204552
204933
  case "map": {
204553
204934
  const newKey = run2(def.keyType);
204554
204935
  const newVal = run2(def.valueType);
204555
- return newKey === def.keyType && newVal === def.valueType ? s : clone3(s, { ...def, keyType: newKey, valueType: newVal });
204936
+ return newKey === def.keyType && newVal === def.valueType ? s : clone4(s, { ...def, keyType: newKey, valueType: newVal });
204556
204937
  }
204557
204938
  case "set": {
204558
204939
  const newVal = run2(def.valueType);
204559
- return newVal === def.valueType ? s : clone3(s, { ...def, valueType: newVal });
204940
+ return newVal === def.valueType ? s : clone4(s, { ...def, valueType: newVal });
204560
204941
  }
204561
204942
  case "union": {
204562
204943
  const oldOptions = def.options;
@@ -204568,12 +204949,12 @@ function visit(schema, fnOrHandlers) {
204568
204949
  changed = true;
204569
204950
  newOptions.push(mapped);
204570
204951
  }
204571
- return changed ? clone3(s, { ...def, options: newOptions }) : s;
204952
+ return changed ? clone4(s, { ...def, options: newOptions }) : s;
204572
204953
  }
204573
204954
  case "intersection": {
204574
204955
  const newLeft = run2(def.left);
204575
204956
  const newRight = run2(def.right);
204576
- return newLeft === def.left && newRight === def.right ? s : clone3(s, { ...def, left: newLeft, right: newRight });
204957
+ return newLeft === def.left && newRight === def.right ? s : clone4(s, { ...def, left: newLeft, right: newRight });
204577
204958
  }
204578
204959
  case "optional":
204579
204960
  case "nullable":
@@ -204585,22 +204966,22 @@ function visit(schema, fnOrHandlers) {
204585
204966
  case "promise":
204586
204967
  case "success": {
204587
204968
  const newInner = run2(def.innerType);
204588
- return newInner === def.innerType ? s : clone3(s, { ...def, innerType: newInner });
204969
+ return newInner === def.innerType ? s : clone4(s, { ...def, innerType: newInner });
204589
204970
  }
204590
204971
  case "pipe": {
204591
204972
  const newIn = run2(def.in);
204592
204973
  const newOut = run2(def.out);
204593
- return newIn === def.in && newOut === def.out ? s : clone3(s, { ...def, in: newIn, out: newOut });
204974
+ return newIn === def.in && newOut === def.out ? s : clone4(s, { ...def, in: newIn, out: newOut });
204594
204975
  }
204595
204976
  case "function": {
204596
204977
  const newInput = run2(def.input);
204597
204978
  const newOutput = run2(def.output);
204598
- return newInput === def.input && newOutput === def.output ? s : clone3(s, { ...def, input: newInput, output: newOutput });
204979
+ return newInput === def.input && newOutput === def.output ? s : clone4(s, { ...def, input: newInput, output: newOutput });
204599
204980
  }
204600
204981
  case "lazy": {
204601
204982
  const original = def.getter;
204602
204983
  const { _cachedInner, ...rest } = def;
204603
- return clone3(s, { ...rest, getter: () => run2(original()) });
204984
+ return clone4(s, { ...rest, getter: () => run2(original()) });
204604
204985
  }
204605
204986
  // A leaf by choice: `parts` are regex fragments, not data positions.
204606
204987
  case "template_literal":
@@ -204650,7 +205031,7 @@ function withChecks(side, checks) {
204650
205031
  if (!checks?.length)
204651
205032
  return side;
204652
205033
  const def = side._zod.def;
204653
- return clone3(side, mergeDefs(def, { checks: [...def.checks ?? [], ...checks] }), { parent: true });
205034
+ return clone4(side, mergeDefs(def, { checks: [...def.checks ?? [], ...checks] }), { parent: true });
204654
205035
  }
204655
205036
  function outSide(def) {
204656
205037
  return withChecks(def.out, def.checks);