@liveroom-tech/react-immersive 6.1.0 → 6.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/{SequencesTab-RPJAG26Z.mjs → SequencesTab-JTIVIZJD.mjs} +1 -1
  2. package/dist/binding-builder.css +1 -1
  3. package/dist/binding-builder.d.mts +3 -3
  4. package/dist/binding-builder.d.ts +3 -3
  5. package/dist/binding-builder.js +34 -27
  6. package/dist/binding-builder.mjs +1 -1
  7. package/dist/chunk-35UERL2D.mjs +83 -0
  8. package/dist/{chunk-T6AYLPCC.mjs → chunk-5XII5XCD.mjs} +1 -1
  9. package/dist/{chunk-EV6THDXD.mjs → chunk-6Q6YZ7O5.mjs} +1 -1
  10. package/dist/{chunk-PBVBZYOG.mjs → chunk-DS5XNP7A.mjs} +2 -2
  11. package/dist/chunk-M4LVNNVP.mjs +1 -0
  12. package/dist/chunk-Q4QPI5GG.mjs +9 -0
  13. package/dist/{chunk-OPZJDP7T.mjs → chunk-W7M2YD65.mjs} +1 -1
  14. package/dist/{chunk-KHN55ZM7.mjs → chunk-WJIICFV4.mjs} +2 -2
  15. package/dist/chunk-XBVAZFXW.mjs +1 -0
  16. package/dist/hosted.css +1 -1
  17. package/dist/hosted.d.mts +5 -3
  18. package/dist/hosted.d.ts +5 -3
  19. package/dist/hosted.js +33 -26
  20. package/dist/hosted.mjs +1 -1
  21. package/dist/index.css +1 -1
  22. package/dist/index.d.mts +4 -4
  23. package/dist/index.d.ts +4 -4
  24. package/dist/index.js +31 -24
  25. package/dist/index.mjs +1 -1
  26. package/dist/{modelFileResolver-BEW_95id.d.mts → modelFileResolver-pPzMl63D.d.mts} +11 -0
  27. package/dist/{modelFileResolver-BEW_95id.d.ts → modelFileResolver-pPzMl63D.d.ts} +11 -0
  28. package/dist/{modelViewerProps-C7saa0i2.d.mts → modelViewerProps-07WgBVqm.d.ts} +4 -2
  29. package/dist/{modelViewerProps-CbK_4uZj.d.ts → modelViewerProps-CGgtm4Zb.d.mts} +4 -2
  30. package/dist/{publicProps-NKTiohZO.d.mts → publicProps-BylAVwPu.d.mts} +1 -1
  31. package/dist/{publicProps-z7cJhUH8.d.ts → publicProps-CEt3hxQU.d.ts} +1 -1
  32. package/dist/simple-model-viewer.css +1 -1
  33. package/dist/simple-model-viewer.d.mts +2 -2
  34. package/dist/simple-model-viewer.d.ts +2 -2
  35. package/dist/simple-model-viewer.js +4 -4
  36. package/dist/simple-model-viewer.mjs +1 -1
  37. package/dist/utils.d.mts +4 -4
  38. package/dist/utils.d.ts +4 -4
  39. package/dist/utils.js +9 -2
  40. package/dist/utils.mjs +1 -1
  41. package/package.json +1 -1
  42. package/dist/chunk-2DV2UCQH.mjs +0 -1
  43. package/dist/chunk-5FLX45O5.mjs +0 -2
  44. package/dist/chunk-6CTCV2Q5.mjs +0 -1
  45. package/dist/chunk-OREKYGO3.mjs +0 -83
@@ -1 +1 @@
1
- "use client";import{a as Rr}from"./chunk-MMO7KCYU.mjs";import{A as fr,C as gr,G as br,I as hr,M as xr,N as wr,Q as yr,R as _r,S as kr,T as Sr,h as nr,k as tr,l as ar,m as or,n as Re,o as ir,p as sr,t as lr,u as dr,v as cr,w as pr,x as ur,y as mr,z as vr}from"./chunk-PBVBZYOG.mjs";import{a as rr,b as me}from"./chunk-T6AYLPCC.mjs";import{a as Mr}from"./chunk-37YITTIK.mjs";import"./chunk-EV6THDXD.mjs";import{a as mn}from"./chunk-6CTCV2Q5.mjs";import"./chunk-BNKTI3CY.mjs";import"./chunk-JR557W27.mjs";import{useRef as N,useState as g,useCallback as y,useEffect as _,useMemo as H,Component as vn,Suspense as Ce}from"react";import{CameraControls as fn,Environment as gn}from"@react-three/drei";import{useFrame as Tr,useThree as G}from"@react-three/fiber";import{Canvas as bn}from"@react-three/fiber";import{ACESFilmicToneMapping as hn,AgXToneMapping as xn,Box3 as ze,Color as wn,MeshStandardMaterial as yn,NeutralToneMapping as _n,NoToneMapping as kn,PerspectiveCamera as Dr,Vector3 as Y}from"three";import{SkeletonUtils as Mn}from"three-stdlib";import{X as Pe,Check as Vr,Settings as Sn,ChevronDown as Rn,Boxes as Cn,RotateCcw as Nn,Trash2 as Ln,Upload as Ne,AlertTriangle as En}from"lucide-react";import{Fragment as Pr,jsx as e,jsxs as d}from"react/jsx-runtime";var Cr={color:"#93c5fd",intensity:.05},Nr=["apartment","city","dawn","forest","lobby","night","park","studio","sunset","warehouse"],Or={aces:hn,agx:xn,neutral:_n,none:kn};function Te(r){return!!(r&&"isMesh"in r&&r.isMesh)}function Lr(r,i){Array.isArray(r)?r.forEach(i):i(r)}function zn(r,i){if(!i)return;let a=i.camera;if(!(a instanceof Dr))return;let l=new ze().setFromObject(r).getSize(new Y).length();!Number.isFinite(l)||l<=0||(a.near=l/100,a.far=l*100,a.updateProjectionMatrix(),i.maxDistance=l*10)}var Ee=class extends vn{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(a){this.props.onLoadError?.(a)}render(){return this.state.hasError?null:this.props.children}};function Pn({url:r,format:i,dracoDecoderPath:a,ktx2TranscoderPath:l,meshopt:s,hiddenKeys:c,selectedKey:o,panelHoveredKey:n,nodeRefsOut:u,onMeshesReady:x,onModelLoaded:U,onLoadProgress:k,onMeshClick:T,highlightOnHover:L}){let{scene:h}=xr(r,{dracoDecoderPath:a,ktx2TranscoderPath:l,meshopt:s},i,k),B=G(p=>p.invalidate),{setCanvasCursor:D,restoreCanvasCursor:V}=_r(),[z,j]=g(null),M=H(()=>Mn.clone(h),[h]),E=H(()=>{let p={};return M.traverse(m=>{if(!Te(m))return;let w=m.name||m.uuid;p[w]={key:w,label:m.name||m.type,ref:m}}),p},[M]),A=H(()=>{let p={};for(let[m,{ref:w}]of Object.entries(E)){let K=(Array.isArray(w.material)?w.material:[w.material]).map(b=>{let S=(wr(b)??new yn).clone();return S.userData.baseColor=S.color.clone(),S.userData.baseMap=S.map,S.userData.baseEmissive=S.emissive.clone(),S.userData.baseEmissiveMap=S.emissiveMap,S.userData.baseEmissiveIntensity=S.emissiveIntensity,S});p[m]=Array.isArray(w.material)?K:K[0]}return p},[E]);_(()=>()=>{Object.values(A).forEach(p=>Lr(p,m=>m.dispose()))},[A]);let J=N(null);_(()=>{J.current!==r&&(J.current=r,M.updateWorldMatrix(!0,!0),yr(M),x(E),U(M))},[r,M,E,x,U]),_(()=>{let p=new AbortController;return ir(M,p.signal),()=>{p.abort(),sr(M)}},[M]);let oe=H(()=>!or(M),[M]);_(()=>{for(let[p,{ref:m}]of Object.entries(E))u.current[p]=m},[E,u]),_(()=>{!L&&z!==null&&(j(null),V())},[L,z,V]),_(()=>{for(let[p,{ref:m}]of Object.entries(E)){m.visible=!c.has(p);let w=A[p];if(!w)continue;m.material=w;let Z=L&&z===p,K=L&&n===p;Lr(w,b=>{if(b.color.copy(b.userData.baseColor),b.map=b.userData.baseMap??null,b.emissive.copy(b.userData.baseEmissive),b.emissiveMap=b.userData.baseEmissiveMap??null,b.emissiveIntensity=b.userData.baseEmissiveIntensity,K||Z){let ee=!!b.userData.baseEmissiveMap;b.emissive.set(Cr.color),b.emissiveIntensity=ee?b.userData.baseEmissiveIntensity:Cr.intensity}b.needsUpdate=!0})}B()},[E,A,z,o,n,L,c,B]);let Q=p=>{let m=p;for(;m;){let w=m.name||m.uuid;if(E[w])return w;m=m.parent}return null},ie=oe?{onClick:p=>{let m=Q(p.object);m&&(p.stopPropagation(),T(m))},...L?{onPointerOver:p=>{let m=Q(p.object);m&&(p.stopPropagation(),D("pointer"),j(m))},onPointerOut:p=>{p.stopPropagation(),V(),j(null)}}:{}}:{};return e("primitive",{object:M,...ie})}function Tn({scene:r,controlsRef:i,refitOnResize:a,onInitialFitComplete:l,resumeViewRef:s}){let c=N(!1),o=G(x=>x.invalidate),n=G(x=>x.size),u=N(null);return _(()=>{c.current=!1,o()},[o,r]),Tr(()=>{if(c.current)return;if(!r||!i.current){o();return}c.current=!0,zn(r,i.current);let x=s.current;if(x){s.current=null,i.current.setLookAt(...x.position,...x.target,!1).catch(()=>{}).finally(l);return}i.current.fitToBox(r,!0,{paddingTop:.5,paddingBottom:.5,paddingLeft:.5,paddingRight:.5}).catch(()=>{}).finally(l)}),_(()=>{if(!(!a||!c.current||!r||!i.current))return u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{i.current?.fitToBox(r,!0,{paddingTop:.5,paddingBottom:.5,paddingLeft:.5,paddingRight:.5}).catch(()=>{}),o()},150),()=>{u.current&&clearTimeout(u.current)}},[n.width,n.height,a]),null}function Dn({scene:r,exposure:i,toneMapping:a,fov:l,wireframe:s}){let c=G(u=>u.gl),o=G(u=>u.camera),n=G(u=>u.invalidate);return _(()=>{c.toneMappingExposure=i,n()},[c,i,n]),_(()=>{o instanceof Dr&&(o.fov=l,o.updateProjectionMatrix(),n())},[o,l,n]),_(()=>{c.toneMapping=Or[a],r?.traverse(u=>{if(Te(u))for(let x of[u.material].flat())x.wireframe=s,x.needsUpdate=!0}),n()},[c,r,a,s,n]),null}function Vn({enabled:r,speed:i,controlsRef:a}){let l=G(s=>s.invalidate);return Tr((s,c)=>{!r||!a.current||(a.current.rotate(c*.2*i,0,!1),l())}),null}function ve(r){return Array.from(r.types).includes("Files")}function te({label:r,checked:i,onChange:a}){return d("div",{className:"ri-env-row",children:[e("span",{className:"ri-env-row__label",title:r,children:r}),e("div",{className:"ri-env-row__value",children:e("button",{type:"button",className:"ri-env-checkbox-btn",role:"checkbox","aria-checked":i,"aria-label":r,onClick:()=>a(!i),children:e("span",{className:`ri-env-checkbox${i?" ri-env-checkbox--checked":""}`,children:i&&e(Vr,{size:10,strokeWidth:2.5,"aria-hidden":"true"})})})})]})}function Le({label:r,value:i,onChange:a}){return d("div",{className:"ri-env-row",children:[e("span",{className:"ri-env-row__label",title:r,children:r}),e("div",{className:"ri-env-row__value",children:d("label",{className:"ri-env-color-swatch",children:[e("span",{className:"ri-env-color-swatch__chip",style:{background:i}}),e("span",{className:"ri-env-color-swatch__hex",children:i}),e("input",{type:"color",className:"ri-env-color-swatch__input","aria-label":r,value:i,onChange:l=>a(l.target.value)})]})})]})}function O({label:r,value:i,min:a,max:l,step:s,format:c=n=>n.toFixed(2),onChange:o}){return d("div",{className:"ri-env-row",children:[e("span",{className:"ri-env-row__label",title:r,children:r}),d("div",{className:"ri-env-row__value ri-env-row__value--slider",children:[e("input",{type:"range",className:"ri-env-slider","aria-label":r,min:a,max:l,step:s,value:i,onChange:n=>o(Number(n.target.value))}),e("span",{className:"ri-env-slider__value",children:c(i)})]})]})}function Er({label:r,optionLabels:i,value:a,options:l,onChange:s}){return d("div",{className:"ri-env-row",children:[e("span",{className:"ri-env-row__label",title:r,children:r}),e("div",{className:"ri-env-row__value",children:e("select",{className:"ri-env-select","aria-label":r,value:a,onChange:c=>s(c.target.value),children:l.map(c=>e("option",{value:c,children:i?.[c]??c},c))})})]})}function fe({label:r,value:i}){return d("div",{className:"ri-env-row",children:[e("span",{className:"ri-env-row__label",title:r,children:r}),e("span",{className:"ri-env-row__info",children:i})]})}var zr=r=>`${Math.round(r)}\xB0`;function ae({title:r,children:i}){let[a,l]=g(!1);return d("div",{className:"ri-env-section",children:[d("button",{type:"button",className:"ri-env-section__header","aria-expanded":!a,onClick:()=>l(s=>!s),children:[e(Rn,{size:12,strokeWidth:2,className:`ri-env-section__chevron${a?" env-section__chevron--collapsed":""}`}),e("span",{children:r})]}),!a&&e("div",{className:"ri-env-section__body",children:i})]})}function On({isOpen:r,onToggle:i,settings:a,modelInfo:l,onChange:s,onReset:c}){let o=me();return d("div",{className:`ri-left-panel-wrapper ${r?"ri-left-panel-wrapper--open":"ri-left-panel-wrapper--closed"}`,children:[!r&&e("button",{className:"ri-side-panel__open-btn ri-side-panel__open-btn--left",onClick:()=>i(!0),children:e(Sn,{size:20,strokeWidth:1.8})}),d("div",{className:`ri-side-panel ri-side-panel--left ${r?"ri-side-panel--open-left":"ri-side-panel--closed-left"}`,"aria-hidden":!r,children:[e("div",{className:"ri-side-panel__header",children:d("div",{className:"ri-side-panel__header-top",children:[e("span",{className:"ri-side-panel__eyebrow",children:o("sceneSettings")}),e("button",{className:"ri-side-panel__close-btn",onClick:()=>i(!1),title:o("close"),children:e(Pe,{size:12,strokeWidth:1.6})})]})}),d("div",{className:"ri-env-controls",children:[d(ae,{title:o("environment"),children:[e(Er,{label:o("environmentPreset"),value:a.envPreset,options:Nr,optionLabels:Object.fromEntries(Nr.map(n=>[n,o(`environment${n[0].toUpperCase()}${n.slice(1)}`)])),onChange:n=>s("envPreset",n)}),e(O,{label:o("environmentIntensity"),value:a.envIntensity,min:0,max:3,step:.05,onChange:n=>s("envIntensity",n)}),e(O,{label:o("rotation"),value:a.envRotation,min:0,max:360,step:1,format:zr,onChange:n=>s("envRotation",n)}),e(te,{label:o("showEnvironmentAsBackground"),checked:a.backgroundEnabled,onChange:n=>s("backgroundEnabled",n)}),a.backgroundEnabled?e(O,{label:o("backgroundBlur"),value:a.backgroundBlur,min:0,max:1,step:.01,onChange:n=>s("backgroundBlur",n)}):e(Le,{label:o("backgroundColor"),value:a.backgroundColor,onChange:n=>s("backgroundColor",n)})]}),d(ae,{title:o("lighting"),children:[e(O,{label:o("exposure"),value:a.exposure,min:0,max:2,step:.05,onChange:n=>s("exposure",n)}),e(Er,{label:o("toneMapping"),value:a.toneMapping,options:Object.keys(Or),optionLabels:{aces:o("toneMappingAces"),agx:o("toneMappingAgx"),neutral:o("toneMappingNeutral"),none:o("toneMappingNone")},onChange:n=>s("toneMapping",n)}),e(O,{label:o("ambientLightIntensity"),value:a.ambientIntensity,min:0,max:3,step:.05,onChange:n=>s("ambientIntensity",n)}),e(Le,{label:o("ambientLightColor"),value:a.ambientColor,onChange:n=>s("ambientColor",n)}),e(O,{label:o("directLightIntensity"),value:a.directionalIntensity,min:0,max:5,step:.05,onChange:n=>s("directionalIntensity",n)}),e(Le,{label:o("directLightColor"),value:a.directionalColor,onChange:n=>s("directionalColor",n)})]}),d(ae,{title:o("ground"),children:[e(te,{label:o("groundShadow"),checked:a.groundShadow,onChange:n=>s("groundShadow",n)}),a.groundShadow&&e(O,{label:o("groundShadowOpacity"),value:a.groundShadowOpacity,min:0,max:1,step:.01,onChange:n=>s("groundShadowOpacity",n)}),e(te,{label:o("floorGrid"),checked:a.showFloorGrid,onChange:n=>s("showFloorGrid",n)})]}),d(ae,{title:o("display"),children:[e(te,{label:o("wireframe"),checked:a.wireframe,onChange:n=>s("wireframe",n)}),e(te,{label:o("autoRotate"),checked:a.autoRotate,onChange:n=>s("autoRotate",n)}),a.autoRotate&&e(O,{label:o("autoRotateSpeed"),value:a.autoRotateSpeed,min:.1,max:5,step:.1,onChange:n=>s("autoRotateSpeed",n)}),e(O,{label:o("fieldOfView"),value:a.fov,min:15,max:90,step:1,format:zr,onChange:n=>s("fov",n)})]}),l&&d(ae,{title:o("modelInfo"),children:[e(fe,{label:o("modelInfoObjects"),value:l.objects.toLocaleString()}),e(fe,{label:o("modelInfoTriangles"),value:l.triangles.toLocaleString()}),e(fe,{label:o("modelInfoMaterials"),value:l.materials.toLocaleString()}),e(fe,{label:o("size"),value:l.size})]}),e("div",{className:"ri-env-footer",children:d("button",{type:"button",className:"ri-env-reset",onClick:c,children:[e(Nn,{size:12,"aria-hidden":"true"}),o("resetSettings")]})})]})]})]})}function jn(r){let i=0,a=new Set;r.traverse(s=>{if(Te(s)){i+=1;for(let c of[s.material].flat())a.add(c.name||c.uuid)}});let l=new ze().setFromObject(r).getSize(new Y);return{objects:i,triangles:Re(r),materials:a.size,size:[l.x,l.y,l.z].map(s=>Number(s.toPrecision(3))).join(" \xD7 ")}}function In({meshKeys:r,hiddenKeys:i,selectedKey:a,isOpen:l,onToggle:s,onFocus:c,onHover:o,onToggleVisibility:n}){let u=me(),[x,U]=g(""),[k,T]=g(null),L=Object.values(r).filter(h=>h.label.toLowerCase().includes(x.toLowerCase()));return d("div",{className:`ri-right-panel-wrapper ${l?"ri-right-panel-wrapper--open":"ri-right-panel-wrapper--closed"}`,children:[!l&&e("button",{className:"ri-side-panel__open-btn",onClick:()=>s(!0),children:e(Cn,{size:20,strokeWidth:1.8})}),d("div",{className:`ri-side-panel ${l?"ri-side-panel--open":"ri-side-panel--closed"}`,"aria-hidden":!l,children:[e("div",{className:"ri-side-panel__header",children:d("div",{className:"ri-side-panel__header-top",children:[e("span",{className:"ri-side-panel__eyebrow",children:u("sceneObjects")}),e("span",{className:"ri-side-panel__title","aria-label":u("objectCount",{count:L.length}),children:L.length}),e("button",{className:"ri-side-panel__close-btn",onClick:()=>s(!1),title:u("close"),children:e(Pe,{size:12,strokeWidth:1.6})})]})}),e("div",{className:"ri-side-panel__search-wrap",children:e("input",{className:"ri-side-panel__search",type:"text",placeholder:u("searchObjects"),value:x,onChange:h=>U(h.target.value)})}),e("div",{className:"ri-side-panel__list",children:L.map(({key:h,label:B})=>{let D=!i.has(h),V=a===h,z=k===h;return d("div",{onClick:()=>c(h),onMouseEnter:()=>{T(h),o(h)},onMouseLeave:()=>{T(null),o(null)},className:["ri-side-panel__row",z?"ri-side-panel__row--hovered":"",V?"ri-side-panel__row--selected":""].filter(Boolean).join(" "),children:[e("button",{type:"button",className:`ri-side-panel__label ri-side-panel__labelButton${z||V?" ri-side-panel__label--hovered":""}`,"aria-current":V?"true":void 0,onFocus:()=>{T(h),o(h)},onBlur:()=>{T(null),o(null)},children:B}),e("button",{type:"button",className:"ri-side-panel__vis-btn",title:u(D?"hide":"show"),"aria-label":u(D?"hideObject":"showObject",{name:B}),onClick:j=>{j.stopPropagation(),n(h)},children:e("span",{className:`ri-side-panel__checkbox${D?" ri-side-panel__checkbox--checked":""}`,children:D&&e(Vr,{size:9,strokeWidth:5,color:"white"})})})]},h)})})]})]})}function jr(r){return e(rr,{labels:r.labels,children:e(Fn,{...r})})}function Fn({modelUrl:r,poster:i,loading:a,reveal:l,modelFormat:s,dracoDecoderPath:c,ktx2TranscoderPath:o,meshopt:n=!0,backgroundColor:u="#1a1a1a",showSceneObjectsPanel:x=!0,showSceneSettingsPanel:U=!0,enableModelUpload:k=!1,zoomOnSelected:T=!1,highlightOnHover:L=!1,showLoadingOverlay:h=!0,refitOnResize:B=!0,backgroundEnabled:D=!1,autoRotate:V=!1,envPreset:z="city",exposure:j=1,ambientIntensity:M=.6,ambientColor:E="#ffffff",directionalIntensity:A=1.2,directionalColor:J="#ffffff",envIntensity:oe=1,envRotation:Q=0,backgroundBlur:ie=0,toneMapping:p="aces",groundShadow:m=!1,groundShadowOpacity:w=.5,showFloorGrid:Z=!1,wireframe:K=!1,autoRotateSpeed:b=1,fov:ee=45,onModelLoaded:S,onLoadError:se,reducedMotion:Ir="user"}){let I=me(),ge=Mr(Ir),De=V&&!ge;Rr("simple-model-viewer","SimpleModelViewer");let W=N(null),Ve=N({}),Oe=N(null),be=N(null),re=N(0),[R,he]=g(null),[je,Ie]=g(null),[Fr,xe]=g(!1),[Br,Fe]=g({}),[Be,Ae]=g(new Set),[Ke,He]=g(null),[Ar,Ge]=g(null),[Ue,We]=g(null),[Kr,Xe]=g(null),[Hr,le]=g(!1),[$e,qe]=g(!1),[we,ye]=g(!1),[Gr,de]=g(null),Ur=gr(Gr),[Wr,ce]=g(!1),[Xr,$r]=g(()=>typeof window>"u"?!0:window.innerWidth>900),[qr,Yr]=g(()=>typeof window>"u"?!0:window.innerWidth>900),pe=H(()=>({backgroundEnabled:D,backgroundColor:u,autoRotate:De,envPreset:z,exposure:j,ambientIntensity:M,ambientColor:E,directionalIntensity:A,directionalColor:J,envIntensity:oe,envRotation:Q,backgroundBlur:ie,toneMapping:p,groundShadow:m,groundShadowOpacity:w,showFloorGrid:Z,wireframe:K,autoRotateSpeed:b,fov:ee}),[D,u,De,z,j,M,E,A,J,oe,Q,ie,p,m,w,Z,K,b,ee]),[v,ue]=g(pe),C=k?Ue:r,Ye=N(null),_e=N(null),ke=N(null),[ne,Je]=g(null);_(()=>()=>{ne&&URL.revokeObjectURL(ne)},[ne]);let Qe=N(C);Qe.current=C;let Me=N(null),F=mr({loading:a,reveal:l,rootRef:Ye,onPark:()=>{Me.current=_e.current?.gl??null;let t=W.current;if(t&&we){ke.current={position:t.getPosition(new Y).toArray(),target:t.getTarget(new Y).toArray()};let f=C;ur(_e.current).then(P=>{P&&(f===Qe.current?Je(P):URL.revokeObjectURL(P))})}he(null),ye(!1)}});_(()=>{if(F.live)return;let t=Me.current;Me.current=null,t&&pr(t)},[F.live]);let X=y(()=>{ke.current=null,Je(null),he(null),Ie(null),xe(!1),Fe({}),Ae(new Set),He(null),Ge(null),le(!1),ye(!1),de(null)},[]),$=y(()=>{be.current?.cleanup(),be.current=null},[]),Jr=y(()=>{$(),We(null),Xe(null),X(),ue(pe)},[pe,X,$]),Ze=y(async t=>{qe(!0);try{let f=await tr(t);$(),be.current=f,We(f.url),Xe(f.name),X()}catch(f){le(!0),se?.(f)}finally{qe(!1)}},[se,X,$]),Se=y(t=>{let f=t?.[0];f&&Ze(f)},[Ze]);_(()=>()=>{$()},[$]);let Qr=y(()=>R,[R]),Zr=!v.backgroundEnabled&&new wn(v.backgroundColor).getHSL({h:0,s:0,l:0}).l>.5?"#000000":"#ffffff",en=H(()=>R?jn(R):null,[R]),q=H(()=>{if(!R)return null;let t=new ze().setFromObject(R);if(t.isEmpty())return null;let f=t.getSize(new Y);return{y:t.min.y,center:t.getCenter(new Y),size:Math.max(f.x,f.y,f.z)}},[R]),rn=y((t,f)=>{ue(P=>({...P,[t]:f}))},[]);_(()=>{ue(t=>({...t,backgroundColor:u}))},[u]),_(()=>{X()},[C,X]);let nn=y(t=>{Fe(t)},[]),tn=y(t=>{he(t),le(!1);let f=Re(t);Ie(f>ar?f:null),xe(!1),de(null),S?.(kr(t))},[S]),an=y(t=>{le(!0),de(null),se?.(t)},[se]),on=y(t=>{t.lengthComputable&&t.total>0&&de(t.loaded/t.total*100)},[]),er=y(t=>{if(He(t),!T)return;let f=Ve.current[t];!f||!W.current||W.current.fitToBox(f,!0,{paddingTop:.5,paddingBottom:.5,paddingLeft:.5,paddingRight:.5}).catch(()=>{})},[T]),sn=y(t=>{Ae(f=>{let P=new Set(f);return P.has(t)?P.delete(t):P.add(t),P})},[]),ln=y(t=>{!k||!ve(t.dataTransfer)||(t.preventDefault(),t.stopPropagation(),re.current+=1,ce(!0))},[k]),dn=y(t=>{!k||!ve(t.dataTransfer)||(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect="copy",ce(!0))},[k]),cn=y(t=>{!k||!ve(t.dataTransfer)||(t.preventDefault(),t.stopPropagation(),re.current=Math.max(0,re.current-1),re.current===0&&ce(!1))},[k]),pn=y(t=>{!k||!ve(t.dataTransfer)||(t.preventDefault(),t.stopPropagation(),re.current=0,ce(!1),Se(t.dataTransfer.files))},[k,Se]),un=h&&($e||!!(C&&F.live&&!Hr&&(!R||!we)));return d("div",{className:"smv-root",ref:Ye,"data-reduced-motion":ge?"":void 0,style:{background:v.backgroundColor},onDragEnter:ln,onDragOver:dn,onDragLeave:cn,onDrop:pn,children:[U&&C&&e(On,{isOpen:qr,onToggle:Yr,settings:v,modelInfo:en,onReset:()=>ue(pe),onChange:rn}),d("div",{className:"smv-canvasArea",children:[je!==null&&!Fr&&d("div",{className:"smv-largeModelBanner",children:[e(En,{size:14,className:"smv-largeModelBanner__icon"}),e("span",{children:I("simpleLargeModelWarning",{millions:Math.round(je/1e6)})}),e("button",{type:"button",className:"smv-largeModelBanner__dismiss",onClick:()=>xe(!0),"aria-label":I("dismiss"),children:e(Pe,{size:12})})]}),k?d(Pr,{children:[e("input",{ref:Oe,type:"file",accept:nr,className:"smv-upload-input",onChange:t=>{Se(t.target.files),t.currentTarget.value=""}}),C?e("div",{className:"smv-upload-toolbar",children:d(Pr,{children:[e("span",{className:"smv-upload-toolbar__name",children:Kr??I("uploadedModel")}),d("button",{type:"button",className:"smv-upload-toolbar__button smv-upload-toolbar__button--ghost",onClick:Jr,children:[e(Ln,{size:14}),I("clear")]})]})}):null]}):null,C&&!F.live?e(fr,{className:"ri-viewerPlaceholder--inset",background:v.backgroundColor,poster:ne??i,onReveal:F.awaitingReveal?F.reveal:void 0}):C?d(bn,{dpr:[1,2],frameloop:F.visible?"demand":"never",resize:{debounce:0,scroll:!1},raycaster:{firstHitOnly:!0},style:{background:v.backgroundColor},camera:{position:[0,0,5],fov:45,near:.1,far:1e3},children:[e(dr,{captureRef:_e}),e(cr,{}),d(Ce,{fallback:null,children:[e("ambientLight",{intensity:v.ambientIntensity,color:v.ambientColor}),e("directionalLight",{position:[-4,5,7],intensity:v.directionalIntensity,color:v.directionalColor,castShadow:!0}),e("directionalLight",{position:[-5,5,5],intensity:.5}),e(Ce,{fallback:null,children:e(gn,{preset:v.envPreset,background:v.backgroundEnabled,environmentIntensity:v.envIntensity,backgroundIntensity:v.envIntensity,backgroundBlurriness:v.backgroundBlur})}),e(hr,{rotation:v.envRotation}),e(Dn,{scene:R,exposure:v.exposure,toneMapping:v.toneMapping,fov:v.fov,wireframe:v.wireframe}),e(Vn,{enabled:v.autoRotate,speed:v.autoRotateSpeed,controlsRef:W}),v.groundShadow&&q&&e(br,{position:[q.center.x,q.y,q.center.z],scale:q.size*2,opacity:v.groundShadowOpacity,blur:2,far:q.size,resolution:1024,color:"#000000"}),v.showFloorGrid&&e(lr,{getTarget:Qr,revision:R,lineColor:Zr}),e(Ee,{onLoadError:an,children:e(Ce,{fallback:null,children:e(Pn,{url:C,format:Ue?void 0:s,dracoDecoderPath:c,ktx2TranscoderPath:o,meshopt:n,hiddenKeys:Be,selectedKey:Ke,panelHoveredKey:Ar,nodeRefsOut:Ve,onMeshesReady:nn,onModelLoaded:tn,onLoadProgress:on,onMeshClick:er,highlightOnHover:L})})},C),e(Tn,{scene:R,controlsRef:W,refitOnResize:B,onInitialFitComplete:()=>ye(!0),resumeViewRef:ke}),e(fn,{ref:W,makeDefault:!0,smoothTime:ge?0:.3})]})]}):e("div",{className:"smv-upload-empty-state",style:{background:v.backgroundColor},children:d("div",{className:"smv-upload-empty-state__card",children:[e("div",{className:"smv-upload-empty-state__icon",children:e(Ne,{size:24})}),e("p",{className:"smv-upload-empty-state__body",children:I("dropModelHint",{formats:".glb, .gltf, .obj, .fbx, .usdz, .stl, .ply, .zip"})}),d("button",{type:"button",className:"smv-upload-empty-state__button",onClick:()=>Oe.current?.click(),children:[e(Ne,{size:15}),I("chooseModel")]})]})}),C&&F.live?e(vr,{src:ne??i,hidden:!!(R&&we)}):null,e(Sr,{visible:un,message:I("loadingModel"),progress:$e?void 0:Ur??void 0}),k&&Wr?e("div",{className:"smv-upload-drop-overlay",children:d("div",{className:"smv-upload-drop-overlay__card",children:[e(Ne,{size:20}),e("span",{children:I("releaseToLoadYourModel")})]})}):null]}),x&&C&&e(In,{meshKeys:Br,hiddenKeys:Be,selectedKey:Ke,isOpen:Xr,onToggle:$r,onFocus:er,onHover:Ge,onToggleVisibility:sn})]})}export{mn as DEFAULT_MODEL_VIEWER_LABELS,jr as SimpleModelViewer};
1
+ "use client";import{a as Rr}from"./chunk-MMO7KCYU.mjs";import{A as fr,C as gr,G as br,I as hr,M as xr,N as wr,Q as yr,R as _r,S as kr,T as Sr,h as nr,k as tr,l as ar,m as or,n as Re,o as ir,p as sr,t as lr,u as dr,v as cr,w as pr,x as ur,y as mr,z as vr}from"./chunk-DS5XNP7A.mjs";import{a as rr,b as me}from"./chunk-5XII5XCD.mjs";import{a as Mr}from"./chunk-37YITTIK.mjs";import"./chunk-6Q6YZ7O5.mjs";import{a as mn}from"./chunk-M4LVNNVP.mjs";import"./chunk-BNKTI3CY.mjs";import"./chunk-JR557W27.mjs";import{useRef as N,useState as g,useCallback as y,useEffect as _,useMemo as H,Component as vn,Suspense as Ce}from"react";import{CameraControls as fn,Environment as gn}from"@react-three/drei";import{useFrame as Tr,useThree as G}from"@react-three/fiber";import{Canvas as bn}from"@react-three/fiber";import{ACESFilmicToneMapping as hn,AgXToneMapping as xn,Box3 as ze,Color as wn,MeshStandardMaterial as yn,NeutralToneMapping as _n,NoToneMapping as kn,PerspectiveCamera as Dr,Vector3 as Y}from"three";import{SkeletonUtils as Mn}from"three-stdlib";import{X as Pe,Check as Vr,Settings as Sn,ChevronDown as Rn,Boxes as Cn,RotateCcw as Nn,Trash2 as Ln,Upload as Ne,AlertTriangle as En}from"lucide-react";import{Fragment as Pr,jsx as e,jsxs as d}from"react/jsx-runtime";var Cr={color:"#93c5fd",intensity:.05},Nr=["apartment","city","dawn","forest","lobby","night","park","studio","sunset","warehouse"],Or={aces:hn,agx:xn,neutral:_n,none:kn};function Te(r){return!!(r&&"isMesh"in r&&r.isMesh)}function Lr(r,i){Array.isArray(r)?r.forEach(i):i(r)}function zn(r,i){if(!i)return;let a=i.camera;if(!(a instanceof Dr))return;let l=new ze().setFromObject(r).getSize(new Y).length();!Number.isFinite(l)||l<=0||(a.near=l/100,a.far=l*100,a.updateProjectionMatrix(),i.maxDistance=l*10)}var Ee=class extends vn{constructor(){super(...arguments);this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(a){this.props.onLoadError?.(a)}render(){return this.state.hasError?null:this.props.children}};function Pn({url:r,format:i,dracoDecoderPath:a,ktx2TranscoderPath:l,meshopt:s,hiddenKeys:c,selectedKey:o,panelHoveredKey:n,nodeRefsOut:u,onMeshesReady:x,onModelLoaded:U,onLoadProgress:k,onMeshClick:T,highlightOnHover:L}){let{scene:h}=xr(r,{dracoDecoderPath:a,ktx2TranscoderPath:l,meshopt:s},i,k),B=G(p=>p.invalidate),{setCanvasCursor:D,restoreCanvasCursor:V}=_r(),[z,j]=g(null),M=H(()=>Mn.clone(h),[h]),E=H(()=>{let p={};return M.traverse(m=>{if(!Te(m))return;let w=m.name||m.uuid;p[w]={key:w,label:m.name||m.type,ref:m}}),p},[M]),A=H(()=>{let p={};for(let[m,{ref:w}]of Object.entries(E)){let K=(Array.isArray(w.material)?w.material:[w.material]).map(b=>{let S=(wr(b)??new yn).clone();return S.userData.baseColor=S.color.clone(),S.userData.baseMap=S.map,S.userData.baseEmissive=S.emissive.clone(),S.userData.baseEmissiveMap=S.emissiveMap,S.userData.baseEmissiveIntensity=S.emissiveIntensity,S});p[m]=Array.isArray(w.material)?K:K[0]}return p},[E]);_(()=>()=>{Object.values(A).forEach(p=>Lr(p,m=>m.dispose()))},[A]);let J=N(null);_(()=>{J.current!==r&&(J.current=r,M.updateWorldMatrix(!0,!0),yr(M),x(E),U(M))},[r,M,E,x,U]),_(()=>{let p=new AbortController;return ir(M,p.signal),()=>{p.abort(),sr(M)}},[M]);let oe=H(()=>!or(M),[M]);_(()=>{for(let[p,{ref:m}]of Object.entries(E))u.current[p]=m},[E,u]),_(()=>{!L&&z!==null&&(j(null),V())},[L,z,V]),_(()=>{for(let[p,{ref:m}]of Object.entries(E)){m.visible=!c.has(p);let w=A[p];if(!w)continue;m.material=w;let Z=L&&z===p,K=L&&n===p;Lr(w,b=>{if(b.color.copy(b.userData.baseColor),b.map=b.userData.baseMap??null,b.emissive.copy(b.userData.baseEmissive),b.emissiveMap=b.userData.baseEmissiveMap??null,b.emissiveIntensity=b.userData.baseEmissiveIntensity,K||Z){let ee=!!b.userData.baseEmissiveMap;b.emissive.set(Cr.color),b.emissiveIntensity=ee?b.userData.baseEmissiveIntensity:Cr.intensity}b.needsUpdate=!0})}B()},[E,A,z,o,n,L,c,B]);let Q=p=>{let m=p;for(;m;){let w=m.name||m.uuid;if(E[w])return w;m=m.parent}return null},ie=oe?{onClick:p=>{let m=Q(p.object);m&&(p.stopPropagation(),T(m))},...L?{onPointerOver:p=>{let m=Q(p.object);m&&(p.stopPropagation(),D("pointer"),j(m))},onPointerOut:p=>{p.stopPropagation(),V(),j(null)}}:{}}:{};return e("primitive",{object:M,...ie})}function Tn({scene:r,controlsRef:i,refitOnResize:a,onInitialFitComplete:l,resumeViewRef:s}){let c=N(!1),o=G(x=>x.invalidate),n=G(x=>x.size),u=N(null);return _(()=>{c.current=!1,o()},[o,r]),Tr(()=>{if(c.current)return;if(!r||!i.current){o();return}c.current=!0,zn(r,i.current);let x=s.current;if(x){s.current=null,i.current.setLookAt(...x.position,...x.target,!1).catch(()=>{}).finally(l);return}i.current.fitToBox(r,!0,{paddingTop:.5,paddingBottom:.5,paddingLeft:.5,paddingRight:.5}).catch(()=>{}).finally(l)}),_(()=>{if(!(!a||!c.current||!r||!i.current))return u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{i.current?.fitToBox(r,!0,{paddingTop:.5,paddingBottom:.5,paddingLeft:.5,paddingRight:.5}).catch(()=>{}),o()},150),()=>{u.current&&clearTimeout(u.current)}},[n.width,n.height,a]),null}function Dn({scene:r,exposure:i,toneMapping:a,fov:l,wireframe:s}){let c=G(u=>u.gl),o=G(u=>u.camera),n=G(u=>u.invalidate);return _(()=>{c.toneMappingExposure=i,n()},[c,i,n]),_(()=>{o instanceof Dr&&(o.fov=l,o.updateProjectionMatrix(),n())},[o,l,n]),_(()=>{c.toneMapping=Or[a],r?.traverse(u=>{if(Te(u))for(let x of[u.material].flat())x.wireframe=s,x.needsUpdate=!0}),n()},[c,r,a,s,n]),null}function Vn({enabled:r,speed:i,controlsRef:a}){let l=G(s=>s.invalidate);return Tr((s,c)=>{!r||!a.current||(a.current.rotate(c*.2*i,0,!1),l())}),null}function ve(r){return Array.from(r.types).includes("Files")}function te({label:r,checked:i,onChange:a}){return d("div",{className:"ri-env-row",children:[e("span",{className:"ri-env-row__label",title:r,children:r}),e("div",{className:"ri-env-row__value",children:e("button",{type:"button",className:"ri-env-checkbox-btn",role:"checkbox","aria-checked":i,"aria-label":r,onClick:()=>a(!i),children:e("span",{className:`ri-env-checkbox${i?" ri-env-checkbox--checked":""}`,children:i&&e(Vr,{size:10,strokeWidth:2.5,"aria-hidden":"true"})})})})]})}function Le({label:r,value:i,onChange:a}){return d("div",{className:"ri-env-row",children:[e("span",{className:"ri-env-row__label",title:r,children:r}),e("div",{className:"ri-env-row__value",children:d("label",{className:"ri-env-color-swatch",children:[e("span",{className:"ri-env-color-swatch__chip",style:{background:i}}),e("span",{className:"ri-env-color-swatch__hex",children:i}),e("input",{type:"color",className:"ri-env-color-swatch__input","aria-label":r,value:i,onChange:l=>a(l.target.value)})]})})]})}function O({label:r,value:i,min:a,max:l,step:s,format:c=n=>n.toFixed(2),onChange:o}){return d("div",{className:"ri-env-row",children:[e("span",{className:"ri-env-row__label",title:r,children:r}),d("div",{className:"ri-env-row__value ri-env-row__value--slider",children:[e("input",{type:"range",className:"ri-env-slider","aria-label":r,min:a,max:l,step:s,value:i,onChange:n=>o(Number(n.target.value))}),e("span",{className:"ri-env-slider__value",children:c(i)})]})]})}function Er({label:r,optionLabels:i,value:a,options:l,onChange:s}){return d("div",{className:"ri-env-row",children:[e("span",{className:"ri-env-row__label",title:r,children:r}),e("div",{className:"ri-env-row__value",children:e("select",{className:"ri-env-select","aria-label":r,value:a,onChange:c=>s(c.target.value),children:l.map(c=>e("option",{value:c,children:i?.[c]??c},c))})})]})}function fe({label:r,value:i}){return d("div",{className:"ri-env-row",children:[e("span",{className:"ri-env-row__label",title:r,children:r}),e("span",{className:"ri-env-row__info",children:i})]})}var zr=r=>`${Math.round(r)}\xB0`;function ae({title:r,children:i}){let[a,l]=g(!1);return d("div",{className:"ri-env-section",children:[d("button",{type:"button",className:"ri-env-section__header","aria-expanded":!a,onClick:()=>l(s=>!s),children:[e(Rn,{size:12,strokeWidth:2,className:`ri-env-section__chevron${a?" env-section__chevron--collapsed":""}`}),e("span",{children:r})]}),!a&&e("div",{className:"ri-env-section__body",children:i})]})}function On({isOpen:r,onToggle:i,settings:a,modelInfo:l,onChange:s,onReset:c}){let o=me();return d("div",{className:`ri-left-panel-wrapper ${r?"ri-left-panel-wrapper--open":"ri-left-panel-wrapper--closed"}`,children:[!r&&e("button",{className:"ri-side-panel__open-btn ri-side-panel__open-btn--left",onClick:()=>i(!0),children:e(Sn,{size:20,strokeWidth:1.8})}),d("div",{className:`ri-side-panel ri-side-panel--left ${r?"ri-side-panel--open-left":"ri-side-panel--closed-left"}`,"aria-hidden":!r,children:[e("div",{className:"ri-side-panel__header",children:d("div",{className:"ri-side-panel__header-top",children:[e("span",{className:"ri-side-panel__eyebrow",children:o("sceneSettings")}),e("button",{className:"ri-side-panel__close-btn",onClick:()=>i(!1),title:o("close"),children:e(Pe,{size:12,strokeWidth:1.6})})]})}),d("div",{className:"ri-env-controls",children:[d(ae,{title:o("environment"),children:[e(Er,{label:o("environmentPreset"),value:a.envPreset,options:Nr,optionLabels:Object.fromEntries(Nr.map(n=>[n,o(`environment${n[0].toUpperCase()}${n.slice(1)}`)])),onChange:n=>s("envPreset",n)}),e(O,{label:o("environmentIntensity"),value:a.envIntensity,min:0,max:3,step:.05,onChange:n=>s("envIntensity",n)}),e(O,{label:o("rotation"),value:a.envRotation,min:0,max:360,step:1,format:zr,onChange:n=>s("envRotation",n)}),e(te,{label:o("showEnvironmentAsBackground"),checked:a.backgroundEnabled,onChange:n=>s("backgroundEnabled",n)}),a.backgroundEnabled?e(O,{label:o("backgroundBlur"),value:a.backgroundBlur,min:0,max:1,step:.01,onChange:n=>s("backgroundBlur",n)}):e(Le,{label:o("backgroundColor"),value:a.backgroundColor,onChange:n=>s("backgroundColor",n)})]}),d(ae,{title:o("lighting"),children:[e(O,{label:o("exposure"),value:a.exposure,min:0,max:2,step:.05,onChange:n=>s("exposure",n)}),e(Er,{label:o("toneMapping"),value:a.toneMapping,options:Object.keys(Or),optionLabels:{aces:o("toneMappingAces"),agx:o("toneMappingAgx"),neutral:o("toneMappingNeutral"),none:o("toneMappingNone")},onChange:n=>s("toneMapping",n)}),e(O,{label:o("ambientLightIntensity"),value:a.ambientIntensity,min:0,max:3,step:.05,onChange:n=>s("ambientIntensity",n)}),e(Le,{label:o("ambientLightColor"),value:a.ambientColor,onChange:n=>s("ambientColor",n)}),e(O,{label:o("directLightIntensity"),value:a.directionalIntensity,min:0,max:5,step:.05,onChange:n=>s("directionalIntensity",n)}),e(Le,{label:o("directLightColor"),value:a.directionalColor,onChange:n=>s("directionalColor",n)})]}),d(ae,{title:o("ground"),children:[e(te,{label:o("groundShadow"),checked:a.groundShadow,onChange:n=>s("groundShadow",n)}),a.groundShadow&&e(O,{label:o("groundShadowOpacity"),value:a.groundShadowOpacity,min:0,max:1,step:.01,onChange:n=>s("groundShadowOpacity",n)}),e(te,{label:o("floorGrid"),checked:a.showFloorGrid,onChange:n=>s("showFloorGrid",n)})]}),d(ae,{title:o("display"),children:[e(te,{label:o("wireframe"),checked:a.wireframe,onChange:n=>s("wireframe",n)}),e(te,{label:o("autoRotate"),checked:a.autoRotate,onChange:n=>s("autoRotate",n)}),a.autoRotate&&e(O,{label:o("autoRotateSpeed"),value:a.autoRotateSpeed,min:.1,max:5,step:.1,onChange:n=>s("autoRotateSpeed",n)}),e(O,{label:o("fieldOfView"),value:a.fov,min:15,max:90,step:1,format:zr,onChange:n=>s("fov",n)})]}),l&&d(ae,{title:o("modelInfo"),children:[e(fe,{label:o("modelInfoObjects"),value:l.objects.toLocaleString()}),e(fe,{label:o("modelInfoTriangles"),value:l.triangles.toLocaleString()}),e(fe,{label:o("modelInfoMaterials"),value:l.materials.toLocaleString()}),e(fe,{label:o("size"),value:l.size})]}),e("div",{className:"ri-env-footer",children:d("button",{type:"button",className:"ri-env-reset",onClick:c,children:[e(Nn,{size:12,"aria-hidden":"true"}),o("resetSettings")]})})]})]})]})}function jn(r){let i=0,a=new Set;r.traverse(s=>{if(Te(s)){i+=1;for(let c of[s.material].flat())a.add(c.name||c.uuid)}});let l=new ze().setFromObject(r).getSize(new Y);return{objects:i,triangles:Re(r),materials:a.size,size:[l.x,l.y,l.z].map(s=>Number(s.toPrecision(3))).join(" \xD7 ")}}function In({meshKeys:r,hiddenKeys:i,selectedKey:a,isOpen:l,onToggle:s,onFocus:c,onHover:o,onToggleVisibility:n}){let u=me(),[x,U]=g(""),[k,T]=g(null),L=Object.values(r).filter(h=>h.label.toLowerCase().includes(x.toLowerCase()));return d("div",{className:`ri-right-panel-wrapper ${l?"ri-right-panel-wrapper--open":"ri-right-panel-wrapper--closed"}`,children:[!l&&e("button",{className:"ri-side-panel__open-btn",onClick:()=>s(!0),children:e(Cn,{size:20,strokeWidth:1.8})}),d("div",{className:`ri-side-panel ${l?"ri-side-panel--open":"ri-side-panel--closed"}`,"aria-hidden":!l,children:[e("div",{className:"ri-side-panel__header",children:d("div",{className:"ri-side-panel__header-top",children:[e("span",{className:"ri-side-panel__eyebrow",children:u("sceneObjects")}),e("span",{className:"ri-side-panel__title","aria-label":u("objectCount",{count:L.length}),children:L.length}),e("button",{className:"ri-side-panel__close-btn",onClick:()=>s(!1),title:u("close"),children:e(Pe,{size:12,strokeWidth:1.6})})]})}),e("div",{className:"ri-side-panel__search-wrap",children:e("input",{className:"ri-side-panel__search",type:"text",placeholder:u("searchObjects"),value:x,onChange:h=>U(h.target.value)})}),e("div",{className:"ri-side-panel__list",children:L.map(({key:h,label:B})=>{let D=!i.has(h),V=a===h,z=k===h;return d("div",{onClick:()=>c(h),onMouseEnter:()=>{T(h),o(h)},onMouseLeave:()=>{T(null),o(null)},className:["ri-side-panel__row",z?"ri-side-panel__row--hovered":"",V?"ri-side-panel__row--selected":""].filter(Boolean).join(" "),children:[e("button",{type:"button",className:`ri-side-panel__label ri-side-panel__labelButton${z||V?" ri-side-panel__label--hovered":""}`,"aria-current":V?"true":void 0,onFocus:()=>{T(h),o(h)},onBlur:()=>{T(null),o(null)},children:B}),e("button",{type:"button",className:"ri-side-panel__vis-btn",title:u(D?"hide":"show"),"aria-label":u(D?"hideObject":"showObject",{name:B}),onClick:j=>{j.stopPropagation(),n(h)},children:e("span",{className:`ri-side-panel__checkbox${D?" ri-side-panel__checkbox--checked":""}`,children:D&&e(Vr,{size:9,strokeWidth:5,color:"white"})})})]},h)})})]})]})}function jr(r){return e(rr,{labels:r.labels,children:e(Fn,{...r})})}function Fn({modelUrl:r,poster:i,loading:a,reveal:l,modelFormat:s,dracoDecoderPath:c,ktx2TranscoderPath:o,meshopt:n=!0,backgroundColor:u="#1a1a1a",showSceneObjectsPanel:x=!0,showSceneSettingsPanel:U=!0,enableModelUpload:k=!1,zoomOnSelected:T=!1,highlightOnHover:L=!1,showLoadingOverlay:h=!0,refitOnResize:B=!0,backgroundEnabled:D=!1,autoRotate:V=!1,envPreset:z="city",exposure:j=1,ambientIntensity:M=.6,ambientColor:E="#ffffff",directionalIntensity:A=1.2,directionalColor:J="#ffffff",envIntensity:oe=1,envRotation:Q=0,backgroundBlur:ie=0,toneMapping:p="aces",groundShadow:m=!1,groundShadowOpacity:w=.5,showFloorGrid:Z=!1,wireframe:K=!1,autoRotateSpeed:b=1,fov:ee=45,onModelLoaded:S,onLoadError:se,reducedMotion:Ir="user"}){let I=me(),ge=Mr(Ir),De=V&&!ge;Rr("simple-model-viewer","SimpleModelViewer");let W=N(null),Ve=N({}),Oe=N(null),be=N(null),re=N(0),[R,he]=g(null),[je,Ie]=g(null),[Fr,xe]=g(!1),[Br,Fe]=g({}),[Be,Ae]=g(new Set),[Ke,He]=g(null),[Ar,Ge]=g(null),[Ue,We]=g(null),[Kr,Xe]=g(null),[Hr,le]=g(!1),[$e,qe]=g(!1),[we,ye]=g(!1),[Gr,de]=g(null),Ur=gr(Gr),[Wr,ce]=g(!1),[Xr,$r]=g(()=>typeof window>"u"?!0:window.innerWidth>900),[qr,Yr]=g(()=>typeof window>"u"?!0:window.innerWidth>900),pe=H(()=>({backgroundEnabled:D,backgroundColor:u,autoRotate:De,envPreset:z,exposure:j,ambientIntensity:M,ambientColor:E,directionalIntensity:A,directionalColor:J,envIntensity:oe,envRotation:Q,backgroundBlur:ie,toneMapping:p,groundShadow:m,groundShadowOpacity:w,showFloorGrid:Z,wireframe:K,autoRotateSpeed:b,fov:ee}),[D,u,De,z,j,M,E,A,J,oe,Q,ie,p,m,w,Z,K,b,ee]),[v,ue]=g(pe),C=k?Ue:r,Ye=N(null),_e=N(null),ke=N(null),[ne,Je]=g(null);_(()=>()=>{ne&&URL.revokeObjectURL(ne)},[ne]);let Qe=N(C);Qe.current=C;let Me=N(null),F=mr({loading:a,reveal:l,rootRef:Ye,onPark:()=>{Me.current=_e.current?.gl??null;let t=W.current;if(t&&we){ke.current={position:t.getPosition(new Y).toArray(),target:t.getTarget(new Y).toArray()};let f=C;ur(_e.current).then(P=>{P&&(f===Qe.current?Je(P):URL.revokeObjectURL(P))})}he(null),ye(!1)}});_(()=>{if(F.live)return;let t=Me.current;Me.current=null,t&&pr(t)},[F.live]);let X=y(()=>{ke.current=null,Je(null),he(null),Ie(null),xe(!1),Fe({}),Ae(new Set),He(null),Ge(null),le(!1),ye(!1),de(null)},[]),$=y(()=>{be.current?.cleanup(),be.current=null},[]),Jr=y(()=>{$(),We(null),Xe(null),X(),ue(pe)},[pe,X,$]),Ze=y(async t=>{qe(!0);try{let f=await tr(t);$(),be.current=f,We(f.url),Xe(f.name),X()}catch(f){le(!0),se?.(f)}finally{qe(!1)}},[se,X,$]),Se=y(t=>{let f=t?.[0];f&&Ze(f)},[Ze]);_(()=>()=>{$()},[$]);let Qr=y(()=>R,[R]),Zr=!v.backgroundEnabled&&new wn(v.backgroundColor).getHSL({h:0,s:0,l:0}).l>.5?"#000000":"#ffffff",en=H(()=>R?jn(R):null,[R]),q=H(()=>{if(!R)return null;let t=new ze().setFromObject(R);if(t.isEmpty())return null;let f=t.getSize(new Y);return{y:t.min.y,center:t.getCenter(new Y),size:Math.max(f.x,f.y,f.z)}},[R]),rn=y((t,f)=>{ue(P=>({...P,[t]:f}))},[]);_(()=>{ue(t=>({...t,backgroundColor:u}))},[u]),_(()=>{X()},[C,X]);let nn=y(t=>{Fe(t)},[]),tn=y(t=>{he(t),le(!1);let f=Re(t);Ie(f>ar?f:null),xe(!1),de(null),S?.(kr(t))},[S]),an=y(t=>{le(!0),de(null),se?.(t)},[se]),on=y(t=>{t.lengthComputable&&t.total>0&&de(t.loaded/t.total*100)},[]),er=y(t=>{if(He(t),!T)return;let f=Ve.current[t];!f||!W.current||W.current.fitToBox(f,!0,{paddingTop:.5,paddingBottom:.5,paddingLeft:.5,paddingRight:.5}).catch(()=>{})},[T]),sn=y(t=>{Ae(f=>{let P=new Set(f);return P.has(t)?P.delete(t):P.add(t),P})},[]),ln=y(t=>{!k||!ve(t.dataTransfer)||(t.preventDefault(),t.stopPropagation(),re.current+=1,ce(!0))},[k]),dn=y(t=>{!k||!ve(t.dataTransfer)||(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect="copy",ce(!0))},[k]),cn=y(t=>{!k||!ve(t.dataTransfer)||(t.preventDefault(),t.stopPropagation(),re.current=Math.max(0,re.current-1),re.current===0&&ce(!1))},[k]),pn=y(t=>{!k||!ve(t.dataTransfer)||(t.preventDefault(),t.stopPropagation(),re.current=0,ce(!1),Se(t.dataTransfer.files))},[k,Se]),un=h&&($e||!!(C&&F.live&&!Hr&&(!R||!we)));return d("div",{className:"smv-root",ref:Ye,"data-reduced-motion":ge?"":void 0,style:{background:v.backgroundColor},onDragEnter:ln,onDragOver:dn,onDragLeave:cn,onDrop:pn,children:[U&&C&&e(On,{isOpen:qr,onToggle:Yr,settings:v,modelInfo:en,onReset:()=>ue(pe),onChange:rn}),d("div",{className:"smv-canvasArea",children:[je!==null&&!Fr&&d("div",{className:"smv-largeModelBanner",children:[e(En,{size:14,className:"smv-largeModelBanner__icon"}),e("span",{children:I("simpleLargeModelWarning",{millions:Math.round(je/1e6)})}),e("button",{type:"button",className:"smv-largeModelBanner__dismiss",onClick:()=>xe(!0),"aria-label":I("dismiss"),children:e(Pe,{size:12})})]}),k?d(Pr,{children:[e("input",{ref:Oe,type:"file",accept:nr,className:"smv-upload-input",onChange:t=>{Se(t.target.files),t.currentTarget.value=""}}),C?e("div",{className:"smv-upload-toolbar",children:d(Pr,{children:[e("span",{className:"smv-upload-toolbar__name",children:Kr??I("uploadedModel")}),d("button",{type:"button",className:"smv-upload-toolbar__button smv-upload-toolbar__button--ghost",onClick:Jr,children:[e(Ln,{size:14}),I("clear")]})]})}):null]}):null,C&&!F.live?e(fr,{className:"ri-viewerPlaceholder--inset",background:v.backgroundColor,poster:ne??i,onReveal:F.awaitingReveal?F.reveal:void 0}):C?d(bn,{dpr:[1,2],frameloop:F.visible?"demand":"never",resize:{debounce:0,scroll:!1},raycaster:{firstHitOnly:!0},style:{background:v.backgroundColor},camera:{position:[0,0,5],fov:45,near:.1,far:1e3},children:[e(dr,{captureRef:_e}),e(cr,{}),d(Ce,{fallback:null,children:[e("ambientLight",{intensity:v.ambientIntensity,color:v.ambientColor}),e("directionalLight",{position:[-4,5,7],intensity:v.directionalIntensity,color:v.directionalColor,castShadow:!0}),e("directionalLight",{position:[-5,5,5],intensity:.5}),e(Ce,{fallback:null,children:e(gn,{preset:v.envPreset,background:v.backgroundEnabled,environmentIntensity:v.envIntensity,backgroundIntensity:v.envIntensity,backgroundBlurriness:v.backgroundBlur})}),e(hr,{rotation:v.envRotation}),e(Dn,{scene:R,exposure:v.exposure,toneMapping:v.toneMapping,fov:v.fov,wireframe:v.wireframe}),e(Vn,{enabled:v.autoRotate,speed:v.autoRotateSpeed,controlsRef:W}),v.groundShadow&&q&&e(br,{position:[q.center.x,q.y,q.center.z],scale:q.size*2,opacity:v.groundShadowOpacity,blur:2,far:q.size,resolution:1024,color:"#000000"}),v.showFloorGrid&&e(lr,{getTarget:Qr,revision:R,lineColor:Zr}),e(Ee,{onLoadError:an,children:e(Ce,{fallback:null,children:e(Pn,{url:C,format:Ue?void 0:s,dracoDecoderPath:c,ktx2TranscoderPath:o,meshopt:n,hiddenKeys:Be,selectedKey:Ke,panelHoveredKey:Ar,nodeRefsOut:Ve,onMeshesReady:nn,onModelLoaded:tn,onLoadProgress:on,onMeshClick:er,highlightOnHover:L})})},C),e(Tn,{scene:R,controlsRef:W,refitOnResize:B,onInitialFitComplete:()=>ye(!0),resumeViewRef:ke}),e(fn,{ref:W,makeDefault:!0,smoothTime:ge?0:.3})]})]}):e("div",{className:"smv-upload-empty-state",style:{background:v.backgroundColor},children:d("div",{className:"smv-upload-empty-state__card",children:[e("div",{className:"smv-upload-empty-state__icon",children:e(Ne,{size:24})}),e("p",{className:"smv-upload-empty-state__body",children:I("dropModelHint",{formats:".glb, .gltf, .obj, .fbx, .usdz, .stl, .ply, .zip"})}),d("button",{type:"button",className:"smv-upload-empty-state__button",onClick:()=>Oe.current?.click(),children:[e(Ne,{size:15}),I("chooseModel")]})]})}),C&&F.live?e(vr,{src:ne??i,hidden:!!(R&&we)}):null,e(Sr,{visible:un,message:I("loadingModel"),progress:$e?void 0:Ur??void 0}),k&&Wr?e("div",{className:"smv-upload-drop-overlay",children:d("div",{className:"smv-upload-drop-overlay__card",children:[e(Ne,{size:20}),e("span",{children:I("releaseToLoadYourModel")})]})}):null]}),x&&C&&e(In,{meshKeys:Br,hiddenKeys:Be,selectedKey:Ke,isOpen:Xr,onToggle:$r,onFocus:er,onHover:Ge,onToggleVisibility:sn})]})}export{mn as DEFAULT_MODEL_VIEWER_LABELS,jr as SimpleModelViewer};
package/dist/utils.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { bl as SceneLight, ao as ObjectBinding, aD as ObjectBindingType, a9 as MeasurementUnit, a6 as MeasurementSettings, b4 as SavedMeasurement, a3 as MeasurementPoint, a5 as MeasurementResult, a8 as MeasurementTool, a2 as MeasurementCollection, ay as ObjectBindingStyle, az as ObjectBindingTarget, bs as SceneProductConfig, aS as ProductDefinition, b0 as ProductSelections, aQ as ProductConfiguration, b1 as ProductSku, aT as ProductDefinitionWarning, aK as ProductAvailability, aZ as ProductOptionState, a_ as ProductPrice, V as InspectAssetOptions, q as AssetDiagnosticsReport, e as ARSnapshotSource, A as ARExportOptions, d as ARSnapshot, bR as ShareableViewerState, c7 as ViewerStateStorage, bJ as SequenceEasing, bz as SceneSequence, bO as SequenceTrack, bP as SequenceValue, bK as SequenceKeyframe, bu as SceneSectionConfig, bx as SceneSectionSettings } from './modelViewerProps-C7saa0i2.mjs';
2
- export { a as ARHandoffOptions, b as ARHandoffRequest, c as ARHandoffStatus, l as AnimationLoopMode, p as AssetDiagnosticIssue, r as AssetDiagnosticsSource, s as AssetTextureDiagnostic, t as AssetTransform, B as BindingEdit, E as ComparisonCategory, F as ComparisonChange, G as ComparisonHighlight, H as ComparisonObject, I as ComparisonStatus, J as ConfigurationComparisonInput, K as ConfigurationComparisonReport, N as DEFAULT_SCENE_CONFIG, O as DEFAULT_SECTION_CONFIG, Q as DeepPartial, R as EnvironmentPreset, S as GlitchModeName, W as IsolatedObjectBindings, Y as KernelSizeName, Z as MATERIAL_BLENDING_MODES, _ as MATERIAL_SIDES, $ as MAX_VIEWER_STATE_BYTES, a1 as MeasurementAnchor, a4 as MeasurementPosition, a7 as MeasurementStatus, an as ObjectActionEvent, ap as ObjectBindingAction, aq as ObjectBindingCameraState, ar as ObjectBindingDecal, as as ObjectBindingMaterial, at as ObjectBindingMaterialBlendingMode, au as ObjectBindingMaterialSide, av as ObjectBindingPatch, aw as ObjectBindingSelector, ax as ObjectBindingStatus, aA as ObjectBindingTextureChannel, aB as ObjectBindingTextureSlot, aC as ObjectBindingTransform, aF as ObjectPointerEvent, aG as ObjectSurfacePoint, aJ as ProductAppearance, aL as ProductCheckoutContext, aM as ProductCheckoutLink, aN as ProductCommerceAdapter, aO as ProductCommerceContext, aP as ProductCommerceResult, aR as ProductConfigurationIssue, aU as ProductGroupDisplay, aV as ProductOption, aW as ProductOptionGroup, aX as ProductOptionRef, aY as ProductOptionRule, a$ as ProductPricing, b2 as RampTypeName, b3 as RendererBackend, b5 as SceneAnimationClipConfig, b6 as SceneAnimationConfig, b7 as SceneAnnotationCameraView, b8 as SceneAnnotationImage, b9 as SceneAnnotationLink, ba as SceneAnnotationMarker, bb as SceneBackgroundConfig, bc as SceneCameraConfig, bd as SceneCinematicConfig, be as SceneCinematicWaypoint, bg as SceneConfig, bi as SceneConfigPatch, bj as SceneEnvironmentConfig, bk as SceneGroundShadowConfig, bm as SceneLightAttachment, bn as SceneLightType, bo as SceneLightingConfig, bp as SceneModelConfig, bq as SceneModelRenderer, br as ScenePostProcessingConfig, bt as SceneSectionAxis, by as SceneSelectionSet, bA as SceneShadowConfig, bB as SceneStyleColorScale, bC as SceneStyleCondition, bD as SceneStylePulse, bE as SceneStyleRule, bF as SceneWireframeConfig, bG as SemanticComparisonOptions, bH as SequenceCameraView, bI as SequenceControls, bL as SequenceObjectProperty, bM as SequencePlaybackState, bN as SequenceTarget, bQ as SequenceVector3, bS as StreamingDiagnostics, bT as StyledObjectBindings, bU as StyledObjectPulse, c0 as ViewerConfiguration, c2 as ViewerIsolation, c3 as ViewerObjectInfo, c6 as ViewerRuntimeStats, ca as applyIsolation, cb as applyStyleRules, cc as colorScaleValue, cd as compareViewerConfigurations, ce as groundAsset, cf as isolatedBindingKeys, cg as material, ch as parseAssetTransform, ci as parseSelectionSets, cj as parseViewerState, ck as patchBindings, cl as patchSceneConfig, cm as prepareViewerState, cn as selectBindingKeys, co as selectBindings, cp as serializeViewerState, cq as snapAssetToGrid } from './modelViewerProps-C7saa0i2.mjs';
3
- import { M as MaterialVariantGroup } from './modelFileResolver-BEW_95id.mjs';
4
- export { D as DEFAULT_MODEL_VIEWER_LABELS, a as MaterialVariantOption, c as ModelViewerLabelKey, d as ModelViewerLabels, R as ReducedMotionSetting, h as chooseMaterialVariant } from './modelFileResolver-BEW_95id.mjs';
1
+ import { bl as SceneLight, ao as ObjectBinding, aD as ObjectBindingType, a9 as MeasurementUnit, a6 as MeasurementSettings, b4 as SavedMeasurement, a3 as MeasurementPoint, a5 as MeasurementResult, a8 as MeasurementTool, a2 as MeasurementCollection, ay as ObjectBindingStyle, az as ObjectBindingTarget, bs as SceneProductConfig, aS as ProductDefinition, b0 as ProductSelections, aQ as ProductConfiguration, b1 as ProductSku, aT as ProductDefinitionWarning, aK as ProductAvailability, aZ as ProductOptionState, a_ as ProductPrice, V as InspectAssetOptions, q as AssetDiagnosticsReport, e as ARSnapshotSource, A as ARExportOptions, d as ARSnapshot, bR as ShareableViewerState, c7 as ViewerStateStorage, bJ as SequenceEasing, bz as SceneSequence, bO as SequenceTrack, bP as SequenceValue, bK as SequenceKeyframe, bu as SceneSectionConfig, bx as SceneSectionSettings } from './modelViewerProps-CGgtm4Zb.mjs';
2
+ export { a as ARHandoffOptions, b as ARHandoffRequest, c as ARHandoffStatus, l as AnimationLoopMode, p as AssetDiagnosticIssue, r as AssetDiagnosticsSource, s as AssetTextureDiagnostic, t as AssetTransform, B as BindingEdit, E as ComparisonCategory, F as ComparisonChange, G as ComparisonHighlight, H as ComparisonObject, I as ComparisonStatus, J as ConfigurationComparisonInput, K as ConfigurationComparisonReport, N as DEFAULT_SCENE_CONFIG, O as DEFAULT_SECTION_CONFIG, Q as DeepPartial, R as EnvironmentPreset, S as GlitchModeName, W as IsolatedObjectBindings, Y as KernelSizeName, Z as MATERIAL_BLENDING_MODES, _ as MATERIAL_SIDES, $ as MAX_VIEWER_STATE_BYTES, a1 as MeasurementAnchor, a4 as MeasurementPosition, a7 as MeasurementStatus, an as ObjectActionEvent, ap as ObjectBindingAction, aq as ObjectBindingCameraState, ar as ObjectBindingDecal, as as ObjectBindingMaterial, at as ObjectBindingMaterialBlendingMode, au as ObjectBindingMaterialSide, av as ObjectBindingPatch, aw as ObjectBindingSelector, ax as ObjectBindingStatus, aA as ObjectBindingTextureChannel, aB as ObjectBindingTextureSlot, aC as ObjectBindingTransform, aF as ObjectPointerEvent, aG as ObjectSurfacePoint, aJ as ProductAppearance, aL as ProductCheckoutContext, aM as ProductCheckoutLink, aN as ProductCommerceAdapter, aO as ProductCommerceContext, aP as ProductCommerceResult, aR as ProductConfigurationIssue, aU as ProductGroupDisplay, aV as ProductOption, aW as ProductOptionGroup, aX as ProductOptionRef, aY as ProductOptionRule, a$ as ProductPricing, b2 as RampTypeName, b3 as RendererBackend, b5 as SceneAnimationClipConfig, b6 as SceneAnimationConfig, b7 as SceneAnnotationCameraView, b8 as SceneAnnotationImage, b9 as SceneAnnotationLink, ba as SceneAnnotationMarker, bb as SceneBackgroundConfig, bc as SceneCameraConfig, bd as SceneCinematicConfig, be as SceneCinematicWaypoint, bg as SceneConfig, bi as SceneConfigPatch, bj as SceneEnvironmentConfig, bk as SceneGroundShadowConfig, bm as SceneLightAttachment, bn as SceneLightType, bo as SceneLightingConfig, bp as SceneModelConfig, bq as SceneModelRenderer, br as ScenePostProcessingConfig, bt as SceneSectionAxis, by as SceneSelectionSet, bA as SceneShadowConfig, bB as SceneStyleColorScale, bC as SceneStyleCondition, bD as SceneStylePulse, bE as SceneStyleRule, bF as SceneWireframeConfig, bG as SemanticComparisonOptions, bH as SequenceCameraView, bI as SequenceControls, bL as SequenceObjectProperty, bM as SequencePlaybackState, bN as SequenceTarget, bQ as SequenceVector3, bS as StreamingDiagnostics, bT as StyledObjectBindings, bU as StyledObjectPulse, c0 as ViewerConfiguration, c2 as ViewerIsolation, c3 as ViewerObjectInfo, c6 as ViewerRuntimeStats, ca as applyIsolation, cb as applyStyleRules, cc as colorScaleValue, cd as compareViewerConfigurations, ce as groundAsset, cf as isolatedBindingKeys, cg as material, ch as parseAssetTransform, ci as parseSelectionSets, cj as parseViewerState, ck as patchBindings, cl as patchSceneConfig, cm as prepareViewerState, cn as selectBindingKeys, co as selectBindings, cp as serializeViewerState, cq as snapAssetToGrid } from './modelViewerProps-CGgtm4Zb.mjs';
3
+ import { M as MaterialVariantGroup } from './modelFileResolver-pPzMl63D.mjs';
4
+ export { D as DEFAULT_MODEL_VIEWER_LABELS, a as MaterialVariantOption, c as ModelViewerLabelKey, d as ModelViewerLabels, R as ReducedMotionSetting, h as chooseMaterialVariant } from './modelFileResolver-pPzMl63D.mjs';
5
5
  import { Object3D } from 'three';
6
6
  import 'react';
7
7
  import '@react-three/drei';
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { bl as SceneLight, ao as ObjectBinding, aD as ObjectBindingType, a9 as MeasurementUnit, a6 as MeasurementSettings, b4 as SavedMeasurement, a3 as MeasurementPoint, a5 as MeasurementResult, a8 as MeasurementTool, a2 as MeasurementCollection, ay as ObjectBindingStyle, az as ObjectBindingTarget, bs as SceneProductConfig, aS as ProductDefinition, b0 as ProductSelections, aQ as ProductConfiguration, b1 as ProductSku, aT as ProductDefinitionWarning, aK as ProductAvailability, aZ as ProductOptionState, a_ as ProductPrice, V as InspectAssetOptions, q as AssetDiagnosticsReport, e as ARSnapshotSource, A as ARExportOptions, d as ARSnapshot, bR as ShareableViewerState, c7 as ViewerStateStorage, bJ as SequenceEasing, bz as SceneSequence, bO as SequenceTrack, bP as SequenceValue, bK as SequenceKeyframe, bu as SceneSectionConfig, bx as SceneSectionSettings } from './modelViewerProps-CbK_4uZj.js';
2
- export { a as ARHandoffOptions, b as ARHandoffRequest, c as ARHandoffStatus, l as AnimationLoopMode, p as AssetDiagnosticIssue, r as AssetDiagnosticsSource, s as AssetTextureDiagnostic, t as AssetTransform, B as BindingEdit, E as ComparisonCategory, F as ComparisonChange, G as ComparisonHighlight, H as ComparisonObject, I as ComparisonStatus, J as ConfigurationComparisonInput, K as ConfigurationComparisonReport, N as DEFAULT_SCENE_CONFIG, O as DEFAULT_SECTION_CONFIG, Q as DeepPartial, R as EnvironmentPreset, S as GlitchModeName, W as IsolatedObjectBindings, Y as KernelSizeName, Z as MATERIAL_BLENDING_MODES, _ as MATERIAL_SIDES, $ as MAX_VIEWER_STATE_BYTES, a1 as MeasurementAnchor, a4 as MeasurementPosition, a7 as MeasurementStatus, an as ObjectActionEvent, ap as ObjectBindingAction, aq as ObjectBindingCameraState, ar as ObjectBindingDecal, as as ObjectBindingMaterial, at as ObjectBindingMaterialBlendingMode, au as ObjectBindingMaterialSide, av as ObjectBindingPatch, aw as ObjectBindingSelector, ax as ObjectBindingStatus, aA as ObjectBindingTextureChannel, aB as ObjectBindingTextureSlot, aC as ObjectBindingTransform, aF as ObjectPointerEvent, aG as ObjectSurfacePoint, aJ as ProductAppearance, aL as ProductCheckoutContext, aM as ProductCheckoutLink, aN as ProductCommerceAdapter, aO as ProductCommerceContext, aP as ProductCommerceResult, aR as ProductConfigurationIssue, aU as ProductGroupDisplay, aV as ProductOption, aW as ProductOptionGroup, aX as ProductOptionRef, aY as ProductOptionRule, a$ as ProductPricing, b2 as RampTypeName, b3 as RendererBackend, b5 as SceneAnimationClipConfig, b6 as SceneAnimationConfig, b7 as SceneAnnotationCameraView, b8 as SceneAnnotationImage, b9 as SceneAnnotationLink, ba as SceneAnnotationMarker, bb as SceneBackgroundConfig, bc as SceneCameraConfig, bd as SceneCinematicConfig, be as SceneCinematicWaypoint, bg as SceneConfig, bi as SceneConfigPatch, bj as SceneEnvironmentConfig, bk as SceneGroundShadowConfig, bm as SceneLightAttachment, bn as SceneLightType, bo as SceneLightingConfig, bp as SceneModelConfig, bq as SceneModelRenderer, br as ScenePostProcessingConfig, bt as SceneSectionAxis, by as SceneSelectionSet, bA as SceneShadowConfig, bB as SceneStyleColorScale, bC as SceneStyleCondition, bD as SceneStylePulse, bE as SceneStyleRule, bF as SceneWireframeConfig, bG as SemanticComparisonOptions, bH as SequenceCameraView, bI as SequenceControls, bL as SequenceObjectProperty, bM as SequencePlaybackState, bN as SequenceTarget, bQ as SequenceVector3, bS as StreamingDiagnostics, bT as StyledObjectBindings, bU as StyledObjectPulse, c0 as ViewerConfiguration, c2 as ViewerIsolation, c3 as ViewerObjectInfo, c6 as ViewerRuntimeStats, ca as applyIsolation, cb as applyStyleRules, cc as colorScaleValue, cd as compareViewerConfigurations, ce as groundAsset, cf as isolatedBindingKeys, cg as material, ch as parseAssetTransform, ci as parseSelectionSets, cj as parseViewerState, ck as patchBindings, cl as patchSceneConfig, cm as prepareViewerState, cn as selectBindingKeys, co as selectBindings, cp as serializeViewerState, cq as snapAssetToGrid } from './modelViewerProps-CbK_4uZj.js';
3
- import { M as MaterialVariantGroup } from './modelFileResolver-BEW_95id.js';
4
- export { D as DEFAULT_MODEL_VIEWER_LABELS, a as MaterialVariantOption, c as ModelViewerLabelKey, d as ModelViewerLabels, R as ReducedMotionSetting, h as chooseMaterialVariant } from './modelFileResolver-BEW_95id.js';
1
+ import { bl as SceneLight, ao as ObjectBinding, aD as ObjectBindingType, a9 as MeasurementUnit, a6 as MeasurementSettings, b4 as SavedMeasurement, a3 as MeasurementPoint, a5 as MeasurementResult, a8 as MeasurementTool, a2 as MeasurementCollection, ay as ObjectBindingStyle, az as ObjectBindingTarget, bs as SceneProductConfig, aS as ProductDefinition, b0 as ProductSelections, aQ as ProductConfiguration, b1 as ProductSku, aT as ProductDefinitionWarning, aK as ProductAvailability, aZ as ProductOptionState, a_ as ProductPrice, V as InspectAssetOptions, q as AssetDiagnosticsReport, e as ARSnapshotSource, A as ARExportOptions, d as ARSnapshot, bR as ShareableViewerState, c7 as ViewerStateStorage, bJ as SequenceEasing, bz as SceneSequence, bO as SequenceTrack, bP as SequenceValue, bK as SequenceKeyframe, bu as SceneSectionConfig, bx as SceneSectionSettings } from './modelViewerProps-07WgBVqm.js';
2
+ export { a as ARHandoffOptions, b as ARHandoffRequest, c as ARHandoffStatus, l as AnimationLoopMode, p as AssetDiagnosticIssue, r as AssetDiagnosticsSource, s as AssetTextureDiagnostic, t as AssetTransform, B as BindingEdit, E as ComparisonCategory, F as ComparisonChange, G as ComparisonHighlight, H as ComparisonObject, I as ComparisonStatus, J as ConfigurationComparisonInput, K as ConfigurationComparisonReport, N as DEFAULT_SCENE_CONFIG, O as DEFAULT_SECTION_CONFIG, Q as DeepPartial, R as EnvironmentPreset, S as GlitchModeName, W as IsolatedObjectBindings, Y as KernelSizeName, Z as MATERIAL_BLENDING_MODES, _ as MATERIAL_SIDES, $ as MAX_VIEWER_STATE_BYTES, a1 as MeasurementAnchor, a4 as MeasurementPosition, a7 as MeasurementStatus, an as ObjectActionEvent, ap as ObjectBindingAction, aq as ObjectBindingCameraState, ar as ObjectBindingDecal, as as ObjectBindingMaterial, at as ObjectBindingMaterialBlendingMode, au as ObjectBindingMaterialSide, av as ObjectBindingPatch, aw as ObjectBindingSelector, ax as ObjectBindingStatus, aA as ObjectBindingTextureChannel, aB as ObjectBindingTextureSlot, aC as ObjectBindingTransform, aF as ObjectPointerEvent, aG as ObjectSurfacePoint, aJ as ProductAppearance, aL as ProductCheckoutContext, aM as ProductCheckoutLink, aN as ProductCommerceAdapter, aO as ProductCommerceContext, aP as ProductCommerceResult, aR as ProductConfigurationIssue, aU as ProductGroupDisplay, aV as ProductOption, aW as ProductOptionGroup, aX as ProductOptionRef, aY as ProductOptionRule, a$ as ProductPricing, b2 as RampTypeName, b3 as RendererBackend, b5 as SceneAnimationClipConfig, b6 as SceneAnimationConfig, b7 as SceneAnnotationCameraView, b8 as SceneAnnotationImage, b9 as SceneAnnotationLink, ba as SceneAnnotationMarker, bb as SceneBackgroundConfig, bc as SceneCameraConfig, bd as SceneCinematicConfig, be as SceneCinematicWaypoint, bg as SceneConfig, bi as SceneConfigPatch, bj as SceneEnvironmentConfig, bk as SceneGroundShadowConfig, bm as SceneLightAttachment, bn as SceneLightType, bo as SceneLightingConfig, bp as SceneModelConfig, bq as SceneModelRenderer, br as ScenePostProcessingConfig, bt as SceneSectionAxis, by as SceneSelectionSet, bA as SceneShadowConfig, bB as SceneStyleColorScale, bC as SceneStyleCondition, bD as SceneStylePulse, bE as SceneStyleRule, bF as SceneWireframeConfig, bG as SemanticComparisonOptions, bH as SequenceCameraView, bI as SequenceControls, bL as SequenceObjectProperty, bM as SequencePlaybackState, bN as SequenceTarget, bQ as SequenceVector3, bS as StreamingDiagnostics, bT as StyledObjectBindings, bU as StyledObjectPulse, c0 as ViewerConfiguration, c2 as ViewerIsolation, c3 as ViewerObjectInfo, c6 as ViewerRuntimeStats, ca as applyIsolation, cb as applyStyleRules, cc as colorScaleValue, cd as compareViewerConfigurations, ce as groundAsset, cf as isolatedBindingKeys, cg as material, ch as parseAssetTransform, ci as parseSelectionSets, cj as parseViewerState, ck as patchBindings, cl as patchSceneConfig, cm as prepareViewerState, cn as selectBindingKeys, co as selectBindings, cp as serializeViewerState, cq as snapAssetToGrid } from './modelViewerProps-07WgBVqm.js';
3
+ import { M as MaterialVariantGroup } from './modelFileResolver-pPzMl63D.js';
4
+ export { D as DEFAULT_MODEL_VIEWER_LABELS, a as MaterialVariantOption, c as ModelViewerLabelKey, d as ModelViewerLabels, R as ReducedMotionSetting, h as chooseMaterialVariant } from './modelFileResolver-pPzMl63D.js';
5
5
  import { Object3D } from 'three';
6
6
  import 'react';
7
7
  import '@react-three/drei';