import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import"./vendor-primevue-DxVRNMbC.js";import"./vendor-firebase-CdLSXhbt.js";import{A as t,Dt as n,I as r,O as i,R as a,et as o,ft as s,j as c,k as l,pt as u}from"./vendor-vue-core-X6q-rGJs.js";import"./vendor-other-D7Cc5Ixw.js";import"./useFeatureFlags-B0oLxKlK.js";import"./api-Bo3xGkUk.js";import"./colorUtil-_hWBTBqR.js";import"./i18n-YWjgSklj.js";import"./vendor-reka-ui-DNqLZfNK.js";import"./Button-DREXX1Gv.js";import"./dialogService-BTVFmf6F.js";import"./systemStatsStore-D-GJwPc7.js";import"./useErrorHandling-D_QKYdSx.js";import"./dialogStore-CUaBKWKw.js";import"./useCopyToClipboard-C_P-Vq1j.js";import"./vendor-tiptap-CjhX_1DY.js";import"./vendor-markdown-CyF8uRn7.js";import"./markdownRendererUtil-DU6rKHAL.js";import"./useExternalLink-Vt2OTFDR.js";import"./vendor-three-CHi1XwmR.js";import{t as d}from"./Load3DControls-B2cec7J1.js";import{t as f}from"./AnimationControls-Be31yBcI.js";import"./load3dService-Bll-QIN_.js";import{t as p}from"./useLoad3dViewer-5ri8nDzW.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=n(p());return u([a,()=>e.modelUrl],async()=>{!a.value||!e.modelUrl||await h.value.initializeStandaloneViewer(a.value,e.modelUrl)}),(e,n)=>(o(),c(`div`,{ref_key:`containerRef`,ref:a,class:`relative w-full h-full`,onMouseenter:n[10]||=(...e)=>h.value.handleMouseEnter&&h.value.handleMouseEnter(...e),onMouseleave:n[11]||=(...e)=>h.value.handleMouseLeave&&h.value.handleMouseLeave(...e),onResize:n[12]||=(...e)=>h.value.handleResize&&h.value.handleResize(...e)},[i(`div`,m,[r(d,{"scene-config":h.value,"onUpdate:sceneConfig":n[0]||=e=>h.value=e,"model-config":h.value,"onUpdate:modelConfig":n[1]||=e=>h.value=e,"camera-config":h.value,"onUpdate:cameraConfig":n[2]||=e=>h.value=e,"light-config":h.value,"onUpdate:lightConfig":n[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":n[4]||=e=>h.value.animations=e,playing:h.value.playing,"onUpdate:playing":n[5]||=e=>h.value.playing=e,"selected-speed":h.value.selectedSpeed,"onUpdate:selectedSpeed":n[6]||=e=>h.value.selectedSpeed=e,"selected-animation":h.value.selectedAnimation,"onUpdate:selectedAnimation":n[7]||=e=>h.value.selectedAnimation=e,"animation-progress":h.value.animationProgress,"onUpdate:animationProgress":n[8]||=e=>h.value.animationProgress=e,"animation-duration":h.value.animationDuration,"onUpdate:animationDuration":n[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-CgLLu-j_.js.map