@uptimizr/dashboard 0.3.4 → 0.3.6

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 (314) hide show
  1. package/out/404.html +1 -1
  2. package/out/__next.__PAGE__.txt +4 -4
  3. package/out/__next._full.txt +10 -10
  4. package/out/__next._head.txt +4 -4
  5. package/out/__next._index.txt +3 -3
  6. package/out/__next._tree.txt +1 -1
  7. package/out/_next/static/chunks/{2h051-1hu4co_.js → 0-0hui1_v3h8b.js} +9 -9
  8. package/out/_next/static/chunks/{2dqg85hsevk3c.js → 0-tzsd_n-ywom.js} +4 -4
  9. package/out/_next/static/chunks/00g5suuoa-_wn.js +1 -0
  10. package/out/_next/static/chunks/00o9hr_3hd0r8.js +1 -0
  11. package/out/_next/static/chunks/{0jxklh_ayjd4b.js → 00xc-0pj7on2s.js} +12 -12
  12. package/out/_next/static/chunks/01fh3_bncbe5u.js +1 -0
  13. package/out/_next/static/chunks/01urdkl1j8o6l.js +1 -0
  14. package/out/_next/static/chunks/{2j-sax2xfdv7l.js → 026vw95s88gsy.js} +1 -1
  15. package/out/_next/static/chunks/02eui3ctddbd2.js +1 -0
  16. package/out/_next/static/chunks/{3kr1polwvt6o_.js → 03zip1uidm6x9.js} +1 -1
  17. package/out/_next/static/chunks/{3gi0f1kg72xsf.js → 04_3ri5emyfcu.js} +1 -1
  18. package/out/_next/static/chunks/04c4nksb5y9r-.js +1 -0
  19. package/out/_next/static/chunks/04g-l-_b4payc.js +1 -0
  20. package/out/_next/static/chunks/04j9pexbmysdy.js +1 -0
  21. package/out/_next/static/chunks/{1rcfy_gzean3n.js → 055baac5e-c2o.js} +1 -1
  22. package/out/_next/static/chunks/05bdni_jrobq1.js +1 -0
  23. package/out/_next/static/chunks/05o0tb8l_htmw.js +1 -0
  24. package/out/_next/static/chunks/{3d5yb9ybkz7hx.js → 05uqfgf-hh-p5.js} +1 -1
  25. package/out/_next/static/chunks/06f-0kw8s0mqo.js +3 -0
  26. package/out/_next/static/chunks/{18r387bj9iv0j.js → 077eo-0dhbxz-.js} +1 -1
  27. package/out/_next/static/chunks/{18k-0jn63_5ie.js → 07z6p262h5hgl.js} +1 -1
  28. package/out/_next/static/chunks/{08bm3ye5govev.js → 08m_4cihfmik8.js} +1 -1
  29. package/out/_next/static/chunks/08obqw64faj8j.js +1 -0
  30. package/out/_next/static/chunks/{2k4s5rt7-l8jr.js → 099ilz3dmm1jw.js} +1 -1
  31. package/out/_next/static/chunks/09ppu_k464q-n.js +1 -0
  32. package/out/_next/static/chunks/{1rne-b-ktit5c.js → 0av6n_6q6kzo3.js} +2 -2
  33. package/out/_next/static/chunks/0bgcaf2x51kms.js +1 -0
  34. package/out/_next/static/chunks/{0ptp4ne7j6yg6.js → 0bj_310rugcn1.js} +11 -11
  35. package/out/_next/static/chunks/0c5d3qn2mb3ew.js +1 -0
  36. package/out/_next/static/chunks/{2gtebfttq1v0o.js → 0dck67in84de0.js} +1 -1
  37. package/out/_next/static/chunks/0dg4wxz-6u5lo.js +1 -0
  38. package/out/_next/static/chunks/{2apt1vh-7rl2l.js → 0dva036n8ab62.js} +1 -1
  39. package/out/_next/static/chunks/{159u-hx80yfaw.js → 0erga_bzezbza.js} +1 -1
  40. package/out/_next/static/chunks/0f0-i105odxqd.js +1 -0
  41. package/out/_next/static/chunks/{1fvlbwp6r93wo.js → 0g2wngc6oe7fd.js} +24 -24
  42. package/out/_next/static/chunks/0gyeqz9pagssf.js +1 -0
  43. package/out/_next/static/chunks/0i82k-t0fbn8f.js +1 -0
  44. package/out/_next/static/chunks/0kzw45f61wm3j.js +1 -0
  45. package/out/_next/static/chunks/0l8bfa2xewq69.js +1 -0
  46. package/out/_next/static/chunks/{390fogn9oz13i.js → 0n-zml1gn0o1u.js} +1 -1
  47. package/out/_next/static/chunks/{44gsjajjdhf51.js → 0n92hec_jb_-_.js} +1 -1
  48. package/out/_next/static/chunks/{2s0dwzg7kq36n.js → 0okbyggxe6mx5.js} +1 -1
  49. package/out/_next/static/chunks/{0h-ohf4gntwtj.js → 0pv2wirx45e1m.js} +1 -1
  50. package/out/_next/static/chunks/0qxd_8t3nca36.js +1 -0
  51. package/out/_next/static/chunks/0s1jghzw8jufz.js +1 -0
  52. package/out/_next/static/chunks/{0ngai1_zxwsk8.js → 0s84ekz_f9ngx.js} +1 -1
  53. package/out/_next/static/chunks/{16d4a4iopj2if.js → 0t89-lfct-7m6.js} +5 -5
  54. package/out/_next/static/chunks/0ti58h622yo-_.js +2 -0
  55. package/out/_next/static/chunks/{29v8falcmjvev.js → 0tn-9w46cwydp.js} +32 -32
  56. package/out/_next/static/chunks/0u8yr4k1y6m2t.js +1 -0
  57. package/out/_next/static/chunks/0ubxyut5rr600.js +1 -0
  58. package/out/_next/static/chunks/{3_bzxvqtk1t53.js → 0uxdbfa8gv6tk.js} +12 -12
  59. package/out/_next/static/chunks/0vso09vdz38sr.js +1 -0
  60. package/out/_next/static/chunks/{0_tqu60oxaj7q.js → 0w-hm7g7trtjg.js} +1 -1
  61. package/out/_next/static/chunks/0wbw9h7rsis2r.js +1 -0
  62. package/out/_next/static/chunks/{3sbm1ak54_2ep.js → 0wq_9f98weoe3.js} +1 -1
  63. package/out/_next/static/chunks/0y4e49hpuucdi.js +1 -0
  64. package/out/_next/static/chunks/{0ioyy42h35hnd.js → 0yvevihll7sz-.js} +1 -1
  65. package/out/_next/static/chunks/{0zcdc17ie6lmh.js → 0zf26k6juhlzo.js} +50 -18
  66. package/out/_next/static/chunks/{3sg4zff4-h3t1.js → 1-b44873bjsdw.js} +1 -1
  67. package/out/_next/static/chunks/1-c3a1vnl8v1q.js +1 -0
  68. package/out/_next/static/chunks/1-xf86jgea22y.js +1 -0
  69. package/out/_next/static/chunks/10b0qqdnb_nox.js +1 -0
  70. package/out/_next/static/chunks/{2ib62lnqqaf4p.js → 11p92pnn5el0v.js} +1 -1
  71. package/out/_next/static/chunks/{06ljadw2-i91-.js → 12kdmh0h_mboy.js} +1 -1
  72. package/out/_next/static/chunks/141tngxsk32hq.js +1 -0
  73. package/out/_next/static/chunks/14ijcpo72av4r.js +1 -0
  74. package/out/_next/static/chunks/16hdip1drt8o-.js +1 -0
  75. package/out/_next/static/chunks/{3g5ae-38cepwm.js → 17aahvhpls1l7.js} +199 -199
  76. package/out/_next/static/chunks/{17d1isrw8gtnb.js → 18txc1wwwu9f9.js} +1 -1
  77. package/out/_next/static/chunks/{2716si10ouwu-.js → 18wa83g0qfh-b.js} +1 -1
  78. package/out/_next/static/chunks/19dp8nr4uygg2.js +5 -0
  79. package/out/_next/static/chunks/1_8acnu6_-qe-.js +1 -0
  80. package/out/_next/static/chunks/1__nujzr9e352.js +3 -0
  81. package/out/_next/static/chunks/1bmyq1b0by7ug.js +1 -0
  82. package/out/_next/static/chunks/{1wyr4at61q29n.js → 1ccn725by19i1.js} +1 -1
  83. package/out/_next/static/chunks/{0f_nv15a8q415.js → 1d1tpj9nm1nhf.js} +1 -1
  84. package/out/_next/static/chunks/1dfwa563iciz3.js +1 -0
  85. package/out/_next/static/chunks/1di5enkavl9vx.js +4 -0
  86. package/out/_next/static/chunks/{006nix8mv66z_.js → 1e_-_7biavwmb.js} +1 -1
  87. package/out/_next/static/chunks/{1y12bjsbq18_t.js → 1ephzzweysylq.js} +34 -34
  88. package/out/_next/static/chunks/1fwsjnd1y-lx_.js +1 -0
  89. package/out/_next/static/chunks/{2z9ot-w1x60fv.js → 1fyh50hjt7hi_.js} +1 -1
  90. package/out/_next/static/chunks/1gaexq_suxai0.js +1 -0
  91. package/out/_next/static/chunks/1gtj_l5ame5mw.js +1 -0
  92. package/out/_next/static/chunks/{1--aypw9o8yng.js → 1gvdmbr65lpud.js} +39 -39
  93. package/out/_next/static/chunks/{02tc9r3sc7fgc.js → 1ho02fc091nj2.js} +1 -1
  94. package/out/_next/static/chunks/{3v0td-ziuai2i.js → 1hsvckd0sgdgr.js} +1 -1
  95. package/out/_next/static/chunks/1i4f3n_2_3ery.js +1 -0
  96. package/out/_next/static/chunks/1j7e3qpjuj89a.js +1 -0
  97. package/out/_next/static/chunks/{2btqzk0tj0gz6.js → 1mrvp94tietcv.js} +1 -1
  98. package/out/_next/static/chunks/{3vxkkhs0vi_xa.js → 1mvadj46owrck.js} +1 -1
  99. package/out/_next/static/chunks/{1b2tkk7e_2o0k.js → 1n_gxvu31aofy.js} +2 -2
  100. package/out/_next/static/chunks/{0gblbgw7w7r9w.js → 1nasz7q3tvb53.js} +1 -1
  101. package/out/_next/static/chunks/{2_7dp91937mqi.js → 1ng-fqh2_n984.js} +1 -1
  102. package/out/_next/static/chunks/{0x4-zyy8pzmlq.js → 1nqojcig-0m3c.js} +1 -1
  103. package/out/_next/static/chunks/1o3ggu95lfu6i.js +1 -0
  104. package/out/_next/static/chunks/{2dolerz81xb52.js → 1og49_atcksim.js} +1 -1
  105. package/out/_next/static/chunks/{0c2k-gvwph4qs.js → 1oljzgz5jistn.js} +1 -1
  106. package/out/_next/static/chunks/1ozi46t8jajqh.js +1 -0
  107. package/out/_next/static/chunks/{1w9xu1qa9-wmv.js → 1ph0tfo-4hl-f.js} +1 -1
  108. package/out/_next/static/chunks/{17dmbt396_tyq.js → 1qjsgebn9m-0l.js} +1 -1
  109. package/out/_next/static/chunks/{168r9r65o9jnc.js → 1qsut_e3msg0l.js} +1 -1
  110. package/out/_next/static/chunks/{3efuvh_35yhes.js → 1qxhgauuomthl.js} +39 -39
  111. package/out/_next/static/chunks/{2w7yf7ouyrlkb.js → 1rb8wewjbdisv.js} +1 -1
  112. package/out/_next/static/chunks/1rr74xxjtckyv.js +1 -0
  113. package/out/_next/static/chunks/{1kl5xxohpr6-4.js → 1solqr18og2ot.js} +1 -1
  114. package/out/_next/static/chunks/{2rjc8yn50ducj.js → 1t2exh89lnazc.js} +34 -34
  115. package/out/_next/static/chunks/{0_ux41xcoea3u.js → 1t7nl8rx7mabd.js} +40 -40
  116. package/out/_next/static/chunks/{3fx3sriw1w3sa.js → 1tt1bbry-4f-6.js} +1 -1
  117. package/out/_next/static/chunks/{0ufakw529sr9d.js → 1upkv4ltuh3s5.js} +40 -40
  118. package/out/_next/static/chunks/{2npk7tr63h7rl.js → 1uu55ejvi7q5u.js} +1 -1
  119. package/out/_next/static/chunks/{2cvvxifoedn6j.js → 1ux1rpe-n1mai.js} +1 -1
  120. package/out/_next/static/chunks/{091ll-lp6spu3.js → 1vmpltnr0cyos.js} +1 -1
  121. package/out/_next/static/chunks/1x99m91nt1m3b.js +1 -0
  122. package/out/_next/static/chunks/1xbzxfeq9789f.js +1 -0
  123. package/out/_next/static/chunks/1ybiu-rkt50_1.js +1 -0
  124. package/out/_next/static/chunks/{3y9c26fv1poq_.js → 2-hdejef-mpka.js} +199 -199
  125. package/out/_next/static/chunks/{22qzld31fbhbv.js → 2-p206i_ihx09.js} +1 -1
  126. package/out/_next/static/chunks/{340pg0qkv5tqq.js → 20qelrstvz9_n.js} +1 -1
  127. package/out/_next/static/chunks/21at65obnoo8z.js +1 -0
  128. package/out/_next/static/chunks/21ko5mxfderw0.js +1 -0
  129. package/out/_next/static/chunks/21muzwu43o8xg.js +1 -0
  130. package/out/_next/static/chunks/{3he9bxsc67ivq.js → 22ja7c3gk0_ko.js} +1 -1
  131. package/out/_next/static/chunks/{0mqi0xn_c010j.js → 22rl_arnzs-ve.js} +1 -1
  132. package/out/_next/static/chunks/23d-hvrwpixpm.js +1 -0
  133. package/out/_next/static/chunks/{2yzui3v-besdu.js → 255knovck7pv2.js} +4 -4
  134. package/out/_next/static/chunks/2569rrrffvm2w.js +31 -0
  135. package/out/_next/static/chunks/{229mkx-mtfcgf.js → 25gf6xn9u1c57.js} +1 -1
  136. package/out/_next/static/chunks/{2vmybybb3dvia.js → 267q_eg-c6f6m.js} +1 -1
  137. package/out/_next/static/chunks/{0e7xuupmrw4-e.js → 28ndw4nsw2t_4.js} +1 -1
  138. package/out/_next/static/chunks/{0m3yjobjg36ce.js → 29gv2swsp7tzu.js} +1 -1
  139. package/out/_next/static/chunks/29o74k0d6hkdf.js +1 -0
  140. package/out/_next/static/chunks/{0kr-bd6fuqc2s.js → 2bm95r0011asw.js} +1 -1
  141. package/out/_next/static/chunks/2btabnibkm0db.js +1 -0
  142. package/out/_next/static/chunks/2c--awgkdcikq.js +1 -0
  143. package/out/_next/static/chunks/{2ab-99frxpah-.js → 2c2dspoukng-5.js} +1 -1
  144. package/out/_next/static/chunks/{0zo4x1j8ug-kb.js → 2e46-2ubc90do.js} +5 -5
  145. package/out/_next/static/chunks/2ep7mjbaoeou0.js +1 -0
  146. package/out/_next/static/chunks/{1kq86iv41cet4.js → 2ezgqm7atphi6.js} +1 -1
  147. package/out/_next/static/chunks/{1bv97vf67p_ri.js → 2ftp5xmq_w23j.js} +35 -35
  148. package/out/_next/static/chunks/{38g9jpxjoxn2x.js → 2g_1ov-0j2kwd.js} +1 -1
  149. package/out/_next/static/chunks/2gfjzq_vjea4w.js +1 -0
  150. package/out/_next/static/chunks/{1tdg_eolxlcdl.js → 2h5hase6ewoyc.js} +1 -1
  151. package/out/_next/static/chunks/{0m0n7kjzscx0y.js → 2h5nvlgky7fpa.js} +1 -1
  152. package/out/_next/static/chunks/{17dabmbnkkplu.js → 2i82rmjta9ijs.js} +1 -1
  153. package/out/_next/static/chunks/2ies66gmou203.js +1 -0
  154. package/out/_next/static/chunks/2jenu2eek9viz.js +1 -0
  155. package/out/_next/static/chunks/{3043pprgv9ors.js → 2khh_pmm224k5.js} +23 -23
  156. package/out/_next/static/chunks/2kv9_bt15v83g.js +1 -0
  157. package/out/_next/static/chunks/{0msckddycfy76.js → 2luaj_cf5f19-.js} +1 -1
  158. package/out/_next/static/chunks/2mgmvz66gh5ub.js +1 -0
  159. package/out/_next/static/chunks/2nwlqtv3vrzcv.js +1 -0
  160. package/out/_next/static/chunks/{18ss4ls60s31e.js → 2o8k8x5zcepfy.js} +1 -1
  161. package/out/_next/static/chunks/{1e1zozntzsx42.js → 2pbgsq7vvtk8_.js} +1 -1
  162. package/out/_next/static/chunks/{0b7-mrrg7ryj2.js → 2pcdnd4nzcw4c.js} +1 -1
  163. package/out/_next/static/chunks/2q0rz76kj6h5z.js +1 -0
  164. package/out/_next/static/chunks/{3w1a2o8nevap8.js → 2rjfrjhp4kjev.js} +18 -18
  165. package/out/_next/static/chunks/2si5cg3hl5dtf.js +4 -0
  166. package/out/_next/static/chunks/2uhrhq35bki6u.js +1 -0
  167. package/out/_next/static/chunks/{1l12hkz1g7uhf.js → 2ymtumj-hfrjo.js} +1 -1
  168. package/out/_next/static/chunks/{2yr9wt421xdjr.js → 2z9mdtudj8crz.js} +17 -17
  169. package/out/_next/static/chunks/{1iaxzjly2pap1.js → 2zdzgmacaoor9.js} +1 -1
  170. package/out/_next/static/chunks/{0mk8tangq9equ.js → 2zpn7010iqgsy.js} +1 -1
  171. package/out/_next/static/chunks/2zyjw8g4tiu51.js +1 -0
  172. package/out/_next/static/chunks/{2kn_dqzbyabtn.js → 3-_08i4_7yhno.js} +1 -1
  173. package/out/_next/static/chunks/3-irhmtm1q5qw.js +1 -0
  174. package/out/_next/static/chunks/3-k74vn9exnb6.js +1 -0
  175. package/out/_next/static/chunks/{18avgwx9nlxp9.js → 3-x7522okdy-7.js} +1 -1
  176. package/out/_next/static/chunks/{1ll0ta8a2qx1p.js → 309f81l5ucsb_.js} +16 -16
  177. package/out/_next/static/chunks/{1f1vq3goue1w4.js → 31ei992g8gqz9.js} +1 -1
  178. package/out/_next/static/chunks/{0i9oqg-xbq-a9.js → 32vaw89wdwv5_.js} +1 -1
  179. package/out/_next/static/chunks/34y7nx6qmat06.js +1 -0
  180. package/out/_next/static/chunks/{1f92k-xa0pl-3.js → 35aagg46wp139.js} +1 -1
  181. package/out/_next/static/chunks/36rqw8h6ildpl.js +1 -0
  182. package/out/_next/static/chunks/{0zwkmsojeuekb.js → 380ivzcfb4o_3.js} +4 -4
  183. package/out/_next/static/chunks/{01aeari2x_tlz.js → 3a_khw6q6pyh1.js} +1 -1
  184. package/out/_next/static/chunks/3c_31f20z4jrl.js +1 -0
  185. package/out/_next/static/chunks/3ckp70rgr63u9.js +1 -0
  186. package/out/_next/static/chunks/{08rk1dp1wb-gm.js → 3d76e_yd8l_0x.js} +38 -38
  187. package/out/_next/static/chunks/{2p8dbh81chhon.js → 3ed24zmt8qfys.js} +1 -1
  188. package/out/_next/static/chunks/3ez20hi1mxw0w.js +1 -0
  189. package/out/_next/static/chunks/3fdx-rnos5ft-.js +1 -0
  190. package/out/_next/static/chunks/3fgfbxxb-j_bn.js +4 -0
  191. package/out/_next/static/chunks/{03st_hmor6qju.js → 3go-mst7n3udd.js} +1 -1
  192. package/out/_next/static/chunks/{3d0ejsnhbzi-j.js → 3gyyjsot8mdav.js} +1 -1
  193. package/out/_next/static/chunks/{2t9zu9v_g9kr9.js → 3iwf5yeurp57i.js} +3 -3
  194. package/out/_next/static/chunks/{0rruvj1cyflrh.js → 3k-gz8qf-mj-p.js} +1 -1
  195. package/out/_next/static/chunks/{2enlv4yy0t-9j.js → 3kalvwsf11-ss.js} +12 -12
  196. package/out/_next/static/chunks/3lehc5pujwhsz.js +1 -0
  197. package/out/_next/static/chunks/{05l3dluxivcor.js → 3m0ytnc241yfz.js} +1 -1
  198. package/out/_next/static/chunks/3mpe7c3iyxn5h.js +1 -0
  199. package/out/_next/static/chunks/{0tl8j9f8lt0yf.js → 3mvaub8qjdyuc.js} +1 -1
  200. package/out/_next/static/chunks/{0k79ryqehst0b.js → 3n-7bcmfbh299.js} +48 -18
  201. package/out/_next/static/chunks/{38ea9kqlbxt86.js → 3nw7u4bie0-g6.js} +1 -1
  202. package/out/_next/static/chunks/3qatb38-tk_gd.js +1 -0
  203. package/out/_next/static/chunks/3tdcdi_utmoy_.js +1 -0
  204. package/out/_next/static/chunks/{3x6wpv_z5m6rz.js → 3tdzweqszru4y.js} +1 -1
  205. package/out/_next/static/chunks/3tt_ir_va6262.js +1 -0
  206. package/out/_next/static/chunks/{39lxb7c--3_2u.js → 3w4qettzp7khe.js} +32 -32
  207. package/out/_next/static/chunks/{2op88btas-hl8.js → 3w_umk1xtj6to.js} +1 -1
  208. package/out/_next/static/chunks/{1kmsg9ef5djl3.js → 3y_51bmdnc0ey.js} +1 -1
  209. package/out/_next/static/chunks/{1ajmblsp0wj0_.js → 3yr66ufoli71t.js} +1 -1
  210. package/out/_next/static/chunks/{348hdbpkkcq_2.js → 3z4suna4kq4j5.js} +20 -20
  211. package/out/_next/static/chunks/{1y20bv6vl4ylk.js → 41qxc142snm22.js} +1 -1
  212. package/out/_next/static/chunks/{404f_93w2e8ty.js → 41yy4p3-rtyz1.js} +1 -1
  213. package/out/_next/static/chunks/{3fz7tc-4j13uv.js → 425epvuw3yy-n.js} +21 -21
  214. package/out/_next/static/chunks/{1t60cososq7b0.js → 43hwl25uke0l_.js} +1 -1
  215. package/out/_next/static/chunks/43qmngblcab8f.js +1 -0
  216. package/out/_next/static/chunks/{2bn9u9r0rfhvc.js → 442e2l3jzxd-_.js} +1 -1
  217. package/out/_next/static/chunks/{turbopack-16ab30_1p4vhq.js → turbopack-3r8yn0j92tqw_.js} +1 -1
  218. package/out/_not-found/__next._full.txt +8 -8
  219. package/out/_not-found/__next._head.txt +4 -4
  220. package/out/_not-found/__next._index.txt +3 -3
  221. package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
  222. package/out/_not-found/__next._not-found.txt +3 -3
  223. package/out/_not-found/__next._tree.txt +1 -1
  224. package/out/_not-found.html +1 -1
  225. package/out/_not-found.txt +8 -8
  226. package/out/index.html +1 -1
  227. package/out/index.txt +10 -10
  228. package/package.json +10 -10
  229. package/out/_next/static/chunks/0-29qf-q72olu.js +0 -1
  230. package/out/_next/static/chunks/0-tk5ptli--r0.js +0 -1
  231. package/out/_next/static/chunks/0296l8lzd69ns.js +0 -1
  232. package/out/_next/static/chunks/04pk6n3z75dcy.js +0 -1
  233. package/out/_next/static/chunks/06m_64ysu9kn0.js +0 -1
  234. package/out/_next/static/chunks/09p5fltt7o3to.js +0 -1
  235. package/out/_next/static/chunks/0fxfsshoxnnh6.js +0 -4
  236. package/out/_next/static/chunks/0g6u34xkzrpjn.js +0 -1
  237. package/out/_next/static/chunks/0g7p8zp2kxve5.js +0 -1
  238. package/out/_next/static/chunks/0gwa154w_0wuh.js +0 -1
  239. package/out/_next/static/chunks/0h1o0cr3327tt.js +0 -1
  240. package/out/_next/static/chunks/0jf3n5n5yrr4o.js +0 -1
  241. package/out/_next/static/chunks/0k9-8s-jof_gw.js +0 -1
  242. package/out/_next/static/chunks/0kcbdjbdxu_wa.js +0 -1
  243. package/out/_next/static/chunks/0l3wwyl93sqh9.js +0 -1
  244. package/out/_next/static/chunks/0ngiuj5k-or6g.js +0 -1
  245. package/out/_next/static/chunks/0nx_t8iq-324h.js +0 -1
  246. package/out/_next/static/chunks/0oap0o8a8a_cl.js +0 -1
  247. package/out/_next/static/chunks/0ostjlqtwkhqr.js +0 -1
  248. package/out/_next/static/chunks/0vddljjnmozzx.js +0 -1
  249. package/out/_next/static/chunks/0w0sx062qmcsh.js +0 -1
  250. package/out/_next/static/chunks/0x6i6e6863tir.js +0 -1
  251. package/out/_next/static/chunks/1--kelnig7pxx.js +0 -1
  252. package/out/_next/static/chunks/1-ud6hztxiazp.js +0 -1
  253. package/out/_next/static/chunks/10v4rskkrjgd_.js +0 -1
  254. package/out/_next/static/chunks/117ys3lltfmcu.js +0 -1
  255. package/out/_next/static/chunks/13oqt2aoms4f6.js +0 -1
  256. package/out/_next/static/chunks/14klj_i6-l-10.js +0 -1
  257. package/out/_next/static/chunks/17ev44x54_jrd.js +0 -1
  258. package/out/_next/static/chunks/17svumd4o0qnc.js +0 -1
  259. package/out/_next/static/chunks/17v12p4sfraa0.js +0 -1
  260. package/out/_next/static/chunks/1a7cup181rjod.js +0 -1
  261. package/out/_next/static/chunks/1ek5rtpo6rxev.js +0 -1
  262. package/out/_next/static/chunks/1evp209qbr4cr.js +0 -5
  263. package/out/_next/static/chunks/1fa265388524p.js +0 -1
  264. package/out/_next/static/chunks/1g3z43o3h-024.js +0 -31
  265. package/out/_next/static/chunks/1g_27texazqcj.js +0 -1
  266. package/out/_next/static/chunks/1j--a56ji33_x.js +0 -1
  267. package/out/_next/static/chunks/1oara6fkfvgs3.js +0 -1
  268. package/out/_next/static/chunks/1par9m038tiov.js +0 -1
  269. package/out/_next/static/chunks/1vkww9l6lgqag.js +0 -1
  270. package/out/_next/static/chunks/1vpcaaf-0dn7q.js +0 -1
  271. package/out/_next/static/chunks/1vzmzrjhlm1q5.js +0 -1
  272. package/out/_next/static/chunks/1zcrrq1fx8g2y.js +0 -4
  273. package/out/_next/static/chunks/245h82k-g1nxr.js +0 -1
  274. package/out/_next/static/chunks/24cqjhy669845.js +0 -1
  275. package/out/_next/static/chunks/259xlbe69b9tc.js +0 -1
  276. package/out/_next/static/chunks/25ctnyh7njp-d.js +0 -4
  277. package/out/_next/static/chunks/286ggpetqnwyo.js +0 -3
  278. package/out/_next/static/chunks/28f1onw3nywbz.js +0 -1
  279. package/out/_next/static/chunks/28ycc-1519hl2.js +0 -1
  280. package/out/_next/static/chunks/2dhv35o59yzao.js +0 -1
  281. package/out/_next/static/chunks/2ey30qeaob985.js +0 -1
  282. package/out/_next/static/chunks/2f0r-df7tb3pu.js +0 -1
  283. package/out/_next/static/chunks/2gh4z57fem0_v.js +0 -1
  284. package/out/_next/static/chunks/2h1uw3cluvmmo.js +0 -1
  285. package/out/_next/static/chunks/2kje_jvmwsvwo.js +0 -1
  286. package/out/_next/static/chunks/2l_oqx9idxcs8.js +0 -1
  287. package/out/_next/static/chunks/2reukv9c7cq_9.js +0 -1
  288. package/out/_next/static/chunks/2vaoftqgc44cg.js +0 -1
  289. package/out/_next/static/chunks/2y75diyxqlhzl.js +0 -1
  290. package/out/_next/static/chunks/2zljunurdji0q.js +0 -1
  291. package/out/_next/static/chunks/34gp3hvr3j6um.js +0 -1
  292. package/out/_next/static/chunks/34rcp8qrbp522.js +0 -3
  293. package/out/_next/static/chunks/38wksra3d_k-4.js +0 -1
  294. package/out/_next/static/chunks/3ajhvedcs_lzb.js +0 -1
  295. package/out/_next/static/chunks/3bsvp8qhjqdu0.js +0 -1
  296. package/out/_next/static/chunks/3g4e2txsrb2p2.js +0 -1
  297. package/out/_next/static/chunks/3g_h_00xs9u59.js +0 -1
  298. package/out/_next/static/chunks/3hr-mlwi78nov.js +0 -1
  299. package/out/_next/static/chunks/3l6t8b3addlw7.js +0 -1
  300. package/out/_next/static/chunks/3mwoauxszd3mn.js +0 -1
  301. package/out/_next/static/chunks/3ovd8o_usay7j.js +0 -1
  302. package/out/_next/static/chunks/3pdpaqzwhhijn.js +0 -1
  303. package/out/_next/static/chunks/3pyggl13glbdc.js +0 -1
  304. package/out/_next/static/chunks/3rl45k759wfi1.js +0 -1
  305. package/out/_next/static/chunks/3urd7r018nel4.js +0 -1
  306. package/out/_next/static/chunks/3vaho-xrtuchd.js +0 -2
  307. package/out/_next/static/chunks/3wqs57qehored.js +0 -1
  308. package/out/_next/static/chunks/40acif2eh_unv.js +0 -1
  309. package/out/_next/static/chunks/413o2v11bygt5.js +0 -1
  310. package/out/_next/static/chunks/4227p7752rnny.js +0 -1
  311. package/out/_next/static/chunks/42oyfkhdvb-u3.js +0 -1
  312. /package/out/_next/static/{M5esRfAVlWSeBcfLV_jVr → yF_tmb8VExvESewet-_To}/_buildManifest.js +0 -0
  313. /package/out/_next/static/{M5esRfAVlWSeBcfLV_jVr → yF_tmb8VExvESewet-_To}/_clientMiddlewareManifest.js +0 -0
  314. /package/out/_next/static/{M5esRfAVlWSeBcfLV_jVr → yF_tmb8VExvESewet-_To}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63913,84782,54471,e=>{"use strict";e.s(["IsWrapper",0,function(e){return void 0===e.getPipelineContext}],63913),e.s(["WebGLShaderProcessor",0,class{constructor(){this.shaderLanguage=0}postProcessor(e,t,r,i,s){return s.drawBuffersExtensionDisabled&&(e=e.replace(/#extension.+GL_EXT_draw_buffers.+(enable|require)/g,"")),e}}],84782);let t=/(flat\s)?\s*varying\s*.*/;e.s(["WebGL2ShaderProcessor",0,class{constructor(){this.shaderLanguage=0}attributeProcessor(e){return e.replace("attribute","in")}varyingCheck(e,r){return t.test(e)}varyingProcessor(e,t){return e.replace("varying",t?"in":"out")}postProcessor(e,t,r){let i=-1!==e.search(/#extension.+GL_EXT_draw_buffers.+require/);if(e=(e=e.replace(/#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g,"")).replace(/texture2D\s*\(/g,"texture("),r){let r=-1!==e.search(/layout *\(location *= *0\) *out/g),s=-1!==t.indexOf("#define DUAL_SOURCE_BLENDING");s&&(e="#extension GL_EXT_blend_func_extended : require\n"+e),e=(e=(e=(e=(e=(e=(e=e.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/void\s+?main\s*\(/g,(i||r?"":s?"layout(location = 0, index = 0) out vec4 glFragColor;\nlayout(location = 0, index = 1) out vec4 glFragColor2;\n":"layout(location = 0) out vec4 glFragColor;\n")+"void main(")}else if(t.indexOf("#define VERTEXOUTPUT_INVARIANT")>=0&&(e="invariant gl_Position;\n"+e),-1!==t.indexOf("#define MULTIVIEW"))return"#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+e;return e}}],54471)},2945,e=>{"use strict";class t{get underlyingResource(){return null}constructor(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=t._Counter++}}t._Counter=0,e.s(["DataBuffer",0,t])},25282,42424,69178,57879,e=>{"use strict";var t,r,i,s,a,n,_,l,h=e.i(5313),u=e.i(68934),o=e.i(20307),c=e.i(63913),g=e.i(83464),f=e.i(75865),d=e.i(84782),E=e.i(54471),T=e.i(2945);class R extends T.DataBuffer{constructor(e){super(),this._buffer=e}get underlyingResource(){return this._buffer}}e.s(["WebGLDataBuffer",0,R],42424);var p=e.i(65679);class A{get underlyingResource(){return this._webGLTexture}constructor(e=null,t){if(this._MSAARenderBuffers=null,this._context=t,!e&&!(e=t.createTexture()))throw Error("Unable to create webGL texture");this.set(e)}setUsage(){}set(e){this._webGLTexture=e}reset(){this._webGLTexture=null,this._MSAARenderBuffers=null}addMSAARenderBuffer(e){this._MSAARenderBuffers||(this._MSAARenderBuffers=[]),this._MSAARenderBuffers.push(e)}releaseMSAARenderBuffers(){if(this._MSAARenderBuffers){for(let e of this._MSAARenderBuffers)this._context.deleteRenderbuffer(e);this._MSAARenderBuffers=null}}getMSAARenderBuffer(e=0){return this._MSAARenderBuffers?.[e]??null}release(){this.releaseMSAARenderBuffers(),this._webGLTexture&&this._context.deleteTexture(this._webGLTexture),this.reset()}}e.s(["WebGLHardwareTexture",0,A],69178);var x=e.i(58727),S=e.i(31008),b=e.i(7642);function m(e){return 13===e||14===e||15===e||16===e||17===e||18===e||19===e}function B(e){return 13===e||17===e||18===e||19===e}e.s(["HasStencilAspect",0,B,"IsDepthTexture",0,m],57879);var C=e.i(28885),P=e.i(54670);class L{}class M extends o.AbstractEngine{get name(){return this._name}set name(e){this._name=e}get version(){return this._webGLVersion}static get ShadersRepository(){return h.Effect.ShadersRepository}static set ShadersRepository(e){h.Effect.ShadersRepository=e}get supportsUniformBuffers(){return this.webGLVersion>1&&!this.disableUniformBuffers}get needPOTTextures(){return this._webGLVersion<2||this.forcePOTTextures}get _supportsHardwareTextureRescaling(){return!1}set framebufferDimensionsObject(e){this._framebufferDimensionsObject=e}snapshotRenderingReset(){this.snapshotRendering=!1}constructor(e,t,r,i){let s;if(r=r||{},super(t??r.antialias,r,i),this._name="WebGL",this.forcePOTTextures=!1,this.validateShaderPrograms=!1,this.disableUniformBuffers=!1,this._webGLVersion=1,this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=[],this._currentFramebuffer=null,this._dummyFramebuffer=null,this._currentBufferPointers=[],this._currentInstanceLocations=[],this._currentInstanceBuffers=[],this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=[],this._maxSimultaneousTextures=0,this._maxMSAASamplesOverride=null,this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={},!e)return;if(e.getContext){if(s=e,void 0===r.preserveDrawingBuffer&&(r.preserveDrawingBuffer=!1),void 0===r.xrCompatible&&(r.xrCompatible=!1),navigator&&navigator.userAgent){this._setupMobileChecks();const e=navigator.userAgent;for(const t of M.ExceptionList){const i=t.key,s=t.targets;if(new RegExp(i).test(e)){if(t.capture&&t.captureConstraint){const r=t.capture,i=t.captureConstraint,s=new RegExp(r).exec(e);if(s&&s.length>0&&parseInt(s[s.length-1])>=i)continue}for(const e of s)switch(e){case"uniformBuffer":this.disableUniformBuffers=!0;break;case"vao":this.disableVertexArrayObjects=!0;break;case"antialias":r.antialias=!1;break;case"maxMSAASamples":this._maxMSAASamplesOverride=1}}}}if(this._doNotHandleContextLost?this._onContextLost=()=>{(0,u.deleteStateObject)(this._gl)}:(this._onContextLost=e=>{e.preventDefault(),this._contextWasLost=!0,(0,u.deleteStateObject)(this._gl),g.Logger.Warn("WebGL context lost."),this.onContextLostObservable.notifyObservers(this)},this._onContextRestored=()=>{this._restoreEngineAfterContextLost(()=>this._initGLContext())},s.addEventListener("webglcontextrestored",this._onContextRestored,!1),r.powerPreference=r.powerPreference||"high-performance"),s.addEventListener("webglcontextlost",this._onContextLost,!1),this._badDesktopOS&&(r.xrCompatible=!1),!r.disableWebGL2Support)try{this._gl=s.getContext("webgl2",r)||s.getContext("experimental-webgl2",r),this._gl&&(this._webGLVersion=2,this._shaderPlatformName="WEBGL2",this._gl.deleteQuery||(this._webGLVersion=1,this._shaderPlatformName="WEBGL1"))}catch(e){}if(!this._gl){if(!s)throw Error("The provided canvas is null or undefined.");try{this._gl=s.getContext("webgl",r)||s.getContext("experimental-webgl",r)}catch(e){throw Error("WebGL not supported",{cause:e})}}if(!this._gl)throw Error("WebGL not supported")}else{this._gl=e,s=this._gl.canvas,this._gl.renderbufferStorageMultisample?(this._webGLVersion=2,this._shaderPlatformName="WEBGL2"):this._shaderPlatformName="WEBGL1";const t=this._gl.getContextAttributes();t&&(r.stencil=t.stencil)}this._sharedInit(s),this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),void 0!==r.useHighPrecisionFloats&&(this._highPrecisionShadersAllowed=r.useHighPrecisionFloats),this.resize(),this._initGLContext(),this._initFeatures();for(let e=0;e<this._caps.maxVertexAttribs;e++)this._currentBufferPointers[e]=new L;this._shaderProcessor=this.webGLVersion>1?new E.WebGL2ShaderProcessor:new d.WebGLShaderProcessor;const a=`Babylon.js v${M.Version}`;g.Logger.Log(a+` - ${this.description}`),this._renderingCanvas&&this._renderingCanvas.setAttribute&&this._renderingCanvas.setAttribute("data-engine",a);const n=(0,u.getStateObject)(this._gl);n.validateShaderPrograms=this.validateShaderPrograms,n.parallelShaderCompile=this._caps.parallelShaderCompile}_clearEmptyResources(){this._dummyFramebuffer=null,super._clearEmptyResources()}_getShaderProcessingContext(e){return null}areAllEffectsReady(){for(let e in this._compiledEffects)if(!this._compiledEffects[e].isReady())return!1;return!0}_initGLContext(){this._caps={maxTexturesImageUnits:this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),maxCombinedTexturesImageUnits:this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),maxVertexTextureImageUnits:this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize:this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),maxSamples:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),shaderFloatPrecision:0,parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile")||void 0,standardDerivatives:this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),s3tc_srgb:this._gl.getExtension("WEBGL_compressed_texture_s3tc_srgb")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc_srgb"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),fragmentDepthSupported:this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),supportOcclusionQuery:this._webGLVersion>1,canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float")),blendFloat:null!==this._gl.getExtension("EXT_float_blend"),supportFloatTexturesResolve:!1,rg11b10ufColorRenderable:!1,colorBufferHalfFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_half_float")),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),texelFetch:1!==this._webGLVersion,blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1,canUseGLInstanceID:this._webGLVersion>1,canUseGLVertexID:this._webGLVersion>1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:this._webGLVersion>1,textureMaxLevel:this._webGLVersion>1,texture2DArrayMaxLayerCount:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_ARRAY_TEXTURE_LAYERS):128,disableMorphTargetTexture:!1,textureNorm16:!!this._gl.getExtension("EXT_texture_norm16"),blendParametersPerTarget:!1,dualSourceBlending:!1,supportReadWriteStorageTextures:!1},this._caps.supportFloatTexturesResolve=this._caps.colorBufferFloat,this._caps.rg11b10ufColorRenderable=this._caps.colorBufferFloat,this._glVersion=this._gl.getParameter(this._gl.VERSION);let e=this._gl.getExtension("WEBGL_debug_renderer_info");null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor=this._gl.getParameter(this._gl.VENDOR)||"Unknown vendor"),this._glRenderer||(this._glRenderer=this._gl.getParameter(this._gl.RENDERER)||"Unknown renderer"),36193!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=36193),34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=(this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)??0)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!!(this._caps.textureFloat&&this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!!(this._caps.textureFloat&&this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._caps.textureNorm16&&(this._gl.R16_EXT=33322,this._gl.RG16_EXT=33324,this._gl.RGB16_EXT=32852,this._gl.RGBA16_EXT=32859,this._gl.R16_SNORM_EXT=36760,this._gl.RG16_SNORM_EXT=36761,this._gl.RGB16_SNORM_EXT=36762,this._gl.RGBA16_SNORM_EXT=36763);let t=this._gl.getExtension("OES_draw_buffers_indexed");if(this._caps.blendParametersPerTarget=!!t,this._alphaState=new C.AlphaState(this._caps.blendParametersPerTarget),t&&(this._gl.blendEquationSeparateIndexed=t.blendEquationSeparateiOES.bind(t),this._gl.blendEquationIndexed=t.blendEquationiOES.bind(t),this._gl.blendFuncSeparateIndexed=t.blendFuncSeparateiOES.bind(t),this._gl.blendFuncIndexed=t.blendFunciOES.bind(t),this._gl.colorMaskIndexed=t.colorMaskiOES.bind(t),this._gl.disableIndexed=t.disableiOES.bind(t),this._gl.enableIndexed=t.enableiOES.bind(t)),this._caps.dualSourceBlending=!!this._gl.getExtension("WEBGL_blend_func_extended"),this._caps.astc&&(this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR),this._caps.bptc&&(this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT),this._caps.s3tc_srgb&&(this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),this._caps.etc2&&(this._gl.COMPRESSED_SRGB8_ETC2=this._caps.etc2.COMPRESSED_SRGB8_ETC2,this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC),this._webGLVersion>1&&5131!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=null!==this._maxMSAASamplesOverride?this._maxMSAASamplesOverride:this._gl.getParameter(this._gl.MAX_SAMPLES),this._caps.maxDrawBuffers=this._gl.getParameter(this._gl.MAX_DRAW_BUFFERS);else{let e=this._gl.getExtension("WEBGL_draw_buffers");if(null!==e){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=e.drawBuffersWEBGL.bind(e),this._caps.maxDrawBuffers=this._gl.getParameter(e.MAX_DRAW_BUFFERS_WEBGL),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(let t=0;t<16;t++)this._gl["COLOR_ATTACHMENT"+t+"_WEBGL"]=e["COLOR_ATTACHMENT"+t+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{let e=this._gl.getExtension("WEBGL_depth_texture");null!=e&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=e.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{let e=this._gl.getExtension("OES_vertex_array_object");null!=e&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=e.createVertexArrayOES.bind(e),this._gl.bindVertexArray=e.bindVertexArrayOES.bind(e),this._gl.deleteVertexArray=e.deleteVertexArrayOES.bind(e))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{let e=this._gl.getExtension("ANGLE_instanced_arrays");null!=e?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=e.drawArraysInstancedANGLE.bind(e),this._gl.drawElementsInstanced=e.drawElementsInstancedANGLE.bind(e),this._gl.vertexAttribDivisor=e.vertexAttribDivisorANGLE.bind(e)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){let e=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),t=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);if(e&&t&&(this._caps.highPrecisionShaderSupported=0!==e.precision&&0!==t.precision,this._caps.shaderFloatPrecision=Math.min(e.precision,t.precision)),!this._shouldUseHighPrecisionShader){let e=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.MEDIUM_FLOAT),t=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.MEDIUM_FLOAT);e&&t&&(this._caps.shaderFloatPrecision=Math.min(e.precision,t.precision))}this._caps.shaderFloatPrecision<10&&(this._caps.shaderFloatPrecision=10)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{let e=this._gl.getExtension("EXT_blend_minmax");null!=e&&(this._caps.blendMinMax=!0,this._gl.MAX=e.MAX_EXT,this._gl.MIN=e.MIN_EXT)}if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1)this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:WebGL2RenderingContext.SRGB,SRGB8:WebGL2RenderingContext.SRGB8,SRGB8_ALPHA8:WebGL2RenderingContext.SRGB8_ALPHA8};else{let e=this._gl.getExtension("EXT_sRGB");null!=e&&(this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:e.SRGB_EXT,SRGB8:e.SRGB_ALPHA_EXT,SRGB8_ALPHA8:e.SRGB_ALPHA_EXT})}if(this._creationOptions){let e=this._creationOptions.forceSRGBBufferSupportState;void 0!==e&&(this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&e)}}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(let e=0;e<this._maxSimultaneousTextures;e++)this._nextFreeTextureSlots.push(e);"Mali-G72"===this._glRenderer&&(this._caps.disableMorphTargetTexture=!0)}_initFeatures(){this._features={forceBitmapOverHTMLImageElement:"u"<typeof HTMLImageElement,supportRenderAndCopyToLodForFloatTextures:1!==this._webGLVersion,supportDepthStencilTexture:1!==this._webGLVersion,supportShadowSamplers:1!==this._webGLVersion,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:1!==this._webGLVersion,trackUbosInFrame:!1,checkUbosContentBeforeUpload:!1,supportCSM:1!==this._webGLVersion,basisNeedsPOT:1===this._webGLVersion,support3DTextures:1!==this._webGLVersion,needTypeSuffixInShaderConstants:1!==this._webGLVersion,supportMSAA:1!==this._webGLVersion,supportSSAO2:1!==this._webGLVersion,supportIBLShadows:1!==this._webGLVersion,supportExtendedTextureFormats:1!==this._webGLVersion,supportSwitchCaseInShader:1!==this._webGLVersion,supportSyncTextureRead:!0,needsInvertingBitmap:!0,useUBOBindingCache:!0,needShaderCodeInlining:!1,needToAlwaysBindUniformBuffers:!1,supportRenderPasses:!1,supportSpriteInstancing:!0,forceVertexBufferStrideAndOffsetMultiple4Bytes:!1,_checkNonFloatVertexBuffersDontRecreatePipelineContext:!1}}get webGLVersion(){return this._webGLVersion}getClassName(){return"ThinEngine"}_prepareWorkingCanvas(){if(this._workingCanvas)return;this._workingCanvas=this.createCanvas(1,1);let e=this._workingCanvas.getContext("2d");e&&(this._workingContext=e)}getInfo(){return this.getGlInfo()}getGlInfo(){return{vendor:this._glVendor,renderer:this._glRenderer,version:this._glVersion}}extractDriverInfo(){let e=this.getGlInfo();return e&&e.renderer?e.renderer:""}getRenderWidth(e=!1){return!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth}getRenderHeight(e=!1){return!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight}clear(e,t,r,i=!1,s=0){let a=this.stencilStateComposer.useStencilGlobalOnly;this.stencilStateComposer.useStencilGlobalOnly=!0,this.applyStates(),this.stencilStateComposer.useStencilGlobalOnly=a;let n=0;if(t&&e){let t=!0;if(this._currentRenderTarget){let r=this._currentRenderTarget.texture?.format;if(8===r||9===r||10===r||11===r){let r=this._currentRenderTarget.texture?.type;7===r||5===r?(M._TempClearColorUint32[0]=255*e.r,M._TempClearColorUint32[1]=255*e.g,M._TempClearColorUint32[2]=255*e.b,M._TempClearColorUint32[3]=255*e.a,this._gl.clearBufferuiv(this._gl.COLOR,0,M._TempClearColorUint32)):(M._TempClearColorInt32[0]=255*e.r,M._TempClearColorInt32[1]=255*e.g,M._TempClearColorInt32[2]=255*e.b,M._TempClearColorInt32[3]=255*e.a,this._gl.clearBufferiv(this._gl.COLOR,0,M._TempClearColorInt32)),t=!1}}t&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),n|=this._gl.COLOR_BUFFER_BIT)}r&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GEQUAL,this._gl.clearDepth(0)):this._gl.clearDepth(1),n|=this._gl.DEPTH_BUFFER_BIT),i&&(this._gl.clearStencil(s),n|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(n)}_viewport(e,t,r,i){(e!==this._viewportCached.x||t!==this._viewportCached.y||r!==this._viewportCached.z||i!==this._viewportCached.w)&&(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=r,this._viewportCached.w=i,this._gl.viewport(e,t,r,i))}endFrame(){super.endFrame(),this._badOS&&this.flushFramebuffer()}get performanceMonitor(){throw Error("Not Supported by ThinEngine")}bindFramebuffer(e,t=0,r,i,s,a=0,n=0){this._currentRenderTarget&&this._resolveAndGenerateMipMapsFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(e._framebuffer);let _=this._gl;e.isMulti||(e.is2DArray||e.is3D?(_.framebufferTextureLayer(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,e.texture._hardwareTexture?.underlyingResource,a,n),e._currentLOD=a):e.isCube?_.framebufferTexture2D(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,_.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.texture._hardwareTexture?.underlyingResource,a):e._currentLOD!==a&&(_.framebufferTexture2D(_.FRAMEBUFFER,_.COLOR_ATTACHMENT0,_.TEXTURE_2D,e.texture._hardwareTexture?.underlyingResource,a),e._currentLOD=a));let l=e._depthStencilTexture;if(l){e.is3D&&(e.texture.width!==l.width||e.texture.height!==l.height||e.texture.depth!==l.depth)&&g.Logger.Warn("Depth/Stencil attachment for 3D target must have same dimensions as color attachment");let r=e._depthStencilTextureWithStencil?_.DEPTH_STENCIL_ATTACHMENT:_.DEPTH_ATTACHMENT;e.is2DArray||e.is3D?_.framebufferTextureLayer(_.FRAMEBUFFER,r,l._hardwareTexture?.underlyingResource,a,n):e.isCube?_.framebufferTexture2D(_.FRAMEBUFFER,r,_.TEXTURE_CUBE_MAP_POSITIVE_X+t,l._hardwareTexture?.underlyingResource,a):_.framebufferTexture2D(_.FRAMEBUFFER,r,_.TEXTURE_2D,l._hardwareTexture?.underlyingResource,a)}e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._MSAAFramebuffer),this._cachedViewport&&!s?this.setViewport(this._cachedViewport,r,i):(!r&&(r=e.width,a&&(r/=Math.pow(2,a))),!i&&(i=e.height,a&&(i/=Math.pow(2,a))),this._viewport(0,0,r,i)),this.wipeCaches()}setStateCullFaceType(e,t){let r=this.cullBackFaces??e??!0?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==r||t)&&(this._depthCullingState.cullFace=r)}setState(e,t=0,r,i=!1,s,a,n=0){(this._depthCullingState.cull!==e||r)&&(this._depthCullingState.cull=e),this.setStateCullFaceType(s,r),this.setZOffset(t),this.setZOffsetUnits(n);let _=i?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==_||r)&&(this._depthCullingState.frontFace=_),this._stencilStateComposer.stencilMaterial=a}_resolveAndGenerateMipMapsFramebuffer(e,t=!1){e.disableAutomaticMSAAResolve||(e.isMulti?this.resolveMultiFramebuffer(e):this.resolveFramebuffer(e)),t||(e.isMulti?this.generateMipMapsMultiFramebuffer(e):this.generateMipMapsFramebuffer(e))}_bindUnboundFramebuffer(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)}_currentFrameBufferIsDefaultFrameBuffer(){return null===this._currentFramebuffer}generateMipmaps(e){let t=this._getTextureTarget(e);this._bindTextureDirectly(t,e,!0),this._gl.generateMipmap(t),this._bindTextureDirectly(t,null)}unBindFramebuffer(e,t,r){this._currentRenderTarget=null,this._resolveAndGenerateMipMapsFramebuffer(e,t),r&&(e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._framebuffer),r()),this._bindUnboundFramebuffer(null)}generateMipMapsFramebuffer(e){!e.isMulti&&e.texture?.generateMipMaps&&!e.isCube&&this.generateMipmaps(e.texture)}resolveFramebuffer(e){let t=this._gl;if(!e._MSAAFramebuffer||e.isMulti)return;let r=e.resolveMSAAColors?t.COLOR_BUFFER_BIT:0;r|=e._generateDepthBuffer&&e.resolveMSAADepth?t.DEPTH_BUFFER_BIT:0,r|=e._generateStencilBuffer&&e.resolveMSAAStencil?t.STENCIL_BUFFER_BIT:0,t.bindFramebuffer(t.READ_FRAMEBUFFER,e._MSAAFramebuffer),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,e._framebuffer),t.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,r,t.NEAREST)}flushFramebuffer(){this._gl.flush()}restoreDefaultFramebuffer(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()}_resetVertexBufferBinding(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null}createVertexBuffer(e,t,r){return this._createVertexBuffer(e,this._gl.STATIC_DRAW)}_createVertexBuffer(e,t){let r=this._gl.createBuffer();if(!r)throw Error("Unable to create vertex buffer");let i=new R(r);return this.bindArrayBuffer(i),"number"!=typeof e?e instanceof Array?(this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),t),i.capacity=4*e.length):(this._gl.bufferData(this._gl.ARRAY_BUFFER,e,t),i.capacity=e.byteLength):(this._gl.bufferData(this._gl.ARRAY_BUFFER,new Uint8Array(e),t),i.capacity=e),this._resetVertexBufferBinding(),i.references=1,i}createDynamicVertexBuffer(e,t){return this._createVertexBuffer(e,this._gl.DYNAMIC_DRAW)}_resetIndexBufferBinding(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null}createIndexBuffer(e,t,r){let i=this._gl.createBuffer(),s=new R(i);if(!i)throw Error("Unable to create index buffer");this.bindIndexBuffer(s);let a=this._normalizeIndexData(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,a,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),s.references=1,s.is32Bits=4===a.BYTES_PER_ELEMENT,s}_normalizeIndexData(e){if(2===e.BYTES_PER_ELEMENT)return e;if(this._caps.uintIndices){if(e instanceof Uint32Array)return e;else for(let t=0;t<e.length;t++)if(e[t]>=65535)return new Uint32Array(e)}return new Uint16Array(e)}bindArrayBuffer(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ARRAY_BUFFER)}bindUniformBlock(e,t,r){let i=e.program,s=this._gl.getUniformBlockIndex(i,t);this._gl.uniformBlockBinding(i,s,r)}bindIndexBuffer(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)}_bindBuffer(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)}updateArrayBuffer(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)}_vertexAttribPointer(e,t,r,i,s,a,n){let _=this._currentBufferPointers[t];if(!_)return;let l=!1;_.active?(_.buffer!==e&&(_.buffer=e,l=!0),_.size!==r&&(_.size=r,l=!0),_.type!==i&&(_.type=i,l=!0),_.normalized!==s&&(_.normalized=s,l=!0),_.stride!==a&&(_.stride=a,l=!0),_.offset!==n&&(_.offset=n,l=!0)):(l=!0,_.active=!0,_.index=t,_.size=r,_.type=i,_.normalized=s,_.stride=a,_.offset=n,_.buffer=e),(l||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),i===this._gl.UNSIGNED_INT||i===this._gl.INT?this._gl.vertexAttribIPointer(t,r,i,a,n):this._gl.vertexAttribPointer(t,r,i,s,a,n))}_bindIndexBufferWithCache(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)}_bindVertexBuffersAttributes(e,t,r){let i=t.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(let s=0;s<i.length;s++){let a=t.getAttributeLocation(s);if(a>=0){let t=i[s],n=null;if(r&&(n=r[t]),n||(n=e[t]),!n)continue;this._gl.enableVertexAttribArray(a),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[a]=!0);let _=n.getBuffer();_&&(this._vertexAttribPointer(_,a,n.getSize(),n.type,n.normalized,n.byteStride,n.byteOffset),n.getIsInstanced()&&(this._gl.vertexAttribDivisor(a,n.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(a),this._currentInstanceBuffers.push(_))))}}}recordVertexArrayObject(e,t,r,i){let s=this._gl.createVertexArray();if(!s)throw Error("Unable to create VAO");return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(s),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,r,i),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),s}bindVertexArrayObject(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)}bindBuffersDirectly(e,t,r,i,s){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==s){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=s;let t=s.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();let a=0;for(let n=0;n<t;n++)if(n<r.length){let t=s.getAttributeLocation(n);t>=0&&(this._gl.enableVertexAttribArray(t),this._vertexAttribArraysEnabled[t]=!0,this._vertexAttribPointer(e,t,r[n],this._gl.FLOAT,!1,i,a)),a+=4*r[n]}}this._bindIndexBufferWithCache(t)}_unbindVertexArrayObject(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))}bindBuffers(e,t,r,i){(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r)&&(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r,this._bindVertexBuffersAttributes(e,r,i)),this._bindIndexBufferWithCache(t)}unbindInstanceAttributes(){let e;for(let t=0,r=this._currentInstanceLocations.length;t<r;t++){let r=this._currentInstanceBuffers[t];e!=r&&r.references&&(e=r,this.bindArrayBuffer(r));let i=this._currentInstanceLocations[t];this._gl.vertexAttribDivisor(i,0)}this._currentInstanceBuffers.length=0,this._currentInstanceLocations.length=0}releaseVertexArrayObject(e){this._gl.deleteVertexArray(e)}_releaseBuffer(e){return e.references--,0===e.references&&(this._deleteBuffer(e),!0)}_deleteBuffer(e){this._gl.deleteBuffer(e.underlyingResource)}updateAndBindInstancesBuffer(e,t,r){if(this.bindArrayBuffer(e),t&&this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t),void 0!==r[0].index)this.bindInstancesBuffer(e,r,!0);else for(let t=0;t<4;t++){let i=r[t];this._vertexAttribArraysEnabled[i]||(this._gl.enableVertexAttribArray(i),this._vertexAttribArraysEnabled[i]=!0),this._vertexAttribPointer(e,i,4,this._gl.FLOAT,!1,64,16*t),this._gl.vertexAttribDivisor(i,1),this._currentInstanceLocations.push(i),this._currentInstanceBuffers.push(e)}}bindInstancesBuffer(e,t,r=!0){this.bindArrayBuffer(e);let i=0;if(r)for(let e=0;e<t.length;e++)i+=4*t[e].attributeSize;for(let r=0;r<t.length;r++){let s=t[r];void 0===s.index&&(s.index=this._currentEffect.getAttributeLocationByName(s.attributeName)),s.index<0||(this._vertexAttribArraysEnabled[s.index]||(this._gl.enableVertexAttribArray(s.index),this._vertexAttribArraysEnabled[s.index]=!0),this._vertexAttribPointer(e,s.index,s.attributeSize,s.attributeType||this._gl.FLOAT,s.normalized||!1,i,s.offset),this._gl.vertexAttribDivisor(s.index,void 0===s.divisor?1:s.divisor),this._currentInstanceLocations.push(s.index),this._currentInstanceBuffers.push(e))}}disableInstanceAttributeByName(e){if(!this._currentEffect)return;let t=this._currentEffect.getAttributeLocationByName(e);this.disableInstanceAttribute(t)}disableInstanceAttribute(e){let t,r=!1;for(;-1!==(t=this._currentInstanceLocations.indexOf(e));)this._currentInstanceLocations.splice(t,1),this._currentInstanceBuffers.splice(t,1),r=!0;r&&(this._gl.vertexAttribDivisor(e,0),this.disableAttributeByIndex(e))}disableAttributeByIndex(e){this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1}draw(e,t,r,i){this.drawElementsType(+!e,t,r,i)}drawPointClouds(e,t,r){this.drawArraysType(2,e,t,r)}drawUnIndexed(e,t,r,i){this.drawArraysType(+!e,t,r,i)}drawElementsType(e,t,r,i){this.applyStates(),this._reportDrawCall();let s=this._drawMode(e),a=this._uintIndicesCurrentlySet?this._gl.UNSIGNED_INT:this._gl.UNSIGNED_SHORT,n=this._uintIndicesCurrentlySet?4:2;i?this._gl.drawElementsInstanced(s,r,a,t*n,i):this._gl.drawElements(s,r,a,t*n)}drawArraysType(e,t,r,i){this.applyStates(),this._reportDrawCall();let s=this._drawMode(e);i?this._gl.drawArraysInstanced(s,t,r,i):this._gl.drawArrays(s,t,r)}_drawMode(e){switch(e){case 0:default:return this._gl.TRIANGLES;case 2:case 3:return this._gl.POINTS;case 1:case 4:return this._gl.LINES;case 5:return this._gl.LINE_LOOP;case 6:return this._gl.LINE_STRIP;case 7:return this._gl.TRIANGLE_STRIP;case 8:return this._gl.TRIANGLE_FAN}}_releaseEffect(e){this._compiledEffects[e._key]&&delete this._compiledEffects[e._key];let t=e.getPipelineContext();t&&this._deletePipelineContext(t)}_deletePipelineContext(e){e&&e.program&&(e.program.__SPECTOR_rebuildProgram=null,(0,b.resetCachedPipeline)(e),this._gl&&(this._currentProgram===e.program&&this._setProgram(null),this._gl.deleteProgram(e.program)))}_getGlobalDefines(e){return(0,S._GetGlobalDefines)(e,this.isNDCHalfZRange,this.useReverseDepthBuffer,this.useExactSrgbConversions)}createEffect(e,t,r,i,s,a,n,_,l,o=0,c){let g="string"==typeof e?e:e.vertexToken||e.vertexSource||e.vertexElement||e.vertex,f="string"==typeof e?e:e.fragmentToken||e.fragmentSource||e.fragmentElement||e.fragment,d=this._getGlobalDefines(),E=void 0!==t.attributes,T=s??t.defines??"";d&&(T+=d);let R=g+"+"+f+"@"+T;if(this._compiledEffects[R]){let e=this._compiledEffects[R];return n&&e.isReady()&&n(e),e._refCount++,e}this._gl&&(0,u.getStateObject)(this._gl);let p=new h.Effect(e,t,E?this:r,i,this,s,a,n,_,l,R,t.shaderLanguage??o,t.extraInitializationsAsync??c);return this._compiledEffects[R]=p,p}_getShaderSource(e){return this._gl.getShaderSource(e)}createRawShaderProgram(e,t,r,i,s=null){let a=(0,u.getStateObject)(this._gl);return a._contextWasLost=this._contextWasLost,a.validateShaderPrograms=this.validateShaderPrograms,(0,u.createRawShaderProgram)(e,t,r,i||this._gl,s)}createShaderProgram(e,t,r,i,s,a=null){let n=(0,u.getStateObject)(this._gl);return n._contextWasLost=this._contextWasLost,n.validateShaderPrograms=this.validateShaderPrograms,(0,u.createShaderProgram)(e,t,r,i,s||this._gl,a)}inlineShaderCode(e){return e}createPipelineContext(e){this._gl&&((0,u.getStateObject)(this._gl).parallelShaderCompile=this._caps.parallelShaderCompile);let t=(0,u.createPipelineContext)(this._gl,e);return t.engine=this,t}createMaterialContext(){}createDrawContext(){}_finalizePipelineContext(e){return(0,u._finalizePipelineContext)(e,this._gl,this.validateShaderPrograms)}_preparePipelineContextAsync(e,t,r,i,s,a,n,_,l,h,o){let c=(0,u.getStateObject)(this._gl);return c._contextWasLost=this._contextWasLost,c.validateShaderPrograms=this.validateShaderPrograms,c._createShaderProgramInjection=this._createShaderProgram.bind(this),c.createRawShaderProgramInjection=this.createRawShaderProgram.bind(this),c.createShaderProgramInjection=this.createShaderProgram.bind(this),c.loadFileInjection=this._loadFile.bind(this),(0,u._preparePipelineContext)(e,t,r,i,s,a,n,_,l,h,o)}_createShaderProgram(e,t,r,i,s=null){return(0,u._createShaderProgram)(e,t,r,i,s)}_isRenderingStateCompiled(e){return!this._isDisposed&&(0,u._isRenderingStateCompiled)(e,this._gl,this.validateShaderPrograms)}_executeWhenRenderingStateIsCompiled(e,t){(0,u._executeWhenRenderingStateIsCompiled)(e,t)}getUniforms(e,t){let r=[];for(let i=0;i<t.length;i++)r.push(this._gl.getUniformLocation(e.program,t[i]));return r}getAttributes(e,t){let r=[];for(let i=0;i<t.length;i++)try{r.push(this._gl.getAttribLocation(e.program,t[i]))}catch(e){r.push(-1)}return r}enableEffect(e){(e=null!==e&&(0,c.IsWrapper)(e)?e.effect:e)&&e!==this._currentEffect&&(this._stencilStateComposer.stencilMaterial=void 0,this.bindSamplers(e),this._currentEffect=e,e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))}setInt(e,t){return!!e&&(this._gl.uniform1i(e,t),!0)}setInt2(e,t,r){return!!e&&(this._gl.uniform2i(e,t,r),!0)}setInt3(e,t,r,i){return!!e&&(this._gl.uniform3i(e,t,r,i),!0)}setInt4(e,t,r,i,s){return!!e&&(this._gl.uniform4i(e,t,r,i,s),!0)}setIntArray(e,t){return!!e&&(this._gl.uniform1iv(e,t),!0)}setIntArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2iv(e,t),!0)}setIntArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3iv(e,t),!0)}setIntArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4iv(e,t),!0)}setUInt(e,t){return!!e&&(this._gl.uniform1ui(e,t),!0)}setUInt2(e,t,r){return!!e&&(this._gl.uniform2ui(e,t,r),!0)}setUInt3(e,t,r,i){return!!e&&(this._gl.uniform3ui(e,t,r,i),!0)}setUInt4(e,t,r,i,s){return!!e&&(this._gl.uniform4ui(e,t,r,i,s),!0)}setUIntArray(e,t){return!!e&&(this._gl.uniform1uiv(e,t),!0)}setUIntArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2uiv(e,t),!0)}setUIntArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3uiv(e,t),!0)}setUIntArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4uiv(e,t),!0)}setArray(e,t){return!!e&&!(t.length<1)&&(this._gl.uniform1fv(e,t),!0)}setArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2fv(e,t),!0)}setArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3fv(e,t),!0)}setArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4fv(e,t),!0)}setMatrices(e,t){return!!e&&(this._gl.uniformMatrix4fv(e,!1,t),!0)}setMatrix3x3(e,t){return!!e&&(this._gl.uniformMatrix3fv(e,!1,t),!0)}setMatrix2x2(e,t){return!!e&&(this._gl.uniformMatrix2fv(e,!1,t),!0)}setFloat(e,t){return!!e&&(this._gl.uniform1f(e,t),!0)}setFloat2(e,t,r){return!!e&&(this._gl.uniform2f(e,t,r),!0)}setFloat3(e,t,r,i){return!!e&&(this._gl.uniform3f(e,t,r,i),!0)}setFloat4(e,t,r,i,s){return!!e&&(this._gl.uniform4f(e,t,r,i,s),!0)}applyStates(){if(this._depthCullingState.apply(this._gl),this._stencilStateComposer.apply(this._gl),this._alphaState.apply(this._gl,this._currentRenderTarget&&this._currentRenderTarget.textures?this._currentRenderTarget.textures.length:1),this._colorWriteChanged){this._colorWriteChanged=!1;let e=this._colorWrite;this._gl.colorMask(e,e,e,e)}}wipeCaches(e){(!this.preventCacheWipeBetweenFrames||e)&&(this._currentEffect=null,this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0,this._unbindVertexArrayObject(),e&&(this._currentProgram=null,this.resetTextureCache(),this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=this._gl.LEQUAL,this._alphaState.reset(),this._resetAlphaMode(),this._colorWrite=!0,this._colorWriteChanged=!0,this._unpackFlipYCached=null,this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),this._mustWipeVertexAttributes=!0,this.unbindAllAttributes()),this._resetVertexBufferBinding(),this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null,this.bindIndexBuffer(null))}_getSamplingParameters(e,t){let r=this._gl,i=r.NEAREST,s=r.NEAREST,a=!1;switch(e){case 11:i=r.LINEAR,s=t?r.LINEAR_MIPMAP_NEAREST:r.LINEAR;break;case 3:i=r.LINEAR,a=!0,s=t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR;break;case 8:a=!0,i=r.NEAREST,s=t?r.NEAREST_MIPMAP_LINEAR:r.NEAREST;break;case 4:i=r.NEAREST,s=t?r.NEAREST_MIPMAP_NEAREST:r.NEAREST;break;case 5:i=r.NEAREST,s=t?r.LINEAR_MIPMAP_NEAREST:r.LINEAR;break;case 6:a=!0,i=r.NEAREST,s=t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR;break;case 7:i=r.NEAREST,s=r.LINEAR;break;case 1:i=r.NEAREST,s=r.NEAREST;break;case 9:i=r.LINEAR,s=t?r.NEAREST_MIPMAP_NEAREST:r.NEAREST;break;case 10:a=!0,i=r.LINEAR,s=t?r.NEAREST_MIPMAP_LINEAR:r.NEAREST;break;case 2:i=r.LINEAR,s=r.LINEAR;break;case 12:i=r.LINEAR,s=r.NEAREST}return{min:s,mag:i,hasMipMaps:a}}_createTexture(){let e=this._gl.createTexture();if(!e)throw Error("Unable to create texture");return e}_createHardwareTexture(){return new A(this._createTexture(),this._gl)}_createInternalTexture(e,t,r=!0,i=0){let s,a,n=!1,_=0,l=3,h=5,u=!1,o=1,c=!1,f=0,d=!1;void 0!==t&&"object"==typeof t?(s=!!t.generateMipMaps,n=!!t.createMipMaps,_=void 0===t.type?0:t.type,l=void 0===t.samplingMode?3:t.samplingMode,h=void 0===t.format?5:t.format,u=void 0!==t.useSRGBBuffer&&t.useSRGBBuffer,o=t.samples??1,a=t.label,c=!!t.createMSAATexture,f=t.comparisonFunction||0,d=!!t.isCube):s=!!t,u&&(u=this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU)),(1!==_||this._caps.textureFloatLinearFiltering)&&(2!==_||this._caps.textureHalfFloatLinearFiltering)||(l=1),1!==_||this._caps.textureFloat||(_=0,g.Logger.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));let E=m(h),T=B(h),R=this._gl,p=new x.InternalTexture(this,i),A=e.width||e,S=e.height||e,b=e.depth||0,C=e.layers||0,P=this._getSamplingParameters(l,(s||n)&&!E),L=0!==C?R.TEXTURE_2D_ARRAY:0!==b?R.TEXTURE_3D:d?R.TEXTURE_CUBE_MAP:R.TEXTURE_2D,M=E?this._getInternalFormatFromDepthTextureFormat(h,!0,T):this._getRGBABufferInternalSizedFormat(_,h,u),G=E?T?R.DEPTH_STENCIL:R.DEPTH_COMPONENT:this._getInternalFormat(h),I=E?this._getWebGLTextureTypeFromDepthTextureFormat(h):this._getWebGLTextureType(_);if(this._bindTextureDirectly(L,p),0!==C)p.is2DArray=!0,R.texImage3D(L,0,M,A,S,C,0,G,I,null);else if(0!==b)p.is3D=!0,R.texImage3D(L,0,M,A,S,b,0,G,I,null);else if(d){p.isCube=!0;for(let e=0;e<6;e++)R.texImage2D(R.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,M,A,S,0,G,I,null)}else R.texImage2D(L,0,M,A,S,0,G,I,null);if(R.texParameteri(L,R.TEXTURE_MAG_FILTER,P.mag),R.texParameteri(L,R.TEXTURE_MIN_FILTER,P.min),R.texParameteri(L,R.TEXTURE_WRAP_S,R.CLAMP_TO_EDGE),R.texParameteri(L,R.TEXTURE_WRAP_T,R.CLAMP_TO_EDGE),E&&this.webGLVersion>1&&(0===f?(R.texParameteri(L,R.TEXTURE_COMPARE_FUNC,515),R.texParameteri(L,R.TEXTURE_COMPARE_MODE,R.NONE)):(R.texParameteri(L,R.TEXTURE_COMPARE_FUNC,f),R.texParameteri(L,R.TEXTURE_COMPARE_MODE,R.COMPARE_REF_TO_TEXTURE))),(s||n)&&this._gl.generateMipmap(L),this._bindTextureDirectly(L,null),p._useSRGBBuffer=u,p.baseWidth=A,p.baseHeight=S,p.width=A,p.height=S,p.depth=C||b,p.isReady=!0,p.samples=o,p.generateMipMaps=s,p.samplingMode=l,p.type=_,p.format=h,p.label=a,p.comparisonFunction=f,this._internalTexturesCache.push(p),c){let e;if(!(e=m(p.format)?this._setupFramebufferDepthAttachments(B(p.format),19!==p.format,p.width,p.height,o,p.format,!0):this._createRenderBuffer(p.width,p.height,o,-1,this._getRGBABufferInternalSizedFormat(p.type,p.format,p._useSRGBBuffer),-1)))throw Error("Unable to create render buffer");p._autoMSAAManagement=!0;let t=p._hardwareTexture;t||(t=p._hardwareTexture=this._createHardwareTexture()),t.addMSAARenderBuffer(e)}return p}_getUseSRGBBuffer(e,t){return e&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||t)}createTexture(e,t,r,i,s=3,a=null,n=null,_=null,l=null,h=null,u=null,o,c,g,f){return this._createTextureBase(e,t,r,i,s,a,n,(...e)=>this._prepareWebGLTexture(...e,h),(e,t,r,s,a,n)=>{let _=this._gl,l=r.width===e&&r.height===t;a._creationFlags=g??0;let h=this._getTexImageParametersForCreateTexture(a.format,a._useSRGBBuffer);if(l)return _.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,r),!1;let u=this._caps.maxTextureSize;if(r.width>u||r.height>u||!this._supportsHardwareTextureRescaling)return this._prepareWorkingCanvas(),!!this._workingCanvas&&!!this._workingContext&&(this._workingCanvas.width=e,this._workingCanvas.height=t,this._workingContext.drawImage(r,0,0,r.width,r.height,0,0,e,t),_.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,this._workingCanvas),a.width=e,a.height=t,!1);{let e=new x.InternalTexture(this,2);this._bindTextureDirectly(_.TEXTURE_2D,e,!0),_.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,r),this._rescaleTexture(e,a,i,h.format,()=>{this._releaseTexture(e),this._bindTextureDirectly(_.TEXTURE_2D,a,!0),n()})}return!0},_,l,h,u,o,c,f)}_getTexImageParametersForCreateTexture(e,t){let r,i;return 1===this.webGLVersion?i=r=this._getInternalFormat(e,t):(r=this._getInternalFormat(e,!1),i=this._getRGBABufferInternalSizedFormat(0,e,t)),{internalFormat:i,format:r,type:this._gl.UNSIGNED_BYTE}}_rescaleTexture(e,t,r,i,s){}_unpackFlipY(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,+!!e),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))}_getUnpackAlignement(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)}_getTextureTarget(e){return e.isCube?this._gl.TEXTURE_CUBE_MAP:e.is3D?this._gl.TEXTURE_3D:e.is2DArray||e.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D}updateTextureSamplingMode(e,t,r=!1){let i=this._getTextureTarget(t),s=this._getSamplingParameters(e,t.useMipMaps||r);this._setTextureParameterInteger(i,this._gl.TEXTURE_MAG_FILTER,s.mag,t),this._setTextureParameterInteger(i,this._gl.TEXTURE_MIN_FILTER,s.min),r&&s.hasMipMaps&&(t.generateMipMaps=!0,this._gl.generateMipmap(i)),this._bindTextureDirectly(i,null),t.samplingMode=e}updateTextureDimensions(e,t,r,i=1){}updateTextureWrappingMode(e,t,r=null,i=null){let s=this._getTextureTarget(e);null!==t&&(this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t),e),e._cachedWrapU=t),null!==r&&(this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(r),e),e._cachedWrapV=r),(e.is2DArray||e.is3D)&&null!==i&&(this._setTextureParameterInteger(s,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(i),e),e._cachedWrapR=i),this._bindTextureDirectly(s,null)}_uploadCompressedDataToTextureDirectly(e,t,r,i,s,a=0,n=0){let _=this._gl,l=_.TEXTURE_2D;if(e.isCube&&(l=_.TEXTURE_CUBE_MAP_POSITIVE_X+a),e._useSRGBBuffer)switch(t){case 37492:case 36196:this._caps.etc2?t=_.COMPRESSED_SRGB8_ETC2:e._useSRGBBuffer=!1;break;case 37496:this._caps.etc2?t=_.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:e._useSRGBBuffer=!1;break;case 36492:t=_.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;break;case 37808:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;break;case 37809:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR;break;case 37810:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR;break;case 37811:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR;break;case 37812:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR;break;case 37813:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR;break;case 37814:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR;break;case 37815:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR;break;case 37816:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR;break;case 37817:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR;break;case 37818:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR;break;case 37819:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR;break;case 37820:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR;break;case 37821:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR;break;case 33776:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case 33777:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case 33779:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:e._useSRGBBuffer=!1;break;default:e._useSRGBBuffer=!1}if(e.generateMipMaps){let a=e._hardwareTexture;a.memoryAllocated||(_.texStorage2D(e.isCube?_.TEXTURE_CUBE_MAP:_.TEXTURE_2D,Math.floor(Math.log2(Math.max(r,i)))+1,t,e.width,e.height),a.memoryAllocated=!0),this._gl.compressedTexSubImage2D(l,n,0,0,r,i,t,s)}else this._gl.compressedTexImage2D(l,n,t,r,i,0,s)}_uploadDataToTextureDirectly(e,t,r=0,i=0,s,a=!1){let n=this._gl,_=this._getWebGLTextureType(e.type),l=this._getInternalFormat(e.format),h=void 0===s?this._getRGBABufferInternalSizedFormat(e.type,e.format,e._useSRGBBuffer):this._getInternalFormat(s,e._useSRGBBuffer);this._unpackFlipY(e.invertY);let u=n.TEXTURE_2D;e.isCube&&(u=n.TEXTURE_CUBE_MAP_POSITIVE_X+r);let o=Math.round(Math.log(e.width)*Math.LOG2E),c=Math.round(Math.log(e.height)*Math.LOG2E),g=a?e.width:Math.pow(2,Math.max(o-i,0)),f=a?e.height:Math.pow(2,Math.max(c-i,0));n.texImage2D(u,i,h,g,f,0,l,_,t)}updateTextureData(e,t,r,i,s,a,n=0,_=0,l=!1){let h=this._gl,u=this._getWebGLTextureType(e.type),o=this._getInternalFormat(e.format);this._unpackFlipY(e.invertY);let c=h.TEXTURE_2D,g=h.TEXTURE_2D;e.isCube&&(g=h.TEXTURE_CUBE_MAP_POSITIVE_X+n,c=h.TEXTURE_CUBE_MAP),this._bindTextureDirectly(c,e,!0),h.texSubImage2D(g,_,r,i,s,a,o,u,t),l&&this._gl.generateMipmap(g),this._bindTextureDirectly(c,null)}_uploadArrayBufferViewToTexture(e,t,r=0,i=0){let s=this._gl,a=e.isCube?s.TEXTURE_CUBE_MAP:s.TEXTURE_2D;this._bindTextureDirectly(a,e,!0),this._uploadDataToTextureDirectly(e,t,r,i),this._bindTextureDirectly(a,null,!0)}_prepareWebGLTextureContinuation(e,t,r,i,s){let a=this._gl;if(!a)return;let n=this._getSamplingParameters(s,!r);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,n.mag),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,n.min),r||i||a.generateMipmap(a.TEXTURE_2D),this._bindTextureDirectly(a.TEXTURE_2D,null),t&&t.removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}_prepareWebGLTexture(e,t,r,i,s,a,n,_,l,h){let u=this.getCaps().maxTextureSize,o=Math.min(u,this.needPOTTextures?(0,p.GetExponentOfTwo)(i.width,u):i.width),c=Math.min(u,this.needPOTTextures?(0,p.GetExponentOfTwo)(i.height,u):i.height),g=this._gl;if(g){if(!e._hardwareTexture){r&&r.removePendingData(e);return}this._bindTextureDirectly(g.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===s||!!s),e.baseWidth=i.width,e.baseHeight=i.height,e.width=o,e.height=c,e.isReady=!0,e.type=-1!==e.type?e.type:0,e.format=-1!==e.format?e.format:h??(".jpg"!==t||e._useSRGBBuffer?5:4),_(o,c,i,t,e,()=>{this._prepareWebGLTextureContinuation(e,r,a,n,l)})||this._prepareWebGLTextureContinuation(e,r,a,n,l)}}_getInternalFormatFromDepthTextureFormat(e,t,r){let i=this._gl;if(!t)return i.STENCIL_INDEX8;let s=r?i.DEPTH_STENCIL:i.DEPTH_COMPONENT;return this.webGLVersion>1?15===e?s=i.DEPTH_COMPONENT16:16===e?s=i.DEPTH_COMPONENT24:17===e||13===e?s=r?i.DEPTH24_STENCIL8:i.DEPTH_COMPONENT24:14===e?s=i.DEPTH_COMPONENT32F:18===e&&(s=r?i.DEPTH32F_STENCIL8:i.DEPTH_COMPONENT32F):s=i.DEPTH_COMPONENT16,s}_getWebGLTextureTypeFromDepthTextureFormat(e){let t=this._gl,r=t.UNSIGNED_INT;return 15===e?r=t.UNSIGNED_SHORT:17===e||13===e?r=t.UNSIGNED_INT_24_8:14===e?r=t.FLOAT:18===e?r=t.FLOAT_32_UNSIGNED_INT_24_8_REV:19===e&&(r=t.UNSIGNED_BYTE),r}_setupFramebufferDepthAttachments(e,t,r,i,s=1,a,n=!1){let _=this._gl;a=a??(e?13:14);let l=this._getInternalFormatFromDepthTextureFormat(a,t,e);return e&&t?this._createRenderBuffer(r,i,s,_.DEPTH_STENCIL,l,n?-1:_.DEPTH_STENCIL_ATTACHMENT):t?this._createRenderBuffer(r,i,s,l,l,n?-1:_.DEPTH_ATTACHMENT):e?this._createRenderBuffer(r,i,s,l,l,n?-1:_.STENCIL_ATTACHMENT):null}_createRenderBuffer(e,t,r,i,s,a,n=!0){let _=this._gl.createRenderbuffer();return this._updateRenderBuffer(_,e,t,r,i,s,a,n)}_updateRenderBuffer(e,t,r,i,s,a,n,_=!0){let l=this._gl;return l.bindRenderbuffer(l.RENDERBUFFER,e),i>1&&l.renderbufferStorageMultisample?l.renderbufferStorageMultisample(l.RENDERBUFFER,i,a,t,r):l.renderbufferStorage(l.RENDERBUFFER,s,t,r),-1!==n&&l.framebufferRenderbuffer(l.FRAMEBUFFER,n,l.RENDERBUFFER,e),_&&l.bindRenderbuffer(l.RENDERBUFFER,null),e}_releaseTexture(e){this._deleteTexture(e._hardwareTexture),this.unbindAllTextures();let t=this._internalTexturesCache.indexOf(e);-1!==t&&this._internalTexturesCache.splice(t,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),e._irradianceTexture&&e._irradianceTexture.dispose()}_deleteTexture(e){e?.release()}_setProgram(e){this._currentProgram!==e&&((0,u._setProgram)(e,this._gl),this._currentProgram=e)}bindSamplers(e){let t=e.getPipelineContext();this._setProgram(t.program);let r=e.getSamplers();for(let t=0;t<r.length;t++){let i=e.getUniform(r[t]);i&&(this._boundUniforms[t]=i)}this._currentEffect=null}_activateCurrentTexture(){this._currentTextureChannel!==this._activeChannel&&(this._gl.activeTexture(this._gl.TEXTURE0+this._activeChannel),this._currentTextureChannel=this._activeChannel)}_bindTextureDirectly(e,t,r=!1,i=!1){let s=!1,a=t&&t._associatedChannel>-1;if(r&&a&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||i){if(this._activateCurrentTexture(),t&&t.isMultiview)throw g.Logger.Error(["_bindTextureDirectly called with a multiview texture!",e,t]),"_bindTextureDirectly called with a multiview texture!";this._gl.bindTexture(e,t?._hardwareTexture?.underlyingResource??null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)}else r&&(s=!0,this._activateCurrentTexture());return a&&!r&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),s}_bindTexture(e,t,r){if(void 0===e)return;t&&(t._associatedChannel=e),this._activeChannel=e;let i=t?this._getTextureTarget(t):this._gl.TEXTURE_2D;this._bindTextureDirectly(i,t)}unbindAllTextures(){for(let e=0;e<this._maxSimultaneousTextures;e++)this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))}setTexture(e,t,r,i){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,r))}_bindSamplerUniformToChannel(e,t){let r=this._boundUniforms[e];r&&r._currentState!==t&&(this._gl.uniform1i(r,t),r._currentState=t)}_getTextureWrapMode(e){switch(e){case 1:break;case 0:return this._gl.CLAMP_TO_EDGE;case 2:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT}_setTexture(e,t,r=!1,i=!1,s=""){let a;if(!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(t.video){this._activeChannel=e;let r=t.getInternalTexture();r&&(r._associatedChannel=e),t.update()}else if(4===t.delayLoadState)return t.delayLoad(),!1;a=i?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!r&&a&&(a._associatedChannel=e);let n=!0;this._boundTexturesCache[e]===a&&(r||this._bindSamplerUniformToChannel(a._associatedChannel,e),n=!1),this._activeChannel=e;let _=this._getTextureTarget(a);if(n&&this._bindTextureDirectly(_,a,r),a&&!a.isMultiview){if(a.isCube&&a._cachedCoordinatesMode!==t.coordinatesMode){a._cachedCoordinatesMode=t.coordinatesMode;let e=+(3!==t.coordinatesMode&&5!==t.coordinatesMode);t.wrapU=e,t.wrapV=e}a._cachedWrapU!==t.wrapU&&(a._cachedWrapU=t.wrapU,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),a)),a._cachedWrapV!==t.wrapV&&(a._cachedWrapV=t.wrapV,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),a)),a.is3D&&a._cachedWrapR!==t.wrapR&&(a._cachedWrapR=t.wrapR,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),a)),this._setAnisotropicLevel(_,a,t.anisotropicFilteringLevel)}return!0}setTextureArray(e,t,r,i){if(void 0!==e&&t){this._textureUnits&&this._textureUnits.length===r.length||(this._textureUnits=new Int32Array(r.length));for(let t=0;t<r.length;t++){let i=r[t].getInternalTexture();i?(this._textureUnits[t]=e+t,i._associatedChannel=e+t):this._textureUnits[t]=-1}this._gl.uniform1iv(t,this._textureUnits);for(let e=0;e<r.length;e++)this._setTexture(this._textureUnits[e],r[e],!0)}}_setAnisotropicLevel(e,t,r){let i=this._caps.textureAnisotropicFilterExtension;11!==t.samplingMode&&3!==t.samplingMode&&2!==t.samplingMode&&(r=1),i&&t._cachedAnisotropicFilteringLevel!==r&&(this._setTextureParameterFloat(e,i.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(r,this._caps.maxAnisotropy),t),t._cachedAnisotropicFilteringLevel=r)}_setTextureParameterFloat(e,t,r,i){this._bindTextureDirectly(e,i,!0,!0),this._gl.texParameterf(e,t,r)}_setTextureParameterInteger(e,t,r,i){i&&this._bindTextureDirectly(e,i,!0,!0),this._gl.texParameteri(e,t,r)}unbindAllAttributes(){if(this._mustWipeVertexAttributes){this._mustWipeVertexAttributes=!1;for(let e=0;e<this._caps.maxVertexAttribs;e++)this.disableAttributeByIndex(e);return}for(let e=0,t=this._vertexAttribArraysEnabled.length;e<t;e++)!(e>=this._caps.maxVertexAttribs)&&this._vertexAttribArraysEnabled[e]&&this.disableAttributeByIndex(e)}releaseEffects(){this._compiledEffects={},this.onReleaseEffectsObservable.notifyObservers(this)}dispose(){(0,f.IsWindowObjectExist)()&&this._renderingCanvas&&(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._onContextRestored&&this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored)),super.dispose(),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.unbindAllAttributes(),this._boundUniforms={},this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers.length=0,this._currentProgram=null,this._creationOptions.loseContextOnDispose&&this._gl.getExtension("WEBGL_lose_context")?.loseContext(),(0,u.deleteStateObject)(this._gl)}attachContextLostEvent(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextlost",e,!1)}attachContextRestoredEvent(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextrestored",e,!1)}getError(){return this._gl.getError()}_canRenderToFloatFramebuffer(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(1)}_canRenderToHalfFloatFramebuffer(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(2)}_canRenderToFramebuffer(e){let t=this._gl;for(;t.getError()!==t.NO_ERROR;);let r=!0,i=t.createTexture();t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);let s=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,s),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0);let a=t.checkFramebufferStatus(t.FRAMEBUFFER);if((r=(r=r&&a===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),r=r&&t.getError()===t.NO_ERROR),r){t.bindFramebuffer(t.FRAMEBUFFER,null);let e=t.RGBA,i=t.UNSIGNED_BYTE,s=new Uint8Array(4);t.readPixels(0,0,1,1,e,i,s),r=r&&t.getError()===t.NO_ERROR}for(t.deleteTexture(i),t.deleteFramebuffer(s),t.bindFramebuffer(t.FRAMEBUFFER,null);!r&&t.getError()!==t.NO_ERROR;);return r}_getWebGLTextureType(e){if(1===this._webGLVersion){switch(e){case 1:return this._gl.FLOAT;case 2:return this._gl.HALF_FLOAT_OES;case 0:break;case 8:return this._gl.UNSIGNED_SHORT_4_4_4_4;case 9:return this._gl.UNSIGNED_SHORT_5_5_5_1;case 10:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(e){case 3:return this._gl.BYTE;case 0:break;case 4:return this._gl.SHORT;case 5:return this._gl.UNSIGNED_SHORT;case 6:return this._gl.INT;case 7:return this._gl.UNSIGNED_INT;case 1:return this._gl.FLOAT;case 2:return this._gl.HALF_FLOAT;case 8:return this._gl.UNSIGNED_SHORT_4_4_4_4;case 9:return this._gl.UNSIGNED_SHORT_5_5_5_1;case 10:return this._gl.UNSIGNED_SHORT_5_6_5;case 11:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case 12:return this._gl.UNSIGNED_INT_24_8;case 13:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case 14:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case 15:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE}_getInternalFormat(e,t=!1){let r=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA;switch(e){case 0:r=this._gl.ALPHA;break;case 1:r=this._gl.LUMINANCE;break;case 2:r=this._gl.LUMINANCE_ALPHA;break;case 6:case 33322:case 36760:r=this._gl.RED;break;case 7:case 33324:case 36761:r=this._gl.RG;break;case 4:case 32852:case 36762:r=t?this._glSRGBExtensionValues.SRGB:this._gl.RGB;break;case 5:case 32859:case 36763:r=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA}if(this._webGLVersion>1)switch(e){case 8:r=this._gl.RED_INTEGER;break;case 9:r=this._gl.RG_INTEGER;break;case 10:r=this._gl.RGB_INTEGER;break;case 11:r=this._gl.RGBA_INTEGER}return r}_getRGBABufferInternalSizedFormat(e,t,r=!1){if(1===this._webGLVersion){if(void 0!==t)switch(t){case 0:return this._gl.ALPHA;case 1:return this._gl.LUMINANCE;case 2:return this._gl.LUMINANCE_ALPHA;case 4:return r?this._glSRGBExtensionValues.SRGB:this._gl.RGB}return this._gl.RGBA}switch(e){case 3:switch(t){case 6:return this._gl.R8_SNORM;case 7:return this._gl.RG8_SNORM;case 4:return this._gl.RGB8_SNORM;case 8:return this._gl.R8I;case 9:return this._gl.RG8I;case 10:return this._gl.RGB8I;case 11:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case 0:switch(t){case 6:return this._gl.R8;case 7:return this._gl.RG8;case 4:return r?this._glSRGBExtensionValues.SRGB8:this._gl.RGB8;case 5:return r?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8;case 8:return this._gl.R8UI;case 9:return this._gl.RG8UI;case 10:return this._gl.RGB8UI;case 11:return this._gl.RGBA8UI;case 0:return this._gl.ALPHA;case 1:return this._gl.LUMINANCE;case 2:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case 4:switch(t){case 8:return this._gl.R16I;case 36760:return this._gl.R16_SNORM_EXT;case 36761:return this._gl.RG16_SNORM_EXT;case 36762:return this._gl.RGB16_SNORM_EXT;case 36763:return this._gl.RGBA16_SNORM_EXT;case 9:return this._gl.RG16I;case 10:return this._gl.RGB16I;default:return this._gl.RGBA16I}case 5:switch(t){case 8:return this._gl.R16UI;case 33322:return this._gl.R16_EXT;case 33324:return this._gl.RG16_EXT;case 32852:return this._gl.RGB16_EXT;case 32859:return this._gl.RGBA16_EXT;case 9:return this._gl.RG16UI;case 10:return this._gl.RGB16UI;default:return this._gl.RGBA16UI}case 6:switch(t){case 8:return this._gl.R32I;case 9:return this._gl.RG32I;case 10:return this._gl.RGB32I;default:return this._gl.RGBA32I}case 7:switch(t){case 8:return this._gl.R32UI;case 9:return this._gl.RG32UI;case 10:return this._gl.RGB32UI;default:return this._gl.RGBA32UI}case 1:switch(t){case 6:return this._gl.R32F;case 7:return this._gl.RG32F;case 4:return this._gl.RGB32F;default:return this._gl.RGBA32F}case 2:switch(t){case 6:return this._gl.R16F;case 7:return this._gl.RG16F;case 4:return this._gl.RGB16F;default:return this._gl.RGBA16F}case 10:return this._gl.RGB565;case 13:return this._gl.R11F_G11F_B10F;case 14:return this._gl.RGB9_E5;case 8:return this._gl.RGBA4;case 9:return this._gl.RGB5_A1;case 11:switch(t){case 5:default:return this._gl.RGB10_A2;case 11:return this._gl.RGB10_A2UI}}return r?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8}readPixels(e,t,r,i,s=!0,a=!0,n=null){let _=s?this._gl.RGBA:this._gl.RGB,l=r*i*(s?4:3);if(n){if(n.length<l)return g.Logger.Error(`Data buffer is too small to store the read pixels (${n.length} should be more than ${l})`),Promise.resolve(n)}else n=new Uint8Array(l);return a&&this.flushFramebuffer(),this._gl.readPixels(e,t,r,i,_,this._gl.UNSIGNED_BYTE,n),Promise.resolve(n)}static get IsSupportedAsync(){return Promise.resolve(this.isSupported())}static get IsSupported(){return this.isSupported()}static isSupported(){if(null!==this._HasMajorPerformanceCaveat)return!this._HasMajorPerformanceCaveat;if(null===this._IsSupported)try{let e=o.AbstractEngine._CreateCanvas(1,1),t=e.getContext("webgl")||e.getContext("experimental-webgl");this._IsSupported=null!=t&&!!globalThis.WebGLRenderingContext}catch(e){this._IsSupported=!1}return this._IsSupported}static get HasMajorPerformanceCaveat(){if(null===this._HasMajorPerformanceCaveat)try{let e=o.AbstractEngine._CreateCanvas(1,1),t=e.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||e.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!t}catch(e){this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat}}M._TempClearColorUint32=new Uint32Array(4),M._TempClearColorInt32=new Int32Array(4),M.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/12\\d\\..+?Mobile",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:".*AppleWebKit.*(15.4).*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]},{key:".*(15.4).*AppleWebKit.*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]}],M._ConcatenateShader=S._ConcatenateShader,M._IsSupported=null,M._HasMajorPerformanceCaveat=null,(t=M.prototype).startTimeQuery??(t.startTimeQuery=(0,P._MissingSideEffect)("ThinEngine","startTimeQuery")),(r=M.prototype).endTimeQuery??(r.endTimeQuery=(0,P._MissingSideEffect)("ThinEngine","endTimeQuery")),(i=M.prototype).createUniformBuffer??(i.createUniformBuffer=(0,P._MissingSideEffect)("ThinEngine","createUniformBuffer")),(s=M.prototype).createDynamicUniformBuffer??(s.createDynamicUniformBuffer=(0,P._MissingSideEffect)("ThinEngine","createDynamicUniformBuffer")),(a=M.prototype).updateUniformBuffer??(a.updateUniformBuffer=(0,P._MissingSideEffect)("ThinEngine","updateUniformBuffer")),(n=M.prototype).bindUniformBuffer??(n.bindUniformBuffer=(0,P._MissingSideEffect)("ThinEngine","bindUniformBuffer")),(_=M.prototype).bindUniformBufferBase??(_.bindUniformBufferBase=(0,P._MissingSideEffect)("ThinEngine","bindUniformBufferBase")),(l=M.prototype).bindUniformBlock??(l.bindUniformBlock=(0,P._MissingSideEffect)("ThinEngine","bindUniformBlock")),e.s(["ThinEngine",0,M],25282)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,75865,e=>{"use strict";e.s(["GetDOMTextContent",0,function(e){let t="",r=e.firstChild;for(;r;)3===r.nodeType&&(t+=r.textContent),r=r.nextSibling;return t},"IsDocumentAvailable",0,function(){return"u">typeof document},"IsNavigatorAvailable",0,function(){return"u">typeof navigator},"IsWindowObjectExist",0,function(){return"u">typeof window}])},72491,e=>{"use strict";class t{constructor(){this._xhr="u">typeof _native&&_native.XMLHttpRequest?new _native.XMLHttpRequest:new XMLHttpRequest,this._requestURL=""}static get IsCustomRequestAvailable(){return Object.keys(t.CustomRequestHeaders).length>0||t.CustomRequestModifiers.length>0}static _CleanUrl(e){return e=(e=e.replace("file:http:","http:")).replace("file:https:","https:")}static _ShouldSkipRequestModifications(e){return t.SkipRequestModificationForBabylonCDN&&(e.includes("preview.babylonjs.com")||e.includes("cdn.babylonjs.com"))}static _CollectCustomizations(e,r={}){let o={...r};if(t._ShouldSkipRequestModifications(e))return{url:e,headers:o};for(let e in t.CustomRequestHeaders){let r=t.CustomRequestHeaders[e];r&&(o[e]=r)}let a={setRequestHeader:(e,t)=>{o[e]=t}};for(let r of t.CustomRequestModifiers){if(t._ShouldSkipRequestModifications(e))break;let o=r(a,e);"string"==typeof o&&(e=o)}return{url:e,headers:o}}static async FetchAsync(e,r={}){let o=r.method??"GET";if("u">typeof fetch){let{url:a,headers:i}=t._CollectCustomizations(t._CleanUrl(e),r.headers??{});return await fetch(a,{method:o,headers:i,body:r.body??void 0})}return await new Promise((a,i)=>{let n=new t;n.responseType="arraybuffer",n.addEventListener("readystatechange",()=>{if(4===n.readyState)if(n.status>=200&&n.status<300){let e="u">typeof Headers?new Headers:void 0,t=n.getResponseHeader("Content-Type");t&&e&&e.set("Content-Type",t),"u">typeof Response?a(new Response(n.response,{status:n.status,statusText:n.statusText,headers:e})):a({ok:!0,status:n.status,statusText:n.statusText,headers:{get:e=>n.getResponseHeader(e)},arrayBuffer:async()=>await Promise.resolve(n.response)})}else i(Error(`HTTP ${n.status} loading '${n.requestURL}': ${n.statusText}`))}),n.open(o,e,r.headers),n.send(r.body??null)})}get requestURL(){return this._requestURL}get onprogress(){return this._xhr.onprogress}set onprogress(e){this._xhr.onprogress=e}get readyState(){return this._xhr.readyState}get status(){return this._xhr.status}get statusText(){return this._xhr.statusText}get response(){return this._xhr.response}get responseURL(){return this._xhr.responseURL}get responseText(){return this._xhr.responseText}get responseType(){return this._xhr.responseType}set responseType(e){this._xhr.responseType=e}get timeout(){return this._xhr.timeout}set timeout(e){this._xhr.timeout=e}addEventListener(e,t,r){this._xhr.addEventListener(e,t,r)}removeEventListener(e,t,r){this._xhr.removeEventListener(e,t,r)}abort(){this._xhr.abort()}send(e){this._xhr.send(e)}open(e,r,o){let{url:a,headers:i}=t._CollectCustomizations(r,o);for(let r in this._requestURL=t._CleanUrl(a),this._xhr.open(e,this._requestURL,!0),i)this._xhr.setRequestHeader(r,i[r])}setRequestHeader(e,t){this._xhr.setRequestHeader(e,t)}getResponseHeader(e){return this._xhr.getResponseHeader(e)}}t.CustomRequestHeaders={},t.CustomRequestModifiers=[],t.SkipRequestModificationForBabylonCDN=!0,e.s(["WebRequest",0,t])},37890,e=>{"use strict";let t=null;function r(){if(t)return t;let e=new ArrayBuffer(4),r=new Float32Array(e),o=new Uint32Array(e),a=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-24?(a[e]=0,a[256|e]=32768,i[e]=24,i[256|e]=24):t<-14?(a[e]=1024>>-t-14,a[256|e]=1024>>-t-14|32768,i[e]=-t-1,i[256|e]=-t-1):t<=15?(a[e]=t+15<<10,a[256|e]=t+15<<10|32768,i[e]=13,i[256|e]=13):t<128?(a[e]=31744,a[256|e]=64512,i[e]=24,i[256|e]=24):(a[e]=31744,a[256|e]=64512,i[e]=13,i[256|e]=13)}let n=new Uint32Array(2048),s=new Uint32Array(64),l=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,r=0;for(;(8388608&t)==0;)t<<=1,r-=8388608;t&=-8388609,r+=0x38800000,n[e]=t|r}for(let e=1024;e<2048;++e)n[e]=0x38000000+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=0x47800000,s[32]=0x80000000;for(let e=33;e<63;++e)s[e]=0x80000000+(e-32<<23);s[63]=0xc7800000;for(let e=1;e<64;++e)32!==e&&(l[e]=1024);return t={floatView:r,uint32View:o,baseTable:a,shiftTable:i,mantissaTable:n,exponentTable:s,offsetTable:l}}e.s(["FromHalfFloat",0,function(e){let t=r();return t.uint32View[0]=t.mantissaTable[t.offsetTable[e>>10]+(1023&e)]+t.exponentTable[e>>10],t.floatView[0]},"MaxHalfFloat",0,65504,"ToHalfFloat",0,function(e){let t=r();t.floatView[0]=e;let o=t.uint32View[0],a=o>>23&511;return t.baseTable[a]+((8388607&o)>>t.shiftTable[a])}])},85240,e=>{"use strict";var t=e.i(75865);e.s(["PrecisionDate",0,class{static get Now(){return(0,t.IsWindowObjectExist)()&&window.performance&&window.performance.now?window.performance.now():Date.now()}}])},59767,25440,65771,e=>{"use strict";class t{}t.FilesToLoad={},e.s(["FilesInputStore",0,t],59767),e.s(["RetryStrategy",0,class{static ExponentialBackoff(e=3,t=500){return(r,o,a)=>0!==o.status||a>=e||-1!==r.indexOf("file:")?-1:Math.pow(2,a)*t}}],25440);class r extends Error{}r._setPrototypeOf=Object.setPrototypeOf||((e,t)=>(e.__proto__=t,e));class o extends r{constructor(e,t,a){super(e),this.errorCode=t,this.innerError=a,this.name="RuntimeError",r._setPrototypeOf(this,o.prototype)}}e.s(["BaseError",0,r,"ErrorCodes",0,{MeshInvalidPositionsError:0,UnsupportedTextureError:1e3,GLTFLoaderUnexpectedMagicError:2e3,SceneLoaderError:3e3,LoadFileError:4e3,RequestFileError:4001,ReadFileError:4002},"RuntimeError",0,o],65771)},61023,e=>{"use strict";let t=e=>atob(e);e.s(["Decode",0,e=>{if("u">typeof TextDecoder)return new TextDecoder().decode(e);let t="";for(let r=0;r<e.byteLength;r++)t+=String.fromCharCode(e[r]);return t},"DecodeBase64ToBinary",0,e=>"function"==typeof Uint8Array.fromBase64?Uint8Array.fromBase64(e).buffer:function(e){let r=t(e),o=r.length,a=new Uint8Array(new ArrayBuffer(o));for(let e=0;e<o;e++)a[e]=r.charCodeAt(e);return a.buffer}(e),"DecodeBase64ToString",0,t,"EncodeArrayBufferToBase64",0,e=>{let t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);return"function"==typeof t.toBase64?t.toBase64():function(e){let t,r,o,a,i,n,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",u=0;for(;u<e.length;)t=e[u++],r=u<e.length?e[u++]:NaN,o=u<e.length?e[u++]:NaN,a=t>>2,i=(3&t)<<4|r>>4,n=(15&r)<<2|o>>6,s=63&o,isNaN(r)?n=s=64:isNaN(o)&&(s=64),c+=l.charAt(a)+l.charAt(i)+l.charAt(n)+l.charAt(s);return c}(t)}])},4775,e=>{"use strict";let t=[];function r(e,t,r){try{if(e())return t(),!0}catch(e){return r?.(e),!0}return!1}e.s(["TimingTools",0,class{static SetImmediate(e){0===t.length&&setTimeout(()=>{let e=t;for(let r of(t=[],e))r()},1),t.push(e)}},"_RetryWithInterval",0,(e,t,o,a=16,i=3e4,n=!0,s)=>{if(n&&r(e,t,o))return null;let l=setInterval(()=>{r(e,t,o)?clearInterval(l):(i-=a)<0&&(clearInterval(l),o?.(Error("Operation timed out after maximum retries. "+(s||"")),!0))},a);return()=>clearInterval(l)}])},5512,e=>{"use strict";var t=e.i(83464),r=e.i(37890);function o(e){switch(e){case 5120:case 5121:return 1;case 5122:case 5123:case 5131:return 2;case 5124:case 5125:case 5126:return 4;default:throw Error(`Invalid type '${e}'`)}}function a(e){switch(e){case 5120:return Int8Array;case 5121:return Uint8Array;case 5122:return Int16Array;case 5123:case 5131:return Uint16Array;case 5124:return Int32Array;case 5125:return Uint32Array;case 5126:return Float32Array;default:throw Error(`Invalid component type '${e}'`)}}function i(e,t,a,i,n,s,l,c){let u=Array(i),f=Array(i);if(e instanceof Array){let r=t/4,o=a/4;for(let t=0;t<s;t+=i){for(let t=0;t<i;t++)u[t]=f[t]=e[r+t];c(f,t);for(let t=0;t<i;t++)u[t]!==f[t]&&(e[r+t]=f[t]);r+=o}}else{let d=ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e),g=o(n);for(let e=0;e<s;e+=i){for(let e=0,o=t;e<i;e++,o+=g)u[e]=f[e]=function(e,t,o,a){switch(t){case 5120:{let t=e.getInt8(o);return a&&(t=Math.max(t/127,-1)),t}case 5121:{let t=e.getUint8(o);return a&&(t/=255),t}case 5122:{let t=e.getInt16(o,!0);return a&&(t=Math.max(t/32767,-1)),t}case 5123:{let t=e.getUint16(o,!0);return a&&(t/=65535),t}case 5131:return(0,r.FromHalfFloat)(e.getUint16(o,!0));case 5124:return e.getInt32(o,!0);case 5125:return e.getUint32(o,!0);case 5126:return e.getFloat32(o,!0);default:throw Error(`Invalid component type ${t}`)}}(d,n,o,l);c(f,e);for(let e=0,o=t;e<i;e++,o+=g)u[e]!==f[e]&&function(e,t,o,a,i){switch(t){case 5120:a&&(i=Math.round(127*i)),e.setInt8(o,i);break;case 5121:a&&(i=Math.round(255*i)),e.setUint8(o,i);break;case 5122:a&&(i=Math.round(32767*i)),e.setInt16(o,i,!0);break;case 5123:a&&(i=Math.round(65535*i)),e.setUint16(o,i,!0);break;case 5131:e.setUint16(o,(0,r.ToHalfFloat)(i),!0);break;case 5124:e.setInt32(o,i,!0);break;case 5125:e.setUint32(o,i,!0);break;case 5126:e.setFloat32(o,i,!0);break;default:throw Error(`Invalid component type ${t}`)}}(d,n,o,l,f[e]);t+=a}}}e.s(["CopyFloatData",0,function(e,r,a,n,s,l,c,u){let f=r*o(a),d=c*r;if(u.length!==d)throw Error("Output length is not valid");if(5126!==a||s!==f)return void i(e,n,s,r,a,d,l,(e,t)=>{for(let o=0;o<r;o++)u[t+o]=e[o]});if(e instanceof Array){let t=n/4;u.set(e,t)}else if(ArrayBuffer.isView(e)){let r=e.byteOffset+n;if((3&r)!=0){t.Logger.Warn("Float array must be aligned to 4-bytes border"),u.set(new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)));return}let o=new Float32Array(e.buffer,r,d);u.set(o)}else{let t=new Float32Array(e,n,d);u.set(t)}},"EnumerateFloatValues",0,i,"GetBlobBufferSource",0,function(e){let t=e.buffer;if(t instanceof ArrayBuffer)return e;let r=new ArrayBuffer(e.byteLength);return new Uint8Array(r).set(new Uint8Array(t,e.byteOffset,e.byteLength)),r},"GetFloatData",0,function(e,r,a,n,s,l,c,u){let f=r*o(a),d=c*r;if(5126!==a||s!==f){let t=new Float32Array(d);return i(e,n,s,r,a,d,l,(e,o)=>{for(let a=0;a<r;a++)t[o+a]=e[a]}),t}if(!(e instanceof Array||e instanceof Float32Array)||0!==n||e.length!==d)if(e instanceof Array){let t=n/4;return e.slice(t,t+d)}else{if(!ArrayBuffer.isView(e))return new Float32Array(e,n,d);let r=e.byteOffset+n;return((3&r)!=0&&(t.Logger.Warn("Float array must be aligned to 4-bytes border"),u=!0),u)?new Float32Array(e.buffer.slice(r,r+d*Float32Array.BYTES_PER_ELEMENT)):new Float32Array(e.buffer,r,d)}return u?e.slice():e},"GetTypeByteLength",0,o,"GetTypedArrayConstructor",0,a,"GetTypedArrayData",0,function(e,r,n,s,l,c,u){let f,d=o(n),g=a(n),p=c*r;if(Array.isArray(e)){if((3&s)!=0||(3&l)!=0)throw Error("byteOffset and byteStride must be a multiple of 4 for number[] data.");let t=s/4,o=l/4;if(t+(c-1)*o+r>e.length)throw Error("Last accessed index is out of bounds.");if(o<r)throw Error("Data stride cannot be smaller than the component size.");if(o!==r){let t=new g(p);return i(e,s,l,r,n,p,!1,(e,o)=>{for(let a=0;a<r;a++)t[o+a]=e[a]}),t}return new g(e.slice(t,t+p))}let h=s;if(ArrayBuffer.isView(e)?(f=e.buffer,h+=e.byteOffset):f=e,h+(c-1)*l+r*d>f.byteLength)throw Error("Last accessed byte is out of bounds.");let v=r*d;if(l<v)throw Error("Byte stride cannot be smaller than the component's byte size.");if(l!==v){let e=new g(p),t=new Uint8Array(f,h),o=new Uint8Array(e.buffer),a=r*d;for(let e=0,r=0,i=0;e<c;e++,r+=l,i+=a)o.set(t.subarray(r,r+a),i);return e}return(1!==d&&(h&d-1)!=0&&(t.Logger.Warn("Array must be aligned to border of element size. Data will be copied."),u=!0),u)?new g(f.slice(h,h+p*d)):new g(f,h,p)}])},25746,e=>{"use strict";var t=e.i(72491),r=e.i(75865),o=e.i(57554),a=e.i(59767),i=e.i(25440),n=e.i(65771),s=e.i(61023),l=e.i(47867),c=e.i(83464),u=e.i(4775),f=e.i(5512);let d=new RegExp(/^data:([^,]+\/[^,]+)?;base64,/i);class g extends n.RuntimeError{constructor(e,r){super(e,n.ErrorCodes.LoadFileError),this.name="LoadFileError",n.BaseError._setPrototypeOf(this,g.prototype),r instanceof t.WebRequest?this.request=r:this.file=r}}class p extends n.RuntimeError{constructor(e,t){super(e,n.ErrorCodes.RequestFileError),this.request=t,this.name="RequestFileError",n.BaseError._setPrototypeOf(this,p.prototype)}}class h extends n.RuntimeError{constructor(e,t){super(e,n.ErrorCodes.ReadFileError),this.file=t,this.name="ReadFileError",n.BaseError._setPrototypeOf(this,h.prototype)}}let v={DefaultRetryStrategy:i.RetryStrategy.ExponentialBackoff(),BaseUrl:"",CorsBehavior:"anonymous",PreprocessUrl:e=>e,ScriptBaseUrl:"",ScriptPreprocessUrl:e=>e,CleanUrl:e=>e=e.replace(/#/gm,"%23")},m=(e,t)=>{if((!e||0!==e.indexOf("data:"))&&v.CorsBehavior)if("string"==typeof v.CorsBehavior||v.CorsBehavior instanceof String)t.crossOrigin=v.CorsBehavior;else{let r=v.CorsBehavior(e);r&&(t.crossOrigin=r)}},K=(e,t,r,a,i)=>{let n=new FileReader,s={onCompleteObservable:new o.Observable,abort:()=>n.abort()};return n.onloadend=()=>s.onCompleteObservable.notifyObservers(s),i&&(n.onerror=()=>{i(new h(`Unable to read ${e.name}`,e))}),n.onload=e=>{t(e.target.result)},r&&(n.onprogress=r),a?n.readAsArrayBuffer(e):n.readAsText(e),s},b=(e,t,r,i,n,s,l)=>{if(e.name)return K(e,t,r,n,s?e=>{s(void 0,e)}:void 0);if(-1!==e.indexOf("file:")){let o=decodeURIComponent(e.substring(5).toLowerCase());0===o.indexOf("./")&&(o=o.substring(2));let i=a.FilesInputStore.FilesToLoad[o];if(i)return K(i,t,r,n,s?e=>s(void 0,new g(e.message,e.file)):void 0)}let{match:f,type:d}=U(e);if(f){let r={onCompleteObservable:new o.Observable,abort:()=>()=>{}};try{let r=n?P(e):C(e);t(r,void 0,d)}catch(e){s?s(void 0,e):c.Logger.Error(e.message||"Failed to parse the Data URL")}return u.TimingTools.SetImmediate(()=>{r.onCompleteObservable.notifyObservers(r)}),r}return y(e,(e,r)=>{t(e,r?.responseURL,r?.getResponseHeader("content-type"))},r,i,n,s?e=>{s(e.request,new g(e.message,e.request))}:void 0,l)},y=(e,a,i,n,s,u,f)=>{null!==n&&(n??(n=l.EngineStore.LastCreatedScene?.offlineProvider)),e=v.CleanUrl(e),e=v.PreprocessUrl(e);let d=v.BaseUrl+e,g=!1,h={onCompleteObservable:new o.Observable,abort:()=>g=!0},m=()=>{let e,o=new t.WebRequest,n=null,l=()=>{o&&(i&&o.removeEventListener("progress",i),e&&o.removeEventListener("readystatechange",e),o.removeEventListener("loadend",m))},m=()=>{l(),h.onCompleteObservable.notifyObservers(h),h.onCompleteObservable.clear(),i=void 0,e=null,m=null,u=void 0,f=void 0,a=void 0};h.abort=()=>{g=!0,m&&m(),o&&o.readyState!==(XMLHttpRequest.DONE||4)&&o.abort(),null!==n&&(clearTimeout(n),n=null),o=null};let K=e=>{let t=e.message||"Unknown error";u&&o?u(new p(t,o)):c.Logger.Error(t)},b=c=>{if(o){if(o.open("GET",d),f)try{f(o)}catch(e){K(e);return}s&&(o.responseType="arraybuffer"),i&&o.addEventListener("progress",i),m&&o.addEventListener("loadend",m),e=()=>{if(!g&&o&&o.readyState===(XMLHttpRequest.DONE||4)){if(e&&o.removeEventListener("readystatechange",e),o.status>=200&&o.status<300||0===o.status&&(!(0,r.IsWindowObjectExist)()||A())){let e=s?o.response:o.responseText;if(null!==e){try{a&&a(e,o)}catch(e){K(e)}return}}let i=v.DefaultRetryStrategy;if(i){let e=i(d,o,c);if(-1!==e){l(),o=new t.WebRequest,n=setTimeout(()=>b(c+1),e);return}}let f=new p("Error status: "+o.status+" "+o.statusText+" - Unable to load "+d,o);u&&u(f)}},o.addEventListener("readystatechange",e),o.send()}};b(0)};if(n&&n.enableSceneOffline&&!e.startsWith("blob:")){let t=e=>{e&&e.status>400?u&&u(e):m()};n.open(()=>{n&&n.loadFile(v.BaseUrl+e,e=>{!g&&a&&a(e),h.onCompleteObservable.notifyObservers(h)},i?e=>{!g&&i&&i(e)}:void 0,t,s)},t)}else m();return h},A=()=>"u">typeof location&&"file:"===location.protocol,U=e=>{let t=d.exec(e);return null===t||0===t.length?{match:!1,type:""}:{match:!0,type:t[0].replace("data:","").replace(";base64,","")}};function P(e){return(0,s.DecodeBase64ToBinary)(e.split(",")[1])}let C=e=>(0,s.DecodeBase64ToString)(e.split(",")[1]);e.s(["DecodeBase64UrlToBinary",0,P,"FileToolsOptions",0,v,"GetMimeType",0,e=>{let{match:t,type:r}=U(e);if(t)return r||void 0;let o=e.lastIndexOf(".");switch(e.substring(o+1).toLowerCase()){case"glb":return"model/gltf-binary";case"bin":return"application/octet-stream";case"gltf":return"model/gltf+json";case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"webp":return"image/webp";case"ktx":return"image/ktx";case"ktx2":return"image/ktx2";case"avif":return"image/avif";default:return}},"IsBase64DataUrl",0,e=>d.test(e),"LoadFile",0,b,"LoadFileError",0,g,"LoadImage",0,(e,r,o,i,n="",c,u=l.EngineStore.LastCreatedEngine)=>{let d;if("u"<typeof HTMLImageElement&&!u?._features.forceBitmapOverHTMLImageElement)return o("LoadImage is only supported in web or BabylonNative environments."),null;let g=!1;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))if("u">typeof Blob&&"u">typeof URL){let t;t=e instanceof ArrayBuffer?e:(0,f.GetBlobBufferSource)(e),d=URL.createObjectURL(new Blob([t],{type:n})),g=!0}else d=`data:${n};base64,`+(0,s.EncodeArrayBufferToBase64)(e);else e instanceof Blob?(d=URL.createObjectURL(e),g=!0):(d=v.CleanUrl(e),d=v.PreprocessUrl(d));let p=t=>{if(o){let r=d||e.toString();o(`Error while trying to load image: ${0===r.indexOf("http")||r.length<=128?r:r.slice(0,128)+"..."}`,t)}};if(u?._features.forceBitmapOverHTMLImageElement)return b(d,t=>{u.createImageBitmap(new Blob([t],{type:n}),{premultiplyAlpha:"none",colorSpaceConversion:"none",...c}).then(e=>{r(e),g&&URL.revokeObjectURL(d)}).catch(t=>{o&&o("Error while trying to load image: "+e,t)})},void 0,i||void 0,!0,(e,t)=>{p(t)}),null;let h=new Image;!1;m(d,h);let K=[],y=()=>{for(let e of K)e.target.removeEventListener(e.name,e.handler);K.length=0};for(let e of(K.push({target:h,name:"load",handler:()=>{y(),r(h),g&&h.src&&URL.revokeObjectURL(h.src)}}),K.push({target:h,name:"error",handler:e=>{y(),p(e),g&&h.src&&URL.revokeObjectURL(h.src)}}),K.push({target:document,name:"securitypolicyviolation",handler:e=>{if(e.blockedURI!==h.src||"report"===e.disposition)return;y();let t=Error(`CSP violation of policy ${e.effectiveDirective} ${e.blockedURI}. Current policy is ${e.originalPolicy}`);l.EngineStore.UseFallbackTexture=!1,p(t),g&&h.src&&URL.revokeObjectURL(h.src),h.src=""}}),K))e.target.addEventListener(e.name,e.handler);let A="blob:"===d.substring(0,5),U="data:"===d.substring(0,5),P=()=>{A||U||!t.WebRequest.IsCustomRequestAvailable?h.src=d:b(d,(e,t,r)=>{let o=new Blob([e],{type:!n&&r?r:n}),a=URL.createObjectURL(o);g=!0,h.src=a},void 0,i||void 0,!0,(e,t)=>{p(t)})};if(!A&&!U&&i&&i.enableTexturesOffline)i.open(()=>{i&&i.loadImage(d,h)},P);else{if(-1!==d.indexOf("file:")){let e=decodeURIComponent(d.substring(5).toLowerCase());if(a.FilesInputStore.FilesToLoad[e]&&"u">typeof URL){try{let t;try{t=URL.createObjectURL(a.FilesInputStore.FilesToLoad[e])}catch(r){t=URL.createObjectURL(a.FilesInputStore.FilesToLoad[e])}h.src=t,g=!0}catch(e){h.src=""}return h}}P()}return h},"ReadFile",0,K,"RequestFile",0,y,"SetCorsBehavior",0,m])},65679,e=>{"use strict";function t(e){let t=r(e),a=o(e);return t-e>e-a?a:t}function r(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}function o(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)}e.s(["FloorPOT",0,o,"GetExponentOfTwo",0,function(e,a,i=2){let n;switch(i){case 1:n=o(e);break;case 2:n=t(e);break;default:n=r(e)}return Math.min(n,a)},"IsExponentOfTwo",0,function(e){let t=1;do t*=2;while(t<e)return t===e},"Mix",0,function(e,t,r){return e*(1-r)+t*r},"NearestPOT",0,t])},58279,e=>{"use strict";var t=e.i(83464),r=e.i(48477);class o{static Instantiate(e){if(this.RegisteredExternalClasses&&this.RegisteredExternalClasses[e])return this.RegisteredExternalClasses[e];let o=(0,r.GetClass)(e);if(o)return o;t.Logger.Warn(e+" not found, you may have missed an import.");let a=e.split("."),i="u">typeof window?window:"u">typeof globalThis?globalThis:this;for(let e=0,t=a.length;e<t;e++)i=i[a[e]];return"function"!=typeof i?null:i}}o.RegisteredExternalClasses={},e.s(["InstantiationTools",0,o])},29711,34637,e=>{"use strict";var t,r=e.i(57554),o=e.i(75865),a=e.i(83464);let i=(e,t,r)=>!e||e.getClassName&&"Mesh"===e.getClassName()?null:e.getClassName&&("SubMesh"===e.getClassName()||"PhysicsBody"===e.getClassName())?e.clone(t):e.clone?e.clone():Array.isArray(e)?e.slice():r&&"object"==typeof e?{...e}:null;class n{static DeepCopy(e,t,r,o,n=!1){for(let s of function(e){let t=[];do for(let r of Object.getOwnPropertyNames(e))-1===t.indexOf(r)&&t.push(r);while(e=Object.getPrototypeOf(e))return t}(e)){if("_"===s[0]&&(!o||-1===o.indexOf(s))||s.endsWith("Observable")||r&&-1!==r.indexOf(s))continue;let l=e[s],c=typeof l;if("function"!==c)try{if("object"===c)if(l instanceof Uint8Array)t[s]=Uint8Array.from(l);else if(l instanceof Array){if(t[s]=[],l.length>0)if("object"==typeof l[0])for(let e=0;e<l.length;e++){let r=i(l[e],t,n);-1===t[s].indexOf(r)&&t[s].push(r)}else t[s]=l.slice(0)}else t[s]=i(l,t,n);else t[s]=l}catch(e){a.Logger.Warn(e.message)}}}}e.s(["DeepCopier",0,n],34637);var s=e.i(85240),l=e.i(54670),c=e.i(72491),u=e.i(47867),f=e.i(25746),d=e.i(4775),g=e.i(58279),p=e.i(53477),h=e.i(65679);class v{static get BaseUrl(){return f.FileToolsOptions.BaseUrl}static set BaseUrl(e){f.FileToolsOptions.BaseUrl=e}static get CleanUrl(){return f.FileToolsOptions.CleanUrl}static set CleanUrl(e){f.FileToolsOptions.CleanUrl=e}static IsAbsoluteUrl(e){return 0===e.indexOf("//")||!(-1===e.indexOf("://")||-1===e.indexOf(".")||-1===e.indexOf("/")||e.indexOf(":")>e.indexOf("/"))&&(!!(e.indexOf("://")<e.indexOf("."))||0===e.indexOf("data:")||0===e.indexOf("blob:"))}static set ScriptBaseUrl(e){f.FileToolsOptions.ScriptBaseUrl=e}static get ScriptBaseUrl(){return f.FileToolsOptions.ScriptBaseUrl}static set CDNBaseUrl(e){t.ScriptBaseUrl=e,t.AssetBaseUrl=e}static set ScriptPreprocessUrl(e){f.FileToolsOptions.ScriptPreprocessUrl=e}static get ScriptPreprocessUrl(){return f.FileToolsOptions.ScriptPreprocessUrl}static get DefaultRetryStrategy(){return f.FileToolsOptions.DefaultRetryStrategy}static set DefaultRetryStrategy(e){f.FileToolsOptions.DefaultRetryStrategy=e}static get CorsBehavior(){return f.FileToolsOptions.CorsBehavior}static set CorsBehavior(e){f.FileToolsOptions.CorsBehavior=e}static get UseFallbackTexture(){return u.EngineStore.UseFallbackTexture}static set UseFallbackTexture(e){u.EngineStore.UseFallbackTexture=e}static get RegisteredExternalClasses(){return g.InstantiationTools.RegisteredExternalClasses}static set RegisteredExternalClasses(e){g.InstantiationTools.RegisteredExternalClasses=e}static get fallbackTexture(){return u.EngineStore.FallbackTexture}static set fallbackTexture(e){u.EngineStore.FallbackTexture=e}static FetchToRef(e,t,r,o,a,i){let n=((Math.abs(e)*r%r|0)+(Math.abs(t)*o%o|0)*r)*4;i.r=a[n]/255,i.g=a[n+1]/255,i.b=a[n+2]/255,i.a=a[n+3]/255}static Mix(e,t,r){return 0}static Instantiate(e){return g.InstantiationTools.Instantiate(e)}static SetImmediate(e){d.TimingTools.SetImmediate(e)}static IsExponentOfTwo(e){return!0}static FloatRound(e){return Math.fround(e)}static GetFilename(e){let t=e.lastIndexOf("/");return t<0?e:e.substring(t+1)}static GetFolderPath(e,t=!1){let r=e.lastIndexOf("/");return r<0?t?e:"":e.substring(0,r+1)}static ToDegrees(e){return 180*e/Math.PI}static ToRadians(e){return e*Math.PI/180}static SmoothAngleChange(e,t,r=.9){let o=this.ToRadians(e),a=this.ToRadians(t);return this.ToDegrees(Math.atan2((1-r)*Math.sin(a)+r*Math.sin(o),(1-r)*Math.cos(a)+r*Math.cos(o)))}static MakeArray(e,t){return!0!==t&&(void 0===e||null==e)?null:Array.isArray(e)?e:[e]}static GetPointerPrefix(e){return(0,o.IsWindowObjectExist)()&&!window.PointerEvent?"mouse":"pointer"}static SetCorsBehavior(e,t){(0,f.SetCorsBehavior)(e,t)}static SetReferrerPolicyBehavior(e,t){t.referrerPolicy=e}static get PreprocessUrl(){return f.FileToolsOptions.PreprocessUrl}static set PreprocessUrl(e){f.FileToolsOptions.PreprocessUrl=e}static LoadImage(e,t,r,o,a,i){return(0,f.LoadImage)(e,t,r,o,a,i)}static LoadFile(e,t,r,o,a,i){return(0,f.LoadFile)(e,t,r,o,a,i)}static async LoadFileAsync(e,t=!0){return await new Promise((r,o)=>{(0,f.LoadFile)(e,e=>{r(e)},void 0,void 0,t,(e,t)=>{o(t)})})}static GetAssetUrl(e){if(!e)return"";if(t.AssetBaseUrl&&e.startsWith(t._DefaultAssetsUrl)){let r=t.AssetBaseUrl.endsWith("/")?t.AssetBaseUrl.slice(0,-1):t.AssetBaseUrl;return e.replace(t._DefaultAssetsUrl,r)}return e}static GetBabylonScriptURL(e,r){if(!e)return"";if(e.startsWith(t._DefaultCdnUrl)){if(t.ScriptBaseUrl){let r=t.ScriptBaseUrl.endsWith("/")?t.ScriptBaseUrl.slice(0,-1):t.ScriptBaseUrl;e=e.replace(t._DefaultCdnUrl,r)}else if(t._CdnVersion){let r=`${t._DefaultCdnUrl}/v${t._CdnVersion}`;e.startsWith(r)||(e=e.replace(t._DefaultCdnUrl,r))}}return e=t.ScriptPreprocessUrl(e),r&&!t.IsAbsoluteUrl(e)&&(e=t.GetAbsoluteUrl(e)),e}static LoadBabylonScript(e,r,o,a){e=t.GetBabylonScriptURL(e),t.LoadScript(e,r,o)}static async LoadBabylonScriptAsync(e){return e=t.GetBabylonScriptURL(e),await t.LoadScriptAsync(e)}static _LoadScriptNative(e,r,o){_native&&t.LoadFile(e,e=>{try{Function(e).apply(null),r&&r()}catch(e){o&&o("LoadScript Error",e)}},void 0,void 0,!1,(e,t)=>{o&&o("LoadScript Error",t)})}static _LoadScriptWeb(e,t,r,a,i=!1){if("function"==typeof importScripts){try{importScripts(e),t&&t()}catch(t){r?.(`Unable to load script '${e}' in worker`,t)}return}if(!(0,o.IsWindowObjectExist)())return void r?.(`Cannot load script '${e}' outside of a window or a worker`);let n=document.getElementsByTagName("head")[0],s=document.createElement("script");i?(s.setAttribute("type","module"),s.innerText=e):(s.setAttribute("type","text/javascript"),s.setAttribute("src",e)),a&&(s.id=a),s.onload=()=>{t&&t()},s.onerror=t=>{r&&r(`Unable to load script '${e}'`,t)},n.appendChild(s)}static async LoadScriptAsync(e,t){return await new Promise((r,o)=>{this.LoadScript(e,()=>{r()},(e,t)=>{o(t||Error(e))},t)})}static ReadFileAsDataURL(e,t,o){let a=new FileReader,i={onCompleteObservable:new r.Observable,abort:()=>a.abort()};return a.onloadend=()=>{i.onCompleteObservable.notifyObservers(i)},a.onload=e=>{t(e.target.result)},a.onprogress=o,a.readAsDataURL(e),i}static ReadFile(e,t,r,o,a){return(0,f.ReadFile)(e,t,r,o,a)}static FileAsURL(e){let t=new Blob([e]);return window.URL.createObjectURL(t)}static Format(e,t=2){return e.toFixed(t)}static DeepCopy(e,t,r,o){n.DeepCopy(e,t,r,o)}static IsEmpty(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}static RegisterTopRootEvents(e,t){for(let r=0;r<t.length;r++){let o=t[r];e.addEventListener(o.name,o.handler,!1);try{window.parent&&window.parent.addEventListener(o.name,o.handler,!1)}catch(e){}}}static UnregisterTopRootEvents(e,t){for(let r=0;r<t.length;r++){let o=t[r];e.removeEventListener(o.name,o.handler);try{e.parent&&e.parent.removeEventListener(o.name,o.handler)}catch(e){}}}static async DumpFramebuffer(e,t,r,o,a="image/png",i,n){throw(0,l._WarnImport)("DumpTools")}static DumpData(e,t,r,o,a="image/png",i,n=!1,s=!1,c){throw(0,l._WarnImport)("DumpTools")}static async DumpDataAsync(e,t,r,o="image/png",a,i=!1,n=!1,s){throw(0,l._WarnImport)("DumpTools")}static _IsOffScreenCanvas(e){return void 0!==e.convertToBlob}static ToBlob(e,r,o="image/png",a){t._IsOffScreenCanvas(e)||e.toBlob||(e.toBlob=function(e,t,r){setTimeout(()=>{let o=atob(this.toDataURL(t,r).split(",")[1]),a=o.length,i=new Uint8Array(a);for(let e=0;e<a;e++)i[e]=o.charCodeAt(e);e(new Blob([i]))})}),t._IsOffScreenCanvas(e)?e.convertToBlob({type:o,quality:a}).then(e=>r(e)):e.toBlob(function(e){r(e)},o,a)}static DownloadBlob(e,r){if("download"in document.createElement("a")){if(!r){let e=new Date;r="screenshot_"+((e.getFullYear()+"-"+(e.getMonth()+1)).slice(2)+"-"+e.getDate()+"_"+e.getHours()+"-")+("0"+e.getMinutes()).slice(-2)+".png"}t.Download(e,r)}else if(e&&"u">typeof URL){let t=URL.createObjectURL(e),r=window.open("");if(!r)return;let o=r.document.createElement("img");o.onload=function(){URL.revokeObjectURL(t)},o.src=t,r.document.body.appendChild(o)}}static EncodeScreenshotCanvasData(e,r,o="image/png",a,i){if("string"!=typeof a&&r){if(r){if(t._IsOffScreenCanvas(e))return void e.convertToBlob({type:o,quality:i}).then(e=>{let t=new FileReader;t.readAsDataURL(e),t.onloadend=()=>{r(t.result)}});r(e.toDataURL(o,i))}}else this.ToBlob(e,function(e){e&&t.DownloadBlob(e,a),r&&r("")},o,i)}static Download(e,t){if("u"<typeof URL)return;let r=window.URL.createObjectURL(e),o=document.createElement("a");document.body.appendChild(o),o.style.display="none",o.href=r,o.download=t,o.addEventListener("click",()=>{o.parentElement&&o.parentElement.removeChild(o)}),o.click(),window.URL.revokeObjectURL(r)}static BackCompatCameraNoPreventDefault(e){return"boolean"==typeof e[0]?e[0]:"boolean"==typeof e[1]&&e[1]}static CreateScreenshot(e,t,r,o,a="image/png",i=!1,n){throw(0,l._WarnImport)("ScreenshotTools")}static async CreateScreenshotAsync(e,t,r,o="image/png",a){throw(0,l._WarnImport)("ScreenshotTools")}static CreateScreenshotUsingRenderTarget(e,t,r,o,a="image/png",i=1,n=!1,s,c=!1,u=!1,f=!0,d,g){throw(0,l._WarnImport)("ScreenshotTools")}static async CreateScreenshotUsingRenderTargetAsync(e,t,r,o="image/png",a=1,i=!1,n,s=!1,c=!1,u=!0,f,d){throw(0,l._WarnImport)("ScreenshotTools")}static RandomId(){return(0,p.RandomGUID)()}static IsBase64(e){return(0,f.IsBase64DataUrl)(e)}static DecodeBase64(e){return(0,f.DecodeBase64UrlToBinary)(e)}static get errorsCount(){return a.Logger.errorsCount}static Log(e){a.Logger.Log(e)}static Warn(e){a.Logger.Warn(e)}static Error(e){a.Logger.Error(e)}static get LogCache(){return a.Logger.LogCache}static ClearLogCache(){a.Logger.ClearLogCache()}static set LogLevels(e){a.Logger.LogLevels=e}static set PerformanceLogLevel(e){(e&t.PerformanceUserMarkLogLevel)===t.PerformanceUserMarkLogLevel?_native?.enablePerformanceLogging?(_native.enablePerformanceLogging(1),t.StartPerformanceCounter=t._StartMarkNative,t.EndPerformanceCounter=t._EndMarkNative):(t.StartPerformanceCounter=t._StartUserMark,t.EndPerformanceCounter=t._EndUserMark):(e&t.PerformanceConsoleLogLevel)===t.PerformanceConsoleLogLevel?_native?.enablePerformanceLogging?(_native.enablePerformanceLogging(2),t.StartPerformanceCounter=t._StartMarkNative,t.EndPerformanceCounter=t._EndMarkNative):(t.StartPerformanceCounter=t._StartPerformanceConsole,t.EndPerformanceCounter=t._EndPerformanceConsole):(t.StartPerformanceCounter=t._StartPerformanceCounterDisabled,t.EndPerformanceCounter=t._EndPerformanceCounterDisabled,_native?.disablePerformanceLogging?.())}static _StartPerformanceCounterDisabled(e,t){}static _EndPerformanceCounterDisabled(e,t){}static _StartUserMark(e,r=!0){if(!t._Performance){if(!(0,o.IsWindowObjectExist)())return;t._Performance=window.performance}r&&t._Performance.mark&&t._Performance.mark(e+"-Begin")}static _EndUserMark(e,r=!0){r&&t._Performance.mark&&(t._Performance.mark(e+"-End"),t._Performance.measure(e,e+"-Begin",e+"-End"))}static _StartPerformanceConsole(e,r=!0){r&&(t._StartUserMark(e,r),console.time&&console.time(e))}static _EndPerformanceConsole(e,r=!0){r&&(t._EndUserMark(e,r),console.timeEnd(e))}static _StartMarkNative(e,r=!0){if(r&&_native?.startPerformanceCounter)if(t._NativePerformanceCounterHandles.has(e))t.Warn(`Performance counter with name ${e} is already started.`);else{let r=_native.startPerformanceCounter(e);t._NativePerformanceCounterHandles.set(e,r)}}static _EndMarkNative(e,r=!0){if(r&&_native?.endPerformanceCounter){let r=t._NativePerformanceCounterHandles.get(e);r?(_native.endPerformanceCounter(r),t._NativePerformanceCounterHandles.delete(e)):t.Warn(`Performance counter with name ${e} was not started.`)}}static get Now(){return s.PrecisionDate.Now}static GetClassName(e,t=!1){let r=null;return!t&&e.getClassName?r=e.getClassName():(e instanceof Object&&(r=(t?e:Object.getPrototypeOf(e)).constructor.__bjsclassName__),r||(r=typeof e)),r}static First(e,t){for(let r of e)if(t(r))return r;return null}static getFullClassName(e,t=!1){let r=null,o=null;if(!t&&e.getClassName)r=e.getClassName();else{if(e instanceof Object){let a=t?e:Object.getPrototypeOf(e);r=a.constructor.__bjsclassName__,o=a.constructor.__bjsmoduleName__}r||(r=typeof e)}return r?(null!=o?o+".":"")+r:null}static async DelayAsync(e){await new Promise(t=>{setTimeout(()=>{t()},e)})}static IsSafari(){return!!(0,o.IsNavigatorAvailable)()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}t=v,v.AssetBaseUrl="",v.UseCustomRequestHeaders=!1,v.CustomRequestHeaders=c.WebRequest.CustomRequestHeaders,v.GetDOMTextContent=o.GetDOMTextContent,v._DefaultCdnUrl="https://cdn.babylonjs.com",v._CdnVersion="9.14.0",v._DefaultAssetsUrl="https://assets.babylonjs.com/core",v.LoadScript="u"<typeof _native?t._LoadScriptWeb:t._LoadScriptNative,v.GetAbsoluteUrl="object"==typeof document?e=>{let t=document.createElement("a");return t.href=e,t.href}:"function"==typeof URL&&"object"==typeof location?e=>new URL(e,location.origin).href:()=>{throw Error("Unable to get absolute URL. Override BABYLON.Tools.GetAbsoluteUrl to a custom implementation for the current context.")},v.NoneLogLevel=a.Logger.NoneLogLevel,v.MessageLogLevel=a.Logger.MessageLogLevel,v.WarningLogLevel=a.Logger.WarningLogLevel,v.ErrorLogLevel=a.Logger.ErrorLogLevel,v.AllLogLevel=a.Logger.AllLogLevel,v.IsWindowObjectExist=o.IsWindowObjectExist,v.PerformanceNoneLogLevel=0,v.PerformanceUserMarkLogLevel=1,v.PerformanceConsoleLogLevel=2,v._NativePerformanceCounterHandles=new Map,v.StartPerformanceCounter=t._StartPerformanceCounterDisabled,v.EndPerformanceCounter=t._EndPerformanceCounterDisabled;class m{constructor(e,t,r,o=0){this.iterations=e,this.index=o-1,this._done=!1,this._fn=t,this._successCallback=r}executeNext(){this._done||(this.index+1<this.iterations?(++this.index,this._fn(this)):this.breakLoop())}breakLoop(){this._done=!0,this._successCallback()}static Run(e,t,r,o=0){let a=new m(e,t,r,o);return a.executeNext(),a}static SyncAsyncForLoop(e,t,r,o,a,i=0){return m.Run(Math.ceil(e/t),o=>{a&&a()?o.breakLoop():setTimeout(()=>{for(let i=0;i<t;++i){let n=o.index*t+i;if(n>=e)break;if(r(n),a&&a()){o.breakLoop();break}}o.executeNext()},i)},o)}}let K=!1;e.s(["AsyncLoop",0,m,"RegisterTools",0,function(){K||(K=!0,v.Mix=h.Mix,v.IsExponentOfTwo=h.IsExponentOfTwo,u.EngineStore.FallbackTexture="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBmRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAAQAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQubmV0IDQuMC41AP/bAEMABAIDAwMCBAMDAwQEBAQFCQYFBQUFCwgIBgkNCw0NDQsMDA4QFBEODxMPDAwSGBITFRYXFxcOERkbGRYaFBYXFv/bAEMBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFv/AABEIAQABAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APH6KKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z")},"Tools",0,v],29711)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,1719,e=>{"use strict";class t{static GetShadersRepository(e=0){return 0===e?t.ShadersRepository:t.ShadersRepositoryWGSL}static GetShadersStore(e=0){return 0===e?t.ShadersStore:t.ShadersStoreWGSL}static GetIncludesShadersStore(e=0){return 0===e?t.IncludesShadersStore:t.IncludesShadersStoreWGSL}}t.ShadersRepository="src/Shaders/",t.ShadersStore={},t.IncludesShadersStore={},t.ShadersRepositoryWGSL="src/ShadersWGSL/",t.ShadersStoreWGSL={},t.IncludesShadersStoreWGSL={},e.s(["ShaderStore",0,t])},93357,29665,e=>{"use strict";var t=e.i(65703),s=e.i(57554);e.s(["PostProcessManager",0,class{constructor(e){this._vertexBuffers={},this._activePostProcesses=[],this.onBeforeRenderObservable=new s.Observable,this._scene=e}_prepareBuffers(){if(this._vertexBuffers[t.VertexBuffer.PositionKind])return;let e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[t.VertexBuffer.PositionKind]=new t.VertexBuffer(this._scene.getEngine(),e,t.VertexBuffer.PositionKind,!1,!1,2),this._buildIndexBuffer()}_buildIndexBuffer(){let e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)}_getActivePostProcesses(e){let t=this._activePostProcesses;t.length=0;for(let s=0;s<e.length;s++){let r=e[s];r&&t.push(r)}return t}_rebuild(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())}_prepareFrame(e=null,t=null){let s=this._scene.activeCamera;return!!s&&!!(t=t||this._getActivePostProcesses(s._postProcesses))&&0!==t.length&&!!this._scene.postProcessesEnabled&&(t[0].activate(s,e,null!=t),!0)}directRender(e,t=null,s=!1,r=0,i=0,a=!1,n=e.length){let o=this._scene.getEngine();for(let h=0;h<n;h++){h<e.length-1?e[h+1].activate(this._scene.activeCamera||this._scene,t?.texture):(t?o.bindFramebuffer(t,r,void 0,void 0,s,i):a||o.restoreDefaultFramebuffer(),o._debugInsertMarker?.(`post process ${e[h].name} output`));let n=e[h],l=n.apply();l&&(n.onBeforeRenderObservable.notifyObservers(l),this._prepareBuffers(),o.bindBuffers(this._vertexBuffers,this._indexBuffer,l),o.drawElementsType(0,0,6),n.onAfterRenderObservable.notifyObservers(l))}o.setDepthBuffer(!0),o.setDepthWrite(!0)}_finalizeFrame(e,t,s,r,i=!1){let a=this._scene.activeCamera;if(!a||(this.onBeforeRenderObservable.notifyObservers(this),0===(r=r||this._getActivePostProcesses(a._postProcesses)).length||!this._scene.postProcessesEnabled))return;let n=this._scene.getEngine();for(let o=0,h=r.length;o<h;o++){let l=r[o];if(o<h-1?l._outputTexture=r[o+1].activate(a,t?.texture):(t?(n.bindFramebuffer(t,s,void 0,void 0,i),l._outputTexture=t):(n.restoreDefaultFramebuffer(),l._outputTexture=null),n._debugInsertMarker?.(`post process ${r[o].name} output`)),e)break;let c=l.apply();c&&(l.onBeforeRenderObservable.notifyObservers(c),this._prepareBuffers(),n.bindBuffers(this._vertexBuffers,this._indexBuffer,c),n.drawElementsType(0,0,6),l.onAfterRenderObservable.notifyObservers(c))}n.setDepthBuffer(!0),n.setDepthWrite(!0),n.setAlphaMode(0)}dispose(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[t.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null)}}],93357);var r=e.i(95294),i=e.i(10534);class a{set opaqueSortCompareFn(e){e?this._opaqueSortCompareFn=e:this._opaqueSortCompareFn=a.PainterSortCompare,this._renderOpaque=this._renderOpaqueSorted}set alphaTestSortCompareFn(e){e?this._alphaTestSortCompareFn=e:this._alphaTestSortCompareFn=a.PainterSortCompare,this._renderAlphaTest=this._renderAlphaTestSorted}set transparentSortCompareFn(e){e?this._transparentSortCompareFn=e:this._transparentSortCompareFn=a.defaultTransparentSortCompare,this._renderTransparent=this._renderTransparentSorted}constructor(e,t,s=null,i=null,a=null){this.index=e,this._opaqueSubMeshes=new r.SmartArray(256),this._transparentSubMeshes=new r.SmartArray(256),this._alphaTestSubMeshes=new r.SmartArray(256),this._depthOnlySubMeshes=new r.SmartArray(256),this._particleSystems=new r.SmartArray(256),this._spriteManagers=new r.SmartArray(256),this._empty=!0,this._edgesRenderers=new r.SmartArrayNoDuplicate(16),this.disableDepthPrePass=!1,this._scene=t,this.opaqueSortCompareFn=s,this.alphaTestSortCompareFn=i,this.transparentSortCompareFn=a}render(e,t,s,r,i=!0,a=!0,n=!0,o=!0,h){if(e)return void e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);let l=this._scene.getEngine();i&&0!==this._depthOnlySubMeshes.length&&(l.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),l.setColorWrite(!0)),a&&0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),n&&0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);let c=l.getStencilBuffer();if(l.setStencilBuffer(!1),t&&this._renderSprites(),s&&this._renderParticles(r),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),o&&(h||0!==this._transparentSubMeshes.length||this._scene.useOrderIndependentTransparency)){if(l.setStencilBuffer(c),h)h(this._transparentSubMeshes,this);else if(this._scene.useOrderIndependentTransparency){let e=this._scene.depthPeelingRenderer.render(this._transparentSubMeshes);e.length&&this._renderTransparent(e)}else this._renderTransparent(this._transparentSubMeshes);l.setAlphaMode(0)}if(l.setStencilBuffer(!1),a&&this._edgesRenderers.length){for(let e=0;e<this._edgesRenderers.length;e++)this._edgesRenderers.data[e].render();l.setAlphaMode(0)}l.setStencilBuffer(c)}_renderOpaqueSorted(e){a._RenderSorted(e,this._opaqueSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderAlphaTestSorted(e){a._RenderSorted(e,this._alphaTestSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderTransparentSorted(e){a._RenderSorted(e,this._transparentSortCompareFn,this._scene.activeCamera,!0,this.disableDepthPrePass)}static _RenderSorted(e,t,s,r,n){let o,h=0,l=s?s.globalPosition:a._ZeroVector;if(r)for(;h<e.length;h++)(o=e.data[h])._alphaIndex=o.getMesh().alphaIndex,o._distanceToCamera=i.Vector3.Distance(o.getBoundingInfo().boundingSphere.centerWorld,l);let c=e.length===e.data.length?e.data:e.data.slice(0,e.length);t&&c.sort(t);let p=c[0].getMesh().getScene();for(h=0;h<c.length;h++)if(o=c[h],!p._activeMeshesFrozenButKeepClipping||o.isInFrustum(p._frustumPlanes)){if(r){let e=o.getMaterial();if(e&&e.needDepthPrePass&&!n){let t=e.getScene().getEngine();t.setColorWrite(!1),t.setAlphaMode(0),o.render(!1),t.setColorWrite(!0)}}o.render(r)}}static defaultTransparentSortCompare(e,t){return e._alphaIndex>t._alphaIndex?1:e._alphaIndex<t._alphaIndex?-1:a.backToFrontSortCompare(e,t)}static backToFrontSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0}static frontToBackSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?-1:+(e._distanceToCamera>t._distanceToCamera)}static PainterSortCompare(e,t){let s=e.getMesh(),r=t.getMesh();return s.material&&r.material?s.material.uniqueId-r.material.uniqueId:s.uniqueId-r.uniqueId}prepare(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this.prepareSprites(),this._edgesRenderers.reset(),this._empty=!0}prepareSprites(){this._spriteManagers.reset()}dispose(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()}dispatch(e,t,s){void 0===t&&(t=e.getMesh()),void 0===s&&(s=e.getMaterial()),null!=s&&(s.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):s.needAlphaTestingForMesh(t)?(s.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(s.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._renderingGroup=this,t._edgesRenderer&&t.isEnabled()&&t.isVisible&&t._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(t._edgesRenderer),this._empty=!1)}dispatchSprites(e){this._spriteManagers.push(e),this._empty=!1}dispatchParticles(e){this._particleSystems.push(e),this._empty=!1}_renderParticles(e){if(0===this._particleSystems.length)return;let t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(let s=0;s<this._particleSystems.length;s++){let r=this._particleSystems.data[s];if(0===(t&&t.layerMask&r.layerMask))continue;let i=r.emitter;i.position&&e&&-1===e.indexOf(i)||this._scene._activeParticles.addCount(r.render(),!1)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}_renderSprites(){if(!this._scene.spritesEnabled||0===this._spriteManagers.length)return;let e=this._scene.activeCamera;this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);for(let t=0;t<this._spriteManagers.length;t++){let s=this._spriteManagers.data[t];0!==(e&&e.layerMask&s.layerMask)&&s.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}}a._ZeroVector=i.Vector3.Zero();class n{}class o{get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){for(let t of(this._disableDepthPrePass=e,this._renderingGroups))t.disableDepthPrePass=e}get maintainStateBetweenFrames(){return this._maintainStateBetweenFrames}set maintainStateBetweenFrames(e){e!==this._maintainStateBetweenFrames&&(this._maintainStateBetweenFrames=e,this._maintainStateBetweenFrames||this.restoreDispachedFlags())}restoreDispachedFlags(){for(let e of this._scene.meshes)if(e.subMeshes)for(let t of e.subMeshes)t._wasDispatched=!1;if(this._scene.spriteManagers)for(let e of this._scene.spriteManagers)e._wasDispatched=!1;for(let e of this._scene.particleSystems)e._wasDispatched=!1}constructor(e){this._useSceneAutoClearSetup=!1,this._disableDepthPrePass=!1,this._renderingGroups=[],this._autoClearDepthStencil={},this._customOpaqueSortCompareFn={},this._customAlphaTestSortCompareFn={},this._customTransparentSortCompareFn={},this._renderingGroupInfo=new n,this._maintainStateBetweenFrames=!1,this._scene=e;for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++)this._autoClearDepthStencil[e]={autoClear:!0,depth:!0,stencil:!0}}get renderingGroups(){return this._renderingGroups}getRenderingGroup(e){let t=e||0;return this._prepareRenderingGroup(t),this._renderingGroups[t]}_clearDepthStencilBuffer(e=!0,t=!0){this._depthStencilBufferAlreadyCleaned||(this._scene.getEngine().clear(null,!1,e,t),this._depthStencilBufferAlreadyCleaned=!0)}render(e,t,s,r,i=!0,a=!0,n=!0,h=!0,l){let c=this._renderingGroupInfo;if(c.scene=this._scene,c.camera=this._scene.activeCamera,c.renderingManager=this,this._scene.spriteManagers&&r)for(let e=0;e<this._scene.spriteManagers.length;e++){let t=this._scene.spriteManagers[e];this.dispatchSprites(t)}for(let p=o.MIN_RENDERINGGROUPS;p<o.MAX_RENDERINGGROUPS;p++){this._depthStencilBufferAlreadyCleaned=p===o.MIN_RENDERINGGROUPS;let u=this._renderingGroups[p];if(!u||u._empty)continue;let d=1<<p;if(c.renderingGroupId=p,this._scene.onBeforeRenderingGroupObservable.notifyObservers(c,d),o.AUTOCLEAR){let e=this._useSceneAutoClearSetup?this._scene.getAutoClearDepthStencilSetup(p):this._autoClearDepthStencil[p];e&&e.autoClear&&this._clearDepthStencilBuffer(e.depth,e.stencil)}for(let e of this._scene._beforeRenderingGroupDrawStage)e.action(p);for(let o of(u.render(e,r,s,t,i,a,n,h,l),this._scene._afterRenderingGroupDrawStage))o.action(p);this._scene.onAfterRenderingGroupObservable.notifyObservers(c,d)}}reset(){if(!this.maintainStateBetweenFrames)for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepare()}}resetSprites(){if(!this.maintainStateBetweenFrames)for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepareSprites()}}dispose(){this.freeRenderingGroups(),this._renderingGroups.length=0,this._renderingGroupInfo=null}freeRenderingGroups(){for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.dispose()}}_prepareRenderingGroup(e){void 0===this._renderingGroups[e]&&(this._renderingGroups[e]=new a(e,this._scene,this._customOpaqueSortCompareFn[e],this._customAlphaTestSortCompareFn[e],this._customTransparentSortCompareFn[e]),this._renderingGroups[e].disableDepthPrePass=this._disableDepthPrePass)}dispatchSprites(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchSprites(e))}dispatchParticles(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchParticles(e))}dispatch(e,t,s){void 0===t&&(t=e.getMesh()),this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(t.renderingGroupId).dispatch(e,t,s))}setRenderingOrder(e,t=null,s=null,r=null){if(this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=s,this._customTransparentSortCompareFn[e]=r,this._renderingGroups[e]){let t=this._renderingGroups[e];t.opaqueSortCompareFn=this._customOpaqueSortCompareFn[e],t.alphaTestSortCompareFn=this._customAlphaTestSortCompareFn[e],t.transparentSortCompareFn=this._customTransparentSortCompareFn[e]}}setRenderingAutoClearDepthStencil(e,t,s=!0,r=!0){this._autoClearDepthStencil[e]={autoClear:t,depth:s,stencil:r}}getAutoClearDepthStencilSetup(e){return this._autoClearDepthStencil[e]}}o.MAX_RENDERINGGROUPS=4,o.MIN_RENDERINGGROUPS=0,o.AUTOCLEAR=!0,e.s(["RenderingManager",0,o],29665)},3367,e=>{"use strict";var t=e.i(85240);class s{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(e,t){s.Enabled&&(this._current+=e,t&&this._fetchResult())}beginMonitoring(){s.Enabled&&(this._startMonitoringTime=t.PrecisionDate.Now)}endMonitoring(e=!0){if(!s.Enabled)return;e&&this.fetchNewFrame();let r=t.PrecisionDate.Now;this._current=r-this._startMonitoringTime,e&&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 e=t.PrecisionDate.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)}}s.Enabled=!0,e.s(["PerfCounter",0,s])},16475,e=>{"use strict";var t=e.i(38677);class s{static GetPlanes(e){let r=[];for(let e=0;e<6;e++)r.push(new t.Plane(0,0,0,0));return s.GetPlanesToRef(e,r),r}static GetNearPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[2],t.normal.y=s[7]+s[6],t.normal.z=s[11]+s[10],t.d=s[15]+s[14],t.normalize()}static GetFarPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[2],t.normal.y=s[7]-s[6],t.normal.z=s[11]-s[10],t.d=s[15]-s[14],t.normalize()}static GetLeftPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[0],t.normal.y=s[7]+s[4],t.normal.z=s[11]+s[8],t.d=s[15]+s[12],t.normalize()}static GetRightPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[0],t.normal.y=s[7]-s[4],t.normal.z=s[11]-s[8],t.d=s[15]-s[12],t.normalize()}static GetTopPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]-s[1],t.normal.y=s[7]-s[5],t.normal.z=s[11]-s[9],t.d=s[15]-s[13],t.normalize()}static GetBottomPlaneToRef(e,t){let s=e.m;t.normal.x=s[3]+s[1],t.normal.y=s[7]+s[5],t.normal.z=s[11]+s[9],t.d=s[15]+s[13],t.normalize()}static GetPlanesToRef(e,t){s.GetNearPlaneToRef(e,t[0]),s.GetFarPlaneToRef(e,t[1]),s.GetLeftPlaneToRef(e,t[2]),s.GetRightPlaneToRef(e,t[3]),s.GetTopPlaneToRef(e,t[4]),s.GetBottomPlaneToRef(e,t[5])}static IsPointInFrustum(e,t){for(let s=0;s<6;s++)if(0>t[s].dotCoordinate(e))return!1;return!0}}e.s(["Frustum",0,s])},66476,e=>{"use strict";var t=e.i(10534),s=e.i(65703);e.s(["PickingInfo",0,class{constructor(){this.hit=!1,this.distance=0,this.pickedPoint=null,this.pickedMesh=null,this.bu=0,this.bv=0,this.faceId=-1,this.subMeshFaceId=-1,this.subMeshId=0,this.pickedSprite=null,this.thinInstanceIndex=-1,this.ray=null,this.originMesh=null,this.aimTransform=null,this.gripTransform=null}getNormal(e=!1,r=!0){let i;if(!this.pickedMesh||r&&!this.pickedMesh.isVerticesDataPresent(s.VertexBuffer.NormalKind))return null;let a=this.pickedMesh.getIndices();a?.length===0&&(a=null);let n=t.TmpVectors.Vector3[0],o=t.TmpVectors.Vector3[1],h=t.TmpVectors.Vector3[2];if(r){let e=this.pickedMesh.getVerticesData(s.VertexBuffer.NormalKind),r=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId],n):n.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),l=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId+1],o):o.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),c=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId+2],h):h.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]);r=r.scale(this.bu),l=l.scale(this.bv),c=c.scale(1-this.bu-this.bv),i=new t.Vector3(r.x+l.x+c.x,r.y+l.y+c.y,r.z+l.z+c.z)}else{let e=this.pickedMesh.getVerticesData(s.VertexBuffer.PositionKind),r=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId],n):n.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),l=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId+1],o):o.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),c=a?t.Vector3.FromArrayToRef(e,3*a[3*this.faceId+2],h):h.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]),p=r.subtract(l),u=c.subtract(l);i=t.Vector3.Cross(p,u)}let l=(e,s)=>{if(-1!==this.thinInstanceIndex){let r=e._thinInstanceDataStorage.matrixData,i=this.thinInstanceIndex<<4;if(r&&r.length>i){let e=t.TmpVectors.Matrix[0];t.Matrix.FromArrayToRef(r,i,e),t.Vector3.TransformNormalToRef(s,e,s)}}let r=e.getWorldMatrix();e.nonUniformScaling&&(t.TmpVectors.Matrix[0].copyFrom(r),(r=t.TmpVectors.Matrix[0]).setTranslationFromFloats(0,0,0),r.invert(),r.transposeToRef(t.TmpVectors.Matrix[1]),r=t.TmpVectors.Matrix[1]),t.Vector3.TransformNormalToRef(s,r,s)};if(e&&l(this.pickedMesh,i),this.ray){let s=t.TmpVectors.Vector3[0].copyFrom(i);e||l(this.pickedMesh,s),t.Vector3.Dot(s,this.ray.direction)>0&&i.negateInPlace()}return i.normalize(),i}getTextureCoordinates(e=s.VertexBuffer.UVKind){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(e))return null;let r=this.pickedMesh.getIndices();if(!r)return null;let i=this.pickedMesh.getVerticesData(e);if(!i)return null;let a=t.Vector2.FromArray(i,2*r[3*this.faceId]),n=t.Vector2.FromArray(i,2*r[3*this.faceId+1]),o=t.Vector2.FromArray(i,2*r[3*this.faceId+2]);return a=a.scale(this.bu),n=n.scale(this.bv),o=o.scale(1-this.bu-this.bv),new t.Vector2(a.x+n.x+o.x,a.y+n.y+o.y)}}])},11437,e=>{"use strict";var t=e.i(10534);class s{}s.POINTERDOWN=1,s.POINTERUP=2,s.POINTERMOVE=4,s.POINTERWHEEL=8,s.POINTERPICK=16,s.POINTERTAP=32,s.POINTERDOUBLETAP=64;class r{constructor(e,t){this.type=e,this.event=t}}e.s(["PointerEventTypes",0,s,"PointerInfo",0,class extends r{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(e,t,s,r=null){super(e,t),this._pickInfo=s,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(e,s,r,i){super(e,s),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new t.Vector2(r,i)}}])},70463,e=>{"use strict";class t{}t.KEYDOWN=1,t.KEYUP=2;class s{constructor(e,t){this.type=e,this.event=t}}e.s(["KeyboardEventTypes",0,t,"KeyboardInfo",0,s,"KeyboardInfoPre",0,class extends s{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(e){this.skipOnKeyboardObservable=e}constructor(e,t){super(e,t),this.type=e,this.event=t,this.skipOnKeyboardObservable=!1}}])},24423,e=>{"use strict";var t,s;(s=t||(t={}))[s.PointerMove=0]="PointerMove",s[s.PointerDown=1]="PointerDown",s[s.PointerUp=2]="PointerUp";class r{}r.DOM_DELTA_PIXEL=0,r.DOM_DELTA_LINE=1,r.DOM_DELTA_PAGE=2,e.s(["EventConstants",0,r])},92494,e=>{"use strict";var t=e.i(56770);(0,t.RegisterScene)(),e.s([],53506),e.i(53506),e.s(["RegisterScene",()=>t.RegisterScene,"Scene",()=>t.Scene,"ScenePerformancePriority",()=>t.ScenePerformancePriority],92494)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7438,e=>{"use strict";class t{static SetMatrixPrecision(e){if(t.MatrixTrackPrecisionChange=!1,e&&!t.MatrixUse64Bits&&t.MatrixTrackedMatrices)for(let e=0;e<t.MatrixTrackedMatrices.length;++e){let s=t.MatrixTrackedMatrices[e],r=s._m;s._m=Array(16);for(let e=0;e<16;++e)s._m[e]=r[e]}t.MatrixUse64Bits=e,t.MatrixCurrentType=t.MatrixUse64Bits?Array:Float32Array,t.MatrixTrackedMatrices=null}}t.MatrixUse64Bits=!1,t.MatrixTrackPrecisionChange=!0,t.MatrixCurrentType=Float32Array,t.MatrixTrackedMatrices=[],e.s(["PerformanceConfigurator",0,t])},35270,e=>{"use strict";e.s(["Clamp",0,function(e,t=0,s=1){return Math.min(s,Math.max(t,e))},"Hermite",0,function(e,t,s,r,i){let n=i*i,o=i*n;return e*(2*o-3*n+1)+s*(-2*o+3*n)+t*(o-2*n+i)+r*(o-n)},"HighestCommonFactor",0,function e(t,s){let r=t%s;return 0===r?s:e(s,r)},"ILog2",0,function(e){if(Math.log2)return Math.floor(Math.log2(e));if(e<0)return NaN;if(0===e)return-1/0;let t=0;if(e<1){for(;e<1;)t++,e*=2;t=-t}else if(e>1)for(;e>1;)t++,e=Math.floor(e/2);return t},"Lerp",0,function(e,t,s){return e+(t-e)*s},"NormalizeRadians",0,function(e){return e-2*Math.PI*Math.floor((e+Math.PI)/(2*Math.PI))},"RandomRange",0,function(e,t){return e===t?e:Math.random()*(t-e)+e},"ToHex",0,function(e){let t=e.toString(16);return e<=15?("0"+t).toUpperCase():t.toUpperCase()},"WithinEpsilon",0,function(e,t,s=1401298e-51){return Math.abs(e-t)<=s}])},47867,54670,57554,e=>{"use strict";var t,s,r;let i={},n={};function o(e,t,s=!1){let r=function(){if(s&&1){let s=`${e}.${t}`;n[s]||(n[s]=!0,console.warn(`[Babylon.js] ${s}() requires a side-effect import. See: https://doc.babylonjs.com/setup/treeshaking`))}};return r.__isSideEffectStub=!0,r}e.s(["_IsSideEffectImplemented",0,function(e){return!!e&&!e.__isSideEffectStub},"_MissingSideEffect",0,o,"_MissingSideEffectProperty",0,function(e,t){return{get(){},set(e){Object.defineProperty(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0}},"_WarnImport",0,function(e,t=!1){if(!t||!i[e])return i[e]=!0,`${e} needs to be imported before as it contains a side-effect required by your code.`}],54670);let a="u">typeof WeakRef;class l{constructor(e,t=!1,s,r){this.initialize(e,t,s,r)}initialize(e,t=!1,s,r){return this.mask=e,this.skipNextObservers=t,this.target=s,this.currentTarget=r,this}}class c{constructor(e,t,s=null){this.callback=e,this.mask=t,this.scope=s,this._willBeUnregistered=!1,this.unregisterOnNextCall=!1,this._remove=null}remove(e=!1){this._remove&&this._remove(e)}}class u{static FromPromise(e,t){let s=new u;return e.then(e=>{s.notifyObservers(e)}).catch(e=>{if(t)t.notifyObservers(e);else throw e}),s}get observers(){return this._observers}constructor(e,t=!1){this.notifyIfTriggered=t,this._observers=[],this._numObserversMarkedAsDeleted=0,this._hasNotified=!1,this._eventState=new l(0),e&&(this._onObserverAdded=e)}add(e,t=-1,s=!1,r=null,i=!1){if(!e)return null;let n=new c(e,t,r);n.unregisterOnNextCall=i,s?this._observers.unshift(n):this._observers.push(n),this._onObserverAdded&&this._onObserverAdded(n),this._hasNotified&&this.notifyIfTriggered&&void 0!==this._lastNotifiedValue&&this.notifyObserver(n,this._lastNotifiedValue);let o=a?new WeakRef(this):{deref:()=>this};return n._remove=(e=!1)=>{let t=o.deref();t&&(e?t.remove(n):t._remove(n))},n}addOnce(e){return this.add(e,void 0,void 0,void 0,!0)}remove(e){return!!e&&(e._remove=null,-1!==this._observers.indexOf(e)&&(this._deferUnregister(e),!0))}removeCallback(e,t){for(let s=0;s<this._observers.length;s++){let r=this._observers[s];if(!r._willBeUnregistered&&r.callback===e&&(!t||t===r.scope))return this._deferUnregister(r),!0}return!1}_deferUnregister(e){e._willBeUnregistered||(this._numObserversMarkedAsDeleted++,e.unregisterOnNextCall=!1,e._willBeUnregistered=!0,setTimeout(()=>{this._remove(e)},0))}_remove(e,t=!0){if(!e)return!1;let s=this._observers.indexOf(e);return -1!==s&&(t&&this._numObserversMarkedAsDeleted--,this._observers.splice(s,1),!0)}makeObserverTopPriority(e){this._remove(e,!1),this._observers.unshift(e)}makeObserverBottomPriority(e){this._remove(e,!1),this._observers.push(e)}notifyObservers(e,t=-1,s,r,i){if(this.notifyIfTriggered&&(this._hasNotified=!0,this._lastNotifiedValue=e),!this._observers.length)return!0;let n=this._eventState;for(let o of(n.mask=t,n.target=s,n.currentTarget=r,n.skipNextObservers=!1,n.lastReturnValue=e,n.userInfo=i,this._observers))if(!o._willBeUnregistered&&(o.mask&t&&(o.unregisterOnNextCall&&this._deferUnregister(o),o.scope?n.lastReturnValue=o.callback.apply(o.scope,[e,n]):n.lastReturnValue=o.callback(e,n)),n.skipNextObservers))return!1;return!0}notifyObserver(e,t,s=-1){if(this.notifyIfTriggered&&(this._hasNotified=!0,this._lastNotifiedValue=t),e._willBeUnregistered)return;let r=this._eventState;r.mask=s,r.skipNextObservers=!1,e.unregisterOnNextCall&&this._deferUnregister(e),e.callback(t,r)}hasObservers(){return this._observers.length-this._numObserversMarkedAsDeleted>0}clear(){for(;this._observers.length;){let e=this._observers.pop();e&&(e._remove=null)}this._onObserverAdded=null,this._numObserversMarkedAsDeleted=0,this.cleanLastNotifiedState()}cleanLastNotifiedState(){this._hasNotified=!1,this._lastNotifiedValue=void 0}clone(){let e=new u;return e._observers=this._observers.slice(0),e}hasSpecificMask(e=-1){for(let t of this._observers)if(t.mask&e||t.mask===e)return!0;return!1}}(t=u.prototype).notifyObserversWithPromise??(t.notifyObserversWithPromise=o("Observable","notifyObserversWithPromise")),(s=u.prototype).runCoroutineAsync??(s.runCoroutineAsync=o("Observable","runCoroutineAsync")),(r=u.prototype).cancelAllCoroutines??(r.cancelAllCoroutines=o("Observable","cancelAllCoroutines")),e.s(["Observable",0,u],57554);class h{static get LastCreatedEngine(){return 0===this.Instances.length?null:this.Instances[this.Instances.length-1]}static get LastCreatedScene(){return this._LastCreatedScene}}h.Instances=[],h.OnEnginesDisposedObservable=new u,h._LastCreatedScene=null,h.UseFallbackTexture=!0,h.FallbackTexture="",e.s(["EngineStore",0,h],47867)},48477,e=>{"use strict";let t={};e.s(["GetClass",0,function(e){return t[e]},"RegisterClass",0,function(e,s){t[e]=s}])},7904,e=>{"use strict";(0,e.i(10534).RegisterMathVector)(),e.s([])},97900,e=>{"use strict";e.i(7904);var t=e.i(10534);function s(e){let s=new t.Vector3,r=new t.Vector3,i=new t.Vector3;return{reset(){},apply(n){switch(n.type){case"camera_sample":{let t=e.camera??e.scene.activeCamera;if(!t)return;let[i,o,a]=n.position;if(n.target)s.set(n.target[0],n.target[1],n.target[2]);else{let[e,t,r]=n.direction;s.set(i+e,o+t,a+r)}t.setTarget?.(s),"function"==typeof t.setPosition?(r.set(i,o,a),t.setPosition(r)):t.position.set(i,o,a);break}case"pointer_move":case"pointer_click":case"pointer_down":case"pointer_up":e.onPointer?.(n.screen,n.hitPoint,n.hitMesh,n.type);break;case"mesh_interaction":e.onMeshInteraction?.(n.mesh,n.kind,n.point);break;case"custom":e.onCustom?.(n.name,n.props,n.ts);break;case"input_action":e.onInputAction?.({action:n.action,code:n.code,button:n.button,pressed:n.pressed,source:n.source},n.ts);break;case"viewport_resize":e.onLifecycle?.({type:"viewport_resize",width:n.width,height:n.height,dpr:n.dpr},n.ts);break;case"visibility_change":e.onLifecycle?.({type:"visibility_change",state:n.state},n.ts);break;case"focus_change":e.onLifecycle?.({type:"focus_change",focused:n.focused},n.ts);break;case"context_lost":e.onLifecycle?.({type:"context_lost"},n.ts);break;case"context_restored":e.onLifecycle?.({type:"context_restored"},n.ts);break;case"runtime_error":e.onError?.({kind:n.kind,message:n.message,source:n.source,lineno:n.lineno,colno:n.colno,stack:n.stack},n.ts);break;case"camera_gesture":break;case"node_transform":{var o;let s=(o=e.nodes?.[n.nodeId])?"function"==typeof o?o()??null:o:null;if(s)if(void 0!==n.boneId){let e=s.skeleton?.bones?.find(e=>e.name===n.boneId);e&&(e.position?.set(n.position[0],n.position[1],n.position[2]),e.rotationQuaternion=new t.Quaternion(n.rotation[0],n.rotation[1],n.rotation[2],n.rotation[3]),n.scale&&e.scaling?.set(n.scale[0],n.scale[1],n.scale[2]),e.markAsDirty?.())}else{let e=void 0===n.childPath?s:function(e,t){let s=e;for(let e of t.split("/")){if(!e)continue;let t=s?.getChildren?.();if(!Array.isArray(t)||!(s=t.find(t=>t.name===e)??null))return null}return s}(s,n.childPath);e&&("function"==typeof e.setAbsolutePosition?(i.set(n.position[0],n.position[1],n.position[2]),e.setAbsolutePosition(i)):e.position?.set(n.position[0],n.position[1],n.position[2]),e.rotationQuaternion=new t.Quaternion(n.rotation[0],n.rotation[1],n.rotation[2],n.rotation[3]),n.scale&&e.scaling?.set(n.scale[0],n.scale[1],n.scale[2]))}e.onNodeTransform?.(n.nodeId,{boneId:n.boneId,childPath:n.childPath,position:n.position,rotation:n.rotation,scale:n.scale},n.ts)}}}}}async function r(e,t){let s=await e(t?.pluginExtension);s.addAllToScene();let r=!1;return{rootNodes:s.rootNodes??[],meshes:s.meshes??[],container:s,dispose(){r||(r=!0,s.removeAllFromScene?.(),s.dispose?.())}}}async function i(t,s,r){let{LoadAssetContainerAsync:i}=await e.A(49483);return await i(t,s,r?{pluginExtension:r}:void 0)}e.s(["createBabylonReplayDriver",0,s],27012),e.i(27012),e.s(["createBabylonReplayDriver",0,s,"loadSceneBackdrop",0,function(e,t,s){let n=s?.load??i;return r(s=>n(t,e,s),s)}],97900)},49483,e=>{e.v(t=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/0nx_t8iq-324h.js","static/chunks/2btqzk0tj0gz6.js","static/chunks/2h1uw3cluvmmo.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3g_h_00xs9u59.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3vaho-xrtuchd.js"].map(t=>e.l(t))).then(()=>t(87456)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89102,e=>{"use strict";var t=e.i(10534),r=e.i(35270),a=e.i(12247),o=e.i(26722),l=e.i(75053);class i{constructor(e,t,r,a){this.name=e,this.worldAxisForNormal=t,this.worldAxisForFileX=r,this.worldAxisForFileY=a}}class n{static _NearestPow2Floor(e){return e<=1?1:1<<Math.floor(Math.log2(e))}static ConvertCubeMapTextureToSphericalPolynomial(e){let t,r;if(!e.isCube)return null;e.getScene()?.getEngine().flushFramebuffer();let a=e.getSize().width,o=e._sphericalPolynomialTargetSize,l=o>0?this._NearestPow2Floor(o):0,i=!e.noMipmap&&e._texture?.generateMipMaps===!0,n=l>0&&l<a&&i,s=n?Math.max(0,Math.round(Math.log2(a/l))):0,f=n?Math.max(1,Math.floor(a/Math.pow(2,s))):a,u=e.readPixels(0,s,void 0,!1),c=e.readPixels(1,s,void 0,!1);e.isRenderTarget?(t=e.readPixels(3,s,void 0,!1),r=e.readPixels(2,s,void 0,!1)):(t=e.readPixels(2,s,void 0,!1),r=e.readPixels(3,s,void 0,!1));let p=e.readPixels(4,s,void 0,!1),m=e.readPixels(5,s,void 0,!1),h=e.gammaSpace,A=l>0&&l<a&&!n;return new Promise(e=>{Promise.all([c,u,t,r,p,m]).then(([t,r,o,i,n,s])=>{let u=f;A&&(t=this._DownsampleFace(t,a,l,4),r=this._DownsampleFace(r,a,l,4),o=this._DownsampleFace(o,a,l,4),i=this._DownsampleFace(i,a,l,4),n=this._DownsampleFace(n,a,l,4),s=this._DownsampleFace(s,a,l,4),u=l);let c={size:u,right:r,left:t,up:o,down:i,front:n,back:s,format:5,type:+(t instanceof Float32Array),gammaSpace:h};e(this.ConvertCubeMapToSphericalPolynomial(c))})})}static _AreaElement(e,t){return Math.atan2(e*t,Math.sqrt(e*e+t*t+1))}static _DownsampleFace(e,t,r,a){let o=e instanceof Float32Array?e:Float32Array.from(e),l=r*r*a,i=new Float32Array(l),n=t/r,s=1/(n*n);for(let e=0;e<r;e++){let l=Math.floor(e*n),f=Math.floor((e+1)*n);for(let u=0;u<r;u++){let c=Math.floor(u*n),p=Math.floor((u+1)*n),m=(e*r+u)*a;for(let e=0;e<a;e++){let r=0;for(let i=l;i<f;i++)for(let l=c;l<p;l++)r+=o[(i*t+l)*a+e];i[m+e]=r*s}}}if(e instanceof Float32Array)return i;let f=new e.constructor(l);for(let e=0;e<l;e++)f[e]=i[e]+.5|0;return f}static ConvertCubeMapToSphericalPolynomial(e,t=0){let i=t>0?this._NearestPow2Floor(t):0;if(i>0&&e.size>i){let t=5===e.format?4:3,r={};for(let a of["right","left","up","down","front","back"])r[a]=this._DownsampleFace(e[a],e.size,i,t);e={...e,...r,size:i}}let n=new a.SphericalHarmonics,s=0,f=2/e.size,u=.5*f,c=u-1;for(let t=0;t<6;t++){let a=this._FileFaces[t],i=e[a.name],p=c,m=5===e.format?4:3;for(let t=0;t<e.size;t++){let h=c;for(let c=0;c<e.size;c++){let A=a.worldAxisForFileX.scale(h).add(a.worldAxisForFileY.scale(p)).add(a.worldAxisForNormal);A.normalize();let F=this._AreaElement(h-u,p-u)-this._AreaElement(h-u,p+u)-this._AreaElement(h+u,p-u)+this._AreaElement(h+u,p+u),d=i[t*e.size*m+c*m+0],y=i[t*e.size*m+c*m+1],w=i[t*e.size*m+c*m+2];isNaN(d)&&(d=0),isNaN(y)&&(y=0),isNaN(w)&&(w=0),0===e.type&&(d/=255,y/=255,w/=255),e.gammaSpace&&(d=Math.pow((0,r.Clamp)(d),o.ToLinearSpace),y=Math.pow((0,r.Clamp)(y),o.ToLinearSpace),w=Math.pow((0,r.Clamp)(w),o.ToLinearSpace));let C=this.MAX_HDRI_VALUE;if(this.PRESERVE_CLAMPED_COLORS){let e=Math.max(d,y,w);if(e>C){let t=C/e;d*=t,y*=t,w*=t}}else d=(0,r.Clamp)(d,0,C),y=(0,r.Clamp)(y,0,C),w=(0,r.Clamp)(w,0,C);let _=new l.Color3(d,y,w);n.addLight(A,_,F),s+=F,h+=f}p+=f}}let p=4*Math.PI*6/6/s;return n.scaleInPlace(p),n.convertIncidentRadianceToIrradiance(),n.convertIrradianceToLambertianRadiance(),a.SphericalPolynomial.FromHarmonics(n)}}n._FileFaces=[new i("right",new t.Vector3(1,0,0),new t.Vector3(0,0,-1),new t.Vector3(0,-1,0)),new i("left",new t.Vector3(-1,0,0),new t.Vector3(0,0,1),new t.Vector3(0,-1,0)),new i("up",new t.Vector3(0,1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,1)),new i("down",new t.Vector3(0,-1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,-1)),new i("front",new t.Vector3(0,0,1),new t.Vector3(1,0,0),new t.Vector3(0,-1,0)),new i("back",new t.Vector3(0,0,-1),new t.Vector3(-1,0,0),new t.Vector3(0,-1,0))],n.MAX_HDRI_VALUE=4096,n.PRESERVE_CLAMPED_COLORS=!1,e.s(["CubeMapToSphericalPolynomialTools",0,n])},22093,e=>{"use strict";var t=e.i(35270),r=e.i(83464),a=e.i(89102),o=e.i(37890);function l(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}let i=l("DXT1"),n=l("DXT3"),s=l("DXT5"),f=l("DX10");class u{static GetDDSInfo(e){let t=new Int32Array(e.buffer,e.byteOffset,31),r=new Int32Array(e.buffer,e.byteOffset,35),a=1;131072&t[2]&&(a=Math.max(1,t[7]));let o=t[21],l=o===f?r[32]:0,u=0;switch(o){case 113:u=2;break;case 116:u=1;break;case f:if(10===l){u=2;break}2===l&&(u=1)}return{width:t[4],height:t[3],mipmapCount:a,isFourCC:(4&t[20])==4,isRGB:(64&t[20])==64,isLuminance:(131072&t[20])==131072,isCube:(512&t[28])==512,isCompressed:o===i||o===n||o===s,dxgiFormat:l,textureType:u}}static _GetHalfFloatAsFloatRGBAArrayBuffer(e,t,r,a,l,i){let n=new Float32Array(a),s=new Uint16Array(l,r),f=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;n[f]=(0,o.FromHalfFloat)(s[a]),n[f+1]=(0,o.FromHalfFloat)(s[a+1]),n[f+2]=(0,o.FromHalfFloat)(s[a+2]),u.StoreLODInAlphaChannel?n[f+3]=i:n[f+3]=(0,o.FromHalfFloat)(s[a+3]),f+=4}return n}static _GetHalfFloatRGBAArrayBuffer(e,t,r,a,l,i){if(u.StoreLODInAlphaChannel){let n=new Uint16Array(a),s=new Uint16Array(l,r),f=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;n[f]=s[a],n[f+1]=s[a+1],n[f+2]=s[a+2],n[f+3]=(0,o.ToHalfFloat)(i),f+=4}return n}return new Uint16Array(l,r,a)}static _GetFloatRGBAArrayBuffer(e,t,r,a,o,l){if(u.StoreLODInAlphaChannel){let i=new Float32Array(a),n=new Float32Array(o,r),s=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;i[s]=n[a],i[s+1]=n[a+1],i[s+2]=n[a+2],i[s+3]=l,s+=4}return i}return new Float32Array(o,r,a)}static _GetFloatAsHalfFloatRGBAArrayBuffer(e,t,r,a,l,i){let n=new Uint16Array(a),s=new Float32Array(l,r),f=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++)n[f]=(0,o.ToHalfFloat)(s[f]),n[f+1]=(0,o.ToHalfFloat)(s[f+1]),n[f+2]=(0,o.ToHalfFloat)(s[f+2]),u.StoreLODInAlphaChannel?n[f+3]=(0,o.ToHalfFloat)(i):n[f+3]=(0,o.ToHalfFloat)(s[f+3]),f+=4;return n}static _GetFloatAsUIntRGBAArrayBuffer(e,r,a,o,l,i){let n=new Uint8Array(o),s=new Float32Array(l,a),f=0;for(let a=0;a<r;a++)for(let r=0;r<e;r++){let o=(r+a*e)*4;n[f]=255*(0,t.Clamp)(s[o]),n[f+1]=255*(0,t.Clamp)(s[o+1]),n[f+2]=255*(0,t.Clamp)(s[o+2]),u.StoreLODInAlphaChannel?n[f+3]=i:n[f+3]=255*(0,t.Clamp)(s[o+3]),f+=4}return n}static _GetHalfFloatAsUIntRGBAArrayBuffer(e,r,a,l,i,n){let s=new Uint8Array(l),f=new Uint16Array(i,a),c=0;for(let a=0;a<r;a++)for(let r=0;r<e;r++){let l=(r+a*e)*4;s[c]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l])),s[c+1]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l+1])),s[c+2]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l+2])),u.StoreLODInAlphaChannel?s[c+3]=n:s[c+3]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l+3])),c+=4}return s}static _GetRGBAArrayBuffer(e,t,r,a,o,l,i,n,s){let f=new Uint8Array(a),u=new Uint8Array(o,r),c=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;f[c]=u[a+l],f[c+1]=u[a+i],f[c+2]=u[a+n],f[c+3]=u[a+s],c+=4}return f}static _ExtractLongWordOrder(e){return 0===e||255===e||-0x1000000===e?0:1+u._ExtractLongWordOrder(e>>8)}static _GetRGBArrayBuffer(e,t,r,a,o,l,i,n){let s=new Uint8Array(a),f=new Uint8Array(o,r),u=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*3;s[u]=f[a+l],s[u+1]=f[a+i],s[u+2]=f[a+n],u+=3}return s}static _GetLuminanceArrayBuffer(e,t,r,a,o){let l=new Uint8Array(a),i=new Uint8Array(o,r),n=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=t+r*e;l[n]=i[a],n++}return l}static UploadDDSLevels(e,t,o,l,c,p,m=-1,h,A=!0){let F,d,y,w=null;l.sphericalPolynomial&&(w=[]);let C=!!e.getCaps().s3tc;t.generateMipMaps=c;let _=new Int32Array(o.buffer,o.byteOffset,31),b,D,G,g=0,B,M=0,S=1;if(0x20534444!==_[0])return void r.Logger.Error("Invalid magic number in DDS header");if(!l.isFourCC&&!l.isRGB&&!l.isLuminance)return void r.Logger.Error("Unsupported format, must contain a FourCC, RGB or LUMINANCE code");if(l.isCompressed&&!C)return void r.Logger.Error("Compressed textures are not supported on this platform.");let x=_[22];B=_[1]+4;let T=!1;if(l.isFourCC)switch(b=_[21]){case i:S=8,M=33777;break;case n:S=16,M=33778;break;case s:S=16,M=33779;break;case 113:T=!0,x=64;break;case 116:T=!0,x=128;break;case f:{B+=20;let e=!1;switch(l.dxgiFormat){case 10:T=!0,x=64,e=!0;break;case 2:T=!0,x=128,e=!0;break;case 88:l.isRGB=!0,l.isFourCC=!1,x=32,e=!0}if(e)break}default:r.Logger.Error(["Unsupported FourCC code:",String.fromCharCode(255&b,b>>8&255,b>>16&255,b>>24&255)]);return}let R=u._ExtractLongWordOrder(_[23]),L=u._ExtractLongWordOrder(_[24]),O=u._ExtractLongWordOrder(_[25]),P=u._ExtractLongWordOrder(_[26]);T&&(M=e._getRGBABufferInternalSizedFormat(l.textureType)),d=1,131072&_[2]&&!1!==c&&(d=Math.max(1,_[7]));let H=h||0,U=e.getCaps();for(let r=H;r<p;r++){for(y=0,D=_[4],G=_[3];y<d;++y){if(-1===m||m===y){let a=-1===m?y:0;if(!l.isCompressed&&l.isFourCC){t.format=5,g=D*G*4;let l=null;if(e._badOS||e._badDesktopOS||!U.textureHalfFloat&&!U.textureFloat)128===x?(l=u._GetFloatAsUIntRGBAArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,a),w&&0==a&&w.push(u._GetFloatRGBAArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,a))):64===x&&(l=u._GetHalfFloatAsUIntRGBAArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,a),w&&0==a&&w.push(u._GetHalfFloatAsFloatRGBAArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,a))),t.type=0;else{let e,r=U.textureFloat&&(A&&U.textureFloatLinearFiltering||!A),i=U.textureHalfFloat&&(A&&U.textureHalfFloatLinearFiltering||!A),n=(128===x||64===x&&!i)&&r?1:(64===x||128===x&&!r)&&i?2:0,s=null;if(128===x)switch(n){case 1:e=u._GetFloatRGBAArrayBuffer,s=null;break;case 2:e=u._GetFloatAsHalfFloatRGBAArrayBuffer,s=u._GetFloatRGBAArrayBuffer;break;case 0:e=u._GetFloatAsUIntRGBAArrayBuffer,s=u._GetFloatRGBAArrayBuffer}else switch(n){case 1:e=u._GetHalfFloatAsFloatRGBAArrayBuffer,s=null;break;case 2:e=u._GetHalfFloatRGBAArrayBuffer,s=u._GetHalfFloatAsFloatRGBAArrayBuffer;break;case 0:e=u._GetHalfFloatAsUIntRGBAArrayBuffer,s=u._GetHalfFloatAsFloatRGBAArrayBuffer}t.type=n,l=e(D,G,o.byteOffset+B,g,o.buffer,a),w&&0==a&&w.push(s?s(D,G,o.byteOffset+B,g,o.buffer,a):l)}l&&e._uploadDataToTextureDirectly(t,l,r,a)}else if(l.isRGB)t.type=0,24===x?(t.format=4,g=D*G*3,F=u._GetRGBArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,R,L,O)):(t.format=5,g=D*G*4,F=u._GetRGBAArrayBuffer(D,G,o.byteOffset+B,g,o.buffer,R,L,O,P)),e._uploadDataToTextureDirectly(t,F,r,a);else if(l.isLuminance){let l=e._getUnpackAlignement(),i=D;g=Math.floor((D+l-1)/l)*l*(G-1)+i,F=u._GetLuminanceArrayBuffer(D,G,o.byteOffset+B,g,o.buffer),t.format=1,t.type=0,e._uploadDataToTextureDirectly(t,F,r,a)}else g=Math.max(4,D)/4*Math.max(4,G)/4*S,F=new Uint8Array(o.buffer,o.byteOffset+B,g),t.type=0,e._uploadCompressedDataToTextureDirectly(t,M,D,G,F,r,a)}B+=x?D*G*(x/8):g,D*=.5,G*=.5,D=Math.max(1,D),G=Math.max(1,G)}if(void 0!==h)break}w&&w.length>0?l.sphericalPolynomial=a.CubeMapToSphericalPolynomialTools.ConvertCubeMapToSphericalPolynomial({size:_[4],right:w[0],left:w[1],up:w[2],down:w[3],front:w[4],back:w[5],format:5,type:1,gammaSpace:!1}):l.sphericalPolynomial=void 0}}u.StoreLODInAlphaChannel=!1,e.s(["DDSTools",0,u])},25755,e=>{"use strict";var t=e.i(12247),r=e.i(22093);e.s(["_DDSTextureLoader",0,class{constructor(){this.supportCascades=!0}loadCubeData(e,a,o,l){let i,n=a.getEngine(),s=!1,f=1e3;if(Array.isArray(e))for(let t=0;t<e.length;t++){let o=e[t];a.width=(i=r.DDSTools.GetDDSInfo(o)).width,a.height=i.height,s=(i.isRGB||i.isLuminance||i.mipmapCount>1)&&a.generateMipMaps,n._unpackFlipY(i.isCompressed),r.DDSTools.UploadDDSLevels(n,a,o,i,s,6,-1,t),i.isFourCC||1!==i.mipmapCount?f=i.mipmapCount-1:n.generateMipMapsForCubemap(a)}else a.width=(i=r.DDSTools.GetDDSInfo(e)).width,a.height=i.height,o&&(i.sphericalPolynomial=new t.SphericalPolynomial),s=(i.isRGB||i.isLuminance||i.mipmapCount>1)&&a.generateMipMaps,n._unpackFlipY(i.isCompressed),r.DDSTools.UploadDDSLevels(n,a,e,i,s,6),i.isFourCC||1!==i.mipmapCount?f=i.mipmapCount-1:n.generateMipMapsForCubemap(a,!1);n._setCubeMapTextureParams(a,s,f),a.isReady=!0,a.onLoadedObservable.notifyObservers(a),a.onLoadedObservable.clear(),l&&l({isDDS:!0,width:a.width,info:i,data:e,texture:a})}loadData(e,t,a){let o=r.DDSTools.GetDDSInfo(e),l=(o.isRGB||o.isLuminance||o.mipmapCount>1)&&t.generateMipMaps&&Math.max(o.width,o.height)>>o.mipmapCount-1==1;a(o.width,o.height,l,o.isFourCC,()=>{r.DDSTools.UploadDDSLevels(t.getEngine(),t,e,o,l,1)})}}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,83464,e=>{"use strict";class t{static _CheckLimit(e,r){let o=t._LogLimitOutputs[e];return o?o.current++:(o={limit:r,current:1},t._LogLimitOutputs[e]=o),o.current<=o.limit}static _GenerateLimitMessage(e,r=1){let o=t._LogLimitOutputs[e];if(!o||!t.MessageLimitReached)return;let a=this._Levels[r];o.current===o.limit&&t[a.name](t.MessageLimitReached.replace(/%LIMIT%/g,""+o.limit).replace(/%TYPE%/g,a.name??""))}static _AddLogEntry(e){t._LogCache=e+t._LogCache,t.OnNewCacheEntry&&t.OnNewCacheEntry(e)}static _FormatMessage(e){let t=e=>e<10?"0"+e:""+e,r=new Date;return"["+t(r.getHours())+":"+t(r.getMinutes())+":"+t(r.getSeconds())+"]: "+e}static _LogDisabled(e,t){}static _LogEnabled(e=1,r,o){let a=Array.isArray(r)?r[0]:r;if(void 0!==o&&!t._CheckLimit(a,o))return;let i=t._FormatMessage(a),s=this._Levels[e],n=Array.isArray(r)?r.slice(1):[];s.logFunc&&s.logFunc("BJS - "+i,...n);let l=`<div style='color:${s.color}'>${i}</div><br>`;t._AddLogEntry(l),t._GenerateLimitMessage(a,e)}static get LogCache(){return t._LogCache}static ClearLogCache(){t._LogCache="",t._LogLimitOutputs={},t.errorsCount=0}static set LogLevels(e){for(let r of(t.Log=t._LogDisabled,t.Warn=t._LogDisabled,t.Error=t._LogDisabled,[t.MessageLogLevel,t.WarningLogLevel,t.ErrorLogLevel]))(e&r)===r&&(t[this._Levels[r].name]=t._LogEnabled.bind(t,r))}}t.NoneLogLevel=0,t.MessageLogLevel=1,t.WarningLogLevel=2,t.ErrorLogLevel=4,t.AllLogLevel=7,t.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",t._LogCache="",t._LogLimitOutputs={},t._Levels=[{},{color:"white",logFunc:console.log,name:"Log"},{color:"orange",logFunc:console.warn,name:"Warn"},{},{color:"red",logFunc:console.error,name:"Error"}],t.errorsCount=0,t.Log=t._LogEnabled.bind(t,t.MessageLogLevel),t.Warn=t._LogEnabled.bind(t,t.WarningLogLevel),t.Error=t._LogEnabled.bind(t,t.ErrorLogLevel),e.s(["Logger",0,t])},53477,e=>{"use strict";e.s(["RandomGUID",0,function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}])},75865,e=>{"use strict";e.s(["GetDOMTextContent",0,function(e){let t="",r=e.firstChild;for(;r;)3===r.nodeType&&(t+=r.textContent),r=r.nextSibling;return t},"IsDocumentAvailable",0,function(){return"u">typeof document},"IsNavigatorAvailable",0,function(){return"u">typeof navigator},"IsWindowObjectExist",0,function(){return"u">typeof window}])},72491,e=>{"use strict";class t{constructor(){this._xhr="u">typeof _native&&_native.XMLHttpRequest?new _native.XMLHttpRequest:new XMLHttpRequest,this._requestURL=""}static get IsCustomRequestAvailable(){return Object.keys(t.CustomRequestHeaders).length>0||t.CustomRequestModifiers.length>0}static _CleanUrl(e){return e=(e=e.replace("file:http:","http:")).replace("file:https:","https:")}static _ShouldSkipRequestModifications(e){return t.SkipRequestModificationForBabylonCDN&&(e.includes("preview.babylonjs.com")||e.includes("cdn.babylonjs.com"))}static _CollectCustomizations(e,r={}){let o={...r};if(t._ShouldSkipRequestModifications(e))return{url:e,headers:o};for(let e in t.CustomRequestHeaders){let r=t.CustomRequestHeaders[e];r&&(o[e]=r)}let a={setRequestHeader:(e,t)=>{o[e]=t}};for(let r of t.CustomRequestModifiers){if(t._ShouldSkipRequestModifications(e))break;let o=r(a,e);"string"==typeof o&&(e=o)}return{url:e,headers:o}}static async FetchAsync(e,r={}){let o=r.method??"GET";if("u">typeof fetch){let{url:a,headers:i}=t._CollectCustomizations(t._CleanUrl(e),r.headers??{});return await fetch(a,{method:o,headers:i,body:r.body??void 0})}return await new Promise((a,i)=>{let s=new t;s.responseType="arraybuffer",s.addEventListener("readystatechange",()=>{if(4===s.readyState)if(s.status>=200&&s.status<300){let e="u">typeof Headers?new Headers:void 0,t=s.getResponseHeader("Content-Type");t&&e&&e.set("Content-Type",t),"u">typeof Response?a(new Response(s.response,{status:s.status,statusText:s.statusText,headers:e})):a({ok:!0,status:s.status,statusText:s.statusText,headers:{get:e=>s.getResponseHeader(e)},arrayBuffer:async()=>await Promise.resolve(s.response)})}else i(Error(`HTTP ${s.status} loading '${s.requestURL}': ${s.statusText}`))}),s.open(o,e,r.headers),s.send(r.body??null)})}get requestURL(){return this._requestURL}get onprogress(){return this._xhr.onprogress}set onprogress(e){this._xhr.onprogress=e}get readyState(){return this._xhr.readyState}get status(){return this._xhr.status}get statusText(){return this._xhr.statusText}get response(){return this._xhr.response}get responseURL(){return this._xhr.responseURL}get responseText(){return this._xhr.responseText}get responseType(){return this._xhr.responseType}set responseType(e){this._xhr.responseType=e}get timeout(){return this._xhr.timeout}set timeout(e){this._xhr.timeout=e}addEventListener(e,t,r){this._xhr.addEventListener(e,t,r)}removeEventListener(e,t,r){this._xhr.removeEventListener(e,t,r)}abort(){this._xhr.abort()}send(e){this._xhr.send(e)}open(e,r,o){let{url:a,headers:i}=t._CollectCustomizations(r,o);for(let r in this._requestURL=t._CleanUrl(a),this._xhr.open(e,this._requestURL,!0),i)this._xhr.setRequestHeader(r,i[r])}setRequestHeader(e,t){this._xhr.setRequestHeader(e,t)}getResponseHeader(e){return this._xhr.getResponseHeader(e)}}t.CustomRequestHeaders={},t.CustomRequestModifiers=[],t.SkipRequestModificationForBabylonCDN=!0,e.s(["WebRequest",0,t])},37890,e=>{"use strict";let t=null;function r(){if(t)return t;let e=new ArrayBuffer(4),r=new Float32Array(e),o=new Uint32Array(e),a=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-24?(a[e]=0,a[256|e]=32768,i[e]=24,i[256|e]=24):t<-14?(a[e]=1024>>-t-14,a[256|e]=1024>>-t-14|32768,i[e]=-t-1,i[256|e]=-t-1):t<=15?(a[e]=t+15<<10,a[256|e]=t+15<<10|32768,i[e]=13,i[256|e]=13):t<128?(a[e]=31744,a[256|e]=64512,i[e]=24,i[256|e]=24):(a[e]=31744,a[256|e]=64512,i[e]=13,i[256|e]=13)}let s=new Uint32Array(2048),n=new Uint32Array(64),l=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,r=0;for(;(8388608&t)==0;)t<<=1,r-=8388608;t&=-8388609,r+=0x38800000,s[e]=t|r}for(let e=1024;e<2048;++e)s[e]=0x38000000+(e-1024<<13);for(let e=1;e<31;++e)n[e]=e<<23;n[31]=0x47800000,n[32]=0x80000000;for(let e=33;e<63;++e)n[e]=0x80000000+(e-32<<23);n[63]=0xc7800000;for(let e=1;e<64;++e)32!==e&&(l[e]=1024);return t={floatView:r,uint32View:o,baseTable:a,shiftTable:i,mantissaTable:s,exponentTable:n,offsetTable:l}}e.s(["FromHalfFloat",0,function(e){let t=r();return t.uint32View[0]=t.mantissaTable[t.offsetTable[e>>10]+(1023&e)]+t.exponentTable[e>>10],t.floatView[0]},"MaxHalfFloat",0,65504,"ToHalfFloat",0,function(e){let t=r();t.floatView[0]=e;let o=t.uint32View[0],a=o>>23&511;return t.baseTable[a]+((8388607&o)>>t.shiftTable[a])}])},59767,25440,65771,e=>{"use strict";class t{}t.FilesToLoad={},e.s(["FilesInputStore",0,t],59767),e.s(["RetryStrategy",0,class{static ExponentialBackoff(e=3,t=500){return(r,o,a)=>0!==o.status||a>=e||-1!==r.indexOf("file:")?-1:Math.pow(2,a)*t}}],25440);class r extends Error{}r._setPrototypeOf=Object.setPrototypeOf||((e,t)=>(e.__proto__=t,e));class o extends r{constructor(e,t,a){super(e),this.errorCode=t,this.innerError=a,this.name="RuntimeError",r._setPrototypeOf(this,o.prototype)}}e.s(["BaseError",0,r,"ErrorCodes",0,{MeshInvalidPositionsError:0,UnsupportedTextureError:1e3,GLTFLoaderUnexpectedMagicError:2e3,SceneLoaderError:3e3,LoadFileError:4e3,RequestFileError:4001,ReadFileError:4002},"RuntimeError",0,o],65771)},61023,e=>{"use strict";let t=e=>atob(e);e.s(["Decode",0,e=>{if("u">typeof TextDecoder)return new TextDecoder().decode(e);let t="";for(let r=0;r<e.byteLength;r++)t+=String.fromCharCode(e[r]);return t},"DecodeBase64ToBinary",0,e=>"function"==typeof Uint8Array.fromBase64?Uint8Array.fromBase64(e).buffer:function(e){let r=t(e),o=r.length,a=new Uint8Array(new ArrayBuffer(o));for(let e=0;e<o;e++)a[e]=r.charCodeAt(e);return a.buffer}(e),"DecodeBase64ToString",0,t,"EncodeArrayBufferToBase64",0,e=>{let t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);return"function"==typeof t.toBase64?t.toBase64():function(e){let t,r,o,a,i,s,n,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="",u=0;for(;u<e.length;)t=e[u++],r=u<e.length?e[u++]:NaN,o=u<e.length?e[u++]:NaN,a=t>>2,i=(3&t)<<4|r>>4,s=(15&r)<<2|o>>6,n=63&o,isNaN(r)?s=n=64:isNaN(o)&&(n=64),c+=l.charAt(a)+l.charAt(i)+l.charAt(s)+l.charAt(n);return c}(t)}])},4775,e=>{"use strict";let t=[];function r(e,t,r){try{if(e())return t(),!0}catch(e){return r?.(e),!0}return!1}e.s(["TimingTools",0,class{static SetImmediate(e){0===t.length&&setTimeout(()=>{let e=t;for(let r of(t=[],e))r()},1),t.push(e)}},"_RetryWithInterval",0,(e,t,o,a=16,i=3e4,s=!0,n)=>{if(s&&r(e,t,o))return null;let l=setInterval(()=>{r(e,t,o)?clearInterval(l):(i-=a)<0&&(clearInterval(l),o?.(Error("Operation timed out after maximum retries. "+(n||"")),!0))},a);return()=>clearInterval(l)}])},5512,e=>{"use strict";var t=e.i(83464),r=e.i(37890);function o(e){switch(e){case 5120:case 5121:return 1;case 5122:case 5123:case 5131:return 2;case 5124:case 5125:case 5126:return 4;default:throw Error(`Invalid type '${e}'`)}}function a(e){switch(e){case 5120:return Int8Array;case 5121:return Uint8Array;case 5122:return Int16Array;case 5123:case 5131:return Uint16Array;case 5124:return Int32Array;case 5125:return Uint32Array;case 5126:return Float32Array;default:throw Error(`Invalid component type '${e}'`)}}function i(e,t,a,i,s,n,l,c){let u=Array(i),f=Array(i);if(e instanceof Array){let r=t/4,o=a/4;for(let t=0;t<n;t+=i){for(let t=0;t<i;t++)u[t]=f[t]=e[r+t];c(f,t);for(let t=0;t<i;t++)u[t]!==f[t]&&(e[r+t]=f[t]);r+=o}}else{let g=ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e),d=o(s);for(let e=0;e<n;e+=i){for(let e=0,o=t;e<i;e++,o+=d)u[e]=f[e]=function(e,t,o,a){switch(t){case 5120:{let t=e.getInt8(o);return a&&(t=Math.max(t/127,-1)),t}case 5121:{let t=e.getUint8(o);return a&&(t/=255),t}case 5122:{let t=e.getInt16(o,!0);return a&&(t=Math.max(t/32767,-1)),t}case 5123:{let t=e.getUint16(o,!0);return a&&(t/=65535),t}case 5131:return(0,r.FromHalfFloat)(e.getUint16(o,!0));case 5124:return e.getInt32(o,!0);case 5125:return e.getUint32(o,!0);case 5126:return e.getFloat32(o,!0);default:throw Error(`Invalid component type ${t}`)}}(g,s,o,l);c(f,e);for(let e=0,o=t;e<i;e++,o+=d)u[e]!==f[e]&&function(e,t,o,a,i){switch(t){case 5120:a&&(i=Math.round(127*i)),e.setInt8(o,i);break;case 5121:a&&(i=Math.round(255*i)),e.setUint8(o,i);break;case 5122:a&&(i=Math.round(32767*i)),e.setInt16(o,i,!0);break;case 5123:a&&(i=Math.round(65535*i)),e.setUint16(o,i,!0);break;case 5131:e.setUint16(o,(0,r.ToHalfFloat)(i),!0);break;case 5124:e.setInt32(o,i,!0);break;case 5125:e.setUint32(o,i,!0);break;case 5126:e.setFloat32(o,i,!0);break;default:throw Error(`Invalid component type ${t}`)}}(g,s,o,l,f[e]);t+=a}}}e.s(["CopyFloatData",0,function(e,r,a,s,n,l,c,u){let f=r*o(a),g=c*r;if(u.length!==g)throw Error("Output length is not valid");if(5126!==a||n!==f)return void i(e,s,n,r,a,g,l,(e,t)=>{for(let o=0;o<r;o++)u[t+o]=e[o]});if(e instanceof Array){let t=s/4;u.set(e,t)}else if(ArrayBuffer.isView(e)){let r=e.byteOffset+s;if((3&r)!=0){t.Logger.Warn("Float array must be aligned to 4-bytes border"),u.set(new Float32Array(e.buffer.slice(r,r+g*Float32Array.BYTES_PER_ELEMENT)));return}let o=new Float32Array(e.buffer,r,g);u.set(o)}else{let t=new Float32Array(e,s,g);u.set(t)}},"EnumerateFloatValues",0,i,"GetBlobBufferSource",0,function(e){let t=e.buffer;if(t instanceof ArrayBuffer)return e;let r=new ArrayBuffer(e.byteLength);return new Uint8Array(r).set(new Uint8Array(t,e.byteOffset,e.byteLength)),r},"GetFloatData",0,function(e,r,a,s,n,l,c,u){let f=r*o(a),g=c*r;if(5126!==a||n!==f){let t=new Float32Array(g);return i(e,s,n,r,a,g,l,(e,o)=>{for(let a=0;a<r;a++)t[o+a]=e[a]}),t}if(!(e instanceof Array||e instanceof Float32Array)||0!==s||e.length!==g)if(e instanceof Array){let t=s/4;return e.slice(t,t+g)}else{if(!ArrayBuffer.isView(e))return new Float32Array(e,s,g);let r=e.byteOffset+s;return((3&r)!=0&&(t.Logger.Warn("Float array must be aligned to 4-bytes border"),u=!0),u)?new Float32Array(e.buffer.slice(r,r+g*Float32Array.BYTES_PER_ELEMENT)):new Float32Array(e.buffer,r,g)}return u?e.slice():e},"GetTypeByteLength",0,o,"GetTypedArrayConstructor",0,a,"GetTypedArrayData",0,function(e,r,s,n,l,c,u){let f,g=o(s),d=a(s),p=c*r;if(Array.isArray(e)){if((3&n)!=0||(3&l)!=0)throw Error("byteOffset and byteStride must be a multiple of 4 for number[] data.");let t=n/4,o=l/4;if(t+(c-1)*o+r>e.length)throw Error("Last accessed index is out of bounds.");if(o<r)throw Error("Data stride cannot be smaller than the component size.");if(o!==r){let t=new d(p);return i(e,n,l,r,s,p,!1,(e,o)=>{for(let a=0;a<r;a++)t[o+a]=e[a]}),t}return new d(e.slice(t,t+p))}let h=n;if(ArrayBuffer.isView(e)?(f=e.buffer,h+=e.byteOffset):f=e,h+(c-1)*l+r*g>f.byteLength)throw Error("Last accessed byte is out of bounds.");let v=r*g;if(l<v)throw Error("Byte stride cannot be smaller than the component's byte size.");if(l!==v){let e=new d(p),t=new Uint8Array(f,h),o=new Uint8Array(e.buffer),a=r*g;for(let e=0,r=0,i=0;e<c;e++,r+=l,i+=a)o.set(t.subarray(r,r+a),i);return e}return(1!==g&&(h&g-1)!=0&&(t.Logger.Warn("Array must be aligned to border of element size. Data will be copied."),u=!0),u)?new d(f.slice(h,h+p*g)):new d(f,h,p)}])},25746,e=>{"use strict";var t=e.i(72491),r=e.i(75865),o=e.i(57554),a=e.i(59767),i=e.i(25440),s=e.i(65771),n=e.i(61023),l=e.i(47867),c=e.i(83464),u=e.i(4775),f=e.i(5512);let g=new RegExp(/^data:([^,]+\/[^,]+)?;base64,/i);class d extends s.RuntimeError{constructor(e,r){super(e,s.ErrorCodes.LoadFileError),this.name="LoadFileError",s.BaseError._setPrototypeOf(this,d.prototype),r instanceof t.WebRequest?this.request=r:this.file=r}}class p extends s.RuntimeError{constructor(e,t){super(e,s.ErrorCodes.RequestFileError),this.request=t,this.name="RequestFileError",s.BaseError._setPrototypeOf(this,p.prototype)}}class h extends s.RuntimeError{constructor(e,t){super(e,s.ErrorCodes.ReadFileError),this.file=t,this.name="ReadFileError",s.BaseError._setPrototypeOf(this,h.prototype)}}let v={DefaultRetryStrategy:i.RetryStrategy.ExponentialBackoff(),BaseUrl:"",CorsBehavior:"anonymous",PreprocessUrl:e=>e,ScriptBaseUrl:"",ScriptPreprocessUrl:e=>e,CleanUrl:e=>e=e.replace(/#/gm,"%23")},m=(e,t)=>{if((!e||0!==e.indexOf("data:"))&&v.CorsBehavior)if("string"==typeof v.CorsBehavior||v.CorsBehavior instanceof String)t.crossOrigin=v.CorsBehavior;else{let r=v.CorsBehavior(e);r&&(t.crossOrigin=r)}},K=(e,t,r,a,i)=>{let s=new FileReader,n={onCompleteObservable:new o.Observable,abort:()=>s.abort()};return s.onloadend=()=>n.onCompleteObservable.notifyObservers(n),i&&(s.onerror=()=>{i(new h(`Unable to read ${e.name}`,e))}),s.onload=e=>{t(e.target.result)},r&&(s.onprogress=r),a?s.readAsArrayBuffer(e):s.readAsText(e),n},b=(e,t,r,i,s,n,l)=>{if(e.name)return K(e,t,r,s,n?e=>{n(void 0,e)}:void 0);if(-1!==e.indexOf("file:")){let o=decodeURIComponent(e.substring(5).toLowerCase());0===o.indexOf("./")&&(o=o.substring(2));let i=a.FilesInputStore.FilesToLoad[o];if(i)return K(i,t,r,s,n?e=>n(void 0,new d(e.message,e.file)):void 0)}let{match:f,type:g}=L(e);if(f){let r={onCompleteObservable:new o.Observable,abort:()=>()=>{}};try{let r=s?U(e):P(e);t(r,void 0,g)}catch(e){n?n(void 0,e):c.Logger.Error(e.message||"Failed to parse the Data URL")}return u.TimingTools.SetImmediate(()=>{r.onCompleteObservable.notifyObservers(r)}),r}return y(e,(e,r)=>{t(e,r?.responseURL,r?.getResponseHeader("content-type"))},r,i,s,n?e=>{n(e.request,new d(e.message,e.request))}:void 0,l)},y=(e,a,i,s,n,u,f)=>{null!==s&&(s??(s=l.EngineStore.LastCreatedScene?.offlineProvider)),e=v.CleanUrl(e),e=v.PreprocessUrl(e);let g=v.BaseUrl+e,d=!1,h={onCompleteObservable:new o.Observable,abort:()=>d=!0},m=()=>{let e,o=new t.WebRequest,s=null,l=()=>{o&&(i&&o.removeEventListener("progress",i),e&&o.removeEventListener("readystatechange",e),o.removeEventListener("loadend",m))},m=()=>{l(),h.onCompleteObservable.notifyObservers(h),h.onCompleteObservable.clear(),i=void 0,e=null,m=null,u=void 0,f=void 0,a=void 0};h.abort=()=>{d=!0,m&&m(),o&&o.readyState!==(XMLHttpRequest.DONE||4)&&o.abort(),null!==s&&(clearTimeout(s),s=null),o=null};let K=e=>{let t=e.message||"Unknown error";u&&o?u(new p(t,o)):c.Logger.Error(t)},b=c=>{if(o){if(o.open("GET",g),f)try{f(o)}catch(e){K(e);return}n&&(o.responseType="arraybuffer"),i&&o.addEventListener("progress",i),m&&o.addEventListener("loadend",m),e=()=>{if(!d&&o&&o.readyState===(XMLHttpRequest.DONE||4)){if(e&&o.removeEventListener("readystatechange",e),o.status>=200&&o.status<300||0===o.status&&(!(0,r.IsWindowObjectExist)()||A())){let e=n?o.response:o.responseText;if(null!==e){try{a&&a(e,o)}catch(e){K(e)}return}}let i=v.DefaultRetryStrategy;if(i){let e=i(g,o,c);if(-1!==e){l(),o=new t.WebRequest,s=setTimeout(()=>b(c+1),e);return}}let f=new p("Error status: "+o.status+" "+o.statusText+" - Unable to load "+g,o);u&&u(f)}},o.addEventListener("readystatechange",e),o.send()}};b(0)};if(s&&s.enableSceneOffline&&!e.startsWith("blob:")){let t=e=>{e&&e.status>400?u&&u(e):m()};s.open(()=>{s&&s.loadFile(v.BaseUrl+e,e=>{!d&&a&&a(e),h.onCompleteObservable.notifyObservers(h)},i?e=>{!d&&i&&i(e)}:void 0,t,n)},t)}else m();return h},A=()=>"u">typeof location&&"file:"===location.protocol,L=e=>{let t=g.exec(e);return null===t||0===t.length?{match:!1,type:""}:{match:!0,type:t[0].replace("data:","").replace(";base64,","")}};function U(e){return(0,n.DecodeBase64ToBinary)(e.split(",")[1])}let P=e=>(0,n.DecodeBase64ToString)(e.split(",")[1]);e.s(["DecodeBase64UrlToBinary",0,U,"FileToolsOptions",0,v,"GetMimeType",0,e=>{let{match:t,type:r}=L(e);if(t)return r||void 0;let o=e.lastIndexOf(".");switch(e.substring(o+1).toLowerCase()){case"glb":return"model/gltf-binary";case"bin":return"application/octet-stream";case"gltf":return"model/gltf+json";case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"webp":return"image/webp";case"ktx":return"image/ktx";case"ktx2":return"image/ktx2";case"avif":return"image/avif";default:return}},"IsBase64DataUrl",0,e=>g.test(e),"LoadFile",0,b,"LoadFileError",0,d,"LoadImage",0,(e,r,o,i,s="",c,u=l.EngineStore.LastCreatedEngine)=>{let g;if("u"<typeof HTMLImageElement&&!u?._features.forceBitmapOverHTMLImageElement)return o("LoadImage is only supported in web or BabylonNative environments."),null;let d=!1;if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))if("u">typeof Blob&&"u">typeof URL){let t;t=e instanceof ArrayBuffer?e:(0,f.GetBlobBufferSource)(e),g=URL.createObjectURL(new Blob([t],{type:s})),d=!0}else g=`data:${s};base64,`+(0,n.EncodeArrayBufferToBase64)(e);else e instanceof Blob?(g=URL.createObjectURL(e),d=!0):(g=v.CleanUrl(e),g=v.PreprocessUrl(g));let p=t=>{if(o){let r=g||e.toString();o(`Error while trying to load image: ${0===r.indexOf("http")||r.length<=128?r:r.slice(0,128)+"..."}`,t)}};if(u?._features.forceBitmapOverHTMLImageElement)return b(g,t=>{u.createImageBitmap(new Blob([t],{type:s}),{premultiplyAlpha:"none",colorSpaceConversion:"none",...c}).then(e=>{r(e),d&&URL.revokeObjectURL(g)}).catch(t=>{o&&o("Error while trying to load image: "+e,t)})},void 0,i||void 0,!0,(e,t)=>{p(t)}),null;let h=new Image;!1;m(g,h);let K=[],y=()=>{for(let e of K)e.target.removeEventListener(e.name,e.handler);K.length=0};for(let e of(K.push({target:h,name:"load",handler:()=>{y(),r(h),d&&h.src&&URL.revokeObjectURL(h.src)}}),K.push({target:h,name:"error",handler:e=>{y(),p(e),d&&h.src&&URL.revokeObjectURL(h.src)}}),K.push({target:document,name:"securitypolicyviolation",handler:e=>{if(e.blockedURI!==h.src||"report"===e.disposition)return;y();let t=Error(`CSP violation of policy ${e.effectiveDirective} ${e.blockedURI}. Current policy is ${e.originalPolicy}`);l.EngineStore.UseFallbackTexture=!1,p(t),d&&h.src&&URL.revokeObjectURL(h.src),h.src=""}}),K))e.target.addEventListener(e.name,e.handler);let A="blob:"===g.substring(0,5),L="data:"===g.substring(0,5),U=()=>{A||L||!t.WebRequest.IsCustomRequestAvailable?h.src=g:b(g,(e,t,r)=>{let o=new Blob([e],{type:!s&&r?r:s}),a=URL.createObjectURL(o);d=!0,h.src=a},void 0,i||void 0,!0,(e,t)=>{p(t)})};if(!A&&!L&&i&&i.enableTexturesOffline)i.open(()=>{i&&i.loadImage(g,h)},U);else{if(-1!==g.indexOf("file:")){let e=decodeURIComponent(g.substring(5).toLowerCase());if(a.FilesInputStore.FilesToLoad[e]&&"u">typeof URL){try{let t;try{t=URL.createObjectURL(a.FilesInputStore.FilesToLoad[e])}catch(r){t=URL.createObjectURL(a.FilesInputStore.FilesToLoad[e])}h.src=t,d=!0}catch(e){h.src=""}return h}}U()}return h},"ReadFile",0,K,"RequestFile",0,y,"SetCorsBehavior",0,m])},85240,e=>{"use strict";var t=e.i(75865);e.s(["PrecisionDate",0,class{static get Now(){return(0,t.IsWindowObjectExist)()&&window.performance&&window.performance.now?window.performance.now():Date.now()}}])},65679,e=>{"use strict";function t(e){let t=r(e),a=o(e);return t-e>e-a?a:t}function r(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}function o(e){return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,(e|=e>>16)-(e>>1)}e.s(["FloorPOT",0,o,"GetExponentOfTwo",0,function(e,a,i=2){let s;switch(i){case 1:s=o(e);break;case 2:s=t(e);break;default:s=r(e)}return Math.min(s,a)},"IsExponentOfTwo",0,function(e){let t=1;do t*=2;while(t<e)return t===e},"Mix",0,function(e,t,r){return e*(1-r)+t*r},"NearestPOT",0,t])},58279,e=>{"use strict";var t=e.i(83464),r=e.i(48477);class o{static Instantiate(e){if(this.RegisteredExternalClasses&&this.RegisteredExternalClasses[e])return this.RegisteredExternalClasses[e];let o=(0,r.GetClass)(e);if(o)return o;t.Logger.Warn(e+" not found, you may have missed an import.");let a=e.split("."),i="u">typeof window?window:"u">typeof globalThis?globalThis:this;for(let e=0,t=a.length;e<t;e++)i=i[a[e]];return"function"!=typeof i?null:i}}o.RegisteredExternalClasses={},e.s(["InstantiationTools",0,o])},29711,34637,e=>{"use strict";var t,r=e.i(57554),o=e.i(75865),a=e.i(83464);let i=(e,t,r)=>!e||e.getClassName&&"Mesh"===e.getClassName()?null:e.getClassName&&("SubMesh"===e.getClassName()||"PhysicsBody"===e.getClassName())?e.clone(t):e.clone?e.clone():Array.isArray(e)?e.slice():r&&"object"==typeof e?{...e}:null;class s{static DeepCopy(e,t,r,o,s=!1){for(let n of function(e){let t=[];do for(let r of Object.getOwnPropertyNames(e))-1===t.indexOf(r)&&t.push(r);while(e=Object.getPrototypeOf(e))return t}(e)){if("_"===n[0]&&(!o||-1===o.indexOf(n))||n.endsWith("Observable")||r&&-1!==r.indexOf(n))continue;let l=e[n],c=typeof l;if("function"!==c)try{if("object"===c)if(l instanceof Uint8Array)t[n]=Uint8Array.from(l);else if(l instanceof Array){if(t[n]=[],l.length>0)if("object"==typeof l[0])for(let e=0;e<l.length;e++){let r=i(l[e],t,s);-1===t[n].indexOf(r)&&t[n].push(r)}else t[n]=l.slice(0)}else t[n]=i(l,t,s);else t[n]=l}catch(e){a.Logger.Warn(e.message)}}}}e.s(["DeepCopier",0,s],34637);var n=e.i(85240),l=e.i(54670),c=e.i(72491),u=e.i(47867),f=e.i(25746),g=e.i(4775),d=e.i(58279),p=e.i(53477),h=e.i(65679);class v{static get BaseUrl(){return f.FileToolsOptions.BaseUrl}static set BaseUrl(e){f.FileToolsOptions.BaseUrl=e}static get CleanUrl(){return f.FileToolsOptions.CleanUrl}static set CleanUrl(e){f.FileToolsOptions.CleanUrl=e}static IsAbsoluteUrl(e){return 0===e.indexOf("//")||!(-1===e.indexOf("://")||-1===e.indexOf(".")||-1===e.indexOf("/")||e.indexOf(":")>e.indexOf("/"))&&(!!(e.indexOf("://")<e.indexOf("."))||0===e.indexOf("data:")||0===e.indexOf("blob:"))}static set ScriptBaseUrl(e){f.FileToolsOptions.ScriptBaseUrl=e}static get ScriptBaseUrl(){return f.FileToolsOptions.ScriptBaseUrl}static set CDNBaseUrl(e){t.ScriptBaseUrl=e,t.AssetBaseUrl=e}static set ScriptPreprocessUrl(e){f.FileToolsOptions.ScriptPreprocessUrl=e}static get ScriptPreprocessUrl(){return f.FileToolsOptions.ScriptPreprocessUrl}static get DefaultRetryStrategy(){return f.FileToolsOptions.DefaultRetryStrategy}static set DefaultRetryStrategy(e){f.FileToolsOptions.DefaultRetryStrategy=e}static get CorsBehavior(){return f.FileToolsOptions.CorsBehavior}static set CorsBehavior(e){f.FileToolsOptions.CorsBehavior=e}static get UseFallbackTexture(){return u.EngineStore.UseFallbackTexture}static set UseFallbackTexture(e){u.EngineStore.UseFallbackTexture=e}static get RegisteredExternalClasses(){return d.InstantiationTools.RegisteredExternalClasses}static set RegisteredExternalClasses(e){d.InstantiationTools.RegisteredExternalClasses=e}static get fallbackTexture(){return u.EngineStore.FallbackTexture}static set fallbackTexture(e){u.EngineStore.FallbackTexture=e}static FetchToRef(e,t,r,o,a,i){let s=((Math.abs(e)*r%r|0)+(Math.abs(t)*o%o|0)*r)*4;i.r=a[s]/255,i.g=a[s+1]/255,i.b=a[s+2]/255,i.a=a[s+3]/255}static Mix(e,t,r){return 0}static Instantiate(e){return d.InstantiationTools.Instantiate(e)}static SetImmediate(e){g.TimingTools.SetImmediate(e)}static IsExponentOfTwo(e){return!0}static FloatRound(e){return Math.fround(e)}static GetFilename(e){let t=e.lastIndexOf("/");return t<0?e:e.substring(t+1)}static GetFolderPath(e,t=!1){let r=e.lastIndexOf("/");return r<0?t?e:"":e.substring(0,r+1)}static ToDegrees(e){return 180*e/Math.PI}static ToRadians(e){return e*Math.PI/180}static SmoothAngleChange(e,t,r=.9){let o=this.ToRadians(e),a=this.ToRadians(t);return this.ToDegrees(Math.atan2((1-r)*Math.sin(a)+r*Math.sin(o),(1-r)*Math.cos(a)+r*Math.cos(o)))}static MakeArray(e,t){return!0!==t&&(void 0===e||null==e)?null:Array.isArray(e)?e:[e]}static GetPointerPrefix(e){return(0,o.IsWindowObjectExist)()&&!window.PointerEvent?"mouse":"pointer"}static SetCorsBehavior(e,t){(0,f.SetCorsBehavior)(e,t)}static SetReferrerPolicyBehavior(e,t){t.referrerPolicy=e}static get PreprocessUrl(){return f.FileToolsOptions.PreprocessUrl}static set PreprocessUrl(e){f.FileToolsOptions.PreprocessUrl=e}static LoadImage(e,t,r,o,a,i){return(0,f.LoadImage)(e,t,r,o,a,i)}static LoadFile(e,t,r,o,a,i){return(0,f.LoadFile)(e,t,r,o,a,i)}static async LoadFileAsync(e,t=!0){return await new Promise((r,o)=>{(0,f.LoadFile)(e,e=>{r(e)},void 0,void 0,t,(e,t)=>{o(t)})})}static GetAssetUrl(e){if(!e)return"";if(t.AssetBaseUrl&&e.startsWith(t._DefaultAssetsUrl)){let r=t.AssetBaseUrl.endsWith("/")?t.AssetBaseUrl.slice(0,-1):t.AssetBaseUrl;return e.replace(t._DefaultAssetsUrl,r)}return e}static GetBabylonScriptURL(e,r){if(!e)return"";if(e.startsWith(t._DefaultCdnUrl)){if(t.ScriptBaseUrl){let r=t.ScriptBaseUrl.endsWith("/")?t.ScriptBaseUrl.slice(0,-1):t.ScriptBaseUrl;e=e.replace(t._DefaultCdnUrl,r)}else if(t._CdnVersion){let r=`${t._DefaultCdnUrl}/v${t._CdnVersion}`;e.startsWith(r)||(e=e.replace(t._DefaultCdnUrl,r))}}return e=t.ScriptPreprocessUrl(e),r&&!t.IsAbsoluteUrl(e)&&(e=t.GetAbsoluteUrl(e)),e}static LoadBabylonScript(e,r,o,a){e=t.GetBabylonScriptURL(e),t.LoadScript(e,r,o)}static async LoadBabylonScriptAsync(e){return e=t.GetBabylonScriptURL(e),await t.LoadScriptAsync(e)}static _LoadScriptNative(e,r,o){_native&&t.LoadFile(e,e=>{try{Function(e).apply(null),r&&r()}catch(e){o&&o("LoadScript Error",e)}},void 0,void 0,!1,(e,t)=>{o&&o("LoadScript Error",t)})}static _LoadScriptWeb(e,t,r,a,i=!1){if("function"==typeof importScripts){try{importScripts(e),t&&t()}catch(t){r?.(`Unable to load script '${e}' in worker`,t)}return}if(!(0,o.IsWindowObjectExist)())return void r?.(`Cannot load script '${e}' outside of a window or a worker`);let s=document.getElementsByTagName("head")[0],n=document.createElement("script");i?(n.setAttribute("type","module"),n.innerText=e):(n.setAttribute("type","text/javascript"),n.setAttribute("src",e)),a&&(n.id=a),n.onload=()=>{t&&t()},n.onerror=t=>{r&&r(`Unable to load script '${e}'`,t)},s.appendChild(n)}static async LoadScriptAsync(e,t){return await new Promise((r,o)=>{this.LoadScript(e,()=>{r()},(e,t)=>{o(t||Error(e))},t)})}static ReadFileAsDataURL(e,t,o){let a=new FileReader,i={onCompleteObservable:new r.Observable,abort:()=>a.abort()};return a.onloadend=()=>{i.onCompleteObservable.notifyObservers(i)},a.onload=e=>{t(e.target.result)},a.onprogress=o,a.readAsDataURL(e),i}static ReadFile(e,t,r,o,a){return(0,f.ReadFile)(e,t,r,o,a)}static FileAsURL(e){let t=new Blob([e]);return window.URL.createObjectURL(t)}static Format(e,t=2){return e.toFixed(t)}static DeepCopy(e,t,r,o){s.DeepCopy(e,t,r,o)}static IsEmpty(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}static RegisterTopRootEvents(e,t){for(let r=0;r<t.length;r++){let o=t[r];e.addEventListener(o.name,o.handler,!1);try{window.parent&&window.parent.addEventListener(o.name,o.handler,!1)}catch(e){}}}static UnregisterTopRootEvents(e,t){for(let r=0;r<t.length;r++){let o=t[r];e.removeEventListener(o.name,o.handler);try{e.parent&&e.parent.removeEventListener(o.name,o.handler)}catch(e){}}}static async DumpFramebuffer(e,t,r,o,a="image/png",i,s){throw(0,l._WarnImport)("DumpTools")}static DumpData(e,t,r,o,a="image/png",i,s=!1,n=!1,c){throw(0,l._WarnImport)("DumpTools")}static async DumpDataAsync(e,t,r,o="image/png",a,i=!1,s=!1,n){throw(0,l._WarnImport)("DumpTools")}static _IsOffScreenCanvas(e){return void 0!==e.convertToBlob}static ToBlob(e,r,o="image/png",a){t._IsOffScreenCanvas(e)||e.toBlob||(e.toBlob=function(e,t,r){setTimeout(()=>{let o=atob(this.toDataURL(t,r).split(",")[1]),a=o.length,i=new Uint8Array(a);for(let e=0;e<a;e++)i[e]=o.charCodeAt(e);e(new Blob([i]))})}),t._IsOffScreenCanvas(e)?e.convertToBlob({type:o,quality:a}).then(e=>r(e)):e.toBlob(function(e){r(e)},o,a)}static DownloadBlob(e,r){if("download"in document.createElement("a")){if(!r){let e=new Date;r="screenshot_"+((e.getFullYear()+"-"+(e.getMonth()+1)).slice(2)+"-"+e.getDate()+"_"+e.getHours()+"-")+("0"+e.getMinutes()).slice(-2)+".png"}t.Download(e,r)}else if(e&&"u">typeof URL){let t=URL.createObjectURL(e),r=window.open("");if(!r)return;let o=r.document.createElement("img");o.onload=function(){URL.revokeObjectURL(t)},o.src=t,r.document.body.appendChild(o)}}static EncodeScreenshotCanvasData(e,r,o="image/png",a,i){if("string"!=typeof a&&r){if(r){if(t._IsOffScreenCanvas(e))return void e.convertToBlob({type:o,quality:i}).then(e=>{let t=new FileReader;t.readAsDataURL(e),t.onloadend=()=>{r(t.result)}});r(e.toDataURL(o,i))}}else this.ToBlob(e,function(e){e&&t.DownloadBlob(e,a),r&&r("")},o,i)}static Download(e,t){if("u"<typeof URL)return;let r=window.URL.createObjectURL(e),o=document.createElement("a");document.body.appendChild(o),o.style.display="none",o.href=r,o.download=t,o.addEventListener("click",()=>{o.parentElement&&o.parentElement.removeChild(o)}),o.click(),window.URL.revokeObjectURL(r)}static BackCompatCameraNoPreventDefault(e){return"boolean"==typeof e[0]?e[0]:"boolean"==typeof e[1]&&e[1]}static CreateScreenshot(e,t,r,o,a="image/png",i=!1,s){throw(0,l._WarnImport)("ScreenshotTools")}static async CreateScreenshotAsync(e,t,r,o="image/png",a){throw(0,l._WarnImport)("ScreenshotTools")}static CreateScreenshotUsingRenderTarget(e,t,r,o,a="image/png",i=1,s=!1,n,c=!1,u=!1,f=!0,g,d){throw(0,l._WarnImport)("ScreenshotTools")}static async CreateScreenshotUsingRenderTargetAsync(e,t,r,o="image/png",a=1,i=!1,s,n=!1,c=!1,u=!0,f,g){throw(0,l._WarnImport)("ScreenshotTools")}static RandomId(){return(0,p.RandomGUID)()}static IsBase64(e){return(0,f.IsBase64DataUrl)(e)}static DecodeBase64(e){return(0,f.DecodeBase64UrlToBinary)(e)}static get errorsCount(){return a.Logger.errorsCount}static Log(e){a.Logger.Log(e)}static Warn(e){a.Logger.Warn(e)}static Error(e){a.Logger.Error(e)}static get LogCache(){return a.Logger.LogCache}static ClearLogCache(){a.Logger.ClearLogCache()}static set LogLevels(e){a.Logger.LogLevels=e}static set PerformanceLogLevel(e){(e&t.PerformanceUserMarkLogLevel)===t.PerformanceUserMarkLogLevel?_native?.enablePerformanceLogging?(_native.enablePerformanceLogging(1),t.StartPerformanceCounter=t._StartMarkNative,t.EndPerformanceCounter=t._EndMarkNative):(t.StartPerformanceCounter=t._StartUserMark,t.EndPerformanceCounter=t._EndUserMark):(e&t.PerformanceConsoleLogLevel)===t.PerformanceConsoleLogLevel?_native?.enablePerformanceLogging?(_native.enablePerformanceLogging(2),t.StartPerformanceCounter=t._StartMarkNative,t.EndPerformanceCounter=t._EndMarkNative):(t.StartPerformanceCounter=t._StartPerformanceConsole,t.EndPerformanceCounter=t._EndPerformanceConsole):(t.StartPerformanceCounter=t._StartPerformanceCounterDisabled,t.EndPerformanceCounter=t._EndPerformanceCounterDisabled,_native?.disablePerformanceLogging?.())}static _StartPerformanceCounterDisabled(e,t){}static _EndPerformanceCounterDisabled(e,t){}static _StartUserMark(e,r=!0){if(!t._Performance){if(!(0,o.IsWindowObjectExist)())return;t._Performance=window.performance}r&&t._Performance.mark&&t._Performance.mark(e+"-Begin")}static _EndUserMark(e,r=!0){r&&t._Performance.mark&&(t._Performance.mark(e+"-End"),t._Performance.measure(e,e+"-Begin",e+"-End"))}static _StartPerformanceConsole(e,r=!0){r&&(t._StartUserMark(e,r),console.time&&console.time(e))}static _EndPerformanceConsole(e,r=!0){r&&(t._EndUserMark(e,r),console.timeEnd(e))}static _StartMarkNative(e,r=!0){if(r&&_native?.startPerformanceCounter)if(t._NativePerformanceCounterHandles.has(e))t.Warn(`Performance counter with name ${e} is already started.`);else{let r=_native.startPerformanceCounter(e);t._NativePerformanceCounterHandles.set(e,r)}}static _EndMarkNative(e,r=!0){if(r&&_native?.endPerformanceCounter){let r=t._NativePerformanceCounterHandles.get(e);r?(_native.endPerformanceCounter(r),t._NativePerformanceCounterHandles.delete(e)):t.Warn(`Performance counter with name ${e} was not started.`)}}static get Now(){return n.PrecisionDate.Now}static GetClassName(e,t=!1){let r=null;return!t&&e.getClassName?r=e.getClassName():(e instanceof Object&&(r=(t?e:Object.getPrototypeOf(e)).constructor.__bjsclassName__),r||(r=typeof e)),r}static First(e,t){for(let r of e)if(t(r))return r;return null}static getFullClassName(e,t=!1){let r=null,o=null;if(!t&&e.getClassName)r=e.getClassName();else{if(e instanceof Object){let a=t?e:Object.getPrototypeOf(e);r=a.constructor.__bjsclassName__,o=a.constructor.__bjsmoduleName__}r||(r=typeof e)}return r?(null!=o?o+".":"")+r:null}static async DelayAsync(e){await new Promise(t=>{setTimeout(()=>{t()},e)})}static IsSafari(){return!!(0,o.IsNavigatorAvailable)()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}}t=v,v.AssetBaseUrl="",v.UseCustomRequestHeaders=!1,v.CustomRequestHeaders=c.WebRequest.CustomRequestHeaders,v.GetDOMTextContent=o.GetDOMTextContent,v._DefaultCdnUrl="https://cdn.babylonjs.com",v._CdnVersion="9.14.0",v._DefaultAssetsUrl="https://assets.babylonjs.com/core",v.LoadScript="u"<typeof _native?t._LoadScriptWeb:t._LoadScriptNative,v.GetAbsoluteUrl="object"==typeof document?e=>{let t=document.createElement("a");return t.href=e,t.href}:"function"==typeof URL&&"object"==typeof location?e=>new URL(e,location.origin).href:()=>{throw Error("Unable to get absolute URL. Override BABYLON.Tools.GetAbsoluteUrl to a custom implementation for the current context.")},v.NoneLogLevel=a.Logger.NoneLogLevel,v.MessageLogLevel=a.Logger.MessageLogLevel,v.WarningLogLevel=a.Logger.WarningLogLevel,v.ErrorLogLevel=a.Logger.ErrorLogLevel,v.AllLogLevel=a.Logger.AllLogLevel,v.IsWindowObjectExist=o.IsWindowObjectExist,v.PerformanceNoneLogLevel=0,v.PerformanceUserMarkLogLevel=1,v.PerformanceConsoleLogLevel=2,v._NativePerformanceCounterHandles=new Map,v.StartPerformanceCounter=t._StartPerformanceCounterDisabled,v.EndPerformanceCounter=t._EndPerformanceCounterDisabled;class m{constructor(e,t,r,o=0){this.iterations=e,this.index=o-1,this._done=!1,this._fn=t,this._successCallback=r}executeNext(){this._done||(this.index+1<this.iterations?(++this.index,this._fn(this)):this.breakLoop())}breakLoop(){this._done=!0,this._successCallback()}static Run(e,t,r,o=0){let a=new m(e,t,r,o);return a.executeNext(),a}static SyncAsyncForLoop(e,t,r,o,a,i=0){return m.Run(Math.ceil(e/t),o=>{a&&a()?o.breakLoop():setTimeout(()=>{for(let i=0;i<t;++i){let s=o.index*t+i;if(s>=e)break;if(r(s),a&&a()){o.breakLoop();break}}o.executeNext()},i)},o)}}let K=!1;e.s(["AsyncLoop",0,m,"RegisterTools",0,function(){K||(K=!0,v.Mix=h.Mix,v.IsExponentOfTwo=h.IsExponentOfTwo,u.EngineStore.FallbackTexture="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBmRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAAQAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQubmV0IDQuMC41AP/bAEMABAIDAwMCBAMDAwQEBAQFCQYFBQUFCwgIBgkNCw0NDQsMDA4QFBEODxMPDAwSGBITFRYXFxcOERkbGRYaFBYXFv/bAEMBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFv/AABEIAQABAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APH6KKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z")},"Tools",0,v],29711)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89102,e=>{"use strict";var t=e.i(10534),r=e.i(35270),a=e.i(12247),o=e.i(26722),l=e.i(75053);class n{constructor(e,t,r,a){this.name=e,this.worldAxisForNormal=t,this.worldAxisForFileX=r,this.worldAxisForFileY=a}}class i{static _NearestPow2Floor(e){return e<=1?1:1<<Math.floor(Math.log2(e))}static ConvertCubeMapTextureToSphericalPolynomial(e){let t,r;if(!e.isCube)return null;e.getScene()?.getEngine().flushFramebuffer();let a=e.getSize().width,o=e._sphericalPolynomialTargetSize,l=o>0?this._NearestPow2Floor(o):0,n=!e.noMipmap&&e._texture?.generateMipMaps===!0,i=l>0&&l<a&&n,s=i?Math.max(0,Math.round(Math.log2(a/l))):0,f=i?Math.max(1,Math.floor(a/Math.pow(2,s))):a,u=e.readPixels(0,s,void 0,!1),c=e.readPixels(1,s,void 0,!1);e.isRenderTarget?(t=e.readPixels(3,s,void 0,!1),r=e.readPixels(2,s,void 0,!1)):(t=e.readPixels(2,s,void 0,!1),r=e.readPixels(3,s,void 0,!1));let p=e.readPixels(4,s,void 0,!1),d=e.readPixels(5,s,void 0,!1),A=e.gammaSpace,h=l>0&&l<a&&!i;return new Promise(e=>{Promise.all([c,u,t,r,p,d]).then(([t,r,o,n,i,s])=>{let u=f;h&&(t=this._DownsampleFace(t,a,l,4),r=this._DownsampleFace(r,a,l,4),o=this._DownsampleFace(o,a,l,4),n=this._DownsampleFace(n,a,l,4),i=this._DownsampleFace(i,a,l,4),s=this._DownsampleFace(s,a,l,4),u=l);let c={size:u,right:r,left:t,up:o,down:n,front:i,back:s,format:5,type:+(t instanceof Float32Array),gammaSpace:A};e(this.ConvertCubeMapToSphericalPolynomial(c))})})}static _AreaElement(e,t){return Math.atan2(e*t,Math.sqrt(e*e+t*t+1))}static _DownsampleFace(e,t,r,a){let o=e instanceof Float32Array?e:Float32Array.from(e),l=r*r*a,n=new Float32Array(l),i=t/r,s=1/(i*i);for(let e=0;e<r;e++){let l=Math.floor(e*i),f=Math.floor((e+1)*i);for(let u=0;u<r;u++){let c=Math.floor(u*i),p=Math.floor((u+1)*i),d=(e*r+u)*a;for(let e=0;e<a;e++){let r=0;for(let n=l;n<f;n++)for(let l=c;l<p;l++)r+=o[(n*t+l)*a+e];n[d+e]=r*s}}}if(e instanceof Float32Array)return n;let f=new e.constructor(l);for(let e=0;e<l;e++)f[e]=n[e]+.5|0;return f}static ConvertCubeMapToSphericalPolynomial(e,t=0){let n=t>0?this._NearestPow2Floor(t):0;if(n>0&&e.size>n){let t=5===e.format?4:3,r={};for(let a of["right","left","up","down","front","back"])r[a]=this._DownsampleFace(e[a],e.size,n,t);e={...e,...r,size:n}}let i=new a.SphericalHarmonics,s=0,f=2/e.size,u=.5*f,c=u-1;for(let t=0;t<6;t++){let a=this._FileFaces[t],n=e[a.name],p=c,d=5===e.format?4:3;for(let t=0;t<e.size;t++){let A=c;for(let c=0;c<e.size;c++){let h=a.worldAxisForFileX.scale(A).add(a.worldAxisForFileY.scale(p)).add(a.worldAxisForNormal);h.normalize();let m=this._AreaElement(A-u,p-u)-this._AreaElement(A-u,p+u)-this._AreaElement(A+u,p-u)+this._AreaElement(A+u,p+u),F=n[t*e.size*d+c*d+0],y=n[t*e.size*d+c*d+1],_=n[t*e.size*d+c*d+2];isNaN(F)&&(F=0),isNaN(y)&&(y=0),isNaN(_)&&(_=0),0===e.type&&(F/=255,y/=255,_/=255),e.gammaSpace&&(F=Math.pow((0,r.Clamp)(F),o.ToLinearSpace),y=Math.pow((0,r.Clamp)(y),o.ToLinearSpace),_=Math.pow((0,r.Clamp)(_),o.ToLinearSpace));let w=this.MAX_HDRI_VALUE;if(this.PRESERVE_CLAMPED_COLORS){let e=Math.max(F,y,_);if(e>w){let t=w/e;F*=t,y*=t,_*=t}}else F=(0,r.Clamp)(F,0,w),y=(0,r.Clamp)(y,0,w),_=(0,r.Clamp)(_,0,w);let C=new l.Color3(F,y,_);i.addLight(h,C,m),s+=m,A+=f}p+=f}}let p=4*Math.PI*6/6/s;return i.scaleInPlace(p),i.convertIncidentRadianceToIrradiance(),i.convertIrradianceToLambertianRadiance(),a.SphericalPolynomial.FromHarmonics(i)}}i._FileFaces=[new n("right",new t.Vector3(1,0,0),new t.Vector3(0,0,-1),new t.Vector3(0,-1,0)),new n("left",new t.Vector3(-1,0,0),new t.Vector3(0,0,1),new t.Vector3(0,-1,0)),new n("up",new t.Vector3(0,1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,1)),new n("down",new t.Vector3(0,-1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,-1)),new n("front",new t.Vector3(0,0,1),new t.Vector3(1,0,0),new t.Vector3(0,-1,0)),new n("back",new t.Vector3(0,0,-1),new t.Vector3(-1,0,0),new t.Vector3(0,-1,0))],i.MAX_HDRI_VALUE=4096,i.PRESERVE_CLAMPED_COLORS=!1,e.s(["CubeMapToSphericalPolynomialTools",0,i])},22093,e=>{"use strict";var t=e.i(35270),r=e.i(83464),a=e.i(89102),o=e.i(37890);function l(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}let n=l("DXT1"),i=l("DXT3"),s=l("DXT5"),f=l("DX10");class u{static GetDDSInfo(e){let t=new Int32Array(e.buffer,e.byteOffset,31),r=new Int32Array(e.buffer,e.byteOffset,35),a=1;131072&t[2]&&(a=Math.max(1,t[7]));let o=t[21],l=o===f?r[32]:0,u=0;switch(o){case 113:u=2;break;case 116:u=1;break;case f:if(10===l){u=2;break}2===l&&(u=1)}return{width:t[4],height:t[3],mipmapCount:a,isFourCC:(4&t[20])==4,isRGB:(64&t[20])==64,isLuminance:(131072&t[20])==131072,isCube:(512&t[28])==512,isCompressed:o===n||o===i||o===s,dxgiFormat:l,textureType:u}}static _GetHalfFloatAsFloatRGBAArrayBuffer(e,t,r,a,l,n){let i=new Float32Array(a),s=new Uint16Array(l,r),f=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;i[f]=(0,o.FromHalfFloat)(s[a]),i[f+1]=(0,o.FromHalfFloat)(s[a+1]),i[f+2]=(0,o.FromHalfFloat)(s[a+2]),u.StoreLODInAlphaChannel?i[f+3]=n:i[f+3]=(0,o.FromHalfFloat)(s[a+3]),f+=4}return i}static _GetHalfFloatRGBAArrayBuffer(e,t,r,a,l,n){if(u.StoreLODInAlphaChannel){let i=new Uint16Array(a),s=new Uint16Array(l,r),f=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;i[f]=s[a],i[f+1]=s[a+1],i[f+2]=s[a+2],i[f+3]=(0,o.ToHalfFloat)(n),f+=4}return i}return new Uint16Array(l,r,a)}static _GetFloatRGBAArrayBuffer(e,t,r,a,o,l){if(u.StoreLODInAlphaChannel){let n=new Float32Array(a),i=new Float32Array(o,r),s=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;n[s]=i[a],n[s+1]=i[a+1],n[s+2]=i[a+2],n[s+3]=l,s+=4}return n}return new Float32Array(o,r,a)}static _GetFloatAsHalfFloatRGBAArrayBuffer(e,t,r,a,l,n){let i=new Uint16Array(a),s=new Float32Array(l,r),f=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++)i[f]=(0,o.ToHalfFloat)(s[f]),i[f+1]=(0,o.ToHalfFloat)(s[f+1]),i[f+2]=(0,o.ToHalfFloat)(s[f+2]),u.StoreLODInAlphaChannel?i[f+3]=(0,o.ToHalfFloat)(n):i[f+3]=(0,o.ToHalfFloat)(s[f+3]),f+=4;return i}static _GetFloatAsUIntRGBAArrayBuffer(e,r,a,o,l,n){let i=new Uint8Array(o),s=new Float32Array(l,a),f=0;for(let a=0;a<r;a++)for(let r=0;r<e;r++){let o=(r+a*e)*4;i[f]=255*(0,t.Clamp)(s[o]),i[f+1]=255*(0,t.Clamp)(s[o+1]),i[f+2]=255*(0,t.Clamp)(s[o+2]),u.StoreLODInAlphaChannel?i[f+3]=n:i[f+3]=255*(0,t.Clamp)(s[o+3]),f+=4}return i}static _GetHalfFloatAsUIntRGBAArrayBuffer(e,r,a,l,n,i){let s=new Uint8Array(l),f=new Uint16Array(n,a),c=0;for(let a=0;a<r;a++)for(let r=0;r<e;r++){let l=(r+a*e)*4;s[c]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l])),s[c+1]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l+1])),s[c+2]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l+2])),u.StoreLODInAlphaChannel?s[c+3]=i:s[c+3]=255*(0,t.Clamp)((0,o.FromHalfFloat)(f[l+3])),c+=4}return s}static _GetRGBAArrayBuffer(e,t,r,a,o,l,n,i,s){let f=new Uint8Array(a),u=new Uint8Array(o,r),c=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*4;f[c]=u[a+l],f[c+1]=u[a+n],f[c+2]=u[a+i],f[c+3]=u[a+s],c+=4}return f}static _ExtractLongWordOrder(e){return 0===e||255===e||-0x1000000===e?0:1+u._ExtractLongWordOrder(e>>8)}static _GetRGBArrayBuffer(e,t,r,a,o,l,n,i){let s=new Uint8Array(a),f=new Uint8Array(o,r),u=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=(t+r*e)*3;s[u]=f[a+l],s[u+1]=f[a+n],s[u+2]=f[a+i],u+=3}return s}static _GetLuminanceArrayBuffer(e,t,r,a,o){let l=new Uint8Array(a),n=new Uint8Array(o,r),i=0;for(let r=0;r<t;r++)for(let t=0;t<e;t++){let a=t+r*e;l[i]=n[a],i++}return l}static UploadDDSLevels(e,t,o,l,c,p,d=-1,A,h=!0){let m,F,y,_=null;l.sphericalPolynomial&&(_=[]);let w=!!e.getCaps().s3tc;t.generateMipMaps=c;let C=new Int32Array(o.buffer,o.byteOffset,31),b,g,B,G=0,x,T=0,L=1;if(0x20534444!==C[0])return void r.Logger.Error("Invalid magic number in DDS header");if(!l.isFourCC&&!l.isRGB&&!l.isLuminance)return void r.Logger.Error("Unsupported format, must contain a FourCC, RGB or LUMINANCE code");if(l.isCompressed&&!w)return void r.Logger.Error("Compressed textures are not supported on this platform.");let D=C[22];x=C[1]+4;let R=!1;if(l.isFourCC)switch(b=C[21]){case n:L=8,T=33777;break;case i:L=16,T=33778;break;case s:L=16,T=33779;break;case 113:R=!0,D=64;break;case 116:R=!0,D=128;break;case f:{x+=20;let e=!1;switch(l.dxgiFormat){case 10:R=!0,D=64,e=!0;break;case 2:R=!0,D=128,e=!0;break;case 88:l.isRGB=!0,l.isFourCC=!1,D=32,e=!0}if(e)break}default:r.Logger.Error(["Unsupported FourCC code:",String.fromCharCode(255&b,b>>8&255,b>>16&255,b>>24&255)]);return}let M=u._ExtractLongWordOrder(C[23]),S=u._ExtractLongWordOrder(C[24]),P=u._ExtractLongWordOrder(C[25]),O=u._ExtractLongWordOrder(C[26]);R&&(T=e._getRGBABufferInternalSizedFormat(l.textureType)),F=1,131072&C[2]&&!1!==c&&(F=Math.max(1,C[7]));let U=A||0,v=e.getCaps();for(let r=U;r<p;r++){for(y=0,g=C[4],B=C[3];y<F;++y){if(-1===d||d===y){let a=-1===d?y:0;if(!l.isCompressed&&l.isFourCC){t.format=5,G=g*B*4;let l=null;if(e._badOS||e._badDesktopOS||!v.textureHalfFloat&&!v.textureFloat)128===D?(l=u._GetFloatAsUIntRGBAArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,a),_&&0==a&&_.push(u._GetFloatRGBAArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,a))):64===D&&(l=u._GetHalfFloatAsUIntRGBAArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,a),_&&0==a&&_.push(u._GetHalfFloatAsFloatRGBAArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,a))),t.type=0;else{let e,r=v.textureFloat&&(h&&v.textureFloatLinearFiltering||!h),n=v.textureHalfFloat&&(h&&v.textureHalfFloatLinearFiltering||!h),i=(128===D||64===D&&!n)&&r?1:(64===D||128===D&&!r)&&n?2:0,s=null;if(128===D)switch(i){case 1:e=u._GetFloatRGBAArrayBuffer,s=null;break;case 2:e=u._GetFloatAsHalfFloatRGBAArrayBuffer,s=u._GetFloatRGBAArrayBuffer;break;case 0:e=u._GetFloatAsUIntRGBAArrayBuffer,s=u._GetFloatRGBAArrayBuffer}else switch(i){case 1:e=u._GetHalfFloatAsFloatRGBAArrayBuffer,s=null;break;case 2:e=u._GetHalfFloatRGBAArrayBuffer,s=u._GetHalfFloatAsFloatRGBAArrayBuffer;break;case 0:e=u._GetHalfFloatAsUIntRGBAArrayBuffer,s=u._GetHalfFloatAsFloatRGBAArrayBuffer}t.type=i,l=e(g,B,o.byteOffset+x,G,o.buffer,a),_&&0==a&&_.push(s?s(g,B,o.byteOffset+x,G,o.buffer,a):l)}l&&e._uploadDataToTextureDirectly(t,l,r,a)}else if(l.isRGB)t.type=0,24===D?(t.format=4,G=g*B*3,m=u._GetRGBArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,M,S,P)):(t.format=5,G=g*B*4,m=u._GetRGBAArrayBuffer(g,B,o.byteOffset+x,G,o.buffer,M,S,P,O)),e._uploadDataToTextureDirectly(t,m,r,a);else if(l.isLuminance){let l=e._getUnpackAlignement(),n=g;G=Math.floor((g+l-1)/l)*l*(B-1)+n,m=u._GetLuminanceArrayBuffer(g,B,o.byteOffset+x,G,o.buffer),t.format=1,t.type=0,e._uploadDataToTextureDirectly(t,m,r,a)}else G=Math.max(4,g)/4*Math.max(4,B)/4*L,m=new Uint8Array(o.buffer,o.byteOffset+x,G),t.type=0,e._uploadCompressedDataToTextureDirectly(t,T,g,B,m,r,a)}x+=D?g*B*(D/8):G,g*=.5,B*=.5,g=Math.max(1,g),B=Math.max(1,B)}if(void 0!==A)break}_&&_.length>0?l.sphericalPolynomial=a.CubeMapToSphericalPolynomialTools.ConvertCubeMapToSphericalPolynomial({size:C[4],right:_[0],left:_[1],up:_[2],down:_[3],front:_[4],back:_[5],format:5,type:1,gammaSpace:!1}):l.sphericalPolynomial=void 0}}u.StoreLODInAlphaChannel=!1,e.s(["DDSTools",0,u])},59922,e=>{"use strict";var t=e.i(58727),r=e.i(83464),a=e.i(25746),o=e.i(53477),l=e.i(34736),n=e.i(20307);let i=!1;i=!0,n.AbstractEngine.prototype._partialLoadFile=function(e,t,r,a,o=null){this._loadFile(e,e=>{r[t]=e,r._internalCount++,6===r._internalCount&&a(r)},void 0,void 0,!0,(e,t)=>{o&&e&&o(e.status+" "+e.statusText,t)})},n.AbstractEngine.prototype._cascadeLoadFiles=function(e,t,r,a=null){let o=[];o._internalCount=0;for(let e=0;e<6;e++)this._partialLoadFile(r[e],e,o,t,a)},n.AbstractEngine.prototype._cascadeLoadImgs=function(e,t,r,a,o=null,l){let n=[];n._internalCount=0;for(let i=0;i<6;i++)this._partialLoadImg(a[i],i,n,e,t,r,o,l)},n.AbstractEngine.prototype._partialLoadImg=function(e,t,r,l,n,i,s=null,f){let u=(0,o.RandomGUID)();(0,a.LoadImage)(e,e=>{r[t]=e,r._internalCount++,l&&l.removePendingData(u),6===r._internalCount&&i&&i(n,r)},(e,t)=>{l&&l.removePendingData(u),s&&s(e,t)},l?l.offlineProvider:null,f),l&&l.addPendingData(u)},n.AbstractEngine.prototype.createCubeTextureBase=function(e,a,o,n,i=null,s=null,f,u=null,c=!1,p=0,d=0,A=null,h=null,m=null,F=!1,y=null){let _,w,C=A||new t.InternalTexture(this,7);C.isCube=!0,C.url=e,C.generateMipMaps=!n,C._lodGenerationScale=p,C._lodGenerationOffset=d,C._useSRGBBuffer=!!F&&this._caps.supportSRGBBuffers&&(this.version>1||this.isWebGPU||!!n),C!==A&&(C.label=e.substring(0,60)),this._doNotHandleContextLost||(C._extension=u,C._files=o,C._buffer=y);let b=e;this._transformTextureUrl&&!A&&(e=this._transformTextureUrl(e));let g=u??((w=(_=e.split("?")[0]).lastIndexOf("."))>-1?_.substring(w).toLowerCase():""),B=(0,l._GetCompatibleTextureLoader)(g),G=(e,t)=>{C.dispose(),s?s(e,t):e&&r.Logger.Warn(e)},x=(t,l)=>{e===b?t&&G(t.status+" "+t.statusText,l):(r.Logger.Warn(`Failed to load ${e}, falling back to the ${b}`),this.createCubeTextureBase(b,a,o,!!n,i,G,f,u,c,p,d,C,h,m,F,y))};if(B)B.then(t=>{let r=e=>{h&&h(C,e),t.loadCubeData(e,C,c,i,(e,t)=>{G(e,t)})};y?r(y):o&&6===o.length?t.supportCascades?this._cascadeLoadFiles(a,e=>r(e.map(e=>new Uint8Array(e))),o,G):G("Textures type does not support cascades."):this._loadFile(e,e=>r(new Uint8Array(e)),void 0,a?a.offlineProvider||null:void 0,!0,x)});else{if(!o||0===o.length)throw Error("Cannot load cubemap because files were not defined, or the correct loader was not found.");this._cascadeLoadImgs(a,C,(e,t)=>{m&&m(e,t)},o,G)}return this._internalTexturesCache.push(C),C},e.s([],86375),e.i(86375);var s=e.i(22093);e.s(["DDSTools",()=>s.DDSTools],59922)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7904,e=>{"use strict";(0,e.i(10534).RegisterMathVector)(),e.s([])},89718,e=>{"use strict";(0,e.i(75053).RegisterMathColor)(),e.s([])},6426,e=>{"use strict";class t{}t.AUTOSAMPLERSUFFIX="Sampler",t.DISABLEUA="#define DISABLE_UNIFORMITY_ANALYSIS",t.ALPHA_DISABLE=0,t.ALPHA_ADD=1,t.ALPHA_COMBINE=2,t.ALPHA_SUBTRACT=3,t.ALPHA_MULTIPLY=4,t.ALPHA_MAXIMIZED=5,t.ALPHA_ONEONE=6,t.ALPHA_PREMULTIPLIED=7,t.ALPHA_PREMULTIPLIED_PORTERDUFF=8,t.ALPHA_INTERPOLATE=9,t.ALPHA_SCREENMODE=10,t.ALPHA_ONEONE_ONEONE=11,t.ALPHA_ALPHATOCOLOR=12,t.ALPHA_REVERSEONEMINUS=13,t.ALPHA_SRC_DSTONEMINUSSRCALPHA=14,t.ALPHA_ONEONE_ONEZERO=15,t.ALPHA_EXCLUSION=16,t.ALPHA_LAYER_ACCUMULATE=17,t.ALPHA_MIN=18,t.ALPHA_MAX=19,t.ALPHA_DUAL_SRC0_ADD_SRC1xDST=20,t.ALPHA_EQUATION_ADD=0,t.ALPHA_EQUATION_SUBSTRACT=1,t.ALPHA_EQUATION_REVERSE_SUBTRACT=2,t.ALPHA_EQUATION_MAX=3,t.ALPHA_EQUATION_MIN=4,t.ALPHA_EQUATION_DARKEN=5,t.DELAYLOADSTATE_NONE=0,t.DELAYLOADSTATE_LOADED=1,t.DELAYLOADSTATE_LOADING=2,t.DELAYLOADSTATE_NOTLOADED=4,t.NEVER=512,t.ALWAYS=519,t.LESS=513,t.EQUAL=514,t.LEQUAL=515,t.GREATER=516,t.GEQUAL=518,t.NOTEQUAL=517,t.KEEP=7680,t.ZERO=0,t.REPLACE=7681,t.INCR=7682,t.DECR=7683,t.INVERT=5386,t.INCR_WRAP=34055,t.DECR_WRAP=34056,t.TEXTURE_CLAMP_ADDRESSMODE=0,t.TEXTURE_WRAP_ADDRESSMODE=1,t.TEXTURE_MIRROR_ADDRESSMODE=2,t.TEXTURE_REPETITION_NONE=0,t.TEXTURE_REPETITION_NOISE_BLEND=1,t.TEXTURE_REPETITION_HEX_TILING=2,t.TEXTURE_REPETITION_TILE_RANDOMIZATION=3,t.TEXTURE_REPETITION_VORONOI_BOMBING=4,t.TEXTURE_CREATIONFLAG_STORAGE=1,t.TEXTUREFORMAT_ALPHA=0,t.TEXTUREFORMAT_LUMINANCE=1,t.TEXTUREFORMAT_LUMINANCE_ALPHA=2,t.TEXTUREFORMAT_RGB=4,t.TEXTUREFORMAT_RGBA=5,t.TEXTUREFORMAT_RED=6,t.TEXTUREFORMAT_R=6,t.TEXTUREFORMAT_R16_UNORM=33322,t.TEXTUREFORMAT_RG16_UNORM=33324,t.TEXTUREFORMAT_RGB16_UNORM=32852,t.TEXTUREFORMAT_RGBA16_UNORM=32859,t.TEXTUREFORMAT_R16_SNORM=36760,t.TEXTUREFORMAT_RG16_SNORM=36761,t.TEXTUREFORMAT_RGB16_SNORM=36762,t.TEXTUREFORMAT_RGBA16_SNORM=36763,t.TEXTUREFORMAT_RG=7,t.TEXTUREFORMAT_RED_INTEGER=8,t.TEXTUREFORMAT_R_INTEGER=8,t.TEXTUREFORMAT_RG_INTEGER=9,t.TEXTUREFORMAT_RGB_INTEGER=10,t.TEXTUREFORMAT_RGBA_INTEGER=11,t.TEXTUREFORMAT_BGRA=12,t.TEXTUREFORMAT_DEPTH24_STENCIL8=13,t.TEXTUREFORMAT_DEPTH32_FLOAT=14,t.TEXTUREFORMAT_DEPTH16=15,t.TEXTUREFORMAT_DEPTH24=16,t.TEXTUREFORMAT_DEPTH24UNORM_STENCIL8=17,t.TEXTUREFORMAT_DEPTH32FLOAT_STENCIL8=18,t.TEXTUREFORMAT_STENCIL8=19,t.TEXTUREFORMAT_UNDEFINED=0xffffffff,t.TEXTUREFORMAT_COMPRESSED_RGBA_BPTC_UNORM=36492,t.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_BPTC_UNORM=36493,t.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT=36495,t.TEXTUREFORMAT_COMPRESSED_RGB_BPTC_SIGNED_FLOAT=36494,t.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT5=33779,t.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919,t.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT3=33778,t.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918,t.TEXTUREFORMAT_COMPRESSED_RGBA_S3TC_DXT1=33777,t.TEXTUREFORMAT_COMPRESSED_RGB_S3TC_DXT1=33776,t.TEXTUREFORMAT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917,t.TEXTUREFORMAT_COMPRESSED_SRGB_S3TC_DXT1_EXT=35916,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_4x4=37808,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_5x4=37809,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_5x5=37810,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_6x5=37811,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_6x6=37812,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_8x5=37813,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_8x6=37814,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_8x8=37815,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_10x5=37816,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_10x6=37817,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_10x8=37818,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_10x10=37819,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_12x10=37820,t.TEXTUREFORMAT_COMPRESSED_RGBA_ASTC_12x12=37821,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=37841,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=37842,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=37843,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=37844,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=37845,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=37846,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=37847,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=37848,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=37849,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=37850,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=37851,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=37852,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=37853,t.TEXTUREFORMAT_COMPRESSED_RGB_ETC1_WEBGL=36196,t.TEXTUREFORMAT_COMPRESSED_RGB8_ETC2=37492,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ETC2=37493,t.TEXTUREFORMAT_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494,t.TEXTUREFORMAT_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495,t.TEXTUREFORMAT_COMPRESSED_RGBA8_ETC2_EAC=37496,t.TEXTUREFORMAT_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497,t.TEXTURETYPE_UNSIGNED_BYTE=0,t.TEXTURETYPE_UNSIGNED_INT=0,t.TEXTURETYPE_FLOAT=1,t.TEXTURETYPE_HALF_FLOAT=2,t.TEXTURETYPE_BYTE=3,t.TEXTURETYPE_SHORT=4,t.TEXTURETYPE_UNSIGNED_SHORT=5,t.TEXTURETYPE_INT=6,t.TEXTURETYPE_UNSIGNED_INTEGER=7,t.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=8,t.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=9,t.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=10,t.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=11,t.TEXTURETYPE_UNSIGNED_INT_24_8=12,t.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=13,t.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=14,t.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=15,t.TEXTURETYPE_UNDEFINED=16,t.TEXTURE_2D=3553,t.TEXTURE_2D_ARRAY=35866,t.TEXTURE_CUBE_MAP=34067,t.TEXTURE_CUBE_MAP_ARRAY=0xdeadbeef,t.TEXTURE_3D=32879,t.TEXTURE_NEAREST_SAMPLINGMODE=1,t.TEXTURE_NEAREST_NEAREST=1,t.TEXTURE_BILINEAR_SAMPLINGMODE=2,t.TEXTURE_LINEAR_LINEAR=2,t.TEXTURE_TRILINEAR_SAMPLINGMODE=3,t.TEXTURE_LINEAR_LINEAR_MIPLINEAR=3,t.TEXTURE_NEAREST_NEAREST_MIPNEAREST=4,t.TEXTURE_NEAREST_LINEAR_MIPNEAREST=5,t.TEXTURE_NEAREST_LINEAR_MIPLINEAR=6,t.TEXTURE_NEAREST_LINEAR=7,t.TEXTURE_NEAREST_NEAREST_MIPLINEAR=8,t.TEXTURE_LINEAR_NEAREST_MIPNEAREST=9,t.TEXTURE_LINEAR_NEAREST_MIPLINEAR=10,t.TEXTURE_LINEAR_LINEAR_MIPNEAREST=11,t.TEXTURE_LINEAR_NEAREST=12,t.TEXTURE_EXPLICIT_MODE=0,t.TEXTURE_SPHERICAL_MODE=1,t.TEXTURE_PLANAR_MODE=2,t.TEXTURE_CUBIC_MODE=3,t.TEXTURE_PROJECTION_MODE=4,t.TEXTURE_SKYBOX_MODE=5,t.TEXTURE_INVCUBIC_MODE=6,t.TEXTURE_EQUIRECTANGULAR_MODE=7,t.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=8,t.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,t.TEXTURE_FILTERING_QUALITY_OFFLINE=4096,t.TEXTURE_FILTERING_QUALITY_HIGH=64,t.TEXTURE_FILTERING_QUALITY_MEDIUM=16,t.TEXTURE_FILTERING_QUALITY_LOW=8,t.SCALEMODE_FLOOR=1,t.SCALEMODE_NEAREST=2,t.SCALEMODE_CEILING=3,t.MATERIAL_TextureDirtyFlag=1,t.MATERIAL_LightDirtyFlag=2,t.MATERIAL_FresnelDirtyFlag=4,t.MATERIAL_AttributesDirtyFlag=8,t.MATERIAL_MiscDirtyFlag=16,t.MATERIAL_PrePassDirtyFlag=32,t.MATERIAL_ImageProcessingDirtyFlag=64,t.MATERIAL_AllDirtyFlag=127,t.MATERIAL_TriangleFillMode=0,t.MATERIAL_WireFrameFillMode=1,t.MATERIAL_PointFillMode=2,t.MATERIAL_PointListDrawMode=3,t.MATERIAL_LineListDrawMode=4,t.MATERIAL_LineLoopDrawMode=5,t.MATERIAL_LineStripDrawMode=6,t.MATERIAL_TriangleStripDrawMode=7,t.MATERIAL_TriangleFanDrawMode=8,t.MATERIAL_ClockWiseSideOrientation=0,t.MATERIAL_CounterClockWiseSideOrientation=1,t.MATERIAL_DIFFUSE_MODEL_E_OREN_NAYAR=0,t.MATERIAL_DIFFUSE_MODEL_BURLEY=1,t.MATERIAL_DIFFUSE_MODEL_LAMBERT=2,t.MATERIAL_DIFFUSE_MODEL_LEGACY=3,t.MATERIAL_DIELECTRIC_SPECULAR_MODEL_GLTF=0,t.MATERIAL_DIELECTRIC_SPECULAR_MODEL_OPENPBR=1,t.MATERIAL_CONDUCTOR_SPECULAR_MODEL_GLTF=0,t.MATERIAL_CONDUCTOR_SPECULAR_MODEL_OPENPBR=1,t.ACTION_NothingTrigger=0,t.ACTION_OnPickTrigger=1,t.ACTION_OnLeftPickTrigger=2,t.ACTION_OnRightPickTrigger=3,t.ACTION_OnCenterPickTrigger=4,t.ACTION_OnPickDownTrigger=5,t.ACTION_OnDoublePickTrigger=6,t.ACTION_OnPickUpTrigger=7,t.ACTION_OnPickOutTrigger=16,t.ACTION_OnLongPressTrigger=8,t.ACTION_OnPointerOverTrigger=9,t.ACTION_OnPointerOutTrigger=10,t.ACTION_OnEveryFrameTrigger=11,t.ACTION_OnIntersectionEnterTrigger=12,t.ACTION_OnIntersectionExitTrigger=13,t.ACTION_OnKeyDownTrigger=14,t.ACTION_OnKeyUpTrigger=15,t.PARTICLES_BILLBOARDMODE_Y=2,t.PARTICLES_BILLBOARDMODE_ALL=7,t.PARTICLES_BILLBOARDMODE_STRETCHED=8,t.PARTICLES_BILLBOARDMODE_STRETCHED_LOCAL=9,t.MESHES_CULLINGSTRATEGY_STANDARD=0,t.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY=1,t.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION=2,t.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY=3,t.SCENELOADER_NO_LOGGING=0,t.SCENELOADER_MINIMAL_LOGGING=1,t.SCENELOADER_SUMMARY_LOGGING=2,t.SCENELOADER_DETAILED_LOGGING=3,t.PREPASS_IRRADIANCE_LEGACY_TEXTURE_TYPE=0,t.PREPASS_POSITION_TEXTURE_TYPE=1,t.PREPASS_VELOCITY_TEXTURE_TYPE=2,t.PREPASS_REFLECTIVITY_TEXTURE_TYPE=3,t.PREPASS_COLOR_TEXTURE_TYPE=4,t.PREPASS_DEPTH_TEXTURE_TYPE=5,t.PREPASS_NORMAL_TEXTURE_TYPE=6,t.PREPASS_ALBEDO_SQRT_TEXTURE_TYPE=7,t.PREPASS_WORLD_NORMAL_TEXTURE_TYPE=8,t.PREPASS_LOCAL_POSITION_TEXTURE_TYPE=9,t.PREPASS_SCREENSPACE_DEPTH_TEXTURE_TYPE=10,t.PREPASS_VELOCITY_LINEAR_TEXTURE_TYPE=11,t.PREPASS_ALBEDO_TEXTURE_TYPE=12,t.PREPASS_NORMALIZED_VIEW_DEPTH_TEXTURE_TYPE=13,t.PREPASS_IRRADIANCE_TEXTURE_TYPE=14,t.BUFFER_CREATIONFLAG_READ=1,t.BUFFER_CREATIONFLAG_WRITE=2,t.BUFFER_CREATIONFLAG_READWRITE=3,t.BUFFER_CREATIONFLAG_UNIFORM=4,t.BUFFER_CREATIONFLAG_VERTEX=8,t.BUFFER_CREATIONFLAG_INDEX=16,t.BUFFER_CREATIONFLAG_STORAGE=32,t.BUFFER_CREATIONFLAG_INDIRECT=64,t.RENDERPASS_MAIN=0,t.INPUT_ALT_KEY=18,t.INPUT_CTRL_KEY=17,t.INPUT_META_KEY1=91,t.INPUT_META_KEY2=92,t.INPUT_META_KEY3=93,t.INPUT_SHIFT_KEY=16,t.SNAPSHOTRENDERING_STANDARD=0,t.SNAPSHOTRENDERING_FAST=1,t.PERSPECTIVE_CAMERA=0,t.ORTHOGRAPHIC_CAMERA=1,t.FOVMODE_VERTICAL_FIXED=0,t.FOVMODE_HORIZONTAL_FIXED=1,t.RIG_MODE_NONE=0,t.RIG_MODE_STEREOSCOPIC_ANAGLYPH=10,t.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL=11,t.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED=12,t.RIG_MODE_STEREOSCOPIC_OVERUNDER=13,t.RIG_MODE_STEREOSCOPIC_INTERLACED=14,t.RIG_MODE_VR=20,t.RIG_MODE_CUSTOM=22,t.MAX_SUPPORTED_UV_SETS=6,t.GL_ALPHA_EQUATION_ADD=32774,t.GL_ALPHA_EQUATION_MIN=32775,t.GL_ALPHA_EQUATION_MAX=32776,t.GL_ALPHA_EQUATION_SUBTRACT=32778,t.GL_ALPHA_EQUATION_REVERSE_SUBTRACT=32779,t.GL_ALPHA_FUNCTION_SRC=768,t.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_COLOR=769,t.GL_ALPHA_FUNCTION_SRC_ALPHA=770,t.GL_ALPHA_FUNCTION_ONE_MINUS_SRC_ALPHA=771,t.GL_ALPHA_FUNCTION_DST_ALPHA=772,t.GL_ALPHA_FUNCTION_ONE_MINUS_DST_ALPHA=773,t.GL_ALPHA_FUNCTION_DST_COLOR=774,t.GL_ALPHA_FUNCTION_ONE_MINUS_DST_COLOR=775,t.GL_ALPHA_FUNCTION_SRC_ALPHA_SATURATED=776,t.GL_ALPHA_FUNCTION_CONSTANT_COLOR=32769,t.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_COLOR=32770,t.GL_ALPHA_FUNCTION_CONSTANT_ALPHA=32771,t.GL_ALPHA_FUNCTION_ONE_MINUS_CONSTANT_ALPHA=32772,t.GL_ALPHA_FUNCTION_SRC1_COLOR=35065,t.GL_ALPHA_FUNCTION_ONE_MINUS_SRC1_COLOR=35066,t.GL_ALPHA_FUNCTION_SRC1_ALPHA=34185,t.GL_ALPHA_FUNCTION_ONE_MINUS_SRC1_ALPHA=35067,t.SnippetUrl="https://snippet.babylonjs.com",t.FOGMODE_NONE=0,t.FOGMODE_EXP=1,t.FOGMODE_EXP2=2,t.FOGMODE_LINEAR=3,t.BYTE=5120,t.UNSIGNED_BYTE=5121,t.SHORT=5122,t.UNSIGNED_SHORT=5123,t.INT=5124,t.UNSIGNED_INT=5125,t.FLOAT=5126,t.HALF_FLOAT=5131,t.PositionKind="position",t.NormalKind="normal",t.TangentKind="tangent",t.UVKind="uv",t.UV2Kind="uv2",t.UV3Kind="uv3",t.UV4Kind="uv4",t.UV5Kind="uv5",t.UV6Kind="uv6",t.ColorKind="color",t.ColorInstanceKind="instanceColor",t.MatricesIndicesKind="matricesIndices",t.MatricesWeightsKind="matricesWeights",t.MatricesIndicesExtraKind="matricesIndicesExtra",t.MatricesWeightsExtraKind="matricesWeightsExtra",t.ANIMATIONTYPE_FLOAT=0,t.ANIMATIONTYPE_VECTOR3=1,t.ANIMATIONTYPE_QUATERNION=2,t.ANIMATIONTYPE_MATRIX=3,t.ANIMATIONTYPE_COLOR3=4,t.ANIMATIONTYPE_COLOR4=7,t.ANIMATIONTYPE_VECTOR2=5,t.ANIMATIONTYPE_SIZE=6,t.ShadowMinZ=0,t.ShadowMaxZ=1e4,t.OUTLINELAYER_SAMPLING_TRIDIRECTIONAL=0,t.OUTLINELAYER_SAMPLING_OCTADIRECTIONAL=1,e.s(["Constants",0,t])},53638,e=>{"use strict";e.i(89718);var t=e.i(75053),_=e.i(6426);e.i(7904);var E=e.i(10534);e.s(["PBRMaterialLoadingAdapter",0,class{constructor(e){this._specWorkflow=!1,this._material=e,this._material.enableSpecularAntiAliasing=!0}get material(){return this._material}async finalizeAsync(e){}get isUnlit(){return this._material.unlit}set isUnlit(e){this._material.unlit=e}set backFaceCulling(e){this._material.backFaceCulling=e}get backFaceCulling(){return this._material.backFaceCulling}set twoSidedLighting(e){this._material.twoSidedLighting=e}get twoSidedLighting(){return this._material.twoSidedLighting}set alphaCutOff(e){this._material.alphaCutOff=e}get alphaCutOff(){return this._material.alphaCutOff}set useAlphaFromBaseColorTexture(e){this._material.useAlphaFromAlbedoTexture=e}get useAlphaFromBaseColorTexture(){return this._material.useAlphaFromAlbedoTexture}get transparencyAsAlphaCoverage(){return this._material.useRadianceOverAlpha||this._material.useSpecularOverAlpha}set transparencyAsAlphaCoverage(e){this._material.useRadianceOverAlpha=!e,this._material.useSpecularOverAlpha=!e}set baseColor(e){this._material.albedoColor=e}get baseColor(){return this._material.albedoColor}set baseColorTexture(e){this._material.albedoTexture=e}get baseColorTexture(){return this._material.albedoTexture}set baseDiffuseRoughness(e){this._material.baseDiffuseRoughness=e,e>0&&(this._material.brdf.baseDiffuseModel=_.Constants.MATERIAL_DIFFUSE_MODEL_E_OREN_NAYAR)}get baseDiffuseRoughness(){return this._material.baseDiffuseRoughness??0}set baseDiffuseRoughnessTexture(e){this._material.baseDiffuseRoughnessTexture=e}get baseDiffuseRoughnessTexture(){return this._material.baseDiffuseRoughnessTexture}set baseMetalness(e){this._material.metallic=e}get baseMetalness(){return this._material.metallic??1}set baseMetalnessTexture(e){this._material.metallicTexture=e}get baseMetalnessTexture(){return this._material.metallicTexture}set useRoughnessFromMetallicTextureGreen(e){this._material.useRoughnessFromMetallicTextureGreen=e,this._material.useRoughnessFromMetallicTextureAlpha=!e}set useMetallicFromMetallicTextureBlue(e){this._material.useMetallnessFromMetallicTextureBlue=e}enableSpecularEdgeColor(e=!1){e&&(this._material.brdf.dielectricSpecularModel=_.Constants.MATERIAL_DIELECTRIC_SPECULAR_MODEL_OPENPBR,this._material.brdf.conductorSpecularModel=_.Constants.MATERIAL_CONDUCTOR_SPECULAR_MODEL_OPENPBR)}configureSpecularGlossiness(){this._specWorkflow=!0,this._material.metallic=null,this._material.roughness=null,this._material.useMicroSurfaceFromReflectivityMapAlpha=!0}set specularWeight(e){this._material.metallicF0Factor=e}get specularWeight(){return this._material.metallicF0Factor??1}set specularWeightTexture(e){e?(this._material.metallicReflectanceTexture=e,this._material.useOnlyMetallicFromMetallicReflectanceTexture=!0):(this._material.metallicReflectanceTexture=null,this._material.useOnlyMetallicFromMetallicReflectanceTexture=!1)}get specularWeightTexture(){return this._material.metallicReflectanceTexture}set specularColor(e){this._specWorkflow?this._material.reflectivityColor=e:this._material.metallicReflectanceColor=e}get specularColor(){return this._specWorkflow?this._material.reflectivityColor:this._material.metallicReflectanceColor}set specularColorTexture(e){this._specWorkflow?(this._material.reflectivityTexture=e,this._material.reflectivityTexture&&(this._material.reflectivityTexture.hasAlpha=!0)):this._material.reflectanceTexture=e}get specularColorTexture(){return this._specWorkflow?this._material.reflectivityTexture:this._material.reflectanceTexture}set specularRoughness(e){this._material.roughness=e}get specularRoughness(){return this._material.roughness??1}set specularRoughnessTexture(e){this.baseMetalnessTexture||(this._material.metallicTexture=e)}get specularRoughnessTexture(){return this._material.metallicTexture}set specularIor(e){this._material.indexOfRefraction=e}get specularIor(){return this._material.indexOfRefraction}get glossiness(){return this._material.microSurface??1}set glossiness(e){this._material.microSurface=e}set emissionColor(e){this._material.emissiveColor=e}get emissionColor(){return this._material.emissiveColor}set emissionLuminance(e){this._material.emissiveIntensity=e}get emissionLuminance(){return this._material.emissiveIntensity}set emissionColorTexture(e){this._material.emissiveTexture=e}get emissionColorTexture(){return this._material.emissiveTexture}set ambientOcclusionTexture(e){this._material.ambientTexture=e,e&&(this._material.useAmbientInGrayScale=!0)}get ambientOcclusionTexture(){return this._material.ambientTexture}set ambientOcclusionTextureStrength(e){this._material.ambientTextureStrength=e}get ambientOcclusionTextureStrength(){return this._material.ambientTextureStrength??1}configureCoat(){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.useRoughnessFromMainTexture=!1,this._material.clearCoat.remapF0OnInterfaceChange=!1}set coatWeight(e){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.intensity=e}get coatWeight(){return this._material.clearCoat.intensity}set coatWeightTexture(e){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.texture=e}get coatWeightTexture(){return this._material.clearCoat.texture}set coatColor(e){this._material.clearCoat.isTintEnabled=e!=t.Color3.White(),this._material.clearCoat.tintColor=e}set coatColorTexture(e){this._material.clearCoat.tintTexture=e}set coatRoughness(e){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.roughness=e}get coatRoughness(){return this._material.clearCoat.roughness??0}set coatRoughnessTexture(e){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.useRoughnessFromMainTexture=!1,this._material.clearCoat.textureRoughness=e}get coatRoughnessTexture(){return this._material.clearCoat.textureRoughness}set coatIor(e){this._material.clearCoat.indexOfRefraction=e}set coatDarkening(e){}set coatDarkeningTexture(e){}set coatRoughnessAnisotropy(e){}get coatRoughnessAnisotropy(){return 0}set geometryCoatTangentAngle(e){}set geometryCoatTangentTexture(e){}get geometryCoatTangentTexture(){return null}set transmissionWeight(e){this._material.subSurface.isRefractionEnabled=e>0,this._material.subSurface.refractionIntensity=e}get transmissionWeight(){return this._material.subSurface.isRefractionEnabled?this._material.subSurface.refractionIntensity:0}set transmissionWeightTexture(e){this._material.subSurface.isRefractionEnabled=!0,this._material.subSurface.refractionIntensityTexture=e,this._material.subSurface.useGltfStyleTextures=!0}set transmissionDepth(e){this.transmissionWeight>0?this._material.subSurface.tintColorAtDistance=e:this.subsurfaceWeight>0&&this._material.subSurface.diffusionDistance.multiplyInPlace(new t.Color3(e,e,e))}get transmissionDepth(){return this.transmissionWeight>0?this._material.subSurface.tintColorAtDistance:0}set transmissionColor(e){this.transmissionWeight>0?this._material.subSurface.tintColor=e:this.subsurfaceWeight>0&&this._material.subSurface.diffusionDistance.multiplyInPlace(e)}get transmissionColor(){return this.transmissionWeight>0?this._material.subSurface.tintColor:this.subsurfaceWeight>0?this._material.subSurface.diffusionDistance:new t.Color3(0,0,0)}set transmissionScatter(e){this._material.subSurface.diffusionDistance=e}get transmissionScatter(){return this._material.subSurface.diffusionDistance}set transmissionScatterTexture(e){}set transmissionScatterAnisotropy(e){}set transmissionDispersionAbbeNumber(e){}set transmissionDispersionScale(e){e>0?(this._material.subSurface.isDispersionEnabled=!0,this._material.subSurface.dispersion=20/e):(this._material.subSurface.isDispersionEnabled=!1,this._material.subSurface.dispersion=0)}get refractionBackgroundTexture(){return this._material.subSurface.refractionTexture}set refractionBackgroundTexture(e){this._material.subSurface.refractionTexture=e}configureTransmission(){this._material.subSurface.volumeIndexOfRefraction=1,this._material.subSurface.useAlbedoToTintRefraction=!0,this._material.subSurface.minimumThickness=0,this._material.subSurface.maximumThickness=0}configureVolume(){}set geometryThinWalled(e){}get geometryThinWalled(){return 0===this._material.subSurface.maximumThickness}set volumeThicknessTexture(e){this._material.subSurface.thicknessTexture=e,this._material.subSurface.useGltfStyleTextures=!0}set volumeThickness(e){this._material.subSurface.minimumThickness=0,this._material.subSurface.maximumThickness=e,this._material.subSurface.useThicknessAsDepth=!0,e>0&&(this._material.subSurface.volumeIndexOfRefraction=this._material.indexOfRefraction)}configureSubsurface(){this._material.subSurface.useGltfStyleTextures=!0,this._material.subSurface.volumeIndexOfRefraction=1,this._material.subSurface.minimumThickness=0,this._material.subSurface.maximumThickness=0,this._material.subSurface.useAlbedoToTintTranslucency=!1}set subsurfaceWeight(e){this._material.subSurface.isTranslucencyEnabled=e>0,this._material.subSurface.translucencyIntensity=e}get subsurfaceWeight(){return this._material.subSurface.isTranslucencyEnabled?this._material.subSurface.translucencyIntensity:0}set subsurfaceWeightTexture(e){this._material.subSurface.translucencyIntensityTexture=e}set subsurfaceColor(e){let _=new E.Vector3(-Math.log(this.transmissionColor.r),-Math.log(this.transmissionColor.g),-Math.log(this.transmissionColor.b));_.scaleInPlace(1/Math.max(this.transmissionDepth,.001));let T=Math.max(_.x,Math.max(_.y,_.z)),i=T>0?1/T:1;this._material.subSurface.diffusionDistance=new t.Color3(Math.exp(-_.x*i),Math.exp(-_.y*i),Math.exp(-_.z*i))}set subsurfaceColorTexture(e){}set diffuseTransmissionTint(e){this._material.subSurface.tintColor=e}get diffuseTransmissionTint(){return this._material.subSurface.tintColor}set diffuseTransmissionTintTexture(e){this._material.subSurface.translucencyColorTexture=e}get subsurfaceRadius(){return 1}set subsurfaceRadius(e){}get subsurfaceRadiusScale(){return this._material.subSurface.scatteringDiffusionProfile??t.Color3.White()}set subsurfaceRadiusScale(e){this._material.subSurface.scatteringDiffusionProfile=e}set subsurfaceScatterAnisotropy(e){}isTranslucent(){return this.transmissionWeight>0||this.subsurfaceWeight>0}configureFuzz(){this._material.sheen.isEnabled=!0,this._material.sheen.useRoughnessFromMainTexture=!1,this._material.sheen.albedoScaling=!0}set fuzzWeight(e){this._material.sheen.isEnabled=!0,this._material.sheen.intensity=e}set fuzzWeightTexture(e){this._material.sheen.texture||(this._material.sheen.texture=e)}set fuzzColor(e){this._material.sheen.isEnabled=!0,this._material.sheen.color=e}set fuzzColorTexture(e){this._material.sheen.texture=e}set fuzzRoughness(e){this._material.sheen.isEnabled=!0,this._material.sheen.roughness=e}set fuzzRoughnessTexture(e){this._material.sheen.isEnabled=!0,this._material.sheen.textureRoughness=e}set specularRoughnessAnisotropy(e){this._material.anisotropy.isEnabled=!0,this._material.anisotropy.intensity=e}get specularRoughnessAnisotropy(){return this._material.anisotropy.intensity}set geometryTangentAngle(e){this._material.anisotropy.isEnabled=!0,this._material.anisotropy.angle=e}set geometryTangentTexture(e){this._material.anisotropy.isEnabled=!0,this._material.anisotropy.texture=e}get geometryTangentTexture(){return this._material.anisotropy.texture}configureGltfStyleAnisotropy(e=!0){}set thinFilmWeight(e){this._material.iridescence.isEnabled=e>0,this._material.iridescence.intensity=e}set thinFilmIor(e){this._material.iridescence.indexOfRefraction=e}set thinFilmThicknessMinimum(e){this._material.iridescence.minimumThickness=e}set thinFilmThicknessMaximum(e){this._material.iridescence.maximumThickness=e}set thinFilmWeightTexture(e){this._material.iridescence.texture=e}set thinFilmThicknessTexture(e){this._material.iridescence.thicknessTexture=e}set unlit(e){this._material.unlit=e}set geometryOpacity(e){this._material.alpha=e}get geometryOpacity(){return this._material.alpha}set geometryNormalTexture(e){this._material.bumpTexture=e,this._material.forceIrradianceInFragment=!0}get geometryNormalTexture(){return this._material.bumpTexture}setNormalMapInversions(e,t){this._material.invertNormalMapX=e,this._material.invertNormalMapY=t}set geometryCoatNormalTexture(e){this._material.clearCoat.isEnabled=!0,this._material.clearCoat.bumpTexture=e}get geometryCoatNormalTexture(){return this._material.clearCoat.bumpTexture}set geometryCoatNormalTextureScale(e){this._material.clearCoat.bumpTexture&&(this._material.clearCoat.bumpTexture.level=e)}}])}]);