@uptimizr/dashboard 0.4.6 → 0.4.7

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 (383) hide show
  1. package/out/404.html +1 -1
  2. package/out/__next.__PAGE__.txt +19 -5
  3. package/out/__next._full.txt +10 -10
  4. package/out/__next._tree.txt +1 -1
  5. package/out/_next/static/chunks/{2-_a-v1xeo5hb.js → 0-_j1khfoib6l.js} +116 -115
  6. package/out/_next/static/chunks/{25brs445bjbik.js → 005bbq_px7lke.js} +2 -2
  7. package/out/_next/static/chunks/00fbhtmui-yxg.js +1 -0
  8. package/out/_next/static/chunks/017pn-pen381_.js +1 -0
  9. package/out/_next/static/chunks/01vov6inx1zzt.js +1 -0
  10. package/out/_next/static/chunks/{2x-7kbwq8tl-o.js → 02qk_wmkf9at-.js} +196 -196
  11. package/out/_next/static/chunks/03bd5plut08tg.js +1 -0
  12. package/out/_next/static/chunks/03dwfqmo73w_z.js +1 -0
  13. package/out/_next/static/chunks/03sn4419dam-h.js +5 -0
  14. package/out/_next/static/chunks/05ere0-228syf.js +1 -0
  15. package/out/_next/static/chunks/{1jjw9hxgi2vzi.js → 05h8u5lrypn5m.js} +1 -1
  16. package/out/_next/static/chunks/{23-y1f_zw56vo.js → 05v-nubi896jg.js} +1 -1
  17. package/out/_next/static/chunks/05z79zh625ezu.js +1 -0
  18. package/out/_next/static/chunks/{2xe4bgir5l-9b.js → 060iult6f68_e.js} +504 -504
  19. package/out/_next/static/chunks/08lvtnv7b1cxp.js +1 -0
  20. package/out/_next/static/chunks/0_v2luu_qmeid.js +1 -0
  21. package/out/_next/static/chunks/0ai0zgbgjqb92.js +1 -0
  22. package/out/_next/static/chunks/0boov9mwycanf.js +1 -0
  23. package/out/_next/static/chunks/{2mrkv0z2i74pv.js → 0btmk0wmekl02.js} +2 -2
  24. package/out/_next/static/chunks/0d8x8m2x6ca_m.js +1 -0
  25. package/out/_next/static/chunks/0dmrdrwtd093b.js +1 -0
  26. package/out/_next/static/chunks/0e1jfrmioeuws.js +1 -0
  27. package/out/_next/static/chunks/0e7nlxmneb2j_.js +1 -0
  28. package/out/_next/static/chunks/0es97pusfxupl.js +1 -0
  29. package/out/_next/static/chunks/{2fspbfbxbswzd.js → 0fd-0i1yt23kz.js} +1 -1
  30. package/out/_next/static/chunks/0fxdyvb1w23d1.js +1 -0
  31. package/out/_next/static/chunks/0fxhc24djjcgq.js +1 -0
  32. package/out/_next/static/chunks/0gf-ztg86zd80.js +1 -0
  33. package/out/_next/static/chunks/{287hakn2ijupp.js → 0grasqqf5dw7r.js} +2 -2
  34. package/out/_next/static/chunks/{161yjxmdz9obc.js → 0hajwk2yd-rwr.js} +1 -1
  35. package/out/_next/static/chunks/0hk1wg7h4araz.js +1 -0
  36. package/out/_next/static/chunks/{1aa9g197l4twm.js → 0j74ipw4fps-n.js} +1 -1
  37. package/out/_next/static/chunks/{1s0dpdqy480hg.js → 0kj-vckdn7t5p.js} +1 -1
  38. package/out/_next/static/chunks/0lbs5xdyjuzuo.js +1 -0
  39. package/out/_next/static/chunks/0lep3_bqwfuin.js +1 -0
  40. package/out/_next/static/chunks/0mp0jh1gj7290.js +1 -0
  41. package/out/_next/static/chunks/0ngpoj2g5i4kz.js +1 -0
  42. package/out/_next/static/chunks/0nhljhguceh66.js +1 -0
  43. package/out/_next/static/chunks/0p6z73afb9dj2.js +1 -0
  44. package/out/_next/static/chunks/0p9zfmidzqkps.js +1 -0
  45. package/out/_next/static/chunks/0q75860p8u_ii.js +1 -0
  46. package/out/_next/static/chunks/{3mmy9zsb7zo-m.js → 0rracz73p38mo.js} +23 -23
  47. package/out/_next/static/chunks/{3_dm45k0vk1aa.js → 0sw-8gxbg4x0l.js} +565 -565
  48. package/out/_next/static/chunks/0sx-6rf3eteqn.js +1 -0
  49. package/out/_next/static/chunks/0thw099xk3_0p.js +3 -0
  50. package/out/_next/static/chunks/0u85f0dhb4i8e.js +1 -0
  51. package/out/_next/static/chunks/0uk7kigzm4vi2.js +31 -0
  52. package/out/_next/static/chunks/0ulufxnsrou61.js +1 -0
  53. package/out/_next/static/chunks/0xa9dyg6ezzyd.js +2 -0
  54. package/out/_next/static/chunks/0xvrfvur0p534.js +1 -0
  55. package/out/_next/static/chunks/{2clevl_9ayd0x.js → 0ybs1u66q26su.js} +1 -1
  56. package/out/_next/static/chunks/0ydfhk-p6zvm0.js +1 -0
  57. package/out/_next/static/chunks/{0j2ygtc_-bo3m.js → 0z004fn14pbcu.js} +1 -1
  58. package/out/_next/static/chunks/{2c8rmxz151fxa.js → 0z9erbl3llr_b.js} +224 -224
  59. package/out/_next/static/chunks/0zcsxvcvog9ue.js +1 -0
  60. package/out/_next/static/chunks/0zqgq0lwtz9tn.js +1 -0
  61. package/out/_next/static/chunks/1-ogak5u00kwa.js +1 -0
  62. package/out/_next/static/chunks/{3si3migsmvz9o.js → 10_5p5-xf2aoo.js} +1 -1
  63. package/out/_next/static/chunks/118qlrzdwpfmo.js +1 -0
  64. package/out/_next/static/chunks/11km5p4gd0ut4.js +1 -0
  65. package/out/_next/static/chunks/120rl4l29q9xs.js +1 -0
  66. package/out/_next/static/chunks/{44m1ijc5cv80x.js → 129m5i93ltoym.js} +1 -1
  67. package/out/_next/static/chunks/12n73o884lyyl.js +1 -0
  68. package/out/_next/static/chunks/{27z7j17kcrty_.js → 13zcn4lv0qj76.js} +11 -11
  69. package/out/_next/static/chunks/15jlgfcaeaki9.js +1 -0
  70. package/out/_next/static/chunks/{374lzksboll-t.js → 15o4_2t-l3rj5.js} +1 -1
  71. package/out/_next/static/chunks/175st2ogkg_1o.js +1 -0
  72. package/out/_next/static/chunks/19rsodtu91ja_.js +1 -0
  73. package/out/_next/static/chunks/1a2ouhup611bz.js +1 -0
  74. package/out/_next/static/chunks/{2117sv2qzo6yq.js → 1by60_b14x-3o.js} +1 -1
  75. package/out/_next/static/chunks/{2al9dh3_1ixhv.js → 1cyq7i39885sl.js} +1 -1
  76. package/out/_next/static/chunks/1d9it6yocgt54.js +1 -0
  77. package/out/_next/static/chunks/{29_n5j-hg_gsa.js → 1dp1s1t-y7gal.js} +1 -1
  78. package/out/_next/static/chunks/1dr7gh6xgypl8.js +1 -0
  79. package/out/_next/static/chunks/{1eirucr9s6-h5.js → 1dt30s_sp8415.js} +1 -1
  80. package/out/_next/static/chunks/{3vtmucpx25o7q.js → 1e8_jl2cxd3rp.js} +584 -584
  81. package/out/_next/static/chunks/1f1rek_fxk3of.js +1 -0
  82. package/out/_next/static/chunks/1f2mna0k5efeq.js +1 -0
  83. package/out/_next/static/chunks/1gfz3sxwkkg3d.js +1 -0
  84. package/out/_next/static/chunks/1gr35qeguuws0.js +1 -0
  85. package/out/_next/static/chunks/{3p03l0z65c8vc.js → 1gttu-n9am66k.js} +253 -253
  86. package/out/_next/static/chunks/1imi0xwi9hd99.js +1 -0
  87. package/out/_next/static/chunks/1ka5v5zu0cstt.js +1 -0
  88. package/out/_next/static/chunks/{3my05px5mv_s5.js → 1l_3oidssbhns.js} +235 -235
  89. package/out/_next/static/chunks/{0r-x702_jvhud.js → 1m9zc5gm-327d.js} +12 -12
  90. package/out/_next/static/chunks/1n9nhz-6azcp3.js +3 -0
  91. package/out/_next/static/chunks/1ncqwe81t_9_x.js +1 -0
  92. package/out/_next/static/chunks/{3un-w6wutw1qn.js → 1nix_lulkpklo.js} +1 -1
  93. package/out/_next/static/chunks/1ntqovuz2c217.js +1 -0
  94. package/out/_next/static/chunks/1pgs-98tfkq9_.js +1 -0
  95. package/out/_next/static/chunks/1q2z0aeopo8t8.js +1 -0
  96. package/out/_next/static/chunks/{1x0j78ohufpul.js → 1q4lkgxfnqnew.js} +1 -1
  97. package/out/_next/static/chunks/{0yd4_xh476fjn.js → 1qg1l7t00nyib.js} +97 -97
  98. package/out/_next/static/chunks/{2wgh5i70bzelt.js → 1rcdimhu0qhlu.js} +392 -392
  99. package/out/_next/static/chunks/1rlfg62jxqj3z.js +1 -0
  100. package/out/_next/static/chunks/1ses023uud001.js +1 -0
  101. package/out/_next/static/chunks/1t5oynmttpfsw.js +1 -0
  102. package/out/_next/static/chunks/{39cou9lia_g7l.js → 1t9i20i5-f8ze.js} +1 -1
  103. package/out/_next/static/chunks/{0rykrf_vofbad.js → 1tgj55b305g4h.js} +1 -1
  104. package/out/_next/static/chunks/{3rj-5v0j_2-_2.js → 1u8snlm6a7uhi.js} +4 -4
  105. package/out/_next/static/chunks/{2neieeo9g2u56.js → 1ug4k-1zhr63a.js} +1 -1
  106. package/out/_next/static/chunks/{3ioxfi3bvznhh.js → 1uh9zgsy69g92.js} +1 -1
  107. package/out/_next/static/chunks/1vrpzlif-z_p0.js +1 -0
  108. package/out/_next/static/chunks/{0lwjmr8efrlbt.js → 1vurgl6oz2qey.js} +1 -1
  109. package/out/_next/static/chunks/1w-qc09n9ijtq.js +1 -0
  110. package/out/_next/static/chunks/1ycqxcht6x54p.js +1 -0
  111. package/out/_next/static/chunks/1zj4307ugq0qz.js +1 -0
  112. package/out/_next/static/chunks/{14e4k-718qadd.js → 1zkd8v-qka--j.js} +163 -168
  113. package/out/_next/static/chunks/1zm52cjrfrq7c.js +1 -0
  114. package/out/_next/static/chunks/{3-yhe6rcsjh88.js → 1zm6eo861i3c8.js} +1 -1
  115. package/out/_next/static/chunks/{06fbalmyyfpsy.js → 1zp9363yfhpom.js} +1 -1
  116. package/out/_next/static/chunks/1zt1xxovnjhkm.js +1 -0
  117. package/out/_next/static/chunks/2-3hk_db5fpok.js +1 -0
  118. package/out/_next/static/chunks/2-bv9a_0zgw1f.js +1 -0
  119. package/out/_next/static/chunks/{3cp5nmtwxq4gr.js → 209sxygecny37.js} +1 -1
  120. package/out/_next/static/chunks/{133dqp8_7_yo6.js → 216uiih3_vdfd.js} +1 -1
  121. package/out/_next/static/chunks/21kfpd_bityxt.js +1 -0
  122. package/out/_next/static/chunks/{3yk0hzfq5rcs6.js → 22yqh0zlo_vwr.js} +1 -1
  123. package/out/_next/static/chunks/24ecas0m9tao7.js +3 -0
  124. package/out/_next/static/chunks/24pq9210rng3f.js +1 -0
  125. package/out/_next/static/chunks/{184pz6z3dflfm.js → 267prao6fyt22.js} +20 -20
  126. package/out/_next/static/chunks/26skkagvj1z96.js +1 -0
  127. package/out/_next/static/chunks/{0i9wa8hjd-5tc.js → 26y9sv8_-ykxf.js} +1 -1
  128. package/out/_next/static/chunks/2701xfv_07wz_.js +1 -0
  129. package/out/_next/static/chunks/{39rhmj_32ujyj.js → 271333m8y3k0e.js} +1 -1
  130. package/out/_next/static/chunks/29rkmguzky-bp.js +1 -0
  131. package/out/_next/static/chunks/{3qo7e6b73mfxq.js → 2a07so920b6aa.js} +1 -1
  132. package/out/_next/static/chunks/{1z790xxb46gxy.js → 2a2oy8ryz2tsk.js} +1 -1
  133. package/out/_next/static/chunks/{2-i29-jdbwww6.js → 2ao-3jzz7yw3p.js} +111 -111
  134. package/out/_next/static/chunks/2apihn9ra2ufp.js +1 -0
  135. package/out/_next/static/chunks/2apnpj0-fs9ks.js +1 -0
  136. package/out/_next/static/chunks/2b481pitl4k85.js +1 -0
  137. package/out/_next/static/chunks/2bettxaqt3d2p.js +1 -0
  138. package/out/_next/static/chunks/{1bv-jzy_2jiqs.js → 2c721vfva711t.js} +1 -1
  139. package/out/_next/static/chunks/{17_jjyx4jz9dd.js → 2d2kl_m64j9cb.js} +1 -1
  140. package/out/_next/static/chunks/2droqjmvmgj13.js +1 -0
  141. package/out/_next/static/chunks/2dxbvwbbgpzoq.js +1 -0
  142. package/out/_next/static/chunks/2eqbsut829r5l.js +1 -0
  143. package/out/_next/static/chunks/2f3_mzxjh3gso.js +1 -0
  144. package/out/_next/static/chunks/2fsde0jwi5qtt.js +1 -0
  145. package/out/_next/static/chunks/{0jap7l5-bskj4.js → 2h249uvhh2sij.js} +12 -12
  146. package/out/_next/static/chunks/{2as_br1awqk6k.js → 2izok2otbk8-2.js} +496 -496
  147. package/out/_next/static/chunks/2j120dkh7q3uf.js +1 -0
  148. package/out/_next/static/chunks/2j2ynchpqh34-.js +1 -0
  149. package/out/_next/static/chunks/2kj6pzs_wap1v.js +1 -0
  150. package/out/_next/static/chunks/{2epukrz6paj9n.js → 2kok6zedeeltw.js} +1 -1
  151. package/out/_next/static/chunks/2lnj9jruy4nrv.js +1 -0
  152. package/out/_next/static/chunks/{0j0a0wvmmghxj.js → 2lsvk7xcfkarc.js} +1 -1
  153. package/out/_next/static/chunks/2n-pveub8b_5t.js +1 -0
  154. package/out/_next/static/chunks/{3puu2_-t0lln9.js → 2n3xu_wbvtj7h.js} +12 -12
  155. package/out/_next/static/chunks/{1lu7rjfvxj8yj.js → 2of8q0kaeqpf0.js} +1 -1
  156. package/out/_next/static/chunks/2ofwtw6p08sfz.js +1 -0
  157. package/out/_next/static/chunks/{1t-yolk97lmot.js → 2phl5ta4iim7l.js} +1 -1
  158. package/out/_next/static/chunks/2q6l-xdqzgmpf.js +1 -0
  159. package/out/_next/static/chunks/2q8yg63br2jc9.js +1 -0
  160. package/out/_next/static/chunks/2r5qgieqldcd9.js +1 -0
  161. package/out/_next/static/chunks/2r7y401cvjc1s.js +1 -0
  162. package/out/_next/static/chunks/{1a94whad0y57f.js → 2r96kyeehsji9.js} +1 -1
  163. package/out/_next/static/chunks/{1gvu5a6ffbs7l.js → 2rmc6ru7mc-kg.js} +1 -1
  164. package/out/_next/static/chunks/{3_gfl66zf638s.js → 2s6kpclh6ie7o.js} +901 -906
  165. package/out/_next/static/chunks/{0xzamrecplwzw.js → 2sys9nj8lo3uk.js} +1 -1
  166. package/out/_next/static/chunks/{336ckqpboqmbn.js → 2tc3e-iqv71y_.js} +1 -1
  167. package/out/_next/static/chunks/{1t2g1v0ubcsam.js → 2uo6vm7mfgrbf.js} +1 -1
  168. package/out/_next/static/chunks/{2kmmk9coo9_b0.js → 2urx6fow8c8c9.js} +143 -143
  169. package/out/_next/static/chunks/2w2k1gveljyb7.js +1 -0
  170. package/out/_next/static/chunks/{1zmx71cvc6ksk.js → 2w99knknr5i8c.js} +1 -1
  171. package/out/_next/static/chunks/2w_ptlw-ad8-9.js +4 -0
  172. package/out/_next/static/chunks/2ws1s9d52ayv8.js +1 -0
  173. package/out/_next/static/chunks/2x7enks3ydgai.js +1 -0
  174. package/out/_next/static/chunks/{2_6b9lraq-exh.js → 2y8i7_nxm4r05.js} +5 -5
  175. package/out/_next/static/chunks/2ydub0t01728d.js +1 -0
  176. package/out/_next/static/chunks/{29hkkj9raxte9.js → 2z_iab7ozohhq.js} +77 -77
  177. package/out/_next/static/chunks/3-m_vzabs1uez.js +1 -0
  178. package/out/_next/static/chunks/{1h1gixjbjkbsl.js → 302qk2fjdrthp.js} +5 -5
  179. package/out/_next/static/chunks/30bhz7czzs4mf.js +1 -0
  180. package/out/_next/static/chunks/{3d43gd91r06y6.js → 30n4y_uu8chbh.js} +507 -505
  181. package/out/_next/static/chunks/{0o0qtv35dqv3i.js → 32_c4mbb6j1l6.js} +239 -239
  182. package/out/_next/static/chunks/33hp-khdfohdq.js +1 -0
  183. package/out/_next/static/chunks/{3zv5kyos9vtmm.js → 33i36o_l69sm5.js} +1 -1
  184. package/out/_next/static/chunks/3527r3jo5fj3i.js +1 -0
  185. package/out/_next/static/chunks/355dg8yaa94hr.js +1 -0
  186. package/out/_next/static/chunks/{2h9i_adbqaxs4.js → 35ntbr_c-yx44.js} +1 -1
  187. package/out/_next/static/chunks/{0cmyc-uvk93kl.js → 35sne1llxnc-m.js} +74 -74
  188. package/out/_next/static/chunks/36enkx1skkv2-.js +4 -0
  189. package/out/_next/static/chunks/{0e5dcxmkprebg.js → 3772oce1n3t_g.js} +1 -1
  190. package/out/_next/static/chunks/37cnbm5ft1mqf.js +1 -0
  191. package/out/_next/static/chunks/38xdo3cifphut.js +1 -0
  192. package/out/_next/static/chunks/{0o73w0cn5n_vl.js → 3_dgblylldcgb.js} +1 -1
  193. package/out/_next/static/chunks/3beawo-qwuk8k.js +1 -0
  194. package/out/_next/static/chunks/3cj_6sl9kr3e9.js +1 -0
  195. package/out/_next/static/chunks/3d-i_skta_wes.js +1 -0
  196. package/out/_next/static/chunks/3df_l2we755bb.js +1 -0
  197. package/out/_next/static/chunks/{0o1vph7x9shzu.js → 3eve5y7fpzx2h.js} +1 -1
  198. package/out/_next/static/chunks/3ewgyb4y19w-3.js +1 -0
  199. package/out/_next/static/chunks/3f3789eh18_oy.js +1 -0
  200. package/out/_next/static/chunks/{0gk5rnci1hznh.js → 3f8qelpscqfym.js} +2 -2
  201. package/out/_next/static/chunks/3g3-e9m1en45q.js +1 -0
  202. package/out/_next/static/chunks/{2kk_vvmr2xm3d.js → 3h6akt2uu05ku.js} +12 -12
  203. package/out/_next/static/chunks/{2_lw4d7t-xcqi.js → 3huu0tqmxwowu.js} +523 -522
  204. package/out/_next/static/chunks/3i239y-1hbkm-.js +1 -0
  205. package/out/_next/static/chunks/{2mjjo0yj-4ro4.js → 3ipx7xbxchsq9.js} +1 -1
  206. package/out/_next/static/chunks/{3txu-i5qn183a.js → 3j9xvdz55bi4p.js} +321 -321
  207. package/out/_next/static/chunks/3kp8qmhoi24oz.js +1 -0
  208. package/out/_next/static/chunks/3ksq69yq-40_r.js +1 -0
  209. package/out/_next/static/chunks/{3nwaovnpiyrt8.js → 3njwfothmmg7u.js} +3 -3
  210. package/out/_next/static/chunks/{2iu0_3cx-ny74.js → 3oqxl46ukaojj.js} +11 -11
  211. package/out/_next/static/chunks/{2oacwtbslo90t.js → 3qn6r8-0u6dij.js} +360 -360
  212. package/out/_next/static/chunks/3qye1lytea2i8.js +1 -0
  213. package/out/_next/static/chunks/{0gsh_d0m5xss1.js → 3rlp9yr75liz7.js} +1 -1
  214. package/out/_next/static/chunks/{3j3ol_d1vsdhx.js → 3sa_hlx3konc7.js} +1 -1
  215. package/out/_next/static/chunks/3tyo643l62h3m.js +1 -0
  216. package/out/_next/static/chunks/3tz2tpqa9uvwm.js +1 -0
  217. package/out/_next/static/chunks/{0_jrfk2u1u3fi.js → 3utpc-fc6_y0f.js} +1 -1
  218. package/out/_next/static/chunks/3v-0c2aj6c0on.js +1 -0
  219. package/out/_next/static/chunks/3v6nxa28rxngq.js +1 -0
  220. package/out/_next/static/chunks/{3twr9ds68-9us.js → 3vbamaoiuk9yj.js} +1 -1
  221. package/out/_next/static/chunks/3vv99btjc-mky.js +1 -0
  222. package/out/_next/static/chunks/{22yht3s7c-xih.js → 3w59kt5ztyvoq.js} +1 -1
  223. package/out/_next/static/chunks/3x02lxdo28u9i.js +1 -0
  224. package/out/_next/static/chunks/{1my968s78he8g.js → 3xl-op0hwxytg.js} +15 -15
  225. package/out/_next/static/chunks/3ydnxyc4rvad_.js +1 -0
  226. package/out/_next/static/chunks/3ylg4gfetwgxw.js +1 -0
  227. package/out/_next/static/chunks/{0a475u_q5i_dd.js → 3zdtteq-r2fs5.js} +2 -2
  228. package/out/_next/static/chunks/3zkwt0gybqtgm.js +1 -0
  229. package/out/_next/static/chunks/{3nr48h9zwum-3.js → 3zs7l4362msjd.js} +1 -1
  230. package/out/_next/static/chunks/40etabvml_71y.js +1 -0
  231. package/out/_next/static/chunks/{2xujlsx3stqig.js → 417jkzz0slv9m.js} +1 -1
  232. package/out/_next/static/chunks/{0ypejzd74ixbw.js → 41b5gpyqbj58m.js} +15 -15
  233. package/out/_next/static/chunks/41u2-5jayyajf.js +22 -0
  234. package/out/_next/static/chunks/42gcpy51w7lk1.js +1 -0
  235. package/out/_next/static/chunks/{2h07np207nlx7.js → 42ymanq326mo7.js} +1 -1
  236. package/out/_next/static/chunks/{36pz_ews7u0xb.js → 43fp64xnfy646.js} +1 -1
  237. package/out/_next/static/chunks/43v4y2gu5z9_h.js +1 -0
  238. package/out/_next/static/chunks/44cer242u-f8v.js +1 -0
  239. package/out/_next/static/chunks/{0d9pxx1w_zqr9.js → 44zi0gl0a6a8w.js} +1 -1
  240. package/out/_next/static/chunks/turbopack-0n2o5_bkskckx.js +1 -0
  241. package/out/_not-found/__next._full.txt +11 -11
  242. package/out/_not-found/__next._not-found.__PAGE__.txt +19 -2
  243. package/out/_not-found/__next._tree.txt +1 -1
  244. package/out/_not-found.html +1 -1
  245. package/out/_not-found.txt +11 -11
  246. package/out/index.html +1 -1
  247. package/out/index.txt +10 -10
  248. package/package.json +9 -9
  249. package/out/__next._head.txt +0 -6
  250. package/out/__next._index.txt +0 -5
  251. package/out/_next/static/chunks/0-k4hp87gwues.js +0 -1
  252. package/out/_next/static/chunks/0-laj-bivzp4x.js +0 -1
  253. package/out/_next/static/chunks/04zj0yf1qhk1o.js +0 -1
  254. package/out/_next/static/chunks/07hgbbqksqd1g.js +0 -1
  255. package/out/_next/static/chunks/08ou2nvy48e0u.js +0 -1
  256. package/out/_next/static/chunks/08y5-irjbsiy8.js +0 -1
  257. package/out/_next/static/chunks/0aad2r4s4wl1x.js +0 -5
  258. package/out/_next/static/chunks/0gnjtwq-474uc.js +0 -1
  259. package/out/_next/static/chunks/0ibzpjo0h731v.js +0 -1
  260. package/out/_next/static/chunks/0j_3k5qhv_mdx.js +0 -1
  261. package/out/_next/static/chunks/0jis2w2mfx062.js +0 -1
  262. package/out/_next/static/chunks/0jjvp2slpf7d6.js +0 -1
  263. package/out/_next/static/chunks/0ko10wo4rc9-b.js +0 -1
  264. package/out/_next/static/chunks/0lqmvz6k2h_of.js +0 -1
  265. package/out/_next/static/chunks/0noxyupihh8dk.js +0 -1
  266. package/out/_next/static/chunks/0p6phe9kjlxn8.js +0 -1
  267. package/out/_next/static/chunks/0ptxb9dcwsw3o.js +0 -1
  268. package/out/_next/static/chunks/0q0i4pdyq66gb.js +0 -1
  269. package/out/_next/static/chunks/0q8pt8fd0ma30.js +0 -1
  270. package/out/_next/static/chunks/0qqx9aoz8l5d2.js +0 -1
  271. package/out/_next/static/chunks/0tsk32q-88t_7.js +0 -1
  272. package/out/_next/static/chunks/0u7577db_ivyr.js +0 -1
  273. package/out/_next/static/chunks/0unnrt0un064x.js +0 -1
  274. package/out/_next/static/chunks/0uygtr4mo3h0v.js +0 -1
  275. package/out/_next/static/chunks/0vf3facit951s.js +0 -1
  276. package/out/_next/static/chunks/0vzo-8t8c26k9.js +0 -1
  277. package/out/_next/static/chunks/0xx7_7y5jdlh4.js +0 -1
  278. package/out/_next/static/chunks/0xyija62b6txc.js +0 -1
  279. package/out/_next/static/chunks/0zeb37703zcz3.js +0 -1
  280. package/out/_next/static/chunks/0zu5ato7-1-q9.js +0 -1
  281. package/out/_next/static/chunks/0zydv7y47dxgh.js +0 -1
  282. package/out/_next/static/chunks/103x4jwovb6d-.js +0 -1
  283. package/out/_next/static/chunks/107wfq84g9-kn.js +0 -1
  284. package/out/_next/static/chunks/10afagk8yn__n.js +0 -1
  285. package/out/_next/static/chunks/12ory_c78yl31.js +0 -1
  286. package/out/_next/static/chunks/1365lgwdd4vuo.js +0 -1
  287. package/out/_next/static/chunks/146ou-ohb_qhs.js +0 -1
  288. package/out/_next/static/chunks/14orr68xgdykd.js +0 -1
  289. package/out/_next/static/chunks/15qfoj-vl9thu.js +0 -1
  290. package/out/_next/static/chunks/166yqx3_qvbpy.js +0 -1
  291. package/out/_next/static/chunks/16gwjao676ieb.js +0 -1
  292. package/out/_next/static/chunks/16rmmzhy2p7bw.js +0 -1
  293. package/out/_next/static/chunks/18h9ugdz6igdb.js +0 -1
  294. package/out/_next/static/chunks/19d8n5t7ka2fb.js +0 -1
  295. package/out/_next/static/chunks/1_4hh3dfop93j.js +0 -1
  296. package/out/_next/static/chunks/1_rbzw3n4fk0g.js +0 -1
  297. package/out/_next/static/chunks/1bq0fcnt1wy86.js +0 -1
  298. package/out/_next/static/chunks/1c6mho7e0enta.js +0 -1
  299. package/out/_next/static/chunks/1dfaheve77dhi.js +0 -1
  300. package/out/_next/static/chunks/1dgf112ehnhm1.js +0 -1
  301. package/out/_next/static/chunks/1f07l3q77zat1.js +0 -1
  302. package/out/_next/static/chunks/1fervgvgv10r-.js +0 -1
  303. package/out/_next/static/chunks/1fsof7un7igrn.js +0 -1
  304. package/out/_next/static/chunks/1iel4pzhhh-c3.js +0 -1
  305. package/out/_next/static/chunks/1iojfx3-g4_n9.js +0 -1
  306. package/out/_next/static/chunks/1j4c0nvdo5q68.js +0 -3
  307. package/out/_next/static/chunks/1j4jt5q7px8sy.js +0 -1
  308. package/out/_next/static/chunks/1k_8olnprvi8r.js +0 -1
  309. package/out/_next/static/chunks/1l0rt7d4m-xdk.js +0 -5
  310. package/out/_next/static/chunks/1mt4cnd_d6jvf.js +0 -1
  311. package/out/_next/static/chunks/1tbes2sv-qzcx.js +0 -1
  312. package/out/_next/static/chunks/1upy8a5cb75kt.js +0 -1
  313. package/out/_next/static/chunks/1xed71f608m4b.js +0 -1
  314. package/out/_next/static/chunks/219n3q-_eengm.js +0 -1
  315. package/out/_next/static/chunks/21wo3vdr_uby8.js +0 -1
  316. package/out/_next/static/chunks/25gep78-izw79.js +0 -4
  317. package/out/_next/static/chunks/26i7dn31afdtm.js +0 -1
  318. package/out/_next/static/chunks/27hbplu797elx.js +0 -1
  319. package/out/_next/static/chunks/28i3wgvgn_at1.js +0 -1
  320. package/out/_next/static/chunks/2992eiy52nazj.js +0 -1
  321. package/out/_next/static/chunks/29bxq-67oazfg.js +0 -1
  322. package/out/_next/static/chunks/29ings58w7kp1.js +0 -1
  323. package/out/_next/static/chunks/2_n0cpkdsjzli.js +0 -1
  324. package/out/_next/static/chunks/2a3iy701j4r_y.js +0 -1
  325. package/out/_next/static/chunks/2awr1c_vfsutb.js +0 -1
  326. package/out/_next/static/chunks/2b5nt7yn-pq3a.js +0 -1
  327. package/out/_next/static/chunks/2bxe3kjr17tdp.js +0 -1
  328. package/out/_next/static/chunks/2dvbzar93ooc-.js +0 -1
  329. package/out/_next/static/chunks/2e-vp0e11g9ew.js +0 -1
  330. package/out/_next/static/chunks/2exj9-0p6n9x-.js +0 -1
  331. package/out/_next/static/chunks/2gf8l6hbmt7v3.js +0 -1
  332. package/out/_next/static/chunks/2jio3sio-_43z.js +0 -1
  333. package/out/_next/static/chunks/2laz1v9fg2a2z.js +0 -1
  334. package/out/_next/static/chunks/2pb_uosb-aa8x.js +0 -1
  335. package/out/_next/static/chunks/2qu-gpm3ux1l6.js +0 -1
  336. package/out/_next/static/chunks/2rsi6v7qmqx2b.js +0 -1
  337. package/out/_next/static/chunks/2s4fzgzkwjluu.js +0 -2
  338. package/out/_next/static/chunks/2tdvuc-27khif.js +0 -1
  339. package/out/_next/static/chunks/2trolrgd7neax.js +0 -1
  340. package/out/_next/static/chunks/2uyuafmoe5wi0.js +0 -3
  341. package/out/_next/static/chunks/2w2e0pxgs-n8f.js +0 -1
  342. package/out/_next/static/chunks/30y71dxdpv52d.js +0 -1
  343. package/out/_next/static/chunks/32c-e_v8_2xkf.js +0 -1
  344. package/out/_next/static/chunks/32oj0iudhp8bm.js +0 -1
  345. package/out/_next/static/chunks/33p9du6y9eegg.js +0 -1
  346. package/out/_next/static/chunks/38om-j0h0rryk.js +0 -1
  347. package/out/_next/static/chunks/38q0enmlg5q9o.js +0 -3
  348. package/out/_next/static/chunks/39pkya0_bvcaj.js +0 -1
  349. package/out/_next/static/chunks/3_1zzmx92j9c0.js +0 -1
  350. package/out/_next/static/chunks/3_earszshuz4n.js +0 -1
  351. package/out/_next/static/chunks/3ap_uxc8lx7ni.js +0 -1
  352. package/out/_next/static/chunks/3b6na8zrex8jo.js +0 -1
  353. package/out/_next/static/chunks/3c0cxt72vilyz.js +0 -1
  354. package/out/_next/static/chunks/3g78x0pdaoi_4.js +0 -1
  355. package/out/_next/static/chunks/3gjvl1p-tugfe.js +0 -4
  356. package/out/_next/static/chunks/3i8iro1gas1vx.js +0 -1
  357. package/out/_next/static/chunks/3kpqfqr99vo7z.js +0 -1
  358. package/out/_next/static/chunks/3lladf_wemm-2.js +0 -1
  359. package/out/_next/static/chunks/3n62hbywoknop.js +0 -1
  360. package/out/_next/static/chunks/3o_dmzpahx-5g.js +0 -1
  361. package/out/_next/static/chunks/3r7v7un976sn7.js +0 -1
  362. package/out/_next/static/chunks/3rl_nhqwew40w.js +0 -1
  363. package/out/_next/static/chunks/3s7hqij6xp_4e.js +0 -1
  364. package/out/_next/static/chunks/3t4ys6th6gf2w.js +0 -1
  365. package/out/_next/static/chunks/3uarw1i1ij1er.js +0 -1
  366. package/out/_next/static/chunks/3v8kgnjk27wbe.js +0 -1
  367. package/out/_next/static/chunks/3vu5y270muh-7.js +0 -1
  368. package/out/_next/static/chunks/3we1khqfexh3x.js +0 -1
  369. package/out/_next/static/chunks/3z35loj4i-id4.js +0 -1
  370. package/out/_next/static/chunks/415g3asdds1ac.js +0 -1
  371. package/out/_next/static/chunks/42lqt7ig40wk5.js +0 -1
  372. package/out/_next/static/chunks/42s6ghsurq5q7.js +0 -1
  373. package/out/_next/static/chunks/42yctcfi2rfwr.js +0 -1
  374. package/out/_next/static/chunks/43_fau1gg69eo.js +0 -1
  375. package/out/_next/static/chunks/43ywrdzg_7af8.js +0 -31
  376. package/out/_next/static/chunks/453_bg0lgesmp.js +0 -1
  377. package/out/_next/static/chunks/turbopack-1s36ieuku1ds3.js +0 -1
  378. package/out/_not-found/__next._head.txt +0 -6
  379. package/out/_not-found/__next._index.txt +0 -5
  380. package/out/_not-found/__next._not-found.txt +0 -5
  381. /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_buildManifest.js +0 -0
  382. /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_clientMiddlewareManifest.js +0 -0
  383. /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,25346,t=>{t.v(e=>Promise.all(["static/chunks/43v4y2gu5z9_h.js","static/chunks/0q75860p8u_ii.js","static/chunks/1vrpzlif-z_p0.js","static/chunks/2701xfv_07wz_.js","static/chunks/0nhljhguceh66.js","static/chunks/2bettxaqt3d2p.js","static/chunks/0xa9dyg6ezzyd.js","static/chunks/2apnpj0-fs9ks.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/3zkwt0gybqtgm.js","static/chunks/2ofwtw6p08sfz.js","static/chunks/36enkx1skkv2-.js","static/chunks/3rlp9yr75liz7.js"].map(e=>t.l(e))).then(()=>e(61238)))},8179,t=>{t.v(e=>Promise.all(["static/chunks/1vrpzlif-z_p0.js","static/chunks/3d-i_skta_wes.js","static/chunks/0q75860p8u_ii.js","static/chunks/2ofwtw6p08sfz.js","static/chunks/0nhljhguceh66.js","static/chunks/03bd5plut08tg.js","static/chunks/2701xfv_07wz_.js","static/chunks/36enkx1skkv2-.js","static/chunks/0xa9dyg6ezzyd.js","static/chunks/08lvtnv7b1cxp.js"].map(e=>t.l(e))).then(()=>e(86790)))},45852,t=>{t.v(e=>Promise.all(["static/chunks/0u85f0dhb4i8e.js","static/chunks/2ydub0t01728d.js","static/chunks/0q75860p8u_ii.js","static/chunks/0fxdyvb1w23d1.js","static/chunks/0xa9dyg6ezzyd.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/0e7nlxmneb2j_.js","static/chunks/36enkx1skkv2-.js","static/chunks/0fxhc24djjcgq.js"].map(e=>t.l(e))).then(()=>e(69260)))},19257,t=>{t.v(e=>Promise.all(["static/chunks/15jlgfcaeaki9.js","static/chunks/1pgs-98tfkq9_.js","static/chunks/0q75860p8u_ii.js","static/chunks/36enkx1skkv2-.js","static/chunks/0lbs5xdyjuzuo.js","static/chunks/2701xfv_07wz_.js"].map(e=>t.l(e))).then(()=>e(33738)))},76269,t=>{t.v(e=>Promise.all(["static/chunks/1ncqwe81t_9_x.js","static/chunks/3ksq69yq-40_r.js","static/chunks/1vrpzlif-z_p0.js","static/chunks/2701xfv_07wz_.js","static/chunks/0q75860p8u_ii.js","static/chunks/2w_ptlw-ad8-9.js","static/chunks/1f2mna0k5efeq.js","static/chunks/36enkx1skkv2-.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/03bd5plut08tg.js","static/chunks/0nhljhguceh66.js","static/chunks/2apnpj0-fs9ks.js","static/chunks/0xa9dyg6ezzyd.js"].map(e=>t.l(e))).then(()=>e(37719)))},69819,t=>{t.v(e=>Promise.all(["static/chunks/1gr35qeguuws0.js","static/chunks/36enkx1skkv2-.js","static/chunks/0q75860p8u_ii.js"].map(e=>t.l(e))).then(()=>e(81591)))},67116,t=>{t.v(e=>Promise.all(["static/chunks/0p6z73afb9dj2.js","static/chunks/1vrpzlif-z_p0.js","static/chunks/0lep3_bqwfuin.js","static/chunks/0xvrfvur0p534.js","static/chunks/0nhljhguceh66.js","static/chunks/2q6l-xdqzgmpf.js","static/chunks/1d9it6yocgt54.js","static/chunks/0q75860p8u_ii.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/2apnpj0-fs9ks.js","static/chunks/2701xfv_07wz_.js","static/chunks/36enkx1skkv2-.js","static/chunks/21kfpd_bityxt.js","static/chunks/03bd5plut08tg.js","static/chunks/2ofwtw6p08sfz.js","static/chunks/3zkwt0gybqtgm.js","static/chunks/0xa9dyg6ezzyd.js"].map(e=>t.l(e))).then(()=>e(36995)))},21020,t=>{t.v(e=>Promise.all(["static/chunks/1dr7gh6xgypl8.js","static/chunks/1vrpzlif-z_p0.js","static/chunks/2701xfv_07wz_.js","static/chunks/0nhljhguceh66.js","static/chunks/0q75860p8u_ii.js","static/chunks/3zkwt0gybqtgm.js","static/chunks/0xa9dyg6ezzyd.js","static/chunks/2apnpj0-fs9ks.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/36enkx1skkv2-.js","static/chunks/26skkagvj1z96.js"].map(e=>t.l(e))).then(()=>e(21931)))},32502,t=>{t.v(e=>Promise.all(["static/chunks/44cer242u-f8v.js","static/chunks/1vrpzlif-z_p0.js","static/chunks/0q75860p8u_ii.js","static/chunks/0nhljhguceh66.js","static/chunks/36enkx1skkv2-.js","static/chunks/08lvtnv7b1cxp.js","static/chunks/2701xfv_07wz_.js","static/chunks/03bd5plut08tg.js","static/chunks/0xa9dyg6ezzyd.js"].map(e=>t.l(e))).then(()=>e(13455)))},2348,2413,t=>{"use strict";let e=1/1.2;t.s(["ZOOM_IN_FACTOR",0,e,"ZOOM_OUT_FACTOR",0,1.2,"attachDoubleClickFocus",0,function(t,e,s){let n=()=>{let e=t.pick(t.pointerX,t.pointerY);e?.hit&&e.pickedPoint&&s.setTarget(e.pickedPoint)};return e.addEventListener("dblclick",n),()=>e.removeEventListener("dblclick",n)},"disableWheelZoom",0,function(t){t.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"resetFocus",0,function(t,e){t.setTarget(e.target),t.alpha=e.alpha,t.beta=e.beta,t.radius=e.radius},"stepZoom",0,function(t,e){let s=t.lowerRadiusLimit??.01,n=t.upperRadiusLimit??1/0;t.radius=Math.min(n,Math.max(s,t.radius*e))}],2348);var s=t.i(61284);t.s(["ZoomButtons",0,function({onZoom:t,onReset:n}){let a="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,s.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,s.jsx)("button",{type:"button","aria-label":"Zoom in",className:a,onClick:()=>t(e),children:"+"}),(0,s.jsx)("button",{type:"button","aria-label":"Zoom out",className:a,onClick:()=>t(1.2),children:"−"}),n?(0,s.jsx)("button",{type:"button","aria-label":"Reset camera focus to center",title:"Reset focus to center",className:a,onClick:n,children:(0,s.jsxs)("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,s.jsx)("path",{d:"M8 1v2.5M8 12.5V15M1 8h2.5M12.5 8H15"})]})}):null]})}],2413)},87456,t=>{"use strict";t.s(["attachMeshHover",0,function(t,e,s){let n=0,a=null,i=e=>{let i=e.offsetX,c=e.offsetY;n||(n=requestAnimationFrame(()=>{var e,l;let r;n=0;let u=t.pick(i,c,t=>t.isPickable&&t.isEnabled()),o=u?.pickedMesh?(e=u.pickedMesh,l=u.thinInstanceIndex??-1,(r=e.metadata)?l>=0&&r.hoverLabels?r.hoverLabels[l]??null:r.hoverLabel??null:null):null;o?s({label:o,x:i,y:c}):null!==a&&s(null),a=o}))},c=()=>{n&&(cancelAnimationFrame(n),n=0),null!==a&&(a=null,s(null))};return e.addEventListener("pointermove",i),e.addEventListener("pointerleave",c),()=>{e.removeEventListener("pointermove",i),e.removeEventListener("pointerleave",c),n&&cancelAnimationFrame(n)}}])},53993,t=>{"use strict";var e=t.i(61284),s=t.i(60951),n=t.i(56054),a=t.i(2348),i=t.i(87456),c=t.i(18637),l=t.i(2413);function r({shape:t,onChange:s}){let n=t=>`h-8 px-2.5 text-xs font-medium leading-none transition first:rounded-l-md last:rounded-r-md ${t?"bg-ink text-white":"bg-ink/80 text-fg hover:text-white"}`,a="sphere"===t,i="cube"===t;return(0,e.jsxs)("div",{className:"absolute left-3 top-3 flex overflow-hidden rounded-md border border-edge backdrop-blur",role:"group","aria-label":"Voxel marker shape",children:[(0,e.jsx)("button",{type:"button",className:n(a),"aria-pressed":a,onClick:()=>s("sphere"),children:"Spheres"}),(0,e.jsx)("button",{type:"button",className:n(i),"aria-pressed":i,onClick:()=>s("cube"),children:"Cubes"})]})}t.s(["WorldHeatmap3DView",0,function({voxels:u,cellSize:o,proxyMeshes:h=[],legendTitle:d="Pointer-hit density",legendLow:k="few hits",legendHigh:p="most hits",legendNote:b="Each marker is a voxel where the pointer hit your scene. Color & size scale with hits, normalized to the 95th-percentile cell so a few hotspots don't wash out the rest.",emptyLabel:j="No 3D hit-points in range.",totals:m,voxelLabels:f}){let v=(0,s.useRef)(null),x=(0,s.useRef)(null),g=(0,s.useRef)(null),[w,y]=(0,s.useState)("loading"),[z,_]=(0,s.useState)(null),[M,q]=(0,s.useState)("sphere"),[L,A]=(0,s.useState)(null),C=(0,s.useRef)(u),P=(0,s.useRef)(h),R=(0,s.useRef)(f);C.current=u,P.current=h,R.current=f;let S=(0,s.useRef)(null),F=u.length>0||h.length>0;(0,s.useEffect)(()=>{let e=v.current;if(!e)return;if(!F)return void y("empty");let s=!1,c=null;return y("loading"),_(null),(async()=>{try{let[{Engine:l},{Scene:r},{ArcRotateCamera:u},{HemisphericLight:h},{Vector3:d,Color3:k,Color4:p,Matrix:b},{MeshBuilder:j},{StandardMaterial:m}]=await Promise.all([t.A(45852),t.A(32502),t.A(25346),t.A(19257),t.A(69819),t.A(67116),t.A(76269),t.A(21020),t.A(8179)]);if(s)return;let f=C.current,v=P.current,w=0,z=0,_=0,q=0;for(let t of f)w+=(t.vx+.5)*o,z+=(t.vy+.5)*o,_+=(t.vz+.5)*o,q++;if(0===q)for(let t of v)w+=(t.aabb[0]+t.aabb[3])/2,z+=(t.aabb[1]+t.aabb[4])/2,_+=(t.aabb[2]+t.aabb[5])/2,q++;let L=new d(w/q,z/q,_/q),F=4*o;for(let t of f){let e=(t.vx+.5)*o-L.x,s=(t.vy+.5)*o-L.y,n=(t.vz+.5)*o-L.z;F=Math.max(F,Math.sqrt(e*e+s*s+n*n))}for(let t of v){let e=(t.aabb[0]+t.aabb[3])/2-L.x,s=(t.aabb[1]+t.aabb[4])/2-L.y,n=(t.aabb[2]+t.aabb[5])/2-L.z;F=Math.max(F,Math.sqrt(e*e+s*s+n*n))}let E=new l(e,!0,{preserveDrawingBuffer:!1}),B=new r(E);B.clearColor=new p(.04,.05,.07,1);let T=new u("world-cam",Math.PI/4,Math.PI/3,2.4*F,L,B);T.attachControl(e,!0),(0,a.disableWheelZoom)(T),x.current=T,g.current={target:L,alpha:T.alpha,beta:T.beta,radius:T.radius},new h("world-light",new d(.4,1,.3),B);let N=Math.max(.02*F,.25*o)/(.9*o),I=T.radius,Z="cube"===M?j.CreateBox("world-voxel",{size:.9*o},B):j.CreateSphere("world-voxel",{diameter:.9*o,segments:6},B),O=new m("world-voxel-mat",B);O.diffuseColor=new k(1,1,1),O.specularColor=new k(0,0,0),Z.material=O;let $=0,H=new Float32Array(0),D=new Float32Array(0),V=-1,W=()=>{if(0===$)return;let t=Math.min(8,Math.max(.6,T.radius/I));if(!(.01>Math.abs(t-V))){V=t;for(let e=0;e<$;e++){let s=D[e]*t,n=16*e;H[n]=s,H[n+5]=s,H[n+10]=s}Z.thinInstanceBufferUpdated("matrix")}};B.onBeforeRenderObservable.add(W);let U=null,K="\0",X=()=>{(()=>{let t=P.current,e=t.map(t=>`${t.name}:${t.aabb.join(",")}`).join("|");if(e===K||(K=e,U&&(U.dispose(!1,!0),U=null),0===t.length))return;U=j.CreateBox("scene-proxy",{size:1},B);let s=new m("scene-proxy-mat",B);s.wireframe=!0,s.disableLighting=!0,s.emissiveColor=new k(.32,.4,.52),s.alpha=.35,U.material=s,U.isPickable=!0,U.thinInstanceEnablePicking=!0,U.metadata={hoverLabels:t.map(t=>t.name)};let n=t.length,a=new Float32Array(16*n);for(let e=0;e<n;e++){let s=t[e].aabb,n=Math.max(s[3]-s[0],.001),i=Math.max(s[4]-s[1],.001),c=Math.max(s[5]-s[2],.001);b.Scaling(n,i,c).multiply(b.Translation((s[0]+s[3])/2,(s[1]+s[4])/2,(s[2]+s[5])/2)).copyToArray(a,16*e)}U.thinInstanceSetBuffer("matrix",a,16,!0)})(),(()=>{let t=C.current,e=R.current,s=t.length;if(0===s){$=0,Z.isVisible=!1;return}let a=(0,n.percentileMax)(t.map(t=>t.count),.95),i=new Float32Array(16*s),c=new Float32Array(4*s),l=new Float32Array(s);for(let e=0;e<s;e++){let s=t[e],r=Math.min(1,s.count/a),u=N*(.5+.5*r);l[e]=u,b.Scaling(u,u,u).multiply(b.Translation((s.vx+.5)*o,(s.vy+.5)*o,(s.vz+.5)*o)).copyToArray(i,16*e);let[h,d,k]=(0,n.heatRgb)(r);c[4*e]=h,c[4*e+1]=d,c[4*e+2]=k,c[4*e+3]=1}$=s,H=i,D=l,Z.isVisible=!0,Z.isPickable=!!e,Z.thinInstanceEnablePicking=!!e,Z.metadata=e?{hoverLabels:e}:null,Z.thinInstanceSetBuffer("matrix",H,16,!1),Z.thinInstanceSetBuffer("color",c,4,!0),V=-1,W()})()};S.current=X,X(),E.runRenderLoop(()=>B.render());let Y=()=>E.resize();window.addEventListener("resize",Y);let G=(0,i.attachMeshHover)(B,e,A),J=(0,a.attachDoubleClickFocus)(B,e,T);y("ready"),c=()=>{window.removeEventListener("resize",Y),G(),J(),A(null),S.current=null,x.current=null,g.current=null,B.dispose(),E.dispose()}}catch(t){if(s)return;y("error"),_(t instanceof Error?t.message:"Failed to render heatmap.")}})(),()=>{s=!0,c?.()}},[M,o,F]),(0,s.useEffect)(()=>{S.current?.()},[u,h,f]);let E=m?m.cells>u.length?` Showing the ${u.length.toLocaleString()} busiest of ${m.cells.toLocaleString()} occupied cells (${m.hits.toLocaleString()} total hits).`:` ${m.cells.toLocaleString()} occupied cells, ${m.hits.toLocaleString()} total hits.`:"";return(0,e.jsxs)("div",{className:"relative",children:[(0,e.jsx)("canvas",{ref:v,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),L?(0,e.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:L.x+12,top:L.y+12},children:L.label}):null,"ready"===w?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(r,{shape:M,onChange:q}),(0,e.jsx)(l.ZoomButtons,{onZoom:t=>x.current&&(0,a.stepZoom)(x.current,t),onReset:()=>x.current&&g.current&&(0,a.resetFocus)(x.current,g.current)}),(0,e.jsx)(c.HeatLegend,{title:d,lowLabel:k,highLabel:p,note:b+E})]}):(0,e.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===w?"Rendering…":"empty"===w?j:"error"===w?z??"Heatmap unavailable.":null})]})}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,64073,t=>{"use strict";var r=t.i(27111),e=t.i(26747),i=t.i(46202),s=t.i(99493);function a(t){return Math.pow(t,e.ToLinearSpace)}function n(t){return t<=.04045?.0773993808*t:Math.pow(.947867299*(t+.055),2.4)}function h(t){return Math.pow(t,e.ToGammaSpace)}function o(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}class g{constructor(t=0,r=0,e=0){this.r=t,this.g=r,this.b=e}toString(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+"}"}getClassName(){return"Color3"}getHashCode(){let t=255*this.r|0;return 397*(t=397*t^255*this.g)^255*this.b}toArray(t,r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,this}fromArray(t,r=0){return g.FromArrayToRef(t,r,this),this}toColor4(t=1){return new l(this.r,this.g,this.b,t)}asArray(){return[this.r,this.g,this.b]}toLuminance(){return .3*this.r+.59*this.g+.11*this.b}multiply(t){return new g(this.r*t.r,this.g*t.g,this.b*t.b)}multiplyToRef(t,r){return r.r=this.r*t.r,r.g=this.g*t.g,r.b=this.b*t.b,r}multiplyInPlace(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyByFloats(t,r,e){return new g(this.r*t,this.g*r,this.b*e)}divide(t){throw ReferenceError("Can not divide a color")}divideToRef(t,r){throw ReferenceError("Can not divide a color")}divideInPlace(t){throw ReferenceError("Can not divide a color")}minimizeInPlace(t){return this.minimizeInPlaceFromFloats(t.r,t.g,t.b)}maximizeInPlace(t){return this.maximizeInPlaceFromFloats(t.r,t.g,t.b)}minimizeInPlaceFromFloats(t,r,e){return this.r=Math.min(t,this.r),this.g=Math.min(r,this.g),this.b=Math.min(e,this.b),this}maximizeInPlaceFromFloats(t,r,e){return this.r=Math.max(t,this.r),this.g=Math.max(r,this.g),this.b=Math.max(e,this.b),this}floorToRef(t){throw ReferenceError("Can not floor a color")}floor(){throw ReferenceError("Can not floor a color")}fractToRef(t){throw ReferenceError("Can not fract a color")}fract(){throw ReferenceError("Can not fract a color")}equals(t){return t&&this.r===t.r&&this.g===t.g&&this.b===t.b}equalsFloats(t,r,e){return this.equalsToFloats(t,r,e)}equalsToFloats(t,r,e){return this.r===t&&this.g===r&&this.b===e}equalsWithEpsilon(t,r=e.Epsilon){return(0,i.WithinEpsilon)(this.r,t.r,r)&&(0,i.WithinEpsilon)(this.g,t.g,r)&&(0,i.WithinEpsilon)(this.b,t.b,r)}negate(){throw ReferenceError("Can not negate a color")}negateInPlace(){throw ReferenceError("Can not negate a color")}negateToRef(t){throw ReferenceError("Can not negate a color")}scale(t){return new g(this.r*t,this.g*t,this.b*t)}scaleInPlace(t){return this.r*=t,this.g*=t,this.b*=t,this}scaleToRef(t,r){return r.r=this.r*t,r.g=this.g*t,r.b=this.b*t,r}scaleAndAddToRef(t,r){return r.r+=this.r*t,r.g+=this.g*t,r.b+=this.b*t,r}clampToRef(t=0,r=1,e){return e.r=(0,i.Clamp)(this.r,t,r),e.g=(0,i.Clamp)(this.g,t,r),e.b=(0,i.Clamp)(this.b,t,r),e}add(t){return new g(this.r+t.r,this.g+t.g,this.b+t.b)}addInPlace(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addInPlaceFromFloats(t,r,e){return this.r+=t,this.g+=r,this.b+=e,this}addToRef(t,r){return r.r=this.r+t.r,r.g=this.g+t.g,r.b=this.b+t.b,r}subtract(t){return new g(this.r-t.r,this.g-t.g,this.b-t.b)}subtractToRef(t,r){return r.r=this.r-t.r,r.g=this.g-t.g,r.b=this.b-t.b,r}subtractInPlace(t){return this.r-=t.r,this.g-=t.g,this.b-=t.b,this}subtractFromFloats(t,r,e){return new g(this.r-t,this.g-r,this.b-e)}subtractFromFloatsToRef(t,r,e,i){return i.r=this.r-t,i.g=this.g-r,i.b=this.b-e,i}clone(){return new g(this.r,this.g,this.b)}copyFrom(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyFromFloats(t,r,e){return this.r=t,this.g=r,this.b=e,this}set(t,r,e){return this.copyFromFloats(t,r,e)}setAll(t){return this.r=this.g=this.b=t,this}toHexString(){let t=Math.round(255*this.r),r=Math.round(255*this.g),e=Math.round(255*this.b);return"#"+(0,i.ToHex)(t)+(0,i.ToHex)(r)+(0,i.ToHex)(e)}fromHexString(t){return"#"!==t.substring(0,1)||7!==t.length||(this.r=parseInt(t.substring(1,3),16)/255,this.g=parseInt(t.substring(3,5),16)/255,this.b=parseInt(t.substring(5,7),16)/255),this}toHSV(){return this.toHSVToRef(new g)}toHSVToRef(t){let r=this.r,e=this.g,i=this.b,s=Math.max(r,e,i),a=Math.min(r,e,i),n=0,h=0,o=s-a;return 0!==s&&(h=o/s),s!=a&&(s==r?(n=(e-i)/o,e<i&&(n+=6)):s==e?n=(i-r)/o+2:s==i&&(n=(r-e)/o+4),n*=60),t.r=n,t.g=h,t.b=s,t}toLinearSpace(t=!1){let r=new g;return this.toLinearSpaceToRef(r,t),r}toLinearSpaceToRef(t,r=!1){return r?(t.r=n(this.r),t.g=n(this.g),t.b=n(this.b)):(t.r=a(this.r),t.g=a(this.g),t.b=a(this.b)),this}toGammaSpace(t=!1){let r=new g;return this.toGammaSpaceToRef(r,t),r}toGammaSpaceToRef(t,r=!1){return r?(t.r=o(this.r),t.g=o(this.g),t.b=o(this.b)):(t.r=h(this.r),t.g=h(this.g),t.b=h(this.b)),this}static HSVtoRGBToRef(t,r,e,i){let s=e*r,a=t/60,n=s*(1-Math.abs(a%2-1)),h=0,o=0,g=0;a>=0&&a<=1?(h=s,o=n):a>=1&&a<=2?(h=n,o=s):a>=2&&a<=3?(o=s,g=n):a>=3&&a<=4?(o=n,g=s):a>=4&&a<=5?(h=n,g=s):a>=5&&a<=6&&(h=s,g=n);let l=e-s;return i.r=h+l,i.g=o+l,i.b=g+l,i}static FromHSV(t,r,e){let i=new g(0,0,0);return g.HSVtoRGBToRef(t,r,e,i),i}static FromHexString(t){return new g(0,0,0).fromHexString(t)}static FromArray(t,r=0){return new g(t[r],t[r+1],t[r+2])}static FromArrayToRef(t,r=0,e){e.r=t[r],e.g=t[r+1],e.b=t[r+2]}static FromInts(t,r,e){return new g(t/255,r/255,e/255)}static Lerp(t,r,e){let i=new g(0,0,0);return g.LerpToRef(t,r,e,i),i}static LerpToRef(t,r,e,i){i.r=t.r+(r.r-t.r)*e,i.g=t.g+(r.g-t.g)*e,i.b=t.b+(r.b-t.b)*e}static Hermite(t,r,e,i,s){let a=s*s,n=s*a,h=2*n-3*a+1,o=-2*n+3*a,l=n-2*a+s,c=n-a;return new g(t.r*h+e.r*o+r.r*l+i.r*c,t.g*h+e.g*o+r.g*l+i.g*c,t.b*h+e.b*o+r.b*l+i.b*c)}static Hermite1stDerivative(t,r,e,i,s){let a=g.Black();return this.Hermite1stDerivativeToRef(t,r,e,i,s,a),a}static Hermite1stDerivativeToRef(t,r,e,i,s,a){let n=s*s;a.r=(n-s)*6*t.r+(3*n-4*s+1)*r.r+(-n+s)*6*e.r+(3*n-2*s)*i.r,a.g=(n-s)*6*t.g+(3*n-4*s+1)*r.g+(-n+s)*6*e.g+(3*n-2*s)*i.g,a.b=(n-s)*6*t.b+(3*n-4*s+1)*r.b+(-n+s)*6*e.b+(3*n-2*s)*i.b}static Red(){return new g(1,0,0)}static Green(){return new g(0,1,0)}static Blue(){return new g(0,0,1)}static Black(){return new g(0,0,0)}static get BlackReadOnly(){return g._BlackReadOnly}static White(){return new g(1,1,1)}static Purple(){return new g(.5,0,.5)}static Magenta(){return new g(1,0,1)}static Yellow(){return new g(1,1,0)}static Gray(){return new g(.5,.5,.5)}static Teal(){return new g(0,1,1)}static Random(){return new g(Math.random(),Math.random(),Math.random())}}g._V8PerformanceHack=new g(.5,.5,.5),g._BlackReadOnly=g.Black();class l{constructor(t=0,r=0,e=0,i=1){this.r=t,this.g=r,this.b=e,this.a=i}asArray(){return[this.r,this.g,this.b,this.a]}toArray(t,r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,t[r+3]=this.a,this}fromArray(t,r=0){return this.r=t[r],this.g=t[r+1],this.b=t[r+2],this.a=t[r+3],this}equals(t){return t&&this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}add(t){return new l(this.r+t.r,this.g+t.g,this.b+t.b,this.a+t.a)}addToRef(t,r){return r.r=this.r+t.r,r.g=this.g+t.g,r.b=this.b+t.b,r.a=this.a+t.a,r}addInPlace(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this.a+=t.a,this}addInPlaceFromFloats(t,r,e,i){return this.r+=t,this.g+=r,this.b+=e,this.a+=i,this}subtract(t){return new l(this.r-t.r,this.g-t.g,this.b-t.b,this.a-t.a)}subtractToRef(t,r){return r.r=this.r-t.r,r.g=this.g-t.g,r.b=this.b-t.b,r.a=this.a-t.a,r}subtractInPlace(t){return this.r-=t.r,this.g-=t.g,this.b-=t.b,this.a-=t.a,this}subtractFromFloats(t,r,e,i){return new l(this.r-t,this.g-r,this.b-e,this.a-i)}subtractFromFloatsToRef(t,r,e,i,s){return s.r=this.r-t,s.g=this.g-r,s.b=this.b-e,s.a=this.a-i,s}scale(t){return new l(this.r*t,this.g*t,this.b*t,this.a*t)}scaleInPlace(t){return this.r*=t,this.g*=t,this.b*=t,this.a*=t,this}scaleToRef(t,r){return r.r=this.r*t,r.g=this.g*t,r.b=this.b*t,r.a=this.a*t,r}scaleAndAddToRef(t,r){return r.r+=this.r*t,r.g+=this.g*t,r.b+=this.b*t,r.a+=this.a*t,r}clampToRef(t=0,r=1,e){return e.r=(0,i.Clamp)(this.r,t,r),e.g=(0,i.Clamp)(this.g,t,r),e.b=(0,i.Clamp)(this.b,t,r),e.a=(0,i.Clamp)(this.a,t,r),e}multiply(t){return new l(this.r*t.r,this.g*t.g,this.b*t.b,this.a*t.a)}multiplyToRef(t,r){return r.r=this.r*t.r,r.g=this.g*t.g,r.b=this.b*t.b,r.a=this.a*t.a,r}multiplyInPlace(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this.a*=t.a,this}multiplyByFloats(t,r,e,i){return new l(this.r*t,this.g*r,this.b*e,this.a*i)}divide(t){throw ReferenceError("Can not divide a color")}divideToRef(t,r){throw ReferenceError("Can not divide a color")}divideInPlace(t){throw ReferenceError("Can not divide a color")}minimizeInPlace(t){return this.r=Math.min(this.r,t.r),this.g=Math.min(this.g,t.g),this.b=Math.min(this.b,t.b),this.a=Math.min(this.a,t.a),this}maximizeInPlace(t){return this.r=Math.max(this.r,t.r),this.g=Math.max(this.g,t.g),this.b=Math.max(this.b,t.b),this.a=Math.max(this.a,t.a),this}minimizeInPlaceFromFloats(t,r,e,i){return this.r=Math.min(t,this.r),this.g=Math.min(r,this.g),this.b=Math.min(e,this.b),this.a=Math.min(i,this.a),this}maximizeInPlaceFromFloats(t,r,e,i){return this.r=Math.max(t,this.r),this.g=Math.max(r,this.g),this.b=Math.max(e,this.b),this.a=Math.max(i,this.a),this}floorToRef(t){throw ReferenceError("Can not floor a color")}floor(){throw ReferenceError("Can not floor a color")}fractToRef(t){throw ReferenceError("Can not fract a color")}fract(){throw ReferenceError("Can not fract a color")}negate(){throw ReferenceError("Can not negate a color")}negateInPlace(){throw ReferenceError("Can not negate a color")}negateToRef(t){throw ReferenceError("Can not negate a color")}equalsWithEpsilon(t,r=e.Epsilon){return(0,i.WithinEpsilon)(this.r,t.r,r)&&(0,i.WithinEpsilon)(this.g,t.g,r)&&(0,i.WithinEpsilon)(this.b,t.b,r)&&(0,i.WithinEpsilon)(this.a,t.a,r)}equalsToFloats(t,r,e,i){return this.r===t&&this.g===r&&this.b===e&&this.a===i}toString(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+" A:"+this.a+"}"}getClassName(){return"Color4"}getHashCode(){let t=255*this.r|0;return 397*(t=397*(t=397*t^255*this.g)^255*this.b)^255*this.a}clone(){return new l().copyFrom(this)}copyFrom(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}copyFromFloats(t,r,e,i){return this.r=t,this.g=r,this.b=e,this.a=i,this}set(t,r,e,i){return this.copyFromFloats(t,r,e,i)}setAll(t){return this.r=this.g=this.b=this.a=t,this}toHexString(t=!1){let r=Math.round(255*this.r),e=Math.round(255*this.g),s=Math.round(255*this.b);if(t)return"#"+(0,i.ToHex)(r)+(0,i.ToHex)(e)+(0,i.ToHex)(s);let a=Math.round(255*this.a);return"#"+(0,i.ToHex)(r)+(0,i.ToHex)(e)+(0,i.ToHex)(s)+(0,i.ToHex)(a)}fromHexString(t){return"#"!==t.substring(0,1)||9!==t.length&&7!==t.length||(this.r=parseInt(t.substring(1,3),16)/255,this.g=parseInt(t.substring(3,5),16)/255,this.b=parseInt(t.substring(5,7),16)/255,9===t.length&&(this.a=parseInt(t.substring(7,9),16)/255)),this}toLinearSpace(t=!1){let r=new l;return this.toLinearSpaceToRef(r,t),r}toLinearSpaceToRef(t,r=!1){return r?(t.r=n(this.r),t.g=n(this.g),t.b=n(this.b)):(t.r=a(this.r),t.g=a(this.g),t.b=a(this.b)),t.a=this.a,this}toGammaSpace(t=!1){let r=new l;return this.toGammaSpaceToRef(r,t),r}toGammaSpaceToRef(t,r=!1){return r?(t.r=o(this.r),t.g=o(this.g),t.b=o(this.b)):(t.r=h(this.r),t.g=h(this.g),t.b=h(this.b)),t.a=this.a,this}static FromHexString(t){return"#"!==t.substring(0,1)||9!==t.length&&7!==t.length?new l(0,0,0,0):new l(0,0,0,1).fromHexString(t)}static Lerp(t,r,e){return l.LerpToRef(t,r,e,new l)}static LerpToRef(t,r,e,i){return i.r=t.r+(r.r-t.r)*e,i.g=t.g+(r.g-t.g)*e,i.b=t.b+(r.b-t.b)*e,i.a=t.a+(r.a-t.a)*e,i}static Hermite(t,r,e,i,s){let a=s*s,n=s*a,h=2*n-3*a+1,o=-2*n+3*a,g=n-2*a+s,c=n-a;return new l(t.r*h+e.r*o+r.r*g+i.r*c,t.g*h+e.g*o+r.g*g+i.g*c,t.b*h+e.b*o+r.b*g+i.b*c,t.a*h+e.a*o+r.a*g+i.a*c)}static Hermite1stDerivative(t,r,e,i,s){let a=new l;return this.Hermite1stDerivativeToRef(t,r,e,i,s,a),a}static Hermite1stDerivativeToRef(t,r,e,i,s,a){let n=s*s;a.r=(n-s)*6*t.r+(3*n-4*s+1)*r.r+(-n+s)*6*e.r+(3*n-2*s)*i.r,a.g=(n-s)*6*t.g+(3*n-4*s+1)*r.g+(-n+s)*6*e.g+(3*n-2*s)*i.g,a.b=(n-s)*6*t.b+(3*n-4*s+1)*r.b+(-n+s)*6*e.b+(3*n-2*s)*i.b,a.a=(n-s)*6*t.a+(3*n-4*s+1)*r.a+(-n+s)*6*e.a+(3*n-2*s)*i.a}static FromColor3(t,r=1){return new l(t.r,t.g,t.b,r)}static FromArray(t,r=0){return new l(t[r],t[r+1],t[r+2],t[r+3])}static FromArrayToRef(t,r=0,e){e.r=t[r],e.g=t[r+1],e.b=t[r+2],e.a=t[r+3]}static FromInts(t,r,e,i){return new l(t/255,r/255,e/255,i/255)}static CheckColors4(t,r){if(t.length===3*r){let r=[];for(let e=0;e<t.length;e+=3){let i=e/3*4;r[i]=t[e],r[i+1]=t[e+1],r[i+2]=t[e+2],r[i+3]=1}return r}return t}}l._V8PerformanceHack=new l(.5,.5,.5,.5);class c{}c.Color3=(0,r.BuildArray)(3,g.Black),c.Color4=(0,r.BuildArray)(3,()=>new l(0,0,0,0));let u=!1;t.s(["Color3",0,g,"Color4",0,l,"RegisterMathColor",0,function(){u||(u=!0,Object.defineProperties(g.prototype,{dimension:{value:[3]},rank:{value:1}}),Object.defineProperties(l.prototype,{dimension:{value:[4]},rank:{value:1}}),(0,s.RegisterClass)("BABYLON.Color3",g),(0,s.RegisterClass)("BABYLON.Color4",l))},"TmpColors",0,c])},6939,t=>{"use strict";t.s(["RandomGUID",0,function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=16*Math.random()|0;return("x"===t?r:3&r|8).toString(16)})}])},85789,t=>{"use strict";class r{static _CheckLimit(t,e){let i=r._LogLimitOutputs[t];return i?i.current++:(i={limit:e,current:1},r._LogLimitOutputs[t]=i),i.current<=i.limit}static _GenerateLimitMessage(t,e=1){let i=r._LogLimitOutputs[t];if(!i||!r.MessageLimitReached)return;let s=this._Levels[e];i.current===i.limit&&r[s.name](r.MessageLimitReached.replace(/%LIMIT%/g,""+i.limit).replace(/%TYPE%/g,s.name??""))}static _AddLogEntry(t){r._LogCache=t+r._LogCache,r.OnNewCacheEntry&&r.OnNewCacheEntry(t)}static _FormatMessage(t){let r=t=>t<10?"0"+t:""+t,e=new Date;return"["+r(e.getHours())+":"+r(e.getMinutes())+":"+r(e.getSeconds())+"]: "+t}static _LogDisabled(t,r){}static _LogEnabled(t=1,e,i){let s=Array.isArray(e)?e[0]:e;if(void 0!==i&&!r._CheckLimit(s,i))return;let a=r._FormatMessage(s),n=this._Levels[t],h=Array.isArray(e)?e.slice(1):[];n.logFunc&&n.logFunc("BJS - "+a,...h);let o=`<div style='color:${n.color}'>${a}</div><br>`;r._AddLogEntry(o),r._GenerateLimitMessage(s,t)}static get LogCache(){return r._LogCache}static ClearLogCache(){r._LogCache="",r._LogLimitOutputs={},r.errorsCount=0}static set LogLevels(t){for(let e of(r.Log=r._LogDisabled,r.Warn=r._LogDisabled,r.Error=r._LogDisabled,[r.MessageLogLevel,r.WarningLogLevel,r.ErrorLogLevel]))(t&e)===e&&(r[this._Levels[e].name]=r._LogEnabled.bind(r,e))}}r.NoneLogLevel=0,r.MessageLogLevel=1,r.WarningLogLevel=2,r.ErrorLogLevel=4,r.AllLogLevel=7,r.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",r._LogCache="",r._LogLimitOutputs={},r._Levels=[{},{color:"white",logFunc:console.log,name:"Log"},{color:"orange",logFunc:console.warn,name:"Warn"},{},{color:"red",logFunc:console.error,name:"Error"}],r.errorsCount=0,r.Log=r._LogEnabled.bind(r,r.MessageLogLevel),r.Warn=r._LogEnabled.bind(r,r.WarningLogLevel),r.Error=r._LogEnabled.bind(r,r.ErrorLogLevel),t.s(["Logger",0,r])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63615,e=>{"use strict";var t=e.i(85789),r=e.i(66464);function s(e){switch(e){case 5120:case 5121:return 1;case 5122:case 5123:case 5131:return 2;case 5124:case 5125:case 5126:return 4;default:throw Error(`Invalid type '${e}'`)}}function n(e){switch(e){case 5120:return Int8Array;case 5121:return Uint8Array;case 5122:return Int16Array;case 5123:case 5131:return Uint16Array;case 5124:return Int32Array;case 5125:return Uint32Array;case 5126:return Float32Array;default:throw Error(`Invalid component type '${e}'`)}}function o(e,t,n,o,i,a,l,u){let c=Array(o),f=Array(o);if(e instanceof Array){let r=t/4,s=n/4;for(let t=0;t<a;t+=o){for(let t=0;t<o;t++)c[t]=f[t]=e[r+t];u(f,t);for(let t=0;t<o;t++)c[t]!==f[t]&&(e[r+t]=f[t]);r+=s}}else{let d=ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e),p=s(i);for(let e=0;e<a;e+=o){for(let e=0,s=t;e<o;e++,s+=p)c[e]=f[e]=function(e,t,s,n){switch(t){case 5120:{let t=e.getInt8(s);return n&&(t=Math.max(t/127,-1)),t}case 5121:{let t=e.getUint8(s);return n&&(t/=255),t}case 5122:{let t=e.getInt16(s,!0);return n&&(t=Math.max(t/32767,-1)),t}case 5123:{let t=e.getUint16(s,!0);return n&&(t/=65535),t}case 5131:return(0,r.FromHalfFloat)(e.getUint16(s,!0));case 5124:return e.getInt32(s,!0);case 5125:return e.getUint32(s,!0);case 5126:return e.getFloat32(s,!0);default:throw Error(`Invalid component type ${t}`)}}(d,i,s,l);u(f,e);for(let e=0,s=t;e<o;e++,s+=p)c[e]!==f[e]&&function(e,t,s,n,o){switch(t){case 5120:n&&(o=Math.round(127*o)),e.setInt8(s,o);break;case 5121:n&&(o=Math.round(255*o)),e.setUint8(s,o);break;case 5122:n&&(o=Math.round(32767*o)),e.setInt16(s,o,!0);break;case 5123:n&&(o=Math.round(65535*o)),e.setUint16(s,o,!0);break;case 5131:e.setUint16(s,(0,r.ToHalfFloat)(o),!0);break;case 5124:e.setInt32(s,o,!0);break;case 5125:e.setUint32(s,o,!0);break;case 5126:e.setFloat32(s,o,!0);break;default:throw Error(`Invalid component type ${t}`)}}(d,i,s,l,f[e]);t+=n}}}e.s(["CopyFloatData",0,function(e,r,n,i,a,l,u,c){let f=r*s(n),d=u*r;if(c.length!==d)throw Error("Output length is not valid");if(5126!==n||a!==f)return void o(e,i,a,r,n,d,l,(e,t)=>{for(let s=0;s<r;s++)c[t+s]=e[s]});if(e instanceof Array){let t=i/4;c.set(e,t)}else if(ArrayBuffer.isView(e)){let r=e.byteOffset+i;if((3&r)!=0){t.Logger.Warn("Float array must be aligned to 4-bytes border"),c.set(new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)));return}let s=new Float32Array(e.buffer,r,d);c.set(s)}else{let t=new Float32Array(e,i,d);c.set(t)}},"EnumerateFloatValues",0,o,"GetBlobBufferSource",0,function(e){let t=e.buffer;if(t instanceof ArrayBuffer)return e;let r=new ArrayBuffer(e.byteLength);return new Uint8Array(r).set(new Uint8Array(t,e.byteOffset,e.byteLength)),r},"GetFloatData",0,function(e,r,n,i,a,l,u,c){let f=r*s(n),d=u*r;if(5126!==n||a!==f){let t=new Float32Array(d);return o(e,i,a,r,n,d,l,(e,s)=>{for(let n=0;n<r;n++)t[s+n]=e[n]}),t}if(!(e instanceof Array||e instanceof Float32Array)||0!==i||e.length!==d)if(e instanceof Array){let t=i/4;return e.slice(t,t+d)}else{if(!ArrayBuffer.isView(e))return new Float32Array(e,i,d);let r=e.byteOffset+i;return((3&r)!=0&&(t.Logger.Warn("Float array must be aligned to 4-bytes border"),c=!0),c)?new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)):new Float32Array(e.buffer,r,d)}return c?e.slice():e},"GetTypeByteLength",0,s,"GetTypedArrayConstructor",0,n,"GetTypedArrayData",0,function(e,r,i,a,l,u,c){let f,d=s(i),p=n(i),h=u*r;if(Array.isArray(e)){if((3&a)!=0||(3&l)!=0)throw Error("byteOffset and byteStride must be a multiple of 4 for number[] data.");let t=a/4,s=l/4;if(t+(u-1)*s+r>e.length)throw Error("Last accessed index is out of bounds.");if(s<r)throw Error("Data stride cannot be smaller than the component size.");if(s!==r){let t=new p(h);return o(e,a,l,r,i,h,!1,(e,s)=>{for(let n=0;n<r;n++)t[s+n]=e[n]}),t}return new p(e.slice(t,t+h))}let g=a;if(ArrayBuffer.isView(e)?(f=e.buffer,g+=e.byteOffset):f=e,g+(u-1)*l+r*d>f.byteLength)throw Error("Last accessed byte is out of bounds.");let y=r*d;if(l<y)throw Error("Byte stride cannot be smaller than the component's byte size.");if(l!==y){let e=new p(h),t=new Uint8Array(f,g),s=new Uint8Array(e.buffer),n=r*d;for(let e=0,r=0,o=0;e<u;e++,r+=l,o+=n)s.set(t.subarray(r,r+n),o);return e}return(1!==d&&(g&d-1)!=0&&(t.Logger.Warn("Array must be aligned to border of element size. Data will be copied."),c=!0),c)?new p(f.slice(g,g+h*d)):new p(f,g,h)}])},4385,94712,e=>{"use strict";var t=e.i(43880);let r={};function s(e,t,r,s){if(e){t?e.IS_NDC_HALF_ZRANGE="":delete e.IS_NDC_HALF_ZRANGE,r?e.USE_REVERSE_DEPTHBUFFER="":delete e.USE_REVERSE_DEPTHBUFFER,s?e.USE_EXACT_SRGB_CONVERSIONS="":delete e.USE_EXACT_SRGB_CONVERSIONS;return}{let e="";return t&&(e+="#define IS_NDC_HALF_ZRANGE"),r&&(e&&(e+="\n"),e+="#define USE_REVERSE_DEPTHBUFFER"),s&&(e&&(e+="\n"),e+="#define USE_EXACT_SRGB_CONVERSIONS"),e}}e.s(["EngineFunctionContext",0,r,"_ConcatenateShader",0,function(e,t,r=""){return r+(t?t+"\n":"")+e},"_GetGlobalDefines",0,s,"_LoadFile",0,function(e,s,n,o,i,a,l){let u=l||r.loadFile;if(!u)throw(0,t._WarnImport)("FileTools");return u(e,s,n,o,i,a)},"allocateAndCopyTypedBuffer",0,function(e,t,r=!1,s){switch(e){case 3:{let e=new Int8Array(t);return s&&e.set(new Int8Array(s)),e}case 0:{let e=new Uint8Array(t);return s&&e.set(new Uint8Array(s)),e}case 4:{let e=new Int16Array("number"!=typeof t?t:r?t/2:t);return s&&e.set(new Int16Array(s)),e}case 5:case 8:case 9:case 10:case 2:{let e=new Uint16Array("number"!=typeof t?t:r?t/2:t);return s&&e.set(new Uint16Array(s)),e}case 6:{let e=new Int32Array("number"!=typeof t?t:r?t/4:t);return s&&e.set(new Int32Array(s)),e}case 7:case 11:case 12:case 13:case 14:case 15:{let e=new Uint32Array("number"!=typeof t?t:r?t/4:t);return s&&e.set(new Uint32Array(s)),e}case 1:{let e=new Float32Array("number"!=typeof t?t:r?t/4:t);return s&&e.set(new Float32Array(s)),e}}let n=new Uint8Array(t);return s&&n.set(new Uint8Array(s)),n}],4385);class n{constructor(){this.children=[]}isValid(e){return!0}process(e,t,r){let s="";if(this.line){let r=this.line,n=t.processor;if(n){n.lineProcessor&&(r=n.lineProcessor(r,t.isFragment,t.processingContext));let s=t.processor?.attributeKeywordName??"attribute",o=t.isFragment&&t.processor?.varyingFragmentKeywordName?t.processor?.varyingFragmentKeywordName:!t.isFragment&&t.processor?.varyingVertexKeywordName?t.processor?.varyingVertexKeywordName:"varying";!t.isFragment&&n.attributeProcessor&&this.line.startsWith(s)?r=n.attributeProcessor(this.line,e,t.processingContext):n.varyingProcessor&&(n.varyingCheck?.(this.line,t.isFragment)||!n.varyingCheck&&this.line.startsWith(o))?r=n.varyingProcessor(this.line,t.isFragment,e,t.processingContext):n.uniformProcessor&&n.uniformRegexp&&n.uniformRegexp.test(this.line)?t.lookForClosingBracketForUniformBuffer||(r=n.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):n.uniformBufferProcessor&&n.uniformBufferRegexp&&n.uniformBufferRegexp.test(this.line)?t.lookForClosingBracketForUniformBuffer||(r=n.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0):n.textureProcessor&&n.textureRegexp&&n.textureRegexp.test(this.line)?r=n.textureProcessor(this.line,t.isFragment,e,t.processingContext):(n.uniformProcessor||n.uniformBufferProcessor)&&this.line.startsWith("uniform")&&!t.lookForClosingBracketForUniformBuffer&&(/uniform\s+(?:(?:highp)?|(?:lowp)?)\s*(\S+)\s+(\S+)\s*;/.test(this.line)?n.uniformProcessor&&(r=n.uniformProcessor(this.line,t.isFragment,e,t.processingContext)):n.uniformBufferProcessor&&(r=n.uniformBufferProcessor(this.line,t.isFragment,t.processingContext),t.lookForClosingBracketForUniformBuffer=!0)),t.lookForClosingBracketForUniformBuffer&&-1!==this.line.indexOf("}")&&(t.lookForClosingBracketForUniformBuffer=!1,n.endOfUniformBufferProcessor&&(r=n.endOfUniformBufferProcessor(this.line,t.isFragment,t.processingContext)))}s+=r+"\n"}for(let n of this.children)s+=n.process(e,t,r);return this.additionalDefineKey&&(e[this.additionalDefineKey]=this.additionalDefineValue||"true",r[this.additionalDefineKey]=e[this.additionalDefineKey]),s}}class o{constructor(){this._lines=[]}get currentLine(){return this._lines[this.lineIndex]}get canRead(){return this.lineIndex<this._lines.length-1}set lines(e){for(let t of(this._lines.length=0,e)){if(!t||"\r"===t)continue;if("#"===t[0]){this._lines.push(t);continue}let e=t.trim();if(!e)continue;if(e.startsWith("//")){this._lines.push(t);continue}let r=e.indexOf(";");if(-1===r)this._lines.push(e);else if(r===e.length-1)e.length>1&&this._lines.push(e);else{let e=t.split(";");for(let t=0;t<e.length;t++){let r=e[t];r&&(r=r.trim())&&this._lines.push(r+(t!==e.length-1?";":""))}}}}}class i extends n{process(e,t,r){for(let s=0;s<this.children.length;s++){let n=this.children[s];if(n.isValid(e))return n.process(e,t,r)}return""}}class a extends n{isValid(e){return this.testExpression.isTrue(e)}}class l{isTrue(e){return!0}static postfixToInfix(e){let t=[];for(let r of e)if(void 0===l._OperatorPriority[r])t.push(r);else{let e=t[t.length-1],s=t[t.length-2];t.length-=2,t.push(`(${s}${r}${e})`)}return t[t.length-1]}static infixToPostfix(e){let t=l._InfixToPostfixCache.get(e);if(t)return t.accessTime=Date.now(),t.result;if(!e.includes("&&")&&!e.includes("||")&&!e.includes(")")&&!e.includes("("))return[e];let r=[],s=-1,n=()=>{""!==(c=c.trim())&&(r.push(c),c="")},o=e=>{s<l._Stack.length-1&&(l._Stack[++s]=e)},i=()=>l._Stack[s],a=()=>-1===s?"!!INVALID EXPRESSION!!":l._Stack[s--],u=0,c="";for(;u<e.length;){let t=e.charAt(u),f=u<e.length-1?e.substring(u,2+u):"";if("("===t)c="",o(t);else if(")"===t){for(n();-1!==s&&"("!==i();)r.push(a());a()}else if(l._OperatorPriority[f]>1){for(n();-1!==s&&l._OperatorPriority[i()]>=l._OperatorPriority[f];)r.push(a());o(f),u++}else c+=t;u++}for(n();-1!==s;)"("===i()?a():r.push(a());return l._InfixToPostfixCache.size>=l.InfixToPostfixCacheLimitSize&&l.ClearCache(),l._InfixToPostfixCache.set(e,{result:r,accessTime:Date.now()}),r}static ClearCache(){let e=Array.from(l._InfixToPostfixCache.entries()).sort((e,t)=>e[1].accessTime-t[1].accessTime);for(let t=0;t<l.InfixToPostfixCacheCleanupSize;t++)l._InfixToPostfixCache.delete(e[t][0])}}l.InfixToPostfixCacheLimitSize=5e4,l.InfixToPostfixCacheCleanupSize=25e3,l._InfixToPostfixCache=new Map,l._OperatorPriority={")":0,"(":1,"||":2,"&&":3},l._Stack=["","","","","","","","","","","","","","","","","","","",""];class u extends l{constructor(e,t=!1){super(),this.define=e,this.not=t}isTrue(e){let t=void 0!==e[this.define];return this.not&&(t=!t),t}}class c extends l{isTrue(e){return this.leftOperand.isTrue(e)||this.rightOperand.isTrue(e)}}class f extends l{isTrue(e){return this.leftOperand.isTrue(e)&&this.rightOperand.isTrue(e)}}class d extends l{constructor(e,t,r){super(),this.define=e,this.operand=t,this.testValue=r}toString(){return`${this.define} ${this.operand} ${this.testValue}`}isTrue(e){let t=!1,r=parseInt(void 0!=e[this.define]?e[this.define]:this.define),s=parseInt(void 0!=e[this.testValue]?e[this.testValue]:this.testValue);if(isNaN(r)||isNaN(s))return!1;switch(this.operand){case">":t=r>s;break;case"<":t=r<s;break;case"<=":t=r<=s;break;case">=":t=r>=s;break;case"==":t=r===s;break;case"!=":t=r!==s}return t}}let p=/defined\s*?\((.+?)\)/g,h=/defined\s*?\[(.+?)\]/g,g=/#include\s?<(.+)>(\((.*)\))*(\[(.*)\])*/g,y=/__decl__/,m=/light\{X\}.(\w*)/g,b=/\{X\}/g,x=[],L=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/;function w(e){let t=/defined\((.+)\)/.exec(e);if(t&&t.length)return new u(t[1].trim(),"!"===e[0]);let r="",s=0;for(r of["==","!=",">=","<=","<",">"])if((s=e.indexOf(r))>-1)break;if(-1===s)return new u(e);let n=e.substring(0,s).trim(),o=e.substring(s+r.length).trim();return new d(n,r,o)}function E(e,t){let r=new a,s=e.substring(0,t),n=e.substring(t);return n=n.substring(0,(n.indexOf("//")+1||n.length+1)-1).trim(),"#ifdef"===s?r.testExpression=new u(n):"#ifndef"===s?r.testExpression=new u(n,!0):r.testExpression=function(e){e=e.replace(p,"defined[$1]");let t=l.infixToPostfix(e),r=[];for(let e of t)if("||"!==e&&"&&"!==e)r.push(e);else if(r.length>=2){let t=r[r.length-1],s=r[r.length-2];r.length-=2;let n="&&"==e?new f:new c;"string"==typeof t&&(t=t.replace(h,"defined($1)")),"string"==typeof s&&(s=s.replace(h,"defined($1)")),n.leftOperand="string"==typeof s?w(s):s,n.rightOperand="string"==typeof t?w(t):t,r.push(n)}let s=r[r.length-1];return"string"==typeof s&&(s=s.replace(h,"defined($1)")),"string"==typeof s?w(s):s}(n),r}function _(e,t,r,s){let o;for(;v(e,r,s);){let i=(o=e.currentLine).substring(0,5).toLowerCase();if("#else"===i){let r=new n;t.children.push(r),v(e,r,s);return}if("#elif"===i){let e=E(o,5);t.children.push(e),r=e}}}function v(e,t,r){for(;e.canRead;){e.lineIndex++;let s=e.currentLine;if(s.indexOf("#")>=0){let n=L.exec(s);if(n&&n.length){switch(n[0]){case"#ifdef":{let n=new i;t.children.push(n);let o=E(s,6);n.children.push(o),_(e,n,o,r);break}case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":{let n=new i;t.children.push(n);let o=E(s,7);n.children.push(o),_(e,n,o,r);break}case"#if":{let n=new i,o=E(s,3);t.children.push(n),n.children.push(o),_(e,n,o,r)}}continue}}let o=new n;if(o.line=s,t.children.push(o),"#"===s[0]&&"d"===s[1]){let e=s.replace(";","").split(" ");o.additionalDefineKey=e[1],3===e.length&&(o.additionalDefineValue=e[2])}}return!1}function C(e,t,r){let s;for(x.length=0;null!==(s=g.exec(e));)x.push(s);let n=[e],o=!1;for(let e of x){let s=e[1];if(-1!==s.indexOf("__decl__")&&(s=s.replace(y,""),t.supportsUniformBuffers&&(s=s.replace("Vertex","Ubo").replace("Fragment","Ubo")),s+="Declaration"),t.includesShadersStore[s]){let r=t.includesShadersStore[s];if(e[2]){let t=e[3].split(",");for(let e=0;e<t.length;e+=2){let s=RegExp(t[e],"g"),n=t[e+1];r=r.replace(s,n)}}if(e[4]){let s=e[5];if(-1!==s.indexOf("..")){let e=s.split(".."),n=parseInt(e[0]),o=parseInt(e[1]),i=r.slice(0);r="",isNaN(o)&&(o=t.indexParameters[e[1]]);for(let e=n;e<o;e++)t.supportsUniformBuffers||(i=i.replace(m,(e,t)=>t+"{X}")),r+=i.replace(b,e.toString())+"\n"}else t.supportsUniformBuffers||(r=r.replace(m,(e,t)=>t+"{X}")),r=r.replace(b,s)}let i=[];for(let t of n){let s=t.split(e[0]);for(let e=0;e<s.length-1;e++)i.push(s[e]),i.push(r);i.push(s[s.length-1])}n=i,o=o||r.indexOf("#include<")>=0||r.indexOf("#include <")>=0}else{let e=t.shadersRepository+"ShadersInclude/"+s+".fx";R.loadFile(e,e=>{t.includesShadersStore[s]=e,C(n.join(""),t,r)});return}}x.length=0;let i=n.join("");o?C(i.toString(),t,r):r(i)}let R={loadFile:(e,r,s,n,o,i)=>{throw(0,t._WarnImport)("FileTools")}};e.s(["Finalize",0,function(e,t,r){return r.processor&&r.processor.finalizeShaders?r.processor.finalizeShaders(e,t,r.processingContext):{vertexCode:e,fragmentCode:t}},"Initialize",0,function(e){e.processor&&e.processor.initializeShaders&&e.processor.initializeShaders(e.processingContext)},"Process",0,function(e,t,r,i){t.processor?.preProcessShaderCode&&(e=t.processor.preProcessShaderCode(e,t.isFragment)),C(e,t,e=>{t.processCodeAfterIncludes&&(e=t.processCodeAfterIncludes(t.isFragment?"fragment":"vertex",e,t.defines)),r(function(e,t,r){var i;let a,l,u=function(e,t){if(t.processor?.noPrecision)return e;let r=t.shouldUseHighPrecisionShader;return -1===e.indexOf("precision highp float")?e=r?"precision highp float;\n"+e:"precision mediump float;\n"+e:r||(e=e.replace("precision highp float","precision mediump float")),e}(e,t);if(!t.processor||0===t.processor.shaderLanguage&&-1!==u.indexOf("#version 3")&&(u=u.replace("#version 300 es",""),!t.processor.parseGLES3))return u;let c=t.defines,f=function(e,t){let r=e.defines,n={};for(let e of r){let t=e.replace("#define","").replace(";","").trim().split(" ");n[t[0]]=t.length>1?t[1]:""}return e.processor?.shaderLanguage===0&&(n.GL_ES="true"),n.__VERSION__=e.version,n[e.platformName]="true",s(n,t?.isNDCHalfZRange,t?.useReverseDepthBuffer,t?.useExactSrgbConversions),n}(t,r);t.processor.preProcessor&&(u=t.processor.preProcessor(u,c,f,t.isFragment,t.processingContext));let d={};return i=u,a=new n,(l=new o).lineIndex=-1,l.lines=i.split("\n"),v(l,a,d),u=a.process(f,t,d),t.processor.postProcessor&&(u=t.processor.postProcessor(u,c,t.isFragment,t.processingContext,r?{drawBuffersExtensionDisabled:!r.getCaps().drawBuffersExtension}:{},f,d)),r?._features.needShaderCodeInlining&&(u=r.inlineShaderCode(u)),u}(e,t,i),e)})},"ProcessIncludes",0,C,"_FunctionContainer",0,R],94712)},43880,e=>{"use strict";let t={},r={};e.s(["_IsSideEffectImplemented",0,function(e){return!!e&&!e.__isSideEffectStub},"_MissingSideEffect",0,function(e,t,s=!1){let n=function(){if(s&&1){let s=`${e}.${t}`;r[s]||(r[s]=!0,console.warn(`[Babylon.js] ${s}() requires a side-effect import. See: https://doc.babylonjs.com/setup/treeshaking`))}};return n.__isSideEffectStub=!0,n},"_MissingSideEffectProperty",0,function(e,t){return{get(){},set(e){Object.defineProperty(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0}},"_WarnImport",0,function(e,r=!1){if(!r||!t[e])return t[e]=!0,`${e} needs to be imported before as it contains a side-effect required by your code.`}])},7484,e=>{"use strict";e.s(["GetDOMTextContent",0,function(e){let t="",r=e.firstChild;for(;r;)3===r.nodeType&&(t+=r.textContent),r=r.nextSibling;return t},"IsDocumentAvailable",0,function(){return"u">typeof document},"IsNavigatorAvailable",0,function(){return"u">typeof navigator},"IsWindowObjectExist",0,function(){return"u">typeof window}])},33169,e=>{"use strict";let t;var r=e.i(16635),s=e.i(7484),n=e.i(42704),o=e.i(88605),i=e.i(72888),a=e.i(30465),l=e.i(95708),u=e.i(72986),c=e.i(4385),f=e.i(94712),d=e.i(85789),p=e.i(32945),h=e.i(63615);let g=new RegExp(/^data:([^,]+\/[^,]+)?;base64,/i);class y extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.LoadFileError),this.name="LoadFileError",a.BaseError._setPrototypeOf(this,y.prototype),t instanceof r.WebRequest?this.request=t:this.file=t}}class m extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.RequestFileError),this.request=t,this.name="RequestFileError",a.BaseError._setPrototypeOf(this,m.prototype)}}class b extends a.RuntimeError{constructor(e,t){super(e,a.ErrorCodes.ReadFileError),this.file=t,this.name="ReadFileError",a.BaseError._setPrototypeOf(this,b.prototype)}}let x={DefaultRetryStrategy:i.RetryStrategy.ExponentialBackoff(),BaseUrl:"",CorsBehavior:"anonymous",PreprocessUrl:e=>e,ScriptBaseUrl:"",ScriptPreprocessUrl:e=>e,CleanUrl:e=>e=e.replace(/#/gm,"%23")},L=(e,t)=>{if((!e||0!==e.indexOf("data:"))&&x.CorsBehavior)if("string"==typeof x.CorsBehavior||x.CorsBehavior instanceof String)t.crossOrigin=x.CorsBehavior;else{let r=x.CorsBehavior(e);r&&(t.crossOrigin=r)}},w=(e,t,s,n,i="",a,c=u.EngineStore.LastCreatedEngine)=>{let f;if("u"<typeof HTMLImageElement&&!c?._features.forceBitmapOverHTMLImageElement)return s("LoadImage is only supported in web or BabylonNative environments."),null;let d=!1;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))if("u">typeof Blob&&"u">typeof URL){let t;t=e instanceof ArrayBuffer?e:(0,h.GetBlobBufferSource)(e),f=URL.createObjectURL(new Blob([t],{type:i})),d=!0}else f=`data:${i};base64,`+(0,l.EncodeArrayBufferToBase64)(e);else e instanceof Blob?(f=URL.createObjectURL(e),d=!0):(f=x.CleanUrl(e),f=x.PreprocessUrl(f));let p=t=>{if(s){let r=f||e.toString();s(`Error while trying to load image: ${0===r.indexOf("http")||r.length<=128?r:r.slice(0,128)+"..."}`,t)}};if(c?._features.forceBitmapOverHTMLImageElement)return _(f,r=>{c.createImageBitmap(new Blob([r],{type:i}),{premultiplyAlpha:"none",colorSpaceConversion:"none",...a}).then(e=>{t(e),d&&URL.revokeObjectURL(f)}).catch(t=>{s&&s("Error while trying to load image: "+e,t)})},void 0,n||void 0,!0,(e,t)=>{p(t)}),null;let g=new Image;!1;L(f,g);let y=[],m=()=>{for(let e of y)e.target.removeEventListener(e.name,e.handler);y.length=0};for(let e of(y.push({target:g,name:"load",handler:()=>{m(),t(g),d&&g.src&&URL.revokeObjectURL(g.src)}}),y.push({target:g,name:"error",handler:e=>{m(),p(e),d&&g.src&&URL.revokeObjectURL(g.src)}}),y.push({target:document,name:"securitypolicyviolation",handler:e=>{if(e.blockedURI!==g.src||"report"===e.disposition)return;m();let t=Error(`CSP violation of policy ${e.effectiveDirective} ${e.blockedURI}. Current policy is ${e.originalPolicy}`);u.EngineStore.UseFallbackTexture=!1,p(t),d&&g.src&&URL.revokeObjectURL(g.src),g.src=""}}),y))e.target.addEventListener(e.name,e.handler);let b="blob:"===f.substring(0,5),w="data:"===f.substring(0,5),E=()=>{b||w||!r.WebRequest.IsCustomRequestAvailable?g.src=f:_(f,(e,t,r)=>{let s=new Blob([e],{type:!i&&r?r:i}),n=URL.createObjectURL(s);d=!0,g.src=n},void 0,n||void 0,!0,(e,t)=>{p(t)})};if(!b&&!w&&n&&n.enableTexturesOffline)n.open(()=>{n&&n.loadImage(f,g)},E);else{if(-1!==f.indexOf("file:")){let e=decodeURIComponent(f.substring(5).toLowerCase());if(o.FilesInputStore.FilesToLoad[e]&&"u">typeof URL){try{let t;try{t=URL.createObjectURL(o.FilesInputStore.FilesToLoad[e])}catch(r){t=URL.createObjectURL(o.FilesInputStore.FilesToLoad[e])}g.src=t,d=!0}catch(e){g.src=""}return g}}E()}return g},E=(e,t,r,s,o)=>{let i=new FileReader,a={onCompleteObservable:new n.Observable,abort:()=>i.abort()};return i.onloadend=()=>a.onCompleteObservable.notifyObservers(a),o&&(i.onerror=()=>{o(new b(`Unable to read ${e.name}`,e))}),i.onload=e=>{t(e.target.result)},r&&(i.onprogress=r),s?i.readAsArrayBuffer(e):i.readAsText(e),a},_=(e,t,r,s,i,a,l)=>{if(e.name)return E(e,t,r,i,a?e=>{a(void 0,e)}:void 0);if(-1!==e.indexOf("file:")){let s=decodeURIComponent(e.substring(5).toLowerCase());0===s.indexOf("./")&&(s=s.substring(2));let n=o.FilesInputStore.FilesToLoad[s];if(n)return E(n,t,r,i,a?e=>a(void 0,new y(e.message,e.file)):void 0)}let{match:u,type:c}=U(e);if(u){let r={onCompleteObservable:new n.Observable,abort:()=>()=>{}};try{let r=i?F(e):S(e);t(r,void 0,c)}catch(e){a?a(void 0,e):d.Logger.Error(e.message||"Failed to parse the Data URL")}return p.TimingTools.SetImmediate(()=>{r.onCompleteObservable.notifyObservers(r)}),r}return v(e,(e,r)=>{t(e,r?.responseURL,r?.getResponseHeader("content-type"))},r,s,i,a?e=>{a(e.request,new y(e.message,e.request))}:void 0,l)},v=(e,t,o,i,a,l,c)=>{null!==i&&(i??(i=u.EngineStore.LastCreatedScene?.offlineProvider)),e=x.CleanUrl(e),e=x.PreprocessUrl(e);let f=x.BaseUrl+e,p=!1,h={onCompleteObservable:new n.Observable,abort:()=>p=!0},g=()=>{let e,n=new r.WebRequest,i=null,u=()=>{n&&(o&&n.removeEventListener("progress",o),e&&n.removeEventListener("readystatechange",e),n.removeEventListener("loadend",g))},g=()=>{u(),h.onCompleteObservable.notifyObservers(h),h.onCompleteObservable.clear(),o=void 0,e=null,g=null,l=void 0,c=void 0,t=void 0};h.abort=()=>{p=!0,g&&g(),n&&n.readyState!==(XMLHttpRequest.DONE||4)&&n.abort(),null!==i&&(clearTimeout(i),i=null),n=null};let y=e=>{let t=e.message||"Unknown error";l&&n?l(new m(t,n)):d.Logger.Error(t)},b=d=>{if(n){if(n.open("GET",f),c)try{c(n)}catch(e){y(e);return}a&&(n.responseType="arraybuffer"),o&&n.addEventListener("progress",o),g&&n.addEventListener("loadend",g),e=()=>{if(!p&&n&&n.readyState===(XMLHttpRequest.DONE||4)){if(e&&n.removeEventListener("readystatechange",e),n.status>=200&&n.status<300||0===n.status&&(!(0,s.IsWindowObjectExist)()||C())){let e=a?n.response:n.responseText;if(null!==e){try{t&&t(e,n)}catch(e){y(e)}return}}let o=x.DefaultRetryStrategy;if(o){let e=o(f,n,d);if(-1!==e){u(),n=new r.WebRequest,i=setTimeout(()=>b(d+1),e);return}}let c=new m("Error status: "+n.status+" "+n.statusText+" - Unable to load "+f,n);l&&l(c)}},n.addEventListener("readystatechange",e),n.send()}};b(0)};if(i&&i.enableSceneOffline&&!e.startsWith("blob:")){let r=e=>{e&&e.status>400?l&&l(e):g()};i.open(()=>{i&&i.loadFile(x.BaseUrl+e,e=>{!p&&t&&t(e),h.onCompleteObservable.notifyObservers(h)},o?e=>{!p&&o&&o(e)}:void 0,r,a)},r)}else g();return h},C=()=>"u">typeof location&&"file:"===location.protocol,R=e=>g.test(e),U=e=>{let t=g.exec(e);return null===t||0===t.length?{match:!1,type:""}:{match:!0,type:t[0].replace("data:","").replace(";base64,","")}};function F(e){return(0,l.DecodeBase64ToBinary)(e.split(",")[1])}let S=e=>(0,l.DecodeBase64ToString)(e.split(",")[1]),T=!1;e.s(["DecodeBase64UrlToBinary",0,F,"FileToolsOptions",0,x,"GetMimeType",0,e=>{let{match:t,type:r}=U(e);if(t)return r||void 0;let s=e.lastIndexOf(".");switch(e.substring(s+1).toLowerCase()){case"glb":return"model/gltf-binary";case"bin":return"application/octet-stream";case"gltf":return"model/gltf+json";case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"webp":return"image/webp";case"ktx":return"image/ktx";case"ktx2":return"image/ktx2";case"avif":return"image/avif";default:return}},"IsBase64DataUrl",0,R,"LoadFile",0,_,"LoadFileError",0,y,"LoadImage",0,w,"ReadFile",0,E,"RegisterFileTools",0,function(){!T&&(T=!0,Object.defineProperty(t={DecodeBase64UrlToBinary:F,DecodeBase64UrlToString:S,DefaultRetryStrategy:x.DefaultRetryStrategy,BaseUrl:x.BaseUrl,CorsBehavior:x.CorsBehavior,PreprocessUrl:x.PreprocessUrl,IsBase64DataUrl:R,IsFileURL:C,LoadFile:_,LoadImage:w,ReadFile:E,RequestFile:v,SetCorsBehavior:L},"DefaultRetryStrategy",{get:function(){return x.DefaultRetryStrategy},set:function(e){x.DefaultRetryStrategy=e}}),Object.defineProperty(t,"BaseUrl",{get:function(){return x.BaseUrl},set:function(e){x.BaseUrl=e}}),Object.defineProperty(t,"PreprocessUrl",{get:function(){return x.PreprocessUrl},set:function(e){x.PreprocessUrl=e}}),Object.defineProperty(t,"CorsBehavior",{get:function(){return x.CorsBehavior},set:function(e){x.CorsBehavior=e}}),c.EngineFunctionContext.loadFile=_,c.EngineFunctionContext.loadImage=w,f._FunctionContainer.loadFile=_)},"RequestFile",0,v,"SetCorsBehavior",0,L])},88605,72888,30465,e=>{"use strict";class t{}t.FilesToLoad={},e.s(["FilesInputStore",0,t],88605),e.s(["RetryStrategy",0,class{static ExponentialBackoff(e=3,t=500){return(r,s,n)=>0!==s.status||n>=e||-1!==r.indexOf("file:")?-1:Math.pow(2,n)*t}}],72888);class r extends Error{}r._setPrototypeOf=Object.setPrototypeOf||((e,t)=>(e.__proto__=t,e));class s extends r{constructor(e,t,n){super(e),this.errorCode=t,this.innerError=n,this.name="RuntimeError",r._setPrototypeOf(this,s.prototype)}}e.s(["BaseError",0,r,"ErrorCodes",0,{MeshInvalidPositionsError:0,UnsupportedTextureError:1e3,GLTFLoaderUnexpectedMagicError:2e3,SceneLoaderError:3e3,LoadFileError:4e3,RequestFileError:4001,ReadFileError:4002},"RuntimeError",0,s],30465)},6939,e=>{"use strict";e.s(["RandomGUID",0,function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}])},66464,e=>{"use strict";let t=null;function r(){if(t)return t;let e=new ArrayBuffer(4),r=new Float32Array(e),s=new Uint32Array(e),n=new Uint32Array(512),o=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-24?(n[e]=0,n[256|e]=32768,o[e]=24,o[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,o[e]=-t-1,o[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,o[e]=13,o[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,o[e]=24,o[256|e]=24):(n[e]=31744,n[256|e]=64512,o[e]=13,o[256|e]=13)}let i=new Uint32Array(2048),a=new Uint32Array(64),l=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,r=0;for(;(8388608&t)==0;)t<<=1,r-=8388608;t&=-8388609,r+=0x38800000,i[e]=t|r}for(let e=1024;e<2048;++e)i[e]=0x38000000+(e-1024<<13);for(let e=1;e<31;++e)a[e]=e<<23;a[31]=0x47800000,a[32]=0x80000000;for(let e=33;e<63;++e)a[e]=0x80000000+(e-32<<23);a[63]=0xc7800000;for(let e=1;e<64;++e)32!==e&&(l[e]=1024);return t={floatView:r,uint32View:s,baseTable:n,shiftTable:o,mantissaTable:i,exponentTable:a,offsetTable:l}}e.s(["FromHalfFloat",0,function(e){let t=r();return t.uint32View[0]=t.mantissaTable[t.offsetTable[e>>10]+(1023&e)]+t.exponentTable[e>>10],t.floatView[0]},"MaxHalfFloat",0,65504,"ToHalfFloat",0,function(e){let t=r();t.floatView[0]=e;let s=t.uint32View[0],n=s>>23&511;return t.baseTable[n]+((8388607&s)>>t.shiftTable[n])}])},85789,e=>{"use strict";class t{static _CheckLimit(e,r){let s=t._LogLimitOutputs[e];return s?s.current++:(s={limit:r,current:1},t._LogLimitOutputs[e]=s),s.current<=s.limit}static _GenerateLimitMessage(e,r=1){let s=t._LogLimitOutputs[e];if(!s||!t.MessageLimitReached)return;let n=this._Levels[r];s.current===s.limit&&t[n.name](t.MessageLimitReached.replace(/%LIMIT%/g,""+s.limit).replace(/%TYPE%/g,n.name??""))}static _AddLogEntry(e){t._LogCache=e+t._LogCache,t.OnNewCacheEntry&&t.OnNewCacheEntry(e)}static _FormatMessage(e){let t=e=>e<10?"0"+e:""+e,r=new Date;return"["+t(r.getHours())+":"+t(r.getMinutes())+":"+t(r.getSeconds())+"]: "+e}static _LogDisabled(e,t){}static _LogEnabled(e=1,r,s){let n=Array.isArray(r)?r[0]:r;if(void 0!==s&&!t._CheckLimit(n,s))return;let o=t._FormatMessage(n),i=this._Levels[e],a=Array.isArray(r)?r.slice(1):[];i.logFunc&&i.logFunc("BJS - "+o,...a);let l=`<div style='color:${i.color}'>${o}</div><br>`;t._AddLogEntry(l),t._GenerateLimitMessage(n,e)}static get LogCache(){return t._LogCache}static ClearLogCache(){t._LogCache="",t._LogLimitOutputs={},t.errorsCount=0}static set LogLevels(e){for(let r of(t.Log=t._LogDisabled,t.Warn=t._LogDisabled,t.Error=t._LogDisabled,[t.MessageLogLevel,t.WarningLogLevel,t.ErrorLogLevel]))(e&r)===r&&(t[this._Levels[r].name]=t._LogEnabled.bind(t,r))}}t.NoneLogLevel=0,t.MessageLogLevel=1,t.WarningLogLevel=2,t.ErrorLogLevel=4,t.AllLogLevel=7,t.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",t._LogCache="",t._LogLimitOutputs={},t._Levels=[{},{color:"white",logFunc:console.log,name:"Log"},{color:"orange",logFunc:console.warn,name:"Warn"},{},{color:"red",logFunc:console.error,name:"Error"}],t.errorsCount=0,t.Log=t._LogEnabled.bind(t,t.MessageLogLevel),t.Warn=t._LogEnabled.bind(t,t.WarningLogLevel),t.Error=t._LogEnabled.bind(t,t.ErrorLogLevel),e.s(["Logger",0,t])},63391,e=>{"use strict";var t=e.i(7484);e.s(["PrecisionDate",0,class{static get Now(){return(0,t.IsWindowObjectExist)()&&window.performance&&window.performance.now?window.performance.now():Date.now()}}])},95708,e=>{"use strict";let t=e=>atob(e);e.s(["Decode",0,e=>{if("u">typeof TextDecoder)return new TextDecoder().decode(e);let t="";for(let r=0;r<e.byteLength;r++)t+=String.fromCharCode(e[r]);return t},"DecodeBase64ToBinary",0,e=>"function"==typeof Uint8Array.fromBase64?Uint8Array.fromBase64(e).buffer:function(e){let r=t(e),s=r.length,n=new Uint8Array(new ArrayBuffer(s));for(let e=0;e<s;e++)n[e]=r.charCodeAt(e);return n.buffer}(e),"DecodeBase64ToString",0,t,"EncodeArrayBufferToBase64",0,e=>{let t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);return"function"==typeof t.toBase64?t.toBase64():function(e){let t,r,s,n,o,i,a,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;for(;c<e.length;)t=e[c++],r=c<e.length?e[c++]:NaN,s=c<e.length?e[c++]:NaN,n=t>>2,o=(3&t)<<4|r>>4,i=(15&r)<<2|s>>6,a=63&s,isNaN(r)?i=a=64:isNaN(s)&&(a=64),u+=l.charAt(n)+l.charAt(o)+l.charAt(i)+l.charAt(a);return u}(t)}])},32945,e=>{"use strict";let t=[];function r(e,t,r){try{if(e())return t(),!0}catch(e){return r?.(e),!0}return!1}e.s(["TimingTools",0,class{static SetImmediate(e){0===t.length&&setTimeout(()=>{let e=t;for(let r of(t=[],e))r()},1),t.push(e)}},"_RetryWithInterval",0,(e,t,s,n=16,o=3e4,i=!0,a)=>{if(i&&r(e,t,s))return null;let l=setInterval(()=>{r(e,t,s)?clearInterval(l):(o-=n)<0&&(clearInterval(l),s?.(Error("Operation timed out after maximum retries. "+(a||"")),!0))},n);return()=>clearInterval(l)}])},92929,e=>{"use strict";function t(e){let t=r(e),n=s(e);return t-e>e-n?n:t}function r(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}function s(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)}e.s(["FloorPOT",0,s,"GetExponentOfTwo",0,function(e,n,o=2){let i;switch(o){case 1:i=s(e);break;case 2:i=t(e);break;default:i=r(e)}return Math.min(i,n)},"IsExponentOfTwo",0,function(e){let t=1;do t*=2;while(t<e)return t===e},"Mix",0,function(e,t,r){return e*(1-r)+t*r},"NearestPOT",0,t])},16635,e=>{"use strict";class t{constructor(){this._xhr="u">typeof _native&&_native.XMLHttpRequest?new _native.XMLHttpRequest:new XMLHttpRequest,this._requestURL=""}static get IsCustomRequestAvailable(){return Object.keys(t.CustomRequestHeaders).length>0||t.CustomRequestModifiers.length>0}static _CleanUrl(e){return e=(e=e.replace("file:http:","http:")).replace("file:https:","https:")}static _ShouldSkipRequestModifications(e){return t.SkipRequestModificationForBabylonCDN&&(e.includes("preview.babylonjs.com")||e.includes("cdn.babylonjs.com"))}static _CollectCustomizations(e,r={}){let s={...r};if(t._ShouldSkipRequestModifications(e))return{url:e,headers:s};for(let e in t.CustomRequestHeaders){let r=t.CustomRequestHeaders[e];r&&(s[e]=r)}let n={setRequestHeader:(e,t)=>{s[e]=t}};for(let r of t.CustomRequestModifiers){if(t._ShouldSkipRequestModifications(e))break;let s=r(n,e);"string"==typeof s&&(e=s)}return{url:e,headers:s}}static async FetchAsync(e,r={}){let s=r.method??"GET";if("u">typeof fetch){let{url:n,headers:o}=t._CollectCustomizations(t._CleanUrl(e),r.headers??{});return await fetch(n,{method:s,headers:o,body:r.body??void 0})}return await new Promise((n,o)=>{let i=new t;i.responseType="arraybuffer",i.addEventListener("readystatechange",()=>{if(4===i.readyState)if(i.status>=200&&i.status<300){let e="u">typeof Headers?new Headers:void 0,t=i.getResponseHeader("Content-Type");t&&e&&e.set("Content-Type",t),"u">typeof Response?n(new Response(i.response,{status:i.status,statusText:i.statusText,headers:e})):n({ok:!0,status:i.status,statusText:i.statusText,headers:{get:e=>i.getResponseHeader(e)},arrayBuffer:async()=>await Promise.resolve(i.response)})}else o(Error(`HTTP ${i.status} loading '${i.requestURL}': ${i.statusText}`))}),i.open(s,e,r.headers),i.send(r.body??null)})}get requestURL(){return this._requestURL}get onprogress(){return this._xhr.onprogress}set onprogress(e){this._xhr.onprogress=e}get readyState(){return this._xhr.readyState}get status(){return this._xhr.status}get statusText(){return this._xhr.statusText}get response(){return this._xhr.response}get responseURL(){return this._xhr.responseURL}get responseText(){return this._xhr.responseText}get responseType(){return this._xhr.responseType}set responseType(e){this._xhr.responseType=e}get timeout(){return this._xhr.timeout}set timeout(e){this._xhr.timeout=e}addEventListener(e,t,r){this._xhr.addEventListener(e,t,r)}removeEventListener(e,t,r){this._xhr.removeEventListener(e,t,r)}abort(){this._xhr.abort()}send(e){this._xhr.send(e)}open(e,r,s){let{url:n,headers:o}=t._CollectCustomizations(r,s);for(let r in this._requestURL=t._CleanUrl(n),this._xhr.open(e,this._requestURL,!0),o)this._xhr.setRequestHeader(r,o[r])}setRequestHeader(e,t){this._xhr.setRequestHeader(e,t)}getResponseHeader(e){return this._xhr.getResponseHeader(e)}}t.CustomRequestHeaders={},t.CustomRequestModifiers=[],t.SkipRequestModificationForBabylonCDN=!0,e.s(["WebRequest",0,t])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,29435,t=>{"use strict";var e=t.i(37096),s=t.i(97009),a=t.i(5573),i=t.i(99493);class u extends e.FlowGraphBlock{constructor(t){for(let e of(super(t),this.config=t,this._inputCases=new Map,this.case=this.registerDataInput("case",s.RichTypeAny,NaN),this.default=this.registerDataInput("default",s.RichTypeAny),this.value=this.registerDataOutput("value",s.RichTypeAny),this.config.cases||[])){if(e=(0,a.getNumericValue)(e),this.config.treatCasesAsIntegers&&(e|=0,this._inputCases.has(e)))return;this._inputCases.set(e,this.registerDataInput(`in_${e}`,s.RichTypeAny))}}_updateOutputs(t){let e,s=this.case.getValue(t);(0,a.isNumeric)(s)&&(e=this._getOutputValueForCase((0,a.getNumericValue)(s),t)),e||(e=this.default.getValue(t)),this.value.setValue(e,t)}_getOutputValueForCase(t,e){return this._inputCases.get(t)?.getValue(e)}getClassName(){return"FlowGraphDataSwitchBlock"}}let r=!1;function h(){r||(r=!0,(0,i.RegisterClass)("FlowGraphDataSwitchBlock",u))}t.s(["FlowGraphDataSwitchBlock",0,u,"RegisterFlowGraphDataSwitchBlock",0,h],29503),h(),t.s([],18930),t.i(18930),t.i(29503),t.s(["FlowGraphDataSwitchBlock",0,u],29435)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67685,t=>{"use strict";var e=t.i(44938),i=t.i(75105),s=t.i(32304),n=t.i(44520);class l extends e.FlowGraphExecutionBlock{constructor(t){super(t),this.config=t,this.outputSignals=[],this.reset=this._registerSignalInput("reset"),this.lastIndex=this.registerDataOutput("lastIndex",i.RichTypeFlowGraphInteger,new s.FlowGraphInteger(-1)),this.setNumberOfOutputSignals(t?.outputSignalCount)}_getNextIndex(t){if(!t.includes(!1)&&this.config.isLoop&&t.fill(!1),!this.config.isRandom)return t.indexOf(!1);{let e=t.map((t,e)=>t?-1:e).filter(t=>-1!==t);return e.length?e[Math.floor(Math.random()*e.length)]:-1}}setNumberOfOutputSignals(t=1){for(;this.outputSignals.length>t;){let t=this.outputSignals.pop();t&&(t.disconnectFromAll(),this._unregisterSignalOutput(t.name))}for(;this.outputSignals.length<t;)this.outputSignals.push(this._registerSignalOutput(`out_${this.outputSignals.length}`))}_execute(t,e){if(t._hasExecutionVariable(this,"indexesUsed")||t._setExecutionVariable(this,"indexesUsed",this.outputSignals.map(()=>!1)),e===this.reset){t._deleteExecutionVariable(this,"indexesUsed"),this.lastIndex.setValue(new s.FlowGraphInteger(-1),t);return}let i=t._getExecutionVariable(this,"indexesUsed",[]),n=this._getNextIndex(i);n>-1&&(this.lastIndex.setValue(new s.FlowGraphInteger(n),t),i[n]=!0,t._setExecutionVariable(this,"indexesUsed",i),this.outputSignals[n]._activateSignal(t))}getClassName(){return"FlowGraphMultiGateBlock"}serialize(t){super.serialize(t),t.config.outputSignalCount=this.config.outputSignalCount,t.config.isRandom=this.config.isRandom,t.config.loop=this.config.isLoop,t.config.startIndex=this.config.startIndex}}let o=!1;function a(){o||(o=!0,(0,n.RegisterClass)("FlowGraphMultiGateBlock",l))}t.s(["FlowGraphMultiGateBlock",0,l,"RegisterFlowGraphMultiGateBlock",0,a],49123),a(),t.s([],76741),t.i(76741),t.i(49123),t.s(["FlowGraphMultiGateBlock",0,l],67685)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22315,t=>{"use strict";var e=t.i(95754),i=t.i(97009),s=t.i(59012),n=t.i(99493);class l extends e.FlowGraphExecutionBlock{constructor(t){super(t),this.config=t,this.outputSignals=[],this.reset=this._registerSignalInput("reset"),this.lastIndex=this.registerDataOutput("lastIndex",i.RichTypeFlowGraphInteger,new s.FlowGraphInteger(-1)),this.setNumberOfOutputSignals(t?.outputSignalCount)}_getNextIndex(t){if(!t.includes(!1)&&this.config.isLoop&&t.fill(!1),!this.config.isRandom)return t.indexOf(!1);{let e=t.map((t,e)=>t?-1:e).filter(t=>-1!==t);return e.length?e[Math.floor(Math.random()*e.length)]:-1}}setNumberOfOutputSignals(t=1){for(;this.outputSignals.length>t;){let t=this.outputSignals.pop();t&&(t.disconnectFromAll(),this._unregisterSignalOutput(t.name))}for(;this.outputSignals.length<t;)this.outputSignals.push(this._registerSignalOutput(`out_${this.outputSignals.length}`))}_execute(t,e){if(t._hasExecutionVariable(this,"indexesUsed")||t._setExecutionVariable(this,"indexesUsed",this.outputSignals.map(()=>!1)),e===this.reset){t._deleteExecutionVariable(this,"indexesUsed"),this.lastIndex.setValue(new s.FlowGraphInteger(-1),t);return}let i=t._getExecutionVariable(this,"indexesUsed",[]),n=this._getNextIndex(i);n>-1&&(this.lastIndex.setValue(new s.FlowGraphInteger(n),t),i[n]=!0,t._setExecutionVariable(this,"indexesUsed",i),this.outputSignals[n]._activateSignal(t))}getClassName(){return"FlowGraphMultiGateBlock"}serialize(t){super.serialize(t),t.config.outputSignalCount=this.config.outputSignalCount,t.config.isRandom=this.config.isRandom,t.config.loop=this.config.isLoop,t.config.startIndex=this.config.startIndex}}let o=!1;function a(){o||(o=!0,(0,n.RegisterClass)("FlowGraphMultiGateBlock",l))}t.s(["FlowGraphMultiGateBlock",0,l,"RegisterFlowGraphMultiGateBlock",0,a],9233),a(),t.s([],29539),t.i(29539),t.i(9233),t.s(["FlowGraphMultiGateBlock",0,l],22315)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,69260,e=>{"use strict";var t=e.i(76256);let i=!1;i=!0,t.ThinEngine.prototype.setAlphaMode=function(e,t=!1,i=0){if(this._alphaMode[i]===e){if(!t){let t=0===e;this.depthCullingState.depthMask!==t&&(this.depthCullingState.depthMask=t)}return}let r=0===e;this._alphaState.setAlphaBlend(!r,i),this._alphaState.setAlphaMode(e,i),t||(this.depthCullingState.depthMask=r),this._alphaMode[i]=e};let r=!1;!function(){if(r)return;r=!0;let e=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap;t.ThinEngine.prototype.getAlphaToCoverage=function(){return e.get(this)??!1},t.ThinEngine.prototype.setAlphaToCoverage=function(t){e.get(this)===t&&(!this._gl||i.get(this)===this._gl)||(e.set(this,t),this._gl&&(t?this._gl.enable(this._gl.SAMPLE_ALPHA_TO_COVERAGE):this._gl.disable(this._gl.SAMPLE_ALPHA_TO_COVERAGE),i.set(this,this._gl)))},Object.defineProperty(t.ThinEngine.prototype,"currentSampleCount",{get:function(){return this._currentRenderTarget?this._currentRenderTarget.samples:this._gl?(s.get(this)!==this._gl&&(n.set(this,this._gl.getContextAttributes()?.antialias?Math.max(1,this._gl.getParameter(this._gl.SAMPLES)):1),s.set(this,this._gl)),n.get(this)):1},enumerable:!1,configurable:!0})}();var n=e.i(55080),s=e.i(85789),a=e.i(92929);let l=!1;function h(e,t,i,r){let n,s=1;1===r?n=new Float32Array(t*i*4):2===r?(n=new Uint16Array(t*i*4),s=15360):n=7===r?new Uint32Array(t*i*4):new Uint8Array(t*i*4);for(let r=0;r<t;r++)for(let a=0;a<i;a++){let i=(a*t+r)*3,l=(a*t+r)*4;n[l+0]=e[i+0],n[l+1]=e[i+1],n[l+2]=e[i+2],n[l+3]=s}return n}function u(e){return function(t,i,r,s,a,l,h,u,_=null,o=0){let f=e?this._gl.TEXTURE_3D:this._gl.TEXTURE_2D_ARRAY,c=new n.InternalTexture(this,e?10:11);c.baseWidth=i,c.baseHeight=r,c.baseDepth=s,c.width=i,c.height=r,c.depth=s,c.format=a,c.type=o,c.generateMipMaps=l,c.samplingMode=u,e?c.is3D=!0:c.is2DArray=!0,this._doNotHandleContextLost||(c._bufferView=t),e?this.updateRawTexture3D(c,t,a,h,_,o):this.updateRawTexture2DArray(c,t,a,h,_,o),this._bindTextureDirectly(f,c,!0);let p=this._getSamplingParameters(u,l);return this._gl.texParameteri(f,this._gl.TEXTURE_MAG_FILTER,p.mag),this._gl.texParameteri(f,this._gl.TEXTURE_MIN_FILTER,p.min),l&&this._gl.generateMipmap(f),this._bindTextureDirectly(f,null),this._internalTexturesCache.push(c),c}}function _(e){return function(t,i,r,n,s=null,a=0){let l=e?this._gl.TEXTURE_3D:this._gl.TEXTURE_2D_ARRAY,h=this._getWebGLTextureType(a),u=this._getInternalFormat(r),_=this._getRGBABufferInternalSizedFormat(a,r);this._bindTextureDirectly(l,t,!0),this._unpackFlipY(void 0===n||!!n),this._doNotHandleContextLost||(t._bufferView=i,t.format=r,t.invertY=n,t._compression=s),t.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),s&&i?this._gl.compressedTexImage3D(l,0,this.getCaps().s3tc[s],t.width,t.height,t.depth,0,i):this._gl.texImage3D(l,0,_,t.width,t.height,t.depth,0,u,h,i),t.generateMipMaps&&this._gl.generateMipmap(l),this._bindTextureDirectly(l,null),t.isReady=!0}}l=!0,t.ThinEngine.prototype.updateRawTexture=function(e,t,i,r,n=null,s=0,a=!1){if(!e)return;let l=this._getRGBABufferInternalSizedFormat(s,i,a),h=this._getInternalFormat(i),u=this._getWebGLTextureType(s);this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===r||!!r),this._doNotHandleContextLost||(e._bufferView=t,e.format=i,e.type=s,e.invertY=r,e._compression=n),e.width%4!=0&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,1),n&&t?this._gl.compressedTexImage2D(this._gl.TEXTURE_2D,0,this.getCaps().s3tc[n],e.width,e.height,0,t):this._gl.texImage2D(this._gl.TEXTURE_2D,0,l,e.width,e.height,0,h,u,t),e.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),e.isReady=!0},t.ThinEngine.prototype.createRawTexture=function(e,t,i,r,s,a,l,h=null,u=0,_=0,o=!1){let f=new n.InternalTexture(this,3);f.baseWidth=t,f.baseHeight=i,f.width=t,f.height=i,f.format=r,f.generateMipMaps=s,f.samplingMode=l,f.invertY=a,f._compression=h,f.type=u,f._useSRGBBuffer=this._getUseSRGBBuffer(o,!s),this._doNotHandleContextLost||(f._bufferView=e),this.updateRawTexture(f,e,r,a,h,u,f._useSRGBBuffer),this._bindTextureDirectly(this._gl.TEXTURE_2D,f,!0);let c=this._getSamplingParameters(l,s);return this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,c.mag),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,c.min),s&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._internalTexturesCache.push(f),f},t.ThinEngine.prototype.createRawCubeTexture=function(e,t,i,r,l,h,u,_=null){let o=this._gl,f=new n.InternalTexture(this,8);f.isCube=!0,f.format=i,f.type=r,this._doNotHandleContextLost||(f._bufferViewArray=e);let c=this._getWebGLTextureType(r),p=this._getInternalFormat(i);if(p===o.RGB&&(p=o.RGBA),c!==o.FLOAT||this._caps.textureFloatLinearFiltering?c!==this._gl.HALF_FLOAT_OES||this._caps.textureHalfFloatLinearFiltering?c!==o.FLOAT||this._caps.textureFloatRender?c!==o.HALF_FLOAT||this._caps.colorBufferFloat||(l=!1,s.Logger.Warn("Render to half float textures is not supported. Mipmap generation forced to false.")):(l=!1,s.Logger.Warn("Render to float textures is not supported. Mipmap generation forced to false.")):(l=!1,u=1,s.Logger.Warn("Half float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")):(l=!1,u=1,s.Logger.Warn("Float texture filtering is not supported. Mipmap generation and sampling mode are forced to false and TEXTURE_NEAREST_SAMPLINGMODE, respectively.")),f.width=t,f.height=t,f.invertY=h,f._compression=_,!this.needPOTTextures||(0,a.IsExponentOfTwo)(f.width)&&(0,a.IsExponentOfTwo)(f.height)||(l=!1),e)this.updateRawCubeTexture(f,e,i,r,h,_);else{let e=this._getRGBABufferInternalSizedFormat(r);this._bindTextureDirectly(o.TEXTURE_CUBE_MAP,f,!0);for(let t=0;t<6;t++)_?o.compressedTexImage2D(o.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,this.getCaps().s3tc[_],f.width,f.height,0,void 0):o.texImage2D(o.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,e,f.width,f.height,0,p,c,null);this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)}this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,f,!0),e&&l&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP);let T=this._getSamplingParameters(u,l);return o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MAG_FILTER,T.mag),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_MIN_FILTER,T.min),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_CUBE_MAP,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),this._bindTextureDirectly(o.TEXTURE_CUBE_MAP,null),f.generateMipMaps=l,f.samplingMode=u,f.isReady=!0,f},t.ThinEngine.prototype.updateRawCubeTexture=function(e,t,i,r,n,s=null,l=0){e._bufferViewArray=t,e.format=i,e.type=r,e.invertY=n,e._compression=s;let u=this._gl,_=this._getWebGLTextureType(r),o=this._getInternalFormat(i),f=this._getRGBABufferInternalSizedFormat(r),c=!1;o===u.RGB&&(o=u.RGBA,c=!0),this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(void 0===n||!!n),e.width%4!=0&&u.pixelStorei(u.UNPACK_ALIGNMENT,1);for(let i=0;i<6;i++){let n=t[i];s?u.compressedTexImage2D(u.TEXTURE_CUBE_MAP_POSITIVE_X+i,l,this.getCaps().s3tc[s],e.width,e.height,0,n):(c&&(n=h(n,e.width,e.height,r)),u.texImage2D(u.TEXTURE_CUBE_MAP_POSITIVE_X+i,l,f,e.width,e.height,0,o,_,n))}(!this.needPOTTextures||(0,a.IsExponentOfTwo)(e.width)&&(0,a.IsExponentOfTwo)(e.height))&&e.generateMipMaps&&0===l&&this._gl.generateMipmap(this._gl.TEXTURE_CUBE_MAP),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),e.isReady=!0},t.ThinEngine.prototype.createRawCubeTextureFromUrl=function(e,t,i,r,n,s,a,l,u=null,_=null,o=3,f=!1){let c=this._gl,p=this.createRawCubeTexture(null,i,r,n,!s,f,o,null);t?.addPendingData(p),p.url=e,p.isReady=!1,this._internalTexturesCache.push(p);let T=(e,i)=>{t?.removePendingData(p),_&&_(e?e.status+" "+e.statusText:"Failed to parse texture data",i)},d=async e=>{if(!p._hardwareTexture)return;let i=a(e);if(!i)return;let s=i instanceof Promise?await i:i,_=p.width;if(l){let e=this._getWebGLTextureType(n),t=this._getInternalFormat(r),i=this._getRGBABufferInternalSizedFormat(n),a=!1;t===c.RGB&&(t=c.RGBA,a=!0),this._bindTextureDirectly(c.TEXTURE_CUBE_MAP,p,!0),this._unpackFlipY(!1);let u=l(s);for(let r=0;r<u.length;r++){let s=_>>r;for(let l=0;l<6;l++){let _=u[r][l];a&&(_=h(_,s,s,n)),c.texImage2D(l,r,i,s,s,0,t,e,_)}}this._bindTextureDirectly(c.TEXTURE_CUBE_MAP,null)}else this.updateRawCubeTexture(p,s,r,n,f);p.isReady=!0,t?.removePendingData(p),p.onLoadedObservable.notifyObservers(p),p.onLoadedObservable.clear(),u&&u()};return this._loadFile(e,e=>{d(e).catch(e=>{T(void 0,e)})},void 0,t?.offlineProvider,!0,T),p},t.ThinEngine.prototype.createRawTexture2DArray=u(!1),t.ThinEngine.prototype.createRawTexture3D=u(!0),t.ThinEngine.prototype.updateRawTexture2DArray=_(!1),t.ThinEngine.prototype.updateRawTexture3D=_(!0);var o=e.i(4385);let f=!1;f=!0,t.ThinEngine.prototype._readTexturePixelsSync=function(e,t,i,r=-1,n=0,s=null,a=!0,l=!1,h=0,u=0){let _=this._gl;if(!_)throw Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){let e=_.createFramebuffer();if(!e)throw Error("Unable to create dummy framebuffer");this._dummyFramebuffer=e}_.bindFramebuffer(_.FRAMEBUFFER,this._dummyFramebuffer),r>-1&&(e.is2DArray||e.is3D)?_.framebufferTextureLayer(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,e._hardwareTexture?.underlyingResource,n,r):r>-1?_.framebufferTexture2D(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,_.TEXTURE_CUBE_MAP_POSITIVE_X+r,e._hardwareTexture?.underlyingResource,n):_.framebufferTexture2D(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,_.TEXTURE_2D,e._hardwareTexture?.underlyingResource,n);let f=void 0!==e.type?this._getWebGLTextureType(e.type):_.UNSIGNED_BYTE;return l?s||(s=(0,o.allocateAndCopyTypedBuffer)(e.type,4*t*i)):f===_.UNSIGNED_BYTE?(s||(s=new Uint8Array(4*t*i)),f=_.UNSIGNED_BYTE):(s||(s=new Float32Array(4*t*i)),f=_.FLOAT),a&&this.flushFramebuffer(),_.readPixels(h,u,t,i,_.RGBA,f,s),_.bindFramebuffer(_.FRAMEBUFFER,this._currentFramebuffer),s},t.ThinEngine.prototype._readTexturePixels=function(e,t,i,r=-1,n=0,s=null,a=!0,l=!1,h=0,u=0){return Promise.resolve(this._readTexturePixelsSync(e,t,i,r,n,s,a,l,h,u))},(0,e.i(5554).RegisterEngineDynamicBuffer)();let c=!1;c=!0,t.ThinEngine.prototype._createDepthStencilCubeTexture=function(e,t){let i=new n.InternalTexture(this,12);if(i.isCube=!0,1===this.webGLVersion)return s.Logger.Error("Depth cube texture is not supported by WebGL 1."),i;let r={bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,...t},a=this._gl;this._bindTextureDirectly(a.TEXTURE_CUBE_MAP,i,!0),this._setupDepthStencilTexture(i,e,r.bilinearFiltering,r.comparisonFunction);for(let t=0;t<6;t++)r.generateStencil?a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,a.DEPTH24_STENCIL8,e,e,0,a.DEPTH_STENCIL,a.UNSIGNED_INT_24_8,null):a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,a.DEPTH_COMPONENT24,e,e,0,a.DEPTH_COMPONENT,a.UNSIGNED_INT,null);return this._bindTextureDirectly(a.TEXTURE_CUBE_MAP,null),this._internalTexturesCache.push(i),i},t.ThinEngine.prototype._setCubeMapTextureParams=function(e,t,i){let r=this._gl;r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MIN_FILTER,t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),e.samplingMode=t?3:2,t&&this.getCaps().textureMaxLevel&&void 0!==i&&i>0&&(r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MAX_LEVEL,i),e._maxLodLevel=i),this._bindTextureDirectly(r.TEXTURE_CUBE_MAP,null)},t.ThinEngine.prototype.createCubeTexture=function(e,t,i,r,n=null,l=null,h,u=null,_=!1,o=0,f=0,c=null,p,T=!1,d=null){let g=this._gl;return this.createCubeTextureBase(e,t,i,!!r,n,l,h,u,_,o,f,c,e=>this._bindTextureDirectly(g.TEXTURE_CUBE_MAP,e,!0),(e,t)=>{let i=this.needPOTTextures?(0,a.GetExponentOfTwo)(t[0].width,this._caps.maxCubemapTextureSize):t[0].width,l=[g.TEXTURE_CUBE_MAP_POSITIVE_X,g.TEXTURE_CUBE_MAP_POSITIVE_Y,g.TEXTURE_CUBE_MAP_POSITIVE_Z,g.TEXTURE_CUBE_MAP_NEGATIVE_X,g.TEXTURE_CUBE_MAP_NEGATIVE_Y,g.TEXTURE_CUBE_MAP_NEGATIVE_Z];this._bindTextureDirectly(g.TEXTURE_CUBE_MAP,e,!0),this._unpackFlipY(!1);let u=h?this._getInternalFormat(h,e._useSRGBBuffer):e._useSRGBBuffer?this._glSRGBExtensionValues.SRGB8_ALPHA8:g.RGBA,_=h?this._getInternalFormat(h):g.RGBA;e._useSRGBBuffer&&1===this.webGLVersion&&(_=u);for(let e=0;e<l.length;e++)if(t[e].width!==i||t[e].height!==i){if(this._prepareWorkingCanvas(),!this._workingCanvas||!this._workingContext)return void s.Logger.Warn("Cannot create canvas to resize texture.");this._workingCanvas.width=i,this._workingCanvas.height=i,this._workingContext.drawImage(t[e],0,0,t[e].width,t[e].height,0,0,i,i),g.texImage2D(l[e],0,u,_,g.UNSIGNED_BYTE,this._workingCanvas)}else g.texImage2D(l[e],0,u,_,g.UNSIGNED_BYTE,t[e]);r||g.generateMipmap(g.TEXTURE_CUBE_MAP),this._setCubeMapTextureParams(e,!r),e.width=i,e.height=i,e.isReady=!0,h&&(e.format=h),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),n&&n()},!!T,d)},t.ThinEngine.prototype.generateMipMapsForCubemap=function(e,t=!0){if(e.generateMipMaps){let i=this._gl;this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,e,!0),i.generateMipmap(i.TEXTURE_CUBE_MAP),t&&this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null)}};var p=e.i(1205);class T{get depthStencilTexture(){return this._depthStencilTexture}setDepthStencilTexture(e,t=!0){t&&this._depthStencilTexture&&this._depthStencilTexture.dispose(),this._depthStencilTexture=e,this._generateDepthBuffer=this._generateStencilBuffer=this._depthStencilTextureWithStencil=!1,e&&(this._generateDepthBuffer=!0,this._generateStencilBuffer=this._depthStencilTextureWithStencil=(0,p.HasStencilAspect)(e.format))}get depthStencilTextureWithStencil(){return this._depthStencilTextureWithStencil}get isCube(){return this._isCube}get isMulti(){return this._isMulti}get is2DArray(){return this.layers>0}get is3D(){return this.depth>0}get size(){return this.width}get width(){return this._size.width??this._size}get height(){return this._size.height??this._size}get layers(){return this._size.layers||0}get depth(){return this._size.depth||0}get texture(){return this._textures?.[0]??null}get textures(){return this._textures}get faceIndices(){return this._faceIndices}get layerIndices(){return this._layerIndices}getBaseArrayLayer(e){if(!this._textures)return -1;let t=this._textures[e],i=this._layerIndices?.[e]??0,r=this._faceIndices?.[e]??0;return t.isCube?6*i+r:t.is3D?0:i}get samples(){return this._samples}setSamples(e,t=!0,i=!1){if(this.samples===e&&!i)return e;let r=this._isMulti?this._engine.updateMultipleRenderTargetTextureSampleCount(this,e,t):this._engine.updateRenderTargetTextureSampleCount(this,e);return this._samples=e,r}resolveMSAATextures(){this.isMulti?this._engine.resolveMultiFramebuffer(this):this._engine.resolveFramebuffer(this)}generateMipMaps(){this._engine._currentRenderTarget===this&&(this.isMulti?this._engine.unBindMultiColorAttachmentFramebuffer(this,!0):this._engine.unBindFramebuffer(this,!0)),this.isMulti?this._engine.generateMipMapsMultiFramebuffer(this):this._engine.generateMipMapsFramebuffer(this)}constructor(e,t,i,r,n){this._textures=null,this._faceIndices=null,this._layerIndices=null,this._samples=1,this._attachments=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._depthStencilTextureWithStencil=!1,this.disableAutomaticMSAAResolve=!1,this.resolveMSAAColors=!0,this.resolveMSAADepth=!1,this.resolveMSAAStencil=!1,this.depthReadOnly=!1,this.stencilReadOnly=!1,this._isMulti=e,this._isCube=t,this._size=i,this._engine=r,this._depthStencilTexture=null,this.label=n}setTextures(e){Array.isArray(e)?this._textures=e:e?this._textures=[e]:this._textures=null}setTexture(e,t=0,i=!0){this._textures||(this._textures=[]),this._textures[t]!==e&&(this._textures[t]&&i&&this._textures[t].dispose(),this._textures[t]=e)}setLayerAndFaceIndices(e,t){this._layerIndices=e,this._faceIndices=t}setLayerAndFaceIndex(e=0,t,i){this._layerIndices||(this._layerIndices=[]),this._faceIndices||(this._faceIndices=[]),void 0!==t&&t>=0&&(this._layerIndices[e]=t),void 0!==i&&i>=0&&(this._faceIndices[e]=i)}createDepthStencilTexture(e=0,t=!0,i=!1,r=1,n=14,s){return this._depthStencilTexture?.dispose(),this._depthStencilTextureWithStencil=i,this._depthStencilTextureLabel=s,this._depthStencilTexture=this._engine.createDepthStencilTexture(this._size,{bilinearFiltering:t,comparisonFunction:e,generateStencil:i,isCube:this._isCube,samples:r,depthTextureFormat:n,label:s},this),this._depthStencilTexture}_shareDepth(e){this.shareDepth(e)}shareDepth(e){this._depthStencilTexture&&(e._depthStencilTexture&&e._depthStencilTexture.dispose(),e._depthStencilTexture=this._depthStencilTexture,e._depthStencilTextureWithStencil=this._depthStencilTextureWithStencil,this._depthStencilTexture.incrementReferences())}_swapAndDie(e){this.texture&&this.texture._swapAndDie(e),this._textures=null,this.dispose(!0)}_cloneRenderTargetWrapper(){let e=null;if(this._isMulti){let t=this.textures;if(t&&t.length>0){let i=!1,r=t.length,n=-1,s=t[t.length-1]._source;(14===s||12===s)&&(i=!0,n=t[t.length-1].format,r--);let a=[],l=[],h=[],u=[],_=[],o=[],f=[],c={};for(let e=0;e<r;++e){let i=t[e];a.push(i.samplingMode),l.push(i.type),h.push(i.format),void 0!==c[i.uniqueId]?(u.push(-1),f.push(0)):(c[i.uniqueId]=e,i.is2DArray?(u.push(35866),f.push(i.depth)):i.isCube?(u.push(34067),f.push(0)):i.is3D?(u.push(32879),f.push(i.depth)):(u.push(3553),f.push(0))),this._faceIndices&&_.push(this._faceIndices[e]??0),this._layerIndices&&o.push(this._layerIndices[e]??0)}let p={samplingModes:a,generateMipMaps:t[0].generateMipMaps,generateDepthBuffer:this._generateDepthBuffer,generateStencilBuffer:this._generateStencilBuffer,generateDepthTexture:i,depthTextureFormat:n,types:l,formats:h,textureCount:r,targetTypes:u,faceIndex:_,layerIndex:o,layerCounts:f,label:this.label},T={width:this.width,height:this.height,depth:this.depth};e=this._engine.createMultipleRenderTarget(T,p);for(let i=0;i<r;++i){if(-1!==u[i])continue;let r=c[t[i].uniqueId];e.setTexture(e.textures[r],i)}}}else{let t={};if(t.generateDepthBuffer=this._generateDepthBuffer,t.generateMipMaps=this.texture?.generateMipMaps??!1,t.generateStencilBuffer=this._generateStencilBuffer,t.samplingMode=this.texture?.samplingMode,t.type=this.texture?.type,t.format=this.texture?.format,t.noColorAttachment=!this._textures,t.label=this.label,this.isCube)e=this._engine.createRenderTargetCubeTexture(this.width,t);else{let i={width:this.width,height:this.height,layers:this.is2DArray||this.is3D?this.texture?.depth:void 0};e=this._engine.createRenderTargetTexture(i,t)}e.texture&&(e.texture.isReady=!0)}return e}_swapRenderTargetWrapper(e){if(this._textures&&e._textures)for(let t=0;t<this._textures.length;++t)this._textures[t]._swapAndDie(e._textures[t],!1),e._textures[t].isReady=!0;this._depthStencilTexture&&e._depthStencilTexture&&(this._depthStencilTexture._swapAndDie(e._depthStencilTexture),e._depthStencilTexture.isReady=!0),this._textures=null,this._depthStencilTexture=null}_rebuild(){let e=this._cloneRenderTargetWrapper();if(e){if(this._depthStencilTexture){let t=this._depthStencilTexture.samplingMode,i=this._depthStencilTexture.format;e.createDepthStencilTexture(this._depthStencilTexture._comparisonFunction,2===t||3===t||11===t,this._depthStencilTextureWithStencil,this._depthStencilTexture.samples,i,this._depthStencilTextureLabel)}this.samples>1&&e.setSamples(this.samples),e._swapRenderTargetWrapper(this),e.dispose()}}releaseTextures(){if(this._textures)for(let e=0;e<this._textures.length;++e)this._textures[e].dispose();this._textures=null}dispose(e=!1){e||(this._depthStencilTexture?.dispose(),this._depthStencilTexture=null,this.releaseTextures()),this._engine._releaseRenderTargetWrapper(this)}}class d extends T{setDepthStencilTexture(e,t=!0){if(super.setDepthStencilTexture(e,t),!e)return;let i=this._engine,r=this._context,n=e._hardwareTexture;if(n&&e._autoMSAAManagement&&this._MSAAFramebuffer){let t=i._currentFramebuffer;i._bindUnboundFramebuffer(this._MSAAFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,(0,p.HasStencilAspect)(e.format)?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,r.RENDERBUFFER,n.getMSAARenderBuffer()),i._bindUnboundFramebuffer(t)}}constructor(e,t,i,r,n){super(e,t,i,r),this._framebuffer=null,this._depthStencilBuffer=null,this._MSAAFramebuffer=null,this._colorTextureArray=null,this._depthStencilTextureArray=null,this._disposeOnlyFramebuffers=!1,this._currentLOD=0,this._context=n}_cloneRenderTargetWrapper(){let e;return this._colorTextureArray&&this._depthStencilTextureArray?(e=this._engine.createMultiviewRenderTargetTexture(this.width,this.height)).texture.isReady=!0:e=super._cloneRenderTargetWrapper(),e}_swapRenderTargetWrapper(e){super._swapRenderTargetWrapper(e),e._framebuffer=this._framebuffer,e._depthStencilBuffer=this._depthStencilBuffer,e._MSAAFramebuffer=this._MSAAFramebuffer,e._colorTextureArray=this._colorTextureArray,e._depthStencilTextureArray=this._depthStencilTextureArray,this._framebuffer=this._depthStencilBuffer=this._MSAAFramebuffer=this._colorTextureArray=this._depthStencilTextureArray=null}createDepthStencilTexture(e=0,t=!0,i=!1,r=1,n=14,s){if(this._depthStencilBuffer){let e=this._engine,t=e._currentFramebuffer,i=this._context;e._bindUnboundFramebuffer(this._framebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,null),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.RENDERBUFFER,null),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.STENCIL_ATTACHMENT,i.RENDERBUFFER,null),e._bindUnboundFramebuffer(t),i.deleteRenderbuffer(this._depthStencilBuffer),this._depthStencilBuffer=null}return super.createDepthStencilTexture(e,t,i,r,n,s)}shareDepth(e){super.shareDepth(e);let t=this._context,i=this._depthStencilBuffer,r=e._MSAAFramebuffer||e._framebuffer,n=this._engine;e._depthStencilBuffer&&e._depthStencilBuffer!==i&&t.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=i;let s=e._generateStencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;n._bindUnboundFramebuffer(r),t.framebufferRenderbuffer(t.FRAMEBUFFER,s,t.RENDERBUFFER,i),n._bindUnboundFramebuffer(null)}_bindTextureRenderTarget(e,t=0,i,r=0){let n,s=e._hardwareTexture;if(!s)return;let a=this._framebuffer,l=this._engine,h=l._currentFramebuffer;if(l._bindUnboundFramebuffer(a),l.webGLVersion>1){let a=this._context;n=a["COLOR_ATTACHMENT"+t],e.is2DArray||e.is3D?(i=i??this.layerIndices?.[t]??0,a.framebufferTextureLayer(a.FRAMEBUFFER,n,s.underlyingResource,r,i)):e.isCube?(i=i??this.faceIndices?.[t]??0,a.framebufferTexture2D(a.FRAMEBUFFER,n,a.TEXTURE_CUBE_MAP_POSITIVE_X+i,s.underlyingResource,r)):a.framebufferTexture2D(a.FRAMEBUFFER,n,a.TEXTURE_2D,s.underlyingResource,r)}else{let e=this._context;n=e["COLOR_ATTACHMENT"+t+"_WEBGL"];let a=void 0!==i?e.TEXTURE_CUBE_MAP_POSITIVE_X+i:e.TEXTURE_2D;e.framebufferTexture2D(e.FRAMEBUFFER,n,a,s.underlyingResource,r)}if(e._autoMSAAManagement&&this._MSAAFramebuffer){let e=this._context;l._bindUnboundFramebuffer(this._MSAAFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,s.getMSAARenderBuffer())}l._bindUnboundFramebuffer(h)}setTexture(e,t=0,i=!0){super.setTexture(e,t,i),this._bindTextureRenderTarget(e,t)}setLayerAndFaceIndices(e,t){if(super.setLayerAndFaceIndices(e,t),!this.textures||!this.layerIndices||!this.faceIndices)return;let i=this._attachments?.length??this.textures.length;for(let e=0;e<i;e++){let t=this.textures[e];t&&(t.is2DArray||t.is3D?this._bindTextureRenderTarget(t,e,this.layerIndices[e]):t.isCube?this._bindTextureRenderTarget(t,e,this.faceIndices[e]):this._bindTextureRenderTarget(t,e))}}setLayerAndFaceIndex(e=0,t,i){if(super.setLayerAndFaceIndex(e,t,i),!this.textures||!this.layerIndices||!this.faceIndices)return;let r=this.textures[e];r.is2DArray||r.is3D?this._bindTextureRenderTarget(this.textures[e],e,this.layerIndices[e]):r.isCube&&this._bindTextureRenderTarget(this.textures[e],e,this.faceIndices[e])}resolveMSAATextures(){let e=this._engine,t=e._currentFramebuffer;e._bindUnboundFramebuffer(this._MSAAFramebuffer),super.resolveMSAATextures(),e._bindUnboundFramebuffer(t)}dispose(e=this._disposeOnlyFramebuffers){let t=this._context;!e&&(this._colorTextureArray&&(this._context.deleteTexture(this._colorTextureArray),this._colorTextureArray=null),this._depthStencilTextureArray&&(this._context.deleteTexture(this._depthStencilTextureArray),this._depthStencilTextureArray=null)),this._framebuffer&&(t.deleteFramebuffer(this._framebuffer),this._framebuffer=null),this._depthStencilBuffer&&(t.deleteRenderbuffer(this._depthStencilBuffer),this._depthStencilBuffer=null),this._MSAAFramebuffer&&(t.deleteFramebuffer(this._MSAAFramebuffer),this._MSAAFramebuffer=null),super.dispose(e)}}let g=!1;g=!0,t.ThinEngine.prototype._createHardwareRenderTargetWrapper=function(e,t,i){let r=new d(e,t,i,this,this._gl);return this._renderTargetWrapperCache.push(r),r},t.ThinEngine.prototype.createRenderTargetTexture=function(e,t){let i,r,n=this._createHardwareRenderTargetWrapper(!1,!1,e),s=!0,a=!1,l=!1,h=1;void 0!==t&&"object"==typeof t&&(s=t.generateDepthBuffer??!0,a=!!t.generateStencilBuffer,l=!!t.noColorAttachment,i=t.colorAttachment,h=t.samples??1,r=t.label);let u=i||(l?null:this._createInternalTexture(e,t,!0,5)),_=e.width||e,o=e.height||e,f=this._currentFramebuffer,c=this._gl,p=c.createFramebuffer();if(this._bindUnboundFramebuffer(p),n._depthStencilBuffer=this._setupFramebufferDepthAttachments(a,s,_,o),!u||u.is2DArray||u.is3D||c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,u._hardwareTexture.underlyingResource,0),this._bindUnboundFramebuffer(f),n.label=r??"RenderTargetWrapper",n._framebuffer=p,n._generateDepthBuffer=s,n._generateStencilBuffer=a,n.setTextures(u),i){if(n._samples=i.samples,i.samples>1){let e=i._hardwareTexture.getMSAARenderBuffer(0);n._MSAAFramebuffer=c.createFramebuffer(),this._bindUnboundFramebuffer(n._MSAAFramebuffer),c.framebufferRenderbuffer(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.RENDERBUFFER,e),this._bindUnboundFramebuffer(null)}}else this.updateRenderTargetTextureSampleCount(n,h);return n},t.ThinEngine.prototype._createDepthStencilTexture=function(e,t,i){let r=this._gl,a=e.layers||0,l=e.depth||0,h=r.TEXTURE_2D;0!==a?h=r.TEXTURE_2D_ARRAY:0!==l&&(h=r.TEXTURE_3D);let u=new n.InternalTexture(this,12);if(u.label=t.label,!this._caps.depthTextureExtension)return s.Logger.Error("Depth texture is not supported by your browser or hardware."),u;let _={bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1,...t};if(this._bindTextureDirectly(h,u,!0),this._setupDepthStencilTexture(u,e,0!==_.comparisonFunction&&_.bilinearFiltering,_.comparisonFunction,_.samples),void 0!==_.depthTextureFormat){if(15!==_.depthTextureFormat&&16!==_.depthTextureFormat&&17!==_.depthTextureFormat&&13!==_.depthTextureFormat&&14!==_.depthTextureFormat&&18!==_.depthTextureFormat)return s.Logger.Error(`Depth texture ${_.depthTextureFormat} format is not supported.`),u;u.format=_.depthTextureFormat}else u.format=_.generateStencil?13:16;let o=(0,p.HasStencilAspect)(u.format),f=this._getWebGLTextureTypeFromDepthTextureFormat(u.format),c=o?r.DEPTH_STENCIL:r.DEPTH_COMPONENT,T=this._getInternalFormatFromDepthTextureFormat(u.format,!0,o);return u.is2DArray?r.texImage3D(h,0,T,u.width,u.height,a,0,c,f,null):u.is3D?r.texImage3D(h,0,T,u.width,u.height,l,0,c,f,null):r.texImage2D(h,0,T,u.width,u.height,0,c,f,null),this._bindTextureDirectly(h,null),this._internalTexturesCache.push(u),i._depthStencilBuffer&&(r.deleteRenderbuffer(i._depthStencilBuffer),i._depthStencilBuffer=null),this._bindUnboundFramebuffer(i._MSAAFramebuffer??i._framebuffer),i._generateStencilBuffer=o,i._depthStencilTextureWithStencil=o,i._depthStencilBuffer=this._setupFramebufferDepthAttachments(i._generateStencilBuffer,i._generateDepthBuffer,i.width,i.height,i.samples,u.format),this._bindUnboundFramebuffer(null),u},t.ThinEngine.prototype.updateRenderTargetTextureSampleCount=function(e,t){if(this.webGLVersion<2||!e)return 1;if(e.samples===t)return t;let i=this._gl;t=Math.min(t,this.getCaps().maxMSAASamples),e._depthStencilBuffer&&(i.deleteRenderbuffer(e._depthStencilBuffer),e._depthStencilBuffer=null),e._MSAAFramebuffer&&(i.deleteFramebuffer(e._MSAAFramebuffer),e._MSAAFramebuffer=null);let r=e.texture?._hardwareTexture;if(r?.releaseMSAARenderBuffers(),e.texture&&t>1&&"function"==typeof i.renderbufferStorageMultisample){let n=i.createFramebuffer();if(!n)throw Error("Unable to create multi sampled framebuffer");e._MSAAFramebuffer=n,this._bindUnboundFramebuffer(e._MSAAFramebuffer);let s=this._createRenderBuffer(e.texture.width,e.texture.height,t,-1,this._getRGBABufferInternalSizedFormat(e.texture.type,e.texture.format,e.texture._useSRGBBuffer),i.COLOR_ATTACHMENT0,!1);if(!s)throw Error("Unable to create multi sampled framebuffer");r?.addMSAARenderBuffer(s)}this._bindUnboundFramebuffer(e._MSAAFramebuffer??e._framebuffer),e.texture&&(e.texture.samples=t),e._samples=t;let n=e._depthStencilTexture?e._depthStencilTexture.format:void 0;return e._depthStencilBuffer=this._setupFramebufferDepthAttachments(e._generateStencilBuffer,e._generateDepthBuffer,e.width,e.height,t,n),this._bindUnboundFramebuffer(null),t},t.ThinEngine.prototype._setupDepthStencilTexture=function(e,t,i,r,n=1){let s=t.width??t,a=t.height??t,l=t.layers||0,h=t.depth||0;e.baseWidth=s,e.baseHeight=a,e.width=s,e.height=a,e.is2DArray=l>0,e.depth=l||h,e.isReady=!0,e.samples=n,e.generateMipMaps=!1,e.samplingMode=i?2:1,e.type=0,e._comparisonFunction=r;let u=this._gl,_=this._getTextureTarget(e),o=this._getSamplingParameters(e.samplingMode,!1);u.texParameteri(_,u.TEXTURE_MAG_FILTER,o.mag),u.texParameteri(_,u.TEXTURE_MIN_FILTER,o.min),u.texParameteri(_,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(_,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),this.webGLVersion>1&&(0===r?(u.texParameteri(_,u.TEXTURE_COMPARE_FUNC,515),u.texParameteri(_,u.TEXTURE_COMPARE_MODE,u.NONE)):(u.texParameteri(_,u.TEXTURE_COMPARE_FUNC,r),u.texParameteri(_,u.TEXTURE_COMPARE_MODE,u.COMPARE_REF_TO_TEXTURE)))};let E=!1;E=!0,t.ThinEngine.prototype.setDepthStencilTexture=function(e,t,i,r){void 0!==e&&(t&&(this._boundUniforms[e]=t),i&&i.depthStencilTexture?this._setTexture(e,i,!1,!0,r):this._setTexture(e,null,void 0,void 0,r))};let A=!1;A=!0,t.ThinEngine.prototype.createRenderTargetCubeTexture=function(e,t){let i=this._createHardwareRenderTargetWrapper(!1,!0,e),r={generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:0,samplingMode:3,format:5,...t};r.generateStencilBuffer=r.generateDepthBuffer&&r.generateStencilBuffer,(1!==r.type||this._caps.textureFloatLinearFiltering)&&(2!==r.type||this._caps.textureHalfFloatLinearFiltering)||(r.samplingMode=1);let a=this._gl,l=new n.InternalTexture(this,5);this._bindTextureDirectly(a.TEXTURE_CUBE_MAP,l,!0);let h=this._getSamplingParameters(r.samplingMode,r.generateMipMaps);1!==r.type||this._caps.textureFloat||(r.type=0,s.Logger.Warn("Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type")),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_MAG_FILTER,h.mag),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_MIN_FILTER,h.min),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);for(let t=0;t<6;t++)a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,this._getRGBABufferInternalSizedFormat(r.type,r.format),e,e,0,this._getInternalFormat(r.format),this._getWebGLTextureType(r.type),null);let u=a.createFramebuffer();return this._bindUnboundFramebuffer(u),i._depthStencilBuffer=this._setupFramebufferDepthAttachments(r.generateStencilBuffer,r.generateDepthBuffer,e,e),r.generateMipMaps&&a.generateMipmap(a.TEXTURE_CUBE_MAP),this._bindTextureDirectly(a.TEXTURE_CUBE_MAP,null),this._bindUnboundFramebuffer(null),i._framebuffer=u,i._generateDepthBuffer=r.generateDepthBuffer,i._generateStencilBuffer=r.generateStencilBuffer,l.width=e,l.height=e,l.isReady=!0,l.isCube=!0,l.samples=1,l.generateMipMaps=r.generateMipMaps,l.samplingMode=r.samplingMode,l.type=r.type,l.format=r.format,this._internalTexturesCache.push(l),i.setTextures(l),i};var b=e.i(27952),m=e.i(79452);let x=!1;x=!0,t.ThinEngine.prototype.createPrefilteredCubeTexture=function(t,i,r,a,l=null,h=null,u,_=null,o=!0){let f=async t=>{if(!t){l&&l(null);return}let h=t.texture;if(o?t.info.sphericalPolynomial&&(h._sphericalPolynomial=t.info.sphericalPolynomial):h._sphericalPolynomial=h._sphericalPolynomial??new b.SphericalPolynomial,h._source=9,this.getCaps().textureLOD){l&&l(h);return}let u=this._gl,_=t.width;if(!_)return;let{DDSTools:f}=await e.A(72061),c=[];for(let e=0;e<3;e++){let l=Math.log2(_)*r+a,o=Math.round(Math.min(Math.max(a+(l-a)*(1-e/2),0),l)),p=new n.InternalTexture(this,2);if(p.type=h.type,p.format=h.format,p.width=Math.pow(2,Math.max(Math.log2(_)-o,0)),p.height=p.width,p.isCube=!0,p._cachedWrapU=0,p._cachedWrapV=0,this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,p,!0),p.samplingMode=2,u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_MAG_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_CUBE_MAP,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),t.isDDS){let e=t.info,i=t.data;this._unpackFlipY(e.isCompressed),f.UploadDDSLevels(this,p,i,e,!0,6,o)}else s.Logger.Warn("DDS is the only prefiltered cube map supported so far.");this._bindTextureDirectly(u.TEXTURE_CUBE_MAP,null);let T=new m.BaseTexture(i);T._isCube=!0,T._texture=p,p.isReady=!0,c.push(T)}h._lodTextureHigh=c[2],h._lodTextureMid=c[1],h._lodTextureLow=c[0],l&&l(h)};return this.createCubeTexture(t,i,null,!1,f,h,u,_,o,r,a)};var R=e.i(23733);let S=!1;S=!0,t.ThinEngine.prototype.createUniformBuffer=function(e,t){let i=this._gl.createBuffer();if(!i)throw Error("Unable to create uniform buffer");let r=new R.WebGLDataBuffer(i);return this.bindUniformBuffer(r),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.STATIC_DRAW),this.bindUniformBuffer(null),r.references=1,r},t.ThinEngine.prototype.createDynamicUniformBuffer=function(e,t){let i=this._gl.createBuffer();if(!i)throw Error("Unable to create dynamic uniform buffer");let r=new R.WebGLDataBuffer(i);return this.bindUniformBuffer(r),e instanceof Float32Array?this._gl.bufferData(this._gl.UNIFORM_BUFFER,e,this._gl.DYNAMIC_DRAW):this._gl.bufferData(this._gl.UNIFORM_BUFFER,new Float32Array(e),this._gl.DYNAMIC_DRAW),this.bindUniformBuffer(null),r.references=1,r},t.ThinEngine.prototype.updateUniformBuffer=function(e,t,i,r){this.bindUniformBuffer(e),void 0===i&&(i=0),void 0===r?t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,i,t):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,i,new Float32Array(t)):t instanceof Float32Array?this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,t.subarray(i,i+r)):this._gl.bufferSubData(this._gl.UNIFORM_BUFFER,0,new Float32Array(t).subarray(i,i+r)),this.bindUniformBuffer(null)},t.ThinEngine.prototype.bindUniformBuffer=function(e){this._gl.bindBuffer(this._gl.UNIFORM_BUFFER,e?e.underlyingResource:null)},t.ThinEngine.prototype.bindUniformBufferBase=function(e,t,i){this._gl.bindBufferBase(this._gl.UNIFORM_BUFFER,t,e?e.underlyingResource:null)},t.ThinEngine.prototype.bindUniformBlock=function(e,t,i){let r=e.program,n=this._gl.getUniformBlockIndex(r,t);0xffffffff!==n&&this._gl.uniformBlockBinding(r,n,i)};var F=e.i(7484),M=e.i(99429);let y=!1;y=!0,M.AbstractEngine.prototype.displayLoadingUI=function(){if(!(0,F.IsWindowObjectExist)())return;let e=this.loadingScreen;e&&e.displayLoadingUI()},M.AbstractEngine.prototype.hideLoadingUI=function(){if(!(0,F.IsWindowObjectExist)())return;let e=this._loadingScreen;e&&e.hideLoadingUI()},Object.defineProperty(M.AbstractEngine.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=M.AbstractEngine.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(e){this._loadingScreen=e},enumerable:!0,configurable:!0}),Object.defineProperty(M.AbstractEngine.prototype,"loadingUIText",{set:function(e){this.loadingScreen.loadingUIText=e},enumerable:!0,configurable:!0}),Object.defineProperty(M.AbstractEngine.prototype,"loadingUIBackgroundColor",{set:function(e){this.loadingScreen.loadingUIBackgroundColor=e},enumerable:!0,configurable:!0}),(0,e.i(85303).RegisterAbstractEngineDom)();let U=!1;U=!0,M.AbstractEngine.prototype.getInputElement=function(){return this._renderingCanvas},M.AbstractEngine.prototype.getDepthFunction=function(){return this._depthCullingState.depthFunc},M.AbstractEngine.prototype.setDepthFunction=function(e){this._depthCullingState.depthFunc=e},M.AbstractEngine.prototype.setDepthFunctionToGreater=function(){this.setDepthFunction(516)},M.AbstractEngine.prototype.setDepthFunctionToGreaterOrEqual=function(){this.setDepthFunction(518)},M.AbstractEngine.prototype.setDepthFunctionToLess=function(){this.setDepthFunction(513)},M.AbstractEngine.prototype.setDepthFunctionToLessOrEqual=function(){this.setDepthFunction(515)},M.AbstractEngine.prototype.getDepthWrite=function(){return this._depthCullingState.depthMask},M.AbstractEngine.prototype.setDepthWrite=function(e){this._depthCullingState.depthMask=e},M.AbstractEngine.prototype.setAlphaConstants=function(e,t,i,r){this._alphaState.setAlphaBlendConstants(e,t,i,r)},M.AbstractEngine.prototype.getAlphaMode=function(e=0){return this._alphaMode[e]},M.AbstractEngine.prototype.getAlphaEquation=function(e=0){return this._alphaEquation[e]};let B=!1;B=!0,M.AbstractEngine.prototype.getStencilBuffer=function(){return this._stencilState.stencilTest},M.AbstractEngine.prototype.setStencilBuffer=function(e){this._stencilState.stencilTest=e},M.AbstractEngine.prototype.getStencilMask=function(){return this._stencilState.stencilMask},M.AbstractEngine.prototype.setStencilMask=function(e){this._stencilState.stencilMask=e},M.AbstractEngine.prototype.getStencilFunction=function(){return this._stencilState.stencilFunc},M.AbstractEngine.prototype.getStencilBackFunction=function(){return this._stencilState.stencilBackFunc},M.AbstractEngine.prototype.getStencilFunctionReference=function(){return this._stencilState.stencilFuncRef},M.AbstractEngine.prototype.getStencilFunctionMask=function(){return this._stencilState.stencilFuncMask},M.AbstractEngine.prototype.setStencilFunction=function(e){this._stencilState.stencilFunc=e},M.AbstractEngine.prototype.setStencilBackFunction=function(e){this._stencilState.stencilBackFunc=e},M.AbstractEngine.prototype.setStencilFunctionReference=function(e){this._stencilState.stencilFuncRef=e},M.AbstractEngine.prototype.setStencilFunctionMask=function(e){this._stencilState.stencilFuncMask=e},M.AbstractEngine.prototype.getStencilOperationFail=function(){return this._stencilState.stencilOpStencilFail},M.AbstractEngine.prototype.getStencilBackOperationFail=function(){return this._stencilState.stencilBackOpStencilFail},M.AbstractEngine.prototype.getStencilOperationDepthFail=function(){return this._stencilState.stencilOpDepthFail},M.AbstractEngine.prototype.getStencilBackOperationDepthFail=function(){return this._stencilState.stencilBackOpDepthFail},M.AbstractEngine.prototype.getStencilOperationPass=function(){return this._stencilState.stencilOpStencilDepthPass},M.AbstractEngine.prototype.getStencilBackOperationPass=function(){return this._stencilState.stencilBackOpStencilDepthPass},M.AbstractEngine.prototype.setStencilOperationFail=function(e){this._stencilState.stencilOpStencilFail=e},M.AbstractEngine.prototype.setStencilBackOperationFail=function(e){this._stencilState.stencilBackOpStencilFail=e},M.AbstractEngine.prototype.setStencilOperationDepthFail=function(e){this._stencilState.stencilOpDepthFail=e},M.AbstractEngine.prototype.setStencilBackOperationDepthFail=function(e){this._stencilState.stencilBackOpDepthFail=e},M.AbstractEngine.prototype.setStencilOperationPass=function(e){this._stencilState.stencilOpStencilDepthPass=e},M.AbstractEngine.prototype.setStencilBackOperationPass=function(e){this._stencilState.stencilBackOpStencilDepthPass=e},M.AbstractEngine.prototype.cacheStencilState=function(){this._cachedStencilBuffer=this.getStencilBuffer(),this._cachedStencilFunction=this.getStencilFunction(),this._cachedStencilMask=this.getStencilMask(),this._cachedStencilOperationPass=this.getStencilOperationPass(),this._cachedStencilOperationFail=this.getStencilOperationFail(),this._cachedStencilOperationDepthFail=this.getStencilOperationDepthFail(),this._cachedStencilReference=this.getStencilFunctionReference()},M.AbstractEngine.prototype.restoreStencilState=function(){this.setStencilFunction(this._cachedStencilFunction),this.setStencilMask(this._cachedStencilMask),this.setStencilBuffer(this._cachedStencilBuffer),this.setStencilOperationPass(this._cachedStencilOperationPass),this.setStencilOperationFail(this._cachedStencilOperationFail),this.setStencilOperationDepthFail(this._cachedStencilOperationDepthFail),this.setStencilFunctionReference(this._cachedStencilReference)},(0,e.i(60272).RegisterAbstractEngineRenderPass)(),(0,e.i(42192).RegisterAbstractEngineTexture)();var D=e.i(33169);let C=!1;C=!0,(0,D.RegisterFileTools)(),M.AbstractEngine.prototype._loadFileAsync=async function(e,t,i){return await new Promise((r,n)=>{this._loadFile(e,e=>{r(e)},void 0,t,i,(e,t)=>{n(t)})})};var P=e.i(2596);M.AbstractEngine.GetCompatibleTextureLoader=P._GetCompatibleTextureLoader;let I=!1;I=!0,t.ThinEngine.prototype.enableScissor=function(e,t,i,r){let n=this._gl;n.enable(n.SCISSOR_TEST),n.scissor(e,t,i,r)},t.ThinEngine.prototype.disableScissor=function(){let e=this._gl;e.disable(e.SCISSOR_TEST)},e.s([],62855),e.i(62855);var w=e.i(88975);e.s(["Engine",()=>w.Engine],69260)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,85303,e=>{"use strict";var t=e.i(99429);let i=!1;e.s(["RegisterAbstractEngineDom",0,function(){i||(i=!0,t.AbstractEngine.prototype.getInputElement=function(){return this._renderingCanvas},t.AbstractEngine.prototype.getRenderingCanvasClientRect=function(){return this._renderingCanvas?this._renderingCanvas.getBoundingClientRect():null},t.AbstractEngine.prototype.getInputElementClientRect=function(){return this._renderingCanvas?this.getInputElement().getBoundingClientRect():null},t.AbstractEngine.prototype.getAspectRatio=function(e,t=!1){let i=e.viewport;return this.getRenderWidth(t)*i.width/(this.getRenderHeight(t)*i.height)},t.AbstractEngine.prototype.getScreenAspectRatio=function(){return this.getRenderWidth(!0)/this.getRenderHeight(!0)},t.AbstractEngine.prototype._verifyPointerLock=function(){this._onPointerLockChange?.()})}])},60272,e=>{"use strict";var t=e.i(99429);let i=!1;e.s(["RegisterAbstractEngineRenderPass",0,function(){i||(i=!0,t.AbstractEngine.prototype.getRenderPassNames=function(){return this._renderPassNames},t.AbstractEngine.prototype.getCurrentRenderPassName=function(){return this._renderPassNames[this.currentRenderPassId]},t.AbstractEngine.prototype.createRenderPassId=function(e){let i=++t.AbstractEngine._RenderPassIdCounter;return this._renderPassNames[i]=e??"NONAME",i},t.AbstractEngine.prototype.releaseRenderPassId=function(e){this._renderPassNames[e]=void 0;for(let t=0;t<this.scenes.length;++t){let i=this.scenes[t];for(let t=0;t<i.meshes.length;++t){let r=i.meshes[t];if(r._releaseRenderPassId(e),r.subMeshes)for(let t=0;t<r.subMeshes.length;++t)r.subMeshes[t]._removeDrawWrapper(e)}}})}])},42192,e=>{"use strict";var t=e.i(99429);let i=!1;e.s(["RegisterAbstractEngineTexture",0,function(){i||(i=!0,t.AbstractEngine.prototype.createDepthStencilTexture=function(e,t,i){if(!t.isCube)return this._createDepthStencilTexture(e,t,i);{let i=e.width||e;return this._createDepthStencilCubeTexture(i,t)}})}])},5554,e=>{"use strict";var t=e.i(76256);let i=!1;e.s(["RegisterEngineDynamicBuffer",0,function(){i||(i=!0,t.ThinEngine.prototype.updateDynamicIndexBuffer=function(e,t,i=0){let r;this._currentBoundBuffer[this._gl.ELEMENT_ARRAY_BUFFER]=null,this.bindIndexBuffer(e),r=e.is32Bits?t instanceof Uint32Array?t:new Uint32Array(t):t instanceof Uint16Array?t:new Uint16Array(t),this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,r,this._gl.DYNAMIC_DRAW),this._resetIndexBufferBinding()},t.ThinEngine.prototype.updateDynamicVertexBuffer=function(e,t,i,r){this.bindArrayBuffer(e),void 0===i&&(i=0);let s=t.byteLength||t.length;void 0===r||r>=s&&0===i?t instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,i,new Float32Array(t)):this._gl.bufferSubData(this._gl.ARRAY_BUFFER,i,t):t instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,i,new Float32Array(t).subarray(0,r/4)):(t=ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,r):new Uint8Array(t,0,r),this._gl.bufferSubData(this._gl.ARRAY_BUFFER,i,t)),this._resetVertexBufferBinding()})}])},88975,e=>{"use strict";var t=e.i(55080),i=e.i(72986),r=e.i(76256),s=e.i(25804),n=e.i(23733),a=e.i(85789),l=e.i(33016),o=e.i(99429),h=e.i(51671),_=e.i(39913),u=e.i(32945),c=e.i(85303),d=e.i(60272);class E extends r.ThinEngine{static get NpmPackage(){return o.AbstractEngine.NpmPackage}static get Version(){return o.AbstractEngine.Version}static get Instances(){return i.EngineStore.Instances}static get LastCreatedEngine(){return i.EngineStore.LastCreatedEngine}static get LastCreatedScene(){return i.EngineStore.LastCreatedScene}static DefaultLoadingScreenFactory(e){return o.AbstractEngine.DefaultLoadingScreenFactory(e)}get _supportsHardwareTextureRescaling(){return!!E._RescalePostProcessFactory}_measureFps(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0}get performanceMonitor(){return this._performanceMonitor}constructor(e,t,i,r=!1){if((0,c.RegisterAbstractEngineDom)(),(0,d.RegisterAbstractEngineRenderPass)(),super(e,t,i,r),this._performanceMonitor=new s.PerformanceMonitor,this._drawCalls=new _.PerfCounter,!e)return;this._features.supportRenderPasses=!0}_initGLContext(){super._initGLContext(),this._rescalePostProcess=null}_sharedInit(e){super._sharedInit(e),(0,h._CommonInit)(this,e,this._creationOptions)}resizeImageBitmap(e,t,i){return(0,h.ResizeImageBitmap)(this,e,t,i)}async _createImageBitmapFromSource(e,t){return await (0,h.CreateImageBitmapFromSource)(this,e,t)}switchFullscreen(e){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(e)}enterFullscreen(e){!this.isFullscreen&&(this._pointerLockRequested=e,this._renderingCanvas&&(0,h.RequestFullscreen)(this._renderingCanvas))}exitFullscreen(){this.isFullscreen&&(0,h.ExitFullscreen)()}setDitheringState(e){e?this._gl.enable(this._gl.DITHER):this._gl.disable(this._gl.DITHER)}setRasterizerState(e){e?this._gl.disable(this._gl.RASTERIZER_DISCARD):this._gl.enable(this._gl.RASTERIZER_DISCARD)}setDirectViewport(e,t,i,r){let s=this._cachedViewport;return this._cachedViewport=null,this._viewport(e,t,i,r),s}scissorClear(e,t,i,r,s){this.enableScissor(e,t,i,r),this.clear(s,!0,!0,!0),this.disableScissor()}getVertexShaderSource(e){let t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[0]):null}getFragmentShaderSource(e){let t=this._gl.getAttachedShaders(e);return t?this._gl.getShaderSource(t[1]):null}set framebufferDimensionsObject(e){this._framebufferDimensionsObject=e,this._framebufferDimensionsObject&&this.onResizeObservable.notifyObservers(this)}_rebuildBuffers(){for(let e of this.scenes)e.resetCachedMaterial(),e._rebuildGeometries();for(let e of this._virtualScenes)e.resetCachedMaterial(),e._rebuildGeometries();super._rebuildBuffers()}getFontOffset(e){return(0,h.GetFontOffset)(e)}enterPointerlock(){this._renderingCanvas&&(0,h.RequestPointerlock)(this._renderingCanvas)}exitPointerlock(){(0,h.ExitPointerlock)()}beginFrame(){this._measureFps(),super.beginFrame()}_deletePipelineContext(e){e&&e.program&&e.transformFeedback&&(this.deleteTransformFeedback(e.transformFeedback),e.transformFeedback=null),super._deletePipelineContext(e)}createShaderProgram(e,t,i,r,s,n=null){s=s||this._gl,this.onBeforeShaderCompilationObservable.notifyObservers(this);let a=super.createShaderProgram(e,t,i,r,s,n);return this.onAfterShaderCompilationObservable.notifyObservers(this),a}_createShaderProgram(e,t,i,r,s=null){let n=r.createProgram();if(e.program=n,!n)throw Error("Unable to create program");if(r.attachShader(n,t),r.attachShader(n,i),this.webGLVersion>1&&s){let t=this.createTransformFeedback();this.bindTransformFeedback(t),this.setTranformFeedbackVaryings(n,s),e.transformFeedback=t}return r.linkProgram(n),this.webGLVersion>1&&s&&this.bindTransformFeedback(null),e.context=r,e.vertexShader=t,e.fragmentShader=i,e.isParallelCompiled||this._finalizePipelineContext(e),n}_releaseTexture(e){super._releaseTexture(e)}_releaseRenderTargetWrapper(e){for(let t of(super._releaseRenderTargetWrapper(e),this.scenes)){for(let i of t.postProcesses)i._outputTexture===e&&(i._outputTexture=null);for(let i of t.cameras)for(let t of i._postProcesses)t&&t._outputTexture===e&&(t._outputTexture=null)}}_rescaleTexture(e,t,i,r,s){this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE);let n=this.createRenderTargetTexture({width:t.width,height:t.height},{generateMipMaps:!1,type:0,samplingMode:2,generateDepthBuffer:!1,generateStencilBuffer:!1});if(!this._rescalePostProcess&&E._RescalePostProcessFactory&&(this._rescalePostProcess=E._RescalePostProcessFactory(this)),this._rescalePostProcess){this._rescalePostProcess.externalTextureSamplerBinding=!0;let a=()=>{this._rescalePostProcess.onApply=function(t){t._bindTexture("textureSampler",e)};let a=i;a||(a=this.scenes[this.scenes.length-1]),a.postProcessManager.directRender([this._rescalePostProcess],n,!0),this._bindTextureDirectly(this._gl.TEXTURE_2D,t,!0),this._gl.copyTexImage2D(this._gl.TEXTURE_2D,0,r,0,0,t.width,t.height,0),this.unBindFramebuffer(n),n.dispose(),s&&s()},l=this._rescalePostProcess.getEffect();l?l.executeWhenCompiled(a):this._rescalePostProcess.onEffectCreatedObservable.addOnce(e=>{e.executeWhenCompiled(a)})}}wrapWebGLTexture(e,i=!1,r=3,s=0,n=0){let a=new l.WebGLHardwareTexture(e,this._gl),o=new t.InternalTexture(this,15,!0);return o._hardwareTexture=a,o.baseWidth=s,o.baseHeight=n,o.width=s,o.height=n,o.isReady=!0,o.useMipMaps=i,this.updateTextureSamplingMode(r,o),o}updateWrappedWebGLTexture(e,t){if(15!==e.source)throw Error("updateWrappedWebGLTexture: target InternalTexture was not produced by wrapWebGLTexture.");for(let t of this._renderTargetWrapperCache)if(t.textures?.includes(e)){if(t.isMulti)throw Error("updateWrappedWebGLTexture: wrapped texture is part of a multi render-target; not supported. Dispose and re-wrap.");if(t._depthStencilTexture)throw Error("updateWrappedWebGLTexture: wrapped texture's render-target wrapper has a depth/stencil texture; not supported. Dispose and re-wrap.")}for(let i in e._hardwareTexture=new l.WebGLHardwareTexture(t,this._gl),e.isReady=!0,e._cachedCoordinatesMode=null,e._cachedWrapU=null,e._cachedWrapV=null,e._cachedWrapR=null,e._cachedAnisotropicFilteringLevel=null,this._boundTexturesCache)this._boundTexturesCache[i]===e&&(this._boundTexturesCache[i]=null);this.updateTextureSamplingMode(e.samplingMode,e);let i=this._gl;for(let r of this._renderTargetWrapperCache){if(r.texture!==e)continue;let s=r.samples,n=s>1;r._framebuffer&&i.deleteFramebuffer(r._framebuffer),!n&&r._depthStencilBuffer&&(i.deleteRenderbuffer(r._depthStencilBuffer),r._depthStencilBuffer=null);let a=this._currentFramebuffer,l=i.createFramebuffer();this._bindUnboundFramebuffer(l),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,t,0),n||(r._depthStencilBuffer=this._setupFramebufferDepthAttachments(r._generateStencilBuffer,r._generateDepthBuffer,r.width,r.height)),this._bindUnboundFramebuffer(a),r._framebuffer=l,n&&(r._samples=1,this.updateRenderTargetTextureSampleCount(r,s))}}_uploadImageToTexture(e,t,i=0,r=0){let s=this._gl,n=this._getWebGLTextureType(e.type),a=this._getInternalFormat(e.format),l=this._getRGBABufferInternalSizedFormat(e.type,a),o=e.isCube?s.TEXTURE_CUBE_MAP:s.TEXTURE_2D;this._bindTextureDirectly(o,e,!0),this._unpackFlipY(e.invertY);let h=s.TEXTURE_2D;e.isCube&&(h=s.TEXTURE_CUBE_MAP_POSITIVE_X+i),s.texImage2D(h,r,l,a,n,t),this._bindTextureDirectly(o,null,!0)}updateTextureComparisonFunction(e,t){if(1===this.webGLVersion)return void a.Logger.Error("WebGL 1 does not support texture comparison.");let i=this._gl;e.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,e,!0),0===t?(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_FUNC,515),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_MODE,i.NONE)):(i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_FUNC,t),i.texParameteri(i.TEXTURE_CUBE_MAP,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,e,!0),0===t?(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_FUNC,515),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_MODE,i.NONE)):(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_FUNC,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),e._comparisonFunction=t}createInstancesBuffer(e){let t=this._gl.createBuffer();if(!t)throw Error("Unable to create instance buffer");let i=new n.WebGLDataBuffer(t);return i.capacity=e,this.bindArrayBuffer(i),this._gl.bufferData(this._gl.ARRAY_BUFFER,e,this._gl.DYNAMIC_DRAW),i.references=1,i}deleteInstancesBuffer(e){this._gl.deleteBuffer(e)}async _clientWaitAsync(e,t=0,i=10){let r=this._gl;return await new Promise((s,n)=>{(0,u._RetryWithInterval)(()=>{let i=r.clientWaitSync(e,t,0);if(i==r.WAIT_FAILED)throw Error("clientWaitSync failed");return i!=r.TIMEOUT_EXPIRED},s,n,i)})}_readPixelsAsync(e,t,i,r,s,n,a){if(this._webGLVersion<2)throw Error("_readPixelsAsync only work on WebGL2+");let l=this._gl,o=l.createBuffer();l.bindBuffer(l.PIXEL_PACK_BUFFER,o),l.bufferData(l.PIXEL_PACK_BUFFER,a.byteLength,l.STREAM_READ),l.readPixels(e,t,i,r,s,n,0),l.bindBuffer(l.PIXEL_PACK_BUFFER,null);let h=l.fenceSync(l.SYNC_GPU_COMMANDS_COMPLETE,0);return h?(l.flush(),this._clientWaitAsync(h,0,10).then(()=>(l.deleteSync(h),l.bindBuffer(l.PIXEL_PACK_BUFFER,o),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,a),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),l.deleteBuffer(o),a))):null}dispose(){this.hideLoadingUI?.(),this._rescalePostProcess&&this._rescalePostProcess.dispose(),(0,h._CommonDispose)(this,this._renderingCanvas),super.dispose()}}E.ALPHA_DISABLE=0,E.ALPHA_ADD=1,E.ALPHA_COMBINE=2,E.ALPHA_SUBTRACT=3,E.ALPHA_MULTIPLY=4,E.ALPHA_MAXIMIZED=5,E.ALPHA_ONEONE=6,E.ALPHA_PREMULTIPLIED=7,E.ALPHA_PREMULTIPLIED_PORTERDUFF=8,E.ALPHA_INTERPOLATE=9,E.ALPHA_SCREENMODE=10,E.DELAYLOADSTATE_NONE=0,E.DELAYLOADSTATE_LOADED=1,E.DELAYLOADSTATE_LOADING=2,E.DELAYLOADSTATE_NOTLOADED=4,E.NEVER=512,E.ALWAYS=519,E.LESS=513,E.EQUAL=514,E.LEQUAL=515,E.GREATER=516,E.GEQUAL=518,E.NOTEQUAL=517,E.KEEP=7680,E.REPLACE=7681,E.INCR=7682,E.DECR=7683,E.INVERT=5386,E.INCR_WRAP=34055,E.DECR_WRAP=34056,E.TEXTURE_CLAMP_ADDRESSMODE=0,E.TEXTURE_WRAP_ADDRESSMODE=1,E.TEXTURE_MIRROR_ADDRESSMODE=2,E.TEXTUREFORMAT_ALPHA=0,E.TEXTUREFORMAT_LUMINANCE=1,E.TEXTUREFORMAT_LUMINANCE_ALPHA=2,E.TEXTUREFORMAT_RGB=4,E.TEXTUREFORMAT_RGBA=5,E.TEXTUREFORMAT_RED=6,E.TEXTUREFORMAT_R=6,E.TEXTUREFORMAT_R16_UNORM=33322,E.TEXTUREFORMAT_RG16_UNORM=33324,E.TEXTUREFORMAT_RGB16_UNORM=32852,E.TEXTUREFORMAT_RGBA16_UNORM=32859,E.TEXTUREFORMAT_R16_SNORM=36760,E.TEXTUREFORMAT_RG16_SNORM=36761,E.TEXTUREFORMAT_RGB16_SNORM=36762,E.TEXTUREFORMAT_RGBA16_SNORM=36763,E.TEXTUREFORMAT_RG=7,E.TEXTUREFORMAT_RED_INTEGER=8,E.TEXTUREFORMAT_R_INTEGER=8,E.TEXTUREFORMAT_RG_INTEGER=9,E.TEXTUREFORMAT_RGB_INTEGER=10,E.TEXTUREFORMAT_RGBA_INTEGER=11,E.TEXTURETYPE_UNSIGNED_BYTE=0,E.TEXTURETYPE_UNSIGNED_INT=0,E.TEXTURETYPE_FLOAT=1,E.TEXTURETYPE_HALF_FLOAT=2,E.TEXTURETYPE_BYTE=3,E.TEXTURETYPE_SHORT=4,E.TEXTURETYPE_UNSIGNED_SHORT=5,E.TEXTURETYPE_INT=6,E.TEXTURETYPE_UNSIGNED_INTEGER=7,E.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,E.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,E.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,E.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,E.TEXTURETYPE_UNSIGNED_INT_24_8=12,E.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,E.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,E.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,E.TEXTURE_NEAREST_SAMPLINGMODE=1,E.TEXTURE_BILINEAR_SAMPLINGMODE=2,E.TEXTURE_TRILINEAR_SAMPLINGMODE=3,E.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,E.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,E.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,E.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,E.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,E.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,E.TEXTURE_NEAREST_LINEAR=7,E.TEXTURE_NEAREST_NEAREST=1,E.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,E.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,E.TEXTURE_LINEAR_LINEAR=2,E.TEXTURE_LINEAR_NEAREST=12,E.TEXTURE_EXPLICIT_MODE=0,E.TEXTURE_SPHERICAL_MODE=1,E.TEXTURE_PLANAR_MODE=2,E.TEXTURE_CUBIC_MODE=3,E.TEXTURE_PROJECTION_MODE=4,E.TEXTURE_SKYBOX_MODE=5,E.TEXTURE_INVCUBIC_MODE=6,E.TEXTURE_EQUIRECTANGULAR_MODE=7,E.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,E.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,E.SCALEMODE_FLOOR=1,E.SCALEMODE_NEAREST=2,E.SCALEMODE_CEILING=3,e.s(["Engine",0,E])},79452,e=>{"use strict";let t,i,r,s,n,a,l,o,h,_,u,c,d,E,g,m,T,p,R,f,A,x,b,S,D,I,P,C,v,M,L,U,F,O,y,w,N,B,X,z,G,k,V,W,H,Y,q,Z,j,K,Q,$,J,ee,et,ei,er,es;var en,ea,el=e.i(4112),eo=e.i(91679),eh=e.i(42704),e_=e.i(72003),eu=e.i(72986),ec=e.i(6939),ed=e.i(19696),eE=e.i(22832),eg=e.i(43880);let em=(I=class e{get wrapU(){return this._wrapU}set wrapU(e){this._wrapU=e}get wrapV(){return this._wrapV}set wrapV(e){this._wrapV=e}get coordinatesMode(){return 0}get isCube(){return!!this._texture&&this._texture.isCube}set isCube(e){this._texture&&(this._texture.isCube=e)}get is3D(){return!!this._texture&&this._texture.is3D}set is3D(e){this._texture&&(this._texture.is3D=e)}get is2DArray(){return!!this._texture&&this._texture.is2DArray}set is2DArray(e){this._texture&&(this._texture.is2DArray=e)}getClassName(){return"ThinTexture"}static _IsRenderTargetWrapper(e){return e?.shareDepth!==void 0}constructor(t){this._wrapU=1,this._wrapV=1,this.wrapR=1,this.anisotropicFilteringLevel=4,this.delayLoadState=0,this._texture=null,this._engine=null,this._cachedSize=ed.Size.Zero(),this._cachedBaseSize=ed.Size.Zero(),this._initialSamplingMode=2,this._texture=e._IsRenderTargetWrapper(t)?t.texture:t,this._texture&&(this._engine=this._texture.getEngine(),this.wrapU=this._texture._cachedWrapU??this.wrapU,this.wrapV=this._texture._cachedWrapV??this.wrapV,this.wrapR=this._texture._cachedWrapR??this.wrapR)}isReady(){return 4===this.delayLoadState?(this.delayLoad(),!1):!!this._texture&&this._texture.isReady}delayLoad(){}getInternalTexture(){return this._texture}getSize(){if(this._texture){if(this._texture.width)return this._cachedSize.width=this._texture.width,this._cachedSize.height=this._texture.height,this._cachedSize;this._texture._size&&(this._cachedSize.width=this._texture._size,this._cachedSize.height=this._texture._size)}return this._cachedSize}getBaseSize(){return this.isReady()&&this._texture?this._texture._size?(this._cachedBaseSize.width=this._texture._size,this._cachedBaseSize.height=this._texture._size):(this._cachedBaseSize.width=this._texture.baseWidth,this._cachedBaseSize.height=this._texture.baseHeight):(this._cachedBaseSize.width=0,this._cachedBaseSize.height=0),this._cachedBaseSize}get samplingMode(){return this._texture?this._texture.samplingMode:this._initialSamplingMode}updateSamplingMode(e,t=!1){this._texture&&this._engine&&this._engine.updateTextureSamplingMode(e,this._texture,this._texture.generateMipMaps&&t)}releaseInternalTexture(){this._texture&&(this._texture.dispose(),this._texture=null)}dispose(){this._texture&&(this.releaseInternalTexture(),this._engine=null)}},P=[],C=[],v=[],M=[],L=[],U=[],F=[],O=[],y=[],w=[],N=[],B=[],X=[],z=[],G=[],k=[],V=[],W=[],H=[],Y=[],q=[],Z=[],j=[],K=[],Q=[],$=[],J=[],ee=[],et=[],ei=[],er=[],en=class extends I{set hasAlpha(e){this._hasAlpha!==e&&(this._hasAlpha=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get hasAlpha(){return this._hasAlpha}set getAlphaFromRGB(e){this._getAlphaFromRGB!==e&&(this._getAlphaFromRGB=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get getAlphaFromRGB(){return this._getAlphaFromRGB}set coordinatesIndex(e){this._coordinatesIndex!==e&&(this._coordinatesIndex=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get coordinatesIndex(){return this._coordinatesIndex}set coordinatesMode(e){this._coordinatesMode!==e&&(this._coordinatesMode=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get coordinatesMode(){return this._coordinatesMode}get wrapU(){return this._wrapU}set wrapU(e){this._wrapU=e}get wrapV(){return this._wrapV}set wrapV(e){this._wrapV=e}get isCube(){return this._texture?this._texture.isCube:this._isCube}set isCube(e){this._texture?this._texture.isCube=e:this._isCube=e}get is3D(){return!!this._texture&&this._texture.is3D}set is3D(e){this._texture&&(this._texture.is3D=e)}get is2DArray(){return!!this._texture&&this._texture.is2DArray}set is2DArray(e){this._texture&&(this._texture.is2DArray=e)}get gammaSpace(){return this._texture?(null===this._texture._gammaSpace&&(this._texture._gammaSpace=this._gammaSpace),this._texture._gammaSpace&&!this._texture._useSRGBBuffer):this._gammaSpace}set gammaSpace(e){if(this._texture){if(this._texture._gammaSpace===e)return;this._texture._gammaSpace=e}else{if(this._gammaSpace===e)return;this._gammaSpace=e}this.getScene()?.markAllMaterialsAsDirty(1,e=>e.hasTexture(this))}get isRGBD(){return null!=this._texture&&this._texture._isRGBD}set isRGBD(e){e!==this.isRGBD&&(this._texture&&(this._texture._isRGBD=e),this.getScene()?.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get noMipmap(){return!1}get lodGenerationOffset(){return this._texture?this._texture._lodGenerationOffset:0}set lodGenerationOffset(e){this._texture&&(this._texture._lodGenerationOffset=e)}get lodGenerationScale(){return this._texture?this._texture._lodGenerationScale:0}set lodGenerationScale(e){this._texture&&(this._texture._lodGenerationScale=e)}get linearSpecularLOD(){return!!this._texture&&this._texture._linearSpecularLOD}set linearSpecularLOD(e){this._texture&&(this._texture._linearSpecularLOD=e)}get irradianceTexture(){return this._texture?this._texture._irradianceTexture:null}set irradianceTexture(e){this._texture&&(this._texture._irradianceTexture=e)}get uid(){return this._uid||(this._uid=(0,ec.RandomGUID)()),this._uid}toString(){return this.name}getClassName(){return"BaseTexture"}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}get isBlocking(){return!0}get loadingError(){return this._loadingError}get errorObject(){return this._errorObject}constructor(e,t=null){super(null),this.uniqueId=((0,el.__runInitializers)(this,P),(0,el.__runInitializers)(this,C,void 0)),this.name=((0,el.__runInitializers)(this,v),(0,el.__runInitializers)(this,M,void 0)),this.displayName=((0,el.__runInitializers)(this,L),(0,el.__runInitializers)(this,U,void 0)),this.metadata=((0,el.__runInitializers)(this,F),(0,el.__runInitializers)(this,O,null)),this._internalMetadata=(0,el.__runInitializers)(this,y),this.reservedDataStore=null,this._hasAlpha=(0,el.__runInitializers)(this,w,!1),this._getAlphaFromRGB=((0,el.__runInitializers)(this,N),(0,el.__runInitializers)(this,B,!1)),this.level=((0,el.__runInitializers)(this,X),(0,el.__runInitializers)(this,z,1)),this._coordinatesIndex=((0,el.__runInitializers)(this,G),(0,el.__runInitializers)(this,k,0)),this.optimizeUVAllocation=((0,el.__runInitializers)(this,V),(0,el.__runInitializers)(this,W,!0)),this._coordinatesMode=((0,el.__runInitializers)(this,H),(0,el.__runInitializers)(this,Y,0)),this.wrapR=((0,el.__runInitializers)(this,q),(0,el.__runInitializers)(this,Z,1)),this.anisotropicFilteringLevel=((0,el.__runInitializers)(this,j),(0,el.__runInitializers)(this,K,en.DEFAULT_ANISOTROPIC_FILTERING_LEVEL)),this._isCube=((0,el.__runInitializers)(this,Q),!1),this._gammaSpace=!0,this.invertZ=(0,el.__runInitializers)(this,$,!1),this.lodLevelInAlpha=((0,el.__runInitializers)(this,J),(0,el.__runInitializers)(this,ee,!1)),this._dominantDirection=((0,el.__runInitializers)(this,et),null),this.isRenderTarget=(0,el.__runInitializers)(this,ei,!1),this._prefiltered=((0,el.__runInitializers)(this,er),!1),this._forceSerialize=!1,this.animations=[],this.onDisposeObservable=new eh.Observable,this._onDisposeObserver=null,this._scene=null,this._uid=null,this._parentContainer=null,this._loadingError=!1,e?en._IsScene(e)?this._scene=e:this._engine=e:this._scene=eu.EngineStore.LastCreatedScene,this._scene&&(this.uniqueId=this._scene.getUniqueId(),this._scene.addTexture(this),this._engine=this._scene.getEngine()),this._texture=t,this._uid=null}getScene(){return this._scene}_getEngine(){return this._engine}getTextureMatrix(){return e_.Matrix.IdentityReadOnly}getReflectionTextureMatrix(){return e_.Matrix.IdentityReadOnly}getRefractionTextureMatrix(){return this.getReflectionTextureMatrix()}isReadyOrNotBlocking(){return!this.isBlocking||this.isReady()||this.loadingError}scale(e){}get canRescale(){return!1}_getFromCache(e,t,i,r,s,n){let a=this._getEngine();if(!a)return null;let l=a._getUseSRGBBuffer(!!s,t),o=a.getLoadedTexturesCache();for(let a=0;a<o.length;a++){let h=o[a];if((void 0===s||l===h._useSRGBBuffer)&&(void 0===r||r===h.invertY)&&h.url===e&&!t===h.generateMipMaps&&(!i||i===h.samplingMode)&&(void 0===n||n===h.isCube))return h.incrementReferences(),h}return null}_rebuild(e=!1){}clone(){return null}get textureType(){return this._texture&&void 0!==this._texture.type?this._texture.type:0}get textureFormat(){return this._texture&&void 0!==this._texture.format?this._texture.format:5}_markAllSubMeshesAsTexturesDirty(){let e=this.getScene();e&&e.markAllMaterialsAsDirty(1)}readPixels(e=0,t=0,i=null,r=!0,s=!1,n=0,a=0,l=Number.MAX_VALUE,o=Number.MAX_VALUE){if(!this._texture)return null;let h=this._getEngine();if(!h)return null;let _=this.getSize(),u=_.width,c=_.height;0!==t&&(u/=Math.pow(2,t),c/=Math.pow(2,t),u=Math.round(u),c=Math.round(c)),l=Math.min(u,l),o=Math.min(c,o);try{if(this._texture.isCube||this._texture.is2DArray)return h._readTexturePixels(this._texture,l,o,e,t,i,r,s,n,a);return h._readTexturePixels(this._texture,l,o,-1,t,i,r,s,n,a)}catch(e){return null}}_readPixelsSync(e=0,t=0,i=null,r=!0,s=!1){if(!this._texture)return null;let n=this.getSize(),a=n.width,l=n.height,o=this._getEngine();if(!o)return null;0!=t&&(a/=Math.pow(2,t),l/=Math.pow(2,t),a=Math.round(a),l=Math.round(l));try{if(this._texture.isCube)return o._readTexturePixelsSync(this._texture,a,l,e,t,i,r,s);return o._readTexturePixelsSync(this._texture,a,l,-1,t,i,r,s)}catch(e){return null}}get _lodTextureHigh(){return this._texture?this._texture._lodTextureHigh:null}get _lodTextureMid(){return this._texture?this._texture._lodTextureMid:null}get _lodTextureLow(){return this._texture?this._texture._lodTextureLow:null}dispose(){if(this._scene){this._scene.stopAnimation&&this._scene.stopAnimation(this),this._scene.removePendingData(this);let e=this._scene.textures.indexOf(this);if(e>=0&&this._scene.textures.splice(e,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null,this._parentContainer){let e=this._parentContainer.textures.indexOf(this);e>-1&&this._parentContainer.textures.splice(e,1),this._parentContainer=null}}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.metadata=null,super.dispose()}serialize(e=!1){if(!this.name&&!e)return null;let t=eE.SerializationHelper.Serialize(this);return eE.SerializationHelper.AppendSerializedAnimations(this,t),t}static WhenAllReady(e,t){let i=e.length;if(0===i)return void t();for(let r=0;r<e.length;r++){let s=e[r];if(s.isReady())0==--i&&t();else{let e=s.onLoadObservable;e?e.addOnce(()=>{0==--i&&t()}):0==--i&&t()}}}static _IsScene(e){return"Scene"===e.getClassName()}},es="function"==typeof Symbol&&Symbol.metadata?Object.create(I[Symbol.metadata]??null):void 0,t=[(0,eo.serialize)()],i=[(0,eo.serialize)()],r=[(0,eo.serialize)()],s=[(0,eo.serialize)()],n=[(0,eo.serialize)("hasAlpha")],a=[(0,eo.serialize)("getAlphaFromRGB")],l=[(0,eo.serialize)()],o=[(0,eo.serialize)("coordinatesIndex")],h=[(0,eo.serialize)()],_=[(0,eo.serialize)("coordinatesMode")],u=[(0,eo.serialize)()],c=[(0,eo.serialize)()],d=[(0,eo.serialize)()],E=[(0,eo.serialize)()],g=[(0,eo.serialize)()],m=[(0,eo.serialize)()],T=[(0,eo.serialize)()],p=[(0,eo.serialize)()],R=[(0,eo.serialize)()],f=[(0,eo.serialize)()],A=[(0,eo.serialize)()],x=[(0,eo.serialize)()],b=[(0,eo.serialize)()],S=[(0,eo.serializeAsTexture)()],D=[(0,eo.serialize)()],(0,el.__esDecorate)(en,null,u,{kind:"getter",name:"wrapU",static:!1,private:!1,access:{has:e=>"wrapU"in e,get:e=>e.wrapU},metadata:es},null,P),(0,el.__esDecorate)(en,null,c,{kind:"getter",name:"wrapV",static:!1,private:!1,access:{has:e=>"wrapV"in e,get:e=>e.wrapV},metadata:es},null,P),(0,el.__esDecorate)(en,null,g,{kind:"getter",name:"isCube",static:!1,private:!1,access:{has:e=>"isCube"in e,get:e=>e.isCube},metadata:es},null,P),(0,el.__esDecorate)(en,null,m,{kind:"getter",name:"is3D",static:!1,private:!1,access:{has:e=>"is3D"in e,get:e=>e.is3D},metadata:es},null,P),(0,el.__esDecorate)(en,null,T,{kind:"getter",name:"is2DArray",static:!1,private:!1,access:{has:e=>"is2DArray"in e,get:e=>e.is2DArray},metadata:es},null,P),(0,el.__esDecorate)(en,null,p,{kind:"getter",name:"gammaSpace",static:!1,private:!1,access:{has:e=>"gammaSpace"in e,get:e=>e.gammaSpace},metadata:es},null,P),(0,el.__esDecorate)(en,null,A,{kind:"getter",name:"lodGenerationOffset",static:!1,private:!1,access:{has:e=>"lodGenerationOffset"in e,get:e=>e.lodGenerationOffset},metadata:es},null,P),(0,el.__esDecorate)(en,null,x,{kind:"getter",name:"lodGenerationScale",static:!1,private:!1,access:{has:e=>"lodGenerationScale"in e,get:e=>e.lodGenerationScale},metadata:es},null,P),(0,el.__esDecorate)(en,null,b,{kind:"getter",name:"linearSpecularLOD",static:!1,private:!1,access:{has:e=>"linearSpecularLOD"in e,get:e=>e.linearSpecularLOD},metadata:es},null,P),(0,el.__esDecorate)(en,null,S,{kind:"getter",name:"irradianceTexture",static:!1,private:!1,access:{has:e=>"irradianceTexture"in e,get:e=>e.irradianceTexture},metadata:es},null,P),(0,el.__esDecorate)(null,null,t,{kind:"field",name:"uniqueId",static:!1,private:!1,access:{has:e=>"uniqueId"in e,get:e=>e.uniqueId,set:(e,t)=>{e.uniqueId=t}},metadata:es},C,v),(0,el.__esDecorate)(null,null,i,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:es},M,L),(0,el.__esDecorate)(null,null,r,{kind:"field",name:"displayName",static:!1,private:!1,access:{has:e=>"displayName"in e,get:e=>e.displayName,set:(e,t)=>{e.displayName=t}},metadata:es},U,F),(0,el.__esDecorate)(null,null,s,{kind:"field",name:"metadata",static:!1,private:!1,access:{has:e=>"metadata"in e,get:e=>e.metadata,set:(e,t)=>{e.metadata=t}},metadata:es},O,y),(0,el.__esDecorate)(null,null,n,{kind:"field",name:"_hasAlpha",static:!1,private:!1,access:{has:e=>"_hasAlpha"in e,get:e=>e._hasAlpha,set:(e,t)=>{e._hasAlpha=t}},metadata:es},w,N),(0,el.__esDecorate)(null,null,a,{kind:"field",name:"_getAlphaFromRGB",static:!1,private:!1,access:{has:e=>"_getAlphaFromRGB"in e,get:e=>e._getAlphaFromRGB,set:(e,t)=>{e._getAlphaFromRGB=t}},metadata:es},B,X),(0,el.__esDecorate)(null,null,l,{kind:"field",name:"level",static:!1,private:!1,access:{has:e=>"level"in e,get:e=>e.level,set:(e,t)=>{e.level=t}},metadata:es},z,G),(0,el.__esDecorate)(null,null,o,{kind:"field",name:"_coordinatesIndex",static:!1,private:!1,access:{has:e=>"_coordinatesIndex"in e,get:e=>e._coordinatesIndex,set:(e,t)=>{e._coordinatesIndex=t}},metadata:es},k,V),(0,el.__esDecorate)(null,null,h,{kind:"field",name:"optimizeUVAllocation",static:!1,private:!1,access:{has:e=>"optimizeUVAllocation"in e,get:e=>e.optimizeUVAllocation,set:(e,t)=>{e.optimizeUVAllocation=t}},metadata:es},W,H),(0,el.__esDecorate)(null,null,_,{kind:"field",name:"_coordinatesMode",static:!1,private:!1,access:{has:e=>"_coordinatesMode"in e,get:e=>e._coordinatesMode,set:(e,t)=>{e._coordinatesMode=t}},metadata:es},Y,q),(0,el.__esDecorate)(null,null,d,{kind:"field",name:"wrapR",static:!1,private:!1,access:{has:e=>"wrapR"in e,get:e=>e.wrapR,set:(e,t)=>{e.wrapR=t}},metadata:es},Z,j),(0,el.__esDecorate)(null,null,E,{kind:"field",name:"anisotropicFilteringLevel",static:!1,private:!1,access:{has:e=>"anisotropicFilteringLevel"in e,get:e=>e.anisotropicFilteringLevel,set:(e,t)=>{e.anisotropicFilteringLevel=t}},metadata:es},K,Q),(0,el.__esDecorate)(null,null,R,{kind:"field",name:"invertZ",static:!1,private:!1,access:{has:e=>"invertZ"in e,get:e=>e.invertZ,set:(e,t)=>{e.invertZ=t}},metadata:es},$,J),(0,el.__esDecorate)(null,null,f,{kind:"field",name:"lodLevelInAlpha",static:!1,private:!1,access:{has:e=>"lodLevelInAlpha"in e,get:e=>e.lodLevelInAlpha,set:(e,t)=>{e.lodLevelInAlpha=t}},metadata:es},ee,et),(0,el.__esDecorate)(null,null,D,{kind:"field",name:"isRenderTarget",static:!1,private:!1,access:{has:e=>"isRenderTarget"in e,get:e=>e.isRenderTarget,set:(e,t)=>{e.isRenderTarget=t}},metadata:es},ei,er),es&&Object.defineProperty(en,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:es}),en.DEFAULT_ANISOTROPIC_FILTERING_LEVEL=4,en);(ea=em.prototype).forceSphericalPolynomialsRecompute??(ea.forceSphericalPolynomialsRecompute=(0,eg._MissingSideEffect)("BaseTexture","forceSphericalPolynomialsRecompute")),Object.getOwnPropertyDescriptor(em.prototype,"sphericalPolynomial")||Object.defineProperty(em.prototype,"sphericalPolynomial",(0,eg._MissingSideEffectProperty)("BaseTexture","sphericalPolynomial")),e.s(["BaseTexture",0,em],79452)},19696,e=>{"use strict";e.s(["Size",0,class e{constructor(e,t){this.width=e,this.height=t}toString(){return`{W: ${this.width}, H: ${this.height}}`}getClassName(){return"Size"}getHashCode(){let e=0|this.width;return 397*e^this.height}copyFrom(e){this.width=e.width,this.height=e.height}copyFromFloats(e,t){return this.width=e,this.height=t,this}set(e,t){return this.copyFromFloats(e,t)}multiplyByFloats(t,i){return new e(this.width*t,this.height*i)}clone(){return new e(this.width,this.height)}equals(e){return!!e&&this.width===e.width&&this.height===e.height}get surface(){return this.width*this.height}static Zero(){return new e(0,0)}add(t){return new e(this.width+t.width,this.height+t.height)}subtract(t){return new e(this.width-t.width,this.height-t.height)}scale(t){return new e(this.width*t,this.height*t)}static Lerp(t,i,r){return new e(t.width+(i.width-t.width)*r,t.height+(i.height-t.height)*r)}}])},39913,e=>{"use strict";var t=e.i(63391);class i{get min(){return this._min}get max(){return this._max}get average(){return this._average}get lastSecAverage(){return this._lastSecAverage}get current(){return this._current}get total(){return this._totalAccumulated}get count(){return this._totalValueCount}constructor(){this._startMonitoringTime=0,this._min=0,this._max=0,this._hasResult=!1,this._hasCurrentValue=!1,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}fetchNewFrame(){this._totalValueCount++,this._current=0,this._hasCurrentValue=i.Enabled,this._lastSecValueCount++}addCount(e,t){i.Enabled&&(this._current+=e,this._hasCurrentValue=!0,t&&this._fetchResult())}beginMonitoring(){i.Enabled&&(this._startMonitoringTime=t.PrecisionDate.Now)}endMonitoring(e=!0){if(!i.Enabled)return;e&&this.fetchNewFrame();let r=t.PrecisionDate.Now;this._current=r-this._startMonitoringTime,this._hasCurrentValue=!0,e&&this._fetchResult()}endFrame(){this._fetchResult()}_fetchResult(){if(!this._hasCurrentValue)return;this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._hasResult?(this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current)):(this._min=this._current,this._max=this._current,this._hasResult=!0),this._average=this._totalAccumulated/this._totalValueCount;let e=t.PrecisionDate.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)}}i.Enabled=!0,e.s(["PerfCounter",0,i])},25804,51671,e=>{"use strict";var t=e.i(63391);class i{constructor(e){this._samples=Array(e),this.reset()}add(e){let t;if(this.isSaturated()){let e=this._samples[this._pos];t=e-this.average,this.average-=t/(this._sampleCount-1),this._m2-=t*(e-this.average)}else this._sampleCount++;t=e-this.average,this.average+=t/this._sampleCount,this._m2+=t*(e-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=e,this._pos++,this._pos%=this._samples.length}history(e){if(e>=this._sampleCount||e>=this._samples.length)return 0;let t=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(t-e)]}isSaturated(){return this._sampleCount>=this._samples.length}reset(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0}_wrapPosition(e){let t=this._samples.length;return(e%t+t)%t}}e.s(["PerformanceMonitor",0,class{constructor(e=30){this._enabled=!0,this._rollingFrameTime=new i(e)}sampleFrame(e=t.PrecisionDate.Now){if(this._enabled){if(null!=this._lastFrameTimeMs){let t=e-this._lastFrameTimeMs;this._rollingFrameTime.add(t)}this._lastFrameTimeMs=e}}get averageFrameTime(){return this._rollingFrameTime.average}get averageFrameTimeVariance(){return this._rollingFrameTime.variance}get instantaneousFrameTime(){return this._rollingFrameTime.history(0)}get averageFPS(){return 1e3/this._rollingFrameTime.average}get instantaneousFPS(){let e=this._rollingFrameTime.history(0);return 0===e?0:1e3/e}get isSaturated(){return this._rollingFrameTime.isSaturated()}enable(){this._enabled=!0}disable(){this._enabled=!1,this._lastFrameTimeMs=null}get isEnabled(){return this._enabled}reset(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()}}],25804);var r=e.i(7484),s=e.i(99429),n=e.i(72986);function a(e){return Number.isFinite(e.ascent)&&Number.isFinite(e.height)&&Number.isFinite(e.descent)&&e.height>0}async function l(e,t,i){return await new Promise((r,s)=>{let n=new Image;n.onload=()=>{n.decode().then(()=>{e.createImageBitmap(n,i).then(e=>{r(e)})})},n.onerror=()=>{s(`Error loading image ${n.src}`)},n.src=t})}function o(e){if(e.requestPointerLock){let t=e.requestPointerLock();t instanceof Promise?t.then(()=>{e.focus()}).catch(()=>{}):e.focus()}}e.s(["CreateImageBitmapFromSource",0,l,"ExitFullscreen",0,function(){let e=document;document.exitFullscreen?document.exitFullscreen():e.webkitCancelFullScreen&&e.webkitCancelFullScreen()},"ExitPointerlock",0,function(){document.exitPointerLock&&document.exitPointerLock()},"GetFontOffset",0,function(e){var t;let i,s,n,l,o=function(e){let t,i;if(!(0,r.IsDocumentAvailable)()||!document.body)return null;let s=document.createElement("span");s.textContent="Hg",s.style.font=e;let n=document.createElement("div");n.style.display="inline-block",n.style.width="1px",n.style.height="0px",n.style.verticalAlign="bottom";let l=document.createElement("div");l.style.whiteSpace="nowrap",l.appendChild(s),l.appendChild(n),document.body.appendChild(l);try{i=n.getBoundingClientRect().top-s.getBoundingClientRect().top,n.style.verticalAlign="baseline",t=n.getBoundingClientRect().top-s.getBoundingClientRect().top}finally{document.body.removeChild(l)}let o={ascent:t,height:i,descent:i-t};return a(o)?o:null}(e);if(o)return o;let h=function(e){let t=null;try{"u">typeof OffscreenCanvas?t=new OffscreenCanvas(64,64):(0,r.IsDocumentAvailable)()&&"function"==typeof document.createElement&&((t=document.createElement("canvas")).width=64,t.height=64);let i=t?.getContext("2d");if(!i)return null;i.font=e;let s=i.measureText("Hg"),n=Number(s.actualBoundingBoxAscent??s.fontBoundingBoxAscent),l=Number(s.actualBoundingBoxDescent??s.fontBoundingBoxDescent),o={ascent:n,height:n+l,descent:l};return a(o)?o:null}catch{return null}finally{let e=t;"function"==typeof e?.dispose&&e.dispose()}}(e);return h||(n=.8*(s=Math.max(1,(t=e,(i=/(?:^|\s)([0-9]+(?:\.[0-9]+)?)px(?:\/|\s|$)/.exec(String(t||"")))?Number(i[1]):16))),{ascent:n,height:n+(l=.2*s),descent:l})},"RequestFullscreen",0,function(e){let t=e.requestFullscreen||e.webkitRequestFullscreen;t&&t.call(e)},"RequestPointerlock",0,o,"ResizeImageBitmap",0,function(e,t,i,r){let s=e.createCanvas(i,r).getContext("2d");if(!s)throw Error("Unable to get 2d context for resizeImageBitmap");return s.drawImage(t,0,0),s.getImageData(0,0,i,r).data},"_CommonDispose",0,function(e,t){1===n.EngineStore.Instances.length&&s.AbstractEngine.audioEngine&&(s.AbstractEngine.audioEngine.dispose(),s.AbstractEngine.audioEngine=null);let i=e.getHostWindow();i&&"function"==typeof i.removeEventListener&&(i.removeEventListener("blur",e._onBlur),i.removeEventListener("focus",e._onFocus)),t&&(t.removeEventListener("focus",e._onCanvasFocus),t.removeEventListener("blur",e._onCanvasBlur),t.removeEventListener("pointerout",e._onCanvasPointerOut),t.removeEventListener("contextmenu",e._onCanvasContextMenu)),(0,r.IsDocumentAvailable)()&&(document.removeEventListener("fullscreenchange",e._onFullscreenChange),document.removeEventListener("mozfullscreenchange",e._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",e._onFullscreenChange),document.removeEventListener("msfullscreenchange",e._onFullscreenChange),document.removeEventListener("pointerlockchange",e._onPointerLockChange),document.removeEventListener("mspointerlockchange",e._onPointerLockChange),document.removeEventListener("mozpointerlockchange",e._onPointerLockChange),document.removeEventListener("webkitpointerlockchange",e._onPointerLockChange))},"_CommonInit",0,function(e,t,i){e._onCanvasFocus=()=>{e.onCanvasFocusObservable.notifyObservers(e)},e._onCanvasBlur=()=>{e.onCanvasBlurObservable.notifyObservers(e)},e._onCanvasContextMenu=t=>{e.disableContextMenu&&t.preventDefault()},t.addEventListener("focus",e._onCanvasFocus),t.addEventListener("blur",e._onCanvasBlur),t.addEventListener("contextmenu",e._onCanvasContextMenu),e._onBlur=()=>{e.disablePerformanceMonitorInBackground&&e.performanceMonitor.disable(),e._windowIsBackground=!0},e._onFocus=()=>{e.disablePerformanceMonitorInBackground&&e.performanceMonitor.enable(),e._windowIsBackground=!1},e._onCanvasPointerOut=i=>{document.elementFromPoint(i.clientX,i.clientY)!==t&&e.onCanvasPointerOutObservable.notifyObservers(i)};let n=e.getHostWindow();n&&"function"==typeof n.addEventListener&&(n.addEventListener("blur",e._onBlur),n.addEventListener("focus",e._onFocus)),t.addEventListener("pointerout",e._onCanvasPointerOut),!i.doNotHandleTouchAction&&t&&t.setAttribute&&(t.setAttribute("touch-action","none"),t.style.touchAction="none",t.style.webkitTapHighlightColor="transparent"),!s.AbstractEngine.audioEngine&&i.audioEngine&&s.AbstractEngine.AudioEngineFactory&&(s.AbstractEngine.audioEngine=s.AbstractEngine.AudioEngineFactory(e.getRenderingCanvas(),e.getAudioContext(),e.getAudioDestination())),(0,r.IsDocumentAvailable)()&&(e._onFullscreenChange=()=>{e.isFullscreen=!!document.fullscreenElement,e.isFullscreen&&e._pointerLockRequested&&t&&o(t)},document.addEventListener("fullscreenchange",e._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",e._onFullscreenChange,!1),e._onPointerLockChange=()=>{e.isPointerLock=document.pointerLockElement===t},document.addEventListener("pointerlockchange",e._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",e._onPointerLockChange,!1)),e.enableOfflineSupport=void 0!==s.AbstractEngine.OfflineProviderFactory,e._deterministicLockstep=!!i.deterministicLockstep,e._lockstepMaxSteps=i.lockstepMaxSteps||0,e._timeStep=i.timeStep||1/60}],51671)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,64873,t=>{"use strict";var e=t.i(20552),o=t.i(97009),i=t.i(99493);class s extends e.FlowGraphExecutionBlockWithOutSignal{constructor(t){super(t),this.body=this.registerDataInput("body",o.RichTypeAny),this.motionType=this.registerDataInput("motionType",o.RichTypeNumber,2)}_execute(t,e){let o=this.body.getValue(t);if(!o){this._reportError(t,"No physics body provided"),this.out._activateSignal(t);return}o.setMotionType(this.motionType.getValue(t)),this.out._activateSignal(t)}getClassName(){return"FlowGraphSetPhysicsMotionTypeBlock"}}let r=!1;function c(){r||(r=!0,(0,i.RegisterClass)("FlowGraphSetPhysicsMotionTypeBlock",s))}t.s(["FlowGraphSetPhysicsMotionTypeBlock",0,s,"RegisterFlowGraphSetPhysicsMotionTypeBlock",0,c],61770),c(),t.s([],96212),t.i(96212),t.i(61770),t.s(["FlowGraphSetPhysicsMotionTypeBlock",0,s],64873)}]);
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55880,e=>{"use strict";var r=e.i(47150);let t="helperFunctions",a=`const PI: f32=3.1415926535897932384626433832795;const TWO_PI: f32=6.283185307179586;const HALF_PI: f32=1.5707963267948966;const RECIPROCAL_PI: f32=0.3183098861837907;const RECIPROCAL_PI2: f32=0.15915494309189535;const RECIPROCAL_PI4: f32=0.07957747154594767;const HALF_MIN: f32=5.96046448e-08;
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35551,e=>{"use strict";var r=e.i(2342);let t="helperFunctions",a=`const PI: f32=3.1415926535897932384626433832795;const TWO_PI: f32=6.283185307179586;const HALF_PI: f32=1.5707963267948966;const RECIPROCAL_PI: f32=0.3183098861837907;const RECIPROCAL_PI2: f32=0.15915494309189535;const RECIPROCAL_PI4: f32=0.07957747154594767;const HALF_MIN: f32=5.96046448e-08;
2
2
  const LinearEncodePowerApprox: f32=2.2;const GammaEncodePowerApprox: f32=1.0/LinearEncodePowerApprox;const LuminanceEncodeApprox: vec3f=vec3f(0.2126,0.7152,0.0722);const Epsilon:f32=0.0000001;fn square(x: f32)->f32 {return x*x;}
3
3
  fn saturate(x: f32)->f32 {return clamp(x,0.0,1.0);}
4
4
  fn saturateVec3(x: vec3f)->vec3f {return clamp(x,vec3f(),vec3f(1.0));}
@@ -84,7 +84,7 @@ fn max3(v: vec3f)->f32 {return max(v.x,max(v.y,v.z));}
84
84
  fn uint2float(i: u32)->f32 {return bitcast<f32>(0x3F800000u | (i>>9u))-1.0;}
85
85
  fn plasticSequence(rstate: u32)->vec2f {return vec2f(uint2float(rstate*3242174889u),
86
86
  uint2float(rstate*2447445414u));}
87
- `;r.ShaderStore.IncludesShadersStoreWGSL[t]||(r.ShaderStore.IncludesShadersStoreWGSL[t]=a),e.s(["helperFunctionsWGSL",0,{name:t,shader:a}])},66860,e=>{"use strict";var r=e.i(47150),t=e.i(55880);let a="rgbdEncodePixelShader",c=`varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
87
+ `;r.ShaderStore.IncludesShadersStoreWGSL[t]||(r.ShaderStore.IncludesShadersStoreWGSL[t]=a),e.s(["helperFunctionsWGSL",0,{name:t,shader:a}])},47481,e=>{"use strict";var r=e.i(2342),t=e.i(35551);let a="rgbdEncodePixelShader",c=`varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
88
88
  #include<helperFunctions>
89
89
  #define CUSTOM_FRAGMENT_DEFINITIONS
90
90
  @fragment
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22140,t=>{"use strict";var i=t.i(62478),e=t.i(75105),n=t.i(32304),s=t.i(44520);class l extends i.FlowGraphExecutionBlockWithOutSignal{constructor(t){super(t),this.config=t,this.inFlows=[],this._cachedActivationState=[],this.reset=this._registerSignalInput("reset"),this.completed=this._registerSignalOutput("completed"),this.remainingInputs=this.registerDataOutput("remainingInputs",e.RichTypeFlowGraphInteger,new n.FlowGraphInteger(this.config.inputSignalCount||0));for(let t=0;t<this.config.inputSignalCount;t++)this.inFlows.push(this._registerSignalInput(`in_${t}`));this._unregisterSignalInput("in")}_getCurrentActivationState(t){let i=this._cachedActivationState;if(i.length=0,t._hasExecutionVariable(this,"activationState")){let e=t._getExecutionVariable(this,"activationState",[]);for(let t=0;t<e.length;t++)i.push(e[t])}else for(let t=0;t<this.config.inputSignalCount;t++)i.push(!1);return i}_execute(t,i){let e=this._getCurrentActivationState(t);if(i===this.reset)for(let t=0;t<this.config.inputSignalCount;t++)e[t]=!1;else{let t=this.inFlows.indexOf(i);t>=0&&(e[t]=!0)}if(this.remainingInputs.setValue(new n.FlowGraphInteger(e.filter(t=>!t).length),t),t._setExecutionVariable(this,"activationState",e.slice()),e.includes(!1))i!==this.reset&&this.out._activateSignal(t);else{this.completed._activateSignal(t);for(let t=0;t<this.config.inputSignalCount;t++)e[t]=!1}}getClassName(){return"FlowGraphWaitAllBlock"}serialize(t){super.serialize(t),t.config.inputFlows=this.config.inputSignalCount}}let a=!1;function o(){a||(a=!0,(0,s.RegisterClass)("FlowGraphWaitAllBlock",l))}t.s(["FlowGraphWaitAllBlock",0,l,"RegisterFlowGraphWaitAllBlock",0,o],2626),o(),t.s([],4594),t.i(4594),t.i(2626),t.s(["FlowGraphWaitAllBlock",0,l],22140)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,51070,t=>{"use strict";var i=t.i(20552),e=t.i(97009),n=t.i(59012),s=t.i(99493);class l extends i.FlowGraphExecutionBlockWithOutSignal{constructor(t){super(t),this.config=t,this.inFlows=[],this._cachedActivationState=[],this.reset=this._registerSignalInput("reset"),this.completed=this._registerSignalOutput("completed"),this.remainingInputs=this.registerDataOutput("remainingInputs",e.RichTypeFlowGraphInteger,new n.FlowGraphInteger(this.config.inputSignalCount||0));for(let t=0;t<this.config.inputSignalCount;t++)this.inFlows.push(this._registerSignalInput(`in_${t}`));this._unregisterSignalInput("in")}_getCurrentActivationState(t){let i=this._cachedActivationState;if(i.length=0,t._hasExecutionVariable(this,"activationState")){let e=t._getExecutionVariable(this,"activationState",[]);for(let t=0;t<e.length;t++)i.push(e[t])}else for(let t=0;t<this.config.inputSignalCount;t++)i.push(!1);return i}_execute(t,i){let e=this._getCurrentActivationState(t);if(i===this.reset)for(let t=0;t<this.config.inputSignalCount;t++)e[t]=!1;else{let t=this.inFlows.indexOf(i);t>=0&&(e[t]=!0)}if(this.remainingInputs.setValue(new n.FlowGraphInteger(e.filter(t=>!t).length),t),t._setExecutionVariable(this,"activationState",e.slice()),e.includes(!1))i!==this.reset&&this.out._activateSignal(t);else{this.completed._activateSignal(t);for(let t=0;t<this.config.inputSignalCount;t++)e[t]=!1}}getClassName(){return"FlowGraphWaitAllBlock"}serialize(t){super.serialize(t),t.config.inputFlows=this.config.inputSignalCount}}let a=!1;function o(){a||(a=!0,(0,s.RegisterClass)("FlowGraphWaitAllBlock",l))}t.s(["FlowGraphWaitAllBlock",0,l,"RegisterFlowGraphWaitAllBlock",0,o],59426),o(),t.s([],39277),t.i(39277),t.i(59426),t.s(["FlowGraphWaitAllBlock",0,l],51070)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54380,t=>{"use strict";var e=t.i(57011),s=t.i(97009),i=t.i(5573),r=t.i(99493);class n extends e.FlowGraphEventBlock{constructor(t){super(t),this.type="PointerOut",this.pointerId=this.registerDataOutput("pointerId",s.RichTypeNumber),this.targetMesh=this.registerDataInput("targetMesh",s.RichTypeAny,t?.targetMesh),this.meshOutOfPointer=this.registerDataOutput("meshOutOfPointer",s.RichTypeAny)}_executeEvent(t,e){let s=this.targetMesh.getValue(t);return this.meshOutOfPointer.setValue(e.mesh,t),this.pointerId.setValue(e.pointerId,t),!(!(e.over&&(0,i._IsDescendantOf)(e.mesh,s))&&(e.mesh===s||(0,i._IsDescendantOf)(e.mesh,s)))||(this._execute(t),!this.config?.stopPropagation)}_preparePendingTasks(t){}_cancelPendingTasks(t){}getClassName(){return"FlowGraphPointerOutEventBlock"}}let o=!1;function h(){o||(o=!0,(0,r.RegisterClass)("FlowGraphPointerOutEventBlock",n))}t.s(["FlowGraphPointerOutEventBlock",0,n,"RegisterFlowGraphPointerOutEventBlock",0,h],18816),h(),t.s([],23066),t.i(23066),t.i(18816),t.s(["FlowGraphPointerOutEventBlock",0,n],54380)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41189,e=>{"use strict";var t=e.i(17884),i=e.i(75105),r=e.i(32304),s=e.i(44520);class a extends t.FlowGraphBlock{constructor(e){super(e),this.config=e,this.object=this.registerDataInput("object",i.RichTypeAny),this.array=this.registerDataInput("array",i.RichTypeAny),this.index=this.registerDataOutput("index",i.RichTypeFlowGraphInteger,new r.FlowGraphInteger(-1))}_updateOutputs(e){let t=this.object.getValue(e),i=this.array.getValue(e);i&&this.index.setValue(new r.FlowGraphInteger(i.indexOf(t)),e)}serialize(e){super.serialize(e)}getClassName(){return"FlowGraphIndexOfBlock"}}let l=!1;function o(){l||(l=!0,(0,s.RegisterClass)("FlowGraphIndexOfBlock",a))}e.s(["FlowGraphIndexOfBlock",0,a,"RegisterFlowGraphIndexOfBlock",0,o],49483),o(),e.s([],95808),e.i(95808),e.i(49483),e.s(["FlowGraphIndexOfBlock",0,a],41189)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,86549,e=>{"use strict";var t=e.i(37096),i=e.i(97009),r=e.i(59012),s=e.i(99493);class a extends t.FlowGraphBlock{constructor(e){super(e),this.config=e,this.object=this.registerDataInput("object",i.RichTypeAny),this.array=this.registerDataInput("array",i.RichTypeAny),this.index=this.registerDataOutput("index",i.RichTypeFlowGraphInteger,new r.FlowGraphInteger(-1))}_updateOutputs(e){let t=this.object.getValue(e),i=this.array.getValue(e);i&&this.index.setValue(new r.FlowGraphInteger(i.indexOf(t)),e)}serialize(e){super.serialize(e)}getClassName(){return"FlowGraphIndexOfBlock"}}let l=!1;function o(){l||(l=!0,(0,s.RegisterClass)("FlowGraphIndexOfBlock",a))}e.s(["FlowGraphIndexOfBlock",0,a,"RegisterFlowGraphIndexOfBlock",0,o],34632),o(),e.s([],73589),e.i(73589),e.i(34632),e.s(["FlowGraphIndexOfBlock",0,a],86549)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96138,t=>{"use strict";var i=t.i(75105),e=t.i(16347),n=t.i(79440),o=t.i(44520);class a extends n.FlowGraphAsyncExecutionBlock{constructor(t){super(t),this.animationGroup=this.registerDataInput("animationGroup",i.RichTypeAny),this.stopAtFrame=this.registerDataInput("stopAtFrame",i.RichTypeNumber,-1)}_preparePendingTasks(t){let i=this.animationGroup.getValue(t),e=this.stopAtFrame.getValue(t)??-1,n=t._getGlobalContextVariable("pendingStopAnimations",[]);n.push({uniqueId:i.uniqueId,stopAtFrame:e}),t._setGlobalContextVariable("pendingStopAnimations",n)}_cancelPendingTasks(t){let i=this.animationGroup.getValue(t),e=t._getGlobalContextVariable("pendingStopAnimations",[]);for(let n=0;n<e.length;n++)if(e[n].uniqueId===i.uniqueId){e.splice(n,1),t._setGlobalContextVariable("pendingStopAnimations",e);break}}_execute(t){let i=this.animationGroup.getValue(t),n=this.stopAtFrame.getValue(t)??-1;return i?isNaN(n)?this._reportError(t,"Invalid stop time."):void(n>0?this._startPendingTasks(t):this._stopAnimation(i,t),this.out._activateSignal(t)):(e.Logger.Warn("No animation group provided to stop."),this._reportError(t,"No animation group provided to stop."))}_executeOnTick(t){let i=this.animationGroup.getValue(t),e=t._getGlobalContextVariable("pendingStopAnimations",[]);for(let n=0;n<e.length;n++)if(e[n].uniqueId===i.uniqueId&&i.getCurrentFrame()>=e[n].stopAtFrame){this._stopAnimation(i,t),e.splice(n,1),t._setGlobalContextVariable("pendingStopAnimations",e),this.done._activateSignal(t),t._removePendingBlock(this);break}}getClassName(){return"FlowGraphStopAnimationBlock"}_stopAnimation(t,i){let e=i._getGlobalContextVariable("currentlyRunningAnimationGroups",[]),n=e.indexOf(t.uniqueId);-1!==n&&(t.stop(),e.splice(n,1),i._setGlobalContextVariable("currentlyRunningAnimationGroups",e))}}let r=!1;function s(){r||(r=!0,(0,o.RegisterClass)("FlowGraphStopAnimationBlock",a))}t.s(["FlowGraphStopAnimationBlock",0,a,"RegisterFlowGraphStopAnimationBlock",0,s],35329),s(),t.s([],71884),t.i(71884),t.i(35329),t.s(["FlowGraphStopAnimationBlock",0,a],96138)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,74418,t=>{"use strict";var i=t.i(97009),e=t.i(85789),n=t.i(60219),o=t.i(99493);class a extends n.FlowGraphAsyncExecutionBlock{constructor(t){super(t),this.animationGroup=this.registerDataInput("animationGroup",i.RichTypeAny),this.stopAtFrame=this.registerDataInput("stopAtFrame",i.RichTypeNumber,-1)}_preparePendingTasks(t){let i=this.animationGroup.getValue(t),e=this.stopAtFrame.getValue(t)??-1,n=t._getGlobalContextVariable("pendingStopAnimations",[]);n.push({uniqueId:i.uniqueId,stopAtFrame:e}),t._setGlobalContextVariable("pendingStopAnimations",n)}_cancelPendingTasks(t){let i=this.animationGroup.getValue(t),e=t._getGlobalContextVariable("pendingStopAnimations",[]);for(let n=0;n<e.length;n++)if(e[n].uniqueId===i.uniqueId){e.splice(n,1),t._setGlobalContextVariable("pendingStopAnimations",e);break}}_execute(t){let i=this.animationGroup.getValue(t),n=this.stopAtFrame.getValue(t)??-1;return i?isNaN(n)?this._reportError(t,"Invalid stop time."):void(n>0?this._startPendingTasks(t):this._stopAnimation(i,t),this.out._activateSignal(t)):(e.Logger.Warn("No animation group provided to stop."),this._reportError(t,"No animation group provided to stop."))}_executeOnTick(t){let i=this.animationGroup.getValue(t),e=t._getGlobalContextVariable("pendingStopAnimations",[]);for(let n=0;n<e.length;n++)if(e[n].uniqueId===i.uniqueId&&i.getCurrentFrame()>=e[n].stopAtFrame){this._stopAnimation(i,t),e.splice(n,1),t._setGlobalContextVariable("pendingStopAnimations",e),this.done._activateSignal(t),t._removePendingBlock(this);break}}getClassName(){return"FlowGraphStopAnimationBlock"}_stopAnimation(t,i){let e=i._getGlobalContextVariable("currentlyRunningAnimationGroups",[]),n=e.indexOf(t.uniqueId);-1!==n&&(t.stop(!0),e.splice(n,1),i._setGlobalContextVariable("currentlyRunningAnimationGroups",e))}}let r=!1;function s(){r||(r=!0,(0,o.RegisterClass)("FlowGraphStopAnimationBlock",a))}t.s(["FlowGraphStopAnimationBlock",0,a,"RegisterFlowGraphStopAnimationBlock",0,s],444),s(),t.s([],49814),t.i(49814),t.i(444),t.s(["FlowGraphStopAnimationBlock",0,a],74418)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81127,26801,e=>{"use strict";var t=e.i(85789),r=e.i(40379);class i{constructor(e,t,r=!1,i,a=!1,f){this._uniformNames=[],this._valueCache={},this._engine=e,this._noUBO=!e.supportsUniformBuffers||a,this._dynamic=r,this._name=i??"no-name",this._data=t||[],this._uniformLocations={},this._uniformSizes={},this._uniformArraySizes={},this._uniformLocationPointer=0,this._needSync=!1,this._trackUBOsInFrame=!1,(void 0===f&&this._engine._features.trackUbosInFrame||!0===f)&&(this._buffers=[],this._bufferIndex=-1,this._bufferUpdatedLastFrame=!1,this._createBufferOnWrite=!1,this._currentFrameId=0,this._trackUBOsInFrame=!0),this._noUBO?(this.updateMatrix3x3=this._updateMatrix3x3ForEffect,this.updateMatrix2x2=this._updateMatrix2x2ForEffect,this.updateFloat=this._updateFloatForEffect,this.updateFloat2=this._updateFloat2ForEffect,this.updateFloat3=this._updateFloat3ForEffect,this.updateFloat4=this._updateFloat4ForEffect,this.updateFloatArray=this._updateFloatArrayForEffect,this.updateArray=this._updateArrayForEffect,this.updateIntArray=this._updateIntArrayForEffect,this.updateUIntArray=this._updateUIntArrayForEffect,this.updateMatrix=this._updateMatrixForEffect,this.updateMatrices=this._updateMatricesForEffect,this.updateVector3=this._updateVector3ForEffect,this.updateVector4=this._updateVector4ForEffect,this.updateColor3=this._updateColor3ForEffect,this.updateColor4=this._updateColor4ForEffect,this.updateDirectColor4=this._updateDirectColor4ForEffect,this.updateInt=this._updateIntForEffect,this.updateInt2=this._updateInt2ForEffect,this.updateInt3=this._updateInt3ForEffect,this.updateInt4=this._updateInt4ForEffect,this.updateUInt=this._updateUIntForEffect,this.updateUInt2=this._updateUInt2ForEffect,this.updateUInt3=this._updateUInt3ForEffect,this.updateUInt4=this._updateUInt4ForEffect):(this._engine._uniformBuffers.push(this),this.updateMatrix3x3=this._updateMatrix3x3ForUniform,this.updateMatrix2x2=this._updateMatrix2x2ForUniform,this.updateFloat=this._updateFloatForUniform,this.updateFloat2=this._updateFloat2ForUniform,this.updateFloat3=this._updateFloat3ForUniform,this.updateFloat4=this._updateFloat4ForUniform,this.updateFloatArray=this._updateFloatArrayForUniform,this.updateArray=this._updateArrayForUniform,this.updateIntArray=this._updateIntArrayForUniform,this.updateUIntArray=this._updateUIntArrayForUniform,this.updateMatrix=this._updateMatrixForUniform,this.updateMatrices=this._updateMatricesForUniform,this.updateVector3=this._updateVector3ForUniform,this.updateVector4=this._updateVector4ForUniform,this.updateColor3=this._updateColor3ForUniform,this.updateColor4=this._updateColor4ForUniform,this.updateDirectColor4=this._updateDirectColor4ForUniform,this.updateInt=this._updateIntForUniform,this.updateInt2=this._updateInt2ForUniform,this.updateInt3=this._updateInt3ForUniform,this.updateInt4=this._updateInt4ForUniform,this.updateUInt=this._updateUIntForUniform,this.updateUInt2=this._updateUInt2ForUniform,this.updateUInt3=this._updateUInt3ForUniform,this.updateUInt4=this._updateUInt4ForUniform)}get useUbo(){return!this._noUBO}get isSync(){return!this._needSync}isDynamic(){return this._dynamic}getData(){return this._bufferData}getBuffer(){return this._buffer}getUniformNames(){return this._uniformNames}_fillAlignment(e){let t;if(t=e<=2?e:4,this._uniformLocationPointer%t!=0){let e=this._uniformLocationPointer;this._uniformLocationPointer+=t-this._uniformLocationPointer%t;let r=this._uniformLocationPointer-e;for(let e=0;e<r;e++)this._data.push(0)}}addUniform(e,t,r=0){let i;if((r>0&&"number"==typeof t&&(this._uniformArraySizes[e]={strideSize:t,arraySize:r}),void 0===this._uniformLocations[e])&&(this._uniformNames.push(e),!this._noUBO)){if(r>0){if(t instanceof Array)throw"addUniform should not be use with Array in UBO: "+e;if(this._fillAlignment(4),16==t)t*=r;else{let e=4-t;t=t*r+e*r}i=[];for(let e=0;e<t;e++)i.push(0)}else{if(t instanceof Array)t=(i=t).length;else{i=[];for(let e=0;e<t;e++)i.push(0)}this._fillAlignment(t)}this._uniformSizes[e]=t,this._uniformLocations[e]=this._uniformLocationPointer,this._uniformLocationPointer+=t;for(let e=0;e<t;e++)this._data.push(i[e]);this._needSync=!0}}addMatrix(e,t){this.addUniform(e,Array.prototype.slice.call(t.asArray()))}addFloat2(e,t,r){this.addUniform(e,[t,r])}addFloat3(e,t,r,i){this.addUniform(e,[t,r,i])}addColor3(e,t){let r=[t.r,t.g,t.b];this.addUniform(e,r)}addColor4(e,t,r){let i=[t.r,t.g,t.b,r];this.addUniform(e,i)}addVector3(e,t){let r=[t.x,t.y,t.z];this.addUniform(e,r)}addMatrix3x3(e){this.addUniform(e,12)}addMatrix2x2(e){this.addUniform(e,8)}create(){this._noUBO||this._buffer||(this._fillAlignment(4),this._bufferData=new Float32Array(this._data),this._rebuild(),this._needSync=!0)}_getNamesDebug(){let e=[],t=0;for(let r in this._uniformLocations)if(e.push(r),10==++t)break;return e.join(",")}_rebuild(){!this._noUBO&&this._bufferData&&(this._dynamic?this._buffer=this._engine.createDynamicUniformBuffer(this._bufferData,this._name+"_UniformList:"+this._getNamesDebug()):this._buffer=this._engine.createUniformBuffer(this._bufferData,this._name+"_UniformList:"+this._getNamesDebug()),this._trackUBOsInFrame&&(this._buffers.push([this._buffer,this._engine._features.checkUbosContentBeforeUpload?this._bufferData.slice():void 0]),this._bufferIndex=this._buffers.length-1,this._createBufferOnWrite=!1))}_rebuildAfterContextLost(){this._trackUBOsInFrame&&(this._buffers=[],this._currentFrameId=0),this._rebuild()}get _numBuffers(){return this._buffers.length}get _indexBuffer(){return this._bufferIndex}get name(){return this._name}set name(e){this._name=e}get currentEffect(){return this._currentEffect}_buffersEqual(e,t){for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}_copyBuffer(e,t){for(let r=0;r<e.length;++r)t[r]=e[r]}update(){if(!this._noUBO){if(this.bindUniformBuffer(),!this._buffer)return void this.create();if(!this._dynamic&&!this._needSync){this._createBufferOnWrite=this._trackUBOsInFrame;return}if(this._buffers&&this._buffers.length>1&&this._buffers[this._bufferIndex][1])if(this._buffersEqual(this._bufferData,this._buffers[this._bufferIndex][1])){this._needSync=!1,this._createBufferOnWrite=this._trackUBOsInFrame;return}else this._copyBuffer(this._bufferData,this._buffers[this._bufferIndex][1]);this._bufferUpdatedLastFrame=!0,this._engine.updateUniformBuffer(this._buffer,this._bufferData),this._needSync=!1,this._createBufferOnWrite=this._trackUBOsInFrame}}_createNewBuffer(){this._bufferIndex+1<this._buffers.length?(this._bufferIndex++,this._buffer=this._buffers[this._bufferIndex][0],this._createBufferOnWrite=!1,this._needSync=!0):this._rebuild()}_checkNewFrame(){this._trackUBOsInFrame&&this._currentFrameId!==this._engine.frameId&&(this._currentFrameId=this._engine.frameId,this._createBufferOnWrite=!1,this._buffers&&this._buffers.length>0?(1===this._buffers.length?this._needSync=!this._bufferUpdatedLastFrame:this._needSync=0!==this._bufferIndex,this._bufferIndex=0,this._buffer=this._buffers[this._bufferIndex][0]):this._bufferIndex=-1)}updateUniform(e,r,i){this._checkNewFrame();let a=this._uniformLocations[e];if(void 0===a){if(this._buffer)return void t.Logger.Error("Cannot add an uniform after UBO has been created. uniformName="+e);this.addUniform(e,i),a=this._uniformLocations[e]}if(this._buffer||this.create(),this._dynamic)for(let e=0;e<i;e++)this._bufferData[a+e]=r[e];else{let e=!1;for(let t=0;t<i;t++)(16!==i||this._engine._features.uniformBufferHardCheckMatrix)&&this._bufferData[a+t]===Math.fround(r[t])||(e=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[a+t]=r[t]);this._needSync=this._needSync||e}}updateUniformArray(e,i,a){this._checkNewFrame();let f=this._uniformLocations[e];if(void 0===f)return void t.Logger.Error("Cannot add an uniform Array dynamically. Please, add it using addUniform and make sure that uniform buffers are supported by the current engine.");this._buffer||this.create();let s=this._uniformArraySizes[e];if(this._dynamic)for(let e=0;e<a;e++)this._bufferData[f+e]=i[e];else{let e=!1,t=0,n=0;for(let o=0;o<a;o++)if(this._bufferData[f+4*n+t]!==r.Tools.FloatRound(i[o])&&(e=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[f+4*n+t]=i[o]),++t===s.strideSize){for(;t<4;t++)this._bufferData[f+4*n+t]=0;t=0,n++}this._needSync=this._needSync||e}}_cacheMatrix(e,t){this._checkNewFrame();let r=this._valueCache[e],i=t.updateFlag;return(void 0===r||r!==i)&&(this._valueCache[e]=i,!0)}_updateMatrix3x3ForUniform(e,t){for(let e=0;e<3;e++)i._TempBuffer[4*e]=t[3*e],i._TempBuffer[4*e+1]=t[3*e+1],i._TempBuffer[4*e+2]=t[3*e+2],i._TempBuffer[4*e+3]=0;this.updateUniform(e,i._TempBuffer,12)}_updateMatrix3x3ForEffect(e,t){this._currentEffect.setMatrix3x3(e,t)}_updateMatrix2x2ForEffect(e,t){this._currentEffect.setMatrix2x2(e,t)}_updateMatrix2x2ForUniform(e,t){for(let e=0;e<2;e++)i._TempBuffer[4*e]=t[2*e],i._TempBuffer[4*e+1]=t[2*e+1],i._TempBuffer[4*e+2]=0,i._TempBuffer[4*e+3]=0;this.updateUniform(e,i._TempBuffer,8)}_updateFloatForEffect(e,t,r=""){this._currentEffect.setFloat(e+r,t)}_updateFloatForUniform(e,t){i._TempBuffer[0]=t,this.updateUniform(e,i._TempBuffer,1)}_updateFloat2ForEffect(e,t,r,i=""){this._currentEffect.setFloat2(e+i,t,r)}_updateFloat2ForUniform(e,t,r){i._TempBuffer[0]=t,i._TempBuffer[1]=r,this.updateUniform(e,i._TempBuffer,2)}_updateFloat3ForEffect(e,t,r,i,a=""){this._currentEffect.setFloat3(e+a,t,r,i)}_updateFloat3ForUniform(e,t,r,a){i._TempBuffer[0]=t,i._TempBuffer[1]=r,i._TempBuffer[2]=a,this.updateUniform(e,i._TempBuffer,3)}_updateFloat4ForEffect(e,t,r,i,a,f=""){this._currentEffect.setFloat4(e+f,t,r,i,a)}_updateFloat4ForUniform(e,t,r,a,f){i._TempBuffer[0]=t,i._TempBuffer[1]=r,i._TempBuffer[2]=a,i._TempBuffer[3]=f,this.updateUniform(e,i._TempBuffer,4)}_updateFloatArrayForEffect(e,t,r=""){switch(this._uniformArraySizes[e]?.strideSize){case 2:this._currentEffect.setFloatArray2(e+r,t);break;case 3:this._currentEffect.setFloatArray3(e+r,t);break;case 4:this._currentEffect.setFloatArray4(e+r,t);break;default:this._currentEffect.setFloatArray(e+r,t)}}_updateFloatArrayForUniform(e,t){this.updateUniformArray(e,t,t.length)}_updateArrayForEffect(e,t){this._currentEffect.setArray(e,t)}_updateArrayForUniform(e,t){this.updateUniformArray(e,t,t.length)}_updateIntArrayForEffect(e,t){this._currentEffect.setIntArray(e,t)}_updateIntArrayForUniform(e,t){i._TempBufferInt32View.set(t),this.updateUniformArray(e,i._TempBuffer,t.length)}_updateUIntArrayForEffect(e,t){this._currentEffect.setUIntArray(e,t)}_updateUIntArrayForUniform(e,t){i._TempBufferUInt32View.set(t),this.updateUniformArray(e,i._TempBuffer,t.length)}_updateMatrixForEffect(e,t){this._currentEffect.setMatrix(e,t)}_updateMatrixForUniform(e,t){this._cacheMatrix(e,t)&&this.updateUniform(e,t.asArray(),16)}_updateMatricesForEffect(e,t){this._currentEffect.setMatrices(e,t)}_updateMatricesForUniform(e,t){this.updateUniform(e,t,t.length)}_updateVector3ForEffect(e,t){this._currentEffect.setVector3(e,t)}_updateVector3ForUniform(e,t){i._TempBuffer[0]=t.x,i._TempBuffer[1]=t.y,i._TempBuffer[2]=t.z,this.updateUniform(e,i._TempBuffer,3)}_updateVector4ForEffect(e,t){this._currentEffect.setVector4(e,t)}_updateVector4ForUniform(e,t){i._TempBuffer[0]=t.x,i._TempBuffer[1]=t.y,i._TempBuffer[2]=t.z,i._TempBuffer[3]=t.w,this.updateUniform(e,i._TempBuffer,4)}_updateColor3ForEffect(e,t,r=""){this._currentEffect.setColor3(e+r,t)}_updateColor3ForUniform(e,t){i._TempBuffer[0]=t.r,i._TempBuffer[1]=t.g,i._TempBuffer[2]=t.b,this.updateUniform(e,i._TempBuffer,3)}_updateColor4ForEffect(e,t,r,i=""){this._currentEffect.setColor4(e+i,t,r)}_updateDirectColor4ForEffect(e,t,r=""){this._currentEffect.setDirectColor4(e+r,t)}_updateColor4ForUniform(e,t,r){i._TempBuffer[0]=t.r,i._TempBuffer[1]=t.g,i._TempBuffer[2]=t.b,i._TempBuffer[3]=r,this.updateUniform(e,i._TempBuffer,4)}_updateDirectColor4ForUniform(e,t){i._TempBuffer[0]=t.r,i._TempBuffer[1]=t.g,i._TempBuffer[2]=t.b,i._TempBuffer[3]=t.a,this.updateUniform(e,i._TempBuffer,4)}_updateIntForEffect(e,t,r=""){this._currentEffect.setInt(e+r,t)}_updateIntForUniform(e,t){i._TempBufferInt32View[0]=t,this.updateUniform(e,i._TempBuffer,1)}_updateInt2ForEffect(e,t,r,i=""){this._currentEffect.setInt2(e+i,t,r)}_updateInt2ForUniform(e,t,r){i._TempBufferInt32View[0]=t,i._TempBufferInt32View[1]=r,this.updateUniform(e,i._TempBuffer,2)}_updateInt3ForEffect(e,t,r,i,a=""){this._currentEffect.setInt3(e+a,t,r,i)}_updateInt3ForUniform(e,t,r,a){i._TempBufferInt32View[0]=t,i._TempBufferInt32View[1]=r,i._TempBufferInt32View[2]=a,this.updateUniform(e,i._TempBuffer,3)}_updateInt4ForEffect(e,t,r,i,a,f=""){this._currentEffect.setInt4(e+f,t,r,i,a)}_updateInt4ForUniform(e,t,r,a,f){i._TempBufferInt32View[0]=t,i._TempBufferInt32View[1]=r,i._TempBufferInt32View[2]=a,i._TempBufferInt32View[3]=f,this.updateUniform(e,i._TempBuffer,4)}_updateUIntForEffect(e,t,r=""){this._currentEffect.setUInt(e+r,t)}_updateUIntForUniform(e,t){i._TempBufferUInt32View[0]=t,this.updateUniform(e,i._TempBuffer,1)}_updateUInt2ForEffect(e,t,r,i=""){this._currentEffect.setUInt2(e+i,t,r)}_updateUInt2ForUniform(e,t,r){i._TempBufferUInt32View[0]=t,i._TempBufferUInt32View[1]=r,this.updateUniform(e,i._TempBuffer,2)}_updateUInt3ForEffect(e,t,r,i,a=""){this._currentEffect.setUInt3(e+a,t,r,i)}_updateUInt3ForUniform(e,t,r,a){i._TempBufferUInt32View[0]=t,i._TempBufferUInt32View[1]=r,i._TempBufferUInt32View[2]=a,this.updateUniform(e,i._TempBuffer,3)}_updateUInt4ForEffect(e,t,r,i,a,f=""){this._currentEffect.setUInt4(e+f,t,r,i,a)}_updateUInt4ForUniform(e,t,r,a,f){i._TempBufferUInt32View[0]=t,i._TempBufferUInt32View[1]=r,i._TempBufferUInt32View[2]=a,i._TempBufferUInt32View[3]=f,this.updateUniform(e,i._TempBuffer,4)}setTexture(e,t){this._currentEffect.setTexture(e,t)}setTextureArray(e,t){this._currentEffect.setTextureArray(e,t)}bindTexture(e,t){this._currentEffect._bindTexture(e,t)}updateUniformDirectly(e,t){this.updateUniform(e,t,t.length),this.update()}bindToEffect(e,t){this._currentEffect=e,this._currentEffectName=t}bindUniformBuffer(){!this._noUBO&&this._buffer&&this._currentEffect&&this._currentEffect.bindUniformBuffer(this._buffer,this._currentEffectName)}unbindEffect(){this._currentEffect=void 0,this._currentEffectName=void 0}setDataBuffer(e){if(!this._buffers)return this._buffer===e;for(let t=0;t<this._buffers.length;++t)if(this._buffers[t][0]===e)return this._bufferIndex=t,this._buffer=e,this._createBufferOnWrite=!1,this._currentEffect=void 0,this._buffers.length>1&&this._buffers[t][1]&&this._bufferData.set(this._buffers[t][1]),this._valueCache={},this._currentFrameId=this._engine.frameId,!0;return!1}has(e){return void 0!==this._uniformLocations[e]}dispose(){if(this._noUBO)return;let e=this._engine._uniformBuffers,t=e.indexOf(this);if(-1!==t&&(e[t]=e[e.length-1],e.pop()),this._trackUBOsInFrame&&this._buffers)for(let e=0;e<this._buffers.length;++e){let t=this._buffers[e][0];this._engine._releaseBuffer(t)}else this._buffer&&this._engine._releaseBuffer(this._buffer)&&(this._buffer=null)}}i._MAX_UNIFORM_SIZE=256,i._TempBuffer=new Float32Array(i._MAX_UNIFORM_SIZE),i._TempBufferInt32View=new Int32Array(i._TempBuffer.buffer),i._TempBufferUInt32View=new Uint32Array(i._TempBuffer.buffer),e.s(["UniformBuffer",0,i],81127);class a{static CompareLightsPriority(e,t){return e.shadowEnabled!==t.shadowEnabled?!!t.shadowEnabled-!!e.shadowEnabled:t.renderPriority-e.renderPriority}}a.FALLOFF_DEFAULT=0,a.FALLOFF_PHYSICAL=1,a.FALLOFF_GLTF=2,a.FALLOFF_STANDARD=3,a.LIGHTMAP_DEFAULT=0,a.LIGHTMAP_SPECULAR=1,a.LIGHTMAP_SHADOWSONLY=2,a.INTENSITYMODE_AUTOMATIC=0,a.INTENSITYMODE_LUMINOUSPOWER=1,a.INTENSITYMODE_LUMINOUSINTENSITY=2,a.INTENSITYMODE_ILLUMINANCE=3,a.INTENSITYMODE_LUMINANCE=4,a.LIGHTTYPEID_POINTLIGHT=0,a.LIGHTTYPEID_DIRECTIONALLIGHT=1,a.LIGHTTYPEID_SPOTLIGHT=2,a.LIGHTTYPEID_HEMISPHERICLIGHT=3,a.LIGHTTYPEID_RECT_AREALIGHT=4,a.LIGHTTYPEID_CLUSTERED_CONTAINER=5,e.s(["LightConstants",0,a],26801)},22832,80145,e=>{"use strict";var t=e.i(43880);class r{static Eval(e,t){return"true"===(e=e.match(/\([^()]*\)/g)?e.replace(/\([^()]*\)/g,e=>(e=e.slice(1,e.length-1),r._HandleParenthesisContent(e,t))):r._HandleParenthesisContent(e,t))||"false"!==e&&r.Eval(e,t)}static _HandleParenthesisContent(e,t){let i;t=t||(e=>"true"===e);let a=e.split("||");for(let e in a)if(Object.prototype.hasOwnProperty.call(a,e)){let f=r._SimplifyNegation(a[e].trim()),s=f.split("&&");if(s.length>1)for(let e=0;e<s.length;++e){let a=r._SimplifyNegation(s[e].trim());if(!(i="true"!==a&&"false"!==a?"!"===a[0]?!t(a.substring(1)):t(a):"true"===a)){f="false";break}}if(i||"true"===f){i=!0;break}i="true"!==f&&"false"!==f?"!"===f[0]?!t(f.substring(1)):t(f):"true"===f}return i?"true":"false"}static _SimplifyNegation(e){return"!true"===(e=(e=e.replace(/^[\s!]+/,e=>(e=e.replace(/[\s]/g,()=>"")).length%2?"!":"")).trim())?e="false":"!false"===e&&(e="true"),e}}class i{static EnableFor(e){e._tags=e._tags||{},e.hasTags=()=>i.HasTags(e),e.addTags=t=>i.AddTagsTo(e,t),e.removeTags=t=>i.RemoveTagsFrom(e,t),e.matchesTagsQuery=t=>i.MatchesQuery(e,t)}static DisableFor(e){delete e._tags,delete e.hasTags,delete e.addTags,delete e.removeTags,delete e.matchesTagsQuery}static HasTags(e){if(!e._tags)return!1;let t=e._tags;for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!0;return!1}static GetTags(e,t=!0){if(!e._tags)return null;if(!t)return e._tags;{let t=[];for(let r in e._tags)Object.prototype.hasOwnProperty.call(e._tags,r)&&!0===e._tags[r]&&t.push(r);return t.join(" ")}}static AddTagsTo(e,t){if(t&&"string"==typeof t)for(let r of t.split(" "))i._AddTagTo(e,r)}static _AddTagTo(e,t){""===(t=t.trim())||"true"===t||"false"===t||t.match(/[\s]/)||t.match(/^([!]|([|]|[&]){2})/)||(i.EnableFor(e),e._tags[t]=!0)}static RemoveTagsFrom(e,t){if(!i.HasTags(e))return;let r=t.split(" ");for(let t in r)i._RemoveTagFrom(e,r[t])}static _RemoveTagFrom(e,t){delete e._tags[t]}static MatchesQuery(e,t){return void 0===t||(""===t?i.HasTags(e):r.Eval(t,t=>i.HasTags(e)&&e._tags[t]))}}e.s(["Tags",0,i],80145);var a=e.i(64073),f=e.i(72003),s=e.i(82427);let n=function(e,t,r,a={}){let f=e();i&&i.HasTags(t)&&i.AddTagsTo(f,i.GetTags(t,!0));let n=(0,s.GetMergedStore)(f),u={};for(let e in n){let i=n[e],s=t[e],_=i.type;if(null!=s&&("uniqueId"!==e||o.AllowLoadingUniqueId))switch(_){case 0:case 6:case 9:case 11:"function"==typeof s.slice?f[e]=s.slice():f[e]=s;break;case 1:a.cloneTexturesOnlyOnce&&u[s.uniqueId]?f[e]=u[s.uniqueId]:(f[e]=r||s.isRenderTarget?s:s.clone(),u[s.uniqueId]=f[e]);break;case 2:case 3:case 4:case 5:case 7:case 8:case 10:case 12:case 13:f[e]=r?s:s.clone()}}return f};class o{static AppendSerializedAnimations(e,t){if(e.animations){t.animations=[];for(let r=0;r<e.animations.length;r++){let i=e.animations[r];t.animations.push(i.serialize())}}}static Serialize(e,t){t||(t={}),i&&(t.tags=i.GetTags(e));let r=(0,s.GetMergedStore)(e);for(let i in r){let a=r[i],f=a.sourceName||i,s=a.type,n=e[i];if(null!=n&&("uniqueId"!==i||o.AllowLoadingUniqueId))switch(s){case 0:Array.isArray(n)?t[f]=n.slice():t[f]=n;break;case 1:case 3:case 7:case 9:t[f]=n.serialize();break;case 2:case 4:case 5:case 8:case 10:case 12:case 13:t[f]=n.asArray();break;case 6:case 11:t[f]=n.id}}return t}static ParseProperties(e,t,r,i){i||(i="");let n=(0,s.GetMergedStore)(t);for(let s in n){let u=n[s],_=e[u.sourceName||s],h=u.type;if(null!=_&&("uniqueId"!==s||o.AllowLoadingUniqueId))switch(h){case 0:t[s]=_;break;case 1:r&&(t[s]=o._TextureParser(_,r,i));break;case 2:t[s]=a.Color3.FromArray(_);break;case 3:t[s]=o._FresnelParametersParser(_);break;case 4:t[s]=f.Vector2.FromArray(_);break;case 5:t[s]=f.Vector3.FromArray(_);break;case 6:r&&(t[s]=r.getLastMeshById(_));break;case 7:t[s]=o._ColorCurvesParser(_);break;case 8:t[s]=a.Color4.FromArray(_);break;case 9:t[s]=o._ImageProcessingConfigurationParser(_);break;case 10:t[s]=f.Quaternion.FromArray(_);break;case 11:r&&(t[s]=r.getCameraById(_));break;case 12:t[s]=f.Matrix.FromArray(_);break;case 13:t[s]=f.Vector4.FromArray(_)}}}static Parse(e,t,r,a=null){let f=e();return i&&i.AddTagsTo(f,t.tags),o.ParseProperties(t,f,r,a),f}static Clone(e,t,r={}){return n(e,t,!1,r)}static Instanciate(e,t){return n(e,t,!0)}}o.AllowLoadingUniqueId=!1,o._ImageProcessingConfigurationParser=e=>{throw(0,t._WarnImport)("ImageProcessingConfiguration")},o._FresnelParametersParser=e=>{throw(0,t._WarnImport)("FresnelParameters")},o._ColorCurvesParser=e=>{throw(0,t._WarnImport)("ColorCurves")},o._TextureParser=(e,r,i)=>{throw(0,t._WarnImport)("Texture")},e.s(["SerializationHelper",0,o],22832)},4112,82427,91679,e=>{"use strict";let t;"function"==typeof SuppressedError&&SuppressedError,e.s(["__classPrivateFieldGet",0,function(e,t,r,i){if("a"===r&&!i)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)},"__classPrivateFieldSet",0,function(e,t,r,i,a){if("m"===i)throw TypeError("Private method is not writable");if("a"===i&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?a.call(e,r):a?a.value=r:t.set(e,r),r},"__esDecorate",0,function(e,t,r,i,a,f){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var n,o=i.kind,u="getter"===o?"get":"setter"===o?"set":"value",_=!t&&e?i.static?e:e.prototype:null,h=t||(_?Object.getOwnPropertyDescriptor(_,i.name):{}),c=!1,d=r.length-1;d>=0;d--){var l={};for(var p in i)l[p]="access"===p?{}:i[p];for(var p in i.access)l.access[p]=i.access[p];l.addInitializer=function(e){if(c)throw TypeError("Cannot add initializers after decoration has completed");f.push(s(e||null))};var m=(0,r[d])("accessor"===o?{get:h.get,set:h.set}:h[u],l);if("accessor"===o){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(n=s(m.get))&&(h.get=n),(n=s(m.set))&&(h.set=n),(n=s(m.init))&&a.unshift(n)}else(n=s(m))&&("field"===o?a.unshift(n):h[u]=n)}_&&Object.defineProperty(_,i.name,h),c=!0},"__runInitializers",0,function(e,t,r){for(var i=arguments.length>2,a=0;a<t.length;a++)r=i?t[a].call(e,r):t[a].call(e);return i?r:void 0}],4112);let r="__bjs_serializable__",i=new WeakMap;function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}let f=((t=Symbol.metadata)||Object.defineProperty(Symbol,"metadata",{configurable:!0,writable:!0,value:t=Symbol("Symbol.metadata")}),t);function s(e){if(!e)throw Error(`Decorator metadata is unavailable; the Symbol.metadata (${String(f)}) polyfill must run before decorated classes are evaluated.`);return a(e,r)||(e[r]={}),e[r]}function n(e,t){return(r,i)=>{if(!i.metadata)return;let a=String(i.name),f=s(i.metadata);f[a]||(f[a]={type:e,sourceName:t})}}function o(e,t,r){let i=String(t.name),a=null,f=function(...s){if(null===a){a=e,"u">typeof _native&&_native[i]&&(a=r(_native[i],e));let s=this&&(t.static?this:Object.getPrototypeOf(this));s?.[i]===f&&(s[i]=a)}return a.apply(this,s)};return f}function u(e,t){return o(e,t,e=>e)}e.s(["GetDirectStoreFromMetadata",0,s,"GetMergedStore",0,function(e){let t="function"==typeof e?e:e?.constructor,s=t?t[f]:void 0;if(!s)return{};let n=i.get(s);if(n)return n;let o={},u=[],_=s;for(;_;)u.push(_),_=Object.getPrototypeOf(_);for(let e of u)if(a(e,r)){let t=e[r];for(let e in t)o[e]=t[e]}return i.set(s,o),o}],82427),u.filter=function(e){return(t,r)=>o(t,r,(t,r)=>function(...i){return e(...i)?t(...i):r.apply(this,i)})},e.s(["addAccessorsForMaterialProperty",0,function(e,t=null){return(r,i)=>{let a=t||"_"+String(i.name);return{get(){return this[a]?.value},set(t){"function"==typeof this[a]?.value?.equals&&this[a].value.equals(t)||this[a].value!==t&&(this[a].value=t,this[e]())}}}},"expandToProperty",0,function(e,t=null){return function(e,t=null){return(r,i)=>{let a=t||"_"+String(i.name);return{init(e){return void 0===e&&a in this||(this[a]=e),e},get(){return this[a]},set(t){"function"==typeof this[a]?.equals&&this[a].equals(t)||this[a]!==t&&(this[a]=t,this[e]())}}}}(e,t)},"nativeOverride",0,u,"serialize",0,function(e){return n(0,e)},"serializeAsColor3",0,function(e){return n(2,e)},"serializeAsColor4",0,function(e){return n(8,e)},"serializeAsColorCurves",0,function(e){return n(7,e)},"serializeAsFresnelParameters",0,function(e){return n(3,e)},"serializeAsMatrix",0,function(e){return n(12,e)},"serializeAsMeshReference",0,function(e){return n(6,e)},"serializeAsQuaternion",0,function(e){return n(10,e)},"serializeAsTexture",0,function(e){return n(1,e)},"serializeAsVector2",0,function(e){return n(4,e)},"serializeAsVector3",0,function(e){return n(5,e)}],91679)}]);