@uptimizr/dashboard 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/out/404.html +1 -1
  2. package/out/__next.__PAGE__.txt +4 -4
  3. package/out/__next._full.txt +11 -11
  4. package/out/__next._head.txt +4 -4
  5. package/out/__next._index.txt +4 -4
  6. package/out/__next._tree.txt +2 -2
  7. package/out/_next/static/chunks/002cjeoit6-up.js +1 -0
  8. package/out/_next/static/chunks/02n1uiltexy3w.js +1 -0
  9. package/out/_next/static/chunks/03ab2khhe8-x5.js +1 -0
  10. package/out/_next/static/chunks/04_yytpc2paxy.js +1 -0
  11. package/out/_next/static/chunks/06qot1qvlsqaz.js +1 -0
  12. package/out/_next/static/chunks/07eeopuufsqp-.js +1501 -0
  13. package/out/_next/static/chunks/08a5xek662n8n.js +1 -0
  14. package/out/_next/static/chunks/08wuc9--s8zn_.js +1 -0
  15. package/out/_next/static/chunks/09510356f0lad.js +1 -0
  16. package/out/_next/static/chunks/0_eu72k69lxj7.js +1 -0
  17. package/out/_next/static/chunks/0beajlqy8p8b5.js +1 -0
  18. package/out/_next/static/chunks/0c83pe1mpx456.js +1 -0
  19. package/out/_next/static/chunks/0echnagbkyx79.js +1198 -0
  20. package/out/_next/static/chunks/0eh1ml86u8dh7.js +1 -0
  21. package/out/_next/static/chunks/0fh-9h9ylxskr.js +674 -0
  22. package/out/_next/static/chunks/0fzmc1up21g1i.js +1 -0
  23. package/out/_next/static/chunks/0grlb9lo8e502.js +1 -0
  24. package/out/_next/static/chunks/0h22pg-0xrxnm.js +1 -0
  25. package/out/_next/static/chunks/0j6p1pmc14t96.js +1 -0
  26. package/out/_next/static/chunks/0j_6dx-sttgsy.js +1 -0
  27. package/out/_next/static/chunks/0j__xaq_8_di1.js +1 -0
  28. package/out/_next/static/chunks/0kfd-cvj5fvtz.js +1 -0
  29. package/out/_next/static/chunks/0o_mp98xzqfyf.js +1 -0
  30. package/out/_next/static/chunks/0otsec99kdkt7.js +213 -0
  31. package/out/_next/static/chunks/0ql-s-tsmel_u.js +151 -0
  32. package/out/_next/static/chunks/0r47gs_e93cka.js +1 -0
  33. package/out/_next/static/chunks/0sqys6o2pbe1q.js +1328 -0
  34. package/out/_next/static/chunks/0titqrn1qmcsv.js +1 -0
  35. package/out/_next/static/chunks/0tnlbw78tgaxp.js +4 -0
  36. package/out/_next/static/chunks/0tw4dyl-cp-hd.js +1 -0
  37. package/out/_next/static/chunks/0vbce-8omgurc.js +1 -0
  38. package/out/_next/static/chunks/0vfsg5byzep_0.js +1 -0
  39. package/out/_next/static/chunks/{0gv7mblzv3dl3.js → 0w8_1yjvol1f0.js} +20 -20
  40. package/out/_next/static/chunks/0xh144a5fz58h.js +1 -0
  41. package/out/_next/static/chunks/0xjltg_pph0c8.js +1 -0
  42. package/out/_next/static/chunks/0yeqgh0dnas8d.js +1 -0
  43. package/out/_next/static/chunks/101-7e_7up7rk.js +1 -0
  44. package/out/_next/static/chunks/128e51hj_04r0.js +1 -0
  45. package/out/_next/static/chunks/{10fnxpln_5xfd.js → 12kv810lohbsx.js} +2 -2
  46. package/out/_next/static/chunks/137xbvd4nd41j.js +3 -0
  47. package/out/_next/static/chunks/14bws-suyy5zu.js +1 -0
  48. package/out/_next/static/chunks/14ggsmqwej_tt.js +1656 -0
  49. package/out/_next/static/chunks/17genz6pkmty_.js +1 -0
  50. package/out/_next/static/chunks/17xd8hnazzr0g.js +1454 -0
  51. package/out/_next/static/chunks/18dczy9ylt2s_.js +1 -0
  52. package/out/_next/static/chunks/18xs_kvsaolb0.js +1 -0
  53. package/out/_next/static/chunks/19016f8-ry0z6.js +1 -0
  54. package/out/_next/static/chunks/1_6oejyxj39li.js +1 -0
  55. package/out/_next/static/chunks/1_aon8nz9p1fr.js +1 -0
  56. package/out/_next/static/chunks/1_qzlkuxukhpq.js +779 -0
  57. package/out/_next/static/chunks/1akaj5rhgitn3.js +1 -0
  58. package/out/_next/static/chunks/1bvl1ws7b_3gn.js +1 -0
  59. package/out/_next/static/chunks/1cdbk6kxyr1c9.js +1 -0
  60. package/out/_next/static/chunks/1fbjkk55uu4_g.js +1 -0
  61. package/out/_next/static/chunks/1furcfsgrw_3g.js +1 -0
  62. package/out/_next/static/chunks/1g0-f1g3gn_rs.js +1 -0
  63. package/out/_next/static/chunks/1g7emwu85bifo.js +557 -0
  64. package/out/_next/static/chunks/{37vzwr3ciejf1.js → 1gs-5722l4u59.js} +1 -1
  65. package/out/_next/static/chunks/1gt4kh0_xmigy.js +1 -0
  66. package/out/_next/static/chunks/1h8xzuuhhglu9.js +1 -0
  67. package/out/_next/static/chunks/1hatz-jlztrn0.js +1 -0
  68. package/out/_next/static/chunks/1iioifo7i0t0_.js +1 -0
  69. package/out/_next/static/chunks/{0impkpmxx3ttp.js → 1iiz7jqgj20z0.js} +1 -1
  70. package/out/_next/static/chunks/1kujmd5n0j9nk.js +1 -0
  71. package/out/_next/static/chunks/{2kazjq29jeamx.js → 1ltux4lwz7muf.js} +160 -372
  72. package/out/_next/static/chunks/1m_buecgcq67j.js +740 -0
  73. package/out/_next/static/chunks/1n9sy0yt5d2vq.js +1 -0
  74. package/out/_next/static/chunks/1p1gz6dseck--.js +1 -0
  75. package/out/_next/static/chunks/1p1xtsfwvpuqo.js +1 -0
  76. package/out/_next/static/chunks/1p8f6okk2ewbz.js +1 -0
  77. package/out/_next/static/chunks/1qg_etglhvp9h.js +740 -0
  78. package/out/_next/static/chunks/1th_t5ujeqlkf.js +1 -0
  79. package/out/_next/static/chunks/1thr-mdzbu96v.js +1 -0
  80. package/out/_next/static/chunks/1tta1a064979p.js +1 -0
  81. package/out/_next/static/chunks/1u_riwm0nfww7.js +1 -0
  82. package/out/_next/static/chunks/1ua15kzid0_8p.js +2560 -0
  83. package/out/_next/static/chunks/1uu-rt_8p1edp.js +2712 -0
  84. package/out/_next/static/chunks/1uu93wuxigx4k.js +1 -0
  85. package/out/_next/static/chunks/{1flb8adpj6_2o.js → 1xpwp4m1tqugp.js} +1 -1
  86. package/out/_next/static/chunks/1ynju1jqfrcv0.js +1 -0
  87. package/out/_next/static/chunks/1zfojlgb15okk.js +1 -0
  88. package/out/_next/static/chunks/1zj8x5wbgnzz-.js +1 -0
  89. package/out/_next/static/chunks/1zl6t15gh34nn.js +1 -0
  90. package/out/_next/static/chunks/{1thjncpj7u6pq.js → 223vrr_4sfhsj.js} +1 -1
  91. package/out/_next/static/chunks/22cr2b04btguf.js +1 -0
  92. package/out/_next/static/chunks/242xhzxxetctz.js +1 -0
  93. package/out/_next/static/chunks/24essz5mmvx-6.js +1 -0
  94. package/out/_next/static/chunks/256k1jw1m--l7.js +146 -0
  95. package/out/_next/static/chunks/259obyrpxcv6r.js +1 -0
  96. package/out/_next/static/chunks/26v9yqicofqba.js +1 -0
  97. package/out/_next/static/chunks/290d93hmm_e8b.js +1 -0
  98. package/out/_next/static/chunks/2_2fk7iddrs43.js +1 -0
  99. package/out/_next/static/chunks/{00k_j_r7bv_eb.js → 2bjlls8-qe05r.js} +9 -9
  100. package/out/_next/static/chunks/2ckd7f1wbfod-.js +1 -0
  101. package/out/_next/static/chunks/{163fa70v4mgxj.js → 2d6hru4qo23tt.js} +1 -1
  102. package/out/_next/static/chunks/2ejvntxtvf5o9.js +1 -0
  103. package/out/_next/static/chunks/2f7_3tzf7xhps.js +1 -0
  104. package/out/_next/static/chunks/2gxd_o1g89_bv.js +1 -0
  105. package/out/_next/static/chunks/2hd2txb4-m9k1.js +1 -0
  106. package/out/_next/static/chunks/2hpxou_cnp4f_.js +1 -0
  107. package/out/_next/static/chunks/2izioctrfc0s5.js +1 -0
  108. package/out/_next/static/chunks/2jhnk4h4n0udv.js +1 -0
  109. package/out/_next/static/chunks/2jpkhkk9zi8-f.js +1 -0
  110. package/out/_next/static/chunks/2kpet_l1kq2sx.js +1 -0
  111. package/out/_next/static/chunks/2mdbvf1b5h00_.css +3 -0
  112. package/out/_next/static/chunks/2nck5w4c7leb7.js +1 -0
  113. package/out/_next/static/chunks/2our10fwtj87e.js +1 -0
  114. package/out/_next/static/chunks/2qq3uzsbiicw3.js +1194 -0
  115. package/out/_next/static/chunks/2qqqpu0ahfdda.js +1 -0
  116. package/out/_next/static/chunks/2u-f7mmxvk8wj.js +1 -0
  117. package/out/_next/static/chunks/2ue1wo4ryk87z.js +1 -0
  118. package/out/_next/static/chunks/2uk-vwlxe9-xr.js +1 -0
  119. package/out/_next/static/chunks/2ur5-lxdvv1jm.js +1 -0
  120. package/out/_next/static/chunks/2veqsohwfhfqc.js +1 -0
  121. package/out/_next/static/chunks/2vqlv9wnewhu9.js +1 -0
  122. package/out/_next/static/chunks/{1zvc1tv--w8nn.js → 2wzshintp5lf8.js} +1 -1
  123. package/out/_next/static/chunks/2x-00glogc485.js +1 -0
  124. package/out/_next/static/chunks/2yfxy0f5fqs4o.js +1 -0
  125. package/out/_next/static/chunks/2z88mt3ixktu3.js +1 -0
  126. package/out/_next/static/chunks/2z_jn9ud28fk7.js +1 -0
  127. package/out/_next/static/chunks/3-eswqjobiqk1.js +1 -0
  128. package/out/_next/static/chunks/30-tbi7pys6fp.js +4 -0
  129. package/out/_next/static/chunks/30c-nsedy_ce0.js +1 -0
  130. package/out/_next/static/chunks/31u5lbu1vxznh.js +1 -0
  131. package/out/_next/static/chunks/{2feca0xcipcyt.js → 32ahba5ezp467.js} +156 -156
  132. package/out/_next/static/chunks/337hn35kts7ud.js +1 -0
  133. package/out/_next/static/chunks/33dgpebv-tf73.js +1 -0
  134. package/out/_next/static/chunks/36jkdhq6kb-cf.js +1 -0
  135. package/out/_next/static/chunks/37epa8fz59vba.js +1166 -0
  136. package/out/_next/static/chunks/3833xfnz0a-ub.js +1 -0
  137. package/out/_next/static/chunks/38awrh_qxn22k.js +1 -0
  138. package/out/_next/static/chunks/{0wrm9jr-9bw0e.js → 38x3c1ra5slhe.js} +383 -913
  139. package/out/_next/static/chunks/39idqlqlcp5b9.js +1 -0
  140. package/out/_next/static/chunks/{2a3spdq-m8drh.js → 3_gku1pwluoo0.js} +1 -1
  141. package/out/_next/static/chunks/3_mu-4rdjajna.js +1450 -0
  142. package/out/_next/static/chunks/3coacc4-g-g5c.js +1 -0
  143. package/out/_next/static/chunks/3e00fzdfkclzq.js +1 -0
  144. package/out/_next/static/chunks/3e8fmlq0k5wkg.js +1 -0
  145. package/out/_next/static/chunks/3e9tzyrt4_98z.js +1 -0
  146. package/out/_next/static/chunks/3edelqkq92pil.js +1 -0
  147. package/out/_next/static/chunks/3figbil1t4ssj.js +593 -0
  148. package/out/_next/static/chunks/3gimb3z_mteou.js +1 -0
  149. package/out/_next/static/chunks/{2p2vv6cc9i-3q.js → 3idaz_s77e-j_.js} +9 -9
  150. package/out/_next/static/chunks/3j-4wuhs5weba.js +1 -0
  151. package/out/_next/static/chunks/3jjfnwvybayy7.js +1 -0
  152. package/out/_next/static/chunks/3jwm5dfk_78gc.js +1 -0
  153. package/out/_next/static/chunks/3k9d4ylc3li2t.js +1352 -0
  154. package/out/_next/static/chunks/3l3_0ack3gy4k.js +1 -0
  155. package/out/_next/static/chunks/3lwhs5ja7tun3.js +1 -0
  156. package/out/_next/static/chunks/3m6nmp2dca6un.js +1342 -0
  157. package/out/_next/static/chunks/3mbnfpufs2-7e.js +7 -0
  158. package/out/_next/static/chunks/3mcd08gmt038z.js +1 -0
  159. package/out/_next/static/chunks/3mt5th7b1i_u9.js +1 -0
  160. package/out/_next/static/chunks/3ne77mjdz2y7o.js +1 -0
  161. package/out/_next/static/chunks/3puhrqtujktyv.js +1 -0
  162. package/out/_next/static/chunks/3rdifucupcgkg.js +1 -0
  163. package/out/_next/static/chunks/3riekaxl3uxfb.js +1195 -0
  164. package/out/_next/static/chunks/3sdoskq_buttj.js +1 -0
  165. package/out/_next/static/chunks/3tg-ma9tv9xu4.js +1 -0
  166. package/out/_next/static/chunks/3tm-pqpmq_ppw.js +1 -0
  167. package/out/_next/static/chunks/3w9go565cjhq3.js +1636 -0
  168. package/out/_next/static/chunks/3wi9gzq2mtr_q.js +8 -0
  169. package/out/_next/static/chunks/3xagd_2_9zft2.js +1 -0
  170. package/out/_next/static/chunks/3xsq_anpad-fb.js +1 -0
  171. package/out/_next/static/chunks/3ycv2qq7vpbua.js +1 -0
  172. package/out/_next/static/chunks/3z84au-mitjjw.js +1 -0
  173. package/out/_next/static/chunks/4030dhur2h70-.js +1 -0
  174. package/out/_next/static/chunks/40ffffml4h_3r.js +4 -0
  175. package/out/_next/static/chunks/{3-shckrcpvbxu.js → 41wt50z9tx9cx.js} +108 -711
  176. package/out/_next/static/chunks/431slrqh0wa0g.js +1 -0
  177. package/out/_next/static/chunks/43s_lbd1i2krj.js +1 -0
  178. package/out/_next/static/chunks/{0-2y-_oomza2l.js → 44nxswtahaq4w.js} +18 -18
  179. package/out/_next/static/chunks/45bwefvdpztfs.js +1 -0
  180. package/out/_next/static/chunks/{turbopack-0sgd6pfbe1fy6.js → turbopack-19105pdhzxp1x.js} +1 -1
  181. package/out/_not-found/__next._full.txt +9 -9
  182. package/out/_not-found/__next._head.txt +4 -4
  183. package/out/_not-found/__next._index.txt +4 -4
  184. package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
  185. package/out/_not-found/__next._not-found.txt +3 -3
  186. package/out/_not-found/__next._tree.txt +2 -2
  187. package/out/_not-found.html +1 -1
  188. package/out/_not-found.txt +9 -9
  189. package/out/index.html +1 -1
  190. package/out/index.txt +11 -11
  191. package/package.json +5 -4
  192. package/out/_next/static/chunks/068j6934u8j16.js +0 -1
  193. package/out/_next/static/chunks/09e4adtr6w0xe.js +0 -1
  194. package/out/_next/static/chunks/0_rf76jneiwal.js +0 -176
  195. package/out/_next/static/chunks/0aznt7717miff.js +0 -1
  196. package/out/_next/static/chunks/0cu-q5q3a7uf3.js +0 -1
  197. package/out/_next/static/chunks/0fskcfh9vbhtv.js +0 -1
  198. package/out/_next/static/chunks/0o_tpe5tlugtr.js +0 -3
  199. package/out/_next/static/chunks/0pj9pajm2xz97.css +0 -3
  200. package/out/_next/static/chunks/0ufbyo1x3qkmo.js +0 -1
  201. package/out/_next/static/chunks/0wwcfw8i3j_zx.js +0 -1
  202. package/out/_next/static/chunks/0ys9-ozuluawt.js +0 -1
  203. package/out/_next/static/chunks/1-61zh4waha61.js +0 -1
  204. package/out/_next/static/chunks/10r_824wzt8hj.js +0 -1
  205. package/out/_next/static/chunks/11v6j6q59u-f_.js +0 -1
  206. package/out/_next/static/chunks/123xxske5c9na.js +0 -1
  207. package/out/_next/static/chunks/13isnf0--pmx1.js +0 -1
  208. package/out/_next/static/chunks/157d9euci08yu.js +0 -1
  209. package/out/_next/static/chunks/18u58lorfahxi.js +0 -4
  210. package/out/_next/static/chunks/1_aahautsz2v_.js +0 -1
  211. package/out/_next/static/chunks/1o1d0p-v1z8ty.js +0 -1
  212. package/out/_next/static/chunks/1vdjn0pkoyypn.js +0 -1
  213. package/out/_next/static/chunks/1yehxf-fmeicg.js +0 -1
  214. package/out/_next/static/chunks/1zx2q-r32thv1.js +0 -4
  215. package/out/_next/static/chunks/2-sjjedfr0kfq.js +0 -1
  216. package/out/_next/static/chunks/25b9x-li-tvk2.js +0 -1
  217. package/out/_next/static/chunks/2aelw3far6rii.js +0 -1
  218. package/out/_next/static/chunks/2aor7m-wbis85.js +0 -1
  219. package/out/_next/static/chunks/2fh-_9b6tqhvb.js +0 -1
  220. package/out/_next/static/chunks/2g5gecypj0rqe.js +0 -1
  221. package/out/_next/static/chunks/2szdcpl41-kzv.js +0 -1
  222. package/out/_next/static/chunks/2u6shh3oeycm-.js +0 -1
  223. package/out/_next/static/chunks/2unhhuv0arlcv.js +0 -1
  224. package/out/_next/static/chunks/310uz81hnnzsu.js +0 -1
  225. package/out/_next/static/chunks/3i3gbhccmhu7j.js +0 -210
  226. package/out/_next/static/chunks/3mqy-84_ul3t2.js +0 -1
  227. package/out/_next/static/chunks/3nz-dh9d7cehk.js +0 -1
  228. package/out/_next/static/chunks/3pufs8g4ui943.js +0 -1
  229. package/out/_next/static/chunks/3t06schbtqonl.js +0 -1
  230. package/out/_next/static/chunks/3v3-7fio3nw_t.js +0 -1
  231. package/out/_next/static/chunks/3v5ha25nxo43j.js +0 -1
  232. package/out/_next/static/chunks/3zskk1hxu3-_o.js +0 -1
  233. /package/out/_next/static/{yttuijl-0Cn9k8uTCfhIM → M9ZSIaKJeBgkjz1qktYio}/_buildManifest.js +0 -0
  234. /package/out/_next/static/{yttuijl-0Cn9k8uTCfhIM → M9ZSIaKJeBgkjz1qktYio}/_clientMiddlewareManifest.js +0 -0
  235. /package/out/_next/static/{yttuijl-0Cn9k8uTCfhIM → M9ZSIaKJeBgkjz1qktYio}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,10272,94047,37143,e=>{"use strict";e.s(["__decorate",0,function(e,t,r,i){var f,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;n>=0;n--)(f=e[n])&&(s=(a<3?f(s):a>3?f(t,r,s):f(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}],10272);let t={},r={};function i(e){let t=e.getClassName();return r[t]||(r[t]={}),r[t]}function f(e,t){return(r,f)=>{let a=i(r);a[f]||(a[f]={type:e,sourceName:t})}}function a(e,t,r,i){let f=r.value;r.value=(...r)=>{let a=f;if("u">typeof _native&&_native[t]){let e=_native[t];a=i?(...t)=>i(...t)?e(...t):f(...t):e}return e[t]=a,a(...r)}}e.s(["GetDirectStore",0,i,"GetMergedStore",0,function(e){let i=e.getClassName();if(t[i])return t[i];t[i]={};let f=t[i],a=e,s=i;for(;s;){let e,t=r[s];for(let e in t)f[e]=t[e];let i=!1;do{if(!(e=Object.getPrototypeOf(a)).getClassName){i=!0;break}if(e.getClassName()!==s)break;a=e}while(e)if(i)break;s=e.getClassName(),a=e}return f}],94047),a.filter=function(e){return(t,r,i)=>a(t,r,i,e)},e.s(["expandToProperty",0,function(e,t=null){return function(e,t=null){return(r,i)=>{let f=t||"_"+i;Object.defineProperty(r,i,{get:function(){return this[f]},set:function(t){"function"==typeof this[f]?.equals&&this[f].equals(t)||this[f]!==t&&(this[f]=t,r[e].apply(this))},enumerable:!0,configurable:!0})}}(e,t)},"nativeOverride",0,a,"serialize",0,function(e){return f(0,e)},"serializeAsColor3",0,function(e){return f(2,e)},"serializeAsColor4",0,function(e){return f(8,e)},"serializeAsColorCurves",0,function(e){return f(7,e)},"serializeAsFresnelParameters",0,function(e){return f(3,e)},"serializeAsImageProcessingConfiguration",0,function(e){return f(9,e)},"serializeAsMeshReference",0,function(e){return f(6,e)},"serializeAsQuaternion",0,function(e){return f(10,e)},"serializeAsTexture",0,function(e){return f(1,e)},"serializeAsVector2",0,function(e){return f(4,e)},"serializeAsVector3",0,function(e){return f(5,e)}],37143)},80871,76312,e=>{"use strict";var t=e.i(75405);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 f=e.split("||");for(let e in f)if(Object.prototype.hasOwnProperty.call(f,e)){let a=r._SimplifyNegation(f[e].trim()),s=a.split("&&");if(s.length>1)for(let e=0;e<s.length;++e){let f=r._SimplifyNegation(s[e].trim());if(!(i="true"!==f&&"false"!==f?"!"===f[0]?!t(f.substring(1)):t(f):"true"===f)){a="false";break}}if(i||"true"===a){i=!0;break}i="true"!==a&&"false"!==a?"!"===a[0]?!t(a.substring(1)):t(a):"true"===a}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],76312);var f=e.i(70653),a=e.i(96265),s=e.i(94047);let n=function(e,t,r,f={}){let a=e();i&&i.HasTags(t)&&i.AddTagsTo(a,i.GetTags(t,!0));let n=(0,s.GetMergedStore)(a),o={};for(let e in n){let i=n[e],s=t[e],_=i.type;if(null!=s&&("uniqueId"!==e||u.AllowLoadingUniqueId))switch(_){case 0:case 6:case 9:case 11:"function"==typeof s.slice?a[e]=s.slice():a[e]=s;break;case 1:f.cloneTexturesOnlyOnce&&o[s.uniqueId]?a[e]=o[s.uniqueId]:(a[e]=r||s.isRenderTarget?s:s.clone(),o[s.uniqueId]=a[e]);break;case 2:case 3:case 4:case 5:case 7:case 8:case 10:case 12:a[e]=r?s:s.clone()}}return a};class u{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 f=r[i],a=f.sourceName||i,s=f.type,n=e[i];if(null!=n&&("uniqueId"!==i||u.AllowLoadingUniqueId))switch(s){case 0:Array.isArray(n)?t[a]=n.slice():t[a]=n;break;case 1:case 3:case 7:case 9:t[a]=n.serialize();break;case 2:case 4:case 5:case 8:case 10:case 12:t[a]=n.asArray();break;case 6:case 11:t[a]=n.id}}return t}static ParseProperties(e,t,r,i){i||(i="");let n=(0,s.GetMergedStore)(t);for(let s in n){let o=n[s],_=e[o.sourceName||s],h=o.type;if(null!=_&&("uniqueId"!==s||u.AllowLoadingUniqueId))switch(h){case 0:t[s]=_;break;case 1:r&&(t[s]=u._TextureParser(_,r,i));break;case 2:t[s]=f.Color3.FromArray(_);break;case 3:t[s]=u._FresnelParametersParser(_);break;case 4:t[s]=a.Vector2.FromArray(_);break;case 5:t[s]=a.Vector3.FromArray(_);break;case 6:r&&(t[s]=r.getLastMeshById(_));break;case 7:t[s]=u._ColorCurvesParser(_);break;case 8:t[s]=f.Color4.FromArray(_);break;case 9:t[s]=u._ImageProcessingConfigurationParser(_);break;case 10:t[s]=a.Quaternion.FromArray(_);break;case 11:r&&(t[s]=r.getCameraById(_));break;case 12:t[s]=a.Matrix.FromArray(_)}}}static Parse(e,t,r,f=null){let a=e();return i&&i.AddTagsTo(a,t.tags),u.ParseProperties(t,a,r,f),a}static Clone(e,t,r={}){return n(e,t,!1,r)}static Instanciate(e,t){return n(e,t,!0)}}u.AllowLoadingUniqueId=!1,u._ImageProcessingConfigurationParser=e=>{throw(0,t._WarnImport)("ImageProcessingConfiguration")},u._FresnelParametersParser=e=>{throw(0,t._WarnImport)("FresnelParameters")},u._ColorCurvesParser=e=>{throw(0,t._WarnImport)("ColorCurves")},u._TextureParser=(e,r,i)=>{throw(0,t._WarnImport)("Texture")},e.s(["SerializationHelper",0,u],80871)},33855,21823,e=>{"use strict";var t=e.i(13379),r=e.i(65740);class i{constructor(e,t,r=!1,i,f=!1,a){this._uniformNames=[],this._valueCache={},this._engine=e,this._noUBO=!e.supportsUniformBuffers||f,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===a&&this._engine._features.trackUbosInFrame||!0===a)&&(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 f=this._uniformLocations[e];if(void 0===f){if(this._buffer)return void t.Logger.Error("Cannot add an uniform after UBO has been created. uniformName="+e);this.addUniform(e,i),f=this._uniformLocations[e]}if(this._buffer||this.create(),this._dynamic)for(let e=0;e<i;e++)this._bufferData[f+e]=r[e];else{let e=!1;for(let t=0;t<i;t++)(16!==i||this._engine._features.uniformBufferHardCheckMatrix)&&this._bufferData[f+t]===Math.fround(r[t])||(e=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[f+t]=r[t]);this._needSync=this._needSync||e}}updateUniformArray(e,i,f){this._checkNewFrame();let a=this._uniformLocations[e];if(void 0===a)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<f;e++)this._bufferData[a+e]=i[e];else{let e=!1,t=0,n=0;for(let u=0;u<f;u++)if(this._bufferData[a+4*n+t]!==r.Tools.FloatRound(i[u])&&(e=!0,this._createBufferOnWrite&&this._createNewBuffer(),this._bufferData[a+4*n+t]=i[u]),++t===s.strideSize){for(;t<4;t++)this._bufferData[a+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,f=""){this._currentEffect.setFloat3(e+f,t,r,i)}_updateFloat3ForUniform(e,t,r,f){i._TempBuffer[0]=t,i._TempBuffer[1]=r,i._TempBuffer[2]=f,this.updateUniform(e,i._TempBuffer,3)}_updateFloat4ForEffect(e,t,r,i,f,a=""){this._currentEffect.setFloat4(e+a,t,r,i,f)}_updateFloat4ForUniform(e,t,r,f,a){i._TempBuffer[0]=t,i._TempBuffer[1]=r,i._TempBuffer[2]=f,i._TempBuffer[3]=a,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,f=""){this._currentEffect.setInt3(e+f,t,r,i)}_updateInt3ForUniform(e,t,r,f){i._TempBufferInt32View[0]=t,i._TempBufferInt32View[1]=r,i._TempBufferInt32View[2]=f,this.updateUniform(e,i._TempBuffer,3)}_updateInt4ForEffect(e,t,r,i,f,a=""){this._currentEffect.setInt4(e+a,t,r,i,f)}_updateInt4ForUniform(e,t,r,f,a){i._TempBufferInt32View[0]=t,i._TempBufferInt32View[1]=r,i._TempBufferInt32View[2]=f,i._TempBufferInt32View[3]=a,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,f=""){this._currentEffect.setUInt3(e+f,t,r,i)}_updateUInt3ForUniform(e,t,r,f){i._TempBufferUInt32View[0]=t,i._TempBufferUInt32View[1]=r,i._TempBufferUInt32View[2]=f,this.updateUniform(e,i._TempBuffer,3)}_updateUInt4ForEffect(e,t,r,i,f,a=""){this._currentEffect.setUInt4(e+a,t,r,i,f)}_updateUInt4ForUniform(e,t,r,f,a){i._TempBufferUInt32View[0]=t,i._TempBufferUInt32View[1]=r,i._TempBufferUInt32View[2]=f,i._TempBufferUInt32View[3]=a,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],33855);class f{static CompareLightsPriority(e,t){return e.shadowEnabled!==t.shadowEnabled?!!t.shadowEnabled-!!e.shadowEnabled:t.renderPriority-e.renderPriority}}f.FALLOFF_DEFAULT=0,f.FALLOFF_PHYSICAL=1,f.FALLOFF_GLTF=2,f.FALLOFF_STANDARD=3,f.LIGHTMAP_DEFAULT=0,f.LIGHTMAP_SPECULAR=1,f.LIGHTMAP_SHADOWSONLY=2,f.INTENSITYMODE_AUTOMATIC=0,f.INTENSITYMODE_LUMINOUSPOWER=1,f.INTENSITYMODE_LUMINOUSINTENSITY=2,f.INTENSITYMODE_ILLUMINANCE=3,f.INTENSITYMODE_LUMINANCE=4,f.LIGHTTYPEID_POINTLIGHT=0,f.LIGHTTYPEID_DIRECTIONALLIGHT=1,f.LIGHTTYPEID_SPOTLIGHT=2,f.LIGHTTYPEID_HEMISPHERICLIGHT=3,f.LIGHTTYPEID_RECT_AREALIGHT=4,f.LIGHTTYPEID_CLUSTERED_CONTAINER=5,e.s(["LightConstants",0,f],21823)}]);
@@ -1,4 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96265,89030,48657,88438,t=>{"use strict";let e=(1+Math.sqrt(5))/2;function r(t,e){let r=[];for(let i=0;i<t;++i)r.push(e());return r}function i(t,e){return r(t,e)}t.s(["Epsilon",0,.001,"PHI",0,e,"ToGammaSpace",0,1/2.2,"ToLinearSpace",0,2.2],89030);let s=["push","splice","pop","shift","unshift"];t.s(["BuildArray",0,r,"BuildTuple",0,i,"_ObserveArray",0,function(t,e){let r=s.map(r=>(function(t,e,r){let i=t[e];if("function"!=typeof i)return null;let s=function(){let i=t.length,o=s.previous.apply(t,arguments);return r(e,i),o};return i.next=s,s.previous=i,t[e]=s,()=>{let r=s.previous;if(!r)return;let i=s.next;i?(r.next=i,i.previous=r):(r.next=void 0,t[e]=r),s.next=void 0,s.previous=void 0}})(t,r,e));return()=>{for(let t of r)t?.()}}],48657);var o=t.i(86985),a=t.i(81623),n=t.i(46703);class h{}function _(t){t.updateFlag=h._UpdateFlagSeed++}function l(t,e,r,i=0){let s=t.asArray(),o=e.asArray(),a=s[0],n=s[1],h=s[2],_=s[3],y=s[4],u=s[5],m=s[6],c=s[7],x=s[8],f=s[9],R=s[10],d=s[11],z=s[12],T=s[13],w=s[14],p=s[15],F=o[0],M=o[1],g=o[2],I=o[3],A=o[4],P=o[5],D=o[6],C=o[7],V=o[8],v=o[9],L=o[10],k=o[11],O=o[12],H=o[13],U=o[14],b=o[15];r[i]=a*F+n*A+h*V+_*O,r[i+1]=a*M+n*P+h*v+_*H,r[i+2]=a*g+n*D+h*L+_*U,r[i+3]=a*I+n*C+h*k+_*b,r[i+4]=y*F+u*A+m*V+c*O,r[i+5]=y*M+u*P+m*v+c*H,r[i+6]=y*g+u*D+m*L+c*U,r[i+7]=y*I+u*C+m*k+c*b,r[i+8]=x*F+f*A+R*V+d*O,r[i+9]=x*M+f*P+R*v+d*H,r[i+10]=x*g+f*D+R*L+d*U,r[i+11]=x*I+f*C+R*k+d*b,r[i+12]=z*F+T*A+w*V+p*O,r[i+13]=z*M+T*P+w*v+p*H,r[i+14]=z*g+T*D+w*L+p*U,r[i+15]=z*I+T*C+w*k+p*b}function y(t,e,r=0){let i=t.asArray();e[r]=i[0],e[r+1]=i[1],e[r+2]=i[2],e[r+3]=i[3],e[r+4]=i[4],e[r+5]=i[5],e[r+6]=i[6],e[r+7]=i[7],e[r+8]=i[8],e[r+9]=i[9],e[r+10]=i[10],e[r+11]=i[11],e[r+12]=i[12],e[r+13]=i[13],e[r+14]=i[14],e[r+15]=i[15]}function u(t,e){let r=t.asArray(),i=r[0],s=r[1],o=r[2],a=r[3],n=r[4],h=r[5],_=r[6],l=r[7],y=r[8],u=r[9],m=r[10],c=r[11],x=r[12],f=r[13],R=r[14],d=r[15],z=m*d-R*c,T=u*d-f*c,w=u*R-f*m,p=y*d-x*c,F=y*R-m*x,M=y*f-x*u,g=+(h*z-_*T+l*w),I=-(n*z-_*p+l*F),A=+(n*T-h*p+l*M),P=-(n*w-h*F+_*M),D=i*g+s*I+o*A+a*P;if(0===D)return!1;let C=1/D,V=_*d-R*l,v=h*d-f*l,L=h*R-f*_,k=n*d-x*l,O=n*R-x*_,H=n*f-x*h,U=_*c-m*l,b=h*c-u*l,S=h*m-u*_,q=n*c-y*l,E=n*m-y*_,N=n*u-y*h;return e[0]=g*C,e[1]=-(s*z-o*T+a*w)*C,e[2]=(s*V-o*v+a*L)*C,e[3]=-(s*U-o*b+a*S)*C,e[4]=I*C,e[5]=(i*z-o*p+a*F)*C,e[6]=-(i*V-o*k+a*O)*C,e[7]=(i*U-o*q+a*E)*C,e[8]=A*C,e[9]=-(i*T-s*p+a*M)*C,e[10]=(i*v-s*k+a*H)*C,e[11]=-(i*b-s*q+a*N)*C,e[12]=P*C,e[13]=(i*w-s*F+o*M)*C,e[14]=-(i*L-s*O+o*H)*C,e[15]=(i*S-s*E+o*N)*C,!0}h._UpdateFlagSeed=0,t.s(["CopyMatrixToArray",0,y,"InvertMatrixToArray",0,u,"InvertMatrixToRef",0,function(t,e){let r=u(t,e.asArray());return r&&_(e),r},"MatrixManagement",0,h,"MultiplyMatricesToArray",0,l,"MultiplyMatricesToRef",0,function(t,e,r,i=0){l(t,e,r.asArray(),i),_(r)}],88438);var m=t.i(77052);let c=t=>parseInt(t.toString().replace(/\W/g,""));class x{constructor(t=0,e=0){this.x=t,this.y=e}toString(){return`{X: ${this.x} Y: ${this.y}}`}getClassName(){return"Vector2"}getHashCode(){let t=c(this.x),e=c(this.y),r=t;return 397*r^e}toArray(t,e=0){return t[e]=this.x,t[e+1]=this.y,this}fromArray(t,e=0){return x.FromArrayToRef(t,e,this),this}asArray(){return[this.x,this.y]}copyFrom(t){return this.x=t.x,this.y=t.y,this}copyFromFloats(t,e){return this.x=t,this.y=e,this}set(t,e){return this.copyFromFloats(t,e)}setAll(t){return this.copyFromFloats(t,t)}add(t){return new x(this.x+t.x,this.y+t.y)}addToRef(t,e){return e.x=this.x+t.x,e.y=this.y+t.y,e}addInPlace(t){return this.x+=t.x,this.y+=t.y,this}addInPlaceFromFloats(t,e){return this.x+=t,this.y+=e,this}addVector3(t){return new x(this.x+t.x,this.y+t.y)}subtract(t){return new x(this.x-t.x,this.y-t.y)}subtractToRef(t,e){return e.x=this.x-t.x,e.y=this.y-t.y,e}subtractInPlace(t){return this.x-=t.x,this.y-=t.y,this}multiplyInPlace(t){return this.x*=t.x,this.y*=t.y,this}multiply(t){return new x(this.x*t.x,this.y*t.y)}multiplyToRef(t,e){return e.x=this.x*t.x,e.y=this.y*t.y,e}multiplyByFloats(t,e){return new x(this.x*t,this.y*e)}divide(t){return new x(this.x/t.x,this.y/t.y)}divideToRef(t,e){return e.x=this.x/t.x,e.y=this.y/t.y,e}divideInPlace(t){return this.x=this.x/t.x,this.y=this.y/t.y,this}minimizeInPlace(t){return this.minimizeInPlaceFromFloats(t.x,t.y)}maximizeInPlace(t){return this.maximizeInPlaceFromFloats(t.x,t.y)}minimizeInPlaceFromFloats(t,e){return this.x=Math.min(t,this.x),this.y=Math.min(e,this.y),this}maximizeInPlaceFromFloats(t,e){return this.x=Math.max(t,this.x),this.y=Math.max(e,this.y),this}subtractFromFloats(t,e){return new x(this.x-t,this.y-e)}subtractFromFloatsToRef(t,e,r){return r.x=this.x-t,r.y=this.y-e,r}negate(){return new x(-this.x,-this.y)}negateInPlace(){return this.x*=-1,this.y*=-1,this}negateToRef(t){return t.x=-this.x,t.y=-this.y,t}scaleInPlace(t){return this.x*=t,this.y*=t,this}scale(t){return new x(this.x*t,this.y*t)}scaleToRef(t,e){return e.x=this.x*t,e.y=this.y*t,e}scaleAndAddToRef(t,e){return e.x+=this.x*t,e.y+=this.y*t,e}equals(t){return t&&this.x===t.x&&this.y===t.y}equalsWithEpsilon(t,e=.001){return t&&(0,n.WithinEpsilon)(this.x,t.x,e)&&(0,n.WithinEpsilon)(this.y,t.y,e)}equalsToFloats(t,e){return this.x===t&&this.y===e}floor(){return new x(Math.floor(this.x),Math.floor(this.y))}floorToRef(t){return t.x=Math.floor(this.x),t.y=Math.floor(this.y),t}fract(){return new x(this.x-Math.floor(this.x),this.y-Math.floor(this.y))}fractToRef(t){return t.x=this.x-Math.floor(this.x),t.y=this.y-Math.floor(this.y),t}rotate(t){return this.rotateToRef(t,new x)}rotateToRef(t,e){let r=Math.cos(t),i=Math.sin(t);return e.x=r*this.x-i*this.y,e.y=i*this.x+r*this.y,e}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}lengthSquared(){return this.x*this.x+this.y*this.y}normalize(){return this.normalizeFromLength(this.length())}normalizeFromLength(t){return 0===t||1===t?this:this.scaleInPlace(1/t)}normalizeToNew(){let t=new x;return this.normalizeToRef(t),t}normalizeToRef(t){let e=this.length();return 0===e&&(t.x=this.x,t.y=this.y),this.scaleToRef(1/e,t)}clone(){return new x(this.x,this.y)}dot(t){return this.x*t.x+this.y*t.y}static Zero(){return new x(0,0)}static One(){return new x(1,1)}static Random(t=0,e=1){return new x((0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e))}static RandomToRef(t=0,e=1,r){return r.copyFromFloats((0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e))}static get ZeroReadOnly(){return x._ZeroReadOnly}static FromArray(t,e=0){return new x(t[e],t[e+1])}static FromArrayToRef(t,e,r){return r.x=t[e],r.y=t[e+1],r}static FromFloatsToRef(t,e,r){return r.copyFromFloats(t,e),r}static CatmullRom(t,e,r,i,s){let o=s*s,a=s*o;return new x(.5*(2*e.x+(-t.x+r.x)*s+(2*t.x-5*e.x+4*r.x-i.x)*o+(-t.x+3*e.x-3*r.x+i.x)*a),.5*(2*e.y+(-t.y+r.y)*s+(2*t.y-5*e.y+4*r.y-i.y)*o+(-t.y+3*e.y-3*r.y+i.y)*a))}static ClampToRef(t,e,r,i){return i.x=(0,n.Clamp)(t.x,e.x,r.x),i.y=(0,n.Clamp)(t.y,e.y,r.y),i}static Clamp(t,e,r){return new x((0,n.Clamp)(t.x,e.x,r.x),(0,n.Clamp)(t.y,e.y,r.y))}static Hermite(t,e,r,i,s){let o=s*s,a=s*o,n=2*a-3*o+1,h=-2*a+3*o,_=a-2*o+s,l=a-o;return new x(t.x*n+r.x*h+e.x*_+i.x*l,t.y*n+r.y*h+e.y*_+i.y*l)}static Hermite1stDerivative(t,e,r,i,s){return this.Hermite1stDerivativeToRef(t,e,r,i,s,new x)}static Hermite1stDerivativeToRef(t,e,r,i,s,o){let a=s*s;return o.x=(a-s)*6*t.x+(3*a-4*s+1)*e.x+(-a+s)*6*r.x+(3*a-2*s)*i.x,o.y=(a-s)*6*t.y+(3*a-4*s+1)*e.y+(-a+s)*6*r.y+(3*a-2*s)*i.y,o}static Lerp(t,e,r){return x.LerpToRef(t,e,r,new x)}static LerpToRef(t,e,r,i){return i.x=t.x+(e.x-t.x)*r,i.y=t.y+(e.y-t.y)*r,i}static Dot(t,e){return t.x*e.x+t.y*e.y}static Normalize(t){return x.NormalizeToRef(t,new x)}static NormalizeToRef(t,e){return t.normalizeToRef(e),e}static Minimize(t,e){return new x(t.x<e.x?t.x:e.x,t.y<e.y?t.y:e.y)}static Maximize(t,e){return new x(t.x>e.x?t.x:e.x,t.y>e.y?t.y:e.y)}static Transform(t,e){return x.TransformToRef(t,e,new x)}static TransformToRef(t,e,r){let i=e.m,s=t.x*i[0]+t.y*i[4]+i[12],o=t.x*i[1]+t.y*i[5]+i[13];return r.x=s,r.y=o,r}static PointInTriangle(t,e,r,i){let s=.5*(-r.y*i.x+e.y*(-r.x+i.x)+e.x*(r.y-i.y)+r.x*i.y),o=s<0?-1:1,a=(e.y*i.x-e.x*i.y+(i.y-e.y)*t.x+(e.x-i.x)*t.y)*o,n=(e.x*r.y-e.y*r.x+(e.y-r.y)*t.x+(r.x-e.x)*t.y)*o;return a>0&&n>0&&a+n<2*s*o}static Distance(t,e){return Math.sqrt(x.DistanceSquared(t,e))}static DistanceSquared(t,e){let r=t.x-e.x,i=t.y-e.y;return r*r+i*i}static Center(t,e){return x.CenterToRef(t,e,new x)}static CenterToRef(t,e,r){return r.copyFromFloats((t.x+e.x)/2,(t.y+e.y)/2)}static DistanceOfPointFromSegment(t,e,r){let i=x.DistanceSquared(e,r);if(0===i)return x.Distance(t,e);let s=r.subtract(e),o=Math.max(0,Math.min(1,x.Dot(t.subtract(e),s)/i)),a=e.add(s.multiplyByFloats(o,o));return x.Distance(t,a)}}x._V8PerformanceHack=new x(.5,.5),x._ZeroReadOnly=x.Zero();class f{get x(){return this._x}set x(t){this._x=t,this._isDirty=!0}get y(){return this._y}set y(t){this._y=t,this._isDirty=!0}get z(){return this._z}set z(t){this._z=t,this._isDirty=!0}constructor(t=0,e=0,r=0){this._isDirty=!0,this._x=t,this._y=e,this._z=r}toString(){return`{X: ${this._x} Y: ${this._y} Z: ${this._z}}`}getClassName(){return"Vector3"}getHashCode(){let t=c(this._x),e=c(this._y),r=c(this._z),i=t;return 397*(i=397*i^e)^r}asArray(){return[this._x,this._y,this._z]}toArray(t,e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,this}fromArray(t,e=0){return f.FromArrayToRef(t,e,this),this}toQuaternion(){return d.RotationYawPitchRoll(this._y,this._x,this._z)}addInPlace(t){return this._x+=t._x,this._y+=t._y,this._z+=t._z,this._isDirty=!0,this}addInPlaceFromFloats(t,e,r){return this._x+=t,this._y+=e,this._z+=r,this._isDirty=!0,this}add(t){return new f(this._x+t._x,this._y+t._y,this._z+t._z)}addToRef(t,e){return e._x=this._x+t._x,e._y=this._y+t._y,e._z=this._z+t._z,e._isDirty=!0,e}subtractInPlace(t){return this._x-=t._x,this._y-=t._y,this._z-=t._z,this._isDirty=!0,this}subtract(t){return new f(this._x-t._x,this._y-t._y,this._z-t._z)}subtractToRef(t,e){return this.subtractFromFloatsToRef(t._x,t._y,t._z,e)}subtractFromFloats(t,e,r){return new f(this._x-t,this._y-e,this._z-r)}subtractFromFloatsToRef(t,e,r,i){return i._x=this._x-t,i._y=this._y-e,i._z=this._z-r,i._isDirty=!0,i}negate(){return new f(-this._x,-this._y,-this._z)}negateInPlace(){return this._x*=-1,this._y*=-1,this._z*=-1,this._isDirty=!0,this}negateToRef(t){return t._x=-1*this._x,t._y=-1*this._y,t._z=-1*this._z,t._isDirty=!0,t}scaleInPlace(t){return this._x*=t,this._y*=t,this._z*=t,this._isDirty=!0,this}scale(t){return new f(this._x*t,this._y*t,this._z*t)}scaleToRef(t,e){return e._x=this._x*t,e._y=this._y*t,e._z=this._z*t,e._isDirty=!0,e}getNormalToRef(t){let e=this.length(),r=Math.acos(this._y/e),i=Math.atan2(this._z,this._x);r>Math.PI/2?r-=Math.PI/2:r+=Math.PI/2;let s=e*Math.sin(r)*Math.cos(i),o=e*Math.cos(r),a=e*Math.sin(r)*Math.sin(i);return t.set(s,o,a),t}applyRotationQuaternionToRef(t,e){let r=this._x,i=this._y,s=this._z,o=t._x,a=t._y,n=t._z,h=t._w,_=2*(a*s-n*i),l=2*(n*r-o*s),y=2*(o*i-a*r);return e._x=r+h*_+a*y-n*l,e._y=i+h*l+n*_-o*y,e._z=s+h*y+o*l-a*_,e._isDirty=!0,e}applyRotationQuaternionInPlace(t){return this.applyRotationQuaternionToRef(t,this)}applyRotationQuaternion(t){return this.applyRotationQuaternionToRef(t,new f)}scaleAndAddToRef(t,e){return e._x+=this._x*t,e._y+=this._y*t,e._z+=this._z*t,e._isDirty=!0,e}projectOnPlane(t,e){return this.projectOnPlaneToRef(t,e,new f)}projectOnPlaneToRef(t,e,r){let i=t.normal,s=t.d,o=T.Vector3[0];this.subtractToRef(e,o),o.normalize();let a=f.Dot(o,i);if(1e-10>Math.abs(a))r.setAll(1/0);else{let t=-(f.Dot(e,i)+s)/a,n=o.scaleInPlace(t);e.addToRef(n,r)}return r}equals(t){return t&&this._x===t._x&&this._y===t._y&&this._z===t._z}equalsWithEpsilon(t,e=.001){return t&&(0,n.WithinEpsilon)(this._x,t._x,e)&&(0,n.WithinEpsilon)(this._y,t._y,e)&&(0,n.WithinEpsilon)(this._z,t._z,e)}equalsToFloats(t,e,r){return this._x===t&&this._y===e&&this._z===r}multiplyInPlace(t){return this._x*=t._x,this._y*=t._y,this._z*=t._z,this._isDirty=!0,this}multiply(t){return this.multiplyByFloats(t._x,t._y,t._z)}multiplyToRef(t,e){return e._x=this._x*t._x,e._y=this._y*t._y,e._z=this._z*t._z,e._isDirty=!0,e}multiplyByFloats(t,e,r){return new f(this._x*t,this._y*e,this._z*r)}divide(t){return new f(this._x/t._x,this._y/t._y,this._z/t._z)}divideToRef(t,e){return e._x=this._x/t._x,e._y=this._y/t._y,e._z=this._z/t._z,e._isDirty=!0,e}divideInPlace(t){return this._x=this._x/t._x,this._y=this._y/t._y,this._z=this._z/t._z,this._isDirty=!0,this}minimizeInPlace(t){return this.minimizeInPlaceFromFloats(t._x,t._y,t._z)}maximizeInPlace(t){return this.maximizeInPlaceFromFloats(t._x,t._y,t._z)}minimizeInPlaceFromFloats(t,e,r){return t<this._x&&(this.x=t),e<this._y&&(this.y=e),r<this._z&&(this.z=r),this}maximizeInPlaceFromFloats(t,e,r){return t>this._x&&(this.x=t),e>this._y&&(this.y=e),r>this._z&&(this.z=r),this}isNonUniformWithinEpsilon(t){let e=Math.abs(this._x),r=Math.abs(this._y);if(!(0,n.WithinEpsilon)(e,r,t))return!0;let i=Math.abs(this._z);return!((0,n.WithinEpsilon)(e,i,t)&&(0,n.WithinEpsilon)(r,i,t))}get isNonUniform(){let t=Math.abs(this._x);return t!==Math.abs(this._y)||t!==Math.abs(this._z)}floorToRef(t){return t._x=Math.floor(this._x),t._y=Math.floor(this._y),t._z=Math.floor(this._z),t._isDirty=!0,t}floor(){return new f(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z))}fractToRef(t){return t._x=this._x-Math.floor(this._x),t._y=this._y-Math.floor(this._y),t._z=this._z-Math.floor(this._z),t._isDirty=!0,t}fract(){return new f(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z))}length(){return Math.sqrt(this.lengthSquared())}lengthSquared(){return this._x*this._x+this._y*this._y+this._z*this._z}get hasAZeroComponent(){return this._x*this._y*this._z==0}normalize(){return this.normalizeFromLength(this.length())}reorderInPlace(t){if("xyz"===(t=t.toLowerCase()))return this;let e=T.Vector3[0].copyFrom(this);return this.x=e[t[0]],this.y=e[t[1]],this.z=e[t[2]],this}rotateByQuaternionToRef(t,e){return t.toRotationMatrix(T.Matrix[0]),f.TransformCoordinatesToRef(this,T.Matrix[0],e),e}rotateByQuaternionAroundPointToRef(t,e,r){return this.subtractToRef(e,T.Vector3[0]),T.Vector3[0].rotateByQuaternionToRef(t,T.Vector3[0]),e.addToRef(T.Vector3[0],r),r}cross(t){return f.CrossToRef(this,t,new f)}normalizeFromLength(t){return 0===t||1===t?this:this.scaleInPlace(1/t)}normalizeToNew(){return this.normalizeToRef(new f)}normalizeToRef(t){let e=this.length();return 0===e||1===e?(t._x=this._x,t._y=this._y,t._z=this._z,t._isDirty=!0,t):this.scaleToRef(1/e,t)}clone(){return new f(this._x,this._y,this._z)}copyFrom(t){return this.copyFromFloats(t._x,t._y,t._z)}copyFromFloats(t,e,r){return this._x=t,this._y=e,this._z=r,this._isDirty=!0,this}set(t,e,r){return this.copyFromFloats(t,e,r)}setAll(t){return this._x=this._y=this._z=t,this._isDirty=!0,this}static GetClipFactor(t,e,r,i){let s=f.Dot(t,r);return(s-i)/(s-f.Dot(e,r))}static GetAngleBetweenVectors(t,e,r){let i=t.normalizeToRef(T.Vector3[1]),s=e.normalizeToRef(T.Vector3[2]),o=f.Dot(i,s),a=Math.acos(o=(0,n.Clamp)(o,-1,1)),h=T.Vector3[3];return(f.CrossToRef(i,s,h),f.Dot(h,r)>0)?isNaN(a)?0:a:isNaN(a)?-Math.PI:-Math.acos(o)}static GetAngleBetweenVectorsOnPlane(t,e,r){T.Vector3[0].copyFrom(t);let i=T.Vector3[0];T.Vector3[1].copyFrom(e);let s=T.Vector3[1];T.Vector3[2].copyFrom(r);let o=T.Vector3[2],a=T.Vector3[3],h=T.Vector3[4];i.normalize(),s.normalize(),o.normalize(),f.CrossToRef(o,i,a),f.CrossToRef(a,o,h);let _=Math.atan2(f.Dot(s,a),f.Dot(s,h));return(0,n.NormalizeRadians)(_)}static PitchYawRollToMoveBetweenPointsToRef(t,e,r){let i=w.Vector3[0];return e.subtractToRef(t,i),r._y=Math.atan2(i.x,i.z)||0,r._x=Math.atan2(Math.sqrt(i.x**2+i.z**2),i.y)||0,r._z=0,r._isDirty=!0,r}static PitchYawRollToMoveBetweenPoints(t,e){let r=f.Zero();return f.PitchYawRollToMoveBetweenPointsToRef(t,e,r)}static SlerpToRef(t,e,r,i){let s,o;r=(0,n.Clamp)(r,0,1);let a=T.Vector3[0],h=T.Vector3[1];a.copyFrom(t);let _=a.length();a.normalizeFromLength(_),h.copyFrom(e);let l=h.length();h.normalizeFromLength(l);let y=f.Dot(a,h);if(y<.999){let t=Math.acos(y),e=1/Math.sin(t);s=Math.sin((1-r)*t)*e,o=Math.sin(r*t)*e}else s=1-r,o=r;return a.scaleInPlace(s),h.scaleInPlace(o),i.copyFrom(a).addInPlace(h),i.scaleInPlace((0,n.Lerp)(_,l,r)),i}static SmoothToRef(t,e,r,i,s){return f.SlerpToRef(t,e,0===i?1:r/i,s),s}static FromArray(t,e=0){return new f(t[e],t[e+1],t[e+2])}static FromFloatArray(t,e){return f.FromArray(t,e)}static FromArrayToRef(t,e,r){return r._x=t[e],r._y=t[e+1],r._z=t[e+2],r._isDirty=!0,r}static FromFloatArrayToRef(t,e,r){return f.FromArrayToRef(t,e,r)}static FromFloatsToRef(t,e,r,i){return i.copyFromFloats(t,e,r),i}static Zero(){return new f(0,0,0)}static One(){return new f(1,1,1)}static Up(){return new f(0,1,0)}static get UpReadOnly(){return f._UpReadOnly}static get DownReadOnly(){return f._DownReadOnly}static get RightReadOnly(){return f._RightReadOnly}static get LeftReadOnly(){return f._LeftReadOnly}static get LeftHandedForwardReadOnly(){return f._LeftHandedForwardReadOnly}static get RightHandedForwardReadOnly(){return f._RightHandedForwardReadOnly}static get LeftHandedBackwardReadOnly(){return f._LeftHandedBackwardReadOnly}static get RightHandedBackwardReadOnly(){return f._RightHandedBackwardReadOnly}static get ZeroReadOnly(){return f._ZeroReadOnly}static get OneReadOnly(){return f._OneReadOnly}static Down(){return new f(0,-1,0)}static Forward(t=!1){return new f(0,0,t?-1:1)}static Backward(t=!1){return new f(0,0,t?1:-1)}static Right(){return new f(1,0,0)}static Left(){return new f(-1,0,0)}static Random(t=0,e=1){return new f((0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e))}static RandomToRef(t=0,e=1,r){return r.copyFromFloats((0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e))}static TransformCoordinates(t,e){let r=f.Zero();return f.TransformCoordinatesToRef(t,e,r),r}static TransformCoordinatesToRef(t,e,r){return f.TransformCoordinatesFromFloatsToRef(t._x,t._y,t._z,e,r),r}static TransformCoordinatesFromFloatsToRef(t,e,r,i,s){let o=i.m,a=t*o[0]+e*o[4]+r*o[8]+o[12],n=t*o[1]+e*o[5]+r*o[9]+o[13],h=t*o[2]+e*o[6]+r*o[10]+o[14],_=1/(t*o[3]+e*o[7]+r*o[11]+o[15]);return s._x=a*_,s._y=n*_,s._z=h*_,s._isDirty=!0,s}static TransformNormal(t,e){let r=f.Zero();return f.TransformNormalToRef(t,e,r),r}static TransformNormalToRef(t,e,r){return this.TransformNormalFromFloatsToRef(t._x,t._y,t._z,e,r),r}static TransformNormalFromFloatsToRef(t,e,r,i,s){let o=i.m;return s._x=t*o[0]+e*o[4]+r*o[8],s._y=t*o[1]+e*o[5]+r*o[9],s._z=t*o[2]+e*o[6]+r*o[10],s._isDirty=!0,s}static CatmullRom(t,e,r,i,s){let o=s*s,a=s*o;return new f(.5*(2*e._x+(-t._x+r._x)*s+(2*t._x-5*e._x+4*r._x-i._x)*o+(-t._x+3*e._x-3*r._x+i._x)*a),.5*(2*e._y+(-t._y+r._y)*s+(2*t._y-5*e._y+4*r._y-i._y)*o+(-t._y+3*e._y-3*r._y+i._y)*a),.5*(2*e._z+(-t._z+r._z)*s+(2*t._z-5*e._z+4*r._z-i._z)*o+(-t._z+3*e._z-3*r._z+i._z)*a))}static Clamp(t,e,r){let i=new f;return f.ClampToRef(t,e,r,i),i}static ClampToRef(t,e,r,i){let s=t._x;s=(s=s>r._x?r._x:s)<e._x?e._x:s;let o=t._y;o=(o=o>r._y?r._y:o)<e._y?e._y:o;let a=t._z;return a=(a=a>r._z?r._z:a)<e._z?e._z:a,i.copyFromFloats(s,o,a),i}static CheckExtends(t,e,r){e.minimizeInPlace(t),r.maximizeInPlace(t)}static Hermite(t,e,r,i,s){let o=s*s,a=s*o,n=2*a-3*o+1,h=-2*a+3*o,_=a-2*o+s,l=a-o;return new f(t._x*n+r._x*h+e._x*_+i._x*l,t._y*n+r._y*h+e._y*_+i._y*l,t._z*n+r._z*h+e._z*_+i._z*l)}static Hermite1stDerivative(t,e,r,i,s){let o=new f;return this.Hermite1stDerivativeToRef(t,e,r,i,s,o),o}static Hermite1stDerivativeToRef(t,e,r,i,s,o){let a=s*s;return o._x=(a-s)*6*t._x+(3*a-4*s+1)*e._x+(-a+s)*6*r._x+(3*a-2*s)*i._x,o._y=(a-s)*6*t._y+(3*a-4*s+1)*e._y+(-a+s)*6*r._y+(3*a-2*s)*i._y,o._z=(a-s)*6*t._z+(3*a-4*s+1)*e._z+(-a+s)*6*r._z+(3*a-2*s)*i._z,o._isDirty=!0,o}static Lerp(t,e,r){let i=new f(0,0,0);return f.LerpToRef(t,e,r,i),i}static LerpToRef(t,e,r,i){return i._x=t._x+(e._x-t._x)*r,i._y=t._y+(e._y-t._y)*r,i._z=t._z+(e._z-t._z)*r,i._isDirty=!0,i}static Dot(t,e){return t._x*e._x+t._y*e._y+t._z*e._z}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z}static Cross(t,e){let r=new f;return f.CrossToRef(t,e,r),r}static CrossToRef(t,e,r){let i=t._y*e._z-t._z*e._y,s=t._z*e._x-t._x*e._z,o=t._x*e._y-t._y*e._x;return r.copyFromFloats(i,s,o),r}static Normalize(t){let e=f.Zero();return f.NormalizeToRef(t,e),e}static NormalizeToRef(t,e){return t.normalizeToRef(e),e}static Project(t,e,r,i){let s=new f;return f.ProjectToRef(t,e,r,i,s),s}static ProjectToRef(t,e,r,i,s){let o=i.width,n=i.height,h=i.x,_=i.y,l=T.Matrix[1],y=a.EngineStore.LastCreatedEngine?.isNDCHalfZRange;z.FromValuesToRef(o/2,0,0,0,0,-n/2,0,0,0,0,y?1:.5,0,h+o/2,n/2+_,.5*!y,1,l);let u=T.Matrix[0];return e.multiplyToRef(r,u),u.multiplyToRef(l,u),f.TransformCoordinatesToRef(t,u,s),s}static Reflect(t,e){return this.ReflectToRef(t,e,new f)}static ReflectToRef(t,e,r){let i=w.Vector3[0];return i.copyFrom(e).scaleInPlace(2*f.Dot(t,e)),r.copyFrom(t).subtractInPlace(i)}static UnprojectFromTransform(t,e,r,i,s){return this.Unproject(t,e,r,i,s,z.IdentityReadOnly)}static Unproject(t,e,r,i,s,o){let a=new f;return f.UnprojectToRef(t,e,r,i,s,o,a),a}static UnprojectToRef(t,e,r,i,s,o,a){return f.UnprojectFloatsToRef(t._x,t._y,t._z,e,r,i,s,o,a),a}static UnprojectFloatsToRef(t,e,r,i,s,o,n,h,_){let l=T.Matrix[0];o.multiplyToRef(n,l),l.multiplyToRef(h,l),l.invert();let y=T.Vector3[0];return y.x=t/i*2-1,y.y=-(e/s*2-1),a.EngineStore.LastCreatedEngine?.isNDCHalfZRange?y.z=r:y.z=2*r-1,f.TransformCoordinatesToRef(y,l,_),_}static Minimize(t,e){let r=new f;return r.copyFrom(t),r.minimizeInPlace(e),r}static Maximize(t,e){let r=new f;return r.copyFrom(t),r.maximizeInPlace(e),r}static Distance(t,e){return Math.sqrt(f.DistanceSquared(t,e))}static DistanceSquared(t,e){let r=t._x-e._x,i=t._y-e._y,s=t._z-e._z;return r*r+i*i+s*s}static ProjectOnTriangleToRef(t,e,r,i,s){let o,a,h=T.Vector3[0],_=T.Vector3[1],l=T.Vector3[2],y=T.Vector3[3],u=T.Vector3[4];r.subtractToRef(e,h),i.subtractToRef(e,_),i.subtractToRef(r,l);let m=h.length(),c=_.length(),x=l.length();if(m<.001||c<.001||x<.001)return s.copyFrom(e),f.Distance(t,e);t.subtractToRef(e,u),f.CrossToRef(h,_,y);let R=y.length();if(R<.001)return s.copyFrom(e),f.Distance(t,e);y.normalizeFromLength(R);let d=u.length();if(d<.001)return s.copyFrom(e),0;u.normalizeFromLength(d);let z=f.Dot(y,u),w=T.Vector3[5],p=T.Vector3[6];w.copyFrom(y).scaleInPlace(-d*z),p.copyFrom(t).addInPlace(w);let F=T.Vector3[4],M=T.Vector3[5],g=T.Vector3[7],I=T.Vector3[8];F.copyFrom(h).scaleInPlace(1/m),I.copyFrom(_).scaleInPlace(1/c),F.addInPlace(I).scaleInPlace(-1),M.copyFrom(h).scaleInPlace(-1/m),I.copyFrom(l).scaleInPlace(1/x),M.addInPlace(I).scaleInPlace(-1),g.copyFrom(l).scaleInPlace(-1/x),I.copyFrom(_).scaleInPlace(-1/c),g.addInPlace(I).scaleInPlace(-1);let A=T.Vector3[9];A.copyFrom(p).subtractInPlace(e),f.CrossToRef(F,A,I);let P=f.Dot(I,y);A.copyFrom(p).subtractInPlace(r),f.CrossToRef(M,A,I);let D=f.Dot(I,y);A.copyFrom(p).subtractInPlace(i),f.CrossToRef(g,A,I);let C=f.Dot(I,y),V=T.Vector3[10];P>0&&D<0?(V.copyFrom(h),o=e,a=r):D>0&&C<0?(V.copyFrom(l),o=r,a=i):(V.copyFrom(_).scaleInPlace(-1),o=i,a=e);let v=T.Vector3[9],L=T.Vector3[4];if(o.subtractToRef(p,I),a.subtractToRef(p,v),f.CrossToRef(I,v,L),!(0>f.Dot(L,y)))return s.copyFrom(p),Math.abs(d*z);let k=T.Vector3[5];f.CrossToRef(V,L,k),k.normalize();let O=T.Vector3[9];O.copyFrom(o).subtractInPlace(p);let H=O.length();if(H<.001)return s.copyFrom(o),f.Distance(t,o);O.normalizeFromLength(H);let U=f.Dot(k,O),b=T.Vector3[7];b.copyFrom(p).addInPlace(k.scaleInPlace(H*U)),I.copyFrom(b).subtractInPlace(o),d=V.length(),V.normalizeFromLength(d);let S=f.Dot(I,V)/Math.max(d,.001);return S=(0,n.Clamp)(S,0,1),b.copyFrom(o).addInPlace(V.scaleInPlace(S*d)),s.copyFrom(b),f.Distance(t,b)}static Center(t,e){return f.CenterToRef(t,e,f.Zero())}static CenterToRef(t,e,r){return r.copyFromFloats((t._x+e._x)/2,(t._y+e._y)/2,(t._z+e._z)/2)}static RotationFromAxis(t,e,r){let i=new f;return f.RotationFromAxisToRef(t,e,r,i),i}static RotationFromAxisToRef(t,e,r,i){let s=T.Quaternion[0];return d.RotationQuaternionFromAxisToRef(t,e,r,s),s.toEulerAnglesToRef(i),i}}f._V8PerformanceHack=new f(.5,.5,.5),f._UpReadOnly=f.Up(),f._DownReadOnly=f.Down(),f._LeftHandedForwardReadOnly=f.Forward(!1),f._RightHandedForwardReadOnly=f.Forward(!0),f._LeftHandedBackwardReadOnly=f.Backward(!1),f._RightHandedBackwardReadOnly=f.Backward(!0),f._RightReadOnly=f.Right(),f._LeftReadOnly=f.Left(),f._ZeroReadOnly=f.Zero(),f._OneReadOnly=f.One();class R{get x(){return this._x}set x(t){this._x=t,this._isDirty=!0}get y(){return this._y}set y(t){this._y=t,this._isDirty=!0}get z(){return this._z}set z(t){this._z=t,this._isDirty=!0}get w(){return this._w}set w(t){this._w=t,this._isDirty=!0}constructor(t=0,e=0,r=0,i=0){this._isDirty=!0,this._x=t,this._y=e,this._z=r,this._w=i}toString(){return`{X: ${this._x} Y: ${this._y} Z: ${this._z} W: ${this._w}}`}getClassName(){return"Vector4"}getHashCode(){let t=c(this._x),e=c(this._y),r=c(this._z),i=c(this._w),s=t;return 397*(s=397*(s=397*s^e)^r)^i}asArray(){return[this._x,this._y,this._z,this._w]}toArray(t,e){return void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,this}fromArray(t,e=0){return R.FromArrayToRef(t,e,this),this}addInPlace(t){return this.x+=t._x,this.y+=t._y,this.z+=t._z,this.w+=t._w,this}addInPlaceFromFloats(t,e,r,i){return this.x+=t,this.y+=e,this.z+=r,this.w+=i,this}add(t){return new R(this._x+t.x,this._y+t.y,this._z+t.z,this._w+t.w)}addToRef(t,e){return e.x=this._x+t.x,e.y=this._y+t.y,e.z=this._z+t.z,e.w=this._w+t.w,e}subtractInPlace(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subtract(t){return new R(this._x-t.x,this._y-t.y,this._z-t.z,this._w-t.w)}subtractToRef(t,e){return e.x=this._x-t.x,e.y=this._y-t.y,e.z=this._z-t.z,e.w=this._w-t.w,e}subtractFromFloats(t,e,r,i){return new R(this._x-t,this._y-e,this._z-r,this._w-i)}subtractFromFloatsToRef(t,e,r,i,s){return s.x=this._x-t,s.y=this._y-e,s.z=this._z-r,s.w=this._w-i,s}negate(){return new R(-this._x,-this._y,-this._z,-this._w)}negateInPlace(){return this.x*=-1,this.y*=-1,this.z*=-1,this.w*=-1,this}negateToRef(t){return t.x=-this._x,t.y=-this._y,t.z=-this._z,t.w=-this._w,t}scaleInPlace(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}scale(t){return new R(this._x*t,this._y*t,this._z*t,this._w*t)}scaleToRef(t,e){return e.x=this._x*t,e.y=this._y*t,e.z=this._z*t,e.w=this._w*t,e}scaleAndAddToRef(t,e){return e.x+=this._x*t,e.y+=this._y*t,e.z+=this._z*t,e.w+=this._w*t,e}equals(t){return t&&this._x===t.x&&this._y===t.y&&this._z===t.z&&this._w===t.w}equalsWithEpsilon(t,e=.001){return t&&(0,n.WithinEpsilon)(this._x,t.x,e)&&(0,n.WithinEpsilon)(this._y,t.y,e)&&(0,n.WithinEpsilon)(this._z,t.z,e)&&(0,n.WithinEpsilon)(this._w,t.w,e)}equalsToFloats(t,e,r,i){return this._x===t&&this._y===e&&this._z===r&&this._w===i}multiplyInPlace(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiply(t){return new R(this._x*t.x,this._y*t.y,this._z*t.z,this._w*t.w)}multiplyToRef(t,e){return e.x=this._x*t.x,e.y=this._y*t.y,e.z=this._z*t.z,e.w=this._w*t.w,e}multiplyByFloats(t,e,r,i){return new R(this._x*t,this._y*e,this._z*r,this._w*i)}divide(t){return new R(this._x/t.x,this._y/t.y,this._z/t.z,this._w/t.w)}divideToRef(t,e){return e.x=this._x/t.x,e.y=this._y/t.y,e.z=this._z/t.z,e.w=this._w/t.w,e}divideInPlace(t){return this.divideToRef(t,this)}minimizeInPlace(t){return t.x<this._x&&(this.x=t.x),t.y<this._y&&(this.y=t.y),t.z<this._z&&(this.z=t.z),t.w<this._w&&(this.w=t.w),this}maximizeInPlace(t){return t.x>this._x&&(this.x=t.x),t.y>this._y&&(this.y=t.y),t.z>this._z&&(this.z=t.z),t.w>this._w&&(this.w=t.w),this}minimizeInPlaceFromFloats(t,e,r,i){return this.x=Math.min(t,this._x),this.y=Math.min(e,this._y),this.z=Math.min(r,this._z),this.w=Math.min(i,this._w),this}maximizeInPlaceFromFloats(t,e,r,i){return this.x=Math.max(t,this._x),this.y=Math.max(e,this._y),this.z=Math.max(r,this._z),this.w=Math.max(i,this._w),this}floorToRef(t){return t.x=Math.floor(this._x),t.y=Math.floor(this._y),t.z=Math.floor(this._z),t.w=Math.floor(this._w),t}floor(){return new R(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z),Math.floor(this._w))}fractToRef(t){return t.x=this._x-Math.floor(this._x),t.y=this._y-Math.floor(this._y),t.z=this._z-Math.floor(this._z),t.w=this._w-Math.floor(this._w),t}fract(){return new R(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z),this._w-Math.floor(this._w))}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}lengthSquared(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}normalize(){return this.normalizeFromLength(this.length())}normalizeFromLength(t){return 0===t||1===t?this:this.scaleInPlace(1/t)}normalizeToNew(){return this.normalizeToRef(new R)}normalizeToRef(t){let e=this.length();return 0===e||1===e?(t.x=this._x,t.y=this._y,t.z=this._z,t.w=this._w,t):this.scaleToRef(1/e,t)}toVector3(){return new f(this._x,this._y,this._z)}clone(){return new R(this._x,this._y,this._z,this._w)}copyFrom(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this}copyFromFloats(t,e,r,i){return this.x=t,this.y=e,this.z=r,this.w=i,this}set(t,e,r,i){return this.copyFromFloats(t,e,r,i)}setAll(t){return this.x=this.y=this.z=this.w=t,this}dot(t){return this._x*t.x+this._y*t.y+this._z*t.z+this._w*t.w}static FromArray(t,e){return e||(e=0),new R(t[e],t[e+1],t[e+2],t[e+3])}static FromArrayToRef(t,e,r){return r.x=t[e],r.y=t[e+1],r.z=t[e+2],r.w=t[e+3],r}static FromFloatArrayToRef(t,e,r){return R.FromArrayToRef(t,e,r),r}static FromFloatsToRef(t,e,r,i,s){return s.x=t,s.y=e,s.z=r,s.w=i,s}static Zero(){return new R(0,0,0,0)}static One(){return new R(1,1,1,1)}static Random(t=0,e=1){return new R((0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e))}static RandomToRef(t=0,e=1,r){return r.x=(0,n.RandomRange)(t,e),r.y=(0,n.RandomRange)(t,e),r.z=(0,n.RandomRange)(t,e),r.w=(0,n.RandomRange)(t,e),r}static Clamp(t,e,r){return R.ClampToRef(t,e,r,new R)}static ClampToRef(t,e,r,i){return i.x=(0,n.Clamp)(t.x,e.x,r.x),i.y=(0,n.Clamp)(t.y,e.y,r.y),i.z=(0,n.Clamp)(t.z,e.z,r.z),i.w=(0,n.Clamp)(t.w,e.w,r.w),i}static CheckExtends(t,e,r){e.minimizeInPlace(t),r.maximizeInPlace(t)}static get ZeroReadOnly(){return R._ZeroReadOnly}static Normalize(t){return R.NormalizeToRef(t,new R)}static NormalizeToRef(t,e){return t.normalizeToRef(e),e}static Minimize(t,e){let r=new R;return r.copyFrom(t),r.minimizeInPlace(e),r}static Maximize(t,e){let r=new R;return r.copyFrom(t),r.maximizeInPlace(e),r}static Distance(t,e){return Math.sqrt(R.DistanceSquared(t,e))}static DistanceSquared(t,e){let r=t.x-e.x,i=t.y-e.y,s=t.z-e.z,o=t.w-e.w;return r*r+i*i+s*s+o*o}static Center(t,e){return R.CenterToRef(t,e,new R)}static CenterToRef(t,e,r){return r.x=(t.x+e.x)/2,r.y=(t.y+e.y)/2,r.z=(t.z+e.z)/2,r.w=(t.w+e.w)/2,r}static TransformCoordinates(t,e){return R.TransformCoordinatesToRef(t,e,new R)}static TransformCoordinatesToRef(t,e,r){return R.TransformCoordinatesFromFloatsToRef(t._x,t._y,t._z,e,r),r}static TransformCoordinatesFromFloatsToRef(t,e,r,i,s){let o=i.m,a=t*o[0]+e*o[4]+r*o[8]+o[12],n=t*o[1]+e*o[5]+r*o[9]+o[13],h=t*o[2]+e*o[6]+r*o[10]+o[14],_=t*o[3]+e*o[7]+r*o[11]+o[15];return s.x=a,s.y=n,s.z=h,s.w=_,s}static TransformNormal(t,e){return R.TransformNormalToRef(t,e,new R)}static TransformNormalToRef(t,e,r){let i=e.m,s=t.x*i[0]+t.y*i[4]+t.z*i[8],o=t.x*i[1]+t.y*i[5]+t.z*i[9],a=t.x*i[2]+t.y*i[6]+t.z*i[10];return r.x=s,r.y=o,r.z=a,r.w=t.w,r}static TransformNormalFromFloatsToRef(t,e,r,i,s,o){let a=s.m;return o.x=t*a[0]+e*a[4]+r*a[8],o.y=t*a[1]+e*a[5]+r*a[9],o.z=t*a[2]+e*a[6]+r*a[10],o.w=i,o}static FromVector3(t,e=0){return new R(t._x,t._y,t._z,e)}static Dot(t,e){return t.x*e.x+t.y*e.y+t.z*e.z+t.w*e.w}}R._V8PerformanceHack=new R(.5,.5,.5,.5),R._ZeroReadOnly=R.Zero();class d{get x(){return this._x}set x(t){this._x=t,this._isDirty=!0}get y(){return this._y}set y(t){this._y=t,this._isDirty=!0}get z(){return this._z}set z(t){this._z=t,this._isDirty=!0}get w(){return this._w}set w(t){this._w=t,this._isDirty=!0}constructor(t=0,e=0,r=0,i=1){this._isDirty=!0,this._x=t,this._y=e,this._z=r,this._w=i}toString(){return`{X: ${this._x} Y: ${this._y} Z: ${this._z} W: ${this._w}}`}getClassName(){return"Quaternion"}getHashCode(){let t=c(this._x),e=c(this._y),r=c(this._z),i=c(this._w),s=t;return 397*(s=397*(s=397*s^e)^r)^i}asArray(){return[this._x,this._y,this._z,this._w]}toArray(t,e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,this}fromArray(t,e=0){return d.FromArrayToRef(t,e,this)}equals(t){return t&&this._x===t._x&&this._y===t._y&&this._z===t._z&&this._w===t._w}equalsWithEpsilon(t,e=.001){return t&&(0,n.WithinEpsilon)(this._x,t._x,e)&&(0,n.WithinEpsilon)(this._y,t._y,e)&&(0,n.WithinEpsilon)(this._z,t._z,e)&&(0,n.WithinEpsilon)(this._w,t._w,e)}isApprox(t,e=.001){return t&&((0,n.WithinEpsilon)(this._x,t._x,e)&&(0,n.WithinEpsilon)(this._y,t._y,e)&&(0,n.WithinEpsilon)(this._z,t._z,e)&&(0,n.WithinEpsilon)(this._w,t._w,e)||(0,n.WithinEpsilon)(this._x,-t._x,e)&&(0,n.WithinEpsilon)(this._y,-t._y,e)&&(0,n.WithinEpsilon)(this._z,-t._z,e)&&(0,n.WithinEpsilon)(this._w,-t._w,e))}clone(){return new d(this._x,this._y,this._z,this._w)}copyFrom(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._w=t._w,this._isDirty=!0,this}copyFromFloats(t,e,r,i){return this._x=t,this._y=e,this._z=r,this._w=i,this._isDirty=!0,this}set(t,e,r,i){return this.copyFromFloats(t,e,r,i)}setAll(t){return this.copyFromFloats(t,t,t,t)}add(t){return new d(this._x+t._x,this._y+t._y,this._z+t._z,this._w+t._w)}addInPlace(t){return this._x+=t._x,this._y+=t._y,this._z+=t._z,this._w+=t._w,this._isDirty=!0,this}addToRef(t,e){return e._x=this._x+t._x,e._y=this._y+t._y,e._z=this._z+t._z,e._w=this._w+t._w,e._isDirty=!0,e}addInPlaceFromFloats(t,e,r,i){return this._x+=t,this._y+=e,this._z+=r,this._w+=i,this._isDirty=!0,this}subtractToRef(t,e){return e._x=this._x-t._x,e._y=this._y-t._y,e._z=this._z-t._z,e._w=this._w-t._w,e._isDirty=!0,e}subtractFromFloats(t,e,r,i){return this.subtractFromFloatsToRef(t,e,r,i,new d)}subtractFromFloatsToRef(t,e,r,i,s){return s._x=this._x-t,s._y=this._y-e,s._z=this._z-r,s._w=this._w-i,s._isDirty=!0,s}subtract(t){return new d(this._x-t._x,this._y-t._y,this._z-t._z,this._w-t._w)}subtractInPlace(t){return this._x-=t._x,this._y-=t._y,this._z-=t._z,this._w-=t._w,this._isDirty=!0,this}scale(t){return new d(this._x*t,this._y*t,this._z*t,this._w*t)}scaleToRef(t,e){return e._x=this._x*t,e._y=this._y*t,e._z=this._z*t,e._w=this._w*t,e._isDirty=!0,e}scaleInPlace(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this._isDirty=!0,this}scaleAndAddToRef(t,e){return e._x+=this._x*t,e._y+=this._y*t,e._z+=this._z*t,e._w+=this._w*t,e._isDirty=!0,e}multiply(t){let e=new d(0,0,0,1);return this.multiplyToRef(t,e),e}multiplyToRef(t,e){let r=this._x*t._w+this._y*t._z-this._z*t._y+this._w*t._x,i=-this._x*t._z+this._y*t._w+this._z*t._x+this._w*t._y,s=this._x*t._y-this._y*t._x+this._z*t._w+this._w*t._z,o=-this._x*t._x-this._y*t._y-this._z*t._z+this._w*t._w;return e.copyFromFloats(r,i,s,o),e}multiplyInPlace(t){return this.multiplyToRef(t,this)}multiplyByFloats(t,e,r,i){return this._x*=t,this._y*=e,this._z*=r,this._w*=i,this._isDirty=!0,this}divide(t){throw ReferenceError("Can not divide a quaternion")}divideToRef(t,e){throw ReferenceError("Can not divide a quaternion")}divideInPlace(t){throw ReferenceError("Can not divide a quaternion")}minimizeInPlace(){throw ReferenceError("Can not minimize a quaternion")}minimizeInPlaceFromFloats(){throw ReferenceError("Can not minimize a quaternion")}maximizeInPlace(){throw ReferenceError("Can not maximize a quaternion")}maximizeInPlaceFromFloats(){throw ReferenceError("Can not maximize a quaternion")}negate(){return this.negateToRef(new d)}negateInPlace(){return this._x=-this._x,this._y=-this._y,this._z=-this._z,this._w=-this._w,this._isDirty=!0,this}negateToRef(t){return t._x=-this._x,t._y=-this._y,t._z=-this._z,t._w=-this._w,t._isDirty=!0,t}equalsToFloats(t,e,r,i){return this._x===t&&this._y===e&&this._z===r&&this._w===i}floorToRef(t){throw ReferenceError("Can not floor a quaternion")}floor(){throw ReferenceError("Can not floor a quaternion")}fractToRef(t){throw ReferenceError("Can not fract a quaternion")}fract(){throw ReferenceError("Can not fract a quaternion")}conjugateToRef(t){return t.copyFromFloats(-this._x,-this._y,-this._z,this._w),t}conjugateInPlace(){return this._x*=-1,this._y*=-1,this._z*=-1,this._isDirty=!0,this}conjugate(){return new d(-this._x,-this._y,-this._z,this._w)}invert(){let t=this.conjugate(),e=this.lengthSquared();return 0==e||1==e||t.scaleInPlace(1/e),t}invertInPlace(){this.conjugateInPlace();let t=this.lengthSquared();return 0==t||1==t||this.scaleInPlace(1/t),this}lengthSquared(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this.lengthSquared())}normalize(){return this.normalizeFromLength(this.length())}normalizeFromLength(t){return 0===t||1===t?this:this.scaleInPlace(1/t)}normalizeToNew(){let t=new d(0,0,0,1);return this.normalizeToRef(t),t}normalizeToRef(t){let e=this.length();return 0===e||1===e?t.copyFromFloats(this._x,this._y,this._z,this._w):this.scaleToRef(1/e,t)}toEulerAngles(){let t=f.Zero();return this.toEulerAnglesToRef(t),t}toEulerAnglesToRef(t){let e=this._z,r=this._x,i=this._y,s=this._w,o=i*e-r*s;if(o<-.4999999)t._y=2*Math.atan2(i,s),t._x=Math.PI/2,t._z=0,t._isDirty=!0;else if(o>.4999999)t._y=2*Math.atan2(i,s),t._x=-Math.PI/2,t._z=0,t._isDirty=!0;else{let a=s*s,n=e*e,h=r*r,_=i*i;t._z=Math.atan2(2*(r*i+e*s),-n-h+_+a),t._x=Math.asin(-2*o),t._y=Math.atan2(2*(e*r+i*s),n-h-_+a),t._isDirty=!0}return t}toAlphaBetaGammaToRef(t){let e=this._z,r=this._x,i=this._y,s=this._w,o=2*Math.atan2(Math.sqrt(r*r+i*i),Math.sqrt(e*e+s*s)),a=2*Math.atan2(e,s),n=2*Math.atan2(i,r);return t.set((a-n)/2,o,(a+n)/2),t}toRotationMatrix(t){return z.FromQuaternionToRef(this,t),t}fromRotationMatrix(t){return d.FromRotationMatrixToRef(t,this),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}toAxisAngle(){let t=f.Zero(),e=this.toAxisAngleToRef(t);return{axis:t,angle:e}}toAxisAngleToRef(t){let e,r=Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z),i=this._w;return r>0?(e=2*Math.atan2(r,i),t.set(this._x/r,this._y/r,this._z/r)):(e=0,t.set(1,0,0)),e}static FromRotationMatrix(t){let e=new d;return d.FromRotationMatrixToRef(t,e),e}static FromRotationMatrixToRef(t,e){let r,i=t.m,s=i[0],o=i[4],a=i[8],n=i[1],h=i[5],_=i[9],l=i[2],y=i[6],u=i[10],m=s+h+u;return m>0?(e._w=.25/(r=.5/Math.sqrt(m+1)),e._x=(y-_)*r,e._y=(a-l)*r,e._z=(n-o)*r):s>h&&s>u?(e._w=(y-_)/(r=2*Math.sqrt(1+s-h-u)),e._x=.25*r,e._y=(o+n)/r,e._z=(a+l)/r):h>u?(e._w=(a-l)/(r=2*Math.sqrt(1+h-s-u)),e._x=(o+n)/r,e._y=.25*r,e._z=(_+y)/r):(e._w=(n-o)/(r=2*Math.sqrt(1+u-s-h)),e._x=(a+l)/r,e._y=(_+y)/r,e._z=.25*r),e._isDirty=!0,e}static Dot(t,e){return t._x*e._x+t._y*e._y+t._z*e._z+t._w*e._w}static AreClose(t,e,r=.1){let i=d.Dot(t,e);return 1-i*i<=r}static SmoothToRef(t,e,r,i,s){let o=0===i?1:r/i;return o=(0,n.Clamp)(o,0,1),d.SlerpToRef(t,e,o,s),s}static Zero(){return new d(0,0,0,0)}static Inverse(t){return new d(-t._x,-t._y,-t._z,t._w)}static InverseToRef(t,e){return e.set(-t._x,-t._y,-t._z,t._w),e}static Identity(){return new d(0,0,0,1)}static IsIdentity(t){return t&&0===t._x&&0===t._y&&0===t._z&&1===t._w}static RotationAxis(t,e){return d.RotationAxisToRef(t,e,new d)}static RotationAxisToRef(t,e,r){r._w=Math.cos(e/2);let i=Math.sin(e/2)/t.length();return r._x=t._x*i,r._y=t._y*i,r._z=t._z*i,r._isDirty=!0,r}static FromArray(t,e){return e||(e=0),new d(t[e],t[e+1],t[e+2],t[e+3])}static FromArrayToRef(t,e,r){return r._x=t[e],r._y=t[e+1],r._z=t[e+2],r._w=t[e+3],r._isDirty=!0,r}static FromFloatsToRef(t,e,r,i,s){return s.copyFromFloats(t,e,r,i),s}static FromEulerAngles(t,e,r){let i=new d;return d.RotationYawPitchRollToRef(e,t,r,i),i}static FromEulerAnglesToRef(t,e,r,i){return d.RotationYawPitchRollToRef(e,t,r,i),i}static FromEulerVector(t){let e=new d;return d.RotationYawPitchRollToRef(t._y,t._x,t._z,e),e}static FromEulerVectorToRef(t,e){return d.RotationYawPitchRollToRef(t._y,t._x,t._z,e),e}static FromUnitVectorsToRef(t,e,r,i=.001){let s=f.Dot(t,e)+1;return s<i?Math.abs(t.x)>Math.abs(t.z)?r.set(-t.y,t.x,0,0):r.set(0,-t.z,t.y,0):(f.CrossToRef(t,e,w.Vector3[0]),r.set(w.Vector3[0].x,w.Vector3[0].y,w.Vector3[0].z,s)),r.normalize()}static RotationYawPitchRoll(t,e,r){let i=new d;return d.RotationYawPitchRollToRef(t,e,r,i),i}static RotationYawPitchRollToRef(t,e,r,i){let s=.5*r,o=.5*e,a=.5*t,n=Math.sin(s),h=Math.cos(s),_=Math.sin(o),l=Math.cos(o),y=Math.sin(a),u=Math.cos(a);return i._x=u*_*h+y*l*n,i._y=y*l*h-u*_*n,i._z=u*l*n-y*_*h,i._w=u*l*h+y*_*n,i._isDirty=!0,i}static RotationAlphaBetaGamma(t,e,r){let i=new d;return d.RotationAlphaBetaGammaToRef(t,e,r,i),i}static RotationAlphaBetaGammaToRef(t,e,r,i){let s=(r+t)*.5,o=(r-t)*.5,a=.5*e;return i._x=Math.cos(o)*Math.sin(a),i._y=Math.sin(o)*Math.sin(a),i._z=Math.sin(s)*Math.cos(a),i._w=Math.cos(s)*Math.cos(a),i._isDirty=!0,i}static RotationQuaternionFromAxis(t,e,r){let i=new d(0,0,0,0);return d.RotationQuaternionFromAxisToRef(t,e,r,i),i}static RotationQuaternionFromAxisToRef(t,e,r,i){let s=T.Matrix[0];return t=t.normalizeToRef(T.Vector3[0]),e=e.normalizeToRef(T.Vector3[1]),r=r.normalizeToRef(T.Vector3[2]),z.FromXYZAxesToRef(t,e,r,s),d.FromRotationMatrixToRef(s,i),i}static FromLookDirectionLH(t,e){let r=new d;return d.FromLookDirectionLHToRef(t,e,r),r}static FromLookDirectionLHToRef(t,e,r){let i=T.Matrix[0];return z.LookDirectionLHToRef(t,e,i),d.FromRotationMatrixToRef(i,r),r}static FromLookDirectionRH(t,e){let r=new d;return d.FromLookDirectionRHToRef(t,e,r),r}static FromLookDirectionRHToRef(t,e,r){let i=T.Matrix[0];return z.LookDirectionRHToRef(t,e,i),d.FromRotationMatrixToRef(i,r)}static Slerp(t,e,r){let i=d.Identity();return d.SlerpToRef(t,e,r,i),i}static SlerpToRef(t,e,r,i){let s,o,a=t._x*e._x+t._y*e._y+t._z*e._z+t._w*e._w,n=!1;if(a<0&&(n=!0,a=-a),a>.999999)o=1-r,s=n?-r:r;else{let t=Math.acos(a),e=1/Math.sin(t);o=Math.sin((1-r)*t)*e,s=n?-Math.sin(r*t)*e:Math.sin(r*t)*e}return i._x=o*t._x+s*e._x,i._y=o*t._y+s*e._y,i._z=o*t._z+s*e._z,i._w=o*t._w+s*e._w,i._isDirty=!0,i}static Hermite(t,e,r,i,s){let o=s*s,a=s*o,n=2*a-3*o+1,h=-2*a+3*o,_=a-2*o+s,l=a-o;return new d(t._x*n+r._x*h+e._x*_+i._x*l,t._y*n+r._y*h+e._y*_+i._y*l,t._z*n+r._z*h+e._z*_+i._z*l,t._w*n+r._w*h+e._w*_+i._w*l)}static Hermite1stDerivative(t,e,r,i,s){let o=new d;return this.Hermite1stDerivativeToRef(t,e,r,i,s,o),o}static Hermite1stDerivativeToRef(t,e,r,i,s,o){let a=s*s;return o._x=(a-s)*6*t._x+(3*a-4*s+1)*e._x+(-a+s)*6*r._x+(3*a-2*s)*i._x,o._y=(a-s)*6*t._y+(3*a-4*s+1)*e._y+(-a+s)*6*r._y+(3*a-2*s)*i._y,o._z=(a-s)*6*t._z+(3*a-4*s+1)*e._z+(-a+s)*6*r._z+(3*a-2*s)*i._z,o._w=(a-s)*6*t._w+(3*a-4*s+1)*e._w+(-a+s)*6*r._w+(3*a-2*s)*i._w,o._isDirty=!0,o}static Normalize(t){let e=d.Zero();return d.NormalizeToRef(t,e),e}static NormalizeToRef(t,e){return t.normalizeToRef(e),e}static Clamp(t,e,r){let i=new d;return d.ClampToRef(t,e,r,i),i}static ClampToRef(t,e,r,i){return i.copyFromFloats((0,n.Clamp)(t.x,e.x,r.x),(0,n.Clamp)(t.y,e.y,r.y),(0,n.Clamp)(t.z,e.z,r.z),(0,n.Clamp)(t.w,e.w,r.w))}static Random(t=0,e=1){return new d((0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e))}static RandomToRef(t=0,e=1,r){return r.copyFromFloats((0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e),(0,n.RandomRange)(t,e))}static Minimize(){throw ReferenceError("Quaternion.Minimize does not make sense")}static Maximize(){throw ReferenceError("Quaternion.Maximize does not make sense")}static Distance(t,e){return Math.sqrt(d.DistanceSquared(t,e))}static DistanceSquared(t,e){let r=t.x-e.x,i=t.y-e.y,s=t.z-e.z,o=t.w-e.w;return r*r+i*i+s*s+o*o}static Center(t,e){return d.CenterToRef(t,e,d.Zero())}static CenterToRef(t,e,r){return r.copyFromFloats((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2,(t.w+e.w)/2)}}d._V8PerformanceHack=new d(.5,.5,.5,.5);class z{static get Use64Bits(){return o.PerformanceConfigurator.MatrixUse64Bits}get m(){return this._m}markAsUpdated(){this.updateFlag=h._UpdateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0}_updateIdentityStatus(t,e=!1,r=!1,i=!0){this._isIdentity=t,this._isIdentity3x2=t||r,this._isIdentityDirty=!this._isIdentity&&e,this._isIdentity3x2Dirty=!this._isIdentity3x2&&i}constructor(){this._isIdentity=!1,this._isIdentityDirty=!0,this._isIdentity3x2=!0,this._isIdentity3x2Dirty=!0,this.updateFlag=-1,o.PerformanceConfigurator.MatrixTrackPrecisionChange&&o.PerformanceConfigurator.MatrixTrackedMatrices.push(this),this._m=new o.PerformanceConfigurator.MatrixCurrentType(16),this.markAsUpdated()}isIdentity(){if(this._isIdentityDirty){this._isIdentityDirty=!1;let t=this._m;this._isIdentity=1===t[0]&&0===t[1]&&0===t[2]&&0===t[3]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[7]&&0===t[8]&&0===t[9]&&1===t[10]&&0===t[11]&&0===t[12]&&0===t[13]&&0===t[14]&&1===t[15]}return this._isIdentity}isIdentityAs3x2(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,1!==this._m[0]||1!==this._m[5]||1!==this._m[15]||0!==this._m[1]||0!==this._m[2]||0!==this._m[3]||0!==this._m[4]||0!==this._m[6]||0!==this._m[7]||0!==this._m[8]||0!==this._m[9]||0!==this._m[10]||0!==this._m[11]||0!==this._m[12]||0!==this._m[13]||0!==this._m[14]?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2}determinant(){if(!0===this._isIdentity)return 1;let t=this._m,e=t[0],r=t[1],i=t[2],s=t[3],o=t[4],a=t[5],n=t[6],h=t[7],_=t[8],l=t[9],y=t[10],u=t[11],m=t[12],c=t[13],x=t[14],f=t[15],R=y*f-x*u,d=l*f-c*u,z=l*x-c*y,T=_*f-m*u,w=_*x-y*m,p=_*c-m*l;return e*(a*R-n*d+h*z)+-(r*(o*R-n*T+h*w))+i*(o*d-a*T+h*p)+-(s*(o*z-a*w+n*p))}toString(){return`{${this.m[0]}, ${this.m[1]}, ${this.m[2]}, ${this.m[3]}
2
- ${this.m[4]}, ${this.m[5]}, ${this.m[6]}, ${this.m[7]}
3
- ${this.m[8]}, ${this.m[9]}, ${this.m[10]}, ${this.m[11]}
4
- ${this.m[12]}, ${this.m[13]}, ${this.m[14]}, ${this.m[15]}}`}toArray(t=null,e=0){if(!t)return this._m;let r=this._m;for(let i=0;i<16;i++)t[e+i]=r[i];return this}asArray(){return this._m}fromArray(t,e=0){return z.FromArrayToRef(t,e,this)}copyFromFloats(...t){return z.FromArrayToRef(t,0,this)}set(...t){let e=this._m;for(let r=0;r<16;r++)e[r]=t[r];return this.markAsUpdated(),this}setAll(t){let e=this._m;for(let r=0;r<16;r++)e[r]=t;return this.markAsUpdated(),this}invert(){return this.invertToRef(this),this}reset(){return z.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this}add(t){let e=new z;return this.addToRef(t,e),e}addToRef(t,e){let r=this._m,i=e._m,s=t.m;for(let t=0;t<16;t++)i[t]=r[t]+s[t];return e.markAsUpdated(),e}addToSelf(t){let e=this._m,r=t.m;return e[0]+=r[0],e[1]+=r[1],e[2]+=r[2],e[3]+=r[3],e[4]+=r[4],e[5]+=r[5],e[6]+=r[6],e[7]+=r[7],e[8]+=r[8],e[9]+=r[9],e[10]+=r[10],e[11]+=r[11],e[12]+=r[12],e[13]+=r[13],e[14]+=r[14],e[15]+=r[15],this.markAsUpdated(),this}addInPlace(t){let e=this._m,r=t.m;for(let t=0;t<16;t++)e[t]+=r[t];return this.markAsUpdated(),this}addInPlaceFromFloats(...t){let e=this._m;for(let r=0;r<16;r++)e[r]+=t[r];return this.markAsUpdated(),this}subtract(t){let e=this._m,r=t.m;for(let t=0;t<16;t++)e[t]-=r[t];return this.markAsUpdated(),this}subtractToRef(t,e){let r=this._m,i=t.m,s=e._m;for(let t=0;t<16;t++)s[t]=r[t]-i[t];return e.markAsUpdated(),e}subtractInPlace(t){let e=this._m,r=t.m;for(let t=0;t<16;t++)e[t]-=r[t];return this.markAsUpdated(),this}subtractFromFloats(...t){return this.subtractFromFloatsToRef(...t,new z)}subtractFromFloatsToRef(...t){let e=t.pop(),r=this._m,i=e._m;for(let e=0;e<16;e++)i[e]=r[e]-t[e];return e.markAsUpdated(),e}invertToRef(t){return!0===this._isIdentity?z.IdentityToRef(t):u(this,t.asArray())?t.markAsUpdated():t.copyFrom(this),t}addAtIndex(t,e){return this._m[t]+=e,this.markAsUpdated(),this}multiplyAtIndex(t,e){return this._m[t]*=e,this.markAsUpdated(),this}setTranslationFromFloats(t,e,r){return this._m[12]=t,this._m[13]=e,this._m[14]=r,this.markAsUpdated(),this}addTranslationFromFloats(t,e,r){return this._m[12]+=t,this._m[13]+=e,this._m[14]+=r,this.markAsUpdated(),this}setTranslation(t){return this.setTranslationFromFloats(t._x,t._y,t._z)}getTranslation(){return new f(this._m[12],this._m[13],this._m[14])}getTranslationToRef(t){return t.x=this._m[12],t.y=this._m[13],t.z=this._m[14],t}removeRotationAndScaling(){let t=this.m;return z.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,t[12],t[13],t[14],t[15],this),this._updateIdentityStatus(0===t[12]&&0===t[13]&&0===t[14]&&1===t[15]),this}copyFrom(t){return t.copyToArray(this._m),this.updateFlag=t.updateFlag,this._updateIdentityStatus(t._isIdentity,t._isIdentityDirty,t._isIdentity3x2,t._isIdentity3x2Dirty),this}copyToArray(t,e=0){return y(this,t,e),this}multiply(t){let e=new z;return this.multiplyToRef(t,e),e}multiplyInPlace(t){let e=this._m,r=t.m;for(let t=0;t<16;t++)e[t]*=r[t];return this.markAsUpdated(),this}multiplyByFloats(...t){let e=this._m;for(let r=0;r<16;r++)e[r]*=t[r];return this.markAsUpdated(),this}multiplyByFloatsToRef(...t){let e=t.pop(),r=this._m,i=e._m;for(let e=0;e<16;e++)i[e]=r[e]*t[e];return e.markAsUpdated(),e}multiplyToRef(t,e){return this._isIdentity?e.copyFrom(t):t._isIdentity?e.copyFrom(this):(this.multiplyToArray(t,e._m,0),e.markAsUpdated()),e}multiplyToArray(t,e,r){return l(this,t,e,r),this}divide(t){return this.divideToRef(t,new z)}divideToRef(t,e){let r=this._m,i=t.m,s=e._m;for(let t=0;t<16;t++)s[t]=r[t]/i[t];return e.markAsUpdated(),e}divideInPlace(t){let e=this._m,r=t.m;for(let t=0;t<16;t++)e[t]/=r[t];return this.markAsUpdated(),this}minimizeInPlace(t){let e=this._m,r=t.m;for(let t=0;t<16;t++)e[t]=Math.min(e[t],r[t]);return this.markAsUpdated(),this}minimizeInPlaceFromFloats(...t){let e=this._m;for(let r=0;r<16;r++)e[r]=Math.min(e[r],t[r]);return this.markAsUpdated(),this}maximizeInPlace(t){let e=this._m,r=t.m;for(let t=0;t<16;t++)e[t]=Math.min(e[t],r[t]);return this.markAsUpdated(),this}maximizeInPlaceFromFloats(...t){let e=this._m;for(let r=0;r<16;r++)e[r]=Math.min(e[r],t[r]);return this.markAsUpdated(),this}negate(){return this.negateToRef(new z)}negateInPlace(){let t=this._m;for(let e=0;e<16;e++)t[e]=-t[e];return this.markAsUpdated(),this}negateToRef(t){let e=this._m,r=t._m;for(let t=0;t<16;t++)r[t]=-e[t];return t.markAsUpdated(),t}equals(t){if(!t)return!1;if((this._isIdentity||t._isIdentity)&&!this._isIdentityDirty&&!t._isIdentityDirty)return this._isIdentity&&t._isIdentity;let e=this.m,r=t.m;return e[0]===r[0]&&e[1]===r[1]&&e[2]===r[2]&&e[3]===r[3]&&e[4]===r[4]&&e[5]===r[5]&&e[6]===r[6]&&e[7]===r[7]&&e[8]===r[8]&&e[9]===r[9]&&e[10]===r[10]&&e[11]===r[11]&&e[12]===r[12]&&e[13]===r[13]&&e[14]===r[14]&&e[15]===r[15]}equalsWithEpsilon(t,e=0){let r=this._m,i=t.m;for(let t=0;t<16;t++)if(!(0,n.WithinEpsilon)(r[t],i[t],e))return!1;return!0}equalsToFloats(...t){let e=this._m;for(let r=0;r<16;r++)if(e[r]!=t[r])return!1;return!0}floor(){return this.floorToRef(new z)}floorToRef(t){let e=this._m,r=t._m;for(let t=0;t<16;t++)r[t]=Math.floor(e[t]);return t.markAsUpdated(),t}fract(){return this.fractToRef(new z)}fractToRef(t){let e=this._m,r=t._m;for(let t=0;t<16;t++)r[t]=e[t]-Math.floor(e[t]);return t.markAsUpdated(),t}clone(){let t=new z;return t.copyFrom(this),t}getClassName(){return"Matrix"}getHashCode(){let t=c(this._m[0]);for(let e=1;e<16;e++)t=397*t^c(this._m[e]);return t}decomposeToTransformNode(t){return t.rotationQuaternion=t.rotationQuaternion||new d,this.decompose(t.scaling,t.rotationQuaternion,t.position)}decompose(t,e,r,i,s=!0){if(this._isIdentity)return r&&r.setAll(0),t&&t.setAll(1),e&&e.copyFromFloats(0,0,0,1),!0;let o=this._m;if(r&&r.copyFromFloats(o[12],o[13],o[14]),(t=t||T.Vector3[0]).x=Math.sqrt(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]),t.y=Math.sqrt(o[4]*o[4]+o[5]*o[5]+o[6]*o[6]),t.z=Math.sqrt(o[8]*o[8]+o[9]*o[9]+o[10]*o[10]),i){let e=(s?i.absoluteScaling.x:i.scaling.x)<0?-1:1,r=(s?i.absoluteScaling.y:i.scaling.y)<0?-1:1,o=(s?i.absoluteScaling.z:i.scaling.z)<0?-1:1;t.x*=e,t.y*=r,t.z*=o}else 0>=this.determinant()&&(t.y*=-1);if(0===t._x||0===t._y||0===t._z)return e&&e.copyFromFloats(0,0,0,1),!1;if(e){let r=1/t._x,i=1/t._y,s=1/t._z;z.FromValuesToRef(o[0]*r,o[1]*r,o[2]*r,0,o[4]*i,o[5]*i,o[6]*i,0,o[8]*s,o[9]*s,o[10]*s,0,0,0,0,1,T.Matrix[0]),d.FromRotationMatrixToRef(T.Matrix[0],e)}return!0}getRow(t){if(t<0||t>3)return null;let e=4*t;return new R(this._m[e+0],this._m[e+1],this._m[e+2],this._m[e+3])}getRowToRef(t,e){if(t>=0&&t<=3){let r=4*t;e.x=this._m[r+0],e.y=this._m[r+1],e.z=this._m[r+2],e.w=this._m[r+3]}return e}setRow(t,e){return this.setRowFromFloats(t,e.x,e.y,e.z,e.w)}transpose(){let t=new z;return z.TransposeToRef(this,t),t}transposeToRef(t){return z.TransposeToRef(this,t),t}setRowFromFloats(t,e,r,i,s){if(t<0||t>3)return this;let o=4*t;return this._m[o+0]=e,this._m[o+1]=r,this._m[o+2]=i,this._m[o+3]=s,this.markAsUpdated(),this}scale(t){let e=new z;return this.scaleToRef(t,e),e}scaleToRef(t,e){for(let r=0;r<16;r++)e._m[r]=this._m[r]*t;return e.markAsUpdated(),e}scaleAndAddToRef(t,e){for(let r=0;r<16;r++)e._m[r]+=this._m[r]*t;return e.markAsUpdated(),e}scaleInPlace(t){let e=this._m;for(let r=0;r<16;r++)e[r]*=t;return this.markAsUpdated(),this}toNormalMatrix(t){let e=T.Matrix[0];this.invertToRef(e),e.transposeToRef(t);let r=t._m;return z.FromValuesToRef(r[0],r[1],r[2],0,r[4],r[5],r[6],0,r[8],r[9],r[10],0,0,0,0,1,t),t}getRotationMatrix(){let t=new z;return this.getRotationMatrixToRef(t),t}getRotationMatrixToRef(t){let e=T.Vector3[0];if(!this.decompose(e))return z.IdentityToRef(t),t;let r=this._m,i=1/e._x,s=1/e._y,o=1/e._z;return z.FromValuesToRef(r[0]*i,r[1]*i,r[2]*i,0,r[4]*s,r[5]*s,r[6]*s,0,r[8]*o,r[9]*o,r[10]*o,0,0,0,0,1,t),t}toggleModelMatrixHandInPlace(){let t=this._m;return t[2]*=-1,t[6]*=-1,t[8]*=-1,t[9]*=-1,t[14]*=-1,this.markAsUpdated(),this}toggleProjectionMatrixHandInPlace(){let t=this._m;return t[8]*=-1,t[9]*=-1,t[10]*=-1,t[11]*=-1,this.markAsUpdated(),this}static FromArray(t,e=0){let r=new z;return z.FromArrayToRef(t,e,r),r}static FromArrayToRef(t,e,r){for(let i=0;i<16;i++)r._m[i]=t[i+e];return r.markAsUpdated(),r}static FromFloat32ArrayToRefScaled(t,e,r,i){return i._m[0]=t[0+e]*r,i._m[1]=t[1+e]*r,i._m[2]=t[2+e]*r,i._m[3]=t[3+e]*r,i._m[4]=t[4+e]*r,i._m[5]=t[5+e]*r,i._m[6]=t[6+e]*r,i._m[7]=t[7+e]*r,i._m[8]=t[8+e]*r,i._m[9]=t[9+e]*r,i._m[10]=t[10+e]*r,i._m[11]=t[11+e]*r,i._m[12]=t[12+e]*r,i._m[13]=t[13+e]*r,i._m[14]=t[14+e]*r,i._m[15]=t[15+e]*r,i.markAsUpdated(),i}static get IdentityReadOnly(){return z._IdentityReadOnly}static FromValuesToRef(t,e,r,i,s,o,a,n,h,_,l,y,u,m,c,x,f){let R=f._m;R[0]=t,R[1]=e,R[2]=r,R[3]=i,R[4]=s,R[5]=o,R[6]=a,R[7]=n,R[8]=h,R[9]=_,R[10]=l,R[11]=y,R[12]=u,R[13]=m,R[14]=c,R[15]=x,f.markAsUpdated()}static FromValues(t,e,r,i,s,o,a,n,h,_,l,y,u,m,c,x){let f=new z,R=f._m;return R[0]=t,R[1]=e,R[2]=r,R[3]=i,R[4]=s,R[5]=o,R[6]=a,R[7]=n,R[8]=h,R[9]=_,R[10]=l,R[11]=y,R[12]=u,R[13]=m,R[14]=c,R[15]=x,f.markAsUpdated(),f}static Compose(t,e,r){let i=new z;return z.ComposeToRef(t,e,r,i),i}static ComposeToRef(t,e,r,i){let s=i._m,o=e._x,a=e._y,n=e._z,h=e._w,_=o+o,l=a+a,y=n+n,u=o*_,m=o*l,c=o*y,x=a*l,f=a*y,R=n*y,d=h*_,z=h*l,T=h*y,w=t._x,p=t._y,F=t._z;return s[0]=(1-(x+R))*w,s[1]=(m+T)*w,s[2]=(c-z)*w,s[3]=0,s[4]=(m-T)*p,s[5]=(1-(u+R))*p,s[6]=(f+d)*p,s[7]=0,s[8]=(c+z)*F,s[9]=(f-d)*F,s[10]=(1-(u+x))*F,s[11]=0,s[12]=r._x,s[13]=r._y,s[14]=r._z,s[15]=1,i.markAsUpdated(),i}static Identity(){let t=z.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return t._updateIdentityStatus(!0),t}static IdentityToRef(t){return z.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,t),t._updateIdentityStatus(!0),t}static Zero(){let t=z.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return t._updateIdentityStatus(!1),t}static RotationX(t){let e=new z;return z.RotationXToRef(t,e),e}static Invert(t){let e=new z;return t.invertToRef(e),e}static RotationXToRef(t,e){let r=Math.sin(t),i=Math.cos(t);return z.FromValuesToRef(1,0,0,0,0,i,r,0,0,-r,i,0,0,0,0,1,e),e._updateIdentityStatus(1===i&&0===r),e}static RotationY(t){let e=new z;return z.RotationYToRef(t,e),e}static RotationYToRef(t,e){let r=Math.sin(t),i=Math.cos(t);return z.FromValuesToRef(i,0,-r,0,0,1,0,0,r,0,i,0,0,0,0,1,e),e._updateIdentityStatus(1===i&&0===r),e}static RotationZ(t){let e=new z;return z.RotationZToRef(t,e),e}static RotationZToRef(t,e){let r=Math.sin(t),i=Math.cos(t);return z.FromValuesToRef(i,r,0,0,-r,i,0,0,0,0,1,0,0,0,0,1,e),e._updateIdentityStatus(1===i&&0===r),e}static RotationAxis(t,e){let r=new z;return z.RotationAxisToRef(t,e,r),r}static RotationAxisToRef(t,e,r){let i=Math.sin(-e),s=Math.cos(-e),o=1-s;t=t.normalizeToRef(T.Vector3[0]);let a=r._m;return a[0]=t._x*t._x*o+s,a[1]=t._x*t._y*o-t._z*i,a[2]=t._x*t._z*o+t._y*i,a[3]=0,a[4]=t._y*t._x*o+t._z*i,a[5]=t._y*t._y*o+s,a[6]=t._y*t._z*o-t._x*i,a[7]=0,a[8]=t._z*t._x*o-t._y*i,a[9]=t._z*t._y*o+t._x*i,a[10]=t._z*t._z*o+s,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,r.markAsUpdated(),r}static RotationAlignToRef(t,e,r,i=!1){let s=f.Dot(e,t),o=r._m;if(s<-.999)o[0]=-1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=i?1:-1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=i?-1:1,o[11]=0;else{let r=f.Cross(e,t),i=1/(1+s);o[0]=r._x*r._x*i+s,o[1]=r._y*r._x*i-r._z,o[2]=r._z*r._x*i+r._y,o[3]=0,o[4]=r._x*r._y*i+r._z,o[5]=r._y*r._y*i+s,o[6]=r._z*r._y*i-r._x,o[7]=0,o[8]=r._x*r._z*i-r._y,o[9]=r._y*r._z*i+r._x,o[10]=r._z*r._z*i+s,o[11]=0}return o[12]=0,o[13]=0,o[14]=0,o[15]=1,r.markAsUpdated(),r}static RotationYawPitchRoll(t,e,r){let i=new z;return z.RotationYawPitchRollToRef(t,e,r,i),i}static RotationYawPitchRollToRef(t,e,r,i){return d.RotationYawPitchRollToRef(t,e,r,T.Quaternion[0]),T.Quaternion[0].toRotationMatrix(i),i}static Scaling(t,e,r){let i=new z;return z.ScalingToRef(t,e,r,i),i}static ScalingToRef(t,e,r,i){return z.FromValuesToRef(t,0,0,0,0,e,0,0,0,0,r,0,0,0,0,1,i),i._updateIdentityStatus(1===t&&1===e&&1===r),i}static Translation(t,e,r){let i=new z;return z.TranslationToRef(t,e,r,i),i}static TranslationToRef(t,e,r,i){return z.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,t,e,r,1,i),i._updateIdentityStatus(0===t&&0===e&&0===r),i}static Lerp(t,e,r){let i=new z;return z.LerpToRef(t,e,r,i),i}static LerpToRef(t,e,r,i){let s=i._m,o=t.m,a=e.m;for(let t=0;t<16;t++)s[t]=o[t]*(1-r)+a[t]*r;return i.markAsUpdated(),i}static DecomposeLerp(t,e,r){let i=new z;return z.DecomposeLerpToRef(t,e,r,i),i}static DecomposeLerpToRef(t,e,r,i){let s=T.Vector3[0],o=T.Quaternion[0],a=T.Vector3[1];t.decompose(s,o,a);let n=T.Vector3[2],h=T.Quaternion[1],_=T.Vector3[3];e.decompose(n,h,_);let l=T.Vector3[4];f.LerpToRef(s,n,r,l);let y=T.Quaternion[2];d.SlerpToRef(o,h,r,y);let u=T.Vector3[5];return f.LerpToRef(a,_,r,u),z.ComposeToRef(l,y,u,i),i}static LookAtLH(t,e,r){let i=new z;return z.LookAtLHToRef(t,e,r,i),i}static LookAtLHToRef(t,e,r,i){let s=T.Vector3[0],o=T.Vector3[1],a=T.Vector3[2];e.subtractToRef(t,a),a.normalize(),f.CrossToRef(r,a,s);let n=s.lengthSquared();0===n?s.x=1:s.normalizeFromLength(Math.sqrt(n)),f.CrossToRef(a,s,o),o.normalize();let h=-f.Dot(s,t),_=-f.Dot(o,t),l=-f.Dot(a,t);return z.FromValuesToRef(s._x,o._x,a._x,0,s._y,o._y,a._y,0,s._z,o._z,a._z,0,h,_,l,1,i),i}static LookAtRH(t,e,r){let i=new z;return z.LookAtRHToRef(t,e,r,i),i}static LookAtRHToRef(t,e,r,i){let s=T.Vector3[0],o=T.Vector3[1],a=T.Vector3[2];t.subtractToRef(e,a),a.normalize(),f.CrossToRef(r,a,s);let n=s.lengthSquared();0===n?s.x=1:s.normalizeFromLength(Math.sqrt(n)),f.CrossToRef(a,s,o),o.normalize();let h=-f.Dot(s,t),_=-f.Dot(o,t),l=-f.Dot(a,t);return z.FromValuesToRef(s._x,o._x,a._x,0,s._y,o._y,a._y,0,s._z,o._z,a._z,0,h,_,l,1,i),i}static LookDirectionLH(t,e){let r=new z;return z.LookDirectionLHToRef(t,e,r),r}static LookDirectionLHToRef(t,e,r){let i=T.Vector3[0];i.copyFrom(t),i.scaleInPlace(-1);let s=T.Vector3[1];return f.CrossToRef(e,i,s),z.FromValuesToRef(s._x,s._y,s._z,0,e._x,e._y,e._z,0,i._x,i._y,i._z,0,0,0,0,1,r),r}static LookDirectionRH(t,e){let r=new z;return z.LookDirectionRHToRef(t,e,r),r}static LookDirectionRHToRef(t,e,r){let i=T.Vector3[2];return f.CrossToRef(e,t,i),z.FromValuesToRef(i._x,i._y,i._z,0,e._x,e._y,e._z,0,t._x,t._y,t._z,0,0,0,0,1,r),r}static OrthoLH(t,e,r,i,s){let o=new z;return z.OrthoLHToRef(t,e,r,i,o,s),o}static OrthoLHToRef(t,e,r,i,s,o){let a=2/t,n=2/e,h=2/(i-r),_=-(i+r)/(i-r);return z.FromValuesToRef(a,0,0,0,0,n,0,0,0,0,h,0,0,0,_,1,s),o&&s.multiplyToRef(p,s),s._updateIdentityStatus(1===a&&1===n&&1===h&&0===_),s}static OrthoOffCenterLH(t,e,r,i,s,o,a){let n=new z;return z.OrthoOffCenterLHToRef(t,e,r,i,s,o,n,a),n}static OrthoOffCenterLHToRef(t,e,r,i,s,o,a,n){return z.FromValuesToRef(2/(e-t),0,0,0,0,2/(i-r),0,0,0,0,2/(o-s),0,(t+e)/(t-e),(i+r)/(r-i),-(o+s)/(o-s),1,a),n&&a.multiplyToRef(p,a),a.markAsUpdated(),a}static ObliqueOffCenterLHToRef(t,e,r,i,s,o,a,n,h,_,l){let y=-a*Math.cos(n),u=-a*Math.sin(n);return z.TranslationToRef(0,0,-h,T.Matrix[1]),z.FromValuesToRef(1,0,0,0,0,1,0,0,y,u,1,0,0,0,0,1,T.Matrix[0]),T.Matrix[1].multiplyToRef(T.Matrix[0],T.Matrix[0]),z.TranslationToRef(0,0,h,T.Matrix[1]),T.Matrix[0].multiplyToRef(T.Matrix[1],T.Matrix[0]),z.OrthoOffCenterLHToRef(t,e,r,i,s,o,_,l),T.Matrix[0].multiplyToRef(_,_),_}static OrthoOffCenterRH(t,e,r,i,s,o,a){let n=new z;return z.OrthoOffCenterRHToRef(t,e,r,i,s,o,n,a),n}static OrthoOffCenterRHToRef(t,e,r,i,s,o,a,n){return z.OrthoOffCenterLHToRef(t,e,r,i,s,o,a,n),a._m[10]*=-1,a}static ObliqueOffCenterRHToRef(t,e,r,i,s,o,a,n,h,_,l){let y=a*Math.cos(n),u=a*Math.sin(n);return z.TranslationToRef(0,0,h,T.Matrix[1]),z.FromValuesToRef(1,0,0,0,0,1,0,0,y,u,1,0,0,0,0,1,T.Matrix[0]),T.Matrix[1].multiplyToRef(T.Matrix[0],T.Matrix[0]),z.TranslationToRef(0,0,-h,T.Matrix[1]),T.Matrix[0].multiplyToRef(T.Matrix[1],T.Matrix[0]),z.OrthoOffCenterRHToRef(t,e,r,i,s,o,_,l),T.Matrix[0].multiplyToRef(_,_),_}static PerspectiveLH(t,e,r,i,s,o=0){let a=new z,n=Math.tan(o);return z.FromValuesToRef(2*r/t,0,0,0,0,2*r/e,0,n,0,0,(i+r)/(i-r),1,0,0,-2*i*r/(i-r),0,a),s&&a.multiplyToRef(p,a),a._updateIdentityStatus(!1),a}static PerspectiveFovLH(t,e,r,i,s,o=0,a=!1){let n=new z;return z.PerspectiveFovLHToRef(t,e,r,i,n,!0,s,o,a),n}static PerspectiveFovLHToRef(t,e,r,i,s,o=!0,a,n=0,h=!1){let _=1/Math.tan(.5*t),l=o?_/e:_,y=o?_:_*e,u=h&&0===r?-1:0!==i?(i+r)/(i-r):1,m=h&&0===r?2*i:0!==i?-2*i*r/(i-r):-2*r,c=Math.tan(n);return z.FromValuesToRef(l,0,0,0,0,y,0,c,0,0,u,1,0,0,m,0,s),a&&s.multiplyToRef(p,s),s._updateIdentityStatus(!1),s}static PerspectiveFovReverseLHToRef(t,e,r,i,s,o=!0,a,n=0){let h=1/Math.tan(.5*t),_=o?h/e:h,l=o?h:h*e,y=Math.tan(n);return z.FromValuesToRef(_,0,0,0,0,l,0,y,0,0,-r,1,0,0,1,0,s),a&&s.multiplyToRef(p,s),s._updateIdentityStatus(!1),s}static PerspectiveFovRH(t,e,r,i,s,o=0,a=!1){let n=new z;return z.PerspectiveFovRHToRef(t,e,r,i,n,!0,s,o,a),n}static PerspectiveFovRHToRef(t,e,r,i,s,o=!0,a,n=0,h=!1){let _=1/Math.tan(.5*t),l=o?_/e:_,y=o?_:_*e,u=h&&0===r?1:0!==i?-(i+r)/(i-r):-1,m=h&&0===r?2*i:0!==i?-2*i*r/(i-r):-2*r,c=Math.tan(n);return z.FromValuesToRef(l,0,0,0,0,y,0,c,0,0,u,-1,0,0,m,0,s),a&&s.multiplyToRef(p,s),s._updateIdentityStatus(!1),s}static PerspectiveFovReverseRHToRef(t,e,r,i,s,o=!0,a,n=0){let h=1/Math.tan(.5*t),_=o?h/e:h,l=o?h:h*e,y=Math.tan(n);return z.FromValuesToRef(_,0,0,0,0,l,0,y,0,0,-r,-1,0,0,-1,0,s),a&&s.multiplyToRef(p,s),s._updateIdentityStatus(!1),s}static GetFinalMatrix(t,e,r,i,s,o){let a=t.width,n=t.height,h=t.x,_=t.y,l=z.FromValues(a/2,0,0,0,0,-n/2,0,0,0,0,o-s,0,h+a/2,n/2+_,s,1),y=new z;return e.multiplyToRef(r,y),y.multiplyToRef(i,y),y.multiplyToRef(l,y)}static GetAsMatrix2x2(t){let e=t.m,r=[e[0],e[1],e[4],e[5]];return o.PerformanceConfigurator.MatrixUse64Bits?r:new Float32Array(r)}static GetAsMatrix3x3(t){let e=t.m,r=[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]];return o.PerformanceConfigurator.MatrixUse64Bits?r:new Float32Array(r)}static Transpose(t){let e=new z;return z.TransposeToRef(t,e),e}static TransposeToRef(t,e){let r=t.m,i=r[0],s=r[4],o=r[8],a=r[12],n=r[1],h=r[5],_=r[9],l=r[13],y=r[2],u=r[6],m=r[10],c=r[14],x=r[3],f=r[7],R=r[11],d=r[15],z=e._m;return z[0]=i,z[1]=s,z[2]=o,z[3]=a,z[4]=n,z[5]=h,z[6]=_,z[7]=l,z[8]=y,z[9]=u,z[10]=m,z[11]=c,z[12]=x,z[13]=f,z[14]=R,z[15]=d,e.markAsUpdated(),e._updateIdentityStatus(t._isIdentity,t._isIdentityDirty),e}static Reflection(t){let e=new z;return z.ReflectionToRef(t,e),e}static ReflectionToRef(t,e){t.normalize();let r=t.normal.x,i=t.normal.y,s=t.normal.z,o=-2*r,a=-2*i,n=-2*s;return z.FromValuesToRef(o*r+1,a*r,n*r,0,o*i,a*i+1,n*i,0,o*s,a*s,n*s+1,0,o*t.d,a*t.d,n*t.d,1,e),e}static FromXYZAxesToRef(t,e,r,i){return z.FromValuesToRef(t._x,t._y,t._z,0,e._x,e._y,e._z,0,r._x,r._y,r._z,0,0,0,0,1,i),i}static FromQuaternionToRef(t,e){let r=t._x*t._x,i=t._y*t._y,s=t._z*t._z,o=t._x*t._y,a=t._z*t._w,n=t._z*t._x,h=t._y*t._w,_=t._y*t._z,l=t._x*t._w;return e._m[0]=1-2*(i+s),e._m[1]=2*(o+a),e._m[2]=2*(n-h),e._m[3]=0,e._m[4]=2*(o-a),e._m[5]=1-2*(s+r),e._m[6]=2*(_+l),e._m[7]=0,e._m[8]=2*(n+h),e._m[9]=2*(_-l),e._m[10]=1-2*(i+r),e._m[11]=0,e._m[12]=0,e._m[13]=0,e._m[14]=0,e._m[15]=1,e.markAsUpdated(),e}}z._IdentityReadOnly=z.Identity();class T{}T.Vector3=i(11,f.Zero),T.Matrix=i(2,z.Identity),T.Quaternion=i(3,d.Zero);class w{}w.Vector2=i(3,x.Zero),w.Vector3=i(13,f.Zero),w.Vector4=i(3,R.Zero),w.Quaternion=i(3,d.Zero),w.Matrix=i(8,z.Identity);let p=z.FromValues(1,0,0,0,0,1,0,0,0,0,.5,0,0,0,.5,1),F=!1;t.s(["Matrix",0,z,"Quaternion",0,d,"RegisterMathVector",0,function(){F||(F=!0,Object.defineProperties(x.prototype,{dimension:{value:[2]},rank:{value:1}}),Object.defineProperties(f.prototype,{dimension:{value:[3]},rank:{value:1}}),Object.defineProperties(R.prototype,{dimension:{value:[4]},rank:{value:1}}),Object.defineProperties(d.prototype,{dimension:{value:[4]},rank:{value:1}}),Object.defineProperties(z.prototype,{dimension:{value:[4,4]},rank:{value:2}}),(0,m.RegisterClass)("BABYLON.Vector2",x),(0,m.RegisterClass)("BABYLON.Vector3",f),(0,m.RegisterClass)("BABYLON.Vector4",R),(0,m.RegisterClass)("BABYLON.Matrix",z))},"TmpVectors",0,w,"Vector2",0,x,"Vector3",0,f,"Vector4",0,R],96265)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,23507,70227,54196,3717,92040,33457,97001,e=>{"use strict";var t,i=e.i(10272),r=e.i(37143),s=e.i(65740),n=e.i(99267),a=e.i(81623),l=e.i(35407),o=e.i(49007),h=e.i(48657),c=e.i(96265),u=e.i(89030);class d{constructor(e,t,i){this.vectors=(0,h.BuildArray)(8,c.Vector3.Zero),this.center=c.Vector3.Zero(),this.centerWorld=c.Vector3.Zero(),this.extendSize=c.Vector3.Zero(),this.extendSizeWorld=c.Vector3.Zero(),this.directions=(0,h.BuildArray)(3,c.Vector3.Zero),this.vectorsWorld=(0,h.BuildArray)(8,c.Vector3.Zero),this.minimumWorld=c.Vector3.Zero(),this.maximumWorld=c.Vector3.Zero(),this.minimum=c.Vector3.Zero(),this.maximum=c.Vector3.Zero(),this._drawWrapperFront=null,this._drawWrapperBack=null,this.reConstruct(e,t,i)}reConstruct(e,t,i){let r=e.x,s=e.y,n=e.z,a=t.x,l=t.y,o=t.z,h=this.vectors;this.minimum.copyFromFloats(r,s,n),this.maximum.copyFromFloats(a,l,o),h[0].copyFromFloats(r,s,n),h[1].copyFromFloats(a,l,o),h[2].copyFromFloats(a,s,n),h[3].copyFromFloats(r,l,n),h[4].copyFromFloats(r,s,o),h[5].copyFromFloats(a,l,n),h[6].copyFromFloats(r,l,o),h[7].copyFromFloats(a,s,o),t.addToRef(e,this.center).scaleInPlace(.5),t.subtractToRef(e,this.extendSize).scaleInPlace(.5),this._worldMatrix=i||c.Matrix.IdentityReadOnly,this._update(this._worldMatrix)}scale(e){let t=d._TmpVector3,i=this.maximum.subtractToRef(this.minimum,t[0]),r=i.length();i.normalizeFromLength(r);let s=r*e,n=i.scaleInPlace(.5*s),a=this.center.subtractToRef(n,t[1]),l=this.center.addToRef(n,t[2]);return this.reConstruct(a,l,this._worldMatrix),this}getWorldMatrix(){return this._worldMatrix}_update(e){let t=this.minimumWorld,i=this.maximumWorld,r=this.directions,s=this.vectorsWorld,n=this.vectors;if(e.isIdentity()){t.copyFrom(this.minimum),i.copyFrom(this.maximum);for(let e=0;e<8;++e)s[e].copyFrom(n[e]);this.extendSizeWorld.copyFrom(this.extendSize),this.centerWorld.copyFrom(this.center)}else{t.setAll(Number.MAX_VALUE),i.setAll(-Number.MAX_VALUE);for(let r=0;r<8;++r){let a=s[r];c.Vector3.TransformCoordinatesToRef(n[r],e,a),t.minimizeInPlace(a),i.maximizeInPlace(a)}i.subtractToRef(t,this.extendSizeWorld).scaleInPlace(.5),i.addToRef(t,this.centerWorld).scaleInPlace(.5)}c.Vector3.FromArrayToRef(e.m,0,r[0]),c.Vector3.FromArrayToRef(e.m,4,r[1]),c.Vector3.FromArrayToRef(e.m,8,r[2]),this._worldMatrix=e}isInFrustum(e){return d.IsInFrustum(this.vectorsWorld,e)}isCompletelyInFrustum(e){return d.IsCompletelyInFrustum(this.vectorsWorld,e)}intersectsPoint(e){let t=this.minimumWorld,i=this.maximumWorld,r=t.x,s=t.y,n=t.z,a=i.x,l=i.y,o=i.z,h=e.x,c=e.y,d=e.z,_=-u.Epsilon;return!(a-h<_)&&!(_>h-r)&&!(l-c<_)&&!(_>c-s)&&!(o-d<_)&&!(_>d-n)}intersectsSphere(e){return d.IntersectsSphere(this.minimumWorld,this.maximumWorld,e.centerWorld,e.radiusWorld)}intersectsMinMax(e,t){let i=this.minimumWorld,r=this.maximumWorld,s=i.x,n=i.y,a=i.z,l=r.x,o=r.y,h=r.z,c=e.x,u=e.y,d=e.z,_=t.x,p=t.y,E=t.z;return!(l<c)&&!(s>_)&&!(o<u)&&!(n>p)&&!(h<d)&&!(a>E)}dispose(){this._drawWrapperFront?.dispose(),this._drawWrapperBack?.dispose()}static Intersects(e,t){return e.intersectsMinMax(t.minimumWorld,t.maximumWorld)}static IntersectsSphere(e,t,i,r){let s=d._TmpVector3[0];return c.Vector3.ClampToRef(i,e,t,s),c.Vector3.DistanceSquared(i,s)<=r*r}static IsCompletelyInFrustum(e,t){for(let i=0;i<6;++i){let r=t[i];for(let t=0;t<8;++t)if(0>r.dotCoordinate(e[t]))return!1}return!0}static IsInFrustum(e,t){for(let i=0;i<6;++i){let r=!0,s=t[i];for(let t=0;t<8;++t)if(s.dotCoordinate(e[t])>=0){r=!1;break}if(r)return!1}return!0}}d._TmpVector3=(0,h.BuildArray)(3,c.Vector3.Zero);class _{constructor(e,t,i){this.center=c.Vector3.Zero(),this.centerWorld=c.Vector3.Zero(),this.minimum=c.Vector3.Zero(),this.maximum=c.Vector3.Zero(),this.reConstruct(e,t,i)}reConstruct(e,t,i){this.minimum.copyFrom(e),this.maximum.copyFrom(t);let r=c.Vector3.Distance(e,t);t.addToRef(e,this.center).scaleInPlace(.5),this.radius=.5*r,this._update(i||c.Matrix.IdentityReadOnly)}scale(e){let t=this.radius*e,i=_._TmpVector3,r=i[0].setAll(t),s=this.center.subtractToRef(r,i[1]),n=this.center.addToRef(r,i[2]);return this.reConstruct(s,n,this._worldMatrix),this}getWorldMatrix(){return this._worldMatrix}_update(e){if(e.isIdentity())this.centerWorld.copyFrom(this.center),this.radiusWorld=this.radius;else{c.Vector3.TransformCoordinatesToRef(this.center,e,this.centerWorld);let t=_._TmpVector3[0];c.Vector3.TransformNormalFromFloatsToRef(1,1,1,e,t),this.radiusWorld=Math.max(Math.abs(t.x),Math.abs(t.y),Math.abs(t.z))*this.radius}}isInFrustum(e){let t=this.centerWorld,i=this.radiusWorld;for(let r=0;r<6;r++)if(e[r].dotCoordinate(t)<=-i)return!1;return!0}isCenterInFrustum(e){let t=this.centerWorld;for(let i=0;i<6;i++)if(0>e[i].dotCoordinate(t))return!1;return!0}intersectsPoint(e){let t=c.Vector3.DistanceSquared(this.centerWorld,e);return!(this.radiusWorld*this.radiusWorld<t)}static Intersects(e,t){let i=c.Vector3.DistanceSquared(e.centerWorld,t.centerWorld),r=e.radiusWorld+t.radiusWorld;return!(r*r<i)}static CreateFromCenterAndRadius(e,t,i){this._TmpVector3[0].copyFrom(e),this._TmpVector3[1].copyFromFloats(0,0,t),this._TmpVector3[2].copyFrom(e),this._TmpVector3[0].addInPlace(this._TmpVector3[1]),this._TmpVector3[2].subtractInPlace(this._TmpVector3[1]);let r=new _(this._TmpVector3[0],this._TmpVector3[2]);return i?r._worldMatrix=i:r._worldMatrix=c.Matrix.Identity(),r}}_._TmpVector3=(0,h.BuildArray)(3,c.Vector3.Zero);let p={min:0,max:0},E={min:0,max:0},A=(e,t,i)=>{let r=c.Vector3.Dot(t.centerWorld,e),s=Math.abs(c.Vector3.Dot(t.directions[0],e))*t.extendSize.x+Math.abs(c.Vector3.Dot(t.directions[1],e))*t.extendSize.y+Math.abs(c.Vector3.Dot(t.directions[2],e))*t.extendSize.z;i.min=r-s,i.max=r+s},T=(e,t,i)=>(A(e,t,p),A(e,i,E),!(p.min>E.max||E.min>p.max));class f{constructor(e,t,i){this._isLocked=!1,this.boundingBox=new d(e,t,i),this.boundingSphere=new _(e,t,i)}reConstruct(e,t,i){this.boundingBox.reConstruct(e,t,i),this.boundingSphere.reConstruct(e,t,i)}get minimum(){return this.boundingBox.minimum}get maximum(){return this.boundingBox.maximum}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked=e}update(e){this._isLocked||(this.boundingBox._update(e),this.boundingSphere._update(e))}centerOn(e,t){let i=f._TmpVector3[0].copyFrom(e).subtractInPlace(t),r=f._TmpVector3[1].copyFrom(e).addInPlace(t);return this.boundingBox.reConstruct(i,r,this.boundingBox.getWorldMatrix()),this.boundingSphere.reConstruct(i,r,this.boundingBox.getWorldMatrix()),this}encapsulate(e){let t=c.Vector3.Minimize(this.minimum,e),i=c.Vector3.Maximize(this.maximum,e);return this.reConstruct(t,i,this.boundingBox.getWorldMatrix()),this}encapsulateBoundingInfo(e){let t=c.TmpVectors.Matrix[0];this.boundingBox.getWorldMatrix().invertToRef(t);let i=c.TmpVectors.Vector3[0];return c.Vector3.TransformCoordinatesToRef(e.boundingBox.minimumWorld,t,i),this.encapsulate(i),c.Vector3.TransformCoordinatesToRef(e.boundingBox.maximumWorld,t,i),this.encapsulate(i),this}scale(e){return this.boundingBox.scale(e),this.boundingSphere.scale(e),this}isInFrustum(e,t=0){return!!((2===t||3===t)&&this.boundingSphere.isCenterInFrustum(e))||!!this.boundingSphere.isInFrustum(e)&&(1===t||3===t||this.boundingBox.isInFrustum(e))}get diagonalLength(){let e=this.boundingBox;return e.maximumWorld.subtractToRef(e.minimumWorld,f._TmpVector3[0]).length()}isCompletelyInFrustum(e){return this.boundingBox.isCompletelyInFrustum(e)}_checkCollision(e){return e._canDoCollision(this.boundingSphere.centerWorld,this.boundingSphere.radiusWorld,this.boundingBox.minimumWorld,this.boundingBox.maximumWorld)}intersectsPoint(e){return!!this.boundingSphere.centerWorld&&!!this.boundingSphere.intersectsPoint(e)&&!!this.boundingBox.intersectsPoint(e)}intersects(e,t){if(!_.Intersects(this.boundingSphere,e.boundingSphere)||!d.Intersects(this.boundingBox,e.boundingBox))return!1;if(!t)return!0;let i=this.boundingBox,r=e.boundingBox;return!!T(i.directions[0],i,r)&&!!T(i.directions[1],i,r)&&!!T(i.directions[2],i,r)&&!!T(r.directions[0],i,r)&&!!T(r.directions[1],i,r)&&!!T(r.directions[2],i,r)&&!!T(c.Vector3.Cross(i.directions[0],r.directions[0]),i,r)&&!!T(c.Vector3.Cross(i.directions[0],r.directions[1]),i,r)&&!!T(c.Vector3.Cross(i.directions[0],r.directions[2]),i,r)&&!!T(c.Vector3.Cross(i.directions[1],r.directions[0]),i,r)&&!!T(c.Vector3.Cross(i.directions[1],r.directions[1]),i,r)&&!!T(c.Vector3.Cross(i.directions[1],r.directions[2]),i,r)&&!!T(c.Vector3.Cross(i.directions[2],r.directions[0]),i,r)&&!!T(c.Vector3.Cross(i.directions[2],r.directions[1]),i,r)&&!!T(c.Vector3.Cross(i.directions[2],r.directions[2]),i,r)&&!0}}f._TmpVector3=(0,h.BuildArray)(2,c.Vector3.Zero),e.s(["BoundingInfo",0,f],70227);class g{static extractMinAndMaxIndexed(e,t,i,r,s,n){for(let a=i;a<i+r;a++){let i=3*t[a],r=e[i],l=e[i+1],o=e[i+2];s.minimizeInPlaceFromFloats(r,l,o),n.maximizeInPlaceFromFloats(r,l,o)}}static extractMinAndMax(e,t,i,r,s,n){for(let a=t,l=t*r;a<t+i;a++,l+=r){let t=e[l],i=e[l+1],r=e[l+2];s.minimizeInPlaceFromFloats(t,i,r),n.maximizeInPlaceFromFloats(t,i,r)}}}function m(e,t,i,r,s=null){let n=new c.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),a=new c.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);return g.extractMinAndMaxIndexed(e,t,i,r,n,a),s&&(n.x-=n.x*s.x+s.y,n.y-=n.y*s.x+s.y,n.z-=n.z*s.x+s.y,a.x+=a.x*s.x+s.y,a.y+=a.y*s.x+s.y,a.z+=a.z*s.x+s.y),{minimum:n,maximum:a}}(0,i.__decorate)([r.nativeOverride.filter((...e)=>!Array.isArray(e[0])&&!Array.isArray(e[1]))],g,"extractMinAndMaxIndexed",null),(0,i.__decorate)([r.nativeOverride.filter((...e)=>!Array.isArray(e[0]))],g,"extractMinAndMax",null),e.s(["extractMinAndMax",0,function(e,t,i,r=null,s){let n=new c.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),a=new c.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);return s||(s=3),g.extractMinAndMax(e,t,i,s,n,a),r&&(n.x-=n.x*r.x+r.y,n.y-=n.y*r.x+r.y,n.z-=n.z*r.x+r.y,a.x+=a.x*r.x+r.y,a.y+=a.y*r.x+r.y,a.z+=a.z*r.x+r.y),{minimum:n,maximum:a}},"extractMinAndMaxIndexed",0,m],54196);var M=e.i(44939),S=e.i(75405);class b{get materialDefines(){let e=this._mainDrawWrapperOverride?this._mainDrawWrapperOverride.defines:this._getDrawWrapper()?.defines;return"string"==typeof e?null:e}set materialDefines(e){(this._mainDrawWrapperOverride??this._getDrawWrapper(void 0,!0)).defines=e}_getDrawWrapper(e,t=!1){e=e??this._engine.currentRenderPassId;let i=this._drawWrappers[e];return!i&&t&&(this._drawWrappers[e]=i=new M.DrawWrapper(this._mesh.getScene().getEngine())),i}_removeDrawWrapper(e,t=!0,i=!1){t&&this._drawWrappers[e]?.dispose(i),this._drawWrappers[e]=void 0}get effect(){return this._mainDrawWrapperOverride?this._mainDrawWrapperOverride.effect:this._getDrawWrapper()?.effect??null}get _drawWrapper(){return this._mainDrawWrapperOverride??this._getDrawWrapper(void 0,!0)}get _drawWrapperOverride(){return this._mainDrawWrapperOverride}_setMainDrawWrapperOverride(e){this._mainDrawWrapperOverride=e}setEffect(e,t=null,i,r=!0){let s=this._drawWrapper;s.setEffect(e,t,r),void 0!==i&&(s.materialContext=i),e||(s.defines=null,s.materialContext=void 0)}resetDrawCache(e,t=!1){if(this._drawWrappers)if(void 0!==e)return void this._removeDrawWrapper(e,!0,t);else for(let e of this._drawWrappers)e?.dispose(t);this._drawWrappers=[]}static AddToMesh(e,t,i,r,s,n,a,l=!0){return new b(e,t,i,r,s,n,a,l)}constructor(e,t,i,r,s,n,a,l=!0,o=!0){this.materialIndex=e,this.verticesStart=t,this.verticesCount=i,this.indexStart=r,this.indexCount=s,this._mainDrawWrapperOverride=null,this._linesIndexCount=0,this._linesIndexBuffer=null,this._lastColliderWorldVertices=null,this._lastColliderTransformMatrix=null,this._wasDispatched=!1,this._renderId=0,this._alphaIndex=0,this._distanceToCamera=0,this._currentMaterial=null,this._mesh=n,this._renderingMesh=a||n,o&&n.subMeshes.push(this),this._engine=this._mesh.getScene().getEngine(),this.resetDrawCache(),this._trianglePlanes=[],this._id=n.subMeshes.length-1,l&&(this.refreshBoundingInfo(),n.computeWorldMatrix(!0))}get IsGlobal(){return 0===this.verticesStart&&this.verticesCount===this._mesh.getTotalVertices()&&0===this.indexStart&&this.indexCount===this._mesh.getTotalIndices()}getBoundingInfo(){return this.IsGlobal||this._mesh.hasThinInstances?this._mesh.getBoundingInfo():this._boundingInfo}setBoundingInfo(e){return this._boundingInfo=e,this}getMesh(){return this._mesh}getRenderingMesh(){return this._renderingMesh}getReplacementMesh(){return this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:null}getEffectiveMesh(){return(this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:null)||this._renderingMesh}getMaterial(e=!0){let t=this._renderingMesh.getMaterialForRenderPass(this._engine.currentRenderPassId)??this._renderingMesh.material;if(!t)return e&&this._mesh.getScene()._hasDefaultMaterial?this._mesh.getScene().defaultMaterial:null;if(this._isMultiMaterial(t)){let e=t.getSubMaterial(this.materialIndex);return this._currentMaterial!==e&&(this._currentMaterial=e,this.resetDrawCache()),e}return t}_isMultiMaterial(e){return void 0!==e.getSubMaterial}refreshBoundingInfo(e=null){let t;if(this._lastColliderWorldVertices=null,this.IsGlobal||!this._renderingMesh||!this._renderingMesh.geometry)return this;if(e||(e=this._renderingMesh.getVerticesData(l.VertexBuffer.PositionKind)),!e)return this._boundingInfo=this._mesh.getBoundingInfo(),this;let i=this._renderingMesh.getIndices();if(0===this.indexStart&&this.indexCount===i.length){let e=this._renderingMesh.getBoundingInfo();t={minimum:e.minimum.clone(),maximum:e.maximum.clone()}}else t=m(e,i,this.indexStart,this.indexCount,this._renderingMesh.geometry.boundingBias);return this._boundingInfo?this._boundingInfo.reConstruct(t.minimum,t.maximum):this._boundingInfo=new f(t.minimum,t.maximum),this}_checkCollision(e){return this.getBoundingInfo()._checkCollision(e)}updateBoundingInfo(e){let t=this.getBoundingInfo();return t||(this.refreshBoundingInfo(),t=this.getBoundingInfo()),t&&t.update(e),this}isInFrustum(e){let t=this.getBoundingInfo();return!!t&&t.isInFrustum(e,this._mesh.cullingStrategy)}isCompletelyInFrustum(e){let t=this.getBoundingInfo();return!!t&&t.isCompletelyInFrustum(e)}render(e){return this._renderingMesh.render(this,e,this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:void 0),this}_getLinesIndexBuffer(e,t){if(!this._linesIndexBuffer){let i=6*Math.floor(this.indexCount/3),r=this.verticesStart+this.verticesCount>65535?new Uint32Array(i):new Uint16Array(i),s=0;if(0===e.length)for(let e=this.indexStart;e<this.indexStart+this.indexCount;e+=3)r[s++]=e,r[s++]=e+1,r[s++]=e+1,r[s++]=e+2,r[s++]=e+2,r[s++]=e;else for(let t=this.indexStart;t<this.indexStart+this.indexCount;t+=3)r[s++]=e[t],r[s++]=e[t+1],r[s++]=e[t+1],r[s++]=e[t+2],r[s++]=e[t+2],r[s++]=e[t];this._linesIndexBuffer=t.createIndexBuffer(r),this._linesIndexCount=r.length}return this._linesIndexBuffer}canIntersects(e){let t=this.getBoundingInfo();return!!t&&e.intersectsBox(t.boundingBox)}intersects(e,t,i,r,s){let n=this.getMaterial();if(!n)return null;let a=3,l=!1;switch(n.fillMode){case 3:case 5:case 6:case 8:return null;case 7:a=1,l=!0}return 4===n.fillMode?i.length?this._intersectLines(e,t,i,this._mesh.intersectionThreshold,r):this._intersectUnIndexedLines(e,t,i,this._mesh.intersectionThreshold,r):!i.length&&this._mesh._unIndexed?this._intersectUnIndexedTriangles(e,t,i,r,s):this._intersectTriangles(e,t,i,a,l,r,s)}_intersectLines(e,t,i,r,s){let n=null;for(let a=this.indexStart;a<this.indexStart+this.indexCount;a+=2){let l=t[i[a]],h=t[i[a+1]],c=e.intersectionSegment(l,h,r);if(!(c<0)&&(s||!n||c<n.distance)&&((n=new o.IntersectionInfo(null,null,c)).faceId=a/2,s))break}return n}_intersectUnIndexedLines(e,t,i,r,s){let n=null;for(let i=this.verticesStart;i<this.verticesStart+this.verticesCount;i+=2){let a=t[i],l=t[i+1],h=e.intersectionSegment(a,l,r);if(!(h<0)&&(s||!n||h<n.distance)&&((n=new o.IntersectionInfo(null,null,h)).faceId=i/2,s))break}return n}_intersectTriangles(e,t,i,r,s,n,a){let l=null,o=-1;for(let h=this.indexStart;h<this.indexStart+this.indexCount-(3-r);h+=r){o++;let r=i[h],c=i[h+1],u=i[h+2];if(s&&0xffffffff===u){h+=2;continue}let d=t[r],_=t[c],p=t[u];if(!d||!_||!p||a&&!a(d,_,p,e,r,c,u))continue;let E=e.intersectsTriangle(d,_,p);if(E){if(E.distance<0)continue;if((n||!l||E.distance<l.distance)&&((l=E).faceId=o,n))break}}return l}_intersectUnIndexedTriangles(e,t,i,r,s){let n=null;for(let i=this.verticesStart;i<this.verticesStart+this.verticesCount;i+=3){let a=t[i],l=t[i+1],o=t[i+2];if(s&&!s(a,l,o,e,-1,-1,-1))continue;let h=e.intersectsTriangle(a,l,o);if(h){if(h.distance<0)continue;if((r||!n||h.distance<n.distance)&&((n=h).faceId=i/3,r))break}}return n}_rebuild(){this._linesIndexBuffer&&(this._linesIndexBuffer=null)}clone(e,t){let i=new b(this.materialIndex,this.verticesStart,this.verticesCount,this.indexStart,this.indexCount,e,t,!1);if(!this.IsGlobal){let e=this.getBoundingInfo();if(!e)return i;i._boundingInfo=new f(e.minimum,e.maximum)}return i}dispose(e=!1){this._linesIndexBuffer&&(this._mesh.getScene().getEngine()._releaseBuffer(this._linesIndexBuffer),this._linesIndexBuffer=null);let t=this._mesh.subMeshes.indexOf(this);this._mesh.subMeshes.splice(t,1),this.resetDrawCache(void 0,e)}getClassName(){return"SubMesh"}static CreateFromIndices(e,t,i,r,s,n=!0){let a=Number.MAX_VALUE,l=-Number.MAX_VALUE,o=(s||r).getIndices();for(let e=t;e<t+i;e++){let t=o[e];t<a&&(a=t),t>l&&(l=t)}return new b(e,a,l-a+1,t,i,r,s,n)}}(t=b.prototype).projectToRef??(t.projectToRef=(0,S._MissingSideEffect)("SubMesh","projectToRef")),e.s(["SubMesh",0,b],3717);var I=e.i(33855),P=e.i(13379),R=e.i(65002),C=e.i(80871);class x{constructor(){this.reset()}reset(){this.enabled=!1,this.mask=255,this.funcRef=1,this.funcMask=255,this.func=519,this.opStencilFail=7680,this.opDepthFail=7680,this.opStencilDepthPass=7681,this.backFunc=519,this.backOpStencilFail=7680,this.backOpDepthFail=7680,this.backOpStencilDepthPass=7681}get func(){return this._func}set func(e){this._func=e}get backFunc(){return this._backFunc}set backFunc(e){this._backFunc=e}get funcRef(){return this._funcRef}set funcRef(e){this._funcRef=e}get funcMask(){return this._funcMask}set funcMask(e){this._funcMask=e}get opStencilFail(){return this._opStencilFail}set opStencilFail(e){this._opStencilFail=e}get opDepthFail(){return this._opDepthFail}set opDepthFail(e){this._opDepthFail=e}get opStencilDepthPass(){return this._opStencilDepthPass}set opStencilDepthPass(e){this._opStencilDepthPass=e}get backOpStencilFail(){return this._backOpStencilFail}set backOpStencilFail(e){this._backOpStencilFail=e}get backOpDepthFail(){return this._backOpDepthFail}set backOpDepthFail(e){this._backOpDepthFail=e}get backOpStencilDepthPass(){return this._backOpStencilDepthPass}set backOpStencilDepthPass(e){this._backOpStencilDepthPass=e}get mask(){return this._mask}set mask(e){this._mask=e}get enabled(){return this._enabled}set enabled(e){this._enabled=e}getClassName(){return"MaterialStencilState"}copyTo(e){C.SerializationHelper.Clone(()=>e,this)}serialize(){return C.SerializationHelper.Serialize(this)}parse(e,t,i){C.SerializationHelper.Parse(()=>this,e,t,i)}}(0,i.__decorate)([(0,r.serialize)()],x.prototype,"func",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"backFunc",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"funcRef",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"funcMask",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"opStencilFail",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"opDepthFail",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"opStencilDepthPass",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"backOpStencilFail",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"backOpDepthFail",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"backOpStencilDepthPass",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"mask",null),(0,i.__decorate)([(0,r.serialize)()],x.prototype,"enabled",null);var D=e.i(21823),O=e.i(94160);function y(e,t,i){let r=!1,s=!!(e.clipPlane??t.clipPlane),n=!!(e.clipPlane2??t.clipPlane2),a=!!(e.clipPlane3??t.clipPlane3),l=!!(e.clipPlane4??t.clipPlane4),o=!!(e.clipPlane5??t.clipPlane5),h=!!(e.clipPlane6??t.clipPlane6);return i.CLIPPLANE!==s&&(i.CLIPPLANE=s,r=!0),i.CLIPPLANE2!==n&&(i.CLIPPLANE2=n,r=!0),i.CLIPPLANE3!==a&&(i.CLIPPLANE3=a,r=!0),i.CLIPPLANE4!==l&&(i.CLIPPLANE4=l,r=!0),i.CLIPPLANE5!==o&&(i.CLIPPLANE5=o,r=!0),i.CLIPPLANE6!==h&&(i.CLIPPLANE6=h,r=!0),r}function L(e,t,i){if(i){let r=O.FloatingOriginCurrentScene.getScene()?.floatingOriginOffset||c.Vector3.ZeroReadOnly;e.setFloat4(t,i.normal.x,i.normal.y,i.normal.z,i.d+c.Vector3.Dot(i.normal,r))}}e.s(["AddClipPlaneUniforms",0,function(e){-1===e.indexOf("vClipPlane")&&e.push("vClipPlane"),-1===e.indexOf("vClipPlane2")&&e.push("vClipPlane2"),-1===e.indexOf("vClipPlane3")&&e.push("vClipPlane3"),-1===e.indexOf("vClipPlane4")&&e.push("vClipPlane4"),-1===e.indexOf("vClipPlane5")&&e.push("vClipPlane5"),-1===e.indexOf("vClipPlane6")&&e.push("vClipPlane6")},"BindClipPlane",0,function(e,t,i){let r=t.clipPlane??i.clipPlane;L(e,"vClipPlane",r),L(e,"vClipPlane2",r=t.clipPlane2??i.clipPlane2),L(e,"vClipPlane3",r=t.clipPlane3??i.clipPlane3),L(e,"vClipPlane4",r=t.clipPlane4??i.clipPlane4),L(e,"vClipPlane5",r=t.clipPlane5??i.clipPlane5),L(e,"vClipPlane6",r=t.clipPlane6??i.clipPlane6)},"PrepareDefinesForClipPlanes",0,y,"PrepareStringDefinesForClipPlanes",0,function(e,t,i){let r=!!(e.clipPlane??t.clipPlane),s=!!(e.clipPlane2??t.clipPlane2),n=!!(e.clipPlane3??t.clipPlane3),a=!!(e.clipPlane4??t.clipPlane4),l=!!(e.clipPlane5??t.clipPlane5),o=!!(e.clipPlane6??t.clipPlane6);r&&i.push("#define CLIPPLANE"),s&&i.push("#define CLIPPLANE2"),n&&i.push("#define CLIPPLANE3"),a&&i.push("#define CLIPPLANE4"),l&&i.push("#define CLIPPLANE5"),o&&i.push("#define CLIPPLANE6")}],92040);var F=e.i(76535);class N{static get DiffuseTextureEnabled(){return this._DiffuseTextureEnabled}static set DiffuseTextureEnabled(e){this._DiffuseTextureEnabled!==e&&(this._DiffuseTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get BaseWeightTextureEnabled(){return this._BaseWeightTextureEnabled}static set BaseWeightTextureEnabled(e){this._BaseWeightTextureEnabled!==e&&(this._BaseWeightTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get BaseDiffuseRoughnessTextureEnabled(){return this._BaseDiffuseRoughnessTextureEnabled}static set BaseDiffuseRoughnessTextureEnabled(e){this._BaseDiffuseRoughnessTextureEnabled!==e&&(this._BaseDiffuseRoughnessTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get DetailTextureEnabled(){return this._DetailTextureEnabled}static set DetailTextureEnabled(e){this._DetailTextureEnabled!==e&&(this._DetailTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get DecalMapEnabled(){return this._DecalMapEnabled}static set DecalMapEnabled(e){this._DecalMapEnabled!==e&&(this._DecalMapEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get AmbientTextureEnabled(){return this._AmbientTextureEnabled}static set AmbientTextureEnabled(e){this._AmbientTextureEnabled!==e&&(this._AmbientTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get OpacityTextureEnabled(){return this._OpacityTextureEnabled}static set OpacityTextureEnabled(e){this._OpacityTextureEnabled!==e&&(this._OpacityTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get ReflectionTextureEnabled(){return this._ReflectionTextureEnabled}static set ReflectionTextureEnabled(e){this._ReflectionTextureEnabled!==e&&(this._ReflectionTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get EmissiveTextureEnabled(){return this._EmissiveTextureEnabled}static set EmissiveTextureEnabled(e){this._EmissiveTextureEnabled!==e&&(this._EmissiveTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get SpecularTextureEnabled(){return this._SpecularTextureEnabled}static set SpecularTextureEnabled(e){this._SpecularTextureEnabled!==e&&(this._SpecularTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get BumpTextureEnabled(){return this._BumpTextureEnabled}static set BumpTextureEnabled(e){this._BumpTextureEnabled!==e&&(this._BumpTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get LightmapTextureEnabled(){return this._LightmapTextureEnabled}static set LightmapTextureEnabled(e){this._LightmapTextureEnabled!==e&&(this._LightmapTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get RefractionTextureEnabled(){return this._RefractionTextureEnabled}static set RefractionTextureEnabled(e){this._RefractionTextureEnabled!==e&&(this._RefractionTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get ColorGradingTextureEnabled(){return this._ColorGradingTextureEnabled}static set ColorGradingTextureEnabled(e){this._ColorGradingTextureEnabled!==e&&(this._ColorGradingTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get FresnelEnabled(){return this._FresnelEnabled}static set FresnelEnabled(e){this._FresnelEnabled!==e&&(this._FresnelEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(4))}static get ClearCoatTextureEnabled(){return this._ClearCoatTextureEnabled}static set ClearCoatTextureEnabled(e){this._ClearCoatTextureEnabled!==e&&(this._ClearCoatTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get ClearCoatBumpTextureEnabled(){return this._ClearCoatBumpTextureEnabled}static set ClearCoatBumpTextureEnabled(e){this._ClearCoatBumpTextureEnabled!==e&&(this._ClearCoatBumpTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get ClearCoatTintTextureEnabled(){return this._ClearCoatTintTextureEnabled}static set ClearCoatTintTextureEnabled(e){this._ClearCoatTintTextureEnabled!==e&&(this._ClearCoatTintTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get SheenTextureEnabled(){return this._SheenTextureEnabled}static set SheenTextureEnabled(e){this._SheenTextureEnabled!==e&&(this._SheenTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get AnisotropicTextureEnabled(){return this._AnisotropicTextureEnabled}static set AnisotropicTextureEnabled(e){this._AnisotropicTextureEnabled!==e&&(this._AnisotropicTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get ThicknessTextureEnabled(){return this._ThicknessTextureEnabled}static set ThicknessTextureEnabled(e){this._ThicknessTextureEnabled!==e&&(this._ThicknessTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get RefractionIntensityTextureEnabled(){return this._ThicknessTextureEnabled}static set RefractionIntensityTextureEnabled(e){this._RefractionIntensityTextureEnabled!==e&&(this._RefractionIntensityTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get TranslucencyIntensityTextureEnabled(){return this._TranslucencyIntensityTextureEnabled}static set TranslucencyIntensityTextureEnabled(e){this._TranslucencyIntensityTextureEnabled!==e&&(this._TranslucencyIntensityTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get TranslucencyColorTextureEnabled(){return this._TranslucencyColorTextureEnabled}static set TranslucencyColorTextureEnabled(e){this._TranslucencyColorTextureEnabled!==e&&(this._TranslucencyColorTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get IridescenceTextureEnabled(){return this._IridescenceTextureEnabled}static set IridescenceTextureEnabled(e){this._IridescenceTextureEnabled!==e&&(this._IridescenceTextureEnabled=e,F.AbstractEngine.MarkAllMaterialsAsDirty(1))}}N._DiffuseTextureEnabled=!0,N._BaseWeightTextureEnabled=!0,N._BaseDiffuseRoughnessTextureEnabled=!0,N._DetailTextureEnabled=!0,N._DecalMapEnabled=!0,N._AmbientTextureEnabled=!0,N._OpacityTextureEnabled=!0,N._ReflectionTextureEnabled=!0,N._EmissiveTextureEnabled=!0,N._SpecularTextureEnabled=!0,N._BumpTextureEnabled=!0,N._LightmapTextureEnabled=!0,N._RefractionTextureEnabled=!0,N._ColorGradingTextureEnabled=!0,N._FresnelEnabled=!0,N._ClearCoatTextureEnabled=!0,N._ClearCoatBumpTextureEnabled=!0,N._ClearCoatTintTextureEnabled=!0,N._SheenTextureEnabled=!0,N._AnisotropicTextureEnabled=!0,N._ThicknessTextureEnabled=!0,N._RefractionIntensityTextureEnabled=!0,N._TranslucencyIntensityTextureEnabled=!0,N._TranslucencyColorTextureEnabled=!0,N._IridescenceTextureEnabled=!0,e.s(["MaterialFlags",0,N],33457);let v={r:0,g:0,b:0},B={NUM_MORPH_INFLUENCERS:0,NORMAL:!1,TANGENT:!1,UV:!1,UV2:!1,COLOR:!1};function k(e,t,i,r=!0){let s=i.NUM_MORPH_INFLUENCERS;if(s>0&&a.EngineStore.LastCreatedEngine){let n=a.EngineStore.LastCreatedEngine.getCaps().maxVertexAttribs,l=t.morphTargetManager;if(l?.isUsingTextureForTargets)return;let o=l&&l.supportsPositions&&r,h=l&&l.supportsNormals&&i.NORMAL,c=l&&l.supportsTangents&&i.TANGENT,u=l&&l.supportsUVs&&i.UV1,d=l&&l.supportsUV2s&&i.UV2,_=l&&l.supportsColors&&i.VERTEXCOLOR;for(let i=0;i<s;i++)o&&e.push("position"+i),h&&e.push("normal"+i),c&&e.push("tangent"+i),u&&e.push("uv_"+i),d&&e.push("uv2_"+i),_&&e.push("color"+i),e.length>n&&P.Logger.Error("Cannot add more vertex attributes for mesh "+t.name)}}function U(e,t=!1){e.push("world0"),e.push("world1"),e.push("world2"),e.push("world3"),t&&(e.push("previousWorld0"),e.push("previousWorld1"),e.push("previousWorld2"),e.push("previousWorld3"))}function H(e,t){t.bindToEffect(e,"Scene")}let V=new WeakMap,W=new WeakSet;e.s(["AreLightsTexturesReady",0,function(e,t,i,r=!1){if(!e.lightsEnabled||r)return!0;let s=t.lightSources,n=Math.min(s.length,i);for(let e=0;e<n;e++)if(!s[e].areLightTexturesReady())return!1;return!0},"BindBonesParameters",0,function(e,t,i){if(t&&e&&(e.computeBonesUsingShaders&&t._bonesComputationForcedToCPU&&(e.computeBonesUsingShaders=!1),e.useBones&&e.computeBonesUsingShaders&&e.skeleton)){let r=e.skeleton;if(r.isUsingTextureForMatrices&&t.getUniformIndex("boneTextureInfo")>-1){let i=r.getTransformMatrixTexture(e);t.setTexture("boneSampler",i),t.setFloat2("boneTextureInfo",r._textureWidth,r._textureHeight)}else{let s=r.getTransformMatrices(e);s&&(t.setMatrices("mBones",s),i&&e.getScene().prePassRenderer&&e.getScene().prePassRenderer.getIndex(2))&&(i.previousBones[e.uniqueId]||(i.previousBones[e.uniqueId]=s.slice()),t.setMatrices("mPreviousBones",i.previousBones[e.uniqueId]),i.previousBones[e.uniqueId].set(s))}}},"BindFogParameters",0,function(e,t,i,r=!1){i&&e.fogEnabled&&(!t||t.applyFog)&&0!==e.fogMode&&(i.setFloat4("vFogInfos",e.fogMode,e.fogStart,e.fogEnd,e.fogDensity),r?(e.fogColor.toLinearSpaceToRef(v,e.getEngine().useExactSrgbConversions),i.setColor3("vFogColor",v)):i.setColor3("vFogColor",e.fogColor))},"BindIBLParameters",0,function(e,t,i,r,s=null,n=!1,a=!1,l=!1,o=!1,h=!1,c=!1,u=0){if(e.texturesEnabled&&s&&N.ReflectionTextureEnabled){if(i.updateMatrix("reflectionMatrix",s.getReflectionTextureMatrix()),i.updateFloat2("vReflectionInfos",s.level*e.iblIntensity,u),l&&s.boundingBoxSize&&(i.updateVector3("vReflectionPosition",s.boundingBoxPosition),i.updateVector3("vReflectionSize",s.boundingBoxSize)),n){let e=s.getSize().width;i.updateFloat2("vReflectionFilteringInfo",e,Math.log2(e))}if(h&&!t.USEIRRADIANCEMAP){let e=s.sphericalPolynomial;if(t.USESPHERICALFROMREFLECTIONMAP&&e)if(t.SPHERICAL_HARMONICS){let t=e.preScaledHarmonics;i.updateVector3("vSphericalL00",t.l00),i.updateVector3("vSphericalL1_1",t.l1_1),i.updateVector3("vSphericalL10",t.l10),i.updateVector3("vSphericalL11",t.l11),i.updateVector3("vSphericalL2_2",t.l2_2),i.updateVector3("vSphericalL2_1",t.l2_1),i.updateVector3("vSphericalL20",t.l20),i.updateVector3("vSphericalL21",t.l21),i.updateVector3("vSphericalL22",t.l22)}else i.updateFloat3("vSphericalX",e.x.x,e.x.y,e.x.z),i.updateFloat3("vSphericalY",e.y.x,e.y.y,e.y.z),i.updateFloat3("vSphericalZ",e.z.x,e.z.y,e.z.z),i.updateFloat3("vSphericalXX_ZZ",e.xx.x-e.zz.x,e.xx.y-e.zz.y,e.xx.z-e.zz.z),i.updateFloat3("vSphericalYY_ZZ",e.yy.x-e.zz.x,e.yy.y-e.zz.y,e.yy.z-e.zz.z),i.updateFloat3("vSphericalZZ",e.zz.x,e.zz.y,e.zz.z),i.updateFloat3("vSphericalXY",e.xy.x,e.xy.y,e.xy.z),i.updateFloat3("vSphericalYZ",e.yz.x,e.yz.y,e.yz.z),i.updateFloat3("vSphericalZX",e.zx.x,e.zx.y,e.zx.z)}else o&&t.USEIRRADIANCEMAP&&t.USE_IRRADIANCE_DOMINANT_DIRECTION&&s.irradianceTexture&&i.updateVector3("vReflectionDominantDirection",s.irradianceTexture._dominantDirection);a&&i.updateFloat3("vReflectionMicrosurfaceInfos",s.getSize().width,s.lodGenerationScale,s.lodGenerationOffset)}c&&i.updateColor3("vReflectionColor",r)},"BindLights",0,function(e,t,i,r,s=4){let n=Math.min(t.lightSources.length,s);for(let s=0;s<n;s++)!function(e,t,i,r,s,n=!0){e._bindLight(t,i,r,s,n)}(t.lightSources[s],s,e,i,"boolean"==typeof r?r:r.SPECULARTERM,t.receiveShadows)},"BindLogDepth",0,function(e,t,i){if(!e||e.LOGARITHMICDEPTH||e.indexOf&&e.indexOf("LOGARITHMICDEPTH")>=0){let e=i.activeCamera;1===e.mode&&P.Logger.Error("Logarithmic depth is not compatible with orthographic cameras!",20),t.setFloat("logarithmicDepthConstant",2/(Math.log(e.maxZ+1)/Math.LN2))}},"BindMorphTargetParameters",0,function(e,t){let i=e.morphTargetManager;e&&i&&t.setFloatArray("morphTargetInfluences",i.influences)},"BindSceneUniformBuffer",0,H,"BindTextureMatrix",0,function(e,t,i){let r=e.getTextureMatrix();t.updateMatrix(i+"Matrix",r)},"HandleFallbacksForShadows",0,function(e,t,i=4,r=0){let s=0;for(let n=0;n<i&&e["LIGHT"+n];n++)n>0&&(s=r+n,t.addFallback(s,"LIGHT"+n)),!e.SHADOWS&&(e["SHADOW"+n]&&t.addFallback(r,"SHADOW"+n),e["SHADOWPCF"+n]&&t.addFallback(r,"SHADOWPCF"+n),e["SHADOWPCSS"+n]&&t.addFallback(r,"SHADOWPCSS"+n),e["SHADOWPOISSON"+n]&&t.addFallback(r,"SHADOWPOISSON"+n),e["SHADOWESM"+n]&&t.addFallback(r,"SHADOWESM"+n),e["SHADOWCLOSEESM"+n]&&t.addFallback(r,"SHADOWCLOSEESM"+n));return s},"PrepareAttributesForBakedVertexAnimation",0,function(e,t,i){i.BAKED_VERTEX_ANIMATION_TEXTURE&&i.INSTANCES&&e.push("bakedVertexAnimationSettingsInstanced")},"PrepareAttributesForBones",0,function(e,t,i,r){i.NUM_BONE_INFLUENCERS>0&&(r.addCPUSkinningFallback(0,t),e.push("matricesIndices"),e.push("matricesWeights"),i.NUM_BONE_INFLUENCERS>4&&(e.push("matricesIndicesExtra"),e.push("matricesWeightsExtra")))},"PrepareAttributesForInstances",0,function(e,t){(t.INSTANCES||t.THIN_INSTANCES)&&U(e,!!t.PREPASS_VELOCITY),t.INSTANCESCOLOR&&e.push("instanceColor")},"PrepareAttributesForMorphTargets",0,k,"PrepareDefinesAndAttributesForMorphTargets",0,function(e,t,i,r,s,n,a,l,o,h){let c=e.numMaxInfluencers||e.numInfluencers;return c<=0?0:(t.push("#define MORPHTARGETS"),e.hasPositions&&t.push("#define MORPHTARGETTEXTURE_HASPOSITIONS"),e.hasNormals&&t.push("#define MORPHTARGETTEXTURE_HASNORMALS"),e.hasTangents&&t.push("#define MORPHTARGETTEXTURE_HASTANGENTS"),e.hasUVs&&t.push("#define MORPHTARGETTEXTURE_HASUVS"),e.hasUV2s&&t.push("#define MORPHTARGETTEXTURE_HASUV2S"),e.hasColors&&t.push("#define MORPHTARGETTEXTURE_HASCOLORS"),e.supportsPositions&&s&&t.push("#define MORPHTARGETS_POSITION"),e.supportsNormals&&n&&t.push("#define MORPHTARGETS_NORMAL"),e.supportsTangents&&a&&t.push("#define MORPHTARGETS_TANGENT"),e.supportsUVs&&l&&t.push("#define MORPHTARGETS_UV"),e.supportsUV2s&&o&&t.push("#define MORPHTARGETS_UV2"),e.supportsColors&&h&&t.push("#define MORPHTARGETS_COLOR"),t.push("#define NUM_MORPH_INFLUENCERS "+c),e.isUsingTextureForTargets&&t.push("#define MORPHTARGETS_TEXTURE"),B.NUM_MORPH_INFLUENCERS=c,B.NORMAL=n,B.TANGENT=a,B.UV=l,B.UV2=o,B.COLOR=h,k(i,r,B,s),c)},"PrepareDefinesForAttributes",0,function(e,t,i,r,s=!1,n=!0,a=!0){let l,o;if(!t._areAttributesDirty&&t._needNormals===t._normals&&t._needUVs===t._uvs)return!1;t._normals=t._needNormals,t._uvs=t._needUVs,t.NORMAL=t._needNormals&&e.isVerticesDataPresent("normal"),t._needNormals&&e.isVerticesDataPresent("tangent")&&(t.TANGENT=!0);for(let i=1;i<=6;++i)t["UV"+i]=!!t._needUVs&&e.isVerticesDataPresent(`uv${1===i?"":i}`);if(i){let i=e.useVertexColors&&e.isVerticesDataPresent("color");t.VERTEXCOLOR=i,t.VERTEXALPHA=e.hasVertexAlpha&&i&&n}return e.isVerticesDataPresent("instanceColor")&&(e.hasInstances||e.hasThinInstances)&&(t.INSTANCESCOLOR=!0),r&&function(e,t){if(e.useBones&&e.computeBonesUsingShaders&&e.skeleton){t.NUM_BONE_INFLUENCERS=e.numBoneInfluencers;let i=void 0!==t.BONETEXTURE;if(e.skeleton.isUsingTextureForMatrices&&i)t.BONETEXTURE=!0;else{t.BonesPerMesh=e.skeleton.bones.length+1,t.BONETEXTURE=!i&&void 0;let r=e.getScene(),s=r.prePassRenderer;s&&s.enabled&&(t.BONES_VELOCITY_ENABLED=-1===s.excludedSkinnedMesh.indexOf(e));let n=!0===t.MULTIVIEW,a=2*t.BonesPerMesh+ +!!n;if(V.get(e.skeleton)!==a){V.set(e.skeleton,a);let i=r.getEngine().getCaps().maxVertexUniformVectors;if(i&&!W.has(e.skeleton)){let r=4*t.BonesPerMesh,s=Math.max(i-(n?64:40),0);(r>s||n&&3*r>i)&&(W.add(e.skeleton),P.Logger.Warn(`Skeleton "${e.skeleton.name}": ${e.skeleton.bones.length} bones stored as vertex uniforms use ${r} of ~${s} usable uniform vectors${n?" (multiview)":""} on a device reporting ${i}. This can exceed the GPU vertex-uniform limit and make the mesh silently fail to render. Set skeleton.useTextureToStoreBoneMatrices = true to store bone matrices in a texture.`))}}}}else t.NUM_BONE_INFLUENCERS=0,t.BonesPerMesh=0,void 0!==t.BONETEXTURE&&(t.BONETEXTURE=!1)}(e,t),s&&((l=e.morphTargetManager)?(t.MORPHTARGETS_UV=l.supportsUVs&&t.UV1,t.MORPHTARGETS_UV2=l.supportsUV2s&&t.UV2,t.MORPHTARGETS_TANGENT=l.supportsTangents&&t.TANGENT,t.MORPHTARGETS_NORMAL=l.supportsNormals&&t.NORMAL,t.MORPHTARGETS_POSITION=l.supportsPositions,t.MORPHTARGETS_COLOR=l.supportsColors,t.MORPHTARGETTEXTURE_HASUVS=l.hasUVs,t.MORPHTARGETTEXTURE_HASUV2S=l.hasUV2s,t.MORPHTARGETTEXTURE_HASTANGENTS=l.hasTangents,t.MORPHTARGETTEXTURE_HASNORMALS=l.hasNormals,t.MORPHTARGETTEXTURE_HASPOSITIONS=l.hasPositions,t.MORPHTARGETTEXTURE_HASCOLORS=l.hasColors,t.NUM_MORPH_INFLUENCERS=l.numMaxInfluencers||l.numInfluencers,t.MORPHTARGETS=t.NUM_MORPH_INFLUENCERS>0,t.MORPHTARGETS_TEXTURE=l.isUsingTextureForTargets):(t.MORPHTARGETS_UV=!1,t.MORPHTARGETS_UV2=!1,t.MORPHTARGETS_TANGENT=!1,t.MORPHTARGETS_NORMAL=!1,t.MORPHTARGETS_POSITION=!1,t.MORPHTARGETS_COLOR=!1,t.MORPHTARGETTEXTURE_HASUVS=!1,t.MORPHTARGETTEXTURE_HASUV2S=!1,t.MORPHTARGETTEXTURE_HASTANGENTS=!1,t.MORPHTARGETTEXTURE_HASNORMALS=!1,t.MORPHTARGETTEXTURE_HASPOSITIONS=!1,t.MORPHTARGETTEXTURE_HAS_COLORS=!1,t.MORPHTARGETS=!1,t.NUM_MORPH_INFLUENCERS=0)),a&&(t.BAKED_VERTEX_ANIMATION_TEXTURE=!!(o=e.bakedVertexAnimationManager)&&!!o.isEnabled),!0},"PrepareDefinesForFrameBoundValues",0,function(e,t,i,r,s,n=null,a=!1){let l=function(e,t){let i=!1;if(e.activeCamera){let r=+!!t.CAMERA_ORTHOGRAPHIC,s=+!!t.CAMERA_PERSPECTIVE,n=+(1===e.activeCamera.mode),a=+(0===e.activeCamera.mode);(r^n||s^a)&&(t.CAMERA_ORTHOGRAPHIC=1===n,t.CAMERA_PERSPECTIVE=1===a,i=!0)}return i}(e,r);!1!==n&&(l=y(i,e,r)),!t.getColorWrite()!==r.DEPTHPREPASS&&(r.DEPTHPREPASS=!r.DEPTHPREPASS,l=!0),r.INSTANCES!==s&&(r.INSTANCES=s,l=!0),r.THIN_INSTANCES!==a&&(r.THIN_INSTANCES=a,l=!0),l&&r.markAsUnprocessed()},"PrepareDefinesForIBL",0,function(e,t,i,r=!1,s=8,n=!1){if(t&&N.ReflectionTextureEnabled){if(!t.isReadyOrNotBlocking())return!1;i._needNormals=!0,i.REFLECTION=!0,i.GAMMAREFLECTION=t.gammaSpace,i.RGBDREFLECTION=t.isRGBD,i.LODINREFLECTIONALPHA=t.lodLevelInAlpha,i.LINEARSPECULARREFLECTION=t.linearSpecularLOD,i.USEIRRADIANCEMAP=!1,i.LODBASEDMICROSFURACE=e.getEngine().getCaps().textureLOD;let a=e.getEngine();switch(r&&s>0?(i.NUM_SAMPLES=""+s,a._features.needTypeSuffixInShaderConstants&&(i.NUM_SAMPLES=i.NUM_SAMPLES+"u"),i.REALTIME_FILTERING=!0,e.iblCdfGenerator&&(i.IBL_CDF_FILTERING=!0)):i.REALTIME_FILTERING=!1,i.INVERTCUBICMAP=6===t.coordinatesMode,i.REFLECTIONMAP_3D=t.isCube,i.REFLECTIONMAP_OPPOSITEZ=i.REFLECTIONMAP_3D&&e.useRightHandedSystem?!t.invertZ:t.invertZ,i.REFLECTIONMAP_CUBIC=!1,i.REFLECTIONMAP_EXPLICIT=!1,i.REFLECTIONMAP_PLANAR=!1,i.REFLECTIONMAP_PROJECTION=!1,i.REFLECTIONMAP_SKYBOX=!1,i.REFLECTIONMAP_SPHERICAL=!1,i.REFLECTIONMAP_EQUIRECTANGULAR=!1,i.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,i.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,t.coordinatesMode){case 0:i.REFLECTIONMAP_EXPLICIT=!0;break;case 2:i.REFLECTIONMAP_PLANAR=!0;break;case 4:i.REFLECTIONMAP_PROJECTION=!0;break;case 5:i.REFLECTIONMAP_SKYBOX=!0;break;case 1:i.REFLECTIONMAP_SPHERICAL=!0;break;case 7:i.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case 8:i.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case 9:i.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;default:i.REFLECTIONMAP_CUBIC=!0,i.USE_LOCAL_REFLECTIONMAP_CUBIC=!!t.boundingBoxSize}5!==t.coordinatesMode&&(t.irradianceTexture?(i.USEIRRADIANCEMAP=!0,i.USESPHERICALFROMREFLECTIONMAP=!1,i.USESPHERICALINVERTEX=!1,t.irradianceTexture._dominantDirection?i.USE_IRRADIANCE_DOMINANT_DIRECTION=!0:i.USE_IRRADIANCE_DOMINANT_DIRECTION=!1):t.isCube&&(i.USESPHERICALFROMREFLECTIONMAP=!0,i.USEIRRADIANCEMAP=!1,i.USE_IRRADIANCE_DOMINANT_DIRECTION=!1,i.USESPHERICALINVERTEX=n))}else i.REFLECTION=!1,i.REFLECTIONMAP_3D=!1,i.REFLECTIONMAP_SPHERICAL=!1,i.REFLECTIONMAP_PLANAR=!1,i.REFLECTIONMAP_CUBIC=!1,i.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,i.REFLECTIONMAP_PROJECTION=!1,i.REFLECTIONMAP_SKYBOX=!1,i.REFLECTIONMAP_EXPLICIT=!1,i.REFLECTIONMAP_EQUIRECTANGULAR=!1,i.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,i.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,i.INVERTCUBICMAP=!1,i.USESPHERICALFROMREFLECTIONMAP=!1,i.USEIRRADIANCEMAP=!1,i.USE_IRRADIANCE_DOMINANT_DIRECTION=!1,i.USESPHERICALINVERTEX=!1,i.REFLECTIONMAP_OPPOSITEZ=!1,i.LODINREFLECTIONALPHA=!1,i.GAMMAREFLECTION=!1,i.RGBDREFLECTION=!1,i.LINEARSPECULARREFLECTION=!1;return!0},"PrepareDefinesForLights",0,function(e,t,i,r,s=4,n=!1){if(!i._areLightsDirty)return i._needNormals;let a=0,l={needNormals:i._needNormals,needRebuild:!1,lightmapMode:!1,shadowEnabled:!1,specularEnabled:!1};if(e.lightsEnabled&&!n){for(let n of t.lightSources)if(function(e,t,i,r,s,n,a){switch(a.needNormals=!0,void 0===s["LIGHT"+r]&&(a.needRebuild=!0),s["LIGHT"+r]=!0,s["SPOTLIGHT"+r]=!1,s["HEMILIGHT"+r]=!1,s["POINTLIGHT"+r]=!1,s["DIRLIGHT"+r]=!1,s["AREALIGHT"+r]=!1,s["CLUSTLIGHT"+r]=!1,i.prepareLightSpecificDefines(s,r),s["LIGHT_FALLOFF_PHYSICAL"+r]=!1,s["LIGHT_FALLOFF_GLTF"+r]=!1,s["LIGHT_FALLOFF_STANDARD"+r]=!1,i.falloffType){case D.LightConstants.FALLOFF_GLTF:s["LIGHT_FALLOFF_GLTF"+r]=!0;break;case D.LightConstants.FALLOFF_PHYSICAL:s["LIGHT_FALLOFF_PHYSICAL"+r]=!0;break;case D.LightConstants.FALLOFF_STANDARD:s["LIGHT_FALLOFF_STANDARD"+r]=!0}if(n&&!i.specular.equalsFloats(0,0,0)&&(a.specularEnabled=!0),s["SHADOW"+r]=!1,s["SHADOWCSM"+r]=!1,s["SHADOWCSMDEBUG"+r]=!1,s["SHADOWCSMNUM_CASCADES"+r]=!1,s["SHADOWCSMUSESHADOWMAXZ"+r]=!1,s["SHADOWCSMNOBLEND"+r]=!1,s["SHADOWCSM_RIGHTHANDED"+r]=!1,s["SHADOWPCF"+r]=!1,s["SHADOWPCSS"+r]=!1,s["SHADOWPOISSON"+r]=!1,s["SHADOWESM"+r]=!1,s["SHADOWCLOSEESM"+r]=!1,s["SHADOWCUBE"+r]=!1,s["SHADOWLOWQUALITY"+r]=!1,s["SHADOWMEDIUMQUALITY"+r]=!1,t&&t.receiveShadows&&e.shadowsEnabled&&i.shadowEnabled){let t=i.getShadowGenerator(e.activeCamera)??i.getShadowGenerator();if(t){let e=t.getShadowMap();e&&e.renderList&&e.renderList.length>0&&(a.shadowEnabled=!0,t.prepareDefines(s,r))}}i.lightmapMode!=D.LightConstants.LIGHTMAP_DEFAULT?(a.lightmapMode=!0,s["LIGHTMAPEXCLUDED"+r]=!0,s["LIGHTMAPNOSPECULAR"+r]=i.lightmapMode==D.LightConstants.LIGHTMAP_SHADOWSONLY):(s["LIGHTMAPEXCLUDED"+r]=!1,s["LIGHTMAPNOSPECULAR"+r]=!1)}(e,t,n,a,i,r,l),++a===s)break}i.SPECULARTERM=l.specularEnabled,i.SHADOWS=l.shadowEnabled;let o=Math.max(s,i.MAXLIGHTCOUNT||0);for(let e=a;e<o;e++)void 0!==i["LIGHT"+e]&&(i["LIGHT"+e]=!1,i["HEMILIGHT"+e]=!1,i["POINTLIGHT"+e]=!1,i["DIRLIGHT"+e]=!1,i["SPOTLIGHT"+e]=!1,i["AREALIGHT"+e]=!1,i["CLUSTLIGHT"+e]=!1,i["SHADOW"+e]=!1,i["SHADOWCSM"+e]=!1,i["SHADOWCSMDEBUG"+e]=!1,i["SHADOWCSMNUM_CASCADES"+e]=!1,i["SHADOWCSMUSESHADOWMAXZ"+e]=!1,i["SHADOWCSMNOBLEND"+e]=!1,i["SHADOWCSM_RIGHTHANDED"+e]=!1,i["SHADOWPCF"+e]=!1,i["SHADOWPCSS"+e]=!1,i["SHADOWPOISSON"+e]=!1,i["SHADOWESM"+e]=!1,i["SHADOWCLOSEESM"+e]=!1,i["SHADOWCUBE"+e]=!1,i["SHADOWLOWQUALITY"+e]=!1,i["SHADOWMEDIUMQUALITY"+e]=!1);i.LIGHTCOUNT=a,i.MAXLIGHTCOUNT=s;let h=e.getEngine().getCaps();return void 0===i.SHADOWFLOAT&&(l.needRebuild=!0),i.SHADOWFLOAT=l.shadowEnabled&&(h.textureFloatRender&&h.textureFloatLinearFiltering||h.textureHalfFloatRender&&h.textureHalfFloatLinearFiltering),i.LIGHTMAPEXCLUDED=l.lightmapMode,l.needRebuild&&i.rebuild(),l.needNormals},"PrepareDefinesForMergedUV",0,function(e,t,i){t._needUVs=!0,t[i]=!0,e.optimizeUVAllocation&&e.getTextureMatrix().isIdentityAs3x2()?(t[i+"DIRECTUV"]=e.coordinatesIndex+1,t["MAINUV"+(e.coordinatesIndex+1)]=!0):t[i+"DIRECTUV"]=0},"PrepareDefinesForMisc",0,function(e,t,i,r,s,n,a,l=!1,o=!1,h,c){if(a._areMiscDirty){a.LOGARITHMICDEPTH=i,a.POINTSIZE=r,a.FOG=s&&t.fogEnabled&&e.applyFog&&0!==t.fogMode,a.NONUNIFORMSCALING=e.nonUniformScaling,a.ALPHATEST=n,a.DECAL_AFTER_DETAIL=l,a.USE_VERTEX_PULLING=o,a.RIGHT_HANDED=t.useRightHandedSystem;let u=h?.geometry?.getIndexBuffer(),d=!!h&&h.isUnIndexed;a.VERTEX_PULLING_USE_INDEX_BUFFER=!!u&&!d,a.VERTEX_PULLING_INDEX_BUFFER_32BITS=!!u&&!d&&u.is32Bits,a.VERTEXOUTPUT_INVARIANT=!!c}},"PrepareDefinesForMultiview",0,function(e,t){if(e.activeCamera){let i=t.MULTIVIEW;t.MULTIVIEW=null!==e.activeCamera.outputRenderTarget&&e.activeCamera.outputRenderTarget.getViewCount()>1,t.MULTIVIEW!=i&&t.markAsUnprocessed()}},"PrepareDefinesForOIT",0,function(e,t,i){let r=t.ORDER_INDEPENDENT_TRANSPARENCY,s=t.ORDER_INDEPENDENT_TRANSPARENCY_16BITS;t.ORDER_INDEPENDENT_TRANSPARENCY=e.useOrderIndependentTransparency&&i,t.ORDER_INDEPENDENT_TRANSPARENCY_16BITS=!e.getEngine().getCaps().textureFloatLinearFiltering,(r!==t.ORDER_INDEPENDENT_TRANSPARENCY||s!==t.ORDER_INDEPENDENT_TRANSPARENCY_16BITS)&&t.markAsUnprocessed()},"PrepareDefinesForPrePass",0,function(e,t,i){let r=t.PREPASS;if(!t._arePrePassDirty)return;let s=[{type:1,define:"PREPASS_POSITION",index:"PREPASS_POSITION_INDEX"},{type:9,define:"PREPASS_LOCAL_POSITION",index:"PREPASS_LOCAL_POSITION_INDEX"},{type:2,define:"PREPASS_VELOCITY",index:"PREPASS_VELOCITY_INDEX"},{type:11,define:"PREPASS_VELOCITY_LINEAR",index:"PREPASS_VELOCITY_LINEAR_INDEX"},{type:3,define:"PREPASS_REFLECTIVITY",index:"PREPASS_REFLECTIVITY_INDEX"},{type:0,define:"PREPASS_IRRADIANCE_LEGACY",index:"PREPASS_IRRADIANCE_LEGACY_INDEX"},{type:7,define:"PREPASS_ALBEDO_SQRT",index:"PREPASS_ALBEDO_SQRT_INDEX"},{type:5,define:"PREPASS_DEPTH",index:"PREPASS_DEPTH_INDEX"},{type:10,define:"PREPASS_SCREENSPACE_DEPTH",index:"PREPASS_SCREENSPACE_DEPTH_INDEX"},{type:6,define:"PREPASS_NORMAL",index:"PREPASS_NORMAL_INDEX"},{type:8,define:"PREPASS_WORLD_NORMAL",index:"PREPASS_WORLD_NORMAL_INDEX"},{type:14,define:"PREPASS_IRRADIANCE",index:"PREPASS_IRRADIANCE_INDEX"}];if(e.prePassRenderer&&e.prePassRenderer.enabled&&i){t.PREPASS=!0,t.SCENE_MRT_COUNT=e.prePassRenderer.mrtCount,t.PREPASS_NORMAL_WORLDSPACE=e.prePassRenderer.generateNormalsInWorldSpace,t.PREPASS_COLOR=!0,t.PREPASS_COLOR_INDEX=0;for(let i=0;i<s.length;i++){let r=e.prePassRenderer.getIndex(s[i].type);-1!==r?(t[s[i].define]=!0,t[s[i].index]=r):t[s[i].define]=!1}}else{t.PREPASS=!1;for(let e=0;e<s.length;e++)t[s[e].define]=!1}t.PREPASS!=r&&(t.markAsUnprocessed(),t.markAsImageProcessingDirty())},"PrepareUniformLayoutForIBL",0,function(e,t=!1,i=!1,r=!1,s=!1,n=!1){e.addUniform("vReflectionInfos",2),e.addUniform("reflectionMatrix",16),t&&e.addUniform("vReflectionMicrosurfaceInfos",3),i&&(e.addUniform("vReflectionPosition",3),e.addUniform("vReflectionSize",3)),r&&(e.addUniform("vReflectionFilteringInfo",2),e.addUniform("vReflectionDominantDirection",3)),n&&e.addUniform("vReflectionColor",3),s&&(e.addUniform("vSphericalL00",3),e.addUniform("vSphericalL1_1",3),e.addUniform("vSphericalL10",3),e.addUniform("vSphericalL11",3),e.addUniform("vSphericalL2_2",3),e.addUniform("vSphericalL2_1",3),e.addUniform("vSphericalL20",3),e.addUniform("vSphericalL21",3),e.addUniform("vSphericalL22",3),e.addUniform("vSphericalX",3),e.addUniform("vSphericalY",3),e.addUniform("vSphericalZ",3),e.addUniform("vSphericalXX_ZZ",3),e.addUniform("vSphericalYY_ZZ",3),e.addUniform("vSphericalZZ",3),e.addUniform("vSphericalXY",3),e.addUniform("vSphericalYZ",3),e.addUniform("vSphericalZX",3))},"PrepareUniformsAndSamplersForIBL",0,function(e,t,i){let r=["vReflectionMicrosurfaceInfos","vReflectionDominantDirection","reflectionMatrix","vReflectionInfos","vReflectionPosition","vReflectionSize","vReflectionColor","vReflectionFilteringInfo"];i&&r.push("vSphericalX","vSphericalY","vSphericalZ","vSphericalXX_ZZ","vSphericalYY_ZZ","vSphericalZZ","vSphericalXY","vSphericalYZ","vSphericalZX","vSphericalL00","vSphericalL1_1","vSphericalL10","vSphericalL11","vSphericalL2_2","vSphericalL2_1","vSphericalL20","vSphericalL21","vSphericalL22"),e.push(...r),t.push("reflectionSampler","reflectionSamplerLow","reflectionSamplerHigh","irradianceSampler","icdfSampler")},"PrepareUniformsAndSamplersList",0,function(e,t,i,r=4){let s,n,a=null;e.uniformsNames?(s=e.uniformsNames,n=e.uniformBuffersNames,t=e.samplers,i=e.defines,r=e.maxSimultaneousLights||0,a=e.shaderLanguage??null):(s=e,t||(t=[]));for(let e=0;e<r&&i["LIGHT"+e];e++)!function(e,t,i,r,s=null,n=!1,a=!1,l=!1,o=!1,h=!1){s&&s.push("Light"+e),!n&&(t.push("vLightData"+e,"vLightDiffuse"+e,"vLightSpecular"+e,"vLightDirection"+e,"vLightWidth"+e,"vLightHeight"+e,"vLightFalloff"+e,"vLightGround"+e,"vSliceData"+e,"vSliceRanges"+e,"lightMatrix"+e,"shadowsInfo"+e,"depthValues"+e),i.push("shadowTexture"+e),i.push("depthTexture"+e),t.push("viewFrustumZ"+e,"cascadeBlendFactor"+e,"lightSizeUVCorrection"+e,"depthCorrection"+e,"penumbraDarkness"+e,"frustumLengths"+e),r&&(i.push("projectionLightTexture"+e),t.push("textureProjectionMatrix"+e)),a&&i.push("iesLightTexture"+e),o&&i.push("rectAreaLightEmissionTexture"+e),l&&(i.push("lightDataTexture"+e),h||i.push("tileMaskTexture"+e)))}(e,s,t,i["PROJECTEDLIGHTTEXTURE"+e],n,!1,i["IESLIGHTTEXTURE"+e],i["CLUSTLIGHT"+e],i["RECTAREALIGHTEMISSIONTEXTURE"+e],1===a);i.NUM_MORPH_INFLUENCERS&&(s.push("morphTargetInfluences"),s.push("morphTargetCount")),i.BAKED_VERTEX_ANIMATION_TEXTURE&&(s.push("bakedVertexAnimationSettings"),s.push("bakedVertexAnimationTextureSizeInverted"),s.push("bakedVertexAnimationTime"),t.push("bakedVertexAnimationTexture"))},"PushAttributesForInstances",0,U],97001);var w=e.i(18064);class G{get useVertexPulling(){return this._useVertexPulling}set useVertexPulling(e){this._useVertexPulling!==e&&(this._useVertexPulling=e,this.markAsDirty(G.MiscDirtyFlag))}get _supportGlowLayer(){return!1}set _glowModeEnabled(e){}get shaderLanguage(){return this._shaderLanguage}get canRenderToMRT(){return!1}set alpha(e){if(this._alpha===e)return;let t=this._alpha;this._alpha=e,(1===t||1===e)&&this.markAsDirty(G.MiscDirtyFlag+G.PrePassDirtyFlag)}get alpha(){return this._alpha}set backFaceCulling(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,this.markAsDirty(G.TextureDirtyFlag))}get backFaceCulling(){return this._backFaceCulling}set textureRepetitionMode(e){let t=Math.max(0,Math.min(0|e,4));this._textureRepetitionMode!==t&&(this._textureRepetitionMode=t,this.markAsDirty(G.TextureDirtyFlag))}get textureRepetitionMode(){return this._textureRepetitionMode}set cullBackFaces(e){this._cullBackFaces!==e&&(this._cullBackFaces=e,this.markAsDirty(G.TextureDirtyFlag))}get cullBackFaces(){return this._cullBackFaces}get blockDirtyMechanism(){return this._blockDirtyMechanism}set blockDirtyMechanism(e){this._blockDirtyMechanism!==e&&(this._blockDirtyMechanism=e,e||this.markDirty())}atomicMaterialsUpdate(e){this.blockDirtyMechanism=!0;try{e(this)}finally{this.blockDirtyMechanism=!1}}get hasRenderTargetTextures(){return this._eventInfo.hasRenderTargetTextures=!1,this._callbackPluginEventHasRenderTargetTextures(this._eventInfo),this._eventInfo.hasRenderTargetTextures}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}get onBindObservable(){return this._onBindObservable||(this._onBindObservable=new n.Observable),this._onBindObservable}set onBind(e){this._onBindObserver&&this.onBindObservable.remove(this._onBindObserver),this._onBindObserver=this.onBindObservable.add(e)}get onUnBindObservable(){return this._onUnBindObservable||(this._onUnBindObservable=new n.Observable),this._onUnBindObservable}get onEffectCreatedObservable(){return this._onEffectCreatedObservable||(this._onEffectCreatedObservable=new n.Observable),this._onEffectCreatedObservable}set alphaMode(e){this._alphaMode[0]!==e&&(this._alphaMode[0]=e,this.markAsDirty(G.TextureDirtyFlag))}get alphaMode(){return this._alphaMode[0]}get alphaModes(){return this._alphaMode}setAlphaMode(e,t=0){this._alphaMode[t]!==e&&(this._alphaMode[t]=e,this.markAsDirty(G.TextureDirtyFlag))}set needDepthPrePass(e){this._needDepthPrePass!==e&&(this._needDepthPrePass=e,this._needDepthPrePass&&(this.checkReadyOnEveryCall=!0))}get needDepthPrePass(){return this._needDepthPrePass}get isPrePassCapable(){return!1}set fogEnabled(e){this._fogEnabled!==e&&(this._fogEnabled=e,this.markAsDirty(G.MiscDirtyFlag))}get fogEnabled(){return this._fogEnabled}get wireframe(){switch(this._fillMode){case G.WireFrameFillMode:case G.LineListDrawMode:case G.LineLoopDrawMode:case G.LineStripDrawMode:return!0}return this._scene.forceWireframe}set wireframe(e){this.fillMode=e?G.WireFrameFillMode:G.TriangleFillMode}get pointsCloud(){switch(this._fillMode){case G.PointFillMode:case G.PointListDrawMode:return!0}return this._scene.forcePointsCloud}set pointsCloud(e){this.fillMode=e?G.PointFillMode:G.TriangleFillMode}get fillMode(){return this._fillMode}set fillMode(e){this._fillMode!==e&&(this._fillMode=e,this.markAsDirty(G.MiscDirtyFlag))}get useLogarithmicDepth(){return this._useLogarithmicDepth}set useLogarithmicDepth(e){let t=this.getScene().getEngine().getCaps().fragmentDepthSupported;e&&!t&&P.Logger.Warn("Logarithmic depth has been requested for a material on a device that doesn't support it."),this._useLogarithmicDepth=e&&t,this._markAllSubMeshesAsMiscDirty()}get isVertexOutputInvariant(){return this._isVertexOutputInvariant}set isVertexOutputInvariant(e){this._isVertexOutputInvariant!==e&&(this._isVertexOutputInvariant=e,this._markAllSubMeshesAsMiscDirty())}_getDrawWrapper(){return this._drawWrapper}_setDrawWrapper(e){this._drawWrapper=e}constructor(e,t,i,r=!1){this.shadowDepthWrapper=null,this.allowShaderHotSwapping=!0,this._shaderLanguage=0,this._forceGLSL=!1,this._useVertexPulling=!1,this.metadata=null,this.reservedDataStore=null,this.checkReadyOnEveryCall=!1,this.checkReadyOnlyOnce=!1,this.state="",this._alpha=1,this._backFaceCulling=!0,this._textureRepetitionMode=0,this.textureRepetitionHexTilingParams=[1,.6,7,.5],this._cullBackFaces=!0,this._blockDirtyMechanism=!1,this.sideOrientation=null,this.onCompiled=null,this.onError=null,this.getRenderTargetTextures=null,this.doNotSerialize=!1,this._storeEffectOnSubMeshes=!1,this.animations=null,this.onDisposeObservable=new n.Observable,this._onDisposeObserver=null,this._onUnBindObservable=null,this._onBindObserver=null,this._alphaMode=[2],this._needDepthPrePass=!1,this.disableDepthWrite=!1,this.disableColorWrite=!1,this.forceDepthWrite=!1,this.depthFunction=0,this.separateCullingPass=!1,this._fogEnabled=!0,this.pointSize=1,this.zOffset=0,this.zOffsetUnits=0,this.stencil=new x,this._isVertexOutputInvariant=G.ForceVertexOutputInvariant,this._useUBO=!1,this._fillMode=G.TriangleFillMode,this._cachedDepthWriteState=!1,this._cachedColorWriteState=!1,this._cachedDepthFunctionState=0,this._indexInSceneMaterialArray=-1,this.meshMap=null,this._parentContainer=null,this._uniformBufferLayoutBuilt=!1,this._eventInfo={},this._callbackPluginEventGeneric=()=>void 0,this._callbackPluginEventIsReadyForSubMesh=()=>void 0,this._callbackPluginEventPrepareDefines=()=>void 0,this._callbackPluginEventPrepareDefinesBeforeAttributes=()=>void 0,this._callbackPluginEventHardBindForSubMesh=()=>void 0,this._callbackPluginEventBindForSubMesh=()=>void 0,this._callbackPluginEventHasRenderTargetTextures=()=>void 0,this._callbackPluginEventFillRenderTargetTextures=()=>void 0,this._transparencyMode=null,this.name=e;const l=t||a.EngineStore.LastCreatedScene;if(!l)return;this._scene=l,this._dirtyCallbacks={},this._forceGLSL=r,this._dirtyCallbacks[1]=this._markAllSubMeshesAsTexturesDirty.bind(this),this._dirtyCallbacks[2]=this._markAllSubMeshesAsLightsDirty.bind(this),this._dirtyCallbacks[4]=this._markAllSubMeshesAsFresnelDirty.bind(this),this._dirtyCallbacks[8]=this._markAllSubMeshesAsAttributesDirty.bind(this),this._dirtyCallbacks[16]=this._markAllSubMeshesAsMiscDirty.bind(this),this._dirtyCallbacks[32]=this._markAllSubMeshesAsPrePassDirty.bind(this),this._dirtyCallbacks[127]=this._markAllSubMeshesAsAllDirty.bind(this),this.id=e||s.Tools.RandomId(),this.uniqueId=this._scene.getUniqueId(),this._materialContext=this._scene.getEngine().createMaterialContext(),this._drawWrapper=new M.DrawWrapper(this._scene.getEngine(),!1),this._drawWrapper.materialContext=this._materialContext,this._uniformBuffer=new I.UniformBuffer(this._scene.getEngine(),void 0,void 0,e),this._useUBO=this.getScene().getEngine().supportsUniformBuffers,this._createUniformBuffer(),i||this._scene.addMaterial(this),this._scene.useMaterialMeshMap&&(this.meshMap={}),G.OnEventObservable.notifyObservers(this,1)}_createUniformBuffer(){let e=this.getScene().getEngine();this._uniformBuffer?.dispose(),e.isWebGPU&&!this._forceGLSL?(this._uniformBuffer=new I.UniformBuffer(e,void 0,void 0,this.name,!0),this._shaderLanguage=1):this._uniformBuffer=new I.UniformBuffer(this._scene.getEngine(),void 0,void 0,this.name),this._uniformBufferLayoutBuilt=!1}toString(e){return"Name: "+this.name}getClassName(){return"Material"}get _isMaterial(){return!0}get isFrozen(){return this.checkReadyOnlyOnce}freeze(){this.markDirty(),this.checkReadyOnlyOnce=!0}unfreeze(){this.markDirty(),this.checkReadyOnlyOnce=!1}isReady(e,t){return!0}isReadyForSubMesh(e,t,i){let r=t.materialDefines;return!!r&&(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=r,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),this._eventInfo.isReadyForSubMesh)}getEffect(){return this._drawWrapper.effect}getScene(){return this._scene}_getEffectiveOrientation(e){return null!==this.sideOrientation?this.sideOrientation:e.sideOrientation}get transparencyMode(){return this._transparencyMode}set transparencyMode(e){this._transparencyMode!==e&&(this._transparencyMode=e,this._markAllSubMeshesAsTexturesAndMiscDirty())}get _hasTransparencyMode(){return null!=this._transparencyMode}get _transparencyModeIsBlend(){return this._transparencyMode===G.MATERIAL_ALPHABLEND||this._transparencyMode===G.MATERIAL_ALPHATESTANDBLEND}get _transparencyModeIsTest(){return this._transparencyMode===G.MATERIAL_ALPHATEST||this._transparencyMode===G.MATERIAL_ALPHATESTANDBLEND}get _disableAlphaBlending(){return this._transparencyMode===G.MATERIAL_OPAQUE||this._transparencyMode===G.MATERIAL_ALPHATEST}needAlphaBlending(){return this._hasTransparencyMode?this._transparencyModeIsBlend:!this._disableAlphaBlending&&this.alpha<1}needAlphaBlendingForMesh(e){return this._hasTransparencyMode?this._transparencyModeIsBlend:e.visibility<1||!this._disableAlphaBlending&&(e.hasVertexAlpha||this.needAlphaBlending())}needAlphaTesting(){return!!this._hasTransparencyMode&&this._transparencyModeIsTest}needAlphaTestingForMesh(e){return this._hasTransparencyMode?this._transparencyModeIsTest:!this.needAlphaBlendingForMesh(e)&&this.needAlphaTesting()}getAlphaTestTexture(){return null}markDirty(e=!1){for(let t of this.getScene().meshes)if(t.subMeshes){for(let i of t.subMeshes)if(i.getMaterial()===this)for(let t of i._drawWrappers)t&&this._materialContext===t.materialContext&&(t._wasPreviouslyReady=!1,t._wasPreviouslyUsingInstances=null,t._forceRebindOnNextCall=e)}e&&this.markAsDirty(G.AllDirtyFlag)}_preBind(e,t=null){let i=this._scene.getEngine(),r=(null==t?this.sideOrientation:t)===G.ClockWiseSideOrientation,s=e||this._getDrawWrapper();return(0,w.IsWrapper)(s)&&s.materialContext&&(s.materialContext.useVertexPulling=this.useVertexPulling),i.enableEffect(s),i.setState(this.backFaceCulling,this.zOffset,!1,r,this._scene._mirroredCameraPosition?!this.cullBackFaces:this.cullBackFaces,this.stencil,this.zOffsetUnits),r}bind(e,t){}buildUniformLayout(){let e=this._uniformBuffer;this._eventInfo.ubo=e,this._callbackPluginEventGeneric(8,this._eventInfo),e.create(),this._uniformBufferLayoutBuilt=!0}bindForSubMesh(e,t,i){let r=i._drawWrapper;this._eventInfo.subMesh=i,this._callbackPluginEventBindForSubMesh(this._eventInfo),r._forceRebindOnNextCall=!1}bindOnlyWorldMatrix(e){}bindView(e){this._useUBO?this._needToBindSceneUbo=!0:e.setMatrix("view",this.getScene().getViewMatrix())}bindViewProjection(e){this._useUBO?this._needToBindSceneUbo=!0:(e.setMatrix("viewProjection",this.getScene().getTransformMatrix()),e.setMatrix("projection",this.getScene().getProjectionMatrix()),e.setMatrix("inverseProjection",this.getScene().getInverseProjectionMatrix()))}bindEyePosition(e,t){this._useUBO?this._needToBindSceneUbo=!0:this._scene.bindEyePosition(e,t)}_afterBind(e,t=null,i){if(this._scene._cachedMaterial=this,this._needToBindSceneUbo&&t&&(this._needToBindSceneUbo=!1,H(t,this.getScene().getSceneUniformBuffer()),this._scene.finalizeSceneUbo()),e?this._scene._cachedVisibility=e.visibility:this._scene._cachedVisibility=1,this._onBindObservable&&e&&this._onBindObservable.notifyObservers(e),this.disableDepthWrite){let e=this._scene.getEngine();this._cachedDepthWriteState=e.getDepthWrite(),e.setDepthWrite(!1)}if(this.disableColorWrite){let e=this._scene.getEngine();this._cachedColorWriteState=e.getColorWrite(),e.setColorWrite(!1)}if(0!==this.depthFunction){let e=this._scene.getEngine();this._cachedDepthFunctionState=e.getDepthFunction()||0,e.setDepthFunction(this.depthFunction)}}unbind(){this._scene.getSceneUniformBuffer().unbindEffect(),this._onUnBindObservable&&this._onUnBindObservable.notifyObservers(this),0!==this.depthFunction&&this._scene.getEngine().setDepthFunction(this._cachedDepthFunctionState),this.disableDepthWrite&&this._scene.getEngine().setDepthWrite(this._cachedDepthWriteState),this.disableColorWrite&&this._scene.getEngine().setColorWrite(this._cachedColorWriteState)}getAnimatables(){return this._eventInfo.animatables=[],this._callbackPluginEventGeneric(256,this._eventInfo),this._eventInfo.animatables}getActiveTextures(){return this._eventInfo.activeTextures=[],this._callbackPluginEventGeneric(512,this._eventInfo),this._eventInfo.activeTextures}hasTexture(e){return this._eventInfo.hasTexture=!1,this._eventInfo.texture=e,this._callbackPluginEventGeneric(1024,this._eventInfo),this._eventInfo.hasTexture}clone(e){return null}_clonePlugins(e,t){let i={};if(this._serializePlugins(i),G._ParsePlugins(i,e,this._scene,t),this.pluginManager)for(let t of this.pluginManager._plugins){let i=e.pluginManager.getPlugin(t.name);i&&t.copyTo(i)}}getBindedMeshes(){if(!this.meshMap)return this._scene.meshes.filter(e=>e.material===this);{let e=[];for(let t in this.meshMap){let i=this.meshMap[t];i&&e.push(i)}return e}}forceCompilation(e,t,i,r){let s={clipPlane:!1,useInstances:!1,...i},n=this.getScene(),a=this.allowShaderHotSwapping;this.allowShaderHotSwapping=!1;let l=()=>{if(!this._scene||!this._scene.getEngine())return;let i=n.clipPlane;if(s.clipPlane&&(n.clipPlane=new R.Plane(0,0,0,1)),this._storeEffectOnSubMeshes){let i=!0,n=null;if(e.subMeshes){let t=new b(0,0,0,0,0,e,void 0,!1,!1);t.materialDefines&&(t.materialDefines._renderId=-1),this.isReadyForSubMesh(e,t,s.useInstances)||(t.effect&&t.effect.getCompilationError()&&t.effect.allFallbacksProcessed()?n=t.effect.getCompilationError():(i=!1,setTimeout(l,16)))}i&&(this.allowShaderHotSwapping=a,n&&r&&r(n),t&&t(this))}else this.isReady()?(this.allowShaderHotSwapping=a,t&&t(this)):setTimeout(l,16);s.clipPlane&&(n.clipPlane=i)};l()}async forceCompilationAsync(e,t){return await new Promise((i,r)=>{this.forceCompilation(e,()=>{i()},t,e=>{r(e)})})}markAsDirty(e){this.getScene().blockMaterialDirtyMechanism||this._blockDirtyMechanism||(G._DirtyCallbackArray.length=0,e&G.ImageProcessingDirtyFlag&&G._DirtyCallbackArray.push(G._ImageProcessingDirtyCallBack),e&G.TextureDirtyFlag&&G._DirtyCallbackArray.push(G._TextureDirtyCallBack),e&G.LightDirtyFlag&&G._DirtyCallbackArray.push(G._LightsDirtyCallBack),e&G.FresnelDirtyFlag&&G._DirtyCallbackArray.push(G._FresnelDirtyCallBack),e&G.AttributesDirtyFlag&&G._DirtyCallbackArray.push(G._AttributeDirtyCallBack),e&G.MiscDirtyFlag&&G._DirtyCallbackArray.push(G._MiscDirtyCallBack),e&G.PrePassDirtyFlag&&G._DirtyCallbackArray.push(G._PrePassDirtyCallBack),G._DirtyCallbackArray.length&&this._markAllSubMeshesAsDirty(G._RunDirtyCallBacks),this.getScene().resetCachedMaterial())}resetDrawCache(){for(let e of this.getScene().meshes)if(e.subMeshes)for(let t of e.subMeshes)t.getMaterial()===this&&t.resetDrawCache()}_markAllSubMeshesAsDirty(e){let t=this.getScene();if(!t.blockMaterialDirtyMechanism&&!this._blockDirtyMechanism){for(let i of t.meshes)if(i.subMeshes){for(let r of i.subMeshes)if((r.getMaterial()||(t._hasDefaultMaterial?t.defaultMaterial:null))===this)for(let t of r._drawWrappers)t&&t.defines&&t.defines.markAllAsDirty&&this._materialContext===t.materialContext&&e(t.defines)}}}_markScenePrePassDirty(){if(this.getScene().blockMaterialDirtyMechanism||this._blockDirtyMechanism)return;let e=this.getScene().enablePrePassRenderer();e&&e.markAsDirty()}_markAllSubMeshesAsAllDirty(){this._markAllSubMeshesAsDirty(G._AllDirtyCallBack)}_markAllSubMeshesAsImageProcessingDirty(){this._markAllSubMeshesAsDirty(G._ImageProcessingDirtyCallBack)}_markAllSubMeshesAsTexturesDirty(){this._markAllSubMeshesAsDirty(G._TextureDirtyCallBack)}_markAllSubMeshesAsFresnelDirty(){this._markAllSubMeshesAsDirty(G._FresnelDirtyCallBack)}_markAllSubMeshesAsFresnelAndMiscDirty(){this._markAllSubMeshesAsDirty(G._FresnelAndMiscDirtyCallBack)}_markAllSubMeshesAsLightsDirty(){this._markAllSubMeshesAsDirty(G._LightsDirtyCallBack)}_markAllSubMeshesAsAttributesDirty(){this._markAllSubMeshesAsDirty(G._AttributeDirtyCallBack)}_markAllSubMeshesAsMiscDirty(){this._markAllSubMeshesAsDirty(G._MiscDirtyCallBack)}_markAllSubMeshesAsPrePassDirty(){this._markAllSubMeshesAsDirty(G._PrePassDirtyCallBack)}_markAllSubMeshesAsTexturesAndMiscDirty(){this._markAllSubMeshesAsDirty(G._TextureAndMiscDirtyCallBack)}_checkScenePerformancePriority(){if(0!==this._scene.performancePriority){this.checkReadyOnlyOnce=!0;let e=this._scene.onScenePerformancePriorityChangedObservable.addOnce(()=>{this.checkReadyOnlyOnce=!1});this.onDisposeObservable.add(()=>{this._scene.onScenePerformancePriorityChangedObservable.remove(e)})}}setPrePassRenderer(e){return!1}dispose(e,t,i){let r=this.getScene();if(r.stopAnimation(this),r.freeProcessedMaterials(),r.removeMaterial(this),this._eventInfo.forceDisposeTextures=t,this._callbackPluginEventGeneric(2,this._eventInfo),this._parentContainer){let e=this._parentContainer.materials.indexOf(this);e>-1&&this._parentContainer.materials.splice(e,1),this._parentContainer=null}if(!0!==i)if(this.meshMap)for(let e in this.meshMap){let t=this.meshMap[e];this._disposeMeshResources(t)}else for(let e of r.meshes)this._disposeMeshResources(e);this._uniformBuffer.dispose(),this._drawWrapper.effect&&(this._storeEffectOnSubMeshes||this._drawWrapper.effect.dispose(),this._drawWrapper.effect=null),this.metadata=null,this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this._onBindObservable&&this._onBindObservable.clear(),this._onUnBindObservable&&this._onUnBindObservable.clear(),this._onEffectCreatedObservable&&this._onEffectCreatedObservable.clear(),this._eventInfo&&(this._eventInfo={})}_disposeMeshResources(e){if(!e)return;let t=e.geometry,i=e._internalAbstractMeshDataInfo._materialForRenderPass;if(this._storeEffectOnSubMeshes){if(e.subMeshes&&i)for(let r of e.subMeshes){let e=r._drawWrappers;for(let s=0;s<e.length;s++){let n=e[s]?.effect;n&&i[s]===this&&(t?._releaseVertexArrayObject(n),r._removeDrawWrapper(s,!0,!0))}}}else t?._releaseVertexArrayObject(this._drawWrapper.effect);e.material!==this||e.sourceMesh||(e.material=null)}serialize(){let e=C.SerializationHelper.Serialize(this);return e.stencil=this.stencil.serialize(),e.uniqueId=this.uniqueId,this._serializePlugins(e),e}_serializePlugins(e){if(e.plugins={},this.pluginManager)for(let t of this.pluginManager._plugins)t.doNotSerialize||(e.plugins[t.getClassName()]=t.serialize())}static ParseAlphaMode(e,t){void 0!==e._alphaMode?t._alphaMode=Array.isArray(e._alphaMode)?e._alphaMode:[e._alphaMode]:void 0!==e.alphaMode?t._alphaMode=Array.isArray(e.alphaMode)?e.alphaMode:[e.alphaMode]:t._alphaMode=[2]}static Parse(e,t,i){if(e.customType){if("BABYLON.PBRMaterial"===e.customType&&e.overloadedAlbedo&&(e.customType="BABYLON.LegacyPBRMaterial",!BABYLON.LegacyPBRMaterial))return P.Logger.Error("Your scene is trying to load a legacy version of the PBRMaterial, please, include it from the materials library."),null}else e.customType="BABYLON.StandardMaterial";let r=s.Tools.Instantiate(e.customType).Parse(e,t,i);return r._loadedUniqueId=e.uniqueId,G.ParseAlphaMode(e,r),r}static _ParsePlugins(e,t,i,r){if(e.plugins)for(let n in e.plugins){let a=e.plugins[n],l=t.pluginManager?.getPlugin(a.name);if(!l){let e=s.Tools.Instantiate("BABYLON."+n);e&&(l=new e(t))}l?.parse(a,i,r)}}}G.TriangleFillMode=0,G.WireFrameFillMode=1,G.PointFillMode=2,G.PointListDrawMode=3,G.LineListDrawMode=4,G.LineLoopDrawMode=5,G.LineStripDrawMode=6,G.TriangleStripDrawMode=7,G.TriangleFanDrawMode=8,G.ClockWiseSideOrientation=0,G.CounterClockWiseSideOrientation=1,G.ImageProcessingDirtyFlag=64,G.TextureDirtyFlag=1,G.LightDirtyFlag=2,G.FresnelDirtyFlag=4,G.AttributesDirtyFlag=8,G.MiscDirtyFlag=16,G.PrePassDirtyFlag=32,G.AllDirtyFlag=127,G.MATERIAL_OPAQUE=0,G.MATERIAL_ALPHATEST=1,G.MATERIAL_ALPHABLEND=2,G.MATERIAL_ALPHATESTANDBLEND=3,G.MATERIAL_NORMALBLENDMETHOD_WHITEOUT=0,G.MATERIAL_NORMALBLENDMETHOD_RNM=1,G.LIGHTFALLOFF_PHYSICAL=0,G.LIGHTFALLOFF_GLTF=1,G.LIGHTFALLOFF_STANDARD=2,G.OnEventObservable=new n.Observable,G.ForceVertexOutputInvariant=!1,G._AllDirtyCallBack=e=>e.markAllAsDirty(),G._ImageProcessingDirtyCallBack=e=>e.markAsImageProcessingDirty(),G._TextureDirtyCallBack=e=>e.markAsTexturesDirty(),G._FresnelDirtyCallBack=e=>e.markAsFresnelDirty(),G._MiscDirtyCallBack=e=>e.markAsMiscDirty(),G._PrePassDirtyCallBack=e=>e.markAsPrePassDirty(),G._LightsDirtyCallBack=e=>e.markAsLightDirty(),G._AttributeDirtyCallBack=e=>e.markAsAttributesDirty(),G._FresnelAndMiscDirtyCallBack=e=>{G._FresnelDirtyCallBack(e),G._MiscDirtyCallBack(e)},G._TextureAndMiscDirtyCallBack=e=>{G._TextureDirtyCallBack(e),G._MiscDirtyCallBack(e)},G._DirtyCallbackArray=[],G._RunDirtyCallBacks=e=>{for(let t of G._DirtyCallbackArray)t(e)},(0,i.__decorate)([(0,r.serialize)()],G.prototype,"id",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"uniqueId",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"name",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"metadata",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"checkReadyOnEveryCall",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"checkReadyOnlyOnce",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"state",void 0),(0,i.__decorate)([(0,r.serialize)("alpha")],G.prototype,"_alpha",void 0),(0,i.__decorate)([(0,r.serialize)("backFaceCulling")],G.prototype,"_backFaceCulling",void 0),(0,i.__decorate)([(0,r.serialize)("textureRepetitionMode")],G.prototype,"_textureRepetitionMode",void 0),(0,i.__decorate)([(0,r.serialize)("textureRepetitionHexTilingParams")],G.prototype,"textureRepetitionHexTilingParams",void 0),(0,i.__decorate)([(0,r.serialize)("cullBackFaces")],G.prototype,"_cullBackFaces",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"sideOrientation",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"_alphaMode",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"_needDepthPrePass",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"disableDepthWrite",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"disableColorWrite",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"forceDepthWrite",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"depthFunction",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"separateCullingPass",void 0),(0,i.__decorate)([(0,r.serialize)("fogEnabled")],G.prototype,"_fogEnabled",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"pointSize",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"zOffset",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"zOffsetUnits",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"pointsCloud",null),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"fillMode",null),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"useLogarithmicDepth",null),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"_isVertexOutputInvariant",void 0),(0,i.__decorate)([(0,r.serialize)()],G.prototype,"transparencyMode",null),Object.getOwnPropertyDescriptor(G.prototype,"pluginManager")||Object.defineProperty(G.prototype,"pluginManager",(0,S._MissingSideEffectProperty)("Material","pluginManager")),e.s(["Material",0,G],23507)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,12423,t=>{"use strict";class e{static GetShadersRepository(t=0){return 0===t?e.ShadersRepository:e.ShadersRepositoryWGSL}static GetShadersStore(t=0){return 0===t?e.ShadersStore:e.ShadersStoreWGSL}static GetIncludesShadersStore(t=0){return 0===t?e.IncludesShadersStore:e.IncludesShadersStoreWGSL}}e.ShadersRepository="src/Shaders/",e.ShadersStore={},e.IncludesShadersStore={},e.ShadersRepositoryWGSL="src/ShadersWGSL/",e.ShadersStoreWGSL={},e.IncludesShadersStoreWGSL={},t.s(["ShaderStore",0,e])},49007,t=>{"use strict";t.s(["IntersectionInfo",0,class{constructor(t,e,i){this.bu=t,this.bv=e,this.distance=i,this.faceId=0,this.subMeshId=0,this._internalSubMeshId=0}}])},21222,t=>{"use strict";var e=t.i(96265);class i{}i.POINTERDOWN=1,i.POINTERUP=2,i.POINTERMOVE=4,i.POINTERWHEEL=8,i.POINTERPICK=16,i.POINTERTAP=32,i.POINTERDOUBLETAP=64;class r{constructor(t,e){this.type=t,this.event=e}}t.s(["PointerEventTypes",0,i,"PointerInfo",0,class extends r{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(t,e,i,r=null){super(t,e),this._pickInfo=i,this._inputManager=r}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends r{constructor(t,i,r,n){super(t,i),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new e.Vector2(r,n)}}])},36365,t=>{"use strict";class e{}e.KEYDOWN=1,e.KEYUP=2;class i{constructor(t,e){this.type=t,this.event=e}}t.s(["KeyboardEventTypes",0,e,"KeyboardInfo",0,i,"KeyboardInfoPre",0,class extends i{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(t){this.skipOnKeyboardObservable=t}constructor(t,e){super(t,e),this.type=t,this.event=e,this.skipOnKeyboardObservable=!1}}])},76696,t=>{"use strict";var e,i;(i=e||(e={}))[i.PointerMove=0]="PointerMove",i[i.PointerDown=1]="PointerDown",i[i.PointerUp=2]="PointerUp";class r{}r.DOM_DELTA_PIXEL=0,r.DOM_DELTA_LINE=1,r.DOM_DELTA_PAGE=2,t.s(["EventConstants",0,r])},67359,t=>{"use strict";var e=t.i(36395);class i{get min(){return this._min}get max(){return this._max}get average(){return this._average}get lastSecAverage(){return this._lastSecAverage}get current(){return this._current}get total(){return this._totalAccumulated}get count(){return this._totalValueCount}constructor(){this._startMonitoringTime=0,this._min=0,this._max=0,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}fetchNewFrame(){this._totalValueCount++,this._current=0,this._lastSecValueCount++}addCount(t,e){i.Enabled&&(this._current+=t,e&&this._fetchResult())}beginMonitoring(){i.Enabled&&(this._startMonitoringTime=e.PrecisionDate.Now)}endMonitoring(t=!0){if(!i.Enabled)return;t&&this.fetchNewFrame();let r=e.PrecisionDate.Now;this._current=r-this._startMonitoringTime,t&&this._fetchResult()}endFrame(){this._fetchResult()}_fetchResult(){this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current),this._average=this._totalAccumulated/this._totalValueCount;let t=e.PrecisionDate.Now;t-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=t,this._lastSecAccumulated=0,this._lastSecValueCount=0)}}i.Enabled=!0,t.s(["PerfCounter",0,i])},44981,t=>{"use strict";var e=t.i(66749),i=t.i(59576),r=t.i(89030),n=t.i(96265),o=t.i(48657),s=t.i(49007),a=t.i(50107),c=t.i(81623),l=t.i(5785);let h={internalPickerForMesh:void 0};class u{constructor(t,e,i=Number.MAX_VALUE,n=r.Epsilon){this.origin=t,this.direction=e,this.length=i,this.epsilon=n}clone(){return new u(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(t,e,i=0){let r,n,o,s,a=u._TmpVector3[0].copyFromFloats(t.x-i,t.y-i,t.z-i),c=u._TmpVector3[1].copyFromFloats(e.x+i,e.y+i,e.z+i),l=0,h=Number.MAX_VALUE;if(1e-7>Math.abs(this.direction.x)){if(this.origin.x<a.x||this.origin.x>c.x)return!1}else if(r=1/this.direction.x,n=(a.x-this.origin.x)*r,(o=(c.x-this.origin.x)*r)==-1/0&&(o=1/0),n>o&&(s=n,n=o,o=s),(l=Math.max(n,l))>(h=Math.min(o,h)))return!1;if(1e-7>Math.abs(this.direction.y)){if(this.origin.y<a.y||this.origin.y>c.y)return!1}else if(r=1/this.direction.y,n=(a.y-this.origin.y)*r,(o=(c.y-this.origin.y)*r)==-1/0&&(o=1/0),n>o&&(s=n,n=o,o=s),(l=Math.max(n,l))>(h=Math.min(o,h)))return!1;if(1e-7>Math.abs(this.direction.z)){if(this.origin.z<a.z||this.origin.z>c.z)return!1}else if(r=1/this.direction.z,n=(a.z-this.origin.z)*r,(o=(c.z-this.origin.z)*r)==-1/0&&(o=1/0),n>o&&(s=n,n=o,o=s),(l=Math.max(n,l))>(h=Math.min(o,h)))return!1;return!0}intersectsBox(t,e=0){return this.intersectsBoxMinMax(t.minimum,t.maximum,e)}intersectsSphere(t,e=0){let i=t.center.x-this.origin.x,r=t.center.y-this.origin.y,n=t.center.z-this.origin.z,o=i*i+r*r+n*n,s=t.radius+e,a=s*s;if(o<=a)return!0;let c=i*this.direction.x+r*this.direction.y+n*this.direction.z;return!(c<0)&&o-c*c<=a}intersectsTriangle(t,e,i){let r=u._TmpVector3[0],o=u._TmpVector3[1],a=u._TmpVector3[2],c=u._TmpVector3[3],l=u._TmpVector3[4];e.subtractToRef(t,r),i.subtractToRef(t,o),n.Vector3.CrossToRef(this.direction,o,a);let h=n.Vector3.Dot(r,a);if(0===h)return null;let f=1/h;this.origin.subtractToRef(t,c);let d=n.Vector3.Dot(c,a)*f;if(d<-this.epsilon||d>1+this.epsilon)return null;n.Vector3.CrossToRef(c,r,l);let m=n.Vector3.Dot(this.direction,l)*f;if(m<-this.epsilon||d+m>1+this.epsilon)return null;let y=n.Vector3.Dot(o,l)*f;return y>this.length||y<0?null:new s.IntersectionInfo(1-d-m,d,y)}intersectsPlane(t){let e,i=n.Vector3.Dot(t.normal,this.direction);if(999999997475243e-21>Math.abs(i))return null;{let r=n.Vector3.Dot(t.normal,this.origin);if((e=(-t.d-r)/i)<0)if(e<-999999997475243e-21)return null;else return 0;return e}}intersectsAxis(t,e=0){switch(t){case"y":{let t=(this.origin.y-e)/this.direction.y;if(t>0)return null;return new n.Vector3(this.origin.x+-(this.direction.x*t),e,this.origin.z+-(this.direction.z*t))}case"x":{let t=(this.origin.x-e)/this.direction.x;if(t>0)return null;return new n.Vector3(e,this.origin.y+-(this.direction.y*t),this.origin.z+-(this.direction.z*t))}case"z":{let t=(this.origin.z-e)/this.direction.z;if(t>0)return null;return new n.Vector3(this.origin.x+-(this.direction.x*t),this.origin.y+-(this.direction.y*t),e)}default:return null}}intersectsMesh(t,e,i,r=!1,o,s=!1){let a=n.TmpVectors.Matrix[0];return t.getWorldMatrix().invertToRef(a),this._tmpRay?u.TransformToRef(this,a,this._tmpRay):this._tmpRay=u.Transform(this,a),t.intersects(this._tmpRay,e,i,r,o,s)}intersectsMeshes(t,e,i){i?i.length=0:i=[];for(let r=0;r<t.length;r++){let n=this.intersectsMesh(t[r],e);n.hit&&i.push(n)}return i.sort(this._comparePickingInfo),i}_comparePickingInfo(t,e){return t.distance<e.distance?-1:+(t.distance>e.distance)}intersectionSegment(t,e,i){let r=this.origin,o=n.TmpVectors.Vector3[0],s=n.TmpVectors.Vector3[1],a=n.TmpVectors.Vector3[2],c=n.TmpVectors.Vector3[3];e.subtractToRef(t,o),this.direction.scaleToRef(u._Rayl,a),r.addToRef(a,s),t.subtractToRef(r,c);let l=n.Vector3.Dot(o,o),h=n.Vector3.Dot(o,a),f=n.Vector3.Dot(a,a),d=n.Vector3.Dot(o,c),m=n.Vector3.Dot(a,c),y=l*f-h*h,g,R=y,p,T=y;y<u._Smallnum?(g=0,R=1,p=m,T=f):(g=h*m-f*d,p=l*m-h*d,g<0?(g=0,p=m,T=f):g>R&&(g=R,p=m+h,T=f)),p<0?(p=0,0>-d?g=0:-d>l?g=R:(g=-d,R=l)):p>T&&(p=T,-d+h<0?g=0:-d+h>l?g=R:(g=-d+h,R=l));let _=Math.abs(g)<u._Smallnum?0:g/R,P=Math.abs(p)<u._Smallnum?0:p/T,x=n.TmpVectors.Vector3[4];a.scaleToRef(P,x);let M=n.TmpVectors.Vector3[5];o.scaleToRef(_,M),M.addInPlace(c);let I=n.TmpVectors.Vector3[6];return(M.subtractToRef(x,I),P>0&&P<=this.length&&I.lengthSquared()<i*i)?M.length():-1}update(t,e,i,r,o,s,a,c=!1){if(c){u._RayDistant||(u._RayDistant=u.Zero()),u._RayDistant.unprojectRayToRef(t,e,i,r,n.Matrix.IdentityReadOnly,s,a);let c=n.TmpVectors.Matrix[0];o.invertToRef(c),u.TransformToRef(u._RayDistant,c,this)}else this.unprojectRayToRef(t,e,i,r,o,s,a);return this}static Zero(){return new u(n.Vector3.Zero(),n.Vector3.Zero())}static CreateNew(t,e,i,r,n,o,s){return u.Zero().update(t,e,i,r,n,o,s)}static CreateNewFromTo(t,e,i=n.Matrix.IdentityReadOnly){let r=new u(new n.Vector3(0,0,0),new n.Vector3(0,0,0));return u.CreateFromToToRef(t,e,r,i)}static CreateFromToToRef(t,e,i,r=n.Matrix.IdentityReadOnly){i.origin.copyFrom(t);let o=e.subtractToRef(t,i.direction);return i.length=Math.sqrt(o.x*o.x+o.y*o.y+o.z*o.z),i.direction.normalize(),u.TransformToRef(i,r,i)}static Transform(t,e){let i=new u(new n.Vector3(0,0,0),new n.Vector3(0,0,0));return u.TransformToRef(t,e,i),i}static TransformToRef(t,e,i){n.Vector3.TransformCoordinatesToRef(t.origin,e,i.origin),n.Vector3.TransformNormalToRef(t.direction,e,i.direction),i.length=t.length,i.epsilon=t.epsilon;let r=i.direction,o=r.length();if(0!==o&&1!==o){let t=1/o;r.x*=t,r.y*=t,r.z*=t,i.length*=o}return i}unprojectRayToRef(t,e,i,r,o,s,a){let l=n.TmpVectors.Matrix[0];o.multiplyToRef(s,l),l.multiplyToRef(a,l),l.invert();let h=c.EngineStore.LastCreatedEngine,u=n.TmpVectors.Vector3[0];u.x=t/i*2-1,u.y=-(e/r*2-1),u.z=h?.useReverseDepthBuffer?1:h?.isNDCHalfZRange?0:-1;let f=n.TmpVectors.Vector3[1].copyFromFloats(u.x,u.y,1-1e-8),d=n.TmpVectors.Vector3[2],m=n.TmpVectors.Vector3[3];n.Vector3.TransformCoordinatesToRef(u,l,d),n.Vector3.TransformCoordinatesToRef(f,l,m),this.origin.copyFrom(d),m.subtractToRef(d,this.direction),this.direction.normalize()}}function f(t,e,i,r,n,o=!1){let s=u.Zero();return d(t,e,i,r,s,n,o),s}function d(t,e,i,r,o,s,a=!1,c=!1){let l=t.getEngine();if(!s&&!(s=t.activeCamera)&&!(s=t.cameraToUseForPointers))return t;let h=s.viewport,u=l.getRenderHeight(),{x:f,y:m,width:y,height:g}=h.toGlobal(l.getRenderWidth(),u),R=1/l.getHardwareScalingLevel();return e=e*R-f,i=i*R-(u-m-g),o.update(e,i,y,g,r||n.Matrix.IdentityReadOnly,a?n.Matrix.IdentityReadOnly:s.getViewMatrix(),s.getProjectionMatrix(),c),t}function m(t,e,i,r){let n=u.Zero();return y(t,e,i,n,r),n}function y(t,e,i,r,o){if(!a.PickingInfo)return t;let s=t.getEngine();if(!o&&!(o=t.activeCamera)&&!(o=t.cameraToUseForPointers))throw Error("Active camera not set");let c=o.viewport,l=s.getRenderHeight(),{x:h,y:u,width:f,height:d}=c.toGlobal(s.getRenderWidth(),l),m=n.Matrix.Identity(),y=1/s.getHardwareScalingLevel();return e=e*y-h,i=i*y-(l-u-d),r.update(e,i,f,d,m,m,o.getProjectionMatrix()),t}function g(t,e,i,r,n,o,s,a){let c=e(r,i.enableDistantPicking);return R(t,i,r,c,n,o,s,a)}function R(t,e,i,r,n,o,s,a){let c=e.intersects(r,n,s,o,i,a);return c&&c.hit&&(n||null==t||!(c.distance>=t.distance))?c:null}function p(t){let e=t.getClassName();if("GreasedLineMesh"===e)return{rawBoundingInfo:null,intersectionThreshold:0};let i=t.rawBoundingInfo;return{rawBoundingInfo:i,intersectionThreshold:i?"InstancedLinesMesh"===e||"LinesMesh"===e?t.intersectionThreshold:0:0}}function T(t,e,i,r,n){let o=t(i,e.enableDistantPicking);return o.intersectsSphere(r.boundingSphere,n)&&o.intersectsBox(r.boundingBox,n)?o:null}function _(t,e,i,r,o,s){let c=null,l=!!(t.activeCameras&&t.activeCameras.length>1&&t.cameraToUseForPointers!==t.activeCamera),u=t.cameraToUseForPointers||t.activeCamera,f=h.internalPickerForMesh||g,d=f===g;for(let a=0;a<t.meshes.length;a++){let h=t.meshes[a];if(i){if(!i(h,-1))continue}else if(!h.isEnabled()||!h.isVisible||!h.isPickable)continue;let m=l&&h.isWorldMatrixCameraDependent(),y=h.computeWorldMatrix(m,u);if(h.hasThinInstances&&h.thinInstanceEnablePicking){let t=f(c,e,h,y,!0,!0,s);if(t){if(o)return t;let{rawBoundingInfo:a,intersectionThreshold:l}=p(h),u=h._thinInstanceDataStorage.matrixData;if(u){let t=n.TmpVectors.Matrix[0],m=n.TmpVectors.Matrix[1],g=Math.min(h.thinInstanceCount,u.length>>4);for(let p=0;p<g;p++){if(i&&!i(h,p))continue;n.Matrix.FromArrayToRef(u,p<<4,t),t.multiplyToRef(y,m);let g=d&&a?T(e,h,m,a,l):null;if(d&&a&&!g)continue;let _=d&&g?R(c,h,m,g,r,o,s,!0):f(c,e,h,m,r,o,s,!0);if(_&&((c=_).thinInstanceIndex=p,r))return c}}}}else{let t=f(c,e,h,y,r,o,s);if(t&&(c=t,r))return c}}return c||new a.PickingInfo}function P(t,e,i,r){if(!a.PickingInfo)return null;let o=[],s=!!(t.activeCameras&&t.activeCameras.length>1&&t.cameraToUseForPointers!==t.activeCamera),c=t.cameraToUseForPointers||t.activeCamera,l=h.internalPickerForMesh||g,u=l===g;for(let a=0;a<t.meshes.length;a++){let h=t.meshes[a];if(i){if(!i(h,-1))continue}else if(!h.isEnabled()||!h.isVisible||!h.isPickable)continue;let f=s&&h.isWorldMatrixCameraDependent(),d=h.computeWorldMatrix(f,c);if(h.hasThinInstances&&h.thinInstanceEnablePicking){if(l(null,e,h,d,!0,!0,r)){let{rawBoundingInfo:t,intersectionThreshold:s}=p(h),a=h._thinInstanceDataStorage.matrixData;if(a){let c=n.TmpVectors.Matrix[0],f=n.TmpVectors.Matrix[1],m=Math.min(h.thinInstanceCount,a.length>>4);for(let y=0;y<m;y++){if(i&&!i(h,y))continue;n.Matrix.FromArrayToRef(a,y<<4,c),c.multiplyToRef(d,f);let m=u&&t?T(e,h,f,t,s):null;if(u&&t&&!m)continue;let g=u&&m?R(null,h,f,m,!1,!1,r,!0):l(null,e,h,f,!1,!1,r,!0);g&&(g.thinInstanceIndex=y,o.push(g))}}}}else{let t=l(null,e,h,d,!1,!1,r);t&&o.push(t)}}return o}function x(t,e,i,r,o,s){if(!a.PickingInfo)return null;let c=_(t,r=>(t._tempPickingRay||(t._tempPickingRay=u.Zero()),d(t,e,i,r,t._tempPickingRay,s||null),t._tempPickingRay),r,o,!0);return c&&(c.ray=f(t,e,i,n.Matrix.Identity(),s||null)),c}function M(t,e,i,r,o,s,a,c=!1){let l=_(t,(r,n)=>(t._tempPickingRay||(t._tempPickingRay=u.Zero()),d(t,e,i,r,t._tempPickingRay,s||null,!1,n),t._tempPickingRay),r,o,!1,a);return l&&(l.ray=f(t,e,i,n.Matrix.Identity(),s||null)),l}function I(t,e,i,r,o){let s=_(t,i=>(t._pickWithRayInverseMatrix||(t._pickWithRayInverseMatrix=n.Matrix.Identity()),i.invertToRef(t._pickWithRayInverseMatrix),t._cachedRayForTransform||(t._cachedRayForTransform=u.Zero()),u.TransformToRef(e,t._pickWithRayInverseMatrix,t._cachedRayForTransform),t._cachedRayForTransform),i,r,!1,o);return s&&(s.ray=e),s}function V(t,e,i,r,n,o){return P(t,r=>f(t,e,i,r,n||null),r,o)}function k(t,e,i,r){return P(t,i=>(t._pickWithRayInverseMatrix||(t._pickWithRayInverseMatrix=n.Matrix.Identity()),i.invertToRef(t._pickWithRayInverseMatrix),t._cachedRayForTransform||(t._cachedRayForTransform=u.Zero()),u.TransformToRef(e,t._pickWithRayInverseMatrix,t._cachedRayForTransform),t._cachedRayForTransform),i,r)}function S(t,e=100,i,r){return C(t,new u(n.Vector3.Zero(),n.Vector3.Zero(),e),e,i,r)}function C(t,e,i=100,r,o){r||(r=t.getWorldMatrix()),e.length=i,o?e.origin.copyFrom(o):e.origin.copyFrom(t.position);let s=n.TmpVectors.Vector3[2];s.set(0,0,t._scene.useRightHandedSystem?-1:1);let a=n.TmpVectors.Vector3[3];return n.Vector3.TransformNormalToRef(s,r,a),n.Vector3.NormalizeToRef(a,e.direction),e}function v(t,e){e&&(e.prototype.getForwardRay=function(t=100,e,i){return C(this,new u(n.Vector3.Zero(),n.Vector3.Zero(),t),t,e,i)},e.prototype.getForwardRayToRef=function(t,e=100,i,r){return C(this,t,e,i,r)}),t&&(l._ImportHelper._IsPickingAvailable=!0,t.prototype.createPickingRay=function(t,e,i,r,n=!1){return f(this,t,e,i,r,n)})}u._TmpVector3=(0,o.BuildArray)(6,n.Vector3.Zero),u._RayDistant=u.Zero(),u._Smallnum=1e-8,u._Rayl=1e9,t.s(["AddRayExtensions",0,v,"CreatePickingRay",0,f,"CreatePickingRayInCameraSpace",0,m,"CreatePickingRayInCameraSpaceToRef",0,y,"CreatePickingRayToRef",0,d,"GetForwardRay",0,S,"GetForwardRayToRef",0,C,"MultiPick",0,V,"MultiPickWithRay",0,k,"Pick",0,M,"PickWithBoundingInfo",0,x,"PickWithRay",0,I,"PickingCustomization",0,h,"Ray",0,u],57180);let b=!1;function w(){b||(b=!0,v(e.Scene,i.Camera),e.Scene.prototype.createPickingRayToRef=function(t,e,i,r,n,o=!1,s=!1){return d(this,t,e,i,r,n,o,s)},e.Scene.prototype.createPickingRayInCameraSpace=function(t,e,i){return m(this,t,e,i)},e.Scene.prototype.createPickingRayInCameraSpaceToRef=function(t,e,i,r){return y(this,t,e,i,r)},e.Scene.prototype.pickWithBoundingInfo=function(t,e,i,r,n){return x(this,t,e,i,r,n)},e.Scene.prototype.pick=function(t,e,i,r,n,o,s=!1){return M(this,t,e,i,r,n,o,s)},e.Scene.prototype.pickWithRay=function(t,e,i,r){return I(this,t,e,i,r)},e.Scene.prototype.multiPick=function(t,e,i,r,n){return V(this,t,e,i,r,n)},e.Scene.prototype.multiPickWithRay=function(t,e,i){return k(this,t,e,i)})}t.s(["RegisterRay",0,w],88181),w(),t.s([],1727),t.i(1727),t.i(88181),t.i(57180),t.s(["AddRayExtensions",0,v,"CreatePickingRay",0,f,"CreatePickingRayInCameraSpace",0,m,"CreatePickingRayInCameraSpaceToRef",0,y,"CreatePickingRayToRef",0,d,"GetForwardRay",0,S,"GetForwardRayToRef",0,C,"MultiPick",0,V,"MultiPickWithRay",0,k,"Pick",0,M,"PickWithBoundingInfo",0,x,"PickWithRay",0,I,"PickingCustomization",0,h,"Ray",0,u,"RegisterRay",0,w],27608),t.i(27608),t.s(["AddRayExtensions",0,v,"CreatePickingRay",0,f,"CreatePickingRayInCameraSpace",0,m,"CreatePickingRayInCameraSpaceToRef",0,y,"CreatePickingRayToRef",0,d,"GetForwardRay",0,S,"GetForwardRayToRef",0,C,"MultiPick",0,V,"MultiPickWithRay",0,k,"Pick",0,M,"PickWithBoundingInfo",0,x,"PickWithRay",0,I,"PickingCustomization",0,h,"Ray",0,u,"RegisterRay",0,w],44981)}]);