{"version":3,"file":"shared-lib.mHOOSsWT.mjs","names":[],"sources":["https:/framerusercontent.com/modules/vbaJXlyVEeIvuEevvudG/BLOp3UNfnunVfmuhh4MI/UnicornStudioEmbed.js","https:/framerusercontent.com/modules/v9LaXXV0xxsUa7WtJrc2/GruL4oBj55TTmbd6izkS/siteMetadata.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicHeight 400\n * @framerIntrinsicWidth 800\n */export default function UnicornStudioEmbed(props){const elementRef=useRef(null);const sceneRef=useRef(null);const scriptId=useRef(`unicorn-project-${Math.random().toString(36).substr(2,9)}`);useEffect(()=>{const isEditingOrPreviewing=[\"CANVAS\",\"PREVIEW\"].includes(RenderTarget.current());if(RenderTarget.current()===\"CANVAS\"){return;}const initializeScript=callback=>{const existingScript=document.querySelector('script[src^=\"https://cdn.jsdelivr.net/gh/hiunicornstudio\"]');if(!existingScript){const script=document.createElement(\"script\");script.src=\"https://cdn.jsdelivr.net/gh/hiunicornstudio/unicornstudio.js@v1.4.25/dist/unicornStudio.umd.js\";script.onload=callback;document.head.appendChild(script);}else{callback();}};const initializeUnicornStudio=()=>{if(props.projectJSON){try{// Create script element for JSON data\nconst dataScript=document.createElement(\"script\");dataScript.id=scriptId.current;dataScript.type=\"application/json\";dataScript.textContent=props.projectJSON;document.head.appendChild(dataScript);elementRef.current.setAttribute(\"data-us-project-src\",`${scriptId.current}`);}catch(e){console.error(\"Failed to parse project JSON:\",e);return;}}else if(props.projectId){const query=props.projectId.split(\"?\");const projectId=query[0];const production=query[1]&&query[1].includes(\"production\");const cacheBuster=isEditingOrPreviewing?\"?update=\"+Math.random():\"\";elementRef.current.setAttribute(\"data-us-project\",projectId+cacheBuster);if(production){elementRef.current.setAttribute(\"data-us-production\",1);}}if(window.UnicornStudio){const existingScene=window.UnicornStudio.scenes?.find(scene=>scene.element===elementRef.current||scene.element.contains(elementRef.current));if(existingScene){existingScene.destroy();}else{window.UnicornStudio.destroy();}window.UnicornStudio.init().then(scenes=>{const ourScene=scenes.find(scene=>scene.element===elementRef.current||scene.element.contains(elementRef.current));if(ourScene){sceneRef.current=ourScene;}});}};if(props.projectId||props.projectJSON){if(window.UnicornStudio){initializeUnicornStudio();}else{initializeScript(initializeUnicornStudio);}}return()=>{if(sceneRef.current){sceneRef.current.destroy();sceneRef.current=null;}// Clean up JSON script if it exists\nconst dataScript=document.getElementById(scriptId.current);if(dataScript){dataScript.remove();}};},[props.projectId,props.projectJSON]);if(RenderTarget.current()===\"CANVAS\"){return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",width:\"100%\",height:\"100%\",backgroundColor:\"rgba(0, 0, 0, 0.15)\",color:\"#4B5563\",fontWeight:500,textAlign:\"center\",padding:\"16px\"},children:[/*#__PURE__*/_jsx(\"p\",{style:{fontSize:\"1.25rem\",marginBottom:\"12px\"},children:\"Scene will render in Preview and on your published site.\"}),!props.projectId&&!props.projectJSON?/*#__PURE__*/_jsx(\"p\",{style:{fontSize:\"1rem\",color:\"#EF4444\"},children:\"No project ID, please export your scene and add its project ID in the detail panel.\"}):\" \"]});}return /*#__PURE__*/_jsx(\"div\",{ref:elementRef,\"data-us-dpi\":props.dpi,\"data-us-scale\":props.scale,\"data-us-fps\":props.fps,\"data-us-altText\":props.altText,\"data-us-ariaLabel\":props.ariaLabel,\"data-us-lazyload\":props.lazyLoad?\"true\":\"\",style:{width:\"100%\",height:\"100%\",...props.style},children:props.header&&/*#__PURE__*/_jsx(\"h1\",{style:{width:\"1px\",height:\"1px\",margin:\"-1px\",padding:\"0\",overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",border:\"0\"},children:props.header})});}UnicornStudioEmbed.displayName=\"Unicorn Studio Embed\";addPropertyControls(UnicornStudioEmbed,{projectId:{type:ControlType.String,title:\"Project ID\"},projectJSON:{type:ControlType.String,title:\"Project JSON\"},scale:{type:ControlType.Number,title:\"Scale\",defaultValue:1,min:.25,max:1,step:.01},dpi:{type:ControlType.Number,title:\"DPI\",defaultValue:1.5,min:.5,max:2,step:.1},fps:{type:ControlType.Number,title:\"FPS\",defaultValue:60,min:10,max:120,step:5},header:{type:ControlType.String,title:\"H1 text\"},altText:{type:ControlType.String,title:\"Alt text\"},ariaLabel:{type:ControlType.String,title:\"Aria label\"},lazyLoad:{type:ControlType.Boolean,title:\"Lazy Load\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"UnicornStudioEmbed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"400\",\"framerIntrinsicWidth\":\"800\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UnicornStudioEmbed.map","// Generated by Framer (b012016)\nexport default function metadata(params,activeLocale){return{description:\"Deskhead — Trade With Intelligence.\",favicon:\"https://framerusercontent.com/assets/2fANFQTk7JIE6BAteBRuzRJkjCw.png\",robots:\"max-image-preview:large\",socialImage:\"https://framerusercontent.com/assets/ZhI56Zcfl40mliWHv3BnsjkfF14.png\",title:\"Deskhead — Trade With Intelligence.\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"2UAKG,SAAwB,EAAmB,EAAM,CAAC,IAAM,EAAW,EAAO,KAAK,CAAO,EAAS,EAAO,KAAK,CAAO,EAAS,GAAQ,kBAAkB,KAAK,QAAQ,CAAC,SAAS,GA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