aptechka 0.11.11 → 0.13.0

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 (493) hide show
  1. package/{client-lib/Animation-uimN7sdT.js → lib/Animation-DF5jPON_.js} +23 -28
  2. package/lib/Animation-seVC6-fS.cjs +1 -0
  3. package/lib/Composed-ChlKoJEp.cjs +1 -0
  4. package/lib/Composed-CoX1ImVk.js +31 -0
  5. package/lib/Damped-BDO-F13V.js +53 -0
  6. package/lib/Damped-C7WAqKPh.cjs +1 -0
  7. package/lib/Derived-B-2UXnVE.cjs +1 -0
  8. package/lib/Derived-CDGpSMKu.js +56 -0
  9. package/{client-lib/SourceManager--L_rA28b.js → lib/SourceManager-B8-EMNnd.js} +26 -30
  10. package/lib/SourceManager-TzU9Rw08.cjs +1 -0
  11. package/lib/Store-BnA-dJsE.cjs +1 -0
  12. package/{client-lib/Store-Qr3SNOSf.js → lib/Store-DGtldlBH.js} +29 -34
  13. package/lib/Tweened-CHhmfvzo.js +44 -0
  14. package/lib/Tweened-DSXD0I0k.cjs +1 -0
  15. package/lib/Viewport-BmLTk_6k.cjs +1 -0
  16. package/lib/Viewport-DTlImj28.js +123 -0
  17. package/lib/accordion/index.cjs +1 -0
  18. package/lib/accordion/index.js +167 -0
  19. package/{client-lib → lib}/animation/index.cjs +1 -1
  20. package/lib/animation/index.js +8 -0
  21. package/lib/attribute/index.cjs +1 -0
  22. package/{client-lib → lib}/attribute/index.js +15 -20
  23. package/lib/canvas/index.cjs +1 -0
  24. package/lib/canvas/index.js +111 -0
  25. package/lib/checkbox/index.cjs +1 -0
  26. package/{client-lib → lib}/checkbox/index.js +20 -25
  27. package/lib/class-linked-status/index.cjs +1 -0
  28. package/lib/class-linked-status/index.js +45 -0
  29. package/lib/connector/index.cjs +1 -0
  30. package/{client-lib → lib}/connector/index.js +14 -18
  31. package/lib/controls/index.cjs +1 -0
  32. package/lib/controls/index.js +207 -0
  33. package/{client-lib/createStylesheet-BBBiyAsF.cjs → lib/createStylesheet-CaDI99iu.cjs} +1 -1
  34. package/{client-lib/createStylesheet-CE1yXWS_.js → lib/createStylesheet-DO5t5q-m.js} +1 -1
  35. package/lib/css-property/index.cjs +1 -0
  36. package/lib/css-property/index.js +58 -0
  37. package/lib/css-unit-parser/index.cjs +8 -0
  38. package/lib/css-unit-parser/index.js +31 -0
  39. package/{client-lib → lib}/dev/index.cjs +1 -1
  40. package/{client-lib → lib}/dev/index.js +1 -1
  41. package/{client-lib → lib}/device/index.cjs +1 -1
  42. package/{client-lib → lib}/device/index.js +1 -1
  43. package/lib/element-constructor/index.cjs +1 -0
  44. package/lib/element-constructor/index.js +124 -0
  45. package/lib/element-resizer/index.cjs +1 -0
  46. package/{client-lib → lib}/element-resizer/index.js +12 -16
  47. package/lib/en3/helpers/index.cjs +1 -0
  48. package/{client-lib → lib}/en3/helpers/index.js +612 -646
  49. package/{client-lib → lib}/en3/index.cjs +1 -1
  50. package/lib/en3/index.js +6 -0
  51. package/{client-lib → lib}/en3/libs/index.js +1 -2
  52. package/lib/en3/loaders/index.cjs +1 -0
  53. package/{client-lib → lib}/en3/loaders/index.js +152 -167
  54. package/lib/en3/misc/index.cjs +10 -0
  55. package/{client-lib → lib}/en3/misc/index.js +18 -23
  56. package/{client-lib → lib}/en3/utils/index.cjs +1 -1
  57. package/{client-lib → lib}/en3/utils/index.js +2 -2
  58. package/lib/en3-C1fLmsjs.cjs +8 -0
  59. package/{client-lib/en3-THFHEReu.js → lib/en3-x-Ki30MY.js} +59 -64
  60. package/{client-lib → lib}/image/index.cjs +1 -1
  61. package/{client-lib → lib}/image/index.js +1 -1
  62. package/{client-lib/index-D-RA8KFB.js → lib/index-BhbT9PrL.js} +35 -40
  63. package/lib/index-BpsQqM-8.cjs +9 -0
  64. package/lib/intersector/index.cjs +1 -0
  65. package/{client-lib → lib}/intersector/index.js +12 -16
  66. package/lib/ladder/index.cjs +1 -0
  67. package/{client-lib → lib}/ladder/index.js +20 -25
  68. package/lib/layout-box/index.cjs +1 -0
  69. package/lib/layout-box/index.js +318 -0
  70. package/lib/loading/index.cjs +1 -0
  71. package/{client-lib → lib}/loading/index.js +17 -21
  72. package/lib/media/index.cjs +1 -0
  73. package/lib/media/index.js +26 -0
  74. package/lib/modal/index.cjs +1 -0
  75. package/{client-lib → lib}/modal/index.js +22 -26
  76. package/lib/morph/index.cjs +1 -0
  77. package/lib/morph/index.js +225 -0
  78. package/lib/notifier/index.cjs +1 -0
  79. package/lib/notifier/index.js +36 -0
  80. package/lib/pointer/index.cjs +1 -0
  81. package/{client-lib → lib}/pointer/index.js +37 -41
  82. package/lib/popover/index.cjs +1 -0
  83. package/{client-lib → lib}/popover/index.js +71 -79
  84. package/lib/router/index.cjs +1 -0
  85. package/{client-lib → lib}/router/index.js +62 -71
  86. package/lib/scroll/index.cjs +1 -0
  87. package/lib/scroll/index.js +1131 -0
  88. package/lib/scroll-entries/index.cjs +1 -0
  89. package/{client-lib → lib}/scroll-entries/index.js +11 -15
  90. package/{client-lib → lib}/select/index.cjs +1 -1
  91. package/{client-lib → lib}/select/index.js +1 -1
  92. package/lib/sequence/index.cjs +1 -0
  93. package/{client-lib → lib}/sequence/index.js +26 -30
  94. package/lib/slicer/index.cjs +11 -0
  95. package/{client-lib → lib}/slicer/index.js +27 -31
  96. package/lib/source/index.cjs +5 -0
  97. package/{client-lib → lib}/source/index.js +19 -24
  98. package/lib/store/index.cjs +1 -0
  99. package/{client-lib → lib}/store/index.js +29 -33
  100. package/{client-lib → lib}/svg-path-data/index.js +3 -6
  101. package/lib/tags-4AoxVUe3.js +833 -0
  102. package/lib/tags-v-OSVkiQ.cjs +1 -0
  103. package/{client-lib → lib}/theme/index.cjs +1 -1
  104. package/{client-lib → lib}/theme/index.js +2 -2
  105. package/lib/ticker/index.cjs +1 -0
  106. package/lib/ticker/index.js +119 -0
  107. package/{client-lib/traverseMaterials-BtBXV88O.cjs → lib/traverseMaterials-CD_3_56D.cjs} +1 -1
  108. package/{client-lib/traverseMaterials-BKSwwNmo.js → lib/traverseMaterials-mGC2_FkG.js} +1 -1
  109. package/lib/tweaker/index.cjs +10 -0
  110. package/{client-lib → lib}/tweaker/index.js +270 -278
  111. package/{client-lib → lib}/utils/index.js +1 -2
  112. package/lib/video/index.cjs +1 -0
  113. package/{client-lib → lib}/video/index.js +13 -17
  114. package/lib/window-resizer/index.cjs +1 -0
  115. package/lib/window-resizer/index.js +42 -0
  116. package/package.json +351 -450
  117. package/client-lib/Animation-BInSRYNr.cjs +0 -1
  118. package/client-lib/Composed-Fa7owymK.js +0 -35
  119. package/client-lib/Composed-Iihn8fT4.cjs +0 -1
  120. package/client-lib/Damped-Da3EnNN4.cjs +0 -1
  121. package/client-lib/Damped-yrNXlkDE.js +0 -57
  122. package/client-lib/Derived-CNbsNMn_.cjs +0 -1
  123. package/client-lib/Derived-rInkx3e4.js +0 -60
  124. package/client-lib/ElementConstructor-Be8H1POO.js +0 -378
  125. package/client-lib/ElementConstructor-khLPmQ9V.cjs +0 -1
  126. package/client-lib/SourceManager-D6D2LVKf.cjs +0 -1
  127. package/client-lib/Store-Cr3VaD9G.cjs +0 -1
  128. package/client-lib/Tweened-CjgvoOwL.js +0 -48
  129. package/client-lib/Tweened-DksN-Rz6.cjs +0 -1
  130. package/client-lib/Viewport-BBYt1Ivy.cjs +0 -1
  131. package/client-lib/Viewport-Cgtq2I_K.js +0 -127
  132. package/client-lib/_createStore-C75y9luu.cjs +0 -1
  133. package/client-lib/_createStore-D3qHYaSz.js +0 -12
  134. package/client-lib/accordion/AccordionElement.d.ts +0 -30
  135. package/client-lib/accordion/index.cjs +0 -1
  136. package/client-lib/accordion/index.d.ts +0 -1
  137. package/client-lib/accordion/index.js +0 -176
  138. package/client-lib/animation/Animation.d.ts +0 -35
  139. package/client-lib/animation/Damped.d.ts +0 -19
  140. package/client-lib/animation/Tweened.d.ts +0 -15
  141. package/client-lib/animation/index.d.ts +0 -3
  142. package/client-lib/animation/index.js +0 -8
  143. package/client-lib/attribute/index.cjs +0 -1
  144. package/client-lib/attribute/index.d.ts +0 -15
  145. package/client-lib/canvas/index.cjs +0 -1
  146. package/client-lib/canvas/index.d.ts +0 -35
  147. package/client-lib/canvas/index.js +0 -119
  148. package/client-lib/checkbox/index.cjs +0 -1
  149. package/client-lib/checkbox/index.d.ts +0 -14
  150. package/client-lib/class-linked-status/index.cjs +0 -1
  151. package/client-lib/class-linked-status/index.d.ts +0 -12
  152. package/client-lib/class-linked-status/index.js +0 -49
  153. package/client-lib/connector/index.cjs +0 -1
  154. package/client-lib/connector/index.d.ts +0 -15
  155. package/client-lib/controls/AutoplayControls.d.ts +0 -17
  156. package/client-lib/controls/Controls.d.ts +0 -9
  157. package/client-lib/controls/DragControls.d.ts +0 -16
  158. package/client-lib/controls/KeyboardControls.d.ts +0 -14
  159. package/client-lib/controls/WheelControls.d.ts +0 -19
  160. package/client-lib/controls/index.cjs +0 -1
  161. package/client-lib/controls/index.d.ts +0 -5
  162. package/client-lib/controls/index.js +0 -213
  163. package/client-lib/counter/index.d.ts +0 -6
  164. package/client-lib/css-property/index.cjs +0 -1
  165. package/client-lib/css-property/index.d.ts +0 -17
  166. package/client-lib/css-property/index.js +0 -62
  167. package/client-lib/css-unit-parser/index.cjs +0 -8
  168. package/client-lib/css-unit-parser/index.d.ts +0 -6
  169. package/client-lib/css-unit-parser/index.js +0 -36
  170. package/client-lib/css-value-parser/index.d.ts +0 -6
  171. package/client-lib/dev/index.d.ts +0 -1
  172. package/client-lib/device/Device.d.ts +0 -19
  173. package/client-lib/device/Viewport.d.ts +0 -29
  174. package/client-lib/device/index.d.ts +0 -2
  175. package/client-lib/element-constructor/ElementConstructor.d.ts +0 -75
  176. package/client-lib/element-constructor/createStylesheet.d.ts +0 -3
  177. package/client-lib/element-constructor/createTheme.d.ts +0 -13
  178. package/client-lib/element-constructor/index.cjs +0 -1
  179. package/client-lib/element-constructor/index.d.ts +0 -4
  180. package/client-lib/element-constructor/index.js +0 -125
  181. package/client-lib/element-constructor/knownSvgTags.d.ts +0 -1
  182. package/client-lib/element-constructor/tags.d.ts +0 -119
  183. package/client-lib/element-resizer/index.cjs +0 -1
  184. package/client-lib/element-resizer/index.d.ts +0 -10
  185. package/client-lib/en3/core/En3Raycaster.d.ts +0 -21
  186. package/client-lib/en3/core/En3View.d.ts +0 -40
  187. package/client-lib/en3/core/en3.d.ts +0 -39
  188. package/client-lib/en3/core/en3Cache.d.ts +0 -4
  189. package/client-lib/en3/helpers/En3ComposerManager.d.ts +0 -5
  190. package/client-lib/en3/helpers/En3GridHelper.d.ts +0 -8
  191. package/client-lib/en3/helpers/En3Helpers.d.ts +0 -5
  192. package/client-lib/en3/helpers/En3Object3dManager.d.ts +0 -14
  193. package/client-lib/en3/helpers/En3OrbitControls.d.ts +0 -8
  194. package/client-lib/en3/helpers/En3ParametersManager.d.ts +0 -16
  195. package/client-lib/en3/helpers/En3TransformControls.d.ts +0 -8
  196. package/client-lib/en3/helpers/index.cjs +0 -1
  197. package/client-lib/en3/helpers/index.d.ts +0 -2
  198. package/client-lib/en3/index.d.ts +0 -3
  199. package/client-lib/en3/index.js +0 -6
  200. package/client-lib/en3/libs/MeshoptDecoder.d.ts +0 -1
  201. package/client-lib/en3/libs/index.d.ts +0 -1
  202. package/client-lib/en3/loaders/En3GLTFLoader.d.ts +0 -12
  203. package/client-lib/en3/loaders/En3TextureLoader.d.ts +0 -8
  204. package/client-lib/en3/loaders/index.cjs +0 -1
  205. package/client-lib/en3/loaders/index.d.ts +0 -3
  206. package/client-lib/en3/loaders/loaders.d.ts +0 -13
  207. package/client-lib/en3/misc/En3ModifiedMaterial.d.ts +0 -33
  208. package/client-lib/en3/misc/En3SourceManager.d.ts +0 -32
  209. package/client-lib/en3/misc/index.cjs +0 -10
  210. package/client-lib/en3/misc/index.d.ts +0 -2
  211. package/client-lib/en3/objects/En3Clip.d.ts +0 -15
  212. package/client-lib/en3/objects/En3ClipHelpers.d.ts +0 -6
  213. package/client-lib/en3/objects/En3GLTF.d.ts +0 -11
  214. package/client-lib/en3/objects/En3Image.d.ts +0 -8
  215. package/client-lib/en3/objects/En3ImageLike.d.ts +0 -25
  216. package/client-lib/en3/objects/En3SourceConsumer.d.ts +0 -5
  217. package/client-lib/en3/objects/En3Video.d.ts +0 -13
  218. package/client-lib/en3/objects/fluid/Advection.d.ts +0 -30
  219. package/client-lib/en3/objects/fluid/Divergence.d.ts +0 -23
  220. package/client-lib/en3/objects/fluid/En3Fluid.d.ts +0 -16
  221. package/client-lib/en3/objects/fluid/En3FluidElement.d.ts +0 -13
  222. package/client-lib/en3/objects/fluid/En3FluidPointer.d.ts +0 -13
  223. package/client-lib/en3/objects/fluid/ExternalForce.d.ts +0 -19
  224. package/client-lib/en3/objects/fluid/Poisson.d.ts +0 -24
  225. package/client-lib/en3/objects/fluid/Pressure.d.ts +0 -26
  226. package/client-lib/en3/objects/fluid/ShaderPass.d.ts +0 -24
  227. package/client-lib/en3/objects/fluid/Simulation.d.ts +0 -33
  228. package/client-lib/en3/objects/fluid/Viscous.d.ts +0 -30
  229. package/client-lib/en3/objects/fluid/index.d.ts +0 -3
  230. package/client-lib/en3/objects/index.d.ts +0 -7
  231. package/client-lib/en3/utils/coverTexture.d.ts +0 -7
  232. package/client-lib/en3/utils/dispose.d.ts +0 -3
  233. package/client-lib/en3/utils/getCurrentViewport.d.ts +0 -9
  234. package/client-lib/en3/utils/index.d.ts +0 -5
  235. package/client-lib/en3/utils/traverseMaterials.d.ts +0 -3
  236. package/client-lib/en3/utils/traverseMeshes.d.ts +0 -3
  237. package/client-lib/en3-CBBYE8rb.cjs +0 -8
  238. package/client-lib/globals-DMjysUXI.js +0 -8
  239. package/client-lib/globals-bYKki-b9.cjs +0 -1
  240. package/client-lib/image/index.d.ts +0 -11
  241. package/client-lib/index-PReYu1AQ.cjs +0 -9
  242. package/client-lib/instantiate-CfK7LHHy.js +0 -152
  243. package/client-lib/instantiate-DfsD19EH.cjs +0 -1
  244. package/client-lib/intersector/index.cjs +0 -1
  245. package/client-lib/intersector/index.d.ts +0 -10
  246. package/client-lib/jsx/ComponentElement.d.ts +0 -17
  247. package/client-lib/jsx/globals.d.ts +0 -13
  248. package/client-lib/jsx/h.d.ts +0 -6
  249. package/client-lib/jsx/hooks/animation/createDamped.d.ts +0 -3
  250. package/client-lib/jsx/hooks/animation/createTweened.d.ts +0 -3
  251. package/client-lib/jsx/hooks/animation/index.cjs +0 -1
  252. package/client-lib/jsx/hooks/animation/index.d.ts +0 -2
  253. package/client-lib/jsx/hooks/animation/index.js +0 -15
  254. package/client-lib/jsx/hooks/basic/_createStore.d.ts +0 -4
  255. package/client-lib/jsx/hooks/basic/attachInternals.d.ts +0 -1
  256. package/client-lib/jsx/hooks/basic/attachShadow.d.ts +0 -1
  257. package/client-lib/jsx/hooks/basic/attachStylesheet.d.ts +0 -3
  258. package/client-lib/jsx/hooks/basic/createContext.d.ts +0 -2
  259. package/client-lib/jsx/hooks/basic/createRef.d.ts +0 -3
  260. package/client-lib/jsx/hooks/basic/onConnect.d.ts +0 -3
  261. package/client-lib/jsx/hooks/basic/onDisconnect.d.ts +0 -3
  262. package/client-lib/jsx/hooks/basic/onStoreChange.d.ts +0 -3
  263. package/client-lib/jsx/hooks/onAnimationFrame.cjs +0 -1
  264. package/client-lib/jsx/hooks/onAnimationFrame.d.ts +0 -6
  265. package/client-lib/jsx/hooks/onAnimationFrame.js +0 -22
  266. package/client-lib/jsx/hooks/onElementResize.cjs +0 -1
  267. package/client-lib/jsx/hooks/onElementResize.d.ts +0 -5
  268. package/client-lib/jsx/hooks/onElementResize.js +0 -11
  269. package/client-lib/jsx/hooks/onIntersection.cjs +0 -1
  270. package/client-lib/jsx/hooks/onIntersection.d.ts +0 -5
  271. package/client-lib/jsx/hooks/onIntersection.js +0 -11
  272. package/client-lib/jsx/hooks/onWindowResize.cjs +0 -1
  273. package/client-lib/jsx/hooks/onWindowResize.d.ts +0 -3
  274. package/client-lib/jsx/hooks/onWindowResize.js +0 -8
  275. package/client-lib/jsx/hooks/store/createCached.d.ts +0 -4
  276. package/client-lib/jsx/hooks/store/createComposed.d.ts +0 -3
  277. package/client-lib/jsx/hooks/store/createDerived.d.ts +0 -4
  278. package/client-lib/jsx/hooks/store/createDerivedArray.d.ts +0 -4
  279. package/client-lib/jsx/hooks/store/createResource.d.ts +0 -3
  280. package/client-lib/jsx/hooks/store/createStore.d.ts +0 -3
  281. package/client-lib/jsx/hooks/store/index.cjs +0 -1
  282. package/client-lib/jsx/hooks/store/index.d.ts +0 -6
  283. package/client-lib/jsx/hooks/store/index.js +0 -45
  284. package/client-lib/jsx/hooks/watchAttribute.cjs +0 -1
  285. package/client-lib/jsx/hooks/watchAttribute.d.ts +0 -6
  286. package/client-lib/jsx/hooks/watchAttribute.js +0 -17
  287. package/client-lib/jsx/hooks/watchCSSProperty.cjs +0 -1
  288. package/client-lib/jsx/hooks/watchCSSProperty.d.ts +0 -7
  289. package/client-lib/jsx/hooks/watchCSSProperty.js +0 -17
  290. package/client-lib/jsx/index.cjs +0 -1
  291. package/client-lib/jsx/index.d.ts +0 -15
  292. package/client-lib/jsx/index.js +0 -106
  293. package/client-lib/jsx/instantiate.d.ts +0 -5
  294. package/client-lib/jsx/register.d.ts +0 -1
  295. package/client-lib/jsx/render.d.ts +0 -6
  296. package/client-lib/jsx/type.d.ts +0 -195
  297. package/client-lib/ladder/index.cjs +0 -1
  298. package/client-lib/ladder/index.d.ts +0 -24
  299. package/client-lib/layout-box/index.cjs +0 -1
  300. package/client-lib/layout-box/index.d.ts +0 -96
  301. package/client-lib/layout-box/index.js +0 -326
  302. package/client-lib/libs/path-data-polyfill.d.ts +0 -1
  303. package/client-lib/loading/index.cjs +0 -1
  304. package/client-lib/loading/index.d.ts +0 -39
  305. package/client-lib/media/index.cjs +0 -1
  306. package/client-lib/media/index.d.ts +0 -12
  307. package/client-lib/media/index.js +0 -30
  308. package/client-lib/modal/ModalElement.d.ts +0 -13
  309. package/client-lib/modal/index.cjs +0 -1
  310. package/client-lib/modal/index.d.ts +0 -1
  311. package/client-lib/morph/Link.d.ts +0 -7
  312. package/client-lib/morph/Morph.d.ts +0 -37
  313. package/client-lib/morph/index.cjs +0 -1
  314. package/client-lib/morph/index.d.ts +0 -1
  315. package/client-lib/morph/index.js +0 -235
  316. package/client-lib/notifier/index.cjs +0 -1
  317. package/client-lib/notifier/index.d.ts +0 -8
  318. package/client-lib/notifier/index.js +0 -40
  319. package/client-lib/onConnect-DGP866cj.cjs +0 -1
  320. package/client-lib/onConnect-y5DrxJ9P.js +0 -7
  321. package/client-lib/order/index.d.ts +0 -22
  322. package/client-lib/pointer/Pointer.d.ts +0 -23
  323. package/client-lib/pointer/PointerElement.d.ts +0 -14
  324. package/client-lib/pointer/index.cjs +0 -1
  325. package/client-lib/pointer/index.d.ts +0 -2
  326. package/client-lib/popover/PopoverButtonElement.d.ts +0 -15
  327. package/client-lib/popover/PopoverElement.d.ts +0 -26
  328. package/client-lib/popover/index.cjs +0 -1
  329. package/client-lib/popover/index.d.ts +0 -2
  330. package/client-lib/router/Link.d.ts +0 -7
  331. package/client-lib/router/Route.d.ts +0 -21
  332. package/client-lib/router/Router.d.ts +0 -41
  333. package/client-lib/router/index.cjs +0 -1
  334. package/client-lib/router/index.d.ts +0 -2
  335. package/client-lib/scroll/ScrollBulletButtonsElement.d.ts +0 -12
  336. package/client-lib/scroll/ScrollButtonElement.d.ts +0 -6
  337. package/client-lib/scroll/ScrollElement.d.ts +0 -82
  338. package/client-lib/scroll/ScrollSection.d.ts +0 -23
  339. package/client-lib/scroll/ScrollSegmentElement.d.ts +0 -63
  340. package/client-lib/scroll/ScrollSetButtonElement.d.ts +0 -10
  341. package/client-lib/scroll/ScrollStepButtonElement.d.ts +0 -10
  342. package/client-lib/scroll/ScrollUserElement.d.ts +0 -7
  343. package/client-lib/scroll/ScrollbarElement.d.ts +0 -14
  344. package/client-lib/scroll/index.cjs +0 -1
  345. package/client-lib/scroll/index.d.ts +0 -6
  346. package/client-lib/scroll/index.js +0 -1154
  347. package/client-lib/scroll-entries/index.cjs +0 -1
  348. package/client-lib/scroll-entries/index.d.ts +0 -21
  349. package/client-lib/select/SelectElement.d.ts +0 -24
  350. package/client-lib/select/SelectHeadElement.d.ts +0 -13
  351. package/client-lib/select/SelectOptionElement.d.ts +0 -14
  352. package/client-lib/select/SelectUserElement.d.ts +0 -7
  353. package/client-lib/select/index.d.ts +0 -4
  354. package/client-lib/sequence/index.cjs +0 -1
  355. package/client-lib/sequence/index.d.ts +0 -21
  356. package/client-lib/slicer/DecoderElement.d.ts +0 -11
  357. package/client-lib/slicer/Letter.d.ts +0 -11
  358. package/client-lib/slicer/SlicerElement.d.ts +0 -21
  359. package/client-lib/slicer/Word.d.ts +0 -17
  360. package/client-lib/slicer/index.cjs +0 -11
  361. package/client-lib/slicer/index.d.ts +0 -4
  362. package/client-lib/source/SourceClass.d.ts +0 -11
  363. package/client-lib/source/SourceElement.d.ts +0 -25
  364. package/client-lib/source/SourceManager.d.ts +0 -14
  365. package/client-lib/source/SourceSet.d.ts +0 -9
  366. package/client-lib/source/index.cjs +0 -5
  367. package/client-lib/source/index.d.ts +0 -4
  368. package/client-lib/store/Cached.d.ts +0 -18
  369. package/client-lib/store/Composed.d.ts +0 -8
  370. package/client-lib/store/Derived.d.ts +0 -13
  371. package/client-lib/store/DerivedArray.d.ts +0 -13
  372. package/client-lib/store/Resource.d.ts +0 -12
  373. package/client-lib/store/Store.d.ts +0 -76
  374. package/client-lib/store/StoreRegistry.d.ts +0 -23
  375. package/client-lib/store/index.cjs +0 -1
  376. package/client-lib/store/index.d.ts +0 -7
  377. package/client-lib/svg-path-data/index.d.ts +0 -15
  378. package/client-lib/tags-BdW7ATzD.cjs +0 -1
  379. package/client-lib/tags-C75owfOo.js +0 -485
  380. package/client-lib/test/starting-style/index.d.ts +0 -1
  381. package/client-lib/theme/index.d.ts +0 -35
  382. package/client-lib/ticker/index.cjs +0 -1
  383. package/client-lib/ticker/index.d.ts +0 -22
  384. package/client-lib/ticker/index.js +0 -125
  385. package/client-lib/tweaker/TweakerBooleanManagerElement.d.ts +0 -11
  386. package/client-lib/tweaker/TweakerColorManagerElement.d.ts +0 -11
  387. package/client-lib/tweaker/TweakerElement.d.ts +0 -18
  388. package/client-lib/tweaker/TweakerFieldElement.d.ts +0 -21
  389. package/client-lib/tweaker/TweakerFolderElement.d.ts +0 -24
  390. package/client-lib/tweaker/TweakerLinkManagerElement.d.ts +0 -11
  391. package/client-lib/tweaker/TweakerNumberManagerElement.d.ts +0 -14
  392. package/client-lib/tweaker/TweakerSelectManagerElement.d.ts +0 -11
  393. package/client-lib/tweaker/TweakerStoreManagerElement.d.ts +0 -10
  394. package/client-lib/tweaker/TweakerStringManagerElement.d.ts +0 -11
  395. package/client-lib/tweaker/index.cjs +0 -10
  396. package/client-lib/tweaker/index.d.ts +0 -1
  397. package/client-lib/tweaker/tweakerManagerConstructors.d.ts +0 -6
  398. package/client-lib/tweaker/tweakerStorage.d.ts +0 -23
  399. package/client-lib/utils/array.d.ts +0 -2
  400. package/client-lib/utils/attributes.d.ts +0 -2
  401. package/client-lib/utils/browser.d.ts +0 -1
  402. package/client-lib/utils/bytes.d.ts +0 -1
  403. package/client-lib/utils/canvas.d.ts +0 -7
  404. package/client-lib/utils/collisions.d.ts +0 -4
  405. package/client-lib/utils/coordinates.d.ts +0 -14
  406. package/client-lib/utils/cssom.d.ts +0 -5
  407. package/client-lib/utils/decoding.d.ts +0 -2
  408. package/client-lib/utils/dom.d.ts +0 -5
  409. package/client-lib/utils/easings.d.ts +0 -17
  410. package/client-lib/utils/events.d.ts +0 -8
  411. package/client-lib/utils/file.d.ts +0 -1
  412. package/client-lib/utils/function.d.ts +0 -2
  413. package/client-lib/utils/gestures.d.ts +0 -1
  414. package/client-lib/utils/index.d.ts +0 -26
  415. package/client-lib/utils/layout.d.ts +0 -3
  416. package/client-lib/utils/math.d.ts +0 -12
  417. package/client-lib/utils/number.d.ts +0 -3
  418. package/client-lib/utils/object.d.ts +0 -9
  419. package/client-lib/utils/polyfills.d.ts +0 -1
  420. package/client-lib/utils/promises.d.ts +0 -1
  421. package/client-lib/utils/string.d.ts +0 -8
  422. package/client-lib/utils/style.d.ts +0 -2
  423. package/client-lib/utils/ts-shape.d.ts +0 -20
  424. package/client-lib/utils/ts-utility.d.ts +0 -26
  425. package/client-lib/utils/url.d.ts +0 -9
  426. package/client-lib/video/index.cjs +0 -1
  427. package/client-lib/video/index.d.ts +0 -22
  428. package/client-lib/window-resizer/index.cjs +0 -1
  429. package/client-lib/window-resizer/index.d.ts +0 -10
  430. package/client-lib/window-resizer/index.js +0 -46
  431. package/server-lib/optimizer/FFmpeg.d.ts +0 -10
  432. package/server-lib/optimizer/generateFavicon.d.ts +0 -4
  433. package/server-lib/optimizer/generateSequence.d.ts +0 -3
  434. package/server-lib/optimizer/generateSprite.d.ts +0 -4
  435. package/server-lib/optimizer/index.d.ts +0 -10
  436. package/server-lib/optimizer/index.js +0 -404
  437. package/server-lib/optimizer/inputFiles.d.ts +0 -26
  438. package/server-lib/optimizer/optimize.d.ts +0 -13
  439. package/server-lib/optimizer/optimizeImage.d.ts +0 -4
  440. package/server-lib/optimizer/optimizeVideo.d.ts +0 -3
  441. package/server-lib/optimizer/optimizer.d.ts +0 -5
  442. package/server-lib/optimizer/types.d.ts +0 -51
  443. package/server-lib/optimizer/utils.d.ts +0 -1
  444. package/server-lib/utils/buffer.d.ts +0 -1
  445. package/server-lib/utils/fs.d.ts +0 -11
  446. package/server-lib/utils/index.d.ts +0 -5
  447. package/server-lib/utils/index.js +0 -65
  448. package/server-lib/utils/math.d.ts +0 -1
  449. package/server-lib/utils/path.d.ts +0 -3
  450. package/server-lib/utils/types.d.ts +0 -8
  451. /package/{client-lib → lib}/attributes-69we3byR.js +0 -0
  452. /package/{client-lib → lib}/attributes-Bf2svn4j.cjs +0 -0
  453. /package/{client-lib → lib}/browser-0zX67oeU.js +0 -0
  454. /package/{client-lib → lib}/browser-CpzFX2xg.cjs +0 -0
  455. /package/{client-lib → lib}/canvas-CU5Xjahf.cjs +0 -0
  456. /package/{client-lib → lib}/canvas-DeZ0SLUJ.js +0 -0
  457. /package/{client-lib → lib}/coordinates-CgdGoSYs.js +0 -0
  458. /package/{client-lib → lib}/coordinates-D8Np3cPD.cjs +0 -0
  459. /package/{client-lib → lib}/createTheme-CHnsCgAr.js +0 -0
  460. /package/{client-lib → lib}/createTheme-Cfaw9UmV.cjs +0 -0
  461. /package/{client-lib → lib}/css-value-parser/index.cjs +0 -0
  462. /package/{client-lib → lib}/css-value-parser/index.js +0 -0
  463. /package/{client-lib → lib}/dom-JBOkFLTh.cjs +0 -0
  464. /package/{client-lib → lib}/dom-P5QbAASX.js +0 -0
  465. /package/{client-lib → lib}/easings-BKi40vHz.js +0 -0
  466. /package/{client-lib → lib}/easings-DsS5-Kqc.cjs +0 -0
  467. /package/{client-lib → lib}/en3/libs/index.cjs +0 -0
  468. /package/{client-lib → lib}/events-BGwqaxVW.cjs +0 -0
  469. /package/{client-lib → lib}/events-CJTUMSLU.js +0 -0
  470. /package/{client-lib → lib}/file-EevnUtRj.cjs +0 -0
  471. /package/{client-lib → lib}/file-lxi_oXJf.js +0 -0
  472. /package/{client-lib → lib}/function-C10DGppn.js +0 -0
  473. /package/{client-lib → lib}/function-MthRj-GJ.cjs +0 -0
  474. /package/{client-lib → lib}/gestures-D2Fdra_G.js +0 -0
  475. /package/{client-lib → lib}/gestures-DHLrn6Q8.cjs +0 -0
  476. /package/{client-lib → lib}/layout-8ryRAMGJ.cjs +0 -0
  477. /package/{client-lib → lib}/layout-HoBT_Da2.js +0 -0
  478. /package/{client-lib → lib}/math-BOBiC4TN.js +0 -0
  479. /package/{client-lib → lib}/math-GDWEqu7y.cjs +0 -0
  480. /package/{client-lib → lib}/object-CCiXnER2.cjs +0 -0
  481. /package/{client-lib → lib}/object-D6MVWB4l.js +0 -0
  482. /package/{client-lib → lib}/order/index.cjs +0 -0
  483. /package/{client-lib → lib}/order/index.js +0 -0
  484. /package/{client-lib → lib}/polyfills-CM4SCDTt.cjs +0 -0
  485. /package/{client-lib → lib}/polyfills-X6KXuHg-.js +0 -0
  486. /package/{client-lib → lib}/string-DhgS_iFl.cjs +0 -0
  487. /package/{client-lib → lib}/string-f0Dnk0L1.js +0 -0
  488. /package/{client-lib → lib}/style-At6aDoqG.cjs +0 -0
  489. /package/{client-lib → lib}/style-j2TwriJ_.js +0 -0
  490. /package/{client-lib → lib}/svg-path-data/index.cjs +0 -0
  491. /package/{client-lib → lib}/url-C3dWnJQg.cjs +0 -0
  492. /package/{client-lib → lib}/url-DMNfW7uN.js +0 -0
  493. /package/{client-lib → lib}/utils/index.cjs +0 -0
@@ -1 +0,0 @@
1
- "use strict";var zn=Object.defineProperty;var nn=Object.getOwnPropertySymbols;var Nn=Object.prototype.hasOwnProperty,Xn=Object.prototype.propertyIsEnumerable;var on=(m,n,a)=>n in m?zn(m,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):m[n]=a,ae=(m,n)=>{for(var a in n||(n={}))Nn.call(n,a)&&on(m,a,n[a]);if(nn)for(var a of nn(n))Xn.call(n,a)&&on(m,a,n[a]);return m};var Ot=(m,n,a)=>{if(!n.has(m))throw TypeError("Cannot "+a)};var s=(m,n,a)=>(Ot(m,n,"read from private field"),a?a.call(m):n.get(m)),u=(m,n,a)=>{if(n.has(m))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(m):n.set(m,a)},P=(m,n,a,e)=>(Ot(m,n,"write to private field"),e?e.call(m,a):n.set(m,a),a);var M=(m,n,a)=>(Ot(m,n,"access private method"),a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../../en3-CBBYE8rb.cjs"),N=require("../../Store-Cr3VaD9G.cjs"),t=require("three"),Zn=require("../../object-CCiXnER2.cjs"),sn=require("../../ticker/index.cjs"),Gn=require("../../Composed-Iihn8fT4.cjs"),Fn=require("../../traverseMaterials-BtBXV88O.cjs");function Vn(m){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(m){for(const a in m)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(m,a);Object.defineProperty(n,a,e.get?e:{enumerable:!0,get:()=>m[a]})}}return n.default=m,Object.freeze(n)}const fe=Vn(t),Qn=["AddEquation","SubtractEquation","ReverseSubtractEquation","MinEquation","MaxEquation"],yn=["ZeroFactor","OneFactor","SrcColorFactor","OneMinusSrcColorFactor","SrcAlphaFactor","OneMinusSrcAlphaFactor","DstAlphaFactor","OneMinusDstAlphaFactor","DstColorFactor","OneMinusDstColorFactor","SrcAlphaSaturateFactor","ConstantColorFactor","OneMinusConstantColorFactor","ConstantAlphaFactor","OneMinusConstantAlphaFactor"],qn=[...yn,"SrcAlphaSaturateFactor"],Un=["NoBlending","NormalBlending","AdditiveBlending","SubtractiveBlending","MultiplyBlending","CustomBlending"],Bn=["NeverDepth","AlwaysDepth","EqualDepth","LessDepth","LessEqualDepth ","GreaterEqualDepth ","GreaterDepth","NotEqualDepth"],Wn=["NeverStencilFunc","LessStencilFunc","EqualStencilFunc","LessEqualStencilFunc ","GreaterStencilFunc","NotEqualStencilFunc ","GreaterEqualStencilFunc","AlwaysStencilFunc"],Dt=["ZeroStencilOp","KeepStencilOp","ReplaceStencilOp","IncrementStencilOp","DecrementStencilOp","IncrementWrapStencilOp","DecrementWrapStencilOp","InvertStencilOp"],Kn=["FrontSide","BackSide","DoubleSide"],$n=["TangentSpaceNormalMap","ObjectSpaceNormalMap"],Jn=["round","bevel","miter"],eo=["NoToneMapping","LinearToneMapping","ReinhardToneMapping","CineonToneMapping","ACESFilmicToneMapping","AgXToneMapping","NeutralToneMapping","CustomToneMapping"],to={intensity:{type:"number",min:0,max:20,step:1e-4},renderOrder:{type:"number",step:1},alphaTest:{type:"number",min:0,max:1,step:.001},blendAlpha:{type:"number",min:0,max:1,step:.001},blendDst:{type:"select",variants:qn},blendDstAlpha:{type:"number",min:0,max:1,step:.001},blendEquation:{type:"select",variants:Qn},blendEquationAlpha:{type:"number",min:0,max:1,step:.001},blending:{type:"select",variants:Un},blendSrc:{type:"select",variants:yn},blendSrcAlpha:{type:"number",min:0,max:1,step:.001},depthFunc:{type:"select",variants:Bn},stencilFunc:{type:"select",variants:Wn},stencilRef:{type:"number",min:0,step:1},stencilFail:{type:"select",variants:Dt},stencilZFail:{type:"select",variants:Dt},stencilZPass:{type:"select",variants:Dt},opacity:{type:"number",min:0,max:1,step:1e-4},side:{type:"select",variants:Kn},roughness:{type:"number",min:0,max:1,step:1e-4},metalness:{type:"number",min:0,max:1,step:1e-4},lightMapIntensity:{type:"number",min:0,max:20,step:1e-4},aoMapIntensity:{type:"number",min:0,max:20,step:1e-4},bumpScale:{type:"number",min:0,step:1e-4},normalMapType:{type:"select",variants:$n},wireframeLinejoin:{type:"select",variants:Jn},envMapIntensity:{type:"number",min:0,max:20,step:1e-4},emissiveIntensity:{type:"number",min:0,max:20,step:1e-4},fov:{type:"number",min:0,max:180,step:1},zoom:{type:"number",min:0,step:1e-4},near:{type:"number",min:0,step:1e-4},far:{type:"number",min:0,step:1},filmGauge:{type:"number",min:0,step:1e-4},filmOffset:{type:"number",min:0,step:1e-4},distance:{type:"number",min:0,step:.1},decay:{type:"number",min:0,step:1e-5,ease:.001},focus:{type:"number",min:0,max:1,step:1e-5},bias:{type:"number",min:0,max:.01,step:1e-6,ease:.01},blurSamples:{type:"number",min:0,step:1},normalBias:{type:"number",min:0,step:.001,ease:.01},radius:{type:"number",min:0,step:.001,ease:.01},penumbra:{type:"number",min:0,max:1,step:1e-6},power:{type:"number",min:0,step:.001,ease:.01},angle:{type:"number",min:0,step:1e-6,ease:.001},toneMapping:{type:"select",variants:eo},toneMappingExposure:{type:"number",min:0,step:.001,ease:.1},mapSize:{type:"number",min:0,step:1},damp:{type:"number",min:0,max:1,step:1e-6},strength:{type:"number",min:0,step:.01},threshold:{type:"number",min:0,max:1,step:1e-4}},no=new Set(["stencilFuncMask","needsUpdate","version","wireframeLinewidth","position","scale","rotation","coordinateSystem","aspect","autoUpdate","up"]);var Le,te,St,bn,Pt,wn,xt,gn,vt,Mn,Tt,En,qe,Rt,Ue,Ht,ne,be,oe,we;class pe{constructor(n,a){u(this,St);u(this,Pt);u(this,xt);u(this,vt);u(this,Tt);u(this,qe);u(this,Ue);u(this,ne);u(this,oe);u(this,Le,void 0);u(this,te,[]);P(this,Le,n);const e=ae(ae({},to),a==null?void 0:a.optionsCatalog),r=new Set([...no,...(a==null?void 0:a.skipKeys)||[]]),c=(a==null?void 0:a.folderName)||s(this,Le).name,i=a==null?void 0:a.afterChange;M(this,St,bn).call(this,{subject:s(this,Le),skipKeys:r,optionsCatalog:e,folderKey:c,afterChange:i})}destroy(){s(this,te).forEach(n=>{n.close()})}}Le=new WeakMap,te=new WeakMap,St=new WeakSet,bn=function(n){const{subject:a,folderKey:e,optionsCatalog:r,afterChange:c,skipKeys:i}=n;for(const l in a){if(l.startsWith("_")||i.has(l))continue;const d=a[l],p=M(this,ne,be).call(this,d),f=`${e}.${l}`,w=r[l];typeof p=="number"?(w==null?void 0:w.type)==="select"?M(this,qe,Rt).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):M(this,Pt,wn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof fe.Vector2||p instanceof fe.Vector3?M(this,xt,gn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):typeof p=="boolean"&&!l.startsWith("is")&&!l.startsWith("matrix")?M(this,vt,Mn).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):p instanceof fe.Color?M(this,Tt,En).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c}):w&&(w==null?void 0:w.type)==="select"&&M(this,qe,Rt).call(this,{name:f,value:d,subject:a,key:l,managerOptions:w,afterChange:c})}},Pt=new WeakSet,wn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({type:"number"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=d.current),i==null||i()}),s(this,te).push(l)},xt=new WeakSet,gn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=p=>{const f=[p.x,p.y];return p instanceof fe.Vector3&&f.push(p.z),f},d=new N.Store(l(M(this,ne,be).call(this,a)),{passport:{name:n,manager:ae({type:"number"},c)}});d.subscribe(p=>{M(this,oe,we).call(this,e,r,(f,w)=>f[w].set(...p.current)),i==null||i()}),s(this,te).push(d)},vt=new WeakSet,Mn=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({type:"boolean"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=d.current),i==null||i()}),s(this,te).push(l)},Tt=new WeakSet,En=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=new N.Store(`#${M(this,ne,be).call(this,a).getHexString()}`,{passport:{name:n,manager:ae({type:"color"},c)}});l.subscribe(d=>{M(this,oe,we).call(this,e,r,(p,f)=>p[f]=new fe.Color(d.current)),i==null||i()}),s(this,te).push(l)},qe=new WeakSet,Rt=function({name:n,value:a,subject:e,key:r,managerOptions:c,afterChange:i}){const l=c==null?void 0:c.variants;if(l){let d=null;for(const f of l)a===fe[f]&&(d=f);const p=new N.Store(d||M(this,ne,be).call(this,a),{passport:{name:n,manager:ae({},c)}});p.subscribe(f=>{typeof f.current=="string"&&(f.current[0]===f.current[0].toUpperCase()?M(this,oe,we).call(this,e,r,(w,A)=>w[A]=fe[f.current]):M(this,oe,we).call(this,e,r,(w,A)=>w[A]=f.current)),i==null||i()}),s(this,te).push(p)}},Ue=new WeakSet,Ht=function(n){return Zn.isObject(n)&&"value"in n},ne=new WeakSet,be=function(n){return M(this,Ue,Ht).call(this,n)?n.value:n},oe=new WeakSet,we=function(n,a,e){M(this,Ue,Ht).call(this,n[a])?e(n[a],"value"):e(n,a)};var g,ce,Me,Ee,Se,Be,q,Oe,Mt,We;class Nt{constructor(n,a){u(this,Oe);u(this,g,void 0);u(this,ce,[]);u(this,Me,void 0);u(this,Ee,void 0);u(this,Se,void 0);u(this,Be,!0);u(this,q,[]);u(this,We,()=>{s(this,q).forEach(n=>{"update"in n&&n.update()})});var l,d;P(this,g,n);let e=!1;n.name.startsWith("T.")&&(n.name=n.name.slice(2)),n.name.includes("P.")&&(e=!0,n.name=n.name.replace("P.",""));const r=n.name;s(this,g).userData.controlled=!0;const c=(a==null?void 0:a.step)||1e-4,i=((l=n.userData)==null?void 0:l.box)||n;if(s(this,g)instanceof t.Light){let p;s(this,g)instanceof t.PointLight?p=new t.PointLightHelper(s(this,g),100):s(this,g)instanceof t.DirectionalLight?(s(this,g).scale.setScalar(100),p=new t.DirectionalLightHelper(s(this,g),1)):s(this,g)instanceof t.SpotLight?p=new t.SpotLightHelper(s(this,g)):s(this,g)instanceof t.HemisphereLight&&(p=new t.HemisphereLightHelper(s(this,g),100)),s(this,q).push(p);const f=(d=s(this,g).shadow)==null?void 0:d.camera;if(f instanceof t.Camera){const w=new t.CameraHelper(f);s(this,q).push(w)}}if(s(this,q).forEach(p=>{y.en3.view.add(p)}),P(this,Me,new N.Store([i.position.x,i.position.y,i.position.z],{passport:{name:`${r}.Transformation.Position`,manager:{type:"number",step:c}}})),P(this,Ee,new N.Store([i.rotation.x,i.rotation.y,i.rotation.z],{passport:{name:`${r}.Transformation.Rotation`,manager:{type:"number",step:c,ease:.01}}})),P(this,Se,new N.Store([i.scale.x,i.scale.y,i.scale.z],{passport:{name:`${r}.Transformation.Scale`,manager:{type:"number",step:c}}})),this.save(),P(this,Be,!1),s(this,Me).subscribe(p=>{M(this,Oe,Mt).call(this,"position",p.current)}),s(this,Ee).subscribe(p=>{M(this,Oe,Mt).call(this,"rotation",p.current)}),s(this,Se).subscribe(p=>{M(this,Oe,Mt).call(this,"scale",p.current)}),e){if(s(this,ce).push(new pe(s(this,g),{folderName:`${s(this,g).name}.Parameters`,afterChange:s(this,g)instanceof t.Camera?()=>{y.en3.view.resize()}:void 0})),s(this,g)instanceof t.Mesh){const p=s(this,g).material;p instanceof t.Material&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Material`,afterChange:()=>{p.needsUpdate=!0}}))}else if(s(this,g)instanceof t.Light){const p=s(this,g).shadow;p&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Shadow`,afterChange:()=>{p.needsUpdate=!0}})),p.camera&&s(this,ce).push(new pe(p,{folderName:`${s(this,g).name}.Parameters.Shadow.Camera`,afterChange:()=>{p.camera.updateProjectionMatrix()}}))}}s(this,q).length&&sn.ticker.subscribe(s(this,We))}get object3d(){return s(this,g)}get helpers(){return s(this,q)}get raycasterTarget(){return s(this,q)[0]||s(this,g)}destroy(){s(this,ce).forEach(n=>n.destroy()),s(this,Me).close(),s(this,Ee).close(),s(this,Se).close(),s(this,g).userData.controlled=!1,s(this,q).forEach(n=>{n&&"dispose"in n&&(n.dispose(),y.en3.view.remove(n))}),sn.ticker.unsubscribe(s(this,We))}save(){const n=(a,e)=>{(!s(this,Be)||a.initial===a.current)&&(a.current=[e.x,e.y,e.z])};n(s(this,Me),s(this,g).position),n(s(this,Ee),s(this,g).rotation),n(s(this,Se),s(this,g).scale)}}g=new WeakMap,ce=new WeakMap,Me=new WeakMap,Ee=new WeakMap,Se=new WeakMap,Be=new WeakMap,q=new WeakMap,Oe=new WeakSet,Mt=function(n,a){const e=s(this,g).userData.box;if(e){const r=c=>({x:a[0]-c.x,y:a[1]-c.y,z:a[2]-c.z});n==="position"?e.setPositionStep("_manager","+",r(e.getIncludedPositionSteps("_manager"))):n==="rotation"?e.setRotationStep("_manager","+",r(e.getIncludedRotationSteps("_manager"))):n==="scale"&&e.setScaleStep("_manager","+",r(e.getIncludedScaleSteps("_manager")))}else s(this,g)[n].set(...a)},We=new WeakMap;const an={type:"change"},Ct={type:"start"},rn={type:"end"},yt=new t.Ray,cn=new t.Plane,oo=Math.cos(70*t.MathUtils.DEG2RAD);class io extends t.EventDispatcher{constructor(n,a){super(),this.object=n,this.domElement=a,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new t.Vector3,this.cursor=new t.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:t.MOUSE.ROTATE,MIDDLE:t.MOUSE.DOLLY,RIGHT:t.MOUSE.PAN},this.touches={ONE:t.TOUCH.ROTATE,TWO:t.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return l.phi},this.getAzimuthalAngle=function(){return l.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(o){o.addEventListener("keydown",Lt),this._domElementKeyEvents=o},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Lt),this._domElementKeyEvents=null},this.saveState=function(){e.target0.copy(e.target),e.position0.copy(e.object.position),e.zoom0=e.object.zoom},this.reset=function(){e.target.copy(e.target0),e.object.position.copy(e.position0),e.object.zoom=e.zoom0,e.object.updateProjectionMatrix(),e.dispatchEvent(an),e.update(),c=r.NONE},this.update=function(){const o=new t.Vector3,h=new t.Quaternion().setFromUnitVectors(n.up,new t.Vector3(0,1,0)),b=h.clone().invert(),S=new t.Vector3,z=new t.Quaternion,se=new t.Vector3,G=2*Math.PI;return function(Yn=null){const en=e.object.position;o.copy(en).sub(e.target),o.applyQuaternion(h),l.setFromVector3(o),e.autoRotate&&c===r.NONE&&ue(It(Yn)),e.enableDamping?(l.theta+=d.theta*e.dampingFactor,l.phi+=d.phi*e.dampingFactor):(l.theta+=d.theta,l.phi+=d.phi);let $=e.minAzimuthAngle,J=e.maxAzimuthAngle;isFinite($)&&isFinite(J)&&($<-Math.PI?$+=G:$>Math.PI&&($-=G),J<-Math.PI?J+=G:J>Math.PI&&(J-=G),$<=J?l.theta=Math.max($,Math.min(J,l.theta)):l.theta=l.theta>($+J)/2?Math.max($,l.theta):Math.min(J,l.theta)),l.phi=Math.max(e.minPolarAngle,Math.min(e.maxPolarAngle,l.phi)),l.makeSafe(),e.enableDamping===!0?e.target.addScaledVector(f,e.dampingFactor):e.target.add(f),e.target.sub(e.cursor),e.target.clampLength(e.minTargetRadius,e.maxTargetRadius),e.target.add(e.cursor);let Xe=!1;if(e.zoomToCursor&&ve||e.object.isOrthographicCamera)l.radius=ie(l.radius);else{const ee=l.radius;l.radius=ie(l.radius*p),Xe=ee!=l.radius}if(o.setFromSpherical(l),o.applyQuaternion(b),en.copy(e.target).add(o),e.object.lookAt(e.target),e.enableDamping===!0?(d.theta*=1-e.dampingFactor,d.phi*=1-e.dampingFactor,f.multiplyScalar(1-e.dampingFactor)):(d.set(0,0,0),f.set(0,0,0)),e.zoomToCursor&&ve){let ee=null;if(e.object.isPerspectiveCamera){const Ze=o.length();ee=ie(Ze*p);const ft=Ze-ee;e.object.position.addScaledVector(W,ft),e.object.updateMatrixWorld(),Xe=!!ft}else if(e.object.isOrthographicCamera){const Ze=new t.Vector3(j.x,j.y,0);Ze.unproject(e.object);const ft=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),e.object.updateProjectionMatrix(),Xe=ft!==e.object.zoom;const tn=new t.Vector3(j.x,j.y,0);tn.unproject(e.object),e.object.position.sub(tn).add(Ze),e.object.updateMatrixWorld(),ee=o.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),e.zoomToCursor=!1;ee!==null&&(this.screenSpacePanning?e.target.set(0,0,-1).transformDirection(e.object.matrix).multiplyScalar(ee).add(e.object.position):(yt.origin.copy(e.object.position),yt.direction.set(0,0,-1).transformDirection(e.object.matrix),Math.abs(e.object.up.dot(yt.direction))<oo?n.lookAt(e.target):(cn.setFromNormalAndCoplanarPoint(e.object.up,e.target),yt.intersectPlane(cn,e.target))))}else if(e.object.isOrthographicCamera){const ee=e.object.zoom;e.object.zoom=Math.max(e.minZoom,Math.min(e.maxZoom,e.object.zoom/p)),ee!==e.object.zoom&&(e.object.updateProjectionMatrix(),Xe=!0)}return p=1,ve=!1,Xe||S.distanceToSquared(e.object.position)>i||8*(1-z.dot(e.object.quaternion))>i||se.distanceToSquared(e.target)>i?(e.dispatchEvent(an),S.copy(e.object.position),z.copy(e.object.quaternion),se.copy(e.target),!0):!1}}(),this.dispose=function(){e.domElement.removeEventListener("contextmenu",$t),e.domElement.removeEventListener("pointerdown",qt),e.domElement.removeEventListener("pointercancel",Ne),e.domElement.removeEventListener("wheel",Ut),e.domElement.removeEventListener("pointermove",At),e.domElement.removeEventListener("pointerup",Ne),e.domElement.getRootNode().removeEventListener("keydown",Bt,{capture:!0}),e._domElementKeyEvents!==null&&(e._domElementKeyEvents.removeEventListener("keydown",Lt),e._domElementKeyEvents=null)};const e=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let c=r.NONE;const i=1e-6,l=new t.Spherical,d=new t.Spherical;let p=1;const f=new t.Vector3,w=new t.Vector2,A=new t.Vector2,B=new t.Vector2,X=new t.Vector2,L=new t.Vector2,C=new t.Vector2,O=new t.Vector2,v=new t.Vector2,T=new t.Vector2,W=new t.Vector3,j=new t.Vector2;let ve=!1;const _=[],me={};let ze=!1;function It(o){return o!==null?2*Math.PI/60*e.autoRotateSpeed*o:2*Math.PI/60/60*e.autoRotateSpeed}function Te(o){const h=Math.abs(o*.01);return Math.pow(.95,e.zoomSpeed*h)}function ue(o){d.theta-=o}function _e(o){d.phi-=o}const Z=function(){const o=new t.Vector3;return function(b,S){o.setFromMatrixColumn(S,0),o.multiplyScalar(-b),f.add(o)}}(),H=function(){const o=new t.Vector3;return function(b,S){e.screenSpacePanning===!0?o.setFromMatrixColumn(S,1):(o.setFromMatrixColumn(S,0),o.crossVectors(e.object.up,o)),o.multiplyScalar(b),f.add(o)}}(),Q=function(){const o=new t.Vector3;return function(b,S){const z=e.domElement;if(e.object.isPerspectiveCamera){const se=e.object.position;o.copy(se).sub(e.target);let G=o.length();G*=Math.tan(e.object.fov/2*Math.PI/180),Z(2*b*G/z.clientHeight,e.object.matrix),H(2*S*G/z.clientHeight,e.object.matrix)}else e.object.isOrthographicCamera?(Z(b*(e.object.right-e.object.left)/e.object.zoom/z.clientWidth,e.object.matrix),H(S*(e.object.top-e.object.bottom)/e.object.zoom/z.clientHeight,e.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),e.enablePan=!1)}}();function Y(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p/=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function K(o){e.object.isPerspectiveCamera||e.object.isOrthographicCamera?p*=o:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),e.enableZoom=!1)}function I(o,h){if(!e.zoomToCursor)return;ve=!0;const b=e.domElement.getBoundingClientRect(),S=o-b.left,z=h-b.top,se=b.width,G=b.height;j.x=S/se*2-1,j.y=-(z/G)*2+1,W.set(j.x,j.y,1).unproject(e.object).sub(e.object.position).normalize()}function ie(o){return Math.max(e.minDistance,Math.min(e.maxDistance,o))}function de(o){w.set(o.clientX,o.clientY)}function Ie(o){I(o.clientX,o.clientX),O.set(o.clientX,o.clientY)}function ut(o){X.set(o.clientX,o.clientY)}function dt(o){A.set(o.clientX,o.clientY),B.subVectors(A,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;ue(2*Math.PI*B.x/h.clientHeight),_e(2*Math.PI*B.y/h.clientHeight),w.copy(A),e.update()}function Pn(o){v.set(o.clientX,o.clientY),T.subVectors(v,O),T.y>0?Y(Te(T.y)):T.y<0&&K(Te(T.y)),O.copy(v),e.update()}function xn(o){L.set(o.clientX,o.clientY),C.subVectors(L,X).multiplyScalar(e.panSpeed),Q(C.x,C.y),X.copy(L),e.update()}function vn(o){I(o.clientX,o.clientY),o.deltaY<0?K(Te(o.deltaY)):o.deltaY>0&&Y(Te(o.deltaY)),e.update()}function Tn(o){let h=!1;switch(o.code){case e.keys.UP:o.ctrlKey||o.metaKey||o.shiftKey?_e(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(0,e.keyPanSpeed),h=!0;break;case e.keys.BOTTOM:o.ctrlKey||o.metaKey||o.shiftKey?_e(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(0,-e.keyPanSpeed),h=!0;break;case e.keys.LEFT:o.ctrlKey||o.metaKey||o.shiftKey?ue(2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(e.keyPanSpeed,0),h=!0;break;case e.keys.RIGHT:o.ctrlKey||o.metaKey||o.shiftKey?ue(-2*Math.PI*e.rotateSpeed/e.domElement.clientHeight):Q(-e.keyPanSpeed,0),h=!0;break}h&&(o.preventDefault(),e.update())}function Xt(o){if(_.length===1)w.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);w.set(b,S)}}function Zt(o){if(_.length===1)X.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);X.set(b,S)}}function Gt(o){const h=Ae(o),b=o.pageX-h.x,S=o.pageY-h.y,z=Math.sqrt(b*b+S*S);O.set(0,z)}function _n(o){e.enableZoom&&Gt(o),e.enablePan&&Zt(o)}function In(o){e.enableZoom&&Gt(o),e.enableRotate&&Xt(o)}function Ft(o){if(_.length==1)A.set(o.pageX,o.pageY);else{const b=Ae(o),S=.5*(o.pageX+b.x),z=.5*(o.pageY+b.y);A.set(S,z)}B.subVectors(A,w).multiplyScalar(e.rotateSpeed);const h=e.domElement;ue(2*Math.PI*B.x/h.clientHeight),_e(2*Math.PI*B.y/h.clientHeight),w.copy(A)}function Vt(o){if(_.length===1)L.set(o.pageX,o.pageY);else{const h=Ae(o),b=.5*(o.pageX+h.x),S=.5*(o.pageY+h.y);L.set(b,S)}C.subVectors(L,X).multiplyScalar(e.panSpeed),Q(C.x,C.y),X.copy(L)}function Qt(o){const h=Ae(o),b=o.pageX-h.x,S=o.pageY-h.y,z=Math.sqrt(b*b+S*S);v.set(0,z),T.set(0,Math.pow(v.y/O.y,e.zoomSpeed)),Y(T.y),O.copy(v);const se=(o.pageX+h.x)*.5,G=(o.pageY+h.y)*.5;I(se,G)}function An(o){e.enableZoom&&Qt(o),e.enablePan&&Vt(o)}function Ln(o){e.enableZoom&&Qt(o),e.enableRotate&&Ft(o)}function qt(o){e.enabled!==!1&&(_.length===0&&(e.domElement.setPointerCapture(o.pointerId),e.domElement.addEventListener("pointermove",At),e.domElement.addEventListener("pointerup",Ne)),!Hn(o)&&(kn(o),o.pointerType==="touch"?Kt(o):On(o)))}function At(o){e.enabled!==!1&&(o.pointerType==="touch"?jn(o):Dn(o))}function Ne(o){switch(Rn(o),_.length){case 0:e.domElement.releasePointerCapture(o.pointerId),e.domElement.removeEventListener("pointermove",At),e.domElement.removeEventListener("pointerup",Ne),e.dispatchEvent(rn),c=r.NONE;break;case 1:const h=_[0],b=me[h];Kt({pointerId:h,pageX:b.x,pageY:b.y});break}}function On(o){let h;switch(o.button){case 0:h=e.mouseButtons.LEFT;break;case 1:h=e.mouseButtons.MIDDLE;break;case 2:h=e.mouseButtons.RIGHT;break;default:h=-1}switch(h){case t.MOUSE.DOLLY:if(e.enableZoom===!1)return;Ie(o),c=r.DOLLY;break;case t.MOUSE.ROTATE:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enablePan===!1)return;ut(o),c=r.PAN}else{if(e.enableRotate===!1)return;de(o),c=r.ROTATE}break;case t.MOUSE.PAN:if(o.ctrlKey||o.metaKey||o.shiftKey){if(e.enableRotate===!1)return;de(o),c=r.ROTATE}else{if(e.enablePan===!1)return;ut(o),c=r.PAN}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(Ct)}function Dn(o){switch(c){case r.ROTATE:if(e.enableRotate===!1)return;dt(o);break;case r.DOLLY:if(e.enableZoom===!1)return;Pn(o);break;case r.PAN:if(e.enablePan===!1)return;xn(o);break}}function Ut(o){e.enabled===!1||e.enableZoom===!1||c!==r.NONE||(o.preventDefault(),e.dispatchEvent(Ct),vn(Cn(o)),e.dispatchEvent(rn))}function Cn(o){const h=o.deltaMode,b={clientX:o.clientX,clientY:o.clientY,deltaY:o.deltaY};switch(h){case 1:b.deltaY*=16;break;case 2:b.deltaY*=100;break}return o.ctrlKey&&!ze&&(b.deltaY*=10),b}function Bt(o){o.key==="Control"&&(ze=!0,e.domElement.getRootNode().addEventListener("keyup",Wt,{passive:!0,capture:!0}))}function Wt(o){o.key==="Control"&&(ze=!1,e.domElement.getRootNode().removeEventListener("keyup",Wt,{passive:!0,capture:!0}))}function Lt(o){e.enabled===!1||e.enablePan===!1||Tn(o)}function Kt(o){switch(Jt(o),_.length){case 1:switch(e.touches.ONE){case t.TOUCH.ROTATE:if(e.enableRotate===!1)return;Xt(o),c=r.TOUCH_ROTATE;break;case t.TOUCH.PAN:if(e.enablePan===!1)return;Zt(o),c=r.TOUCH_PAN;break;default:c=r.NONE}break;case 2:switch(e.touches.TWO){case t.TOUCH.DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;_n(o),c=r.TOUCH_DOLLY_PAN;break;case t.TOUCH.DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;In(o),c=r.TOUCH_DOLLY_ROTATE;break;default:c=r.NONE}break;default:c=r.NONE}c!==r.NONE&&e.dispatchEvent(Ct)}function jn(o){switch(Jt(o),c){case r.TOUCH_ROTATE:if(e.enableRotate===!1)return;Ft(o),e.update();break;case r.TOUCH_PAN:if(e.enablePan===!1)return;Vt(o),e.update();break;case r.TOUCH_DOLLY_PAN:if(e.enableZoom===!1&&e.enablePan===!1)return;An(o),e.update();break;case r.TOUCH_DOLLY_ROTATE:if(e.enableZoom===!1&&e.enableRotate===!1)return;Ln(o),e.update();break;default:c=r.NONE}}function $t(o){e.enabled!==!1&&o.preventDefault()}function kn(o){_.push(o.pointerId)}function Rn(o){delete me[o.pointerId];for(let h=0;h<_.length;h++)if(_[h]==o.pointerId){_.splice(h,1);return}}function Hn(o){for(let h=0;h<_.length;h++)if(_[h]==o.pointerId)return!0;return!1}function Jt(o){let h=me[o.pointerId];h===void 0&&(h=new t.Vector2,me[o.pointerId]=h),h.set(o.pageX,o.pageY)}function Ae(o){const h=o.pointerId===_[0]?_[1]:_[0];return me[h]}e.domElement.addEventListener("contextmenu",$t),e.domElement.addEventListener("pointerdown",qt),e.domElement.addEventListener("pointercancel",Ne),e.domElement.addEventListener("wheel",Ut,{passive:!1}),e.domElement.getRootNode().addEventListener("keydown",Bt,{passive:!0,capture:!0}),this.update()}}const ye=new t.Raycaster,R=new t.Vector3,re=new t.Vector3,x=new t.Quaternion,ln={X:new t.Vector3(1,0,0),Y:new t.Vector3(0,1,0),Z:new t.Vector3(0,0,1)},jt={type:"change"},hn={type:"mouseDown",mode:null},pn={type:"mouseUp",mode:null},mn={type:"objectChange"};class so extends t.Object3D{constructor(n,a){super(),a===void 0&&(console.warn('THREE.TransformControls: The second parameter "domElement" is now mandatory.'),a=document),this.isTransformControls=!0,this.visible=!1,this.domElement=a,this.domElement.style.touchAction="none";const e=new po;this._gizmo=e,this.add(e);const r=new mo;this._plane=r,this.add(r);const c=this;function i(v,T){let W=T;Object.defineProperty(c,v,{get:function(){return W!==void 0?W:T},set:function(j){W!==j&&(W=j,r[v]=j,e[v]=j,c.dispatchEvent({type:v+"-changed",value:j}),c.dispatchEvent(jt))}}),c[v]=T,r[v]=T,e[v]=T}i("camera",n),i("object",void 0),i("enabled",!0),i("axis",null),i("mode","translate"),i("translationSnap",null),i("rotationSnap",null),i("scaleSnap",null),i("space","world"),i("size",1),i("dragging",!1),i("showX",!0),i("showY",!0),i("showZ",!0);const l=new t.Vector3,d=new t.Vector3,p=new t.Quaternion,f=new t.Quaternion,w=new t.Vector3,A=new t.Quaternion,B=new t.Vector3,X=new t.Vector3,L=new t.Vector3,C=0,O=new t.Vector3;i("worldPosition",l),i("worldPositionStart",d),i("worldQuaternion",p),i("worldQuaternionStart",f),i("cameraPosition",w),i("cameraQuaternion",A),i("pointStart",B),i("pointEnd",X),i("rotationAxis",L),i("rotationAngle",C),i("eye",O),this._offset=new t.Vector3,this._startNorm=new t.Vector3,this._endNorm=new t.Vector3,this._cameraScale=new t.Vector3,this._parentPosition=new t.Vector3,this._parentQuaternion=new t.Quaternion,this._parentQuaternionInv=new t.Quaternion,this._parentScale=new t.Vector3,this._worldScaleStart=new t.Vector3,this._worldQuaternionInv=new t.Quaternion,this._worldScale=new t.Vector3,this._positionStart=new t.Vector3,this._quaternionStart=new t.Quaternion,this._scaleStart=new t.Vector3,this._getPointer=ao.bind(this),this._onPointerDown=co.bind(this),this._onPointerHover=ro.bind(this),this._onPointerMove=lo.bind(this),this._onPointerUp=ho.bind(this),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp)}updateMatrixWorld(n){this.object!==void 0&&(this.object.updateMatrixWorld(),this.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this._parentPosition,this._parentQuaternion,this._parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this._worldScale),this._parentQuaternionInv.copy(this._parentQuaternion).invert(),this._worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this._cameraScale),this.camera.isOrthographicCamera?this.camera.getWorldDirection(this.eye).negate():this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld(n)}pointerHover(n){if(this.object===void 0||this.dragging===!0)return;n!==null&&ye.setFromCamera(n,this.camera);const a=kt(this._gizmo.picker[this.mode],ye);a?this.axis=a.object.name:this.axis=null}pointerDown(n){if(!(this.object===void 0||this.dragging===!0||n!=null&&n.button!==0)&&this.axis!==null){n!==null&&ye.setFromCamera(n,this.camera);const a=kt(this._plane,ye,!0);a&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(a.point).sub(this.worldPositionStart)),this.dragging=!0,hn.mode=this.mode,this.dispatchEvent(hn)}}pointerMove(n){const a=this.axis,e=this.mode,r=this.object;let c=this.space;if(e==="scale"?c="local":(a==="E"||a==="XYZE"||a==="XYZ")&&(c="world"),r===void 0||a===null||this.dragging===!1||n!==null&&n.button!==-1)return;n!==null&&ye.setFromCamera(n,this.camera);const i=kt(this._plane,ye,!0);if(i){if(this.pointEnd.copy(i.point).sub(this.worldPositionStart),e==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),c==="local"&&a!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),a.indexOf("X")===-1&&(this._offset.x=0),a.indexOf("Y")===-1&&(this._offset.y=0),a.indexOf("Z")===-1&&(this._offset.z=0),c==="local"&&a!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),r.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(c==="local"&&(r.position.applyQuaternion(x.copy(this._quaternionStart).invert()),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this._quaternionStart)),c==="world"&&(r.parent&&r.position.add(R.setFromMatrixPosition(r.parent.matrixWorld)),a.search("X")!==-1&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),a.search("Y")!==-1&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),a.search("Z")!==-1&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(R.setFromMatrixPosition(r.parent.matrixWorld))));else if(e==="scale"){if(a.search("XYZ")!==-1){let l=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(l*=-1),re.set(l,l,l)}else R.copy(this.pointStart),re.copy(this.pointEnd),R.applyQuaternion(this._worldQuaternionInv),re.applyQuaternion(this._worldQuaternionInv),re.divide(R),a.search("X")===-1&&(re.x=1),a.search("Y")===-1&&(re.y=1),a.search("Z")===-1&&(re.z=1);r.scale.copy(this._scaleStart).multiply(re),this.scaleSnap&&(a.search("X")!==-1&&(r.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Y")!==-1&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),a.search("Z")!==-1&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(e==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const l=20/this.worldPosition.distanceTo(R.setFromMatrixPosition(this.camera.matrixWorld));let d=!1;a==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(R.copy(this.rotationAxis).cross(this.eye))*l):(a==="X"||a==="Y"||a==="Z")&&(this.rotationAxis.copy(ln[a]),R.copy(ln[a]),c==="local"&&R.applyQuaternion(this.worldQuaternion),R.cross(this.eye),R.length()===0?d=!0:this.rotationAngle=this._offset.dot(R.normalize())*l),(a==="E"||d)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),c==="local"&&a!=="E"&&a!=="XYZE"?(r.quaternion.copy(this._quaternionStart),r.quaternion.multiply(x.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),r.quaternion.copy(x.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(jt),this.dispatchEvent(mn)}}pointerUp(n){n!==null&&n.button!==0||(this.dragging&&this.axis!==null&&(pn.mode=this.mode,this.dispatchEvent(pn)),this.dragging=!1,this.axis=null)}dispose(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.traverse(function(n){n.geometry&&n.geometry.dispose(),n.material&&n.material.dispose()})}attach(n){return this.object=n,this.visible=!0,this}detach(){return this.object=void 0,this.visible=!1,this.axis=null,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(jt),this.dispatchEvent(mn),this.pointStart.copy(this.pointEnd))}getRaycaster(){return ye}getMode(){return this.mode}setMode(n){this.mode=n}setTranslationSnap(n){this.translationSnap=n}setRotationSnap(n){this.rotationSnap=n}setScaleSnap(n){this.scaleSnap=n}setSize(n){this.size=n}setSpace(n){this.space=n}}function ao(m){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:m.button};{const n=this.domElement.getBoundingClientRect();return{x:(m.clientX-n.left)/n.width*2-1,y:-(m.clientY-n.top)/n.height*2+1,button:m.button}}}function ro(m){if(this.enabled)switch(m.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(m));break}}function co(m){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(m.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(m)),this.pointerDown(this._getPointer(m)))}function lo(m){this.enabled&&this.pointerMove(this._getPointer(m))}function ho(m){this.enabled&&(this.domElement.releasePointerCapture(m.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(m)))}function kt(m,n,a){const e=n.intersectObject(m,!0);for(let r=0;r<e.length;r++)if(e[r].object.visible||a)return e[r];return!1}const bt=new t.Euler,E=new t.Vector3(0,1,0),un=new t.Vector3(0,0,0),dn=new t.Matrix4,wt=new t.Quaternion,Et=new t.Quaternion,U=new t.Vector3,fn=new t.Matrix4,Ve=new t.Vector3(1,0,0),ge=new t.Vector3(0,1,0),Qe=new t.Vector3(0,0,1),gt=new t.Vector3,Ge=new t.Vector3,Fe=new t.Vector3;class po extends t.Object3D{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const n=new t.MeshBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),a=new t.LineBasicMaterial({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=n.clone();e.opacity=.15;const r=a.clone();r.opacity=.5;const c=n.clone();c.color.setHex(16711680);const i=n.clone();i.color.setHex(65280);const l=n.clone();l.color.setHex(255);const d=n.clone();d.color.setHex(16711680),d.opacity=.5;const p=n.clone();p.color.setHex(65280),p.opacity=.5;const f=n.clone();f.color.setHex(255),f.opacity=.5;const w=n.clone();w.opacity=.25;const A=n.clone();A.color.setHex(16776960),A.opacity=.25,n.clone().color.setHex(16776960);const X=n.clone();X.color.setHex(7895160);const L=new t.CylinderGeometry(0,.04,.1,12);L.translate(0,.05,0);const C=new t.BoxGeometry(.08,.08,.08);C.translate(0,.04,0);const O=new t.BufferGeometry;O.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,0,0],3));const v=new t.CylinderGeometry(.0075,.0075,.5,3);v.translate(0,.25,0);function T(H,Q){const Y=new t.TorusGeometry(H,.0075,3,64,Q*Math.PI*2);return Y.rotateY(Math.PI/2),Y.rotateX(Math.PI/2),Y}function W(){const H=new t.BufferGeometry;return H.setAttribute("position",new t.Float32BufferAttribute([0,0,0,1,1,1],3)),H}const j={X:[[new t.Mesh(L,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(L,c),[-.5,0,0],[0,0,Math.PI/2]],[new t.Mesh(v,c),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new t.Mesh(L,i),[0,.5,0]],[new t.Mesh(L,i),[0,-.5,0],[Math.PI,0,0]],[new t.Mesh(v,i)]],Z:[[new t.Mesh(L,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(L,l),[0,0,-.5],[-Math.PI/2,0,0]],[new t.Mesh(v,l),null,[Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.1,0),w.clone()),[0,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f.clone()),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d.clone()),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p.clone()),[.15,0,.15],[-Math.PI/2,0,0]]]},ve={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.OctahedronGeometry(.2,0),e)]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]]},_={START:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],END:[[new t.Mesh(new t.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],DELTA:[[new t.Line(W(),r),null,null,null,"helper"]],X:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(O,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(O,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},me={XYZE:[[new t.Mesh(T(.5,1),X),null,[0,Math.PI/2,0]]],X:[[new t.Mesh(T(.5,.5),c)]],Y:[[new t.Mesh(T(.5,.5),i),null,[0,0,-Math.PI/2]]],Z:[[new t.Mesh(T(.5,.5),l),null,[0,Math.PI/2,0]]],E:[[new t.Mesh(T(.75,1),A),null,[0,Math.PI/2,0]]]},ze={AXIS:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},It={XYZE:[[new t.Mesh(new t.SphereGeometry(.25,10,8),e)]],X:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[Math.PI/2,0,0]]],Z:[[new t.Mesh(new t.TorusGeometry(.5,.1,4,24),e),[0,0,0],[0,0,-Math.PI/2]]],E:[[new t.Mesh(new t.TorusGeometry(.75,.1,2,24),e)]]},Te={X:[[new t.Mesh(C,c),[.5,0,0],[0,0,-Math.PI/2]],[new t.Mesh(v,c),[0,0,0],[0,0,-Math.PI/2]],[new t.Mesh(C,c),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(C,i),[0,.5,0]],[new t.Mesh(v,i)],[new t.Mesh(C,i),[0,-.5,0],[0,0,Math.PI]]],Z:[[new t.Mesh(C,l),[0,0,.5],[Math.PI/2,0,0]],[new t.Mesh(v,l),[0,0,0],[Math.PI/2,0,0]],[new t.Mesh(C,l),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),f),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),d),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.15,.15,.01),p),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.1,.1,.1),w.clone())]]},ue={X:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[.3,0,0],[0,0,-Math.PI/2]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,.3,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,-.3,0],[0,0,Math.PI]]],Z:[[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,.3],[Math.PI/2,0,0]],[new t.Mesh(new t.CylinderGeometry(.2,0,.6,4),e),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,.15,0]]],YZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.01),e),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new t.Mesh(new t.BoxGeometry(.2,.2,.2),e),[0,0,0]]]},_e={X:[[new t.Line(O,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new t.Line(O,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new t.Line(O,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function Z(H){const Q=new t.Object3D;for(const Y in H)for(let K=H[Y].length;K--;){const I=H[Y][K][0].clone(),ie=H[Y][K][1],de=H[Y][K][2],Ie=H[Y][K][3],ut=H[Y][K][4];I.name=Y,I.tag=ut,ie&&I.position.set(ie[0],ie[1],ie[2]),de&&I.rotation.set(de[0],de[1],de[2]),Ie&&I.scale.set(Ie[0],Ie[1],Ie[2]),I.updateMatrix();const dt=I.geometry.clone();dt.applyMatrix4(I.matrix),I.geometry=dt,I.renderOrder=1/0,I.position.set(0,0,0),I.rotation.set(0,0,0),I.scale.set(1,1,1),Q.add(I)}return Q}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=Z(j)),this.add(this.gizmo.rotate=Z(me)),this.add(this.gizmo.scale=Z(Te)),this.add(this.picker.translate=Z(ve)),this.add(this.picker.rotate=Z(It)),this.add(this.picker.scale=Z(ue)),this.add(this.helper.translate=Z(_)),this.add(this.helper.rotate=Z(ze)),this.add(this.helper.scale=Z(_e)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(n){const e=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:Et;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let r=[];r=r.concat(this.picker[this.mode].children),r=r.concat(this.gizmo[this.mode].children),r=r.concat(this.helper[this.mode].children);for(let c=0;c<r.length;c++){const i=r[c];i.visible=!0,i.rotation.set(0,0,0),i.position.copy(this.worldPosition);let l;if(this.camera.isOrthographicCamera?l=(this.camera.top-this.camera.bottom)/this.camera.zoom:l=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),i.scale.set(1,1,1).multiplyScalar(l*this.size/4),i.tag==="helper"){i.visible=!1,i.name==="AXIS"?(i.visible=!!this.axis,this.axis==="X"&&(x.setFromEuler(bt.set(0,0,0)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Y"&&(x.setFromEuler(bt.set(0,0,Math.PI/2)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="Z"&&(x.setFromEuler(bt.set(0,Math.PI/2,0)),i.quaternion.copy(e).multiply(x),Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))>.9&&(i.visible=!1)),this.axis==="XYZE"&&(x.setFromEuler(bt.set(0,Math.PI/2,0)),E.copy(this.rotationAxis),i.quaternion.setFromRotationMatrix(dn.lookAt(un,E,ge)),i.quaternion.multiply(x),i.visible=this.dragging),this.axis==="E"&&(i.visible=!1)):i.name==="START"?(i.position.copy(this.worldPositionStart),i.visible=this.dragging):i.name==="END"?(i.position.copy(this.worldPosition),i.visible=this.dragging):i.name==="DELTA"?(i.position.copy(this.worldPositionStart),i.quaternion.copy(this.worldQuaternionStart),R.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),R.applyQuaternion(this.worldQuaternionStart.clone().invert()),i.scale.copy(R),i.visible=this.dragging):(i.quaternion.copy(e),this.dragging?i.position.copy(this.worldPositionStart):i.position.copy(this.worldPosition),this.axis&&(i.visible=this.axis.search(i.name)!==-1));continue}i.quaternion.copy(e),this.mode==="translate"||this.mode==="scale"?(i.name==="X"&&Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Y"&&Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="Z"&&Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))>.99&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XY"&&Math.abs(E.copy(Qe).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="YZ"&&Math.abs(E.copy(Ve).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1),i.name==="XZ"&&Math.abs(E.copy(ge).applyQuaternion(e).dot(this.eye))<.2&&(i.scale.set(1e-10,1e-10,1e-10),i.visible=!1)):this.mode==="rotate"&&(wt.copy(e),E.copy(this.eye).applyQuaternion(x.copy(e).invert()),i.name.search("E")!==-1&&i.quaternion.setFromRotationMatrix(dn.lookAt(this.eye,un,ge)),i.name==="X"&&(x.setFromAxisAngle(Ve,Math.atan2(-E.y,E.z)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x)),i.name==="Y"&&(x.setFromAxisAngle(ge,Math.atan2(E.x,E.z)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x)),i.name==="Z"&&(x.setFromAxisAngle(Qe,Math.atan2(E.y,E.x)),x.multiplyQuaternions(wt,x),i.quaternion.copy(x))),i.visible=i.visible&&(i.name.indexOf("X")===-1||this.showX),i.visible=i.visible&&(i.name.indexOf("Y")===-1||this.showY),i.visible=i.visible&&(i.name.indexOf("Z")===-1||this.showZ),i.visible=i.visible&&(i.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),i.material._color=i.material._color||i.material.color.clone(),i.material._opacity=i.material._opacity||i.material.opacity,i.material.color.copy(i.material._color),i.material.opacity=i.material._opacity,this.enabled&&this.axis&&(i.name===this.axis||this.axis.split("").some(function(d){return i.name===d}))&&(i.material.color.setHex(16776960),i.material.opacity=1)}super.updateMatrixWorld(n)}}class mo extends t.Mesh{constructor(){super(new t.PlaneGeometry(1e5,1e5,2,2),new t.MeshBasicMaterial({visible:!1,wireframe:!0,side:t.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(n){let a=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(a="local"),gt.copy(Ve).applyQuaternion(a==="local"?this.worldQuaternion:Et),Ge.copy(ge).applyQuaternion(a==="local"?this.worldQuaternion:Et),Fe.copy(Qe).applyQuaternion(a==="local"?this.worldQuaternion:Et),E.copy(Ge),this.mode){case"translate":case"scale":switch(this.axis){case"X":E.copy(this.eye).cross(gt),U.copy(gt).cross(E);break;case"Y":E.copy(this.eye).cross(Ge),U.copy(Ge).cross(E);break;case"Z":E.copy(this.eye).cross(Fe),U.copy(Fe).cross(E);break;case"XY":U.copy(Fe);break;case"YZ":U.copy(gt);break;case"XZ":E.copy(Fe),U.copy(Ge);break;case"XYZ":case"E":U.set(0,0,0);break}break;case"rotate":default:U.set(0,0,0)}U.length()===0?this.quaternion.copy(this.cameraQuaternion):(fn.lookAt(R.set(0,0,0),U,E),this.quaternion.setFromRotationMatrix(fn)),super.updateMatrixWorld(n)}}var F,Pe;class uo{constructor(){u(this,F,void 0);u(this,Pe,void 0);P(this,F,new io(y.en3.camera,y.en3.webglRenderer.domElement)),P(this,Pe,new N.Store([0,0,0],{passport:{name:"Controls.OrbitControls.Target",manager:{type:"number",invisible:!0}}}));let n=!0;s(this,Pe).subscribe(a=>{s(this,F).target.set(...a.current),n&&s(this,F).update()}),s(this,F).addEventListener("change",()=>{n=!1,s(this,Pe).current=[s(this,F).target.x,s(this,F).target.y,s(this,F).target.z],n=!0})}get controls(){return s(this,F)}destroy(){s(this,F).dispose(),s(this,Pe).close()}}F=new WeakMap,Pe=new WeakMap;var k,Ke,$e,Je,et,tt,nt,ot,it;class fo{constructor(){u(this,k,null);u(this,Ke,new N.Store(y.en3.camera.far,{passport:{name:"Helpers.Grid.Size",manager:{type:"number",step:1}}}));u(this,$e,new N.Store(100,{passport:{name:"Helpers.Grid.Divisions",manager:{type:"number"}}}));u(this,Je,new N.Store("#0000ff",{passport:{name:"Helpers.Grid.Color 1",manager:{type:"color"}}}));u(this,et,new N.Store("#808080",{passport:{name:"Helpers.Grid.Color 2",manager:{type:"color"}}}));u(this,tt,new N.Store(!1,{passport:{name:"Helpers.Grid.Vertical",manager:{type:"boolean"}}}));u(this,nt,new N.Store(!0,{passport:{name:"Helpers.Grid.Visible",manager:{type:"boolean"}}}));u(this,ot,void 0);u(this,it,n=>{n.key==="g"&&(s(this,k).visible=!s(this,k).visible)});P(this,ot,new Gn.Composed([s(this,Ke),s(this,$e),s(this,Je),s(this,et),s(this,tt),s(this,nt)],()=>{s(this,k)&&(y.en3.view.remove(s(this,k)),s(this,k).dispose()),P(this,k,new t.GridHelper(s(this,Ke).current,s(this,$e).current,s(this,Je).current,s(this,et).current)),s(this,k).rotation.x=s(this,tt).current?Math.PI/2:0,s(this,k).visible=s(this,nt).current,y.en3.view.add(s(this,k))})),addEventListener("keydown",s(this,it))}get helper(){return s(this,k)}destroy(){s(this,ot).close(),s(this,k)&&(y.en3.view.remove(s(this,k)),s(this,k).dispose()),removeEventListener("keydown",s(this,it))}}k=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Je=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,ot=new WeakMap,it=new WeakMap;var D,V,le,he,st,De,at,rt,Yt;class yo{constructor(){u(this,rt);u(this,D,void 0);u(this,V,[]);u(this,le,null);u(this,he,n=>{if(n.child.name.startsWith("T.")&&!s(this,V).find(a=>a.object3d===n.child)){const a=new Nt(n.child);s(this,V).push(a),y.en3.raycaster.add(a.raycasterTarget,{eventDispatcher:a.raycasterTarget}),a.raycasterTarget.addEventListener("pointerDown",s(this,De)),a.object3d.addEventListener("childadded",s(this,he))}});u(this,st,n=>{const a=M(this,rt,Yt).call(this,n.child);a&&(y.en3.raycaster.remove(a.raycasterTarget),a.destroy(),a.raycasterTarget.removeEventListener("pointerDown",s(this,De)),a.object3d.removeEventListener("childadded",s(this,he)),P(this,V,s(this,V).filter(e=>e!==a)))});u(this,De,n=>{const a=M(this,rt,Yt).call(this,n.target);a&&(P(this,le,s(this,V).find(e=>e.object3d===(a==null?void 0:a.object3d))||null),s(this,le)&&s(this,D).attach(s(this,le).object3d))});u(this,at,n=>{n.key==="t"?s(this,D).setMode("translate"):n.key==="r"?s(this,D).setMode("rotate"):n.key==="s"?s(this,D).setMode("scale"):n.key==="Escape"?s(this,D).detach():n.key==="+"||n.key==="="?s(this,D).setSize(s(this,D).size+.1):n.key==="-"||n.key==="_"?s(this,D).setSize(s(this,D).size-.1):n.key==="h"&&s(this,V).forEach(a=>{a.helpers.forEach(e=>{e.visible=!e.visible})})});P(this,D,new so(y.en3.camera,y.en3.webglRenderer.domElement)),s(this,D).addEventListener("objectChange",n=>{s(this,le)&&s(this,le).save()}),y.en3.view.add(s(this,D)),y.en3.scene.addEventListener("childadded",s(this,he)),y.en3.scene.addEventListener("childremoved",s(this,st)),window.addEventListener("keydown",s(this,at))}get controls(){return s(this,D)}destroy(){y.en3.scene.removeEventListener("childadded",s(this,he)),y.en3.scene.removeEventListener("childremoved",s(this,st)),window.removeEventListener("keydown",s(this,at)),s(this,D).dispose(),s(this,V).forEach(n=>{n.raycasterTarget.removeEventListener("pointerDown",s(this,De)),n.object3d.removeEventListener("childadded",s(this,he)),n.destroy()}),P(this,V,[])}}D=new WeakMap,V=new WeakMap,le=new WeakMap,he=new WeakMap,st=new WeakMap,De=new WeakMap,at=new WeakMap,rt=new WeakSet,Yt=function(n){return s(this,V).find(e=>e.object3d===n||e.raycasterTarget===n)};var Ce,je,ke,Re,ct,zt,_t,Sn;class bo{constructor(){u(this,ct);u(this,_t);u(this,Ce,void 0);u(this,je,void 0);u(this,ke,void 0);u(this,Re,[]);P(this,Ce,y.en3.composer.addPass=y.en3.composer.addPass.bind(y.en3.composer)),y.en3.composer.addPass=(...n)=>{M(this,ct,zt).call(this,n[0]),s(this,Ce).call(this,...n)},P(this,je,y.en3.composer.removePass=y.en3.composer.removePass.bind(y.en3.composer)),y.en3.composer.removePass=(...n)=>{M(this,_t,Sn).call(this,n[0]),s(this,je).call(this,...n)},P(this,ke,y.en3.composer.insertPass=y.en3.composer.insertPass.bind(y.en3.composer)),y.en3.composer.insertPass=(...n)=>{M(this,ct,zt).call(this,n[0]),s(this,ke).call(this,...n)}}destroy(){y.en3.composer.addPass=s(this,Ce),y.en3.composer.removePass=s(this,je),y.en3.composer.insertPass=s(this,ke),s(this,Re).forEach(n=>{n.destroy()})}}Ce=new WeakMap,je=new WeakMap,ke=new WeakMap,Re=new WeakMap,ct=new WeakSet,zt=function(n){s(this,Re).push(new pe(n,{folderName:`EffectComposer.${n.constructor.name}`,skipKeys:["renderToScreen","needsSwap","nMips","oldClearAlpha","clearColor","resolution"]})),"uniforms"in n&&s(this,Re).push(new pe(n.uniforms,{folderName:`EffectComposer.${n.constructor.name}.Uniforms`,optionsCatalog:{maxblur:{type:"number",min:0,max:1,step:1e-5,ease:.1},aperture:{type:"number",min:0,max:.01,step:1e-6},focus:{type:"number",min:0,step:.01}},skipKeys:["time","resolution"]}))},_t=new WeakSet,Sn=function(n){};var lt,ht,pt,mt,He,xe,Ye;class wo{constructor(){u(this,lt,void 0);u(this,ht,void 0);u(this,pt,null);u(this,mt,void 0);u(this,He,void 0);u(this,xe,void 0);u(this,Ye,void 0);P(this,lt,new pe(y.en3.webglRenderer,{folderName:"Renderer"})),P(this,ht,new pe(y.en3.webglRenderer.shadowMap,{folderName:"Renderer.shadowMap",optionsCatalog:{type:{type:"select",variants:["BasicShadowMap","PCFShadowMap","PCFSoftShadowMap","VSMShadowMap"]}},afterChange:()=>{y.en3.webglRenderer.shadowMap.needsUpdate=!0,Fn.traverseMaterials(y.en3.scene,n=>{n.needsUpdate=!0})}})),y.en3.composer&&P(this,pt,new bo),P(this,mt,new fo),P(this,He,new Nt(y.en3.camera)),P(this,xe,new uo),s(this,xe).controls.addEventListener("change",()=>{s(this,He).save()}),P(this,Ye,new yo),s(this,Ye).controls.addEventListener("dragging-changed",n=>{s(this,xe).controls.enabled=!n.value})}destroy(){var n;s(this,lt).destroy(),s(this,ht).destroy(),(n=s(this,pt))==null||n.destroy(),s(this,mt).destroy(),s(this,He).destroy(),s(this,xe).destroy(),s(this,Ye).destroy()}}lt=new WeakMap,ht=new WeakMap,pt=new WeakMap,mt=new WeakMap,He=new WeakMap,xe=new WeakMap,Ye=new WeakMap;exports.En3Helpers=wo;exports.En3Object3dManager=Nt;
@@ -1,2 +0,0 @@
1
- export { En3Helpers } from './En3Helpers';
2
- export { En3Object3dManager, type En3Object3dManagerOptions, } from './En3Object3dManager';
@@ -1,3 +0,0 @@
1
- export { en3 } from './core/en3';
2
- export { En3View, type En3ViewOptions, type En3AttachedObject3D, type En3AttachOptions, type En3ViewBeforeRenderCallback, } from './core/En3View';
3
- export { en3Cache } from './core/en3Cache';
@@ -1,6 +0,0 @@
1
- import { E as n, e as s, a as o } from "../en3-THFHEReu.js";
2
- export {
3
- n as En3View,
4
- s as en3,
5
- o as en3Cache
6
- };
@@ -1 +0,0 @@
1
- export function MeshoptDecoder(): any;
@@ -1 +0,0 @@
1
- export { MeshoptDecoder } from './MeshoptDecoder';
@@ -1,12 +0,0 @@
1
- import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
2
-
3
- export declare class En3GLTFLoader {
4
- #private;
5
- get gltfLoader(): GLTFLoader;
6
- setLoaders(options?: {
7
- draco?: boolean | string | null;
8
- ktx2?: boolean | string | null;
9
- meshopt?: boolean;
10
- }): void;
11
- load(...parameters: Parameters<typeof this.gltfLoader.load>): void;
12
- }
@@ -1,8 +0,0 @@
1
- import { TextureLoader } from 'three';
2
-
3
- export declare class En3TextureLoader {
4
- #private;
5
- constructor();
6
- load(...parameters: Parameters<TextureLoader['load']>): any;
7
- loadSync(...parameters: Parameters<TextureLoader['loadAsync']>): Promise<any>;
8
- }
@@ -1 +0,0 @@
1
- "use strict";var Y=(h,t,e)=>{if(!t.has(h))throw TypeError("Cannot "+e)};var y=(h,t,e)=>(Y(h,t,"read from private field"),e?e.call(h):t.get(h)),B=(h,t,e)=>{if(t.has(h))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(h):t.set(h,e)},K=(h,t,e,r)=>(Y(h,t,"write to private field"),r?r.call(h,e):t.set(h,e),e);var Q=(h,t,e)=>new Promise((r,n)=>{var s=o=>{try{a(e.next(o))}catch(c){n(c)}},i=o=>{try{a(e.throw(o))}catch(c){n(c)}},a=o=>o.done?r(o.value):Promise.resolve(o.value).then(s,i);a((e=e.apply(h,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("three"),L=require("../../en3-CBBYE8rb.cjs");function Z(h,t){if(t===u.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),h;if(t===u.TriangleFanDrawMode||t===u.TriangleStripDrawMode){let e=h.getIndex();if(e===null){const i=[],a=h.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)i.push(o);h.setIndex(i),e=h.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),h}const r=e.count-2,n=[];if(t===u.TriangleFanDrawMode)for(let i=1;i<=r;i++)n.push(e.getX(0)),n.push(e.getX(i)),n.push(e.getX(i+1));else for(let i=0;i<r;i++)i%2===0?(n.push(e.getX(i)),n.push(e.getX(i+1)),n.push(e.getX(i+2))):(n.push(e.getX(i+2)),n.push(e.getX(i+1)),n.push(e.getX(i)));n.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=h.clone();return s.setIndex(n),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),h}class re extends u.Loader{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new le(e)}),this.register(function(e){return new ue(e)}),this.register(function(e){return new Re(e)}),this.register(function(e){return new xe(e)}),this.register(function(e){return new Ee(e)}),this.register(function(e){return new he(e)}),this.register(function(e){return new fe(e)}),this.register(function(e){return new pe(e)}),this.register(function(e){return new me(e)}),this.register(function(e){return new ce(e)}),this.register(function(e){return new ge(e)}),this.register(function(e){return new de(e)}),this.register(function(e){return new Te(e)}),this.register(function(e){return new Ae(e)}),this.register(function(e){return new oe(e)}),this.register(function(e){return new Le(e)}),this.register(function(e){return new Me(e)})}load(t,e,r,n){const s=this;let i;if(this.resourcePath!=="")i=this.resourcePath;else if(this.path!==""){const c=u.LoaderUtils.extractUrlBase(t);i=u.LoaderUtils.resolveURL(c,this.path)}else i=u.LoaderUtils.extractUrlBase(t);this.manager.itemStart(t);const a=function(c){n?n(c):console.error(c),s.manager.itemError(t),s.manager.itemEnd(t)},o=new u.FileLoader(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(t,function(c){try{s.parse(c,i,function(d){e(d),s.manager.itemEnd(t)},a)}catch(d){a(d)}},r,a)}setDRACOLoader(t){return this.dracoLoader=t,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,r,n){let s;const i={},a={},o=new TextDecoder;if(typeof t=="string")s=JSON.parse(t);else if(t instanceof ArrayBuffer)if(o.decode(new Uint8Array(t,0,4))===ne){try{i[A.KHR_BINARY_GLTF]=new Se(t)}catch(l){n&&n(l);return}s=JSON.parse(i[A.KHR_BINARY_GLTF].content)}else s=JSON.parse(o.decode(t));else s=t;if(s.asset===void 0||s.asset.version[0]<2){n&&n(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new ke(s,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let d=0;d<this.pluginCallbacks.length;d++){const l=this.pluginCallbacks[d](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,i[l.name]=!0}if(s.extensionsUsed)for(let d=0;d<s.extensionsUsed.length;++d){const l=s.extensionsUsed[d],f=s.extensionsRequired||[];switch(l){case A.KHR_MATERIALS_UNLIT:i[l]=new ae;break;case A.KHR_DRACO_MESH_COMPRESSION:i[l]=new _e(s,this.dracoLoader);break;case A.KHR_TEXTURE_TRANSFORM:i[l]=new ye;break;case A.KHR_MESH_QUANTIZATION:i[l]=new we;break;default:f.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(i),c.setPlugins(a),c.parse(r,n)}parseAsync(t,e){const r=this;return new Promise(function(n,s){r.parse(t,e,n,s)})}}function ie(){let h={};return{get:function(t){return h[t]},add:function(t,e){h[t]=e},remove:function(t){delete h[t]},removeAll:function(){h={}}}}const A={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class oe{constructor(t){this.parser=t,this.name=A.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let r=0,n=e.length;r<n;r++){const s=e[r];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(t){const e=this.parser,r="light:"+t;let n=e.cache.get(r);if(n)return n;const s=e.json,o=((s.extensions&&s.extensions[this.name]||{}).lights||[])[t];let c;const d=new u.Color(16777215);o.color!==void 0&&d.setRGB(o.color[0],o.color[1],o.color[2],u.LinearSRGBColorSpace);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new u.DirectionalLight(d),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new u.PointLight(d),c.distance=l;break;case"spot":c=new u.SpotLight(d),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),c.decay=2,N(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+t),n=Promise.resolve(c),e.cache.add(r,n),n}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){const e=this,r=this.parser,s=r.json.nodes[t],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return r._getNodeRef(e.cache,a,o)})}}class ae{constructor(){this.name=A.KHR_MATERIALS_UNLIT}getMaterialType(){return u.MeshBasicMaterial}extendParams(t,e,r){const n=[];t.color=new u.Color(1,1,1),t.opacity=1;const s=e.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const i=s.baseColorFactor;t.color.setRGB(i[0],i[1],i[2],u.LinearSRGBColorSpace),t.opacity=i[3]}s.baseColorTexture!==void 0&&n.push(r.assignTexture(t,"map",s.baseColorTexture,u.SRGBColorSpace))}return Promise.all(n)}}class ce{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name].emissiveStrength;return s!==void 0&&(e.emissiveIntensity=s),Promise.resolve()}}class le{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];if(i.clearcoatFactor!==void 0&&(e.clearcoat=i.clearcoatFactor),i.clearcoatTexture!==void 0&&s.push(r.assignTexture(e,"clearcoatMap",i.clearcoatTexture)),i.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=i.clearcoatRoughnessFactor),i.clearcoatRoughnessTexture!==void 0&&s.push(r.assignTexture(e,"clearcoatRoughnessMap",i.clearcoatRoughnessTexture)),i.clearcoatNormalTexture!==void 0&&(s.push(r.assignTexture(e,"clearcoatNormalMap",i.clearcoatNormalTexture)),i.clearcoatNormalTexture.scale!==void 0)){const a=i.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new u.Vector2(a,a)}return Promise.all(s)}}class ue{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_DISPERSION}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name];return e.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class de{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];return i.iridescenceFactor!==void 0&&(e.iridescence=i.iridescenceFactor),i.iridescenceTexture!==void 0&&s.push(r.assignTexture(e,"iridescenceMap",i.iridescenceTexture)),i.iridescenceIor!==void 0&&(e.iridescenceIOR=i.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),i.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=i.iridescenceThicknessMinimum),i.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=i.iridescenceThicknessMaximum),i.iridescenceThicknessTexture!==void 0&&s.push(r.assignTexture(e,"iridescenceThicknessMap",i.iridescenceThicknessTexture)),Promise.all(s)}}class he{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_SHEEN}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[];e.sheenColor=new u.Color(0,0,0),e.sheenRoughness=0,e.sheen=1;const i=n.extensions[this.name];if(i.sheenColorFactor!==void 0){const a=i.sheenColorFactor;e.sheenColor.setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace)}return i.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=i.sheenRoughnessFactor),i.sheenColorTexture!==void 0&&s.push(r.assignTexture(e,"sheenColorMap",i.sheenColorTexture,u.SRGBColorSpace)),i.sheenRoughnessTexture!==void 0&&s.push(r.assignTexture(e,"sheenRoughnessMap",i.sheenRoughnessTexture)),Promise.all(s)}}class fe{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];return i.transmissionFactor!==void 0&&(e.transmission=i.transmissionFactor),i.transmissionTexture!==void 0&&s.push(r.assignTexture(e,"transmissionMap",i.transmissionTexture)),Promise.all(s)}}class pe{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_VOLUME}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];e.thickness=i.thicknessFactor!==void 0?i.thicknessFactor:0,i.thicknessTexture!==void 0&&s.push(r.assignTexture(e,"thicknessMap",i.thicknessTexture)),e.attenuationDistance=i.attenuationDistance||1/0;const a=i.attenuationColor||[1,1,1];return e.attenuationColor=new u.Color().setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace),Promise.all(s)}}class me{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_IOR}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const n=this.parser.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=n.extensions[this.name];return e.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class ge{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_SPECULAR}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];e.specularIntensity=i.specularFactor!==void 0?i.specularFactor:1,i.specularTexture!==void 0&&s.push(r.assignTexture(e,"specularIntensityMap",i.specularTexture));const a=i.specularColorFactor||[1,1,1];return e.specularColor=new u.Color().setRGB(a[0],a[1],a[2],u.LinearSRGBColorSpace),i.specularColorTexture!==void 0&&s.push(r.assignTexture(e,"specularColorMap",i.specularColorTexture,u.SRGBColorSpace)),Promise.all(s)}}class Ae{constructor(t){this.parser=t,this.name=A.EXT_MATERIALS_BUMP}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];return e.bumpScale=i.bumpFactor!==void 0?i.bumpFactor:1,i.bumpTexture!==void 0&&s.push(r.assignTexture(e,"bumpMap",i.bumpTexture)),Promise.all(s)}}class Te{constructor(t){this.parser=t,this.name=A.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){const r=this.parser.json.materials[t];return!r.extensions||!r.extensions[this.name]?null:u.MeshPhysicalMaterial}extendMaterialParams(t,e){const r=this.parser,n=r.json.materials[t];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const s=[],i=n.extensions[this.name];return i.anisotropyStrength!==void 0&&(e.anisotropy=i.anisotropyStrength),i.anisotropyRotation!==void 0&&(e.anisotropyRotation=i.anisotropyRotation),i.anisotropyTexture!==void 0&&s.push(r.assignTexture(e,"anisotropyMap",i.anisotropyTexture)),Promise.all(s)}}class Re{constructor(t){this.parser=t,this.name=A.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,r=e.json,n=r.textures[t];if(!n.extensions||!n.extensions[this.name])return null;const s=n.extensions[this.name],i=e.options.ktx2Loader;if(!i){if(r.extensionsRequired&&r.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,s.source,i)}}class xe{constructor(t){this.parser=t,this.name=A.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(t){const e=this.name,r=this.parser,n=r.json,s=n.textures[t];if(!s.extensions||!s.extensions[e])return null;const i=s.extensions[e],a=n.images[i.source];let o=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(o=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(t,i.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Ee{constructor(t){this.parser=t,this.name=A.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(t){const e=this.name,r=this.parser,n=r.json,s=n.textures[t];if(!s.extensions||!s.extensions[e])return null;const i=s.extensions[e],a=n.images[i.source];let o=r.textureLoader;if(a.uri){const c=r.options.manager.getHandler(a.uri);c!==null&&(o=c)}return this.detectSupport().then(function(c){if(c)return r.loadTextureImage(t,i.source,o);if(n.extensionsRequired&&n.extensionsRequired.indexOf(e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(t)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(t){const e=new Image;e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",e.onload=e.onerror=function(){t(e.height===1)}})),this.isSupported}}class Le{constructor(t){this.name=A.EXT_MESHOPT_COMPRESSION,this.parser=t}loadBufferView(t){const e=this.parser.json,r=e.bufferViews[t];if(r.extensions&&r.extensions[this.name]){const n=r.extensions[this.name],s=this.parser.getDependency("buffer",n.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const o=n.byteOffset||0,c=n.byteLength||0,d=n.count,l=n.byteStride,f=new Uint8Array(a,o,c);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(d,l,f,n.mode,n.filter).then(function(p){return p.buffer}):i.ready.then(function(){const p=new ArrayBuffer(d*l);return i.decodeGltfBuffer(new Uint8Array(p),d,l,f,n.mode,n.filter),p})})}else return null}}class Me{constructor(t){this.name=A.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,r=e.nodes[t];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const n=e.meshes[r.mesh];for(const c of n.primitives)if(c.mode!==S.TRIANGLES&&c.mode!==S.TRIANGLE_STRIP&&c.mode!==S.TRIANGLE_FAN&&c.mode!==void 0)return null;const i=r.extensions[this.name].attributes,a=[],o={};for(const c in i)a.push(this.parser.getDependency("accessor",i[c]).then(d=>(o[c]=d,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(t)),Promise.all(a).then(c=>{const d=c.pop(),l=d.isGroup?d.children:[d],f=c[0].count,p=[];for(const m of l){const R=new u.Matrix4,g=new u.Vector3,T=new u.Quaternion,E=new u.Vector3(1,1,1),M=new u.InstancedMesh(m.geometry,m.material,f);for(let x=0;x<f;x++)o.TRANSLATION&&g.fromBufferAttribute(o.TRANSLATION,x),o.ROTATION&&T.fromBufferAttribute(o.ROTATION,x),o.SCALE&&E.fromBufferAttribute(o.SCALE,x),M.setMatrixAt(x,R.compose(g,T,E));for(const x in o)if(x==="_COLOR_0"){const w=o[x];M.instanceColor=new u.InstancedBufferAttribute(w.array,w.itemSize,w.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&m.geometry.setAttribute(x,o[x]);u.Object3D.prototype.copy.call(M,m),this.parser.assignFinalMaterial(M),p.push(M)}return d.isGroup?(d.clear(),d.add(...p),d):p[0]}))}}const ne="glTF",H=12,J={JSON:1313821514,BIN:5130562};class Se{constructor(t){this.name=A.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,H),r=new TextDecoder;if(this.header={magic:r.decode(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==ne)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-H,s=new DataView(t,H);let i=0;for(;i<n;){const a=s.getUint32(i,!0);i+=4;const o=s.getUint32(i,!0);if(i+=4,o===J.JSON){const c=new Uint8Array(t,H+i,a);this.content=r.decode(c)}else if(o===J.BIN){const c=H+i;this.body=t.slice(c,c+a)}i+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class _e{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=A.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const r=this.json,n=this.dracoLoader,s=t.extensions[this.name].bufferView,i=t.extensions[this.name].attributes,a={},o={},c={};for(const d in i){const l=q[d]||d.toLowerCase();a[l]=i[d]}for(const d in t.attributes){const l=q[d]||d.toLowerCase();if(i[d]!==void 0){const f=r.accessors[t.attributes[d]],p=G[f.componentType];c[l]=p.name,o[l]=f.normalized===!0}}return e.getDependency("bufferView",s).then(function(d){return new Promise(function(l,f){n.decodeDracoFile(d,function(p){for(const m in p.attributes){const R=p.attributes[m],g=o[m];g!==void 0&&(R.normalized=g)}l(p)},a,c,u.LinearSRGBColorSpace,f)})})}}class ye{constructor(){this.name=A.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}}class we{constructor(){this.name=A.KHR_MESH_QUANTIZATION}}class se extends u.Interpolant{constructor(t,e,r,n){super(t,e,r,n)}copySampleValue_(t){const e=this.resultBuffer,r=this.sampleValues,n=this.valueSize,s=t*n*3+n;for(let i=0;i!==n;i++)e[i]=r[s+i];return e}interpolate_(t,e,r,n){const s=this.resultBuffer,i=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,d=n-e,l=(r-e)/d,f=l*l,p=f*l,m=t*c,R=m-c,g=-2*p+3*f,T=p-f,E=1-g,M=T-f+l;for(let x=0;x!==a;x++){const w=i[R+x+a],I=i[R+x+o]*d,_=i[m+x+a],k=i[m+x]*d;s[x]=E*w+M*I+g*_+T*k}return s}}const be=new u.Quaternion;class Ne extends se{interpolate_(t,e,r,n){const s=super.interpolate_(t,e,r,n);return be.fromArray(s).normalize().toArray(s),s}}const S={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},G={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},$={9728:u.NearestFilter,9729:u.LinearFilter,9984:u.NearestMipmapNearestFilter,9985:u.LinearMipmapNearestFilter,9986:u.NearestMipmapLinearFilter,9987:u.LinearMipmapLinearFilter},ee={33071:u.ClampToEdgeWrapping,33648:u.MirroredRepeatWrapping,10497:u.RepeatWrapping},V={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},q={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},O={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Ie={CUBICSPLINE:void 0,LINEAR:u.InterpolateLinear,STEP:u.InterpolateDiscrete},X={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Ce(h){return h.DefaultMaterial===void 0&&(h.DefaultMaterial=new u.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:u.FrontSide})),h.DefaultMaterial}function D(h,t,e){for(const r in e.extensions)h[r]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=e.extensions[r])}function N(h,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(h.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function Oe(h,t,e){let r=!1,n=!1,s=!1;for(let c=0,d=t.length;c<d;c++){const l=t[c];if(l.POSITION!==void 0&&(r=!0),l.NORMAL!==void 0&&(n=!0),l.COLOR_0!==void 0&&(s=!0),r&&n&&s)break}if(!r&&!n&&!s)return Promise.resolve(h);const i=[],a=[],o=[];for(let c=0,d=t.length;c<d;c++){const l=t[c];if(r){const f=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):h.attributes.position;i.push(f)}if(n){const f=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):h.attributes.normal;a.push(f)}if(s){const f=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):h.attributes.color;o.push(f)}}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(o)]).then(function(c){const d=c[0],l=c[1],f=c[2];return r&&(h.morphAttributes.position=d),n&&(h.morphAttributes.normal=l),s&&(h.morphAttributes.color=f),h.morphTargetsRelative=!0,h})}function De(h,t){if(h.updateMorphTargets(),t.weights!==void 0)for(let e=0,r=t.weights.length;e<r;e++)h.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){const e=t.extras.targetNames;if(h.morphTargetInfluences.length===e.length){h.morphTargetDictionary={};for(let r=0,n=e.length;r<n;r++)h.morphTargetDictionary[e[r]]=r}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Fe(h){let t;const e=h.extensions&&h.extensions[A.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+z(e.attributes):t=h.indices+":"+z(h.attributes)+":"+h.mode,h.targets!==void 0)for(let r=0,n=h.targets.length;r<n;r++)t+=":"+z(h.targets[r]);return t}function z(h){let t="";const e=Object.keys(h).sort();for(let r=0,n=e.length;r<n;r++)t+=e[r]+":"+h[e[r]]+";";return t}function W(h){switch(h){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Pe(h){return h.search(/\.jpe?g($|\?)/i)>0||h.search(/^data\:image\/jpeg/)===0?"image/jpeg":h.search(/\.webp($|\?)/i)>0||h.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const Ge=new u.Matrix4;class ke{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new ie,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,n=-1,s=!1,i=-1;if(typeof navigator!="undefined"){const a=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);n=r&&o?parseInt(o[1],10):-1,s=a.indexOf("Firefox")>-1,i=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap=="undefined"||r&&n<17||s&&i<98?this.textureLoader=new u.TextureLoader(this.options.manager):this.textureLoader=new u.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new u.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const r=this,n=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(i){return i._markDefs&&i._markDefs()}),Promise.all(this._invokeAll(function(i){return i.beforeRoot&&i.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(i){const a={scene:i[0][n.scene||0],scenes:i[0],animations:i[1],cameras:i[2],asset:n.asset,parser:r,userData:{}};return D(s,a,n),N(a,n),Promise.all(r._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();t(a)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],r=this.json.meshes||[];for(let n=0,s=e.length;n<s;n++){const i=e[n].joints;for(let a=0,o=i.length;a<o;a++)t[i[a]].isBone=!0}for(let n=0,s=t.length;n<s;n++){const i=t[n];i.mesh!==void 0&&(this._addNodeRef(this.meshCache,i.mesh),i.skin!==void 0&&(r[i.mesh].isSkinnedMesh=!0)),i.camera!==void 0&&this._addNodeRef(this.cameraCache,i.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,r){if(t.refs[e]<=1)return r;const n=r.clone(),s=(i,a)=>{const o=this.associations.get(i);o!=null&&this.associations.set(a,o);for(const[c,d]of i.children.entries())s(d,a.children[c])};return s(r,n),n.name+="_instance_"+t.uses[e]++,n}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let r=0;r<e.length;r++){const n=t(e[r]);if(n)return n}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const r=[];for(let n=0;n<e.length;n++){const s=t(e[n]);s&&r.push(s)}return r}getDependency(t,e){const r=t+":"+e;let n=this.cache.get(r);if(!n){switch(t){case"scene":n=this.loadScene(e);break;case"node":n=this._invokeOne(function(s){return s.loadNode&&s.loadNode(e)});break;case"mesh":n=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(e)});break;case"accessor":n=this.loadAccessor(e);break;case"bufferView":n=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(e)});break;case"buffer":n=this.loadBuffer(e);break;case"material":n=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(e)});break;case"texture":n=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(e)});break;case"skin":n=this.loadSkin(e);break;case"animation":n=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(e)});break;case"camera":n=this.loadCamera(e);break;default:if(n=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(t,e)}),!n)throw new Error("Unknown type: "+t);break}this.cache.add(r,n)}return n}getDependencies(t){let e=this.cache.get(t);if(!e){const r=this,n=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(n.map(function(s,i){return r.getDependency(t,i)})),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],r=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[A.KHR_BINARY_GLTF].body);const n=this.options;return new Promise(function(s,i){r.load(u.LoaderUtils.resolveURL(e.uri,n.path),s,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(r){const n=e.byteLength||0,s=e.byteOffset||0;return r.slice(s,s+n)})}loadAccessor(t){const e=this,r=this.json,n=this.json.accessors[t];if(n.bufferView===void 0&&n.sparse===void 0){const i=V[n.type],a=G[n.componentType],o=n.normalized===!0,c=new a(n.count*i);return Promise.resolve(new u.BufferAttribute(c,i,o))}const s=[];return n.bufferView!==void 0?s.push(this.getDependency("bufferView",n.bufferView)):s.push(null),n.sparse!==void 0&&(s.push(this.getDependency("bufferView",n.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",n.sparse.values.bufferView))),Promise.all(s).then(function(i){const a=i[0],o=V[n.type],c=G[n.componentType],d=c.BYTES_PER_ELEMENT,l=d*o,f=n.byteOffset||0,p=n.bufferView!==void 0?r.bufferViews[n.bufferView].byteStride:void 0,m=n.normalized===!0;let R,g;if(p&&p!==l){const T=Math.floor(f/p),E="InterleavedBuffer:"+n.bufferView+":"+n.componentType+":"+T+":"+n.count;let M=e.cache.get(E);M||(R=new c(a,T*p,n.count*p/d),M=new u.InterleavedBuffer(R,p/d),e.cache.add(E,M)),g=new u.InterleavedBufferAttribute(M,o,f%p/d,m)}else a===null?R=new c(n.count*o):R=new c(a,f,n.count*o),g=new u.BufferAttribute(R,o,m);if(n.sparse!==void 0){const T=V.SCALAR,E=G[n.sparse.indices.componentType],M=n.sparse.indices.byteOffset||0,x=n.sparse.values.byteOffset||0,w=new E(i[1],M,n.sparse.count*T),I=new c(i[2],x,n.sparse.count*o);a!==null&&(g=new u.BufferAttribute(g.array.slice(),g.itemSize,g.normalized));for(let _=0,k=w.length;_<k;_++){const C=w[_];if(g.setX(C,I[_*o]),o>=2&&g.setY(C,I[_*o+1]),o>=3&&g.setZ(C,I[_*o+2]),o>=4&&g.setW(C,I[_*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return g})}loadTexture(t){const e=this.json,r=this.options,s=e.textures[t].source,i=e.images[s];let a=this.textureLoader;if(i.uri){const o=r.manager.getHandler(i.uri);o!==null&&(a=o)}return this.loadTextureImage(t,s,a)}loadTextureImage(t,e,r){const n=this,s=this.json,i=s.textures[t],a=s.images[e],o=(a.uri||a.bufferView)+":"+i.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,r).then(function(d){d.flipY=!1,d.name=i.name||a.name||"",d.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(d.name=a.uri);const f=(s.samplers||{})[i.sampler]||{};return d.magFilter=$[f.magFilter]||u.LinearFilter,d.minFilter=$[f.minFilter]||u.LinearMipmapLinearFilter,d.wrapS=ee[f.wrapS]||u.RepeatWrapping,d.wrapT=ee[f.wrapT]||u.RepeatWrapping,n.associations.set(d,{textures:t}),d}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(t,e){const r=this,n=this.json,s=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(l=>l.clone());const i=n.images[t],a=self.URL||self.webkitURL;let o=i.uri||"",c=!1;if(i.bufferView!==void 0)o=r.getDependency("bufferView",i.bufferView).then(function(l){c=!0;const f=new Blob([l],{type:i.mimeType});return o=a.createObjectURL(f),o});else if(i.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const d=Promise.resolve(o).then(function(l){return new Promise(function(f,p){let m=f;e.isImageBitmapLoader===!0&&(m=function(R){const g=new u.Texture(R);g.needsUpdate=!0,f(g)}),e.load(u.LoaderUtils.resolveURL(l,s.path),m,void 0,p)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),N(l,i),l.userData.mimeType=i.mimeType||Pe(i.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[t]=d,d}assignTexture(t,e,r,n){const s=this;return this.getDependency("texture",r.index).then(function(i){if(!i)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(i=i.clone(),i.channel=r.texCoord),s.extensions[A.KHR_TEXTURE_TRANSFORM]){const a=r.extensions!==void 0?r.extensions[A.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=s.associations.get(i);i=s.extensions[A.KHR_TEXTURE_TRANSFORM].extendTexture(i,a),s.associations.set(i,o)}}return n!==void 0&&(i.colorSpace=n),t[e]=i,i})}assignFinalMaterial(t){const e=t.geometry;let r=t.material;const n=e.attributes.tangent===void 0,s=e.attributes.color!==void 0,i=e.attributes.normal===void 0;if(t.isPoints){const a="PointsMaterial:"+r.uuid;let o=this.cache.get(a);o||(o=new u.PointsMaterial,u.Material.prototype.copy.call(o,r),o.color.copy(r.color),o.map=r.map,o.sizeAttenuation=!1,this.cache.add(a,o)),r=o}else if(t.isLine){const a="LineBasicMaterial:"+r.uuid;let o=this.cache.get(a);o||(o=new u.LineBasicMaterial,u.Material.prototype.copy.call(o,r),o.color.copy(r.color),o.map=r.map,this.cache.add(a,o)),r=o}if(n||s||i){let a="ClonedMaterial:"+r.uuid+":";n&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),i&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=r.clone(),s&&(o.vertexColors=!0),i&&(o.flatShading=!0),n&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(r))),r=o}t.material=r}getMaterialType(){return u.MeshStandardMaterial}loadMaterial(t){const e=this,r=this.json,n=this.extensions,s=r.materials[t];let i;const a={},o=s.extensions||{},c=[];if(o[A.KHR_MATERIALS_UNLIT]){const l=n[A.KHR_MATERIALS_UNLIT];i=l.getMaterialType(),c.push(l.extendParams(a,s,e))}else{const l=s.pbrMetallicRoughness||{};if(a.color=new u.Color(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const f=l.baseColorFactor;a.color.setRGB(f[0],f[1],f[2],u.LinearSRGBColorSpace),a.opacity=f[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,u.SRGBColorSpace)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),i=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(t)}),c.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(t,a)})))}s.doubleSided===!0&&(a.side=u.DoubleSide);const d=s.alphaMode||X.OPAQUE;if(d===X.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,d===X.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&i!==u.MeshBasicMaterial&&(c.push(e.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new u.Vector2(1,1),s.normalTexture.scale!==void 0)){const l=s.normalTexture.scale;a.normalScale.set(l,l)}if(s.occlusionTexture!==void 0&&i!==u.MeshBasicMaterial&&(c.push(e.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&i!==u.MeshBasicMaterial){const l=s.emissiveFactor;a.emissive=new u.Color().setRGB(l[0],l[1],l[2],u.LinearSRGBColorSpace)}return s.emissiveTexture!==void 0&&i!==u.MeshBasicMaterial&&c.push(e.assignTexture(a,"emissiveMap",s.emissiveTexture,u.SRGBColorSpace)),Promise.all(c).then(function(){const l=new i(a);return s.name&&(l.name=s.name),N(l,s),e.associations.set(l,{materials:t}),s.extensions&&D(n,l,s),l})}createUniqueName(t){const e=u.PropertyBinding.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,r=this.extensions,n=this.primitiveCache;function s(a){return r[A.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return te(o,a,e)})}const i=[];for(let a=0,o=t.length;a<o;a++){const c=t[a],d=Fe(c),l=n[d];if(l)i.push(l.promise);else{let f;c.extensions&&c.extensions[A.KHR_DRACO_MESH_COMPRESSION]?f=s(c):f=te(new u.BufferGeometry,c,e),n[d]={primitive:c,promise:f},i.push(f)}}return Promise.all(i)}loadMesh(t){const e=this,r=this.json,n=this.extensions,s=r.meshes[t],i=s.primitives,a=[];for(let o=0,c=i.length;o<c;o++){const d=i[o].material===void 0?Ce(this.cache):this.getDependency("material",i[o].material);a.push(d)}return a.push(e.loadGeometries(i)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),d=o[o.length-1],l=[];for(let p=0,m=d.length;p<m;p++){const R=d[p],g=i[p];let T;const E=c[p];if(g.mode===S.TRIANGLES||g.mode===S.TRIANGLE_STRIP||g.mode===S.TRIANGLE_FAN||g.mode===void 0)T=s.isSkinnedMesh===!0?new u.SkinnedMesh(R,E):new u.Mesh(R,E),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),g.mode===S.TRIANGLE_STRIP?T.geometry=Z(T.geometry,u.TriangleStripDrawMode):g.mode===S.TRIANGLE_FAN&&(T.geometry=Z(T.geometry,u.TriangleFanDrawMode));else if(g.mode===S.LINES)T=new u.LineSegments(R,E);else if(g.mode===S.LINE_STRIP)T=new u.Line(R,E);else if(g.mode===S.LINE_LOOP)T=new u.LineLoop(R,E);else if(g.mode===S.POINTS)T=new u.Points(R,E);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+g.mode);Object.keys(T.geometry.morphAttributes).length>0&&De(T,s),T.name=e.createUniqueName(s.name||"mesh_"+t),N(T,s),g.extensions&&D(n,T,g),e.assignFinalMaterial(T),l.push(T)}for(let p=0,m=l.length;p<m;p++)e.associations.set(l[p],{meshes:t,primitives:p});if(l.length===1)return s.extensions&&D(n,l[0],s),l[0];const f=new u.Group;s.extensions&&D(n,f,s),e.associations.set(f,{meshes:t});for(let p=0,m=l.length;p<m;p++)f.add(l[p]);return f})}loadCamera(t){let e;const r=this.json.cameras[t],n=r[r.type];if(!n){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return r.type==="perspective"?e=new u.PerspectiveCamera(u.MathUtils.radToDeg(n.yfov),n.aspectRatio||1,n.znear||1,n.zfar||2e6):r.type==="orthographic"&&(e=new u.OrthographicCamera(-n.xmag,n.xmag,n.ymag,-n.ymag,n.znear,n.zfar)),r.name&&(e.name=this.createUniqueName(r.name)),N(e,r),Promise.resolve(e)}loadSkin(t){const e=this.json.skins[t],r=[];for(let n=0,s=e.joints.length;n<s;n++)r.push(this._loadNodeShallow(e.joints[n]));return e.inverseBindMatrices!==void 0?r.push(this.getDependency("accessor",e.inverseBindMatrices)):r.push(null),Promise.all(r).then(function(n){const s=n.pop(),i=n,a=[],o=[];for(let c=0,d=i.length;c<d;c++){const l=i[c];if(l){a.push(l);const f=new u.Matrix4;s!==null&&f.fromArray(s.array,c*16),o.push(f)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new u.Skeleton(a,o)})}loadAnimation(t){const e=this.json,r=this,n=e.animations[t],s=n.name?n.name:"animation_"+t,i=[],a=[],o=[],c=[],d=[];for(let l=0,f=n.channels.length;l<f;l++){const p=n.channels[l],m=n.samplers[p.sampler],R=p.target,g=R.node,T=n.parameters!==void 0?n.parameters[m.input]:m.input,E=n.parameters!==void 0?n.parameters[m.output]:m.output;R.node!==void 0&&(i.push(this.getDependency("node",g)),a.push(this.getDependency("accessor",T)),o.push(this.getDependency("accessor",E)),c.push(m),d.push(R))}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(d)]).then(function(l){const f=l[0],p=l[1],m=l[2],R=l[3],g=l[4],T=[];for(let E=0,M=f.length;E<M;E++){const x=f[E],w=p[E],I=m[E],_=R[E],k=g[E];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const C=r._createAnimationTracks(x,w,I,_,k);if(C)for(let j=0;j<C.length;j++)T.push(C[j])}return new u.AnimationClip(s,void 0,T)})}createNodeMesh(t){const e=this.json,r=this,n=e.nodes[t];return n.mesh===void 0?null:r.getDependency("mesh",n.mesh).then(function(s){const i=r._getNodeRef(r.meshCache,n.mesh,s);return n.weights!==void 0&&i.traverse(function(a){if(a.isMesh)for(let o=0,c=n.weights.length;o<c;o++)a.morphTargetInfluences[o]=n.weights[o]}),i})}loadNode(t){const e=this.json,r=this,n=e.nodes[t],s=r._loadNodeShallow(t),i=[],a=n.children||[];for(let c=0,d=a.length;c<d;c++)i.push(r.getDependency("node",a[c]));const o=n.skin===void 0?Promise.resolve(null):r.getDependency("skin",n.skin);return Promise.all([s,Promise.all(i),o]).then(function(c){const d=c[0],l=c[1],f=c[2];f!==null&&d.traverse(function(p){p.isSkinnedMesh&&p.bind(f,Ge)});for(let p=0,m=l.length;p<m;p++)d.add(l[p]);return d})}_loadNodeShallow(t){const e=this.json,r=this.extensions,n=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];const s=e.nodes[t],i=s.name?n.createUniqueName(s.name):"",a=[],o=n._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(t)});return o&&a.push(o),s.camera!==void 0&&a.push(n.getDependency("camera",s.camera).then(function(c){return n._getNodeRef(n.cameraCache,s.camera,c)})),n._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(t)}).forEach(function(c){a.push(c)}),this.nodeCache[t]=Promise.all(a).then(function(c){let d;if(s.isBone===!0?d=new u.Bone:c.length>1?d=new u.Group:c.length===1?d=c[0]:d=new u.Object3D,d!==c[0])for(let l=0,f=c.length;l<f;l++)d.add(c[l]);if(s.name&&(d.userData.name=s.name,d.name=i),N(d,s),s.extensions&&D(r,d,s),s.matrix!==void 0){const l=new u.Matrix4;l.fromArray(s.matrix),d.applyMatrix4(l)}else s.translation!==void 0&&d.position.fromArray(s.translation),s.rotation!==void 0&&d.quaternion.fromArray(s.rotation),s.scale!==void 0&&d.scale.fromArray(s.scale);return n.associations.has(d)||n.associations.set(d,{}),n.associations.get(d).nodes=t,d}),this.nodeCache[t]}loadScene(t){const e=this.extensions,r=this.json.scenes[t],n=this,s=new u.Group;r.name&&(s.name=n.createUniqueName(r.name)),N(s,r),r.extensions&&D(e,s,r);const i=r.nodes||[],a=[];for(let o=0,c=i.length;o<c;o++)a.push(n.getDependency("node",i[o]));return Promise.all(a).then(function(o){for(let d=0,l=o.length;d<l;d++)s.add(o[d]);const c=d=>{const l=new Map;for(const[f,p]of n.associations)(f instanceof u.Material||f instanceof u.Texture)&&l.set(f,p);return d.traverse(f=>{const p=n.associations.get(f);p!=null&&l.set(f,p)}),l};return n.associations=c(s),s})}_createAnimationTracks(t,e,r,n,s){const i=[],a=t.name?t.name:t.uuid,o=[];O[s.path]===O.weights?t.traverse(function(f){f.morphTargetInfluences&&o.push(f.name?f.name:f.uuid)}):o.push(a);let c;switch(O[s.path]){case O.weights:c=u.NumberKeyframeTrack;break;case O.rotation:c=u.QuaternionKeyframeTrack;break;case O.position:case O.scale:c=u.VectorKeyframeTrack;break;default:switch(r.itemSize){case 1:c=u.NumberKeyframeTrack;break;case 2:case 3:default:c=u.VectorKeyframeTrack;break}break}const d=n.interpolation!==void 0?Ie[n.interpolation]:u.InterpolateLinear,l=this._getArrayFromAccessor(r);for(let f=0,p=o.length;f<p;f++){const m=new c(o[f]+"."+O[s.path],e.array,l,d);n.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(m),i.push(m)}return i}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const r=W(e.constructor),n=new Float32Array(e.length);for(let s=0,i=e.length;s<i;s++)n[s]=e[s]*r;e=n}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(r){const n=this instanceof u.QuaternionKeyframeTrack?Ne:se;return new n(this.times,this.values,this.getValueSize()/3,r)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Be(h,t,e){const r=t.attributes,n=new u.Box3;if(r.POSITION!==void 0){const a=e.json.accessors[r.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(n.set(new u.Vector3(o[0],o[1],o[2]),new u.Vector3(c[0],c[1],c[2])),a.normalized){const d=W(G[a.componentType]);n.min.multiplyScalar(d),n.max.multiplyScalar(d)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=t.targets;if(s!==void 0){const a=new u.Vector3,o=new u.Vector3;for(let c=0,d=s.length;c<d;c++){const l=s[c];if(l.POSITION!==void 0){const f=e.json.accessors[l.POSITION],p=f.min,m=f.max;if(p!==void 0&&m!==void 0){if(o.setX(Math.max(Math.abs(p[0]),Math.abs(m[0]))),o.setY(Math.max(Math.abs(p[1]),Math.abs(m[1]))),o.setZ(Math.max(Math.abs(p[2]),Math.abs(m[2]))),f.normalized){const R=W(G[f.componentType]);o.multiplyScalar(R)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}n.expandByVector(a)}h.boundingBox=n;const i=new u.Sphere;n.getCenter(i.center),i.radius=n.min.distanceTo(n.max)/2,h.boundingSphere=i}function te(h,t,e){const r=t.attributes,n=[];function s(i,a){return e.getDependency("accessor",i).then(function(o){h.setAttribute(a,o)})}for(const i in r){const a=q[i]||i.toLowerCase();a in h.attributes||n.push(s(r[i],a))}if(t.indices!==void 0&&!h.index){const i=e.getDependency("accessor",t.indices).then(function(a){h.setIndex(a)});n.push(i)}return u.ColorManagement.workingColorSpace!==u.LinearSRGBColorSpace&&"COLOR_0"in r&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${u.ColorManagement.workingColorSpace}" not supported.`),N(h,t),Be(h,t,e),Promise.all(n).then(function(){return t.targets!==void 0?Oe(h,t.targets,e):h})}var F;class He{constructor(){B(this,F,new re)}get gltfLoader(){return y(this,F)}setLoaders(t){if(t!=null&&t.draco&&b.dracoLoader){const e=typeof t.draco=="boolean"?`${L.en3.CDNVersion}/examples/jsm/libs/draco/gltf/`:t.draco;b.dracoLoader.setDecoderPath(e),y(this,F).setDRACOLoader(b.dracoLoader)}if(t!=null&&t.ktx2&&b.ktx2Loader){const e=typeof t.ktx2=="boolean"?`${L.en3.CDNVersion}/examples/jsm/libs/basis/`:t.ktx2;b.ktx2Loader.setTranscoderPath(e),y(this,F).setKTX2Loader(b.ktx2Loader.detectSupport(L.en3.webglRenderer))}t!=null&&t.meshopt&&b.meshoptDecoder&&y(this,F).setMeshoptDecoder(b.meshoptDecoder)}load(...t){const[e,r,...n]=t;if(L.en3.cacheAssets&&L.en3Cache.has(e)){const s=L.en3Cache.get(e).data;r(s)}else this.gltfLoader.load(e,s=>{L.en3.cacheAssets&&L.en3Cache.set(e,{data:s,dispose:()=>{s.cameras.forEach(i=>L.dispose(i)),s.scenes.forEach(i=>{L.dispose(i)})}}),r(s)},...n)}}F=new WeakMap;var P,U,v;class Ue{constructor(){B(this,P,new u.TextureLoader);B(this,U,void 0);B(this,v,void 0);K(this,U,y(this,P).load.bind(y(this,P))),K(this,v,y(this,P).loadAsync.bind(y(this,P)))}load(...t){const[e,r,...n]=t;if(L.en3.cacheAssets&&L.en3Cache.has(e)){const s=L.en3Cache.get(e);return r==null||r(s.data),s.data}return y(this,U).call(this,e,s=>{L.en3.cacheAssets&&L.en3Cache.set(e,{data:s,dispose:()=>s.dispose()}),r==null||r(s)},...n)}loadSync(...t){return Q(this,null,function*(){const[e,...r]=t;if(L.en3.cacheAssets&&L.en3Cache.has(e))return L.en3Cache.get(e).data;const n=yield y(this,v).call(this,e,...r);return L.en3.cacheAssets&&L.en3Cache.set(e,{data:n,dispose:()=>n.dispose()}),n})}}P=new WeakMap,U=new WeakMap,v=new WeakMap;const b={gltfLoader:null,textureLoader:null,dracoLoader:null,ktx2Loader:null,meshoptDecoder:null};exports.En3GLTFLoader=He;exports.En3TextureLoader=Ue;exports.loaders=b;
@@ -1,3 +0,0 @@
1
- export { En3GLTFLoader } from './En3GLTFLoader';
2
- export { En3TextureLoader } from './En3TextureLoader';
3
- export { loaders } from './loaders';
@@ -1,13 +0,0 @@
1
- import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
2
- import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader.js';
3
- import { MeshoptDecoder } from '../libs/MeshoptDecoder';
4
- import { En3GLTFLoader } from './En3GLTFLoader';
5
- import { En3TextureLoader } from './En3TextureLoader';
6
-
7
- export declare const loaders: {
8
- gltfLoader: En3GLTFLoader;
9
- textureLoader: En3TextureLoader;
10
- dracoLoader: DRACOLoader;
11
- ktx2Loader: KTX2Loader;
12
- meshoptDecoder: ReturnType<typeof MeshoptDecoder>;
13
- };
@@ -1,33 +0,0 @@
1
- import { Material } from 'three';
2
-
3
- export type En3VertexChunk = 'begin_vertex' | 'beginnormal_vertex' | 'clipping_planes_pars_vertex' | 'clipping_planes_vertex' | 'color_pars_vertex' | 'color_vertex' | 'default_vertex' | 'defaultnormal_vertex' | 'displacementmap_pars_vertex' | 'displacementmap_vertex' | 'envmap_pars_vertex' | 'envmap_vertex' | 'fog_pars_vertex' | 'fog_vertex' | 'lights_pars_begin' | 'logdepthbuf_pars_vertex' | 'logdepthbuf_vertex' | 'morphcolor_vertex' | 'morphnormal_vertex' | 'morphtarget_pars_vertex' | 'morphtarget_vertex' | 'normal_pars_vertex' | 'normal_vertex' | 'project_vertex' | 'shadowmap_pars_vertex' | 'shadowmap_vertex' | 'skinbase_vertex' | 'skinning_pars_vertex' | 'skinning_vertex' | 'skinnormal_vertex' | 'uv_pars_vertex' | 'uv_vertex' | 'worldpos_vertex';
4
- export type En3FragmentChunk = 'alphahash_fragment' | 'alphahash_pars_fragment' | 'alphamap_fragment' | 'alphamap_pars_fragment' | 'alphatest_fragment' | 'alphatest_pars_fragment' | 'aomap_fragment' | 'aomap_pars_fragment' | 'bumpmap_pars_fragment' | 'clearcoat_normal_fragment_begin' | 'clearcoat_normal_fragment_maps' | 'clearcoat_pars_fragment' | 'clipping_planes_fragment' | 'clipping_planes_pars_fragment' | 'color_fragment' | 'color_pars_fragment' | 'colorspace_fragment' | 'colorspace_pars_fragment' | 'cube_uv_reflection_fragment' | 'default_fragment' | 'dithering_fragment' | 'dithering_pars_fragment' | 'emissivemap_fragment' | 'emissivemap_pars_fragment' | 'envmap_common_pars_fragment' | 'envmap_fragment' | 'envmap_pars_fragment' | 'envmap_physical_pars_fragment' | 'fog_fragment' | 'fog_pars_fragment' | 'gradientmap_pars_fragment' | 'iridescence_fragment' | 'iridescence_pars_fragment' | 'lightmap_fragment' | 'lightmap_pars_fragment' | 'lights_fragment_begin' | 'lights_fragment_end' | 'lights_fragment_maps' | 'lights_lambert_fragment' | 'lights_lambert_pars_fragment' | 'lights_phong_fragment' | 'lights_phong_pars_fragment' | 'lights_physical_fragment' | 'lights_physical_pars_fragment' | 'lights_toon_fragment' | 'lights_toon_pars_fragment' | 'logdepthbuf_fragment' | 'logdepthbuf_pars_fragment' | 'map_fragment' | 'map_pars_fragment' | 'map_particle_fragment' | 'map_particle_pars_fragment' | 'metalnessmap_fragment' | 'metalnessmap_pars_fragment' | 'normal_fragment_begin' | 'normal_fragment_maps' | 'normal_pars_fragment' | 'normalmap_pars_fragment' | 'opaque_fragment' | 'premultiplied_alpha_fragment' | 'roughnessmap_fragment' | 'roughnessmap_pars_fragment' | 'shadowmap_pars_fragment' | 'shadowmask_pars_fragment' | 'specularmap_fragment' | 'specularmap_pars_fragment' | 'tonemapping_fragment' | 'tonemapping_pars_fragment' | 'transmission_fragment' | 'transmission_pars_fragment' | 'uv_pars_fragment';
5
- export type En3ModifiedMaterialUniforms = {
6
- [key: string]: {
7
- value: any;
8
- };
9
- };
10
- export interface En3ModifiedMaterialParameters<TMaterial extends Material, Uniforms extends En3ModifiedMaterialUniforms = {}> {
11
- material: TMaterial;
12
- uniforms?: Uniforms;
13
- vertextDeclarations?: string;
14
- fragmentDeclarations?: string;
15
- vertexChunk?: {
16
- update?: En3VertexChunk;
17
- replace?: En3VertexChunk;
18
- content: string;
19
- };
20
- fragmentChunk?: {
21
- update?: En3FragmentChunk;
22
- replace?: En3FragmentChunk;
23
- content: string;
24
- };
25
- log?: boolean;
26
- onReady?: (modifiedMaterial: En3ModifiedMaterial<TMaterial, Uniforms>) => Function | void;
27
- }
28
- export declare class En3ModifiedMaterial<TMaterial extends Material, Uniforms extends En3ModifiedMaterialUniforms = {}> {
29
- #private;
30
- constructor(parameters: En3ModifiedMaterialParameters<TMaterial, Uniforms>);
31
- get material(): TMaterial;
32
- get uniforms(): Uniforms;
33
- }
@@ -1,32 +0,0 @@
1
- import { SourceManagerParameters, SourceManager } from '../../source';
2
- import { Store } from '../../store';
3
- import { EventDispatcher, Loader } from 'three';
4
-
5
- export interface En3SourceManagerLoader<T> {
6
- load: Loader<T>['load'];
7
- }
8
- export interface En3SourceManagerFullParameters<T> extends SourceManagerParameters {
9
- keepSourceParameters?: boolean;
10
- loader: En3SourceManagerLoader<T>;
11
- lazy?: boolean;
12
- consumer: EventDispatcher;
13
- }
14
- export type En3SourceManagerParameters<T> = Omit<En3SourceManagerFullParameters<T>, 'loader' | 'element' | 'consumer'>;
15
- export type En3SourceManagerLoadingState = 'start' | 'complete' | 'error' | undefined;
16
- export declare class En3SourceManager<T> extends SourceManager {
17
- #private;
18
- constructor(parameters: En3SourceManagerFullParameters<T>);
19
- /**
20
- * Resource store.
21
- */
22
- get data(): Store<T | null | undefined, keyof import('../../store').StoreManagers>;
23
- /**
24
- * Loading store.
25
- */
26
- get loading(): Store<En3SourceManagerLoadingState, keyof import('../../store').StoreManagers>;
27
- /**
28
- * Calling this method will start loading the resource.
29
- */
30
- lazyLoad(): void;
31
- processData?(data: T): T;
32
- }
@@ -1,10 +0,0 @@
1
- "use strict";var D=(o,e,t)=>{if(!e.has(o))throw TypeError("Cannot "+t)};var i=(o,e,t)=>(D(o,e,"read from private field"),t?t.call(o):e.get(o)),s=(o,e,t)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,t)},c=(o,e,t,r)=>(D(o,e,"write to private field"),r?r.call(o,t):e.set(o,t),t);var L=(o,e,t)=>(D(o,e,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("../../loading/index.cjs"),y=require("../../SourceManager-D6D2LVKf.cjs"),b=require("../../Store-Cr3VaD9G.cjs");var u,l,v,k;class z{constructor(e){s(this,v);s(this,u,void 0);s(this,l,void 0);c(this,u,e.material),c(this,l,e.uniforms||{}),i(this,u).userData.uniforms=i(this,l);let t;const r=()=>{t==null||t()};i(this,u).addEventListener("dispose",r),i(this,u).onBeforeCompile=n=>{var d;t==null||t();for(const R in i(this,l))n.uniforms[R]=i(this,l)[R];e.vertextDeclarations&&(n.vertexShader=`
2
- ${e.vertextDeclarations}
3
- ${n.vertexShader}
4
- `),e.fragmentDeclarations&&(n.fragmentShader=`
5
- ${e.fragmentDeclarations}
6
- ${n.fragmentShader}
7
- `),L(this,v,k).call(this,n,"vertex",e),L(this,v,k).call(this,n,"fragment",e),t=(d=e.onReady)==null?void 0:d.call(e,this),e.log&&(console.log("VERTEX SHADER: ",n.vertexShader),console.log("FRAGMENT SHADER: ",n.fragmentShader))}}get material(){return i(this,u)}get uniforms(){return i(this,l)}}u=new WeakMap,l=new WeakMap,v=new WeakSet,k=function(e,t,r){const n=t==="vertex"?"vertexChunk":"fragmentChunk",d=t==="vertex"?"vertexShader":"fragmentShader";r[n]&&(r[n].replace?e[d]=e[d].replace(`#include <${r[n].replace}>`,r[n].content):r[n].update&&(e[d]=e[d].replace(`#include <${r[n].update}>`,`
8
- #include <${r[n].update}>
9
- ${r[n].content}
10
- `)))};var f,a,g,x,E,h,S,M;class T extends y.SourceManager{constructor(t){super(t);s(this,f,new b.Store(null));s(this,a,new b.Store(void 0));s(this,g,void 0);s(this,x,void 0);s(this,E,void 0);s(this,h,void 0);s(this,S,!1);s(this,M,()=>{if(!(i(this,h)&&!i(this,S))&&(this.current!==this.previous&&(i(this,f).current=null),this.current)){const t=i(this,E)?this.current.url:this.current.name+this.current.extension;i(this,h)||$.loading.setTotal(t,1),i(this,a).current="start",i(this,x).load(t,r=>{var n;i(this,f).current=((n=this.processData)==null?void 0:n.call(this,r))||r,i(this,a).current="complete",i(this,h)||$.loading.setLoaded(t,1)},void 0,()=>{i(this,h)||(i(this,a).current="error",$.loading.setError(t,t))})}});c(this,g,t.consumer),c(this,x,t.loader),c(this,E,t.keepSourceParameters||!1),c(this,h,t.lazy||!1),this.subscribe(i(this,M)),i(this,g).addEventListener("added",()=>{this.connect()}),i(this,g).addEventListener("removed",()=>{this.disconnect()})}get data(){return i(this,f)}get loading(){return i(this,a)}lazyLoad(){i(this,S)||(c(this,S,!0),i(this,M).call(this))}}f=new WeakMap,a=new WeakMap,g=new WeakMap,x=new WeakMap,E=new WeakMap,h=new WeakMap,S=new WeakMap,M=new WeakMap;exports.En3ModifiedMaterial=z;exports.En3SourceManager=T;
@@ -1,2 +0,0 @@
1
- export { En3ModifiedMaterial, type En3ModifiedMaterialParameters, type En3ModifiedMaterialUniforms, type En3FragmentChunk, type En3VertexChunk, } from './En3ModifiedMaterial';
2
- export { En3SourceManager, type En3SourceManagerLoader, type En3SourceManagerFullParameters, type En3SourceManagerParameters, type En3SourceManagerLoadingState, } from './En3SourceManager';
@@ -1,15 +0,0 @@
1
- import { LayoutBox } from '../../layout-box';
2
- import { ElementOrSelector } from '../../utils';
3
- import { Plane } from 'three';
4
-
5
- export interface En3ClipOptions {
6
- viewName?: string;
7
- scale?: number;
8
- }
9
- export declare class En3Clip {
10
- #private;
11
- constructor(elementOrSelector: ElementOrSelector<HTMLElement>, options?: En3ClipOptions);
12
- get planes(): Plane[];
13
- get layoutBox(): LayoutBox;
14
- destroy(): void;
15
- }
@@ -1,6 +0,0 @@
1
- import { Group } from 'three';
2
- import { En3Clip } from './En3Clip';
3
-
4
- export declare class En3ClipHelpers extends Group {
5
- constructor(clip: En3Clip, size?: number);
6
- }
@@ -1,11 +0,0 @@
1
- import { Group } from 'three';
2
- import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
3
- import { En3SourceManager, En3SourceManagerParameters } from '../misc/En3SourceManager';
4
- import { En3SourceConsumer } from './En3SourceConsumer';
5
-
6
- export declare class En3GLTF extends Group implements En3SourceConsumer<GLTF> {
7
- #private;
8
- constructor(parameters: En3SourceManagerParameters<GLTF>);
9
- get sourceManager(): En3SourceManager<GLTF>;
10
- destroy(): void;
11
- }
@@ -1,8 +0,0 @@
1
- import { Texture } from 'three';
2
- import { En3ImageLike, En3ImageLikeMaterial, En3ImageLikeParameters } from './En3ImageLike';
3
-
4
- export interface En3ImageParameters<TMaterial extends En3ImageLikeMaterial<Texture>> extends Omit<En3ImageLikeParameters<Texture, TMaterial>, 'loader'> {
5
- }
6
- export declare class En3Image<TMaterial extends En3ImageLikeMaterial<Texture>> extends En3ImageLike<Texture, TMaterial> {
7
- constructor(parameters: En3ImageParameters<TMaterial>);
8
- }
@@ -1,25 +0,0 @@
1
- import { BufferGeometry, Material, Mesh, Texture } from 'three';
2
- import { En3SourceManager, En3SourceManagerLoader, En3SourceManagerParameters } from '../misc/En3SourceManager';
3
- import { En3SourceConsumer } from './En3SourceConsumer';
4
-
5
- export type En3ImageLikeMaterial<TTexture extends Texture> = Material & {
6
- map: TTexture | null;
7
- };
8
- export type En3ImageLikeFit = 'cover' | 'contain';
9
- export interface En3ImageLikeParameters<TTexture extends Texture, TMaterial extends En3ImageLikeMaterial<TTexture>> extends En3SourceManagerParameters<TTexture> {
10
- width?: number;
11
- height?: number;
12
- round?: number;
13
- segments?: number;
14
- material?: TMaterial;
15
- fit?: En3ImageLikeFit;
16
- loader: En3SourceManagerLoader<TTexture>;
17
- }
18
- export declare class En3ImageLike<TTexture extends Texture, TMaterial extends En3ImageLikeMaterial<TTexture>> extends Mesh<BufferGeometry, TMaterial> implements En3SourceConsumer<TTexture> {
19
- #private;
20
- constructor(parameters: En3ImageLikeParameters<TTexture, TMaterial>);
21
- get sourceManager(): En3SourceManager<TTexture>;
22
- destroy(): void;
23
- updateTexture(): void;
24
- protected onCoverResize(texture: TTexture): void;
25
- }
@@ -1,5 +0,0 @@
1
- import { En3SourceManager } from '../misc/En3SourceManager';
2
-
3
- export interface En3SourceConsumer<T> {
4
- get sourceManager(): En3SourceManager<T>;
5
- }
@@ -1,13 +0,0 @@
1
- import { VideoTexture } from 'three';
2
- import { En3ImageLike, En3ImageLikeMaterial, En3ImageLikeParameters } from './En3ImageLike';
3
-
4
- export interface En3VideoParameters<TMaterial extends En3ImageLikeMaterial<VideoTexture>> extends Omit<En3ImageLikeParameters<VideoTexture, TMaterial>, 'loader'> {
5
- autoplay?: boolean;
6
- muted?: boolean;
7
- loop?: boolean;
8
- }
9
- export declare class En3Video<TMaterial extends En3ImageLikeMaterial<VideoTexture>> extends En3ImageLike<VideoTexture, TMaterial> {
10
- #private;
11
- constructor(parameters: En3VideoParameters<TMaterial>);
12
- protected onCoverResize(texture: VideoTexture): void;
13
- }
@@ -1,30 +0,0 @@
1
- import { Texture, Vector2, WebGLRenderTarget } from 'three';
2
- import { ShaderPass } from './ShaderPass';
3
-
4
- export interface AdvectionParameters {
5
- cellScale: Vector2;
6
- fboSize: Vector2;
7
- dt: number;
8
- src: WebGLRenderTarget<Texture>;
9
- dst: WebGLRenderTarget<Texture>;
10
- BFECC: boolean;
11
- }
12
- export interface AdvectionUpdateParameters {
13
- dt: number;
14
- isBounce: boolean;
15
- BFECC: boolean;
16
- }
17
- export interface AdvectionUniforms {
18
- boundarySpace: Vector2;
19
- px: Vector2;
20
- fboSize: Vector2;
21
- velocity: Texture;
22
- dt: number;
23
- isBFECC: boolean;
24
- }
25
- export declare class Advection extends ShaderPass<AdvectionUniforms> {
26
- #private;
27
- constructor(parameters: AdvectionParameters);
28
- update(parameters: AdvectionUpdateParameters): void;
29
- protected init(): void;
30
- }
@@ -1,23 +0,0 @@
1
- import { Texture, Vector2, WebGLRenderTarget } from 'three';
2
- import { ShaderPass } from './ShaderPass';
3
-
4
- export interface DivergenceParameters {
5
- boundarySpace: Vector2;
6
- src: WebGLRenderTarget<Texture>;
7
- cellScale: Vector2;
8
- dt: number;
9
- dst: WebGLRenderTarget<Texture>;
10
- }
11
- export interface DivergenceUpdateParameters {
12
- vel: WebGLRenderTarget<Texture>;
13
- }
14
- export interface DivergenceUniforms {
15
- boundarySpace: Vector2;
16
- velocity: Texture;
17
- px: Vector2;
18
- dt: number;
19
- }
20
- export declare class Divergence extends ShaderPass<DivergenceUniforms> {
21
- constructor(parameters: DivergenceParameters);
22
- update(parameters: DivergenceUpdateParameters): void;
23
- }
@@ -1,16 +0,0 @@
1
- import { Mesh, PlaneGeometry, RawShaderMaterial } from 'three';
2
- import { Store } from '../../../store';
3
-
4
- export declare class En3Fluid extends Mesh<PlaneGeometry, RawShaderMaterial> {
5
- #private;
6
- colorTweenDuration: number;
7
- constructor();
8
- get backgroundColor(): Store<string, keyof import('../../../store').StoreManagers>;
9
- get backgroundMixThreshold(): Store<number, keyof import('../../../store').StoreManagers>;
10
- get backgroundOpacity(): Store<number, keyof import('../../../store').StoreManagers>;
11
- get fluidColor(): Store<string, keyof import('../../../store').StoreManagers>;
12
- get fluidOpacity(): Store<number, keyof import('../../../store').StoreManagers>;
13
- resize(): void;
14
- update(): void;
15
- dispose(): void;
16
- }
@@ -1,13 +0,0 @@
1
- import { En3Fluid } from './En3Fluid';
2
-
3
- export declare class En3FluidElement extends HTMLElement {
4
- #private;
5
- get fluid(): En3Fluid;
6
- protected connectedCallback(): void;
7
- protected disconnectedCallback(): void;
8
- }
9
- declare global {
10
- interface HTMLElementTagNameMap {
11
- 'e-fluid': En3FluidElement;
12
- }
13
- }