PageSourceSearch

https://ineedleads.co.uk/assets/FormsV2Builder-3DXliud5.js

js ineedleads.co.uk collected 2026-10-09 22:57:19 UTC 24,821 bytes, 26 lines download raw bytes

1import{r as h,j as e,u as M}from"./index-DKJ0tKwF.js";import{ap as ze,aq as Me,ar as Be,as as $e,bM as Ne,bN as ye,bO as S,bP as T,C as B,aR as Ve,dE as He,dF as Ge,dM as Oe,gx as me,aj as qe,ge as ue,bL as We,aS as Qe,eX as Xe,dI as Ye,cw as k,a8 as Je,dz as Ke,n as Ze,dH as es,c7 as ss,T as he,s as U,v as A,w as R,x as z,y as f}from"./App-CL-mfmhu.js";import{c as as,d as ts,S as rs}from"./SubmissionsDialog-CByW_gPN.js";import{a as xe,D as pe,b as is,n as ls}from"./formsV2-D3Mwtt9Z.js";import{D as m,a2 as ns,L as os,M as ds,P as cs,h as ge,b as ms}from"./button-DFML8rOM.js";import{j as us,f as hs,o as xs,p as ps,C as gs,al as c,I as fs,am as i}from"./V2Layout-DEbe2yZA.js";import{S as fe}from"./slider-wKlj6rAS.js";import{D as we}from"./brandedHost-DwqqfaEy.js";import{E as Ce,l as js,I as je,g as bs,q as vs,u as Ns,v as ys,T as be,W as ws}from"./v3LegalOverrides-BUgTGJPl.js";import"./tracker-DzJH7QDt.js";import"./mouse-pointer-2-CzsmklB8.js";import"./index-BNGwt955.js";import"./SEOHead-B5IBZJEm.js";import"./types-DU7944Yl.js";function Cs({embedId:j,open:$,onOpenChange:V}){const[H,n]=h.useState("auto");if(!j)return null;const P=we,_=`${P}/f2/${j}?bg=transparent`,L=`<iframe src="${_}" width="100%" height="640" frameborder="0" style="border:0;background:transparent;" allow="clipboard-write"></iframe>`,F=`<div data-inl-form-v2="${j}"></div>
2<script>
3(function(){
4  function withTrackingParams(src){
5    try{
6      var u=new URL(src);
7      var p=new URLSearchParams(window.location.search||'');
8      ['utm_source','utm_medium','utm_campaign','utm_term','utm_content','gclid','gbraid','wbraid','fbclid','msclkid','ttclid'].forEach(function(k){var v=p.get(k);if(v&&!u.searchParams.get(k))u.searchParams.set(k,v);});
9      if(!u.searchParams.get('parent_url'))u.searchParams.set('parent_url',window.location.href);
10      return u.toString();
11    }catch(e){return src;}
12  }
13  var d=document.querySelectorAll('[data-inl-form-v2="${j}"]');
14  d.forEach(function(el){
15    if(el.dataset.loaded)return;el.dataset.loaded="1";
16    var f=document.createElement('iframe');
17    f.src=withTrackingParams("${_}");f.style.cssText="width:100%;border:0;background:transparent;display:block";
18    f.height=640;f.allow="clipboard-write";el.appendChild(f);
19    window.addEventListener('message',function(e){
20      if(e.data&&e.data.type==='inl-form-resize'&&typeof e.data.height==='number'){f.height=e.data.height+20;}
21    });
22  });
23})();
24<\/script>`;function x(y){navigator.clipboard.writeText(y),M.success("Copied")}return e.jsx(ze,{open:$,onOpenChange:V,children:e.jsxs(Me,{className:"max-w-2xl",children:[e.jsx(Be,{children:e.jsx($e,{children:"Embed this form"})}),e.jsxs(Ne,{value:H,onValueChange:y=>n(y),children:[e.jsxs(ye,{children:[e.jsx(S,{value:"auto",children:"Auto-resize (recommended)"}),e.jsx(S,{value:"iframe",children:"Plain iframe"}),e.jsx(S,{value:"link",children:"Direct link"})]}),e.jsxs(T,{value:"auto",className:"space-y-2 mt-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Paste anywhere on your site. Height adjusts as steps change."}),e.jsx("pre",{className:"text-xs bg-muted/50 p-3 rounded overflow-x-auto",children:F}),e.jsxs(m,{size:"sm",onClick:()=>x(F),children:[e.jsx(B,{className:"h-3.5 w-3.5 mr-1"}),"Copy snippet"]})]}),e.jsxs(T,{value:"iframe",className:"space-y-2 mt-3",children:[e.jsx("pre",{className:"text-xs bg-muted/50 p-3 rounded overflow-x-auto",children:L}),e.jsxs(m,{size:"sm",onClick:()=>x(L),children:[e.jsx(B,{className:"h-3.5 w-3.5 mr-1"}),"Copy"]})]}),e.jsxs(T,{value:"link",className:"space-y-2 mt-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Share as a standalone URL."}),e.jsx("pre",{className:"text-xs bg-muted/50 p-3 rounded overflow-x-auto break-all",children:`${P}/f2/${j}`}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(m,{size:"sm",onClick:()=>x(`${P}/f2/${j}`),children:[e.jsx(B,{className:"h-3.5 w-3.5 mr-1"}),"Copy"]}),e.jsxs(m,{size:"sm",variant:"outline",onClick:()=>window.open(`/f2/${j}`,"_blank"),children:[e.jsx(Ce,{className:"h-3.5 w-3.5 mr-1"}),"Open"]})]})]})]}),e.jsxs("p",{className:"text-[10px] text-muted-foreground mt-2",children:["Theme overrides via URL: ",e.jsx("code",{children:"?theme=#hex&font=Inter&bg=transparent"})]})]})})}const ve=[{type:"short_text",label:"Short Text",icon:He,group:"Input"},{type:"long_text",label:"Long Text",icon:Ge,group:"Input"},{type:"email",label:"Email",icon:ds,group:"Input"},{type:"phone",label:"Phone",icon:cs,group:"Input"},{type:"number",label:"Number",icon:Oe,group:"Input"},{type:"url",label:"Website URL",icon:js,group:"Input"},{type:"postcode",label:"Postcode",icon:ge,group:"Input"},{type:"address",label:"Address",icon:ge,group:"Input"},{type:"choice_cards",label:"Choice Cards",icon:us,group:"Choice"},{type:"radio",label:"Multiple Choice",icon:me,group:"Choice"},{type:"select",label:"Dropdown",icon:hs,group:"Choice"},{type:"checkbox",label:"Checkboxes",icon:xs,group:"Choice"},{type:"yes_no",label:"Yes / No",icon:me,group:"Choice"},{type:"rating",label:"Star Rating",icon:ps,group:"Choice"},{type:"nps",label:"NPS Score",icon:qe,group:"Choice"},{type:"slider",label:"Slider",icon:ue,group:"Choice"},{type:"scale",label:"Scale 1–10",icon:ue,group:"Choice"},{type:"image_pick",label:"Image Pick",icon:je,group:"Choice"},{type:"date",label:"Date",icon:gs,group:"Advanced"},{type:"time",label:"Time",icon:bs,group:"Advanced"},{type:"signature",label:"Signature",icon:We,group:"Advanced"},{type:"file",label:"File Upload",icon:Qe,group:"Advanced"},{type:"section",label:"Section Heading",icon:Xe,group:"Layout"},{type:"divider",label:"Divider",icon:vs,group:"Layout"},{type:"image",label:"Image",icon:je,group:"Layout"},{type:"video",label:"Video",icon:Ns,group:"Layout"},{type:"html",label:"HTML Block",icon:Ye,group:"Layout"}],ks=[{value:"",label:"— No mapping —"},{value:"full_name",label:"Full Name"},{value:"first_name",label:"First Name"},{value:"last_name",label:"Last Name"},{value:"email",label:"Email"},{value:"phone",label:"Phone"},{value:"postcode",label:"Postcode"},{value:"custom.bill_range",label:"Custom: Bill Range"},{value:"custom.property_type",label:"Custom: Property Type"},{value:"custom.ownership",label:"Custom: Ownership"},{value:"custom.roof_type",label:"Custom: Roof Type"},{value:"custom.timeframe",label:"Custom: Timeframe"},{value:"custom.notes",label:"Custom: Notes"}];function Bs({idOverride:j}={}){var K,Z,ee,se,ae,te,re,ie,le,ne,oe,de,ce;const $=ns(),V=j??$.id;os();const H=Ve(),{data:n,isLoading:P}=as(V||null),_=ts(),[L,F]=h.useState(""),[x,y]=h.useState({oneQuestionPerStep:!0,steps:[]}),[d,p]=h.useState(xe),[v,N]=h.useState(pe),[E,I]=h.useState(null),[D,G]=h.useState(null),[O,ke]=h.useState(""),[Se,q]=h.useState("field"),[Te,Q]=h.useState(!1),[Pe,X]=h.useState(!1);h.useEffect(()=>{var s,a,t;n&&(F(n.name),y(n.schema||{oneQuestionPerStep:!0,steps:[]}),p({...xe,...n.theme}),N({...pe,...n.settings}),I(((t=(a=(s=n.schema)==null?void 0:s.steps)==null?void 0:a[0])==null?void 0:t.id)||null))},[n==null?void 0:n.id]);const l=h.useMemo(()=>x.steps.find(s=>s.id===E)||x.steps[0]||null,[x,E]),o=h.useMemo(()=>(l==null?void 0:l.fields.find(s=>s.id===D))||null,[l,D]);function _e(s){y(a=>({...a,...s}))}function b(s){y(a=>({...a,steps:s(a.steps)}))}function w(s,a){b(t=>t.map(r=>
24r.id!==(l==null?void 0:l.id)?r:{...r,fields:r.fields.map(u=>u.id===s?{...u,...a}:u)}))}function Le(s){const a=is(s);b(t=>t.map(r=>r.id!==(l==null?void 0:l.id)?r:{...r,fields:[...r.fields,a]})),G(a.id),q("field")}function Fe(s){b(a=>a.map(t=>t.id!==(l==null?void 0:l.id)?t:{...t,fields:t.fields.filter(r=>r.id!==s)})),D===s&&G(null)}function Ee(s){b(a=>a.map(t=>{var g;if(t.id!==(l==null?void 0:l.id))return t;const r=t.fields.findIndex(C=>C.id===s);if(r<0)return t;const u={...t.fields[r],id:((g=crypto.randomUUID)==null?void 0:g.call(crypto))??Math.random().toString(36).slice(2)};return{...t,fields:[...t.fields.slice(0,r+1),u,...t.fields.slice(r+1)]}}))}function Y(s,a){b(t=>t.map(r=>{if(r.id!==(l==null?void 0:l.id))return r;const u=r.fields.findIndex(Re=>Re.id===s),g=u+a;if(u<0||g<0||g>=r.fields.length)return r;const C=[...r.fields];return[C[u],C[g]]=[C[g],C[u]],{...r,fields:C}}))}function Ie(){const s=ls({title:`Step ${x.steps.length+1}`});b(a=>[...a,s]),I(s.id)}function De(s){if(x.steps.length<=1){M.error("Need at least one step");return}b(a=>a.filter(t=>t.id!==s)),E===s&&I(x.steps[0].id)}async function J(s){n&&(await _.mutateAsync({id:n.id,patch:{name:L,schema:x,theme:d,settings:v,...s!=null?{is_published:s}:{}}}),M.success(s?"Published":"Saved"))}const W=n?`${we}/f2/${n.embed_id}`:"";if(P||!n)return e.jsx("div",{className:"h-full flex items-center justify-center text-muted-foreground",children:"Loading…"});const Ue=O?ve.filter(s=>s.label.toLowerCase().includes(O.toLowerCase())):ve,Ae=["Input","Choice","Advanced","Layout"];return e.jsxs("div",{className:"h-full flex flex-col bg-gradient-to-br from-background via-background to-muted/20",children:[e.jsxs("div",{className:"h-14 px-4 flex items-center justify-between border-b border-white/5 bg-background/60 backdrop-blur-xl",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsxs(m,{variant:"ghost",size:"sm",onClick:()=>H("/forms-v2"),children:[e.jsx(ms,{className:"h-4 w-4 mr-1"}),"Back"]}),e.jsx(c,{value:L,onChange:s=>F(s.target.value),className:"h-8 w-64 border-transparent bg-transparent text-base font-medium focus-visible:bg-white/5"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{checked:n.is_published,onCheckedChange:s=>J(s)}),e.jsx("span",{className:"text-xs text-muted-foreground mr-2",children:n.is_published?"Published":"Draft"}),e.jsxs(m,{variant:"outline",size:"sm",onClick:()=>Q(!0),children:[e.jsx(fs,{className:"h-4 w-4 mr-1"}),"Submissions"]}),e.jsxs(m,{variant:"outline",size:"sm",onClick:()=>window.open(W,"_blank"),children:[e.jsx(Je,{className:"h-4 w-4 mr-1"}),"Preview"]}),e.jsxs(m,{variant:"outline",size:"sm",onClick:()=>X(!0),children:[e.jsx(Ce,{className:"h-4 w-4 mr-1"}),"Embed"]}),e.jsxs(m,{size:"sm",onClick:()=>J(),disabled:_.isPending,children:[e.jsx(Ke,{className:"h-4 w-4 mr-1"}),"Save"]})]})]}),e.jsxs("div",{className:"flex-1 flex min-h-0",children:[e.jsxs("div",{role:"complementary","aria-label":"Form steps and field palette",className:"w-72 shrink-0 border-r border-white/5 flex flex-col bg-background/40",children:[e.jsxs("div",{className:"p-3 border-b border-white/5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx(i,{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Steps"}),e.jsx(m,{size:"sm",variant:"ghost",onClick:Ie,children:e.jsx(ys,{className:"h-3.5 w-3.5"})})]}),e.jsx("div",{className:"space-y-1",children:x.steps.map((s,a)=>e.jsxs("button",{onClick:()=>I(s.id),className:`w-full flex items-center justify-between text-left px-2.5 py-2 rounded-md text-sm transition ${E===s.id?"bg-primary/15 text-primary border border-primary/30":"hover:bg-white/5 border border-transparent"}`,children:[e.jsxs("span",{className:"truncate",children:[e.jsxs("span",{className:"text-muted-foreground mr-2",children:[a+1,"."]}),s.title||"Step"]}),e.jsx(be,{onClick:t=>{t.stopPropagation(),De(s.id)},className:"h-3.5 w-3.5 opacity-0 group-hover:opacity-100 hover:text-destructive"})]},s.id))}),e.jsxs("div",{className:"mt-3 flex items-center justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:"One question per step"}),e.jsx(k,{checked:x.oneQuestionPerStep!==!1,onCheckedChange:s=>_e({oneQuestionPerStep:s})})]})]}),e.jsxs("div",{className:"p-3 flex-1 overflow-y-auto",children:[e.jsx(i,{className:"text-xs uppercase tracking-wider text-muted-foreground",children:"Add field"}),e.jsx(c,{placeholder:"Search…",value:O,onChange:s=>ke(s.target.value),className:"h-8 mt-2 mb-3"}),Ae.map(s=>{const a=Ue.filter(t=>t.group===s);return a.length===0?null:e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground
24/70 mb-1.5",children:s}),e.jsx("div",{className:"grid grid-cols-2 gap-1.5",children:a.map(t=>{const r=t.icon;return e.jsxs("button",{onClick:()=>Le(t.type),className:"group flex flex-col items-start gap-1 p-2.5 rounded-md border border-white/5 hover:border-primary/40 hover:bg-primary/5 transition text-left",children:[e.jsx(r,{className:"h-3.5 w-3.5 text-primary"}),e.jsx("span",{className:"text-[11px] font-medium leading-tight",children:t.label})]},t.type)})})]},s)})]})]}),e.jsx("main",{className:"flex-1 min-w-0 overflow-y-auto p-6",children:e.jsx("div",{className:"max-w-2xl mx-auto",children:l&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(c,{value:l.title||"",onChange:s=>b(a=>a.map(t=>t.id===l.id?{...t,title:s.target.value}:t)),placeholder:"Step title (optional)",className:"h-9 bg-transparent border-transparent text-lg font-semibold focus-visible:bg-white/5"}),e.jsx(c,{value:l.subtitle||"",onChange:s=>b(a=>a.map(t=>t.id===l.id?{...t,subtitle:s.target.value}:t)),placeholder:"Subtitle (optional)",className:"h-8 bg-transparent border-transparent text-sm text-muted-foreground focus-visible:bg-white/5"}),e.jsxs("div",{className:"space-y-2 mt-4",children:[l.fields.map((s,a)=>e.jsx("div",{onClick:()=>{G(s.id),q("field")},className:`group relative rounded-lg border p-3 transition cursor-pointer ${D===s.id?"border-primary/50 bg-primary/5":"border-white/8 hover:border-white/20 bg-white/[0.02]"}`,children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[e.jsx(Ze,{className:"h-4 w-4 text-muted-foreground/40"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-medium truncate",children:s.label||e.jsx("span",{className:"text-muted-foreground italic",children:"Untitled"})}),e.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted-foreground",children:s.type.replace(/_/g," ")})]})]}),e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 flex items-center gap-1 transition",children:[e.jsx(m,{size:"icon",variant:"ghost",className:"h-7 w-7",onClick:t=>{t.stopPropagation(),Y(s.id,-1)},children:"↑"}),e.jsx(m,{size:"icon",variant:"ghost",className:"h-7 w-7",onClick:t=>{t.stopPropagation(),Y(s.id,1)},children:"↓"}),e.jsx(m,{size:"icon",variant:"ghost",className:"h-7 w-7",onClick:t=>{t.stopPropagation(),Ee(s.id)},children:e.jsx(B,{className:"h-3.5 w-3.5"})}),e.jsx(m,{size:"icon",variant:"ghost",className:"h-7 w-7 hover:text-destructive",onClick:t=>{t.stopPropagation(),Fe(s.id)},children:e.jsx(be,{className:"h-3.5 w-3.5"})})]})]})},s.id)),l.fields.length===0&&e.jsx("div",{className:"text-center py-12 text-sm text-muted-foreground border border-dashed border-white/10 rounded-lg",children:"No fields yet. Pick from the palette on the left."})]})]})})}),e.jsx("div",{role:"complementary","aria-label":"Field inspector",className:"w-80 shrink-0 border-l border-white/5 bg-background/40 overflow-y-auto",children:e.jsxs(Ne,{value:Se,onValueChange:s=>q(s),children:[e.jsxs(ye,{className:"w-full justify-start rounded-none border-b border-white/5 bg-transparent px-2 h-10",children:[e.jsxs(S,{value:"field",className:"text-xs",children:[e.jsx(ws,{className:"h-3.5 w-3.5 mr-1"}),"Field"]}),e.jsxs(S,{value:"design",className:"text-xs",children:[e.jsx(es,{className:"h-3.5 w-3.5 mr-1"}),"Design"]}),e.jsxs(S,{value:"settings",className:"text-xs",children:[e.jsx(ss,{className:"h-3.5 w-3.5 mr-1"}),"Settings"]})]}),e.jsxs(T,{value:"field",className:"p-4 space-y-4 mt-0",children:[!o&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"Select a field on the canvas."}),o&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx(i,{className:"text-xs",children:"Label"}),e.jsx(c,{className:"h-8 mt-1",value:o.label,onChange:s=>w(o.id,{label:s.target.value})})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs",children:"Help text"}),e.jsx(c,{className:"h-8 mt-1",value:o.helpText||"",onChange:s=>w(o.id,{helpText:s.target.value})})]}),!["section","divider","image","video","html","choice_cards","radio","select","checkbox","yes_no","rating","nps"].includes(o.type)&&e.jsxs("div",{children:[e.jsx(i,{className:"text-xs",children:"Placeholder"}),e.jsx(c,{className:"h-8 mt-1",value:o.placeholder||"",onChange:s=>w(o.id,{placeholder:s.target.value})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(i,{className:"text-xs",children:"Required"}),e.jsx(k,{checked:!!o.required,onCheckedChange:s=>w(o.id,{required:s})})]}),["choice_cards","radio","select","checkbox"].includes(o.type)&&e.jsxs("div",{children:[e.jsx(i,{className:"text-xs",children:"Options (one per line)"}),e.jsx(he,{className:"mt-1 min-h-[120px] text-sm",value:(o.options||[]).map(s=>typeof s=="string"?s:s.label).join(`
25`),onChange:s=>w(o.id,{options:s.target.value.split(`
26`).filter(a=>a.trim()).map(a=>({label:a.trim()}))})})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs",children:"Map to CRM field"}),e.jsxs(U,{value:o.crmField||"__none",onValueChange:s=>
26w(o.id,{crmField:s==="__none"?void 0:s}),children:[e.jsx(A,{className:"h-8 mt-1",children:e.jsx(R,{})}),e.jsx(z,{children:ks.map(s=>e.jsx(f,{value:s.value||"__none",children:s.label},s.value||"__none"))})]})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs",children:"Pre-fill from URL param"}),e.jsx(c,{className:"h-8 mt-1",placeholder:"utm_source, ref, …",value:o.prefillParam||"",onChange:s=>w(o.id,{prefillParam:s.target.value||void 0})})]})]})]}),e.jsxs(T,{value:"design",className:"p-4 space-y-5 mt-0",children:[e.jsxs("div",{children:[e.jsx(i,{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Colors"}),e.jsx("div",{className:"grid grid-cols-2 gap-2 mt-2",children:[["primary","Primary"],["accent","Accent"],["surface","Surface"],["text","Text"],["bg","Background"],["border","Border"]].map(([s,a])=>{var t,r;return e.jsxs("div",{children:[e.jsx(i,{className:"text-[10px] text-muted-foreground",children:a}),e.jsxs("div",{className:"flex gap-1 items-center mt-0.5",children:[e.jsx("input",{type:"color",value:((t=d.colors)==null?void 0:t[s])||"#000",onChange:u=>p(g=>({...g,colors:{...g.colors,[s]:u.target.value}})),className:"w-7 h-7 rounded border border-white/10 cursor-pointer"}),e.jsx(c,{className:"h-7 text-xs",value:((r=d.colors)==null?void 0:r[s])||"",onChange:u=>p(g=>({...g,colors:{...g.colors,[s]:u.target.value}}))})]})]},s)})})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Typography"}),e.jsxs("div",{className:"space-y-2 mt-2",children:[e.jsxs("div",{children:[e.jsx(i,{className:"text-[10px] text-muted-foreground",children:"Body font (Google)"}),e.jsx(c,{className:"h-8 mt-0.5",value:((K=d.typography)==null?void 0:K.fontFamily)||"",onChange:s=>p(a=>({...a,typography:{...a.typography,fontFamily:s.target.value}}))})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-[10px] text-muted-foreground",children:"Heading font (Google)"}),e.jsx(c,{className:"h-8 mt-0.5",value:((Z=d.typography)==null?void 0:Z.headingFont)||"",onChange:s=>p(a=>({...a,typography:{...a.typography,headingFont:s.target.value}}))})]})]})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Buttons"}),e.jsxs("div",{className:"space-y-2 mt-2",children:[e.jsxs(U,{value:((ee=d.buttons)==null?void 0:ee.variant)||"gradient",onValueChange:s=>p(a=>({...a,buttons:{...a.buttons,variant:s}})),children:[e.jsx(A,{className:"h-8",children:e.jsx(R,{})}),e.jsxs(z,{children:[e.jsx(f,{value:"solid",children:"Solid"}),e.jsx(f,{value:"gradient",children:"Gradient"}),e.jsx(f,{value:"outline",children:"Outline"}),e.jsx(f,{value:"glass",children:"Glass"})]})]}),((se=d.buttons)==null?void 0:se.variant)==="gradient"&&e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsx("input",{type:"color",value:((ae=d.buttons)==null?void 0:ae.gradientFrom)||"#FF6B35",onChange:s=>p(a=>({...a,buttons:{...a.buttons,gradientFrom:s.target.value}})),className:"h-8 w-full rounded border border-white/10"}),e.jsx("input",{type:"color",value:((te=d.buttons)==null?void 0:te.gradientTo)||"#FFB74A",onChange:s=>p(a=>({...a,buttons:{...a.buttons,gradientTo:s.target.value}})),className:"h-8 w-full rounded border border-white/10"})]}),e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsx(i,{children:"Glow shadow"}),e.jsx(k,{checked:!!((re=d.buttons)!=null&&re.shadow),onCheckedChange:s=>p(a=>({...a,buttons:{...a.buttons,shadow:s}}))})]})]})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Choice Cards"}),e.jsxs(U,{value:((ie=d.choiceCards)==null?void 0:ie.variant)||"list",onValueChange:s=>p(a=>({...a,choiceCards:{...a.choiceCards,variant:s}})),children:[e.jsx(A,{className:"h-8 mt-2",children:e.jsx(R,{})}),e.jsxs(z,{children:[e.jsx(f,{value:"list",children:"List (stacked)"}),e.jsx(f,{value:"grid",children:"Grid"}),e.jsx(f,{value:"tiles",children:"Tiles (2-col)"})]})]})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Radius"}),e.jsxs("div",{className:"mt-2",children:[e.jsx(fe,{value:[((le=d.radius)==null?void 0:le.md)||12],min:0,max:32,onValueChange:s=>p(a=>({...a,radius:{...a.radius,sm:Math.max(0,s[0]-4),md:s[0],lg:s[0]+8,xl:s[0]+16}}))}),e.jsxs("div",{className:"text-[10px] text-muted-foreground text-center mt-1",children:[((ne=d.radius)==null?void 0:ne.md)||12,"px"]})]})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Card width"}),e.jsx(fe,{value:[((oe=d.layout)==null?void 0:oe.maxWidth)||560],min:360,max:840,step:20,className:"mt-2",onValueChange:s=>p(a=>({...a,layout:{...a.layout,maxWidth:s[0]}}))}),e.jsxs("div",{className:"text-[10px] text-muted-foreground text-center mt-1",children:[((de=d.layout)==null?void 0:de.maxWidth)||560,"px"]})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Backgroun
26d"}),e.jsxs(U,{value:((ce=d.background)==null?void 0:ce.type)||"transparent",onValueChange:s=>p(a=>({...a,background:{...a.background,type:s}})),children:[e.jsx(A,{className:"h-8 mt-2",children:e.jsx(R,{})}),e.jsxs(z,{children:[e.jsx(f,{value:"transparent",children:"Transparent (for embeds)"}),e.jsx(f,{value:"solid",children:"Solid"}),e.jsx(f,{value:"gradient",children:"Gradient"})]})]})]})]}),e.jsxs(T,{value:"settings",className:"p-4 space-y-3 mt-0",children:[e.jsxs("div",{children:[e.jsx(i,{className:"text-xs",children:"Submit button text"}),e.jsx(c,{className:"h-8 mt-1",value:v.submitButtonText||"",onChange:s=>N(a=>({...a,submitButtonText:s.target.value}))})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs",children:"Success message"}),e.jsx(he,{className:"mt-1 min-h-[60px] text-sm",value:v.successMessage||"",onChange:s=>N(a=>({...a,successMessage:s.target.value}))})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs",children:"Redirect URL (after submit)"}),e.jsx(c,{className:"h-8 mt-1",placeholder:"https://…",value:v.redirectUrl||"",onChange:s=>N(a=>({...a,redirectUrl:s.target.value||null}))})]}),e.jsxs("div",{children:[e.jsx(i,{className:"text-xs",children:"Trust line"}),e.jsx(c,{className:"h-8 mt-1",value:v.trustLine||"",onChange:s=>N(a=>({...a,trustLine:s.target.value}))})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(i,{className:"text-xs",children:"Show progress"}),e.jsx(k,{checked:v.showProgress!==!1,onCheckedChange:s=>N(a=>({...a,showProgress:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(i,{className:"text-xs",children:"Save partial submissions"}),e.jsx(k,{checked:v.abandonedCapture!==!1,onCheckedChange:s=>N(a=>({...a,abandonedCapture:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(i,{className:"text-xs",children:"Honeypot anti-spam"}),e.jsx(k,{checked:v.honeypot!==!1,onCheckedChange:s=>N(a=>({...a,honeypot:s}))})]}),e.jsxs("div",{className:"pt-4 border-t border-white/5",children:[e.jsx(i,{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Embed URL"}),e.jsxs("div",{className:"mt-2 flex gap-1",children:[e.jsx(c,{readOnly:!0,className:"h-8 text-xs",value:W}),e.jsx(m,{size:"sm",variant:"outline",onClick:()=>{navigator.clipboard.writeText(W),M.success("Copied")},children:"Copy"})]})]})]})]})})]}),e.jsx(rs,{formId:n.id,formName:n.name,open:Te,onOpenChange:Q}),e.jsx(Cs,{embedId:n.embed_id,open:Pe,onOpenChange:X})]})}export{Bs as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.