import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import"./vendor-primevue-DyvCA8Nd.js";import"./vendor-firebase-yTFzdAQf.js";import{A as t,I as n,O as r,Ot as i,R as a,et as o,ft as s,j as c,k as l,pt as u}from"./vendor-vue-core-IZuWV8u3.js";import"./vendor-other-Q0G0D0d6.js";import"./useFeatureFlags-BfqxvwHy.js";import"./api-C840HmAF.js";import"./vendor-markdown-8POvMhty.js";import"./colorUtil-Q3kaA72Z.js";import"./i18n-B8CRKNXU.js";import"./vendor-reka-ui-Dfvl2gA8.js";import"./Button-uSZXZovG.js";import"./dialogService-J-k0CeI4.js";import"./systemStatsStore-BJOd4X3d.js";import"./userStore-o2bxxBJt.js";import"./useErrorHandling-t4kNWELW.js";import"./vendor-tiptap-BZCaYoPl.js";import"./Popover-BV6_S20i.js";import"./markdownRendererUtil-DH1PCfUd.js";import"./useExternalLink-Cxwyf6Kb.js";import"./vendor-three-sFOzKPkM.js";import{t as d}from"./Load3DControls-C3IYHaIj.js";import{t as f}from"./AnimationControls-DxEslbHX.js";import"./load3dService-D05IgI3_.js";import{t as p}from"./useLoad3dViewer-BRJXoRXk.js";var m={class:`pointer-events-none absolute top-0 left-0 size-full`},h=a({__name:`Preview3d`,props:{modelUrl:{}},setup(e){let a=s(`containerRef`),h=i(p());return u([a,()=>e.modelUrl],async()=>{!a.value||!e.modelUrl||await h.value.initializeStandaloneViewer(a.value,e.modelUrl)}),(e,i)=>(o(),c(`div`,{ref_key:`containerRef`,ref:a,class:`relative w-full h-full`,onMouseenter:i[10]||=(...e)=>h.value.handleMouseEnter&&h.value.handleMouseEnter(...e),onMouseleave:i[11]||=(...e)=>h.value.handleMouseLeave&&h.value.handleMouseLeave(...e),onResize:i[12]||=(...e)=>h.value.handleResize&&h.value.handleResize(...e)},[r(`div`,m,[n(d,{"scene-config":h.value,"onUpdate:sceneConfig":i[0]||=e=>h.value=e,"model-config":h.value,"onUpdate:modelConfig":i[1]||=e=>h.value=e,"camera-config":h.value,"onUpdate:cameraConfig":i[2]||=e=>h.value=e,"light-config":h.value,"onUpdate:lightConfig":i[3]||=e=>h.value=e,"is-splat-model":h.value.isSplatModel,"is-ply-model":h.value.isPlyModel,"has-skeleton":h.value.hasSkeleton,onUpdateBackgroundImage:h.value.handleBackgroundImageUpdate,onExportModel:h.value.exportModel},null,8,[`scene-config`,`model-config`,`camera-config`,`light-config`,`is-splat-model`,`is-ply-model`,`has-skeleton`,`onUpdateBackgroundImage`,`onExportModel`]),h.value.animations&&h.value.animations.length>0?(o(),l(f,{key:0,animations:h.value.animations,"onUpdate:animations":i[4]||=e=>h.value.animations=e,playing:h.value.playing,"onUpdate:playing":i[5]||=e=>h.value.playing=e,"selected-speed":h.value.selectedSpeed,"onUpdate:selectedSpeed":i[6]||=e=>h.value.selectedSpeed=e,"selected-animation":h.value.selectedAnimation,"onUpdate:selectedAnimation":i[7]||=e=>h.value.selectedAnimation=e,"animation-progress":h.value.animationProgress,"onUpdate:animationProgress":i[8]||=e=>h.value.animationProgress=e,"animation-duration":h.value.animationDuration,"onUpdate:animationDuration":i[9]||=e=>h.value.animationDuration=e,onSeek:h.value.handleSeek},null,8,[`animations`,`playing`,`selected-speed`,`selected-animation`,`animation-progress`,`animation-duration`,`onSeek`])):t(``,!0)])],544))}});export{h as default};
//# sourceMappingURL=Preview3d-DNJkK0lS.js.map