import{t as e}from"./rolldown-runtime.CMAw1HyY.mjs";import{A as t,B as n,F as r,N as i,O as a,P as o,R as s,_ as c,j as l,l as u,s as d,u as f,w as p,y as ee}from"./react.D3LpXLeJ.mjs";import{C as m,a as te,r as ne,t as re}from"./motion.DmxynPzX.mjs";import{Et as h,F as g,H as _,N as ie,O as ae,Ot as v,T as y,U as b,V as x,Y as S,a as C,b as w,bt as T,d as E,dt as oe,gt as se,h as D,ht as ce,i as O,k,l as le,pt as ue,r as A,st as de,ut as fe,wt as j}from"./framer.B9eBDazG.mjs";import{h as pe,o as me,p as M}from"./OIjZRBmWDcIE2B6qgG1j.C7ytnr-7.mjs";import{t as he}from"./default-utils.fANXn9xb.mjs";import{S as ge,_ as _e,a as ve,b as ye,c as N,i as be,o as xe,r as Se,s as Ce,v as P,x as we,y as Te}from"./shared-lib.5cVxiYY6.mjs";import{n as Ee,t as F}from"./gfgQgKeyT.DbuujfCM.mjs";import{n as De,t as I}from"./NQi6x_aTn.DIi3gYB4.mjs";import{i as Oe,n as ke,r as Ae,t as je}from"./qcg0OEbTe.DDAjNAkL.mjs";import{i as Me,n as Ne,r as Pe,t as Fe}from"./TQyJKunPf.BlnoyPgi.mjs";import{n as Ie,r as Le}from"./REdJyn7w3.CDziRi4T.mjs";function L({type:e,url:t,html:n,zoom:r,radius:i,border:a,style:o={}}){return e===`url`&&t?u(ze,{url:t,zoom:r,radius:i,border:a,style:o}):e===`html`&&n?u(Ve,{html:n,style:o}):u(Re,{style:o})}function Re({style:e}){return u(`div`,{style:{minHeight:qe(e),...pe,overflow:`hidden`,...e},children:u(`div`,{style:V,children:`To embed a website or widget, add it to the properties\xA0panel.`})})}function ze({url:e,zoom:t,radius:n,border:a,style:o}){let s=!o.height;/[a-z]+:\/\//.test(e)||(e=`https://`+e);let c=me(),[l,d]=r(c?void 0:!1);return i(()=>{if(!c)return;let t=!0;d(void 0);async function n(){let n=await fetch(`https://api.framer.com/functions/check-iframe-url?url=`+encodeURIComponent(e));if(n.status==200){let{isBlocked:e}=await n.json();t&&d(e)}else{let e=await n.text();console.error(e),d(Error(`This site can’t be reached.`))}}return n().catch(e=>{console.error(e),d(e)}),()=>{t=!1}},[e]),c&&s?u(R,{message:`URL embeds do not support auto height.`,style:o}):e.startsWith(`https://`)?l===void 0?u(Ke,{}):l instanceof Error?u(R,{message:l.message,style:o}):l===!0?u(R,{message:`Can’t embed ${e} due to its content security policy.`,style:o}):u(`iframe`,{src:e,style:{...z,...o,...a,zoom:t,borderRadius:n,transformOrigin:`top center`},loading:`lazy`,fetchPriority:c?`low`:`auto`,referrerPolicy:`no-referrer`,sandbox:Be(c),allowFullScreen:!0,allow:`presentation; fullscreen; accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture; clipboard-write`}):u(R,{message:`Unsupported protocol.`,style:o})}function Be(e){let t=[`allow-same-origin`,`allow-scripts`];return e||t.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`),t.join(` `)}function Ve({html:e,...t}){if(e.includes(`<\/script>`)){let n=e.includes(``),r=e.includes(``);return u(n||r?Ue:He,{html:e,...t})}return u(We,{html:e,...t})}function He({html:e,style:t}){let o=a(),[s,c]=r(0);i(()=>{let e=o.current?.contentWindow;function t(t){if(t.source!==e)return;let n=t.data;if(typeof n!=`object`||!n)return;let r=n.embedHeight;typeof r==`number`&&c(r)}return n.addEventListener(`message`,t),e?.postMessage(`getEmbedHeight`,`*`),()=>{n.removeEventListener(`message`,t)}},[]);let l=`
${e}