import{t as e}from"./rolldown-runtime.CrzmA4BD.mjs";import{B as t,D as n,H as r,I as i,L as a,N as o,P as s,R as c,S as l,b as u,f as d,j as f,p,u as m}from"./react.BuYg6O4f.mjs";import{C as h,a as ee,r as te,t as g}from"./motion.weOtF3kV.mjs";import{B as _,D as v,N as y,O as b,V as x,_t as S,at as ne,ct as re,dt as ie,ft as ae,i as C,j as w,l as T,lt as oe,n as E,q as D,r as O,s as k,ut as se,v as A,w as j,z as M}from"./framer.DmwLz-ss.mjs";import{B as ce,K as le,M as ue,U as de,W as N,a as P,c as F,g as fe,h as I,i as pe,j as L,n as me,o as he,r as ge,s as _e,t as ve}from"./shared-lib.BIIgExv6.mjs";import{i as ye,n as be,r as xe,t as Se}from"./j8ApvPXrW._07wTu_-.mjs";import{i as Ce,n as we,r as Te,t as Ee}from"./YSFBKdruH.CJBGlTmO.mjs";import{n as De,r as Oe}from"./zKlRz2D81.B-A7o0vP.mjs";var ke=e((()=>{ce()}));function R({type:e,url:t,html:n,zoom:r,radius:i,border:a,style:o={}}){return e===`url`&&t?d(je,{url:t,zoom:r,radius:i,border:a,style:o}):e===`html`&&n?d(Ne,{html:n,style:o}):d(Ae,{style:o})}function Ae({style:e}){return d(`div`,{style:{minHeight:V(e),...le,overflow:`hidden`,...e},children:d(`div`,{style:W,children:`To embed a website or widget, add it to the properties\xA0panel.`})})}function je({url:e,zoom:t,radius:n,border:r,style:a}){let o=!a.height;/[a-z]+:\/\//.test(e)||(e=`https://`+e);let s=de(),[l,u]=c(s?void 0:!1);return i(()=>{if(!s)return;let t=!0;u(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&&u(e)}else{let e=await n.text();console.error(e),u(Error(`This site can’t be reached.`))}}return n().catch(e=>{console.error(e),u(e)}),()=>{t=!1}},[e]),s&&o?d(B,{message:`URL embeds do not support auto height.`,style:a}):e.startsWith(`https://`)?l===void 0?d(Le,{}):l instanceof Error?d(B,{message:l.message,style:a}):l===!0?d(B,{message:`Can’t embed ${e} due to its content security policy.`,style:a}):d(`iframe`,{src:e,style:{...H,...a,...r,zoom:t,borderRadius:n,transformOrigin:`top center`},loading:`lazy`,fetchPriority:s?`low`:`auto`,referrerPolicy:`no-referrer`,sandbox:Me(s)}):d(B,{message:`Unsupported protocol.`,style:a})}function Me(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 Ne({html:e,...t}){if(e.includes(`<\/script>`)){let n=e.includes(``),r=e.includes(``);return d(n||r?Fe:Pe,{html:e,...t})}return d(Ie,{html:e,...t})}function Pe({html:e,style:t}){let n=f(),[a,o]=c(0);i(()=>{let e=n.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`&&o(r)}return r.addEventListener(`message`,t),e?.postMessage(`getEmbedHeight`,`*`),()=>{r.removeEventListener(`message`,t)}},[]);let s=` ${e}