@poe-platform/safe-bash 0.1.812 → 0.1.814
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.
- package/dist/audio-ast/id3-source.d.ts +27 -0
- package/dist/audio-ast/index.d.ts +4 -0
- package/dist/audio-ast/index.js +996 -596
- package/dist/audio-ast/mp3-source.d.ts +18 -0
- package/dist/audio-ast/ogg-source.d.ts +25 -0
- package/dist/audio-ast/ogg-stream-source.d.ts +22 -0
- package/dist/image-ast/index.js +139 -9
- package/dist/mp4-ast/containers/adapters.d.ts +7 -0
- package/dist/mp4-ast/index.d.ts +2 -0
- package/dist/mp4-ast/mp4-sample-source.d.ts +52 -0
- package/dist/mp4-ast/mp4-source.d.ts +32 -0
- package/dist/office-xml/retained-xml-document.d.ts +14 -0
- package/dist/pdf-ast/ast.d.ts +2 -0
- package/dist/pdf-ast/content/dictionary-cursor.d.ts +15 -0
- package/dist/pdf-ast/content/evaluator.d.ts +4 -0
- package/dist/pdf-ast/content/range-operator-parser.d.ts +4 -0
- package/dist/pdf-ast/content/stored-dictionary.d.ts +10 -0
- package/dist/pdf-ast/cos/lexer.d.ts +8 -5
- package/dist/pdf-ast/cos/object-reader.d.ts +11 -3
- package/dist/pdf-ast/cos/range-parser.d.ts +4 -0
- package/dist/pdf-ast/cos/retained-objects.d.ts +1 -0
- package/dist/pdf-ast/cos/retained-writer.d.ts +1 -0
- package/dist/pdf-ast/cos/value-parser.d.ts +10 -0
- package/dist/pdf-ast/edit/retained-append-attachments.d.ts +13 -0
- package/dist/pdf-ast/edit/retained-bookmarks.d.ts +13 -0
- package/dist/pdf-ast/edit/retained-form-appearances.d.ts +10 -0
- package/dist/pdf-ast/edit/retained-graph.d.ts +12 -0
- package/dist/pdf-ast/edit/retained-info-updates.d.ts +33 -0
- package/dist/pdf-ast/edit/retained-save.d.ts +2 -0
- package/dist/pdf-ast/edit/retained-stamps.d.ts +9 -0
- package/dist/pdf-ast/fonts/resolve.d.ts +3 -1
- package/dist/pdf-ast/index.d.ts +3 -1
- package/dist/pdf-ast/index.js +1966 -844
- package/dist/pdf-ast/retained-document.d.ts +5 -0
- package/dist/safe-bash/audio-ast.browser.js +6 -1
- package/dist/safe-bash/chunks/{chunk-HHSOUC3Z.js → chunk-HPQE675Q.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-BUYRKFW2.js → chunk-I6ECNJMR.js} +1 -1
- package/dist/safe-bash/chunks/{pdftk-WRYEP3CA.js → pdftk-Y2TX74LY.js} +2 -1
- package/dist/safe-bash/command-chunks/biff-KRHJ63K3-VQPJCVIL.js +5309 -0
- package/dist/safe-bash/command-chunks/{chunk-34G2SQX2.js → chunk-2BLTUQNK.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-LLU2IQEJ.js → chunk-2BNGPR6Z.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HWQ2UHMT.js → chunk-2ETEJOYX.js} +18 -18
- package/dist/safe-bash/command-chunks/{chunk-NQDIT667.js → chunk-2PKBXGXD.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-MMBZTYXO.js → chunk-2PQRZDNR.js} +221 -0
- package/dist/safe-bash/command-chunks/{chunk-6QBMND4A.js → chunk-2VVJRVYM.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-G5QVZQCO.js → chunk-3EASXF5D.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-U3SBHEKH.js → chunk-3EB2FSAN.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-VB2TUPO2.js → chunk-3EW7GYHM.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-RNSKXOG3.js → chunk-3GRMU7TM.js} +6 -6
- package/dist/safe-bash/command-chunks/chunk-3JM7E42I.js +197 -0
- package/dist/safe-bash/command-chunks/{chunk-6L4IYQAT.js → chunk-3MG5EAMX.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-RASQPOSV.js → chunk-3SPLP2DB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-K5COUQAQ.js → chunk-3VGQTLO6.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-K7CV55K5.js → chunk-3YEQI5B7.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-ZXR6LXV5.js → chunk-3ZRCL756.js} +48 -4
- package/dist/safe-bash/command-chunks/{chunk-SOFM3GPG.js → chunk-42MEXZBJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-GQ2ZSPZ3.js → chunk-46AMTJPE.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-MTWZEPAR.js → chunk-47IAU25U.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-6GI3NTCW.js → chunk-4B2ZUGLT.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-L5MCW6CM.js → chunk-4EHY6J2Z.js} +9 -155
- package/dist/safe-bash/command-chunks/{chunk-QQVACHZA.js → chunk-4EZJV4FZ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-SSKMPDN4.js → chunk-4GQKCUS5.js} +15 -15
- package/dist/safe-bash/command-chunks/{chunk-UOBW5K3M.js → chunk-4RRYWHED.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-PINR7QET.js → chunk-4UPKVQWH.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-M7QE2MN7.js → chunk-4YLACJHE.js} +6 -6
- package/dist/safe-bash/command-chunks/chunk-5BIQWWLB.js +175 -0
- package/dist/safe-bash/command-chunks/{chunk-P3WU3PSL.js → chunk-5L4YGRQU.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-HKATEVAP.js → chunk-5LFGXN3D.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-SPLOIABU.js → chunk-5OM3UIK3.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-TVH4JORU.js → chunk-6LPSKLLD.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-CV7M2QJU.js → chunk-6QYSF7I2.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-XVP6V5K3.js → chunk-6VBDJC6V.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-6N5GHM72.js → chunk-6WNVGCXD.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-6CCQI6XZ.js → chunk-6XES7Z4G.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-AFROLW6S.js → chunk-6XGDWFNQ.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-WTE23QXN.js → chunk-6ZGCKUAM.js} +3 -3
- package/dist/safe-bash/command-chunks/chunk-6ZHQB453.js +35 -0
- package/dist/safe-bash/command-chunks/{chunk-RIV6XN7K.js → chunk-7DOLY7IV.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-QD7ZRDUN.js → chunk-7KZ5LWV2.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-NGR5KOPQ.js → chunk-A347DLRB.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-ZM2Y4Z3C.js → chunk-A45UG4KT.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-56NYSX65.js → chunk-ADHFF2IM.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-ATI464W3.js → chunk-AG2SNMP5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-FDCIPJBQ.js → chunk-AM5LANIE.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-3Q247UDJ.js → chunk-AVGXFWEB.js} +278 -135
- package/dist/safe-bash/command-chunks/{chunk-RBTC7OFT.js → chunk-AVOGFREX.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-QC5RMGSA.js → chunk-AWPI4DZR.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FYMNHG7R.js → chunk-AXXZNB7U.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-Q6S57NOQ.js → chunk-AY3KQ4EN.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-456PHA3L.js → chunk-BLGGAHQW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-CU4DLVME.js → chunk-BLIFGBIO.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-NARD63DY.js → chunk-BS3ZEQGT.js} +22 -66
- package/dist/safe-bash/command-chunks/{chunk-WFVSUXJL.js → chunk-BS5JEUEW.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-UYWSIIUX.js → chunk-BZMNC7Q5.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-RHYJVTJO.js → chunk-CCMAHM3I.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-N4R2SHSS.js → chunk-CCZZVCHX.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-WGG6G2KG.js → chunk-CIRDVCAZ.js} +7 -7
- package/dist/safe-bash/command-chunks/chunk-CK2WFJZN.js +178 -0
- package/dist/safe-bash/command-chunks/{chunk-UZL7G57V.js → chunk-CKEMZUE3.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-B5LDP7AA.js → chunk-CQBACD2V.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-JYUJAF4L.js → chunk-CSE4VQKG.js} +16 -1
- package/dist/safe-bash/command-chunks/{chunk-Q73EMLLZ.js → chunk-CXME4YHU.js} +107 -5
- package/dist/safe-bash/command-chunks/{chunk-FTLDRH47.js → chunk-CZ5K2YPU.js} +16 -16
- package/dist/safe-bash/command-chunks/{chunk-554Z6IKP.js → chunk-DBLQUZGN.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-6M6TM5Z5.js → chunk-DBNJEXHK.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-SPW4GW4Z.js → chunk-DFI7QF3M.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ZO5WBWLL.js → chunk-DN6MSXY7.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-GXLXWZWH.js → chunk-DZH54L3F.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-XRVKWGVQ.js → chunk-EBHOZIBS.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-3Y5EME26.js → chunk-ENEIE44W.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ATTWQVR2.js → chunk-EQWFKNHJ.js} +17 -17
- package/dist/safe-bash/command-chunks/{chunk-YV72XQKL.js → chunk-ETXPMVR6.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-JFYWVQ4V.js → chunk-EV5G535P.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-PZMU3Z4L.js → chunk-EVYKV3QI.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-D6UMSC45.js → chunk-F4YFTO2K.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-MPUHH2KR.js → chunk-F762XDNG.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-D2ASPM7R.js → chunk-FF7UGJWS.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-OA75SGN2.js → chunk-FOONI6BD.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DYLNU57U.js → chunk-FSVJ67G5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-CLKOGAR3.js → chunk-FSYMSWJU.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-22MOB45U.js → chunk-FUQMEUAT.js} +6 -6
- package/dist/safe-bash/command-chunks/chunk-FWKLBDMK.js +0 -0
- package/dist/safe-bash/command-chunks/{chunk-KXPCSVAT.js → chunk-FXCSPPYE.js} +20 -20
- package/dist/safe-bash/command-chunks/{chunk-XZ2FWFNV.js → chunk-FYYFV6PW.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-3OETVNJA.js → chunk-G2COZLXX.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-ZEX53S5I.js → chunk-G3TAX3CV.js} +7369 -7221
- package/dist/safe-bash/command-chunks/{chunk-LXLLA4PM.js → chunk-GCHB7VNX.js} +17 -17
- package/dist/safe-bash/command-chunks/{chunk-4Y6O2K35.js → chunk-GLAF45M7.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-OEJM666F.js → chunk-GQGMQMIM.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-RRL3Y562.js → chunk-GXMPXMDP.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-GEM47B2P.js → chunk-GYM5ICK4.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-A5FZBR7X.js → chunk-H33D4R26.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-AGLK7OJR.js → chunk-HDSIIQBS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3ZDANXIC.js → chunk-HELAVGZH.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-S4QH5BXZ.js → chunk-HGIMFVI2.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-35IPOBWL.js → chunk-HI6ZYH3W.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-KB7DUBVL.js → chunk-HK6MSB7Z.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-7ZE3VIAN.js → chunk-IB5QP4LF.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-UCR5YDV3.js → chunk-IBYMPAUW.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LABOWPFB.js → chunk-IHXZMAMY.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-XPD636C4.js → chunk-IWHNRYER.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-PPO7YUZF.js → chunk-JGKSWDGP.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KCOJA7EM.js → chunk-JR3Q6QNL.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-S6R3IB36.js → chunk-JUHOL5KB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3O2YEI47.js → chunk-JVKE7YZN.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-6NATRKUJ.js → chunk-JW6WVNTM.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IK6K2HCG.js → chunk-JWORWL72.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-JOCFI7TG.js → chunk-K2WOMJOQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XVLWZTPY.js → chunk-K4XNUJVJ.js} +543 -144
- package/dist/safe-bash/command-chunks/{chunk-DM2CPMB4.js → chunk-KBAQHE5Y.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-KCLJGRU7.js +737 -0
- package/dist/safe-bash/command-chunks/{chunk-TUDFMNPP.js → chunk-KINIV2SV.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-43TRBJ2N.js → chunk-KPHLESD4.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-47NEG4UO.js → chunk-KRRG4MGH.js} +222 -46
- package/dist/safe-bash/command-chunks/{chunk-33YCKZZX.js → chunk-KSBNZTAZ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-4Y34ZG4T.js → chunk-KUOCGGEU.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-ML5R5JML.js → chunk-KY4LCHUF.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2JSDKQ4J.js → chunk-LAPOMHGY.js} +251 -239
- package/dist/safe-bash/command-chunks/{chunk-ENT3IV2G.js → chunk-LDW3RF7Y.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-U27XPNLP.js → chunk-LEO4VRIN.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-GZ3VIWNN.js → chunk-LKGTH2Q7.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-ZMHEGDU2.js → chunk-LNTEV56A.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-DVGXLBUW.js → chunk-LZ2JFMKT.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-6D2BMAF4.js → chunk-MEM2ZPMI.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-HTVIYLVB.js → chunk-MGMTRGKM.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-B3NLITWP.js → chunk-MKK6FM5H.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-Z2JW6M2D.js → chunk-MKOIPOXX.js} +3 -3
- package/dist/safe-bash/command-chunks/chunk-MLOYUXUV.js +244 -0
- package/dist/safe-bash/command-chunks/{chunk-CBNKHBLD.js → chunk-MNK3DDH6.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-JVGUVHWI.js → chunk-MPXMRTMY.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-TW73OXPR.js → chunk-MVLVIMJ6.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-TY4WDAHM.js → chunk-MYZ46FQL.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-TBAIMDGL.js → chunk-N4MUBJCT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-NPLVFAD6.js → chunk-N6G3345Q.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-ZIIO6GRY.js → chunk-NEMUPUUB.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-K5GB2YMN.js → chunk-NEVQWOU6.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-FIIAYCWS.js → chunk-NFGCBQN3.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-PNGDJA6M.js → chunk-NFII726L.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-JQPNA77Y.js → chunk-NHNZYWPW.js} +2 -2
- package/dist/safe-bash/command-chunks/chunk-NQINS4XY.js +156 -0
- package/dist/safe-bash/command-chunks/{chunk-APEWTWCC.js → chunk-NRFTYZ2R.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-THMZLJQD.js → chunk-NYFYTL5G.js} +18 -18
- package/dist/safe-bash/command-chunks/{chunk-SMSGLRIH.js → chunk-OTF2AJ5M.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-QZZ73J2O.js → chunk-OVQP6KH5.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-HDJVJTCK.js → chunk-P2LT6TGR.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-YS25EI54.js → chunk-PCCFLPUQ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-26VCZHLJ.js → chunk-PIOQBOEK.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-D2KZ66W4.js → chunk-PIVH35EQ.js} +190 -42
- package/dist/safe-bash/command-chunks/{chunk-QYMEASQ6.js → chunk-PLMF35XK.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-JQVHUSDD.js → chunk-PLR5IULU.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-2CORNDGF.js → chunk-PS5GDFIP.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-R6EGGK5M.js → chunk-Q5PWYPQV.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-COKYZUBW.js → chunk-Q7TVCBU2.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-EHTOHOTR.js → chunk-QB72X7FF.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-F3GP3EXE.js → chunk-RGDOYWOD.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-RQIQ75W5.js → chunk-RHDERFMR.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-3KMOXEGH.js → chunk-RHU44OMN.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-7PVHO47B.js → chunk-RIVKF77R.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-UOR6PXZZ.js → chunk-ROL5AEX6.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-AHA6IWAJ.js → chunk-RQYPFLZJ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-YSMNXMAO.js → chunk-RTNI47C5.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-W5LLKV5H.js → chunk-RV5AGXOV.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-PMAM4N33.js → chunk-RXQ2G2YK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-EVU7FLDA.js → chunk-S2QNBAN6.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-YE6OAKK7.js → chunk-S43QRKDC.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-774GLJAO.js → chunk-S7HIOT7Z.js} +4 -4
- package/dist/safe-bash/command-chunks/chunk-SEPUP6TZ.js +63 -0
- package/dist/safe-bash/command-chunks/{chunk-JPMYPOYZ.js → chunk-SUTHGUD3.js} +28 -28
- package/dist/safe-bash/command-chunks/chunk-SW37YCBW.js +286 -0
- package/dist/safe-bash/command-chunks/{chunk-Y4EYCZFT.js → chunk-SWAKALDJ.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-QUM3SYAJ.js → chunk-SYSX46IV.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WGH3RLJY.js → chunk-T5S4SJGO.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-7JEIWA3A.js → chunk-TID5TSQW.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-CRV2Q3PB.js → chunk-TJLXSENN.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IT7TAC3F.js → chunk-TKCUGMRZ.js} +24 -20
- package/dist/safe-bash/command-chunks/{chunk-7GKKMNL6.js → chunk-TXPDKEGY.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-A2CLZMQZ.js → chunk-UJERQEJB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-6VPQ3CDZ.js → chunk-USGZN2KE.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-LCZDBW55.js → chunk-UYGQEQIP.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-MPORWUTU.js → chunk-V5XC43BX.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-AIMSZBWP.js → chunk-V7E3PZOK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-CNHRVUHA.js → chunk-VDTFVRYX.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-KJ4XXZIL.js → chunk-VT2PHQ63.js} +582 -59
- package/dist/safe-bash/command-chunks/{chunk-MOZD7RUY.js → chunk-VT7UBPAE.js} +38 -15
- package/dist/safe-bash/command-chunks/{chunk-QDVI2YB6.js → chunk-VUWXLH3E.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-X7FA7ZD5.js → chunk-W3ZSWK76.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-JPA2PUYI.js → chunk-WBKB7HBZ.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-MIRL7HTF.js → chunk-WJ2ERUCQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-36XGIPOG.js → chunk-WTVJLHMG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-SLQWQKXP.js → chunk-WWHMI4S3.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-2UBZALAK.js → chunk-WYZG3DRR.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-YORJDX4V.js → chunk-WZRFS5OY.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-EHSM5ZQS.js → chunk-X6OHFKBL.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-S6ZTBXYO.js → chunk-XKAUKLF7.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-EUT24Y5Z.js → chunk-XM5QJCPD.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-WXRYDALR.js → chunk-XMTR7QGL.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-4CKFNXRN.js → chunk-XNGM3W5R.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2ZFLMWOX.js → chunk-XTEIT5CI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4DLIUTQV.js → chunk-XU6S3XUZ.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-CJQSAATC.js → chunk-XUJAQA3S.js} +30 -30
- package/dist/safe-bash/command-chunks/{chunk-W5YSINXC.js → chunk-Y42KSX63.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-UAXSE3XE.js → chunk-Y54L4P4J.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-6WQD7LRA.js → chunk-YAD7EV4N.js} +14 -14
- package/dist/safe-bash/command-chunks/{chunk-WVMHRNXZ.js → chunk-YRPXBGRX.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-5HPU7D36.js → chunk-Z2WNYEPD.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-SDTPO2VV.js → chunk-Z7QOSXQC.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-WJCN2IXI.js → chunk-ZQM37BGE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-W3HV45CI.js → chunk-ZSQZHFWS.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-IDJQP3A6.js → chunk-ZTMZO4IT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RID6VYS3.js → chunk-ZU2KJMXO.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-YXKNJ6EM.js → chunk-ZXELXF2H.js} +5 -5
- package/dist/safe-bash/command-chunks/{clipboard-BBDK33GP-VB22F7GI.js → clipboard-BBDK33GP-QZ4ERNQX.js} +2 -2
- package/dist/safe-bash/command-chunks/{command-engine-BCUQGJJ4.js → command-engine-7V6PZR7G.js} +1012 -678
- package/dist/safe-bash/command-chunks/{engine-LAUEWYSQ-DQCEI5HE.js → engine-UYJENSWK-VSCGKSQV.js} +1 -1
- package/dist/safe-bash/command-chunks/{gnumeric-UJPXWBVR-YPXTNEDZ.js → gnumeric-UJPXWBVR-7VOHQAPM.js} +2 -2
- package/dist/safe-bash/command-chunks/{model-store-E7BHBFJC.js → model-store-UB5DWMAP.js} +24 -24
- package/dist/safe-bash/command-chunks/paradox-4FCZE53D-LQPGVMEL.js +365 -0
- package/dist/safe-bash/commands/pandoc/index.browser.js +1 -1
- package/dist/safe-bash/full-core.browser.js +2 -2
- package/dist/safe-bash/plugins/index.browser.js +2 -2
- package/dist/safe-bash-command-awk/awk-runtime.js +3 -3
- package/dist/safe-bash-command-awk/awk.js +4 -4
- package/dist/safe-bash-command-awk/index.js +4 -4
- package/dist/safe-bash-command-diff/diff.js +2 -2
- package/dist/safe-bash-command-diff/index.js +3 -3
- package/dist/safe-bash-command-diff/sync.js +2 -2
- package/dist/safe-bash-command-du/du.js +2 -2
- package/dist/safe-bash-command-du/index.js +2 -2
- package/dist/safe-bash-command-ffmpeg/index.js +1 -1
- package/dist/safe-bash-command-ffprobe/index.js +2 -2
- package/dist/safe-bash-command-ffprobe/media.d.ts +3 -1
- package/dist/safe-bash-command-ffprobe/media.js +2 -2
- package/dist/safe-bash-command-html-to-markdown/budget.js +2 -1
- package/dist/safe-bash-command-html-to-markdown/entities.js +4 -3
- package/dist/safe-bash-command-html-to-markdown/index.js +533 -310
- package/dist/safe-bash-command-html-to-markdown/input.js +6 -5
- package/dist/safe-bash-command-html-to-markdown/options.js +2 -1
- package/dist/safe-bash-command-html-to-markdown/parser.js +5 -4
- package/dist/safe-bash-command-html-to-markdown/render.js +6 -5
- package/dist/safe-bash-command-html-to-markdown/stored-text.d.ts +50 -0
- package/dist/safe-bash-command-html-to-markdown/stored-text.js +12 -0
- package/dist/safe-bash-command-html-to-markdown/text.js +3 -2
- package/dist/safe-bash-command-htmlq/contracts.d.ts +5 -0
- package/dist/safe-bash-command-htmlq/index.js +2006 -259
- package/dist/safe-bash-command-htmlq/selectors.d.ts +38 -1
- package/dist/safe-bash-command-htmlq/serializer.d.ts +1 -0
- package/dist/safe-bash-command-htmlq/tree.d.ts +4 -2
- package/dist/safe-bash-command-iconv/command.js +2 -2
- package/dist/safe-bash-command-iconv/index.js +2 -2
- package/dist/safe-bash-command-llm/command.js +3 -3
- package/dist/safe-bash-command-llm/index.js +9 -9
- package/dist/safe-bash-command-llm/openai.js +2 -2
- package/dist/safe-bash-command-llm/providers/index.js +2 -2
- package/dist/safe-bash-command-llm/providers/openai.js +2 -2
- package/dist/safe-bash-command-node/commands/node/browser.js +2 -2
- package/dist/safe-bash-command-node/commands/node/default-runtime.js +2 -2
- package/dist/safe-bash-command-node/commands/node/safejs.js +2 -2
- package/dist/safe-bash-command-pandoc/command.js +7 -7
- package/dist/safe-bash-command-pandoc/index.js +46 -46
- package/dist/safe-bash-command-patch/index.js +6 -6
- package/dist/safe-bash-command-patch/patch-envelope.js +53 -3
- package/dist/safe-bash-command-patch/patch-formats.d.ts +7 -2
- package/dist/safe-bash-command-patch/patch-formats.js +6 -4
- package/dist/safe-bash-command-patch/patch-gnu-paths.d.ts +7 -7
- package/dist/safe-bash-command-patch/patch-gnu-reject.d.ts +3 -2
- package/dist/safe-bash-command-patch/patch-gnu-reject.js +4 -3
- package/dist/safe-bash-command-patch/patch-publication.js +2 -1
- package/dist/safe-bash-command-patch/patch.js +6 -6
- package/dist/safe-bash-command-patch/stored-patch.d.ts +26 -0
- package/dist/safe-bash-command-patch/stored-target.d.ts +40 -0
- package/dist/safe-bash-command-patch/unified.d.ts +23 -10
- package/dist/safe-bash-command-patch/unified.js +3 -1
- package/dist/safe-bash-command-pdftk/index.d.ts +6 -2
- package/dist/safe-bash-command-pdftk/index.js +1247 -373
- package/dist/safe-bash-command-playwright-cli/index.js +26 -26
- package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +10 -10
- package/dist/safe-bash-command-playwright-cli/playwright/controller.js +14 -14
- package/dist/safe-bash-command-playwright-cli/playwright/index.js +23 -23
- package/dist/safe-bash-command-playwright-cli/playwright/snapshot.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +6 -6
- package/dist/safe-bash-command-playwright-cli/playwright/storage-capabilities.js +4 -4
- package/dist/safe-bash-command-pptx/command-engine.d.ts +5 -1
- package/dist/safe-bash-command-pptx/engine.js +1 -1
- package/dist/safe-bash-command-pptx/index.d.ts +1 -1
- package/dist/safe-bash-command-pptx/index.js +172 -19
- package/dist/safe-bash-command-pptx/streaming-inputs.d.ts +7 -2
- package/dist/safe-bash-command-python/executor.js +5 -5
- package/dist/safe-bash-command-python/index.js +5 -5
- package/dist/safe-bash-command-python/jspi.js +2 -2
- package/dist/safe-bash-command-soffice/index.js +1 -1
- package/dist/safe-bash-command-sort/index.js +3 -3
- package/dist/safe-bash-command-ssconvert/index.js +2 -2
- package/dist/safe-bash-command-tar/create.js +2 -2
- package/dist/safe-bash-command-tar/extract.js +2 -2
- package/dist/safe-bash-command-tar/index.js +8 -8
- package/dist/safe-bash-command-tar/modes.js +4 -4
- package/dist/safe-bash-command-timeout/index.js +3 -3
- package/dist/safe-bash-command-tree/index.js +2 -2
- package/dist/safe-bash-command-tree/tree.js +2 -2
- package/dist/safe-bash-command-xmllint/index.js +22 -31
- package/dist/safe-bash-command-xz/index.js +5 -5
- package/dist/safe-bash-compression-engine/files.js +2 -2
- package/dist/safe-bash-compression-engine/operand.js +4 -4
- package/dist/safe-bash-contracts/diagnostics.js +3 -3
- package/dist/safe-bash-contracts/escaping.js +10 -10
- package/dist/safe-bash-contracts/filesystem-descriptor.js +1 -1
- package/dist/safe-bash-contracts/filesystem-output.js +6 -6
- package/dist/safe-bash-contracts/index.js +33 -33
- package/dist/safe-bash-contracts/io.js +2 -2
- package/dist/safe-bash-contracts/output.js +3 -3
- package/dist/safe-bash-docx-engine/ancillary-resources.js +5 -5
- package/dist/safe-bash-docx-engine/batch-operations.js +63 -63
- package/dist/safe-bash-docx-engine/batch-result-schema.js +74 -74
- package/dist/safe-bash-docx-engine/batch.js +74 -74
- package/dist/safe-bash-docx-engine/bookmarks.js +13 -13
- package/dist/safe-bash-docx-engine/charts.js +6 -6
- package/dist/safe-bash-docx-engine/command-option-rules.js +3 -3
- package/dist/safe-bash-docx-engine/comments.js +21 -21
- package/dist/safe-bash-docx-engine/control-bindings.js +16 -16
- package/dist/safe-bash-docx-engine/control-repeat.js +16 -16
- package/dist/safe-bash-docx-engine/controls.js +14 -14
- package/dist/safe-bash-docx-engine/create.js +8 -8
- package/dist/safe-bash-docx-engine/diagrams.js +6 -6
- package/dist/safe-bash-docx-engine/diff.js +8 -8
- package/dist/safe-bash-docx-engine/document-properties.js +12 -12
- package/dist/safe-bash-docx-engine/equations.js +12 -12
- package/dist/safe-bash-docx-engine/extract.js +9 -9
- package/dist/safe-bash-docx-engine/fields.js +18 -18
- package/dist/safe-bash-docx-engine/font-inventory.js +13 -13
- package/dist/safe-bash-docx-engine/font-resources.js +3 -3
- package/dist/safe-bash-docx-engine/image-batch-operations.js +11 -11
- package/dist/safe-bash-docx-engine/image-insertion.js +17 -17
- package/dist/safe-bash-docx-engine/image-layout.js +14 -14
- package/dist/safe-bash-docx-engine/image-replacement.js +19 -19
- package/dist/safe-bash-docx-engine/images.js +14 -14
- package/dist/safe-bash-docx-engine/index.js +102 -102
- package/dist/safe-bash-docx-engine/inspection.js +15 -15
- package/dist/safe-bash-docx-engine/invocation.js +4 -4
- package/dist/safe-bash-docx-engine/io.js +6 -6
- package/dist/safe-bash-docx-engine/links.js +17 -17
- package/dist/safe-bash-docx-engine/lists.js +16 -16
- package/dist/safe-bash-docx-engine/locations.js +10 -10
- package/dist/safe-bash-docx-engine/notes.js +18 -18
- package/dist/safe-bash-docx-engine/objects.js +14 -14
- package/dist/safe-bash-docx-engine/pack.js +9 -9
- package/dist/safe-bash-docx-engine/package-view-batch-operations.js +19 -19
- package/dist/safe-bash-docx-engine/pandoc-adapter.js +25 -25
- package/dist/safe-bash-docx-engine/paragraph-edit.js +21 -21
- package/dist/safe-bash-docx-engine/publication.js +6 -6
- package/dist/safe-bash-docx-engine/removal.js +16 -16
- package/dist/safe-bash-docx-engine/revision-decisions.js +16 -16
- package/dist/safe-bash-docx-engine/revision-edit.js +15 -15
- package/dist/safe-bash-docx-engine/revisions.js +12 -12
- package/dist/safe-bash-docx-engine/run-format.js +15 -15
- package/dist/safe-bash-docx-engine/sanitize.js +29 -29
- package/dist/safe-bash-docx-engine/sections.js +15 -15
- package/dist/safe-bash-docx-engine/settings.js +6 -6
- package/dist/safe-bash-docx-engine/shape-edit.js +16 -16
- package/dist/safe-bash-docx-engine/signatures.js +11 -11
- package/dist/safe-bash-docx-engine/stories.js +18 -18
- package/dist/safe-bash-docx-engine/structure-model-batch-operations.js +34 -34
- package/dist/safe-bash-docx-engine/style-model-batch-operations.js +24 -24
- package/dist/safe-bash-docx-engine/style-model-result-schema.js +39 -39
- package/dist/safe-bash-docx-engine/styles.js +14 -14
- package/dist/safe-bash-docx-engine/table-edit.js +23 -23
- package/dist/safe-bash-docx-engine/table-read.js +11 -11
- package/dist/safe-bash-docx-engine/template.js +17 -17
- package/dist/safe-bash-docx-engine/text-replace.js +15 -15
- package/dist/safe-bash-docx-engine/text-resource-read.js +11 -11
- package/dist/safe-bash-docx-engine/text.js +11 -11
- package/dist/safe-bash-docx-engine/validation.js +4 -4
- package/dist/safe-bash-docx-engine/xml-parts.js +17 -17
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +4 -4
- package/dist/safe-bash-line-ending-engine/command.js +3 -3
- package/dist/safe-bash-line-ending-engine/convert.js +2 -2
- package/dist/safe-bash-line-ending-engine/index.js +6 -6
- package/dist/safe-bash-line-ending-engine/info.js +2 -2
- package/dist/safe-bash-markdown-engine/commonmark-blocks.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-inlines.js +4 -4
- package/dist/safe-bash-markdown-engine/commonmark-syntax.js +2 -2
- package/dist/safe-bash-markdown-engine/gfm-syntax.js +3 -3
- package/dist/safe-bash-markdown-engine/index.js +5 -5
- package/dist/safe-bash-network-engine/transfer.js +3 -3
- package/dist/safe-bash-presentation-engine/accessibility.js +31 -30
- package/dist/safe-bash-presentation-engine/animation-editing.js +16 -15
- package/dist/safe-bash-presentation-engine/animations.js +16 -15
- package/dist/safe-bash-presentation-engine/backgrounds.js +17 -16
- package/dist/safe-bash-presentation-engine/bytes.js +3 -3
- package/dist/safe-bash-presentation-engine/chart-editing.js +34 -33
- package/dist/safe-bash-presentation-engine/chart-object-operations.js +25 -24
- package/dist/safe-bash-presentation-engine/charts.js +31 -30
- package/dist/safe-bash-presentation-engine/command-placeholder.js +59 -56
- package/dist/safe-bash-presentation-engine/comments.js +17 -16
- package/dist/safe-bash-presentation-engine/connector-operations.js +32 -31
- package/dist/safe-bash-presentation-engine/connectors.js +29 -28
- package/dist/safe-bash-presentation-engine/content-types.js +4 -4
- package/dist/safe-bash-presentation-engine/creation.js +6 -6
- package/dist/safe-bash-presentation-engine/diff.js +32 -31
- package/dist/safe-bash-presentation-engine/drawing-enums.d.ts +10 -10
- package/dist/safe-bash-presentation-engine/drawing-format.js +20 -19
- package/dist/safe-bash-presentation-engine/drawing-operations.js +31 -30
- package/dist/safe-bash-presentation-engine/drawing-schema.js +21 -20
- package/dist/safe-bash-presentation-engine/equations.js +17 -16
- package/dist/safe-bash-presentation-engine/errors.js +2 -2
- package/dist/safe-bash-presentation-engine/fields.js +17 -16
- package/dist/safe-bash-presentation-engine/font-metrics.js +3 -3
- package/dist/safe-bash-presentation-engine/image-extraction.js +20 -19
- package/dist/safe-bash-presentation-engine/image-formatting.js +32 -31
- package/dist/safe-bash-presentation-engine/image-insertion.js +18 -17
- package/dist/safe-bash-presentation-engine/image-replacement.js +21 -20
- package/dist/safe-bash-presentation-engine/image-value.js +4 -4
- package/dist/safe-bash-presentation-engine/images.js +19 -18
- package/dist/safe-bash-presentation-engine/index.d.ts +5 -1
- package/dist/safe-bash-presentation-engine/index.js +121 -108
- package/dist/safe-bash-presentation-engine/layouts.js +16 -15
- package/dist/safe-bash-presentation-engine/length.js +3 -3
- package/dist/safe-bash-presentation-engine/links.js +16 -15
- package/dist/safe-bash-presentation-engine/masters.js +15 -14
- package/dist/safe-bash-presentation-engine/media-editing.js +24 -23
- package/dist/safe-bash-presentation-engine/media-extraction.js +17 -16
- package/dist/safe-bash-presentation-engine/media.js +16 -15
- package/dist/safe-bash-presentation-engine/memberships.js +15 -14
- package/dist/safe-bash-presentation-engine/notes.js +16 -15
- package/dist/safe-bash-presentation-engine/ole-enum.js +4 -4
- package/dist/safe-bash-presentation-engine/ole-insertion.js +20 -19
- package/dist/safe-bash-presentation-engine/opaque-objects.js +9 -9
- package/dist/safe-bash-presentation-engine/package-reader.js +5 -5
- package/dist/safe-bash-presentation-engine/package-tools.d.ts +3 -0
- package/dist/safe-bash-presentation-engine/package-tools.js +27 -17
- package/dist/safe-bash-presentation-engine/package-uri.js +3 -3
- package/dist/safe-bash-presentation-engine/package-writer.js +4 -4
- package/dist/safe-bash-presentation-engine/presentation-model.js +58 -55
- package/dist/safe-bash-presentation-engine/presentation-settings.js +14 -13
- package/dist/safe-bash-presentation-engine/properties.js +16 -15
- package/dist/safe-bash-presentation-engine/relationships.js +4 -4
- package/dist/safe-bash-presentation-engine/resource-limits.js +1 -1
- package/dist/safe-bash-presentation-engine/retained-archive-staging.d.ts +19 -0
- package/dist/safe-bash-presentation-engine/retained-extraction-output.d.ts +18 -0
- package/dist/safe-bash-presentation-engine/retained-frame-formatting.d.ts +14 -0
- package/dist/safe-bash-presentation-engine/retained-inspection.js +14 -12
- package/dist/safe-bash-presentation-engine/retained-package-extraction.d.ts +22 -0
- package/dist/safe-bash-presentation-engine/retained-package-packing.d.ts +19 -0
- package/dist/safe-bash-presentation-engine/retained-package.d.ts +2 -0
- package/dist/safe-bash-presentation-engine/retained-package.js +6 -4
- package/dist/safe-bash-presentation-engine/retained-text.d.ts +9 -2
- package/dist/safe-bash-presentation-engine/retained-text.js +131 -30
- package/dist/safe-bash-presentation-engine/retained-xml-document.d.ts +1 -0
- package/dist/safe-bash-presentation-engine/retained-xml-parts.d.ts +5 -1
- package/dist/safe-bash-presentation-engine/retained-xml-publication.d.ts +18 -0
- package/dist/safe-bash-presentation-engine/retained-xml-replacement.d.ts +13 -0
- package/dist/safe-bash-presentation-engine/sanitize.js +17 -16
- package/dist/safe-bash-presentation-engine/selectors.js +10 -10
- package/dist/safe-bash-presentation-engine/shape-groups.js +31 -30
- package/dist/safe-bash-presentation-engine/shape-operations.js +30 -29
- package/dist/safe-bash-presentation-engine/shape-path-operations.js +32 -31
- package/dist/safe-bash-presentation-engine/shape-paths.js +16 -15
- package/dist/safe-bash-presentation-engine/shape-presets.js +3 -3
- package/dist/safe-bash-presentation-engine/shape-selection.js +31 -30
- package/dist/safe-bash-presentation-engine/shape-transforms.js +18 -17
- package/dist/safe-bash-presentation-engine/shapes.d.ts +1 -1
- package/dist/safe-bash-presentation-engine/shapes.js +27 -26
- package/dist/safe-bash-presentation-engine/slide-copy.js +17 -16
- package/dist/safe-bash-presentation-engine/slide-import.js +18 -17
- package/dist/safe-bash-presentation-engine/slide-merge-split.js +20 -19
- package/dist/safe-bash-presentation-engine/slide-model.js +43 -42
- package/dist/safe-bash-presentation-engine/slide-removal.js +18 -17
- package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +9 -9
- package/dist/safe-bash-presentation-engine/slides.js +19 -16
- package/dist/safe-bash-presentation-engine/table-operations.js +33 -32
- package/dist/safe-bash-presentation-engine/table-spans.js +32 -31
- package/dist/safe-bash-presentation-engine/tables.js +31 -30
- package/dist/safe-bash-presentation-engine/tags.js +16 -15
- package/dist/safe-bash-presentation-engine/template-bindings.js +33 -32
- package/dist/safe-bash-presentation-engine/template-repeat.js +40 -39
- package/dist/safe-bash-presentation-engine/text-fitting.js +27 -26
- package/dist/safe-bash-presentation-engine/text-frames.d.ts +13 -0
- package/dist/safe-bash-presentation-engine/text-frames.js +29 -26
- package/dist/safe-bash-presentation-engine/text-paragraphs.js +27 -26
- package/dist/safe-bash-presentation-engine/text-reading.js +11 -11
- package/dist/safe-bash-presentation-engine/text-replacement.js +17 -16
- package/dist/safe-bash-presentation-engine/text-runs.js +20 -19
- package/dist/safe-bash-presentation-engine/themes.js +16 -15
- package/dist/safe-bash-presentation-engine/transitions.js +16 -15
- package/dist/safe-bash-presentation-engine/validation.js +10 -9
- package/dist/safe-bash-presentation-engine/xml-parts.d.ts +2 -0
- package/dist/safe-bash-presentation-engine/xml-parts.js +23 -15
- package/dist/safe-bash-presentation-engine/xml-view.js +3 -3
- package/dist/safe-bash-presentation-engine/xml.js +3 -3
- package/dist/safe-bash-query-engine/index.js +4 -4
- package/dist/safe-bash-query-engine/interpreter.js +2 -2
- package/dist/safe-bash-query-engine/query-core.js +4 -4
- package/dist/safe-bash-regex-engine/index.js +1 -1
- package/dist/safe-bash-regex-engine/python-glob.js +1 -1
- package/dist/safe-bash-regex-engine/text/regex.d.ts +19 -0
- package/dist/safe-bash-regex-engine/text/regex.js +1 -1
- package/dist/safe-bash-xml-engine/document.js +3 -3
- package/dist/safe-bash-xml-engine/evaluate.js +1 -1
- package/dist/safe-bash-xml-engine/index.d.ts +1 -0
- package/dist/safe-bash-xml-engine/index.js +9 -5
- package/dist/safe-bash-xml-engine/query.js +2 -2
- package/dist/safe-bash-xml-engine/recovery.d.ts +10 -0
- package/dist/safe-bash-xml-engine/stored-document.d.ts +3 -3
- package/dist/safe-bash-xml-engine/stored-document.js +1 -1
- package/dist/safe-bash-xml-engine/stored-evaluate.js +1 -1
- package/dist/safe-bash-zip-engine/zip/repair.js +3 -3
- package/dist/safe-bash-zip-engine/zip/volumes.js +3 -3
- package/dist/spreadsheet-engine/datasource.js +16 -2
- package/dist/spreadsheet-engine/formulas/diagnostics.d.ts +2 -1
- package/dist/spreadsheet-engine/formulas/diagnostics.js +2 -2
- package/dist/spreadsheet-engine/formulas/evaluator.d.ts +1 -1
- package/dist/spreadsheet-engine/formulas/evaluator.js +2 -1
- package/dist/spreadsheet-engine/formulas/functions/python-printf.js +56 -33
- package/dist/spreadsheet-format-xls/biff-encrypted-properties.d.ts +1 -1
- package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +54 -24
- package/dist/spreadsheet-format-xls/biff-properties-merge.d.ts +6 -2
- package/dist/spreadsheet-format-xls/biff-properties-merge.js +413 -296
- package/dist/spreadsheet-format-xls/biff-properties-write.js +40 -23
- package/dist/spreadsheet-format-xls/biff-properties.js +95 -175
- package/dist/spreadsheet-format-xls/biff-property-dictionary.d.ts +5 -0
- package/dist/spreadsheet-format-xls/biff-property-dictionary.js +75 -0
- package/dist/spreadsheet-format-xls/biff-property-index.d.ts +23 -0
- package/dist/spreadsheet-format-xls/biff-property-index.js +93 -0
- package/dist/spreadsheet-format-xls/biff-property-name.d.ts +4 -0
- package/dist/spreadsheet-format-xls/biff-property-name.js +114 -0
- package/dist/spreadsheet-format-xls/biff-property-range.d.ts +17 -3
- package/dist/spreadsheet-format-xls/biff-property-range.js +178 -37
- package/dist/spreadsheet-format-xls/biff-property-text.d.ts +6 -0
- package/dist/spreadsheet-format-xls/biff-property-text.js +68 -0
- package/dist/spreadsheet-format-xls/biff-property-transcode.d.ts +5 -0
- package/dist/spreadsheet-format-xls/biff-property-transcode.js +45 -0
- package/package.json +8 -3
- package/dist/safe-bash/command-chunks/biff-YKPDH35C-MVQIWNKV.js +0 -4974
- package/dist/safe-bash/command-chunks/chunk-2VLAXKTS.js +0 -245
- package/dist/safe-bash/command-chunks/chunk-5Q22ZLNC.js +0 -127
- package/dist/safe-bash/command-chunks/chunk-JKLOBSMP.js +0 -56
- package/dist/safe-bash/command-chunks/chunk-JYTESTBS.js +0 -99
- package/dist/safe-bash/command-chunks/chunk-ZEGNRZV2.js +0 -333
- package/dist/safe-bash/command-chunks/paradox-ZWWXYY4J-JYOSWSBL.js +0 -362
- package/dist/spreadsheet-format-xls/biff-properties-layout.js +0 -56
- package/dist/safe-bash/command-chunks/{chunk-X2HVVMTW.js → chunk-AW4Q3GZW.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-JC2EV66U.js → chunk-BJXADHRT.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-XI2LETBJ.js → chunk-BXU5Y7I5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-PVLPWVRH.js → chunk-D3HW7R2N.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OLK3DCJD.js → chunk-DYERIXPU.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WYBCSJFG.js → chunk-FWCUEZ3K.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FF2SQ2GP.js → chunk-GGH376XQ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-D66Q7QJ3.js → chunk-JRSZ5IGD.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-Z3YB4EVE.js → chunk-KSM5CCHT.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-NJ4NTTCR.js → chunk-LNLACEAN.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-NBTG6NF6.js → chunk-LTJRUMK6.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-XCYTG7CR.js → chunk-NJGL5JQ6.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-SZ66JC25.js → chunk-Q7J2NTH2.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-MDV7W5AS.js → chunk-SKNI2XQA.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-7ZWACKCG.js → chunk-T6OXG7QQ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-ECDEPKKW.js → chunk-W25EIKDJ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-4YSBUQPV.js → chunk-W2FKFEVY.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-2CIDPOUV.js → chunk-WSNHJZQ5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-4H3TYOVC.js → chunk-Y7AXMCFV.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-U6IEK2CI.js → chunk-YPG55QTP.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-252L5YC5.js → chunk-Z37OM247.js} +6 -6
- package/dist/safe-bash/command-chunks/{pln-DFS7VLVS-JATX6FS7.js → pln-DFS7VLVS-OVOBS4QX.js} +3 -3
- package/dist/safe-bash/command-chunks/{psion-YBI6JEQI-6OMC2PGC.js → psion-YBI6JEQI-GY4S6ZLC.js} +3 -3
|
@@ -6,24 +6,210 @@ import {
|
|
|
6
6
|
allMediaAsts,
|
|
7
7
|
createMediaAstRegistry,
|
|
8
8
|
encodeUtf8,
|
|
9
|
-
parseStreamingManifest
|
|
10
|
-
|
|
9
|
+
parseStreamingManifest,
|
|
10
|
+
probeOggFlacSource,
|
|
11
|
+
probeOggStreamMetadata
|
|
12
|
+
} from "./chunk-LAPOMHGY.js";
|
|
11
13
|
|
|
12
|
-
// packages/safe-bash-command-ffprobe/src/
|
|
14
|
+
// packages/safe-bash-command-ffprobe/src/ogg-probe.ts
|
|
15
|
+
import { probeOggStreamSource } from "../../audio-ast/index.js";
|
|
16
|
+
|
|
17
|
+
// packages/safe-bash-command-ffprobe/src/ogg-index.ts
|
|
18
|
+
import { scanOggPages } from "../../audio-ast/index.js";
|
|
13
19
|
import { IntegerTable, PagedStorage } from "@poe-platform/safe-fs/storage";
|
|
14
|
-
import { normalizeVorbisCommentKey } from "../../audio-ast/index.js";
|
|
15
20
|
import { yieldTurn } from "../../safe-bash-contracts/yield.js";
|
|
16
|
-
var
|
|
21
|
+
var OggIndex = class {
|
|
17
22
|
constructor(source, context) {
|
|
18
23
|
this.source = source;
|
|
19
24
|
this.context = context;
|
|
20
25
|
this.storage = new PagedStorage(context, 4);
|
|
26
|
+
this.serials = new IntegerTable(this.storage, 128);
|
|
27
|
+
this.close = async () => {
|
|
28
|
+
this.closed = true;
|
|
29
|
+
await this.storage.close();
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
source;
|
|
33
|
+
context;
|
|
34
|
+
storage;
|
|
35
|
+
serials;
|
|
36
|
+
first = 0;
|
|
37
|
+
last = 0;
|
|
38
|
+
firstPage = 0;
|
|
39
|
+
lastPage = 0;
|
|
40
|
+
started = false;
|
|
41
|
+
ready = false;
|
|
42
|
+
closed = false;
|
|
43
|
+
close;
|
|
44
|
+
check() {
|
|
45
|
+
this.context.signal.throwIfAborted();
|
|
46
|
+
if (this.closed) throw new Error("Ogg index is closed");
|
|
47
|
+
}
|
|
48
|
+
async scan() {
|
|
49
|
+
this.check();
|
|
50
|
+
if (this.started) throw new Error("Ogg index already scanned");
|
|
51
|
+
this.started = true;
|
|
52
|
+
let active = 0, seen = 0, group = 0;
|
|
53
|
+
for await (const page of scanOggPages(this.source, { signal: this.context.signal, checkpoint: async () => {
|
|
54
|
+
this.check();
|
|
55
|
+
await yieldTurn(this.context.signal);
|
|
56
|
+
this.check();
|
|
57
|
+
} })) {
|
|
58
|
+
const key = BigInt(page.serial), existing = await this.serials.get(key);
|
|
59
|
+
const position = existing === void 0 ? this.storage.allocate(128) : Number(existing);
|
|
60
|
+
const bytes = existing === void 0 ? new Uint8Array(128) : await this.storage.read(position, 128);
|
|
61
|
+
const row = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
62
|
+
if (existing === void 0) {
|
|
63
|
+
if (!(page.flags & 2) || page.sequence !== 0) throw new Error("Missing Ogg beginning-of-stream");
|
|
64
|
+
row.setUint32(8, 4294967295, true);
|
|
65
|
+
row.setUint32(96, page.serial, true);
|
|
66
|
+
await this.serials.set(key, BigInt(position));
|
|
67
|
+
if (!active) group++;
|
|
68
|
+
row.setFloat64(120, group, true);
|
|
69
|
+
if (this.lastPage) {
|
|
70
|
+
const link = new Uint8Array(8);
|
|
71
|
+
new DataView(link.buffer).setFloat64(0, position, true);
|
|
72
|
+
await this.storage.write(this.lastPage + 104, link);
|
|
73
|
+
} else this.firstPage = position;
|
|
74
|
+
this.lastPage = position;
|
|
75
|
+
active++;
|
|
76
|
+
seen++;
|
|
77
|
+
}
|
|
78
|
+
if (bytes[12] || page.sequence !== row.getUint32(8, true) + 1 >>> 0 || !!(page.flags & 1) !== !!bytes[13])
|
|
79
|
+
throw new Error("Invalid Ogg sequence/continuation");
|
|
80
|
+
row.setUint32(8, page.sequence, true);
|
|
81
|
+
if (page.granule !== 0xffffffffffffffffn) row.setBigUint64(112, page.granule, true);
|
|
82
|
+
row.setFloat64(32, row.getFloat64(32, true) + page.size, true);
|
|
83
|
+
let packet = row.getFloat64(16, true), pending = row.getFloat64(24, true);
|
|
84
|
+
let sourceOffset = page.payloadOffset, spanSize = 0, completed = false;
|
|
85
|
+
for (let i = 0; i < page.lacing.length; i++) {
|
|
86
|
+
const lace = page.lacing[i];
|
|
87
|
+
spanSize += lace;
|
|
88
|
+
if (lace === 255 && i !== page.lacing.length - 1) continue;
|
|
89
|
+
if (packet < 2 && spanSize) {
|
|
90
|
+
const span = this.storage.allocate(32), data = new Uint8Array(32), record = new DataView(data.buffer);
|
|
91
|
+
record.setFloat64(8, pending, true);
|
|
92
|
+
record.setFloat64(16, sourceOffset, true);
|
|
93
|
+
record.setFloat64(24, spanSize, true);
|
|
94
|
+
await this.storage.write(span, data);
|
|
95
|
+
const field = 48 + packet * 24, tail = row.getFloat64(field + 8, true);
|
|
96
|
+
if (tail) {
|
|
97
|
+
const link = new Uint8Array(8);
|
|
98
|
+
new DataView(link.buffer).setFloat64(0, span, true);
|
|
99
|
+
await this.storage.write(tail, link);
|
|
100
|
+
} else row.setFloat64(field, span, true);
|
|
101
|
+
row.setFloat64(field + 8, span, true);
|
|
102
|
+
row.setFloat64(field + 16, pending + spanSize, true);
|
|
103
|
+
}
|
|
104
|
+
sourceOffset += spanSize;
|
|
105
|
+
pending += spanSize;
|
|
106
|
+
spanSize = 0;
|
|
107
|
+
bytes[13] = lace === 255 ? 1 : 0;
|
|
108
|
+
if (lace < 255) {
|
|
109
|
+
if (packet === 0) {
|
|
110
|
+
if (this.last) {
|
|
111
|
+
const link = new Uint8Array(8);
|
|
112
|
+
new DataView(link.buffer).setFloat64(0, position, true);
|
|
113
|
+
await this.storage.write(this.last, link);
|
|
114
|
+
} else this.first = position;
|
|
115
|
+
this.last = position;
|
|
116
|
+
}
|
|
117
|
+
packet++;
|
|
118
|
+
pending = 0;
|
|
119
|
+
completed = true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (completed && page.granule !== 0xffffffffffffffffn) row.setBigUint64(40, page.granule, true);
|
|
123
|
+
if (page.flags & 4) {
|
|
124
|
+
if (bytes[13]) throw new Error("Incomplete final Ogg packet");
|
|
125
|
+
bytes[12] = 1;
|
|
126
|
+
active--;
|
|
127
|
+
}
|
|
128
|
+
row.setFloat64(16, packet, true);
|
|
129
|
+
row.setFloat64(24, pending, true);
|
|
130
|
+
await this.storage.write(position, bytes);
|
|
131
|
+
}
|
|
132
|
+
if (!seen || active) throw new Error("Incomplete Ogg stream");
|
|
133
|
+
this.ready = true;
|
|
134
|
+
}
|
|
135
|
+
packet(first, size) {
|
|
136
|
+
const { storage, source, context } = this, check = this.check.bind(this);
|
|
137
|
+
let cached;
|
|
138
|
+
return { size, async read(offset, length) {
|
|
139
|
+
check();
|
|
140
|
+
if (!Number.isSafeInteger(offset) || !Number.isSafeInteger(length) || offset < 0 || length < 0 || offset > size)
|
|
141
|
+
throw new RangeError("Invalid Ogg packet range");
|
|
142
|
+
const output = new Uint8Array(Math.min(length, size - offset, 16384));
|
|
143
|
+
let used = 0, steps = 0, position = cached && offset >= cached.start ? cached.position : first;
|
|
144
|
+
while (used < output.length) {
|
|
145
|
+
if (++steps % 256 === 0) {
|
|
146
|
+
await yieldTurn(context.signal);
|
|
147
|
+
check();
|
|
148
|
+
}
|
|
149
|
+
if (!position) throw new Error("Truncated Ogg packet index");
|
|
150
|
+
if (!cached || position !== cached.position) {
|
|
151
|
+
const bytes = await storage.read(position, 32), row = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
152
|
+
cached = { position, next: row.getFloat64(0, true), start: row.getFloat64(8, true), offset: row.getFloat64(16, true), length: row.getFloat64(24, true) };
|
|
153
|
+
}
|
|
154
|
+
if (offset >= cached.start + cached.length) {
|
|
155
|
+
position = cached.next;
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
if (offset < cached.start) throw new Error("Invalid Ogg packet index");
|
|
159
|
+
const take = Math.min(output.length - used, cached.start + cached.length - offset);
|
|
160
|
+
const chunk = await source.read(cached.offset + offset - cached.start, take);
|
|
161
|
+
check();
|
|
162
|
+
if (!chunk.length || chunk.length > take) throw new Error("Truncated Ogg packet source");
|
|
163
|
+
output.set(chunk, used);
|
|
164
|
+
used += chunk.length;
|
|
165
|
+
offset += chunk.length;
|
|
166
|
+
}
|
|
167
|
+
return output;
|
|
168
|
+
} };
|
|
169
|
+
}
|
|
170
|
+
async *streams(pageOrder = false) {
|
|
171
|
+
this.check();
|
|
172
|
+
if (!this.ready) throw new Error("Ogg index is not validated");
|
|
173
|
+
let steps = 0;
|
|
174
|
+
for (let position = pageOrder ? this.firstPage : this.first; position; ) {
|
|
175
|
+
if (++steps % 256 === 0) {
|
|
176
|
+
await yieldTurn(this.context.signal);
|
|
177
|
+
this.check();
|
|
178
|
+
}
|
|
179
|
+
const bytes = await this.storage.read(position, 128), row = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
180
|
+
const packets = row.getFloat64(16, true);
|
|
181
|
+
yield {
|
|
182
|
+
group: row.getFloat64(120, true),
|
|
183
|
+
pageGranule: row.getBigUint64(112, true),
|
|
184
|
+
serial: row.getUint32(96, true),
|
|
185
|
+
size: row.getFloat64(32, true),
|
|
186
|
+
granule: row.getBigUint64(40, true),
|
|
187
|
+
packets,
|
|
188
|
+
head: packets ? this.packet(row.getFloat64(48, true), row.getFloat64(64, true)) : void 0,
|
|
189
|
+
comments: packets > 1 ? this.packet(row.getFloat64(72, true), row.getFloat64(88, true)) : void 0
|
|
190
|
+
};
|
|
191
|
+
position = row.getFloat64(pageOrder ? 104 : 0, true);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
// packages/safe-bash-command-ffprobe/src/flac-tags.ts
|
|
197
|
+
import { IntegerTable as IntegerTable2, PagedStorage as PagedStorage2 } from "@poe-platform/safe-fs/storage";
|
|
198
|
+
import { normalizeVorbisCommentKey } from "../../audio-ast/index.js";
|
|
199
|
+
import { yieldTurn as yieldTurn2 } from "../../safe-bash-contracts/yield.js";
|
|
200
|
+
var FlacTags = class {
|
|
201
|
+
constructor(source, context, options = {}) {
|
|
202
|
+
this.source = source;
|
|
203
|
+
this.context = context;
|
|
204
|
+
this.options = options;
|
|
205
|
+
this.storage = new PagedStorage2(context, 4);
|
|
21
206
|
this.close = this.storage.close.bind(this.storage);
|
|
22
|
-
this.keys = new
|
|
23
|
-
this.numeric = new
|
|
207
|
+
this.keys = new IntegerTable2(this.storage, 128);
|
|
208
|
+
this.numeric = new IntegerTable2(this.storage, 128);
|
|
24
209
|
}
|
|
25
210
|
source;
|
|
26
211
|
context;
|
|
212
|
+
options;
|
|
27
213
|
storage;
|
|
28
214
|
keys;
|
|
29
215
|
numeric;
|
|
@@ -39,12 +225,12 @@ var FlacTags = class {
|
|
|
39
225
|
if (bytes.length !== length) throw new Error("Truncated FLAC comment");
|
|
40
226
|
return bytes;
|
|
41
227
|
}
|
|
42
|
-
async *decoded(offset, length, ignoreBOM) {
|
|
228
|
+
async *decoded(offset, length, ignoreBOM, stored = false) {
|
|
43
229
|
const decoder = new TextDecoder("utf-8", { ignoreBOM });
|
|
44
230
|
let steps = 0;
|
|
45
231
|
for (let at = 0; at < length; at += 16384) {
|
|
46
|
-
yield decoder.decode(await this.read(offset + at, Math.min(16384, length - at)), { stream: true });
|
|
47
|
-
if (++steps % 256 === 0) await
|
|
232
|
+
yield decoder.decode(await (stored ? this.storage.read(offset + at, Math.min(16384, length - at)) : this.read(offset + at, Math.min(16384, length - at))), { stream: true });
|
|
233
|
+
if (++steps % 256 === 0) await yieldTurn2(this.context.signal);
|
|
48
234
|
}
|
|
49
235
|
yield decoder.decode();
|
|
50
236
|
}
|
|
@@ -81,7 +267,7 @@ var FlacTags = class {
|
|
|
81
267
|
if (pending) yield pending;
|
|
82
268
|
}
|
|
83
269
|
async add(span) {
|
|
84
|
-
if (++this.work % 256 === 0) await
|
|
270
|
+
if (++this.work % 256 === 0) await yieldTurn2(this.context.signal);
|
|
85
271
|
let split = -1;
|
|
86
272
|
for (let at = 0; at < span.length; at += 16384) {
|
|
87
273
|
const bytes = await this.read(span.offset + at, Math.min(16384, span.length - at)), found = bytes.indexOf(61);
|
|
@@ -89,7 +275,7 @@ var FlacTags = class {
|
|
|
89
275
|
split = at + found;
|
|
90
276
|
break;
|
|
91
277
|
}
|
|
92
|
-
if ((at / 16384 + 1) % 256 === 0) await
|
|
278
|
+
if ((at / 16384 + 1) % 256 === 0) await yieldTurn2(this.context.signal);
|
|
93
279
|
}
|
|
94
280
|
if (split <= 0) return;
|
|
95
281
|
let keyPosition = this.storage.allocate(0), units = 0, hash = 2166136261, short = "";
|
|
@@ -103,12 +289,13 @@ var FlacTags = class {
|
|
|
103
289
|
}
|
|
104
290
|
await this.storage.append(bytes);
|
|
105
291
|
units += part.length;
|
|
106
|
-
if (short.length <=
|
|
292
|
+
if (short.length <= 20) short += part.slice(0, 21 - short.length);
|
|
107
293
|
}
|
|
108
294
|
};
|
|
109
|
-
for await (const part of this.decoded(span.offset, split, false)) await appendKey(part.toUpperCase());
|
|
295
|
+
for await (const part of this.decoded(span.offset, split, false)) await appendKey(this.options.raw ? part : part.toUpperCase());
|
|
110
296
|
if (!units) return;
|
|
111
|
-
if (units
|
|
297
|
+
if (this.options.raw && short === "__proto__" && units === 9) return;
|
|
298
|
+
if (!this.options.raw && units <= 12) {
|
|
112
299
|
const normalized = normalizeVorbisCommentKey(short);
|
|
113
300
|
if (normalized !== short) {
|
|
114
301
|
keyPosition = this.storage.allocate(0);
|
|
@@ -131,6 +318,13 @@ var FlacTags = class {
|
|
|
131
318
|
}
|
|
132
319
|
const position = existing || this.storage.allocate(64);
|
|
133
320
|
row ??= [0, Number(first ?? 0n), keyPosition, units, span.block, 0, 0, 0];
|
|
321
|
+
if (this.options.raw && !existing && units <= 20 && Object.hasOwn(Object.prototype, short)) {
|
|
322
|
+
const literal = new TextEncoder().encode(String(Reflect.get(Object.prototype, short))), offset2 = await this.storage.append(literal), value2 = this.storage.allocate(32);
|
|
323
|
+
await this.write(value2, [0, offset2, literal.length, 2]);
|
|
324
|
+
row[5] = value2;
|
|
325
|
+
row[6] = value2;
|
|
326
|
+
row[7] = literal.length ? 1 : 0;
|
|
327
|
+
}
|
|
134
328
|
const append = row[4] === span.block && !!row[7], value = this.storage.allocate(32), offset = span.offset + split + 1, length = span.length - split - 1;
|
|
135
329
|
await this.write(value, [0, offset, length, append ? 1 : 0]);
|
|
136
330
|
if (append) await this.write(row[6], [value]);
|
|
@@ -153,8 +347,9 @@ var FlacTags = class {
|
|
|
153
347
|
async *valueText(value) {
|
|
154
348
|
while (value) {
|
|
155
349
|
const bytes = await this.storage.read(value, 32), view = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
156
|
-
|
|
157
|
-
yield
|
|
350
|
+
const kind = view.getFloat64(24, true);
|
|
351
|
+
if (kind === 1) yield this.options.raw ? ";" : "\n";
|
|
352
|
+
yield* this.decoded(view.getFloat64(8, true), view.getFloat64(16, true), true, kind === 2);
|
|
158
353
|
value = view.getFloat64(0, true);
|
|
159
354
|
}
|
|
160
355
|
}
|
|
@@ -172,103 +367,6 @@ var FlacTags = class {
|
|
|
172
367
|
}
|
|
173
368
|
};
|
|
174
369
|
|
|
175
|
-
// packages/safe-bash-command-ffprobe/src/wav-tags.ts
|
|
176
|
-
import { IntegerTable as IntegerTable2, PagedStorage as PagedStorage2 } from "@poe-platform/safe-fs/storage";
|
|
177
|
-
import { yieldTurn as yieldTurn2 } from "../../safe-bash-contracts/yield.js";
|
|
178
|
-
var WavTags = class {
|
|
179
|
-
constructor(source, context) {
|
|
180
|
-
this.source = source;
|
|
181
|
-
this.context = context;
|
|
182
|
-
this.storage = new PagedStorage2(context, 4);
|
|
183
|
-
this.close = this.storage.close.bind(this.storage);
|
|
184
|
-
this.keys = new IntegerTable2(this.storage, 128);
|
|
185
|
-
this.numeric = new IntegerTable2(this.storage, 128);
|
|
186
|
-
}
|
|
187
|
-
source;
|
|
188
|
-
context;
|
|
189
|
-
storage;
|
|
190
|
-
keys;
|
|
191
|
-
numeric;
|
|
192
|
-
head = 0;
|
|
193
|
-
tail = 0;
|
|
194
|
-
count = 0;
|
|
195
|
-
close;
|
|
196
|
-
async *decoded(offset, length) {
|
|
197
|
-
const decoder = new TextDecoder();
|
|
198
|
-
let steps = 0;
|
|
199
|
-
for (let at = 0; at < length; at += 16384) {
|
|
200
|
-
this.context.signal.throwIfAborted();
|
|
201
|
-
const bytes = await this.source.read(offset + at, Math.min(16384, length - at));
|
|
202
|
-
this.context.signal.throwIfAborted();
|
|
203
|
-
if (bytes.length !== Math.min(16384, length - at)) throw new Error("Truncated WAV tag");
|
|
204
|
-
yield decoder.decode(bytes, { stream: true });
|
|
205
|
-
if (++steps % 256 === 0) await yieldTurn2(this.context.signal);
|
|
206
|
-
}
|
|
207
|
-
yield decoder.decode();
|
|
208
|
-
}
|
|
209
|
-
async add(span) {
|
|
210
|
-
let units = 0, kept = 0;
|
|
211
|
-
for await (const text of this.decoded(span.offset, span.length)) {
|
|
212
|
-
const zero = text.indexOf("\0"), part = zero < 0 ? text : text.slice(0, zero);
|
|
213
|
-
for (const unit of part) {
|
|
214
|
-
units += unit.length;
|
|
215
|
-
if (unit.trimEnd()) kept = units;
|
|
216
|
-
}
|
|
217
|
-
if (zero >= 0) break;
|
|
218
|
-
}
|
|
219
|
-
let key = 0n;
|
|
220
|
-
for (let i = 0; i < span.key.length; i++) key = key << (span.key.length > 4 ? 7n : 16n) | BigInt(span.key.charCodeAt(i));
|
|
221
|
-
if (span.key.length > 4) key |= 1n << 63n;
|
|
222
|
-
const existing = await this.keys.get(key);
|
|
223
|
-
const position = existing === void 0 ? this.storage.allocate(56) : Number(existing);
|
|
224
|
-
const bytes = existing === void 0 ? new Uint8Array(56) : await this.storage.read(position, 56);
|
|
225
|
-
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
226
|
-
view.setFloat64(8, span.offset, true);
|
|
227
|
-
view.setFloat64(16, span.length, true);
|
|
228
|
-
view.setFloat64(24, kept, true);
|
|
229
|
-
view.setUint16(32, span.key.length, true);
|
|
230
|
-
for (let i = 0; i < span.key.length; i++) view.setUint16(34 + i * 2, span.key.charCodeAt(i), true);
|
|
231
|
-
await this.storage.write(position, bytes);
|
|
232
|
-
if (existing !== void 0) return;
|
|
233
|
-
await this.keys.set(key, BigInt(position));
|
|
234
|
-
this.count++;
|
|
235
|
-
const numeric = Number(span.key);
|
|
236
|
-
if (Number.isInteger(numeric) && numeric >= 0 && numeric < 4294967295 && String(numeric) === span.key) await this.numeric.set(BigInt(numeric), BigInt(position));
|
|
237
|
-
else {
|
|
238
|
-
if (this.tail) {
|
|
239
|
-
const link = new Uint8Array(8);
|
|
240
|
-
new DataView(link.buffer).setFloat64(0, position, true);
|
|
241
|
-
await this.storage.write(this.tail, link);
|
|
242
|
-
} else this.head = position;
|
|
243
|
-
this.tail = position;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
async record(position) {
|
|
247
|
-
const bytes = await this.storage.read(position, 56), view = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
248
|
-
let key = "";
|
|
249
|
-
for (let i = 0; i < view.getUint16(32, true); i++) key += String.fromCharCode(view.getUint16(34 + i * 2, true));
|
|
250
|
-
const offset = view.getFloat64(8, true), length = view.getFloat64(16, true), kept = view.getFloat64(24, true), decoded = this.decoded.bind(this);
|
|
251
|
-
return { key, next: view.getFloat64(0, true), async *text() {
|
|
252
|
-
let remaining = kept;
|
|
253
|
-
if (!remaining) return;
|
|
254
|
-
for await (const part of decoded(offset, length)) {
|
|
255
|
-
const take = Math.min(remaining, part.length);
|
|
256
|
-
if (take) yield part.slice(0, take);
|
|
257
|
-
remaining -= take;
|
|
258
|
-
if (!remaining) return;
|
|
259
|
-
}
|
|
260
|
-
} };
|
|
261
|
-
}
|
|
262
|
-
async *entries() {
|
|
263
|
-
for await (const [, position] of this.numeric.entries()) yield await this.record(Number(position));
|
|
264
|
-
for (let position = this.head; position; ) {
|
|
265
|
-
const entry = await this.record(position);
|
|
266
|
-
position = entry.next;
|
|
267
|
-
yield entry;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
|
|
272
370
|
// packages/safe-bash-command-ffprobe/src/probe.ts
|
|
273
371
|
import { parseAudio } from "../../audio-ast/index.js";
|
|
274
372
|
function parseArguments(args) {
|
|
@@ -449,6 +547,275 @@ function formatAudioProbe(audio, size, parsed) {
|
|
|
449
547
|
return lines.length ? lines.join("\n") + "\n" : "";
|
|
450
548
|
}
|
|
451
549
|
|
|
550
|
+
// packages/safe-bash-command-ffprobe/src/ogg-probe.ts
|
|
551
|
+
async function validatePictures(text) {
|
|
552
|
+
let quartet = "", line = false, ended = false, count = 0, word = 0, stage = 0, mark = 8;
|
|
553
|
+
const decode = () => {
|
|
554
|
+
const decoded = atob(quartet);
|
|
555
|
+
ended ||= quartet.includes("=");
|
|
556
|
+
quartet = "";
|
|
557
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
558
|
+
count++;
|
|
559
|
+
word = (word << 8 | decoded.charCodeAt(i)) >>> 0;
|
|
560
|
+
if (stage === 3 && count > mark) throw new Error("Trailing FLAC picture bytes");
|
|
561
|
+
if (count === mark && stage < 3) {
|
|
562
|
+
mark += word + (stage === 0 ? 4 : stage === 1 ? 20 : 0);
|
|
563
|
+
stage++;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
const finish = () => {
|
|
568
|
+
if (line) {
|
|
569
|
+
if (quartet) decode();
|
|
570
|
+
if (stage !== 3 || count !== mark) throw new Error("Truncated or invalid audio structure");
|
|
571
|
+
}
|
|
572
|
+
quartet = "";
|
|
573
|
+
line = false;
|
|
574
|
+
ended = false;
|
|
575
|
+
count = 0;
|
|
576
|
+
word = 0;
|
|
577
|
+
stage = 0;
|
|
578
|
+
mark = 8;
|
|
579
|
+
};
|
|
580
|
+
for await (const part of text) for (const char of part) {
|
|
581
|
+
if (char === "\n") {
|
|
582
|
+
finish();
|
|
583
|
+
continue;
|
|
584
|
+
}
|
|
585
|
+
line = true;
|
|
586
|
+
if (char === " " || char === " " || char === "\r" || char === "\f") continue;
|
|
587
|
+
if (ended) throw new Error("Invalid character");
|
|
588
|
+
quartet += char;
|
|
589
|
+
if (quartet.length >= 4) decode();
|
|
590
|
+
}
|
|
591
|
+
finish();
|
|
592
|
+
}
|
|
593
|
+
async function probeStoredOgg(source, context, retain) {
|
|
594
|
+
const index = new OggIndex(source, context);
|
|
595
|
+
retain(index.close);
|
|
596
|
+
await index.scan();
|
|
597
|
+
let count = 0, group = 0, groupDuration = 0, duration = 0, adjustment = 0;
|
|
598
|
+
let first, pictures, failed = true;
|
|
599
|
+
try {
|
|
600
|
+
const physical = index.streams(true);
|
|
601
|
+
for await (const stream of index.streams()) {
|
|
602
|
+
const page = (await physical.next()).value;
|
|
603
|
+
if (!stream.head || !page) throw new Error("Ogg input contains no audio stream");
|
|
604
|
+
let current, currentFailed = true;
|
|
605
|
+
try {
|
|
606
|
+
const audio = await probeOggStreamSource({ head: stream.head, comments: stream.comments, granule: stream.granule, size: stream.size }, {
|
|
607
|
+
signal: context.signal,
|
|
608
|
+
onComment: async (span) => {
|
|
609
|
+
const prefix = new TextDecoder().decode(await stream.comments.read(span.offset, Math.min(128, span.length))), equals = prefix.indexOf("=");
|
|
610
|
+
context.signal.throwIfAborted();
|
|
611
|
+
if (equals > 0 && prefix.slice(0, equals).toUpperCase() === "METADATA_BLOCK_PICTURE") {
|
|
612
|
+
current ??= new FlacTags(stream.comments, context);
|
|
613
|
+
await current.add({ ...span, block: 0 });
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
});
|
|
617
|
+
first ??= audio;
|
|
618
|
+
count++;
|
|
619
|
+
if (stream.group !== group) {
|
|
620
|
+
duration += groupDuration;
|
|
621
|
+
groupDuration = 0;
|
|
622
|
+
group = stream.group;
|
|
623
|
+
}
|
|
624
|
+
groupDuration = Math.max(groupDuration, audio.duration);
|
|
625
|
+
if (audio.codec === "opus") adjustment = Math.max(adjustment, Number(page.pageGranule) / audio.sampleRate - audio.duration);
|
|
626
|
+
if (current) {
|
|
627
|
+
const previous = pictures;
|
|
628
|
+
pictures = current;
|
|
629
|
+
current = void 0;
|
|
630
|
+
await previous?.close();
|
|
631
|
+
}
|
|
632
|
+
currentFailed = false;
|
|
633
|
+
} finally {
|
|
634
|
+
if (current) {
|
|
635
|
+
if (currentFailed) {
|
|
636
|
+
try {
|
|
637
|
+
await current.close();
|
|
638
|
+
} catch {
|
|
639
|
+
}
|
|
640
|
+
} else await current.close();
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
if (!first || !(await physical.next()).done) throw new Error("Ogg input contains no audio stream");
|
|
645
|
+
for await (const entry of pictures?.entries() ?? []) await validatePictures(entry.text());
|
|
646
|
+
failed = false;
|
|
647
|
+
} finally {
|
|
648
|
+
if (pictures) {
|
|
649
|
+
if (failed) {
|
|
650
|
+
try {
|
|
651
|
+
await pictures.close();
|
|
652
|
+
} catch {
|
|
653
|
+
}
|
|
654
|
+
} else await pictures.close();
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
duration += groupDuration + adjustment;
|
|
658
|
+
const firstStream = first;
|
|
659
|
+
return { first: firstStream, rows: async function* (args) {
|
|
660
|
+
const parsed = parseArguments(args), streamSections = new Map([...parsed.sections].filter(([key]) => key === "stream" || key === "stream_tags"));
|
|
661
|
+
if (streamSections.size) {
|
|
662
|
+
let number = 0;
|
|
663
|
+
const physical = index.streams(true);
|
|
664
|
+
for await (const stream of index.streams()) {
|
|
665
|
+
const page = (await physical.next()).value;
|
|
666
|
+
if (parsed.selector && number !== 0) {
|
|
667
|
+
number++;
|
|
668
|
+
continue;
|
|
669
|
+
}
|
|
670
|
+
const tags = new FlacTags(stream.comments, context, { raw: true });
|
|
671
|
+
let failed2 = true;
|
|
672
|
+
try {
|
|
673
|
+
const audio = await probeOggStreamSource({ head: stream.head, comments: stream.comments, granule: stream.granule, size: stream.size }, {
|
|
674
|
+
signal: context.signal,
|
|
675
|
+
onComment: (span) => tags.add({ ...span, block: 0 })
|
|
676
|
+
});
|
|
677
|
+
for (const entry of audioProbeRows({
|
|
678
|
+
format: "ogg",
|
|
679
|
+
tags: {},
|
|
680
|
+
duration: audio.duration,
|
|
681
|
+
bitrate: audio.bitrate,
|
|
682
|
+
streams: [{ ...audio, tags: tags.count ? { "": "" } : {} }],
|
|
683
|
+
nodes: [{ type: "OggS", offset: 0, size: 0, data: new Uint8Array(0), fields: { serial: page.serial, granule: page.pageGranule } }]
|
|
684
|
+
}, source.size, { ...parsed, sections: streamSections })) {
|
|
685
|
+
if ("index" in entry.row) entry.row.index = number;
|
|
686
|
+
yield { ...entry, tags };
|
|
687
|
+
}
|
|
688
|
+
failed2 = false;
|
|
689
|
+
} finally {
|
|
690
|
+
if (failed2) {
|
|
691
|
+
try {
|
|
692
|
+
await tags.close();
|
|
693
|
+
} catch {
|
|
694
|
+
}
|
|
695
|
+
} else await tags.close();
|
|
696
|
+
}
|
|
697
|
+
number++;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
const formatSections = new Map([...parsed.sections].filter(([key]) => key === "format" || key === "format_tags"));
|
|
701
|
+
for (const entry of audioProbeRows({ format: "ogg", streams: [firstStream], tags: {}, nodes: [], duration, bitrate: duration ? source.size * 8 / duration : 0 }, source.size, { ...parsed, sections: formatSections })) {
|
|
702
|
+
if ("nb_streams" in entry.row) entry.row.nb_streams = count;
|
|
703
|
+
yield entry;
|
|
704
|
+
}
|
|
705
|
+
} };
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
// packages/safe-bash-command-ffprobe/src/media.ts
|
|
709
|
+
import { yieldTurn as yieldTurn6 } from "../../safe-bash-contracts/yield.js";
|
|
710
|
+
|
|
711
|
+
// packages/safe-bash-command-ffprobe/src/source-tags.ts
|
|
712
|
+
import { IntegerTable as IntegerTable3, PagedStorage as PagedStorage3 } from "@poe-platform/safe-fs/storage";
|
|
713
|
+
import { readId3Text } from "../../audio-ast/index.js";
|
|
714
|
+
import { yieldTurn as yieldTurn3 } from "../../safe-bash-contracts/yield.js";
|
|
715
|
+
var SourceAudioTags = class {
|
|
716
|
+
constructor(source, context) {
|
|
717
|
+
this.source = source;
|
|
718
|
+
this.context = context;
|
|
719
|
+
this.storage = new PagedStorage3(context, 4);
|
|
720
|
+
this.close = this.storage.close.bind(this.storage);
|
|
721
|
+
this.keys = new IntegerTable3(this.storage, 128);
|
|
722
|
+
this.numeric = new IntegerTable3(this.storage, 128);
|
|
723
|
+
}
|
|
724
|
+
source;
|
|
725
|
+
context;
|
|
726
|
+
storage;
|
|
727
|
+
keys;
|
|
728
|
+
numeric;
|
|
729
|
+
head = 0;
|
|
730
|
+
tail = 0;
|
|
731
|
+
count = 0;
|
|
732
|
+
close;
|
|
733
|
+
async *decoded(offset, length, encoding = 255, unsynchronized = false) {
|
|
734
|
+
if (encoding < 4) {
|
|
735
|
+
yield* readId3Text(this.source, { key: "", offset, length, encoding, unsynchronized }, { signal: this.context.signal, checkpoint: () => yieldTurn3(this.context.signal) });
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
const decoder = new TextDecoder();
|
|
739
|
+
let steps = 0;
|
|
740
|
+
for (let at = 0; at < length; at += 16384) {
|
|
741
|
+
this.context.signal.throwIfAborted();
|
|
742
|
+
const bytes = await (encoding === 254 ? this.storage : this.source).read(offset + at, Math.min(16384, length - at));
|
|
743
|
+
this.context.signal.throwIfAborted();
|
|
744
|
+
if (bytes.length !== Math.min(16384, length - at)) throw new Error("Truncated audio tag");
|
|
745
|
+
yield decoder.decode(bytes, { stream: true });
|
|
746
|
+
if (++steps % 256 === 0) await yieldTurn3(this.context.signal);
|
|
747
|
+
}
|
|
748
|
+
yield decoder.decode();
|
|
749
|
+
}
|
|
750
|
+
async add(tag) {
|
|
751
|
+
const literal = "value" in tag ? new TextEncoder().encode(tag.value) : void 0;
|
|
752
|
+
const span = "value" in tag ? { key: tag.key, offset: await this.storage.append(literal), length: literal.length } : tag;
|
|
753
|
+
const encoding = literal ? 254 : "encoding" in tag ? tag.encoding : 255;
|
|
754
|
+
const unsynchronized = "unsynchronized" in tag && tag.unsynchronized;
|
|
755
|
+
let units = 0, kept = 0;
|
|
756
|
+
for await (const text of this.decoded(span.offset, span.length, encoding, unsynchronized)) {
|
|
757
|
+
const zero = text.indexOf("\0"), part = zero < 0 ? text : text.slice(0, zero);
|
|
758
|
+
for (const unit of part) {
|
|
759
|
+
units += unit.length;
|
|
760
|
+
if (unit.trimEnd()) kept = units;
|
|
761
|
+
}
|
|
762
|
+
if (zero >= 0) break;
|
|
763
|
+
}
|
|
764
|
+
let key = 0n;
|
|
765
|
+
for (let i = 0; i < span.key.length; i++) key = key << (span.key.length > 4 ? 5n : 16n) | BigInt(span.key.length > 4 ? span.key.charCodeAt(i) & 31 : span.key.charCodeAt(i));
|
|
766
|
+
if (span.key.length > 4) key |= 1n << 63n;
|
|
767
|
+
const existing = await this.keys.get(key);
|
|
768
|
+
const position = existing === void 0 ? this.storage.allocate(64) : Number(existing);
|
|
769
|
+
const bytes = existing === void 0 ? new Uint8Array(64) : await this.storage.read(position, 64);
|
|
770
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
771
|
+
view.setFloat64(8, span.offset, true);
|
|
772
|
+
view.setFloat64(16, span.length, true);
|
|
773
|
+
view.setFloat64(24, kept, true);
|
|
774
|
+
view.setUint16(32, span.key.length, true);
|
|
775
|
+
for (let i = 0; i < span.key.length; i++) view.setUint16(34 + i * 2, span.key.charCodeAt(i), true);
|
|
776
|
+
bytes[56] = encoding;
|
|
777
|
+
bytes[57] = unsynchronized ? 1 : 0;
|
|
778
|
+
await this.storage.write(position, bytes);
|
|
779
|
+
if (existing !== void 0) return;
|
|
780
|
+
await this.keys.set(key, BigInt(position));
|
|
781
|
+
this.count++;
|
|
782
|
+
const numeric = Number(span.key);
|
|
783
|
+
if (Number.isInteger(numeric) && numeric >= 0 && numeric < 4294967295 && String(numeric) === span.key) await this.numeric.set(BigInt(numeric), BigInt(position));
|
|
784
|
+
else {
|
|
785
|
+
if (this.tail) {
|
|
786
|
+
const link = new Uint8Array(8);
|
|
787
|
+
new DataView(link.buffer).setFloat64(0, position, true);
|
|
788
|
+
await this.storage.write(this.tail, link);
|
|
789
|
+
} else this.head = position;
|
|
790
|
+
this.tail = position;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
async record(position) {
|
|
794
|
+
const bytes = await this.storage.read(position, 64), view = new DataView(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
795
|
+
let key = "";
|
|
796
|
+
for (let i = 0; i < view.getUint16(32, true); i++) key += String.fromCharCode(view.getUint16(34 + i * 2, true));
|
|
797
|
+
const offset = view.getFloat64(8, true), length = view.getFloat64(16, true), kept = view.getFloat64(24, true), decoded = this.decoded.bind(this), encoding = bytes[56], unsynchronized = !!bytes[57];
|
|
798
|
+
return { key, next: view.getFloat64(0, true), async *text() {
|
|
799
|
+
let remaining = kept;
|
|
800
|
+
if (!remaining) return;
|
|
801
|
+
for await (const part of decoded(offset, length, encoding, unsynchronized)) {
|
|
802
|
+
const take = Math.min(remaining, part.length);
|
|
803
|
+
if (take) yield part.slice(0, take);
|
|
804
|
+
remaining -= take;
|
|
805
|
+
if (!remaining) return;
|
|
806
|
+
}
|
|
807
|
+
} };
|
|
808
|
+
}
|
|
809
|
+
async *entries() {
|
|
810
|
+
for await (const [, position] of this.numeric.entries()) yield await this.record(Number(position));
|
|
811
|
+
for (let position = this.head; position; ) {
|
|
812
|
+
const entry = await this.record(position);
|
|
813
|
+
position = entry.next;
|
|
814
|
+
yield entry;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
|
|
452
819
|
// packages/safe-bash-command-ffprobe/src/tag-format.ts
|
|
453
820
|
async function* parts(value) {
|
|
454
821
|
if (typeof value === "function") yield* value();
|
|
@@ -505,11 +872,17 @@ async function needsQuotes(input, separator) {
|
|
|
505
872
|
return false;
|
|
506
873
|
}
|
|
507
874
|
async function* formatTaggedAudio(audio, size, args, tags) {
|
|
508
|
-
const parsed = parseArguments(args), {
|
|
509
|
-
|
|
875
|
+
const parsed = parseArguments(args), rows = audioProbeRows({ ...audio, nodes: audio.nodes ?? [] }, size, parsed, tags.count > 0);
|
|
876
|
+
yield* formatTaggedRows((async function* () {
|
|
877
|
+
for (const row of rows) yield { ...row, tags };
|
|
878
|
+
})(), args);
|
|
879
|
+
}
|
|
880
|
+
async function* formatTaggedRows(rows, args) {
|
|
881
|
+
const { sections, format, settings } = parseArguments(args);
|
|
882
|
+
let tags;
|
|
510
883
|
async function* tagFields(section) {
|
|
511
884
|
const selected = sections.get(section + "_tags");
|
|
512
|
-
for await (const entry of tags
|
|
885
|
+
for await (const entry of tags?.entries() ?? []) {
|
|
513
886
|
let included = selected === void 0;
|
|
514
887
|
for (const wanted of selected ?? []) {
|
|
515
888
|
let at = 0, matches = true;
|
|
@@ -552,23 +925,29 @@ async function* formatTaggedAudio(audio, size, args, tags) {
|
|
|
552
925
|
}
|
|
553
926
|
if (format === "json") {
|
|
554
927
|
yield "{";
|
|
555
|
-
let first = true;
|
|
556
|
-
if (
|
|
928
|
+
let first = true, streamOpen = sections.has("stream") || sections.has("stream_tags"), firstStream = true;
|
|
929
|
+
if (streamOpen) {
|
|
557
930
|
yield '\n "streams": [';
|
|
558
931
|
first = false;
|
|
559
|
-
|
|
560
|
-
|
|
932
|
+
}
|
|
933
|
+
for await (const entry of rows) {
|
|
934
|
+
const { section, row } = entry;
|
|
935
|
+
tags = entry.tags;
|
|
936
|
+
if (section === "stream") {
|
|
561
937
|
yield (firstStream ? "\n" : ",\n") + " ";
|
|
562
938
|
firstStream = false;
|
|
563
939
|
yield* jsonRow(row, section, 8);
|
|
940
|
+
} else if (section === "format") {
|
|
941
|
+
if (streamOpen) {
|
|
942
|
+
yield (firstStream ? "" : "\n ") + "]";
|
|
943
|
+
streamOpen = false;
|
|
944
|
+
}
|
|
945
|
+
yield (first ? "\n" : ",\n") + ' "format": ';
|
|
946
|
+
first = false;
|
|
947
|
+
yield* jsonRow(row, section, 4);
|
|
564
948
|
}
|
|
565
|
-
yield (firstStream ? "" : "\n ") + "]";
|
|
566
|
-
}
|
|
567
|
-
for (const { section, row } of rows) if (section === "format") {
|
|
568
|
-
yield (first ? "\n" : ",\n") + ' "format": ';
|
|
569
|
-
first = false;
|
|
570
|
-
yield* jsonRow(row, section, 4);
|
|
571
949
|
}
|
|
950
|
+
if (streamOpen) yield (firstStream ? "" : "\n ") + "]";
|
|
572
951
|
yield (first ? "" : "\n") + "}\n";
|
|
573
952
|
return;
|
|
574
953
|
}
|
|
@@ -577,7 +956,9 @@ async function* formatTaggedAudio(audio, size, args, tags) {
|
|
|
577
956
|
return value === void 0 ? fallback : value === "1";
|
|
578
957
|
};
|
|
579
958
|
let streamIndex = 0;
|
|
580
|
-
for (const
|
|
959
|
+
for await (const entry of rows) {
|
|
960
|
+
const { section, row } = entry;
|
|
961
|
+
tags = entry.tags;
|
|
581
962
|
async function* fields() {
|
|
582
963
|
for (const [key, value] of Object.entries(row)) {
|
|
583
964
|
if (typeof value === "object") {
|
|
@@ -638,9 +1019,9 @@ async function* formatTaggedAudio(audio, size, args, tags) {
|
|
|
638
1019
|
}
|
|
639
1020
|
|
|
640
1021
|
// packages/safe-bash-command-ffprobe/src/probe-output.ts
|
|
641
|
-
import { PagedStorage as
|
|
1022
|
+
import { PagedStorage as PagedStorage4 } from "@poe-platform/safe-fs/storage";
|
|
642
1023
|
import { writeBytes } from "../../safe-bash-contracts/io.js";
|
|
643
|
-
import { yieldTurn as
|
|
1024
|
+
import { yieldTurn as yieldTurn4 } from "../../safe-bash-contracts/yield.js";
|
|
644
1025
|
async function* encodeParts(parts2, signal) {
|
|
645
1026
|
const encoder = new TextEncoder();
|
|
646
1027
|
let high = "", steps = 0;
|
|
@@ -656,13 +1037,13 @@ async function* encodeParts(parts2, signal) {
|
|
|
656
1037
|
text = text.slice(0, -1);
|
|
657
1038
|
}
|
|
658
1039
|
if (text) yield encoder.encode(text);
|
|
659
|
-
if (++steps % 256 === 0) await
|
|
1040
|
+
if (++steps % 256 === 0) await yieldTurn4(signal);
|
|
660
1041
|
}
|
|
661
1042
|
}
|
|
662
1043
|
if (high) yield encoder.encode(high);
|
|
663
1044
|
}
|
|
664
1045
|
async function writeProbeOutput(context, parts2, check, beforePublish) {
|
|
665
|
-
const storage = new
|
|
1046
|
+
const storage = new PagedStorage4(context, 4), start = storage.allocate(0);
|
|
666
1047
|
let size = 0, failed = true;
|
|
667
1048
|
try {
|
|
668
1049
|
for await (const bytes of encodeParts(parts2, context.signal)) {
|
|
@@ -688,10 +1069,10 @@ async function writeProbeOutput(context, parts2, check, beforePublish) {
|
|
|
688
1069
|
}
|
|
689
1070
|
|
|
690
1071
|
// packages/safe-bash-command-ffprobe/src/stream-input.ts
|
|
691
|
-
import { PagedStorage as
|
|
1072
|
+
import { PagedStorage as PagedStorage5 } from "@poe-platform/safe-fs/storage";
|
|
692
1073
|
import { readBytes } from "../../safe-bash-contracts/io.js";
|
|
693
1074
|
import { readFileStream } from "../../safe-bash-contracts/filesystem.js";
|
|
694
|
-
import { yieldTurn as
|
|
1075
|
+
import { yieldTurn as yieldTurn5 } from "../../safe-bash-contracts/yield.js";
|
|
695
1076
|
async function openProbeStream(context, path) {
|
|
696
1077
|
context.signal.throwIfAborted();
|
|
697
1078
|
if (path === void 0) return readBytes(context.stdin, context.signal);
|
|
@@ -763,7 +1144,7 @@ async function sniffMediaStream(source, signal, account) {
|
|
|
763
1144
|
return { prefix: prefix.subarray(0, size), stream: replay() };
|
|
764
1145
|
}
|
|
765
1146
|
async function withStagedProbeSource(context, input, probe2, retain) {
|
|
766
|
-
const storage = new
|
|
1147
|
+
const storage = new PagedStorage5(context, 4);
|
|
767
1148
|
retain?.(storage.close.bind(storage));
|
|
768
1149
|
let start;
|
|
769
1150
|
let size = 0, steps = 0, failed = true;
|
|
@@ -773,7 +1154,7 @@ async function withStagedProbeSource(context, input, probe2, retain) {
|
|
|
773
1154
|
size += chunk.length;
|
|
774
1155
|
start ??= storage.allocate(0);
|
|
775
1156
|
await storage.append(chunk);
|
|
776
|
-
if (++steps % 256 === 0) await
|
|
1157
|
+
if (++steps % 256 === 0) await yieldTurn5(context.signal);
|
|
777
1158
|
}
|
|
778
1159
|
context.signal.throwIfAborted();
|
|
779
1160
|
start ??= storage.allocate(0);
|
|
@@ -795,7 +1176,7 @@ async function withStagedProbeSource(context, input, probe2, retain) {
|
|
|
795
1176
|
}
|
|
796
1177
|
|
|
797
1178
|
// packages/safe-bash-command-ffprobe/src/media.ts
|
|
798
|
-
import { probeWavSource, probeFlacSource } from "../../audio-ast/index.js";
|
|
1179
|
+
import { probeWavSource, probeFlacSource, probeMp3Source } from "../../audio-ast/index.js";
|
|
799
1180
|
import { commandRuntimeIdentity, getCommandArguments } from "../../safe-bash-contracts/command.js";
|
|
800
1181
|
import { readBytes as readBytes2, writeBytes as writeBytes2 } from "../../safe-bash-contracts/io.js";
|
|
801
1182
|
function isStdin(path) {
|
|
@@ -973,7 +1354,7 @@ function* formatFfprobeResultChunks(probe2, opts, audioInput) {
|
|
|
973
1354
|
if (audioInput && !opts.showPackets && !opts.showFrames && !opts.showChapters && !opts.showPrograms && !opts.countFrames && !opts.countPackets && probe2.streams.length > 0 && probe2.streams.every((stream) => stream.codec_type === "audio")) {
|
|
974
1355
|
let formatted;
|
|
975
1356
|
try {
|
|
976
|
-
formatted = "bytes" in audioInput ? probe(audioInput.bytes, audioInput.args) : formatAudioProbe({ ...audioInput.audio, nodes: [] }, audioInput.size, parseArguments(audioInput.args));
|
|
1357
|
+
formatted = "bytes" in audioInput ? probe(audioInput.bytes, audioInput.args) : formatAudioProbe({ ...audioInput.audio, nodes: audioInput.audio.nodes ?? [] }, audioInput.size, parseArguments(audioInput.args));
|
|
977
1358
|
} catch {
|
|
978
1359
|
}
|
|
979
1360
|
if (formatted !== void 0) {
|
|
@@ -1319,10 +1700,18 @@ async function probeSourceMetadata(context, plugins, input, filename, budget, re
|
|
|
1319
1700
|
plugin = plugins.find((candidate) => candidate.detect(header, filename));
|
|
1320
1701
|
}
|
|
1321
1702
|
if (!plugin) return void 0;
|
|
1703
|
+
if (plugin.formatName === "ogg" && !plugin.probeMetadata) {
|
|
1704
|
+
const probeOptions = { ...records, filename, signal: context.signal, budget, limits: budget.limits, checkpoint: () => yieldTurn6(context.signal) };
|
|
1705
|
+
const flac = await probeOggFlacSource(source, probeOptions);
|
|
1706
|
+
if (flac) return flac;
|
|
1707
|
+
const ogg = await probeStoredOgg(source, context, retain);
|
|
1708
|
+
return onAudio ? { oggRows: ogg.rows } : probeOggStreamMetadata(ogg.first, source.size, probeOptions);
|
|
1709
|
+
}
|
|
1322
1710
|
const result = await plugin.probeMetadata(source, { ...records, filename, signal: context.signal, budget, limits: budget.limits });
|
|
1323
1711
|
if (onAudio) {
|
|
1324
|
-
const tags = plugin.formatName === "flac" ? new FlacTags(source, context) : new
|
|
1712
|
+
const tags = plugin.formatName === "flac" ? new FlacTags(source, context) : new SourceAudioTags(source, context);
|
|
1325
1713
|
retain(tags.close);
|
|
1714
|
+
let checkpoints = 0;
|
|
1326
1715
|
try {
|
|
1327
1716
|
const audio = tags instanceof FlacTags ? await probeFlacSource(source, { signal: context.signal, onComment: async (span) => {
|
|
1328
1717
|
try {
|
|
@@ -1331,6 +1720,15 @@ async function probeSourceMetadata(context, plugins, input, filename, budget, re
|
|
|
1331
1720
|
sourceFailed = true;
|
|
1332
1721
|
throw error;
|
|
1333
1722
|
}
|
|
1723
|
+
} }) : plugin.formatName === "mp3" ? await probeMp3Source(source, { signal: context.signal, checkpoint: async () => {
|
|
1724
|
+
if (++checkpoints % 256 === 0) await yieldTurn6(context.signal);
|
|
1725
|
+
}, onTag: async (span) => {
|
|
1726
|
+
try {
|
|
1727
|
+
await tags.add(span);
|
|
1728
|
+
} catch (error) {
|
|
1729
|
+
sourceFailed = true;
|
|
1730
|
+
throw error;
|
|
1731
|
+
}
|
|
1334
1732
|
} }) : await probeWavSource(source, { signal: context.signal, onTag: async (span) => {
|
|
1335
1733
|
try {
|
|
1336
1734
|
await tags.add(span);
|
|
@@ -1484,9 +1882,9 @@ function createFfprobeCommand(options = {}) {
|
|
|
1484
1882
|
automaticAudio = false;
|
|
1485
1883
|
}
|
|
1486
1884
|
}
|
|
1487
|
-
const automaticPlugins = !options.asts && !explicitFormat ? astPlugins.filter((plugin) => plugin.canDemux && plugin.probeMetadata
|
|
1885
|
+
const automaticPlugins = !options.asts && !explicitFormat ? astPlugins.filter((plugin) => plugin.canDemux && (plugin.probeMetadata || plugin === registry.findByFormatName("ogg")) && (!automaticAudio || ["wav", "flac", "mp3", "ogg"].some((format) => plugin === registry.findByFormatName(format)))) : [];
|
|
1488
1886
|
const explicitPlugin = explicitFormat ? registry.findByFormatName(explicitFormat) : void 0;
|
|
1489
|
-
const retainedPlugins = explicitPlugin ? explicitPlugin.canDemux && explicitPlugin.probeMetadata ? [explicitPlugin] : [] : automaticPlugins;
|
|
1887
|
+
const retainedPlugins = explicitPlugin ? explicitPlugin.canDemux && (explicitPlugin.probeMetadata || !options.asts && explicitPlugin === registry.findByFormatName("ogg")) ? [explicitPlugin] : [] : automaticPlugins;
|
|
1490
1888
|
let probeResult = retainedPlugins.length && !isStdin(inputTarget) ? await probeRetainedMetadata(context, retainedPlugins, resolvePath(context.cwd, inputTarget), inputTarget, budget, { showPackets, showFrames }, automaticAudio ? (audio, size, tags) => {
|
|
1491
1889
|
audioInput = { audio, size, args };
|
|
1492
1890
|
storedTags = tags;
|
|
@@ -1494,14 +1892,15 @@ function createFfprobeCommand(options = {}) {
|
|
|
1494
1892
|
if (!probeResult && explicitPlugin)
|
|
1495
1893
|
probeResult = await probeStreamMetadata(context, explicitPlugin, inputTarget, budget, { showPackets, showFrames });
|
|
1496
1894
|
let replay;
|
|
1497
|
-
|
|
1895
|
+
const streamPlugins = explicitPlugin ? retainedPlugins : automaticPlugins;
|
|
1896
|
+
if (!probeResult && streamPlugins.length) {
|
|
1498
1897
|
const source = await openProbeStream(context, isStdin(inputTarget) ? void 0 : resolvePath(context.cwd, inputTarget));
|
|
1499
1898
|
if (source) {
|
|
1500
1899
|
const sniffed = await sniffMediaStream(source, context.signal, (total) => {
|
|
1501
1900
|
context.inputBudget?.check(total);
|
|
1502
1901
|
budget.checkInputBytes(total);
|
|
1503
1902
|
});
|
|
1504
|
-
const automaticPlugin =
|
|
1903
|
+
const automaticPlugin = explicitPlugin ?? streamPlugins.find((plugin) => plugin.detect(sniffed.prefix, inputTarget));
|
|
1505
1904
|
if (automaticPlugin) {
|
|
1506
1905
|
if (!automaticAudio && automaticPlugin.probeMetadataStream) {
|
|
1507
1906
|
probeResult = await automaticPlugin.probeMetadataStream(sniffed.stream, {
|
|
@@ -1544,7 +1943,7 @@ function createFfprobeCommand(options = {}) {
|
|
|
1544
1943
|
});
|
|
1545
1944
|
if (!options.asts && !explicitFormat) audioInput = { bytes, args };
|
|
1546
1945
|
}
|
|
1547
|
-
const formatted = storedTags && audioInput && "audio" in audioInput ? formatTaggedAudio(audioInput.audio, audioInput.size, audioInput.args, storedTags) : formatFfprobeResultChunks(probeResult, {
|
|
1946
|
+
const formatted = "oggRows" in probeResult ? formatTaggedRows(probeResult.oggRows(args), args) : storedTags && audioInput && "audio" in audioInput ? formatTaggedAudio(audioInput.audio, audioInput.size, audioInput.args, storedTags) : formatFfprobeResultChunks(probeResult, {
|
|
1548
1947
|
printFormat,
|
|
1549
1948
|
showFormat,
|
|
1550
1949
|
showStreams,
|