@splinetool/runtime 2.0.143 → 2.0.145

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 (315) hide show
  1. package/build/hana-ui.wasm +0 -0
  2. package/build/hana-ui.wasm.br +0 -0
  3. package/build/hana-ui.wasm.gz +0 -0
  4. package/build/{runtime-bloom-T6RWPSPU.js → runtime-bloom-MEUWNAT3.js} +1 -1
  5. package/build/runtime-bloom-MEUWNAT3.js.br +0 -0
  6. package/build/runtime-bloom-MEUWNAT3.js.gz +0 -0
  7. package/build/{runtime-brightnessContrast-MHCHRQEP.js → runtime-brightnessContrast-DKQWZ7GO.js} +1 -1
  8. package/build/runtime-brightnessContrast-DKQWZ7GO.js.br +0 -0
  9. package/build/runtime-brightnessContrast-DKQWZ7GO.js.gz +0 -0
  10. package/build/{runtime-chromaticAberration-OHY4FH6T.js → runtime-chromaticAberration-YZPQ5IZB.js} +1 -1
  11. package/build/runtime-chromaticAberration-YZPQ5IZB.js.br +0 -0
  12. package/build/runtime-chromaticAberration-YZPQ5IZB.js.gz +0 -0
  13. package/build/{runtime-chunk-XWKETWBF.js → runtime-chunk-2PAN34JQ.js} +1 -1
  14. package/build/runtime-chunk-2PAN34JQ.js.br +0 -0
  15. package/build/runtime-chunk-2PAN34JQ.js.gz +0 -0
  16. package/build/{runtime-chunk-F3PDF6RK.js → runtime-chunk-3L4JD5E6.js} +1 -1
  17. package/build/runtime-chunk-3L4JD5E6.js.br +0 -0
  18. package/build/runtime-chunk-3L4JD5E6.js.gz +0 -0
  19. package/build/{runtime-chunk-VZ7YOXNV.js → runtime-chunk-5EFJSVOC.js} +1 -1
  20. package/build/runtime-chunk-5EFJSVOC.js.br +0 -0
  21. package/build/runtime-chunk-5EFJSVOC.js.gz +0 -0
  22. package/build/{runtime-chunk-SNIOTNWP.js → runtime-chunk-5YZGNI6C.js} +1 -1
  23. package/build/runtime-chunk-5YZGNI6C.js.br +0 -0
  24. package/build/runtime-chunk-5YZGNI6C.js.gz +0 -0
  25. package/build/{runtime-chunk-SCUHCKBQ.js → runtime-chunk-6ZOKRQ5I.js} +1 -1
  26. package/build/runtime-chunk-6ZOKRQ5I.js.br +0 -0
  27. package/build/runtime-chunk-6ZOKRQ5I.js.gz +0 -0
  28. package/build/{runtime-chunk-6B2UWQ4D.js → runtime-chunk-AKYP5JEN.js} +1 -1
  29. package/build/runtime-chunk-AKYP5JEN.js.br +0 -0
  30. package/build/runtime-chunk-AKYP5JEN.js.gz +0 -0
  31. package/build/{runtime-chunk-XQPW7B3Q.js → runtime-chunk-BJ5IQCCZ.js} +1 -1
  32. package/build/runtime-chunk-BJ5IQCCZ.js.br +0 -0
  33. package/build/runtime-chunk-BJ5IQCCZ.js.gz +0 -0
  34. package/build/{runtime-chunk-RHMAJWT3.js → runtime-chunk-CAGVVNWP.js} +1 -1
  35. package/build/{runtime-chunk-RHMAJWT3.js.br → runtime-chunk-CAGVVNWP.js.br} +0 -0
  36. package/build/runtime-chunk-CAGVVNWP.js.gz +0 -0
  37. package/build/{runtime-chunk-2AQPZETK.js → runtime-chunk-CH7Z24JU.js} +1 -1
  38. package/build/runtime-chunk-CH7Z24JU.js.br +0 -0
  39. package/build/runtime-chunk-CH7Z24JU.js.gz +0 -0
  40. package/build/{runtime-chunk-YB3HDIEO.js → runtime-chunk-CLRSDA3P.js} +1 -1
  41. package/build/runtime-chunk-CLRSDA3P.js.br +0 -0
  42. package/build/runtime-chunk-CLRSDA3P.js.gz +0 -0
  43. package/build/{runtime-chunk-NUFM4HH4.js → runtime-chunk-D4ANJ5CJ.js} +1 -1
  44. package/build/runtime-chunk-D4ANJ5CJ.js.br +0 -0
  45. package/build/runtime-chunk-D4ANJ5CJ.js.gz +0 -0
  46. package/build/{runtime-chunk-BEE2MMD4.js → runtime-chunk-DMVJUUN6.js} +1 -1
  47. package/build/runtime-chunk-DMVJUUN6.js.br +0 -0
  48. package/build/runtime-chunk-DMVJUUN6.js.gz +0 -0
  49. package/build/{runtime-chunk-GBBHID5M.js → runtime-chunk-DN4GIGTV.js} +1 -1
  50. package/build/{runtime-chunk-GBBHID5M.js.br → runtime-chunk-DN4GIGTV.js.br} +0 -0
  51. package/build/{runtime-chunk-GBBHID5M.js.gz → runtime-chunk-DN4GIGTV.js.gz} +0 -0
  52. package/build/{runtime-chunk-2MUZCQGA.js → runtime-chunk-DQCKLN4F.js} +1 -1
  53. package/build/runtime-chunk-DQCKLN4F.js.br +0 -0
  54. package/build/runtime-chunk-DQCKLN4F.js.gz +0 -0
  55. package/build/{runtime-chunk-Z663Y2SV.js → runtime-chunk-HKGKIRH3.js} +1 -1
  56. package/build/runtime-chunk-HKGKIRH3.js.br +0 -0
  57. package/build/runtime-chunk-HKGKIRH3.js.gz +0 -0
  58. package/build/{runtime-chunk-7LGV7X4B.js → runtime-chunk-HOZ6PVQQ.js} +1 -1
  59. package/build/runtime-chunk-HOZ6PVQQ.js.br +0 -0
  60. package/build/runtime-chunk-HOZ6PVQQ.js.gz +0 -0
  61. package/build/{runtime-chunk-F5QSKCP3.js → runtime-chunk-IQ4XKFQV.js} +1 -1
  62. package/build/runtime-chunk-IQ4XKFQV.js.br +0 -0
  63. package/build/runtime-chunk-IQ4XKFQV.js.gz +0 -0
  64. package/build/{runtime-chunk-IUQ7L3KJ.js → runtime-chunk-JEWYXMKG.js} +1 -1
  65. package/build/runtime-chunk-JEWYXMKG.js.br +0 -0
  66. package/build/runtime-chunk-JEWYXMKG.js.gz +0 -0
  67. package/build/{runtime-chunk-Q2Z3OZSL.js → runtime-chunk-KCSYARGB.js} +1 -1
  68. package/build/runtime-chunk-KCSYARGB.js.br +0 -0
  69. package/build/runtime-chunk-KCSYARGB.js.gz +0 -0
  70. package/build/{runtime-chunk-HLWLFBYC.js → runtime-chunk-KEUVFVFD.js} +1 -1
  71. package/build/runtime-chunk-KEUVFVFD.js.br +0 -0
  72. package/build/runtime-chunk-KEUVFVFD.js.gz +0 -0
  73. package/build/{runtime-chunk-DDVCZXKV.js → runtime-chunk-NK2FTTRP.js} +1 -1
  74. package/build/runtime-chunk-NK2FTTRP.js.br +0 -0
  75. package/build/runtime-chunk-NK2FTTRP.js.gz +0 -0
  76. package/build/{runtime-chunk-EFTKHHIG.js → runtime-chunk-NYCENOW2.js} +1 -1
  77. package/build/runtime-chunk-NYCENOW2.js.br +0 -0
  78. package/build/runtime-chunk-NYCENOW2.js.gz +0 -0
  79. package/build/{runtime-chunk-RX5EGOAX.js → runtime-chunk-P4DZASDE.js} +1 -1
  80. package/build/runtime-chunk-P4DZASDE.js.br +0 -0
  81. package/build/runtime-chunk-P4DZASDE.js.gz +0 -0
  82. package/build/{runtime-chunk-N6N77OYG.js → runtime-chunk-PZ5YPY3O.js} +1 -1
  83. package/build/runtime-chunk-PZ5YPY3O.js.br +0 -0
  84. package/build/runtime-chunk-PZ5YPY3O.js.gz +0 -0
  85. package/build/{runtime-chunk-S7BTYWDZ.js → runtime-chunk-SAK5DTXS.js} +1 -1
  86. package/build/{runtime-chunk-S7BTYWDZ.js.br → runtime-chunk-SAK5DTXS.js.br} +0 -0
  87. package/build/runtime-chunk-SAK5DTXS.js.gz +0 -0
  88. package/build/{runtime-chunk-EDRNW5PU.js → runtime-chunk-USKED3IJ.js} +1 -1
  89. package/build/runtime-chunk-USKED3IJ.js.br +0 -0
  90. package/build/runtime-chunk-USKED3IJ.js.gz +0 -0
  91. package/build/{runtime-chunk-M7T6ZDUK.js → runtime-chunk-YOVX3VWE.js} +1 -1
  92. package/build/runtime-chunk-YOVX3VWE.js.br +0 -0
  93. package/build/runtime-chunk-YOVX3VWE.js.gz +0 -0
  94. package/build/{runtime-classicRuntime-TMJEEFWG.js → runtime-classicRuntime-MM4O2YJ3.js} +1 -1
  95. package/build/runtime-classicRuntime-MM4O2YJ3.js.br +0 -0
  96. package/build/runtime-classicRuntime-MM4O2YJ3.js.gz +0 -0
  97. package/build/{runtime-cloners-EDSVTV5D.js → runtime-cloners-IE4246S3.js} +1 -1
  98. package/build/runtime-cloners-IE4246S3.js.br +0 -0
  99. package/build/runtime-cloners-IE4246S3.js.gz +0 -0
  100. package/build/{runtime-components-JDXKZ6OL.js → runtime-components-72GYUBVF.js} +1 -1
  101. package/build/runtime-components-72GYUBVF.js.br +0 -0
  102. package/build/runtime-components-72GYUBVF.js.gz +0 -0
  103. package/build/{runtime-createDestroy-M53Z2YQM.js → runtime-createDestroy-ALPJ6MWA.js} +1 -1
  104. package/build/runtime-createDestroy-ALPJ6MWA.js.br +0 -0
  105. package/build/runtime-createDestroy-ALPJ6MWA.js.gz +0 -0
  106. package/build/{runtime-depthOfField-P54PBXDB.js → runtime-depthOfField-FTEYRYLA.js} +1 -1
  107. package/build/runtime-depthOfField-FTEYRYLA.js.br +0 -0
  108. package/build/runtime-depthOfField-FTEYRYLA.js.gz +0 -0
  109. package/build/{runtime-dragDrop-LCSXJHDJ.js → runtime-dragDrop-STJNXRHF.js} +1 -1
  110. package/build/runtime-dragDrop-STJNXRHF.js.br +0 -0
  111. package/build/runtime-dragDrop-STJNXRHF.js.gz +0 -0
  112. package/build/{runtime-gameControls-TXONUJG4.js → runtime-gameControls-V73OTQU7.js} +1 -1
  113. package/build/runtime-gameControls-V73OTQU7.js.br +0 -0
  114. package/build/runtime-gameControls-V73OTQU7.js.gz +0 -0
  115. package/build/{runtime-hair-VBVTDNZS.js → runtime-hair-YGMETWSU.js} +1 -1
  116. package/build/runtime-hair-YGMETWSU.js.br +2 -0
  117. package/build/runtime-hair-YGMETWSU.js.gz +0 -0
  118. package/build/{runtime-hueSaturation-GF2KMTRH.js → runtime-hueSaturation-LEE4JN6G.js} +1 -1
  119. package/build/runtime-hueSaturation-LEE4JN6G.js.br +0 -0
  120. package/build/runtime-hueSaturation-LEE4JN6G.js.gz +0 -0
  121. package/build/{runtime-mergeStaticGeometries-YX6WTYLY.js → runtime-mergeStaticGeometries-RDAVZPUF.js} +1 -1
  122. package/build/runtime-mergeStaticGeometries-RDAVZPUF.js.br +0 -0
  123. package/build/runtime-mergeStaticGeometries-RDAVZPUF.js.gz +0 -0
  124. package/build/{runtime-miscActions-HL65SIBN.js → runtime-miscActions-PVB2GF7V.js} +1 -1
  125. package/build/runtime-miscActions-PVB2GF7V.js.br +0 -0
  126. package/build/runtime-miscActions-PVB2GF7V.js.gz +0 -0
  127. package/build/{runtime-mouseHover-DED6MLOI.js → runtime-mouseHover-4RGQMVPP.js} +1 -1
  128. package/build/runtime-mouseHover-4RGQMVPP.js.br +0 -0
  129. package/build/runtime-mouseHover-4RGQMVPP.js.gz +0 -0
  130. package/build/{runtime-noise-ILOIRUTT.js → runtime-noise-62MBR3BZ.js} +1 -1
  131. package/build/runtime-noise-62MBR3BZ.js.br +0 -0
  132. package/build/runtime-noise-62MBR3BZ.js.gz +0 -0
  133. package/build/{runtime-particles-XVEEHTDA.js → runtime-particles-RAPYQRHF.js} +1 -1
  134. package/build/runtime-particles-RAPYQRHF.js.br +0 -0
  135. package/build/runtime-particles-RAPYQRHF.js.gz +0 -0
  136. package/build/{runtime-paths-4JZQYEQW.js → runtime-paths-Z7KN47OU.js} +1 -1
  137. package/build/runtime-paths-Z7KN47OU.js.br +0 -0
  138. package/build/runtime-paths-Z7KN47OU.js.gz +0 -0
  139. package/build/{runtime-pixelation-NKZC6YT5.js → runtime-pixelation-VCRXVX5S.js} +1 -1
  140. package/build/runtime-pixelation-VCRXVX5S.js.br +0 -0
  141. package/build/runtime-pixelation-VCRXVX5S.js.gz +0 -0
  142. package/build/{runtime-resize-674LFKRJ.js → runtime-resize-T3WNDG42.js} +1 -1
  143. package/build/runtime-resize-T3WNDG42.js.br +0 -0
  144. package/build/runtime-resize-T3WNDG42.js.gz +0 -0
  145. package/build/{runtime-sceneTransition-6FEAQ67I.js → runtime-sceneTransition-GI5VOAKN.js} +1 -1
  146. package/build/runtime-sceneTransition-GI5VOAKN.js.br +0 -0
  147. package/build/runtime-sceneTransition-GI5VOAKN.js.gz +0 -0
  148. package/build/{runtime-scroll-MNCYTPF4.js → runtime-scroll-NFWFUP7H.js} +1 -1
  149. package/build/runtime-scroll-NFWFUP7H.js.br +0 -0
  150. package/build/runtime-scroll-NFWFUP7H.js.gz +0 -0
  151. package/build/runtime-shapeBlends-5XD2UT5K.js +1 -0
  152. package/build/runtime-shapeBlends-5XD2UT5K.js.br +0 -0
  153. package/build/runtime-shapeBlends-5XD2UT5K.js.gz +0 -0
  154. package/build/{runtime-text-FYMNL4NY.js → runtime-text-C7IBGBEN.js} +1 -1
  155. package/build/runtime-text-C7IBGBEN.js.br +0 -0
  156. package/build/runtime-text-C7IBGBEN.js.gz +0 -0
  157. package/build/{runtime-textInputs-WTFDNROZ.js → runtime-textInputs-4O76ZV5M.js} +1 -1
  158. package/build/runtime-textInputs-4O76ZV5M.js.br +0 -0
  159. package/build/runtime-textInputs-4O76ZV5M.js.gz +0 -0
  160. package/build/{runtime-timeline-ZZ4EPN3H.js → runtime-timeline-2HPZAYKQ.js} +1 -1
  161. package/build/runtime-timeline-2HPZAYKQ.js.br +0 -0
  162. package/build/runtime-timeline-2HPZAYKQ.js.gz +0 -0
  163. package/build/{runtime-tracking-IUFSHKIY.js → runtime-tracking-7TAR4TWM.js} +1 -1
  164. package/build/runtime-tracking-7TAR4TWM.js.br +0 -0
  165. package/build/runtime-tracking-7TAR4TWM.js.gz +0 -0
  166. package/build/{runtime-transitions-26Z7BD6T.js → runtime-transitions-HEIEQCFH.js} +1 -1
  167. package/build/runtime-transitions-HEIEQCFH.js.br +0 -0
  168. package/build/runtime-transitions-HEIEQCFH.js.gz +0 -0
  169. package/build/{runtime-ui2d-XJI4S6CZ.js → runtime-ui2d-OMYIMTHY.js} +1 -1
  170. package/build/runtime-ui2d-OMYIMTHY.js.br +0 -0
  171. package/build/runtime-ui2d-OMYIMTHY.js.gz +0 -0
  172. package/build/{runtime-vectorShapes-YR3VFNPH.js → runtime-vectorShapes-WL7YDHFL.js} +1 -1
  173. package/build/runtime-vectorShapes-WL7YDHFL.js.br +0 -0
  174. package/build/runtime-vectorShapes-WL7YDHFL.js.gz +0 -0
  175. package/build/{runtime-vignette-Z76LPN72.js → runtime-vignette-YXF7KQCA.js} +1 -1
  176. package/build/runtime-vignette-YXF7KQCA.js.br +0 -0
  177. package/build/runtime-vignette-YXF7KQCA.js.gz +0 -0
  178. package/build/{runtime-webgpu-57GREHU5.js → runtime-webgpu-B4H4UCTV.js} +1 -1
  179. package/build/runtime-webgpu-B4H4UCTV.js.br +0 -0
  180. package/build/runtime-webgpu-B4H4UCTV.js.gz +0 -0
  181. package/build/runtime.cjs +7 -7
  182. package/build/runtime.js +1 -1
  183. package/build/runtime.js.br +0 -0
  184. package/build/runtime.js.gz +0 -0
  185. package/build/runtime.standalone.js +1 -1
  186. package/build/runtime.standalone.js.br +0 -0
  187. package/build/runtime.standalone.js.gz +0 -0
  188. package/build/runtime.standalone.webgl.js +1 -1
  189. package/build/runtime.standalone.webgl.js.br +0 -0
  190. package/build/runtime.standalone.webgl.js.gz +0 -0
  191. package/build/runtime.standalone.webgpu.js +1 -1
  192. package/build/runtime.standalone.webgpu.js.br +0 -0
  193. package/build/runtime.standalone.webgpu.js.gz +0 -0
  194. package/build/runtime.standalone.webgpu.micro.js +1 -1
  195. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  196. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  197. package/build/runtime.standalone.webgpu.min.js +1 -1
  198. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  199. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  200. package/package.json +1 -1
  201. package/build/runtime-bloom-T6RWPSPU.js.br +0 -0
  202. package/build/runtime-bloom-T6RWPSPU.js.gz +0 -0
  203. package/build/runtime-brightnessContrast-MHCHRQEP.js.br +0 -0
  204. package/build/runtime-brightnessContrast-MHCHRQEP.js.gz +0 -0
  205. package/build/runtime-chromaticAberration-OHY4FH6T.js.br +0 -0
  206. package/build/runtime-chromaticAberration-OHY4FH6T.js.gz +0 -0
  207. package/build/runtime-chunk-2AQPZETK.js.br +0 -0
  208. package/build/runtime-chunk-2AQPZETK.js.gz +0 -0
  209. package/build/runtime-chunk-2MUZCQGA.js.br +0 -0
  210. package/build/runtime-chunk-2MUZCQGA.js.gz +0 -0
  211. package/build/runtime-chunk-6B2UWQ4D.js.br +0 -0
  212. package/build/runtime-chunk-6B2UWQ4D.js.gz +0 -0
  213. package/build/runtime-chunk-7LGV7X4B.js.br +0 -0
  214. package/build/runtime-chunk-7LGV7X4B.js.gz +0 -0
  215. package/build/runtime-chunk-BEE2MMD4.js.br +0 -0
  216. package/build/runtime-chunk-BEE2MMD4.js.gz +0 -0
  217. package/build/runtime-chunk-DDVCZXKV.js.br +0 -0
  218. package/build/runtime-chunk-DDVCZXKV.js.gz +0 -0
  219. package/build/runtime-chunk-EDRNW5PU.js.br +0 -0
  220. package/build/runtime-chunk-EDRNW5PU.js.gz +0 -0
  221. package/build/runtime-chunk-EFTKHHIG.js.br +0 -0
  222. package/build/runtime-chunk-EFTKHHIG.js.gz +0 -0
  223. package/build/runtime-chunk-F3PDF6RK.js.br +0 -1
  224. package/build/runtime-chunk-F3PDF6RK.js.gz +0 -0
  225. package/build/runtime-chunk-F5QSKCP3.js.br +0 -2
  226. package/build/runtime-chunk-F5QSKCP3.js.gz +0 -0
  227. package/build/runtime-chunk-HLWLFBYC.js.br +0 -0
  228. package/build/runtime-chunk-HLWLFBYC.js.gz +0 -0
  229. package/build/runtime-chunk-IUQ7L3KJ.js.br +0 -0
  230. package/build/runtime-chunk-IUQ7L3KJ.js.gz +0 -0
  231. package/build/runtime-chunk-M7T6ZDUK.js.br +0 -0
  232. package/build/runtime-chunk-M7T6ZDUK.js.gz +0 -0
  233. package/build/runtime-chunk-N6N77OYG.js.br +0 -0
  234. package/build/runtime-chunk-N6N77OYG.js.gz +0 -0
  235. package/build/runtime-chunk-NUFM4HH4.js.br +0 -0
  236. package/build/runtime-chunk-NUFM4HH4.js.gz +0 -0
  237. package/build/runtime-chunk-Q2Z3OZSL.js.br +0 -0
  238. package/build/runtime-chunk-Q2Z3OZSL.js.gz +0 -0
  239. package/build/runtime-chunk-RHMAJWT3.js.gz +0 -0
  240. package/build/runtime-chunk-RX5EGOAX.js.br +0 -0
  241. package/build/runtime-chunk-RX5EGOAX.js.gz +0 -0
  242. package/build/runtime-chunk-S7BTYWDZ.js.gz +0 -0
  243. package/build/runtime-chunk-SCUHCKBQ.js.br +0 -0
  244. package/build/runtime-chunk-SCUHCKBQ.js.gz +0 -0
  245. package/build/runtime-chunk-SNIOTNWP.js.br +0 -0
  246. package/build/runtime-chunk-SNIOTNWP.js.gz +0 -0
  247. package/build/runtime-chunk-VZ7YOXNV.js.br +0 -0
  248. package/build/runtime-chunk-VZ7YOXNV.js.gz +0 -0
  249. package/build/runtime-chunk-XQPW7B3Q.js.br +0 -0
  250. package/build/runtime-chunk-XQPW7B3Q.js.gz +0 -0
  251. package/build/runtime-chunk-XWKETWBF.js.br +0 -0
  252. package/build/runtime-chunk-XWKETWBF.js.gz +0 -0
  253. package/build/runtime-chunk-YB3HDIEO.js.br +0 -0
  254. package/build/runtime-chunk-YB3HDIEO.js.gz +0 -0
  255. package/build/runtime-chunk-Z663Y2SV.js.br +0 -0
  256. package/build/runtime-chunk-Z663Y2SV.js.gz +0 -0
  257. package/build/runtime-classicRuntime-TMJEEFWG.js.br +0 -0
  258. package/build/runtime-classicRuntime-TMJEEFWG.js.gz +0 -0
  259. package/build/runtime-cloners-EDSVTV5D.js.br +0 -0
  260. package/build/runtime-cloners-EDSVTV5D.js.gz +0 -0
  261. package/build/runtime-components-JDXKZ6OL.js.br +0 -0
  262. package/build/runtime-components-JDXKZ6OL.js.gz +0 -0
  263. package/build/runtime-createDestroy-M53Z2YQM.js.br +0 -0
  264. package/build/runtime-createDestroy-M53Z2YQM.js.gz +0 -0
  265. package/build/runtime-depthOfField-P54PBXDB.js.br +0 -0
  266. package/build/runtime-depthOfField-P54PBXDB.js.gz +0 -0
  267. package/build/runtime-dragDrop-LCSXJHDJ.js.br +0 -0
  268. package/build/runtime-dragDrop-LCSXJHDJ.js.gz +0 -0
  269. package/build/runtime-gameControls-TXONUJG4.js.br +0 -0
  270. package/build/runtime-gameControls-TXONUJG4.js.gz +0 -0
  271. package/build/runtime-hair-VBVTDNZS.js.br +0 -0
  272. package/build/runtime-hair-VBVTDNZS.js.gz +0 -0
  273. package/build/runtime-hueSaturation-GF2KMTRH.js.br +0 -0
  274. package/build/runtime-hueSaturation-GF2KMTRH.js.gz +0 -0
  275. package/build/runtime-mergeStaticGeometries-YX6WTYLY.js.br +0 -0
  276. package/build/runtime-mergeStaticGeometries-YX6WTYLY.js.gz +0 -0
  277. package/build/runtime-miscActions-HL65SIBN.js.br +0 -0
  278. package/build/runtime-miscActions-HL65SIBN.js.gz +0 -0
  279. package/build/runtime-mouseHover-DED6MLOI.js.br +0 -0
  280. package/build/runtime-mouseHover-DED6MLOI.js.gz +0 -0
  281. package/build/runtime-noise-ILOIRUTT.js.br +0 -0
  282. package/build/runtime-noise-ILOIRUTT.js.gz +0 -0
  283. package/build/runtime-particles-XVEEHTDA.js.br +0 -0
  284. package/build/runtime-particles-XVEEHTDA.js.gz +0 -0
  285. package/build/runtime-paths-4JZQYEQW.js.br +0 -0
  286. package/build/runtime-paths-4JZQYEQW.js.gz +0 -0
  287. package/build/runtime-pixelation-NKZC6YT5.js.br +0 -0
  288. package/build/runtime-pixelation-NKZC6YT5.js.gz +0 -0
  289. package/build/runtime-resize-674LFKRJ.js.br +0 -0
  290. package/build/runtime-resize-674LFKRJ.js.gz +0 -0
  291. package/build/runtime-sceneTransition-6FEAQ67I.js.br +0 -0
  292. package/build/runtime-sceneTransition-6FEAQ67I.js.gz +0 -0
  293. package/build/runtime-scroll-MNCYTPF4.js.br +0 -0
  294. package/build/runtime-scroll-MNCYTPF4.js.gz +0 -0
  295. package/build/runtime-shapeBlends-CDHFBAB5.js +0 -1
  296. package/build/runtime-shapeBlends-CDHFBAB5.js.br +0 -0
  297. package/build/runtime-shapeBlends-CDHFBAB5.js.gz +0 -0
  298. package/build/runtime-text-FYMNL4NY.js.br +0 -0
  299. package/build/runtime-text-FYMNL4NY.js.gz +0 -0
  300. package/build/runtime-textInputs-WTFDNROZ.js.br +0 -0
  301. package/build/runtime-textInputs-WTFDNROZ.js.gz +0 -0
  302. package/build/runtime-timeline-ZZ4EPN3H.js.br +0 -0
  303. package/build/runtime-timeline-ZZ4EPN3H.js.gz +0 -0
  304. package/build/runtime-tracking-IUFSHKIY.js.br +0 -0
  305. package/build/runtime-tracking-IUFSHKIY.js.gz +0 -0
  306. package/build/runtime-transitions-26Z7BD6T.js.br +0 -0
  307. package/build/runtime-transitions-26Z7BD6T.js.gz +0 -0
  308. package/build/runtime-ui2d-XJI4S6CZ.js.br +0 -0
  309. package/build/runtime-ui2d-XJI4S6CZ.js.gz +0 -0
  310. package/build/runtime-vectorShapes-YR3VFNPH.js.br +0 -0
  311. package/build/runtime-vectorShapes-YR3VFNPH.js.gz +0 -0
  312. package/build/runtime-vignette-Z76LPN72.js.br +0 -0
  313. package/build/runtime-vignette-Z76LPN72.js.gz +0 -0
  314. package/build/runtime-webgpu-57GREHU5.js.br +0 -0
  315. package/build/runtime-webgpu-57GREHU5.js.gz +0 -0
@@ -1 +1 @@
1
- import{e,g as t,j as r}from"./runtime-chunk-HLWLFBYC.js";import{a,b as n}from"./runtime-chunk-HD7WF3XN.js";import{a as i,e as s,g as o,h as l}from"./runtime-chunk-N6N77OYG.js";import{b as u}from"./runtime-chunk-RX5EGOAX.js";import{Z as d,fa as p,ga as c,i as h,na as f,oa as g}from"./runtime-chunk-6B2UWQ4D.js";import{v as m}from"./runtime-chunk-GBBHID5M.js";import{d as b,e as y}from"./runtime-chunk-RTLL6WIB.js";import{c as v,d as w,e as S}from"./runtime-chunk-2PT2WH66.js";import{A as j,B as A,C as V,G as D,H as E,M as R,N as k,O as M,P as x,Q as O,R as B,Xa as N,Ya as P,da as C,ma as G,qa as I,z as F}from"./runtime-chunk-ADHKZQMB.js";import{Ec as z,Fc as T,Gc as q,Hc as W,Rc as L,Vc as H}from"./runtime-chunk-KPOUV3HD.js";var X=Math.fround,U=class{constructor(e,t,r){this.apply=t,this.onStart=r,this.isPlaying=!1,this.isReversed=!1,this.endTime=0,this.startTime=0,this.isFirstLerpAfterStart=!1,this.config=e,this.duration=P(e.ease,X(e.duration/1e3)),this.delay=X(e.delay/1e3),this.currentRepeat=e.repeat}get repeatDirection(){return this.overrideDirection??this.config.direction}get isPingpong(){let e=this.repeatDirection;return"pingpong"===e||"pingpong-rewind"===e}get actualDelayDirection(){return this.isReversed?"start"===this.config.delayDirection?"end":"end"===this.config.delayDirection?"start":this.config.delayDirection:this.config.delayDirection}start(e){this.isPlaying=!0,this.currentRepeat=this.config.repeat,this.isFirstLerpAfterStart=!0,this.startTime=e,this.onStart?.()}endAfterCurrentPass(){this.currentRepeat<0&&(this.currentRepeat=0)}stop(){this.isPlaying=!1}rearm(){this.onStart?.()}seek(e){this.lerp(e)}update(e){if(!this.isPlaying)return;let t=a(e,this.startTime),r=0;if(this.isFirstLerpAfterStart||!this.isPingpong){let e=this.actualDelayDirection;if("start-once"===this.config.delayDirection&&this.isFirstLerpAfterStart||"start"===e||"start-end"===e){if(t<this.delay)return;r=this.delay}}t=X(t-r);let i=0===this.duration?1:Math.min(Math.max(X(t/this.duration),0),1);if(this.lerp(i),!this.isPlaying||1!==i)return;let s=this.actualDelayDirection;if("end"===s||"start-end"===s){if(t<X(this.duration+this.delay))return;this.endTime=n(this.startTime,X(X(r+this.duration)+this.delay))}else this.endTime=n(this.startTime,X(r+this.duration));this.isFirstLerpAfterStart=!1,0!==this.currentRepeat?(this.currentRepeat>0&&(this.currentRepeat-=1),this.isPingpong?this.isReversed=!this.isReversed:this.lerp(0),this.startTime=e,this.onStart?.()):this.stop()}lerp(e){"pingpong-rewind"===this.repeatDirection&&this.isReversed?(e=X(1-e),e=this.ease(e),e=X(1-e)):e=this.ease(e),this.apply(e)}ease(e){return N(this.config.ease,this.duration,e)}},{degToRad:Q,radToDeg:Y}=z;function _(e,t,r,a,n,i){let s=void 0!==r[e]?r[e]:void 0,o=a[e];if(null==o)return;let l=null!=s?"string"==typeof s?Number(n.getVariable(s)??0):s:t[e],u="string"==typeof o?Number(n.getVariable(o)??0):o;return l!==u?{update:r=>{let a=z.lerp(l,u,r);t[e]=i?Math.trunc(a):a},start:()=>{t[e]=l},end:()=>{t[e]=u}}:void 0}function K(e,t,r,a,n,i){let s=r[e]?r[e]:void 0,o=a[e];if(!o)return;let l=t[e],u=[...s??l].map(e=>"string"==typeof e?Number(n.getVariable(e)??0):e),d=[...o].map(e=>"string"==typeof e?Number(n.getVariable(e)??0):e);return u.length!==d.length||b(u,d)?void 0:{update:r=>{u.forEach((a,n)=>{let s=z.lerp(a,d[n],r);t[e][n]=i?Math.trunc(s):s})},start:()=>{Object.assign(t[e],u)},end:()=>{Object.assign(t[e],d)}}}function Z(e,t,r){return t.forEach((t,a)=>{e.setComponent(a,"string"==typeof t?Number(r.getVariable(t)??0):t)}),e}function $(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=i?Z(new W,i,n):o.clone(),u=Z(new W,s,n);return l.equals(u)?void 0:{update:e=>{o.lerpVectors(l,u,e)},start:()=>{o.copy(l)},end:()=>{o.copy(u)}}}function J(e,t,r){return t.forEach((t,a)=>{e.setComponent(a,"string"==typeof t?Number(r.getVariable(t)??0):t)}),e}function ee(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=!(o instanceof T),u=o instanceof T?o:(new T).fromArray(o),d=i?J(new T,i,n):u.clone(),p=J(new T,s,n);return d.equals(p)?void 0:{update:r=>{u.lerpVectors(d,p,r),l&&(t[e]=u.toArray())},start:()=>{u.copy(d),l&&(t[e]=u.toArray())},end:()=>{u.copy(p),l&&(t[e]=u.toArray())}}}function te(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=new h(o.r,o.g,o.b,o.a),u=i?"string"==typeof i?n.getColor(i).clone():new h(i.r,i.g,i.b,i.a):l.clone(),d="string"==typeof s?n.getColor(s).clone():new h(s.r,s.g,s.b,s.a);return u.equals(d)?void 0:{update:r=>{l.lerpColors(u,d,r);let a=z.lerp(u.a,d.a,r);l.a=a,t[e]={r:l.r,g:l.g,b:l.b,a:l.a}},start:()=>{l.copy(u)},end:()=>{l.copy(d)}}}function re(e,t,r,a,n){return"number"==typeof t[e]?_(e,t,r??{},a,n):Array.isArray(t[e])?K(e,t,r??{},a,n):void 0}function ae(e,t){if(e)for(let[r,a]of Object.entries(t)){let t=e[r];if(Array.isArray(t)&&Array.isArray(a)){let e=Math.min(t.length,a.length);for(let r=0;r<e;r++)t[r]=a[r]}else e[r]=a}}function ne(e,t,r,a){let n={};if(!t||!r)return n;for(let i of e){let e=t[i],s=r[i];if("number"==typeof e&&"number"==typeof s)n[i]=z.lerp(e,s,a);else if(Array.isArray(e)&&Array.isArray(s)){let t=Math.min(e.length,s.length);n[i]=Array.from({length:t},(t,r)=>z.lerp(e[r],s[r],a))}}return n}function ie(e,t,r,a,n){let i=e.getValue(a);if(void 0!==i){if("colors"===a)return function(e,t,r,a="colors"){if(!e.hasValue(a)||!(a in r))return;let n=[],i=e.getValue(a),s=t?t[a]:i.map(e=>e.toArray()),o=r[a];for(let e=0;e<i.length;++e){let t=[...s[e]],r=[...o[e]];A.isEqual(t,r)||n.push({update:a=>{i[e].fromArray(A.lerp(t,r,a))},start:()=>{i[e].fromArray(t)},end:()=>{i[e].fromArray(r)}})}return n.length?n:void 0}(e,t,r,a);if(Array.isArray(i))return"steps"===a?function(e,t,r,a="steps"){if(!e.hasValue(a)||!(a in r))return;let n=[],i=e.getValue(a),s=t?t[a]:i,o=r[a];return b(s,o)||n.push({update:t=>{let r=[...i];for(let e=0;e<i.length;++e){let a=s[e],n=o[e];r[e]=z.lerp(a,n,t)}e.setValue(a,r)},start:()=>{e.setValue(a,s)},end:()=>{e.setValue(a,o)}}),n.length?n:void 0}(e,t,r,a):void 0;if("number"==typeof i)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=t?t[a]:e.getValue(a),s=r[a],o="string"==typeof i?Number(n.getVariable(i)??0):i,l="string"==typeof s?Number(n.getVariable(s)??0):s;return{update:t=>{e.setValue(a,z.lerp(o,l,t))},start:()=>{e.setValue(a,o)},end:()=>{e.setValue(a,l)}}}(e,t,r,a,n);if("boolean"!=typeof i){if(i instanceof T)return function(e,t,r,a){if(!e.hasValue(a)||!(a in r))return;let n=e.getValue(a),i=t?(new T).fromArray(t[a]):n.clone(),s=(new T).fromArray(r[a]);return i.equals(s)?void 0:{update:e=>{n.lerpVectors(i,s,e)},start:()=>{n.copy(i)},end:()=>{n.copy(s)}}}(e,t,r,a);if(i instanceof W)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=e.getValue(a),s=t?t[a]:void 0,o=r[a],l=s?Z(new W,s,n):i.clone(),u=Z(new W,o,n);return l.equals(u)?void 0:{update:e=>{i.lerpVectors(l,u,e)},start:()=>{i.copy(l)},end:()=>{i.copy(u)}}}(e,t,r,a,n);if(i instanceof h)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=t?t[a]:void 0,s=r[a],o=e.getValue(a),l=i?"string"==typeof i?n.color(i).clone():(new H).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.color(s).clone():new h(s.r,s.g,s.b,s.a);if(l.equals(u))return;let d=o.clone();return{update:t=>{e.getValue(a)!==d&&e.setValue(a,d),d.lerpColors(l,u,t)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}(e,t,r,a,n);if(i instanceof H)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=t?t[a]:void 0,s=r[a],o=e.getValue(a),l=i?"string"==typeof i?n.color(i).clone():(new H).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.color(s).clone():(new H).setRGB(s.r,s.g,s.b);if(l.equals(u))return;let d=o.clone();return{update:t=>{e.getValue(a)!==d&&e.setValue(a,d),d.lerpColors(l,u,t)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}(e,t,r,a,n);if("isTexture"in i)return function(e,t,r,a="texture",n){if(!e.hasValue(a)||!(a in r))return;let i=e=>Number("string"==typeof e?n?.getVariable(e)??0:e??0),s=e.getNode("rotation"),o=t?i(t[a]?.rotation):(s?.value??0)*z.RAD2DEG,l=i(r[a]?.rotation);if(s&&Math.abs(o-l)>1e-9)return{update:e=>{s.value=z.lerp(o,l,e)*z.DEG2RAD},start:()=>{s.value=o*z.DEG2RAD},end:()=>{s.value=l*z.DEG2RAD}};let u=function(e){let t=e.getNode("mat");if("function"==typeof t?.updateMatrix)return t;let r=e.getValue("mat");return"function"==typeof r?.updateMatrix?r:void 0}(e);if(!u)return;let d=t?t[a]:u,p=r[a],c=[...d.repeat],h=[...d.offset],f=[...p.repeat],g=[...p.offset],m=d.rotation??0,b=p.rotation??0;return F.isEqual(c,f)&&F.isEqual(h,g)&&m===b?void 0:{update:e=>{u.repeat=F.lerp(c,f,e),u.offset=F.lerp(h,g,e),u.rotation=z.lerp(m,b,e),u.updateMatrix()},start:()=>{u.repeat=[...c],u.offset=[...h],u.rotation=m,u.updateMatrix()},end:()=>{u.repeat=[...f],u.offset=[...g],u.rotation=b,u.updateMatrix()}}}(e,t,r,a,n)}}}function se(e,t,r,a){let n=[],i=t.layers?d(t,a):e.transparent,s=d(r,a);n.push(function(e,t,r){let a=t||r;return{update:t=>{e.setTransparent(1===t?r:a)}}}(e,i,s)),function(e,t,r){let a=e.ensureRainbowNoiseCompiled;if("function"==typeof a)for(let n of[...e.layers]){if("rainbow"!==n.type)continue;let i=t.layers?.data(n.uuid),s=r.layers.data(n.uuid);(p(i?.noiseStrength)||p(s?.noiseStrength))&&a.call(e,n.uuid)}}(e,t,r);for(let i of e.layers){let e=t.layers?.data(i.uuid),s=r.layers.data(i.uuid);if(!s||"light"!==i.type&&(!(i.visible??1)||!(s.visible??1)))continue;let o=c[i.type]??[],l=i.getNames().filter(e=>!o.includes(e)&&!C.some(t=>e.includes(t)));for(let t of l)try{let r=ie(i,e,s,t,a);r&&(Array.isArray(r)?n.push(...r):n.push(r))}catch(e){console.error(`lerpMaterial: unexpected material layer for ${t}`,e)}}return n}function oe(e,t,r,a,n,i){let s=ie(t,r,a,e,i);!s||(Array.isArray(s)?s.forEach(e=>e.update(n)):s.update(n))}new W,new L;var le=new W,ue=new L;var de=[["radial",k],["linear",M],["grid",x],["toObject",O],["randomnessObject",B]];function pe(e,t,r,a){if(!e)return{};let n=ne(["count"],t,r,a);void 0!==n.count&&(n.count=Math.trunc(n.count));for(let[i,s]of de){if(!e[i])continue;let o=ne(s,t[i],r[i],a);Object.keys(o).length&&(n[i]=o)}return n}function ce(e,t){if(e){void 0!==t.count&&(e.count=t.count);for(let[r]of de){let a=t[r];a&&ae(e[r],a)}}}function he(a,n,d,p,c){let h=[];return a.data.visible&&h.push(...function(e,t,r,a,n){let i,s,u,d,p,c,h,f=[];if(S(e)?(i=ee("position",e,t,r,n),i&&f.push(i),u=_("rotation",e,t,r,n),u&&f.push(u),d=ee("shear",e,t,r,n),d&&f.push(d)):(h={slide:t.pathSnapping?.slide??e.updatedPathSnapping?.slide??e.dataPatched.pathSnapping?.slide??0,offset:t.pathSnapping?.offset??e.updatedPathSnapping?.offset??e.dataPatched.pathSnapping?.offset??0},p=_("slide",h,t.pathSnapping??e.updatedPathSnapping??e.dataPatched.pathSnapping,r.pathSnapping??e.dataPatched.pathSnapping,n),p&&f.push(p),c=_("offset",h,t.pathSnapping??e.updatedPathSnapping??e.dataPatched.pathSnapping,r.pathSnapping??e.dataPatched.pathSnapping,n),c&&f.push(c),!p&&!c&&(i=$("position",e,t,r,n),i&&f.push(i),s=$("scale",e,t,r,n),s&&f.push(s),u=function(e,t,r,a,n){let i=t?.rotation?t.rotation.map(e=>("string"==typeof e?Number(n.getVariable(e)??0):e)*z.DEG2RAD):void 0,s=r.rotation?.map(e=>("string"==typeof e?Number(n.getVariable(e)??0):e)*z.DEG2RAD);if(!s)return;let o=i?(new W).fromArray(i):(new W).setFromEuler(e.rotation),l=(new W).fromArray(s);if(o.equals(l))return;let u=le.subVectors(l,o);if(a&&u.toArray().every(e=>Math.abs(e)<2*Math.PI)){let t=(new q).setFromEuler(ue.setFromVector3(o)),r=(new q).setFromEuler(ue.setFromVector3(l));return{update:a=>{!function(e,t,r,a){if(0===a)return r.copy(e);if(1===a)return r.copy(t);let n=e.w*t.w+e.x*t.x+e.y*t.y+e.z*t.z;if(n>=1)return r.copy(e);let i=1-n*n;if(i<=Number.EPSILON){let n=1-a;return r.w=n*e.w+a*t.w,r.x=n*e.x+a*t.x,r.y=n*e.y+a*t.y,r.z=n*e.z+a*t.z,r.normalize(),r}let s=Math.sqrt(i),o=Math.atan2(s,n),l=Math.sin((1-a)*o)/s,u=Math.sin(a*o)/s;r.w=e.w*l+t.w*u,r.x=e.x*l+t.x*u,r.y=e.y*l+t.y*u,r.z=e.z*l+t.z*u}(t,r,e.quaternion,a)},start:()=>{e.rotation.setFromVector3(o)},end:()=>{e.rotation.setFromVector3(l)}}}return{update:t=>{le.lerpVectors(o,l,t),e.rotation.setFromVector3(le)},start:()=>{e.rotation.setFromVector3(o)},end:()=>{e.rotation.setFromVector3(l)}}}(e,t,r,a,n),u&&f.push(u),d=function(e,t,r){let a=t.shear,n=r.shear;if(!n)return;let i=e.shearMatrix,s=a??[i.elements[4],i.elements[8],i.elements[1],i.elements[9],i.elements[2],i.elements[6]],o=n;return s.every((e,t)=>e===o[t])?void 0:{update:e=>{s.forEach((t,r)=>{let a=z.lerp(t,o[r],e);i.elements[V.INDEX_MAP[r]]=a})},start:()=>{s.forEach((e,t)=>{i.elements[V.INDEX_MAP[t]]=e})},end:()=>{o.forEach((e,t)=>{i.elements[V.INDEX_MAP[t]]=e})}}}(e,t,r),d&&f.push(d))),i||s||u||d||p||c){let r=S(e)?()=>{e.updateWorldMatrix(!0,!1,!0),e.resetBBoxNeedsUpdate()}:()=>{e.updateMatrix(),e.hasNonUniformScale&&(e.updateMatrixWorld(),e.updateMatrixWorldRigid()),e.parent?.matrixWorldFusedFalse&&(e.matrixWorld.multiplyMatrices(e.parent.matrixWorldFusedFalse,e.matrix),e.matrixWorldNeedsUpdate=!1),o(e)&&l(e.parent)&&e.invalidateDownstreamBooleanData(!0),e.updatePathSnapping(Object.assign({},t.pathSnapping,h))};f.push({update:r,start:r,end:r})}return f}(a,n,d,c,p.shared)),S(a)?h.push(...function(a,n,i,s,o){let l,u,d,p,c,h,f,g,m,b,y,v,w,S,j,A=[];if("width"in a&&(l=_("width",a,n,i,o),l&&A.push(l)),"height"in a&&(u=_("height",a,n,i,o),u&&A.push(u)),a instanceof e||a instanceof r){let t={...n.fill},r={...i.fill};void 0!==t.enabled&&t.enabled!==r.enabled&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.fill.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),d=te("color",a.fill,t,r,o),d&&A.push(d)}if(a instanceof e){let t={...n.stroke},r={...i.stroke};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.stroke.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),p=te("color",a.stroke,t,r,o),p&&A.push(p),c=_("thickness",a.stroke,t,r,o),c&&A.push(c)}if(a instanceof e){let t={...n.dropShadow},r={...i.dropShadow};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.dropShadow.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),h=te("color",a.dropShadow,t,r,o),h&&A.push(h),f=_("blurRadius",a.dropShadow,t,r,o),f&&A.push(f),m=_("spread",a.dropShadow,t,r,o),m&&A.push(m),g=ee("offset",a.dropShadow,t,r,o),g&&A.push(g)}if(a instanceof e){let t={...n.innerShadow},r={...i.innerShadow};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.innerShadow.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),b=te("color",a.innerShadow,t,r,o),b&&A.push(b),y=_("blurRadius",a.innerShadow,t,r,o),y&&A.push(y),w=_("spread",a.innerShadow,t,r,o),w&&A.push(w),v=ee("offset",a.innerShadow,t,r,o),v&&A.push(v)}if(a instanceof e||a instanceof r){let t={...n.backgroundBlur},r={...i.backgroundBlur};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.backgroundBlur.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,radius:0}),r.enabled||Object.assign(r,{enabled:!0,radius:0})),S=_("radius",a.backgroundBlur,t,r,o),S&&A.push(S)}if(a instanceof e){let t={...n.layerBlur},r={...i.layerBlur};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.layerBlur.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,radius:0}),r.enabled||Object.assign(r,{enabled:!0,radius:0})),j=_("radius",a.layerBlur,t,r,o),j&&A.push(j)}if(a instanceof r||a instanceof t){let e=K("cornerRadius",a,n,i,o);e&&A.push(e)}return A}(a,n,d,0,p.shared)):(a.data.visible&&h.push(...function(e,t,r,a){let n=[];if(!("cloner"in r)||!e.cloner)return n;let i=e.cloner,s="cloner"in t?t.cloner:{},o=r.cloner;R.forEach(e=>{let t;t="count"===e?_("count",i.parameters,s,o,a.shared,!0):re(e,i.parameters,s??{},o,a.shared),t&&n.push(t)});let l=function(e,t,r,a){if("radial"!==e.parameters.type)return;let n=t.radial,i=r.radial;if(!i)return;let s=e.parameters.radial,o=[];return k.forEach(e=>{let t=re(e,s,n??{},i,a);t&&o.push(t)}),o}(i,s,o,a.shared);l?.length&&n.push(...l);let u=function(e,t,r,a){if("linear"!==e.parameters.type)return;let n=t.linear,i=r.linear;if(!i)return;let s=[],o=e.parameters.linear;return M.forEach(e=>{let t=re(e,o,n??{},i,a);t&&s.push(t)}),s}(i,s,o,a.shared);u?.length&&n.push(...u);let d=function(e,t,r,a){if("grid"!==e.parameters.type)return;let n=t.grid,i=r.grid;if(!i)return;let s=[],o=e.parameters.grid;return x.forEach(e=>{let t;t="count"===e?K(e,o,n??{},i,a,!0):re(e,o,n??{},i,a),t&&s.push(t)}),s}(i,s,o,a.shared);d?.length&&n.push(...d);let p=function(e,t,r,a){if("toObject"!==e.parameters.type)return;let n=t.toObject,i=r.toObject;if(!i)return;let s=[],o=e.parameters.toObject;return O.forEach(e=>{let t;t="count"===e?_(e,o,n??{},i,a,!0):re(e,o,n??{},i,a),t&&s.push(t)}),s}(i,s,o,a.shared);p?.length&&n.push(...p);let c=function(e,t,r,a){if(!e.parameters.randomness)return;let n=t.randomnessObject,i=r.randomnessObject;if(!i)return;let s=[],o=e.parameters.randomnessObject;return B.forEach(e=>{let t=re(e,o,n??{},i,a);t&&s.push(t)}),s}(i,s,o,a.shared);return c?.length&&n.push(...c),n.length&&n.push({update:()=>{i.update(a)}}),n}(a,n,d,p)),a instanceof m?(a instanceof g&&a.data.visible&&h.push(...function(e,t,r,a){let n=[];if(!("geometry"in r)||v(e))return n;let i=e.geometry.userData.parameters,s="geometry"in t?t.geometry:{},o=r.geometry;if(e instanceof u){let t=function(e,t,r,a){if(void 0===r.scaleBaked)return;let n=(t.scaleBaked??e.appliedGeometrySize??e.data.geometry.scaleBaked).map(e=>"string"==typeof e?Number(a.shared.getVariable(e)??0):e),i=r.scaleBaked.map(e=>"string"==typeof e?Number(a.shared.getVariable(e)??0):e);if(j.isEqual(n,i))return;let s=[];return s.push({update:t=>{e.updateGeometryInteractions({scaleBaked:[z.lerp(n[0],i[0],t),z.lerp(n[1],i[1],t),z.lerp(n[2],i[2],t)]},a.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(a)},start:()=>{e.updateGeometryInteractions({scaleBaked:n},a.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(a)},end:()=>{e.updateGeometryInteractions({scaleBaked:i},a.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(a)}}),s}(e,s,o,a);t&&n.push(...t)}else{let t={},r=e.appliedGeometrySize;if(Object.assign(t,y(i,I),r?{width:r[0],height:r[1],depth:r[2]}:{},y(s,I)),I.forEach(e=>{let r=re(e,t,s,o,a.shared);r&&n.push(r)}),w(e)){Object.assign(t,{extrusion:{...i.extrusion}});let e=function(e,t,r,a){if(!r.extrusion)return;let n=e.extrusion,i=t.extrusion??{},s=r.extrusion,o=[];return G.forEach(e=>{let t=re(e,n,i,s,a);t&&o.push(t)}),o}(t,s,o,a.shared);e&&n.push(...e)}n.length&&n.push({update:r=>{e.updateGeometryInteractions(t,a.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(a)},start:r=>{e.updateGeometryInteractions(t,a.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(a)},end:r=>{e.updateGeometryInteractions(t,a.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(a)}})}return n}(a,n,d,p)),a.data.visible&&!(a instanceof f&&a.materialOverride)&&h.push(...function(e,t,r,a){let n=[];if(Array.isArray(e.material)){if(!("materials"in r)||!r.materials)return n;let i="materials"in t&&t.materials?t.materials:[],s=r.materials;e.material.forEach((e,t)=>{if(!s[t])return;let r=i[t]??{},o=s[t];"string"==typeof r||"string"==typeof o||n.push(...se(e,r,o,a))})}else{if(!("material"in r)||!r.material)return n;let i="material"in t&&t.material?t.material:{},s=r.material;if("string"==typeof i||"string"==typeof s)return n;n.push(...se(e.material,i,s,a))}return n}(a,n,d,p.shared))):s.is(a)?a.data.visible&&h.push(...function(e,t,r,a){let n=[];if(void 0!==r.intensity){let i=_("intensity",e,t,r,a);i&&n.push(i)}if(void 0!==r.color){let i=function(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=i?"string"==typeof i?n.getColor(i).clone():(new H).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.getColor(s).clone():(new H).setRGB(s.r,s.g,s.b);if(l.equals(u))return;let d=o.clone();return{update:r=>{d.lerpColors(l,u,r),t[e]?.copy?.(d)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}("color",e,t,r,a);i&&n.push(i)}return n}(a,n,d,p.shared)):a instanceof i&&h.push(...function(e,t,r,a){let n=[],i="OrthographicCamera"===e.cameraType?t.orthographic?.zoom:t.perspective?.zoom,s="OrthographicCamera"===e.cameraType?r.orthographic?.zoom:r.perspective?.zoom;if(void 0!==s){let t=i??e.zoom,r=s;t!==r&&n.push({update:a=>{e.zoom=z.lerp(t,r,a),e.updateProjectionMatrix()},start:()=>{e.zoom=t,e.updateProjectionMatrix()},end:()=>{e.zoom=r,e.updateProjectionMatrix()}})}if(void 0!==r.targetOffset){let i=_("targetOffset",e,t,r,a);i&&n.push(i)}return n}(a,n,d,p.shared))),h.length?{update:e=>{h.forEach(t=>t.update(e))},start:e=>{h.forEach(t=>t.start?.(e))},end:e=>{h.forEach(t=>t.end?.(e))}}:void 0}var fe={type:"beginState"};function ge(e){if(5===e.easing){let{control1:t,control2:r}=e;return{easing:5,control1:t??E.defaultData.control1,control2:r??E.defaultData.control2}}if(6===e.easing){let{mass:t,stiffness:r,damping:a,velocity:n}=e;return{easing:6,mass:t??D.defaultData.mass,stiffness:r??D.defaultData.stiffness,damping:a??D.defaultData.damping,velocity:n??D.defaultData.velocity}}return{easing:e.easing}}function me(e){return{delay:e.delay,delayDirection:e.delayDirection??"start-end",direction:e.direction??"normal",repeat:e.repeat}}var be={type:"completeState",isfromEntity:!1};function ye(e,t){let r,a;if("string"==typeof t?(r=t,a=e.states?.[r]):null===t&&(r=null,a=e.data),void 0!==r&&void 0!==a)return{id:r,data:a}}var ve=["position","rotation","scale","shear"],we=new Set;function Se(e){if(e.length<2)return we;let t=new Set,[r,...a]=e;for(let e of ve){let n=r[e];void 0!==n&&a.every(t=>b(t[e],n))&&t.add(e)}return t}var je=class{constructor(e,t,r,a,n,i,s,o={},l=()=>we){var u;this.object=e,this.fromRef=t,this.toRef=r,this.data=a,this.sharedAssets=n,this.allowSlerp=i,this.page=s,this.hooks=o,this.inert=l,this.builtReversed=!1,this.startStateId=null,this.buildCallback=()=>{this.builtReversed=this.runner.isReversed,this.startStateId=S(this.object)?null:this.object.transitionState.state,this.callback=he(this.object,{},function(e,t){if(0===t.size)return e;let r={...e};for(let e of t)delete r[e];return r}(this.end.data,this.inert()),{scene:this.page.scene,shared:this.sharedAssets},this.allowSlerp)},this.onChange=e=>{this.builtReversed!==this.runner.isReversed&&this.buildCallback(),this.callback&&(this.callback.update(e),this.object.requestRender()),this.writeState(e)},this.runner=new U({duration:(u=a).duration,ease:ge(u),...me(u)},this.onChange,this.buildCallback),this.rebind()}rebind(){let{fromRef:e,toRef:t}=this;if(void 0===e){let e=ye(this.object,this.object.currentState===t?this.object.prevState:this.object.currentState);if(!e)throw new Error("Missing property");this.from=e}else{let t=ye(this.object,e);if(!t)throw new Error("Missing property");this.from=t}if(void 0===t)throw new Error("Missing property");let r=ye(this.object,t);if(!r)throw new Error("Missing property");this.to=r,this.buildCallback()}refresh(){this.buildCallback()}get endpointData(){return[this.from.data,this.to.data]}get targetStateId(){return this.builtReversed?this.from.id:this.to.id}get start(){return this.builtReversed?this.to:this.from}get end(){return this.builtReversed?this.from:this.to}writeState(e){if(0===e||S(this.object))return;let t=1===e,r=e>.5?this.targetStateId:this.startStateId,a=this.object.transitionState;a.settled===t&&a.state===r||(this.object.transitionState={settled:t,state:r},this.object.reversibleToState=this.end.id,this.object.prevState!==this.object.currentState&&(this.object.prevState=this.object.currentState),this.object.currentState=r,this.object.dispatchEvent({type:"transitionState",settled:t,state:r}),this.object.dispatchEvent({type:t?"completeState":"beginState",state:r}),this.object.traverseEntity(e=>{e!==this.object&&e instanceof i&&e.dispatchEvent(t?be:fe)}),t?this.hooks.onComplete?.(r):this.hooks.onBegin?.(r))}};export{U as a,ne as b,pe as c,ce as d,oe as e,fe as f,ge as g,me as h,be as i,ye as j,we as k,Se as l,je as m};
1
+ import{e,g as t,j as r}from"./runtime-chunk-KEUVFVFD.js";import{a,b as n}from"./runtime-chunk-HD7WF3XN.js";import{a as i,e as s,g as o,h as l}from"./runtime-chunk-PZ5YPY3O.js";import{b as u}from"./runtime-chunk-P4DZASDE.js";import{Z as d,fa as p,ga as c,i as h,na as f,oa as g}from"./runtime-chunk-AKYP5JEN.js";import{v as m}from"./runtime-chunk-DN4GIGTV.js";import{d as b,e as y}from"./runtime-chunk-RTLL6WIB.js";import{c as v,d as S,e as w}from"./runtime-chunk-2PT2WH66.js";import{A as j,B as A,C as V,G as D,H as E,M as R,N as k,O as M,P as x,Q as O,R as P,Xa as N,Ya as B,da as C,ma as G,qa as I,z as F}from"./runtime-chunk-ADHKZQMB.js";import{Ec as z,Fc as T,Gc as q,Hc as W,Rc as L,Vc as H}from"./runtime-chunk-KPOUV3HD.js";var U=Math.fround,X=class{constructor(e,t,r){this.apply=t,this.onStart=r,this.isPlaying=!1,this.isReversed=!1,this.endTime=0,this.startTime=0,this.isFirstLerpAfterStart=!1,this.config=e,this.duration=B(e.ease,U(e.duration/1e3)),this.delay=U(e.delay/1e3),this.currentRepeat=e.repeat}get repeatDirection(){return this.overrideDirection??this.config.direction}get isPingpong(){let e=this.repeatDirection;return"pingpong"===e||"pingpong-rewind"===e}get actualDelayDirection(){return this.isReversed?"start"===this.config.delayDirection?"end":"end"===this.config.delayDirection?"start":this.config.delayDirection:this.config.delayDirection}start(e){this.isPlaying=!0,this.currentRepeat=this.config.repeat,this.isFirstLerpAfterStart=!0,this.startTime=e,this.onStart?.()}endAfterCurrentPass(){this.currentRepeat<0&&(this.currentRepeat=0)}stop(){this.isPlaying=!1}rearm(){this.onStart?.()}seek(e){this.lerp(e)}update(e){if(!this.isPlaying)return;let t=a(e,this.startTime),r=0;if(this.isFirstLerpAfterStart||!this.isPingpong){let e=this.actualDelayDirection;if("start-once"===this.config.delayDirection&&this.isFirstLerpAfterStart||"start"===e||"start-end"===e){if(t<this.delay)return;r=this.delay}}t=U(t-r);let i=0===this.duration?1:Math.min(Math.max(U(t/this.duration),0),1);if(this.lerp(i),!this.isPlaying||1!==i)return;let s=this.actualDelayDirection;if("end"===s||"start-end"===s){if(t<U(this.duration+this.delay))return;this.endTime=n(this.startTime,U(U(r+this.duration)+this.delay))}else this.endTime=n(this.startTime,U(r+this.duration));this.isFirstLerpAfterStart=!1,0!==this.currentRepeat?(this.currentRepeat>0&&(this.currentRepeat-=1),this.isPingpong?this.isReversed=!this.isReversed:this.lerp(0),this.startTime=e,this.onStart?.()):this.stop()}lerp(e){"pingpong-rewind"===this.repeatDirection&&this.isReversed?(e=U(1-e),e=this.ease(e),e=U(1-e)):e=this.ease(e),this.apply(e)}ease(e){return N(this.config.ease,this.duration,e)}},{degToRad:K,radToDeg:Y}=z;function Z(e,t,r,a,n,i){let s=void 0!==r[e]?r[e]:void 0,o=a[e];if(null==o)return;let l=null!=s?"string"==typeof s?Number(n.getVariable(s)??0):s:t[e],u="string"==typeof o?Number(n.getVariable(o)??0):o;return l!==u?{update:r=>{let a=z.lerp(l,u,r);t[e]=i?Math.trunc(a):a},start:()=>{t[e]=l},end:()=>{t[e]=u}}:void 0}function _(e,t,r,a,n,i){let s=r[e]?r[e]:void 0,o=a[e];if(!o)return;let l=t[e],u=[...s??l].map(e=>"string"==typeof e?Number(n.getVariable(e)??0):e),d=[...o].map(e=>"string"==typeof e?Number(n.getVariable(e)??0):e);return u.length!==d.length||b(u,d)?void 0:{update:r=>{u.forEach((a,n)=>{let s=z.lerp(a,d[n],r);t[e][n]=i?Math.trunc(s):s})},start:()=>{Object.assign(t[e],u)},end:()=>{Object.assign(t[e],d)}}}function Q(e,t,r){return t.forEach((t,a)=>{e.setComponent(a,"string"==typeof t?Number(r.getVariable(t)??0):t)}),e}function J(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=i?Q(new W,i,n):o.clone(),u=Q(new W,s,n);return l.equals(u)?void 0:{update:e=>{o.lerpVectors(l,u,e)},start:()=>{o.copy(l)},end:()=>{o.copy(u)}}}function $(e,t,r){return t.forEach((t,a)=>{e.setComponent(a,"string"==typeof t?Number(r.getVariable(t)??0):t)}),e}function ee(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=!(o instanceof T),u=o instanceof T?o:(new T).fromArray(o),d=i?$(new T,i,n):u.clone(),p=$(new T,s,n);return d.equals(p)?void 0:{update:r=>{u.lerpVectors(d,p,r),l&&(t[e]=u.toArray())},start:()=>{u.copy(d),l&&(t[e]=u.toArray())},end:()=>{u.copy(p),l&&(t[e]=u.toArray())}}}function te(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=new h(o.r,o.g,o.b,o.a),u=i?"string"==typeof i?n.getColor(i).clone():new h(i.r,i.g,i.b,i.a):l.clone(),d="string"==typeof s?n.getColor(s).clone():new h(s.r,s.g,s.b,s.a);return u.equals(d)?void 0:{update:r=>{l.lerpColors(u,d,r);let a=z.lerp(u.a,d.a,r);l.a=a,t[e]={r:l.r,g:l.g,b:l.b,a:l.a}},start:()=>{l.copy(u)},end:()=>{l.copy(d)}}}function re(e,t,r,a,n){return"number"==typeof t[e]?Z(e,t,r??{},a,n):Array.isArray(t[e])?_(e,t,r??{},a,n):void 0}function ae(e,t){if(e)for(let[r,a]of Object.entries(t)){let t=e[r];if(Array.isArray(t)&&Array.isArray(a)){let e=Math.min(t.length,a.length);for(let r=0;r<e;r++)t[r]=a[r]}else e[r]=a}}function ne(e,t,r,a){let n={};if(!t||!r)return n;for(let i of e){let e=t[i],s=r[i];if("number"==typeof e&&"number"==typeof s)n[i]=z.lerp(e,s,a);else if(Array.isArray(e)&&Array.isArray(s)){let t=Math.min(e.length,s.length);n[i]=Array.from({length:t},(t,r)=>z.lerp(e[r],s[r],a))}}return n}function ie(e,t,r,a,n){let i=e.getValue(a);if(void 0!==i){if("colors"===a)return function(e,t,r,a="colors"){if(!e.hasValue(a)||!(a in r))return;let n=[],i=e.getValue(a),s=t?t[a]:i.map(e=>e.toArray()),o=r[a];for(let e=0;e<i.length;++e){let t=[...s[e]],r=[...o[e]];A.isEqual(t,r)||n.push({update:a=>{i[e].fromArray(A.lerp(t,r,a))},start:()=>{i[e].fromArray(t)},end:()=>{i[e].fromArray(r)}})}return n.length?n:void 0}(e,t,r,a);if(Array.isArray(i))return"steps"===a?function(e,t,r,a="steps"){if(!e.hasValue(a)||!(a in r))return;let n=[],i=e.getValue(a),s=t?t[a]:i,o=r[a];return b(s,o)||n.push({update:t=>{let r=[...i];for(let e=0;e<i.length;++e){let a=s[e],n=o[e];r[e]=z.lerp(a,n,t)}e.setValue(a,r)},start:()=>{e.setValue(a,s)},end:()=>{e.setValue(a,o)}}),n.length?n:void 0}(e,t,r,a):void 0;if("number"==typeof i)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=t?t[a]:e.getValue(a),s=r[a],o="string"==typeof i?Number(n.getVariable(i)??0):i,l="string"==typeof s?Number(n.getVariable(s)??0):s;return{update:t=>{e.setValue(a,z.lerp(o,l,t))},start:()=>{e.setValue(a,o)},end:()=>{e.setValue(a,l)}}}(e,t,r,a,n);if("boolean"!=typeof i){if(i instanceof T)return function(e,t,r,a){if(!e.hasValue(a)||!(a in r))return;let n=e.getValue(a),i=t?(new T).fromArray(t[a]):n.clone(),s=(new T).fromArray(r[a]);return i.equals(s)?void 0:{update:e=>{n.lerpVectors(i,s,e)},start:()=>{n.copy(i)},end:()=>{n.copy(s)}}}(e,t,r,a);if(i instanceof W)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=e.getValue(a),s=t?t[a]:void 0,o=r[a],l=s?Q(new W,s,n):i.clone(),u=Q(new W,o,n);return l.equals(u)?void 0:{update:e=>{i.lerpVectors(l,u,e)},start:()=>{i.copy(l)},end:()=>{i.copy(u)}}}(e,t,r,a,n);if(i instanceof h)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=t?t[a]:void 0,s=r[a],o=e.getValue(a),l=i?"string"==typeof i?n.color(i).clone():(new H).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.color(s).clone():new h(s.r,s.g,s.b,s.a);if(l.equals(u))return;let d=o.clone();return{update:t=>{e.getValue(a)!==d&&e.setValue(a,d),d.lerpColors(l,u,t)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}(e,t,r,a,n);if(i instanceof H)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=t?t[a]:void 0,s=r[a],o=e.getValue(a),l=i?"string"==typeof i?n.color(i).clone():(new H).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.color(s).clone():(new H).setRGB(s.r,s.g,s.b);if(l.equals(u))return;let d=o.clone();return{update:t=>{e.getValue(a)!==d&&e.setValue(a,d),d.lerpColors(l,u,t)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}(e,t,r,a,n);if("isTexture"in i)return function(e,t,r,a="texture",n){if(!e.hasValue(a)||!(a in r))return;let i=e=>Number("string"==typeof e?n?.getVariable(e)??0:e??0),s=e.getNode("rotation"),o=t?i(t[a]?.rotation):(s?.value??0)*z.RAD2DEG,l=i(r[a]?.rotation);if(s&&Math.abs(o-l)>1e-9)return{update:e=>{s.value=z.lerp(o,l,e)*z.DEG2RAD},start:()=>{s.value=o*z.DEG2RAD},end:()=>{s.value=l*z.DEG2RAD}};let u=function(e){let t=e.getNode("mat");if("function"==typeof t?.updateMatrix)return t;let r=e.getValue("mat");return"function"==typeof r?.updateMatrix?r:void 0}(e);if(!u)return;let d=t?t[a]:u,p=r[a],c=[...d.repeat],h=[...d.offset],f=[...p.repeat],g=[...p.offset],m=d.rotation??0,b=p.rotation??0;return F.isEqual(c,f)&&F.isEqual(h,g)&&m===b?void 0:{update:e=>{u.repeat=F.lerp(c,f,e),u.offset=F.lerp(h,g,e),u.rotation=z.lerp(m,b,e),u.updateMatrix()},start:()=>{u.repeat=[...c],u.offset=[...h],u.rotation=m,u.updateMatrix()},end:()=>{u.repeat=[...f],u.offset=[...g],u.rotation=b,u.updateMatrix()}}}(e,t,r,a,n)}}}function se(e,t,r,a){let n=[],i=t.layers?d(t,a):e.transparent,s=d(r,a);n.push(function(e,t,r){let a=t||r;return{update:t=>{e.setTransparent(1===t?r:a)}}}(e,i,s)),function(e,t,r){let a=e.ensureRainbowNoiseCompiled;if("function"==typeof a)for(let n of[...e.layers]){if("rainbow"!==n.type)continue;let i=t.layers?.data(n.uuid),s=r.layers.data(n.uuid);(p(i?.noiseStrength)||p(s?.noiseStrength))&&a.call(e,n.uuid)}}(e,t,r);for(let i of e.layers){let e=t.layers?.data(i.uuid),s=r.layers.data(i.uuid);if(!s||"light"!==i.type&&(!(i.visible??1)||!(s.visible??1)))continue;let o=c[i.type]??[],l=i.getNames().filter(e=>!o.includes(e)&&!C.some(t=>e.includes(t)));for(let t of l)try{let r=ie(i,e,s,t,a);r&&(Array.isArray(r)?n.push(...r):n.push(r))}catch(e){console.error(`lerpMaterial: unexpected material layer for ${t}`,e)}}return n}function oe(e,t,r,a,n,i){let s=ie(t,r,a,e,i);!s||(Array.isArray(s)?s.forEach(e=>e.update(n)):s.update(n))}new W,new L;var le=new W,ue=new L;var de=[["radial",k],["linear",M],["grid",x],["toObject",O],["randomnessObject",P]];function pe(e,t,r,a){if(!e)return{};let n=ne(["count"],t,r,a);void 0!==n.count&&(n.count=Math.trunc(n.count));for(let[i,s]of de){if(!e[i])continue;let o=ne(s,t[i],r[i],a);Object.keys(o).length&&(n[i]=o)}return n}function ce(e,t){if(e){void 0!==t.count&&(e.count=t.count);for(let[r]of de){let a=t[r];a&&ae(e[r],a)}}}function he(a,n,d,p,c){let h=[];return a.data.visible&&h.push(...function(e,t,r,a,n){let i,s,u,d,p,c,h,f=[];if(w(e)?(i=ee("position",e,t,r,n),i&&f.push(i),u=Z("rotation",e,t,r,n),u&&f.push(u),d=ee("shear",e,t,r,n),d&&f.push(d)):(h={slide:t.pathSnapping?.slide??e.updatedPathSnapping?.slide??e.dataPatched.pathSnapping?.slide??0,offset:t.pathSnapping?.offset??e.updatedPathSnapping?.offset??e.dataPatched.pathSnapping?.offset??0},p=Z("slide",h,t.pathSnapping??e.updatedPathSnapping??e.dataPatched.pathSnapping,r.pathSnapping??e.dataPatched.pathSnapping,n),p&&f.push(p),c=Z("offset",h,t.pathSnapping??e.updatedPathSnapping??e.dataPatched.pathSnapping,r.pathSnapping??e.dataPatched.pathSnapping,n),c&&f.push(c),!p&&!c&&(i=J("position",e,t,r,n),i&&f.push(i),s=J("scale",e,t,r,n),s&&f.push(s),u=function(e,t,r,a,n){let i=t?.rotation?t.rotation.map(e=>("string"==typeof e?Number(n.getVariable(e)??0):e)*z.DEG2RAD):void 0,s=r.rotation?.map(e=>("string"==typeof e?Number(n.getVariable(e)??0):e)*z.DEG2RAD);if(!s)return;let o=i?(new W).fromArray(i):(new W).setFromEuler(e.rotation),l=(new W).fromArray(s);if(o.equals(l))return;let u=le.subVectors(l,o);if(a&&u.toArray().every(e=>Math.abs(e)<2*Math.PI)){let t=(new q).setFromEuler(ue.setFromVector3(o)),r=(new q).setFromEuler(ue.setFromVector3(l));return{update:a=>{!function(e,t,r,a){if(0===a)return r.copy(e);if(1===a)return r.copy(t);let n=e.w*t.w+e.x*t.x+e.y*t.y+e.z*t.z;if(n>=1)return r.copy(e);let i=1-n*n;if(i<=Number.EPSILON){let n=1-a;return r.w=n*e.w+a*t.w,r.x=n*e.x+a*t.x,r.y=n*e.y+a*t.y,r.z=n*e.z+a*t.z,r.normalize(),r}let s=Math.sqrt(i),o=Math.atan2(s,n),l=Math.sin((1-a)*o)/s,u=Math.sin(a*o)/s;r.w=e.w*l+t.w*u,r.x=e.x*l+t.x*u,r.y=e.y*l+t.y*u,r.z=e.z*l+t.z*u}(t,r,e.quaternion,a)},start:()=>{e.rotation.setFromVector3(o)},end:()=>{e.rotation.setFromVector3(l)}}}return{update:t=>{le.lerpVectors(o,l,t),e.rotation.setFromVector3(le)},start:()=>{e.rotation.setFromVector3(o)},end:()=>{e.rotation.setFromVector3(l)}}}(e,t,r,a,n),u&&f.push(u),d=function(e,t,r){let a=t.shear,n=r.shear;if(!n)return;let i=e.shearMatrix,s=a??[i.elements[4],i.elements[8],i.elements[1],i.elements[9],i.elements[2],i.elements[6]],o=n;return s.every((e,t)=>e===o[t])?void 0:{update:e=>{s.forEach((t,r)=>{let a=z.lerp(t,o[r],e);i.elements[V.INDEX_MAP[r]]=a})},start:()=>{s.forEach((e,t)=>{i.elements[V.INDEX_MAP[t]]=e})},end:()=>{o.forEach((e,t)=>{i.elements[V.INDEX_MAP[t]]=e})}}}(e,t,r),d&&f.push(d))),i||s||u||d||p||c){let r=w(e)?()=>{e.updateWorldMatrix(!0,!1,!0),e.resetBBoxNeedsUpdate()}:()=>{e.updateMatrix(),e.hasNonUniformScale&&(e.updateMatrixWorld(),e.updateMatrixWorldRigid()),e.parent?.matrixWorldFusedFalse&&(e.matrixWorld.multiplyMatrices(e.parent.matrixWorldFusedFalse,e.matrix),e.matrixWorldNeedsUpdate=!1),o(e)&&l(e.parent)&&e.invalidateDownstreamBooleanData(!0),e.updatePathSnapping(Object.assign({},t.pathSnapping,h))};f.push({update:r,start:r,end:r})}return f}(a,n,d,c,p.shared)),w(a)?h.push(...function(a,n,i,s,o){let l,u,d,p,c,h,f,g,m,b,y,v,S,w,j,A=[];if("width"in a&&(l=Z("width",a,n,i,o),l&&A.push(l)),"height"in a&&(u=Z("height",a,n,i,o),u&&A.push(u)),a instanceof e||a instanceof r){let t={...n.fill},r={...i.fill};void 0!==t.enabled&&t.enabled!==r.enabled&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.fill.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),d=te("color",a.fill,t,r,o),d&&A.push(d)}if(a instanceof e){let t={...n.stroke},r={...i.stroke};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.stroke.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),p=te("color",a.stroke,t,r,o),p&&A.push(p),c=Z("thickness",a.stroke,t,r,o),c&&A.push(c)}if(a instanceof e){let t={...n.dropShadow},r={...i.dropShadow};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.dropShadow.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),h=te("color",a.dropShadow,t,r,o),h&&A.push(h),f=Z("blurRadius",a.dropShadow,t,r,o),f&&A.push(f),m=Z("spread",a.dropShadow,t,r,o),m&&A.push(m),g=ee("offset",a.dropShadow,t,r,o),g&&A.push(g)}if(a instanceof e){let t={...n.innerShadow},r={...i.innerShadow};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.innerShadow.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),b=te("color",a.innerShadow,t,r,o),b&&A.push(b),y=Z("blurRadius",a.innerShadow,t,r,o),y&&A.push(y),S=Z("spread",a.innerShadow,t,r,o),S&&A.push(S),v=ee("offset",a.innerShadow,t,r,o),v&&A.push(v)}if(a instanceof e||a instanceof r){let t={...n.backgroundBlur},r={...i.backgroundBlur};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.backgroundBlur.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,radius:0}),r.enabled||Object.assign(r,{enabled:!0,radius:0})),w=Z("radius",a.backgroundBlur,t,r,o),w&&A.push(w)}if(a instanceof e){let t={...n.layerBlur},r={...i.layerBlur};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.layerBlur.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,radius:0}),r.enabled||Object.assign(r,{enabled:!0,radius:0})),j=Z("radius",a.layerBlur,t,r,o),j&&A.push(j)}if(a instanceof r||a instanceof t){let e=_("cornerRadius",a,n,i,o);e&&A.push(e)}return A}(a,n,d,0,p.shared)):(a.data.visible&&h.push(...function(e,t,r,a){let n=[];if(!("cloner"in r)||!e.cloner)return n;let i=e.cloner,s="cloner"in t?t.cloner:{},o=r.cloner;R.forEach(e=>{let t;t="count"===e?Z("count",i.parameters,s,o,a.shared,!0):re(e,i.parameters,s??{},o,a.shared),t&&n.push(t)});let l=function(e,t,r,a){if("radial"!==e.parameters.type)return;let n=t.radial,i=r.radial;if(!i)return;let s=e.parameters.radial,o=[];return k.forEach(e=>{let t=re(e,s,n??{},i,a);t&&o.push(t)}),o}(i,s,o,a.shared);l?.length&&n.push(...l);let u=function(e,t,r,a){if("linear"!==e.parameters.type)return;let n=t.linear,i=r.linear;if(!i)return;let s=[],o=e.parameters.linear;return M.forEach(e=>{let t=re(e,o,n??{},i,a);t&&s.push(t)}),s}(i,s,o,a.shared);u?.length&&n.push(...u);let d=function(e,t,r,a){if("grid"!==e.parameters.type)return;let n=t.grid,i=r.grid;if(!i)return;let s=[],o=e.parameters.grid;return x.forEach(e=>{let t;t="count"===e?_(e,o,n??{},i,a,!0):re(e,o,n??{},i,a),t&&s.push(t)}),s}(i,s,o,a.shared);d?.length&&n.push(...d);let p=function(e,t,r,a){if("toObject"!==e.parameters.type)return;let n=t.toObject,i=r.toObject;if(!i)return;let s=[],o=e.parameters.toObject;return O.forEach(e=>{let t;t="count"===e?Z(e,o,n??{},i,a,!0):re(e,o,n??{},i,a),t&&s.push(t)}),s}(i,s,o,a.shared);p?.length&&n.push(...p);let c=function(e,t,r,a){if(!e.parameters.randomness)return;let n=t.randomnessObject,i=r.randomnessObject;if(!i)return;let s=[],o=e.parameters.randomnessObject;return P.forEach(e=>{let t=re(e,o,n??{},i,a);t&&s.push(t)}),s}(i,s,o,a.shared);return c?.length&&n.push(...c),n.length&&n.push({update:()=>{i.update(a)}}),n}(a,n,d,p)),a instanceof m?(a instanceof g&&a.data.visible&&h.push(...function(e,t,r,a){let n=[];if(!("geometry"in r)||v(e))return n;let i=e.geometry.userData.parameters,s="geometry"in t?t.geometry:{},o=r.geometry;if(e instanceof u){let t=function(e,t,r,a){if(void 0===r.scaleBaked)return;let n=(t.scaleBaked??e.appliedGeometrySize??e.data.geometry.scaleBaked).map(e=>"string"==typeof e?Number(a.shared.getVariable(e)??0):e),i=r.scaleBaked.map(e=>"string"==typeof e?Number(a.shared.getVariable(e)??0):e);if(j.isEqual(n,i))return;let s=[];return s.push({update:t=>{e.updateGeometryInteractions({scaleBaked:[z.lerp(n[0],i[0],t),z.lerp(n[1],i[1],t),z.lerp(n[2],i[2],t)]},a.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(a)},start:()=>{e.updateGeometryInteractions({scaleBaked:n},a.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(a)},end:()=>{e.updateGeometryInteractions({scaleBaked:i},a.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(a)}}),s}(e,s,o,a);t&&n.push(...t)}else{let t={},r=e.appliedGeometrySize;if(Object.assign(t,y(i,I),r?{width:r[0],height:r[1],depth:r[2]}:{},y(s,I)),I.forEach(e=>{let r=re(e,t,s,o,a.shared);r&&n.push(r)}),S(e)){Object.assign(t,{extrusion:{...i.extrusion}});let e=function(e,t,r,a){if(!r.extrusion)return;let n=e.extrusion,i=t.extrusion??{},s=r.extrusion,o=[];return G.forEach(e=>{let t=re(e,n,i,s,a);t&&o.push(t)}),o}(t,s,o,a.shared);e&&n.push(...e)}n.length&&n.push({update:r=>{e.updateGeometryInteractions(t,a.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(a)},start:r=>{e.updateGeometryInteractions(t,a.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(a)},end:r=>{e.updateGeometryInteractions(t,a.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(a)}})}return n}(a,n,d,p)),a.data.visible&&!(a instanceof f&&a.materialOverride)&&h.push(...function(e,t,r,a){let n=[];if(Array.isArray(e.material)){if(!("materials"in r)||!r.materials)return n;let i="materials"in t&&t.materials?t.materials:[],s=r.materials;e.material.forEach((e,t)=>{if(!s[t])return;let r=i[t]??{},o=s[t];"string"==typeof r||"string"==typeof o||n.push(...se(e,r,o,a))})}else{if(!("material"in r)||!r.material)return n;let i="material"in t&&t.material?t.material:{},s=r.material;if("string"==typeof i||"string"==typeof s)return n;n.push(...se(e.material,i,s,a))}return n}(a,n,d,p.shared))):s.is(a)?a.data.visible&&h.push(...function(e,t,r,a){let n=[];if(void 0!==r.intensity){let i=Z("intensity",e,t,r,a);i&&n.push(i)}if(void 0!==r.color){let i=function(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=i?"string"==typeof i?n.getColor(i).clone():(new H).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.getColor(s).clone():(new H).setRGB(s.r,s.g,s.b);if(l.equals(u))return;let d=o.clone();return{update:r=>{d.lerpColors(l,u,r),t[e]?.copy?.(d)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}("color",e,t,r,a);i&&n.push(i)}return n}(a,n,d,p.shared)):a instanceof i&&h.push(...function(e,t,r,a){let n=[],i="OrthographicCamera"===e.cameraType?t.orthographic?.zoom:t.perspective?.zoom,s="OrthographicCamera"===e.cameraType?r.orthographic?.zoom:r.perspective?.zoom;if(void 0!==s){let t=i??e.zoom,r=s;t!==r&&n.push({update:a=>{e.zoom=z.lerp(t,r,a),e.updateProjectionMatrix()},start:()=>{e.zoom=t,e.updateProjectionMatrix()},end:()=>{e.zoom=r,e.updateProjectionMatrix()}})}if(void 0!==r.targetOffset){let i=Z("targetOffset",e,t,r,a);i&&n.push(i)}return n}(a,n,d,p.shared))),h.length?{update:e=>{h.forEach(t=>t.update(e))},start:e=>{h.forEach(t=>t.start?.(e))},end:e=>{h.forEach(t=>t.end?.(e))}}:void 0}var fe={type:"beginState"};function ge(e){if(5===e.easing){let{control1:t,control2:r}=e;return{easing:5,control1:t??E.defaultData.control1,control2:r??E.defaultData.control2}}if(6===e.easing){let{mass:t,stiffness:r,damping:a,velocity:n}=e;return{easing:6,mass:t??D.defaultData.mass,stiffness:r??D.defaultData.stiffness,damping:a??D.defaultData.damping,velocity:n??D.defaultData.velocity}}return{easing:e.easing}}function me(e){return{delay:e.delay,delayDirection:e.delayDirection??"start-end",direction:e.direction??"normal",repeat:e.repeat}}var be={type:"completeState",isfromEntity:!1};function ye(e,t){let r,a;if("string"==typeof t?(r=t,a=e.states?.[r]):null===t&&(r=null,a=e.data),void 0!==r&&void 0!==a)return{id:r,data:a}}var ve=["position","rotation","scale","shear"],Se=new Set;function we(e){if(e.length<2)return Se;let t=new Set,[r,...a]=e;for(let e of ve){let n=r[e];void 0!==n&&a.every(t=>b(t[e],n))&&t.add(e)}return t}var je=class{constructor(e,t,r,a,n,i,s,o={},l=()=>Se){var u;this.object=e,this.fromRef=t,this.toRef=r,this.data=a,this.sharedAssets=n,this.allowSlerp=i,this.page=s,this.hooks=o,this.inert=l,this.builtReversed=!1,this.startStateId=null,this.buildCallback=()=>{this.builtReversed=this.runner.isReversed,this.startStateId=w(this.object)?null:this.object.transitionState.state,this.callback=he(this.object,{},function(e,t){if(0===t.size)return e;let r={...e};for(let e of t)delete r[e];return r}(this.end.data,this.inert()),{scene:this.page.scene,shared:this.sharedAssets},this.allowSlerp)},this.onChange=e=>{this.builtReversed!==this.runner.isReversed&&this.buildCallback(),this.callback&&(this.callback.update(e),this.object.requestRender()),this.writeState(e)},this.runner=new X({duration:(u=a).duration,ease:ge(u),...me(u)},this.onChange,this.buildCallback),this.rebind()}rebind(){let{fromRef:e,toRef:t}=this;if(void 0===e){let e=ye(this.object,this.object.currentState===t?this.object.prevState:this.object.currentState);if(!e)throw new Error("Missing property");this.from=e}else{let t=ye(this.object,e);if(!t)throw new Error("Missing property");this.from=t}if(void 0===t)throw new Error("Missing property");let r=ye(this.object,t);if(!r)throw new Error("Missing property");this.to=r,this.buildCallback()}refresh(){this.buildCallback()}get endpointData(){return[this.from.data,this.to.data]}get targetStateId(){return this.builtReversed?this.from.id:this.to.id}get start(){return this.builtReversed?this.to:this.from}get end(){return this.builtReversed?this.from:this.to}writeState(e){if(0===e||w(this.object))return;let t=1===e,r=e>.5?this.targetStateId:this.startStateId,a=this.object.transitionState;a.settled===t&&a.state===r||(this.object.transitionState={settled:t,state:r},this.object.reversibleToState=this.end.id,this.object.prevState!==this.object.currentState&&(this.object.prevState=this.object.currentState),this.object.currentState=r,this.object.dispatchEvent({type:"transitionState",settled:t,state:r}),this.object.dispatchEvent({type:t?"completeState":"beginState",state:r}),this.object.traverseEntity(e=>{e!==this.object&&e instanceof i&&e.dispatchEvent(t?be:fe)}),t?this.hooks.onComplete?.(r):this.hooks.onBegin?.(r))}};export{X as a,ne as b,pe as c,ce as d,oe as e,fe as f,ge as g,me as h,be as i,ye as j,Se as k,we as l,je as m};
@@ -1 +1 @@
1
- import{f as e}from"./runtime-chunk-SCUHCKBQ.js";var t=class{constructor(t,n){this.enabled=!1,this.effect=new t(n),Object.defineProperty(this,"opacity",{enumerable:!0,set(e){this.effect.blendMode.opacity.value=e},get(){return this.effect.blendMode.opacity.value}}),Object.defineProperty(this,"blendFunction",{enumerable:!0,set(e){this.effect.blendMode.setBlendFunction(Number(e))},get(){return this.effect.blendMode.blendFunction}}),this.blendFunction=e.NORMAL}dispose(){this.effect.dispose()}};export{t as a};
1
+ import{f as e}from"./runtime-chunk-6ZOKRQ5I.js";var t=class{constructor(t,n){this.enabled=!1,this.effect=new t(n),Object.defineProperty(this,"opacity",{enumerable:!0,set(e){this.effect.blendMode.opacity.value=e},get(){return this.effect.blendMode.opacity.value}}),Object.defineProperty(this,"blendFunction",{enumerable:!0,set(e){this.effect.blendMode.setBlendFunction(Number(e))},get(){return this.effect.blendMode.blendFunction}}),this.blendFunction=e.NORMAL}dispose(){this.effect.dispose()}};export{t as a};
@@ -1 +1 @@
1
- import{oa as t}from"./runtime-chunk-6B2UWQ4D.js";import{Hc as e,Qc as r,ld as i}from"./runtime-chunk-KPOUV3HD.js";var s=new e,n=new r,a=new i,o=class extends t{constructor(t,e,r){super(t,e,r),this.data=e}get textGeometry(){return this.geometry}get charWidths(){return this.textGeometry.charWidths}get charCoords(){return this.textGeometry.charCoords}get wrappedText(){return this.textGeometry.wrappedText}get font(){return this.textGeometry.font}get initialOffsetY(){let t=this.dataPatched;return this.font?.getLineInitialOffsetY(this.lineHeight,this.wrappedText.length,"number"==typeof t.geometry.height?t.geometry.height:1,this.fontScale,t.geometry.verticalAlign)??0}get fontScale(){let t=this.dataPatched;return this.font?t.geometry.fontSize/this.font.unitsPerEm:1}get AD(){return Math.abs(this.ascender-this.descender)}get ascender(){return(this.font?.ascender??1)*this.fontScale}get descender(){return(this.font?.descender??1)*this.fontScale}get lineHeight(){let t=this.dataPatched;return t.geometry.fontSize*t.geometry.lineHeight}raycast(t,e){let{matrixWorld:r}=this;if(!isNaN(t.ray.origin.x)&&0!==this.scale.x&&0!==this.scale.y&&0!==this.scale.z&&(n.copy(r).invert(),a.copy(t.ray).applyMatrix4(n),a.intersectBox(this.singleBBox,s))){let i=s.applyMatrix4(r),n=t.ray.origin.distanceTo(i);e.push({distance:n,point:i.clone(),object:this})}}};export{o as a};
1
+ import{oa as t}from"./runtime-chunk-AKYP5JEN.js";import{Hc as e,Qc as r,ld as i}from"./runtime-chunk-KPOUV3HD.js";var s=new e,n=new r,a=new i,o=class extends t{constructor(t,e,r){super(t,e,r),this.data=e}get textGeometry(){return this.geometry}get charWidths(){return this.textGeometry.charWidths}get charCoords(){return this.textGeometry.charCoords}get wrappedText(){return this.textGeometry.wrappedText}get font(){return this.textGeometry.font}get initialOffsetY(){let t=this.dataPatched;return this.font?.getLineInitialOffsetY(this.lineHeight,this.wrappedText.length,"number"==typeof t.geometry.height?t.geometry.height:1,this.fontScale,t.geometry.verticalAlign)??0}get fontScale(){let t=this.dataPatched;return this.font?t.geometry.fontSize/this.font.unitsPerEm:1}get AD(){return Math.abs(this.ascender-this.descender)}get ascender(){return(this.font?.ascender??1)*this.fontScale}get descender(){return(this.font?.descender??1)*this.fontScale}get lineHeight(){let t=this.dataPatched;return t.geometry.fontSize*t.geometry.lineHeight}raycast(t,e){let{matrixWorld:r}=this;if(!isNaN(t.ray.origin.x)&&0!==this.scale.x&&0!==this.scale.y&&0!==this.scale.z&&(n.copy(r).invert(),a.copy(t.ray).applyMatrix4(n),a.intersectBox(this.singleBBox,s))){let i=s.applyMatrix4(r),n=t.ray.origin.distanceTo(i);e.push({distance:n,point:i.clone(),object:this})}}};export{o as a};
@@ -1 +1 @@
1
- import{a as t}from"./runtime-chunk-IUQ7L3KJ.js";import{b as e}from"./runtime-chunk-RX5EGOAX.js";import{H as i,ia as r}from"./runtime-chunk-6B2UWQ4D.js";import{f as n,v as s}from"./runtime-chunk-GBBHID5M.js";import{c as o}from"./runtime-chunk-RTLL6WIB.js";import{c as a}from"./runtime-chunk-2PT2WH66.js";import{L as l}from"./runtime-chunk-ADHKZQMB.js";import{Ec as h,Gc as c,Hc as d,Qc as u,Rc as p,Tc as m,Yc as f,sd as y}from"./runtime-chunk-KPOUV3HD.js";import{a as b,b as x}from"./runtime-chunk-ML3Z74BL.js";var g=x(b((t,e)=>{var i,r;i=t,r=function(){return t.importState=function(e){var i=new t;return i.importState(e),i},t;function t(){return function(t){var e=0,i=0,r=0,n=1;0==t.length&&(t=[+new Date]);var s=function(){var t=4022871197,e=function(e){e=e.toString();for(var i=0;i<e.length;i++){var r=.02519603282416938*(t+=e.charCodeAt(i));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)};return e.version="Mash 0.9",e}();e=s(" "),i=s(" "),r=s(" ");for(var o=0;o<t.length;o++)(e-=s(t[o]))<0&&(e+=1),(i-=s(t[o]))<0&&(i+=1),(r-=s(t[o]))<0&&(r+=1);s=null;var a=function(){var t=2091639*e+2.3283064365386963e-10*n;return e=i,i=r,r=t-(n=0|t)};return a.next=a,a.uint32=function(){return 4294967296*a()},a.fract53=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.version="Alea 0.9",a.args=t,a.exportState=function(){return[e,i,r,n]},a.importState=function(t){e=+t[0]||0,i=+t[1]||0,r=+t[2]||0,n=+t[3]||0},a}(Array.prototype.slice.call(arguments))}},"object"==typeof t?e.exports=r():"function"==typeof define&&define.amd?define(r):i.Alea=r()})()),v=.5*(Math.sqrt(3)-1),M=(3-Math.sqrt(3))/6,w=1/3,j=1/6,A=(Math.sqrt(5),Math.sqrt(5),t=>0|Math.floor(t)),S=new Float64Array([1,1,-1,1,1,-1,-1,-1,1,0,-1,0,1,0,-1,0,0,1,0,-1,0,1,0,-1]),_=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);function F(t){let e=new Uint8Array(512);for(let t=0;t<256;t++)e[t]=t;for(let i=0;i<255;i++){let r=i+~~(t()*(256-i)),n=e[i];e[i]=e[r],e[r]=n}for(let t=256;t<512;t++)e[t]=e[t-256];return e}var C=new f,z=class{constructor(t){this.weightAttribute=null;let e=t.geometry;if(!e.isBufferGeometry||3!==e.attributes.position.itemSize)throw new Error("THREE.MeshSurfaceSampler: Requires BufferGeometry triangle mesh.");e.index&&(e=e.toNonIndexed()),this.geometry=e,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute("position"),this.distribution=null}build(){let t=this.positionAttribute,e=new Float32Array(t.count/3);for(let i=0;i<t.count;i+=3){let r=1;C.a.fromBufferAttribute(t,i),C.b.fromBufferAttribute(t,i+1),C.c.fromBufferAttribute(t,i+2),r*=C.getArea(),e[i/3]=r}this.distribution=new Float32Array(t.count/3);let i=0;for(let t=0;t<e.length;t++)i+=e[t],this.distribution[t]=i;return this}setRandomGenerator(t){return this.randomFunction=t,this}sample(t,e){if(this.distribution){let i=this.distribution[this.distribution.length-1],r=this.binarySearch(this.randomFunction()*i);return this.sampleFace(r,t,e)}}binarySearch(t){if(!this.distribution)return 0;let e=this.distribution,i=0,r=e.length-1,n=-1;for(;i<=r;){let s=Math.ceil((i+r)/2);if(0===s||e[s-1]<=t&&e[s]>t){n=s;break}t<e[s]?r=s-1:i=s+1}return n}sampleFace(t,e,i){let r=this.randomFunction(),n=this.randomFunction();return r+n>1&&(r=1-r,n=1-n),C.a.fromBufferAttribute(this.positionAttribute,3*t),C.b.fromBufferAttribute(this.positionAttribute,3*t+1),C.c.fromBufferAttribute(this.positionAttribute,3*t+2),e.set(0,0,0).addScaledVector(C.a,r).addScaledVector(C.b,n).addScaledVector(C.c,1-(r+n)),C.getNormal(i),this}},O={x:[1,0,0],"-x":[-1,0,0],y:[0,1,0],"-y":[0,-1,0],z:[0,0,1],"-z":[0,0,-1]},W={polygon_center:0,edge:1,vertex:2},N=(t,e)=>(i,r)=>e&&0!==i&&0!==t?t*r/100:0,B=(t,e)=>{let i=Math.abs(e),r=-1*i;return(t- -1)*(i-r)/2+r},P=new d,T=new d,U=new d,k=new d;function E(t,e){let i=U.fromArray(t),r=k.fromArray(e);T.copy(r).sub(i);let n=T.length();return T.normalize().multiplyScalar(.5*n),P.copy(i).add(T).toArray()}var I,R,V,D,L=new f,q=new d,G=new d,H=new d,$=class extends y{},Q=class extends ${constructor(t,e){super(void 0,void 0,e),this.source=t,this.isClonerInstancedMesh=!0,this.pivotMatrix=new u,this.previousModelViewMatrix=new u,this.copyPreviousMatrix=!0,this.capacity=e,this.count=0,this.matrixAutoUpdate=!1}raycast(t,e){}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}onAfterRender(t,e,i,r,n,s){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}get visible(){return!0!==this.source.cloner?.insideBoolean&&(this.source.visible||this.source.dataPatched.visible&&!0===this.source.dataPatched.cloner?.hideBase)}set visible(t){}get castShadow(){return this.source.castShadow}set castShadow(t){}get receiveShadow(){return this.source.receiveShadow}set receiveShadow(t){}get layers(){return this.source.layers}set layers(t){}get geometry(){return this.source.geometry}set geometry(t){}get material(){return this.source.material}set material(t){}get morphTargetInfluences(){return this.source.morphTargetInfluences}set morphTargetInfluences(t){}},K=t=>.5*(1-Math.cos(t*Math.PI)),X=class{constructor(){this.perlin=new Array(4096)}noise(t,e=0,i=0){if(null==this.perlin){this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=Math.random()}t<0&&(t=-t),e<0&&(e=-e),i<0&&(i=-i);let r,n,s,o,a,l=Math.floor(t),h=Math.floor(e),c=Math.floor(i),d=t-l,u=e-h,p=i-c,m=0,f=.5;for(let t=0;t<4;t++){let t=l+(h<<4)+(c<<8);r=K(d),n=K(u),s=this.perlin[4095&t],s+=r*(this.perlin[t+1&4095]-s),o=this.perlin[t+16&4095],o+=r*(this.perlin[t+16+1&4095]-o),s+=n*(o-s),t+=256,o=this.perlin[4095&t],o+=r*(this.perlin[t+1&4095]-o),a=this.perlin[t+16&4095],a+=r*(this.perlin[t+16+1&4095]-a),o+=n*(a-o),s+=K(p)*(o-s),m+=s*f,f*=.5,l<<=1,d*=2,h<<=1,u*=2,c<<=1,p*=2,d>=1&&(l++,d--),u>=1&&(h++,u--),p>=1&&(c++,p--)}return m}noiseSeed(t){let e=(()=>{let t,e;return{setSeed(i){e=t=(i??4294967296*Math.random())>>>0},getSeed:()=>t,rand:()=>(e=(1664525*e+1013904223)%4294967296,e/4294967296)}})();e.setSeed(t),this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=e.rand()}},Z=1e-4,J=new d,Y=new d;i.then(t=>{R=[(I=t).get_face_center,I.get_edge_midpoint,I.get_vertex_position],V=[I.get_face_normal,I.get_edge_normal,I.get_vertex_normal],D=[I.face_count,I.edge_count,I.vertex_count]}),new u;var tt=new u,et=new u,it=new u,rt=new u,nt=new u,st=new u,ot=new d,at=new d,lt=new d,ht=new d,ct=new d,dt=new d,ut=new d,pt=new d,mt=new d,ft=new d,yt=new d,bt=new p,xt=new c;function gt(t){return t?t.version??t.data?.version??0:-1}function vt(t,e){return["number"==typeof t?.[0]?t[0]:"string"==typeof t?.[0]&&e?parseFloat(String(e.shared.getVariable(t[0])??"0")):0,"number"==typeof t?.[1]?t[1]:"string"==typeof t?.[1]&&e?parseFloat(String(e.shared.getVariable(t[1])??"0")):0,"number"==typeof t?.[2]?t[2]:"string"==typeof t?.[2]&&e?parseFloat(String(e.shared.getVariable(t[2])??"0")):0]}var Mt=class{constructor(t,e){this.data=t,this.is3D=e,this.perlin=new X,"perlin"===t.noiseType?(this.perlin.noiseSeed(t.seed),this.noise=e?(t,e,i)=>this.perlin.noise(t,e,i):t=>this.perlin.noise(t)):this.noise=e?function(t=Math.random){let e=F(t),i=new Float64Array(e).map(t=>_[t%12*3]),r=new Float64Array(e).map(t=>_[t%12*3+1]),n=new Float64Array(e).map(t=>_[t%12*3+2]);return function(t,s,o){let a,l,h,c,d,u,p,m,f,y,b=(t+s+o)*w,x=A(t+b),g=A(s+b),v=A(o+b),M=(x+g+v)*j,S=t-(x-M),_=s-(g-M),F=o-(v-M);S>=_?_>=F?(d=1,u=0,p=0,m=1,f=1,y=0):S>=F?(d=1,u=0,p=0,m=1,f=0,y=1):(d=0,u=0,p=1,m=1,f=0,y=1):_<F?(d=0,u=0,p=1,m=0,f=1,y=1):S<F?(d=0,u=1,p=0,m=0,f=1,y=1):(d=0,u=1,p=0,m=1,f=1,y=0);let C=S-d+j,z=_-u+j,O=F-p+j,W=S-m+2*j,N=_-f+2*j,B=F-y+2*j,P=S-1+.5,T=_-1+.5,U=F-1+.5,k=255&x,E=255&g,I=255&v,R=.6-S*S-_*_-F*F;if(R<0)a=0;else{let t=k+e[E+e[I]];R*=R,a=R*R*(i[t]*S+r[t]*_+n[t]*F)}let V=.6-C*C-z*z-O*O;if(V<0)l=0;else{let t=k+d+e[E+u+e[I+p]];V*=V,l=V*V*(i[t]*C+r[t]*z+n[t]*O)}let D=.6-W*W-N*N-B*B;if(D<0)h=0;else{let t=k+m+e[E+f+e[I+y]];D*=D,h=D*D*(i[t]*W+r[t]*N+n[t]*B)}let L=.6-P*P-T*T-U*U;if(L<0)c=0;else{let t=k+1+e[E+1+e[I+1]];L*=L,c=L*L*(i[t]*P+r[t]*T+n[t]*U)}return 32*(a+l+h+c)}}((0,g.default)(t.seed)):function(t=Math.random){let e=F(t),i=new Float64Array(e).map(t=>S[t%12*2]),r=new Float64Array(e).map(t=>S[t%12*2+1]);return function(t,n){let s,o,a=0,l=0,h=0,c=(t+n)*v,d=A(t+c),u=A(n+c),p=(d+u)*M,m=t-(d-p),f=n-(u-p);m>f?(s=1,o=0):(s=0,o=1);let y=m-s+M,b=f-o+M,x=m-1+2*M,g=f-1+2*M,w=255&d,j=255&u,S=.5-m*m-f*f;if(S>=0){let t=w+e[j];S*=S,a=S*S*(i[t]*m+r[t]*f)}let _=.5-y*y-b*b;if(_>=0){let t=w+s+e[j+o];_*=_,l=_*_*(i[t]*y+r[t]*b)}let F=.5-x*x-g*g;if(F>=0){let t=w+1+e[j+1];F*=F,h=F*F*(i[t]*x+r[t]*g)}return 70*(a+l+h)}}((0,g.default)(t.seed??""))}},wt=class extends(n(m)){constructor(t,e){super(),this.parameters=e,this.isCloner=!0,this.objectForSample=void 0,this._pendingMediaLoad=!1,this.random=null,this.surfaceSamplerCache=null,this.surfacePointsCache=null,this.object=t}resetOnMove(){this.removeFromParent(),this.parent=null}removeFromParent(){return super.removeFromParent(),this.instancedMesh?.removeFromParent(),this}dispose(){this.removeFromParent(),this._disposeInstancedMesh(),this._invalidateBoolean(),this._syncEnclosingCopies(!0)}createCopy(){return new jt(this)}_syncEnclosingCopies(t){!t&&this.parent!==this.object.parent||this.object.traverseEntityAncestors(e=>{let i=e.cloner;void 0===i||null===i.parent||(t&&i.expandCopies(),i.invalidateTransform(this.object))})}_invalidateBoolean(){this.object instanceof s&&this.object.onClonerLayoutUpdated()}expandClones(t){null===this.parent?this.updateState(this.parameters,t):this.expandCopies()}expandCopies(){for(let t of this.children)t instanceof r&&t.expand();this._syncInstancedMesh()}invalidateTransform(t){this.matrixWorldNeedsUpdate=!0}onObjUpdateMatrix(){"toObject"!==this.parameters.type&&(this.matrixWorldNeedsUpdate=!0)}update(t){this._syncEnclosingCopies(this._layout(t))}_layout(t){let e=this.children.length;switch(this._updateCount(t),this.parameters.type){case"radial":this._updateRadial(this.parameters,t);break;case"linear":this._updateLinear(this.parameters,t);break;case"grid":this._updateGrid(this.parameters,t);break;case"toObject":this._updateToObject(this.parameters,t)}for(let t of this.children){let e=t.transformOverride;void 0!==e&&(t.position.fromArray(e.position),t.rotation.fromArray(e.rotation),t.scale.fromArray(e.scale)),t.updateMatrix(),t.hasNonUniformScale&&(t.updateMatrixWorld(),t.updateMatrixWorldRigid())}return this._syncInstancedMesh(),this._invalidateBoolean(),this.children.length!==e}get instancingActive(){return void 0!==this.instancedMesh}get insideBoolean(){return null!==this.parent&&"booleanOp"in this.parent}_instancingEligible(){if(!0!==this.parameters.instanced)return!1;let t=this.object;return!(t.entityChildrenCount()>0||!0!==t.isMesh||a(t)||!0===t.isDecalObject)}_syncInstancedMesh(){if(!this._instancingEligible())return void this._disposeInstancedMesh();let t=this.instancedMesh;if(void 0!==t&&t.capacity<this.children.length&&(this._disposeInstancedMesh(),t=void 0),void 0===t){let e=Math.max(8,Math.ceil(1.5*this.children.length));t=this.instancedMesh=new Q(this.object,e)}t.matrix=this.matrix,t.matrixWorldNeedsUpdate=!0,t.parent!==this.parent&&(t.removeFromParent(),this.parent?.add(t)),this.syncInstanceMatrices()}syncInstanceMatrices(){this._invalidateBoolean();let t=this.instancedMesh;if(void 0===t)return;let e=0;for(let i of this.children)!1!==i.playModeVisible&&(et.copy(i.matrix).multiply(i.pivotMatrix),t.setMatrixAt(e++,et));t.count=e,t.instanceMatrix.needsUpdate=!0,t.boundingSphere=null}_disposeInstancedMesh(){let t=this.instancedMesh;void 0!==t&&(this.instancedMesh=void 0,t.removeFromParent(),t.dispose())}_updateCount(t,e){let i;if(void 0!==e)i=e;else{let e=vt(this.parameters.grid.count,t);i="grid"===this.parameters.type?Math.round(e[0])*Math.round(e[1])*Math.round(e[2]):this.parameters.count}if("toObject"===this.parameters.type)if(this.parameters.toObject.object){if(void 0===e&&"random"!==this.parameters.toObject.spreadType)return}else i=0;if(this.children.length!==i)if(this.children.length<i)for(let t=0,e=i-this.children.length;t<e;++t){let t=new r(this.object);t.expand(),this.add(t)}else for(;this.children.length>i;){let t=this.children.pop();t.parent=null,t.dispatchEvent({type:"removed"}),this.dispatchEvent({type:"childremoved",child:t})}}getRandom(t,e=!1){return(null===this.random||this.random.data.seed!==t.seed||this.random.data.noiseType!==t.noiseType||this.random.is3D!==e)&&(this.random=new Mt(t,e)),this.random}_updateRadial(t,e){let i,r=t.radial,n=r.start*h.DEG2RAD,s=n-r.end*h.DEG2RAD,o=vt(r.rotation,e),a=new p(o[0],o[1],o[2]);switch(r.axis){case"z":i=new d(0,0,1);break;case"y":i=new d(0,1,0);break;default:i=new d(1,0,0)}let c=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,u=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,m=vt(r.scale,e),f=vt(r.position,e),y=vt(c.scale,e),b=vt(c.position,e),x=vt(c.rotation,e),g=s/t.count,v=N(c.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let s=t*(c.freqScale/10)+c.movement,o=null===u?0:u.noise(s,s,s),l=t+1;e.scale.x=m[0]+v(l,B(o,y[0]))||Z,e.scale.y=m[1]+v(l,B(o,y[1]))||Z,e.scale.z=m[2]+v(l,B(o,y[2]))||Z;let h=g*t-n;switch(r.axis){default:case"x":bt.set(0,h,0);break;case"y":bt.set(0,0,h);break;case"z":bt.set(h,0,0)}ut.copy(i).applyQuaternion(xt.setFromEuler(bt)).multiplyScalar(r.radius),e.position.set(ut.x+(f[0]+v(l,B(o,b[0]))),ut.y+(f[1]+v(l,B(o,b[1]))),ut.z+(f[2]+v(l,B(o,b[2]))));let d=v(l,B(o,x[0])),p=v(l,B(o,x[1])),M=v(l,B(o,x[2]));!0===r.alignment?e.rotation.set(bt.x+(a.x+d),bt.y+(a.y+p),bt.z+(a.z+M)):e.rotation.set(a.x+d,a.y+p,a.z+M)}}_updateLinear(t,e){if("linear"!==t.type)throw new Error;let i=t.linear,r=vt(i.rotation,e),n=vt(i.scale,e),s=vt(i.position,e),o=new p(r[0]??0,r[1]??0,r[2]??0),a=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,h=vt(a.rotation,e),c=vt(a.scale,e),d=vt(a.position,e),u=!0===this.parameters.randomness&&0!==a.strength?this.getRandom(a):null,m=N(a.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let i=t*(a.freqScale/10)+a.movement,r=null===u?0:u.noise(i,i,i),l=t+1,p=m(l,B(r,h[0])),f=m(l,B(r,h[1])),y=m(l,B(r,h[2]));e.scale.x=1+(n[0]-1)*t+m(l,B(r,c[0]))||Z,e.scale.y=1+(n[1]-1)*t+m(l,B(r,c[1]))||Z,e.scale.z=1+(n[2]-1)*t+m(l,B(r,c[2]))||Z,e.rotation.set(o.x*t+p,o.y*t+f,o.z*t+y),e.position.x=s[0]*t+m(l,B(r,d[0])),e.position.y=s[1]*t+m(l,B(r,d[1])),e.position.z=s[2]*t+m(l,B(r,d[2]))}}_updateGrid(t,e){let i=0,r=t.grid,n=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,s=vt(n.scale,e),o=vt(n.rotation,e),a=vt(n.position,e),h=!0===this.parameters.randomness&&0!==n.strength?this.getRandom(n,!0):null,c=N(n.strength,this.parameters.randomness),u=vt(r.count,e),p=vt(r.size,e);if(!0===r.useCenter){let t={x:u[0]%2==0?2:1,y:u[1]%2==0?2:1,z:u[2]%2==0?2:1},e=new d(p[0]*(u[0]-t.x)*.5,p[1]*(u[1]-t.y)*.5,p[2]*(u[2]-t.z)*.5);for(let t=0;t<u[0];t++)for(let r=0;r<u[1];r++)for(let l=0;l<u[2];l++){let d=this.children[i++];if(!d)continue;let u=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement,(l+1)*(n.freqScale/10)+n.movement);d.scale.x=1+c(i,B(u,s[0]))||Z,d.scale.y=1+c(i,B(u,s[1]))||Z,d.scale.z=1+c(i,B(u,s[2]))||Z;let m=c(i,B(u,o[0])),f=c(i,B(u,o[1])),y=c(i,B(u,o[2]));d.rotation.set(m,f,y),d.position.x=p[0]*t-e.x+c(i,B(u,a[0])),d.position.y=p[1]*r-e.y+c(i,B(u,a[1])),d.position.z=p[2]*l-e.z+c(i,B(u,a[2]))}}else for(let t=0;t<u[0];t++)for(let e=0;e<u[1];e++)for(let r=0;r<u[2];r++){let l=this.children[i++];if(!l)continue;let d=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(e+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement);l.scale.x=1+c(i,B(d,s[0]))||Z,l.scale.y=1+c(i,B(d,s[1]))||Z,l.scale.z=1+c(i,B(d,s[2]))||Z;let u=c(i,B(d,o[0])),m=c(i,B(d,o[1])),f=c(i,B(d,o[2]));l.rotation.set(u,m,f),l.position.x=p[0]*t+c(i,B(d,a[0])),l.position.y=-p[1]*e+c(i,B(d,a[1])),l.position.z=-p[2]*r+c(i,B(d,a[2]))}}_updateToObject(i,r){if("toObject"!==i.type)throw new Error;let{toObject:n}=i,s=vt(n.rotation,r),o=vt(n.position,r),a=vt(n.scale,r),h=new p(s[0],s[1],s[2]),c=i.randomnessObject??l.defaultData([1,1,1]).randomnessObject,d=vt(c.rotation,r),u=vt(c.position,r),m=vt(c.scale,r),f=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,y=N(c.strength,this.parameters.randomness);if(!n.object){for(let[,t]of this.children.entries())t.position.set(0,0,0),t.scale.setScalar(1),t.rotation.set(0,0,0);return this.objectForSample=void 0,void this.invalidateSurfaceCaches()}if(!this.objectForSample)return;if(this.objectForSample instanceof t){if(!this.objectForSample.font?.isLoaded||void 0===this.objectForSample.geometry.attributes.position)return void(this._pendingMediaLoad=!0);this._pendingMediaLoad=!1}if(void 0===this.objectForSample.geometry&&this.objectForSample.isAncestorOf(this.object.uuid))return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) seem to be a child/descendant of the object it's being cloned to. Please re-parent it so that they are siblings instead.`);let b=this.getSubdivData();if(b.length>0){let t=Math.round(b.length*n.count/100);this._updateCount(r,t)}else{let t=this.objectForSample.geometry.getAttribute("position");if(!t||isNaN(t.count)||0===t.count)return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) cannot be cloned on the surface of "${this.objectForSample.name}" (${this.objectForSample.uuid}) because the latter does not have a valid geometry.`)}this.objectForSample.updateMatrixWorld();let x="random"===n.spreadType,v=null;x&&(v=this.getSurfaceSampler(),v.setRandomGenerator((0,g.default)(this.object.uuid+n.seed)));let M=O[n.axis],w=this.children;ot.fromArray(M);let j=this.objectForSample instanceof e;j&&it.copy(this.objectForSample.matrixWorld).invert(),"normal"!==n.align&&this.object.getWorldDirection(dt),ft.set(ot.y,ot.z,ot.x).normalize(),yt.copy(ft).cross(ot).normalize(),nt.makeBasis(ft,ot,yt).invert();for(let[t,e]of w.entries()){let i=t*(c.freqScale/10)+c.movement,r=null===f?0:f.noise(i,i,i),s=t+1,l=y(s,B(r,d[0])),p=y(s,B(r,d[1])),g=y(s,B(r,d[2]));x?v.sample(lt,ht):(b.length&&(lt.fromArray(b[t].pos),ht.fromArray(b[t].norm)),j&&lt.applyMatrix4(it)),e.position.copy(lt);let M="normal"===n.align?ht:dt,w=at.fromArray(o);at.x+=y(s,B(r,u[0])),at.y+=y(s,B(r,u[1])),at.z+=y(s,B(r,u[2]));let A=Math.acos(M.dot(ot)),S=ct.crossVectors(ot,M).normalize(),_=tt.makeRotationAxis(S,A);pt.copy(M).cross(this.object.up).normalize(),mt.copy(pt).cross(M).normalize(),rt.makeBasis(pt,M,mt),st.multiplyMatrices(rt,nt),bt.setFromRotationMatrix(st),w.applyMatrix4(_),e.position.add(w),e.rotation.set(bt.x+h.x+l,bt.y+h.y+p,bt.z+h.z+g),e.scale.set(1+a[0]+y(s,B(r,m[0]))||Z,1+a[1]+y(s,B(r,m[1]))||Z,1+a[2]+y(s,B(r,m[2]))||Z),e.scale.multiply(this.object.scale)}}getSurfaceSampler(){let t=this.objectForSample,e=t.geometry,i=e.getAttribute("position"),r=e.index,n=this.surfaceSamplerCache;if(null!==n&&n.geometry===e&&n.position===i&&n.positionVersion===gt(i)&&n.index===r&&n.indexVersion===(null===r?-1:r.version))return n.sampler;let s=new z(t).build();return this.surfaceSamplerCache={geometry:e,position:i,positionVersion:gt(i),index:r,indexVersion:null===r?-1:r.version,sampler:s},s}invalidateSurfaceCaches(){this.surfaceSamplerCache=null,this.surfacePointsCache=null}getSubdivData(){if(!this.objectForSample)return[];let t=this.parameters.toObject.spreadType;if("random"===t)return[];let i=this.objectForSample instanceof e,r=this.objectForSample.geometry;if(!i&&r){let e=this.surfacePointsCache,i=r.getAttribute("position");if(null!==e&&e.spreadType===t&&e.geometry===r&&e.position===i&&e.positionVersion===gt(i)&&e.index===r.index&&e.indexVersion===(null===r.index?-1:r.index.version))return e.points}let n=new Map,s=(t,e)=>{let i=Math.round(1e4*t[0])+"_"+Math.round(1e4*t[1])+"_"+Math.round(1e4*t[2]),r=n.get(i);r?(r.pos[0]+=t[0],r.pos[1]+=t[1],r.pos[2]+=t[2],r.norm[0]+=e[0],r.norm[1]+=e[1],r.norm[2]+=e[2],r.count+=1):n.set(i,{pos:[...t],norm:[...e],count:1})};if(i){let e=this.objectForSample,i=W[t],r=D[i],n=R[i],o=V[i],a=r(e.subdivPointerNew);for(let t=0;t<=a-1;t++){let i=n(e.subdivPointerNew,t),r=o(e.subdivPointerNew,t);J.fromArray(i).applyMatrix4(e.matrixWorld),Y.fromArray(r),s(J.toArray(),Y.toArray())}}else(r.index?function(t){let e=[],i=Math.floor(t.index.count/3);for(let r=0;r<i;r++)if(q.fromArray(t.index.array,3*r),L.setFromAttributeAndIndices(t.attributes.position,q.x,q.y,q.z),L.getNormal(G),L.getMidpoint(H),!(isNaN(H.x)||isNaN(H.y)||isNaN(H.z))){let{a:t,b:i,c:r}=L,n=t.toArray(),s=i.toArray(),o=r.toArray(),a=t.distanceTo(i),l=i.distanceTo(r),h=r.distanceTo(t),c=E(n,s),d=E(s,o),u=E(o,n),p=[a,l,h],m=Math.max(...p),f=p.filter(t=>Math.round(t)===Math.round(m)).length>1,y=[],b=L.getMidpoint(H).toArray();m===a&&!f&&(y=[d,u,u],b=c),m===l&&!f&&(y=[c,u,u],b=d),m===h&&!f&&(y=[c,d,d],b=u),f&&(y=[c,d,u]),e.push({vertices:[n,s,o],faceCenters:y,midpoint:b,norm:L.getNormal(G).toArray()})}return e}(r):function(t){let e=[],{position:i}=t.attributes;for(let t=0;t<i.count;t++){L.setFromAttributeAndIndices(i,3*t,3*t+1,3*t+2),L.getNormal(G),L.getMidpoint(H);let r=L.a.toArray(),n=L.b.toArray(),s=L.c.toArray();e.push({vertices:[r,n,s],faceCenters:[E(r,n),E(n,s),E(s,r)],midpoint:H.toArray(),norm:G.toArray()})}return e}(r)).forEach((e,i)=>{"polygon_center"===t&&s(e.midpoint,e.norm),"vertex"===t&&(s(e.vertices[0],e.norm),s(e.vertices[1],e.norm),s(e.vertices[2],e.norm)),"edge"===t&&(s(e.faceCenters[0],e.norm),s(e.faceCenters[1],e.norm),s(e.faceCenters[2],e.norm))});let o=Array.from(n.values());for(let t of o)t.pos[0]/=t.count,t.pos[1]/=t.count,t.pos[2]/=t.count,t.norm[0]/=t.count,t.norm[1]/=t.count,t.norm[2]/=t.count;if(!i&&r){let e=r.getAttribute("position");this.surfacePointsCache={spreadType:t,geometry:r,position:e,positionVersion:gt(e),index:r.index,indexVersion:null===r.index?-1:r.index.version,points:o}}return o}updateState(t,e){this.parameters=o(t);let{parent:i,matrix:r}=this;if("toObject"!==this.parameters.type)this.invalidateSurfaceCaches(),(null===this.parent||this.parent!==this.object)&&(this.removeFromParent(),this.object.parent?.add(this),this.matrix=this.object.matrix,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1);else if(null===this.parent||this.parent.uuid!==this.parameters.toObject.object){this.removeFromParent(),this.invalidateSurfaceCaches();let t=e.scene.find(this.parameters.toObject.object);this.objectForSample=t instanceof s?t:void 0,this.matrix=new u,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1,t&&t.add(this)}let n=this._layout(e);this._syncEnclosingCopies(n||this.parent!==i||this.matrix!==r)}get pendingMediaLoad(){return this._pendingMediaLoad}},jt=class extends wt{constructor(t){super(t.object,t.parameters),this.source=t,this.matrixAutoUpdate=!1}get insideBoolean(){return this.source.insideBoolean}expand(){this.matrix=this.source.matrix,this.matrixWorldNeedsUpdate=!0;let t=0;for(let e of this.source.children){if(!(e instanceof r))continue;let i=this.children[t];void 0===i&&(i=new r(this.object),this.add(i)),i.matrix=e.matrix,i.matrixWorldNeedsUpdate=!0,i.expand(),t+=1}for(;this.children.length>t;)this.remove(this.children[t])}};export{wt as a};
1
+ import{a as t}from"./runtime-chunk-JEWYXMKG.js";import{b as e}from"./runtime-chunk-P4DZASDE.js";import{H as i,ia as r}from"./runtime-chunk-AKYP5JEN.js";import{f as n,v as s}from"./runtime-chunk-DN4GIGTV.js";import{c as o}from"./runtime-chunk-RTLL6WIB.js";import{c as a}from"./runtime-chunk-2PT2WH66.js";import{L as l}from"./runtime-chunk-ADHKZQMB.js";import{Ec as h,Gc as c,Hc as d,Qc as u,Rc as p,Tc as m,Yc as f,sd as y}from"./runtime-chunk-KPOUV3HD.js";import{a as b,b as x}from"./runtime-chunk-ML3Z74BL.js";var g=x(b((t,e)=>{var i,r;i=t,r=function(){return t.importState=function(e){var i=new t;return i.importState(e),i},t;function t(){return function(t){var e=0,i=0,r=0,n=1;0==t.length&&(t=[+new Date]);var s=function(){var t=4022871197,e=function(e){e=e.toString();for(var i=0;i<e.length;i++){var r=.02519603282416938*(t+=e.charCodeAt(i));r-=t=r>>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)};return e.version="Mash 0.9",e}();e=s(" "),i=s(" "),r=s(" ");for(var o=0;o<t.length;o++)(e-=s(t[o]))<0&&(e+=1),(i-=s(t[o]))<0&&(i+=1),(r-=s(t[o]))<0&&(r+=1);s=null;var a=function(){var t=2091639*e+2.3283064365386963e-10*n;return e=i,i=r,r=t-(n=0|t)};return a.next=a,a.uint32=function(){return 4294967296*a()},a.fract53=function(){return a()+11102230246251565e-32*(2097152*a()|0)},a.version="Alea 0.9",a.args=t,a.exportState=function(){return[e,i,r,n]},a.importState=function(t){e=+t[0]||0,i=+t[1]||0,r=+t[2]||0,n=+t[3]||0},a}(Array.prototype.slice.call(arguments))}},"object"==typeof t?e.exports=r():"function"==typeof define&&define.amd?define(r):i.Alea=r()})()),v=.5*(Math.sqrt(3)-1),M=(3-Math.sqrt(3))/6,w=1/3,j=1/6,A=(Math.sqrt(5),Math.sqrt(5),t=>0|Math.floor(t)),S=new Float64Array([1,1,-1,1,1,-1,-1,-1,1,0,-1,0,1,0,-1,0,0,1,0,-1,0,1,0,-1]),_=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);function F(t){let e=new Uint8Array(512);for(let t=0;t<256;t++)e[t]=t;for(let i=0;i<255;i++){let r=i+~~(t()*(256-i)),n=e[i];e[i]=e[r],e[r]=n}for(let t=256;t<512;t++)e[t]=e[t-256];return e}var C=new f,z=class{constructor(t){this.weightAttribute=null;let e=t.geometry;if(!e.isBufferGeometry||3!==e.attributes.position.itemSize)throw new Error("THREE.MeshSurfaceSampler: Requires BufferGeometry triangle mesh.");e.index&&(e=e.toNonIndexed()),this.geometry=e,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute("position"),this.distribution=null}build(){let t=this.positionAttribute,e=new Float32Array(t.count/3);for(let i=0;i<t.count;i+=3){let r=1;C.a.fromBufferAttribute(t,i),C.b.fromBufferAttribute(t,i+1),C.c.fromBufferAttribute(t,i+2),r*=C.getArea(),e[i/3]=r}this.distribution=new Float32Array(t.count/3);let i=0;for(let t=0;t<e.length;t++)i+=e[t],this.distribution[t]=i;return this}setRandomGenerator(t){return this.randomFunction=t,this}sample(t,e){if(this.distribution){let i=this.distribution[this.distribution.length-1],r=this.binarySearch(this.randomFunction()*i);return this.sampleFace(r,t,e)}}binarySearch(t){if(!this.distribution)return 0;let e=this.distribution,i=0,r=e.length-1,n=-1;for(;i<=r;){let s=Math.ceil((i+r)/2);if(0===s||e[s-1]<=t&&e[s]>t){n=s;break}t<e[s]?r=s-1:i=s+1}return n}sampleFace(t,e,i){let r=this.randomFunction(),n=this.randomFunction();return r+n>1&&(r=1-r,n=1-n),C.a.fromBufferAttribute(this.positionAttribute,3*t),C.b.fromBufferAttribute(this.positionAttribute,3*t+1),C.c.fromBufferAttribute(this.positionAttribute,3*t+2),e.set(0,0,0).addScaledVector(C.a,r).addScaledVector(C.b,n).addScaledVector(C.c,1-(r+n)),C.getNormal(i),this}},W={x:[1,0,0],"-x":[-1,0,0],y:[0,1,0],"-y":[0,-1,0],z:[0,0,1],"-z":[0,0,-1]},O={polygon_center:0,edge:1,vertex:2},N=(t,e)=>(i,r)=>e&&0!==i&&0!==t?t*r/100:0,P=(t,e)=>{let i=Math.abs(e),r=-1*i;return(t- -1)*(i-r)/2+r},T=new d,B=new d,E=new d,U=new d;function V(t,e){let i=E.fromArray(t),r=U.fromArray(e);B.copy(r).sub(i);let n=B.length();return B.normalize().multiplyScalar(.5*n),T.copy(i).add(B).toArray()}var k,D,I,R,q=new f,L=new d,G=new d,H=new d,$=class extends y{},K=class extends ${constructor(t,e){super(void 0,void 0,e),this.source=t,this.isClonerInstancedMesh=!0,this.pivotMatrix=new u,this.previousModelViewMatrix=new u,this.copyPreviousMatrix=!0,this.capacity=e,this.count=0,this.matrixAutoUpdate=!1}raycast(t,e){}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}onAfterRender(t,e,i,r,n,s){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}get visible(){return!0!==this.source.cloner?.insideBoolean&&(this.source.visible||this.source.dataPatched.visible&&!0===this.source.dataPatched.cloner?.hideBase)}set visible(t){}get castShadow(){return this.source.castShadow}set castShadow(t){}get receiveShadow(){return this.source.receiveShadow}set receiveShadow(t){}get layers(){return this.source.layers}set layers(t){}get geometry(){return this.source.geometry}set geometry(t){}get material(){return this.source.material}set material(t){}get morphTargetInfluences(){return this.source.morphTargetInfluences}set morphTargetInfluences(t){}},Q=t=>.5*(1-Math.cos(t*Math.PI)),Y=class{constructor(){this.perlin=new Array(4096)}noise(t,e=0,i=0){if(null==this.perlin){this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=Math.random()}t<0&&(t=-t),e<0&&(e=-e),i<0&&(i=-i);let r,n,s,o,a,l=Math.floor(t),h=Math.floor(e),c=Math.floor(i),d=t-l,u=e-h,p=i-c,m=0,f=.5;for(let t=0;t<4;t++){let t=l+(h<<4)+(c<<8);r=Q(d),n=Q(u),s=this.perlin[4095&t],s+=r*(this.perlin[t+1&4095]-s),o=this.perlin[t+16&4095],o+=r*(this.perlin[t+16+1&4095]-o),s+=n*(o-s),t+=256,o=this.perlin[4095&t],o+=r*(this.perlin[t+1&4095]-o),a=this.perlin[t+16&4095],a+=r*(this.perlin[t+16+1&4095]-a),o+=n*(a-o),s+=Q(p)*(o-s),m+=s*f,f*=.5,l<<=1,d*=2,h<<=1,u*=2,c<<=1,p*=2,d>=1&&(l++,d--),u>=1&&(h++,u--),p>=1&&(c++,p--)}return m}noiseSeed(t){let e=(()=>{let t,e;return{setSeed(i){e=t=(i??4294967296*Math.random())>>>0},getSeed:()=>t,rand:()=>(e=(1664525*e+1013904223)%4294967296,e/4294967296)}})();e.setSeed(t),this.perlin=new Array(4096);for(let t=0;t<4096;t++)this.perlin[t]=e.rand()}},Z=1e-4,J=new d,X=new d;i.then(t=>{D=[(k=t).get_face_center,k.get_edge_midpoint,k.get_vertex_position],I=[k.get_face_normal,k.get_edge_normal,k.get_vertex_normal],R=[k.face_count,k.edge_count,k.vertex_count]}),new u;var tt=new u,et=new u,it=new u,rt=new u,nt=new u,st=new u,ot=new d,at=new d,lt=new d,ht=new d,ct=new d,dt=new d,ut=new d,pt=new d,mt=new d,ft=new d,yt=new d,bt=new p,xt=new c;function gt(t){return t?t.version??t.data?.version??0:-1}function vt(t,e){return["number"==typeof t?.[0]?t[0]:"string"==typeof t?.[0]&&e?parseFloat(String(e.shared.getVariable(t[0])??"0")):0,"number"==typeof t?.[1]?t[1]:"string"==typeof t?.[1]&&e?parseFloat(String(e.shared.getVariable(t[1])??"0")):0,"number"==typeof t?.[2]?t[2]:"string"==typeof t?.[2]&&e?parseFloat(String(e.shared.getVariable(t[2])??"0")):0]}var Mt=class{constructor(t,e){this.data=t,this.is3D=e,this.perlin=new Y,"perlin"===t.noiseType?(this.perlin.noiseSeed(t.seed),this.noise=e?(t,e,i)=>this.perlin.noise(t,e,i):t=>this.perlin.noise(t)):this.noise=e?function(t=Math.random){let e=F(t),i=new Float64Array(e).map(t=>_[t%12*3]),r=new Float64Array(e).map(t=>_[t%12*3+1]),n=new Float64Array(e).map(t=>_[t%12*3+2]);return function(t,s,o){let a,l,h,c,d,u,p,m,f,y,b=(t+s+o)*w,x=A(t+b),g=A(s+b),v=A(o+b),M=(x+g+v)*j,S=t-(x-M),_=s-(g-M),F=o-(v-M);S>=_?_>=F?(d=1,u=0,p=0,m=1,f=1,y=0):S>=F?(d=1,u=0,p=0,m=1,f=0,y=1):(d=0,u=0,p=1,m=1,f=0,y=1):_<F?(d=0,u=0,p=1,m=0,f=1,y=1):S<F?(d=0,u=1,p=0,m=0,f=1,y=1):(d=0,u=1,p=0,m=1,f=1,y=0);let C=S-d+j,z=_-u+j,W=F-p+j,O=S-m+2*j,N=_-f+2*j,P=F-y+2*j,T=S-1+.5,B=_-1+.5,E=F-1+.5,U=255&x,V=255&g,k=255&v,D=.6-S*S-_*_-F*F;if(D<0)a=0;else{let t=U+e[V+e[k]];D*=D,a=D*D*(i[t]*S+r[t]*_+n[t]*F)}let I=.6-C*C-z*z-W*W;if(I<0)l=0;else{let t=U+d+e[V+u+e[k+p]];I*=I,l=I*I*(i[t]*C+r[t]*z+n[t]*W)}let R=.6-O*O-N*N-P*P;if(R<0)h=0;else{let t=U+m+e[V+f+e[k+y]];R*=R,h=R*R*(i[t]*O+r[t]*N+n[t]*P)}let q=.6-T*T-B*B-E*E;if(q<0)c=0;else{let t=U+1+e[V+1+e[k+1]];q*=q,c=q*q*(i[t]*T+r[t]*B+n[t]*E)}return 32*(a+l+h+c)}}((0,g.default)(t.seed)):function(t=Math.random){let e=F(t),i=new Float64Array(e).map(t=>S[t%12*2]),r=new Float64Array(e).map(t=>S[t%12*2+1]);return function(t,n){let s,o,a=0,l=0,h=0,c=(t+n)*v,d=A(t+c),u=A(n+c),p=(d+u)*M,m=t-(d-p),f=n-(u-p);m>f?(s=1,o=0):(s=0,o=1);let y=m-s+M,b=f-o+M,x=m-1+2*M,g=f-1+2*M,w=255&d,j=255&u,S=.5-m*m-f*f;if(S>=0){let t=w+e[j];S*=S,a=S*S*(i[t]*m+r[t]*f)}let _=.5-y*y-b*b;if(_>=0){let t=w+s+e[j+o];_*=_,l=_*_*(i[t]*y+r[t]*b)}let F=.5-x*x-g*g;if(F>=0){let t=w+1+e[j+1];F*=F,h=F*F*(i[t]*x+r[t]*g)}return 70*(a+l+h)}}((0,g.default)(t.seed??""))}},wt=class extends(n(m)){constructor(t,e){super(),this.parameters=e,this.isCloner=!0,this.objectForSample=void 0,this._pendingMediaLoad=!1,this.random=null,this.surfaceSamplerCache=null,this.surfacePointsCache=null,this.object=t}resetOnMove(){this.removeFromParent(),this.parent=null}removeFromParent(){return super.removeFromParent(),this.instancedMesh?.removeFromParent(),this}dispose(){this.removeFromParent(),this._disposeInstancedMesh(),this._invalidateBoolean(),this._syncEnclosingCopies(!0)}createCopy(){return new jt(this)}_syncEnclosingCopies(t){!t&&this.parent!==this.object.parent||this.object.traverseEntityAncestors(e=>{let i=e.cloner;void 0===i||null===i.parent||(t&&i.expandCopies(),i.invalidateTransform(this.object))})}_invalidateBoolean(){this.object instanceof s&&this.object.onClonerLayoutUpdated()}expandClones(t){null===this.parent?this.updateState(this.parameters,t):this.expandCopies()}expandCopies(){for(let t of this.children)t instanceof r&&t.expand();this._syncInstancedMesh()}invalidateTransform(t){this.matrixWorldNeedsUpdate=!0}onObjUpdateMatrix(){"toObject"!==this.parameters.type&&(this.matrixWorldNeedsUpdate=!0)}update(t){this._syncEnclosingCopies(this._layout(t))}_layout(t){let e=this.children.length;switch(this._updateCount(t),this.parameters.type){case"radial":this._updateRadial(this.parameters,t);break;case"linear":this._updateLinear(this.parameters,t);break;case"grid":this._updateGrid(this.parameters,t);break;case"toObject":this._updateToObject(this.parameters,t)}for(let t of this.children){let e=t.transformOverride;void 0!==e&&(t.position.fromArray(e.position),t.rotation.fromArray(e.rotation),t.scale.fromArray(e.scale)),t.updateMatrix(),t.hasNonUniformScale&&(t.updateMatrixWorld(),t.updateMatrixWorldRigid())}return this._syncInstancedMesh(),this._invalidateBoolean(),this.children.length!==e}get instancingActive(){return void 0!==this.instancedMesh}get insideBoolean(){return null!==this.parent&&"booleanOp"in this.parent}_instancingEligible(){if(!0!==this.parameters.instanced)return!1;let t=this.object;return!(t.entityChildrenCount()>0||!0!==t.isMesh||a(t)||!0===t.isDecalObject)}_syncInstancedMesh(){if(!this._instancingEligible())return void this._disposeInstancedMesh();let t=this.instancedMesh;if(void 0!==t&&t.capacity<this.children.length&&(this._disposeInstancedMesh(),t=void 0),void 0===t){let e=Math.max(8,Math.ceil(1.5*this.children.length));t=this.instancedMesh=new K(this.object,e)}t.matrix=this.matrix,t.matrixWorldNeedsUpdate=!0,t.parent!==this.parent&&(t.removeFromParent(),this.parent?.add(t)),this.syncInstanceMatrices()}syncInstanceMatrices(){this._invalidateBoolean();let t=this.instancedMesh;if(void 0===t)return;let e=0;for(let i of this.children)!1!==i.playModeVisible&&(et.copy(i.matrix).multiply(i.pivotMatrix),t.setMatrixAt(e++,et));t.count=e,t.instanceMatrix.needsUpdate=!0,t.boundingSphere=null}_disposeInstancedMesh(){let t=this.instancedMesh;void 0!==t&&(this.instancedMesh=void 0,t.removeFromParent(),t.dispose())}_updateCount(t,e){let i;if(void 0!==e)i=e;else{let e=vt(this.parameters.grid.count,t);i="grid"===this.parameters.type?Math.round(e[0])*Math.round(e[1])*Math.round(e[2]):this.parameters.count}if("toObject"===this.parameters.type)if(this.parameters.toObject.object){if(void 0===e&&"random"!==this.parameters.toObject.spreadType)return}else i=0;if(this.children.length!==i)if(this.children.length<i)for(let t=0,e=i-this.children.length;t<e;++t){let t=new r(this.object);t.expand(),this.add(t)}else for(;this.children.length>i;){let t=this.children.pop();t.parent=null,t.dispatchEvent({type:"removed"}),this.dispatchEvent({type:"childremoved",child:t})}}getRandom(t,e=!1){return(null===this.random||this.random.data.seed!==t.seed||this.random.data.noiseType!==t.noiseType||this.random.is3D!==e)&&(this.random=new Mt(t,e)),this.random}_updateRadial(t,e){let i,r=t.radial,n=r.start*h.DEG2RAD,s=n-r.end*h.DEG2RAD,o=vt(r.rotation,e),a=new p(o[0],o[1],o[2]);switch(r.axis){case"z":i=new d(0,0,1);break;case"y":i=new d(0,1,0);break;default:i=new d(1,0,0)}let c=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,u=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,m=vt(r.scale,e),f=vt(r.position,e),y=vt(c.scale,e),b=vt(c.position,e),x=vt(c.rotation,e),g=s/t.count,v=N(c.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let s=t*(c.freqScale/10)+c.movement,o=null===u?0:u.noise(s,s,s),l=t+1;e.scale.x=m[0]+v(l,P(o,y[0]))||Z,e.scale.y=m[1]+v(l,P(o,y[1]))||Z,e.scale.z=m[2]+v(l,P(o,y[2]))||Z;let h=g*t-n;switch(r.axis){default:case"x":bt.set(0,h,0);break;case"y":bt.set(0,0,h);break;case"z":bt.set(h,0,0)}ut.copy(i).applyQuaternion(xt.setFromEuler(bt)).multiplyScalar(r.radius),e.position.set(ut.x+(f[0]+v(l,P(o,b[0]))),ut.y+(f[1]+v(l,P(o,b[1]))),ut.z+(f[2]+v(l,P(o,b[2]))));let d=v(l,P(o,x[0])),p=v(l,P(o,x[1])),M=v(l,P(o,x[2]));!0===r.alignment?e.rotation.set(bt.x+(a.x+d),bt.y+(a.y+p),bt.z+(a.z+M)):e.rotation.set(a.x+d,a.y+p,a.z+M)}}_updateLinear(t,e){if("linear"!==t.type)throw new Error;let i=t.linear,r=vt(i.rotation,e),n=vt(i.scale,e),s=vt(i.position,e),o=new p(r[0]??0,r[1]??0,r[2]??0),a=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,h=vt(a.rotation,e),c=vt(a.scale,e),d=vt(a.position,e),u=!0===this.parameters.randomness&&0!==a.strength?this.getRandom(a):null,m=N(a.strength,this.parameters.randomness);for(let[t,e]of this.children.entries()){let i=t*(a.freqScale/10)+a.movement,r=null===u?0:u.noise(i,i,i),l=t+1,p=m(l,P(r,h[0])),f=m(l,P(r,h[1])),y=m(l,P(r,h[2]));e.scale.x=1+(n[0]-1)*t+m(l,P(r,c[0]))||Z,e.scale.y=1+(n[1]-1)*t+m(l,P(r,c[1]))||Z,e.scale.z=1+(n[2]-1)*t+m(l,P(r,c[2]))||Z,e.rotation.set(o.x*t+p,o.y*t+f,o.z*t+y),e.position.x=s[0]*t+m(l,P(r,d[0])),e.position.y=s[1]*t+m(l,P(r,d[1])),e.position.z=s[2]*t+m(l,P(r,d[2]))}}_updateGrid(t,e){let i=0,r=t.grid,n=t.randomnessObject??l.defaultData([1,1,1]).randomnessObject,s=vt(n.scale,e),o=vt(n.rotation,e),a=vt(n.position,e),h=!0===this.parameters.randomness&&0!==n.strength?this.getRandom(n,!0):null,c=N(n.strength,this.parameters.randomness),u=vt(r.count,e),p=vt(r.size,e);if(!0===r.useCenter){let t={x:u[0]%2==0?2:1,y:u[1]%2==0?2:1,z:u[2]%2==0?2:1},e=new d(p[0]*(u[0]-t.x)*.5,p[1]*(u[1]-t.y)*.5,p[2]*(u[2]-t.z)*.5);for(let t=0;t<u[0];t++)for(let r=0;r<u[1];r++)for(let l=0;l<u[2];l++){let d=this.children[i++];if(!d)continue;let u=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement,(l+1)*(n.freqScale/10)+n.movement);d.scale.x=1+c(i,P(u,s[0]))||Z,d.scale.y=1+c(i,P(u,s[1]))||Z,d.scale.z=1+c(i,P(u,s[2]))||Z;let m=c(i,P(u,o[0])),f=c(i,P(u,o[1])),y=c(i,P(u,o[2]));d.rotation.set(m,f,y),d.position.x=p[0]*t-e.x+c(i,P(u,a[0])),d.position.y=p[1]*r-e.y+c(i,P(u,a[1])),d.position.z=p[2]*l-e.z+c(i,P(u,a[2]))}}else for(let t=0;t<u[0];t++)for(let e=0;e<u[1];e++)for(let r=0;r<u[2];r++){let l=this.children[i++];if(!l)continue;let d=null===h?0:h.noise((t+1)*(n.freqScale/10)+n.movement,(e+1)*(n.freqScale/10)+n.movement,(r+1)*(n.freqScale/10)+n.movement);l.scale.x=1+c(i,P(d,s[0]))||Z,l.scale.y=1+c(i,P(d,s[1]))||Z,l.scale.z=1+c(i,P(d,s[2]))||Z;let u=c(i,P(d,o[0])),m=c(i,P(d,o[1])),f=c(i,P(d,o[2]));l.rotation.set(u,m,f),l.position.x=p[0]*t+c(i,P(d,a[0])),l.position.y=-p[1]*e+c(i,P(d,a[1])),l.position.z=-p[2]*r+c(i,P(d,a[2]))}}_updateToObject(i,r){if("toObject"!==i.type)throw new Error;let{toObject:n}=i,s=vt(n.rotation,r),o=vt(n.position,r),a=vt(n.scale,r),h=new p(s[0],s[1],s[2]),c=i.randomnessObject??l.defaultData([1,1,1]).randomnessObject,d=vt(c.rotation,r),u=vt(c.position,r),m=vt(c.scale,r),f=!0===this.parameters.randomness&&0!==c.strength?this.getRandom(c):null,y=N(c.strength,this.parameters.randomness);if(!n.object){for(let[,t]of this.children.entries())t.position.set(0,0,0),t.scale.setScalar(1),t.rotation.set(0,0,0);return this.objectForSample=void 0,void this.invalidateSurfaceCaches()}if(!this.objectForSample)return;if(this.objectForSample instanceof t){if(!this.objectForSample.font?.isLoaded||void 0===this.objectForSample.geometry.attributes.position)return void(this._pendingMediaLoad=!0);this._pendingMediaLoad=!1}if(void 0===this.objectForSample.geometry&&this.objectForSample.isAncestorOf(this.object.uuid))return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) seem to be a child/descendant of the object it's being cloned to. Please re-parent it so that they are siblings instead.`);let b=this.getSubdivData();if(b.length>0){let t=Math.round(b.length*n.count/100);this._updateCount(r,t)}else{let t=this.objectForSample.geometry.getAttribute("position");if(!t||isNaN(t.count)||0===t.count)return void console.warn(`Oh no! The object "${this.object.name}" (${this.object.uuid}) cannot be cloned on the surface of "${this.objectForSample.name}" (${this.objectForSample.uuid}) because the latter does not have a valid geometry.`)}this.objectForSample.updateMatrixWorld();let x="random"===n.spreadType,v=null;x&&(v=this.getSurfaceSampler(),v.setRandomGenerator((0,g.default)(this.object.uuid+n.seed)));let M=W[n.axis],w=this.children;ot.fromArray(M);let j=this.objectForSample instanceof e;j&&it.copy(this.objectForSample.matrixWorld).invert(),"normal"!==n.align&&this.object.getWorldDirection(dt),ft.set(ot.y,ot.z,ot.x).normalize(),yt.copy(ft).cross(ot).normalize(),nt.makeBasis(ft,ot,yt).invert();for(let[t,e]of w.entries()){let i=t*(c.freqScale/10)+c.movement,r=null===f?0:f.noise(i,i,i),s=t+1,l=y(s,P(r,d[0])),p=y(s,P(r,d[1])),g=y(s,P(r,d[2]));x?v.sample(lt,ht):(b.length&&(lt.fromArray(b[t].pos),ht.fromArray(b[t].norm)),j&&lt.applyMatrix4(it)),e.position.copy(lt);let M="normal"===n.align?ht:dt,w=at.fromArray(o);at.x+=y(s,P(r,u[0])),at.y+=y(s,P(r,u[1])),at.z+=y(s,P(r,u[2]));let A=Math.acos(M.dot(ot)),S=ct.crossVectors(ot,M).normalize(),_=tt.makeRotationAxis(S,A);pt.copy(M).cross(this.object.up).normalize(),mt.copy(pt).cross(M).normalize(),rt.makeBasis(pt,M,mt),st.multiplyMatrices(rt,nt),bt.setFromRotationMatrix(st),w.applyMatrix4(_),e.position.add(w),e.rotation.set(bt.x+h.x+l,bt.y+h.y+p,bt.z+h.z+g),e.scale.set(1+a[0]+y(s,P(r,m[0]))||Z,1+a[1]+y(s,P(r,m[1]))||Z,1+a[2]+y(s,P(r,m[2]))||Z),e.scale.multiply(this.object.scale)}}getSurfaceSampler(){let t=this.objectForSample,e=t.geometry,i=e.getAttribute("position"),r=e.index,n=this.surfaceSamplerCache;if(null!==n&&n.geometry===e&&n.position===i&&n.positionVersion===gt(i)&&n.index===r&&n.indexVersion===(null===r?-1:r.version))return n.sampler;let s=new z(t).build();return this.surfaceSamplerCache={geometry:e,position:i,positionVersion:gt(i),index:r,indexVersion:null===r?-1:r.version,sampler:s},s}invalidateSurfaceCaches(){this.surfaceSamplerCache=null,this.surfacePointsCache=null}getSubdivData(){if(!this.objectForSample)return[];let t=this.parameters.toObject.spreadType;if("random"===t)return[];let i=this.objectForSample instanceof e,r=this.objectForSample.geometry;if(!i&&r){let e=this.surfacePointsCache,i=r.getAttribute("position");if(null!==e&&e.spreadType===t&&e.geometry===r&&e.position===i&&e.positionVersion===gt(i)&&e.index===r.index&&e.indexVersion===(null===r.index?-1:r.index.version))return e.points}let n=new Map,s=(t,e)=>{let i=Math.round(1e4*t[0])+"_"+Math.round(1e4*t[1])+"_"+Math.round(1e4*t[2]),r=n.get(i);r?(r.pos[0]+=t[0],r.pos[1]+=t[1],r.pos[2]+=t[2],r.norm[0]+=e[0],r.norm[1]+=e[1],r.norm[2]+=e[2],r.count+=1):n.set(i,{pos:[...t],norm:[...e],count:1})};if(i){let e=this.objectForSample,i=O[t],r=R[i],n=D[i],o=I[i],a=r(e.subdivPointerNew);for(let t=0;t<=a-1;t++){let i=n(e.subdivPointerNew,t),r=o(e.subdivPointerNew,t);J.fromArray(i).applyMatrix4(e.matrixWorld),X.fromArray(r),s(J.toArray(),X.toArray())}}else(r.index?function(t){let e=[],i=Math.floor(t.index.count/3);for(let r=0;r<i;r++)if(L.fromArray(t.index.array,3*r),q.setFromAttributeAndIndices(t.attributes.position,L.x,L.y,L.z),q.getNormal(G),q.getMidpoint(H),!(isNaN(H.x)||isNaN(H.y)||isNaN(H.z))){let{a:t,b:i,c:r}=q,n=t.toArray(),s=i.toArray(),o=r.toArray(),a=t.distanceTo(i),l=i.distanceTo(r),h=r.distanceTo(t),c=V(n,s),d=V(s,o),u=V(o,n),p=[a,l,h],m=Math.max(...p),f=p.filter(t=>Math.round(t)===Math.round(m)).length>1,y=[],b=q.getMidpoint(H).toArray();m===a&&!f&&(y=[d,u,u],b=c),m===l&&!f&&(y=[c,u,u],b=d),m===h&&!f&&(y=[c,d,d],b=u),f&&(y=[c,d,u]),e.push({vertices:[n,s,o],faceCenters:y,midpoint:b,norm:q.getNormal(G).toArray()})}return e}(r):function(t){let e=[],{position:i}=t.attributes;for(let t=0;t<i.count;t++){q.setFromAttributeAndIndices(i,3*t,3*t+1,3*t+2),q.getNormal(G),q.getMidpoint(H);let r=q.a.toArray(),n=q.b.toArray(),s=q.c.toArray();e.push({vertices:[r,n,s],faceCenters:[V(r,n),V(n,s),V(s,r)],midpoint:H.toArray(),norm:G.toArray()})}return e}(r)).forEach((e,i)=>{"polygon_center"===t&&s(e.midpoint,e.norm),"vertex"===t&&(s(e.vertices[0],e.norm),s(e.vertices[1],e.norm),s(e.vertices[2],e.norm)),"edge"===t&&(s(e.faceCenters[0],e.norm),s(e.faceCenters[1],e.norm),s(e.faceCenters[2],e.norm))});let o=Array.from(n.values());for(let t of o)t.pos[0]/=t.count,t.pos[1]/=t.count,t.pos[2]/=t.count,t.norm[0]/=t.count,t.norm[1]/=t.count,t.norm[2]/=t.count;if(!i&&r){let e=r.getAttribute("position");this.surfacePointsCache={spreadType:t,geometry:r,position:e,positionVersion:gt(e),index:r.index,indexVersion:null===r.index?-1:r.index.version,points:o}}return o}updateState(t,e){this.parameters=o(t);let{parent:i,matrix:r}=this;if("toObject"!==this.parameters.type)this.invalidateSurfaceCaches(),(null===this.parent||this.parent!==this.object)&&(this.removeFromParent(),this.object.parent?.add(this),this.matrix=this.object.matrix,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1);else if(null===this.parent||this.parent.uuid!==this.parameters.toObject.object){this.removeFromParent(),this.invalidateSurfaceCaches();let t=e.scene.find(this.parameters.toObject.object);this.objectForSample=t instanceof s?t:void 0,this.matrix=new u,this.matrixWorldNeedsUpdate=!0,this.matrixAutoUpdate=!1,t&&t.add(this)}let n=this._layout(e);this._syncEnclosingCopies(n||this.parent!==i||this.matrix!==r)}get pendingMediaLoad(){return this._pendingMediaLoad}},jt=class extends wt{constructor(t){super(t.object,t.parameters),this.source=t,this.matrixAutoUpdate=!1}get insideBoolean(){return this.source.insideBoolean}expand(){this.matrix=this.source.matrix,this.matrixWorldNeedsUpdate=!0;let t=0;for(let e of this.source.children){if(!(e instanceof r))continue;let i=this.children[t];void 0===i&&(i=new r(this.object),this.add(i)),i.matrix=e.matrix,i.matrixWorldNeedsUpdate=!0,i.expand(),t+=1}for(;this.children.length>t;)this.remove(this.children[t])}};export{wt as a};