{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/vbaJXlyVEeIvuEevvudG/fStOy9lqH2jMjgNF03TC/UnicornStudioEmbed.js"],
  "sourcesContent": ["import{jsx as _jsx}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);useEffect(()=>{const isEditingOrPreviewing=[\"CANVAS\",\"PREVIEW\"].includes(RenderTarget.current());const initializeScript=callback=>{const existingScript=document.querySelector('script[src^=\"https://cdn.unicorn.studio\"]');if(!existingScript){const script=document.createElement(\"script\");script.src=\"https://cdn.unicorn.studio/v1.3.0/unicornStudio.umd.js\";script.onload=callback;document.head.appendChild(script);}else{callback();}};const initializeUnicornStudio=()=>{const projectId=props.projectId.split(\"?\")[0];const cacheBuster=isEditingOrPreviewing?\"?update=\"+Math.random():\"\";elementRef.current.setAttribute(\"data-us-project\",projectId+cacheBuster);if(window.UnicornStudio){window.UnicornStudio.destroy();window.UnicornStudio.init().then(scenes=>{console.log(scenes);});}};if(props.projectId){if(window.UnicornStudio){initializeUnicornStudio();}else{initializeScript(initializeUnicornStudio);}}return()=>{if(window.UnicornStudio){window.UnicornStudio.destroy();}};},[props.projectId]);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\"},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\":{\"framerIntrinsicWidth\":\"800\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./UnicornStudioEmbed.map"],
  "mappings": "sHAKkB,SAARA,EAAoCC,EAAM,CAAC,IAAMC,EAAWC,EAAO,IAAI,EAAE,OAAAC,EAAU,IAAI,CAAC,IAAMC,EAAsB,CAAC,SAAS,SAAS,EAAE,SAASC,EAAa,QAAQ,CAAC,EAAQC,EAAiBC,GAAU,CAA0F,GAApE,SAAS,cAAc,2CAA2C,EAAuMA,EAAS,MAA3L,CAAC,IAAMC,EAAO,SAAS,cAAc,QAAQ,EAAEA,EAAO,IAAI,yDAAyDA,EAAO,OAAOD,EAAS,SAAS,KAAK,YAAYC,CAAM,EAAoB,EAAQC,EAAwB,IAAI,CAAC,IAAMC,EAAUV,EAAM,UAAU,MAAM,GAAG,EAAE,CAAC,EAAQW,EAAYP,EAAsB,WAAW,KAAK,OAAO,EAAE,GAAGH,EAAW,QAAQ,aAAa,kBAAkBS,EAAUC,CAAW,EAAKC,EAAO,gBAAeA,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M,YAAY,EAAE,SAAS,CAAC,KAAKA,EAAY,QAAQ,MAAM,YAAY,aAAa,EAAK,CAAC,CAAC",
  "names": ["UnicornStudioEmbed", "props", "elementRef", "pe", "ue", "isEditingOrPreviewing", "RenderTarget", "initializeScript", "callback", "script", "initializeUnicornStudio", "projectId", "cacheBuster", "window", "scenes", "p", "addPropertyControls", "ControlType"]
}
