@poe-platform/safe-bash 0.1.816 → 0.1.818
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/image-ast/index.js +2 -2
- package/dist/mp4-ast/index.d.ts +2 -1
- package/dist/mp4-ast/mp4-metadata-source.d.ts +10 -0
- package/dist/mp4-ast/mp4-packets-source.d.ts +8 -1
- package/dist/mp4-ast/types.d.ts +21 -3
- package/dist/pdf-ast/ast.d.ts +2 -0
- package/dist/pdf-ast/content/evaluator.d.ts +11 -0
- package/dist/pdf-ast/content/retained-evaluator.d.ts +2 -2
- package/dist/pdf-ast/content/retained-page.d.ts +2 -2
- package/dist/pdf-ast/cos/value-parser.d.ts +2 -0
- package/dist/pdf-ast/extract/html-text-stream.d.ts +14 -0
- package/dist/pdf-ast/extract/logical-text-stream.d.ts +14 -0
- package/dist/pdf-ast/extract/raw-text-index.d.ts +18 -4
- package/dist/pdf-ast/extract/retained-color.d.ts +6 -6
- package/dist/pdf-ast/extract/retained-decoded-image.d.ts +2 -2
- package/dist/pdf-ast/extract/stored-text-glyphs.d.ts +8 -0
- package/dist/pdf-ast/fonts/resolve.d.ts +5 -1
- package/dist/pdf-ast/fonts/retained.d.ts +2 -2
- package/dist/pdf-ast/image.d.ts +2 -0
- package/dist/pdf-ast/image.js +19 -0
- package/dist/pdf-ast/index.d.ts +3 -0
- package/dist/pdf-ast/index.js +264 -66845
- package/dist/pdf-ast/render/postscript.d.ts +6 -0
- package/dist/pdf-ast/render/raster.d.ts +21 -1
- package/dist/pdf-ast/retained-document.d.ts +16 -95
- package/dist/pdf-ast/retained-reader.d.ts +109 -0
- package/dist/safe-bash/command-chunks/biff-AYJZR2YV-JPESBEOO.js +5741 -0
- package/dist/safe-bash/command-chunks/{chunk-SL4LD25A.js → chunk-232N24HE.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-ALD53QFL.js → chunk-2C4QMQQD.js} +42 -12
- package/dist/safe-bash/command-chunks/{chunk-3PM46VWH.js → chunk-2FEMMALH.js} +4 -4
- package/dist/safe-bash/command-chunks/chunk-2J4OQT3F.js +153 -0
- package/dist/safe-bash/command-chunks/{chunk-QDV2NIFR.js → chunk-2TMTGVJR.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ARE267HR.js → chunk-2WTDP3TP.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-GEDO5V32.js → chunk-2XR7B6DY.js} +602 -211
- package/dist/safe-bash/command-chunks/{chunk-EY3UE26F.js → chunk-2YC6MWQB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-UPWLHHZ2.js → chunk-37KBCKDF.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-DOVWHVHI.js → chunk-3B6554G6.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-FB2WPI3M.js → chunk-3ZGO24WG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-GR4ONCQ5.js → chunk-424NYO35.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-MQE77MEQ.js → chunk-45GTHPL5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-AF2IO57Q.js → chunk-4OHTYYNU.js} +8 -136
- package/dist/safe-bash/command-chunks/{chunk-ICJH6A73.js → chunk-4PMMJ45F.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-57PK2QFX.js → chunk-4SFX6YGC.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-G3LUT475.js → chunk-4WHTTCKY.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-DBZCTL7C.js → chunk-4Z7PBIMP.js} +20 -18
- package/dist/safe-bash/command-chunks/{chunk-A4P37F3P.js → chunk-57SKL76U.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-J6FNSVHT.js → chunk-5GP4A3TD.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-OFONWWEZ.js → chunk-5IHJWBDR.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-A2L3U7DW.js → chunk-5OS4Q3AX.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-FUYZUETI.js → chunk-5PMLTSQ5.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-TXU7MMHN.js → chunk-5RDS6CNQ.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-FR63MJSO.js → chunk-5UGQGB5Y.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-UKAGRRLZ.js → chunk-5VY5O37W.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-5WS6DXYE.js +68444 -0
- package/dist/safe-bash/command-chunks/{chunk-2ALHVXEM.js → chunk-6EK76ERE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-4772DJKS.js → chunk-6GCK2KSL.js} +61 -26
- package/dist/safe-bash/command-chunks/{chunk-T5OQ53XS.js → chunk-6IID5HTY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-EZDWPTYB.js → chunk-6LOAJOWK.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-WMBELKPP.js → chunk-6PE2L522.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-ZAYTFXUX.js → chunk-73KY3MZ3.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-BOVDUJ3A.js → chunk-77WBFVZQ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-3DWFXESW.js → chunk-7GJJDM2F.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-WIW3KDBS.js → chunk-7NFICYRU.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-35DU6I2M.js → chunk-7ZEGARPB.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-A5SPMSKD.js → chunk-A32PUWYE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-KYIGYYEY.js → chunk-A32ZROH5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-IOXMGD2H.js → chunk-ADVQZLLE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CGJ7GMHO.js → chunk-AEZU6NZE.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-KDDXLHN7.js → chunk-ATHU53C2.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-R7LF4XQV.js → chunk-B6T2526I.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-PPN53PX3.js → chunk-BB7HBO56.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ZM7HMBAJ.js → chunk-BDGNKRY4.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-VMZIAFVJ.js → chunk-BFRSYJUC.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-X42MJT2J.js → chunk-BJL7AGA5.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-VZTVR3JI.js → chunk-C2QUG7IP.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-IVKAFEPO.js → chunk-C34RLMAC.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-5O45KGW5.js → chunk-C5VUJOUQ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LQDANF2B.js → chunk-CCNOZKAK.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-FEBTT5NH.js → chunk-CEHICGP6.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-SICTBSLW.js → chunk-CODJMTSA.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-LJ3UYESS.js → chunk-CP5EO5TT.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-45DKGZYO.js → chunk-CSS5KXQC.js} +329 -152
- package/dist/safe-bash/command-chunks/{chunk-6RLWPB44.js → chunk-CZSLXQU2.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-3ZWFE4CK.js → chunk-D2ZT2UUT.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WH624PKJ.js → chunk-D5XSGHXN.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-NDALIHKK.js → chunk-D7UFAIBS.js} +18 -18
- package/dist/safe-bash/command-chunks/{chunk-ISFGPCED.js → chunk-DCKAY6HV.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-LNAZ3E4Q.js → chunk-DGCJVZW6.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LFSWLJPR.js → chunk-DJB5RB6U.js} +288 -32
- package/dist/safe-bash/command-chunks/{chunk-FGHSE3RZ.js → chunk-DZ4ELL34.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-LQX7RAF7.js → chunk-EBKKYRQJ.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-QNETPOMH.js → chunk-EDBNI7WE.js} +14 -14
- package/dist/safe-bash/command-chunks/{chunk-5GDF5FAS.js → chunk-EEJ3YXVO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-RTHYAGKI.js → chunk-ETN25WCR.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-ET6LMDEX.js → chunk-EV3DPRWE.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-3MUFXGA2.js → chunk-F2JUB7JI.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-345YBIHP.js → chunk-F42WV2YO.js} +19 -19
- package/dist/safe-bash/command-chunks/{chunk-FTZFCMVI.js → chunk-FAVWWMFW.js} +12 -12
- package/dist/safe-bash/command-chunks/{chunk-XBWD6SI3.js → chunk-FDRE535F.js} +16 -16
- package/dist/safe-bash/command-chunks/{chunk-WMV5224N.js → chunk-FILE5PBI.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-XPQUUFQD.js → chunk-FPOM47UA.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-QMBMZSJF.js → chunk-FQ2WRT4Q.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-H56BSMFQ.js → chunk-FVAFISPY.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-2QZUAZTH.js → chunk-GIQUIF6E.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-2TWXRJPB.js → chunk-GNORF6RY.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-K7VDCBXW.js → chunk-GPLN6JV2.js} +24 -24
- package/dist/safe-bash/command-chunks/{chunk-DZOKH5BL.js → chunk-GQ7BD75U.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-N4HWOLGZ.js → chunk-GY2C555A.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-N32AP43V.js → chunk-GZNX5SS4.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-YPG55QTP.js → chunk-HCJWEB6P.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4ABR3KGK.js → chunk-HNY7LZ5P.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-P462JTNT.js → chunk-HOBXZX23.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-5KZMR6AJ.js → chunk-HW3IOXT6.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-3VGQTLO6.js → chunk-HX7QQNWS.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-TXWDR2P4.js → chunk-IBT3OWXB.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-OHEZQ4QA.js → chunk-IFBLXBBM.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-HOJ7WDTS.js → chunk-IJZUUXLL.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-BZRWZ6GO.js → chunk-IKU7ZBF3.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CKIXC7AO.js → chunk-IPKYPADE.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-IWVANZWH.js → chunk-JLPBGKVC.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-6M3JTPKE.js → chunk-JNRX5EFF.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-5YL453ZF.js → chunk-JSX5CFZY.js} +36 -36
- package/dist/safe-bash/command-chunks/{chunk-V6JPIZUW.js → chunk-JT656DKZ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-DM5WURQL.js → chunk-JY2T3KV2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-IZ3SD5S2.js → chunk-K2NV6H7E.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-62RG3GHF.js → chunk-K6E56LND.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-FLSXHLJG.js → chunk-KADQKXZE.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-URQSUMMJ.js → chunk-KFFV7HBL.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-ONQP4FNV.js → chunk-KZICRCQ7.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-N35IJXBK.js → chunk-L6X4EEN6.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-SHLT5R64.js → chunk-LF7YJ5VQ.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-GMBUOYTN.js → chunk-LNHTLWIL.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-A6OTPNNI.js → chunk-LPKMNCC5.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-MUTARE5I.js → chunk-LSKA4IR4.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-N3ZH4YYH.js → chunk-LTWX23FS.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-JA36YOZI.js → chunk-LUJUYUOG.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-4X2MPZXW.js → chunk-M42GCI5F.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-AYQPJQJR.js → chunk-M5BFAMXD.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-OFDJJRAD.js → chunk-M7DZ7COK.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-RINR7XPR.js → chunk-MMSKDYK6.js} +234 -8
- package/dist/safe-bash/command-chunks/{chunk-NKK76B4V.js → chunk-MN7EEK6Y.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-OBIXFO25.js → chunk-MOJQT6RW.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-HOKPYTHQ.js → chunk-MPRUGL4W.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-CORUUCS2.js → chunk-MRBX4KEP.js} +3 -3
- package/dist/safe-bash/command-chunks/chunk-MTWFSBNG.js +137 -0
- package/dist/safe-bash/command-chunks/{chunk-RRAQII52.js → chunk-MURNTGDL.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-KDBU5Q2N.js → chunk-MWVELMXZ.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-PRO7JOIH.js → chunk-N3MAYM6Y.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-E22EAYJN.js → chunk-NFWLZDMY.js} +177 -34
- package/dist/safe-bash/command-chunks/{chunk-GAROGIVU.js → chunk-NP2QXF2X.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-SNA2LVBX.js → chunk-NPVOYY2A.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ENMJHB2C.js → chunk-NTXRKJPZ.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-3K5CVXUV.js → chunk-NZF56C25.js} +10 -10
- package/dist/safe-bash/command-chunks/{chunk-5MNQTHED.js → chunk-OA4MEWTN.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-SWIF6BBY.js → chunk-OL75SBZL.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-LT2YCGC5.js → chunk-OVQSILY3.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-WDVPHDBH.js → chunk-P57V45F2.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-OWCBX5M2.js → chunk-PAY4ULWY.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-CHZE6FNT.js → chunk-PFUZPAXQ.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-NLCUQD7Y.js → chunk-PX6E5MHY.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-POGVOCOB.js → chunk-QCN7MRRU.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-ZZERSKAR.js → chunk-QLE6JUR7.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-LZY46GYY.js → chunk-QMWBKR4C.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-BIJW6QWB.js → chunk-QNLX3CZH.js} +13 -13
- package/dist/safe-bash/command-chunks/{chunk-MDFNUNK5.js → chunk-QWX5IERU.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-WOL3LBXE.js → chunk-R2N3E267.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZNCPIZCN.js → chunk-R6X63VAO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-FGARVKAX.js → chunk-RNIFPFGC.js} +13 -11
- package/dist/safe-bash/command-chunks/{chunk-OIHQXURE.js → chunk-ROE6KD4C.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-BKK4MS3V.js → chunk-RR6XG2I6.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-RYOHOS2I.js +398 -0
- package/dist/safe-bash/command-chunks/{chunk-4QEJPP3K.js → chunk-S5X7PBO4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-IHLZ6HNQ.js → chunk-TSKJNCKD.js} +3 -2
- package/dist/safe-bash/command-chunks/{chunk-U42WHQRH.js → chunk-TTTNFKT6.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-EWC56JNI.js → chunk-TTVJJZOM.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-TY7JXEWI.js → chunk-UBX5I5HY.js} +11 -11
- package/dist/safe-bash/command-chunks/{chunk-QOKFSYD5.js → chunk-UE34SQET.js} +9 -9
- package/dist/safe-bash/command-chunks/{chunk-DXOXUKQB.js → chunk-UH4CQIU3.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-VNNNVT4C.js → chunk-UZZ2WJQV.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-QNX5LZBK.js → chunk-V6NZVM7C.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-KLAC2MIZ.js → chunk-VEZULAIA.js} +6 -6
- package/dist/safe-bash/command-chunks/{chunk-OCV5ZU35.js → chunk-VSTAHYCV.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-UFLMOU3B.js → chunk-VUJCVXD4.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-5V7WIQ2D.js → chunk-VW67MA53.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-B2C3UPJS.js → chunk-W42SUPD6.js} +13 -1
- package/dist/safe-bash/command-chunks/{chunk-2IMIKROX.js → chunk-WI5NEHPD.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-SBXS4S6Y.js → chunk-WJSU2UVG.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-VVWHFNHD.js → chunk-WPEIOUJN.js} +415 -25
- package/dist/safe-bash/command-chunks/{chunk-YKODRSGT.js → chunk-WRCYZJNO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-TID5TSQW.js → chunk-WRJV7OVO.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-T4SEQU66.js → chunk-X4TWJNW7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-CKA7ZROU.js → chunk-X6KFCAWZ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-ROQ3VNVX.js → chunk-X6KO7D6R.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-S5ER73EA.js → chunk-XB5ZZHFD.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FHQOFEQK.js → chunk-XLFOLLUZ.js} +8 -8
- package/dist/safe-bash/command-chunks/{chunk-UJYXSLM6.js → chunk-XLPEPCQC.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-UT5X6QRU.js → chunk-XQFEP43Y.js} +5 -5
- package/dist/safe-bash/command-chunks/chunk-Y7XL6CWB.js +771 -0
- package/dist/safe-bash/command-chunks/{chunk-RVWIEXR7.js → chunk-YKEMSPJZ.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-ERWIJYCS.js → chunk-YN3OEJAZ.js} +7 -7
- package/dist/safe-bash/command-chunks/{chunk-6YF2QADH.js → chunk-YOYK2I4N.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-26JE5JEB.js → chunk-YS5ZKMRJ.js} +4 -4
- package/dist/safe-bash/command-chunks/{chunk-LMLBQSAM.js → chunk-YW7WU7W2.js} +5 -5
- package/dist/safe-bash/command-chunks/{chunk-YXR4JE4U.js → chunk-Z33YS3DW.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-T2FRXSQT.js → chunk-ZBXUAM34.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-VVV45NLY.js → chunk-ZJUU5IAS.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-7OCTMVYJ.js → chunk-ZNABMTV3.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-6JGICYHP.js → chunk-ZSF2T5D4.js} +1 -1
- package/dist/safe-bash/command-chunks/{command-engine-GHE6QUHU.js → command-engine-PFYHL7GS.js} +14 -4
- package/dist/safe-bash/command-chunks/{engine-RG6HQCCB-FXYZS264.js → engine-5AVSKFBI-D7Q5VPUN.js} +1 -1
- package/dist/safe-bash/command-chunks/model-store-IIWQHSEZ.js +54 -0
- package/dist/safe-bash/command-chunks/odf-SL5TG4B3-XI3FNOTN.js +3041 -0
- package/dist/safe-bash/command-chunks/{xlsx-RE54MFCS-IQ6OXXKK.js → xlsx-RE54MFCS-4UZ5W3U7.js} +1 -1
- package/dist/safe-bash-command-apply-patch/apply.js +1 -1
- package/dist/safe-bash-command-apply-patch/index.js +1 -1
- package/dist/safe-bash-command-awk/awk-inspection.js +2 -2
- package/dist/safe-bash-command-awk/awk.js +5 -5
- package/dist/safe-bash-command-awk/index.js +5 -5
- package/dist/safe-bash-command-cp/index.js +4 -4
- package/dist/safe-bash-command-csvkit/index.js +1 -1
- package/dist/safe-bash-command-diff/diff.js +2 -2
- package/dist/safe-bash-command-diff/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.js +2 -2
- package/dist/safe-bash-command-node/commands/node/browser.js +6 -6
- package/dist/safe-bash-command-node/commands/node/default-runtime.js +6 -6
- package/dist/safe-bash-command-node/commands/node/filesystem.js +2 -2
- package/dist/safe-bash-command-node/commands/node/safejs.js +6 -6
- package/dist/safe-bash-command-node/commands/node/timers.js +2 -2
- package/dist/safe-bash-command-patch/index.js +3 -3
- package/dist/safe-bash-command-patch/patch-formats.js +2 -2
- package/dist/safe-bash-command-patch/patch.js +3 -3
- package/dist/safe-bash-command-patch/unified.js +1 -1
- package/dist/safe-bash-command-pdftoppm/index.js +89 -124
- package/dist/safe-bash-command-pdftotext/index.d.ts +1 -1
- package/dist/safe-bash-command-pdftotext/index.js +538 -379
- package/dist/safe-bash-command-playwright-cli/index.js +19 -19
- package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +6 -6
- package/dist/safe-bash-command-playwright-cli/playwright/adapter.js +3 -3
- package/dist/safe-bash-command-playwright-cli/playwright/controller.js +13 -13
- package/dist/safe-bash-command-playwright-cli/playwright/index.js +19 -19
- package/dist/safe-bash-command-playwright-cli/playwright/native-storage-replacement.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/open-options.js +2 -2
- package/dist/safe-bash-command-playwright-cli/playwright/profile.js +5 -5
- package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +4 -4
- package/dist/safe-bash-command-playwright-cli/playwright/storage-capabilities.js +3 -3
- package/dist/safe-bash-command-pptx/engine.js +1 -1
- package/dist/safe-bash-command-python/executor.js +10 -10
- package/dist/safe-bash-command-python/index.js +10 -10
- package/dist/safe-bash-command-python/jspi.js +2 -2
- package/dist/safe-bash-command-safejs/index.js +2 -2
- package/dist/safe-bash-command-safejs/runtime.js +2 -2
- package/dist/safe-bash-command-ssconvert/index.js +16 -16
- package/dist/safe-bash-command-unzip/index.js +4 -4
- package/dist/safe-bash-docx-engine/ancillary-resources.js +10 -10
- package/dist/safe-bash-docx-engine/batch-operations.js +67 -67
- package/dist/safe-bash-docx-engine/batch-result-schema.js +79 -79
- package/dist/safe-bash-docx-engine/batch.js +78 -78
- package/dist/safe-bash-docx-engine/bookmarks.js +18 -18
- package/dist/safe-bash-docx-engine/charts.js +11 -11
- package/dist/safe-bash-docx-engine/command-option-rules.js +6 -6
- package/dist/safe-bash-docx-engine/command-properties.js +3 -3
- package/dist/safe-bash-docx-engine/comments.js +26 -26
- package/dist/safe-bash-docx-engine/control-bindings.js +21 -21
- package/dist/safe-bash-docx-engine/control-repeat.js +21 -21
- package/dist/safe-bash-docx-engine/controls.js +19 -19
- package/dist/safe-bash-docx-engine/create.js +11 -11
- package/dist/safe-bash-docx-engine/diagrams.js +11 -11
- package/dist/safe-bash-docx-engine/diff.js +13 -13
- package/dist/safe-bash-docx-engine/document-properties.js +16 -16
- package/dist/safe-bash-docx-engine/equations.js +17 -17
- package/dist/safe-bash-docx-engine/extract.js +14 -14
- package/dist/safe-bash-docx-engine/fields.js +23 -23
- package/dist/safe-bash-docx-engine/font-inventory.js +18 -18
- package/dist/safe-bash-docx-engine/font-resources.js +6 -6
- package/dist/safe-bash-docx-engine/image-batch-operations.js +14 -14
- package/dist/safe-bash-docx-engine/image-insertion.js +21 -21
- package/dist/safe-bash-docx-engine/image-layout.js +19 -19
- package/dist/safe-bash-docx-engine/image-replacement.js +22 -22
- package/dist/safe-bash-docx-engine/images.js +19 -19
- package/dist/safe-bash-docx-engine/index.js +111 -111
- package/dist/safe-bash-docx-engine/inspection.js +20 -20
- package/dist/safe-bash-docx-engine/invocation.js +9 -9
- package/dist/safe-bash-docx-engine/io.js +9 -9
- package/dist/safe-bash-docx-engine/links.js +21 -21
- package/dist/safe-bash-docx-engine/lists.js +20 -20
- package/dist/safe-bash-docx-engine/locations.js +15 -15
- package/dist/safe-bash-docx-engine/notes.js +22 -22
- package/dist/safe-bash-docx-engine/objects.js +19 -19
- package/dist/safe-bash-docx-engine/operation-json-schema.js +3 -3
- package/dist/safe-bash-docx-engine/operation-schema.js +2 -2
- package/dist/safe-bash-docx-engine/pack.js +14 -14
- package/dist/safe-bash-docx-engine/package-view-batch-operations.js +22 -22
- package/dist/safe-bash-docx-engine/pandoc-adapter.js +29 -29
- package/dist/safe-bash-docx-engine/paragraph-edit.js +25 -25
- package/dist/safe-bash-docx-engine/part-provider.js +3 -3
- package/dist/safe-bash-docx-engine/property-values.js +3 -3
- package/dist/safe-bash-docx-engine/publication.js +9 -9
- package/dist/safe-bash-docx-engine/removal.js +21 -21
- package/dist/safe-bash-docx-engine/revision-decisions.js +22 -22
- package/dist/safe-bash-docx-engine/revision-edit.js +20 -20
- package/dist/safe-bash-docx-engine/revisions.js +18 -18
- package/dist/safe-bash-docx-engine/run-format.js +20 -20
- package/dist/safe-bash-docx-engine/sanitize.js +34 -34
- package/dist/safe-bash-docx-engine/sections.js +19 -19
- package/dist/safe-bash-docx-engine/settings.js +11 -11
- package/dist/safe-bash-docx-engine/shape-edit.js +21 -21
- package/dist/safe-bash-docx-engine/signatures.js +15 -15
- package/dist/safe-bash-docx-engine/stories.js +22 -22
- package/dist/safe-bash-docx-engine/structure-model-batch-operations.js +38 -38
- package/dist/safe-bash-docx-engine/style-model-batch-operations.js +27 -27
- package/dist/safe-bash-docx-engine/style-model-result-schema.js +44 -44
- package/dist/safe-bash-docx-engine/styles.js +18 -18
- package/dist/safe-bash-docx-engine/table-edit.js +27 -27
- package/dist/safe-bash-docx-engine/table-read.js +16 -16
- package/dist/safe-bash-docx-engine/template.js +22 -22
- package/dist/safe-bash-docx-engine/text-replace.js +20 -20
- package/dist/safe-bash-docx-engine/text-resource-read.js +16 -16
- package/dist/safe-bash-docx-engine/text.js +16 -16
- package/dist/safe-bash-docx-engine/validation.js +7 -7
- package/dist/safe-bash-docx-engine/xml-parts.js +22 -22
- package/dist/safe-bash-network-engine/index.js +4 -4
- package/dist/safe-bash-network-engine/transfer.js +12 -12
- package/dist/safe-bash-presentation-engine/accessibility.js +15 -15
- package/dist/safe-bash-presentation-engine/animation-editing.js +5 -5
- package/dist/safe-bash-presentation-engine/animations.js +5 -5
- package/dist/safe-bash-presentation-engine/backgrounds.js +6 -6
- package/dist/safe-bash-presentation-engine/chart-editing.js +18 -18
- package/dist/safe-bash-presentation-engine/chart-object-operations.js +12 -12
- package/dist/safe-bash-presentation-engine/charts.js +15 -15
- package/dist/safe-bash-presentation-engine/command-placeholder.js +39 -38
- package/dist/safe-bash-presentation-engine/comments.js +6 -6
- package/dist/safe-bash-presentation-engine/connector-operations.js +16 -16
- package/dist/safe-bash-presentation-engine/connectors.js +13 -13
- package/dist/safe-bash-presentation-engine/diff.js +21 -20
- package/dist/safe-bash-presentation-engine/drawing-format.js +7 -7
- package/dist/safe-bash-presentation-engine/drawing-operations.js +15 -15
- package/dist/safe-bash-presentation-engine/drawing-schema.js +8 -8
- package/dist/safe-bash-presentation-engine/equations.js +6 -6
- package/dist/safe-bash-presentation-engine/fields.js +6 -6
- package/dist/safe-bash-presentation-engine/image-extraction.js +7 -7
- package/dist/safe-bash-presentation-engine/image-formatting.js +16 -16
- package/dist/safe-bash-presentation-engine/image-insertion.js +6 -6
- package/dist/safe-bash-presentation-engine/image-replacement.js +7 -7
- package/dist/safe-bash-presentation-engine/images.js +6 -6
- package/dist/safe-bash-presentation-engine/index.js +96 -95
- package/dist/safe-bash-presentation-engine/layouts.js +5 -5
- package/dist/safe-bash-presentation-engine/links.js +5 -5
- package/dist/safe-bash-presentation-engine/masters.js +4 -4
- package/dist/safe-bash-presentation-engine/media-editing.js +10 -10
- package/dist/safe-bash-presentation-engine/media-extraction.js +6 -6
- package/dist/safe-bash-presentation-engine/media.js +5 -5
- package/dist/safe-bash-presentation-engine/memberships.d.ts +1 -0
- package/dist/safe-bash-presentation-engine/memberships.js +12 -6
- package/dist/safe-bash-presentation-engine/notes.js +6 -6
- package/dist/safe-bash-presentation-engine/ole-insertion.js +6 -6
- package/dist/safe-bash-presentation-engine/opaque-objects.js +2 -2
- package/dist/safe-bash-presentation-engine/package-tools.js +6 -6
- package/dist/safe-bash-presentation-engine/presentation-model.js +38 -37
- package/dist/safe-bash-presentation-engine/presentation-settings.d.ts +1 -0
- package/dist/safe-bash-presentation-engine/presentation-settings.js +12 -5
- package/dist/safe-bash-presentation-engine/properties.js +7 -6
- package/dist/safe-bash-presentation-engine/retained-inspection.js +3 -3
- package/dist/safe-bash-presentation-engine/retained-memberships.d.ts +25 -0
- package/dist/safe-bash-presentation-engine/retained-presentation-settings.d.ts +25 -0
- package/dist/safe-bash-presentation-engine/retained-tags.d.ts +20 -0
- package/dist/safe-bash-presentation-engine/retained-text.d.ts +24 -4
- package/dist/safe-bash-presentation-engine/retained-text.js +17 -15
- package/dist/safe-bash-presentation-engine/sanitize.js +8 -7
- package/dist/safe-bash-presentation-engine/selectors.js +2 -2
- package/dist/safe-bash-presentation-engine/shape-groups.js +15 -15
- package/dist/safe-bash-presentation-engine/shape-operations.js +14 -14
- package/dist/safe-bash-presentation-engine/shape-path-operations.js +16 -16
- package/dist/safe-bash-presentation-engine/shape-paths.js +5 -5
- package/dist/safe-bash-presentation-engine/shape-selection.js +15 -15
- package/dist/safe-bash-presentation-engine/shape-transforms.js +5 -5
- package/dist/safe-bash-presentation-engine/shapes.js +11 -11
- package/dist/safe-bash-presentation-engine/slide-copy.js +7 -5
- package/dist/safe-bash-presentation-engine/slide-import.js +6 -6
- package/dist/safe-bash-presentation-engine/slide-merge-split.js +8 -8
- package/dist/safe-bash-presentation-engine/slide-model.js +24 -24
- package/dist/safe-bash-presentation-engine/slide-removal.js +7 -7
- package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +2 -2
- package/dist/safe-bash-presentation-engine/slides.js +5 -5
- package/dist/safe-bash-presentation-engine/table-operations.js +17 -17
- package/dist/safe-bash-presentation-engine/table-spans.js +16 -16
- package/dist/safe-bash-presentation-engine/tables.js +15 -15
- package/dist/safe-bash-presentation-engine/tags.d.ts +2 -0
- package/dist/safe-bash-presentation-engine/tags.js +15 -7
- package/dist/safe-bash-presentation-engine/template-bindings.js +16 -16
- package/dist/safe-bash-presentation-engine/template-repeat.js +24 -22
- package/dist/safe-bash-presentation-engine/text-fitting.js +11 -11
- package/dist/safe-bash-presentation-engine/text-frames.js +11 -11
- package/dist/safe-bash-presentation-engine/text-paragraphs.js +11 -11
- package/dist/safe-bash-presentation-engine/text-reading.js +3 -3
- package/dist/safe-bash-presentation-engine/text-replacement.js +6 -6
- package/dist/safe-bash-presentation-engine/text-runs.js +8 -8
- package/dist/safe-bash-presentation-engine/themes.js +5 -5
- package/dist/safe-bash-presentation-engine/transitions.js +5 -5
- package/dist/safe-bash-presentation-engine/validation.js +2 -2
- package/dist/safe-bash-presentation-engine/xml-parts.js +5 -5
- package/dist/safe-bash-xml-engine/document.js +2 -2
- package/dist/safe-bash-xml-engine/index.js +2 -2
- package/dist/safe-bash-xml-engine/recovery.d.ts +6 -2
- package/dist/safe-bash-xml-engine/stored-document.d.ts +3 -0
- package/dist/safe-bash-xml-engine/stored-document.js +1 -1
- package/dist/safe-bash-xml-engine/stored-evaluate.js +2 -2
- package/dist/safe-bash-xml-engine/stored-map.d.ts +21 -0
- package/dist/safe-bash-zip-engine/index.js +3 -3
- package/dist/safe-bash-zip-engine/zip/repair.js +3 -3
- package/dist/safe-bash-zip-engine/zip/safety.js +1 -1
- package/dist/safe-bash-zip-engine/zip/sfx.js +3 -3
- package/dist/safe-bash-zip-engine/zip/volumes.js +1 -1
- package/dist/safe-bash-zip-engine/zip-format.js +3 -3
- package/dist/spreadsheet-engine/formatting/cell-text.js +1 -1
- package/dist/spreadsheet-engine/{rendering/print → formatting}/general-number.js +3 -3
- package/dist/spreadsheet-engine/formulas/functions/python-printf.js +9 -7
- package/dist/spreadsheet-engine/solver/program.js +3 -2
- package/dist/spreadsheet-engine/solver/run.js +8 -2
- package/dist/spreadsheet-engine/solver/sensitivity.d.ts +4 -2
- package/dist/spreadsheet-engine/solver/sensitivity.js +80 -42
- package/dist/spreadsheet-format-xls/biff-properties-merge.d.ts +2 -1
- package/dist/spreadsheet-format-xls/biff-properties-merge.js +36 -30
- package/dist/spreadsheet-format-xls/biff-properties-write.js +16 -7
- package/dist/spreadsheet-format-xls/biff-properties.d.ts +4 -2
- package/dist/spreadsheet-format-xls/biff-properties.js +141 -122
- package/dist/spreadsheet-format-xls/biff-property-names.d.ts +27 -0
- package/dist/spreadsheet-format-xls/biff-property-names.js +210 -0
- package/dist/spreadsheet-format-xls/biff-property-observations.d.ts +33 -0
- package/dist/spreadsheet-format-xls/biff-property-observations.js +160 -0
- package/dist/xlsx-ast/comment-geometry.js +1 -1
- package/package.json +7 -4
- package/third-party/pdf-ast/THIRD_PARTY_NOTICES.md +15 -0
- package/third-party/pdf-ast/licenses/PYTHON-PSF.txt +254 -0
- package/third-party/pdf-ast/licenses/V8-BSD.txt +61 -0
- package/dist/safe-bash/command-chunks/biff-UBP2BZLK-JPODPKS3.js +0 -5448
- package/dist/safe-bash/command-chunks/chunk-6EZWG56T.js +0 -455
- package/dist/safe-bash/command-chunks/chunk-O2HNOQQG.js +0 -161
- package/dist/safe-bash/command-chunks/chunk-ZUP5TBRG.js +0 -99
- package/dist/safe-bash/command-chunks/model-store-I7YAWL5V.js +0 -54
- package/dist/safe-bash/command-chunks/odf-3EA3EVSD-7B5GVNTC.js +0 -3097
- package/dist/safe-bash/command-chunks/{chunk-SRXARACJ.js → chunk-3TP4SSPS.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-NCNHJRIY.js → chunk-3W3HLPCX.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-P4OWVKMD.js → chunk-BQXKO3X7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OCOJMKDP.js → chunk-CVMHDJ7J.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-AV6N7DDA.js → chunk-DDYPQAXN.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-FEKECRJP.js → chunk-EBTKM7KX.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WVD5WZXD.js → chunk-FPNUGKCX.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-6W4RMBFH.js → chunk-N6VNHC3B.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-M3OXQXCU.js → chunk-NBRXQUK7.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-LECGQSQW.js → chunk-SF56V6QK.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-2ANW3FXH.js → chunk-U33GIOUY.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-5QXRIZSS.js → chunk-V3NKL42J.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-OEKLEUUW.js → chunk-YZE7BKHC.js} +3 -3
- package/dist/safe-bash/command-chunks/{chunk-WXW665TV.js → chunk-ZSHXZ3XG.js} +6 -6
- package/dist/safe-bash/command-chunks/{dif-BXKPQOCO-4KB3RC6G.js → dif-BXKPQOCO-FVJYYGYB.js} +4 -4
- package/dist/safe-bash/command-chunks/{pln-DFS7VLVS-OVOBS4QX.js → pln-DFS7VLVS-JATX6FS7.js} +3 -3
- package/dist/safe-bash/command-chunks/{psion-YBI6JEQI-GY4S6ZLC.js → psion-YBI6JEQI-6OMC2PGC.js} +3 -3
- package/dist/safe-bash/command-chunks/{sylk-25D7TL2Y-RU6ANKGT.js → sylk-25D7TL2Y-NJKBZZTF.js} +4 -4
- /package/dist/spreadsheet-engine/{rendering/print → formatting}/general-number.d.ts +0 -0
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import {
|
|
2
|
+
openRetainedPresentationIndex,
|
|
3
|
+
stageRetainedOutput,
|
|
4
|
+
streamJson
|
|
5
|
+
} from "./chunk-3ZGO24WG.js";
|
|
6
|
+
import {
|
|
7
|
+
attr,
|
|
8
|
+
child,
|
|
9
|
+
escape,
|
|
10
|
+
invalid,
|
|
11
|
+
loadShared,
|
|
12
|
+
nextRel,
|
|
13
|
+
relPart
|
|
14
|
+
} from "./chunk-A32PUWYE.js";
|
|
15
|
+
import {
|
|
16
|
+
SelectionError,
|
|
17
|
+
decodeSelectionToken
|
|
18
|
+
} from "./chunk-3W3HLPCX.js";
|
|
19
|
+
import {
|
|
20
|
+
openRetainedPresentationValidation
|
|
21
|
+
} from "./chunk-N6VNHC3B.js";
|
|
22
|
+
import {
|
|
23
|
+
dialects
|
|
24
|
+
} from "./chunk-6KJDTKE4.js";
|
|
25
|
+
import {
|
|
26
|
+
parseXmlPart
|
|
27
|
+
} from "./chunk-7PYDVQPB.js";
|
|
28
|
+
import {
|
|
29
|
+
relativePartReference
|
|
30
|
+
} from "./chunk-MOUCMZZP.js";
|
|
31
|
+
import {
|
|
32
|
+
OfficeError,
|
|
33
|
+
RetainedValues,
|
|
34
|
+
equal,
|
|
35
|
+
folded,
|
|
36
|
+
literal,
|
|
37
|
+
openRetainedXmlDocument,
|
|
38
|
+
resolveOfficeResources
|
|
39
|
+
} from "./chunk-KM2SMMXZ.js";
|
|
40
|
+
|
|
41
|
+
// packages/safe-bash-presentation-engine/src/retained-tags.ts
|
|
42
|
+
import { PagedStorage } from "@poe-platform/safe-fs/storage";
|
|
43
|
+
async function openRetainedTags(archive, fingerprint, options, settings) {
|
|
44
|
+
validateTagOptions(options);
|
|
45
|
+
const query = { ...options, ...options.selection ? { selection: { ...options.selection, ...options.selection.position ? { position: { ...options.selection.position } } : {} } } : {} };
|
|
46
|
+
const context = resolveOfficeResources(settings), working = { ...settings.workingStorage }, signal = context.signal ?? new AbortController().signal;
|
|
47
|
+
const index = await openRetainedPresentationIndex(archive, fingerprint, { ...context, workingStorage: working });
|
|
48
|
+
const pages = new PagedStorage({ fs: working.fs, cwd: working.directory, env: {}, signal }, (working.cacheBytes ?? 1024 * 1024) / 16384);
|
|
49
|
+
let closed = false, closing, head = 0, tail = 0;
|
|
50
|
+
const check = () => {
|
|
51
|
+
if (closed) throw new OfficeError("invalid-handle", "Tags are closed.", "index");
|
|
52
|
+
if (signal.aborted) throw new OfficeError("cancelled", "Operation cancelled.", "index");
|
|
53
|
+
};
|
|
54
|
+
const close = () => {
|
|
55
|
+
closed = true;
|
|
56
|
+
return closing ??= (async () => {
|
|
57
|
+
const outcomes = await Promise.allSettled([index.close(), pages.close()]);
|
|
58
|
+
for (const outcome of outcomes) if (outcome.status === "rejected") throw outcome.reason;
|
|
59
|
+
})();
|
|
60
|
+
};
|
|
61
|
+
const values = new RetainedValues(pages, check, signal);
|
|
62
|
+
const range = (row2, offset) => ({ start: row2[offset], length: row2[offset + 1] });
|
|
63
|
+
async function row(pointer) {
|
|
64
|
+
check();
|
|
65
|
+
const bytes = await pages.read(pointer, 7 /* Count */ * 8), view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
66
|
+
return Array.from({ length: 7 /* Count */ }, (_, n) => view.getFloat64(n * 8, true));
|
|
67
|
+
}
|
|
68
|
+
async function write(pointer, numbers) {
|
|
69
|
+
check();
|
|
70
|
+
const bytes = new Uint8Array(numbers.length * 8), view = new DataView(bytes.buffer);
|
|
71
|
+
numbers.forEach((number, n) => view.setFloat64(n * 8, number, true));
|
|
72
|
+
await pages.write(pointer, bytes);
|
|
73
|
+
}
|
|
74
|
+
async function bounded(value) {
|
|
75
|
+
const decoder = new TextDecoder();
|
|
76
|
+
let result = "";
|
|
77
|
+
for await (const bytes of values.read(value)) result += decoder.decode(bytes, { stream: true });
|
|
78
|
+
return result + decoder.decode();
|
|
79
|
+
}
|
|
80
|
+
const invalid2 = (message) => {
|
|
81
|
+
throw new OfficeError("invalid-value", message, "usage");
|
|
82
|
+
};
|
|
83
|
+
async function is(document, node, local, namespace) {
|
|
84
|
+
return await equal(document.raw(node.localName), literal(local)) && await equal(document.namespace(node), namespace);
|
|
85
|
+
}
|
|
86
|
+
async function child2(document, parent, local) {
|
|
87
|
+
let found;
|
|
88
|
+
for await (const node of document.children(parent)) if (node.kind === "element" && await is(document, node, local, document.namespace(parent))) {
|
|
89
|
+
if (found) invalid2("Ambiguous shared structure.");
|
|
90
|
+
found = node;
|
|
91
|
+
}
|
|
92
|
+
return found;
|
|
93
|
+
}
|
|
94
|
+
async function attribute(document, node, local, namespace = "") {
|
|
95
|
+
for await (const attr2 of document.attributes(node)) if (await is(document, attr2, local, literal(namespace))) return attr2;
|
|
96
|
+
return void 0;
|
|
97
|
+
}
|
|
98
|
+
try {
|
|
99
|
+
const validation = await openRetainedPresentationValidation(archive, { ...context, workingStorage: working }, { ...context.xmlLimits, ...context.relationshipLimits, maxBytes: Math.min(context.xmlLimits.maxBytes, context.relationshipLimits.maxBytes), maxEntries: context.archiveLimits.maxMembers });
|
|
100
|
+
const valid = validation.valid;
|
|
101
|
+
try {
|
|
102
|
+
await validation.close();
|
|
103
|
+
} catch (error) {
|
|
104
|
+
if (valid) await Promise.reject(error);
|
|
105
|
+
}
|
|
106
|
+
if (!valid) throw new OfficeError("invalid-opc", "Invalid presentation graph.", "validate-intent");
|
|
107
|
+
for await (const part of archive.parts()) {
|
|
108
|
+
const key = await values.store(folded(literal(part))), value = await values.store(literal(part));
|
|
109
|
+
await values.insert("parts", key, value);
|
|
110
|
+
}
|
|
111
|
+
const main = await openRetainedXmlDocument(archive.read(index.records.main), { ...context, workingStorage: working });
|
|
112
|
+
let dialect = dialects[0], failed = false;
|
|
113
|
+
try {
|
|
114
|
+
for (const candidate of dialects) if (await equal(main.namespace(main.root), literal(candidate.p))) dialect = candidate;
|
|
115
|
+
} catch (error) {
|
|
116
|
+
failed = true;
|
|
117
|
+
throw error;
|
|
118
|
+
} finally {
|
|
119
|
+
try {
|
|
120
|
+
await main.close();
|
|
121
|
+
} catch (error) {
|
|
122
|
+
if (!failed) await Promise.reject(error);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
let token;
|
|
126
|
+
if (query.selection?.token) {
|
|
127
|
+
if (Object.keys(query.selection).some((key) => key !== "token")) throw new SelectionError("invalid-selection");
|
|
128
|
+
token = decodeSelectionToken(query.selection.token);
|
|
129
|
+
if (token.fingerprint !== fingerprint) throw new SelectionError("stale-selection");
|
|
130
|
+
if (token.scope !== "slides" && token.scope !== "presentation" || query.scope !== void 0 && query.scope !== token.scope) throw new SelectionError("invalid-selection");
|
|
131
|
+
}
|
|
132
|
+
async function* owners2() {
|
|
133
|
+
if ((token?.scope ?? query.scope) === "presentation") {
|
|
134
|
+
yield { part: index.records.main, slide: null };
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const selected = token ? void 0 : query.selection;
|
|
138
|
+
for await (const record of selected ? index.records.select({ kind: "slide", ...selected }) : index.records.records("slide")) {
|
|
139
|
+
if (record.kind !== "slide") throw new SelectionError("invalid-selection");
|
|
140
|
+
yield { part: record.part, slide: record.position };
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
for await (const ignoredOwner of owners2()) check();
|
|
144
|
+
for await (const owner of owners2()) {
|
|
145
|
+
const document = await openRetainedXmlDocument(archive.read(owner.part), { ...context, workingStorage: working });
|
|
146
|
+
let failed2 = false, reference;
|
|
147
|
+
try {
|
|
148
|
+
const base = owner.part === index.records.main ? document.root : await child2(document, document.root, "cSld");
|
|
149
|
+
if (!base) invalid2("Tag owner lacks common slide data.");
|
|
150
|
+
const list = await child2(document, base, "custDataLst"), tags2 = list ? await child2(document, list, "tags") : void 0;
|
|
151
|
+
if (tags2) {
|
|
152
|
+
const id = await attribute(document, tags2, "id", dialect.r);
|
|
153
|
+
let count = 0;
|
|
154
|
+
if (id) {
|
|
155
|
+
for await (const edge of index.graph.outgoing(owner.part)) if (edge.owner === owner.part && !edge.external && await equal(edge.type(), literal(`${dialect.r}/tags`)) && await equal(edge.id(), document.text(id))) {
|
|
156
|
+
count++;
|
|
157
|
+
if (edge.targetPart) reference = await values.store(edge.targetPart());
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (count !== 1 || !reference) invalid2("Invalid tag association.");
|
|
161
|
+
}
|
|
162
|
+
} catch (error) {
|
|
163
|
+
failed2 = true;
|
|
164
|
+
throw error;
|
|
165
|
+
} finally {
|
|
166
|
+
try {
|
|
167
|
+
await document.close();
|
|
168
|
+
} catch (error) {
|
|
169
|
+
if (!failed2) await Promise.reject(error);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (!reference) continue;
|
|
173
|
+
const original = await values.find("parts", () => folded(values.read(reference)));
|
|
174
|
+
if (!original) throw new OfficeError("missing-binding", "Package member is absent.", "index");
|
|
175
|
+
const part = await bounded(reference), tags = await openRetainedXmlDocument(archive.read(await bounded(original)), { ...context, workingStorage: working });
|
|
176
|
+
let failedTags = false;
|
|
177
|
+
try {
|
|
178
|
+
if (!await is(tags, tags.root, "tagLst", literal(dialect.p))) invalid2("Invalid tag list.");
|
|
179
|
+
let childIndex = 0;
|
|
180
|
+
for await (const node of tags.children(tags.root)) {
|
|
181
|
+
if (node.kind !== "element") continue;
|
|
182
|
+
const position = childIndex++;
|
|
183
|
+
if (!await is(tags, node, "tag", literal(dialect.p))) continue;
|
|
184
|
+
const name = await attribute(tags, node, "name"), value = await attribute(tags, node, "val");
|
|
185
|
+
if (!name || !value) invalid2("Tag requires name and value attributes.");
|
|
186
|
+
const location = { fingerprint, scope: owner.slide === null ? "presentation" : "slides", owner: owner.part, objectId: `tag:${part}:${position}`, coordinateSystem: "identity" };
|
|
187
|
+
const metadata = await values.store(literal(JSON.stringify({ part, owner: owner.part, slide: owner.slide, selector: JSON.stringify(location), location })));
|
|
188
|
+
const key = await values.store(tags.text(name)), text = await values.store(tags.text(value));
|
|
189
|
+
const pointer = pages.allocate(7 /* Count */ * 8);
|
|
190
|
+
await write(pointer, [0, metadata.start, metadata.length, key.start, key.length, text.start, text.length]);
|
|
191
|
+
if (tail) await write(tail, [pointer]);
|
|
192
|
+
else head = pointer;
|
|
193
|
+
tail = pointer;
|
|
194
|
+
}
|
|
195
|
+
} catch (error) {
|
|
196
|
+
failedTags = true;
|
|
197
|
+
throw error;
|
|
198
|
+
} finally {
|
|
199
|
+
try {
|
|
200
|
+
await tags.close();
|
|
201
|
+
} catch (error) {
|
|
202
|
+
if (!failedTags) await Promise.reject(error);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
await index.close();
|
|
207
|
+
return Object.freeze({ close, async *records() {
|
|
208
|
+
check();
|
|
209
|
+
for (let pointer = head; pointer; ) {
|
|
210
|
+
const data = await row(pointer);
|
|
211
|
+
pointer = data[0 /* Next */];
|
|
212
|
+
const metadata = JSON.parse(await bounded(range(data, 1 /* Metadata */)));
|
|
213
|
+
if (token && metadata.selector !== query.selection.token) continue;
|
|
214
|
+
yield { name: () => values.read(range(data, 3 /* Name */)), value: () => values.read(range(data, 5 /* Value */)), ...metadata };
|
|
215
|
+
}
|
|
216
|
+
check();
|
|
217
|
+
} });
|
|
218
|
+
} catch (error) {
|
|
219
|
+
await close().catch(() => {
|
|
220
|
+
});
|
|
221
|
+
throw error instanceof OfficeError ? error : new OfficeError(signal.aborted ? "cancelled" : "io-failure", "Tag storage operation failed.", "index");
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
async function stageRetainedTags(archive, fingerprint, query, settings, output) {
|
|
225
|
+
const format = { ...output };
|
|
226
|
+
if (!["tags.list", "tags.get"].includes(format.operation)) throw new OfficeError("invalid-value", "Invalid tag read operation.", "usage");
|
|
227
|
+
const tags = await openRetainedTags(archive, fingerprint, query, settings);
|
|
228
|
+
let staged;
|
|
229
|
+
try {
|
|
230
|
+
if (format.operation === "tags.get") {
|
|
231
|
+
let count = 0;
|
|
232
|
+
for await (const ignoredRecord of tags.records()) count++;
|
|
233
|
+
if (count !== 1) throw new SelectionError(count ? "ambiguous-selection" : "missing-selection");
|
|
234
|
+
}
|
|
235
|
+
async function* locations() {
|
|
236
|
+
for await (const tag of tags.records()) yield tag.location;
|
|
237
|
+
}
|
|
238
|
+
async function* render() {
|
|
239
|
+
if (format.json) {
|
|
240
|
+
yield* streamJson({ version: 1, operation: format.operation, ok: true, data: { tags: tags.records() }, affected: 0, warnings: [], errors: [], locations: locations() });
|
|
241
|
+
yield* literal("\n");
|
|
242
|
+
} else for await (const tag of tags.records()) {
|
|
243
|
+
yield* streamJson(tag.name);
|
|
244
|
+
yield* literal(": ");
|
|
245
|
+
yield* streamJson(tag.value);
|
|
246
|
+
yield* literal("\n");
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
staged = await stageRetainedOutput(render(), settings, format.maxOutputBytes);
|
|
250
|
+
await tags.close();
|
|
251
|
+
return staged;
|
|
252
|
+
} catch (error) {
|
|
253
|
+
await Promise.allSettled([tags.close(), staged?.close()]);
|
|
254
|
+
throw error;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// packages/safe-bash-presentation-engine/src/tags.ts
|
|
259
|
+
var relns = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
260
|
+
function validateTagOptions(options, action) {
|
|
261
|
+
if (!options || ![Object.prototype, null].includes(Object.getPrototypeOf(options)) || Object.keys(options).some((key) => !["scope", "selection", "name", "value", "allowEmpty"].includes(key)) || options.scope !== void 0 && !["presentation", "slides"].includes(options.scope) || options.allowEmpty !== void 0 && typeof options.allowEmpty !== "boolean") invalid("Invalid tag options.");
|
|
262
|
+
if (options.scope === "presentation" && options.selection && Object.keys(options.selection).some((key) => key !== "all" && key !== "token")) invalid("Presentation tags do not accept slide selectors.");
|
|
263
|
+
if (action === "add" && (options.name === void 0 || options.value === void 0)) invalid("New tags require name and value.");
|
|
264
|
+
if (action === "set" && options.name === void 0 && options.value === void 0) invalid("A tag edit requires name or value.");
|
|
265
|
+
for (const value of [options.name, options.value]) {
|
|
266
|
+
if (value === void 0) continue;
|
|
267
|
+
if (typeof value !== "string") invalid("Tag fields require strings.");
|
|
268
|
+
for (const c of value) {
|
|
269
|
+
const n = c.codePointAt(0);
|
|
270
|
+
if (n < 32 && ![9, 10, 13].includes(n) || n >= 55296 && n <= 57343 || n === 65534 || n === 65535) invalid("Tag fields require XML characters.");
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
if (options.name === "") invalid("Tag names cannot be empty.");
|
|
274
|
+
if (!action && (options.name !== void 0 || options.value !== void 0 || options.allowEmpty !== void 0)) invalid("Tag reads accept selection and scope only.");
|
|
275
|
+
if (action === "remove" && (options.name !== void 0 || options.value !== void 0)) invalid("Tag removal does not accept edit fields.");
|
|
276
|
+
}
|
|
277
|
+
function owners(s, options) {
|
|
278
|
+
if (options.scope === "presentation") return [{ part: s.main, slide: null }];
|
|
279
|
+
const selection = options.selection;
|
|
280
|
+
return (selection ? s.index.select({ kind: "slide", ...selection }) : s.index.slides).map((record) => {
|
|
281
|
+
if (record.kind !== "slide") throw new SelectionError("invalid-selection");
|
|
282
|
+
return { part: record.part, slide: record.position };
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
function association(s, owner) {
|
|
286
|
+
const doc = s.doc(owner);
|
|
287
|
+
const base = owner === s.main ? doc.root : child(doc.root, "cSld");
|
|
288
|
+
if (!base) invalid("Tag owner lacks common slide data.");
|
|
289
|
+
const list = child(base, "custDataLst");
|
|
290
|
+
const tags = list ? child(list, "tags") : void 0;
|
|
291
|
+
if (!tags) return void 0;
|
|
292
|
+
const id = tags.attributes.find((a) => a.name.namespace === s.r && a.name.localName === "id")?.value;
|
|
293
|
+
const edges = s.index.inventory.relationships.filter((e) => e.owner === owner && e.id === id && e.type === `${s.r}/tags` && !e.external);
|
|
294
|
+
if (edges.length !== 1 || !edges[0].targetPart) invalid("Invalid tag association.");
|
|
295
|
+
return edges[0].targetPart;
|
|
296
|
+
}
|
|
297
|
+
function records(s, options) {
|
|
298
|
+
let token;
|
|
299
|
+
if (options.selection?.token) {
|
|
300
|
+
if (Object.keys(options.selection).some((key) => key !== "token")) throw new SelectionError("invalid-selection");
|
|
301
|
+
token = decodeSelectionToken(options.selection.token);
|
|
302
|
+
if (token.fingerprint !== s.index.fingerprint) throw new SelectionError("stale-selection");
|
|
303
|
+
if (token.scope !== "slides" && token.scope !== "presentation") throw new SelectionError("invalid-selection");
|
|
304
|
+
if (options.scope !== void 0 && options.scope !== token.scope) throw new SelectionError("invalid-selection");
|
|
305
|
+
}
|
|
306
|
+
const selected = owners(s, token ? { scope: token.scope } : options);
|
|
307
|
+
const result = selected.flatMap((owner) => {
|
|
308
|
+
const part = association(s, owner.part);
|
|
309
|
+
if (!part) return [];
|
|
310
|
+
const doc = s.doc(part);
|
|
311
|
+
if (doc.root.name.namespace !== s.p || doc.root.name.localName !== "tagLst") invalid("Invalid tag list.");
|
|
312
|
+
return doc.root.children.flatMap((node, index) => {
|
|
313
|
+
if (node.name.namespace !== s.p || node.name.localName !== "tag") return [];
|
|
314
|
+
const name = attr(node, "name"), value = attr(node, "val");
|
|
315
|
+
if (name === void 0 || value === void 0) invalid("Tag requires name and value attributes.");
|
|
316
|
+
const location = { fingerprint: s.index.fingerprint, scope: owner.slide === null ? "presentation" : "slides", owner: owner.part, objectId: `tag:${part}:${index}`, coordinateSystem: "identity" };
|
|
317
|
+
return [{ name, value, part, owner: owner.part, slide: owner.slide, selector: JSON.stringify(location), location }];
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
return token ? result.filter((r) => r.selector === options.selection.token) : result;
|
|
321
|
+
}
|
|
322
|
+
async function readTags(input, options, context) {
|
|
323
|
+
validateTagOptions(options);
|
|
324
|
+
return records(await loadShared(input, context, false), options);
|
|
325
|
+
}
|
|
326
|
+
function createAssociation(s, owner, context) {
|
|
327
|
+
let n = 1;
|
|
328
|
+
while (s.reader.has(`/ppt/tags/tag${n}.xml`) || s.changes.has(`/ppt/tags/tag${n}.xml`)) n++;
|
|
329
|
+
const part = `/ppt/tags/tag${n}.xml`;
|
|
330
|
+
s.save(part, parseXmlPart(new TextEncoder().encode(`<p:tagLst xmlns:p="${s.p}"/>`), context.xmlLimits));
|
|
331
|
+
const types = s.doc("/[Content_Types].xml");
|
|
332
|
+
s.save("/[Content_Types].xml", types.spliceChildren(types.root, types.root.children.length, 0, [`<Override xmlns="${types.root.name.namespace}" PartName="${part}" ContentType="application/vnd.openxmlformats-officedocument.presentationml.tags+xml"/>`]));
|
|
333
|
+
const relName = relPart(owner);
|
|
334
|
+
const rels = s.reader.has(relName) ? s.doc(relName) : parseXmlPart(new TextEncoder().encode(`<Relationships xmlns="${relns}"/>`), context.xmlLimits);
|
|
335
|
+
const id = nextRel(rels);
|
|
336
|
+
s.save(relName, rels.spliceChildren(rels.root, rels.root.children.length, 0, [`<Relationship xmlns="${relns}" Id="${id}" Type="${s.r}/tags" Target="${escape(relativePartReference(part, owner.slice(0, owner.lastIndexOf("/"))))}"/>`]));
|
|
337
|
+
let doc = s.doc(owner);
|
|
338
|
+
let base = owner === s.main ? doc.root : child(doc.root, "cSld");
|
|
339
|
+
let list = child(base, "custDataLst");
|
|
340
|
+
if (!list) {
|
|
341
|
+
const order = owner === s.main ? ["sldMasterIdLst", "notesMasterIdLst", "handoutMasterIdLst", "sldIdLst", "sldSz", "notesSz", "smartTags", "embeddedFontLst", "custShowLst", "photoAlbum", "custDataLst", "kinsoku", "defaultTextStyle", "modifyVerifier", "extLst"] : ["bg", "spTree", "custDataLst", "controls", "extLst"];
|
|
342
|
+
doc = doc.merge(base, { children: { sequence: order.map((localName) => ({ namespace: s.p, localName })), upsert: [{ name: { namespace: s.p, localName: "custDataLst" }, merge: {} }] } });
|
|
343
|
+
base = owner === s.main ? doc.root : child(doc.root, "cSld");
|
|
344
|
+
list = child(base, "custDataLst");
|
|
345
|
+
}
|
|
346
|
+
s.save(owner, doc.spliceChildren(list, list.children.length, 0, [`<p:tags xmlns:p="${s.p}" xmlns:r="${s.r}" r:id="${id}"/>`]));
|
|
347
|
+
return part;
|
|
348
|
+
}
|
|
349
|
+
async function mutateTags(input, action, options, context) {
|
|
350
|
+
if (!["add", "set", "remove"].includes(action)) invalid("Invalid tag action.");
|
|
351
|
+
validateTagOptions(options, action);
|
|
352
|
+
if ((options.name?.length ?? 0) + (options.value?.length ?? 0) > context.xmlLimits.maxBytes) throw new OfficeError("resource-limit", "Tag exceeds XML limits.", "usage");
|
|
353
|
+
if (!options.selection && options.scope !== "presentation") throw new SelectionError("missing-selection");
|
|
354
|
+
const s = await loadShared(input, context);
|
|
355
|
+
const existing = records(s, options);
|
|
356
|
+
const locations = [];
|
|
357
|
+
if (action === "add") {
|
|
358
|
+
if (options.selection?.token) throw new SelectionError("invalid-selection");
|
|
359
|
+
const selected = owners(s, options);
|
|
360
|
+
if (!selected.length && !options.allowEmpty) throw new SelectionError("missing-selection");
|
|
361
|
+
for (const owner of selected) {
|
|
362
|
+
if (existing.some((r) => r.owner === owner.part && r.name === options.name)) invalid("Duplicate tag name.");
|
|
363
|
+
const part = association(s, owner.part) ?? createAssociation(s, owner.part, context);
|
|
364
|
+
if (s.index.inventory.relationships.filter((e) => e.targetPart === part).length > 1) throw new OfficeError("unsupported-edit", "Shared tag lists cannot be edited.", "validate-intent");
|
|
365
|
+
const doc = s.doc(part);
|
|
366
|
+
const location = { fingerprint: s.index.fingerprint, scope: owner.slide === null ? "presentation" : "slides", owner: owner.part, objectId: `tag:${part}:${doc.root.children.length}`, coordinateSystem: "identity" };
|
|
367
|
+
s.save(part, doc.spliceChildren(doc.root, doc.root.children.length, 0, [`<p:tag xmlns:p="${s.p}" name="${escape(options.name)}" val="${escape(options.value)}"/>`]));
|
|
368
|
+
locations.push(location);
|
|
369
|
+
}
|
|
370
|
+
} else {
|
|
371
|
+
if (!existing.length && !options.allowEmpty) throw new SelectionError("missing-selection");
|
|
372
|
+
if (existing.length > 1 && !options.selection?.all) throw new SelectionError("ambiguous-selection");
|
|
373
|
+
if (options.name !== void 0) {
|
|
374
|
+
const all = records(s, { scope: existing[0]?.location.scope });
|
|
375
|
+
for (const record of existing) if (all.some((r) => r.owner === record.owner && r.name === options.name && r.selector !== record.selector)) invalid("Duplicate tag name.");
|
|
376
|
+
if (existing.some((r, i) => existing.slice(0, i).some((v) => v.owner === r.owner))) invalid("Duplicate tag name.");
|
|
377
|
+
}
|
|
378
|
+
for (const record of [...existing].reverse()) {
|
|
379
|
+
if (s.index.inventory.relationships.filter((e) => e.targetPart === record.part).length > 1) throw new OfficeError("unsupported-edit", "Shared tag lists cannot be edited.", "validate-intent");
|
|
380
|
+
const doc = s.doc(record.part);
|
|
381
|
+
const index = Number(record.location.objectId.slice(record.location.objectId.lastIndexOf(":") + 1));
|
|
382
|
+
const node = doc.root.children[index];
|
|
383
|
+
if (action === "remove" && (node.children.length || node.attributes.some((a) => a.name.namespace !== "" || !["name", "val"].includes(a.name.localName)))) throw new OfficeError("unsupported-edit", "Decorated tags are preserved on removal.", "validate-intent");
|
|
384
|
+
s.save(record.part, action === "remove" ? doc.spliceChildren(doc.root, index, 1, []) : doc.merge(doc.root.children[index], { attributes: [...options.name === void 0 ? [] : [{ namespace: "", localName: "name", value: options.name }], ...options.value === void 0 ? [] : [{ namespace: "", localName: "val", value: options.value }]] }));
|
|
385
|
+
locations.push(record.location);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
const result = await s.finish(s.main, []);
|
|
389
|
+
return { bytes: result.bytes, affected: locations.length, locations };
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export {
|
|
393
|
+
openRetainedTags,
|
|
394
|
+
stageRetainedTags,
|
|
395
|
+
validateTagOptions,
|
|
396
|
+
readTags,
|
|
397
|
+
mutateTags
|
|
398
|
+
};
|
|
@@ -3503,7 +3503,7 @@ function readCommentGeometry(roots, charge) {
|
|
|
3503
3503
|
else if (name === "z-index" && value && Number.isSafeInteger(Number(value))) style[name] = value;
|
|
3504
3504
|
}
|
|
3505
3505
|
const flags = [];
|
|
3506
|
-
for (const name of ["MoveWithCells", "SizeWithCells", "Visible", "AutoFill"]) {
|
|
3506
|
+
for (const name of ["MoveWithCells", "SizeWithCells", "Visible", "AutoFill", "Locked", "LockText"]) {
|
|
3507
3507
|
const field = fields3.get(name);
|
|
3508
3508
|
if (!field) continue;
|
|
3509
3509
|
const text = field.text.trim();
|
|
@@ -202,6 +202,7 @@ async function stageZip(scope, prepared, consume) {
|
|
|
202
202
|
const capabilities = await scope.operation(() => fs.capabilitiesFor?.(prepared.parent, { signal }) ?? fs.capabilities);
|
|
203
203
|
if (capabilities.atomicFileStaging !== true && capabilities.trustedOwnedStaging !== true || !fs.createStagedFile || !fs.removeStagedFile) fail("ZIP temporary path requires atomic owned file staging");
|
|
204
204
|
if (prepared.source && (capabilities.atomicFileMutation !== true && capabilities.trustedOwnedStaging !== true || !fs.writeFileConditional)) fail("ZIP temporary path requires atomic conditional writes");
|
|
205
|
+
const buffered = prepared.source && capabilities.retainedStagingWrite !== true ? await collectBytes(prepared.source, { signal, maxBytes: scope.limits.maxArchiveBytes }) : void 0;
|
|
205
206
|
let staging;
|
|
206
207
|
let failure;
|
|
207
208
|
const close = retainFileSystemCleanup(fs, async (cleanup) => {
|
|
@@ -219,7 +220,7 @@ async function stageZip(scope, prepared, consume) {
|
|
|
219
220
|
if (path === prepared.reservedPath) continue;
|
|
220
221
|
try {
|
|
221
222
|
await scope.operation(async () => {
|
|
222
|
-
staging = await fs.createStagedFile(path, "archive.zip", { type: "file", data: prepared.bytes ?? new Uint8Array() }, {
|
|
223
|
+
staging = await fs.createStagedFile(path, "archive.zip", { type: "file", data: buffered ?? prepared.bytes ?? new Uint8Array() }, {
|
|
223
224
|
signal,
|
|
224
225
|
parent: prepared.parentStat,
|
|
225
226
|
...capabilities.retainedStagingCleanup ? { retainCleanup: true } : {},
|
|
@@ -234,7 +235,7 @@ async function stageZip(scope, prepared, consume) {
|
|
|
234
235
|
}
|
|
235
236
|
}
|
|
236
237
|
if (!staging) fail("ZIP temporary directory attempt limit exceeded");
|
|
237
|
-
if (prepared.source) {
|
|
238
|
+
if (prepared.source && buffered === void 0) {
|
|
238
239
|
for await (const chunk of readBytes(prepared.source, signal)) {
|
|
239
240
|
try {
|
|
240
241
|
await writeFileOutput(scope.context, chunk, (bytes) => scope.operation(async () => {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
drawingColorSchema,
|
|
3
3
|
drawingUpdateSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZBXUAM34.js";
|
|
5
5
|
import {
|
|
6
6
|
MSO_LANGUAGE_ID
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5VY5O37W.js";
|
|
8
8
|
import {
|
|
9
9
|
MSO_TEXT_UNDERLINE_TYPE,
|
|
10
10
|
validateTextRunOptions
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-424NYO35.js";
|
|
12
12
|
import {
|
|
13
13
|
validateDrawingUpdate
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BB7HBO56.js";
|
|
15
15
|
import {
|
|
16
16
|
defineEnum,
|
|
17
17
|
defineXmlEnum
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VUJCVXD4.js";
|
|
19
19
|
import {
|
|
20
20
|
Length
|
|
21
21
|
} from "./chunk-B6XTAKKQ.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openDocumentLocations,
|
|
3
3
|
resolveDocxSelection
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MWVELMXZ.js";
|
|
5
5
|
import {
|
|
6
6
|
measurePackageResourceSerialization
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ETN25WCR.js";
|
|
8
8
|
import {
|
|
9
9
|
validateDocxInvocation
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BDGNKRY4.js";
|
|
11
11
|
import {
|
|
12
12
|
publishDocumentFiles
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-LTWX23FS.js";
|
|
14
14
|
import {
|
|
15
15
|
PublicationError
|
|
16
16
|
} from "./chunk-JGGRMERW.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-WLANDWNW.js";
|
|
23
23
|
import {
|
|
24
24
|
docxOperationSchemas
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-EBTKM7KX.js";
|
|
26
26
|
import {
|
|
27
27
|
MarkupCompatibility,
|
|
28
28
|
compatibilityProfileForPart
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnsupportedEquationMutationError,
|
|
3
3
|
collectEquationUnits
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-K6E56LND.js";
|
|
5
5
|
import {
|
|
6
6
|
UnsupportedDiagramMutationError,
|
|
7
7
|
collectDiagramObservations
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-X4TWJNW7.js";
|
|
9
9
|
import {
|
|
10
10
|
openDocumentLocations,
|
|
11
11
|
resolveDocxSelection
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MWVELMXZ.js";
|
|
13
13
|
import {
|
|
14
14
|
DocumentArchiveEditor
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-GY2C555A.js";
|
|
16
16
|
import {
|
|
17
17
|
sectionAttribute,
|
|
18
18
|
sectionChild
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JY2T3KV2.js";
|
|
20
20
|
import {
|
|
21
21
|
addDocumentStylesPart,
|
|
22
22
|
styleAllocationIds
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-EEJ3YXVO.js";
|
|
24
24
|
import {
|
|
25
25
|
paragraphTextRun,
|
|
26
26
|
replaceParagraphContent,
|
|
27
27
|
splitParagraphContent
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MPRUGL4W.js";
|
|
29
29
|
import {
|
|
30
30
|
LocationIndex,
|
|
31
31
|
addressKey
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-VSTAHYCV.js";
|
|
33
33
|
import {
|
|
34
34
|
validateDocxInvocation
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-BDGNKRY4.js";
|
|
36
36
|
import {
|
|
37
37
|
assertDocumentEditable,
|
|
38
38
|
publishDocumentArchive
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-LTWX23FS.js";
|
|
40
40
|
import {
|
|
41
41
|
DocumentPackage
|
|
42
42
|
} from "./chunk-5BUL25DF.js";
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
runElementOpen,
|
|
59
59
|
selectNamedStyles,
|
|
60
60
|
xmlValue
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-QMWBKR4C.js";
|
|
62
62
|
import {
|
|
63
63
|
dialectForNamespace,
|
|
64
64
|
documentDialects
|
|
@@ -4,27 +4,27 @@ import {
|
|
|
4
4
|
openControlInventory,
|
|
5
5
|
prepareControlPlaceholder,
|
|
6
6
|
prepareControlValue
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CCNOZKAK.js";
|
|
8
8
|
import {
|
|
9
9
|
assertOutsideFields,
|
|
10
10
|
parseFields
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6EK76ERE.js";
|
|
12
12
|
import {
|
|
13
13
|
characterizeRasterHeader
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LUJUYUOG.js";
|
|
15
15
|
import {
|
|
16
16
|
pathContains
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VSTAHYCV.js";
|
|
18
18
|
import {
|
|
19
19
|
validateDocxInvocation
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BDGNKRY4.js";
|
|
21
21
|
import {
|
|
22
22
|
assertDocumentEditable,
|
|
23
23
|
publishDocumentArchive
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LTWX23FS.js";
|
|
25
25
|
import {
|
|
26
26
|
tableRows
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-C5VUJOUQ.js";
|
|
28
28
|
import {
|
|
29
29
|
DocumentPackage
|
|
30
30
|
} from "./chunk-5BUL25DF.js";
|
|
@@ -35,11 +35,11 @@ import {
|
|
|
35
35
|
assertOutsideRevisionRanges,
|
|
36
36
|
containsRevision,
|
|
37
37
|
xmlValue
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-QMWBKR4C.js";
|
|
39
39
|
import {
|
|
40
40
|
storedIntegerIdentity,
|
|
41
41
|
trimXmlWhitespace
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-2TMTGVJR.js";
|
|
43
43
|
import {
|
|
44
44
|
commentExtensionParts
|
|
45
45
|
} from "./chunk-WLANDWNW.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
openRetainedPresentationIndex,
|
|
3
3
|
stageRetainedOutput,
|
|
4
4
|
streamJson
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3ZGO24WG.js";
|
|
6
6
|
import {
|
|
7
7
|
attr,
|
|
8
8
|
child,
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
nextRel,
|
|
13
13
|
relPart,
|
|
14
14
|
required
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-A32PUWYE.js";
|
|
16
16
|
import {
|
|
17
17
|
SelectionError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3W3HLPCX.js";
|
|
19
19
|
import {
|
|
20
20
|
openRetainedPresentationValidation
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-N6VNHC3B.js";
|
|
22
22
|
import {
|
|
23
23
|
dialects
|
|
24
24
|
} from "./chunk-6KJDTKE4.js";
|
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
nodeFor,
|
|
3
3
|
selected,
|
|
4
4
|
validateSelection
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YW7WU7W2.js";
|
|
6
6
|
import {
|
|
7
7
|
validateShapeOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NZF56C25.js";
|
|
9
9
|
import {
|
|
10
10
|
attr,
|
|
11
11
|
child,
|
|
12
12
|
loadShared,
|
|
13
13
|
required
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-A32PUWYE.js";
|
|
15
15
|
import {
|
|
16
16
|
SelectionError,
|
|
17
17
|
readSelectionIndex
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3W3HLPCX.js";
|
|
19
19
|
import {
|
|
20
20
|
OfficeError
|
|
21
21
|
} from "./chunk-KM2SMMXZ.js";
|