@poe-platform/safe-bash 0.1.799 → 0.1.801

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 (1076) hide show
  1. package/README.md +48 -22
  2. package/dist/image-ast/index.browser.js +1503 -98
  3. package/dist/image-ast/index.js +1503 -98
  4. package/dist/mp4-ast/types.d.ts +1 -0
  5. package/dist/office-package/zip.d.ts +2 -0
  6. package/dist/office-package/zip.js +1 -1
  7. package/dist/pdf-ast/index.js +5 -4
  8. package/dist/safe-bash/chunks/{chunk-LUOFIVNI.js → chunk-3NDIFSNM.js} +3 -3
  9. package/dist/safe-bash/chunks/chunk-3R3AANOR.js +26 -0
  10. package/dist/safe-bash/chunks/{chunk-TRVGCN3U.js → chunk-45PK3NWI.js} +4 -4
  11. package/dist/safe-bash/chunks/{chunk-KHMGTPD6.js → chunk-46Z5E5EV.js} +2 -2
  12. package/dist/safe-bash/chunks/{chunk-XB3B7KMM.js → chunk-6O77NL2S.js} +1 -1
  13. package/dist/safe-bash/chunks/{chunk-T3JTVIEP.js → chunk-6PAVEFT3.js} +1 -1
  14. package/dist/safe-bash/chunks/{chunk-PYVEAFJM.js → chunk-74GHTNJA.js} +3 -2
  15. package/dist/safe-bash/chunks/{chunk-LQHGH25W.js → chunk-7R5BDCG7.js} +1 -1
  16. package/dist/safe-bash/chunks/{chunk-WUNK5NXJ.js → chunk-7VNF5BFF.js} +1140 -1660
  17. package/dist/safe-bash/chunks/{chunk-NHOXKQNE.js → chunk-A7XEHALN.js} +6 -6
  18. package/dist/safe-bash/chunks/{chunk-MHZ24KEI.js → chunk-AM5ESLPH.js} +1 -1
  19. package/dist/safe-bash/chunks/{chunk-3L3T6LYV.js → chunk-AUSNDQTJ.js} +1 -1
  20. package/dist/safe-bash/chunks/{chunk-YG5WAHK7.js → chunk-B7TAL7S5.js} +1 -3
  21. package/dist/safe-bash/chunks/{chunk-K7IQZE7D.js → chunk-C5OWC2TL.js} +1 -1
  22. package/dist/safe-bash/chunks/{chunk-F3RV2F72.js → chunk-CHYGPFVM.js} +1 -1
  23. package/dist/safe-bash/chunks/{chunk-M4CFCXHN.js → chunk-CS4MNM6I.js} +1 -1
  24. package/dist/safe-bash/chunks/{chunk-H6JW3E4F.js → chunk-CTVWDACF.js} +1 -1
  25. package/dist/safe-bash/chunks/{chunk-KTGR4U57.js → chunk-D3ANYGMC.js} +2 -3
  26. package/dist/safe-bash/chunks/{chunk-ENR3HB2B.js → chunk-E7OYNDGL.js} +1 -2
  27. package/dist/safe-bash/chunks/{chunk-SOZK5JVX.js → chunk-FBUCWVTE.js} +1 -1
  28. package/dist/safe-bash/chunks/{chunk-NX2SQVON.js → chunk-FNDNHAGE.js} +46 -27
  29. package/dist/safe-bash/chunks/{chunk-KCVSVD65.js → chunk-I5HZ4FGE.js} +1 -1
  30. package/dist/safe-bash/chunks/{chunk-KMH2DF3I.js → chunk-ICFDYV64.js} +7 -2
  31. package/dist/safe-bash/chunks/{chunk-T5KKDMYB.js → chunk-IVRQ4BXL.js} +7 -1
  32. package/dist/safe-bash/chunks/{chunk-KV7PKOHV.js → chunk-IWDICZVK.js} +1 -1
  33. package/dist/safe-bash/chunks/{chunk-I4OAEOP6.js → chunk-J42RIHHJ.js} +1 -1
  34. package/dist/safe-bash/chunks/chunk-K6VCD7IY.js +106 -0
  35. package/dist/safe-bash/chunks/{chunk-63FXVDGF.js → chunk-LVOBFF4D.js} +1 -1
  36. package/dist/safe-bash/chunks/{chunk-U5NUZPCC.js → chunk-MHMMRCYC.js} +1 -1
  37. package/dist/safe-bash/chunks/{chunk-6HZYFL3H.js → chunk-NR3EM4LS.js} +1 -1
  38. package/dist/safe-bash/chunks/{chunk-VYZTG3GV.js → chunk-NZQXYWA3.js} +1 -1
  39. package/dist/safe-bash/chunks/{chunk-JSVX4VIA.js → chunk-OQRVVGR6.js} +3 -2
  40. package/dist/safe-bash/chunks/{chunk-B3DDEDH2.js → chunk-OV6IHKO6.js} +2 -2
  41. package/dist/safe-bash/chunks/{chunk-SPYL72GN.js → chunk-PQRAK7HU.js} +1196 -5781
  42. package/dist/safe-bash/chunks/chunk-SZH7EJLD.js +9221 -0
  43. package/dist/safe-bash/chunks/{chunk-AKC46AF6.js → chunk-TFIBK2GI.js} +8 -41
  44. package/dist/safe-bash/chunks/{chunk-ZNAFMYIA.js → chunk-UE5KZDEK.js} +2 -2
  45. package/dist/safe-bash/chunks/{chunk-QU3BVQ53.js → chunk-UTBUUFDM.js} +1 -1
  46. package/dist/safe-bash/chunks/{chunk-6IBTC4YL.js → chunk-VQDD3G76.js} +93 -39
  47. package/dist/safe-bash/chunks/{chunk-IUTD5FH5.js → chunk-VTH3MLDU.js} +2 -7
  48. package/dist/safe-bash/chunks/{chunk-LLZCZ24K.js → chunk-XVOSKJE2.js} +1 -1
  49. package/dist/safe-bash/chunks/{csvkit-W2UEKH6P.js → csvkit-TACDU7FC.js} +3 -3
  50. package/dist/safe-bash/chunks/{ffmpeg-42CGASMV.js → ffmpeg-WTC3TEFI.js} +2 -2
  51. package/dist/safe-bash/chunks/{gh-26GYLH6D.js → gh-6WU6PXL4.js} +2 -2
  52. package/dist/safe-bash/chunks/{git-YREKMUVD.js → git-EFZIGJW4.js} +2 -2
  53. package/dist/safe-bash/chunks/{imagemagick-3YIX4XO2.js → imagemagick-EIEYGWPF.js} +2 -2
  54. package/dist/safe-bash/chunks/{implementation-E3YMKU3Z.js → implementation-MLFHUQ5M.js} +2 -2
  55. package/dist/safe-bash/chunks/mmdc-ROQJT5HQ.js +118 -0
  56. package/dist/safe-bash/chunks/{pdfimages-UE2UISP2.js → pdfimages-DW7LWXFI.js} +2 -2
  57. package/dist/safe-bash/chunks/{pdfinfo-RGARKLI5.js → pdfinfo-TIP6XLUQ.js} +4 -12
  58. package/dist/safe-bash/chunks/{pdftk-JY3WVCCC.js → pdftk-DMG22ITZ.js} +2 -2
  59. package/dist/safe-bash/chunks/{pdftoppm-GPD3BMPY.js → pdftoppm-WNDYR72T.js} +2 -2
  60. package/dist/safe-bash/chunks/{pdftotext-K7GQ2QJZ.js → pdftotext-5IPZ4NI7.js} +2 -2
  61. package/dist/safe-bash/chunks/{qpdf-F4U7WUSU.js → qpdf-TTX2DIUA.js} +2 -2
  62. package/dist/safe-bash/chunks/{sips-RWENS7X5.js → sips-XYS46JPJ.js} +2 -2
  63. package/dist/safe-bash/chunks/{soffice-IT6W2C5F.js → soffice-TU73E5KL.js} +2 -2
  64. package/dist/safe-bash/chunks/{wkhtmltopdf-JYNDAHIZ.js → wkhtmltopdf-FSZ2CHGE.js} +2 -2
  65. package/dist/safe-bash/command-chunks/{chunk-QBGA56UH.js → chunk-2ELYGJDD.js} +7 -7
  66. package/dist/safe-bash/command-chunks/chunk-2FGJYFWZ.js +44 -0
  67. package/dist/safe-bash/command-chunks/chunk-2H4JTFIL.js +53 -0
  68. package/dist/safe-bash/command-chunks/{chunk-52PCQXD2.js → chunk-2NHI5F5S.js} +2 -1
  69. package/dist/safe-bash/command-chunks/{chunk-HDKVO47G.js → chunk-2SQEIUGJ.js} +3 -3
  70. package/dist/safe-bash/command-chunks/chunk-364TMWBT.js +946 -0
  71. package/dist/safe-bash/command-chunks/chunk-3E2OIS2J.js +7037 -0
  72. package/dist/safe-bash/command-chunks/chunk-3HHCU5YU.js +380 -0
  73. package/dist/safe-bash/command-chunks/{chunk-TF6OA2GK.js → chunk-3NV3HYT2.js} +1 -1
  74. package/dist/safe-bash/command-chunks/chunk-4B7Y7S6E.js +61 -0
  75. package/dist/safe-bash/command-chunks/{chunk-LLCXZKZ6.js → chunk-4BB2SWJ5.js} +2 -2
  76. package/dist/safe-bash/command-chunks/{chunk-IEXHHNOF.js → chunk-4J5CZ2DP.js} +2 -7
  77. package/dist/safe-bash/command-chunks/{chunk-WDHI3S6Y.js → chunk-4OOUQTQO.js} +1 -1
  78. package/dist/safe-bash/command-chunks/chunk-4ZHMW6F5.js +104 -0
  79. package/dist/safe-bash/command-chunks/{chunk-YMONDXET.js → chunk-4ZQWGOZB.js} +2 -2
  80. package/dist/safe-bash/command-chunks/chunk-5BSTFCXG.js +553 -0
  81. package/dist/safe-bash/command-chunks/{chunk-MKQVQMXO.js → chunk-5LU4UCBR.js} +1 -1
  82. package/dist/safe-bash/command-chunks/chunk-5PWJG2UK.js +174 -0
  83. package/dist/safe-bash/command-chunks/chunk-5TBUOBDE.js +346 -0
  84. package/dist/safe-bash/command-chunks/{chunk-JMPP4TCW.js → chunk-5UBXNSFZ.js} +3 -2
  85. package/dist/safe-bash/command-chunks/chunk-5XY4DTNG.js +34 -0
  86. package/dist/safe-bash/command-chunks/chunk-5ZMZ573Q.js +140 -0
  87. package/dist/safe-bash/command-chunks/{chunk-3NG75MOB.js → chunk-67GQA75T.js} +1 -1
  88. package/dist/safe-bash/command-chunks/chunk-67QKREJK.js +347 -0
  89. package/dist/safe-bash/command-chunks/{chunk-L6SU4S26.js → chunk-6B7WQIKB.js} +0 -7
  90. package/dist/safe-bash/command-chunks/chunk-6BNTBWIK.js +327 -0
  91. package/dist/safe-bash/command-chunks/chunk-6EPHJGGF.js +23 -0
  92. package/dist/safe-bash/command-chunks/chunk-6F4XCVON.js +266 -0
  93. package/dist/safe-bash/command-chunks/chunk-6KJ3LPI2.js +94 -0
  94. package/dist/safe-bash/command-chunks/{chunk-HLDTOR7M.js → chunk-6ZVI7LUY.js} +1 -1
  95. package/dist/safe-bash/command-chunks/{chunk-X6NJC3IC.js → chunk-75OFBY5R.js} +1 -1
  96. package/dist/safe-bash/command-chunks/chunk-7K6JYKPJ.js +422 -0
  97. package/dist/safe-bash/command-chunks/chunk-7N2LI2KO.js +206 -0
  98. package/dist/safe-bash/command-chunks/{chunk-MRW5HD2D.js → chunk-7O3E4LPT.js} +4 -22
  99. package/dist/safe-bash/command-chunks/chunk-7U7EXOXX.js +1392 -0
  100. package/dist/safe-bash/command-chunks/{chunk-6CYTRQ24.js → chunk-7VTKQUA5.js} +20 -17
  101. package/dist/safe-bash/command-chunks/{chunk-BZPAWTUL.js → chunk-AEF5BA3D.js} +1 -1
  102. package/dist/safe-bash/command-chunks/{pptx-GBPNWNEP-7EQEVXV5.js → chunk-AI5JAXQF.js} +34820 -18029
  103. package/dist/safe-bash/command-chunks/{chunk-63R3FEZJ.js → chunk-AIV5BF5W.js} +1 -1
  104. package/dist/safe-bash/command-chunks/{chunk-AYUTO323.js → chunk-AKJG2XD3.js} +2 -18
  105. package/dist/safe-bash/command-chunks/{chunk-J34TZVMW.js → chunk-ALDC4XP4.js} +0 -5
  106. package/dist/safe-bash/command-chunks/chunk-AMO3THU4.js +105 -0
  107. package/dist/safe-bash/command-chunks/chunk-ARBYOQUZ.js +65 -0
  108. package/dist/safe-bash/command-chunks/chunk-BAGCY35S.js +231 -0
  109. package/dist/safe-bash/command-chunks/chunk-BAXU7B5Z.js +101 -0
  110. package/dist/safe-bash/command-chunks/{chunk-44AHAB5O.js → chunk-BDSMROQZ.js} +1 -4
  111. package/dist/safe-bash/command-chunks/chunk-BNOU5YQS.js +182 -0
  112. package/dist/safe-bash/command-chunks/{chunk-4ZALPDBV.js → chunk-BPE5INLI.js} +2 -2
  113. package/dist/safe-bash/command-chunks/{chunk-OT4LZMLB.js → chunk-BR73BIOW.js} +1 -1
  114. package/dist/safe-bash/command-chunks/chunk-C5YYCQHW.js +1444 -0
  115. package/dist/safe-bash/command-chunks/chunk-C7I25AAL.js +25 -0
  116. package/dist/safe-bash/command-chunks/{chunk-4ONEXMD3.js → chunk-CAP7ZJSY.js} +8 -8
  117. package/dist/safe-bash/command-chunks/{chunk-DWFLVJC6.js → chunk-CCRHMAU5.js} +2 -1
  118. package/dist/safe-bash/command-chunks/chunk-CQ5YGOGB.js +150 -0
  119. package/dist/safe-bash/command-chunks/{chunk-JCNNOMBV.js → chunk-CQTRW45K.js} +3 -2
  120. package/dist/safe-bash/command-chunks/{chunk-N2F74VRO.js → chunk-CZ7EN3JG.js} +1 -1
  121. package/dist/safe-bash/command-chunks/chunk-DB453IE6.js +122 -0
  122. package/dist/safe-bash/command-chunks/{chunk-KKG4BAFZ.js → chunk-DIEPXUM4.js} +6 -0
  123. package/dist/safe-bash/command-chunks/chunk-DOKKNRRM.js +87 -0
  124. package/dist/safe-bash/command-chunks/{chunk-2PX5B7T5.js → chunk-DQAVUDDX.js} +2 -2
  125. package/dist/safe-bash/command-chunks/chunk-DT7BCTWY.js +249 -0
  126. package/dist/safe-bash/command-chunks/{chunk-6BETHLXZ.js → chunk-DZCY63VJ.js} +13 -11
  127. package/dist/safe-bash/command-chunks/{chunk-QUENU6GM.js → chunk-E55UKBIE.js} +3 -3
  128. package/dist/safe-bash/command-chunks/chunk-EK6YNAXT.js +343 -0
  129. package/dist/safe-bash/command-chunks/chunk-EQ4HV54N.js +22 -0
  130. package/dist/safe-bash/command-chunks/{chunk-HLGKIZ25.js → chunk-F6OYH562.js} +2 -0
  131. package/dist/safe-bash/command-chunks/{chunk-MC3VWLIZ.js → chunk-FDBUV4HJ.js} +28 -19
  132. package/dist/safe-bash/command-chunks/{chunk-7FKUC34S.js → chunk-FPVUD6TH.js} +6 -3
  133. package/dist/safe-bash/command-chunks/chunk-FXELCPFX.js +195 -0
  134. package/dist/safe-bash/command-chunks/chunk-FXOA7RBK.js +42 -0
  135. package/dist/safe-bash/command-chunks/{chunk-LPORMIZS.js → chunk-FZTK4MFI.js} +9 -9
  136. package/dist/safe-bash/command-chunks/{chunk-K543PB3I.js → chunk-G66QUHIZ.js} +6 -35
  137. package/dist/safe-bash/command-chunks/chunk-GFQZCKO6.js +272 -0
  138. package/dist/safe-bash/command-chunks/{chunk-CU5RLO62.js → chunk-GLOZX57Y.js} +92 -18
  139. package/dist/safe-bash/command-chunks/chunk-GMIHJYDG.js +331 -0
  140. package/dist/safe-bash/command-chunks/chunk-GOB777HR.js +97 -0
  141. package/dist/safe-bash/command-chunks/chunk-GRBWW4SG.js +48 -0
  142. package/dist/safe-bash/command-chunks/{chunk-PPNBNFAU.js → chunk-GYQ2HAKQ.js} +8 -8
  143. package/dist/safe-bash/command-chunks/chunk-H622NS6Z.js +11 -0
  144. package/dist/safe-bash/command-chunks/{chunk-UI32HWGS.js → chunk-HMOZ6XVJ.js} +1 -1
  145. package/dist/safe-bash/command-chunks/{chunk-AVSPNLWV.js → chunk-I237SNW5.js} +1 -1
  146. package/dist/safe-bash/command-chunks/{chunk-43GSSUAY.js → chunk-II77KPZN.js} +5 -5
  147. package/dist/safe-bash/command-chunks/{chunk-ZS3QPNUL.js → chunk-IR2BY7EL.js} +21 -6
  148. package/dist/safe-bash/command-chunks/{chunk-SG424QWS.js → chunk-JDYXY44P.js} +2 -2
  149. package/dist/safe-bash/command-chunks/chunk-JNZ3CVAE.js +147 -0
  150. package/dist/safe-bash/command-chunks/{chunk-4QJOYXVB.js → chunk-JV7LBUTP.js} +1 -1
  151. package/dist/safe-bash/command-chunks/{chunk-IKS2YXZQ.js → chunk-K67MWWWH.js} +3 -3
  152. package/dist/safe-bash/command-chunks/chunk-KFVV7ZJO.js +216 -0
  153. package/dist/safe-bash/command-chunks/{chunk-G4PNVO6Z.js → chunk-KP7AO66M.js} +1 -1
  154. package/dist/safe-bash/command-chunks/{chunk-KMCZ6P4O.js → chunk-KQLD3AED.js} +68 -7
  155. package/dist/safe-bash/command-chunks/chunk-KWESKQHR.js +25 -0
  156. package/dist/safe-bash/command-chunks/{chunk-YZ5SVZFD.js → chunk-KXU3IRUO.js} +3 -3
  157. package/dist/safe-bash/command-chunks/{chunk-C7IHMJEW.js → chunk-KZC5UWFF.js} +2 -2
  158. package/dist/safe-bash/command-chunks/{chunk-2WRTLCGK.js → chunk-LAOM65EE.js} +5 -5
  159. package/dist/safe-bash/command-chunks/chunk-LE5LZNHE.js +204 -0
  160. package/dist/safe-bash/command-chunks/{chunk-HFII3QYO.js → chunk-LWS62ISU.js} +46 -32
  161. package/dist/safe-bash/command-chunks/{chunk-BZDDAPSV.js → chunk-LWSBAWLT.js} +1 -1
  162. package/dist/safe-bash/command-chunks/chunk-MDH5T4OS.js +41 -0
  163. package/dist/safe-bash/command-chunks/{chunk-X7TM3AKW.js → chunk-MIXBO6U7.js} +20 -7
  164. package/dist/safe-bash/command-chunks/chunk-MM6HU6CX.js +20 -0
  165. package/dist/safe-bash/command-chunks/{chunk-MYJAZ3U2.js → chunk-MPL2466A.js} +2 -2
  166. package/dist/safe-bash/command-chunks/{chunk-HLBX5IRS.js → chunk-MQFIPHIQ.js} +46 -81
  167. package/dist/safe-bash/command-chunks/{chunk-ZJBR5Q5I.js → chunk-MSFXC3OC.js} +4 -4
  168. package/dist/safe-bash/command-chunks/{chunk-NI7MKJPN.js → chunk-MTQH74CF.js} +3 -55
  169. package/dist/safe-bash/command-chunks/chunk-MWUZZWXK.js +354 -0
  170. package/dist/safe-bash/command-chunks/chunk-N4PFUSRM.js +35 -0
  171. package/dist/safe-bash/command-chunks/chunk-NCD7PEWH.js +298 -0
  172. package/dist/safe-bash/command-chunks/chunk-NFGI5IGF.js +266 -0
  173. package/dist/safe-bash/command-chunks/{chunk-I3K5RYU4.js → chunk-NKFYQSES.js} +73 -26
  174. package/dist/safe-bash/command-chunks/{chunk-KVFCSLKK.js → chunk-NXEQ3ESQ.js} +6 -0
  175. package/dist/safe-bash/command-chunks/{chunk-NGWB2YBL.js → chunk-O4JQSB7O.js} +1 -1
  176. package/dist/safe-bash/command-chunks/{chunk-7L24L4UO.js → chunk-OQU6UT6X.js} +2 -20
  177. package/dist/safe-bash/command-chunks/{chunk-3VGGYEDH.js → chunk-ORYGZYKW.js} +4 -3
  178. package/dist/safe-bash/command-chunks/{chunk-ZXKW7SJ2.js → chunk-OYYV7ZAF.js} +2 -2
  179. package/dist/safe-bash/command-chunks/chunk-P2N33UMN.js +270 -0
  180. package/dist/safe-bash/command-chunks/{chunk-Q7Q5GM5S.js → chunk-P5APDEFB.js} +2 -2
  181. package/dist/safe-bash/command-chunks/{chunk-X2YQLGKS.js → chunk-PCEFOYA3.js} +240 -148
  182. package/dist/safe-bash/command-chunks/{chunk-OLQG7ZCN.js → chunk-PEF7K3UQ.js} +136 -75
  183. package/dist/safe-bash/command-chunks/chunk-PII4YEZW.js +123 -0
  184. package/dist/safe-bash/command-chunks/{chunk-AIRGA2SU.js → chunk-PMBFZXTK.js} +1 -1
  185. package/dist/safe-bash/command-chunks/{chunk-ZT4KSS2V.js → chunk-PTT3I223.js} +1 -1
  186. package/dist/safe-bash/command-chunks/{chunk-4Y3WVMK4.js → chunk-PV66YWHB.js} +1 -0
  187. package/dist/safe-bash/command-chunks/chunk-Q3EWDEUQ.js +185 -0
  188. package/dist/safe-bash/command-chunks/{chunk-AXK3H4PX.js → chunk-QJ33BHI4.js} +1 -1
  189. package/dist/safe-bash/command-chunks/chunk-QKFSRZGQ.js +1091 -0
  190. package/dist/safe-bash/command-chunks/{chunk-JZSNU2MY.js → chunk-QKJLP53H.js} +2 -2
  191. package/dist/safe-bash/command-chunks/{chunk-VVI4Z73I.js → chunk-QP4R6GLA.js} +5 -1
  192. package/dist/safe-bash/command-chunks/chunk-RMWQAAO5.js +2488 -0
  193. package/dist/safe-bash/command-chunks/{chunk-QDTBMSBE.js → chunk-RO62EWX6.js} +2 -2
  194. package/dist/safe-bash/command-chunks/{chunk-HRLIAMXC.js → chunk-RZZI24ZE.js} +7 -6
  195. package/dist/safe-bash/command-chunks/{chunk-PFAADCB5.js → chunk-SDNBCQ3X.js} +10 -24
  196. package/dist/safe-bash/command-chunks/chunk-SEM36PG5.js +11 -0
  197. package/dist/safe-bash/command-chunks/{chunk-36O5OT7E.js → chunk-T35Y7YQD.js} +1 -1
  198. package/dist/safe-bash/command-chunks/{chunk-ESMCX3YV.js → chunk-TGSNCQSR.js} +710 -143
  199. package/dist/safe-bash/command-chunks/chunk-TIOCQVUQ.js +557 -0
  200. package/dist/safe-bash/command-chunks/{chunk-T5H5UJQ3.js → chunk-TNOA7FCQ.js} +1 -1
  201. package/dist/safe-bash/command-chunks/{chunk-GN2TKLE7.js → chunk-TS65BJHG.js} +5 -5
  202. package/dist/safe-bash/command-chunks/chunk-TSCGT46G.js +363 -0
  203. package/dist/safe-bash/command-chunks/chunk-UG7SMZFF.js +178 -0
  204. package/dist/safe-bash/command-chunks/{chunk-KBEURXFF.js → chunk-UN6WS55J.js} +3 -3
  205. package/dist/safe-bash/command-chunks/chunk-UXSR5BZH.js +136 -0
  206. package/dist/safe-bash/command-chunks/{chunk-SX2X3IH4.js → chunk-V2V5OCL3.js} +1 -1
  207. package/dist/safe-bash/command-chunks/chunk-V6BEDRMQ.js +112 -0
  208. package/dist/safe-bash/command-chunks/chunk-V7A7DRTU.js +293 -0
  209. package/dist/safe-bash/command-chunks/{chunk-5SHGJ7NO.js → chunk-VA5ZHYYA.js} +73 -33
  210. package/dist/safe-bash/command-chunks/{chunk-J4PEQWSF.js → chunk-VGG2DL5Q.js} +0 -1
  211. package/dist/safe-bash/command-chunks/chunk-VPR5LQYX.js +1228 -0
  212. package/dist/safe-bash/command-chunks/{chunk-EIVW3X3N.js → chunk-VSRGNQCP.js} +11 -6
  213. package/dist/safe-bash/command-chunks/{chunk-TYVCKQDH.js → chunk-VXSLJH7G.js} +56 -6
  214. package/dist/safe-bash/command-chunks/{chunk-PXYOWWMV.js → chunk-W7RAD4EW.js} +4 -3
  215. package/dist/safe-bash/command-chunks/{src-UJOWAS2S.js → chunk-WD3ERGRY.js} +77 -277
  216. package/dist/safe-bash/command-chunks/{chunk-5ZSM4UFN.js → chunk-WECIOOQB.js} +8 -64
  217. package/dist/safe-bash/command-chunks/{chunk-YFSDDFGV.js → chunk-WH627NJL.js} +446 -53
  218. package/dist/safe-bash/command-chunks/chunk-WNE7FPVR.js +236 -0
  219. package/dist/safe-bash/command-chunks/{chunk-UKS2XJZI.js → chunk-WPYIOKE3.js} +4 -4
  220. package/dist/safe-bash/command-chunks/{chunk-HHP343KT.js → chunk-WTECBRU4.js} +1 -1
  221. package/dist/safe-bash/command-chunks/{chunk-AO6Z5EQ7.js → chunk-WVE64WM2.js} +6 -5
  222. package/dist/safe-bash/command-chunks/chunk-WVHONVZ4.js +594 -0
  223. package/dist/safe-bash/command-chunks/chunk-XIIBTGC5.js +580 -0
  224. package/dist/safe-bash/command-chunks/chunk-XJXU3VVH.js +737 -0
  225. package/dist/safe-bash/command-chunks/chunk-XNLFHHOC.js +63 -0
  226. package/dist/safe-bash/command-chunks/{chunk-XAFSZDY2.js → chunk-XS72HTMA.js} +11 -0
  227. package/dist/safe-bash/command-chunks/chunk-Y5INTD6S.js +220 -0
  228. package/dist/safe-bash/command-chunks/chunk-YIQACGEW.js +43 -0
  229. package/dist/safe-bash/command-chunks/chunk-YOF7R4OY.js +80 -0
  230. package/dist/safe-bash/command-chunks/{chunk-VZHRZMS7.js → chunk-YOFC45RK.js} +1 -1
  231. package/dist/safe-bash/command-chunks/{chunk-2FUAW6GO.js → chunk-Z45N42QC.js} +75 -11
  232. package/dist/safe-bash/command-chunks/chunk-ZHUWOUWB.js +618 -0
  233. package/dist/safe-bash/command-chunks/{chunk-OPUJSTHS.js → chunk-ZYHTWNAE.js} +215 -67
  234. package/dist/safe-bash/command-chunks/chunk-ZYXH3B66.js +636 -0
  235. package/dist/safe-bash/command-chunks/{model-store-L35QTZMJ.js → model-store-WPKMRPV4.js} +2 -2
  236. package/dist/safe-bash/command-chunks/pptx-7G52EJ6L-4JACH5FB.js +625 -0
  237. package/dist/safe-bash/command-chunks/python-worker-source-TYOFJMCW.js +4 -0
  238. package/dist/safe-bash/command-chunks/src-ICMQISAA.js +501 -0
  239. package/dist/safe-bash/commands/archive/create.d.ts +1 -17
  240. package/dist/safe-bash/commands/archive/create.js +1 -252
  241. package/dist/safe-bash/commands/archive/extract.d.ts +1 -11
  242. package/dist/safe-bash/commands/archive/extract.js +1 -640
  243. package/dist/safe-bash/commands/archive/format.d.ts +1 -32
  244. package/dist/safe-bash/commands/archive/format.js +1 -225
  245. package/dist/safe-bash/commands/archive/index.d.ts +5 -10
  246. package/dist/safe-bash/commands/archive/index.js +6 -931
  247. package/dist/safe-bash/commands/archive/listing.d.ts +1 -2
  248. package/dist/safe-bash/commands/archive/listing.js +1 -21
  249. package/dist/safe-bash/commands/archive/modes.d.ts +1 -5
  250. package/dist/safe-bash/commands/archive/modes.js +1 -182
  251. package/dist/safe-bash/commands/archive/options.d.ts +1 -53
  252. package/dist/safe-bash/commands/archive/options.js +1 -462
  253. package/dist/safe-bash/commands/archive/stream.d.ts +1 -22
  254. package/dist/safe-bash/commands/archive/stream.js +1 -188
  255. package/dist/safe-bash/commands/archive/transform.d.ts +1 -16
  256. package/dist/safe-bash/commands/archive/transform.js +1 -85
  257. package/dist/safe-bash/commands/archive/unzip/arguments.d.ts +1 -53
  258. package/dist/safe-bash/commands/archive/unzip/arguments.js +1 -322
  259. package/dist/safe-bash/commands/archive/unzip/safety.d.ts +1 -32
  260. package/dist/safe-bash/commands/archive/unzip/safety.js +1 -295
  261. package/dist/safe-bash/commands/archive/unzip.d.ts +1 -3
  262. package/dist/safe-bash/commands/archive/unzip.js +1 -398
  263. package/dist/safe-bash/commands/archive/zip/aes.d.ts +1 -17
  264. package/dist/safe-bash/commands/archive/zip/aes.js +1 -156
  265. package/dist/safe-bash/commands/archive/zip/comments.d.ts +1 -17
  266. package/dist/safe-bash/commands/archive/zip/comments.js +1 -83
  267. package/dist/safe-bash/commands/archive/zip/crc.d.ts +1 -1
  268. package/dist/safe-bash/commands/archive/zip/crc.js +1 -1
  269. package/dist/safe-bash/commands/archive/zip/crypto.d.ts +1 -19
  270. package/dist/safe-bash/commands/archive/zip/crypto.js +1 -118
  271. package/dist/safe-bash/commands/archive/zip/dates.d.ts +1 -4
  272. package/dist/safe-bash/commands/archive/zip/dates.js +1 -66
  273. package/dist/safe-bash/commands/archive/zip/environment.d.ts +1 -2
  274. package/dist/safe-bash/commands/archive/zip/environment.js +1 -62
  275. package/dist/safe-bash/commands/archive/zip/grow.d.ts +1 -3
  276. package/dist/safe-bash/commands/archive/zip/grow.js +1 -2
  277. package/dist/safe-bash/commands/archive/zip/help.d.ts +1 -4
  278. package/dist/safe-bash/commands/archive/zip/help.js +1 -182
  279. package/dist/safe-bash/commands/archive/zip/line-endings.d.ts +1 -2
  280. package/dist/safe-bash/commands/archive/zip/line-endings.js +1 -194
  281. package/dist/safe-bash/commands/archive/zip/log.d.ts +1 -22
  282. package/dist/safe-bash/commands/archive/zip/log.js +1 -159
  283. package/dist/safe-bash/commands/archive/zip/lzma.d.ts +1 -9
  284. package/dist/safe-bash/commands/archive/zip/lzma.js +1 -40
  285. package/dist/safe-bash/commands/archive/zip/move.d.ts +1 -11
  286. package/dist/safe-bash/commands/archive/zip/move.js +1 -59
  287. package/dist/safe-bash/commands/archive/zip/names.d.ts +1 -2
  288. package/dist/safe-bash/commands/archive/zip/names.js +1 -33
  289. package/dist/safe-bash/commands/archive/zip/options.d.ts +1 -13
  290. package/dist/safe-bash/commands/archive/zip/options.js +1 -124
  291. package/dist/safe-bash/commands/archive/zip/repair.d.ts +1 -10
  292. package/dist/safe-bash/commands/archive/zip/repair.js +1 -392
  293. package/dist/safe-bash/commands/archive/zip/safety.d.ts +1 -54
  294. package/dist/safe-bash/commands/archive/zip/safety.js +1 -360
  295. package/dist/safe-bash/commands/archive/zip/sfx.d.ts +1 -4
  296. package/dist/safe-bash/commands/archive/zip/sfx.js +1 -52
  297. package/dist/safe-bash/commands/archive/zip/test-command.d.ts +1 -5
  298. package/dist/safe-bash/commands/archive/zip/test-command.js +1 -101
  299. package/dist/safe-bash/commands/archive/zip/volumes.d.ts +1 -21
  300. package/dist/safe-bash/commands/archive/zip/volumes.js +1 -281
  301. package/dist/safe-bash/commands/archive/zip/zip64.d.ts +1 -30
  302. package/dist/safe-bash/commands/archive/zip/zip64.js +1 -227
  303. package/dist/safe-bash/commands/archive/zip-format.d.ts +1 -68
  304. package/dist/safe-bash/commands/archive/zip-format.js +1 -1075
  305. package/dist/safe-bash/commands/archive/zip.d.ts +1 -3
  306. package/dist/safe-bash/commands/archive/zip.js +1 -1523
  307. package/dist/safe-bash/commands/awk/index.d.ts +2 -0
  308. package/dist/safe-bash/commands/awk/index.js +2 -0
  309. package/dist/safe-bash/commands/bytes/compression/index.js +4 -2
  310. package/dist/safe-bash/commands/copy-preserve.d.ts +1 -0
  311. package/dist/safe-bash/commands/csplit/index.browser.js +2 -2
  312. package/dist/safe-bash/commands/curl/index.d.ts +2 -0
  313. package/dist/safe-bash/commands/curl/index.js +2 -0
  314. package/dist/safe-bash/commands/diff/index.d.ts +2 -0
  315. package/dist/safe-bash/commands/diff/index.js +2 -0
  316. package/dist/safe-bash/commands/diff-patch/diff-format.d.ts +1 -10
  317. package/dist/safe-bash/commands/diff-patch/diff-format.js +1 -237
  318. package/dist/safe-bash/commands/diff-patch/diff-options.d.ts +1 -38
  319. package/dist/safe-bash/commands/diff-patch/diff-options.js +1 -261
  320. package/dist/safe-bash/commands/diff-patch/diff-output.d.ts +1 -20
  321. package/dist/safe-bash/commands/diff-patch/diff-output.js +1 -290
  322. package/dist/safe-bash/commands/diff-patch/diff.d.ts +1 -2
  323. package/dist/safe-bash/commands/diff-patch/diff.js +1 -656
  324. package/dist/safe-bash/commands/diff-patch/index.d.ts +4 -5
  325. package/dist/safe-bash/commands/diff-patch/index.js +8 -333
  326. package/dist/safe-bash/commands/diff-patch/patch-envelope.d.ts +1 -2
  327. package/dist/safe-bash/commands/diff-patch/patch-envelope.js +1 -63
  328. package/dist/safe-bash/commands/diff-patch/patch-formats.d.ts +1 -7
  329. package/dist/safe-bash/commands/diff-patch/patch-formats.js +1 -264
  330. package/dist/safe-bash/commands/diff-patch/patch-gnu-paths.d.ts +1 -41
  331. package/dist/safe-bash/commands/diff-patch/patch-gnu-paths.js +1 -263
  332. package/dist/safe-bash/commands/diff-patch/patch-gnu-reject.d.ts +1 -3
  333. package/dist/safe-bash/commands/diff-patch/patch-gnu-reject.js +1 -100
  334. package/dist/safe-bash/commands/diff-patch/patch-path.d.ts +1 -3
  335. package/dist/safe-bash/commands/diff-patch/patch-path.js +1 -91
  336. package/dist/safe-bash/commands/diff-patch/patch-publication.d.ts +1 -13
  337. package/dist/safe-bash/commands/diff-patch/patch-publication.js +1 -107
  338. package/dist/safe-bash/commands/diff-patch/patch.d.ts +1 -2
  339. package/dist/safe-bash/commands/diff-patch/patch.js +1 -653
  340. package/dist/safe-bash/commands/diff-patch/shared.d.ts +1 -53
  341. package/dist/safe-bash/commands/diff-patch/shared.js +1 -267
  342. package/dist/safe-bash/commands/diff-patch/unified.d.ts +1 -52
  343. package/dist/safe-bash/commands/diff-patch/unified.js +1 -385
  344. package/dist/safe-bash/commands/directory-admission.d.ts +1 -3
  345. package/dist/safe-bash/commands/directory-admission.js +1 -26
  346. package/dist/safe-bash/commands/docx/index.browser.js +1 -1
  347. package/dist/safe-bash/commands/execution.js +19 -13
  348. package/dist/safe-bash/commands/factor/index.browser.js +2 -2
  349. package/dist/safe-bash/commands/filesystem.d.ts +1 -1
  350. package/dist/safe-bash/commands/filesystem.js +17 -13
  351. package/dist/safe-bash/commands/find/index.d.ts +2 -0
  352. package/dist/safe-bash/commands/find/index.js +2 -0
  353. package/dist/safe-bash/commands/find-format.d.ts +1 -20
  354. package/dist/safe-bash/commands/find-format.js +1 -161
  355. package/dist/safe-bash/commands/find.d.ts +2 -18
  356. package/dist/safe-bash/commands/find.js +2 -1236
  357. package/dist/safe-bash/commands/getopt/index.browser.js +2 -2
  358. package/dist/safe-bash/commands/gzip/index.d.ts +2 -0
  359. package/dist/safe-bash/commands/gzip/index.js +2 -0
  360. package/dist/safe-bash/commands/hexdump/index.browser.js +2 -2
  361. package/dist/safe-bash/commands/htmlq/index.d.ts +1 -1
  362. package/dist/safe-bash/commands/iconv/index.browser.js +2 -2
  363. package/dist/safe-bash/commands/line-endings/index.browser.js +2 -2
  364. package/dist/safe-bash/commands/line-endings/index.d.ts +1 -1
  365. package/dist/safe-bash/commands/line-endings/index.js +1 -262
  366. package/dist/safe-bash/commands/llm/index.browser.js +4 -2
  367. package/dist/safe-bash/commands/llm/providers/index.browser.js +1 -1
  368. package/dist/safe-bash/commands/mdq/index.browser.js +3 -3
  369. package/dist/safe-bash/commands/media/index.browser.js +1 -1
  370. package/dist/safe-bash/commands/metadata/chmod.d.ts +1 -4
  371. package/dist/safe-bash/commands/metadata/chmod.js +2 -63
  372. package/dist/safe-bash/commands/network/aggregate.d.ts +1 -4
  373. package/dist/safe-bash/commands/network/aggregate.js +1 -23
  374. package/dist/safe-bash/commands/network/args.d.ts +1 -68
  375. package/dist/safe-bash/commands/network/args.js +1 -321
  376. package/dist/safe-bash/commands/network/authorizer.d.ts +1 -6
  377. package/dist/safe-bash/commands/network/authorizer.js +1 -33
  378. package/dist/safe-bash/commands/network/body.d.ts +1 -9
  379. package/dist/safe-bash/commands/network/body.js +1 -393
  380. package/dist/safe-bash/commands/network/curl.d.ts +3 -13
  381. package/dist/safe-bash/commands/network/curl.js +6 -695
  382. package/dist/safe-bash/commands/network/deadline.d.ts +1 -2
  383. package/dist/safe-bash/commands/network/deadline.js +1 -14
  384. package/dist/safe-bash/commands/network/decode.d.ts +1 -2
  385. package/dist/safe-bash/commands/network/decode.js +1 -79
  386. package/dist/safe-bash/commands/network/fetch-transport.d.ts +1 -7
  387. package/dist/safe-bash/commands/network/fetch-transport.js +1 -94
  388. package/dist/safe-bash/commands/network/form-content-type.d.ts +1 -5
  389. package/dist/safe-bash/commands/network/form-content-type.js +1 -63
  390. package/dist/safe-bash/commands/network/form-headers.d.ts +1 -2
  391. package/dist/safe-bash/commands/network/form-headers.js +1 -35
  392. package/dist/safe-bash/commands/network/glob.d.ts +1 -7
  393. package/dist/safe-bash/commands/network/glob.js +1 -134
  394. package/dist/safe-bash/commands/network/index.browser.js +4 -12
  395. package/dist/safe-bash/commands/network/input.d.ts +1 -5
  396. package/dist/safe-bash/commands/network/input.js +1 -276
  397. package/dist/safe-bash/commands/network/output.d.ts +1 -6
  398. package/dist/safe-bash/commands/network/output.js +1 -131
  399. package/dist/safe-bash/commands/network/platform-portable.d.ts +1 -5
  400. package/dist/safe-bash/commands/network/platform-portable.js +1 -26
  401. package/dist/safe-bash/commands/network/private-address.d.ts +1 -1
  402. package/dist/safe-bash/commands/network/private-address.js +1 -44
  403. package/dist/safe-bash/commands/network/public.d.ts +2 -2
  404. package/dist/safe-bash/commands/network/public.js +2 -2
  405. package/dist/safe-bash/commands/network/shared.d.ts +1 -14
  406. package/dist/safe-bash/commands/network/shared.js +1 -71
  407. package/dist/safe-bash/commands/network/transport.js +2 -2
  408. package/dist/safe-bash/commands/network/types.d.ts +1 -37
  409. package/dist/safe-bash/commands/network/types.js +1 -31
  410. package/dist/safe-bash/commands/network/url.d.ts +1 -2
  411. package/dist/safe-bash/commands/network/url.js +1 -30
  412. package/dist/safe-bash/commands/network/wget.d.ts +3 -3
  413. package/dist/safe-bash/commands/network/wget.js +9 -332
  414. package/dist/safe-bash/commands/node/filesystem.js +3 -2
  415. package/dist/safe-bash/commands/node/index.browser.js +8 -9
  416. package/dist/safe-bash/commands/node/index.d.ts +3 -3
  417. package/dist/safe-bash/commands/node/index.js +5 -0
  418. package/dist/safe-bash/commands/node/safejs.d.ts +3 -3
  419. package/dist/safe-bash/commands/node/safejs.js +6 -1
  420. package/dist/safe-bash/commands/node/types.d.ts +1 -1
  421. package/dist/safe-bash/commands/node/types.js +1 -1
  422. package/dist/safe-bash/commands/node/unconfigured.d.ts +3 -0
  423. package/dist/safe-bash/commands/node/unconfigured.js +10 -0
  424. package/dist/safe-bash/commands/op/index.browser.js +3 -3
  425. package/dist/safe-bash/commands/patch/index.d.ts +2 -0
  426. package/dist/safe-bash/commands/patch/index.js +2 -0
  427. package/dist/safe-bash/commands/pdfinfo/index.js +2 -1
  428. package/dist/safe-bash/commands/pr/index.browser.js +2 -2
  429. package/dist/safe-bash/commands/predicates.js +3 -4
  430. package/dist/safe-bash/commands/python/host-capabilities.js +31 -14
  431. package/dist/safe-bash/commands/python/index.browser.js +11 -11
  432. package/dist/safe-bash/commands/python/llm-capability.d.ts +1 -0
  433. package/dist/safe-bash/commands/python/llm-capability.js +27 -7
  434. package/dist/safe-bash/commands/python/llm-module.js +11 -0
  435. package/dist/safe-bash/commands/python/manifest.d.ts +2 -0
  436. package/dist/safe-bash/commands/python/manifest.js +13 -6
  437. package/dist/safe-bash/commands/python/provisioning.js +1 -1
  438. package/dist/safe-bash/commands/python/shell-capability.d.ts +1 -0
  439. package/dist/safe-bash/commands/python/shell-capability.js +3 -2
  440. package/dist/safe-bash/commands/python/worker.browser.js +3 -3
  441. package/dist/safe-bash/commands/regex-execution/matching.js +1 -2
  442. package/dist/safe-bash/commands/regex-execution/public.browser.js +8 -8
  443. package/dist/safe-bash/commands/safejs/runtime.js +16 -7
  444. package/dist/safe-bash/commands/search/index.d.ts +1 -1
  445. package/dist/safe-bash/commands/search/index.js +1 -347
  446. package/dist/safe-bash/commands/search/portable.d.ts +2 -2
  447. package/dist/safe-bash/commands/search/portable.js +3 -2
  448. package/dist/safe-bash/commands/sed/index.d.ts +2 -0
  449. package/dist/safe-bash/commands/sed/index.js +2 -0
  450. package/dist/safe-bash/commands/standard.d.ts +1 -0
  451. package/dist/safe-bash/commands/standard.js +2 -1
  452. package/dist/safe-bash/commands/streams.js +6 -24
  453. package/dist/safe-bash/commands/tar/index.d.ts +2 -0
  454. package/dist/safe-bash/commands/tar/index.js +2 -0
  455. package/dist/safe-bash/commands/text-programs/awk-inspection.d.ts +1 -19
  456. package/dist/safe-bash/commands/text-programs/awk-inspection.js +1 -50
  457. package/dist/safe-bash/commands/text-programs/awk-pipes.d.ts +2 -0
  458. package/dist/safe-bash/commands/text-programs/awk-pipes.js +2 -0
  459. package/dist/safe-bash/commands/text-programs/awk-pretty.d.ts +1 -3
  460. package/dist/safe-bash/commands/text-programs/awk-pretty.js +1 -197
  461. package/dist/safe-bash/commands/text-programs/awk-quote.d.ts +1 -2
  462. package/dist/safe-bash/commands/text-programs/awk-quote.js +1 -15
  463. package/dist/safe-bash/commands/text-programs/awk-reader.d.ts +1 -42
  464. package/dist/safe-bash/commands/text-programs/awk-reader.js +1 -449
  465. package/dist/safe-bash/commands/text-programs/awk-retention.d.ts +1 -13
  466. package/dist/safe-bash/commands/text-programs/awk-retention.js +1 -51
  467. package/dist/safe-bash/commands/text-programs/awk-runtime.d.ts +1 -150
  468. package/dist/safe-bash/commands/text-programs/awk-runtime.js +1 -2627
  469. package/dist/safe-bash/commands/text-programs/awk-syntax.d.ts +1 -142
  470. package/dist/safe-bash/commands/text-programs/awk-syntax.js +1 -509
  471. package/dist/safe-bash/commands/text-programs/awk-values.d.ts +1 -32
  472. package/dist/safe-bash/commands/text-programs/awk-values.js +1 -386
  473. package/dist/safe-bash/commands/text-programs/awk.d.ts +1 -3
  474. package/dist/safe-bash/commands/text-programs/awk.js +1 -361
  475. package/dist/safe-bash/commands/text-programs/inplace.d.ts +1 -16
  476. package/dist/safe-bash/commands/text-programs/inplace.js +1 -155
  477. package/dist/safe-bash/commands/text-programs/sed.d.ts +1 -3
  478. package/dist/safe-bash/commands/text-programs/sed.js +1 -1647
  479. package/dist/safe-bash/commands/text.js +268 -364
  480. package/dist/safe-bash/commands/tsort/index.browser.js +2 -2
  481. package/dist/safe-bash/commands/unzip/index.d.ts +2 -0
  482. package/dist/safe-bash/commands/unzip/index.js +2 -0
  483. package/dist/safe-bash/commands/wget/index.d.ts +2 -0
  484. package/dist/safe-bash/commands/wget/index.js +2 -0
  485. package/dist/safe-bash/commands/xml/index.browser.js +2 -2
  486. package/dist/safe-bash/commands/yq/index.browser.js +8 -3
  487. package/dist/safe-bash/commands/yq/index.d.ts +1 -6
  488. package/dist/safe-bash/commands/yq/index.js +1 -36
  489. package/dist/safe-bash/commands/zip/index.d.ts +2 -0
  490. package/dist/safe-bash/commands/zip/index.js +2 -0
  491. package/dist/safe-bash/core.browser.js +2 -2
  492. package/dist/safe-bash/core.d.ts +14 -2
  493. package/dist/safe-bash/core.js +8 -2
  494. package/dist/safe-bash/fs/s3/index.d.ts +2 -2
  495. package/dist/safe-bash/fs/s3/index.js +1 -1
  496. package/dist/safe-bash/full-core.browser.js +321 -286
  497. package/dist/safe-bash/jobs.browser.js +5 -5
  498. package/dist/safe-bash/lazy-mmdc.d.ts +6 -0
  499. package/dist/safe-bash/lazy-mmdc.js +23 -0
  500. package/dist/safe-bash/opt-in/commands/dd/index.js +2 -0
  501. package/dist/safe-bash/opt-in/commands/yq/mike.js +6 -13
  502. package/dist/safe-bash/opt-in/commands/yq/native-work.d.ts +1 -0
  503. package/dist/safe-bash/opt-in/commands/yq/native-work.js +17 -0
  504. package/dist/safe-bash/opt-in/optional/commands/shuf/options.d.ts +1 -0
  505. package/dist/safe-bash/opt-in/optional/commands/shuf/options.js +2 -4
  506. package/dist/safe-bash/opt-in/optional/commands/shuf/shuf.js +2 -1
  507. package/dist/safe-bash/optional-host.browser.js +15 -11
  508. package/dist/safe-bash/optional-host.d.ts +1 -1
  509. package/dist/safe-bash/optional-host.js +1 -1
  510. package/dist/safe-bash/playwright/ability-execution.js +3 -2
  511. package/dist/safe-bash/playwright/adapter.js +1 -1
  512. package/dist/safe-bash/playwright/controller.js +9 -8
  513. package/dist/safe-bash/playwright/modal-capabilities.js +2 -1
  514. package/dist/safe-bash/playwright/native-json-snapshot.js +4 -3
  515. package/dist/safe-bash/playwright/native-snapshot.js +5 -4
  516. package/dist/safe-bash/playwright/open-options.js +3 -3
  517. package/dist/safe-bash/playwright/resource-limit.d.ts +2 -0
  518. package/dist/safe-bash/playwright/resource-limit.js +4 -0
  519. package/dist/safe-bash/playwright/session-configuration.js +8 -3
  520. package/dist/safe-bash/playwright/snapshot.js +8 -7
  521. package/dist/safe-bash/playwright/standard-capabilities.js +5 -4
  522. package/dist/safe-bash/plugins/composition.d.ts +1 -0
  523. package/dist/safe-bash/plugins/composition.js +3 -8
  524. package/dist/safe-bash/plugins/index.browser.js +27 -29
  525. package/dist/safe-bash/registry-entry.browser.js +28 -30
  526. package/dist/safe-bash/shell/arrays/bindings.d.ts +3 -5
  527. package/dist/safe-bash/shell/arrays/bindings.js +7 -3
  528. package/dist/safe-bash/shell/arrays/state.js +4 -0
  529. package/dist/safe-bash/shell/brace-expansion.js +1 -1
  530. package/dist/safe-bash/shell/dynamic-variables.d.ts +10 -0
  531. package/dist/safe-bash/shell/dynamic-variables.js +25 -0
  532. package/dist/safe-bash/shell/input.js +16 -14
  533. package/dist/safe-bash/shell/parser.js +8 -1
  534. package/dist/safe-bash/shell/runtime.d.ts +7 -4
  535. package/dist/safe-bash/shell/runtime.js +604 -802
  536. package/dist/safe-bash/shell/shell.js +2 -31
  537. package/dist/safe-bash/shell/types.d.ts +2 -0
  538. package/dist/safe-bash/shell/value-state.js +17 -2
  539. package/dist/safe-bash/shell/worker-limits.js +1 -0
  540. package/dist/safe-bash/shell-entry.browser.js +25 -27
  541. package/dist/safe-bash/trap.browser.d.ts +3 -0
  542. package/dist/safe-bash/trap.browser.js +14 -0
  543. package/dist/safe-bash/worker/host.js +1 -1
  544. package/dist/safe-bash/yq-browser/index.js +1 -1
  545. package/dist/safe-bash-base-encoding-engine/base.js +2 -2
  546. package/dist/safe-bash-base-encoding-engine/shared.js +1 -1
  547. package/dist/safe-bash-byte-input-engine/index.d.ts +3 -2
  548. package/dist/safe-bash-byte-input-engine/index.js +4 -1
  549. package/dist/safe-bash-checksum-engine/index.js +13 -6
  550. package/dist/safe-bash-command-apply-patch/apply.d.ts +1 -1
  551. package/dist/safe-bash-command-apply-patch/apply.js +4 -3
  552. package/dist/safe-bash-command-apply-patch/index.js +4 -4
  553. package/dist/safe-bash-command-apply-patch/matcher.js +1 -1
  554. package/dist/safe-bash-command-apply-patch/parser.js +1 -1
  555. package/dist/safe-bash-command-awk/LICENSE +21 -0
  556. package/dist/safe-bash-command-awk/awk-inspection.d.ts +19 -0
  557. package/dist/safe-bash-command-awk/awk-inspection.js +9 -0
  558. package/dist/safe-bash-command-awk/awk-pipes.d.ts +19 -0
  559. package/dist/safe-bash-command-awk/awk-pipes.js +8 -0
  560. package/dist/safe-bash-command-awk/awk-pretty.d.ts +3 -0
  561. package/dist/safe-bash-command-awk/awk-pretty.js +8 -0
  562. package/dist/safe-bash-command-awk/awk-quote.d.ts +2 -0
  563. package/dist/safe-bash-command-awk/awk-quote.js +7 -0
  564. package/dist/safe-bash-command-awk/awk-reader.d.ts +42 -0
  565. package/dist/safe-bash-command-awk/awk-reader.js +9 -0
  566. package/dist/safe-bash-command-awk/awk-retention.d.ts +13 -0
  567. package/dist/safe-bash-command-awk/awk-retention.js +7 -0
  568. package/dist/safe-bash-command-awk/awk-runtime.d.ts +151 -0
  569. package/dist/safe-bash-command-awk/awk-runtime.js +11 -0
  570. package/dist/safe-bash-command-awk/awk-syntax.d.ts +144 -0
  571. package/dist/safe-bash-command-awk/awk-syntax.js +14 -0
  572. package/dist/safe-bash-command-awk/awk-values.d.ts +32 -0
  573. package/dist/safe-bash-command-awk/awk-values.js +35 -0
  574. package/dist/safe-bash-command-awk/awk.d.ts +3 -0
  575. package/dist/safe-bash-command-awk/awk.js +16 -0
  576. package/dist/safe-bash-command-awk/index.d.ts +7 -0
  577. package/dist/safe-bash-command-awk/index.js +36 -0
  578. package/dist/safe-bash-command-bc/index.d.ts +6 -0
  579. package/dist/safe-bash-command-bc/index.js +136 -266
  580. package/dist/safe-bash-command-column/column.js +5 -5
  581. package/dist/safe-bash-command-column/display.d.ts +1 -1
  582. package/dist/safe-bash-command-column/display.js +1 -1
  583. package/dist/safe-bash-command-column/index.js +5 -5
  584. package/dist/safe-bash-command-column/internal.d.ts +0 -2
  585. package/dist/safe-bash-command-column/internal.js +1 -1
  586. package/dist/safe-bash-command-column/layout.js +4 -4
  587. package/dist/safe-bash-command-column/table.js +2 -2
  588. package/dist/safe-bash-command-comm/comm.js +1 -1
  589. package/dist/safe-bash-command-comm/index.js +1 -1
  590. package/dist/safe-bash-command-csplit/command.js +2 -2
  591. package/dist/safe-bash-command-csplit/index.js +2 -2
  592. package/dist/safe-bash-command-csvcut/index.d.ts +1 -0
  593. package/dist/safe-bash-command-csvcut/index.js +1 -0
  594. package/dist/safe-bash-command-csvgrep/index.d.ts +1 -0
  595. package/dist/safe-bash-command-csvgrep/index.js +2 -2
  596. package/dist/safe-bash-command-csvkit/contracts.d.ts +1 -0
  597. package/dist/safe-bash-command-csvkit/csvpy-interpreter.d.ts +2 -1
  598. package/dist/safe-bash-command-csvkit/default-csvpy.d.ts +11 -0
  599. package/dist/safe-bash-command-csvkit/errors.js +22 -0
  600. package/dist/safe-bash-command-csvkit/index.d.ts +1 -0
  601. package/dist/safe-bash-command-csvkit/index.js +180 -12
  602. package/dist/safe-bash-command-csvkit/python-worker-browser.d.ts +3 -0
  603. package/dist/safe-bash-command-csvkit/python-worker-browser.js +16 -0
  604. package/dist/safe-bash-command-csvkit/python-worker-contract.d.ts +20 -0
  605. package/dist/safe-bash-command-csvkit/python-worker-node.d.ts +3 -0
  606. package/dist/safe-bash-command-csvkit/python-worker-node.js +9 -0
  607. package/dist/safe-bash-command-csvkit/runtime.d.ts +1 -0
  608. package/dist/safe-bash-command-csvkit/sync-support.js +1 -1
  609. package/dist/safe-bash-command-curl/LICENSE +21 -0
  610. package/dist/safe-bash-command-curl/curl.d.ts +13 -0
  611. package/dist/safe-bash-command-curl/curl.js +9 -0
  612. package/dist/safe-bash-command-curl/index.d.ts +6 -0
  613. package/dist/safe-bash-command-curl/index.js +26 -0
  614. package/dist/safe-bash-command-dd/index.js +2 -0
  615. package/dist/safe-bash-command-diff/LICENSE +21 -0
  616. package/dist/safe-bash-command-diff/diff-format.d.ts +10 -0
  617. package/dist/safe-bash-command-diff/diff-format.js +10 -0
  618. package/dist/safe-bash-command-diff/diff-options.d.ts +38 -0
  619. package/dist/safe-bash-command-diff/diff-options.js +7 -0
  620. package/dist/safe-bash-command-diff/diff-output.d.ts +20 -0
  621. package/dist/safe-bash-command-diff/diff-output.js +19 -0
  622. package/dist/safe-bash-command-diff/diff.d.ts +2 -0
  623. package/dist/safe-bash-command-diff/diff.js +10 -0
  624. package/dist/safe-bash-command-diff/index.d.ts +8 -0
  625. package/dist/safe-bash-command-diff/index.js +34 -0
  626. package/dist/safe-bash-command-diff/sync.d.ts +2 -0
  627. package/dist/safe-bash-command-diff/sync.js +9 -0
  628. package/dist/safe-bash-command-diff3/index.js +5 -5
  629. package/dist/safe-bash-command-docx/index.d.ts +4 -4
  630. package/dist/safe-bash-command-docx/index.js +12 -5
  631. package/dist/safe-bash-command-dos2unix/index.d.ts +1 -0
  632. package/dist/safe-bash-command-dos2unix/index.js +225 -1
  633. package/dist/safe-bash-command-dos2unix/sync.d.ts +1 -0
  634. package/dist/safe-bash-command-exiftool/index.d.ts +1 -0
  635. package/dist/safe-bash-command-exiftool/index.js +2 -2
  636. package/dist/safe-bash-command-factor/command.js +2 -2
  637. package/dist/safe-bash-command-factor/index.js +2 -2
  638. package/dist/safe-bash-command-fd/index.js +9 -9
  639. package/dist/safe-bash-command-ffmpeg/index.js +117 -102
  640. package/dist/safe-bash-command-file/index.js +4 -4
  641. package/dist/safe-bash-command-file/shared.js +1 -1
  642. package/dist/safe-bash-command-find/LICENSE +21 -0
  643. package/dist/safe-bash-command-find/find-format.d.ts +20 -0
  644. package/dist/safe-bash-command-find/find-format.js +9 -0
  645. package/dist/safe-bash-command-find/find.d.ts +18 -0
  646. package/dist/safe-bash-command-find/find.js +10 -0
  647. package/dist/safe-bash-command-find/index.d.ts +13 -0
  648. package/dist/safe-bash-command-find/index.js +45 -0
  649. package/dist/safe-bash-command-fmt/index.js +7 -4
  650. package/dist/safe-bash-command-git/git_rust.wasm +0 -0
  651. package/dist/safe-bash-command-git/index.js +5 -7
  652. package/dist/safe-bash-command-git/wasm.generated.js +1 -1
  653. package/dist/safe-bash-command-gzip/LICENSE +21 -0
  654. package/dist/safe-bash-command-gzip/index.d.ts +11 -0
  655. package/dist/safe-bash-command-gzip/index.js +95 -0
  656. package/dist/safe-bash-command-hexdump/command.js +4 -4
  657. package/dist/safe-bash-command-hexdump/custom.d.ts +24 -0
  658. package/dist/safe-bash-command-hexdump/index.js +4 -4
  659. package/dist/safe-bash-command-hexdump/internal.d.ts +2 -0
  660. package/dist/safe-bash-command-hexdump/internal.js +1 -1
  661. package/dist/safe-bash-command-hexdump/io.js +2 -2
  662. package/dist/safe-bash-command-hexdump/options.d.ts +3 -0
  663. package/dist/safe-bash-command-hexdump/options.js +2 -2
  664. package/dist/safe-bash-command-hostname/index.js +1 -1
  665. package/dist/safe-bash-command-html-to-markdown/budget.js +1 -1
  666. package/dist/safe-bash-command-html-to-markdown/entities.js +3 -3
  667. package/dist/safe-bash-command-html-to-markdown/index.js +11 -11
  668. package/dist/safe-bash-command-html-to-markdown/input.js +5 -5
  669. package/dist/safe-bash-command-html-to-markdown/parser.d.ts +1 -0
  670. package/dist/safe-bash-command-html-to-markdown/parser.js +4 -4
  671. package/dist/safe-bash-command-html-to-markdown/render.js +5 -5
  672. package/dist/safe-bash-command-html-to-markdown/text.js +2 -2
  673. package/dist/safe-bash-command-htmlq/index.d.ts +1 -0
  674. package/dist/safe-bash-command-htmlq/index.js +39 -17
  675. package/dist/safe-bash-command-iconv/codec.js +1 -1
  676. package/dist/safe-bash-command-iconv/command.js +2 -2
  677. package/dist/safe-bash-command-iconv/index.js +2 -2
  678. package/dist/safe-bash-command-imagemagick/index.js +45 -35
  679. package/dist/safe-bash-command-join/index.js +1 -1
  680. package/dist/safe-bash-command-join/join.js +1 -1
  681. package/dist/safe-bash-command-jq/index.js +1 -1
  682. package/dist/safe-bash-command-jq/jq.js +1 -1
  683. package/dist/safe-bash-command-less/index.js +43 -28
  684. package/dist/safe-bash-command-llm/command.js +1 -1
  685. package/dist/safe-bash-command-llm/index.d.ts +1 -0
  686. package/dist/safe-bash-command-llm/index.js +16 -14
  687. package/dist/safe-bash-command-llm/openai.js +3 -3
  688. package/dist/safe-bash-command-llm/providers/index.js +3 -3
  689. package/dist/safe-bash-command-llm/providers/openai.js +3 -3
  690. package/dist/safe-bash-command-llm/stored-schema.d.ts +10 -0
  691. package/dist/safe-bash-command-mmdc/index.d.ts +1 -0
  692. package/dist/safe-bash-command-mmdc/index.js +13 -604
  693. package/dist/safe-bash-command-mmdc/settings.d.ts +2 -0
  694. package/dist/safe-bash-command-mmdc/settings.js +7 -0
  695. package/dist/safe-bash-command-numfmt/index.js +0 -11
  696. package/dist/safe-bash-command-od/index.js +101 -68
  697. package/dist/safe-bash-command-pandoc/command.js +4 -3
  698. package/dist/safe-bash-command-pandoc/defaults.d.ts +1 -0
  699. package/dist/safe-bash-command-pandoc/index.js +4 -3
  700. package/dist/safe-bash-command-pandoc/lua-filters.js +1 -1
  701. package/dist/safe-bash-command-pandoc/types.d.ts +3 -1
  702. package/dist/safe-bash-command-paste/index.js +1 -1
  703. package/dist/safe-bash-command-paste/paste.js +1 -1
  704. package/dist/safe-bash-command-patch/LICENSE +21 -0
  705. package/dist/safe-bash-command-patch/index.d.ts +8 -0
  706. package/dist/safe-bash-command-patch/index.js +38 -0
  707. package/dist/safe-bash-command-patch/patch-envelope.d.ts +2 -0
  708. package/dist/safe-bash-command-patch/patch-envelope.js +7 -0
  709. package/dist/safe-bash-command-patch/patch-formats.d.ts +7 -0
  710. package/dist/safe-bash-command-patch/patch-formats.js +9 -0
  711. package/dist/safe-bash-command-patch/patch-gnu-paths.d.ts +41 -0
  712. package/dist/safe-bash-command-patch/patch-gnu-paths.js +26 -0
  713. package/dist/safe-bash-command-patch/patch-gnu-reject.d.ts +3 -0
  714. package/dist/safe-bash-command-patch/patch-gnu-reject.js +7 -0
  715. package/dist/safe-bash-command-patch/patch-path.d.ts +3 -0
  716. package/dist/safe-bash-command-patch/patch-path.js +11 -0
  717. package/dist/safe-bash-command-patch/patch-publication.d.ts +13 -0
  718. package/dist/safe-bash-command-patch/patch-publication.js +7 -0
  719. package/dist/safe-bash-command-patch/patch.d.ts +2 -0
  720. package/dist/safe-bash-command-patch/patch.js +14 -0
  721. package/dist/safe-bash-command-patch/sync.d.ts +2 -0
  722. package/dist/safe-bash-command-patch/sync.js +7 -0
  723. package/dist/safe-bash-command-patch/unified.d.ts +52 -0
  724. package/dist/safe-bash-command-patch/unified.js +16 -0
  725. package/dist/safe-bash-command-pathchk/index.js +3 -13
  726. package/dist/safe-bash-command-pdfimages/index.js +62 -25
  727. package/dist/safe-bash-command-pdfinfo/index.d.ts +0 -23
  728. package/dist/safe-bash-command-pdfinfo/index.js +39 -782
  729. package/dist/safe-bash-command-pdftk/index.js +40 -12
  730. package/dist/safe-bash-command-pdftoppm/index.js +76 -30
  731. package/dist/safe-bash-command-pdftotext/index.js +37 -15
  732. package/dist/safe-bash-command-pptx/index.d.ts +4 -4
  733. package/dist/safe-bash-command-pptx/index.js +11 -5
  734. package/dist/safe-bash-command-pr/command.js +2 -2
  735. package/dist/safe-bash-command-pr/index.js +4 -4
  736. package/dist/safe-bash-command-qpdf/index.js +31 -18
  737. package/dist/safe-bash-command-rg/index.d.ts +1 -0
  738. package/dist/safe-bash-command-rg/index.js +222 -1
  739. package/dist/safe-bash-command-rg/rg-command.js +1 -1
  740. package/dist/safe-bash-command-rg/sync.d.ts +1 -0
  741. package/dist/safe-bash-command-sed/LICENSE +21 -0
  742. package/dist/safe-bash-command-sed/index.d.ts +7 -0
  743. package/dist/safe-bash-command-sed/index.js +28 -0
  744. package/dist/safe-bash-command-sed/inplace.d.ts +16 -0
  745. package/dist/safe-bash-command-sed/inplace.js +9 -0
  746. package/dist/safe-bash-command-sed/sed.d.ts +3 -0
  747. package/dist/safe-bash-command-sed/sed.js +8 -0
  748. package/dist/safe-bash-command-shuf/options.d.ts +1 -0
  749. package/dist/safe-bash-command-shuf/options.js +2 -4
  750. package/dist/safe-bash-command-shuf/shuf.js +2 -1
  751. package/dist/safe-bash-command-sips/index.js +111 -35
  752. package/dist/safe-bash-command-soffice/index.js +21 -17
  753. package/dist/safe-bash-command-split/index.js +3 -3
  754. package/dist/safe-bash-command-split/io.js +1 -1
  755. package/dist/safe-bash-command-split/outputs.js +2 -2
  756. package/dist/safe-bash-command-split/split.js +3 -3
  757. package/dist/safe-bash-command-sqlite3/btree.d.ts +1 -0
  758. package/dist/safe-bash-command-sqlite3/engine.d.ts +7 -2
  759. package/dist/safe-bash-command-sqlite3/index.js +436 -537
  760. package/dist/safe-bash-command-ssconvert/commands.js +9 -9
  761. package/dist/safe-bash-command-ssconvert/core.js +8 -8
  762. package/dist/safe-bash-command-ssconvert/formats/csv.js +9 -9
  763. package/dist/safe-bash-command-ssconvert/formats/ods.js +9 -9
  764. package/dist/safe-bash-command-ssconvert/formats/spreadsheetml.js +2 -2
  765. package/dist/safe-bash-command-ssconvert/formats/xls.js +9 -9
  766. package/dist/safe-bash-command-ssconvert/formats/xlsx.js +9 -9
  767. package/dist/safe-bash-command-ssconvert/index.js +21 -21
  768. package/dist/safe-bash-command-tar/LICENSE +21 -0
  769. package/dist/safe-bash-command-tar/create.d.ts +17 -0
  770. package/dist/safe-bash-command-tar/create.js +14 -0
  771. package/dist/safe-bash-command-tar/extract.d.ts +11 -0
  772. package/dist/safe-bash-command-tar/extract.js +14 -0
  773. package/dist/safe-bash-command-tar/format.d.ts +32 -0
  774. package/dist/safe-bash-command-tar/format.js +19 -0
  775. package/dist/safe-bash-command-tar/index.d.ts +8 -0
  776. package/dist/safe-bash-command-tar/index.js +551 -0
  777. package/dist/safe-bash-command-tar/listing.d.ts +2 -0
  778. package/dist/safe-bash-command-tar/listing.js +7 -0
  779. package/dist/safe-bash-command-tar/modes.d.ts +5 -0
  780. package/dist/safe-bash-command-tar/modes.js +16 -0
  781. package/dist/safe-bash-command-tar/options.d.ts +53 -0
  782. package/dist/safe-bash-command-tar/options.js +10 -0
  783. package/dist/safe-bash-command-tar/stream.d.ts +22 -0
  784. package/dist/safe-bash-command-tar/stream.js +15 -0
  785. package/dist/safe-bash-command-tar/transform.d.ts +16 -0
  786. package/dist/safe-bash-command-tar/transform.js +9 -0
  787. package/dist/safe-bash-command-tree/arguments.js +3 -3
  788. package/dist/safe-bash-command-tree/charset.js +1 -1
  789. package/dist/safe-bash-command-tree/index.js +4 -4
  790. package/dist/safe-bash-command-tree/io.js +1 -1
  791. package/dist/safe-bash-command-tree/pattern.js +2 -2
  792. package/dist/safe-bash-command-tree/tree.js +4 -4
  793. package/dist/safe-bash-command-unrtf/index.js +14 -7
  794. package/dist/safe-bash-command-unzip/LICENSE +21 -0
  795. package/dist/safe-bash-command-unzip/index.d.ts +7 -0
  796. package/dist/safe-bash-command-unzip/index.js +39 -0
  797. package/dist/safe-bash-command-unzip/sync.d.ts +3 -0
  798. package/dist/safe-bash-command-unzip/sync.js +9 -0
  799. package/dist/safe-bash-command-unzip/unzip/safety.d.ts +32 -0
  800. package/dist/safe-bash-command-unzip/unzip/safety.js +7 -0
  801. package/dist/safe-bash-command-unzip/unzip.d.ts +3 -0
  802. package/dist/safe-bash-command-unzip/unzip.js +8 -0
  803. package/dist/safe-bash-command-wget/LICENSE +21 -0
  804. package/dist/safe-bash-command-wget/index.d.ts +6 -0
  805. package/dist/safe-bash-command-wget/index.js +26 -0
  806. package/dist/safe-bash-command-wget/wget.d.ts +3 -0
  807. package/dist/safe-bash-command-wget/wget.js +7 -0
  808. package/dist/safe-bash-command-xan/argv.d.ts +4 -1
  809. package/dist/safe-bash-command-xan/argv.js +1 -1
  810. package/dist/safe-bash-command-xan/commands.js +6 -3
  811. package/dist/safe-bash-command-xan/csv.d.ts +1 -1
  812. package/dist/safe-bash-command-xan/csv.js +1 -1
  813. package/dist/safe-bash-command-xan/index.js +18 -17
  814. package/dist/safe-bash-command-xan/io.js +3 -3
  815. package/dist/safe-bash-command-xmllint/index.js +190 -50
  816. package/dist/safe-bash-command-xxd/index.js +105 -91
  817. package/dist/safe-bash-command-xz/command.d.ts +2 -0
  818. package/dist/safe-bash-command-xz/index.d.ts +1 -1
  819. package/dist/safe-bash-command-xz/index.js +11 -2
  820. package/dist/safe-bash-command-xz/options.d.ts +9 -1
  821. package/dist/safe-bash-command-xz/options.js +3 -1
  822. package/dist/safe-bash-command-yq/index.d.ts +4 -11
  823. package/dist/safe-bash-command-yq/index.js +3367 -670
  824. package/dist/safe-bash-command-yq/mike.js +6 -13
  825. package/dist/safe-bash-command-yq/native-work.d.ts +1 -0
  826. package/dist/safe-bash-command-yq/native-work.js +17 -0
  827. package/dist/safe-bash-command-yq/query.d.ts +11 -0
  828. package/dist/safe-bash-command-yq/query.js +735 -0
  829. package/dist/safe-bash-command-zip/LICENSE +21 -0
  830. package/dist/safe-bash-command-zip/index.d.ts +7 -0
  831. package/dist/safe-bash-command-zip/index.js +38 -0
  832. package/dist/safe-bash-command-zip/sync.d.ts +3 -0
  833. package/dist/safe-bash-command-zip/sync.js +9 -0
  834. package/dist/safe-bash-command-zip/zip.d.ts +3 -0
  835. package/dist/safe-bash-command-zip/zip.js +7 -0
  836. package/dist/safe-bash-compression-engine/files.js +4 -4
  837. package/dist/safe-bash-compression-engine/index.js +2 -2
  838. package/dist/safe-bash-compression-engine/operand.js +6 -6
  839. package/dist/safe-bash-compression-engine/stream.js +2 -2
  840. package/dist/safe-bash-compression-engine/zstd-decode.js +1 -1
  841. package/dist/safe-bash-contracts/command.js +1 -1
  842. package/dist/safe-bash-contracts/diagnostics.js +4 -4
  843. package/dist/safe-bash-contracts/escaping.js +12 -12
  844. package/dist/safe-bash-contracts/filesystem-descriptor.js +1 -1
  845. package/dist/safe-bash-contracts/filesystem-output.js +8 -8
  846. package/dist/safe-bash-contracts/index.d.ts +1 -0
  847. package/dist/safe-bash-contracts/index.js +39 -35
  848. package/dist/safe-bash-contracts/io.d.ts +4 -1
  849. package/dist/safe-bash-contracts/io.js +4 -2
  850. package/dist/safe-bash-contracts/managed-abort.d.ts +10 -0
  851. package/dist/safe-bash-contracts/output.js +3 -3
  852. package/dist/safe-bash-diff-engine/LICENSE +21 -0
  853. package/dist/safe-bash-diff-engine/index.d.ts +1 -0
  854. package/dist/safe-bash-diff-engine/index.js +24 -0
  855. package/dist/safe-bash-diff-engine/shared.d.ts +54 -0
  856. package/dist/safe-bash-diff-engine/shared.js +19 -0
  857. package/dist/safe-bash-io-engine/commands/archive/internal.js +5 -23
  858. package/dist/safe-bash-io-engine/commands/directory-admission.d.ts +3 -0
  859. package/dist/safe-bash-io-engine/commands/directory-admission.js +34 -0
  860. package/dist/safe-bash-io-engine/commands/mode-change.d.ts +4 -0
  861. package/dist/safe-bash-io-engine/commands/mode-change.js +60 -0
  862. package/dist/safe-bash-io-engine/commands/search/requirements.js +2 -2
  863. package/dist/safe-bash-io-engine/commands/text-programs/shared.js +44 -66
  864. package/dist/safe-bash-io-engine/internal.js +1 -1
  865. package/dist/safe-bash-io-engine/shell/pattern.js +8 -13
  866. package/dist/safe-bash-io-engine/shell/string-operations.js +1 -1
  867. package/dist/safe-bash-markdown-engine/commonmark-blocks.js +4 -4
  868. package/dist/safe-bash-markdown-engine/commonmark-inlines.js +4 -4
  869. package/dist/safe-bash-markdown-engine/commonmark-syntax.js +2 -2
  870. package/dist/safe-bash-markdown-engine/gfm-syntax.js +3 -3
  871. package/dist/safe-bash-markdown-engine/index.js +7 -7
  872. package/dist/safe-bash-mcp/index.browser.d.ts +161 -35
  873. package/dist/safe-bash-mcp/index.browser.js +417 -0
  874. package/dist/safe-bash-mcp/index.d.ts +66 -2
  875. package/dist/safe-bash-mcp/index.js +1838 -122
  876. package/dist/safe-bash-network-engine/LICENSE +21 -0
  877. package/dist/safe-bash-network-engine/aggregate.d.ts +4 -0
  878. package/dist/safe-bash-network-engine/aggregate.js +37 -0
  879. package/dist/safe-bash-network-engine/args.d.ts +68 -0
  880. package/dist/safe-bash-network-engine/args.js +19 -0
  881. package/dist/safe-bash-network-engine/authorizer.d.ts +6 -0
  882. package/dist/safe-bash-network-engine/authorizer.js +8 -0
  883. package/dist/safe-bash-network-engine/body.d.ts +9 -0
  884. package/dist/safe-bash-network-engine/body.js +374 -0
  885. package/dist/safe-bash-network-engine/deadline.d.ts +2 -0
  886. package/dist/safe-bash-network-engine/deadline.js +7 -0
  887. package/dist/safe-bash-network-engine/decode.d.ts +2 -0
  888. package/dist/safe-bash-network-engine/decode.js +80 -0
  889. package/dist/safe-bash-network-engine/fetch-transport.d.ts +7 -0
  890. package/dist/safe-bash-network-engine/fetch-transport.js +9 -0
  891. package/dist/safe-bash-network-engine/form-content-type.d.ts +5 -0
  892. package/dist/safe-bash-network-engine/form-content-type.js +8 -0
  893. package/dist/safe-bash-network-engine/form-headers.d.ts +2 -0
  894. package/dist/safe-bash-network-engine/form-headers.js +10 -0
  895. package/dist/safe-bash-network-engine/glob.d.ts +7 -0
  896. package/dist/safe-bash-network-engine/glob.js +124 -0
  897. package/dist/safe-bash-network-engine/index.d.ts +3 -0
  898. package/dist/safe-bash-network-engine/index.js +26 -0
  899. package/dist/safe-bash-network-engine/input.d.ts +5 -0
  900. package/dist/safe-bash-network-engine/input.js +255 -0
  901. package/dist/safe-bash-network-engine/output.d.ts +6 -0
  902. package/dist/safe-bash-network-engine/output.js +132 -0
  903. package/dist/safe-bash-network-engine/platform-portable.d.ts +5 -0
  904. package/dist/safe-bash-network-engine/platform-portable.js +19 -0
  905. package/dist/safe-bash-network-engine/private-address.d.ts +1 -0
  906. package/dist/safe-bash-network-engine/private-address.js +7 -0
  907. package/dist/safe-bash-network-engine/shared.d.ts +14 -0
  908. package/dist/safe-bash-network-engine/shared.js +23 -0
  909. package/dist/safe-bash-network-engine/types.d.ts +42 -0
  910. package/dist/safe-bash-network-engine/types.js +11 -0
  911. package/dist/safe-bash-network-engine/url.d.ts +2 -0
  912. package/dist/safe-bash-network-engine/url.js +8 -0
  913. package/dist/safe-bash-query-engine/capture.d.ts +1 -0
  914. package/dist/safe-bash-query-engine/capture.js +9 -7
  915. package/dist/safe-bash-query-engine/dates.d.ts +5 -1
  916. package/dist/safe-bash-query-engine/dates.js +10 -2
  917. package/dist/safe-bash-query-engine/delpaths.js +5 -5
  918. package/dist/safe-bash-query-engine/formats.js +3 -3
  919. package/dist/safe-bash-query-engine/index.js +15 -15
  920. package/dist/safe-bash-query-engine/indices.js +5 -5
  921. package/dist/safe-bash-query-engine/input.d.ts +1 -2
  922. package/dist/safe-bash-query-engine/input.js +2 -4
  923. package/dist/safe-bash-query-engine/interpreter.d.ts +5 -0
  924. package/dist/safe-bash-query-engine/interpreter.js +13 -13
  925. package/dist/safe-bash-query-engine/limits.js +1 -1
  926. package/dist/safe-bash-query-engine/parser.d.ts +8 -1
  927. package/dist/safe-bash-query-engine/parser.js +2 -2
  928. package/dist/safe-bash-query-engine/query-core.js +15 -15
  929. package/dist/safe-bash-query-engine/recurse.js +2 -2
  930. package/dist/safe-bash-query-engine/regex.d.ts +4 -2
  931. package/dist/safe-bash-query-engine/regex.js +10 -5
  932. package/dist/safe-bash-query-engine/split.js +2 -2
  933. package/dist/safe-bash-query-engine/splits.d.ts +1 -1
  934. package/dist/safe-bash-query-engine/splits.js +7 -6
  935. package/dist/safe-bash-query-engine/values.js +4 -4
  936. package/dist/safe-bash-regex-engine/ere/matcher.js +106 -34
  937. package/dist/safe-bash-regex-engine/execution/bounded-provider.js +55 -67
  938. package/dist/safe-bash-regex-engine/execution/portable.d.ts +0 -1
  939. package/dist/safe-bash-regex-engine/execution/portable.js +6 -10
  940. package/dist/safe-bash-regex-engine/execution/protocol.d.ts +0 -5
  941. package/dist/safe-bash-regex-engine/execution/protocol.js +1 -3
  942. package/dist/safe-bash-regex-engine/index.js +6 -4
  943. package/dist/safe-bash-regex-engine/text/budget.d.ts +1 -0
  944. package/dist/safe-bash-regex-engine/text/budget.js +1 -1
  945. package/dist/safe-bash-regex-engine/text/regex.d.ts +15 -0
  946. package/dist/safe-bash-regex-engine/text/regex.js +6 -4
  947. package/dist/safe-bash-regex-engine/text/replacement-buffer.js +2 -2
  948. package/dist/safe-bash-regex-engine/text/rust-syntax.js +2 -2
  949. package/dist/safe-bash-search-engine/ergonomic-regex.d.ts +12 -2
  950. package/dist/safe-bash-search-engine/ergonomic-regex.js +2 -2
  951. package/dist/safe-bash-search-engine/glob.js +2 -2
  952. package/dist/safe-bash-search-engine/grep.js +191 -229
  953. package/dist/safe-bash-search-engine/matcher.d.ts +6 -2
  954. package/dist/safe-bash-search-engine/matcher.js +30 -8
  955. package/dist/safe-bash-search-engine/options.js +1 -1
  956. package/dist/safe-bash-search-engine/output.d.ts +3 -2
  957. package/dist/safe-bash-search-engine/output.js +111 -30
  958. package/dist/safe-bash-search-engine/shared.d.ts +2 -0
  959. package/dist/safe-bash-search-engine/shared.js +2 -2
  960. package/dist/safe-bash-search-engine/walk.js +11 -10
  961. package/dist/safe-bash-table-text-engine/table-text/internal.d.ts +7 -5
  962. package/dist/safe-bash-table-text-engine/table-text/internal.js +39 -21
  963. package/dist/safe-bash-xml-engine/document.d.ts +1 -1
  964. package/dist/safe-bash-xml-engine/document.js +3 -3
  965. package/dist/safe-bash-xml-engine/evaluate.d.ts +1 -0
  966. package/dist/safe-bash-xml-engine/evaluate.js +4 -1
  967. package/dist/safe-bash-xml-engine/index.js +8 -6
  968. package/dist/safe-bash-xml-engine/io.js +1 -1
  969. package/dist/safe-bash-xml-engine/limits.d.ts +2 -0
  970. package/dist/safe-bash-xml-engine/limits.js +1 -1
  971. package/dist/safe-bash-xml-engine/predicate.d.ts +57 -0
  972. package/dist/safe-bash-xml-engine/query.d.ts +3 -15
  973. package/dist/safe-bash-xml-engine/query.js +3 -2
  974. package/dist/safe-bash-zip-engine/LICENSE +21 -0
  975. package/dist/safe-bash-zip-engine/index.d.ts +1 -0
  976. package/dist/safe-bash-zip-engine/index.js +32 -0
  977. package/dist/safe-bash-zip-engine/unzip/arguments.d.ts +53 -0
  978. package/dist/safe-bash-zip-engine/unzip/arguments.js +270 -0
  979. package/dist/safe-bash-zip-engine/zip/aes.d.ts +17 -0
  980. package/dist/safe-bash-zip-engine/zip/aes.js +15 -0
  981. package/dist/safe-bash-zip-engine/zip/comments.d.ts +17 -0
  982. package/dist/safe-bash-zip-engine/zip/comments.js +77 -0
  983. package/dist/safe-bash-zip-engine/zip/crc.d.ts +1 -0
  984. package/dist/safe-bash-zip-engine/zip/crc.js +7 -0
  985. package/dist/safe-bash-zip-engine/zip/crypto.d.ts +19 -0
  986. package/dist/safe-bash-zip-engine/zip/crypto.js +16 -0
  987. package/dist/safe-bash-zip-engine/zip/dates.d.ts +4 -0
  988. package/dist/safe-bash-zip-engine/zip/dates.js +68 -0
  989. package/dist/safe-bash-zip-engine/zip/environment.d.ts +2 -0
  990. package/dist/safe-bash-zip-engine/zip/environment.js +60 -0
  991. package/dist/safe-bash-zip-engine/zip/grow.d.ts +3 -0
  992. package/dist/safe-bash-zip-engine/zip/grow.js +7 -0
  993. package/dist/safe-bash-zip-engine/zip/help.d.ts +4 -0
  994. package/dist/safe-bash-zip-engine/zip/help.js +194 -0
  995. package/dist/safe-bash-zip-engine/zip/line-endings.d.ts +2 -0
  996. package/dist/safe-bash-zip-engine/zip/line-endings.js +165 -0
  997. package/dist/safe-bash-zip-engine/zip/log.d.ts +22 -0
  998. package/dist/safe-bash-zip-engine/zip/log.js +153 -0
  999. package/dist/safe-bash-zip-engine/zip/lzma.d.ts +9 -0
  1000. package/dist/safe-bash-zip-engine/zip/lzma.js +7 -0
  1001. package/dist/safe-bash-zip-engine/zip/move.d.ts +11 -0
  1002. package/dist/safe-bash-zip-engine/zip/move.js +57 -0
  1003. package/dist/safe-bash-zip-engine/zip/names.d.ts +2 -0
  1004. package/dist/safe-bash-zip-engine/zip/names.js +37 -0
  1005. package/dist/safe-bash-zip-engine/zip/options.d.ts +13 -0
  1006. package/dist/safe-bash-zip-engine/zip/options.js +23 -0
  1007. package/dist/safe-bash-zip-engine/zip/repair.d.ts +10 -0
  1008. package/dist/safe-bash-zip-engine/zip/repair.js +348 -0
  1009. package/dist/safe-bash-zip-engine/zip/safety.d.ts +54 -0
  1010. package/dist/safe-bash-zip-engine/zip/safety.js +19 -0
  1011. package/dist/safe-bash-zip-engine/zip/sfx.d.ts +4 -0
  1012. package/dist/safe-bash-zip-engine/zip/sfx.js +58 -0
  1013. package/dist/safe-bash-zip-engine/zip/test-command.d.ts +5 -0
  1014. package/dist/safe-bash-zip-engine/zip/test-command.js +98 -0
  1015. package/dist/safe-bash-zip-engine/zip/volumes.d.ts +21 -0
  1016. package/dist/safe-bash-zip-engine/zip/volumes.js +255 -0
  1017. package/dist/safe-bash-zip-engine/zip/zip64.d.ts +30 -0
  1018. package/dist/safe-bash-zip-engine/zip/zip64.js +25 -0
  1019. package/dist/safe-bash-zip-engine/zip-format.d.ts +68 -0
  1020. package/dist/safe-bash-zip-engine/zip-format.js +27 -0
  1021. package/dist/safe-playwright-cloudflare/browser-codegen.generated.d.ts +7 -7
  1022. package/dist/safe-playwright-cloudflare/browser-codegen.generated.js +866 -8069
  1023. package/dist/safe-playwright-cloudflare/browser-run-code-budget.d.ts +0 -1
  1024. package/dist/safe-playwright-cloudflare/browser-run-code-budget.js +0 -2
  1025. package/dist/safe-playwright-cloudflare/browser-trace-archive.d.ts +5 -1
  1026. package/dist/safe-playwright-cloudflare/browser-trace-archive.js +2 -1
  1027. package/dist/safe-playwright-cloudflare/browser-trace-budget.js +8 -4
  1028. package/dist/safe-playwright-cloudflare/shell-browser-resource.d.ts +2 -0
  1029. package/dist/safe-playwright-cloudflare/shell-browser-resource.js +3 -11
  1030. package/dist/safe-playwright-cloudflare/shell-playwright.d.ts +2 -0
  1031. package/dist/safe-playwright-cloudflare/shell-playwright.js +1 -1
  1032. package/dist/spreadsheet-engine/codecs/odf-hyperlinks.js +8 -2
  1033. package/dist/spreadsheet-engine/formulas/functions/captured-bessel-phase.js +2 -2
  1034. package/dist/spreadsheet-engine/formulas/label-references.js +54 -33
  1035. package/dist/spreadsheet-engine/formulas/parser.js +3 -1
  1036. package/dist/spreadsheet-engine/formulas/rewriting.js +13 -3
  1037. package/dist/spreadsheet-engine/io/publication.d.ts +1 -0
  1038. package/dist/spreadsheet-format-xls/biff-data-tables.js +4 -6
  1039. package/dist/spreadsheet-format-xls/biff-formulas.js +3 -0
  1040. package/dist/spreadsheet-format-xls/biff-label-ranges.js +9 -6
  1041. package/dist/spreadsheet-format-xls/biff.js +1 -1
  1042. package/dist/xlsx-ast/xlsx.js +8 -5
  1043. package/package.json +165 -15
  1044. package/dist/safe-bash/chunks/chunk-AZAJJVFX.js +0 -23017
  1045. package/dist/safe-bash/chunks/chunk-O4ZUCRGN.js +0 -13
  1046. package/dist/safe-bash/chunks/chunk-S264DZO2.js +0 -243
  1047. package/dist/safe-bash/chunks/chunk-WVG5SHHQ.js +0 -12
  1048. package/dist/safe-bash/chunks/chunk-ZW6K2J7P.js +0 -2652
  1049. package/dist/safe-bash/command-chunks/chunk-5MPOQ6V3.js +0 -181
  1050. package/dist/safe-bash/command-chunks/chunk-BIXLZ3OG.js +0 -14342
  1051. package/dist/safe-bash/command-chunks/chunk-DUYJE2HY.js +0 -14
  1052. package/dist/safe-bash/command-chunks/chunk-KAGBORIC.js +0 -88
  1053. package/dist/safe-bash/command-chunks/chunk-NETECMOF.js +0 -40
  1054. package/dist/safe-bash/command-chunks/chunk-XS3PGJU2.js +0 -343
  1055. package/dist/safe-bash/command-chunks/chunk-XTZALMLR.js +0 -488
  1056. package/dist/safe-bash/commands/archive/zip/aes-primitives-unavailable.d.ts +0 -2
  1057. package/dist/safe-bash/commands/archive/zip/aes-primitives-unavailable.js +0 -3
  1058. package/dist/safe-bash/commands/archive/zip/aes-primitives.d.ts +0 -2
  1059. package/dist/safe-bash/commands/archive/zip/aes-primitives.js +0 -3
  1060. package/dist/safe-bash/commands/xml/document.d.ts +0 -2
  1061. package/dist/safe-bash/commands/xml/document.js +0 -2
  1062. package/dist/safe-bash/commands/xml/evaluate.d.ts +0 -2
  1063. package/dist/safe-bash/commands/xml/evaluate.js +0 -2
  1064. package/dist/safe-bash/commands/xml/json.d.ts +0 -2
  1065. package/dist/safe-bash/commands/xml/json.js +0 -2
  1066. package/dist/safe-bash/commands/xml/limits.d.ts +0 -2
  1067. package/dist/safe-bash/commands/xml/limits.js +0 -2
  1068. package/dist/safe-bash/commands/xml/query.d.ts +0 -2
  1069. package/dist/safe-bash/commands/xml/query.js +0 -2
  1070. package/dist/safe-bash/command-chunks/{chunk-FIUFIDAO.js → chunk-2JRBIDAD.js} +3 -3
  1071. package/dist/safe-bash/command-chunks/{chunk-BWNXWI33.js → chunk-2LMZVE3I.js} +0 -0
  1072. package/dist/safe-bash/command-chunks/{chunk-B5BKA5WH.js → chunk-B5TAOCKD.js} +3 -3
  1073. package/dist/safe-bash/command-chunks/{chunk-2ENZ6JGA.js → chunk-KEV7C3KH.js} +3 -3
  1074. package/dist/safe-bash/command-chunks/{chunk-S62HELHU.js → chunk-PL6O4K6W.js} +3 -3
  1075. package/dist/safe-bash/command-chunks/{chunk-DDLQ5YDB.js → chunk-YHFXOX6U.js} +9 -9
  1076. package/dist/safe-bash/command-chunks/{chunk-DQMOM72Z.js → chunk-ZRRBXU3M.js} +4 -4
@@ -1,3 +1,6 @@
1
+ import {
2
+ imageLength
3
+ } from "./chunk-BAXU7B5Z.js";
1
4
  import {
2
5
  PdfError,
3
6
  defaultPdfLimits,
@@ -6,7 +9,7 @@ import {
6
9
  } from "./chunk-QRRYN2KO.js";
7
10
  import {
8
11
  createZipCodec
9
- } from "./chunk-MKQVQMXO.js";
12
+ } from "./chunk-5LU4UCBR.js";
10
13
  import {
11
14
  createCompressionCodec
12
15
  } from "./chunk-RDV7UCYZ.js";
@@ -15,7 +18,7 @@ import {
15
18
  } from "./chunk-YG4EPFWC.js";
16
19
  import {
17
20
  createLuaFilterCapability
18
- } from "./chunk-BIXLZ3OG.js";
21
+ } from "./chunk-3E2OIS2J.js";
19
22
  import {
20
23
  createCiteprocFilterCapability,
21
24
  defaultTreeAdapter,
@@ -41,7 +44,7 @@ import {
41
44
  init_buffer
42
45
  } from "./chunk-HX3SHTCE.js";
43
46
 
44
- // packages/safe-bash-command-pandoc/dist/chunks/chunk-BVLWOSZS.js
47
+ // packages/safe-bash-command-pandoc/dist/chunks/chunk-3SFTBPOU.js
45
48
  init_buffer();
46
49
  import * as gfm_syntax_star from "../../safe-bash-markdown-engine/gfm-syntax.js";
47
50
  import * as commonmark_blocks_star from "../../safe-bash-markdown-engine/commonmark-blocks.js";
@@ -337,7 +340,7 @@ var require_saxes = __commonJS({
337
340
  end: "endHandler",
338
341
  ready: "readyHandler"
339
342
  };
340
- var SaxesParser2 = class {
343
+ var SaxesParser3 = class {
341
344
  /**
342
345
  * @param opt The parser options.
343
346
  */
@@ -1700,9 +1703,9 @@ var require_saxes = __commonJS({
1700
1703
  pushAttribNS(name, value) {
1701
1704
  var _a;
1702
1705
  const { prefix, local } = this.qname(name);
1703
- const attr4 = { name, prefix, local, value };
1704
- this.attribList.push(attr4);
1705
- (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr4);
1706
+ const attr5 = { name, prefix, local, value };
1707
+ this.attribList.push(attr5);
1708
+ (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr5);
1706
1709
  if (prefix === "xmlns") {
1707
1710
  const trimmed = value.trim();
1708
1711
  if (this.currentXMLVersion === "1.0" && trimmed === "") {
@@ -1718,9 +1721,9 @@ var require_saxes = __commonJS({
1718
1721
  }
1719
1722
  pushAttribPlain(name, value) {
1720
1723
  var _a;
1721
- const attr4 = { name, value };
1722
- this.attribList.push(attr4);
1723
- (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr4);
1724
+ const attr5 = { name, value };
1725
+ this.attribList.push(attr5);
1726
+ (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr5);
1724
1727
  }
1725
1728
  /**
1726
1729
  * End parsing. This performs final well-formedness checks and resets the
@@ -1820,8 +1823,8 @@ var require_saxes = __commonJS({
1820
1823
  }
1821
1824
  const { attributes } = tag;
1822
1825
  const seen = /* @__PURE__ */ new Set();
1823
- for (const attr4 of attribList) {
1824
- const { name, prefix, local } = attr4;
1826
+ for (const attr5 of attribList) {
1827
+ const { name, prefix, local } = attr5;
1825
1828
  let uri2;
1826
1829
  let eqname;
1827
1830
  if (prefix === "") {
@@ -1839,8 +1842,8 @@ var require_saxes = __commonJS({
1839
1842
  this.fail(`duplicate attribute: ${eqname}.`);
1840
1843
  }
1841
1844
  seen.add(eqname);
1842
- attr4.uri = uri2;
1843
- attributes[name] = attr4;
1845
+ attr5.uri = uri2;
1846
+ attributes[name] = attr5;
1844
1847
  }
1845
1848
  this.attribList = [];
1846
1849
  }
@@ -1952,7 +1955,7 @@ var require_saxes = __commonJS({
1952
1955
  return String.fromCodePoint(num);
1953
1956
  }
1954
1957
  };
1955
- exports.SaxesParser = SaxesParser2;
1958
+ exports.SaxesParser = SaxesParser3;
1956
1959
  }
1957
1960
  });
1958
1961
  function* placeRows(rows, columns, path, rowHeads = 0) {
@@ -2227,7 +2230,7 @@ function* normalization(value, options, reserve, cooperate) {
2227
2230
  }
2228
2231
  if (!Object.hasOwn(frame.v, k)) fail(frame.p);
2229
2232
  const d = Object.getOwnPropertyDescriptor(frame.v, k);
2230
- if (!d || !("value" in d) || ["__proto__", "constructor", "prototype"].includes(k))
2233
+ if (!d || !d.enumerable || !("value" in d) || ["__proto__", "constructor", "prototype"].includes(k))
2231
2234
  fail(`${frame.p}.${k}`);
2232
2235
  if (k === "t" && d.value === "Table") hasTable = true;
2233
2236
  stack.push({ kind: "node", v: d.value, p: `${frame.p}.${k}`, depth: frame.depth + 1 });
@@ -2306,8 +2309,7 @@ function* normalization(value, options, reserve, cooperate) {
2306
2309
  }
2307
2310
  stack.push({ kind: "arr", v, elemValues, idx: 0, p, depth });
2308
2311
  } else {
2309
- const keys = [];
2310
- for (const k in v) keys.push(k);
2312
+ const keys = Object.getOwnPropertyNames(v);
2311
2313
  stack.push({ kind: "obj", v, keys, idx: 0, p, depth });
2312
2314
  }
2313
2315
  }
@@ -2431,6 +2433,13 @@ var readCommonMark = async (input, context, selection) => {
2431
2433
  return { blocks: await assemble(pending.blocks, 1), metadata: {}, resources: [] };
2432
2434
  };
2433
2435
  var commonmarkReader = { format: "commonmark", read: readCommonMark };
2436
+ function taskListState(node) {
2437
+ if (node.t !== "Span") return void 0;
2438
+ const [attr5, children2] = node.c;
2439
+ if (children2.length || attr5[0] || attr5[1].length !== 1 || attr5[1][0] !== "task-list-marker" || attr5[2].length !== 1 || attr5[2][0]?.[0] !== "checked") return void 0;
2440
+ const value = attr5[2][0][1];
2441
+ return value === "true" ? true : value === "false" ? false : void 0;
2442
+ }
2434
2443
  var delimiters = { AlignLeft: ":---", AlignRight: "---:", AlignCenter: ":---:", AlignDefault: "---" };
2435
2444
  var Projection = class _Projection {
2436
2445
  constructor(context, format2, cellWriter) {
@@ -2464,8 +2473,8 @@ var Projection = class _Projection {
2464
2473
  this.add(html ? { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;" }[ch] ?? ch : "\\`*_{}[]<>|!#".includes(ch) ? `\\${ch}` : ch === "\n" || ch === "\r" || ch === " " ? " " : ch);
2465
2474
  }
2466
2475
  }
2467
- attrs(attr4) {
2468
- const pairs2 = [...attr4[0] ? [["id", attr4[0]]] : [], ...attr4[1].length ? [["class", attr4[1].join(" ")]] : [], ...attr4[2]];
2476
+ attrs(attr5) {
2477
+ const pairs2 = [...attr5[0] ? [["id", attr5[0]]] : [], ...attr5[1].length ? [["class", attr5[1].join(" ")]] : [], ...attr5[2]];
2469
2478
  for (const [key, value] of pairs2) {
2470
2479
  if (!key || key.toLowerCase().startsWith("on") || [...key].some((ch) => !(ch >= "a" && ch <= "z") && !(ch >= "A" && ch <= "Z") && !(ch >= "0" && ch <= "9") && ch !== "-" && ch !== "_"))
2471
2480
  throw new PandocError("E_CAPABILITY", this.context.operation ?? "write", "Unsupported HTML attribute", this.format);
@@ -2474,8 +2483,8 @@ var Projection = class _Projection {
2474
2483
  this.add('"');
2475
2484
  }
2476
2485
  }
2477
- attributeLoss(attr4, path) {
2478
- if (attr4[0] || attr4[1].length || attr4[2].length) this.loss(path, "Flattened table attributes");
2486
+ attributeLoss(attr5, path) {
2487
+ if (attr5[0] || attr5[1].length || attr5[2].length) this.loss(path, "Flattened table attributes");
2479
2488
  }
2480
2489
  textProjection(render, html) {
2481
2490
  const text = new _Projection(this.context, this.format, this.cellWriter);
@@ -2874,8 +2883,8 @@ var Markdown = class {
2874
2883
  if (!this.context.lossy) throw new PandocError("E_UNSUPPORTED_FEATURE", this.context.operation ?? "write", `Markdown cannot represent ${feature}`, this.selection.descriptor.name, path);
2875
2884
  this.context.report({ code: "W_RAW_CONTENT", operation: this.context.operation ?? "write", format: this.selection.descriptor.name, location: path, message: `Projected ${feature}` });
2876
2885
  }
2877
- attrs(attr4, path) {
2878
- if (attr4[0] || attr4[1].length || attr4[2].length) this.loss(path, "attributes");
2886
+ attrs(attr5, path) {
2887
+ if (attr5[0] || attr5[1].length || attr5[2].length) this.loss(path, "attributes");
2879
2888
  }
2880
2889
  escape(text, target = false) {
2881
2890
  this.reserve(text.length * 6);
@@ -2983,15 +2992,12 @@ var Markdown = class {
2983
2992
  break;
2984
2993
  }
2985
2994
  case "Span": {
2986
- const attr4 = node.c[0];
2987
- if (task && i === 0 && attr4[0] === "" && attr4[1].length === 1 && attr4[1][0] === "task-list-marker" && attr4[2].length === 1 && attr4[2][0]?.[0] === "checked" && ["true", "false"].includes(attr4[2][0][1]) && node.c[1].length === 0) {
2988
- if (!this.selection.extensions.task_lists) {
2989
- this.loss(p, "task state");
2990
- break;
2991
- }
2992
- parts.push(attr4[2][0][1] === "true" ? "[x] " : "[ ] ");
2995
+ const attr5 = node.c[0];
2996
+ const state = taskListState(node);
2997
+ if (state !== void 0) {
2998
+ parts.push(task && i === 0 && this.selection.extensions.task_lists ? state ? "[x] " : "[ ] " : state ? "\u2612 " : "\u2610 ");
2993
2999
  } else {
2994
- this.attrs(attr4, p);
3000
+ this.attrs(attr5, p);
2995
3001
  parts.push(this.inline(node.c[1], `${p}.c[1]`));
2996
3002
  }
2997
3003
  break;
@@ -3049,9 +3055,9 @@ var Markdown = class {
3049
3055
  parts.push("---");
3050
3056
  break;
3051
3057
  case "CodeBlock": {
3052
- const attr4 = node.c[0];
3053
- if (attr4[0] || attr4[1].length > 1 || attr4[2].length) this.loss(p, "code block attributes");
3054
- const info = attr4[1][0] ?? "";
3058
+ const attr5 = node.c[0];
3059
+ if (attr5[0] || attr5[1].length > 1 || attr5[2].length) this.loss(p, "code block attributes");
3060
+ const info = attr5[1][0] ?? "";
3055
3061
  if ([...info].some((ch) => "\r\n` ".includes(ch))) this.loss(p, "code language");
3056
3062
  this.reserve(node.c[1].length * 2);
3057
3063
  const value = node.c[1].split("\r\n").join("\n").split("\r").join("\n");
@@ -3130,6 +3136,7 @@ async function writeMarkdown(document, context, selection) {
3130
3136
  }
3131
3137
  var commonmark_default = {
3132
3138
  name: "commonmark",
3139
+ aliases: { read: ["markdown_strict"], write: ["markdown_strict"] },
3133
3140
  operands: "join",
3134
3141
  reader: commonmarkReader,
3135
3142
  writer: { format: "commonmark", write: writeMarkdown },
@@ -3146,7 +3153,7 @@ var commonmark_default = {
3146
3153
  };
3147
3154
  var gfm_default = {
3148
3155
  name: "gfm",
3149
- aliases: { read: ["markdown"], write: ["markdown"] },
3156
+ aliases: { read: ["markdown", "md", "markdown_github", "markdown_mmd", "markdown_phpextra", "commonmark_x"], write: ["markdown", "md", "markdown_github", "markdown_mmd", "markdown_phpextra", "commonmark_x"] },
3150
3157
  operands: "join",
3151
3158
  reader: { format: "gfm", read: readCommonMark },
3152
3159
  writer: { format: "gfm", write: writeMarkdown },
@@ -3236,11 +3243,11 @@ var HtmlWriter = class {
3236
3243
  this.escape(value, true);
3237
3244
  this.add('"');
3238
3245
  }
3239
- attrs(attr4, id = attr4[0]) {
3246
+ attrs(attr5, id = attr5[0]) {
3240
3247
  if (id) this.attribute("id", id);
3241
- if (attr4[1].length) this.attribute("class", attr4[1].join(" "));
3248
+ if (attr5[1].length) this.attribute("class", attr5[1].join(" "));
3242
3249
  const seen = /* @__PURE__ */ new Set(["id", "class"]);
3243
- for (const [key, value] of attr4[2]) {
3250
+ for (const [key, value] of attr5[2]) {
3244
3251
  if (seen.has(key) || !(["title", "lang", "dir", "role"].includes(key) || key.startsWith("data-") || key.startsWith("aria-")) || [...key].some((ch) => !(ch >= "a" && ch <= "z") && !(ch >= "0" && ch <= "9") && ch !== "-")) this.fail("Unsupported HTML attribute");
3245
3252
  if (key === "dir" && !["ltr", "rtl", "auto"].includes(value)) this.fail("Invalid HTML direction");
3246
3253
  seen.add(key);
@@ -3387,13 +3394,19 @@ var HtmlWriter = class {
3387
3394
  case "RawInline":
3388
3395
  this.raw(node.c[0], node.c[1], p);
3389
3396
  break;
3390
- case "Span":
3397
+ case "Span": {
3398
+ const taskState = taskListState(node);
3399
+ if (taskState !== void 0) {
3400
+ this.add(taskState ? '<input type="checkbox" checked="" />' : '<input type="checkbox" />');
3401
+ break;
3402
+ }
3391
3403
  this.add("<span");
3392
3404
  this.attrs(node.c[0]);
3393
3405
  this.add(">");
3394
3406
  await this.inlines(node.c[1], `${p}.c[1]`);
3395
3407
  this.add("</span>");
3396
3408
  break;
3409
+ }
3397
3410
  case "Link":
3398
3411
  case "Image": {
3399
3412
  const image = node.t === "Image";
@@ -5048,12 +5061,12 @@ var LatexReader = class {
5048
5061
  if ([...value].length !== 1) texError(this.context, "Accent requires one Unicode scalar");
5049
5062
  append(out, { t: "Str", c: (value + accents[name]).normalize("NFC") + remainder });
5050
5063
  } else if (name === "href" || name === "url" || name === "includegraphics") {
5051
- const attr4 = empty();
5064
+ const attr5 = empty();
5052
5065
  const option = name === "includegraphics" ? cursor.optional() : void 0;
5053
- if (option) attr4[2].push(["latex-options", option.raw.slice(1, -1)]);
5066
+ if (option) attr5[2].push(["latex-options", option.raw.slice(1, -1)]);
5054
5067
  const url = this.literal(cursor.group().children, depth + 1);
5055
5068
  const label = name === "href" ? this.inlines(cursor.group().children, depth + 1) : name === "url" ? [{ t: "Str", c: url }] : [];
5056
- append(out, { t: name === "includegraphics" ? "Image" : "Link", c: [attr4, label, [url, ""]] });
5069
+ append(out, { t: name === "includegraphics" ? "Image" : "Link", c: [attr5, label, [url, ""]] });
5057
5070
  } else if (name === "ref" || name === "eqref" || name === "pageref") {
5058
5071
  const key = texSource(cursor.group().children);
5059
5072
  if (name === "pageref") {
@@ -5129,10 +5142,10 @@ var LatexReader = class {
5129
5142
  }
5130
5143
  if (cells.length || content.some((t) => t.kind !== "space" && t.kind !== "comment")) row2();
5131
5144
  if (!rows.length) texError(this.context, "Tabular has no rows");
5132
- const attr4 = empty();
5133
- attr4[2].push(["latex-column-spec", spec]);
5134
- if (rules) attr4[2].push(["latex-hlines", String(rules)]);
5135
- return { t: "Table", c: [attr4, [null, []], cols, [empty(), []], [[empty(), 0, [], rows]], [empty(), []]] };
5145
+ const attr5 = empty();
5146
+ attr5[2].push(["latex-column-spec", spec]);
5147
+ if (rules) attr5[2].push(["latex-hlines", String(rules)]);
5148
+ return { t: "Table", c: [attr5, [null, []], cols, [empty(), []], [[empty(), 0, [], rows]], [empty(), []]] };
5136
5149
  }
5137
5150
  blocks(tokens2, depth = 0) {
5138
5151
  this.context.bound("depth", depth);
@@ -5154,16 +5167,16 @@ var LatexReader = class {
5154
5167
  }
5155
5168
  if (token.kind === "command" && levels[token.text]) {
5156
5169
  flush();
5157
- const attr4 = empty();
5170
+ const attr5 = empty();
5158
5171
  if (tokens2[cursor.index]?.kind === "text" && tokens2[cursor.index]?.text === "*") {
5159
5172
  cursor.index++;
5160
- attr4[1].push("unnumbered");
5173
+ attr5[1].push("unnumbered");
5161
5174
  }
5162
5175
  const short = cursor.optional();
5163
- if (short) attr4[2].push(["short-title", short.raw.slice(1, -1)]);
5176
+ if (short) attr5[2].push(["short-title", short.raw.slice(1, -1)]);
5164
5177
  const title = this.inlines(cursor.group().children, depth + 1);
5165
- out.push({ t: "Header", c: [levels[token.text], attr4, title] });
5166
- target = { attr: attr4, title };
5178
+ out.push({ t: "Header", c: [levels[token.text], attr5, title] });
5179
+ target = { attr: attr5, title };
5167
5180
  } else if (token.kind === "command" && ["title", "author", "date", "documentclass"].includes(token.text)) {
5168
5181
  flush();
5169
5182
  const options = token.text === "documentclass" ? cursor.optional() : void 0;
@@ -5178,11 +5191,11 @@ var LatexReader = class {
5178
5191
  const name = texSource(cursor.group().children);
5179
5192
  if (!name || this.labels.has(name)) texError(this.context, "Empty or duplicate label");
5180
5193
  if (!target) {
5181
- const attr4 = empty();
5194
+ const attr5 = empty();
5182
5195
  pending.push({ kind: "group", text: "", raw: "", children: [] });
5183
5196
  flush();
5184
- out.push({ t: "Div", c: [attr4, []] });
5185
- target = { attr: attr4, title: [{ t: "Str", c: name }] };
5197
+ out.push({ t: "Div", c: [attr5, []] });
5198
+ target = { attr: attr5, title: [{ t: "Str", c: name }] };
5186
5199
  }
5187
5200
  if (target.attr[0]) texError(this.context, "Multiple labels for one structure are unsupported", "E_CAPABILITY");
5188
5201
  target.attr[0] = name;
@@ -5220,8 +5233,8 @@ var LatexReader = class {
5220
5233
  } else if (token.text === "figure" || token.text === "table") {
5221
5234
  const inner = new TexCursor(token.children, this.context);
5222
5235
  const position = inner.optional();
5223
- const attr4 = empty();
5224
- if (position) attr4[2].push(["latex-placement", position.raw.slice(1, -1)]);
5236
+ const attr5 = empty();
5237
+ if (position) attr5[2].push(["latex-placement", position.raw.slice(1, -1)]);
5225
5238
  let caption2 = [null, []];
5226
5239
  let hasCaption = false;
5227
5240
  const body = [];
@@ -5231,27 +5244,27 @@ var LatexReader = class {
5231
5244
  if (hasCaption) texError(this.context, "Repeated float caption");
5232
5245
  hasCaption = true;
5233
5246
  const short = inner.optional();
5234
- if (short) attr4[2].push(["short-caption", short.raw.slice(1, -1)]);
5247
+ if (short) attr5[2].push(["short-caption", short.raw.slice(1, -1)]);
5235
5248
  const c = this.inlines(inner.group().children, depth + 1);
5236
5249
  caption2 = [null, [{ t: "Plain", c }]];
5237
5250
  } else if (t.kind === "command" && t.text === "label") {
5238
5251
  const label = texSource(inner.group().children);
5239
- if (!label || attr4[0] || this.labels.has(label)) texError(this.context, "Empty or duplicate float label");
5240
- attr4[0] = label;
5252
+ if (!label || attr5[0] || this.labels.has(label)) texError(this.context, "Empty or duplicate float label");
5253
+ attr5[0] = label;
5241
5254
  } else body.push(t);
5242
5255
  }
5243
5256
  const blocks3 = this.blocks(body, depth + 1);
5244
5257
  const title = caption2[1][0];
5245
5258
  const inlines2 = title?.t === "Plain" ? title.c : [];
5246
- if (attr4[0]) this.labels.set(attr4[0], inlines2);
5247
- if (token.text === "figure") out.push({ t: "Figure", c: [attr4, caption2, blocks3] });
5259
+ if (attr5[0]) this.labels.set(attr5[0], inlines2);
5260
+ if (token.text === "figure") out.push({ t: "Figure", c: [attr5, caption2, blocks3] });
5248
5261
  else {
5249
5262
  if (blocks3.length !== 1 || blocks3[0]?.t !== "Table") texError(this.context, "Table float must contain one tabular", "E_CAPABILITY");
5250
5263
  const table = blocks3[0];
5251
- for (const pair of table.c[0][2]) attr4[2].push([pair[0], pair[1]]);
5252
- out.push({ t: "Table", c: [attr4, caption2, table.c[2], table.c[3], table.c[4], table.c[5]] });
5264
+ for (const pair of table.c[0][2]) attr5[2].push([pair[0], pair[1]]);
5265
+ out.push({ t: "Table", c: [attr5, caption2, table.c[2], table.c[3], table.c[4], table.c[5]] });
5253
5266
  }
5254
- target = { attr: attr4, title: inlines2 };
5267
+ target = { attr: attr5, title: inlines2 };
5255
5268
  } else {
5256
5269
  this.raw(token.raw);
5257
5270
  out.push({ t: "RawBlock", c: ["latex", token.raw] });
@@ -5356,9 +5369,9 @@ var LatexWriter = class {
5356
5369
  }
5357
5370
  if (Array.isArray(value)) {
5358
5371
  if (value.length === 3 && typeof value[0] === "string" && Array.isArray(value[1]) && Array.isArray(value[2]) && value[0]) {
5359
- const attr4 = value;
5372
+ const attr5 = value;
5360
5373
  let base = "pc";
5361
- for (const ch of attr4[0]) {
5374
+ for (const ch of attr5[0]) {
5362
5375
  this.context.checkpoint();
5363
5376
  base += `-${ch.codePointAt(0).toString(16)}`;
5364
5377
  }
@@ -5367,15 +5380,15 @@ var LatexWriter = class {
5367
5380
  const label = count === 1 ? base : `${base}-dup-${count}`;
5368
5381
  this.context.charge("retainedBytes", label.length * 2);
5369
5382
  this.context.charge("references", 1);
5370
- this.labels.set(attr4, label);
5371
- if (!this.targets.has(attr4[0])) this.targets.set(attr4[0], label);
5383
+ this.labels.set(attr5, label);
5384
+ if (!this.targets.has(attr5[0])) this.targets.set(attr5[0], label);
5372
5385
  }
5373
5386
  for (const child of value) await this.reserve(child);
5374
5387
  } else for (const child of Object.values(value)) await this.reserve(child);
5375
5388
  }
5376
- attrs(attr4, path, languageClass = false) {
5377
- if (attr4[1].length && !languageClass || attr4[2].length) this.loss("Unsupported LaTeX attributes", path);
5378
- const label = this.labels.get(attr4);
5389
+ attrs(attr5, path, languageClass = false) {
5390
+ if (attr5[1].length && !languageClass || attr5[2].length) this.loss("Unsupported LaTeX attributes", path);
5391
+ const label = this.labels.get(attr5);
5379
5392
  if (label) this.add(`\\phantomsection\\label{${label}}`);
5380
5393
  }
5381
5394
  math(source, path) {
@@ -5471,12 +5484,18 @@ var LatexWriter = class {
5471
5484
  case "RawInline":
5472
5485
  this.raw(node.c[1], p);
5473
5486
  break;
5474
- case "Span":
5487
+ case "Span": {
5488
+ const taskState = taskListState(node);
5489
+ if (taskState !== void 0) {
5490
+ this.add(taskState ? "\u2612 " : "\u2610 ");
5491
+ break;
5492
+ }
5475
5493
  this.attrs(node.c[0], p);
5476
5494
  this.add("{");
5477
5495
  await this.inlines(node.c[1], `${p}.c[1]`);
5478
5496
  this.add("}");
5479
5497
  break;
5498
+ }
5480
5499
  case "Note":
5481
5500
  this.context.charge("references", 1);
5482
5501
  this.notes.push({ blocks: node.c, path: `${p}.c` });
@@ -6712,6 +6731,7 @@ var RstWriter = class {
6712
6731
  }
6713
6732
  context;
6714
6733
  definitions = [];
6734
+ strikeout = false;
6715
6735
  notes = [];
6716
6736
  serial = 0;
6717
6737
  sourceText = "";
@@ -6741,12 +6761,12 @@ var RstWriter = class {
6741
6761
  }
6742
6762
  return this.retain(out);
6743
6763
  }
6744
- attrs(attr4, path, language = false) {
6745
- if (attr4[1].length && !language || attr4[2].length || language && attr4[1].length > 1) this.loss("Dropped unsupported RST attributes", path);
6746
- if (!attr4[0]) return "";
6747
- const count = (this.ids.get(attr4[0]) ?? 0) + 1;
6748
- this.ids.set(attr4[0], count);
6749
- const base = this.id(attr4[0]);
6764
+ attrs(attr5, path, language = false) {
6765
+ if (attr5[1].length && !language || attr5[2].length || language && attr5[1].length > 1) this.loss("Dropped unsupported RST attributes", path);
6766
+ if (!attr5[0]) return "";
6767
+ const count = (this.ids.get(attr5[0]) ?? 0) + 1;
6768
+ this.ids.set(attr5[0], count);
6769
+ const base = this.id(attr5[0]);
6750
6770
  return `.. _${count > 1 ? this.unique(`${base}-dup-${count}`) : base}:
6751
6771
 
6752
6772
  `;
@@ -6816,8 +6836,20 @@ var RstWriter = class {
6816
6836
  markup = true;
6817
6837
  break;
6818
6838
  }
6839
+ case "Strikeout": {
6840
+ const content = children2(node.c);
6841
+ if (nested) {
6842
+ this.loss("Nested RST inline style projected to text", p);
6843
+ text = content;
6844
+ break;
6845
+ }
6846
+ if (!content || content.trim() !== content) this.fail("Empty or whitespace-bounded inline style", p);
6847
+ this.strikeout = true;
6848
+ text = `:strikeout:\`${content}\``;
6849
+ markup = true;
6850
+ break;
6851
+ }
6819
6852
  case "Underline":
6820
- case "Strikeout":
6821
6853
  case "SmallCaps":
6822
6854
  this.loss(`Projected unsupported ${node.t} to text`, p);
6823
6855
  text = children2(node.c);
@@ -6825,10 +6857,16 @@ var RstWriter = class {
6825
6857
  case "Quoted":
6826
6858
  text = (node.c[0] === "SingleQuote" ? "\u2018" : "\u201C") + this.inlines(node.c[1], `${p}.c[1]`, nested, literal) + (node.c[0] === "SingleQuote" ? "\u2019" : "\u201D");
6827
6859
  break;
6828
- case "Span":
6860
+ case "Span": {
6861
+ const taskState = taskListState(node);
6862
+ if (taskState !== void 0) {
6863
+ text = taskState ? "\u2612 " : "\u2610 ";
6864
+ break;
6865
+ }
6829
6866
  this.loss("Projected unsupported Span to text", p);
6830
6867
  text = this.inlines(node.c[1], `${p}.c[1]`, nested, literal);
6831
6868
  break;
6869
+ }
6832
6870
  case "Cite":
6833
6871
  this.loss("Projected citation to displayed text", p);
6834
6872
  text = this.inlines(node.c[1], `${p}.c[1]`, nested, literal);
@@ -6910,11 +6948,11 @@ var RstWriter = class {
6910
6948
  text = this.inlines(node.c, `${p}.c`);
6911
6949
  break;
6912
6950
  case "Header": {
6913
- const [level, attr4, content] = node.c;
6951
+ const [level, attr5, content] = node.c;
6914
6952
  if (level > 9) this.loss("Heading level projected to level nine", p);
6915
6953
  text = this.inlines(content, `${p}.c[2]`);
6916
6954
  if (!text) this.fail("Empty heading", p);
6917
- text = this.attrs(attr4, p) + text + "\n" + `=-~^"'+:#`[Math.min(level, 9) - 1].repeat(rstColumnWidth(text));
6955
+ text = this.attrs(attr5, p) + text + "\n" + `=-~^"'+:#`[Math.min(level, 9) - 1].repeat(rstColumnWidth(text));
6918
6956
  break;
6919
6957
  }
6920
6958
  case "CodeBlock": {
@@ -6938,10 +6976,15 @@ var RstWriter = class {
6938
6976
  text = indent(body.startsWith(" ") ? "..\n\n" + body : body, 3);
6939
6977
  break;
6940
6978
  }
6941
- case "Div":
6942
- this.loss("Div projected to contained blocks", p);
6943
- text = this.attrs(node.c[0], p) + this.blocks(node.c[1], `${p}.c[1]`);
6979
+ case "Div": {
6980
+ const [id, classes, attributes] = node.c[0];
6981
+ if (classes.some((name) => !name || [...name].some((ch) => !"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-".includes(ch)))) this.fail("Unsupported RST container class", p);
6982
+ const body = this.blocks(node.c[1], `${p}.c[1]`);
6983
+ text = this.attrs([id, [], attributes], p) + `.. container::${classes.length ? " " + classes.join(" ") : ""}
6984
+
6985
+ ` + indent(body, 3);
6944
6986
  break;
6987
+ }
6945
6988
  case "Figure":
6946
6989
  this.loss("Figure projected to content and caption", p);
6947
6990
  text = this.blocks(node.c[2], `${p}.c[2]`) + "\n\n" + this.blocks(node.c[1][1], `${p}.c[1][1]`);
@@ -7017,8 +7060,8 @@ var RstWriter = class {
7017
7060
  if ("t" in value && ["Space", "SoftBreak", "LineBreak"].includes(String(value.t))) return " ";
7018
7061
  if ("t" in value && "c" in value && ["Header", "CodeBlock", "Div"].includes(String(value.t))) {
7019
7062
  const block2 = value;
7020
- const attr4 = block2.t === "Header" ? block2.c[1] : block2.c[0];
7021
- if (attr4[0]) this.targets.add(attr4[0]);
7063
+ const attr5 = block2.t === "Header" ? block2.c[1] : block2.c[0];
7064
+ if (attr5[0]) this.targets.add(attr5[0]);
7022
7065
  }
7023
7066
  if ("c" in value) return reserve(value.c);
7024
7067
  return this.retain(Object.values(value).map((child) => reserve(child)).join(""));
@@ -7033,7 +7076,7 @@ var RstWriter = class {
7033
7076
  const marker = `.. [${i + 1}] `;
7034
7077
  this.definitions.push(markedBody(marker, body));
7035
7078
  }
7036
- return { kind: "text", text: this.retain([text, ...this.definitions].filter(Boolean).join("\n\n") + (text || this.definitions.length ? "\n" : "")) };
7079
+ return { kind: "text", text: this.retain([...this.strikeout ? [".. role:: strikeout"] : [], text, ...this.definitions].filter(Boolean).join("\n\n") + (text || this.definitions.length ? "\n" : "")) };
7037
7080
  }
7038
7081
  };
7039
7082
  async function writeRst(document, context) {
@@ -7506,13 +7549,13 @@ var RstReader = class {
7506
7549
  if (name === "image" || name === "figure") {
7507
7550
  if (!allow(["alt", "height", "width", "scale", "align", "target", "class", "name"]) || name === "image" && body.length || name === "figure" && subName) return unsupported();
7508
7551
  if (!argument) rstError(this.context, at, "Image requires a URI");
7509
- const attr4 = rstAttr();
7510
- attr4[0] = options.get("name") ?? "";
7511
- attr4[1].push(...(options.get("class") ?? "").split(" ").filter(Boolean));
7512
- for (const k of ["height", "width", "scale", "align"]) if (options.has(k)) attr4[2].push([k, options.get(k)]);
7552
+ const attr5 = rstAttr();
7553
+ attr5[0] = options.get("name") ?? "";
7554
+ attr5[1].push(...(options.get("class") ?? "").split(" ").filter(Boolean));
7555
+ for (const k of ["height", "width", "scale", "align"]) if (options.has(k)) attr5[2].push([k, options.get(k)]);
7513
7556
  const target = [argument, ""];
7514
7557
  this.context.resourceTarget?.(target, at.line, at.source === void 0 ? void 0 : { ...at.base === void 0 ? {} : { base: at.base }, source: at.source });
7515
- let image = { t: "Image", c: [attr4, this.inline(options.get("alt") ?? "", at), target] };
7558
+ let image = { t: "Image", c: [attr5, this.inline(options.get("alt") ?? "", at), target] };
7516
7559
  if (options.has("target")) image = { t: "Link", c: [rstAttr(), [image], [options.get("target"), ""]] };
7517
7560
  if (subName) {
7518
7561
  if (this.substitutions.has(subName)) rstError(this.context, at, `Duplicate substitution: ${subName}`);
@@ -7529,18 +7572,18 @@ var RstReader = class {
7529
7572
  if (subName) return unsupported();
7530
7573
  if (["code", "code-block", "sourcecode", "parsed-literal"].includes(name)) {
7531
7574
  if (!allow(["number-lines", "class", "name"]) || name === "parsed-literal") return unsupported();
7532
- const attr4 = rstAttr();
7533
- attr4[0] = options.get("name") ?? "";
7534
- if (argument) attr4[1].push(argument);
7535
- attr4[1].push(...(options.get("class") ?? "").split(" ").filter(Boolean));
7575
+ const attr5 = rstAttr();
7576
+ attr5[0] = options.get("name") ?? "";
7577
+ if (argument) attr5[1].push(argument);
7578
+ attr5[1].push(...(options.get("class") ?? "").split(" ").filter(Boolean));
7536
7579
  if (options.has("number-lines")) {
7537
7580
  const number = options.get("number-lines") || "1";
7538
7581
  if (![...number].every((c) => c >= "0" && c <= "9")) rstError(this.context, at, "Invalid number-lines value");
7539
- attr4[1].push("numberLines");
7540
- attr4[2].push(["startFrom", number]);
7582
+ attr5[1].push("numberLines");
7583
+ attr5[2].push(["startFrom", number]);
7541
7584
  }
7542
7585
  if (!body.length) rstError(this.context, at, "Code directive requires a body");
7543
- return { blocks: [{ t: "CodeBlock", c: [attr4, body.map((l) => l.text).join("\n")] }], end };
7586
+ return { blocks: [{ t: "CodeBlock", c: [attr5, body.map((l) => l.text).join("\n")] }], end };
7544
7587
  }
7545
7588
  if (name === "raw") {
7546
7589
  if (options.size || !argument || argument.split(" ").length !== 1) return unsupported();
@@ -8979,9 +9022,9 @@ var RtfWriter = class {
8979
9022
  else this.add(ch);
8980
9023
  }
8981
9024
  }
8982
- attrs(attr4, paragraph = false) {
8983
- if (attr4[0] || attr4[1].length) this.fail("Unsupported RTF identifiers or classes");
8984
- for (const [key, value] of attr4[2]) {
9025
+ attrs(attr5, paragraph = false) {
9026
+ if (attr5[0] || attr5[1].length) this.fail("Unsupported RTF identifiers or classes");
9027
+ for (const [key, value] of attr5[2]) {
8985
9028
  if (key === "font-family") {
8986
9029
  const id = this.fonts.indexOf(value);
8987
9030
  if (id < 0) this.fail("Font reference must be explicitly declared in rtf-fonts metadata", "E_RESOURCE");
@@ -9053,13 +9096,19 @@ var RtfWriter = class {
9053
9096
  await this.inlines(node.c);
9054
9097
  this.add("}");
9055
9098
  break;
9056
- case "Span":
9099
+ case "Span": {
9100
+ const taskState = taskListState(node);
9101
+ if (taskState !== void 0) {
9102
+ this.text(taskState ? "\u2612 " : "\u2610 ");
9103
+ break;
9104
+ }
9057
9105
  this.add("{");
9058
9106
  this.attrs(node.c[0]);
9059
9107
  if (node.c[0][2].length) this.add(" ");
9060
9108
  await this.inlines(node.c[1]);
9061
9109
  this.add("}");
9062
9110
  break;
9111
+ }
9063
9112
  case "Code":
9064
9113
  this.add("{");
9065
9114
  this.attrs(node.c[0]);
@@ -9111,12 +9160,12 @@ var RtfWriter = class {
9111
9160
  }
9112
9161
  }
9113
9162
  }
9114
- async paragraph(nodes, state, attr4) {
9163
+ async paragraph(nodes, state, attr5) {
9115
9164
  this.add(`{\\pard\\plain\\s${state.style ?? 0}`);
9116
9165
  if (state.style) this.add(`\\b\\fs${40 - state.style * 2}`);
9117
9166
  this.add(`\\li${state.indent}\\fi${state.marker ? -360 : 0}\\${state.direction}par`);
9118
9167
  if (state.cell) this.add(`\\intbl\\${alignments[state.cell]}`);
9119
- if (attr4) this.attrs(attr4, true);
9168
+ if (attr5) this.attrs(attr5, true);
9120
9169
  if (state.marker && state.list) this.add(`\\tx${state.indent}\\ls${state.list.id}\\ilvl${state.list.level}`);
9121
9170
  this.add(" ");
9122
9171
  if (state.marker) {
@@ -9194,7 +9243,7 @@ var RtfWriter = class {
9194
9243
  case "Table": {
9195
9244
  if (state.cell) this.fail("Nested RTF tables unsupported");
9196
9245
  const t = node.c;
9197
- for (const attr4 of [t[0], t[3][0], ...t[4].map((b) => b[0]), t[5][0]]) if (attr4[0] || attr4[1].length || attr4[2].length) this.fail("Attributed RTF table sections unsupported");
9246
+ for (const attr5 of [t[0], t[3][0], ...t[4].map((b) => b[0]), t[5][0]]) if (attr5[0] || attr5[1].length || attr5[2].length) this.fail("Attributed RTF table sections unsupported");
9198
9247
  if (t[1][1].length) await this.blocks(t[1][1], state);
9199
9248
  else if (t[1][0]) await this.paragraph(t[1][0], state);
9200
9249
  const widths = t[2].map((c) => c[1].t === "ColWidth" ? c[1].c : 1 / t[2].length);
@@ -9763,8 +9812,8 @@ var epubReader = {
9763
9812
  }
9764
9813
  if (toc.length) metadata2["epub-toc"] = { t: "MetaList", c: toc };
9765
9814
  return { blocks: chapters.map((chapter) => {
9766
- const attr4 = [identity(chapter.item.part), ["epub-chapter"], [["data-epub-source", chapter.item.part], ["data-epub-item-id", chapter.item.id], ["data-epub-linear", chapter.linear], ...chapter.language ? [["lang", chapter.language]] : []]];
9767
- return { t: "Div", c: [attr4, chapter.blocks] };
9815
+ const attr5 = [identity(chapter.item.part), ["epub-chapter"], [["data-epub-source", chapter.item.part], ["data-epub-item-id", chapter.item.id], ["data-epub-linear", chapter.linear], ...chapter.language ? [["lang", chapter.language]] : []]];
9816
+ return { t: "Div", c: [attr5, chapter.blocks] };
9768
9817
  }), metadata: metadata2, resources: [...bag.values()], ...bookLanguage ? { language: xmlText(bookLanguage) } : {}, ...["ltr", "rtl"].includes(bookDirection) ? { direction: bookDirection } : {} };
9769
9818
  }
9770
9819
  };
@@ -9793,14 +9842,17 @@ var epubWriter = {
9793
9842
  if (defaultTreeAdapter.isTextNode(node)) return node.value;
9794
9843
  return "childNodes" in node ? node.childNodes.map(text).join("") : "";
9795
9844
  };
9845
+ const inlineText = async (nodes) => {
9846
+ const result = await writeHtml5({ blocks: [{ t: "Plain", c: nodes }], metadata: {}, resources: [] }, htmlContext);
9847
+ if (result.kind !== "text") return fail3("Expected text serialization");
9848
+ return text(parseFragment(result.text)).trim();
9849
+ };
9796
9850
  const meta2 = async (key) => {
9797
9851
  const value = document.metadata[key];
9798
9852
  if (value === void 0) return void 0;
9799
9853
  if (value.t === "MetaString") return value.c;
9800
9854
  if (value.t !== "MetaInlines") return fail3(`${key} must be text metadata`, "E_OPTION");
9801
- const result = await writeHtml5({ blocks: [{ t: "Plain", c: value.c }], metadata: {}, resources: [] }, htmlContext);
9802
- if (result.kind !== "text") return fail3("Expected text serialization");
9803
- return text(parseFragment(result.text)).trim();
9855
+ return inlineText(value.c);
9804
9856
  };
9805
9857
  const htmlContext = new Proxy(ctx, { get(target, key) {
9806
9858
  if (key === "standalone") return false;
@@ -9811,9 +9863,22 @@ var epubWriter = {
9811
9863
  const suppliedTitle = ctx.epub?.title ?? await meta2("title");
9812
9864
  const suppliedLang = ctx.epub?.language ?? await meta2("lang") ?? document.language;
9813
9865
  const explicitIdentifier = ctx.epub?.identifier ?? await meta2("identifier");
9814
- if (!ctx.yes && (suppliedTitle === void 0 || suppliedLang === void 0 || explicitIdentifier === void 0)) fail3("EPUB requires title, language and identifier; supply metadata or use --yes to accept defaults", "E_METADATA");
9815
- const title = suppliedTitle ?? "Untitled";
9816
- const lang = suppliedLang ?? "en";
9866
+ const headingTitle = async (blocks3) => {
9867
+ for (const block2 of blocks3) {
9868
+ await ctx.cooperate();
9869
+ if (block2.t === "Header") {
9870
+ const title2 = await inlineText(block2.c[2]);
9871
+ if (title2) return title2;
9872
+ }
9873
+ if (block2.t === "Div" || block2.t === "BlockQuote") {
9874
+ const title2 = await headingTitle(block2.t === "Div" ? block2.c[1] : block2.c);
9875
+ if (title2) return title2;
9876
+ }
9877
+ }
9878
+ return void 0;
9879
+ };
9880
+ const title = suppliedTitle ?? await headingTitle(document.blocks) ?? "Untitled";
9881
+ const lang = suppliedLang ?? "en-US";
9817
9882
  const modified = await meta2("modified") ?? "1970-01-01T00:00:00Z";
9818
9883
  if (!title.trim() || !lang.trim() || explicitIdentifier !== void 0 && !explicitIdentifier.trim()) fail3("Publication metadata must be nonempty", "E_OPTION");
9819
9884
  const date = new Date(modified);
@@ -10431,7 +10496,7 @@ var EncodingMode;
10431
10496
  })(EncodingMode || (EncodingMode = {}));
10432
10497
  var attr2 = ["", [], []];
10433
10498
  async function modelContext(ctx) {
10434
- const { DocumentBudget } = await import("./src-UJOWAS2S.js");
10499
+ const { DocumentBudget } = await import("./src-ICMQISAA.js");
10435
10500
  const l = ctx.limits;
10436
10501
  const signal = ctx.signal ?? new AbortController().signal;
10437
10502
  return { signal, budget: new DocumentBudget({
@@ -10465,7 +10530,7 @@ async function guarded(ctx, action) {
10465
10530
  }
10466
10531
  var docxReader = { format: "docx", async read(input, ctx) {
10467
10532
  return guarded(ctx, async () => {
10468
- const { Document: openDocument, Paragraph, Run } = await import("./src-UJOWAS2S.js");
10533
+ const { Document: openDocument, Paragraph, Run } = await import("./src-ICMQISAA.js");
10469
10534
  const model = await openDocument(input.bytes, await modelContext(ctx));
10470
10535
  const paragraph = (p) => {
10471
10536
  const inlines2 = [];
@@ -10498,21 +10563,26 @@ var docxReader = { format: "docx", async read(input, ctx) {
10498
10563
  return { blocks: blocks3, metadata: {}, resources: [] };
10499
10564
  });
10500
10565
  } };
10501
- var docxWriter = { format: "docx", async write(document, ctx) {
10566
+ var docxWriter = { format: "docx", imageResources: "embed", async write(document, ctx) {
10502
10567
  return guarded(ctx, async () => {
10503
10568
  const blocks3 = [];
10504
10569
  const paragraphs = [];
10505
10570
  const numbering2 = [];
10506
10571
  const w = "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
10507
10572
  const r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
10508
- const runs = (nodes, bold = false, italic = false, link) => {
10573
+ const runs = (nodes, style = {}) => {
10509
10574
  const result = [];
10510
10575
  for (const node of nodes) {
10511
10576
  ctx.checkpoint();
10512
- if (node.t === "Strong") result.push(...runs(node.c, true, italic, link));
10513
- else if (node.t === "Emph") result.push(...runs(node.c, bold, true, link));
10514
- else if (node.t === "Span") result.push(...runs(node.c[1], bold, italic, link));
10515
- else if (node.t === "Link") result.push(...runs(node.c[1], bold, italic, node.c[2][0]));
10577
+ if (node.t === "Strong") result.push(...runs(node.c, { ...style, bold: true }));
10578
+ else if (node.t === "Emph") result.push(...runs(node.c, { ...style, italic: true }));
10579
+ else if (node.t === "Underline") result.push(...runs(node.c, { ...style, underline: true }));
10580
+ else if (node.t === "Strikeout") result.push(...runs(node.c, { ...style, strike: true }));
10581
+ else if (node.t === "Superscript" || node.t === "Subscript") result.push(...runs(node.c, { ...style, baseline: node.t === "Superscript" ? "superscript" : "subscript" }));
10582
+ else if (node.t === "Span") result.push(...runs(node.c[1], style));
10583
+ else if (node.t === "Link") result.push(...runs(node.c[1], { ...style, link: node.c[2][0] }));
10584
+ else if (node.t === "Quoted") result.push(...runs([{ t: "Str", c: node.c[0] === "SingleQuote" ? "\u2018" : "\u201C" }, ...node.c[1], { t: "Str", c: node.c[0] === "SingleQuote" ? "\u2019" : "\u201D" }], style));
10585
+ else if (node.t === "Image") result.push({ ...style, text: "", image: node });
10516
10586
  else {
10517
10587
  let text;
10518
10588
  if (node.t === "Str") text = node.c;
@@ -10520,14 +10590,14 @@ var docxWriter = { format: "docx", async write(document, ctx) {
10520
10590
  else if (node.t === "LineBreak") text = "\n";
10521
10591
  else if (node.t === "Code") text = node.c[1];
10522
10592
  else throw new PandocError("E_UNSUPPORTED_FEATURE", "write", `Unsupported DOCX inline: ${node.t}`, "docx");
10523
- result.push({ text, bold, italic, ...link === void 0 ? {} : { link } });
10593
+ result.push({ ...style, text });
10524
10594
  }
10525
10595
  }
10526
10596
  return result;
10527
10597
  };
10528
10598
  const paragraph = (target, content, properties, level) => {
10529
10599
  paragraphs.push({ runs: content, properties });
10530
- target.push({ kind: "paragraph", ...level === void 0 ? {} : { level }, runs: content.map(({ link: _link, ...run }) => run) });
10600
+ target.push({ kind: "paragraph", ...level === void 0 ? {} : { level }, runs: content.map(({ link: _link, strike: _strike, baseline: _baseline, image: _image, ...run }) => run) });
10531
10601
  };
10532
10602
  const visit5 = async (nodes, target, indent3 = 0, list2) => {
10533
10603
  for (const block2 of nodes) {
@@ -10575,7 +10645,7 @@ var docxWriter = { format: "docx", async write(document, ctx) {
10575
10645
  }
10576
10646
  };
10577
10647
  await visit5(document.blocks, blocks3);
10578
- const { createDocumentArchive, writeDocumentArchive, DocumentXmlEditor } = await import("./src-UJOWAS2S.js");
10648
+ const { createDocumentArchive, writeDocumentArchive, DocumentXmlEditor, Image } = await import("./src-ICMQISAA.js");
10579
10649
  const mc = await modelContext(ctx);
10580
10650
  const archiveContext = { signal: mc.signal, budget: mc.budget };
10581
10651
  const archive = await createDocumentArchive({ content: { version: 1, blocks: blocks3 } }, archiveContext);
@@ -10583,6 +10653,30 @@ var docxWriter = { format: "docx", async write(document, ctx) {
10583
10653
  const relationships = new DocumentXmlEditor(archive.members.find((member) => member.name === "word/_rels/document.xml.rels").bytes, {}, void 0, mc.budget);
10584
10654
  let paragraphIndex = 0, relationshipId = 2;
10585
10655
  const linkRelationships = [];
10656
+ const media = /* @__PURE__ */ new Map();
10657
+ let drawingId = 0;
10658
+ const drawing = async (node) => {
10659
+ ctx.charge("images", 1);
10660
+ const source = node.c[2][0];
10661
+ let entry = media.get(source);
10662
+ if (!entry) {
10663
+ const bytes2 = document.resources.find((resource) => resource.id === source)?.bytes ?? await ctx.resources?.resolve(source, void 0, ctx.signal);
10664
+ if (!bytes2) throw new PandocError("E_RESOURCE", "write", `Missing image resource: ${source}`, "docx");
10665
+ ctx.charge("resourceBytes", bytes2.length);
10666
+ const asset = await Image.from_blob(bytes2, mc);
10667
+ const name = `media/image-${media.size + 1}.${asset.ext}`;
10668
+ entry = { name, bytes: bytes2, type: asset.content_type, id: `rId${relationshipId++}`, asset };
10669
+ media.set(source, entry);
10670
+ linkRelationships.push(`<Relationship Id="${entry.id}" Type="${r}/image" Target="${name}"/>`);
10671
+ }
10672
+ const attributes = Object.fromEntries(node.c[0][2]);
10673
+ let width = imageLength(attributes.width, entry.asset.width.emu, ctx, "docx"), height = imageLength(attributes.height, entry.asset.height.emu, ctx, "docx");
10674
+ if (attributes.width && !attributes.height) height = Math.max(1, Math.round(width * entry.asset.height.emu / entry.asset.width.emu));
10675
+ if (attributes.height && !attributes.width) width = Math.max(1, Math.round(height * entry.asset.width.emu / entry.asset.height.emu));
10676
+ const alt = encodeXML(runs(node.c[1]).map((run) => run.text).join(""));
10677
+ const a = "http://schemas.openxmlformats.org/drawingml/2006/main", pic = "http://schemas.openxmlformats.org/drawingml/2006/picture";
10678
+ return `<w:drawing xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:a="${a}" xmlns:pic="${pic}" xmlns:r="${r}"><wp:inline distT="0" distB="0" distL="0" distR="0"><wp:extent cx="${width}" cy="${height}"/><wp:docPr id="${++drawingId}" name="Image ${drawingId}" descr="${alt}" title="${encodeXML(node.c[2][1])}"/><wp:cNvGraphicFramePr><a:graphicFrameLocks noChangeAspect="1"/></wp:cNvGraphicFramePr><a:graphic><a:graphicData uri="${pic}"><pic:pic><pic:nvPicPr><pic:cNvPr id="0" name="Image ${drawingId}"/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed="${entry.id}"/><a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="${width}" cy="${height}"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></pic:spPr></pic:pic></a:graphicData></a:graphic></wp:inline></w:drawing>`;
10679
+ };
10586
10680
  const edit = async (node) => {
10587
10681
  await ctx.cooperate();
10588
10682
  if (node.namespace === w && node.localName === "p") {
@@ -10592,13 +10686,21 @@ var docxWriter = { format: "docx", async write(document, ctx) {
10592
10686
  const properties = node.children.find((child) => child.localName === "pPr");
10593
10687
  if (properties && extra.properties) replacements.set(properties, `<w:pPr>${main.sourceXml(properties, /* @__PURE__ */ new Map(), true)}${extra.properties}</w:pPr>`);
10594
10688
  const nativeRuns = node.children.filter((child) => child.localName === "r");
10595
- for (const [index, run] of extra.runs.entries()) if (run.link !== void 0) {
10689
+ for (const [index, run] of extra.runs.entries()) {
10596
10690
  ctx.checkpoint();
10597
10691
  const native = nativeRuns[index];
10598
- const anchor = run.link.startsWith("#");
10599
- const id = `rId${relationshipId++}`;
10600
- if (!anchor) linkRelationships.push(`<Relationship Id="${id}" Type="${r}/hyperlink" Target="${encodeXML(run.link)}" TargetMode="External"/>`);
10601
- replacements.set(native, `<w:hyperlink ${anchor ? `w:anchor="${encodeXML(run.link.slice(1))}"` : `xmlns:r="${r}" r:id="${id}"`}>${main.sourceXml(native)}</w:hyperlink>`);
10692
+ const properties2 = native.children.find((child) => child.localName === "rPr");
10693
+ const format2 = (run.strike ? "<w:strike/>" : "") + (run.baseline ? `<w:vertAlign w:val="${run.baseline}"/>` : "");
10694
+ const edits = /* @__PURE__ */ new Map();
10695
+ if (properties2 && format2) edits.set(properties2, `<w:rPr>${main.sourceXml(properties2, /* @__PURE__ */ new Map(), true)}${format2}</w:rPr>`);
10696
+ let xml = run.image ? `<w:r>${await drawing(run.image)}</w:r>` : `<w:r>${!properties2 && format2 ? `<w:rPr>${format2}</w:rPr>` : ""}${main.sourceXml(native, edits, true)}</w:r>`;
10697
+ if (run.link !== void 0) {
10698
+ const anchor = run.link.startsWith("#");
10699
+ const id = `rId${relationshipId++}`;
10700
+ if (!anchor) linkRelationships.push(`<Relationship Id="${id}" Type="${r}/hyperlink" Target="${encodeXML(run.link)}" TargetMode="External"/>`);
10701
+ xml = `<w:hyperlink ${anchor ? `w:anchor="${encodeXML(run.link.slice(1))}"` : `xmlns:r="${r}" r:id="${id}"`}>${xml}</w:hyperlink>`;
10702
+ }
10703
+ if (format2 || run.image || run.link !== void 0) replacements.set(native, xml);
10602
10704
  }
10603
10705
  if (extra.properties || replacements.size) main.replaceElement(node, `<w:p xmlns:w="${w}">${!properties && extra.properties ? `<w:pPr>${extra.properties}</w:pPr>` : ""}${main.sourceXml(node, replacements, true)}</w:p>`);
10604
10706
  } else for (const child of node.children) await edit(child);
@@ -10608,8 +10710,10 @@ var docxWriter = { format: "docx", async write(document, ctx) {
10608
10710
  if (linkRelationships.length) relationships.insertChildren(relationships.root, linkRelationships.map((xml) => xml.replace("<Relationship ", '<Relationship xmlns="http://schemas.openxmlformats.org/package/2006/relationships" ')).join(""));
10609
10711
  const types = new DocumentXmlEditor(archive.members.find((member) => member.name === "[Content_Types].xml").bytes, {}, void 0, mc.budget);
10610
10712
  if (numbering2.length) types.insertChildren(types.root, '<Override xmlns="http://schemas.openxmlformats.org/package/2006/content-types" PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>');
10713
+ for (const entry of media.values()) types.insertChildren(types.root, `<Override xmlns="http://schemas.openxmlformats.org/package/2006/content-types" PartName="/word/${entry.name}" ContentType="${entry.type}"/>`);
10611
10714
  const parts = /* @__PURE__ */ new Map([["word/document.xml", main.serialize()], ["word/_rels/document.xml.rels", relationships.serialize()], ["[Content_Types].xml", types.serialize()]]);
10612
10715
  const members = archive.members.map((member) => ({ ...member, bytes: parts.get(member.name) ?? member.bytes }));
10716
+ for (const entry of media.values()) members.push({ name: `word/${entry.name}`, bytes: entry.bytes, directory: false, modified: /* @__PURE__ */ new Date(0) });
10613
10717
  if (numbering2.length) members.push({ name: "word/numbering.xml", bytes: new TextEncoder().encode(`<w:numbering xmlns:w="${w}">${numbering2.join("")}${numbering2.map((_, i) => `<w:num w:numId="${i + 1}"><w:abstractNumId w:val="${i + 1}"/></w:num>`).join("")}</w:numbering>`), directory: false, modified: /* @__PURE__ */ new Date(0) });
10614
10718
  const chunks = [];
10615
10719
  let size = 0;
@@ -10643,6 +10747,448 @@ var docx_default = {
10643
10747
  write: ["standalone"]
10644
10748
  }
10645
10749
  };
10750
+ var import_saxes2 = __toESM(require_saxes(), 1);
10751
+ var odtNamespaces = Object.fromEntries(["office", "text", "style", "table", "draw", "manifest"].map((name) => [name, `urn:oasis:names:tc:opendocument:xmlns:${name === "draw" ? "drawing" : name}:1.0`]));
10752
+ var odtMime = "application/vnd.oasis.opendocument.text";
10753
+ var fo = "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0";
10754
+ var xlink = "http://www.w3.org/1999/xlink";
10755
+ var svg = "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0";
10756
+ function odtAttribute(node, name, uri2) {
10757
+ return node.attrs.find((a) => a.name === name && a.uri === uri2)?.value ?? "";
10758
+ }
10759
+ function odtChildren(node, name, uri2) {
10760
+ return node.children.filter((child) => typeof child !== "string" && child.name === name && child.uri === uri2);
10761
+ }
10762
+ function odtFailure(ctx, message, code = "E_PARSE") {
10763
+ throw new PandocError(code, ctx.operation ?? "read", message, "odt");
10764
+ }
10765
+ async function parseOdtXml(bytes, ctx) {
10766
+ ctx.bound("binaryBytes", bytes.length);
10767
+ const text = await ctx.decodeUtf8([bytes]);
10768
+ const parser = new import_saxes2.SaxesParser({ xmlns: true });
10769
+ const stack = [];
10770
+ let root;
10771
+ parser.on("error", (error) => odtFailure(ctx, `Invalid ODT XML: ${error.message}`));
10772
+ parser.on("doctype", () => odtFailure(ctx, "ODT DTD and external entities are forbidden"));
10773
+ parser.on("opentag", (tag) => {
10774
+ ctx.checkpoint();
10775
+ ctx.bound("xmlDepth", stack.length + 1);
10776
+ ctx.charge("xmlNodes", 1);
10777
+ ctx.charge("attributes", Object.keys(tag.attributes).length);
10778
+ ctx.charge("retainedBytes", 128 + Object.keys(tag.attributes).length * 64);
10779
+ const node = { name: tag.local, uri: tag.uri, attrs: Object.values(tag.attributes).map((a) => ({ name: a.local, uri: a.uri, value: a.value })), children: [] };
10780
+ if (stack.length) stack.at(-1).children.push(node);
10781
+ else root = node;
10782
+ stack.push(node);
10783
+ });
10784
+ parser.on("closetag", () => {
10785
+ stack.pop();
10786
+ });
10787
+ const append2 = (value) => {
10788
+ ctx.charge("retainedBytes", value.length * 2);
10789
+ if (stack.length) stack.at(-1).children.push(value);
10790
+ };
10791
+ parser.on("text", append2);
10792
+ parser.on("cdata", append2);
10793
+ for (let i = 0; i < text.length; i += 4096) {
10794
+ parser.write(text.slice(i, i + 4096));
10795
+ await ctx.cooperate(4096);
10796
+ }
10797
+ parser.close();
10798
+ return root ?? odtFailure(ctx, "Missing ODT XML root");
10799
+ }
10800
+ function odtPackage(ctx) {
10801
+ const signal = ctx.signal ?? new AbortController().signal;
10802
+ const limits = { maxArchiveBytes: Math.max(ctx.limits.compressedBytes, ctx.limits.outputBytes), maxEntryBytes: ctx.limits.expandedBytes, maxTotalBytes: ctx.limits.expandedBytes, maxMembers: ctx.limits.parts, maxPathBytes: ctx.limits.text, maxDepth: ctx.limits.depth, maxPaxBytes: ctx.limits.binaryBytes, maxTextBytes: ctx.limits.text, chunkSize: 4096 };
10803
+ const codec = createZipCodec({ compression: createCompressionCodec(), yieldTurn: async () => ctx.cooperate(), fail: (message) => odtFailure(ctx, message, message.includes("limit") ? "E_LIMIT" : "E_PARSE") }, { rejectDuplicateNames: true, validatePayloads: true, allowStoredCompressionFlags: true });
10804
+ return {
10805
+ async read(bytes) {
10806
+ ctx.bound("compressedBytes", bytes.length);
10807
+ const archive = await codec.readZipArchive(bytes, { ...limits, maxArchiveBytes: ctx.limits.compressedBytes }, signal);
10808
+ ctx.charge("parts", archive.entries.length);
10809
+ const parts = /* @__PURE__ */ new Map();
10810
+ for (const entry of archive.entries) {
10811
+ if (entry.symlink || entry.name.includes("\\") || entry.name.includes(":")) odtFailure(ctx, "Unsafe ODT package member");
10812
+ const chunks = [];
10813
+ let size = 0;
10814
+ for await (const chunk of codec.decodeZipEntry(entry, limits, signal)) {
10815
+ ctx.charge("expandedBytes", chunk.length);
10816
+ ctx.charge("retainedBytes", chunk.length * 2);
10817
+ chunks.push(chunk);
10818
+ size += chunk.length;
10819
+ }
10820
+ if (entry.directory) continue;
10821
+ const data = new Uint8Array(size);
10822
+ let offset = 0;
10823
+ for (const chunk of chunks) {
10824
+ data.set(chunk, offset);
10825
+ offset += chunk.length;
10826
+ }
10827
+ parts.set(entry.name, data);
10828
+ }
10829
+ if (new TextDecoder().decode(parts.get("mimetype")) !== odtMime) odtFailure(ctx, "Invalid or missing ODT mimetype");
10830
+ return parts;
10831
+ },
10832
+ async write(parts) {
10833
+ const entries = [];
10834
+ for (const [name, bytes] of parts) {
10835
+ ctx.charge("parts", 1);
10836
+ ctx.charge("expandedBytes", bytes.length);
10837
+ ctx.charge("retainedBytes", bytes.length);
10838
+ const entry = await codec.makeZipEntry(name, bytes, { modified: /* @__PURE__ */ new Date("1980-01-01T00:00:00Z"), mode: 33188, directory: false, symlink: false, compression: "store" }, limits, signal);
10839
+ if (name === "mimetype") {
10840
+ entry.localExtra = new Uint8Array();
10841
+ entry.centralExtra = new Uint8Array();
10842
+ }
10843
+ entries.push(entry);
10844
+ }
10845
+ return codec.writeZipArchive({ entries, comment: new Uint8Array() }, { ...limits, maxArchiveBytes: ctx.limits.outputBytes }, signal);
10846
+ }
10847
+ };
10848
+ }
10849
+ var attr3 = ["", [], []];
10850
+ var odtReader = { format: "odt", async read(input, ctx) {
10851
+ const parts = await odtPackage(ctx).read(input.bytes);
10852
+ const source = parts.get("content.xml") ?? odtFailure(ctx, "Missing ODT content.xml");
10853
+ const root = await parseOdtXml(source, ctx);
10854
+ if (root.uri !== odtNamespaces.office || root.name !== "document-content") odtFailure(ctx, "Invalid ODT content root");
10855
+ const bodies = odtChildren(root, "body", odtNamespaces.office).flatMap((body) => odtChildren(body, "text", odtNamespaces.office));
10856
+ if (bodies.length !== 1) odtFailure(ctx, "Expected one ODT text body");
10857
+ const styles = /* @__PURE__ */ new Map();
10858
+ const resources = /* @__PURE__ */ new Map();
10859
+ const collectStyles = (node) => {
10860
+ ctx.checkpoint();
10861
+ if (node.uri === odtNamespaces.style && node.name === "style" || node.uri === odtNamespaces.text && node.name === "list-style") styles.set(odtAttribute(node, "name", odtNamespaces.style), node);
10862
+ for (const child of node.children) if (typeof child !== "string") collectStyles(child);
10863
+ };
10864
+ if (parts.has("styles.xml")) collectStyles(await parseOdtXml(parts.get("styles.xml"), ctx));
10865
+ collectStyles(root);
10866
+ const styleChain = (name) => {
10867
+ const names = /* @__PURE__ */ new Set();
10868
+ while (name) {
10869
+ ctx.checkpoint();
10870
+ ctx.bound("depth", names.size + 1);
10871
+ if (names.has(name)) odtFailure(ctx, "Cyclic ODT style inheritance");
10872
+ names.add(name);
10873
+ const style = styles.get(name);
10874
+ name = style ? odtAttribute(style, "parent-style-name", odtNamespaces.style) : "";
10875
+ }
10876
+ return [...names];
10877
+ };
10878
+ const properties = (name) => {
10879
+ const result = /* @__PURE__ */ new Map();
10880
+ for (const parent of styleChain(name).reverse()) {
10881
+ const style = styles.get(parent);
10882
+ if (!style) continue;
10883
+ for (const child of odtChildren(style, "text-properties", odtNamespaces.style)) for (const prop of child.attrs) result.set(`${prop.uri}:${prop.name}`, prop.value);
10884
+ }
10885
+ return result;
10886
+ };
10887
+ const plainText = (node) => {
10888
+ ctx.checkpoint();
10889
+ return node.children.map((child) => typeof child === "string" ? child : plainText(child)).join("");
10890
+ };
10891
+ const count = (value, maximum) => {
10892
+ const n = value ? Number(value) : 1;
10893
+ if (!Number.isSafeInteger(n) || n < 1) odtFailure(ctx, "Invalid ODT repetition count");
10894
+ if (n > maximum) odtFailure(ctx, "ODT repetition limit exceeded", "E_LIMIT");
10895
+ ctx.checkpoint(n);
10896
+ return n;
10897
+ };
10898
+ const inlines2 = (nodes) => {
10899
+ const result = [];
10900
+ for (const node of nodes) {
10901
+ ctx.checkpoint();
10902
+ if (typeof node === "string") {
10903
+ if (node) result.push({ t: "Str", c: node });
10904
+ continue;
10905
+ }
10906
+ if (node.uri === odtNamespaces.text) {
10907
+ if (node.name === "s") {
10908
+ const n = count(odtAttribute(node, "c", odtNamespaces.text), ctx.limits.text);
10909
+ ctx.charge("retainedBytes", n * 2);
10910
+ result.push({ t: "Str", c: " ".repeat(n) });
10911
+ } else if (node.name === "tab") result.push({ t: "Str", c: " " });
10912
+ else if (node.name === "line-break") result.push({ t: "LineBreak" });
10913
+ else if (node.name === "a") result.push({ t: "Link", c: [attr3, inlines2(node.children), [odtAttribute(node, "href", xlink), ""]] });
10914
+ else if (node.name === "span") {
10915
+ let content2 = inlines2(node.children);
10916
+ const props = properties(odtAttribute(node, "style-name", odtNamespaces.text));
10917
+ const tags = [
10918
+ { tag: "Strong", enabled: props.get(`${fo}:font-weight`) === "bold" },
10919
+ { tag: "Emph", enabled: props.get(`${fo}:font-style`) === "italic" },
10920
+ { tag: "Strikeout", enabled: ["solid", "double"].includes(props.get(`${odtNamespaces.style}:text-line-through-style`) ?? "") },
10921
+ { tag: "Superscript", enabled: props.get(`${odtNamespaces.style}:text-position`)?.startsWith("super") ?? false },
10922
+ { tag: "Subscript", enabled: props.get(`${odtNamespaces.style}:text-position`)?.startsWith("sub") ?? false },
10923
+ { tag: "Underline", enabled: props.get(`${odtNamespaces.style}:text-underline-style`) === "solid" },
10924
+ { tag: "SmallCaps", enabled: props.get(`${fo}:font-variant`) === "small-caps" }
10925
+ ];
10926
+ for (const { tag, enabled } of tags) if (enabled) content2 = [{ t: tag, c: content2 }];
10927
+ result.push(...content2);
10928
+ } else if (["bookmark", "bookmark-start"].includes(node.name)) result.push({ t: "Span", c: [[odtAttribute(node, "name", odtNamespaces.text), [], []], []] });
10929
+ else if (!["bookmark-end", "soft-page-break"].includes(node.name)) odtFailure(ctx, `Unsupported ODT inline: ${node.name}`, "E_UNSUPPORTED_FEATURE");
10930
+ } else if (node.uri === odtNamespaces.draw && node.name === "frame") {
10931
+ const image = odtChildren(node, "image", odtNamespaces.draw)[0];
10932
+ if (!image) odtFailure(ctx, "Unsupported ODT drawing", "E_UNSUPPORTED_FEATURE");
10933
+ let name;
10934
+ try {
10935
+ name = decodeURIComponent(odtAttribute(image, "href", xlink));
10936
+ } catch {
10937
+ return odtFailure(ctx, "Invalid ODT image URI", "E_RESOURCE");
10938
+ }
10939
+ if (name.startsWith("./")) name = name.slice(2);
10940
+ if (!name || name.startsWith("/") || name.includes(":") || name.includes("\\") || name.split("/").some((part) => !part || part === "." || part === "..")) odtFailure(ctx, "Unsafe ODT image reference", "E_RESOURCE");
10941
+ const bytes = parts.get(name) ?? odtFailure(ctx, `Missing ODT image: ${name}`, "E_RESOURCE");
10942
+ if (!resources.has(name)) {
10943
+ ctx.charge("resourceBytes", bytes.length);
10944
+ resources.set(name, { id: name, bytes });
10945
+ }
10946
+ const attributes = [];
10947
+ for (const dimension of ["width", "height"]) {
10948
+ const value = odtAttribute(node, dimension, svg);
10949
+ if (value) attributes.push([dimension, value]);
10950
+ }
10951
+ result.push({ t: "Image", c: [["", [], attributes], [{ t: "Str", c: odtChildren(node, "desc", svg).map(plainText).join("") }], [name, odtChildren(node, "title", svg).map(plainText).join("")]] });
10952
+ } else odtFailure(ctx, `Unsupported ODT inline namespace: ${node.uri}`, "E_UNSUPPORTED_FEATURE");
10953
+ }
10954
+ return result;
10955
+ };
10956
+ const blocks3 = async (nodes, listLevel = 1) => {
10957
+ const result = [];
10958
+ for (const node of nodes) {
10959
+ await ctx.cooperate();
10960
+ if (typeof node === "string") {
10961
+ if (node.trim()) odtFailure(ctx, "Text outside ODT paragraph");
10962
+ continue;
10963
+ }
10964
+ if (node.uri === odtNamespaces.text && ["p", "h"].includes(node.name)) {
10965
+ const content2 = inlines2(node.children), names = styleChain(odtAttribute(node, "style-name", odtNamespaces.text));
10966
+ if (node.name === "h") result.push({ t: "Header", c: [count(odtAttribute(node, "outline-level", odtNamespaces.text), 6), attr3, content2] });
10967
+ else if (names.includes("Rule")) result.push({ t: "HorizontalRule" });
10968
+ else if (names.includes("Preformatted")) result.push({ t: "CodeBlock", c: [attr3, content2.map((n) => n.t === "Str" ? n.c : n.t === "LineBreak" ? "\n" : n.t === "Space" ? " " : "").join("")] });
10969
+ else if (names.some((name) => ["Quote", "Quotations"].includes(name))) result.push({ t: "BlockQuote", c: [{ t: "Para", c: content2 }] });
10970
+ else result.push({ t: "Para", c: content2 });
10971
+ } else if (node.uri === odtNamespaces.text && node.name === "section") result.push({ t: "Div", c: [[odtAttribute(node, "name", odtNamespaces.text), [], []], await blocks3(node.children, listLevel)] });
10972
+ else if (node.uri === odtNamespaces.text && node.name === "list") {
10973
+ const style = styles.get(odtAttribute(node, "style-name", odtNamespaces.text));
10974
+ const level = style?.children.find((child) => typeof child !== "string" && child.uri === odtNamespaces.text && Number(odtAttribute(child, "level", odtNamespaces.text)) === listLevel);
10975
+ const items = odtChildren(node, "list-item", odtNamespaces.text), content2 = [];
10976
+ for (const item of items) content2.push(await blocks3(item.children, listLevel + 1));
10977
+ if (level?.name === "list-level-style-number") {
10978
+ const start = count(items[0] && odtAttribute(items[0], "start-value", odtNamespaces.text) || odtAttribute(level, "start-value", odtNamespaces.text), Number.MAX_SAFE_INTEGER);
10979
+ const style2 = { "1": "Decimal", a: "LowerAlpha", A: "UpperAlpha", i: "LowerRoman", I: "UpperRoman" }[odtAttribute(level, "num-format", odtNamespaces.style)] ?? "Decimal";
10980
+ result.push({ t: "OrderedList", c: [[start, style2, odtAttribute(level, "num-prefix", odtNamespaces.style) === "(" ? "TwoParens" : odtAttribute(level, "num-suffix", odtNamespaces.style) === ")" ? "OneParen" : "Period"], content2] });
10981
+ } else result.push({ t: "BulletList", c: content2 });
10982
+ } else if (node.uri === odtNamespaces.table && node.name === "table") {
10983
+ const head2 = [], rows = [];
10984
+ const rowNodes = node.children.flatMap((child) => typeof child === "string" ? [] : child.uri === odtNamespaces.table && child.name === "table-header-rows" ? odtChildren(child, "table-row", odtNamespaces.table).map((row2) => ({ row: row2, header: true })) : child.uri === odtNamespaces.table && child.name === "table-row" ? [{ row: child, header: false }] : []);
10985
+ let columns = 0;
10986
+ for (const { row: row2, header } of rowNodes) {
10987
+ const cells = [];
10988
+ for (const cell2 of odtChildren(row2, "table-cell", odtNamespaces.table)) {
10989
+ if (count(odtAttribute(cell2, "number-columns-spanned", odtNamespaces.table), ctx.limits.tableColumns) !== 1 || count(odtAttribute(cell2, "number-rows-spanned", odtNamespaces.table), ctx.limits.tableRows) !== 1) odtFailure(ctx, "ODT table spans are unsupported", "E_UNSUPPORTED_FEATURE");
10990
+ const repeat2 = count(odtAttribute(cell2, "number-columns-repeated", odtNamespaces.table), ctx.limits.tableColumns);
10991
+ const content2 = await blocks3(cell2.children);
10992
+ for (let i = 0; i < repeat2; i++) {
10993
+ ctx.charge("tableCells", 1);
10994
+ cells.push([attr3, "AlignDefault", 1, 1, content2]);
10995
+ }
10996
+ ctx.bound("tableColumns", cells.length);
10997
+ }
10998
+ columns = Math.max(columns, cells.length);
10999
+ const repeat = count(odtAttribute(row2, "number-rows-repeated", odtNamespaces.table), ctx.limits.tableRows);
11000
+ ctx.charge("tableCells", (repeat - 1) * cells.length);
11001
+ for (let i = 0; i < repeat; i++) (header ? head2 : rows).push([attr3, cells]);
11002
+ ctx.bound("tableRows", head2.length + rows.length);
11003
+ }
11004
+ const specs = Array.from({ length: columns }, () => ["AlignDefault", { t: "ColWidthDefault" }]);
11005
+ result.push({ t: "Table", c: [attr3, [null, []], specs, [attr3, head2], [[attr3, 0, [], rows]], [attr3, []]] });
11006
+ } else if (!(node.uri === odtNamespaces.text && ["sequence-decls", "tracked-changes"].includes(node.name))) odtFailure(ctx, `Unsupported ODT block: ${node.name}`, "E_UNSUPPORTED_FEATURE");
11007
+ }
11008
+ return result;
11009
+ };
11010
+ const metadata2 = {};
11011
+ if (parts.has("meta.xml")) {
11012
+ const meta2 = await parseOdtXml(parts.get("meta.xml"), ctx);
11013
+ for (const container of odtChildren(meta2, "meta", odtNamespaces.office)) for (const title of odtChildren(container, "title", "http://purl.org/dc/elements/1.1/")) metadata2.title = { t: "MetaString", c: plainText(title) };
11014
+ }
11015
+ const content = await blocks3(bodies[0].children);
11016
+ return { blocks: content, metadata: metadata2, resources: [...resources.values()] };
11017
+ } };
11018
+ var odtWriter = { format: "odt", imageResources: "embed", async write(document, ctx) {
11019
+ const parts = /* @__PURE__ */ new Map([["mimetype", new TextEncoder().encode(odtMime)]]);
11020
+ const mediaTypes = /* @__PURE__ */ new Map();
11021
+ const images = /* @__PURE__ */ new Map();
11022
+ const styles = /* @__PURE__ */ new Map();
11023
+ let serial = 0;
11024
+ const escaped = (value) => {
11025
+ ctx.checkpoint(value.length);
11026
+ for (const ch of value) {
11027
+ const code = ch.codePointAt(0);
11028
+ if (code < 32 && ![9, 10, 13].includes(code) || code === 65534 || code === 65535) odtFailure(ctx, "Invalid XML character");
11029
+ }
11030
+ const result = encodeXML(value);
11031
+ ctx.charge("retainedBytes", result.length * 2);
11032
+ return result;
11033
+ };
11034
+ const text = (value) => escaped(value).split(" ").join("<text:s/>").split(" ").join("<text:tab/>").split("\n").join("<text:line-break/>");
11035
+ const textStyles = { Strong: 'fo:font-weight="bold"', Emph: 'fo:font-style="italic"', Strikeout: 'style:text-line-through-style="solid"', Superscript: 'style:text-position="super 58%"', Subscript: 'style:text-position="sub 58%"', Underline: 'style:text-underline-style="solid"', SmallCaps: 'fo:font-variant="small-caps"', Code: 'fo:font-family="monospace"' };
11036
+ for (const [name, properties] of Object.entries(textStyles)) styles.set(name, `<style:style style:name="${name}" style:family="text"><style:text-properties ${properties}/></style:style>`);
11037
+ styles.set("Rule", '<style:style style:name="Rule" style:family="paragraph"><style:paragraph-properties fo:border-bottom="0.5pt solid #000000"/></style:style>');
11038
+ styles.set("Preformatted", '<style:style style:name="Preformatted" style:family="paragraph"><style:text-properties fo:font-family="monospace"/></style:style>');
11039
+ const inlines2 = async (nodes) => {
11040
+ const output = [];
11041
+ for (const node of nodes) {
11042
+ await ctx.cooperate();
11043
+ switch (node.t) {
11044
+ case "Str":
11045
+ output.push(text(node.c));
11046
+ break;
11047
+ case "Space":
11048
+ case "SoftBreak":
11049
+ output.push("<text:s/>");
11050
+ break;
11051
+ case "LineBreak":
11052
+ output.push("<text:line-break/>");
11053
+ break;
11054
+ case "Strong":
11055
+ case "Emph":
11056
+ case "Strikeout":
11057
+ case "Superscript":
11058
+ case "Subscript":
11059
+ case "Underline":
11060
+ case "SmallCaps":
11061
+ output.push(`<text:span text:style-name="${node.t}">${await inlines2(node.c)}</text:span>`);
11062
+ break;
11063
+ case "Code":
11064
+ output.push(`<text:span text:style-name="Code">${text(node.c[1])}</text:span>`);
11065
+ break;
11066
+ case "Span":
11067
+ output.push(await inlines2(node.c[1]));
11068
+ break;
11069
+ case "Quoted":
11070
+ output.push((node.c[0] === "SingleQuote" ? "\u2018" : "\u201C") + await inlines2(node.c[1]) + (node.c[0] === "SingleQuote" ? "\u2019" : "\u201D"));
11071
+ break;
11072
+ case "Link":
11073
+ output.push(`<text:a xlink:type="simple" xlink:href="${escaped(node.c[2][0])}">${await inlines2(node.c[1])}</text:a>`);
11074
+ break;
11075
+ case "Image": {
11076
+ const source = node.c[2][0];
11077
+ let image = images.get(source);
11078
+ ctx.charge("images", 1);
11079
+ if (!image) {
11080
+ const bytes = document.resources.find((r) => r.id === source)?.bytes ?? await ctx.resources?.resolve(source, void 0, ctx.signal);
11081
+ if (!bytes) odtFailure(ctx, `Missing image resource: ${source}`, "E_RESOURCE");
11082
+ ctx.charge("resourceBytes", bytes.length);
11083
+ const { Image, DocumentBudget } = await import("./src-ICMQISAA.js");
11084
+ const asset = await Image.from_blob(bytes, { signal: ctx.signal ?? new AbortController().signal, budget: new DocumentBudget({ embeddedMediaBytes: ctx.limits.resourceBytes, retainedBytes: ctx.limits.retainedBytes, work: ctx.limits.work }) });
11085
+ image = { name: `Pictures/image-${images.size + 1}.${asset.ext}`, width: asset.width.emu, height: asset.height.emu };
11086
+ images.set(source, image);
11087
+ parts.set(image.name, bytes);
11088
+ mediaTypes.set(image.name, asset.content_type);
11089
+ }
11090
+ const attrs = Object.fromEntries(node.c[0][2]);
11091
+ let width = imageLength(attrs.width, image.width, ctx, "odt"), height = imageLength(attrs.height, image.height, ctx, "odt");
11092
+ if (attrs.width && !attrs.height) height = width * image.height / image.width;
11093
+ if (attrs.height && !attrs.width) width = height * image.width / image.height;
11094
+ output.push(`<draw:frame draw:name="Image${++serial}" text:anchor-type="as-char" svg:width="${width / 914400}in" svg:height="${height / 914400}in"><draw:image xlink:href="${image.name}" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/><svg:title>${escaped(node.c[2][1])}</svg:title><svg:desc>${escaped(node.c[1].map((n) => n.t === "Str" ? n.c : n.t === "Space" ? " " : "").join(""))}</svg:desc></draw:frame>`);
11095
+ break;
11096
+ }
11097
+ default:
11098
+ odtFailure(ctx, `Unsupported ODT inline: ${node.t}`, "E_UNSUPPORTED_FEATURE");
11099
+ }
11100
+ }
11101
+ return output.join("");
11102
+ };
11103
+ const blocks3 = async (nodes, paragraphStyle = "", listLevel = 1) => {
11104
+ const output = [];
11105
+ for (const node of nodes) {
11106
+ await ctx.cooperate();
11107
+ switch (node.t) {
11108
+ case "Para":
11109
+ case "Plain":
11110
+ output.push(`<text:p${paragraphStyle ? ` text:style-name="${paragraphStyle}"` : ""}>${await inlines2(node.c)}</text:p>`);
11111
+ break;
11112
+ case "Header":
11113
+ output.push(`<text:h text:outline-level="${node.c[0]}">${await inlines2(node.c[2])}</text:h>`);
11114
+ break;
11115
+ case "CodeBlock":
11116
+ output.push(`<text:p text:style-name="Preformatted">${text(node.c[1])}</text:p>`);
11117
+ break;
11118
+ case "BlockQuote":
11119
+ output.push(await blocks3(node.c, "Quotations", listLevel));
11120
+ break;
11121
+ case "HorizontalRule":
11122
+ output.push('<text:p text:style-name="Rule"/>');
11123
+ break;
11124
+ case "Div":
11125
+ output.push(`<text:section text:name="${escaped(node.c[0][0] || `Section${++serial}`)}">${await blocks3(node.c[1], paragraphStyle, listLevel)}</text:section>`);
11126
+ break;
11127
+ case "BulletList":
11128
+ case "OrderedList": {
11129
+ const name = `List${++serial}`, ordered = node.t === "OrderedList";
11130
+ const format2 = ordered ? { DefaultStyle: "1", Decimal: "1", LowerAlpha: "a", UpperAlpha: "A", LowerRoman: "i", UpperRoman: "I" }[node.c[0][1]] : void 0;
11131
+ if (ordered && !format2) odtFailure(ctx, "Unsupported ODT list style", "E_UNSUPPORTED_FEATURE");
11132
+ styles.set(name, `<text:list-style style:name="${name}">${ordered ? `<text:list-level-style-number text:level="${listLevel}" style:num-format="${format2}" text:start-value="${node.c[0][0]}" style:num-prefix="${node.c[0][2] === "TwoParens" ? "(" : ""}" style:num-suffix="${["OneParen", "TwoParens"].includes(node.c[0][2]) ? ")" : "."}"/>` : `<text:list-level-style-bullet text:level="${listLevel}" text:bullet-char="\u2022"/>`}</text:list-style>`);
11133
+ const items = [];
11134
+ for (const item of ordered ? node.c[1] : node.c) items.push(`<text:list-item>${await blocks3(item, paragraphStyle, listLevel + 1)}</text:list-item>`);
11135
+ output.push(`<text:list text:style-name="${name}">${items.join("")}</text:list>`);
11136
+ break;
11137
+ }
11138
+ case "Table": {
11139
+ output.push(await blocks3(node.c[1][1]));
11140
+ if (!node.c[1][1].length && node.c[1][0]) output.push(`<text:p>${await inlines2(node.c[1][0])}</text:p>`);
11141
+ output.push(`<table:table table:name="Table${++serial}"><table:table-column table:number-columns-repeated="${node.c[2].length}"/>`);
11142
+ for (const [rows, header] of [[node.c[3][1], true], [node.c[4].flatMap((body) => [...body[2], ...body[3]]), false], [node.c[5][1], false]]) {
11143
+ if (header && rows.length) output.push("<table:table-header-rows>");
11144
+ for (const row2 of rows) {
11145
+ output.push("<table:table-row>");
11146
+ for (const cell2 of row2[1]) {
11147
+ if (cell2[2] !== 1 || cell2[3] !== 1) odtFailure(ctx, "ODT table spans are unsupported", "E_UNSUPPORTED_FEATURE");
11148
+ output.push(`<table:table-cell office:value-type="string">${await blocks3(cell2[4], header ? "Table_20_Heading" : "Table_20_Contents")}</table:table-cell>`);
11149
+ }
11150
+ output.push("</table:table-row>");
11151
+ }
11152
+ if (header && rows.length) output.push("</table:table-header-rows>");
11153
+ }
11154
+ output.push("</table:table>");
11155
+ break;
11156
+ }
11157
+ default:
11158
+ odtFailure(ctx, `Unsupported ODT block: ${node.t}`, "E_UNSUPPORTED_FEATURE");
11159
+ }
11160
+ }
11161
+ const value = output.join("");
11162
+ ctx.bound("outputBytes", value.length);
11163
+ ctx.charge("retainedBytes", value.length * 2);
11164
+ return value;
11165
+ };
11166
+ const content = await blocks3(document.blocks);
11167
+ const namespaces2 = Object.entries(odtNamespaces).map(([key, value]) => `xmlns:${key}="${value}"`).join(" ") + ` xmlns:fo="${fo}" xmlns:xlink="${xlink}" xmlns:svg="${svg}"`;
11168
+ const put = (name, xml) => {
11169
+ ctx.bound("outputBytes", xml.length);
11170
+ parts.set(name, new TextEncoder().encode(xml));
11171
+ };
11172
+ put("content.xml", `<?xml version="1.0" encoding="UTF-8"?><office:document-content ${namespaces2} office:version="1.3"><office:automatic-styles>${[...styles.values()].join("")}</office:automatic-styles><office:body><office:text>${content}</office:text></office:body></office:document-content>`);
11173
+ put("styles.xml", `<?xml version="1.0"?><office:document-styles ${namespaces2} office:version="1.3"><office:styles><style:style style:name="Standard" style:family="paragraph"/><style:style style:name="Quotations" style:family="paragraph" style:parent-style-name="Standard" style:class="html"><style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0.5in"/></style:style><style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard"/><style:style style:name="Table_20_Heading" style:display-name="Table Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents"><style:text-properties fo:font-weight="bold"/></style:style></office:styles></office:document-styles>`);
11174
+ const title = document.metadata.title;
11175
+ put("meta.xml", `<?xml version="1.0"?><office:document-meta xmlns:office="${odtNamespaces.office}" xmlns:dc="http://purl.org/dc/elements/1.1/" office:version="1.3"><office:meta>${title?.t === "MetaString" ? `<dc:title>${escaped(title.c)}</dc:title>` : ""}</office:meta></office:document-meta>`);
11176
+ put("META-INF/manifest.xml", `<?xml version="1.0"?><manifest:manifest xmlns:manifest="${odtNamespaces.manifest}" manifest:version="1.3"><manifest:file-entry manifest:full-path="/" manifest:media-type="${odtMime}"/>${[...parts.keys()].filter((name) => name !== "mimetype").map((name) => `<manifest:file-entry manifest:full-path="${name}" manifest:media-type="${mediaTypes.get(name) ?? "text/xml"}"/>`).join("")}</manifest:manifest>`);
11177
+ return { kind: "binary", bytes: await odtPackage(ctx).write(parts) };
11178
+ } };
11179
+ var odt_default = {
11180
+ name: "odt",
11181
+ reader: odtReader,
11182
+ writer: odtWriter,
11183
+ read: true,
11184
+ write: true,
11185
+ media: "binary",
11186
+ inputEncoding: "bytes",
11187
+ suffixes: ["odt"],
11188
+ extensions: {},
11189
+ options: { read: [], write: ["standalone"] },
11190
+ inputBudget: "compressedBytes"
11191
+ };
10646
11192
  var pptx_default = {
10647
11193
  name: "pptx",
10648
11194
  read: true,
@@ -10653,7 +11199,7 @@ var pptx_default = {
10653
11199
  format: "pptx",
10654
11200
  async read(input, context, selection) {
10655
11201
  context.signal?.throwIfAborted();
10656
- const { pptxReader } = await import("./pptx-GBPNWNEP-7EQEVXV5.js");
11202
+ const { pptxReader } = await import("./pptx-7G52EJ6L-4JACH5FB.js");
10657
11203
  context.signal?.throwIfAborted();
10658
11204
  return pptxReader.read(input, context, selection);
10659
11205
  }
@@ -10662,7 +11208,7 @@ var pptx_default = {
10662
11208
  format: "pptx",
10663
11209
  async write(document, context, selection) {
10664
11210
  context.signal?.throwIfAborted();
10665
- const { pptxWriter } = await import("./pptx-GBPNWNEP-7EQEVXV5.js");
11211
+ const { pptxWriter } = await import("./pptx-7G52EJ6L-4JACH5FB.js");
10666
11212
  context.signal?.throwIfAborted();
10667
11213
  return pptxWriter.write(document, context, selection);
10668
11214
  }
@@ -10674,7 +11220,7 @@ var pptx_default = {
10674
11220
  write: ["standalone"]
10675
11221
  }
10676
11222
  };
10677
- var attr3 = ["", [], []];
11223
+ var attr4 = ["", [], []];
10678
11224
  var xlsxReader = { format: "xlsx", async read(input, ctx) {
10679
11225
  const l = ctx.limits;
10680
11226
  const context = {
@@ -10709,7 +11255,7 @@ var xlsxReader = { format: "xlsx", async read(input, ctx) {
10709
11255
  ctx.bound("nodes", ++nodes);
10710
11256
  const title = await literalInlines(sheet.name, ctx, nodes);
10711
11257
  nodes += title.length;
10712
- blocks3.push({ t: "Header", c: [1, attr3, title] });
11258
+ blocks3.push({ t: "Header", c: [1, attr4, title] });
10713
11259
  if (!sheet.cells.length) continue;
10714
11260
  let height = 0, width = 0;
10715
11261
  for (const cell2 of sheet.cells) {
@@ -10734,13 +11280,13 @@ var xlsxReader = { format: "xlsx", async read(input, ctx) {
10734
11280
  const inlines2 = await literalInlines(text, ctx, nodes);
10735
11281
  nodes += inlines2.length;
10736
11282
  if (inlines2.length) ctx.bound("nodes", ++nodes);
10737
- row2.push([attr3, "AlignDefault", 1, 1, inlines2.length ? [{ t: "Plain", c: inlines2 }] : []]);
11283
+ row2.push([attr4, "AlignDefault", 1, 1, inlines2.length ? [{ t: "Plain", c: inlines2 }] : []]);
10738
11284
  }
10739
- rows.push([attr3, row2]);
11285
+ rows.push([attr4, row2]);
10740
11286
  }
10741
11287
  ctx.bound("nodes", ++nodes);
10742
11288
  const head2 = rows.shift();
10743
- blocks3.push({ t: "Table", c: [attr3, [null, []], Array.from({ length: width }, () => ["AlignDefault", { t: "ColWidthDefault" }]), [attr3, [head2]], [[attr3, 0, [], rows]], [attr3, []]] });
11289
+ blocks3.push({ t: "Table", c: [attr4, [null, []], Array.from({ length: width }, () => ["AlignDefault", { t: "ColWidthDefault" }]), [attr4, [head2]], [[attr4, 0, [], rows]], [attr4, []]] });
10744
11290
  }
10745
11291
  return { blocks: blocks3, metadata: {}, resources: [] };
10746
11292
  } catch (error) {
@@ -10779,6 +11325,7 @@ var coreFormats = [
10779
11325
  epub_default,
10780
11326
  pdf_default,
10781
11327
  docx_default,
11328
+ odt_default,
10782
11329
  pptx_default,
10783
11330
  xlsx_default
10784
11331
  ];
@@ -10884,7 +11431,7 @@ function createFormatRegistry(descriptors = coreFormats, context = {}, operation
10884
11431
  infer(path, direction) {
10885
11432
  const dot = path.lastIndexOf(".");
10886
11433
  if (dot <= path.lastIndexOf("/") || dot < 0) return fail3("E_FORMAT", `No suffix: ${path}`);
10887
- const suffix = path.slice(dot + 1);
11434
+ const suffix = path.slice(dot + 1).toLowerCase();
10888
11435
  const matches = formats.filter(
10889
11436
  (descriptor) => descriptor[direction] && descriptor.suffixes.includes(suffix)
10890
11437
  );
@@ -10927,6 +11474,7 @@ var defaultLimits = Object.freeze({
10927
11474
  resources: Infinity,
10928
11475
  diagnostics: Infinity,
10929
11476
  references: Infinity,
11477
+ yamlAliases: Infinity,
10930
11478
  entities: Infinity,
10931
11479
  entityBytes: Infinity,
10932
11480
  work: Infinity,
@@ -19706,9 +20254,28 @@ async function resolveConversionArgs(args, files, signal, context = {}) {
19706
20254
  if (document.errors.length) execution.fail("E_OPTION", "Invalid YAML defaults");
19707
20255
  let value;
19708
20256
  try {
19709
- value = document.toJS({ maxAliasCount: 0 });
19710
- } catch {
19711
- execution.fail("E_OPTION", "YAML defaults aliases are unsupported");
20257
+ value = document.toJS({ maxAliasCount: execution.limits.yamlAliases === Infinity ? -1 : execution.limits.yamlAliases });
20258
+ } catch (error) {
20259
+ if (error instanceof ReferenceError && (execution.limits.yamlAliases === 0 || error.message.includes("alias count"))) execution.fail("E_LIMIT", "YAML defaults alias expansion limit exceeded");
20260
+ execution.fail("E_OPTION", "Invalid YAML defaults aliases");
20261
+ }
20262
+ const active = /* @__PURE__ */ new Set(), visited = /* @__PURE__ */ new Set();
20263
+ const pending = [{ value, depth: 0 }];
20264
+ while (pending.length) {
20265
+ const item = pending.pop();
20266
+ if (!item.value || typeof item.value !== "object") continue;
20267
+ if (item.leave) {
20268
+ active.delete(item.value);
20269
+ visited.add(item.value);
20270
+ continue;
20271
+ }
20272
+ if (visited.has(item.value)) continue;
20273
+ if (active.has(item.value)) execution.fail("E_OPTION", "Cyclic YAML defaults are unsupported");
20274
+ await execution.cooperate();
20275
+ execution.bound("depth", item.depth);
20276
+ active.add(item.value);
20277
+ pending.push({ ...item, leave: true });
20278
+ for (const child of Object.values(item.value)) pending.push({ value: child, depth: item.depth + 1 });
19712
20279
  }
19713
20280
  if (!value || typeof value !== "object" || Array.isArray(value)) execution.fail("E_OPTION", "Defaults must be a YAML map");
19714
20281
  for (const [raw, entry] of Object.entries(value)) {