@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.
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +19 -5
- package/out/__next._full.txt +10 -10
- package/out/__next._tree.txt +1 -1
- package/out/_next/static/chunks/{2-_a-v1xeo5hb.js → 0-_j1khfoib6l.js} +116 -115
- package/out/_next/static/chunks/{25brs445bjbik.js → 005bbq_px7lke.js} +2 -2
- package/out/_next/static/chunks/00fbhtmui-yxg.js +1 -0
- package/out/_next/static/chunks/017pn-pen381_.js +1 -0
- package/out/_next/static/chunks/01vov6inx1zzt.js +1 -0
- package/out/_next/static/chunks/{2x-7kbwq8tl-o.js → 02qk_wmkf9at-.js} +196 -196
- package/out/_next/static/chunks/03bd5plut08tg.js +1 -0
- package/out/_next/static/chunks/03dwfqmo73w_z.js +1 -0
- package/out/_next/static/chunks/03sn4419dam-h.js +5 -0
- package/out/_next/static/chunks/05ere0-228syf.js +1 -0
- package/out/_next/static/chunks/{1jjw9hxgi2vzi.js → 05h8u5lrypn5m.js} +1 -1
- package/out/_next/static/chunks/{23-y1f_zw56vo.js → 05v-nubi896jg.js} +1 -1
- package/out/_next/static/chunks/05z79zh625ezu.js +1 -0
- package/out/_next/static/chunks/{2xe4bgir5l-9b.js → 060iult6f68_e.js} +504 -504
- package/out/_next/static/chunks/08lvtnv7b1cxp.js +1 -0
- package/out/_next/static/chunks/0_v2luu_qmeid.js +1 -0
- package/out/_next/static/chunks/0ai0zgbgjqb92.js +1 -0
- package/out/_next/static/chunks/0boov9mwycanf.js +1 -0
- package/out/_next/static/chunks/{2mrkv0z2i74pv.js → 0btmk0wmekl02.js} +2 -2
- package/out/_next/static/chunks/0d8x8m2x6ca_m.js +1 -0
- package/out/_next/static/chunks/0dmrdrwtd093b.js +1 -0
- package/out/_next/static/chunks/0e1jfrmioeuws.js +1 -0
- package/out/_next/static/chunks/0e7nlxmneb2j_.js +1 -0
- package/out/_next/static/chunks/0es97pusfxupl.js +1 -0
- package/out/_next/static/chunks/{2fspbfbxbswzd.js → 0fd-0i1yt23kz.js} +1 -1
- package/out/_next/static/chunks/0fxdyvb1w23d1.js +1 -0
- package/out/_next/static/chunks/0fxhc24djjcgq.js +1 -0
- package/out/_next/static/chunks/0gf-ztg86zd80.js +1 -0
- package/out/_next/static/chunks/{287hakn2ijupp.js → 0grasqqf5dw7r.js} +2 -2
- package/out/_next/static/chunks/{161yjxmdz9obc.js → 0hajwk2yd-rwr.js} +1 -1
- package/out/_next/static/chunks/0hk1wg7h4araz.js +1 -0
- package/out/_next/static/chunks/{1aa9g197l4twm.js → 0j74ipw4fps-n.js} +1 -1
- package/out/_next/static/chunks/{1s0dpdqy480hg.js → 0kj-vckdn7t5p.js} +1 -1
- package/out/_next/static/chunks/0lbs5xdyjuzuo.js +1 -0
- package/out/_next/static/chunks/0lep3_bqwfuin.js +1 -0
- package/out/_next/static/chunks/0mp0jh1gj7290.js +1 -0
- package/out/_next/static/chunks/0ngpoj2g5i4kz.js +1 -0
- package/out/_next/static/chunks/0nhljhguceh66.js +1 -0
- package/out/_next/static/chunks/0p6z73afb9dj2.js +1 -0
- package/out/_next/static/chunks/0p9zfmidzqkps.js +1 -0
- package/out/_next/static/chunks/0q75860p8u_ii.js +1 -0
- package/out/_next/static/chunks/{3mmy9zsb7zo-m.js → 0rracz73p38mo.js} +23 -23
- package/out/_next/static/chunks/{3_dm45k0vk1aa.js → 0sw-8gxbg4x0l.js} +565 -565
- package/out/_next/static/chunks/0sx-6rf3eteqn.js +1 -0
- package/out/_next/static/chunks/0thw099xk3_0p.js +3 -0
- package/out/_next/static/chunks/0u85f0dhb4i8e.js +1 -0
- package/out/_next/static/chunks/0uk7kigzm4vi2.js +31 -0
- package/out/_next/static/chunks/0ulufxnsrou61.js +1 -0
- package/out/_next/static/chunks/0xa9dyg6ezzyd.js +2 -0
- package/out/_next/static/chunks/0xvrfvur0p534.js +1 -0
- package/out/_next/static/chunks/{2clevl_9ayd0x.js → 0ybs1u66q26su.js} +1 -1
- package/out/_next/static/chunks/0ydfhk-p6zvm0.js +1 -0
- package/out/_next/static/chunks/{0j2ygtc_-bo3m.js → 0z004fn14pbcu.js} +1 -1
- package/out/_next/static/chunks/{2c8rmxz151fxa.js → 0z9erbl3llr_b.js} +224 -224
- package/out/_next/static/chunks/0zcsxvcvog9ue.js +1 -0
- package/out/_next/static/chunks/0zqgq0lwtz9tn.js +1 -0
- package/out/_next/static/chunks/1-ogak5u00kwa.js +1 -0
- package/out/_next/static/chunks/{3si3migsmvz9o.js → 10_5p5-xf2aoo.js} +1 -1
- package/out/_next/static/chunks/118qlrzdwpfmo.js +1 -0
- package/out/_next/static/chunks/11km5p4gd0ut4.js +1 -0
- package/out/_next/static/chunks/120rl4l29q9xs.js +1 -0
- package/out/_next/static/chunks/{44m1ijc5cv80x.js → 129m5i93ltoym.js} +1 -1
- package/out/_next/static/chunks/12n73o884lyyl.js +1 -0
- package/out/_next/static/chunks/{27z7j17kcrty_.js → 13zcn4lv0qj76.js} +11 -11
- package/out/_next/static/chunks/15jlgfcaeaki9.js +1 -0
- package/out/_next/static/chunks/{374lzksboll-t.js → 15o4_2t-l3rj5.js} +1 -1
- package/out/_next/static/chunks/175st2ogkg_1o.js +1 -0
- package/out/_next/static/chunks/19rsodtu91ja_.js +1 -0
- package/out/_next/static/chunks/1a2ouhup611bz.js +1 -0
- package/out/_next/static/chunks/{2117sv2qzo6yq.js → 1by60_b14x-3o.js} +1 -1
- package/out/_next/static/chunks/{2al9dh3_1ixhv.js → 1cyq7i39885sl.js} +1 -1
- package/out/_next/static/chunks/1d9it6yocgt54.js +1 -0
- package/out/_next/static/chunks/{29_n5j-hg_gsa.js → 1dp1s1t-y7gal.js} +1 -1
- package/out/_next/static/chunks/1dr7gh6xgypl8.js +1 -0
- package/out/_next/static/chunks/{1eirucr9s6-h5.js → 1dt30s_sp8415.js} +1 -1
- package/out/_next/static/chunks/{3vtmucpx25o7q.js → 1e8_jl2cxd3rp.js} +584 -584
- package/out/_next/static/chunks/1f1rek_fxk3of.js +1 -0
- package/out/_next/static/chunks/1f2mna0k5efeq.js +1 -0
- package/out/_next/static/chunks/1gfz3sxwkkg3d.js +1 -0
- package/out/_next/static/chunks/1gr35qeguuws0.js +1 -0
- package/out/_next/static/chunks/{3p03l0z65c8vc.js → 1gttu-n9am66k.js} +253 -253
- package/out/_next/static/chunks/1imi0xwi9hd99.js +1 -0
- package/out/_next/static/chunks/1ka5v5zu0cstt.js +1 -0
- package/out/_next/static/chunks/{3my05px5mv_s5.js → 1l_3oidssbhns.js} +235 -235
- package/out/_next/static/chunks/{0r-x702_jvhud.js → 1m9zc5gm-327d.js} +12 -12
- package/out/_next/static/chunks/1n9nhz-6azcp3.js +3 -0
- package/out/_next/static/chunks/1ncqwe81t_9_x.js +1 -0
- package/out/_next/static/chunks/{3un-w6wutw1qn.js → 1nix_lulkpklo.js} +1 -1
- package/out/_next/static/chunks/1ntqovuz2c217.js +1 -0
- package/out/_next/static/chunks/1pgs-98tfkq9_.js +1 -0
- package/out/_next/static/chunks/1q2z0aeopo8t8.js +1 -0
- package/out/_next/static/chunks/{1x0j78ohufpul.js → 1q4lkgxfnqnew.js} +1 -1
- package/out/_next/static/chunks/{0yd4_xh476fjn.js → 1qg1l7t00nyib.js} +97 -97
- package/out/_next/static/chunks/{2wgh5i70bzelt.js → 1rcdimhu0qhlu.js} +392 -392
- package/out/_next/static/chunks/1rlfg62jxqj3z.js +1 -0
- package/out/_next/static/chunks/1ses023uud001.js +1 -0
- package/out/_next/static/chunks/1t5oynmttpfsw.js +1 -0
- package/out/_next/static/chunks/{39cou9lia_g7l.js → 1t9i20i5-f8ze.js} +1 -1
- package/out/_next/static/chunks/{0rykrf_vofbad.js → 1tgj55b305g4h.js} +1 -1
- package/out/_next/static/chunks/{3rj-5v0j_2-_2.js → 1u8snlm6a7uhi.js} +4 -4
- package/out/_next/static/chunks/{2neieeo9g2u56.js → 1ug4k-1zhr63a.js} +1 -1
- package/out/_next/static/chunks/{3ioxfi3bvznhh.js → 1uh9zgsy69g92.js} +1 -1
- package/out/_next/static/chunks/1vrpzlif-z_p0.js +1 -0
- package/out/_next/static/chunks/{0lwjmr8efrlbt.js → 1vurgl6oz2qey.js} +1 -1
- package/out/_next/static/chunks/1w-qc09n9ijtq.js +1 -0
- package/out/_next/static/chunks/1ycqxcht6x54p.js +1 -0
- package/out/_next/static/chunks/1zj4307ugq0qz.js +1 -0
- package/out/_next/static/chunks/{14e4k-718qadd.js → 1zkd8v-qka--j.js} +163 -168
- package/out/_next/static/chunks/1zm52cjrfrq7c.js +1 -0
- package/out/_next/static/chunks/{3-yhe6rcsjh88.js → 1zm6eo861i3c8.js} +1 -1
- package/out/_next/static/chunks/{06fbalmyyfpsy.js → 1zp9363yfhpom.js} +1 -1
- package/out/_next/static/chunks/1zt1xxovnjhkm.js +1 -0
- package/out/_next/static/chunks/2-3hk_db5fpok.js +1 -0
- package/out/_next/static/chunks/2-bv9a_0zgw1f.js +1 -0
- package/out/_next/static/chunks/{3cp5nmtwxq4gr.js → 209sxygecny37.js} +1 -1
- package/out/_next/static/chunks/{133dqp8_7_yo6.js → 216uiih3_vdfd.js} +1 -1
- package/out/_next/static/chunks/21kfpd_bityxt.js +1 -0
- package/out/_next/static/chunks/{3yk0hzfq5rcs6.js → 22yqh0zlo_vwr.js} +1 -1
- package/out/_next/static/chunks/24ecas0m9tao7.js +3 -0
- package/out/_next/static/chunks/24pq9210rng3f.js +1 -0
- package/out/_next/static/chunks/{184pz6z3dflfm.js → 267prao6fyt22.js} +20 -20
- package/out/_next/static/chunks/26skkagvj1z96.js +1 -0
- package/out/_next/static/chunks/{0i9wa8hjd-5tc.js → 26y9sv8_-ykxf.js} +1 -1
- package/out/_next/static/chunks/2701xfv_07wz_.js +1 -0
- package/out/_next/static/chunks/{39rhmj_32ujyj.js → 271333m8y3k0e.js} +1 -1
- package/out/_next/static/chunks/29rkmguzky-bp.js +1 -0
- package/out/_next/static/chunks/{3qo7e6b73mfxq.js → 2a07so920b6aa.js} +1 -1
- package/out/_next/static/chunks/{1z790xxb46gxy.js → 2a2oy8ryz2tsk.js} +1 -1
- package/out/_next/static/chunks/{2-i29-jdbwww6.js → 2ao-3jzz7yw3p.js} +111 -111
- package/out/_next/static/chunks/2apihn9ra2ufp.js +1 -0
- package/out/_next/static/chunks/2apnpj0-fs9ks.js +1 -0
- package/out/_next/static/chunks/2b481pitl4k85.js +1 -0
- package/out/_next/static/chunks/2bettxaqt3d2p.js +1 -0
- package/out/_next/static/chunks/{1bv-jzy_2jiqs.js → 2c721vfva711t.js} +1 -1
- package/out/_next/static/chunks/{17_jjyx4jz9dd.js → 2d2kl_m64j9cb.js} +1 -1
- package/out/_next/static/chunks/2droqjmvmgj13.js +1 -0
- package/out/_next/static/chunks/2dxbvwbbgpzoq.js +1 -0
- package/out/_next/static/chunks/2eqbsut829r5l.js +1 -0
- package/out/_next/static/chunks/2f3_mzxjh3gso.js +1 -0
- package/out/_next/static/chunks/2fsde0jwi5qtt.js +1 -0
- package/out/_next/static/chunks/{0jap7l5-bskj4.js → 2h249uvhh2sij.js} +12 -12
- package/out/_next/static/chunks/{2as_br1awqk6k.js → 2izok2otbk8-2.js} +496 -496
- package/out/_next/static/chunks/2j120dkh7q3uf.js +1 -0
- package/out/_next/static/chunks/2j2ynchpqh34-.js +1 -0
- package/out/_next/static/chunks/2kj6pzs_wap1v.js +1 -0
- package/out/_next/static/chunks/{2epukrz6paj9n.js → 2kok6zedeeltw.js} +1 -1
- package/out/_next/static/chunks/2lnj9jruy4nrv.js +1 -0
- package/out/_next/static/chunks/{0j0a0wvmmghxj.js → 2lsvk7xcfkarc.js} +1 -1
- package/out/_next/static/chunks/2n-pveub8b_5t.js +1 -0
- package/out/_next/static/chunks/{3puu2_-t0lln9.js → 2n3xu_wbvtj7h.js} +12 -12
- package/out/_next/static/chunks/{1lu7rjfvxj8yj.js → 2of8q0kaeqpf0.js} +1 -1
- package/out/_next/static/chunks/2ofwtw6p08sfz.js +1 -0
- package/out/_next/static/chunks/{1t-yolk97lmot.js → 2phl5ta4iim7l.js} +1 -1
- package/out/_next/static/chunks/2q6l-xdqzgmpf.js +1 -0
- package/out/_next/static/chunks/2q8yg63br2jc9.js +1 -0
- package/out/_next/static/chunks/2r5qgieqldcd9.js +1 -0
- package/out/_next/static/chunks/2r7y401cvjc1s.js +1 -0
- package/out/_next/static/chunks/{1a94whad0y57f.js → 2r96kyeehsji9.js} +1 -1
- package/out/_next/static/chunks/{1gvu5a6ffbs7l.js → 2rmc6ru7mc-kg.js} +1 -1
- package/out/_next/static/chunks/{3_gfl66zf638s.js → 2s6kpclh6ie7o.js} +901 -906
- package/out/_next/static/chunks/{0xzamrecplwzw.js → 2sys9nj8lo3uk.js} +1 -1
- package/out/_next/static/chunks/{336ckqpboqmbn.js → 2tc3e-iqv71y_.js} +1 -1
- package/out/_next/static/chunks/{1t2g1v0ubcsam.js → 2uo6vm7mfgrbf.js} +1 -1
- package/out/_next/static/chunks/{2kmmk9coo9_b0.js → 2urx6fow8c8c9.js} +143 -143
- package/out/_next/static/chunks/2w2k1gveljyb7.js +1 -0
- package/out/_next/static/chunks/{1zmx71cvc6ksk.js → 2w99knknr5i8c.js} +1 -1
- package/out/_next/static/chunks/2w_ptlw-ad8-9.js +4 -0
- package/out/_next/static/chunks/2ws1s9d52ayv8.js +1 -0
- package/out/_next/static/chunks/2x7enks3ydgai.js +1 -0
- package/out/_next/static/chunks/{2_6b9lraq-exh.js → 2y8i7_nxm4r05.js} +5 -5
- package/out/_next/static/chunks/2ydub0t01728d.js +1 -0
- package/out/_next/static/chunks/{29hkkj9raxte9.js → 2z_iab7ozohhq.js} +77 -77
- package/out/_next/static/chunks/3-m_vzabs1uez.js +1 -0
- package/out/_next/static/chunks/{1h1gixjbjkbsl.js → 302qk2fjdrthp.js} +5 -5
- package/out/_next/static/chunks/30bhz7czzs4mf.js +1 -0
- package/out/_next/static/chunks/{3d43gd91r06y6.js → 30n4y_uu8chbh.js} +507 -505
- package/out/_next/static/chunks/{0o0qtv35dqv3i.js → 32_c4mbb6j1l6.js} +239 -239
- package/out/_next/static/chunks/33hp-khdfohdq.js +1 -0
- package/out/_next/static/chunks/{3zv5kyos9vtmm.js → 33i36o_l69sm5.js} +1 -1
- package/out/_next/static/chunks/3527r3jo5fj3i.js +1 -0
- package/out/_next/static/chunks/355dg8yaa94hr.js +1 -0
- package/out/_next/static/chunks/{2h9i_adbqaxs4.js → 35ntbr_c-yx44.js} +1 -1
- package/out/_next/static/chunks/{0cmyc-uvk93kl.js → 35sne1llxnc-m.js} +74 -74
- package/out/_next/static/chunks/36enkx1skkv2-.js +4 -0
- package/out/_next/static/chunks/{0e5dcxmkprebg.js → 3772oce1n3t_g.js} +1 -1
- package/out/_next/static/chunks/37cnbm5ft1mqf.js +1 -0
- package/out/_next/static/chunks/38xdo3cifphut.js +1 -0
- package/out/_next/static/chunks/{0o73w0cn5n_vl.js → 3_dgblylldcgb.js} +1 -1
- package/out/_next/static/chunks/3beawo-qwuk8k.js +1 -0
- package/out/_next/static/chunks/3cj_6sl9kr3e9.js +1 -0
- package/out/_next/static/chunks/3d-i_skta_wes.js +1 -0
- package/out/_next/static/chunks/3df_l2we755bb.js +1 -0
- package/out/_next/static/chunks/{0o1vph7x9shzu.js → 3eve5y7fpzx2h.js} +1 -1
- package/out/_next/static/chunks/3ewgyb4y19w-3.js +1 -0
- package/out/_next/static/chunks/3f3789eh18_oy.js +1 -0
- package/out/_next/static/chunks/{0gk5rnci1hznh.js → 3f8qelpscqfym.js} +2 -2
- package/out/_next/static/chunks/3g3-e9m1en45q.js +1 -0
- package/out/_next/static/chunks/{2kk_vvmr2xm3d.js → 3h6akt2uu05ku.js} +12 -12
- package/out/_next/static/chunks/{2_lw4d7t-xcqi.js → 3huu0tqmxwowu.js} +523 -522
- package/out/_next/static/chunks/3i239y-1hbkm-.js +1 -0
- package/out/_next/static/chunks/{2mjjo0yj-4ro4.js → 3ipx7xbxchsq9.js} +1 -1
- package/out/_next/static/chunks/{3txu-i5qn183a.js → 3j9xvdz55bi4p.js} +321 -321
- package/out/_next/static/chunks/3kp8qmhoi24oz.js +1 -0
- package/out/_next/static/chunks/3ksq69yq-40_r.js +1 -0
- package/out/_next/static/chunks/{3nwaovnpiyrt8.js → 3njwfothmmg7u.js} +3 -3
- package/out/_next/static/chunks/{2iu0_3cx-ny74.js → 3oqxl46ukaojj.js} +11 -11
- package/out/_next/static/chunks/{2oacwtbslo90t.js → 3qn6r8-0u6dij.js} +360 -360
- package/out/_next/static/chunks/3qye1lytea2i8.js +1 -0
- package/out/_next/static/chunks/{0gsh_d0m5xss1.js → 3rlp9yr75liz7.js} +1 -1
- package/out/_next/static/chunks/{3j3ol_d1vsdhx.js → 3sa_hlx3konc7.js} +1 -1
- package/out/_next/static/chunks/3tyo643l62h3m.js +1 -0
- package/out/_next/static/chunks/3tz2tpqa9uvwm.js +1 -0
- package/out/_next/static/chunks/{0_jrfk2u1u3fi.js → 3utpc-fc6_y0f.js} +1 -1
- package/out/_next/static/chunks/3v-0c2aj6c0on.js +1 -0
- package/out/_next/static/chunks/3v6nxa28rxngq.js +1 -0
- package/out/_next/static/chunks/{3twr9ds68-9us.js → 3vbamaoiuk9yj.js} +1 -1
- package/out/_next/static/chunks/3vv99btjc-mky.js +1 -0
- package/out/_next/static/chunks/{22yht3s7c-xih.js → 3w59kt5ztyvoq.js} +1 -1
- package/out/_next/static/chunks/3x02lxdo28u9i.js +1 -0
- package/out/_next/static/chunks/{1my968s78he8g.js → 3xl-op0hwxytg.js} +15 -15
- package/out/_next/static/chunks/3ydnxyc4rvad_.js +1 -0
- package/out/_next/static/chunks/3ylg4gfetwgxw.js +1 -0
- package/out/_next/static/chunks/{0a475u_q5i_dd.js → 3zdtteq-r2fs5.js} +2 -2
- package/out/_next/static/chunks/3zkwt0gybqtgm.js +1 -0
- package/out/_next/static/chunks/{3nr48h9zwum-3.js → 3zs7l4362msjd.js} +1 -1
- package/out/_next/static/chunks/40etabvml_71y.js +1 -0
- package/out/_next/static/chunks/{2xujlsx3stqig.js → 417jkzz0slv9m.js} +1 -1
- package/out/_next/static/chunks/{0ypejzd74ixbw.js → 41b5gpyqbj58m.js} +15 -15
- package/out/_next/static/chunks/41u2-5jayyajf.js +22 -0
- package/out/_next/static/chunks/42gcpy51w7lk1.js +1 -0
- package/out/_next/static/chunks/{2h07np207nlx7.js → 42ymanq326mo7.js} +1 -1
- package/out/_next/static/chunks/{36pz_ews7u0xb.js → 43fp64xnfy646.js} +1 -1
- package/out/_next/static/chunks/43v4y2gu5z9_h.js +1 -0
- package/out/_next/static/chunks/44cer242u-f8v.js +1 -0
- package/out/_next/static/chunks/{0d9pxx1w_zqr9.js → 44zi0gl0a6a8w.js} +1 -1
- package/out/_next/static/chunks/turbopack-0n2o5_bkskckx.js +1 -0
- package/out/_not-found/__next._full.txt +11 -11
- package/out/_not-found/__next._not-found.__PAGE__.txt +19 -2
- package/out/_not-found/__next._tree.txt +1 -1
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +11 -11
- package/out/index.html +1 -1
- package/out/index.txt +10 -10
- package/package.json +9 -9
- package/out/__next._head.txt +0 -6
- package/out/__next._index.txt +0 -5
- package/out/_next/static/chunks/0-k4hp87gwues.js +0 -1
- package/out/_next/static/chunks/0-laj-bivzp4x.js +0 -1
- package/out/_next/static/chunks/04zj0yf1qhk1o.js +0 -1
- package/out/_next/static/chunks/07hgbbqksqd1g.js +0 -1
- package/out/_next/static/chunks/08ou2nvy48e0u.js +0 -1
- package/out/_next/static/chunks/08y5-irjbsiy8.js +0 -1
- package/out/_next/static/chunks/0aad2r4s4wl1x.js +0 -5
- package/out/_next/static/chunks/0gnjtwq-474uc.js +0 -1
- package/out/_next/static/chunks/0ibzpjo0h731v.js +0 -1
- package/out/_next/static/chunks/0j_3k5qhv_mdx.js +0 -1
- package/out/_next/static/chunks/0jis2w2mfx062.js +0 -1
- package/out/_next/static/chunks/0jjvp2slpf7d6.js +0 -1
- package/out/_next/static/chunks/0ko10wo4rc9-b.js +0 -1
- package/out/_next/static/chunks/0lqmvz6k2h_of.js +0 -1
- package/out/_next/static/chunks/0noxyupihh8dk.js +0 -1
- package/out/_next/static/chunks/0p6phe9kjlxn8.js +0 -1
- package/out/_next/static/chunks/0ptxb9dcwsw3o.js +0 -1
- package/out/_next/static/chunks/0q0i4pdyq66gb.js +0 -1
- package/out/_next/static/chunks/0q8pt8fd0ma30.js +0 -1
- package/out/_next/static/chunks/0qqx9aoz8l5d2.js +0 -1
- package/out/_next/static/chunks/0tsk32q-88t_7.js +0 -1
- package/out/_next/static/chunks/0u7577db_ivyr.js +0 -1
- package/out/_next/static/chunks/0unnrt0un064x.js +0 -1
- package/out/_next/static/chunks/0uygtr4mo3h0v.js +0 -1
- package/out/_next/static/chunks/0vf3facit951s.js +0 -1
- package/out/_next/static/chunks/0vzo-8t8c26k9.js +0 -1
- package/out/_next/static/chunks/0xx7_7y5jdlh4.js +0 -1
- package/out/_next/static/chunks/0xyija62b6txc.js +0 -1
- package/out/_next/static/chunks/0zeb37703zcz3.js +0 -1
- package/out/_next/static/chunks/0zu5ato7-1-q9.js +0 -1
- package/out/_next/static/chunks/0zydv7y47dxgh.js +0 -1
- package/out/_next/static/chunks/103x4jwovb6d-.js +0 -1
- package/out/_next/static/chunks/107wfq84g9-kn.js +0 -1
- package/out/_next/static/chunks/10afagk8yn__n.js +0 -1
- package/out/_next/static/chunks/12ory_c78yl31.js +0 -1
- package/out/_next/static/chunks/1365lgwdd4vuo.js +0 -1
- package/out/_next/static/chunks/146ou-ohb_qhs.js +0 -1
- package/out/_next/static/chunks/14orr68xgdykd.js +0 -1
- package/out/_next/static/chunks/15qfoj-vl9thu.js +0 -1
- package/out/_next/static/chunks/166yqx3_qvbpy.js +0 -1
- package/out/_next/static/chunks/16gwjao676ieb.js +0 -1
- package/out/_next/static/chunks/16rmmzhy2p7bw.js +0 -1
- package/out/_next/static/chunks/18h9ugdz6igdb.js +0 -1
- package/out/_next/static/chunks/19d8n5t7ka2fb.js +0 -1
- package/out/_next/static/chunks/1_4hh3dfop93j.js +0 -1
- package/out/_next/static/chunks/1_rbzw3n4fk0g.js +0 -1
- package/out/_next/static/chunks/1bq0fcnt1wy86.js +0 -1
- package/out/_next/static/chunks/1c6mho7e0enta.js +0 -1
- package/out/_next/static/chunks/1dfaheve77dhi.js +0 -1
- package/out/_next/static/chunks/1dgf112ehnhm1.js +0 -1
- package/out/_next/static/chunks/1f07l3q77zat1.js +0 -1
- package/out/_next/static/chunks/1fervgvgv10r-.js +0 -1
- package/out/_next/static/chunks/1fsof7un7igrn.js +0 -1
- package/out/_next/static/chunks/1iel4pzhhh-c3.js +0 -1
- package/out/_next/static/chunks/1iojfx3-g4_n9.js +0 -1
- package/out/_next/static/chunks/1j4c0nvdo5q68.js +0 -3
- package/out/_next/static/chunks/1j4jt5q7px8sy.js +0 -1
- package/out/_next/static/chunks/1k_8olnprvi8r.js +0 -1
- package/out/_next/static/chunks/1l0rt7d4m-xdk.js +0 -5
- package/out/_next/static/chunks/1mt4cnd_d6jvf.js +0 -1
- package/out/_next/static/chunks/1tbes2sv-qzcx.js +0 -1
- package/out/_next/static/chunks/1upy8a5cb75kt.js +0 -1
- package/out/_next/static/chunks/1xed71f608m4b.js +0 -1
- package/out/_next/static/chunks/219n3q-_eengm.js +0 -1
- package/out/_next/static/chunks/21wo3vdr_uby8.js +0 -1
- package/out/_next/static/chunks/25gep78-izw79.js +0 -4
- package/out/_next/static/chunks/26i7dn31afdtm.js +0 -1
- package/out/_next/static/chunks/27hbplu797elx.js +0 -1
- package/out/_next/static/chunks/28i3wgvgn_at1.js +0 -1
- package/out/_next/static/chunks/2992eiy52nazj.js +0 -1
- package/out/_next/static/chunks/29bxq-67oazfg.js +0 -1
- package/out/_next/static/chunks/29ings58w7kp1.js +0 -1
- package/out/_next/static/chunks/2_n0cpkdsjzli.js +0 -1
- package/out/_next/static/chunks/2a3iy701j4r_y.js +0 -1
- package/out/_next/static/chunks/2awr1c_vfsutb.js +0 -1
- package/out/_next/static/chunks/2b5nt7yn-pq3a.js +0 -1
- package/out/_next/static/chunks/2bxe3kjr17tdp.js +0 -1
- package/out/_next/static/chunks/2dvbzar93ooc-.js +0 -1
- package/out/_next/static/chunks/2e-vp0e11g9ew.js +0 -1
- package/out/_next/static/chunks/2exj9-0p6n9x-.js +0 -1
- package/out/_next/static/chunks/2gf8l6hbmt7v3.js +0 -1
- package/out/_next/static/chunks/2jio3sio-_43z.js +0 -1
- package/out/_next/static/chunks/2laz1v9fg2a2z.js +0 -1
- package/out/_next/static/chunks/2pb_uosb-aa8x.js +0 -1
- package/out/_next/static/chunks/2qu-gpm3ux1l6.js +0 -1
- package/out/_next/static/chunks/2rsi6v7qmqx2b.js +0 -1
- package/out/_next/static/chunks/2s4fzgzkwjluu.js +0 -2
- package/out/_next/static/chunks/2tdvuc-27khif.js +0 -1
- package/out/_next/static/chunks/2trolrgd7neax.js +0 -1
- package/out/_next/static/chunks/2uyuafmoe5wi0.js +0 -3
- package/out/_next/static/chunks/2w2e0pxgs-n8f.js +0 -1
- package/out/_next/static/chunks/30y71dxdpv52d.js +0 -1
- package/out/_next/static/chunks/32c-e_v8_2xkf.js +0 -1
- package/out/_next/static/chunks/32oj0iudhp8bm.js +0 -1
- package/out/_next/static/chunks/33p9du6y9eegg.js +0 -1
- package/out/_next/static/chunks/38om-j0h0rryk.js +0 -1
- package/out/_next/static/chunks/38q0enmlg5q9o.js +0 -3
- package/out/_next/static/chunks/39pkya0_bvcaj.js +0 -1
- package/out/_next/static/chunks/3_1zzmx92j9c0.js +0 -1
- package/out/_next/static/chunks/3_earszshuz4n.js +0 -1
- package/out/_next/static/chunks/3ap_uxc8lx7ni.js +0 -1
- package/out/_next/static/chunks/3b6na8zrex8jo.js +0 -1
- package/out/_next/static/chunks/3c0cxt72vilyz.js +0 -1
- package/out/_next/static/chunks/3g78x0pdaoi_4.js +0 -1
- package/out/_next/static/chunks/3gjvl1p-tugfe.js +0 -4
- package/out/_next/static/chunks/3i8iro1gas1vx.js +0 -1
- package/out/_next/static/chunks/3kpqfqr99vo7z.js +0 -1
- package/out/_next/static/chunks/3lladf_wemm-2.js +0 -1
- package/out/_next/static/chunks/3n62hbywoknop.js +0 -1
- package/out/_next/static/chunks/3o_dmzpahx-5g.js +0 -1
- package/out/_next/static/chunks/3r7v7un976sn7.js +0 -1
- package/out/_next/static/chunks/3rl_nhqwew40w.js +0 -1
- package/out/_next/static/chunks/3s7hqij6xp_4e.js +0 -1
- package/out/_next/static/chunks/3t4ys6th6gf2w.js +0 -1
- package/out/_next/static/chunks/3uarw1i1ij1er.js +0 -1
- package/out/_next/static/chunks/3v8kgnjk27wbe.js +0 -1
- package/out/_next/static/chunks/3vu5y270muh-7.js +0 -1
- package/out/_next/static/chunks/3we1khqfexh3x.js +0 -1
- package/out/_next/static/chunks/3z35loj4i-id4.js +0 -1
- package/out/_next/static/chunks/415g3asdds1ac.js +0 -1
- package/out/_next/static/chunks/42lqt7ig40wk5.js +0 -1
- package/out/_next/static/chunks/42s6ghsurq5q7.js +0 -1
- package/out/_next/static/chunks/42yctcfi2rfwr.js +0 -1
- package/out/_next/static/chunks/43_fau1gg69eo.js +0 -1
- package/out/_next/static/chunks/43ywrdzg_7af8.js +0 -31
- package/out/_next/static/chunks/453_bg0lgesmp.js +0 -1
- package/out/_next/static/chunks/turbopack-1s36ieuku1ds3.js +0 -1
- package/out/_not-found/__next._head.txt +0 -6
- package/out/_not-found/__next._index.txt +0 -5
- package/out/_not-found/__next._not-found.txt +0 -5
- /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_buildManifest.js +0 -0
- /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → A1hxMz783bIWo0Q9qqV3L}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,40810,e=>{"use strict";var t,s,r=e.i(69400),i=e.i(64831),a=e.i(41041),o=e.i(64378),n=e.i(372);function l(e){let t,s,r,i,l,h,u,c,d,p,f,x,g,m=e.pathArray,V=e.closeArray||!1,O=e.closePath||!1,_=e.invertUV||!1,M=Math.floor(m[0].length/2),y=e.offset||M;y=y>M?M:Math.floor(y);let T=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE,b=e.uvs,v=e.colors,D=[],A=[],I=[],w=[],F=[],C=[],P=[],L=[],B=[],z=[];if(m.length<2){let e=[],t=[];for(r=0;r<m[0].length-y;r++)e.push(m[0][r]),t.push(m[0][r+y]);m=[e,t]}let E=0,S=+!!O,R=+!!V;for(s=0,t=m[0].length;s<m.length+R;s++){for(P[s]=0,F[s]=[0],t=t<(h=(l=s===m.length?m[0]:m[s]).length)?t:h,i=0;i<h;)D.push(l[i].x,l[i].y,l[i].z),i>0&&(u=l[i].subtract(l[i-1]).length()+P[s],F[s].push(u),P[s]=u),i++;O&&(i--,D.push(l[0].x,l[0].y,l[0].z),u=l[i].subtract(l[0]).length()+P[s],F[s].push(u),P[s]=u),B[s]=h+S,z[s]=E,E+=h+S}for(r=0;r<t+S;r++)for(s=0,L[r]=0,C[r]=[0];s<m.length-1+R;s++)c=m[s],d=s===m.length-1?m[0]:m[s+1],r===t?(p=c[0],f=d[0]):(p=c[r],f=d[r]),u=f.subtract(p).length()+L[r],C[r].push(u),L[r]=u;if(b)for(s=0;s<b.length;s++)w.push(b[s].x,n.useOpenGLOrientationForUV?1-b[s].y:b[s].y);else for(s=0;s<m.length+R;s++)for(r=0;r<t+S;r++)x=0!=P[s]?F[s][r]/P[s]:0,g=0!=L[r]?C[r][s]/L[r]:0,_?w.push(g,x):w.push(x,n.useOpenGLOrientationForUV?1-g:g);let U=0,N=B[s=0]-1,W=B[s+1]-1,G=N<W?N:W,H=z[1]-z[0],Z=B.length-1;for(;U<=G&&s<Z;)A.push(U,U+H,U+1),A.push(U+H+1,U+1,U+H),(U+=1)===G&&(H=z[++s+1]-z[s],N=B[s]-1,W=B[s+1]-1,U=z[s],G=N<W?N+U:W+U);if(o.VertexData.ComputeNormals(D,A,I),O){let e,t;for(s=0;s<m.length;s++){e=3*z[s],t=s+1<m.length?(z[s+1]-1)*3:I.length-3,I[e]=(I[e]+I[t])*.5,I[e+1]=(I[e+1]+I[t+1])*.5,I[e+2]=(I[e+2]+I[t+2])*.5;let r=Math.sqrt(I[e]*I[e]+I[e+1]*I[e+1]+I[e+2]*I[e+2]);I[e]/=r,I[e+1]/=r,I[e+2]/=r,I[t]=I[e],I[t+1]=I[e+1],I[t+2]=I[e+2]}}if(V){let e=3*z[0],s=3*z[m.length];for(r=0;r<t+S;r++){I[e]=(I[e]+I[s])*.5,I[e+1]=(I[e+1]+I[s+1])*.5,I[e+2]=(I[e+2]+I[s+2])*.5;let t=Math.sqrt(I[e]*I[e]+I[e+1]*I[e+1]+I[e+2]*I[e+2]);I[e]/=t,I[e+1]/=t,I[e+2]/=t,I[s]=I[e],I[s+1]=I[e+1],I[s+2]=I[e+2],e+=3,s+=3}}o.VertexData._ComputeSides(T,D,A,I,w,e.frontUVs,e.backUVs);let X=null;if(v){X=new Float32Array(4*v.length);for(let e=0;e<v.length;e++)X[4*e]=v[e].r,X[4*e+1]=v[e].g,X[4*e+2]=v[e].b,X[4*e+3]=v[e].a}let k=new o.VertexData,Y=new Float32Array(D),K=new Float32Array(I),Q=new Float32Array(w);return k.indices=A,k.positions=Y,k.normals=K,k.uvs=Q,X&&k.set(X,a.VertexBuffer.ColorKind),O&&(k._idx=z),k}function h(e,t,s=null){let u=t.pathArray,c=t.closeArray,d=t.closePath,p=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),f=t.instance,x=t.updatable;if(f){let e=r.TmpVectors.Vector3[0].setAll(Number.MAX_VALUE),s=r.TmpVectors.Vector3[1].setAll(-Number.MAX_VALUE),l=f.getVerticesData(a.VertexBuffer.PositionKind);if((t=>{let r=u[0].length,a=0,o=f._originalBuilderSideOrientation===i.Mesh.DOUBLESIDE?2:1;for(let i=1;i<=o;++i)for(let i=0;i<u.length;++i){let o=u[i],n=o.length;r=r<n?r:n;for(let i=0;i<r;++i){let r=o[i];t[a]=r.x,t[a+1]=r.y,t[a+2]=r.z,e.minimizeInPlaceFromFloats(r.x,r.y,r.z),s.maximizeInPlaceFromFloats(r.x,r.y,r.z),a+=3}if(f._creationDataStorage&&f._creationDataStorage.closePath){let e=o[0];t[a]=e.x,t[a+1]=e.y,t[a+2]=e.z,a+=3}}})(l),f.hasBoundingInfo?f.getBoundingInfo().reConstruct(e,s,f._worldMatrix):f.buildBoundingInfo(e,s,f._worldMatrix),f.updateVerticesData(a.VertexBuffer.PositionKind,l,!1,!1),t.colors){let e=f.getVerticesData(a.VertexBuffer.ColorKind);for(let s=0,r=0;s<t.colors.length;s++,r+=4){let i=t.colors[s];e[r]=i.r,e[r+1]=i.g,e[r+2]=i.b,e[r+3]=i.a}f.updateVerticesData(a.VertexBuffer.ColorKind,e,!1,!1)}if(t.uvs){let e=f.getVerticesData(a.VertexBuffer.UVKind);for(let s=0;s<t.uvs.length;s++)e[2*s]=t.uvs[s].x,e[2*s+1]=n.useOpenGLOrientationForUV?1-t.uvs[s].y:t.uvs[s].y;f.updateVerticesData(a.VertexBuffer.UVKind,e,!1,!1)}if(!f.areNormalsFrozen||f.isFacetDataEnabled){let e=f.getIndices(),t=f.getVerticesData(a.VertexBuffer.NormalKind),s=f.isFacetDataEnabled?f.getFacetDataParameters():null;if(o.VertexData.ComputeNormals(l,e,t,s),f._creationDataStorage&&f._creationDataStorage.closePath){let e,s;for(let r=0;r<u.length;r++)e=3*f._creationDataStorage.idx[r],s=r+1<u.length?(f._creationDataStorage.idx[r+1]-1)*3:t.length-3,t[e]=(t[e]+t[s])*.5,t[e+1]=(t[e+1]+t[s+1])*.5,t[e+2]=(t[e+2]+t[s+2])*.5,t[s]=t[e],t[s+1]=t[e+1],t[s+2]=t[e+2]}f.areNormalsFrozen||f.updateVerticesData(a.VertexBuffer.NormalKind,t,!1,!1)}return f}{let r=new i.Mesh(e,s);r._originalBuilderSideOrientation=p,r._creationDataStorage=new i._CreationDataStorage;let a=l(t);return d&&(r._creationDataStorage.idx=a._idx),r._creationDataStorage.closePath=d,r._creationDataStorage.closeArray=c,a.applyToMesh(r,x),r}}let u=!1;function c(e){let t=[],s=[],r=[],i=[],a=e.radius||.5,l=e.tessellation||64,h=e.arc&&(e.arc<=0||e.arc>1)?1:e.arc||1,u=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE;t.push(0,0,0),i.push(.5,.5);let c=2*Math.PI*h,d=1===h?c/l:c/(l-1),p=0;for(let e=0;e<l;e++){let e=Math.cos(p),s=Math.sin(p),r=(e+1)/2,o=(1-s)/2;t.push(a*e,a*s,0),i.push(r,n.useOpenGLOrientationForUV?1-o:o),p+=d}1===h&&(t.push(t[3],t[4],t[5]),i.push(i[2],n.useOpenGLOrientationForUV?1-i[3]:i[3]));let f=t.length/3;for(let e=1;e<f-1;e++)s.push(e+1,0,e);o.VertexData.ComputeNormals(t,s,r),o.VertexData._ComputeSides(u,t,s,r,i,e.frontUVs,e.backUVs);let x=new o.VertexData;return x.indices=s,x.positions=t,x.normals=r,x.uvs=i,x}function d(e,t={},s=null){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,c(t).applyToMesh(r,t.updatable),r}u=!0,o.VertexData.CreateRibbon=l,i.Mesh.CreateRibbon=(e,t,s=!1,r,i,a,o=!1,n,l)=>h(e,{pathArray:t,closeArray:s,closePath:r,offset:i,updatable:o,sideOrientation:n,instance:l},a);let p=!1;p=!0,o.VertexData.CreateDisc=c,i.Mesh.CreateDisc=(e,t,s,r=null,i,a)=>d(e,{radius:t,tessellation:s,sideOrientation:a,updatable:i},r);var f=e.i(19919);function x(e){let t=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23],s=[0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0],i=[],a=e.width||e.size||1,l=e.height||e.size||1,h=e.depth||e.size||1,u=e.wrap||!1,c=void 0===e.topBaseAt?1:e.topBaseAt,d=void 0===e.bottomBaseAt?0:e.bottomBaseAt;c=(c+4)%4,d=(d+4)%4;let p=[2,0,3,1][c],x=[2,0,1,3][d],g=[1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1];if(u){t=[2,3,0,2,0,1,4,5,6,4,6,7,9,10,11,9,11,8,12,14,15,12,13,14],g=[-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1];let e=[[1,1,1],[-1,1,1],[-1,1,-1],[1,1,-1]],s=[[-1,-1,1],[1,-1,1],[1,-1,-1],[-1,-1,-1]],r=[17,18,19,16],i=[22,23,20,21];for(;p>0;)e.unshift(e.pop()),r.unshift(r.pop()),p--;for(;x>0;)s.unshift(s.pop()),i.unshift(i.pop()),x--;e=e.flat(),s=s.flat(),g=g.concat(e).concat(s),t.push(r[0],r[2],r[3],r[0],r[1],r[2]),t.push(i[0],i[2],i[3],i[0],i[1],i[2])}let m=[a/2,l/2,h/2],V=g.reduce((e,t,s)=>e.concat(t*m[s%3]),[]),O=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE,_=e.faceUV||Array(6),M=e.faceColors,y=[];for(let e=0;e<6;e++)void 0===_[e]&&(_[e]=new r.Vector4(0,0,1,1)),M&&void 0===M[e]&&(M[e]=new f.Color4(1,1,1,1));for(let e=0;e<6;e++)if(i.push(_[e].z,n.useOpenGLOrientationForUV?1-_[e].w:_[e].w),i.push(_[e].x,n.useOpenGLOrientationForUV?1-_[e].w:_[e].w),i.push(_[e].x,n.useOpenGLOrientationForUV?1-_[e].y:_[e].y),i.push(_[e].z,n.useOpenGLOrientationForUV?1-_[e].y:_[e].y),M)for(let t=0;t<4;t++)y.push(M[e].r,M[e].g,M[e].b,M[e].a);o.VertexData._ComputeSides(O,V,t,s,i,e.frontUVs,e.backUVs);let T=new o.VertexData;return T.indices=t,T.positions=V,T.normals=s,T.uvs=i,M&&(T.colors=O===o.VertexData.DOUBLESIDE?y.concat(y):y),T}function g(e,t={},s=null){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,x(t).applyToMesh(r,t.updatable),r}let m=!1;function V(e){let t=e.pattern||i.Mesh.NO_FLIP,s=e.tileWidth||e.tileSize||1,r=e.tileHeight||e.tileSize||1,a=e.alignHorizontal||0,n=e.alignVertical||0,l=e.width||e.size||1,h=Math.floor(l/s),u=l-h*s,c=e.height||e.size||1,d=Math.floor(c/r),p=c-d*r,f=s*h/2,x=r*d/2,g=0,m=0,V=0,O=0,_=0,M=0;if(u>0||p>0){switch(V=-f,O=-x,_=f,M=x,a){case i.Mesh.CENTER:u/=2,V-=u,_+=u;break;case i.Mesh.LEFT:_+=u,g=-u/2;break;case i.Mesh.RIGHT:V-=u,g=u/2}switch(n){case i.Mesh.CENTER:p/=2,O-=p,M+=p;break;case i.Mesh.BOTTOM:M+=p,m=-p/2;break;case i.Mesh.TOP:O-=p,m=p/2}}let y=[],T=[],b=[];b[0]=[0,0,1,0,1,1,0,1],b[1]=[0,0,1,0,1,1,0,1],(t===i.Mesh.ROTATE_TILE||t===i.Mesh.ROTATE_ROW)&&(b[1]=[1,1,0,1,0,0,1,0]),(t===i.Mesh.FLIP_TILE||t===i.Mesh.FLIP_ROW)&&(b[1]=[1,0,0,0,0,1,1,1]),(t===i.Mesh.FLIP_N_ROTATE_TILE||t===i.Mesh.FLIP_N_ROTATE_ROW)&&(b[1]=[0,1,1,1,1,0,0,0]);let v=[],D=[],A=[],I=0;for(let e=0;e<d;e++)for(let a=0;a<h;a++)y.push(-f+a*s+g,-x+e*r+m,0),y.push(-f+(a+1)*s+g,-x+e*r+m,0),y.push(-f+(a+1)*s+g,-x+(e+1)*r+m,0),y.push(-f+a*s+g,-x+(e+1)*r+m,0),A.push(I,I+1,I+3,I+1,I+2,I+3),v=t===i.Mesh.FLIP_TILE||t===i.Mesh.ROTATE_TILE||t===i.Mesh.FLIP_N_ROTATE_TILE?v.concat(b[(a%2+e%2)%2]):t===i.Mesh.FLIP_ROW||t===i.Mesh.ROTATE_ROW||t===i.Mesh.FLIP_N_ROTATE_ROW?v.concat(b[e%2]):v.concat(b[0]),D.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1),I+=4;if(u>0||p>0){let e,o,l,c,b,w=p>0&&(n===i.Mesh.CENTER||n===i.Mesh.TOP),F=p>0&&(n===i.Mesh.CENTER||n===i.Mesh.BOTTOM),C=u>0&&(a===i.Mesh.CENTER||a===i.Mesh.RIGHT),P=u>0&&(a===i.Mesh.CENTER||a===i.Mesh.LEFT);if(w&&C&&(y.push(V+g,O+m,0),y.push(-f+g,O+m,0),y.push(-f+g,O+p+m,0),y.push(V+g,O+p+m,0),A.push(I,I+1,I+3,I+1,I+2,I+3),I+=4,c=1,b=1,e=[o=1-u/s,l=1-p/r,c,l,c,b,o,b],t===i.Mesh.ROTATE_ROW&&(e=[1-o,1-l,1-c,1-l,1-c,1-b,1-o,1-b]),t===i.Mesh.FLIP_ROW&&(e=[1-o,l,1-c,l,1-c,b,1-o,b]),t===i.Mesh.FLIP_N_ROTATE_ROW&&(e=[o,1-l,c,1-l,c,1-b,o,1-b]),v=v.concat(e),D.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),w&&P&&(y.push(f+g,O+m,0),y.push(_+g,O+m,0),y.push(_+g,O+p+m,0),y.push(f+g,O+p+m,0),A.push(I,I+1,I+3,I+1,I+2,I+3),I+=4,b=1,e=[o=0,l=1-p/r,c=u/s,l,c,b,o,b],(t===i.Mesh.ROTATE_ROW||t===i.Mesh.ROTATE_TILE&&h%2==0)&&(e=[1-o,1-l,1-c,1-l,1-c,1-b,1-o,1-b]),(t===i.Mesh.FLIP_ROW||t===i.Mesh.FLIP_TILE&&h%2==0)&&(e=[1-o,l,1-c,l,1-c,b,1-o,b]),(t===i.Mesh.FLIP_N_ROTATE_ROW||t===i.Mesh.FLIP_N_ROTATE_TILE&&h%2==0)&&(e=[o,1-l,c,1-l,c,1-b,o,1-b]),v=v.concat(e),D.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),F&&C&&(y.push(V+g,x+m,0),y.push(-f+g,x+m,0),y.push(-f+g,M+m,0),y.push(V+g,M+m,0),A.push(I,I+1,I+3,I+1,I+2,I+3),I+=4,l=0,c=1,e=[o=1-u/s,l,c,l,c,b=p/r,o,b],(t===i.Mesh.ROTATE_ROW&&d%2==1||t===i.Mesh.ROTATE_TILE&&d%1==0)&&(e=[1-o,1-l,1-c,1-l,1-c,1-b,1-o,1-b]),(t===i.Mesh.FLIP_ROW&&d%2==1||t===i.Mesh.FLIP_TILE&&d%2==0)&&(e=[1-o,l,1-c,l,1-c,b,1-o,b]),(t===i.Mesh.FLIP_N_ROTATE_ROW&&d%2==1||t===i.Mesh.FLIP_N_ROTATE_TILE&&d%2==0)&&(e=[o,1-l,c,1-l,c,1-b,o,1-b]),v=v.concat(e),D.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),F&&P&&(y.push(f+g,x+m,0),y.push(_+g,x+m,0),y.push(_+g,M+m,0),y.push(f+g,M+m,0),A.push(I,I+1,I+3,I+1,I+2,I+3),I+=4,e=[o=0,l=0,c=u/s,l,c,b=p/r,o,b],(t===i.Mesh.ROTATE_ROW&&d%2==1||t===i.Mesh.ROTATE_TILE&&(d+h)%2==1)&&(e=[1-o,1-l,1-c,1-l,1-c,1-b,1-o,1-b]),(t===i.Mesh.FLIP_ROW&&d%2==1||t===i.Mesh.FLIP_TILE&&(d+h)%2==1)&&(e=[1-o,l,1-c,l,1-c,b,1-o,b]),(t===i.Mesh.FLIP_N_ROTATE_ROW&&d%2==1||t===i.Mesh.FLIP_N_ROTATE_TILE&&(d+h)%2==1)&&(e=[o,1-l,c,1-l,c,1-b,o,1-b]),v=v.concat(e),D.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),w){let e=[];o=0,l=1-p/r,c=1,b=1,e[0]=[o,l,c,l,c,b,o,b],e[1]=[o,l,c,l,c,b,o,b],(t===i.Mesh.ROTATE_TILE||t===i.Mesh.ROTATE_ROW)&&(e[1]=[1-o,1-l,1-c,1-l,1-c,1-b,1-o,1-b]),(t===i.Mesh.FLIP_TILE||t===i.Mesh.FLIP_ROW)&&(e[1]=[1-o,l,1-c,l,1-c,b,1-o,b]),(t===i.Mesh.FLIP_N_ROTATE_TILE||t===i.Mesh.FLIP_N_ROTATE_ROW)&&(e[1]=[o,1-l,c,1-l,c,1-b,o,1-b]);for(let r=0;r<h;r++)y.push(-f+r*s+g,O+m,0),y.push(-f+(r+1)*s+g,O+m,0),y.push(-f+(r+1)*s+g,O+p+m,0),y.push(-f+r*s+g,O+p+m,0),A.push(I,I+1,I+3,I+1,I+2,I+3),I+=4,v=t===i.Mesh.FLIP_TILE||t===i.Mesh.ROTATE_TILE||t===i.Mesh.FLIP_N_ROTATE_TILE?v.concat(e[(r+1)%2]):t===i.Mesh.FLIP_ROW||t===i.Mesh.ROTATE_ROW||t===i.Mesh.FLIP_N_ROTATE_ROW?v.concat(e[1]):v.concat(e[0]),D.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)}if(F){let e=[];o=0,l=0,c=1,b=p/r,e[0]=[o,l,c,l,c,b,o,b],e[1]=[o,l,c,l,c,b,o,b],(t===i.Mesh.ROTATE_TILE||t===i.Mesh.ROTATE_ROW)&&(e[1]=[1-o,1-l,1-c,1-l,1-c,1-b,1-o,1-b]),(t===i.Mesh.FLIP_TILE||t===i.Mesh.FLIP_ROW)&&(e[1]=[1-o,l,1-c,l,1-c,b,1-o,b]),(t===i.Mesh.FLIP_N_ROTATE_TILE||t===i.Mesh.FLIP_N_ROTATE_ROW)&&(e[1]=[o,1-l,c,1-l,c,1-b,o,1-b]);for(let r=0;r<h;r++)y.push(-f+r*s+g,M-p+m,0),y.push(-f+(r+1)*s+g,M-p+m,0),y.push(-f+(r+1)*s+g,M+m,0),y.push(-f+r*s+g,M+m,0),A.push(I,I+1,I+3,I+1,I+2,I+3),I+=4,v=t===i.Mesh.FLIP_TILE||t===i.Mesh.ROTATE_TILE||t===i.Mesh.FLIP_N_ROTATE_TILE?v.concat(e[(r+d)%2]):t===i.Mesh.FLIP_ROW||t===i.Mesh.ROTATE_ROW||t===i.Mesh.FLIP_N_ROTATE_ROW?v.concat(e[d%2]):v.concat(e[0]),D.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)}if(C){let e=[];o=1-u/s,l=0,c=1,b=1,e[0]=[o,l,c,l,c,b,o,b],e[1]=[o,l,c,l,c,b,o,b],(t===i.Mesh.ROTATE_TILE||t===i.Mesh.ROTATE_ROW)&&(e[1]=[1-o,1-l,1-c,1-l,1-c,1-b,1-o,1-b]),(t===i.Mesh.FLIP_TILE||t===i.Mesh.FLIP_ROW)&&(e[1]=[1-o,l,1-c,l,1-c,b,1-o,b]),(t===i.Mesh.FLIP_N_ROTATE_TILE||t===i.Mesh.FLIP_N_ROTATE_ROW)&&(e[1]=[o,1-l,c,1-l,c,1-b,o,1-b]);for(let s=0;s<d;s++)y.push(V+g,-x+s*r+m,0),y.push(V+u+g,-x+s*r+m,0),y.push(V+u+g,-x+(s+1)*r+m,0),y.push(V+g,-x+(s+1)*r+m,0),A.push(I,I+1,I+3,I+1,I+2,I+3),I+=4,v=t===i.Mesh.FLIP_TILE||t===i.Mesh.ROTATE_TILE||t===i.Mesh.FLIP_N_ROTATE_TILE?v.concat(e[(s+1)%2]):t===i.Mesh.FLIP_ROW||t===i.Mesh.ROTATE_ROW||t===i.Mesh.FLIP_N_ROTATE_ROW?v.concat(e[s%2]):v.concat(e[0]),D.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)}if(P){let e=[];o=0,l=0,c=u/r,b=1,e[0]=[o,l,c,l,c,b,o,b],e[1]=[o,l,c,l,c,b,o,b],(t===i.Mesh.ROTATE_TILE||t===i.Mesh.ROTATE_ROW)&&(e[1]=[1-o,1-l,1-c,1-l,1-c,1-b,1-o,1-b]),(t===i.Mesh.FLIP_TILE||t===i.Mesh.FLIP_ROW)&&(e[1]=[1-o,l,1-c,l,1-c,b,1-o,b]),(t===i.Mesh.FLIP_N_ROTATE_TILE||t===i.Mesh.FLIP_N_ROTATE_ROW)&&(e[1]=[o,1-l,c,1-l,c,1-b,o,1-b]);for(let s=0;s<d;s++)y.push(_-u+g,-x+s*r+m,0),y.push(_+g,-x+s*r+m,0),y.push(_+g,-x+(s+1)*r+m,0),y.push(_-u+g,-x+(s+1)*r+m,0),A.push(I,I+1,I+3,I+1,I+2,I+3),I+=4,v=t===i.Mesh.FLIP_TILE||t===i.Mesh.ROTATE_TILE||t===i.Mesh.FLIP_N_ROTATE_TILE?v.concat(e[(s+h)%2]):t===i.Mesh.FLIP_ROW||t===i.Mesh.ROTATE_ROW||t===i.Mesh.FLIP_N_ROTATE_ROW?v.concat(e[s%2]):v.concat(e[0]),D.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),T.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)}}let w=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE;o.VertexData._ComputeSides(w,y,A,T,v,e.frontUVs,e.backUVs);let F=new o.VertexData;return F.indices=A,F.positions=y,F.normals=T,F.uvs=v,F.colors=w===o.VertexData.DOUBLESIDE?D.concat(D):D,F}m=!0,o.VertexData.CreateBox=x,i.Mesh.CreateBox=(e,t,s=null,r,i)=>g(e,{size:t,sideOrientation:i,updatable:r},s);let O=!1;function _(){O||(O=!0,o.VertexData.CreateTiledPlane=V)}function M(e){let t,s=e.faceUV||Array(6),a=e.faceColors,l=e.pattern||i.Mesh.NO_FLIP,h=e.width||e.size||1,u=e.height||e.size||1,c=e.depth||e.size||1,d=e.tileWidth||e.tileSize||1,p=e.tileHeight||e.tileSize||1,x=e.alignHorizontal||0,g=e.alignVertical||0,m=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE;for(let e=0;e<6;e++)void 0===s[e]&&(s[e]=new r.Vector4(0,0,1,1)),a&&void 0===a[e]&&(a[e]=new f.Color4(1,1,1,1));let O=h/2,_=u/2,M=c/2,y=[];for(let e=0;e<2;e++)y[e]=V({pattern:l,tileWidth:d,tileHeight:p,width:h,height:u,alignVertical:g,alignHorizontal:x,sideOrientation:m});for(let e=2;e<4;e++)y[e]=V({pattern:l,tileWidth:d,tileHeight:p,width:c,height:u,alignVertical:g,alignHorizontal:x,sideOrientation:m});let T=g;g===i.Mesh.BOTTOM?T=i.Mesh.TOP:g===i.Mesh.TOP&&(T=i.Mesh.BOTTOM);for(let e=4;e<6;e++)y[e]=V({pattern:l,tileWidth:d,tileHeight:p,width:h,height:c,alignVertical:T,alignHorizontal:x,sideOrientation:m});let b=[],v=[],D=[],A=[],I=[],w=[],F=[],C=[],P=0;for(let e=0;e<6;e++){let i=y[e].positions.length;w[e]=[],F[e]=[];for(let t=0;t<i/3;t++)w[e].push(new r.Vector3(y[e].positions[3*t],y[e].positions[3*t+1],y[e].positions[3*t+2])),F[e].push(new r.Vector3(y[e].normals[3*t],y[e].normals[3*t+1],y[e].normals[3*t+2]));t=y[e].uvs.length,C[e]=[];for(let r=0;r<t;r+=2)C[e][r]=s[e].x+(s[e].z-s[e].x)*y[e].uvs[r],C[e][r+1]=s[e].y+(s[e].w-s[e].y)*y[e].uvs[r+1],n.useOpenGLOrientationForUV&&(C[e][r+1]=1-C[e][r+1]);if(D=D.concat(C[e]),A=A.concat(y[e].indices.map(e=>e+P)),P+=w[e].length,a){let t=a[e];for(let s=0;s<w[e].length;s++)I.push(t.r,t.g,t.b,t.a)}}let L=[{m:r.Matrix.RotationY(Math.PI),t:new r.Vector3(0,0,M),op:1},{m:r.Matrix.Identity(),t:new r.Vector3(0,0,M),op:-1},{m:r.Matrix.RotationY(-Math.PI/2),t:new r.Vector3(O,0,0),op:1},{m:r.Matrix.RotationY(Math.PI/2),t:new r.Vector3(O,0,0),op:-1},{m:r.Matrix.RotationX(Math.PI/2),t:new r.Vector3(0,_,0),op:1},{m:r.Matrix.RotationX(-Math.PI/2),t:new r.Vector3(0,_,0),op:-1}];for(let e=0;e<6;e++){let{m:t,t:s,op:i}=L[e];for(let a of w[e]){let e=r.Vector3.TransformCoordinates(a,t),o=1===i?e.add(s):e.subtract(s);b.push(o.x,o.y,o.z)}for(let s of F[e]){let e=r.Vector3.TransformNormal(s,t);v.push(e.x,e.y,e.z)}}let B=new o.VertexData;return B.indices=A,B.positions=b,B.normals=v,B.uvs=D,a&&(B.colors=m===o.VertexData.DOUBLESIDE?I.concat(I):I),B}let y=!1;function T(e){let t=0|(e.segments||32),s=e.diameterX||e.diameter||1,i=e.diameterY||e.diameter||1,a=e.diameterZ||e.diameter||1,l=e.arc&&(e.arc<=0||e.arc>1)?1:e.arc||1,h=e.slice&&e.slice<=0?1:e.slice||1,u=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE,c=!!e.dedupTopBottomIndices,d=new r.Vector3(s/2,i/2,a/2),p=2+t,f=2*p,x=[],g=[],m=[],V=[];for(let e=0;e<=p;e++){let t=e/p,s=t*Math.PI*h;for(let e=0;e<=f;e++){let i=e/f,a=i*Math.PI*2*l,o=r.Matrix.RotationZ(-s),h=r.Matrix.RotationY(a),u=r.Vector3.TransformCoordinates(r.Vector3.Up(),o),c=r.Vector3.TransformCoordinates(u,h),p=c.multiply(d),x=c.divide(d).normalize();g.push(p.x,p.y,p.z),m.push(x.x,x.y,x.z),V.push(i,n.useOpenGLOrientationForUV?1-t:t)}if(e>0){let t=g.length/3;for(let s=t-2*(f+1);s+f+2<t;s++)c?(e>1&&(x.push(s),x.push(s+1),x.push(s+f+1)),(e<p||h<1)&&(x.push(s+f+1),x.push(s+1),x.push(s+f+2))):(x.push(s),x.push(s+1),x.push(s+f+1),x.push(s+f+1),x.push(s+1),x.push(s+f+2))}}o.VertexData._ComputeSides(u,g,x,m,V,e.frontUVs,e.backUVs);let O=new o.VertexData;return O.indices=x,O.positions=g,O.normals=m,O.uvs=V,O}function b(e,t={},s=null){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,T(t).applyToMesh(r,t.updatable),r}y=!0,_(),o.VertexData.CreateTiledBox=M;let v=!1;v=!0,o.VertexData.CreateSphere=T,i.Mesh.CreateSphere=(e,t,s,r,i,a)=>b(e,{segments:t,diameterX:s,diameterY:s,diameterZ:s,sideOrientation:a,updatable:i},r);var D=e.i(66460),A=e.i(26924);function I(e){let t,s,a,l,h,u,c,d,p,x=e.height||2,g=0===e.diameterTop?0:e.diameterTop||e.diameter||1,m=0===e.diameterBottom?0:e.diameterBottom||e.diameter||1;g=g||1e-5,m=m||1e-5;let V=0|(e.tessellation||24),O=0|(e.subdivisions||1),_=!!e.hasRings,M=!!e.enclose,y=0===e.cap?0:e.cap||i.Mesh.CAP_ALL,T=e.arc&&(e.arc<=0||e.arc>1)?1:e.arc||1,b=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE,v=e.faceUV||[,,,],D=e.faceColors,I=2+(1+(1!==T&&M?2:0))*(_?O:1);for(t=0;t<I;t++)D&&void 0===D[t]&&(D[t]=new f.Color4(1,1,1,1));for(t=0;t<I;t++)v&&void 0===v[t]&&(v[t]=new r.Vector4(0,0,1,1));let w=[],F=[],C=[],P=[],L=[],B=2*Math.PI*T/V,z=(m-g)/2/x,E=r.Vector3.Zero(),S=r.Vector3.Zero(),R=r.Vector3.Zero(),U=r.Vector3.Zero(),N=r.Vector3.Zero(),W=A.Axis.Y,G=1,H=0;for(h=0;h<=O;h++)for(c=0,l=((a=h/O)*(g-m)+m)/2,d=_&&0!==h&&h!==O?2:1;c<d;c++){for(_&&(G+=c),M&&(G+=2*c),u=0;u<=V;u++)E.x=Math.cos(-(s=u*B))*l,E.y=-x/2+a*x,E.z=Math.sin(-s)*l,0===g&&h===O?(S.x=C[C.length-(V+1)*3],S.y=C[C.length-(V+1)*3+1],S.z=C[C.length-(V+1)*3+2]):(S.x=E.x,S.z=E.z,S.y=Math.sqrt(S.x*S.x+S.z*S.z)*z,S.normalize()),0===u&&(R.copyFrom(E),U.copyFrom(S)),F.push(E.x,E.y,E.z),C.push(S.x,S.y,S.z),p=_?H!==G?v[G].y:v[G].w:v[G].y+(v[G].w-v[G].y)*a,P.push(v[G].x+(v[G].z-v[G].x)*u/V,n.useOpenGLOrientationForUV?1-p:p),D&&L.push(D[G].r,D[G].g,D[G].b,D[G].a);1!==T&&M&&(F.push(E.x,E.y,E.z),F.push(0,E.y,0),F.push(0,E.y,0),F.push(R.x,R.y,R.z),r.Vector3.CrossToRef(W,S,N),N.normalize(),C.push(N.x,N.y,N.z,N.x,N.y,N.z),r.Vector3.CrossToRef(U,W,N),N.normalize(),C.push(N.x,N.y,N.z,N.x,N.y,N.z),p=_?H!==G?v[G+1].y:v[G+1].w:v[G+1].y+(v[G+1].w-v[G+1].y)*a,P.push(v[G+1].x,n.useOpenGLOrientationForUV?1-p:p),P.push(v[G+1].z,n.useOpenGLOrientationForUV?1-p:p),p=_?H!==G?v[G+2].y:v[G+2].w:v[G+2].y+(v[G+2].w-v[G+2].y)*a,P.push(v[G+2].x,n.useOpenGLOrientationForUV?1-p:p),P.push(v[G+2].z,n.useOpenGLOrientationForUV?1-p:p),D&&(L.push(D[G+1].r,D[G+1].g,D[G+1].b,D[G+1].a),L.push(D[G+1].r,D[G+1].g,D[G+1].b,D[G+1].a),L.push(D[G+2].r,D[G+2].g,D[G+2].b,D[G+2].a),L.push(D[G+2].r,D[G+2].g,D[G+2].b,D[G+2].a))),H!==G&&(H=G)}let Z=1!==T&&M?V+4:V;for(G=0,h=0;G<O;G++){let e=0,t=0,s=0,r=0;for(u=0;u<V;u++)e=h*(Z+1)+u,t=(h+1)*(Z+1)+u,s=h*(Z+1)+(u+1),r=(h+1)*(Z+1)+(u+1),w.push(e,t,s),w.push(r,s,t);1!==T&&M&&(w.push(e+2,t+2,s+2),w.push(r+2,s+2,t+2),w.push(e+4,t+4,s+4),w.push(r+4,s+4,t+4)),h=_?h+2:h+1}let X=e=>{let t,s,i,a=e?g/2:m/2;if(0===a)return;let o=e?v[I-1]:v[0],l=null;D&&(l=e?D[I-1]:D[0]);let h=F.length/3,u=e?x/2:-x/2,c=new r.Vector3(0,u,0);F.push(c.x,c.y,c.z),C.push(0,e?1:-1,0);let d=o.y+(o.w-o.y)*.5;P.push(o.x+(o.z-o.x)*.5,n.useOpenGLOrientationForUV?1-d:d),l&&L.push(l.r,l.g,l.b,l.a);let p=new r.Vector2(.5,.5);for(i=0;i<=V;i++){let h=Math.cos(-(t=2*Math.PI*i*T/V)),c=Math.sin(-t);s=new r.Vector3(h*a,u,c*a);let d=new r.Vector2(h*p.x+.5,c*p.y+.5);F.push(s.x,s.y,s.z),C.push(0,e?1:-1,0);let f=o.y+(o.w-o.y)*d.y;P.push(o.x+(o.z-o.x)*d.x,n.useOpenGLOrientationForUV?1-f:f),l&&L.push(l.r,l.g,l.b,l.a)}for(i=0;i<V;i++)e?(w.push(h),w.push(h+(i+2)),w.push(h+(i+1))):(w.push(h),w.push(h+(i+1)),w.push(h+(i+2)))};(y===i.Mesh.CAP_START||y===i.Mesh.CAP_ALL)&&X(!1),(y===i.Mesh.CAP_END||y===i.Mesh.CAP_ALL)&&X(!0),o.VertexData._ComputeSides(b,F,w,C,P,e.frontUVs,e.backUVs);let k=new o.VertexData;return k.indices=w,k.positions=F,k.normals=C,k.uvs=P,D&&(k.colors=L),k}function w(e,t={},s){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,I(t).applyToMesh(r,t.updatable),r}let F=!1;function C(e){let t=[],s=[],i=[],a=[],l=e.diameter||1,h=e.thickness||.5,u=0|(e.tessellation||16),c=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE,d=u+1;for(let e=0;e<=u;e++){let o=e/u,c=e*Math.PI*2/u-Math.PI/2,p=r.Matrix.Translation(l/2,0,0).multiply(r.Matrix.RotationY(c));for(let l=0;l<=u;l++){let c=1-l/u,f=l*Math.PI*2/u+Math.PI,x=Math.cos(f),g=Math.sin(f),m=new r.Vector3(x,g,0),V=m.scale(h/2),O=new r.Vector2(o,c);V=r.Vector3.TransformCoordinates(V,p),m=r.Vector3.TransformNormal(m,p),s.push(V.x,V.y,V.z),i.push(m.x,m.y,m.z),a.push(O.x,n.useOpenGLOrientationForUV?1-O.y:O.y);let _=(e+1)%d,M=(l+1)%d;t.push(e*d+l),t.push(e*d+M),t.push(_*d+l),t.push(e*d+M),t.push(_*d+M),t.push(_*d+l)}}o.VertexData._ComputeSides(c,s,t,i,a,e.frontUVs,e.backUVs);let p=new o.VertexData;return p.indices=t,p.positions=s,p.normals=i,p.uvs=a,p}function P(e,t={},s){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,C(t).applyToMesh(r,t.updatable),r}F=!0,o.VertexData.CreateCylinder=I,i.Mesh.CreateCylinder=(e,t,s,r,a,o,n,l,h)=>(void 0!==n&&n instanceof D.Scene||(void 0!==n&&(h=l||i.Mesh.DEFAULTSIDE,l=n),n=o,o=1),w(e,{height:t,diameterTop:s,diameterBottom:r,tessellation:a,subdivisions:o,sideOrientation:h,updatable:l},n));let L=!1;function B(e){let t,s,i=[],a=[],l=[],h=[],u=e.radius||2,c=e.tube||.5,d=e.radialSegments||32,p=e.tubularSegments||32,f=e.p||2,x=e.q||3,g=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE,m=e=>{let t=Math.cos(e),s=Math.sin(e),i=x/f*e,a=Math.cos(i),o=u*Math.sin(i)*.5;return new r.Vector3(u*(2+a)*.5*t,u*(2+a)*s*.5,o)};for(t=0;t<=d;t++){let e=t%d/d*2*f*Math.PI,i=m(e),o=m(e+.01),l=o.subtract(i),u=o.add(i),x=r.Vector3.Cross(l,u);for(u=r.Vector3.Cross(x,l),x.normalize(),u.normalize(),s=0;s<p;s++){let e=s%p/p*2*Math.PI,r=-c*Math.cos(e),o=c*Math.sin(e);a.push(i.x+r*u.x+o*x.x),a.push(i.y+r*u.y+o*x.y),a.push(i.z+r*u.z+o*x.z),h.push(t/d),h.push(n.useOpenGLOrientationForUV?1-s/p:s/p)}}for(t=0;t<d;t++)for(s=0;s<p;s++){let e=(s+1)%p,r=t*p+s,a=(t+1)*p+s,o=(t+1)*p+e,n=t*p+e;i.push(n),i.push(a),i.push(r),i.push(n),i.push(o),i.push(a)}o.VertexData.ComputeNormals(a,i,l),o.VertexData._ComputeSides(g,a,i,l,h,e.frontUVs,e.backUVs);let V=new o.VertexData;return V.indices=i,V.positions=a,V.normals=l,V.uvs=h,V}function z(e,t={},s){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,B(t).applyToMesh(r,t.updatable),r}L=!0,o.VertexData.CreateTorus=C,i.Mesh.CreateTorus=(e,t,s,r,i,a,o)=>P(e,{diameter:t,thickness:s,tessellation:r,sideOrientation:o,updatable:a},i);let E=!1;E=!0,o.VertexData.CreateTorusKnot=B,i.Mesh.CreateTorusKnot=(e,t,s,r,i,a,o,n,l,h)=>z(e,{radius:t,tube:s,radialSegments:r,tubularSegments:i,p:a,q:o,sideOrientation:h,updatable:l},n);var S=i,R=e.i(3578),U=e.i(46533),N=e.i(28548),W=e.i(85050);class G extends S.Mesh{_isShaderMaterial(e){return!!e&&"ShaderMaterial"===e.getClassName()}constructor(t,s=null,r=null,i=null,o,n,l,h){super(t,s,r,i,o),this.useVertexColor=n,this.useVertexAlpha=l,this.color=new f.Color3(1,1,1),this.alpha=1,this._shaderLanguage=0,this._ownsMaterial=!1,i&&(this.color=i.color.clone(),this.alpha=i.alpha,this.useVertexColor=i.useVertexColor,this.useVertexAlpha=i.useVertexAlpha),this.intersectionThreshold=.1;const u={attributes:[a.VertexBuffer.PositionKind],uniforms:["world","viewProjection"],needAlphaBlending:!0,defines:[],useClipPlane:null,shaderLanguage:0};if(this.useVertexAlpha?u.defines.push("#define VERTEXALPHA"):u.needAlphaBlending=!1,this.useVertexColor?(u.defines.push("#define VERTEXCOLOR"),u.attributes.push(a.VertexBuffer.ColorKind)):(u.uniforms.push("color"),this._color4=new f.Color4),h)this.material=h;else{this.getScene().getEngine().isWebGPU&&!G.ForceGLSL&&(this._shaderLanguage=1),u.shaderLanguage=this._shaderLanguage,u.extraInitializationsAsync=async()=>{1===this._shaderLanguage?await Promise.all([e.A(19192),e.A(11432)]):await Promise.all([e.A(17418),e.A(58725)])};const t=new N.ShaderMaterial("colorShader",this.getScene(),"color",u,!1);t.doNotSerialize=!0,this._ownsMaterial=!0,this._setInternalMaterial(t)}}getClassName(){return"LinesMesh"}get material(){return this._internalAbstractMeshDataInfo._material}set material(e){let t=this.material;if(t===e)return;let s=t&&this._ownsMaterial;this._ownsMaterial=!1,this._setInternalMaterial(e),s&&t?.dispose()}_setInternalMaterial(e){this._setMaterial(e),this.material&&(this.material.fillMode=U.Material.LineListDrawMode,this.material.disableLighting=!0)}get checkCollisions(){return!1}set checkCollisions(e){}_bind(e,t){if(!this._geometry)return this;let s=this.isUnIndexed?null:this._geometry.getIndexBuffer();if(!this._userInstancedBuffersStorage||this.hasThinInstances?this._geometry._bind(t,s):this._geometry._bind(t,s,this._userInstancedBuffersStorage.vertexBuffers,this._userInstancedBuffersStorage.vertexArrayObjects),!this.useVertexColor&&this._isShaderMaterial(this.material)){let{r:e,g:t,b:s}=this.color;this._color4.set(e,t,s,this.alpha),this.material.setColor4("color",this._color4)}return this}_draw(e,t,s){if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;let r=this.getScene().getEngine();return this._unIndexed?r.drawArraysType(U.Material.LineListDrawMode,e.verticesStart,e.verticesCount,s):r.drawElementsType(U.Material.LineListDrawMode,e.indexStart,e.indexCount,s),this}dispose(e,t=!1,s){!s&&(this._ownsMaterial?this.material?.dispose(!1,!1,!0):t&&this.material?.dispose(!1,!1,!0)),super.dispose(e)}clone(e,t=null,s){return t&&void 0===t._addToSceneRootNodes?(t.source=this,new G(e,this.getScene(),t.parent,t.source,t.doNotCloneChildren)):new G(e,this.getScene(),t,this,s)}createInstance(e){let t=new H(e,this);if(this.instancedBuffers)for(let e in t.instancedBuffers={},this.instancedBuffers)t.instancedBuffers[e]=this.instancedBuffers[e];return t}serialize(e){super.serialize(e),e.color=this.color.asArray(),e.alpha=this.alpha}static Parse(e,t){let s=new G(e.name,t);return s.color=f.Color3.FromArray(e.color),s.alpha=e.alpha,s}}G.ForceGLSL=!1;class H extends R.InstancedMesh{constructor(e,t){super(e,t),this.intersectionThreshold=t.intersectionThreshold}getClassName(){return"InstancedLinesMesh"}}(t=G.prototype).enableEdgesRendering??(t.enableEdgesRendering=(0,W._MissingSideEffect)("LinesMesh","enableEdgesRendering")),(s=H.prototype).enableEdgesRendering??(s.enableEdgesRendering=(0,W._MissingSideEffect)("InstancedLinesMesh","enableEdgesRendering"));var Z=e.i(16347);function X(e){let t=[],s=[],r=e.lines,i=e.colors,a=[],n=0;for(let e=0;e<r.length;e++){let o=r[e];for(let r=0;r<o.length;r++){let{x:l,y:h,z:u}=o[r];if(s.push(l,h,u),i){let{r:t,g:s,b:o,a:n}=i[e][r];a.push(t,s,o,n)}r>0&&(t.push(n-1),t.push(n)),n++}}let l=new o.VertexData;return l.indices=t,l.positions=s,i&&(l.colors=a),l}function k(e){let t,s,i,a=e.dashSize||3,n=e.gapSize||1,l=e.dashNb||200,h=e.points,u=[],c=[],d=r.Vector3.Zero(),p=0,f=0;for(i=0;i<h.length-1;i++)h[i+1].subtractToRef(h[i],d),p+=d.length();let x=p/l,g=a*x/(a+n);for(i=0;i<h.length-1;i++){h[i+1].subtractToRef(h[i],d),t=Math.floor(d.length()/x),d.normalize();for(let e=0;e<t;e++)s=x*e,u.push(h[i].x+s*d.x,h[i].y+s*d.y,h[i].z+s*d.z),u.push(h[i].x+(s+g)*d.x,h[i].y+(s+g)*d.y,h[i].z+(s+g)*d.z),c.push(f,f+1),f+=2}let m=new o.VertexData;return m.positions=u,m.indices=c,m}function Y(e,t,s=null){let r=t.instance,i=t.lines,o=t.colors;if(r){let e,t,s=r.getVerticesData(a.VertexBuffer.PositionKind);o&&(e=r.getVerticesData(a.VertexBuffer.ColorKind));let n=0,l=0;for(let r=0;r<i.length;r++){let a=i[r];for(let i=0;i<a.length;i++)s[n]=a[i].x,s[n+1]=a[i].y,s[n+2]=a[i].z,o&&e&&(t=o[r],e[l]=t[i].r,e[l+1]=t[i].g,e[l+2]=t[i].b,e[l+3]=t[i].a,l+=4),n+=3}return r.updateVerticesData(a.VertexBuffer.PositionKind,s,!1,!1),o&&e&&r.updateVerticesData(a.VertexBuffer.ColorKind,e,!1,!1),r.refreshBoundingInfo(),r}let n=new G(e,s,null,void 0,void 0,!!o,t.useVertexAlpha,t.material);return X(t).applyToMesh(n,t.updatable),n}function K(e,t,s=null){let r=t.colors?[t.colors]:null;return Y(e,{lines:[t.points],updatable:t.updatable,instance:t.instance,colors:r,useVertexAlpha:t.useVertexAlpha,material:t.material},s)}function Q(e,t,s=null){let a=t.points,o=t.instance,n=t.gapSize||1,l=t.dashSize||3;if(o)return(t.dashNb||t.dashSize||t.gapSize||t.useVertexAlpha||t.material)&&Z.Logger.Warn("You have used an option other than points with the instance option. Please be aware that these other options will be ignored."),o.updateMeshPositions(e=>{let t,s,i,n,l=r.Vector3.Zero(),h=e.length/6,u=0,c=0;for(i=0;i<a.length-1;i++)a[i+1].subtractToRef(a[i],l),u+=l.length();let d=u/h,p=o._creationDataStorage.dashSize,f=p*d/(p+o._creationDataStorage.gapSize);for(i=0;i<a.length-1;i++)for(a[i+1].subtractToRef(a[i],l),t=Math.floor(l.length()/d),l.normalize(),n=0;n<t&&c<e.length;)s=d*n,e[c]=a[i].x+s*l.x,e[c+1]=a[i].y+s*l.y,e[c+2]=a[i].z+s*l.z,e[c+3]=a[i].x+(s+f)*l.x,e[c+4]=a[i].y+(s+f)*l.y,e[c+5]=a[i].z+(s+f)*l.z,c+=6,n++;for(;c<e.length;)e[c]=a[i].x,e[c+1]=a[i].y,e[c+2]=a[i].z,c+=3},!1),o;let h=new G(e,s,null,void 0,void 0,void 0,t.useVertexAlpha,t.material);return k(t).applyToMesh(h,t.updatable),h._creationDataStorage=new i._CreationDataStorage,h._creationDataStorage.dashSize=l,h._creationDataStorage.gapSize=n,h}let q=!1;q=!0,o.VertexData.CreateLineSystem=X,o.VertexData.CreateDashedLines=k,i.Mesh.CreateLines=(e,t,s=null,r=!1,i=null)=>K(e,{points:t,updatable:r,instance:i},s),i.Mesh.CreateDashedLines=(e,t,s,r,i,a=null,o,n)=>Q(e,{points:t,dashSize:s,gapSize:r,dashNb:i,updatable:o,instance:n},a);var j=r,J=e.i(29667),$=e.i(84106),ee=e.i(23003);class et extends j.Vector2{constructor(e,t){super(e.x,e.y),this.index=t}}class es{constructor(){this.elements=[]}add(e){let t=[];for(let s of e){let e=new et(s,this.elements.length);t.push(e),this.elements.push(e)}return t}computeBounds(){let e=new j.Vector2(this.elements[0].x,this.elements[0].y),t=new j.Vector2(this.elements[0].x,this.elements[0].y);for(let s of this.elements)s.x<e.x?e.x=s.x:s.x>t.x&&(t.x=s.x),s.y<e.y?e.y=s.y:s.y>t.y&&(t.y=s.y);return{min:e,max:t,width:t.x-e.x,height:t.y-e.y}}}class er{_addToepoint(e){for(let t of e)this._epoints.push(t.x,t.y)}constructor(e,t,s,r=earcut){let i;this._points=new es,this._outlinepoints=new es,this._holes=[],this._epoints=[],this._eholes=[],this.bjsEarcut=r,this._name=e,this._scene=s||ee.EngineStore.LastCreatedScene,i=t instanceof J.Path2?t.getPoints():t,this._addToepoint(i),this._points.add(i),this._outlinepoints.add(i),void 0===this.bjsEarcut&&Z.Logger.Warn("Earcut was not found, the polygon will not be built.")}addHole(e){this._points.add(e);let t=new es;return t.add(e),this._holes.push(t),this._eholes.push(this._epoints.length/2),this._addToepoint(e),this}build(e=!1,t=0,s=2){let r=new i.Mesh(this._name,this._scene),o=this.buildVertexData(t,s);return r.setVerticesData(a.VertexBuffer.PositionKind,o.positions,e),r.setVerticesData(a.VertexBuffer.NormalKind,o.normals,e),r.setVerticesData(a.VertexBuffer.UVKind,o.uvs,e),r.setIndices(o.indices),r}buildVertexData(e=0,t=2){let s=new o.VertexData,r=[],i=[],a=[],n=this._points.computeBounds();for(let e of this._points.elements)r.push(0,1,0),i.push(e.x,0,e.y),a.push((e.x-n.min.x)/n.width,(e.y-n.min.y)/n.height);let l=[],h=this.bjsEarcut(this._epoints,this._eholes,2);for(let e=0;e<h.length;e++)l.push(h[e]);if(e>0){let s=i.length/3;for(let t of this._points.elements)r.push(0,-1,0),i.push(t.x,-e,t.y),a.push(1-(t.x-n.min.x)/n.width,1-(t.y-n.min.y)/n.height);let o=l.length;for(let e=0;e<o;e+=3){let t=l[e+0],r=l[e+1],i=l[e+2];l.push(i+s),l.push(r+s),l.push(t+s)}for(let s of(this._addSide(i,r,a,l,n,this._outlinepoints,e,!1,t),this._holes))this._addSide(i,r,a,l,n,s,e,!0,t)}return s.indices=l,s.positions=i,s.normals=r,s.uvs=a,s}_addSide(e,t,s,r,i,a,o,n,l){let h=e.length/3,u=0;for(let c=0;c<a.elements.length;c++){let d,p=a.elements[c],f=a.elements[(c+1)%a.elements.length];e.push(p.x,0,p.y),e.push(p.x,-o,p.y),e.push(f.x,0,f.y),e.push(f.x,-o,f.y);let x=a.elements[(c+a.elements.length-1)%a.elements.length],g=a.elements[(c+2)%a.elements.length],m=new j.Vector3(-(f.y-p.y),0,f.x-p.x),V=new j.Vector3(-(p.y-x.y),0,p.x-x.x),O=new j.Vector3(-(g.y-f.y),0,g.x-f.x);n||(m=m.scale(-1),V=V.scale(-1),O=O.scale(-1));let _=m.normalizeToNew(),M=V.normalizeToNew(),y=j.Vector3.Dot(M,_);M=y>l?y<$.Epsilon-1?new j.Vector3(p.x,0,p.y).subtract(new j.Vector3(f.x,0,f.y)).normalize():V.add(m).normalize():_;let T=j.Vector3.Dot(O,m);d=T>l?T<$.Epsilon-1?new j.Vector3(f.x,0,f.y).subtract(new j.Vector3(p.x,0,p.y)).normalize():O.add(m).normalize():_,s.push(u/i.width,0),s.push(u/i.width,1),u+=m.length(),s.push(u/i.width,0),s.push(u/i.width,1),t.push(M.x,M.y,M.z),t.push(M.x,M.y,M.z),t.push(d.x,d.y,d.z),t.push(d.x,d.y,d.z),n?(r.push(h),r.push(h+2),r.push(h+1),r.push(h+1),r.push(h+2),r.push(h+3)):(r.push(h),r.push(h+1),r.push(h+2),r.push(h+1),r.push(h+3),r.push(h+2)),h+=4}}}function ei(e,t,s,i,l,h,u){let c,d,p,x,g=s||[,,,],m=[],V=u||!1;for(let e=0;e<3;e++)void 0===g[e]&&(g[e]=new r.Vector4(0,0,1,1)),i&&void 0===i[e]&&(i[e]=new f.Color4(1,1,1,1));let O=e.getVerticesData(a.VertexBuffer.PositionKind),_=e.getVerticesData(a.VertexBuffer.NormalKind),M=e.getVerticesData(a.VertexBuffer.UVKind),y=e.getIndices(),T=O.length/9,b=0,v=[0];if(V)for(let e=T;e<O.length/3;e+=4)v.push(b+=Math.sqrt((d=O[3*(e+2)]-O[3*e])*d+(p=O[3*(e+2)+2]-O[3*e+2])*p));let D=0;for(let e=0;e<_.length;e+=3).001>Math.abs(_[e+1])&&(D=1),.001>Math.abs(_[e+1]-1)&&(D=0),.001>Math.abs(_[e+1]+1)&&(D=2),x=e/3,1===D?((c=x-T)%4<1.5?V?M[2*x]=g[D].x+(g[D].z-g[D].x)*v[Math.floor(c/4)]/b:M[2*x]=g[D].x:V?M[2*x]=g[D].x+(g[D].z-g[D].x)*v[Math.floor(c/4)+1]/b:M[2*x]=g[D].z,c%2==0?M[2*x+1]=n.useOpenGLOrientationForUV?1-g[D].w:g[D].w:M[2*x+1]=n.useOpenGLOrientationForUV?1-g[D].y:g[D].y):(M[2*x]=(1-M[2*x])*g[D].x+M[2*x]*g[D].z,M[2*x+1]=(1-M[2*x+1])*g[D].y+M[2*x+1]*g[D].w,n.useOpenGLOrientationForUV&&(M[2*x+1]=1-M[2*x+1])),i&&m.push(i[D].r,i[D].g,i[D].b,i[D].a);o.VertexData._ComputeSides(t,O,y,_,M,l,h);let A=new o.VertexData;return A.indices=y,A.positions=O,A.normals=_,A.uvs=M,i&&(A.colors=t===o.VertexData.DOUBLESIDE?m.concat(m):m),A}function ea(e,t,s=null,a=earcut){let o;t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation);let n=t.shape,l=t.holes||[],h=t.depth||0,u=t.smoothingThreshold||2,c=[];for(let e=0;e<n.length;e++)c[e]=new r.Vector2(n[e].x,n[e].z);c[0].equalsWithEpsilon(c[c.length-1],1e-8)&&c.pop();let d=new er(e,c,s||ee.EngineStore.LastCreatedScene,a);for(let e=0;e<l.length;e++){o=[];for(let t=0;t<l[e].length;t++)o.push(new r.Vector2(l[e][t].x,l[e][t].z));d.addHole(o)}let p=d.build(!1,h,u);return p._originalBuilderSideOrientation=t.sideOrientation,ei(p,t.sideOrientation,t.faceUV,t.faceColors,t.frontUVs,t.backUVs,t.wrap).applyToMesh(p,t.updatable),p}function eo(e,t,s=null,r=earcut){return ea(e,t,s,r)}let en=!1;function el(e,t,s=null){let r=t.path,a=t.shape,o=t.scale||1,n=t.rotation||0,l=0===t.cap?0:t.cap||i.Mesh.NO_CAP,h=t.updatable,u=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),c=t.instance||null,d=t.invertUV||!1,p=t.closeShape||!1,f=t.closePath||!1,x=t.capFunction||null;return eu(e,a,r,o,n,null,null,f,p,l,!1,s,!!h,u,c,d,t.frontUVs||null,t.backUVs||null,t.firstNormal||null,!!t.adjustFrame,x)}function eh(e,t,s=null){let a=t.path,o=t.shape,n=r.Vector3.Zero(),l=t.rotationFunction||(()=>0),h=t.closePath||t.ribbonCloseArray||!1,u=t.closeShape||t.ribbonClosePath||!1,c=0===t.cap?0:t.cap||i.Mesh.NO_CAP,d=t.updatable,p=t.firstNormal||null,f=t.adjustFrame||!1,x=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),g=t.instance,m=t.invertUV||!1,V=t.capFunction||null;return eu(e,o,a,null,null,t.scaleVectorFunction??((e,s)=>{let r=t.scaleFunction?.(e,s)??1;return n.copyFromFloats(r,r,r)}),l,h,u,c,!0,s,!!d,x,g||null,m,t.frontUVs||null,t.backUVs||null,p,f,V||null)}function eu(e,t,s,a,o,n,l,u,c,d,p,f,x,g,m,V,O,_,M,y,T){let b,v=(e,t,s,a,o,n,l,h,u,c,d)=>{let p=s.getTangents(),f=s.getNormals(),x=s.getBinormals(),g=s.getDistances();if(d){for(let e=0;e<p.length;e++)if(0==p[e].x&&0==p[e].y&&0==p[e].z&&p[e].copyFrom(p[e-1]),0==f[e].x&&0==f[e].y&&0==f[e].z&&f[e].copyFrom(f[e-1]),0==x[e].x&&0==x[e].y&&0==x[e].z&&x[e].copyFrom(x[e-1]),e>0){let t=p[e-1];0>r.Vector3.Dot(t,p[e])&&p[e].scaleInPlace(-1),t=f[e-1],0>r.Vector3.Dot(t,f[e])&&f[e].scaleInPlace(-1),t=x[e-1],0>r.Vector3.Dot(t,x[e])&&x[e].scaleInPlace(-1)}}let m=0,V=c&&h?h:()=>null!==n?n:0,O=c&&l?l:()=>null!==o?o:r.Vector3.OneReadOnly,_=2*(u!==i.Mesh.NO_CAP&&u!==i.Mesh.CAP_END),M=r.TmpVectors.Matrix[0];for(let s=0;s<t.length;s++){let i=[],o=V(s,g[s]),n=O(s,g[s]);r.Matrix.RotationAxisToRef(p[s],m,M);for(let a=0;a<e.length;a++){let o=p[s].scale(e[a].z).add(f[s].scale(e[a].x)).add(x[s].scale(e[a].y)),l=r.Vector3.Zero();r.Vector3.TransformCoordinatesToRef(o,M,l),l.multiplyInPlace(n).addInPlace(t[s]),i[a]=l}a[_]=i,m+=o,_++}let y=T||(e=>{let t,s=[],i=r.Vector3.Zero();for(t=0;t<e.length;t++)i.addInPlace(e[t]);for(i.scaleInPlace(1/e.length),t=0;t<e.length;t++)s.push(i);return s});switch(u){case i.Mesh.NO_CAP:break;case i.Mesh.CAP_START:a[0]=y(a[2]),a[1]=a[2];break;case i.Mesh.CAP_END:a[_]=a[_-1],a[_+1]=y(a[_-1]);break;case i.Mesh.CAP_ALL:a[0]=y(a[2]),a[1]=a[2],a[_]=a[_-1],a[_+1]=y(a[_-1])}return a},D=null!==a?new r.Vector3(a,a,a):null;if(m){let e=m._creationDataStorage;return M?e.path3D.update(s,M):e.path3D.update(s),m=h("",{pathArray:b=v(t,s,e.path3D,e.pathArray,D,o,n,l,e.cap,p,y),closeArray:!1,closePath:!1,offset:0,updatable:!1,sideOrientation:0,instance:m},f||void 0)}let A=M?new J.Path3D(s,M):new J.Path3D(s),I=h(e,{pathArray:b=v(t,s,A,[],D,o,n,l,d=d<0||d>3?0:d,p,y),closeArray:u,closePath:c,updatable:x,sideOrientation:g,invertUV:V,frontUVs:O||void 0,backUVs:_||void 0},f);return I._creationDataStorage.pathArray=b,I._creationDataStorage.path3D=A,I._creationDataStorage.cap=d,I}en=!0,o.VertexData.CreatePolygon=ei,i.Mesh.CreatePolygon=(e,t,s,r,i,a,o=earcut)=>ea(e,{shape:t,holes:r,updatable:i,sideOrientation:a},s,o),i.Mesh.ExtrudePolygon=(e,t,s,r,i,a,o,n=earcut)=>eo(e,{shape:t,holes:i,depth:s,updatable:a,sideOrientation:o},r,n);let ec=!1;function ed(e,t,s=null){let a,o,n,l,u=t.arc?t.arc<=0||t.arc>1?1:t.arc:1,c=void 0===t.closed||t.closed,d=t.shape,p=t.radius||1,f=t.tessellation||64,x=t.clip||0,g=t.updatable,m=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),V=t.cap||i.Mesh.NO_CAP,O=2*Math.PI,_=[],M=t.invertUV||!1,y=O/f*u;for(a=0;a<=f-x;a++){for(l=[],(V==i.Mesh.CAP_START||V==i.Mesh.CAP_ALL)&&(l.push(new r.Vector3(0,d[0].y,0)),l.push(new r.Vector3(Math.cos(a*y)*d[0].x*p,d[0].y,Math.sin(a*y)*d[0].x*p))),o=0;o<d.length;o++)n=new r.Vector3(Math.cos(a*y)*d[o].x*p,d[o].y,Math.sin(a*y)*d[o].x*p),l.push(n);(V==i.Mesh.CAP_END||V==i.Mesh.CAP_ALL)&&(l.push(new r.Vector3(Math.cos(a*y)*d[d.length-1].x*p,d[d.length-1].y,Math.sin(a*y)*d[d.length-1].x*p)),l.push(new r.Vector3(0,d[d.length-1].y,0))),_.push(l)}return h(e,{pathArray:_,closeArray:c,sideOrientation:m,updatable:g,invertUV:M,frontUVs:t.frontUVs,backUVs:t.backUVs},s)}ec=!0,i.Mesh.ExtrudeShape=(e,t,s,r,a,o,n=null,l,h,u)=>el(e,{shape:t,path:s,scale:r,rotation:a,cap:0===o?0:o||i.Mesh.NO_CAP,sideOrientation:h,instance:u,updatable:l},n),i.Mesh.ExtrudeShapeCustom=(e,t,s,r,a,o,n,l,h,u,c,d)=>eh(e,{shape:t,path:s,scaleFunction:r,rotationFunction:a,ribbonCloseArray:o,ribbonClosePath:n,cap:0===l?0:l||i.Mesh.NO_CAP,sideOrientation:c,instance:d,updatable:u},h);let ep=!1;function ef(e){let t=[],s=[],r=[],i=[],a=void 0!==e.width?e.width:void 0!==e.size?e.size:1,l=void 0!==e.height?e.height:void 0!==e.size?e.size:1,h=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE,u=a/2,c=l/2;s.push(-u,-c,0),r.push(0,0,-1),i.push(0,+!!n.useOpenGLOrientationForUV),s.push(u,-c,0),r.push(0,0,-1),i.push(1,+!!n.useOpenGLOrientationForUV),s.push(u,c,0),r.push(0,0,-1),i.push(1,+!n.useOpenGLOrientationForUV),s.push(-u,c,0),r.push(0,0,-1),i.push(0,+!n.useOpenGLOrientationForUV),t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),o.VertexData._ComputeSides(h,s,t,r,i,e.frontUVs,e.backUVs);let d=new o.VertexData;return d.indices=t,d.positions=s,d.normals=r,d.uvs=i,d}function ex(e,t={},s=null){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,ef(t).applyToMesh(r,t.updatable),t.sourcePlane&&(r.translate(t.sourcePlane.normal,-t.sourcePlane.d),r.setDirection(t.sourcePlane.normal.scale(-1))),r}ep=!0,i.Mesh.CreateLathe=(e,t,s,r,i,a,o)=>ed(e,{shape:t,radius:s,tessellation:r,sideOrientation:o,updatable:a},i);let eg=!1;eg=!0,o.VertexData.CreatePlane=ef,i.Mesh.CreatePlane=(e,t,s,r,i)=>ex(e,{size:t,width:t,height:t,sideOrientation:i,updatable:r},s),_();var em=i;class eV extends em.Mesh{constructor(e,t){super(e,t),this.generateOctree=!1}getClassName(){return"GroundMesh"}get subdivisions(){return Math.min(this._subdivisionsX,this._subdivisionsY)}get subdivisionsX(){return this._subdivisionsX}get subdivisionsY(){return this._subdivisionsY}optimize(e,t=32){this._subdivisionsX=e,this._subdivisionsY=e,this.subdivide(e),(0,W._IsSideEffectImplemented)(this.createOrUpdateSubmeshesOctree)&&this.createOrUpdateSubmeshesOctree(t)}getHeightAtCoordinates(e,t){let s=this.getWorldMatrix(),i=r.TmpVectors.Matrix[5];s.invertToRef(i);let a=r.TmpVectors.Vector3[8];if(r.Vector3.TransformCoordinatesFromFloatsToRef(e,0,t,i,a),e=a.x,t=a.z,e<this._minX||e>=this._maxX||t<=this._minZ||t>this._maxZ)return this.position.y;this._heightQuads&&0!=this._heightQuads.length||(this._initHeightQuads(),this._computeHeightQuads());let o=this._getFacetAt(e,t),n=-(o.x*e+o.z*t+o.w)/o.y;return r.Vector3.TransformCoordinatesFromFloatsToRef(0,n,0,s,a),a.y}getNormalAtCoordinates(e,t){let s=new r.Vector3(0,1,0);return this.getNormalAtCoordinatesToRef(e,t,s),s}getNormalAtCoordinatesToRef(e,t,s){let i=this.getWorldMatrix(),a=r.TmpVectors.Matrix[5];i.invertToRef(a);let o=r.TmpVectors.Vector3[8];if(r.Vector3.TransformCoordinatesFromFloatsToRef(e,0,t,a,o),e=o.x,t=o.z,e<this._minX||e>this._maxX||t<this._minZ||t>this._maxZ)return this;this._heightQuads&&0!=this._heightQuads.length||(this._initHeightQuads(),this._computeHeightQuads());let n=this._getFacetAt(e,t);return r.Vector3.TransformNormalFromFloatsToRef(n.x,n.y,n.z,i,s),this}updateCoordinateHeights(){return this._heightQuads&&0!=this._heightQuads.length||this._initHeightQuads(),this._computeHeightQuads(),this}_getFacetAt(e,t){let s=Math.floor((e+this._maxX)*this._subdivisionsX/this._width),r=Math.floor(-(t+this._maxZ)*this._subdivisionsY/this._height+this._subdivisionsY),i=this._heightQuads[r*this._subdivisionsX+s];return t<i.slope.x*e+i.slope.y?i.facet1:i.facet2}_initHeightQuads(){let e=this._subdivisionsX,t=this._subdivisionsY;this._heightQuads=[];for(let s=0;s<t;s++)for(let t=0;t<e;t++){let i={slope:r.Vector2.Zero(),facet1:new r.Vector4(0,0,0,0),facet2:new r.Vector4(0,0,0,0)};this._heightQuads[s*e+t]=i}return this}_computeHeightQuads(){let e,t,s,i,o,n,l,h=this.getVerticesData(a.VertexBuffer.PositionKind);if(!h)return this;let u=r.TmpVectors.Vector3[3],c=r.TmpVectors.Vector3[2],d=r.TmpVectors.Vector3[1],p=r.TmpVectors.Vector3[0],f=r.TmpVectors.Vector3[4],x=r.TmpVectors.Vector3[5],g=r.TmpVectors.Vector3[6],m=r.TmpVectors.Vector3[7],V=r.TmpVectors.Vector3[8],O=this._subdivisionsX,_=this._subdivisionsY;for(let a=0;a<_;a++)for(let _=0;_<O;_++){e=3*_,t=a*(O+1)*3,s=(a+1)*(O+1)*3,u.x=h[t+e],u.y=h[t+e+1],u.z=h[t+e+2],c.x=h[t+e+3],c.y=h[t+e+4],c.z=h[t+e+5],d.x=h[s+e],d.y=h[s+e+1],d.z=h[s+e+2],p.x=h[s+e+3],p.y=h[s+e+4],p.z=h[s+e+5],i=(p.z-u.z)/(p.x-u.x),o=u.z-i*u.x,c.subtractToRef(u,f),d.subtractToRef(u,x),p.subtractToRef(u,g),r.Vector3.CrossToRef(g,x,m),r.Vector3.CrossToRef(f,g,V),m.normalize(),V.normalize(),n=-(m.x*u.x+m.y*u.y+m.z*u.z),l=-(V.x*c.x+V.y*c.y+V.z*c.z);let M=this._heightQuads[a*O+_];M.slope.copyFromFloats(i,o),M.facet1.copyFromFloats(m.x,m.y,m.z,n),M.facet2.copyFromFloats(V.x,V.y,V.z,l)}return this}serialize(e){super.serialize(e),e.subdivisionsX=this._subdivisionsX,e.subdivisionsY=this._subdivisionsY,e.minX=this._minX,e.maxX=this._maxX,e.minZ=this._minZ,e.maxZ=this._maxZ,e.width=this._width,e.height=this._height}static Parse(e,t){let s=new eV(e.name,t);return s._subdivisionsX=e.subdivisionsX||1,s._subdivisionsY=e.subdivisionsY||1,s._minX=e.minX,s._maxX=e.maxX,s._minZ=e.minZ,s._maxZ=e.maxZ,s._width=e.width,s._height=e.height,s}}var eO=e.i(92180);function e_(e){let t,s,i=[],a=[],l=[],h=[],u=e.width||e.size||1,c=e.height||e.size||1,d=0|(e.subdivisionsX||e.subdivisions||1),p=0|(e.subdivisionsY||e.subdivisions||1);for(t=0;t<=p;t++)for(s=0;s<=d;s++){let e=new r.Vector3(s*u/d-u/2,0,(p-t)*c/p-c/2),i=new r.Vector3(0,1,0);a.push(e.x,e.y,e.z),l.push(i.x,i.y,i.z),h.push(s/d,n.useOpenGLOrientationForUV?t/p:1-t/p)}for(t=0;t<p;t++)for(s=0;s<d;s++)i.push(s+1+(t+1)*(d+1)),i.push(s+1+t*(d+1)),i.push(s+t*(d+1)),i.push(s+(t+1)*(d+1)),i.push(s+1+(t+1)*(d+1)),i.push(s+t*(d+1));let f=new o.VertexData;return f.indices=i,f.positions=a,f.normals=l,f.uvs=h,f}function eM(e){let t,s,i,a,n=void 0!==e.xmin&&null!==e.xmin?e.xmin:-1,l=void 0!==e.zmin&&null!==e.zmin?e.zmin:-1,h=void 0!==e.xmax&&null!==e.xmax?e.xmax:1,u=void 0!==e.zmax&&null!==e.zmax?e.zmax:1,c=e.subdivisions||{w:1,h:1},d=e.precision||{w:1,h:1},p=[],f=[],x=[],g=[];c.h=c.h<1?1:c.h,c.w=c.w<1?1:c.w,d.w=d.w<1?1:d.w,d.h=d.h<1?1:d.h;let m={w:(h-n)/c.w,h:(u-l)/c.h};for(i=0;i<c.h;i++)for(a=0;a<c.w;a++)!function(e,i,a,o){let n=f.length/3,l=d.w+1;for(t=0;t<d.h;t++)for(s=0;s<d.w;s++){let e=[n+s+t*l,n+(s+1)+t*l,n+(s+1)+(t+1)*l,n+s+(t+1)*l];p.push(e[1]),p.push(e[2]),p.push(e[3]),p.push(e[0]),p.push(e[1]),p.push(e[3])}let h=r.Vector3.Zero(),u=new r.Vector3(0,1,0);for(t=0;t<=d.h;t++)for(s=0,h.z=t*(o-i)/d.h+i;s<=d.w;s++)h.x=s*(a-e)/d.w+e,h.y=0,f.push(h.x,h.y,h.z),x.push(u.x,u.y,u.z),g.push(s/d.w,t/d.h)}(n+a*m.w,l+i*m.h,n+(a+1)*m.w,l+(i+1)*m.h);let V=new o.VertexData;return V.indices=p,V.positions=f,V.normals=x,V.uvs=g,V}function ey(e){let t,s,i=[],a=[],n=[],l=[],h=e.colorFilter||new f.Color3(.3,.59,.11),u=e.alphaFilter||0,c=!1;if(e.minHeight>e.maxHeight){c=!0;let t=e.maxHeight;e.maxHeight=e.minHeight,e.minHeight=t}for(t=0;t<=e.subdivisions;t++)for(s=0;s<=e.subdivisions;s++){let i=new r.Vector3(s*e.width/e.subdivisions-e.width/2,0,(e.subdivisions-t)*e.height/e.subdivisions-e.height/2),o=(((i.x+e.width/2)/e.width*(e.bufferWidth-1)|0)+((1-(i.z+e.height/2)/e.height)*(e.bufferHeight-1)|0)*e.bufferWidth)*4,d=e.buffer[o]/255,p=e.buffer[o+1]/255,f=e.buffer[o+2]/255,x=e.buffer[o+3]/255;c&&(d=1-d,p=1-p,f=1-f);let g=d*h.r+p*h.g+f*h.b;x>=u?i.y=e.minHeight+(e.maxHeight-e.minHeight)*g:i.y=e.minHeight-$.Epsilon,e.heightBuffer&&(e.heightBuffer[t*(e.subdivisions+1)+s]=i.y),a.push(i.x,i.y,i.z),n.push(0,0,0),l.push(s/e.subdivisions,1-t/e.subdivisions)}for(t=0;t<e.subdivisions;t++)for(s=0;s<e.subdivisions;s++){let r=s+1+(t+1)*(e.subdivisions+1),o=s+1+t*(e.subdivisions+1),n=s+t*(e.subdivisions+1),l=s+(t+1)*(e.subdivisions+1),h=a[3*r+1]>=e.minHeight,u=a[3*o+1]>=e.minHeight,c=a[3*n+1]>=e.minHeight;h&&u&&c&&(i.push(r),i.push(o),i.push(n)),a[3*l+1]>=e.minHeight&&h&&c&&(i.push(l),i.push(r),i.push(n))}o.VertexData.ComputeNormals(a,i,n);let d=new o.VertexData;return d.indices=i,d.positions=a,d.normals=n,d.uvs=l,d}function eT(e,t={},s){let r=new eV(e,s);return r._setReady(!1),r._subdivisionsX=t.subdivisionsX||t.subdivisions||1,r._subdivisionsY=t.subdivisionsY||t.subdivisions||1,r._width=t.width||1,r._height=t.height||1,r._maxX=r._width/2,r._maxZ=r._height/2,r._minX=-r._maxX,r._minZ=-r._maxZ,e_(t).applyToMesh(r,t.updatable),r._setReady(!0),r}function eb(e,t,s=null){let r=new i.Mesh(e,s);return eM(t).applyToMesh(r,t.updatable),r}function ev(e,t,s={},r=null){let i,a=s.width||10,o=s.height||10,n=s.subdivisions||1,l=s.minHeight||0,h=s.maxHeight||1,u=s.colorFilter||new f.Color3(.3,.59,.11),c=s.alphaFilter||0,d=s.updatable,p=s.onReady,x=new eV(e,r=r||ee.EngineStore.LastCreatedScene);x._subdivisionsX=n,x._subdivisionsY=n,x._width=a,x._height=o,x._maxX=x._width/2,x._maxZ=x._height/2,x._minX=-x._maxX,x._minZ=-x._maxZ,x._setReady(!1),s.passHeightBufferInCallback&&(i=new Float32Array((n+1)*(n+1)));let g=(e,t,s)=>{ey({width:a,height:o,subdivisions:n,minHeight:l,maxHeight:h,colorFilter:u,buffer:e,bufferWidth:t,bufferHeight:s,alphaFilter:c,heightBuffer:i}).applyToMesh(x,d),p&&p(x,i),x._setReady(!0)};return"string"==typeof t?(r.addPendingData(x),eO.Tools.LoadImage(t,e=>{let t=e.width,s=e.height;r.isDisposed||g(r?.getEngine().resizeImageBitmap(e,t,s),t,s),r.removePendingData(x)},(e,t)=>{r.removePendingData(x),s.onError&&s.onError(e,t)},r.offlineProvider)):g(t.data,t.width,t.height),x}let eD=!1;function eA(e,t,s=null){let a,o,n=t.path,l=t.instance,u=1;void 0!==t.radius?u=t.radius:l&&(u=l._creationDataStorage.radius);let c=t.tessellation||64,d=t.radiusFunction||null,p=t.cap||i.Mesh.NO_CAP,f=t.invertUV||!1,x=t.updatable,g=i.Mesh._GetDefaultSideOrientation(t.sideOrientation);t.arc=t.arc&&(t.arc<=0||t.arc>1)?1:t.arc||1;let m=(e,t,s,a,o,n,l,h)=>{let u,c,d,p,f=t.getTangents(),x=t.getNormals(),g=t.getDistances(),m=2*Math.PI/o*h,V=n||(()=>a),O=r.TmpVectors.Matrix[0],_=2*(l!==i.Mesh.NO_CAP&&l!==i.Mesh.CAP_END);for(let t=0;t<e.length;t++){c=V(t,g[t]),u=[],d=x[t];for(let s=0;s<o;s++)r.Matrix.RotationAxisToRef(f[t],m*s,O),p=u[s]?u[s]:r.Vector3.Zero(),r.Vector3.TransformCoordinatesToRef(d,O,p),p.scaleInPlace(c).addInPlace(e[t]),u[s]=p;s[_]=u,_++}let M=(t,s)=>{let r=[];for(let i=0;i<t;i++)r.push(e[s]);return r};switch(l){case i.Mesh.NO_CAP:break;case i.Mesh.CAP_START:s[0]=M(o,0),s[1]=s[2].slice(0);break;case i.Mesh.CAP_END:s[_]=s[_-1].slice(0),s[_+1]=M(o,e.length-1);break;case i.Mesh.CAP_ALL:s[0]=M(o,0),s[1]=s[2].slice(0),s[_]=s[_-1].slice(0),s[_+1]=M(o,e.length-1)}return s};if(l){let e=l._creationDataStorage,s=t.arc||e.arc;return a=e.path3D.update(n),l=h("",{pathArray:o=m(n,a,e.pathArray,u,e.tessellation,d,e.cap,s),instance:l}),e.path3D=a,e.pathArray=o,e.arc=s,e.radius=u,l}a=new J.Path3D(n);let V=h(e,{pathArray:o=m(n,a,[],u,c,d,p=p<0||p>3?0:p,t.arc),closePath:!0,closeArray:!1,updatable:x,sideOrientation:g,invertUV:f,frontUVs:t.frontUVs,backUVs:t.backUVs},s);return V._creationDataStorage.pathArray=o,V._creationDataStorage.path3D=a,V._creationDataStorage.tessellation=c,V._creationDataStorage.cap=p,V._creationDataStorage.arc=t.arc,V._creationDataStorage.radius=u,V}eD=!0,o.VertexData.CreateGround=e_,o.VertexData.CreateTiledGround=eM,o.VertexData.CreateGroundFromHeightMap=ey,i.Mesh.CreateGround=(e,t,s,r,i,a)=>eT(e,{width:t,height:s,subdivisions:r,updatable:a},i),i.Mesh.CreateTiledGround=(e,t,s,r,i,a,o,n,l)=>eb(e,{xmin:t,zmin:s,xmax:r,zmax:i,subdivisions:a,precision:o,updatable:l},n),i.Mesh.CreateGroundFromHeightMap=(e,t,s,r,i,a,o,n,l,h,u)=>ev(e,t,{width:s,height:r,subdivisions:i,minHeight:a,maxHeight:o,updatable:l,onReady:h,alphaFilter:u},n);let eI=!1;function ew(e){let t,s,i,a,l,h,u,c,d=[];d[0]={vertex:[[0,0,1.732051],[1.632993,0,-.5773503],[-.8164966,1.414214,-.5773503],[-.8164966,-1.414214,-.5773503]],face:[[0,1,2],[0,2,3],[0,3,1],[1,3,2]]},d[1]={vertex:[[0,0,1.414214],[1.414214,0,0],[0,1.414214,0],[-1.414214,0,0],[0,-1.414214,0],[0,0,-1.414214]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,1],[1,4,5],[1,5,2],[2,5,3],[3,5,4]]},d[2]={vertex:[[0,0,1.070466],[.7136442,0,.7978784],[-.3568221,.618034,.7978784],[-.3568221,-.618034,.7978784],[.7978784,.618034,.3568221],[.7978784,-.618034,.3568221],[-.9341724,.381966,.3568221],[.1362939,1,.3568221],[.1362939,-1,.3568221],[-.9341724,-.381966,.3568221],[.9341724,.381966,-.3568221],[.9341724,-.381966,-.3568221],[-.7978784,.618034,-.3568221],[-.1362939,1,-.3568221],[-.1362939,-1,-.3568221],[-.7978784,-.618034,-.3568221],[.3568221,.618034,-.7978784],[.3568221,-.618034,-.7978784],[-.7136442,0,-.7978784],[0,0,-1.070466]],face:[[0,1,4,7,2],[0,2,6,9,3],[0,3,8,5,1],[1,5,11,10,4],[2,7,13,12,6],[3,9,15,14,8],[4,10,16,13,7],[5,8,14,17,11],[6,12,18,15,9],[10,11,17,19,16],[12,13,16,19,18],[14,15,18,19,17]]},d[3]={vertex:[[0,0,1.175571],[1.051462,0,.5257311],[.3249197,1,.5257311],[-.8506508,.618034,.5257311],[-.8506508,-.618034,.5257311],[.3249197,-1,.5257311],[.8506508,.618034,-.5257311],[.8506508,-.618034,-.5257311],[-.3249197,1,-.5257311],[-1.051462,0,-.5257311],[-.3249197,-1,-.5257311],[0,0,-1.175571]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,5],[0,5,1],[1,5,7],[1,7,6],[1,6,2],[2,6,8],[2,8,3],[3,8,9],[3,9,4],[4,9,10],[4,10,5],[5,10,7],[6,7,11],[6,11,8],[7,10,11],[8,11,9],[9,11,10]]},d[4]={vertex:[[0,0,1.070722],[.7148135,0,.7971752],[-.104682,.7071068,.7971752],[-.6841528,.2071068,.7971752],[-.104682,-.7071068,.7971752],[.6101315,.7071068,.5236279],[1.04156,.2071068,.1367736],[.6101315,-.7071068,.5236279],[-.3574067,1,.1367736],[-.7888348,-.5,.5236279],[-.9368776,.5,.1367736],[-.3574067,-1,.1367736],[.3574067,1,-.1367736],[.9368776,-.5,-.1367736],[.7888348,.5,-.5236279],[.3574067,-1,-.1367736],[-.6101315,.7071068,-.5236279],[-1.04156,-.2071068,-.1367736],[-.6101315,-.7071068,-.5236279],[.104682,.7071068,-.7971752],[.6841528,-.2071068,-.7971752],[.104682,-.7071068,-.7971752],[-.7148135,0,-.7971752],[0,0,-1.070722]],face:[[0,2,3],[1,6,5],[4,9,11],[7,15,13],[8,16,10],[12,14,19],[17,22,18],[20,21,23],[0,1,5,2],[0,3,9,4],[0,4,7,1],[1,7,13,6],[2,5,12,8],[2,8,10,3],[3,10,17,9],[4,11,15,7],[5,6,14,12],[6,13,20,14],[8,12,19,16],[9,17,18,11],[10,16,22,17],[11,18,21,15],[13,15,21,20],[14,20,23,19],[16,19,23,22],[18,22,23,21]]},d[5]={vertex:[[0,0,1.322876],[1.309307,0,.1889822],[-.9819805,.8660254,.1889822],[.1636634,-1.299038,.1889822],[.3273268,.8660254,-.9449112],[-.8183171,-.4330127,-.9449112]],face:[[0,3,1],[2,4,5],[0,1,4,2],[0,2,5,3],[1,3,5,4]]},d[6]={vertex:[[0,0,1.159953],[1.013464,0,.5642542],[-.3501431,.9510565,.5642542],[-.7715208,-.6571639,.5642542],[.6633206,.9510565,-.03144481],[.8682979,-.6571639,-.3996071],[-1.121664,.2938926,-.03144481],[-.2348831,-1.063314,-.3996071],[.5181548,.2938926,-.9953061],[-.5850262,-.112257,-.9953061]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,9,7],[5,7,9,8],[0,3,7,5,1],[2,4,8,9,6]]},d[7]={vertex:[[0,0,1.118034],[.8944272,0,.6708204],[-.2236068,.8660254,.6708204],[-.7826238,-.4330127,.6708204],[.6708204,.8660254,.2236068],[1.006231,-.4330127,-.2236068],[-1.006231,.4330127,.2236068],[-.6708204,-.8660254,-.2236068],[.7826238,.4330127,-.6708204],[.2236068,-.8660254,-.6708204],[-.8944272,0,-.6708204],[0,0,-1.118034]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,10,7],[5,9,11,8],[7,10,11,9],[0,3,7,9,5,1],[2,4,8,11,10,6]]},d[8]={vertex:[[-.729665,.670121,.319155],[-.655235,-.29213,-.754096],[-.093922,-.607123,.537818],[.702196,.595691,.485187],[.776626,-.36656,-.588064]],face:[[1,4,2],[0,1,2],[3,0,2],[4,3,2],[4,1,0,3]]},d[9]={vertex:[[-.868849,-.100041,.61257],[-.329458,.976099,.28078],[-.26629,-.013796,-.477654],[-.13392,-1.034115,.229829],[.738834,.707117,-.307018],[.859683,-.535264,-.338508]],face:[[3,0,2],[5,3,2],[4,5,2],[1,4,2],[0,1,2],[0,3,5,4,1]]},d[10]={vertex:[[-.610389,.243975,.531213],[-.187812,-.48795,-.664016],[-.187812,.9759,-.664016],[.187812,-.9759,.664016],[.798201,.243975,.132803]],face:[[1,3,0],[3,4,0],[3,1,4],[0,2,1],[0,4,2],[2,4,1]]},d[11]={vertex:[[-1.028778,.392027,-.048786],[-.640503,-.646161,.621837],[-.125162,-.395663,-.540059],[.004683,.888447,-.651988],[.125161,.395663,.540059],[.632925,-.791376,.433102],[1.031672,.157063,-.354165]],face:[[3,2,0],[2,1,0],[2,5,1],[0,4,3],[0,1,4],[4,1,5],[2,3,6],[3,4,6],[5,2,6],[4,5,6]]},d[12]={vertex:[[-.669867,.334933,-.529576],[-.669867,.334933,.529577],[-.4043,1.212901,0],[-.334933,-.669867,-.529576],[-.334933,-.669867,.529577],[.334933,.669867,-.529576],[.334933,.669867,.529577],[.4043,-1.212901,0],[.669867,-.334933,-.529576],[.669867,-.334933,.529577]],face:[[8,9,7],[6,5,2],[3,8,7],[5,0,2],[4,3,7],[0,1,2],[9,4,7],[1,6,2],[9,8,5,6],[8,3,0,5],[3,4,1,0],[4,9,6,1]]},d[13]={vertex:[[-.931836,.219976,-.264632],[-.636706,.318353,.692816],[-.613483,-.735083,-.264632],[-.326545,.979634,0],[-.318353,-.636706,.692816],[-.159176,.477529,-.856368],[.159176,-.477529,-.856368],[.318353,.636706,.692816],[.326545,-.979634,0],[.613482,.735082,-.264632],[.636706,-.318353,.692816],[.931835,-.219977,-.264632]],face:[[11,10,8],[7,9,3],[6,11,8],[9,5,3],[2,6,8],[5,0,3],[4,2,8],[0,1,3],[10,4,8],[1,7,3],[10,11,9,7],[11,6,5,9],[6,2,0,5],[2,4,1,0],[4,10,7,1]]},d[14]={vertex:[[-.93465,.300459,-.271185],[-.838689,-.260219,-.516017],[-.711319,.717591,.128359],[-.710334,-.156922,.080946],[-.599799,.556003,-.725148],[-.503838,-.004675,-.969981],[-.487004,.26021,.48049],[-.460089,-.750282,-.512622],[-.376468,.973135,-.325605],[-.331735,-.646985,.084342],[-.254001,.831847,.530001],[-.125239,-.494738,-.966586],[.029622,.027949,.730817],[.056536,-.982543,-.262295],[.08085,1.087391,.076037],[.125583,-.532729,.485984],[.262625,.599586,.780328],[.391387,-.726999,-.716259],[.513854,-.868287,.139347],[.597475,.85513,.326364],[.641224,.109523,.783723],[.737185,-.451155,.538891],[.848705,-.612742,-.314616],[.976075,.365067,.32976],[1.072036,-.19561,.084927]],face:[[15,18,21],[12,20,16],[6,10,2],[3,0,1],[9,7,13],[2,8,4,0],[0,4,5,1],[1,5,11,7],[7,11,17,13],[13,17,22,18],[18,22,24,21],[21,24,23,20],[20,23,19,16],[16,19,14,10],[10,14,8,2],[15,9,13,18],[12,15,21,20],[6,12,16,10],[3,6,2,0],[9,3,1,7],[9,15,12,6,3],[22,17,11,5,4,8,14,19,23,24]]};let p=e.type&&(e.type<0||e.type>=d.length)?0:e.type||0,x=e.size,g=e.sizeX||x||1,m=e.sizeY||x||1,V=e.sizeZ||x||1,O=e.custom||d[p],_=O.face.length,M=e.faceUV||Array(_),y=e.faceColors,T=void 0===e.flat||e.flat,b=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE,v=[],D=[],A=[],I=[],w=[],F=0,C=0,P=[];if(T)for(s=0;s<_;s++)y&&void 0===y[s]&&(y[s]=new f.Color4(1,1,1,1)),M&&void 0===M[s]&&(M[s]=new r.Vector4(0,0,1,1));if(T)for(s=0;s<_;s++){let e=O.face[s].length;for(t=0,h=.5*Math.tan((l=2*Math.PI/e)/2),u=.5;t<e;t++)v.push(O.vertex[O.face[s][t]][0]*g,O.vertex[O.face[s][t]][1]*m,O.vertex[O.face[s][t]][2]*V),P.push(F),F++,i=M[s].x+(M[s].z-M[s].x)*(.5+h),a=M[s].y+(M[s].w-M[s].y)*(u-.5),I.push(i,n.useOpenGLOrientationForUV?1-a:a),c=h*Math.cos(l)-u*Math.sin(l),u=h*Math.sin(l)+u*Math.cos(l),h=c,y&&w.push(y[s].r,y[s].g,y[s].b,y[s].a);for(t=0;t<e-2;t++)D.push(P[0+C],P[t+2+C],P[t+1+C]);C+=e}else{for(t=0;t<O.vertex.length;t++)v.push(O.vertex[t][0]*g,O.vertex[t][1]*m,O.vertex[t][2]*V),I.push(0,+!!n.useOpenGLOrientationForUV);for(s=0;s<_;s++)for(t=0;t<O.face[s].length-2;t++)D.push(O.face[s][0],O.face[s][t+2],O.face[s][t+1])}o.VertexData.ComputeNormals(v,D,A),o.VertexData._ComputeSides(b,v,D,A,I,e.frontUVs,e.backUVs);let L=new o.VertexData;return L.positions=v,L.indices=D,L.normals=A,L.uvs=I,y&&T&&(L.colors=w),L}function eF(e,t={},s=null){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,ew(t).applyToMesh(r,t.updatable),r}eI=!0,i.Mesh.CreateTube=(e,t,s,r,i,a,o,n,l,h)=>eA(e,{path:t,radius:s,tessellation:r,radiusFunction:i,arc:1,cap:a,updatable:n,sideOrientation:l,instance:h},o);let eC=!1;function eP(e){let t,s=e.sideOrientation||o.VertexData.DEFAULTSIDE,i=e.radius||1,a=void 0===e.flat||e.flat,l=0|(e.subdivisions||4),h=e.radiusX||i,u=e.radiusY||i,c=e.radiusZ||i,d=(1+Math.sqrt(5))/2,p=[-1,d,-0,1,d,0,-1,-d,0,1,-d,0,0,-1,-d,0,1,-d,0,-1,d,0,1,d,d,0,1,d,0,-1,-d,0,1,-d,0,-1],f=[0,11,5,0,5,1,0,1,7,0,7,10,12,22,23,1,5,20,5,11,4,23,22,13,22,18,6,7,1,8,14,21,4,14,4,2,16,13,6,15,6,19,3,8,9,4,21,5,13,17,23,6,13,22,19,6,18,9,8,1],x=[0,1,2,3,4,5,6,7,8,9,10,11,0,2,3,3,3,4,7,8,9,9,10,11],g=[5,1,3,1,6,4,0,0,5,3,4,2,2,2,4,0,2,0,1,1,6,0,6,2,0,4,3,3,4,4,3,1,4,2,4,4,0,2,1,1,2,2,3,3,1,3,2,4],m=138/1024,V=239/1024,O=60/1024,_=26/1024,M=-40/1024,y=20/1024,T=[0,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,1,1,0],b=[],v=[],D=[],A=[],I=0,w=[,,,],F=[,,,];for(t=0;t<3;t++)w[t]=r.Vector3.Zero(),F[t]=r.Vector2.Zero();for(let e=0;e<20;e++){for(t=0;t<3;t++){let s=f[3*e+t];w[t].copyFromFloats(p[3*x[s]],p[3*x[s]+1],p[3*x[s]+2]),w[t].normalize(),F[t].copyFromFloats(g[2*s]*m+O+T[e]*M,g[2*s+1]*V+_+T[e]*y)}let s=(e,t,s,i)=>{let o,d=r.Vector3.Lerp(w[0],w[2],t/l),p=r.Vector3.Lerp(w[1],w[2],t/l),f=l===t?w[2]:r.Vector3.Lerp(d,p,e/(l-t));if(f.normalize(),a){let e=r.Vector3.Lerp(w[0],w[2],i/l),t=r.Vector3.Lerp(w[1],w[2],i/l);o=r.Vector3.Lerp(e,t,s/(l-i))}else o=new r.Vector3(f.x,f.y,f.z);o.x/=h,o.y/=u,o.z/=c,o.normalize();let x=r.Vector2.Lerp(F[0],F[2],t/l),g=r.Vector2.Lerp(F[1],F[2],t/l),m=l===t?F[2]:r.Vector2.Lerp(x,g,e/(l-t));v.push(f.x*h,f.y*u,f.z*c),D.push(o.x,o.y,o.z),A.push(m.x,n.useOpenGLOrientationForUV?1-m.y:m.y),b.push(I),I++};for(let e=0;e<l;e++)for(let t=0;t+e<l;t++)s(t,e,t+1/3,e+1/3),s(t+1,e,t+1/3,e+1/3),s(t,e+1,t+1/3,e+1/3),t+e+1<l&&(s(t+1,e,t+2/3,e+2/3),s(t+1,e+1,t+2/3,e+2/3),s(t,e+1,t+2/3,e+2/3))}o.VertexData._ComputeSides(s,v,b,D,A,e.frontUVs,e.backUVs);let C=new o.VertexData;return C.indices=b,C.positions=v,C.normals=D,C.uvs=A,C}function eL(e,t={},s=null){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,eP(t).applyToMesh(r,t.updatable),r}eC=!0,o.VertexData.CreatePolyhedron=ew,i.Mesh.CreatePolyhedron=(e,t,s)=>eF(e,t,s);let eB=!1;eB=!0,o.VertexData.CreateIcoSphere=eP,i.Mesh.CreateIcoSphere=(e,t,s)=>eL(e,t,s);var ez=e.i(63235);let eE=new r.Vector3(1,0,0),eS=new r.Vector3(-1,0,0),eR=new r.Vector3(0,1,0),eU=new r.Vector3(0,-1,0),eN=new r.Vector3(0,0,1),eW=new r.Vector3(0,0,-1);class eG{constructor(e=r.Vector3.Zero(),t=r.Vector3.Up(),s=r.Vector2.Zero(),i=0,a=0,o=null,n=null,l=null,h=null){this.position=e,this.normal=t,this.uv=s,this.vertexIdx=i,this.vertexIdxForBones=a,this.localPositionOverride=o,this.localNormalOverride=n,this.matrixIndicesOverride=l,this.matrixWeightsOverride=h}clone(){return new eG(this.position.clone(),this.normal.clone(),this.uv.clone(),this.vertexIdx,this.vertexIdxForBones,this.localPositionOverride?.slice(),this.localNormalOverride?.slice(),this.matrixIndicesOverride?.slice(),this.matrixWeightsOverride?.slice())}}function eH(e,t,s){let l=!!t.skeleton,h=!!t.morphTargetManager?.numTargets,u=s.localMode||l,c=t.getIndices(),d=l||h?t.getPositionData(!0,!0):t.getVerticesData(a.VertexBuffer.PositionKind),p=l||h?t.getNormalsData(!0,!0):t.getVerticesData(a.VertexBuffer.NormalKind),f=u?l?t.getVerticesData(a.VertexBuffer.PositionKind):d:null,x=u?l?t.getVerticesData(a.VertexBuffer.NormalKind):p:null,g=t.getVerticesData(a.VertexBuffer.UVKind),m=l?t.getVerticesData(a.VertexBuffer.MatricesIndicesKind):null,V=l?t.getVerticesData(a.VertexBuffer.MatricesWeightsKind):null,O=l?t.getVerticesData(a.VertexBuffer.MatricesIndicesExtraKind):null,_=l?t.getVerticesData(a.VertexBuffer.MatricesWeightsExtraKind):null,M=s.position||r.Vector3.Zero(),y=s.normal||r.Vector3.Up(),T=s.size||r.Vector3.One(),b=s.angle||0;if(!y){let e=new r.Vector3(0,0,1),s=t.getScene().activeCamera,i=r.Vector3.TransformCoordinates(e,s.getWorldMatrix());y=s.globalPosition.subtract(i)}let v=-Math.atan2(y.z,y.x)-Math.PI/2,D=Math.sqrt(y.x*y.x+y.z*y.z),A=Math.atan2(y.y,D),I=new o.VertexData;I.indices=[],I.positions=[],I.normals=[],I.uvs=[],I.matricesIndices=l?[]:null,I.matricesWeights=l?[]:null,I.matricesIndicesExtra=O?[]:null,I.matricesWeightsExtra=_?[]:null;let w=0,F=(e,t)=>{let i=new eG;if(!c||!d||!p)return i;let a=c[e];if(i.vertexIdx=3*a,i.vertexIdxForBones=4*a,i.position=new r.Vector3(d[3*a],d[3*a+1],d[3*a+2]),r.Vector3.TransformCoordinatesToRef(i.position,t,i.position),i.normal=new r.Vector3(p[3*a],p[3*a+1],p[3*a+2]),r.Vector3.TransformNormalToRef(i.normal,t,i.normal),s.captureUVS&&g){let e=g[2*a+1];i.uv=new r.Vector2(g[2*a],n.useOpenGLOrientationForUV?1-e:e)}return i},C=[0,0,0,0],P=(e,t)=>{if(0===e.length)return e;let s=.5*Math.abs(r.Vector3.Dot(T,t)),i=(e,t,s,r)=>{for(let i=0;i<r;++i)if(e[s+i]===t)return s+i;return -1},a=(e,a)=>{let o=r.Vector3.GetClipFactor(e.position,a.position,t,s),n=C,l=C;if(m&&V){let t=e.matrixIndicesOverride?0:e.vertexIdxForBones,s=e.matrixIndicesOverride??m,r=e.matrixWeightsOverride??V,h=a.matrixIndicesOverride?0:a.vertexIdxForBones,u=a.matrixIndicesOverride??m,c=a.matrixWeightsOverride??V;n=[0,0,0,0],l=[0,0,0,0];let d=0;for(let e=0;e<4;++e)if(r[t+e]>0){let a=i(u,s[t+e],h,4);n[d]=s[t+e],l[d]=(0,ez.Lerp)(r[t+e],a>=0?c[a]:0,o),d++}for(let e=0;e<4&&d<4;++e){let r=u[h+e];-1===i(s,r,t,4)&&(n[d]=r,l[d]=(0,ez.Lerp)(0,c[h+e],o),d++)}let p=l[0]+l[1]+l[2]+l[3];l[0]/=p,l[1]/=p,l[2]/=p,l[3]/=p}let h=e.localPositionOverride?e.localPositionOverride[0]:f?.[e.vertexIdx]??0,u=e.localPositionOverride?e.localPositionOverride[1]:f?.[e.vertexIdx+1]??0,c=e.localPositionOverride?e.localPositionOverride[2]:f?.[e.vertexIdx+2]??0,d=a.localPositionOverride?a.localPositionOverride[0]:f?.[a.vertexIdx]??0,p=a.localPositionOverride?a.localPositionOverride[1]:f?.[a.vertexIdx+1]??0,g=a.localPositionOverride?a.localPositionOverride[2]:f?.[a.vertexIdx+2]??0,O=e.localNormalOverride?e.localNormalOverride[0]:x?.[e.vertexIdx]??0,_=e.localNormalOverride?e.localNormalOverride[1]:x?.[e.vertexIdx+1]??0,M=e.localNormalOverride?e.localNormalOverride[2]:x?.[e.vertexIdx+2]??0,y=a.localNormalOverride?a.localNormalOverride[0]:x?.[a.vertexIdx]??0,T=a.localNormalOverride?a.localNormalOverride[1]:x?.[a.vertexIdx+1]??0,b=a.localNormalOverride?a.localNormalOverride[2]:x?.[a.vertexIdx+2]??0,v=O+(y-O)*o,D=_+(T-_)*o,A=M+(b-M)*o,I=Math.sqrt(v*v+D*D+A*A);return new eG(r.Vector3.Lerp(e.position,a.position,o),r.Vector3.Lerp(e.normal,a.normal,o).normalize(),r.Vector2.Lerp(e.uv,a.uv,o),-1,-1,f?[h+(d-h)*o,u+(p-u)*o,c+(g-c)*o]:null,x?[v/I,D/I,A/I]:null,n,l)},o=null;e.length>3&&(o=[]);for(let i=0;i<e.length;i+=3){let n=null,l=null,h=null,u=null,c=r.Vector3.Dot(e[i].position,t)-s,d=r.Vector3.Dot(e[i+1].position,t)-s,p=r.Vector3.Dot(e[i+2].position,t)-s,f=c>0,x=d>0,g=p>0;switch(+!!f+ +!!x+ +!!g){case 0:e.length>3?(o.push(e[i]),o.push(e[i+1]),o.push(e[i+2])):o=e;break;case 1:if(o=o??[],f&&(n=e[i+1],l=e[i+2],h=a(e[i],n),u=a(e[i],l)),x){n=e[i],l=e[i+2],h=a(e[i+1],n),u=a(e[i+1],l),o.push(h),o.push(l.clone()),o.push(n.clone()),o.push(l.clone()),o.push(h.clone()),o.push(u);break}g&&(n=e[i],l=e[i+1],h=a(e[i+2],n),u=a(e[i+2],l)),n&&l&&h&&u&&(o.push(n.clone()),o.push(l.clone()),o.push(h),o.push(u),o.push(h.clone()),o.push(l.clone()));break;case 2:o=o??[],f||(l=a(n=e[i].clone(),e[i+1]),h=a(n,e[i+2]),o.push(n),o.push(l),o.push(h)),x||(l=a(n=e[i+1].clone(),e[i+2]),h=a(n,e[i]),o.push(n),o.push(l),o.push(h)),g||(l=a(n=e[i+2].clone(),e[i]),h=a(n,e[i+1]),o.push(n),o.push(l),o.push(h))}}return o},L=t instanceof i.Mesh?t:null,B=L?._thinInstanceDataStorage.matrixData,z=L?.thinInstanceCount||1,E=r.TmpVectors.Matrix[0];E.copyFrom(r.Matrix.IdentityReadOnly);for(let e=0;e<z;++e){if(L?.hasThinInstances&&B){let t=16*e;E.setRowFromFloats(0,B[t+0],B[t+1],B[t+2],B[t+3]),E.setRowFromFloats(1,B[t+4],B[t+5],B[t+6],B[t+7]),E.setRowFromFloats(2,B[t+8],B[t+9],B[t+10],B[t+11]),E.setRowFromFloats(3,B[t+12],B[t+13],B[t+14],B[t+15])}let i=r.Matrix.RotationYawPitchRoll(v,A,b).multiply(r.Matrix.Translation(M.x,M.y,M.z)),a=r.Matrix.Invert(i),o=t.getWorldMatrix(),l=E.multiply(o).multiply(a),h=[,,,];for(let e=0;e<c.length;e+=3){let t=h;if((t[0]=F(e,l),t[1]=F(e+1,l),t[2]=F(e+2,l),!(s.cullBackFaces&&0>=-t[0].normal.z&&0>=-t[1].normal.z&&0>=-t[2].normal.z)&&(t=P(t,eE))&&(t=P(t,eS))&&(t=P(t,eR))&&(t=P(t,eU))&&(t=P(t,eN)))&&(t=P(t,eW)))for(let e=0;e<t.length;e++){let r=t[e];if(I.indices.push(w),u?(r.localPositionOverride?(I.positions[3*w]=r.localPositionOverride[0],I.positions[3*w+1]=r.localPositionOverride[1],I.positions[3*w+2]=r.localPositionOverride[2]):f&&(I.positions[3*w]=f[r.vertexIdx],I.positions[3*w+1]=f[r.vertexIdx+1],I.positions[3*w+2]=f[r.vertexIdx+2]),r.localNormalOverride?(I.normals[3*w]=r.localNormalOverride[0],I.normals[3*w+1]=r.localNormalOverride[1],I.normals[3*w+2]=r.localNormalOverride[2]):x&&(I.normals[3*w]=x[r.vertexIdx],I.normals[3*w+1]=x[r.vertexIdx+1],I.normals[3*w+2]=x[r.vertexIdx+2])):(r.position.toArray(I.positions,3*w),r.normal.toArray(I.normals,3*w)),I.matricesIndices&&I.matricesWeights&&(r.matrixIndicesOverride?(I.matricesIndices[4*w]=r.matrixIndicesOverride[0],I.matricesIndices[4*w+1]=r.matrixIndicesOverride[1],I.matricesIndices[4*w+2]=r.matrixIndicesOverride[2],I.matricesIndices[4*w+3]=r.matrixIndicesOverride[3]):(m&&(I.matricesIndices[4*w]=m[r.vertexIdxForBones],I.matricesIndices[4*w+1]=m[r.vertexIdxForBones+1],I.matricesIndices[4*w+2]=m[r.vertexIdxForBones+2],I.matricesIndices[4*w+3]=m[r.vertexIdxForBones+3]),O&&I.matricesIndicesExtra&&(I.matricesIndicesExtra[4*w]=O[r.vertexIdxForBones],I.matricesIndicesExtra[4*w+1]=O[r.vertexIdxForBones+1],I.matricesIndicesExtra[4*w+2]=O[r.vertexIdxForBones+2],I.matricesIndicesExtra[4*w+3]=O[r.vertexIdxForBones+3])),r.matrixWeightsOverride?(I.matricesWeights[4*w]=r.matrixWeightsOverride[0],I.matricesWeights[4*w+1]=r.matrixWeightsOverride[1],I.matricesWeights[4*w+2]=r.matrixWeightsOverride[2],I.matricesWeights[4*w+3]=r.matrixWeightsOverride[3]):(V&&(I.matricesWeights[4*w]=V[r.vertexIdxForBones],I.matricesWeights[4*w+1]=V[r.vertexIdxForBones+1],I.matricesWeights[4*w+2]=V[r.vertexIdxForBones+2],I.matricesWeights[4*w+3]=V[r.vertexIdxForBones+3]),_&&I.matricesWeightsExtra&&(I.matricesWeightsExtra[4*w]=_[r.vertexIdxForBones],I.matricesWeightsExtra[4*w+1]=_[r.vertexIdxForBones+1],I.matricesWeightsExtra[4*w+2]=_[r.vertexIdxForBones+2],I.matricesWeightsExtra[4*w+3]=_[r.vertexIdxForBones+3]))),s.captureUVS)r.uv.toArray(I.uvs,2*w);else{I.uvs.push(.5+r.position.x/T.x);let e=.5+r.position.y/T.y;I.uvs.push(n.useOpenGLOrientationForUV?1-e:e)}w++}}}0===I.indices.length&&(I.indices=null),0===I.positions.length&&(I.positions=null),0===I.normals.length&&(I.normals=null),0===I.uvs.length&&(I.uvs=null),I.matricesIndices?.length===0&&(I.matricesIndices=null),I.matricesWeights?.length===0&&(I.matricesWeights=null),I.matricesIndicesExtra?.length===0&&(I.matricesIndicesExtra=null),I.matricesWeightsExtra?.length===0&&(I.matricesWeightsExtra=null);let S=new i.Mesh(e,t.getScene());return I.applyToMesh(S),u?(S.skeleton=t.skeleton,S.parent=t):(S.position=M.clone(),S.rotation=new r.Vector3(A,v,b)),S.computeWorldMatrix(!0),S.refreshBoundingInfo(!0,!0),S}let eZ=!1;function eX(e={subdivisions:2,tessellation:16,height:1,radius:.25,capSubdivisions:6}){let t,s,i=0|Math.max(e.subdivisions?e.subdivisions:2,1),a=0|Math.max(e.tessellation?e.tessellation:16,3),l=Math.max(e.height?e.height:1,0),h=Math.max(e.radius?e.radius:.25,0),u=0|Math.max(e.capSubdivisions?e.capSubdivisions:6,1),c=Math.max(e.radiusTop?e.radiusTop:h,0),d=Math.max(e.radiusBottom?e.radiusBottom:h,0),p=2*Math.PI,f=Math.max(e.topCapSubdivisions?e.topCapSubdivisions:u,1),x=Math.max(e.bottomCapSubdivisions?e.bottomCapSubdivisions:u,1),g=Math.acos((d-c)/l),m=[],V=[],O=[],_=[],M=0,y=[],T=.5*(l-(c+d)),b=.5*Math.PI,v=r.Vector3.Zero(),D=r.Vector3.Zero(),A=Math.cos(g),I=Math.sin(g),w=new r.Vector2(c*I,T+c*A).subtract(new r.Vector2(d*I,-T+d*A)).length(),F=c*g+w+d*(b-g),C=0;for(s=0;s<=f;s++){let e=[],r=b-s/f*g;C+=c*g/f;let i=Math.cos(r),o=Math.sin(r),l=i*c;for(t=0;t<=a;t++){let s=t/a,r=s*p+0,h=Math.sin(r),u=Math.cos(r);D.x=l*h,D.y=T+o*c,D.z=l*u,V.push(D.x,D.y,D.z),v.set(i*h,o,i*u),O.push(v.x,v.y,v.z),_.push(s,n.useOpenGLOrientationForUV?C/F:1-C/F),e.push(M),M++}y.push(e)}let P=l-c-d+A*c-A*d,L=I*(d-c)/P;for(s=1;s<=i;s++){let e=[];C+=w/i;let r=I*(s*(d-c)/i+c);for(t=0;t<=a;t++){let o=t/a,l=o*p+0,h=Math.sin(l),u=Math.cos(l);D.x=r*h,D.y=T+A*c-s*P/i,D.z=r*u,V.push(D.x,D.y,D.z),v.set(h,L,u).normalize(),O.push(v.x,v.y,v.z),_.push(o,n.useOpenGLOrientationForUV?C/F:1-C/F),e.push(M),M++}y.push(e)}for(s=1;s<=x;s++){let e=[],r=b-g-s/x*(Math.PI-g);C+=d*g/x;let i=Math.cos(r),o=Math.sin(r),l=i*d;for(t=0;t<=a;t++){let s=t/a,r=s*p+0,h=Math.sin(r),u=Math.cos(r);D.x=l*h,D.y=-T+o*d,D.z=l*u,V.push(D.x,D.y,D.z),v.set(i*h,o,i*u),O.push(v.x,v.y,v.z),_.push(s,n.useOpenGLOrientationForUV?C/F:1-C/F),e.push(M),M++}y.push(e)}for(t=0;t<a;t++)for(s=0;s<f+i+x;s++){let e=y[s][t],r=y[s+1][t],i=y[s+1][t+1],a=y[s][t+1];m.push(e),m.push(r),m.push(a),m.push(r),m.push(i),m.push(a)}if(m=m.reverse(),e.orientation&&!e.orientation.equals(r.Vector3.Up())){let t=new r.Matrix;e.orientation.clone().scale(.5*Math.PI).cross(r.Vector3.Up()).toQuaternion().toRotationMatrix(t);let s=r.Vector3.Zero();for(let e=0;e<V.length;e+=3)s.set(V[e],V[e+1],V[e+2]),r.Vector3.TransformCoordinatesToRef(s.clone(),t,s),V[e]=s.x,V[e+1]=s.y,V[e+2]=s.z}let B=new o.VertexData;return B.positions=V,B.normals=O,B.uvs=_,B.indices=m,B}function ek(e,t={orientation:r.Vector3.Up(),subdivisions:2,tessellation:16,height:1,radius:.25,capSubdivisions:6,updatable:!1},s=null){let a=new i.Mesh(e,s);return eX(t).applyToMesh(a,t.updatable),a}eZ=!0,i.Mesh.CreateDecal=(e,t,s,r,i,a)=>eH(e,t,{position:s,normal:r,size:i,angle:a});let eY=!1;eY=!0,i.Mesh.CreateCapsule=(e,t,s)=>ek(e,t,s),o.VertexData.CreateCapsule=eX,e.s([],65705),e.i(65705);class eK{constructor(e=0,t=0){this.x=e,this.y=t,e!==Math.floor(e)&&(e=Math.floor(e),Z.Logger.Warn("x is not an integer, floor(x) used")),t!==Math.floor(t)&&(t=Math.floor(t),Z.Logger.Warn("y is not an integer, floor(y) used"))}clone(){return new eK(this.x,this.y)}rotate60About(e){let t=this.x;return this.x=e.x+e.y-this.y,this.y=t+this.y-e.x,this}rotateNeg60About(e){let t=this.x;return this.x=t+this.y-e.y,this.y=e.x+e.y-t,this}rotate120(e,t){e!==Math.floor(e)&&(e=Math.floor(e),Z.Logger.Warn("m not an integer only floor(m) used")),t!==Math.floor(t)&&(t=Math.floor(t),Z.Logger.Warn("n not an integer only floor(n) used"));let s=this.x;return this.x=e-s-this.y,this.y=t+s,this}rotateNeg120(e,t){e!==Math.floor(e)&&(e=Math.floor(e),Z.Logger.Warn("m is not an integer, floor(m) used")),t!==Math.floor(t)&&(t=Math.floor(t),Z.Logger.Warn("n is not an integer, floor(n) used"));let s=this.x;return this.x=this.y-t,this.y=e+t-s-this.y,this}toCartesianOrigin(e,t){let s=r.Vector3.Zero();return s.x=e.x+2*this.x*t+this.y*t,s.y=e.y+Math.sqrt(3)*this.y*t,s}static Zero(){return new eK(0,0)}}class eQ{constructor(){this.cartesian=[],this.vertices=[],this.max=[],this.min=[],this.closestTo=[],this.innerFacets=[],this.isoVecsABOB=[],this.isoVecsOBOA=[],this.isoVecsBAOA=[],this.vertexTypes=[],this.IDATA=new eq("icosahedron","Regular",[[0,$.PHI,-1],[-$.PHI,1,0],[-1,0,-$.PHI],[1,0,-$.PHI],[$.PHI,1,0],[0,$.PHI,1],[-1,0,$.PHI],[-$.PHI,-1,0],[0,-$.PHI,-1],[$.PHI,-1,0],[1,0,$.PHI],[0,-$.PHI,1]],[[0,2,1],[0,3,2],[0,4,3],[0,5,4],[0,1,5],[7,6,1],[8,7,2],[9,8,3],[10,9,4],[6,10,5],[2,7,1],[3,8,2],[4,9,3],[5,10,4],[1,6,5],[11,6,7],[11,7,8],[11,8,9],[11,9,10],[11,10,6]])}setIndices(){let e,t,s,r,i,a,o,n,l=12,h={},u=this.m,c=this.n,d=u;0!==c&&(d=(0,ez.HighestCommonFactor)(u,c));let p=u/d,f=c/d,x=eK.Zero(),g=new eK(u,c),m=new eK(-c,u+c),V=eK.Zero(),O=eK.Zero(),_=eK.Zero(),M=[],y=[],T=this.vertByDist,b=(e,t,s,r)=>{a=e+"|"+s,o=t+"|"+r,a in h||o in h?a in h&&!(o in h)?h[o]=h[a]:o in h&&!(a in h)&&(h[a]=h[o]):(h[a]=l,h[o]=l,l++),T[s][0]>2?y[h[a]]=[-T[s][0],T[s][1],h[a]]:y[h[a]]=[M[T[s][0]],T[s][1],h[a]]};this.IDATA.edgematch=[[1,"B"],[2,"B"],[3,"B"],[4,"B"],[0,"B"],[10,"O",14,"A"],[11,"O",10,"A"],[12,"O",11,"A"],[13,"O",12,"A"],[14,"O",13,"A"],[0,"O"],[1,"O"],[2,"O"],[3,"O"],[4,"O"],[19,"B",5,"A"],[15,"B",6,"A"],[16,"B",7,"A"],[17,"B",8,"A"],[18,"B",9,"A"]];for(let o=0;o<20;o++){if(s=(M=this.IDATA.face[o])[2],r=M[1],i=M[0],(a=o+"|"+(n=x.x+"|"+x.y))in h||(h[a]=s,y[s]=[M[T[n][0]],T[n][1]]),(a=o+"|"+(n=g.x+"|"+g.y))in h||(h[a]=r,y[r]=[M[T[n][0]],T[n][1]]),(a=o+"|"+(n=m.x+"|"+m.y))in h||(h[a]=i,y[i]=[M[T[n][0]],T[n][1]]),e=this.IDATA.edgematch[o][0],"B"===(t=this.IDATA.edgematch[o][1]))for(let t=1;t<d;t++)O.x=u-t*(p+f),O.y=c+t*p,_.x=-t*f,_.y=t*(p+f),b(o,e,n=O.x+"|"+O.y,_.x+"|"+_.y);if("O"===t)for(let t=1;t<d;t++)_.x=-t*f,_.y=t*(p+f),V.x=t*p,V.y=t*f,b(o,e,n=_.x+"|"+_.y,V.x+"|"+V.y);if(e=this.IDATA.edgematch[o][2],(t=this.IDATA.edgematch[o][3])&&"A"===t)for(let t=1;t<d;t++)V.x=t*p,V.y=t*f,O.x=u-(d-t)*(p+f),O.y=c+(d-t)*p,b(o,e,n=V.x+"|"+V.y,O.x+"|"+O.y);for(let e=0;e<this.vertices.length;e++)(a=o+"|"+(n=this.vertices[e].x+"|"+this.vertices[e].y))in h||(h[a]=l++,T[n][0]>2?y[h[a]]=[-T[n][0],T[n][1],h[a]]:y[h[a]]=[M[T[n][0]],T[n][1],h[a]])}this.closestTo=y,this.vecToidx=h}calcCoeffs(){let e=this.m,t=this.n,s=Math.sqrt(3)/3,r=e*e+t*t+e*t;this.coau=(e+t)/r,this.cobu=-t/r,this.coav=-s*(e-t)/r,this.cobv=s*(2*e+t)/r}createInnerFacets(){let e=this.m,t=this.n;for(let s=0;s<t+e+1;s++)for(let e=this.min[s];e<this.max[s]+1;e++)e<this.max[s]&&e<this.max[s+1]+1&&this.innerFacets.push(["|"+e+"|"+s,"|"+e+"|"+(s+1),"|"+(e+1)+"|"+s]),s>0&&e<this.max[s-1]&&e+1<this.max[s]+1&&this.innerFacets.push(["|"+e+"|"+s,"|"+(e+1)+"|"+s,"|"+(e+1)+"|"+(s-1)])}edgeVecsABOB(){let e=this.m,t=this.n,s=new eK(-t,e+t);for(let r=1;r<e+t;r++){let e=new eK(this.min[r],r),t=new eK(this.min[r-1],r-1),i=new eK(this.min[r+1],r+1),a=e.clone(),o=t.clone(),n=i.clone();a.rotate60About(s),o.rotate60About(s),n.rotate60About(s);let l=new eK(this.max[a.y],a.y),h=new eK(this.max[a.y-1],a.y-1),u=new eK(this.max[a.y-1]-1,a.y-1);(a.x!==l.x||a.y!==l.y)&&(a.x!==h.x?(this.vertexTypes.push([1,0,0]),this.isoVecsABOB.push([e,h,u]),this.vertexTypes.push([1,0,0]),this.isoVecsABOB.push([e,u,l])):a.y===n.y?(this.vertexTypes.push([1,1,0]),this.isoVecsABOB.push([e,t,h]),this.vertexTypes.push([1,0,1]),this.isoVecsABOB.push([e,h,i])):(this.vertexTypes.push([1,1,0]),this.isoVecsABOB.push([e,t,h]),this.vertexTypes.push([1,0,0]),this.isoVecsABOB.push([e,h,l])))}}mapABOBtoOBOA(){let e=new eK(0,0);for(let t=0;t<this.isoVecsABOB.length;t++){let s=[];for(let r=0;r<3;r++)e.x=this.isoVecsABOB[t][r].x,e.y=this.isoVecsABOB[t][r].y,0===this.vertexTypes[t][r]&&e.rotateNeg120(this.m,this.n),s.push(e.clone());this.isoVecsOBOA.push(s)}}mapABOBtoBAOA(){let e=new eK(0,0);for(let t=0;t<this.isoVecsABOB.length;t++){let s=[];for(let r=0;r<3;r++)e.x=this.isoVecsABOB[t][r].x,e.y=this.isoVecsABOB[t][r].y,1===this.vertexTypes[t][r]&&e.rotate120(this.m,this.n),s.push(e.clone());this.isoVecsBAOA.push(s)}}MapToFace(e,t){let s,i,a=this.IDATA.face[e],o=a[2],n=a[1],l=a[0],h=r.Vector3.FromArray(this.IDATA.vertex[o]),u=r.Vector3.FromArray(this.IDATA.vertex[n]),c=r.Vector3.FromArray(this.IDATA.vertex[l]),d=u.subtract(h),p=c.subtract(h),f=d.scale(this.coau).add(p.scale(this.cobu)),x=d.scale(this.coav).add(p.scale(this.cobv)),g=[];for(let r=0;r<this.cartesian.length;r++)i=f.scale(this.cartesian[r].x).add(x.scale(this.cartesian[r].y)).add(h),g[r]=[i.x,i.y,i.z],s=e+"|"+this.vertices[r].x+"|"+this.vertices[r].y,t.vertex[this.vecToidx[s]]=[i.x,i.y,i.z]}build(e,t){let s,r,i=[],a=eK.Zero(),o=new eK(e,t),n=new eK(-t,e+t);i.push(a,o,n);for(let s=t;s<e+1;s++)for(let t=0;t<e+1-s;t++)i.push(new eK(t,s));if(t>0){let s=(0,ez.HighestCommonFactor)(e,t),r=e/s,a=t/s;for(let o=1;o<s;o++)i.push(new eK(o*r,o*a)),i.push(new eK(-o*a,o*(r+a))),i.push(new eK(e-o*(r+a),t+o*r));let o=e/t;for(let s=1;s<t;s++)for(let r=0;r<s*o;r++)i.push(new eK(r,s)),i.push(new eK(r,s).rotate120(e,t)),i.push(new eK(r,s).rotateNeg120(e,t))}i.sort((e,t)=>e.x-t.x),i.sort((e,t)=>e.y-t.y);let l=Array(e+t+1),h=Array(e+t+1);for(let e=0;e<l.length;e++)l[e]=1/0,h[e]=-1/0;let u=i.length;for(let e=0;e<u;e++)r=i[e].x,l[s=i[e].y]=Math.min(r,l[s]),h[s]=Math.max(r,h[s]);let c=(s,r)=>{let i=s.clone();return("A"===r&&i.rotateNeg120(e,t),"B"===r&&i.rotate120(e,t),i.x<0)?i.y:i.x+i.y},d=[],p=[],f=[],x=[],g={},m=[],V=-1,O=-1;for(let e=0;e<u;e++)d[e]=i[e].toCartesianOrigin(new eK(0,0),.5),p[e]=c(i[e],"O"),f[e]=c(i[e],"A"),x[e]=c(i[e],"B"),p[e]===f[e]&&f[e]===x[e]?(V=3,O=p[e]):p[e]===f[e]?(V=4,O=p[e]):f[e]===x[e]?(V=5,O=f[e]):x[e]===p[e]&&(V=6,O=p[e]),p[e]<f[e]&&p[e]<x[e]&&(V=2,O=p[e]),f[e]<p[e]&&f[e]<x[e]&&(V=1,O=f[e]),x[e]<f[e]&&x[e]<p[e]&&(V=0,O=x[e]),m.push([V,O,i[e].x,i[e].y]);m.sort((e,t)=>e[2]-t[2]),m.sort((e,t)=>e[3]-t[3]),m.sort((e,t)=>e[1]-t[1]),m.sort((e,t)=>e[0]-t[0]);for(let e=0;e<m.length;e++)g[m[e][2]+"|"+m[e][3]]=[m[e][0],m[e][1],e];return this.m=e,this.n=t,this.vertices=i,this.vertByDist=g,this.cartesian=d,this.min=l,this.max=h,this}}class eq{constructor(e,t,s,r){this.name=e,this.category=t,this.vertex=s,this.face=r}}class ej extends eq{innerToData(e,t){for(let s=0;s<t.innerFacets.length;s++)this.face.push(t.innerFacets[s].map(s=>t.vecToidx[e+s]))}mapABOBtoDATA(e,t){let s=t.IDATA.edgematch[e][0];for(let r=0;r<t.isoVecsABOB.length;r++){let i=[];for(let a=0;a<3;a++)0===t.vertexTypes[r][a]?i.push(e+"|"+t.isoVecsABOB[r][a].x+"|"+t.isoVecsABOB[r][a].y):i.push(s+"|"+t.isoVecsABOB[r][a].x+"|"+t.isoVecsABOB[r][a].y);this.face.push([t.vecToidx[i[0]],t.vecToidx[i[1]],t.vecToidx[i[2]]])}}mapOBOAtoDATA(e,t){let s=t.IDATA.edgematch[e][0];for(let r=0;r<t.isoVecsOBOA.length;r++){let i=[];for(let a=0;a<3;a++)1===t.vertexTypes[r][a]?i.push(e+"|"+t.isoVecsOBOA[r][a].x+"|"+t.isoVecsOBOA[r][a].y):i.push(s+"|"+t.isoVecsOBOA[r][a].x+"|"+t.isoVecsOBOA[r][a].y);this.face.push([t.vecToidx[i[0]],t.vecToidx[i[1]],t.vecToidx[i[2]]])}}mapBAOAtoDATA(e,t){let s=t.IDATA.edgematch[e][2];for(let r=0;r<t.isoVecsBAOA.length;r++){let i=[];for(let a=0;a<3;a++)1===t.vertexTypes[r][a]?i.push(e+"|"+t.isoVecsBAOA[r][a].x+"|"+t.isoVecsBAOA[r][a].y):i.push(s+"|"+t.isoVecsBAOA[r][a].x+"|"+t.isoVecsBAOA[r][a].y);this.face.push([t.vecToidx[i[0]],t.vecToidx[i[1]],t.vecToidx[i[2]]])}}orderData(e){let t=[];for(let e=0;e<13;e++)t[e]=[];let s=e.closestTo;for(let e=0;e<s.length;e++)s[e][0]>-1?s[e][1]>0&&t[s[e][0]].push([e,s[e][1]]):t[12].push([e,s[e][0]]);let r=[];for(let e=0;e<12;e++)r[e]=e;let i=12;for(let e=0;e<12;e++){t[e].sort((e,t)=>e[1]-t[1]);for(let s=0;s<t[e].length;s++)r[t[e][s][0]]=i++}for(let e=0;e<t[12].length;e++)r[t[12][e][0]]=i++;for(let e=0;e<this.vertex.length;e++)this.vertex[e].push(r[e]);this.vertex.sort((e,t)=>e[3]-t[3]);for(let e=0;e<this.vertex.length;e++)this.vertex[e].pop();for(let e=0;e<this.face.length;e++)for(let t=0;t<this.face[e].length;t++)this.face[e][t]=r[this.face[e][t]];this.sharedNodes=t[12].length,this.poleNodes=this.vertex.length-this.sharedNodes}setOrder(e,t){let s=[],r=[],i=t.pop();r.push(i);let a=this.face[i].indexOf(e);a=(a+2)%3;let o=this.face[i][a];s.push(o);let n=0;for(;t.length>0;)i=t[n],this.face[i].indexOf(o)>-1?(a=(this.face[i].indexOf(o)+1)%3,o=this.face[i][a],s.push(o),r.push(i),t.splice(n,1),n=0):n++;return this.adjacentFaces.push(s),r}toGoldbergPolyhedronData(){let e,t,s,r,i,a=new eq("GeoDual","Goldberg",[],[]);a.name="GD dual";let o=this.vertex.length,n=Array(o);for(let e=0;e<o;e++)n[e]=[];for(let e=0;e<this.face.length;e++)for(let t=0;t<3;t++)n[this.face[e][t]].push(e);this.adjacentFaces=[];for(let o=0;o<n.length;o++)for(let l of(a.face[o]=this.setOrder(o,n[o].concat([])),n[o])){e=0,t=0,s=0,r=this.face[l];for(let a=0;a<3;a++)e+=(i=this.vertex[r[a]])[0],t+=i[1],s+=i[2];a.vertex[l]=[e/3,t/3,s/3]}return a}static BuildGeodesicData(e){let t=new ej("Geodesic-m-n","Geodesic",[[0,$.PHI,-1],[-$.PHI,1,0],[-1,0,-$.PHI],[1,0,-$.PHI],[$.PHI,1,0],[0,$.PHI,1],[-1,0,$.PHI],[-$.PHI,-1,0],[0,-$.PHI,-1],[$.PHI,-1,0],[1,0,$.PHI],[0,-$.PHI,1]],[]);e.setIndices(),e.calcCoeffs(),e.createInnerFacets(),e.edgeVecsABOB(),e.mapABOBtoOBOA(),e.mapABOBtoBAOA();for(let s=0;s<e.IDATA.face.length;s++)e.MapToFace(s,t),t.innerToData(s,e),"B"===e.IDATA.edgematch[s][1]&&t.mapABOBtoDATA(s,e),"O"===e.IDATA.edgematch[s][1]&&t.mapOBOAtoDATA(s,e),"A"===e.IDATA.edgematch[s][3]&&t.mapBAOAtoDATA(s,e);return t.orderData(e),t.vertex=t.vertex.map(function(e){let t=e[0],s=e[1],r=e[2],i=Math.sqrt(t*t+s*s+r*r);return e[0]*=1/i,e[1]*=1/i,e[2]*=1/i,e}),t}}var eJ=i;class e$ extends eJ.Mesh{constructor(){super(...arguments),this.goldbergData={faceColors:[],faceCenters:[],faceZaxis:[],faceXaxis:[],faceYaxis:[],nbSharedFaces:0,nbUnsharedFaces:0,nbFaces:0,nbFacesAtPole:0,adjacentFaces:[]}}relatedGoldbergFace(e,t){return void 0===t?(e>this.goldbergData.nbUnsharedFaces-1&&(Z.Logger.Warn("Maximum number of unshared faces used"),e=this.goldbergData.nbUnsharedFaces-1),this.goldbergData.nbUnsharedFaces+e):(e>11&&(Z.Logger.Warn("Last pole used"),e=11),t>this.goldbergData.nbFacesAtPole-1&&(Z.Logger.Warn("Maximum number of faces at a pole used"),t=this.goldbergData.nbFacesAtPole-1),12+e*this.goldbergData.nbFacesAtPole+t)}_changeGoldbergFaceColors(e){for(let t=0;t<e.length;t++){let s=e[t][0],r=e[t][1],i=e[t][2];for(let e=s;e<r+1;e++)this.goldbergData.faceColors[e]=i}let t=[];for(let e=0;e<12;e++)for(let s=0;s<5;s++)t.push(this.goldbergData.faceColors[e].r,this.goldbergData.faceColors[e].g,this.goldbergData.faceColors[e].b,this.goldbergData.faceColors[e].a);for(let e=12;e<this.goldbergData.faceColors.length;e++)for(let s=0;s<6;s++)t.push(this.goldbergData.faceColors[e].r,this.goldbergData.faceColors[e].g,this.goldbergData.faceColors[e].b,this.goldbergData.faceColors[e].a);return t}setGoldbergFaceColors(e){let t=this._changeGoldbergFaceColors(e);this.setVerticesData(a.VertexBuffer.ColorKind,t)}updateGoldbergFaceColors(e){let t=this._changeGoldbergFaceColors(e);this.updateVerticesData(a.VertexBuffer.ColorKind,t)}_changeGoldbergFaceUVs(e){let t=this.getVerticesData(a.VertexBuffer.UVKind);for(let s=0;s<e.length;s++){let r,i,a=e[s][0],o=e[s][1],n=e[s][2],l=e[s][3],h=e[s][4],u=[],c=[];for(let e=0;e<5;e++)r=n.x+l*Math.cos(h+e*Math.PI/2.5),i=n.y+l*Math.sin(h+e*Math.PI/2.5),r<0&&(r=0),r>1&&(r=1),u.push(r,i);for(let e=0;e<6;e++)r=n.x+l*Math.cos(h+e*Math.PI/3),i=n.y+l*Math.sin(h+e*Math.PI/3),r<0&&(r=0),r>1&&(r=1),c.push(r,i);for(let e=a;e<Math.min(12,o+1);e++)for(let s=0;s<5;s++)t[10*e+2*s]=u[2*s],t[10*e+2*s+1]=u[2*s+1];for(let e=Math.max(12,a);e<o+1;e++)for(let s=0;s<6;s++)t[12*e-24+2*s]=c[2*s],t[12*e-23+2*s]=c[2*s+1]}return t}setGoldbergFaceUVs(e){let t=this._changeGoldbergFaceUVs(e);this.setVerticesData(a.VertexBuffer.UVKind,t)}updateGoldbergFaceUVs(e){let t=this._changeGoldbergFaceUVs(e);this.updateVerticesData(a.VertexBuffer.UVKind,t)}placeOnGoldbergFaceAt(e,t,s){e.rotation=r.Vector3.RotationFromAxis(this.goldbergData.faceXaxis[t],this.goldbergData.faceYaxis[t],this.goldbergData.faceZaxis[t]),e.position=this.goldbergData.faceCenters[t].add(this.goldbergData.faceXaxis[t].scale(s.x)).add(this.goldbergData.faceYaxis[t].scale(s.y)).add(this.goldbergData.faceZaxis[t].scale(s.z))}serialize(e){super.serialize(e),e.type="GoldbergMesh";let t={};if(t.adjacentFaces=this.goldbergData.adjacentFaces,t.nbSharedFaces=this.goldbergData.nbSharedFaces,t.nbUnsharedFaces=this.goldbergData.nbUnsharedFaces,t.nbFaces=this.goldbergData.nbFaces,t.nbFacesAtPole=this.goldbergData.nbFacesAtPole,this.goldbergData.faceColors)for(let e of(t.faceColors=[],this.goldbergData.faceColors))t.faceColors.push(e.asArray());if(this.goldbergData.faceCenters)for(let e of(t.faceCenters=[],this.goldbergData.faceCenters))t.faceCenters.push(e.asArray());if(this.goldbergData.faceZaxis)for(let e of(t.faceZaxis=[],this.goldbergData.faceZaxis))t.faceZaxis.push(e.asArray());if(this.goldbergData.faceYaxis)for(let e of(t.faceYaxis=[],this.goldbergData.faceYaxis))t.faceYaxis.push(e.asArray());if(this.goldbergData.faceXaxis)for(let e of(t.faceXaxis=[],this.goldbergData.faceXaxis))t.faceXaxis.push(e.asArray());e.goldbergData=t}static Parse(e,t){let s=e.goldbergData;s.faceColors=s.faceColors.map(e=>f.Color4.FromArray(e)),s.faceCenters=s.faceCenters.map(e=>r.Vector3.FromArray(e)),s.faceZaxis=s.faceZaxis.map(e=>r.Vector3.FromArray(e)),s.faceXaxis=s.faceXaxis.map(e=>r.Vector3.FromArray(e)),s.faceYaxis=s.faceYaxis.map(e=>r.Vector3.FromArray(e));let i=new e$(e.name,t);return i.goldbergData=s,i}}var e1=e.i(25343);class e0{constructor(e){this._paths=[],this._tempPaths=[],this._holes=[],this._resolution=e}moveTo(e,t){this._currentPath=new J.Path2(e,t),this._tempPaths.push(this._currentPath)}lineTo(e,t){this._currentPath.addLineTo(e,t)}quadraticCurveTo(e,t,s,r){this._currentPath.addQuadraticCurveTo(e,t,s,r,this._resolution)}bezierCurveTo(e,t,s,r,i,a){this._currentPath.addBezierCurveTo(e,t,s,r,i,a,this._resolution)}extractHoles(){for(let e of this._tempPaths)e.area()>0?this._holes.push(e):this._paths.push(e);if(!this._paths.length&&this._holes.length){let e=this._holes;this._holes=this._paths,this._paths=e}this._tempPaths.length=0}get paths(){return this._paths}get holes(){return this._holes}}let e2={CreateBox:g,CreateTiledBox:function(e,t,s=null){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,M(t).applyToMesh(r,t.updatable),r},CreateSphere:b,CreateDisc:d,CreateIcoSphere:eL,CreateRibbon:h,CreateCylinder:w,CreateTorus:P,CreateTorusKnot:z,CreateLineSystem:Y,CreateLines:K,CreateDashedLines:Q,ExtrudeShape:el,ExtrudeShapeCustom:eh,CreateLathe:ed,CreateTiledPlane:function(e,t,s=null){let r=new i.Mesh(e,s);return t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),r._originalBuilderSideOrientation=t.sideOrientation,V(t).applyToMesh(r,t.updatable),r},CreatePlane:ex,CreateGround:eT,CreateTiledGround:eb,CreateGroundFromHeightMap:ev,CreatePolygon:ea,ExtrudePolygon:eo,CreateTube:eA,CreatePolyhedron:eF,CreateGeodesic:function(e,t,s=null){let r=t.m||1;r!==Math.floor(r)&&(r=Math.floor(r),Z.Logger.Warn("m not an integer only floor(m) used"));let i=t.n||0;if(i!==Math.floor(i)&&(i=Math.floor(i),Z.Logger.Warn("n not an integer only floor(n) used")),i>r){let e=i;i=r,r=e,Z.Logger.Warn("n > m therefore m and n swapped")}let a=new eQ;return a.build(r,i),eF(e,{custom:ej.BuildGeodesicData(a),size:t.size,sizeX:t.sizeX,sizeY:t.sizeY,sizeZ:t.sizeZ,faceUV:t.faceUV,faceColors:t.faceColors,flat:t.flat,updatable:t.updatable,sideOrientation:t.sideOrientation,frontUVs:t.frontUVs,backUVs:t.backUVs},s)},CreateGoldberg:function(e,t,s=null){let a=t.size,l=t.sizeX||a||1,h=t.sizeY||a||1,u=t.sizeZ||a||1,c=t.m||1;c!==Math.floor(c)&&(c=Math.floor(c),Z.Logger.Warn("m not an integer only floor(m) used"));let d=t.n||0;if(d!==Math.floor(d)&&(d=Math.floor(d),Z.Logger.Warn("n not an integer only floor(n) used")),d>c){let e=d;d=c,c=e,Z.Logger.Warn("n > m therefore m and n swapped")}let p=new eQ;p.build(c,d);let x=ej.BuildGeodesicData(p),g=x.toGoldbergPolyhedronData(),m=new e$(e,s);t.sideOrientation=i.Mesh._GetDefaultSideOrientation(t.sideOrientation),m._originalBuilderSideOrientation=t.sideOrientation,(function(e,t){let s=e.size,i=e.sizeX||s||1,a=e.sizeY||s||1,l=e.sizeZ||s||1,h=0===e.sideOrientation?0:e.sideOrientation||o.VertexData.DEFAULTSIDE,u=[],c=[],d=[],p=[],f=1/0,x=-1/0,g=1/0,m=-1/0;for(let e=0;e<t.vertex.length;e++)f=Math.min(f,t.vertex[e][0]*i),x=Math.max(x,t.vertex[e][0]*i),g=Math.min(g,t.vertex[e][1]*a),m=Math.max(m,t.vertex[e][1]*a);let V=0;for(let e=0;e<t.face.length;e++){let s=t.face[e],o=r.Vector3.FromArray(t.vertex[s[0]]),h=r.Vector3.FromArray(t.vertex[s[2]]),O=r.Vector3.FromArray(t.vertex[s[1]]),_=h.subtract(o),M=O.subtract(o),y=r.Vector3.Cross(M,_).normalize();for(let e=0;e<s.length;e++){d.push(y.x,y.y,y.z);let r=t.vertex[s[e]];u.push(r[0]*i,r[1]*a,r[2]*l);let o=(r[1]*a-g)/(m-g);p.push((r[0]*i-f)/(x-f),n.useOpenGLOrientationForUV?1-o:o)}for(let e=0;e<s.length-2;e++)c.push(V,V+e+2,V+e+1);V+=s.length}o.VertexData._ComputeSides(h,u,c,d,p);let O=new o.VertexData;return O.positions=u,O.indices=c,O.normals=d,O.uvs=p,O})(t,g).applyToMesh(m,t.updatable),m.goldbergData.nbSharedFaces=x.sharedNodes,m.goldbergData.nbUnsharedFaces=x.poleNodes,m.goldbergData.adjacentFaces=x.adjacentFaces,m.goldbergData.nbFaces=m.goldbergData.nbSharedFaces+m.goldbergData.nbUnsharedFaces,m.goldbergData.nbFacesAtPole=(m.goldbergData.nbUnsharedFaces-12)/12;for(let e=0;e<x.vertex.length;e++)m.goldbergData.faceCenters.push(r.Vector3.FromArray(x.vertex[e])),m.goldbergData.faceCenters[e].x*=l,m.goldbergData.faceCenters[e].y*=h,m.goldbergData.faceCenters[e].z*=u,m.goldbergData.faceColors.push(new f.Color4(1,1,1,1));for(let e=0;e<g.face.length;e++){let t=g.face[e],s=r.Vector3.FromArray(g.vertex[t[0]]),i=r.Vector3.FromArray(g.vertex[t[2]]),a=r.Vector3.FromArray(g.vertex[t[1]]),o=i.subtract(s),n=a.subtract(s),l=r.Vector3.Cross(n,o).normalize(),h=r.Vector3.Cross(n,l).normalize();m.goldbergData.faceXaxis.push(n.normalize()),m.goldbergData.faceYaxis.push(l),m.goldbergData.faceZaxis.push(h)}return m},CreateDecal:eH,CreateCapsule:ek,CreateText:function(e,t,s,a={size:50,resolution:8,depth:1},o=null,n=earcut){let l=function(e,t,s,r){let i=Array.from(e),a=t/r.resolution,o=(r.boundingBox.yMax-r.boundingBox.yMin+r.underlineThickness)*a,n=[],l=0,h=0;for(let e=0;e<i.length;e++){let t=i[e];if("\n"===t)l=0,h-=o;else{let e=function(e,t,s,r,i,a){let o=a.glyphs[e]||a.glyphs["?"];if(!o)return null;let n=new e0(i);if(o.o){let e=o.o.split(" ");for(let i=0,a=e.length;i<a;)switch(e[i++]){case"m":{let a=parseInt(e[i++])*t+s,o=parseInt(e[i++])*t+r;n.moveTo(a,o);break}case"l":{let a=parseInt(e[i++])*t+s,o=parseInt(e[i++])*t+r;n.lineTo(a,o);break}case"q":{let a=parseInt(e[i++])*t+s,o=parseInt(e[i++])*t+r,l=parseInt(e[i++])*t+s,h=parseInt(e[i++])*t+r;n.quadraticCurveTo(l,h,a,o);break}case"b":{let a=parseInt(e[i++])*t+s,o=parseInt(e[i++])*t+r,l=parseInt(e[i++])*t+s,h=parseInt(e[i++])*t+r,u=parseInt(e[i++])*t+s,c=parseInt(e[i++])*t+r;n.bezierCurveTo(l,h,u,c,a,o)}}}return n.extractHoles(),{offsetX:o.ha*t,shapePath:n}}(t,a,l,h,s,r);e&&(l+=e.offsetX,n.push(e.shapePath))}}return n}(t,a.size||50,a.resolution||8,s),h=[],u=0;for(let t of l){if(!t.paths.length)continue;let s=t.holes.slice();for(let l of t.paths){let t=[],c=[];for(let e of l.getPoints())c.push(new r.Vector3(e.x,0,e.y));for(let e of s.slice()){let i=e.getPoints(),a=!1;for(let e of i)if(l.isPointInside(e)){a=!0;break}if(!a)continue;let o=[];for(let e of i)o.push(new r.Vector3(e.x,0,e.y));t.push(o),s.splice(s.indexOf(e),1)}if(!t.length&&s.length)for(let e of s){let s=e.getPoints(),i=[];for(let e of s)i.push(new r.Vector3(e.x,0,e.y));t.push(i)}let d=eo(e,{shape:c,holes:t.length?t:void 0,depth:a.depth||1,faceUV:a.faceUV||a.perLetterFaceUV?.(u),faceColors:a.faceColors||a.perLetterFaceColors?.(u),sideOrientation:i.Mesh._GetDefaultSideOrientation(a.sideOrientation||i.Mesh.DOUBLESIDE)},o,n);h.push(d),u++}}let c=i.Mesh.MergeMeshes(h,!0,!0);if(c){let t=c.getBoundingInfo().boundingBox;c.position.x+=-(t.minimumWorld.x+t.maximumWorld.x)/2,c.position.y+=-(t.minimumWorld.y+t.maximumWorld.y)/2,c.position.z+=-(t.minimumWorld.z+t.maximumWorld.z)/2+t.extendSize.z,c.name=e;let s=new e1.TransformNode("pivot",o);s.rotation.x=-Math.PI/2,c.parent=s,c.bakeCurrentTransformIntoVertices(),c.parent=null,s.dispose()}return c}};e.s(["MeshBuilder",0,e2],64975),e.i(64975),e.s(["MeshBuilder",0,e2],40810)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54330,e=>{"use strict";var t=e.i(93872),s=e.i(17884),i=e.i(75105),a=e.i(32304),l=e.i(79105),r=e.i(44520);class u extends s.FlowGraphBlock{constructor(e){super(e),this.config=e,this.type=this.registerDataInput("type",i.RichTypeAny,e.type),this.value=this.registerDataOutput("value",i.RichTypeAny),this.index=this.registerDataInput("index",i.RichTypeAny,new a.FlowGraphInteger((0,l.getNumericValue)(e.index??-1)))}_updateOutputs(e){let s=this.type.getValue(e),i=this.index.getValue(e),a=(0,t.GetFlowGraphAssetWithType)(e.assetsContext,s,(0,l.getNumericValue)(i),this.config.useIndexAsUniqueId);this.value.setValue(a,e)}getClassName(){return"FlowGraphGetAssetBlock"}}let o=!1;function h(){o||(o=!0,(0,r.RegisterClass)("FlowGraphGetAssetBlock",u))}e.s(["FlowGraphGetAssetBlock",0,u,"RegisterFlowGraphGetAssetBlock",0,h],29258),h(),e.s([],32957),e.i(32957),e.i(29258),e.s(["FlowGraphGetAssetBlock",0,u],54330)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2348,2413,e=>{"use strict";let t=1/1.2;e.s(["ZOOM_IN_FACTOR",0,t,"ZOOM_OUT_FACTOR",0,1.2,"attachDoubleClickFocus",0,function(e,t,s){let i=()=>{let t=e.pick(e.pointerX,e.pointerY);t?.hit&&t.pickedPoint&&s.setTarget(t.pickedPoint)};return t.addEventListener("dblclick",i),()=>t.removeEventListener("dblclick",i)},"disableWheelZoom",0,function(e){e.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"resetFocus",0,function(e,t){e.setTarget(t.target),e.alpha=t.alpha,e.beta=t.beta,e.radius=t.radius},"stepZoom",0,function(e,t){let s=e.lowerRadiusLimit??.01,i=e.upperRadiusLimit??1/0;e.radius=Math.min(i,Math.max(s,e.radius*t))}],2348);var s=e.i(79047);e.s(["ZoomButtons",0,function({onZoom:e,onReset:i}){let n="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:n,onClick:()=>e(t),children:"+"}),(0,s.jsx)("button",{type:"button","aria-label":"Zoom out",className:n,onClick:()=>e(1.2),children:"−"}),i?(0,s.jsx)("button",{type:"button","aria-label":"Reset camera focus to center",title:"Reset focus to center",className:n,onClick:i,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)},76421,e=>{"use strict";var t=e.i(79047),s=e.i(57431);let i={status:"idle",gated:!1,count:0};var n=e.i(60614),r=e.i(2348),a=e.i(2413);let l=new Set,o=[{key:"interaction",label:"Clicks & picks",color:"#fb923c",types:new Set(["pointer_click","mesh_interaction"])},{key:"actors",label:"Scene actors",color:"#e879f9",types:new Set(["node_transform"])},{key:"custom",label:"Custom",color:"#34d399",types:new Set(["custom"])},{key:"camera",label:"Camera",color:"#38bdf8",types:new Set(["camera_sample"])},{key:"pointer",label:"Pointer",color:"#94a3b8",types:new Set(["pointer_move","pointer_down","pointer_up"])},{key:"perf",label:"Perf",color:"#a78bfa",types:new Set(["frame_perf"])},{key:"lifecycle",label:"Lifecycle",color:"#f472b6",types:new Set(["session_start","session_end","scene_change","focus_change","visibility_change","viewport_resize","context_lost","context_restored","runtime_error","capability_change","input_action","resource_sample","compile_stall","mesh_visibility","hover_dwell"])}];function c(e,t,s){let i=Math.max(1,s),n=new Map;o.forEach((e,t)=>{for(let s of e.types)n.set(s,t)});let r=o.map(()=>new Set);for(let s of e){let e=n.get(s.type);if(void 0===e)continue;let a=Math.min(1,Math.max(0,(s.ts-t)/i));r[e].add(Math.round(600*a))}return o.map((e,t)=>({key:e.key,label:e.label,color:e.color,marks:[...r[t]].sort((e,t)=>e-t).map(e=>e/600)})).filter(e=>e.marks.length>0)}function u(e){let t=Math.max(0,Math.round(e/1e3)),s=Math.floor(t/60);return`${s}:${(t%60).toString().padStart(2,"0")}`}function h(e){let t=e.slice(e.lastIndexOf("/")+1);return t.length>20?`${t.slice(0,19)}\u2026`:t}function d({lanes:e,duration:s,progress:i,onSeek:n,hiddenTypes:r}){let a=e.filter(e=>{let t=o.find(t=>t.key===e.key);if(!t)return!0;for(let e of t.types)if(!r.has(e))return!0;return!1});if(0===a.length)return null;let l=`${Math.min(100,Math.max(0,i/Math.max(1,s)*100))}%`;return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"mb-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px] text-fg-muted",children:a.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block h-2 w-2 rounded-sm",style:{backgroundColor:e.color}}),e.label,(0,t.jsxs)("span",{className:"tabular-nums text-fg-muted",children:["(",e.marks.length,")"]})]},e.key))}),(0,t.jsxs)("button",{type:"button","aria-label":"Event timeline — click to seek",className:"relative block w-full cursor-pointer select-none rounded-md border border-edge bg-ink/60 p-1.5 text-left",onClick:e=>{var t;let i;return t=e.clientX,void n(Math.min(1,Math.max(0,(t-(i=e.currentTarget.getBoundingClientRect()).left)/(i.width||1)))*s)},children:[(0,t.jsx)("div",{className:"flex flex-col gap-1",children:a.map(e=>(0,t.jsx)("div",{className:"relative h-2.5 rounded-sm bg-white/5",children:e.marks.map((s,i)=>(0,t.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute top-0 h-full w-px",style:{left:`${100*s}%`,backgroundColor:e.color,opacity:.85}},i))},e.key))}),(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-1 w-px bg-saffron",style:{left:l}})]})]})}e.s(["SessionReplayView",0,function({api:o,sessionId:p,hiddenTypes:f,isLive:m=!1}){let g=(0,s.useRef)(null),b=(0,s.useRef)(null),k=(0,s.useRef)(0),y=(0,s.useRef)(f??l),x=(0,s.useRef)(!1),j=(0,s.useRef)(null),w=(0,s.useRef)(!1),v=(0,s.useRef)(!1),_=(0,s.useRef)(null),M=(0,s.useRef)(0),C=(0,s.useRef)([]),z=(0,s.useRef)([]),P=(0,s.useRef)([]),N=(0,s.useRef)(!0),S=(0,s.useRef)("birdview"),R=(0,s.useRef)(null),$=(0,s.useRef)(null),q=(0,s.useRef)([]),L=(0,s.useRef)(null),I=(0,s.useRef)(null),[V,A]=(0,s.useState)("idle"),[E,T]=(0,s.useState)(null),[Z,F]=(0,s.useState)(0),[O,W]=(0,s.useState)(0),[B,H]=(0,s.useState)(!1),[K,U]=(0,s.useState)([]),[X,D]=(0,s.useState)([]),[G,Y]=(0,s.useState)([]),[J,Q]=(0,s.useState)(!0),[ee,et]=(0,s.useState)(!1),[es,ei]=(0,s.useState)("birdview"),[en,er]=(0,s.useState)(null),[ea,el]=(0,s.useState)(!1),[eo,ec]=(0,s.useState)(!1),[eu,eh]=(0,s.useState)(null);(0,s.useEffect)(()=>{N.current=J},[J]),(0,s.useEffect)(()=>{v.current=B},[B]),(0,s.useEffect)(()=>{w.current=ee},[ee]),(0,s.useEffect)(()=>{S.current=es,x.current=!0},[es]),(0,s.useEffect)(()=>{y.current=f??l,x.current=!0},[f]),(0,s.useEffect)(()=>{let t=g.current;if(!t)return;let s=!1,i=null;return A("loading"),T(null),H(!1),F(0),W(0),U([]),D([]),Y([]),er(null),R.current=null,C.current=[],z.current=[],P.current=[],k.current=0,L.current=null,q.current=[],$.current=null,el(!1),ec(!1),eh(null),(async()=>{try{let[{Engine:a},{Scene:l},{ArcRotateCamera:u},{UniversalCamera:h},{HemisphericLight:d},{Vector3:f,Color3:g,Color4:I,Matrix:V},{MeshBuilder:E},{StandardMaterial:T},{ReplayPlayer:Z}]=await Promise.all([e.A(48159),e.A(7614),e.A(41656),e.A(95809),e.A(84694),e.A(13160),e.A(9786),e.A(33664),e.A(85461),e.A(4977)]),O=await o.sessionEvents(p);if(s)return;if(0===O.length)return void A("empty");let B=O[0].ts,K=O[0].ts;for(let e of O)e.ts<B&&(B=e.ts),e.ts>K&&(K=e.ts);let X=await (0,n.mergeSceneProxies)(o,{since:B-1,until:K+1});if(s)return;let G=[...O].sort((e,t)=>e.ts-t.ts),J=G[0].ts,Q=[],ee=[],es=new Map,ei=null;for(let e of G){let t=e.ts-J;if("camera_sample"===e.type){ei=[e.position[0],e.position[1],e.position[2]],Q.push({at:t,position:ei,direction:[e.direction[0],e.direction[1],e.direction[2]],..."number"==typeof e.fov?{fov:e.fov}:{}});continue}if("node_transform"===e.type){if(e.boneId)continue;let s=e.childPath?`${e.nodeId}/${e.childPath}`:e.nodeId,i=es.get(s);i||(i=[],es.set(s,i)),i.push({at:t,position:[e.position[0],e.position[1],e.position[2]]});continue}if("pointer_click"===e.type&&e.hitPoint){let s=e.ray?.origin??ei;if(!s)continue;ee.push({at:t,type:"pointer_click",origin:[s[0],s[1],s[2]],hit:[e.hitPoint[0],e.hitPoint[1],e.hitPoint[2]],...e.hitMesh?{mesh:e.hitMesh}:{}});continue}if("mesh_interaction"===e.type&&e.point){if(!ei)continue;ee.push({at:t,type:"mesh_interaction",origin:[ei[0],ei[1],ei[2]],hit:[e.point[0],e.point[1],e.point[2]],...e.mesh?{mesh:e.mesh}:{}})}}if(0===Q.length&&0===ee.length&&0===es.size)return void A("empty");let en=new a(t,!0,{preserveDrawingBuffer:!1}),ea=new l(en);ea.clearColor=new I(.04,.05,.07,1),$.current=ea;let el=new u("birdview-cam",-Math.PI/2,.22,12,f.Zero(),ea);el.attachControl(t,!0),(0,r.disableWheelZoom)(el),b.current=el,new d("replay-light",new f(0,1,0),ea);let eo=new h("replay-follow-cam",f.Zero(),ea);eo.minZ=.05,eo.fov=Math.PI/3,ea.activeCamera=el;let ec="birdview",eu=E.CreateGround("replay-ground",{width:20,height:20,subdivisions:20},ea),eh=new T("replay-ground-mat",ea);eh.diffuseColor=new g(.12,.14,.18),eh.wireframe=!0,eu.material=eh;let ed=new Set(es.keys()),ep=new Set(Array.from(ed,e=>e.slice(e.lastIndexOf("/")+1))),ef=[],em=[],eg=new Set,eb=e=>{if(eg.has(e.name)||(e=>{if(e.path){for(let t of ed)if(e.path===t||e.path.endsWith(`/${t}`))return!0}return ep.has(e.name)})(e))return!1;eg.add(e.name);let t=e.aabb,s=Math.max(t[3]-t[0],.001),i=Math.max(t[4]-t[1],.001),n=Math.max(t[5]-t[2],.001),r=E.CreateBox(`replay-proxy-${e.name}`,{width:s,height:i,depth:n},ea);r.position=new f((t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2);let a=new T(`replay-proxy-mat-${e.name}`,ea);return a.wireframe=!0,a.disableLighting=!0,a.emissiveColor=new g(.32,.4,.52),a.alpha=.35,r.material=a,r.isPickable=!1,L.current&&r.setEnabled(!1),em.push(r),ef.push({name:e.name,center:new f((t[0]+t[3])/2,t[4],(t[2]+t[5])/2)}),!0};for(let e of X)eb(e);C.current=ef,z.current=ef.map(()=>null),D(ef.map(e=>e.name)),q.current=em;let ek=async()=>{let e=await (0,n.mergeSceneProxies)(o,{since:B-1}).catch(()=>null);if(s||!e)return;let t=!1;for(let s of e)eb(s)&&(t=!0);t&&(C.current=ef,z.current=ef.map((e,t)=>z.current[t]??null),D(ef.map(e=>e.name)),x.current=!0)},ey=[[.91,.47,.98],[.4,.95,.6],[.98,.8,.3],[.45,.85,1]],ex=e=>{let t=e.indexOf("/");return -1===t?e:e.slice(0,t)},ej=[],ew=new Map,ev=0,e_=(e,t,s)=>{let i=E.CreateSphere(`replay-actor-${e}`,{diameter:.5,segments:12},ea),n=new T(`replay-actor-mat-${e}`,ea);n.disableLighting=!0;let r=ey[ev%ey.length];n.emissiveColor=new g(r[0],r[1],r[2]),i.material=n,i.isPickable=!1,i.isVisible=!1,ev++;let a={key:e,mesh:i,samples:s,driveKey:t};return ej.push(a),ew.set(e,a),a},eM=new Map,eC=new Map;for(let[e,t]of es){if(0===t.length)continue;let s=ex(e);if(e===s)eM.set(s,t);else{let i=eC.get(s);(!i||t.length>i.samples.length)&&eC.set(s,{key:e,samples:t})}}for(let e of new Set([...eM.keys(),...eC.keys()])){let t=eM.get(e);if(t)e_(e,e,t);else{let t=eC.get(e);e_(e,t.key,t.samples)}}P.current=ej.map(()=>null),Y(ej.map(e=>e.key));let ez=(e,t)=>{if(0===e.length||t<e[0].at)return null;let s=0,i=e.length-1,n=-1;for(;s<=i;){let r=s+i>>1;e[r].at<=t?(n=r,s=r+1):i=r-1}if(n<0)return null;let r=e[n],a=e[n+1];if(!a)return r.position;let l=a.at-r.at;if(l<=0)return r.position;let o=Math.max(0,Math.min(1,(t-r.at)/l));return[r.position[0]+(a.position[0]-r.position[0])*o,r.position[1]+(a.position[1]-r.position[1])*o,r.position[2]+(a.position[2]-r.position[2])*o]},eP=1,eN=1.4,eS=E.CreateSphere("replay-camera-origin",{diameter:.35,segments:12},ea),eR=new T("replay-camera-origin-mat",ea);eR.disableLighting=!0,eR.emissiveColor=new g(.6,.9,1),eS.material=eR;let e$=E.CreateLines("replay-camera-frustum",{points:[f.Zero(),new f(0,0,1)]},ea);e$.color=new g(.7,.95,1),e$.isPickable=!1;let eq=E.CreateCylinder("replay-camera-cone",{height:1,diameterTop:0,diameterBottom:1,tessellation:24},ea);eq.bakeTransformIntoVertices(V.RotationX(-Math.PI/2).multiply(V.Translation(0,0,.5)));let eL=new T("replay-camera-cone-mat",ea);eL.disableLighting=!0,eL.emissiveColor=new g(.4,.78,1),eL.alpha=.16,eL.backFaceCulling=!1,eq.material=eL,eq.isPickable=!1,eq.isVisible=!1;let eI=(e,t,s,i)=>{if(e?.dispose(),0===s.length)return null;let n=E.CreateLineSystem(t,{lines:s,...i?{colors:i,useVertexAlpha:!0}:{}},ea);return n.isPickable=!1,n},eV=null,eA=null,eE=null,eT=()=>{let e=y.current,t=[],s=[];for(let i of ee){if(e.has(i.type))continue;let[n,r,a]=i.hit,l="mesh_interaction"===i.type?new I(.45,.85,1,.32):new I(1,.7,.35,.32);t.push([new f(n-.1,r,a),new f(n+.1,r,a)]),t.push([new f(n,r-.1,a),new f(n,r+.1,a)]),t.push([new f(n,r,a-.1),new f(n,r,a+.1)]),s.push([l,l],[l,l],[l,l])}eE=eI(eE,"replay-persistent-marks",t,s)};eT();let eZ=E.CreateSphere("replay-glow",{diameter:1,segments:12},ea),eF=new T("replay-glow-mat",ea);eF.disableLighting=!0,eF.emissiveColor=new g(1,.62,.2),eF.alpha=0,eZ.material=eF,eZ.isPickable=!1,eZ.isVisible=!1;let eO=1/0,eW=1/0,eB=1/0,eH=-1/0,eK=-1/0,eU=-1/0,eX=!1,eD=e=>{eO=Math.min(eO,e[0]),eW=Math.min(eW,e[1]),eB=Math.min(eB,e[2]),eH=Math.max(eH,e[0]),eK=Math.max(eK,e[1]),eU=Math.max(eU,e[2])},eG=()=>{let e;if(eX||!Number.isFinite(eO))return;let t=(eO+eH)/2,s=(eW+eK)/2,i=(eB+eU)/2,n=eH-eO,r=eK-eW,a=eU-eB,l=Math.sqrt(n*n+r*r+a*a);el.setTarget(new f(t,s,i)),e=1.3*l,el.radius=Number.isFinite(e)?Math.max(8,e):12,eX=!0};for(let e of Q)eD(e.position);for(let e of ee)eD(e.origin),eD(e.hit);for(let e of es.values())for(let t of e)eD(t.position);for(let e of X)eD(e.aabb.slice(0,3)),eD(e.aabb.slice(3,6));eG();{let e=eH-eO,t=eK-eW,s=eU-eB,i=Number.isFinite(e)?Math.sqrt(e*e+t*t+s*s):0,n=Math.min(Math.max(.035*i,.45),Math.max(.45,.18*i));eP=n/.35,eN=Math.max(.16*i,3.2*n,1.4),eS.scaling.setAll(eP)}let eY=-1,eJ=e=>{var i;let n=x.current;if(!n&&e===eY)return;x.current=!1,eY=e,n&&eT();let r=y.current;(i=S.current)!==ec&&(ec=i,"follow"===i?(el.detachControl(),ea.activeCamera=eo):(ea.activeCamera=el,el.attachControl(t,!0)));let a="follow"===S.current,l=r.has("camera_sample")?null:(e=>{if(0===Q.length)return null;let t=0,s=Q.length-1,i=-1;for(;t<=s;){let n=t+s>>1;Q[n].at<=e?(i=n,t=n+1):s=n-1}return i>=0?Q[i]:null})(e);if(l){eS.position.set(l.position[0],l.position[1],l.position[2]);let e=l.direction,t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2])||1,s=eN,i=new f(l.position[0]+e[0]/t*s,l.position[1]+e[1]/t*s,l.position[2]+e[2]/t*s);if(a)eS.isVisible=!1,e$.isVisible=!1,eq.isVisible=!1,eo.position.set(l.position[0],l.position[1],l.position[2]),eo.setTarget(i),l.fov&&l.fov>0&&(eo.fov=l.fov);else{eS.isVisible=!0,e$.isVisible=!0,e$=E.CreateLines("replay-camera-frustum",{points:[eS.position.clone(),i],instance:e$},ea);let e=(l.fov&&l.fov>0?l.fov:Math.PI/3)/2,t=s*Math.tan(e);eq.isVisible=!0,eq.position.copyFrom(eS.position),eq.lookAt(i),eq.scaling.set(2*t,2*t,s)}}else eS.isVisible=!1,e$.isVisible=!1,eq.isVisible=!1;let o=r.has("node_transform");for(let t of ej){let s=o?null:ez(t.samples,e);if(!s){t.mesh.isVisible=!1;continue}t.mesh.isVisible=!0,t.mesh.position.set(s[0],s[1],s[2])}let c=ee.filter(t=>!r.has(t.type)&&t.at<=e&&t.at>=e-2200),u=[],h=[],d=[],p=[],m=null;for(let t of c){let s=e-t.at,i=Math.max(0,Math.min(1,1-s/2200)),n=new I(1,.62,.2,.18+.72*i),r=new f(t.origin[0],t.origin[1],t.origin[2]),a=new f(t.hit[0],t.hit[1],t.hit[2]);u.push([r,a]),h.push([n,n]);let l=.12+.08*i;d.push([new f(a.x-l,a.y,a.z),new f(a.x+l,a.y,a.z)]),d.push([new f(a.x,a.y-l,a.z),new f(a.x,a.y+l,a.z)]),d.push([new f(a.x,a.y,a.z-l),new f(a.x,a.y,a.z+l)]);let o=new I(1,.78,.42,.22+.72*i);if(p.push([o,o],[o,o],[o,o]),s<=900){let e=1-s/900;(!m||e>m.t)&&(m={hit:t.hit,t:e})}}if(m){let e=.25+.9*m.t;eZ.isVisible=!0,eZ.scaling.set(e,e,e),eZ.position.set(m.hit[0],m.hit[1],m.hit[2]),eF.alpha=.12+.5*m.t}else eZ.isVisible=!1;let g=null,b=-1/0;for(let e of c)e.mesh&&e.at>b&&(b=e.at,g=e.mesh);g!==R.current&&(R.current=g,s||er(g)),eV=eI(eV,"replay-trail-lines",u,h),eA=eI(eA,"replay-trail-hits",d,p)},eQ=G.length>0?G[G.length-1].ts-J:0,e0=eQ,e1=G.length>0?G[G.length-1].ts:-1/0,e2=G.map(e=>({type:e.type,ts:e.ts})),e3=0,e4=null;if(m)j.current=null,_.current=e=>{if(s)return;let t="number"==typeof e.ts?e.ts:NaN;if(!Number.isFinite(t)||t<=e1)return;e1=t;let i=t-J;if(i>e0&&(e0=i),i>eQ&&(eQ=i),e2.push({type:e.type,ts:t}),"camera_sample"===e.type){let t=e.position,s=e.direction;if(t&&s){let n=[t[0],t[1],t[2]];ei=n;let r="number"==typeof e.fov?e.fov:void 0;Q.push({at:i,position:n,direction:[s[0],s[1],s[2]],...void 0!==r?{fov:r}:{}}),eD(n),eG()}}else if("pointer_click"===e.type){let t=e.hitPoint,s=e.ray,n=s?.origin??ei;if(t&&n){let s="string"==typeof e.hitMesh?e.hitMesh:void 0;ee.push({at:i,type:"pointer_click",origin:[n[0],n[1],n[2]],hit:[t[0],t[1],t[2]],...s?{mesh:s}:{}}),eD(t),x.current=!0}}else if("mesh_interaction"===e.type){let t=e.point;if(t&&ei){let s="string"==typeof e.mesh?e.mesh:void 0;ee.push({at:i,type:"mesh_interaction",origin:[ei[0],ei[1],ei[2]],hit:[t[0],t[1],t[2]],...s?{mesh:s}:{}}),eD(t),x.current=!0}}else if("node_transform"===e.type){let t=e.position;if(e.boneId||"string"!=typeof e.nodeId||!t)return;let s="string"==typeof e.childPath?e.childPath:void 0,n=s?`${e.nodeId}/${s}`:e.nodeId;((e,t)=>{let s=ex(e),i=ew.get(s);if(!i){i=e_(s,e,[]);let t=P.current;P.current=ej.map((e,s)=>t[s]??null),Y(ej.map(e=>e.key))}e===i.driveKey?i.samples.push(t):e===s&&i.driveKey!==s&&(i.driveKey=s,i.samples.length=0,i.samples.push(t))})(n,{at:i,position:[t[0],t[1],t[2]]}),eD(t)}let n=performance.now();n-e3>250&&(e3=n,U(c(e2,J,Math.max(1,eQ)))),w.current&&i>k.current&&(k.current=i)},M.current=eQ,k.current=eQ,w.current=!0,et(!0),H(!1),F(eQ),W(eQ),U(c(e2,J,Math.max(1,eQ))),eJ(eQ),e4=setInterval(()=>void ek(),4e3);else{let e=new Z(O,{reset(){},apply(){}},{onProgress:e=>{s||(k.current=e,W(e))},onComplete:()=>{s||H(!1)}});j.current=e,F(e.durationMs),U(c(G,J,e.durationMs)),e.update(0),eJ(0)}let e5=V.Identity(),e7=new Map,e8=e=>{let t=e7.get(e);if(t)return t;let s={w:e.offsetWidth||60,h:e.offsetHeight||16};return e.offsetWidth>0&&e7.set(e,s),s},e6=performance.now(),e9=0;en.runRenderLoop(()=>{if(m){let e=performance.now(),t=e-e6;if(e6=e,w.current)k.current+=t,k.current>eQ&&(eQ=k.current),M.current=eQ,W(k.current),e-e9>250&&(e9=e,F(eQ));else if(v.current){let e=k.current+t;e>=eQ&&(e=eQ),k.current=e,W(e)}}eJ(k.current),ea.render(),(()=>{if(!N.current)return;let e=t.clientWidth||en.getRenderWidth(),s=t.clientHeight||en.getRenderHeight(),i=el.viewport.toGlobal(e,s),n=ea.getTransformMatrix(),r=R.current,a=e=>e.slice(e.lastIndexOf("/")+1),l=e=>!!r&&(r===e||a(r)===a(e)||e.endsWith(`/${r}`)||r.endsWith(`/${e}`)),o=[],c=C.current,u=z.current;for(let e=0;e<c.length;e++){let t=u[e];if(!t)continue;let s=f.Project(c[e].center,e5,n,i);if(s.z<0||s.z>1){t.style.opacity="0";continue}o.push({el:t,x:s.x,y:s.y,liftPct:140,highlighted:l(c[e].name)})}let h=P.current;for(let e=0;e<ej.length;e++){let t=h[e];if(!t)continue;let s=ej[e].mesh;if(!s.isVisible){t.style.opacity="0";continue}let r=f.Project(s.position,e5,n,i);if(r.z<0||r.z>1){t.style.opacity="0";continue}o.push({el:t,x:r.x,y:r.y,liftPct:180,highlighted:l(ej[e].key)})}o.sort((e,t)=>e.highlighted!==t.highlighted?e.highlighted?-1:1:e.y-t.y||e.x-t.x);let d=[];for(let e of o){let{w:t,h:s}=e8(e.el),i=e.x-t/2,n=e.x+t/2,r=e.y-e.liftPct/100*s,a=r,l=!0,o=0;for(;l&&o++<256;)for(let e of(l=!1,d))i<e.right&&n>e.left&&a<e.bottom&&a+s>e.top&&(a=e.bottom+1,l=!0);d.push({left:i,right:n,top:a,bottom:a+s});let c=a-r;e.el.style.opacity="1",e.el.style.zIndex=e.highlighted?"10":"",e.el.style.transform=`translate(${e.x}px, ${e.y+c}px) translate(-50%, -${e.liftPct}%)`}})()});let te=()=>en.resize();window.addEventListener("resize",te),A("ready"),i=()=>{window.removeEventListener("resize",te),e4&&clearInterval(e4),_.current=null,j.current?.pause(),e$.dispose(),eq.dispose(),eV?.dispose(),eA?.dispose(),eE?.dispose(),eZ.dispose(),L.current?.dispose(),L.current=null,q.current=[],$.current=null,ea.dispose(),en.dispose(),b.current=null,j.current=null}}catch(e){if(s)return;A("error"),T(e instanceof Error?e.message:"Failed to load replay.")}})(),()=>{s=!0,i?.()}},[o,p,m]);let ed=(0,s.useCallback)(()=>{if(m){et(!1),w.current=!1,H(e=>{let t=!e;return v.current=t,t});return}let e=j.current;e&&H(t=>(t?e.pause():e.play(),!t))},[m]),ep=(0,s.useCallback)(e=>{if(m){et(!1),w.current=!1,H(!1),v.current=!1,k.current=e,W(e);return}let t=j.current;t&&(t.pause(),t.seek(e),H(!1),k.current=e,W(e))},[m]),ef=(0,s.useCallback)(()=>{et(!0),w.current=!0,H(!1),v.current=!1,k.current=M.current,W(M.current)},[]),{gated:em}=function(e,t,n,r,a){let[l,o]=(0,s.useState)(i),c=(0,s.useRef)(r),u=(0,s.useRef)(a);return c.current=r,u.current=a,(0,s.useEffect)(()=>n?e.liveSession(t,e=>c.current(e),{onReset:()=>u.current(),onState:o}):void o(i),[e,t,n]),l}(o,p,m&&"ready"===V,e=>_.current?.(e),()=>{}),eg=(0,s.useCallback)(e=>{if(!en)return!1;if(en===e)return!0;let t=e=>e.slice(e.lastIndexOf("/")+1);return t(en)===t(e)||e.endsWith(`/${en}`)||en.endsWith(`/${e}`)},[en]),eb=(0,s.useCallback)(async t=>{let s=$.current;if(s){ec(!0),eh(`Loading ${t.name}…`);try{let[{loadSceneBackdrop:i}]=await Promise.all([e.A(3633),e.A(24235)]);if($.current!==s)return;L.current?.dispose();let n=await i(s,t);if($.current!==s)return void n.dispose();for(let e of(L.current=n,q.current))e.setEnabled(!1);x.current=!0,el(!0),eh(`Loaded ${t.name} (${n.meshes.length} meshes).`)}catch(e){eh(e instanceof Error?e.message:"Could not load model.")}finally{ec(!1)}}},[]),ek=(0,s.useCallback)(e=>{let t=e.target.files?.[0];e.target.value="",t&&eb(t)},[eb]),ey=(0,s.useCallback)(()=>{for(let e of(L.current?.dispose(),L.current=null,q.current))e.setEnabled(!0);x.current=!0,el(!1),eh(null)},[]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:g,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),(0,t.jsxs)("div",{className:`pointer-events-none absolute inset-0 overflow-hidden ${J?"":"hidden"}`,children:[X.map((e,s)=>(0,t.jsx)("div",{title:e,ref:e=>{e&&(z.current[s]=e)},className:`absolute left-0 top-0 whitespace-nowrap rounded px-1.5 py-0.5 text-[10px] font-medium opacity-0 transition-colors ${eg(e)?"bg-amber/30 text-white ring-2 ring-amber shadow-lg shadow-amber/30":"bg-ink/80 text-saffron ring-1 ring-amber/30"}`,children:h(e)},e)),G.map((e,s)=>(0,t.jsx)("div",{title:e,ref:e=>{e&&(P.current[s]=e)},className:`absolute left-0 top-0 whitespace-nowrap rounded px-1.5 py-0.5 text-[10px] font-medium opacity-0 transition-colors ${eg(e)?"bg-fuchsia-400/30 text-white ring-2 ring-fuchsia-300 shadow-lg shadow-fuchsia-500/30":"bg-ink/80 text-fuchsia-300 ring-1 ring-fuchsia-400/30"}`,children:h(e)},`actor-${e}`))]}),"ready"===V&&(X.length>0||G.length>0)?(0,t.jsx)("button",{type:"button",onClick:()=>Q(e=>!e),className:"absolute left-3 top-3 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs font-medium text-fg transition hover:bg-ink hover:text-white","aria-pressed":J?"true":"false",children:J?"Hide labels":"Show labels"}):null,"ready"===V&&"birdview"===es?(0,t.jsx)(a.ZoomButtons,{onZoom:e=>b.current&&(0,r.stepZoom)(b.current,e)}):null,"ready"!==V?(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===V?"Loading replay…":"empty"===V?"No replayable events (raw retention may be disabled).":"error"===V?E??"Replay unavailable.":null}):null]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:ed,disabled:"ready"!==V,className:"rounded-md bg-amber px-3 py-1.5 text-sm font-medium text-ink transition hover:bg-ember disabled:opacity-40",children:B?"Pause":"Play"}),m?(0,t.jsxs)("button",{type:"button",onClick:ef,disabled:"ready"!==V,"aria-pressed":ee?"true":"false",className:`flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition disabled:opacity-40 ${ee?"bg-rose-500/20 text-rose-300 ring-1 ring-rose-400/40":"border border-edge text-fg hover:bg-ink hover:text-white"}`,children:[(0,t.jsx)("span",{className:`inline-block h-2 w-2 rounded-full ${ee?"animate-pulse bg-rose-400":"bg-fg-muted"}`}),ee?"LIVE":"Resume live"]}):null,(0,t.jsxs)("div",{role:"group","aria-label":"Camera view",className:"flex items-center rounded-md border border-edge p-0.5 text-xs font-medium",children:[(0,t.jsx)("button",{type:"button",onClick:()=>ei("birdview"),disabled:"ready"!==V,"aria-pressed":"birdview"===es?"true":"false",className:`rounded px-2 py-1 transition disabled:opacity-40 ${"birdview"===es?"bg-amber text-ink":"text-fg hover:text-white"}`,children:"Birdview"}),(0,t.jsx)("button",{type:"button",onClick:()=>ei("follow"),disabled:"ready"!==V,"aria-pressed":"follow"===es?"true":"false",className:`rounded px-2 py-1 transition disabled:opacity-40 ${"follow"===es?"bg-amber text-ink":"text-fg hover:text-white"}`,children:"Follow camera"})]}),(0,t.jsx)("span",{className:"w-12 text-right font-mono text-xs tabular-nums text-fg-muted",children:u(O)}),(0,t.jsx)("input",{type:"range",min:0,max:Math.max(1,Z),step:50,value:Math.min(O,Z),onChange:e=>ep(Number(e.target.value)),disabled:"ready"!==V,className:"flex-1 accent-amber"}),(0,t.jsx)("span",{className:"w-12 font-mono text-xs tabular-nums text-fg-muted",children:u(Z)})]}),"ready"===V?(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[(0,t.jsx)("input",{ref:I,type:"file",accept:".glb,.gltf,model/gltf-binary,model/gltf+json",onChange:ek,className:"hidden"}),(0,t.jsx)("button",{type:"button",onClick:()=>I.current?.click(),disabled:eo,className:"rounded-md border border-edge bg-ink/80 px-2.5 py-1.5 text-xs font-medium text-fg transition hover:bg-ink hover:text-white disabled:opacity-40",children:eo?"Loading model…":ea?"Replace model (.glb)":"Load model (.glb)"}),ea?(0,t.jsx)("button",{type:"button",onClick:ey,disabled:eo,className:"rounded-md border border-edge px-2.5 py-1.5 text-xs font-medium text-fg transition hover:bg-ink hover:text-white disabled:opacity-40",children:"Remove model"}):null,eu?(0,t.jsx)("span",{className:"text-xs text-fg-muted",role:"status",children:eu}):(0,t.jsx)("span",{className:"text-xs text-fg-muted",children:"Load a glTF model to replace the wireframe boxes with your real scene."})]}):null,"ready"===V?(0,t.jsx)(d,{lanes:K,duration:Z,progress:O,onSeek:ep,hiddenTypes:f??l}):null,m&&em&&"ready"===V?(0,t.jsx)("p",{className:"mt-2 text-xs text-fg-muted",children:"Live follow is unavailable — raw session retention is disabled on the collector."}):null]})}],76421)},48159,e=>{e.v(t=>Promise.all(["static/chunks/1365lgwdd4vuo.js","static/chunks/27hbplu797elx.js","static/chunks/1iojfx3-g4_n9.js","static/chunks/3rl_nhqwew40w.js","static/chunks/2s4fzgzkwjluu.js","static/chunks/103x4jwovb6d-.js","static/chunks/12ory_c78yl31.js","static/chunks/3gjvl1p-tugfe.js","static/chunks/1dgf112ehnhm1.js"].map(t=>e.l(t))).then(()=>t(85303)))},7614,e=>{e.v(t=>Promise.all(["static/chunks/2pb_uosb-aa8x.js","static/chunks/1iojfx3-g4_n9.js","static/chunks/1iel4pzhhh-c3.js","static/chunks/3lladf_wemm-2.js","static/chunks/3gjvl1p-tugfe.js","static/chunks/0q8pt8fd0ma30.js","static/chunks/0u7577db_ivyr.js","static/chunks/3o_dmzpahx-5g.js","static/chunks/2s4fzgzkwjluu.js"].map(t=>e.l(t))).then(()=>t(34769)))},41656,e=>{e.v(t=>Promise.all(["static/chunks/2gf8l6hbmt7v3.js","static/chunks/1iojfx3-g4_n9.js","static/chunks/0gsh_d0m5xss1.js","static/chunks/0u7577db_ivyr.js","static/chunks/1iel4pzhhh-c3.js","static/chunks/3r7v7un976sn7.js","static/chunks/2s4fzgzkwjluu.js","static/chunks/15qfoj-vl9thu.js","static/chunks/0q8pt8fd0ma30.js","static/chunks/2a3iy701j4r_y.js","static/chunks/3lladf_wemm-2.js","static/chunks/3gjvl1p-tugfe.js"].map(t=>e.l(t))).then(()=>t(29183)))},95809,e=>{e.v(t=>Promise.all(["static/chunks/2gf8l6hbmt7v3.js","static/chunks/10afagk8yn__n.js","static/chunks/1iojfx3-g4_n9.js","static/chunks/0ptxb9dcwsw3o.js","static/chunks/32oj0iudhp8bm.js","static/chunks/2s4fzgzkwjluu.js","static/chunks/1iel4pzhhh-c3.js","static/chunks/3gjvl1p-tugfe.js"].map(t=>e.l(t))).then(()=>t(3470)))},84694,e=>{e.v(t=>Promise.all(["static/chunks/1iojfx3-g4_n9.js","static/chunks/1upy8a5cb75kt.js","static/chunks/0u7577db_ivyr.js","static/chunks/3gjvl1p-tugfe.js","static/chunks/43_fau1gg69eo.js"].map(t=>e.l(t))).then(()=>t(5153)))},13160,e=>{e.v(t=>Promise.all(["static/chunks/18h9ugdz6igdb.js","static/chunks/3gjvl1p-tugfe.js","static/chunks/1iojfx3-g4_n9.js"].map(t=>e.l(t))).then(()=>t(82297)))},9786,e=>{e.v(t=>Promise.all(["static/chunks/2gf8l6hbmt7v3.js","static/chunks/39pkya0_bvcaj.js","static/chunks/0zydv7y47dxgh.js","static/chunks/1iel4pzhhh-c3.js","static/chunks/3lladf_wemm-2.js","static/chunks/3s7hqij6xp_4e.js","static/chunks/1iojfx3-g4_n9.js","static/chunks/2s4fzgzkwjluu.js","static/chunks/0q8pt8fd0ma30.js","static/chunks/15qfoj-vl9thu.js","static/chunks/0u7577db_ivyr.js","static/chunks/3gjvl1p-tugfe.js","static/chunks/3v8kgnjk27wbe.js","static/chunks/3o_dmzpahx-5g.js","static/chunks/166yqx3_qvbpy.js","static/chunks/2a3iy701j4r_y.js"].map(t=>e.l(t))).then(()=>t(40810)))},33664,e=>{e.v(t=>Promise.all(["static/chunks/146ou-ohb_qhs.js","static/chunks/1iojfx3-g4_n9.js","static/chunks/16gwjao676ieb.js","static/chunks/0u7577db_ivyr.js","static/chunks/1iel4pzhhh-c3.js","static/chunks/25gep78-izw79.js","static/chunks/2jio3sio-_43z.js","static/chunks/3gjvl1p-tugfe.js","static/chunks/0q8pt8fd0ma30.js","static/chunks/3o_dmzpahx-5g.js","static/chunks/3lladf_wemm-2.js","static/chunks/15qfoj-vl9thu.js","static/chunks/2s4fzgzkwjluu.js"].map(t=>e.l(t))).then(()=>t(754)))},4977,e=>{e.v(t=>Promise.all(["static/chunks/1iojfx3-g4_n9.js","static/chunks/3lladf_wemm-2.js","static/chunks/1iel4pzhhh-c3.js","static/chunks/0tsk32q-88t_7.js","static/chunks/1xed71f608m4b.js","static/chunks/3o_dmzpahx-5g.js","static/chunks/0u7577db_ivyr.js","static/chunks/3gjvl1p-tugfe.js","static/chunks/2s4fzgzkwjluu.js","static/chunks/0q8pt8fd0ma30.js"].map(t=>e.l(t))).then(()=>t(12675)))},3633,e=>{e.v(t=>Promise.all(["static/chunks/3z35loj4i-id4.js","static/chunks/3gjvl1p-tugfe.js"].map(t=>e.l(t))).then(()=>t(97900)))},24235,e=>{e.v(t=>Promise.all(["static/chunks/2gf8l6hbmt7v3.js","static/chunks/1bq0fcnt1wy86.js","static/chunks/2al9dh3_1ixhv.js","static/chunks/0vf3facit951s.js","static/chunks/25gep78-izw79.js","static/chunks/1fervgvgv10r-.js","static/chunks/2s4fzgzkwjluu.js","static/chunks/2qu-gpm3ux1l6.js","static/chunks/10afagk8yn__n.js","static/chunks/29ings58w7kp1.js","static/chunks/1iojfx3-g4_n9.js","static/chunks/42yctcfi2rfwr.js","static/chunks/2tdvuc-27khif.js","static/chunks/3gjvl1p-tugfe.js","static/chunks/3kpqfqr99vo7z.js","static/chunks/2jio3sio-_43z.js","static/chunks/2_n0cpkdsjzli.js","static/chunks/1l0rt7d4m-xdk.js","static/chunks/3lladf_wemm-2.js","static/chunks/2a3iy701j4r_y.js","static/chunks/3s7hqij6xp_4e.js","static/chunks/3o_dmzpahx-5g.js","static/chunks/1iel4pzhhh-c3.js","static/chunks/15qfoj-vl9thu.js","static/chunks/166yqx3_qvbpy.js","static/chunks/0q8pt8fd0ma30.js","static/chunks/0gnjtwq-474uc.js"].map(t=>e.l(t))).then(()=>t(69546)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67619,e=>{"use strict";class t{static SetMatrixPrecision(e){if(t.MatrixTrackPrecisionChange=!1,e&&!t.MatrixUse64Bits&&t.MatrixTrackedMatrices)for(let e=0;e<t.MatrixTrackedMatrices.length;++e){let r=t.MatrixTrackedMatrices[e],s=r._m;r._m=Array(16);for(let e=0;e<16;++e)r._m[e]=s[e]}t.MatrixUse64Bits=e,t.MatrixCurrentType=t.MatrixUse64Bits?Array:Float32Array,t.MatrixTrackedMatrices=null}}t.MatrixUse64Bits=!1,t.MatrixTrackPrecisionChange=!0,t.MatrixCurrentType=Float32Array,t.MatrixTrackedMatrices=[],e.s(["PerformanceConfigurator",0,t])},63235,e=>{"use strict";function t(e,r=0,s=1){return Math.min(s,Math.max(r,e))}function r(e,t){return e-Math.floor(e/t)*t}function s(e,t){let s=r(t-e,360);return s>180&&(s-=360),s}function i(e,t,r){return Math.abs(t-e)<=r?t:e+Math.sign(t-e)*r}e.s(["Clamp",0,t,"DeltaAngle",0,s,"Denormalize",0,function(e,t,r){return e*(r-t)+t},"ExtractAsInt",0,function(e){return parseInt(e.toString().replace(/\W/g,""))},"Hermite",0,function(e,t,r,s,i){let n=i*i,o=i*n;return e*(2*o-3*n+1)+r*(-2*o+3*n)+t*(o-2*n+i)+s*(o-n)},"Hermite1stDerivative",0,function(e,t,r,s,i){let n=i*i;return(n-i)*6*e+(3*n-4*i+1)*t+(-n+i)*6*r+(3*n-2*i)*s},"HighestCommonFactor",0,function e(t,r){let s=t%r;return 0===s?r:e(r,s)},"ILog2",0,function(e){if(Math.log2)return Math.floor(Math.log2(e));if(e<0)return NaN;if(0===e)return-1/0;let t=0;if(e<1){for(;e<1;)t++,e*=2;t=-t}else if(e>1)for(;e>1;)t++,e=Math.floor(e/2);return t},"InverseLerp",0,function(e,r,s){return e!=r?t((s-e)/(r-e)):0},"Lerp",0,function(e,t,r){return e+(t-e)*r},"LerpAngle",0,function(e,s,i){let n=r(s-e,360);return n>180&&(n-=360),e+n*t(i)},"MoveTowards",0,i,"MoveTowardsAngle",0,function(e,t,r){let n,o=s(e,t);return-r<o&&o<r?n=t:(t=e+o,n=i(e,t,r)),n},"Normalize",0,function(e,t,r){return(e-t)/(r-t)},"NormalizeRadians",0,function(e){return e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI))},"OutsideRange",0,function(e,t,r,s=1401298e-51){return e<t-s||e>r+s},"PercentToRange",0,function(e,t,r){return(r-t)*e+t},"PingPong",0,function(e,t){let s=r(e,2*t);return t-Math.abs(s-t)},"RandomRange",0,function(e,t){return e===t?e:Math.random()*(t-e)+e},"RangeToPercent",0,function(e,t,r){return(e-t)/(r-t)},"Repeat",0,r,"SmoothStep",0,function(e,r,s){let i=t(s);return r*(i=-2*i*i*i+3*i*i)+e*(1-i)},"ToHex",0,function(e){let t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},"WithinEpsilon",0,function(e,t,r=1401298e-51){return Math.abs(e-t)<=r}])},23003,3864,e=>{"use strict";let t="u">typeof WeakRef;class r{constructor(e,t=!1,r,s){this.initialize(e,t,r,s)}initialize(e,t=!1,r,s){return this.mask=e,this.skipNextObservers=t,this.target=r,this.currentTarget=s,this}}class s{constructor(e,t,r=null){this.callback=e,this.mask=t,this.scope=r,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1,this._remove=null}remove(e=!1){this._remove&&this._remove(e)}}class i{static FromPromise(e,t){let r=new i;return e.then(e=>{r.notifyObservers(e)}).catch(e=>{if(t)t.notifyObservers(e);else throw e}),r}get observers(){return this._observers}constructor(e,t=!1){this.notifyIfTriggered=t,this._observers=[],this._numObserversMarkedAsDeleted=0,this._hasNotified=!1,this._eventState=new r(0),e&&(this._onObserverAdded=e)}add(e,r=-1,i=!1,n=null,o=!1){if(!e)return null;let a=new s(e,r,n);a.unregisterOnNextCall=o,i?this._observers.unshift(a):this._observers.push(a),this._onObserverAdded&&this._onObserverAdded(a),this._hasNotified&&this.notifyIfTriggered&&void 0!==this._lastNotifiedValue&&this.notifyObserver(a,this._lastNotifiedValue);let l=t?new WeakRef(this):{deref:()=>this};return a._remove=(e=!1)=>{let t=l.deref();t&&(e?t.remove(a):t._remove(a))},a}addOnce(e){return this.add(e,void 0,void 0,void 0,!0)}remove(e){return!!e&&(e._remove=null,-1!==this._observers.indexOf(e)&&(this._deferUnregister(e),!0))}removeCallback(e,t){for(let r=0;r<this._observers.length;r++){let s=this._observers[r];if(!s._willBeUnregistered&&s.callback===e&&(!t||t===s.scope))return this._deferUnregister(s),!0}return!1}_deferUnregister(e){e._willBeUnregistered||(this._numObserversMarkedAsDeleted++,e.unregisterOnNextCall=!1,e._willBeUnregistered=!0,setTimeout(()=>{this._remove(e)},0))}_remove(e,t=!0){if(!e)return!1;let r=this._observers.indexOf(e);return -1!==r&&(t&&this._numObserversMarkedAsDeleted--,this._observers.splice(r,1),!0)}makeObserverTopPriority(e){this._remove(e,!1),this._observers.unshift(e)}makeObserverBottomPriority(e){this._remove(e,!1),this._observers.push(e)}notifyObservers(e,t=-1,r,s,i){if(this.notifyIfTriggered&&(this._hasNotified=!0,this._lastNotifiedValue=e),!this._observers.length)return!0;let n=this._eventState;for(let o of(n.mask=t,n.target=r,n.currentTarget=s,n.skipNextObservers=!1,n.lastReturnValue=e,n.userInfo=i,this._observers))if(!o._willBeUnregistered&&(o.mask&t&&(o.unregisterOnNextCall&&this._deferUnregister(o),o.scope?n.lastReturnValue=o.callback.apply(o.scope,[e,n]):n.lastReturnValue=o.callback(e,n)),n.skipNextObservers))return!1;return!0}notifyObserver(e,t,r=-1){if(this.notifyIfTriggered&&(this._hasNotified=!0,this._lastNotifiedValue=t),e._willBeUnregistered)return;let s=this._eventState;s.mask=r,s.skipNextObservers=!1,e.unregisterOnNextCall&&this._deferUnregister(e),e.callback(t,s)}hasObservers(){return this._observers.length-this._numObserversMarkedAsDeleted>0}clear(){for(;this._observers.length;){let e=this._observers.pop();e&&(e._remove=null)}this._onObserverAdded=null,this._numObserversMarkedAsDeleted=0,this.cleanLastNotifiedState()}cleanLastNotifiedState(){this._hasNotified=!1,this._lastNotifiedValue=void 0}clone(){let e=new i;return e._observers=this._observers.slice(0),e}hasSpecificMask(e=-1){for(let t of this._observers)if(t.mask&e||t.mask===e)return!0;return!1}}e.s(["Observable",0,i],3864);class n{static get LastCreatedEngine(){return 0===this.Instances.length?null:this.Instances[this.Instances.length-1]}static get LastCreatedScene(){return this._LastCreatedScene}}n.Instances=[],n.OnEnginesDisposedObservable=new i,n._LastCreatedScene=null,n.UseFallbackTexture=!0,n.FallbackTexture="",e.s(["EngineStore",0,n],23003)},44520,e=>{"use strict";let t={};e.s(["GetClass",0,function(e){return t[e]},"RegisterClass",0,function(e,r){t[e]=r}])},10501,e=>{"use strict";(0,e.i(69400).RegisterMathVector)(),e.s([])},97900,e=>{"use strict";e.i(10501);var t=e.i(69400);function r(e){let r=new t.Vector3,s=new t.Vector3,i=new t.Vector3;return{reset(){},apply(n){switch(n.type){case"camera_sample":{let t=e.camera??e.scene.activeCamera;if(!t)return;let[i,o,a]=n.position;if(n.target)r.set(n.target[0],n.target[1],n.target[2]);else{let[e,t,s]=n.direction;r.set(i+e,o+t,a+s)}t.setTarget?.(r),"function"==typeof t.setPosition?(s.set(i,o,a),t.setPosition(s)):t.position.set(i,o,a);break}case"pointer_move":case"pointer_click":case"pointer_down":case"pointer_up":e.onPointer?.(n.screen,n.hitPoint,n.hitMesh,n.type);break;case"mesh_interaction":e.onMeshInteraction?.(n.mesh,n.kind,n.point);break;case"custom":e.onCustom?.(n.name,n.props,n.ts);break;case"input_action":e.onInputAction?.({action:n.action,code:n.code,button:n.button,pressed:n.pressed,source:n.source},n.ts);break;case"viewport_resize":e.onLifecycle?.({type:"viewport_resize",width:n.width,height:n.height,dpr:n.dpr},n.ts);break;case"visibility_change":e.onLifecycle?.({type:"visibility_change",state:n.state},n.ts);break;case"focus_change":e.onLifecycle?.({type:"focus_change",focused:n.focused},n.ts);break;case"context_lost":e.onLifecycle?.({type:"context_lost"},n.ts);break;case"context_restored":e.onLifecycle?.({type:"context_restored"},n.ts);break;case"runtime_error":e.onError?.({kind:n.kind,message:n.message,source:n.source,lineno:n.lineno,colno:n.colno,stack:n.stack},n.ts);break;case"camera_gesture":break;case"node_transform":{var o;let r=(o=e.nodes?.[n.nodeId])?"function"==typeof o?o()??null:o:null;if(r)if(void 0!==n.boneId){let e=r.skeleton?.bones?.find(e=>e.name===n.boneId);e&&(e.position?.set(n.position[0],n.position[1],n.position[2]),e.rotationQuaternion=new t.Quaternion(n.rotation[0],n.rotation[1],n.rotation[2],n.rotation[3]),n.scale&&e.scaling?.set(n.scale[0],n.scale[1],n.scale[2]),e.markAsDirty?.())}else{let e=void 0===n.childPath?r:function(e,t){let r=e;for(let e of t.split("/")){if(!e)continue;let t=r?.getChildren?.();if(!Array.isArray(t)||!(r=t.find(t=>t.name===e)??null))return null}return r}(r,n.childPath);e&&("function"==typeof e.setAbsolutePosition?(i.set(n.position[0],n.position[1],n.position[2]),e.setAbsolutePosition(i)):e.position?.set(n.position[0],n.position[1],n.position[2]),e.rotationQuaternion=new t.Quaternion(n.rotation[0],n.rotation[1],n.rotation[2],n.rotation[3]),n.scale&&e.scaling?.set(n.scale[0],n.scale[1],n.scale[2]))}e.onNodeTransform?.(n.nodeId,{boneId:n.boneId,childPath:n.childPath,position:n.position,rotation:n.rotation,scale:n.scale},n.ts)}}}}}async function s(e,t){let r=await e(t?.pluginExtension);r.addAllToScene();let s=!1;return{rootNodes:r.rootNodes??[],meshes:r.meshes??[],container:r,dispose(){s||(s=!0,r.removeAllFromScene?.(),r.dispose?.())}}}async function i(t,r,s){let{LoadAssetContainerAsync:i}=await e.A(73517);return await i(t,r,s?{pluginExtension:s}:void 0)}e.s(["createBabylonReplayDriver",0,r],27012),e.i(27012),e.s(["createBabylonReplayDriver",0,r,"loadSceneBackdrop",0,function(e,t,r){let n=r?.load??i;return s(r=>n(t,e,r),r)}],97900)},73517,e=>{e.v(t=>Promise.all(["static/chunks/3i8iro1gas1vx.js","static/chunks/1c6mho7e0enta.js","static/chunks/1iel4pzhhh-c3.js","static/chunks/2_n0cpkdsjzli.js","static/chunks/2s4fzgzkwjluu.js","static/chunks/0q8pt8fd0ma30.js","static/chunks/3lladf_wemm-2.js","static/chunks/3o_dmzpahx-5g.js"].map(t=>e.l(t))).then(()=>t(64433)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,53857,t=>{"use strict";var e=t.i(17884),s=t.i(75105),a=t.i(79105),i=t.i(44520);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],93768),h(),t.s([],57574),t.i(57574),t.i(93768),t.s(["FlowGraphDataSwitchBlock",0,u],53857)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62750,e=>{"use strict";var t=e.i(17884),i=e.i(75105);let l="cachedOperationValue",a="cachedExecutionId";class s extends t.FlowGraphBlock{constructor(e,t){super(t),this.value=this.registerDataOutput("value",e),this.isValid=this.registerDataOutput("isValid",i.RichTypeBoolean)}_updateOutputs(e){let t=e._getExecutionVariable(this,a,-1),i=e._getExecutionVariable(this,l,null);if(null!=i&&t===e.executionId)this.isValid.setValue(!0,e),this.value.setValue(i,e);else try{let t=this._doOperation(e);if(null==t)return void this.isValid.setValue(!1,e);e._setExecutionVariable(this,l,t),e._setExecutionVariable(this,a,e.executionId),this.value.setValue(t,e),this.isValid.setValue(!0,e)}catch(t){this.isValid.setValue(!1,e)}}}e.s(["FlowGraphCachedOperationBlock",0,s])},35388,e=>{"use strict";var t=e.i(75105),i=e.i(62750),l=e.i(69400),a=e.i(44520);class s extends i.FlowGraphCachedOperationBlock{constructor(e){super(t.RichTypeVector3,e),this.body=this.registerDataInput("body",t.RichTypeAny)}_doOperation(e){let t=this.body.getValue(e);if(!t)return;let i=e._getExecutionVariable(this,"_cachedVelocity",null);return i||(i=new l.Vector3,e._setExecutionVariable(this,"_cachedVelocity",i)),t.getAngularVelocityToRef(i),i}getClassName(){return"FlowGraphGetAngularVelocityBlock"}}let o=!1;function r(){o||(o=!0,(0,a.RegisterClass)("FlowGraphGetAngularVelocityBlock",s))}e.s(["FlowGraphGetAngularVelocityBlock",0,s,"RegisterFlowGraphGetAngularVelocityBlock",0,r],54024),r(),e.s([],88666),e.i(88666),e.i(54024),e.s(["FlowGraphGetAngularVelocityBlock",0,s],35388)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,84684,e=>{"use strict";var t=e.i(69400),o=e.i(63235),a=e.i(88),r=e.i(84106),l=e.i(19919);class i{constructor(e,t,o,a){this.name=e,this.worldAxisForNormal=t,this.worldAxisForFileX=o,this.worldAxisForFileY=a}}class n{static _NearestPow2Floor(e){return e<=1?1:1<<Math.floor(Math.log2(e))}static ConvertCubeMapTextureToSphericalPolynomial(e){let t,o;if(!e.isCube)return null;e.getScene()?.getEngine().flushFramebuffer();let a=e.getSize().width,r=e._sphericalPolynomialTargetSize,l=r>0?this._NearestPow2Floor(r):0,i=!e.noMipmap&&e._texture?.generateMipMaps===!0,n=l>0&&l<a&&i,s=n?Math.max(0,Math.round(Math.log2(a/l))):0,c=n?Math.max(1,Math.floor(a/Math.pow(2,s))):a,h=e.readPixels(0,s,void 0,!1),p=e.readPixels(1,s,void 0,!1);e.isRenderTarget?(t=e.readPixels(3,s,void 0,!1),o=e.readPixels(2,s,void 0,!1)):(t=e.readPixels(2,s,void 0,!1),o=e.readPixels(3,s,void 0,!1));let m=e.readPixels(4,s,void 0,!1),u=e.readPixels(5,s,void 0,!1),d=e.gammaSpace,_=l>0&&l<a&&!n;return new Promise(e=>{Promise.all([p,h,t,o,m,u]).then(([t,o,r,i,n,s])=>{let h=c;_&&(t=this._DownsampleFace(t,a,l,4),o=this._DownsampleFace(o,a,l,4),r=this._DownsampleFace(r,a,l,4),i=this._DownsampleFace(i,a,l,4),n=this._DownsampleFace(n,a,l,4),s=this._DownsampleFace(s,a,l,4),h=l);let p={size:h,right:o,left:t,up:r,down:i,front:n,back:s,format:5,type:+(t instanceof Float32Array),gammaSpace:d};e(this.ConvertCubeMapToSphericalPolynomial(p))})})}static _AreaElement(e,t){return Math.atan2(e*t,Math.sqrt(e*e+t*t+1))}static _DownsampleFace(e,t,o,a){let r=e instanceof Float32Array?e:Float32Array.from(e),l=o*o*a,i=new Float32Array(l),n=t/o,s=1/(n*n);for(let e=0;e<o;e++){let l=Math.floor(e*n),c=Math.floor((e+1)*n);for(let h=0;h<o;h++){let p=Math.floor(h*n),m=Math.floor((h+1)*n),u=(e*o+h)*a;for(let e=0;e<a;e++){let o=0;for(let i=l;i<c;i++)for(let l=p;l<m;l++)o+=r[(i*t+l)*a+e];i[u+e]=o*s}}}if(e instanceof Float32Array)return i;let c=new e.constructor(l);for(let e=0;e<l;e++)c[e]=i[e]+.5|0;return c}static ConvertCubeMapToSphericalPolynomial(e,t=0){let i=t>0?this._NearestPow2Floor(t):0;if(i>0&&e.size>i){let t=5===e.format?4:3,o={};for(let a of["right","left","up","down","front","back"])o[a]=this._DownsampleFace(e[a],e.size,i,t);e={...e,...o,size:i}}let n=new a.SphericalHarmonics,s=0,c=2/e.size,h=.5*c,p=h-1;for(let t=0;t<6;t++){let a=this._FileFaces[t],i=e[a.name],m=p,u=5===e.format?4:3;for(let t=0;t<e.size;t++){let d=p;for(let p=0;p<e.size;p++){let _=a.worldAxisForFileX.scale(d).add(a.worldAxisForFileY.scale(m)).add(a.worldAxisForNormal);_.normalize();let w=this._AreaElement(d-h,m-h)-this._AreaElement(d-h,m+h)-this._AreaElement(d+h,m-h)+this._AreaElement(d+h,m+h),P=i[t*e.size*u+p*u+0],f=i[t*e.size*u+p*u+1],y=i[t*e.size*u+p*u+2];isNaN(P)&&(P=0),isNaN(f)&&(f=0),isNaN(y)&&(y=0),0===e.type&&(P/=255,f/=255,y/=255),e.gammaSpace&&(P=Math.pow((0,o.Clamp)(P),r.ToLinearSpace),f=Math.pow((0,o.Clamp)(f),r.ToLinearSpace),y=Math.pow((0,o.Clamp)(y),r.ToLinearSpace));let x=this.MAX_HDRI_VALUE;if(this.PRESERVE_CLAMPED_COLORS){let e=Math.max(P,f,y);if(e>x){let t=x/e;P*=t,f*=t,y*=t}}else P=(0,o.Clamp)(P,0,x),f=(0,o.Clamp)(f,0,x),y=(0,o.Clamp)(y,0,x);let C=new l.Color3(P,f,y);n.addLight(_,C,w),s+=w,d+=c}m+=c}}let m=4*Math.PI*6/6/s;return n.scaleInPlace(m),n.convertIncidentRadianceToIrradiance(),n.convertIrradianceToLambertianRadiance(),a.SphericalPolynomial.FromHarmonics(n)}}n._FileFaces=[new i("right",new t.Vector3(1,0,0),new t.Vector3(0,0,-1),new t.Vector3(0,-1,0)),new i("left",new t.Vector3(-1,0,0),new t.Vector3(0,0,1),new t.Vector3(0,-1,0)),new i("up",new t.Vector3(0,1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,1)),new i("down",new t.Vector3(0,-1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,-1)),new i("front",new t.Vector3(0,0,1),new t.Vector3(1,0,0),new t.Vector3(0,-1,0)),new i("back",new t.Vector3(0,0,-1),new t.Vector3(-1,0,0),new t.Vector3(0,-1,0))],n.MAX_HDRI_VALUE=4096,n.PRESERVE_CLAMPED_COLORS=!1,e.s(["CubeMapToSphericalPolynomialTools",0,n])},74208,e=>{"use strict";var t=e.i(34010),o=e.i(84684),a=e.i(74868);let r=!1;e.s(["_ENVTextureLoader",0,class{constructor(){this.supportCascades=!1}loadCubeData(e,l,i,n,s){if(Array.isArray(e))return;let c=(0,t.GetEnvInfo)(e);if(c){l.width=c.width,l.height=c.width;try{r||(r=!0,a.BaseTexture.prototype._sphericalPolynomialTargetSize=0,a.BaseTexture.prototype.forceSphericalPolynomialsRecompute=function(){this._texture&&(this._texture._sphericalPolynomial=null,this._texture._sphericalPolynomialPromise=null,this._texture._sphericalPolynomialComputed=!1)},Object.defineProperty(a.BaseTexture.prototype,"sphericalPolynomial",{get:function(){if(this._texture){if(this._texture._sphericalPolynomial||this._texture._sphericalPolynomialComputed)return this._texture._sphericalPolynomial;this._texture.isReady&&(this._texture._sphericalPolynomialPromise||(this._texture._sphericalPolynomialPromise=o.CubeMapToSphericalPolynomialTools.ConvertCubeMapTextureToSphericalPolynomial(this),null===this._texture._sphericalPolynomialPromise?this._texture._sphericalPolynomialComputed=!0:this._texture._sphericalPolynomialPromise.then(e=>{this._texture._sphericalPolynomial=e,this._texture._sphericalPolynomialComputed=!0})))}return null},set:function(e){this._texture&&(this._texture._sphericalPolynomial=e)},enumerable:!0,configurable:!0})),(0,t.UploadEnvSpherical)(l,c),(0,t.UploadEnvLevelsAsync)(l,e,c).then(()=>{l.isReady=!0,l.onLoadedObservable.notifyObservers(l),l.onLoadedObservable.clear(),n&&n()},e=>{s?.("Can not upload environment levels",e)})}catch(e){s?.("Can not upload environment file",e)}}else s&&s("Can not parse the environment file",null)}loadData(){throw".env not supported in 2d."}}],74208)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,8265,95663,e=>{"use strict";var t=e.i(69400),i=e.i(19919),n=e.i(63235);class o{constructor(e,t,i){this.name=e,this.from=t,this.to=i}clone(){return new o(this.name,this.from,this.to)}}e.s(["AnimationRange",0,o],95663);var a=e.i(52624),r=e.i(75441),s=e.i(98207),l=e.i(2060),u=e.i(44520);let c=Object.freeze(new t.Quaternion(0,0,0,0)),h=Object.freeze(t.Vector3.Zero()),T=Object.freeze(t.Vector2.Zero()),m=Object.freeze(r.Size.Zero()),A=Object.freeze(i.Color3.Black()),p=Object.freeze(new i.Color4(0,0,0,0)),_={key:0,repeatCount:0,loopMode:2};class d{static _PrepareAnimation(e,n,o,a,s,l,u,c){let h;if(!isNaN(parseFloat(s))&&isFinite(s)?h=d.ANIMATIONTYPE_FLOAT:s instanceof t.Quaternion?h=d.ANIMATIONTYPE_QUATERNION:s instanceof t.Vector3?h=d.ANIMATIONTYPE_VECTOR3:s instanceof t.Vector2?h=d.ANIMATIONTYPE_VECTOR2:s instanceof i.Color3?h=d.ANIMATIONTYPE_COLOR3:s instanceof i.Color4?h=d.ANIMATIONTYPE_COLOR4:s instanceof r.Size&&(h=d.ANIMATIONTYPE_SIZE),void 0==h)return null;let T=new d(e,n,o,h,u);return T.setKeys([{frame:0,value:s},{frame:a,value:l}]),void 0!==c&&T.setEasingFunction(c),T}get runtimeAnimations(){return this._runtimeAnimations}get hasRunningRuntimeAnimations(){for(let e of this._runtimeAnimations)if(!e.isStopped())return!0;return!1}constructor(e,t,i,n,o,a){this.name=e,this.targetProperty=t,this.framePerSecond=i,this.dataType=n,this.loopMode=o,this.enableBlending=a,this._easingFunction=null,this._runtimeAnimations=[],this._events=[],this.blendingSpeed=.01,this._ranges={},this._coreAnimation=null,this.targetPropertyPath=t.split("."),this.dataType=n,this.loopMode=void 0===o?d.ANIMATIONLOOPMODE_CYCLE:o,this.uniqueId=d._UniqueIdGenerator++}toString(e){let t="Name: "+this.name+", property: "+this.targetProperty;if(t+=", datatype: "+["Float","Vector3","Quaternion","Matrix","Color3","Vector2"][this.dataType],t+=", nKeys: "+(this._keys?this._keys.length:"none"),t+=", nRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),e){t+=", Ranges: {";let e=!0;for(let i in this._ranges)e||(t+=", "),e=!1,t+=i;t+="}"}return t}addEvent(e){this._events.push(e),this._events.sort((e,t)=>e.frame-t.frame)}removeEvents(e){for(let t=0;t<this._events.length;t++)this._events[t].frame===e&&(this._events.splice(t,1),t--)}getEvents(){return this._events}createRange(e,t,i){this._ranges[e]||(this._ranges[e]=new o(e,t,i))}deleteRange(e,t=!0){let i=this._ranges[e];if(i){if(t){let e=i.from,t=i.to;for(let i=this._keys.length-1;i>=0;i--)this._keys[i].frame>=e&&this._keys[i].frame<=t&&this._keys.splice(i,1)}this._ranges[e]=null}}getRange(e){return this._ranges[e]}getKeys(){return this._keys}getHighestFrame(){let e=0;for(let t=0,i=this._keys.length;t<i;t++)e<this._keys[t].frame&&(e=this._keys[t].frame);return e}getEasingFunction(){return this._easingFunction}setEasingFunction(e){this._easingFunction=e}floatInterpolateFunction(e,t,i){return(0,n.Lerp)(e,t,i)}floatInterpolateFunctionWithTangents(e,t,i,o,a){return(0,n.Hermite)(e,t,i,o,a)}quaternionInterpolateFunction(e,i,n){return t.Quaternion.Slerp(e,i,n)}quaternionInterpolateFunctionWithTangents(e,i,n,o,a){return t.Quaternion.Hermite(e,i,n,o,a).normalize()}vector3InterpolateFunction(e,i,n){return t.Vector3.Lerp(e,i,n)}vector3InterpolateFunctionWithTangents(e,i,n,o,a){return t.Vector3.Hermite(e,i,n,o,a)}vector2InterpolateFunction(e,i,n){return t.Vector2.Lerp(e,i,n)}vector2InterpolateFunctionWithTangents(e,i,n,o,a){return t.Vector2.Hermite(e,i,n,o,a)}sizeInterpolateFunction(e,t,i){return r.Size.Lerp(e,t,i)}color3InterpolateFunction(e,t,n){return i.Color3.Lerp(e,t,n)}color3InterpolateFunctionWithTangents(e,t,n,o,a){return i.Color3.Hermite(e,t,n,o,a)}color4InterpolateFunction(e,t,n){return i.Color4.Lerp(e,t,n)}color4InterpolateFunctionWithTangents(e,t,n,o,a){return i.Color4.Hermite(e,t,n,o,a)}_getKeyValue(e){return"function"==typeof e?e():e}evaluate(e){return _.key=0,this._interpolate(e,_)}_interpolate(e,t,i=!1){let n;if(t.loopMode===d.ANIMATIONLOOPMODE_CONSTANT&&t.repeatCount>0)return t.highLimitValue.clone?t.highLimitValue.clone():t.highLimitValue;let o=this._keys;if(this._coreAnimation)n=this._coreAnimation._key;else{let a=o.length;for(n=t.key;n>=0&&e<o[n].frame;)--n;for(;n+1<=a-1&&e>=o[n+1].frame;)++n;if(t.key=n,n<0)return i?void 0:this._getKeyValue(o[0].value);if(n+1>a-1)return i?void 0:this._getKeyValue(o[a-1].value);this._key=n}let a=o[n],r=o[n+1];if(i&&(e===a.frame||e===r.frame))return;let s=this._getKeyValue(a.value),l=this._getKeyValue(r.value);if(1===a.interpolation)if(r.frame>e)return s;else return l;let u=void 0!==a.outTangent&&void 0!==r.inTangent,_=r.frame-a.frame,O=(e-a.frame)/_,M=a.easingFunction||this.getEasingFunction();switch(M&&(O=M.ease(O)),this.dataType){case d.ANIMATIONTYPE_FLOAT:{let e=u?this.floatInterpolateFunctionWithTangents(s,a.outTangent*_,l,r.inTangent*_,O):this.floatInterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return(t.offsetValue??0)*t.repeatCount+e}break}case d.ANIMATIONTYPE_QUATERNION:{let e=u?this.quaternionInterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.quaternionInterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:break;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.addInPlace((t.offsetValue||c).scale(t.repeatCount))}return e}case d.ANIMATIONTYPE_VECTOR3:{let e=u?this.vector3InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.vector3InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||h).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_VECTOR2:{let e=u?this.vector2InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.vector2InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||T).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_SIZE:switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return this.sizeInterpolateFunction(s,l,O);case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return this.sizeInterpolateFunction(s,l,O).add((t.offsetValue||m).scale(t.repeatCount))}break;case d.ANIMATIONTYPE_COLOR3:{let e=u?this.color3InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.color3InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||A).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_COLOR4:{let e=u?this.color4InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.color4InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||p).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_MATRIX:switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:if(d.AllowMatricesInterpolation)return this.matrixInterpolateFunction(s,l,O,t.workValue);return s;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return s}}return 0}matrixInterpolateFunction(e,i,n,o){return d.AllowMatrixDecomposeForInterpolation?o?(t.Matrix.DecomposeLerpToRef(e,i,n,o),o):t.Matrix.DecomposeLerp(e,i,n):o?(t.Matrix.LerpToRef(e,i,n,o),o):t.Matrix.Lerp(e,i,n)}clone(e=!1){let t=new d(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed,this._keys&&t.setKeys(this._keys,!1,e),this._ranges)for(let e in t._ranges={},this._ranges){let i=this._ranges[e];i&&(t._ranges[e]=i.clone())}return t}setKeys(e,t=!1,i=!1){if(t)this._keys=e;else if(this._keys=e.slice(0),i)for(let e=0;e<this._keys.length;e++){let t=this._keys[e];this._keys[e]={frame:t.frame,value:t.value.clone?t.value.clone():t.value,inTangent:t.inTangent&&t.inTangent.clone?t.inTangent.clone():t.inTangent,outTangent:t.outTangent&&t.outTangent.clone?t.outTangent.clone():t.outTangent,interpolation:t.interpolation,lockedTangent:t.lockedTangent,easingFunction:t.easingFunction}}}createKeyForFrame(e){_.key=0;let t=this._interpolate(e,_,!0);if(!t)return this._keys[_.key].frame===e?_.key:_.key+1;let i={frame:e,value:t.clone?t.clone():t};return this._keys.splice(_.key+1,0,i),_.key+1}serialize(){let e={};e.name=this.name,e.property=this.targetProperty,e.framePerSecond=this.framePerSecond,e.dataType=this.dataType,e.loopBehavior=this.loopMode,e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed;let t=this.dataType;e.keys=[];let i=this.getKeys();for(let n=0;n<i.length;n++){let o=i[n],a={};switch(a.frame=o.frame,t){case d.ANIMATIONTYPE_FLOAT:a.values=[o.value],void 0!==o.inTangent&&a.values.push(o.inTangent),void 0!==o.outTangent&&(void 0===o.inTangent&&a.values.push(void 0),a.values.push(o.outTangent)),void 0!==o.interpolation&&(void 0===o.inTangent&&a.values.push(void 0),void 0===o.outTangent&&a.values.push(void 0),a.values.push(o.interpolation));break;case d.ANIMATIONTYPE_QUATERNION:case d.ANIMATIONTYPE_MATRIX:case d.ANIMATIONTYPE_VECTOR3:case d.ANIMATIONTYPE_COLOR3:case d.ANIMATIONTYPE_COLOR4:a.values=o.value.asArray(),void 0!=o.inTangent&&a.values.push(o.inTangent.asArray()),void 0!=o.outTangent&&(void 0===o.inTangent&&a.values.push(void 0),a.values.push(o.outTangent.asArray())),void 0!==o.interpolation&&(void 0===o.inTangent&&a.values.push(void 0),void 0===o.outTangent&&a.values.push(void 0),a.values.push(o.interpolation))}e.keys.push(a)}for(let t in e.ranges=[],this._ranges){let i=this._ranges[t];if(!i)continue;let n={};n.name=t,n.from=i.from,n.to=i.to,e.ranges.push(n)}return e}static _UniversalLerp(e,t,i){let n=e.constructor;return n.Lerp?n.Lerp(e,t,i):n.Slerp?n.Slerp(e,t,i):e.toFixed?e*(1-i)+i*t:t}}function O(e,i,n,o=!1,a){let r,s=e;(r="object"==typeof i?i:{referenceFrame:i??0,range:n,cloneOriginalAnimation:o,clonedAnimationName:a}).cloneOriginalAnimation&&((s=e.clone()).name=r.clonedAnimationName||s.name);let l=s.getKeys();if(!l.length)return s;let u=r.referenceFrame&&r.referenceFrame>=0?r.referenceFrame:0,c=0,h=l[0],T=l.length-1,m=l[T],A={referenceValue:h.value,referencePosition:t.TmpVectors.Vector3[0],referenceQuaternion:t.TmpVectors.Quaternion[0],referenceScaling:t.TmpVectors.Vector3[1],keyPosition:t.TmpVectors.Vector3[2],keyQuaternion:t.TmpVectors.Quaternion[1],keyScaling:t.TmpVectors.Vector3[3]},p=h.frame,M=m.frame;if(r.range){let e=s.getRange(r.range);e&&(p=e.from,M=e.to)}else p=r.fromFrame??p,M=r.toFrame??M;p!==h.frame&&(c=s.createKeyForFrame(p)),M!==m.frame&&(T=s.createKeyForFrame(M));let g=s.getKeys();if(1===g.length){let e=s._getKeyValue(g[0]);A.referenceValue=e.clone?e.clone():e}else if(u<=h.frame){let e=s._getKeyValue(h.value);A.referenceValue=e.clone?e.clone():e}else if(u>=m.frame){let e=s._getKeyValue(m.value);A.referenceValue=e.clone?e.clone():e}else{_.key=0;let e=s._interpolate(u,_);A.referenceValue=e.clone?e.clone():e}s.dataType===d.ANIMATIONTYPE_QUATERNION?A.referenceValue.normalize().conjugateInPlace():s.dataType===d.ANIMATIONTYPE_MATRIX&&(A.referenceValue.decompose(A.referenceScaling,A.referenceQuaternion,A.referencePosition),A.referenceQuaternion.normalize().conjugateInPlace());let f=Number.MAX_VALUE,I=r.clipKeys?[]:null;for(let e=c;e<=T;e++){let i=g[e];if((I||r.cloneOriginalAnimation)&&(i={frame:i.frame,value:i.value.clone?i.value.clone():i.value,inTangent:i.inTangent,outTangent:i.outTangent,interpolation:i.interpolation,lockedTangent:i.lockedTangent,easingFunction:i.easingFunction},I&&(f===Number.MAX_VALUE&&(f=i.frame),i.frame-=f,I.push(i))),!e||s.dataType===d.ANIMATIONTYPE_FLOAT||i.value!==h.value)switch(s.dataType){case d.ANIMATIONTYPE_MATRIX:i.value.decompose(A.keyScaling,A.keyQuaternion,A.keyPosition),A.keyPosition.subtractInPlace(A.referencePosition),A.keyScaling.divideInPlace(A.referenceScaling),A.referenceQuaternion.multiplyToRef(A.keyQuaternion,A.keyQuaternion),t.Matrix.ComposeToRef(A.keyScaling,A.keyQuaternion,A.keyPosition,i.value);break;case d.ANIMATIONTYPE_QUATERNION:A.referenceValue.multiplyToRef(i.value,i.value);break;case d.ANIMATIONTYPE_VECTOR2:case d.ANIMATIONTYPE_VECTOR3:case d.ANIMATIONTYPE_COLOR3:case d.ANIMATIONTYPE_COLOR4:i.value.subtractToRef(A.referenceValue,i.value);break;case d.ANIMATIONTYPE_SIZE:i.value.width-=A.referenceValue.width,i.value.height-=A.referenceValue.height;break;default:i.value-=A.referenceValue}}return I&&s.setKeys(I,!0),s}function M(e,t,i,n){let o=new d(e+"Animation",e,i,t,d.ANIMATIONLOOPMODE_CONSTANT);return o.setEasingFunction(n),o}function g(e,t,i,n,o,a,r,s,l,u,c){let h=d._PrepareAnimation(e,i,n,o,a,r,s,l);return h&&(t.getScene&&(c=t.getScene()),c)?c.beginDirectAnimation(t,[h],0,o,h.loopMode!==d.ANIMATIONLOOPMODE_CONSTANT,1,u):null}function f(e,t,i,n,o,a,r,s,l,u,c){let h=d._PrepareAnimation(e,n,o,a,r,s,l,u);return h?t.getScene().beginDirectHierarchyAnimation(t,i,[h],0,a,1===h.loopMode,1,c):null}function I(e,t,i,n,o,a,r,s,l,u){let c=d._PrepareAnimation(e,i,n,o,a,r,s,l);return c?(t.animations.push(c),t.getScene().beginAnimation(t,0,o,1===c.loopMode,1,u)):null}function N(e,t,i,n,o,a,r,s=null,l=!0,u){if(r<=0)return i[e]=t,s&&s(),null;let c=r/1e3*o;return a.setKeys(u??[{frame:0,value:i[e].clone?i[e].clone():i[e]},{frame:c,value:t}]),i.animations||(i.animations=[]),i.animations.push(a),n.beginAnimation(i,0,c,!1,1,s??void 0,void 0,l)}function y(e,t){l.SerializationHelper.AppendSerializedAnimations(e,t)}function R(e){let n,o,a=new d(e.name,e.property,e.framePerSecond,e.dataType,e.loopBehavior),r=e.dataType,s=[];for(e.enableBlending&&(a.enableBlending=e.enableBlending),e.blendingSpeed&&(a.blendingSpeed=e.blendingSpeed),o=0;o<e.keys.length;o++){let a,l,u,c=e.keys[o];switch(r){case d.ANIMATIONTYPE_FLOAT:n=c.values[0],c.values.length>=2&&(a=c.values[1]),c.values.length>=3&&(l=c.values[2]),c.values.length>=4&&(u=c.values[3]);break;case d.ANIMATIONTYPE_QUATERNION:if(n=t.Quaternion.FromArray(c.values),c.values.length>=8){let e=t.Quaternion.FromArray(c.values.slice(4,8));e.equals(t.Quaternion.Zero())||(a=e)}if(c.values.length>=12){let e=t.Quaternion.FromArray(c.values.slice(8,12));e.equals(t.Quaternion.Zero())||(l=e)}c.values.length>=13&&(u=c.values[12]);break;case d.ANIMATIONTYPE_MATRIX:n=t.Matrix.FromArray(c.values),c.values.length>=17&&(u=c.values[16]);break;case d.ANIMATIONTYPE_COLOR3:n=i.Color3.FromArray(c.values),c.values[3]&&(a=i.Color3.FromArray(c.values[3])),c.values[4]&&(l=i.Color3.FromArray(c.values[4])),c.values[5]&&(u=c.values[5]);break;case d.ANIMATIONTYPE_COLOR4:n=i.Color4.FromArray(c.values),c.values[4]&&(a=i.Color4.FromArray(c.values[4])),c.values[5]&&(l=i.Color4.FromArray(c.values[5])),c.values[6]&&(u=i.Color4.FromArray(c.values[6]));break;case d.ANIMATIONTYPE_VECTOR3:default:n=t.Vector3.FromArray(c.values),c.values[3]&&(a=t.Vector3.FromArray(c.values[3])),c.values[4]&&(l=t.Vector3.FromArray(c.values[4])),c.values[5]&&(u=c.values[5])}let h={};h.frame=c.frame,h.value=n,void 0!=a&&(h.inTangent=a),void 0!=l&&(h.outTangent=l),void 0!=u&&(h.interpolation=u),s.push(h)}if(a.setKeys(s),e.ranges)for(o=0;o<e.ranges.length;o++)n=e.ranges[o],a.createRange(n.name,n.from,n.to);return a}async function E(e,t){return await new Promise((i,n)=>{let o=new s.WebRequest;o.addEventListener("readystatechange",()=>{if(4==o.readyState)if(200==o.status){let t=JSON.parse(o.responseText);if(t.animations&&(t=t.animations),t.length){let e=[];for(let i of t)e.push(R(i));i(e)}else{let n=R(t);e&&(n.name=e),i(n)}}else n("Unable to load the animation")}),o.open("GET",t),o.send()})}async function x(e){let t=this?.SnippetUrl??d.SnippetUrl;return await new Promise((i,n)=>{let o=new s.WebRequest;o.addEventListener("readystatechange",()=>{if(4==o.readyState)if(200==o.status){let t=JSON.parse(JSON.parse(o.responseText).jsonPayload);if(t.animations){let n=JSON.parse(t.animations),o=[];for(let t of n.animations){let i=R(t);i.snippetId=e,o.push(i)}i(o)}else{let n=R(JSON.parse(t.animation));n.snippetId=e,i(n)}}else n("Unable to load the snippet "+e)}),o.open("GET",t+"/"+e.replace(/#/g,"/")),o.send()})}d._UniqueIdGenerator=0,d.AllowMatricesInterpolation=!1,d.AllowMatrixDecomposeForInterpolation=!0,d.InheritOriginalValueFromActiveAnimations=!1,d.SnippetUrl="https://snippet.babylonjs.com",d.ANIMATIONTYPE_FLOAT=0,d.ANIMATIONTYPE_VECTOR3=1,d.ANIMATIONTYPE_QUATERNION=2,d.ANIMATIONTYPE_MATRIX=3,d.ANIMATIONTYPE_COLOR3=4,d.ANIMATIONTYPE_COLOR4=7,d.ANIMATIONTYPE_VECTOR2=5,d.ANIMATIONTYPE_SIZE=6,d.ANIMATIONLOOPMODE_RELATIVE=0,d.ANIMATIONLOOPMODE_CYCLE=1,d.ANIMATIONLOOPMODE_CONSTANT=2,d.ANIMATIONLOOPMODE_YOYO=4,d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT=5;let P=!1;e.s(["Animation",0,d,"AnimationCreateAnimation",0,M,"AnimationMakeAnimationAdditive",0,O,"AnimationParse",0,R,"RegisterAnimation",0,function(){P||(P=!0,d.Parse=R,d.ParseFromFileAsync=E,d.ParseFromSnippetAsync=x,d.CreateFromSnippetAsync=x,d.CreateAnimation=M,d.CreateAndStartAnimation=g,d.CreateAndStartHierarchyAnimation=f,d.CreateMergeAndStartAnimation=I,d.MakeAnimationAdditive=O,d.TransitionTo=N,d.AppendSerializedAnimations=y,(0,u.RegisterClass)("BABYLON.Animation",d),a.Node._AnimationRangeFactory=(e,t,i)=>new o(e,t,i))},"_StaticOffsetValueColor3",0,A,"_StaticOffsetValueColor4",0,p,"_StaticOffsetValueQuaternion",0,c,"_StaticOffsetValueSize",0,m,"_StaticOffsetValueVector2",0,T,"_StaticOffsetValueVector3",0,h],8265)},13523,e=>{"use strict";var t,i=e.i(69400),n=e.i(30672),o=e.i(52624),a=e.i(85050);class r extends o.Node{get _matrix(){return this._compose(),this._localMatrix}set _matrix(e){(e.updateFlag!==this._localMatrix.updateFlag||this._needToCompose)&&(this._needToCompose=!1,this._localMatrix.copyFrom(e),this._markAsDirtyAndDecompose())}constructor(e,t,n=null,o=null,a=null,r=null,s=null){super(e,t.getScene(),!1),this.name=e,this.children=[],this.animations=[],this._index=null,this._scalingDeterminant=1,this._needToDecompose=!0,this._needToCompose=!1,this._linkedTransformNode=null,this._waitingTransformNodeId=null,this._waitingTransformNodeUniqueId=null,this._skeleton=t,this._localMatrix=o?.clone()??i.Matrix.Identity(),this._restMatrix=a??this._localMatrix.clone(),this._bindMatrix=r??this._localMatrix.clone(),this._index=s,this._absoluteMatrix=new i.Matrix,this._absoluteBindMatrix=new i.Matrix,this._absoluteInverseBindMatrix=new i.Matrix,this._finalMatrix=new i.Matrix,t.bones.push(this),this.setParent(n,!1),this._updateAbsoluteBindMatrices()}getClassName(){return"Bone"}getSkeleton(){return this._skeleton}get parent(){return this._parentNode}getParent(){return this.parent}getChildren(){return this.children}getIndex(){return null===this._index?this.getSkeleton().bones.indexOf(this):this._index}set parent(e){this.setParent(e)}setParent(e,t=!0){if(this.parent!==e){if(this.parent){let e=this.parent.children.indexOf(this);-1!==e&&this.parent.children.splice(e,1)}this._parentNode=e,this.parent&&this.parent.children.push(this),t&&this._updateAbsoluteBindMatrices(),this.markAsDirty()}}getLocalMatrix(){return this._compose(),this._localMatrix}getBindMatrix(){return this._bindMatrix}getBaseMatrix(){return this.getBindMatrix()}getRestMatrix(){return this._restMatrix}getRestPose(){return this.getRestMatrix()}setRestMatrix(e){this._restMatrix.copyFrom(e)}setRestPose(e){this.setRestMatrix(e)}getBindPose(){return this.getBindMatrix()}setBindMatrix(e){this.updateMatrix(e)}setBindPose(e){this.setBindMatrix(e)}getFinalMatrix(){return this._finalMatrix}getWorldMatrix(){return this.getFinalMatrix()}returnToRest(){if(this._linkedTransformNode){let e=i.TmpVectors.Vector3[0],t=i.TmpVectors.Quaternion[0],n=i.TmpVectors.Vector3[1];this.getRestMatrix().decompose(e,t,n),this._linkedTransformNode.position.copyFrom(n),this._linkedTransformNode.rotationQuaternion=this._linkedTransformNode.rotationQuaternion??i.Quaternion.Identity(),this._linkedTransformNode.rotationQuaternion.copyFrom(t),this._linkedTransformNode.scaling.copyFrom(e)}else this._matrix=this._restMatrix}getAbsoluteInverseBindMatrix(){return this._absoluteInverseBindMatrix}getInvertedAbsoluteTransform(){return this.getAbsoluteInverseBindMatrix()}getAbsoluteMatrix(){return this._skeleton.computeAbsoluteMatrices(),this._absoluteMatrix}getAbsoluteTransform(){return this.getAbsoluteMatrix()}linkTransformNode(e){this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode--,this._linkedTransformNode=e,this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode++}getTransformNode(){return this._linkedTransformNode}get position(){return this._decompose(),this._localPosition}set position(e){this._decompose(),this._localPosition.copyFrom(e),this._markAsDirtyAndCompose()}get rotation(){return this.getRotation()}set rotation(e){this.setRotation(e)}get rotationQuaternion(){return this._decompose(),this._localRotation}set rotationQuaternion(e){this.setRotationQuaternion(e)}get scaling(){return this.getScale()}set scaling(e){this.setScale(e)}get animationPropertiesOverride(){return this._skeleton.animationPropertiesOverride}_decompose(){this._needToDecompose&&(this._needToDecompose=!1,this._localScaling||(this._localScaling=i.Vector3.Zero(),this._localRotation=i.Quaternion.Zero(),this._localPosition=i.Vector3.Zero()),this._localMatrix.decompose(this._localScaling,this._localRotation,this._localPosition))}_compose(){if(this._needToCompose){if(!this._localScaling){this._needToCompose=!1;return}this._needToCompose=!1,i.Matrix.ComposeToRef(this._localScaling,this._localRotation,this._localPosition,this._localMatrix)}}updateMatrix(e,t=!0,i=!0){this._bindMatrix.copyFrom(e),t&&this._updateAbsoluteBindMatrices(),i?this._matrix=e:this.markAsDirty()}_updateAbsoluteBindMatrices(e,t=!0){if(e||(e=this._bindMatrix),this.parent?e.multiplyToRef(this.parent._absoluteBindMatrix,this._absoluteBindMatrix):this._absoluteBindMatrix.copyFrom(e),this._absoluteBindMatrix.invertToRef(this._absoluteInverseBindMatrix),t)for(let e=0;e<this.children.length;e++)this.children[e]._updateAbsoluteBindMatrices();this._scalingDeterminant=0>this._absoluteBindMatrix.determinant()?-1:1}markAsDirty(){return this._currentRenderId++,this._childUpdateId++,this._skeleton._markAsDirty(),this}_markAsDirtyAndCompose(){this.markAsDirty(),this._needToCompose=!0}_markAsDirtyAndDecompose(){this.markAsDirty(),this._needToDecompose=!0}_updatePosition(e,t=0,n,o=!0){let a=this.getLocalMatrix();if(0==t)o?(a.addAtIndex(12,e.x),a.addAtIndex(13,e.y),a.addAtIndex(14,e.z)):a.setTranslationFromFloats(e.x,e.y,e.z);else{let t=r._TmpMats[0],s=r._TmpVecs[0];this.parent?(t.copyFrom(this.parent.getAbsoluteMatrix()),n&&t.multiplyToRef(n.getWorldMatrix(),t)):i.Matrix.IdentityToRef(t),o&&t.setTranslationFromFloats(0,0,0),t.invert(),i.Vector3.TransformCoordinatesToRef(e,t,s),o?(a.addAtIndex(12,s.x),a.addAtIndex(13,s.y),a.addAtIndex(14,s.z)):a.setTranslationFromFloats(s.x,s.y,s.z)}this._markAsDirtyAndDecompose()}translate(e,t=0,i){this._updatePosition(e,t,i,!0)}setPosition(e,t=0,i){this._updatePosition(e,t,i,!1)}setAbsolutePosition(e,t){this.setPosition(e,1,t)}scale(e,t,n,o=!1){let a=this.getLocalMatrix(),s=r._TmpMats[0];for(let o of(i.Matrix.ScalingToRef(e,t,n,s),s.multiplyToRef(a,a),s.invert(),this.children)){let i=o.getLocalMatrix();i.multiplyToRef(s,i),i.multiplyAtIndex(12,e),i.multiplyAtIndex(13,t),i.multiplyAtIndex(14,n),o._markAsDirtyAndDecompose()}if(this._markAsDirtyAndDecompose(),o)for(let i of this.children)i.scale(e,t,n,o)}setScale(e){this._decompose(),this._localScaling.copyFrom(e),this._markAsDirtyAndCompose()}getScale(){return this._decompose(),this._localScaling}getScaleToRef(e){this._decompose(),e.copyFrom(this._localScaling)}setYawPitchRoll(e,t,n,o=0,a){if(0===o){let s=r._TmpQuat;i.Quaternion.RotationYawPitchRollToRef(e,t,n,s),this.setRotationQuaternion(s,o,a);return}let s=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(s,a))return;let l=r._TmpMats[1];i.Matrix.RotationYawPitchRollToRef(e,t,n,l),s.multiplyToRef(l,l),this._rotateWithMatrix(l,o,a)}rotate(e,t,n=0,o){let a=r._TmpMats[0];a.setTranslationFromFloats(0,0,0),i.Matrix.RotationAxisToRef(e,t,a),this._rotateWithMatrix(a,n,o)}setAxisAngle(e,t,n=0,o){if(0===n){let a=r._TmpQuat;i.Quaternion.RotationAxisToRef(e,t,a),this.setRotationQuaternion(a,n,o);return}let a=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(a,o))return;let s=r._TmpMats[1];i.Matrix.RotationAxisToRef(e,t,s),a.multiplyToRef(s,s),this._rotateWithMatrix(s,n,o)}setRotation(e,t=0,i){this.setYawPitchRoll(e.y,e.x,e.z,t,i)}setRotationQuaternion(e,t=0,n){if(0===t){this._decompose(),this._localRotation.copyFrom(e),this._markAsDirtyAndCompose();return}let o=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(o,n))return;let a=r._TmpMats[1];i.Matrix.FromQuaternionToRef(e,a),o.multiplyToRef(a,a),this._rotateWithMatrix(a,t,n)}setRotationMatrix(e,t=0,n){if(0===t){let o=r._TmpQuat;i.Quaternion.FromRotationMatrixToRef(e,o),this.setRotationQuaternion(o,t,n);return}let o=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(o,n))return;let a=r._TmpMats[1];a.copyFrom(e),o.multiplyToRef(e,a),this._rotateWithMatrix(a,t,n)}_rotateWithMatrix(e,t=0,i){let n=this.getLocalMatrix(),o=n.m[12],a=n.m[13],s=n.m[14],l=this.getParent(),u=r._TmpMats[3],c=r._TmpMats[4];l&&1==t?(i?(u.copyFrom(i.getWorldMatrix()),l.getAbsoluteMatrix().multiplyToRef(u,u)):u.copyFrom(l.getAbsoluteMatrix()),c.copyFrom(u),c.invert(),n.multiplyToRef(u,n),n.multiplyToRef(e,n),n.multiplyToRef(c,n)):1==t&&i?(u.copyFrom(i.getWorldMatrix()),c.copyFrom(u),c.invert(),n.multiplyToRef(u,n),n.multiplyToRef(e,n),n.multiplyToRef(c,n)):n.multiplyToRef(e,n),n.setTranslationFromFloats(o,a,s),this._markAsDirtyAndDecompose()}_getAbsoluteInverseMatrixUnscaledToRef(e,t){let n=r._TmpMats[2];return e.copyFrom(this.getAbsoluteMatrix()),t?(e.multiplyToRef(t.getWorldMatrix(),e),i.Matrix.ScalingToRef(t.scaling.x,t.scaling.y,t.scaling.z,n)):i.Matrix.IdentityToRef(n),e.invert(),!isNaN(e.m[0])&&(n.multiplyAtIndex(0,this._scalingDeterminant),e.multiplyToRef(n,e),!0)}getPosition(e=0,t=null){let n=i.Vector3.Zero();return this.getPositionToRef(e,t,n),n}getPositionToRef(e=0,t,i){if(0==e){let e=this.getLocalMatrix();i.x=e.m[12],i.y=e.m[13],i.z=e.m[14]}else{let e=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&e.multiplyToRef(t.getWorldMatrix(),e),i.x=e.m[12],i.y=e.m[13],i.z=e.m[14]}}getAbsolutePosition(e=null){let t=i.Vector3.Zero();return this.getPositionToRef(1,e,t),t}getAbsolutePositionToRef(e,t){this.getPositionToRef(1,e,t)}computeAbsoluteMatrices(){if(this._compose(),this.parent)this._localMatrix.multiplyToRef(this.parent._absoluteMatrix,this._absoluteMatrix);else{this._absoluteMatrix.copyFrom(this._localMatrix);let e=this._skeleton.getPoseMatrix();e&&this._absoluteMatrix.multiplyToRef(e,this._absoluteMatrix)}let e=this.children,t=e.length;for(let i=0;i<t;i++)e[i].computeAbsoluteMatrices()}computeAbsoluteTransforms(){this.computeAbsoluteMatrices()}getDirection(e,t=null){let n=i.Vector3.Zero();return this.getDirectionToRef(e,t,n),n}getDirectionToRef(e,t=null,n){let o=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&o.multiplyToRef(t.getWorldMatrix(),o),i.Vector3.TransformNormalToRef(e,o,n),n.normalize()}getRotation(e=0,t=null){let n=i.Vector3.Zero();return this.getRotationToRef(e,t,n),n}getRotationToRef(e=0,t=null,i){let n=r._TmpQuat;this.getRotationQuaternionToRef(e,t,n),n.toEulerAnglesToRef(i)}getRotationQuaternion(e=0,t=null){let n=i.Quaternion.Identity();return this.getRotationQuaternionToRef(e,t,n),n}getRotationQuaternionToRef(e=0,t=null,i){if(0==e)this._decompose(),i.copyFrom(this._localRotation);else{let e=r._TmpMats[0],n=this.getAbsoluteMatrix();t?n.multiplyToRef(t.getWorldMatrix(),e):e.copyFrom(n),e.multiplyAtIndex(0,this._scalingDeterminant),e.multiplyAtIndex(1,this._scalingDeterminant),e.multiplyAtIndex(2,this._scalingDeterminant),e.decompose(void 0,i,void 0)}}getRotationMatrix(e=0,t){let n=i.Matrix.Identity();return this.getRotationMatrixToRef(e,t,n),n}getRotationMatrixToRef(e=0,t,i){if(0==e)this.getLocalMatrix().getRotationMatrixToRef(i);else{let e=r._TmpMats[0],n=this.getAbsoluteMatrix();t?n.multiplyToRef(t.getWorldMatrix(),e):e.copyFrom(n),e.multiplyAtIndex(0,this._scalingDeterminant),e.multiplyAtIndex(1,this._scalingDeterminant),e.multiplyAtIndex(2,this._scalingDeterminant),e.getRotationMatrixToRef(i)}}getAbsolutePositionFromLocal(e,t=null){let n=i.Vector3.Zero();return this.getAbsolutePositionFromLocalToRef(e,t,n),n}getAbsolutePositionFromLocalToRef(e,t=null,n){let o=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&o.multiplyToRef(t.getWorldMatrix(),o),i.Vector3.TransformCoordinatesToRef(e,o,n)}getLocalPositionFromAbsolute(e,t=null){let n=i.Vector3.Zero();return this.getLocalPositionFromAbsoluteToRef(e,t,n),n}getLocalPositionFromAbsoluteToRef(e,t=null,n){let o=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&o.multiplyToRef(t.getWorldMatrix(),o),o.invert(),i.Vector3.TransformCoordinatesToRef(e,o,n)}setCurrentPoseAsRest(){this.setRestMatrix(this.getLocalMatrix())}dispose(){this._linkedTransformNode=null;let e=this._skeleton.bones.indexOf(this);if(-1!==e&&this._skeleton.bones.splice(e,1),this._parentNode&&this._parentNode.children){let e=this._parentNode.children,t=e.indexOf(this);-1!==t&&e.splice(t,1)}super.dispose()}}r._TmpVecs=(0,n.BuildArray)(2,i.Vector3.Zero),r._TmpQuat=i.Quaternion.Identity(),r._TmpMats=(0,n.BuildArray)(5,i.Matrix.Identity),(t=r.prototype).copyAnimationRange??(t.copyAnimationRange=(0,a._MissingSideEffect)("Bone","copyAnimationRange")),e.s(["Bone",0,r])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,57575,4120,9855,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}],57575);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}],4120),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)}],9855)},2060,77090,e=>{"use strict";var t=e.i(85050);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],77090);var a=e.i(19919),f=e.i(69400),s=e.i(4120);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],2060)},96333,60420,e=>{"use strict";var t=e.i(16347),r=e.i(92180);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],96333);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],60420)}]);
|