@poe-platform/safe-bash 0.1.811 → 0.1.813

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 (351) hide show
  1. package/dist/audio-ast/id3-source.d.ts +27 -0
  2. package/dist/audio-ast/index.d.ts +5 -0
  3. package/dist/audio-ast/index.js +1001 -596
  4. package/dist/audio-ast/mp3-source.d.ts +18 -0
  5. package/dist/audio-ast/ogg-source.d.ts +25 -0
  6. package/dist/audio-ast/ogg-stream-source.d.ts +22 -0
  7. package/dist/audio-ast/vorbis.d.ts +14 -0
  8. package/dist/image-ast/index.js +139 -9
  9. package/dist/mp4-ast/containers/adapters.d.ts +7 -0
  10. package/dist/office-xml/retained-xml-document.d.ts +8 -0
  11. package/dist/pdf-ast/ast.d.ts +2 -0
  12. package/dist/pdf-ast/content/dictionary-cursor.d.ts +15 -0
  13. package/dist/pdf-ast/content/range-operator-parser.d.ts +4 -0
  14. package/dist/pdf-ast/content/stored-dictionary.d.ts +10 -0
  15. package/dist/pdf-ast/cos/lexer.d.ts +8 -5
  16. package/dist/pdf-ast/cos/object-reader.d.ts +4 -3
  17. package/dist/pdf-ast/cos/range-parser.d.ts +4 -0
  18. package/dist/pdf-ast/cos/retained-objects.d.ts +1 -0
  19. package/dist/pdf-ast/cos/retained-writer.d.ts +1 -0
  20. package/dist/pdf-ast/cos/value-parser.d.ts +32 -2
  21. package/dist/pdf-ast/edit/retained-append-attachments.d.ts +13 -0
  22. package/dist/pdf-ast/edit/retained-bookmarks.d.ts +13 -0
  23. package/dist/pdf-ast/edit/retained-graph.d.ts +6 -0
  24. package/dist/pdf-ast/edit/retained-save.d.ts +2 -0
  25. package/dist/pdf-ast/edit/retained-stamps.d.ts +9 -0
  26. package/dist/pdf-ast/extract/retained-form-field-details.d.ts +20 -0
  27. package/dist/pdf-ast/extract/retained-form-fields.d.ts +17 -4
  28. package/dist/pdf-ast/fonts/resolve.d.ts +3 -1
  29. package/dist/pdf-ast/index.d.ts +4 -1
  30. package/dist/pdf-ast/index.js +2127 -975
  31. package/dist/pdf-ast/retained-document.d.ts +4 -0
  32. package/dist/safe-bash/audio-ast.browser.js +7 -1
  33. package/dist/safe-bash/chunks/{chunk-HHSOUC3Z.js → chunk-HPQE675Q.js} +1 -1
  34. package/dist/safe-bash/chunks/{chunk-BUYRKFW2.js → chunk-I6ECNJMR.js} +1 -1
  35. package/dist/safe-bash/chunks/{pdftk-WRYEP3CA.js → pdftk-Y2TX74LY.js} +2 -1
  36. package/dist/safe-bash/command-chunks/biff-4ALVARRF-7SRX6R6N.js +5192 -0
  37. package/dist/safe-bash/command-chunks/{chunk-EHSM5ZQS.js → chunk-2DGJOOXM.js} +8 -8
  38. package/dist/safe-bash/command-chunks/{chunk-Q6S57NOQ.js → chunk-2E2H7MBH.js} +7 -7
  39. package/dist/safe-bash/command-chunks/{chunk-MMBZTYXO.js → chunk-2PQRZDNR.js} +221 -0
  40. package/dist/safe-bash/command-chunks/{chunk-5OO2P27R.js → chunk-2V6FOLXV.js} +78 -25
  41. package/dist/safe-bash/command-chunks/{chunk-56NYSX65.js → chunk-2Z3WRRFT.js} +9 -9
  42. package/dist/safe-bash/command-chunks/chunk-3D24WDND.js +63 -0
  43. package/dist/safe-bash/command-chunks/{chunk-47NEG4UO.js → chunk-3JST2Q7G.js} +219 -43
  44. package/dist/safe-bash/command-chunks/{chunk-WGG6G2KG.js → chunk-3LJAXFH5.js} +7 -7
  45. package/dist/safe-bash/command-chunks/{chunk-AHA6IWAJ.js → chunk-3TYDSGAH.js} +6 -6
  46. package/dist/safe-bash/command-chunks/{chunk-YSMNXMAO.js → chunk-3Y4XZB24.js} +4 -4
  47. package/dist/safe-bash/command-chunks/{chunk-ZIIO6GRY.js → chunk-4PBNMKAT.js} +7 -7
  48. package/dist/safe-bash/command-chunks/{chunk-JFYWVQ4V.js → chunk-4Z6W5EOC.js} +8 -8
  49. package/dist/safe-bash/command-chunks/{chunk-GEM47B2P.js → chunk-57DDYKE5.js} +7 -7
  50. package/dist/safe-bash/command-chunks/{chunk-HARUYHH7.js → chunk-5HUICAWD.js} +1 -1
  51. package/dist/safe-bash/command-chunks/{chunk-4CKFNXRN.js → chunk-5IFRAI7Y.js} +1 -1
  52. package/dist/safe-bash/command-chunks/{chunk-RHYJVTJO.js → chunk-5KGEZ3RW.js} +2 -2
  53. package/dist/safe-bash/command-chunks/{chunk-A5FZBR7X.js → chunk-5MFDRSGG.js} +4 -4
  54. package/dist/safe-bash/command-chunks/{chunk-7GKKMNL6.js → chunk-5P6I2T63.js} +8 -8
  55. package/dist/safe-bash/command-chunks/{chunk-6M6TM5Z5.js → chunk-5VQVZPP3.js} +3 -3
  56. package/dist/safe-bash/command-chunks/{chunk-MIRL7HTF.js → chunk-6244HYJY.js} +1 -1
  57. package/dist/safe-bash/command-chunks/chunk-63EMPQ7Z.js +115 -0
  58. package/dist/safe-bash/command-chunks/{chunk-XRVKWGVQ.js → chunk-6CY5BHBS.js} +6 -6
  59. package/dist/safe-bash/command-chunks/{chunk-XVP6V5K3.js → chunk-6IWE7PTK.js} +6 -6
  60. package/dist/safe-bash/command-chunks/{chunk-6QBMND4A.js → chunk-6SRHWVEB.js} +1 -1
  61. package/dist/safe-bash/command-chunks/chunk-6ZHQB453.js +35 -0
  62. package/dist/safe-bash/command-chunks/chunk-73NYFNAS.js +173 -0
  63. package/dist/safe-bash/command-chunks/{chunk-VU3EQF7F.js → chunk-7NXTEWPR.js} +229 -75
  64. package/dist/safe-bash/command-chunks/{chunk-554Z6IKP.js → chunk-7PRL6RJ6.js} +2 -2
  65. package/dist/safe-bash/command-chunks/{chunk-SDTPO2VV.js → chunk-7PZHWMK6.js} +7 -7
  66. package/dist/safe-bash/command-chunks/{chunk-XZ2FWFNV.js → chunk-7QZ2HP2F.js} +6 -6
  67. package/dist/safe-bash/command-chunks/{chunk-OEJM666F.js → chunk-7UC2Q6Z6.js} +5 -5
  68. package/dist/safe-bash/command-chunks/{chunk-COKYZUBW.js → chunk-AJI55RS7.js} +1 -1
  69. package/dist/safe-bash/command-chunks/{chunk-2VCKUNDZ.js → chunk-B2C3UPJS.js} +27 -17
  70. package/dist/safe-bash/command-chunks/{chunk-WXRYDALR.js → chunk-BBAB7LC4.js} +4 -4
  71. package/dist/safe-bash/command-chunks/{chunk-QYMEASQ6.js → chunk-BEHUSUOY.js} +4 -4
  72. package/dist/safe-bash/command-chunks/{chunk-Z2JW6M2D.js → chunk-BK7ISUJL.js} +3 -3
  73. package/dist/safe-bash/command-chunks/{chunk-33YCKZZX.js → chunk-C5KLFZGT.js} +6 -6
  74. package/dist/safe-bash/command-chunks/{chunk-TVH4JORU.js → chunk-C5QDEB3I.js} +3 -3
  75. package/dist/safe-bash/command-chunks/{chunk-N4R2SHSS.js → chunk-CCZZVCHX.js} +2 -2
  76. package/dist/safe-bash/command-chunks/{chunk-2VLAXKTS.js → chunk-CTDC4LJT.js} +121 -85
  77. package/dist/safe-bash/command-chunks/{chunk-S6R3IB36.js → chunk-D55REQA3.js} +1 -1
  78. package/dist/safe-bash/command-chunks/{chunk-Y4EYCZFT.js → chunk-D6WJY6QO.js} +10 -10
  79. package/dist/safe-bash/command-chunks/{chunk-2CORNDGF.js → chunk-DBLHCJJU.js} +2 -2
  80. package/dist/safe-bash/command-chunks/{chunk-SPW4GW4Z.js → chunk-DFI7QF3M.js} +2 -2
  81. package/dist/safe-bash/command-chunks/{chunk-456PHA3L.js → chunk-DMCI6T6N.js} +1 -1
  82. package/dist/safe-bash/command-chunks/{chunk-TW73OXPR.js → chunk-EJTNVXWF.js} +6 -6
  83. package/dist/safe-bash/command-chunks/{chunk-QD7ZRDUN.js → chunk-ET2VPDUA.js} +1 -1
  84. package/dist/safe-bash/command-chunks/{chunk-5LI2DLNZ.js → chunk-EXOQGXEU.js} +26 -26
  85. package/dist/safe-bash/command-chunks/{chunk-CRV2Q3PB.js → chunk-EZ4NQIPL.js} +1 -1
  86. package/dist/safe-bash/command-chunks/chunk-FWKLBDMK.js +0 -0
  87. package/dist/safe-bash/command-chunks/{chunk-22MOB45U.js → chunk-FWPVQGYK.js} +6 -6
  88. package/dist/safe-bash/command-chunks/{chunk-QC5RMGSA.js → chunk-G3RUXKVY.js} +3 -3
  89. package/dist/safe-bash/command-chunks/{chunk-JYUJAF4L.js → chunk-G7NENPYV.js} +4 -0
  90. package/dist/safe-bash/command-chunks/{chunk-KCOJA7EM.js → chunk-GKILM4HZ.js} +7 -7
  91. package/dist/safe-bash/command-chunks/{chunk-HTVIYLVB.js → chunk-GNXTMSYN.js} +4 -4
  92. package/dist/safe-bash/command-chunks/{chunk-D2ASPM7R.js → chunk-GOBUDKZ3.js} +3 -3
  93. package/dist/safe-bash/command-chunks/{chunk-RNSKXOG3.js → chunk-GVWVRPG6.js} +6 -6
  94. package/dist/safe-bash/command-chunks/{chunk-ZHRGYR7B.js → chunk-HCKYUQ3L.js} +7 -7
  95. package/dist/safe-bash/command-chunks/{chunk-AGLK7OJR.js → chunk-HDSIIQBS.js} +1 -1
  96. package/dist/safe-bash/command-chunks/{chunk-DM2CPMB4.js → chunk-HKOMXGJS.js} +2 -2
  97. package/dist/safe-bash/command-chunks/{chunk-IT7TAC3F.js → chunk-HVW53ARH.js} +16 -16
  98. package/dist/safe-bash/command-chunks/{chunk-M7QE2MN7.js → chunk-I4GMCWAT.js} +6 -6
  99. package/dist/safe-bash/command-chunks/{chunk-5MB64DWR.js → chunk-IHSOOSNC.js} +9 -9
  100. package/dist/safe-bash/command-chunks/{chunk-LCZDBW55.js → chunk-JAHJWVGF.js} +5 -5
  101. package/dist/safe-bash/command-chunks/{chunk-MOZD7RUY.js → chunk-JORIVUPM.js} +27 -11
  102. package/dist/safe-bash/command-chunks/{chunk-PMAM4N33.js → chunk-JUJHYPYL.js} +9 -9
  103. package/dist/safe-bash/command-chunks/{chunk-ENT3IV2G.js → chunk-KBUBSMCQ.js} +12 -12
  104. package/dist/safe-bash/command-chunks/{chunk-ZXR6LXV5.js → chunk-KCE5D4Z4.js} +48 -4
  105. package/dist/safe-bash/command-chunks/{chunk-FIIAYCWS.js → chunk-KZ5ODST6.js} +2 -2
  106. package/dist/safe-bash/command-chunks/{chunk-PNGDJA6M.js → chunk-LD7BONZY.js} +2 -2
  107. package/dist/safe-bash/command-chunks/{chunk-KJ4XXZIL.js → chunk-M3Z5PU2M.js} +582 -59
  108. package/dist/safe-bash/command-chunks/{chunk-LXLLA4PM.js → chunk-MKX4JAZ6.js} +17 -17
  109. package/dist/safe-bash/command-chunks/{chunk-RQIQ75W5.js → chunk-MNHBQBF6.js} +5 -5
  110. package/dist/safe-bash/command-chunks/{chunk-A2CLZMQZ.js → chunk-MPKY37QR.js} +1 -1
  111. package/dist/safe-bash/command-chunks/{chunk-K5GB2YMN.js → chunk-MUUWBZIC.js} +10 -10
  112. package/dist/safe-bash/command-chunks/{chunk-JOCFI7TG.js → chunk-N32GSM3J.js} +1 -1
  113. package/dist/safe-bash/command-chunks/{chunk-EUT24Y5Z.js → chunk-NKTULXVD.js} +8 -8
  114. package/dist/safe-bash/command-chunks/{chunk-5HPU7D36.js → chunk-NMPED6L5.js} +4 -4
  115. package/dist/safe-bash/command-chunks/{chunk-QZZ73J2O.js → chunk-NPFHUS4X.js} +6 -6
  116. package/dist/safe-bash/command-chunks/{chunk-X7FA7ZD5.js → chunk-O675URF4.js} +8 -8
  117. package/dist/safe-bash/command-chunks/{chunk-R6EGGK5M.js → chunk-P7EL2FWW.js} +7 -7
  118. package/dist/safe-bash/command-chunks/{chunk-YS25EI54.js → chunk-PCCFLPUQ.js} +2 -2
  119. package/dist/safe-bash/command-chunks/{chunk-RRL3Y562.js → chunk-PI6MOMHA.js} +11 -11
  120. package/dist/safe-bash/command-chunks/{chunk-26VCZHLJ.js → chunk-PIOQBOEK.js} +1 -1
  121. package/dist/safe-bash/command-chunks/chunk-PK36TVXB.js +175 -0
  122. package/dist/safe-bash/command-chunks/{chunk-72C3TZ2U.js → chunk-PKLJRB7W.js} +264 -129
  123. package/dist/safe-bash/command-chunks/{chunk-6CCQI6XZ.js → chunk-PSCOXGCA.js} +12 -12
  124. package/dist/safe-bash/command-chunks/{chunk-XPD636C4.js → chunk-PVGZMLC6.js} +3 -3
  125. package/dist/safe-bash/command-chunks/{chunk-JQVHUSDD.js → chunk-PXWS3Q7L.js} +5 -5
  126. package/dist/safe-bash/command-chunks/{chunk-HDJVJTCK.js → chunk-QFF5KBOM.js} +9 -9
  127. package/dist/safe-bash/command-chunks/{chunk-MPUHH2KR.js → chunk-QM2HZJSJ.js} +3 -3
  128. package/dist/safe-bash/command-chunks/{chunk-UAXSE3XE.js → chunk-R2BMZAHG.js} +5 -5
  129. package/dist/safe-bash/command-chunks/{chunk-KB7DUBVL.js → chunk-RGOQKIG6.js} +5 -5
  130. package/dist/safe-bash/command-chunks/{chunk-D2KZ66W4.js → chunk-RLCQ7BN3.js} +187 -39
  131. package/dist/safe-bash/command-chunks/{chunk-B5LDP7AA.js → chunk-S2N2V5U4.js} +2 -2
  132. package/dist/safe-bash/command-chunks/{chunk-OA75SGN2.js → chunk-SGPCXAG7.js} +7 -7
  133. package/dist/safe-bash/command-chunks/{chunk-Z5QOVRVH.js → chunk-SU26FZLJ.js} +1 -1
  134. package/dist/safe-bash/command-chunks/{chunk-QUM3SYAJ.js → chunk-SYSX46IV.js} +3 -3
  135. package/dist/safe-bash/command-chunks/chunk-T3E5RV3U.js +737 -0
  136. package/dist/safe-bash/command-chunks/{chunk-YORJDX4V.js → chunk-T5ERNELL.js} +4 -4
  137. package/dist/safe-bash/command-chunks/{chunk-KL3OIBKB.js → chunk-T6C5QP7T.js} +6495 -6343
  138. package/dist/safe-bash/command-chunks/{chunk-ATTWQVR2.js → chunk-TKRLZIFI.js} +17 -17
  139. package/dist/safe-bash/command-chunks/{chunk-ZMHEGDU2.js → chunk-TODWFDYB.js} +2 -2
  140. package/dist/safe-bash/command-chunks/{chunk-YSY6R6AS.js → chunk-TQEB4DH4.js} +703 -102
  141. package/dist/safe-bash/command-chunks/{chunk-36XGIPOG.js → chunk-U5TWQFZY.js} +1 -1
  142. package/dist/safe-bash/command-chunks/{chunk-APEWTWCC.js → chunk-UAF4IX5H.js} +6 -6
  143. package/dist/safe-bash/command-chunks/{chunk-6VPQ3CDZ.js → chunk-V37D6AHO.js} +5 -5
  144. package/dist/safe-bash/command-chunks/{chunk-RID6VYS3.js → chunk-V6XBEYPC.js} +8 -8
  145. package/dist/safe-bash/command-chunks/{chunk-WJCN2IXI.js → chunk-VQOINPVF.js} +2 -2
  146. package/dist/safe-bash/command-chunks/{chunk-W5YSINXC.js → chunk-VVWXY6IA.js} +6 -6
  147. package/dist/safe-bash/command-chunks/{chunk-HKATEVAP.js → chunk-WPVBUVFK.js} +6 -6
  148. package/dist/safe-bash/command-chunks/{chunk-UYWSIIUX.js → chunk-X53AEG36.js} +7 -7
  149. package/dist/safe-bash/command-chunks/{chunk-L5MCW6CM.js → chunk-X64XGIXZ.js} +9 -155
  150. package/dist/safe-bash/command-chunks/{chunk-Q73EMLLZ.js → chunk-X6RHJ6YN.js} +84 -5
  151. package/dist/safe-bash/command-chunks/{chunk-7PVHO47B.js → chunk-XG6UWQV5.js} +6 -6
  152. package/dist/safe-bash/command-chunks/{chunk-NQDIT667.js → chunk-XIDGHIGB.js} +5 -5
  153. package/dist/safe-bash/command-chunks/{chunk-DPR5CYQV.js → chunk-XITDDJFT.js} +2 -0
  154. package/dist/safe-bash/command-chunks/{chunk-CV7M2QJU.js → chunk-XLYIVBAR.js} +7 -7
  155. package/dist/safe-bash/command-chunks/{chunk-WVMHRNXZ.js → chunk-YUXTK3XA.js} +3 -3
  156. package/dist/safe-bash/command-chunks/{chunk-SPLOIABU.js → chunk-YXD6VGVG.js} +3 -3
  157. package/dist/safe-bash/command-chunks/{chunk-2ZFLMWOX.js → chunk-Z5BIM5B7.js} +1 -1
  158. package/dist/safe-bash/command-chunks/chunk-ZYLGNIGA.js +156 -0
  159. package/dist/safe-bash/command-chunks/{command-engine-BEWABZ75.js → command-engine-X3OLN7N6.js} +206 -86
  160. package/dist/safe-bash/command-chunks/{engine-AXXFTGCL-QBQNBI6K.js → engine-XUCIFZ7V-LJFGZM6O.js} +1 -1
  161. package/dist/safe-bash/command-chunks/paradox-4FCZE53D-LQPGVMEL.js +365 -0
  162. package/dist/safe-bash/commands/pandoc/index.browser.js +1 -1
  163. package/dist/safe-bash/full-core.browser.js +2 -2
  164. package/dist/safe-bash/plugins/index.browser.js +2 -2
  165. package/dist/safe-bash-command-apply-patch/apply.js +4 -4
  166. package/dist/safe-bash-command-apply-patch/index.js +4 -4
  167. package/dist/safe-bash-command-apply-patch/matcher.js +2 -2
  168. package/dist/safe-bash-command-apply-patch/parser.js +2 -2
  169. package/dist/safe-bash-command-apply-patch/shared.d.ts +2 -0
  170. package/dist/safe-bash-command-apply-patch/shared.js +1 -1
  171. package/dist/safe-bash-command-diff/diff.js +1 -1
  172. package/dist/safe-bash-command-diff/index.js +1 -1
  173. package/dist/safe-bash-command-ffmpeg/index.js +1 -1
  174. package/dist/safe-bash-command-ffprobe/index.js +2 -2
  175. package/dist/safe-bash-command-ffprobe/media.d.ts +3 -1
  176. package/dist/safe-bash-command-ffprobe/media.js +2 -2
  177. package/dist/safe-bash-command-html-to-markdown/budget.js +2 -1
  178. package/dist/safe-bash-command-html-to-markdown/entities.js +4 -3
  179. package/dist/safe-bash-command-html-to-markdown/index.js +564 -110
  180. package/dist/safe-bash-command-html-to-markdown/input.js +6 -5
  181. package/dist/safe-bash-command-html-to-markdown/options.js +2 -1
  182. package/dist/safe-bash-command-html-to-markdown/parser.js +5 -4
  183. package/dist/safe-bash-command-html-to-markdown/render.js +6 -5
  184. package/dist/safe-bash-command-html-to-markdown/text.js +3 -2
  185. package/dist/safe-bash-command-htmlq/index.js +361 -37
  186. package/dist/safe-bash-command-htmlq/tree.d.ts +3 -2
  187. package/dist/safe-bash-command-pandoc/command.js +7 -7
  188. package/dist/safe-bash-command-pandoc/index.js +55 -55
  189. package/dist/safe-bash-command-patch/index.js +6 -6
  190. package/dist/safe-bash-command-patch/patch-envelope.js +53 -3
  191. package/dist/safe-bash-command-patch/patch-formats.d.ts +2 -2
  192. package/dist/safe-bash-command-patch/patch-formats.js +2 -2
  193. package/dist/safe-bash-command-patch/patch-gnu-reject.d.ts +2 -1
  194. package/dist/safe-bash-command-patch/patch-gnu-reject.js +4 -3
  195. package/dist/safe-bash-command-patch/patch-publication.js +2 -1
  196. package/dist/safe-bash-command-patch/patch.js +6 -6
  197. package/dist/safe-bash-command-patch/unified.d.ts +10 -2
  198. package/dist/safe-bash-command-patch/unified.js +1 -1
  199. package/dist/safe-bash-command-pdftk/index.d.ts +6 -2
  200. package/dist/safe-bash-command-pdftk/index.js +835 -243
  201. package/dist/safe-bash-command-pptx/command-engine.d.ts +15 -3
  202. package/dist/safe-bash-command-pptx/engine.d.ts +2 -2
  203. package/dist/safe-bash-command-pptx/engine.js +1 -1
  204. package/dist/safe-bash-command-pptx/index.js +9 -2
  205. package/dist/safe-bash-command-soffice/index.js +1 -1
  206. package/dist/safe-bash-command-ssconvert/index.js +2 -2
  207. package/dist/safe-bash-command-xmllint/index.js +22 -31
  208. package/dist/safe-bash-diff-engine/document.d.ts +2 -1
  209. package/dist/safe-bash-diff-engine/document.js +7 -4
  210. package/dist/safe-bash-presentation-engine/accessibility.js +31 -30
  211. package/dist/safe-bash-presentation-engine/animation-editing.js +16 -15
  212. package/dist/safe-bash-presentation-engine/animations.js +16 -15
  213. package/dist/safe-bash-presentation-engine/backgrounds.js +17 -16
  214. package/dist/safe-bash-presentation-engine/bytes.js +3 -3
  215. package/dist/safe-bash-presentation-engine/chart-editing.js +34 -33
  216. package/dist/safe-bash-presentation-engine/chart-object-operations.js +25 -24
  217. package/dist/safe-bash-presentation-engine/charts.js +31 -30
  218. package/dist/safe-bash-presentation-engine/command-placeholder.js +59 -55
  219. package/dist/safe-bash-presentation-engine/comments.js +17 -16
  220. package/dist/safe-bash-presentation-engine/connector-operations.js +32 -31
  221. package/dist/safe-bash-presentation-engine/connectors.js +29 -28
  222. package/dist/safe-bash-presentation-engine/content-types.js +4 -4
  223. package/dist/safe-bash-presentation-engine/creation.js +6 -6
  224. package/dist/safe-bash-presentation-engine/diff.js +32 -31
  225. package/dist/safe-bash-presentation-engine/drawing-enums.d.ts +10 -10
  226. package/dist/safe-bash-presentation-engine/drawing-format.js +20 -19
  227. package/dist/safe-bash-presentation-engine/drawing-operations.js +31 -30
  228. package/dist/safe-bash-presentation-engine/drawing-schema.js +21 -20
  229. package/dist/safe-bash-presentation-engine/equations.js +17 -16
  230. package/dist/safe-bash-presentation-engine/errors.js +2 -2
  231. package/dist/safe-bash-presentation-engine/fields.js +17 -16
  232. package/dist/safe-bash-presentation-engine/font-metrics.js +3 -3
  233. package/dist/safe-bash-presentation-engine/image-extraction.js +20 -19
  234. package/dist/safe-bash-presentation-engine/image-formatting.js +32 -31
  235. package/dist/safe-bash-presentation-engine/image-insertion.js +18 -17
  236. package/dist/safe-bash-presentation-engine/image-replacement.js +21 -20
  237. package/dist/safe-bash-presentation-engine/image-value.js +4 -4
  238. package/dist/safe-bash-presentation-engine/images.js +19 -18
  239. package/dist/safe-bash-presentation-engine/index.d.ts +6 -2
  240. package/dist/safe-bash-presentation-engine/index.js +112 -97
  241. package/dist/safe-bash-presentation-engine/layouts.js +16 -15
  242. package/dist/safe-bash-presentation-engine/length.js +3 -3
  243. package/dist/safe-bash-presentation-engine/links.js +16 -15
  244. package/dist/safe-bash-presentation-engine/masters.js +15 -14
  245. package/dist/safe-bash-presentation-engine/media-editing.js +24 -23
  246. package/dist/safe-bash-presentation-engine/media-extraction.js +17 -16
  247. package/dist/safe-bash-presentation-engine/media.js +16 -15
  248. package/dist/safe-bash-presentation-engine/memberships.js +15 -14
  249. package/dist/safe-bash-presentation-engine/notes.js +16 -15
  250. package/dist/safe-bash-presentation-engine/ole-enum.js +4 -4
  251. package/dist/safe-bash-presentation-engine/ole-insertion.js +20 -19
  252. package/dist/safe-bash-presentation-engine/opaque-objects.js +9 -9
  253. package/dist/safe-bash-presentation-engine/package-reader.js +5 -5
  254. package/dist/safe-bash-presentation-engine/package-tools.d.ts +3 -0
  255. package/dist/safe-bash-presentation-engine/package-tools.js +27 -17
  256. package/dist/safe-bash-presentation-engine/package-uri.js +3 -3
  257. package/dist/safe-bash-presentation-engine/package-writer.js +4 -4
  258. package/dist/safe-bash-presentation-engine/presentation-model.js +58 -54
  259. package/dist/safe-bash-presentation-engine/presentation-settings.js +14 -13
  260. package/dist/safe-bash-presentation-engine/properties.js +16 -15
  261. package/dist/safe-bash-presentation-engine/relationships.js +4 -4
  262. package/dist/safe-bash-presentation-engine/resource-limits.js +1 -1
  263. package/dist/safe-bash-presentation-engine/retained-archive-staging.d.ts +19 -0
  264. package/dist/safe-bash-presentation-engine/retained-extraction-output.d.ts +18 -0
  265. package/dist/safe-bash-presentation-engine/retained-inspection.js +14 -12
  266. package/dist/safe-bash-presentation-engine/retained-package-extraction.d.ts +22 -0
  267. package/dist/safe-bash-presentation-engine/retained-package-packing.d.ts +19 -0
  268. package/dist/safe-bash-presentation-engine/retained-package.d.ts +2 -0
  269. package/dist/safe-bash-presentation-engine/retained-package.js +6 -4
  270. package/dist/safe-bash-presentation-engine/retained-slide-publication.d.ts +24 -0
  271. package/dist/safe-bash-presentation-engine/retained-text.js +19 -17
  272. package/dist/safe-bash-presentation-engine/retained-xml-parts.d.ts +5 -1
  273. package/dist/safe-bash-presentation-engine/retained-xml-publication.d.ts +18 -0
  274. package/dist/safe-bash-presentation-engine/retained-xml-replacement.d.ts +13 -0
  275. package/dist/safe-bash-presentation-engine/sanitize.js +17 -16
  276. package/dist/safe-bash-presentation-engine/selectors.js +10 -10
  277. package/dist/safe-bash-presentation-engine/shape-groups.js +31 -30
  278. package/dist/safe-bash-presentation-engine/shape-operations.js +30 -29
  279. package/dist/safe-bash-presentation-engine/shape-path-operations.js +32 -31
  280. package/dist/safe-bash-presentation-engine/shape-paths.js +16 -15
  281. package/dist/safe-bash-presentation-engine/shape-presets.js +3 -3
  282. package/dist/safe-bash-presentation-engine/shape-selection.js +31 -30
  283. package/dist/safe-bash-presentation-engine/shape-transforms.js +18 -17
  284. package/dist/safe-bash-presentation-engine/shapes.d.ts +1 -1
  285. package/dist/safe-bash-presentation-engine/shapes.js +27 -26
  286. package/dist/safe-bash-presentation-engine/slide-copy.js +17 -16
  287. package/dist/safe-bash-presentation-engine/slide-import.js +18 -17
  288. package/dist/safe-bash-presentation-engine/slide-merge-split.js +20 -19
  289. package/dist/safe-bash-presentation-engine/slide-model.js +43 -42
  290. package/dist/safe-bash-presentation-engine/slide-removal.js +18 -17
  291. package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +9 -9
  292. package/dist/safe-bash-presentation-engine/slides.d.ts +1 -0
  293. package/dist/safe-bash-presentation-engine/slides.js +23 -17
  294. package/dist/safe-bash-presentation-engine/table-operations.js +33 -32
  295. package/dist/safe-bash-presentation-engine/table-spans.js +32 -31
  296. package/dist/safe-bash-presentation-engine/tables.js +31 -30
  297. package/dist/safe-bash-presentation-engine/tags.js +16 -15
  298. package/dist/safe-bash-presentation-engine/template-bindings.js +33 -32
  299. package/dist/safe-bash-presentation-engine/template-repeat.js +40 -39
  300. package/dist/safe-bash-presentation-engine/text-fitting.js +27 -26
  301. package/dist/safe-bash-presentation-engine/text-frames.js +27 -26
  302. package/dist/safe-bash-presentation-engine/text-paragraphs.js +27 -26
  303. package/dist/safe-bash-presentation-engine/text-reading.js +11 -11
  304. package/dist/safe-bash-presentation-engine/text-replacement.js +17 -16
  305. package/dist/safe-bash-presentation-engine/text-runs.js +20 -19
  306. package/dist/safe-bash-presentation-engine/themes.js +16 -15
  307. package/dist/safe-bash-presentation-engine/transitions.js +16 -15
  308. package/dist/safe-bash-presentation-engine/validation.js +10 -9
  309. package/dist/safe-bash-presentation-engine/xml-parts.d.ts +2 -0
  310. package/dist/safe-bash-presentation-engine/xml-parts.js +23 -15
  311. package/dist/safe-bash-presentation-engine/xml-view.js +3 -3
  312. package/dist/safe-bash-presentation-engine/xml.js +3 -3
  313. package/dist/safe-bash-regex-engine/index.js +1 -1
  314. package/dist/safe-bash-regex-engine/python-glob.js +1 -1
  315. package/dist/safe-bash-regex-engine/text/regex.d.ts +19 -0
  316. package/dist/safe-bash-regex-engine/text/regex.js +1 -1
  317. package/dist/safe-bash-xml-engine/document.js +3 -3
  318. package/dist/safe-bash-xml-engine/evaluate.js +1 -1
  319. package/dist/safe-bash-xml-engine/index.d.ts +1 -0
  320. package/dist/safe-bash-xml-engine/index.js +8 -4
  321. package/dist/safe-bash-xml-engine/query.js +2 -2
  322. package/dist/safe-bash-xml-engine/recovery.d.ts +10 -0
  323. package/dist/safe-bash-xml-engine/stored-document.d.ts +1 -1
  324. package/dist/safe-bash-xml-engine/stored-document.js +1 -1
  325. package/dist/safe-bash-xml-engine/stored-evaluate.js +1 -1
  326. package/dist/spreadsheet-engine/formulas/functions/python-printf.js +56 -33
  327. package/dist/spreadsheet-format-xls/biff-encrypted-properties.d.ts +2 -2
  328. package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +86 -24
  329. package/dist/spreadsheet-format-xls/biff-metadata.d.ts +1 -0
  330. package/dist/spreadsheet-format-xls/biff-metadata.js +2 -2
  331. package/dist/spreadsheet-format-xls/biff-properties-merge.d.ts +6 -2
  332. package/dist/spreadsheet-format-xls/biff-properties-merge.js +413 -296
  333. package/dist/spreadsheet-format-xls/biff-properties-write.js +40 -23
  334. package/dist/spreadsheet-format-xls/biff-properties.js +3 -68
  335. package/dist/spreadsheet-format-xls/biff-property-index.d.ts +23 -0
  336. package/dist/spreadsheet-format-xls/biff-property-index.js +93 -0
  337. package/dist/spreadsheet-format-xls/biff-property-name.d.ts +4 -0
  338. package/dist/spreadsheet-format-xls/biff-property-name.js +114 -0
  339. package/dist/spreadsheet-format-xls/biff-property-text.d.ts +6 -0
  340. package/dist/spreadsheet-format-xls/biff-property-text.js +68 -0
  341. package/dist/spreadsheet-format-xls/biff-property-transcode.d.ts +5 -0
  342. package/dist/spreadsheet-format-xls/biff-property-transcode.js +45 -0
  343. package/dist/spreadsheet-format-xls/biff-write-metadata.js +10 -1
  344. package/package.json +6 -3
  345. package/dist/safe-bash/command-chunks/biff-3EFLKBAH-NYWZOYQS.js +0 -4942
  346. package/dist/safe-bash/command-chunks/chunk-5Q22ZLNC.js +0 -127
  347. package/dist/safe-bash/command-chunks/chunk-JKLOBSMP.js +0 -56
  348. package/dist/safe-bash/command-chunks/chunk-JYTESTBS.js +0 -99
  349. package/dist/safe-bash/command-chunks/chunk-WH3TIOTS.js +0 -326
  350. package/dist/safe-bash/command-chunks/paradox-ZWWXYY4J-JYOSWSBL.js +0 -362
  351. package/dist/spreadsheet-format-xls/biff-properties-layout.js +0 -56
@@ -1,30 +1,30 @@
1
1
  import {
2
2
  drawingColorSchema,
3
3
  drawingUpdateSchema
4
- } from "./chunk-2CORNDGF.js";
4
+ } from "./chunk-DBLHCJJU.js";
5
5
  import {
6
6
  MSO_LANGUAGE_ID
7
- } from "./chunk-COKYZUBW.js";
7
+ } from "./chunk-AJI55RS7.js";
8
8
  import {
9
9
  MSO_TEXT_UNDERLINE_TYPE,
10
10
  validateTextRunOptions
11
- } from "./chunk-XZ2FWFNV.js";
11
+ } from "./chunk-7QZ2HP2F.js";
12
12
  import {
13
13
  validateDrawingUpdate
14
- } from "./chunk-QYMEASQ6.js";
14
+ } from "./chunk-BEHUSUOY.js";
15
15
  import {
16
16
  defineEnum,
17
17
  defineXmlEnum
18
- } from "./chunk-5HPU7D36.js";
18
+ } from "./chunk-NMPED6L5.js";
19
19
  import {
20
20
  Length
21
- } from "./chunk-6QBMND4A.js";
21
+ } from "./chunk-6SRHWVEB.js";
22
22
  import {
23
23
  PropertyAccessError
24
- } from "./chunk-S6R3IB36.js";
24
+ } from "./chunk-D55REQA3.js";
25
25
  import {
26
26
  OfficeError
27
- } from "./chunk-Q73EMLLZ.js";
27
+ } from "./chunk-X6RHJ6YN.js";
28
28
 
29
29
  // packages/safe-bash-presentation-engine/src/chart-font-operations.ts
30
30
  var owners = [
@@ -2,30 +2,30 @@ import {
2
2
  nodeFor,
3
3
  selected,
4
4
  validateSelection
5
- } from "./chunk-TW73OXPR.js";
5
+ } from "./chunk-EJTNVXWF.js";
6
6
  import {
7
7
  applyShapeUpdate,
8
8
  readShape
9
- } from "./chunk-IT7TAC3F.js";
9
+ } from "./chunk-HVW53ARH.js";
10
10
  import {
11
11
  Length
12
- } from "./chunk-6QBMND4A.js";
12
+ } from "./chunk-6SRHWVEB.js";
13
13
  import {
14
14
  attr,
15
15
  child,
16
16
  loadShared,
17
17
  required
18
- } from "./chunk-56NYSX65.js";
18
+ } from "./chunk-2Z3WRRFT.js";
19
19
  import {
20
20
  SelectionError,
21
21
  readSelectionIndex
22
- } from "./chunk-X7FA7ZD5.js";
22
+ } from "./chunk-O675URF4.js";
23
23
  import {
24
24
  parseXmlPart
25
- } from "./chunk-554Z6IKP.js";
25
+ } from "./chunk-7PRL6RJ6.js";
26
26
  import {
27
27
  OfficeError
28
- } from "./chunk-Q73EMLLZ.js";
28
+ } from "./chunk-X6RHJ6YN.js";
29
29
 
30
30
  // packages/safe-bash-presentation-engine/src/shape-selection.ts
31
31
  var kinds = ["sp", "pic", "cxnSp", "graphicFrame", "grpSp"];
@@ -1209,6 +1209,221 @@ var Pattern = class {
1209
1209
  const groups = captured ? [full, text.slice(groupStart, groupEnd)] : [full];
1210
1210
  return { start: found, end: matchEnd, groups };
1211
1211
  }
1212
+ async supportsStoredTest(budget) {
1213
+ await this.prepare(budget);
1214
+ return (this.dialect === "sed" || this.dialect === "awk") && this.code.every((instruction) => instruction.kind === "character" || instruction.kind === "boundary" || instruction.kind === "match" || instruction.kind === "save" || instruction.kind === "jump" || instruction.kind === "split" || instruction.kind === "backreference" || (instruction.kind === "begin" || instruction.kind === "end") && !instruction.multiline && !instruction.trailingNewlines);
1215
+ }
1216
+ /** Replay captures as bounded spans; input-dependent search state belongs to the caller. */
1217
+ async testStored(source, budget) {
1218
+ if (!await this.supportsStoredTest(budget)) throw new ProgramError("pattern requires unsupported stored matching");
1219
+ if (await this.supportsStreamTest(budget)) return this.testStream({ async *[Symbol.asyncIterator]() {
1220
+ for (let position = 0; position < source.length; position += 4096) yield await source.read(position, Math.min(4096, source.length - position));
1221
+ } }, budget);
1222
+ const fields = 2 + (this.groupCount + 1) * 2;
1223
+ if (fields * 16 > budget.maxBufferBytes) throw new ProgramError("text buffer limit exceeded");
1224
+ const checkpoint = async () => {
1225
+ const pause = budget.checkpointSync ? budget.checkpointSync() : budget.checkpoint();
1226
+ if (pause) await pause;
1227
+ };
1228
+ await checkpoint();
1229
+ for (let start = 0; start <= source.length; ) {
1230
+ const initial = new Array(fields).fill(NaN);
1231
+ initial[0] = 0;
1232
+ initial[1] = start;
1233
+ await source.enqueue(initial);
1234
+ for (; ; ) {
1235
+ budget.step();
1236
+ await checkpoint();
1237
+ const state = await source.dequeue();
1238
+ if (!state) break;
1239
+ const pc = state[0], position = state[1], instruction = this.code[pc];
1240
+ const enqueue = async (next, at = position) => {
1241
+ state[0] = next;
1242
+ state[1] = at;
1243
+ await source.enqueue(state);
1244
+ };
1245
+ if (instruction.kind === "match") {
1246
+ await checkpoint();
1247
+ return true;
1248
+ }
1249
+ if (instruction.kind === "character") {
1250
+ const text2 = await source.read(position, Math.min(2, source.length - position));
1251
+ if (text2) {
1252
+ const character = String.fromCodePoint(text2.codePointAt(0));
1253
+ if (instruction.accepts(character)) await enqueue(pc + 1, position + character.length);
1254
+ }
1255
+ } else if (instruction.kind === "backreference") {
1256
+ const begin = state[2 + instruction.index * 2], end = state[3 + instruction.index * 2];
1257
+ if (!Number.isFinite(begin) || !Number.isFinite(end) || position + end - begin > source.length) continue;
1258
+ let matches = true;
1259
+ for (let offset = 0; offset < end - begin && matches; ) {
1260
+ const count = Math.min(4096, end - begin - offset);
1261
+ const expected = await source.read(begin + offset, count), actual = await source.read(position + offset, count);
1262
+ for (let index = 0; index < count; index++) {
1263
+ if (instruction.ignoreCase ? expected[index].toLowerCase() !== actual[index].toLowerCase() : expected[index] !== actual[index]) {
1264
+ matches = false;
1265
+ break;
1266
+ }
1267
+ }
1268
+ budget.step(count);
1269
+ await checkpoint();
1270
+ offset += count;
1271
+ }
1272
+ if (matches) await enqueue(pc + 1, position + end - begin);
1273
+ } else if (instruction.kind === "split") {
1274
+ await enqueue(instruction.first);
1275
+ await enqueue(instruction.second);
1276
+ } else if (instruction.kind === "jump") await enqueue(instruction.target);
1277
+ else if (instruction.kind === "save") {
1278
+ for (let slot = instruction.slot + 2; slot < Math.min(instruction.clearUntil ?? 0, fields - 2); slot++) state[slot + 2] = NaN;
1279
+ state[instruction.slot + 2] = position;
1280
+ await enqueue(pc + 1);
1281
+ } else if (instruction.kind === "boundary") {
1282
+ const before = position > 0 && instruction.accepts(await source.read(position - 1, 1));
1283
+ const after = position < source.length && instruction.accepts(await source.read(position, 1));
1284
+ const boundary = instruction.edge === "start" ? !before && after : instruction.edge === "end" ? before && !after : before !== after;
1285
+ if (boundary === instruction.positive) await enqueue(pc + 1);
1286
+ } else if (instruction.kind === "begin" ? position === 0 : position === source.length) await enqueue(pc + 1);
1287
+ }
1288
+ if (this.anchored || start === source.length) break;
1289
+ const text = await source.read(start, Math.min(2, source.length - start));
1290
+ start += text.codePointAt(0) > 65535 ? 2 : 1;
1291
+ }
1292
+ await checkpoint();
1293
+ return false;
1294
+ }
1295
+ /** Existence-only streaming does not retain captures or the input text. */
1296
+ async supportsStreamTest(budget) {
1297
+ await this.prepare(budget);
1298
+ return (this.dialect === "sed" || this.dialect === "awk") && this.code.every((instruction) => instruction.kind === "character" || instruction.kind === "boundary" || instruction.kind === "match" || instruction.kind === "save" || instruction.kind === "jump" || instruction.kind === "split" || (instruction.kind === "begin" || instruction.kind === "end") && !instruction.multiline && !instruction.trailingNewlines);
1299
+ }
1300
+ /** Working state is proportional to the compiled pattern, independent of input size. */
1301
+ async testStream(source, budget) {
1302
+ if (!await this.supportsStreamTest(budget)) throw new ProgramError("pattern requires non-streaming matching");
1303
+ const initial = budget.checkpointSync ? budget.checkpointSync() : budget.checkpoint();
1304
+ if (initial) await initial;
1305
+ if (this.literalMatch) {
1306
+ const { value, anchoredStart, anchoredEnd } = this.literalMatch;
1307
+ if (value.length * 4 > budget.maxBufferBytes) throw new ProgramError("text buffer limit exceeded");
1308
+ const prefix = new Uint32Array(value.length);
1309
+ let units2 = 0;
1310
+ const work = () => {
1311
+ budget.step();
1312
+ if (++units2 < 64) return;
1313
+ units2 = 0;
1314
+ return budget.checkpointSync ? budget.checkpointSync() : budget.checkpoint();
1315
+ };
1316
+ for (let index = 1, length = 0; index < value.length; index++) {
1317
+ while (length && value[index] !== value[length]) {
1318
+ length = prefix[length - 1];
1319
+ const pause2 = work();
1320
+ if (pause2) await pause2;
1321
+ }
1322
+ if (value[index] === value[length]) length++;
1323
+ prefix[index] = length;
1324
+ const pause = work();
1325
+ if (pause) await pause;
1326
+ }
1327
+ let matched = 0, position = 0, lastEnd = value.length ? -1 : 0;
1328
+ for await (const chunk of source) {
1329
+ const pause = budget.checkpointSync ? budget.checkpointSync() : budget.checkpoint();
1330
+ if (pause) await pause;
1331
+ if (!value.length && !anchoredEnd) return true;
1332
+ for (let index = 0; index < chunk.length; index++) {
1333
+ while (matched && chunk[index] !== value[matched]) {
1334
+ matched = prefix[matched - 1];
1335
+ const pause3 = work();
1336
+ if (pause3) await pause3;
1337
+ }
1338
+ if (chunk[index] === value[matched]) matched++;
1339
+ position++;
1340
+ const pause2 = work();
1341
+ if (pause2) await pause2;
1342
+ if (matched === value.length) {
1343
+ if (!anchoredStart || position === value.length) {
1344
+ lastEnd = position;
1345
+ if (!anchoredEnd) return true;
1346
+ }
1347
+ matched = matched ? prefix[matched - 1] : 0;
1348
+ }
1349
+ }
1350
+ }
1351
+ const final2 = budget.checkpointSync ? budget.checkpointSync() : budget.checkpoint();
1352
+ if (final2) await final2;
1353
+ return anchoredEnd ? lastEnd === position : lastEnd >= 0;
1354
+ }
1355
+ if (this.code.length * 7 > budget.maxBufferBytes) throw new ProgramError("text buffer limit exceeded");
1356
+ let current = new Uint8Array(this.code.length), next = new Uint8Array(this.code.length);
1357
+ const visited = new Uint8Array(this.code.length), pending = new Uint32Array(this.code.length);
1358
+ let previous, beginning = true, units = 0;
1359
+ const advance = async (character) => {
1360
+ visited.fill(0);
1361
+ next.fill(0);
1362
+ let count = 0;
1363
+ const push = (pc) => {
1364
+ if (!visited[pc]) {
1365
+ visited[pc] = 1;
1366
+ pending[count++] = pc;
1367
+ }
1368
+ };
1369
+ push(0);
1370
+ budget.step(current.length);
1371
+ for (let pc = 0; pc < current.length; pc++) if (current[pc]) push(pc);
1372
+ while (count) {
1373
+ budget.step();
1374
+ if (++units === 64) {
1375
+ units = 0;
1376
+ const pause = budget.checkpointSync ? budget.checkpointSync() : budget.checkpoint();
1377
+ if (pause) await pause;
1378
+ }
1379
+ const pc = pending[--count], instruction = this.code[pc];
1380
+ if (instruction.kind === "match") return true;
1381
+ if (instruction.kind === "character") {
1382
+ if (character !== void 0 && instruction.accepts(character)) next[pc + 1] = 1;
1383
+ } else if (instruction.kind === "split") {
1384
+ push(instruction.first);
1385
+ push(instruction.second);
1386
+ } else if (instruction.kind === "jump") push(instruction.target);
1387
+ else if (instruction.kind === "save") push(pc + 1);
1388
+ else if (instruction.kind === "begin") {
1389
+ if (beginning) push(pc + 1);
1390
+ } else if (instruction.kind === "end") {
1391
+ if (character === void 0) push(pc + 1);
1392
+ } else if (instruction.kind === "boundary") {
1393
+ const before = previous !== void 0 && instruction.accepts(previous);
1394
+ const after = character !== void 0 && instruction.accepts(character[0]);
1395
+ const boundary = instruction.edge === "start" ? !before && after : instruction.edge === "end" ? before && !after : before !== after;
1396
+ if (boundary === instruction.positive) push(pc + 1);
1397
+ }
1398
+ }
1399
+ [current, next] = [next, current];
1400
+ previous = character?.slice(-1);
1401
+ beginning = false;
1402
+ return false;
1403
+ };
1404
+ let high = "";
1405
+ for await (const chunk of source) {
1406
+ const pause = budget.checkpointSync ? budget.checkpointSync() : budget.checkpoint();
1407
+ if (pause) await pause;
1408
+ let offset = 0;
1409
+ if (high && chunk.length) {
1410
+ const low = chunk.charCodeAt(0);
1411
+ const character = low >= 56320 && low <= 57343 ? high + chunk[offset++] : high;
1412
+ high = "";
1413
+ if (await advance(character)) return true;
1414
+ }
1415
+ while (offset < chunk.length) {
1416
+ const character = String.fromCodePoint(chunk.codePointAt(offset));
1417
+ offset += character.length;
1418
+ if (offset === chunk.length && character.length === 1 && character.charCodeAt(0) >= 55296 && character.charCodeAt(0) <= 56319) high = character;
1419
+ else if (await advance(character)) return true;
1420
+ }
1421
+ }
1422
+ const final = budget.checkpointSync ? budget.checkpointSync() : budget.checkpoint();
1423
+ if (final) await final;
1424
+ if (high && await advance(high)) return true;
1425
+ return advance(void 0);
1426
+ }
1212
1427
  async find(text, budget, from = 0, continuation = from) {
1213
1428
  this.assertInstructionLimit(budget);
1214
1429
  if (!this.code.length) await this.prepare(budget);
@@ -2225,6 +2440,12 @@ var BytePattern = class extends Pattern {
2225
2440
  if (this.usesUnicode(budget)) await this.unicode.prepare(budget);
2226
2441
  else await super.prepare(budget);
2227
2442
  }
2443
+ async supportsStreamTest(budget) {
2444
+ return !this.usesUnicode(budget) && await super.supportsStreamTest(budget);
2445
+ }
2446
+ async supportsStoredTest(budget) {
2447
+ return !this.usesUnicode(budget) && await super.supportsStoredTest(budget);
2448
+ }
2228
2449
  canFindSync() {
2229
2450
  return super.canFindSync() && this.unicode.canFindSync();
2230
2451
  }
@@ -1,41 +1,49 @@
1
1
  import {
2
- openRetainedPresentationIndex
3
- } from "./chunk-L5MCW6CM.js";
2
+ stageRetainedArchive
3
+ } from "./chunk-3D24WDND.js";
4
+ import {
5
+ openPackageArchive
6
+ } from "./chunk-KCE5D4Z4.js";
7
+ import {
8
+ openRetainedPresentationIndex,
9
+ stageRetainedOutput,
10
+ streamJson
11
+ } from "./chunk-X64XGIXZ.js";
4
12
  import {
5
13
  writePackageArchive
6
- } from "./chunk-DM2CPMB4.js";
14
+ } from "./chunk-HKOMXGJS.js";
7
15
  import {
8
16
  SelectionError,
9
17
  readSelectionIndex
10
- } from "./chunk-X7FA7ZD5.js";
18
+ } from "./chunk-O675URF4.js";
11
19
  import {
12
20
  readPackage
13
- } from "./chunk-XPD636C4.js";
21
+ } from "./chunk-PVGZMLC6.js";
14
22
  import {
15
23
  readBinary
16
- } from "./chunk-PNGDJA6M.js";
24
+ } from "./chunk-LD7BONZY.js";
17
25
  import {
18
26
  openRetainedPresentationValidation,
19
27
  validatePresentation
20
- } from "./chunk-RNSKXOG3.js";
28
+ } from "./chunk-GVWVRPG6.js";
21
29
  import {
22
30
  openRetainedContentTypes,
23
31
  openRetainedRelationshipGraph
24
- } from "./chunk-QC5RMGSA.js";
32
+ } from "./chunk-G3RUXKVY.js";
25
33
  import {
26
34
  parseXmlPart
27
- } from "./chunk-554Z6IKP.js";
35
+ } from "./chunk-7PRL6RJ6.js";
28
36
  import {
29
37
  parseContentTypes
30
- } from "./chunk-WJCN2IXI.js";
38
+ } from "./chunk-VQOINPVF.js";
31
39
  import {
32
40
  readRelationshipGraph
33
- } from "./chunk-ZMHEGDU2.js";
41
+ } from "./chunk-TODWFDYB.js";
34
42
  import {
35
43
  asciiKey,
36
44
  partName,
37
45
  relativePartReference
38
- } from "./chunk-36XGIPOG.js";
46
+ } from "./chunk-U5TWQFZY.js";
39
47
  import {
40
48
  OfficeError,
41
49
  RetainedValues,
@@ -45,7 +53,7 @@ import {
45
53
  openRetainedXmlDocument,
46
54
  resolveOfficeResources,
47
55
  stageRetainedXmlEdits
48
- } from "./chunk-Q73EMLLZ.js";
56
+ } from "./chunk-X6RHJ6YN.js";
49
57
 
50
58
  // packages/safe-bash-presentation-engine/src/retained-slide-settings.ts
51
59
  import { PagedStorage } from "@poe-platform/safe-fs/storage";
@@ -188,20 +196,9 @@ async function openRetainedSlideSettings(archive, fingerprint, options, settings
188
196
  const presentation = await openRetainedXmlDocument(archive.read(index.records.main), resources);
189
197
  let failed = false;
190
198
  try {
191
- let stack = pages.allocate(16);
192
- await write(stack, [0, presentation.reference(presentation.root)]);
193
- while (stack) {
194
- const frame = await row(stack, 2);
195
- stack = frame[0];
196
- const node = await presentation.node(frame[1]);
197
- if (node.kind !== "element") continue;
199
+ for await (const node of presentation.elements(presentation.root)) {
198
200
  if (await equal(presentation.namespace(node), literal("http://schemas.openxmlformats.org/markup-compatibility/2006"))) unsupported("Conditional presentation structure cannot be changed.");
199
201
  if (await equal(presentation.raw(node.localName), literal("modifyVerifier")) && await equal(presentation.namespace(node), presentation.namespace(presentation.root))) unsupported("Protected presentations cannot be changed.");
200
- for await (const child2 of presentation.children(node)) {
201
- const pointer = pages.allocate(16);
202
- await write(pointer, [stack, presentation.reference(child2)]);
203
- stack = pointer;
204
- }
205
202
  }
206
203
  } catch (error) {
207
204
  failed = true;
@@ -325,6 +322,61 @@ async function openRetainedSlideSettings(archive, fingerprint, options, settings
325
322
  }
326
323
  }
327
324
 
325
+ // packages/safe-bash-presentation-engine/src/retained-slide-publication.ts
326
+ import { sha256 } from "@noble/hashes/sha2.js";
327
+ async function stageRetainedSlideSettings(input, options, settings, output) {
328
+ const signal = settings.signal ?? new AbortController().signal;
329
+ const hash = sha256.create();
330
+ for await (const bytes of input.stream()) {
331
+ signal.throwIfAborted();
332
+ hash.update(bytes);
333
+ }
334
+ const hex = (bytes) => Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
335
+ const before = hex(hash.digest());
336
+ const archive = await openPackageArchive(input, settings);
337
+ let mutation, staged, response;
338
+ let closing;
339
+ const close = () => {
340
+ return closing ??= (async () => {
341
+ const results = await Promise.allSettled([response?.close(), mutation?.close(), staged?.close(), archive.close()]);
342
+ for (const result of results) if (result.status === "rejected") throw result.reason;
343
+ })();
344
+ };
345
+ try {
346
+ mutation = await openRetainedSlideSettings(archive, before, options, settings);
347
+ staged = await stageRetainedArchive(input, before, archive, mutation, settings);
348
+ const { bytes, size, fingerprint } = staged;
349
+ async function* locations() {
350
+ for await (const location of mutation.targets()) yield { ...location, fingerprint };
351
+ }
352
+ async function* effects() {
353
+ if (fingerprint !== before) for await (const location of locations()) yield { location, action: "update", feature: "F07" };
354
+ }
355
+ const dryRun = output.dryRun;
356
+ async function* content() {
357
+ if (output.destination === "-" && !dryRun) {
358
+ yield* bytes();
359
+ return;
360
+ }
361
+ if (output.json) {
362
+ yield* streamJson({ version: 1, operation: "slides.set", ok: true, data: {
363
+ effects: effects(),
364
+ outputs: dryRun ? [] : [{ path: output.destination, sha256: fingerprint, bytes: size }],
365
+ fingerprint: dryRun ? null : fingerprint
366
+ }, warnings: [], errors: [], affected: mutation.affected, locations: locations() });
367
+ yield new TextEncoder().encode("\n");
368
+ } else yield new TextEncoder().encode(`${dryRun ? "Validated" : "Updated"} ${mutation.affected} slide(s)
369
+ `);
370
+ }
371
+ response = await stageRetainedOutput(content(), settings, output.maxOutputBytes);
372
+ return Object.freeze({ bytes, size, fingerprint, output: response, close });
373
+ } catch (error) {
374
+ await close().catch(() => {
375
+ });
376
+ throw error;
377
+ }
378
+ }
379
+
328
380
  // packages/safe-bash-presentation-engine/src/slides.ts
329
381
  var contentNamespace = "http://schemas.openxmlformats.org/package/2006/content-types";
330
382
  var packageRelationships = "http://schemas.openxmlformats.org/package/2006/relationships";
@@ -865,6 +917,7 @@ async function mutateSlides(input, options, context) {
865
917
 
866
918
  export {
867
919
  openRetainedSlideSettings,
920
+ stageRetainedSlideSettings,
868
921
  addSlide,
869
922
  prepareSlideInsertion,
870
923
  prepareSlideMutationOptions,
@@ -1,30 +1,30 @@
1
1
  import {
2
2
  writePackageArchive
3
- } from "./chunk-DM2CPMB4.js";
3
+ } from "./chunk-HKOMXGJS.js";
4
4
  import {
5
5
  readSelectionIndex
6
- } from "./chunk-X7FA7ZD5.js";
6
+ } from "./chunk-O675URF4.js";
7
7
  import {
8
8
  readPackage
9
- } from "./chunk-XPD636C4.js";
9
+ } from "./chunk-PVGZMLC6.js";
10
10
  import {
11
11
  readBinary
12
- } from "./chunk-PNGDJA6M.js";
12
+ } from "./chunk-LD7BONZY.js";
13
13
  import {
14
14
  validatePresentation
15
- } from "./chunk-RNSKXOG3.js";
15
+ } from "./chunk-GVWVRPG6.js";
16
16
  import {
17
17
  parseXmlPart
18
- } from "./chunk-554Z6IKP.js";
18
+ } from "./chunk-7PRL6RJ6.js";
19
19
  import {
20
20
  parseContentTypes
21
- } from "./chunk-WJCN2IXI.js";
21
+ } from "./chunk-VQOINPVF.js";
22
22
  import {
23
23
  relativePartReference
24
- } from "./chunk-36XGIPOG.js";
24
+ } from "./chunk-U5TWQFZY.js";
25
25
  import {
26
26
  OfficeError
27
- } from "./chunk-Q73EMLLZ.js";
27
+ } from "./chunk-X6RHJ6YN.js";
28
28
 
29
29
  // packages/safe-bash-presentation-engine/src/masters.ts
30
30
  var relns = "http://schemas.openxmlformats.org/package/2006/relationships";
@@ -0,0 +1,63 @@
1
+ import {
2
+ OfficeError
3
+ } from "./chunk-X6RHJ6YN.js";
4
+
5
+ // packages/safe-bash-presentation-engine/src/retained-archive-staging.ts
6
+ import { PagedStorage } from "@poe-platform/safe-fs/storage";
7
+ import { sha256 } from "@noble/hashes/sha2.js";
8
+ async function stageRetainedArchive(input, originalFingerprint, archive, mutation, settings) {
9
+ const signal = settings.signal ?? new AbortController().signal;
10
+ let pages, closed = false, closing;
11
+ const check = () => {
12
+ if (closed) throw new OfficeError("invalid-handle", "Archive output is closed.", "publish");
13
+ signal.throwIfAborted();
14
+ };
15
+ const close = () => {
16
+ closed = true;
17
+ return closing ??= pages?.close() ?? Promise.resolve();
18
+ };
19
+ const hex = (bytes) => Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
20
+ try {
21
+ let size = input.size, fingerprint = originalFingerprint, start = 0;
22
+ if (mutation.changed) {
23
+ const working = settings.workingStorage;
24
+ pages = new PagedStorage({ fs: working.fs, cwd: working.directory, env: {}, signal }, (working.cacheBytes ?? 1024 * 1024) / 16384);
25
+ start = pages.allocate(0);
26
+ size = 0;
27
+ const digest = sha256.create();
28
+ await archive.rewrite({ async write(bytes2) {
29
+ check();
30
+ for (let offset = 0; offset < bytes2.length; offset += 16384) {
31
+ check();
32
+ const owned = new Uint8Array(bytes2.subarray(offset, offset + 16384));
33
+ await pages.append(owned);
34
+ digest.update(owned);
35
+ size += owned.length;
36
+ }
37
+ } }, { replace: mutation.replacement, sourceOrder: "name" });
38
+ fingerprint = hex(digest.digest());
39
+ }
40
+ async function* bytes() {
41
+ check();
42
+ if (!pages) {
43
+ yield* input.stream();
44
+ check();
45
+ return;
46
+ }
47
+ for (let offset = 0; offset < size; offset += 16384) {
48
+ check();
49
+ yield await pages.read(start + offset, Math.min(16384, size - offset));
50
+ }
51
+ check();
52
+ }
53
+ return Object.freeze({ bytes, size, fingerprint, close });
54
+ } catch (error) {
55
+ await close().catch(() => {
56
+ });
57
+ throw error;
58
+ }
59
+ }
60
+
61
+ export {
62
+ stageRetainedArchive
63
+ };