@volter/game-editor 0.5.125 → 0.5.126
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/BUNDLED_NOTICES +45 -45
- package/catalog/entries/blender.json +2 -2
- package/catalog/entries/music.json +2 -2
- package/dist/.vite/manifest.json +2280 -2279
- package/dist/assets/{AssetBudgetPanel-BSgP_Ly5.js → AssetBudgetPanel-Dw0mwjRj.js} +3 -3
- package/dist/assets/{AudioViewer-B88kBiQH.js → AudioViewer-g6DZTip3.js} +1 -1
- package/dist/assets/{CanvasBoardDocument-BmyDdzzT.js → CanvasBoardDocument-CYfvZZhs.js} +1 -1
- package/dist/assets/{CanvasSceneViewport-DN9DYpjz.js → CanvasSceneViewport-_ujBC0Hb.js} +1 -1
- package/dist/assets/{ColorInput-D6i_QXM-.js → ColorInput-Dbt7qyP_.js} +1 -1
- package/dist/assets/{ColorPicker-VBKN9sk0.js → ColorPicker-BQqtP05Z.js} +1 -1
- package/dist/assets/{EntityModelDocument-Bbp4eSk-.js → EntityModelDocument-Bd5HLKGv.js} +1 -1
- package/dist/assets/{EnvironmentAssetDocument-CHl6PCV6.js → EnvironmentAssetDocument-CbN5978S.js} +1 -1
- package/dist/assets/{Fbo-BwAOPGSM.js → Fbo-Biv6Lrhl.js} +1 -1
- package/dist/assets/{GameplaySessionTimeline-DSCmUHiz.js → GameplaySessionTimeline-CYTcpGtI.js} +1 -1
- package/dist/assets/{Gltf-GjdUJfpn.js → Gltf-CRUmmFxv.js} +1 -1
- package/dist/assets/{ImageViewer-RDOE-ikb.js → ImageViewer-ZP-vqYrn.js} +1 -1
- package/dist/assets/InspectorObjectPreview-C9LL7i9-.js +1 -0
- package/dist/assets/{JsonAssetDocument-y-ihqubn.js → JsonAssetDocument-mYrrRpaO.js} +1 -1
- package/dist/assets/{LiveModuleDocument-BRKWZS4J.js → LiveModuleDocument-cKhhscAn.js} +1 -1
- package/dist/assets/{LutAssetDocument-D6redjUn.js → LutAssetDocument-D8NoS7X3.js} +1 -1
- package/dist/assets/{ModelAssetDocument-DXcUg5-F.js → ModelAssetDocument-D1DSC4Iu.js} +1 -1
- package/dist/assets/{NonThreeAuthoringBootstrap-CpZS3Gow.js → NonThreeAuthoringBootstrap-B16sst3N.js} +1 -1
- package/dist/assets/{Object3DDocumentToolbar-C7g33hHW.js → Object3DDocumentToolbar-HpLpBnxB.js} +1 -1
- package/dist/assets/Object3DDocumentViewport-Dutf8dw1.js +2 -0
- package/dist/assets/{Object3DPreview-CWZeky9X.js → Object3DPreview-BDcnPwtN.js} +1 -1
- package/dist/assets/{OnlineAssetDetail-Wm_N9tmK.js → OnlineAssetDetail-CmsuIyHO.js} +1 -1
- package/dist/assets/{OrbitControls-DqeA2OK1.js → OrbitControls-C6LQ4Pxi.js} +1 -1
- package/dist/assets/{OrthographicCamera-QGDXU8-_.js → OrthographicCamera-Bv8_A2mi.js} +1 -1
- package/dist/assets/{PerspectiveCamera-CzyDwUe8.js → PerspectiveCamera-D3r6Hnc8.js} +1 -1
- package/dist/assets/{PlayBar-BSCkbbWm.js → PlayBar-B-wzdW50.js} +1 -1
- package/dist/assets/{QuarksAssetDocument-C2d8g6QR.js → QuarksAssetDocument-BdQ1jC4o.js} +1 -1
- package/dist/assets/{ReactCanvasControls-DZZEWbJH.js → ReactCanvasControls-ktCc-GId.js} +1 -1
- package/dist/assets/{RootSelectionOverlay-BlDdfAyN.js → RootSelectionOverlay-FbwqJC6K.js} +1 -1
- package/dist/assets/{ShaderAssetDocument-BMIhoIDU.js → ShaderAssetDocument-BhlIcpVE.js} +1 -1
- package/dist/assets/{ShadowEditor-DJfc5awF.js → ShadowEditor-B7VnLK5D.js} +1 -1
- package/dist/assets/{SourceAssetViewer-CSS85AGm.js → SourceAssetViewer-CIy0LlGq.js} +1 -1
- package/dist/assets/{StageHost-BHQB10fP.js → StageHost-BnK5_8Ju.js} +2 -2
- package/dist/assets/{StoryPreviewMount-DtOeByMH.js → StoryPreviewMount-BT3EF_bY.js} +1 -1
- package/dist/assets/{ThreeBoardDocument-CU7hSmxx.js → ThreeBoardDocument-C6MAwwMT.js} +2 -2
- package/dist/assets/{ThreeIsolationSceneContent-CZFEUx5D.js → ThreeIsolationSceneContent-Jb-BiqBy.js} +1 -1
- package/dist/assets/{ToolObject3DPreview-BZ-bqJjM.js → ToolObject3DPreview-CWoW5Ykt.js} +1 -1
- package/dist/assets/{Toolbar-bpjNJw1o.js → Toolbar-DQehpz2z.js} +1 -1
- package/dist/assets/{TransientHint-Cs1xJsTR.js → TransientHint-I9gc0jbe.js} +1 -1
- package/dist/assets/{VideoViewer-DNcS3fPO.js → VideoViewer-DnhtA-uQ.js} +1 -1
- package/dist/assets/{ViewportShadingMenu-BGdf_ugP.js → ViewportShadingMenu-DhHBsvZ2.js} +1 -1
- package/dist/assets/{active-ingest-Ddr-rqpl.js → active-ingest-BX03j5HF.js} +2 -2
- package/dist/assets/{animation-clock-BBk2Uf4j.js → animation-clock-B_14wv8o.js} +1 -1
- package/dist/assets/{animation-mixers.service-q4aIDhxx.js → animation-mixers.service-YA_zc7aC.js} +1 -1
- package/dist/assets/{animation-timeline.utility-D6rFf4EX.js → animation-timeline.utility-BaheZJ4K.js} +1 -1
- package/dist/assets/{asset-budget-asset.menu-DEuaaKC5.js → asset-budget-asset.menu-7kNgi_NN.js} +1 -1
- package/dist/assets/{asset-budget.action-v70qmoCd.js → asset-budget.action-CHnj-0Hk.js} +1 -1
- package/dist/assets/{asset-budget.document-BeuS8SRM.js → asset-budget.document-BX2-n5L5.js} +1 -1
- package/dist/assets/{asset-budget.menu-bK7bDVj7.js → asset-budget.menu-5kkY86aK.js} +1 -1
- package/dist/assets/{asset-editor-persistence-C8kiK_is.js → asset-editor-persistence-Bd6-j3nh.js} +1 -1
- package/dist/assets/{asset-loaders-CZ_1eTic.js → asset-loaders-BX593_Lm.js} +1 -1
- package/dist/assets/{asset-preview-Cck2dsj4.js → asset-preview-BRUzjkTl.js} +1 -1
- package/dist/assets/{audio-unlock.service-DzW-k8nv.js → audio-unlock.service-DUHq3Djy.js} +1 -1
- package/dist/assets/{audio.utility-CZfoTgEQ.js → audio.utility-NVAVahkr.js} +1 -1
- package/dist/assets/autoplay.service-DFxFVLHJ.js +1 -0
- package/dist/assets/{babylon-authoring-adapter-B1-f9m-3.js → babylon-authoring-adapter-DPAz8ZAn.js} +1 -1
- package/dist/assets/binding-resolver-rLWZKbdA.js +2 -0
- package/dist/assets/{blender-node-editor.document-gGXQ4eC4.js → blender-node-editor.document-AOzDk-zF.js} +1 -1
- package/dist/assets/{blender-properties-tab-_2HlBre8.js → blender-properties-tab-htkOP2E1.js} +1 -1
- package/dist/assets/{blender-runtime-host-B3OHRnyq.js → blender-runtime-host-Djtuf_84.js} +1 -1
- package/dist/assets/{blender-runtime-skin-V9L1oa_d.js → blender-runtime-skin-DAOfR9wP.js} +1 -1
- package/dist/assets/{blender-runtime.document-YfVgb0xw.js → blender-runtime.document-CLPXAqOY.js} +1 -1
- package/dist/assets/{blender-screenshot.menu-DJW5wTB1.js → blender-screenshot.menu-D-Wh9nrx.js} +1 -1
- package/dist/assets/{blender-timeline.document-nci9H4b6.js → blender-timeline.document-D92ZF7GS.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-hAy3fFV_.js → blender-uv-editor.document-RIzCN8r6.js} +1 -1
- package/dist/assets/{blender-version.status-IBwLAxXR.js → blender-version.status-DHM5-hy2.js} +1 -1
- package/dist/assets/{blender.command-B_7KUtv7.js → blender.command-BrxSr8fh.js} +1 -1
- package/dist/assets/{board-guides-CLF_VLvL.js → board-guides-DM_vAo0C.js} +1 -1
- package/dist/assets/{bridge.command-DgsgKZa4.js → bridge.command-Cf8O6nG3.js} +3 -3
- package/dist/assets/{browserAll-DnBssp_8.js → browserAll-Bk80CK14.js} +1 -1
- package/dist/assets/{build-player.document-ue8n3WPX.js → build-player.document-jcpog-l6.js} +1 -1
- package/dist/assets/{build-profiles.document-BoxCYqFz.js → build-profiles.document-DOJRDJTc.js} +1 -1
- package/dist/assets/{build-progress.status-DIVFq_Wm.js → build-progress.status-DIseL3Fj.js} +1 -1
- package/dist/assets/{build-session-LR4kIgAX.js → build-session-DZ4UD5Tu.js} +1 -1
- package/dist/assets/{build.action-B1Tw-IoK.js → build.action-DlevnO2E.js} +1 -1
- package/dist/assets/{build.command-CtmztNo9.js → build.command-BDNgR4X1.js} +1 -1
- package/dist/assets/{build.header-DDLkcelu.js → build.header-CwUIPMW3.js} +1 -1
- package/dist/assets/{build.menu-BAwLd2ek.js → build.menu-Cdi2l3SN.js} +1 -1
- package/dist/assets/{build.service-B-FnDXxN.js → build.service-xdhMVVqg.js} +1 -1
- package/dist/assets/{camera-DuP48tI_.js → camera-GR-fO2IE.js} +1 -1
- package/dist/assets/{camera-runtime.inspector-CziDqZQb.js → camera-runtime.inspector-RPVKn6vT.js} +1 -1
- package/dist/assets/{canvas-design-mount-BABOs-lh.js → canvas-design-mount-B3FNDE7x.js} +3 -3
- package/dist/assets/{canvas-entry-runtime-Dcf218s2.js → canvas-entry-runtime-Cux0NSyO.js} +2 -2
- package/dist/assets/{canvas-preview-frames-DNGxYzHV.js → canvas-preview-frames-CmraLAxc.js} +1 -1
- package/dist/assets/{canvas-story-capture.service-BJpDDwVH.js → canvas-story-capture.service-5ZvfS8si.js} +2 -2
- package/dist/assets/{capability-coverage-6PwUP4oX.js → capability-coverage-9jbjkC7w.js} +1 -1
- package/dist/assets/{collaboration-presence-BNBw47jA.js → collaboration-presence-CTV15flX.js} +1 -1
- package/dist/assets/{collider-DAF9Z2X4.js → collider-Di0qr3hq.js} +1 -1
- package/dist/assets/{component-board.service-khBXmwDQ.js → component-board.service-CEq7FpJ7.js} +2 -2
- package/dist/assets/{component-board.service-ihMRMzy3.js → component-board.service-CbNgdTIL.js} +2 -2
- package/dist/assets/{component-board.service-Dv4HPrwH.js → component-board.service-CkPxbdFE.js} +2 -2
- package/dist/assets/{component-contracts.service-CwplNZn-.js → component-contracts.service-BLE-me7t.js} +1 -1
- package/dist/assets/{component-instance-root-9er-zSAY.js → component-instance-root-6vlZ9amU.js} +1 -1
- package/dist/assets/{component-verbs.command-z-I0Ro4a.js → component-verbs.command-DJ9tpbm_.js} +1 -1
- package/dist/assets/{component-verbs.service-DwLwoLTJ.js → component-verbs.service-DOO6ltFy.js} +1 -1
- package/dist/assets/{config-DQzlvYVI.js → config-SpOmE1ZF.js} +2 -2
- package/dist/assets/{configurations-oKsIhTb-.js → configurations-v9B1hzPx.js} +1 -1
- package/dist/assets/{connection.status-BqYA7Z5e.js → connection.status-D273cCfw.js} +1 -1
- package/dist/assets/{constraints.inspector-CVyV22tC.js → constraints.inspector-CTDm_yw6.js} +1 -1
- package/dist/assets/{content-bounds-DuSmUtY1.js → content-bounds-SMMmDnR9.js} +1 -1
- package/dist/assets/{contract-system-adapters-C66CNkAk.js → contract-system-adapters-Dx3-ZI4N.js} +1 -1
- package/dist/assets/{coverage.service-DwFCo4w8.js → coverage.service-QEYdDNJf.js} +1 -1
- package/dist/assets/{create-runtime-B2p75b5q.js → create-runtime-S5Je5FVD.js} +1 -1
- package/dist/assets/{curve-Dw4divzX.js → curve-Dna3Q4Rl.js} +1 -1
- package/dist/assets/{data-asset-BSxK3Y_h.js → data-asset-Do7MzBwx.js} +1 -1
- package/dist/assets/{data-ref-BUs2PbaF.js → data-ref-Dbulgqez.js} +1 -1
- package/dist/assets/{debug-bridge-BdoOc1Jv.js → debug-bridge-B1HF0efX.js} +1 -1
- package/dist/assets/{debug-registry-BosYnV_Z.js → debug-registry-CurxbdJb.js} +1 -1
- package/dist/assets/{deferred-ingest-play-BOUu0VgE.js → deferred-ingest-play-04UYeDFI.js} +2 -2
- package/dist/assets/{design-time-canvas-mount-Ds-zq4CU.js → design-time-canvas-mount-CcBiI7BU.js} +2 -2
- package/dist/assets/{design-time-layers-B0DteFiV.js → design-time-layers-DHbs4Bar.js} +1 -1
- package/dist/assets/{design-time-mount.service-CfOBd_-9.js → design-time-mount.service-BTJtrJB4.js} +2 -2
- package/dist/assets/{design-time-mount.service-CrQoKi6N.js → design-time-mount.service-DxQYWBtW.js} +2 -2
- package/dist/assets/{design-time-react-mount-B6BJiTeO.js → design-time-react-mount-CaMPhDB5.js} +1 -1
- package/dist/assets/{document-preview-three-4FxFY9Cx.js → document-preview-three-BE-UtLOm.js} +1 -1
- package/dist/assets/{dom-authoring-adapter-vourOD4d.js → dom-authoring-adapter-BCJi5KPk.js} +1 -1
- package/dist/assets/{draco3d-Bk4s3p1H.js → draco3d-D-9gDYvZ.js} +1 -1
- package/dist/assets/{edit-mode-audio.service-DRpU_FFF.js → edit-mode-audio.service-aYQF0kbI.js} +1 -1
- package/dist/assets/{edit-mode-authoring-z2Uu4CrX.js → edit-mode-authoring-Bm31X1cT.js} +1 -1
- package/dist/assets/{edit-mode-networking.service-DhwnIn2o.js → edit-mode-networking.service-DII_DaVN.js} +1 -1
- package/dist/assets/{editor-api-hojxsk8T.js → editor-api-Dae4rOeq.js} +1 -1
- package/dist/assets/{editor-layers-CSl6S15k.js → editor-layers-DvKAawE7.js} +1 -1
- package/dist/assets/{editor-shell-store-DTfKHHYD.js → editor-shell-store-sESsCCic.js} +1 -1
- package/dist/assets/{entity-object-BO1_Qmt8.js → entity-object-CR7fCzb1.js} +1 -1
- package/dist/assets/{events-156d8d12.esm-CYeuVCYr.js → events-156d8d12.esm-DmeaOP4r.js} +1 -1
- package/dist/assets/{extend-BedwRP5_.js → extend-BeHPp0pO.js} +1 -1
- package/dist/assets/{fork-menu-BWmJjb_A.js → fork-menu-BLV4klro.js} +1 -1
- package/dist/assets/{frame-debugger-store-Gu32HGGD.js → frame-debugger-store-CzfMAFm8.js} +1 -1
- package/dist/assets/{game-contract-seams-DQGwjObL.js → game-contract-seams-FFGgxMOq.js} +1 -1
- package/dist/assets/{game-css-scope-transform-DYa5L1dk.js → game-css-scope-transform-CpH5gRrU.js} +1 -1
- package/dist/assets/{game-document.service-CG1egqq7.js → game-document.service-BaWJoY3b.js} +1 -1
- package/dist/assets/{game-eval.command-D9LYcy3m.js → game-eval.command-DimBNXZh.js} +1 -1
- package/dist/assets/{game-module-access-DfYSoZjk.js → game-module-access-INT7uWVq.js} +1 -1
- package/dist/assets/{game-network-BZdvwJ0a.js → game-network-D6iKU3Wc.js} +3 -3
- package/dist/assets/{gameplay-export-BVH9PKaE.js → gameplay-export-CA8Cj_Ya.js} +1 -1
- package/dist/assets/{gameplay-replay-BLLppt8C.js → gameplay-replay-BaOK1PHn.js} +1 -1
- package/dist/assets/{gameplay.command-Djp-Aok2.js → gameplay.command-CNZVmVoY.js} +1 -1
- package/dist/assets/{generation-jobs-CsXRg1Tq.js → generation-jobs-CrR2awmo.js} +1 -1
- package/dist/assets/{generation.service-Cn7nGBEo.js → generation.service-DYXXqp6a.js} +1 -1
- package/dist/assets/{generations-BqPU1fPO.js → generations-BmTovCQz.js} +1 -1
- package/dist/assets/{generations.status-CJUE5vVY.js → generations.status-CPANXPOQ.js} +1 -1
- package/dist/assets/{hierarchy-marks-B4XzZe8e.js → hierarchy-marks-QDNP7a91.js} +1 -1
- package/dist/assets/{hosted-asset-materialization-iHAqPmZ-.js → hosted-asset-materialization-DAbhyLRe.js} +1 -1
- package/dist/assets/{index-CvVYuIWr.js → index-2lrANwoO.js} +1 -1
- package/dist/assets/{index-C9f8SWpp.js → index-B3jjiaMn.js} +1 -1
- package/dist/assets/{index-CRj7mn0r.js → index-BMYvLvi0.js} +1 -1
- package/dist/assets/{index-C1mcZ_qc.js → index-BStQTwLR.js} +2 -2
- package/dist/assets/{index-By0elT7x.js → index-BTQxFFqF.js} +1 -1
- package/dist/assets/{index-r-FuctN5.js → index-C7p_QQ7P.js} +7 -7
- package/dist/assets/{index-X7FPqr0y.js → index-DSGUQ614.js} +1 -1
- package/dist/assets/{index-COorqncb.js → index-DTBK2UM6.js} +1 -1
- package/dist/assets/{index-F91ICQ72.js → index-DWoS4rs9.js} +1 -1
- package/dist/assets/index-DzuOGwVB.js +1 -0
- package/dist/assets/{inference-diagnostics-D4Iu86es.js → inference-diagnostics-C6_Z4_8a.js} +1 -1
- package/dist/assets/{ingest-boot-viewport-DdHb1LeO.js → ingest-boot-viewport-V0jgUOLv.js} +1 -1
- package/dist/assets/{ingest-siblings-Cf-McyY_.js → ingest-siblings-CilJDzwT.js} +1 -1
- package/dist/assets/{ingest-source-persistence-BwINDLYc.js → ingest-source-persistence-CsqPDVx6.js} +1 -1
- package/dist/assets/{ingest.service-B8hV6YT4.js → ingest.service-2Lk_9rjD.js} +1 -1
- package/dist/assets/{inspect-sYciyXgK.js → inspect-B4sqdFaU.js} +1 -1
- package/dist/assets/instances.command-mIr5Ujz9.js +1 -0
- package/dist/assets/{json-history-resource-DuT7scib.js → json-history-resource-QtpzKzwO.js} +1 -1
- package/dist/assets/{layered-pick-1v6rbWkT.js → layered-pick-BDMgzWjy.js} +1 -1
- package/dist/assets/{light-B3S378yT.js → light-18unOAF2.js} +1 -1
- package/dist/assets/{live-project-verbs-BnaccVli.js → live-project-verbs-CgDrfITj.js} +1 -1
- package/dist/assets/{machine.document-BG1voYon.js → machine.document-zxyIZAJ0.js} +1 -1
- package/dist/assets/{machines.finder-G0u80stL.js → machines.finder-DIvktqio.js} +1 -1
- package/dist/assets/{material-BCw5pv20.js → material-D8WYnLCY.js} +1 -1
- package/dist/assets/{material-factory-zynl18MK.js → material-factory-4rh5Wqux.js} +1 -1
- package/dist/assets/{mesh-q9baasmD.js → mesh-_D58fKg5.js} +1 -1
- package/dist/assets/{model-asset-sections.service-DL_H2GfH.js → model-asset-sections.service--50j12QT.js} +1 -1
- package/dist/assets/{model-inspection-BbRgz6bo.js → model-inspection-CJLzpxRV.js} +1 -1
- package/dist/assets/{model-thumbnail-DSDxaYgd.js → model-thumbnail-Cj3_XSnl.js} +1 -1
- package/dist/assets/{models.finder-Dy-J43qR.js → models.finder-BrngxQWo.js} +1 -1
- package/dist/assets/{module-mode-DNU-E0nG.js → module-mode-DPX0apH8.js} +2 -2
- package/dist/assets/{mount-canvas-ingest-root-CQ4W-gUR.js → mount-canvas-ingest-root-BgMvNvBB.js} +2 -2
- package/dist/assets/{mount-dom-ingest-root-COjIeP_R.js → mount-dom-ingest-root-DjdlRVDm.js} +2 -2
- package/dist/assets/{mount-ingest-root-CWdNrIZI.js → mount-ingest-root-CjOWFsbq.js} +2 -2
- package/dist/assets/{mount-manifest-qdcv5b_0.js → mount-manifest-BKLx3Qv1.js} +1 -1
- package/dist/assets/{mount-three-ingest-root-DztDwD1p.js → mount-three-ingest-root-CpEBMdDE.js} +1 -1
- package/dist/assets/{mounted-authoring-DKn1UEnI.js → mounted-authoring-BAll64vX.js} +1 -1
- package/dist/assets/{mounted-story-viewport-source-Dj51da9b.js → mounted-story-viewport-source-lYU11-92.js} +1 -1
- package/dist/assets/{native-debug-module-C5xRtrQJ.js → native-debug-module-_hzBkCZ7.js} +1 -1
- package/dist/assets/{navigation-6i4sFL2e.js → navigation-DOw2VRQ4.js} +1 -1
- package/dist/assets/{navmesh.menu-BeWFiE7d.js → navmesh.menu-CHyJEJcS.js} +1 -1
- package/dist/assets/{navmesh.service-y9zoEU38.js → navmesh.service-DBlMQ-d7.js} +1 -1
- package/dist/assets/network-observer.service-C7vOkn3z.js +1 -0
- package/dist/assets/{network.utility-D_HsH5qj.js → network.utility-B3ULXw0c.js} +1 -1
- package/dist/assets/{object3d-document-session-registry-BGuY8anX.js → object3d-document-session-registry-DHi4wjTF.js} +2 -2
- package/dist/assets/{oid-transform-wqjngb9T.js → oid-transform-Cb40tUcA.js} +1 -1
- package/dist/assets/{particles-Cjg6XQEP.js → particles-CJYPIK4T.js} +1 -1
- package/dist/assets/{pixi-authoring-adapter-CMpVEOut.js → pixi-authoring-adapter-zLm6t32A.js} +1 -1
- package/dist/assets/{pixi-live-write-target-714CPh5C.js → pixi-live-write-target-gqB1Bns4.js} +1 -1
- package/dist/assets/{play.command-CIcot8mf.js → play.command-BX18gQb-.js} +2 -2
- package/dist/assets/{presentation-DUidVzGI.js → presentation-DN_Gulux.js} +1 -1
- package/dist/assets/{product-emJUqslE.js → product-BNmDRhyK.js} +1 -1
- package/dist/assets/{profiler.action-Tb9vn81X.js → profiler.action-BcXQPser.js} +1 -1
- package/dist/assets/{profiler.menu-D2hXzK6K.js → profiler.menu-DLSKDlYC.js} +1 -1
- package/dist/assets/{profiler.utility-go2J_Rus.js → profiler.utility-XfyJ4Ybb.js} +1 -1
- package/dist/assets/{project-authoring-session-BvXLxd7m.js → project-authoring-session-CV-InH5U.js} +2 -2
- package/dist/assets/{properties-bone-constraints.inspector-BZ_l2-st.js → properties-bone-constraints.inspector-DjtLF07E.js} +1 -1
- package/dist/assets/{properties-bone.inspector-BZB51VMV.js → properties-bone.inspector-BTrLviuO.js} +1 -1
- package/dist/assets/{properties-collection.inspector-C84oF9Qk.js → properties-collection.inspector-4pRJXdHP.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-BZ5gjhkK.js → properties-constraints.inspector-CGMjJ9yI.js} +1 -1
- package/dist/assets/{properties-data.inspector-BFRP4RBX.js → properties-data.inspector-BYWXnz6t.js} +1 -1
- package/dist/assets/{properties-material.inspector-Z0poViuH.js → properties-material.inspector-DW3L9_Nu.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-e-sflJxR.js → properties-modifiers.inspector-CIGm19LV.js} +1 -1
- package/dist/assets/{properties-object.inspector-B2MUPsKe.js → properties-object.inspector-C-D5tyP4.js} +1 -1
- package/dist/assets/{properties-output.inspector-Cl8ANiOA.js → properties-output.inspector-BFNleHzM.js} +1 -1
- package/dist/assets/{properties-particles.inspector-g8R7Qtlh.js → properties-particles.inspector-DUhLpScH.js} +1 -1
- package/dist/assets/{properties-physics.inspector-BN1ScnFc.js → properties-physics.inspector-BFz_SKxd.js} +1 -1
- package/dist/assets/{properties-render.inspector-BWmwuLsA.js → properties-render.inspector-DYyK4VAO.js} +1 -1
- package/dist/assets/{properties-scene.inspector-lBiqvysz.js → properties-scene.inspector-BOJ7o61b.js} +1 -1
- package/dist/assets/{properties-texture.inspector-CkIJP_1b.js → properties-texture.inspector-BV23RX7J.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-bWpA77BN.js → properties-view-layer.inspector-DYVpXCR8.js} +1 -1
- package/dist/assets/{properties-world.inspector-C1GaZ5qr.js → properties-world.inspector-DpihGfpS.js} +1 -1
- package/dist/assets/{r3f-design-session-DbA50oqd.js → r3f-design-session--1XRftri.js} +2 -2
- package/dist/assets/{r3f-physics-binding-yDE4SctS.js → r3f-physics-binding-D7H8JaW0.js} +1 -1
- package/dist/assets/{r3f-source-authoring-adapter-BCy1GWt8.js → r3f-source-authoring-adapter-zqECAe05.js} +1 -1
- package/dist/assets/{react-canvas-navigation-S-IbbVDw.js → react-canvas-navigation-DVpD_2D0.js} +1 -1
- package/dist/assets/{react-inspector.service-Brsft7TJ.js → react-inspector.service-Bv1vBrOj.js} +1 -1
- package/dist/assets/{react-story-board-B-wnwU1y.js → react-story-board-rd1U6EAp.js} +1 -1
- package/dist/assets/{react-three-fiber.esm-BrmmnfPq.js → react-three-fiber.esm-Z3njhfMT.js} +1 -1
- package/dist/assets/{react-three-rapier.esm-ChxOJQrA.js → react-three-rapier.esm-DsRg66Ch.js} +1 -1
- package/dist/assets/{react-world-authoring-adapter-CwnR93ZA.js → react-world-authoring-adapter-D7x1fQ49.js} +1 -1
- package/dist/assets/{realm-services-CsCNzgGK.js → realm-services-CN-61eEJ.js} +1 -1
- package/dist/assets/{reflection-probe-capture.inspector-DGhpuOM-.js → reflection-probe-capture.inspector-BVMieLLF.js} +1 -1
- package/dist/assets/{registry-DVdPAH9u.js → registry-CyI6Aq11.js} +1 -1
- package/dist/assets/{relative-import-specifier-DGpgcbeS.js → relative-import-specifier-DcxN-Zbr.js} +1 -1
- package/dist/assets/{render-env-Dy3Kf2gg.js → render-env-h5HERQrH.js} +1 -1
- package/dist/assets/{render-features-BjJcszQ2.js → render-features-Cfvq_SBW.js} +1 -1
- package/dist/assets/{render-settings-CergIZPU.js → render-settings-hwYf1wv5.js} +1 -1
- package/dist/assets/{resolve-three-l_1-CXHl.js → resolve-three-CJkvlUWq.js} +3 -3
- package/dist/assets/{root-seam-contract-9QibVtGc.js → root-seam-contract-MifQoZQ4.js} +1 -1
- package/dist/assets/{run-selection-DOsR8mOQ.js → run-selection-C1AZsBxI.js} +1 -1
- package/dist/assets/{scene-capture-CrqaUEgL.js → scene-capture-DfdNSDuT.js} +1 -1
- package/dist/assets/{scene-document.service-WItYUlyc.js → scene-document.service-COEvhB25.js} +2 -2
- package/dist/assets/{scene-framing-BxVkSlg3.js → scene-framing-BFUJz9EH.js} +1 -1
- package/dist/assets/{seeded-random-BTqVP8Ii.js → seeded-random-CT60Vm0v.js} +1 -1
- package/dist/assets/{setup-renderer-B2da1u8k.js → setup-renderer-FkSOtbK8.js} +1 -1
- package/dist/assets/{source-object3d-authoring-adapter-BKZ8oj3D.js → source-object3d-authoring-adapter-D_g43IL2.js} +1 -1
- package/dist/assets/{source-persistence-backend-Con5sRZv.js → source-persistence-backend-DXhXbcHd.js} +1 -1
- package/dist/assets/{stage-keyboard-DGE-4Jpn.js → stage-keyboard-BavlReN0.js} +1 -1
- package/dist/assets/{stage-overlay-set-CKtVcxiT.js → stage-overlay-set-DaSD-kEP.js} +1 -1
- package/dist/assets/{stage-presence-markers-tb8yyWjE.js → stage-presence-markers-DABeYLFZ.js} +1 -1
- package/dist/assets/{stage-transform-tools-DdbkruEz.js → stage-transform-tools-CVwbVaHl.js} +1 -1
- package/dist/assets/{standard-viewport-dressing-BmMrgEAi.js → standard-viewport-dressing-CcvhGvJG.js} +1 -1
- package/dist/assets/{state-watch.action-BaJIFmyr.js → state-watch.action-DfpZv7d7.js} +1 -1
- package/dist/assets/{state-watch.menu-ByA3Z9q-.js → state-watch.menu-SvJhuJTF.js} +1 -1
- package/dist/assets/{state-watch.utility-C2Sugdxe.js → state-watch.utility-DKnGsJtm.js} +1 -1
- package/dist/assets/{story-capture-D1xcKwr0.js → story-capture-BFK_ID-Q.js} +1 -1
- package/dist/assets/{story-documents-z4AFSTsH.js → story-documents-B6VxM549.js} +1 -1
- package/dist/assets/{story-documents.service-BNFBCFet.js → story-documents.service-0yUb4nhf.js} +1 -1
- package/dist/assets/{story-documents.service-gHigvC0Y.js → story-documents.service-BfIRLgjz.js} +1 -1
- package/dist/assets/{story-media-presence-Ctf8e6_2.js → story-media-presence-CFQCHxFo.js} +1 -1
- package/dist/assets/{story-pixi-preview-B64Fbglp.js → story-pixi-preview-CATuprki.js} +1 -1
- package/dist/assets/{story-presentation-CioG0A_4.js → story-presentation-BRdH0ChD.js} +1 -1
- package/dist/assets/{story-three-preview-9zj9LGo3.js → story-three-preview-D4pZqkMA.js} +2 -2
- package/dist/assets/{studio-environment-CLaX3ria.js → studio-environment-CRvNlLp8.js} +1 -1
- package/dist/assets/{surface-state-CB3HOhtC.js → surface-state-B9DGFy51.js} +1 -1
- package/dist/assets/{syntactic-prop-specs-Ce1hcg_C.js → syntactic-prop-specs-DBT6-vHl.js} +1 -1
- package/dist/assets/{team-playtest.service-D9-q_kQm.js → team-playtest.service-Duj1NZFc.js} +1 -1
- package/dist/assets/{three-BGqB-uVq.js → three-BJsmD65U.js} +1 -1
- package/dist/assets/{three-authoring-adapter-BO7jI7-8.js → three-authoring-adapter-Cz8KDuKR.js} +1 -1
- package/dist/assets/three-authoring.service-CZVY51US.js +2 -0
- package/dist/assets/{three-ingest-runtime-CzLs2nNM.js → three-ingest-runtime-CAdElDuH.js} +1 -1
- package/dist/assets/{three-integration-qc8Reb1Y.js → three-integration-CFjtFUU-.js} +2 -2
- package/dist/assets/three-integration.service-7jqoQp_l.js +1 -0
- package/dist/assets/{three-projection-core-CFyOC4Fp.js → three-projection-core-EmUNeP2k.js} +1 -1
- package/dist/assets/{three-state-z8gBcifl.js → three-state-Cs7Th7ur.js} +1 -1
- package/dist/assets/{three-story-capture.service-c2yjqEby.js → three-story-capture.service-CTBiiaXF.js} +2 -2
- package/dist/assets/{three-story-model-St9GMyHp.js → three-story-model-D0gr0vkG.js} +1 -1
- package/dist/assets/{three-viewport-presentation-BjXL1Zjv.js → three-viewport-presentation-CzDAAyFp.js} +1 -1
- package/dist/assets/{transform-mode-request-C7qEF7HB.js → transform-mode-request-B9w1y_hg.js} +1 -1
- package/dist/assets/{transport-strip-e122YmzD.js → transport-strip-DfMRjRNy.js} +1 -1
- package/dist/assets/transport.header-utCIDL4y.js +1 -0
- package/dist/assets/{tuples-BUz9vxL7.js → tuples-Bzhmrl2c.js} +1 -1
- package/dist/assets/{ui-board-document-DEqHspRN.js → ui-board-document-CNL8bnU7.js} +2 -2
- package/dist/assets/{user-data-CPxKRceo.js → user-data-UxjaQvdx.js} +1 -1
- package/dist/assets/{utility-view-state-B-gZQZIN.js → utility-view-state-CLA8-L1t.js} +1 -1
- package/dist/assets/{viewport-door-K-5DUW7m.js → viewport-door-BN90Ep9y.js} +1 -1
- package/dist/assets/{viewport-root-presentation-PTTfkoRf.js → viewport-root-presentation-jsbbPD59.js} +1 -1
- package/dist/assets/{viewport-surface-status-BTqSVzg2.js → viewport-surface-status-DdHGQbHo.js} +1 -1
- package/dist/assets/{webworkerAll-DhL2BYVu.js → webworkerAll-BZ2bj2zd.js} +1 -1
- package/dist/assets/{workspace-arrangement-BOOvdRY-.js → workspace-arrangement-Bf-W4FYD.js} +1 -1
- package/dist/assets/{world-documents-FtLCiCQe.js → world-documents-DnzG3hVS.js} +1 -1
- package/dist/assets/{world-root-stage-binding-FTlof7qc.js → world-root-stage-binding-M6fr2Vev.js} +1 -1
- package/dist/assets/{xstate-animation-binding-C06bUoKl.js → xstate-animation-binding-Jeid46sG.js} +1 -1
- package/dist/assets/{xstate-animation-meta-h_xoeBCJ.js → xstate-animation-meta-aAafJ1M9.js} +1 -1
- package/dist-node/cli.js +16 -16
- package/package.json +16 -16
- package/template/vite.config.ts +1 -1
- package/dist/assets/InspectorObjectPreview-CkyqYsEo.js +0 -1
- package/dist/assets/Object3DDocumentViewport-CTE6_O8m.js +0 -2
- package/dist/assets/autoplay.service-Bd6xIgdv.js +0 -1
- package/dist/assets/binding-resolver-BcV7It57.js +0 -2
- package/dist/assets/index-bQE2NA0D.js +0 -1
- package/dist/assets/instances.command-Dj-9DRxh.js +0 -1
- package/dist/assets/network-observer.service-rq9XQOmV.js +0 -1
- package/dist/assets/three-authoring.service-CIJV-GMf.js +0 -2
- package/dist/assets/three-integration.service-DTYLz684.js +0 -1
- package/dist/assets/transport.header-C9_a76-g.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as U}from"./extends-CF3RwP-h.js";import{r as T}from"./index-nmcBqr7Y.js";import"./three.module-BLhyNg0e.js";import{a as ue}from"./BufferGeometryUtils-FJZNEiJN.js";import{du as Pe,n as Ne,fq as re,dq as oe,l as Ee,fo as y,cm as x,dp as Be,eu as we,ca as Me,cb as Q,aZ as j,cw as g,fd as Ie,_ as K,eC as ve,dd as Qe,aE as _e,bu as ke,br as Xe,cW as De,eX as Ye,bm as je,M as _,bz as Ze,c5 as Re,cH as We,c6 as Ve,cI as qe,c1 as Te,cE as ze,ed as ie,cA as $e,Y as et,dg as tt,ch as q,bX as st,cx as ge,aI as nt,cp as v,dk as rt,N as He,ev as ot,co as Je,c0 as it,bV as at,b$ as At,df as ct,bh as z,d9 as Bt,cj as lt,d5 as Ct,et as ut,F as dt,bC as ht,bD as be,bA as ft,eW as de,cV as he,b4 as mt,bB as pt,I as Ft,ex as Gt,f3 as Et,f2 as Mt}from"./three.core-3arARmh6.js";import{G as le}from"./events-156d8d12.esm-CYeuVCYr.js";const It=parseInt(Pe.replace(/\D+/g,""));function Le(C,t,e={}){const n=new y,s=new Be,r=new y,o=new x,a=new x,i=new x;e.preserveMatrix=e.preserveMatrix!==void 0?e.preserveMatrix:!0,e.preservePosition=e.preservePosition!==void 0?e.preservePosition:!0,e.preserveHipPosition=e.preserveHipPosition!==void 0?e.preserveHipPosition:!1,e.useTargetMatrix=e.useTargetMatrix!==void 0?e.useTargetMatrix:!1,e.hip=e.hip!==void 0?e.hip:"hip",e.names=e.names||{};const A=t.isObject3D?t.skeleton.bones:Z(t),c=C.isObject3D?C.skeleton.bones:Z(C);let B,l,u,d,f;if(C.isObject3D?C.skeleton.pose():(e.useTargetMatrix=!0,e.preserveMatrix=!1),e.preservePosition){f=[];for(let h=0;h<c.length;h++)f.push(c[h].position.clone())}if(e.preserveMatrix){C.updateMatrixWorld(),C.matrixWorld.identity();for(let h=0;h<C.children.length;++h)C.children[h].updateMatrixWorld(!0)}if(e.offsets){B=[];for(let h=0;h<c.length;++h)l=c[h],u=e.names[l.name]||l.name,e.offsets[u]&&(l.matrix.multiply(e.offsets[u]),l.matrix.decompose(l.position,l.quaternion,l.scale),l.updateMatrixWorld()),B.push(l.matrixWorld.clone())}for(let h=0;h<c.length;++h){if(l=c[h],u=e.names[l.name]||l.name,d=ye(u,A),i.copy(l.matrixWorld),d){if(d.updateMatrixWorld(),e.useTargetMatrix?a.copy(d.matrixWorld):(a.copy(C.matrixWorld).invert(),a.multiply(d.matrixWorld)),r.setFromMatrixScale(a),a.scale(r.set(1/r.x,1/r.y,1/r.z)),i.makeRotationFromQuaternion(s.setFromRotationMatrix(a)),C.isObject3D){const m=c.indexOf(l),p=B?B[m]:o.copy(C.skeleton.boneInverses[m]).invert();i.multiply(p)}i.copyPosition(a)}l.parent&&l.parent.isBone?(l.matrix.copy(l.parent.matrixWorld).invert(),l.matrix.multiply(i)):l.matrix.copy(i),e.preserveHipPosition&&u===e.hip&&l.matrix.setPosition(n.set(0,l.position.y,0)),l.matrix.decompose(l.position,l.quaternion,l.scale),l.updateMatrixWorld()}if(e.preservePosition)for(let h=0;h<c.length;++h)l=c[h],u=e.names[l.name]||l.name,u!==e.hip&&l.position.copy(f[h]);e.preserveMatrix&&C.updateMatrixWorld(!0)}function Dt(C,t,e,n={}){n.useFirstFramePosition=n.useFirstFramePosition!==void 0?n.useFirstFramePosition:!1,n.fps=n.fps!==void 0?n.fps:30,n.names=n.names||[],t.isObject3D||(t=Tt(t));const s=Math.round(e.duration*(n.fps/1e3)*1e3),r=1/n.fps,o=[],a=new Ne(t),i=Z(C.skeleton),A=[];let c,B,l,u,d;a.clipAction(e).play(),a.update(0),t.updateMatrixWorld();for(let f=0;f<s;++f){const h=f*r;Le(C,t,n);for(let m=0;m<i.length;++m)d=n.names[i[m].name]||i[m].name,l=ye(d,t.skeleton),l&&(B=i[m],u=A[m]=A[m]||{bone:B},n.hip===d&&(u.pos||(u.pos={times:new Float32Array(s),values:new Float32Array(s*3)}),n.useFirstFramePosition&&(f===0&&(c=B.position.clone()),B.position.sub(c)),u.pos.times[f]=h,B.position.toArray(u.pos.values,f*3)),u.quat||(u.quat={times:new Float32Array(s),values:new Float32Array(s*4)}),u.quat.times[f]=h,B.quaternion.toArray(u.quat.values,f*4));a.update(r),t.updateMatrixWorld()}for(let f=0;f<A.length;++f)u=A[f],u&&(u.pos&&o.push(new re(".bones["+u.bone.name+"].position",u.pos.times,u.pos.values)),o.push(new oe(".bones["+u.bone.name+"].quaternion",u.quat.times,u.quat.values)));return a.uncacheAction(e),new Ee(e.name,-1,o)}function Rt(C){const t=new Map,e=new Map,n=C.clone();return Oe(C,n,function(s,r){t.set(r,s),e.set(s,r)}),n.traverse(function(s){if(!s.isSkinnedMesh)return;const r=s,o=t.get(s),a=o.skeleton.bones;r.skeleton=o.skeleton.clone(),r.bindMatrix.copy(o.bindMatrix),r.skeleton.bones=a.map(function(i){return e.get(i)}),r.bind(r.skeleton,r.bindMatrix)}),n}function ye(C,t){for(let e=0,n=Z(t);e<n.length;e++)if(C===n[e].name)return n[e]}function Z(C){return Array.isArray(C)?C:C.bones}function Tt(C){const t=new we(C.bones[0]);return t.skeleton=C,t}function Oe(C,t,e){e(C,t);for(let n=0;n<C.children.length;n++)Oe(C.children[n],t.children[n],e)}const gt={retarget:Le,retargetClip:Dt,clone:Rt};function W(C){if(typeof TextDecoder<"u")return new TextDecoder().decode(C);let t="";for(let e=0,n=C.length;e<n;e++)t+=String.fromCharCode(C[e]);try{return decodeURIComponent(escape(t))}catch{return t}}const S="srgb",J="srgb-linear",fe=3001,Ht=3e3;class Ce extends Me{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new Ot(e)}),this.register(function(e){return new St(e)}),this.register(function(e){return new _t(e)}),this.register(function(e){return new kt(e)}),this.register(function(e){return new Xt(e)}),this.register(function(e){return new Kt(e)}),this.register(function(e){return new Ut(e)}),this.register(function(e){return new Pt(e)}),this.register(function(e){return new Nt(e)}),this.register(function(e){return new yt(e)}),this.register(function(e){return new wt(e)}),this.register(function(e){return new xt(e)}),this.register(function(e){return new Qt(e)}),this.register(function(e){return new vt(e)}),this.register(function(e){return new bt(e)}),this.register(function(e){return new Yt(e)}),this.register(function(e){return new jt(e)})}load(t,e,n,s){const r=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const A=Q.extractUrlBase(t);o=Q.resolveURL(A,this.path)}else o=Q.extractUrlBase(t);this.manager.itemStart(t);const a=function(A){s?s(A):console.error(A),r.manager.itemError(t),r.manager.itemEnd(t)},i=new j(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(t,function(A){try{r.parse(A,o,function(c){e(c),r.manager.itemEnd(t)},a)}catch(c){a(c)}},n,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,n,s){let r;const o={},a={};if(typeof t=="string")r=JSON.parse(t);else if(t instanceof ArrayBuffer)if(W(new Uint8Array(t.slice(0,4)))===Se){try{o[F.KHR_BINARY_GLTF]=new Zt(t)}catch(c){s&&s(c);return}r=JSON.parse(o[F.KHR_BINARY_GLTF].content)}else r=JSON.parse(W(new Uint8Array(t)));else r=t;if(r.asset===void 0||r.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const i=new as(r,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});i.fileLoader.setRequestHeader(this.requestHeader);for(let A=0;A<this.pluginCallbacks.length;A++){const c=this.pluginCallbacks[A](i);c.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[c.name]=c,o[c.name]=!0}if(r.extensionsUsed)for(let A=0;A<r.extensionsUsed.length;++A){const c=r.extensionsUsed[A],B=r.extensionsRequired||[];switch(c){case F.KHR_MATERIALS_UNLIT:o[c]=new Lt;break;case F.KHR_DRACO_MESH_COMPRESSION:o[c]=new Wt(r,this.dracoLoader);break;case F.KHR_TEXTURE_TRANSFORM:o[c]=new Vt;break;case F.KHR_MESH_QUANTIZATION:o[c]=new qt;break;default:B.indexOf(c)>=0&&a[c]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+c+'".')}}i.setExtensions(o),i.setPlugins(a),i.parse(n,s)}parseAsync(t,e){const n=this;return new Promise(function(s,r){n.parse(t,e,s,r)})}}function Jt(){let C={};return{get:function(t){return C[t]},add:function(t,e){C[t]=e},remove:function(t){delete C[t]},removeAll:function(){C={}}}}const F={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class bt{constructor(t){this.parser=t,this.name=F.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let n=0,s=e.length;n<s;n++){const r=e[n];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(t){const e=this.parser,n="light:"+t;let s=e.cache.get(n);if(s)return s;const r=e.json,i=((r.extensions&&r.extensions[this.name]||{}).lights||[])[t];let A;const c=new K(16777215);i.color!==void 0&&c.setRGB(i.color[0],i.color[1],i.color[2],J);const B=i.range!==void 0?i.range:0;switch(i.type){case"directional":A=new _e(c),A.target.position.set(0,0,-1),A.add(A.target);break;case"point":A=new Qe(c),A.distance=B;break;case"spot":A=new ve(c),A.distance=B,i.spot=i.spot||{},i.spot.innerConeAngle=i.spot.innerConeAngle!==void 0?i.spot.innerConeAngle:0,i.spot.outerConeAngle=i.spot.outerConeAngle!==void 0?i.spot.outerConeAngle:Math.PI/4,A.angle=i.spot.outerConeAngle,A.penumbra=1-i.spot.innerConeAngle/i.spot.outerConeAngle,A.target.position.set(0,0,-1),A.add(A.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+i.type)}return A.position.set(0,0,0),A.decay=2,H(A,i),i.intensity!==void 0&&(A.intensity=i.intensity),A.name=e.createUniqueName(i.name||"light_"+t),s=Promise.resolve(A),e.cache.add(n,s),s}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){const e=this,n=this.parser,r=n.json.nodes[t],a=(r.extensions&&r.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(i){return n._getNodeRef(e.cache,a,i)})}}class Lt{constructor(){this.name=F.KHR_MATERIALS_UNLIT}getMaterialType(){return v}extendParams(t,e,n){const s=[];t.color=new K(1,1,1),t.opacity=1;const r=e.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){const o=r.baseColorFactor;t.color.setRGB(o[0],o[1],o[2],J),t.opacity=o[3]}r.baseColorTexture!==void 0&&s.push(n.assignTexture(t,"map",r.baseColorTexture,S))}return Promise.all(s)}}class yt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name].emissiveStrength;return r!==void 0&&(e.emissiveIntensity=r),Promise.resolve()}}class Ot{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];if(o.clearcoatFactor!==void 0&&(e.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&r.push(n.assignTexture(e,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&r.push(n.assignTexture(e,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(r.push(n.assignTexture(e,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const a=o.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new Ie(a,a)}return Promise.all(r)}}class St{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_DISPERSION}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name];return e.dispersion=r.dispersion!==void 0?r.dispersion:0,Promise.resolve()}}class xt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return o.iridescenceFactor!==void 0&&(e.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&r.push(n.assignTexture(e,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(e.iridescenceIOR=o.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&r.push(n.assignTexture(e,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(r)}}class Kt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_SHEEN}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[];e.sheenColor=new K(0,0,0),e.sheenRoughness=0,e.sheen=1;const o=s.extensions[this.name];if(o.sheenColorFactor!==void 0){const a=o.sheenColorFactor;e.sheenColor.setRGB(a[0],a[1],a[2],J)}return o.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&r.push(n.assignTexture(e,"sheenColorMap",o.sheenColorTexture,S)),o.sheenRoughnessTexture!==void 0&&r.push(n.assignTexture(e,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(r)}}class Ut{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return o.transmissionFactor!==void 0&&(e.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&r.push(n.assignTexture(e,"transmissionMap",o.transmissionTexture)),Promise.all(r)}}class Pt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_VOLUME}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];e.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&r.push(n.assignTexture(e,"thicknessMap",o.thicknessTexture)),e.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return e.attenuationColor=new K().setRGB(a[0],a[1],a[2],J),Promise.all(r)}}class Nt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_IOR}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name];return e.ior=r.ior!==void 0?r.ior:1.5,Promise.resolve()}}class wt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_SPECULAR}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];e.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&r.push(n.assignTexture(e,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return e.specularColor=new K().setRGB(a[0],a[1],a[2],J),o.specularColorTexture!==void 0&&r.push(n.assignTexture(e,"specularColorMap",o.specularColorTexture,S)),Promise.all(r)}}class vt{constructor(t){this.parser=t,this.name=F.EXT_MATERIALS_BUMP}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return e.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&r.push(n.assignTexture(e,"bumpMap",o.bumpTexture)),Promise.all(r)}}class Qt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return o.anisotropyStrength!==void 0&&(e.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(e.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&r.push(n.assignTexture(e,"anisotropyMap",o.anisotropyTexture)),Promise.all(r)}}class _t{constructor(t){this.parser=t,this.name=F.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,n=e.json,s=n.textures[t];if(!s.extensions||!s.extensions[this.name])return null;const r=s.extensions[this.name],o=e.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,r.source,o)}}class kt{constructor(t){this.parser=t,this.name=F.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const e=this.name,n=this.parser,s=n.json,r=s.textures[t];if(!r.extensions||!r.extensions[e])return null;const o=r.extensions[e],a=s.images[o.source];let i=n.textureLoader;if(a.uri){const A=n.options.manager.getHandler(a.uri);A!==null&&(i=A)}return this.detectSupport().then(function(A){if(A)return n.loadTextureImage(t,o.source,i);if(s.extensionsRequired&&s.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Xt{constructor(t){this.parser=t,this.name=F.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const e=this.name,n=this.parser,s=n.json,r=s.textures[t];if(!r.extensions||!r.extensions[e])return null;const o=r.extensions[e],a=s.images[o.source];let i=n.textureLoader;if(a.uri){const A=n.options.manager.getHandler(a.uri);A!==null&&(i=A)}return this.detectSupport().then(function(A){if(A)return n.loadTextureImage(t,o.source,i);if(s.extensionsRequired&&s.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Yt{constructor(t){this.name=F.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,n=e.bufferViews[t];if(n.extensions&&n.extensions[this.name]){const s=n.extensions[this.name],r=this.parser.getDependency("buffer",s.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const i=s.byteOffset||0,A=s.byteLength||0,c=s.count,B=s.byteStride,l=new Uint8Array(a,i,A);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(c,B,l,s.mode,s.filter).then(function(u){return u.buffer}):o.ready.then(function(){const u=new ArrayBuffer(c*B);return o.decodeGltfBuffer(new Uint8Array(u),c,B,l,s.mode,s.filter),u})})}else return null}}class jt{constructor(t){this.name=F.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,n=e.nodes[t];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const s=e.meshes[n.mesh];for(const A of s.primitives)if(A.mode!==D.TRIANGLES&&A.mode!==D.TRIANGLE_STRIP&&A.mode!==D.TRIANGLE_FAN&&A.mode!==void 0)return null;const o=n.extensions[this.name].attributes,a=[],i={};for(const A in o)a.push(this.parser.getDependency("accessor",o[A]).then(c=>(i[A]=c,i[A])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(A=>{const c=A.pop(),B=c.isGroup?c.children:[c],l=A[0].count,u=[];for(const d of B){const f=new x,h=new y,m=new Be,p=new y(1,1,1),E=new ke(d.geometry,d.material,l);for(let G=0;G<l;G++)i.TRANSLATION&&h.fromBufferAttribute(i.TRANSLATION,G),i.ROTATION&&m.fromBufferAttribute(i.ROTATION,G),i.SCALE&&p.fromBufferAttribute(i.SCALE,G),E.setMatrixAt(G,f.compose(h,m,p));for(const G in i)if(G==="_COLOR_0"){const M=i[G];E.instanceColor=new Xe(M.array,M.itemSize,M.normalized)}else G!=="TRANSLATION"&&G!=="ROTATION"&&G!=="SCALE"&&d.geometry.setAttribute(G,i[G]);De.prototype.copy.call(E,d),this.parser.assignFinalMaterial(E),u.push(E)}return c.isGroup?(c.clear(),c.add(...u),c):u[0]}))}}const Se="glTF",w=12,me={JSON:1313821514,BIN:5130562};class Zt{constructor(t){this.name=F.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,w);if(this.header={magic:W(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Se)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-w,s=new DataView(t,w);let r=0;for(;r<n;){const o=s.getUint32(r,!0);r+=4;const a=s.getUint32(r,!0);if(r+=4,a===me.JSON){const i=new Uint8Array(t,w+r,o);this.content=W(i)}else if(a===me.BIN){const i=w+r;this.body=t.slice(i,i+o)}r+=o}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Wt{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=F.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const n=this.json,s=this.dracoLoader,r=t.extensions[this.name].bufferView,o=t.extensions[this.name].attributes,a={},i={},A={};for(const c in o){const B=ae[c]||c.toLowerCase();a[B]=o[c]}for(const c in t.attributes){const B=ae[c]||c.toLowerCase();if(o[c]!==void 0){const l=n.accessors[t.attributes[c]],u=P[l.componentType];A[B]=u.name,i[B]=l.normalized===!0}}return e.getDependency("bufferView",r).then(function(c){return new Promise(function(B,l){s.decodeDracoFile(c,function(u){for(const d in u.attributes){const f=u.attributes[d],h=i[d];h!==void 0&&(f.normalized=h)}B(u)},a,A,J,l)})})}}class Vt{constructor(){this.name=F.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}}class qt{constructor(){this.name=F.KHR_MESH_QUANTIZATION}}class xe extends pt{constructor(t,e,n,s){super(t,e,n,s)}copySampleValue_(t){const e=this.resultBuffer,n=this.sampleValues,s=this.valueSize,r=t*s*3+s;for(let o=0;o!==s;o++)e[o]=n[r+o];return e}interpolate_(t,e,n,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,i=a*2,A=a*3,c=s-e,B=(n-e)/c,l=B*B,u=l*B,d=t*A,f=d-A,h=-2*u+3*l,m=u-l,p=1-h,E=m-l+B;for(let G=0;G!==a;G++){const M=o[f+G+a],I=o[f+G+i]*c,R=o[d+G+a],N=o[d+G]*c;r[G]=p*M+E*I+h*R+m*N}return r}}const zt=new Be;class $t extends xe{interpolate_(t,e,n,s){const r=super.interpolate_(t,e,n,s);return zt.fromArray(r).normalize().toArray(r),r}}const D={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},P={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},pe={9728:ze,9729:Te,9984:qe,9985:Ve,9986:We,9987:Re},Fe={33071:et,33648:$e,10497:ie},$={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ae={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...It>=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},L={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},es={CUBICSPLINE:void 0,LINEAR:be,STEP:ht},ee={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function ts(C){return C.DefaultMaterial===void 0&&(C.DefaultMaterial=new ge({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:mt})),C.DefaultMaterial}function O(C,t,e){for(const n in e.extensions)C[n]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[n]=e.extensions[n])}function H(C,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(C.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function ss(C,t,e){let n=!1,s=!1,r=!1;for(let A=0,c=t.length;A<c;A++){const B=t[A];if(B.POSITION!==void 0&&(n=!0),B.NORMAL!==void 0&&(s=!0),B.COLOR_0!==void 0&&(r=!0),n&&s&&r)break}if(!n&&!s&&!r)return Promise.resolve(C);const o=[],a=[],i=[];for(let A=0,c=t.length;A<c;A++){const B=t[A];if(n){const l=B.POSITION!==void 0?e.getDependency("accessor",B.POSITION):C.attributes.position;o.push(l)}if(s){const l=B.NORMAL!==void 0?e.getDependency("accessor",B.NORMAL):C.attributes.normal;a.push(l)}if(r){const l=B.COLOR_0!==void 0?e.getDependency("accessor",B.COLOR_0):C.attributes.color;i.push(l)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(i)]).then(function(A){const c=A[0],B=A[1],l=A[2];return n&&(C.morphAttributes.position=c),s&&(C.morphAttributes.normal=B),r&&(C.morphAttributes.color=l),C.morphTargetsRelative=!0,C})}function ns(C,t){if(C.updateMorphTargets(),t.weights!==void 0)for(let e=0,n=t.weights.length;e<n;e++)C.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){const e=t.extras.targetNames;if(C.morphTargetInfluences.length===e.length){C.morphTargetDictionary={};for(let n=0,s=e.length;n<s;n++)C.morphTargetDictionary[e[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function rs(C){let t;const e=C.extensions&&C.extensions[F.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+te(e.attributes):t=C.indices+":"+te(C.attributes)+":"+C.mode,C.targets!==void 0)for(let n=0,s=C.targets.length;n<s;n++)t+=":"+te(C.targets[n]);return t}function te(C){let t="";const e=Object.keys(C).sort();for(let n=0,s=e.length;n<s;n++)t+=e[n]+":"+C[e[n]]+";";return t}function Ae(C){switch(C){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function os(C){return C.search(/\.jpe?g($|\?)/i)>0||C.search(/^data\:image\/jpeg/)===0?"image/jpeg":C.search(/\.webp($|\?)/i)>0||C.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const is=new x;class as{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new Jt,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,s=!1,r=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,s=navigator.userAgent.indexOf("Firefox")>-1,r=s?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||n||s&&r<98?this.textureLoader=new Ye(this.options.manager):this.textureLoader=new je(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new j(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const n=this,s=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){const a={scene:o[0][s.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:s.asset,parser:n,userData:{}};return O(r,a,s),H(a,s),Promise.all(n._invokeAll(function(i){return i.afterRoot&&i.afterRoot(a)})).then(function(){for(const i of a.scenes)i.updateMatrixWorld();t(a)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[];for(let s=0,r=e.length;s<r;s++){const o=e[s].joints;for(let a=0,i=o.length;a<i;a++)t[o[a]].isBone=!0}for(let s=0,r=t.length;s<r;s++){const o=t[s];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(n[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,n){if(t.refs[e]<=1)return n;const s=n.clone(),r=(o,a)=>{const i=this.associations.get(o);i!=null&&this.associations.set(a,i);for(const[A,c]of o.children.entries())r(c,a.children[A])};return r(n,s),s.name+="_instance_"+t.uses[e]++,s}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let n=0;n<e.length;n++){const s=t(e[n]);if(s)return s}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const n=[];for(let s=0;s<e.length;s++){const r=t(e[s]);r&&n.push(r)}return n}getDependency(t,e){const n=t+":"+e;let s=this.cache.get(n);if(!s){switch(t){case"scene":s=this.loadScene(e);break;case"node":s=this._invokeOne(function(r){return r.loadNode&&r.loadNode(e)});break;case"mesh":s=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(e)});break;case"accessor":s=this.loadAccessor(e);break;case"bufferView":s=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(e)});break;case"buffer":s=this.loadBuffer(e);break;case"material":s=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(e)});break;case"texture":s=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(e)});break;case"skin":s=this.loadSkin(e);break;case"animation":s=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(e)});break;case"camera":s=this.loadCamera(e);break;default:if(s=this._invokeOne(function(r){return r!=this&&r.getDependency&&r.getDependency(t,e)}),!s)throw new Error("Unknown type: "+t);break}this.cache.add(n,s)}return s}getDependencies(t){let e=this.cache.get(t);if(!e){const n=this,s=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(s.map(function(r,o){return n.getDependency(t,o)})),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],n=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[F.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(r,o){n.load(Q.resolveURL(e.uri,s.path),r,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(n){const s=e.byteLength||0,r=e.byteOffset||0;return n.slice(r,r+s)})}loadAccessor(t){const e=this,n=this.json,s=this.json.accessors[t];if(s.bufferView===void 0&&s.sparse===void 0){const o=$[s.type],a=P[s.componentType],i=s.normalized===!0,A=new a(s.count*o);return Promise.resolve(new _(A,o,i))}const r=[];return s.bufferView!==void 0?r.push(this.getDependency("bufferView",s.bufferView)):r.push(null),s.sparse!==void 0&&(r.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(r).then(function(o){const a=o[0],i=$[s.type],A=P[s.componentType],c=A.BYTES_PER_ELEMENT,B=c*i,l=s.byteOffset||0,u=s.bufferView!==void 0?n.bufferViews[s.bufferView].byteStride:void 0,d=s.normalized===!0;let f,h;if(u&&u!==B){const m=Math.floor(l/u),p="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+m+":"+s.count;let E=e.cache.get(p);E||(f=new A(a,m*u,s.count*u/c),E=new Ze(f,u/c),e.cache.add(p,E)),h=new ft(E,i,l%u/c,d)}else a===null?f=new A(s.count*i):f=new A(a,l,s.count*i),h=new _(f,i,d);if(s.sparse!==void 0){const m=$.SCALAR,p=P[s.sparse.indices.componentType],E=s.sparse.indices.byteOffset||0,G=s.sparse.values.byteOffset||0,M=new p(o[1],E,s.sparse.count*m),I=new A(o[2],G,s.sparse.count*i);a!==null&&(h=new _(h.array.slice(),h.itemSize,h.normalized));for(let R=0,N=M.length;R<N;R++){const b=M[R];if(h.setX(b,I[R*i]),i>=2&&h.setY(b,I[R*i+1]),i>=3&&h.setZ(b,I[R*i+2]),i>=4&&h.setW(b,I[R*i+3]),i>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return h})}loadTexture(t){const e=this.json,n=this.options,r=e.textures[t].source,o=e.images[r];let a=this.textureLoader;if(o.uri){const i=n.manager.getHandler(o.uri);i!==null&&(a=i)}return this.loadTextureImage(t,r,a)}loadTextureImage(t,e,n){const s=this,r=this.json,o=r.textures[t],a=r.images[e],i=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[i])return this.textureCache[i];const A=this.loadImageSource(e,n).then(function(c){c.flipY=!1,c.name=o.name||a.name||"",c.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(c.name=a.uri);const l=(r.samplers||{})[o.sampler]||{};return c.magFilter=pe[l.magFilter]||Te,c.minFilter=pe[l.minFilter]||Re,c.wrapS=Fe[l.wrapS]||ie,c.wrapT=Fe[l.wrapT]||ie,s.associations.set(c,{textures:t}),c}).catch(function(){return null});return this.textureCache[i]=A,A}loadImageSource(t,e){const n=this,s=this.json,r=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(B=>B.clone());const o=s.images[t],a=self.URL||self.webkitURL;let i=o.uri||"",A=!1;if(o.bufferView!==void 0)i=n.getDependency("bufferView",o.bufferView).then(function(B){A=!0;const l=new Blob([B],{type:o.mimeType});return i=a.createObjectURL(l),i});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const c=Promise.resolve(i).then(function(B){return new Promise(function(l,u){let d=l;e.isImageBitmapLoader===!0&&(d=function(f){const h=new de(f);h.needsUpdate=!0,l(h)}),e.load(Q.resolveURL(B,r.path),d,void 0,u)})}).then(function(B){return A===!0&&a.revokeObjectURL(i),H(B,o),B.userData.mimeType=o.mimeType||os(o.uri),B}).catch(function(B){throw console.error("THREE.GLTFLoader: Couldn't load texture",i),B});return this.sourceCache[t]=c,c}assignTexture(t,e,n,s){const r=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),r.extensions[F.KHR_TEXTURE_TRANSFORM]){const a=n.extensions!==void 0?n.extensions[F.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const i=r.associations.get(o);o=r.extensions[F.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,i)}}return s!==void 0&&(typeof s=="number"&&(s=s===fe?S:J),"colorSpace"in o?o.colorSpace=s:o.encoding=s===S?fe:Ht),t[e]=o,o})}assignFinalMaterial(t){const e=t.geometry;let n=t.material;const s=e.attributes.tangent===void 0,r=e.attributes.color!==void 0,o=e.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+n.uuid;let i=this.cache.get(a);i||(i=new tt,q.prototype.copy.call(i,n),i.color.copy(n.color),i.map=n.map,i.sizeAttenuation=!1,this.cache.add(a,i)),n=i}else if(t.isLine){const a="LineBasicMaterial:"+n.uuid;let i=this.cache.get(a);i||(i=new st,q.prototype.copy.call(i,n),i.color.copy(n.color),i.map=n.map,this.cache.add(a,i)),n=i}if(s||r||o){let a="ClonedMaterial:"+n.uuid+":";s&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let i=this.cache.get(a);i||(i=n.clone(),r&&(i.vertexColors=!0),o&&(i.flatShading=!0),s&&(i.normalScale&&(i.normalScale.y*=-1),i.clearcoatNormalScale&&(i.clearcoatNormalScale.y*=-1)),this.cache.add(a,i),this.associations.set(i,this.associations.get(n))),n=i}t.material=n}getMaterialType(){return ge}loadMaterial(t){const e=this,n=this.json,s=this.extensions,r=n.materials[t];let o;const a={},i=r.extensions||{},A=[];if(i[F.KHR_MATERIALS_UNLIT]){const B=s[F.KHR_MATERIALS_UNLIT];o=B.getMaterialType(),A.push(B.extendParams(a,r,e))}else{const B=r.pbrMetallicRoughness||{};if(a.color=new K(1,1,1),a.opacity=1,Array.isArray(B.baseColorFactor)){const l=B.baseColorFactor;a.color.setRGB(l[0],l[1],l[2],J),a.opacity=l[3]}B.baseColorTexture!==void 0&&A.push(e.assignTexture(a,"map",B.baseColorTexture,S)),a.metalness=B.metallicFactor!==void 0?B.metallicFactor:1,a.roughness=B.roughnessFactor!==void 0?B.roughnessFactor:1,B.metallicRoughnessTexture!==void 0&&(A.push(e.assignTexture(a,"metalnessMap",B.metallicRoughnessTexture)),A.push(e.assignTexture(a,"roughnessMap",B.metallicRoughnessTexture))),o=this._invokeOne(function(l){return l.getMaterialType&&l.getMaterialType(t)}),A.push(Promise.all(this._invokeAll(function(l){return l.extendMaterialParams&&l.extendMaterialParams(t,a)})))}r.doubleSided===!0&&(a.side=nt);const c=r.alphaMode||ee.OPAQUE;if(c===ee.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,c===ee.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==v&&(A.push(e.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new Ie(1,1),r.normalTexture.scale!==void 0)){const B=r.normalTexture.scale;a.normalScale.set(B,B)}if(r.occlusionTexture!==void 0&&o!==v&&(A.push(e.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==v){const B=r.emissiveFactor;a.emissive=new K().setRGB(B[0],B[1],B[2],J)}return r.emissiveTexture!==void 0&&o!==v&&A.push(e.assignTexture(a,"emissiveMap",r.emissiveTexture,S)),Promise.all(A).then(function(){const B=new o(a);return r.name&&(B.name=r.name),H(B,r),e.associations.set(B,{materials:t}),r.extensions&&O(s,B,r),B})}createUniqueName(t){const e=rt.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,n=this.extensions,s=this.primitiveCache;function r(a){return n[F.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(i){return Ge(i,a,e)})}const o=[];for(let a=0,i=t.length;a<i;a++){const A=t[a],c=rs(A),B=s[c];if(B)o.push(B.promise);else{let l;A.extensions&&A.extensions[F.KHR_DRACO_MESH_COMPRESSION]?l=r(A):l=Ge(new He,A,e),s[c]={primitive:A,promise:l},o.push(l)}}return Promise.all(o)}loadMesh(t){const e=this,n=this.json,s=this.extensions,r=n.meshes[t],o=r.primitives,a=[];for(let i=0,A=o.length;i<A;i++){const c=o[i].material===void 0?ts(this.cache):this.getDependency("material",o[i].material);a.push(c)}return a.push(e.loadGeometries(o)),Promise.all(a).then(function(i){const A=i.slice(0,i.length-1),c=i[i.length-1],B=[];for(let u=0,d=c.length;u<d;u++){const f=c[u],h=o[u];let m;const p=A[u];if(h.mode===D.TRIANGLES||h.mode===D.TRIANGLE_STRIP||h.mode===D.TRIANGLE_FAN||h.mode===void 0)m=r.isSkinnedMesh===!0?new ot(f,p):new Je(f,p),m.isSkinnedMesh===!0&&m.normalizeSkinWeights(),h.mode===D.TRIANGLE_STRIP?m.geometry=ue(m.geometry,Et):h.mode===D.TRIANGLE_FAN&&(m.geometry=ue(m.geometry,Mt));else if(h.mode===D.LINES)m=new it(f,p);else if(h.mode===D.LINE_STRIP)m=new at(f,p);else if(h.mode===D.LINE_LOOP)m=new At(f,p);else if(h.mode===D.POINTS)m=new ct(f,p);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+h.mode);Object.keys(m.geometry.morphAttributes).length>0&&ns(m,r),m.name=e.createUniqueName(r.name||"mesh_"+t),H(m,r),h.extensions&&O(s,m,h),e.assignFinalMaterial(m),B.push(m)}for(let u=0,d=B.length;u<d;u++)e.associations.set(B[u],{meshes:t,primitives:u});if(B.length===1)return r.extensions&&O(s,B[0],r),B[0];const l=new z;r.extensions&&O(s,l,r),e.associations.set(l,{meshes:t});for(let u=0,d=B.length;u<d;u++)l.add(B[u]);return l})}loadCamera(t){let e;const n=this.json.cameras[t],s=n[n.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?e=new Bt(lt.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):n.type==="orthographic"&&(e=new Ct(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),n.name&&(e.name=this.createUniqueName(n.name)),H(e,n),Promise.resolve(e)}loadSkin(t){const e=this.json.skins[t],n=[];for(let s=0,r=e.joints.length;s<r;s++)n.push(this._loadNodeShallow(e.joints[s]));return e.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",e.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(s){const r=s.pop(),o=s,a=[],i=[];for(let A=0,c=o.length;A<c;A++){const B=o[A];if(B){a.push(B);const l=new x;r!==null&&l.fromArray(r.array,A*16),i.push(l)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[A])}return new ut(a,i)})}loadAnimation(t){const e=this.json,n=this,s=e.animations[t],r=s.name?s.name:"animation_"+t,o=[],a=[],i=[],A=[],c=[];for(let B=0,l=s.channels.length;B<l;B++){const u=s.channels[B],d=s.samplers[u.sampler],f=u.target,h=f.node,m=s.parameters!==void 0?s.parameters[d.input]:d.input,p=s.parameters!==void 0?s.parameters[d.output]:d.output;f.node!==void 0&&(o.push(this.getDependency("node",h)),a.push(this.getDependency("accessor",m)),i.push(this.getDependency("accessor",p)),A.push(d),c.push(f))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(i),Promise.all(A),Promise.all(c)]).then(function(B){const l=B[0],u=B[1],d=B[2],f=B[3],h=B[4],m=[];for(let p=0,E=l.length;p<E;p++){const G=l[p],M=u[p],I=d[p],R=f[p],N=h[p];if(G===void 0)continue;G.updateMatrix&&G.updateMatrix();const b=n._createAnimationTracks(G,M,I,R,N);if(b)for(let V=0;V<b.length;V++)m.push(b[V])}return new Ee(r,void 0,m)})}createNodeMesh(t){const e=this.json,n=this,s=e.nodes[t];return s.mesh===void 0?null:n.getDependency("mesh",s.mesh).then(function(r){const o=n._getNodeRef(n.meshCache,s.mesh,r);return s.weights!==void 0&&o.traverse(function(a){if(a.isMesh)for(let i=0,A=s.weights.length;i<A;i++)a.morphTargetInfluences[i]=s.weights[i]}),o})}loadNode(t){const e=this.json,n=this,s=e.nodes[t],r=n._loadNodeShallow(t),o=[],a=s.children||[];for(let A=0,c=a.length;A<c;A++)o.push(n.getDependency("node",a[A]));const i=s.skin===void 0?Promise.resolve(null):n.getDependency("skin",s.skin);return Promise.all([r,Promise.all(o),i]).then(function(A){const c=A[0],B=A[1],l=A[2];l!==null&&c.traverse(function(u){u.isSkinnedMesh&&u.bind(l,is)});for(let u=0,d=B.length;u<d;u++)c.add(B[u]);return c})}_loadNodeShallow(t){const e=this.json,n=this.extensions,s=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];const r=e.nodes[t],o=r.name?s.createUniqueName(r.name):"",a=[],i=s._invokeOne(function(A){return A.createNodeMesh&&A.createNodeMesh(t)});return i&&a.push(i),r.camera!==void 0&&a.push(s.getDependency("camera",r.camera).then(function(A){return s._getNodeRef(s.cameraCache,r.camera,A)})),s._invokeAll(function(A){return A.createNodeAttachment&&A.createNodeAttachment(t)}).forEach(function(A){a.push(A)}),this.nodeCache[t]=Promise.all(a).then(function(A){let c;if(r.isBone===!0?c=new dt:A.length>1?c=new z:A.length===1?c=A[0]:c=new De,c!==A[0])for(let B=0,l=A.length;B<l;B++)c.add(A[B]);if(r.name&&(c.userData.name=r.name,c.name=o),H(c,r),r.extensions&&O(n,c,r),r.matrix!==void 0){const B=new x;B.fromArray(r.matrix),c.applyMatrix4(B)}else r.translation!==void 0&&c.position.fromArray(r.translation),r.rotation!==void 0&&c.quaternion.fromArray(r.rotation),r.scale!==void 0&&c.scale.fromArray(r.scale);return s.associations.has(c)||s.associations.set(c,{}),s.associations.get(c).nodes=t,c}),this.nodeCache[t]}loadScene(t){const e=this.extensions,n=this.json.scenes[t],s=this,r=new z;n.name&&(r.name=s.createUniqueName(n.name)),H(r,n),n.extensions&&O(e,r,n);const o=n.nodes||[],a=[];for(let i=0,A=o.length;i<A;i++)a.push(s.getDependency("node",o[i]));return Promise.all(a).then(function(i){for(let c=0,B=i.length;c<B;c++)r.add(i[c]);const A=c=>{const B=new Map;for(const[l,u]of s.associations)(l instanceof q||l instanceof de)&&B.set(l,u);return c.traverse(l=>{const u=s.associations.get(l);u!=null&&B.set(l,u)}),B};return s.associations=A(r),r})}_createAnimationTracks(t,e,n,s,r){const o=[],a=t.name?t.name:t.uuid,i=[];L[r.path]===L.weights?t.traverse(function(l){l.morphTargetInfluences&&i.push(l.name?l.name:l.uuid)}):i.push(a);let A;switch(L[r.path]){case L.weights:A=he;break;case L.rotation:A=oe;break;case L.position:case L.scale:A=re;break;default:switch(n.itemSize){case 1:A=he;break;case 2:case 3:default:A=re;break}break}const c=s.interpolation!==void 0?es[s.interpolation]:be,B=this._getArrayFromAccessor(n);for(let l=0,u=i.length;l<u;l++){const d=new A(i[l]+"."+L[r.path],e.array,B,c);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(d),o.push(d)}return o}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const n=Ae(e.constructor),s=new Float32Array(e.length);for(let r=0,o=e.length;r<o;r++)s[r]=e[r]*n;e=s}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(n){const s=this instanceof oe?$t:xe;return new s(this.times,this.values,this.getValueSize()/3,n)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function As(C,t,e){const n=t.attributes,s=new Ft;if(n.POSITION!==void 0){const a=e.json.accessors[n.POSITION],i=a.min,A=a.max;if(i!==void 0&&A!==void 0){if(s.set(new y(i[0],i[1],i[2]),new y(A[0],A[1],A[2])),a.normalized){const c=Ae(P[a.componentType]);s.min.multiplyScalar(c),s.max.multiplyScalar(c)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const r=t.targets;if(r!==void 0){const a=new y,i=new y;for(let A=0,c=r.length;A<c;A++){const B=r[A];if(B.POSITION!==void 0){const l=e.json.accessors[B.POSITION],u=l.min,d=l.max;if(u!==void 0&&d!==void 0){if(i.setX(Math.max(Math.abs(u[0]),Math.abs(d[0]))),i.setY(Math.max(Math.abs(u[1]),Math.abs(d[1]))),i.setZ(Math.max(Math.abs(u[2]),Math.abs(d[2]))),l.normalized){const f=Ae(P[l.componentType]);i.multiplyScalar(f)}a.max(i)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(a)}C.boundingBox=s;const o=new Gt;s.getCenter(o.center),o.radius=s.min.distanceTo(s.max)/2,C.boundingSphere=o}function Ge(C,t,e){const n=t.attributes,s=[];function r(o,a){return e.getDependency("accessor",o).then(function(i){C.setAttribute(a,i)})}for(const o in n){const a=ae[o]||o.toLowerCase();a in C.attributes||s.push(r(n[o],a))}if(t.indices!==void 0&&!C.index){const o=e.getDependency("accessor",t.indices).then(function(a){C.setIndex(a)});s.push(o)}return H(C,t),As(C,t,e),Promise.all(s).then(function(){return t.targets!==void 0?ss(C,t.targets,e):C})}const se=new WeakMap;class cs extends Me{constructor(t){super(t),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(t){return this.decoderPath=t,this}setDecoderConfig(t){return this.decoderConfig=t,this}setWorkerLimit(t){return this.workerLimit=t,this}load(t,e,n,s){const r=new j(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(t,o=>{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(o,a).then(e).catch(s)},n,s)}decodeDracoFile(t,e,n,s){const r={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(t,r).then(e)}decodeGeometry(t,e){for(const i in e.attributeTypes){const A=e.attributeTypes[i];A.BYTES_PER_ELEMENT!==void 0&&(e.attributeTypes[i]=A.name)}const n=JSON.stringify(e);if(se.has(t)){const i=se.get(t);if(i.key===n)return i.promise;if(t.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const r=this.workerNextTaskID++,o=t.byteLength,a=this._getWorker(r,o).then(i=>(s=i,new Promise((A,c)=>{s._callbacks[r]={resolve:A,reject:c},s.postMessage({type:"decode",id:r,taskConfig:e,buffer:t},[t])}))).then(i=>this._createGeometry(i.geometry));return a.catch(()=>!0).then(()=>{s&&r&&this._releaseTask(s,r)}),se.set(t,{key:n,promise:a}),a}_createGeometry(t){const e=new He;t.index&&e.setIndex(new _(t.index.array,1));for(let n=0;n<t.attributes.length;n++){const s=t.attributes[n],r=s.name,o=s.array,a=s.itemSize;e.setAttribute(r,new _(o,a))}return e}_loadLibrary(t,e){const n=new j(this.manager);return n.setPath(this.decoderPath),n.setResponseType(e),n.setWithCredentials(this.withCredentials),new Promise((s,r)=>{n.load(t,s,void 0,r)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const t=typeof WebAssembly!="object"||this.decoderConfig.type==="js",e=[];return t?e.push(this._loadLibrary("draco_decoder.js","text")):(e.push(this._loadLibrary("draco_wasm_wrapper.js","text")),e.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(e).then(n=>{const s=n[0];t||(this.decoderConfig.wasmBinary=n[1]);const r=Bs.toString(),o=["/* draco decoder */",s,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join(`
|
|
1
|
+
import{_ as U}from"./extends-CF3RwP-h.js";import{r as T}from"./index-nmcBqr7Y.js";import"./three.module-BLhyNg0e.js";import{a as ue}from"./BufferGeometryUtils-FJZNEiJN.js";import{du as Pe,n as Ne,fq as re,dq as oe,l as Ee,fo as y,cm as x,dp as Be,eu as we,ca as Me,cb as Q,aZ as j,cw as g,fd as Ie,_ as K,eC as ve,dd as Qe,aE as _e,bu as ke,br as Xe,cW as De,eX as Ye,bm as je,M as _,bz as Ze,c5 as Re,cH as We,c6 as Ve,cI as qe,c1 as Te,cE as ze,ed as ie,cA as $e,Y as et,dg as tt,ch as q,bX as st,cx as ge,aI as nt,cp as v,dk as rt,N as He,ev as ot,co as Je,c0 as it,bV as at,b$ as At,df as ct,bh as z,d9 as Bt,cj as lt,d5 as Ct,et as ut,F as dt,bC as ht,bD as be,bA as ft,eW as de,cV as he,b4 as mt,bB as pt,I as Ft,ex as Gt,f3 as Et,f2 as Mt}from"./three.core-3arARmh6.js";import{G as le}from"./events-156d8d12.esm-DmeaOP4r.js";const It=parseInt(Pe.replace(/\D+/g,""));function Le(C,t,e={}){const n=new y,s=new Be,r=new y,o=new x,a=new x,i=new x;e.preserveMatrix=e.preserveMatrix!==void 0?e.preserveMatrix:!0,e.preservePosition=e.preservePosition!==void 0?e.preservePosition:!0,e.preserveHipPosition=e.preserveHipPosition!==void 0?e.preserveHipPosition:!1,e.useTargetMatrix=e.useTargetMatrix!==void 0?e.useTargetMatrix:!1,e.hip=e.hip!==void 0?e.hip:"hip",e.names=e.names||{};const A=t.isObject3D?t.skeleton.bones:Z(t),c=C.isObject3D?C.skeleton.bones:Z(C);let B,l,u,d,f;if(C.isObject3D?C.skeleton.pose():(e.useTargetMatrix=!0,e.preserveMatrix=!1),e.preservePosition){f=[];for(let h=0;h<c.length;h++)f.push(c[h].position.clone())}if(e.preserveMatrix){C.updateMatrixWorld(),C.matrixWorld.identity();for(let h=0;h<C.children.length;++h)C.children[h].updateMatrixWorld(!0)}if(e.offsets){B=[];for(let h=0;h<c.length;++h)l=c[h],u=e.names[l.name]||l.name,e.offsets[u]&&(l.matrix.multiply(e.offsets[u]),l.matrix.decompose(l.position,l.quaternion,l.scale),l.updateMatrixWorld()),B.push(l.matrixWorld.clone())}for(let h=0;h<c.length;++h){if(l=c[h],u=e.names[l.name]||l.name,d=ye(u,A),i.copy(l.matrixWorld),d){if(d.updateMatrixWorld(),e.useTargetMatrix?a.copy(d.matrixWorld):(a.copy(C.matrixWorld).invert(),a.multiply(d.matrixWorld)),r.setFromMatrixScale(a),a.scale(r.set(1/r.x,1/r.y,1/r.z)),i.makeRotationFromQuaternion(s.setFromRotationMatrix(a)),C.isObject3D){const m=c.indexOf(l),p=B?B[m]:o.copy(C.skeleton.boneInverses[m]).invert();i.multiply(p)}i.copyPosition(a)}l.parent&&l.parent.isBone?(l.matrix.copy(l.parent.matrixWorld).invert(),l.matrix.multiply(i)):l.matrix.copy(i),e.preserveHipPosition&&u===e.hip&&l.matrix.setPosition(n.set(0,l.position.y,0)),l.matrix.decompose(l.position,l.quaternion,l.scale),l.updateMatrixWorld()}if(e.preservePosition)for(let h=0;h<c.length;++h)l=c[h],u=e.names[l.name]||l.name,u!==e.hip&&l.position.copy(f[h]);e.preserveMatrix&&C.updateMatrixWorld(!0)}function Dt(C,t,e,n={}){n.useFirstFramePosition=n.useFirstFramePosition!==void 0?n.useFirstFramePosition:!1,n.fps=n.fps!==void 0?n.fps:30,n.names=n.names||[],t.isObject3D||(t=Tt(t));const s=Math.round(e.duration*(n.fps/1e3)*1e3),r=1/n.fps,o=[],a=new Ne(t),i=Z(C.skeleton),A=[];let c,B,l,u,d;a.clipAction(e).play(),a.update(0),t.updateMatrixWorld();for(let f=0;f<s;++f){const h=f*r;Le(C,t,n);for(let m=0;m<i.length;++m)d=n.names[i[m].name]||i[m].name,l=ye(d,t.skeleton),l&&(B=i[m],u=A[m]=A[m]||{bone:B},n.hip===d&&(u.pos||(u.pos={times:new Float32Array(s),values:new Float32Array(s*3)}),n.useFirstFramePosition&&(f===0&&(c=B.position.clone()),B.position.sub(c)),u.pos.times[f]=h,B.position.toArray(u.pos.values,f*3)),u.quat||(u.quat={times:new Float32Array(s),values:new Float32Array(s*4)}),u.quat.times[f]=h,B.quaternion.toArray(u.quat.values,f*4));a.update(r),t.updateMatrixWorld()}for(let f=0;f<A.length;++f)u=A[f],u&&(u.pos&&o.push(new re(".bones["+u.bone.name+"].position",u.pos.times,u.pos.values)),o.push(new oe(".bones["+u.bone.name+"].quaternion",u.quat.times,u.quat.values)));return a.uncacheAction(e),new Ee(e.name,-1,o)}function Rt(C){const t=new Map,e=new Map,n=C.clone();return Oe(C,n,function(s,r){t.set(r,s),e.set(s,r)}),n.traverse(function(s){if(!s.isSkinnedMesh)return;const r=s,o=t.get(s),a=o.skeleton.bones;r.skeleton=o.skeleton.clone(),r.bindMatrix.copy(o.bindMatrix),r.skeleton.bones=a.map(function(i){return e.get(i)}),r.bind(r.skeleton,r.bindMatrix)}),n}function ye(C,t){for(let e=0,n=Z(t);e<n.length;e++)if(C===n[e].name)return n[e]}function Z(C){return Array.isArray(C)?C:C.bones}function Tt(C){const t=new we(C.bones[0]);return t.skeleton=C,t}function Oe(C,t,e){e(C,t);for(let n=0;n<C.children.length;n++)Oe(C.children[n],t.children[n],e)}const gt={retarget:Le,retargetClip:Dt,clone:Rt};function W(C){if(typeof TextDecoder<"u")return new TextDecoder().decode(C);let t="";for(let e=0,n=C.length;e<n;e++)t+=String.fromCharCode(C[e]);try{return decodeURIComponent(escape(t))}catch{return t}}const S="srgb",J="srgb-linear",fe=3001,Ht=3e3;class Ce extends Me{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new Ot(e)}),this.register(function(e){return new St(e)}),this.register(function(e){return new _t(e)}),this.register(function(e){return new kt(e)}),this.register(function(e){return new Xt(e)}),this.register(function(e){return new Kt(e)}),this.register(function(e){return new Ut(e)}),this.register(function(e){return new Pt(e)}),this.register(function(e){return new Nt(e)}),this.register(function(e){return new yt(e)}),this.register(function(e){return new wt(e)}),this.register(function(e){return new xt(e)}),this.register(function(e){return new Qt(e)}),this.register(function(e){return new vt(e)}),this.register(function(e){return new bt(e)}),this.register(function(e){return new Yt(e)}),this.register(function(e){return new jt(e)})}load(t,e,n,s){const r=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const A=Q.extractUrlBase(t);o=Q.resolveURL(A,this.path)}else o=Q.extractUrlBase(t);this.manager.itemStart(t);const a=function(A){s?s(A):console.error(A),r.manager.itemError(t),r.manager.itemEnd(t)},i=new j(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(t,function(A){try{r.parse(A,o,function(c){e(c),r.manager.itemEnd(t)},a)}catch(c){a(c)}},n,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,n,s){let r;const o={},a={};if(typeof t=="string")r=JSON.parse(t);else if(t instanceof ArrayBuffer)if(W(new Uint8Array(t.slice(0,4)))===Se){try{o[F.KHR_BINARY_GLTF]=new Zt(t)}catch(c){s&&s(c);return}r=JSON.parse(o[F.KHR_BINARY_GLTF].content)}else r=JSON.parse(W(new Uint8Array(t)));else r=t;if(r.asset===void 0||r.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const i=new as(r,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});i.fileLoader.setRequestHeader(this.requestHeader);for(let A=0;A<this.pluginCallbacks.length;A++){const c=this.pluginCallbacks[A](i);c.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[c.name]=c,o[c.name]=!0}if(r.extensionsUsed)for(let A=0;A<r.extensionsUsed.length;++A){const c=r.extensionsUsed[A],B=r.extensionsRequired||[];switch(c){case F.KHR_MATERIALS_UNLIT:o[c]=new Lt;break;case F.KHR_DRACO_MESH_COMPRESSION:o[c]=new Wt(r,this.dracoLoader);break;case F.KHR_TEXTURE_TRANSFORM:o[c]=new Vt;break;case F.KHR_MESH_QUANTIZATION:o[c]=new qt;break;default:B.indexOf(c)>=0&&a[c]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+c+'".')}}i.setExtensions(o),i.setPlugins(a),i.parse(n,s)}parseAsync(t,e){const n=this;return new Promise(function(s,r){n.parse(t,e,s,r)})}}function Jt(){let C={};return{get:function(t){return C[t]},add:function(t,e){C[t]=e},remove:function(t){delete C[t]},removeAll:function(){C={}}}}const F={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class bt{constructor(t){this.parser=t,this.name=F.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let n=0,s=e.length;n<s;n++){const r=e[n];r.extensions&&r.extensions[this.name]&&r.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(t){const e=this.parser,n="light:"+t;let s=e.cache.get(n);if(s)return s;const r=e.json,i=((r.extensions&&r.extensions[this.name]||{}).lights||[])[t];let A;const c=new K(16777215);i.color!==void 0&&c.setRGB(i.color[0],i.color[1],i.color[2],J);const B=i.range!==void 0?i.range:0;switch(i.type){case"directional":A=new _e(c),A.target.position.set(0,0,-1),A.add(A.target);break;case"point":A=new Qe(c),A.distance=B;break;case"spot":A=new ve(c),A.distance=B,i.spot=i.spot||{},i.spot.innerConeAngle=i.spot.innerConeAngle!==void 0?i.spot.innerConeAngle:0,i.spot.outerConeAngle=i.spot.outerConeAngle!==void 0?i.spot.outerConeAngle:Math.PI/4,A.angle=i.spot.outerConeAngle,A.penumbra=1-i.spot.innerConeAngle/i.spot.outerConeAngle,A.target.position.set(0,0,-1),A.add(A.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+i.type)}return A.position.set(0,0,0),A.decay=2,H(A,i),i.intensity!==void 0&&(A.intensity=i.intensity),A.name=e.createUniqueName(i.name||"light_"+t),s=Promise.resolve(A),e.cache.add(n,s),s}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){const e=this,n=this.parser,r=n.json.nodes[t],a=(r.extensions&&r.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(i){return n._getNodeRef(e.cache,a,i)})}}class Lt{constructor(){this.name=F.KHR_MATERIALS_UNLIT}getMaterialType(){return v}extendParams(t,e,n){const s=[];t.color=new K(1,1,1),t.opacity=1;const r=e.pbrMetallicRoughness;if(r){if(Array.isArray(r.baseColorFactor)){const o=r.baseColorFactor;t.color.setRGB(o[0],o[1],o[2],J),t.opacity=o[3]}r.baseColorTexture!==void 0&&s.push(n.assignTexture(t,"map",r.baseColorTexture,S))}return Promise.all(s)}}class yt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name].emissiveStrength;return r!==void 0&&(e.emissiveIntensity=r),Promise.resolve()}}class Ot{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];if(o.clearcoatFactor!==void 0&&(e.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&r.push(n.assignTexture(e,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&r.push(n.assignTexture(e,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(r.push(n.assignTexture(e,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const a=o.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new Ie(a,a)}return Promise.all(r)}}class St{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_DISPERSION}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name];return e.dispersion=r.dispersion!==void 0?r.dispersion:0,Promise.resolve()}}class xt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return o.iridescenceFactor!==void 0&&(e.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&r.push(n.assignTexture(e,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(e.iridescenceIOR=o.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&r.push(n.assignTexture(e,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(r)}}class Kt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_SHEEN}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[];e.sheenColor=new K(0,0,0),e.sheenRoughness=0,e.sheen=1;const o=s.extensions[this.name];if(o.sheenColorFactor!==void 0){const a=o.sheenColorFactor;e.sheenColor.setRGB(a[0],a[1],a[2],J)}return o.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&r.push(n.assignTexture(e,"sheenColorMap",o.sheenColorTexture,S)),o.sheenRoughnessTexture!==void 0&&r.push(n.assignTexture(e,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(r)}}class Ut{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return o.transmissionFactor!==void 0&&(e.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&r.push(n.assignTexture(e,"transmissionMap",o.transmissionTexture)),Promise.all(r)}}class Pt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_VOLUME}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];e.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&r.push(n.assignTexture(e,"thicknessMap",o.thicknessTexture)),e.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return e.attenuationColor=new K().setRGB(a[0],a[1],a[2],J),Promise.all(r)}}class Nt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_IOR}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const s=this.parser.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=s.extensions[this.name];return e.ior=r.ior!==void 0?r.ior:1.5,Promise.resolve()}}class wt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_SPECULAR}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];e.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&r.push(n.assignTexture(e,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return e.specularColor=new K().setRGB(a[0],a[1],a[2],J),o.specularColorTexture!==void 0&&r.push(n.assignTexture(e,"specularColorMap",o.specularColorTexture,S)),Promise.all(r)}}class vt{constructor(t){this.parser=t,this.name=F.EXT_MATERIALS_BUMP}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return e.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&r.push(n.assignTexture(e,"bumpMap",o.bumpTexture)),Promise.all(r)}}class Qt{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){const n=this.parser.json.materials[t];return!n.extensions||!n.extensions[this.name]?null:g}extendMaterialParams(t,e){const n=this.parser,s=n.json.materials[t];if(!s.extensions||!s.extensions[this.name])return Promise.resolve();const r=[],o=s.extensions[this.name];return o.anisotropyStrength!==void 0&&(e.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(e.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&r.push(n.assignTexture(e,"anisotropyMap",o.anisotropyTexture)),Promise.all(r)}}class _t{constructor(t){this.parser=t,this.name=F.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,n=e.json,s=n.textures[t];if(!s.extensions||!s.extensions[this.name])return null;const r=s.extensions[this.name],o=e.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,r.source,o)}}class kt{constructor(t){this.parser=t,this.name=F.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const e=this.name,n=this.parser,s=n.json,r=s.textures[t];if(!r.extensions||!r.extensions[e])return null;const o=r.extensions[e],a=s.images[o.source];let i=n.textureLoader;if(a.uri){const A=n.options.manager.getHandler(a.uri);A!==null&&(i=A)}return this.detectSupport().then(function(A){if(A)return n.loadTextureImage(t,o.source,i);if(s.extensionsRequired&&s.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Xt{constructor(t){this.parser=t,this.name=F.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const e=this.name,n=this.parser,s=n.json,r=s.textures[t];if(!r.extensions||!r.extensions[e])return null;const o=r.extensions[e],a=s.images[o.source];let i=n.textureLoader;if(a.uri){const A=n.options.manager.getHandler(a.uri);A!==null&&(i=A)}return this.detectSupport().then(function(A){if(A)return n.loadTextureImage(t,o.source,i);if(s.extensionsRequired&&s.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Yt{constructor(t){this.name=F.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,n=e.bufferViews[t];if(n.extensions&&n.extensions[this.name]){const s=n.extensions[this.name],r=this.parser.getDependency("buffer",s.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then(function(a){const i=s.byteOffset||0,A=s.byteLength||0,c=s.count,B=s.byteStride,l=new Uint8Array(a,i,A);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(c,B,l,s.mode,s.filter).then(function(u){return u.buffer}):o.ready.then(function(){const u=new ArrayBuffer(c*B);return o.decodeGltfBuffer(new Uint8Array(u),c,B,l,s.mode,s.filter),u})})}else return null}}class jt{constructor(t){this.name=F.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,n=e.nodes[t];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const s=e.meshes[n.mesh];for(const A of s.primitives)if(A.mode!==D.TRIANGLES&&A.mode!==D.TRIANGLE_STRIP&&A.mode!==D.TRIANGLE_FAN&&A.mode!==void 0)return null;const o=n.extensions[this.name].attributes,a=[],i={};for(const A in o)a.push(this.parser.getDependency("accessor",o[A]).then(c=>(i[A]=c,i[A])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(A=>{const c=A.pop(),B=c.isGroup?c.children:[c],l=A[0].count,u=[];for(const d of B){const f=new x,h=new y,m=new Be,p=new y(1,1,1),E=new ke(d.geometry,d.material,l);for(let G=0;G<l;G++)i.TRANSLATION&&h.fromBufferAttribute(i.TRANSLATION,G),i.ROTATION&&m.fromBufferAttribute(i.ROTATION,G),i.SCALE&&p.fromBufferAttribute(i.SCALE,G),E.setMatrixAt(G,f.compose(h,m,p));for(const G in i)if(G==="_COLOR_0"){const M=i[G];E.instanceColor=new Xe(M.array,M.itemSize,M.normalized)}else G!=="TRANSLATION"&&G!=="ROTATION"&&G!=="SCALE"&&d.geometry.setAttribute(G,i[G]);De.prototype.copy.call(E,d),this.parser.assignFinalMaterial(E),u.push(E)}return c.isGroup?(c.clear(),c.add(...u),c):u[0]}))}}const Se="glTF",w=12,me={JSON:1313821514,BIN:5130562};class Zt{constructor(t){this.name=F.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,w);if(this.header={magic:W(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Se)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-w,s=new DataView(t,w);let r=0;for(;r<n;){const o=s.getUint32(r,!0);r+=4;const a=s.getUint32(r,!0);if(r+=4,a===me.JSON){const i=new Uint8Array(t,w+r,o);this.content=W(i)}else if(a===me.BIN){const i=w+r;this.body=t.slice(i,i+o)}r+=o}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Wt{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=F.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const n=this.json,s=this.dracoLoader,r=t.extensions[this.name].bufferView,o=t.extensions[this.name].attributes,a={},i={},A={};for(const c in o){const B=ae[c]||c.toLowerCase();a[B]=o[c]}for(const c in t.attributes){const B=ae[c]||c.toLowerCase();if(o[c]!==void 0){const l=n.accessors[t.attributes[c]],u=P[l.componentType];A[B]=u.name,i[B]=l.normalized===!0}}return e.getDependency("bufferView",r).then(function(c){return new Promise(function(B,l){s.decodeDracoFile(c,function(u){for(const d in u.attributes){const f=u.attributes[d],h=i[d];h!==void 0&&(f.normalized=h)}B(u)},a,A,J,l)})})}}class Vt{constructor(){this.name=F.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}}class qt{constructor(){this.name=F.KHR_MESH_QUANTIZATION}}class xe extends pt{constructor(t,e,n,s){super(t,e,n,s)}copySampleValue_(t){const e=this.resultBuffer,n=this.sampleValues,s=this.valueSize,r=t*s*3+s;for(let o=0;o!==s;o++)e[o]=n[r+o];return e}interpolate_(t,e,n,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,i=a*2,A=a*3,c=s-e,B=(n-e)/c,l=B*B,u=l*B,d=t*A,f=d-A,h=-2*u+3*l,m=u-l,p=1-h,E=m-l+B;for(let G=0;G!==a;G++){const M=o[f+G+a],I=o[f+G+i]*c,R=o[d+G+a],N=o[d+G]*c;r[G]=p*M+E*I+h*R+m*N}return r}}const zt=new Be;class $t extends xe{interpolate_(t,e,n,s){const r=super.interpolate_(t,e,n,s);return zt.fromArray(r).normalize().toArray(r),r}}const D={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},P={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},pe={9728:ze,9729:Te,9984:qe,9985:Ve,9986:We,9987:Re},Fe={33071:et,33648:$e,10497:ie},$={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ae={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...It>=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},L={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},es={CUBICSPLINE:void 0,LINEAR:be,STEP:ht},ee={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function ts(C){return C.DefaultMaterial===void 0&&(C.DefaultMaterial=new ge({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:mt})),C.DefaultMaterial}function O(C,t,e){for(const n in e.extensions)C[n]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[n]=e.extensions[n])}function H(C,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(C.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function ss(C,t,e){let n=!1,s=!1,r=!1;for(let A=0,c=t.length;A<c;A++){const B=t[A];if(B.POSITION!==void 0&&(n=!0),B.NORMAL!==void 0&&(s=!0),B.COLOR_0!==void 0&&(r=!0),n&&s&&r)break}if(!n&&!s&&!r)return Promise.resolve(C);const o=[],a=[],i=[];for(let A=0,c=t.length;A<c;A++){const B=t[A];if(n){const l=B.POSITION!==void 0?e.getDependency("accessor",B.POSITION):C.attributes.position;o.push(l)}if(s){const l=B.NORMAL!==void 0?e.getDependency("accessor",B.NORMAL):C.attributes.normal;a.push(l)}if(r){const l=B.COLOR_0!==void 0?e.getDependency("accessor",B.COLOR_0):C.attributes.color;i.push(l)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(i)]).then(function(A){const c=A[0],B=A[1],l=A[2];return n&&(C.morphAttributes.position=c),s&&(C.morphAttributes.normal=B),r&&(C.morphAttributes.color=l),C.morphTargetsRelative=!0,C})}function ns(C,t){if(C.updateMorphTargets(),t.weights!==void 0)for(let e=0,n=t.weights.length;e<n;e++)C.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){const e=t.extras.targetNames;if(C.morphTargetInfluences.length===e.length){C.morphTargetDictionary={};for(let n=0,s=e.length;n<s;n++)C.morphTargetDictionary[e[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function rs(C){let t;const e=C.extensions&&C.extensions[F.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+te(e.attributes):t=C.indices+":"+te(C.attributes)+":"+C.mode,C.targets!==void 0)for(let n=0,s=C.targets.length;n<s;n++)t+=":"+te(C.targets[n]);return t}function te(C){let t="";const e=Object.keys(C).sort();for(let n=0,s=e.length;n<s;n++)t+=e[n]+":"+C[e[n]]+";";return t}function Ae(C){switch(C){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function os(C){return C.search(/\.jpe?g($|\?)/i)>0||C.search(/^data\:image\/jpeg/)===0?"image/jpeg":C.search(/\.webp($|\?)/i)>0||C.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const is=new x;class as{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new Jt,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,s=!1,r=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,s=navigator.userAgent.indexOf("Firefox")>-1,r=s?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||n||s&&r<98?this.textureLoader=new Ye(this.options.manager):this.textureLoader=new je(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new j(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const n=this,s=this.json,r=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){const a={scene:o[0][s.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:s.asset,parser:n,userData:{}};return O(r,a,s),H(a,s),Promise.all(n._invokeAll(function(i){return i.afterRoot&&i.afterRoot(a)})).then(function(){for(const i of a.scenes)i.updateMatrixWorld();t(a)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],n=this.json.meshes||[];for(let s=0,r=e.length;s<r;s++){const o=e[s].joints;for(let a=0,i=o.length;a<i;a++)t[o[a]].isBone=!0}for(let s=0,r=t.length;s<r;s++){const o=t[s];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(n[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,n){if(t.refs[e]<=1)return n;const s=n.clone(),r=(o,a)=>{const i=this.associations.get(o);i!=null&&this.associations.set(a,i);for(const[A,c]of o.children.entries())r(c,a.children[A])};return r(n,s),s.name+="_instance_"+t.uses[e]++,s}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let n=0;n<e.length;n++){const s=t(e[n]);if(s)return s}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const n=[];for(let s=0;s<e.length;s++){const r=t(e[s]);r&&n.push(r)}return n}getDependency(t,e){const n=t+":"+e;let s=this.cache.get(n);if(!s){switch(t){case"scene":s=this.loadScene(e);break;case"node":s=this._invokeOne(function(r){return r.loadNode&&r.loadNode(e)});break;case"mesh":s=this._invokeOne(function(r){return r.loadMesh&&r.loadMesh(e)});break;case"accessor":s=this.loadAccessor(e);break;case"bufferView":s=this._invokeOne(function(r){return r.loadBufferView&&r.loadBufferView(e)});break;case"buffer":s=this.loadBuffer(e);break;case"material":s=this._invokeOne(function(r){return r.loadMaterial&&r.loadMaterial(e)});break;case"texture":s=this._invokeOne(function(r){return r.loadTexture&&r.loadTexture(e)});break;case"skin":s=this.loadSkin(e);break;case"animation":s=this._invokeOne(function(r){return r.loadAnimation&&r.loadAnimation(e)});break;case"camera":s=this.loadCamera(e);break;default:if(s=this._invokeOne(function(r){return r!=this&&r.getDependency&&r.getDependency(t,e)}),!s)throw new Error("Unknown type: "+t);break}this.cache.add(n,s)}return s}getDependencies(t){let e=this.cache.get(t);if(!e){const n=this,s=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(s.map(function(r,o){return n.getDependency(t,o)})),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],n=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[F.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(r,o){n.load(Q.resolveURL(e.uri,s.path),r,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(n){const s=e.byteLength||0,r=e.byteOffset||0;return n.slice(r,r+s)})}loadAccessor(t){const e=this,n=this.json,s=this.json.accessors[t];if(s.bufferView===void 0&&s.sparse===void 0){const o=$[s.type],a=P[s.componentType],i=s.normalized===!0,A=new a(s.count*o);return Promise.resolve(new _(A,o,i))}const r=[];return s.bufferView!==void 0?r.push(this.getDependency("bufferView",s.bufferView)):r.push(null),s.sparse!==void 0&&(r.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),r.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(r).then(function(o){const a=o[0],i=$[s.type],A=P[s.componentType],c=A.BYTES_PER_ELEMENT,B=c*i,l=s.byteOffset||0,u=s.bufferView!==void 0?n.bufferViews[s.bufferView].byteStride:void 0,d=s.normalized===!0;let f,h;if(u&&u!==B){const m=Math.floor(l/u),p="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+m+":"+s.count;let E=e.cache.get(p);E||(f=new A(a,m*u,s.count*u/c),E=new Ze(f,u/c),e.cache.add(p,E)),h=new ft(E,i,l%u/c,d)}else a===null?f=new A(s.count*i):f=new A(a,l,s.count*i),h=new _(f,i,d);if(s.sparse!==void 0){const m=$.SCALAR,p=P[s.sparse.indices.componentType],E=s.sparse.indices.byteOffset||0,G=s.sparse.values.byteOffset||0,M=new p(o[1],E,s.sparse.count*m),I=new A(o[2],G,s.sparse.count*i);a!==null&&(h=new _(h.array.slice(),h.itemSize,h.normalized));for(let R=0,N=M.length;R<N;R++){const b=M[R];if(h.setX(b,I[R*i]),i>=2&&h.setY(b,I[R*i+1]),i>=3&&h.setZ(b,I[R*i+2]),i>=4&&h.setW(b,I[R*i+3]),i>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return h})}loadTexture(t){const e=this.json,n=this.options,r=e.textures[t].source,o=e.images[r];let a=this.textureLoader;if(o.uri){const i=n.manager.getHandler(o.uri);i!==null&&(a=i)}return this.loadTextureImage(t,r,a)}loadTextureImage(t,e,n){const s=this,r=this.json,o=r.textures[t],a=r.images[e],i=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[i])return this.textureCache[i];const A=this.loadImageSource(e,n).then(function(c){c.flipY=!1,c.name=o.name||a.name||"",c.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(c.name=a.uri);const l=(r.samplers||{})[o.sampler]||{};return c.magFilter=pe[l.magFilter]||Te,c.minFilter=pe[l.minFilter]||Re,c.wrapS=Fe[l.wrapS]||ie,c.wrapT=Fe[l.wrapT]||ie,s.associations.set(c,{textures:t}),c}).catch(function(){return null});return this.textureCache[i]=A,A}loadImageSource(t,e){const n=this,s=this.json,r=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(B=>B.clone());const o=s.images[t],a=self.URL||self.webkitURL;let i=o.uri||"",A=!1;if(o.bufferView!==void 0)i=n.getDependency("bufferView",o.bufferView).then(function(B){A=!0;const l=new Blob([B],{type:o.mimeType});return i=a.createObjectURL(l),i});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const c=Promise.resolve(i).then(function(B){return new Promise(function(l,u){let d=l;e.isImageBitmapLoader===!0&&(d=function(f){const h=new de(f);h.needsUpdate=!0,l(h)}),e.load(Q.resolveURL(B,r.path),d,void 0,u)})}).then(function(B){return A===!0&&a.revokeObjectURL(i),H(B,o),B.userData.mimeType=o.mimeType||os(o.uri),B}).catch(function(B){throw console.error("THREE.GLTFLoader: Couldn't load texture",i),B});return this.sourceCache[t]=c,c}assignTexture(t,e,n,s){const r=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),r.extensions[F.KHR_TEXTURE_TRANSFORM]){const a=n.extensions!==void 0?n.extensions[F.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const i=r.associations.get(o);o=r.extensions[F.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),r.associations.set(o,i)}}return s!==void 0&&(typeof s=="number"&&(s=s===fe?S:J),"colorSpace"in o?o.colorSpace=s:o.encoding=s===S?fe:Ht),t[e]=o,o})}assignFinalMaterial(t){const e=t.geometry;let n=t.material;const s=e.attributes.tangent===void 0,r=e.attributes.color!==void 0,o=e.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+n.uuid;let i=this.cache.get(a);i||(i=new tt,q.prototype.copy.call(i,n),i.color.copy(n.color),i.map=n.map,i.sizeAttenuation=!1,this.cache.add(a,i)),n=i}else if(t.isLine){const a="LineBasicMaterial:"+n.uuid;let i=this.cache.get(a);i||(i=new st,q.prototype.copy.call(i,n),i.color.copy(n.color),i.map=n.map,this.cache.add(a,i)),n=i}if(s||r||o){let a="ClonedMaterial:"+n.uuid+":";s&&(a+="derivative-tangents:"),r&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let i=this.cache.get(a);i||(i=n.clone(),r&&(i.vertexColors=!0),o&&(i.flatShading=!0),s&&(i.normalScale&&(i.normalScale.y*=-1),i.clearcoatNormalScale&&(i.clearcoatNormalScale.y*=-1)),this.cache.add(a,i),this.associations.set(i,this.associations.get(n))),n=i}t.material=n}getMaterialType(){return ge}loadMaterial(t){const e=this,n=this.json,s=this.extensions,r=n.materials[t];let o;const a={},i=r.extensions||{},A=[];if(i[F.KHR_MATERIALS_UNLIT]){const B=s[F.KHR_MATERIALS_UNLIT];o=B.getMaterialType(),A.push(B.extendParams(a,r,e))}else{const B=r.pbrMetallicRoughness||{};if(a.color=new K(1,1,1),a.opacity=1,Array.isArray(B.baseColorFactor)){const l=B.baseColorFactor;a.color.setRGB(l[0],l[1],l[2],J),a.opacity=l[3]}B.baseColorTexture!==void 0&&A.push(e.assignTexture(a,"map",B.baseColorTexture,S)),a.metalness=B.metallicFactor!==void 0?B.metallicFactor:1,a.roughness=B.roughnessFactor!==void 0?B.roughnessFactor:1,B.metallicRoughnessTexture!==void 0&&(A.push(e.assignTexture(a,"metalnessMap",B.metallicRoughnessTexture)),A.push(e.assignTexture(a,"roughnessMap",B.metallicRoughnessTexture))),o=this._invokeOne(function(l){return l.getMaterialType&&l.getMaterialType(t)}),A.push(Promise.all(this._invokeAll(function(l){return l.extendMaterialParams&&l.extendMaterialParams(t,a)})))}r.doubleSided===!0&&(a.side=nt);const c=r.alphaMode||ee.OPAQUE;if(c===ee.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,c===ee.MASK&&(a.alphaTest=r.alphaCutoff!==void 0?r.alphaCutoff:.5)),r.normalTexture!==void 0&&o!==v&&(A.push(e.assignTexture(a,"normalMap",r.normalTexture)),a.normalScale=new Ie(1,1),r.normalTexture.scale!==void 0)){const B=r.normalTexture.scale;a.normalScale.set(B,B)}if(r.occlusionTexture!==void 0&&o!==v&&(A.push(e.assignTexture(a,"aoMap",r.occlusionTexture)),r.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=r.occlusionTexture.strength)),r.emissiveFactor!==void 0&&o!==v){const B=r.emissiveFactor;a.emissive=new K().setRGB(B[0],B[1],B[2],J)}return r.emissiveTexture!==void 0&&o!==v&&A.push(e.assignTexture(a,"emissiveMap",r.emissiveTexture,S)),Promise.all(A).then(function(){const B=new o(a);return r.name&&(B.name=r.name),H(B,r),e.associations.set(B,{materials:t}),r.extensions&&O(s,B,r),B})}createUniqueName(t){const e=rt.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,n=this.extensions,s=this.primitiveCache;function r(a){return n[F.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(i){return Ge(i,a,e)})}const o=[];for(let a=0,i=t.length;a<i;a++){const A=t[a],c=rs(A),B=s[c];if(B)o.push(B.promise);else{let l;A.extensions&&A.extensions[F.KHR_DRACO_MESH_COMPRESSION]?l=r(A):l=Ge(new He,A,e),s[c]={primitive:A,promise:l},o.push(l)}}return Promise.all(o)}loadMesh(t){const e=this,n=this.json,s=this.extensions,r=n.meshes[t],o=r.primitives,a=[];for(let i=0,A=o.length;i<A;i++){const c=o[i].material===void 0?ts(this.cache):this.getDependency("material",o[i].material);a.push(c)}return a.push(e.loadGeometries(o)),Promise.all(a).then(function(i){const A=i.slice(0,i.length-1),c=i[i.length-1],B=[];for(let u=0,d=c.length;u<d;u++){const f=c[u],h=o[u];let m;const p=A[u];if(h.mode===D.TRIANGLES||h.mode===D.TRIANGLE_STRIP||h.mode===D.TRIANGLE_FAN||h.mode===void 0)m=r.isSkinnedMesh===!0?new ot(f,p):new Je(f,p),m.isSkinnedMesh===!0&&m.normalizeSkinWeights(),h.mode===D.TRIANGLE_STRIP?m.geometry=ue(m.geometry,Et):h.mode===D.TRIANGLE_FAN&&(m.geometry=ue(m.geometry,Mt));else if(h.mode===D.LINES)m=new it(f,p);else if(h.mode===D.LINE_STRIP)m=new at(f,p);else if(h.mode===D.LINE_LOOP)m=new At(f,p);else if(h.mode===D.POINTS)m=new ct(f,p);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+h.mode);Object.keys(m.geometry.morphAttributes).length>0&&ns(m,r),m.name=e.createUniqueName(r.name||"mesh_"+t),H(m,r),h.extensions&&O(s,m,h),e.assignFinalMaterial(m),B.push(m)}for(let u=0,d=B.length;u<d;u++)e.associations.set(B[u],{meshes:t,primitives:u});if(B.length===1)return r.extensions&&O(s,B[0],r),B[0];const l=new z;r.extensions&&O(s,l,r),e.associations.set(l,{meshes:t});for(let u=0,d=B.length;u<d;u++)l.add(B[u]);return l})}loadCamera(t){let e;const n=this.json.cameras[t],s=n[n.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?e=new Bt(lt.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):n.type==="orthographic"&&(e=new Ct(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),n.name&&(e.name=this.createUniqueName(n.name)),H(e,n),Promise.resolve(e)}loadSkin(t){const e=this.json.skins[t],n=[];for(let s=0,r=e.joints.length;s<r;s++)n.push(this._loadNodeShallow(e.joints[s]));return e.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",e.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(s){const r=s.pop(),o=s,a=[],i=[];for(let A=0,c=o.length;A<c;A++){const B=o[A];if(B){a.push(B);const l=new x;r!==null&&l.fromArray(r.array,A*16),i.push(l)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[A])}return new ut(a,i)})}loadAnimation(t){const e=this.json,n=this,s=e.animations[t],r=s.name?s.name:"animation_"+t,o=[],a=[],i=[],A=[],c=[];for(let B=0,l=s.channels.length;B<l;B++){const u=s.channels[B],d=s.samplers[u.sampler],f=u.target,h=f.node,m=s.parameters!==void 0?s.parameters[d.input]:d.input,p=s.parameters!==void 0?s.parameters[d.output]:d.output;f.node!==void 0&&(o.push(this.getDependency("node",h)),a.push(this.getDependency("accessor",m)),i.push(this.getDependency("accessor",p)),A.push(d),c.push(f))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(i),Promise.all(A),Promise.all(c)]).then(function(B){const l=B[0],u=B[1],d=B[2],f=B[3],h=B[4],m=[];for(let p=0,E=l.length;p<E;p++){const G=l[p],M=u[p],I=d[p],R=f[p],N=h[p];if(G===void 0)continue;G.updateMatrix&&G.updateMatrix();const b=n._createAnimationTracks(G,M,I,R,N);if(b)for(let V=0;V<b.length;V++)m.push(b[V])}return new Ee(r,void 0,m)})}createNodeMesh(t){const e=this.json,n=this,s=e.nodes[t];return s.mesh===void 0?null:n.getDependency("mesh",s.mesh).then(function(r){const o=n._getNodeRef(n.meshCache,s.mesh,r);return s.weights!==void 0&&o.traverse(function(a){if(a.isMesh)for(let i=0,A=s.weights.length;i<A;i++)a.morphTargetInfluences[i]=s.weights[i]}),o})}loadNode(t){const e=this.json,n=this,s=e.nodes[t],r=n._loadNodeShallow(t),o=[],a=s.children||[];for(let A=0,c=a.length;A<c;A++)o.push(n.getDependency("node",a[A]));const i=s.skin===void 0?Promise.resolve(null):n.getDependency("skin",s.skin);return Promise.all([r,Promise.all(o),i]).then(function(A){const c=A[0],B=A[1],l=A[2];l!==null&&c.traverse(function(u){u.isSkinnedMesh&&u.bind(l,is)});for(let u=0,d=B.length;u<d;u++)c.add(B[u]);return c})}_loadNodeShallow(t){const e=this.json,n=this.extensions,s=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];const r=e.nodes[t],o=r.name?s.createUniqueName(r.name):"",a=[],i=s._invokeOne(function(A){return A.createNodeMesh&&A.createNodeMesh(t)});return i&&a.push(i),r.camera!==void 0&&a.push(s.getDependency("camera",r.camera).then(function(A){return s._getNodeRef(s.cameraCache,r.camera,A)})),s._invokeAll(function(A){return A.createNodeAttachment&&A.createNodeAttachment(t)}).forEach(function(A){a.push(A)}),this.nodeCache[t]=Promise.all(a).then(function(A){let c;if(r.isBone===!0?c=new dt:A.length>1?c=new z:A.length===1?c=A[0]:c=new De,c!==A[0])for(let B=0,l=A.length;B<l;B++)c.add(A[B]);if(r.name&&(c.userData.name=r.name,c.name=o),H(c,r),r.extensions&&O(n,c,r),r.matrix!==void 0){const B=new x;B.fromArray(r.matrix),c.applyMatrix4(B)}else r.translation!==void 0&&c.position.fromArray(r.translation),r.rotation!==void 0&&c.quaternion.fromArray(r.rotation),r.scale!==void 0&&c.scale.fromArray(r.scale);return s.associations.has(c)||s.associations.set(c,{}),s.associations.get(c).nodes=t,c}),this.nodeCache[t]}loadScene(t){const e=this.extensions,n=this.json.scenes[t],s=this,r=new z;n.name&&(r.name=s.createUniqueName(n.name)),H(r,n),n.extensions&&O(e,r,n);const o=n.nodes||[],a=[];for(let i=0,A=o.length;i<A;i++)a.push(s.getDependency("node",o[i]));return Promise.all(a).then(function(i){for(let c=0,B=i.length;c<B;c++)r.add(i[c]);const A=c=>{const B=new Map;for(const[l,u]of s.associations)(l instanceof q||l instanceof de)&&B.set(l,u);return c.traverse(l=>{const u=s.associations.get(l);u!=null&&B.set(l,u)}),B};return s.associations=A(r),r})}_createAnimationTracks(t,e,n,s,r){const o=[],a=t.name?t.name:t.uuid,i=[];L[r.path]===L.weights?t.traverse(function(l){l.morphTargetInfluences&&i.push(l.name?l.name:l.uuid)}):i.push(a);let A;switch(L[r.path]){case L.weights:A=he;break;case L.rotation:A=oe;break;case L.position:case L.scale:A=re;break;default:switch(n.itemSize){case 1:A=he;break;case 2:case 3:default:A=re;break}break}const c=s.interpolation!==void 0?es[s.interpolation]:be,B=this._getArrayFromAccessor(n);for(let l=0,u=i.length;l<u;l++){const d=new A(i[l]+"."+L[r.path],e.array,B,c);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(d),o.push(d)}return o}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const n=Ae(e.constructor),s=new Float32Array(e.length);for(let r=0,o=e.length;r<o;r++)s[r]=e[r]*n;e=s}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(n){const s=this instanceof oe?$t:xe;return new s(this.times,this.values,this.getValueSize()/3,n)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function As(C,t,e){const n=t.attributes,s=new Ft;if(n.POSITION!==void 0){const a=e.json.accessors[n.POSITION],i=a.min,A=a.max;if(i!==void 0&&A!==void 0){if(s.set(new y(i[0],i[1],i[2]),new y(A[0],A[1],A[2])),a.normalized){const c=Ae(P[a.componentType]);s.min.multiplyScalar(c),s.max.multiplyScalar(c)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const r=t.targets;if(r!==void 0){const a=new y,i=new y;for(let A=0,c=r.length;A<c;A++){const B=r[A];if(B.POSITION!==void 0){const l=e.json.accessors[B.POSITION],u=l.min,d=l.max;if(u!==void 0&&d!==void 0){if(i.setX(Math.max(Math.abs(u[0]),Math.abs(d[0]))),i.setY(Math.max(Math.abs(u[1]),Math.abs(d[1]))),i.setZ(Math.max(Math.abs(u[2]),Math.abs(d[2]))),l.normalized){const f=Ae(P[l.componentType]);i.multiplyScalar(f)}a.max(i)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(a)}C.boundingBox=s;const o=new Gt;s.getCenter(o.center),o.radius=s.min.distanceTo(s.max)/2,C.boundingSphere=o}function Ge(C,t,e){const n=t.attributes,s=[];function r(o,a){return e.getDependency("accessor",o).then(function(i){C.setAttribute(a,i)})}for(const o in n){const a=ae[o]||o.toLowerCase();a in C.attributes||s.push(r(n[o],a))}if(t.indices!==void 0&&!C.index){const o=e.getDependency("accessor",t.indices).then(function(a){C.setIndex(a)});s.push(o)}return H(C,t),As(C,t,e),Promise.all(s).then(function(){return t.targets!==void 0?ss(C,t.targets,e):C})}const se=new WeakMap;class cs extends Me{constructor(t){super(t),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(t){return this.decoderPath=t,this}setDecoderConfig(t){return this.decoderConfig=t,this}setWorkerLimit(t){return this.workerLimit=t,this}load(t,e,n,s){const r=new j(this.manager);r.setPath(this.path),r.setResponseType("arraybuffer"),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(t,o=>{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(o,a).then(e).catch(s)},n,s)}decodeDracoFile(t,e,n,s){const r={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(t,r).then(e)}decodeGeometry(t,e){for(const i in e.attributeTypes){const A=e.attributeTypes[i];A.BYTES_PER_ELEMENT!==void 0&&(e.attributeTypes[i]=A.name)}const n=JSON.stringify(e);if(se.has(t)){const i=se.get(t);if(i.key===n)return i.promise;if(t.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const r=this.workerNextTaskID++,o=t.byteLength,a=this._getWorker(r,o).then(i=>(s=i,new Promise((A,c)=>{s._callbacks[r]={resolve:A,reject:c},s.postMessage({type:"decode",id:r,taskConfig:e,buffer:t},[t])}))).then(i=>this._createGeometry(i.geometry));return a.catch(()=>!0).then(()=>{s&&r&&this._releaseTask(s,r)}),se.set(t,{key:n,promise:a}),a}_createGeometry(t){const e=new He;t.index&&e.setIndex(new _(t.index.array,1));for(let n=0;n<t.attributes.length;n++){const s=t.attributes[n],r=s.name,o=s.array,a=s.itemSize;e.setAttribute(r,new _(o,a))}return e}_loadLibrary(t,e){const n=new j(this.manager);return n.setPath(this.decoderPath),n.setResponseType(e),n.setWithCredentials(this.withCredentials),new Promise((s,r)=>{n.load(t,s,void 0,r)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const t=typeof WebAssembly!="object"||this.decoderConfig.type==="js",e=[];return t?e.push(this._loadLibrary("draco_decoder.js","text")):(e.push(this._loadLibrary("draco_wasm_wrapper.js","text")),e.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(e).then(n=>{const s=n[0];t||(this.decoderConfig.wasmBinary=n[1]);const r=Bs.toString(),o=["/* draco decoder */",s,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join(`
|
|
2
2
|
`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(t,e){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const s=new Worker(this.workerSourceURL);s._callbacks={},s._taskCosts={},s._taskLoad=0,s.postMessage({type:"init",decoderConfig:this.decoderConfig}),s.onmessage=function(r){const o=r.data;switch(o.type){case"decode":s._callbacks[o.id].resolve(o);break;case"error":s._callbacks[o.id].reject(o);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+o.type+'"')}},this.workerPool.push(s)}else this.workerPool.sort(function(s,r){return s._taskLoad>r._taskLoad?-1:1});const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[t]=e,n._taskLoad+=e,n})}_releaseTask(t,e){t._taskLoad-=t._taskCosts[e],delete t._callbacks[e],delete t._taskCosts[e]}debug(){console.log("Task load: ",this.workerPool.map(t=>t._taskLoad))}dispose(){for(let t=0;t<this.workerPool.length;++t)this.workerPool[t].terminate();return this.workerPool.length=0,this}}function Bs(){let C,t;onmessage=function(o){const a=o.data;switch(a.type){case"init":C=a.decoderConfig,t=new Promise(function(c){C.onModuleLoaded=function(B){c({draco:B})},DracoDecoderModule(C)});break;case"decode":const i=a.buffer,A=a.taskConfig;t.then(c=>{const B=c.draco,l=new B.Decoder,u=new B.DecoderBuffer;u.Init(new Int8Array(i),i.byteLength);try{const d=e(B,l,u,A),f=d.attributes.map(h=>h.array.buffer);d.index&&f.push(d.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:d},f)}catch(d){console.error(d),self.postMessage({type:"error",id:a.id,error:d.message})}finally{B.destroy(u),B.destroy(l)}});break}};function e(o,a,i,A){const c=A.attributeIDs,B=A.attributeTypes;let l,u;const d=a.GetEncodedGeometryType(i);if(d===o.TRIANGULAR_MESH)l=new o.Mesh,u=a.DecodeBufferToMesh(i,l);else if(d===o.POINT_CLOUD)l=new o.PointCloud,u=a.DecodeBufferToPointCloud(i,l);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!u.ok()||l.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+u.error_msg());const f={index:null,attributes:[]};for(const h in c){const m=self[B[h]];let p,E;if(A.useUniqueIDs)E=c[h],p=a.GetAttributeByUniqueId(l,E);else{if(E=a.GetAttributeId(l,o[c[h]]),E===-1)continue;p=a.GetAttribute(l,E)}f.attributes.push(s(o,a,l,h,m,p))}return d===o.TRIANGULAR_MESH&&(f.index=n(o,a,l)),o.destroy(l),f}function n(o,a,i){const c=i.num_faces()*3,B=c*4,l=o._malloc(B);a.GetTrianglesUInt32Array(i,B,l);const u=new Uint32Array(o.HEAPF32.buffer,l,c).slice();return o._free(l),{array:u,itemSize:1}}function s(o,a,i,A,c,B){const l=B.num_components(),d=i.num_points()*l,f=d*c.BYTES_PER_ELEMENT,h=r(o,c),m=o._malloc(f);a.GetAttributeDataArrayForAllPoints(i,B,h,f,m);const p=new c(o.HEAPF32.buffer,m,d).slice();return o._free(m),{name:A,array:p,itemSize:l}}function r(o,a){switch(a){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let X;const ne=()=>{if(X)return X;const C="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZH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HGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let s=C;WebAssembly.validate(e)&&(s=t);let r;const o=WebAssembly.instantiate(a(s),{}).then(B=>{r=B.instance,r.exports.__wasm_call_ctors()});function a(B){const l=new Uint8Array(B.length);for(let d=0;d<B.length;++d){const f=B.charCodeAt(d);l[d]=f>96?f-71:f>64?f-65:f>47?f+4:f>46?63:62}let u=0;for(let d=0;d<B.length;++d)l[u++]=l[d]<60?n[l[d]]:(l[d]-60)*64+l[++d];return l.buffer.slice(0,u)}function i(B,l,u,d,f,h){const m=r.exports.sbrk,p=u+3&-4,E=m(p*d),G=m(f.length),M=new Uint8Array(r.exports.memory.buffer);M.set(f,G);const I=B(E,u,d,G,f.length);if(I===0&&h&&h(E,p,d),l.set(M.subarray(E,E+u*d)),m(E-m(0)),I!==0)throw new Error(`Malformed buffer data: ${I}`)}const A={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},c={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return X={ready:o,supported:!0,decodeVertexBuffer(B,l,u,d,f){i(r.exports.meshopt_decodeVertexBuffer,B,l,u,d,r.exports[A[f]])},decodeIndexBuffer(B,l,u,d){i(r.exports.meshopt_decodeIndexBuffer,B,l,u,d)},decodeIndexSequence(B,l,u,d){i(r.exports.meshopt_decodeIndexSequence,B,l,u,d)},decodeGltfBuffer(B,l,u,d,f,h){i(r.exports[c[f]],B,l,u,d,r.exports[A[h]])}},X};function ls(C,{keys:t=["near","far","color","distance","decay","penumbra","angle","intensity","skeleton","visible","castShadow","receiveShadow","morphTargetDictionary","morphTargetInfluences","name","geometry","material","position","rotation","scale","up","userData","bindMode","bindMatrix","bindMatrixInverse","skeleton"],deep:e,inject:n,castShadow:s,receiveShadow:r}){let o={};for(const a of t)o[a]=C[a];return e&&(o.geometry&&e!=="materialsOnly"&&(o.geometry=o.geometry.clone()),o.material&&e!=="geometriesOnly"&&(o.material=o.material.clone())),n&&(typeof n=="function"?o={...o,children:n(C)}:T.isValidElement(n)?o={...o,children:n}:o={...o,...n}),C instanceof Je&&(s&&(o.castShadow=!0),r&&(o.receiveShadow=!0)),o}const ce=T.forwardRef(({isChild:C=!1,object:t,children:e,deep:n,castShadow:s,receiveShadow:r,inject:o,keys:a,...i},A)=>{const c={keys:a,deep:n,inject:o,castShadow:s,receiveShadow:r};if(t=T.useMemo(()=>{if(C===!1&&!Array.isArray(t)){let d=!1;if(t.traverse(f=>{f.isSkinnedMesh&&(d=!0)}),d)return gt.clone(t)}return t},[t,C]),Array.isArray(t))return T.createElement("group",U({},i,{ref:A}),t.map(d=>T.createElement(ce,U({key:d.uuid,object:d},c))),e);const{children:B,...l}=ls(t,c),u=t.type[0].toLowerCase()+t.type.slice(1);return T.createElement(u,U({},l,i,{ref:A}),t.children.map(d=>d.type==="Bone"?T.createElement("primitive",U({key:d.uuid,object:d},c)):T.createElement(ce,U({key:d.uuid,object:d},c,{isChild:!0}))),e,B)});let Y=null,Ke="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function Ue(C=!0,t=!0,e){return n=>{e&&e(n),C&&(Y||(Y=new cs),Y.setDecoderPath(typeof C=="string"?C:Ke),n.setDRACOLoader(Y)),t&&n.setMeshoptDecoder(typeof ne=="function"?ne():ne)}}const k=(C,t,e,n)=>le(Ce,C,Ue(t,e,n));k.preload=(C,t,e,n)=>le.preload(Ce,C,Ue(t,e,n));k.clear=C=>le.clear(Ce,C);k.setDecoderPath=C=>{Ke=C};const Cs=T.forwardRef(({src:C,useDraco:t,useMeshOpt:e,extendLoader:n,...s},r)=>{const{scene:o}=k(C,t,e,n);return T.createElement(ce,U({ref:r},s,{object:o}))}),Fs=Object.freeze(Object.defineProperty({__proto__:null,Gltf:Cs,useGLTF:k},Symbol.toStringTag,{value:"Module"}));export{ce as C,Cs as G,Fs as a,W as d,k as u,It as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{r as o}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{aV as W,aW as H,aX as B,aY as M,aL as v,a6 as P,aZ as h,a_ as F}from"./index-
|
|
1
|
+
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{r as o}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{aV as W,aW as H,aX as B,aY as M,aL as v,a6 as P,aZ as h,a_ as F}from"./index-C7p_QQ7P.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";function q({assetPath:n,displayName:l}){const{sheetPath:i,frameName:t}=W(n),a=`/${i}`,[s,r]=o.useState(null),[x,p]=o.useState(t),[m,u]=o.useState("fit"),[j,I]=o.useState(null),w=o.useRef(null),[y,N]=o.useState({w:320,h:240}),f=x??t,g=f?s?.frames.find(c=>c.name===f)??null:null;o.useEffect(()=>{p(t),u("fit")},[t]),o.useEffect(()=>{if(!t){r(null);return}let c=!1;return fetch(`/${H(i)}`).then(d=>d.ok?d.text():null).then(d=>{c||!d||r(B(d))}).catch(()=>{c||r(null)}),()=>{c=!0}},[t,i]),o.useEffect(()=>{const c=w.current;if(!c)return;const d=new ResizeObserver(R=>{const S=R[0]?.contentRect;S&&N({w:Math.max(1,S.width-24),h:Math.max(1,S.height-24)})});return d.observe(c),()=>d.disconnect()},[]);const b=g?.sourceWidth??j?.w??0,$=g?.sourceHeight??j?.h??0,k=M(m,b,$,y.w,y.h),E=l??f??i.split("/").pop()??n;return e.jsxs("div",{"data-testid":"image-asset-document",style:{height:"100%",minHeight:240,display:"flex",flexDirection:"column",minWidth:0},children:[e.jsx(z,{title:E,srcWidth:b,srcHeight:$,scaleMode:m,scale:k,onScaleMode:u}),e.jsx(C,{stageRef:w,frameName:t,frame:g,sheet:s,sheetUrl:a,title:E,scale:k,onNatural:I}),s&&s.frames.length>1?e.jsx(L,{sheetUrl:a,frames:s.frames,activeName:f,onPick:p}):null]})}function z({title:n,srcWidth:l,srcHeight:i,scaleMode:t,scale:a,onScaleMode:s}){return e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:6,padding:"6px 8px"},children:[e.jsx(v,{tone:"dim",variant:"label",children:n}),l>0&&e.jsxs(v,{tone:"muted",variant:"code",children:[l," × ",i,t==="fit"?` · ${O(a)}`:""]}),e.jsx("span",{style:{flex:1}}),[1,4,8,"fit"].map(r=>e.jsx(P,{type:"button",size:"compact",shape:"segment","aria-pressed":t===r,variant:t===r?"primary":"secondary",onClick:()=>s(r),children:r==="fit"?"Fit":`${r}×`},String(r)))]})}function C({stageRef:n,frameName:l,frame:i,sheet:t,sheetUrl:a,title:s,scale:r,onNatural:x}){let p;return l&&!i?p=e.jsx(v,{tone:"muted",variant:"body",children:t?`No sprite named ${l}`:"Loading sprite…"}):i?p=e.jsx(F,{sheetUrl:a,frame:i,scale:r}):p=e.jsx("img",{src:a,alt:s,style:{imageRendering:"pixelated",display:"block",transform:`scale(${r})`,transformOrigin:"center center"},onLoad:m=>{const u=m.currentTarget;x({w:u.naturalWidth,h:u.naturalHeight})}}),e.jsx("div",{ref:n,className:"volter-asset-transparency-well","data-testid":"sprite-stage",style:{flex:1,minHeight:0,display:"flex",alignItems:"center",justifyContent:"center",overflow:"auto"},children:p})}function L({sheetUrl:n,frames:l,activeName:i,onPick:t}){return e.jsx("div",{"data-testid":"sprite-filmstrip",style:{display:"flex",gap:6,overflowX:"auto",padding:"8px 8px 10px",borderTop:`1px solid ${h[3]}`},children:l.map(a=>{const s=a.name===i;return e.jsxs("button",{type:"button",title:a.name,"aria-pressed":s,onClick:()=>t(a.name),style:{border:s?`1px solid ${h[1]}`:"1px solid transparent",background:"transparent",padding:2,cursor:"pointer",flex:"0 0 auto"},children:[e.jsx(F,{sheetUrl:n,frame:a,maxEdge:40}),e.jsx("div",{style:{fontSize:9,color:s?h[1]:h[3],maxWidth:56,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a.name})]},a.name)})})}function O(n){return n>=1?`${n}×`:`1/${Math.round(1/n)}×`}export{q as ImageViewer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{Object3DSnapshotDocument as m}from"./EntityModelDocument-Bd5HLKGv.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./editor-shell-store-sESsCCic.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-DvKAawE7.js";import"./workspace-arrangement-Bf-W4FYD.js";import"./index-C7p_QQ7P.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./user-data-UxjaQvdx.js";import"./entity-object-CR7fCzb1.js";import"./three-contract-Dkt6PmWY.js";import"./live-mixers-B-bwLZ7c.js";import"./asset-preview-BRUzjkTl.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-QDNP7a91.js";import"./studio-environment-CRvNlLp8.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./StageHost-BnK5_8Ju.js";import"./three-state-Cs7Th7ur.js";import"./standard-viewport-dressing-CcvhGvJG.js";import"./content-bounds-SMMmDnR9.js";import"./preview-renderer-BrYNFV1p.js";import"./live-gesture-lock-DJbrjOqf.js";import"./three-integration-CFjtFUU-.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./layered-pick-BDMgzWjy.js";import"./root-stacking-BEd9ZvxC.js";import"./model-thumbnail-Cj3_XSnl.js";import"./object3d-document-session-registry-DHi4wjTF.js";import"./component-instance-root-6vlZ9amU.js";import"./viewport-door-BN90Ep9y.js";import"./model-inspection-CJLzpxRV.js";import"./three-viewport-presentation-CzDAAyFp.js";import"./clip-planes-CnAI6DZn.js";import"./three-BJsmD65U.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./OrbitControls-B13MKuwC.js";import"./LineSegments2-DN9pUfWA.js";import"./three.quarks.esm-C_HmSKXo.js";import"./scene-framing-BFUJz9EH.js";import"./source-object3d-authoring-adapter-D_g43IL2.js";import"./three-projection-core-EmUNeP2k.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./transport-strip-DfMRjRNy.js";import"./viewport-surface-status-DdHGQbHo.js";function ut({previewKey:o,object:r,displayName:i,fill:p=!1}){return t.jsx("div",{"data-testid":"inspector-object-preview",style:p?{position:"absolute",inset:0,overflow:"hidden"}:{width:"100%",height:220,minHeight:220,borderBottom:"1px solid var(--volter-structural-divider)",overflow:"hidden",position:"relative"},children:t.jsx(m,{documentId:`inspector-preview:${o}`,source:r,displayName:i,active:!0,chromeless:!0})})}export{ut as InspectorObjectPreview};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DgapqSPi.js","assets/index-BP6wv2A0.js","assets/index-CJbYy-CF.js","assets/index-CanA16PU.js","assets/index-Bge9JUr6.js","assets/index-gHZae-lw.js","assets/index-BncK9THk.js","assets/index-IEjydI9d.js","assets/index-DUqP1RMl.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a}from"./jsx-runtime-DPjLkJKQ.js";import{r as m}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{al as t,_ as b,h8 as z,aU as F,h9 as M,b5 as J}from"./index-r-FuctN5.js";const P={ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",js:"typescript",jsx:"typescript",mjs:"typescript",cjs:"typescript",json:"json",jsonc:"json",json5:"json"};function re(e){const o=e.split("/").pop()??e,n=o.lastIndexOf(".");return n<0?"text":P[o.slice(n+1).toLowerCase()]??"text"}let T=null;function W(){return T??=Promise.all([b(()=>import("./index-BP6wv2A0.js"),[]),b(()=>import("./index-DgapqSPi.js").then(e=>e.i),__vite__mapDeps([0,1])),b(()=>import("./index-CJbYy-CF.js").then(e=>e.w),__vite__mapDeps([2,1,0])),b(()=>import("./index-CanA16PU.js"),__vite__mapDeps([3,0,1])),b(()=>import("./index-Bge9JUr6.js"),__vite__mapDeps([4,1,0,2])),b(()=>import("./index-gHZae-lw.js"),__vite__mapDeps([5,6,2,1,0])),b(()=>import("./index-IEjydI9d.js"),__vite__mapDeps([7,6,2,1,0])),b(()=>import("./index-DUqP1RMl.js"),__vite__mapDeps([8,0,1,2]))]).then(([e,o,n,r,c,s,l,d])=>({state:e,view:o,language:n,search:r,commands:c,javascript:s,json:l,oneDark:d})),T}function S(e){return typeof e=="number"?`${e}px`:e}function R(e){return typeof e=="string"&&e.trim().endsWith("%")}function U(e,o){let n=0;for(;n<e.length&&n<o.length&&e[n]===o[n];)n++;let r=e.length,c=o.length;for(;r>n&&c>n&&e[r-1]===o[c-1];)r--,c--;return{from:n,oldEnd:r,newEnd:c}}const L=1800,k=`color-mix(in srgb, ${t.semantic.warning} 42%, transparent)`,C=`color-mix(in srgb, ${t.semantic.warning} 18%, transparent)`;function G(e){class o extends e.view.WidgetType{constructor(s){super(),this.revision=s}eq(s){return this.revision===s.revision}toDOM(){const s=document.createElement("span");return s.className=`cm-source-deletion cm-source-change cm-source-change-${this.revision%2}`,s.setAttribute("aria-hidden","true"),s}}const n=e.state.StateEffect.define(),r=e.state.StateField.define({create:()=>e.view.Decoration.none,update(c,s){let l=c.map(s.changes);for(const d of s.effects){if(!d.is(n))continue;if(!d.value){l=e.view.Decoration.none;continue}const{from:f,to:i,revision:y}=d.value,g=f===i?e.view.Decoration.widget({widget:new o(y),side:-1}).range(f):e.view.Decoration.mark({class:`cm-source-change cm-source-change-${y%2}`}).range(f,i);l=e.view.Decoration.set([g])}return l},provide:c=>e.view.EditorView.decorations.from(c)});return{mark:n,field:r}}function K(e,o,n){return e.view.EditorView.theme({"&":{color:t.content.primary,backgroundColor:"transparent",fontSize:`${o}px`,...R(n)?{height:S(n)}:{}},"&.cm-focused":{outline:"none"},".cm-content":{fontFamily:t.typography.mono,padding:"2px 0",caretColor:"transparent"},".cm-scroller":{fontFamily:t.typography.mono,lineHeight:"1.5",overflow:"auto",...n===void 0?{}:{maxHeight:S(n)}},".cm-gutters":{backgroundColor:"transparent",color:t.content.dim,border:"none",userSelect:"none"},".cm-lineNumbers .cm-gutterElement":{padding:"0 8px 0 4px",minWidth:"2ch"},".cm-content ::selection":{backgroundColor:t.selection.background},".cm-panels":{backgroundColor:t.surface.raised,color:t.content.primary,border:"none",fontFamily:t.typography.sans},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${t.boundary.default}`},".cm-textfield":{backgroundColor:t.surface.inset,color:t.content.primary,border:`1px solid ${t.boundary.default}`,borderRadius:t.shape.small},".cm-button":{backgroundColor:t.surface.raised,backgroundImage:"none",color:t.content.primary,border:`1px solid ${t.boundary.default}`,borderRadius:t.shape.small},".cm-searchMatch":{backgroundColor:t.accent.muted},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:t.accent.default,color:t.content.onAccent},".cm-source-change":{backgroundColor:k,borderRadius:"2px"},".cm-line:has(.cm-source-change)":{backgroundColor:C},".cm-source-change, .cm-line:has(.cm-source-change)":{animationDuration:`${L}ms`,animationTimingFunction:"ease-out",animationFillMode:"forwards"},".cm-source-deletion":{display:"inline-block",width:"0",position:"relative"},".cm-source-deletion::after":{content:'""',position:"absolute",left:"-2px",bottom:"0",width:"4px",height:"1em",backgroundColor:"inherit",borderRadius:"2px"},".cm-source-change-0":{animationName:"volter-source-change-even"},".cm-source-change-1":{animationName:"volter-source-change-odd"},".cm-line:has(.cm-source-change-0)":{animationName:"volter-source-line-even"},".cm-line:has(.cm-source-change-1)":{animationName:"volter-source-line-odd"},"@keyframes volter-source-line-even":{"0%, 40%":{backgroundColor:C},"100%":{backgroundColor:"transparent"}},"@keyframes volter-source-line-odd":{"0%, 40%":{backgroundColor:C},"100%":{backgroundColor:"transparent"}},"@keyframes volter-source-change-even":{"0%, 40%":{backgroundColor:k},"100%":{backgroundColor:"transparent"}},"@keyframes volter-source-change-odd":{"0%, 40%":{backgroundColor:k},"100%":{backgroundColor:"transparent"}},"@media (prefers-reduced-motion: reduce)":{".cm-source-change, .cm-line:has(.cm-source-change)":{animation:"none"}},".cm-matchingBracket, &.cm-focused .cm-matchingBracket":{backgroundColor:t.neutralOverlay.active,outline:`1px solid ${t.boundary.strong}`}},{dark:!0})}function H(e,o,n,r){const c=o==="typescript"?[e.javascript.javascript({typescript:!0,jsx:!0})]:o==="json"?[e.json.json()]:[];return[e.view.lineNumbers(),e.view.highlightSpecialChars(),e.language.bracketMatching(),e.language.syntaxHighlighting(e.oneDark.oneDarkHighlightStyle),e.search.search({top:!0}),e.view.keymap.of([...e.commands.standardKeymap,...e.search.searchKeymap]),e.view.EditorView.lineWrapping,e.state.EditorState.readOnly.of(!0),e.view.EditorView.editable.of(!1),e.view.EditorView.contentAttributes.of({tabindex:"0"}),...c,K(e,n,r)]}function q({value:e,language:o,fontSize:n=11,maxHeight:r,ariaLabel:c,followChanges:s=!1}){const l=m.useRef(null),d=m.useRef(null),f=m.useRef(null),i=m.useRef(null),y=m.useRef(0),g=m.useRef(e);g.current=e;const[p,I]=m.useState(null),[N,$]=m.useState(!1);m.useEffect(()=>{let u=!1;return W().then(h=>{u||I(h)},()=>{u||$(!0)}),()=>{u=!0}},[]),m.useEffect(()=>{const u=l.current;if(!u||!p)return;const h=G(p),w=new p.view.EditorView({parent:u,state:p.state.EditorState.create({doc:g.current,extensions:[H(p,o,n,r),h.field]})});return d.current=w,f.current=h,()=>{i.current!==null&&clearTimeout(i.current),i.current=null,f.current=null,d.current=null,w.destroy()}},[p,o,n,r]),m.useEffect(()=>{const u=d.current;if(!u)return;const h=u.state.toText(e).toString(),w=u.state.doc.toString();if(w===h)return;const{from:x,oldEnd:B,newEnd:D}=U(w,h),O=u.state.changes({from:x,to:B,insert:h.slice(x,D)}),v=f.current,E=[];if(s&&p&&v){const _=u.coordsAtPos(x),j=u.scrollDOM.getBoundingClientRect(),A=_&&_.top>=j.top&&_.bottom<=j.bottom&&_.left>=j.left&&_.right<=j.right?u.scrollSnapshot().map(O):p.view.EditorView.scrollIntoView(x,{y:"nearest",x:"nearest"});A&&E.push(A),E.push(v.mark.of({from:x,to:D,revision:++y.current}))}else v&&E.push(v.mark.of(null));u.dispatch({changes:O,effects:E}),i.current!==null&&clearTimeout(i.current),i.current=null,s&&v&&(i.current=setTimeout(()=>{d.current===u&&u.dispatch({effects:v.mark.of(null)}),i.current=null},L))},[e,s,p]);const V=R(r)?{height:"100%",minHeight:0}:{};return p?a.jsx("div",{ref:l,role:"group","aria-label":c,style:{minWidth:0,...V}}):a.jsxs("div",{role:"group","aria-label":c,style:{minWidth:0,...V},children:[N&&a.jsx("div",{style:{color:t.semantic.warning,fontSize:10,marginBottom:4},children:"Syntax highlighting failed to load — showing plain text."}),a.jsx("pre",{style:{margin:0,fontFamily:t.typography.mono,fontSize:n,lineHeight:1.5,color:t.content.primary,whiteSpace:"pre-wrap",wordBreak:"break-word",overflow:"auto",...r===void 0?{}:{maxHeight:S(r)},...R(r)?{height:S(r)}:{}},children:e})]})}const X={fontSize:11,color:t.content.muted,marginBottom:2};function Y({assetPath:e}){const[o,n]=m.useState(null),[r,c]=m.useState("json"),[s,l]=m.useState(!1),d=e.split("/").pop()??e;return m.useEffect(()=>{let f=!1;return n(null),l(!1),fetch(z(e)).then(i=>i.text()).then(i=>{try{const y=JSON.parse(i);f||(c("json"),n(JSON.stringify(y,null,2)))}catch{f||(c("text"),n(i))}}).catch(()=>{f||l(!0)}),()=>{f=!0}},[e]),a.jsxs("div",{style:{padding:8,display:"flex",flexDirection:"column",gap:8},children:[a.jsx("div",{style:{fontWeight:600,fontSize:12,color:t.content.primary,wordBreak:"break-all"},children:d}),a.jsx("div",{className:"volter-content-frost",style:{border:`1px solid ${t.boundary.default}`,borderRadius:t.shape.small,padding:8,overflow:"hidden",maxHeight:500},children:s?a.jsx("span",{style:{color:t.semantic.danger,fontSize:11},children:"Failed to load file"}):o===null?a.jsx("span",{style:{color:t.content.muted,fontSize:11},children:"Loading..."}):a.jsx(q,{value:o,language:r,fontSize:10,maxHeight:484,ariaLabel:`Contents of ${d}`})}),a.jsx(F,{label:"Info",defaultOpen:!1,children:a.jsxs("div",{children:[a.jsx("div",{style:X,children:"Path"}),a.jsx("div",{style:{fontSize:11,color:t.content.primary,wordBreak:"break-all"},children:e})]})})]})}function Q({documentId:e,assetPath:o,displayName:n,active:r,sections:c,status:s}){const[l,d]=m.useState({kind:"loading"}),f=M();if(m.useEffect(()=>{if(!r){d({kind:"loading"});return}const i=new AbortController;return d({kind:"loading"}),(async()=>{for(const g of f){const p=await g.recognize(o,i.signal);if(p!==null)return{kind:"content",viewer:g,content:p}}return{kind:"generic"}})().then(g=>{i.signal.aborted||d(g)},g=>{i.signal.aborted||d({kind:"error",message:g instanceof Error?g.message:String(g)})}),()=>i.abort()},[r,o,f]),l.kind==="content"){const{Viewer:i}=l.viewer;return a.jsx(i,{documentId:e,assetPath:o,displayName:n,active:r,content:l.content})}return a.jsx(J,{documentId:e,active:r,type:"json",title:n,sections:c,status:s,children:l.kind==="loading"?a.jsxs("div",{style:{padding:20,color:t.content.muted},children:["Inspecting ",n,"…"]}):l.kind==="error"?a.jsx("div",{role:"alert",style:{padding:20,color:t.semantic.danger},children:l.message}):a.jsx(Y,{assetPath:o})})}const ie=Object.freeze(Object.defineProperty({__proto__:null,JsonAssetDocument:Q},Symbol.toStringTag,{value:"Module"}));export{q as C,Q as J,ie as a,re as c};
|
|
2
|
+
import{a}from"./jsx-runtime-DPjLkJKQ.js";import{r as m}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{al as t,_ as b,h8 as z,aU as F,h9 as M,b5 as J}from"./index-C7p_QQ7P.js";const P={ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",js:"typescript",jsx:"typescript",mjs:"typescript",cjs:"typescript",json:"json",jsonc:"json",json5:"json"};function re(e){const o=e.split("/").pop()??e,n=o.lastIndexOf(".");return n<0?"text":P[o.slice(n+1).toLowerCase()]??"text"}let T=null;function W(){return T??=Promise.all([b(()=>import("./index-BP6wv2A0.js"),[]),b(()=>import("./index-DgapqSPi.js").then(e=>e.i),__vite__mapDeps([0,1])),b(()=>import("./index-CJbYy-CF.js").then(e=>e.w),__vite__mapDeps([2,1,0])),b(()=>import("./index-CanA16PU.js"),__vite__mapDeps([3,0,1])),b(()=>import("./index-Bge9JUr6.js"),__vite__mapDeps([4,1,0,2])),b(()=>import("./index-gHZae-lw.js"),__vite__mapDeps([5,6,2,1,0])),b(()=>import("./index-IEjydI9d.js"),__vite__mapDeps([7,6,2,1,0])),b(()=>import("./index-DUqP1RMl.js"),__vite__mapDeps([8,0,1,2]))]).then(([e,o,n,r,c,s,l,d])=>({state:e,view:o,language:n,search:r,commands:c,javascript:s,json:l,oneDark:d})),T}function S(e){return typeof e=="number"?`${e}px`:e}function R(e){return typeof e=="string"&&e.trim().endsWith("%")}function U(e,o){let n=0;for(;n<e.length&&n<o.length&&e[n]===o[n];)n++;let r=e.length,c=o.length;for(;r>n&&c>n&&e[r-1]===o[c-1];)r--,c--;return{from:n,oldEnd:r,newEnd:c}}const L=1800,k=`color-mix(in srgb, ${t.semantic.warning} 42%, transparent)`,C=`color-mix(in srgb, ${t.semantic.warning} 18%, transparent)`;function G(e){class o extends e.view.WidgetType{constructor(s){super(),this.revision=s}eq(s){return this.revision===s.revision}toDOM(){const s=document.createElement("span");return s.className=`cm-source-deletion cm-source-change cm-source-change-${this.revision%2}`,s.setAttribute("aria-hidden","true"),s}}const n=e.state.StateEffect.define(),r=e.state.StateField.define({create:()=>e.view.Decoration.none,update(c,s){let l=c.map(s.changes);for(const d of s.effects){if(!d.is(n))continue;if(!d.value){l=e.view.Decoration.none;continue}const{from:f,to:i,revision:y}=d.value,g=f===i?e.view.Decoration.widget({widget:new o(y),side:-1}).range(f):e.view.Decoration.mark({class:`cm-source-change cm-source-change-${y%2}`}).range(f,i);l=e.view.Decoration.set([g])}return l},provide:c=>e.view.EditorView.decorations.from(c)});return{mark:n,field:r}}function K(e,o,n){return e.view.EditorView.theme({"&":{color:t.content.primary,backgroundColor:"transparent",fontSize:`${o}px`,...R(n)?{height:S(n)}:{}},"&.cm-focused":{outline:"none"},".cm-content":{fontFamily:t.typography.mono,padding:"2px 0",caretColor:"transparent"},".cm-scroller":{fontFamily:t.typography.mono,lineHeight:"1.5",overflow:"auto",...n===void 0?{}:{maxHeight:S(n)}},".cm-gutters":{backgroundColor:"transparent",color:t.content.dim,border:"none",userSelect:"none"},".cm-lineNumbers .cm-gutterElement":{padding:"0 8px 0 4px",minWidth:"2ch"},".cm-content ::selection":{backgroundColor:t.selection.background},".cm-panels":{backgroundColor:t.surface.raised,color:t.content.primary,border:"none",fontFamily:t.typography.sans},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${t.boundary.default}`},".cm-textfield":{backgroundColor:t.surface.inset,color:t.content.primary,border:`1px solid ${t.boundary.default}`,borderRadius:t.shape.small},".cm-button":{backgroundColor:t.surface.raised,backgroundImage:"none",color:t.content.primary,border:`1px solid ${t.boundary.default}`,borderRadius:t.shape.small},".cm-searchMatch":{backgroundColor:t.accent.muted},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:t.accent.default,color:t.content.onAccent},".cm-source-change":{backgroundColor:k,borderRadius:"2px"},".cm-line:has(.cm-source-change)":{backgroundColor:C},".cm-source-change, .cm-line:has(.cm-source-change)":{animationDuration:`${L}ms`,animationTimingFunction:"ease-out",animationFillMode:"forwards"},".cm-source-deletion":{display:"inline-block",width:"0",position:"relative"},".cm-source-deletion::after":{content:'""',position:"absolute",left:"-2px",bottom:"0",width:"4px",height:"1em",backgroundColor:"inherit",borderRadius:"2px"},".cm-source-change-0":{animationName:"volter-source-change-even"},".cm-source-change-1":{animationName:"volter-source-change-odd"},".cm-line:has(.cm-source-change-0)":{animationName:"volter-source-line-even"},".cm-line:has(.cm-source-change-1)":{animationName:"volter-source-line-odd"},"@keyframes volter-source-line-even":{"0%, 40%":{backgroundColor:C},"100%":{backgroundColor:"transparent"}},"@keyframes volter-source-line-odd":{"0%, 40%":{backgroundColor:C},"100%":{backgroundColor:"transparent"}},"@keyframes volter-source-change-even":{"0%, 40%":{backgroundColor:k},"100%":{backgroundColor:"transparent"}},"@keyframes volter-source-change-odd":{"0%, 40%":{backgroundColor:k},"100%":{backgroundColor:"transparent"}},"@media (prefers-reduced-motion: reduce)":{".cm-source-change, .cm-line:has(.cm-source-change)":{animation:"none"}},".cm-matchingBracket, &.cm-focused .cm-matchingBracket":{backgroundColor:t.neutralOverlay.active,outline:`1px solid ${t.boundary.strong}`}},{dark:!0})}function H(e,o,n,r){const c=o==="typescript"?[e.javascript.javascript({typescript:!0,jsx:!0})]:o==="json"?[e.json.json()]:[];return[e.view.lineNumbers(),e.view.highlightSpecialChars(),e.language.bracketMatching(),e.language.syntaxHighlighting(e.oneDark.oneDarkHighlightStyle),e.search.search({top:!0}),e.view.keymap.of([...e.commands.standardKeymap,...e.search.searchKeymap]),e.view.EditorView.lineWrapping,e.state.EditorState.readOnly.of(!0),e.view.EditorView.editable.of(!1),e.view.EditorView.contentAttributes.of({tabindex:"0"}),...c,K(e,n,r)]}function q({value:e,language:o,fontSize:n=11,maxHeight:r,ariaLabel:c,followChanges:s=!1}){const l=m.useRef(null),d=m.useRef(null),f=m.useRef(null),i=m.useRef(null),y=m.useRef(0),g=m.useRef(e);g.current=e;const[p,I]=m.useState(null),[N,$]=m.useState(!1);m.useEffect(()=>{let u=!1;return W().then(h=>{u||I(h)},()=>{u||$(!0)}),()=>{u=!0}},[]),m.useEffect(()=>{const u=l.current;if(!u||!p)return;const h=G(p),w=new p.view.EditorView({parent:u,state:p.state.EditorState.create({doc:g.current,extensions:[H(p,o,n,r),h.field]})});return d.current=w,f.current=h,()=>{i.current!==null&&clearTimeout(i.current),i.current=null,f.current=null,d.current=null,w.destroy()}},[p,o,n,r]),m.useEffect(()=>{const u=d.current;if(!u)return;const h=u.state.toText(e).toString(),w=u.state.doc.toString();if(w===h)return;const{from:x,oldEnd:B,newEnd:D}=U(w,h),O=u.state.changes({from:x,to:B,insert:h.slice(x,D)}),v=f.current,E=[];if(s&&p&&v){const _=u.coordsAtPos(x),j=u.scrollDOM.getBoundingClientRect(),A=_&&_.top>=j.top&&_.bottom<=j.bottom&&_.left>=j.left&&_.right<=j.right?u.scrollSnapshot().map(O):p.view.EditorView.scrollIntoView(x,{y:"nearest",x:"nearest"});A&&E.push(A),E.push(v.mark.of({from:x,to:D,revision:++y.current}))}else v&&E.push(v.mark.of(null));u.dispatch({changes:O,effects:E}),i.current!==null&&clearTimeout(i.current),i.current=null,s&&v&&(i.current=setTimeout(()=>{d.current===u&&u.dispatch({effects:v.mark.of(null)}),i.current=null},L))},[e,s,p]);const V=R(r)?{height:"100%",minHeight:0}:{};return p?a.jsx("div",{ref:l,role:"group","aria-label":c,style:{minWidth:0,...V}}):a.jsxs("div",{role:"group","aria-label":c,style:{minWidth:0,...V},children:[N&&a.jsx("div",{style:{color:t.semantic.warning,fontSize:10,marginBottom:4},children:"Syntax highlighting failed to load — showing plain text."}),a.jsx("pre",{style:{margin:0,fontFamily:t.typography.mono,fontSize:n,lineHeight:1.5,color:t.content.primary,whiteSpace:"pre-wrap",wordBreak:"break-word",overflow:"auto",...r===void 0?{}:{maxHeight:S(r)},...R(r)?{height:S(r)}:{}},children:e})]})}const X={fontSize:11,color:t.content.muted,marginBottom:2};function Y({assetPath:e}){const[o,n]=m.useState(null),[r,c]=m.useState("json"),[s,l]=m.useState(!1),d=e.split("/").pop()??e;return m.useEffect(()=>{let f=!1;return n(null),l(!1),fetch(z(e)).then(i=>i.text()).then(i=>{try{const y=JSON.parse(i);f||(c("json"),n(JSON.stringify(y,null,2)))}catch{f||(c("text"),n(i))}}).catch(()=>{f||l(!0)}),()=>{f=!0}},[e]),a.jsxs("div",{style:{padding:8,display:"flex",flexDirection:"column",gap:8},children:[a.jsx("div",{style:{fontWeight:600,fontSize:12,color:t.content.primary,wordBreak:"break-all"},children:d}),a.jsx("div",{className:"volter-content-frost",style:{border:`1px solid ${t.boundary.default}`,borderRadius:t.shape.small,padding:8,overflow:"hidden",maxHeight:500},children:s?a.jsx("span",{style:{color:t.semantic.danger,fontSize:11},children:"Failed to load file"}):o===null?a.jsx("span",{style:{color:t.content.muted,fontSize:11},children:"Loading..."}):a.jsx(q,{value:o,language:r,fontSize:10,maxHeight:484,ariaLabel:`Contents of ${d}`})}),a.jsx(F,{label:"Info",defaultOpen:!1,children:a.jsxs("div",{children:[a.jsx("div",{style:X,children:"Path"}),a.jsx("div",{style:{fontSize:11,color:t.content.primary,wordBreak:"break-all"},children:e})]})})]})}function Q({documentId:e,assetPath:o,displayName:n,active:r,sections:c,status:s}){const[l,d]=m.useState({kind:"loading"}),f=M();if(m.useEffect(()=>{if(!r){d({kind:"loading"});return}const i=new AbortController;return d({kind:"loading"}),(async()=>{for(const g of f){const p=await g.recognize(o,i.signal);if(p!==null)return{kind:"content",viewer:g,content:p}}return{kind:"generic"}})().then(g=>{i.signal.aborted||d(g)},g=>{i.signal.aborted||d({kind:"error",message:g instanceof Error?g.message:String(g)})}),()=>i.abort()},[r,o,f]),l.kind==="content"){const{Viewer:i}=l.viewer;return a.jsx(i,{documentId:e,assetPath:o,displayName:n,active:r,content:l.content})}return a.jsx(J,{documentId:e,active:r,type:"json",title:n,sections:c,status:s,children:l.kind==="loading"?a.jsxs("div",{style:{padding:20,color:t.content.muted},children:["Inspecting ",n,"…"]}):l.kind==="error"?a.jsx("div",{role:"alert",style:{padding:20,color:t.semantic.danger},children:l.message}):a.jsx(Y,{assetPath:o})})}const ie=Object.freeze(Object.defineProperty({__proto__:null,JsonAssetDocument:Q},Symbol.toStringTag,{value:"Module"}));export{q as C,Q as J,ie as a,re as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./jsx-runtime-DPjLkJKQ.js";import{gj as V,al as g,b8 as P,gk as U,gl as Z,Z as G,gm as J,gn as K}from"./index-
|
|
1
|
+
import{a as n}from"./jsx-runtime-DPjLkJKQ.js";import{gj as V,al as g,b8 as P,gk as U,gl as Z,Z as G,gm as J,gn as K}from"./index-C7p_QQ7P.js";import{r as f}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{d as S}from"./asset-preview-BRUzjkTl.js";import{r as Q,a as X}from"./object3d-document-session-registry-DHi4wjTF.js";import{O as Y}from"./Object3DDocumentViewport-Dutf8dw1.js";import{S as ee}from"./standard-viewport-dressing-CcvhGvJG.js";import{bh as te,I as re}from"./three.core-3arARmh6.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./editor-layers-DvKAawE7.js";import"./workspace-arrangement-Bf-W4FYD.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-QDNP7a91.js";import"./studio-environment-CRvNlLp8.js";import"./user-data-UxjaQvdx.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./viewport-surface-status-DdHGQbHo.js";import"./content-bounds-SMMmDnR9.js";class v extends Error{constructor(t){super(t.message),this.refusal=t,this.name="LiveModuleError"}}function oe(e){return Object.keys(e).filter(t=>t!=="__esModule"&&t!=="Symbol.toStringTag")}function T(e){return typeof e=="object"&&e!==null&&e.isObject3D===!0}function ne(e){if("default"in e)return{name:"default",value:e.default};const t=oe(e);return t.length===0?{kind:"not-a-model",message:"This module exports nothing."}:t.length>1?{kind:"not-a-model",message:`This module has no default export and ${t.length} named exports (${t.join(", ")}), so there is no single subject to build. A model module default-exports its builder.`}:{name:t[0],value:e[t[0]]}}function $(e){if(T(e))return{root:e};if(!e||typeof e!="object")return;const t=e;if(!T(t.root))return;const r=t.root;return Array.isArray(t.animations)&&r.animations.length===0&&(r.animations=t.animations),{root:r,...typeof t.dispose=="function"?{dispose:()=>t.dispose.call(e)}:{}}}function L(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e!="object")return typeof e;if(Array.isArray(e))return"an array";const t=Object.keys(e);return t.length>0?`an object with keys ${t.slice(0,8).join(", ")}`:"an object with no own keys"}const R="a model module returns a THREE.Object3D, or a build result `{ root, animations?, dispose? }` whose `root` is one.";async function ie(e,t){const r=$(t);if(r)return{...r,exportName:e};if(typeof t!="function")return{kind:"not-a-model",message:`Export '${e}' is ${L(t)}, not a function and not a model — `+R};let l;try{l=await t()}catch(i){return{kind:"import-failed",message:`Export '${e}' threw while building: ${H(i)}`,...i instanceof Error&&i.stack?{stack:i.stack}:{}}}const c=$(l);return c?{...c,exportName:e}:{kind:"not-a-model",message:`Export '${e}' ran but returned ${L(l)} — ${R}`}}function H(e){return e instanceof Error?e.message:String(e)}async function se(e,t,r){let l;try{l=await import(V(e,t,r))}catch(u){throw new v({kind:"import-failed",message:H(u),...u instanceof Error&&u.stack?{stack:u.stack}:{}})}const c=ne(l);if("kind"in c)throw new v(c);const i=await ie(c.name,c.value);if("kind"in i)throw new v(i);return i}const C={height:"100%",width:"100%",minHeight:0,display:"flex",position:"relative"},F={flex:1,minWidth:0,minHeight:0,display:"flex"};function ae(e,t){if(e.kind!=="import-failed")return{message:e.message};const r=K(t);return r?{message:r,stack:e.message}:{message:e.message,stack:e.stack}}function Be({documentId:e,projectRoot:t,modulePath:r,displayName:l,active:c,fallback:i}){const[u,w]=f.useState({status:"probing"}),[b,E]=f.useState(null),d=f.useMemo(()=>{const s=new te;return s.name=r.split("/").pop()??r,s},[r]),D=f.useRef(!1);f.useEffect(()=>{let s=!1,y=0,m=null,p=Promise.resolve(),k=null,x=null;const M=()=>{m&&(d.remove(m),d.animations=[],x?x():S(m),m=null,x=null)},B=(o,h)=>{M(),m=o,x=h,d.add(o),d.animations=o.animations,J(e)},I=(o,h)=>{if(o.kind==="not-a-model"&&!h){w({status:"fallback",reason:o.message});return}const a=ae(o,r);E(a),G.error(`${r}: ${a.message}`,"live-module"),h||w({status:"fallback",reason:o.message})},A=o=>s||o!==y,W=async()=>{y+=1;const o=y,h=Z();let a;try{a=await se(t,r,h)}catch(j){if(A(o))return;if(!(j instanceof v))throw j;k=j,I(j.refusal,m!==null);return}if(A(o)){a.dispose?a.dispose():S(a.root);return}B(a.root,a.dispose??null),k=null,U(r),E(null),w({status:"live",exportName:a.exportName})},O=()=>(p=W(),p),q=Q(e,async()=>{let o=O();for(;;){if(await o,s)throw new Error(`Document closed while rebuilding: ${r}`);if(o===p)break;o=p}if(k)throw k});O();const z=P();return()=>{s=!0,q(),z(),M()}},[d,e,r,t]),f.useEffect(()=>{if(u.status!=="live"||D.current)return;let s=0,y=0;const m=()=>{const p=X(e);if(p){D.current=!0,new re().setFromObject(d).isEmpty()||p.frame();return}++y>60||(s=requestAnimationFrame(m))};return s=requestAnimationFrame(m),()=>cancelAnimationFrame(s)},[d,e,u.status]);const _=f.useCallback(()=>({root:d,dispose(){}}),[d]);return u.status==="probing"?n.jsxs("div",{style:{padding:20,color:g.content.muted},children:["Inspecting ",l,"…"]}):u.status==="fallback"?n.jsxs("div",{style:C,children:[b?n.jsx(N,{failure:b}):null,n.jsx("div",{style:{...F,overflow:"auto"},children:i})]}):n.jsxs("div",{style:C,children:[n.jsx("div",{style:{...F,opacity:b?.35:1},children:n.jsx(Y,{documentId:e,sourcePath:r,displayName:l,build:_,active:c,assetType:"model module",cameraDirection:ee,modelSource:{kind:"project-file",path:r}})}),b?n.jsx(N,{failure:b}):null]})}function N({failure:e}){return n.jsxs("div",{role:"alert","data-testid":"live-module-error",style:{position:"absolute",top:8,left:8,right:8,zIndex:2,maxHeight:"60%",overflow:"auto",padding:"8px 10px",borderRadius:g.shape.small,background:g.surface.raised,border:`1px solid ${g.semantic.danger}`,color:g.semantic.danger,fontFamily:g.typography.mono,fontSize:11,lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word",pointerEvents:"auto"},children:[n.jsx("div",{style:{fontWeight:600},children:"This module did not build — showing the last good model."}),n.jsx("div",{style:{marginTop:4},children:e.message}),e.stack?n.jsx("div",{style:{marginTop:6,color:g.content.muted},children:e.stack}):null]})}export{Be as LiveModuleDocument};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{dR as z,gh as A,dT as N,dU as I,al as y,b5 as M,cP as k,dV as C,aS as P}from"./index-
|
|
1
|
+
import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{dR as z,gh as A,dT as N,dU as I,al as y,b5 as M,cP as k,dV as C,aS as P}from"./index-C7p_QQ7P.js";import{r as w}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{EffectComposer as F,LUT3DEffect as _,RenderPass as B,EffectPass as O}from"./index-DHhMOs_s.js";import{W as $}from"./three.module-BLhyNg0e.js";import{ca as G,ff as T,aZ as H,fo as L,as as V,c1 as R,Y as j,ej as W,A as Z,el as q,_ as D,d9 as X,bj as K,aE as Y,cx as v,ey as J,K as Q,db as ee,co as te}from"./three.core-3arARmh6.js";import{s as re}from"./asset-editor-persistence-Bd6-j3nh.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";class ne extends G{constructor(t){super(t),this.type=T}setType(t){return this.type=t,this}load(t,a,f,g){const n=new H(this.manager);n.setPath(this.path),n.setResponseType("text"),n.load(t,c=>{try{a(this.parse(c))}catch(e){g?g(e):console.error(e),this.manager.itemError(t)}},f,g)}parse(t){const a=/TITLE +"([^"]*)"/,f=/LUT_3D_SIZE +(\d+)/,g=/DOMAIN_MIN +([\d.]+) +([\d.]+) +([\d.]+)/,n=/DOMAIN_MAX +([\d.]+) +([\d.]+) +([\d.]+)/,c=/^([\d.e+-]+) +([\d.e+-]+) +([\d.e+-]+) *$/gm;let e=a.exec(t);const p=e!==null?e[1]:null;if(e=f.exec(t),e===null)throw new Error("LUTCubeLoader: Missing LUT_3D_SIZE information");const s=Number(e[1]),u=s**3*4,o=this.type===T?new Uint8Array(u):new Float32Array(u),d=new L(0,0,0),m=new L(1,1,1);if(e=g.exec(t),e!==null&&d.set(Number(e[1]),Number(e[2]),Number(e[3])),e=n.exec(t),e!==null&&m.set(Number(e[1]),Number(e[2]),Number(e[3])),d.x>m.x||d.y>m.y||d.z>m.z)throw new Error("LUTCubeLoader: Invalid input domain");const x=this.type===T?255:1;let h=0;for(;(e=c.exec(t))!==null;)o[h++]=Number(e[1])*x,o[h++]=Number(e[2])*x,o[h++]=Number(e[3])*x,o[h++]=x;const l=new V;return l.image.data=o,l.image.width=s,l.image.height=s,l.image.depth=s,l.type=this.type,l.magFilter=R,l.minFilter=R,l.wrapS=j,l.wrapT=j,l.wrapR=j,l.generateMipmaps=!1,l.needsUpdate=!0,{title:p,size:s,domainMin:d,domainMax:m,texture3D:l}}}function b(r){return r.split("/").pop()??r}function E(r,t,a){return Math.min(a,Math.max(t,r))}function U(r){return[r.x,r.y,r.z].map(t=>t.toFixed(2)).join(", ")}function se(){const r=new q;r.background=new D("#171a22");const t=new X(34,1,.1,100);t.position.set(6.6,4.6,8.8),t.lookAt(0,.7,0),r.add(new K("#dce8ff","#322a27",2.1));const a=new Y("#fff3db",3.8);a.position.set(4,7,5),r.add(a);const f=[],g=[],n=(s,u,o)=>{f.push(s),g.push(u);const d=new te(s,u);return d.position.set(...o),d.castShadow=!0,d.receiveShadow=!0,r.add(d),d},c=[["#e64d45",-2.4],["#e5ad42",-1.2],["#55b86a",0],["#47a9d8",1.2],["#8a68d7",2.4]];for(const[s,u]of c)n(new J(.48,48,32),new v({color:s,roughness:.3,metalness:.08}),[u,.65,0]);[.06,.18,.5,.82,1].forEach((s,u)=>{const o=Math.round(s*255);n(new Q(.78,.78,.78),new v({color:new D(`rgb(${o}, ${o}, ${o})`),roughness:.72}),[-2.4+u*1.2,1.85,-.1])});const p=n(new ee(9,6),new v({color:"#777b86",roughness:.92}),[0,.08,-1.8]);return p.rotation.x=-Math.PI/2,{scene:r,camera:t,dispose:()=>{for(const s of f)s.dispose();for(const s of g)s.dispose()}}}function oe({lut:r,settingsRef:t}){const a=w.useRef(null);return w.useEffect(()=>{const f=a.current;if(!f)return;let g=!1,n=0;const c=document.createElement("canvas");c.setAttribute("aria-label","LUT before and after preview"),c.style.width="100%",c.style.height="100%",c.style.display="block",f.replaceChildren(c);const e=new $({canvas:c,antialias:!0});e.outputColorSpace=W,e.toneMapping=Z,e.toneMappingExposure=1,e.shadowMap.enabled=!0;const p=se(),s=new F(e),u=new _(r.texture3D,{tetrahedralInterpolation:!0});s.addPass(new B(p.scene,p.camera)),s.addPass(new O(p.camera,u));const o={width:1,height:1},d=()=>{const l=t.current,S=Math.round(o.width*E(l.split,.05,.95));u.blendMode.opacity.value=E(l.intensity,0,1),u.tetrahedralInterpolation=l.tetrahedral,e.setScissorTest(!1),e.setRenderTarget(null),e.clear(),e.setScissorTest(!0),e.setScissor(0,0,S,o.height),e.render(p.scene,p.camera),e.setScissor(S,0,o.width-S,o.height),s.render(),e.setScissorTest(!1)},m=()=>{const l=f.getBoundingClientRect();o.width=Math.max(1,Math.floor(l.width)),o.height=Math.max(1,Math.floor(l.height)),e.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),e.setSize(o.width,o.height,!1),s.setSize(o.width,o.height),p.camera.aspect=o.width/o.height,p.camera.updateProjectionMatrix()};m(),d();const x=new ResizeObserver(()=>{m(),d()});x.observe(f);const h=()=>{g||(d(),n=requestAnimationFrame(h))};return n=requestAnimationFrame(h),()=>{g=!0,cancelAnimationFrame(n),x.disconnect(),s.dispose(),u.dispose(),p.dispose(),e.dispose(),c.remove()}},[r,t]),i.jsx("div",{ref:a,"data-testid":"lut-preview",style:{width:"100%",height:"100%",minHeight:260,background:"#171a22"}})}function ie({settings:r,onChange:t}){return i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,padding:4},children:[i.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:5,fontSize:11},children:["Intensity",i.jsx(C,{value:r.intensity,onChange:a=>t({...r,intensity:E(a,0,1)}),step:.01,precision:2})]}),i.jsxs("label",{style:{display:"flex",flexDirection:"column",gap:5,fontSize:11},children:["Comparison split",i.jsx(C,{value:r.split,onChange:a=>t({...r,split:E(a,.05,.95)}),step:.01,precision:2})]}),i.jsxs("label",{style:{display:"flex",alignItems:"center",gap:7,fontSize:11},children:[i.jsx(P,{checked:r.tetrahedral,onChange:a=>t({...r,tetrahedral:a.target.checked})}),"Tetrahedral interpolation"]}),i.jsx("div",{style:{color:y.content.muted,fontSize:10,lineHeight:1.45},children:"Preview controls are session-only. Bind the LUT and accepted intensity in the owning TSX post-processing composition."})]})}async function ae(r){const t=await k(r);if(t===null)throw new Error(`CUBE LUT not found: ${r}`);return new ne().parse(t)}function Ee({documentId:r,assetPath:t,active:a=!0}){const[f,g]=w.useState(0),[n,c]=w.useState(null),[e,p]=w.useState(null),[s,u]=w.useState({intensity:1,split:.5,tetrahedral:!0}),o=w.useRef(s);o.current=s,w.useEffect(()=>{if(a)return re(t,()=>g(m=>m+1))},[a,t]),w.useEffect(()=>{if(!a)return;let m=!1,x=null;return c(null),p(null),ae(t).then(h=>{if(x=h,m){h.texture3D.dispose();return}c(h)},h=>{m||p(h instanceof Error?h.message:String(h))}),()=>{m=!0,x?.texture3D.dispose()}},[a,t,f]);const d=w.useMemo(()=>[{id:"lut-profile",title:"Color Grade",icon:A,order:z,body:{kind:"custom",...n?{data:{title:n.title,size:n.size,domainMin:n.domainMin.toArray(),domainMax:n.domainMax.toArray()}}:{},render:()=>i.jsxs("div",{style:{display:"grid",gridTemplateColumns:"auto 1fr",gap:"6px 10px"},children:[i.jsx("span",{style:{color:y.content.muted},children:"Title"}),i.jsx("span",{children:n?.title||b(t)}),i.jsx("span",{style:{color:y.content.muted},children:"Cube"}),i.jsx("span",{children:n?`${n.size}³`:"—"}),i.jsx("span",{style:{color:y.content.muted},children:"Domain"}),i.jsx("span",{children:n?`${U(n.domainMin)} → ${U(n.domainMax)}`:"—"})]})}},{id:"lut-preview-settings",title:"Preview",icon:I,order:N,body:{kind:"custom",data:{...s},render:()=>i.jsx(ie,{settings:s,onChange:u})}}],[t,n,s]);return e?i.jsx(M,{documentId:r,active:a,type:"color grade",title:b(t),status:"CUBE LUT unavailable",children:i.jsx("div",{role:"alert",style:{padding:20,color:y.semantic.danger},children:e})}):n?i.jsx(M,{documentId:r,active:a,type:"color grade",title:b(t),sections:d,status:`CUBE LUT · ${n.size}³`,fill:!0,children:i.jsxs("div",{style:{position:"relative",width:"100%",height:"100%",minHeight:0,background:"#171a22"},children:[i.jsx(oe,{lut:n,settingsRef:o}),i.jsx("div",{style:{position:"absolute",left:12,top:12,padding:"4px 7px",borderRadius:4,background:"rgba(12,14,20,0.72)",color:"#f2f4f8",fontSize:10,pointerEvents:"none"},children:"Original"}),i.jsx("div",{style:{position:"absolute",right:12,top:12,padding:"4px 7px",borderRadius:4,background:"rgba(12,14,20,0.72)",color:"#f2f4f8",fontSize:10,pointerEvents:"none"},children:n.title||"Graded"})]})}):i.jsx(M,{documentId:r,active:a,type:"color grade",title:b(t),status:"Loading CUBE LUT",children:i.jsx("div",{style:{padding:20,color:y.content.muted},children:"Loading color grade…"})})}export{Ee as LutAssetDocument};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{r as e}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{al as a}from"./index-
|
|
1
|
+
import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{r as e}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{al as a}from"./index-C7p_QQ7P.js";import{l as w,d as f}from"./asset-preview-BRUzjkTl.js";import{m as x,l as E,c as S}from"./model-thumbnail-Cj3_XSnl.js";import{O as M}from"./StageHost-BnK5_8Ju.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./editor-layers-DvKAawE7.js";import"./workspace-arrangement-Bf-W4FYD.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-QDNP7a91.js";import"./studio-environment-CRvNlLp8.js";import"./user-data-UxjaQvdx.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./three-state-Cs7Th7ur.js";import"./editor-shell-store-sESsCCic.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./entity-object-CR7fCzb1.js";import"./three-contract-Dkt6PmWY.js";import"./standard-viewport-dressing-CcvhGvJG.js";import"./content-bounds-SMMmDnR9.js";import"./preview-renderer-BrYNFV1p.js";import"./live-mixers-B-bwLZ7c.js";import"./live-gesture-lock-DJbrjOqf.js";import"./three-integration-CFjtFUU-.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./layered-pick-BDMgzWjy.js";import"./root-stacking-BEd9ZvxC.js";import"./object3d-document-session-registry-DHi4wjTF.js";import"./component-instance-root-6vlZ9amU.js";import"./viewport-door-BN90Ep9y.js";import"./model-inspection-CJLzpxRV.js";import"./three-viewport-presentation-CzDAAyFp.js";import"./clip-planes-CnAI6DZn.js";import"./three-BJsmD65U.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./OrbitControls-B13MKuwC.js";import"./LineSegments2-DN9pUfWA.js";import"./three.quarks.esm-C_HmSKXo.js";import"./scene-framing-BFUJz9EH.js";import"./source-object3d-authoring-adapter-D_g43IL2.js";import"./three-projection-core-EmUNeP2k.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./transport-strip-DfMRjRNy.js";import"./viewport-surface-status-DdHGQbHo.js";function Co({documentId:g,assetPath:o,displayName:u,active:p}){const[b,n]=e.useState(null),[d,c]=e.useState(null);e.useEffect(()=>{if(!p){n(null);return}const m=new AbortController;let l=null;n(null),c(null);const i=x(o);return(i==="glb"||i==="gltf"||i==="spz"?w(o,m.signal):i?E({url:o,format:i}).then(S).then(r=>({root:r,sourceBytes:null})):Promise.reject(new Error(`No native Three.js model loader supports ${o}.`))).then(r=>{if(m.signal.aborted){f(r.root);return}l=r.root,n(r)},r=>{m.signal.aborted||c(r instanceof Error?r.message:String(r))}),()=>{m.abort(),l&&f(l)}},[p,o]);const t=b?.root??null,j=e.useCallback(()=>{if(!t)throw new Error(`Model asset ${o} is not loaded.`);return{root:t,animations:t.animations,dispose(){}}},[o,t]);return d?s.jsx("div",{role:"alert",style:{padding:20,color:a.semantic.danger},children:d}):t?s.jsx(M,{documentId:g,sourcePath:o,displayName:u,build:j,active:p,assetType:"model",modelSource:{kind:"project-file",path:o}}):s.jsxs("div",{style:{padding:20,color:a.content.muted},children:["Loading ",u,"…"]})}export{Co as ModelAssetDocument};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i}from"./index-nmcBqr7Y.js";import{r as s}from"./project-authoring-session-
|
|
1
|
+
import{r as i}from"./index-nmcBqr7Y.js";import{r as s}from"./project-authoring-session-CV-InH5U.js";import{Z as e}from"./index-C7p_QQ7P.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./edit-mode-authoring-Bm31X1cT.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";function A({store:r}){return i.useEffect(()=>{const t=s(r);return t.ready.catch(o=>{e.error(`Authoring session failed: ${o instanceof Error?o.message:String(o)}`,"authoring")}),t.dispose},[r]),null}export{A as ProjectAuthoringBootstrap};
|