import{a as T}from"./chunk-44TCVFA5.mjs";import"./chunk-42U43NKG.mjs";import{A,C as d,F as ee,G as Y,H as K,I as re,J as te,L as ae,M as ne,N as oe,Q as M,V as X,Z as ie,aa as s,b as i,ca as C,d as G,da as se,ea as le,f as g,g as U,h as $,i as I,j as c,k as R,m as e,n,o as k,p as J,x as Q,z as b}from"./chunk-TD4R2E4M.mjs";import"./chunk-SWYO36WH.mjs";import"./chunk-JR5VT52U.mjs";import{c as o}from"./chunk-RIUMFBNJ.mjs";var N={position:"relative",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},P={...N,borderRadius:6,background:"rgba(136, 85, 255, 0.3)",color:"#85F",border:"1px dashed #85F",flexDirection:"column"},qe={onClick:{type:d.EventHandler},onMouseEnter:{type:d.EventHandler},onMouseLeave:{type:d.EventHandler}},Ye={type:d.Number,title:"Font Size",min:2,max:200,step:1,displayStepper:!0},Ke={font:{type:d.Boolean,title:"Font",defaultValue:!1,disabledTitle:"Default",enabledTitle:"Custom"},fontFamily:{type:d.String,title:"Family",placeholder:"Inter",hidden:({font:r})=>!r},fontWeight:{type:d.Enum,title:"Weight",options:[100,200,300,400,500,600,700,800,900],optionTitles:["Thin","Extra-light","Light","Regular","Medium","Semi-bold","Bold","Extra-bold","Black"],hidden:({font:r})=>!r}};function j(){return I(()=>A.current()===A.canvas,[])}var je={borderRadius:{title:"Radius",type:d.FusedNumber,toggleKey:"isMixedBorderRadius",toggleTitles:["Radius","Radius per corner"],valueKeys:["topLeftRadius","topRightRadius","bottomRightRadius","bottomLeftRadius"],valueLabels:["TL","TR","BR","BL"],min:0}};var Oe={padding:{type:d.FusedNumber,toggleKey:"paddingPerSide",toggleTitles:["Padding","Padding per side"],valueKeys:["paddingTop","paddingRight","paddingBottom","paddingLeft"],valueLabels:["T","R","B","L"],min:0,title:"Padding"}};function E({type:r,url:t,html:l,style:a={}}){return r==="url"&&t?e(De,{url:t,style:a}):r==="html"&&l?e(We,{html:l,style:a}):e(He,{style:a})}ee(E,{type:{type:d.Enum,defaultValue:"url",displaySegmentedControl:!0,options:["url","html"],optionTitles:["URL","HTML"]},url:{title:"URL",type:d.String,description:"Some websites don\u2019t support embedding.",hidden(r){return r.type!=="url"}},html:{title:"HTML",type:d.String,displayTextArea:!0,hidden(r){return r.type!=="html"}}});function He({style:r}){return e("div",{style:{minHeight:pe(r),...P,overflow:"hidden",...r},children:e("div",{style:O,children:"To embed a website or widget, add it to the properties\xA0panel."})})}function De({url:r,style:t}){let l=!t.height;/[a-z]+:\/\//.test(r)||(r="https://"+r);let a=j(),[h,p]=R(a?void 0:!1);if(g(()=>{if(!a)return;let x=!0;p(void 0);async function V(){let u=await fetch("https://api.framer.com/functions/check-iframe-url?url="+encodeURIComponent(r));if(u.status==200){let{isBlocked:y}=await u.json();x&&p(y)}else{let y=await u.text();console.error(y);let _=new Error("This site can\u2019t be reached.");p(_)}}return V().catch(u=>{console.error(u),p(u)}),()=>{x=!1}},[r]),a&&l)return e(F,{message:"URL embeds do not support auto height.",style:t});if(!r.startsWith("https://"))return e(F,{message:"Unsupported protocol.",style:t});if(h===void 0)return e(Je,{});if(h instanceof Error)return e(F,{message:h.message,style:t});if(h===!0){let x=`Can\u2019t embed ${r} due to its content security policy.`;return e(F,{message:x,style:t})}return e("iframe",{src:r,style:{...ce,...t},loading:"lazy",fetchPriority:a?"low":"auto",referrerPolicy:"no-referrer",sandbox:Ze(a)})}var ce={width:"100%",height:"100%",border:"none"};function Ze(r){let t=["allow-same-origin","allow-scripts"];return r||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 We({html:r,...t}){if(r.includes("<\/script>")){let a=r.includes(""),h=r.includes("");return a||h?e(Ue,{html:r,...t}):e(Ge,{html:r,...t})}return e($e,{html:r,...t})}function Ge({html:r,style:t}){let l=c(),[a,h]=R(0);g(()=>{var u;let y=(u=l.current)===null||u===void 0?void 0:u.contentWindow;function _(B){if(B.source!==y)return;let S=B.data;if(typeof S!="object"||S===null)return;let L=S.embedHeight;typeof L=="number"&&h(L)}return o.addEventListener("message",_),y?.postMessage("getEmbedHeight","*"),()=>{o.removeEventListener("message",_)}},[]);let p=`
${r}