(()=>{"use strict";var t={5795:t=>{t.exports=window.ReactDOM},8744:(t,e,r)=>{var n=r(5795);e.H=n.createRoot,n.hydrateRoot}},e={};const r=window.React;var n=function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}(8744);const o="bBlocks3DViewer",a=({attributes:t,id:e})=>{const{alignment:n,width:a,height:s}=t,i=`#${e} .${o}`;return(0,r.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${i}{\n\t\t\ttext-align: ${n};\n\t\t}\n\t\t${i} model-viewer{\n\t\t\twidth: ${["0px","0%","0em"].includes(a)?"auto":a};\n\t\t\theight: ${["0px","0%","0em"].includes(s)?"350px":s};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},s=(0,r.forwardRef)((({attributes:t},e)=>{const{sourceType:n,model:a,modelLink:s,isTouchMove:i,isZoom:l,loadingType:c}=t,d=i?{"camera-controls":""}:{},u=l?{}:{"disable-zoom":""};return(0,r.createElement)("div",{className:o,ref:e},(0,r.createElement)("model-viewer",{src:"upload"===n?a?.url:s,alt:"upload"===n?a?.title:"",loading:c,"auto-rotate":!0,...d,...u}))}));document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-td-viewer").forEach((t=>{const e=JSON.parse(t.dataset.attributes);(0,n.H)(t).render((0,r.createElement)(r.Fragment,null,(0,r.createElement)(a,{attributes:e,id:t.id}),(0,r.createElement)(i,{attributes:e}))),t?.removeAttribute("data-attributes")}))}));const i=({attributes:t})=>{const e=(0,r.useRef)(null);return(0,r.createElement)(s,{attributes:t,ref:e})}})();