@uptimizr/dashboard 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +9 -9
- package/out/__next._full.txt +10 -10
- package/out/__next._tree.txt +1 -1
- package/out/_next/static/chunks/{209sxygecny37.js → 0-6mdj5wxsfid.js} +1 -1
- package/out/_next/static/chunks/{0ybs1u66q26su.js → 0-qthfqvm1jyj.js} +1 -1
- package/out/_next/static/chunks/01viyuclp2gm9.js +1 -0
- package/out/_next/static/chunks/02aym4t2hgo5c.js +1 -0
- package/out/_next/static/chunks/02ic9b5ejugow.js +1 -0
- package/out/_next/static/chunks/03p70i4c7qt0v.js +1 -0
- package/out/_next/static/chunks/{33i36o_l69sm5.js → 03pjr-ivdicng.js} +1 -1
- package/out/_next/static/chunks/041a06-lxipy5.js +1 -0
- package/out/_next/static/chunks/{1zm6eo861i3c8.js → 06dzkwetqis-5.js} +1 -1
- package/out/_next/static/chunks/{3ipx7xbxchsq9.js → 06kvanz5-fo52.js} +1 -1
- package/out/_next/static/chunks/07y8ke_iy59dn.js +1 -0
- package/out/_next/static/chunks/09jukc-4jl735.js +1 -0
- package/out/_next/static/chunks/{35sne1llxnc-m.js → 09khmdgez3t0a.js} +18 -18
- package/out/_next/static/chunks/{02qk_wmkf9at-.js → 0_dca4876jshu.js} +38 -38
- package/out/_next/static/chunks/0axcgnl5qzr6e.js +1 -0
- package/out/_next/static/chunks/0ay4fjomijs3n.js +1 -0
- package/out/_next/static/chunks/0c7fy79wlccat.js +1 -0
- package/out/_next/static/chunks/0cqe4-l3imct3.js +1 -0
- package/out/_next/static/chunks/0cssvelju788j.js +1 -0
- package/out/_next/static/chunks/{0-_j1khfoib6l.js → 0ctain5xq2wsd.js} +12 -12
- package/out/_next/static/chunks/{22yqh0zlo_vwr.js → 0df-dr3otg_4w.js} +1 -1
- package/out/_next/static/chunks/{26y9sv8_-ykxf.js → 0endw997j7ao9.js} +1 -1
- package/out/_next/static/chunks/0ev_pbit1v_qg.js +1 -0
- package/out/_next/static/chunks/0eyw9oiwipywb.js +1 -0
- package/out/_next/static/chunks/0fkzbuo1tex4u.js +1 -0
- package/out/_next/static/chunks/0govas0u0t4w3.js +1 -0
- package/out/_next/static/chunks/{0grasqqf5dw7r.js → 0guzhnususp3-.js} +2 -2
- package/out/_next/static/chunks/0h7bq_ysu17q7.js +3 -0
- package/out/_next/static/chunks/0hneh_3xzlo28.js +1 -0
- package/out/_next/static/chunks/0iaqwme19z_0s.js +1 -0
- package/out/_next/static/chunks/0ibmar10xndpn.js +1 -0
- package/out/_next/static/chunks/0ii8mqoteppgh.js +11 -0
- package/out/_next/static/chunks/{1uh9zgsy69g92.js → 0ip6v64di_l6x.js} +1 -1
- package/out/_next/static/chunks/{267prao6fyt22.js → 0ixymgjgz3grn.js} +10 -10
- package/out/_next/static/chunks/0kuah8g7lt5ox.js +1 -0
- package/out/_next/static/chunks/0l3k4j19vxm17.js +1 -0
- package/out/_next/static/chunks/0l6hg0ohwh9-m.js +1 -0
- package/out/_next/static/chunks/0m4um4ylhlfan.js +1 -0
- package/out/_next/static/chunks/0mj837d4h0ddq.js +1 -0
- package/out/_next/static/chunks/0nyn-f4905o91.js +1 -0
- package/out/_next/static/chunks/0og6i9rsgkuif.js +1 -0
- package/out/_next/static/chunks/0os1x-fxzgnxs.js +1 -0
- package/out/_next/static/chunks/0otnra7mp0hog.js +1 -0
- package/out/_next/static/chunks/{1gttu-n9am66k.js → 0oyf2xzv8ofkk.js} +21 -21
- package/out/_next/static/chunks/0qvsy3gcqjm12.js +1 -0
- package/out/_next/static/chunks/{1qg1l7t00nyib.js → 0rl4ddh2vgxyl.js} +14 -14
- package/out/_next/static/chunks/0rwpttmsmqvn_.js +1 -0
- package/out/_next/static/chunks/0so3wjp9ch93y.js +1 -0
- package/out/_next/static/chunks/{43fp64xnfy646.js → 0te4g160_rb5d.js} +1 -1
- package/out/_next/static/chunks/0uby-zvu799ef.js +1 -0
- package/out/_next/static/chunks/{3h6akt2uu05ku.js → 0uvn0op2mlr2u.js} +12 -12
- package/out/_next/static/chunks/0vwj4hxjm0igv.js +1 -0
- package/out/_next/static/chunks/{1m9zc5gm-327d.js → 0w7c30w07uct2.js} +10 -10
- package/out/_next/static/chunks/0wm38z3u2133a.js +1 -0
- package/out/_next/static/chunks/0y7yk5al7_p8q.js +4 -0
- package/out/_next/static/chunks/0ycr0gi6fn6bt.js +1 -0
- package/out/_next/static/chunks/0ywvahq9t0tki.js +1 -0
- package/out/_next/static/chunks/0zh6nslagkby-.js +1 -0
- package/out/_next/static/chunks/{3vbamaoiuk9yj.js → 0zo8xa0nej3ex.js} +1 -1
- package/out/_next/static/chunks/{2of8q0kaeqpf0.js → 0zsir95gpf3xw.js} +1 -1
- package/out/_next/static/chunks/0zu6ryyj0ig-j.js +3 -0
- package/out/_next/static/chunks/{2c721vfva711t.js → 1-jv8k10q_1uw.js} +1 -1
- package/out/_next/static/chunks/1-s5ioie9a94e.js +1 -0
- package/out/_next/static/chunks/{13zcn4lv0qj76.js → 1-yos1h0qws5e.js} +11 -11
- package/out/_next/static/chunks/10o7brc3x027r.js +1 -0
- package/out/_next/static/chunks/{060iult6f68_e.js → 10pae4gb9i929.js} +29 -29
- package/out/_next/static/chunks/13p93itm8a3ym.js +1 -0
- package/out/_next/static/chunks/{0btmk0wmekl02.js → 147s8i_lktp4_.js} +2 -2
- package/out/_next/static/chunks/{3njwfothmmg7u.js → 14tgo5xt_3j4w.js} +1 -1
- package/out/_next/static/chunks/1699hx-vlak0n.js +22 -0
- package/out/_next/static/chunks/16d6n9e77rqti.js +1 -0
- package/out/_next/static/chunks/{3zs7l4362msjd.js → 16f3d5dv83rsr.js} +1 -1
- package/out/_next/static/chunks/16i_tpwn_cmr-.js +1 -0
- package/out/_next/static/chunks/{1by60_b14x-3o.js → 16rfr165nbha0.js} +1 -1
- package/out/_next/static/chunks/{0zqgq0lwtz9tn.js → 16sl51pvzo4tf.js} +1 -1
- package/out/_next/static/chunks/{2n-pveub8b_5t.js → 1760s-32qpwgg.js} +1 -1
- package/out/_next/static/chunks/{1u8snlm6a7uhi.js → 18kq07c5xy_4g.js} +4 -4
- package/out/_next/static/chunks/{1rcdimhu0qhlu.js → 190tbzt861ao3.js} +39 -39
- package/out/_next/static/chunks/19bhv6cupnnyj.js +1 -0
- package/out/_next/static/chunks/1_14pn2wwebxy.js +1 -0
- package/out/_next/static/chunks/{3huu0tqmxwowu.js → 1_kikmeubh0wq.js} +30 -30
- package/out/_next/static/chunks/1ay3z6agelsvz.js +1 -0
- package/out/_next/static/chunks/1b-fi3bfmpe31.js +1 -0
- package/out/_next/static/chunks/1bae3tqv53x9_.js +1 -0
- package/out/_next/static/chunks/1bf421g4peccx.js +2 -0
- package/out/_next/static/chunks/1bfony5qsc5tp.js +1 -0
- package/out/_next/static/chunks/{1e8_jl2cxd3rp.js → 1ddt0ot7kl8vq.js} +40 -40
- package/out/_next/static/chunks/1emz2vjkgck4z.js +1 -0
- package/out/_next/static/chunks/1eogzzw8i1wsg.js +1 -0
- package/out/_next/static/chunks/{2apihn9ra2ufp.js → 1g9p2h1-31q8o.js} +1 -1
- package/out/_next/static/chunks/1gcz1k1v1woca.js +1 -0
- package/out/_next/static/chunks/{3v-0c2aj6c0on.js → 1h8lyicgqhpxa.js} +1 -1
- package/out/_next/static/chunks/{3772oce1n3t_g.js → 1hot663akaepl.js} +1 -1
- package/out/_next/static/chunks/1i7pgl3ks5ye0.js +1 -0
- package/out/_next/static/chunks/{2sys9nj8lo3uk.js → 1i8sk_qgpdjhs.js} +1 -1
- package/out/_next/static/chunks/{30bhz7czzs4mf.js → 1kk3ct7pkpf3b.js} +1 -1
- package/out/_next/static/chunks/{33hp-khdfohdq.js → 1kq9o8del67le.js} +1 -1
- package/out/_next/static/chunks/{3d-i_skta_wes.js → 1l7tzyx2mumlq.js} +1 -1
- package/out/_next/static/chunks/1n_uwed9o--go.js +1 -0
- package/out/_next/static/chunks/1o351eldttogn.js +1 -0
- package/out/_next/static/chunks/1ogs4_aj84bfn.js +1 -0
- package/out/_next/static/chunks/{0sw-8gxbg4x0l.js → 1p206txlluipi.js} +18 -18
- package/out/_next/static/chunks/1p2bt1w845v6c.js +1 -0
- package/out/_next/static/chunks/1p3rgz4aef1gk.js +1 -0
- package/out/_next/static/chunks/{41b5gpyqbj58m.js → 1qcgdx9yl0gfx.js} +4 -4
- package/out/_next/static/chunks/1ql3mm2w5r-m8.js +1 -0
- package/out/_next/static/chunks/1qvcyuyshi3ll.js +53 -0
- package/out/_next/static/chunks/1r0yyg5a_0knc.js +1 -0
- package/out/_next/static/chunks/{15o4_2t-l3rj5.js → 1sa6qiidtcyk2.js} +1 -1
- package/out/_next/static/chunks/1t-9vrdrsi8le.js +1 -0
- package/out/_next/static/chunks/{1rlfg62jxqj3z.js → 1t97zo0tlpbnz.js} +1 -1
- package/out/_next/static/chunks/1te2tinzqnwck.js +1 -0
- package/out/_next/static/chunks/{3sa_hlx3konc7.js → 1trt-m2nrck0v.js} +1 -1
- package/out/_next/static/chunks/1ty9jpwr3o_st.js +1 -0
- package/out/_next/static/chunks/1u6w6veke8rze.js +1 -0
- package/out/_next/static/chunks/1u900urmrbv73.js +1 -0
- package/out/_next/static/chunks/{3_dgblylldcgb.js → 1vz2gd8k74lpi.js} +1 -1
- package/out/_next/static/chunks/1wkpl9bfb0wn7.js +1 -0
- package/out/_next/static/chunks/1wrly9a9c3teq.js +1 -0
- package/out/_next/static/chunks/1x0m05155yy4e.js +1 -0
- package/out/_next/static/chunks/{3xl-op0hwxytg.js → 1xf1wfow43ekc.js} +5 -5
- package/out/_next/static/chunks/1y10o40v9odam.js +1 -0
- package/out/_next/static/chunks/{2s6kpclh6ie7o.js → 1y_zykt3fpen4.js} +29 -29
- package/out/_next/static/chunks/1ye6xtbm16pg4.js +1 -0
- package/out/_next/static/chunks/{1t5oynmttpfsw.js → 1z6_57k5h31u7.js} +1 -1
- package/out/_next/static/chunks/{0lep3_bqwfuin.js → 1zboqft0h6mop.js} +1 -1
- package/out/_next/static/chunks/{43v4y2gu5z9_h.js → 1zr3c351x0ri5.js} +1 -1
- package/out/_next/static/chunks/2-5p2lcedvrli.js +1 -0
- package/out/_next/static/chunks/206hxrq60f1_e.js +1 -0
- package/out/_next/static/chunks/20r05k3-studj.js +1 -0
- package/out/_next/static/chunks/22gs24kj2du56.js +1 -0
- package/out/_next/static/chunks/22x5pd1gyp7sf.js +1 -0
- package/out/_next/static/chunks/{2a07so920b6aa.js → 22z-2t_yp1jzs.js} +1 -1
- package/out/_next/static/chunks/{30n4y_uu8chbh.js → 23hmfdw6z5zfy.js} +30 -30
- package/out/_next/static/chunks/23y1krqnc-8sm.js +1 -0
- package/out/_next/static/chunks/{3f8qelpscqfym.js → 24tbkj1qkux88.js} +2 -2
- package/out/_next/static/chunks/{2ao-3jzz7yw3p.js → 26cmri51v7497.js} +11 -11
- package/out/_next/static/chunks/27jalbk9zu-2b.js +1 -0
- package/out/_next/static/chunks/285d2s9096ryc.js +1 -0
- package/out/_next/static/chunks/296ykep2nvppv.js +1 -0
- package/out/_next/static/chunks/29nehg5cal-ug.js +1 -0
- package/out/_next/static/chunks/2_a56_k3x7to6.js +1 -0
- package/out/_next/static/chunks/2a-0l6eb1blh3.js +4 -0
- package/out/_next/static/chunks/{3qn6r8-0u6dij.js → 2a31-txop1jzg.js} +38 -38
- package/out/_next/static/chunks/2bse5vll1o-x0.js +1 -0
- package/out/_next/static/chunks/2ct40spu9wfj7.js +1 -0
- package/out/_next/static/chunks/{2kok6zedeeltw.js → 2ept01b7t-e03.js} +1 -1
- package/out/_next/static/chunks/{3w59kt5ztyvoq.js → 2ey5dqelco_g5.js} +1 -1
- package/out/_next/static/chunks/2fd_009hw7y0m.js +1 -0
- package/out/_next/static/chunks/{0fd-0i1yt23kz.js → 2ftz9kaxrsgxh.js} +1 -1
- package/out/_next/static/chunks/2gefdnozflr7p.js +1 -0
- package/out/_next/static/chunks/{2izok2otbk8-2.js → 2gs-u1n5uv7iz.js} +37 -37
- package/out/_next/static/chunks/{2r96kyeehsji9.js → 2hizqql79u-54.js} +1 -1
- package/out/_next/static/chunks/2iqf2dpdg_vfl.js +1 -0
- package/out/_next/static/chunks/2j7z127s_ycjd.js +1 -0
- package/out/_next/static/chunks/2kax7uslfxdnx.js +31 -0
- package/out/_next/static/chunks/2lh_w9rzy3vek.js +1 -0
- package/out/_next/static/chunks/{0rracz73p38mo.js → 2ln1na26qwp-3.js} +9 -9
- package/out/_next/static/chunks/2n08l1q5o_27e.js +1 -0
- package/out/_next/static/chunks/2n7268gyd9z-6.js +1 -0
- package/out/_next/static/chunks/2nq9cgjmtqwvp.js +1 -0
- package/out/_next/static/chunks/{005bbq_px7lke.js → 2oj8qc_pv14nk.js} +2 -2
- package/out/_next/static/chunks/2q24e72-olbe8.js +1 -0
- package/out/_next/static/chunks/2qc4hscs26cro.js +1 -0
- package/out/_next/static/chunks/{0gf-ztg86zd80.js → 2qe46redkqhfg.js} +1 -1
- package/out/_next/static/chunks/2qmfe0mqw150h.js +1 -0
- package/out/_next/static/chunks/2qtc0nbl_521e.js +1 -0
- package/out/_next/static/chunks/{0e1jfrmioeuws.js → 2rofu6gu1xzuq.js} +1 -1
- package/out/_next/static/chunks/2tdi94rkq739i.js +1 -0
- package/out/_next/static/chunks/2u_2sacqa9xa7.js +1 -0
- package/out/_next/static/chunks/2ujqz6088shm5.js +1 -0
- package/out/_next/static/chunks/{1l_3oidssbhns.js → 2urh9qafp3fiw.js} +17 -17
- package/out/_next/static/chunks/{05v-nubi896jg.js → 2v06n4z8wsmn9.js} +1 -1
- package/out/_next/static/chunks/2vp-5skbk1nfu.js +1 -0
- package/out/_next/static/chunks/2vu973j_n6cpx.js +1 -0
- package/out/_next/static/chunks/{37cnbm5ft1mqf.js → 2wwra56rehfcj.js} +1 -1
- package/out/_next/static/chunks/2xpwr97h2asal.js +1 -0
- package/out/_next/static/chunks/3000-0b8n9t_2.js +1 -0
- package/out/_next/static/chunks/30t3203d7p2da.js +1 -0
- package/out/_next/static/chunks/31kto7-dxkt3z.js +1 -0
- package/out/_next/static/chunks/{2lsvk7xcfkarc.js → 32oflcl79d8mu.js} +1 -1
- package/out/_next/static/chunks/32ovg81ae0l03.js +1 -0
- package/out/_next/static/chunks/{0z9erbl3llr_b.js → 331kthnvoma7n.js} +16 -16
- package/out/_next/static/chunks/{0q75860p8u_ii.js → 337kn1mn34rc6.js} +1 -1
- package/out/_next/static/chunks/{2tc3e-iqv71y_.js → 33xug8kf0-a1o.js} +1 -1
- package/out/_next/static/chunks/{1-ogak5u00kwa.js → 34dcb7_flbrvo.js} +1 -1
- package/out/_next/static/chunks/34zotyeqrz_nq.js +1 -0
- package/out/_next/static/chunks/351wsmi75l8db.js +1 -0
- package/out/_next/static/chunks/{15jlgfcaeaki9.js → 36yv-ialtpx98.js} +1 -1
- package/out/_next/static/chunks/37hwasxtee5e0.js +1 -0
- package/out/_next/static/chunks/37t0iclgxes05.js +1 -0
- package/out/_next/static/chunks/{1q4lkgxfnqnew.js → 37xnvnx1jxfaf.js} +1 -1
- package/out/_next/static/chunks/{2z_iab7ozohhq.js → 38w74ixqt-9co.js} +16 -16
- package/out/_next/static/chunks/{2h249uvhh2sij.js → 39t2x_9zd2rst.js} +10 -10
- package/out/_next/static/chunks/{0thw099xk3_0p.js → 39v73timmzwny.js} +2 -2
- package/out/_next/static/chunks/{2n3xu_wbvtj7h.js → 3_xqc3658d8sw.js} +12 -12
- package/out/_next/static/chunks/3ba8eudvlczwe.js +1 -0
- package/out/_next/static/chunks/{2q6l-xdqzgmpf.js → 3buezhxqc8n6n.js} +1 -1
- package/out/_next/static/chunks/{1zt1xxovnjhkm.js → 3c5iwwj-fhbue.js} +1 -1
- package/out/_next/static/chunks/{2urx6fow8c8c9.js → 3d8ot2tw6yqfq.js} +12 -12
- package/out/_next/static/chunks/3dc057ffe7ij-.js +1 -0
- package/out/_next/static/chunks/3djnlzwj9869o.js +1 -0
- package/out/_next/static/chunks/{2y8i7_nxm4r05.js → 3fuqxjjf8o1v9.js} +5 -5
- package/out/_next/static/chunks/{0z004fn14pbcu.js → 3gt6rzg9qw-an.js} +1 -1
- package/out/_next/static/chunks/{1tgj55b305g4h.js → 3h_05w5j8x538.js} +1 -1
- package/out/_next/static/chunks/{3j9xvdz55bi4p.js → 3hkhd1_k8xohv.js} +33 -33
- package/out/_next/static/chunks/{42ymanq326mo7.js → 3ijcc5tfisfnj.js} +1 -1
- package/out/_next/static/chunks/3j0dbpd9zop3p.js +1 -0
- package/out/_next/static/chunks/{1zkd8v-qka--j.js → 3ju83xk-ca7ma.js} +21 -21
- package/out/_next/static/chunks/3jxhl4apmhbm1.js +13 -0
- package/out/_next/static/chunks/{302qk2fjdrthp.js → 3la99oz_0p0r6.js} +5 -5
- package/out/_next/static/chunks/3n1b34fd5fdrh.js +1 -0
- package/out/_next/static/chunks/{2j120dkh7q3uf.js → 3nq_hq4x3rn3r.js} +1 -1
- package/out/_next/static/chunks/3pgb1kkqrdl9t.js +1 -0
- package/out/_next/static/chunks/3pik_-jj-zkfl.js +1 -0
- package/out/_next/static/chunks/{2w99knknr5i8c.js → 3q38kdbzd2nbd.js} +1 -1
- package/out/_next/static/chunks/3q5zl4ks17au2.js +1 -0
- package/out/_next/static/chunks/{2uo6vm7mfgrbf.js → 3qr10445lte-n.js} +1 -1
- package/out/_next/static/chunks/3r-8bnguvxsyo.js +1 -0
- package/out/_next/static/chunks/3sg56j8boe-3o.js +1 -0
- package/out/_next/static/chunks/{2q8yg63br2jc9.js → 3u7zj1-jdg781.js} +1 -1
- package/out/_next/static/chunks/{32_c4mbb6j1l6.js → 3wj5dmf6cywz8.js} +22 -22
- package/out/_next/static/chunks/{3oqxl46ukaojj.js → 3wr_oijfsq8lr.js} +11 -11
- package/out/_next/static/chunks/3xu0dh1ikzwj2.js +1 -0
- package/out/_next/static/chunks/3y5tpixt23-fl.js +1 -0
- package/out/_next/static/chunks/40gjf-_jt8upu.js +5 -0
- package/out/_next/static/chunks/41f12o_5lf-i9.js +1 -0
- package/out/_next/static/chunks/42ma8lqduohlc.js +1 -0
- package/out/_next/static/chunks/{0ai0zgbgjqb92.js → 43usshq2nc125.js} +1 -1
- package/out/_next/static/chunks/{0hajwk2yd-rwr.js → 44bl4ufopbmyh.js} +1 -1
- package/out/_next/static/chunks/44iutzkw9r21x.js +1 -0
- package/out/_next/static/chunks/turbopack-1xrxa3noq196-.js +1 -0
- package/out/_not-found/__next._full.txt +8 -8
- package/out/_not-found/__next._not-found.__PAGE__.txt +7 -7
- package/out/_not-found/__next._tree.txt +1 -1
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +8 -8
- package/out/index.html +1 -1
- package/out/index.txt +10 -10
- package/package.json +9 -9
- package/out/_next/static/chunks/00fbhtmui-yxg.js +0 -1
- package/out/_next/static/chunks/017pn-pen381_.js +0 -1
- package/out/_next/static/chunks/01vov6inx1zzt.js +0 -1
- package/out/_next/static/chunks/03bd5plut08tg.js +0 -1
- package/out/_next/static/chunks/03dwfqmo73w_z.js +0 -1
- package/out/_next/static/chunks/03sn4419dam-h.js +0 -5
- package/out/_next/static/chunks/05ere0-228syf.js +0 -1
- package/out/_next/static/chunks/05h8u5lrypn5m.js +0 -1
- package/out/_next/static/chunks/05z79zh625ezu.js +0 -1
- package/out/_next/static/chunks/08lvtnv7b1cxp.js +0 -1
- package/out/_next/static/chunks/0_v2luu_qmeid.js +0 -1
- package/out/_next/static/chunks/0boov9mwycanf.js +0 -1
- package/out/_next/static/chunks/0d8x8m2x6ca_m.js +0 -1
- package/out/_next/static/chunks/0dmrdrwtd093b.js +0 -1
- package/out/_next/static/chunks/0e7nlxmneb2j_.js +0 -1
- package/out/_next/static/chunks/0es97pusfxupl.js +0 -1
- package/out/_next/static/chunks/0fxdyvb1w23d1.js +0 -1
- package/out/_next/static/chunks/0fxhc24djjcgq.js +0 -1
- package/out/_next/static/chunks/0hk1wg7h4araz.js +0 -1
- package/out/_next/static/chunks/0j74ipw4fps-n.js +0 -1
- package/out/_next/static/chunks/0kj-vckdn7t5p.js +0 -1
- package/out/_next/static/chunks/0lbs5xdyjuzuo.js +0 -1
- package/out/_next/static/chunks/0mp0jh1gj7290.js +0 -1
- package/out/_next/static/chunks/0ngpoj2g5i4kz.js +0 -1
- package/out/_next/static/chunks/0nhljhguceh66.js +0 -1
- package/out/_next/static/chunks/0p6z73afb9dj2.js +0 -1
- package/out/_next/static/chunks/0p9zfmidzqkps.js +0 -1
- package/out/_next/static/chunks/0sx-6rf3eteqn.js +0 -1
- package/out/_next/static/chunks/0u85f0dhb4i8e.js +0 -1
- package/out/_next/static/chunks/0uk7kigzm4vi2.js +0 -31
- package/out/_next/static/chunks/0ulufxnsrou61.js +0 -1
- package/out/_next/static/chunks/0xa9dyg6ezzyd.js +0 -2
- package/out/_next/static/chunks/0xvrfvur0p534.js +0 -1
- package/out/_next/static/chunks/0ydfhk-p6zvm0.js +0 -1
- package/out/_next/static/chunks/0zcsxvcvog9ue.js +0 -1
- package/out/_next/static/chunks/10_5p5-xf2aoo.js +0 -1
- package/out/_next/static/chunks/118qlrzdwpfmo.js +0 -1
- package/out/_next/static/chunks/11km5p4gd0ut4.js +0 -1
- package/out/_next/static/chunks/120rl4l29q9xs.js +0 -1
- package/out/_next/static/chunks/129m5i93ltoym.js +0 -1
- package/out/_next/static/chunks/12n73o884lyyl.js +0 -1
- package/out/_next/static/chunks/175st2ogkg_1o.js +0 -1
- package/out/_next/static/chunks/19rsodtu91ja_.js +0 -1
- package/out/_next/static/chunks/1a2ouhup611bz.js +0 -1
- package/out/_next/static/chunks/1cyq7i39885sl.js +0 -1
- package/out/_next/static/chunks/1d9it6yocgt54.js +0 -1
- package/out/_next/static/chunks/1dp1s1t-y7gal.js +0 -1
- package/out/_next/static/chunks/1dr7gh6xgypl8.js +0 -1
- package/out/_next/static/chunks/1dt30s_sp8415.js +0 -1
- package/out/_next/static/chunks/1f1rek_fxk3of.js +0 -1
- package/out/_next/static/chunks/1f2mna0k5efeq.js +0 -1
- package/out/_next/static/chunks/1gfz3sxwkkg3d.js +0 -1
- package/out/_next/static/chunks/1gr35qeguuws0.js +0 -1
- package/out/_next/static/chunks/1imi0xwi9hd99.js +0 -1
- package/out/_next/static/chunks/1ka5v5zu0cstt.js +0 -1
- package/out/_next/static/chunks/1n9nhz-6azcp3.js +0 -3
- package/out/_next/static/chunks/1ncqwe81t_9_x.js +0 -1
- package/out/_next/static/chunks/1nix_lulkpklo.js +0 -1
- package/out/_next/static/chunks/1ntqovuz2c217.js +0 -1
- package/out/_next/static/chunks/1pgs-98tfkq9_.js +0 -1
- package/out/_next/static/chunks/1q2z0aeopo8t8.js +0 -1
- package/out/_next/static/chunks/1ses023uud001.js +0 -1
- package/out/_next/static/chunks/1t9i20i5-f8ze.js +0 -1
- package/out/_next/static/chunks/1ug4k-1zhr63a.js +0 -1
- package/out/_next/static/chunks/1vrpzlif-z_p0.js +0 -1
- package/out/_next/static/chunks/1vurgl6oz2qey.js +0 -17
- package/out/_next/static/chunks/1w-qc09n9ijtq.js +0 -1
- package/out/_next/static/chunks/1ycqxcht6x54p.js +0 -1
- package/out/_next/static/chunks/1zj4307ugq0qz.js +0 -1
- package/out/_next/static/chunks/1zm52cjrfrq7c.js +0 -1
- package/out/_next/static/chunks/1zp9363yfhpom.js +0 -1
- package/out/_next/static/chunks/2-3hk_db5fpok.js +0 -1
- package/out/_next/static/chunks/2-bv9a_0zgw1f.js +0 -1
- package/out/_next/static/chunks/216uiih3_vdfd.js +0 -1
- package/out/_next/static/chunks/21kfpd_bityxt.js +0 -1
- package/out/_next/static/chunks/24ecas0m9tao7.js +0 -3
- package/out/_next/static/chunks/24pq9210rng3f.js +0 -1
- package/out/_next/static/chunks/26skkagvj1z96.js +0 -1
- package/out/_next/static/chunks/2701xfv_07wz_.js +0 -1
- package/out/_next/static/chunks/271333m8y3k0e.js +0 -1
- package/out/_next/static/chunks/29rkmguzky-bp.js +0 -1
- package/out/_next/static/chunks/2a2oy8ryz2tsk.js +0 -1
- package/out/_next/static/chunks/2apnpj0-fs9ks.js +0 -1
- package/out/_next/static/chunks/2b481pitl4k85.js +0 -1
- package/out/_next/static/chunks/2bettxaqt3d2p.js +0 -1
- package/out/_next/static/chunks/2d2kl_m64j9cb.js +0 -1
- package/out/_next/static/chunks/2droqjmvmgj13.js +0 -1
- package/out/_next/static/chunks/2dxbvwbbgpzoq.js +0 -1
- package/out/_next/static/chunks/2eqbsut829r5l.js +0 -1
- package/out/_next/static/chunks/2f3_mzxjh3gso.js +0 -1
- package/out/_next/static/chunks/2fsde0jwi5qtt.js +0 -1
- package/out/_next/static/chunks/2j2ynchpqh34-.js +0 -1
- package/out/_next/static/chunks/2kj6pzs_wap1v.js +0 -1
- package/out/_next/static/chunks/2lnj9jruy4nrv.js +0 -1
- package/out/_next/static/chunks/2ofwtw6p08sfz.js +0 -1
- package/out/_next/static/chunks/2phl5ta4iim7l.js +0 -12
- package/out/_next/static/chunks/2r5qgieqldcd9.js +0 -1
- package/out/_next/static/chunks/2r7y401cvjc1s.js +0 -1
- package/out/_next/static/chunks/2rmc6ru7mc-kg.js +0 -1
- package/out/_next/static/chunks/2w2k1gveljyb7.js +0 -1
- package/out/_next/static/chunks/2w_ptlw-ad8-9.js +0 -4
- package/out/_next/static/chunks/2ws1s9d52ayv8.js +0 -1
- package/out/_next/static/chunks/2x7enks3ydgai.js +0 -1
- package/out/_next/static/chunks/2ydub0t01728d.js +0 -1
- package/out/_next/static/chunks/3-m_vzabs1uez.js +0 -1
- package/out/_next/static/chunks/3527r3jo5fj3i.js +0 -1
- package/out/_next/static/chunks/355dg8yaa94hr.js +0 -1
- package/out/_next/static/chunks/35ntbr_c-yx44.js +0 -1
- package/out/_next/static/chunks/36enkx1skkv2-.js +0 -4
- package/out/_next/static/chunks/38xdo3cifphut.js +0 -1
- package/out/_next/static/chunks/3beawo-qwuk8k.js +0 -1
- package/out/_next/static/chunks/3cj_6sl9kr3e9.js +0 -1
- package/out/_next/static/chunks/3df_l2we755bb.js +0 -1
- package/out/_next/static/chunks/3eve5y7fpzx2h.js +0 -1
- package/out/_next/static/chunks/3ewgyb4y19w-3.js +0 -1
- package/out/_next/static/chunks/3f3789eh18_oy.js +0 -1
- package/out/_next/static/chunks/3g3-e9m1en45q.js +0 -1
- package/out/_next/static/chunks/3i239y-1hbkm-.js +0 -1
- package/out/_next/static/chunks/3kp8qmhoi24oz.js +0 -1
- package/out/_next/static/chunks/3ksq69yq-40_r.js +0 -1
- package/out/_next/static/chunks/3qye1lytea2i8.js +0 -1
- package/out/_next/static/chunks/3rlp9yr75liz7.js +0 -1
- package/out/_next/static/chunks/3tyo643l62h3m.js +0 -1
- package/out/_next/static/chunks/3tz2tpqa9uvwm.js +0 -1
- package/out/_next/static/chunks/3utpc-fc6_y0f.js +0 -1
- package/out/_next/static/chunks/3v6nxa28rxngq.js +0 -1
- package/out/_next/static/chunks/3vv99btjc-mky.js +0 -1
- package/out/_next/static/chunks/3x02lxdo28u9i.js +0 -1
- package/out/_next/static/chunks/3ydnxyc4rvad_.js +0 -1
- package/out/_next/static/chunks/3ylg4gfetwgxw.js +0 -1
- package/out/_next/static/chunks/3zdtteq-r2fs5.js +0 -62
- package/out/_next/static/chunks/3zkwt0gybqtgm.js +0 -1
- package/out/_next/static/chunks/40etabvml_71y.js +0 -1
- package/out/_next/static/chunks/417jkzz0slv9m.js +0 -1
- package/out/_next/static/chunks/41u2-5jayyajf.js +0 -22
- package/out/_next/static/chunks/42gcpy51w7lk1.js +0 -1
- package/out/_next/static/chunks/44cer242u-f8v.js +0 -1
- package/out/_next/static/chunks/44zi0gl0a6a8w.js +0 -1
- package/out/_next/static/chunks/turbopack-0n2o5_bkskckx.js +0 -1
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → 4r0L0ZMJeBwOJCVDsvvZ4}/_buildManifest.js +0 -0
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → 4r0L0ZMJeBwOJCVDsvvZ4}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → 4r0L0ZMJeBwOJCVDsvvZ4}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,5721,47727,e=>{"use strict";var a=e.i(25044);let i="clipPlaneFragmentDeclaration",o=`#ifdef CLIPPLANE
|
|
2
2
|
varying float fClipDistance;
|
|
3
3
|
#endif
|
|
4
4
|
#ifdef CLIPPLANE2
|
|
@@ -16,7 +16,7 @@ varying float fClipDistance5;
|
|
|
16
16
|
#ifdef CLIPPLANE6
|
|
17
17
|
varying float fClipDistance6;
|
|
18
18
|
#endif
|
|
19
|
-
`;a.ShaderStore.IncludesShadersStore[i]||(a.ShaderStore.IncludesShadersStore[i]=o),e.s(["clipPlaneFragmentDeclaration",0,{name:i,shader:o}],
|
|
19
|
+
`;a.ShaderStore.IncludesShadersStore[i]||(a.ShaderStore.IncludesShadersStore[i]=o),e.s(["clipPlaneFragmentDeclaration",0,{name:i,shader:o}],5721);let t="clipPlaneFragment",r=`#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6)
|
|
20
20
|
if (false) {}
|
|
21
21
|
#endif
|
|
22
22
|
#ifdef CLIPPLANE
|
|
@@ -43,7 +43,7 @@ else if (fClipDistance5>0.0)
|
|
|
43
43
|
else if (fClipDistance6>0.0)
|
|
44
44
|
{discard;}
|
|
45
45
|
#endif
|
|
46
|
-
`;a.ShaderStore.IncludesShadersStore[t]||(a.ShaderStore.IncludesShadersStore[t]=r),e.s(["clipPlaneFragment",0,{name:t,shader:r}],
|
|
46
|
+
`;a.ShaderStore.IncludesShadersStore[t]||(a.ShaderStore.IncludesShadersStore[t]=r),e.s(["clipPlaneFragment",0,{name:t,shader:r}],47727)},68767,78133,e=>{"use strict";var a=e.i(25044);let i="fogFragmentDeclaration",o=`#ifdef FOG
|
|
47
47
|
#define FOGMODE_NONE 0.
|
|
48
48
|
#define FOGMODE_EXP 1.
|
|
49
49
|
#define FOGMODE_EXP2 2.
|
|
@@ -58,23 +58,23 @@ else if (FOGMODE_EXP2==vFogInfos.x)
|
|
|
58
58
|
{fogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity);}
|
|
59
59
|
return clamp(fogCoeff,0.0,1.0);}
|
|
60
60
|
#endif
|
|
61
|
-
`;a.ShaderStore.IncludesShadersStore[i]||(a.ShaderStore.IncludesShadersStore[i]=o),e.s(["fogFragmentDeclaration",0,{name:i,shader:o}],
|
|
61
|
+
`;a.ShaderStore.IncludesShadersStore[i]||(a.ShaderStore.IncludesShadersStore[i]=o),e.s(["fogFragmentDeclaration",0,{name:i,shader:o}],68767);let t="fogFragment",r=`#ifdef FOG
|
|
62
62
|
float fog=CalcFogFactor();
|
|
63
63
|
#ifdef PBR
|
|
64
64
|
fog=toLinearSpace(fog);
|
|
65
65
|
#endif
|
|
66
66
|
color.rgb=mix(vFogColor,color.rgb,fog);
|
|
67
67
|
#endif
|
|
68
|
-
`;a.ShaderStore.IncludesShadersStore[t]||(a.ShaderStore.IncludesShadersStore[t]=r),e.s(["fogFragment",0,{name:t,shader:r}],
|
|
68
|
+
`;a.ShaderStore.IncludesShadersStore[t]||(a.ShaderStore.IncludesShadersStore[t]=r),e.s(["fogFragment",0,{name:t,shader:r}],78133)},10874,e=>{"use strict";var a=e.i(25044);let i="logDepthDeclaration",o=`#ifdef LOGARITHMICDEPTH
|
|
69
69
|
uniform float logarithmicDepthConstant;varying float vFragmentDepth;
|
|
70
70
|
#endif
|
|
71
|
-
`;a.ShaderStore.IncludesShadersStore[i]||(a.ShaderStore.IncludesShadersStore[i]=o),e.s(["logDepthDeclaration",0,{name:i,shader:o}])},
|
|
71
|
+
`;a.ShaderStore.IncludesShadersStore[i]||(a.ShaderStore.IncludesShadersStore[i]=o),e.s(["logDepthDeclaration",0,{name:i,shader:o}])},28497,e=>{"use strict";var a=e.i(25044);let i="logDepthFragment",o=`#ifdef LOGARITHMICDEPTH
|
|
72
72
|
gl_FragDepthEXT=log2(vFragmentDepth)*logarithmicDepthConstant*0.5;
|
|
73
73
|
#endif
|
|
74
|
-
`;a.ShaderStore.IncludesShadersStore[i]||(a.ShaderStore.IncludesShadersStore[i]=o),e.s(["logDepthFragment",0,{name:i,shader:o}])},
|
|
74
|
+
`;a.ShaderStore.IncludesShadersStore[i]||(a.ShaderStore.IncludesShadersStore[i]=o),e.s(["logDepthFragment",0,{name:i,shader:o}])},78081,e=>{"use strict";var a=e.i(25044),i=e.i(5721),o=e.i(10874),t=e.i(68767);let r="packingFunctions",n=`vec4 pack(float depth)
|
|
75
75
|
{const vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}
|
|
76
76
|
float unpack(vec4 color)
|
|
77
|
-
{const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(color,bit_shift);}`;a.ShaderStore.IncludesShadersStore[r]||(a.ShaderStore.IncludesShadersStore[r]=n);var f=e.i(
|
|
77
|
+
{const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(color,bit_shift);}`;a.ShaderStore.IncludesShadersStore[r]||(a.ShaderStore.IncludesShadersStore[r]=n);var f=e.i(28497),d=e.i(78133);let l="gaussianSplattingFragmentDeclaration",s=`vec4 gaussianColor(vec4 inColor)
|
|
78
78
|
{float A=-dot(vPosition,vPosition);if (A<-4.0) discard;float B=exp(A)*inColor.a;
|
|
79
79
|
#include<logDepthFragment>
|
|
80
80
|
vec3 color=inColor.rgb;
|
|
@@ -82,7 +82,7 @@ vec3 color=inColor.rgb;
|
|
|
82
82
|
#include<fogFragment>
|
|
83
83
|
#endif
|
|
84
84
|
return vec4(color,B);}
|
|
85
|
-
`;a.ShaderStore.IncludesShadersStore[l]||(a.ShaderStore.IncludesShadersStore[l]=s);var c=e.i(
|
|
85
|
+
`;a.ShaderStore.IncludesShadersStore[l]||(a.ShaderStore.IncludesShadersStore[l]=s);var c=e.i(47727);let g="gaussianSplattingPixelShader",S=`#include<clipPlaneFragmentDeclaration>
|
|
86
86
|
#include<logDepthDeclaration>
|
|
87
87
|
#include<fogFragmentDeclaration>
|
|
88
88
|
#ifdef GPUPICKER_DEPTH
|
|
@@ -111,4 +111,4 @@ gl_FragColor=finalColor;
|
|
|
111
111
|
#endif
|
|
112
112
|
#define CUSTOM_FRAGMENT_MAIN_END
|
|
113
113
|
}
|
|
114
|
-
`;for(let e of(a.ShaderStore.ShadersStore[g]||(a.ShaderStore.ShadersStore[g]=S),[i.clipPlaneFragmentDeclaration,o.logDepthDeclaration,t.fogFragmentDeclaration,{name:r,shader:n},f.logDepthFragment,d.fogFragment,{name:l,shader:s},c.clipPlaneFragment]))a.ShaderStore.IncludesShadersStore[e.name]||(a.ShaderStore.IncludesShadersStore[e.name]=e.shader);e.s(["gaussianSplattingPixelShader",0,{name:g,shader:S}],
|
|
114
|
+
`;for(let e of(a.ShaderStore.ShadersStore[g]||(a.ShaderStore.ShadersStore[g]=S),[i.clipPlaneFragmentDeclaration,o.logDepthDeclaration,t.fogFragmentDeclaration,{name:r,shader:n},f.logDepthFragment,d.fogFragment,{name:l,shader:s},c.clipPlaneFragment]))a.ShaderStore.IncludesShadersStore[e.name]||(a.ShaderStore.IncludesShadersStore[e.name]=e.shader);e.s(["gaussianSplattingPixelShader",0,{name:g,shader:S}],78081)}]);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35651,e=>{"use strict";function t(e){return{id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.arguments??{})}}}e.s(["parseOpenAiCompletion",0,function(e){let t=e.choices?.[0]?.message,s=t?.tool_calls??[],n=t?.content??"";return s.length>0?{kind:"tool_calls",toolCalls:s.map(e=>({id:e.id,name:e.function.name,arguments:function(e){if(!e)return{};try{let t=JSON.parse(e);return t&&"object"==typeof t?t:{}}catch{return{}}}(e.function.arguments)})),...n?{content:n}:{}}:{kind:"final",content:n}},"toOpenAiMessages",0,function(e){return e.map(e=>{switch(e.role){case"assistant":return{role:"assistant",content:e.content,...e.toolCalls&&e.toolCalls.length>0?{tool_calls:e.toolCalls.map(t)}:{}};case"tool":return{role:"tool",content:e.content,tool_call_id:e.toolCallId,name:e.name};default:return{role:e.role,content:e.content}}})},"toOpenAiTools",0,function(e){return e.map(e=>({type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}}))}])},36542,92628,e=>{"use strict";let t="uptimizr.assistant.backend";function s(){try{return globalThis.localStorage}catch{return}}function n(e=globalThis.navigator){return!!(e&&"gpu"in e&&e.gpu)}e.s(["isWebGpuAvailable",0,n,"loadBackendConfig",0,function(e=s()){let n;if(!e)return null;try{n=e.getItem(t)}catch{return null}if(!n)return null;try{var a;let e=JSON.parse(n);if(!e||"object"!=typeof e||(a=e.backend,"local"!==a&&"hosted"!==a))return null;return e}catch{return null}},"saveBackendConfig",0,function(e,n=s()){if(n)try{n.setItem(t,JSON.stringify(e))}catch{}}],92628);var a=e.i(35651);let r=["Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC","Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC","Hermes-2-Pro-Mistral-7B-q4f16_1-MLC","Hermes-3-Llama-3.1-8B-q4f32_1-MLC","Hermes-3-Llama-3.1-8B-q4f16_1-MLC"],o=Math.round(0x20000000),i=[{id:"Hermes-3-Llama-3.1-8B-q4f16_1-MLC",label:"Hermes 3 (Llama 3.1 8B)",downloadSize:"~4.5 GB",downloadBytes:Math.round(0x120000000),vram:"~4.9 GB",description:"Highest quality; the default. Needs a capable GPU (~5 GB VRAM)."},{id:"Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC",label:"Hermes 2 Pro (Llama 3 8B)",downloadSize:"~4.6 GB",downloadBytes:Math.round(4939212390.4),vram:"~5.0 GB",description:"Stronger Llama-3 base; needs a capable GPU."},{id:"Hermes-2-Pro-Mistral-7B-q4f16_1-MLC",label:"Hermes 2 Pro (Mistral 7B)",downloadSize:"~3.9 GB",downloadBytes:Math.round(4187593113.6),vram:"~4.0 GB",description:"Smallest tool-calling model; the least-VRAM fallback."}];class l extends Error{constructor(){super("WebGPU is not available in this browser; the local model cannot run."),this.name="WebGpuUnavailableError"}}class c extends Error{constructor(){super("Model download was not confirmed by the user."),this.name="WebLlmConsentError"}}class d extends Error{constructor(e){super(`${e} is not supported for tool-calling. The assistant requires function calling; WebLLM supports it only on these models: ${r.join(", ")}.`),this.name="UnsupportedToolCallingModelError"}}class u extends Error{constructor(e){super(e??"Your browser is out of storage for the local model (each model needs ~4 GB of cache). Free up disk space, clear this site's cached data, or switch to a hosted backend, then retry."),this.name="WebLlmStorageError"}}function p(e){return("u">typeof DOMException&&e instanceof DOMException?"QuotaExceededError"===e.name:"object"==typeof e&&null!==e&&"name"in e&&"QuotaExceededError"===e.name)?new u:e}async function m(e){let t,s=function(){let e="u">typeof navigator?navigator.storage:void 0;if(e&&"function"==typeof e.estimate)return e}();if(!s)return;try{t=await s.estimate()}catch{return}let n=t.quota,a=t.usage??0;if("number"==typeof n&&!(n<=0)&&n-a<e.downloadBytes+o){let t=(e.downloadBytes/0x40000000).toFixed(1);throw new u(`Not enough browser storage for ${e.label}: it needs about ${t} GB of free cache space. Free up disk space or clear this site's cached data, then retry — or switch to a hosted backend.`)}}let h=()=>e.A(688);e.s(["CURATED_MODELS",0,i,"createWebLlmProvider",0,function(e={}){var t;let s,o=((t=e.model)?i.find(e=>e.id===t):i[0])??{id:t??"",label:t??"",downloadSize:"?",downloadBytes:0,vram:"?",description:""};if(!r.includes(o.id))throw new d(o.id);let u=e.loadRuntime??h,g=e.hasWebGpu??(()=>n()),x=e.contextWindowSize??8192;async function f(){if(!g())throw new l;if(e.confirmDownload&&!await e.confirmDownload(o))throw new c;await m(o);let t=await u();try{return await t.CreateMLCEngine(o.id,{initProgressCallback:e.onInitProgress?t=>e.onInitProgress?.({progress:t.progress,text:t.text}):void 0},{context_window_size:x})}catch(e){throw p(e)}}return{async complete(e){let t=await (!s&&(s=f().catch(e=>{throw s=void 0,e})),s),n=e.tools.length>0,r=n?function(e){let t=[],s=[];for(let n of e)"system"===n.role?t.push(n.content):s.push(n);if(0===t.length)return[...e];let n=t.join("\n\n"),a=s.findIndex(e=>"user"===e.role);return -1===a?[{role:"user",content:n},...s]:s.map((e,t)=>t!==a?e:{role:"user",content:n+"\n\n"+e.content})}(e.messages):e.messages;try{let s=await t.chat.completions.create({messages:(0,a.toOpenAiMessages)(r),...n?{tools:(0,a.toOpenAiTools)(e.tools),tool_choice:"auto"}:{},stream:!1});return(0,a.parseOpenAiCompletion)(s)}catch(e){throw p(e)}},async unload(){let e=s;if(s=void 0,!e)return;let t=await e.catch(()=>void 0);await t?.unload?.()}}}],36542)},80760,e=>{"use strict";e.s([],1706),e.i(1706);var t=e.i(60951),s=e.i(17422);let n=e=>"number"==typeof e?e:void 0,a=e=>"string"==typeof e?e:void 0,r=s.z.number().int().optional().describe("Start of the time range, epoch milliseconds."),o=s.z.number().int().optional().describe("End of the time range, epoch milliseconds."),i=s.z.number().int().positive().max(500).optional().describe("Grid resolution per axis."),l=s.z.number().int().positive().max(1e3).optional().describe("Maximum rows to return."),c=s.z.string().optional().describe("Restrict to one developer-assigned scene id."),d=s.z.string().optional().describe("Scope the aggregate to a single session id."),u=s.z.number().positive().max(1e3).optional().describe("Voxel size in world units."),p=s.z.number().int().positive().optional().describe("Time-series bucket width, seconds."),m=s.z.string().optional().describe("Restrict to a single event type, e.g. pointer_click."),h=s.z.enum(["mouse","touch","stylus","pen","xr-controller","hand","gaze","transient","other"]).optional().describe("Restrict a pointer/world heatmap to one input source."),g=s.z.enum(["viewer","first-person"]).optional().describe("Camera navigation mode to scope to: 'viewer' (orbit) or 'first-person' (walkable)."),x=s.z.number().nonnegative().max(Math.PI).optional().describe("Rapid-turn threshold in radians (0..π); view turns above this flag motion-sickness risk."),f=s.z.string().min(1).describe('Funnel steps as a JSON-encoded array of ordered step predicates (ADR 0038). Required. Each step is `{ "type": <event_type>, ... }`; e.g. `[{"type":"scene_change","to":"lobby"},{"type":"mesh_interaction","mesh":"buy"}]`.');function b(e){return{since:n(e.since),until:n(e.until)}}let y=[{name:"list_sessions",title:"List recent sessions",description:"Recent sessions with id, visitor, event count, and start/end times.",inputSchema:{since:r,until:o,limit:l},buildRequest:e=>({path:"api/v1/sessions",params:{...b(e),limit:n(e.limit)}})},{name:"pointer_heatmap",title:"2D pointer heatmap",description:"Binned 2D pointer-position heatmap (screen-normalized).",inputSchema:{since:r,until:o,bins:i,scene:c,source:h,session:d},buildRequest:e=>({path:"api/v1/heatmaps/pointer",params:{...b(e),bins:n(e.bins),scene:a(e.scene),source:a(e.source),session:a(e.session)}})},{name:"world_heatmap",title:"3D world-space pointer heatmap",description:"Voxelized world-space pointer heatmap.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,source:h},buildRequest:e=>({path:"api/v1/heatmaps/world",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),source:a(e.source)}})},{name:"camera_heatmap",title:"View-direction heatmap",description:"Camera view-direction distribution as spherical bins.",inputSchema:{since:r,until:o,bins:i,scene:c,session:d},buildRequest:e=>({path:"api/v1/heatmaps/camera",params:{...b(e),bins:n(e.bins),scene:a(e.scene),session:a(e.session)}})},{name:"click_rays",title:"View-gated click rays",description:"Clicks ASOF-joined to their nearest camera sample, per voxel and clicked mesh.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,source:h,session:d},buildRequest:e=>({path:"api/v1/heatmaps/click-rays",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),source:a(e.source),session:a(e.session)}})},{name:"flow_links",title:"Gaze→mesh flow links",description:"Aggregate links from camera-direction bins to clicked meshes.",inputSchema:{since:r,until:o,bins:i,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/heatmaps/flow",params:{...b(e),bins:n(e.bins),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"top_meshes",title:"Most-interacted meshes",description:"Meshes ranked by interaction count.",inputSchema:{since:r,until:o,limit:l,session:d},buildRequest:e=>({path:"api/v1/meshes/top",params:{...b(e),limit:n(e.limit),session:a(e.session)}})},{name:"perf_summary",title:"Rendering performance summary",description:"Sample count and avg/min/p50 FPS over the range.",inputSchema:{since:r,until:o,session:d},buildRequest:e=>({path:"api/v1/perf",params:{...b(e),session:a(e.session)}})},{name:"list_scenes",title:"List active scenes",description:"Distinct developer-assigned scenes with activity.",inputSchema:{since:r,until:o,limit:l},buildRequest:e=>({path:"api/v1/scenes",params:{...b(e),limit:n(e.limit)}})},{name:"timeseries",title:"Event-volume time series",description:"Event-volume buckets over time, with average FPS per bucket.",inputSchema:{since:r,until:o,interval:p,scene:c,type:m},buildRequest:e=>({path:"api/v1/timeseries",params:{...b(e),interval:n(e.interval),scene:a(e.scene),type:a(e.type)}})},{name:"event_counts",title:"Per-event-type counts",description:"Counts per event type over the range (scene-health panel).",inputSchema:{since:r,until:o,scene:c},buildRequest:e=>({path:"api/v1/event-counts",params:{...b(e),scene:a(e.scene)}})},{name:"session_meta",title:"Session descriptor",description:"Coarse descriptor for one session (device/scene/user). No raw event stream.",inputSchema:{sessionId:s.z.string().min(1).describe("The session id to describe.")},buildRequest:e=>({path:`api/v1/sessions/${encodeURIComponent(a(e.sessionId)??"")}/meta`,params:{}})},{name:"scene_representation",title:"Scene representation",description:"Registered proxy geometry (bounds/meshes) for one scene, if any.",inputSchema:{sceneId:s.z.string().min(1).describe("The scene id to fetch.")},buildRequest:e=>({path:`api/v1/scenes/${encodeURIComponent(a(e.sceneId)??"")}/representation`,params:{}})},{name:"funnel",title:"Conversion funnel",description:"Ordered, per-session conversion funnel (ADR 0038): how many sessions reach each caller-supplied step. Steps are a JSON array (see the `steps` argument).",inputSchema:{since:r,until:o,scene:c,cameraMode:g,steps:f},buildRequest:e=>({path:"api/v1/funnel",params:{...b(e),scene:a(e.scene),cameraMode:a(e.cameraMode),steps:a(e.steps)}})},{name:"aggregate_paths",title:"Aggregate desire-line paths",description:"Crowd-level movement routes (ADR 0037): every session's camera path binned onto the ground grid and returned as ordered, session-keyed points for an overlaid route map.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,cameraMode:g},buildRequest:e=>({path:"api/v1/paths",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),cameraMode:a(e.cameraMode)}})},{name:"rendering_technology",title:"Rendering-technology breakdown",description:"Rendering-technology mix from session_start.graphics (ADR 0046): session count per (api, backend, api_version, shading_language) — WebGPU vs WebGL2 and shading language.",inputSchema:{since:r,until:o,scene:c,session:d},buildRequest:e=>({path:"api/v1/rendering-technology",params:{...b(e),scene:a(e.scene),session:a(e.session)}})},{name:"xr_rotation",title:"XR head-rotation rate",description:"XR head/view rotation rate (ADR 0048), a motion-sickness proxy: per-session rapid-turn counts over the camera pose stream.",inputSchema:{since:r,until:o,rapidTurn:x,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/rotation",params:{...b(e),rapidTurn:n(e.rapidTurn),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_sources",title:"XR input-source usage",description:"XR input-source split (ADR 0048): hand vs. controller vs. gaze usage.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/sources",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_abandonment",title:"XR session abandonment",description:"XR session abandonment (ADR 0048): per XR session, its time bounds and event/interaction counts; a short span signals headset drop-off.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/abandonment",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_locomotion",title:"XR locomotion & comfort",description:"XR locomotion & comfort (ADR 0048): per XR session, its locomotion-style mix (fly / navigate / teleport + duration) and wall-clock span — a discomfort proxy.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/locomotion",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})}],v=["list_sessions","list_scenes","top_meshes","perf_summary","event_counts","timeseries","camera_heatmap"],w=y.filter(e=>v.includes(e.name));async function k(e){let{provider:t,client:n,signal:a}=e,r=e.tools??y,o=e.maxSteps??8,i=e.forceFinalAnswer??!0,l=e.maxToolResultChars??8e3,c=new Map(r.map(e=>[e.name,e])),d=function(e=y){return e.map(e=>({name:e.name,description:e.description,parameters:s.z.toJSONSchema(s.z.object(e.inputSchema))}))}(r),u=[...e.messages],p=0,m=!1;async function h(){m=!0;let e=[...u,{role:"user",content:"Now answer the user's question directly in plain text, using the tool results already gathered above. Do not call any tools. If the data is insufficient, say so briefly."}],s=await t.complete({messages:e,tools:[],signal:a});return"final"===s.kind?s.content:s.content??""}for(;p<o;){p+=1;let e=await t.complete({messages:u,tools:d,signal:a});if("final"===e.kind){if(""===e.content.trim()&&i&&!m){let e=await h();if(""!==e.trim())return u.push({role:"assistant",content:e}),{content:e,messages:u,steps:p,stoppedOnMaxSteps:!1}}return u.push({role:"assistant",content:e.content}),{content:e.content,messages:u,steps:p,stoppedOnMaxSteps:!1}}for(let t of(u.push({role:"assistant",content:e.content??"",toolCalls:e.toolCalls}),e.toolCalls))u.push(await j(n,c.get(t.name),t,l))}if(i&&!m){let e=await h();if(""!==e.trim())return u.push({role:"assistant",content:e}),{content:e,messages:u,steps:p,stoppedOnMaxSteps:!0}}return{content:"",messages:u,steps:p,stoppedOnMaxSteps:!0}}async function j(e,t,n,a){let r=e=>({role:"tool",toolCallId:n.id,name:n.name,content:e});if(!t)return r(`Error: unknown tool "${n.name}".`);let o=s.z.object(t.inputSchema).safeParse(n.arguments??{});if(!o.success){let e=o.error.issues.map(e=>`${e.path.join(".")||"(root)"}: ${e.message}`).join("; ");return r(`Error: invalid arguments for "${n.name}": ${e}`)}try{let{path:s,params:n}=t.buildRequest(o.data),i=await e.get(s,n);return r(function(e,t){if(e.length<=t)return e;let s=e.length-t;return`${e.slice(0,t)}…[truncated ${s} chars]`}(JSON.stringify(i),a))}catch(t){let e=t instanceof Error?t.message:String(t);return r(`Error: ${e}`)}}var S=e.i(36542),N=e.i(92628),C=e.i(20880);let R=(0,t.createContext)(null),_='You are Uptimizr\'s in-browser analytics assistant. You help a developer understand\ntheir 3D-scene analytics by calling read-only tools against their own collector\'s\nquery API and summarising the results in clear, concise prose.\n\nGuidelines:\n- Use the provided tools to fetch data before answering; never invent numbers.\n- All data is aggregate and privacy-preserving — there are no raw per-session events,\n no PII, and no way to ingest or modify data. Do not claim otherwise.\n- Timestamps are epoch milliseconds. When the user gives a relative range\n ("this week", "last 24h"), convert it to `since`/`until` before calling a tool.\n- Prefer a short, direct answer with the key figures. Call out caveats (small sample\n sizes, missing scenes) when relevant.\n- If a tool returns an error, explain what went wrong and, if useful, try a corrected call.';function A(e=_,t=Date.now()){let s=new Date(t).toISOString(),n=`Current time: ${s} (epoch milliseconds: ${t}). Resolve any relative time range in the question against this — "today" is the current calendar day, "this week" the last 7 days, "last 24h" the preceding 24 hours — into concrete \`since\`/\`until\` epoch-ms arguments.`;return`${e}
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35651,e=>{"use strict";function t(e){return{id:e.id,type:"function",function:{name:e.name,arguments:JSON.stringify(e.arguments??{})}}}e.s(["parseOpenAiCompletion",0,function(e){let t=e.choices?.[0]?.message,s=t?.tool_calls??[],n=t?.content??"";return s.length>0?{kind:"tool_calls",toolCalls:s.map(e=>({id:e.id,name:e.function.name,arguments:function(e){if(!e)return{};try{let t=JSON.parse(e);return t&&"object"==typeof t?t:{}}catch{return{}}}(e.function.arguments)})),...n?{content:n}:{}}:{kind:"final",content:n}},"toOpenAiMessages",0,function(e){return e.map(e=>{switch(e.role){case"assistant":return{role:"assistant",content:e.content,...e.toolCalls&&e.toolCalls.length>0?{tool_calls:e.toolCalls.map(t)}:{}};case"tool":return{role:"tool",content:e.content,tool_call_id:e.toolCallId,name:e.name};default:return{role:e.role,content:e.content}}})},"toOpenAiTools",0,function(e){return e.map(e=>({type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}}))}])},36542,74698,e=>{"use strict";let t="uptimizr.assistant.backend";function s(){try{return globalThis.localStorage}catch{return}}function n(e=globalThis.navigator){return!!(e&&"gpu"in e&&e.gpu)}e.s(["isWebGpuAvailable",0,n,"loadBackendConfig",0,function(e=s()){let n;if(!e)return null;try{n=e.getItem(t)}catch{return null}if(!n)return null;try{var a;let e=JSON.parse(n);if(!e||"object"!=typeof e||(a=e.backend,"local"!==a&&"hosted"!==a))return null;return e}catch{return null}},"saveBackendConfig",0,function(e,n=s()){if(n)try{n.setItem(t,JSON.stringify(e))}catch{}}],74698);var a=e.i(35651);let r=["Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC","Hermes-2-Pro-Llama-3-8B-q4f32_1-MLC","Hermes-2-Pro-Mistral-7B-q4f16_1-MLC","Hermes-3-Llama-3.1-8B-q4f32_1-MLC","Hermes-3-Llama-3.1-8B-q4f16_1-MLC"],o=Math.round(0x20000000),i=[{id:"Hermes-3-Llama-3.1-8B-q4f16_1-MLC",label:"Hermes 3 (Llama 3.1 8B)",downloadSize:"~4.5 GB",downloadBytes:Math.round(0x120000000),vram:"~4.9 GB",description:"Highest quality; the default. Needs a capable GPU (~5 GB VRAM)."},{id:"Hermes-2-Pro-Llama-3-8B-q4f16_1-MLC",label:"Hermes 2 Pro (Llama 3 8B)",downloadSize:"~4.6 GB",downloadBytes:Math.round(4939212390.4),vram:"~5.0 GB",description:"Stronger Llama-3 base; needs a capable GPU."},{id:"Hermes-2-Pro-Mistral-7B-q4f16_1-MLC",label:"Hermes 2 Pro (Mistral 7B)",downloadSize:"~3.9 GB",downloadBytes:Math.round(4187593113.6),vram:"~4.0 GB",description:"Smallest tool-calling model; the least-VRAM fallback."}];class l extends Error{constructor(){super("WebGPU is not available in this browser; the local model cannot run."),this.name="WebGpuUnavailableError"}}class c extends Error{constructor(){super("Model download was not confirmed by the user."),this.name="WebLlmConsentError"}}class d extends Error{constructor(e){super(`${e} is not supported for tool-calling. The assistant requires function calling; WebLLM supports it only on these models: ${r.join(", ")}.`),this.name="UnsupportedToolCallingModelError"}}class u extends Error{constructor(e){super(e??"Your browser is out of storage for the local model (each model needs ~4 GB of cache). Free up disk space, clear this site's cached data, or switch to a hosted backend, then retry."),this.name="WebLlmStorageError"}}function p(e){return("u">typeof DOMException&&e instanceof DOMException?"QuotaExceededError"===e.name:"object"==typeof e&&null!==e&&"name"in e&&"QuotaExceededError"===e.name)?new u:e}async function m(e){let t,s=function(){let e="u">typeof navigator?navigator.storage:void 0;if(e&&"function"==typeof e.estimate)return e}();if(!s)return;try{t=await s.estimate()}catch{return}let n=t.quota,a=t.usage??0;if("number"==typeof n&&!(n<=0)&&n-a<e.downloadBytes+o){let t=(e.downloadBytes/0x40000000).toFixed(1);throw new u(`Not enough browser storage for ${e.label}: it needs about ${t} GB of free cache space. Free up disk space or clear this site's cached data, then retry — or switch to a hosted backend.`)}}let h=()=>e.A(688);e.s(["CURATED_MODELS",0,i,"createWebLlmProvider",0,function(e={}){var t;let s,o=((t=e.model)?i.find(e=>e.id===t):i[0])??{id:t??"",label:t??"",downloadSize:"?",downloadBytes:0,vram:"?",description:""};if(!r.includes(o.id))throw new d(o.id);let u=e.loadRuntime??h,g=e.hasWebGpu??(()=>n()),x=e.contextWindowSize??8192;async function f(){if(!g())throw new l;if(e.confirmDownload&&!await e.confirmDownload(o))throw new c;await m(o);let t=await u();try{return await t.CreateMLCEngine(o.id,{initProgressCallback:e.onInitProgress?t=>e.onInitProgress?.({progress:t.progress,text:t.text}):void 0},{context_window_size:x})}catch(e){throw p(e)}}return{async complete(e){let t=await (!s&&(s=f().catch(e=>{throw s=void 0,e})),s),n=e.tools.length>0,r=n?function(e){let t=[],s=[];for(let n of e)"system"===n.role?t.push(n.content):s.push(n);if(0===t.length)return[...e];let n=t.join("\n\n"),a=s.findIndex(e=>"user"===e.role);return -1===a?[{role:"user",content:n},...s]:s.map((e,t)=>t!==a?e:{role:"user",content:n+"\n\n"+e.content})}(e.messages):e.messages;try{let s=await t.chat.completions.create({messages:(0,a.toOpenAiMessages)(r),...n?{tools:(0,a.toOpenAiTools)(e.tools),tool_choice:"auto"}:{},stream:!1});return(0,a.parseOpenAiCompletion)(s)}catch(e){throw p(e)}},async unload(){let e=s;if(s=void 0,!e)return;let t=await e.catch(()=>void 0);await t?.unload?.()}}}],36542)},80760,e=>{"use strict";e.s([],60301),e.i(60301);var t=e.i(48093),s=e.i(52731);let n=e=>"number"==typeof e?e:void 0,a=e=>"string"==typeof e?e:void 0,r=s.z.number().int().optional().describe("Start of the time range, epoch milliseconds."),o=s.z.number().int().optional().describe("End of the time range, epoch milliseconds."),i=s.z.number().int().positive().max(500).optional().describe("Grid resolution per axis."),l=s.z.number().int().positive().max(1e3).optional().describe("Maximum rows to return."),c=s.z.string().optional().describe("Restrict to one developer-assigned scene id."),d=s.z.string().optional().describe("Scope the aggregate to a single session id."),u=s.z.number().positive().max(1e3).optional().describe("Voxel size in world units."),p=s.z.number().int().positive().optional().describe("Time-series bucket width, seconds."),m=s.z.string().optional().describe("Restrict to a single event type, e.g. pointer_click."),h=s.z.enum(["mouse","touch","stylus","pen","xr-controller","hand","gaze","transient","other"]).optional().describe("Restrict a pointer/world heatmap to one input source."),g=s.z.enum(["viewer","first-person"]).optional().describe("Camera navigation mode to scope to: 'viewer' (orbit) or 'first-person' (walkable)."),x=s.z.number().nonnegative().max(Math.PI).optional().describe("Rapid-turn threshold in radians (0..π); view turns above this flag motion-sickness risk."),f=s.z.string().min(1).describe('Funnel steps as a JSON-encoded array of ordered step predicates (ADR 0038). Required. Each step is `{ "type": <event_type>, ... }`; e.g. `[{"type":"scene_change","to":"lobby"},{"type":"mesh_interaction","mesh":"buy"}]`.');function b(e){return{since:n(e.since),until:n(e.until)}}let y=[{name:"list_sessions",title:"List recent sessions",description:"Recent sessions with id, visitor, event count, and start/end times.",inputSchema:{since:r,until:o,limit:l},buildRequest:e=>({path:"api/v1/sessions",params:{...b(e),limit:n(e.limit)}})},{name:"pointer_heatmap",title:"2D pointer heatmap",description:"Binned 2D pointer-position heatmap (screen-normalized).",inputSchema:{since:r,until:o,bins:i,scene:c,source:h,session:d},buildRequest:e=>({path:"api/v1/heatmaps/pointer",params:{...b(e),bins:n(e.bins),scene:a(e.scene),source:a(e.source),session:a(e.session)}})},{name:"world_heatmap",title:"3D world-space pointer heatmap",description:"Voxelized world-space pointer heatmap.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,source:h},buildRequest:e=>({path:"api/v1/heatmaps/world",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),source:a(e.source)}})},{name:"camera_heatmap",title:"View-direction heatmap",description:"Camera view-direction distribution as spherical bins.",inputSchema:{since:r,until:o,bins:i,scene:c,session:d},buildRequest:e=>({path:"api/v1/heatmaps/camera",params:{...b(e),bins:n(e.bins),scene:a(e.scene),session:a(e.session)}})},{name:"click_rays",title:"View-gated click rays",description:"Clicks ASOF-joined to their nearest camera sample, per voxel and clicked mesh.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,source:h,session:d},buildRequest:e=>({path:"api/v1/heatmaps/click-rays",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),source:a(e.source),session:a(e.session)}})},{name:"flow_links",title:"Gaze→mesh flow links",description:"Aggregate links from camera-direction bins to clicked meshes.",inputSchema:{since:r,until:o,bins:i,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/heatmaps/flow",params:{...b(e),bins:n(e.bins),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"top_meshes",title:"Most-interacted meshes",description:"Meshes ranked by interaction count.",inputSchema:{since:r,until:o,limit:l,session:d},buildRequest:e=>({path:"api/v1/meshes/top",params:{...b(e),limit:n(e.limit),session:a(e.session)}})},{name:"perf_summary",title:"Rendering performance summary",description:"Sample count and avg/min/p50 FPS over the range.",inputSchema:{since:r,until:o,session:d},buildRequest:e=>({path:"api/v1/perf",params:{...b(e),session:a(e.session)}})},{name:"list_scenes",title:"List active scenes",description:"Distinct developer-assigned scenes with activity.",inputSchema:{since:r,until:o,limit:l},buildRequest:e=>({path:"api/v1/scenes",params:{...b(e),limit:n(e.limit)}})},{name:"timeseries",title:"Event-volume time series",description:"Event-volume buckets over time, with average FPS per bucket.",inputSchema:{since:r,until:o,interval:p,scene:c,type:m},buildRequest:e=>({path:"api/v1/timeseries",params:{...b(e),interval:n(e.interval),scene:a(e.scene),type:a(e.type)}})},{name:"event_counts",title:"Per-event-type counts",description:"Counts per event type over the range (scene-health panel).",inputSchema:{since:r,until:o,scene:c},buildRequest:e=>({path:"api/v1/event-counts",params:{...b(e),scene:a(e.scene)}})},{name:"session_meta",title:"Session descriptor",description:"Coarse descriptor for one session (device/scene/user). No raw event stream.",inputSchema:{sessionId:s.z.string().min(1).describe("The session id to describe.")},buildRequest:e=>({path:`api/v1/sessions/${encodeURIComponent(a(e.sessionId)??"")}/meta`,params:{}})},{name:"scene_representation",title:"Scene representation",description:"Registered proxy geometry (bounds/meshes) for one scene, if any.",inputSchema:{sceneId:s.z.string().min(1).describe("The scene id to fetch.")},buildRequest:e=>({path:`api/v1/scenes/${encodeURIComponent(a(e.sceneId)??"")}/representation`,params:{}})},{name:"funnel",title:"Conversion funnel",description:"Ordered, per-session conversion funnel (ADR 0038): how many sessions reach each caller-supplied step. Steps are a JSON array (see the `steps` argument).",inputSchema:{since:r,until:o,scene:c,cameraMode:g,steps:f},buildRequest:e=>({path:"api/v1/funnel",params:{...b(e),scene:a(e.scene),cameraMode:a(e.cameraMode),steps:a(e.steps)}})},{name:"aggregate_paths",title:"Aggregate desire-line paths",description:"Crowd-level movement routes (ADR 0037): every session's camera path binned onto the ground grid and returned as ordered, session-keyed points for an overlaid route map.",inputSchema:{since:r,until:o,cellSize:u,limit:l,scene:c,cameraMode:g},buildRequest:e=>({path:"api/v1/paths",params:{...b(e),cellSize:n(e.cellSize),limit:n(e.limit),scene:a(e.scene),cameraMode:a(e.cameraMode)}})},{name:"rendering_technology",title:"Rendering-technology breakdown",description:"Rendering-technology mix from session_start.graphics (ADR 0046): session count per (api, backend, api_version, shading_language) — WebGPU vs WebGL2 and shading language.",inputSchema:{since:r,until:o,scene:c,session:d},buildRequest:e=>({path:"api/v1/rendering-technology",params:{...b(e),scene:a(e.scene),session:a(e.session)}})},{name:"xr_rotation",title:"XR head-rotation rate",description:"XR head/view rotation rate (ADR 0048), a motion-sickness proxy: per-session rapid-turn counts over the camera pose stream.",inputSchema:{since:r,until:o,rapidTurn:x,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/rotation",params:{...b(e),rapidTurn:n(e.rapidTurn),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_sources",title:"XR input-source usage",description:"XR input-source split (ADR 0048): hand vs. controller vs. gaze usage.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/sources",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_abandonment",title:"XR session abandonment",description:"XR session abandonment (ADR 0048): per XR session, its time bounds and event/interaction counts; a short span signals headset drop-off.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/abandonment",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})},{name:"xr_locomotion",title:"XR locomotion & comfort",description:"XR locomotion & comfort (ADR 0048): per XR session, its locomotion-style mix (fly / navigate / teleport + duration) and wall-clock span — a discomfort proxy.",inputSchema:{since:r,until:o,limit:l,scene:c,session:d},buildRequest:e=>({path:"api/v1/xr/locomotion",params:{...b(e),limit:n(e.limit),scene:a(e.scene),session:a(e.session)}})}],v=["list_sessions","list_scenes","top_meshes","perf_summary","event_counts","timeseries","camera_heatmap"],w=y.filter(e=>v.includes(e.name));async function k(e){let{provider:t,client:n,signal:a}=e,r=e.tools??y,o=e.maxSteps??8,i=e.forceFinalAnswer??!0,l=e.maxToolResultChars??8e3,c=new Map(r.map(e=>[e.name,e])),d=function(e=y){return e.map(e=>({name:e.name,description:e.description,parameters:s.z.toJSONSchema(s.z.object(e.inputSchema))}))}(r),u=[...e.messages],p=0,m=!1;async function h(){m=!0;let e=[...u,{role:"user",content:"Now answer the user's question directly in plain text, using the tool results already gathered above. Do not call any tools. If the data is insufficient, say so briefly."}],s=await t.complete({messages:e,tools:[],signal:a});return"final"===s.kind?s.content:s.content??""}for(;p<o;){p+=1;let e=await t.complete({messages:u,tools:d,signal:a});if("final"===e.kind){if(""===e.content.trim()&&i&&!m){let e=await h();if(""!==e.trim())return u.push({role:"assistant",content:e}),{content:e,messages:u,steps:p,stoppedOnMaxSteps:!1}}return u.push({role:"assistant",content:e.content}),{content:e.content,messages:u,steps:p,stoppedOnMaxSteps:!1}}for(let t of(u.push({role:"assistant",content:e.content??"",toolCalls:e.toolCalls}),e.toolCalls))u.push(await j(n,c.get(t.name),t,l))}if(i&&!m){let e=await h();if(""!==e.trim())return u.push({role:"assistant",content:e}),{content:e,messages:u,steps:p,stoppedOnMaxSteps:!0}}return{content:"",messages:u,steps:p,stoppedOnMaxSteps:!0}}async function j(e,t,n,a){let r=e=>({role:"tool",toolCallId:n.id,name:n.name,content:e});if(!t)return r(`Error: unknown tool "${n.name}".`);let o=s.z.object(t.inputSchema).safeParse(n.arguments??{});if(!o.success){let e=o.error.issues.map(e=>`${e.path.join(".")||"(root)"}: ${e.message}`).join("; ");return r(`Error: invalid arguments for "${n.name}": ${e}`)}try{let{path:s,params:n}=t.buildRequest(o.data),i=await e.get(s,n);return r(function(e,t){if(e.length<=t)return e;let s=e.length-t;return`${e.slice(0,t)}…[truncated ${s} chars]`}(JSON.stringify(i),a))}catch(t){let e=t instanceof Error?t.message:String(t);return r(`Error: ${e}`)}}var S=e.i(36542),N=e.i(74698),C=e.i(20880);let R=(0,t.createContext)(null),_='You are Uptimizr\'s in-browser analytics assistant. You help a developer understand\ntheir 3D-scene analytics by calling read-only tools against their own collector\'s\nquery API and summarising the results in clear, concise prose.\n\nGuidelines:\n- Use the provided tools to fetch data before answering; never invent numbers.\n- All data is aggregate and privacy-preserving — there are no raw per-session events,\n no PII, and no way to ingest or modify data. Do not claim otherwise.\n- Timestamps are epoch milliseconds. When the user gives a relative range\n ("this week", "last 24h"), convert it to `since`/`until` before calling a tool.\n- Prefer a short, direct answer with the key figures. Call out caveats (small sample\n sizes, missing scenes) when relevant.\n- If a tool returns an error, explain what went wrong and, if useful, try a corrected call.';function A(e=_,t=Date.now()){let s=new Date(t).toISOString(),n=`Current time: ${s} (epoch milliseconds: ${t}). Resolve any relative time range in the question against this — "today" is the current calendar day, "this week" the last 7 days, "last 24h" the preceding 24 hours — into concrete \`since\`/\`until\` epoch-ms arguments.`;return`${e}
|
|
2
2
|
|
|
3
|
-
${n}`}function M(e){return"function"==typeof e.unload}function z(s={}){let{collectorUrl:n,apiKey:a,api:r,systemPrompt:o=_,maxSteps:i=12,confirmDownload:l,persistBackend:c=!0,now:d=()=>Date.now()}=s,u=(0,t.useContext)(R),p=(0,t.useMemo)(()=>r||(n&&a?new C.CollectorApi(n,a):u?.api??null),[r,n,a,u?.api]),[m]=(0,t.useState)(()=>(0,N.isWebGpuAvailable)()),[h,g]=(0,t.useState)(()=>s.backend?s.backend:(0,N.loadBackendConfig)()),[x,f]=(0,t.useState)([]),[b,v]=(0,t.useState)("idle"),[j,P]=(0,t.useState)(null),[q,E]=(0,t.useState)([]),[B,L]=(0,t.useState)(null),[I,D]=(0,t.useState)(null),O=(0,t.useRef)(x);O.current=x;let G=(0,t.useRef)(h);G.current=h;let T=(0,t.useRef)(d);T.current=d;let U=(0,t.useRef)(null),$=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{$.current?.abort();let e=U.current;U.current=null,e&&M(e.provider)&&e.provider.unload().catch(()=>{})},[]);let W=(0,t.useCallback)(e=>{g(e),c&&(0,N.saveBackendConfig)(e)},[c]),H=(0,t.useCallback)(async t=>{if("local"===t.backend){let{createWebLlmProvider:s}=await e.A(86354);return s({model:t.webllm?.model,confirmDownload:l,onInitProgress:e=>{L(e),v(e.progress>=1?"thinking":"initializing")}})}if(!t.hosted)throw Error("Hosted backend selected but not configured (endpoint, key, and model).");let{createHostedProvider:s}=await e.A(45697),{api:n,endpoint:a,apiKey:r,model:o}=t.hosted;return s({api:n,endpoint:a,apiKey:r,model:o})},[l]),F=(0,t.useCallback)(async e=>{let t=JSON.stringify(e),s=U.current;if(s&&s.key===t)return s.provider;s&&M(s.provider)&&s.provider.unload().catch(()=>{});let n=await H(e);return U.current={key:t,provider:n},n},[H]),V=(0,t.useCallback)(async e=>{let t=e.trim();if(!t)return;let s=G.current;if(!p){P(Error("No collector connection. Pass collectorUrl + apiKey or wrap in <UptimizrProvider>.")),v("error");return}if(!s){P(Error("No assistant backend selected. Choose a local or hosted backend first.")),v("error");return}let n={role:"user",content:t},a=O.current,r=0===a.length?[{role:"system",content:A(o,T.current())},n]:[...a,n];f(r),E([]),P(null),L(null),D(null),v("initializing");let l=new AbortController;$.current=l;let c=e=>E(t=>{let s=t.findIndex(e=>"running"===e.status),n=-1===s?void 0:t[s];if(!n)return t;let a=t.slice();return a[s]={...n,status:e},a});try{var d;let e=await F(s);v("thinking");let t=await k({provider:{async complete(t){let s=await e.complete(t);return"tool_calls"===s.kind&&E(e=>[...e,...s.toolCalls.map(e=>({id:e.id,name:e.name,status:"running"}))]),s}},client:{async get(e,t){try{let s=await p.read(e,t);return c("done"),s}catch(e){throw c("error"),e}}},messages:r,tools:(d="local"===s.backend?"core":"full","core"===d?w:y),maxSteps:i,signal:l.signal});f(t.messages),E(e=>e.map(e=>"running"===e.status?{...e,status:"done"}:e)),t.stoppedOnMaxSteps?D({kind:"stopped_on_max_steps",steps:t.steps}):0===t.content.trim().length&&D({kind:"no_answer"}),v("idle")}catch(e){if(l.signal.aborted)return void v("idle");P(e instanceof Error?e:Error(String(e))),v("error")}finally{L(null),$.current===l&&($.current=null)}},[p,o,i,F]),X=(0,t.useCallback)(()=>{$.current?.abort()},[]),J=(0,t.useCallback)(()=>{$.current?.abort(),f([]),E([]),P(null),L(null),D(null),v("idle")},[]);return{messages:x,status:b,error:j,toolActivity:q,initProgress:B,notice:I,backend:h,webGpuAvailable:m,models:S.CURATED_MODELS,isReady:!!p&&!!h,isBusy:"initializing"===b||"thinking"===b,send:V,setBackend:W,cancel:X,reset:J}}var P=e.i(61284);let q=["What are my top meshes this week?","How's my average FPS?","Which scenes had activity today?","How many events in the last 24 hours?","How many sessions this week?"];function E({webGpuAvailable:e,onPick:t}){return(0,P.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,P.jsx)("p",{className:"text-xs text-fg-muted",children:"Choose how the assistant runs. Nothing is loaded or downloaded until you pick — your choice is remembered next time."}),(0,P.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,P.jsxs)("div",{className:`flex flex-col gap-2 rounded-md border border-edge p-3 ${e?"":"opacity-60"}`,children:[(0,P.jsxs)("div",{className:"flex items-center gap-2",children:[(0,P.jsx)("h3",{className:"text-sm font-medium text-fg-hi",children:"Local (in-browser)"}),e&&(0,P.jsx)("span",{className:"rounded-full bg-emerald-500/20 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-emerald-300",children:"Recommended"})]}),(0,P.jsxs)("p",{className:"text-xs text-fg-muted",children:["Private — ",(0,P.jsx)("strong",{children:"nothing leaves your device"}),". Runs on your GPU. Requires a WebGPU browser with ~5 GB free VRAM and a one-time ~4 GB model download."]}),(0,P.jsx)("button",{type:"button",disabled:!e,onClick:()=>t("local"),className:"mt-auto self-start rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi disabled:opacity-50",children:"Use local"}),!e&&(0,P.jsx)("p",{className:"text-[11px] text-fg-muted",children:"Requires a WebGPU browser."})]}),(0,P.jsxs)("div",{className:"flex flex-col gap-2 rounded-md border border-edge p-3",children:[(0,P.jsx)("h3",{className:"text-sm font-medium text-fg-hi",children:"Bring your own hosted key"}),(0,P.jsxs)("p",{className:"text-xs text-fg-muted",children:["Lightweight — no download. You supply an OpenAI-compatible or Anthropic endpoint + key. Your questions and aggregated analytics context are"," ",(0,P.jsx)("strong",{children:"sent to that provider"})," (never raw events or PII)."]}),(0,P.jsx)("button",{type:"button",onClick:()=>t("hosted"),className:"mt-auto self-start rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi",children:"Use hosted key"})]})]})]})}function B({backend:e,webGpuAvailable:s,models:n,onChange:a,initialKind:r}){let[o,i]=(0,t.useState)(r??e?.backend??(s?"local":"hosted")),[l,c]=(0,t.useState)(e?.webllm?.model??n[0]?.id??""),[d,u]=(0,t.useState)(e?.hosted?.api??"openai"),[p,m]=(0,t.useState)(e?.hosted?.endpoint??""),[h,g]=(0,t.useState)(e?.hosted?.apiKey??""),[x,f]=(0,t.useState)(e?.hosted?.model??"");return(0,P.jsxs)("fieldset",{className:"flex flex-col gap-2 rounded-md border border-edge p-2 text-xs",children:[(0,P.jsx)("legend",{className:"px-1 text-fg-muted",children:"LLM backend"}),(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("input",{type:"radio",name:"assistant-backend",checked:"local"===o,disabled:!s,onChange:()=>i("local")}),(0,P.jsxs)("span",{className:s?"text-fg":"text-fg-muted",children:["Local (WebLLM / WebGPU) — runs in your browser, zero egress",!s&&" (WebGPU unavailable)"]})]}),"local"===o&&s&&(0,P.jsxs)("div",{className:"ml-6 flex flex-col gap-1",children:[(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("span",{className:"text-fg-muted",children:"Model"}),(0,P.jsx)("select",{"aria-label":"Local model",value:l,className:"rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>c(e.target.value),children:n.map(e=>(0,P.jsxs)("option",{value:e.id,children:[e.label," (",e.downloadSize,")"]},e.id))})]}),(0,P.jsx)("button",{type:"button",onClick:()=>a({backend:"local",webllm:{model:l}}),disabled:!l,className:"self-start rounded-md bg-emerald-500/70 px-2 py-0.5 text-fg-hi disabled:opacity-50",children:"Use this model locally"})]}),(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("input",{type:"radio",name:"assistant-backend",checked:"hosted"===o,onChange:()=>i("hosted")}),(0,P.jsx)("span",{className:"text-fg",children:"Bring your own hosted provider (OpenAI-compatible or Anthropic)"})]}),"hosted"===o&&(0,P.jsxs)("div",{className:"ml-6 flex flex-col gap-1",children:[(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("span",{className:"w-16 text-fg-muted",children:"API"}),(0,P.jsxs)("select",{"aria-label":"Hosted API",value:d,className:"rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>u(e.target.value),children:[(0,P.jsx)("option",{value:"openai",children:"OpenAI-compatible"}),(0,P.jsx)("option",{value:"anthropic",children:"Anthropic"})]})]}),(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("span",{className:"w-16 text-fg-muted",children:"Endpoint"}),(0,P.jsx)("input",{type:"url","aria-label":"Endpoint",value:p,placeholder:"https://api.openai.com/v1",className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>m(e.target.value)})]}),(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("span",{className:"w-16 text-fg-muted",children:"API key"}),(0,P.jsx)("input",{type:"password","aria-label":"API key",value:h,className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>g(e.target.value)})]}),(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("span",{className:"w-16 text-fg-muted",children:"Model"}),(0,P.jsx)("input",{type:"text","aria-label":"Hosted model",value:x,placeholder:"gpt-4o-mini",className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>f(e.target.value)})]}),(0,P.jsx)("button",{type:"button",onClick:()=>a({backend:"hosted",hosted:{api:d,endpoint:p,apiKey:h,model:x}}),disabled:!p||!h||!x,className:"self-start rounded-md bg-emerald-500/70 px-2 py-0.5 text-fg-hi disabled:opacity-50",children:"Use this provider"})]})]})}function L({backend:e}){let t=e?.backend==="hosted"?"Your prompt and aggregated results are sent to your own provider — never raw events or PII.":"Runs 100% in your browser. Nothing — not your prompt nor your data — leaves this device.";return(0,P.jsx)("p",{className:"text-xs text-fg-muted",children:t})}function I({model:e,onDecision:t}){return(0,P.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Download model",className:"flex flex-col gap-2 rounded-md border border-edge bg-surface p-3 text-xs",children:[(0,P.jsxs)("p",{className:"text-fg",children:["Download ",(0,P.jsx)("strong",{children:e.label})," (",e.downloadSize,", needs ~",e.vram," VRAM)? It runs 100% locally in your browser and nothing leaves this device."]}),(0,P.jsx)("p",{className:"text-fg-muted",children:e.description}),(0,P.jsxs)("div",{className:"flex gap-2",children:[(0,P.jsx)("button",{type:"button",onClick:()=>t(!0),className:"rounded-md bg-emerald-500/70 px-3 py-1 text-fg-hi",children:"Download & run locally"}),(0,P.jsx)("button",{type:"button",onClick:()=>t(!1),className:"rounded-md border border-edge px-3 py-1 text-fg-muted hover:text-fg",children:"Cancel"})]})]})}e.s(["AssistantPanel",0,function({title:e="Analytics assistant",placeholder:s="Ask about your 3D analytics…",className:n,...a}){let[r,o]=(0,t.useState)(null),i=(0,t.useCallback)(e=>new Promise(t=>o({model:e,resolve:t})),[]),{messages:l,status:c,error:d,toolActivity:u,initProgress:p,notice:m,backend:h,webGpuAvailable:g,isBusy:x,isReady:f,send:b,cancel:y,setBackend:v,models:w}=z({...a,confirmDownload:a.confirmDownload??i}),[k,j]=(0,t.useState)(""),[S,N]=(0,t.useState)(!1),[C,R]=(0,t.useState)(null),_=(0,t.useCallback)(e=>{e.preventDefault(),k.trim()&&!x&&(j(""),b(k))},[k,x,b]),A=function(e){let t=[];for(let s of e)"user"===s.role?t.push({role:"user",content:s.content}):"assistant"===s.role&&s.content.trim()&&t.push({role:"assistant",content:s.content});return t}(l),M=null===h,D=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=D.current;e&&"function"==typeof e.scrollIntoView&&e.scrollIntoView({block:"end"})},[l,c,u,m]);let O=u.some(e=>"running"===e.status),G=!x||p?null:O?"Running analytics…":"initializing"===c?"Loading model…":"Thinking…",T=M||S,U=(0,t.useCallback)(()=>{R(null),N(!0)},[]),$=(0,t.useCallback)(()=>{R(null),N(!1)},[]),W=(0,t.useCallback)(e=>{v(e),R(null),N(!1)},[v]);return(0,P.jsxs)("div",{className:`flex flex-col gap-3 text-sm text-fg ${n??""}`,children:[(0,P.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,P.jsx)("h2",{className:"text-base font-medium text-fg-hi",children:e}),!T&&(0,P.jsx)("button",{type:"button",className:"rounded-md border border-edge px-2 py-1 text-xs text-fg-muted hover:text-fg",onClick:U,children:"Change backend"})]}),T?null===C?(0,P.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,P.jsx)(E,{webGpuAvailable:g,onPick:R}),!M&&(0,P.jsx)("button",{type:"button",onClick:$,className:"self-start text-xs text-fg-muted hover:text-fg",children:"← Back to chat"})]}):(0,P.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,P.jsx)("button",{type:"button",onClick:()=>R(null),className:"self-start text-xs text-fg-muted hover:text-fg",children:"← Choose a different backend"}),(0,P.jsx)(B,{backend:h,initialKind:C,webGpuAvailable:g,models:w,onChange:W})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(L,{backend:h}),(0,P.jsxs)("div",{className:"flex max-h-[24rem] flex-col gap-2 overflow-y-auto",children:[(0,P.jsxs)("ol",{className:"flex min-h-[8rem] shrink-0 flex-col gap-2","aria-label":"Conversation",children:[0===A.length&&(0,P.jsxs)("li",{className:"flex flex-col gap-2 text-xs text-fg-muted",children:[(0,P.jsx)("span",{children:"Ask a question to get started — or try one of these:"}),(0,P.jsx)("div",{className:"flex flex-wrap gap-1.5","aria-label":"Example questions",children:q.map(e=>(0,P.jsx)("button",{type:"button",disabled:x||!f,onClick:()=>void b(e),className:"rounded-full border border-edge px-2.5 py-1 text-left text-fg hover:bg-ink/40 disabled:opacity-50",children:e},e))}),h?.backend==="local"&&(0,P.jsx)("p",{"data-role":"capability-note",children:"The local model answers quick, single-metric questions well. For deeper, multi-step analysis, switch to a hosted backend with your own key via “Change backend”."})]}),A.map((e,t)=>(0,P.jsxs)("li",{className:"user"===e.role?"text-fg-hi":"text-fg","data-role":e.role,children:[(0,P.jsx)("span",{className:"mr-1 text-xs uppercase text-fg-muted",children:"user"===e.role?"You":"Assistant"}),(0,P.jsx)("div",{className:"whitespace-pre-wrap",children:e.content})]},t))]}),(0,P.jsx)("div",{role:"status","aria-live":"polite",className:"shrink-0",children:G&&(0,P.jsxs)("span",{className:"flex items-center gap-2 text-xs text-fg-muted",children:[(0,P.jsx)("span",{"aria-hidden":"true",className:"h-3 w-3 animate-spin rounded-full border-2 border-fg-muted border-t-transparent"}),G]})}),u.length>0&&(0,P.jsx)("ul",{className:"flex shrink-0 flex-col gap-1 text-xs text-fg-muted","aria-label":"Tool activity",children:(function(e){let t=[];for(let s of e){let e=t[t.length-1];e&&e.name===s.name&&e.status===s.status?e.count+=1:t.push({name:s.name,status:s.status,count:1})}return t})(u).map((e,t)=>(0,P.jsxs)("li",{"data-status":e.status,"data-count":e.count,children:["running"===e.status?"⏳":"error"===e.status?"⚠️":"✓"," ",e.name,e.count>1?` \xd7${e.count}`:""]},`${e.name}-${t}`))}),m&&!x&&"error"!==c&&(0,P.jsx)("p",{className:"shrink-0 text-xs text-fg-muted","data-role":"notice","data-kind":m.kind,children:"stopped_on_max_steps"===m.kind?`The model kept using tools and didn't produce a written answer (stopped after ${m.steps} steps). Try rephrasing, ask it to summarize the results, or switch to a hosted model for tougher questions.`:"The assistant finished without a text answer. Try rephrasing, or ask it to summarize the results."}),(0,P.jsx)("div",{ref:D,"aria-hidden":"true",className:"shrink-0"})]}),p&&(0,P.jsxs)("div",{className:"flex flex-col gap-1 text-xs text-fg-muted","aria-label":"Model download progress",children:[(0,P.jsx)("span",{children:p.text}),(0,P.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-ink/60",children:(0,P.jsx)("div",{className:"h-full bg-emerald-400",style:{width:`${Math.round(100*p.progress)}%`}})})]}),"error"===c&&d&&(0,P.jsx)("div",{className:"rounded-md bg-rose-500/20 px-2 py-1 text-xs text-rose-300",role:"alert",children:"WebLlmStorageError"===d.name?(0,P.jsxs)("div",{className:"flex flex-col gap-1","data-kind":"storage",children:[(0,P.jsx)("span",{className:"font-medium",children:"Your browser is out of storage for the local model."}),(0,P.jsx)("span",{children:"Each local model caches about 4 GB in this site's browser storage, and trying several models stacks them up. To fix it: free up disk space, clear this site's cached data (browser settings → clear site data / storage), or pick the smallest model — or switch to a hosted backend. Then retry."})]}):(0,P.jsx)("span",{children:d.message})}),(0,P.jsxs)("form",{onSubmit:_,className:"flex items-center gap-2",children:[(0,P.jsx)("input",{type:"text",value:k,onChange:e=>j(e.target.value),placeholder:s,disabled:x,"aria-label":"Message",className:"flex-1 rounded-md border border-edge bg-ink/40 px-2 py-1 text-fg placeholder:text-fg-muted"}),x?(0,P.jsx)("button",{type:"button",onClick:y,className:"rounded-md border border-edge px-3 py-1 text-xs text-fg-muted hover:text-fg",children:"Stop"}):(0,P.jsx)("button",{type:"submit",disabled:!k.trim()||!f,className:"rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi disabled:opacity-50",children:"Send"})]})]}),r&&(0,P.jsx)(I,{model:r.model,onDecision:e=>{r.resolve(e),o(null)}})]})},"DEFAULT_SYSTEM_PROMPT",0,_,"composeSystemPrompt",0,A,"useAssistant",0,z],80760)},55810,function(e){e.n(e.i(80760))}]);
|
|
3
|
+
${n}`}function M(e){return"function"==typeof e.unload}function z(s={}){let{collectorUrl:n,apiKey:a,api:r,systemPrompt:o=_,maxSteps:i=12,confirmDownload:l,persistBackend:c=!0,now:d=()=>Date.now()}=s,u=(0,t.useContext)(R),p=(0,t.useMemo)(()=>r||(n&&a?new C.CollectorApi(n,a):u?.api??null),[r,n,a,u?.api]),[m]=(0,t.useState)(()=>(0,N.isWebGpuAvailable)()),[h,g]=(0,t.useState)(()=>s.backend?s.backend:(0,N.loadBackendConfig)()),[x,f]=(0,t.useState)([]),[b,v]=(0,t.useState)("idle"),[j,P]=(0,t.useState)(null),[q,E]=(0,t.useState)([]),[B,L]=(0,t.useState)(null),[I,D]=(0,t.useState)(null),O=(0,t.useRef)(x);O.current=x;let G=(0,t.useRef)(h);G.current=h;let T=(0,t.useRef)(d);T.current=d;let U=(0,t.useRef)(null),$=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{$.current?.abort();let e=U.current;U.current=null,e&&M(e.provider)&&e.provider.unload().catch(()=>{})},[]);let W=(0,t.useCallback)(e=>{g(e),c&&(0,N.saveBackendConfig)(e)},[c]),H=(0,t.useCallback)(async t=>{if("local"===t.backend){let{createWebLlmProvider:s}=await e.A(86354);return s({model:t.webllm?.model,confirmDownload:l,onInitProgress:e=>{L(e),v(e.progress>=1?"thinking":"initializing")}})}if(!t.hosted)throw Error("Hosted backend selected but not configured (endpoint, key, and model).");let{createHostedProvider:s}=await e.A(45697),{api:n,endpoint:a,apiKey:r,model:o}=t.hosted;return s({api:n,endpoint:a,apiKey:r,model:o})},[l]),F=(0,t.useCallback)(async e=>{let t=JSON.stringify(e),s=U.current;if(s&&s.key===t)return s.provider;s&&M(s.provider)&&s.provider.unload().catch(()=>{});let n=await H(e);return U.current={key:t,provider:n},n},[H]),V=(0,t.useCallback)(async e=>{let t=e.trim();if(!t)return;let s=G.current;if(!p){P(Error("No collector connection. Pass collectorUrl + apiKey or wrap in <UptimizrProvider>.")),v("error");return}if(!s){P(Error("No assistant backend selected. Choose a local or hosted backend first.")),v("error");return}let n={role:"user",content:t},a=O.current,r=0===a.length?[{role:"system",content:A(o,T.current())},n]:[...a,n];f(r),E([]),P(null),L(null),D(null),v("initializing");let l=new AbortController;$.current=l;let c=e=>E(t=>{let s=t.findIndex(e=>"running"===e.status),n=-1===s?void 0:t[s];if(!n)return t;let a=t.slice();return a[s]={...n,status:e},a});try{var d;let e=await F(s);v("thinking");let t=await k({provider:{async complete(t){let s=await e.complete(t);return"tool_calls"===s.kind&&E(e=>[...e,...s.toolCalls.map(e=>({id:e.id,name:e.name,status:"running"}))]),s}},client:{async get(e,t){try{let s=await p.read(e,t);return c("done"),s}catch(e){throw c("error"),e}}},messages:r,tools:(d="local"===s.backend?"core":"full","core"===d?w:y),maxSteps:i,signal:l.signal});f(t.messages),E(e=>e.map(e=>"running"===e.status?{...e,status:"done"}:e)),t.stoppedOnMaxSteps?D({kind:"stopped_on_max_steps",steps:t.steps}):0===t.content.trim().length&&D({kind:"no_answer"}),v("idle")}catch(e){if(l.signal.aborted)return void v("idle");P(e instanceof Error?e:Error(String(e))),v("error")}finally{L(null),$.current===l&&($.current=null)}},[p,o,i,F]),X=(0,t.useCallback)(()=>{$.current?.abort()},[]),J=(0,t.useCallback)(()=>{$.current?.abort(),f([]),E([]),P(null),L(null),D(null),v("idle")},[]);return{messages:x,status:b,error:j,toolActivity:q,initProgress:B,notice:I,backend:h,webGpuAvailable:m,models:S.CURATED_MODELS,isReady:!!p&&!!h,isBusy:"initializing"===b||"thinking"===b,send:V,setBackend:W,cancel:X,reset:J}}var P=e.i(63671);let q=["What are my top meshes this week?","How's my average FPS?","Which scenes had activity today?","How many events in the last 24 hours?","How many sessions this week?"];function E({webGpuAvailable:e,onPick:t}){return(0,P.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,P.jsx)("p",{className:"text-xs text-fg-muted",children:"Choose how the assistant runs. Nothing is loaded or downloaded until you pick — your choice is remembered next time."}),(0,P.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,P.jsxs)("div",{className:`flex flex-col gap-2 rounded-md border border-edge p-3 ${e?"":"opacity-60"}`,children:[(0,P.jsxs)("div",{className:"flex items-center gap-2",children:[(0,P.jsx)("h3",{className:"text-sm font-medium text-fg-hi",children:"Local (in-browser)"}),e&&(0,P.jsx)("span",{className:"rounded-full bg-emerald-500/20 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-emerald-300",children:"Recommended"})]}),(0,P.jsxs)("p",{className:"text-xs text-fg-muted",children:["Private — ",(0,P.jsx)("strong",{children:"nothing leaves your device"}),". Runs on your GPU. Requires a WebGPU browser with ~5 GB free VRAM and a one-time ~4 GB model download."]}),(0,P.jsx)("button",{type:"button",disabled:!e,onClick:()=>t("local"),className:"mt-auto self-start rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi disabled:opacity-50",children:"Use local"}),!e&&(0,P.jsx)("p",{className:"text-[11px] text-fg-muted",children:"Requires a WebGPU browser."})]}),(0,P.jsxs)("div",{className:"flex flex-col gap-2 rounded-md border border-edge p-3",children:[(0,P.jsx)("h3",{className:"text-sm font-medium text-fg-hi",children:"Bring your own hosted key"}),(0,P.jsxs)("p",{className:"text-xs text-fg-muted",children:["Lightweight — no download. You supply an OpenAI-compatible or Anthropic endpoint + key. Your questions and aggregated analytics context are"," ",(0,P.jsx)("strong",{children:"sent to that provider"})," (never raw events or PII)."]}),(0,P.jsx)("button",{type:"button",onClick:()=>t("hosted"),className:"mt-auto self-start rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi",children:"Use hosted key"})]})]})]})}function B({backend:e,webGpuAvailable:s,models:n,onChange:a,initialKind:r}){let[o,i]=(0,t.useState)(r??e?.backend??(s?"local":"hosted")),[l,c]=(0,t.useState)(e?.webllm?.model??n[0]?.id??""),[d,u]=(0,t.useState)(e?.hosted?.api??"openai"),[p,m]=(0,t.useState)(e?.hosted?.endpoint??""),[h,g]=(0,t.useState)(e?.hosted?.apiKey??""),[x,f]=(0,t.useState)(e?.hosted?.model??"");return(0,P.jsxs)("fieldset",{className:"flex flex-col gap-2 rounded-md border border-edge p-2 text-xs",children:[(0,P.jsx)("legend",{className:"px-1 text-fg-muted",children:"LLM backend"}),(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("input",{type:"radio",name:"assistant-backend",checked:"local"===o,disabled:!s,onChange:()=>i("local")}),(0,P.jsxs)("span",{className:s?"text-fg":"text-fg-muted",children:["Local (WebLLM / WebGPU) — runs in your browser, zero egress",!s&&" (WebGPU unavailable)"]})]}),"local"===o&&s&&(0,P.jsxs)("div",{className:"ml-6 flex flex-col gap-1",children:[(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("span",{className:"text-fg-muted",children:"Model"}),(0,P.jsx)("select",{"aria-label":"Local model",value:l,className:"rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>c(e.target.value),children:n.map(e=>(0,P.jsxs)("option",{value:e.id,children:[e.label," (",e.downloadSize,")"]},e.id))})]}),(0,P.jsx)("button",{type:"button",onClick:()=>a({backend:"local",webllm:{model:l}}),disabled:!l,className:"self-start rounded-md bg-emerald-500/70 px-2 py-0.5 text-fg-hi disabled:opacity-50",children:"Use this model locally"})]}),(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("input",{type:"radio",name:"assistant-backend",checked:"hosted"===o,onChange:()=>i("hosted")}),(0,P.jsx)("span",{className:"text-fg",children:"Bring your own hosted provider (OpenAI-compatible or Anthropic)"})]}),"hosted"===o&&(0,P.jsxs)("div",{className:"ml-6 flex flex-col gap-1",children:[(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("span",{className:"w-16 text-fg-muted",children:"API"}),(0,P.jsxs)("select",{"aria-label":"Hosted API",value:d,className:"rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>u(e.target.value),children:[(0,P.jsx)("option",{value:"openai",children:"OpenAI-compatible"}),(0,P.jsx)("option",{value:"anthropic",children:"Anthropic"})]})]}),(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("span",{className:"w-16 text-fg-muted",children:"Endpoint"}),(0,P.jsx)("input",{type:"url","aria-label":"Endpoint",value:p,placeholder:"https://api.openai.com/v1",className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>m(e.target.value)})]}),(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("span",{className:"w-16 text-fg-muted",children:"API key"}),(0,P.jsx)("input",{type:"password","aria-label":"API key",value:h,className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>g(e.target.value)})]}),(0,P.jsxs)("label",{className:"flex items-center gap-2",children:[(0,P.jsx)("span",{className:"w-16 text-fg-muted",children:"Model"}),(0,P.jsx)("input",{type:"text","aria-label":"Hosted model",value:x,placeholder:"gpt-4o-mini",className:"flex-1 rounded-sm border border-edge bg-ink/40 px-1 py-0.5 text-fg",onChange:e=>f(e.target.value)})]}),(0,P.jsx)("button",{type:"button",onClick:()=>a({backend:"hosted",hosted:{api:d,endpoint:p,apiKey:h,model:x}}),disabled:!p||!h||!x,className:"self-start rounded-md bg-emerald-500/70 px-2 py-0.5 text-fg-hi disabled:opacity-50",children:"Use this provider"})]})]})}function L({backend:e}){let t=e?.backend==="hosted"?"Your prompt and aggregated results are sent to your own provider — never raw events or PII.":"Runs 100% in your browser. Nothing — not your prompt nor your data — leaves this device.";return(0,P.jsx)("p",{className:"text-xs text-fg-muted",children:t})}function I({model:e,onDecision:t}){return(0,P.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Download model",className:"flex flex-col gap-2 rounded-md border border-edge bg-surface p-3 text-xs",children:[(0,P.jsxs)("p",{className:"text-fg",children:["Download ",(0,P.jsx)("strong",{children:e.label})," (",e.downloadSize,", needs ~",e.vram," VRAM)? It runs 100% locally in your browser and nothing leaves this device."]}),(0,P.jsx)("p",{className:"text-fg-muted",children:e.description}),(0,P.jsxs)("div",{className:"flex gap-2",children:[(0,P.jsx)("button",{type:"button",onClick:()=>t(!0),className:"rounded-md bg-emerald-500/70 px-3 py-1 text-fg-hi",children:"Download & run locally"}),(0,P.jsx)("button",{type:"button",onClick:()=>t(!1),className:"rounded-md border border-edge px-3 py-1 text-fg-muted hover:text-fg",children:"Cancel"})]})]})}e.s(["AssistantPanel",0,function({title:e="Analytics assistant",placeholder:s="Ask about your 3D analytics…",className:n,...a}){let[r,o]=(0,t.useState)(null),i=(0,t.useCallback)(e=>new Promise(t=>o({model:e,resolve:t})),[]),{messages:l,status:c,error:d,toolActivity:u,initProgress:p,notice:m,backend:h,webGpuAvailable:g,isBusy:x,isReady:f,send:b,cancel:y,setBackend:v,models:w}=z({...a,confirmDownload:a.confirmDownload??i}),[k,j]=(0,t.useState)(""),[S,N]=(0,t.useState)(!1),[C,R]=(0,t.useState)(null),_=(0,t.useCallback)(e=>{e.preventDefault(),k.trim()&&!x&&(j(""),b(k))},[k,x,b]),A=function(e){let t=[];for(let s of e)"user"===s.role?t.push({role:"user",content:s.content}):"assistant"===s.role&&s.content.trim()&&t.push({role:"assistant",content:s.content});return t}(l),M=null===h,D=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=D.current;e&&"function"==typeof e.scrollIntoView&&e.scrollIntoView({block:"end"})},[l,c,u,m]);let O=u.some(e=>"running"===e.status),G=!x||p?null:O?"Running analytics…":"initializing"===c?"Loading model…":"Thinking…",T=M||S,U=(0,t.useCallback)(()=>{R(null),N(!0)},[]),$=(0,t.useCallback)(()=>{R(null),N(!1)},[]),W=(0,t.useCallback)(e=>{v(e),R(null),N(!1)},[v]);return(0,P.jsxs)("div",{className:`flex flex-col gap-3 text-sm text-fg ${n??""}`,children:[(0,P.jsxs)("header",{className:"flex items-center justify-between gap-2",children:[(0,P.jsx)("h2",{className:"text-base font-medium text-fg-hi",children:e}),!T&&(0,P.jsx)("button",{type:"button",className:"rounded-md border border-edge px-2 py-1 text-xs text-fg-muted hover:text-fg",onClick:U,children:"Change backend"})]}),T?null===C?(0,P.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,P.jsx)(E,{webGpuAvailable:g,onPick:R}),!M&&(0,P.jsx)("button",{type:"button",onClick:$,className:"self-start text-xs text-fg-muted hover:text-fg",children:"← Back to chat"})]}):(0,P.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,P.jsx)("button",{type:"button",onClick:()=>R(null),className:"self-start text-xs text-fg-muted hover:text-fg",children:"← Choose a different backend"}),(0,P.jsx)(B,{backend:h,initialKind:C,webGpuAvailable:g,models:w,onChange:W})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(L,{backend:h}),(0,P.jsxs)("div",{className:"flex max-h-[24rem] flex-col gap-2 overflow-y-auto",children:[(0,P.jsxs)("ol",{className:"flex min-h-[8rem] shrink-0 flex-col gap-2","aria-label":"Conversation",children:[0===A.length&&(0,P.jsxs)("li",{className:"flex flex-col gap-2 text-xs text-fg-muted",children:[(0,P.jsx)("span",{children:"Ask a question to get started — or try one of these:"}),(0,P.jsx)("div",{className:"flex flex-wrap gap-1.5","aria-label":"Example questions",children:q.map(e=>(0,P.jsx)("button",{type:"button",disabled:x||!f,onClick:()=>void b(e),className:"rounded-full border border-edge px-2.5 py-1 text-left text-fg hover:bg-ink/40 disabled:opacity-50",children:e},e))}),h?.backend==="local"&&(0,P.jsx)("p",{"data-role":"capability-note",children:"The local model answers quick, single-metric questions well. For deeper, multi-step analysis, switch to a hosted backend with your own key via “Change backend”."})]}),A.map((e,t)=>(0,P.jsxs)("li",{className:"user"===e.role?"text-fg-hi":"text-fg","data-role":e.role,children:[(0,P.jsx)("span",{className:"mr-1 text-xs uppercase text-fg-muted",children:"user"===e.role?"You":"Assistant"}),(0,P.jsx)("div",{className:"whitespace-pre-wrap",children:e.content})]},t))]}),(0,P.jsx)("div",{role:"status","aria-live":"polite",className:"shrink-0",children:G&&(0,P.jsxs)("span",{className:"flex items-center gap-2 text-xs text-fg-muted",children:[(0,P.jsx)("span",{"aria-hidden":"true",className:"h-3 w-3 animate-spin rounded-full border-2 border-fg-muted border-t-transparent"}),G]})}),u.length>0&&(0,P.jsx)("ul",{className:"flex shrink-0 flex-col gap-1 text-xs text-fg-muted","aria-label":"Tool activity",children:(function(e){let t=[];for(let s of e){let e=t[t.length-1];e&&e.name===s.name&&e.status===s.status?e.count+=1:t.push({name:s.name,status:s.status,count:1})}return t})(u).map((e,t)=>(0,P.jsxs)("li",{"data-status":e.status,"data-count":e.count,children:["running"===e.status?"⏳":"error"===e.status?"⚠️":"✓"," ",e.name,e.count>1?` \xd7${e.count}`:""]},`${e.name}-${t}`))}),m&&!x&&"error"!==c&&(0,P.jsx)("p",{className:"shrink-0 text-xs text-fg-muted","data-role":"notice","data-kind":m.kind,children:"stopped_on_max_steps"===m.kind?`The model kept using tools and didn't produce a written answer (stopped after ${m.steps} steps). Try rephrasing, ask it to summarize the results, or switch to a hosted model for tougher questions.`:"The assistant finished without a text answer. Try rephrasing, or ask it to summarize the results."}),(0,P.jsx)("div",{ref:D,"aria-hidden":"true",className:"shrink-0"})]}),p&&(0,P.jsxs)("div",{className:"flex flex-col gap-1 text-xs text-fg-muted","aria-label":"Model download progress",children:[(0,P.jsx)("span",{children:p.text}),(0,P.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-ink/60",children:(0,P.jsx)("div",{className:"h-full bg-emerald-400",style:{width:`${Math.round(100*p.progress)}%`}})})]}),"error"===c&&d&&(0,P.jsx)("div",{className:"rounded-md bg-rose-500/20 px-2 py-1 text-xs text-rose-300",role:"alert",children:"WebLlmStorageError"===d.name?(0,P.jsxs)("div",{className:"flex flex-col gap-1","data-kind":"storage",children:[(0,P.jsx)("span",{className:"font-medium",children:"Your browser is out of storage for the local model."}),(0,P.jsx)("span",{children:"Each local model caches about 4 GB in this site's browser storage, and trying several models stacks them up. To fix it: free up disk space, clear this site's cached data (browser settings → clear site data / storage), or pick the smallest model — or switch to a hosted backend. Then retry."})]}):(0,P.jsx)("span",{children:d.message})}),(0,P.jsxs)("form",{onSubmit:_,className:"flex items-center gap-2",children:[(0,P.jsx)("input",{type:"text",value:k,onChange:e=>j(e.target.value),placeholder:s,disabled:x,"aria-label":"Message",className:"flex-1 rounded-md border border-edge bg-ink/40 px-2 py-1 text-fg placeholder:text-fg-muted"}),x?(0,P.jsx)("button",{type:"button",onClick:y,className:"rounded-md border border-edge px-3 py-1 text-xs text-fg-muted hover:text-fg",children:"Stop"}):(0,P.jsx)("button",{type:"submit",disabled:!k.trim()||!f,className:"rounded-md bg-emerald-500/70 px-3 py-1 text-xs text-fg-hi disabled:opacity-50",children:"Send"})]})]}),r&&(0,P.jsx)(I,{model:r.model,onDecision:e=>{r.resolve(e),o(null)}})]})},"DEFAULT_SYSTEM_PROMPT",0,_,"composeSystemPrompt",0,A,"useAssistant",0,z],80760)},55810,function(e){e.n(e.i(80760))}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,93765,99043,82826,25797,94882,80820,e=>{"use strict";var t=e.i(25044);let r="bonesDeclaration",i=`#if NUM_BONE_INFLUENCERS>0
|
|
2
2
|
#ifndef USE_VERTEX_PULLING
|
|
3
3
|
attribute matricesIndices : vec4f;attribute matricesWeights : vec4f;
|
|
4
4
|
#if NUM_BONE_INFLUENCERS>4
|
|
@@ -21,7 +21,7 @@ let textureWidth=i32(uniforms.boneTextureInfo.x);let y=offset/textureWidth;let x
|
|
|
21
21
|
#endif
|
|
22
22
|
#endif
|
|
23
23
|
#endif
|
|
24
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["bonesDeclarationWGSL",0,{name:r,shader:i}],
|
|
24
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["bonesDeclarationWGSL",0,{name:r,shader:i}],93765);let n="bakedVertexAnimationDeclaration",a=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
25
25
|
uniform bakedVertexAnimationTime: f32;uniform bakedVertexAnimationSettings: vec4<f32>;var bakedVertexAnimationTexture : texture_2d<f32>;
|
|
26
26
|
#ifdef INSTANCES
|
|
27
27
|
attribute bakedVertexAnimationSettingsInstanced : vec4<f32>;
|
|
@@ -29,7 +29,7 @@ attribute bakedVertexAnimationSettingsInstanced : vec4<f32>;
|
|
|
29
29
|
fn readMatrixFromRawSamplerVAT(smp : texture_2d<f32>,index : f32,frame : f32)->mat4x4<f32>
|
|
30
30
|
{let offset=i32(index)*4;let frameUV=i32(frame);let m0=textureLoad(smp,vec2<i32>(offset+0,frameUV),0);let m1=textureLoad(smp,vec2<i32>(offset+1,frameUV),0);let m2=textureLoad(smp,vec2<i32>(offset+2,frameUV),0);let m3=textureLoad(smp,vec2<i32>(offset+3,frameUV),0);return mat4x4<f32>(m0,m1,m2,m3);}
|
|
31
31
|
#endif
|
|
32
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["bakedVertexAnimationDeclarationWGSL",0,{name:n,shader:a}],
|
|
32
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["bakedVertexAnimationDeclarationWGSL",0,{name:n,shader:a}],99043);let f="instancesDeclaration",d=`#ifdef INSTANCES
|
|
33
33
|
attribute world0 : vec4<f32>;attribute world1 : vec4<f32>;attribute world2 : vec4<f32>;attribute world3 : vec4<f32>;
|
|
34
34
|
#ifdef INSTANCESCOLOR
|
|
35
35
|
attribute instanceColor : vec4<f32>;
|
|
@@ -51,7 +51,7 @@ uniform world : mat4x4<f32>;
|
|
|
51
51
|
uniform previousWorld : mat4x4<f32>;
|
|
52
52
|
#endif
|
|
53
53
|
#endif
|
|
54
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=d),e.s(["instancesDeclarationWGSL",0,{name:f,shader:d}],
|
|
54
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[f]||(t.ShaderStore.IncludesShadersStoreWGSL[f]=d),e.s(["instancesDeclarationWGSL",0,{name:f,shader:d}],82826);let s="instancesVertex",o=`#ifdef INSTANCES
|
|
55
55
|
var finalWorld=mat4x4<f32>(vertexInputs.world0,vertexInputs.world1,vertexInputs.world2,vertexInputs.world3);
|
|
56
56
|
#if defined(PREPASS_VELOCITY) || defined(VELOCITY) || defined(PREPASS_VELOCITY_LINEAR) || defined(VELOCITY_LINEAR)
|
|
57
57
|
var finalPreviousWorld=mat4x4<f32>(
|
|
@@ -78,7 +78,7 @@ var finalWorld=mesh.world;
|
|
|
78
78
|
var finalPreviousWorld=uniforms.previousWorld;
|
|
79
79
|
#endif
|
|
80
80
|
#endif
|
|
81
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[s]||(t.ShaderStore.IncludesShadersStoreWGSL[s]=o),e.s(["instancesVertexWGSL",0,{name:s,shader:o}],
|
|
81
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[s]||(t.ShaderStore.IncludesShadersStoreWGSL[s]=o),e.s(["instancesVertexWGSL",0,{name:s,shader:o}],25797);let l="bonesVertex",u=`#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
82
82
|
#if NUM_BONE_INFLUENCERS>0
|
|
83
83
|
var influence : mat4x4<f32>;
|
|
84
84
|
#ifdef BONETEXTURE
|
|
@@ -131,7 +131,7 @@ influence=influence+uniforms.mBones[i32(vertexInputs.matricesIndicesExtra[3])]*v
|
|
|
131
131
|
finalWorld=finalWorld*influence;
|
|
132
132
|
#endif
|
|
133
133
|
#endif
|
|
134
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[l]||(t.ShaderStore.IncludesShadersStoreWGSL[l]=u),e.s(["bonesVertexWGSL",0,{name:l,shader:u}],
|
|
134
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[l]||(t.ShaderStore.IncludesShadersStoreWGSL[l]=u),e.s(["bonesVertexWGSL",0,{name:l,shader:u}],94882);let m="bakedVertexAnimation",c=`#ifdef BAKED_VERTEX_ANIMATION_TEXTURE
|
|
135
135
|
{
|
|
136
136
|
#ifdef INSTANCES
|
|
137
137
|
let VATStartFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.x;let VATEndFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.y;let VATOffsetFrame: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.z;let VATSpeed: f32=vertexInputs.bakedVertexAnimationSettingsInstanced.w;
|
|
@@ -162,7 +162,7 @@ VATInfluence=VATInfluence+readMatrixFromRawSamplerVAT(bakedVertexAnimationTextur
|
|
|
162
162
|
#endif
|
|
163
163
|
finalWorld=finalWorld*VATInfluence;}
|
|
164
164
|
#endif
|
|
165
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[m]||(t.ShaderStore.IncludesShadersStoreWGSL[m]=c),e.s(["bakedVertexAnimationWGSL",0,{name:m,shader:c}],
|
|
165
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[m]||(t.ShaderStore.IncludesShadersStoreWGSL[m]=c),e.s(["bakedVertexAnimationWGSL",0,{name:m,shader:c}],80820)},67667,15345,e=>{"use strict";var t=e.i(25044);let r="clipPlaneVertexDeclaration",i=`#ifdef CLIPPLANE
|
|
166
166
|
uniform vClipPlane: vec4<f32>;varying fClipDistance: f32;
|
|
167
167
|
#endif
|
|
168
168
|
#ifdef CLIPPLANE2
|
|
@@ -180,7 +180,7 @@ uniform vClipPlane5: vec4<f32>;varying fClipDistance5: f32;
|
|
|
180
180
|
#ifdef CLIPPLANE6
|
|
181
181
|
uniform vClipPlane6: vec4<f32>;varying fClipDistance6: f32;
|
|
182
182
|
#endif
|
|
183
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["clipPlaneVertexDeclarationWGSL",0,{name:r,shader:i}],
|
|
183
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["clipPlaneVertexDeclarationWGSL",0,{name:r,shader:i}],67667);let n="clipPlaneVertex",a=`#ifdef CLIPPLANE
|
|
184
184
|
vertexOutputs.fClipDistance=dot(worldPos,uniforms.vClipPlane);
|
|
185
185
|
#endif
|
|
186
186
|
#ifdef CLIPPLANE2
|
|
@@ -198,17 +198,17 @@ vertexOutputs.fClipDistance5=dot(worldPos,uniforms.vClipPlane5);
|
|
|
198
198
|
#ifdef CLIPPLANE6
|
|
199
199
|
vertexOutputs.fClipDistance6=dot(worldPos,uniforms.vClipPlane6);
|
|
200
200
|
#endif
|
|
201
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["clipPlaneVertexWGSL",0,{name:n,shader:a}],
|
|
201
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["clipPlaneVertexWGSL",0,{name:n,shader:a}],15345)},3828,45320,e=>{"use strict";var t=e.i(25044);let r="fogVertexDeclaration",i=`#ifdef FOG
|
|
202
202
|
varying vFogDistance: vec3f;
|
|
203
203
|
#endif
|
|
204
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["fogVertexDeclarationWGSL",0,{name:r,shader:i}],
|
|
204
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["fogVertexDeclarationWGSL",0,{name:r,shader:i}],3828);let n="fogVertex",a=`#ifdef FOG
|
|
205
205
|
#ifdef SCENE_UBO
|
|
206
206
|
vertexOutputs.vFogDistance=(scene.view*worldPos).xyz;
|
|
207
207
|
#else
|
|
208
208
|
vertexOutputs.vFogDistance=(uniforms.view*worldPos).xyz;
|
|
209
209
|
#endif
|
|
210
210
|
#endif
|
|
211
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["fogVertexWGSL",0,{name:n,shader:a}],
|
|
211
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[n]||(t.ShaderStore.IncludesShadersStoreWGSL[n]=a),e.s(["fogVertexWGSL",0,{name:n,shader:a}],45320)},9613,e=>{"use strict";var t=e.i(25044);let r="vertexColorMixing",i=`#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES)
|
|
212
212
|
vertexOutputs.vColor=vec4f(1.0);
|
|
213
213
|
#ifdef VERTEXCOLOR
|
|
214
214
|
#ifdef VERTEXALPHA
|
|
@@ -221,7 +221,7 @@ vertexOutputs.vColor=vec4f(vertexOutputs.vColor.rgb*colorUpdated.rgb,vertexOutpu
|
|
|
221
221
|
vertexOutputs.vColor*=vertexInputs.instanceColor;
|
|
222
222
|
#endif
|
|
223
223
|
#endif
|
|
224
|
-
`;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["vertexColorMixingWGSL",0,{name:r,shader:i}])},
|
|
224
|
+
`;t.ShaderStore.IncludesShadersStoreWGSL[r]||(t.ShaderStore.IncludesShadersStoreWGSL[r]=i),e.s(["vertexColorMixingWGSL",0,{name:r,shader:i}])},18042,e=>{"use strict";var t=e.i(25044),r=e.i(93765),i=e.i(99043),n=e.i(67667),a=e.i(3828),f=e.i(82826),d=e.i(25797),s=e.i(94882),o=e.i(80820),l=e.i(15345),u=e.i(45320),m=e.i(9613);let c="colorVertexShader",S=`attribute position: vec3f;
|
|
225
225
|
#ifdef VERTEXCOLOR
|
|
226
226
|
attribute color: vec4f;
|
|
227
227
|
#endif
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,5792,t=>{"use strict";var i=t.i(65678),e=t.i(8697),n=t.i(68166),o=t.i(68282);class a extends n.FlowGraphAsyncExecutionBlock{constructor(t){super(t),this.animationGroup=this.registerDataInput("animationGroup",i.RichTypeAny),this.stopAtFrame=this.registerDataInput("stopAtFrame",i.RichTypeNumber,-1)}_preparePendingTasks(t){let i=this.animationGroup.getValue(t),e=this.stopAtFrame.getValue(t)??-1,n=t._getGlobalContextVariable("pendingStopAnimations",[]);n.push({uniqueId:i.uniqueId,stopAtFrame:e}),t._setGlobalContextVariable("pendingStopAnimations",n)}_cancelPendingTasks(t){let i=this.animationGroup.getValue(t),e=t._getGlobalContextVariable("pendingStopAnimations",[]);for(let n=0;n<e.length;n++)if(e[n].uniqueId===i.uniqueId){e.splice(n,1),t._setGlobalContextVariable("pendingStopAnimations",e);break}}_execute(t){let i=this.animationGroup.getValue(t),n=this.stopAtFrame.getValue(t)??-1;return i?isNaN(n)?this._reportError(t,"Invalid stop time."):void(n>0?this._startPendingTasks(t):this._stopAnimation(i,t),this.out._activateSignal(t)):(e.Logger.Warn("No animation group provided to stop."),this._reportError(t,"No animation group provided to stop."))}_executeOnTick(t){let i=this.animationGroup.getValue(t),e=t._getGlobalContextVariable("pendingStopAnimations",[]);for(let n=0;n<e.length;n++)if(e[n].uniqueId===i.uniqueId&&i.getCurrentFrame()>=e[n].stopAtFrame){this._stopAnimation(i,t),e.splice(n,1),t._setGlobalContextVariable("pendingStopAnimations",e),this.done._activateSignal(t),t._removePendingBlock(this);break}}getClassName(){return"FlowGraphStopAnimationBlock"}_stopAnimation(t,i){let e=i._getGlobalContextVariable("currentlyRunningAnimationGroups",[]),n=e.indexOf(t.uniqueId);-1!==n&&(t.stop(!0),e.splice(n,1),i._setGlobalContextVariable("currentlyRunningAnimationGroups",e))}}let r=!1;t.s(["FlowGraphStopAnimationBlock",0,a,"RegisterFlowGraphStopAnimationBlock",0,function(){r||(r=!0,(0,o.RegisterClass)("FlowGraphStopAnimationBlock",a))}])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,58773,e=>{"use strict";e.s(["useOpenGLOrientationForUV",()=>!1])},79452,e=>{"use strict";let t,i,r,s,a,n,h,l,o,u,_,c,d,g,x,f,m,p,R,S,T,M,I,A,v,O,b,z,y,E,D,w,L,C,B,U,V,N,G,P,F,k,W,Y,j,q,H,Z,X,$,J,K,Q,ee,et,ei,er,es;var ea,en,eh=e.i(4112),el=e.i(91679),eo=e.i(42704),eu=e.i(72003),e_=e.i(72986),ec=e.i(6939),ed=e.i(19696),eg=e.i(22832),ex=e.i(43880);let ef=(O=class e{get wrapU(){return this._wrapU}set wrapU(e){this._wrapU=e}get wrapV(){return this._wrapV}set wrapV(e){this._wrapV=e}get coordinatesMode(){return 0}get isCube(){return!!this._texture&&this._texture.isCube}set isCube(e){this._texture&&(this._texture.isCube=e)}get is3D(){return!!this._texture&&this._texture.is3D}set is3D(e){this._texture&&(this._texture.is3D=e)}get is2DArray(){return!!this._texture&&this._texture.is2DArray}set is2DArray(e){this._texture&&(this._texture.is2DArray=e)}getClassName(){return"ThinTexture"}static _IsRenderTargetWrapper(e){return e?.shareDepth!==void 0}constructor(t){this._wrapU=1,this._wrapV=1,this.wrapR=1,this.anisotropicFilteringLevel=4,this.delayLoadState=0,this._texture=null,this._engine=null,this._cachedSize=ed.Size.Zero(),this._cachedBaseSize=ed.Size.Zero(),this._initialSamplingMode=2,this._texture=e._IsRenderTargetWrapper(t)?t.texture:t,this._texture&&(this._engine=this._texture.getEngine(),this.wrapU=this._texture._cachedWrapU??this.wrapU,this.wrapV=this._texture._cachedWrapV??this.wrapV,this.wrapR=this._texture._cachedWrapR??this.wrapR)}isReady(){return 4===this.delayLoadState?(this.delayLoad(),!1):!!this._texture&&this._texture.isReady}delayLoad(){}getInternalTexture(){return this._texture}getSize(){if(this._texture){if(this._texture.width)return this._cachedSize.width=this._texture.width,this._cachedSize.height=this._texture.height,this._cachedSize;this._texture._size&&(this._cachedSize.width=this._texture._size,this._cachedSize.height=this._texture._size)}return this._cachedSize}getBaseSize(){return this.isReady()&&this._texture?this._texture._size?(this._cachedBaseSize.width=this._texture._size,this._cachedBaseSize.height=this._texture._size):(this._cachedBaseSize.width=this._texture.baseWidth,this._cachedBaseSize.height=this._texture.baseHeight):(this._cachedBaseSize.width=0,this._cachedBaseSize.height=0),this._cachedBaseSize}get samplingMode(){return this._texture?this._texture.samplingMode:this._initialSamplingMode}updateSamplingMode(e,t=!1){this._texture&&this._engine&&this._engine.updateTextureSamplingMode(e,this._texture,this._texture.generateMipMaps&&t)}releaseInternalTexture(){this._texture&&(this._texture.dispose(),this._texture=null)}dispose(){this._texture&&(this.releaseInternalTexture(),this._engine=null)}},b=[],z=[],y=[],E=[],D=[],w=[],L=[],C=[],B=[],U=[],V=[],N=[],G=[],P=[],F=[],k=[],W=[],Y=[],j=[],q=[],H=[],Z=[],X=[],$=[],J=[],K=[],Q=[],ee=[],et=[],ei=[],er=[],ea=class extends O{set hasAlpha(e){this._hasAlpha!==e&&(this._hasAlpha=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get hasAlpha(){return this._hasAlpha}set getAlphaFromRGB(e){this._getAlphaFromRGB!==e&&(this._getAlphaFromRGB=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get getAlphaFromRGB(){return this._getAlphaFromRGB}set coordinatesIndex(e){this._coordinatesIndex!==e&&(this._coordinatesIndex=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get coordinatesIndex(){return this._coordinatesIndex}set coordinatesMode(e){this._coordinatesMode!==e&&(this._coordinatesMode=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get coordinatesMode(){return this._coordinatesMode}get wrapU(){return this._wrapU}set wrapU(e){this._wrapU=e}get wrapV(){return this._wrapV}set wrapV(e){this._wrapV=e}get isCube(){return this._texture?this._texture.isCube:this._isCube}set isCube(e){this._texture?this._texture.isCube=e:this._isCube=e}get is3D(){return!!this._texture&&this._texture.is3D}set is3D(e){this._texture&&(this._texture.is3D=e)}get is2DArray(){return!!this._texture&&this._texture.is2DArray}set is2DArray(e){this._texture&&(this._texture.is2DArray=e)}get gammaSpace(){return this._texture?(null===this._texture._gammaSpace&&(this._texture._gammaSpace=this._gammaSpace),this._texture._gammaSpace&&!this._texture._useSRGBBuffer):this._gammaSpace}set gammaSpace(e){if(this._texture){if(this._texture._gammaSpace===e)return;this._texture._gammaSpace=e}else{if(this._gammaSpace===e)return;this._gammaSpace=e}this.getScene()?.markAllMaterialsAsDirty(1,e=>e.hasTexture(this))}get isRGBD(){return null!=this._texture&&this._texture._isRGBD}set isRGBD(e){e!==this.isRGBD&&(this._texture&&(this._texture._isRGBD=e),this.getScene()?.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get noMipmap(){return!1}get lodGenerationOffset(){return this._texture?this._texture._lodGenerationOffset:0}set lodGenerationOffset(e){this._texture&&(this._texture._lodGenerationOffset=e)}get lodGenerationScale(){return this._texture?this._texture._lodGenerationScale:0}set lodGenerationScale(e){this._texture&&(this._texture._lodGenerationScale=e)}get linearSpecularLOD(){return!!this._texture&&this._texture._linearSpecularLOD}set linearSpecularLOD(e){this._texture&&(this._texture._linearSpecularLOD=e)}get irradianceTexture(){return this._texture?this._texture._irradianceTexture:null}set irradianceTexture(e){this._texture&&(this._texture._irradianceTexture=e)}get uid(){return this._uid||(this._uid=(0,ec.RandomGUID)()),this._uid}toString(){return this.name}getClassName(){return"BaseTexture"}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}get isBlocking(){return!0}get loadingError(){return this._loadingError}get errorObject(){return this._errorObject}constructor(e,t=null){super(null),this.uniqueId=((0,eh.__runInitializers)(this,b),(0,eh.__runInitializers)(this,z,void 0)),this.name=((0,eh.__runInitializers)(this,y),(0,eh.__runInitializers)(this,E,void 0)),this.displayName=((0,eh.__runInitializers)(this,D),(0,eh.__runInitializers)(this,w,void 0)),this.metadata=((0,eh.__runInitializers)(this,L),(0,eh.__runInitializers)(this,C,null)),this._internalMetadata=(0,eh.__runInitializers)(this,B),this.reservedDataStore=null,this._hasAlpha=(0,eh.__runInitializers)(this,U,!1),this._getAlphaFromRGB=((0,eh.__runInitializers)(this,V),(0,eh.__runInitializers)(this,N,!1)),this.level=((0,eh.__runInitializers)(this,G),(0,eh.__runInitializers)(this,P,1)),this._coordinatesIndex=((0,eh.__runInitializers)(this,F),(0,eh.__runInitializers)(this,k,0)),this.optimizeUVAllocation=((0,eh.__runInitializers)(this,W),(0,eh.__runInitializers)(this,Y,!0)),this._coordinatesMode=((0,eh.__runInitializers)(this,j),(0,eh.__runInitializers)(this,q,0)),this.wrapR=((0,eh.__runInitializers)(this,H),(0,eh.__runInitializers)(this,Z,1)),this.anisotropicFilteringLevel=((0,eh.__runInitializers)(this,X),(0,eh.__runInitializers)(this,$,ea.DEFAULT_ANISOTROPIC_FILTERING_LEVEL)),this._isCube=((0,eh.__runInitializers)(this,J),!1),this._gammaSpace=!0,this.invertZ=(0,eh.__runInitializers)(this,K,!1),this.lodLevelInAlpha=((0,eh.__runInitializers)(this,Q),(0,eh.__runInitializers)(this,ee,!1)),this._dominantDirection=((0,eh.__runInitializers)(this,et),null),this.isRenderTarget=(0,eh.__runInitializers)(this,ei,!1),this._prefiltered=((0,eh.__runInitializers)(this,er),!1),this._forceSerialize=!1,this.animations=[],this.onDisposeObservable=new eo.Observable,this._onDisposeObserver=null,this._scene=null,this._uid=null,this._parentContainer=null,this._loadingError=!1,e?ea._IsScene(e)?this._scene=e:this._engine=e:this._scene=e_.EngineStore.LastCreatedScene,this._scene&&(this.uniqueId=this._scene.getUniqueId(),this._scene.addTexture(this),this._engine=this._scene.getEngine()),this._texture=t,this._uid=null}getScene(){return this._scene}_getEngine(){return this._engine}getTextureMatrix(){return eu.Matrix.IdentityReadOnly}getReflectionTextureMatrix(){return eu.Matrix.IdentityReadOnly}getRefractionTextureMatrix(){return this.getReflectionTextureMatrix()}isReadyOrNotBlocking(){return!this.isBlocking||this.isReady()||this.loadingError}scale(e){}get canRescale(){return!1}_getFromCache(e,t,i,r,s,a){let n=this._getEngine();if(!n)return null;let h=n._getUseSRGBBuffer(!!s,t),l=n.getLoadedTexturesCache();for(let n=0;n<l.length;n++){let o=l[n];if((void 0===s||h===o._useSRGBBuffer)&&(void 0===r||r===o.invertY)&&o.url===e&&!t===o.generateMipMaps&&(!i||i===o.samplingMode)&&(void 0===a||a===o.isCube))return o.incrementReferences(),o}return null}_rebuild(e=!1){}clone(){return null}get textureType(){return this._texture&&void 0!==this._texture.type?this._texture.type:0}get textureFormat(){return this._texture&&void 0!==this._texture.format?this._texture.format:5}_markAllSubMeshesAsTexturesDirty(){let e=this.getScene();e&&e.markAllMaterialsAsDirty(1)}readPixels(e=0,t=0,i=null,r=!0,s=!1,a=0,n=0,h=Number.MAX_VALUE,l=Number.MAX_VALUE){if(!this._texture)return null;let o=this._getEngine();if(!o)return null;let u=this.getSize(),_=u.width,c=u.height;0!==t&&(_/=Math.pow(2,t),c/=Math.pow(2,t),_=Math.round(_),c=Math.round(c)),h=Math.min(_,h),l=Math.min(c,l);try{if(this._texture.isCube||this._texture.is2DArray)return o._readTexturePixels(this._texture,h,l,e,t,i,r,s,a,n);return o._readTexturePixels(this._texture,h,l,-1,t,i,r,s,a,n)}catch(e){return null}}_readPixelsSync(e=0,t=0,i=null,r=!0,s=!1){if(!this._texture)return null;let a=this.getSize(),n=a.width,h=a.height,l=this._getEngine();if(!l)return null;0!=t&&(n/=Math.pow(2,t),h/=Math.pow(2,t),n=Math.round(n),h=Math.round(h));try{if(this._texture.isCube)return l._readTexturePixelsSync(this._texture,n,h,e,t,i,r,s);return l._readTexturePixelsSync(this._texture,n,h,-1,t,i,r,s)}catch(e){return null}}get _lodTextureHigh(){return this._texture?this._texture._lodTextureHigh:null}get _lodTextureMid(){return this._texture?this._texture._lodTextureMid:null}get _lodTextureLow(){return this._texture?this._texture._lodTextureLow:null}dispose(){if(this._scene){this._scene.stopAnimation&&this._scene.stopAnimation(this),this._scene.removePendingData(this);let e=this._scene.textures.indexOf(this);if(e>=0&&this._scene.textures.splice(e,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null,this._parentContainer){let e=this._parentContainer.textures.indexOf(this);e>-1&&this._parentContainer.textures.splice(e,1),this._parentContainer=null}}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.metadata=null,super.dispose()}serialize(e=!1){if(!this.name&&!e)return null;let t=eg.SerializationHelper.Serialize(this);return eg.SerializationHelper.AppendSerializedAnimations(this,t),t}static WhenAllReady(e,t){let i=e.length;if(0===i)return void t();for(let r=0;r<e.length;r++){let s=e[r];if(s.isReady())0==--i&&t();else{let e=s.onLoadObservable;e?e.addOnce(()=>{0==--i&&t()}):0==--i&&t()}}}static _IsScene(e){return"Scene"===e.getClassName()}},es="function"==typeof Symbol&&Symbol.metadata?Object.create(O[Symbol.metadata]??null):void 0,t=[(0,el.serialize)()],i=[(0,el.serialize)()],r=[(0,el.serialize)()],s=[(0,el.serialize)()],a=[(0,el.serialize)("hasAlpha")],n=[(0,el.serialize)("getAlphaFromRGB")],h=[(0,el.serialize)()],l=[(0,el.serialize)("coordinatesIndex")],o=[(0,el.serialize)()],u=[(0,el.serialize)("coordinatesMode")],_=[(0,el.serialize)()],c=[(0,el.serialize)()],d=[(0,el.serialize)()],g=[(0,el.serialize)()],x=[(0,el.serialize)()],f=[(0,el.serialize)()],m=[(0,el.serialize)()],p=[(0,el.serialize)()],R=[(0,el.serialize)()],S=[(0,el.serialize)()],T=[(0,el.serialize)()],M=[(0,el.serialize)()],I=[(0,el.serialize)()],A=[(0,el.serializeAsTexture)()],v=[(0,el.serialize)()],(0,eh.__esDecorate)(ea,null,_,{kind:"getter",name:"wrapU",static:!1,private:!1,access:{has:e=>"wrapU"in e,get:e=>e.wrapU},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,c,{kind:"getter",name:"wrapV",static:!1,private:!1,access:{has:e=>"wrapV"in e,get:e=>e.wrapV},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,x,{kind:"getter",name:"isCube",static:!1,private:!1,access:{has:e=>"isCube"in e,get:e=>e.isCube},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,f,{kind:"getter",name:"is3D",static:!1,private:!1,access:{has:e=>"is3D"in e,get:e=>e.is3D},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,m,{kind:"getter",name:"is2DArray",static:!1,private:!1,access:{has:e=>"is2DArray"in e,get:e=>e.is2DArray},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,p,{kind:"getter",name:"gammaSpace",static:!1,private:!1,access:{has:e=>"gammaSpace"in e,get:e=>e.gammaSpace},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,T,{kind:"getter",name:"lodGenerationOffset",static:!1,private:!1,access:{has:e=>"lodGenerationOffset"in e,get:e=>e.lodGenerationOffset},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,M,{kind:"getter",name:"lodGenerationScale",static:!1,private:!1,access:{has:e=>"lodGenerationScale"in e,get:e=>e.lodGenerationScale},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,I,{kind:"getter",name:"linearSpecularLOD",static:!1,private:!1,access:{has:e=>"linearSpecularLOD"in e,get:e=>e.linearSpecularLOD},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,A,{kind:"getter",name:"irradianceTexture",static:!1,private:!1,access:{has:e=>"irradianceTexture"in e,get:e=>e.irradianceTexture},metadata:es},null,b),(0,eh.__esDecorate)(null,null,t,{kind:"field",name:"uniqueId",static:!1,private:!1,access:{has:e=>"uniqueId"in e,get:e=>e.uniqueId,set:(e,t)=>{e.uniqueId=t}},metadata:es},z,y),(0,eh.__esDecorate)(null,null,i,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:es},E,D),(0,eh.__esDecorate)(null,null,r,{kind:"field",name:"displayName",static:!1,private:!1,access:{has:e=>"displayName"in e,get:e=>e.displayName,set:(e,t)=>{e.displayName=t}},metadata:es},w,L),(0,eh.__esDecorate)(null,null,s,{kind:"field",name:"metadata",static:!1,private:!1,access:{has:e=>"metadata"in e,get:e=>e.metadata,set:(e,t)=>{e.metadata=t}},metadata:es},C,B),(0,eh.__esDecorate)(null,null,a,{kind:"field",name:"_hasAlpha",static:!1,private:!1,access:{has:e=>"_hasAlpha"in e,get:e=>e._hasAlpha,set:(e,t)=>{e._hasAlpha=t}},metadata:es},U,V),(0,eh.__esDecorate)(null,null,n,{kind:"field",name:"_getAlphaFromRGB",static:!1,private:!1,access:{has:e=>"_getAlphaFromRGB"in e,get:e=>e._getAlphaFromRGB,set:(e,t)=>{e._getAlphaFromRGB=t}},metadata:es},N,G),(0,eh.__esDecorate)(null,null,h,{kind:"field",name:"level",static:!1,private:!1,access:{has:e=>"level"in e,get:e=>e.level,set:(e,t)=>{e.level=t}},metadata:es},P,F),(0,eh.__esDecorate)(null,null,l,{kind:"field",name:"_coordinatesIndex",static:!1,private:!1,access:{has:e=>"_coordinatesIndex"in e,get:e=>e._coordinatesIndex,set:(e,t)=>{e._coordinatesIndex=t}},metadata:es},k,W),(0,eh.__esDecorate)(null,null,o,{kind:"field",name:"optimizeUVAllocation",static:!1,private:!1,access:{has:e=>"optimizeUVAllocation"in e,get:e=>e.optimizeUVAllocation,set:(e,t)=>{e.optimizeUVAllocation=t}},metadata:es},Y,j),(0,eh.__esDecorate)(null,null,u,{kind:"field",name:"_coordinatesMode",static:!1,private:!1,access:{has:e=>"_coordinatesMode"in e,get:e=>e._coordinatesMode,set:(e,t)=>{e._coordinatesMode=t}},metadata:es},q,H),(0,eh.__esDecorate)(null,null,d,{kind:"field",name:"wrapR",static:!1,private:!1,access:{has:e=>"wrapR"in e,get:e=>e.wrapR,set:(e,t)=>{e.wrapR=t}},metadata:es},Z,X),(0,eh.__esDecorate)(null,null,g,{kind:"field",name:"anisotropicFilteringLevel",static:!1,private:!1,access:{has:e=>"anisotropicFilteringLevel"in e,get:e=>e.anisotropicFilteringLevel,set:(e,t)=>{e.anisotropicFilteringLevel=t}},metadata:es},$,J),(0,eh.__esDecorate)(null,null,R,{kind:"field",name:"invertZ",static:!1,private:!1,access:{has:e=>"invertZ"in e,get:e=>e.invertZ,set:(e,t)=>{e.invertZ=t}},metadata:es},K,Q),(0,eh.__esDecorate)(null,null,S,{kind:"field",name:"lodLevelInAlpha",static:!1,private:!1,access:{has:e=>"lodLevelInAlpha"in e,get:e=>e.lodLevelInAlpha,set:(e,t)=>{e.lodLevelInAlpha=t}},metadata:es},ee,et),(0,eh.__esDecorate)(null,null,v,{kind:"field",name:"isRenderTarget",static:!1,private:!1,access:{has:e=>"isRenderTarget"in e,get:e=>e.isRenderTarget,set:(e,t)=>{e.isRenderTarget=t}},metadata:es},ei,er),es&&Object.defineProperty(ea,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:es}),ea.DEFAULT_ANISOTROPIC_FILTERING_LEVEL=4,ea);(en=ef.prototype).forceSphericalPolynomialsRecompute??(en.forceSphericalPolynomialsRecompute=(0,ex._MissingSideEffect)("BaseTexture","forceSphericalPolynomialsRecompute")),Object.getOwnPropertyDescriptor(ef.prototype,"sphericalPolynomial")||Object.defineProperty(ef.prototype,"sphericalPolynomial",(0,ex._MissingSideEffectProperty)("BaseTexture","sphericalPolynomial")),e.s(["BaseTexture",0,ef],79452)},86823,89786,e=>{"use strict";let t,i,r,s,a,n,h,l,o,u,_,c,d,g,x,f,m,p,R,S,T,M,I,A,v,O,b,z,y,E,D,w,L,C,B,U,V,N,G,P;var F,k=e.i(4112),W=e.i(91679),Y=e.i(42704),j=e.i(72003),q=e.i(79452),H=e.i(99493),Z=e.i(43880),X=e.i(32945),$=e.i(80609),J=e.i(1306),K=e.i(95708);function Q(e,t,i=!1){let r=t.width,s=t.height;if(e instanceof Float32Array){let t=e.byteLength/e.BYTES_PER_ELEMENT,i=new Uint8Array(t);for(;--t>=0;){let r=e[t];r<0?r=0:r>1&&(r=1),i[t]=255*r}e=i}let a=document.createElement("canvas");a.width=r,a.height=s;let n=a.getContext("2d");if(!n)return null;let h=n.createImageData(r,s);if(h.data.set(e),n.putImageData(h,0,0),i){let e=document.createElement("canvas");e.width=r,e.height=s;let t=e.getContext("2d");return t?(t.translate(0,s),t.scale(1,-1),t.drawImage(a,0,0),e.toDataURL("image/png")):null}return a.toDataURL("image/png")}function ee(e,t=0,i=0){let r=e.getInternalTexture();if(!r)return null;let s=e._readPixelsSync(t,i);return s?Q(s,e.getSize(),r.invertY):null}async function et(e,t=0,i=0){let r=e.getInternalTexture();if(!r)return null;let s=await e.readPixels(t,i);return s?Q(s,e.getSize(),r.invertY):null}e.s(["GenerateBase64StringFromTexture",0,ee,"GenerateBase64StringFromTextureAsync",0,et],89786);var ei=e.i(58773),er=e.i(22832);let es=(g=q.BaseTexture,x=[],f=[],m=[],p=[],R=[],S=[],T=[],M=[],I=[],A=[],v=[],O=[],b=[],z=[],y=[],E=[],D=[],w=[],L=[],C=[],B=[],U=[],V=[],N=[],G=[],F=class extends g{static _CreateVideoTexture(e,t,i,r=!1,s=!1,a=F.TRILINEAR_SAMPLINGMODE,n={},h,l=5){throw(0,Z._WarnImport)("VideoTexture")}get noMipmap(){return this._noMipmap}get mimeType(){return this._mimeType}set isBlocking(e){this._isBlocking=e}get isBlocking(){return this._isBlocking}get invertY(){return this._invertY}constructor(e,t,i,r,s=F.TRILINEAR_SAMPLINGMODE,a=null,n=null,h=null,l=!1,o,u,_,c,d){let g;super(t),this.url=((0,k.__runInitializers)(this,x),(0,k.__runInitializers)(this,f,null)),this.uOffset=((0,k.__runInitializers)(this,m),(0,k.__runInitializers)(this,p,0)),this.vOffset=((0,k.__runInitializers)(this,R),(0,k.__runInitializers)(this,S,0)),this.uScale=((0,k.__runInitializers)(this,T),(0,k.__runInitializers)(this,M,1)),this.vScale=((0,k.__runInitializers)(this,I),(0,k.__runInitializers)(this,A,1)),this.uAng=((0,k.__runInitializers)(this,v),(0,k.__runInitializers)(this,O,0)),this.vAng=((0,k.__runInitializers)(this,b),(0,k.__runInitializers)(this,z,0)),this.wAng=((0,k.__runInitializers)(this,y),(0,k.__runInitializers)(this,E,0)),this.uRotationCenter=((0,k.__runInitializers)(this,D),(0,k.__runInitializers)(this,w,.5)),this.vRotationCenter=((0,k.__runInitializers)(this,L),(0,k.__runInitializers)(this,C,.5)),this.wRotationCenter=((0,k.__runInitializers)(this,B),(0,k.__runInitializers)(this,U,.5)),this.homogeneousRotationInUVTransform=((0,k.__runInitializers)(this,V),(0,k.__runInitializers)(this,N,!1)),this.inspectableCustomProperties=((0,k.__runInitializers)(this,G),null),this._noMipmap=!1,this._invertY=!1,this._rowGenerationMatrix=null,this._cachedTextureMatrix=null,this._projectionModeMatrix=null,this._t0=null,this._t1=null,this._t2=null,this._cachedUOffset=-1,this._cachedVOffset=-1,this._cachedUScale=0,this._cachedVScale=0,this._cachedUAng=-1,this._cachedVAng=-1,this._cachedWAng=-1,this._cachedReflectionProjectionMatrixId=-1,this._cachedURotationCenter=-1,this._cachedVRotationCenter=-1,this._cachedWRotationCenter=-1,this._cachedHomogeneousRotationInUVTransform=!1,this._cachedIdentity3x2=!0,this._cachedReflectionTextureMatrix=null,this._cachedReflectionUOffset=-1,this._cachedReflectionVOffset=-1,this._cachedReflectionUScale=0,this._cachedReflectionVScale=0,this._cachedReflectionCoordinatesMode=-1,this._buffer=null,this._deleteBuffer=!1,this._format=null,this._delayedOnLoad=null,this._delayedOnError=null,this.onLoadObservable=new Y.Observable,this._isBlocking=!0,this.name=e||"",this.url=e;let P=!1,W=null,j=!0;"object"==typeof i&&null!==i?(g=i.noMipmap??!1,r=i.invertY??!ei.useOpenGLOrientationForUV,s=i.samplingMode??F.TRILINEAR_SAMPLINGMODE,a=i.onLoad??null,n=i.onError??null,h=i.buffer??null,l=i.deleteBuffer??!1,o=i.format,u=i.mimeType,_=i.loaderOptions,c=i.creationFlags,P=i.useSRGBBuffer??!1,W=i.internalTexture??null,j=i.gammaSpace??j,d=i.forcedExtension??d):g=!!i,this._gammaSpace=j,this._noMipmap=g,this._invertY=void 0===r?!ei.useOpenGLOrientationForUV:r,this._initialSamplingMode=s,this._buffer=h,this._deleteBuffer=l,this._mimeType=u,this._loaderOptions=_,this._creationFlags=c,this._useSRGBBuffer=P,this._forcedExtension=d,void 0!==o&&(this._format=o);const q=this.getScene(),H=this._getEngine();if(!H)return;H.onBeforeTextureInitObservable.notifyObservers(this);const Z=()=>{this._texture&&(this._texture._invertVScale&&(this.vScale*=-1,this.vOffset+=1),null!==this._texture._cachedWrapU&&(this.wrapU=this._texture._cachedWrapU,this._texture._cachedWrapU=null),null!==this._texture._cachedWrapV&&(this.wrapV=this._texture._cachedWrapV,this._texture._cachedWrapV=null),null!==this._texture._cachedWrapR&&(this.wrapR=this._texture._cachedWrapR,this._texture._cachedWrapR=null)),this.onLoadObservable.hasObservers()&&this.onLoadObservable.notifyObservers(this),a&&a(),!this.isBlocking&&q&&q.resetCachedMaterial()},$=(e,t)=>{this._loadingError=!0,this._errorObject={message:e,exception:t},n&&n(e,t),F.OnTextureLoadErrorObservable.notifyObservers(this)};if(!this.url&&!W){this._delayedOnLoad=Z,this._delayedOnError=$;return}if(this._texture=W??this._getFromCache(this.url,g,s,this._invertY,P,this.isCube),this._texture)if(this._texture.isReady)X.TimingTools.SetImmediate(()=>Z());else{const e=this._texture.onLoadedObservable.add(Z);this._texture.onErrorObservable.add(t=>{$(t.message,t.exception),this._texture?.onLoadedObservable.remove(e)})}else if(q&&q.useDelayedTextureLoading)this.delayLoadState=4,this._delayedOnLoad=Z,this._delayedOnError=$;else{try{this._texture=H.createTexture(this.url,g,this._invertY,q,s,Z,$,this._buffer,void 0,this._format,this._forcedExtension,u,_,c,P)}catch(e){throw $("error loading",e),e}l&&(this._buffer=null)}}updateURL(e,t=null,i,r){this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(1,e=>e.hasTexture(this))),(!this.name||this.name.startsWith("data:"))&&(this.name=e),this.url=e,this._buffer=t,this._forcedExtension=r,this.delayLoadState=4;let s=this._delayedOnLoad,a=()=>{s?s():this.onLoadObservable.hasObservers()&&this.onLoadObservable.notifyObservers(this),i&&i()};this._delayedOnLoad=a,this.delayLoad()}delayLoad(){if(4!==this.delayLoadState)return;let e=this.getScene();if(!e)return;let t=this.url;!t&&(this.name.indexOf("://")>0||this.name.startsWith("data:"))&&(t=this.name),this.delayLoadState=1,this._texture=this._getFromCache(t,this._noMipmap,this.samplingMode,this._invertY,this._useSRGBBuffer,this.isCube),this._texture?this._delayedOnLoad&&(this._texture.isReady?X.TimingTools.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(t,this._noMipmap,this._invertY,e,this.samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format,this._forcedExtension,this._mimeType,this._loaderOptions,this._creationFlags,this._useSRGBBuffer),this._deleteBuffer&&(this._buffer=null)),this._delayedOnLoad=null,this._delayedOnError=null}_prepareRowForTextureGeneration(e,t,i,r){e*=this._cachedUScale,t*=this._cachedVScale,e-=this.uRotationCenter*this._cachedUScale,t-=this.vRotationCenter*this._cachedVScale,i-=this.wRotationCenter,j.Vector3.TransformCoordinatesFromFloatsToRef(e,t,i,this._rowGenerationMatrix,r),r.x+=this.uRotationCenter*this._cachedUScale+this._cachedUOffset,r.y+=this.vRotationCenter*this._cachedVScale+this._cachedVOffset,r.z+=this.wRotationCenter}getTextureMatrix(e=1){if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale*e===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng&&this.uRotationCenter===this._cachedURotationCenter&&this.vRotationCenter===this._cachedVRotationCenter&&this.wRotationCenter===this._cachedWRotationCenter&&this.homogeneousRotationInUVTransform===this._cachedHomogeneousRotationInUVTransform)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale*e,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedURotationCenter=this.uRotationCenter,this._cachedVRotationCenter=this.vRotationCenter,this._cachedWRotationCenter=this.wRotationCenter,this._cachedHomogeneousRotationInUVTransform=this.homogeneousRotationInUVTransform,this._cachedTextureMatrix&&this._rowGenerationMatrix||(this._cachedTextureMatrix=j.Matrix.Zero(),this._rowGenerationMatrix=new j.Matrix,this._t0=j.Vector3.Zero(),this._t1=j.Vector3.Zero(),this._t2=j.Vector3.Zero()),j.Matrix.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this.homogeneousRotationInUVTransform?(j.Matrix.TranslationToRef(-this._cachedURotationCenter,-this._cachedVRotationCenter,-this._cachedWRotationCenter,j.TmpVectors.Matrix[0]),j.Matrix.TranslationToRef(this._cachedURotationCenter,this._cachedVRotationCenter,this._cachedWRotationCenter,j.TmpVectors.Matrix[1]),j.Matrix.ScalingToRef(this._cachedUScale,this._cachedVScale,0,j.TmpVectors.Matrix[2]),j.Matrix.TranslationToRef(this._cachedUOffset,this._cachedVOffset,0,j.TmpVectors.Matrix[3]),j.TmpVectors.Matrix[0].multiplyToRef(this._rowGenerationMatrix,this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(j.TmpVectors.Matrix[1],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(j.TmpVectors.Matrix[2],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(j.TmpVectors.Matrix[3],this._cachedTextureMatrix),this._cachedTextureMatrix.setRowFromFloats(2,this._cachedTextureMatrix.m[12],this._cachedTextureMatrix.m[13],this._cachedTextureMatrix.m[14],1)):(this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),j.Matrix.FromValuesToRef(this._t1.x,this._t1.y,this._t1.z,0,this._t2.x,this._t2.y,this._t2.z,0,this._t0.x,this._t0.y,this._t0.z,0,0,0,0,1,this._cachedTextureMatrix));let t=this.getScene();if(!t)return this._cachedTextureMatrix;let i=this._cachedIdentity3x2;return this._cachedIdentity3x2=this._cachedTextureMatrix.isIdentityAs3x2(),this.optimizeUVAllocation&&i!==this._cachedIdentity3x2&&t.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)),this._cachedTextureMatrix}getReflectionTextureMatrix(){let e=this.getScene();if(!e)return this._cachedReflectionTextureMatrix;if(this.uOffset===this._cachedReflectionUOffset&&this.vOffset===this._cachedReflectionVOffset&&this.uScale===this._cachedReflectionUScale&&this.vScale===this._cachedReflectionVScale&&this.coordinatesMode===this._cachedReflectionCoordinatesMode){if(this.coordinatesMode!==F.PROJECTION_MODE)return this._cachedReflectionTextureMatrix;else if(this._cachedReflectionProjectionMatrixId===e.getProjectionMatrix().updateFlag)return this._cachedReflectionTextureMatrix}this._cachedReflectionTextureMatrix||(this._cachedReflectionTextureMatrix=j.Matrix.Zero()),this._projectionModeMatrix||(this._projectionModeMatrix=j.Matrix.Zero());let t=this._cachedReflectionCoordinatesMode!==this.coordinatesMode;switch(this._cachedReflectionUOffset=this.uOffset,this._cachedReflectionVOffset=this.vOffset,this._cachedReflectionUScale=this.uScale,this._cachedReflectionVScale=this.vScale,this._cachedReflectionCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case F.PLANAR_MODE:j.Matrix.IdentityToRef(this._cachedReflectionTextureMatrix),this._cachedReflectionTextureMatrix[0]=this.uScale,this._cachedReflectionTextureMatrix[5]=this.vScale,this._cachedReflectionTextureMatrix[12]=this.uOffset,this._cachedReflectionTextureMatrix[13]=this.vOffset;break;case F.PROJECTION_MODE:{j.Matrix.FromValuesToRef(.5,0,0,0,0,-.5,0,0,0,0,0,0,.5,.5,1,1,this._projectionModeMatrix);let t=e.getProjectionMatrix();this._cachedReflectionProjectionMatrixId=t.updateFlag,t.multiplyToRef(this._projectionModeMatrix,this._cachedReflectionTextureMatrix);break}default:j.Matrix.IdentityToRef(this._cachedReflectionTextureMatrix)}return t&&e.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)),this._cachedReflectionTextureMatrix}clone(){let e={noMipmap:this._noMipmap,invertY:this._invertY,samplingMode:this.samplingMode,onLoad:void 0,onError:void 0,buffer:this._texture?this._texture._buffer:void 0,deleteBuffer:this._deleteBuffer,format:this.textureFormat,mimeType:this.mimeType,loaderOptions:this._loaderOptions,creationFlags:this._creationFlags,useSRGBBuffer:this._useSRGBBuffer};return er.SerializationHelper.Clone(()=>new F(this._texture?this._texture.url:null,this.getScene(),e),this)}serialize(){let e=this.name;!F.SerializeBuffers&&this.name.startsWith("data:")&&(this.name=""),this.name.startsWith("data:")&&this.url===this.name&&(this.url="");let t=super.serialize(F._SerializeInternalTextureUniqueId);if(!t)return null;if(F.SerializeBuffers||F.ForceSerializeBuffers)if("string"==typeof this._buffer&&this._buffer.startsWith("data:"))t.base64String=this._buffer,t.name=t.name.replace("data:","");else if(this.url&&this.url.startsWith("data:")&&this._buffer instanceof Uint8Array){let e=this.mimeType||"image/png";t.base64String=`data:${e};base64,${(0,K.EncodeArrayBufferToBase64)(this._buffer)}`}else(F.ForceSerializeBuffers||this.url&&this.url.startsWith("blob:")||this._forceSerialize)&&(t.base64String=!this._engine||this._engine._features.supportSyncTextureRead?ee(this):et(this));return t.invertY=this._invertY,t.samplingMode=this.samplingMode,t._creationFlags=this._creationFlags,t._useSRGBBuffer=this._useSRGBBuffer,F._SerializeInternalTextureUniqueId&&(t.internalTextureUniqueId=this._texture?.uniqueId),t.internalTextureLabel=this._texture?.label,t.noMipmap=this._noMipmap,this.name=e,t}getClassName(){return"Texture"}dispose(){super.dispose(),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null,this._buffer=null}static Parse(e,t,i){let r;if(e.customType){let r=$.InstantiationTools.Instantiate(e.customType).Parse(e,t,i);return e.samplingMode&&r.updateSamplingMode&&r._samplingMode&&r._samplingMode!==e.samplingMode&&r.updateSamplingMode(e.samplingMode),r}if(e.isCube&&!e.isRenderTarget)return F._CubeTextureParser(e,t,i);let s=void 0!==e.internalTextureUniqueId;if(!e.name&&!e.isRenderTarget&&!s)return null;if(s){for(let i of t.getEngine().getLoadedTexturesCache())if(i.uniqueId===e.internalTextureUniqueId){r=i;break}}let a=t=>{if(t&&t._texture&&(t._texture._cachedWrapU=null,t._texture._cachedWrapV=null,t._texture._cachedWrapR=null),e.samplingMode){let i=e.samplingMode;t&&t.samplingMode!==i&&t.updateSamplingMode(i)}if(t&&e.animations)for(let i=0;i<e.animations.length;i++){let r=e.animations[i],s=(0,H.GetClass)("BABYLON.Animation");s&&t.animations.push(s.Parse(r))}t&&t._texture&&(s&&!r&&t._texture._setUniqueId(e.internalTextureUniqueId),t._texture.label=e.internalTextureLabel)};return er.SerializationHelper.Parse(()=>{let s=!0;if(e.noMipmap&&(s=!1),e.mirrorPlane){let i=F._CreateMirror(e.name,e.renderTargetSize,t,s);return i._waitingRenderList=e.renderList,i.mirrorPlane=J.Plane.FromArray(e.mirrorPlane),a(i),i}if(e.isRenderTarget&&!e.base64String){let i=null;if(e.isCube){if(t.reflectionProbes)for(let i=0;i<t.reflectionProbes.length;i++){let r=t.reflectionProbes[i];if(r.name===e.name)return r.cubeTexture}}else(i=F._CreateRenderTargetTexture(e.name,e.renderTargetSize,t,s,e._creationFlags??0))._waitingRenderList=e.renderList;return a(i),i}if(e.isVideo){let r=F._CreateVideoTexture(i+(e.url||e.name),i+(e.src||e.url),t,s,e.invertY,e.samplingMode,e.settings||{});return a(r),r}{let n;if("string"==typeof e.base64String&&e.base64String&&!r){let i={buffer:e.base64String,noMipmap:!s,invertY:e.invertY,samplingMode:e.samplingMode,useSRGBBuffer:e._useSRGBBuffer??!1,creationFlags:e._creationFlags??0,onLoad:()=>{a(n)}},r=e.base64String,h=r.startsWith("data:")?r.substring(5):r;(n=F.CreateFromBase64String("",h,t,i)).name=e.name}else{let h;h=e.name&&(e.name.indexOf("://")>0||e.name.startsWith("data:"))?e.name:i+e.name,e.url&&(e.url.startsWith("data:")||F.UseSerializedUrlIfAny)&&(h=e.url);let l={noMipmap:!s,invertY:e.invertY,samplingMode:e.samplingMode,useSRGBBuffer:e._useSRGBBuffer??!1,creationFlags:e._creationFlags??0,onLoad:()=>{a(n)},internalTexture:r};n=new F(h,t,l)}return n}},e,t)}static CreateFromBase64String(e,t,i,r,s,a=F.TRILINEAR_SAMPLINGMODE,n=null,h=null,l=5,o,u){return new F("data:"+t,i,r,s,a,n,h,e,!1,l,void 0,void 0,o,u)}static LoadFromDataString(e,t,i,r=!1,s,a=!0,n=F.TRILINEAR_SAMPLINGMODE,h=null,l=null,o=5,u,_){return"data:"!==e.substring(0,5)&&(e="data:"+e),new F(e,i,s,a,n,h,l,t,r,o,void 0,void 0,u,_)}},P="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0,t=[(0,W.serialize)()],i=[(0,W.serialize)()],r=[(0,W.serialize)()],s=[(0,W.serialize)()],a=[(0,W.serialize)()],n=[(0,W.serialize)()],h=[(0,W.serialize)()],l=[(0,W.serialize)()],o=[(0,W.serialize)()],u=[(0,W.serialize)()],_=[(0,W.serialize)()],c=[(0,W.serialize)()],d=[(0,W.serialize)()],(0,k.__esDecorate)(F,null,d,{kind:"getter",name:"isBlocking",static:!1,private:!1,access:{has:e=>"isBlocking"in e,get:e=>e.isBlocking},metadata:P},null,x),(0,k.__esDecorate)(null,null,t,{kind:"field",name:"url",static:!1,private:!1,access:{has:e=>"url"in e,get:e=>e.url,set:(e,t)=>{e.url=t}},metadata:P},f,m),(0,k.__esDecorate)(null,null,i,{kind:"field",name:"uOffset",static:!1,private:!1,access:{has:e=>"uOffset"in e,get:e=>e.uOffset,set:(e,t)=>{e.uOffset=t}},metadata:P},p,R),(0,k.__esDecorate)(null,null,r,{kind:"field",name:"vOffset",static:!1,private:!1,access:{has:e=>"vOffset"in e,get:e=>e.vOffset,set:(e,t)=>{e.vOffset=t}},metadata:P},S,T),(0,k.__esDecorate)(null,null,s,{kind:"field",name:"uScale",static:!1,private:!1,access:{has:e=>"uScale"in e,get:e=>e.uScale,set:(e,t)=>{e.uScale=t}},metadata:P},M,I),(0,k.__esDecorate)(null,null,a,{kind:"field",name:"vScale",static:!1,private:!1,access:{has:e=>"vScale"in e,get:e=>e.vScale,set:(e,t)=>{e.vScale=t}},metadata:P},A,v),(0,k.__esDecorate)(null,null,n,{kind:"field",name:"uAng",static:!1,private:!1,access:{has:e=>"uAng"in e,get:e=>e.uAng,set:(e,t)=>{e.uAng=t}},metadata:P},O,b),(0,k.__esDecorate)(null,null,h,{kind:"field",name:"vAng",static:!1,private:!1,access:{has:e=>"vAng"in e,get:e=>e.vAng,set:(e,t)=>{e.vAng=t}},metadata:P},z,y),(0,k.__esDecorate)(null,null,l,{kind:"field",name:"wAng",static:!1,private:!1,access:{has:e=>"wAng"in e,get:e=>e.wAng,set:(e,t)=>{e.wAng=t}},metadata:P},E,D),(0,k.__esDecorate)(null,null,o,{kind:"field",name:"uRotationCenter",static:!1,private:!1,access:{has:e=>"uRotationCenter"in e,get:e=>e.uRotationCenter,set:(e,t)=>{e.uRotationCenter=t}},metadata:P},w,L),(0,k.__esDecorate)(null,null,u,{kind:"field",name:"vRotationCenter",static:!1,private:!1,access:{has:e=>"vRotationCenter"in e,get:e=>e.vRotationCenter,set:(e,t)=>{e.vRotationCenter=t}},metadata:P},C,B),(0,k.__esDecorate)(null,null,_,{kind:"field",name:"wRotationCenter",static:!1,private:!1,access:{has:e=>"wRotationCenter"in e,get:e=>e.wRotationCenter,set:(e,t)=>{e.wRotationCenter=t}},metadata:P},U,V),(0,k.__esDecorate)(null,null,c,{kind:"field",name:"homogeneousRotationInUVTransform",static:!1,private:!1,access:{has:e=>"homogeneousRotationInUVTransform"in e,get:e=>e.homogeneousRotationInUVTransform,set:(e,t)=>{e.homogeneousRotationInUVTransform=t}},metadata:P},N,G),P&&Object.defineProperty(F,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:P}),F.SerializeBuffers=!0,F.ForceSerializeBuffers=!1,F.OnTextureLoadErrorObservable=new Y.Observable,F._SerializeInternalTextureUniqueId=!1,F._CubeTextureParser=(e,t,i)=>{throw(0,Z._WarnImport)("CubeTexture")},F._CreateMirror=(e,t,i,r)=>{throw(0,Z._WarnImport)("MirrorTexture")},F._CreateRenderTargetTexture=(e,t,i,r,s)=>{throw(0,Z._WarnImport)("RenderTargetTexture")},F.NEAREST_SAMPLINGMODE=1,F.NEAREST_NEAREST_MIPLINEAR=8,F.BILINEAR_SAMPLINGMODE=2,F.LINEAR_LINEAR_MIPNEAREST=11,F.TRILINEAR_SAMPLINGMODE=3,F.LINEAR_LINEAR_MIPLINEAR=3,F.NEAREST_NEAREST_MIPNEAREST=4,F.NEAREST_LINEAR_MIPNEAREST=5,F.NEAREST_LINEAR_MIPLINEAR=6,F.NEAREST_LINEAR=7,F.NEAREST_NEAREST=1,F.LINEAR_NEAREST_MIPNEAREST=9,F.LINEAR_NEAREST_MIPLINEAR=10,F.LINEAR_LINEAR=2,F.LINEAR_NEAREST=12,F.EXPLICIT_MODE=0,F.SPHERICAL_MODE=1,F.PLANAR_MODE=2,F.CUBIC_MODE=3,F.PROJECTION_MODE=4,F.SKYBOX_MODE=5,F.INVCUBIC_MODE=6,F.EQUIRECTANGULAR_MODE=7,F.FIXED_EQUIRECTANGULAR_MODE=8,F.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,F.CLAMP_ADDRESSMODE=0,F.WRAP_ADDRESSMODE=1,F.MIRROR_ADDRESSMODE=2,F.UseSerializedUrlIfAny=!1,F),ea=!1;e.s(["RegisterTexture",0,function(){ea||(ea=!0,(0,H.RegisterClass)("BABYLON.Texture",es),er.SerializationHelper._TextureParser=es.Parse)},"Texture",0,es],86823)},19696,e=>{"use strict";e.s(["Size",0,class e{constructor(e,t){this.width=e,this.height=t}toString(){return`{W: ${this.width}, H: ${this.height}}`}getClassName(){return"Size"}getHashCode(){let e=0|this.width;return 397*e^this.height}copyFrom(e){this.width=e.width,this.height=e.height}copyFromFloats(e,t){return this.width=e,this.height=t,this}set(e,t){return this.copyFromFloats(e,t)}multiplyByFloats(t,i){return new e(this.width*t,this.height*i)}clone(){return new e(this.width,this.height)}equals(e){return!!e&&this.width===e.width&&this.height===e.height}get surface(){return this.width*this.height}static Zero(){return new e(0,0)}add(t){return new e(this.width+t.width,this.height+t.height)}subtract(t){return new e(this.width-t.width,this.height-t.height)}scale(t){return new e(this.width*t,this.height*t)}static Lerp(t,i,r){return new e(t.width+(i.width-t.width)*r,t.height+(i.height-t.height)*r)}}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65042,e=>{"use strict";let t,i,r,s,a,n,h,l,o,u,_,c,d,g,x,f,m,p,R,S,T,M,I,A,v,O,b,z,y,E,D,w,L,C,B,U,V,N,G,P,F,k,W,Y,j,q,H,Z,X,$,J,K,Q,ee,et,ei,er,es;var ea,en,eh=e.i(73403),el=e.i(5207),eo=e.i(97991),eu=e.i(56173),e_=e.i(71829),ec=e.i(70081),ed=e.i(92953),eg=e.i(69552),ex=e.i(49399);let ef=(O=class e{get wrapU(){return this._wrapU}set wrapU(e){this._wrapU=e}get wrapV(){return this._wrapV}set wrapV(e){this._wrapV=e}get coordinatesMode(){return 0}get isCube(){return!!this._texture&&this._texture.isCube}set isCube(e){this._texture&&(this._texture.isCube=e)}get is3D(){return!!this._texture&&this._texture.is3D}set is3D(e){this._texture&&(this._texture.is3D=e)}get is2DArray(){return!!this._texture&&this._texture.is2DArray}set is2DArray(e){this._texture&&(this._texture.is2DArray=e)}getClassName(){return"ThinTexture"}static _IsRenderTargetWrapper(e){return e?.shareDepth!==void 0}constructor(t){this._wrapU=1,this._wrapV=1,this.wrapR=1,this.anisotropicFilteringLevel=4,this.delayLoadState=0,this._texture=null,this._engine=null,this._cachedSize=ed.Size.Zero(),this._cachedBaseSize=ed.Size.Zero(),this._initialSamplingMode=2,this._texture=e._IsRenderTargetWrapper(t)?t.texture:t,this._texture&&(this._engine=this._texture.getEngine(),this.wrapU=this._texture._cachedWrapU??this.wrapU,this.wrapV=this._texture._cachedWrapV??this.wrapV,this.wrapR=this._texture._cachedWrapR??this.wrapR)}isReady(){return 4===this.delayLoadState?(this.delayLoad(),!1):!!this._texture&&this._texture.isReady}delayLoad(){}getInternalTexture(){return this._texture}getSize(){if(this._texture){if(this._texture.width)return this._cachedSize.width=this._texture.width,this._cachedSize.height=this._texture.height,this._cachedSize;this._texture._size&&(this._cachedSize.width=this._texture._size,this._cachedSize.height=this._texture._size)}return this._cachedSize}getBaseSize(){return this.isReady()&&this._texture?this._texture._size?(this._cachedBaseSize.width=this._texture._size,this._cachedBaseSize.height=this._texture._size):(this._cachedBaseSize.width=this._texture.baseWidth,this._cachedBaseSize.height=this._texture.baseHeight):(this._cachedBaseSize.width=0,this._cachedBaseSize.height=0),this._cachedBaseSize}get samplingMode(){return this._texture?this._texture.samplingMode:this._initialSamplingMode}updateSamplingMode(e,t=!1){this._texture&&this._engine&&this._engine.updateTextureSamplingMode(e,this._texture,this._texture.generateMipMaps&&t)}releaseInternalTexture(){this._texture&&(this._texture.dispose(),this._texture=null)}dispose(){this._texture&&(this.releaseInternalTexture(),this._engine=null)}},b=[],z=[],y=[],E=[],D=[],w=[],L=[],C=[],B=[],U=[],V=[],N=[],G=[],P=[],F=[],k=[],W=[],Y=[],j=[],q=[],H=[],Z=[],X=[],$=[],J=[],K=[],Q=[],ee=[],et=[],ei=[],er=[],ea=class extends O{set hasAlpha(e){this._hasAlpha!==e&&(this._hasAlpha=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get hasAlpha(){return this._hasAlpha}set getAlphaFromRGB(e){this._getAlphaFromRGB!==e&&(this._getAlphaFromRGB=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get getAlphaFromRGB(){return this._getAlphaFromRGB}set coordinatesIndex(e){this._coordinatesIndex!==e&&(this._coordinatesIndex=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get coordinatesIndex(){return this._coordinatesIndex}set coordinatesMode(e){this._coordinatesMode!==e&&(this._coordinatesMode=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get coordinatesMode(){return this._coordinatesMode}get wrapU(){return this._wrapU}set wrapU(e){this._wrapU=e}get wrapV(){return this._wrapV}set wrapV(e){this._wrapV=e}get isCube(){return this._texture?this._texture.isCube:this._isCube}set isCube(e){this._texture?this._texture.isCube=e:this._isCube=e}get is3D(){return!!this._texture&&this._texture.is3D}set is3D(e){this._texture&&(this._texture.is3D=e)}get is2DArray(){return!!this._texture&&this._texture.is2DArray}set is2DArray(e){this._texture&&(this._texture.is2DArray=e)}get gammaSpace(){return this._texture?(null===this._texture._gammaSpace&&(this._texture._gammaSpace=this._gammaSpace),this._texture._gammaSpace&&!this._texture._useSRGBBuffer):this._gammaSpace}set gammaSpace(e){if(this._texture){if(this._texture._gammaSpace===e)return;this._texture._gammaSpace=e}else{if(this._gammaSpace===e)return;this._gammaSpace=e}this.getScene()?.markAllMaterialsAsDirty(1,e=>e.hasTexture(this))}get isRGBD(){return null!=this._texture&&this._texture._isRGBD}set isRGBD(e){e!==this.isRGBD&&(this._texture&&(this._texture._isRGBD=e),this.getScene()?.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get noMipmap(){return!1}get lodGenerationOffset(){return this._texture?this._texture._lodGenerationOffset:0}set lodGenerationOffset(e){this._texture&&(this._texture._lodGenerationOffset=e)}get lodGenerationScale(){return this._texture?this._texture._lodGenerationScale:0}set lodGenerationScale(e){this._texture&&(this._texture._lodGenerationScale=e)}get linearSpecularLOD(){return!!this._texture&&this._texture._linearSpecularLOD}set linearSpecularLOD(e){this._texture&&(this._texture._linearSpecularLOD=e)}get irradianceTexture(){return this._texture?this._texture._irradianceTexture:null}set irradianceTexture(e){this._texture&&(this._texture._irradianceTexture=e)}get uid(){return this._uid||(this._uid=(0,ec.RandomGUID)()),this._uid}toString(){return this.name}getClassName(){return"BaseTexture"}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}get isBlocking(){return!0}get loadingError(){return this._loadingError}get errorObject(){return this._errorObject}constructor(e,t=null){super(null),this.uniqueId=((0,eh.__runInitializers)(this,b),(0,eh.__runInitializers)(this,z,void 0)),this.name=((0,eh.__runInitializers)(this,y),(0,eh.__runInitializers)(this,E,void 0)),this.displayName=((0,eh.__runInitializers)(this,D),(0,eh.__runInitializers)(this,w,void 0)),this.metadata=((0,eh.__runInitializers)(this,L),(0,eh.__runInitializers)(this,C,null)),this._internalMetadata=(0,eh.__runInitializers)(this,B),this.reservedDataStore=null,this._hasAlpha=(0,eh.__runInitializers)(this,U,!1),this._getAlphaFromRGB=((0,eh.__runInitializers)(this,V),(0,eh.__runInitializers)(this,N,!1)),this.level=((0,eh.__runInitializers)(this,G),(0,eh.__runInitializers)(this,P,1)),this._coordinatesIndex=((0,eh.__runInitializers)(this,F),(0,eh.__runInitializers)(this,k,0)),this.optimizeUVAllocation=((0,eh.__runInitializers)(this,W),(0,eh.__runInitializers)(this,Y,!0)),this._coordinatesMode=((0,eh.__runInitializers)(this,j),(0,eh.__runInitializers)(this,q,0)),this.wrapR=((0,eh.__runInitializers)(this,H),(0,eh.__runInitializers)(this,Z,1)),this.anisotropicFilteringLevel=((0,eh.__runInitializers)(this,X),(0,eh.__runInitializers)(this,$,ea.DEFAULT_ANISOTROPIC_FILTERING_LEVEL)),this._isCube=((0,eh.__runInitializers)(this,J),!1),this._gammaSpace=!0,this.invertZ=(0,eh.__runInitializers)(this,K,!1),this.lodLevelInAlpha=((0,eh.__runInitializers)(this,Q),(0,eh.__runInitializers)(this,ee,!1)),this._dominantDirection=((0,eh.__runInitializers)(this,et),null),this.isRenderTarget=(0,eh.__runInitializers)(this,ei,!1),this._prefiltered=((0,eh.__runInitializers)(this,er),!1),this._forceSerialize=!1,this.animations=[],this.onDisposeObservable=new eo.Observable,this._onDisposeObserver=null,this._scene=null,this._uid=null,this._parentContainer=null,this._loadingError=!1,e?ea._IsScene(e)?this._scene=e:this._engine=e:this._scene=e_.EngineStore.LastCreatedScene,this._scene&&(this.uniqueId=this._scene.getUniqueId(),this._scene.addTexture(this),this._engine=this._scene.getEngine()),this._texture=t,this._uid=null}getScene(){return this._scene}_getEngine(){return this._engine}getTextureMatrix(){return eu.Matrix.IdentityReadOnly}getReflectionTextureMatrix(){return eu.Matrix.IdentityReadOnly}getRefractionTextureMatrix(){return this.getReflectionTextureMatrix()}isReadyOrNotBlocking(){return!this.isBlocking||this.isReady()||this.loadingError}scale(e){}get canRescale(){return!1}_getFromCache(e,t,i,r,s,a){let n=this._getEngine();if(!n)return null;let h=n._getUseSRGBBuffer(!!s,t),l=n.getLoadedTexturesCache();for(let n=0;n<l.length;n++){let o=l[n];if((void 0===s||h===o._useSRGBBuffer)&&(void 0===r||r===o.invertY)&&o.url===e&&!t===o.generateMipMaps&&(!i||i===o.samplingMode)&&(void 0===a||a===o.isCube))return o.incrementReferences(),o}return null}_rebuild(e=!1){}clone(){return null}get textureType(){return this._texture&&void 0!==this._texture.type?this._texture.type:0}get textureFormat(){return this._texture&&void 0!==this._texture.format?this._texture.format:5}_markAllSubMeshesAsTexturesDirty(){let e=this.getScene();e&&e.markAllMaterialsAsDirty(1)}readPixels(e=0,t=0,i=null,r=!0,s=!1,a=0,n=0,h=Number.MAX_VALUE,l=Number.MAX_VALUE){if(!this._texture)return null;let o=this._getEngine();if(!o)return null;let u=this.getSize(),_=u.width,c=u.height;0!==t&&(_/=Math.pow(2,t),c/=Math.pow(2,t),_=Math.round(_),c=Math.round(c)),h=Math.min(_,h),l=Math.min(c,l);try{if(this._texture.isCube||this._texture.is2DArray)return o._readTexturePixels(this._texture,h,l,e,t,i,r,s,a,n);return o._readTexturePixels(this._texture,h,l,-1,t,i,r,s,a,n)}catch(e){return null}}_readPixelsSync(e=0,t=0,i=null,r=!0,s=!1){if(!this._texture)return null;let a=this.getSize(),n=a.width,h=a.height,l=this._getEngine();if(!l)return null;0!=t&&(n/=Math.pow(2,t),h/=Math.pow(2,t),n=Math.round(n),h=Math.round(h));try{if(this._texture.isCube)return l._readTexturePixelsSync(this._texture,n,h,e,t,i,r,s);return l._readTexturePixelsSync(this._texture,n,h,-1,t,i,r,s)}catch(e){return null}}get _lodTextureHigh(){return this._texture?this._texture._lodTextureHigh:null}get _lodTextureMid(){return this._texture?this._texture._lodTextureMid:null}get _lodTextureLow(){return this._texture?this._texture._lodTextureLow:null}dispose(){if(this._scene){this._scene.stopAnimation&&this._scene.stopAnimation(this),this._scene.removePendingData(this);let e=this._scene.textures.indexOf(this);if(e>=0&&this._scene.textures.splice(e,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null,this._parentContainer){let e=this._parentContainer.textures.indexOf(this);e>-1&&this._parentContainer.textures.splice(e,1),this._parentContainer=null}}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.metadata=null,super.dispose()}serialize(e=!1){if(!this.name&&!e)return null;let t=eg.SerializationHelper.Serialize(this);return eg.SerializationHelper.AppendSerializedAnimations(this,t),t}static WhenAllReady(e,t){let i=e.length;if(0===i)return void t();for(let r=0;r<e.length;r++){let s=e[r];if(s.isReady())0==--i&&t();else{let e=s.onLoadObservable;e?e.addOnce(()=>{0==--i&&t()}):0==--i&&t()}}}static _IsScene(e){return"Scene"===e.getClassName()}},es="function"==typeof Symbol&&Symbol.metadata?Object.create(O[Symbol.metadata]??null):void 0,t=[(0,el.serialize)()],i=[(0,el.serialize)()],r=[(0,el.serialize)()],s=[(0,el.serialize)()],a=[(0,el.serialize)("hasAlpha")],n=[(0,el.serialize)("getAlphaFromRGB")],h=[(0,el.serialize)()],l=[(0,el.serialize)("coordinatesIndex")],o=[(0,el.serialize)()],u=[(0,el.serialize)("coordinatesMode")],_=[(0,el.serialize)()],c=[(0,el.serialize)()],d=[(0,el.serialize)()],g=[(0,el.serialize)()],x=[(0,el.serialize)()],f=[(0,el.serialize)()],m=[(0,el.serialize)()],p=[(0,el.serialize)()],R=[(0,el.serialize)()],S=[(0,el.serialize)()],T=[(0,el.serialize)()],M=[(0,el.serialize)()],I=[(0,el.serialize)()],A=[(0,el.serializeAsTexture)()],v=[(0,el.serialize)()],(0,eh.__esDecorate)(ea,null,_,{kind:"getter",name:"wrapU",static:!1,private:!1,access:{has:e=>"wrapU"in e,get:e=>e.wrapU},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,c,{kind:"getter",name:"wrapV",static:!1,private:!1,access:{has:e=>"wrapV"in e,get:e=>e.wrapV},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,x,{kind:"getter",name:"isCube",static:!1,private:!1,access:{has:e=>"isCube"in e,get:e=>e.isCube},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,f,{kind:"getter",name:"is3D",static:!1,private:!1,access:{has:e=>"is3D"in e,get:e=>e.is3D},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,m,{kind:"getter",name:"is2DArray",static:!1,private:!1,access:{has:e=>"is2DArray"in e,get:e=>e.is2DArray},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,p,{kind:"getter",name:"gammaSpace",static:!1,private:!1,access:{has:e=>"gammaSpace"in e,get:e=>e.gammaSpace},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,T,{kind:"getter",name:"lodGenerationOffset",static:!1,private:!1,access:{has:e=>"lodGenerationOffset"in e,get:e=>e.lodGenerationOffset},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,M,{kind:"getter",name:"lodGenerationScale",static:!1,private:!1,access:{has:e=>"lodGenerationScale"in e,get:e=>e.lodGenerationScale},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,I,{kind:"getter",name:"linearSpecularLOD",static:!1,private:!1,access:{has:e=>"linearSpecularLOD"in e,get:e=>e.linearSpecularLOD},metadata:es},null,b),(0,eh.__esDecorate)(ea,null,A,{kind:"getter",name:"irradianceTexture",static:!1,private:!1,access:{has:e=>"irradianceTexture"in e,get:e=>e.irradianceTexture},metadata:es},null,b),(0,eh.__esDecorate)(null,null,t,{kind:"field",name:"uniqueId",static:!1,private:!1,access:{has:e=>"uniqueId"in e,get:e=>e.uniqueId,set:(e,t)=>{e.uniqueId=t}},metadata:es},z,y),(0,eh.__esDecorate)(null,null,i,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:es},E,D),(0,eh.__esDecorate)(null,null,r,{kind:"field",name:"displayName",static:!1,private:!1,access:{has:e=>"displayName"in e,get:e=>e.displayName,set:(e,t)=>{e.displayName=t}},metadata:es},w,L),(0,eh.__esDecorate)(null,null,s,{kind:"field",name:"metadata",static:!1,private:!1,access:{has:e=>"metadata"in e,get:e=>e.metadata,set:(e,t)=>{e.metadata=t}},metadata:es},C,B),(0,eh.__esDecorate)(null,null,a,{kind:"field",name:"_hasAlpha",static:!1,private:!1,access:{has:e=>"_hasAlpha"in e,get:e=>e._hasAlpha,set:(e,t)=>{e._hasAlpha=t}},metadata:es},U,V),(0,eh.__esDecorate)(null,null,n,{kind:"field",name:"_getAlphaFromRGB",static:!1,private:!1,access:{has:e=>"_getAlphaFromRGB"in e,get:e=>e._getAlphaFromRGB,set:(e,t)=>{e._getAlphaFromRGB=t}},metadata:es},N,G),(0,eh.__esDecorate)(null,null,h,{kind:"field",name:"level",static:!1,private:!1,access:{has:e=>"level"in e,get:e=>e.level,set:(e,t)=>{e.level=t}},metadata:es},P,F),(0,eh.__esDecorate)(null,null,l,{kind:"field",name:"_coordinatesIndex",static:!1,private:!1,access:{has:e=>"_coordinatesIndex"in e,get:e=>e._coordinatesIndex,set:(e,t)=>{e._coordinatesIndex=t}},metadata:es},k,W),(0,eh.__esDecorate)(null,null,o,{kind:"field",name:"optimizeUVAllocation",static:!1,private:!1,access:{has:e=>"optimizeUVAllocation"in e,get:e=>e.optimizeUVAllocation,set:(e,t)=>{e.optimizeUVAllocation=t}},metadata:es},Y,j),(0,eh.__esDecorate)(null,null,u,{kind:"field",name:"_coordinatesMode",static:!1,private:!1,access:{has:e=>"_coordinatesMode"in e,get:e=>e._coordinatesMode,set:(e,t)=>{e._coordinatesMode=t}},metadata:es},q,H),(0,eh.__esDecorate)(null,null,d,{kind:"field",name:"wrapR",static:!1,private:!1,access:{has:e=>"wrapR"in e,get:e=>e.wrapR,set:(e,t)=>{e.wrapR=t}},metadata:es},Z,X),(0,eh.__esDecorate)(null,null,g,{kind:"field",name:"anisotropicFilteringLevel",static:!1,private:!1,access:{has:e=>"anisotropicFilteringLevel"in e,get:e=>e.anisotropicFilteringLevel,set:(e,t)=>{e.anisotropicFilteringLevel=t}},metadata:es},$,J),(0,eh.__esDecorate)(null,null,R,{kind:"field",name:"invertZ",static:!1,private:!1,access:{has:e=>"invertZ"in e,get:e=>e.invertZ,set:(e,t)=>{e.invertZ=t}},metadata:es},K,Q),(0,eh.__esDecorate)(null,null,S,{kind:"field",name:"lodLevelInAlpha",static:!1,private:!1,access:{has:e=>"lodLevelInAlpha"in e,get:e=>e.lodLevelInAlpha,set:(e,t)=>{e.lodLevelInAlpha=t}},metadata:es},ee,et),(0,eh.__esDecorate)(null,null,v,{kind:"field",name:"isRenderTarget",static:!1,private:!1,access:{has:e=>"isRenderTarget"in e,get:e=>e.isRenderTarget,set:(e,t)=>{e.isRenderTarget=t}},metadata:es},ei,er),es&&Object.defineProperty(ea,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:es}),ea.DEFAULT_ANISOTROPIC_FILTERING_LEVEL=4,ea);(en=ef.prototype).forceSphericalPolynomialsRecompute??(en.forceSphericalPolynomialsRecompute=(0,ex._MissingSideEffect)("BaseTexture","forceSphericalPolynomialsRecompute")),Object.getOwnPropertyDescriptor(ef.prototype,"sphericalPolynomial")||Object.defineProperty(ef.prototype,"sphericalPolynomial",(0,ex._MissingSideEffectProperty)("BaseTexture","sphericalPolynomial")),e.s(["BaseTexture",0,ef],65042)},80603,21771,e=>{"use strict";let t,i,r,s,a,n,h,l,o,u,_,c,d,g,x,f,m,p,R,S,T,M,I,A,v,O,b,z,y,E,D,w,L,C,B,U,V,N,G,P;var F,k=e.i(73403),W=e.i(5207),Y=e.i(97991),j=e.i(56173),q=e.i(65042),H=e.i(68282),Z=e.i(49399),X=e.i(89435),$=e.i(93561),J=e.i(38450),K=e.i(64781);function Q(e,t,i=!1){let r=t.width,s=t.height;if(e instanceof Float32Array){let t=e.byteLength/e.BYTES_PER_ELEMENT,i=new Uint8Array(t);for(;--t>=0;){let r=e[t];r<0?r=0:r>1&&(r=1),i[t]=255*r}e=i}let a=document.createElement("canvas");a.width=r,a.height=s;let n=a.getContext("2d");if(!n)return null;let h=n.createImageData(r,s);if(h.data.set(e),n.putImageData(h,0,0),i){let e=document.createElement("canvas");e.width=r,e.height=s;let t=e.getContext("2d");return t?(t.translate(0,s),t.scale(1,-1),t.drawImage(a,0,0),e.toDataURL("image/png")):null}return a.toDataURL("image/png")}function ee(e,t=0,i=0){let r=e.getInternalTexture();if(!r)return null;let s=e._readPixelsSync(t,i);return s?Q(s,e.getSize(),r.invertY):null}async function et(e,t=0,i=0){let r=e.getInternalTexture();if(!r)return null;let s=await e.readPixels(t,i);return s?Q(s,e.getSize(),r.invertY):null}e.s(["GenerateBase64StringFromTexture",0,ee,"GenerateBase64StringFromTextureAsync",0,et],21771);var ei=e.i(40672),er=e.i(69552);let es=(g=q.BaseTexture,x=[],f=[],m=[],p=[],R=[],S=[],T=[],M=[],I=[],A=[],v=[],O=[],b=[],z=[],y=[],E=[],D=[],w=[],L=[],C=[],B=[],U=[],V=[],N=[],G=[],F=class extends g{static _CreateVideoTexture(e,t,i,r=!1,s=!1,a=F.TRILINEAR_SAMPLINGMODE,n={},h,l=5){throw(0,Z._WarnImport)("VideoTexture")}get noMipmap(){return this._noMipmap}get mimeType(){return this._mimeType}set isBlocking(e){this._isBlocking=e}get isBlocking(){return this._isBlocking}get invertY(){return this._invertY}constructor(e,t,i,r,s=F.TRILINEAR_SAMPLINGMODE,a=null,n=null,h=null,l=!1,o,u,_,c,d){let g;super(t),this.url=((0,k.__runInitializers)(this,x),(0,k.__runInitializers)(this,f,null)),this.uOffset=((0,k.__runInitializers)(this,m),(0,k.__runInitializers)(this,p,0)),this.vOffset=((0,k.__runInitializers)(this,R),(0,k.__runInitializers)(this,S,0)),this.uScale=((0,k.__runInitializers)(this,T),(0,k.__runInitializers)(this,M,1)),this.vScale=((0,k.__runInitializers)(this,I),(0,k.__runInitializers)(this,A,1)),this.uAng=((0,k.__runInitializers)(this,v),(0,k.__runInitializers)(this,O,0)),this.vAng=((0,k.__runInitializers)(this,b),(0,k.__runInitializers)(this,z,0)),this.wAng=((0,k.__runInitializers)(this,y),(0,k.__runInitializers)(this,E,0)),this.uRotationCenter=((0,k.__runInitializers)(this,D),(0,k.__runInitializers)(this,w,.5)),this.vRotationCenter=((0,k.__runInitializers)(this,L),(0,k.__runInitializers)(this,C,.5)),this.wRotationCenter=((0,k.__runInitializers)(this,B),(0,k.__runInitializers)(this,U,.5)),this.homogeneousRotationInUVTransform=((0,k.__runInitializers)(this,V),(0,k.__runInitializers)(this,N,!1)),this.inspectableCustomProperties=((0,k.__runInitializers)(this,G),null),this._noMipmap=!1,this._invertY=!1,this._rowGenerationMatrix=null,this._cachedTextureMatrix=null,this._projectionModeMatrix=null,this._t0=null,this._t1=null,this._t2=null,this._cachedUOffset=-1,this._cachedVOffset=-1,this._cachedUScale=0,this._cachedVScale=0,this._cachedUAng=-1,this._cachedVAng=-1,this._cachedWAng=-1,this._cachedReflectionProjectionMatrixId=-1,this._cachedURotationCenter=-1,this._cachedVRotationCenter=-1,this._cachedWRotationCenter=-1,this._cachedHomogeneousRotationInUVTransform=!1,this._cachedIdentity3x2=!0,this._cachedReflectionTextureMatrix=null,this._cachedReflectionUOffset=-1,this._cachedReflectionVOffset=-1,this._cachedReflectionUScale=0,this._cachedReflectionVScale=0,this._cachedReflectionCoordinatesMode=-1,this._buffer=null,this._deleteBuffer=!1,this._format=null,this._delayedOnLoad=null,this._delayedOnError=null,this.onLoadObservable=new Y.Observable,this._isBlocking=!0,this.name=e||"",this.url=e;let P=!1,W=null,j=!0;"object"==typeof i&&null!==i?(g=i.noMipmap??!1,r=i.invertY??!ei.useOpenGLOrientationForUV,s=i.samplingMode??F.TRILINEAR_SAMPLINGMODE,a=i.onLoad??null,n=i.onError??null,h=i.buffer??null,l=i.deleteBuffer??!1,o=i.format,u=i.mimeType,_=i.loaderOptions,c=i.creationFlags,P=i.useSRGBBuffer??!1,W=i.internalTexture??null,j=i.gammaSpace??j,d=i.forcedExtension??d):g=!!i,this._gammaSpace=j,this._noMipmap=g,this._invertY=void 0===r?!ei.useOpenGLOrientationForUV:r,this._initialSamplingMode=s,this._buffer=h,this._deleteBuffer=l,this._mimeType=u,this._loaderOptions=_,this._creationFlags=c,this._useSRGBBuffer=P,this._forcedExtension=d,void 0!==o&&(this._format=o);const q=this.getScene(),H=this._getEngine();if(!H)return;H.onBeforeTextureInitObservable.notifyObservers(this);const Z=()=>{this._texture&&(this._texture._invertVScale&&(this.vScale*=-1,this.vOffset+=1),null!==this._texture._cachedWrapU&&(this.wrapU=this._texture._cachedWrapU,this._texture._cachedWrapU=null),null!==this._texture._cachedWrapV&&(this.wrapV=this._texture._cachedWrapV,this._texture._cachedWrapV=null),null!==this._texture._cachedWrapR&&(this.wrapR=this._texture._cachedWrapR,this._texture._cachedWrapR=null)),this.onLoadObservable.hasObservers()&&this.onLoadObservable.notifyObservers(this),a&&a(),!this.isBlocking&&q&&q.resetCachedMaterial()},$=(e,t)=>{this._loadingError=!0,this._errorObject={message:e,exception:t},n&&n(e,t),F.OnTextureLoadErrorObservable.notifyObservers(this)};if(!this.url&&!W){this._delayedOnLoad=Z,this._delayedOnError=$;return}if(this._texture=W??this._getFromCache(this.url,g,s,this._invertY,P,this.isCube),this._texture)if(this._texture.isReady)X.TimingTools.SetImmediate(()=>Z());else{const e=this._texture.onLoadedObservable.add(Z);this._texture.onErrorObservable.add(t=>{$(t.message,t.exception),this._texture?.onLoadedObservable.remove(e)})}else if(q&&q.useDelayedTextureLoading)this.delayLoadState=4,this._delayedOnLoad=Z,this._delayedOnError=$;else{try{this._texture=H.createTexture(this.url,g,this._invertY,q,s,Z,$,this._buffer,void 0,this._format,this._forcedExtension,u,_,c,P)}catch(e){throw $("error loading",e),e}l&&(this._buffer=null)}}updateURL(e,t=null,i,r){this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(1,e=>e.hasTexture(this))),(!this.name||this.name.startsWith("data:"))&&(this.name=e),this.url=e,this._buffer=t,this._forcedExtension=r,this.delayLoadState=4;let s=this._delayedOnLoad,a=()=>{s?s():this.onLoadObservable.hasObservers()&&this.onLoadObservable.notifyObservers(this),i&&i()};this._delayedOnLoad=a,this.delayLoad()}delayLoad(){if(4!==this.delayLoadState)return;let e=this.getScene();if(!e)return;let t=this.url;!t&&(this.name.indexOf("://")>0||this.name.startsWith("data:"))&&(t=this.name),this.delayLoadState=1,this._texture=this._getFromCache(t,this._noMipmap,this.samplingMode,this._invertY,this._useSRGBBuffer,this.isCube),this._texture?this._delayedOnLoad&&(this._texture.isReady?X.TimingTools.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(t,this._noMipmap,this._invertY,e,this.samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format,this._forcedExtension,this._mimeType,this._loaderOptions,this._creationFlags,this._useSRGBBuffer),this._deleteBuffer&&(this._buffer=null)),this._delayedOnLoad=null,this._delayedOnError=null}_prepareRowForTextureGeneration(e,t,i,r){e*=this._cachedUScale,t*=this._cachedVScale,e-=this.uRotationCenter*this._cachedUScale,t-=this.vRotationCenter*this._cachedVScale,i-=this.wRotationCenter,j.Vector3.TransformCoordinatesFromFloatsToRef(e,t,i,this._rowGenerationMatrix,r),r.x+=this.uRotationCenter*this._cachedUScale+this._cachedUOffset,r.y+=this.vRotationCenter*this._cachedVScale+this._cachedVOffset,r.z+=this.wRotationCenter}getTextureMatrix(e=1){if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale*e===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng&&this.uRotationCenter===this._cachedURotationCenter&&this.vRotationCenter===this._cachedVRotationCenter&&this.wRotationCenter===this._cachedWRotationCenter&&this.homogeneousRotationInUVTransform===this._cachedHomogeneousRotationInUVTransform)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale*e,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedURotationCenter=this.uRotationCenter,this._cachedVRotationCenter=this.vRotationCenter,this._cachedWRotationCenter=this.wRotationCenter,this._cachedHomogeneousRotationInUVTransform=this.homogeneousRotationInUVTransform,this._cachedTextureMatrix&&this._rowGenerationMatrix||(this._cachedTextureMatrix=j.Matrix.Zero(),this._rowGenerationMatrix=new j.Matrix,this._t0=j.Vector3.Zero(),this._t1=j.Vector3.Zero(),this._t2=j.Vector3.Zero()),j.Matrix.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this.homogeneousRotationInUVTransform?(j.Matrix.TranslationToRef(-this._cachedURotationCenter,-this._cachedVRotationCenter,-this._cachedWRotationCenter,j.TmpVectors.Matrix[0]),j.Matrix.TranslationToRef(this._cachedURotationCenter,this._cachedVRotationCenter,this._cachedWRotationCenter,j.TmpVectors.Matrix[1]),j.Matrix.ScalingToRef(this._cachedUScale,this._cachedVScale,0,j.TmpVectors.Matrix[2]),j.Matrix.TranslationToRef(this._cachedUOffset,this._cachedVOffset,0,j.TmpVectors.Matrix[3]),j.TmpVectors.Matrix[0].multiplyToRef(this._rowGenerationMatrix,this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(j.TmpVectors.Matrix[1],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(j.TmpVectors.Matrix[2],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(j.TmpVectors.Matrix[3],this._cachedTextureMatrix),this._cachedTextureMatrix.setRowFromFloats(2,this._cachedTextureMatrix.m[12],this._cachedTextureMatrix.m[13],this._cachedTextureMatrix.m[14],1)):(this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),j.Matrix.FromValuesToRef(this._t1.x,this._t1.y,this._t1.z,0,this._t2.x,this._t2.y,this._t2.z,0,this._t0.x,this._t0.y,this._t0.z,0,0,0,0,1,this._cachedTextureMatrix));let t=this.getScene();if(!t)return this._cachedTextureMatrix;let i=this._cachedIdentity3x2;return this._cachedIdentity3x2=this._cachedTextureMatrix.isIdentityAs3x2(),this.optimizeUVAllocation&&i!==this._cachedIdentity3x2&&t.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)),this._cachedTextureMatrix}getReflectionTextureMatrix(){let e=this.getScene();if(!e)return this._cachedReflectionTextureMatrix;if(this.uOffset===this._cachedReflectionUOffset&&this.vOffset===this._cachedReflectionVOffset&&this.uScale===this._cachedReflectionUScale&&this.vScale===this._cachedReflectionVScale&&this.coordinatesMode===this._cachedReflectionCoordinatesMode){if(this.coordinatesMode!==F.PROJECTION_MODE)return this._cachedReflectionTextureMatrix;else if(this._cachedReflectionProjectionMatrixId===e.getProjectionMatrix().updateFlag)return this._cachedReflectionTextureMatrix}this._cachedReflectionTextureMatrix||(this._cachedReflectionTextureMatrix=j.Matrix.Zero()),this._projectionModeMatrix||(this._projectionModeMatrix=j.Matrix.Zero());let t=this._cachedReflectionCoordinatesMode!==this.coordinatesMode;switch(this._cachedReflectionUOffset=this.uOffset,this._cachedReflectionVOffset=this.vOffset,this._cachedReflectionUScale=this.uScale,this._cachedReflectionVScale=this.vScale,this._cachedReflectionCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case F.PLANAR_MODE:j.Matrix.IdentityToRef(this._cachedReflectionTextureMatrix),this._cachedReflectionTextureMatrix[0]=this.uScale,this._cachedReflectionTextureMatrix[5]=this.vScale,this._cachedReflectionTextureMatrix[12]=this.uOffset,this._cachedReflectionTextureMatrix[13]=this.vOffset;break;case F.PROJECTION_MODE:{j.Matrix.FromValuesToRef(.5,0,0,0,0,-.5,0,0,0,0,0,0,.5,.5,1,1,this._projectionModeMatrix);let t=e.getProjectionMatrix();this._cachedReflectionProjectionMatrixId=t.updateFlag,t.multiplyToRef(this._projectionModeMatrix,this._cachedReflectionTextureMatrix);break}default:j.Matrix.IdentityToRef(this._cachedReflectionTextureMatrix)}return t&&e.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)),this._cachedReflectionTextureMatrix}clone(){let e={noMipmap:this._noMipmap,invertY:this._invertY,samplingMode:this.samplingMode,onLoad:void 0,onError:void 0,buffer:this._texture?this._texture._buffer:void 0,deleteBuffer:this._deleteBuffer,format:this.textureFormat,mimeType:this.mimeType,loaderOptions:this._loaderOptions,creationFlags:this._creationFlags,useSRGBBuffer:this._useSRGBBuffer};return er.SerializationHelper.Clone(()=>new F(this._texture?this._texture.url:null,this.getScene(),e),this)}serialize(){let e=this.name;!F.SerializeBuffers&&this.name.startsWith("data:")&&(this.name=""),this.name.startsWith("data:")&&this.url===this.name&&(this.url="");let t=super.serialize(F._SerializeInternalTextureUniqueId);if(!t)return null;if(F.SerializeBuffers||F.ForceSerializeBuffers)if("string"==typeof this._buffer&&this._buffer.startsWith("data:"))t.base64String=this._buffer,t.name=t.name.replace("data:","");else if(this.url&&this.url.startsWith("data:")&&this._buffer instanceof Uint8Array){let e=this.mimeType||"image/png";t.base64String=`data:${e};base64,${(0,K.EncodeArrayBufferToBase64)(this._buffer)}`}else(F.ForceSerializeBuffers||this.url&&this.url.startsWith("blob:")||this._forceSerialize)&&(t.base64String=!this._engine||this._engine._features.supportSyncTextureRead?ee(this):et(this));return t.invertY=this._invertY,t.samplingMode=this.samplingMode,t._creationFlags=this._creationFlags,t._useSRGBBuffer=this._useSRGBBuffer,F._SerializeInternalTextureUniqueId&&(t.internalTextureUniqueId=this._texture?.uniqueId),t.internalTextureLabel=this._texture?.label,t.noMipmap=this._noMipmap,this.name=e,t}getClassName(){return"Texture"}dispose(){super.dispose(),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null,this._buffer=null}static Parse(e,t,i){let r;if(e.customType){let r=$.InstantiationTools.Instantiate(e.customType).Parse(e,t,i);return e.samplingMode&&r.updateSamplingMode&&r._samplingMode&&r._samplingMode!==e.samplingMode&&r.updateSamplingMode(e.samplingMode),r}if(e.isCube&&!e.isRenderTarget)return F._CubeTextureParser(e,t,i);let s=void 0!==e.internalTextureUniqueId;if(!e.name&&!e.isRenderTarget&&!s)return null;if(s){for(let i of t.getEngine().getLoadedTexturesCache())if(i.uniqueId===e.internalTextureUniqueId){r=i;break}}let a=t=>{if(t&&t._texture&&(t._texture._cachedWrapU=null,t._texture._cachedWrapV=null,t._texture._cachedWrapR=null),e.samplingMode){let i=e.samplingMode;t&&t.samplingMode!==i&&t.updateSamplingMode(i)}if(t&&e.animations)for(let i=0;i<e.animations.length;i++){let r=e.animations[i],s=(0,H.GetClass)("BABYLON.Animation");s&&t.animations.push(s.Parse(r))}t&&t._texture&&(s&&!r&&t._texture._setUniqueId(e.internalTextureUniqueId),t._texture.label=e.internalTextureLabel)};return er.SerializationHelper.Parse(()=>{let s=!0;if(e.noMipmap&&(s=!1),e.mirrorPlane){let i=F._CreateMirror(e.name,e.renderTargetSize,t,s);return i._waitingRenderList=e.renderList,i.mirrorPlane=J.Plane.FromArray(e.mirrorPlane),a(i),i}if(e.isRenderTarget&&!e.base64String){let i=null;if(e.isCube){if(t.reflectionProbes)for(let i=0;i<t.reflectionProbes.length;i++){let r=t.reflectionProbes[i];if(r.name===e.name)return r.cubeTexture}}else(i=F._CreateRenderTargetTexture(e.name,e.renderTargetSize,t,s,e._creationFlags??0))._waitingRenderList=e.renderList;return a(i),i}if(e.isVideo){let r=F._CreateVideoTexture(i+(e.url||e.name),i+(e.src||e.url),t,s,e.invertY,e.samplingMode,e.settings||{});return a(r),r}{let n;if("string"==typeof e.base64String&&e.base64String&&!r){let i={buffer:e.base64String,noMipmap:!s,invertY:e.invertY,samplingMode:e.samplingMode,useSRGBBuffer:e._useSRGBBuffer??!1,creationFlags:e._creationFlags??0,onLoad:()=>{a(n)}},r=e.base64String,h=r.startsWith("data:")?r.substring(5):r;(n=F.CreateFromBase64String("",h,t,i)).name=e.name}else{let h;h=e.name&&(e.name.indexOf("://")>0||e.name.startsWith("data:"))?e.name:i+e.name,e.url&&(e.url.startsWith("data:")||F.UseSerializedUrlIfAny)&&(h=e.url);let l={noMipmap:!s,invertY:e.invertY,samplingMode:e.samplingMode,useSRGBBuffer:e._useSRGBBuffer??!1,creationFlags:e._creationFlags??0,onLoad:()=>{a(n)},internalTexture:r};n=new F(h,t,l)}return n}},e,t)}static CreateFromBase64String(e,t,i,r,s,a=F.TRILINEAR_SAMPLINGMODE,n=null,h=null,l=5,o,u){return new F("data:"+t,i,r,s,a,n,h,e,!1,l,void 0,void 0,o,u)}static LoadFromDataString(e,t,i,r=!1,s,a=!0,n=F.TRILINEAR_SAMPLINGMODE,h=null,l=null,o=5,u,_){return"data:"!==e.substring(0,5)&&(e="data:"+e),new F(e,i,s,a,n,h,l,t,r,o,void 0,void 0,u,_)}},P="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0,t=[(0,W.serialize)()],i=[(0,W.serialize)()],r=[(0,W.serialize)()],s=[(0,W.serialize)()],a=[(0,W.serialize)()],n=[(0,W.serialize)()],h=[(0,W.serialize)()],l=[(0,W.serialize)()],o=[(0,W.serialize)()],u=[(0,W.serialize)()],_=[(0,W.serialize)()],c=[(0,W.serialize)()],d=[(0,W.serialize)()],(0,k.__esDecorate)(F,null,d,{kind:"getter",name:"isBlocking",static:!1,private:!1,access:{has:e=>"isBlocking"in e,get:e=>e.isBlocking},metadata:P},null,x),(0,k.__esDecorate)(null,null,t,{kind:"field",name:"url",static:!1,private:!1,access:{has:e=>"url"in e,get:e=>e.url,set:(e,t)=>{e.url=t}},metadata:P},f,m),(0,k.__esDecorate)(null,null,i,{kind:"field",name:"uOffset",static:!1,private:!1,access:{has:e=>"uOffset"in e,get:e=>e.uOffset,set:(e,t)=>{e.uOffset=t}},metadata:P},p,R),(0,k.__esDecorate)(null,null,r,{kind:"field",name:"vOffset",static:!1,private:!1,access:{has:e=>"vOffset"in e,get:e=>e.vOffset,set:(e,t)=>{e.vOffset=t}},metadata:P},S,T),(0,k.__esDecorate)(null,null,s,{kind:"field",name:"uScale",static:!1,private:!1,access:{has:e=>"uScale"in e,get:e=>e.uScale,set:(e,t)=>{e.uScale=t}},metadata:P},M,I),(0,k.__esDecorate)(null,null,a,{kind:"field",name:"vScale",static:!1,private:!1,access:{has:e=>"vScale"in e,get:e=>e.vScale,set:(e,t)=>{e.vScale=t}},metadata:P},A,v),(0,k.__esDecorate)(null,null,n,{kind:"field",name:"uAng",static:!1,private:!1,access:{has:e=>"uAng"in e,get:e=>e.uAng,set:(e,t)=>{e.uAng=t}},metadata:P},O,b),(0,k.__esDecorate)(null,null,h,{kind:"field",name:"vAng",static:!1,private:!1,access:{has:e=>"vAng"in e,get:e=>e.vAng,set:(e,t)=>{e.vAng=t}},metadata:P},z,y),(0,k.__esDecorate)(null,null,l,{kind:"field",name:"wAng",static:!1,private:!1,access:{has:e=>"wAng"in e,get:e=>e.wAng,set:(e,t)=>{e.wAng=t}},metadata:P},E,D),(0,k.__esDecorate)(null,null,o,{kind:"field",name:"uRotationCenter",static:!1,private:!1,access:{has:e=>"uRotationCenter"in e,get:e=>e.uRotationCenter,set:(e,t)=>{e.uRotationCenter=t}},metadata:P},w,L),(0,k.__esDecorate)(null,null,u,{kind:"field",name:"vRotationCenter",static:!1,private:!1,access:{has:e=>"vRotationCenter"in e,get:e=>e.vRotationCenter,set:(e,t)=>{e.vRotationCenter=t}},metadata:P},C,B),(0,k.__esDecorate)(null,null,_,{kind:"field",name:"wRotationCenter",static:!1,private:!1,access:{has:e=>"wRotationCenter"in e,get:e=>e.wRotationCenter,set:(e,t)=>{e.wRotationCenter=t}},metadata:P},U,V),(0,k.__esDecorate)(null,null,c,{kind:"field",name:"homogeneousRotationInUVTransform",static:!1,private:!1,access:{has:e=>"homogeneousRotationInUVTransform"in e,get:e=>e.homogeneousRotationInUVTransform,set:(e,t)=>{e.homogeneousRotationInUVTransform=t}},metadata:P},N,G),P&&Object.defineProperty(F,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:P}),F.SerializeBuffers=!0,F.ForceSerializeBuffers=!1,F.OnTextureLoadErrorObservable=new Y.Observable,F._SerializeInternalTextureUniqueId=!1,F._CubeTextureParser=(e,t,i)=>{throw(0,Z._WarnImport)("CubeTexture")},F._CreateMirror=(e,t,i,r)=>{throw(0,Z._WarnImport)("MirrorTexture")},F._CreateRenderTargetTexture=(e,t,i,r,s)=>{throw(0,Z._WarnImport)("RenderTargetTexture")},F.NEAREST_SAMPLINGMODE=1,F.NEAREST_NEAREST_MIPLINEAR=8,F.BILINEAR_SAMPLINGMODE=2,F.LINEAR_LINEAR_MIPNEAREST=11,F.TRILINEAR_SAMPLINGMODE=3,F.LINEAR_LINEAR_MIPLINEAR=3,F.NEAREST_NEAREST_MIPNEAREST=4,F.NEAREST_LINEAR_MIPNEAREST=5,F.NEAREST_LINEAR_MIPLINEAR=6,F.NEAREST_LINEAR=7,F.NEAREST_NEAREST=1,F.LINEAR_NEAREST_MIPNEAREST=9,F.LINEAR_NEAREST_MIPLINEAR=10,F.LINEAR_LINEAR=2,F.LINEAR_NEAREST=12,F.EXPLICIT_MODE=0,F.SPHERICAL_MODE=1,F.PLANAR_MODE=2,F.CUBIC_MODE=3,F.PROJECTION_MODE=4,F.SKYBOX_MODE=5,F.INVCUBIC_MODE=6,F.EQUIRECTANGULAR_MODE=7,F.FIXED_EQUIRECTANGULAR_MODE=8,F.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,F.CLAMP_ADDRESSMODE=0,F.WRAP_ADDRESSMODE=1,F.MIRROR_ADDRESSMODE=2,F.UseSerializedUrlIfAny=!1,F),ea=!1;e.s(["RegisterTexture",0,function(){ea||(ea=!0,(0,H.RegisterClass)("BABYLON.Texture",es),er.SerializationHelper._TextureParser=es.Parse)},"Texture",0,es],80603)},92953,e=>{"use strict";e.s(["Size",0,class e{constructor(e,t){this.width=e,this.height=t}toString(){return`{W: ${this.width}, H: ${this.height}}`}getClassName(){return"Size"}getHashCode(){let e=0|this.width;return 397*e^this.height}copyFrom(e){this.width=e.width,this.height=e.height}copyFromFloats(e,t){return this.width=e,this.height=t,this}set(e,t){return this.copyFromFloats(e,t)}multiplyByFloats(t,i){return new e(this.width*t,this.height*i)}clone(){return new e(this.width,this.height)}equals(e){return!!e&&this.width===e.width&&this.height===e.height}get surface(){return this.width*this.height}static Zero(){return new e(0,0)}add(t){return new e(this.width+t.width,this.height+t.height)}subtract(t){return new e(this.width-t.width,this.height-t.height)}scale(t){return new e(this.width*t,this.height*t)}static Lerp(t,i,r){return new e(t.width+(i.width-t.width)*r,t.height+(i.height-t.height)*r)}}])}]);
|