@volter/game-editor 0.5.151 → 0.5.153

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.
Files changed (295) hide show
  1. package/BUNDLED_NOTICES +22 -22
  2. package/catalog/entries/blender.json +2 -2
  3. package/catalog/entries/music.json +2 -2
  4. package/dist/.vite/manifest.json +2134 -2134
  5. package/dist/assets/{AssetBudgetPanel-C4OyZCzx.js → AssetBudgetPanel-COT5CPZw.js} +3 -3
  6. package/dist/assets/{AudioViewer-C-hM8gd1.js → AudioViewer-DMRE21XH.js} +1 -1
  7. package/dist/assets/{CanvasBoardDocument-CzdU0n-s.js → CanvasBoardDocument-BmK9_lXf.js} +1 -1
  8. package/dist/assets/{CanvasSceneViewport-Y394P33k.js → CanvasSceneViewport-OM4uXHAK.js} +1 -1
  9. package/dist/assets/{ColorInput-CGEsse4C.js → ColorInput-Dnm8Nazb.js} +1 -1
  10. package/dist/assets/{ColorPicker-DHbzz5rN.js → ColorPicker-k3JlL39e.js} +1 -1
  11. package/dist/assets/{EntityModelDocument-DFlFF9ZG.js → EntityModelDocument-BMHAIoIS.js} +1 -1
  12. package/dist/assets/{EnvironmentAssetDocument-DwyxnuLl.js → EnvironmentAssetDocument-B8IVtF0x.js} +1 -1
  13. package/dist/assets/{GameplaySessionTimeline-D3uJXkLL.js → GameplaySessionTimeline-Dr8bvXjW.js} +1 -1
  14. package/dist/assets/{ImageViewer-CMjsK0tM.js → ImageViewer-l0lqIZmc.js} +1 -1
  15. package/dist/assets/InspectorObjectPreview-Ds4K87QV.js +1 -0
  16. package/dist/assets/{JsonAssetDocument-Bx4lstjN.js → JsonAssetDocument-CR0N0pwY.js} +1 -1
  17. package/dist/assets/{LiveModuleDocument-DqCrfGex.js → LiveModuleDocument-B1uTA8EX.js} +1 -1
  18. package/dist/assets/{LutAssetDocument-C1MHSRKw.js → LutAssetDocument-Byg2ceAX.js} +1 -1
  19. package/dist/assets/{ModelAssetDocument-BK7JHqWO.js → ModelAssetDocument-COBosW7J.js} +1 -1
  20. package/dist/assets/{NonThreeAuthoringBootstrap-BsNkQs2R.js → NonThreeAuthoringBootstrap-BlZ6VLs9.js} +1 -1
  21. package/dist/assets/{Object3DDocumentToolbar-Cbx4jB9p.js → Object3DDocumentToolbar-DpgcLvZG.js} +1 -1
  22. package/dist/assets/Object3DDocumentViewport-DOomYcNf.js +2 -0
  23. package/dist/assets/{Object3DPreview-Q4cXgeF6.js → Object3DPreview-CI7aV9Ay.js} +1 -1
  24. package/dist/assets/{OnlineAssetDetail-BizPmyVh.js → OnlineAssetDetail-CRry5kWV.js} +1 -1
  25. package/dist/assets/{PlayBar-BxgAn8p7.js → PlayBar-BYq6jz4b.js} +1 -1
  26. package/dist/assets/{QuarksAssetDocument-Da669euE.js → QuarksAssetDocument-8DvUrSFA.js} +1 -1
  27. package/dist/assets/{ReactCanvasControls-1kESx_ED.js → ReactCanvasControls-DTPA_IjA.js} +1 -1
  28. package/dist/assets/{RootSelectionOverlay-p79TNquo.js → RootSelectionOverlay-dqXpCtEp.js} +1 -1
  29. package/dist/assets/{ShaderAssetDocument-Cp41lQpx.js → ShaderAssetDocument-CmX9OaWU.js} +1 -1
  30. package/dist/assets/{ShadowEditor-BBe-rxfE.js → ShadowEditor-B95lVZH9.js} +1 -1
  31. package/dist/assets/{SourceAssetViewer-DqMZDRJA.js → SourceAssetViewer-DfHbo8WV.js} +1 -1
  32. package/dist/assets/{StageHost-H7VPZ-sR.js → StageHost-DZFTCu9C.js} +2 -2
  33. package/dist/assets/{StoryPreviewMount-s_1ftRRU.js → StoryPreviewMount-CUaypYWL.js} +1 -1
  34. package/dist/assets/{ThreeBoardDocument-BgnljUGT.js → ThreeBoardDocument-uDNZWHA2.js} +2 -2
  35. package/dist/assets/{ThreeIsolationSceneContent-B-IkLJrX.js → ThreeIsolationSceneContent-q4wNQ5j5.js} +1 -1
  36. package/dist/assets/{ToolObject3DPreview-LODJ6jfF.js → ToolObject3DPreview-D-ddMoR7.js} +1 -1
  37. package/dist/assets/{Toolbar-BzpxBtwB.js → Toolbar-CRrRoGb-.js} +1 -1
  38. package/dist/assets/{TransientHint-Blj0Zwn3.js → TransientHint-37tz5ilD.js} +1 -1
  39. package/dist/assets/{VideoViewer-BUa_MOhs.js → VideoViewer-CRg3sZZ5.js} +1 -1
  40. package/dist/assets/{ViewportShadingMenu-FB4inp58.js → ViewportShadingMenu-khnF-5rl.js} +1 -1
  41. package/dist/assets/{active-ingest-Dc8fMyIX.js → active-ingest-DDiD7TmR.js} +2 -2
  42. package/dist/assets/{animation-clock-DhSUmCo9.js → animation-clock-RGIQa3_4.js} +1 -1
  43. package/dist/assets/{animation-mixers.service-DqipQxr4.js → animation-mixers.service-B11pGuNC.js} +1 -1
  44. package/dist/assets/{animation-timeline.utility-D1DmxJaZ.js → animation-timeline.utility-BOpA_GuL.js} +1 -1
  45. package/dist/assets/{asset-budget-asset.menu-USArAq-_.js → asset-budget-asset.menu-B7BMGz4z.js} +1 -1
  46. package/dist/assets/{asset-budget.action-BKj73eX6.js → asset-budget.action-DcqNeaXi.js} +1 -1
  47. package/dist/assets/{asset-budget.document-BwUxJOvx.js → asset-budget.document-DkzTd-tj.js} +1 -1
  48. package/dist/assets/{asset-budget.menu-CO1Y8QGj.js → asset-budget.menu-DdcxyAGG.js} +1 -1
  49. package/dist/assets/{asset-editor-persistence-CYGpUeVh.js → asset-editor-persistence-CJDaMcTd.js} +1 -1
  50. package/dist/assets/{asset-loaders-CfIRzkyi.js → asset-loaders-Bl90oMpq.js} +1 -1
  51. package/dist/assets/{asset-preview-BZnQsIhE.js → asset-preview-DwdoKfiH.js} +1 -1
  52. package/dist/assets/{audio-unlock.service-D-zkniJF.js → audio-unlock.service-CKNtyGNi.js} +1 -1
  53. package/dist/assets/{audio.utility-ChxQd5iC.js → audio.utility-DmrekKlL.js} +1 -1
  54. package/dist/assets/autoplay.service-CZSpA-xc.js +1 -0
  55. package/dist/assets/{babylon-authoring-adapter-DVjjjFhH.js → babylon-authoring-adapter-9f1fqAFt.js} +1 -1
  56. package/dist/assets/{binding-resolver-ByoEiLk3.js → binding-resolver-7rAg5Jej.js} +2 -2
  57. package/dist/assets/{blender-node-editor.document-Ck9wuQYQ.js → blender-node-editor.document-1l9JGdTD.js} +1 -1
  58. package/dist/assets/{blender-properties-tab-2Zt0ZgR2.js → blender-properties-tab-B23WFKLg.js} +1 -1
  59. package/dist/assets/{blender-runtime-host-RaX-JAxZ.js → blender-runtime-host-rJWhIotV.js} +1 -1
  60. package/dist/assets/{blender-runtime-skin-BPulw3QH.js → blender-runtime-skin--mzxhdjc.js} +10 -10
  61. package/dist/assets/{blender-runtime.document-BAJAZjHz.js → blender-runtime.document-CK4gr3ob.js} +1 -1
  62. package/dist/assets/{blender-screenshot.menu-Cji0_H9E.js → blender-screenshot.menu-DfHR9Ikt.js} +1 -1
  63. package/dist/assets/{blender-timeline.document-CrZMZeyq.js → blender-timeline.document-BcXTkwdE.js} +1 -1
  64. package/dist/assets/{blender-uv-editor.document-DknzAoYR.js → blender-uv-editor.document-B5MjcyYC.js} +1 -1
  65. package/dist/assets/{blender-version.status-CKMwIq_1.js → blender-version.status-Dug5-z9W.js} +1 -1
  66. package/dist/assets/{blender.command-C4atlb3V.js → blender.command-ltr84x9q.js} +1 -1
  67. package/dist/assets/{board-guides-C6HbbTzb.js → board-guides-lEXkcI9k.js} +1 -1
  68. package/dist/assets/{bridge.command-CCyUbh7E.js → bridge.command-BJOqmr68.js} +3 -3
  69. package/dist/assets/{browserAll-CKEAT607.js → browserAll-DN5JKMxx.js} +1 -1
  70. package/dist/assets/{build-player.document-BveNA1PX.js → build-player.document-CR1s328E.js} +1 -1
  71. package/dist/assets/{build-profiles.document-D1A4dKPQ.js → build-profiles.document-Be1rtDV4.js} +1 -1
  72. package/dist/assets/{build-progress.status-CfJ4X1n-.js → build-progress.status-B5dGWT1F.js} +1 -1
  73. package/dist/assets/{build-session-D24xsQBQ.js → build-session-knFdOyAp.js} +1 -1
  74. package/dist/assets/{build.action-BI1fZe7q.js → build.action-CRs05qHA.js} +1 -1
  75. package/dist/assets/{build.command-BOMulmqO.js → build.command-6IOT744s.js} +1 -1
  76. package/dist/assets/{build.header-VIt9ktol.js → build.header-CqgzlFUn.js} +1 -1
  77. package/dist/assets/{build.menu-pDI5oQAr.js → build.menu-nDtV4MGv.js} +1 -1
  78. package/dist/assets/{build.service-Dq0iuFBt.js → build.service-f3F8ThM8.js} +1 -1
  79. package/dist/assets/{camera-I5VuZBXq.js → camera-Ca5sJl-e.js} +1 -1
  80. package/dist/assets/{camera-runtime.inspector-BAqWCoHP.js → camera-runtime.inspector-Dnp0j47U.js} +1 -1
  81. package/dist/assets/{canvas-design-mount-DShSquA-.js → canvas-design-mount-DWX5xO7C.js} +3 -3
  82. package/dist/assets/{canvas-entry-runtime-CmAdA7mP.js → canvas-entry-runtime-CkkMjKp-.js} +2 -2
  83. package/dist/assets/{canvas-preview-frames-BvPr-5-l.js → canvas-preview-frames-C90KOiXB.js} +1 -1
  84. package/dist/assets/{canvas-story-capture.service-Dpu18cgz.js → canvas-story-capture.service-b0Z_kx_7.js} +2 -2
  85. package/dist/assets/{capability-coverage-ir5zRJFr.js → capability-coverage-BgQf1Nai.js} +1 -1
  86. package/dist/assets/{collaboration-presence-DcLJuuXB.js → collaboration-presence-BK8Or7sK.js} +1 -1
  87. package/dist/assets/{collider-CSWEaVtz.js → collider-B_jYR6L8.js} +1 -1
  88. package/dist/assets/{component-board.service-DjkOUQZz.js → component-board.service-CMACQo-j.js} +2 -2
  89. package/dist/assets/{component-board.service-CutL7t0X.js → component-board.service-DGWNpnxV.js} +2 -2
  90. package/dist/assets/{component-board.service-CUpcnwFS.js → component-board.service-D_FTa55M.js} +2 -2
  91. package/dist/assets/{component-contracts.service-CUBhlNfz.js → component-contracts.service-_tJurOxw.js} +1 -1
  92. package/dist/assets/{component-instance-root-Cx7gmDOy.js → component-instance-root-CHVZoBls.js} +1 -1
  93. package/dist/assets/{component-verbs.command-BBlkysLV.js → component-verbs.command-Ck3orYVO.js} +1 -1
  94. package/dist/assets/{component-verbs.service-CLbcq8Vw.js → component-verbs.service-DZxCcHcn.js} +1 -1
  95. package/dist/assets/{config-BV9SzGFv.js → config-D24VpFaM.js} +2 -2
  96. package/dist/assets/{configurations-Cqu8dn03.js → configurations-CkBgCKKN.js} +1 -1
  97. package/dist/assets/{connection.status-CHw4Imj2.js → connection.status-xgKQ4420.js} +1 -1
  98. package/dist/assets/{constraints.inspector-BiXBI0bD.js → constraints.inspector-CvFOIMfB.js} +1 -1
  99. package/dist/assets/{content-bounds-BNMGLm-D.js → content-bounds-Br3d7TSO.js} +1 -1
  100. package/dist/assets/{contract-system-adapters-BdX2f-t8.js → contract-system-adapters-BvT5JySD.js} +1 -1
  101. package/dist/assets/{coverage.service-es-q_QOo.js → coverage.service-bWGrF13-.js} +1 -1
  102. package/dist/assets/{create-runtime-euNCNG2m.js → create-runtime-SJyJUYVz.js} +1 -1
  103. package/dist/assets/{curve-DHSQYR7T.js → curve-gk4yDdla.js} +1 -1
  104. package/dist/assets/{data-asset-S8N2Hvn5.js → data-asset-C8eHntBA.js} +1 -1
  105. package/dist/assets/{data-ref-D-nT3-r8.js → data-ref-BaRaftlE.js} +1 -1
  106. package/dist/assets/{debug-bridge-30K18Jpj.js → debug-bridge-BquhIly_.js} +1 -1
  107. package/dist/assets/{debug-registry-9TuqM9UA.js → debug-registry-B9zz_E_L.js} +1 -1
  108. package/dist/assets/{deferred-ingest-play-Dybh7KIk.js → deferred-ingest-play-D0HByyPr.js} +2 -2
  109. package/dist/assets/{design-time-canvas-mount-f5v5SCXP.js → design-time-canvas-mount-CqjXMh8X.js} +2 -2
  110. package/dist/assets/{design-time-layers-C40Oj7df.js → design-time-layers-Cz7QvSeQ.js} +1 -1
  111. package/dist/assets/{design-time-mount.service-CNrBtii0.js → design-time-mount.service-Bmy7hj0j.js} +2 -2
  112. package/dist/assets/{design-time-mount.service-B0U0Otct.js → design-time-mount.service-DNSAXaEH.js} +2 -2
  113. package/dist/assets/{design-time-react-mount-CEHl-ZFu.js → design-time-react-mount-RVefTlBk.js} +1 -1
  114. package/dist/assets/{document-preview-three-AirIDFoZ.js → document-preview-three--Eve47TU.js} +1 -1
  115. package/dist/assets/{dom-authoring-adapter-Q3siA5LQ.js → dom-authoring-adapter-uBTd0U4p.js} +1 -1
  116. package/dist/assets/{draco3d-BJZx9d4M.js → draco3d-idRIgkHp.js} +1 -1
  117. package/dist/assets/{edit-mode-audio.service-BKnfc7io.js → edit-mode-audio.service-DuPwfO-B.js} +1 -1
  118. package/dist/assets/{edit-mode-authoring-DPKyu7IT.js → edit-mode-authoring-Cd1QiCit.js} +1 -1
  119. package/dist/assets/{edit-mode-networking.service-ZpDHLoMS.js → edit-mode-networking.service-7EJD0A-P.js} +1 -1
  120. package/dist/assets/{editor-api-D2CW0AGm.js → editor-api-BMcAhBEQ.js} +1 -1
  121. package/dist/assets/{editor-layers-KmhRTl5z.js → editor-layers-BslbZ8vZ.js} +1 -1
  122. package/dist/assets/{editor-shell-store-xXZ_3Vca.js → editor-shell-store-yk8VfWS2.js} +1 -1
  123. package/dist/assets/{entity-object-Cw5lqi8N.js → entity-object-C4AjSbJN.js} +1 -1
  124. package/dist/assets/{extend-BHlsCjW5.js → extend-D5fxvmvV.js} +1 -1
  125. package/dist/assets/{fork-menu-Dueo63LR.js → fork-menu-Buqh7uMA.js} +1 -1
  126. package/dist/assets/{frame-debugger-store-KBTiXI7n.js → frame-debugger-store-dX5zyZcB.js} +1 -1
  127. package/dist/assets/{game-contract-seams-B1hBrlH9.js → game-contract-seams-DBl7ECp0.js} +1 -1
  128. package/dist/assets/{game-css-scope-transform-C4ZW5_3P.js → game-css-scope-transform-C7ERCPFG.js} +1 -1
  129. package/dist/assets/{game-document.service-jRxnG9lB.js → game-document.service-BliGF1Qw.js} +1 -1
  130. package/dist/assets/{game-eval.command-BP8eKVxd.js → game-eval.command-DuuXERkl.js} +1 -1
  131. package/dist/assets/{game-module-access-C-BXp2nT.js → game-module-access-CTe5wARY.js} +1 -1
  132. package/dist/assets/{game-network-CPmpSW6X.js → game-network-CQnwf8gH.js} +3 -3
  133. package/dist/assets/{gameplay-export-CmD4JZ9f.js → gameplay-export-BS8I-246.js} +1 -1
  134. package/dist/assets/{gameplay-replay-B5D7VdTP.js → gameplay-replay-CIMXmCCL.js} +1 -1
  135. package/dist/assets/{gameplay.command-DZANiER_.js → gameplay.command-Y6a606-F.js} +1 -1
  136. package/dist/assets/{generation-jobs-A1hRT8nJ.js → generation-jobs-CEJplWaD.js} +1 -1
  137. package/dist/assets/{generation.service-Di_fDXLK.js → generation.service-CZCItl4z.js} +1 -1
  138. package/dist/assets/{generations-CzPRF5Sm.js → generations-C35WYmgJ.js} +1 -1
  139. package/dist/assets/{generations.status-CzJqXN9U.js → generations.status-CcA0TN6P.js} +1 -1
  140. package/dist/assets/{hierarchy-marks-CcI_j5WN.js → hierarchy-marks-C8NV4Hf2.js} +1 -1
  141. package/dist/assets/{hosted-asset-materialization-CAJOMSGd.js → hosted-asset-materialization-D8qhbsbz.js} +1 -1
  142. package/dist/assets/{index-G6H5rcTw.js → index-B9y3-Qhp.js} +1 -1
  143. package/dist/assets/{index-Bb_oU2AN.js → index-BAOJ-RTR.js} +1 -1
  144. package/dist/assets/{index-DxWuAdkn.js → index-CnhbbdTK.js} +1 -1
  145. package/dist/assets/{index-CbQOGPZ7.js → index-DL_Fr0Xc.js} +1 -1
  146. package/dist/assets/{index-D-bf1M-_.js → index-DO9Y98zJ.js} +259 -259
  147. package/dist/assets/{index-CdKnPNAZ.js → index-DZ9UrvTJ.js} +1 -1
  148. package/dist/assets/{index-CT82WIOK.js → index-IpGBlakk.js} +2 -2
  149. package/dist/assets/{index-y117JhHl.js → index-Mn_3lrf9.js} +1 -1
  150. package/dist/assets/{index-Cok_vZzh.js → index-TKfNwb9K.js} +1 -1
  151. package/dist/assets/{inference-diagnostics-zatIyL4O.js → inference-diagnostics-Ck7yIMYZ.js} +1 -1
  152. package/dist/assets/{ingest-boot-viewport-B8VmCRjT.js → ingest-boot-viewport-Bw9C8bIa.js} +1 -1
  153. package/dist/assets/{ingest-siblings-CU6iUlyk.js → ingest-siblings-JCVORfKV.js} +1 -1
  154. package/dist/assets/{ingest-source-persistence-C0Ex41I6.js → ingest-source-persistence-m93ua9L1.js} +1 -1
  155. package/dist/assets/{ingest.service-Cb529IMn.js → ingest.service-DD4ZgzV7.js} +1 -1
  156. package/dist/assets/{inspect-msIG8Qeu.js → inspect-DRlNIvT0.js} +1 -1
  157. package/dist/assets/instances.command-Bn-h8f9e.js +1 -0
  158. package/dist/assets/{json-history-resource-CTmpVR0-.js → json-history-resource-Cisi7uEc.js} +1 -1
  159. package/dist/assets/{layered-pick-DoJB09fE.js → layered-pick-Cxjz95BP.js} +1 -1
  160. package/dist/assets/{light-CgIm77Wo.js → light-ZOmz5hi9.js} +1 -1
  161. package/dist/assets/{live-project-verbs-DgMSiFrB.js → live-project-verbs-Cigqs3Fb.js} +1 -1
  162. package/dist/assets/{machine.document-StBuWcKq.js → machine.document-DxAFrz1x.js} +1 -1
  163. package/dist/assets/{machines.finder-BpHkAP3W.js → machines.finder-CjH2m0PY.js} +1 -1
  164. package/dist/assets/{material-factory-BjkdY_AZ.js → material-factory-Cbi58YtH.js} +1 -1
  165. package/dist/assets/{material-Bain34oO.js → material-w8dEwmnQ.js} +1 -1
  166. package/dist/assets/{mesh-C-o5rW8Q.js → mesh-AuzwGlCU.js} +1 -1
  167. package/dist/assets/{model-asset-sections.service-CtcsJdc3.js → model-asset-sections.service-BuXwrHGl.js} +1 -1
  168. package/dist/assets/{model-inspection-D1VGXQ6p.js → model-inspection-B7cwPCBg.js} +1 -1
  169. package/dist/assets/{model-thumbnail-CCE-pNSu.js → model-thumbnail-D8G6q7FW.js} +1 -1
  170. package/dist/assets/{models.finder-B361VkAD.js → models.finder-Br7nTfz3.js} +1 -1
  171. package/dist/assets/{module-mode-DSRb7X7Q.js → module-mode-C6IRWejw.js} +2 -2
  172. package/dist/assets/{mount-canvas-ingest-root-DGRh2uWc.js → mount-canvas-ingest-root-COCL-D1C.js} +2 -2
  173. package/dist/assets/{mount-dom-ingest-root-D5KBEgAI.js → mount-dom-ingest-root-DzWhnlGG.js} +2 -2
  174. package/dist/assets/{mount-ingest-root-C5ZYFXm7.js → mount-ingest-root-BAqykkyX.js} +2 -2
  175. package/dist/assets/{mount-manifest-BIj4lnEl.js → mount-manifest-2H667MV6.js} +1 -1
  176. package/dist/assets/{mount-three-ingest-root-BvEtSn1V.js → mount-three-ingest-root-BmCskQRW.js} +1 -1
  177. package/dist/assets/{mounted-authoring-D0nt0boC.js → mounted-authoring-DNOpzk2o.js} +1 -1
  178. package/dist/assets/{mounted-story-viewport-source-CxoI7KMz.js → mounted-story-viewport-source-BWmzBOmF.js} +1 -1
  179. package/dist/assets/{native-debug-module-UkvSJ8h6.js → native-debug-module-NkYpVcV7.js} +1 -1
  180. package/dist/assets/{navigation-CA77lEJc.js → navigation-D-ZtwicG.js} +1 -1
  181. package/dist/assets/{navmesh.menu-BENBP4AA.js → navmesh.menu-9dXNNERY.js} +1 -1
  182. package/dist/assets/{navmesh.service-BGHeQ1K1.js → navmesh.service-DFDXykjy.js} +1 -1
  183. package/dist/assets/network-observer.service-C73UCFcZ.js +1 -0
  184. package/dist/assets/{network.utility-CT3l1KVz.js → network.utility-DFDuR0vN.js} +1 -1
  185. package/dist/assets/object3d-document-session-registry-DZY0cjHC.js +2 -0
  186. package/dist/assets/{oid-transform-D_tqQSXR.js → oid-transform-C6wj7B_7.js} +1 -1
  187. package/dist/assets/{particles-B7YDnxCR.js → particles-C-yvqlX5.js} +1 -1
  188. package/dist/assets/{pixi-authoring-adapter-WIDqEfD_.js → pixi-authoring-adapter-DfF1VcO4.js} +1 -1
  189. package/dist/assets/{pixi-live-write-target-D6rZZgKb.js → pixi-live-write-target-iJZrIA6_.js} +1 -1
  190. package/dist/assets/{play.command-Be1-OEzn.js → play.command-DR2kV0xo.js} +2 -2
  191. package/dist/assets/{presentation-BaniJniW.js → presentation-CsQ93Fbc.js} +1 -1
  192. package/dist/assets/{product-D7gWfYmx.js → product-Bu-TgSCF.js} +1 -1
  193. package/dist/assets/{profiler.action-DrfqW7Fp.js → profiler.action-B1o7CjwN.js} +1 -1
  194. package/dist/assets/{profiler.menu-IXTa1fpI.js → profiler.menu-D74WZBCC.js} +1 -1
  195. package/dist/assets/{profiler.utility-DAoZhtos.js → profiler.utility-oI6PgMK5.js} +1 -1
  196. package/dist/assets/{project-authoring-session-BE90ZeWb.js → project-authoring-session-BDBM-g9G.js} +2 -2
  197. package/dist/assets/{properties-bone-constraints.inspector-BeXTuKoG.js → properties-bone-constraints.inspector-CJZR_NDC.js} +1 -1
  198. package/dist/assets/{properties-bone.inspector-CrZHkmoa.js → properties-bone.inspector-DeJ7yA5J.js} +1 -1
  199. package/dist/assets/{properties-collection.inspector-DsFvcEDW.js → properties-collection.inspector-_svAvZdb.js} +1 -1
  200. package/dist/assets/{properties-constraints.inspector-C2GveZn8.js → properties-constraints.inspector-Dk3JzQxY.js} +1 -1
  201. package/dist/assets/{properties-data.inspector-D3DisEY_.js → properties-data.inspector-CgqPfubV.js} +1 -1
  202. package/dist/assets/{properties-material.inspector-BPViYKtJ.js → properties-material.inspector-B68ieBGh.js} +1 -1
  203. package/dist/assets/{properties-modifiers.inspector-B903eYtf.js → properties-modifiers.inspector-CewGZwrV.js} +1 -1
  204. package/dist/assets/{properties-object.inspector-w6SFre_k.js → properties-object.inspector-KZvL65QT.js} +1 -1
  205. package/dist/assets/{properties-output.inspector-BiuWtJrv.js → properties-output.inspector-4yi0-Fup.js} +1 -1
  206. package/dist/assets/{properties-particles.inspector-B7CYK7pA.js → properties-particles.inspector-clqAS-dz.js} +1 -1
  207. package/dist/assets/{properties-physics.inspector-kc9VUPT-.js → properties-physics.inspector-CM7doX2T.js} +1 -1
  208. package/dist/assets/{properties-render.inspector-CnoLQedm.js → properties-render.inspector-CuwBafQR.js} +1 -1
  209. package/dist/assets/{properties-scene.inspector-DDRsqA41.js → properties-scene.inspector-dSmRbhhW.js} +1 -1
  210. package/dist/assets/{properties-texture.inspector-BkxLHc-i.js → properties-texture.inspector-BsjL86sP.js} +1 -1
  211. package/dist/assets/{properties-view-layer.inspector-Bxz7rl3F.js → properties-view-layer.inspector-CafLpoEs.js} +1 -1
  212. package/dist/assets/{properties-world.inspector-CKrRrca8.js → properties-world.inspector-BrIpVKP6.js} +1 -1
  213. package/dist/assets/{r3f-design-session-jS_TqqTC.js → r3f-design-session-CMACI0cV.js} +2 -2
  214. package/dist/assets/{r3f-physics-binding-Bs1QjbGv.js → r3f-physics-binding-CP2XIv0B.js} +1 -1
  215. package/dist/assets/{r3f-source-authoring-adapter-DokwQxG4.js → r3f-source-authoring-adapter-Bq_9scUN.js} +1 -1
  216. package/dist/assets/{react-canvas-navigation-DSYnw5Zp.js → react-canvas-navigation-D1JjRWj1.js} +1 -1
  217. package/dist/assets/{react-inspector.service-DCbojt3m.js → react-inspector.service-BOWT6GCe.js} +1 -1
  218. package/dist/assets/{react-story-board-DaNqP7VU.js → react-story-board-DnLUKvox.js} +1 -1
  219. package/dist/assets/{react-three-rapier.esm-D_HKfJNf.js → react-three-rapier.esm-Cxnn0g-e.js} +1 -1
  220. package/dist/assets/{react-world-authoring-adapter-aQJF6lY7.js → react-world-authoring-adapter-DGhaXMrv.js} +1 -1
  221. package/dist/assets/{realm-services-DOX3MdjT.js → realm-services-CQaYLWWQ.js} +1 -1
  222. package/dist/assets/{reflection-probe-capture.inspector-jbphsKpt.js → reflection-probe-capture.inspector-CLj1wjRB.js} +1 -1
  223. package/dist/assets/{registry-6AYLU18z.js → registry-Dg8u4mfv.js} +1 -1
  224. package/dist/assets/{relative-import-specifier-CEoSx6qX.js → relative-import-specifier-BIjiAOqT.js} +1 -1
  225. package/dist/assets/{render-env-GHmWAidt.js → render-env-lC8RffE1.js} +1 -1
  226. package/dist/assets/{render-features-BnN-3KIj.js → render-features-hdoOHmMx.js} +1 -1
  227. package/dist/assets/{render-settings-CdIopzph.js → render-settings-C182cqLD.js} +1 -1
  228. package/dist/assets/{resolve-three-B1MiWN_4.js → resolve-three-C3lRv4VL.js} +3 -3
  229. package/dist/assets/{root-seam-contract-CyHNRUVA.js → root-seam-contract-Ht2K79-w.js} +1 -1
  230. package/dist/assets/{run-selection-Dmdw5L3A.js → run-selection-BSXY1R5W.js} +1 -1
  231. package/dist/assets/{scene-capture-DNZ8tULq.js → scene-capture-CJwJjArj.js} +1 -1
  232. package/dist/assets/{scene-document.service-C3cH65I2.js → scene-document.service-Clcpdl24.js} +2 -2
  233. package/dist/assets/{scene-framing-Df1IIw8U.js → scene-framing-DMB6vJ3i.js} +1 -1
  234. package/dist/assets/{seeded-random-DJsnjfHE.js → seeded-random-DydBEgQ7.js} +1 -1
  235. package/dist/assets/{setup-renderer-B0BrvLJA.js → setup-renderer-CHLrpRvS.js} +1 -1
  236. package/dist/assets/{source-object3d-authoring-adapter-BkX86nvs.js → source-object3d-authoring-adapter-CsExGN7_.js} +1 -1
  237. package/dist/assets/{source-persistence-backend-5wzSP0Hv.js → source-persistence-backend-DqA9lnVr.js} +1 -1
  238. package/dist/assets/{stage-keyboard-BafIUlb1.js → stage-keyboard-XjXHhSiY.js} +1 -1
  239. package/dist/assets/{stage-overlay-set-P6sSedlY.js → stage-overlay-set-BsOcd2re.js} +1 -1
  240. package/dist/assets/{stage-presence-markers-D6fqD4cV.js → stage-presence-markers-CC-fXWJn.js} +1 -1
  241. package/dist/assets/{stage-transform-tools-C0HYMFKg.js → stage-transform-tools-DW8eKAUb.js} +1 -1
  242. package/dist/assets/{standard-viewport-dressing-CYrAwzFP.js → standard-viewport-dressing-Be6dNd4P.js} +1 -1
  243. package/dist/assets/{state-watch.action-eFcVnt40.js → state-watch.action-CdD7OaWi.js} +1 -1
  244. package/dist/assets/{state-watch.menu-BjfS6jPz.js → state-watch.menu-BXR0mCAr.js} +1 -1
  245. package/dist/assets/{state-watch.utility-DZ739lYu.js → state-watch.utility-DSMJQOuE.js} +1 -1
  246. package/dist/assets/{story-capture-DJz_km5a.js → story-capture-Dka6BvDM.js} +1 -1
  247. package/dist/assets/{story-documents-BLuVXMcG.js → story-documents-BxQdoYvf.js} +1 -1
  248. package/dist/assets/{story-documents.service-C8t8zDKt.js → story-documents.service-B6GKp2mn.js} +1 -1
  249. package/dist/assets/{story-documents.service-Nr2mlY6i.js → story-documents.service-CnjONYmi.js} +1 -1
  250. package/dist/assets/{story-media-presence-BMk1gvnk.js → story-media-presence-BgA3yjoo.js} +1 -1
  251. package/dist/assets/{story-pixi-preview-q-LdrkbO.js → story-pixi-preview-BbeyvH_K.js} +1 -1
  252. package/dist/assets/{story-presentation-Dq8lNMcW.js → story-presentation-BuLf21kF.js} +1 -1
  253. package/dist/assets/{story-three-preview-nb1nTNzG.js → story-three-preview-BMzllQUg.js} +2 -2
  254. package/dist/assets/{studio-environment-BAGHJ-DI.js → studio-environment-BSZaAWt_.js} +1 -1
  255. package/dist/assets/{surface-state-DeU08O7x.js → surface-state-CtYOtvrI.js} +1 -1
  256. package/dist/assets/{syntactic-prop-specs-CGQ5OGuF.js → syntactic-prop-specs-BVlPtDwc.js} +1 -1
  257. package/dist/assets/{team-playtest.service-CfwnHVT1.js → team-playtest.service-Clez2JlE.js} +1 -1
  258. package/dist/assets/{three-Blh8FcB2.js → three-BdwVQK5K.js} +1 -1
  259. package/dist/assets/{three-authoring-adapter-gR5zFyrx.js → three-authoring-adapter-DrnsQcV7.js} +1 -1
  260. package/dist/assets/three-authoring.service-O9VgQlSN.js +2 -0
  261. package/dist/assets/{three-ingest-runtime-DF6VCu5H.js → three-ingest-runtime-DD9SZ14b.js} +1 -1
  262. package/dist/assets/{three-integration-DCPe6kSM.js → three-integration-Cj19oGBd.js} +2 -2
  263. package/dist/assets/three-integration.service-k2tgcT6P.js +1 -0
  264. package/dist/assets/{three-projection-core-B5hJO7jz.js → three-projection-core-C_asJ7ul.js} +1 -1
  265. package/dist/assets/{three-state-BnjjVq1e.js → three-state-mkXrds9y.js} +1 -1
  266. package/dist/assets/{three-story-capture.service-B2GBKDpG.js → three-story-capture.service-DiP_7x1h.js} +2 -2
  267. package/dist/assets/{three-story-model-SlKZtTCQ.js → three-story-model-W_4SCHgD.js} +1 -1
  268. package/dist/assets/{three-viewport-presentation-JbkCfwHo.js → three-viewport-presentation-akSq4nTz.js} +1 -1
  269. package/dist/assets/{transform-mode-request-D1gRXuu6.js → transform-mode-request-BvFiZ4pM.js} +1 -1
  270. package/dist/assets/{transport-strip-gvNM76PW.js → transport-strip-BXQeoBiM.js} +1 -1
  271. package/dist/assets/transport.header-8hwFJgYv.js +1 -0
  272. package/dist/assets/{tuples-tnCRZFVA.js → tuples-BTr4ijGf.js} +1 -1
  273. package/dist/assets/{ui-board-document-18oVOMSi.js → ui-board-document-Cxc0v4Fl.js} +2 -2
  274. package/dist/assets/{user-data-BPYoci0m.js → user-data-BDCHzElD.js} +1 -1
  275. package/dist/assets/{utility-view-state-DcfNE5Gn.js → utility-view-state-Cs2E3NeI.js} +1 -1
  276. package/dist/assets/{viewport-door-DQc77Qy-.js → viewport-door-z35QJmUy.js} +1 -1
  277. package/dist/assets/{viewport-root-presentation-DW02euUT.js → viewport-root-presentation-azUCR1DF.js} +1 -1
  278. package/dist/assets/{viewport-surface-status-BeyOQmhG.js → viewport-surface-status-CFkMyJFU.js} +1 -1
  279. package/dist/assets/{webworkerAll-Bskpz0Su.js → webworkerAll-DOUIA1qm.js} +1 -1
  280. package/dist/assets/{workspace-arrangement-BWddjPjg.js → workspace-arrangement-ByMAV1d5.js} +1 -1
  281. package/dist/assets/{world-documents-AJRJlod0.js → world-documents-BG8NNlI3.js} +1 -1
  282. package/dist/assets/{world-root-stage-binding-DKfFhSZz.js → world-root-stage-binding-DkbX-kCm.js} +1 -1
  283. package/dist/assets/{xstate-animation-binding-BBFfNG6Q.js → xstate-animation-binding-BEOhFeXA.js} +1 -1
  284. package/dist/assets/{xstate-animation-meta-DNePLuc6.js → xstate-animation-meta-DoxNCpG8.js} +1 -1
  285. package/dist-node/cli.js +16 -16
  286. package/package.json +16 -16
  287. package/dist/assets/InspectorObjectPreview-BKnVQ4o2.js +0 -1
  288. package/dist/assets/Object3DDocumentViewport-ChFwEXeC.js +0 -2
  289. package/dist/assets/autoplay.service-BuLBDSbB.js +0 -1
  290. package/dist/assets/instances.command-l7ehb4Mp.js +0 -1
  291. package/dist/assets/network-observer.service-B1AoF_5W.js +0 -1
  292. package/dist/assets/object3d-document-session-registry-DdFGkOyQ.js +0 -2
  293. package/dist/assets/three-authoring.service-NDPCWm6z.js +0 -2
  294. package/dist/assets/three-integration.service-DkX-Wv1L.js +0 -1
  295. package/dist/assets/transport.header-CgRXL2qe.js +0 -1
@@ -1 +1 @@
1
- import{C as f,i as c,e as x,u as d}from"./extend-BHlsCjW5.js";import{A as z,a as B,c as D}from"./extend-BHlsCjW5.js";import{A as k}from"./index-CT82WIOK.js";import{r as s}from"./index-nmcBqr7Y.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DzuOGwVB.js";import"./index-D_NuPfjr.js";import"./index-D-bf1M-_.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";function A(){const t=s.useContext(f);return c(t.app instanceof k,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),t}function R(t){s.useMemo(()=>{x(t)},[t])}function T(t){const{app:p,isInitialised:n}=A();let e,o,i=!0,r;typeof t=="function"?e=t:(e=t.callback,o=t.context,i=t.isEnabled??!0,r=t.priority),c(),d(()=>{if(n){const a=p?.ticker,l=i,m=o,u=e;return i&&a&&a.add(e,o,r),()=>{l&&a?.remove(u,m)}}},[p?.ticker,e,o,i,n,r])}export{z as Application,B as applyProps,D as createRoot,x as extend,A as useApplication,R as useExtend,T as useTick};
1
+ import{C as f,i as c,e as x,u as d}from"./extend-D5fxvmvV.js";import{A as z,a as B,c as D}from"./extend-D5fxvmvV.js";import{A as k}from"./index-IpGBlakk.js";import{r as s}from"./index-nmcBqr7Y.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DzuOGwVB.js";import"./index-D_NuPfjr.js";import"./index-DO9Y98zJ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";function A(){const t=s.useContext(f);return c(t.app instanceof k,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),t}function R(t){s.useMemo(()=>{x(t)},[t])}function T(t){const{app:p,isInitialised:n}=A();let e,o,i=!0,r;typeof t=="function"?e=t:(e=t.callback,o=t.context,i=t.isEnabled??!0,r=t.priority),c(),d(()=>{if(n){const a=p?.ticker,l=i,m=o,u=e;return i&&a&&a.add(e,o,r),()=>{l&&a?.remove(u,m)}}},[p?.ticker,e,o,i,n,r])}export{z as Application,B as applyProps,D as createRoot,x as extend,A as useApplication,R as useExtend,T as useTick};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-CKEAT607.js","assets/webworkerAll-Bskpz0Su.js","assets/index-D-bf1M-_.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css"])))=>i.map(i=>d[i]);
2
- import{_ as en}from"./index-D-bf1M-_.js";import{g as sy}from"./_commonjsHelpers-D6-XlEtG.js";var C=(n=>(n.Application="application",n.WebGLPipes="webgl-pipes",n.WebGLPipesAdaptor="webgl-pipes-adaptor",n.WebGLSystem="webgl-system",n.WebGPUPipes="webgpu-pipes",n.WebGPUPipesAdaptor="webgpu-pipes-adaptor",n.WebGPUSystem="webgpu-system",n.CanvasSystem="canvas-system",n.CanvasPipesAdaptor="canvas-pipes-adaptor",n.CanvasPipes="canvas-pipes",n.Asset="asset",n.LoadParser="load-parser",n.ResolveParser="resolve-parser",n.CacheParser="cache-parser",n.DetectionParser="detection-parser",n.MaskEffect="mask-effect",n.BlendMode="blend-mode",n.TextureSource="texture-source",n.TextureUploaderWebGL="texture-uploader-webgl",n.TextureUploaderWebGPU="texture-uploader-webgpu",n.Environment="environment",n.ShapeBuilder="shape-builder",n.Batcher="batcher",n))(C||{});const Ma=n=>{if(typeof n=="function"||typeof n=="object"&&n.extension){if(!n.extension)throw new Error("Extension class must have an extension object");n={...typeof n.extension!="object"?{type:n.extension}:n.extension,ref:n}}if(typeof n=="object")n={...n};else throw new Error("Invalid extension type");return typeof n.type=="string"&&(n.type=[n.type]),n},Vn=(n,e)=>Ma(n).priority??e,J={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...n){return n.map(Ma).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e))}),this},add(...n){return n.map(Ma).forEach(e=>{e.type.forEach(t=>{const r=this._addHandlers,s=this._queue;r[t]?r[t]?.(e):(s[t]=s[t]||[],s[t]?.push(e))})}),this},handle(n,e,t){const r=this._addHandlers,s=this._removeHandlers;if(r[n]||s[n])throw new Error(`Extension type ${n} already has a handler`);r[n]=e,s[n]=t;const i=this._queue;return i[n]&&(i[n]?.forEach(o=>e(o)),delete i[n]),this},handleByMap(n,e){return this.handle(n,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByNamedList(n,e,t=-1){return this.handle(n,r=>{e.findIndex(i=>i.name===r.name)>=0||(e.push({name:r.name,value:r.ref}),e.sort((i,o)=>Vn(o.value,t)-Vn(i.value,t)))},r=>{const s=e.findIndex(i=>i.name===r.name);s!==-1&&e.splice(s,1)})},handleByList(n,e,t=-1){return this.handle(n,r=>{e.includes(r.ref)||(e.push(r.ref),e.sort((s,i)=>Vn(i,t)-Vn(s,t)))},r=>{const s=e.indexOf(r.ref);s!==-1&&e.splice(s,1)})},mixin(n,...e){for(const t of e)Object.defineProperties(n.prototype,Object.getOwnPropertyDescriptors(t))}},Cf={extension:{type:C.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await en(()=>import("./browserAll-CKEAT607.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))}},wf={extension:{type:C.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await en(()=>import("./webworkerAll-Bskpz0Su.js"),__vite__mapDeps([1,2,3,4,5,6,7,8,9,10,11]))}};class Ee{constructor(e,t,r){this._x=t||0,this._y=r||0,this._observer=e}clone(e){return new Ee(e??this._observer,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this._observer._onUpdate(this)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this._observer._onUpdate(this)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this._observer._onUpdate(this))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this._observer._onUpdate(this))}}var $o={exports:{}},Gh;function iy(){return Gh||(Gh=1,(function(n){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function s(u,l,c){this.fn=u,this.context=l,this.once=c||!1}function i(u,l,c,h,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var f=new s(c,h||u,d),m=t?t+l:l;return u._events[m]?u._events[m].fn?u._events[m]=[u._events[m],f]:u._events[m].push(f):(u._events[m]=f,u._eventsCount++),u}function o(u,l){--u._eventsCount===0?u._events=new r:delete u._events[l]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],c,h;if(this._eventsCount===0)return l;for(h in c=this._events)e.call(c,h)&&l.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},a.prototype.listeners=function(l){var c=t?t+l:l,h=this._events[c];if(!h)return[];if(h.fn)return[h.fn];for(var d=0,f=h.length,m=new Array(f);d<f;d++)m[d]=h[d].fn;return m},a.prototype.listenerCount=function(l){var c=t?t+l:l,h=this._events[c];return h?h.fn?1:h.length:0},a.prototype.emit=function(l,c,h,d,f,m){var g=t?t+l:l;if(!this._events[g])return!1;var p=this._events[g],_=arguments.length,y,v;if(p.fn){switch(p.once&&this.removeListener(l,p.fn,void 0,!0),_){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,c),!0;case 3:return p.fn.call(p.context,c,h),!0;case 4:return p.fn.call(p.context,c,h,d),!0;case 5:return p.fn.call(p.context,c,h,d,f),!0;case 6:return p.fn.call(p.context,c,h,d,f,m),!0}for(v=1,y=new Array(_-1);v<_;v++)y[v-1]=arguments[v];p.fn.apply(p.context,y)}else{var T=p.length,w;for(v=0;v<T;v++)switch(p[v].once&&this.removeListener(l,p[v].fn,void 0,!0),_){case 1:p[v].fn.call(p[v].context);break;case 2:p[v].fn.call(p[v].context,c);break;case 3:p[v].fn.call(p[v].context,c,h);break;case 4:p[v].fn.call(p[v].context,c,h,d);break;default:if(!y)for(w=1,y=new Array(_-1);w<_;w++)y[w-1]=arguments[w];p[v].fn.apply(p[v].context,y)}}return!0},a.prototype.on=function(l,c,h){return i(this,l,c,h,!1)},a.prototype.once=function(l,c,h){return i(this,l,c,h,!0)},a.prototype.removeListener=function(l,c,h,d){var f=t?t+l:l;if(!this._events[f])return this;if(!c)return o(this,f),this;var m=this._events[f];if(m.fn)m.fn===c&&(!d||m.once)&&(!h||m.context===h)&&o(this,f);else{for(var g=0,p=[],_=m.length;g<_;g++)(m[g].fn!==c||d&&!m[g].once||h&&m[g].context!==h)&&p.push(m[g]);p.length?this._events[f]=p.length===1?p[0]:p:o(this,f)}return this},a.prototype.removeAllListeners=function(l){var c;return l?(c=t?t+l:l,this._events[c]&&o(this,c)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a})($o)),$o.exports}var oy=iy();const nt=sy(oy),Af=Math.PI*2,Ef=180/Math.PI,Pf=Math.PI/180;class ge{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new ge(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return Yo.x=0,Yo.y=0,Yo}}const Yo=new ge;class Y{constructor(e=1,t=0,r=0,s=1,i=0,o=0){this.array=null,this.a=e,this.b=t,this.c=r,this.d=s,this.tx=i,this.ty=o}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,r,s,i,o){return this.a=e,this.b=t,this.c=r,this.d=s,this.tx=i,this.ty=o,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const r=t||this.array;return e?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(e,t){t=t||new ge;const r=e.x,s=e.y;return t.x=this.a*r+this.c*s+this.tx,t.y=this.b*r+this.d*s+this.ty,t}applyInverse(e,t){t=t||new ge;const r=this.a,s=this.b,i=this.c,o=this.d,a=this.tx,u=this.ty,l=1/(r*o+i*-s),c=e.x,h=e.y;return t.x=o*l*c+-i*l*h+(u*i-a*o)*l,t.y=r*l*h+-s*l*c+(-u*r+a*s)*l,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){const t=Math.cos(e),r=Math.sin(e),s=this.a,i=this.c,o=this.tx;return this.a=s*t-this.b*r,this.b=s*r+this.b*t,this.c=i*t-this.d*r,this.d=i*r+this.d*t,this.tx=o*t-this.ty*r,this.ty=o*r+this.ty*t,this}append(e){const t=this.a,r=this.b,s=this.c,i=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*r+e.b*i,this.c=e.c*t+e.d*s,this.d=e.c*r+e.d*i,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*r+e.ty*i+this.ty,this}appendFrom(e,t){const r=e.a,s=e.b,i=e.c,o=e.d,a=e.tx,u=e.ty,l=t.a,c=t.b,h=t.c,d=t.d;return this.a=r*l+s*h,this.b=r*c+s*d,this.c=i*l+o*h,this.d=i*c+o*d,this.tx=a*l+u*h+t.tx,this.ty=a*c+u*d+t.ty,this}setTransform(e,t,r,s,i,o,a,u,l){return this.a=Math.cos(a+l)*i,this.b=Math.sin(a+l)*i,this.c=-Math.sin(a-u)*o,this.d=Math.cos(a-u)*o,this.tx=e-(r*this.a+s*this.c),this.ty=t-(r*this.b+s*this.d),this}prepend(e){const t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const r=this.a,s=this.c;this.a=r*e.a+this.b*e.c,this.b=r*e.b+this.b*e.d,this.c=s*e.a+this.d*e.c,this.d=s*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){const t=this.a,r=this.b,s=this.c,i=this.d,o=e.pivot,a=-Math.atan2(-s,i),u=Math.atan2(r,t),l=Math.abs(a+u);return l<1e-5||Math.abs(Af-l)<1e-5?(e.rotation=u,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=a,e.skew.y=u),e.scale.x=Math.sqrt(t*t+r*r),e.scale.y=Math.sqrt(s*s+i*i),e.position.x=this.tx+(o.x*t+o.y*s),e.position.y=this.ty+(o.x*r+o.y*i),e}invert(){const e=this.a,t=this.b,r=this.c,s=this.d,i=this.tx,o=e*s-t*r;return this.a=s/o,this.b=-t/o,this.c=-r/o,this.d=e/o,this.tx=(r*this.ty-s*i)/o,this.ty=-(e*this.ty-t*i)/o,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new Y;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}equals(e){return e.a===this.a&&e.b===this.b&&e.c===this.c&&e.d===this.d&&e.tx===this.tx&&e.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return uy.identity()}static get shared(){return ay.identity()}}const ay=new Y,uy=new Y,Br=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Rr=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Mr=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Dr=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Da=[],Bf=[],ks=Math.sign;function ly(){for(let n=0;n<16;n++){const e=[];Da.push(e);for(let t=0;t<16;t++){const r=ks(Br[n]*Br[t]+Mr[n]*Rr[t]),s=ks(Rr[n]*Br[t]+Dr[n]*Rr[t]),i=ks(Br[n]*Mr[t]+Mr[n]*Dr[t]),o=ks(Rr[n]*Mr[t]+Dr[n]*Dr[t]);for(let a=0;a<16;a++)if(Br[a]===r&&Rr[a]===s&&Mr[a]===i&&Dr[a]===o){e.push(a);break}}}for(let n=0;n<16;n++){const e=new Y;e.set(Br[n],Rr[n],Mr[n],Dr[n],0,0),Bf.push(e)}}ly();const re={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:n=>Br[n],uY:n=>Rr[n],vX:n=>Mr[n],vY:n=>Dr[n],inv:n=>n&8?n&15:-n&7,add:(n,e)=>Da[n][e],sub:(n,e)=>Da[n][re.inv(e)],rotate180:n=>n^4,isVertical:n=>(n&3)===2,byDirection:(n,e)=>Math.abs(n)*2<=Math.abs(e)?e>=0?re.S:re.N:Math.abs(e)*2<=Math.abs(n)?n>0?re.E:re.W:e>0?n>0?re.SE:re.SW:n>0?re.NE:re.NW,matrixAppendRotationInv:(n,e,t=0,r=0,s=0,i=0)=>{const o=Bf[re.inv(e)],a=o.a,u=o.b,l=o.c,c=o.d,h=t-Math.min(0,a*s,l*i,a*s+l*i),d=r-Math.min(0,u*s,c*i,u*s+c*i),f=n.a,m=n.b,g=n.c,p=n.d;n.a=a*f+u*g,n.b=a*m+u*p,n.c=l*f+c*g,n.d=l*m+c*p,n.tx=h*f+d*g+n.tx,n.ty=h*m+d*p+n.ty},transformRectCoords:(n,e,t,r)=>{const{x:s,y:i,width:o,height:a}=n,{x:u,y:l,width:c,height:h}=e;return t===re.E?(r.set(s+u,i+l,o,a),r):t===re.S?r.set(c-i-a+u,s+l,a,o):t===re.W?r.set(c-s-o+u,h-i-a+l,o,a):t===re.N?r.set(i+u,h-s-o+l,a,o):r.set(s+u,i+l,o,a)}},Us=[new ge,new ge,new ge,new ge];class _e{constructor(e=0,t=0,r=0,s=0){this.type="rectangle",this.x=Number(e),this.y=Number(t),this.width=Number(r),this.height=Number(s)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new _e(0,0,0,0)}clone(){return new _e(this.x,this.y,this.width,this.height)}copyFromBounds(e){return this.x=e.minX,this.y=e.minY,this.width=e.maxX-e.minX,this.height=e.maxY-e.minY,this}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&t>=this.y&&t<this.y+this.height}strokeContains(e,t,r,s=.5){const{width:i,height:o}=this;if(i<=0||o<=0)return!1;const a=this.x,u=this.y,l=r*(1-s),c=r-l,h=a-l,d=a+i+l,f=u-l,m=u+o+l,g=a+c,p=a+i-c,_=u+c,y=u+o-c;return e>=h&&e<=d&&t>=f&&t<=m&&!(e>g&&e<p&&t>_&&t<y)}intersects(e,t){if(!t){const E=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=E)return!1;const M=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>M}const r=this.left,s=this.right,i=this.top,o=this.bottom;if(s<=r||o<=i)return!1;const a=Us[0].set(e.left,e.top),u=Us[1].set(e.left,e.bottom),l=Us[2].set(e.right,e.top),c=Us[3].set(e.right,e.bottom);if(l.x<=a.x||u.y<=a.y)return!1;const h=Math.sign(t.a*t.d-t.b*t.c);if(h===0||(t.apply(a,a),t.apply(u,u),t.apply(l,l),t.apply(c,c),Math.max(a.x,u.x,l.x,c.x)<=r||Math.min(a.x,u.x,l.x,c.x)>=s||Math.max(a.y,u.y,l.y,c.y)<=i||Math.min(a.y,u.y,l.y,c.y)>=o))return!1;const d=h*(u.y-a.y),f=h*(a.x-u.x),m=d*r+f*i,g=d*s+f*i,p=d*r+f*o,_=d*s+f*o;if(Math.max(m,g,p,_)<=d*a.x+f*a.y||Math.min(m,g,p,_)>=d*c.x+f*c.y)return!1;const y=h*(a.y-l.y),v=h*(l.x-a.x),T=y*r+v*i,w=y*s+v*i,P=y*r+v*o,S=y*s+v*o;return!(Math.max(T,w,P,S)<=y*a.x+v*a.y||Math.min(T,w,P,S)>=y*c.x+v*c.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){const t=Math.max(this.x,e.x),r=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),i=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(r-t,0),this.y=s,this.height=Math.max(i-s,0),this}ceil(e=1,t=.001){const r=Math.ceil((this.x+this.width-t)*e)/e,s=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=r-this.x,this.height=s-this.y,this}scale(e,t=e){return this.x*=e,this.y*=t,this.width*=e,this.height*=t,this}enlarge(e){const t=Math.min(this.x,e.x),r=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),i=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=r-t,this.y=s,this.height=i-s,this}getBounds(e){return e||(e=new _e),e.copyFrom(this),e}containsRect(e){if(this.width<=0||this.height<=0)return!1;const t=e.x,r=e.y,s=e.x+e.width,i=e.y+e.height;return t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height&&s>=this.x&&s<this.x+this.width&&i>=this.y&&i<this.y+this.height}set(e,t,r,s){return this.x=e,this.y=t,this.width=r,this.height=s,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const jn={default:-1};function ye(n="default"){return jn[n]===void 0&&(jn[n]=-1),++jn[n]}function cy(){for(const n in jn)delete jn[n]}const Oh=new Set,oe="8.0.0",Rf="8.3.4",Jr={quiet:!1,noColor:!1},X=((n,e,t=3)=>{if(Jr.quiet||Oh.has(e))return;let r=new Error().stack;const s=`${e}
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-DN5JKMxx.js","assets/webworkerAll-DOUIA1qm.js","assets/index-DO9Y98zJ.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css"])))=>i.map(i=>d[i]);
2
+ import{_ as en}from"./index-DO9Y98zJ.js";import{g as sy}from"./_commonjsHelpers-D6-XlEtG.js";var C=(n=>(n.Application="application",n.WebGLPipes="webgl-pipes",n.WebGLPipesAdaptor="webgl-pipes-adaptor",n.WebGLSystem="webgl-system",n.WebGPUPipes="webgpu-pipes",n.WebGPUPipesAdaptor="webgpu-pipes-adaptor",n.WebGPUSystem="webgpu-system",n.CanvasSystem="canvas-system",n.CanvasPipesAdaptor="canvas-pipes-adaptor",n.CanvasPipes="canvas-pipes",n.Asset="asset",n.LoadParser="load-parser",n.ResolveParser="resolve-parser",n.CacheParser="cache-parser",n.DetectionParser="detection-parser",n.MaskEffect="mask-effect",n.BlendMode="blend-mode",n.TextureSource="texture-source",n.TextureUploaderWebGL="texture-uploader-webgl",n.TextureUploaderWebGPU="texture-uploader-webgpu",n.Environment="environment",n.ShapeBuilder="shape-builder",n.Batcher="batcher",n))(C||{});const Ma=n=>{if(typeof n=="function"||typeof n=="object"&&n.extension){if(!n.extension)throw new Error("Extension class must have an extension object");n={...typeof n.extension!="object"?{type:n.extension}:n.extension,ref:n}}if(typeof n=="object")n={...n};else throw new Error("Invalid extension type");return typeof n.type=="string"&&(n.type=[n.type]),n},Vn=(n,e)=>Ma(n).priority??e,J={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...n){return n.map(Ma).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e))}),this},add(...n){return n.map(Ma).forEach(e=>{e.type.forEach(t=>{const r=this._addHandlers,s=this._queue;r[t]?r[t]?.(e):(s[t]=s[t]||[],s[t]?.push(e))})}),this},handle(n,e,t){const r=this._addHandlers,s=this._removeHandlers;if(r[n]||s[n])throw new Error(`Extension type ${n} already has a handler`);r[n]=e,s[n]=t;const i=this._queue;return i[n]&&(i[n]?.forEach(o=>e(o)),delete i[n]),this},handleByMap(n,e){return this.handle(n,t=>{t.name&&(e[t.name]=t.ref)},t=>{t.name&&delete e[t.name]})},handleByNamedList(n,e,t=-1){return this.handle(n,r=>{e.findIndex(i=>i.name===r.name)>=0||(e.push({name:r.name,value:r.ref}),e.sort((i,o)=>Vn(o.value,t)-Vn(i.value,t)))},r=>{const s=e.findIndex(i=>i.name===r.name);s!==-1&&e.splice(s,1)})},handleByList(n,e,t=-1){return this.handle(n,r=>{e.includes(r.ref)||(e.push(r.ref),e.sort((s,i)=>Vn(i,t)-Vn(s,t)))},r=>{const s=e.indexOf(r.ref);s!==-1&&e.splice(s,1)})},mixin(n,...e){for(const t of e)Object.defineProperties(n.prototype,Object.getOwnPropertyDescriptors(t))}},Cf={extension:{type:C.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await en(()=>import("./browserAll-DN5JKMxx.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]))}},wf={extension:{type:C.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await en(()=>import("./webworkerAll-DOUIA1qm.js"),__vite__mapDeps([1,2,3,4,5,6,7,8,9,10,11]))}};class Ee{constructor(e,t,r){this._x=t||0,this._y=r||0,this._observer=e}clone(e){return new Ee(e??this._observer,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this._observer._onUpdate(this)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this._observer._onUpdate(this)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this._observer._onUpdate(this))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this._observer._onUpdate(this))}}var $o={exports:{}},Gh;function iy(){return Gh||(Gh=1,(function(n){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function s(u,l,c){this.fn=u,this.context=l,this.once=c||!1}function i(u,l,c,h,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var f=new s(c,h||u,d),m=t?t+l:l;return u._events[m]?u._events[m].fn?u._events[m]=[u._events[m],f]:u._events[m].push(f):(u._events[m]=f,u._eventsCount++),u}function o(u,l){--u._eventsCount===0?u._events=new r:delete u._events[l]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],c,h;if(this._eventsCount===0)return l;for(h in c=this._events)e.call(c,h)&&l.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},a.prototype.listeners=function(l){var c=t?t+l:l,h=this._events[c];if(!h)return[];if(h.fn)return[h.fn];for(var d=0,f=h.length,m=new Array(f);d<f;d++)m[d]=h[d].fn;return m},a.prototype.listenerCount=function(l){var c=t?t+l:l,h=this._events[c];return h?h.fn?1:h.length:0},a.prototype.emit=function(l,c,h,d,f,m){var g=t?t+l:l;if(!this._events[g])return!1;var p=this._events[g],_=arguments.length,y,v;if(p.fn){switch(p.once&&this.removeListener(l,p.fn,void 0,!0),_){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,c),!0;case 3:return p.fn.call(p.context,c,h),!0;case 4:return p.fn.call(p.context,c,h,d),!0;case 5:return p.fn.call(p.context,c,h,d,f),!0;case 6:return p.fn.call(p.context,c,h,d,f,m),!0}for(v=1,y=new Array(_-1);v<_;v++)y[v-1]=arguments[v];p.fn.apply(p.context,y)}else{var T=p.length,w;for(v=0;v<T;v++)switch(p[v].once&&this.removeListener(l,p[v].fn,void 0,!0),_){case 1:p[v].fn.call(p[v].context);break;case 2:p[v].fn.call(p[v].context,c);break;case 3:p[v].fn.call(p[v].context,c,h);break;case 4:p[v].fn.call(p[v].context,c,h,d);break;default:if(!y)for(w=1,y=new Array(_-1);w<_;w++)y[w-1]=arguments[w];p[v].fn.apply(p[v].context,y)}}return!0},a.prototype.on=function(l,c,h){return i(this,l,c,h,!1)},a.prototype.once=function(l,c,h){return i(this,l,c,h,!0)},a.prototype.removeListener=function(l,c,h,d){var f=t?t+l:l;if(!this._events[f])return this;if(!c)return o(this,f),this;var m=this._events[f];if(m.fn)m.fn===c&&(!d||m.once)&&(!h||m.context===h)&&o(this,f);else{for(var g=0,p=[],_=m.length;g<_;g++)(m[g].fn!==c||d&&!m[g].once||h&&m[g].context!==h)&&p.push(m[g]);p.length?this._events[f]=p.length===1?p[0]:p:o(this,f)}return this},a.prototype.removeAllListeners=function(l){var c;return l?(c=t?t+l:l,this._events[c]&&o(this,c)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a})($o)),$o.exports}var oy=iy();const nt=sy(oy),Af=Math.PI*2,Ef=180/Math.PI,Pf=Math.PI/180;class ge{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new ge(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return Yo.x=0,Yo.y=0,Yo}}const Yo=new ge;class Y{constructor(e=1,t=0,r=0,s=1,i=0,o=0){this.array=null,this.a=e,this.b=t,this.c=r,this.d=s,this.tx=i,this.ty=o}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,r,s,i,o){return this.a=e,this.b=t,this.c=r,this.d=s,this.tx=i,this.ty=o,this}toArray(e,t){this.array||(this.array=new Float32Array(9));const r=t||this.array;return e?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(e,t){t=t||new ge;const r=e.x,s=e.y;return t.x=this.a*r+this.c*s+this.tx,t.y=this.b*r+this.d*s+this.ty,t}applyInverse(e,t){t=t||new ge;const r=this.a,s=this.b,i=this.c,o=this.d,a=this.tx,u=this.ty,l=1/(r*o+i*-s),c=e.x,h=e.y;return t.x=o*l*c+-i*l*h+(u*i-a*o)*l,t.y=r*l*h+-s*l*c+(-u*r+a*s)*l,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){const t=Math.cos(e),r=Math.sin(e),s=this.a,i=this.c,o=this.tx;return this.a=s*t-this.b*r,this.b=s*r+this.b*t,this.c=i*t-this.d*r,this.d=i*r+this.d*t,this.tx=o*t-this.ty*r,this.ty=o*r+this.ty*t,this}append(e){const t=this.a,r=this.b,s=this.c,i=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*r+e.b*i,this.c=e.c*t+e.d*s,this.d=e.c*r+e.d*i,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*r+e.ty*i+this.ty,this}appendFrom(e,t){const r=e.a,s=e.b,i=e.c,o=e.d,a=e.tx,u=e.ty,l=t.a,c=t.b,h=t.c,d=t.d;return this.a=r*l+s*h,this.b=r*c+s*d,this.c=i*l+o*h,this.d=i*c+o*d,this.tx=a*l+u*h+t.tx,this.ty=a*c+u*d+t.ty,this}setTransform(e,t,r,s,i,o,a,u,l){return this.a=Math.cos(a+l)*i,this.b=Math.sin(a+l)*i,this.c=-Math.sin(a-u)*o,this.d=Math.cos(a-u)*o,this.tx=e-(r*this.a+s*this.c),this.ty=t-(r*this.b+s*this.d),this}prepend(e){const t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const r=this.a,s=this.c;this.a=r*e.a+this.b*e.c,this.b=r*e.b+this.b*e.d,this.c=s*e.a+this.d*e.c,this.d=s*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){const t=this.a,r=this.b,s=this.c,i=this.d,o=e.pivot,a=-Math.atan2(-s,i),u=Math.atan2(r,t),l=Math.abs(a+u);return l<1e-5||Math.abs(Af-l)<1e-5?(e.rotation=u,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=a,e.skew.y=u),e.scale.x=Math.sqrt(t*t+r*r),e.scale.y=Math.sqrt(s*s+i*i),e.position.x=this.tx+(o.x*t+o.y*s),e.position.y=this.ty+(o.x*r+o.y*i),e}invert(){const e=this.a,t=this.b,r=this.c,s=this.d,i=this.tx,o=e*s-t*r;return this.a=s/o,this.b=-t/o,this.c=-r/o,this.d=e/o,this.tx=(r*this.ty-s*i)/o,this.ty=-(e*this.ty-t*i)/o,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new Y;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}equals(e){return e.a===this.a&&e.b===this.b&&e.c===this.c&&e.d===this.d&&e.tx===this.tx&&e.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return uy.identity()}static get shared(){return ay.identity()}}const ay=new Y,uy=new Y,Br=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Rr=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Mr=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Dr=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Da=[],Bf=[],ks=Math.sign;function ly(){for(let n=0;n<16;n++){const e=[];Da.push(e);for(let t=0;t<16;t++){const r=ks(Br[n]*Br[t]+Mr[n]*Rr[t]),s=ks(Rr[n]*Br[t]+Dr[n]*Rr[t]),i=ks(Br[n]*Mr[t]+Mr[n]*Dr[t]),o=ks(Rr[n]*Mr[t]+Dr[n]*Dr[t]);for(let a=0;a<16;a++)if(Br[a]===r&&Rr[a]===s&&Mr[a]===i&&Dr[a]===o){e.push(a);break}}}for(let n=0;n<16;n++){const e=new Y;e.set(Br[n],Rr[n],Mr[n],Dr[n],0,0),Bf.push(e)}}ly();const re={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:n=>Br[n],uY:n=>Rr[n],vX:n=>Mr[n],vY:n=>Dr[n],inv:n=>n&8?n&15:-n&7,add:(n,e)=>Da[n][e],sub:(n,e)=>Da[n][re.inv(e)],rotate180:n=>n^4,isVertical:n=>(n&3)===2,byDirection:(n,e)=>Math.abs(n)*2<=Math.abs(e)?e>=0?re.S:re.N:Math.abs(e)*2<=Math.abs(n)?n>0?re.E:re.W:e>0?n>0?re.SE:re.SW:n>0?re.NE:re.NW,matrixAppendRotationInv:(n,e,t=0,r=0,s=0,i=0)=>{const o=Bf[re.inv(e)],a=o.a,u=o.b,l=o.c,c=o.d,h=t-Math.min(0,a*s,l*i,a*s+l*i),d=r-Math.min(0,u*s,c*i,u*s+c*i),f=n.a,m=n.b,g=n.c,p=n.d;n.a=a*f+u*g,n.b=a*m+u*p,n.c=l*f+c*g,n.d=l*m+c*p,n.tx=h*f+d*g+n.tx,n.ty=h*m+d*p+n.ty},transformRectCoords:(n,e,t,r)=>{const{x:s,y:i,width:o,height:a}=n,{x:u,y:l,width:c,height:h}=e;return t===re.E?(r.set(s+u,i+l,o,a),r):t===re.S?r.set(c-i-a+u,s+l,a,o):t===re.W?r.set(c-s-o+u,h-i-a+l,o,a):t===re.N?r.set(i+u,h-s-o+l,a,o):r.set(s+u,i+l,o,a)}},Us=[new ge,new ge,new ge,new ge];class _e{constructor(e=0,t=0,r=0,s=0){this.type="rectangle",this.x=Number(e),this.y=Number(t),this.width=Number(r),this.height=Number(s)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new _e(0,0,0,0)}clone(){return new _e(this.x,this.y,this.width,this.height)}copyFromBounds(e){return this.x=e.minX,this.y=e.minY,this.width=e.maxX-e.minX,this.height=e.maxY-e.minY,this}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&t>=this.y&&t<this.y+this.height}strokeContains(e,t,r,s=.5){const{width:i,height:o}=this;if(i<=0||o<=0)return!1;const a=this.x,u=this.y,l=r*(1-s),c=r-l,h=a-l,d=a+i+l,f=u-l,m=u+o+l,g=a+c,p=a+i-c,_=u+c,y=u+o-c;return e>=h&&e<=d&&t>=f&&t<=m&&!(e>g&&e<p&&t>_&&t<y)}intersects(e,t){if(!t){const E=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=E)return!1;const M=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>M}const r=this.left,s=this.right,i=this.top,o=this.bottom;if(s<=r||o<=i)return!1;const a=Us[0].set(e.left,e.top),u=Us[1].set(e.left,e.bottom),l=Us[2].set(e.right,e.top),c=Us[3].set(e.right,e.bottom);if(l.x<=a.x||u.y<=a.y)return!1;const h=Math.sign(t.a*t.d-t.b*t.c);if(h===0||(t.apply(a,a),t.apply(u,u),t.apply(l,l),t.apply(c,c),Math.max(a.x,u.x,l.x,c.x)<=r||Math.min(a.x,u.x,l.x,c.x)>=s||Math.max(a.y,u.y,l.y,c.y)<=i||Math.min(a.y,u.y,l.y,c.y)>=o))return!1;const d=h*(u.y-a.y),f=h*(a.x-u.x),m=d*r+f*i,g=d*s+f*i,p=d*r+f*o,_=d*s+f*o;if(Math.max(m,g,p,_)<=d*a.x+f*a.y||Math.min(m,g,p,_)>=d*c.x+f*c.y)return!1;const y=h*(a.y-l.y),v=h*(l.x-a.x),T=y*r+v*i,w=y*s+v*i,P=y*r+v*o,S=y*s+v*o;return!(Math.max(T,w,P,S)<=y*a.x+v*a.y||Math.min(T,w,P,S)>=y*c.x+v*c.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){const t=Math.max(this.x,e.x),r=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),i=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(r-t,0),this.y=s,this.height=Math.max(i-s,0),this}ceil(e=1,t=.001){const r=Math.ceil((this.x+this.width-t)*e)/e,s=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=r-this.x,this.height=s-this.y,this}scale(e,t=e){return this.x*=e,this.y*=t,this.width*=e,this.height*=t,this}enlarge(e){const t=Math.min(this.x,e.x),r=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),i=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=r-t,this.y=s,this.height=i-s,this}getBounds(e){return e||(e=new _e),e.copyFrom(this),e}containsRect(e){if(this.width<=0||this.height<=0)return!1;const t=e.x,r=e.y,s=e.x+e.width,i=e.y+e.height;return t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height&&s>=this.x&&s<this.x+this.width&&i>=this.y&&i<this.y+this.height}set(e,t,r,s){return this.x=e,this.y=t,this.width=r,this.height=s,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const jn={default:-1};function ye(n="default"){return jn[n]===void 0&&(jn[n]=-1),++jn[n]}function cy(){for(const n in jn)delete jn[n]}const Oh=new Set,oe="8.0.0",Rf="8.3.4",Jr={quiet:!1,noColor:!1},X=((n,e,t=3)=>{if(Jr.quiet||Oh.has(e))return;let r=new Error().stack;const s=`${e}
3
3
  Deprecated since v${n}`,i=typeof console.groupCollapsed=="function"&&!Jr.noColor;typeof r>"u"?console.warn("PixiJS Deprecation Warning: ",s):(r=r.split(`
4
4
  `).splice(t).join(`
5
5
  `),i?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",s),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",s),console.warn(r))),Oh.add(e)});Object.defineProperties(X,{quiet:{get:()=>Jr.quiet,set:n=>{Jr.quiet=n},enumerable:!0,configurable:!1},noColor:{get:()=>Jr.noColor,set:n=>{Jr.noColor=n},enumerable:!0,configurable:!1}});const Hu=()=>{};function Lr(n){return n+=n===0?1:0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1}function Fa(n){return!(n&n-1)&&!!n}function hy(n){let e=(n>65535?1:0)<<4;n>>>=e;let t=(n>255?1:0)<<3;return n>>>=t,e|=t,t=(n>15?1:0)<<2,n>>>=t,e|=t,t=(n>3?1:0)<<1,n>>>=t,e|=t,e|n>>1}function Bt(n){const e={};for(const t in n)n[t]!==void 0&&(e[t]=n[t]);return e}const Lh=Object.create(null);function dy(n){const e=Lh[n];return e===void 0&&(Lh[n]=ye("resource")),e}const Mf=class Df extends nt{constructor(e={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,e={...Df.defaultOptions,...e},this.addressMode=e.addressMode,this.addressModeU=e.addressModeU??this.addressModeU,this.addressModeV=e.addressModeV??this.addressModeV,this.addressModeW=e.addressModeW??this.addressModeW,this.scaleMode=e.scaleMode,this.magFilter=e.magFilter??this.magFilter,this.minFilter=e.minFilter??this.minFilter,this.mipmapFilter=e.mipmapFilter??this.mipmapFilter,this.lodMinClamp=e.lodMinClamp,this.lodMaxClamp=e.lodMaxClamp,this.compare=e.compare,this.maxAnisotropy=e.maxAnisotropy??1}set addressMode(e){this.addressModeU=e,this.addressModeV=e,this.addressModeW=e}get addressMode(){return this.addressModeU}set wrapMode(e){X(oe,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=e}get wrapMode(){return this.addressMode}set scaleMode(e){this.magFilter=e,this.minFilter=e,this.mipmapFilter=e}get scaleMode(){return this.magFilter}set maxAnisotropy(e){this._maxAnisotropy=Math.min(e,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this._sharedResourceId=null,this.emit("change",this)}_generateResourceId(){const e=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=dy(e),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};Mf.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let mt=Mf;const Ff=class If extends nt{constructor(e={}){super(),this.options=e,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=ye("textureSource"),this._resourceType="textureSource",this._resourceId=ye("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.viewDimension="2d",this.arrayLayerCount=1,this.antialias=!1,this.transient=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,e={...If.defaultOptions,...e},this.label=e.label??"",this.resource=e.resource,this.autoGarbageCollect=e.autoGarbageCollect,this._resolution=e.resolution,e.width?this.pixelWidth=e.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,e.height?this.pixelHeight=e.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=e.format,this.dimension=e.dimensions,this.viewDimension=e.viewDimension??e.dimensions,this.arrayLayerCount=e.arrayLayerCount,this.mipLevelCount=e.mipLevelCount,this.autoGenerateMipmaps=e.autoGenerateMipmaps,this.sampleCount=e.sampleCount,this.antialias=e.antialias,this.transient=e.transient??!1,this.alphaMode=e.alphaMode,this.style=new mt(Bt(e)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(e){this.style!==e&&(this._style?.off("change",this._onStyleChange,this),this._style=e,this._style?.on("change",this._onStyleChange,this),this._onStyleChange())}set maxAnisotropy(e){this._style.maxAnisotropy=e}get maxAnisotropy(){return this._style.maxAnisotropy}get addressMode(){return this._style.addressMode}set addressMode(e){this._style.addressMode=e}get repeatMode(){return this._style.addressMode}set repeatMode(e){this._style.addressMode=e}get magFilter(){return this._style.magFilter}set magFilter(e){this._style.magFilter=e}get minFilter(){return this._style.minFilter}set minFilter(e){this._style.minFilter=e}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(e){this._style.mipmapFilter=e}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(e){this._style.lodMinClamp=e}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(e){this._style.lodMaxClamp=e}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){const e=this._resolution;if(this.resize(this.resourceWidth/e,this.resourceHeight/e))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){this._resourceId=ye("resource"),this.emit("change",this),this.emit("unload",this);for(const e in this._gpuData)this._gpuData[e]?.destroy?.();this._gpuData=Object.create(null)}get resourceWidth(){const{resource:e}=this;return e.naturalWidth||e.videoWidth||e.displayWidth||e.width}get resourceHeight(){const{resource:e}=this;return e.naturalHeight||e.videoHeight||e.displayHeight||e.height}get resolution(){return this._resolution}set resolution(e){this._resolution!==e&&(this._resolution=e,this.width=this.pixelWidth/e,this.height=this.pixelHeight/e)}resize(e,t,r){r||(r=this._resolution),e||(e=this.width),t||(t=this.height);const s=Math.round(e*r),i=Math.round(t*r);return this.width=s/r,this.height=i/r,this._resolution=r,this.pixelWidth===s&&this.pixelHeight===i?!1:(this._refreshPOT(),this.pixelWidth=s,this.pixelHeight=i,this.emit("resize",this),this._resourceId=ye("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(e){this._style.wrapMode=e}get wrapMode(){return this._style.wrapMode}set scaleMode(e){this._style.scaleMode=e}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=Fa(this.pixelWidth)&&Fa(this.pixelHeight)}static test(e){throw new Error("Unimplemented")}};Ff.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",viewDimension:"2d",arrayLayerCount:1,mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let Te=Ff;class Hi extends Te{constructor(e){const t=e.resource||new Float32Array(e.width*e.height*4);let r=e.format;r||(t instanceof Float32Array?r="rgba32float":t instanceof Int32Array||t instanceof Uint32Array?r="rgba32uint":t instanceof Int16Array||t instanceof Uint16Array?r="rgba16uint":(t instanceof Int8Array,r="bgra8unorm")),super({...e,resource:t,format:r}),this.uploadMethodId="buffer"}static test(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}Hi.extension=C.TextureSource;const Nh=new Y;class Wu{constructor(e,t){this.mapCoord=new Y,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._updateID=0,this.clampOffset=0,typeof t>"u"?this.clampMargin=e.width<10?0:.5:this.clampMargin=t,this.isSimple=!1,this.texture=e}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture?.removeListener("update",this.update,this),this._texture=e,this._texture.addListener("update",this.update,this)),this.update()}multiplyUvs(e,t){t===void 0&&(t=e);const r=this.mapCoord;for(let s=0;s<e.length;s+=2){const i=e[s],o=e[s+1];t[s]=i*r.a+o*r.c+r.tx,t[s+1]=i*r.b+o*r.d+r.ty}return t}update(){const e=this._texture;this._updateID++;const t=e.uvs;this.mapCoord.set(t.x1-t.x0,t.y1-t.y0,t.x3-t.x0,t.y3-t.y0,t.x0,t.y0);const r=e.orig,s=e.trim;s&&(Nh.set(r.width/s.width,0,0,r.height/s.height,-s.x/s.width,-s.y/s.height),this.mapCoord.append(Nh));const i=e.source,o=this.uClampFrame,a=this.clampMargin/i._resolution,u=this.clampOffset/i._resolution;return o[0]=(e.frame.x+a+u)/i.width,o[1]=(e.frame.y+a+u)/i.height,o[2]=(e.frame.x+e.frame.width-a+u)/i.width,o[3]=(e.frame.y+e.frame.height-a+u)/i.height,this.uClampOffset[0]=this.clampOffset/i.pixelWidth,this.uClampOffset[1]=this.clampOffset/i.pixelHeight,this.isSimple=e.frame.width===i.width&&e.frame.height===i.height&&e.rotate===0,!0}}class z extends nt{constructor({source:e,label:t,frame:r,orig:s,trim:i,defaultAnchor:o,defaultBorders:a,rotate:u,dynamic:l}={}){if(super(),this.uid=ye("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new _e,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=t,this.source=e?.source??new Te,this.noFrame=!r,r)this.frame.copyFrom(r);else{const{width:c,height:h}=this._source;this.frame.width=c,this.frame.height=h}this.orig=s||this.frame,this.trim=i,this.rotate=u??0,this.defaultAnchor=o,this.defaultBorders=a,this.destroyed=!1,this.dynamic=l||!1,this.updateUvs()}set source(e){this._source&&this._source.off("resize",this.update,this),this._source=e,e.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new Wu(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:e,frame:t}=this,{width:r,height:s}=this._source,i=t.x/r,o=t.y/s,a=t.width/r,u=t.height/s;let l=this.rotate;if(l){const c=a/2,h=u/2,d=i+c,f=o+h;l=re.add(l,re.NW),e.x0=d+c*re.uX(l),e.y0=f+h*re.uY(l),l=re.add(l,2),e.x1=d+c*re.uX(l),e.y1=f+h*re.uY(l),l=re.add(l,2),e.x2=d+c*re.uX(l),e.y2=f+h*re.uY(l),l=re.add(l,2),e.x3=d+c*re.uX(l),e.y3=f+h*re.uY(l)}else e.x0=i,e.y0=o,e.x1=i+a,e.y1=o,e.x2=i+a,e.y2=o+u,e.x3=i,e.y3=o+u}destroy(e=!1){this._source&&(this._source.off("resize",this.update,this),e&&(this._source.destroy(),this._source=null)),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return X(oe,"Texture.baseTexture is now Texture.source"),this._source}}z.EMPTY=new z({label:"EMPTY",source:new Te({label:"EMPTY"})});z.EMPTY.destroy=Hu;z.WHITE=new z({source:new Hi({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});z.WHITE.destroy=Hu;function zu(n,e,t){const{width:r,height:s}=t.orig,i=t.trim;if(i){const o=i.width,a=i.height;n.minX=i.x-e._x*r,n.maxX=n.minX+o,n.minY=i.y-e._y*s,n.maxY=n.minY+a}else n.minX=-e._x*r,n.maxX=n.minX+r,n.minY=-e._y*s,n.maxY=n.minY+s}const Hh=new Y;class He{constructor(e=1/0,t=1/0,r=-1/0,s=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=Hh,this.minX=e,this.minY=t,this.maxX=r,this.maxY=s}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new _e);const e=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(e.x=0,e.y=0,e.width=0,e.height=0):e.copyFromBounds(this),e}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=Hh,this}set(e,t,r,s){this.minX=e,this.minY=t,this.maxX=r,this.maxY=s}addFrame(e,t,r,s,i){i||(i=this.matrix);const o=i.a,a=i.b,u=i.c,l=i.d,c=i.tx,h=i.ty;let d=this.minX,f=this.minY,m=this.maxX,g=this.maxY,p=o*e+u*t+c,_=a*e+l*t+h;p<d&&(d=p),_<f&&(f=_),p>m&&(m=p),_>g&&(g=_),p=o*r+u*t+c,_=a*r+l*t+h,p<d&&(d=p),_<f&&(f=_),p>m&&(m=p),_>g&&(g=_),p=o*e+u*s+c,_=a*e+l*s+h,p<d&&(d=p),_<f&&(f=_),p>m&&(m=p),_>g&&(g=_),p=o*r+u*s+c,_=a*r+l*s+h,p<d&&(d=p),_<f&&(f=_),p>m&&(m=p),_>g&&(g=_),this.minX=d,this.minY=f,this.maxX=m,this.maxY=g}addRect(e,t){this.addFrame(e.x,e.y,e.x+e.width,e.y+e.height,t)}addBounds(e,t){this.addFrame(e.minX,e.minY,e.maxX,e.maxY,t)}addBoundsMask(e){this.minX=this.minX>e.minX?this.minX:e.minX,this.minY=this.minY>e.minY?this.minY:e.minY,this.maxX=this.maxX<e.maxX?this.maxX:e.maxX,this.maxY=this.maxY<e.maxY?this.maxY:e.maxY}applyMatrix(e){const t=this.minX,r=this.minY,s=this.maxX,i=this.maxY,{a:o,b:a,c:u,d:l,tx:c,ty:h}=e;let d=o*t+u*r+c,f=a*t+l*r+h;this.minX=d,this.minY=f,this.maxX=d,this.maxY=f,d=o*s+u*r+c,f=a*s+l*r+h,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY,d=o*t+u*i+c,f=a*t+l*i+h,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY,d=o*s+u*i+c,f=a*s+l*i+h,this.minX=d<this.minX?d:this.minX,this.minY=f<this.minY?f:this.minY,this.maxX=d>this.maxX?d:this.maxX,this.maxY=f>this.maxY?f:this.maxY}fit(e){return this.minX<e.left&&(this.minX=e.left),this.maxX>e.right&&(this.maxX=e.right),this.minY<e.top&&(this.minY=e.top),this.maxY>e.bottom&&(this.maxY=e.bottom),this}fitBounds(e,t,r,s){return this.minX<e&&(this.minX=e),this.maxX>t&&(this.maxX=t),this.minY<r&&(this.minY=r),this.maxY>s&&(this.maxY=s),this}pad(e,t=e){return this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new He(this.minX,this.minY,this.maxX,this.maxY)}scale(e,t=e){return this.minX*=e,this.minY*=t,this.maxX*=e,this.maxY*=t,this}get x(){return this.minX}set x(e){const t=this.maxX-this.minX;this.minX=e,this.maxX=e+t}get y(){return this.minY}set y(e){const t=this.maxY-this.minY;this.minY=e,this.maxY=e+t}get width(){return this.maxX-this.minX}set width(e){this.maxX=this.minX+e}get height(){return this.maxY-this.minY}set height(e){this.maxY=this.minY+e}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(e,t,r,s){let i=this.minX,o=this.minY,a=this.maxX,u=this.maxY;s||(s=this.matrix);const l=s.a,c=s.b,h=s.c,d=s.d,f=s.tx,m=s.ty;for(let g=t;g<r;g+=2){const p=e[g],_=e[g+1],y=l*p+h*_+f,v=c*p+d*_+m;i=y<i?y:i,o=v<o?v:o,a=y>a?y:a,u=v>u?v:u}this.minX=i,this.minY=o,this.maxX=a,this.maxY=u}containsPoint(e,t){return this.minX<=e&&this.minY<=t&&this.maxX>=e&&this.maxY>=t}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(e){return this.minX=e.minX,this.minY=e.minY,this.maxX=e.maxX,this.maxY=e.maxY,this}}var fy={grad:.9,turn:360,rad:360/(2*Math.PI)},qt=function(n){return typeof n=="string"?n.length>0:typeof n=="number"},$e=function(n,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*n)/t+0},St=function(n,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),n>t?t:n>e?n:e},kf=function(n){return(n=isFinite(n)?n%360:0)>0?n:n+360},Wh=function(n){return{r:St(n.r,0,255),g:St(n.g,0,255),b:St(n.b,0,255),a:St(n.a)}},jo=function(n){return{r:$e(n.r),g:$e(n.g),b:$e(n.b),a:$e(n.a,3)}},py=/^#([0-9a-f]{3,8})$/i,Gs=function(n){var e=n.toString(16);return e.length<2?"0"+e:e},Uf=function(n){var e=n.r,t=n.g,r=n.b,s=n.a,i=Math.max(e,t,r),o=i-Math.min(e,t,r),a=o?i===e?(t-r)/o:i===t?2+(r-e)/o:4+(e-t)/o:0;return{h:60*(a<0?a+6:a),s:i?o/i*100:0,v:i/255*100,a:s}},Gf=function(n){var e=n.h,t=n.s,r=n.v,s=n.a;e=e/360*6,t/=100,r/=100;var i=Math.floor(e),o=r*(1-t),a=r*(1-(e-i)*t),u=r*(1-(1-e+i)*t),l=i%6;return{r:255*[r,a,o,o,u,r][l],g:255*[u,r,r,a,o,o][l],b:255*[o,o,u,r,r,a][l],a:s}},zh=function(n){return{h:kf(n.h),s:St(n.s,0,100),l:St(n.l,0,100),a:St(n.a)}},Vh=function(n){return{h:$e(n.h),s:$e(n.s),l:$e(n.l),a:$e(n.a,3)}},Xh=function(n){return Gf((t=(e=n).s,{h:e.h,s:(t*=((r=e.l)<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}));var e,t,r},qn=function(n){return{h:(e=Uf(n)).h,s:(s=(200-(t=e.s))*(r=e.v)/100)>0&&s<200?t*r/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,t,r,s},my=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gy=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_y=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,xy=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ia={string:[[function(n){var e=py.exec(n);return e?(n=e[1]).length<=4?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?$e(parseInt(n[3]+n[3],16)/255,2):1}:n.length===6||n.length===8?{r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16),a:n.length===8?$e(parseInt(n.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(n){var e=_y.exec(n)||xy.exec(n);return e?e[2]!==e[4]||e[4]!==e[6]?null:Wh({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(n){var e=my.exec(n)||gy.exec(n);if(!e)return null;var t,r,s=zh({h:(t=e[1],r=e[2],r===void 0&&(r="deg"),Number(t)*(fy[r]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Xh(s)},"hsl"]],object:[[function(n){var e=n.r,t=n.g,r=n.b,s=n.a,i=s===void 0?1:s;return qt(e)&&qt(t)&&qt(r)?Wh({r:Number(e),g:Number(t),b:Number(r),a:Number(i)}):null},"rgb"],[function(n){var e=n.h,t=n.s,r=n.l,s=n.a,i=s===void 0?1:s;if(!qt(e)||!qt(t)||!qt(r))return null;var o=zh({h:Number(e),s:Number(t),l:Number(r),a:Number(i)});return Xh(o)},"hsl"],[function(n){var e=n.h,t=n.s,r=n.v,s=n.a,i=s===void 0?1:s;if(!qt(e)||!qt(t)||!qt(r))return null;var o=(function(a){return{h:kf(a.h),s:St(a.s,0,100),v:St(a.v,0,100),a:St(a.a)}})({h:Number(e),s:Number(t),v:Number(r),a:Number(i)});return Gf(o)},"hsv"]]},$h=function(n,e){for(var t=0;t<e.length;t++){var r=e[t][0](n);if(r)return[r,e[t][1]]}return[null,void 0]},by=function(n){return typeof n=="string"?$h(n.trim(),Ia.string):typeof n=="object"&&n!==null?$h(n,Ia.object):[null,void 0]},qo=function(n,e){var t=qn(n);return{h:t.h,s:St(t.s+100*e,0,100),l:t.l,a:t.a}},Ko=function(n){return(299*n.r+587*n.g+114*n.b)/1e3/255},Yh=function(n,e){var t=qn(n);return{h:t.h,s:t.s,l:St(t.l+100*e,0,100),a:t.a}},ka=(function(){function n(e){this.parsed=by(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return n.prototype.isValid=function(){return this.parsed!==null},n.prototype.brightness=function(){return $e(Ko(this.rgba),2)},n.prototype.isDark=function(){return Ko(this.rgba)<.5},n.prototype.isLight=function(){return Ko(this.rgba)>=.5},n.prototype.toHex=function(){return e=jo(this.rgba),t=e.r,r=e.g,s=e.b,o=(i=e.a)<1?Gs($e(255*i)):"","#"+Gs(t)+Gs(r)+Gs(s)+o;var e,t,r,s,i,o},n.prototype.toRgb=function(){return jo(this.rgba)},n.prototype.toRgbString=function(){return e=jo(this.rgba),t=e.r,r=e.g,s=e.b,(i=e.a)<1?"rgba("+t+", "+r+", "+s+", "+i+")":"rgb("+t+", "+r+", "+s+")";var e,t,r,s,i},n.prototype.toHsl=function(){return Vh(qn(this.rgba))},n.prototype.toHslString=function(){return e=Vh(qn(this.rgba)),t=e.h,r=e.s,s=e.l,(i=e.a)<1?"hsla("+t+", "+r+"%, "+s+"%, "+i+")":"hsl("+t+", "+r+"%, "+s+"%)";var e,t,r,s,i},n.prototype.toHsv=function(){return e=Uf(this.rgba),{h:$e(e.h),s:$e(e.s),v:$e(e.v),a:$e(e.a,3)};var e},n.prototype.invert=function(){return Ut({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},n.prototype.saturate=function(e){return e===void 0&&(e=.1),Ut(qo(this.rgba,e))},n.prototype.desaturate=function(e){return e===void 0&&(e=.1),Ut(qo(this.rgba,-e))},n.prototype.grayscale=function(){return Ut(qo(this.rgba,-1))},n.prototype.lighten=function(e){return e===void 0&&(e=.1),Ut(Yh(this.rgba,e))},n.prototype.darken=function(e){return e===void 0&&(e=.1),Ut(Yh(this.rgba,-e))},n.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},n.prototype.alpha=function(e){return typeof e=="number"?Ut({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):$e(this.rgba.a,3);var t},n.prototype.hue=function(e){var t=qn(this.rgba);return typeof e=="number"?Ut({h:e,s:t.s,l:t.l,a:t.a}):$e(t.h)},n.prototype.isEqual=function(e){return this.toHex()===Ut(e).toHex()},n})(),Ut=function(n){return n instanceof ka?n:new ka(n)},jh=[],yy=function(n){n.forEach(function(e){jh.indexOf(e)<0&&(e(ka,Ia),jh.push(e))})};function vy(n,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var s in t)r[t[s]]=s;var i={};n.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,u,l=r[this.toHex()];if(l)return l;if(o?.closest){var c=this.toRgb(),h=1/0,d="black";if(!i.length)for(var f in t)i[f]=new n(t[f]).toRgb();for(var m in t){var g=(a=c,u=i[m],Math.pow(a.r-u.r,2)+Math.pow(a.g-u.g,2)+Math.pow(a.b-u.b,2));g<h&&(h=g,d=m)}return d}},e.string.push([function(o){var a=o.toLowerCase(),u=a==="transparent"?"#0000":t[a];return u?new n(u).toRgb():null},"name"])}yy([vy]);const cn=class Xn{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof Xn)this._value=this._cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,e))&&(this._value=this._cloneSource(e),this._normalize(this._value))}}get value(){return this._value}_cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}_isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((i,o)=>i===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,r,s]=this._components;return{r:e,g:t,b:r,a:s}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,s]=this._components;return this._arrayRgb||(this._arrayRgb=[]),e||(e=this._arrayRgb),e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(s*255),e}toArray(e){this._arrayRgba||(this._arrayRgba=[]),e||(e=this._arrayRgba);const[t,r,s,i]=this._components;return e[0]=t,e[1]=r,e[2]=s,e[3]=i,e}toRgbArray(e){this._arrayRgb||(this._arrayRgb=[]),e||(e=this._arrayRgb);const[t,r,s]=this._components;return e[0]=t,e[1]=r,e[2]=s,e}toNumber(){return this._int}toBgrNumber(){const[e,t,r]=this.toUint8RgbArray();return(r<<16)+(t<<8)+e}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,s,i]=Xn._temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=s,this._components[3]*=i,this._refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this._refreshInt(),this._value=null,this}toPremultiplied(e,t=!0){if(e===1)return(255<<24)+this._int;if(e===0)return t?0:this._int;let r=this._int>>16&255,s=this._int>>8&255,i=this._int&255;return t&&(r=r*e+.5|0,s=s*e+.5|0,i=i*e+.5|0),(e*255<<24)+(r<<16)+(s<<8)+i}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this._value=null,this}_normalize(e){let t,r,s,i;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const o=e;t=(o>>16&255)/255,r=(o>>8&255)/255,s=(o&255)/255,i=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[t,r,s,i=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[t,r,s,i=255]=e,t/=255,r/=255,s/=255,i/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const a=Xn.HEX_PATTERN.exec(e);a&&(e=`#${a[2]}`)}const o=Ut(e);o.isValid()&&({r:t,g:r,b:s,a:i}=o.rgba,t/=255,r/=255,s/=255)}if(t!==void 0)this._components[0]=t,this._components[1]=r,this._components[2]=s,this._components[3]=i,this._refreshInt();else throw new Error(`Unable to convert color ${e}`)}_refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((s,i)=>{e[i]=Math.min(Math.max(s,t),r)}),e)}static isColorLike(e){return typeof e=="number"||typeof e=="string"||e instanceof Number||e instanceof Xn||Array.isArray(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Float32Array||e.r!==void 0&&e.g!==void 0&&e.b!==void 0||e.r!==void 0&&e.g!==void 0&&e.b!==void 0&&e.a!==void 0||e.h!==void 0&&e.s!==void 0&&e.l!==void 0||e.h!==void 0&&e.s!==void 0&&e.l!==void 0&&e.a!==void 0||e.h!==void 0&&e.s!==void 0&&e.v!==void 0||e.h!==void 0&&e.s!==void 0&&e.v!==void 0&&e.a!==void 0}};cn.shared=new cn;cn._temp=new cn;cn.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let le=cn;const Of={cullArea:null,cullable:!1,cullableChildren:!0};let Zo=0;const qh=500;function Z(...n){Zo!==qh&&(Zo++,Zo===qh?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...n))}const zr={_registeredResources:new Set,register(n){this._registeredResources.add(n)},unregister(n){this._registeredResources.delete(n)},release(){this._registeredResources.forEach(n=>n.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(n){return this._registeredResources.has(n)},reset(){this._registeredResources.clear()}};class Lf{constructor(e,t){this._pool=[],this._count=0,this._index=0,this._classType=e,t&&this.prepopulate(t)}prepopulate(e){for(let t=0;t<e;t++)this._pool[this._index++]=new this._classType;this._count+=e}get(e){let t;return this._index>0?t=this._pool[--this._index]:(t=new this._classType,this._count++),t.init?.(e),t}return(e){e.reset?.(),this._pool[this._index++]=e}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let e=0;e<this._index;e++)this._pool[e].destroy();this._pool.length=0,this._count=0,this._index=0}}class Nf{constructor(){this._poolsByClass=new Map}prepopulate(e,t){this.getPool(e).prepopulate(t)}get(e,t){return this.getPool(e).get(t)}return(e){this.getPool(e.constructor).return(e)}getPool(e){return this._poolsByClass.has(e)||this._poolsByClass.set(e,new Lf(e)),this._poolsByClass.get(e)}stats(){const e={};return this._poolsByClass.forEach(t=>{const r=e[t._classType.name]?t._classType.name+t._classType.ID:t._classType.name;e[r]={free:t.totalFree,used:t.totalUsed,size:t.totalSize}}),e}clear(){this._poolsByClass.forEach(e=>e.clear()),this._poolsByClass.clear()}}const Ge=new Nf;zr.register(Ge);const Hf={get isCachedAsTexture(){return!!this.renderGroup?.isCachedAsTexture},cacheAsTexture(n){typeof n=="boolean"&&n===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(n===!0?{}:n))},updateCacheTexture(){this.renderGroup?.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(n){X("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(n)}};function Vu(n,e,t){const r=n.length;let s;if(e>=r||t===0)return;t=e+t>r?r-e:t;const i=r-t;for(s=e;s<i;++s)n[s]=n[s+t];n.length=i}const Wf={allowChildren:!0,removeChildren(n=0,e){const t=e??this.children.length,r=t-n,s=[];if(r>0&&r<=t){for(let o=t-1;o>=n;o--){const a=this.children[o];a&&(s.push(a),a.parent=null)}Vu(this.children,n,t);const i=this.renderGroup||this.parentRenderGroup;i&&i.removeChildren(s);for(let o=0;o<s.length;++o){const a=s[o];a.parentRenderLayer?.detach(a),this.emit("childRemoved",a,this,o),s[o].emit("removed",this)}return s.length>0&&this._didViewChangeTick++,s}else if(r===0&&this.children.length===0)return s;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(n){const e=this.getChildAt(n);return this.removeChild(e)},getChildAt(n){if(n<0||n>=this.children.length)throw new Error(`getChildAt: Index (${n}) does not exist.`);return this.children[n]},setChildIndex(n,e){if(e<0||e>=this.children.length)throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);this.getChildIndex(n),this.addChildAt(n,e)},getChildIndex(n){const e=this.children.indexOf(n);if(e===-1)throw new Error("The supplied Container must be a child of the caller");return e},addChildAt(n,e){this.allowChildren||X(oe,"addChildAt: Only Containers will be allowed to add children in v8.0.0");const{children:t}=this;if(e<0||e>t.length)throw new Error(`${n}addChildAt: The index ${e} supplied is out of bounds ${t.length}`);const r=n.parent===this;if(n.parent){const i=n.parent.children.indexOf(n);if(r){if(i===e)return n;n.parent.children.splice(i,1)}else n.removeFromParent()}e===t.length?t.push(n):t.splice(e,0,n),n.parent=this,n.didChange=!0,n._updateFlags=15;const s=this.renderGroup||this.parentRenderGroup;return s&&s.addChild(n),this.sortableChildren&&(this.sortDirty=!0),r||(this.emit("childAdded",n,this,e),n.emit("added",this)),n},swapChildren(n,e){if(n===e)return;const t=this.getChildIndex(n),r=this.getChildIndex(e);this.children[t]=e,this.children[r]=n;const s=this.renderGroup||this.parentRenderGroup;s&&(s.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){this.parent?.removeChild(this)},reparentChild(...n){return n.length===1?this.reparentChildAt(n[0],this.children.length):(n.forEach(e=>this.reparentChildAt(e,this.children.length)),n[0])},reparentChildAt(n,e){if(n.parent===this)return this.setChildIndex(n,e),n;const t=n.worldTransform.clone();n.removeFromParent(),this.addChildAt(n,e);const r=this.worldTransform.clone();return r.invert(),t.prepend(r),n.setFromMatrix(t),n},replaceChild(n,e){n.updateLocalTransform(),this.addChildAt(e,this.getChildIndex(n)),e.setFromMatrix(n.localTransform),e.updateLocalTransform(),this.removeChild(n)}},zf={collectRenderables(n,e,t){this.parentRenderLayer&&this.parentRenderLayer!==t||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(n,e,t):this.renderGroup?e.renderPipes.renderGroup.addRenderGroup(this.renderGroup,n):this.collectRenderablesWithEffects(n,e,t))},collectRenderablesSimple(n,e,t){const r=this.children,s=r.length;for(let i=0;i<s;i++)r[i].collectRenderables(n,e,t)},collectRenderablesWithEffects(n,e,t){const{renderPipes:r}=e;for(let s=0;s<this.effects.length;s++){const i=this.effects[s];r[i.pipe].push(i,this,n)}this.collectRenderablesSimple(n,e,t);for(let s=this.effects.length-1;s>=0;s--){const i=this.effects[s];r[i.pipe].pop(i,this,n)}}};class rs{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let e=0;e<this.filters.length;e++)this.filters[e].destroy();this.filters=null,this.filterArea=null}}class Vf{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(e=>{this.add({test:e.test,maskClass:e})}))}add(e){this._tests.push(e)}getMaskEffect(e){this._initialized||this.init();for(let t=0;t<this._tests.length;t++){const r=this._tests[t];if(r.test(e))return Ge.get(r.maskClass,e)}return e}returnMaskEffect(e){Ge.return(e)}}const Si=new Vf;J.handleByList(C.MaskEffect,Si._effectClasses);const Xf={_maskEffect:null,_maskOptions:{inverse:!1,channel:"red"},_filterEffect:null,effects:[],_markStructureAsChanged(){const n=this.renderGroup||this.parentRenderGroup;n&&(n.structureDidChange=!0)},addEffect(n){this.effects.indexOf(n)===-1&&(this.effects.push(n),this.effects.sort((t,r)=>t.priority-r.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(n){const e=this.effects.indexOf(n);e!==-1&&(this.effects.splice(e,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(n){const e=this._maskEffect;e?.mask!==n&&(e&&(this.removeEffect(e),Si.returnMaskEffect(e),this._maskEffect=null),n!=null&&(this._maskEffect=Si.getMaskEffect(n),this.addEffect(this._maskEffect)))},get mask(){return this._maskEffect?.mask},setMask(n){this._maskOptions={...this._maskOptions,...n},n.mask&&(this.mask=n.mask),this._markStructureAsChanged()},set filters(n){!Array.isArray(n)&&n&&(n=[n]);const e=this._filterEffect||(this._filterEffect=new rs);n=n;const t=n?.length>0,r=e.filters?.length>0,s=t!==r;n=Array.isArray(n)?n.slice(0):n,e.filters=Object.freeze(n),s&&(t?this.addEffect(e):(this.removeEffect(e),e.filters=n??null))},get filters(){return this._filterEffect?.filters},set filterArea(n){this._filterEffect||(this._filterEffect=new rs),this._filterEffect.filterArea=n},get filterArea(){return this._filterEffect?.filterArea}},$f={label:null,get name(){return X(oe,"Container.name property has been removed, use Container.label instead"),this.label},set name(n){X(oe,"Container.name property has been removed, use Container.label instead"),this.label=n},getChildByName(n,e=!1){return this.getChildByLabel(n,e)},getChildByLabel(n,e=!1){const t=this.children;for(let r=0;r<t.length;r++){const s=t[r];if(s.label===n||n instanceof RegExp&&n.test(s.label))return s}if(e)for(let r=0;r<t.length;r++){const i=t[r].getChildByLabel(n,!0);if(i)return i}return null},getChildrenByLabel(n,e=!1,t=[]){const r=this.children;for(let s=0;s<r.length;s++){const i=r[s];(i.label===n||n instanceof RegExp&&n.test(i.label))&&t.push(i)}if(e)for(let s=0;s<r.length;s++)r[s].getChildrenByLabel(n,!0,t);return t}},Qe=Ge.getPool(Y),Nt=Ge.getPool(He),Sy=new Y,Yf={getFastGlobalBounds(n,e){e||(e=new He),e.clear(),this._getGlobalBoundsRecursive(!!n,e,this.parentRenderLayer),e.isValid||e.set(0,0,0,0);const t=this.renderGroup||this.parentRenderGroup;return e.applyMatrix(t.worldTransform),e},_getGlobalBoundsRecursive(n,e,t){let r=e;if(n&&this.parentRenderLayer&&this.parentRenderLayer!==t||this.localDisplayStatus!==7||!this.measurable)return;const s=!!this.effects.length;if((this.renderGroup||s)&&(r=Nt.get().clear()),this.boundsArea)e.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const o=this.bounds;r.addFrame(o.minX,o.minY,o.maxX,o.maxY,this.groupTransform)}const i=this.children;for(let o=0;o<i.length;o++)i[o]._getGlobalBoundsRecursive(n,r,t)}if(s){let i=!1;const o=this.renderGroup||this.parentRenderGroup;for(let a=0;a<this.effects.length;a++)this.effects[a].addBounds&&(i||(i=!0,r.applyMatrix(o.worldTransform)),this.effects[a].addBounds(r,!0));i&&r.applyMatrix(o.worldTransform.copyTo(Sy).invert()),e.addBounds(r),Nt.return(r)}else this.renderGroup&&(e.addBounds(r,this.relativeGroupTransform),Nt.return(r))}};function _s(n,e,t){t.clear();let r,s;return n.parent?e?r=n.parent.worldTransform:(s=Qe.get().identity(),r=Wi(n,s)):r=Y.IDENTITY,jf(n,t,r,e),s&&Qe.return(s),t.isValid||t.set(0,0,0,0),t}function jf(n,e,t,r){if(!n.visible||!n.measurable)return;let s;r?s=n.worldTransform:(n.updateLocalTransform(),s=Qe.get(),s.appendFrom(n.localTransform,t));const i=e,o=!!n.effects.length;if(o&&(e=Nt.get().clear()),n.boundsArea)e.addRect(n.boundsArea,s);else{const a=n.bounds;a&&!a.isEmpty()&&(e.matrix=s,e.addBounds(a));for(let u=0;u<n.children.length;u++)jf(n.children[u],e,s,r)}if(o){for(let a=0;a<n.effects.length;a++)n.effects[a].addBounds?.(e);i.addBounds(e,Y.IDENTITY),Nt.return(e)}r||Qe.return(s)}function Wi(n,e){const t=n.parent;return t&&(Wi(t,e),t.updateLocalTransform(),e.append(t.localTransform)),e}function Jt(n,e){if(n===16777215||!e)return e;if(e===16777215||!n)return n;const t=n>>16&255,r=n>>8&255,s=n&255,i=e>>16&255,o=e>>8&255,a=e&255,u=t*i/255|0,l=r*o/255|0,c=s*a/255|0;return(u<<16)+(l<<8)+c}const Kh=16777215;function ns(n,e){return n===Kh?e:e===Kh?n:Jt(n,e)}function Ht(n){return((n&255)<<16)+(n&65280)+(n>>16&255)}const qf={getGlobalAlpha(n){if(n)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let e=this.alpha,t=this.parent;for(;t;)e*=t.alpha,t=t.parent;return e},getGlobalTransform(n=new Y,e){if(e)return n.copyFrom(this.worldTransform);this.updateLocalTransform();const t=Wi(this,Qe.get().identity());return n.appendFrom(this.localTransform,t),Qe.return(t),n},getGlobalTint(n){if(n)return this.renderGroup?Ht(this.renderGroup.worldColor):this.parentRenderGroup?Ht(ns(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let e=this.localColor,t=this.parent;for(;t;)e=ns(e,t.localColor),t=t.parent;return Ht(e)}};function zi(n,e,t){return e.clear(),t||(t=Y.IDENTITY),Kf(n,e,t,n,!0),e.isValid||e.set(0,0,0,0),e}function Kf(n,e,t,r,s){let i;if(s)i=Qe.get(),i=t.copyTo(i);else{if(!n.visible||!n.measurable)return;n.updateLocalTransform();const u=n.localTransform;i=Qe.get(),i.appendFrom(u,t)}const o=e,a=!!n.effects.length;if(a&&(e=Nt.get().clear()),n.boundsArea)e.addRect(n.boundsArea,i);else{n.renderPipeId&&(e.matrix=i,e.addBounds(n.bounds));const u=n.children;for(let l=0;l<u.length;l++)Kf(u[l],e,i,r,!1)}if(a){for(let u=0;u<n.effects.length;u++)n.effects[u].addLocalBounds?.(e,r);o.addBounds(e,Y.IDENTITY),Nt.return(e)}Qe.return(i)}function Xu(n,e){const t=n.children;for(let r=0;r<t.length;r++){const s=t[r],i=s.uid,o=(s._didViewChangeTick&65535)<<16|s._didContainerChangeTick&65535,a=e.index;(e.data[a]!==i||e.data[a+1]!==o)&&(e.data[e.index]=i,e.data[e.index+1]=o,e.didChange=!0),e.index=a+2,s.children.length&&Xu(s,e)}return e.didChange}const Ty=new Y,Zf={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(n,e){const t=Math.sign(this.scale.x)||1;e!==0?this.scale.x=n/e*t:this.scale.x=t},_setHeight(n,e){const t=Math.sign(this.scale.y)||1;e!==0?this.scale.y=n/e*t:this.scale.y=t},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new He});const n=this._localBoundsCacheData;return n.index=1,n.didChange=!1,n.data[0]!==this._didViewChangeTick&&(n.didChange=!0,n.data[0]=this._didViewChangeTick),Xu(this,n),n.didChange&&zi(this,n.localBounds,Ty),n.localBounds},getBounds(n,e){return _s(this,n,e||new He)}},Qf={_onRender:null,set onRender(n){const e=this.renderGroup||this.parentRenderGroup;if(!n){this._onRender&&e?.removeOnRender(this),this._onRender=null;return}this._onRender||e?.addOnRender(this),this._onRender=n},get onRender(){return this._onRender}},Jf={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(n){this._zIndex!==n&&(this._zIndex=n,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(Cy))}};function Cy(n,e){return n._zIndex-e._zIndex}const ep={getGlobalPosition(n=new ge,e=!1){return this.parent?this.parent.toGlobal(this._position,n,e):(n.x=this._position.x,n.y=this._position.y),n},toGlobal(n,e,t=!1){const r=this.getGlobalTransform(Qe.get(),t);return e=r.apply(n,e),Qe.return(r),e},toLocal(n,e,t,r){e&&(n=e.toGlobal(n,t,r));const s=this.getGlobalTransform(Qe.get(),r);return t=s.applyInverse(n,t),Qe.return(s),t}};class Vi{constructor(){this.uid=ye("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(e){this.instructions[this.instructionSize++]=e}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}let wy=0;class tp{constructor(e){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this.textureStyle=new mt(this.textureOptions)}createTexture(e,t,r,s){const i=new Te({...this.textureOptions,width:e,height:t,resolution:1,antialias:r,autoGarbageCollect:!1,autoGenerateMipmaps:s});return new z({source:i,label:`texturePool_${wy++}`})}getOptimalTexture(e,t,r=1,s,i=!1){let o=Math.ceil(e*r-1e-6),a=Math.ceil(t*r-1e-6);o=Lr(o),a=Lr(a);const u=s?1:0,l=i?1:0,c=(o<<17)+(a<<2)+(l<<1)+u;this._texturePool[c]||(this._texturePool[c]=[]);let h=this._texturePool[c].pop();return h||(h=this.createTexture(o,a,s,i)),h.source._resolution=r,h.source.width=o/r,h.source.height=a/r,h.source.pixelWidth=o,h.source.pixelHeight=a,h.frame.x=0,h.frame.y=0,h.frame.width=e,h.frame.height=t,h.updateUvs(),this._poolKeyHash[h.uid]=c,h}getSameSizeTexture(e,t=!1){const r=e.source;return this.getOptimalTexture(e.width,e.height,r._resolution,t)}returnTexture(e,t=!1){const r=this._poolKeyHash[e.uid];t&&(e.source.style=this.textureStyle),this._texturePool[r].push(e)}clear(e){if(e=e!==!1,e)for(const t in this._texturePool){const r=this._texturePool[t];if(r)for(let s=0;s<r.length;s++)r[s].destroy(!0)}this._texturePool={}}}const Pe=new tp;zr.register(Pe);class Ti{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new Y,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new Vi,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(e){this.root=e,e._onRender&&this.addOnRender(e),e.didChange=!0;const t=e.children;for(let r=0;r<t.length;r++){const s=t[r];s._updateFlags=15,this.addChild(s)}}enableCacheAsTexture(e={}){this.textureOptions=e,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(Pe.returnTexture(this.texture,!0),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0;const e=this._parentCacheAsTextureRenderGroup;e&&!e.textureNeedsUpdate&&e.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(const e in this.childrenToUpdate){const t=this.childrenToUpdate[e];t.list.fill(null),t.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(e){e.renderGroupParent&&e.renderGroupParent._removeRenderGroupChild(e),e.renderGroupParent=this,this.renderGroupChildren.push(e)}_removeRenderGroupChild(e){const t=this.renderGroupChildren.indexOf(e);t>-1&&this.renderGroupChildren.splice(t,1),e.renderGroupParent=null}addChild(e){if(this.structureDidChange=!0,e.parentRenderGroup=this,e.updateTick=-1,e.parent===this.root?e.relativeRenderGroupDepth=1:e.relativeRenderGroupDepth=e.parent.relativeRenderGroupDepth+1,e.didChange=!0,this.onChildUpdate(e),e.renderGroup){this.addRenderGroupChild(e.renderGroup);return}e._onRender&&this.addOnRender(e);const t=e.children;for(let r=0;r<t.length;r++)this.addChild(t[r])}removeChild(e){if(this.structureDidChange=!0,e._onRender&&(e.renderGroup||this.removeOnRender(e)),e.parentRenderGroup=null,e.renderGroup){this._removeRenderGroupChild(e.renderGroup);return}const t=e.children;for(let r=0;r<t.length;r++)this.removeChild(t[r])}removeChildren(e){for(let t=0;t<e.length;t++)this.removeChild(e[t])}onChildUpdate(e){let t=this.childrenToUpdate[e.relativeRenderGroupDepth];t||(t=this.childrenToUpdate[e.relativeRenderGroupDepth]={index:0,list:[]}),t.list[t.index++]=e}updateRenderable(e){e.globalDisplayStatus<7||(this.instructionSet.renderPipes[e.renderPipeId].updateRenderable(e),e.didViewUpdate=!1)}onChildViewUpdate(e){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=e}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(e){this._onRenderContainers.push(e)}removeOnRender(e){this._onRenderContainers.splice(this._onRenderContainers.indexOf(e),1)}runOnRender(e){for(let t=0;t<this._onRenderContainers.length;t++)this._onRenderContainers[t]._onRender(e)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(e=[]){const t=this.root.children;for(let r=0;r<t.length;r++)this._getChildren(t[r],e);return e}_getChildren(e,t=[]){if(t.push(e),e.renderGroup)return t;const r=e.children;for(let s=0;s<r.length;s++)this._getChildren(r[s],t);return t}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new Y),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new Y),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((this._matrixDirty&4)===0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;const e=this._parentCacheAsTextureRenderGroup;return e?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new Y),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(e.inverseWorldTransform).translate(-e._textureBounds.x,-e._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}function Ci(n,e,t={}){for(const r in e)!t[r]&&e[r]!==void 0&&(n[r]=e[r])}const Qo=new Ee(null),Os=new Ee(null),Jo=new Ee(null,1,1),Ls=new Ee(null),ss=1,Xi=2,tn=4,Ay=8;class Ce extends nt{constructor(e={}){super(),this.uid=ye("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new Y,this.relativeGroupTransform=new Y,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new Ee(this,0,0),this._scale=Jo,this._pivot=Os,this._origin=Ls,this._skew=Qo,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],Ci(this,e,{children:!0,parent:!0,effects:!0}),e.children?.forEach(t=>this.addChild(t)),e.parent?.addChild(this)}static mixin(e){X("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),J.mixin(Ce,e)}set _didChangeId(e){this._didViewChangeTick=e>>12&4095,this._didContainerChangeTick=e&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...e){if(this.allowChildren||X(oe,"addChild: Only Containers will be allowed to add children in v8.0.0"),e.length>1){for(let s=0;s<e.length;s++)this.addChild(e[s]);return e[0]}const t=e[0],r=this.renderGroup||this.parentRenderGroup;return t.parent===this?(this.children.splice(this.children.indexOf(t),1),this.children.push(t),r&&(r.structureDidChange=!0),t):(t.parent&&t.parent.removeChild(t),this.children.push(t),this.sortableChildren&&(this.sortDirty=!0),t.parent=this,t.didChange=!0,t._updateFlags=15,r&&r.addChild(t),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this),this._didViewChangeTick++,t._zIndex!==0&&t.depthOfChildModified(),t)}removeChild(...e){if(e.length>1){for(let s=0;s<e.length;s++)this.removeChild(e[s]);return e[0]}const t=e[0],r=this.children.indexOf(t);return r>-1&&(this._didViewChangeTick++,this.children.splice(r,1),this.renderGroup?this.renderGroup.removeChild(t):this.parentRenderGroup&&this.parentRenderGroup.removeChild(t),t.parentRenderLayer&&t.parentRenderLayer.detach(t),t.parent=null,this.emit("childRemoved",t,this,r),t.emit("removed",this)),t}_onUpdate(e){e&&e===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(e){!!this.renderGroup!==e&&(e?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;const e=this.parentRenderGroup;e?.removeChild(this),this.renderGroup=Ge.get(Ti,this),this.groupTransform=Y.IDENTITY,e?.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const e=this.parentRenderGroup;e?.removeChild(this),Ge.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,e?.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new Y),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(e){this._position.x=e}get y(){return this._position.y}set y(e){this._position.y=e}get position(){return this._position}set position(e){this._position.copyFrom(e)}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this._onUpdate(this._skew))}get angle(){return this.rotation*Ef}set angle(e){this.rotation=e*Pf}get pivot(){return this._pivot===Os&&(this._pivot=new Ee(this,0,0)),this._pivot}set pivot(e){this._pivot===Os&&(this._pivot=new Ee(this,0,0),this._origin!==Ls&&Z("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof e=="number"?this._pivot.set(e):this._pivot.copyFrom(e)}get skew(){return this._skew===Qo&&(this._skew=new Ee(this,0,0)),this._skew}set skew(e){this._skew===Qo&&(this._skew=new Ee(this,0,0)),this._skew.copyFrom(e)}get scale(){return this._scale===Jo&&(this._scale=new Ee(this,1,1)),this._scale}set scale(e){this._scale===Jo&&(this._scale=new Ee(this,0,0)),typeof e=="string"&&(e=parseFloat(e)),typeof e=="number"?this._scale.set(e):this._scale.copyFrom(e)}get origin(){return this._origin===Ls&&(this._origin=new Ee(this,0,0)),this._origin}set origin(e){this._origin===Ls&&(this._origin=new Ee(this,0,0),this._pivot!==Os&&Z("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof e=="number"?this._origin.set(e):this._origin.copyFrom(e)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(e){const t=this.getLocalBounds().width;this._setWidth(e,t)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(e){const t=this.getLocalBounds().height;this._setHeight(e,t)}getSize(e){e||(e={});const t=this.getLocalBounds();return e.width=Math.abs(this.scale.x*t.width),e.height=Math.abs(this.scale.y*t.height),e}setSize(e,t){const r=this.getLocalBounds();typeof e=="object"?(t=e.height??e.width,e=e.width):t??(t=e),e!==void 0&&this._setWidth(e,r.width),t!==void 0&&this._setHeight(t,r.height)}_updateSkew(){const e=this._rotation,t=this._skew;this._cx=Math.cos(e+t._y),this._sx=Math.sin(e+t._y),this._cy=-Math.sin(e-t._x),this._sy=Math.cos(e-t._x)}updateTransform(e){return this.position.set(typeof e.x=="number"?e.x:this.position.x,typeof e.y=="number"?e.y:this.position.y),this.scale.set(typeof e.scaleX=="number"?e.scaleX:this.scale.x,typeof e.scaleY=="number"?e.scaleY:this.scale.y),this.rotation=typeof e.rotation=="number"?e.rotation:this.rotation,this.skew.set(typeof e.skewX=="number"?e.skewX:this.skew.x,typeof e.skewY=="number"?e.skewY:this.skew.y),this.pivot.set(typeof e.pivotX=="number"?e.pivotX:this.pivot.x,typeof e.pivotY=="number"?e.pivotY:this.pivot.y),this.origin.set(typeof e.originX=="number"?e.originX:this.origin.x,typeof e.originY=="number"?e.originY:this.origin.y),this}setFromMatrix(e){e.decompose(this)}updateLocalTransform(){const e=this._didContainerChangeTick;if(this._didLocalTransformChangeId===e)return;this._didLocalTransformChangeId=e;const t=this.localTransform,r=this._scale,s=this._pivot,i=this._origin,o=this._position,a=r._x,u=r._y,l=s._x,c=s._y,h=-i._x,d=-i._y;t.a=this._cx*a,t.b=this._sx*a,t.c=this._cy*u,t.d=this._sy*u,t.tx=o._x-(l*t.a+c*t.c)+(h*t.a+d*t.c)-h,t.ty=o._y-(l*t.b+c*t.d)+(h*t.b+d*t.d)-d}set alpha(e){e!==this.localAlpha&&(this.localAlpha=e,this._updateFlags|=ss,this._onUpdate())}get alpha(){return this.localAlpha}set tint(e){const r=le.shared.setValue(e??16777215).toBgrNumber();r!==this.localColor&&(this.localColor=r,this._updateFlags|=ss,this._onUpdate())}get tint(){return Ht(this.localColor)}set blendMode(e){this.localBlendMode!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Xi,this.localBlendMode=e,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(e){const t=e?2:0;(this.localDisplayStatus&2)!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=tn,this.localDisplayStatus^=2,this._onUpdate(),this.emit("visibleChanged",e))}get culled(){return!(this.localDisplayStatus&4)}set culled(e){const t=e?0:4;(this.localDisplayStatus&4)!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=tn,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(e){const t=e?1:0;(this.localDisplayStatus&1)!==t&&(this._updateFlags|=tn,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(e=!1){if(this.destroyed)return;this.destroyed=!0;let t;if(this.children.length&&(t=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof e=="boolean"?e:e?.children)&&t)for(let s=0;s<t.length;++s)t[s].destroy(e);this.renderGroup?.destroy(),this.renderGroup=null}}J.mixin(Ce,Wf,Yf,ep,Qf,Zf,Xf,$f,Jf,Of,Hf,qf,zf);class Vt extends Ce{constructor(e){super(e),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new He(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=e.autoGarbageCollect??!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(e){this._roundPixels=e?1:0}containsPoint(e){const t=this.bounds,{x:r,y:s}=e;return r>=t.minX&&r<=t.maxX&&s>=t.minY&&s<=t.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;const e=this.renderGroup||this.parentRenderGroup;e&&e.onChildViewUpdate(this)}unload(){this.emit("unload",this);for(const e in this._gpuData)this._gpuData[e]?.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(e){this.unload(),super.destroy(e),this._bounds=null}collectRenderablesSimple(e,t,r){const{renderPipes:s}=t;s.blendMode.pushBlendMode(this,this.groupBlendMode,e);const o=s[this.renderPipeId];o?.addRenderable&&o.addRenderable(this,e),this.didViewUpdate=!1;const a=this.children,u=a.length;for(let l=0;l<u;l++)a[l].collectRenderables(e,t,r);s.blendMode.popBlendMode(e)}}class Rt extends Vt{constructor(e=z.EMPTY){e instanceof z&&(e={texture:e});const{texture:t=z.EMPTY,anchor:r,roundPixels:s,width:i,height:o,...a}=e;super({label:"Sprite",...a}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new Ee({_onUpdate:()=>{this.onViewUpdate()}}),r?this.anchor=r:t.defaultAnchor&&(this.anchor=t.defaultAnchor),this.texture=t,this.allowChildren=!1,this.roundPixels=s??!1,i!==void 0&&(this.width=i),o!==void 0&&(this.height=o)}static from(e,t=!1){return e instanceof z?new Rt(e):new Rt(z.from(e,t))}set texture(e){e||(e=z.EMPTY);const t=this._texture;t!==e&&(t&&t.dynamic&&t.off("update",this.onViewUpdate,this),e.dynamic&&e.on("update",this.onViewUpdate,this),this._texture=e,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return zu(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return X("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const e=this._anchor,t=this._texture,r=this._bounds,{width:s,height:i}=t.orig;r.minX=-e._x*s,r.maxX=r.minX+s,r.minY=-e._y*i,r.maxY=r.minY+i}destroy(e=!1){if(super.destroy(e),typeof e=="boolean"?e:e?.texture){const r=typeof e=="boolean"?e:e?.textureSource;this._texture.destroy(r)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){this._setWidth(e,this._texture.orig.width),this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){this._setHeight(e,this._texture.orig.height),this._height=e}getSize(e){return e||(e={}),e.width=Math.abs(this.scale.x)*this._texture.orig.width,e.height=Math.abs(this.scale.y)*this._texture.orig.height,e}setSize(e,t){typeof e=="object"?(t=e.height??e.width,e=e.width):t??(t=e),e!==void 0&&this._setWidth(e,this._texture.orig.width),t!==void 0&&this._setHeight(t,this._texture.orig.height)}}const Ey=new He;function $i(n,e,t){const r=Ey;n.measurable=!0,_s(n,t,r),e.addBoundsMask(r),n.measurable=!1}function Yi(n,e,t){const r=Nt.get();n.measurable=!0;const s=Qe.get().identity(),i=rp(n,t,s);zi(n,r,i),n.measurable=!1,e.addBoundsMask(r),Qe.return(s),Nt.return(r)}function rp(n,e,t){return n?(n!==e&&(rp(n.parent,e,t),n.updateLocalTransform(),t.append(n.localTransform)),t):(Z("Mask bounds, renderable is not inside the root container"),t)}class $u{constructor(e){this.priority=0,this.inverse=!1,this.channel="red",this.pipe="alphaMask",e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.renderMaskToTexture=!(e instanceof Rt),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(e,t){this.inverse||$i(this.mask,e,t)}addLocalBounds(e,t){Yi(this.mask,e,t)}containsPoint(e,t){const r=this.mask;return t(r,e)}destroy(){this.reset()}static test(e){return e instanceof Rt}}$u.extension=C.MaskEffect;class Yu{constructor(e){this.priority=0,this.pipe="colorMask",e?.mask&&this.init(e.mask)}init(e){this.mask=e}destroy(){}static test(e){return typeof e=="number"}}Yu.extension=C.MaskEffect;class ju{constructor(e){this.priority=0,this.pipe="stencilMask",e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(e,t){$i(this.mask,e,t)}addLocalBounds(e,t){Yi(this.mask,e,t)}containsPoint(e,t){const r=this.mask;return t(r,e)}destroy(){this.reset()}static test(e){return e instanceof Ce}}ju.extension=C.MaskEffect;const np={createCanvas:(n,e)=>{const t=document.createElement("canvas");return t.width=n,t.height=e,t},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(n,e)=>fetch(n,e),parseXML:n=>new DOMParser().parseFromString(n,"text/xml")};let Zh=np;const te={get(){return Zh},set(n){Zh=n}};class Et extends Te{constructor(e){e.resource||(e.resource=te.get().createCanvas()),e.width||(e.width=e.resource.width,e.autoDensity||(e.width/=e.resolution)),e.height||(e.height=e.resource.height,e.autoDensity||(e.height/=e.resolution)),super(e),this.uploadMethodId="image",this.autoDensity=e.autoDensity,this.resizeCanvas(),this.transparent=!!e.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(e=this.width,t=this.height,r=this._resolution){const s=super.resize(e,t,r);return s&&this.resizeCanvas(),s}static test(e){return globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&e instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}Et.extension=C.TextureSource;class pr extends Te{constructor(e){super(e),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(e){return globalThis.HTMLImageElement&&e instanceof HTMLImageElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||globalThis.VideoFrame&&e instanceof VideoFrame}}pr.extension=C.TextureSource;var zt=(n=>(n[n.INTERACTION=50]="INTERACTION",n[n.HIGH=25]="HIGH",n[n.NORMAL=0]="NORMAL",n[n.LOW=-25]="LOW",n[n.UTILITY=-50]="UTILITY",n))(zt||{});class ui{constructor(e,t=null,r=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=e,this._context=t,this.priority=r,this._once=s}match(e,t=null){return this._fn===e&&this._context===t}emit(e){this._fn&&(this._context?this._fn.call(this._context,e):this._fn(e));const t=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const t=this.next;return this.next=e?null:t,this.previous=null,t}}const sp=class pt{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new ui(null,null,1/0),this.deltaMS=1/pt.targetFPMS,this.elapsedMS=1/pt.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,r=zt.NORMAL){return this._addListener(new ui(e,t,r))}addOnce(e,t,r=zt.NORMAL){return this._addListener(new ui(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=e-i%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*pt.targetFPMS;const r=this._head;let s=r.next;for(;s;)s=s.emit(this);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(Math.max(0,e)/1e3,pt.targetFPMS);this._maxElapsedMS=1/t,this._minElapsedMS&&e>this.maxFPS&&(this.maxFPS=e)}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){e===0?this._minElapsedMS=0:(e<this.minFPS&&(this.minFPS=e),this._minElapsedMS=1/(e/1e3))}static get shared(){if(!pt._shared){const e=pt._shared=new pt;e.autoStart=!0,e._protected=!0}return pt._shared}static get system(){if(!pt._system){const e=pt._system=new pt;e.autoStart=!0,e._protected=!0}return pt._system}};sp.targetFPMS=.06;let ze=sp,ea;async function qu(){return ea??(ea=(async()=>{const e=te.get().createCanvas(1,1).getContext("webgl");if(!e)return"premultiply-alpha-on-upload";const t=await new Promise(o=>{const a=document.createElement("video");a.onloadeddata=()=>o(a),a.onerror=()=>o(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",a.load()});if(!t)return"premultiply-alpha-on-upload";const r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r);const s=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,s),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t);const i=new Uint8Array(4);return e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,i),e.deleteFramebuffer(s),e.deleteTexture(r),e.getExtension("WEBGL_lose_context")?.loseContext(),i[0]<=i[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),ea}const ji=class ip extends Te{constructor(e){super(e),this.isReady=!1,this.uploadMethodId="video",e={...ip.defaultOptions,...e},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this.alphaMode=e.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),this._onLoadedMetadata=this._onLoadedMetadata.bind(this),e.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){const e=ze.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;const e=this.resource,t=this.options;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart),e.addEventListener("pause",this._onPlayStop),e.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(t.preload||e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlayThrough),e.addEventListener("error",this._onError,!0)),this.isValid||e.addEventListener("loadedmetadata",this._onLoadedMetadata),this.alphaMode=await qu(),this._load=new Promise((r,s)=>{this.isValid?r(this):(this._resolve=r,this._reject=s,t.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${t.preloadTimeoutMs}ms`))})),e.load())}),this._load}_onError(e){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.resource;return!e.paused&&!e.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onLoadedMetadata(){this.isValid&&this._mediaReady()}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlayThrough),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){const e=this.resource;this.isValid&&(this.isReady=!0,this.resize(e.videoWidth,e.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&this.isValid&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();const e=this.resource;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlayThrough),e.removeEventListener("loadedmetadata",this._onLoadedMetadata),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(ze.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(ze.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(ze.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement}};ji.extension=C.TextureSource;ji.defaultOptions={...Te.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};ji.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let rn=ji;const vt=(n,e,t=!1)=>(Array.isArray(n)||(n=[n]),e?n.map(r=>typeof r=="string"||t?e(r):r):n);class Py{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const t=this._cache.get(e);return t||Z(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){const r=vt(e);let s;for(let u=0;u<this.parsers.length;u++){const l=this.parsers[u];if(l.test(t)){s=l.getCacheableAssets(r,t);break}}const i=new Map(Object.entries(s||{}));s||r.forEach(u=>{i.set(u,t)});const o=[...i.keys()],a={cacheKeys:o,keys:r};r.forEach(u=>{this._cacheMap.set(u,a)}),o.forEach(u=>{const l=s?s[u]:t;this._cache.has(u)&&this._cache.get(u)!==l&&Z("[Cache] already has key:",u),this._cache.set(u,i.get(u))})}remove(e){if(!this._cacheMap.has(e)){Z(`[Assets] Asset id ${e} was not found in the Cache`);return}const t=this._cacheMap.get(e);t.cacheKeys.forEach(s=>{this._cache.delete(s)}),t.keys.forEach(s=>{this._cacheMap.delete(s)})}get parsers(){return this._parsers}}const he=new Py,Ua=[];J.handleByList(C.TextureSource,Ua);function By(n={}){return Ku(n)}function Ku(n={}){const e=n&&n.resource,t=e?n.resource:n,r=e?n:{resource:n};for(let s=0;s<Ua.length;s++){const i=Ua[s];if(i.test(t))return new i(r)}throw new Error(`Could not find a source type for resource: ${r.resource}`)}function op(n={},e=!1){const t=n&&n.resource,r=t?n.resource:n,s=t?n:{resource:n};if(!e&&he.has(r))return he.get(r);const i=new z({source:Ku(s)});return i.on("destroy",()=>{he.has(r)&&he.remove(r)}),e||he.set(r,i),i}function ap(n,e=!1){return typeof n=="string"?he.get(n):n instanceof Te?new z({source:n}):op(n,e)}z.from=ap;Te.from=Ku;J.add($u,Yu,ju,rn,pr,Et,Hi);var gt=(n=>(n[n.Low=0]="Low",n[n.Normal=1]="Normal",n[n.High=2]="High",n))(gt||{});function wt(n){if(typeof n!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(n)}`)}function Bn(n){return n.split("?")[0].split("#")[0]}function Ry(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function My(n,e,t){return n.replace(new RegExp(Ry(e),"g"),t)}function Dy(n,e){let t="",r=0,s=-1,i=0,o=-1;for(let a=0;a<=n.length;++a){if(a<n.length)o=n.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(s===a-1||i===1))if(s!==a-1&&i===2){if(t.length<2||r!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){const u=t.lastIndexOf("/");if(u!==t.length-1){u===-1?(t="",r=0):(t=t.slice(0,u),r=t.length-1-t.lastIndexOf("/")),s=a,i=0;continue}}else if(t.length===2||t.length===1){t="",r=0,s=a,i=0;continue}}}else t.length>0?t+=`/${n.slice(s+1,a)}`:t=n.slice(s+1,a),r=a-s-1;s=a,i=0}else o===46&&i!==-1?++i:i=-1}return t}const lt={toPosix(n){return My(n,"\\","/")},isUrl(n){return/^https?:/.test(this.toPosix(n))},isDataUrl(n){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(n)},isBlobUrl(n){return n.startsWith("blob:")},hasProtocol(n){return/^[^/:]+:/.test(this.toPosix(n))},getProtocol(n){wt(n),n=this.toPosix(n);const e=/^file:\/\/\//.exec(n);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(n);return t?t[0]:""},toAbsolute(n,e,t){if(wt(n),this.isDataUrl(n)||this.isBlobUrl(n))return n;const r=Bn(this.toPosix(e??te.get().getBaseUrl())),s=Bn(this.toPosix(t??this.rootname(r)));return n=this.toPosix(n),n.startsWith("/")?lt.join(s,n.slice(1)):this.isAbsolute(n)?n:this.join(r,n)},normalize(n){if(wt(n),n.length===0)return".";if(this.isDataUrl(n)||this.isBlobUrl(n))return n;n=this.toPosix(n);let e="";const t=n.startsWith("/");this.hasProtocol(n)&&(e=this.rootname(n),n=n.slice(e.length));const r=n.endsWith("/");return n=Dy(n),n.length>0&&r&&(n+="/"),t?`/${n}`:e+n},isAbsolute(n){return wt(n),n=this.toPosix(n),this.hasProtocol(n)?!0:n.startsWith("/")},join(...n){if(n.length===0)return".";let e;for(let t=0;t<n.length;++t){const r=n[t];if(wt(r),r.length>0)if(e===void 0)e=r;else{const s=n[t-1]??"";this.joinExtensions.includes(this.extname(s).toLowerCase())?e+=`/../${r}`:e+=`/${r}`}}return e===void 0?".":this.normalize(e)},dirname(n){if(wt(n),n.length===0)return".";n=this.toPosix(n);let e=n.charCodeAt(0);const t=e===47;let r=-1,s=!0;const i=this.getProtocol(n),o=n;n=n.slice(i.length);for(let a=n.length-1;a>=1;--a)if(e=n.charCodeAt(a),e===47){if(!s){r=a;break}}else s=!1;return r===-1?t?"/":this.isUrl(o)?i+n:i:t&&r===1?"//":i+n.slice(0,r)},rootname(n){wt(n),n=this.toPosix(n);let e="";if(n.startsWith("/")?e="/":e=this.getProtocol(n),this.isUrl(n)){const t=n.indexOf("/",e.length);t!==-1?e=n.slice(0,t):e=n,e.endsWith("/")||(e+="/")}return e},basename(n,e){wt(n),e&&wt(e),n=Bn(this.toPosix(n));let t=0,r=-1,s=!0,i;if(e!==void 0&&e.length>0&&e.length<=n.length){if(e.length===n.length&&e===n)return"";let o=e.length-1,a=-1;for(i=n.length-1;i>=0;--i){const u=n.charCodeAt(i);if(u===47){if(!s){t=i+1;break}}else a===-1&&(s=!1,a=i+1),o>=0&&(u===e.charCodeAt(o)?--o===-1&&(r=i):(o=-1,r=a))}return t===r?r=a:r===-1&&(r=n.length),n.slice(t,r)}for(i=n.length-1;i>=0;--i)if(n.charCodeAt(i)===47){if(!s){t=i+1;break}}else r===-1&&(s=!1,r=i+1);return r===-1?"":n.slice(t,r)},extname(n){wt(n),n=Bn(this.toPosix(n));let e=-1,t=0,r=-1,s=!0,i=0;for(let o=n.length-1;o>=0;--o){const a=n.charCodeAt(o);if(a===47){if(!s){t=o+1;break}continue}r===-1&&(s=!1,r=o+1),a===46?e===-1?e=o:i!==1&&(i=1):e!==-1&&(i=-1)}return e===-1||r===-1||i===0||i===1&&e===r-1&&e===t+1?"":n.slice(e,r)},parse(n){wt(n);const e={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return e;n=Bn(this.toPosix(n));let t=n.charCodeAt(0);const r=this.isAbsolute(n);let s;e.root=this.rootname(n),r||this.hasProtocol(n)?s=1:s=0;let i=-1,o=0,a=-1,u=!0,l=n.length-1,c=0;for(;l>=s;--l){if(t=n.charCodeAt(l),t===47){if(!u){o=l+1;break}continue}a===-1&&(u=!1,a=l+1),t===46?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}return i===-1||a===-1||c===0||c===1&&i===a-1&&i===o+1?a!==-1&&(o===0&&r?e.base=e.name=n.slice(1,a):e.base=e.name=n.slice(o,a)):(o===0&&r?(e.name=n.slice(1,i),e.base=n.slice(1,a)):(e.name=n.slice(o,i),e.base=n.slice(o,a)),e.ext=n.slice(i,a)),e.dir=this.dirname(n),e},sep:"/",delimiter:":",joinExtensions:[".html"]};function up(n,e,t,r,s){const i=e[t];for(let o=0;o<i.length;o++){const a=i[o];t<e.length-1?up(n.replace(r[t],a),e,t+1,r,s):s.push(n.replace(r[t],a))}}function lp(n){const e=/\{(.*?)\}/g,t=n.match(e),r=[];if(t){const s=[];t.forEach(i=>{const o=i.substring(1,i.length-1).split(",");s.push(o)}),up(n,s,0,t,r)}else r.push(n);return r}const is=n=>!Array.isArray(n);class mr{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{const t=e;this._defaultSearchParams=Object.keys(t).map(r=>`${encodeURIComponent(r)}=${encodeURIComponent(t[r])}`).join("&")}}getAlias(e){const{alias:t,src:r}=e;return vt(t||r,i=>typeof i=="string"?i:Array.isArray(i)?i.map(o=>o?.src??o):i?.src?i.src:i,!0)}removeAlias(e,t){this._assetMap[e]&&(t&&t!==this._resolverHash[e]||(delete this._resolverHash[e],delete this._assetMap[e]))}addManifest(e){this._manifest&&Z("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(t=>{this.addBundle(t.name,t.assets)})}addBundle(e,t){const r=[];let s=t;Array.isArray(t)||(s=Object.entries(t).map(([i,o])=>typeof o=="string"||Array.isArray(o)?{alias:i,src:o}:{alias:i,...o})),s.forEach(i=>{const o=i.src,a=i.alias;let u;if(typeof a=="string"){const l=this._createBundleAssetId(e,a);r.push(l),u=[a,l]}else{const l=a.map(c=>this._createBundleAssetId(e,c));r.push(...l),u=[...a,...l]}this.add({...i,alias:u,src:o})}),this._bundles[e]=r}add(e){const t=[];Array.isArray(e)?t.push(...e):t.push(e);let r;r=i=>{this.hasKey(i)&&Z(`[Resolver] already has key: ${i} overwriting`)},vt(t).forEach(i=>{const{src:o}=i;let{data:a,format:u,loadParser:l,parser:c}=i;const h=vt(o).map(g=>typeof g=="string"?lp(g):Array.isArray(g)?g:[g]),d=this.getAlias(i);Array.isArray(d)?d.forEach(r):r(d);const f=[],m=g=>{const p=this._parsers.find(_=>_.test(g));return{src:g,...p?.parse(g)}};h.forEach(g=>{g.forEach(p=>{let _={};if(typeof p!="object"?_=m(p):(a=p.data??a,u=p.format??u,(p.loadParser||p.parser)&&(l=p.loadParser??l,c=p.parser??c),_={...m(p.src),...p}),!d)throw new Error(`[Resolver] alias is undefined for this asset: ${_.src}`);_=this._buildResolvedAsset(_,{aliases:d,data:a,format:u,loadParser:l,parser:c,progressSize:i.progressSize}),f.push(_)})}),d.forEach(g=>{this._assetMap[g]=f})})}resolveBundle(e){const t=is(e);e=vt(e);const r={};return e.forEach(s=>{const i=this._bundles[s];if(i){const o=this.resolve(i),a={};for(const u in o){const l=o[u];a[this._extractAssetIdFromBundle(s,u)]=l}r[s]=a}}),t?r[e[0]]:r}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const r={};for(const s in t)r[s]=t[s].src;return r}return t.src}resolve(e){const t=is(e);e=vt(e);const r={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let i=this._assetMap[s];const o=this._getPreferredOrder(i);o?.priority.forEach(a=>{o.params[a].forEach(u=>{const l=i.filter(c=>c[a]?c[a]===u:!1);l.length&&(i=l)})}),this._resolverHash[s]=i[0]}else this._resolverHash[s]=this._buildResolvedAsset({alias:[s],src:s},{});r[s]=this._resolverHash[s]}),t?r[e[0]]:r}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const r=e[t],s=this._preferredOrder.find(i=>i.params.format.includes(r.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}_buildResolvedAsset(e,t){const{aliases:r,data:s,loadParser:i,parser:o,format:a,progressSize:u}=t;return(this._basePath||this._rootPath)&&(e.src=lt.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=r??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...s||{},...e.data},e.loadParser=i??e.loadParser,e.parser=o??e.parser,e.format=a??e.format??cp(e.src),u!==void 0&&(e.progressSize=u),e}}mr.RETINA_PREFIX=/@([0-9\.]+)x/;function cp(n){return n.split(".").pop().split("?").shift().split("#").shift()}const wi=(n,e)=>{const t=e.split("?")[1];return t&&(n+=`?${t}`),n},hp=class $n{constructor(e,t){this.linkedSheets=[];let r=e;e?.source instanceof Te&&(r={texture:e,data:t});const{texture:s,data:i,cachePrefix:o=""}=r;this.cachePrefix=o,this._texture=s instanceof z?s:null,this.textureSource=s.source,this.textures={},this.animations={},this.data=i;const a=parseFloat(i.meta.scale);a?(this.resolution=a,s.source.resolution=this.resolution):this.resolution=s.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=$n.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(e,t=!1){let r=e;const s=t?1/0:$n.BATCH_SIZE;for(;r-e<s&&r<this._frameKeys.length;){const i=this._frameKeys[r],o=this._frames[i],a=o.frame;if(a){let u=null,l=null;const c=o.trimmed!==!1&&o.sourceSize?o.sourceSize:o.frame,h=new _e(0,0,Math.floor(c.w)/this.resolution,Math.floor(c.h)/this.resolution);o.rotated?u=new _e(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.h)/this.resolution,Math.floor(a.w)/this.resolution):u=new _e(Math.floor(a.x)/this.resolution,Math.floor(a.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution),o.trimmed!==!1&&o.spriteSourceSize&&(l=new _e(Math.floor(o.spriteSourceSize.x)/this.resolution,Math.floor(o.spriteSourceSize.y)/this.resolution,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution)),this.textures[i]=new z({source:this.textureSource,frame:u,orig:h,trim:l,rotate:o.rotated?2:0,defaultAnchor:o.anchor,defaultBorders:o.borders,label:i.toString()})}r++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let r=0;r<e[t].length;r++){const s=e[t][r];this.animations[t].push(this.textures[s])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*$n.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*$n.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){for(const t in this.textures)this.textures[t].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&(this._texture?.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};hp.BATCH_SIZE=1e3;let Ga=hp;const Fy=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function dp(n,e,t){const r={};if(n.forEach(s=>{r[s]=e}),Object.keys(e.textures).forEach(s=>{r[`${e.cachePrefix}${s}`]=e.textures[s]}),!t){const s=lt.dirname(n[0]);e.linkedSheets.forEach((i,o)=>{const a=dp([`${s}/${e.data.meta.related_multi_packs[o]}`],i,!0);Object.assign(r,a)})}return r}const fp={extension:C.Asset,cache:{test:n=>n instanceof Ga,getCacheableAssets:(n,e)=>dp(n,e,!1)},resolver:{extension:{type:C.ResolveParser,name:"resolveSpritesheet"},test:n=>{const t=n.split("?")[0].split("."),r=t.pop(),s=t.pop();return r==="json"&&Fy.includes(s)},parse:n=>{const e=n.split(".");return{resolution:parseFloat(mr.RETINA_PREFIX.exec(n)?.[1]??"1"),format:e[e.length-2],src:n}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:C.LoadParser,priority:gt.Normal,name:"spritesheetLoader"},async testParse(n,e){return lt.extname(e.src).toLowerCase()===".json"&&!!n.frames},async parse(n,e,t){const{texture:r,imageFilename:s,textureOptions:i,cachePrefix:o}=e?.data??{};let a=lt.dirname(e.src);a&&a.lastIndexOf("/")!==a.length-1&&(a+="/");let u;if(r instanceof z)u=r;else{const h=wi(a+(s??n.meta.image),e.src);u=(await t.load([{src:h,data:i}]))[h]}const l=new Ga({texture:u.source,data:n,cachePrefix:o});await l.parse();const c=n?.meta?.related_multi_packs;if(Array.isArray(c)){const h=[];for(const f of c){if(typeof f!="string")continue;let m=a+f;e.data?.ignoreMultiPack||(m=wi(m,e.src),h.push(t.load({src:m,data:{textureOptions:i,ignoreMultiPack:!0}})))}const d=await Promise.all(h);l.linkedSheets=d,d.forEach(f=>{f.linkedSheets=[l].concat(l.linkedSheets.filter(m=>m!==f))})}return l},async unload(n,e,t){await t.unload(n.textureSource._sourceOrigin),n.destroy(!1)}}};J.add(fp);class Zu{constructor(e){this._lastTransform="",this._observer=null,this._tickerAttached=!1,this.updateTranslation=()=>{if(!this._canvas)return;const t=this._canvas.getBoundingClientRect(),r=this._canvas.width,s=this._canvas.height,i=t.width/r*this._renderer.resolution,o=t.height/s*this._renderer.resolution,a=t.left,u=t.top,l=`translate(${a}px, ${u}px) scale(${i}, ${o})`;l!==this._lastTransform&&(this._domElement.style.transform=l,this._lastTransform=l)},this._domElement=e.domElement,this._renderer=e.renderer,!(globalThis.OffscreenCanvas&&this._renderer.canvas instanceof OffscreenCanvas)&&(this._canvas=this._renderer.canvas,this._attachObserver())}get canvas(){return this._canvas}ensureAttached(){!this._domElement.parentNode&&this._canvas.parentNode&&(this._canvas.parentNode.appendChild(this._domElement),this.updateTranslation())}_attachObserver(){"ResizeObserver"in globalThis?(this._observer&&(this._observer.disconnect(),this._observer=null),this._observer=new ResizeObserver(e=>{for(const t of e){if(t.target!==this._canvas)continue;const r=this.canvas.width,s=this.canvas.height,i=t.contentRect.width/r*this._renderer.resolution,o=t.contentRect.height/s*this._renderer.resolution;(this._lastScaleX!==i||this._lastScaleY!==o)&&(this.updateTranslation(),this._lastScaleX=i,this._lastScaleY=o)}}),this._observer.observe(this._canvas)):this._tickerAttached||ze.shared.add(this.updateTranslation,this,zt.HIGH)}destroy(){this._observer?(this._observer.disconnect(),this._observer=null):this._tickerAttached&&ze.shared.remove(this.updateTranslation),this._domElement=null,this._renderer=null,this._canvas=null,this._tickerAttached=!1,this._lastTransform="",this._lastScaleX=null,this._lastScaleY=null}}class _n{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=_n.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new ge,this.page=new ge,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,r){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,r,s,i){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}var ta=/iPhone/i,Qh=/iPod/i,Jh=/iPad/i,ed=/\biOS-universal(?:.+)Mac\b/i,ra=/\bAndroid(?:.+)Mobile\b/i,td=/Android/i,Yr=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Ns=/Silk/i,Kt=/Windows Phone/i,rd=/\bWindows(?:.+)ARM\b/i,nd=/BlackBerry/i,sd=/BB10/i,id=/Opera Mini/i,od=/\b(CriOS|Chrome)(?:.+)Mobile/i,ad=/Mobile(?:.+)Firefox\b/i,ud=function(n){return typeof n<"u"&&n.platform==="MacIntel"&&typeof n.maxTouchPoints=="number"&&n.maxTouchPoints>1&&typeof MSStream>"u"};function Iy(n){return function(e){return e.test(n)}}function ld(n){var e={userAgent:"",platform:"",maxTouchPoints:0};!n&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof n=="string"?e.userAgent=n:n&&n.userAgent&&(e={userAgent:n.userAgent,platform:n.platform,maxTouchPoints:n.maxTouchPoints||0});var t=e.userAgent,r=t.split("[FBAN");typeof r[1]<"u"&&(t=r[0]),r=t.split("Twitter"),typeof r[1]<"u"&&(t=r[0]);var s=Iy(t),i={apple:{phone:s(ta)&&!s(Kt),ipod:s(Qh),tablet:!s(ta)&&(s(Jh)||ud(e))&&!s(Kt),universal:s(ed),device:(s(ta)||s(Qh)||s(Jh)||s(ed)||ud(e))&&!s(Kt)},amazon:{phone:s(Yr),tablet:!s(Yr)&&s(Ns),device:s(Yr)||s(Ns)},android:{phone:!s(Kt)&&s(Yr)||!s(Kt)&&s(ra),tablet:!s(Kt)&&!s(Yr)&&!s(ra)&&(s(Ns)||s(td)),device:!s(Kt)&&(s(Yr)||s(Ns)||s(ra)||s(td))||s(/\bokhttp\b/i)},windows:{phone:s(Kt),tablet:s(rd),device:s(Kt)||s(rd)},other:{blackberry:s(nd),blackberry10:s(sd),opera:s(id),firefox:s(ad),chrome:s(od),device:s(nd)||s(sd)||s(id)||s(ad)||s(od)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}const ky=ld.default??ld,pp=ky(globalThis.navigator),Uy=9,cd=100,Gy=0,Oy=0,hd=2,dd=1,Ly=-1e3,Ny=-1e3,Hy=2,Qu=class mp{constructor(e,t=pp){this._mobileInfo=t,this.debug=!1,this._activateOnTab=!0,this._deactivateOnMouseMove=!0,this._isActive=!1,this._isMobileAccessibility=!1,this._div=null,this._pools={},this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._isRunningTests=!1,this._boundOnKeyDown=this._onKeyDown.bind(this),this._boundOnMouseMove=this._onMouseMove.bind(this),this._hookDiv=null,(t.tablet||t.phone)&&this._createTouchHook(),this._renderer=e}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}get div(){return this._div}_createTouchHook(){const e=document.createElement("button");e.style.width=`${dd}px`,e.style.height=`${dd}px`,e.style.position="absolute",e.style.top=`${Ly}px`,e.style.left=`${Ny}px`,e.style.zIndex=Hy.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}_destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}_activate(){if(this._isActive)return;this._isActive=!0,this._div||(this._div=document.createElement("div"),this._div.style.position="absolute",this._div.style.top=`${Gy}px`,this._div.style.left=`${Oy}px`,this._div.style.pointerEvents="none",this._div.style.zIndex=hd.toString(),this._canvasObserver=new Zu({domElement:this._div,renderer:this._renderer})),this._activateOnTab&&globalThis.addEventListener("keydown",this._boundOnKeyDown,!1),this._deactivateOnMouseMove&&globalThis.document.addEventListener("mousemove",this._boundOnMouseMove,!0);const e=this._renderer.view.canvas;if(e.parentNode)this._canvasObserver.ensureAttached(),this._initAccessibilitySetup();else{const t=new MutationObserver(()=>{e.parentNode&&(t.disconnect(),this._canvasObserver.ensureAttached(),this._initAccessibilitySetup())});t.observe(document.body,{childList:!0,subtree:!0})}}_initAccessibilitySetup(){this._renderer.runners.postrender.add(this),this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered)}_deactivate(){if(!(!this._isActive||this._isMobileAccessibility)){this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._boundOnMouseMove,!0),this._activateOnTab&&globalThis.addEventListener("keydown",this._boundOnKeyDown,!1),this._renderer.runners.postrender.remove(this);for(const e of this._children)e._accessibleDiv?.parentNode&&(e._accessibleDiv.parentNode.removeChild(e._accessibleDiv),e._accessibleDiv=null),e._accessibleActive=!1;for(const e in this._pools)this._pools[e].forEach(r=>{r.parentNode&&r.parentNode.removeChild(r)}),delete this._pools[e];this._div?.parentNode&&this._div.parentNode.removeChild(this._div),this._pools={},this._children=[]}}_updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&(e._accessibleActive||this._addChild(e),e._renderId=this._renderId);const t=e.children;if(t)for(let r=0;r<t.length;r++)this._updateAccessibleObjects(t[r])}init(e){const r={accessibilityOptions:{...mp.defaultOptions,...e?.accessibilityOptions||{}}};this.debug=r.accessibilityOptions.debug,this._activateOnTab=r.accessibilityOptions.activateOnTab,this._deactivateOnMouseMove=r.accessibilityOptions.deactivateOnMouseMove,r.accessibilityOptions.enabledByDefault&&this._activate(),this._renderer.runners.postrender.remove(this)}postrender(){const e=performance.now();if(this._mobileInfo.android.device&&e<this._androidUpdateCount||(this._androidUpdateCount=e+this._androidUpdateFrequency,(!this._renderer.renderingToScreen||!this._renderer.view.canvas)&&!this._isRunningTests))return;const t=new Set;if(this._renderer.lastObjectRendered){this._updateAccessibleObjects(this._renderer.lastObjectRendered);for(const r of this._children)r._renderId===this._renderId&&t.add(this._children.indexOf(r))}for(let r=this._children.length-1;r>=0;r--){const s=this._children[r];t.has(r)||(s._accessibleDiv&&s._accessibleDiv.parentNode&&(s._accessibleDiv.parentNode.removeChild(s._accessibleDiv),this._getPool(s.accessibleType).push(s._accessibleDiv),s._accessibleDiv=null),s._accessibleActive=!1,Vu(this._children,r,1))}this._renderer.renderingToScreen&&this._canvasObserver.ensureAttached();for(let r=0;r<this._children.length;r++){const s=this._children[r];if(!s._accessibleActive||!s._accessibleDiv)continue;const i=s._accessibleDiv,o=s.hitArea||s.getBounds().rectangle;if(s.hitArea){const a=s.worldTransform;i.style.left=`${a.tx+o.x*a.a}px`,i.style.top=`${a.ty+o.y*a.d}px`,i.style.width=`${o.width*a.a}px`,i.style.height=`${o.height*a.d}px`}else this._capHitArea(o),i.style.left=`${o.x}px`,i.style.top=`${o.y}px`,i.style.width=`${o.width}px`,i.style.height=`${o.height}px`}this._renderId++}_updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}_capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:r}=this._renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>r&&(e.height=r-e.y)}_addChild(e){let r=this._getPool(e.accessibleType).pop();r?(r.innerHTML="",r.removeAttribute("title"),r.removeAttribute("aria-label"),r.tabIndex=0):(e.accessibleType==="button"?r=document.createElement("button"):(r=document.createElement(e.accessibleType),r.style.cssText=`
@@ -1 +1 @@
1
- import{CameraDescriptorSchema as f}from"./camera-I5VuZBXq.js";import{ColliderDescriptorSchema as x}from"./collider-CSWEaVtz.js";import{LightDescriptorSchema as l}from"./light-CgIm77Wo.js";import{MaterialDescriptorSchema as M}from"./material-Bain34oO.js";import{MeshDescriptorSchema as d}from"./mesh-C-o5rW8Q.js";import{ParticlesDescriptorSchema as T}from"./particles-B7YDnxCR.js";import{PostProcessingDescriptorSchema as v,RenderEnvironmentSchema as E,ToneMappingDescriptorSchema as L}from"./render-env-GHmWAidt.js";import{QuatSchema as R,TransformSchema as V,Vec3Schema as b}from"./tuples-tnCRZFVA.js";import"./index-D-bf1M-_.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./render-features-BnN-3KIj.js";export{f as CameraDescriptorSchema,x as ColliderDescriptorSchema,l as LightDescriptorSchema,M as MaterialDescriptorSchema,d as MeshDescriptorSchema,T as ParticlesDescriptorSchema,v as PostProcessingDescriptorSchema,R as QuatSchema,E as RenderEnvironmentSchema,L as ToneMappingDescriptorSchema,V as TransformSchema,b as Vec3Schema};
1
+ import{CameraDescriptorSchema as f}from"./camera-Ca5sJl-e.js";import{ColliderDescriptorSchema as x}from"./collider-B_jYR6L8.js";import{LightDescriptorSchema as l}from"./light-ZOmz5hi9.js";import{MaterialDescriptorSchema as M}from"./material-w8dEwmnQ.js";import{MeshDescriptorSchema as d}from"./mesh-AuzwGlCU.js";import{ParticlesDescriptorSchema as T}from"./particles-C-yvqlX5.js";import{PostProcessingDescriptorSchema as v,RenderEnvironmentSchema as E,ToneMappingDescriptorSchema as L}from"./render-env-lC8RffE1.js";import{QuatSchema as R,TransformSchema as V,Vec3Schema as b}from"./tuples-BTr4ijGf.js";import"./index-DO9Y98zJ.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./render-features-hdoOHmMx.js";export{f as CameraDescriptorSchema,x as ColliderDescriptorSchema,l as LightDescriptorSchema,M as MaterialDescriptorSchema,d as MeshDescriptorSchema,T as ParticlesDescriptorSchema,v as PostProcessingDescriptorSchema,R as QuatSchema,E as RenderEnvironmentSchema,L as ToneMappingDescriptorSchema,V as TransformSchema,b as Vec3Schema};
@@ -1 +1 @@
1
- import{A as H,a as r,b as D,c as O,C as i,D as o,H as t,N as m,d as p,P as I,e as N,R as d,S as n,f as U,g as C,h as c,W as M,i as h,j as G,k as g,l as y,m as V,n as f,o as K,p as Y,q as B,s as F}from"./index-D-bf1M-_.js";import{createRootBinding as u}from"./binding-Bmxqznjk.js";import{MOUNTED_CANVAS_SURFACE_SHAPE as x,MOUNTED_DOM_SURFACE_SHAPE as l,MOUNTED_ROOT_BASE_SHAPE as L,MOUNTED_THREE_SURFACE_SHAPE as b,ROOT_ADAPTER_SHAPE as j,ROOT_STATE_OBSERVER_SHAPE as k}from"./root-seam-contract-CyHNRUVA.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";export{H as AUDIO_ADAPTER_SHAPE,r as AUTHORING_ADAPTER_SHAPE,D as AUTHORING_PROVIDER_KEYS,O as AUTHORING_PROVIDER_SHAPES,i as CAMERA_ADAPTER_SHAPE,o as DEBUG_ADAPTER_SHAPE,t as HIERARCHY_PROVIDER_SHAPE,x as MOUNTED_CANVAS_SURFACE_SHAPE,l as MOUNTED_DOM_SURFACE_SHAPE,L as MOUNTED_ROOT_BASE_SHAPE,b as MOUNTED_THREE_SURFACE_SHAPE,m as NAVIGATION_ADAPTER_SHAPE,p as NETWORKING_ADAPTER_SHAPE,I as PHYSICS_2D_ADAPTER_SHAPE,N as PHYSICS_ADAPTER_SHAPE,d as RENDER_DEBUG_ADAPTER_SHAPE,j as ROOT_ADAPTER_SHAPE,k as ROOT_STATE_OBSERVER_SHAPE,n as SEAM_PROOF_STAGES,U as SYSTEM_ADAPTERS_SHAPE,C as SYSTEM_PROVIDER_SHAPES,c as SeamEvidenceLedger,M as WRITE_ANCHOR_KINDS,u as createRootBinding,h as defineSeamShape,G as displayKeyedPhysics,g as emptyWriteAnchorKindCounts,y as gradeSeamCarrier,V as gradeSeamEvidence,f as inspectSeamShape,K as measureAuthoringProviders,Y as nodeKeyedPhysics,B as physicsOwnerOf,F as seamStageAtLeast};
1
+ import{A as H,a as r,b as D,c as O,C as i,D as o,H as t,N as m,d as p,P as I,e as N,R as d,S as n,f as U,g as C,h as c,W as M,i as h,j as G,k as g,l as y,m as V,n as f,o as K,p as Y,q as B,s as F}from"./index-DO9Y98zJ.js";import{createRootBinding as u}from"./binding-Bmxqznjk.js";import{MOUNTED_CANVAS_SURFACE_SHAPE as x,MOUNTED_DOM_SURFACE_SHAPE as l,MOUNTED_ROOT_BASE_SHAPE as L,MOUNTED_THREE_SURFACE_SHAPE as b,ROOT_ADAPTER_SHAPE as j,ROOT_STATE_OBSERVER_SHAPE as k}from"./root-seam-contract-Ht2K79-w.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";export{H as AUDIO_ADAPTER_SHAPE,r as AUTHORING_ADAPTER_SHAPE,D as AUTHORING_PROVIDER_KEYS,O as AUTHORING_PROVIDER_SHAPES,i as CAMERA_ADAPTER_SHAPE,o as DEBUG_ADAPTER_SHAPE,t as HIERARCHY_PROVIDER_SHAPE,x as MOUNTED_CANVAS_SURFACE_SHAPE,l as MOUNTED_DOM_SURFACE_SHAPE,L as MOUNTED_ROOT_BASE_SHAPE,b as MOUNTED_THREE_SURFACE_SHAPE,m as NAVIGATION_ADAPTER_SHAPE,p as NETWORKING_ADAPTER_SHAPE,I as PHYSICS_2D_ADAPTER_SHAPE,N as PHYSICS_ADAPTER_SHAPE,d as RENDER_DEBUG_ADAPTER_SHAPE,j as ROOT_ADAPTER_SHAPE,k as ROOT_STATE_OBSERVER_SHAPE,n as SEAM_PROOF_STAGES,U as SYSTEM_ADAPTERS_SHAPE,C as SYSTEM_PROVIDER_SHAPES,c as SeamEvidenceLedger,M as WRITE_ANCHOR_KINDS,u as createRootBinding,h as defineSeamShape,G as displayKeyedPhysics,g as emptyWriteAnchorKindCounts,y as gradeSeamCarrier,V as gradeSeamEvidence,f as inspectSeamShape,K as measureAuthoringProviders,Y as nodeKeyedPhysics,B as physicsOwnerOf,F as seamStageAtLeast};
@@ -1 +1 @@
1
- import{Z as a}from"./index-D-bf1M-_.js";const r=new Set;function i(t,e,n){return JSON.stringify([t,e,n])}function d(t,e,n){const o=i(t,e,n);r.has(o)||(r.add(o),a.warn(`No declaration covers \`${e}\` in ${t}, so the editor GUESSED \`${n}\` from its text. Declare it (a typed prop on the component, a token value that states its own kind) and the editor reads the declaration instead of a heuristic.`,"inspector"))}export{d as w};
1
+ import{Z as a}from"./index-DO9Y98zJ.js";const r=new Set;function i(t,e,n){return JSON.stringify([t,e,n])}function d(t,e,n){const o=i(t,e,n);r.has(o)||(r.add(o),a.warn(`No declaration covers \`${e}\` in ${t}, so the editor GUESSED \`${n}\` from its text. Declare it (a typed prop on the component, a token value that states its own kind) and the editor reads the declaration instead of a heuristic.`,"inspector"))}export{d as w};
@@ -1 +1 @@
1
- import{Z as r,L as d,d3 as a,aK as c,d4 as p,d5 as m,aQ as l}from"./index-D-bf1M-_.js";import{h as u,f,a as I}from"./active-ingest-Dc8fMyIX.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./game-contract-seams-B1hBrlH9.js";import"./capability-coverage-ir5zRJFr.js";import"./ingest-source-persistence-C0Ex41I6.js";import"./contract-system-adapters-BdX2f-t8.js";function b(){const o=I();if(o){if(!u())throw new Error(`Ingest "${o.worldId}" mounted without the required pause capability; refusing to expose a running game in Edit — ${f()??"no lifecycle control was bound"}.`);r.log(`Ingest "${o.worldId}" is HELD — content time does not advance in Edit until ▶`,"ingest")}const e=l(),i=d()?.scenes.default,n=i?m(i):void 0,s=(n?e.find(t=>t.descriptor.id===n):void 0)??e.find(t=>t.descriptor.id===a)??e.find(t=>t.descriptor.id===c);s&&p(s.descriptor.id)}export{b as landIngestBootInEdit};
1
+ import{Z as r,L as d,d3 as a,aK as c,d4 as p,d5 as m,aQ as l}from"./index-DO9Y98zJ.js";import{h as u,f,a as I}from"./active-ingest-DDiD7TmR.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./game-contract-seams-DBl7ECp0.js";import"./capability-coverage-BgQf1Nai.js";import"./ingest-source-persistence-m93ua9L1.js";import"./contract-system-adapters-BvT5JySD.js";function b(){const o=I();if(o){if(!u())throw new Error(`Ingest "${o.worldId}" mounted without the required pause capability; refusing to expose a running game in Edit — ${f()??"no lifecycle control was bound"}.`);r.log(`Ingest "${o.worldId}" is HELD — content time does not advance in Edit until ▶`,"ingest")}const e=l(),i=d()?.scenes.default,n=i?m(i):void 0,s=(n?e.find(t=>t.descriptor.id===n):void 0)??e.find(t=>t.descriptor.id===a)??e.find(t=>t.descriptor.id===c);s&&p(s.descriptor.id)}export{b as landIngestBootInEdit};
@@ -1 +1 @@
1
- import{ag as y,Z as v,bX as b,bY as R,dw as S,dx as E,b_ as f}from"./index-D-bf1M-_.js";import{w}from"./mounted-authoring-D0nt0boC.js";import{P as k}from"./pixi-authoring-adapter-WIDqEfD_.js";import{createLiveCanvasWriteTarget as A}from"./pixi-live-write-target-D6rZZgKb.js";import{resolveCanvasPixiForEditor as x}from"./canvas-entry-runtime-CmAdA7mP.js";import{C}from"./crash-null-boundary-v3a0uEgw.js";import{a as l}from"./json-history-resource-CTmpVR0-.js";import{a as I}from"./realm-services-DOX3MdjT.js";import{r as P}from"./react-root-BHA-cdrW.js";import{D as $}from"./dom-authoring-adapter-Q3siA5LQ.js";import{w as D,R as M}from"./react-world-authoring-adapter-aQJF6lY7.js";import{createPhysics2DRegistry as j}from"./physics-registry-B2Jkp8e6.js";import{createPhysicsAdapter2D as z}from"./system-adapters-rIC8FSGP.js";import{s as B}from"./three-authoring-adapter-gR5zFyrx.js";import{r as h}from"./index-nmcBqr7Y.js";import{r as F}from"./index-CtzuWnCS.js";import{a as O}from"./client-DNXj_opT.js";import{mountModuleRootRuntime as T}from"./module-mode-DSRb7X7Q.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./entity-object-Cw5lqi8N.js";import"./user-data-BPYoci0m.js";import"./workspace-arrangement-BWddjPjg.js";import"./three-contract-Dkt6PmWY.js";import"./index-CT82WIOK.js";import"./source-persistence-backend-5wzSP0Hv.js";import"./ingest-source-persistence-C0Ex41I6.js";import"./component-instance-root-Cx7gmDOy.js";import"./pixi-transform-channels-P4rvmusc.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./debug-registry-9TuqM9UA.js";import"./three-ingest-runtime-DF6VCu5H.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./inspect-msIG8Qeu.js";import"./inference-diagnostics-zatIyL4O.js";import"./board-guides-C6HbbTzb.js";import"./relative-import-specifier-CEoSx6qX.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./writer-tw6EcuVO.js";import"./three-projection-core-B5hJO7jz.js";import"./editor-layers-KmhRTl5z.js";import"./three-Blh8FcB2.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./r3f-physics-binding-Bs1QjbGv.js";import"./capability-coverage-ir5zRJFr.js";import"./game-contract-seams-B1hBrlH9.js";import"./binding-resolver-ByoEiLk3.js";import"./native-debug-module-UkvSJ8h6.js";import"./native-entry-surface-BE8LJNdu.js";import"./contract-system-adapters-BdX2f-t8.js";import"./adapter-surface-Y37Nzcyw.js";import"./index-DzuOGwVB.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./relative-path-guard-GiM7Lsz8.js";function g(t,i,n){t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.zIndex=String(i.zOrder??0),t.style.pointerEvents=n}async function W(t,i,n,m){const r=await I(n,S()),a=await P(t,r),e=document.createElement("div");e.dataset.volterRootSurface="true",g(e,t,"none"),i.appendChild(e);const u=O.createRoot(e);let s=null;if(F.flushSync(()=>{u.render(h.createElement(C,{onCaught:c=>{s=c}},h.createElement(a)))}),s!==null)throw u.unmount(),e.remove(),s instanceof Error?s:new Error(String(s));let o;if(m)if(D(e).nodes.size>0){const p=E("An ingest sibling’s react layer");o=new M(e,m.shell,{...p?{writeBackend:p}:{}})}else o=new $(e,m,{journal:l(t.id)});return{worldId:t.id,...o?{authoring:o}:{},dispose(){u.unmount(),e.remove()}}}async function L(t,i,n,m,r){const a=document.createElement("div");g(a,i,"auto"),n.appendChild(a);try{const e=n.clientWidth||800,u=n.clientHeight||600,{session:s}=await T(t,i,m,a,e,u),o=s.game.roots[0],c=o.mounted.authoring;let p;if(r)if(c)p=w(c,r);else if(o.kind==="three")p=B(r,o.threeScene(),{frameControl:"host",journal:l(i.id)});else if(o.kind==="canvas")if(o.mounted.kind!=="canvas"||o.mounted.substrate.name!=="pixi")p=o.mounted.authoring??f(r.shell,`${i.id} (${o.mounted.kind==="canvas"?o.mounted.substrate.name:"unknown"} authoring unavailable)`);else{const d=z(o.physics2d??j());p=new k(o.canvasRoot(),r,{pixi:await x(),target:A({physics:d}),journal:l(i.id),surface:()=>a})}else p=f(r.shell,`${i.id} (no authoring surface)`);return{worldId:i.id,...p?{authoring:p}:{},setPaused(d){d?s.pause():s.resume()},dispose(){s.stop(),a.remove()}}}catch(e){throw a.remove(),e}}function N(t){throw new Error(`sibling world "${t.id}" (kind: ${t.surface}, adapter identity: "${t.adapter.identity}") has no known composite-sibling mount path — every currently-resolvable identity (three/canvas/dom/module) is routed above; this is reached only for a genuinely unroutable shape.`)}function H(t){return t.adapter.type==="module"||t.adapter.identity==="three"||t.adapter.identity==="canvas"?"scoped-runtime":t.adapter.identity==="dom"?"react-layer":null}async function J(t,i,n,m,r){switch(H(i)){case"scoped-runtime":return L(t,i,n,m,r);case"react-layer":return W(i,n,m,r);default:N(i)}}async function ae(t,i,n,m,r){const a=[];for(const e of y(t))if(e.id!==i)try{a.push(await J(t,e,n,m,r))}catch(u){v.error(`Composite sibling "${e.id}" failed to mount: ${u}`,"ingest"),b({worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:R(u)})}return a}export{ae as mountIngestSiblings,H as siblingMountRoute};
1
+ import{ag as y,Z as v,bX as b,bY as R,dw as S,dx as E,b_ as f}from"./index-DO9Y98zJ.js";import{w}from"./mounted-authoring-DNOpzk2o.js";import{P as k}from"./pixi-authoring-adapter-DfF1VcO4.js";import{createLiveCanvasWriteTarget as A}from"./pixi-live-write-target-iJZrIA6_.js";import{resolveCanvasPixiForEditor as x}from"./canvas-entry-runtime-CkkMjKp-.js";import{C}from"./crash-null-boundary-v3a0uEgw.js";import{a as l}from"./json-history-resource-Cisi7uEc.js";import{a as I}from"./realm-services-CQaYLWWQ.js";import{r as P}from"./react-root-BHA-cdrW.js";import{D as $}from"./dom-authoring-adapter-uBTd0U4p.js";import{w as D,R as M}from"./react-world-authoring-adapter-DGhaXMrv.js";import{createPhysics2DRegistry as j}from"./physics-registry-B2Jkp8e6.js";import{createPhysicsAdapter2D as z}from"./system-adapters-rIC8FSGP.js";import{s as B}from"./three-authoring-adapter-DrnsQcV7.js";import{r as h}from"./index-nmcBqr7Y.js";import{r as F}from"./index-CtzuWnCS.js";import{a as O}from"./client-DNXj_opT.js";import{mountModuleRootRuntime as T}from"./module-mode-C6IRWejw.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./entity-object-C4AjSbJN.js";import"./user-data-BDCHzElD.js";import"./workspace-arrangement-ByMAV1d5.js";import"./three-contract-Dkt6PmWY.js";import"./index-IpGBlakk.js";import"./source-persistence-backend-DqA9lnVr.js";import"./ingest-source-persistence-m93ua9L1.js";import"./component-instance-root-CHVZoBls.js";import"./pixi-transform-channels-P4rvmusc.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./debug-registry-B9zz_E_L.js";import"./three-ingest-runtime-DD9SZ14b.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./inspect-DRlNIvT0.js";import"./inference-diagnostics-Ck7yIMYZ.js";import"./board-guides-lEXkcI9k.js";import"./relative-import-specifier-BIjiAOqT.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./writer-tw6EcuVO.js";import"./three-projection-core-C_asJ7ul.js";import"./editor-layers-BslbZ8vZ.js";import"./three-BdwVQK5K.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./r3f-physics-binding-CP2XIv0B.js";import"./capability-coverage-BgQf1Nai.js";import"./game-contract-seams-DBl7ECp0.js";import"./binding-resolver-7rAg5Jej.js";import"./native-debug-module-NkYpVcV7.js";import"./native-entry-surface-BE8LJNdu.js";import"./contract-system-adapters-BvT5JySD.js";import"./adapter-surface-Y37Nzcyw.js";import"./index-DzuOGwVB.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./relative-path-guard-GiM7Lsz8.js";function g(t,i,n){t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.zIndex=String(i.zOrder??0),t.style.pointerEvents=n}async function W(t,i,n,m){const r=await I(n,S()),a=await P(t,r),e=document.createElement("div");e.dataset.volterRootSurface="true",g(e,t,"none"),i.appendChild(e);const u=O.createRoot(e);let s=null;if(F.flushSync(()=>{u.render(h.createElement(C,{onCaught:c=>{s=c}},h.createElement(a)))}),s!==null)throw u.unmount(),e.remove(),s instanceof Error?s:new Error(String(s));let o;if(m)if(D(e).nodes.size>0){const p=E("An ingest sibling’s react layer");o=new M(e,m.shell,{...p?{writeBackend:p}:{}})}else o=new $(e,m,{journal:l(t.id)});return{worldId:t.id,...o?{authoring:o}:{},dispose(){u.unmount(),e.remove()}}}async function L(t,i,n,m,r){const a=document.createElement("div");g(a,i,"auto"),n.appendChild(a);try{const e=n.clientWidth||800,u=n.clientHeight||600,{session:s}=await T(t,i,m,a,e,u),o=s.game.roots[0],c=o.mounted.authoring;let p;if(r)if(c)p=w(c,r);else if(o.kind==="three")p=B(r,o.threeScene(),{frameControl:"host",journal:l(i.id)});else if(o.kind==="canvas")if(o.mounted.kind!=="canvas"||o.mounted.substrate.name!=="pixi")p=o.mounted.authoring??f(r.shell,`${i.id} (${o.mounted.kind==="canvas"?o.mounted.substrate.name:"unknown"} authoring unavailable)`);else{const d=z(o.physics2d??j());p=new k(o.canvasRoot(),r,{pixi:await x(),target:A({physics:d}),journal:l(i.id),surface:()=>a})}else p=f(r.shell,`${i.id} (no authoring surface)`);return{worldId:i.id,...p?{authoring:p}:{},setPaused(d){d?s.pause():s.resume()},dispose(){s.stop(),a.remove()}}}catch(e){throw a.remove(),e}}function N(t){throw new Error(`sibling world "${t.id}" (kind: ${t.surface}, adapter identity: "${t.adapter.identity}") has no known composite-sibling mount path — every currently-resolvable identity (three/canvas/dom/module) is routed above; this is reached only for a genuinely unroutable shape.`)}function H(t){return t.adapter.type==="module"||t.adapter.identity==="three"||t.adapter.identity==="canvas"?"scoped-runtime":t.adapter.identity==="dom"?"react-layer":null}async function J(t,i,n,m,r){switch(H(i)){case"scoped-runtime":return L(t,i,n,m,r);case"react-layer":return W(i,n,m,r);default:N(i)}}async function ae(t,i,n,m,r){const a=[];for(const e of y(t))if(e.id!==i)try{a.push(await J(t,e,n,m,r))}catch(u){v.error(`Composite sibling "${e.id}" failed to mount: ${u}`,"ingest"),b({worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:R(u)})}return a}export{ae as mountIngestSiblings,H as siblingMountRoute};
@@ -1 +1 @@
1
- import{Z as m,eb as f,ec as g,b3 as S,ed as b,ee as w}from"./index-D-bf1M-_.js";const $="volterRecordIndex";function R(i){const e=i?.userData;if(e===null||typeof e!="object")return null;const t=e[$];return typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}let d={state:"absent"},h=0;function j(i,e){const t=i;if(t===null||typeof t!="object")throw new Error(`the data writer "${e}" did not export a module object`);if(typeof t.dataFile!="string"||t.dataFile.length===0)throw new Error(`the data writer "${e}" exports no \`dataFile\` string — a writer must name the one project-relative file it edits`);if(typeof t.planDataEdit!="function")throw new Error(`the data writer "${e}" exports no \`planDataEdit\` function — that is the whole contract: (bytes, request) => {changed, bytes} | {changed, reason}`);return{dataFile:t.dataFile,...typeof t.canPlace=="function"?{canPlace:t.canPlace.bind(t)}:{},planDataEdit:t.planDataEdit.bind(t)}}function x(i){const e=++h;if(i===null){d={state:"absent"};return}d={state:"loading"},i.load().then(t=>{h===e&&(d={state:"ready",writer:j(t,i.specifier)})}).catch(t=>{h===e&&(d={state:"failed",reason:`this game's declared data writer (${i.specifier}) could not be loaded: ${t instanceof Error?t.message:String(t)}`})})}function k(){return d}function I(i){const e=d;if(e.state!=="ready"||!e.writer.canPlace)return null;const t=e.writer.canPlace(i);return t===!0?null:t}function _(i){const e=d;switch(e.state){case"ready":return{anchored:!0,kind:"data",file:e.writer.dataFile,record:i,display:`${e.writer.dataFile} record ${i}`};case"loading":return{anchored:!1,reason:`this object is record ${i} of its game's own level data; the game's data writer is still loading`};case"failed":return{anchored:!1,reason:`this object is record ${i}, but ${e.reason}`};default:return{anchored:!1,reason:`this object is record ${i} of its game's own level data, and this game declares no data writer (\`ingest.dataWriter\`) that could write that record back`}}}const u=new TextEncoder,E=new TextDecoder;let l=null,p=null;function D(){return l}async function y(i=fetch){return l||p||(p=(async()=>{try{const e=await i("/__ingest-source/ownership");if(!e.ok)throw new Error(`HTTP ${e.status}`);l=await e.json()}catch(e){l={writable:!1,reason:`the editor could not reach its dev server to check who owns this game's source (${e instanceof Error?e.message:String(e)})`,projectRoot:null}}return l})(),p)}function T(i){const e=async(r,s)=>{const n=await i(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),o=await n.json();if(!n.ok&&r.endsWith("/read"))throw new Error(`Reading ingested game source failed with HTTP ${n.status}: ${JSON.stringify(o)}`);return o},t=new Map,a=r=>{throw new Error(`The creation-site source backend has no "${r}" — an ingested game has no JSX oids; ingest edits are anchored by creation site.`)};return{historyIdentity:P,readSource:async r=>{const s=await e("/__ingest-source/read",{file:r}),n=s.encoding==="base64";return t.set(r,n?"base64":"utf8"),n?{...s,bytes:w(s.source)}:s},applySource:(r,s,n)=>e("/__ingest-source/apply",{file:r,source:typeof s=="string"?s:b(s),ifMatchSha:n,encoding:typeof s=="string"?t.get(r)??"utf8":"base64"}),writeStyle:()=>a("writeStyle"),removeStyle:()=>a("removeStyle"),writeStruct:()=>a("writeStruct")}}const P={};class N{backend;fetchImpl;history;live;liveResourceKey=null;unregisterLive=null;constructor(e){this.history=e.history,this.live=e.live,this.fetchImpl=e.fetchImpl??fetch.bind(globalThis),this.backend=T(this.fetchImpl),y(this.fetchImpl)}dispose(){this.unregisterLive?.(),this.unregisterLive=null}gate(e,t,a,r="instance"){if(!e.anchored)return{ok:!1,reason:e.reason};const s=e.kind==="data"?`held at ${e.display}`:`created at ${e.display}`;if(e.kind==="data"){const o=I(a);if(o)return{ok:!1,reason:`${s}, but ${o}`}}const n=l;return n?n.writable?e.kind==="source"&&t!==1&&r!=="creation-site"?{ok:!1,reason:t===0?`${s}, but nothing was recorded as constructed there — the editor cannot tell whether that line builds this object alone`:`${s}, but that creation site constructs ${t} objects; a per-object edit cannot be written there`}:f()?{ok:!0}:{ok:!1,reason:`${s}, but this game is playing — hold it to author, or the edit stays live-only`}:{ok:!1,reason:`${s}; ${n.reason??"this game’s source is not writable"}`}:{ok:!1,reason:`${s}; still checking who owns this game's source`}}canAttempt(e,t,a){return this.gate(e,t,a).ok}describe(e,t,a,r="instance"){const s=this.gate(e,t,a,r);return s.ok?`Persisting to ${e.display}.`:`Live-only edit — ${s.reason}.`}async inspect(e){const t=e.anchor;if(!t.anchored||t.kind!=="source")return{};if(e.properties.length===0)return{};try{return(await this.post("/__ingest-source/inspect",{site:{file:t.file,line:t.line,col:t.col},instances:e.instances,...e.writeScope?{writeScope:e.writeScope}:{},...e.surface?{surface:e.surface}:{},properties:e.properties})).properties??{}}catch{return{}}}async persist(e){if(!f())return{persisted:!1,reason:"this game is playing — a play-time edit lives on the running object only"};const t=e.anchor;if(!t.anchored)return{persisted:!1,reason:t.reason};const a=await y(this.fetchImpl);if(!a.writable)return{persisted:!1,reason:a.reason??"this game’s source is not writable"};if(!this.history)return{persisted:!1,reason:"this session has no project history to record into"};if(t.kind==="data")return this.persistData(e,t);const r=await this.post("/__ingest-source/prepare",{site:{file:t.file,line:t.line,col:t.col},instances:e.instances,...e.writeScope?{writeScope:e.writeScope}:{},property:e.property,...e.surface?{surface:e.surface}:{},baseline:e.baseline,next:e.next});if(!r.changed||!r.file||!r.resourcePath||r.prevSource===void 0||r.newSource===void 0||!r.prevSha)return{persisted:!1,reason:r.reason??"the edit was refused"};const s=await this.post("/__ingest-source/apply",{file:r.file,source:r.newSource,ifMatchSha:r.prevSha,note:`${e.property} at ${t.display}`});return s.applied?(await this.recordEdit(e,{file:r.file,resourcePath:r.resourcePath,before:r.prevSource,after:r.newSource}),{persisted:!0,file:r.file,detail:`${e.property} → ${r.file}:${t.line}`}):{persisted:!1,reason:s.error??"the write was refused"}}async remove(e){if(!f())return{persisted:!1,reason:"this game is playing — a play-time edit lives on the running object only"};const t=e.anchor;if(!t.anchored)return{persisted:!1,reason:t.reason};const a=await y(this.fetchImpl);if(!a.writable)return{persisted:!1,reason:a.reason??"this game’s source is not writable"};if(!this.history)return{persisted:!1,reason:"this session has no project history to record into"};if(t.kind==="data")return{persisted:!1,reason:"a level-data record has no removable source statement — its property is the record's own field, not an authored override"};const r=await this.post("/__ingest-source/prepare",{site:{file:t.file,line:t.line,col:t.col},instances:e.instances,...e.writeScope?{writeScope:e.writeScope}:{},property:e.property,...e.surface?{surface:e.surface}:{},remove:!0});if(!r.changed||!r.file||!r.resourcePath||r.prevSource===void 0||r.newSource===void 0||!r.prevSha)return{persisted:!1,reason:r.reason??"the removal was refused"};const s=await this.post("/__ingest-source/apply",{file:r.file,source:r.newSource,ifMatchSha:r.prevSha,note:`${e.property} removed at ${t.display}`});if(!s.applied)return{persisted:!1,reason:s.error??"the removal was refused"};const n=g(this.backend,this.history,{file:r.file,resourcePath:r.resourcePath,before:r.prevSource,after:r.newSource});return await this.history.recordAppliedTransaction({label:e.label,resources:[n.resource],scope:"project"},[n]),{persisted:!0,file:r.file,detail:`${e.property} dropped from ${r.file}:${t.line}`}}async persistData(e,t){const a=k();if(a.state!=="ready"){const c=_(t.record);return{persisted:!1,reason:c.anchored?"this game's data writer changed mid-gesture":c.reason}}const r=await this.post("/__ingest-source/read",{file:t.file});if(typeof r.source!="string"||!r.sha||!r.resourcePath)return{persisted:!1,reason:r.error??`this game's data file ${t.file} could not be read`};if(r.encoding!=="base64")return{persisted:!1,reason:`${t.file} came back as ${r.encoding??"utf8"} text, not bytes — a data writer edits binary game data, and writing text back through it would change the file`};let s;try{s=await a.writer.planDataEdit(w(r.source),{record:t.record,property:e.property,baseline:e.baseline,next:e.next})}catch(c){return{persisted:!1,reason:`this game's data writer refused: ${c instanceof Error?c.message:String(c)}`}}if(!s.changed)return{persisted:!1,reason:s.reason};const n=b(s.bytes),o=await this.post("/__ingest-source/apply",{file:t.file,source:n,encoding:"base64",ifMatchSha:r.sha,note:`${e.property} at ${t.display}`});return o.applied?(await this.recordEdit(e,{file:t.file,resourcePath:r.resourcePath,before:w(r.source),after:s.bytes}),{persisted:!0,file:t.file,detail:`${e.property} → ${t.display}`}):{persisted:!1,reason:o.error??"the write was refused"}}async recordEdit(e,t){const a=this.history,r=this.ensureLiveResource(),s=g(this.backend,a,t),n={objects:{[e.entityId]:{[e.property]:e.baseline}}},o={objects:{[e.entityId]:{[e.property]:e.next}}};await a.recordAppliedTransaction({label:e.label,resources:[s.resource,r],scope:"project"},[s,{resource:r,beforeBytes:u.encode(JSON.stringify(n)),afterBytes:u.encode(JSON.stringify(o)),contentType:"application/json"}])}async post(e,t){return await(await this.fetchImpl(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()}ensureLiveResource(){if(this.liveResourceKey)return this.liveResourceKey;const e=this.history,t=e.registry.registerProject("overlay",".volter/ingest-live-objects","Ingested game objects"),a={descriptor:t,capture:async()=>{const r=u.encode(JSON.stringify({objects:{}}));return{revision:0,contentType:"application/json",bytes:r,sha256:await S(r)}},preflight:async()=>({ok:!0}),restore:async r=>{const s=JSON.parse(E.decode(e.snapshots.read(r).bytes));for(const[n,o]of Object.entries(s.objects))for(const[c,v]of Object.entries(o))this.live.apply(n,c,v)},estimateBytes:r=>r.byteLength};return this.unregisterLive=e.registerDriver(a),this.liveResourceKey=t.key,t.key}}function A(i,e){m.warn(`[ingest] ${i} stayed live-only — ${e}.`)}export{N as I,_ as a,k as b,R as d,D as i,y as l,A as r,x as s};
1
+ import{Z as m,eb as f,ec as g,b3 as S,ed as b,ee as w}from"./index-DO9Y98zJ.js";const $="volterRecordIndex";function R(i){const e=i?.userData;if(e===null||typeof e!="object")return null;const t=e[$];return typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}let d={state:"absent"},h=0;function j(i,e){const t=i;if(t===null||typeof t!="object")throw new Error(`the data writer "${e}" did not export a module object`);if(typeof t.dataFile!="string"||t.dataFile.length===0)throw new Error(`the data writer "${e}" exports no \`dataFile\` string — a writer must name the one project-relative file it edits`);if(typeof t.planDataEdit!="function")throw new Error(`the data writer "${e}" exports no \`planDataEdit\` function — that is the whole contract: (bytes, request) => {changed, bytes} | {changed, reason}`);return{dataFile:t.dataFile,...typeof t.canPlace=="function"?{canPlace:t.canPlace.bind(t)}:{},planDataEdit:t.planDataEdit.bind(t)}}function x(i){const e=++h;if(i===null){d={state:"absent"};return}d={state:"loading"},i.load().then(t=>{h===e&&(d={state:"ready",writer:j(t,i.specifier)})}).catch(t=>{h===e&&(d={state:"failed",reason:`this game's declared data writer (${i.specifier}) could not be loaded: ${t instanceof Error?t.message:String(t)}`})})}function k(){return d}function I(i){const e=d;if(e.state!=="ready"||!e.writer.canPlace)return null;const t=e.writer.canPlace(i);return t===!0?null:t}function _(i){const e=d;switch(e.state){case"ready":return{anchored:!0,kind:"data",file:e.writer.dataFile,record:i,display:`${e.writer.dataFile} record ${i}`};case"loading":return{anchored:!1,reason:`this object is record ${i} of its game's own level data; the game's data writer is still loading`};case"failed":return{anchored:!1,reason:`this object is record ${i}, but ${e.reason}`};default:return{anchored:!1,reason:`this object is record ${i} of its game's own level data, and this game declares no data writer (\`ingest.dataWriter\`) that could write that record back`}}}const u=new TextEncoder,E=new TextDecoder;let l=null,p=null;function D(){return l}async function y(i=fetch){return l||p||(p=(async()=>{try{const e=await i("/__ingest-source/ownership");if(!e.ok)throw new Error(`HTTP ${e.status}`);l=await e.json()}catch(e){l={writable:!1,reason:`the editor could not reach its dev server to check who owns this game's source (${e instanceof Error?e.message:String(e)})`,projectRoot:null}}return l})(),p)}function T(i){const e=async(r,s)=>{const n=await i(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),o=await n.json();if(!n.ok&&r.endsWith("/read"))throw new Error(`Reading ingested game source failed with HTTP ${n.status}: ${JSON.stringify(o)}`);return o},t=new Map,a=r=>{throw new Error(`The creation-site source backend has no "${r}" — an ingested game has no JSX oids; ingest edits are anchored by creation site.`)};return{historyIdentity:P,readSource:async r=>{const s=await e("/__ingest-source/read",{file:r}),n=s.encoding==="base64";return t.set(r,n?"base64":"utf8"),n?{...s,bytes:w(s.source)}:s},applySource:(r,s,n)=>e("/__ingest-source/apply",{file:r,source:typeof s=="string"?s:b(s),ifMatchSha:n,encoding:typeof s=="string"?t.get(r)??"utf8":"base64"}),writeStyle:()=>a("writeStyle"),removeStyle:()=>a("removeStyle"),writeStruct:()=>a("writeStruct")}}const P={};class N{backend;fetchImpl;history;live;liveResourceKey=null;unregisterLive=null;constructor(e){this.history=e.history,this.live=e.live,this.fetchImpl=e.fetchImpl??fetch.bind(globalThis),this.backend=T(this.fetchImpl),y(this.fetchImpl)}dispose(){this.unregisterLive?.(),this.unregisterLive=null}gate(e,t,a,r="instance"){if(!e.anchored)return{ok:!1,reason:e.reason};const s=e.kind==="data"?`held at ${e.display}`:`created at ${e.display}`;if(e.kind==="data"){const o=I(a);if(o)return{ok:!1,reason:`${s}, but ${o}`}}const n=l;return n?n.writable?e.kind==="source"&&t!==1&&r!=="creation-site"?{ok:!1,reason:t===0?`${s}, but nothing was recorded as constructed there — the editor cannot tell whether that line builds this object alone`:`${s}, but that creation site constructs ${t} objects; a per-object edit cannot be written there`}:f()?{ok:!0}:{ok:!1,reason:`${s}, but this game is playing — hold it to author, or the edit stays live-only`}:{ok:!1,reason:`${s}; ${n.reason??"this game’s source is not writable"}`}:{ok:!1,reason:`${s}; still checking who owns this game's source`}}canAttempt(e,t,a){return this.gate(e,t,a).ok}describe(e,t,a,r="instance"){const s=this.gate(e,t,a,r);return s.ok?`Persisting to ${e.display}.`:`Live-only edit — ${s.reason}.`}async inspect(e){const t=e.anchor;if(!t.anchored||t.kind!=="source")return{};if(e.properties.length===0)return{};try{return(await this.post("/__ingest-source/inspect",{site:{file:t.file,line:t.line,col:t.col},instances:e.instances,...e.writeScope?{writeScope:e.writeScope}:{},...e.surface?{surface:e.surface}:{},properties:e.properties})).properties??{}}catch{return{}}}async persist(e){if(!f())return{persisted:!1,reason:"this game is playing — a play-time edit lives on the running object only"};const t=e.anchor;if(!t.anchored)return{persisted:!1,reason:t.reason};const a=await y(this.fetchImpl);if(!a.writable)return{persisted:!1,reason:a.reason??"this game’s source is not writable"};if(!this.history)return{persisted:!1,reason:"this session has no project history to record into"};if(t.kind==="data")return this.persistData(e,t);const r=await this.post("/__ingest-source/prepare",{site:{file:t.file,line:t.line,col:t.col},instances:e.instances,...e.writeScope?{writeScope:e.writeScope}:{},property:e.property,...e.surface?{surface:e.surface}:{},baseline:e.baseline,next:e.next});if(!r.changed||!r.file||!r.resourcePath||r.prevSource===void 0||r.newSource===void 0||!r.prevSha)return{persisted:!1,reason:r.reason??"the edit was refused"};const s=await this.post("/__ingest-source/apply",{file:r.file,source:r.newSource,ifMatchSha:r.prevSha,note:`${e.property} at ${t.display}`});return s.applied?(await this.recordEdit(e,{file:r.file,resourcePath:r.resourcePath,before:r.prevSource,after:r.newSource}),{persisted:!0,file:r.file,detail:`${e.property} → ${r.file}:${t.line}`}):{persisted:!1,reason:s.error??"the write was refused"}}async remove(e){if(!f())return{persisted:!1,reason:"this game is playing — a play-time edit lives on the running object only"};const t=e.anchor;if(!t.anchored)return{persisted:!1,reason:t.reason};const a=await y(this.fetchImpl);if(!a.writable)return{persisted:!1,reason:a.reason??"this game’s source is not writable"};if(!this.history)return{persisted:!1,reason:"this session has no project history to record into"};if(t.kind==="data")return{persisted:!1,reason:"a level-data record has no removable source statement — its property is the record's own field, not an authored override"};const r=await this.post("/__ingest-source/prepare",{site:{file:t.file,line:t.line,col:t.col},instances:e.instances,...e.writeScope?{writeScope:e.writeScope}:{},property:e.property,...e.surface?{surface:e.surface}:{},remove:!0});if(!r.changed||!r.file||!r.resourcePath||r.prevSource===void 0||r.newSource===void 0||!r.prevSha)return{persisted:!1,reason:r.reason??"the removal was refused"};const s=await this.post("/__ingest-source/apply",{file:r.file,source:r.newSource,ifMatchSha:r.prevSha,note:`${e.property} removed at ${t.display}`});if(!s.applied)return{persisted:!1,reason:s.error??"the removal was refused"};const n=g(this.backend,this.history,{file:r.file,resourcePath:r.resourcePath,before:r.prevSource,after:r.newSource});return await this.history.recordAppliedTransaction({label:e.label,resources:[n.resource],scope:"project"},[n]),{persisted:!0,file:r.file,detail:`${e.property} dropped from ${r.file}:${t.line}`}}async persistData(e,t){const a=k();if(a.state!=="ready"){const c=_(t.record);return{persisted:!1,reason:c.anchored?"this game's data writer changed mid-gesture":c.reason}}const r=await this.post("/__ingest-source/read",{file:t.file});if(typeof r.source!="string"||!r.sha||!r.resourcePath)return{persisted:!1,reason:r.error??`this game's data file ${t.file} could not be read`};if(r.encoding!=="base64")return{persisted:!1,reason:`${t.file} came back as ${r.encoding??"utf8"} text, not bytes — a data writer edits binary game data, and writing text back through it would change the file`};let s;try{s=await a.writer.planDataEdit(w(r.source),{record:t.record,property:e.property,baseline:e.baseline,next:e.next})}catch(c){return{persisted:!1,reason:`this game's data writer refused: ${c instanceof Error?c.message:String(c)}`}}if(!s.changed)return{persisted:!1,reason:s.reason};const n=b(s.bytes),o=await this.post("/__ingest-source/apply",{file:t.file,source:n,encoding:"base64",ifMatchSha:r.sha,note:`${e.property} at ${t.display}`});return o.applied?(await this.recordEdit(e,{file:t.file,resourcePath:r.resourcePath,before:w(r.source),after:s.bytes}),{persisted:!0,file:t.file,detail:`${e.property} → ${t.display}`}):{persisted:!1,reason:o.error??"the write was refused"}}async recordEdit(e,t){const a=this.history,r=this.ensureLiveResource(),s=g(this.backend,a,t),n={objects:{[e.entityId]:{[e.property]:e.baseline}}},o={objects:{[e.entityId]:{[e.property]:e.next}}};await a.recordAppliedTransaction({label:e.label,resources:[s.resource,r],scope:"project"},[s,{resource:r,beforeBytes:u.encode(JSON.stringify(n)),afterBytes:u.encode(JSON.stringify(o)),contentType:"application/json"}])}async post(e,t){return await(await this.fetchImpl(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()}ensureLiveResource(){if(this.liveResourceKey)return this.liveResourceKey;const e=this.history,t=e.registry.registerProject("overlay",".volter/ingest-live-objects","Ingested game objects"),a={descriptor:t,capture:async()=>{const r=u.encode(JSON.stringify({objects:{}}));return{revision:0,contentType:"application/json",bytes:r,sha256:await S(r)}},preflight:async()=>({ok:!0}),restore:async r=>{const s=JSON.parse(E.decode(e.snapshots.read(r).bytes));for(const[n,o]of Object.entries(s.objects))for(const[c,v]of Object.entries(o))this.live.apply(n,c,v)},estimateBytes:r=>r.byteLength};return this.unregisterLive=e.registerDriver(a),this.liveResourceKey=t.key,t.key}}function A(i,e){m.warn(`[ingest] ${i} stayed live-only — ${e}.`)}export{N as I,_ as a,k as b,R as d,D as i,y as l,A as r,x as s};
@@ -1 +1 @@
1
- import{ae as i,r as e,Z as p}from"./index-D-bf1M-_.js";import{i as s,a as m}from"./registry-6AYLU18z.js";import{a}from"./mount-ingest-root-C5ZYFXm7.js";import{t as n}from"./three-state-BnjjVq1e.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./active-ingest-Dc8fMyIX.js";import"./game-contract-seams-B1hBrlH9.js";import"./capability-coverage-ir5zRJFr.js";import"./ingest-source-persistence-C0Ex41I6.js";import"./contract-system-adapters-BdX2f-t8.js";import"./editor-shell-store-xXZ_3Vca.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-KmhRTl5z.js";import"./workspace-arrangement-BWddjPjg.js";import"./user-data-BPYoci0m.js";import"./entity-object-Cw5lqi8N.js";import"./three-contract-Dkt6PmWY.js";const z="workspace.service";function B(){const o=i({id:"in-tree-ingest-registry",owner:"@volter/editor-game/contributions/ingest.service.ts",modulePathFor:t=>m(t),importModule:async t=>await s(t)}),r=e().project.onReady(async()=>{const t=n();if(!t){p.error("Ingest auto-launch skipped: the editor shell store had not arrived at project ready.","ingest");return}await a(t)});return()=>{r(),o()}}export{z as point,B as start};
1
+ import{ae as i,r as e,Z as p}from"./index-DO9Y98zJ.js";import{i as s,a as m}from"./registry-Dg8u4mfv.js";import{a}from"./mount-ingest-root-BAqykkyX.js";import{t as n}from"./three-state-mkXrds9y.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./active-ingest-DDiD7TmR.js";import"./game-contract-seams-DBl7ECp0.js";import"./capability-coverage-BgQf1Nai.js";import"./ingest-source-persistence-m93ua9L1.js";import"./contract-system-adapters-BvT5JySD.js";import"./editor-shell-store-yk8VfWS2.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-BslbZ8vZ.js";import"./workspace-arrangement-ByMAV1d5.js";import"./user-data-BDCHzElD.js";import"./entity-object-C4AjSbJN.js";import"./three-contract-Dkt6PmWY.js";const z="workspace.service";function B(){const o=i({id:"in-tree-ingest-registry",owner:"@volter/editor-game/contributions/ingest.service.ts",modulePathFor:t=>m(t),importModule:async t=>await s(t)}),r=e().project.onReady(async()=>{const t=n();if(!t){p.error("Ingest auto-launch skipped: the editor shell store had not arrived at project ready.","ingest");return}await a(t)});return()=>{r(),o()}}export{z as point,B as start};
@@ -1 +1 @@
1
- import{w as p}from"./inference-diagnostics-zatIyL4O.js";const y="data-oid";function S(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function w(e){return e.replace(/-([a-z])/g,(n,t)=>t.toUpperCase())}function C(e,n){return e?e[n]:void 0}const R=e=>{const n=globalThis.window;if(n?.getComputedStyle)return n.getComputedStyle(e);const t=e.style;return{getPropertyValue:s=>String(C(t,w(s))??"")}};function L(e,n,t=R){return t(e).getPropertyValue(S(n))}function v(e){if(!e||typeof e!="object")return null;const n=Object.keys(e).find(t=>t.startsWith("__reactFiber$")||t.startsWith("__reactInternalInstance$"));return n?e[n]??null:null}function u(e){const n=v(e);if(!n?.return)return null;const t=n.return;return t.type&&typeof t.type=="function"?t:null}function $(e){const n=u(e);if(!n)return null;const t=n.type;return t.displayName||t.name||null}function _(e){const n=u(e);if(!n)return null;const t=n.memoizedProps?.[y];return typeof t=="string"?t:null}function P(e){const n=u(e);if(!n)return null;const t=n.memoizedProps;if(!t||typeof t!="object")return null;const s=new Set(["children","key","ref",y,"style","className"]),o={};for(const[r,i]of Object.entries(t))s.has(r)||(typeof i=="string"||typeof i=="number"||typeof i=="boolean")&&(o[r]=String(i));return Object.keys(o).length>0?o:null}function j(e){const n=_(e);if(!n)return null;const t=P(e);return t?{callSiteOid:n,props:t}:null}const f="__visual-edit-preview-styles";function m(e){const n=globalThis.CSSStyleRule;if(typeof n=="function")return e instanceof n;const t=e;return!!t&&typeof t.selectorText=="string"&&!!t.style}function W(e){const n={};for(let t=0;t<e.style.length;t++){const s=e.style[t];n[s]=e.style.getPropertyValue(s)}return n}function b(e,n){const t=globalThis.matchMedia,s=(o,r)=>{for(const i of Array.from(o)){if(m(i)){n(i,r);continue}const a=i;if(!a.cssRules)continue;const c=a.media?.mediaText;typeof c=="string"&&t&&!t(c).matches||typeof a.containerQuery=="string"||a.cssText?.trimStart().startsWith("@container")||s(a.cssRules,r)}};for(const o of e){const r=o.ownerNode;if(r?.id===f)continue;const i=r?.getAttribute?.("data-vite-dev-id")??null;if(i)try{s(o.cssRules,i)}catch{}}}function B(e,n=globalThis.document?.styleSheets??[]){let t=null;return b(n,(s,o)=>{s.selectorText.trim()===`.${e}`&&(t={sourceFile:o})}),t}function G(e=globalThis.document?.styleSheets??[]){const n=[];for(const t of e){const s=t.ownerNode;if(s?.id===f)continue;const o=s?.getAttribute?.("data-vite-dev-id")??null;if(!o)continue;(o.split("?")[0]??o).endsWith(".css")&&!n.includes(o)&&n.push(o)}return n}function z(e,n=globalThis.document?.styleSheets??[]){const t=[];return b(n,(s,o)=>{e.matches(s.selectorText)&&t.push({selectorText:s.selectorText,properties:W(s),sourceFile:o})}),t}function A(e=globalThis.document?.styleSheets??[]){const n=new Map,t=(s,o,r)=>{if(m(s)){const c=s.selectorText,d=r&&/(^|,)\s*:scope\s*($|,)/.test(c),T=/(^|,)\s*(:root|html)\s*($|,)/.test(c)&&!c.includes("[data-theme");if(!d&&!T)return;for(let l=0;l<s.style.length;l++){const h=s.style[l];h.startsWith("--")&&n.set(h,{sourceFile:o,selector:d?":root":c})}return}const i=s;if(!i.cssRules)return;const a=r||!!i.cssText?.trimStart().startsWith("@scope");for(const c of Array.from(i.cssRules))t(c,o,a)};for(const s of e){const o=s.ownerNode;if(o?.id===f)continue;const r=o?.getAttribute?.("data-vite-dev-id")??null;if(r)try{for(const i of Array.from(s.cssRules))t(i,r,!1)}catch{}}return n}function D(e=V()){if(!e)return[];const n=[],t=new Set;for(let o=0;o<e.length;o++){const r=e[o];if(!r.startsWith("--")||r.startsWith("--tw-")||r.startsWith("--fa-")||r.startsWith("--volter-")||r.startsWith("--vscode-")||r==="--chat-input-control-height"||r.startsWith("--dv-")||t.has(r))continue;t.add(r);const i=e.getPropertyValue(r).trim();i&&n.push({name:r,value:i,category:g(r,i)})}const s=A();for(const o of s.keys()){if(t.has(o)||o.startsWith("--tw-")||o.startsWith("--fa-")||o.startsWith("--volter-")||o.startsWith("--dv-")||o.startsWith("--vscode-")||o==="--chat-input-control-height")continue;t.add(o);const r=e.getPropertyValue(o).trim();r&&n.push({name:o,value:r,category:g(o,r)})}for(const o of n){const r=s.get(o.name);r&&(o.declaredIn=r)}return n}const x=/^(#[0-9a-f]{3,8}|rgba?\(|hsla?\(|oklch\()/i,N=/spacing|gap|margin|padding|radius|size|width|height/i,k=/color/i;function g(e,n){return x.test(n)?"color":k.test(e)?(p(":root",e,"color"),"color"):N.test(e)&&/^\d/.test(n)?(p(":root",e,"spacing"),"spacing"):"other"}function K(e){const n=[];for(const t of e){if(t.hasVisibleChildren||t.hasText||t.rect.width>=8&&t.rect.height>=8)continue;const s=Math.max(t.rect.width,40),o=Math.max(t.rect.height,24);n.push({oid:t.oid,displayName:t.displayName,rect:{x:t.rect.x-(s-t.rect.width)/2,y:t.rect.y-(o-t.rect.height)/2,width:s,height:o}})}return n}const E=new Set(["","transparent","rgba(0, 0, 0, 0)"]);function F(e){return E.has(e)}function U(e){for(const n of e)if(!F(n))return n;return"#fff"}const O=["Arial","Helvetica","Times New Roman","Georgia","Verdana","Courier New","Impact","Trebuchet MS","Palatino Linotype","Lucida Console","monospace","sans-serif","serif"];function I(e=[]){const n=new Set;for(const t of e)n.add(t.replace(/^["']|["']$/g,""));for(const t of O)n.add(t);return[...n].sort((t,s)=>t.localeCompare(s))}function H(){const e=globalThis,n=[],t=e.document?.fonts;if(t)for(const s of t)n.push(s.family);return I(n)}function V(){const e=globalThis,n=e.document?.documentElement;if(!(!n||!e.window?.getComputedStyle))return e.window.getComputedStyle(n)}export{z as a,R as b,D as c,$ as d,j as e,K as f,L as g,B as h,G as i,S as j,H as k,U as l};
1
+ import{w as p}from"./inference-diagnostics-Ck7yIMYZ.js";const y="data-oid";function S(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function w(e){return e.replace(/-([a-z])/g,(n,t)=>t.toUpperCase())}function C(e,n){return e?e[n]:void 0}const R=e=>{const n=globalThis.window;if(n?.getComputedStyle)return n.getComputedStyle(e);const t=e.style;return{getPropertyValue:s=>String(C(t,w(s))??"")}};function L(e,n,t=R){return t(e).getPropertyValue(S(n))}function v(e){if(!e||typeof e!="object")return null;const n=Object.keys(e).find(t=>t.startsWith("__reactFiber$")||t.startsWith("__reactInternalInstance$"));return n?e[n]??null:null}function u(e){const n=v(e);if(!n?.return)return null;const t=n.return;return t.type&&typeof t.type=="function"?t:null}function $(e){const n=u(e);if(!n)return null;const t=n.type;return t.displayName||t.name||null}function _(e){const n=u(e);if(!n)return null;const t=n.memoizedProps?.[y];return typeof t=="string"?t:null}function P(e){const n=u(e);if(!n)return null;const t=n.memoizedProps;if(!t||typeof t!="object")return null;const s=new Set(["children","key","ref",y,"style","className"]),o={};for(const[r,i]of Object.entries(t))s.has(r)||(typeof i=="string"||typeof i=="number"||typeof i=="boolean")&&(o[r]=String(i));return Object.keys(o).length>0?o:null}function j(e){const n=_(e);if(!n)return null;const t=P(e);return t?{callSiteOid:n,props:t}:null}const f="__visual-edit-preview-styles";function m(e){const n=globalThis.CSSStyleRule;if(typeof n=="function")return e instanceof n;const t=e;return!!t&&typeof t.selectorText=="string"&&!!t.style}function W(e){const n={};for(let t=0;t<e.style.length;t++){const s=e.style[t];n[s]=e.style.getPropertyValue(s)}return n}function b(e,n){const t=globalThis.matchMedia,s=(o,r)=>{for(const i of Array.from(o)){if(m(i)){n(i,r);continue}const a=i;if(!a.cssRules)continue;const c=a.media?.mediaText;typeof c=="string"&&t&&!t(c).matches||typeof a.containerQuery=="string"||a.cssText?.trimStart().startsWith("@container")||s(a.cssRules,r)}};for(const o of e){const r=o.ownerNode;if(r?.id===f)continue;const i=r?.getAttribute?.("data-vite-dev-id")??null;if(i)try{s(o.cssRules,i)}catch{}}}function B(e,n=globalThis.document?.styleSheets??[]){let t=null;return b(n,(s,o)=>{s.selectorText.trim()===`.${e}`&&(t={sourceFile:o})}),t}function G(e=globalThis.document?.styleSheets??[]){const n=[];for(const t of e){const s=t.ownerNode;if(s?.id===f)continue;const o=s?.getAttribute?.("data-vite-dev-id")??null;if(!o)continue;(o.split("?")[0]??o).endsWith(".css")&&!n.includes(o)&&n.push(o)}return n}function z(e,n=globalThis.document?.styleSheets??[]){const t=[];return b(n,(s,o)=>{e.matches(s.selectorText)&&t.push({selectorText:s.selectorText,properties:W(s),sourceFile:o})}),t}function A(e=globalThis.document?.styleSheets??[]){const n=new Map,t=(s,o,r)=>{if(m(s)){const c=s.selectorText,d=r&&/(^|,)\s*:scope\s*($|,)/.test(c),T=/(^|,)\s*(:root|html)\s*($|,)/.test(c)&&!c.includes("[data-theme");if(!d&&!T)return;for(let l=0;l<s.style.length;l++){const h=s.style[l];h.startsWith("--")&&n.set(h,{sourceFile:o,selector:d?":root":c})}return}const i=s;if(!i.cssRules)return;const a=r||!!i.cssText?.trimStart().startsWith("@scope");for(const c of Array.from(i.cssRules))t(c,o,a)};for(const s of e){const o=s.ownerNode;if(o?.id===f)continue;const r=o?.getAttribute?.("data-vite-dev-id")??null;if(r)try{for(const i of Array.from(s.cssRules))t(i,r,!1)}catch{}}return n}function D(e=V()){if(!e)return[];const n=[],t=new Set;for(let o=0;o<e.length;o++){const r=e[o];if(!r.startsWith("--")||r.startsWith("--tw-")||r.startsWith("--fa-")||r.startsWith("--volter-")||r.startsWith("--vscode-")||r==="--chat-input-control-height"||r.startsWith("--dv-")||t.has(r))continue;t.add(r);const i=e.getPropertyValue(r).trim();i&&n.push({name:r,value:i,category:g(r,i)})}const s=A();for(const o of s.keys()){if(t.has(o)||o.startsWith("--tw-")||o.startsWith("--fa-")||o.startsWith("--volter-")||o.startsWith("--dv-")||o.startsWith("--vscode-")||o==="--chat-input-control-height")continue;t.add(o);const r=e.getPropertyValue(o).trim();r&&n.push({name:o,value:r,category:g(o,r)})}for(const o of n){const r=s.get(o.name);r&&(o.declaredIn=r)}return n}const x=/^(#[0-9a-f]{3,8}|rgba?\(|hsla?\(|oklch\()/i,N=/spacing|gap|margin|padding|radius|size|width|height/i,k=/color/i;function g(e,n){return x.test(n)?"color":k.test(e)?(p(":root",e,"color"),"color"):N.test(e)&&/^\d/.test(n)?(p(":root",e,"spacing"),"spacing"):"other"}function K(e){const n=[];for(const t of e){if(t.hasVisibleChildren||t.hasText||t.rect.width>=8&&t.rect.height>=8)continue;const s=Math.max(t.rect.width,40),o=Math.max(t.rect.height,24);n.push({oid:t.oid,displayName:t.displayName,rect:{x:t.rect.x-(s-t.rect.width)/2,y:t.rect.y-(o-t.rect.height)/2,width:s,height:o}})}return n}const E=new Set(["","transparent","rgba(0, 0, 0, 0)"]);function F(e){return E.has(e)}function U(e){for(const n of e)if(!F(n))return n;return"#fff"}const O=["Arial","Helvetica","Times New Roman","Georgia","Verdana","Courier New","Impact","Trebuchet MS","Palatino Linotype","Lucida Console","monospace","sans-serif","serif"];function I(e=[]){const n=new Set;for(const t of e)n.add(t.replace(/^["']|["']$/g,""));for(const t of O)n.add(t);return[...n].sort((t,s)=>t.localeCompare(s))}function H(){const e=globalThis,n=[],t=e.document?.fonts;if(t)for(const s of t)n.push(s.family);return I(n)}function V(){const e=globalThis,n=e.document?.documentElement;if(!(!n||!e.window?.getComputedStyle))return e.window.getComputedStyle(n)}export{z as a,R as b,D as c,$ as d,j as e,K as f,L as g,B as h,G as i,S as j,H as k,U as l};
@@ -0,0 +1 @@
1
+ import{ah as m}from"./index-DO9Y98zJ.js";import{b as p,a as e,c as n,s}from"./game-network-CQnwf8gH.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-NkYpVcV7.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-B9zz_E_L.js";import"./contract-system-adapters-BvT5JySD.js";import"./game-contract-seams-DBl7ECp0.js";import"./seeded-random-DydBEgQ7.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-DzuOGwVB.js";import"./live-project-verbs-Cigqs3Fb.js";import"./capability-coverage-BgQf1Nai.js";import"./edit-mode-authoring-Cd1QiCit.js";import"./json-history-resource-Cisi7uEc.js";import"./binding-resolver-7rAg5Jej.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-CQaYLWWQ.js";import"./canvas-entry-runtime-CkkMjKp-.js";import"./three-ingest-runtime-DD9SZ14b.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./active-ingest-DDiD7TmR.js";import"./ingest-source-persistence-m93ua9L1.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-azUCR1DF.js";import"./mounted-authoring-DNOpzk2o.js";import"./entity-object-C4AjSbJN.js";import"./user-data-BDCHzElD.js";import"./workspace-arrangement-ByMAV1d5.js";import"./three-contract-Dkt6PmWY.js";import"./three-BdwVQK5K.js";import"./editor-layers-BslbZ8vZ.js";import"./component-instance-root-CHVZoBls.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-DrnsQcV7.js";import"./source-persistence-backend-DqA9lnVr.js";import"./three-projection-core-C_asJ7ul.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-CP2XIv0B.js";import"./deferred-ingest-play-D0HByyPr.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-DGhaXMrv.js";import"./board-guides-lEXkcI9k.js";import"./relative-import-specifier-BIjiAOqT.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-DRlNIvT0.js";import"./inference-diagnostics-Ck7yIMYZ.js";import"./writer-tw6EcuVO.js";import"./three-state-mkXrds9y.js";import"./editor-shell-store-yk8VfWS2.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-z35QJmUy.js";import"./game-surface-defaults-D8S4cRxi.js";const zt="workspace.command",a=()=>({ok:!1,error:"not in play mode — start play before using the debug seam"}),Bt={"set-instance-count":{derivedRefresh:"always",handle:o=>{if(!e())return a();const r=o.names;if(Array.isArray(r)&&r.every(i=>typeof i=="string"))return r.length<1?{ok:!1,error:'set-instance-count "names" must have at least one entry.'}:(n(r),{ok:!0});const t=o.count;return typeof t!="number"||!Number.isFinite(t)||t<1?{ok:!1,error:`set-instance-count requires a whole "count" >= 1 (or a "names" array), got ${String(t)}.`}:(s(Math.floor(t)-1),{ok:!0})}},"list-instances":{derivedRefresh:"if-content-changed",handle:()=>({ok:!0,data:{instances:m(),named:p()}})}};export{Bt as commands,zt as point};
@@ -1 +1 @@
1
- import{e7 as u,e8 as y,b3 as n}from"./index-D-bf1M-_.js";function g(){return{isDirty:()=>!1,save:async()=>{},destination:u}}const p=new TextEncoder,c=new TextDecoder,l="authoring";function w(t){return{session:l,id:t}}function N(t,e){return{session:`play-${t}`,id:e}}class S{constructor(e){if(this.options=e,e.scope==="project"){if(!e.location)throw new Error("A project JSON history resource needs a location.");this.descriptor=e.history.registry.registerProject(e.kind,e.location,e.displayName)}else{if(!e.subject)throw new Error("A session JSON history resource needs a subject.");this.descriptor=e.history.registry.registerSession(e.kind,e.subject.session,e.subject.id,e.displayName)}const i={descriptor:this.descriptor,capture:async()=>{const s=this.encode(e.capture());return{revision:this.revision,contentType:"application/json",bytes:s,sha256:await n(s)}},preflight:async s=>{const r=this.encode(e.capture()),o=await n(r);if(!this.recorded)return{ok:!0};if(o===s.sha256)return{ok:!0};if(e.conflictIdentity){const a=JSON.parse(c.decode(e.history.snapshots.read(s).bytes)),d=JSON.stringify(e.conflictIdentity(a)),h=JSON.stringify(e.conflictIdentity(e.capture()));if(d===h)return{ok:!0}}return{ok:!1,reason:"content-conflict",actualRevision:this.revision,actualSha256:o}},restore:async s=>{const r=e.history.snapshots.read(s).bytes;await e.restore(JSON.parse(c.decode(r))),this.revision++},estimateBytes:s=>s.byteLength};this.unregister=e.history.registerDriver(i)}descriptor;revision=0;unregister;disposed=!1;recorded=!1;record(e,i,s){return this.disposed?Promise.reject(new Error("JSON history resource is disposed.")):(this.options.history.assertCanRecordAppliedChange(),this.revision++,this.recorded=!0,this.options.history.recordAppliedTransaction({label:e,resources:[this.descriptor.key],scope:this.descriptor.scope,...this.descriptor.sessionId?{sessionId:this.descriptor.sessionId}:{}},[{resource:this.descriptor.key,beforeBytes:this.encode(i),afterBytes:this.encode(s),contentType:"application/json"}]).catch(async r=>{try{await this.options.restore(structuredClone(i)),this.revision++}catch(o){throw this.options.history.blockForCompensationFailure(e,[this.descriptor.key],{operationError:r,compensationError:o})}throw r instanceof y||this.options.history.reportAppliedChangeFailure(e,[this.descriptor.key],r),r}))}assertCanMutate(){if(this.disposed)throw new Error("JSON history resource is disposed.");this.options.history.assertCanRecordAppliedChange()}dispose(){this.disposed||(this.disposed=!0,this.unregister())}encode(e){return p.encode(JSON.stringify(e,null,2))}}export{S as J,w as a,g as c,N as p};
1
+ import{e7 as u,e8 as y,b3 as n}from"./index-DO9Y98zJ.js";function g(){return{isDirty:()=>!1,save:async()=>{},destination:u}}const p=new TextEncoder,c=new TextDecoder,l="authoring";function w(t){return{session:l,id:t}}function N(t,e){return{session:`play-${t}`,id:e}}class S{constructor(e){if(this.options=e,e.scope==="project"){if(!e.location)throw new Error("A project JSON history resource needs a location.");this.descriptor=e.history.registry.registerProject(e.kind,e.location,e.displayName)}else{if(!e.subject)throw new Error("A session JSON history resource needs a subject.");this.descriptor=e.history.registry.registerSession(e.kind,e.subject.session,e.subject.id,e.displayName)}const i={descriptor:this.descriptor,capture:async()=>{const s=this.encode(e.capture());return{revision:this.revision,contentType:"application/json",bytes:s,sha256:await n(s)}},preflight:async s=>{const r=this.encode(e.capture()),o=await n(r);if(!this.recorded)return{ok:!0};if(o===s.sha256)return{ok:!0};if(e.conflictIdentity){const a=JSON.parse(c.decode(e.history.snapshots.read(s).bytes)),d=JSON.stringify(e.conflictIdentity(a)),h=JSON.stringify(e.conflictIdentity(e.capture()));if(d===h)return{ok:!0}}return{ok:!1,reason:"content-conflict",actualRevision:this.revision,actualSha256:o}},restore:async s=>{const r=e.history.snapshots.read(s).bytes;await e.restore(JSON.parse(c.decode(r))),this.revision++},estimateBytes:s=>s.byteLength};this.unregister=e.history.registerDriver(i)}descriptor;revision=0;unregister;disposed=!1;recorded=!1;record(e,i,s){return this.disposed?Promise.reject(new Error("JSON history resource is disposed.")):(this.options.history.assertCanRecordAppliedChange(),this.revision++,this.recorded=!0,this.options.history.recordAppliedTransaction({label:e,resources:[this.descriptor.key],scope:this.descriptor.scope,...this.descriptor.sessionId?{sessionId:this.descriptor.sessionId}:{}},[{resource:this.descriptor.key,beforeBytes:this.encode(i),afterBytes:this.encode(s),contentType:"application/json"}]).catch(async r=>{try{await this.options.restore(structuredClone(i)),this.revision++}catch(o){throw this.options.history.blockForCompensationFailure(e,[this.descriptor.key],{operationError:r,compensationError:o})}throw r instanceof y||this.options.history.reportAppliedChangeFailure(e,[this.descriptor.key],r),r}))}assertCanMutate(){if(this.disposed)throw new Error("JSON history resource is disposed.");this.options.history.assertCanRecordAppliedChange()}dispose(){this.disposed||(this.disposed=!0,this.unregister())}encode(e){return p.encode(JSON.stringify(e,null,2))}}export{S as J,w as a,g as c,N as p};
@@ -1 +1 @@
1
- import{stackOrder as C}from"./root-stacking-BEd9ZvxC.js";import{aD as O,aG as g,aH as y,aI as S,aJ as b,y as z,aK as E}from"./index-D-bf1M-_.js";function m(d,o,r,c){const e=d.pickable?.pick(o,r)??null;return e?d.selection?.resolve?.(e,{intent:c,scopeId:b()})?.id??e:null}function D(d,o,r,c,e=!1){const a=d.pickable?.candidates?.(o,r,e?{includeLocked:e}:void 0)??[],s=[],l=new Set;for(const f of a){const i=d.selection?.resolve?.(f,{intent:c,scopeId:b()})?.id??f;l.has(i)||(l.add(i),s.push(i))}return s}function N(d,o,r,c={}){const e=c.intent??"normal",a=O(d);if(!(a instanceof g))return m(a,o,r,e);const s=a.childAdapters(),f=z()===E?[]:s.filter(n=>n.kind!=="three"),i=s.filter(n=>n.kind==="three"),h=f.map(n=>({id:n.worldId,zOrder:n.zOrder,worldId:n.worldId,adapter:n.adapter})),v=[...C(h).reverse(),...i];for(const{worldId:n,adapter:k}of v){if(y(n)||S(n))continue;const u=m(k,o,r,e);if(u)return u}return null}function P(d,o,r,c={}){const e=c.intent??"normal",a=c.includeLocked===!0,s=c.adapter??O(d);if(!(s instanceof g)){const t=D(s,o,r,e,a),p=m(s,o,r,e);return t.length>0?t:p?[p]:[]}const l=s.childAdapters(),i=z()===E?[]:l.filter(t=>t.kind!=="three"),h=l.filter(t=>t.kind==="three"),v=i.map(t=>({id:t.worldId,zOrder:t.zOrder,worldId:t.worldId,adapter:t.adapter})),n=[...C(v).reverse(),...h],k=[],u=new Set;for(const{worldId:t,adapter:p}of n){if(y(t)||S(t))continue;const w=D(p,o,r,e,a),A=m(p,o,r,e);for(const I of w.length>0?w:A?[A]:[])u.has(I)||(u.add(I),k.push(I))}return k}export{N as a,P as p};
1
+ import{stackOrder as C}from"./root-stacking-BEd9ZvxC.js";import{aD as O,aG as g,aH as y,aI as S,aJ as b,y as z,aK as E}from"./index-DO9Y98zJ.js";function m(d,o,r,c){const e=d.pickable?.pick(o,r)??null;return e?d.selection?.resolve?.(e,{intent:c,scopeId:b()})?.id??e:null}function D(d,o,r,c,e=!1){const a=d.pickable?.candidates?.(o,r,e?{includeLocked:e}:void 0)??[],s=[],l=new Set;for(const f of a){const i=d.selection?.resolve?.(f,{intent:c,scopeId:b()})?.id??f;l.has(i)||(l.add(i),s.push(i))}return s}function N(d,o,r,c={}){const e=c.intent??"normal",a=O(d);if(!(a instanceof g))return m(a,o,r,e);const s=a.childAdapters(),f=z()===E?[]:s.filter(n=>n.kind!=="three"),i=s.filter(n=>n.kind==="three"),h=f.map(n=>({id:n.worldId,zOrder:n.zOrder,worldId:n.worldId,adapter:n.adapter})),v=[...C(h).reverse(),...i];for(const{worldId:n,adapter:k}of v){if(y(n)||S(n))continue;const u=m(k,o,r,e);if(u)return u}return null}function P(d,o,r,c={}){const e=c.intent??"normal",a=c.includeLocked===!0,s=c.adapter??O(d);if(!(s instanceof g)){const t=D(s,o,r,e,a),p=m(s,o,r,e);return t.length>0?t:p?[p]:[]}const l=s.childAdapters(),i=z()===E?[]:l.filter(t=>t.kind!=="three"),h=l.filter(t=>t.kind==="three"),v=i.map(t=>({id:t.worldId,zOrder:t.zOrder,worldId:t.worldId,adapter:t.adapter})),n=[...C(v).reverse(),...h],k=[],u=new Set;for(const{worldId:t,adapter:p}of n){if(y(t)||S(t))continue;const w=D(p,o,r,e,a),A=m(p,o,r,e);for(const I of w.length>0?w:A?[A]:[])u.has(I)||(u.add(I),k.push(I))}return k}export{N as a,P as p};