@poe-platform/safe-bash 0.1.806 → 0.1.807

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 (856) hide show
  1. package/README.md +4 -0
  2. package/dist/image-ast/portable.d.ts +8 -0
  3. package/dist/image-ast/portable.js +2 -0
  4. package/dist/safe-bash/chunks/{chunk-KRA6WK4Z.js → chunk-3Y54SR4R.js} +6 -6
  5. package/dist/safe-bash/chunks/{chunk-OYJI4L4J.js → chunk-PPAA3LJS.js} +1 -1
  6. package/dist/safe-bash/chunks/{chunk-SCROOJV7.js → chunk-XZ2Y4RWC.js} +2 -2
  7. package/dist/safe-bash/command-chunks/{biff-AU4VGVMD-6EQ64QPG.js → biff-YBHP7ZES-M7TU7NA5.js} +1211 -1205
  8. package/dist/safe-bash/command-chunks/chunk-2A6TBB4F.js +14 -0
  9. package/dist/safe-bash/command-chunks/chunk-2AF7J6FE.js +372 -0
  10. package/dist/safe-bash/command-chunks/{chunk-AITNVBXO.js → chunk-2ANW3FXH.js} +4 -4
  11. package/dist/safe-bash/command-chunks/chunk-2B6XWO6A.js +730 -0
  12. package/dist/safe-bash/command-chunks/chunk-2BKOSQD3.js +11 -0
  13. package/dist/safe-bash/command-chunks/chunk-2EUH5B6A.js +127 -0
  14. package/dist/safe-bash/command-chunks/chunk-2FOLUJLI.js +400 -0
  15. package/dist/safe-bash/command-chunks/{chunk-CZLX3KVF.js → chunk-2GILUQJY.js} +4 -6
  16. package/dist/safe-bash/command-chunks/chunk-2HHGDJ7J.js +280 -0
  17. package/dist/safe-bash/command-chunks/chunk-2NE2GPSF.js +546 -0
  18. package/dist/safe-bash/command-chunks/chunk-2P7BLWWI.js +272 -0
  19. package/dist/safe-bash/command-chunks/chunk-2PSVE7I5.js +101 -0
  20. package/dist/safe-bash/command-chunks/chunk-2UUFZMOH.js +503 -0
  21. package/dist/safe-bash/command-chunks/chunk-2VGAC6S6.js +393 -0
  22. package/dist/safe-bash/command-chunks/chunk-2W54TAGI.js +162 -0
  23. package/dist/safe-bash/command-chunks/chunk-326A5G42.js +328 -0
  24. package/dist/safe-bash/command-chunks/chunk-36KIT4DU.js +218 -0
  25. package/dist/safe-bash/command-chunks/chunk-3CHQG25N.js +455 -0
  26. package/dist/safe-bash/command-chunks/chunk-3JQ3RF2O.js +72 -0
  27. package/dist/safe-bash/command-chunks/chunk-3MLJWSYL.js +92 -0
  28. package/dist/safe-bash/command-chunks/{chunk-ASYR2LU7.js → chunk-3RQCLLQA.js} +5 -5
  29. package/dist/safe-bash/command-chunks/chunk-3SEQG5JH.js +521 -0
  30. package/dist/safe-bash/command-chunks/chunk-3SWT2KYH.js +78 -0
  31. package/dist/safe-bash/command-chunks/chunk-3VETFXYR.js +170 -0
  32. package/dist/safe-bash/command-chunks/chunk-3W6PTHHB.js +65 -0
  33. package/dist/safe-bash/command-chunks/chunk-457CU3IC.js +8 -0
  34. package/dist/safe-bash/command-chunks/chunk-45BW6MGM.js +250 -0
  35. package/dist/safe-bash/command-chunks/chunk-47MFDPH4.js +419 -0
  36. package/dist/safe-bash/command-chunks/chunk-4ATHODCG.js +444 -0
  37. package/dist/safe-bash/command-chunks/chunk-4DJICIFV.js +227 -0
  38. package/dist/safe-bash/command-chunks/chunk-4FNQPK7C.js +385 -0
  39. package/dist/safe-bash/command-chunks/chunk-4LXDJES2.js +65 -0
  40. package/dist/safe-bash/command-chunks/chunk-4QRXKUD2.js +662 -0
  41. package/dist/safe-bash/command-chunks/chunk-4QYNOBWZ.js +455 -0
  42. package/dist/safe-bash/command-chunks/{chunk-MWNWT6HG.js → chunk-4XFFIKA3.js} +5 -5
  43. package/dist/safe-bash/command-chunks/chunk-5AU5ENL5.js +180 -0
  44. package/dist/safe-bash/command-chunks/chunk-5DFZAJHL.js +324 -0
  45. package/dist/safe-bash/command-chunks/chunk-5GEFJROP.js +270 -0
  46. package/dist/safe-bash/command-chunks/chunk-5HWX4XYW.js +263 -0
  47. package/dist/safe-bash/command-chunks/chunk-5LKNP4IF.js +872 -0
  48. package/dist/safe-bash/command-chunks/chunk-5OEHUIVE.js +240 -0
  49. package/dist/safe-bash/command-chunks/chunk-6EHVFKM7.js +171 -0
  50. package/dist/safe-bash/command-chunks/chunk-6JTPLJ3B.js +155 -0
  51. package/dist/safe-bash/command-chunks/chunk-6KLUPQ65.js +496 -0
  52. package/dist/safe-bash/command-chunks/chunk-6NS5RXQ7.js +285 -0
  53. package/dist/safe-bash/command-chunks/chunk-6PJIQEH4.js +3472 -0
  54. package/dist/safe-bash/command-chunks/chunk-763ECQWB.js +566 -0
  55. package/dist/safe-bash/command-chunks/chunk-7DADVPKN.js +23 -0
  56. package/dist/safe-bash/command-chunks/chunk-7LEADSSA.js +164 -0
  57. package/dist/safe-bash/command-chunks/chunk-7MMSBVUP.js +732 -0
  58. package/dist/safe-bash/command-chunks/chunk-7OXNWLSL.js +35 -0
  59. package/dist/safe-bash/command-chunks/chunk-7PZASWL6.js +354 -0
  60. package/dist/safe-bash/command-chunks/{chunk-ZBR3UH4P.js → chunk-7QH3WAMQ.js} +2 -2
  61. package/dist/safe-bash/command-chunks/{chunk-CB3HTIDK.js → chunk-7SOE7XIS.js} +11 -11
  62. package/dist/safe-bash/command-chunks/chunk-7Y3ZQ6FE.js +56 -0
  63. package/dist/safe-bash/command-chunks/chunk-A2YEQYCC.js +289 -0
  64. package/dist/safe-bash/command-chunks/chunk-A3XE767Q.js +502 -0
  65. package/dist/safe-bash/command-chunks/{chunk-MWY75E3F.js → chunk-A6LCBGE6.js} +187 -187
  66. package/dist/safe-bash/command-chunks/{chunk-HFUL6E5I.js → chunk-A7CE4EIU.js} +33 -151
  67. package/dist/safe-bash/command-chunks/chunk-A7EMM3SB.js +297 -0
  68. package/dist/safe-bash/command-chunks/{chunk-G3YO3JIN.js → chunk-ABH5FMMA.js} +1 -1
  69. package/dist/safe-bash/command-chunks/chunk-AEJZEGW7.js +1376 -0
  70. package/dist/safe-bash/command-chunks/chunk-AELXRNM6.js +207 -0
  71. package/dist/safe-bash/command-chunks/chunk-AEZIPWRI.js +260 -0
  72. package/dist/safe-bash/command-chunks/{chunk-AHD3CGAY.js → chunk-AFPXADZG.js} +4 -4
  73. package/dist/safe-bash/command-chunks/chunk-AIOB34IX.js +201 -0
  74. package/dist/safe-bash/command-chunks/chunk-AJEYCC4X.js +262 -0
  75. package/dist/safe-bash/command-chunks/chunk-ALMHXDKZ.js +321 -0
  76. package/dist/safe-bash/command-chunks/chunk-AQ6RTM2M.js +309 -0
  77. package/dist/safe-bash/command-chunks/chunk-AQNFEGMZ.js +481 -0
  78. package/dist/safe-bash/command-chunks/{chunk-2AKKYY5G.js → chunk-ASZ4EMKE.js} +1 -1
  79. package/dist/safe-bash/command-chunks/chunk-AYJGINE5.js +144 -0
  80. package/dist/safe-bash/command-chunks/{chunk-MRFW2E6B.js → chunk-B4UWZCQR.js} +1 -1
  81. package/dist/safe-bash/command-chunks/chunk-BDYKJTBQ.js +43 -0
  82. package/dist/safe-bash/command-chunks/chunk-BERVTMQB.js +41 -0
  83. package/dist/safe-bash/command-chunks/chunk-BZOY2UMP.js +275 -0
  84. package/dist/safe-bash/command-chunks/{chunk-W47KIMSP.js → chunk-C2EYJT4S.js} +1 -1
  85. package/dist/safe-bash/command-chunks/chunk-CK5Q6RDE.js +342 -0
  86. package/dist/safe-bash/command-chunks/chunk-CKEODJVT.js +992 -0
  87. package/dist/safe-bash/command-chunks/{chunk-Z7UIOPHJ.js → chunk-DCMSPMMD.js} +1 -1
  88. package/dist/safe-bash/command-chunks/chunk-DE66JRWJ.js +352 -0
  89. package/dist/safe-bash/command-chunks/chunk-DKNNYPOI.js +409 -0
  90. package/dist/safe-bash/command-chunks/chunk-DV745GFU.js +294 -0
  91. package/dist/safe-bash/command-chunks/chunk-DXX2Z2QA.js +33 -0
  92. package/dist/safe-bash/command-chunks/chunk-E7AYF54A.js +473 -0
  93. package/dist/safe-bash/command-chunks/chunk-EDSFQJAU.js +159 -0
  94. package/dist/safe-bash/command-chunks/{chunk-UQ3KEUCF.js → chunk-ESD5ZD74.js} +7 -1
  95. package/dist/safe-bash/command-chunks/chunk-EUXUCRCI.js +1739 -0
  96. package/dist/safe-bash/command-chunks/chunk-F2ORFLCH.js +3669 -0
  97. package/dist/safe-bash/command-chunks/chunk-FANIWOBM.js +311 -0
  98. package/dist/safe-bash/command-chunks/chunk-FOO3AXFK.js +47 -0
  99. package/dist/safe-bash/command-chunks/chunk-FRZ5P5AB.js +131 -0
  100. package/dist/safe-bash/command-chunks/chunk-FZSQMMYV.js +276 -0
  101. package/dist/safe-bash/command-chunks/{chunk-P6NUIMMX.js → chunk-G5F2VSQ7.js} +1 -1
  102. package/dist/safe-bash/command-chunks/chunk-GGOZXIGH.js +299 -0
  103. package/dist/safe-bash/command-chunks/chunk-GIESJLR2.js +241 -0
  104. package/dist/safe-bash/command-chunks/chunk-GLPIFP7N.js +385 -0
  105. package/dist/safe-bash/command-chunks/chunk-GZ2N24A2.js +342 -0
  106. package/dist/safe-bash/command-chunks/chunk-H2NWPMNW.js +216 -0
  107. package/dist/safe-bash/command-chunks/chunk-HHLVI2CB.js +3949 -0
  108. package/dist/safe-bash/command-chunks/chunk-HJDE7ZNV.js +82 -0
  109. package/dist/safe-bash/command-chunks/chunk-HOAM3F5I.js +124 -0
  110. package/dist/safe-bash/command-chunks/chunk-HPKUFWHW.js +482 -0
  111. package/dist/safe-bash/command-chunks/chunk-HPMVMOD2.js +109 -0
  112. package/dist/safe-bash/command-chunks/chunk-HQAHDJPX.js +8 -0
  113. package/dist/safe-bash/command-chunks/chunk-HR2Y6YEP.js +12 -0
  114. package/dist/safe-bash/command-chunks/chunk-HUNXIAOL.js +62 -0
  115. package/dist/safe-bash/command-chunks/chunk-I4JWZOSP.js +244 -0
  116. package/dist/safe-bash/command-chunks/chunk-I6AMDG2T.js +85 -0
  117. package/dist/safe-bash/command-chunks/chunk-IB2Q5CL3.js +288 -0
  118. package/dist/safe-bash/command-chunks/chunk-IFNLDOJ4.js +316 -0
  119. package/dist/safe-bash/command-chunks/chunk-IKHBXETN.js +174 -0
  120. package/dist/safe-bash/command-chunks/chunk-IOSWG5JS.js +228 -0
  121. package/dist/safe-bash/command-chunks/chunk-IQFRPIXH.js +317 -0
  122. package/dist/safe-bash/command-chunks/chunk-IR6ZKAUH.js +582 -0
  123. package/dist/safe-bash/command-chunks/chunk-IW7PEB4I.js +297 -0
  124. package/dist/safe-bash/command-chunks/chunk-JGGRMERW.js +36 -0
  125. package/dist/safe-bash/command-chunks/chunk-JHAY3KYC.js +520 -0
  126. package/dist/safe-bash/command-chunks/{chunk-UO25D4WG.js → chunk-JITDS55R.js} +22 -22
  127. package/dist/safe-bash/command-chunks/chunk-JJK3CU7Z.js +6 -0
  128. package/dist/safe-bash/command-chunks/{chunk-XKZWUMH4.js → chunk-JN7GNI2C.js} +1 -1
  129. package/dist/safe-bash/command-chunks/chunk-JQ3EJKHF.js +160 -0
  130. package/dist/safe-bash/command-chunks/chunk-JQE256UO.js +292 -0
  131. package/dist/safe-bash/command-chunks/chunk-JQZ3BXWY.js +382 -0
  132. package/dist/safe-bash/command-chunks/{chunk-7DLR4HCC.js → chunk-JWSOFSGI.js} +22 -22
  133. package/dist/safe-bash/command-chunks/chunk-K3CDZMUN.js +168 -0
  134. package/dist/safe-bash/command-chunks/{chunk-SUYSZJI3.js → chunk-K5COUQAQ.js} +4 -4
  135. package/dist/safe-bash/command-chunks/chunk-K7HUXUN2.js +489 -0
  136. package/dist/safe-bash/command-chunks/chunk-KB3CY3QO.js +62 -0
  137. package/dist/safe-bash/command-chunks/chunk-KCBVOYAY.js +92 -0
  138. package/dist/safe-bash/command-chunks/chunk-KD25ICP4.js +366 -0
  139. package/dist/safe-bash/command-chunks/chunk-KDKQ5D55.js +180 -0
  140. package/dist/safe-bash/command-chunks/chunk-KNKDUEDW.js +521 -0
  141. package/dist/safe-bash/command-chunks/chunk-KR2PQ7GD.js +174 -0
  142. package/dist/safe-bash/command-chunks/chunk-KS6WUDPM.js +153 -0
  143. package/dist/safe-bash/command-chunks/{chunk-XFHUSZBM.js → chunk-KUGV3SSL.js} +5 -5
  144. package/dist/safe-bash/command-chunks/chunk-L2JAP5KO.js +249 -0
  145. package/dist/safe-bash/command-chunks/chunk-L2KEA6SN.js +271 -0
  146. package/dist/safe-bash/command-chunks/chunk-L3WY5ASN.js +526 -0
  147. package/dist/safe-bash/command-chunks/chunk-L4XEXXVQ.js +399 -0
  148. package/dist/safe-bash/command-chunks/chunk-LDTUZIJK.js +90 -0
  149. package/dist/safe-bash/command-chunks/chunk-LHDB4QO5.js +479 -0
  150. package/dist/safe-bash/command-chunks/chunk-LHL6RWGJ.js +548 -0
  151. package/dist/safe-bash/command-chunks/chunk-LHRXDH45.js +164 -0
  152. package/dist/safe-bash/command-chunks/chunk-LQOKYG3O.js +153 -0
  153. package/dist/safe-bash/command-chunks/chunk-LRDME6WV.js +12 -0
  154. package/dist/safe-bash/command-chunks/chunk-LWVDJB5S.js +305 -0
  155. package/dist/safe-bash/command-chunks/chunk-M57GLLK4.js +27 -0
  156. package/dist/safe-bash/command-chunks/chunk-MAHX3IW3.js +108 -0
  157. package/dist/safe-bash/command-chunks/{chunk-LQZSR6DT.js → chunk-MDV7W5AS.js} +2 -2
  158. package/dist/safe-bash/command-chunks/chunk-MG7AJD5E.js +168 -0
  159. package/dist/safe-bash/command-chunks/chunk-MHJ3DQUE.js +213 -0
  160. package/dist/safe-bash/command-chunks/chunk-MLGNBD7V.js +552 -0
  161. package/dist/safe-bash/command-chunks/chunk-MN2M33JK.js +237 -0
  162. package/dist/safe-bash/command-chunks/chunk-MOL3TRBT.js +32 -0
  163. package/dist/safe-bash/command-chunks/chunk-MQFXMBGD.js +75 -0
  164. package/dist/safe-bash/command-chunks/chunk-MQPWE22J.js +171 -0
  165. package/dist/safe-bash/command-chunks/chunk-MQU6Q75R.js +523 -0
  166. package/dist/safe-bash/command-chunks/chunk-MWAAMNAM.js +353 -0
  167. package/dist/safe-bash/command-chunks/chunk-MZ4BTMTI.js +240 -0
  168. package/dist/safe-bash/command-chunks/chunk-N4DY4FPA.js +679 -0
  169. package/dist/safe-bash/command-chunks/chunk-N74TJL6X.js +183 -0
  170. package/dist/safe-bash/command-chunks/chunk-NA5Q4V2H.js +304 -0
  171. package/dist/safe-bash/command-chunks/chunk-NSM366N6.js +22 -0
  172. package/dist/safe-bash/command-chunks/chunk-NY4ZPV3N.js +523 -0
  173. package/dist/safe-bash/command-chunks/chunk-NYBF2BVE.js +17 -0
  174. package/dist/safe-bash/command-chunks/chunk-OBK24KGM.js +24 -0
  175. package/dist/safe-bash/command-chunks/{chunk-GDAS4LY7.js → chunk-OEKLEUUW.js} +4 -4
  176. package/dist/safe-bash/command-chunks/chunk-OGWJD5QP.js +404 -0
  177. package/dist/safe-bash/command-chunks/chunk-OIPATOZW.js +154 -0
  178. package/dist/safe-bash/command-chunks/chunk-OP6J3OLL.js +243 -0
  179. package/dist/safe-bash/command-chunks/chunk-OTTMIB3C.js +266 -0
  180. package/dist/safe-bash/command-chunks/{chunk-OZHPB4KD.js → chunk-OU4VE5CR.js} +12 -12
  181. package/dist/safe-bash/command-chunks/chunk-P42REFYL.js +228 -0
  182. package/dist/safe-bash/command-chunks/{chunk-YJ3TFZB2.js → chunk-PQOAM5SC.js} +1 -1
  183. package/dist/safe-bash/command-chunks/chunk-PQOIOVF2.js +444 -0
  184. package/dist/safe-bash/command-chunks/chunk-PRQEVUNE.js +205 -0
  185. package/dist/safe-bash/command-chunks/{chunk-W5OR7COJ.js → chunk-PVLPWVRH.js} +21 -21
  186. package/dist/safe-bash/command-chunks/{chunk-BNG4ZMZ3.js → chunk-PXL4NBYP.js} +1 -78
  187. package/dist/safe-bash/command-chunks/chunk-Q6W5FRZG.js +41 -0
  188. package/dist/safe-bash/command-chunks/{chunk-KLCHCSIV.js → chunk-QGD64UHJ.js} +1 -1
  189. package/dist/safe-bash/command-chunks/chunk-QHS7PDG3.js +188 -0
  190. package/dist/safe-bash/command-chunks/chunk-QXCSASIE.js +151 -0
  191. package/dist/safe-bash/command-chunks/chunk-QYCBVKFT.js +255 -0
  192. package/dist/safe-bash/command-chunks/chunk-R4TYL2G6.js +1529 -0
  193. package/dist/safe-bash/command-chunks/chunk-RAXJVM4U.js +625 -0
  194. package/dist/safe-bash/command-chunks/chunk-RBFZYSZZ.js +207 -0
  195. package/dist/safe-bash/command-chunks/chunk-RJHVJZ4H.js +185 -0
  196. package/dist/safe-bash/command-chunks/chunk-RKPPUYZE.js +213 -0
  197. package/dist/safe-bash/command-chunks/chunk-RMJNV6Q7.js +23 -0
  198. package/dist/safe-bash/command-chunks/{chunk-MR2RLUPV.js → chunk-RQHQCJMV.js} +11 -9
  199. package/dist/safe-bash/command-chunks/chunk-RR6QQ25D.js +71 -0
  200. package/dist/safe-bash/command-chunks/{chunk-JW3KIZU6.js → chunk-RUXY7GN5.js} +1 -1
  201. package/dist/safe-bash/command-chunks/chunk-RZC7QHL6.js +112 -0
  202. package/dist/safe-bash/command-chunks/chunk-RZJRR4UJ.js +1677 -0
  203. package/dist/safe-bash/command-chunks/chunk-S4OBYRNI.js +639 -0
  204. package/dist/safe-bash/command-chunks/{chunk-DQNDEWCI.js → chunk-S65T5JJO.js} +12 -12
  205. package/dist/safe-bash/command-chunks/chunk-S6PPBBXX.js +77 -0
  206. package/dist/safe-bash/command-chunks/chunk-SCG4LK5U.js +265 -0
  207. package/dist/safe-bash/command-chunks/chunk-SDTC2BLK.js +143 -0
  208. package/dist/safe-bash/command-chunks/chunk-SEK43FRN.js +357 -0
  209. package/dist/safe-bash/command-chunks/chunk-SH45NZ2P.js +194 -0
  210. package/dist/safe-bash/command-chunks/chunk-SM733XRT.js +250 -0
  211. package/dist/safe-bash/command-chunks/chunk-SSRGI476.js +116 -0
  212. package/dist/safe-bash/command-chunks/chunk-SUUD352U.js +127 -0
  213. package/dist/safe-bash/command-chunks/{chunk-B5F2KQYA.js → chunk-SWUVHT7G.js} +1 -1
  214. package/dist/safe-bash/command-chunks/chunk-TBAH4XGI.js +38 -0
  215. package/dist/safe-bash/command-chunks/chunk-TBVWTZTR.js +469 -0
  216. package/dist/safe-bash/command-chunks/chunk-TGHQGJNR.js +144 -0
  217. package/dist/safe-bash/command-chunks/{chunk-Q6JLT2EY.js → chunk-TL3KDYEM.js} +8 -110
  218. package/dist/safe-bash/command-chunks/chunk-TVAEX4WQ.js +473 -0
  219. package/dist/safe-bash/command-chunks/chunk-TZ2J6LGM.js +163 -0
  220. package/dist/safe-bash/command-chunks/chunk-UICO7H6S.js +186 -0
  221. package/dist/safe-bash/command-chunks/chunk-UJTJFMIN.js +501 -0
  222. package/dist/safe-bash/command-chunks/chunk-UMWWCLBG.js +109 -0
  223. package/dist/safe-bash/command-chunks/chunk-UPXFSGQG.js +134 -0
  224. package/dist/safe-bash/command-chunks/chunk-UWUYSXYT.js +272 -0
  225. package/dist/safe-bash/command-chunks/{chunk-5FMXQUDY.js → chunk-UZOGSYJP.js} +1 -1
  226. package/dist/safe-bash/command-chunks/chunk-V3RGA5PS.js +125 -0
  227. package/dist/safe-bash/command-chunks/chunk-VEUQWV2V.js +287 -0
  228. package/dist/safe-bash/command-chunks/chunk-VGKYTZT5.js +161 -0
  229. package/dist/safe-bash/command-chunks/chunk-VQUEIEVP.js +410 -0
  230. package/dist/safe-bash/command-chunks/chunk-VU3YUC3U.js +169 -0
  231. package/dist/safe-bash/command-chunks/chunk-W32KW66B.js +27 -0
  232. package/dist/safe-bash/command-chunks/chunk-W543LSYH.js +899 -0
  233. package/dist/safe-bash/command-chunks/chunk-W5YFDYHO.js +387 -0
  234. package/dist/safe-bash/command-chunks/chunk-W6DV2CLS.js +267 -0
  235. package/dist/safe-bash/command-chunks/chunk-WAKYUXVQ.js +215 -0
  236. package/dist/safe-bash/command-chunks/chunk-WGOL3MM6.js +125 -0
  237. package/dist/safe-bash/command-chunks/{chunk-N2A7V3WY.js → chunk-WHNYT34N.js} +3 -3
  238. package/dist/safe-bash/command-chunks/chunk-WOZCIRJ5.js +169 -0
  239. package/dist/safe-bash/command-chunks/chunk-WVB6ONZS.js +232 -0
  240. package/dist/safe-bash/command-chunks/chunk-WVESNAND.js +25 -0
  241. package/dist/safe-bash/command-chunks/chunk-XDEA3TL5.js +322 -0
  242. package/dist/safe-bash/command-chunks/chunk-XFEUWSYG.js +357 -0
  243. package/dist/safe-bash/command-chunks/chunk-XFMJ4RMS.js +2849 -0
  244. package/dist/safe-bash/command-chunks/chunk-XH6DXJHX.js +196 -0
  245. package/dist/safe-bash/command-chunks/chunk-XNJ67APB.js +6 -0
  246. package/dist/safe-bash/command-chunks/chunk-XP6BHGZ6.js +227 -0
  247. package/dist/safe-bash/command-chunks/chunk-XXFHTGV2.js +142 -0
  248. package/dist/safe-bash/command-chunks/chunk-Y5GI5PVT.js +139 -0
  249. package/dist/safe-bash/command-chunks/chunk-Y6KHC3JB.js +177 -0
  250. package/dist/safe-bash/command-chunks/{chunk-2UWPMSME.js → chunk-Y72LPXST.js} +8 -8
  251. package/dist/safe-bash/command-chunks/chunk-YDRWQZNB.js +69 -0
  252. package/dist/safe-bash/command-chunks/{chunk-P4OJBL2B.js → chunk-YFZ6FPIC.js} +1 -1
  253. package/dist/safe-bash/command-chunks/chunk-YH4DC4RP.js +171 -0
  254. package/dist/safe-bash/command-chunks/chunk-YH7KKMMN.js +463 -0
  255. package/dist/safe-bash/command-chunks/{chunk-MN3BB4WW.js → chunk-YP3WWV5N.js} +4 -4
  256. package/dist/safe-bash/command-chunks/chunk-YPVBU7QF.js +2817 -0
  257. package/dist/safe-bash/command-chunks/chunk-YQYVEVUE.js +1621 -0
  258. package/dist/safe-bash/command-chunks/chunk-YRNBIU5U.js +175 -0
  259. package/dist/safe-bash/command-chunks/chunk-Z7ESJVFP.js +10 -0
  260. package/dist/safe-bash/command-chunks/chunk-ZTAFAHY3.js +653 -0
  261. package/dist/safe-bash/command-chunks/chunk-ZXKOMB24.js +85 -0
  262. package/dist/safe-bash/command-chunks/{clipboard-XCSQACOK-SHFXT53F.js → clipboard-6SDGQGC3-TVJ3CG7A.js} +4 -4
  263. package/dist/safe-bash/command-chunks/{command-engine-4TEGTXCQ.js → command-engine-KMLHVFMA.js} +356 -316
  264. package/dist/safe-bash/command-chunks/{engine-QDC5VCGO-LYAAFESF.js → engine-EOYR2WTY-KUFLFTDE.js} +2 -4
  265. package/dist/safe-bash/command-chunks/{gnumeric-OCFH63UT-YI7SG7TN.js → gnumeric-ABKSRBZJ-MPIIPXKP.js} +3 -3
  266. package/dist/safe-bash/command-chunks/inspection-command-ULEU7ZVV.js +7 -0
  267. package/dist/safe-bash/command-chunks/model-store-JUFU3RSW.js +54 -0
  268. package/dist/safe-bash/command-chunks/pdf-22JDKKAR-UDWNSWYB.js +338 -0
  269. package/dist/safe-bash/command-chunks/{pptx-XG3YSXWZ-XAG36NAB.js → pptx-YDKHIGCD-H7FU4VMJ.js} +2 -2
  270. package/dist/safe-bash/commands/bc/index.browser.js +2 -2
  271. package/dist/safe-bash/commands/diffpdf/index.d.ts +2 -0
  272. package/dist/safe-bash/commands/diffpdf/index.js +2 -0
  273. package/dist/safe-bash/commands/dot/index.d.ts +2 -0
  274. package/dist/safe-bash/commands/dot/index.js +2 -0
  275. package/dist/safe-bash/commands/llm/collections.browser.js +6 -0
  276. package/dist/safe-bash/commands/llm/collections.d.ts +2 -0
  277. package/dist/safe-bash/commands/llm/collections.js +2 -0
  278. package/dist/safe-bash/commands/pandoc/index.browser.js +1 -1
  279. package/dist/safe-bash/commands/rsvg-convert/index.d.ts +2 -0
  280. package/dist/safe-bash/commands/rsvg-convert/index.js +2 -0
  281. package/dist/safe-bash/commands/safejs/io.d.ts +1 -1
  282. package/dist/safe-bash/commands/safejs/io.js +1 -1
  283. package/dist/safe-bash/commands/safejs/options.d.ts +1 -1
  284. package/dist/safe-bash/commands/safejs/options.js +1 -1
  285. package/dist/safe-bash/commands/safejs/render.d.ts +1 -1
  286. package/dist/safe-bash/commands/safejs/render.js +1 -1
  287. package/dist/safe-bash/commands/safejs/runtime.d.ts +1 -1
  288. package/dist/safe-bash/commands/safejs/runtime.js +1 -1
  289. package/dist/safe-bash/commands/safejs/types.d.ts +1 -1
  290. package/dist/safe-bash/commands/safejs/types.js +1 -1
  291. package/dist/safe-bash/commands/wdiff/index.d.ts +2 -0
  292. package/dist/safe-bash/commands/wdiff/index.js +2 -0
  293. package/dist/safe-bash/core.d.ts +4 -0
  294. package/dist/safe-bash/core.js +4 -0
  295. package/dist/safe-bash/full-core.browser.js +59 -35
  296. package/dist/safe-bash/optional-host.browser.js +7 -7
  297. package/dist/safe-bash/plugins/index.browser.js +7 -7
  298. package/dist/safe-bash/registry-entry.browser.js +6 -6
  299. package/dist/safe-bash/search.browser.js +2 -2
  300. package/dist/safe-bash/shell-entry.browser.js +3 -3
  301. package/dist/safe-bash-checksum-engine/index.js +83 -40
  302. package/dist/safe-bash-checksum-engine/md5.d.ts +2 -0
  303. package/dist/safe-bash-checksum-engine/md5.js +7 -0
  304. package/dist/safe-bash-command-awk/awk-inspection.js +2 -2
  305. package/dist/safe-bash-command-awk/awk-runtime.js +2 -2
  306. package/dist/safe-bash-command-awk/awk.js +7 -7
  307. package/dist/safe-bash-command-awk/index.js +7 -7
  308. package/dist/safe-bash-command-chmod/command.js +1 -1
  309. package/dist/safe-bash-command-chmod/index.js +1 -1
  310. package/dist/safe-bash-command-csvkit/index.js +6 -6
  311. package/dist/safe-bash-command-diff/index.js +3 -3
  312. package/dist/safe-bash-command-diffpdf/LICENSE +21 -0
  313. package/dist/safe-bash-command-diffpdf/index.d.ts +12 -0
  314. package/dist/safe-bash-command-diffpdf/index.js +107 -0
  315. package/dist/safe-bash-command-docx/command.d.ts +36 -0
  316. package/dist/{safe-bash-docx-engine → safe-bash-command-docx}/discovery.d.ts +4 -4
  317. package/dist/safe-bash-command-docx/index.js +1 -1
  318. package/dist/{safe-bash-docx-engine → safe-bash-command-docx}/inspection-command.d.ts +6 -6
  319. package/dist/safe-bash-command-docx/sdk.d.ts +4 -0
  320. package/dist/safe-bash-command-docx/sdk.js +24 -0
  321. package/dist/safe-bash-command-dot/LICENSE +21 -0
  322. package/dist/safe-bash-command-dot/index.d.ts +14 -0
  323. package/dist/safe-bash-command-dot/index.js +1298 -0
  324. package/dist/safe-bash-command-du/arguments.d.ts +1 -1
  325. package/dist/safe-bash-command-du/arguments.js +1 -1
  326. package/dist/safe-bash-command-du/du.js +2 -2
  327. package/dist/safe-bash-command-du/index.js +2 -2
  328. package/dist/safe-bash-command-factor/command.js +2 -2
  329. package/dist/safe-bash-command-factor/index.js +2 -2
  330. package/dist/safe-bash-command-ffmpeg/index.js +16 -16
  331. package/dist/safe-bash-command-imagemagick/index.js +21 -53
  332. package/dist/safe-bash-command-llm/collections-embed.d.ts +23 -0
  333. package/dist/safe-bash-command-llm/collections.d.ts +38 -0
  334. package/dist/safe-bash-command-llm/collections.js +423 -0
  335. package/dist/safe-bash-command-llm/command.js +4 -2
  336. package/dist/safe-bash-command-llm/index.js +12 -8
  337. package/dist/safe-bash-command-llm/openai.js +4 -3
  338. package/dist/safe-bash-command-llm/providers/index.js +6 -4
  339. package/dist/safe-bash-command-llm/providers/openai.js +4 -3
  340. package/dist/safe-bash-command-node/commands/node/browser.js +9 -12
  341. package/dist/safe-bash-command-node/commands/node/buffer.js +2 -2
  342. package/dist/safe-bash-command-node/commands/node/default-runtime.js +9 -12
  343. package/dist/safe-bash-command-node/commands/node/filesystem.js +3 -3
  344. package/dist/safe-bash-command-node/commands/node/safejs.js +9 -12
  345. package/dist/safe-bash-command-node/commands/node/source-maps.js +2 -2
  346. package/dist/safe-bash-command-node/commands/node/timers.js +3 -3
  347. package/dist/safe-bash-command-node/commands/safejs/io.d.ts +1 -35
  348. package/dist/safe-bash-command-node/commands/safejs/io.js +3 -7
  349. package/dist/safe-bash-command-node/commands/safejs/options.d.ts +2 -22
  350. package/dist/safe-bash-command-node/commands/safejs/options.js +1 -1
  351. package/dist/safe-bash-command-node/commands/safejs/render.d.ts +1 -1
  352. package/dist/safe-bash-command-node/commands/safejs/render.js +3 -5
  353. package/dist/safe-bash-command-node/commands/safejs/runtime.d.ts +2 -25
  354. package/dist/safe-bash-command-node/commands/safejs/runtime.js +1 -7
  355. package/dist/safe-bash-command-node/commands/safejs/types.d.ts +2 -85
  356. package/dist/safe-bash-command-node/commands/safejs/types.js +1 -1
  357. package/dist/safe-bash-command-node/integrations/safejs/filesystem.d.ts +2 -5
  358. package/dist/safe-bash-command-node/integrations/safejs/filesystem.js +3 -3
  359. package/dist/safe-bash-command-node/integrations/safejs/shell.js +1 -1
  360. package/dist/safe-bash-command-node/integrations/safejs/values.d.ts +1 -7
  361. package/dist/safe-bash-command-node/integrations/safejs/values.js +1 -1
  362. package/dist/safe-bash-command-openssl/index.js +15452 -420
  363. package/dist/safe-bash-command-pandoc/command.js +1 -1
  364. package/dist/safe-bash-command-pandoc/index.js +1 -1
  365. package/dist/safe-bash-command-patch/index.js +5 -5
  366. package/dist/safe-bash-command-patch/patch.js +4 -4
  367. package/dist/safe-bash-command-playwright-cli/index.js +25 -25
  368. package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +8 -8
  369. package/dist/safe-bash-command-playwright-cli/playwright/controller.js +16 -16
  370. package/dist/safe-bash-command-playwright-cli/playwright/index.js +25 -25
  371. package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +4 -4
  372. package/dist/{safe-bash-pptx-engine → safe-bash-command-pptx}/command-engine.d.ts +5 -13
  373. package/dist/safe-bash-command-pptx/engine.d.ts +4 -0
  374. package/dist/safe-bash-command-pptx/engine.js +37 -0
  375. package/dist/safe-bash-command-pptx/index.js +1 -1
  376. package/dist/safe-bash-command-python/executor.js +15 -15
  377. package/dist/safe-bash-command-python/index.js +15 -15
  378. package/dist/safe-bash-command-python/jspi.js +4 -4
  379. package/dist/safe-bash-command-qrencode/index.js +1 -4
  380. package/dist/safe-bash-command-rsvg-convert/LICENSE +21 -0
  381. package/dist/safe-bash-command-rsvg-convert/index.d.ts +13 -0
  382. package/dist/safe-bash-command-rsvg-convert/index.js +84 -0
  383. package/dist/safe-bash-command-safejs/LICENSE +21 -0
  384. package/dist/safe-bash-command-safejs/filesystem.d.ts +5 -0
  385. package/dist/safe-bash-command-safejs/filesystem.js +7 -0
  386. package/dist/safe-bash-command-safejs/index.d.ts +4 -0
  387. package/dist/safe-bash-command-safejs/index.js +19 -0
  388. package/dist/safe-bash-command-safejs/io.d.ts +35 -0
  389. package/dist/safe-bash-command-safejs/io.js +12 -0
  390. package/dist/safe-bash-command-safejs/options.d.ts +22 -0
  391. package/dist/safe-bash-command-safejs/options.js +11 -0
  392. package/dist/safe-bash-command-safejs/render.d.ts +1 -0
  393. package/dist/safe-bash-command-safejs/render.js +9 -0
  394. package/dist/safe-bash-command-safejs/runtime.d.ts +25 -0
  395. package/dist/safe-bash-command-safejs/runtime.js +13 -0
  396. package/dist/safe-bash-command-safejs/types.d.ts +85 -0
  397. package/dist/safe-bash-command-safejs/types.js +7 -0
  398. package/dist/safe-bash-command-safejs/values.d.ts +7 -0
  399. package/dist/safe-bash-command-safejs/values.js +19 -0
  400. package/dist/safe-bash-command-sips/index.js +1 -14
  401. package/dist/safe-bash-command-ssconvert/index.js +413 -546
  402. package/dist/safe-bash-command-ssconvert/rendering/chart/axis.d.ts +1 -26
  403. package/dist/safe-bash-command-ssconvert/rendering/chart/error-bar.d.ts +1 -39
  404. package/dist/safe-bash-command-ssconvert/rendering/chart/layout.d.ts +1 -24
  405. package/dist/safe-bash-command-ssconvert/rendering/chart/line.d.ts +1 -23
  406. package/dist/safe-bash-command-ssconvert/rendering/chart/marker.d.ts +1 -35
  407. package/dist/safe-bash-command-ssconvert/rendering/chart/pie.d.ts +1 -32
  408. package/dist/safe-bash-command-ssconvert/rendering/images/index.d.ts +1 -26
  409. package/dist/safe-bash-command-ssconvert/rendering/print/header-footer.d.ts +1 -16
  410. package/dist/safe-bash-command-ssconvert/rendering/print/layout.d.ts +1 -65
  411. package/dist/safe-bash-command-ssconvert/rendering/print/pagination.d.ts +1 -34
  412. package/dist/safe-bash-command-tar/create.js +4 -4
  413. package/dist/safe-bash-command-tar/extract.js +4 -4
  414. package/dist/safe-bash-command-tar/index.js +16 -14
  415. package/dist/safe-bash-command-tar/modes.js +6 -6
  416. package/dist/safe-bash-command-tar/options.d.ts +3 -1
  417. package/dist/safe-bash-command-tar/options.js +1 -1
  418. package/dist/safe-bash-command-unzip/index.js +4 -4
  419. package/dist/safe-bash-command-wdiff/LICENSE +21 -0
  420. package/dist/safe-bash-command-wdiff/index.d.ts +12 -0
  421. package/dist/safe-bash-command-wdiff/index.js +123 -0
  422. package/dist/safe-bash-compression-engine/bounded-codec.js +2 -2
  423. package/dist/safe-bash-compression-engine/codec-loader.js +1 -1
  424. package/dist/safe-bash-compression-engine/files.js +5 -5
  425. package/dist/safe-bash-compression-engine/index.js +4 -4
  426. package/dist/safe-bash-compression-engine/operand.js +5 -5
  427. package/dist/safe-bash-compression-engine/stream.js +4 -4
  428. package/dist/safe-bash-compression-engine/zstd-decode.js +3 -3
  429. package/dist/safe-bash-contracts/escaping.js +2 -2
  430. package/dist/safe-bash-contracts/index.js +15 -15
  431. package/dist/safe-bash-docx-engine/admission.js +31 -0
  432. package/dist/safe-bash-docx-engine/ancillary-resources.js +38 -0
  433. package/dist/safe-bash-docx-engine/archive.js +24 -0
  434. package/dist/safe-bash-docx-engine/argument-json.js +25 -0
  435. package/dist/safe-bash-docx-engine/batch-operations.d.ts +7 -0
  436. package/dist/safe-bash-docx-engine/batch-operations.js +95 -0
  437. package/dist/safe-bash-docx-engine/batch-result-schema.d.ts +2 -0
  438. package/dist/safe-bash-docx-engine/batch-result-schema.js +145 -0
  439. package/dist/safe-bash-docx-engine/batch.js +106 -0
  440. package/dist/safe-bash-docx-engine/bookmarks.js +43 -0
  441. package/dist/safe-bash-docx-engine/budget.js +18 -0
  442. package/dist/safe-bash-docx-engine/charts.js +35 -0
  443. package/dist/safe-bash-docx-engine/command-option-rules.d.ts +1 -0
  444. package/dist/safe-bash-docx-engine/command-option-rules.js +24 -0
  445. package/dist/safe-bash-docx-engine/command-properties.d.ts +1 -0
  446. package/dist/safe-bash-docx-engine/command-properties.js +18 -0
  447. package/dist/safe-bash-docx-engine/command-selection.d.ts +1 -0
  448. package/dist/safe-bash-docx-engine/command-selection.js +15 -0
  449. package/dist/safe-bash-docx-engine/comments.js +53 -0
  450. package/dist/safe-bash-docx-engine/control-bindings.js +45 -0
  451. package/dist/safe-bash-docx-engine/control-repeat.js +46 -0
  452. package/dist/safe-bash-docx-engine/controls.js +52 -0
  453. package/dist/safe-bash-docx-engine/create.js +36 -0
  454. package/dist/safe-bash-docx-engine/diagrams.js +43 -0
  455. package/dist/safe-bash-docx-engine/diff.js +33 -0
  456. package/dist/safe-bash-docx-engine/discovery-result-schema.d.ts +72 -0
  457. package/dist/safe-bash-docx-engine/discovery-result-schema.js +36 -0
  458. package/dist/safe-bash-docx-engine/document-properties.js +43 -0
  459. package/dist/safe-bash-docx-engine/equations.js +53 -0
  460. package/dist/safe-bash-docx-engine/extract.js +40 -0
  461. package/dist/safe-bash-docx-engine/fields.js +48 -0
  462. package/dist/safe-bash-docx-engine/font-inventory.js +40 -0
  463. package/dist/safe-bash-docx-engine/font-resources.js +33 -0
  464. package/dist/safe-bash-docx-engine/image-batch-operations.d.ts +4 -0
  465. package/dist/safe-bash-docx-engine/image-batch-operations.js +35 -0
  466. package/dist/safe-bash-docx-engine/image-insertion.js +46 -0
  467. package/dist/safe-bash-docx-engine/image-layout.js +43 -0
  468. package/dist/safe-bash-docx-engine/image-replacement.js +48 -0
  469. package/dist/safe-bash-docx-engine/images.js +49 -0
  470. package/dist/safe-bash-docx-engine/index.d.ts +1 -3
  471. package/dist/safe-bash-docx-engine/index.js +369 -19350
  472. package/dist/safe-bash-docx-engine/inspection.js +49 -0
  473. package/dist/safe-bash-docx-engine/invocation.d.ts +50 -0
  474. package/dist/safe-bash-docx-engine/invocation.js +66 -0
  475. package/dist/safe-bash-docx-engine/io-errors.js +11 -0
  476. package/dist/safe-bash-docx-engine/io.js +29 -0
  477. package/dist/safe-bash-docx-engine/links.js +47 -0
  478. package/dist/safe-bash-docx-engine/lists.js +46 -0
  479. package/dist/safe-bash-docx-engine/location-token.js +27 -0
  480. package/dist/safe-bash-docx-engine/locations.js +39 -0
  481. package/dist/safe-bash-docx-engine/model-context.js +15 -0
  482. package/dist/safe-bash-docx-engine/model-errors.js +13 -0
  483. package/dist/safe-bash-docx-engine/notes.js +48 -0
  484. package/dist/safe-bash-docx-engine/objects.js +49 -0
  485. package/dist/safe-bash-docx-engine/operation-json-schema.js +21 -0
  486. package/dist/safe-bash-docx-engine/operation-schema.js +29 -0
  487. package/dist/safe-bash-docx-engine/pack-uri-batch-operations.d.ts +3 -0
  488. package/dist/safe-bash-docx-engine/pack-uri-batch-operations.js +15 -0
  489. package/dist/safe-bash-docx-engine/pack.js +38 -0
  490. package/dist/safe-bash-docx-engine/package-view-batch-operations.d.ts +4 -0
  491. package/dist/safe-bash-docx-engine/package-view-batch-operations.js +47 -0
  492. package/dist/safe-bash-docx-engine/package-xml.js +25 -0
  493. package/dist/safe-bash-docx-engine/pandoc-adapter.js +55 -6
  494. package/dist/safe-bash-docx-engine/paragraph-edit.js +52 -0
  495. package/dist/safe-bash-docx-engine/part-provider.js +18 -0
  496. package/dist/safe-bash-docx-engine/property-values.js +46 -0
  497. package/dist/safe-bash-docx-engine/publication.js +40 -0
  498. package/dist/safe-bash-docx-engine/removal.js +44 -0
  499. package/dist/safe-bash-docx-engine/revision-decisions.js +46 -0
  500. package/dist/safe-bash-docx-engine/revision-edit.js +43 -0
  501. package/dist/safe-bash-docx-engine/revisions.js +42 -0
  502. package/dist/safe-bash-docx-engine/run-format.js +43 -0
  503. package/dist/safe-bash-docx-engine/sanitize.js +59 -0
  504. package/dist/safe-bash-docx-engine/sections.js +47 -0
  505. package/dist/safe-bash-docx-engine/settings.js +36 -0
  506. package/dist/safe-bash-docx-engine/shape-edit.js +47 -0
  507. package/dist/safe-bash-docx-engine/signatures.js +42 -0
  508. package/dist/safe-bash-docx-engine/simple-selection.d.ts +1 -1
  509. package/dist/safe-bash-docx-engine/stories.js +48 -0
  510. package/dist/safe-bash-docx-engine/structure-model-batch-operations.d.ts +3 -0
  511. package/dist/safe-bash-docx-engine/structure-model-batch-operations.js +64 -0
  512. package/dist/safe-bash-docx-engine/style-model-batch-operations.js +57 -0
  513. package/dist/safe-bash-docx-engine/style-model-result-schema.d.ts +4 -0
  514. package/dist/safe-bash-docx-engine/style-model-result-schema.js +76 -0
  515. package/dist/safe-bash-docx-engine/styles.js +44 -0
  516. package/dist/safe-bash-docx-engine/table-edit.js +52 -0
  517. package/dist/safe-bash-docx-engine/table-read.js +38 -0
  518. package/dist/safe-bash-docx-engine/template.js +45 -0
  519. package/dist/safe-bash-docx-engine/text-replace.js +47 -0
  520. package/dist/safe-bash-docx-engine/text-resource-read.js +42 -0
  521. package/dist/safe-bash-docx-engine/text.js +36 -0
  522. package/dist/safe-bash-docx-engine/validation.js +30 -0
  523. package/dist/safe-bash-docx-engine/xml-parts.js +48 -0
  524. package/dist/safe-bash-markdown-engine/index.js +3 -3
  525. package/dist/safe-bash-network-engine/aggregate.js +3 -3
  526. package/dist/safe-bash-network-engine/args.js +3 -3
  527. package/dist/safe-bash-network-engine/body.js +4 -4
  528. package/dist/safe-bash-network-engine/decode.js +3 -3
  529. package/dist/safe-bash-network-engine/fetch-transport.js +3 -3
  530. package/dist/safe-bash-network-engine/index.js +3 -3
  531. package/dist/safe-bash-network-engine/output.js +3 -3
  532. package/dist/safe-bash-network-engine/platform-portable.js +3 -3
  533. package/dist/safe-bash-network-engine/shared.js +2 -2
  534. package/dist/safe-bash-network-engine/transfer.js +20 -20
  535. package/dist/safe-bash-pptx-engine/bytes.d.ts +1 -4
  536. package/dist/safe-bash-pptx-engine/bytes.js +2 -11
  537. package/dist/safe-bash-pptx-engine/index.d.ts +1 -103
  538. package/dist/safe-bash-pptx-engine/index.js +1 -662
  539. package/dist/safe-bash-presentation-engine/LICENSE +21 -0
  540. package/dist/safe-bash-presentation-engine/accessibility.js +43 -0
  541. package/dist/safe-bash-presentation-engine/animation-editing.js +29 -0
  542. package/dist/safe-bash-presentation-engine/animations.js +23 -0
  543. package/dist/safe-bash-presentation-engine/backgrounds.js +26 -0
  544. package/dist/safe-bash-presentation-engine/bytes.d.ts +4 -0
  545. package/dist/safe-bash-presentation-engine/bytes.js +13 -0
  546. package/dist/safe-bash-presentation-engine/chart-editing.js +60 -0
  547. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-enums.d.ts +2 -2
  548. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-object-operations.d.ts +1 -1
  549. package/dist/safe-bash-presentation-engine/chart-object-operations.js +35 -0
  550. package/dist/safe-bash-presentation-engine/charts.js +41 -0
  551. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/color-enums.d.ts +5 -5
  552. package/dist/safe-bash-presentation-engine/command-placeholder.js +64 -0
  553. package/dist/safe-bash-presentation-engine/comments.js +32 -0
  554. package/dist/safe-bash-presentation-engine/connector-operations.js +50 -0
  555. package/dist/safe-bash-presentation-engine/connectors.js +49 -0
  556. package/dist/safe-bash-presentation-engine/content-types.js +9 -0
  557. package/dist/safe-bash-presentation-engine/contracts.js +0 -0
  558. package/dist/safe-bash-presentation-engine/creation.js +15 -0
  559. package/dist/safe-bash-presentation-engine/diff.js +40 -0
  560. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/drawing-enums.d.ts +20 -20
  561. package/dist/safe-bash-presentation-engine/drawing-format.js +44 -0
  562. package/dist/safe-bash-presentation-engine/drawing-operations.js +41 -0
  563. package/dist/safe-bash-presentation-engine/drawing-schema.d.ts +1549 -0
  564. package/dist/safe-bash-presentation-engine/drawing-schema.js +33 -0
  565. package/dist/safe-bash-presentation-engine/equations.js +30 -0
  566. package/dist/safe-bash-presentation-engine/errors.js +23 -0
  567. package/dist/safe-bash-presentation-engine/fields.js +32 -0
  568. package/dist/safe-bash-presentation-engine/font-metrics.js +12 -0
  569. package/dist/safe-bash-presentation-engine/image-extraction.js +29 -0
  570. package/dist/safe-bash-presentation-engine/image-formatting.js +43 -0
  571. package/dist/safe-bash-presentation-engine/image-insertion.js +26 -0
  572. package/dist/safe-bash-presentation-engine/image-metadata.d.ts +9 -0
  573. package/dist/safe-bash-presentation-engine/image-metadata.js +9 -0
  574. package/dist/safe-bash-presentation-engine/image-replacement.js +30 -0
  575. package/dist/safe-bash-presentation-engine/image-value.js +15 -0
  576. package/dist/safe-bash-presentation-engine/images.js +30 -0
  577. package/dist/safe-bash-presentation-engine/index.d.ts +100 -0
  578. package/dist/safe-bash-presentation-engine/index.js +791 -0
  579. package/dist/safe-bash-presentation-engine/layouts.js +31 -0
  580. package/dist/safe-bash-presentation-engine/length.js +21 -0
  581. package/dist/safe-bash-presentation-engine/links.js +33 -0
  582. package/dist/safe-bash-presentation-engine/masters.js +54 -0
  583. package/dist/safe-bash-presentation-engine/media-editing.js +35 -0
  584. package/dist/safe-bash-presentation-engine/media-extraction.js +24 -0
  585. package/dist/safe-bash-presentation-engine/media.js +23 -0
  586. package/dist/safe-bash-presentation-engine/memberships.js +24 -0
  587. package/dist/safe-bash-presentation-engine/notes.js +27 -0
  588. package/dist/safe-bash-presentation-engine/ole-enum.js +10 -0
  589. package/dist/safe-bash-presentation-engine/ole-insertion.js +29 -0
  590. package/dist/safe-bash-presentation-engine/opaque-objects.js +21 -0
  591. package/dist/safe-bash-presentation-engine/package-reader.js +13 -0
  592. package/dist/safe-bash-presentation-engine/package-tools.js +25 -0
  593. package/dist/safe-bash-presentation-engine/package-uri.d.ts +13 -0
  594. package/dist/safe-bash-presentation-engine/package-uri.js +16 -0
  595. package/dist/safe-bash-presentation-engine/package-writer.js +13 -0
  596. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/presentation-model.d.ts +1 -1
  597. package/dist/safe-bash-presentation-engine/presentation-model.js +63 -0
  598. package/dist/safe-bash-presentation-engine/presentation-settings.js +25 -0
  599. package/dist/safe-bash-presentation-engine/properties.js +37 -0
  600. package/dist/safe-bash-presentation-engine/publication.d.ts +10 -0
  601. package/dist/safe-bash-presentation-engine/publication.js +0 -0
  602. package/dist/safe-bash-presentation-engine/relationships.js +16 -0
  603. package/dist/safe-bash-presentation-engine/resource-limits.js +8 -0
  604. package/dist/safe-bash-presentation-engine/sanitize.js +24 -0
  605. package/dist/safe-bash-presentation-engine/selector-schema.js +7 -0
  606. package/dist/safe-bash-presentation-engine/selectors.js +26 -0
  607. package/dist/safe-bash-presentation-engine/shape-groups.js +47 -0
  608. package/dist/safe-bash-presentation-engine/shape-operations.js +48 -0
  609. package/dist/safe-bash-presentation-engine/shape-path-operations.js +44 -0
  610. package/dist/safe-bash-presentation-engine/shape-paths.js +31 -0
  611. package/dist/safe-bash-presentation-engine/shape-presets.js +11 -0
  612. package/dist/safe-bash-presentation-engine/shape-selection.js +43 -0
  613. package/dist/safe-bash-presentation-engine/shape-transforms.js +28 -0
  614. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-types.d.ts +1 -1
  615. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shapes.d.ts +1 -1
  616. package/dist/safe-bash-presentation-engine/shapes.js +66 -0
  617. package/dist/safe-bash-presentation-engine/slide-copy.js +24 -0
  618. package/dist/safe-bash-presentation-engine/slide-import.js +27 -0
  619. package/dist/safe-bash-presentation-engine/slide-merge-split.js +33 -0
  620. package/dist/safe-bash-presentation-engine/slide-model.js +74 -0
  621. package/dist/safe-bash-presentation-engine/slide-removal.js +25 -0
  622. package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +17 -0
  623. package/dist/safe-bash-presentation-engine/slides.js +26 -0
  624. package/dist/safe-bash-presentation-engine/table-operations.js +51 -0
  625. package/dist/safe-bash-presentation-engine/table-spans.js +42 -0
  626. package/dist/safe-bash-presentation-engine/tables.js +45 -0
  627. package/dist/safe-bash-presentation-engine/tags.js +25 -0
  628. package/dist/safe-bash-presentation-engine/template-bindings.js +44 -0
  629. package/dist/safe-bash-presentation-engine/template-repeat.js +51 -0
  630. package/dist/safe-bash-presentation-engine/text-fitting.js +39 -0
  631. package/dist/safe-bash-presentation-engine/text-frames.js +52 -0
  632. package/dist/safe-bash-presentation-engine/text-paragraphs.js +58 -0
  633. package/dist/safe-bash-presentation-engine/text-reading.js +23 -0
  634. package/dist/safe-bash-presentation-engine/text-replacement.js +24 -0
  635. package/dist/safe-bash-presentation-engine/text-runs.js +45 -0
  636. package/dist/safe-bash-presentation-engine/themes.js +31 -0
  637. package/dist/safe-bash-presentation-engine/transitions.js +27 -0
  638. package/dist/safe-bash-presentation-engine/validation.js +14 -0
  639. package/dist/safe-bash-presentation-engine/xml-parts.js +25 -0
  640. package/dist/safe-bash-presentation-engine/xml-view.js +8 -0
  641. package/dist/safe-bash-presentation-engine/xml.js +8 -0
  642. package/dist/safe-bash-sqlite-engine/sqlite-edit-snapshot.d.ts +15 -0
  643. package/dist/safe-bash-sqlite-engine/sqlite-finalization.d.ts +7 -0
  644. package/dist/safe-bash-sqlite-engine/sqlite-pages.d.ts +18 -0
  645. package/dist/safe-bash-sqlite-engine/sqlite-record-read.d.ts +8 -0
  646. package/dist/safe-bash-sqlite-engine/sqlite-record-write.d.ts +20 -0
  647. package/dist/safe-bash-sqlite-engine/storage.d.ts +2 -0
  648. package/dist/safe-bash-sqlite-engine/storage.js +236 -55
  649. package/dist/safe-bash-svg-engine/LICENSE +21 -0
  650. package/dist/safe-bash-svg-engine/index.d.ts +8 -0
  651. package/dist/safe-bash-svg-engine/index.js +477 -0
  652. package/dist/safe-bash-zip-engine/index.js +3 -3
  653. package/dist/safe-bash-zip-engine/zip/repair.js +3 -3
  654. package/dist/safe-bash-zip-engine/zip/sfx.js +3 -3
  655. package/dist/safe-bash-zip-engine/zip-format.js +3 -3
  656. package/dist/safe-playwright-cloudflare/browser-provider.generated.js +55 -18
  657. package/dist/safe-playwright-cloudflare/browser-run-code-guest.generated.js +1 -1
  658. package/dist/spreadsheet-engine/datasource.js +4 -1
  659. package/dist/spreadsheet-engine/formulas/functions/math.js +3 -1
  660. package/dist/spreadsheet-engine/rendering/chart/axis.d.ts +26 -0
  661. package/dist/spreadsheet-engine/rendering/chart/axis.js +61 -0
  662. package/dist/spreadsheet-engine/rendering/chart/error-bar.d.ts +39 -0
  663. package/dist/spreadsheet-engine/rendering/chart/error-bar.js +59 -0
  664. package/dist/spreadsheet-engine/rendering/chart/layout.d.ts +24 -0
  665. package/dist/spreadsheet-engine/rendering/chart/layout.js +54 -0
  666. package/dist/spreadsheet-engine/rendering/chart/line.d.ts +23 -0
  667. package/dist/spreadsheet-engine/rendering/chart/line.js +56 -0
  668. package/dist/spreadsheet-engine/rendering/chart/marker.d.ts +35 -0
  669. package/dist/spreadsheet-engine/rendering/chart/marker.js +52 -0
  670. package/dist/spreadsheet-engine/rendering/chart/pie.d.ts +32 -0
  671. package/dist/spreadsheet-engine/rendering/chart/pie.js +47 -0
  672. package/dist/{safe-bash-command-ssconvert → spreadsheet-engine}/rendering/images/codecs.d.ts +0 -1
  673. package/dist/spreadsheet-engine/rendering/images/codecs.js +253 -0
  674. package/dist/spreadsheet-engine/rendering/images/index.d.ts +26 -0
  675. package/dist/spreadsheet-engine/rendering/images/index.js +144 -0
  676. package/dist/spreadsheet-engine/rendering/images/profile-raster.d.ts +4 -0
  677. package/dist/spreadsheet-engine/rendering/images/profile-raster.js +72 -0
  678. package/dist/spreadsheet-engine/rendering/images/scene.d.ts +3 -0
  679. package/dist/spreadsheet-engine/rendering/images/scene.js +34 -0
  680. package/dist/spreadsheet-engine/rendering/print/cell-style.d.ts +10 -0
  681. package/dist/spreadsheet-engine/rendering/print/cell-style.js +52 -0
  682. package/dist/spreadsheet-engine/rendering/print/font-normalization-data.d.ts +43 -0
  683. package/dist/spreadsheet-engine/rendering/print/font-normalization-data.js +1558 -0
  684. package/dist/spreadsheet-engine/rendering/print/font-normalization.d.ts +3 -0
  685. package/dist/spreadsheet-engine/rendering/print/font-normalization.js +113 -0
  686. package/dist/spreadsheet-engine/rendering/print/font-shaping.d.ts +18 -0
  687. package/dist/spreadsheet-engine/rendering/print/font-shaping.js +271 -0
  688. package/dist/spreadsheet-engine/rendering/print/harfbuzz/data.d.ts +1 -0
  689. package/dist/spreadsheet-engine/rendering/print/harfbuzz/data.js +2 -0
  690. package/dist/spreadsheet-engine/rendering/print/header-footer.d.ts +16 -0
  691. package/dist/spreadsheet-engine/rendering/print/header-footer.js +92 -0
  692. package/dist/spreadsheet-engine/rendering/print/layout.d.ts +65 -0
  693. package/dist/spreadsheet-engine/rendering/print/layout.js +75 -0
  694. package/dist/spreadsheet-engine/rendering/print/pagination.d.ts +34 -0
  695. package/dist/spreadsheet-engine/rendering/print/pagination.js +126 -0
  696. package/dist/spreadsheet-engine/rendering/print/settings.d.ts +42 -0
  697. package/dist/spreadsheet-engine/rendering/print/settings.js +159 -0
  698. package/dist/spreadsheet-format-xls/biff-metadata.js +3 -3
  699. package/dist/spreadsheet-format-xls/biff-write-metadata.d.ts +1 -1
  700. package/dist/spreadsheet-format-xls/biff-write-metadata.js +20 -3
  701. package/dist/spreadsheet-format-xls/biff-write.js +1 -1
  702. package/package.json +239 -12
  703. package/third-party/spreadsheet-engine/scripts/harfbuzz/README.md +39 -0
  704. package/third-party/spreadsheet-engine/scripts/harfbuzz/allocator.cc +18 -0
  705. package/third-party/spreadsheet-engine/scripts/harfbuzz/build.mjs +94 -0
  706. package/third-party/spreadsheet-engine/scripts/harfbuzz/completion.patch +98 -0
  707. package/third-party/spreadsheet-engine/scripts/harfbuzz/config-override.h +19 -0
  708. package/third-party/spreadsheet-engine/scripts/harfbuzz/exports.json +29 -0
  709. package/third-party/spreadsheet-engine/scripts/harfbuzz/sources.json +274 -0
  710. package/third-party/spreadsheet-engine/scripts/harfbuzz/verify.d.mts +10 -0
  711. package/third-party/spreadsheet-engine/scripts/harfbuzz/verify.mjs +96 -0
  712. package/third-party/spreadsheet-engine/scripts/harfbuzz/verify.test.mjs +60 -0
  713. package/third-party/spreadsheet-engine/src/rendering/images/NOTICE.md +22 -0
  714. package/third-party/spreadsheet-engine/src/rendering/print/NOTICE.md +30 -0
  715. package/third-party/spreadsheet-engine/src/rendering/print/font-normalization-NOTICE.md +64 -0
  716. package/third-party/spreadsheet-engine/src/rendering/print/font-normalization-data.ts +1558 -0
  717. package/third-party/spreadsheet-engine/src/rendering/print/font-normalization.ts +91 -0
  718. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/EMSCRIPTEN-LICENSE.txt +102 -0
  719. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/HARFBUZZ-LICENSE.txt +42 -0
  720. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/LIBCXX-LICENSE.txt +311 -0
  721. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/LIBCXXABI-LICENSE.txt +311 -0
  722. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/MUSL-LICENSE.txt +193 -0
  723. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/NOTICE.md +41 -0
  724. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/data.ts +2 -0
  725. package/dist/safe-bash/command-chunks/chunk-C5TUE2FE.js +0 -169
  726. package/dist/safe-bash/command-chunks/chunk-CVKW2YIC.js +0 -13631
  727. package/dist/safe-bash/command-chunks/chunk-JBGGUHQY.js +0 -17617
  728. package/dist/safe-bash/command-chunks/chunk-S4R2JDPL.js +0 -35
  729. package/dist/safe-bash/command-chunks/chunk-TU5IFVCX.js +0 -33708
  730. package/dist/safe-bash/command-chunks/chunk-TUWGIF22.js +0 -328
  731. package/dist/safe-bash/command-chunks/data-2FJOPYXA-PDKMLCGR.js +0 -8
  732. package/dist/safe-bash/command-chunks/index.browser-2NLML6H4.js +0 -269
  733. package/dist/safe-bash/command-chunks/model-store-EEI3QS4G.js +0 -10
  734. package/dist/safe-bash/command-chunks/pdf-M2GFAR2A-FCJMJCAP.js +0 -683
  735. package/dist/safe-bash-command-ssconvert/rendering/images/formats.d.ts +0 -2
  736. package/dist/safe-bash-docx-engine/command.d.ts +0 -65
  737. package/dist/safe-bash/chunks/{chunk-4T4RQYRI.js → chunk-5HRGBHZH.js} +10 -10
  738. package/dist/safe-bash/chunks/{chunk-QUS6X4MS.js → chunk-EOQMDRTY.js} +0 -0
  739. package/dist/safe-bash/command-chunks/{chunk-2L3JKGUH.js → chunk-4LYZBDZF.js} +4 -4
  740. package/dist/safe-bash/command-chunks/{chunk-EMMSXKEJ.js → chunk-4Q4R3VZU.js} +0 -0
  741. package/dist/safe-bash/command-chunks/{chunk-5RLK2QSY.js → chunk-7JEIWA3A.js} +5 -5
  742. package/dist/safe-bash/command-chunks/{chunk-AV6N7DDA.js → chunk-DDYPQAXN.js} +3 -3
  743. package/dist/safe-bash/command-chunks/{chunk-OOB7YCFQ.js → chunk-FMJKCVSQ.js} +3 -3
  744. package/dist/safe-bash/command-chunks/{chunk-FUL2C4EX.js → chunk-HFKS6AET.js} +3 -3
  745. package/dist/safe-bash/command-chunks/{chunk-2M3WUEDX.js → chunk-J6K5Q53O.js} +10 -10
  746. package/dist/safe-bash/command-chunks/{chunk-ATWMLV75.js → chunk-RJXZYDSN.js} +7 -7
  747. package/dist/safe-bash/command-chunks/{chunk-JD3NSHFT.js → chunk-TVGIJ56E.js} +3 -3
  748. package/dist/safe-bash/command-chunks/{chunk-3I33KPQH.js → chunk-X2HVVMTW.js} +6 -6
  749. package/dist/safe-bash/command-chunks/{odf-UKSXPNOZ-NCL5P7YL.js → odf-UKSXPNOZ-BV2LCKTB.js} +0 -0
  750. package/dist/{safe-bash/command-chunks/chunk-3SVT5VB7.js → safe-bash-docx-engine/operation-types.js} +0 -0
  751. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/accessibility.d.ts +0 -0
  752. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/animation-editing.d.ts +0 -0
  753. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/animations.d.ts +0 -0
  754. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/backgrounds.d.ts +0 -0
  755. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-data-model.d.ts +0 -0
  756. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-editing.d.ts +0 -0
  757. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-font-operations.d.ts +0 -0
  758. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-model-axes.d.ts +0 -0
  759. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-model-core.d.ts +0 -0
  760. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-model-series.d.ts +0 -0
  761. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-model.d.ts +0 -0
  762. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-objects.d.ts +0 -0
  763. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-workbook.d.ts +0 -0
  764. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/charts.d.ts +0 -0
  765. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/command-placeholder.d.ts +0 -0
  766. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/comments.d.ts +0 -0
  767. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/connector-operations.d.ts +0 -0
  768. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/connectors-model.d.ts +0 -0
  769. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/connectors.d.ts +0 -0
  770. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/content-types.d.ts +0 -0
  771. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/contracts.d.ts +0 -0
  772. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/creation.d.ts +0 -0
  773. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/diagram-resources.d.ts +0 -0
  774. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/diff.d.ts +0 -0
  775. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/drawing-format.d.ts +0 -0
  776. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/drawing-operations.d.ts +0 -0
  777. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/equations.d.ts +0 -0
  778. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/errors.d.ts +0 -0
  779. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/fields.d.ts +0 -0
  780. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/font-metrics.d.ts +0 -0
  781. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/freeform-builder.d.ts +0 -0
  782. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/group-model.d.ts +0 -0
  783. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/image-extraction.d.ts +0 -0
  784. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/image-formatting.d.ts +0 -0
  785. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/image-insertion.d.ts +0 -0
  786. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/image-replacement.d.ts +0 -0
  787. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/image-value.d.ts +0 -0
  788. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/images.d.ts +0 -0
  789. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/inventory.d.ts +0 -0
  790. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/language-enum.d.ts +0 -0
  791. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/layouts.d.ts +0 -0
  792. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/length.d.ts +0 -0
  793. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/links-model.d.ts +4 -4
  794. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/links.d.ts +0 -0
  795. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/masters.d.ts +0 -0
  796. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/media-editing.d.ts +0 -0
  797. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/media-enum.d.ts +0 -0
  798. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/media-extraction.d.ts +0 -0
  799. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/media.d.ts +0 -0
  800. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/memberships.d.ts +0 -0
  801. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/modern-comments.d.ts +0 -0
  802. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/notes.d.ts +0 -0
  803. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/ole-enum.d.ts +0 -0
  804. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/ole-insertion.d.ts +0 -0
  805. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/opaque-objects.d.ts +0 -0
  806. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/package-reader.d.ts +0 -0
  807. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/package-tools.d.ts +0 -0
  808. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/package-view.d.ts +0 -0
  809. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/package-writer.d.ts +0 -0
  810. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/paragraph-alignment.d.ts +0 -0
  811. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/presentation-settings.d.ts +0 -0
  812. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/properties.d.ts +0 -0
  813. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/relationships.d.ts +0 -0
  814. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/resource-limits.d.ts +0 -0
  815. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/sanitize.d.ts +0 -0
  816. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/selector-schema.d.ts +0 -0
  817. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/selectors.d.ts +0 -0
  818. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-adjustments.d.ts +0 -0
  819. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-groups.d.ts +0 -0
  820. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-operations.d.ts +0 -0
  821. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-path-operations.d.ts +0 -0
  822. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-paths.d.ts +0 -0
  823. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-placeholder-types.d.ts +0 -0
  824. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-presets.d.ts +0 -0
  825. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-selection.d.ts +0 -0
  826. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-transforms.d.ts +0 -0
  827. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-copy.d.ts +0 -0
  828. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-import.d.ts +0 -0
  829. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-layout-model.d.ts +0 -0
  830. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-merge-split.d.ts +0 -0
  831. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-model.d.ts +0 -0
  832. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-removal.d.ts +0 -0
  833. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-transfer-budget.d.ts +0 -0
  834. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slides.d.ts +0 -0
  835. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/table-operations.d.ts +0 -0
  836. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/table-spans.d.ts +0 -0
  837. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/tables-model.d.ts +0 -0
  838. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/tables.d.ts +0 -0
  839. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/tags.d.ts +0 -0
  840. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/template-bindings.d.ts +0 -0
  841. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/template-repeat.d.ts +0 -0
  842. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-fitting.d.ts +0 -0
  843. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-frame-enums.d.ts +0 -0
  844. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-frames.d.ts +0 -0
  845. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-paragraphs.d.ts +0 -0
  846. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-reading.d.ts +0 -0
  847. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-replacement.d.ts +0 -0
  848. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-run-color.d.ts +0 -0
  849. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-runs.d.ts +0 -0
  850. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-style-resolution.d.ts +0 -0
  851. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/themes.d.ts +0 -0
  852. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/transitions.d.ts +0 -0
  853. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/validation.d.ts +0 -0
  854. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/xml-parts.d.ts +0 -0
  855. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/xml-view.d.ts +0 -0
  856. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/xml.d.ts +0 -0
@@ -0,0 +1,1739 @@
1
+ import {
2
+ BubbleChartData,
3
+ CategoryChartData,
4
+ XyChartData,
5
+ chartTypes,
6
+ toChartData
7
+ } from "./chunk-F2ORFLCH.js";
8
+ import {
9
+ applyPictureUpdate
10
+ } from "./chunk-OP6J3OLL.js";
11
+ import {
12
+ applyConnectorUpdate,
13
+ createConnectorXml,
14
+ readConnector
15
+ } from "./chunk-UJTJFMIN.js";
16
+ import {
17
+ XL_CHART_TYPE
18
+ } from "./chunk-ZTAFAHY3.js";
19
+ import {
20
+ PROG_ID
21
+ } from "./chunk-7OXNWLSL.js";
22
+ import {
23
+ Image
24
+ } from "./chunk-HUNXIAOL.js";
25
+ import {
26
+ applyTableStructure
27
+ } from "./chunk-7PZASWL6.js";
28
+ import {
29
+ applyTableUpdate,
30
+ createTableXml,
31
+ readTable
32
+ } from "./chunk-MQU6Q75R.js";
33
+ import {
34
+ nodeFor
35
+ } from "./chunk-QHS7PDG3.js";
36
+ import {
37
+ FillFormat,
38
+ LineFormat,
39
+ MSO_SHAPE_TYPE,
40
+ MSO_VERTICAL_ANCHOR,
41
+ PP_PLACEHOLDER_TYPE,
42
+ ShadowFormat,
43
+ Shape,
44
+ TextFrame,
45
+ applyShapeUpdate,
46
+ createShapeXml,
47
+ readShape,
48
+ textLinkCapabilities
49
+ } from "./chunk-HHLVI2CB.js";
50
+ import {
51
+ ShapeIdAllocator
52
+ } from "./chunk-RZC7QHL6.js";
53
+ import {
54
+ defineEnum
55
+ } from "./chunk-SEK43FRN.js";
56
+ import {
57
+ Length
58
+ } from "./chunk-I6AMDG2T.js";
59
+ import {
60
+ attr,
61
+ child,
62
+ required
63
+ } from "./chunk-RAXJVM4U.js";
64
+ import {
65
+ parseXmlPart
66
+ } from "./chunk-L3WY5ASN.js";
67
+ import {
68
+ IndexError,
69
+ InvalidHandleError,
70
+ KeyError,
71
+ OfficeError,
72
+ PropertyAccessError,
73
+ TypeError,
74
+ ValueError
75
+ } from "./chunk-RR6QQ25D.js";
76
+
77
+ // packages/safe-bash-presentation-engine/src/indexed-collection.ts
78
+ function indexed(target) {
79
+ return new Proxy(target, {
80
+ get(object, key) {
81
+ if (typeof key === "string" && key !== "" && String(Number(key)) === key)
82
+ return object.get(Number(key));
83
+ const value = Reflect.get(object, key, object);
84
+ return typeof value === "function" ? value.bind(object) : value;
85
+ },
86
+ set(object, key, value) {
87
+ if (typeof key === "string" && key !== "" && String(Number(key)) === key)
88
+ throw new ValueError("Collection entries are read-only.");
89
+ return Reflect.set(object, key, value, object);
90
+ },
91
+ defineProperty(object, key, descriptor) {
92
+ if (typeof key === "string" && key !== "" && String(Number(key)) === key)
93
+ throw new ValueError("Collection entries are read-only.");
94
+ return Reflect.defineProperty(object, key, descriptor);
95
+ },
96
+ deleteProperty(object, key) {
97
+ if (typeof key === "string" && key !== "" && String(Number(key)) === key)
98
+ throw new ValueError("Collection entries are read-only.");
99
+ return Reflect.deleteProperty(object, key);
100
+ }
101
+ });
102
+ }
103
+
104
+ // packages/safe-bash-presentation-engine/src/media-enum.ts
105
+ var PP_MEDIA_TYPEValues = /* @__PURE__ */ ((PP_MEDIA_TYPEValues2) => {
106
+ PP_MEDIA_TYPEValues2[PP_MEDIA_TYPEValues2["MOVIE"] = 3] = "MOVIE";
107
+ PP_MEDIA_TYPEValues2[PP_MEDIA_TYPEValues2["OTHER"] = 1] = "OTHER";
108
+ PP_MEDIA_TYPEValues2[PP_MEDIA_TYPEValues2["SOUND"] = 1 /* OTHER */] = "SOUND";
109
+ PP_MEDIA_TYPEValues2[PP_MEDIA_TYPEValues2["MIXED"] = -2] = "MIXED";
110
+ return PP_MEDIA_TYPEValues2;
111
+ })(PP_MEDIA_TYPEValues || {});
112
+ var PP_MEDIA_TYPE = defineEnum(PP_MEDIA_TYPEValues);
113
+
114
+ // packages/safe-bash-presentation-engine/src/shape-owner-token.ts
115
+ var shapeOwnerTokens = /* @__PURE__ */ new WeakMap();
116
+
117
+ // packages/safe-bash-presentation-engine/src/tables-model.ts
118
+ function position(index2, length) {
119
+ if (!Number.isSafeInteger(index2) || index2 < 0 || index2 >= length)
120
+ throw new IndexError("Table position is outside the collection.");
121
+ }
122
+ function indexed2(collection) {
123
+ return new Proxy(collection, {
124
+ get(target, key) {
125
+ if (typeof key === "string" && key !== "" && String(Number(key)) === key)
126
+ return target.get(Number(key));
127
+ const value = Reflect.get(target, key, target);
128
+ return typeof value === "function" ? value.bind(target) : value;
129
+ },
130
+ defineProperty(target, key, descriptor) {
131
+ if (typeof key === "string" && key !== "" && String(Number(key)) === key)
132
+ throw new OfficeError(
133
+ "invalid-value",
134
+ "Table collections cannot replace entries.",
135
+ "usage"
136
+ );
137
+ return Reflect.defineProperty(target, key, descriptor);
138
+ },
139
+ deleteProperty(target, key) {
140
+ if (typeof key === "string" && key !== "" && String(Number(key)) === key)
141
+ throw new OfficeError("invalid-value", "Table collections cannot remove entries.", "usage");
142
+ return Reflect.deleteProperty(target, key);
143
+ },
144
+ set(target, key, value, receiver) {
145
+ if (typeof key === "string" && key !== "" && String(Number(key)) === key)
146
+ throw new OfficeError(
147
+ "invalid-value",
148
+ "Table collections cannot replace entries.",
149
+ "usage"
150
+ );
151
+ return Reflect.set(target, key, value, receiver);
152
+ }
153
+ });
154
+ }
155
+ var Table = class {
156
+ #storedXml;
157
+ #owner;
158
+ get #xml() {
159
+ return this.#owner?.read() ?? this.#storedXml;
160
+ }
161
+ set #xml(value) {
162
+ if (this.#owner) this.#owner.write(value);
163
+ else this.#storedXml = value;
164
+ }
165
+ #id;
166
+ #cells = /* @__PURE__ */ new Map();
167
+ #generation = 0;
168
+ get generation() {
169
+ return this.#generation;
170
+ }
171
+ constructor(xml, shapeId, owner) {
172
+ this.#storedXml = xml;
173
+ this.#owner = owner;
174
+ this.#id = shapeId ?? readTable(xml.root, xml).shapeId;
175
+ readTable(this.element, xml);
176
+ }
177
+ get xml() {
178
+ return this.#xml;
179
+ }
180
+ get element() {
181
+ return nodeFor(this.#xml.root, String(this.#id));
182
+ }
183
+ get rows() {
184
+ return new TableRows(this);
185
+ }
186
+ get columns() {
187
+ return new TableColumns(this);
188
+ }
189
+ cell(row, column) {
190
+ position(row, this.rows.length);
191
+ position(column, this.columns.length);
192
+ const key = `${row}:${column}`;
193
+ let cell = this.#cells.get(key);
194
+ if (!cell) {
195
+ cell = new TableCell(this, row, column);
196
+ this.#cells.set(key, cell);
197
+ }
198
+ return cell;
199
+ }
200
+ *iter_cells() {
201
+ for (let row = 0; row < this.rows.length; row++)
202
+ for (let column = 0; column < this.columns.length; column++) yield this.cell(row, column);
203
+ }
204
+ get first_row() {
205
+ return readTable(this.element, this.#xml).firstRow;
206
+ }
207
+ set first_row(value) {
208
+ this.#xml = applyTableUpdate(this.#xml, this.element, { firstRow: value });
209
+ }
210
+ get last_row() {
211
+ return readTable(this.element, this.#xml).lastRow;
212
+ }
213
+ set last_row(value) {
214
+ this.#xml = applyTableUpdate(this.#xml, this.element, { lastRow: value });
215
+ }
216
+ get first_col() {
217
+ return readTable(this.element, this.#xml).firstCol;
218
+ }
219
+ set first_col(value) {
220
+ this.#xml = applyTableUpdate(this.#xml, this.element, { firstCol: value });
221
+ }
222
+ get last_col() {
223
+ return readTable(this.element, this.#xml).lastCol;
224
+ }
225
+ set last_col(value) {
226
+ this.#xml = applyTableUpdate(this.#xml, this.element, { lastCol: value });
227
+ }
228
+ get horz_banding() {
229
+ return readTable(this.element, this.#xml).horzBand;
230
+ }
231
+ set horz_banding(value) {
232
+ this.#xml = applyTableUpdate(this.#xml, this.element, { horzBand: value });
233
+ }
234
+ get vert_banding() {
235
+ return readTable(this.element, this.#xml).vertBand;
236
+ }
237
+ set vert_banding(value) {
238
+ this.#xml = applyTableUpdate(this.#xml, this.element, { vertBand: value });
239
+ }
240
+ /** Applies one validated change while keeping previously returned cell handles live. */
241
+ update(options) {
242
+ this.#xml = applyTableUpdate(this.#xml, this.element, options);
243
+ }
244
+ structure(operation) {
245
+ this.#xml = applyTableStructure(this.#xml, this.element, operation);
246
+ if (operation.kind !== "merge" && operation.kind !== "split") {
247
+ this.#generation++;
248
+ this.#cells.clear();
249
+ }
250
+ }
251
+ bindFill(row, column) {
252
+ const cell = this.cell(row, column);
253
+ const target = () => {
254
+ void cell.table;
255
+ const graphic = this.element.children.find((node) => node.name.localName === "graphic");
256
+ const table = required(required(graphic, "graphicData"), "tbl");
257
+ const owner = table.children.filter((n) => n.name.localName === "tr")[row];
258
+ return owner.children.filter((n) => n.name.localName === "tc")[column];
259
+ };
260
+ const edit = (transform) => {
261
+ void cell.table;
262
+ applyTableUpdate(this.#xml, this.element, { cell: { row, column } });
263
+ this.#xml = transform(this.#xml, target());
264
+ };
265
+ if (!child(target(), "tcPr"))
266
+ edit(
267
+ (xml, node) => xml.merge(node, {
268
+ children: {
269
+ sequence: ["txBody", "tcPr", "extLst"].map((localName) => ({
270
+ namespace: node.name.namespace,
271
+ localName
272
+ })),
273
+ upsert: [{ name: { namespace: node.name.namespace, localName: "tcPr" }, merge: {} }]
274
+ }
275
+ })
276
+ );
277
+ const read = () => this.#xml.subtree(target());
278
+ return new FillFormat(read, void 0, false, edit, (node) => child(node, "tcPr"));
279
+ }
280
+ bindTextFrame(row, column, parent) {
281
+ const generation = this.#generation;
282
+ const validate = () => {
283
+ if (generation !== this.#generation) throw new InvalidHandleError();
284
+ };
285
+ const body = () => {
286
+ validate();
287
+ const frame2 = this.element;
288
+ const graphic = frame2.children.find((node2) => node2.name.localName === "graphic");
289
+ const data = required(graphic, "graphicData");
290
+ const tbl = required(data, "tbl");
291
+ const tr = tbl.children.filter((n) => n.name.localName === "tr")[row];
292
+ const cell = tr.children.filter((n) => n.name.localName === "tc")[column];
293
+ const node = required(cell, "txBody");
294
+ const ancestors = [frame2, graphic, data, tbl, tr, cell, node];
295
+ return { node, path: ancestors.slice(1).map((child2, i) => ancestors[i].children.indexOf(child2)) };
296
+ };
297
+ let source, cached;
298
+ const read = () => {
299
+ validate();
300
+ if (source !== this.#xml) {
301
+ source = this.#xml;
302
+ cached = this.#xml.subtree(body().node);
303
+ }
304
+ return cached;
305
+ };
306
+ const frame = new TextFrame(read(), void 0, {
307
+ parent,
308
+ read,
309
+ write: (xml) => {
310
+ applyTableUpdate(this.#xml, this.element, {
311
+ cell: { row, column },
312
+ text: this.cell(row, column).text
313
+ });
314
+ const target = body().node;
315
+ const find = (node) => node.children.includes(target) ? node : node.children.map(find).find(Boolean);
316
+ const owner = find(this.#xml.root);
317
+ this.#xml = this.#xml.spliceChildren(owner, owner.children.indexOf(target), 1, [
318
+ xml.markup(xml.root, true)
319
+ ]);
320
+ }
321
+ });
322
+ const hyperlink = this.#owner?.hyperlink;
323
+ if (hyperlink) textLinkCapabilities.set(frame, (path) => hyperlink(() => [...body().path, ...path()]));
324
+ return frame;
325
+ }
326
+ };
327
+ var TableCell = class _TableCell {
328
+ constructor(table, row, column) {
329
+ this.row = row;
330
+ this.column = column;
331
+ this.#table = table;
332
+ this.#generation = table.generation;
333
+ position(row, table.rows.length);
334
+ position(column, table.columns.length);
335
+ }
336
+ row;
337
+ column;
338
+ #table;
339
+ #generation;
340
+ #frame;
341
+ #fill;
342
+ get table() {
343
+ if (this.#generation !== this.#table.generation) throw new InvalidHandleError();
344
+ return this.#table;
345
+ }
346
+ equals(other) {
347
+ const table = this.table;
348
+ return other instanceof _TableCell && other.table === table && other.row === this.row && other.column === this.column;
349
+ }
350
+ get fill() {
351
+ const table = this.table;
352
+ return this.#fill ??= table.bindFill(this.row, this.column);
353
+ }
354
+ merge(other) {
355
+ if (!(other instanceof _TableCell) || other.table !== this.table)
356
+ throw new OfficeError("invalid-value", "Merge cells must belong to the same table.", "usage");
357
+ this.table.structure({
358
+ kind: "merge",
359
+ from: { row: Math.min(this.row, other.row), column: Math.min(this.column, other.column) },
360
+ to: { row: Math.max(this.row, other.row), column: Math.max(this.column, other.column) }
361
+ });
362
+ }
363
+ split() {
364
+ this.table.structure({ kind: "split", cell: { row: this.row, column: this.column } });
365
+ }
366
+ get text() {
367
+ return readTable(this.table.element, this.table.xml).cells[this.row * this.table.columns.length + this.column].text;
368
+ }
369
+ set text(value) {
370
+ this.text_frame.text = value;
371
+ }
372
+ get text_frame() {
373
+ const table = this.table;
374
+ return this.#frame ??= table.bindTextFrame(this.row, this.column, this);
375
+ }
376
+ get is_spanned() {
377
+ return readTable(this.table.element, this.table.xml).cells[this.row * this.table.columns.length + this.column].isSpanned;
378
+ }
379
+ get is_merge_origin() {
380
+ return readTable(this.table.element, this.table.xml).cells[this.row * this.table.columns.length + this.column].isMergeOrigin;
381
+ }
382
+ get span_height() {
383
+ return readTable(this.table.element, this.table.xml).cells[this.row * this.table.columns.length + this.column].spanHeight;
384
+ }
385
+ get span_width() {
386
+ return readTable(this.table.element, this.table.xml).cells[this.row * this.table.columns.length + this.column].spanWidth;
387
+ }
388
+ get margin_left() {
389
+ return new Length(
390
+ readTable(this.table.element, this.table.xml).cells[this.row * this.table.columns.length + this.column].marginLeft ?? 91440
391
+ );
392
+ }
393
+ set margin_left(value) {
394
+ this.table.update({ cell: { row: this.row, column: this.column }, marginLeft: value });
395
+ }
396
+ get margin_right() {
397
+ return new Length(
398
+ readTable(this.table.element, this.table.xml).cells[this.row * this.table.columns.length + this.column].marginRight ?? 91440
399
+ );
400
+ }
401
+ set margin_right(value) {
402
+ this.table.update({ cell: { row: this.row, column: this.column }, marginRight: value });
403
+ }
404
+ get margin_top() {
405
+ return new Length(
406
+ readTable(this.table.element, this.table.xml).cells[this.row * this.table.columns.length + this.column].marginTop ?? 45720
407
+ );
408
+ }
409
+ set margin_top(value) {
410
+ this.table.update({ cell: { row: this.row, column: this.column }, marginTop: value });
411
+ }
412
+ get margin_bottom() {
413
+ return new Length(
414
+ readTable(this.table.element, this.table.xml).cells[this.row * this.table.columns.length + this.column].marginBottom ?? 45720
415
+ );
416
+ }
417
+ set margin_bottom(value) {
418
+ this.table.update({ cell: { row: this.row, column: this.column }, marginBottom: value });
419
+ }
420
+ get vertical_anchor() {
421
+ const value = readTable(this.table.element, this.table.xml).cells[this.row * this.table.columns.length + this.column].verticalAnchor;
422
+ if (value === null) return null;
423
+ if (value === "top") return MSO_VERTICAL_ANCHOR.TOP;
424
+ if (value === "middle") return MSO_VERTICAL_ANCHOR.MIDDLE;
425
+ if (value === "bottom") return MSO_VERTICAL_ANCHOR.BOTTOM;
426
+ throw new OfficeError("unsupported-edit", "Cell anchor is preserve-only.", "validate-intent");
427
+ }
428
+ set vertical_anchor(value) {
429
+ const anchor = value === null ? null : value === MSO_VERTICAL_ANCHOR.TOP ? "top" : value === MSO_VERTICAL_ANCHOR.MIDDLE ? "middle" : value === MSO_VERTICAL_ANCHOR.BOTTOM ? "bottom" : void 0;
430
+ if (anchor === void 0)
431
+ throw new OfficeError("invalid-value", "Invalid cell anchor.", "usage");
432
+ this.table.update({ cell: { row: this.row, column: this.column }, verticalAnchor: anchor });
433
+ }
434
+ };
435
+ var TableRows = class {
436
+ constructor(table) {
437
+ this.table = table;
438
+ return indexed2(this);
439
+ }
440
+ table;
441
+ get length() {
442
+ return readTable(this.table.element, this.table.xml).rows;
443
+ }
444
+ get = this.at;
445
+ at(index2) {
446
+ position(index2, this.length);
447
+ return new TableRow(this.table, index2);
448
+ }
449
+ *[Symbol.iterator]() {
450
+ for (let i = 0; i < this.length; i++) yield this.get(i);
451
+ }
452
+ };
453
+ var TableColumns = class {
454
+ constructor(table) {
455
+ this.table = table;
456
+ return indexed2(this);
457
+ }
458
+ table;
459
+ get length() {
460
+ return readTable(this.table.element, this.table.xml).columns;
461
+ }
462
+ get = this.at;
463
+ at(index2) {
464
+ position(index2, this.length);
465
+ return new TableColumn(this.table, index2);
466
+ }
467
+ *[Symbol.iterator]() {
468
+ for (let i = 0; i < this.length; i++) yield this.get(i);
469
+ }
470
+ };
471
+ var TableRow = class {
472
+ constructor(table, index2) {
473
+ this.index = index2;
474
+ this.#table = table;
475
+ this.#generation = table.generation;
476
+ position(index2, table.rows.length);
477
+ }
478
+ index;
479
+ #table;
480
+ #generation;
481
+ get table() {
482
+ if (this.#generation !== this.#table.generation) throw new InvalidHandleError();
483
+ return this.#table;
484
+ }
485
+ get height() {
486
+ return new Length(readTable(this.table.element, this.table.xml).rowHeights[this.index]);
487
+ }
488
+ set height(value) {
489
+ this.table.update({ cell: { row: this.index, column: 0 }, rowHeight: value });
490
+ }
491
+ get cells() {
492
+ return new TableCells(this.table, this.index);
493
+ }
494
+ };
495
+ var TableColumn = class {
496
+ constructor(table, index2) {
497
+ this.index = index2;
498
+ this.#table = table;
499
+ this.#generation = table.generation;
500
+ position(index2, table.columns.length);
501
+ }
502
+ index;
503
+ #table;
504
+ #generation;
505
+ get table() {
506
+ if (this.#generation !== this.#table.generation) throw new InvalidHandleError();
507
+ return this.#table;
508
+ }
509
+ get width() {
510
+ return new Length(readTable(this.table.element, this.table.xml).columnWidths[this.index]);
511
+ }
512
+ set width(value) {
513
+ this.table.update({ cell: { row: 0, column: this.index }, columnWidth: value });
514
+ }
515
+ };
516
+ var TableCells = class {
517
+ constructor(table, row) {
518
+ this.row = row;
519
+ this.#table = table;
520
+ this.#generation = table.generation;
521
+ position(row, table.rows.length);
522
+ return indexed2(this);
523
+ }
524
+ row;
525
+ #table;
526
+ #generation;
527
+ get table() {
528
+ if (this.#generation !== this.#table.generation) throw new InvalidHandleError();
529
+ return this.#table;
530
+ }
531
+ get length() {
532
+ return this.table.columns.length;
533
+ }
534
+ get = this.at;
535
+ at(index2) {
536
+ position(index2, this.length);
537
+ return this.table.cell(this.row, index2);
538
+ }
539
+ *[Symbol.iterator]() {
540
+ for (let i = 0; i < this.length; i++) yield this.get(i);
541
+ }
542
+ };
543
+
544
+ // packages/safe-bash-presentation-engine/src/group-model.ts
545
+ var GroupShape = class extends Shape {
546
+ constructor(xml, shapes2, owner) {
547
+ if (xml.root.name.localName !== "grpSp") throw new TypeError("Expected a group shape.");
548
+ super(xml, owner);
549
+ this.shapes = shapes2;
550
+ }
551
+ shapes;
552
+ get shape_type() {
553
+ return MSO_SHAPE_TYPE.GROUP;
554
+ }
555
+ get click_action() {
556
+ throw new TypeError("Group shapes cannot have click actions.");
557
+ }
558
+ };
559
+
560
+ // packages/safe-bash-presentation-engine/src/connectors-model.ts
561
+ var Connector = class {
562
+ #snapshot;
563
+ #owner;
564
+ get #xml() {
565
+ return this.#owner?.read() ?? this.#snapshot;
566
+ }
567
+ set #xml(xml) {
568
+ if (this.#owner) this.#owner.write(xml);
569
+ else this.#snapshot = xml;
570
+ }
571
+ #id;
572
+ #shadow;
573
+ constructor(xml, shapeId, owner) {
574
+ this.#snapshot = xml;
575
+ this.#owner = owner;
576
+ this.#id = String(shapeId ?? readConnector(xml.root).shapeId);
577
+ readConnector(this.element);
578
+ }
579
+ get xml() {
580
+ return this.#xml;
581
+ }
582
+ get element() {
583
+ return nodeFor(this.#xml.root, this.#id);
584
+ }
585
+ get shape_id() {
586
+ return readConnector(this.element).shapeId;
587
+ }
588
+ get name() {
589
+ return readConnector(this.element).name;
590
+ }
591
+ set name(value) {
592
+ this.#xml = applyConnectorUpdate(this.#xml, this.element, { name: value });
593
+ }
594
+ get line() {
595
+ return new LineFormat(
596
+ () => ({ ...this.#xml, root: this.element }),
597
+ (update) => {
598
+ this.#xml = applyConnectorUpdate(this.#xml, this.element, {
599
+ ...update.lineColor === void 0 ? {} : { lineColor: update.lineColor },
600
+ ...update.lineWidth === void 0 ? {} : { lineWidth: update.lineWidth }
601
+ });
602
+ },
603
+ (transform) => {
604
+ this.#xml = transform(this.#xml, this.element);
605
+ }
606
+ );
607
+ }
608
+ get shape_type() {
609
+ return 9;
610
+ }
611
+ get has_text_frame() {
612
+ return false;
613
+ }
614
+ get has_chart() {
615
+ return false;
616
+ }
617
+ get has_table() {
618
+ return false;
619
+ }
620
+ get is_placeholder() {
621
+ return readConnector(this.element).placeholder !== null;
622
+ }
623
+ get placeholder_format() {
624
+ const placeholder = readConnector(this.element).placeholder;
625
+ if (!placeholder) throw new ValueError("Connector is not a placeholder.");
626
+ return { ...placeholder, type: PP_PLACEHOLDER_TYPE.from_xml(placeholder.type) };
627
+ }
628
+ get shadow() {
629
+ this.#shadow ??= new ShadowFormat(
630
+ () => this.#xml.subtree(this.element),
631
+ (transform) => {
632
+ this.#xml = transform(this.#xml, this.element);
633
+ }
634
+ );
635
+ return this.#shadow;
636
+ }
637
+ get begin_x() {
638
+ return new Length(readConnector(this.element).beginX);
639
+ }
640
+ set begin_x(value) {
641
+ this.#xml = applyConnectorUpdate(this.#xml, this.element, { beginX: value });
642
+ }
643
+ get begin_y() {
644
+ return new Length(readConnector(this.element).beginY);
645
+ }
646
+ set begin_y(value) {
647
+ this.#xml = applyConnectorUpdate(this.#xml, this.element, { beginY: value });
648
+ }
649
+ get end_x() {
650
+ return new Length(readConnector(this.element).endX);
651
+ }
652
+ set end_x(value) {
653
+ this.#xml = applyConnectorUpdate(this.#xml, this.element, { endX: value });
654
+ }
655
+ get end_y() {
656
+ return new Length(readConnector(this.element).endY);
657
+ }
658
+ set end_y(value) {
659
+ this.#xml = applyConnectorUpdate(this.#xml, this.element, { endY: value });
660
+ }
661
+ get left() {
662
+ return new Length(readConnector(this.element).left ?? 0);
663
+ }
664
+ set left(value) {
665
+ this.#xml = applyShapeUpdate(this.#xml, this.element, { left: value });
666
+ }
667
+ get top() {
668
+ return new Length(readConnector(this.element).top ?? 0);
669
+ }
670
+ set top(value) {
671
+ this.#xml = applyShapeUpdate(this.#xml, this.element, { top: value });
672
+ }
673
+ get width() {
674
+ return new Length(readConnector(this.element).width ?? 0);
675
+ }
676
+ set width(value) {
677
+ if (!(value instanceof Length) || value.emu < 0)
678
+ throw new OfficeError(
679
+ "invalid-value",
680
+ "Connector width requires a nonnegative length.",
681
+ "usage"
682
+ );
683
+ const current = readConnector(this.element), left = current.left ?? 0;
684
+ this.#xml = applyConnectorUpdate(this.#xml, this.element, {
685
+ beginX: new Length(left + (current.flipHorizontal ? value.emu : 0)),
686
+ endX: new Length(left + (current.flipHorizontal ? 0 : value.emu))
687
+ });
688
+ }
689
+ get height() {
690
+ return new Length(readConnector(this.element).height ?? 0);
691
+ }
692
+ set height(value) {
693
+ if (!(value instanceof Length) || value.emu < 0)
694
+ throw new OfficeError(
695
+ "invalid-value",
696
+ "Connector height requires a nonnegative length.",
697
+ "usage"
698
+ );
699
+ const current = readConnector(this.element), top = current.top ?? 0;
700
+ this.#xml = applyConnectorUpdate(this.#xml, this.element, {
701
+ beginY: new Length(top + (current.flipVertical ? value.emu : 0)),
702
+ endY: new Length(top + (current.flipVertical ? 0 : value.emu))
703
+ });
704
+ }
705
+ get rotation() {
706
+ return readConnector(this.element).rotation;
707
+ }
708
+ set rotation(value) {
709
+ this.#xml = applyShapeUpdate(this.#xml, this.element, { rotation: value });
710
+ }
711
+ #target(shape) {
712
+ const element = shape.element;
713
+ const xml = shape.xml;
714
+ if (this.#owner && xml && shapeOwnerTokens.get(xml) === this.#owner && xml.root === element)
715
+ return nodeFor(this.#xml.root, String(readShape(element).shapeId));
716
+ return element;
717
+ }
718
+ begin_connect(shape, connectionSiteIdx) {
719
+ if (!shape || typeof shape !== "object" || !shape.element)
720
+ throw new OfficeError("invalid-value", "A current target XML view is required.", "usage");
721
+ this.#xml = applyConnectorUpdate(
722
+ this.#xml,
723
+ this.element,
724
+ { site: connectionSiteIdx },
725
+ { begin: this.#target(shape) }
726
+ );
727
+ }
728
+ end_connect(shape, connectionSiteIdx) {
729
+ if (!shape || typeof shape !== "object" || !shape.element)
730
+ throw new OfficeError("invalid-value", "A current target XML view is required.", "usage");
731
+ this.#xml = applyConnectorUpdate(
732
+ this.#xml,
733
+ this.element,
734
+ { site: connectionSiteIdx },
735
+ { end: this.#target(shape) }
736
+ );
737
+ }
738
+ };
739
+
740
+ // packages/safe-bash-presentation-engine/src/freeform-builder.ts
741
+ function coordinate(value) {
742
+ const result = new Length(value).emu;
743
+ if (Math.abs(result) > 27273042316900)
744
+ throw new ValueError("Freeform coordinate exceeds DrawingML bounds.");
745
+ return result;
746
+ }
747
+ function index(value, length) {
748
+ if (!Number.isSafeInteger(value) || value < 0 || value >= length) throw new IndexError();
749
+ return value;
750
+ }
751
+ function budget(length) {
752
+ if (length > 4096)
753
+ throw new OfficeError("resource-limit", "Freeform operation limit exceeded.", "usage");
754
+ }
755
+ var FreeformPath = class {
756
+ #commands = [];
757
+ get commands() {
758
+ return Object.freeze([...this.#commands]);
759
+ }
760
+ append(command) {
761
+ budget(this.#commands.length + 1);
762
+ if (!command || !["move", "line", "close"].includes(command.type)) throw new TypeError();
763
+ if (command.type === "close") this.#commands.push(Object.freeze({ type: "close" }));
764
+ else
765
+ this.#commands.push(
766
+ Object.freeze({ type: command.type, x: coordinate(command.x), y: coordinate(command.y) })
767
+ );
768
+ }
769
+ };
770
+ var DrawingOperation = class {
771
+ constructor(type, x, y, offset = () => [0, 0]) {
772
+ this.type = type;
773
+ this.#offset = offset;
774
+ if (!["move", "line", "close"].includes(type)) throw new TypeError();
775
+ if (type !== "close") {
776
+ this.x = new Length(coordinate(x));
777
+ this.y = new Length(coordinate(y));
778
+ }
779
+ Object.freeze(this);
780
+ }
781
+ type;
782
+ #offset;
783
+ x;
784
+ y;
785
+ apply_operation_to(path) {
786
+ if (!(path instanceof FreeformPath))
787
+ throw new TypeError("Expected a bounded freeform path.");
788
+ path.append(
789
+ this.type === "close" ? { type: "close" } : {
790
+ type: this.type,
791
+ x: this.x.emu - this.#offset()[0],
792
+ y: this.y.emu - this.#offset()[1]
793
+ }
794
+ );
795
+ }
796
+ };
797
+ var FreeformBuilder = class {
798
+ #insert;
799
+ #operations = [];
800
+ #view;
801
+ #startX;
802
+ #startY;
803
+ #scaleX;
804
+ #scaleY;
805
+ constructor(insert, start_x = 0, start_y = 0, scale = 1) {
806
+ this.#insert = insert;
807
+ this.#startX = coordinate(start_x);
808
+ this.#startY = coordinate(start_y);
809
+ if (typeof insert !== "function") throw new TypeError();
810
+ if (typeof scale !== "number" && (!Array.isArray(scale) || scale.length !== 2))
811
+ throw new TypeError();
812
+ [this.#scaleX, this.#scaleY] = typeof scale === "number" ? [scale, scale] : scale;
813
+ if (![this.#scaleX, this.#scaleY].every(
814
+ (v) => typeof v === "number" && Number.isFinite(v) && v > 0
815
+ ))
816
+ throw new ValueError("Freeform scale must be positive and finite.");
817
+ this.#view = new Proxy(this, {
818
+ get(target, key) {
819
+ if (typeof key === "string" && key !== "" && String(Number(key)) === key)
820
+ return target.#operations[index(Number(key), target.length)];
821
+ const value = Reflect.get(target, key, target);
822
+ return typeof value === "function" ? value.bind(target) : value;
823
+ },
824
+ set() {
825
+ throw new ValueError("Freeform builder members are read-only.");
826
+ },
827
+ defineProperty() {
828
+ throw new ValueError("Freeform builder members are read-only.");
829
+ },
830
+ deleteProperty() {
831
+ throw new ValueError("Freeform builder members are read-only.");
832
+ }
833
+ });
834
+ return this.#view;
835
+ }
836
+ get length() {
837
+ return this.#operations.length;
838
+ }
839
+ get shape_offset_x() {
840
+ return new Length(
841
+ Math.min(this.#startX, ...this.#operations.flatMap((op) => op.x ? [op.x.emu] : []))
842
+ );
843
+ }
844
+ get shape_offset_y() {
845
+ return new Length(
846
+ Math.min(this.#startY, ...this.#operations.flatMap((op) => op.y ? [op.y.emu] : []))
847
+ );
848
+ }
849
+ at(position2) {
850
+ if (!Number.isSafeInteger(position2)) throw new IndexError();
851
+ return this.#operations[index(position2 < 0 ? this.length + position2 : position2, this.length)];
852
+ }
853
+ *[Symbol.iterator]() {
854
+ yield* this.#operations;
855
+ }
856
+ includes(value) {
857
+ return this.#operations.includes(value);
858
+ }
859
+ count(value) {
860
+ return this.#operations.filter((op) => op === value).length;
861
+ }
862
+ index(value, start = 0, stop = this.length) {
863
+ if (![start, stop].every(Number.isSafeInteger)) throw new ValueError();
864
+ const first = start < 0 ? Math.max(0, this.length + start) : start;
865
+ const end = stop < 0 ? Math.max(0, this.length + stop) : Math.min(this.length, stop);
866
+ for (let i = first; i < end; i++) if (this.#operations[i] === value) return i;
867
+ throw new ValueError("Drawing operation is not in the selected sequence.");
868
+ }
869
+ *reversed() {
870
+ yield* [...this.#operations].reverse();
871
+ }
872
+ slice(start, end, step = 1) {
873
+ if (![...start === void 0 ? [] : [start], ...end === void 0 ? [] : [end], step].every(
874
+ Number.isSafeInteger
875
+ ) || step === 0)
876
+ throw new ValueError();
877
+ const normalize = (v) => Math.max(
878
+ step > 0 ? 0 : -1,
879
+ Math.min(step > 0 ? this.length : this.length - 1, v < 0 ? this.length + v : v)
880
+ );
881
+ const first = start === void 0 ? step > 0 ? 0 : this.length - 1 : normalize(start);
882
+ const last = end === void 0 ? step > 0 ? this.length : -1 : normalize(end);
883
+ const result = [];
884
+ for (let i = first; step > 0 ? i < last : i > last; i += step)
885
+ result.push(this.#operations[i]);
886
+ return Object.freeze(result);
887
+ }
888
+ add_line_segments(vertices, close = true) {
889
+ if (typeof close !== "boolean" || !vertices || typeof vertices[Symbol.iterator] !== "function")
890
+ throw new TypeError();
891
+ const additions = [];
892
+ for (const vertex of vertices) {
893
+ budget(this.length + additions.length + 2 + Number(close));
894
+ if (!Array.isArray(vertex) || vertex.length !== 2) throw new TypeError();
895
+ additions.push(
896
+ new DrawingOperation("line", vertex[0], vertex[1], () => [
897
+ this.shape_offset_x.emu,
898
+ this.shape_offset_y.emu
899
+ ])
900
+ );
901
+ }
902
+ if (close) additions.push(new DrawingOperation("close"));
903
+ budget(this.length + additions.length + 1);
904
+ this.#operations.push(...additions);
905
+ return this.#view;
906
+ }
907
+ move_to(x, y) {
908
+ budget(this.length + 2);
909
+ this.#operations.push(
910
+ new DrawingOperation("move", x, y, () => [this.shape_offset_x.emu, this.shape_offset_y.emu])
911
+ );
912
+ return this.#view;
913
+ }
914
+ convert_to_shape(origin_x = new Length(0), origin_y = new Length(0)) {
915
+ if (!(origin_x instanceof Length) || !(origin_y instanceof Length))
916
+ throw new TypeError("Freeform origins require Length values.");
917
+ const minX = this.shape_offset_x.emu, minY = this.shape_offset_y.emu;
918
+ const maxX = Math.max(
919
+ this.#startX,
920
+ ...this.#operations.flatMap((op) => op.x ? [op.x.emu] : [])
921
+ );
922
+ const maxY = Math.max(
923
+ this.#startY,
924
+ ...this.#operations.flatMap((op) => op.y ? [op.y.emu] : [])
925
+ );
926
+ const path = new FreeformPath();
927
+ path.append({ type: "move", x: this.#startX - minX, y: this.#startY - minY });
928
+ for (const operation of this) operation.apply_operation_to(path);
929
+ return this.#insert(
930
+ Object.freeze({
931
+ left: coordinate(origin_x.emu + coordinate(minX * this.#scaleX)),
932
+ top: coordinate(origin_y.emu + coordinate(minY * this.#scaleY)),
933
+ width: coordinate((maxX - minX) * this.#scaleX),
934
+ height: coordinate((maxY - minY) * this.#scaleY),
935
+ localWidth: coordinate(maxX - minX),
936
+ localHeight: coordinate(maxY - minY),
937
+ commands: Object.freeze(
938
+ path.commands.map(
939
+ (c) => Object.freeze(
940
+ c.type === "close" ? c : { type: c.type, x: coordinate(c.x), y: coordinate(c.y) }
941
+ )
942
+ )
943
+ )
944
+ })
945
+ );
946
+ }
947
+ };
948
+
949
+ // packages/safe-bash-presentation-engine/src/slide-model.ts
950
+ function tree(xml, groupId) {
951
+ if (groupId !== void 0) {
952
+ const pending = [xml.root];
953
+ while (pending.length) {
954
+ const node = pending.pop();
955
+ if (node.name.localName === "grpSp" && readShape(node).shapeId === groupId) return node;
956
+ pending.push(...node.children);
957
+ }
958
+ throw new InvalidHandleError();
959
+ }
960
+ return required(required(xml.root, "cSld"), "spTree");
961
+ }
962
+ function shapes(xml, groupId) {
963
+ return tree(xml, groupId).children.filter(
964
+ (n) => ["sp", "pic", "graphicFrame", "cxnSp", "grpSp"].includes(n.name.localName)
965
+ );
966
+ }
967
+ function descendants(xml) {
968
+ const nodes = [], pending = [xml.root];
969
+ while (pending.length) {
970
+ const node = pending.pop();
971
+ nodes.push(node);
972
+ pending.push(...node.children);
973
+ }
974
+ return nodes;
975
+ }
976
+ function binding(owner, id, kind, _groupId) {
977
+ const node = (xml) => {
978
+ const matches = descendants(xml).filter(
979
+ (n) => ["sp", "grpSp", "pic", "graphicFrame"].includes(n.name.localName) && readShape(n).shapeId === id
980
+ );
981
+ if (matches.length !== 1 || matches[0].name.localName !== kind) throw new InvalidHandleError();
982
+ return matches[0];
983
+ };
984
+ let source, cached;
985
+ return {
986
+ ...owner.part === void 0 ? {} : { part: owner.part },
987
+ ...owner.hyperlink === void 0 ? {} : { hyperlink: (path) => owner.hyperlink(id, path) },
988
+ read() {
989
+ const xml = owner.read();
990
+ if (xml === source && cached) return cached;
991
+ cached = xml.subtree(node(xml));
992
+ shapeOwnerTokens.set(cached, owner);
993
+ source = xml;
994
+ return cached;
995
+ },
996
+ write(replacement) {
997
+ const xml = owner.read(), previous = node(xml), parent = descendants(xml).find((n) => n.children.includes(previous));
998
+ owner.write(
999
+ xml.spliceChildren(parent, parent.children.indexOf(previous), 1, [
1000
+ replacement.markup(replacement.root, true)
1001
+ ])
1002
+ );
1003
+ }
1004
+ };
1005
+ }
1006
+ var InheritedShape = class extends Shape {
1007
+ #owner;
1008
+ #binding;
1009
+ constructor(owner, id, kind, groupId) {
1010
+ const bound = binding(owner, id, kind, groupId);
1011
+ super(bound.read(), bound);
1012
+ this.#owner = owner;
1013
+ this.#binding = bound;
1014
+ }
1015
+ #dimension(key) {
1016
+ const own = readShape(this.element)[key];
1017
+ if (own !== null) return new Length(own);
1018
+ if (!this.is_placeholder) return null;
1019
+ const idx = this.placeholder_format.idx;
1020
+ for (const inherited of this.#owner.inherited?.(idx) ?? []) {
1021
+ const matches = shapes(inherited).filter((n) => readShape(n).placeholder?.idx === idx);
1022
+ if (matches.length > 1)
1023
+ throw new OfficeError(
1024
+ "ambiguous-selection",
1025
+ "Duplicate inherited placeholder key.",
1026
+ "select"
1027
+ );
1028
+ const value = matches[0] && readShape(matches[0])[key];
1029
+ if (value !== void 0 && value !== null) return new Length(value);
1030
+ }
1031
+ return null;
1032
+ }
1033
+ #setDimension(key, value) {
1034
+ if (!(value instanceof Length)) throw new ValueError("Expected a Length.");
1035
+ const pair = key === "left" ? "top" : key === "top" ? "left" : key === "width" ? "height" : "width";
1036
+ const xml = this.#binding.read();
1037
+ this.#binding.write(
1038
+ applyShapeUpdate(xml, xml.root, {
1039
+ [key]: value,
1040
+ [pair]: this.#dimension(pair) ?? new Length(0)
1041
+ })
1042
+ );
1043
+ }
1044
+ get left() {
1045
+ return this.#dimension("left");
1046
+ }
1047
+ set left(v) {
1048
+ this.#setDimension("left", v);
1049
+ }
1050
+ get top() {
1051
+ return this.#dimension("top");
1052
+ }
1053
+ set top(v) {
1054
+ this.#setDimension("top", v);
1055
+ }
1056
+ get width() {
1057
+ return this.#dimension("width");
1058
+ }
1059
+ set width(v) {
1060
+ this.#setDimension("width", v);
1061
+ }
1062
+ get height() {
1063
+ return this.#dimension("height");
1064
+ }
1065
+ set height(v) {
1066
+ this.#setDimension("height", v);
1067
+ }
1068
+ };
1069
+ var SlidePlaceholder = class extends InheritedShape {
1070
+ #owner;
1071
+ #binding;
1072
+ constructor(owner, id, groupId) {
1073
+ super(owner, id, "sp", groupId);
1074
+ this.#owner = owner;
1075
+ this.#binding = binding(owner, id, "sp", groupId);
1076
+ }
1077
+ #geometry() {
1078
+ const values = {
1079
+ left: this.left?.emu,
1080
+ top: this.top?.emu,
1081
+ width: this.width?.emu,
1082
+ height: this.height?.emu
1083
+ };
1084
+ if (Object.values(values).some((v) => v === void 0))
1085
+ throw new PropertyAccessError("Placeholder geometry is unresolved.");
1086
+ return values;
1087
+ }
1088
+ insert_table(rows, cols) {
1089
+ if (this.placeholder_format.type !== 12)
1090
+ throw new ValueError("A table placeholder is required.");
1091
+ const id = this.shape_id, xml = this.#binding.read();
1092
+ let replacement = parseXmlPart(
1093
+ new TextEncoder().encode(
1094
+ createTableXml(
1095
+ id,
1096
+ {
1097
+ rows,
1098
+ columns: cols,
1099
+ left: this.left,
1100
+ top: this.top,
1101
+ width: this.width,
1102
+ height: new Length(rows * 370840)
1103
+ },
1104
+ xml.root.name.namespace
1105
+ )
1106
+ ),
1107
+ xml.limits
1108
+ );
1109
+ replacement = preservePlaceholder(xml, replacement);
1110
+ this.#binding.write(replacement);
1111
+ return new GraphicFrame(this.#owner, id);
1112
+ }
1113
+ async insert_picture(input) {
1114
+ if (this.placeholder_format.type !== 18)
1115
+ throw new ValueError("A picture placeholder is required.");
1116
+ const id = this.shape_id;
1117
+ if (!this.#owner.insertRich)
1118
+ throw new PropertyAccessError("Picture insertion requires a package owner.");
1119
+ await this.#owner.insertRich(id, "picture", { input, ...this.#geometry(), fit: "cover" });
1120
+ return new Picture(this.#owner, id);
1121
+ }
1122
+ insert_chart(type, data) {
1123
+ const creationType = typeof type === "number" ? chartTypes.find((name) => XL_CHART_TYPE[name] === type) : chartTypes.find((name) => name === type);
1124
+ if (!creationType) throw new ValueError("Unsupported chart creation type.");
1125
+ if (this.placeholder_format.type !== 8)
1126
+ throw new ValueError("A chart placeholder is required.");
1127
+ const id = this.shape_id;
1128
+ if (!this.#owner.insertChart)
1129
+ throw new PropertyAccessError("Chart insertion requires a package owner.");
1130
+ this.#owner.insertChart(id, {
1131
+ type: creationType,
1132
+ data: toChartData(data),
1133
+ ...this.#geometry()
1134
+ });
1135
+ return new GraphicFrame(this.#owner, id);
1136
+ }
1137
+ };
1138
+ function preservePlaceholder(previous, replacement) {
1139
+ const oldNv = previous.root.children.find((n) => n.name.localName.startsWith("nv"));
1140
+ const newNv = replacement.root.children.find((n) => n.name.localName.startsWith("nv"));
1141
+ const identity = required(oldNv, "cNvPr"), target = required(newNv, "cNvPr");
1142
+ replacement = replacement.merge(target, {
1143
+ attributes: ["id", "name"].map((localName) => ({
1144
+ namespace: "",
1145
+ localName,
1146
+ value: attr(identity, localName) ?? ""
1147
+ }))
1148
+ });
1149
+ const nv = replacement.root.children.find((n) => n.name.localName.startsWith("nv"));
1150
+ const props = required(nv, "nvPr"), oldProps = required(oldNv, "nvPr");
1151
+ return replacement.spliceChildren(nv, nv.children.indexOf(props), 1, [
1152
+ previous.markup(oldProps, true)
1153
+ ]);
1154
+ }
1155
+ var GraphicFrame = class extends InheritedShape {
1156
+ #table;
1157
+ #owner;
1158
+ #chart;
1159
+ constructor(owner, id, groupId) {
1160
+ const bound = binding(owner, id, "graphicFrame", groupId);
1161
+ super(owner, id, "graphicFrame", groupId);
1162
+ this.#owner = owner;
1163
+ if (this.has_table) this.#table = new Table(bound.read(), void 0, bound);
1164
+ }
1165
+ get has_table() {
1166
+ return this.element.children.some(
1167
+ (n) => n.name.localName === "graphic" && n.children.some((d) => d.children.some((t) => t.name.localName === "tbl"))
1168
+ );
1169
+ }
1170
+ get has_chart() {
1171
+ return this.element.children.some(
1172
+ (n) => n.name.localName === "graphic" && n.children.some((d) => d.children.some((t) => t.name.localName === "chart"))
1173
+ );
1174
+ }
1175
+ get shape_type() {
1176
+ if (this.is_placeholder) return 14;
1177
+ const ole = descendants(this.xml).find((node) => node.name.localName === "oleObj");
1178
+ if (ole) return ole.children.some((node) => node.name.localName === "link") ? 10 : 7;
1179
+ return this.has_table ? 19 : 3;
1180
+ }
1181
+ get ole_format() {
1182
+ if (!descendants(this.xml).some((node) => node.name.localName === "oleObj"))
1183
+ throw new PropertyAccessError("Graphic frame has no OLE object.");
1184
+ return new OleFormat(this, this.#owner);
1185
+ }
1186
+ get chart() {
1187
+ if (!this.has_chart || !this.#owner.chart)
1188
+ throw new PropertyAccessError("Graphic frame has no accessible chart.");
1189
+ return this.#chart ??= this.#owner.chart(this.shape_id);
1190
+ }
1191
+ get table() {
1192
+ void this.element;
1193
+ if (!this.#table) throw new PropertyAccessError("Graphic frame has no table.");
1194
+ return this.#table;
1195
+ }
1196
+ };
1197
+ var Picture = class extends InheritedShape {
1198
+ #owner;
1199
+ #binding;
1200
+ constructor(owner, id, groupId) {
1201
+ const bound = binding(owner, id, "pic", groupId);
1202
+ super(owner, id, "pic", groupId);
1203
+ this.#binding = bound;
1204
+ this.#owner = owner;
1205
+ }
1206
+ get image() {
1207
+ const blip = required(this.element, "blipFill").children.find(
1208
+ (node) => node.name.localName === "blip"
1209
+ );
1210
+ if (!blip) throw new PropertyAccessError("Picture has no image reference.");
1211
+ const id = blip.attributes.find(
1212
+ (attribute) => attribute.name.localName === "embed" && attribute.name.namespace.endsWith("/relationships")
1213
+ )?.value;
1214
+ if (!id || !this.#owner.resource)
1215
+ throw new PropertyAccessError("Picture has no embedded image.");
1216
+ const resource = this.#owner.resource(id);
1217
+ return new Image(
1218
+ resource.blob,
1219
+ null,
1220
+ resource.content_type === "image/jpg" ? "image/jpeg" : resource.content_type
1221
+ );
1222
+ }
1223
+ get shape_type() {
1224
+ return this.is_placeholder ? 14 : 13;
1225
+ }
1226
+ #crop(side) {
1227
+ const fill = required(this.element, "blipFill");
1228
+ const crop = fill.children.find((n) => n.name.localName === "srcRect");
1229
+ return Number(crop && attr(crop, side) || 0) / 1e5;
1230
+ }
1231
+ #setCrop(key, value) {
1232
+ const xml = this.#binding.read();
1233
+ this.#binding.write(applyPictureUpdate(xml, xml.root, { [key]: value }, "signed-fraction"));
1234
+ }
1235
+ get crop_left() {
1236
+ return this.#crop("l");
1237
+ }
1238
+ set crop_left(v) {
1239
+ this.#setCrop("cropLeft", v);
1240
+ }
1241
+ get crop_right() {
1242
+ return this.#crop("r");
1243
+ }
1244
+ set crop_right(v) {
1245
+ this.#setCrop("cropRight", v);
1246
+ }
1247
+ get crop_top() {
1248
+ return this.#crop("t");
1249
+ }
1250
+ set crop_top(v) {
1251
+ this.#setCrop("cropTop", v);
1252
+ }
1253
+ get crop_bottom() {
1254
+ return this.#crop("b");
1255
+ }
1256
+ set crop_bottom(v) {
1257
+ this.#setCrop("cropBottom", v);
1258
+ }
1259
+ };
1260
+ var MediaFormat = class {
1261
+ constructor(parent) {
1262
+ this.parent = parent;
1263
+ }
1264
+ parent;
1265
+ get element() {
1266
+ return this.parent.element;
1267
+ }
1268
+ get part() {
1269
+ return this.parent.part;
1270
+ }
1271
+ };
1272
+ var Movie = class extends Picture {
1273
+ get shape_type() {
1274
+ return 16;
1275
+ }
1276
+ get media_type() {
1277
+ void this.element;
1278
+ return PP_MEDIA_TYPE.MOVIE;
1279
+ }
1280
+ get media_format() {
1281
+ return new MediaFormat(this);
1282
+ }
1283
+ get poster_frame() {
1284
+ const fill = this.element.children.find(
1285
+ (node) => node.name.localName === "blipFill" && node.name.namespace === this.element.name.namespace
1286
+ );
1287
+ const a = this.element.name.namespace.includes("purl") ? "http://purl.oclc.org/ooxml/drawingml/main" : "http://schemas.openxmlformats.org/drawingml/2006/main";
1288
+ const blip = fill?.children.find(
1289
+ (node) => node.name.localName === "blip" && node.name.namespace === a
1290
+ );
1291
+ if (!blip?.attributes.some(
1292
+ (attribute) => attribute.name.localName === "embed" && attribute.name.namespace.endsWith("/relationships")
1293
+ ))
1294
+ return null;
1295
+ return this.image;
1296
+ }
1297
+ };
1298
+ var OleFormat = class {
1299
+ constructor(parent, owner) {
1300
+ this.parent = parent;
1301
+ this.owner = owner;
1302
+ }
1303
+ parent;
1304
+ owner;
1305
+ get element() {
1306
+ const graphic = this.parent.element.children.find((node) => node.name.localName === "graphic");
1307
+ if (!graphic) throw new PropertyAccessError("Graphic frame has no graphic data.");
1308
+ return required(graphic, "graphicData");
1309
+ }
1310
+ get part() {
1311
+ return this.parent.part;
1312
+ }
1313
+ get prog_id() {
1314
+ return attr(this.element.children.find((node) => node.name.localName === "oleObj"), "progId") ?? null;
1315
+ }
1316
+ get show_as_icon() {
1317
+ return ["1", "true"].includes(
1318
+ attr(this.element.children.find((node) => node.name.localName === "oleObj"), "showAsIcon") ?? "0"
1319
+ );
1320
+ }
1321
+ get blob() {
1322
+ const ole = this.element.children.find((node) => node.name.localName === "oleObj");
1323
+ if (!ole.children.some((node) => node.name.localName === "embed")) return null;
1324
+ const id = ole.attributes.find(
1325
+ (attribute) => attribute.name.localName === "id" && attribute.name.namespace.endsWith("/relationships")
1326
+ )?.value;
1327
+ if (!id) return null;
1328
+ if (!this.owner.resource) throw new PropertyAccessError("OLE object has no embedded resource.");
1329
+ return new Uint8Array(this.owner.resource(id).blob);
1330
+ }
1331
+ };
1332
+ function recalculateGroups(document, initialId) {
1333
+ let groupId = initialId;
1334
+ while (groupId !== void 0) {
1335
+ let group = tree(document, groupId);
1336
+ const ancestor = descendants(document).find(
1337
+ (node) => node.name.localName === "grpSp" && node.children.includes(group)
1338
+ );
1339
+ const children = shapes(document, groupId).map(readShape);
1340
+ if (children.length && children.every(
1341
+ (shape) => [shape.left, shape.top, shape.width, shape.height].every((value) => value !== null)
1342
+ )) {
1343
+ const left = Math.min(...children.map((shape) => shape.left)), top = Math.min(...children.map((shape) => shape.top));
1344
+ const width = Math.max(...children.map((shape) => shape.left + shape.width)) - left, height = Math.max(...children.map((shape) => shape.top + shape.height)) - top;
1345
+ const namespace = group.name.namespace.includes("purl") ? "http://purl.oclc.org/ooxml/drawingml/main" : "http://schemas.openxmlformats.org/drawingml/2006/main";
1346
+ for (const [name, values] of [
1347
+ ["off", { x: left, y: top }],
1348
+ ["ext", { cx: width, cy: height }],
1349
+ ["chOff", { x: left, y: top }],
1350
+ ["chExt", { cx: width, cy: height }]
1351
+ ]) {
1352
+ group = tree(document, groupId);
1353
+ const props = required(group, "grpSpPr"), transform = props.children.find((node2) => node2.name.localName === "xfrm");
1354
+ if (!transform) {
1355
+ document = document.spliceChildren(props, 0, 0, [`<a:xfrm xmlns:a="${namespace}"/>`]);
1356
+ }
1357
+ const xfrm = required(tree(document, groupId), "grpSpPr").children.find(
1358
+ (node2) => node2.name.localName === "xfrm" && node2.name.namespace === namespace
1359
+ );
1360
+ const node = xfrm.children.find(
1361
+ (node2) => node2.name.localName === name && node2.name.namespace === namespace
1362
+ );
1363
+ const attributes = Object.entries(values).map(([localName, value]) => ({
1364
+ namespace: "",
1365
+ localName,
1366
+ value: String(value)
1367
+ }));
1368
+ if (node) document = document.merge(node, { attributes });
1369
+ else
1370
+ document = document.spliceChildren(xfrm, xfrm.children.length, 0, [
1371
+ `<a:${name} xmlns:a="${namespace}" ${Object.entries(values).map(([key, value]) => `${key}="${value}"`).join(" ")}/>`
1372
+ ]);
1373
+ }
1374
+ }
1375
+ groupId = ancestor ? readShape(ancestor).shapeId : void 0;
1376
+ }
1377
+ return document;
1378
+ }
1379
+ function reparentInsertedAsset(document, id, groupId) {
1380
+ const root = tree(document);
1381
+ const node = shapes(document).find((node2) => readShape(node2).shapeId === id);
1382
+ if (!node) throw new InvalidHandleError();
1383
+ const markup = document.markup(node, true);
1384
+ document = document.spliceChildren(root, root.children.indexOf(node), 1, []);
1385
+ const group = tree(document, groupId);
1386
+ const extension = group.children.findIndex((node2) => node2.name.localName === "extLst");
1387
+ document = document.spliceChildren(group, extension < 0 ? group.children.length : extension, 0, [
1388
+ markup
1389
+ ]);
1390
+ return recalculateGroups(document, groupId);
1391
+ }
1392
+ var SlideShapes = class _SlideShapes {
1393
+ #owner;
1394
+ #groupId;
1395
+ #allocator;
1396
+ constructor(owner, groupId) {
1397
+ this.#owner = owner;
1398
+ this.#groupId = groupId;
1399
+ this.#allocator = new ShapeIdAllocator(owner.read);
1400
+ return indexed(this);
1401
+ }
1402
+ get length() {
1403
+ return shapes(this.#owner.read(), this.#groupId).length;
1404
+ }
1405
+ at(index2) {
1406
+ if (!Number.isSafeInteger(index2)) throw new IndexError();
1407
+ return this.get(index2 < 0 ? this.length + index2 : index2);
1408
+ }
1409
+ get_by_id(id) {
1410
+ const position2 = shapes(this.#owner.read(), this.#groupId).findIndex(
1411
+ (node) => readShape(node).shapeId === id
1412
+ );
1413
+ return position2 < 0 ? null : this.get(position2);
1414
+ }
1415
+ get title() {
1416
+ const position2 = shapes(this.#owner.read(), this.#groupId).findIndex(
1417
+ (node) => ["title", "ctrTitle"].includes(readShape(node).placeholder?.type ?? "")
1418
+ );
1419
+ return position2 < 0 ? null : this.get(position2);
1420
+ }
1421
+ get turbo_add_enabled() {
1422
+ return this.#allocator.turbo_add_enabled;
1423
+ }
1424
+ set turbo_add_enabled(value) {
1425
+ this.#allocator.turbo_add_enabled = value;
1426
+ }
1427
+ get(index2) {
1428
+ const nodes = shapes(this.#owner.read(), this.#groupId);
1429
+ if (!Number.isSafeInteger(index2) || index2 < 0 || index2 >= nodes.length) throw new IndexError();
1430
+ const node = nodes[index2], id = readShape(node).shapeId;
1431
+ if (node.name.localName === "cxnSp") {
1432
+ const xml = this.#owner.read();
1433
+ shapeOwnerTokens.set(xml, this.#owner);
1434
+ return new Connector(xml, id, this.#owner);
1435
+ }
1436
+ if (node.name.localName === "grpSp") {
1437
+ const bound2 = binding(this.#owner, id, "grpSp", this.#groupId);
1438
+ return new GroupShape(bound2.read(), new _SlideShapes(this.#owner, id), bound2);
1439
+ }
1440
+ if (node.name.localName === "graphicFrame")
1441
+ return new GraphicFrame(this.#owner, id, this.#groupId);
1442
+ if (node.name.localName === "pic") {
1443
+ const a = node.name.namespace.includes("purl") ? "http://purl.oclc.org/ooxml/drawingml/main" : "http://schemas.openxmlformats.org/drawingml/2006/main";
1444
+ const props = required(required(node, "nvPicPr"), "nvPr");
1445
+ const media = props.children.some(
1446
+ (child2) => child2.name.localName === "videoFile" && child2.name.namespace === a
1447
+ );
1448
+ return media ? new Movie(this.#owner, id, this.#groupId) : new Picture(this.#owner, id, this.#groupId);
1449
+ }
1450
+ if (readShape(node).placeholder) return new SlidePlaceholder(this.#owner, id, this.#groupId);
1451
+ const bound = binding(this.#owner, id, node.name.localName, this.#groupId);
1452
+ return new Shape(bound.read(), bound);
1453
+ }
1454
+ #append(makeMarkup) {
1455
+ const xml = this.#owner.read(), parent = tree(xml, this.#groupId);
1456
+ let updated = this.#allocator.append(parent, makeMarkup).xml;
1457
+ if (this.#groupId !== void 0) updated = recalculateGroups(updated, this.#groupId);
1458
+ this.#owner.write(updated);
1459
+ return this.get(this.length - 1);
1460
+ }
1461
+ add_chart(chart_type, x, y, cx, cy, chart_data) {
1462
+ if (this.#groupId !== void 0)
1463
+ throw new OfficeError(
1464
+ "unsupported-edit",
1465
+ "Chart insertion into groups is unsupported.",
1466
+ "validate-intent"
1467
+ );
1468
+ if (![x, y, cx, cy].every((value) => value instanceof Length))
1469
+ throw new TypeError("Chart geometry requires Length values.");
1470
+ if (typeof chart_type !== "number" && typeof chart_type !== "string")
1471
+ throw new TypeError("Chart type requires an enum value or registered name.");
1472
+ if (!(chart_data instanceof CategoryChartData) && !(chart_data instanceof XyChartData) && !(chart_data instanceof BubbleChartData))
1473
+ throw new TypeError("Chart data requires a chart data builder.");
1474
+ const type = typeof chart_type === "number" ? chartTypes.find((name) => XL_CHART_TYPE[name] === chart_type) : chartTypes.find((name) => name === chart_type);
1475
+ if (!type) throw new ValueError("Unsupported chart creation type.");
1476
+ if (!this.#owner.addChart)
1477
+ throw new PropertyAccessError("Chart insertion requires a package owner.");
1478
+ const id = this.#owner.addChart({
1479
+ type,
1480
+ data: toChartData(chart_data),
1481
+ left: x.emu,
1482
+ top: y.emu,
1483
+ width: cx.emu,
1484
+ height: cy.emu
1485
+ });
1486
+ return new GraphicFrame(this.#owner, id);
1487
+ }
1488
+ async add_picture(input, left, top, width = null, height = null) {
1489
+ if (!this.#owner.insertAsset)
1490
+ throw new PropertyAccessError("Insertion requires a package owner.");
1491
+ const id = await this.#owner.insertAsset(
1492
+ "picture",
1493
+ { input, left, top, width, height },
1494
+ this.#groupId
1495
+ );
1496
+ return this.get_by_id(id);
1497
+ }
1498
+ async add_movie(input, left, top, width, height, options) {
1499
+ if (!this.#owner.insertAsset)
1500
+ throw new PropertyAccessError("Insertion requires a package owner.");
1501
+ if (!options || !options.poster_frame_image || typeof options.mime_type !== "string")
1502
+ throw new ValueError("Movie insertion requires an explicit poster and MIME type.");
1503
+ const id = await this.#owner.insertAsset(
1504
+ "movie",
1505
+ { input, left, top, width, height, ...options },
1506
+ this.#groupId
1507
+ );
1508
+ return this.get_by_id(id);
1509
+ }
1510
+ async add_ole_object(input, prog_id, left, top, options) {
1511
+ if (!this.#owner.insertAsset)
1512
+ throw new PropertyAccessError("Insertion requires a package owner.");
1513
+ if (!options || !options.icon_file)
1514
+ throw new ValueError("OLE insertion requires an explicit icon.");
1515
+ const application = Object.values(PROG_ID).find((value) => value === prog_id);
1516
+ if (typeof prog_id !== "string" && !application)
1517
+ throw new ValueError("Expected a program ID or registered application.");
1518
+ const id = await this.#owner.insertAsset(
1519
+ "ole",
1520
+ {
1521
+ input,
1522
+ prog_id,
1523
+ left,
1524
+ top,
1525
+ ...application ? { width: application.width, height: application.height } : {},
1526
+ ...options
1527
+ },
1528
+ this.#groupId
1529
+ );
1530
+ return this.get_by_id(id);
1531
+ }
1532
+ add_shape(kind, left, top, width, height) {
1533
+ return this.#append(
1534
+ (id) => createShapeXml(kind, id, { left, top, width, height }, this.#owner.read().root.name.namespace)
1535
+ );
1536
+ }
1537
+ add_table(rows, cols, left, top, width, height) {
1538
+ return this.#append(
1539
+ (id) => createTableXml(
1540
+ id,
1541
+ { rows, columns: cols, left, top, width, height },
1542
+ this.#owner.read().root.name.namespace
1543
+ )
1544
+ );
1545
+ }
1546
+ add_textbox(left, top, width, height) {
1547
+ return this.#append(
1548
+ (id) => createShapeXml(
1549
+ "text-box",
1550
+ id,
1551
+ { left, top, width, height },
1552
+ this.#owner.read().root.name.namespace
1553
+ )
1554
+ );
1555
+ }
1556
+ add_connector(kind, begin_x, begin_y, end_x, end_y) {
1557
+ return this.#append(
1558
+ (id) => createConnectorXml(
1559
+ id,
1560
+ { kind, beginX: begin_x, beginY: begin_y, endX: end_x, endY: end_y },
1561
+ this.#owner.read().root.name.namespace
1562
+ )
1563
+ );
1564
+ }
1565
+ add_group_shape(selected = []) {
1566
+ const source = this.#owner.read(), parent = tree(source, this.#groupId), members = [], ids = /* @__PURE__ */ new Set();
1567
+ for (const handle of selected) {
1568
+ if (members.length >= 4096)
1569
+ throw new OfficeError("resource-limit", "Group child limit exceeded.", "usage");
1570
+ if (!(handle instanceof Shape) && !(handle instanceof Connector))
1571
+ throw new ValueError("Expected an owned shape handle.");
1572
+ const id2 = handle.shape_id;
1573
+ const member = shapes(source, this.#groupId).find((node) => readShape(node).shapeId === id2);
1574
+ if (shapeOwnerTokens.get(handle.xml) !== this.#owner || !member || ids.has(id2))
1575
+ throw new ValueError("Group members must be distinct direct children of this collection.");
1576
+ const geometry = readShape(member);
1577
+ if ([geometry.left, geometry.top, geometry.width, geometry.height].some((v) => v === null))
1578
+ throw new PropertyAccessError("Grouping requires explicit geometry.");
1579
+ ids.add(id2);
1580
+ members.push(member);
1581
+ }
1582
+ const p = source.root.name.namespace, a = p.includes("purl") ? "http://purl.oclc.org/ooxml/drawingml/main" : "http://schemas.openxmlformats.org/drawingml/2006/main";
1583
+ const values = members.map(readShape), left = values.length ? Math.min(...values.map((x) => x.left)) : 0, top = values.length ? Math.min(...values.map((x) => x.top)) : 0;
1584
+ const width = values.length ? Math.max(...values.map((x) => x.left + x.width)) - left : 0, height = values.length ? Math.max(...values.map((x) => x.top + x.height)) - top : 0;
1585
+ const markup = (id2) => `<p:grpSp xmlns:p="${p}" xmlns:a="${a}"><p:nvGrpSpPr><p:cNvPr id="${id2}" name="Group ${id2}"/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="${left}" y="${top}"/><a:ext cx="${width}" cy="${height}"/><a:chOff x="${left}" y="${top}"/><a:chExt cx="${width}" cy="${height}"/></a:xfrm></p:grpSpPr>${members.map((node) => source.markup(node, true)).join("")}</p:grpSp>`;
1586
+ if (!members.length) return this.#append(markup);
1587
+ const id = this.#allocator.next();
1588
+ const retained = parent.children.filter((node) => !members.includes(node));
1589
+ const extension = retained.findIndex((node) => node.name.localName === "extLst");
1590
+ const children = retained.map((node) => source.markup(node, true));
1591
+ children.splice(extension < 0 ? children.length : extension, 0, markup(id));
1592
+ let updated = source.spliceChildren(parent, 0, parent.children.length, children);
1593
+ if (this.#groupId !== void 0) updated = recalculateGroups(updated, this.#groupId);
1594
+ this.#owner.write(updated);
1595
+ return this.get_by_id(id);
1596
+ }
1597
+ build_freeform(start_x = 0, start_y = 0, scale = 1) {
1598
+ return new FreeformBuilder(
1599
+ (geometry) => {
1600
+ const p = this.#owner.read().root.name.namespace, a = p.includes("purl") ? "http://purl.oclc.org/ooxml/drawingml/main" : "http://schemas.openxmlformats.org/drawingml/2006/main";
1601
+ const commands = geometry.commands.map(
1602
+ (command) => command.type === "close" ? "<a:close/>" : `<a:${command.type === "move" ? "moveTo" : "lnTo"}><a:pt x="${command.x}" y="${command.y}"/></a:${command.type === "move" ? "moveTo" : "lnTo"}>`
1603
+ ).join("");
1604
+ return this.#append(
1605
+ (id) => `<p:sp xmlns:p="${p}" xmlns:a="${a}"><p:nvSpPr><p:cNvPr id="${id}" name="Freeform ${id}"/><p:cNvSpPr/><p:nvPr/></p:nvSpPr><p:spPr><a:xfrm><a:off x="${geometry.left}" y="${geometry.top}"/><a:ext cx="${geometry.width}" cy="${geometry.height}"/></a:xfrm><a:custGeom><a:avLst/><a:gdLst/><a:ahLst/><a:cxnLst/><a:rect l="0" t="0" r="r" b="b"/><a:pathLst><a:path w="${geometry.localWidth}" h="${geometry.localHeight}">${commands}</a:path></a:pathLst></a:custGeom></p:spPr></p:sp>`
1606
+ );
1607
+ },
1608
+ start_x,
1609
+ start_y,
1610
+ scale
1611
+ );
1612
+ }
1613
+ *[Symbol.iterator]() {
1614
+ for (let i = 0; i < this.length; i++) yield this.get(i);
1615
+ }
1616
+ };
1617
+ var SlidePlaceholders = class {
1618
+ #owner;
1619
+ constructor(owner) {
1620
+ this.#owner = owner;
1621
+ return indexed(this);
1622
+ }
1623
+ #entries() {
1624
+ const entries = shapes(this.#owner.read()).map((node, index2) => ({ node, index: index2, ph: readShape(node).placeholder })).filter((x) => x.ph !== null);
1625
+ const keys = /* @__PURE__ */ new Set();
1626
+ for (const x of entries) {
1627
+ if (!Number.isSafeInteger(x.ph.idx) || x.ph.idx < 0 || x.ph.idx > 4294967295)
1628
+ throw new ValueError("Invalid placeholder key.");
1629
+ if (keys.has(x.ph.idx))
1630
+ throw new OfficeError("ambiguous-selection", "Duplicate placeholder key.", "select");
1631
+ keys.add(x.ph.idx);
1632
+ }
1633
+ return entries.sort((a, b) => a.ph.idx - b.ph.idx);
1634
+ }
1635
+ get length() {
1636
+ return this.#entries().length;
1637
+ }
1638
+ get(idx) {
1639
+ const entry = this.#entries().find((x) => x.ph.idx === idx);
1640
+ if (!Number.isSafeInteger(idx) || !entry) throw new KeyError();
1641
+ return new SlideShapes(this.#owner).get(entry.index);
1642
+ }
1643
+ *[Symbol.iterator]() {
1644
+ for (const entry of this.#entries()) yield this.get(entry.ph.idx);
1645
+ }
1646
+ };
1647
+ var Slide = class {
1648
+ constructor(slide_id, owner) {
1649
+ this.slide_id = slide_id;
1650
+ this.#owner = owner;
1651
+ this.shapes = new SlideShapes(owner);
1652
+ this.placeholders = new SlidePlaceholders(owner);
1653
+ }
1654
+ slide_id;
1655
+ shapes;
1656
+ placeholders;
1657
+ #owner;
1658
+ get element() {
1659
+ return this.#owner.read().root;
1660
+ }
1661
+ get part() {
1662
+ this.#owner.read();
1663
+ if (!this.#owner.part) throw new PropertyAccessError("Slide has no package part.");
1664
+ return this.#owner.part;
1665
+ }
1666
+ get name() {
1667
+ return attr(required(this.element, "cSld"), "name") ?? "";
1668
+ }
1669
+ set name(value) {
1670
+ if (typeof value !== "string") throw new ValueError("Expected slide name text.");
1671
+ const xml = this.#owner.read();
1672
+ this.#owner.write(
1673
+ xml.merge(required(xml.root, "cSld"), {
1674
+ attributes: [{ namespace: "", localName: "name", value }]
1675
+ })
1676
+ );
1677
+ }
1678
+ };
1679
+ var Slides = class {
1680
+ #items;
1681
+ #add;
1682
+ constructor(items, add) {
1683
+ this.#items = [...items];
1684
+ this.#add = add;
1685
+ return indexed(this);
1686
+ }
1687
+ add_slide(slide_layout) {
1688
+ if (!this.#add) throw new PropertyAccessError("Slide insertion requires a presentation owner.");
1689
+ const slide = this.#add(slide_layout);
1690
+ this.#items.push(slide);
1691
+ return slide;
1692
+ }
1693
+ get length() {
1694
+ return this.#items.length;
1695
+ }
1696
+ get(index2) {
1697
+ if (!Number.isSafeInteger(index2) || index2 < 0 || index2 >= this.length) throw new IndexError();
1698
+ return this.#items[index2];
1699
+ }
1700
+ at(index2) {
1701
+ if (!Number.isSafeInteger(index2)) throw new IndexError();
1702
+ return this.get(index2 < 0 ? this.length + index2 : index2);
1703
+ }
1704
+ get_by_id(id) {
1705
+ return this.#items.find((slide) => slide.slide_id === id) ?? null;
1706
+ }
1707
+ *[Symbol.iterator]() {
1708
+ yield* this.#items;
1709
+ }
1710
+ };
1711
+
1712
+ export {
1713
+ indexed,
1714
+ PP_MEDIA_TYPE,
1715
+ Table,
1716
+ TableCell,
1717
+ TableRows,
1718
+ TableColumns,
1719
+ TableRow,
1720
+ TableColumn,
1721
+ TableCells,
1722
+ GroupShape,
1723
+ Connector,
1724
+ FreeformPath,
1725
+ DrawingOperation,
1726
+ FreeformBuilder,
1727
+ SlidePlaceholder,
1728
+ preservePlaceholder,
1729
+ GraphicFrame,
1730
+ Picture,
1731
+ MediaFormat,
1732
+ Movie,
1733
+ OleFormat,
1734
+ reparentInsertedAsset,
1735
+ SlideShapes,
1736
+ SlidePlaceholders,
1737
+ Slide,
1738
+ Slides
1739
+ };