ooxml-core 1.29.0 → 1.30.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 (308) hide show
  1. package/dist/{PptxHandler-CZG6ISCZ.cjs → PptxHandler-3OLZT5YW.cjs} +3 -3
  2. package/dist/{PptxHandler-QIHYALOV.mjs → PptxHandler-FJHKJEZU.mjs} +2 -2
  3. package/dist/PptxHandler-LOFY2PRO.mjs +4 -0
  4. package/dist/{PresentationBuilder-UAINQZA2.mjs → PresentationBuilder-23M6WQK3.mjs} +2 -2
  5. package/dist/{PresentationBuilder-66EU3N3O.cjs → PresentationBuilder-LVIVJZIL.cjs} +5 -5
  6. package/dist/{PresentationBuilder-5YM2L7DA.mjs → PresentationBuilder-W5VRPFLM.mjs} +2 -2
  7. package/dist/automation/index.cjs +4250 -3145
  8. package/dist/automation/index.mjs +4250 -3145
  9. package/dist/chart/box-distribution.d.ts +10 -0
  10. package/dist/chart/box-distribution.d.ts.map +1 -0
  11. package/dist/chart/data-table-layout.d.ts +8 -0
  12. package/dist/chart/data-table-layout.d.ts.map +1 -0
  13. package/dist/chart/date-axis.d.ts +3 -0
  14. package/dist/chart/date-axis.d.ts.map +1 -0
  15. package/dist/chart/date-format.d.ts +39 -0
  16. package/dist/chart/date-format.d.ts.map +1 -0
  17. package/dist/chart/edit/chartex-action.d.ts.map +1 -1
  18. package/dist/chart/edit/chartex-axis.d.ts.map +1 -1
  19. package/dist/chart/edit/chartex-structure.d.ts.map +1 -1
  20. package/dist/chart/edit/chartex.d.ts +3 -1
  21. package/dist/chart/edit/chartex.d.ts.map +1 -1
  22. package/dist/chart/edit/draft.d.ts.map +1 -1
  23. package/dist/chart/funnel-geometry.d.ts +15 -0
  24. package/dist/chart/funnel-geometry.d.ts.map +1 -0
  25. package/dist/chart/index.cjs +1392 -404
  26. package/dist/chart/index.d.ts +6 -0
  27. package/dist/chart/index.d.ts.map +1 -1
  28. package/dist/chart/index.mjs +1379 -405
  29. package/dist/chart/line-path.d.ts +30 -0
  30. package/dist/chart/line-path.d.ts.map +1 -0
  31. package/dist/chart/manual-layout.d.ts +15 -0
  32. package/dist/chart/manual-layout.d.ts.map +1 -1
  33. package/dist/chart/render/chart-svg-analysis.d.ts +2 -0
  34. package/dist/chart/render/chart-svg-analysis.d.ts.map +1 -1
  35. package/dist/chart/render/chart-svg-bars.d.ts.map +1 -1
  36. package/dist/chart/render/chart-svg-box.d.ts +5 -0
  37. package/dist/chart/render/chart-svg-box.d.ts.map +1 -0
  38. package/dist/chart/render/chart-svg-cartesian.d.ts +3 -1
  39. package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -1
  40. package/dist/chart/render/chart-svg-data-table.d.ts +11 -0
  41. package/dist/chart/render/chart-svg-data-table.d.ts.map +1 -0
  42. package/dist/chart/render/chart-svg-date-axis.d.ts +9 -0
  43. package/dist/chart/render/chart-svg-date-axis.d.ts.map +1 -0
  44. package/dist/chart/render/chart-svg-funnel.d.ts +4 -0
  45. package/dist/chart/render/chart-svg-funnel.d.ts.map +1 -0
  46. package/dist/chart/render/chart-svg-labels.d.ts +16 -16
  47. package/dist/chart/render/chart-svg-labels.d.ts.map +1 -1
  48. package/dist/chart/render/chart-svg-line.d.ts +5 -0
  49. package/dist/chart/render/chart-svg-line.d.ts.map +1 -0
  50. package/dist/chart/render/chart-svg-plot-layout.d.ts +6 -0
  51. package/dist/chart/render/chart-svg-plot-layout.d.ts.map +1 -0
  52. package/dist/chart/render/chart-svg-plots.d.ts +2 -1
  53. package/dist/chart/render/chart-svg-plots.d.ts.map +1 -1
  54. package/dist/chart/render/chart-svg-radial.d.ts.map +1 -1
  55. package/dist/chart/render/chart-svg-slice-labels.d.ts +18 -0
  56. package/dist/chart/render/chart-svg-slice-labels.d.ts.map +1 -0
  57. package/dist/chart/render/chart-svg-xy.d.ts +2 -1
  58. package/dist/chart/render/chart-svg-xy.d.ts.map +1 -1
  59. package/dist/chart/render/chart-svg.d.ts.map +1 -1
  60. package/dist/chart/render/chart-title-text.d.ts +3 -1
  61. package/dist/chart/render/chart-title-text.d.ts.map +1 -1
  62. package/dist/chart/render/chart-view-analysis.d.ts +2 -1
  63. package/dist/chart/render/chart-view-analysis.d.ts.map +1 -1
  64. package/dist/chart/render/chart-view-data-table.d.ts +13 -0
  65. package/dist/chart/render/chart-view-data-table.d.ts.map +1 -0
  66. package/dist/chart/render/chart-view-labels.d.ts +6 -1
  67. package/dist/chart/render/chart-view-labels.d.ts.map +1 -1
  68. package/dist/chart/render/chart-view-series.d.ts.map +1 -1
  69. package/dist/chart/render/chart-view.d.ts +13 -0
  70. package/dist/chart/render/chart-view.d.ts.map +1 -1
  71. package/dist/chart/render/render-space.d.ts.map +1 -1
  72. package/dist/chart/render/summary-ex-series.d.ts +5 -0
  73. package/dist/chart/render/summary-ex-series.d.ts.map +1 -0
  74. package/dist/chart/render/summary-from-chartex.d.ts.map +1 -1
  75. package/dist/chart/render/summary-from-space.d.ts +1 -1
  76. package/dist/chart/render/summary-from-space.d.ts.map +1 -1
  77. package/dist/chart/render/summary-labels.d.ts.map +1 -1
  78. package/dist/chart/render/summary.d.ts +14 -1
  79. package/dist/chart/render/summary.d.ts.map +1 -1
  80. package/dist/{chunk-BBK3UB7M.mjs → chunk-5YZFO55V.mjs} +4 -4
  81. package/dist/{chunk-T7HBA3CW.cjs → chunk-7T3SJQA6.cjs} +11 -9
  82. package/dist/{chunk-XROY25LN.cjs → chunk-7XYVFUB3.cjs} +4 -0
  83. package/dist/{chunk-GUNTIFGT.cjs → chunk-CZXM4ZJH.cjs} +158 -26
  84. package/dist/{chunk-RYOJHYA3.mjs → chunk-DJ3CDTMX.mjs} +157 -27
  85. package/dist/{chunk-KBER3RAP.mjs → chunk-HDHUJM5M.mjs} +229 -227
  86. package/dist/{chunk-XCRDAVFN.mjs → chunk-HK7DVTEF.mjs} +237 -95
  87. package/dist/{chunk-6C4NLBLB.mjs → chunk-JZ64GVIB.mjs} +1 -1
  88. package/dist/{chunk-3UMDVJRN.mjs → chunk-NBMXEVHL.mjs} +4 -1
  89. package/dist/{chunk-TVJL7QIG.cjs → chunk-OGEL4Z4S.cjs} +8 -1
  90. package/dist/{chunk-HRU3KOE5.mjs → chunk-OORQCSVA.mjs} +5 -3
  91. package/dist/{chunk-7RJYOVQU.mjs → chunk-R7NS42KQ.mjs} +5 -2
  92. package/dist/{chunk-I2CGNAP2.cjs → chunk-SCK5U362.cjs} +1390 -1388
  93. package/dist/{chunk-DWEQWFQU.mjs → chunk-SCTM27HK.mjs} +229 -227
  94. package/dist/{chunk-PDZ4GQLI.mjs → chunk-UVYWAI4M.mjs} +1 -1
  95. package/dist/{chunk-DXOBT2JE.mjs → chunk-UZWV2HAJ.mjs} +8 -2
  96. package/dist/{chunk-IETFPVLN.cjs → chunk-XTUX5RMG.cjs} +15 -12
  97. package/dist/diagram/drawing.d.ts.map +1 -1
  98. package/dist/diagram/index.cjs +1218 -592
  99. package/dist/diagram/index.mjs +1218 -592
  100. package/dist/diagram/load.d.ts.map +1 -1
  101. package/dist/diagram/relationships.d.ts +1 -0
  102. package/dist/diagram/relationships.d.ts.map +1 -1
  103. package/dist/diagram/types.d.ts +2 -0
  104. package/dist/diagram/types.d.ts.map +1 -1
  105. package/dist/docx/diagram.d.ts.map +1 -1
  106. package/dist/docx/drawing.d.ts.map +1 -1
  107. package/dist/docx/embedded.cjs +1850 -1138
  108. package/dist/docx/embedded.mjs +1850 -1138
  109. package/dist/docx/index.cjs +3312 -1713
  110. package/dist/docx/index.mjs +3312 -1713
  111. package/dist/docx/layout/adapter.d.ts.map +1 -1
  112. package/dist/docx/layout/fonts.d.ts +1 -1
  113. package/dist/docx/layout/fonts.d.ts.map +1 -1
  114. package/dist/docx/layout/index.cjs +1933 -518
  115. package/dist/docx/layout/index.mjs +1933 -518
  116. package/dist/docx/layout/script-fonts.d.ts +6 -0
  117. package/dist/docx/layout/script-fonts.d.ts.map +1 -0
  118. package/dist/docx/load/index.cjs +1853 -1141
  119. package/dist/docx/load/index.mjs +1853 -1141
  120. package/dist/docx/parse.d.ts.map +1 -1
  121. package/dist/docx/shape-model.d.ts +2 -0
  122. package/dist/docx/shape-model.d.ts.map +1 -1
  123. package/dist/docx/shape-parse.d.ts.map +1 -1
  124. package/dist/docx/shape-svg.d.ts.map +1 -1
  125. package/dist/docx/ui/index.cjs +1763 -593
  126. package/dist/docx/ui/index.mjs +1763 -593
  127. package/dist/docx/write-shape.d.ts.map +1 -1
  128. package/dist/drawingml/custom-geometry.d.ts +5 -0
  129. package/dist/drawingml/custom-geometry.d.ts.map +1 -0
  130. package/dist/drawingml/drawing-fill.d.ts.map +1 -1
  131. package/dist/drawingml/drawing-geometry.d.ts.map +1 -1
  132. package/dist/drawingml/image-content-type.d.ts +2 -0
  133. package/dist/drawingml/image-content-type.d.ts.map +1 -0
  134. package/dist/drawingml/index.cjs +1128 -179
  135. package/dist/drawingml/index.d.ts +9 -0
  136. package/dist/drawingml/index.d.ts.map +1 -1
  137. package/dist/drawingml/index.mjs +1110 -180
  138. package/dist/drawingml/path-data.d.ts +4 -0
  139. package/dist/drawingml/path-data.d.ts.map +1 -0
  140. package/dist/drawingml/picture-crop.d.ts +8 -0
  141. package/dist/drawingml/picture-crop.d.ts.map +1 -0
  142. package/dist/drawingml/picture-effects.d.ts +37 -0
  143. package/dist/drawingml/picture-effects.d.ts.map +1 -0
  144. package/dist/drawingml/picture-fill.d.ts +7 -0
  145. package/dist/drawingml/picture-fill.d.ts.map +1 -0
  146. package/dist/drawingml/read-3d-values.d.ts +8 -0
  147. package/dist/drawingml/read-3d-values.d.ts.map +1 -0
  148. package/dist/drawingml/read-text-3d.d.ts +8 -0
  149. package/dist/drawingml/read-text-3d.d.ts.map +1 -0
  150. package/dist/drawingml/read-text-body.d.ts.map +1 -1
  151. package/dist/drawingml/scene3d-coordinate.d.ts +45 -0
  152. package/dist/drawingml/scene3d-coordinate.d.ts.map +1 -0
  153. package/dist/drawingml/scene3d-presets.d.ts +12 -0
  154. package/dist/drawingml/scene3d-presets.d.ts.map +1 -0
  155. package/dist/drawingml/text-3d-model.d.ts +71 -0
  156. package/dist/drawingml/text-3d-model.d.ts.map +1 -0
  157. package/dist/drawingml/text-model.d.ts +3 -0
  158. package/dist/drawingml/text-model.d.ts.map +1 -1
  159. package/dist/drawingml/types.d.ts +3 -0
  160. package/dist/drawingml/types.d.ts.map +1 -1
  161. package/dist/drawingml/write-pattern-picture.d.ts.map +1 -1
  162. package/dist/drawingml/write-text-3d.d.ts +6 -0
  163. package/dist/drawingml/write-text-3d.d.ts.map +1 -0
  164. package/dist/drawingml/write-text-body.d.ts.map +1 -1
  165. package/dist/geometry/element-transform.d.ts +3 -0
  166. package/dist/geometry/element-transform.d.ts.map +1 -1
  167. package/dist/geometry/index.cjs +69 -4
  168. package/dist/geometry/index.d.ts +2 -0
  169. package/dist/geometry/index.d.ts.map +1 -1
  170. package/dist/geometry/index.mjs +66 -5
  171. package/dist/geometry/picture-crop.d.ts +21 -0
  172. package/dist/geometry/picture-crop.d.ts.map +1 -0
  173. package/dist/geometry/resize-aspect.d.ts +12 -0
  174. package/dist/geometry/resize-aspect.d.ts.map +1 -0
  175. package/dist/index.cjs +4201 -2058
  176. package/dist/index.mjs +4201 -2058
  177. package/dist/opc/index.cjs +9 -6
  178. package/dist/opc/index.mjs +9 -6
  179. package/dist/opc/safe-href.d.ts +10 -3
  180. package/dist/opc/safe-href.d.ts.map +1 -1
  181. package/dist/pptx/automation/index.cjs +615 -360
  182. package/dist/pptx/automation/index.d.ts +6 -6
  183. package/dist/pptx/automation/index.mjs +5 -5
  184. package/dist/pptx/chunks/{elements-CCEghtE_.d.ts → elements-mSCZ84Tc.d.ts} +4 -4
  185. package/dist/pptx/chunks/elements-mSCZ84Tc.d.ts.map +1 -0
  186. package/dist/pptx/chunks/{index-D90lhgiE.d.ts → index-BQDcu_0a.d.ts} +19 -111
  187. package/dist/pptx/chunks/index-BQDcu_0a.d.ts.map +1 -0
  188. package/dist/pptx/chunks/{index-CmnbpSCL.d.ts → index-CBV1oHN7.d.ts} +5 -5
  189. package/dist/pptx/chunks/{index-CmnbpSCL.d.ts.map → index-CBV1oHN7.d.ts.map} +1 -1
  190. package/dist/pptx/chunks/{index-DJIPX0Ge.d.ts → index-PdM5zpmu.d.ts} +5 -5
  191. package/dist/pptx/chunks/{index-DJIPX0Ge.d.ts.map → index-PdM5zpmu.d.ts.map} +1 -1
  192. package/dist/pptx/chunks/{smart-art-BLBSej3J.d.ts → smart-art-DLumQo90.d.ts} +135 -103
  193. package/dist/pptx/chunks/smart-art-DLumQo90.d.ts.map +1 -0
  194. package/dist/pptx/chunks/{text-D49FKllA.d.ts → text-P9xVnXXf.d.ts} +49 -60
  195. package/dist/pptx/chunks/text-P9xVnXXf.d.ts.map +1 -0
  196. package/dist/pptx/chunks/{text-operations-DZ1IgDJN.d.ts → text-operations-hyPODwIQ.d.ts} +4 -4
  197. package/dist/pptx/chunks/{text-operations-DZ1IgDJN.d.ts.map → text-operations-hyPODwIQ.d.ts.map} +1 -1
  198. package/dist/pptx/cli/index.cjs +611 -356
  199. package/dist/pptx/cli/index.d.ts +1 -1
  200. package/dist/pptx/cli/index.mjs +4 -4
  201. package/dist/pptx/converter/index.cjs +102 -67
  202. package/dist/pptx/converter/index.d.ts +1 -1
  203. package/dist/pptx/converter/index.mjs +2 -2
  204. package/dist/pptx/editor/render/collaboration-assets.cjs +15 -11
  205. package/dist/pptx/editor/render/collaboration-assets.d.ts +2 -2
  206. package/dist/pptx/editor/render/collaboration-assets.mjs +1 -1
  207. package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +5 -5
  208. package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +3 -3
  209. package/dist/pptx/editor/render/collaboration-reconcile.cjs +9 -9
  210. package/dist/pptx/editor/render/collaboration-reconcile.d.ts.map +1 -1
  211. package/dist/pptx/editor/render/collaboration-reconcile.mjs +3 -3
  212. package/dist/pptx/editor/render/collaboration-sync.cjs +29 -25
  213. package/dist/pptx/editor/render/collaboration-sync.d.ts +7 -0
  214. package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
  215. package/dist/pptx/editor/render/collaboration-sync.mjs +2 -2
  216. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  217. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  218. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  219. package/dist/pptx/editor/render/font-family-update.d.ts +1 -1
  220. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +1 -1
  221. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  222. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  223. package/dist/pptx/editor/render/table-cell-edit.cjs +8 -4
  224. package/dist/pptx/editor/render/table-cell-edit.d.ts +5 -0
  225. package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
  226. package/dist/pptx/editor/render/table-cell-edit.mjs +1 -1
  227. package/dist/pptx/editor/render/table-cell-merge.cjs +3 -3
  228. package/dist/pptx/editor/render/table-cell-merge.mjs +1 -1
  229. package/dist/pptx/editor/render/table-data-grid-ops.cjs +2 -2
  230. package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
  231. package/dist/pptx/editor/render/table-merge.cjs +5 -5
  232. package/dist/pptx/editor/render/table-merge.mjs +1 -1
  233. package/dist/pptx/editor/render/text-content-style.d.ts +1 -1
  234. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
  235. package/dist/pptx/editor/render/text-style-scope.d.ts +2 -2
  236. package/dist/pptx/editor/render/update-text-segment-style.d.ts +1 -1
  237. package/dist/pptx/index.cjs +677 -418
  238. package/dist/pptx/index.d.ts +8 -8
  239. package/dist/pptx/index.mjs +5 -5
  240. package/dist/pptx/node/index.d.ts +1 -1
  241. package/dist/pptx/smartart-layouts/index.d.ts +1 -1
  242. package/dist/teams/index.cjs +1816 -1049
  243. package/dist/teams/index.mjs +1816 -1049
  244. package/dist/text/font-style-name.d.ts +11 -0
  245. package/dist/text/font-style-name.d.ts.map +1 -0
  246. package/dist/text/font-substitution-map.d.ts +3 -0
  247. package/dist/text/font-substitution-map.d.ts.map +1 -0
  248. package/dist/text/font-substitution.d.ts +34 -0
  249. package/dist/text/font-substitution.d.ts.map +1 -0
  250. package/dist/text/index.cjs +460 -0
  251. package/dist/text/index.d.ts +3 -0
  252. package/dist/text/index.d.ts.map +1 -1
  253. package/dist/text/index.mjs +443 -1
  254. package/dist/text/metric-font-family.d.ts +7 -0
  255. package/dist/text/metric-font-family.d.ts.map +1 -0
  256. package/dist/text/panose.d.ts +55 -0
  257. package/dist/text/panose.d.ts.map +1 -0
  258. package/dist/text/script-fonts.d.ts +26 -0
  259. package/dist/text/script-fonts.d.ts.map +1 -0
  260. package/dist/visio/edit-geometry-admission.d.ts +1 -1
  261. package/dist/visio/edit-geometry-admission.d.ts.map +1 -1
  262. package/dist/visio/edit-group-resize.d.ts +26 -0
  263. package/dist/visio/edit-group-resize.d.ts.map +1 -0
  264. package/dist/visio/edit-recalculate-index.d.ts +2 -0
  265. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  266. package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
  267. package/dist/visio/edit-resize-plan.d.ts +14 -0
  268. package/dist/visio/edit-resize-plan.d.ts.map +1 -0
  269. package/dist/visio/edit-scope.d.ts.map +1 -1
  270. package/dist/visio/index.cjs +1326 -389
  271. package/dist/visio/index.mjs +1326 -389
  272. package/dist/visio/ui/geometry-expectation.d.ts +17 -0
  273. package/dist/visio/ui/geometry-expectation.d.ts.map +1 -0
  274. package/dist/visio/ui/guides.d.ts +2 -0
  275. package/dist/visio/ui/guides.d.ts.map +1 -1
  276. package/dist/visio/ui/index.cjs +1582 -411
  277. package/dist/visio/ui/index.d.ts +2 -0
  278. package/dist/visio/ui/index.d.ts.map +1 -1
  279. package/dist/visio/ui/index.mjs +1579 -412
  280. package/dist/visio/ui/selection-resize.d.ts +19 -0
  281. package/dist/visio/ui/selection-resize.d.ts.map +1 -0
  282. package/dist/visio/ui/shape-move.d.ts +1 -1
  283. package/dist/visio/ui/shape-move.d.ts.map +1 -1
  284. package/dist/visio/ui/shape-resize.d.ts.map +1 -1
  285. package/dist/xlsx/edit/drawings.d.ts +5 -0
  286. package/dist/xlsx/edit/drawings.d.ts.map +1 -1
  287. package/dist/xlsx/edit/session.d.ts.map +1 -1
  288. package/dist/xlsx/edit/types.d.ts +4 -0
  289. package/dist/xlsx/edit/types.d.ts.map +1 -1
  290. package/dist/xlsx/index.cjs +3908 -2256
  291. package/dist/xlsx/index.mjs +3908 -2256
  292. package/dist/xlsx/layout/chart-view.d.ts.map +1 -1
  293. package/dist/xlsx/load/index.cjs +2003 -1239
  294. package/dist/xlsx/load/index.mjs +2003 -1239
  295. package/dist/xlsx/model.d.ts +4 -0
  296. package/dist/xlsx/model.d.ts.map +1 -1
  297. package/dist/xlsx/read/chart.d.ts.map +1 -1
  298. package/dist/xlsx/read/drawing.d.ts.map +1 -1
  299. package/dist/xlsx/read/smart-art.d.ts.map +1 -1
  300. package/dist/xlsx/ui/index.cjs +3880 -2228
  301. package/dist/xlsx/ui/index.mjs +3880 -2228
  302. package/dist/xlsx/write/drawing.d.ts.map +1 -1
  303. package/package.json +1 -1
  304. package/dist/PptxHandler-DSXSXMEG.mjs +0 -4
  305. package/dist/pptx/chunks/elements-CCEghtE_.d.ts.map +0 -1
  306. package/dist/pptx/chunks/index-D90lhgiE.d.ts.map +0 -1
  307. package/dist/pptx/chunks/smart-art-BLBSej3J.d.ts.map +0 -1
  308. package/dist/pptx/chunks/text-D49FKllA.d.ts.map +0 -1
@@ -39484,32 +39484,6 @@ var init_hierarchy = __esm({
39484
39484
  }
39485
39485
  });
39486
39486
 
39487
- // drawingml/dom.ts
39488
- function attributeReader(element2) {
39489
- return (name) => {
39490
- if (!element2) return void 0;
39491
- const direct = element2.getAttribute(name);
39492
- if (direct !== null) return direct;
39493
- const attributes3 = element2.attributes;
39494
- for (let index2 = 0; index2 < attributes3.length; index2++) {
39495
- const candidate = attributes3.item(index2);
39496
- if (candidate && candidate.localName === name) return candidate.value;
39497
- }
39498
- return void 0;
39499
- };
39500
- }
39501
- function booleanAttribute(element2, name) {
39502
- const value = attributeReader(element2)(name)?.trim().toLowerCase();
39503
- if (value === "1" || value === "true") return true;
39504
- if (value === "0" || value === "false") return false;
39505
- return void 0;
39506
- }
39507
- var init_dom = __esm({
39508
- "drawingml/dom.ts"() {
39509
- init_xml2();
39510
- }
39511
- });
39512
-
39513
39487
  // color/contrast.ts
39514
39488
  var init_contrast = __esm({
39515
39489
  "color/contrast.ts"() {
@@ -39552,6 +39526,32 @@ var init_color2 = __esm({
39552
39526
  init_theme_palette();
39553
39527
  }
39554
39528
  });
39529
+
39530
+ // drawingml/dom.ts
39531
+ function attributeReader(element2) {
39532
+ return (name) => {
39533
+ if (!element2) return void 0;
39534
+ const direct = element2.getAttribute(name);
39535
+ if (direct !== null) return direct;
39536
+ const attributes3 = element2.attributes;
39537
+ for (let index2 = 0; index2 < attributes3.length; index2++) {
39538
+ const candidate = attributes3.item(index2);
39539
+ if (candidate && candidate.localName === name) return candidate.value;
39540
+ }
39541
+ return void 0;
39542
+ };
39543
+ }
39544
+ function booleanAttribute(element2, name) {
39545
+ const value = attributeReader(element2)(name)?.trim().toLowerCase();
39546
+ if (value === "1" || value === "true") return true;
39547
+ if (value === "0" || value === "false") return false;
39548
+ return void 0;
39549
+ }
39550
+ var init_dom = __esm({
39551
+ "drawingml/dom.ts"() {
39552
+ init_xml2();
39553
+ }
39554
+ });
39555
39555
  var init_ordered_color_transforms = __esm({
39556
39556
  "drawingml/ordered-color-transforms.ts"() {
39557
39557
  init_color2();
@@ -39725,6 +39725,354 @@ var init_drawing_color = __esm({
39725
39725
  }
39726
39726
  });
39727
39727
 
39728
+ // drawingml/scene3d-presets.ts
39729
+ var CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS;
39730
+ var init_scene3d_presets = __esm({
39731
+ "drawingml/scene3d-presets.ts"() {
39732
+ CAMERA_PRESETS = /* @__PURE__ */ new Set([
39733
+ "legacyObliqueTopLeft",
39734
+ "legacyObliqueTop",
39735
+ "legacyObliqueTopRight",
39736
+ "legacyObliqueLeft",
39737
+ "legacyObliqueFront",
39738
+ "legacyObliqueRight",
39739
+ "legacyObliqueBottomLeft",
39740
+ "legacyObliqueBottom",
39741
+ "legacyObliqueBottomRight",
39742
+ "legacyPerspectiveTopLeft",
39743
+ "legacyPerspectiveTop",
39744
+ "legacyPerspectiveTopRight",
39745
+ "legacyPerspectiveLeft",
39746
+ "legacyPerspectiveFront",
39747
+ "legacyPerspectiveRight",
39748
+ "legacyPerspectiveBottomLeft",
39749
+ "legacyPerspectiveBottom",
39750
+ "legacyPerspectiveBottomRight",
39751
+ "orthographicFront",
39752
+ "isometricTopUp",
39753
+ "isometricTopDown",
39754
+ "isometricBottomUp",
39755
+ "isometricBottomDown",
39756
+ "isometricLeftUp",
39757
+ "isometricLeftDown",
39758
+ "isometricRightUp",
39759
+ "isometricRightDown",
39760
+ "isometricOffAxis1Left",
39761
+ "isometricOffAxis1Right",
39762
+ "isometricOffAxis1Top",
39763
+ "isometricOffAxis2Left",
39764
+ "isometricOffAxis2Right",
39765
+ "isometricOffAxis2Top",
39766
+ "isometricOffAxis3Left",
39767
+ "isometricOffAxis3Right",
39768
+ "isometricOffAxis3Bottom",
39769
+ "isometricOffAxis4Left",
39770
+ "isometricOffAxis4Right",
39771
+ "isometricOffAxis4Bottom",
39772
+ "obliqueTopLeft",
39773
+ "obliqueTop",
39774
+ "obliqueTopRight",
39775
+ "obliqueLeft",
39776
+ "obliqueRight",
39777
+ "obliqueBottomLeft",
39778
+ "obliqueBottom",
39779
+ "obliqueBottomRight",
39780
+ "perspectiveFront",
39781
+ "perspectiveLeft",
39782
+ "perspectiveRight",
39783
+ "perspectiveAbove",
39784
+ "perspectiveBelow",
39785
+ "perspectiveAboveLeftFacing",
39786
+ "perspectiveAboveRightFacing",
39787
+ "perspectiveContrastingLeftFacing",
39788
+ "perspectiveContrastingRightFacing",
39789
+ "perspectiveHeroicLeftFacing",
39790
+ "perspectiveHeroicRightFacing",
39791
+ "perspectiveHeroicExtremeLeftFacing",
39792
+ "perspectiveHeroicExtremeRightFacing",
39793
+ "perspectiveRelaxed",
39794
+ "perspectiveRelaxedModerately"
39795
+ ]);
39796
+ LIGHT_RIGS = /* @__PURE__ */ new Set([
39797
+ "legacyFlat1",
39798
+ "legacyFlat2",
39799
+ "legacyFlat3",
39800
+ "legacyFlat4",
39801
+ "legacyNormal1",
39802
+ "legacyNormal2",
39803
+ "legacyNormal3",
39804
+ "legacyNormal4",
39805
+ "legacyHarsh1",
39806
+ "legacyHarsh2",
39807
+ "legacyHarsh3",
39808
+ "legacyHarsh4",
39809
+ "threePt",
39810
+ "balanced",
39811
+ "soft",
39812
+ "harsh",
39813
+ "flood",
39814
+ "contrasting",
39815
+ "morning",
39816
+ "sunrise",
39817
+ "sunset",
39818
+ "chilly",
39819
+ "freezing",
39820
+ "flat",
39821
+ "twoPt",
39822
+ "glow",
39823
+ "brightRoom"
39824
+ ]);
39825
+ LIGHT_DIRECTIONS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "r", "bl", "b", "br"]);
39826
+ }
39827
+ });
39828
+
39829
+ // drawingml/picture-effects.ts
39830
+ function picturePercentage(value) {
39831
+ const text2 = String(value ?? "").trim();
39832
+ if (!text2) return void 0;
39833
+ const percent = text2.endsWith("%");
39834
+ const n = Number(percent ? text2.slice(0, -1) : text2) / (percent ? 100 : 1e5);
39835
+ return Number.isFinite(n) ? n : void 0;
39836
+ }
39837
+ function readPictureEffect(name, attribute7) {
39838
+ if (name === "grayscl") return { kind: "grayscale" };
39839
+ if (name === "lum") {
39840
+ const brightness = picturePercentage(attribute7("bright"));
39841
+ const contrast = picturePercentage(attribute7("contrast"));
39842
+ for (const [name2, value] of [
39843
+ ["bright", brightness],
39844
+ ["contrast", contrast]
39845
+ ]) {
39846
+ const raw2 = attribute7(name2);
39847
+ if (raw2 !== void 0 && raw2 !== null && (value === void 0 || Math.abs(value) > 1))
39848
+ return void 0;
39849
+ }
39850
+ return {
39851
+ kind: "luminance",
39852
+ ...brightness !== void 0 ? { brightness } : {},
39853
+ ...contrast !== void 0 ? { contrast } : {}
39854
+ };
39855
+ }
39856
+ if (name === "alphaModFix") {
39857
+ const raw2 = attribute7("amt");
39858
+ const amount = raw2 === void 0 || raw2 === null ? 1 : picturePercentage(raw2);
39859
+ if (amount !== void 0 && amount >= 0) return { kind: "alphaModFix", amount };
39860
+ }
39861
+ return void 0;
39862
+ }
39863
+ function parsePictureEffects(blip) {
39864
+ if (!blip) return [];
39865
+ return elements(blip).map((node2) => ({
39866
+ ...(node2.namespaceURI === NS.a ? readPictureEffect(node2.localName, (name) => node2.getAttribute(name)) : void 0) ?? { kind: "unsupported", name: node2.localName },
39867
+ sourceXml: buildXml(node2)
39868
+ }));
39869
+ }
39870
+ function applyPictureEffects(blip, effects2) {
39871
+ if (JSON.stringify(parsePictureEffects(blip)) === JSON.stringify(effects2)) return;
39872
+ const nodes = effects2.map((effect) => {
39873
+ const name = effect.kind === "grayscale" ? "grayscl" : effect.kind === "luminance" ? "lum" : effect.kind === "unsupported" ? effect.name : effect.kind;
39874
+ const source = effect.sourceXml ? parseXml(effect.sourceXml).documentElement : void 0;
39875
+ if (effect.kind === "unsupported" && !source)
39876
+ throw new Error("An unsupported picture effect needs source XML");
39877
+ const node2 = source ? blip.ownerDocument.importNode(source, true) : blip.ownerDocument.createElementNS(NS.a, `a:${name}`);
39878
+ if (effect.kind !== "unsupported" && (node2.namespaceURI !== NS.a || node2.localName !== name))
39879
+ throw new Error("Picture effect source does not match its kind");
39880
+ const set3 = (name2, value) => {
39881
+ const original = picturePercentage(node2.getAttribute(name2));
39882
+ if (value === void 0) node2.removeAttribute(name2);
39883
+ else if (value !== original) {
39884
+ if (!Number.isFinite(value)) throw new RangeError("Picture effect must be finite");
39885
+ node2.setAttribute(name2, String(Math.round(value * 1e5)));
39886
+ }
39887
+ };
39888
+ if (effect.kind === "luminance") {
39889
+ if ([effect.brightness, effect.contrast].some(
39890
+ (value) => value !== void 0 && (!Number.isFinite(value) || Math.abs(value) > 1)
39891
+ ))
39892
+ throw new RangeError("Picture luminance must be between -1 and 1");
39893
+ set3("bright", effect.brightness);
39894
+ set3("contrast", effect.contrast);
39895
+ }
39896
+ if (effect.kind === "alphaModFix") {
39897
+ if (effect.amount < 0) throw new RangeError("Picture alpha must be nonnegative");
39898
+ set3("amt", effect.amount);
39899
+ }
39900
+ return node2;
39901
+ });
39902
+ for (const node2 of elements(blip)) blip.removeChild(node2);
39903
+ for (const node2 of nodes) blip.appendChild(node2);
39904
+ }
39905
+ var init_picture_effects = __esm({
39906
+ "drawingml/picture-effects.ts"() {
39907
+ init_xml2();
39908
+ }
39909
+ });
39910
+
39911
+ // drawingml/read-3d-values.ts
39912
+ function readScene3DValues(node2, read) {
39913
+ const out = {};
39914
+ const camera = read.child(node2, "camera");
39915
+ const light = read.child(node2, "lightRig");
39916
+ for (const [key2, source, attribute7, choices] of [
39917
+ ["cameraPreset", camera, "prst", CAMERA_PRESETS],
39918
+ ["lightRigType", light, "rig", LIGHT_RIGS],
39919
+ ["lightRigDirection", light, "dir", LIGHT_DIRECTIONS]
39920
+ ]) {
39921
+ const token2 = String(read.attribute(source, attribute7) ?? "").trim();
39922
+ if (choices.has(token2)) out[key2] = token2;
39923
+ }
39924
+ const fov = integer(read.attribute(camera, "fov"));
39925
+ if (fov !== void 0 && fov >= 0 && fov <= 108e5) out.cameraFieldOfView = fov;
39926
+ const zoom = picturePercentage(read.attribute(camera, "zoom"));
39927
+ if (zoom !== void 0 && zoom > 0) out.cameraZoom = zoom;
39928
+ for (const [prefix, source] of [
39929
+ ["camera", camera],
39930
+ ["lightRig", light]
39931
+ ]) {
39932
+ const rot = read.child(source, "rot");
39933
+ for (const [axis, key2] of [
39934
+ ["lat", "RotX"],
39935
+ ["lon", "RotY"],
39936
+ ["rev", "RotZ"]
39937
+ ]) {
39938
+ const value = integer(read.attribute(rot, axis));
39939
+ if (value !== void 0 && value >= 0 && value < 216e5) out[`${prefix}${key2}`] = value;
39940
+ }
39941
+ }
39942
+ const backdrop = read.child(node2, "backdrop");
39943
+ if (backdrop !== void 0) {
39944
+ out.hasBackdrop = true;
39945
+ for (const [name, prefix, attr6] of [
39946
+ ["anchor", "backdropAnchor", ""],
39947
+ ["norm", "backdropNormal", "d"],
39948
+ ["up", "backdropUp", "d"]
39949
+ ]) {
39950
+ const point2 = read.child(backdrop, name);
39951
+ for (const [axis, suffix] of [
39952
+ ["x", "X"],
39953
+ ["y", "Y"],
39954
+ ["z", "Z"]
39955
+ ]) {
39956
+ const value = integer(read.attribute(point2, `${attr6}${axis}`));
39957
+ if (value !== void 0) out[`${prefix}${suffix}`] = value;
39958
+ }
39959
+ }
39960
+ }
39961
+ return out;
39962
+ }
39963
+ function readText3DValues(node2, read) {
39964
+ const out = {};
39965
+ for (const [key2, attribute7] of [
39966
+ ["extrusionHeight", "extrusionH"],
39967
+ ["contourWidth", "contourW"],
39968
+ ["z", "z"]
39969
+ ]) {
39970
+ const value = integer(read.attribute(node2, attribute7));
39971
+ if (value !== void 0) out[key2] = value;
39972
+ }
39973
+ const material = String(read.attribute(node2, "prstMaterial") ?? "").trim();
39974
+ if (material) out.presetMaterial = material;
39975
+ for (const [name, prefix] of [
39976
+ ["bevelT", "bevelTop"],
39977
+ ["bevelB", "bevelBottom"]
39978
+ ]) {
39979
+ const bevel2 = read.child(node2, name);
39980
+ if (!bevel2) continue;
39981
+ out[`${prefix}Type`] = String(read.attribute(bevel2, "prst") || "circle").trim();
39982
+ for (const [attribute7, suffix] of [
39983
+ ["w", "Width"],
39984
+ ["h", "Height"]
39985
+ ]) {
39986
+ const value = integer(read.attribute(bevel2, attribute7));
39987
+ if (value !== void 0) out[`${prefix}${suffix}`] = value;
39988
+ }
39989
+ }
39990
+ return out;
39991
+ }
39992
+ var integer;
39993
+ var init_read_3d_values = __esm({
39994
+ "drawingml/read-3d-values.ts"() {
39995
+ init_scene3d_presets();
39996
+ init_picture_effects();
39997
+ integer = (value) => {
39998
+ if (value === void 0 || value === null || String(value).trim() === "") return void 0;
39999
+ const n = Number(value);
40000
+ return Number.isSafeInteger(n) ? n : void 0;
40001
+ };
40002
+ }
40003
+ });
40004
+
40005
+ // drawingml/picture-crop.ts
40006
+ function parsePictureCrop(blipFill) {
40007
+ const rect2 = first(blipFill, "srcRect", NS.a);
40008
+ if (!rect2) return void 0;
40009
+ const result = {};
40010
+ for (const [attr6, key2] of Object.entries(SIDES2)) {
40011
+ const raw2 = rect2.getAttribute(attr6);
40012
+ if (raw2 === null || !raw2.trim()) continue;
40013
+ const percent = raw2.endsWith("%");
40014
+ const value = Number(percent ? raw2.slice(0, -1) : raw2) / (percent ? 100 : 1e5);
40015
+ if (Number.isFinite(value)) result[key2] = value;
40016
+ }
40017
+ return result;
40018
+ }
40019
+ function applyPictureCrop(blipFill, crop) {
40020
+ let rect2 = first(blipFill, "srcRect", NS.a);
40021
+ if (!rect2 && crop && Object.values(crop).some((value) => value !== void 0)) {
40022
+ rect2 = blipFill.ownerDocument.createElementNS(NS.a, "a:srcRect");
40023
+ const blip = first(blipFill, "blip", NS.a);
40024
+ blipFill.insertBefore(rect2, blip?.nextSibling ?? blipFill.firstChild);
40025
+ }
40026
+ if (!rect2) return;
40027
+ for (const [attr6, key2] of Object.entries(SIDES2)) {
40028
+ const value = crop?.[key2];
40029
+ if (value === void 0) rect2.removeAttribute(attr6);
40030
+ else {
40031
+ if (!Number.isFinite(value)) throw new RangeError("Picture crop must be finite");
40032
+ rect2.setAttribute(attr6, String(Math.round(value * 1e5)));
40033
+ }
40034
+ }
40035
+ }
40036
+ var SIDES2;
40037
+ var init_picture_crop = __esm({
40038
+ "drawingml/picture-crop.ts"() {
40039
+ init_dom();
40040
+ SIDES2 = { l: "cropLeft", t: "cropTop", r: "cropRight", b: "cropBottom" };
40041
+ }
40042
+ });
40043
+
40044
+ // drawingml/picture-fill.ts
40045
+ function parseDrawingPictureFill(fill3) {
40046
+ const blip = first(fill3, "blip", NS.a);
40047
+ const relId = blip?.getAttributeNS(NS.r, "embed") || blip?.getAttribute("r:embed") || void 0;
40048
+ const linkRelId = blip?.getAttributeNS(NS.r, "link") || void 0;
40049
+ const crop = parsePictureCrop(fill3);
40050
+ const effects2 = parsePictureEffects(blip);
40051
+ const tile = first(fill3, "tile", NS.a);
40052
+ const rect2 = first(first(fill3, "stretch", NS.a), "fillRect", NS.a);
40053
+ const unsupported2 = [
40054
+ ...tile ? ["tile"] : [],
40055
+ ...rect2 && ["l", "t", "r", "b"].some((key2) => Number(rect2.getAttribute(key2) ?? 0) !== 0) ? ["fillRect"] : [],
40056
+ ...fill3.getAttribute("rotWithShape") === "0" || fill3.getAttribute("rotWithShape") === "false" ? ["rotWithShape"] : []
40057
+ ];
40058
+ return {
40059
+ kind: "picture",
40060
+ sourceXml: buildXml(fill3),
40061
+ ...relId ? { relId } : {},
40062
+ ...linkRelId ? { linkRelId } : {},
40063
+ ...crop ? { crop } : {},
40064
+ ...effects2.length ? { effects: effects2 } : {},
40065
+ ...unsupported2.length ? { unsupportedPicture: unsupported2 } : {}
40066
+ };
40067
+ }
40068
+ var init_picture_fill = __esm({
40069
+ "drawingml/picture-fill.ts"() {
40070
+ init_xml2();
40071
+ init_picture_crop();
40072
+ init_picture_effects();
40073
+ }
40074
+ });
40075
+
39728
40076
  // drawingml/drawing-fill.ts
39729
40077
  function fillElementOf(properties) {
39730
40078
  return properties ? elements(properties).find(
@@ -39787,17 +40135,8 @@ function parseDrawingFill(properties) {
39787
40135
  ...background ? { background } : {}
39788
40136
  };
39789
40137
  }
39790
- case "blipFill": {
39791
- const blip = first(fill3, "blip", NS.a);
39792
- const relId = blip?.getAttributeNS(NS.r, "embed") || blip?.getAttribute("r:embed") || void 0;
39793
- const linkRelId = blip?.getAttributeNS(NS.r, "link") || void 0;
39794
- return {
39795
- kind: "picture",
39796
- sourceXml: buildXml(fill3),
39797
- ...relId ? { relId } : {},
39798
- ...linkRelId ? { linkRelId } : {}
39799
- };
39800
- }
40138
+ case "blipFill":
40139
+ return parseDrawingPictureFill(fill3);
39801
40140
  default:
39802
40141
  return { kind: "unsupported", element: fill3.localName };
39803
40142
  }
@@ -39855,6 +40194,7 @@ function drawingDashLength(value) {
39855
40194
  var FILL_ELEMENTS;
39856
40195
  var init_drawing_fill = __esm({
39857
40196
  "drawingml/drawing-fill.ts"() {
40197
+ init_picture_fill();
39858
40198
  init_drawing_color();
39859
40199
  init_dom();
39860
40200
  init_xml2();
@@ -40607,6 +40947,10 @@ function drawingPatternPictureXml(fill3) {
40607
40947
  else if (blip.getAttributeNS(NS.r, attribute7) !== value)
40608
40948
  blip.setAttributeNS(NS.r, `r:${attribute7}`, value);
40609
40949
  }
40950
+ if (fill3.crop !== void 0 && JSON.stringify(before?.kind === "picture" ? before.crop : void 0) !== JSON.stringify(fill3.crop))
40951
+ applyPictureCrop(root, fill3.crop);
40952
+ if (fill3.effects !== void 0 && JSON.stringify(before?.kind === "picture" ? before.effects ?? [] : []) !== JSON.stringify(fill3.effects ?? []))
40953
+ applyPictureEffects(blip, fill3.effects ?? []);
40610
40954
  if (!fill3.sourceXml) {
40611
40955
  const stretch = doc.createElementNS(NS.a, "a:stretch");
40612
40956
  stretch.appendChild(doc.createElementNS(NS.a, "a:fillRect"));
@@ -40617,6 +40961,8 @@ function drawingPatternPictureXml(fill3) {
40617
40961
  }
40618
40962
  var init_write_pattern_picture = __esm({
40619
40963
  "drawingml/write-pattern-picture.ts"() {
40964
+ init_picture_crop();
40965
+ init_picture_effects();
40620
40966
  init_xml2();
40621
40967
  init_patch_color();
40622
40968
  init_drawing_fill();
@@ -41033,6 +41379,26 @@ var init_drawing_effects = __esm({
41033
41379
  }
41034
41380
  });
41035
41381
 
41382
+ // drawingml/scene3d-coordinate.ts
41383
+ function roundCoordinate(value) {
41384
+ return Math.round(value);
41385
+ }
41386
+ function scaleVectorToIntegers(x, y, z2) {
41387
+ const allInts = Number.isInteger(x) && Number.isInteger(y) && Number.isInteger(z2);
41388
+ const scale = allInts ? 1 : FRACTIONAL_VECTOR_SCALE;
41389
+ return {
41390
+ x: Math.round(x * scale),
41391
+ y: Math.round(y * scale),
41392
+ z: Math.round(z2 * scale)
41393
+ };
41394
+ }
41395
+ var FRACTIONAL_VECTOR_SCALE;
41396
+ var init_scene3d_coordinate = __esm({
41397
+ "drawingml/scene3d-coordinate.ts"() {
41398
+ FRACTIONAL_VECTOR_SCALE = 1e6;
41399
+ }
41400
+ });
41401
+
41036
41402
  // drawingml/write-run-properties.ts
41037
41403
  var RUN_PROPERTIES_ORDER;
41038
41404
  var init_write_run_properties = __esm({
@@ -52311,71 +52677,10 @@ var init_body_properties_parser = __esm({
52311
52677
  }
52312
52678
  });
52313
52679
 
52314
- // pptx/core/utils/font-substitution.ts
52315
- function stripFontStyleSuffix(fontName) {
52316
- let name = fontName.trim();
52317
- let stripped = false;
52318
- let previous = "";
52319
- let tokens = 0;
52320
- for (; ; ) {
52321
- const idx = name.lastIndexOf(" ");
52322
- if (idx <= 0) {
52323
- break;
52324
- }
52325
- const token2 = name.slice(idx + 1).toLowerCase().replace(/-/g, "");
52326
- const prefix = FONT_WEIGHT_PREFIX_TOKENS.has(token2) && FONT_PREFIXED_WEIGHT_TOKENS.has(previous);
52327
- if (!prefix && (tokens >= 2 || !FONT_STYLE_SUFFIX_TOKENS.has(token2))) {
52328
- break;
52329
- }
52330
- name = name.slice(0, idx).trim();
52331
- stripped = true;
52332
- previous = prefix ? "" : token2;
52333
- if (!prefix) {
52334
- tokens++;
52335
- }
52336
- }
52337
- return stripped && name.length > 0 ? name : void 0;
52338
- }
52339
- function getSubstituteFontFamily(fontName, panose) {
52340
- const trimmed2 = fontName.trim();
52341
- if (!trimmed2) {
52342
- return "sans-serif";
52343
- }
52344
- return buildFontFamilyString(trimmed2, getSubstituteFonts(trimmed2));
52345
- }
52346
- function getSubstituteFonts(fontName, panose) {
52347
- const trimmed2 = fontName.trim();
52348
- if (!trimmed2) {
52349
- return ["sans-serif"];
52350
- }
52351
- const baseName = stripFontStyleSuffix(trimmed2);
52352
- const basePrefix = baseName ? [baseName] : [];
52353
- const directSubs = FONT_SUBSTITUTION_MAP[trimmed2] ?? (baseName ? FONT_SUBSTITUTION_MAP[baseName] : void 0);
52354
- if (directSubs) {
52355
- return [...basePrefix, ...directSubs];
52356
- }
52357
- return [...basePrefix, "sans-serif"];
52358
- }
52359
- function buildFontFamilyString(primary, fallbacks) {
52360
- const parts = [quoteFontName(primary)];
52361
- for (const fb of fallbacks) {
52362
- const quoted = quoteFontName(fb);
52363
- if (!parts.includes(quoted)) {
52364
- parts.push(quoted);
52365
- }
52366
- }
52367
- return parts.join(", ");
52368
- }
52369
- function quoteFontName(name) {
52370
- const trimmed2 = name.trim();
52371
- if (CSS_GENERIC_FAMILIES.has(trimmed2.toLowerCase())) {
52372
- return trimmed2;
52373
- }
52374
- return `"${trimmed2}"`;
52375
- }
52376
- var FONT_SUBSTITUTION_MAP, FONT_STYLE_SUFFIX_TOKENS, FONT_WEIGHT_PREFIX_TOKENS, FONT_PREFIXED_WEIGHT_TOKENS, CSS_GENERIC_FAMILIES;
52377
- var init_font_substitution = __esm({
52378
- "pptx/core/utils/font-substitution.ts"() {
52680
+ // text/font-substitution-map.ts
52681
+ var FONT_SUBSTITUTION_MAP;
52682
+ var init_font_substitution_map = __esm({
52683
+ "text/font-substitution-map.ts"() {
52379
52684
  FONT_SUBSTITUTION_MAP = {
52380
52685
  // Microsoft Office default fonts. The Aptos family became the Office
52381
52686
  // default and its metrics were drawn to sit close to Calibri, so falling
@@ -52536,6 +52841,37 @@ var init_font_substitution = __esm({
52536
52841
  Constantia: ["Liberation Serif", "Palatino", "serif"],
52537
52842
  Corbel: ["Liberation Sans", "Lucida Grande", "sans-serif"]
52538
52843
  };
52844
+ }
52845
+ });
52846
+
52847
+ // text/font-style-name.ts
52848
+ function stripFontStyleSuffix(fontName) {
52849
+ let name = fontName.trim();
52850
+ let stripped = false;
52851
+ let previous = "";
52852
+ let tokens = 0;
52853
+ for (; ; ) {
52854
+ const idx = name.lastIndexOf(" ");
52855
+ if (idx <= 0) {
52856
+ break;
52857
+ }
52858
+ const token2 = name.slice(idx + 1).toLowerCase().replace(/-/g, "");
52859
+ const prefix = FONT_WEIGHT_PREFIX_TOKENS.has(token2) && FONT_PREFIXED_WEIGHT_TOKENS.has(previous);
52860
+ if (!prefix && (tokens >= 2 || !FONT_STYLE_SUFFIX_TOKENS.has(token2))) {
52861
+ break;
52862
+ }
52863
+ name = name.slice(0, idx).trim();
52864
+ stripped = true;
52865
+ previous = prefix ? "" : token2;
52866
+ if (!prefix) {
52867
+ tokens++;
52868
+ }
52869
+ }
52870
+ return stripped && name.length > 0 ? name : void 0;
52871
+ }
52872
+ var FONT_STYLE_SUFFIX_TOKENS, FONT_WEIGHT_PREFIX_TOKENS, FONT_PREFIXED_WEIGHT_TOKENS;
52873
+ var init_font_style_name = __esm({
52874
+ "text/font-style-name.ts"() {
52539
52875
  FONT_STYLE_SUFFIX_TOKENS = /* @__PURE__ */ new Set([
52540
52876
  "regular",
52541
52877
  "normal",
@@ -52563,6 +52899,64 @@ var init_font_substitution = __esm({
52563
52899
  ]);
52564
52900
  FONT_WEIGHT_PREFIX_TOKENS = /* @__PURE__ */ new Set(["semi", "demi", "extra", "ultra"]);
52565
52901
  FONT_PREFIXED_WEIGHT_TOKENS = /* @__PURE__ */ new Set(["bold", "light", "black"]);
52902
+ }
52903
+ });
52904
+ var init_panose = __esm({
52905
+ "text/panose.ts"() {
52906
+ }
52907
+ });
52908
+
52909
+ // text/font-substitution.ts
52910
+ function lookupFontSubstitutes(name) {
52911
+ return canonicalSubstitutes.get(name.trim().toLowerCase());
52912
+ }
52913
+ function getSubstituteFontFamily(fontName, panose) {
52914
+ const trimmed2 = fontName.trim();
52915
+ if (!trimmed2) {
52916
+ return "sans-serif";
52917
+ }
52918
+ return buildFontFamilyString(trimmed2, getSubstituteFonts(trimmed2));
52919
+ }
52920
+ function getSubstituteFonts(fontName, panose) {
52921
+ const trimmed2 = fontName.trim();
52922
+ if (!trimmed2) {
52923
+ return ["sans-serif"];
52924
+ }
52925
+ const baseName = stripFontStyleSuffix(trimmed2);
52926
+ const basePrefix = baseName ? [baseName] : [];
52927
+ const directSubs = lookupFontSubstitutes(trimmed2) ?? (baseName ? lookupFontSubstitutes(baseName) : void 0);
52928
+ if (directSubs) {
52929
+ return [...basePrefix, ...directSubs];
52930
+ }
52931
+ return [...basePrefix, "sans-serif"];
52932
+ }
52933
+ function buildFontFamilyString(primary, fallbacks) {
52934
+ const parts = [quoteFontName(primary)];
52935
+ for (const fb of fallbacks) {
52936
+ const quoted = quoteFontName(fb);
52937
+ if (!parts.includes(quoted)) {
52938
+ parts.push(quoted);
52939
+ }
52940
+ }
52941
+ return parts.join(", ");
52942
+ }
52943
+ function quoteFontName(name) {
52944
+ const trimmed2 = name.trim();
52945
+ if (CSS_GENERIC_FAMILIES.has(trimmed2.toLowerCase())) {
52946
+ return trimmed2;
52947
+ }
52948
+ return `"${trimmed2.replace(/["\\\r\n\f]/g, "")}"`;
52949
+ }
52950
+ var canonicalSubstitutes, CSS_GENERIC_FAMILIES;
52951
+ var init_font_substitution = __esm({
52952
+ "text/font-substitution.ts"() {
52953
+ init_font_substitution_map();
52954
+ init_font_style_name();
52955
+ init_panose();
52956
+ init_panose();
52957
+ canonicalSubstitutes = new Map(
52958
+ Object.entries(FONT_SUBSTITUTION_MAP).map(([name, fonts]) => [name.toLowerCase(), fonts])
52959
+ );
52566
52960
  CSS_GENERIC_FAMILIES = /* @__PURE__ */ new Set([
52567
52961
  "serif",
52568
52962
  "sans-serif",
@@ -52581,6 +52975,13 @@ var init_font_substitution = __esm({
52581
52975
  }
52582
52976
  });
52583
52977
 
52978
+ // pptx/core/utils/font-substitution.ts
52979
+ var init_font_substitution2 = __esm({
52980
+ "pptx/core/utils/font-substitution.ts"() {
52981
+ init_font_substitution();
52982
+ }
52983
+ });
52984
+
52584
52985
  // pptx/core/utils/pptx-validator-conformance-xml.ts
52585
52986
  function rootTag(xml) {
52586
52987
  return xml.match(/<(?!\?|!)([\w.-]+:[\w.-]+|[\w.-]+)(?:\s|\/?>)/)?.[1];
@@ -56576,22 +56977,9 @@ var init_smartart_definition_metadata = __esm({
56576
56977
  });
56577
56978
 
56578
56979
  // pptx/core/utils/scene3d-coordinate.ts
56579
- function roundCoordinate(value) {
56580
- return Math.round(value);
56581
- }
56582
- function scaleVectorToIntegers(x, y, z2) {
56583
- const allInts = Number.isInteger(x) && Number.isInteger(y) && Number.isInteger(z2);
56584
- const scale = allInts ? 1 : FRACTIONAL_VECTOR_SCALE;
56585
- return {
56586
- x: Math.round(x * scale),
56587
- y: Math.round(y * scale),
56588
- z: Math.round(z2 * scale)
56589
- };
56590
- }
56591
- var FRACTIONAL_VECTOR_SCALE;
56592
- var init_scene3d_coordinate = __esm({
56980
+ var init_scene3d_coordinate2 = __esm({
56593
56981
  "pptx/core/utils/scene3d-coordinate.ts"() {
56594
- FRACTIONAL_VECTOR_SCALE = 1e6;
56982
+ init_scene3d_coordinate();
56595
56983
  }
56596
56984
  });
56597
56985
 
@@ -56679,10 +57067,10 @@ function asXml(value) {
56679
57067
  return value !== null && typeof value === "object" ? value : void 0;
56680
57068
  }
56681
57069
  function nonNegativeInteger(value) {
56682
- const parsed = integer(value);
57070
+ const parsed = integer2(value);
56683
57071
  return parsed !== void 0 && parsed >= 0 ? parsed : void 0;
56684
57072
  }
56685
- function integer(value) {
57073
+ function integer2(value) {
56686
57074
  if (value === void 0 || value === null || !/^-?\d+$/.test(String(value))) {
56687
57075
  return void 0;
56688
57076
  }
@@ -56690,11 +57078,11 @@ function integer(value) {
56690
57078
  return Number.isSafeInteger(parsed) ? parsed : void 0;
56691
57079
  }
56692
57080
  function coordinate(value) {
56693
- const parsed = integer(value);
57081
+ const parsed = integer2(value);
56694
57082
  return parsed !== void 0 && parsed >= -27273042329600 && parsed <= 27273042316900 ? parsed : void 0;
56695
57083
  }
56696
57084
  function positiveFixedAngle(value) {
56697
- const parsed = integer(value);
57085
+ const parsed = integer2(value);
56698
57086
  return parsed !== void 0 && parsed >= 0 && parsed < 216e5 ? parsed : void 0;
56699
57087
  }
56700
57088
  function parseBoolean3(value) {
@@ -57546,7 +57934,7 @@ function writeShape3d(spPr, shapeStyle) {
57546
57934
  }
57547
57935
  var init_save_shape_effects = __esm({
57548
57936
  "pptx/core/core/runtime/save-shape-effects.ts"() {
57549
- init_scene3d_coordinate();
57937
+ init_scene3d_coordinate2();
57550
57938
  init_effect_dag_containers();
57551
57939
  init_effect_list_roundtrip();
57552
57940
  init_authored_shape_style();
@@ -60496,7 +60884,7 @@ function readCommentMentions(node2, authorName) {
60496
60884
  found.sort((a, b) => a.startIndex - b.startIndex);
60497
60885
  return found.length > 0 ? found : void 0;
60498
60886
  }
60499
- var mentionLocalName, mentionNodesOf, mentionChildrenNamed, MENTION_PERSON_KEYS, MENTION_LENGTH_KEYS, attribute5, integer2, readMention;
60887
+ var mentionLocalName, mentionNodesOf, mentionChildrenNamed, MENTION_PERSON_KEYS, MENTION_LENGTH_KEYS, attribute5, integer3, readMention;
60500
60888
  var init_modern_comment_mention_read = __esm({
60501
60889
  "pptx/core/utils/modern-comment-mention-read.ts"() {
60502
60890
  mentionLocalName = (key2) => key2.split(":").pop() || key2;
@@ -60534,7 +60922,7 @@ var init_modern_comment_mention_read = __esm({
60534
60922
  }
60535
60923
  return void 0;
60536
60924
  };
60537
- integer2 = (value) => {
60925
+ integer3 = (value) => {
60538
60926
  if (value === void 0) {
60539
60927
  return void 0;
60540
60928
  }
@@ -60543,8 +60931,8 @@ var init_modern_comment_mention_read = __esm({
60543
60931
  };
60544
60932
  readMention = (node2, authorName, containerUri) => {
60545
60933
  const personId = attribute5(node2, MENTION_PERSON_KEYS);
60546
- const startIndex = integer2(attribute5(node2, ["@_startIndex"]));
60547
- const length = integer2(attribute5(node2, MENTION_LENGTH_KEYS));
60934
+ const startIndex = integer3(attribute5(node2, ["@_startIndex"]));
60935
+ const length = integer3(attribute5(node2, MENTION_LENGTH_KEYS));
60548
60936
  if (!personId || startIndex === void 0 || length === void 0 || length === 0) {
60549
60937
  return void 0;
60550
60938
  }
@@ -65212,7 +65600,7 @@ var init_effect_style_extractor_fill_overlay = __esm({
65212
65600
  });
65213
65601
 
65214
65602
  // pptx/core/core/builders/effect-style-extractor-reflection.ts
65215
- function integer3(value) {
65603
+ function integer4(value) {
65216
65604
  if (value === void 0 || value === null || value === "") {
65217
65605
  return void 0;
65218
65606
  }
@@ -65229,19 +65617,19 @@ function boolean2(value) {
65229
65617
  return void 0;
65230
65618
  }
65231
65619
  function fixedFraction(value) {
65232
- const parsed = integer3(value);
65620
+ const parsed = integer4(value);
65233
65621
  return parsed !== void 0 && parsed >= 0 && parsed <= 1e5 ? parsed / 1e5 : void 0;
65234
65622
  }
65235
65623
  function extractReflectionAttributes(node2, emuPerPx) {
65236
- const blur = integer3(node2["@_blurRad"]);
65237
- const distance = integer3(node2["@_dist"]);
65238
- const startOpacity = integer3(node2["@_stA"]);
65239
- const endOpacity = integer3(node2["@_endA"]);
65240
- const startPosition = integer3(node2["@_stPos"]);
65241
- const endPosition = integer3(node2["@_endPos"]);
65242
- const direction = integer3(node2["@_dir"]);
65243
- const rotation = integer3(node2["@_rot"]);
65244
- const fadeDirection = integer3(node2["@_fadeDir"]);
65624
+ const blur = integer4(node2["@_blurRad"]);
65625
+ const distance = integer4(node2["@_dist"]);
65626
+ const startOpacity = integer4(node2["@_stA"]);
65627
+ const endOpacity = integer4(node2["@_endA"]);
65628
+ const startPosition = integer4(node2["@_stPos"]);
65629
+ const endPosition = integer4(node2["@_endPos"]);
65630
+ const direction = integer4(node2["@_dir"]);
65631
+ const rotation = integer4(node2["@_rot"]);
65632
+ const fadeDirection = integer4(node2["@_fadeDir"]);
65245
65633
  const alignment = String(node2["@_algn"] ?? "").trim();
65246
65634
  return {
65247
65635
  reflectionBlurRadius: blur !== void 0 && blur >= 0 ? blur / emuPerPx : void 0,
@@ -65253,10 +65641,10 @@ function extractReflectionAttributes(node2, emuPerPx) {
65253
65641
  reflectionRotation: rotation !== void 0 ? rotation / 6e4 : void 0,
65254
65642
  reflectionDistance: distance !== void 0 && distance >= 0 ? distance / emuPerPx : void 0,
65255
65643
  reflectionFadeDirection: fadeDirection !== void 0 ? fadeDirection / 6e4 : void 0,
65256
- reflectionScaleX: integer3(node2["@_sx"]),
65257
- reflectionScaleY: integer3(node2["@_sy"]),
65258
- reflectionSkewX: integer3(node2["@_kx"]),
65259
- reflectionSkewY: integer3(node2["@_ky"]),
65644
+ reflectionScaleX: integer4(node2["@_sx"]),
65645
+ reflectionScaleY: integer4(node2["@_sy"]),
65646
+ reflectionSkewX: integer4(node2["@_kx"]),
65647
+ reflectionSkewY: integer4(node2["@_ky"]),
65260
65648
  reflectionAlignment: VALID_ALIGNMENTS.has(alignment) ? alignment : void 0,
65261
65649
  reflectionRotateWithShape: boolean2(node2["@_rotWithShape"])
65262
65650
  };
@@ -100182,6 +100570,7 @@ function firstChartGroup(space) {
100182
100570
  return group;
100183
100571
  }
100184
100572
  function assignOrDelete(target, key2, value) {
100573
+ if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") return;
100185
100574
  if (value === void 0) delete target[key2];
100186
100575
  else target[key2] = value;
100187
100576
  }
@@ -100369,6 +100758,11 @@ function chartExSeriesAt(space, index2) {
100369
100758
  if (!series) throw new RangeError(`No chart series at index ${String(index2)}`);
100370
100759
  return series;
100371
100760
  }
100761
+ function chartExAxisAt(space, index2) {
100762
+ const axis = typeof index2 === "number" && Number.isSafeInteger(index2) ? space.plotArea.axes.find((_, position4) => position4 === index2) : void 0;
100763
+ if (!axis) throw new RangeError(`No chart axis at index ${String(index2)}`);
100764
+ return axis;
100765
+ }
100372
100766
  function setChartExTitle(space, text2) {
100373
100767
  return editChartExSpace(space, (draft) => {
100374
100768
  if (text2 === void 0) {
@@ -101431,6 +101825,42 @@ var init_summary_from_chartex = __esm({
101431
101825
  }
101432
101826
  });
101433
101827
 
101828
+ // chart/funnel-geometry.ts
101829
+ var init_funnel_geometry = __esm({
101830
+ "chart/funnel-geometry.ts"() {
101831
+ }
101832
+ });
101833
+
101834
+ // chart/box-distribution.ts
101835
+ var init_box_distribution = __esm({
101836
+ "chart/box-distribution.ts"() {
101837
+ }
101838
+ });
101839
+
101840
+ // chart/data-table-layout.ts
101841
+ var init_data_table_layout = __esm({
101842
+ "chart/data-table-layout.ts"() {
101843
+ }
101844
+ });
101845
+
101846
+ // chart/date-axis.ts
101847
+ var init_date_axis = __esm({
101848
+ "chart/date-axis.ts"() {
101849
+ }
101850
+ });
101851
+
101852
+ // chart/date-format.ts
101853
+ var init_date_format = __esm({
101854
+ "chart/date-format.ts"() {
101855
+ }
101856
+ });
101857
+
101858
+ // chart/line-path.ts
101859
+ var init_line_path = __esm({
101860
+ "chart/line-path.ts"() {
101861
+ }
101862
+ });
101863
+
101434
101864
  // chart/render/chart-svg-markers.ts
101435
101865
  var init_chart_svg_markers = __esm({
101436
101866
  "chart/render/chart-svg-markers.ts"() {
@@ -104009,15 +104439,14 @@ var init_chartex_intent = __esm({
104009
104439
 
104010
104440
  // chart/edit/chartex-axis.ts
104011
104441
  function editChartExAxis(space, index2, edit) {
104012
- if (!Number.isSafeInteger(index2) || !space.plotArea.axes[index2])
104013
- throw new RangeError("No ChartEx axis at index.");
104442
+ chartExAxisAt(space, index2);
104014
104443
  for (const key2 of ["min", "max", "majorUnit", "minorUnit"]) {
104015
104444
  const value = edit[key2];
104016
104445
  if (value !== void 0 && value !== null && (!Number.isFinite(value) || (key2 === "majorUnit" || key2 === "minorUnit") && value <= 0))
104017
104446
  throw new RangeError("Invalid ChartEx axis scaling.");
104018
104447
  }
104019
104448
  return editChartExSpace(space, (draft) => {
104020
- const axis = draft.plotArea.axes[index2];
104449
+ const axis = chartExAxisAt(draft, index2);
104021
104450
  for (const key2 of ["min", "max", "majorUnit", "minorUnit"])
104022
104451
  if (edit[key2] !== void 0) {
104023
104452
  if (axis.scaling?.kind !== "val")
@@ -104995,6 +105424,12 @@ var init_chart2 = __esm({
104995
105424
  init_data_sheet();
104996
105425
  init_workbook2();
104997
105426
  init_keep_source();
105427
+ init_line_path();
105428
+ init_date_axis();
105429
+ init_date_format();
105430
+ init_data_table_layout();
105431
+ init_funnel_geometry();
105432
+ init_box_distribution();
104998
105433
  }
104999
105434
  });
105000
105435
 
@@ -110850,103 +111285,9 @@ var init_paragraph_bullet_overrides = __esm({
110850
111285
  });
110851
111286
 
110852
111287
  // pptx/core/utils/text-body-scene3d-presets.ts
110853
- var CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS;
110854
111288
  var init_text_body_scene3d_presets = __esm({
110855
111289
  "pptx/core/utils/text-body-scene3d-presets.ts"() {
110856
- CAMERA_PRESETS = /* @__PURE__ */ new Set([
110857
- "legacyObliqueTopLeft",
110858
- "legacyObliqueTop",
110859
- "legacyObliqueTopRight",
110860
- "legacyObliqueLeft",
110861
- "legacyObliqueFront",
110862
- "legacyObliqueRight",
110863
- "legacyObliqueBottomLeft",
110864
- "legacyObliqueBottom",
110865
- "legacyObliqueBottomRight",
110866
- "legacyPerspectiveTopLeft",
110867
- "legacyPerspectiveTop",
110868
- "legacyPerspectiveTopRight",
110869
- "legacyPerspectiveLeft",
110870
- "legacyPerspectiveFront",
110871
- "legacyPerspectiveRight",
110872
- "legacyPerspectiveBottomLeft",
110873
- "legacyPerspectiveBottom",
110874
- "legacyPerspectiveBottomRight",
110875
- "orthographicFront",
110876
- "isometricTopUp",
110877
- "isometricTopDown",
110878
- "isometricBottomUp",
110879
- "isometricBottomDown",
110880
- "isometricLeftUp",
110881
- "isometricLeftDown",
110882
- "isometricRightUp",
110883
- "isometricRightDown",
110884
- "isometricOffAxis1Left",
110885
- "isometricOffAxis1Right",
110886
- "isometricOffAxis1Top",
110887
- "isometricOffAxis2Left",
110888
- "isometricOffAxis2Right",
110889
- "isometricOffAxis2Top",
110890
- "isometricOffAxis3Left",
110891
- "isometricOffAxis3Right",
110892
- "isometricOffAxis3Bottom",
110893
- "isometricOffAxis4Left",
110894
- "isometricOffAxis4Right",
110895
- "isometricOffAxis4Bottom",
110896
- "obliqueTopLeft",
110897
- "obliqueTop",
110898
- "obliqueTopRight",
110899
- "obliqueLeft",
110900
- "obliqueRight",
110901
- "obliqueBottomLeft",
110902
- "obliqueBottom",
110903
- "obliqueBottomRight",
110904
- "perspectiveFront",
110905
- "perspectiveLeft",
110906
- "perspectiveRight",
110907
- "perspectiveAbove",
110908
- "perspectiveBelow",
110909
- "perspectiveAboveLeftFacing",
110910
- "perspectiveAboveRightFacing",
110911
- "perspectiveContrastingLeftFacing",
110912
- "perspectiveContrastingRightFacing",
110913
- "perspectiveHeroicLeftFacing",
110914
- "perspectiveHeroicRightFacing",
110915
- "perspectiveHeroicExtremeLeftFacing",
110916
- "perspectiveHeroicExtremeRightFacing",
110917
- "perspectiveRelaxed",
110918
- "perspectiveRelaxedModerately"
110919
- ]);
110920
- LIGHT_RIGS = /* @__PURE__ */ new Set([
110921
- "legacyFlat1",
110922
- "legacyFlat2",
110923
- "legacyFlat3",
110924
- "legacyFlat4",
110925
- "legacyNormal1",
110926
- "legacyNormal2",
110927
- "legacyNormal3",
110928
- "legacyNormal4",
110929
- "legacyHarsh1",
110930
- "legacyHarsh2",
110931
- "legacyHarsh3",
110932
- "legacyHarsh4",
110933
- "threePt",
110934
- "balanced",
110935
- "soft",
110936
- "harsh",
110937
- "flood",
110938
- "contrasting",
110939
- "morning",
110940
- "sunrise",
110941
- "sunset",
110942
- "chilly",
110943
- "freezing",
110944
- "flat",
110945
- "twoPt",
110946
- "glow",
110947
- "brightRoom"
110948
- ]);
110949
- LIGHT_DIRECTIONS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "r", "bl", "b", "br"]);
111290
+ init_scene3d_presets();
110950
111291
  }
110951
111292
  });
110952
111293
 
@@ -110957,31 +111298,13 @@ function parseTextBodyScene3d(bodyPr, style) {
110957
111298
  return;
110958
111299
  }
110959
111300
  style.textBodyScene3dXml = cloneXmlObject(scene);
110960
- const camera = child26(scene, "camera");
110961
- const light = child26(scene, "lightRig");
110962
- const typed = {
110963
- cameraPreset: enumToken(camera?.["@_prst"], CAMERA_PRESETS),
110964
- lightRigType: enumToken(light?.["@_rig"], LIGHT_RIGS),
110965
- lightRigDirection: enumToken(light?.["@_dir"], LIGHT_DIRECTIONS)
110966
- };
110967
- const fov = finiteInt(camera?.["@_fov"]);
110968
- if (fov !== void 0 && fov >= 0 && fov <= 108e5) {
110969
- typed.cameraFieldOfView = fov;
110970
- }
110971
- const zoom = percentage(camera?.["@_zoom"]);
110972
- if (zoom !== void 0) {
110973
- typed.cameraZoom = zoom;
110974
- }
110975
- applyRotation(typed, camera, "camera");
110976
- applyRotation(typed, light, "lightRig");
110977
- const backdrop = child26(scene, "backdrop");
110978
- if (backdrop) {
110979
- typed.hasBackdrop = true;
110980
- applyPoint(typed, child26(backdrop, "anchor"), "backdropAnchor");
110981
- applyPoint(typed, child26(backdrop, "norm"), "backdropNormal", "d");
110982
- applyPoint(typed, child26(backdrop, "up"), "backdropUp", "d");
110983
- }
110984
- style.textBodyScene3d = typed;
111301
+ const typed = readScene3DValues(scene, { child: child26, attribute: (node2, name) => node2?.[`@_${name}`] });
111302
+ style.textBodyScene3d = {
111303
+ cameraPreset: void 0,
111304
+ lightRigType: void 0,
111305
+ lightRigDirection: void 0,
111306
+ ...typed
111307
+ };
110985
111308
  }
110986
111309
  function applyTextBodyScene3d(bodyPr, style) {
110987
111310
  const existingKey = childKey2(bodyPr, "scene3d");
@@ -111047,11 +111370,12 @@ function applyTextBodyScene3d(bodyPr, style) {
111047
111370
  }
111048
111371
  bodyPr[existingKey ?? "a:scene3d"] = ordered2(scene, ["camera", "lightRig", "backdrop", "extLst"]);
111049
111372
  }
111050
- var localName19, childKey2, child26, finiteInt, percentage, enumToken, applyRotation, applyPoint, setAttrs, setChild4, ordered2, rotationXml, anchorXml, vectorXml;
111373
+ var localName19, childKey2, child26, enumToken, setAttrs, setChild4, ordered2, rotationXml, anchorXml, vectorXml;
111051
111374
  var init_text_body_scene3d = __esm({
111052
111375
  "pptx/core/utils/text-body-scene3d.ts"() {
111376
+ init_read_3d_values();
111053
111377
  init_clone_utils();
111054
- init_scene3d_coordinate();
111378
+ init_scene3d_coordinate2();
111055
111379
  init_text_body_scene3d_presets();
111056
111380
  localName19 = (key2) => key2.replace(/^@_/, "").split(":").pop() ?? key2;
111057
111381
  childKey2 = (node2, local) => Object.keys(node2).find((key2) => !key2.startsWith("@_") && localName19(key2) === local);
@@ -111062,49 +111386,10 @@ var init_text_body_scene3d = __esm({
111062
111386
  const key2 = childKey2(node2, local);
111063
111387
  return key2 ? node2[key2] : void 0;
111064
111388
  };
111065
- finiteInt = (value) => {
111066
- const parsed = Number(value);
111067
- return Number.isInteger(parsed) ? parsed : void 0;
111068
- };
111069
- percentage = (value) => {
111070
- if (typeof value === "string" && value.endsWith("%")) {
111071
- const parsed2 = Number(value.slice(0, -1));
111072
- return Number.isFinite(parsed2) && parsed2 > 0 ? parsed2 / 100 : void 0;
111073
- }
111074
- const parsed = finiteInt(value);
111075
- return parsed !== void 0 && parsed > 0 ? parsed / 1e5 : void 0;
111076
- };
111077
111389
  enumToken = (value, allowed) => {
111078
111390
  const token2 = String(value ?? "").trim();
111079
111391
  return allowed.has(token2) ? token2 : void 0;
111080
111392
  };
111081
- applyRotation = (target, node2, prefix) => {
111082
- const rot = child26(node2, "rot");
111083
- const x = finiteInt(rot?.["@_lat"]);
111084
- const y = finiteInt(rot?.["@_lon"]);
111085
- const z2 = finiteInt(rot?.["@_rev"]);
111086
- if (x !== void 0) {
111087
- target[`${prefix}RotX`] = x;
111088
- }
111089
- if (y !== void 0) {
111090
- target[`${prefix}RotY`] = y;
111091
- }
111092
- if (z2 !== void 0) {
111093
- target[`${prefix}RotZ`] = z2;
111094
- }
111095
- };
111096
- applyPoint = (target, node2, prefix, attrPrefix = "") => {
111097
- for (const [axis, suffix] of [
111098
- ["x", "X"],
111099
- ["y", "Y"],
111100
- ["z", "Z"]
111101
- ]) {
111102
- const value = finiteInt(node2?.[`@_${attrPrefix}${axis}`]);
111103
- if (value !== void 0) {
111104
- target[`${prefix}${suffix}`] = value;
111105
- }
111106
- }
111107
- };
111108
111393
  setAttrs = (node2, attrs3) => {
111109
111394
  for (const [key2, value] of Object.entries(attrs3)) {
111110
111395
  if (value !== void 0) {
@@ -111132,6 +111417,10 @@ var init_text_body_scene3d = __esm({
111132
111417
  return result;
111133
111418
  };
111134
111419
  rotationXml = (x, y, z2) => {
111420
+ if ([x, y, z2].some(
111421
+ (value) => value !== void 0 && (!Number.isSafeInteger(value) || value < 0 || value >= 216e5)
111422
+ ))
111423
+ throw new RangeError("Invalid 3D rotation angle");
111135
111424
  if (![x, y, z2].some(Number.isInteger)) {
111136
111425
  return void 0;
111137
111426
  }
@@ -111160,29 +111449,6 @@ var init_text_body_scene3d = __esm({
111160
111449
  });
111161
111450
 
111162
111451
  // pptx/core/utils/text-body-sp3d.ts
111163
- function intAttr2(value) {
111164
- if (value === void 0 || value === null) {
111165
- return void 0;
111166
- }
111167
- const parsed = parseInt(String(value), 10);
111168
- return Number.isFinite(parsed) ? parsed : void 0;
111169
- }
111170
- function applyBevel(bevel2, t3d, prefix) {
111171
- if (!bevel2) {
111172
- return;
111173
- }
111174
- t3d[`${prefix}Type`] = String(
111175
- bevel2["@_prst"] || "circle"
111176
- ).trim();
111177
- const width = intAttr2(bevel2["@_w"]);
111178
- if (width !== void 0) {
111179
- t3d[`${prefix}Width`] = width;
111180
- }
111181
- const height = intAttr2(bevel2["@_h"]);
111182
- if (height !== void 0) {
111183
- t3d[`${prefix}Height`] = height;
111184
- }
111185
- }
111186
111452
  function parseTextBodySp3d(bodyPr, style, parseColor) {
111187
111453
  if (bodyPr["a:flatTx"] !== void 0) {
111188
111454
  style.flatText = true;
@@ -111192,27 +111458,23 @@ function parseTextBodySp3d(bodyPr, style, parseColor) {
111192
111458
  if (!sp3d) {
111193
111459
  return;
111194
111460
  }
111195
- const t3d = {};
111196
- const extrusionHeight = intAttr2(sp3d["@_extrusionH"]);
111197
- if (extrusionHeight !== void 0) {
111198
- t3d.extrusionHeight = extrusionHeight;
111199
- }
111461
+ const values = readText3DValues(sp3d, {
111462
+ attribute: (node2, name) => node2?.[`@_${name}`],
111463
+ child: (node2, name) => node2?.[`a:${name}`]
111464
+ });
111465
+ const { z: _z, contourWidth: _contourWidth, ...scalars } = values;
111466
+ const t3d = scalars;
111200
111467
  const extrusionColor = parseColor(sp3d["a:extrusionClr"]);
111201
111468
  if (extrusionColor) {
111202
111469
  t3d.extrusionColor = extrusionColor;
111203
111470
  }
111204
- const material = String(sp3d["@_prstMaterial"] || "").trim();
111205
- if (material) {
111206
- t3d.presetMaterial = material;
111207
- }
111208
- applyBevel(sp3d["a:bevelT"], t3d, "bevelTop");
111209
- applyBevel(sp3d["a:bevelB"], t3d, "bevelBottom");
111210
111471
  if (Object.keys(t3d).length > 0) {
111211
111472
  style.text3d = t3d;
111212
111473
  }
111213
111474
  }
111214
111475
  var init_text_body_sp3d = __esm({
111215
111476
  "pptx/core/utils/text-body-sp3d.ts"() {
111477
+ init_read_3d_values();
111216
111478
  }
111217
111479
  });
111218
111480
 
@@ -124772,8 +125034,8 @@ function parsePercent(value, fixed) {
124772
125034
  if (!text2) {
124773
125035
  return void 0;
124774
125036
  }
124775
- const strict = text2.endsWith("%");
124776
- const parsed = Number(strict ? text2.slice(0, -1) : text2) / (strict ? 1 : 1e3);
125037
+ const fraction = picturePercentage(text2);
125038
+ const parsed = fraction === void 0 ? NaN : fraction * 100;
124777
125039
  if (!Number.isFinite(parsed) || parsed < 0 || fixed && parsed > 100) {
124778
125040
  return void 0;
124779
125041
  }
@@ -124898,6 +125160,7 @@ function applyImageAlphaEffects(blip, effects2, parseColor) {
124898
125160
  var localName25;
124899
125161
  var init_image_alpha_effects = __esm({
124900
125162
  "pptx/core/core/runtime/image-alpha-effects.ts"() {
125163
+ init_picture_effects();
124901
125164
  init_color_xml_preservation();
124902
125165
  localName25 = (key2) => key2.split(":").at(-1) ?? key2;
124903
125166
  }
@@ -128283,6 +128546,7 @@ var init_PptxHandlerRuntimeTableStylesAndActions = __esm({
128283
128546
  var PptxHandlerRuntime5;
128284
128547
  var init_PptxHandlerRuntimeImageEffects = __esm({
128285
128548
  "pptx/core/core/runtime/PptxHandlerRuntimeImageEffects.ts"() {
128549
+ init_picture_effects();
128286
128550
  init_xml_access();
128287
128551
  init_image_a14_effects();
128288
128552
  init_image_a14_effects_model();
@@ -128331,20 +128595,11 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
128331
128595
  }
128332
128596
  const lumNode = blip["a:lum"];
128333
128597
  if (lumNode) {
128598
+ const neutral = readPictureEffect("lum", (name) => lumNode[`@_${name}`]);
128334
128599
  const lumEffect = {};
128335
- const lumBright = lumNode["@_bright"];
128336
- const lumContrast = lumNode["@_contrast"];
128337
- if (lumBright !== void 0) {
128338
- const v = parseInt(String(lumBright)) / 1e3;
128339
- if (Number.isFinite(v)) {
128340
- lumEffect.bright = v;
128341
- }
128342
- }
128343
- if (lumContrast !== void 0) {
128344
- const v = parseInt(String(lumContrast)) / 1e3;
128345
- if (Number.isFinite(v)) {
128346
- lumEffect.contrast = v;
128347
- }
128600
+ if (neutral?.kind === "luminance") {
128601
+ if (neutral.brightness !== void 0) lumEffect.bright = neutral.brightness * 100;
128602
+ if (neutral.contrast !== void 0) lumEffect.contrast = neutral.contrast * 100;
128348
128603
  }
128349
128604
  effects2.lum = lumEffect;
128350
128605
  hasAny2 = true;
@@ -164729,7 +164984,7 @@ var SmartArtElementProcessor = class {
164729
164984
  };
164730
164985
 
164731
164986
  // pptx/converter/elements/TableElementProcessor.ts
164732
- init_font_substitution();
164987
+ init_font_substitution2();
164733
164988
  var SAFE_CSS_NAMED_COLORS = /* @__PURE__ */ new Set([
164734
164989
  "black",
164735
164990
  "silver",
@@ -165109,7 +165364,7 @@ ${htmlRows.join("\n")}
165109
165364
  init_type_guards();
165110
165365
 
165111
165366
  // pptx/converter/ShapeTextRenderer.ts
165112
- init_font_substitution();
165367
+ init_font_substitution2();
165113
165368
  var DEFAULT_FONT_SIZE = 18;
165114
165369
  var FALLBACK_PAD_FACTOR = 0.06;
165115
165370
  function drawTextSegments(ctx, segments, bodyStyle, w, h2, scaleFactor = 1) {
@@ -172469,7 +172724,7 @@ __export(regexes_exports, {
172469
172724
  httpProtocol: () => httpProtocol,
172470
172725
  iban: () => iban,
172471
172726
  idnEmail: () => idnEmail,
172472
- integer: () => integer4,
172727
+ integer: () => integer5,
172473
172728
  ipv4: () => ipv4,
172474
172729
  ipv6: () => ipv6,
172475
172730
  ksuid: () => ksuid,
@@ -172581,7 +172836,7 @@ var string = (params) => {
172581
172836
  return new RegExp(`^${regex}$`);
172582
172837
  };
172583
172838
  var bigint = /^-?\d+n?$/;
172584
- var integer4 = /^-?\d+$/;
172839
+ var integer5 = /^-?\d+$/;
172585
172840
  var number = /^-?\d+(?:\.\d+)?$/;
172586
172841
  var boolean3 = /^(?:true|false)$/i;
172587
172842
  var _null = /^null$/i;
@@ -175381,7 +175636,7 @@ function leafPattern(schema) {
175381
175636
  if (minimum !== void 0 || maximum !== void 0)
175382
175637
  return string({ minimum, maximum }).source;
175383
175638
  const own2 = schema._zod.pattern;
175384
- return (isInt && own2 === number ? integer4 : own2)?.source;
175639
+ return (isInt && own2 === number ? integer5 : own2)?.source;
175385
175640
  }
175386
175641
  function partPattern(schema) {
175387
175642
  const def = schema._zod.def;
@@ -187161,7 +187416,7 @@ function stringifyKeyNames(bySchema, json2, visited) {
187161
187416
  return rest;
187162
187417
  rest.type = "string";
187163
187418
  if (!values)
187164
- rest.pattern = (types.includes("number") ? number : integer4).source;
187419
+ rest.pattern = (types.includes("number") ? number : integer5).source;
187165
187420
  return rest;
187166
187421
  }
187167
187422
  var pendingRecords = /* @__PURE__ */ new WeakMap();