{"version":3,"file":"Embed.BSIX_SOT.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/VHx6h9GDKMSkp9munUQE/WkfqDlgOscoCUsXhBk4G/LogoGradient.js","https:/framerusercontent.com/modules/o1PI5S8YtkA5bP5g4dFz/cAPMVEI6osbJ1UvICgTq/Embed.js"],"sourcesContent":["import{defineShader,ControlType}from\"framer\";export default defineShader({title:\"Logo Gradient\",heightmapSource:\"image\",mouse:\"enabledByDefault\",fragment:`\n// === CONSTANTS ===\nconst float GOLDEN_ANGLE = 2.3999632;\nconst float TAU = 6.28318530;\n\n// === PCG hash ===\nuvec3 hash3(uvec3 v) {\n    v = v * 1664525u + 1013904223u;\n    v.x += v.y * v.z;\n    v.y += v.z * v.x;\n    v.z += v.x * v.y;\n    v ^= v >> 16u;\n    v.x += v.y * v.z;\n    v.y += v.z * v.x;\n    v.z += v.x * v.y;\n    return v;\n}\n\nvec3 seedRandom(float seedVal) {\n    uvec3 s = uvec3(\n        floatBitsToUint(seedVal),\n        floatBitsToUint(seedVal * 1.5 + 7.31),\n        floatBitsToUint(seedVal * 2.7 + 13.37)\n    );\n    s = hash3(s);\n    return vec3(s) / float(0xFFFFFFFFu);\n}\n\n// === COLOR SPACE (Oklab/LCH) ===\n\nvec3 toLinear(vec3 c) {\n    return pow(c, vec3(2.2));\n}\n\nvec3 toSrgb(vec3 c) {\n    return pow(clamp(c, 0.0, 1.0), vec3(0.4545));\n}\n\nvec3 linearToOklab(vec3 c) {\n    float l = 0.4122214708 * c.r + 0.5363325363 * c.g + 0.0514459929 * c.b;\n    float m = 0.2119034982 * c.r + 0.6806995451 * c.g + 0.1073969566 * c.b;\n    float s = 0.0883024619 * c.r + 0.2817188376 * c.g + 0.6299787005 * c.b;\n\n    l = pow(max(l, 0.0), 1.0 / 3.0);\n    m = pow(max(m, 0.0), 1.0 / 3.0);\n    s = pow(max(s, 0.0), 1.0 / 3.0);\n\n    return vec3(\n        0.2104542553 * l + 0.7936177850 * m - 0.0040720468 * s,\n        1.9779984951 * l - 2.4285922050 * m + 0.4505937099 * s,\n        0.0259040371 * l + 0.7827717662 * m - 0.8086757660 * s\n    );\n}\n\nvec3 oklabToLinear(vec3 c) {\n    float l = c.x + 0.3963377774 * c.y + 0.2158037573 * c.z;\n    float m = c.x - 0.1055613458 * c.y - 0.0638541728 * c.z;\n    float s = c.x - 0.0894841775 * c.y - 1.2914855480 * c.z;\n\n    l = l * l * l;\n    m = m * m * m;\n    s = s * s * s;\n\n    return vec3(\n        +4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,\n        -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,\n        -0.0041960863 * l - 0.7034186147 * m + 1.7076147010 * s\n    );\n}\n\nvec3 oklabToLch(vec3 lab) {\n    return vec3(lab.x, length(lab.yz), atan(lab.z, lab.y));\n}\n\nvec3 lchToOklab(vec3 lch) {\n    return vec3(lch.x, lch.y * cos(lch.z), lch.y * sin(lch.z));\n}\n\nvec3 mixLch(vec3 lab0, vec3 lab1, float t) {\n    vec3 lch0 = oklabToLch(lab0);\n    vec3 lch1 = oklabToLch(lab1);\n\n    if (lch0.y < 0.05) lch0.z = lch1.z;\n    if (lch1.y < 0.05) lch1.z = lch0.z;\n\n    float dh = lch1.z - lch0.z;\n    if (dh > 3.14159265) dh -= 6.28318530;\n    if (dh < -3.14159265) dh += 6.28318530;\n\n    return lchToOklab(vec3(\n        mix(lch0.x, lch1.x, t),\n        mix(lch0.y, lch1.y, t),\n        lch0.z + dh * t\n    ));\n}\n\n// === PALETTE ===\n\nvec3 getColor(int idx) {\n    if (u_colors_length < 1) return vec3(0.0);\n    int safeIdx = clamp(idx, 0, u_colors_length - 1);\n    return u_colors[safeIdx].rgb;\n}\n\nvec3 paletteN(float t, int count) {\n    if (count < 1) return vec3(0.0);\n    if (count < 2) return toLinear(getColor(0));\n\n    float segmentSize = 1.0 / float(count - 1);\n    t = clamp(t, 0.0, 1.0);\n    int idx = min(int(floor(t / segmentSize)), count - 2);\n    float localT = clamp((t - float(idx) * segmentSize) / segmentSize, 0.0, 1.0);\n\n    vec3 lab0 = linearToOklab(toLinear(getColor(idx)));\n    vec3 lab1 = linearToOklab(toLinear(getColor(idx + 1)));\n\n    return oklabToLinear(mixLch(lab0, lab1, localT));\n}\n\n// === POST-PROCESS ===\n\nvec3 softGamutMap(vec3 linearRgb) {\n    float maxC = max(linearRgb.r, max(linearRgb.g, linearRgb.b));\n    float minC = min(linearRgb.r, min(linearRgb.g, linearRgb.b));\n\n    if (minC >= 0.0 && maxC <= 1.0) return linearRgb;\n\n    vec3 lab = linearToOklab(max(linearRgb, 0.0));\n    float L = clamp(lab.x, 0.0, 1.0);\n    float C = length(lab.yz);\n    float h = atan(lab.z, lab.y);\n\n    float maxChroma = 0.4 * (1.0 - pow(abs(2.0 * L - 1.0), 2.0));\n\n    if (C > maxChroma * 0.7) {\n        float knee = maxChroma * 0.7;\n        C = knee + (maxChroma - knee) * tanh((C - knee) / (maxChroma - knee + 0.001));\n    }\n\n    return clamp(oklabToLinear(vec3(L, C * cos(h), C * sin(h))), 0.0, 1.0);\n}\n\n// === HEIGHTMAP HELPERS ===\n\nfloat blurDepth3x3(vec2 uv, vec2 dudx, vec2 dudy, vec2 texel, float radius) {\n    vec2 r = radius * texel;\n\n    float sum = 4.0 * textureGrad(u_image_heightmap, uv, dudx, dudy).r;\n\n    sum += 2.0 * textureGrad(u_image_heightmap, uv + vec2(0.0, -r.y), dudx, dudy).r;\n    sum += 2.0 * textureGrad(u_image_heightmap, uv + vec2(0.0,  r.y), dudx, dudy).r;\n    sum += 2.0 * textureGrad(u_image_heightmap, uv + vec2(-r.x, 0.0), dudx, dudy).r;\n    sum += 2.0 * textureGrad(u_image_heightmap, uv + vec2( r.x, 0.0), dudx, dudy).r;\n\n    sum += textureGrad(u_image_heightmap, uv + vec2(-r.x, -r.y), dudx, dudy).r;\n    sum += textureGrad(u_image_heightmap, uv + vec2( r.x, -r.y), dudx, dudy).r;\n    sum += textureGrad(u_image_heightmap, uv + vec2(-r.x,  r.y), dudx, dudy).r;\n    sum += textureGrad(u_image_heightmap, uv + vec2( r.x,  r.y), dudx, dudy).r;\n\n    return sum / 16.0;\n}\n\nvec2 heightGrad(vec2 uv, vec2 dudx, vec2 dudy, vec2 texel, float blurRadius) {\n    float eps = 4.0;\n    float dR = blurDepth3x3(uv + vec2(eps * texel.x, 0.0), dudx, dudy, texel, blurRadius);\n    float dL = blurDepth3x3(uv - vec2(eps * texel.x, 0.0), dudx, dudy, texel, blurRadius);\n    float dU = blurDepth3x3(uv + vec2(0.0, eps * texel.y), dudx, dudy, texel, blurRadius);\n    float dD = blurDepth3x3(uv - vec2(0.0, eps * texel.y), dudx, dudy, texel, blurRadius);\n    return vec2(dR - dL, dU - dD) / (2.0 * eps * texel);\n}\n\n// === MAIN ===\n\nvoid main() {\n    vec2 uv = vec2(v_uv.x, 1.0 - v_uv.y);\n    vec2 texSize = vec2(textureSize(u_image_heightmap, 0));\n    float imgAspect = texSize.x / texSize.y;\n    float canvasAspect = u_resolution.x / u_resolution.y;\n\n    if (canvasAspect > imgAspect) {\n        uv.x = (uv.x - 0.5) * (canvasAspect / imgAspect) + 0.5;\n    } else {\n        uv.y = (uv.y - 0.5) * (imgAspect / canvasAspect) + 0.5;\n    }\n\n    /*\n    if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) {\n        fragColor = vec4(u_colorBack.rgb * u_colorBack.a, u_colorBack.a);\n        return;\n    }\n    */\n\n    // 1.0 on DPR 2+, up to 2.0 on DPR 1\n    float aaScale = max(1.0, 2.0 / u_pixelRatio);\n\n    vec2 dudx = dFdx(uv);\n    vec2 dudy = dFdy(uv);\n\n    vec4 hm = textureGrad(u_image_heightmap, uv, dudx, dudy);\n    float fw_b = 0.5 * fwidth(hm.b);\n    float hardMask = smoothstep(0.5 - fw_b, 0.5 + fw_b, hm.b);\n    float opacity = hardMask * (1.0 - hm.g);\n\n    // Only fade at the letterbox boundary, not on the axis the image fills\n    float edgeDist;\n    if (canvasAspect > imgAspect) {\n        // Letterbox bars are left/right → only fade X edges\n        edgeDist = min(uv.x, 1.0 - uv.x);\n    } else if (canvasAspect < imgAspect) {\n        // Letterbox bars are top/bottom → only fade Y edges\n        edgeDist = min(uv.y, 1.0 - uv.y);\n    } else {\n        // Aspects match — no letterboxing, no seam, no fade needed\n        edgeDist = 1.0;\n    }\n    opacity *= smoothstep(0.0, 1.0 * fwidth(edgeDist), edgeDist);\n\n    if (opacity < 0.001) {\n        fragColor = vec4(u_colorBack.rgb * u_colorBack.a, u_colorBack.a);\n        return;\n    }\n\n    vec2 texel = 1.0 / texSize;\n    int colorCount = u_colors_length;\n\n    if (colorCount < 1) {\n        fragColor = vec4(u_colorBack.rgb * u_colorBack.a, u_colorBack.a);\n        return;\n    }\n\n    float rawDepth = blurDepth3x3(uv, dudx, dudy, texel, 6.0);\n    float depth = max(rawDepth, 0.001);\n\n    vec2 grad = heightGrad(uv, dudx, dudy, texel, 6.0);\n    float gradMag = min(length(grad), 5.0);\n    vec2 gradDir = gradMag > 0.001 ? normalize(grad) : vec2(0.0);\n    vec2 contourDir = vec2(-gradDir.y, gradDir.x);\n\n    float t = mod(u_time * u_speed, 3600.0);\n\n    // Motion mode: 0 = Random, 1 = Melt\n    float isMelt = step(0.5, u_motionMode);\n\n    // Seed\n    vec3 seedOffset = seedRandom(u_seed);\n    vec3 seedOffset2 = seedRandom(u_seed + 100.0);\n    float seedAngle = u_seed * GOLDEN_ANGLE;\n    vec2 seedPhase = (seedOffset2.xy - 0.5) * TAU;\n\n    // World-space coordinates anchored to the image\n    vec2 p = (uv - 0.5) * 2.0;\n    p.x *= imgAspect;\n\n    // Seed-based rotation\n    float cs = cos(seedAngle);\n    float sn = sin(seedAngle);\n    p = mat2(cs, -sn, sn, cs) * p;\n\n    // Angle — rotates the gradient flow direction\n    float ang = u_angle * 3.14159 / 180.0;\n    float cosA = cos(ang);\n    float sinA = sin(ang);\n    p = vec2(p.x * cosA - p.y * sinA, p.x * sinA + p.y * cosA);\n\n    // === MOUSE ===\n    vec2 mouseRaw = u_mousePosition.xy;\n    vec2 mouseVel = u_mousePosition.zw;\n    float hover   = u_mouseHover;\n    float clicked = u_mousePointerDown;\n    // Flip Y to match this shader's top-left UV convention\n    vec2 mouseUV = vec2(mouseRaw.x, 1.0 - mouseRaw.y);\n\n    // Apply the same letterbox transform as uv\n    if (canvasAspect > imgAspect) {\n        mouseUV.x = (mouseUV.x - 0.5) * (canvasAspect / imgAspect) + 0.5;\n    } else {\n        mouseUV.y = (mouseUV.y - 0.5) * (imgAspect / canvasAspect) + 0.5;\n    }\n\n    // Mouse as centered, aspect-corrected, scaled offset\n    vec2 mOffset = (mouseUV - 0.5) * vec2(imgAspect, 1.0) * u_pushAmount * hover;\n\n    // Distance in image-space (both uv and mouseUV are now in the same space)\n    float mouseDist = length((uv - mouseUV) * vec2(imgAspect, 1.0));\n    float mouseInfluence = smoothstep(u_pushRadius, 0.0, mouseDist);\n    vec2 mFinal = mOffset * mouseInfluence;\n\n    // Turbulence time\n    float tTurb = t * mix(1.0, 0.4, isMelt);\n\n    // Melt flow offset applied to q inside turbulence, not to p\n    vec2 meltOffset = vec2(1.0, 0.0) * t * 0.4 * isMelt;\n\n    // === SHAPE-AWARE COORDINATE WARPING ===\n    float edgeProximity = 1.0 - smoothstep(0.0, 0.8, depth);\n\n    float coordScale = max(0.4, 0.1 + depth * 1.0);\n    p *= coordScale;\n\n    p += contourDir * edgeProximity * u_bend * 2.0;\n    p -= gradDir * edgeProximity * u_bend * 0.5;\n    p *= max(0.5, mix(1.0, 0.4 + 0.6 * smoothstep(0.0, 0.5, depth), u_contour));\n\n    // === TURBULENCE ===\n    int turbIter = int(u_turbIter);\n    float freq = 1.0 / max(u_turbFreq, 0.01);\n\n    vec2 q = p * u_scale + meltOffset;\n    // Small directional nudge — slides the pattern toward the cursor\n    q += (mouseUV - uv) * mouseInfluence * 2.0 * hover;\n\n    float a = seedPhase.x;\n    float d = seedPhase.y;\n\n    for (int j = 2; j < 10; j++) {\n        if (j >= turbIter) break;\n        float fj = float(j);\n        q += u_turbAmp * sin(length(q) / freq * fj + tTurb + vec2(a, d) + seedOffset.xy * fj) / fj;\n        a += cos(fj + d * 1.2 + mFinal.x + q.x * 2.0 - tTurb + seedOffset2.z);\n        d += sin(fj * q.y + a + mFinal.y * 0.7 + seedOffset.z + tTurb + seedOffset2.y);\n    }\n\n    float base = length(q.yx + vec2(a, d) * 0.2) * u_waveFreq + seedOffset.x;\n    float val = 0.5 + 0.125 * sin(base + 1.0) + 0.25 * sin(base + 4.0) + 0.125 * sin(base + 9.0);\n    val = clamp((val - 0.3) / 0.4, 0.0, 1.0);\n\n    // Depth-based intensity modulation\n    float innerIntensity = smoothstep(0.0, 0.4, depth);\n    float contourHeat = (1.0 - innerIntensity) * u_contour;\n    val = mix(val, val * innerIntensity + contourHeat, 0.5 + 0.5 * u_contour);\n\n    vec3 col = paletteN(val, colorCount);\n    col = softGamutMap(col);\n    col = toSrgb(col);\n\n    /*\n    // Silhouette AA — hardMask + clamped fwidth\n    float fw = fwidth(depth);\n    float effectMask = hardMask * smoothstep(0.0, max(fw, min(2.0 * fw, 0.1)), depth);\n    opacity *= effectMask;\n    */\n\n    // Alpha compositing\n    col *= opacity;\n    vec3 bgColor = u_colorBack.rgb * u_colorBack.a;\n    col = col + bgColor * (1.0 - opacity);\n    float finalAlpha = opacity + u_colorBack.a * (1.0 - opacity);\n\n    fragColor = vec4(col, finalAlpha);\n}\n`,propertyControls:{image:{type:ControlType.ResponsiveImage,title:\"Image\",defaultValue:\"data:framer/asset-reference,7XHsXmlUUmdQM95fkSvi3LRCuSk.svg?originalFilename=Path.svg&width=32&height=48\"},colors:{type:ControlType.Array,title:\"Colors\",control:{type:ControlType.Color},maxCount:8,defaultValue:[\"#000000\",\"#0051FF\",\"#0DAAFF\",\"#BDE4FF\"]},colorBack:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},seed:{type:ControlType.Number,title:\"Seed\",defaultValue:6,min:0,max:1e3,step:1,section:\"Motion\"},speed:{type:ControlType.Number,title:\"Speed\",defaultValue:.6,min:0,max:2,step:.01,section:\"Motion\"},motionMode:{type:ControlType.Enum,title:\"Motion\",options:[0,1],optionTitles:[\"Random\",\"Directional\"],defaultValue:0,section:\"Motion\"},angle:{type:ControlType.Number,title:\"Angle\",defaultValue:20,min:0,max:360,step:1,section:\"Motion\"},scale:{type:ControlType.Number,title:\"Scale\",defaultValue:1.2,min:.1,max:2,step:.01,section:\"Motion\"},turbAmp:{type:ControlType.Number,title:\"Amplitude\",defaultValue:.21,min:0,max:1,step:.01,section:\"Motion\"},turbFreq:{type:ControlType.Number,title:\"Frequency\",defaultValue:1.15,min:.1,max:2,step:.01,section:\"Motion\"},turbIter:{type:ControlType.Number,title:\"Definition\",defaultValue:7,min:3,max:8,step:1,displayStepper:true,section:\"Motion\"},waveFreq:{type:ControlType.Number,title:\"Bands\",defaultValue:2.4,min:.1,max:5,step:.1,section:\"Motion\"},bend:{type:ControlType.Number,title:\"Bevel\",defaultValue:.24,min:0,max:1,step:.01,section:\"Shape\",hiddenWhenUnset:true},contour:{type:ControlType.Number,title:\"Contour\",defaultValue:.8,min:0,max:1,step:.1,section:\"Shape\",hiddenWhenUnset:true},pushRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:1.5,min:.2,max:4,step:.1,section:\"Interaction\"},pushAmount:{type:ControlType.Number,title:\"Strength\",defaultValue:8,min:0,max:20,step:.5,section:\"Interaction\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"shader\",\"name\":null,\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LogoGradient.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{useIsOnCanvas,emptyStateStyle,containerStyles}from\"https://framer.com/m/framer/default-utils.js\";/**\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 400\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n *\n * @framerDisableUnlink\n */export default function Embed({type,url,html,zoom,radius,border,style={}}){if(type===\"url\"&&url){return /*#__PURE__*/_jsx(EmbedUrl,{url:url,zoom:zoom,radius:radius,border:border,style:style});}if(type===\"html\"&&html){return /*#__PURE__*/_jsx(EmbedHtml,{html:html,style:style});}return /*#__PURE__*/_jsx(Instructions,{style:style});}addPropertyControls(Embed,{type:{type:ControlType.Enum,defaultValue:\"url\",displaySegmentedControl:true,options:[\"url\",\"html\"],optionTitles:[\"URL\",\"HTML\"]},url:{title:\"URL\",type:ControlType.String,description:\"Some websites don’t support embedding.\",hidden(props){return props.type!==\"url\";}},html:{title:\"HTML\",type:ControlType.String,displayTextArea:true,hidden(props){return props.type!==\"html\";}},border:{title:\"Border\",type:ControlType.Border,optional:true,hidden(props){return props.type!==\"url\";}},radius:{type:ControlType.BorderRadius,title:\"Radius\",hidden(props){return props.type!==\"url\";}},zoom:{title:\"Zoom\",defaultValue:1,type:ControlType.Number,hidden(props){return props.type!==\"url\";},min:.1,max:1,step:.1,displayStepper:true}});function Instructions({style}){return /*#__PURE__*/_jsx(\"div\",{style:{minHeight:getMinHeight(style),...emptyStateStyle,overflow:\"hidden\",...style},children:/*#__PURE__*/_jsx(\"div\",{style:centerTextStyle,children:\"To embed a website or widget, add it to the properties\\xa0panel.\"})});}function EmbedUrl({url,zoom,radius,border,style}){const hasAutoHeight=!style.height;// Add https:// if the URL does not have a protocol.\nif(!/[a-z]+:\\/\\//.test(url)){url=\"https://\"+url;}const onCanvas=useIsOnCanvas();// We need to check if the url is blocked inside an iframe by the X-Frame-Options\n// or Content-Security-Policy headers on the backend.\nconst[state,setState]=useState(onCanvas?undefined:false);useEffect(()=>{// We only want to check on the canvas.\n// On the website we want to avoid the additional delay.\nif(!onCanvas)return;// TODO: We could also use AbortController here.\nlet isLastEffect=true;setState(undefined);async function load(){const response=await fetch(\"https://api.framer.com/functions/check-iframe-url?url=\"+encodeURIComponent(url));if(response.status==200){const{isBlocked}=await response.json();if(isLastEffect){setState(isBlocked);}}else{const message=await response.text();console.error(message);const error=new Error(\"This site can’t be reached.\");setState(error);}}load().catch(error=>{console.error(error);setState(error);});return()=>{isLastEffect=false;};},[url]);if(onCanvas&&hasAutoHeight){return /*#__PURE__*/_jsx(ErrorMessage,{message:\"URL embeds do not support auto height.\",style:style});}if(!url.startsWith(\"https://\")){return /*#__PURE__*/_jsx(ErrorMessage,{message:\"Unsupported protocol.\",style:style});}if(state===undefined){return /*#__PURE__*/_jsx(LoadingIndicator,{});}if(state instanceof Error){return /*#__PURE__*/_jsx(ErrorMessage,{message:state.message,style:style});}if(state===true){const message=`Can’t embed ${url} due to its content security policy.`;return /*#__PURE__*/_jsx(ErrorMessage,{message:message,style:style});}return /*#__PURE__*/_jsx(\"iframe\",{src:url,style:{...iframeStyle,...style,...border,zoom:zoom,borderRadius:radius,transformOrigin:\"top center\"},loading:\"lazy\",// @ts-ignore\nfetchPriority:onCanvas?\"low\":\"auto\",referrerPolicy:\"no-referrer\",sandbox:getSandbox(onCanvas),allowFullScreen:true,allow:\"presentation; fullscreen; accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; clipboard-write\"});}const iframeStyle={width:\"100%\",height:\"100%\",border:\"none\"};function getSandbox(onCanvas){const result=[\"allow-same-origin\",\"allow-scripts\"];if(!onCanvas){result.push(\"allow-downloads\",\"allow-forms\",\"allow-modals\",\"allow-orientation-lock\",\"allow-pointer-lock\",\"allow-popups\",\"allow-popups-to-escape-sandbox\",\"allow-presentation\",\"allow-storage-access-by-user-activation\",\"allow-top-navigation-by-user-activation\");}return result.join(\" \");}function EmbedHtml({html,...props}){const hasScript=html.includes(\"</script>\");if(hasScript){const hasSplineViewer=html.includes(\"</spline-viewer>\");const hasComment=html.includes(\"<!-- framer-direct-embed -->\");if(hasSplineViewer||hasComment){return /*#__PURE__*/_jsx(EmbedHtmlWithScripts,{html:html,...props});}return /*#__PURE__*/_jsx(EmbedHtmlInsideIframe,{html:html,...props});}return /*#__PURE__*/_jsx(EmbedHtmlWithoutScripts,{html:html,...props});}function EmbedHtmlInsideIframe({html,style}){const ref=useRef();const[iframeHeight,setIframeHeight]=useState(0);// Handle auto sizing\nuseEffect(()=>{const iframeWindow=ref.current?.contentWindow;function handleMessage(event){if(event.source!==iframeWindow)return;const data=event.data;if(typeof data!==\"object\"||data===null)return;const height=data.embedHeight;if(typeof height!==\"number\")return;setIframeHeight(height);}window.addEventListener(\"message\",handleMessage);// After SSG the iframe loads before we attach the event handler,\n// therefore we need to request the latest height from the iframe.\niframeWindow?.postMessage(\"getEmbedHeight\",\"*\");return()=>{window.removeEventListener(\"message\",handleMessage);};},[]);// The CSS is mainly copied from:\n// FramerStudio/src/app/vekter/src/renderer/setDefaultFont.ts\n// FramerStudio/src/app/vekter/src/export/globalStylesForExport.ts\nconst srcDoc=`\n<html>\n    <head>\n        <style>\n            html, body {\n                margin: 0;\n                padding: 0;\n            }\n\n            body {\n                display: flex;\n                justify-content: center;\n                align-items: center;\n            }\n\n            :root {\n                -webkit-font-smoothing: antialiased;\n                -moz-osx-font-smoothing: grayscale;\n            }\n\n            * {\n                box-sizing: border-box;\n                -webkit-font-smoothing: inherit;\n            }\n\n            h1, h2, h3, h4, h5, h6, p, figure {\n                margin: 0;\n            }\n\n            body, input, textarea, select, button {\n                font-size: 12px;\n                font-family: sans-serif;\n            }\n        </style>\n    </head>\n    <body>\n        ${html}\n        <script type=\"module\">\n            let height = 0\n\n            function sendEmbedHeight() {\n                window.parent.postMessage({\n                    embedHeight: height\n                }, \"*\")\n            }\n\n            const observer = new ResizeObserver((entries) => {\n                if (entries.length !== 1) return\n                const entry = entries[0]\n                if (entry.target !== document.body) return\n\n                height = entry.contentRect.height\n                sendEmbedHeight()\n            })\n\n            observer.observe(document.body)\n\n            window.addEventListener(\"message\", (event) => {\n                if (event.source !== window.parent) return\n                if (event.data !== \"getEmbedHeight\") return\n                sendEmbedHeight()\n            })\n        </script>\n    <body>\n</html>\n`;const currentStyle={...iframeStyle,...style};const hasAutoHeight=!style.height;if(hasAutoHeight){currentStyle.height=iframeHeight+\"px\";}return /*#__PURE__*/_jsx(\"iframe\",{ref:ref,style:currentStyle,srcDoc:srcDoc});}function EmbedHtmlWithScripts({html,style}){const ref=useRef();useEffect(()=>{const div=ref.current;if(!div)return;div.innerHTML=html;executeScripts(div);return()=>{div.innerHTML=\"\";};},[html]);return /*#__PURE__*/_jsx(\"div\",{ref:ref,style:{...htmlStyle,...style}});}function EmbedHtmlWithoutScripts({html,style}){return /*#__PURE__*/_jsx(\"div\",{style:{...htmlStyle,...style},dangerouslySetInnerHTML:{__html:html}});}const htmlStyle={width:\"100%\",height:\"100%\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\"};// This function replaces scripts with executable ones.\n// https://stackoverflow.com/questions/1197575/can-scripts-be-inserted-with-innerhtml\nfunction executeScripts(node){if(node instanceof Element&&node.tagName===\"SCRIPT\"){const script=document.createElement(\"script\");script.text=node.innerHTML;for(const{name,value}of node.attributes){script.setAttribute(name,value);}node.parentElement.replaceChild(script,node);}else{for(const child of node.childNodes){executeScripts(child);}}}// Generic components\nfunction LoadingIndicator(){return /*#__PURE__*/_jsx(\"div\",{className:\"framerInternalUI-componentPlaceholder\",style:{...containerStyles,overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:centerTextStyle,children:\"Loading…\"})});}function ErrorMessage({message,style}){return /*#__PURE__*/_jsx(\"div\",{className:\"framerInternalUI-errorPlaceholder\",style:{minHeight:getMinHeight(style),...containerStyles,overflow:\"hidden\",...style},children:/*#__PURE__*/_jsx(\"div\",{style:centerTextStyle,children:message})});}const centerTextStyle={textAlign:\"center\",minWidth:140};// Returns a min-height if the component is using auto-height.\nfunction getMinHeight(style){const hasAutoHeight=!style.height;if(hasAutoHeight)return 200;}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Embed\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"600\",\"framerDisableUnlink\":\"\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"400\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Embed.map"],"mappings":"qVAA6C,GAAe,EAAa,CAAC,MAAM,gBAAgB,gBAAgB,QAAQ,MAAM,mBAAmB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8VxJ,iBAAiB,CAAC,MAAM,CAAC,KAAK,EAAY,gBAAgB,MAAM,QAAQ,aAAa,2GAA2G,CAAC,OAAO,CAAC,KAAK,EAAY,MAAM,MAAM,SAAS,QAAQ,CAAC,KAAK,EAAY,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,UAAU,UAAU,UAAU,UAAU,CAAC,CAAC,UAAU,CAAC,KAAK,EAAY,MAAM,MAAM,aAAa,aAAa,UAAU,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,QAAQ,SAAS,CAAC,MAAM,CAAC,KAAK,EAAY,OAAO,MAAM,QAAQ,aAAa,G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