@holoscript/core 6.0.4 → 6.1.2
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/LICENSE +21 -0
- package/README.md +3 -3
- package/bin/holoscript.cjs +3 -0
- package/dist/GLTFPipeline-SFIORFJU.js +16 -0
- package/dist/GLTFPipeline-VNNDPONV.cjs +37 -0
- package/dist/{HoloScriptPlusParser-BN6KVRCM.js → HoloScriptPlusParser-7FBIFUFC.js} +6 -5
- package/dist/{HoloScriptPlusParser-NC5FE6AL.cjs → HoloScriptPlusParser-A2W7OCN2.cjs} +17 -16
- package/dist/HoloScriptPlusParser-F2Z56FJR.js +10 -0
- package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +27 -0
- package/dist/{USDZExporter-UWGWNMMD.cjs → USDZExporter-3FWJ25JI.cjs} +344 -16
- package/dist/{USDZExporter-NTMBNTDB.js → USDZExporter-D2HQLQYK.js} +344 -16
- package/dist/agents/index.cjs +19 -0
- package/dist/agents/index.d.ts +100 -0
- package/dist/agents/index.js +17 -0
- package/dist/chunk-22W6NGYN.js +725 -0
- package/dist/{chunk-5OEOHAAW.cjs → chunk-27MPVJVZ.cjs} +64 -28
- package/dist/{chunk-RVYPEYPX.js → chunk-2A7FURVO.js} +44 -8
- package/dist/{chunk-XCWFGZAA.js → chunk-2B7WVIDZ.js} +11 -8
- package/dist/{chunk-NDQNIJEH.js → chunk-2BSMSUCE.js} +250 -24
- package/dist/chunk-2HLIGOKU.cjs +5546 -0
- package/dist/{chunk-EONILVMF.js → chunk-2M2DPHKB.js} +4 -4
- package/dist/{chunk-G7CT3EMP.cjs → chunk-2YSNA2F2.cjs} +319 -47
- package/dist/{chunk-IWI6J7FX.js → chunk-33XCOVE3.js} +5 -5
- package/dist/chunk-3FOKASKO.cjs +348 -0
- package/dist/{chunk-DXJQDCFL.js → chunk-4C57PR42.js} +3 -3
- package/dist/{chunk-MPXBVFHQ.js → chunk-4N4SXXWF.js} +4 -3
- package/dist/chunk-4PDEPEQW.cjs +41 -0
- package/dist/chunk-4R6HPSHJ.js +2176 -0
- package/dist/chunk-4R6SBXDB.js +45 -0
- package/dist/chunk-4SY77NA4.cjs +413 -0
- package/dist/{chunk-YCXFCXDS.js → chunk-4UUKPCY4.js} +668 -110
- package/dist/{chunk-LGGRPKTV.cjs → chunk-52ULD552.cjs} +114 -35
- package/dist/{chunk-L4G4RLXX.js → chunk-5CKA5SXU.js} +438 -22
- package/dist/chunk-5FSKKMR7.cjs +2092 -0
- package/dist/{chunk-FF3Q7ADR.js → chunk-5JEU52DW.js} +5 -3
- package/dist/chunk-5N54COB6.cjs +327 -0
- package/dist/chunk-5S7RKFGR.cjs +446 -0
- package/dist/{chunk-KED34ILP.js → chunk-6ASWLXXN.js} +21 -9
- package/dist/chunk-6CTRH7HT.cjs +1985 -0
- package/dist/{chunk-CAUCGUEA.cjs → chunk-6EX3I5P4.cjs} +6 -6
- package/dist/chunk-6FGQNDR4.js +5731 -0
- package/dist/{chunk-72EQECGT.cjs → chunk-6KMK2UXT.cjs} +122 -46
- package/dist/{chunk-G4VZTCIB.js → chunk-6L4VE27M.js} +33 -23
- package/dist/{chunk-ATSKSYVE.cjs → chunk-6S6TKNEA.cjs} +6478 -1738
- package/dist/chunk-77V4GTCA.js +596 -0
- package/dist/{chunk-ZP4D3CSX.cjs → chunk-7AD52FRS.cjs} +16 -16
- package/dist/chunk-A6KINLZJ.js +236 -0
- package/dist/chunk-AIA52I7T.cjs +543 -0
- package/dist/chunk-AIX25INK.cjs +602 -0
- package/dist/{chunk-B5TCIAPQ.cjs → chunk-AO4I2Z7M.cjs} +17 -18
- package/dist/{chunk-Q5SJOGHQ.cjs → chunk-BPICAGBV.cjs} +324 -199
- package/dist/chunk-BRQJKJGT.cjs +20 -0
- package/dist/{chunk-3FXV5S25.cjs → chunk-C37BHB7N.cjs} +6 -3
- package/dist/{chunk-XUTX5CBW.js → chunk-CBJY23VL.js} +3 -3
- package/dist/chunk-CIWWXYHZ.cjs +50 -0
- package/dist/{chunk-XXINBTZK.cjs → chunk-DIL6DDDN.cjs} +101 -45
- package/dist/chunk-DMXC24WV.js +404 -0
- package/dist/{chunk-PMGODDJA.cjs → chunk-DTGBOSEM.cjs} +12 -12
- package/dist/chunk-E7JP3BS3.cjs +61 -0
- package/dist/{chunk-HJJLD366.js → chunk-EKBKLK7P.js} +3 -3
- package/dist/chunk-EKYL4PE3.cjs +404 -0
- package/dist/{chunk-UPJBDCVF.js → chunk-EMMC5CSQ.js} +12 -8
- package/dist/{chunk-GGHSW2NN.js → chunk-EOBB6A4B.js} +6389 -1718
- package/dist/chunk-EOFNVCM6.js +325 -0
- package/dist/{chunk-FHQVYCH2.js → chunk-ER4GATIU.js} +7 -7
- package/dist/{chunk-N5FTS757.cjs → chunk-EXKSFGSX.cjs} +7 -148
- package/dist/{chunk-LK5IAVH6.cjs → chunk-EXUP2BUM.cjs} +27 -27
- package/dist/chunk-FDSGHPAK.js +130 -0
- package/dist/chunk-FEWUHQNM.cjs +144 -0
- package/dist/{chunk-5TOFIR6L.js → chunk-FGGJQRLZ.js} +5 -142
- package/dist/chunk-FHP6LXJS.js +415 -0
- package/dist/{chunk-7LCYLPW2.cjs → chunk-FJPADH77.cjs} +7 -4
- package/dist/{chunk-T36DDXSF.js → chunk-FXKTYFYA.js} +150 -25
- package/dist/chunk-G2LS3RFO.js +623 -0
- package/dist/chunk-GCMWDSBZ.cjs +729 -0
- package/dist/chunk-GJNCFRJU.cjs +125 -0
- package/dist/{chunk-Q4QX3AET.cjs → chunk-GMP623FG.cjs} +16 -13
- package/dist/{chunk-XD6IYDUX.js → chunk-GN3KDX4W.js} +119 -43
- package/dist/{chunk-QLEAOI3Q.cjs → chunk-GQYKQSTC.cjs} +10 -10
- package/dist/chunk-GTU2Z2WW.cjs +262 -0
- package/dist/chunk-GZG4KA4E.js +529 -0
- package/dist/{chunk-BND3ST2K.cjs → chunk-H3MGK7TX.cjs} +42 -32
- package/dist/{chunk-XRKWN5PL.cjs → chunk-H5DZIHJP.cjs} +14 -18
- package/dist/{chunk-Z34RLXRA.cjs → chunk-HANL7K2Q.cjs} +65 -50
- package/dist/{chunk-3SAK5KFL.cjs → chunk-HCCQLAA4.cjs} +2 -11
- package/dist/{chunk-LXJ4667L.cjs → chunk-HGVXZDSK.cjs} +108 -20
- package/dist/{chunk-3FJCK5XA.js → chunk-HRODTEEO.js} +30 -10
- package/dist/{chunk-HQUEA5R6.cjs → chunk-HZCQO4JM.cjs} +6 -6
- package/dist/{chunk-S565K7NK.js → chunk-I2O7TW6B.js} +12 -8
- package/dist/chunk-IHESJZSW.js +4490 -0
- package/dist/{chunk-FSF7EQVA.cjs → chunk-IRWWS72C.cjs} +63 -22
- package/dist/{chunk-5O6TQC6M.cjs → chunk-IVIA7K75.cjs} +689 -127
- package/dist/chunk-IVY74O6C.js +247 -0
- package/dist/chunk-J32ZJZJH.js +554 -0
- package/dist/chunk-J56PTA46.cjs +639 -0
- package/dist/chunk-JD7CIZ33.js +1949 -0
- package/dist/{chunk-T7LEXZUZ.cjs → chunk-JIYN45TV.cjs} +14 -15
- package/dist/{chunk-FFKU7BTK.cjs → chunk-KHPCJRI3.cjs} +24 -21
- package/dist/chunk-KKFZ3B6J.cjs +557 -0
- package/dist/chunk-KPJL34Y7.cjs +186 -0
- package/dist/{chunk-HE7ULERA.cjs → chunk-KQTPCYTG.cjs} +128 -44
- package/dist/{chunk-OFKWH2IP.js → chunk-KX76JUQY.js} +3 -3
- package/dist/{chunk-33LSUQDD.cjs → chunk-L63H3SQ4.cjs} +43 -31
- package/dist/{chunk-K6EKD26I.js → chunk-LAOCQJ2M.js} +64 -8
- package/dist/chunk-LM2VU56C.cjs +37 -0
- package/dist/chunk-M56JSP4A.js +400 -0
- package/dist/chunk-MBOOR7X4.js +18 -0
- package/dist/{chunk-XWPNTWDN.cjs → chunk-MJVIRCUV.cjs} +31 -27
- package/dist/{chunk-SDAMZIRE.js → chunk-MSMIFMBL.js} +135 -18
- package/dist/{chunk-56IF4NTA.js → chunk-MXFUTKCO.js} +18 -18
- package/dist/{chunk-6UEHYZ7V.cjs → chunk-MXJ5SS53.cjs} +447 -31
- package/dist/chunk-MYY4PMWX.cjs +264 -0
- package/dist/chunk-N75IH2HY.js +258 -0
- package/dist/{chunk-GVUR45UF.cjs → chunk-NG77ATEW.cjs} +7 -6
- package/dist/chunk-NW5G5FBQ.js +215 -0
- package/dist/{chunk-E3FWRT3Z.js → chunk-OEFY723R.js} +28 -13
- package/dist/chunk-OEV5RMZO.cjs +3042 -0
- package/dist/{chunk-X4ZF6CNE.cjs → chunk-OIQYIIO3.cjs} +7 -7
- package/dist/{chunk-2CWOLHTE.js → chunk-OL46QLBJ.js} +3 -11
- package/dist/chunk-OPZ7XDDI.js +487 -0
- package/dist/chunk-OSYNRVOV.cjs +243 -0
- package/dist/{chunk-TEWCN33Y.js → chunk-P7YIA5LN.js} +91 -7
- package/dist/chunk-PGANYCAG.cjs +220 -0
- package/dist/{chunk-CS2EMTGF.js → chunk-QAVXL2IH.js} +62 -21
- package/dist/{chunk-T4NKMBDL.js → chunk-QCCBXSCE.js} +1666 -756
- package/dist/{chunk-F4IULT7N.js → chunk-QPOQ7VPI.js} +16 -13
- package/dist/{chunk-6XSERL6L.js → chunk-QTPMJRGS.js} +3108 -2827
- package/dist/{chunk-F3HH56EB.cjs → chunk-QWNQ523V.cjs} +1730 -823
- package/dist/{chunk-R7MA7QWV.js → chunk-R3IVNY6P.js} +102 -23
- package/dist/chunk-R75BSDH7.cjs +50 -0
- package/dist/chunk-RAXUF5DF.cjs +2196 -0
- package/dist/{chunk-BF2235SI.cjs → chunk-RMHC2VG7.cjs} +2876 -2592
- package/dist/chunk-RUXGBKPS.cjs +4517 -0
- package/dist/{chunk-UERJ3YJV.js → chunk-S5IFXW6E.js} +113 -9
- package/dist/{chunk-27LWW5FU.cjs → chunk-S6YWHCKV.cjs} +5 -5
- package/dist/{chunk-WB4Z63GG.js → chunk-SIEXCILW.js} +3 -3
- package/dist/{chunk-CLYEIWA5.cjs → chunk-SLU6UPJI.cjs} +5 -3
- package/dist/{chunk-LZ266PCM.cjs → chunk-T5J7ZKP3.cjs} +446 -60
- package/dist/chunk-TDCNJHWO.js +341 -0
- package/dist/{chunk-IHOUYQIA.js → chunk-TG7O4WBC.js} +5 -5
- package/dist/chunk-THCK6ECW.js +2085 -0
- package/dist/chunk-TJHVSBP2.js +439 -0
- package/dist/chunk-TK74TR4H.js +5541 -0
- package/dist/{chunk-CDPGV4DN.js → chunk-U4NBQJBY.js} +14 -15
- package/dist/{chunk-NOZZ46QU.js → chunk-UD3DSHZM.js} +10 -14
- package/dist/chunk-UDMYRFDZ.js +3038 -0
- package/dist/{chunk-WDW67DZB.cjs → chunk-UOIGFQXC.cjs} +90 -68
- package/dist/{chunk-BU7VWW2K.js → chunk-URG2SJLK.js} +14 -15
- package/dist/{chunk-EQV4R3EV.cjs → chunk-V73NPPTM.cjs} +152 -35
- package/dist/chunk-VECQYRXL.js +474 -0
- package/dist/chunk-VEXPG4WN.js +1989 -0
- package/dist/{chunk-LDP5OK6G.js → chunk-VMLKSV26.js} +5 -5
- package/dist/{chunk-5BGSECRJ.cjs → chunk-VSK7W3O5.cjs} +47 -27
- package/dist/chunk-VVKVQZI6.js +55 -0
- package/dist/{chunk-YQK5JNFK.js → chunk-W55Z7QIX.js} +103 -15
- package/dist/{chunk-KSGXLT74.cjs → chunk-W6P2GBHH.cjs} +3 -3
- package/dist/{chunk-IBDG74G2.cjs → chunk-W6RW64BB.cjs} +7 -7
- package/dist/chunk-WDT3JTGM.cjs +483 -0
- package/dist/{chunk-HPS76H7Q.js → chunk-WKX5AMOY.js} +3 -3
- package/dist/chunk-WNNE3PO3.js +34 -0
- package/dist/{chunk-XG23EUQX.cjs → chunk-WRLUBRKS.cjs} +538 -312
- package/dist/{chunk-IFNQFCTM.js → chunk-WRNEH5MO.js} +79 -8
- package/dist/{chunk-54FHG2MX.js → chunk-WRWEX5ZF.js} +7 -4
- package/dist/{chunk-KCQ5NDYC.cjs → chunk-X3GJPRVK.cjs} +154 -80
- package/dist/{chunk-7AGYRWKW.cjs → chunk-XFXGA5IW.cjs} +126 -22
- package/dist/{chunk-TQSZUOW5.cjs → chunk-XHIV6326.cjs} +4 -4
- package/dist/chunk-XJAN7CZG.cjs +432 -0
- package/dist/chunk-XL6INWKT.js +121 -0
- package/dist/{chunk-E3UALNFA.js → chunk-XMWZG36H.js} +4 -4
- package/dist/{chunk-BKIGPPVM.js → chunk-XSFNHP2E.js} +6 -3
- package/dist/{chunk-H5Z7NASB.js → chunk-XT6JY5W5.js} +25 -3
- package/dist/chunk-XXZJEFKW.cjs +490 -0
- package/dist/chunk-Y3MWXQSB.cjs +5737 -0
- package/dist/chunk-YF2I3MV3.js +46 -0
- package/dist/{chunk-V3NN3HPP.js → chunk-YIMN575O.js} +437 -52
- package/dist/chunk-YIVFJNYV.js +176 -0
- package/dist/{chunk-MD6KDHVE.cjs → chunk-YKGPCZEE.cjs} +10 -10
- package/dist/chunk-YQELFNJV.js +39 -0
- package/dist/chunk-Z5XMPRNC.cjs +5390 -0
- package/dist/{chunk-3FYZOR7S.cjs → chunk-ZDSYWBIE.cjs} +18 -18
- package/dist/{chunk-6TZPZCOJ.cjs → chunk-ZKSS47EV.cjs} +24 -19
- package/dist/chunk-ZUL5AVTX.cjs +1993 -0
- package/dist/chunk-ZXBZVXDW.js +5386 -0
- package/dist/{chunk-DMG7C4H2.js → chunk-ZZ7RO2UQ.js} +312 -44
- package/dist/cli/holoscript-runner.cjs +200 -204
- package/dist/cli/holoscript-runner.js +144 -148
- package/dist/codebase/index.cjs +1 -1
- package/dist/codebase/index.js +1 -1
- package/dist/compiler/agent-inference.cjs +10 -7
- package/dist/compiler/agent-inference.js +6 -3
- package/dist/compiler/android-xr.cjs +12 -7
- package/dist/compiler/android-xr.js +10 -5
- package/dist/compiler/android.cjs +12 -8
- package/dist/compiler/android.js +10 -6
- package/dist/compiler/ar.cjs +9 -6
- package/dist/compiler/ar.js +7 -4
- package/dist/compiler/babylon.cjs +12 -8
- package/dist/compiler/babylon.js +11 -7
- package/dist/compiler/business-quest.cjs +43 -0
- package/dist/compiler/business-quest.js +4 -0
- package/dist/compiler/coco.cjs +1 -1
- package/dist/compiler/coco.js +1 -1
- package/dist/compiler/context.cjs +25 -0
- package/dist/compiler/context.d.ts +28 -0
- package/dist/compiler/context.js +8 -0
- package/dist/compiler/domain-block-utils.cjs +155 -152
- package/dist/compiler/domain-block-utils.js +7 -4
- package/dist/compiler/dtdl.cjs +10 -7
- package/dist/compiler/dtdl.js +7 -4
- package/dist/compiler/gltf-pipeline.cjs +9 -9
- package/dist/compiler/gltf-pipeline.js +2 -2
- package/dist/compiler/godot.cjs +9 -6
- package/dist/compiler/godot.js +8 -5
- package/dist/compiler/incremental.cjs +12 -7
- package/dist/compiler/incremental.js +7 -2
- package/dist/compiler/index.cjs +3550 -268
- package/dist/compiler/index.d.ts +404 -21
- package/dist/compiler/index.js +3280 -138
- package/dist/compiler/ios.cjs +11 -8
- package/dist/compiler/ios.js +9 -6
- package/dist/compiler/llm-provider-capabilities.cjs +25 -0
- package/dist/compiler/llm-provider-capabilities.d.ts +43 -0
- package/dist/compiler/llm-provider-capabilities.js +8 -0
- package/dist/compiler/multi-layer.cjs +14 -10
- package/dist/compiler/multi-layer.js +13 -9
- package/dist/compiler/nodetoy.cjs +5 -5
- package/dist/compiler/nodetoy.js +2 -2
- package/dist/compiler/openxr.cjs +10 -6
- package/dist/compiler/openxr.js +9 -5
- package/dist/compiler/playcanvas.cjs +10 -7
- package/dist/compiler/playcanvas.js +9 -6
- package/dist/compiler/r3f.cjs +17 -13
- package/dist/compiler/r3f.d.ts +22 -0
- package/dist/compiler/r3f.js +12 -8
- package/dist/compiler/remotion.cjs +1 -1
- package/dist/compiler/remotion.js +1 -1
- package/dist/compiler/reproducibility.cjs +1 -1
- package/dist/compiler/reproducibility.js +1 -1
- package/dist/compiler/sdf.cjs +10 -7
- package/dist/compiler/sdf.js +8 -5
- package/dist/compiler/semantic-scene.cjs +1 -1
- package/dist/compiler/semantic-scene.js +1 -1
- package/dist/compiler/state.cjs +9 -5
- package/dist/compiler/state.js +7 -3
- package/dist/compiler/trait-composition.cjs +11 -7
- package/dist/compiler/trait-composition.js +7 -3
- package/dist/compiler/unity.cjs +10 -6
- package/dist/compiler/unity.js +9 -5
- package/dist/compiler/unreal.cjs +11 -7
- package/dist/compiler/unreal.js +9 -5
- package/dist/compiler/urdf.cjs +20 -13
- package/dist/compiler/urdf.js +8 -5
- package/dist/compiler/usd-physics.cjs +10 -7
- package/dist/compiler/usd-physics.js +7 -4
- package/dist/compiler/visionos.cjs +10 -6
- package/dist/compiler/visionos.js +9 -5
- package/dist/compiler/vrchat.cjs +10 -7
- package/dist/compiler/vrchat.js +8 -5
- package/dist/compiler/vrr.cjs +10 -7
- package/dist/compiler/vrr.js +8 -5
- package/dist/compiler/wasm.cjs +13 -10
- package/dist/compiler/wasm.js +8 -5
- package/dist/compiler/webgpu.cjs +9 -6
- package/dist/compiler/webgpu.js +8 -5
- package/dist/constants.d.ts +3 -2
- package/dist/coordinators/index.cjs +1266 -0
- package/dist/coordinators/index.d.ts +260 -0
- package/dist/coordinators/index.js +1259 -0
- package/dist/debugger.cjs +9 -7
- package/dist/debugger.js +7 -5
- package/dist/entries/interop.cjs +23 -21
- package/dist/entries/interop.js +5 -3
- package/dist/entries/scripting.cjs +18 -18
- package/dist/entries/scripting.js +8 -8
- package/dist/hololand/index.cjs +146 -0
- package/dist/hololand/index.d.ts +70 -0
- package/dist/hololand/index.js +5 -0
- package/dist/index.cjs +20332 -18121
- package/dist/index.d.ts +1477 -40
- package/dist/index.js +19451 -17638
- package/dist/math/tropical-spmv.cjs +45 -0
- package/dist/math/tropical-spmv.js +4 -0
- package/dist/math/vec3.cjs +14 -14
- package/dist/math/vec3.js +2 -2
- package/dist/{ml-dsa-PHCWUBPX.cjs → ml-dsa-FSKBTE3W.cjs} +177 -90
- package/dist/{ml-dsa-WYLJHJO6.js → ml-dsa-Z7JDKW4L.js} +158 -71
- package/dist/paper-0c-spike/index.cjs +150 -0
- package/dist/paper-0c-spike/index.d.ts +29 -0
- package/dist/paper-0c-spike/index.js +141 -0
- package/dist/parser.cjs +45 -11
- package/dist/parser.d.ts +11 -0
- package/dist/parser.js +10 -8
- package/dist/{playwright-RL6GY4F7.cjs → playwright-3AT3AKTV.cjs} +1985 -1985
- package/dist/{playwright-5OSAPTNH.js → playwright-VZPDVUEQ.js} +3 -3
- package/dist/reconstruction/index.cjs +153 -0
- package/dist/reconstruction/index.d.ts +105 -0
- package/dist/reconstruction/index.js +8 -0
- package/dist/runtime.cjs +7 -5
- package/dist/runtime.js +6 -4
- package/dist/self-improvement/index.cjs +563 -0
- package/dist/self-improvement/index.js +545 -0
- package/dist/storage/index.cjs +10 -9
- package/dist/storage/index.js +3 -2
- package/dist/testing.cjs +25 -0
- package/dist/testing.d.ts +70 -0
- package/dist/testing.js +4 -0
- package/dist/tools/index.d.ts +22 -1
- package/dist/traitDocs/traitDocs.cjs +33 -0
- package/dist/traitDocs/traitDocs.d.ts +69 -0
- package/dist/traitDocs/traitDocs.js +7 -0
- package/dist/traits/botanical-lotus.cjs +41 -0
- package/dist/traits/botanical-lotus.d.ts +172 -0
- package/dist/traits/botanical-lotus.js +4 -0
- package/dist/traits/engines/index.cjs +520 -0
- package/dist/traits/engines/index.js +380 -0
- package/dist/traits/index.cjs +17630 -7881
- package/dist/traits/index.d.ts +197 -0
- package/dist/traits/index.js +16573 -7193
- package/dist/traits/simulation-solver-factory.cjs +13 -0
- package/dist/traits/simulation-solver-factory.d.ts +23 -0
- package/dist/traits/simulation-solver-factory.js +4 -0
- package/dist/traits/webcam-gaze.cjs +35 -0
- package/dist/traits/webcam-gaze.d.ts +17 -0
- package/dist/traits/webcam-gaze.js +4 -0
- package/dist/type-checker.cjs +6 -5
- package/dist/type-checker.js +4 -3
- package/dist/world/index.cjs +947 -0
- package/dist/world/index.d.ts +147 -0
- package/dist/world/index.js +939 -0
- package/dist/world-model/index.cjs +1446 -0
- package/dist/world-model/index.d.ts +119 -0
- package/dist/world-model/index.js +1414 -0
- package/dist/wot/index.cjs +29 -0
- package/dist/wot/index.js +4 -0
- package/package.json +153 -61
- package/dist/GLTFPipeline-DEN36VNK.js +0 -12
- package/dist/GLTFPipeline-YPCAK236.cjs +0 -33
- package/dist/chunk-4XSNJCLC.cjs +0 -1859
- package/dist/chunk-A7PIMZGU.js +0 -263
- package/dist/chunk-BWFJEM5A.js +0 -5419
- package/dist/chunk-CBJSLA2E.cjs +0 -5423
- package/dist/chunk-K3JDKWGI.cjs +0 -270
- package/dist/chunk-LSW7P7ML.js +0 -3675
- package/dist/chunk-MEASWI2Y.js +0 -126
- package/dist/chunk-NCUKG4SK.cjs +0 -3075
- package/dist/chunk-Q5JT3YML.cjs +0 -129
- package/dist/chunk-QGKNANZ3.js +0 -3071
- package/dist/chunk-S2N5TNMA.js +0 -1855
- package/dist/chunk-TSH3MSQU.cjs +0 -129
- package/dist/chunk-WGMEAYBG.js +0 -126
- package/dist/chunk-X6SEAXAX.cjs +0 -3681
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { __esm, __publicField } from './chunk-
|
|
1
|
+
import { __esm, __publicField } from './chunk-OL46QLBJ.js';
|
|
2
2
|
|
|
3
|
-
// ../../node_modules/.pnpm/@noble+hashes@2.0
|
|
3
|
+
// ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/utils.js
|
|
4
4
|
function isBytes(a) {
|
|
5
|
-
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
5
|
+
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in a && a.BYTES_PER_ELEMENT === 1;
|
|
6
6
|
}
|
|
7
7
|
function anumber(n, title = "") {
|
|
8
|
+
if (typeof n !== "number") {
|
|
9
|
+
const prefix = title && `"${title}" `;
|
|
10
|
+
throw new TypeError(`${prefix}expected number, got ${typeof n}`);
|
|
11
|
+
}
|
|
8
12
|
if (!Number.isSafeInteger(n) || n < 0) {
|
|
9
13
|
const prefix = title && `"${title}" `;
|
|
10
|
-
throw new
|
|
14
|
+
throw new RangeError(`${prefix}expected integer >= 0, got ${n}`);
|
|
11
15
|
}
|
|
12
16
|
}
|
|
13
17
|
function abytes(value, length, title = "") {
|
|
@@ -18,7 +22,10 @@ function abytes(value, length, title = "") {
|
|
|
18
22
|
const prefix = title && `"${title}" `;
|
|
19
23
|
const ofLen = needsLen ? ` of length ${length}` : "";
|
|
20
24
|
const got = bytes ? `length=${len}` : `type=${typeof value}`;
|
|
21
|
-
|
|
25
|
+
const message = prefix + "expected Uint8Array" + ofLen + ", got " + got;
|
|
26
|
+
if (!bytes)
|
|
27
|
+
throw new TypeError(message);
|
|
28
|
+
throw new RangeError(message);
|
|
22
29
|
}
|
|
23
30
|
return value;
|
|
24
31
|
}
|
|
@@ -32,7 +39,7 @@ function aoutput(out, instance) {
|
|
|
32
39
|
abytes(out, void 0, "digestInto() output");
|
|
33
40
|
const min = instance.outputLen;
|
|
34
41
|
if (out.length < min) {
|
|
35
|
-
throw new
|
|
42
|
+
throw new RangeError('"digestInto() output" expected to be of length >=' + min);
|
|
36
43
|
}
|
|
37
44
|
}
|
|
38
45
|
function u32(arr) {
|
|
@@ -72,41 +79,47 @@ function createHasher(hashCons, info = {}) {
|
|
|
72
79
|
const tmp = hashCons(void 0);
|
|
73
80
|
hashC.outputLen = tmp.outputLen;
|
|
74
81
|
hashC.blockLen = tmp.blockLen;
|
|
82
|
+
hashC.canXOF = tmp.canXOF;
|
|
75
83
|
hashC.create = (opts) => hashCons(opts);
|
|
76
84
|
Object.assign(hashC, info);
|
|
77
85
|
return Object.freeze(hashC);
|
|
78
86
|
}
|
|
79
87
|
function randomBytes(bytesLength = 32) {
|
|
88
|
+
anumber(bytesLength, "bytesLength");
|
|
80
89
|
const cr = typeof globalThis === "object" ? globalThis.crypto : null;
|
|
81
90
|
if (typeof cr?.getRandomValues !== "function")
|
|
82
91
|
throw new Error("crypto.getRandomValues must be defined");
|
|
92
|
+
if (bytesLength > 65536)
|
|
93
|
+
throw new RangeError(`"bytesLength" expected <= 65536, got ${bytesLength}`);
|
|
83
94
|
return cr.getRandomValues(new Uint8Array(bytesLength));
|
|
84
95
|
}
|
|
85
96
|
var isLE, swap32IfBE, oidNist;
|
|
86
97
|
var init_utils = __esm({
|
|
87
|
-
"../../node_modules/.pnpm/@noble+hashes@2.0
|
|
98
|
+
"../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/utils.js"() {
|
|
88
99
|
isLE = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
|
|
89
100
|
swap32IfBE = isLE ? (u) => u : byteSwap32;
|
|
90
101
|
oidNist = (suffix) => ({
|
|
102
|
+
// Current NIST hashAlgs suffixes used here fit in one DER subidentifier octet.
|
|
103
|
+
// Larger suffix values would need base-128 OID encoding and a different length byte.
|
|
91
104
|
oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, suffix])
|
|
92
105
|
});
|
|
93
106
|
}
|
|
94
107
|
});
|
|
95
108
|
|
|
96
|
-
// ../../node_modules/.pnpm/@noble+curves@2.0
|
|
109
|
+
// ../../node_modules/.pnpm/@noble+curves@2.2.0/node_modules/@noble/curves/utils.js
|
|
97
110
|
function abool(value, title = "") {
|
|
98
111
|
if (typeof value !== "boolean") {
|
|
99
112
|
const prefix = title && `"${title}" `;
|
|
100
|
-
throw new
|
|
113
|
+
throw new TypeError(prefix + "expected boolean, got type=" + typeof value);
|
|
101
114
|
}
|
|
102
115
|
return value;
|
|
103
116
|
}
|
|
104
117
|
var init_utils2 = __esm({
|
|
105
|
-
"../../node_modules/.pnpm/@noble+curves@2.0
|
|
118
|
+
"../../node_modules/.pnpm/@noble+curves@2.2.0/node_modules/@noble/curves/utils.js"() {
|
|
106
119
|
}
|
|
107
120
|
});
|
|
108
121
|
|
|
109
|
-
// ../../node_modules/.pnpm/@noble+hashes@2.0
|
|
122
|
+
// ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/_u64.js
|
|
110
123
|
function fromBig(n, le = false) {
|
|
111
124
|
if (le)
|
|
112
125
|
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
@@ -124,7 +137,7 @@ function split(lst, le = false) {
|
|
|
124
137
|
}
|
|
125
138
|
var U32_MASK64, _32n, rotlSH, rotlSL, rotlBH, rotlBL;
|
|
126
139
|
var init_u64 = __esm({
|
|
127
|
-
"../../node_modules/.pnpm/@noble+hashes@2.0
|
|
140
|
+
"../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/_u64.js"() {
|
|
128
141
|
U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
129
142
|
_32n = /* @__PURE__ */ BigInt(32);
|
|
130
143
|
rotlSH = (h, l, s) => h << s | l >>> 32 - s;
|
|
@@ -134,8 +147,11 @@ var init_u64 = __esm({
|
|
|
134
147
|
}
|
|
135
148
|
});
|
|
136
149
|
|
|
137
|
-
// ../../node_modules/.pnpm/@noble+hashes@2.0
|
|
150
|
+
// ../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/sha3.js
|
|
138
151
|
function keccakP(s, rounds = 24) {
|
|
152
|
+
anumber(rounds, "rounds");
|
|
153
|
+
if (rounds < 1 || rounds > 24)
|
|
154
|
+
throw new Error('"rounds" expected integer 1..24');
|
|
139
155
|
const B = new Uint32Array(5 * 2);
|
|
140
156
|
for (let round = 24 - rounds; round < 24; round++) {
|
|
141
157
|
for (let x = 0; x < 10; x++)
|
|
@@ -165,10 +181,17 @@ function keccakP(s, rounds = 24) {
|
|
|
165
181
|
s[PI + 1] = Tl;
|
|
166
182
|
}
|
|
167
183
|
for (let y = 0; y < 50; y += 10) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
184
|
+
const b0 = s[y], b1 = s[y + 1], b2 = s[y + 2], b3 = s[y + 3];
|
|
185
|
+
s[y] ^= ~s[y + 2] & s[y + 4];
|
|
186
|
+
s[y + 1] ^= ~s[y + 3] & s[y + 5];
|
|
187
|
+
s[y + 2] ^= ~s[y + 4] & s[y + 6];
|
|
188
|
+
s[y + 3] ^= ~s[y + 5] & s[y + 7];
|
|
189
|
+
s[y + 4] ^= ~s[y + 6] & s[y + 8];
|
|
190
|
+
s[y + 5] ^= ~s[y + 7] & s[y + 9];
|
|
191
|
+
s[y + 6] ^= ~s[y + 8] & b0;
|
|
192
|
+
s[y + 7] ^= ~s[y + 9] & b1;
|
|
193
|
+
s[y + 8] ^= ~b0 & b2;
|
|
194
|
+
s[y + 9] ^= ~b1 & b3;
|
|
172
195
|
}
|
|
173
196
|
s[0] ^= SHA3_IOTA_H[round];
|
|
174
197
|
s[1] ^= SHA3_IOTA_L[round];
|
|
@@ -177,7 +200,7 @@ function keccakP(s, rounds = 24) {
|
|
|
177
200
|
}
|
|
178
201
|
var _0n, _1n, _2n, _7n, _256n, _0x71n, SHA3_PI, SHA3_ROTL, _SHA3_IOTA, IOTAS, SHA3_IOTA_H, SHA3_IOTA_L, rotlH, rotlL, Keccak, genShake, shake128, shake256;
|
|
179
202
|
var init_sha3 = __esm({
|
|
180
|
-
"../../node_modules/.pnpm/@noble+hashes@2.0
|
|
203
|
+
"../../node_modules/.pnpm/@noble+hashes@2.2.0/node_modules/@noble/hashes/sha3.js"() {
|
|
181
204
|
init_u64();
|
|
182
205
|
init_utils();
|
|
183
206
|
_0n = BigInt(0);
|
|
@@ -218,12 +241,14 @@ var init_sha3 = __esm({
|
|
|
218
241
|
__publicField(this, "blockLen");
|
|
219
242
|
__publicField(this, "suffix");
|
|
220
243
|
__publicField(this, "outputLen");
|
|
244
|
+
__publicField(this, "canXOF");
|
|
221
245
|
__publicField(this, "enableXOF", false);
|
|
222
246
|
__publicField(this, "rounds");
|
|
223
247
|
this.blockLen = blockLen;
|
|
224
248
|
this.suffix = suffix;
|
|
225
249
|
this.outputLen = outputLen;
|
|
226
250
|
this.enableXOF = enableXOF;
|
|
251
|
+
this.canXOF = enableXOF;
|
|
227
252
|
this.rounds = rounds;
|
|
228
253
|
anumber(outputLen, "outputLen");
|
|
229
254
|
if (!(0 < blockLen && blockLen < 200))
|
|
@@ -295,12 +320,13 @@ var init_sha3 = __esm({
|
|
|
295
320
|
aoutput(out, this);
|
|
296
321
|
if (this.finished)
|
|
297
322
|
throw new Error("digest() was already called");
|
|
298
|
-
this.writeInto(out);
|
|
323
|
+
this.writeInto(out.subarray(0, this.outputLen));
|
|
299
324
|
this.destroy();
|
|
300
|
-
return out;
|
|
301
325
|
}
|
|
302
326
|
digest() {
|
|
303
|
-
|
|
327
|
+
const out = new Uint8Array(this.outputLen);
|
|
328
|
+
this.digestInto(out);
|
|
329
|
+
return out;
|
|
304
330
|
}
|
|
305
331
|
destroy() {
|
|
306
332
|
this.destroyed = true;
|
|
@@ -309,6 +335,7 @@ var init_sha3 = __esm({
|
|
|
309
335
|
_cloneInto(to) {
|
|
310
336
|
const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
|
|
311
337
|
to || (to = new _Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
|
|
338
|
+
to.blockLen = blockLen;
|
|
312
339
|
to.state32.set(this.state32);
|
|
313
340
|
to.pos = this.pos;
|
|
314
341
|
to.posOut = this.posOut;
|
|
@@ -317,6 +344,7 @@ var init_sha3 = __esm({
|
|
|
317
344
|
to.suffix = suffix;
|
|
318
345
|
to.outputLen = outputLen;
|
|
319
346
|
to.enableXOF = enableXOF;
|
|
347
|
+
to.canXOF = this.canXOF;
|
|
320
348
|
to.destroyed = this.destroyed;
|
|
321
349
|
return to;
|
|
322
350
|
}
|
|
@@ -327,7 +355,7 @@ var init_sha3 = __esm({
|
|
|
327
355
|
}
|
|
328
356
|
});
|
|
329
357
|
|
|
330
|
-
// ../../node_modules/.pnpm/@noble+curves@2.0
|
|
358
|
+
// ../../node_modules/.pnpm/@noble+curves@2.2.0/node_modules/@noble/curves/abstract/fft.js
|
|
331
359
|
function checkU32(n) {
|
|
332
360
|
if (!Number.isSafeInteger(n) || n < 0 || n > 4294967295)
|
|
333
361
|
throw new Error("wrong u32 integer:" + n);
|
|
@@ -339,10 +367,12 @@ function isPowerOfTwo(x) {
|
|
|
339
367
|
}
|
|
340
368
|
function reverseBits(n, bits) {
|
|
341
369
|
checkU32(n);
|
|
370
|
+
if (!Number.isSafeInteger(bits) || bits < 0 || bits > 32)
|
|
371
|
+
throw new Error(`expected integer 0 <= bits <= 32, got ${bits}`);
|
|
342
372
|
let reversed = 0;
|
|
343
373
|
for (let i = 0; i < bits; i++, n >>>= 1)
|
|
344
374
|
reversed = reversed << 1 | n & 1;
|
|
345
|
-
return reversed;
|
|
375
|
+
return reversed >>> 0;
|
|
346
376
|
}
|
|
347
377
|
function log2(n) {
|
|
348
378
|
checkU32(n);
|
|
@@ -350,8 +380,8 @@ function log2(n) {
|
|
|
350
380
|
}
|
|
351
381
|
function bitReversalInplace(values) {
|
|
352
382
|
const n = values.length;
|
|
353
|
-
if (
|
|
354
|
-
throw new Error("
|
|
383
|
+
if (!isPowerOfTwo(n))
|
|
384
|
+
throw new Error("expected positive power-of-two length, got " + n);
|
|
355
385
|
const bits = log2(n);
|
|
356
386
|
for (let i = 0; i < n; i++) {
|
|
357
387
|
const j = reverseBits(i, bits);
|
|
@@ -365,12 +395,14 @@ function bitReversalInplace(values) {
|
|
|
365
395
|
}
|
|
366
396
|
var FFTCore;
|
|
367
397
|
var init_fft = __esm({
|
|
368
|
-
"../../node_modules/.pnpm/@noble+curves@2.0
|
|
398
|
+
"../../node_modules/.pnpm/@noble+curves@2.2.0/node_modules/@noble/curves/abstract/fft.js"() {
|
|
369
399
|
FFTCore = (F2, coreOpts) => {
|
|
370
400
|
const { N: N2, roots, dit, invertButterflies = false, skipStages = 0, brp = true } = coreOpts;
|
|
371
401
|
const bits = log2(N2);
|
|
372
402
|
if (!isPowerOfTwo(N2))
|
|
373
403
|
throw new Error("FFT: Polynomial size should be power of two");
|
|
404
|
+
if (roots.length !== N2)
|
|
405
|
+
throw new Error(`FFT: wrong roots length: expected ${N2}, got ${roots.length}`);
|
|
374
406
|
const isDit = dit !== invertButterflies;
|
|
375
407
|
return (values) => {
|
|
376
408
|
if (values.length !== N2)
|
|
@@ -412,7 +444,7 @@ var init_fft = __esm({
|
|
|
412
444
|
}
|
|
413
445
|
});
|
|
414
446
|
|
|
415
|
-
// ../../node_modules/.pnpm/@noble+post-quantum@0.6.
|
|
447
|
+
// ../../node_modules/.pnpm/@noble+post-quantum@0.6.1/node_modules/@noble/post-quantum/utils.js
|
|
416
448
|
function equalBytes(a, b) {
|
|
417
449
|
if (a.length !== b.length)
|
|
418
450
|
return false;
|
|
@@ -468,7 +500,8 @@ function splitCoder(label, ...lengths) {
|
|
|
468
500
|
};
|
|
469
501
|
}
|
|
470
502
|
function vecCoder(c, vecLen) {
|
|
471
|
-
const
|
|
503
|
+
const coder = c;
|
|
504
|
+
const bytesLen = vecLen * coder.bytesLen;
|
|
472
505
|
return {
|
|
473
506
|
bytesLen,
|
|
474
507
|
encode: (u) => {
|
|
@@ -476,7 +509,7 @@ function vecCoder(c, vecLen) {
|
|
|
476
509
|
throw new RangeError(`vecCoder.encode: wrong length=${u.length}. Expected: ${vecLen}`);
|
|
477
510
|
const res = new Uint8Array(bytesLen);
|
|
478
511
|
for (let i = 0, pos = 0; i < u.length; i++) {
|
|
479
|
-
const b =
|
|
512
|
+
const b = coder.encode(u[i]);
|
|
480
513
|
res.set(b, pos);
|
|
481
514
|
b.fill(0);
|
|
482
515
|
pos += b.length;
|
|
@@ -486,8 +519,8 @@ function vecCoder(c, vecLen) {
|
|
|
486
519
|
decode: (a) => {
|
|
487
520
|
abytes(a, bytesLen);
|
|
488
521
|
const r = [];
|
|
489
|
-
for (let i = 0; i < a.length; i +=
|
|
490
|
-
r.push(
|
|
522
|
+
for (let i = 0; i < a.length; i += coder.bytesLen)
|
|
523
|
+
r.push(coder.decode(a.subarray(i, i + coder.bytesLen)));
|
|
491
524
|
return r;
|
|
492
525
|
}
|
|
493
526
|
};
|
|
@@ -531,7 +564,7 @@ function getMessagePrehash(hash, msg, ctx = EMPTY) {
|
|
|
531
564
|
}
|
|
532
565
|
var abytesDoc, randomBytes2, EMPTY, oidNistP;
|
|
533
566
|
var init_utils3 = __esm({
|
|
534
|
-
"../../node_modules/.pnpm/@noble+post-quantum@0.6.
|
|
567
|
+
"../../node_modules/.pnpm/@noble+post-quantum@0.6.1/node_modules/@noble/post-quantum/utils.js"() {
|
|
535
568
|
init_utils();
|
|
536
569
|
abytesDoc = abytes;
|
|
537
570
|
randomBytes2 = randomBytes;
|
|
@@ -540,10 +573,10 @@ var init_utils3 = __esm({
|
|
|
540
573
|
}
|
|
541
574
|
});
|
|
542
575
|
|
|
543
|
-
// ../../node_modules/.pnpm/@noble+post-quantum@0.6.
|
|
576
|
+
// ../../node_modules/.pnpm/@noble+post-quantum@0.6.1/node_modules/@noble/post-quantum/_crystals.js
|
|
544
577
|
var genCrystals, createXofShake, XOF128, XOF256;
|
|
545
578
|
var init_crystals = __esm({
|
|
546
|
-
"../../node_modules/.pnpm/@noble+post-quantum@0.6.
|
|
579
|
+
"../../node_modules/.pnpm/@noble+post-quantum@0.6.1/node_modules/@noble/post-quantum/_crystals.js"() {
|
|
547
580
|
init_fft();
|
|
548
581
|
init_sha3();
|
|
549
582
|
init_utils3();
|
|
@@ -600,7 +633,8 @@ var init_crystals = __esm({
|
|
|
600
633
|
const bytesLen = d * (N2 / 8);
|
|
601
634
|
return {
|
|
602
635
|
bytesLen,
|
|
603
|
-
encode: (
|
|
636
|
+
encode: (poly_) => {
|
|
637
|
+
const poly = poly_;
|
|
604
638
|
const r = new Uint8Array(bytesLen);
|
|
605
639
|
for (let i = 0, buf = 0, bufLen = 0, pos = 0; i < poly.length; i++) {
|
|
606
640
|
buf |= (c.encode(poly[i]) & mask) << bufLen;
|
|
@@ -622,7 +656,16 @@ var init_crystals = __esm({
|
|
|
622
656
|
}
|
|
623
657
|
};
|
|
624
658
|
};
|
|
625
|
-
return {
|
|
659
|
+
return {
|
|
660
|
+
mod,
|
|
661
|
+
smod,
|
|
662
|
+
nttZetas,
|
|
663
|
+
NTT: {
|
|
664
|
+
encode: (r) => NTT.encode(r),
|
|
665
|
+
decode: (r) => NTT.decode(r)
|
|
666
|
+
},
|
|
667
|
+
bitsCoder
|
|
668
|
+
};
|
|
626
669
|
};
|
|
627
670
|
createXofShake = (shake) => (seed, blockLen) => {
|
|
628
671
|
if (!blockLen)
|
|
@@ -658,13 +701,14 @@ var init_crystals = __esm({
|
|
|
658
701
|
}
|
|
659
702
|
});
|
|
660
703
|
|
|
661
|
-
// ../../node_modules/.pnpm/@noble+post-quantum@0.6.
|
|
704
|
+
// ../../node_modules/.pnpm/@noble+post-quantum@0.6.1/node_modules/@noble/post-quantum/ml-dsa.js
|
|
662
705
|
function validateInternalOpts(opts) {
|
|
663
706
|
validateOpts(opts);
|
|
664
707
|
if (opts.externalMu !== void 0)
|
|
665
708
|
abool(opts.externalMu, "opts.externalMu");
|
|
666
709
|
}
|
|
667
|
-
function RejNTTPoly(
|
|
710
|
+
function RejNTTPoly(xof_) {
|
|
711
|
+
const xof = xof_;
|
|
668
712
|
const r = newPoly(N);
|
|
669
713
|
for (let j = 0; j < N; ) {
|
|
670
714
|
const b = xof();
|
|
@@ -678,7 +722,8 @@ function RejNTTPoly(xof) {
|
|
|
678
722
|
}
|
|
679
723
|
return r;
|
|
680
724
|
}
|
|
681
|
-
function getDilithium(
|
|
725
|
+
function getDilithium(opts_) {
|
|
726
|
+
const opts = opts_;
|
|
682
727
|
const { K, L, GAMMA1, GAMMA2, TAU, ETA, OMEGA } = opts;
|
|
683
728
|
const { CRH_BYTES, TR_BYTES, C_TILDE_BYTES, XOF128: XOF1282, XOF256: XOF2562, securityLevel } = opts;
|
|
684
729
|
if (![2, 4].includes(ETA))
|
|
@@ -716,7 +761,8 @@ function getDilithium(opts) {
|
|
|
716
761
|
};
|
|
717
762
|
const hintCoder = {
|
|
718
763
|
bytesLen: OMEGA + K,
|
|
719
|
-
encode: (
|
|
764
|
+
encode: (h_) => {
|
|
765
|
+
const h = h_;
|
|
720
766
|
if (h === false)
|
|
721
767
|
throw new Error("hint.encode: hint is false");
|
|
722
768
|
const res = new Uint8Array(OMEGA + K);
|
|
@@ -763,7 +809,8 @@ function getDilithium(opts) {
|
|
|
763
809
|
const secretCoder = splitCoder("secretKey", 32, 32, TR_BYTES, vecCoder(ETACoder, L), vecCoder(ETACoder, K), vecCoder(T0Coder, K));
|
|
764
810
|
const sigCoder = splitCoder("signature", C_TILDE_BYTES, vecCoder(ZCoder, L), hintCoder);
|
|
765
811
|
const CoefFromHalfByte = ETA === 2 ? (n) => n < 15 ? 2 - n % 5 : false : (n) => n < 9 ? 4 - n : false;
|
|
766
|
-
function RejBoundedPoly(
|
|
812
|
+
function RejBoundedPoly(xof_) {
|
|
813
|
+
const xof = xof_;
|
|
767
814
|
const r = newPoly(N);
|
|
768
815
|
for (let j = 0; j < N; ) {
|
|
769
816
|
const b = xof();
|
|
@@ -802,7 +849,8 @@ function getDilithium(opts) {
|
|
|
802
849
|
}
|
|
803
850
|
return pre;
|
|
804
851
|
};
|
|
805
|
-
const polyPowerRound = (
|
|
852
|
+
const polyPowerRound = (p_) => {
|
|
853
|
+
const p = p_;
|
|
806
854
|
const res0 = newPoly(N);
|
|
807
855
|
const res1 = newPoly(N);
|
|
808
856
|
for (let i = 0; i < p.length; i++) {
|
|
@@ -812,12 +860,16 @@ function getDilithium(opts) {
|
|
|
812
860
|
}
|
|
813
861
|
return { r0: res0, r1: res1 };
|
|
814
862
|
};
|
|
815
|
-
const polyUseHint = (
|
|
863
|
+
const polyUseHint = (u_, h_) => {
|
|
864
|
+
const u = u_;
|
|
865
|
+
const h = h_;
|
|
816
866
|
for (let i = 0; i < N; i++)
|
|
817
867
|
u[i] = UseHint(h[i], u[i]);
|
|
818
868
|
return u;
|
|
819
869
|
};
|
|
820
|
-
const polyMakeHint = (
|
|
870
|
+
const polyMakeHint = (a_, b_) => {
|
|
871
|
+
const a = a_;
|
|
872
|
+
const b = b_;
|
|
821
873
|
const v = newPoly(N);
|
|
822
874
|
let cnt = 0;
|
|
823
875
|
for (let i = 0; i < N; i++) {
|
|
@@ -829,15 +881,15 @@ function getDilithium(opts) {
|
|
|
829
881
|
};
|
|
830
882
|
const signRandBytes = 32;
|
|
831
883
|
const seedCoder = splitCoder("seed", 32, 64, 32);
|
|
832
|
-
const internal = {
|
|
833
|
-
info: { type: "internal-ml-dsa" },
|
|
834
|
-
lengths: {
|
|
884
|
+
const internal = Object.freeze({
|
|
885
|
+
info: Object.freeze({ type: "internal-ml-dsa" }),
|
|
886
|
+
lengths: Object.freeze({
|
|
835
887
|
secretKey: secretCoder.bytesLen,
|
|
836
888
|
publicKey: publicCoder.bytesLen,
|
|
837
889
|
seed: 32,
|
|
838
890
|
signature: sigCoder.bytesLen,
|
|
839
891
|
signRand: signRandBytes
|
|
840
|
-
},
|
|
892
|
+
}),
|
|
841
893
|
keygen: (seed) => {
|
|
842
894
|
const seedDst = new Uint8Array(32 + 2);
|
|
843
895
|
const randSeed = seed === void 0;
|
|
@@ -879,7 +931,10 @@ function getDilithium(opts) {
|
|
|
879
931
|
xof.clean();
|
|
880
932
|
xofPrime.clean();
|
|
881
933
|
cleanBytes(rho, rhoPrime, K_, s1, s2, s1Hat, t, t0, t1, tr, seedDst);
|
|
882
|
-
return {
|
|
934
|
+
return {
|
|
935
|
+
publicKey,
|
|
936
|
+
secretKey
|
|
937
|
+
};
|
|
883
938
|
},
|
|
884
939
|
getPublicKey: (secretKey) => {
|
|
885
940
|
const [rho, _K, _tr, s1, s2, _t0] = secretCoder.decode(secretKey);
|
|
@@ -1026,9 +1081,9 @@ function getDilithium(opts) {
|
|
|
1026
1081
|
return false;
|
|
1027
1082
|
return equalBytes(cTilde, c2);
|
|
1028
1083
|
}
|
|
1029
|
-
};
|
|
1030
|
-
return {
|
|
1031
|
-
info: { type: "ml-dsa" },
|
|
1084
|
+
});
|
|
1085
|
+
return Object.freeze({
|
|
1086
|
+
info: Object.freeze({ type: "ml-dsa" }),
|
|
1032
1087
|
internal,
|
|
1033
1088
|
securityLevel,
|
|
1034
1089
|
keygen: internal.keygen,
|
|
@@ -1047,8 +1102,8 @@ function getDilithium(opts) {
|
|
|
1047
1102
|
},
|
|
1048
1103
|
prehash: (hash) => {
|
|
1049
1104
|
checkHash(hash, securityLevel);
|
|
1050
|
-
return {
|
|
1051
|
-
info: { type: "hashml-dsa" },
|
|
1105
|
+
return Object.freeze({
|
|
1106
|
+
info: Object.freeze({ type: "hashml-dsa" }),
|
|
1052
1107
|
securityLevel,
|
|
1053
1108
|
lengths: internal.lengths,
|
|
1054
1109
|
keygen: internal.keygen,
|
|
@@ -1064,13 +1119,13 @@ function getDilithium(opts) {
|
|
|
1064
1119
|
validateVerOpts(opts2);
|
|
1065
1120
|
return internal.verify(sig, getMessagePrehash(hash, msg, opts2.context), publicKey);
|
|
1066
1121
|
}
|
|
1067
|
-
};
|
|
1122
|
+
});
|
|
1068
1123
|
}
|
|
1069
|
-
};
|
|
1124
|
+
});
|
|
1070
1125
|
}
|
|
1071
1126
|
var N, Q, ROOT_OF_UNITY, F, D, GAMMA2_1, GAMMA2_2, PARAMS, newPoly, crystals, id, polyCoder, polyAdd, polySub, polyShiftl, polyChknorm, MultiplyNTTs, ml_dsa44, ml_dsa65, ml_dsa87;
|
|
1072
1127
|
var init_ml_dsa = __esm({
|
|
1073
|
-
"../../node_modules/.pnpm/@noble+post-quantum@0.6.
|
|
1128
|
+
"../../node_modules/.pnpm/@noble+post-quantum@0.6.1/node_modules/@noble/post-quantum/ml-dsa.js"() {
|
|
1074
1129
|
init_utils2();
|
|
1075
1130
|
init_sha3();
|
|
1076
1131
|
init_crystals();
|
|
@@ -1082,10 +1137,37 @@ var init_ml_dsa = __esm({
|
|
|
1082
1137
|
D = 13;
|
|
1083
1138
|
GAMMA2_1 = Math.floor((Q - 1) / 88) | 0;
|
|
1084
1139
|
GAMMA2_2 = Math.floor((Q - 1) / 32) | 0;
|
|
1085
|
-
PARAMS = /* @__PURE__ */ (() => ({
|
|
1086
|
-
2: {
|
|
1087
|
-
|
|
1088
|
-
|
|
1140
|
+
PARAMS = /* @__PURE__ */ (() => Object.freeze({
|
|
1141
|
+
2: Object.freeze({
|
|
1142
|
+
K: 4,
|
|
1143
|
+
L: 4,
|
|
1144
|
+
D,
|
|
1145
|
+
GAMMA1: 2 ** 17,
|
|
1146
|
+
GAMMA2: GAMMA2_1,
|
|
1147
|
+
TAU: 39,
|
|
1148
|
+
ETA: 2,
|
|
1149
|
+
OMEGA: 80
|
|
1150
|
+
}),
|
|
1151
|
+
3: Object.freeze({
|
|
1152
|
+
K: 6,
|
|
1153
|
+
L: 5,
|
|
1154
|
+
D,
|
|
1155
|
+
GAMMA1: 2 ** 19,
|
|
1156
|
+
GAMMA2: GAMMA2_2,
|
|
1157
|
+
TAU: 49,
|
|
1158
|
+
ETA: 4,
|
|
1159
|
+
OMEGA: 55
|
|
1160
|
+
}),
|
|
1161
|
+
5: Object.freeze({
|
|
1162
|
+
K: 8,
|
|
1163
|
+
L: 7,
|
|
1164
|
+
D,
|
|
1165
|
+
GAMMA1: 2 ** 19,
|
|
1166
|
+
GAMMA2: GAMMA2_2,
|
|
1167
|
+
TAU: 60,
|
|
1168
|
+
ETA: 2,
|
|
1169
|
+
OMEGA: 75
|
|
1170
|
+
})
|
|
1089
1171
|
}))();
|
|
1090
1172
|
newPoly = (n) => new Int32Array(n);
|
|
1091
1173
|
crystals = /* @__PURE__ */ genCrystals({
|
|
@@ -1102,28 +1184,36 @@ var init_ml_dsa = __esm({
|
|
|
1102
1184
|
encode: (i) => compress(verify(i)),
|
|
1103
1185
|
decode: (i) => verify(compress(i))
|
|
1104
1186
|
});
|
|
1105
|
-
polyAdd = (
|
|
1187
|
+
polyAdd = (a_, b_) => {
|
|
1188
|
+
const a = a_;
|
|
1189
|
+
const b = b_;
|
|
1106
1190
|
for (let i = 0; i < a.length; i++)
|
|
1107
1191
|
a[i] = crystals.mod(a[i] + b[i]);
|
|
1108
1192
|
return a;
|
|
1109
1193
|
};
|
|
1110
|
-
polySub = (
|
|
1194
|
+
polySub = (a_, b_) => {
|
|
1195
|
+
const a = a_;
|
|
1196
|
+
const b = b_;
|
|
1111
1197
|
for (let i = 0; i < a.length; i++)
|
|
1112
1198
|
a[i] = crystals.mod(a[i] - b[i]);
|
|
1113
1199
|
return a;
|
|
1114
1200
|
};
|
|
1115
|
-
polyShiftl = (
|
|
1201
|
+
polyShiftl = (p_) => {
|
|
1202
|
+
const p = p_;
|
|
1116
1203
|
for (let i = 0; i < N; i++)
|
|
1117
1204
|
p[i] <<= D;
|
|
1118
1205
|
return p;
|
|
1119
1206
|
};
|
|
1120
|
-
polyChknorm = (
|
|
1207
|
+
polyChknorm = (p_, B) => {
|
|
1208
|
+
const p = p_;
|
|
1121
1209
|
for (let i = 0; i < N; i++)
|
|
1122
1210
|
if (Math.abs(crystals.smod(p[i])) >= B)
|
|
1123
1211
|
return true;
|
|
1124
1212
|
return false;
|
|
1125
1213
|
};
|
|
1126
|
-
MultiplyNTTs = (
|
|
1214
|
+
MultiplyNTTs = (a_, b_) => {
|
|
1215
|
+
const a = a_;
|
|
1216
|
+
const b = b_;
|
|
1127
1217
|
const c = newPoly(N);
|
|
1128
1218
|
for (let i = 0; i < a.length; i++)
|
|
1129
1219
|
c[i] = crystals.mod(a[i] * b[i]);
|
|
@@ -1161,9 +1251,6 @@ var init_ml_dsa = __esm({
|
|
|
1161
1251
|
init_ml_dsa();
|
|
1162
1252
|
/*! Bundled license information:
|
|
1163
1253
|
|
|
1164
|
-
@noble/hashes/utils.js:
|
|
1165
|
-
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
1166
|
-
|
|
1167
1254
|
@noble/curves/utils.js:
|
|
1168
1255
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
1169
1256
|
|
|
@@ -1174,5 +1261,5 @@ init_ml_dsa();
|
|
|
1174
1261
|
*/
|
|
1175
1262
|
|
|
1176
1263
|
export { PARAMS, ml_dsa44, ml_dsa65, ml_dsa87 };
|
|
1177
|
-
//# sourceMappingURL=ml-dsa-
|
|
1178
|
-
//# sourceMappingURL=ml-dsa-
|
|
1264
|
+
//# sourceMappingURL=ml-dsa-Z7JDKW4L.js.map
|
|
1265
|
+
//# sourceMappingURL=ml-dsa-Z7JDKW4L.js.map
|