@poe-platform/safe-bash 0.1.798 → 0.1.800

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 (942) hide show
  1. package/README.md +34 -18
  2. package/dist/image-ast/index.browser.js +1384 -23
  3. package/dist/image-ast/index.js +1384 -23
  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 +1 -1
  8. package/dist/safe-bash/chunks/{chunk-IUTD5FH5.js → chunk-46UISJCK.js} +1 -6
  9. package/dist/safe-bash/chunks/chunk-4SEW2Q6H.js +26 -0
  10. package/dist/safe-bash/chunks/{chunk-AKC46AF6.js → chunk-7YSRXFEG.js} +7 -40
  11. package/dist/safe-bash/chunks/{chunk-KTGR4U57.js → chunk-BHJE5LPZ.js} +1 -2
  12. package/dist/safe-bash/chunks/{chunk-AMTCC256.js → chunk-HHW7MGS2.js} +2 -2
  13. package/dist/safe-bash/chunks/{chunk-ZNAFMYIA.js → chunk-I7L3G3NX.js} +1 -1
  14. package/dist/safe-bash/chunks/{chunk-KMH2DF3I.js → chunk-JJSTTIEZ.js} +6 -1
  15. package/dist/safe-bash/chunks/{chunk-6IBTC4YL.js → chunk-JTLSUJ7V.js} +57 -20
  16. package/dist/safe-bash/chunks/chunk-K2VCOJ2B.js +111 -0
  17. package/dist/safe-bash/chunks/chunk-K4YMYFRJ.js +9802 -0
  18. package/dist/safe-bash/chunks/{chunk-CSNXID73.js → chunk-KW24TAIU.js} +446 -5543
  19. package/dist/safe-bash/chunks/{chunk-ENR3HB2B.js → chunk-NLAW7KDI.js} +0 -1
  20. package/dist/safe-bash/chunks/{chunk-B3DDEDH2.js → chunk-PPYM75Z3.js} +1 -1
  21. package/dist/safe-bash/chunks/{chunk-NX2SQVON.js → chunk-RKKRJ54E.js} +19 -7
  22. package/dist/safe-bash/chunks/{chunk-V3VEATEA.js → chunk-RMWLWH7Q.js} +870 -953
  23. package/dist/safe-bash/chunks/{chunk-JSVX4VIA.js → chunk-TFGRKY43.js} +2 -1
  24. package/dist/safe-bash/chunks/{chunk-T5KKDMYB.js → chunk-TYD7EVUJ.js} +6 -0
  25. package/dist/safe-bash/chunks/{csvkit-W2UEKH6P.js → csvkit-QGP3GAOB.js} +1 -1
  26. package/dist/safe-bash/chunks/{ffmpeg-42CGASMV.js → ffmpeg-JTVH26MK.js} +1 -1
  27. package/dist/safe-bash/chunks/{gh-26GYLH6D.js → gh-I7QX7N5C.js} +1 -1
  28. package/dist/safe-bash/chunks/{git-YREKMUVD.js → git-MA7NKYVP.js} +1 -1
  29. package/dist/safe-bash/chunks/{imagemagick-3YIX4XO2.js → imagemagick-Y4NPWX2Q.js} +1 -1
  30. package/dist/safe-bash/chunks/{implementation-E3YMKU3Z.js → implementation-BWDKOVQJ.js} +1 -1
  31. package/dist/safe-bash/chunks/mmdc-44PELHDG.js +118 -0
  32. package/dist/safe-bash/chunks/{pdfimages-UE2UISP2.js → pdfimages-635TRW4Q.js} +1 -1
  33. package/dist/safe-bash/chunks/{pdfinfo-RGARKLI5.js → pdfinfo-FSDAA2KY.js} +3 -11
  34. package/dist/safe-bash/chunks/{pdftk-JY3WVCCC.js → pdftk-GQ5UH3VG.js} +1 -1
  35. package/dist/safe-bash/chunks/{pdftoppm-GPD3BMPY.js → pdftoppm-YTXQCAYT.js} +1 -1
  36. package/dist/safe-bash/chunks/{pdftotext-K7GQ2QJZ.js → pdftotext-CVA2G7FY.js} +1 -1
  37. package/dist/safe-bash/chunks/{qpdf-F4U7WUSU.js → qpdf-HZMIFG4A.js} +1 -1
  38. package/dist/safe-bash/chunks/{sips-RWENS7X5.js → sips-E7UBDP33.js} +1 -1
  39. package/dist/safe-bash/chunks/{soffice-IT6W2C5F.js → soffice-ELASUWUK.js} +1 -1
  40. package/dist/safe-bash/chunks/{wkhtmltopdf-JYNDAHIZ.js → wkhtmltopdf-EPO6YCMG.js} +1 -1
  41. package/dist/safe-bash/command-chunks/chunk-2FGJYFWZ.js +44 -0
  42. package/dist/safe-bash/command-chunks/chunk-2H4JTFIL.js +53 -0
  43. package/dist/safe-bash/command-chunks/{chunk-THS4YAKG.js → chunk-2QHG43WJ.js} +2 -2
  44. package/dist/safe-bash/command-chunks/chunk-364TMWBT.js +946 -0
  45. package/dist/safe-bash/command-chunks/{chunk-JEPY4UY4.js → chunk-3DT2YOGW.js} +11 -6
  46. package/dist/safe-bash/command-chunks/chunk-3E2OIS2J.js +7037 -0
  47. package/dist/safe-bash/command-chunks/{chunk-AIRGA2SU.js → chunk-3HXDA5PT.js} +1 -1
  48. package/dist/safe-bash/command-chunks/chunk-3LSOYLNV.js +1091 -0
  49. package/dist/safe-bash/command-chunks/{chunk-OAJUAAWH.js → chunk-464RVBGB.js} +3 -3
  50. package/dist/safe-bash/command-chunks/chunk-4B7Y7S6E.js +61 -0
  51. package/dist/safe-bash/command-chunks/{chunk-HRLIAMXC.js → chunk-4C6QI5BQ.js} +3 -2
  52. package/dist/safe-bash/command-chunks/{chunk-25BLI6S6.js → chunk-4Y3WVMK4.js} +1 -14
  53. package/dist/safe-bash/command-chunks/chunk-4ZHMW6F5.js +104 -0
  54. package/dist/safe-bash/command-chunks/{chunk-YMQKVEIF.js → chunk-52PCQXD2.js} +2 -13
  55. package/dist/safe-bash/command-chunks/{chunk-SSBFTMVI.js → chunk-53P53XFM.js} +2 -2
  56. package/dist/safe-bash/command-chunks/{chunk-ZCKDQGKY.js → chunk-5HDSFHGW.js} +1 -1
  57. package/dist/safe-bash/command-chunks/chunk-5LSGEIZY.js +379 -0
  58. package/dist/safe-bash/command-chunks/{chunk-MKQVQMXO.js → chunk-5LU4UCBR.js} +1 -1
  59. package/dist/safe-bash/command-chunks/chunk-5T7CRJHW.js +560 -0
  60. package/dist/safe-bash/command-chunks/chunk-5TBUOBDE.js +346 -0
  61. package/dist/safe-bash/command-chunks/{chunk-AUAF5YBT.js → chunk-5WPI42ZW.js} +0 -7
  62. package/dist/safe-bash/command-chunks/chunk-5XY4DTNG.js +34 -0
  63. package/dist/safe-bash/command-chunks/chunk-5ZMZ573Q.js +140 -0
  64. package/dist/safe-bash/command-chunks/{chunk-2Q7UQ7R4.js → chunk-67IQF5GC.js} +200 -66
  65. package/dist/safe-bash/command-chunks/chunk-67QKREJK.js +347 -0
  66. package/dist/safe-bash/command-chunks/chunk-6EPHJGGF.js +23 -0
  67. package/dist/safe-bash/command-chunks/chunk-6F4XCVON.js +266 -0
  68. package/dist/safe-bash/command-chunks/{chunk-ESMCX3YV.js → chunk-6HMX4CQS.js} +669 -130
  69. package/dist/safe-bash/command-chunks/{chunk-RECJB2BO.js → chunk-7BS66BXN.js} +1 -1
  70. package/dist/safe-bash/command-chunks/{chunk-GRWOVSFK.js → chunk-7D7JRRML.js} +1 -1
  71. package/dist/safe-bash/command-chunks/chunk-7K6JYKPJ.js +422 -0
  72. package/dist/safe-bash/command-chunks/{chunk-E6IYUYVA.js → chunk-7L24L4UO.js} +2 -2
  73. package/dist/safe-bash/command-chunks/chunk-7N2LI2KO.js +206 -0
  74. package/dist/safe-bash/command-chunks/chunk-7RGB363W.js +362 -0
  75. package/dist/safe-bash/command-chunks/{chunk-HBXQWTJR.js → chunk-A5ZAV6DO.js} +1 -1
  76. package/dist/safe-bash/command-chunks/{chunk-LW34AKDM.js → chunk-AB4MXHVS.js} +4 -14
  77. package/dist/safe-bash/command-chunks/{pptx-GBPNWNEP-7EQEVXV5.js → chunk-AI5JAXQF.js} +34820 -18029
  78. package/dist/safe-bash/command-chunks/chunk-AMO3THU4.js +105 -0
  79. package/dist/safe-bash/command-chunks/{chunk-EELNLEEP.js → chunk-AXK3H4PX.js} +1 -1
  80. package/dist/safe-bash/command-chunks/{chunk-Y55OCH37.js → chunk-AYUTO323.js} +3 -10
  81. package/dist/safe-bash/command-chunks/{chunk-DY36FDDC.js → chunk-B5TAOCKD.js} +6 -6
  82. package/dist/safe-bash/command-chunks/chunk-BAGCY35S.js +231 -0
  83. package/dist/safe-bash/command-chunks/chunk-BAXU7B5Z.js +101 -0
  84. package/dist/safe-bash/command-chunks/{chunk-YB6KVU6H.js → chunk-BDBVVZY6.js} +4 -14
  85. package/dist/safe-bash/command-chunks/{chunk-2HOESGFJ.js → chunk-BKCNF5U3.js} +68 -7
  86. package/dist/safe-bash/command-chunks/chunk-BNOU5YQS.js +182 -0
  87. package/dist/safe-bash/command-chunks/{chunk-QAN7KKDZ.js → chunk-BZDDAPSV.js} +1 -1
  88. package/dist/safe-bash/command-chunks/{chunk-HZCPWYWA.js → chunk-BZPAWTUL.js} +1 -1
  89. package/dist/safe-bash/command-chunks/chunk-C7I25AAL.js +25 -0
  90. package/dist/safe-bash/command-chunks/chunk-CKXV2CLD.js +65 -0
  91. package/dist/safe-bash/command-chunks/{chunk-RT2J5ATD.js → chunk-CPPGTBZF.js} +1 -1
  92. package/dist/safe-bash/command-chunks/chunk-CQ5YGOGB.js +150 -0
  93. package/dist/safe-bash/command-chunks/{chunk-5UA3BEGA.js → chunk-D4OP2BR3.js} +72 -24
  94. package/dist/safe-bash/command-chunks/chunk-DB453IE6.js +122 -0
  95. package/dist/safe-bash/command-chunks/chunk-DOKKNRRM.js +87 -0
  96. package/dist/safe-bash/command-chunks/{chunk-2PX5B7T5.js → chunk-DQAVUDDX.js} +2 -2
  97. package/dist/safe-bash/command-chunks/chunk-DT7BCTWY.js +249 -0
  98. package/dist/safe-bash/command-chunks/chunk-E2LB7FRT.js +42 -0
  99. package/dist/safe-bash/command-chunks/chunk-EK6YNAXT.js +343 -0
  100. package/dist/safe-bash/command-chunks/chunk-EQ4HV54N.js +22 -0
  101. package/dist/safe-bash/command-chunks/chunk-ERYJLO6G.js +293 -0
  102. package/dist/safe-bash/command-chunks/{chunk-4ONEXMD3.js → chunk-EUSPTFAX.js} +1 -1
  103. package/dist/safe-bash/command-chunks/chunk-FKKB5X5V.js +97 -0
  104. package/dist/safe-bash/command-chunks/chunk-FXELCPFX.js +195 -0
  105. package/dist/safe-bash/command-chunks/{chunk-HLMUPSM6.js → chunk-GI4CJED2.js} +3 -2
  106. package/dist/safe-bash/command-chunks/{chunk-CU5RLO62.js → chunk-GLOZX57Y.js} +92 -18
  107. package/dist/safe-bash/command-chunks/chunk-GMIHJYDG.js +331 -0
  108. package/dist/safe-bash/command-chunks/chunk-H622NS6Z.js +11 -0
  109. package/dist/safe-bash/command-chunks/{chunk-QGVOS3EY.js → chunk-HFII3QYO.js} +1 -1
  110. package/dist/safe-bash/command-chunks/{chunk-5EWTQJSC.js → chunk-HHP343KT.js} +1 -1
  111. package/dist/safe-bash/command-chunks/{chunk-WBJKOTSP.js → chunk-HMOZ6XVJ.js} +1 -1
  112. package/dist/safe-bash/command-chunks/{chunk-AVSPNLWV.js → chunk-I237SNW5.js} +1 -1
  113. package/dist/safe-bash/command-chunks/{chunk-4MS5WZJC.js → chunk-IKS2YXZQ.js} +3 -3
  114. package/dist/safe-bash/command-chunks/{chunk-CZVBYCB5.js → chunk-IL53SJL4.js} +2 -12
  115. package/dist/safe-bash/command-chunks/{chunk-VZ64JXHC.js → chunk-IR2BY7EL.js} +21 -6
  116. package/dist/safe-bash/command-chunks/chunk-IYPAQ7PH.js +42 -0
  117. package/dist/safe-bash/command-chunks/chunk-JN7WIP6S.js +94 -0
  118. package/dist/safe-bash/command-chunks/chunk-JNZ3CVAE.js +147 -0
  119. package/dist/safe-bash/command-chunks/{chunk-HLBX5IRS.js → chunk-JQ74HC37.js} +24 -32
  120. package/dist/safe-bash/command-chunks/{chunk-2LLZBNLL.js → chunk-JWE54GHQ.js} +1 -1
  121. package/dist/safe-bash/command-chunks/{chunk-QLDIP3OP.js → chunk-JZSNU2MY.js} +2 -2
  122. package/dist/safe-bash/command-chunks/chunk-KFVV7ZJO.js +216 -0
  123. package/dist/safe-bash/command-chunks/{chunk-G4PNVO6Z.js → chunk-KP7AO66M.js} +1 -1
  124. package/dist/safe-bash/command-chunks/chunk-KWESKQHR.js +25 -0
  125. package/dist/safe-bash/command-chunks/chunk-KYSPGS33.js +41 -0
  126. package/dist/safe-bash/command-chunks/{chunk-C7IHMJEW.js → chunk-KZC5UWFF.js} +2 -2
  127. package/dist/safe-bash/command-chunks/chunk-L6DVEBW3.js +553 -0
  128. package/dist/safe-bash/command-chunks/chunk-LC2MFKT4.js +2489 -0
  129. package/dist/safe-bash/command-chunks/chunk-LE5LZNHE.js +204 -0
  130. package/dist/safe-bash/command-chunks/chunk-MDH5T4OS.js +41 -0
  131. package/dist/safe-bash/command-chunks/chunk-MM6HU6CX.js +20 -0
  132. package/dist/safe-bash/command-chunks/{chunk-MYJAZ3U2.js → chunk-MPL2466A.js} +2 -2
  133. package/dist/safe-bash/command-chunks/{chunk-3TANKHBX.js → chunk-MRW5HD2D.js} +1 -6
  134. package/dist/safe-bash/command-chunks/{chunk-3WKA57FA.js → chunk-N5FGCXQJ.js} +1 -9
  135. package/dist/safe-bash/command-chunks/{chunk-VZHRZMS7.js → chunk-NAY27PXB.js} +1 -1
  136. package/dist/safe-bash/command-chunks/chunk-NCD7PEWH.js +298 -0
  137. package/dist/safe-bash/command-chunks/chunk-NFGI5IGF.js +266 -0
  138. package/dist/safe-bash/command-chunks/{chunk-U3ONEICA.js → chunk-NXEQ3ESQ.js} +7 -11
  139. package/dist/safe-bash/command-chunks/{chunk-3VGGYEDH.js → chunk-ORYGZYKW.js} +4 -3
  140. package/dist/safe-bash/command-chunks/{chunk-OLQG7ZCN.js → chunk-PEF7K3UQ.js} +136 -75
  141. package/dist/safe-bash/command-chunks/{chunk-HVI6ALJF.js → chunk-PFAADCB5.js} +2 -4
  142. package/dist/safe-bash/command-chunks/chunk-PII4YEZW.js +123 -0
  143. package/dist/safe-bash/command-chunks/{chunk-JG5W2ENK.js → chunk-PJJUYO3R.js} +5 -5
  144. package/dist/safe-bash/command-chunks/{chunk-VKQCNX32.js → chunk-PTT3I223.js} +1 -1
  145. package/dist/safe-bash/command-chunks/chunk-Q3DII3Q7.js +174 -0
  146. package/dist/safe-bash/command-chunks/chunk-Q3EWDEUQ.js +185 -0
  147. package/dist/safe-bash/command-chunks/{chunk-JXU2N6GN.js → chunk-Q7Q5GM5S.js} +2 -2
  148. package/dist/safe-bash/command-chunks/{chunk-Z5TFSVNU.js → chunk-QAKKSRNV.js} +1 -1
  149. package/dist/safe-bash/command-chunks/{chunk-2FUAW6GO.js → chunk-QI7LGHJJ.js} +58 -9
  150. package/dist/safe-bash/command-chunks/{chunk-6BETHLXZ.js → chunk-QJAFJP2G.js} +1 -1
  151. package/dist/safe-bash/command-chunks/chunk-QNIMV57G.js +63 -0
  152. package/dist/safe-bash/command-chunks/{chunk-KAHH4XOU.js → chunk-QNXI2UP6.js} +1 -1
  153. package/dist/safe-bash/command-chunks/{chunk-AC6X7Q4I.js → chunk-QP4R6GLA.js} +6 -9
  154. package/dist/safe-bash/command-chunks/{chunk-LPORMIZS.js → chunk-QWIDNAAK.js} +8 -8
  155. package/dist/safe-bash/command-chunks/chunk-RVLO4DYT.js +35 -0
  156. package/dist/safe-bash/command-chunks/{chunk-X2YQLGKS.js → chunk-SAMH7SQE.js} +4 -4
  157. package/dist/safe-bash/command-chunks/chunk-SEM36PG5.js +11 -0
  158. package/dist/safe-bash/command-chunks/chunk-STC3LEWJ.js +634 -0
  159. package/dist/safe-bash/command-chunks/chunk-SVULUDOP.js +331 -0
  160. package/dist/safe-bash/command-chunks/{chunk-WYOL5JNT.js → chunk-SX2X3IH4.js} +4 -4
  161. package/dist/safe-bash/command-chunks/chunk-TEVJJPTC.js +1392 -0
  162. package/dist/safe-bash/command-chunks/{chunk-6N5V4VBN.js → chunk-TYCGMRLM.js} +2 -2
  163. package/dist/safe-bash/command-chunks/chunk-UG7SMZFF.js +178 -0
  164. package/dist/safe-bash/command-chunks/{chunk-PRCT7FKJ.js → chunk-UMDIOL3O.js} +3 -3
  165. package/dist/safe-bash/command-chunks/chunk-UXSR5BZH.js +136 -0
  166. package/dist/safe-bash/command-chunks/chunk-V6BEDRMQ.js +112 -0
  167. package/dist/safe-bash/command-chunks/chunk-V6MSPQLA.js +362 -0
  168. package/dist/safe-bash/command-chunks/{chunk-J4PEQWSF.js → chunk-VGG2DL5Q.js} +0 -1
  169. package/dist/safe-bash/command-chunks/{chunk-SG424QWS.js → chunk-VL67NWNS.js} +1 -1
  170. package/dist/safe-bash/command-chunks/chunk-WB5SVIG7.js +1034 -0
  171. package/dist/safe-bash/command-chunks/{src-UJOWAS2S.js → chunk-WD3ERGRY.js} +77 -277
  172. package/dist/safe-bash/command-chunks/{chunk-YFSDDFGV.js → chunk-WH627NJL.js} +446 -53
  173. package/dist/safe-bash/command-chunks/chunk-WNE7FPVR.js +236 -0
  174. package/dist/safe-bash/command-chunks/{chunk-UKS2XJZI.js → chunk-WPYIOKE3.js} +4 -4
  175. package/dist/safe-bash/command-chunks/chunk-XETLEHZP.js +1227 -0
  176. package/dist/safe-bash/command-chunks/chunk-XIIBTGC5.js +580 -0
  177. package/dist/safe-bash/command-chunks/chunk-XJXU3VVH.js +737 -0
  178. package/dist/safe-bash/command-chunks/{chunk-JCVXAX2G.js → chunk-XWZBMJ5B.js} +1 -1
  179. package/dist/safe-bash/command-chunks/chunk-Y5INTD6S.js +220 -0
  180. package/dist/safe-bash/command-chunks/{chunk-23XLM73P.js → chunk-YEOPI5SK.js} +1 -1
  181. package/dist/safe-bash/command-chunks/{chunk-PPOIPMY4.js → chunk-YGC6OS5O.js} +3 -56
  182. package/dist/safe-bash/command-chunks/chunk-YJDV76GL.js +262 -0
  183. package/dist/safe-bash/command-chunks/chunk-YOF7R4OY.js +80 -0
  184. package/dist/safe-bash/command-chunks/chunk-Z7RVSD5K.js +594 -0
  185. package/dist/safe-bash/command-chunks/chunk-ZHUWOUWB.js +618 -0
  186. package/dist/safe-bash/command-chunks/{chunk-OGUMMTTD.js → chunk-ZJBR5Q5I.js} +4 -4
  187. package/dist/safe-bash/command-chunks/{model-store-L35QTZMJ.js → model-store-WPKMRPV4.js} +2 -2
  188. package/dist/safe-bash/command-chunks/pptx-7G52EJ6L-4JACH5FB.js +625 -0
  189. package/dist/safe-bash/command-chunks/python-worker-source-TYOFJMCW.js +4 -0
  190. package/dist/safe-bash/command-chunks/src-ICMQISAA.js +501 -0
  191. package/dist/safe-bash/commands/archive/create.d.ts +1 -17
  192. package/dist/safe-bash/commands/archive/create.js +1 -252
  193. package/dist/safe-bash/commands/archive/extract.d.ts +1 -11
  194. package/dist/safe-bash/commands/archive/extract.js +1 -640
  195. package/dist/safe-bash/commands/archive/format.d.ts +1 -32
  196. package/dist/safe-bash/commands/archive/format.js +1 -225
  197. package/dist/safe-bash/commands/archive/index.d.ts +5 -10
  198. package/dist/safe-bash/commands/archive/index.js +6 -931
  199. package/dist/safe-bash/commands/archive/listing.d.ts +1 -2
  200. package/dist/safe-bash/commands/archive/listing.js +1 -21
  201. package/dist/safe-bash/commands/archive/modes.d.ts +1 -5
  202. package/dist/safe-bash/commands/archive/modes.js +1 -182
  203. package/dist/safe-bash/commands/archive/options.d.ts +1 -53
  204. package/dist/safe-bash/commands/archive/options.js +1 -462
  205. package/dist/safe-bash/commands/archive/stream.d.ts +1 -22
  206. package/dist/safe-bash/commands/archive/stream.js +1 -188
  207. package/dist/safe-bash/commands/archive/transform.d.ts +1 -16
  208. package/dist/safe-bash/commands/archive/transform.js +1 -85
  209. package/dist/safe-bash/commands/archive/unzip/arguments.d.ts +1 -53
  210. package/dist/safe-bash/commands/archive/unzip/arguments.js +1 -322
  211. package/dist/safe-bash/commands/archive/unzip/safety.d.ts +1 -32
  212. package/dist/safe-bash/commands/archive/unzip/safety.js +1 -295
  213. package/dist/safe-bash/commands/archive/unzip.d.ts +1 -3
  214. package/dist/safe-bash/commands/archive/unzip.js +1 -398
  215. package/dist/safe-bash/commands/archive/zip/aes.d.ts +1 -17
  216. package/dist/safe-bash/commands/archive/zip/aes.js +1 -156
  217. package/dist/safe-bash/commands/archive/zip/comments.d.ts +1 -17
  218. package/dist/safe-bash/commands/archive/zip/comments.js +1 -83
  219. package/dist/safe-bash/commands/archive/zip/crc.d.ts +1 -1
  220. package/dist/safe-bash/commands/archive/zip/crc.js +1 -1
  221. package/dist/safe-bash/commands/archive/zip/crypto.d.ts +1 -19
  222. package/dist/safe-bash/commands/archive/zip/crypto.js +1 -118
  223. package/dist/safe-bash/commands/archive/zip/dates.d.ts +1 -4
  224. package/dist/safe-bash/commands/archive/zip/dates.js +1 -66
  225. package/dist/safe-bash/commands/archive/zip/environment.d.ts +1 -2
  226. package/dist/safe-bash/commands/archive/zip/environment.js +1 -62
  227. package/dist/safe-bash/commands/archive/zip/grow.d.ts +1 -3
  228. package/dist/safe-bash/commands/archive/zip/grow.js +1 -2
  229. package/dist/safe-bash/commands/archive/zip/help.d.ts +1 -4
  230. package/dist/safe-bash/commands/archive/zip/help.js +1 -182
  231. package/dist/safe-bash/commands/archive/zip/line-endings.d.ts +1 -2
  232. package/dist/safe-bash/commands/archive/zip/line-endings.js +1 -194
  233. package/dist/safe-bash/commands/archive/zip/log.d.ts +1 -22
  234. package/dist/safe-bash/commands/archive/zip/log.js +1 -159
  235. package/dist/safe-bash/commands/archive/zip/lzma.d.ts +1 -9
  236. package/dist/safe-bash/commands/archive/zip/lzma.js +1 -40
  237. package/dist/safe-bash/commands/archive/zip/move.d.ts +1 -11
  238. package/dist/safe-bash/commands/archive/zip/move.js +1 -59
  239. package/dist/safe-bash/commands/archive/zip/names.d.ts +1 -2
  240. package/dist/safe-bash/commands/archive/zip/names.js +1 -33
  241. package/dist/safe-bash/commands/archive/zip/options.d.ts +1 -13
  242. package/dist/safe-bash/commands/archive/zip/options.js +1 -124
  243. package/dist/safe-bash/commands/archive/zip/repair.d.ts +1 -10
  244. package/dist/safe-bash/commands/archive/zip/repair.js +1 -392
  245. package/dist/safe-bash/commands/archive/zip/safety.d.ts +1 -54
  246. package/dist/safe-bash/commands/archive/zip/safety.js +1 -360
  247. package/dist/safe-bash/commands/archive/zip/sfx.d.ts +1 -4
  248. package/dist/safe-bash/commands/archive/zip/sfx.js +1 -52
  249. package/dist/safe-bash/commands/archive/zip/test-command.d.ts +1 -5
  250. package/dist/safe-bash/commands/archive/zip/test-command.js +1 -101
  251. package/dist/safe-bash/commands/archive/zip/volumes.d.ts +1 -21
  252. package/dist/safe-bash/commands/archive/zip/volumes.js +1 -281
  253. package/dist/safe-bash/commands/archive/zip/zip64.d.ts +1 -30
  254. package/dist/safe-bash/commands/archive/zip/zip64.js +1 -227
  255. package/dist/safe-bash/commands/archive/zip-format.d.ts +1 -68
  256. package/dist/safe-bash/commands/archive/zip-format.js +1 -1075
  257. package/dist/safe-bash/commands/archive/zip.d.ts +1 -3
  258. package/dist/safe-bash/commands/archive/zip.js +1 -1523
  259. package/dist/safe-bash/commands/awk/index.d.ts +2 -0
  260. package/dist/safe-bash/commands/awk/index.js +2 -0
  261. package/dist/safe-bash/commands/bytes/compression/index.js +2 -1
  262. package/dist/safe-bash/commands/curl/index.d.ts +2 -0
  263. package/dist/safe-bash/commands/curl/index.js +2 -0
  264. package/dist/safe-bash/commands/diff/index.d.ts +2 -0
  265. package/dist/safe-bash/commands/diff/index.js +2 -0
  266. package/dist/safe-bash/commands/diff-patch/diff-format.d.ts +1 -10
  267. package/dist/safe-bash/commands/diff-patch/diff-format.js +1 -237
  268. package/dist/safe-bash/commands/diff-patch/diff-options.d.ts +1 -38
  269. package/dist/safe-bash/commands/diff-patch/diff-options.js +1 -261
  270. package/dist/safe-bash/commands/diff-patch/diff-output.d.ts +1 -20
  271. package/dist/safe-bash/commands/diff-patch/diff-output.js +1 -290
  272. package/dist/safe-bash/commands/diff-patch/diff.d.ts +1 -2
  273. package/dist/safe-bash/commands/diff-patch/diff.js +1 -656
  274. package/dist/safe-bash/commands/diff-patch/index.d.ts +4 -5
  275. package/dist/safe-bash/commands/diff-patch/index.js +8 -333
  276. package/dist/safe-bash/commands/diff-patch/patch-envelope.d.ts +1 -2
  277. package/dist/safe-bash/commands/diff-patch/patch-envelope.js +1 -63
  278. package/dist/safe-bash/commands/diff-patch/patch-formats.d.ts +1 -7
  279. package/dist/safe-bash/commands/diff-patch/patch-formats.js +1 -264
  280. package/dist/safe-bash/commands/diff-patch/patch-gnu-paths.d.ts +1 -41
  281. package/dist/safe-bash/commands/diff-patch/patch-gnu-paths.js +1 -263
  282. package/dist/safe-bash/commands/diff-patch/patch-gnu-reject.d.ts +1 -3
  283. package/dist/safe-bash/commands/diff-patch/patch-gnu-reject.js +1 -100
  284. package/dist/safe-bash/commands/diff-patch/patch-path.d.ts +1 -3
  285. package/dist/safe-bash/commands/diff-patch/patch-path.js +1 -91
  286. package/dist/safe-bash/commands/diff-patch/patch-publication.d.ts +1 -13
  287. package/dist/safe-bash/commands/diff-patch/patch-publication.js +1 -107
  288. package/dist/safe-bash/commands/diff-patch/patch.d.ts +1 -2
  289. package/dist/safe-bash/commands/diff-patch/patch.js +1 -653
  290. package/dist/safe-bash/commands/diff-patch/shared.d.ts +1 -55
  291. package/dist/safe-bash/commands/diff-patch/shared.js +1 -276
  292. package/dist/safe-bash/commands/diff-patch/unified.d.ts +1 -52
  293. package/dist/safe-bash/commands/diff-patch/unified.js +1 -385
  294. package/dist/safe-bash/commands/directory-admission.d.ts +1 -3
  295. package/dist/safe-bash/commands/directory-admission.js +1 -26
  296. package/dist/safe-bash/commands/find/index.d.ts +2 -0
  297. package/dist/safe-bash/commands/find/index.js +2 -0
  298. package/dist/safe-bash/commands/find-format.d.ts +1 -20
  299. package/dist/safe-bash/commands/find-format.js +1 -161
  300. package/dist/safe-bash/commands/find.d.ts +2 -18
  301. package/dist/safe-bash/commands/find.js +2 -1236
  302. package/dist/safe-bash/commands/gzip/index.d.ts +2 -0
  303. package/dist/safe-bash/commands/gzip/index.js +2 -0
  304. package/dist/safe-bash/commands/line-endings/index.browser.js +1 -1
  305. package/dist/safe-bash/commands/line-endings/index.d.ts +1 -1
  306. package/dist/safe-bash/commands/line-endings/index.js +1 -262
  307. package/dist/safe-bash/commands/llm/index.browser.js +3 -1
  308. package/dist/safe-bash/commands/mdq/index.browser.js +2 -2
  309. package/dist/safe-bash/commands/metadata/chmod.d.ts +1 -4
  310. package/dist/safe-bash/commands/metadata/chmod.js +2 -63
  311. package/dist/safe-bash/commands/network/aggregate.d.ts +1 -4
  312. package/dist/safe-bash/commands/network/aggregate.js +1 -23
  313. package/dist/safe-bash/commands/network/args.d.ts +1 -68
  314. package/dist/safe-bash/commands/network/args.js +1 -321
  315. package/dist/safe-bash/commands/network/authorizer.d.ts +1 -6
  316. package/dist/safe-bash/commands/network/authorizer.js +1 -33
  317. package/dist/safe-bash/commands/network/body.d.ts +1 -9
  318. package/dist/safe-bash/commands/network/body.js +1 -393
  319. package/dist/safe-bash/commands/network/curl.d.ts +3 -13
  320. package/dist/safe-bash/commands/network/curl.js +6 -693
  321. package/dist/safe-bash/commands/network/deadline.d.ts +1 -2
  322. package/dist/safe-bash/commands/network/deadline.js +1 -14
  323. package/dist/safe-bash/commands/network/decode.d.ts +1 -2
  324. package/dist/safe-bash/commands/network/decode.js +1 -79
  325. package/dist/safe-bash/commands/network/fetch-transport.d.ts +1 -7
  326. package/dist/safe-bash/commands/network/fetch-transport.js +1 -94
  327. package/dist/safe-bash/commands/network/form-content-type.d.ts +1 -5
  328. package/dist/safe-bash/commands/network/form-content-type.js +1 -63
  329. package/dist/safe-bash/commands/network/form-headers.d.ts +1 -2
  330. package/dist/safe-bash/commands/network/form-headers.js +1 -35
  331. package/dist/safe-bash/commands/network/glob.d.ts +1 -7
  332. package/dist/safe-bash/commands/network/glob.js +1 -134
  333. package/dist/safe-bash/commands/network/index.browser.js +2 -10
  334. package/dist/safe-bash/commands/network/input.d.ts +1 -5
  335. package/dist/safe-bash/commands/network/input.js +1 -276
  336. package/dist/safe-bash/commands/network/output.d.ts +1 -6
  337. package/dist/safe-bash/commands/network/output.js +1 -131
  338. package/dist/safe-bash/commands/network/private-address.d.ts +1 -1
  339. package/dist/safe-bash/commands/network/private-address.js +1 -44
  340. package/dist/safe-bash/commands/network/shared.d.ts +1 -14
  341. package/dist/safe-bash/commands/network/shared.js +1 -71
  342. package/dist/safe-bash/commands/network/types.d.ts +1 -37
  343. package/dist/safe-bash/commands/network/types.js +1 -31
  344. package/dist/safe-bash/commands/network/url.d.ts +1 -2
  345. package/dist/safe-bash/commands/network/url.js +1 -30
  346. package/dist/safe-bash/commands/network/wget.d.ts +3 -3
  347. package/dist/safe-bash/commands/network/wget.js +10 -331
  348. package/dist/safe-bash/commands/node/index.browser.js +4 -5
  349. package/dist/safe-bash/commands/node/index.d.ts +3 -3
  350. package/dist/safe-bash/commands/node/index.js +5 -0
  351. package/dist/safe-bash/commands/node/safejs.d.ts +3 -3
  352. package/dist/safe-bash/commands/node/safejs.js +6 -1
  353. package/dist/safe-bash/commands/node/types.d.ts +1 -1
  354. package/dist/safe-bash/commands/node/unconfigured.d.ts +3 -0
  355. package/dist/safe-bash/commands/node/unconfigured.js +10 -0
  356. package/dist/safe-bash/commands/op/index.browser.js +2 -2
  357. package/dist/safe-bash/commands/patch/index.d.ts +2 -0
  358. package/dist/safe-bash/commands/patch/index.js +2 -0
  359. package/dist/safe-bash/commands/pdfinfo/index.js +2 -1
  360. package/dist/safe-bash/commands/predicates.js +3 -4
  361. package/dist/safe-bash/commands/python/index.browser.js +5 -5
  362. package/dist/safe-bash/commands/python/llm-capability.d.ts +1 -0
  363. package/dist/safe-bash/commands/python/llm-capability.js +27 -7
  364. package/dist/safe-bash/commands/python/llm-module.js +11 -0
  365. package/dist/safe-bash/commands/python/manifest.d.ts +1 -0
  366. package/dist/safe-bash/commands/python/manifest.js +9 -5
  367. package/dist/safe-bash/commands/python/provisioning.js +1 -1
  368. package/dist/safe-bash/commands/regex-execution/matching.js +1 -2
  369. package/dist/safe-bash/commands/regex-execution/public.browser.js +5 -5
  370. package/dist/safe-bash/commands/search/index.d.ts +1 -1
  371. package/dist/safe-bash/commands/search/index.js +1 -347
  372. package/dist/safe-bash/commands/search/portable.d.ts +2 -2
  373. package/dist/safe-bash/commands/search/portable.js +3 -2
  374. package/dist/safe-bash/commands/sed/index.d.ts +2 -0
  375. package/dist/safe-bash/commands/sed/index.js +2 -0
  376. package/dist/safe-bash/commands/tar/index.d.ts +2 -0
  377. package/dist/safe-bash/commands/tar/index.js +2 -0
  378. package/dist/safe-bash/commands/text-programs/awk-inspection.d.ts +1 -19
  379. package/dist/safe-bash/commands/text-programs/awk-inspection.js +1 -50
  380. package/dist/safe-bash/commands/text-programs/awk-pipes.d.ts +2 -0
  381. package/dist/safe-bash/commands/text-programs/awk-pipes.js +2 -0
  382. package/dist/safe-bash/commands/text-programs/awk-pretty.d.ts +1 -3
  383. package/dist/safe-bash/commands/text-programs/awk-pretty.js +1 -197
  384. package/dist/safe-bash/commands/text-programs/awk-quote.d.ts +1 -2
  385. package/dist/safe-bash/commands/text-programs/awk-quote.js +1 -15
  386. package/dist/safe-bash/commands/text-programs/awk-reader.d.ts +1 -42
  387. package/dist/safe-bash/commands/text-programs/awk-reader.js +1 -449
  388. package/dist/safe-bash/commands/text-programs/awk-retention.d.ts +1 -13
  389. package/dist/safe-bash/commands/text-programs/awk-retention.js +1 -51
  390. package/dist/safe-bash/commands/text-programs/awk-runtime.d.ts +1 -150
  391. package/dist/safe-bash/commands/text-programs/awk-runtime.js +1 -2627
  392. package/dist/safe-bash/commands/text-programs/awk-syntax.d.ts +1 -142
  393. package/dist/safe-bash/commands/text-programs/awk-syntax.js +1 -509
  394. package/dist/safe-bash/commands/text-programs/awk-values.d.ts +1 -32
  395. package/dist/safe-bash/commands/text-programs/awk-values.js +1 -386
  396. package/dist/safe-bash/commands/text-programs/awk.d.ts +1 -3
  397. package/dist/safe-bash/commands/text-programs/awk.js +1 -361
  398. package/dist/safe-bash/commands/text-programs/inplace.d.ts +1 -16
  399. package/dist/safe-bash/commands/text-programs/inplace.js +1 -155
  400. package/dist/safe-bash/commands/text-programs/sed.d.ts +1 -3
  401. package/dist/safe-bash/commands/text-programs/sed.js +1 -1647
  402. package/dist/safe-bash/commands/text.js +1 -25
  403. package/dist/safe-bash/commands/unzip/index.d.ts +2 -0
  404. package/dist/safe-bash/commands/unzip/index.js +2 -0
  405. package/dist/safe-bash/commands/wget/index.d.ts +2 -0
  406. package/dist/safe-bash/commands/wget/index.js +2 -0
  407. package/dist/safe-bash/commands/yq/index.browser.js +7 -2
  408. package/dist/safe-bash/commands/yq/index.d.ts +1 -6
  409. package/dist/safe-bash/commands/yq/index.js +1 -36
  410. package/dist/safe-bash/commands/zip/index.d.ts +2 -0
  411. package/dist/safe-bash/commands/zip/index.js +2 -0
  412. package/dist/safe-bash/core.browser.js +1 -1
  413. package/dist/safe-bash/core.d.ts +8 -1
  414. package/dist/safe-bash/core.js +7 -1
  415. package/dist/safe-bash/fs/s3/index.d.ts +2 -2
  416. package/dist/safe-bash/fs/s3/index.js +1 -1
  417. package/dist/safe-bash/full-core.browser.js +254 -223
  418. package/dist/safe-bash/jobs.browser.js +2 -2
  419. package/dist/safe-bash/lazy-mmdc.d.ts +6 -0
  420. package/dist/safe-bash/lazy-mmdc.js +23 -0
  421. package/dist/safe-bash/opt-in/commands/dd/index.js +4 -13
  422. package/dist/safe-bash/opt-in/commands/yq/mike.js +6 -13
  423. package/dist/safe-bash/opt-in/commands/yq/native-work.d.ts +1 -0
  424. package/dist/safe-bash/opt-in/commands/yq/native-work.js +19 -1
  425. package/dist/safe-bash/opt-in/optional/commands/shuf/input.js +3 -21
  426. package/dist/safe-bash/opt-in/optional/commands/shuf/shuf.js +4 -27
  427. package/dist/safe-bash/optional-host.browser.js +8 -4
  428. package/dist/safe-bash/optional-host.d.ts +1 -1
  429. package/dist/safe-bash/optional-host.js +1 -1
  430. package/dist/safe-bash/playwright/ability-execution.js +3 -2
  431. package/dist/safe-bash/playwright/adapter.js +1 -1
  432. package/dist/safe-bash/playwright/controller.js +9 -8
  433. package/dist/safe-bash/playwright/modal-capabilities.js +2 -1
  434. package/dist/safe-bash/playwright/native-json-snapshot.js +4 -3
  435. package/dist/safe-bash/playwright/native-snapshot.js +5 -4
  436. package/dist/safe-bash/playwright/open-options.js +3 -3
  437. package/dist/safe-bash/playwright/resource-limit.d.ts +2 -0
  438. package/dist/safe-bash/playwright/resource-limit.js +4 -0
  439. package/dist/safe-bash/playwright/session-configuration.js +8 -3
  440. package/dist/safe-bash/playwright/snapshot.js +8 -7
  441. package/dist/safe-bash/playwright/standard-capabilities.js +5 -4
  442. package/dist/safe-bash/plugins/index.browser.js +14 -16
  443. package/dist/safe-bash/registry-entry.browser.js +14 -16
  444. package/dist/safe-bash/shell/arrays/bindings.d.ts +3 -5
  445. package/dist/safe-bash/shell/arrays/bindings.js +6 -2
  446. package/dist/safe-bash/shell/input.js +16 -14
  447. package/dist/safe-bash/shell/runtime.d.ts +3 -0
  448. package/dist/safe-bash/shell/runtime.js +316 -64
  449. package/dist/safe-bash/shell/types.d.ts +2 -0
  450. package/dist/safe-bash/shell/value-state.js +17 -2
  451. package/dist/safe-bash/shell/worker-limits.js +1 -0
  452. package/dist/safe-bash/shell-entry.browser.js +13 -15
  453. package/dist/safe-bash/trap.browser.d.ts +3 -0
  454. package/dist/safe-bash/trap.browser.js +14 -0
  455. package/dist/safe-bash/worker/host.js +1 -1
  456. package/dist/safe-bash-command-apply-patch/apply.js +2 -2
  457. package/dist/safe-bash-command-apply-patch/index.js +3 -3
  458. package/dist/safe-bash-command-awk/LICENSE +21 -0
  459. package/dist/safe-bash-command-awk/awk-inspection.d.ts +19 -0
  460. package/dist/safe-bash-command-awk/awk-inspection.js +9 -0
  461. package/dist/safe-bash-command-awk/awk-pipes.d.ts +19 -0
  462. package/dist/safe-bash-command-awk/awk-pipes.js +8 -0
  463. package/dist/safe-bash-command-awk/awk-pretty.d.ts +3 -0
  464. package/dist/safe-bash-command-awk/awk-pretty.js +8 -0
  465. package/dist/safe-bash-command-awk/awk-quote.d.ts +2 -0
  466. package/dist/safe-bash-command-awk/awk-quote.js +7 -0
  467. package/dist/safe-bash-command-awk/awk-reader.d.ts +42 -0
  468. package/dist/safe-bash-command-awk/awk-reader.js +9 -0
  469. package/dist/safe-bash-command-awk/awk-retention.d.ts +13 -0
  470. package/dist/safe-bash-command-awk/awk-retention.js +7 -0
  471. package/dist/safe-bash-command-awk/awk-runtime.d.ts +151 -0
  472. package/dist/safe-bash-command-awk/awk-runtime.js +11 -0
  473. package/dist/safe-bash-command-awk/awk-syntax.d.ts +144 -0
  474. package/dist/safe-bash-command-awk/awk-syntax.js +14 -0
  475. package/dist/safe-bash-command-awk/awk-values.d.ts +32 -0
  476. package/dist/safe-bash-command-awk/awk-values.js +35 -0
  477. package/dist/safe-bash-command-awk/awk.d.ts +3 -0
  478. package/dist/safe-bash-command-awk/awk.js +16 -0
  479. package/dist/safe-bash-command-awk/index.d.ts +7 -0
  480. package/dist/safe-bash-command-awk/index.js +36 -0
  481. package/dist/safe-bash-command-bc/index.d.ts +4 -0
  482. package/dist/safe-bash-command-bc/index.js +15 -176
  483. package/dist/safe-bash-command-column/column.js +3 -3
  484. package/dist/safe-bash-command-column/index.js +3 -3
  485. package/dist/safe-bash-command-column/layout.js +2 -2
  486. package/dist/safe-bash-command-csplit/command.js +2 -2
  487. package/dist/safe-bash-command-csplit/index.js +2 -2
  488. package/dist/safe-bash-command-csvkit/contracts.d.ts +1 -0
  489. package/dist/safe-bash-command-csvkit/csvpy-interpreter.d.ts +2 -1
  490. package/dist/safe-bash-command-csvkit/default-csvpy.d.ts +11 -0
  491. package/dist/safe-bash-command-csvkit/errors.js +22 -0
  492. package/dist/safe-bash-command-csvkit/index.d.ts +1 -0
  493. package/dist/safe-bash-command-csvkit/index.js +172 -4
  494. package/dist/safe-bash-command-csvkit/python-worker-browser.d.ts +3 -0
  495. package/dist/safe-bash-command-csvkit/python-worker-browser.js +16 -0
  496. package/dist/safe-bash-command-csvkit/python-worker-contract.d.ts +20 -0
  497. package/dist/safe-bash-command-csvkit/python-worker-node.d.ts +3 -0
  498. package/dist/safe-bash-command-csvkit/python-worker-node.js +9 -0
  499. package/dist/safe-bash-command-csvkit/runtime.d.ts +1 -0
  500. package/dist/safe-bash-command-curl/LICENSE +21 -0
  501. package/dist/safe-bash-command-curl/curl.d.ts +13 -0
  502. package/dist/safe-bash-command-curl/curl.js +9 -0
  503. package/dist/safe-bash-command-curl/index.d.ts +6 -0
  504. package/dist/safe-bash-command-curl/index.js +26 -0
  505. package/dist/safe-bash-command-dd/index.js +4 -13
  506. package/dist/safe-bash-command-diff/LICENSE +21 -0
  507. package/dist/safe-bash-command-diff/diff-format.d.ts +10 -0
  508. package/dist/safe-bash-command-diff/diff-format.js +10 -0
  509. package/dist/safe-bash-command-diff/diff-options.d.ts +38 -0
  510. package/dist/safe-bash-command-diff/diff-options.js +7 -0
  511. package/dist/safe-bash-command-diff/diff-output.d.ts +20 -0
  512. package/dist/safe-bash-command-diff/diff-output.js +19 -0
  513. package/dist/safe-bash-command-diff/diff.d.ts +2 -0
  514. package/dist/safe-bash-command-diff/diff.js +10 -0
  515. package/dist/safe-bash-command-diff/index.d.ts +8 -0
  516. package/dist/safe-bash-command-diff/index.js +34 -0
  517. package/dist/safe-bash-command-diff/sync.d.ts +2 -0
  518. package/dist/safe-bash-command-diff/sync.js +9 -0
  519. package/dist/safe-bash-command-diff3/index.js +5 -5
  520. package/dist/safe-bash-command-docx/index.d.ts +4 -4
  521. package/dist/safe-bash-command-docx/index.js +12 -5
  522. package/dist/safe-bash-command-dos2unix/index.d.ts +1 -0
  523. package/dist/safe-bash-command-dos2unix/index.js +225 -1
  524. package/dist/safe-bash-command-dos2unix/sync.d.ts +1 -0
  525. package/dist/safe-bash-command-du/budget.d.ts +0 -2
  526. package/dist/safe-bash-command-du/budget.js +1 -1
  527. package/dist/safe-bash-command-du/du.js +2 -2
  528. package/dist/safe-bash-command-du/index.js +2 -2
  529. package/dist/safe-bash-command-exiftool/index.js +2 -2
  530. package/dist/safe-bash-command-factor/command.js +2 -2
  531. package/dist/safe-bash-command-factor/index.js +2 -2
  532. package/dist/safe-bash-command-ffmpeg/index.js +86 -94
  533. package/dist/safe-bash-command-file/index.js +4 -4
  534. package/dist/safe-bash-command-file/shared.d.ts +0 -2
  535. package/dist/safe-bash-command-file/shared.js +1 -1
  536. package/dist/safe-bash-command-find/LICENSE +21 -0
  537. package/dist/safe-bash-command-find/find-format.d.ts +20 -0
  538. package/dist/safe-bash-command-find/find-format.js +9 -0
  539. package/dist/safe-bash-command-find/find.d.ts +18 -0
  540. package/dist/safe-bash-command-find/find.js +10 -0
  541. package/dist/safe-bash-command-find/index.d.ts +13 -0
  542. package/dist/safe-bash-command-find/index.js +45 -0
  543. package/dist/safe-bash-command-fmt/index.js +10 -19
  544. package/dist/safe-bash-command-git/git_rust.wasm +0 -0
  545. package/dist/safe-bash-command-git/index.js +5 -7
  546. package/dist/safe-bash-command-git/wasm.generated.js +1 -1
  547. package/dist/safe-bash-command-gzip/LICENSE +21 -0
  548. package/dist/safe-bash-command-gzip/index.d.ts +11 -0
  549. package/dist/safe-bash-command-gzip/index.js +94 -0
  550. package/dist/safe-bash-command-html-to-markdown/budget.d.ts +0 -3
  551. package/dist/safe-bash-command-html-to-markdown/budget.js +1 -1
  552. package/dist/safe-bash-command-html-to-markdown/entities.js +3 -3
  553. package/dist/safe-bash-command-html-to-markdown/index.js +11 -11
  554. package/dist/safe-bash-command-html-to-markdown/input.js +5 -5
  555. package/dist/safe-bash-command-html-to-markdown/parser.js +4 -4
  556. package/dist/safe-bash-command-html-to-markdown/render.js +5 -5
  557. package/dist/safe-bash-command-html-to-markdown/text.js +2 -2
  558. package/dist/safe-bash-command-htmlq/index.js +12 -8
  559. package/dist/safe-bash-command-iconv/command.js +5 -5
  560. package/dist/safe-bash-command-iconv/index.js +5 -5
  561. package/dist/safe-bash-command-iconv/internal.d.ts +0 -2
  562. package/dist/safe-bash-command-iconv/internal.js +1 -1
  563. package/dist/safe-bash-command-iconv/lifecycle.js +2 -2
  564. package/dist/safe-bash-command-iconv/options.js +2 -2
  565. package/dist/safe-bash-command-iconv/reader.js +2 -2
  566. package/dist/safe-bash-command-imagemagick/index.js +22 -30
  567. package/dist/safe-bash-command-jq/index.js +1 -1
  568. package/dist/safe-bash-command-jq/jq.js +1 -1
  569. package/dist/safe-bash-command-llm/command.js +1 -1
  570. package/dist/safe-bash-command-llm/index.d.ts +1 -0
  571. package/dist/safe-bash-command-llm/index.js +16 -14
  572. package/dist/safe-bash-command-llm/openai.js +3 -3
  573. package/dist/safe-bash-command-llm/providers/index.js +3 -3
  574. package/dist/safe-bash-command-llm/providers/openai.js +3 -3
  575. package/dist/safe-bash-command-llm/stored-schema.d.ts +10 -0
  576. package/dist/safe-bash-command-mmdc/index.js +13 -604
  577. package/dist/safe-bash-command-mmdc/settings.d.ts +2 -0
  578. package/dist/safe-bash-command-mmdc/settings.js +7 -0
  579. package/dist/safe-bash-command-numfmt/index.js +4 -18
  580. package/dist/safe-bash-command-pandoc/command.js +4 -3
  581. package/dist/safe-bash-command-pandoc/defaults.d.ts +1 -0
  582. package/dist/safe-bash-command-pandoc/index.js +4 -3
  583. package/dist/safe-bash-command-pandoc/lua-filters.js +1 -1
  584. package/dist/safe-bash-command-pandoc/types.d.ts +3 -1
  585. package/dist/safe-bash-command-patch/LICENSE +21 -0
  586. package/dist/safe-bash-command-patch/index.d.ts +8 -0
  587. package/dist/safe-bash-command-patch/index.js +38 -0
  588. package/dist/safe-bash-command-patch/patch-envelope.d.ts +2 -0
  589. package/dist/safe-bash-command-patch/patch-envelope.js +7 -0
  590. package/dist/safe-bash-command-patch/patch-formats.d.ts +7 -0
  591. package/dist/safe-bash-command-patch/patch-formats.js +9 -0
  592. package/dist/safe-bash-command-patch/patch-gnu-paths.d.ts +41 -0
  593. package/dist/safe-bash-command-patch/patch-gnu-paths.js +26 -0
  594. package/dist/safe-bash-command-patch/patch-gnu-reject.d.ts +3 -0
  595. package/dist/safe-bash-command-patch/patch-gnu-reject.js +7 -0
  596. package/dist/safe-bash-command-patch/patch-path.d.ts +3 -0
  597. package/dist/safe-bash-command-patch/patch-path.js +11 -0
  598. package/dist/safe-bash-command-patch/patch-publication.d.ts +13 -0
  599. package/dist/safe-bash-command-patch/patch-publication.js +7 -0
  600. package/dist/safe-bash-command-patch/patch.d.ts +2 -0
  601. package/dist/safe-bash-command-patch/patch.js +14 -0
  602. package/dist/safe-bash-command-patch/sync.d.ts +2 -0
  603. package/dist/safe-bash-command-patch/sync.js +7 -0
  604. package/dist/safe-bash-command-patch/unified.d.ts +52 -0
  605. package/dist/safe-bash-command-patch/unified.js +16 -0
  606. package/dist/safe-bash-command-pdfimages/index.js +37 -16
  607. package/dist/safe-bash-command-pdfinfo/index.d.ts +0 -23
  608. package/dist/safe-bash-command-pdfinfo/index.js +20 -772
  609. package/dist/safe-bash-command-pdftk/index.js +37 -9
  610. package/dist/safe-bash-command-pdftoppm/index.js +50 -20
  611. package/dist/safe-bash-command-pdftotext/index.js +10 -2
  612. package/dist/safe-bash-command-pptx/index.d.ts +4 -4
  613. package/dist/safe-bash-command-pptx/index.js +11 -5
  614. package/dist/safe-bash-command-pr/command.js +5 -5
  615. package/dist/safe-bash-command-pr/format.js +2 -2
  616. package/dist/safe-bash-command-pr/index.js +7 -7
  617. package/dist/safe-bash-command-pr/internal.d.ts +0 -2
  618. package/dist/safe-bash-command-pr/internal.js +1 -1
  619. package/dist/safe-bash-command-pr/io.js +2 -2
  620. package/dist/safe-bash-command-pr/options.js +2 -2
  621. package/dist/safe-bash-command-qpdf/index.js +26 -13
  622. package/dist/safe-bash-command-rg/index.d.ts +1 -0
  623. package/dist/safe-bash-command-rg/index.js +222 -1
  624. package/dist/safe-bash-command-rg/rg-command.js +1 -1
  625. package/dist/safe-bash-command-rg/sync.d.ts +1 -0
  626. package/dist/safe-bash-command-sed/LICENSE +21 -0
  627. package/dist/safe-bash-command-sed/index.d.ts +7 -0
  628. package/dist/safe-bash-command-sed/index.js +28 -0
  629. package/dist/safe-bash-command-sed/inplace.d.ts +16 -0
  630. package/dist/safe-bash-command-sed/inplace.js +9 -0
  631. package/dist/safe-bash-command-sed/sed.d.ts +3 -0
  632. package/dist/safe-bash-command-sed/sed.js +8 -0
  633. package/dist/safe-bash-command-shuf/input.js +3 -21
  634. package/dist/safe-bash-command-shuf/shuf.js +4 -27
  635. package/dist/safe-bash-command-sips/index.js +111 -35
  636. package/dist/safe-bash-command-soffice/index.js +4 -4
  637. package/dist/safe-bash-command-split/index.js +3 -3
  638. package/dist/safe-bash-command-split/io.d.ts +0 -2
  639. package/dist/safe-bash-command-split/io.js +1 -1
  640. package/dist/safe-bash-command-split/outputs.js +2 -2
  641. package/dist/safe-bash-command-split/split.js +3 -3
  642. package/dist/safe-bash-command-sqlite3/engine.d.ts +1 -2
  643. package/dist/safe-bash-command-sqlite3/index.js +152 -452
  644. package/dist/safe-bash-command-ssconvert/commands.js +1 -1
  645. package/dist/safe-bash-command-ssconvert/formats/ods.js +2 -2
  646. package/dist/safe-bash-command-ssconvert/formats/xlsx.js +3 -3
  647. package/dist/safe-bash-command-ssconvert/index.js +5 -5
  648. package/dist/safe-bash-command-tar/LICENSE +21 -0
  649. package/dist/safe-bash-command-tar/create.d.ts +17 -0
  650. package/dist/safe-bash-command-tar/create.js +14 -0
  651. package/dist/safe-bash-command-tar/extract.d.ts +11 -0
  652. package/dist/safe-bash-command-tar/extract.js +14 -0
  653. package/dist/safe-bash-command-tar/format.d.ts +32 -0
  654. package/dist/safe-bash-command-tar/format.js +19 -0
  655. package/dist/safe-bash-command-tar/index.d.ts +8 -0
  656. package/dist/safe-bash-command-tar/index.js +550 -0
  657. package/dist/safe-bash-command-tar/listing.d.ts +2 -0
  658. package/dist/safe-bash-command-tar/listing.js +7 -0
  659. package/dist/safe-bash-command-tar/modes.d.ts +5 -0
  660. package/dist/safe-bash-command-tar/modes.js +16 -0
  661. package/dist/safe-bash-command-tar/options.d.ts +53 -0
  662. package/dist/safe-bash-command-tar/options.js +10 -0
  663. package/dist/safe-bash-command-tar/stream.d.ts +22 -0
  664. package/dist/safe-bash-command-tar/stream.js +15 -0
  665. package/dist/safe-bash-command-tar/transform.d.ts +16 -0
  666. package/dist/safe-bash-command-tar/transform.js +9 -0
  667. package/dist/safe-bash-command-tree/arguments.js +3 -3
  668. package/dist/safe-bash-command-tree/charset.js +1 -1
  669. package/dist/safe-bash-command-tree/index.js +4 -4
  670. package/dist/safe-bash-command-tree/io.d.ts +0 -1
  671. package/dist/safe-bash-command-tree/io.js +1 -1
  672. package/dist/safe-bash-command-tree/pattern.js +2 -2
  673. package/dist/safe-bash-command-tree/tree.js +4 -4
  674. package/dist/safe-bash-command-tsort/command.js +4 -4
  675. package/dist/safe-bash-command-tsort/graph.js +2 -2
  676. package/dist/safe-bash-command-tsort/index.js +4 -4
  677. package/dist/safe-bash-command-tsort/internal.d.ts +0 -2
  678. package/dist/safe-bash-command-tsort/internal.js +1 -1
  679. package/dist/safe-bash-command-tsort/io.js +2 -2
  680. package/dist/safe-bash-command-unzip/LICENSE +21 -0
  681. package/dist/safe-bash-command-unzip/index.d.ts +7 -0
  682. package/dist/safe-bash-command-unzip/index.js +39 -0
  683. package/dist/safe-bash-command-unzip/sync.d.ts +3 -0
  684. package/dist/safe-bash-command-unzip/sync.js +9 -0
  685. package/dist/safe-bash-command-unzip/unzip/safety.d.ts +32 -0
  686. package/dist/safe-bash-command-unzip/unzip/safety.js +7 -0
  687. package/dist/safe-bash-command-unzip/unzip.d.ts +3 -0
  688. package/dist/safe-bash-command-unzip/unzip.js +8 -0
  689. package/dist/safe-bash-command-wget/LICENSE +21 -0
  690. package/dist/safe-bash-command-wget/index.d.ts +6 -0
  691. package/dist/safe-bash-command-wget/index.js +26 -0
  692. package/dist/safe-bash-command-wget/wget.d.ts +3 -0
  693. package/dist/safe-bash-command-wget/wget.js +7 -0
  694. package/dist/safe-bash-command-xan/argv.d.ts +4 -1
  695. package/dist/safe-bash-command-xan/argv.js +1 -1
  696. package/dist/safe-bash-command-xan/commands.js +4 -3
  697. package/dist/safe-bash-command-xan/index.js +15 -14
  698. package/dist/safe-bash-command-xan/io.js +2 -2
  699. package/dist/safe-bash-command-xmllint/index.js +189 -49
  700. package/dist/safe-bash-command-xz/index.js +3 -2
  701. package/dist/safe-bash-command-xz/options.d.ts +9 -1
  702. package/dist/safe-bash-command-xz/options.js +3 -1
  703. package/dist/safe-bash-command-yq/index.d.ts +4 -11
  704. package/dist/safe-bash-command-yq/index.js +3367 -670
  705. package/dist/safe-bash-command-yq/mike.js +6 -13
  706. package/dist/safe-bash-command-yq/native-work.d.ts +1 -0
  707. package/dist/safe-bash-command-yq/native-work.js +19 -1
  708. package/dist/safe-bash-command-yq/query.d.ts +11 -0
  709. package/dist/safe-bash-command-yq/query.js +735 -0
  710. package/dist/safe-bash-command-zip/LICENSE +21 -0
  711. package/dist/safe-bash-command-zip/index.d.ts +7 -0
  712. package/dist/safe-bash-command-zip/index.js +38 -0
  713. package/dist/safe-bash-command-zip/sync.d.ts +3 -0
  714. package/dist/safe-bash-command-zip/sync.js +9 -0
  715. package/dist/safe-bash-command-zip/zip.d.ts +3 -0
  716. package/dist/safe-bash-command-zip/zip.js +7 -0
  717. package/dist/safe-bash-compression-engine/files.js +4 -4
  718. package/dist/safe-bash-compression-engine/index.js +2 -2
  719. package/dist/safe-bash-compression-engine/operand.js +6 -6
  720. package/dist/safe-bash-compression-engine/stream.js +2 -2
  721. package/dist/safe-bash-compression-engine/zstd-decode.js +1 -1
  722. package/dist/safe-bash-contracts/command.js +1 -1
  723. package/dist/safe-bash-contracts/diagnostics.js +4 -4
  724. package/dist/safe-bash-contracts/escaping.js +11 -11
  725. package/dist/safe-bash-contracts/filesystem-descriptor.js +1 -1
  726. package/dist/safe-bash-contracts/filesystem-output.js +8 -8
  727. package/dist/safe-bash-contracts/index.js +34 -34
  728. package/dist/safe-bash-contracts/io.js +2 -2
  729. package/dist/safe-bash-contracts/output.js +3 -3
  730. package/dist/safe-bash-diff-engine/LICENSE +21 -0
  731. package/dist/safe-bash-diff-engine/index.d.ts +1 -0
  732. package/dist/safe-bash-diff-engine/index.js +24 -0
  733. package/dist/safe-bash-diff-engine/shared.d.ts +53 -0
  734. package/dist/safe-bash-diff-engine/shared.js +19 -0
  735. package/dist/safe-bash-io-engine/commands/archive/internal.d.ts +0 -1
  736. package/dist/safe-bash-io-engine/commands/archive/internal.js +3 -7
  737. package/dist/safe-bash-io-engine/commands/directory-admission.d.ts +3 -0
  738. package/dist/safe-bash-io-engine/commands/directory-admission.js +34 -0
  739. package/dist/safe-bash-io-engine/commands/mode-change.d.ts +4 -0
  740. package/dist/safe-bash-io-engine/commands/mode-change.js +60 -0
  741. package/dist/safe-bash-io-engine/commands/text-programs/shared.js +20 -31
  742. package/dist/safe-bash-io-engine/shell/pattern.js +8 -13
  743. package/dist/safe-bash-io-engine/shell/string-operations.d.ts +0 -2
  744. package/dist/safe-bash-io-engine/shell/string-operations.js +1 -1
  745. package/dist/safe-bash-line-ending-engine/internal.d.ts +0 -2
  746. package/dist/safe-bash-line-ending-engine/internal.js +1 -9
  747. package/dist/safe-bash-markdown-engine/commonmark-blocks.js +4 -4
  748. package/dist/safe-bash-markdown-engine/commonmark-inlines.js +4 -4
  749. package/dist/safe-bash-markdown-engine/commonmark-syntax.js +2 -2
  750. package/dist/safe-bash-markdown-engine/gfm-syntax.js +3 -3
  751. package/dist/safe-bash-markdown-engine/index.js +7 -7
  752. package/dist/safe-bash-mcp/index.browser.d.ts +6 -0
  753. package/dist/safe-bash-mcp/index.browser.js +1 -0
  754. package/dist/safe-bash-mcp/index.d.ts +12 -0
  755. package/dist/safe-bash-mcp/index.js +1558 -36
  756. package/dist/safe-bash-network-engine/LICENSE +21 -0
  757. package/dist/safe-bash-network-engine/aggregate.d.ts +4 -0
  758. package/dist/safe-bash-network-engine/aggregate.js +37 -0
  759. package/dist/safe-bash-network-engine/args.d.ts +68 -0
  760. package/dist/safe-bash-network-engine/args.js +19 -0
  761. package/dist/safe-bash-network-engine/authorizer.d.ts +6 -0
  762. package/dist/safe-bash-network-engine/authorizer.js +8 -0
  763. package/dist/safe-bash-network-engine/body.d.ts +9 -0
  764. package/dist/safe-bash-network-engine/body.js +374 -0
  765. package/dist/safe-bash-network-engine/deadline.d.ts +2 -0
  766. package/dist/safe-bash-network-engine/deadline.js +7 -0
  767. package/dist/safe-bash-network-engine/decode.d.ts +2 -0
  768. package/dist/safe-bash-network-engine/decode.js +81 -0
  769. package/dist/safe-bash-network-engine/fetch-transport.d.ts +7 -0
  770. package/dist/safe-bash-network-engine/fetch-transport.js +9 -0
  771. package/dist/safe-bash-network-engine/form-content-type.d.ts +5 -0
  772. package/dist/safe-bash-network-engine/form-content-type.js +8 -0
  773. package/dist/safe-bash-network-engine/form-headers.d.ts +2 -0
  774. package/dist/safe-bash-network-engine/form-headers.js +10 -0
  775. package/dist/safe-bash-network-engine/glob.d.ts +7 -0
  776. package/dist/safe-bash-network-engine/glob.js +124 -0
  777. package/dist/safe-bash-network-engine/index.d.ts +3 -0
  778. package/dist/safe-bash-network-engine/index.js +26 -0
  779. package/dist/safe-bash-network-engine/input.d.ts +5 -0
  780. package/dist/safe-bash-network-engine/input.js +255 -0
  781. package/dist/safe-bash-network-engine/output.d.ts +6 -0
  782. package/dist/safe-bash-network-engine/output.js +132 -0
  783. package/dist/safe-bash-network-engine/platform-portable.d.ts +5 -0
  784. package/dist/safe-bash-network-engine/platform-portable.js +19 -0
  785. package/dist/safe-bash-network-engine/private-address.d.ts +1 -0
  786. package/dist/safe-bash-network-engine/private-address.js +7 -0
  787. package/dist/safe-bash-network-engine/shared.d.ts +14 -0
  788. package/dist/safe-bash-network-engine/shared.js +23 -0
  789. package/dist/safe-bash-network-engine/types.d.ts +37 -0
  790. package/dist/safe-bash-network-engine/types.js +11 -0
  791. package/dist/safe-bash-network-engine/url.d.ts +2 -0
  792. package/dist/safe-bash-network-engine/url.js +8 -0
  793. package/dist/safe-bash-query-engine/capture.d.ts +1 -0
  794. package/dist/safe-bash-query-engine/capture.js +9 -7
  795. package/dist/safe-bash-query-engine/dates.d.ts +5 -1
  796. package/dist/safe-bash-query-engine/dates.js +10 -2
  797. package/dist/safe-bash-query-engine/delpaths.js +5 -5
  798. package/dist/safe-bash-query-engine/formats.js +3 -3
  799. package/dist/safe-bash-query-engine/index.js +15 -15
  800. package/dist/safe-bash-query-engine/indices.js +5 -5
  801. package/dist/safe-bash-query-engine/input.d.ts +1 -2
  802. package/dist/safe-bash-query-engine/input.js +2 -4
  803. package/dist/safe-bash-query-engine/interpreter.d.ts +5 -0
  804. package/dist/safe-bash-query-engine/interpreter.js +13 -13
  805. package/dist/safe-bash-query-engine/limits.js +1 -1
  806. package/dist/safe-bash-query-engine/parser.d.ts +8 -1
  807. package/dist/safe-bash-query-engine/parser.js +2 -2
  808. package/dist/safe-bash-query-engine/query-core.js +15 -15
  809. package/dist/safe-bash-query-engine/recurse.js +2 -2
  810. package/dist/safe-bash-query-engine/regex.d.ts +4 -2
  811. package/dist/safe-bash-query-engine/regex.js +10 -5
  812. package/dist/safe-bash-query-engine/split.js +2 -2
  813. package/dist/safe-bash-query-engine/splits.d.ts +1 -1
  814. package/dist/safe-bash-query-engine/splits.js +7 -6
  815. package/dist/safe-bash-query-engine/values.js +4 -4
  816. package/dist/safe-bash-regex-engine/ere/limits.d.ts +0 -1
  817. package/dist/safe-bash-regex-engine/ere/limits.js +1 -1
  818. package/dist/safe-bash-regex-engine/ere/matcher.js +9 -9
  819. package/dist/safe-bash-regex-engine/ere/syntax.js +2 -2
  820. package/dist/safe-bash-regex-engine/execution/bounded-provider.js +2 -4
  821. package/dist/safe-bash-regex-engine/index.js +2 -2
  822. package/dist/safe-bash-regex-engine/text/regex.d.ts +1 -0
  823. package/dist/safe-bash-regex-engine/text/regex.js +2 -2
  824. package/dist/safe-bash-search-engine/ergonomic-regex.d.ts +12 -2
  825. package/dist/safe-bash-search-engine/ergonomic-regex.js +2 -2
  826. package/dist/safe-bash-search-engine/glob.js +2 -2
  827. package/dist/safe-bash-search-engine/grep.js +2 -2
  828. package/dist/safe-bash-search-engine/matcher.d.ts +6 -2
  829. package/dist/safe-bash-search-engine/matcher.js +30 -8
  830. package/dist/safe-bash-search-engine/options.js +1 -1
  831. package/dist/safe-bash-search-engine/output.d.ts +3 -2
  832. package/dist/safe-bash-search-engine/output.js +111 -30
  833. package/dist/safe-bash-search-engine/shared.d.ts +2 -0
  834. package/dist/safe-bash-search-engine/shared.js +2 -2
  835. package/dist/safe-bash-search-engine/walk.js +11 -10
  836. package/dist/safe-bash-text-stream-engine/stream-format/shared.d.ts +0 -2
  837. package/dist/safe-bash-text-stream-engine/stream-format/shared.js +1 -9
  838. package/dist/safe-bash-xml-engine/document.d.ts +1 -1
  839. package/dist/safe-bash-xml-engine/document.js +3 -3
  840. package/dist/safe-bash-xml-engine/evaluate.d.ts +1 -0
  841. package/dist/safe-bash-xml-engine/evaluate.js +4 -1
  842. package/dist/safe-bash-xml-engine/index.js +8 -6
  843. package/dist/safe-bash-xml-engine/io.js +1 -1
  844. package/dist/safe-bash-xml-engine/limits.d.ts +2 -2
  845. package/dist/safe-bash-xml-engine/limits.js +1 -1
  846. package/dist/safe-bash-xml-engine/predicate.d.ts +57 -0
  847. package/dist/safe-bash-xml-engine/query.d.ts +3 -15
  848. package/dist/safe-bash-xml-engine/query.js +3 -2
  849. package/dist/safe-bash-zip-engine/LICENSE +21 -0
  850. package/dist/safe-bash-zip-engine/index.d.ts +1 -0
  851. package/dist/safe-bash-zip-engine/index.js +32 -0
  852. package/dist/safe-bash-zip-engine/unzip/arguments.d.ts +53 -0
  853. package/dist/safe-bash-zip-engine/unzip/arguments.js +270 -0
  854. package/dist/safe-bash-zip-engine/zip/aes.d.ts +17 -0
  855. package/dist/safe-bash-zip-engine/zip/aes.js +15 -0
  856. package/dist/safe-bash-zip-engine/zip/comments.d.ts +17 -0
  857. package/dist/safe-bash-zip-engine/zip/comments.js +77 -0
  858. package/dist/safe-bash-zip-engine/zip/crc.d.ts +1 -0
  859. package/dist/safe-bash-zip-engine/zip/crc.js +7 -0
  860. package/dist/safe-bash-zip-engine/zip/crypto.d.ts +19 -0
  861. package/dist/safe-bash-zip-engine/zip/crypto.js +16 -0
  862. package/dist/safe-bash-zip-engine/zip/dates.d.ts +4 -0
  863. package/dist/safe-bash-zip-engine/zip/dates.js +68 -0
  864. package/dist/safe-bash-zip-engine/zip/environment.d.ts +2 -0
  865. package/dist/safe-bash-zip-engine/zip/environment.js +60 -0
  866. package/dist/safe-bash-zip-engine/zip/grow.d.ts +3 -0
  867. package/dist/safe-bash-zip-engine/zip/grow.js +7 -0
  868. package/dist/safe-bash-zip-engine/zip/help.d.ts +4 -0
  869. package/dist/safe-bash-zip-engine/zip/help.js +194 -0
  870. package/dist/safe-bash-zip-engine/zip/line-endings.d.ts +2 -0
  871. package/dist/safe-bash-zip-engine/zip/line-endings.js +165 -0
  872. package/dist/safe-bash-zip-engine/zip/log.d.ts +22 -0
  873. package/dist/safe-bash-zip-engine/zip/log.js +153 -0
  874. package/dist/safe-bash-zip-engine/zip/lzma.d.ts +9 -0
  875. package/dist/safe-bash-zip-engine/zip/lzma.js +7 -0
  876. package/dist/safe-bash-zip-engine/zip/move.d.ts +11 -0
  877. package/dist/safe-bash-zip-engine/zip/move.js +57 -0
  878. package/dist/safe-bash-zip-engine/zip/names.d.ts +2 -0
  879. package/dist/safe-bash-zip-engine/zip/names.js +37 -0
  880. package/dist/safe-bash-zip-engine/zip/options.d.ts +13 -0
  881. package/dist/safe-bash-zip-engine/zip/options.js +23 -0
  882. package/dist/safe-bash-zip-engine/zip/repair.d.ts +10 -0
  883. package/dist/safe-bash-zip-engine/zip/repair.js +348 -0
  884. package/dist/safe-bash-zip-engine/zip/safety.d.ts +54 -0
  885. package/dist/safe-bash-zip-engine/zip/safety.js +19 -0
  886. package/dist/safe-bash-zip-engine/zip/sfx.d.ts +4 -0
  887. package/dist/safe-bash-zip-engine/zip/sfx.js +58 -0
  888. package/dist/safe-bash-zip-engine/zip/test-command.d.ts +5 -0
  889. package/dist/safe-bash-zip-engine/zip/test-command.js +98 -0
  890. package/dist/safe-bash-zip-engine/zip/volumes.d.ts +21 -0
  891. package/dist/safe-bash-zip-engine/zip/volumes.js +255 -0
  892. package/dist/safe-bash-zip-engine/zip/zip64.d.ts +30 -0
  893. package/dist/safe-bash-zip-engine/zip/zip64.js +25 -0
  894. package/dist/safe-bash-zip-engine/zip-format.d.ts +68 -0
  895. package/dist/safe-bash-zip-engine/zip-format.js +27 -0
  896. package/dist/safe-playwright-cloudflare/browser-codegen.generated.d.ts +7 -7
  897. package/dist/safe-playwright-cloudflare/browser-codegen.generated.js +866 -8069
  898. package/dist/safe-playwright-cloudflare/browser-run-code-budget.d.ts +0 -1
  899. package/dist/safe-playwright-cloudflare/browser-run-code-budget.js +0 -2
  900. package/dist/safe-playwright-cloudflare/browser-trace-archive.d.ts +5 -1
  901. package/dist/safe-playwright-cloudflare/browser-trace-archive.js +2 -1
  902. package/dist/safe-playwright-cloudflare/browser-trace-budget.js +2 -2
  903. package/dist/safe-playwright-cloudflare/shell-browser-resource.d.ts +2 -0
  904. package/dist/safe-playwright-cloudflare/shell-browser-resource.js +3 -11
  905. package/dist/safe-playwright-cloudflare/shell-playwright.d.ts +2 -0
  906. package/dist/safe-playwright-cloudflare/shell-playwright.js +1 -1
  907. package/dist/spreadsheet-engine/io/publication.d.ts +1 -0
  908. package/package.json +163 -14
  909. package/dist/safe-bash/chunks/chunk-O4ZUCRGN.js +0 -13
  910. package/dist/safe-bash/chunks/chunk-S264DZO2.js +0 -243
  911. package/dist/safe-bash/chunks/chunk-WVG5SHHQ.js +0 -12
  912. package/dist/safe-bash/chunks/chunk-XH26YVGW.js +0 -23027
  913. package/dist/safe-bash/chunks/chunk-ZW6K2J7P.js +0 -2652
  914. package/dist/safe-bash/command-chunks/chunk-BIXLZ3OG.js +0 -14342
  915. package/dist/safe-bash/command-chunks/chunk-DUYJE2HY.js +0 -14
  916. package/dist/safe-bash/command-chunks/chunk-JHVZYB4R.js +0 -181
  917. package/dist/safe-bash/command-chunks/chunk-ULZ7HIZP.js +0 -40
  918. package/dist/safe-bash/command-chunks/chunk-XS3PGJU2.js +0 -343
  919. package/dist/safe-bash/command-chunks/chunk-XTZALMLR.js +0 -488
  920. package/dist/safe-bash/commands/archive/zip/aes-primitives-unavailable.d.ts +0 -2
  921. package/dist/safe-bash/commands/archive/zip/aes-primitives-unavailable.js +0 -3
  922. package/dist/safe-bash/commands/archive/zip/aes-primitives.d.ts +0 -2
  923. package/dist/safe-bash/commands/archive/zip/aes-primitives.js +0 -3
  924. package/dist/safe-bash/commands/xml/document.d.ts +0 -2
  925. package/dist/safe-bash/commands/xml/document.js +0 -2
  926. package/dist/safe-bash/commands/xml/evaluate.d.ts +0 -2
  927. package/dist/safe-bash/commands/xml/evaluate.js +0 -2
  928. package/dist/safe-bash/commands/xml/json.d.ts +0 -2
  929. package/dist/safe-bash/commands/xml/json.js +0 -2
  930. package/dist/safe-bash/commands/xml/limits.d.ts +0 -2
  931. package/dist/safe-bash/commands/xml/limits.js +0 -2
  932. package/dist/safe-bash/commands/xml/query.d.ts +0 -2
  933. package/dist/safe-bash/commands/xml/query.js +0 -2
  934. package/dist/safe-bash/chunks/{chunk-NHOXKQNE.js → chunk-QVSRRNZT.js} +3 -3
  935. package/dist/safe-bash/command-chunks/{chunk-FIUFIDAO.js → chunk-2JRBIDAD.js} +3 -3
  936. package/dist/safe-bash/command-chunks/{chunk-TYVCKQDH.js → chunk-J5SN3PZ3.js} +3 -3
  937. package/dist/safe-bash/command-chunks/{chunk-2ENZ6JGA.js → chunk-KEV7C3KH.js} +3 -3
  938. package/dist/safe-bash/command-chunks/{chunk-S62HELHU.js → chunk-PL6O4K6W.js} +3 -3
  939. package/dist/safe-bash/command-chunks/{chunk-2WRTLCGK.js → chunk-QZF3SINC.js} +4 -4
  940. package/dist/safe-bash/command-chunks/{chunk-X7TM3AKW.js → chunk-U6G67N23.js} +3 -3
  941. package/dist/safe-bash/command-chunks/{chunk-DDLQ5YDB.js → chunk-YHFXOX6U.js} +9 -9
  942. 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-RTVXHUO5.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) {
@@ -2464,8 +2467,8 @@ var Projection = class _Projection {
2464
2467
  this.add(html ? { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;" }[ch] ?? ch : "\\`*_{}[]<>|!#".includes(ch) ? `\\${ch}` : ch === "\n" || ch === "\r" || ch === " " ? " " : ch);
2465
2468
  }
2466
2469
  }
2467
- attrs(attr4) {
2468
- const pairs2 = [...attr4[0] ? [["id", attr4[0]]] : [], ...attr4[1].length ? [["class", attr4[1].join(" ")]] : [], ...attr4[2]];
2470
+ attrs(attr5) {
2471
+ const pairs2 = [...attr5[0] ? [["id", attr5[0]]] : [], ...attr5[1].length ? [["class", attr5[1].join(" ")]] : [], ...attr5[2]];
2469
2472
  for (const [key, value] of pairs2) {
2470
2473
  if (!key || key.toLowerCase().startsWith("on") || [...key].some((ch) => !(ch >= "a" && ch <= "z") && !(ch >= "A" && ch <= "Z") && !(ch >= "0" && ch <= "9") && ch !== "-" && ch !== "_"))
2471
2474
  throw new PandocError("E_CAPABILITY", this.context.operation ?? "write", "Unsupported HTML attribute", this.format);
@@ -2474,8 +2477,8 @@ var Projection = class _Projection {
2474
2477
  this.add('"');
2475
2478
  }
2476
2479
  }
2477
- attributeLoss(attr4, path) {
2478
- if (attr4[0] || attr4[1].length || attr4[2].length) this.loss(path, "Flattened table attributes");
2480
+ attributeLoss(attr5, path) {
2481
+ if (attr5[0] || attr5[1].length || attr5[2].length) this.loss(path, "Flattened table attributes");
2479
2482
  }
2480
2483
  textProjection(render, html) {
2481
2484
  const text = new _Projection(this.context, this.format, this.cellWriter);
@@ -2874,8 +2877,8 @@ var Markdown = class {
2874
2877
  if (!this.context.lossy) throw new PandocError("E_UNSUPPORTED_FEATURE", this.context.operation ?? "write", `Markdown cannot represent ${feature}`, this.selection.descriptor.name, path);
2875
2878
  this.context.report({ code: "W_RAW_CONTENT", operation: this.context.operation ?? "write", format: this.selection.descriptor.name, location: path, message: `Projected ${feature}` });
2876
2879
  }
2877
- attrs(attr4, path) {
2878
- if (attr4[0] || attr4[1].length || attr4[2].length) this.loss(path, "attributes");
2880
+ attrs(attr5, path) {
2881
+ if (attr5[0] || attr5[1].length || attr5[2].length) this.loss(path, "attributes");
2879
2882
  }
2880
2883
  escape(text, target = false) {
2881
2884
  this.reserve(text.length * 6);
@@ -2983,15 +2986,15 @@ var Markdown = class {
2983
2986
  break;
2984
2987
  }
2985
2988
  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) {
2989
+ const attr5 = node.c[0];
2990
+ if (task && i === 0 && attr5[0] === "" && attr5[1].length === 1 && attr5[1][0] === "task-list-marker" && attr5[2].length === 1 && attr5[2][0]?.[0] === "checked" && ["true", "false"].includes(attr5[2][0][1]) && node.c[1].length === 0) {
2988
2991
  if (!this.selection.extensions.task_lists) {
2989
2992
  this.loss(p, "task state");
2990
2993
  break;
2991
2994
  }
2992
- parts.push(attr4[2][0][1] === "true" ? "[x] " : "[ ] ");
2995
+ parts.push(attr5[2][0][1] === "true" ? "[x] " : "[ ] ");
2993
2996
  } else {
2994
- this.attrs(attr4, p);
2997
+ this.attrs(attr5, p);
2995
2998
  parts.push(this.inline(node.c[1], `${p}.c[1]`));
2996
2999
  }
2997
3000
  break;
@@ -3049,9 +3052,9 @@ var Markdown = class {
3049
3052
  parts.push("---");
3050
3053
  break;
3051
3054
  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] ?? "";
3055
+ const attr5 = node.c[0];
3056
+ if (attr5[0] || attr5[1].length > 1 || attr5[2].length) this.loss(p, "code block attributes");
3057
+ const info = attr5[1][0] ?? "";
3055
3058
  if ([...info].some((ch) => "\r\n` ".includes(ch))) this.loss(p, "code language");
3056
3059
  this.reserve(node.c[1].length * 2);
3057
3060
  const value = node.c[1].split("\r\n").join("\n").split("\r").join("\n");
@@ -3236,11 +3239,11 @@ var HtmlWriter = class {
3236
3239
  this.escape(value, true);
3237
3240
  this.add('"');
3238
3241
  }
3239
- attrs(attr4, id = attr4[0]) {
3242
+ attrs(attr5, id = attr5[0]) {
3240
3243
  if (id) this.attribute("id", id);
3241
- if (attr4[1].length) this.attribute("class", attr4[1].join(" "));
3244
+ if (attr5[1].length) this.attribute("class", attr5[1].join(" "));
3242
3245
  const seen = /* @__PURE__ */ new Set(["id", "class"]);
3243
- for (const [key, value] of attr4[2]) {
3246
+ for (const [key, value] of attr5[2]) {
3244
3247
  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
3248
  if (key === "dir" && !["ltr", "rtl", "auto"].includes(value)) this.fail("Invalid HTML direction");
3246
3249
  seen.add(key);
@@ -5048,12 +5051,12 @@ var LatexReader = class {
5048
5051
  if ([...value].length !== 1) texError(this.context, "Accent requires one Unicode scalar");
5049
5052
  append(out, { t: "Str", c: (value + accents[name]).normalize("NFC") + remainder });
5050
5053
  } else if (name === "href" || name === "url" || name === "includegraphics") {
5051
- const attr4 = empty();
5054
+ const attr5 = empty();
5052
5055
  const option = name === "includegraphics" ? cursor.optional() : void 0;
5053
- if (option) attr4[2].push(["latex-options", option.raw.slice(1, -1)]);
5056
+ if (option) attr5[2].push(["latex-options", option.raw.slice(1, -1)]);
5054
5057
  const url = this.literal(cursor.group().children, depth + 1);
5055
5058
  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, ""]] });
5059
+ append(out, { t: name === "includegraphics" ? "Image" : "Link", c: [attr5, label, [url, ""]] });
5057
5060
  } else if (name === "ref" || name === "eqref" || name === "pageref") {
5058
5061
  const key = texSource(cursor.group().children);
5059
5062
  if (name === "pageref") {
@@ -5129,10 +5132,10 @@ var LatexReader = class {
5129
5132
  }
5130
5133
  if (cells.length || content.some((t) => t.kind !== "space" && t.kind !== "comment")) row2();
5131
5134
  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(), []]] };
5135
+ const attr5 = empty();
5136
+ attr5[2].push(["latex-column-spec", spec]);
5137
+ if (rules) attr5[2].push(["latex-hlines", String(rules)]);
5138
+ return { t: "Table", c: [attr5, [null, []], cols, [empty(), []], [[empty(), 0, [], rows]], [empty(), []]] };
5136
5139
  }
5137
5140
  blocks(tokens2, depth = 0) {
5138
5141
  this.context.bound("depth", depth);
@@ -5154,16 +5157,16 @@ var LatexReader = class {
5154
5157
  }
5155
5158
  if (token.kind === "command" && levels[token.text]) {
5156
5159
  flush();
5157
- const attr4 = empty();
5160
+ const attr5 = empty();
5158
5161
  if (tokens2[cursor.index]?.kind === "text" && tokens2[cursor.index]?.text === "*") {
5159
5162
  cursor.index++;
5160
- attr4[1].push("unnumbered");
5163
+ attr5[1].push("unnumbered");
5161
5164
  }
5162
5165
  const short = cursor.optional();
5163
- if (short) attr4[2].push(["short-title", short.raw.slice(1, -1)]);
5166
+ if (short) attr5[2].push(["short-title", short.raw.slice(1, -1)]);
5164
5167
  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 };
5168
+ out.push({ t: "Header", c: [levels[token.text], attr5, title] });
5169
+ target = { attr: attr5, title };
5167
5170
  } else if (token.kind === "command" && ["title", "author", "date", "documentclass"].includes(token.text)) {
5168
5171
  flush();
5169
5172
  const options = token.text === "documentclass" ? cursor.optional() : void 0;
@@ -5178,11 +5181,11 @@ var LatexReader = class {
5178
5181
  const name = texSource(cursor.group().children);
5179
5182
  if (!name || this.labels.has(name)) texError(this.context, "Empty or duplicate label");
5180
5183
  if (!target) {
5181
- const attr4 = empty();
5184
+ const attr5 = empty();
5182
5185
  pending.push({ kind: "group", text: "", raw: "", children: [] });
5183
5186
  flush();
5184
- out.push({ t: "Div", c: [attr4, []] });
5185
- target = { attr: attr4, title: [{ t: "Str", c: name }] };
5187
+ out.push({ t: "Div", c: [attr5, []] });
5188
+ target = { attr: attr5, title: [{ t: "Str", c: name }] };
5186
5189
  }
5187
5190
  if (target.attr[0]) texError(this.context, "Multiple labels for one structure are unsupported", "E_CAPABILITY");
5188
5191
  target.attr[0] = name;
@@ -5220,8 +5223,8 @@ var LatexReader = class {
5220
5223
  } else if (token.text === "figure" || token.text === "table") {
5221
5224
  const inner = new TexCursor(token.children, this.context);
5222
5225
  const position = inner.optional();
5223
- const attr4 = empty();
5224
- if (position) attr4[2].push(["latex-placement", position.raw.slice(1, -1)]);
5226
+ const attr5 = empty();
5227
+ if (position) attr5[2].push(["latex-placement", position.raw.slice(1, -1)]);
5225
5228
  let caption2 = [null, []];
5226
5229
  let hasCaption = false;
5227
5230
  const body = [];
@@ -5231,27 +5234,27 @@ var LatexReader = class {
5231
5234
  if (hasCaption) texError(this.context, "Repeated float caption");
5232
5235
  hasCaption = true;
5233
5236
  const short = inner.optional();
5234
- if (short) attr4[2].push(["short-caption", short.raw.slice(1, -1)]);
5237
+ if (short) attr5[2].push(["short-caption", short.raw.slice(1, -1)]);
5235
5238
  const c = this.inlines(inner.group().children, depth + 1);
5236
5239
  caption2 = [null, [{ t: "Plain", c }]];
5237
5240
  } else if (t.kind === "command" && t.text === "label") {
5238
5241
  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;
5242
+ if (!label || attr5[0] || this.labels.has(label)) texError(this.context, "Empty or duplicate float label");
5243
+ attr5[0] = label;
5241
5244
  } else body.push(t);
5242
5245
  }
5243
5246
  const blocks3 = this.blocks(body, depth + 1);
5244
5247
  const title = caption2[1][0];
5245
5248
  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] });
5249
+ if (attr5[0]) this.labels.set(attr5[0], inlines2);
5250
+ if (token.text === "figure") out.push({ t: "Figure", c: [attr5, caption2, blocks3] });
5248
5251
  else {
5249
5252
  if (blocks3.length !== 1 || blocks3[0]?.t !== "Table") texError(this.context, "Table float must contain one tabular", "E_CAPABILITY");
5250
5253
  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]] });
5254
+ for (const pair of table.c[0][2]) attr5[2].push([pair[0], pair[1]]);
5255
+ out.push({ t: "Table", c: [attr5, caption2, table.c[2], table.c[3], table.c[4], table.c[5]] });
5253
5256
  }
5254
- target = { attr: attr4, title: inlines2 };
5257
+ target = { attr: attr5, title: inlines2 };
5255
5258
  } else {
5256
5259
  this.raw(token.raw);
5257
5260
  out.push({ t: "RawBlock", c: ["latex", token.raw] });
@@ -5356,9 +5359,9 @@ var LatexWriter = class {
5356
5359
  }
5357
5360
  if (Array.isArray(value)) {
5358
5361
  if (value.length === 3 && typeof value[0] === "string" && Array.isArray(value[1]) && Array.isArray(value[2]) && value[0]) {
5359
- const attr4 = value;
5362
+ const attr5 = value;
5360
5363
  let base = "pc";
5361
- for (const ch of attr4[0]) {
5364
+ for (const ch of attr5[0]) {
5362
5365
  this.context.checkpoint();
5363
5366
  base += `-${ch.codePointAt(0).toString(16)}`;
5364
5367
  }
@@ -5367,15 +5370,15 @@ var LatexWriter = class {
5367
5370
  const label = count === 1 ? base : `${base}-dup-${count}`;
5368
5371
  this.context.charge("retainedBytes", label.length * 2);
5369
5372
  this.context.charge("references", 1);
5370
- this.labels.set(attr4, label);
5371
- if (!this.targets.has(attr4[0])) this.targets.set(attr4[0], label);
5373
+ this.labels.set(attr5, label);
5374
+ if (!this.targets.has(attr5[0])) this.targets.set(attr5[0], label);
5372
5375
  }
5373
5376
  for (const child of value) await this.reserve(child);
5374
5377
  } else for (const child of Object.values(value)) await this.reserve(child);
5375
5378
  }
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);
5379
+ attrs(attr5, path, languageClass = false) {
5380
+ if (attr5[1].length && !languageClass || attr5[2].length) this.loss("Unsupported LaTeX attributes", path);
5381
+ const label = this.labels.get(attr5);
5379
5382
  if (label) this.add(`\\phantomsection\\label{${label}}`);
5380
5383
  }
5381
5384
  math(source, path) {
@@ -6712,6 +6715,7 @@ var RstWriter = class {
6712
6715
  }
6713
6716
  context;
6714
6717
  definitions = [];
6718
+ strikeout = false;
6715
6719
  notes = [];
6716
6720
  serial = 0;
6717
6721
  sourceText = "";
@@ -6741,12 +6745,12 @@ var RstWriter = class {
6741
6745
  }
6742
6746
  return this.retain(out);
6743
6747
  }
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]);
6748
+ attrs(attr5, path, language = false) {
6749
+ if (attr5[1].length && !language || attr5[2].length || language && attr5[1].length > 1) this.loss("Dropped unsupported RST attributes", path);
6750
+ if (!attr5[0]) return "";
6751
+ const count = (this.ids.get(attr5[0]) ?? 0) + 1;
6752
+ this.ids.set(attr5[0], count);
6753
+ const base = this.id(attr5[0]);
6750
6754
  return `.. _${count > 1 ? this.unique(`${base}-dup-${count}`) : base}:
6751
6755
 
6752
6756
  `;
@@ -6816,8 +6820,20 @@ var RstWriter = class {
6816
6820
  markup = true;
6817
6821
  break;
6818
6822
  }
6823
+ case "Strikeout": {
6824
+ const content = children2(node.c);
6825
+ if (nested) {
6826
+ this.loss("Nested RST inline style projected to text", p);
6827
+ text = content;
6828
+ break;
6829
+ }
6830
+ if (!content || content.trim() !== content) this.fail("Empty or whitespace-bounded inline style", p);
6831
+ this.strikeout = true;
6832
+ text = `:strikeout:\`${content}\``;
6833
+ markup = true;
6834
+ break;
6835
+ }
6819
6836
  case "Underline":
6820
- case "Strikeout":
6821
6837
  case "SmallCaps":
6822
6838
  this.loss(`Projected unsupported ${node.t} to text`, p);
6823
6839
  text = children2(node.c);
@@ -6910,11 +6926,11 @@ var RstWriter = class {
6910
6926
  text = this.inlines(node.c, `${p}.c`);
6911
6927
  break;
6912
6928
  case "Header": {
6913
- const [level, attr4, content] = node.c;
6929
+ const [level, attr5, content] = node.c;
6914
6930
  if (level > 9) this.loss("Heading level projected to level nine", p);
6915
6931
  text = this.inlines(content, `${p}.c[2]`);
6916
6932
  if (!text) this.fail("Empty heading", p);
6917
- text = this.attrs(attr4, p) + text + "\n" + `=-~^"'+:#`[Math.min(level, 9) - 1].repeat(rstColumnWidth(text));
6933
+ text = this.attrs(attr5, p) + text + "\n" + `=-~^"'+:#`[Math.min(level, 9) - 1].repeat(rstColumnWidth(text));
6918
6934
  break;
6919
6935
  }
6920
6936
  case "CodeBlock": {
@@ -6938,10 +6954,15 @@ var RstWriter = class {
6938
6954
  text = indent(body.startsWith(" ") ? "..\n\n" + body : body, 3);
6939
6955
  break;
6940
6956
  }
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]`);
6957
+ case "Div": {
6958
+ const [id, classes, attributes] = node.c[0];
6959
+ if (classes.some((name) => !name || [...name].some((ch) => !"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-".includes(ch)))) this.fail("Unsupported RST container class", p);
6960
+ const body = this.blocks(node.c[1], `${p}.c[1]`);
6961
+ text = this.attrs([id, [], attributes], p) + `.. container::${classes.length ? " " + classes.join(" ") : ""}
6962
+
6963
+ ` + indent(body, 3);
6944
6964
  break;
6965
+ }
6945
6966
  case "Figure":
6946
6967
  this.loss("Figure projected to content and caption", p);
6947
6968
  text = this.blocks(node.c[2], `${p}.c[2]`) + "\n\n" + this.blocks(node.c[1][1], `${p}.c[1][1]`);
@@ -7017,8 +7038,8 @@ var RstWriter = class {
7017
7038
  if ("t" in value && ["Space", "SoftBreak", "LineBreak"].includes(String(value.t))) return " ";
7018
7039
  if ("t" in value && "c" in value && ["Header", "CodeBlock", "Div"].includes(String(value.t))) {
7019
7040
  const block2 = value;
7020
- const attr4 = block2.t === "Header" ? block2.c[1] : block2.c[0];
7021
- if (attr4[0]) this.targets.add(attr4[0]);
7041
+ const attr5 = block2.t === "Header" ? block2.c[1] : block2.c[0];
7042
+ if (attr5[0]) this.targets.add(attr5[0]);
7022
7043
  }
7023
7044
  if ("c" in value) return reserve(value.c);
7024
7045
  return this.retain(Object.values(value).map((child) => reserve(child)).join(""));
@@ -7033,7 +7054,7 @@ var RstWriter = class {
7033
7054
  const marker = `.. [${i + 1}] `;
7034
7055
  this.definitions.push(markedBody(marker, body));
7035
7056
  }
7036
- return { kind: "text", text: this.retain([text, ...this.definitions].filter(Boolean).join("\n\n") + (text || this.definitions.length ? "\n" : "")) };
7057
+ return { kind: "text", text: this.retain([...this.strikeout ? [".. role:: strikeout"] : [], text, ...this.definitions].filter(Boolean).join("\n\n") + (text || this.definitions.length ? "\n" : "")) };
7037
7058
  }
7038
7059
  };
7039
7060
  async function writeRst(document, context) {
@@ -7506,13 +7527,13 @@ var RstReader = class {
7506
7527
  if (name === "image" || name === "figure") {
7507
7528
  if (!allow(["alt", "height", "width", "scale", "align", "target", "class", "name"]) || name === "image" && body.length || name === "figure" && subName) return unsupported();
7508
7529
  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)]);
7530
+ const attr5 = rstAttr();
7531
+ attr5[0] = options.get("name") ?? "";
7532
+ attr5[1].push(...(options.get("class") ?? "").split(" ").filter(Boolean));
7533
+ for (const k of ["height", "width", "scale", "align"]) if (options.has(k)) attr5[2].push([k, options.get(k)]);
7513
7534
  const target = [argument, ""];
7514
7535
  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] };
7536
+ let image = { t: "Image", c: [attr5, this.inline(options.get("alt") ?? "", at), target] };
7516
7537
  if (options.has("target")) image = { t: "Link", c: [rstAttr(), [image], [options.get("target"), ""]] };
7517
7538
  if (subName) {
7518
7539
  if (this.substitutions.has(subName)) rstError(this.context, at, `Duplicate substitution: ${subName}`);
@@ -7529,18 +7550,18 @@ var RstReader = class {
7529
7550
  if (subName) return unsupported();
7530
7551
  if (["code", "code-block", "sourcecode", "parsed-literal"].includes(name)) {
7531
7552
  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));
7553
+ const attr5 = rstAttr();
7554
+ attr5[0] = options.get("name") ?? "";
7555
+ if (argument) attr5[1].push(argument);
7556
+ attr5[1].push(...(options.get("class") ?? "").split(" ").filter(Boolean));
7536
7557
  if (options.has("number-lines")) {
7537
7558
  const number = options.get("number-lines") || "1";
7538
7559
  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]);
7560
+ attr5[1].push("numberLines");
7561
+ attr5[2].push(["startFrom", number]);
7541
7562
  }
7542
7563
  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 };
7564
+ return { blocks: [{ t: "CodeBlock", c: [attr5, body.map((l) => l.text).join("\n")] }], end };
7544
7565
  }
7545
7566
  if (name === "raw") {
7546
7567
  if (options.size || !argument || argument.split(" ").length !== 1) return unsupported();
@@ -8979,9 +9000,9 @@ var RtfWriter = class {
8979
9000
  else this.add(ch);
8980
9001
  }
8981
9002
  }
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]) {
9003
+ attrs(attr5, paragraph = false) {
9004
+ if (attr5[0] || attr5[1].length) this.fail("Unsupported RTF identifiers or classes");
9005
+ for (const [key, value] of attr5[2]) {
8985
9006
  if (key === "font-family") {
8986
9007
  const id = this.fonts.indexOf(value);
8987
9008
  if (id < 0) this.fail("Font reference must be explicitly declared in rtf-fonts metadata", "E_RESOURCE");
@@ -9111,12 +9132,12 @@ var RtfWriter = class {
9111
9132
  }
9112
9133
  }
9113
9134
  }
9114
- async paragraph(nodes, state, attr4) {
9135
+ async paragraph(nodes, state, attr5) {
9115
9136
  this.add(`{\\pard\\plain\\s${state.style ?? 0}`);
9116
9137
  if (state.style) this.add(`\\b\\fs${40 - state.style * 2}`);
9117
9138
  this.add(`\\li${state.indent}\\fi${state.marker ? -360 : 0}\\${state.direction}par`);
9118
9139
  if (state.cell) this.add(`\\intbl\\${alignments[state.cell]}`);
9119
- if (attr4) this.attrs(attr4, true);
9140
+ if (attr5) this.attrs(attr5, true);
9120
9141
  if (state.marker && state.list) this.add(`\\tx${state.indent}\\ls${state.list.id}\\ilvl${state.list.level}`);
9121
9142
  this.add(" ");
9122
9143
  if (state.marker) {
@@ -9194,7 +9215,7 @@ var RtfWriter = class {
9194
9215
  case "Table": {
9195
9216
  if (state.cell) this.fail("Nested RTF tables unsupported");
9196
9217
  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");
9218
+ 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
9219
  if (t[1][1].length) await this.blocks(t[1][1], state);
9199
9220
  else if (t[1][0]) await this.paragraph(t[1][0], state);
9200
9221
  const widths = t[2].map((c) => c[1].t === "ColWidth" ? c[1].c : 1 / t[2].length);
@@ -9763,8 +9784,8 @@ var epubReader = {
9763
9784
  }
9764
9785
  if (toc.length) metadata2["epub-toc"] = { t: "MetaList", c: toc };
9765
9786
  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] };
9787
+ 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]] : []]];
9788
+ return { t: "Div", c: [attr5, chapter.blocks] };
9768
9789
  }), metadata: metadata2, resources: [...bag.values()], ...bookLanguage ? { language: xmlText(bookLanguage) } : {}, ...["ltr", "rtl"].includes(bookDirection) ? { direction: bookDirection } : {} };
9769
9790
  }
9770
9791
  };
@@ -9793,14 +9814,17 @@ var epubWriter = {
9793
9814
  if (defaultTreeAdapter.isTextNode(node)) return node.value;
9794
9815
  return "childNodes" in node ? node.childNodes.map(text).join("") : "";
9795
9816
  };
9817
+ const inlineText = async (nodes) => {
9818
+ const result = await writeHtml5({ blocks: [{ t: "Plain", c: nodes }], metadata: {}, resources: [] }, htmlContext);
9819
+ if (result.kind !== "text") return fail3("Expected text serialization");
9820
+ return text(parseFragment(result.text)).trim();
9821
+ };
9796
9822
  const meta2 = async (key) => {
9797
9823
  const value = document.metadata[key];
9798
9824
  if (value === void 0) return void 0;
9799
9825
  if (value.t === "MetaString") return value.c;
9800
9826
  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();
9827
+ return inlineText(value.c);
9804
9828
  };
9805
9829
  const htmlContext = new Proxy(ctx, { get(target, key) {
9806
9830
  if (key === "standalone") return false;
@@ -9811,9 +9835,22 @@ var epubWriter = {
9811
9835
  const suppliedTitle = ctx.epub?.title ?? await meta2("title");
9812
9836
  const suppliedLang = ctx.epub?.language ?? await meta2("lang") ?? document.language;
9813
9837
  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";
9838
+ const headingTitle = async (blocks3) => {
9839
+ for (const block2 of blocks3) {
9840
+ await ctx.cooperate();
9841
+ if (block2.t === "Header") {
9842
+ const title2 = await inlineText(block2.c[2]);
9843
+ if (title2) return title2;
9844
+ }
9845
+ if (block2.t === "Div" || block2.t === "BlockQuote") {
9846
+ const title2 = await headingTitle(block2.t === "Div" ? block2.c[1] : block2.c);
9847
+ if (title2) return title2;
9848
+ }
9849
+ }
9850
+ return void 0;
9851
+ };
9852
+ const title = suppliedTitle ?? await headingTitle(document.blocks) ?? "Untitled";
9853
+ const lang = suppliedLang ?? "en-US";
9817
9854
  const modified = await meta2("modified") ?? "1970-01-01T00:00:00Z";
9818
9855
  if (!title.trim() || !lang.trim() || explicitIdentifier !== void 0 && !explicitIdentifier.trim()) fail3("Publication metadata must be nonempty", "E_OPTION");
9819
9856
  const date = new Date(modified);
@@ -10431,7 +10468,7 @@ var EncodingMode;
10431
10468
  })(EncodingMode || (EncodingMode = {}));
10432
10469
  var attr2 = ["", [], []];
10433
10470
  async function modelContext(ctx) {
10434
- const { DocumentBudget } = await import("./src-UJOWAS2S.js");
10471
+ const { DocumentBudget } = await import("./src-ICMQISAA.js");
10435
10472
  const l = ctx.limits;
10436
10473
  const signal = ctx.signal ?? new AbortController().signal;
10437
10474
  return { signal, budget: new DocumentBudget({
@@ -10465,7 +10502,7 @@ async function guarded(ctx, action) {
10465
10502
  }
10466
10503
  var docxReader = { format: "docx", async read(input, ctx) {
10467
10504
  return guarded(ctx, async () => {
10468
- const { Document: openDocument, Paragraph, Run } = await import("./src-UJOWAS2S.js");
10505
+ const { Document: openDocument, Paragraph, Run } = await import("./src-ICMQISAA.js");
10469
10506
  const model = await openDocument(input.bytes, await modelContext(ctx));
10470
10507
  const paragraph = (p) => {
10471
10508
  const inlines2 = [];
@@ -10498,21 +10535,26 @@ var docxReader = { format: "docx", async read(input, ctx) {
10498
10535
  return { blocks: blocks3, metadata: {}, resources: [] };
10499
10536
  });
10500
10537
  } };
10501
- var docxWriter = { format: "docx", async write(document, ctx) {
10538
+ var docxWriter = { format: "docx", imageResources: "embed", async write(document, ctx) {
10502
10539
  return guarded(ctx, async () => {
10503
10540
  const blocks3 = [];
10504
10541
  const paragraphs = [];
10505
10542
  const numbering2 = [];
10506
10543
  const w = "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
10507
10544
  const r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
10508
- const runs = (nodes, bold = false, italic = false, link) => {
10545
+ const runs = (nodes, style = {}) => {
10509
10546
  const result = [];
10510
10547
  for (const node of nodes) {
10511
10548
  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]));
10549
+ if (node.t === "Strong") result.push(...runs(node.c, { ...style, bold: true }));
10550
+ else if (node.t === "Emph") result.push(...runs(node.c, { ...style, italic: true }));
10551
+ else if (node.t === "Underline") result.push(...runs(node.c, { ...style, underline: true }));
10552
+ else if (node.t === "Strikeout") result.push(...runs(node.c, { ...style, strike: true }));
10553
+ else if (node.t === "Superscript" || node.t === "Subscript") result.push(...runs(node.c, { ...style, baseline: node.t === "Superscript" ? "superscript" : "subscript" }));
10554
+ else if (node.t === "Span") result.push(...runs(node.c[1], style));
10555
+ else if (node.t === "Link") result.push(...runs(node.c[1], { ...style, link: node.c[2][0] }));
10556
+ 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));
10557
+ else if (node.t === "Image") result.push({ ...style, text: "", image: node });
10516
10558
  else {
10517
10559
  let text;
10518
10560
  if (node.t === "Str") text = node.c;
@@ -10520,14 +10562,14 @@ var docxWriter = { format: "docx", async write(document, ctx) {
10520
10562
  else if (node.t === "LineBreak") text = "\n";
10521
10563
  else if (node.t === "Code") text = node.c[1];
10522
10564
  else throw new PandocError("E_UNSUPPORTED_FEATURE", "write", `Unsupported DOCX inline: ${node.t}`, "docx");
10523
- result.push({ text, bold, italic, ...link === void 0 ? {} : { link } });
10565
+ result.push({ ...style, text });
10524
10566
  }
10525
10567
  }
10526
10568
  return result;
10527
10569
  };
10528
10570
  const paragraph = (target, content, properties, level) => {
10529
10571
  paragraphs.push({ runs: content, properties });
10530
- target.push({ kind: "paragraph", ...level === void 0 ? {} : { level }, runs: content.map(({ link: _link, ...run }) => run) });
10572
+ target.push({ kind: "paragraph", ...level === void 0 ? {} : { level }, runs: content.map(({ link: _link, strike: _strike, baseline: _baseline, image: _image, ...run }) => run) });
10531
10573
  };
10532
10574
  const visit5 = async (nodes, target, indent3 = 0, list2) => {
10533
10575
  for (const block2 of nodes) {
@@ -10575,7 +10617,7 @@ var docxWriter = { format: "docx", async write(document, ctx) {
10575
10617
  }
10576
10618
  };
10577
10619
  await visit5(document.blocks, blocks3);
10578
- const { createDocumentArchive, writeDocumentArchive, DocumentXmlEditor } = await import("./src-UJOWAS2S.js");
10620
+ const { createDocumentArchive, writeDocumentArchive, DocumentXmlEditor, Image } = await import("./src-ICMQISAA.js");
10579
10621
  const mc = await modelContext(ctx);
10580
10622
  const archiveContext = { signal: mc.signal, budget: mc.budget };
10581
10623
  const archive = await createDocumentArchive({ content: { version: 1, blocks: blocks3 } }, archiveContext);
@@ -10583,6 +10625,30 @@ var docxWriter = { format: "docx", async write(document, ctx) {
10583
10625
  const relationships = new DocumentXmlEditor(archive.members.find((member) => member.name === "word/_rels/document.xml.rels").bytes, {}, void 0, mc.budget);
10584
10626
  let paragraphIndex = 0, relationshipId = 2;
10585
10627
  const linkRelationships = [];
10628
+ const media = /* @__PURE__ */ new Map();
10629
+ let drawingId = 0;
10630
+ const drawing = async (node) => {
10631
+ ctx.charge("images", 1);
10632
+ const source = node.c[2][0];
10633
+ let entry = media.get(source);
10634
+ if (!entry) {
10635
+ const bytes2 = document.resources.find((resource) => resource.id === source)?.bytes ?? await ctx.resources?.resolve(source, void 0, ctx.signal);
10636
+ if (!bytes2) throw new PandocError("E_RESOURCE", "write", `Missing image resource: ${source}`, "docx");
10637
+ ctx.charge("resourceBytes", bytes2.length);
10638
+ const asset = await Image.from_blob(bytes2, mc);
10639
+ const name = `media/image-${media.size + 1}.${asset.ext}`;
10640
+ entry = { name, bytes: bytes2, type: asset.content_type, id: `rId${relationshipId++}`, asset };
10641
+ media.set(source, entry);
10642
+ linkRelationships.push(`<Relationship Id="${entry.id}" Type="${r}/image" Target="${name}"/>`);
10643
+ }
10644
+ const attributes = Object.fromEntries(node.c[0][2]);
10645
+ let width = imageLength(attributes.width, entry.asset.width.emu, ctx, "docx"), height = imageLength(attributes.height, entry.asset.height.emu, ctx, "docx");
10646
+ if (attributes.width && !attributes.height) height = Math.max(1, Math.round(width * entry.asset.height.emu / entry.asset.width.emu));
10647
+ if (attributes.height && !attributes.width) width = Math.max(1, Math.round(height * entry.asset.width.emu / entry.asset.height.emu));
10648
+ const alt = encodeXML(runs(node.c[1]).map((run) => run.text).join(""));
10649
+ const a = "http://schemas.openxmlformats.org/drawingml/2006/main", pic = "http://schemas.openxmlformats.org/drawingml/2006/picture";
10650
+ 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>`;
10651
+ };
10586
10652
  const edit = async (node) => {
10587
10653
  await ctx.cooperate();
10588
10654
  if (node.namespace === w && node.localName === "p") {
@@ -10592,13 +10658,21 @@ var docxWriter = { format: "docx", async write(document, ctx) {
10592
10658
  const properties = node.children.find((child) => child.localName === "pPr");
10593
10659
  if (properties && extra.properties) replacements.set(properties, `<w:pPr>${main.sourceXml(properties, /* @__PURE__ */ new Map(), true)}${extra.properties}</w:pPr>`);
10594
10660
  const nativeRuns = node.children.filter((child) => child.localName === "r");
10595
- for (const [index, run] of extra.runs.entries()) if (run.link !== void 0) {
10661
+ for (const [index, run] of extra.runs.entries()) {
10596
10662
  ctx.checkpoint();
10597
10663
  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>`);
10664
+ const properties2 = native.children.find((child) => child.localName === "rPr");
10665
+ const format2 = (run.strike ? "<w:strike/>" : "") + (run.baseline ? `<w:vertAlign w:val="${run.baseline}"/>` : "");
10666
+ const edits = /* @__PURE__ */ new Map();
10667
+ if (properties2 && format2) edits.set(properties2, `<w:rPr>${main.sourceXml(properties2, /* @__PURE__ */ new Map(), true)}${format2}</w:rPr>`);
10668
+ 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>`;
10669
+ if (run.link !== void 0) {
10670
+ const anchor = run.link.startsWith("#");
10671
+ const id = `rId${relationshipId++}`;
10672
+ if (!anchor) linkRelationships.push(`<Relationship Id="${id}" Type="${r}/hyperlink" Target="${encodeXML(run.link)}" TargetMode="External"/>`);
10673
+ xml = `<w:hyperlink ${anchor ? `w:anchor="${encodeXML(run.link.slice(1))}"` : `xmlns:r="${r}" r:id="${id}"`}>${xml}</w:hyperlink>`;
10674
+ }
10675
+ if (format2 || run.image || run.link !== void 0) replacements.set(native, xml);
10602
10676
  }
10603
10677
  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
10678
  } else for (const child of node.children) await edit(child);
@@ -10608,8 +10682,10 @@ var docxWriter = { format: "docx", async write(document, ctx) {
10608
10682
  if (linkRelationships.length) relationships.insertChildren(relationships.root, linkRelationships.map((xml) => xml.replace("<Relationship ", '<Relationship xmlns="http://schemas.openxmlformats.org/package/2006/relationships" ')).join(""));
10609
10683
  const types = new DocumentXmlEditor(archive.members.find((member) => member.name === "[Content_Types].xml").bytes, {}, void 0, mc.budget);
10610
10684
  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"/>');
10685
+ 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
10686
  const parts = /* @__PURE__ */ new Map([["word/document.xml", main.serialize()], ["word/_rels/document.xml.rels", relationships.serialize()], ["[Content_Types].xml", types.serialize()]]);
10612
10687
  const members = archive.members.map((member) => ({ ...member, bytes: parts.get(member.name) ?? member.bytes }));
10688
+ for (const entry of media.values()) members.push({ name: `word/${entry.name}`, bytes: entry.bytes, directory: false, modified: /* @__PURE__ */ new Date(0) });
10613
10689
  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
10690
  const chunks = [];
10615
10691
  let size = 0;
@@ -10643,6 +10719,448 @@ var docx_default = {
10643
10719
  write: ["standalone"]
10644
10720
  }
10645
10721
  };
10722
+ var import_saxes2 = __toESM(require_saxes(), 1);
10723
+ 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`]));
10724
+ var odtMime = "application/vnd.oasis.opendocument.text";
10725
+ var fo = "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0";
10726
+ var xlink = "http://www.w3.org/1999/xlink";
10727
+ var svg = "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0";
10728
+ function odtAttribute(node, name, uri2) {
10729
+ return node.attrs.find((a) => a.name === name && a.uri === uri2)?.value ?? "";
10730
+ }
10731
+ function odtChildren(node, name, uri2) {
10732
+ return node.children.filter((child) => typeof child !== "string" && child.name === name && child.uri === uri2);
10733
+ }
10734
+ function odtFailure(ctx, message, code = "E_PARSE") {
10735
+ throw new PandocError(code, ctx.operation ?? "read", message, "odt");
10736
+ }
10737
+ async function parseOdtXml(bytes, ctx) {
10738
+ ctx.bound("binaryBytes", bytes.length);
10739
+ const text = await ctx.decodeUtf8([bytes]);
10740
+ const parser = new import_saxes2.SaxesParser({ xmlns: true });
10741
+ const stack = [];
10742
+ let root;
10743
+ parser.on("error", (error) => odtFailure(ctx, `Invalid ODT XML: ${error.message}`));
10744
+ parser.on("doctype", () => odtFailure(ctx, "ODT DTD and external entities are forbidden"));
10745
+ parser.on("opentag", (tag) => {
10746
+ ctx.checkpoint();
10747
+ ctx.bound("xmlDepth", stack.length + 1);
10748
+ ctx.charge("xmlNodes", 1);
10749
+ ctx.charge("attributes", Object.keys(tag.attributes).length);
10750
+ ctx.charge("retainedBytes", 128 + Object.keys(tag.attributes).length * 64);
10751
+ 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: [] };
10752
+ if (stack.length) stack.at(-1).children.push(node);
10753
+ else root = node;
10754
+ stack.push(node);
10755
+ });
10756
+ parser.on("closetag", () => {
10757
+ stack.pop();
10758
+ });
10759
+ const append2 = (value) => {
10760
+ ctx.charge("retainedBytes", value.length * 2);
10761
+ if (stack.length) stack.at(-1).children.push(value);
10762
+ };
10763
+ parser.on("text", append2);
10764
+ parser.on("cdata", append2);
10765
+ for (let i = 0; i < text.length; i += 4096) {
10766
+ parser.write(text.slice(i, i + 4096));
10767
+ await ctx.cooperate(4096);
10768
+ }
10769
+ parser.close();
10770
+ return root ?? odtFailure(ctx, "Missing ODT XML root");
10771
+ }
10772
+ function odtPackage(ctx) {
10773
+ const signal = ctx.signal ?? new AbortController().signal;
10774
+ 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 };
10775
+ 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 });
10776
+ return {
10777
+ async read(bytes) {
10778
+ ctx.bound("compressedBytes", bytes.length);
10779
+ const archive = await codec.readZipArchive(bytes, { ...limits, maxArchiveBytes: ctx.limits.compressedBytes }, signal);
10780
+ ctx.charge("parts", archive.entries.length);
10781
+ const parts = /* @__PURE__ */ new Map();
10782
+ for (const entry of archive.entries) {
10783
+ if (entry.symlink || entry.name.includes("\\") || entry.name.includes(":")) odtFailure(ctx, "Unsafe ODT package member");
10784
+ const chunks = [];
10785
+ let size = 0;
10786
+ for await (const chunk of codec.decodeZipEntry(entry, limits, signal)) {
10787
+ ctx.charge("expandedBytes", chunk.length);
10788
+ ctx.charge("retainedBytes", chunk.length * 2);
10789
+ chunks.push(chunk);
10790
+ size += chunk.length;
10791
+ }
10792
+ if (entry.directory) continue;
10793
+ const data = new Uint8Array(size);
10794
+ let offset = 0;
10795
+ for (const chunk of chunks) {
10796
+ data.set(chunk, offset);
10797
+ offset += chunk.length;
10798
+ }
10799
+ parts.set(entry.name, data);
10800
+ }
10801
+ if (new TextDecoder().decode(parts.get("mimetype")) !== odtMime) odtFailure(ctx, "Invalid or missing ODT mimetype");
10802
+ return parts;
10803
+ },
10804
+ async write(parts) {
10805
+ const entries = [];
10806
+ for (const [name, bytes] of parts) {
10807
+ ctx.charge("parts", 1);
10808
+ ctx.charge("expandedBytes", bytes.length);
10809
+ ctx.charge("retainedBytes", bytes.length);
10810
+ 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);
10811
+ if (name === "mimetype") {
10812
+ entry.localExtra = new Uint8Array();
10813
+ entry.centralExtra = new Uint8Array();
10814
+ }
10815
+ entries.push(entry);
10816
+ }
10817
+ return codec.writeZipArchive({ entries, comment: new Uint8Array() }, { ...limits, maxArchiveBytes: ctx.limits.outputBytes }, signal);
10818
+ }
10819
+ };
10820
+ }
10821
+ var attr3 = ["", [], []];
10822
+ var odtReader = { format: "odt", async read(input, ctx) {
10823
+ const parts = await odtPackage(ctx).read(input.bytes);
10824
+ const source = parts.get("content.xml") ?? odtFailure(ctx, "Missing ODT content.xml");
10825
+ const root = await parseOdtXml(source, ctx);
10826
+ if (root.uri !== odtNamespaces.office || root.name !== "document-content") odtFailure(ctx, "Invalid ODT content root");
10827
+ const bodies = odtChildren(root, "body", odtNamespaces.office).flatMap((body) => odtChildren(body, "text", odtNamespaces.office));
10828
+ if (bodies.length !== 1) odtFailure(ctx, "Expected one ODT text body");
10829
+ const styles = /* @__PURE__ */ new Map();
10830
+ const resources = /* @__PURE__ */ new Map();
10831
+ const collectStyles = (node) => {
10832
+ ctx.checkpoint();
10833
+ if (node.uri === odtNamespaces.style && node.name === "style" || node.uri === odtNamespaces.text && node.name === "list-style") styles.set(odtAttribute(node, "name", odtNamespaces.style), node);
10834
+ for (const child of node.children) if (typeof child !== "string") collectStyles(child);
10835
+ };
10836
+ if (parts.has("styles.xml")) collectStyles(await parseOdtXml(parts.get("styles.xml"), ctx));
10837
+ collectStyles(root);
10838
+ const styleChain = (name) => {
10839
+ const names = /* @__PURE__ */ new Set();
10840
+ while (name) {
10841
+ ctx.checkpoint();
10842
+ ctx.bound("depth", names.size + 1);
10843
+ if (names.has(name)) odtFailure(ctx, "Cyclic ODT style inheritance");
10844
+ names.add(name);
10845
+ const style = styles.get(name);
10846
+ name = style ? odtAttribute(style, "parent-style-name", odtNamespaces.style) : "";
10847
+ }
10848
+ return [...names];
10849
+ };
10850
+ const properties = (name) => {
10851
+ const result = /* @__PURE__ */ new Map();
10852
+ for (const parent of styleChain(name).reverse()) {
10853
+ const style = styles.get(parent);
10854
+ if (!style) continue;
10855
+ for (const child of odtChildren(style, "text-properties", odtNamespaces.style)) for (const prop of child.attrs) result.set(`${prop.uri}:${prop.name}`, prop.value);
10856
+ }
10857
+ return result;
10858
+ };
10859
+ const plainText = (node) => {
10860
+ ctx.checkpoint();
10861
+ return node.children.map((child) => typeof child === "string" ? child : plainText(child)).join("");
10862
+ };
10863
+ const count = (value, maximum) => {
10864
+ const n = value ? Number(value) : 1;
10865
+ if (!Number.isSafeInteger(n) || n < 1) odtFailure(ctx, "Invalid ODT repetition count");
10866
+ if (n > maximum) odtFailure(ctx, "ODT repetition limit exceeded", "E_LIMIT");
10867
+ ctx.checkpoint(n);
10868
+ return n;
10869
+ };
10870
+ const inlines2 = (nodes) => {
10871
+ const result = [];
10872
+ for (const node of nodes) {
10873
+ ctx.checkpoint();
10874
+ if (typeof node === "string") {
10875
+ if (node) result.push({ t: "Str", c: node });
10876
+ continue;
10877
+ }
10878
+ if (node.uri === odtNamespaces.text) {
10879
+ if (node.name === "s") {
10880
+ const n = count(odtAttribute(node, "c", odtNamespaces.text), ctx.limits.text);
10881
+ ctx.charge("retainedBytes", n * 2);
10882
+ result.push({ t: "Str", c: " ".repeat(n) });
10883
+ } else if (node.name === "tab") result.push({ t: "Str", c: " " });
10884
+ else if (node.name === "line-break") result.push({ t: "LineBreak" });
10885
+ else if (node.name === "a") result.push({ t: "Link", c: [attr3, inlines2(node.children), [odtAttribute(node, "href", xlink), ""]] });
10886
+ else if (node.name === "span") {
10887
+ let content2 = inlines2(node.children);
10888
+ const props = properties(odtAttribute(node, "style-name", odtNamespaces.text));
10889
+ const tags = [
10890
+ { tag: "Strong", enabled: props.get(`${fo}:font-weight`) === "bold" },
10891
+ { tag: "Emph", enabled: props.get(`${fo}:font-style`) === "italic" },
10892
+ { tag: "Strikeout", enabled: ["solid", "double"].includes(props.get(`${odtNamespaces.style}:text-line-through-style`) ?? "") },
10893
+ { tag: "Superscript", enabled: props.get(`${odtNamespaces.style}:text-position`)?.startsWith("super") ?? false },
10894
+ { tag: "Subscript", enabled: props.get(`${odtNamespaces.style}:text-position`)?.startsWith("sub") ?? false },
10895
+ { tag: "Underline", enabled: props.get(`${odtNamespaces.style}:text-underline-style`) === "solid" },
10896
+ { tag: "SmallCaps", enabled: props.get(`${fo}:font-variant`) === "small-caps" }
10897
+ ];
10898
+ for (const { tag, enabled } of tags) if (enabled) content2 = [{ t: tag, c: content2 }];
10899
+ result.push(...content2);
10900
+ } else if (["bookmark", "bookmark-start"].includes(node.name)) result.push({ t: "Span", c: [[odtAttribute(node, "name", odtNamespaces.text), [], []], []] });
10901
+ else if (!["bookmark-end", "soft-page-break"].includes(node.name)) odtFailure(ctx, `Unsupported ODT inline: ${node.name}`, "E_UNSUPPORTED_FEATURE");
10902
+ } else if (node.uri === odtNamespaces.draw && node.name === "frame") {
10903
+ const image = odtChildren(node, "image", odtNamespaces.draw)[0];
10904
+ if (!image) odtFailure(ctx, "Unsupported ODT drawing", "E_UNSUPPORTED_FEATURE");
10905
+ let name;
10906
+ try {
10907
+ name = decodeURIComponent(odtAttribute(image, "href", xlink));
10908
+ } catch {
10909
+ return odtFailure(ctx, "Invalid ODT image URI", "E_RESOURCE");
10910
+ }
10911
+ if (name.startsWith("./")) name = name.slice(2);
10912
+ if (!name || name.startsWith("/") || name.includes(":") || name.includes("\\") || name.split("/").some((part) => !part || part === "." || part === "..")) odtFailure(ctx, "Unsafe ODT image reference", "E_RESOURCE");
10913
+ const bytes = parts.get(name) ?? odtFailure(ctx, `Missing ODT image: ${name}`, "E_RESOURCE");
10914
+ if (!resources.has(name)) {
10915
+ ctx.charge("resourceBytes", bytes.length);
10916
+ resources.set(name, { id: name, bytes });
10917
+ }
10918
+ const attributes = [];
10919
+ for (const dimension of ["width", "height"]) {
10920
+ const value = odtAttribute(node, dimension, svg);
10921
+ if (value) attributes.push([dimension, value]);
10922
+ }
10923
+ result.push({ t: "Image", c: [["", [], attributes], [{ t: "Str", c: odtChildren(node, "desc", svg).map(plainText).join("") }], [name, odtChildren(node, "title", svg).map(plainText).join("")]] });
10924
+ } else odtFailure(ctx, `Unsupported ODT inline namespace: ${node.uri}`, "E_UNSUPPORTED_FEATURE");
10925
+ }
10926
+ return result;
10927
+ };
10928
+ const blocks3 = async (nodes, listLevel = 1) => {
10929
+ const result = [];
10930
+ for (const node of nodes) {
10931
+ await ctx.cooperate();
10932
+ if (typeof node === "string") {
10933
+ if (node.trim()) odtFailure(ctx, "Text outside ODT paragraph");
10934
+ continue;
10935
+ }
10936
+ if (node.uri === odtNamespaces.text && ["p", "h"].includes(node.name)) {
10937
+ const content2 = inlines2(node.children), names = styleChain(odtAttribute(node, "style-name", odtNamespaces.text));
10938
+ if (node.name === "h") result.push({ t: "Header", c: [count(odtAttribute(node, "outline-level", odtNamespaces.text), 6), attr3, content2] });
10939
+ else if (names.includes("Rule")) result.push({ t: "HorizontalRule" });
10940
+ 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("")] });
10941
+ else if (names.some((name) => ["Quote", "Quotations"].includes(name))) result.push({ t: "BlockQuote", c: [{ t: "Para", c: content2 }] });
10942
+ else result.push({ t: "Para", c: content2 });
10943
+ } else if (node.uri === odtNamespaces.text && node.name === "section") result.push({ t: "Div", c: [[odtAttribute(node, "name", odtNamespaces.text), [], []], await blocks3(node.children, listLevel)] });
10944
+ else if (node.uri === odtNamespaces.text && node.name === "list") {
10945
+ const style = styles.get(odtAttribute(node, "style-name", odtNamespaces.text));
10946
+ const level = style?.children.find((child) => typeof child !== "string" && child.uri === odtNamespaces.text && Number(odtAttribute(child, "level", odtNamespaces.text)) === listLevel);
10947
+ const items = odtChildren(node, "list-item", odtNamespaces.text), content2 = [];
10948
+ for (const item of items) content2.push(await blocks3(item.children, listLevel + 1));
10949
+ if (level?.name === "list-level-style-number") {
10950
+ const start = count(items[0] && odtAttribute(items[0], "start-value", odtNamespaces.text) || odtAttribute(level, "start-value", odtNamespaces.text), Number.MAX_SAFE_INTEGER);
10951
+ const style2 = { "1": "Decimal", a: "LowerAlpha", A: "UpperAlpha", i: "LowerRoman", I: "UpperRoman" }[odtAttribute(level, "num-format", odtNamespaces.style)] ?? "Decimal";
10952
+ result.push({ t: "OrderedList", c: [[start, style2, odtAttribute(level, "num-prefix", odtNamespaces.style) === "(" ? "TwoParens" : odtAttribute(level, "num-suffix", odtNamespaces.style) === ")" ? "OneParen" : "Period"], content2] });
10953
+ } else result.push({ t: "BulletList", c: content2 });
10954
+ } else if (node.uri === odtNamespaces.table && node.name === "table") {
10955
+ const head2 = [], rows = [];
10956
+ 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 }] : []);
10957
+ let columns = 0;
10958
+ for (const { row: row2, header } of rowNodes) {
10959
+ const cells = [];
10960
+ for (const cell2 of odtChildren(row2, "table-cell", odtNamespaces.table)) {
10961
+ 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");
10962
+ const repeat2 = count(odtAttribute(cell2, "number-columns-repeated", odtNamespaces.table), ctx.limits.tableColumns);
10963
+ const content2 = await blocks3(cell2.children);
10964
+ for (let i = 0; i < repeat2; i++) {
10965
+ ctx.charge("tableCells", 1);
10966
+ cells.push([attr3, "AlignDefault", 1, 1, content2]);
10967
+ }
10968
+ ctx.bound("tableColumns", cells.length);
10969
+ }
10970
+ columns = Math.max(columns, cells.length);
10971
+ const repeat = count(odtAttribute(row2, "number-rows-repeated", odtNamespaces.table), ctx.limits.tableRows);
10972
+ ctx.charge("tableCells", (repeat - 1) * cells.length);
10973
+ for (let i = 0; i < repeat; i++) (header ? head2 : rows).push([attr3, cells]);
10974
+ ctx.bound("tableRows", head2.length + rows.length);
10975
+ }
10976
+ const specs = Array.from({ length: columns }, () => ["AlignDefault", { t: "ColWidthDefault" }]);
10977
+ result.push({ t: "Table", c: [attr3, [null, []], specs, [attr3, head2], [[attr3, 0, [], rows]], [attr3, []]] });
10978
+ } else if (!(node.uri === odtNamespaces.text && ["sequence-decls", "tracked-changes"].includes(node.name))) odtFailure(ctx, `Unsupported ODT block: ${node.name}`, "E_UNSUPPORTED_FEATURE");
10979
+ }
10980
+ return result;
10981
+ };
10982
+ const metadata2 = {};
10983
+ if (parts.has("meta.xml")) {
10984
+ const meta2 = await parseOdtXml(parts.get("meta.xml"), ctx);
10985
+ 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) };
10986
+ }
10987
+ const content = await blocks3(bodies[0].children);
10988
+ return { blocks: content, metadata: metadata2, resources: [...resources.values()] };
10989
+ } };
10990
+ var odtWriter = { format: "odt", imageResources: "embed", async write(document, ctx) {
10991
+ const parts = /* @__PURE__ */ new Map([["mimetype", new TextEncoder().encode(odtMime)]]);
10992
+ const mediaTypes = /* @__PURE__ */ new Map();
10993
+ const images = /* @__PURE__ */ new Map();
10994
+ const styles = /* @__PURE__ */ new Map();
10995
+ let serial = 0;
10996
+ const escaped = (value) => {
10997
+ ctx.checkpoint(value.length);
10998
+ for (const ch of value) {
10999
+ const code = ch.codePointAt(0);
11000
+ if (code < 32 && ![9, 10, 13].includes(code) || code === 65534 || code === 65535) odtFailure(ctx, "Invalid XML character");
11001
+ }
11002
+ const result = encodeXML(value);
11003
+ ctx.charge("retainedBytes", result.length * 2);
11004
+ return result;
11005
+ };
11006
+ const text = (value) => escaped(value).split(" ").join("<text:s/>").split(" ").join("<text:tab/>").split("\n").join("<text:line-break/>");
11007
+ 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"' };
11008
+ 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>`);
11009
+ styles.set("Rule", '<style:style style:name="Rule" style:family="paragraph"><style:paragraph-properties fo:border-bottom="0.5pt solid #000000"/></style:style>');
11010
+ styles.set("Preformatted", '<style:style style:name="Preformatted" style:family="paragraph"><style:text-properties fo:font-family="monospace"/></style:style>');
11011
+ const inlines2 = async (nodes) => {
11012
+ const output = [];
11013
+ for (const node of nodes) {
11014
+ await ctx.cooperate();
11015
+ switch (node.t) {
11016
+ case "Str":
11017
+ output.push(text(node.c));
11018
+ break;
11019
+ case "Space":
11020
+ case "SoftBreak":
11021
+ output.push("<text:s/>");
11022
+ break;
11023
+ case "LineBreak":
11024
+ output.push("<text:line-break/>");
11025
+ break;
11026
+ case "Strong":
11027
+ case "Emph":
11028
+ case "Strikeout":
11029
+ case "Superscript":
11030
+ case "Subscript":
11031
+ case "Underline":
11032
+ case "SmallCaps":
11033
+ output.push(`<text:span text:style-name="${node.t}">${await inlines2(node.c)}</text:span>`);
11034
+ break;
11035
+ case "Code":
11036
+ output.push(`<text:span text:style-name="Code">${text(node.c[1])}</text:span>`);
11037
+ break;
11038
+ case "Span":
11039
+ output.push(await inlines2(node.c[1]));
11040
+ break;
11041
+ case "Quoted":
11042
+ output.push((node.c[0] === "SingleQuote" ? "\u2018" : "\u201C") + await inlines2(node.c[1]) + (node.c[0] === "SingleQuote" ? "\u2019" : "\u201D"));
11043
+ break;
11044
+ case "Link":
11045
+ output.push(`<text:a xlink:type="simple" xlink:href="${escaped(node.c[2][0])}">${await inlines2(node.c[1])}</text:a>`);
11046
+ break;
11047
+ case "Image": {
11048
+ const source = node.c[2][0];
11049
+ let image = images.get(source);
11050
+ ctx.charge("images", 1);
11051
+ if (!image) {
11052
+ const bytes = document.resources.find((r) => r.id === source)?.bytes ?? await ctx.resources?.resolve(source, void 0, ctx.signal);
11053
+ if (!bytes) odtFailure(ctx, `Missing image resource: ${source}`, "E_RESOURCE");
11054
+ ctx.charge("resourceBytes", bytes.length);
11055
+ const { Image, DocumentBudget } = await import("./src-ICMQISAA.js");
11056
+ 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 }) });
11057
+ image = { name: `Pictures/image-${images.size + 1}.${asset.ext}`, width: asset.width.emu, height: asset.height.emu };
11058
+ images.set(source, image);
11059
+ parts.set(image.name, bytes);
11060
+ mediaTypes.set(image.name, asset.content_type);
11061
+ }
11062
+ const attrs = Object.fromEntries(node.c[0][2]);
11063
+ let width = imageLength(attrs.width, image.width, ctx, "odt"), height = imageLength(attrs.height, image.height, ctx, "odt");
11064
+ if (attrs.width && !attrs.height) height = width * image.height / image.width;
11065
+ if (attrs.height && !attrs.width) width = height * image.width / image.height;
11066
+ 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>`);
11067
+ break;
11068
+ }
11069
+ default:
11070
+ odtFailure(ctx, `Unsupported ODT inline: ${node.t}`, "E_UNSUPPORTED_FEATURE");
11071
+ }
11072
+ }
11073
+ return output.join("");
11074
+ };
11075
+ const blocks3 = async (nodes, paragraphStyle = "", listLevel = 1) => {
11076
+ const output = [];
11077
+ for (const node of nodes) {
11078
+ await ctx.cooperate();
11079
+ switch (node.t) {
11080
+ case "Para":
11081
+ case "Plain":
11082
+ output.push(`<text:p${paragraphStyle ? ` text:style-name="${paragraphStyle}"` : ""}>${await inlines2(node.c)}</text:p>`);
11083
+ break;
11084
+ case "Header":
11085
+ output.push(`<text:h text:outline-level="${node.c[0]}">${await inlines2(node.c[2])}</text:h>`);
11086
+ break;
11087
+ case "CodeBlock":
11088
+ output.push(`<text:p text:style-name="Preformatted">${text(node.c[1])}</text:p>`);
11089
+ break;
11090
+ case "BlockQuote":
11091
+ output.push(await blocks3(node.c, "Quotations", listLevel));
11092
+ break;
11093
+ case "HorizontalRule":
11094
+ output.push('<text:p text:style-name="Rule"/>');
11095
+ break;
11096
+ case "Div":
11097
+ output.push(`<text:section text:name="${escaped(node.c[0][0] || `Section${++serial}`)}">${await blocks3(node.c[1], paragraphStyle, listLevel)}</text:section>`);
11098
+ break;
11099
+ case "BulletList":
11100
+ case "OrderedList": {
11101
+ const name = `List${++serial}`, ordered = node.t === "OrderedList";
11102
+ const format2 = ordered ? { DefaultStyle: "1", Decimal: "1", LowerAlpha: "a", UpperAlpha: "A", LowerRoman: "i", UpperRoman: "I" }[node.c[0][1]] : void 0;
11103
+ if (ordered && !format2) odtFailure(ctx, "Unsupported ODT list style", "E_UNSUPPORTED_FEATURE");
11104
+ 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>`);
11105
+ const items = [];
11106
+ for (const item of ordered ? node.c[1] : node.c) items.push(`<text:list-item>${await blocks3(item, paragraphStyle, listLevel + 1)}</text:list-item>`);
11107
+ output.push(`<text:list text:style-name="${name}">${items.join("")}</text:list>`);
11108
+ break;
11109
+ }
11110
+ case "Table": {
11111
+ output.push(await blocks3(node.c[1][1]));
11112
+ if (!node.c[1][1].length && node.c[1][0]) output.push(`<text:p>${await inlines2(node.c[1][0])}</text:p>`);
11113
+ output.push(`<table:table table:name="Table${++serial}"><table:table-column table:number-columns-repeated="${node.c[2].length}"/>`);
11114
+ 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]]) {
11115
+ if (header && rows.length) output.push("<table:table-header-rows>");
11116
+ for (const row2 of rows) {
11117
+ output.push("<table:table-row>");
11118
+ for (const cell2 of row2[1]) {
11119
+ if (cell2[2] !== 1 || cell2[3] !== 1) odtFailure(ctx, "ODT table spans are unsupported", "E_UNSUPPORTED_FEATURE");
11120
+ output.push(`<table:table-cell office:value-type="string">${await blocks3(cell2[4], header ? "Table_20_Heading" : "Table_20_Contents")}</table:table-cell>`);
11121
+ }
11122
+ output.push("</table:table-row>");
11123
+ }
11124
+ if (header && rows.length) output.push("</table:table-header-rows>");
11125
+ }
11126
+ output.push("</table:table>");
11127
+ break;
11128
+ }
11129
+ default:
11130
+ odtFailure(ctx, `Unsupported ODT block: ${node.t}`, "E_UNSUPPORTED_FEATURE");
11131
+ }
11132
+ }
11133
+ const value = output.join("");
11134
+ ctx.bound("outputBytes", value.length);
11135
+ ctx.charge("retainedBytes", value.length * 2);
11136
+ return value;
11137
+ };
11138
+ const content = await blocks3(document.blocks);
11139
+ const namespaces2 = Object.entries(odtNamespaces).map(([key, value]) => `xmlns:${key}="${value}"`).join(" ") + ` xmlns:fo="${fo}" xmlns:xlink="${xlink}" xmlns:svg="${svg}"`;
11140
+ const put = (name, xml) => {
11141
+ ctx.bound("outputBytes", xml.length);
11142
+ parts.set(name, new TextEncoder().encode(xml));
11143
+ };
11144
+ 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>`);
11145
+ 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>`);
11146
+ const title = document.metadata.title;
11147
+ 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>`);
11148
+ 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>`);
11149
+ return { kind: "binary", bytes: await odtPackage(ctx).write(parts) };
11150
+ } };
11151
+ var odt_default = {
11152
+ name: "odt",
11153
+ reader: odtReader,
11154
+ writer: odtWriter,
11155
+ read: true,
11156
+ write: true,
11157
+ media: "binary",
11158
+ inputEncoding: "bytes",
11159
+ suffixes: ["odt"],
11160
+ extensions: {},
11161
+ options: { read: [], write: ["standalone"] },
11162
+ inputBudget: "compressedBytes"
11163
+ };
10646
11164
  var pptx_default = {
10647
11165
  name: "pptx",
10648
11166
  read: true,
@@ -10653,7 +11171,7 @@ var pptx_default = {
10653
11171
  format: "pptx",
10654
11172
  async read(input, context, selection) {
10655
11173
  context.signal?.throwIfAborted();
10656
- const { pptxReader } = await import("./pptx-GBPNWNEP-7EQEVXV5.js");
11174
+ const { pptxReader } = await import("./pptx-7G52EJ6L-4JACH5FB.js");
10657
11175
  context.signal?.throwIfAborted();
10658
11176
  return pptxReader.read(input, context, selection);
10659
11177
  }
@@ -10662,7 +11180,7 @@ var pptx_default = {
10662
11180
  format: "pptx",
10663
11181
  async write(document, context, selection) {
10664
11182
  context.signal?.throwIfAborted();
10665
- const { pptxWriter } = await import("./pptx-GBPNWNEP-7EQEVXV5.js");
11183
+ const { pptxWriter } = await import("./pptx-7G52EJ6L-4JACH5FB.js");
10666
11184
  context.signal?.throwIfAborted();
10667
11185
  return pptxWriter.write(document, context, selection);
10668
11186
  }
@@ -10674,7 +11192,7 @@ var pptx_default = {
10674
11192
  write: ["standalone"]
10675
11193
  }
10676
11194
  };
10677
- var attr3 = ["", [], []];
11195
+ var attr4 = ["", [], []];
10678
11196
  var xlsxReader = { format: "xlsx", async read(input, ctx) {
10679
11197
  const l = ctx.limits;
10680
11198
  const context = {
@@ -10709,7 +11227,7 @@ var xlsxReader = { format: "xlsx", async read(input, ctx) {
10709
11227
  ctx.bound("nodes", ++nodes);
10710
11228
  const title = await literalInlines(sheet.name, ctx, nodes);
10711
11229
  nodes += title.length;
10712
- blocks3.push({ t: "Header", c: [1, attr3, title] });
11230
+ blocks3.push({ t: "Header", c: [1, attr4, title] });
10713
11231
  if (!sheet.cells.length) continue;
10714
11232
  let height = 0, width = 0;
10715
11233
  for (const cell2 of sheet.cells) {
@@ -10734,13 +11252,13 @@ var xlsxReader = { format: "xlsx", async read(input, ctx) {
10734
11252
  const inlines2 = await literalInlines(text, ctx, nodes);
10735
11253
  nodes += inlines2.length;
10736
11254
  if (inlines2.length) ctx.bound("nodes", ++nodes);
10737
- row2.push([attr3, "AlignDefault", 1, 1, inlines2.length ? [{ t: "Plain", c: inlines2 }] : []]);
11255
+ row2.push([attr4, "AlignDefault", 1, 1, inlines2.length ? [{ t: "Plain", c: inlines2 }] : []]);
10738
11256
  }
10739
- rows.push([attr3, row2]);
11257
+ rows.push([attr4, row2]);
10740
11258
  }
10741
11259
  ctx.bound("nodes", ++nodes);
10742
11260
  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, []]] });
11261
+ blocks3.push({ t: "Table", c: [attr4, [null, []], Array.from({ length: width }, () => ["AlignDefault", { t: "ColWidthDefault" }]), [attr4, [head2]], [[attr4, 0, [], rows]], [attr4, []]] });
10744
11262
  }
10745
11263
  return { blocks: blocks3, metadata: {}, resources: [] };
10746
11264
  } catch (error) {
@@ -10779,6 +11297,7 @@ var coreFormats = [
10779
11297
  epub_default,
10780
11298
  pdf_default,
10781
11299
  docx_default,
11300
+ odt_default,
10782
11301
  pptx_default,
10783
11302
  xlsx_default
10784
11303
  ];
@@ -10927,6 +11446,7 @@ var defaultLimits = Object.freeze({
10927
11446
  resources: Infinity,
10928
11447
  diagnostics: Infinity,
10929
11448
  references: Infinity,
11449
+ yamlAliases: Infinity,
10930
11450
  entities: Infinity,
10931
11451
  entityBytes: Infinity,
10932
11452
  work: Infinity,
@@ -19706,9 +20226,28 @@ async function resolveConversionArgs(args, files, signal, context = {}) {
19706
20226
  if (document.errors.length) execution.fail("E_OPTION", "Invalid YAML defaults");
19707
20227
  let value;
19708
20228
  try {
19709
- value = document.toJS({ maxAliasCount: 0 });
19710
- } catch {
19711
- execution.fail("E_OPTION", "YAML defaults aliases are unsupported");
20229
+ value = document.toJS({ maxAliasCount: execution.limits.yamlAliases === Infinity ? -1 : execution.limits.yamlAliases });
20230
+ } catch (error) {
20231
+ if (error instanceof ReferenceError && (execution.limits.yamlAliases === 0 || error.message.includes("alias count"))) execution.fail("E_LIMIT", "YAML defaults alias expansion limit exceeded");
20232
+ execution.fail("E_OPTION", "Invalid YAML defaults aliases");
20233
+ }
20234
+ const active = /* @__PURE__ */ new Set(), visited = /* @__PURE__ */ new Set();
20235
+ const pending = [{ value, depth: 0 }];
20236
+ while (pending.length) {
20237
+ const item = pending.pop();
20238
+ if (!item.value || typeof item.value !== "object") continue;
20239
+ if (item.leave) {
20240
+ active.delete(item.value);
20241
+ visited.add(item.value);
20242
+ continue;
20243
+ }
20244
+ if (visited.has(item.value)) continue;
20245
+ if (active.has(item.value)) execution.fail("E_OPTION", "Cyclic YAML defaults are unsupported");
20246
+ await execution.cooperate();
20247
+ execution.bound("depth", item.depth);
20248
+ active.add(item.value);
20249
+ pending.push({ ...item, leave: true });
20250
+ for (const child of Object.values(item.value)) pending.push({ value: child, depth: item.depth + 1 });
19712
20251
  }
19713
20252
  if (!value || typeof value !== "object" || Array.isArray(value)) execution.fail("E_OPTION", "Defaults must be a YAML map");
19714
20253
  for (const [raw, entry] of Object.entries(value)) {