const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Canvas3D-DomR9yf1.js","./index-DWyDLubb.js","./index-CyHPbdIk.css","./i18n-Dnhn5Rxr.js","./i18n-9kYrHpuJ.css","./Canvas3DGS-DEcXVidd.js"])))=>i.map(i=>d[i]);
import{R as ee,u as c,v as ae,y as L,x as f,w as a,S as w,a as p,T as te,af as R,a5 as y,X as I,W as k,V as S,Y as T,t as oe,a6 as U}from"./index-DWyDLubb.js";import{p as n,i as z,a as C,d as re}from"./i18n-Dnhn5Rxr.js";import{I as V,c as A}from"./ScrollFade.svelte_svelte_type_style_lang-DPHOQHBm.js";import{B as ne}from"./BlockLabel-CZd21Hkw.js";import{D as le}from"./Download-Di2PsS6O.js";import{F as se}from"./File-BHHIF0P7.js";import{U as de}from"./Undo-C2-jWGVL.js";import{I as _e}from"./IconButtonWrapper-D0s9l4wW.js";import{d as ie}from"./index-tFQomdd2.js";import"./snippet-BWgYNF9D.js";var ue=k("<!> <a><!></a>",1),me=k('<div class="model3D svelte-pnaihf" data-testid="model3d"><!> <!></div>'),ve=k("<!> <!>",1);function ze(F,e){ee(e,!0);let G=n(e,"display_mode",3,"solid"),O=n(e,"clear_color",19,()=>[0,0,0,0]),q=n(e,"label",3,""),l=n(e,"zoom_speed",3,1),s=n(e,"pan_speed",3,1),u=n(e,"camera_position",19,()=>[null,null,null]),M=n(e,"has_change_history",3,!1),g=c(ae({camera_position:u(),zoom_speed:l(),pan_speed:s()})),h=c(!1),B=c(void 0),E=c(void 0),b=c(void 0);async function X(){return(await R(()=>import("./Canvas3D-DomR9yf1.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url)).default}async function Y(){return(await R(()=>import("./Canvas3DGS-DEcXVidd.js"),__vite__mapDeps([5,3,1,2,4]),import.meta.url)).default}L(()=>{e.value&&(f(h,e.value.path.endsWith(".splat")||e.value.path.endsWith(".ply"),!0),a(h)?Y().then(t=>{f(B,t,!0)}):X().then(t=>{f(E,t,!0)}))});function j(){a(b)?.reset_camera_position()}L(()=>{(!ie(a(g).camera_position,u())||a(g).zoom_speed!==l()||a(g).pan_speed!==s())&&(a(b)?.update_camera(u(),l(),s()),f(g,{camera_position:u(),zoom_speed:l(),pan_speed:s()},!0))});var P=ve(),W=w(P);{let t=y(()=>q()||e.i18n("3D_model.3d_model"));ne(W,{get show_label(){return e.show_label},get Icon(){return se},get label(){return a(t)}})}var H=I(W,2);{var J=t=>{var D=me(),x=S(D);_e(x,{children:(o,d)=>{var _=ue(),i=w(_);{var m=v=>{{let $=y(()=>!M());V(v,{get Icon(){return de},label:"Undo",onclick:()=>j(),get disabled(){return a($)}})}};z(i,v=>{a(h)||v(m)})}var r=I(i,2);C(r,"target",window.__is_colab__?"_blank":null);var Z=S(r);{let v=y(()=>e.i18n("common.download"));V(Z,{get Icon(){return le},get label(){return a(v)}})}T(r),oe(()=>{C(r,"href",e.value.url),C(r,"download",window.__is_colab__?null:e.value.orig_name||e.value.path)}),p(o,_)},$$slots:{default:!0}});var K=I(x,2);{var N=o=>{var d=U(),_=w(d);A(_,()=>a(B),(i,m)=>{m(i,{get value(){return e.value},get zoom_speed(){return l()},get pan_speed(){return s()}})}),p(o,d)},Q=o=>{var d=U(),_=w(d);A(_,()=>a(E),(i,m)=>{re(m(i,{get value(){return e.value},get display_mode(){return G()},get clear_color(){return O()},get camera_position(){return u()},get zoom_speed(){return l()},get pan_speed(){return s()}}),r=>f(b,r,!0),()=>a(b))}),p(o,d)};z(K,o=>{a(h)?o(N):o(Q,!1)})}T(D),p(t,D)};z(H,t=>{e.value&&t(J)})}p(F,P),te()}export{ze as default};
