@poe-platform/safe-bash 0.1.817 → 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 +7 -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/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/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 -66852
- 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-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-FSG6UC2N.js → chunk-2XR7B6DY.js} +420 -167
- 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-UYZ6EFZE.js → chunk-4Z7PBIMP.js} +6 -6
- 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-ABL2DPJI.js → chunk-GPLN6JV2.js} +12 -12
- 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-E64ZI2YB.js → chunk-MMSKDYK6.js} +224 -115
- 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-ZHHALBM7.js → chunk-RYOHOS2I.js} +4 -4
- 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-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-2QXVRRH3.js → command-engine-PFYHL7GS.js} +10 -4
- package/dist/safe-bash/command-chunks/{engine-T4GP6QOK-ECFKMR5V.js → engine-5AVSKFBI-D7Q5VPUN.js} +1 -1
- package/dist/safe-bash/command-chunks/model-store-IIWQHSEZ.js +54 -0
- 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-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 +13 -13
- 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-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.js +6 -6
- 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 +2 -1
- package/dist/safe-bash-xml-engine/stored-document.js +1 -1
- package/dist/safe-bash-xml-engine/{stored-namespaces.d.ts → stored-map.d.ts} +6 -6
- 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/sfx.js +3 -3
- 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 +35 -29
- package/dist/spreadsheet-format-xls/biff-properties-write.js +16 -7
- package/dist/spreadsheet-format-xls/biff-property-names.d.ts +3 -0
- package/dist/spreadsheet-format-xls/biff-property-names.js +44 -1
- package/dist/spreadsheet-format-xls/biff-property-observations.d.ts +33 -0
- package/dist/spreadsheet-format-xls/biff-property-observations.js +160 -0
- package/package.json +6 -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-KLS4T7FP-UO3CXFFF.js +0 -5581
- package/dist/safe-bash/command-chunks/chunk-6EZWG56T.js +0 -455
- package/dist/safe-bash/command-chunks/model-store-I7YAWL5V.js +0 -54
- 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
|
@@ -1,3 +1,192 @@
|
|
|
1
|
+
// packages/safe-bash-xml-engine/src/stored-map.ts
|
|
2
|
+
var StoredStringMap = class _StoredStringMap {
|
|
3
|
+
constructor(storage, budget, reference = 0) {
|
|
4
|
+
this.storage = storage;
|
|
5
|
+
this.budget = budget;
|
|
6
|
+
this.reference = reference;
|
|
7
|
+
}
|
|
8
|
+
storage;
|
|
9
|
+
budget;
|
|
10
|
+
reference;
|
|
11
|
+
async read(reference) {
|
|
12
|
+
const header = await this.storage.read(reference, 8);
|
|
13
|
+
const size = new DataView(header.buffer, header.byteOffset, 8).getFloat64(0, true);
|
|
14
|
+
const decoder = new TextDecoder(), parts = [];
|
|
15
|
+
for (let offset = 0; offset < size; offset += 16384) {
|
|
16
|
+
const length = Math.min(16384, size - offset);
|
|
17
|
+
const checkpoint = this.budget.tick(length);
|
|
18
|
+
if (checkpoint) await checkpoint;
|
|
19
|
+
parts.push(decoder.decode(await this.storage.read(reference + 8 + offset, length), { stream: true }));
|
|
20
|
+
}
|
|
21
|
+
parts.push(decoder.decode());
|
|
22
|
+
return JSON.parse(parts.join(""));
|
|
23
|
+
}
|
|
24
|
+
async write(entry) {
|
|
25
|
+
const source = JSON.stringify(entry), encoder = new TextEncoder(), header = new Uint8Array(8);
|
|
26
|
+
const reference = await this.storage.append(header);
|
|
27
|
+
let size = 0;
|
|
28
|
+
for (let offset = 0; offset < source.length; ) {
|
|
29
|
+
let end = Math.min(source.length, offset + 4096);
|
|
30
|
+
const last = source.charCodeAt(end - 1);
|
|
31
|
+
if (end < source.length && last >= 55296 && last <= 56319) end--;
|
|
32
|
+
const bytes = encoder.encode(source.slice(offset, end));
|
|
33
|
+
const checkpoint = this.budget.tick(bytes.length);
|
|
34
|
+
if (checkpoint) await checkpoint;
|
|
35
|
+
await this.storage.append(bytes);
|
|
36
|
+
size += bytes.length;
|
|
37
|
+
offset = end;
|
|
38
|
+
}
|
|
39
|
+
new DataView(header.buffer).setFloat64(0, size, true);
|
|
40
|
+
await this.storage.write(reference, header);
|
|
41
|
+
return reference;
|
|
42
|
+
}
|
|
43
|
+
async get(key) {
|
|
44
|
+
let reference = this.reference;
|
|
45
|
+
while (reference) {
|
|
46
|
+
const entry = await this.read(reference);
|
|
47
|
+
const checkpoint = this.budget.tick(key.length + 1);
|
|
48
|
+
if (checkpoint) await checkpoint;
|
|
49
|
+
if (key === entry.key) return entry.value;
|
|
50
|
+
reference = key < entry.key ? entry.left : entry.right;
|
|
51
|
+
}
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
54
|
+
async height(reference) {
|
|
55
|
+
return reference ? (await this.read(reference)).height : 0;
|
|
56
|
+
}
|
|
57
|
+
async updated(entry) {
|
|
58
|
+
return this.write({ ...entry, height: 1 + Math.max(await this.height(entry.left), await this.height(entry.right)) });
|
|
59
|
+
}
|
|
60
|
+
async rotate(entry, left) {
|
|
61
|
+
const pivot = await this.read(left ? entry.right : entry.left);
|
|
62
|
+
const child = await this.updated(left ? { ...entry, right: pivot.left } : { ...entry, left: pivot.right });
|
|
63
|
+
return this.updated(left ? { ...pivot, left: child } : { ...pivot, right: child });
|
|
64
|
+
}
|
|
65
|
+
async balance(entry) {
|
|
66
|
+
const difference = await this.height(entry.left) - await this.height(entry.right);
|
|
67
|
+
if (difference > 1) {
|
|
68
|
+
const child = await this.read(entry.left);
|
|
69
|
+
if (await this.height(child.left) < await this.height(child.right)) entry = { ...entry, left: await this.rotate(child, true) };
|
|
70
|
+
return this.rotate(entry, false);
|
|
71
|
+
}
|
|
72
|
+
if (difference < -1) {
|
|
73
|
+
const child = await this.read(entry.right);
|
|
74
|
+
if (await this.height(child.right) < await this.height(child.left)) entry = { ...entry, right: await this.rotate(child, false) };
|
|
75
|
+
return this.rotate(entry, true);
|
|
76
|
+
}
|
|
77
|
+
return this.updated(entry);
|
|
78
|
+
}
|
|
79
|
+
async set(key, value) {
|
|
80
|
+
const insert = async (reference) => {
|
|
81
|
+
if (!reference) return this.write({ key, value, left: 0, right: 0, height: 1 });
|
|
82
|
+
const entry = await this.read(reference);
|
|
83
|
+
const checkpoint = this.budget.tick(key.length + value.length + 1);
|
|
84
|
+
if (checkpoint) await checkpoint;
|
|
85
|
+
if (key === entry.key) return entry.value === value ? reference : this.write({ ...entry, value });
|
|
86
|
+
const side = key < entry.key ? "left" : "right";
|
|
87
|
+
const child = await insert(entry[side]);
|
|
88
|
+
return child === entry[side] ? reference : this.balance({ ...entry, [side]: child });
|
|
89
|
+
};
|
|
90
|
+
return new _StoredStringMap(this.storage, this.budget, await insert(this.reference));
|
|
91
|
+
}
|
|
92
|
+
async *[Symbol.asyncIterator]() {
|
|
93
|
+
const visit = async function* (scope, reference) {
|
|
94
|
+
if (!reference) return;
|
|
95
|
+
const entry = await scope.read(reference);
|
|
96
|
+
yield* visit(scope, entry.left);
|
|
97
|
+
yield [entry.key, entry.value];
|
|
98
|
+
yield* visit(scope, entry.right);
|
|
99
|
+
};
|
|
100
|
+
yield* visit(this, this.reference);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// packages/safe-bash-xml-engine/src/parser-attributes.ts
|
|
105
|
+
var StoredParserAttributes = class {
|
|
106
|
+
constructor(storage, budget) {
|
|
107
|
+
this.storage = storage;
|
|
108
|
+
this.budget = budget;
|
|
109
|
+
}
|
|
110
|
+
storage;
|
|
111
|
+
budget;
|
|
112
|
+
async number(reference, offset = 0) {
|
|
113
|
+
if (!reference) return 0;
|
|
114
|
+
const bytes = await this.storage.read(reference + offset, 8);
|
|
115
|
+
return new DataView(bytes.buffer, bytes.byteOffset, 8).getFloat64(0, true);
|
|
116
|
+
}
|
|
117
|
+
async set(reference, offset, value) {
|
|
118
|
+
const bytes = new Uint8Array(8);
|
|
119
|
+
new DataView(bytes.buffer).setFloat64(0, value, true);
|
|
120
|
+
await this.storage.write(reference + offset, bytes);
|
|
121
|
+
}
|
|
122
|
+
async append(attribute) {
|
|
123
|
+
const source = JSON.stringify(attribute), encoder = new TextEncoder();
|
|
124
|
+
const reference = await this.storage.append(new Uint8Array(16));
|
|
125
|
+
let size = 0;
|
|
126
|
+
for (let offset = 0; offset < source.length; ) {
|
|
127
|
+
let end = Math.min(source.length, offset + 4096);
|
|
128
|
+
const last = source.charCodeAt(end - 1);
|
|
129
|
+
if (end < source.length && last >= 55296 && last <= 56319) end--;
|
|
130
|
+
const bytes = encoder.encode(source.slice(offset, end));
|
|
131
|
+
const checkpoint = this.budget.tick(bytes.length);
|
|
132
|
+
if (checkpoint) await checkpoint;
|
|
133
|
+
await this.storage.append(bytes);
|
|
134
|
+
size += bytes.length;
|
|
135
|
+
offset = end;
|
|
136
|
+
}
|
|
137
|
+
await this.set(reference, 8, size);
|
|
138
|
+
return reference;
|
|
139
|
+
}
|
|
140
|
+
async execute(request) {
|
|
141
|
+
const store = request.state.reference;
|
|
142
|
+
if (request.attributeOperation === "has" || request.attributeOperation === "expanded") {
|
|
143
|
+
const offset = request.attributeOperation === "has" ? 16 : 24;
|
|
144
|
+
const values = new StoredStringMap(this.storage, this.budget, await this.number(store, offset));
|
|
145
|
+
request.found = await values.get(request.name) !== void 0;
|
|
146
|
+
if (request.attributeOperation === "expanded" && !request.found) {
|
|
147
|
+
const next = await values.set(request.name, "1");
|
|
148
|
+
await this.set(store, offset, next.reference);
|
|
149
|
+
}
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (request.attributeOperation === "append") {
|
|
153
|
+
const reference = store || await this.storage.append(new Uint8Array(32));
|
|
154
|
+
const values = new StoredStringMap(this.storage, this.budget, await this.number(reference, 16));
|
|
155
|
+
const existing = await values.get(request.attribute.name);
|
|
156
|
+
const updated = await values.set(request.attribute.name, request.attribute.value);
|
|
157
|
+
const { value: ignoredValue, ...metadata } = request.attribute;
|
|
158
|
+
const attribute = await this.append(metadata);
|
|
159
|
+
const last = await this.number(reference, 8);
|
|
160
|
+
if (last) await this.set(last, 0, attribute);
|
|
161
|
+
else await this.set(reference, 0, attribute);
|
|
162
|
+
await this.set(reference, 8, attribute);
|
|
163
|
+
await this.set(reference, 16, updated.reference);
|
|
164
|
+
request.result = {
|
|
165
|
+
reference,
|
|
166
|
+
first: request.state.first || attribute,
|
|
167
|
+
length: request.state.length + 1,
|
|
168
|
+
size: request.state.size + (existing === void 0 ? 1 : 0)
|
|
169
|
+
};
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (request.attributeOperation === "read") {
|
|
173
|
+
const size = await this.number(request.reference, 8), decoder = new TextDecoder(), parts = [];
|
|
174
|
+
for (let offset = 0; offset < size; offset += 16384) {
|
|
175
|
+
const length = Math.min(16384, size - offset);
|
|
176
|
+
const checkpoint = this.budget.tick(length);
|
|
177
|
+
if (checkpoint) await checkpoint;
|
|
178
|
+
parts.push(decoder.decode(await this.storage.read(request.reference + 16 + offset, length), { stream: true }));
|
|
179
|
+
}
|
|
180
|
+
parts.push(decoder.decode());
|
|
181
|
+
const metadata = JSON.parse(parts.join(""));
|
|
182
|
+
const values = new StoredStringMap(this.storage, this.budget, await this.number(store, 16));
|
|
183
|
+
const value = request.values ? await values.get(metadata.name) : "";
|
|
184
|
+
if (value === void 0) throw new TypeError("Missing stored XML attribute value");
|
|
185
|
+
request.result = { ...metadata, value, next: await this.number(request.reference) };
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
1
190
|
// packages/safe-bash-xml-engine/src/frames.ts
|
|
2
191
|
var StoredXmlFrames = class {
|
|
3
192
|
constructor(storage) {
|
|
@@ -13,7 +202,8 @@ var StoredXmlFrames = class {
|
|
|
13
202
|
name: frame.name,
|
|
14
203
|
element,
|
|
15
204
|
namespaces: [...frame.namespaces],
|
|
16
|
-
retainNamespaces: namespaces2 === frame.namespaces
|
|
205
|
+
retainNamespaces: namespaces2 === frame.namespaces,
|
|
206
|
+
...frame.namespaceScope ? { namespaceScope: frame.namespaceScope } : {}
|
|
17
207
|
};
|
|
18
208
|
const source2 = JSON.stringify(record2);
|
|
19
209
|
const reference = this.storage.allocate(16 + source2.length * 2);
|
|
@@ -51,6 +241,7 @@ var StoredXmlFrames = class {
|
|
|
51
241
|
name: record.name,
|
|
52
242
|
namespaces,
|
|
53
243
|
content: void 0,
|
|
244
|
+
...record.namespaceScope ? { namespaceScope: record.namespaceScope } : {},
|
|
54
245
|
element: { ...record.element, namespaces: record.retainNamespaces ? namespaces : /* @__PURE__ */ new Map() }
|
|
55
246
|
};
|
|
56
247
|
}
|
|
@@ -87,17 +278,22 @@ async function parseStoredXml(source, context, budget, recover, consume) {
|
|
|
87
278
|
if (recover) while (!sourceDone) await readNext();
|
|
88
279
|
const queued = [];
|
|
89
280
|
const frames = new StoredXmlFrames(frameStorage);
|
|
281
|
+
const attributes = new StoredParserAttributes(frameStorage, budget);
|
|
90
282
|
const parser = parseXmlSourceSteps(recover ? length : void 0, {
|
|
91
283
|
...budget.limits,
|
|
92
284
|
maxContentNodes: budget.limits.maxNodes,
|
|
93
285
|
expectedEncoding: "UTF-8",
|
|
94
286
|
retainTree: false,
|
|
95
287
|
storeFrames: true,
|
|
288
|
+
storeNamespaces: true,
|
|
289
|
+
storeAttributes: true,
|
|
96
290
|
fragmentContent: true,
|
|
97
291
|
compactDeclaration: true,
|
|
98
292
|
...recover ? { recover } : {},
|
|
99
293
|
...consume ? { events: (event) => {
|
|
100
294
|
queued.push(event);
|
|
295
|
+
}, onAttribute: (attribute, element) => {
|
|
296
|
+
queued.push({ type: "attribute", attribute, element });
|
|
101
297
|
} } : {}
|
|
102
298
|
});
|
|
103
299
|
let step = parser.next();
|
|
@@ -113,6 +309,19 @@ async function parseStoredXml(source, context, budget, recover, consume) {
|
|
|
113
309
|
if (typeof step.value === "number") {
|
|
114
310
|
const checkpoint = budget.tick(step.value);
|
|
115
311
|
if (checkpoint) await checkpoint;
|
|
312
|
+
} else if ("attributeOperation" in step.value) {
|
|
313
|
+
await attributes.execute(step.value);
|
|
314
|
+
} else if ("namespaceOperation" in step.value) {
|
|
315
|
+
const request = step.value;
|
|
316
|
+
const scope = new StoredStringMap(frameStorage, budget, request.scope.reference);
|
|
317
|
+
const previous = await scope.get(request.prefix);
|
|
318
|
+
if (request.namespaceOperation === "get") {
|
|
319
|
+
if (previous !== void 0) request.value = previous;
|
|
320
|
+
request.complete = true;
|
|
321
|
+
} else {
|
|
322
|
+
const next = await scope.set(request.prefix, request.value);
|
|
323
|
+
request.result = { reference: next.reference, size: request.scope.size + (previous === void 0 ? 1 : 0) };
|
|
324
|
+
}
|
|
116
325
|
} else if ("frameOperation" in step.value) {
|
|
117
326
|
await frames.execute(step.value);
|
|
118
327
|
} else {
|
|
@@ -150,111 +359,6 @@ async function parseStoredXml(source, context, budget, recover, consume) {
|
|
|
150
359
|
|
|
151
360
|
// packages/safe-bash-xml-engine/src/stored-document.ts
|
|
152
361
|
import { PagedStorage as PagedStorage2 } from "@poe-platform/safe-fs/storage";
|
|
153
|
-
|
|
154
|
-
// packages/safe-bash-xml-engine/src/stored-namespaces.ts
|
|
155
|
-
var StoredNamespaces = class _StoredNamespaces {
|
|
156
|
-
constructor(storage, budget, reference = 0) {
|
|
157
|
-
this.storage = storage;
|
|
158
|
-
this.budget = budget;
|
|
159
|
-
this.reference = reference;
|
|
160
|
-
}
|
|
161
|
-
storage;
|
|
162
|
-
budget;
|
|
163
|
-
reference;
|
|
164
|
-
async read(reference) {
|
|
165
|
-
const header = await this.storage.read(reference, 8);
|
|
166
|
-
const size = new DataView(header.buffer, header.byteOffset, 8).getFloat64(0, true);
|
|
167
|
-
const decoder = new TextDecoder(), parts = [];
|
|
168
|
-
for (let offset = 0; offset < size; offset += 16384) {
|
|
169
|
-
const length = Math.min(16384, size - offset);
|
|
170
|
-
const checkpoint = this.budget.tick(length);
|
|
171
|
-
if (checkpoint) await checkpoint;
|
|
172
|
-
parts.push(decoder.decode(await this.storage.read(reference + 8 + offset, length), { stream: true }));
|
|
173
|
-
}
|
|
174
|
-
parts.push(decoder.decode());
|
|
175
|
-
return JSON.parse(parts.join(""));
|
|
176
|
-
}
|
|
177
|
-
async write(entry) {
|
|
178
|
-
const source = JSON.stringify(entry), encoder = new TextEncoder(), header = new Uint8Array(8);
|
|
179
|
-
const reference = await this.storage.append(header);
|
|
180
|
-
let size = 0;
|
|
181
|
-
for (let offset = 0; offset < source.length; ) {
|
|
182
|
-
let end = Math.min(source.length, offset + 4096);
|
|
183
|
-
const last = source.charCodeAt(end - 1);
|
|
184
|
-
if (end < source.length && last >= 55296 && last <= 56319) end--;
|
|
185
|
-
const bytes = encoder.encode(source.slice(offset, end));
|
|
186
|
-
const checkpoint = this.budget.tick(bytes.length);
|
|
187
|
-
if (checkpoint) await checkpoint;
|
|
188
|
-
await this.storage.append(bytes);
|
|
189
|
-
size += bytes.length;
|
|
190
|
-
offset = end;
|
|
191
|
-
}
|
|
192
|
-
new DataView(header.buffer).setFloat64(0, size, true);
|
|
193
|
-
await this.storage.write(reference, header);
|
|
194
|
-
return reference;
|
|
195
|
-
}
|
|
196
|
-
async get(prefix) {
|
|
197
|
-
let reference = this.reference;
|
|
198
|
-
while (reference) {
|
|
199
|
-
const entry = await this.read(reference);
|
|
200
|
-
const checkpoint = this.budget.tick(prefix.length + 1);
|
|
201
|
-
if (checkpoint) await checkpoint;
|
|
202
|
-
if (prefix === entry.prefix) return entry.uri;
|
|
203
|
-
reference = prefix < entry.prefix ? entry.left : entry.right;
|
|
204
|
-
}
|
|
205
|
-
return void 0;
|
|
206
|
-
}
|
|
207
|
-
async height(reference) {
|
|
208
|
-
return reference ? (await this.read(reference)).height : 0;
|
|
209
|
-
}
|
|
210
|
-
async updated(entry) {
|
|
211
|
-
return this.write({ ...entry, height: 1 + Math.max(await this.height(entry.left), await this.height(entry.right)) });
|
|
212
|
-
}
|
|
213
|
-
async rotate(entry, left) {
|
|
214
|
-
const pivot = await this.read(left ? entry.right : entry.left);
|
|
215
|
-
const child = await this.updated(left ? { ...entry, right: pivot.left } : { ...entry, left: pivot.right });
|
|
216
|
-
return this.updated(left ? { ...pivot, left: child } : { ...pivot, right: child });
|
|
217
|
-
}
|
|
218
|
-
async balance(entry) {
|
|
219
|
-
const difference = await this.height(entry.left) - await this.height(entry.right);
|
|
220
|
-
if (difference > 1) {
|
|
221
|
-
const child = await this.read(entry.left);
|
|
222
|
-
if (await this.height(child.left) < await this.height(child.right)) entry = { ...entry, left: await this.rotate(child, true) };
|
|
223
|
-
return this.rotate(entry, false);
|
|
224
|
-
}
|
|
225
|
-
if (difference < -1) {
|
|
226
|
-
const child = await this.read(entry.right);
|
|
227
|
-
if (await this.height(child.right) < await this.height(child.left)) entry = { ...entry, right: await this.rotate(child, false) };
|
|
228
|
-
return this.rotate(entry, true);
|
|
229
|
-
}
|
|
230
|
-
return this.updated(entry);
|
|
231
|
-
}
|
|
232
|
-
async set(prefix, uri) {
|
|
233
|
-
const insert = async (reference) => {
|
|
234
|
-
if (!reference) return this.write({ prefix, uri, left: 0, right: 0, height: 1 });
|
|
235
|
-
const entry = await this.read(reference);
|
|
236
|
-
const checkpoint = this.budget.tick(prefix.length + uri.length + 1);
|
|
237
|
-
if (checkpoint) await checkpoint;
|
|
238
|
-
if (prefix === entry.prefix) return entry.uri === uri ? reference : this.write({ ...entry, uri });
|
|
239
|
-
const side = prefix < entry.prefix ? "left" : "right";
|
|
240
|
-
const child = await insert(entry[side]);
|
|
241
|
-
return child === entry[side] ? reference : this.balance({ ...entry, [side]: child });
|
|
242
|
-
};
|
|
243
|
-
return new _StoredNamespaces(this.storage, this.budget, await insert(this.reference));
|
|
244
|
-
}
|
|
245
|
-
async *[Symbol.asyncIterator]() {
|
|
246
|
-
const visit = async function* (scope, reference) {
|
|
247
|
-
if (!reference) return;
|
|
248
|
-
const entry = await scope.read(reference);
|
|
249
|
-
yield* visit(scope, entry.left);
|
|
250
|
-
yield [entry.prefix, entry.uri];
|
|
251
|
-
yield* visit(scope, entry.right);
|
|
252
|
-
};
|
|
253
|
-
yield* visit(this, this.reference);
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
// packages/safe-bash-xml-engine/src/stored-document.ts
|
|
258
362
|
var headerBytes = 80;
|
|
259
363
|
var namespacesField = 72;
|
|
260
364
|
var parentField = 0;
|
|
@@ -289,10 +393,19 @@ var StoredXmlDocument = class _StoredXmlDocument {
|
|
|
289
393
|
try {
|
|
290
394
|
context.registerCleanup?.(document.close.bind(document));
|
|
291
395
|
document.documentReference = await document.storage.append(new Uint8Array(headerBytes));
|
|
292
|
-
const namespaces = await new
|
|
396
|
+
const namespaces = await new StoredStringMap(document.storage, budget).set("xml", "http://www.w3.org/XML/1998/namespace");
|
|
293
397
|
await document.set(document.documentReference, namespacesField, namespaces.reference);
|
|
294
398
|
let parent = document.documentReference, fragmentTail = 0;
|
|
295
399
|
const consume = async (event) => {
|
|
400
|
+
if (event.type === "attribute") {
|
|
401
|
+
await document.append(parent, { kind: "attribute", value: event.attribute });
|
|
402
|
+
if (event.attribute.namespace === "http://www.w3.org/2000/xmlns/") {
|
|
403
|
+
const scope = await document.namespaceScope(parent);
|
|
404
|
+
const updated = await scope.set(event.attribute.name === "xmlns" ? "" : event.attribute.localName, event.attribute.value);
|
|
405
|
+
await document.set(parent, namespacesField, updated.reference);
|
|
406
|
+
}
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
296
409
|
if (event.type === "close") {
|
|
297
410
|
parent = await document.field(parent, parentField);
|
|
298
411
|
return;
|
|
@@ -314,13 +427,8 @@ var StoredXmlDocument = class _StoredXmlDocument {
|
|
|
314
427
|
if (continuation) await document.set(fragmentTail, fragmentField, reference);
|
|
315
428
|
fragmentTail = reference;
|
|
316
429
|
if (event.type === "open") {
|
|
317
|
-
|
|
318
|
-
for (const attribute of event.element.attributes) if (attribute.namespace === "http://www.w3.org/2000/xmlns/")
|
|
319
|
-
namespaces2 = await namespaces2.set(attribute.name === "xmlns" ? "" : attribute.localName, attribute.value);
|
|
430
|
+
const namespaces2 = await document.namespaceScope(parent);
|
|
320
431
|
await document.set(reference, namespacesField, namespaces2.reference);
|
|
321
|
-
for (const attribute of event.element.attributes) {
|
|
322
|
-
await document.append(reference, { kind: "attribute", value: attribute });
|
|
323
|
-
}
|
|
324
432
|
if (!document.rootReference) document.rootReference = reference;
|
|
325
433
|
parent = reference;
|
|
326
434
|
}
|
|
@@ -397,8 +505,9 @@ var StoredXmlDocument = class _StoredXmlDocument {
|
|
|
397
505
|
return value;
|
|
398
506
|
}
|
|
399
507
|
async namespaceScope(reference) {
|
|
400
|
-
return new
|
|
508
|
+
return new StoredStringMap(this.storage, this.budget, await this.field(reference, namespacesField));
|
|
401
509
|
}
|
|
510
|
+
/** Load scalar metadata only; attributes and namespace scopes have separate iterators. */
|
|
402
511
|
async metadata(reference) {
|
|
403
512
|
const size = await this.field(reference, sizeField);
|
|
404
513
|
const decoder = new TextDecoder();
|
|
@@ -544,7 +653,7 @@ var StoredXmlDocument = class _StoredXmlDocument {
|
|
|
544
653
|
};
|
|
545
654
|
|
|
546
655
|
export {
|
|
547
|
-
|
|
656
|
+
StoredStringMap,
|
|
548
657
|
parseStoredXml,
|
|
549
658
|
StoredXmlDocument
|
|
550
659
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createPropertyPart
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5IHJWBDR.js";
|
|
4
4
|
import {
|
|
5
5
|
measurePackageResourceSerialization
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ETN25WCR.js";
|
|
7
7
|
import {
|
|
8
8
|
validateDocxInvocation
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BDGNKRY4.js";
|
|
10
10
|
import {
|
|
11
11
|
normalizeDocxPropertyOptions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NP2QXF2X.js";
|
|
13
13
|
import {
|
|
14
14
|
assertDocumentEditable,
|
|
15
15
|
publishDocumentArchive
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LTWX23FS.js";
|
|
17
17
|
import {
|
|
18
18
|
SemanticValidationError,
|
|
19
19
|
validateDocumentArchive
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FILE5PBI.js";
|
|
21
21
|
import {
|
|
22
22
|
readDocumentArchive
|
|
23
23
|
} from "./chunk-5BUL25DF.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
UnsupportedEditError,
|
|
27
27
|
editActivePropertyXml,
|
|
28
28
|
xmlValue
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QMWBKR4C.js";
|
|
30
30
|
import {
|
|
31
31
|
customPropertyFormatId,
|
|
32
32
|
normalizePropertyDate,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
readPropertyNodes,
|
|
38
38
|
readPropertyParts,
|
|
39
39
|
serializePropertyScalar
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-2TMTGVJR.js";
|
|
41
41
|
import {
|
|
42
42
|
documentDialects
|
|
43
43
|
} from "./chunk-WLANDWNW.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
packageViewBatchActions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7ZEGARPB.js";
|
|
4
4
|
import {
|
|
5
5
|
imageBatchActions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7NFICYRU.js";
|
|
7
7
|
import {
|
|
8
8
|
packUriBatchActions
|
|
9
9
|
} from "./chunk-EBWCAGLA.js";
|
|
@@ -23,20 +23,20 @@ import {
|
|
|
23
23
|
TableStyle,
|
|
24
24
|
modelOutput,
|
|
25
25
|
setStyleLinks
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EV3DPRWE.js";
|
|
27
27
|
import {
|
|
28
28
|
StylesPart,
|
|
29
29
|
XmlElementView
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-5RDS6CNQ.js";
|
|
31
31
|
import {
|
|
32
32
|
modelVfsResolver
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-K2NV6H7E.js";
|
|
34
34
|
import {
|
|
35
35
|
partProviderReceivers
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-RR6XG2I6.js";
|
|
37
37
|
import {
|
|
38
38
|
publishDocumentArchive
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-LTWX23FS.js";
|
|
40
40
|
import {
|
|
41
41
|
Cm,
|
|
42
42
|
Emu,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
enumToXml,
|
|
55
55
|
enumValue,
|
|
56
56
|
isLength
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-EBTKM7KX.js";
|
|
58
58
|
import {
|
|
59
59
|
DocxUsageError
|
|
60
60
|
} from "./chunk-WXMYTNWS.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
characterizeRasterHeader
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LUJUYUOG.js";
|
|
4
4
|
import {
|
|
5
5
|
UnsupportedEditError,
|
|
6
6
|
activeXmlChildren,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
runElementOpen,
|
|
11
11
|
splitNativeTextRunXml,
|
|
12
12
|
xmlValue
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QMWBKR4C.js";
|
|
14
14
|
import {
|
|
15
15
|
dialectForNamespace,
|
|
16
16
|
documentDialects
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyTableUpdate,
|
|
3
3
|
readTable
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IJZUUXLL.js";
|
|
5
5
|
import {
|
|
6
6
|
nodeFor
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YW7WU7W2.js";
|
|
8
8
|
import {
|
|
9
9
|
attr,
|
|
10
10
|
required
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-A32PUWYE.js";
|
|
12
12
|
import {
|
|
13
13
|
parseXmlPart
|
|
14
14
|
} from "./chunk-7PYDVQPB.js";
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import {
|
|
2
|
+
characters
|
|
3
|
+
} from "./chunk-KM2SMMXZ.js";
|
|
4
|
+
import {
|
|
5
|
+
readJsonNumber
|
|
6
|
+
} from "./chunk-NUGQQDGE.js";
|
|
7
|
+
|
|
8
|
+
// packages/safe-bash-presentation-engine/src/property-value.ts
|
|
9
|
+
function decodePropertyValue(type, value) {
|
|
10
|
+
if (type === "number")
|
|
11
|
+
return value.trim() !== "" && Number.isFinite(Number(value)) ? Number(value) : null;
|
|
12
|
+
if (type === "boolean")
|
|
13
|
+
return value === "true" || value === "1" ? true : value === "false" || value === "0" ? false : null;
|
|
14
|
+
if (type === "date") {
|
|
15
|
+
const segments = value.split("T");
|
|
16
|
+
if (segments.length > 2) return null;
|
|
17
|
+
const calendar = segments[0].split("-");
|
|
18
|
+
if (calendar.length > 3 || calendar[0]?.length !== 4 || calendar.some(
|
|
19
|
+
(v, i) => v.length !== (i === 0 ? 4 : 2) || [...v].some((c) => c < "0" || c > "9")
|
|
20
|
+
))
|
|
21
|
+
return null;
|
|
22
|
+
const year = Number(calendar[0]), month = Number(calendar[1] ?? 1), day = Number(calendar[2] ?? 1);
|
|
23
|
+
const leap = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
24
|
+
if (year < 1 || month < 1 || month > 12 || day < 1 || day > [31, leap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1])
|
|
25
|
+
return null;
|
|
26
|
+
if (segments.length === 2 && (calendar.length !== 3 || !(value.endsWith("Z") || value.slice(19).includes("+") || value.slice(19).includes("-"))))
|
|
27
|
+
return null;
|
|
28
|
+
const date = new Date(
|
|
29
|
+
segments.length === 1 ? `${calendar[0]}-${calendar[1] ?? "01"}-${calendar[2] ?? "01"}T00:00:00Z` : value
|
|
30
|
+
);
|
|
31
|
+
return Number.isFinite(date.getTime()) ? date.toISOString().slice(0, 19) + "Z" : null;
|
|
32
|
+
}
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// packages/safe-bash-presentation-engine/src/retained-property-value.ts
|
|
37
|
+
async function readRetainedPropertyValue(type, source, check) {
|
|
38
|
+
if (type !== "number") {
|
|
39
|
+
let value2 = "", overflow = false, fraction = false, fractionDigits = 0;
|
|
40
|
+
const limit = type === "boolean" ? 5 : 128;
|
|
41
|
+
for await (const character of characters(source)) {
|
|
42
|
+
check();
|
|
43
|
+
if (overflow) continue;
|
|
44
|
+
if (type === "date") {
|
|
45
|
+
if (fraction && character >= "0" && character <= "9") {
|
|
46
|
+
if (fractionDigits++ < 3) value2 += character;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
fraction = value2.length === 19 && character === ".";
|
|
50
|
+
}
|
|
51
|
+
if (value2.length >= limit) overflow = true;
|
|
52
|
+
else value2 += character;
|
|
53
|
+
}
|
|
54
|
+
check();
|
|
55
|
+
return overflow ? null : decodePropertyValue(type, value2);
|
|
56
|
+
}
|
|
57
|
+
let state = "start";
|
|
58
|
+
let invalid = false, trailing = false, signed = false, firstZero = false, integerDigits = 0, radix = 0, radixDigits = 0, prefix = "", radixOverflow = false;
|
|
59
|
+
async function* decimal() {
|
|
60
|
+
for await (const character of characters(source)) {
|
|
61
|
+
check();
|
|
62
|
+
if (invalid) continue;
|
|
63
|
+
if (character.trim() === "") {
|
|
64
|
+
if (state !== "start") trailing = true;
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (trailing) {
|
|
68
|
+
invalid = true;
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
const digit = character >= "0" && character <= "9";
|
|
72
|
+
if (state === "radix") {
|
|
73
|
+
const code = character.toLowerCase().charCodeAt(0), value2 = digit ? code - 48 : code >= 97 && code <= 102 ? code - 87 : Infinity;
|
|
74
|
+
if (value2 >= radix) {
|
|
75
|
+
invalid = true;
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
radixDigits++;
|
|
79
|
+
if (prefix || value2) {
|
|
80
|
+
if (prefix.length < 1024) prefix += character;
|
|
81
|
+
else radixOverflow = true;
|
|
82
|
+
}
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
if (state === "start" || state === "sign") {
|
|
86
|
+
if (state === "start" && (character === "+" || character === "-")) {
|
|
87
|
+
signed = true;
|
|
88
|
+
state = "sign";
|
|
89
|
+
yield character;
|
|
90
|
+
continue;
|
|
91
|
+
}
|
|
92
|
+
if (digit) {
|
|
93
|
+
state = "integer";
|
|
94
|
+
integerDigits = 1;
|
|
95
|
+
firstZero = character === "0";
|
|
96
|
+
} else if (character === ".") state = "dot";
|
|
97
|
+
else invalid = true;
|
|
98
|
+
} else if (state === "integer") {
|
|
99
|
+
if (digit) integerDigits++;
|
|
100
|
+
else if (!signed && firstZero && integerDigits === 1 && ["x", "b", "o"].includes(character.toLowerCase())) {
|
|
101
|
+
radix = { x: 16, b: 2, o: 8 }[character.toLowerCase()];
|
|
102
|
+
state = "radix";
|
|
103
|
+
continue;
|
|
104
|
+
} else if (character === ".") state = "fraction";
|
|
105
|
+
else if (character === "e" || character === "E") state = "exponent";
|
|
106
|
+
else invalid = true;
|
|
107
|
+
} else if (state === "dot") {
|
|
108
|
+
if (digit) state = "fraction";
|
|
109
|
+
else invalid = true;
|
|
110
|
+
} else if (state === "fraction") {
|
|
111
|
+
if (character === "e" || character === "E") state = "exponent";
|
|
112
|
+
else if (!digit) invalid = true;
|
|
113
|
+
} else if (state === "exponent" || state === "exponent-sign") {
|
|
114
|
+
if (digit) state = "exponent-digits";
|
|
115
|
+
else if (state === "exponent" && (character === "+" || character === "-")) state = "exponent-sign";
|
|
116
|
+
else invalid = true;
|
|
117
|
+
} else if (!digit) invalid = true;
|
|
118
|
+
if (!invalid) yield character;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
const value = await readJsonNumber(decimal(), async () => {
|
|
122
|
+
check();
|
|
123
|
+
}, false);
|
|
124
|
+
check();
|
|
125
|
+
if (invalid || ["start", "sign", "dot", "exponent", "exponent-sign"].includes(state)) return null;
|
|
126
|
+
if (radix) {
|
|
127
|
+
if (!radixDigits || radixOverflow) return null;
|
|
128
|
+
const result = Number(`0${radix === 16 ? "x" : radix === 8 ? "o" : "b"}${prefix || "0"}`);
|
|
129
|
+
return Number.isFinite(result) ? result : null;
|
|
130
|
+
}
|
|
131
|
+
return Number.isFinite(value) ? value : null;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export {
|
|
135
|
+
decodePropertyValue,
|
|
136
|
+
readRetainedPropertyValue
|
|
137
|
+
};
|