PageSourceSearch

https://trueth.io/assets/Intake-lB9IOEwg.js

js trueth.io collected 2026-09-30 06:37:45 UTC 44,929 bytes, 2 lines download raw bytes

vendor: 4,115 bytes, line 1
1import{Q as Xe,r as n,ah as Me,j as e,P as ve,ai as Ue,aj as ks,ak as Is,al as Rs,am as _s,c as M,B as _,s as Ne,q as V,u as Ps,a as Es,S as As,e as T,X as Y,D as He,m as We,n as Ye,o as Ve}from"./index-cvSkj9Gc.js";import{I as se}from"./input-D3lfeLZA.js";import{T as le}from"./textarea-Di3UPXhW.js";import{c as Qe,R as Us,I as Ts}from"./index-D27sR0nO.js";import{u as Ms}from"./index-BGsNGv2O.js";import{C as Bs}from"./circle-BoUxPbm7.js";import{A as Ds,a as fe,b as je,c as be}from"./accordion-CI8B0vhu.js";import{E as Fs,a as Gs}from"./react-stripe.esm-WbP5IkTc.js";import{s as Ls}from"./stripe-CFLpJSo5.js";import{u as $s}from"./usePublicTalents-DQ5dmb1h.js";import{W as Os}from"./WorkflowCastingDialog-pI_kgruU.js";import{S as Te}from"./sparkles-BQPrnr3K.js";import{U as zs}from"./user-C1KZlg1f.js";import{S as qs}from"./send-BPxfIN1f.js";import{C as H}from"./check-CPGULxQ-.js";import{M as Ks}from"./message-square-dn4bu9OG.js";import{P as Hs}from"./pencil-3pdssFnX.js";import{P as _e}from"./plus-CAzQVfm6.js";import{U as Pe}from"./upload-DzD1eL9g.js";import{F as Ws}from"./file-text-ggtzGlrL.js";import{I as Ys}from"./image-BgxEYL4P.js";import{A as Vs}from"./arrow-left-C-RBdLa3.js";import{A as Js}from"./arrow-right-D7KtaLpO.js";import"./index-Da2qySYZ.js";import"./chevron-down-BOzbTpI_.js";import"./index-LflXr1CT.js";import"./useQuery-BaZlE4Aw.js";import"./FilterBar-CbRxteUD.js";import"./useMutation-D0B94pFu.js";import"./checkbox-CyP_ifK1.js";import"./popover-7W435-eR.js";import"./badge-CD9B5Ww7.js";import"./search-DwHJ0dm_.js";import"./skeleton-DP0Xl8C1.js";import"./image-utils-C26VKEJ0.js";var Be="Radio",[Xs,Ze]=Xe(Be),[Qs,Zs]=Xs(Be),es=n.forwardRef((l,S)=>{const{__scopeRadio:m,name:g,checked:p=!1,required:w,disabled:o,value:x="on",onCheck:C,form:B,...i}=l,[v,P]=n.useState(null),f=Me(S,D=>P(D)),N=n.useRef(!1),A=v?B||!!v.closest("form"):!0;return e.jsxs(Qs,{scope:m,checked:p,disabled:o,children:[e.jsx(ve.button,{type:"button",role:"radio","aria-checked":p,"data-state":as(p),"data-disabled":o?"":void 0,disabled:o,value:x,...i,ref:f,onClick:Ue(l.onClick,D=>{p||C==null||C(),A&&(N.current=D.isPropagationStopped(),N.current||D.stopPropagation())})}),A&&e.jsx(rs,{control:v,bubbles:!N.current,name:g,value:x,checked:p,required:w,disabled:o,form:B,style:{transform:"translateX(-100%)"}})]})});es.displayName=Be;var ss="RadioIndicator",ts=n.forwardRef((l,S)=>{const{__scopeRadio:m,forceMount:g,...p}=l,w=Zs(ss,m);return e.jsx(ks,{present:g||w.checked,children:e.jsx(ve.span,{"data-state":as(w.checked),"data-disabled":w.disabled?"":void 0,...p,ref:S})})});ts.displayName=ss;var et="RadioBubbleInput",rs=n.forwardRef(({__scopeRadio:l,control:S,checked:m,bubbles:g=!0,...p},w)=>{const o=n.useRef(null),x=Me(o,w),C=Is(m),B=Rs(S);return n.useEffect(()=>{const i=o.current;if(!i)return;const v=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(v,"checked").set;if(C!==m&&f){const N=new Event("click",{bubbles:g});f.call(i,m),i.dispatchEvent(N)}},[C,m,g]),e.jsx(ve.input,{type:"radio","aria-hidden":!0,defaultChecked:m,...p,tabIndex:-1,ref:x,style:{...p.style,...B,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});rs.displayName=et;function as(l){return l?"checked":"unchecked"}var st=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ye="RadioGroup",[tt,qt]=Xe(ye,[Qe,Ze]),ns=Qe(),os=Ze(),[rt,at]=tt(ye),is=n.forwardRef((l,S)=>{const{__scopeRadioGroup:m,name:g,defaultValue:p,value:w,required:o=!1,disabled:x=!1,orientation:C,dir:B,loop:i=!0,onValueChange:v,...P}=l,f=ns(m),N=Ms(B),[A,D]=_s({prop:w,defaultProp:p??null,onChange:v,caller:ye});return e.jsx(rt,{scope:m,name:g,required:o,disabled:x,value:A,onValueChange:D,children:e.jsx(Us,{asChild:!0,...f,orientation:C,dir:N,loop:i,children:e.jsx(ve.div,{role:"radiogroup","aria-required":o,"aria-orientation":C,"data-disabled":x?"":void 0,dir:N,...P,ref:S})})})});is.displayName=ye;var ls="RadioGroupItem",ds=n.forwardRef((l,S)=>{const{__scopeRadioGroup:m,disabled:g,...p}=l,w=at(ls,m),o=w.disabled||g,x=ns(m),C=os(m),B=n.useRef(null),i=Me(S,B),v=w.value===p.value,P=n.useRef(!1);return n.useEffect(()=>{const f=A=>
1{st.includes(A.key)&&(P.current=!0)},N=()=>P.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",N),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",N)}},[]),e.jsx(Ts,{asChild:!0,...x,focusable:!o,active:v,children:e.jsx(es,{disabled:o,required:w.required,checked:v,...C,...p,name:w.name,ref:i,onCheck:()=>w.onValueChange(p.value),onKeyDown:Ue(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:Ue(p.onFocus,()=>{var f;P.current&&((f=B.current)==null||f.click())})})})});ds.displayName=ls;var nt="RadioGroupIndicator",cs=n.forwardRef((l,S)=>{const{__scopeRadioGroup:m,...g}=l,p=os(m);return e.jsx(ts,{...p,...g,ref:S})});cs.displayName=nt;var ms=is,us=ds,ot=cs;const ps=n.forwardRef(({className:l,...S},m)=>e.jsx(ms,{className:M("grid gap-2",l),...S,ref:m}));ps.displayName=ms.displayName;const xs=n.forwardRef(({className:l,...S},m)=>e.jsx(us,{ref:m,className:M("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",l),...S,children:e.jsx(ot,{className:"flex items-center justify-center",children:e.jsx(Bs,{className:"h-2.5 w-2.5 fill-current text-current"})})}));xs.displayName=us.displayName;const hs={role:"assistant",content:"Hey — I'm your Studio producer. Tell me what you want to shoot: the product or story, where it lives, and any must-have moments. I'll draft the scenes as we go, then you can review and lock them in."},it=hs;function lt({selectedTalents:l,destination:S,brandColors:m,scenes:g,onScenesChange:p,showScenesPanel:w=!0,messages:o,onMessagesChange:x}){const[C,B]=n.useState([it]),i=o??C,v=c=>{const I=typeof c=="function"?c(i):c;x?x(I):B(I)},[P,f]=n.useState(""),[N,A]=n.useState(!1),D=n.useRef(null),J=n.useRef(null);n.useEffect(()=>{var c;(c=D.current)==null||c.scrollTo({top:D.current.scrollHeight,behavior:"smooth"})},[i,N]),n.useEffect(()=>{var c;(c=J.current)==null||c.focus()},[]);const W=n.useMemo(()=>l.map(c=>({id:c.id,name:c.name})),[l]),te=async()=>{var z;const c=P.trim();if(!c||N)return;const I=[...i,{role:"user",content:c}];v(I),f(""),A(!0);try{const{data:h,error:X}=await Ne.functions.invoke("studio-brief-producer",{body:{messages:I,selectedTalents:W,currentScenes:g,destination:S,brandColors:m}});if(X)throw X;const $=String((h==null?void 0:h.reply)??"").trim(),E=(Array.isArray(h==null?void 0:h.scenes)?h.scenes:[]).map((U,q)=>{const de=g.find(O=>O.id===U.id),Q=g[q],K=de??Q,G=Array.isArray(U.suggestedTalentIds)?U.suggestedTalentIds:[],ce=K&&K.talentIds.length>0?K.talentIds:G.length>0?G:W.map(O=>O.id);return{id:(K==null?void 0:K.id)??U.id,title:String(U.title??"").trim(),description:String(U.description??"").trim(),talentIds:ce,productUsage:String(U.productUsage??"").trim()||void 0}});v(U=>[...U,{role:"assistant",content:$||"Got it."}]),E.length>0&&p(E)}catch(h){console.error(h),V.error((h==null?void 0:h.message)||"Couldn't reach the producer just now."),v(X=>X.slice(0,-1)),f(c)}finally{A(!1),(z=J.current)==null||z.focus()}},we=c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),te())};return e.jsxs("div",{className:M("grid gap-4 border rounded-lg bg-card overflow-hidden",w&&"md:grid-cols-[1fr_320px]"),children:[e.jsxs("div",{className:"flex flex-col min-h-[420px]",children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b bg-muted/40",children:[e.jsx(Te,{className:"w-4 h-4 text-brand-orange"}),e.jsx("div",{className:"text-sm font-medium",children:"Chat with your producer"})]}),e.jsxs("div",{ref:D,className:"flex-1 overflow-y-auto px-4 py-4 space-y-4 max-h-[440px]",children:[i.map((c,I)=>e.jsxs("div",{className:M("flex gap-2",c.role==="user"?"justify-end":"justify-start"),children:[c.role==="assistant"&&e.jsx("div",{className:"w-7 h-7 shrink-0 rounded-full bg-brand-orange/10 flex items-center justify-center",children:e.jsx(Te,{className:"w-3.5 h-3.5 text-brand-orange"})}),e.jsx("div",{className:M("text-sm leading-relaxed whitespace-pre-wrap max-w-[85%]",c.role==="user"?"bg-primary text-primary-foreground rounded-2xl rounded-tr-sm px-3 py-2":"text-foreground"),children:c.content}),c.role==="user"&&e.jsx("div",{className:"w-7 h-7 shrink-0 rounded-full bg-muted flex items-center justify-center",children:e.jsx(zs,{className:"w-3.5 h-3.5 text-muted-foreground"})})]},I)),N&&e.jsx("div",{className:"text-xs text-muted-foreground animate-pulse pl-9",children:"Producer is thinking…"})]}),e.jsxs("div",{className:"border-t p-2 flex items-end gap-2",children:[e.jsx(le,{ref:J,value:P,onChange:c=>f(c.target.value),onKeyDown:we,placeholder:"Tell the producer what you want to shoot…",rows:2,className:"resize-none text-sm"}),e.jsx(_,{type:"button",onClick:te,disabled:N||!P.trim(),size:"icon",className:"shrink-0","aria-label":"Send",children:e.jsx(qs,{className:"w-4 h-4"})})]})]}),w&&e.jsxs("div",{className:"border-t md:border-t-0 md:border-l bg-muted/20 flex flex-col",children:[e.jsxs("div",{className:"px-4 py-3 border-b flex items-center justify-between",children:[e.jsx("div",{className:"text-sm font-medium",children:"Scenes so far"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:g.length})]}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-2 max-h-[480px]",children:g.length===0?e.jsx("p",{className:"text-xs text-muted-foreground px-1 py-4",children:"As you chat, your producer will build a list of scenes here. You'll review and edit them below before submitting."}):g.map((c,I)=>{const z=l.filter(h=>c.talentIds.includes(h.id));return e.jsxs("div",{className:"rounded-md border bg-card p-3 space-y-1.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(H,{className:"w-3.5 h-3.5 text-brand-orange"}),e.jsxs("div",{className:"text-xs font-medium",children:["Scene ",I+1,c.title?` · ${c.title}`:""]})]}),e.jsx("p",{className:"text-xs text-muted-foreground line-clamp-3",children:c.description}),z.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1 pt-1",children:z.map(h=>e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full bg-muted",children:[h.profileImageUrl&&e.jsx("img",{src:h.profileImageUrl,alt:"",className:"w-3.5 h-3.5 rounded-full object-cover"}),h.name.split(" ")[0]]}
1,h.id))}),c.productUsage&&e.jsxs("p",{className:"text-[11px] text-muted-foreground/90 italic",children:["Product/wardrobe: ",c.productUsage]})]},c.id)})})]})]})}const Ee=()=>crypto.randomUUID(),Je=[{id:"essentials",label:"Essentials",priceCents:22e3,totalStills:12,tagline:"12 stills · perfect for a single campaign moment"},{id:"signature",label:"Signature",priceCents:59900,totalStills:36,tagline:"36 stills · full campaign coverage across placements"}],F=3,Ae=l=>`$${(l/100).toFixed(l%100===0?0:2)}`;function Kt(){Ps(),Es();const[l,S]=n.useState(0),[m]=n.useState(()=>Ee()),{talents:g=[]}=$s(),[p,w]=n.useState(null),[o,x]=n.useState([{id:Ee(),title:"",description:"",talentIds:[],stillsCount:F}]),[C,B]=n.useState(null),i=n.useMemo(()=>Je.find(s=>s.id===C),[C]),v=n.useMemo(()=>o.filter(s=>s.description.trim().length>5).reduce((s,t)=>s+(Number(t.stillsCount)||0),0),[o]),[P,f]=n.useState(!1);n.useEffect(()=>{if(l!==3||!C||!i||P)return;const s=o.filter(j=>j.description.trim().length>5).map(j=>j.id),t=s.length;if(t===0)return;const a=i.totalStills,r=Math.floor(a/t),d=a-r*t,y=new Map;s.forEach((j,b)=>{y.set(j,Math.max(F,r+(b<d?1:0)))}),x(j=>j.some(k=>y.has(k.id)&&y.get(k.id)!==k.stillsCount)?j.map(k=>y.has(k.id)?{...k,stillsCount:y.get(k.id)}:k):j)},[l,C,i,P,o]);const N=n.useMemo(()=>o.filter(s=>s.description.trim().length>5).length,[o]);n.useEffect(()=>{f(!1)},[C,N]);const A=n.useMemo(()=>{const s=new Set;return o.forEach(t=>(t.talentIds??[]).forEach(a=>s.add(a))),Array.from(s)},[o]),D=n.useMemo(()=>{const s=new Map(g.map(t=>[t.id,t]));return A.map(t=>s.get(t)).filter(Boolean)},[A,g]),J=n.useMemo(()=>new Map(g.map(t=>[t.id,t])),[g]),[W,te]=n.useState("chat"),[we,c]=n.useState([hs]),[I,z]=n.useState([]),[h,X]=n.useState(""),[$,De]=n.useState("digital"),[E,U]=n.useState(["#000000"]),[q,de]=n.useState(null),[Q,K]=n.useState(""),[G,ce]=n.useState(null),[O,Se]=n.useState(!1),[gs,me]=n.useState(!1),Fe=n.useRef(null),[L,fs]=n.useState({}),ue=n.useMemo(()=>Object.values(L).some(s=>(s==null?void 0:s.product)||(s==null?void 0:s.wardrobe)),[L]),[pe,js]=n.useState(!1),[Ge,bs]=n.useState(!1),[re,Le]=n.useState(""),[ae,Ns]=n.useState(""),[$e,vs]=n.useState(""),[Oe,ze]=n.useState(null),ys=async s=>{var a;const t=s.trim();if(t.length<3)return V.error("Add a few words first — even bullets work."),null;try{const{data:r,error:d}=await Ne.functions.invoke("enhance-prompt",{body:{prompt:t,mode:"image"}});if(d)throw d;const y=(a=r==null?void 0:r.prompt)==null?void 0:a.trim();if(!y)throw new Error("No output");return y}catch(r){return V.error((r==null?void 0:r.message)||"Couldn't enhance right now."),null}},ws=async s=>{const t=o.find(r=>r.id===s);if(!t)return;ze(s);const a=await ys(t.description);ze(null),a&&x(r=>r.map(d=>d.id===s?{...d,description:a}:d))},[Ce,qe]=n.useState(null),[Ke,ke]=n.useState(!1),Ss=n.useMemo(()=>{if(l===0){const s=o.filter(t=>t.description.trim().length>5);return!(s.length===0||!s.every(t=>(t.talentIds??[]).length>=1&&(t.talentIds??[]).length<=2)||ue&&!pe)}return l===1?!!$:l===2?E.length>=1:!0},[l,o,$,E,ue,pe]),xe=["What are we shooting?","Where's it going?","Your brand","Review & pay"];async function Cs(){if(!ae||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(ae)){V.error("Please enter a valid email so we can reach you about your brief.");return}ke(!0);try{const t=async(u,R)=>{if(!u)return null;const ee=u.name.split(".").pop(),ge=`${m}/${R}-${Date.now()}.${ee}`,{error:Re}=await Ne.storage.from("studio-briefs").upload(ge,u,{upsert:!1});if(Re)throw console.warn(`${R} upload failed`,Re),new Error(`Couldn't upload ${R.replace(/-/g," ")} — ${Re.message}`);return ge},a=await t(q,"brand-guidelines"),r=O?await t(G,"brand-logo"):null,d=[];for(let u=0;u<I.length;u++){const R=await t(I[u],`inspiration-${u}`);R&&d.push(R)}const y=[],j=new Set(o.filter(u=>u.description.trim()).map(u=>u.id)),b=Object.keys(L).filter(u=>{var R,ee;return!j.has(u)&&(((R=L[u])==null?void 0:R.product)||((ee=L[u])==null?void 0:ee.wardrobe))});if(b.length>0){console.warn("[studio-intake] orphaned scene file state",b),V.error("Some scene references got detached from their scene — please re-attach them and try again."),ke(!1);return}for(const u of o){if(!u.description.trim())continue;const R=L[u.id],ee=R!=null&&R.product?await t(R.product,`scene-${u.id}-product`):null,ge=R!=null&&R.wardrobe?await t(R.wardrobe,`scene-${u.id}-wardrobe`):null;y.push({...u,product_path:ee,wardrobe_path:ge})}const k=y.find(u=>u.product_path),ne=y.find(u=>u.wardrobe_path),he=(k==null?void 0:k.product_path)||null,Ie=(ne==null?void 0:ne.wardrobe_path)||null,oe={id:m,talent_ids:A,scenes:y,vibe_mode:!1,vibe_description:null,destination:$,brand_colors:E,brand_item_path:he,brand_item_mode:he?"feature":null,wardrobe_item_path:Ie,references_permission_confirmed:ue&&pe,brand_guidelines_path:a,brand_guidelines_url:Q.trim()||null,brand_logo_path:r,brand_logo_permission_confirmed:!!r&&O,brand_notes:re||null,inspiration_paths:d,inspiration_url:h.trim()||null,package:i.id,package_total_stills:i.totalStills},{data:Z,error:ie}=await Ne.functions.invoke("create-studio-checkout",{body:{brief:oe,returnPath:`/studio/${m}/confirmation`,guestEmail:ae.trim().toLowerCase(),guestName:$e.trim()||void 0}});if(ie)throw ie;if(!(Z!=null&&Z.clientSecret))throw new Error("No checkout secret returned");qe(Z.clientSecret)}catch(t){V.error(t.message||"Could not start checkout.")}finally{ke(!1)}}return e.jsxs("div",{className:"bg-brand-cream/30",children:[e.jsx(As,{title:"Start your brief — Trueth Studio",description:"Build your Trueth Studio brief. Brand-specific stills cropped to 16:9 and 9:16, delivered by a Trueth creator."}),e.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[e.jsxs("div",{className:"mb-10",children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-brand-orange font-heading mb-3",children:"Trueth Studio"}),e.jsx("h1",{className:"font-heading text-4xl md:text-5xl text-brand-charcoal mb-4",children:"Build your brief"}),e.jsx("p",{className:"text-brand-charcoal/70",children:"Tell us who and what to shoot. A Studio creator will take it from there and deliver your stills — cropped to 16:9 and 9:16 for every placement — in your private review portal."})]}),e.jsx("div",{className:"flex items-center gap-2 mb-8",children:xe.map((s,t)=>e.jsx("div",{className:M("flex-1 h-1 rounded-full",t<=l?"bg-primary":"bg-muted")},t))}),e.jsxs("p",{className:"text-sm font-medium mb-6",children:["Step ",l+1," of ",xe.length,": ",xe[l]]}),e.jsx(Os,{open:!!p,onOpenChange:s=>{s||w(null)},initialTalents:(()=>{const s=o.find(a=>a.id===p);return((s==null?void 0:s.talentIds)??[]).map(a=>
1J.get(a)).filter(Boolean).map(a=>{var r;return{id:a.id,name:a.display_name||a.name,profileImageUrl:a.profile_image_url||((r=a.sample_image_urls)==null?void 0:r[0])||void 0,visualDescription:a.visual_description||void 0}})})(),onConfirm:s=>{const t=s.slice(0,2).map(r=>r.id),a=p;a&&x(r=>r.map(d=>d.id===a?{...d,talentIds:t}:d))},maxSelections:2}),l===0&&e.jsxs("div",{className:"space-y-6",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:"Describe each scene, cast up to 2 talent per scene (they can be different for every scene), and attach any product, wardrobe, or inspiration references."}),e.jsxs("div",{className:"inline-flex p-1 rounded-lg border bg-muted/40",children:[e.jsxs("button",{type:"button",onClick:()=>te("chat"),className:M("flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md transition-colors",W==="chat"?"bg-background shadow-sm font-medium":"text-muted-foreground"),children:[e.jsx(Ks,{className:"w-3.5 h-3.5"})," Chat with Producer"]}),e.jsxs("button",{type:"button",onClick:()=>te("manual"),className:M("flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md transition-colors",W==="manual"?"bg-background shadow-sm font-medium":"text-muted-foreground"),children:[e.jsx(Hs,{className:"w-3.5 h-3.5"})," Manual"]})]}),W==="chat"&&e.jsx(lt,{selectedTalents:D.map(s=>{var t;return{id:s.id,name:s.display_name||s.name,profileImageUrl:s.profile_image_url||((t=s.sample_image_urls)==null?void 0:t[0])||void 0}}),destination:$,brandColors:E,scenes:o.map(s=>({id:s.id,title:s.title,description:s.description,talentIds:s.talentIds??[],productUsage:s.productUsage})),onScenesChange:s=>{const t=new Map(o.map(r=>[r.id,r])),a=s.map(r=>{var d;return{id:r.id,title:r.title||"",description:r.description||"",talentIds:Array.isArray(r.talentIds)?r.talentIds.slice(0,2):[],productUsage:r.productUsage||void 0,stillsCount:((d=t.get(r.id))==null?void 0:d.stillsCount)??F}});x(a.length>0?a:o)},showScenesPanel:!1,messages:we,onMessagesChange:c}),e.jsxs("div",{className:"space-y-3",children:[W==="chat"&&o.length>0&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Review, edit, and cast each scene before continuing."}),o.map((s,t)=>{const a=(s.talentIds??[]).map(r=>J.get(r)).filter(Boolean);return a.length>=2,e.jsxs("div",{className:"p-5 rounded-xl border border-border/60 bg-card shadow-sm space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(T,{children:["Scene ",t+1]}),o.length>1&&e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>x(o.filter(r=>r.id!==s.id)),children:e.jsx(Y,{className:"w-4 h-4"})})]}),e.jsx(se,{placeholder:"Scene title (optional)",value:s.title,onChange:r=>x(o.map(d=>d.id===s.id?{...d,title:r.target.value}:d))}),e.jsxs("div",{className:"relative",children:[e.jsx(le,{placeholder:"Describe this scene — bullets are fine, tap the wand to polish.",value:s.description,onChange:r=>x(o.map(d=>d.id===s.id?{...d,description:r.target.value}:d)),rows:3,className:"pr-12"}),e.jsx(_,{type:"button",variant:"ghost",size:"icon",className:"absolute top-2 right-2 h-8 w-8 text-brand-orange hover:text-brand-orange hover:bg-brand-orange/10",onClick:()=>ws(s.id),disabled:Oe===s.id,title:"Enhance with AI",children:e.jsx(Te,{className:M("w-4 h-4",Oe===s.id&&"animate-pulse")})})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs(T,{className:"text-xs uppercase tracking-wide text-muted-foreground",children:["Talent in this scene ",e.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:["(",a.length,"/2)"]})]}),e.jsxs(_,{type:"button",variant:"ghost",size:"sm",onClick:()=>w(s.id),className:"h-7 px-2 text-xs text-muted-foreground hover:text-foreground",children:[e.jsx(_e,{className:"w-3 h-3 mr-1"})," ",a.length>0?"Edit cast":"Add talent"]})]}),a.length===0?e.jsx("p",{className:"text-[11px] text-destructive/80",children:"Pick 1-2 talent for this scene."}):e.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(r=>{var y,j;const d=r.display_name||r.first_name||r.name||"Talent";return e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-full text-xs border bg-primary text-primary-foreground border-primary",children:[(r.profile_image_url||((y=r.sample_image_urls)==null?void 0:y[0]))&&e.jsx("img",{src:r.profile_image_url||((j=r.sample_image_urls)==null?void 0:j[0]),alt:"",className:"w-4 h-4 rounded-full object-cover"}),String(d).split(" ")[0],e.jsx("button",{type:"button",onClick:()=>x(o.map(b=>b.id===s.id?{...b,talentIds:(b.talentIds??[]).filter(k=>k!==r.id)}:b)),className:"ml-0.5 hover:opacity-80","aria-label":`Remove ${d}`,children:e.jsx(Y,{className:"w-3 h-3"})})]},r.id)})})]}),(()=>{const r=L[s.id]||{},d=(j,b)=>fs(k=>({...k,[s.id]:{...k[s.id]||{},[j]:b}})),y=({kind:j,title:b,helper:k,accentClass:ne,iconBgClass:he,iconColorClass:Ie})=>{const oe=r[j];return e.jsx("div",{className:"space-y-1.5",children:oe?e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-card",children:[e.jsx("img",{src:URL.createObjectURL(oe),alt:"",className:"w-14 h-14 roun
1ded-md object-cover border"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[11px] uppercase tracking-wide text-muted-foreground",children:b}),e.jsx("p",{className:"text-sm font-medium truncate",children:oe.name})]}),e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>d(j,null),"aria-label":`Remove ${b}`,children:e.jsx(Y,{className:"w-4 h-4"})})]}):e.jsxs("label",{className:M("group flex flex-col items-center justify-center gap-2 p-5 rounded-lg border-2 border-dashed cursor-pointer transition-colors bg-card/60",ne),children:[e.jsx("span",{className:M("flex items-center justify-center w-9 h-9 rounded-full",he),children:e.jsx(Pe,{className:M("w-4 h-4",Ie)})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:b}),e.jsx("span",{className:"text-[11px] text-muted-foreground text-center leading-snug",children:k}),e.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:Z=>{var ie;return d(j,((ie=Z.target.files)==null?void 0:ie[0])||null)}})]})})};return e.jsxs("div",{className:"pt-3 border-t border-border/60 space-y-2",children:[e.jsx(T,{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"References for this scene (optional)"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsx(y,{kind:"product",title:"Product image",helper:"Bottle, packaging, or hero product",accentClass:"border-brand-orange/40 hover:border-brand-orange hover:bg-brand-orange/5",iconBgClass:"bg-brand-orange/15 group-hover:bg-brand-orange/25",iconColorClass:"text-brand-orange"}),e.jsx(y,{kind:"wardrobe",title:"Wardrobe piece",helper:"Garment, accessory, or styling ref",accentClass:"border-brand-green/40 hover:border-brand-green hover:bg-brand-green/5",iconBgClass:"bg-brand-green/15 group-hover:bg-brand-green/25",iconColorClass:"text-brand-green"})]})]})})(),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(T,{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"How should the product or wardrobe be used? (optional)"}),e.jsx(le,{placeholder:"e.g. Hero holds the bottle at eye level, label facing camera. Or: wardrobe is styled casually, sleeves rolled.",value:s.productUsage??"",onChange:r=>x(o.map(d=>d.id===s.id?{...d,productUsage:r.target.value}:d)),rows:2})]})]},s.id)}),e.jsxs(_,{variant:"outline",onClick:()=>x([...o,{id:Ee(),title:"",description:"",talentIds:[],productUsage:"",stillsCount:F}]),children:[e.jsx(_e,{className:"w-4 h-4 mr-2"})," Add another scene"]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-2",children:"You'll pick a package and fine-tune stills-per-scene before payment."})]}),e.jsxs("div",{className:"pt-6 border-t space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium",children:"Inspiration & notes"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Optional — attach shared references and any final notes for the creator."})]}),ue&&e.jsxs("label",{className:"flex items-start gap-3 p-3 rounded border bg-muted/30 cursor-pointer",children:[e.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4",checked:pe,onChange:s=>js(s.target.checked)}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"I confirm I have permission and the necessary rights to use all uploaded product and wardrobe reference images across every scene in this brief."})]}),e.jsxs("div",{className:"space-y-3 pt-4 border-t",children:[e.jsx(T,{children:"Inspiration references"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload reference images or paste a link to your inspiration board (Pinterest, Figma, a mood board, etc.)."}),I.length>0&&e.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 gap-3",children:I.map((s,t)=>e.jsxs("div",{className:"relative aspect-square rounded-lg overflow-hidden border",children:[e.jsx("img",{src:URL.createObjectURL(s),alt:s.name,className:"w-full h-full object-cover"}),e.jsx("button",{type:"button",onClick:()=>z(I.filter((a,r)=>r!==t)),className:"absolute top-1 right-1 bg-black/70 hover:bg-black text-white rounded-full p-1","aria-label":"Remove",children:e.jsx(Y,{className:"w-3 h-3"})})]},t))}),e.jsxs("label",{className:"flex items-center justify-center gap-2 p-4 rounded-lg border-2 border-dashed cursor-pointer hover:bg-muted/30",children:[e.jsx(Pe,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm",children:"Upload reference images"}),e.jsx("input",{type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:s=>{const t=Array.from(s.target.files||[]);z(a=>[...a,...t].slice(0,12)),s.currentTarget.value=""}})]}),e.jsxs("div",{children:[e.jsx(T,{htmlFor:"inspiration-url",className:"text-xs text-muted-foreground font-normal",children:"Or paste an inspiration board link"}),e.jsx(se,{id:"inspiration-url",type:"url",placeholder:"https://pinterest.com/…",value:h,onChange:s=>X(s.target.value),className:"mt-1.5"})]})]}),e.jsxs("div",{children:[e.jsx(T,{children:"Notes (optional)"}),e.jsx(le,{value:re,onChange:s=>Le(s.target.value),placeholder:"Anything else the creator should know.",rows:3})]})]})]}),l===1&&e.jsx(ps,{value:$,onValueChange:De,children:["digital","print","both"].map(s=>e.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-lg border",children:[e.jsx(xs,{value:s,id:`dest-${s}`}),e.jsx("label",{htmlFor:`dest-${s}`,className:"flex-1 cursor-pointer capitalize font-medium",children:s})]},s))}),l===2&&e.jsxs("div",{className:"space-y-4",children:[e.jsx(T,{children:"Brand colors (up to 4)"}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[E.map((s,t)=>e.jsxs("div",{className:"flex items-center gap-2 p-2 rounded border",children:[e.jsx("input",{type:"color",value:s,onChange:a=>U(E.map((r,d)=>d===t?a.target.value:r)),className:"w-10 h-10 rounded cursor-pointer"}),e.jsx(se,{value:s,onChange:a=>U(E.map((r,d)=>d===t?a.target.value:r)),className:"w-24 font-mono text-sm"}),E.length>1&&e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>U(E.filter((a,r)=>r!==t)),children:e.jsx(Y,{className:"w-4 h-4"})})]},t)),E.length<4&&e.jsxs(_,{variant:"outline",onClick:()=>U([...E,"#000000"]),children:[e.jsx(_e,{className:"w-4 h-4 mr-2"})," Add color"]})]}),e.jsxs("div",{className:"space-y-3 pt-4 border-t",children:[e.jsx(T,{children:"Brand guidelines (optional)"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload a PDF or image with your brand guidelines."}),q?e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/30",children:[e.jsx(Ws,{className:"w-8 h-8 text-muted-foreground shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:q.name}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[(q.size/1024).toFixed(0)," KB"]}
1)]}),e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>de(null),children:e.jsx(Y,{className:"w-4 h-4"})})]}):e.jsxs("label",{className:"flex items-center justify-center gap-2 p-6 rounded-lg border-2 border-dashed cursor-pointer hover:bg-muted/30",children:[e.jsx(Pe,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm",children:"Upload brand guidelines (PDF, PNG, JPG)"}),e.jsx("input",{type:"file",accept:"application/pdf,image/*",className:"hidden",onChange:s=>{var t;return de(((t=s.target.files)==null?void 0:t[0])??null)}})]}),e.jsxs("div",{className:"pt-2",children:[e.jsx(T,{htmlFor:"brand-guidelines-url",className:"text-xs text-muted-foreground font-normal",children:"Or paste a link (Notion, Figma, Google Drive, etc.)"}),e.jsx(se,{id:"brand-guidelines-url",type:"url",placeholder:"https://…",value:Q,onChange:s=>K(s.target.value),className:"mt-1.5"})]})]}),e.jsxs("div",{className:"space-y-3 pt-4 border-t",children:[e.jsx(T,{children:"Brand logo (optional)"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"You must confirm you have explicit permission to use this logo."}),G&&O?e.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border bg-muted/30",children:[e.jsx("img",{src:URL.createObjectURL(G),alt:G.name,className:"w-16 h-16 object-contain rounded border bg-white"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:G.name}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Permission confirmed"})]}),e.jsx(_,{variant:"ghost",size:"sm",onClick:()=>{ce(null),Se(!1)},children:e.jsx(Y,{className:"w-4 h-4"})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(_,{variant:"outline",onClick:()=>{Se(!1),me(!0)},children:[e.jsx(Ys,{className:"w-4 h-4 mr-2"})," Upload brand logo"]}),e.jsx("input",{ref:Fe,type:"file",accept:"image/*",className:"hidden",onChange:s=>{var a;const t=((a=s.target.files)==null?void 0:a[0])??null;if(t&&!O){V.error("You must confirm permission before uploading a logo."),s.target.value="";return}ce(t)}})]})]}),e.jsxs("div",{className:"space-y-3 pt-4 border-t",children:[e.jsx(T,{htmlFor:"brand-logo-usage",children:"How should the logo be used?"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Tell us where the logo should appear in your shots — e.g. on a shirt, in the background, on product packaging, watermarked, etc."}),e.jsx(le,{id:"brand-logo-usage",placeholder:"e.g. The logo should be embroidered on the talent's shirt, visible but not the main focus. Also include a small logo bug in the bottom right corner of hero shots.",value:re,onChange:s=>Le(s.target.value),className:"min-h-[100px]"})]})]}),e.jsx(He,{open:gs,onOpenChange:me,children:e.jsxs(We,{className:"max-w-md",children:[e.jsx(Ye,{children:e.jsx(Ve,{children:"Confirm logo permission"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"By uploading this logo you confirm you have explicit written permission from the brand or trademark owner to use it in this shoot. Trueth may request proof of permission at any time."}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(_,{variant:"ghost",onClick:()=>me(!1),children:"Cancel"}),e.jsx(_,{onClick:()=>{Se(!0),me(!1),setTimeout(()=>{var s;return(s=Fe.current)==null?void 0:s.click()},50)},children:"I have permission — continue"})]})]})}),l===3&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium",children:"Pick your package"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose Essentials or Signature. We'll split the included stills evenly across your scenes, and you can fine-tune the allocation before paying. Every plan includes 3 rounds of edits and 16:9 + 9:16 crops."})]}),e.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:Je.map(s=>{const t=C===s.id,a=Math.floor(s.totalStills/F),r=N>a;return e.jsxs("button",{type:"button",onClick:()=>B(s.id),className:M("text-left p-5 rounded-lg border bg-card transition-colors relative",t?"border-primary ring-2 ring-primary/30":"hover:border-foreground
1/30"),children:[e.jsxs("div",{className:"flex items-start justify-between mb-1",children:[e.jsx("h4",{className:"font-serif text-lg",children:s.label}),e.jsxs("div",{className:"flex flex-col items-end gap-1",children:[t&&e.jsx("span",{className:"text-[10px] uppercase tracking-wider font-medium text-primary bg-primary/10 px-2 py-0.5 rounded-full",children:"Selected"}),e.jsx("div",{className:"text-2xl font-serif",children:Ae(s.priceCents)})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:s.tagline}),e.jsxs("ul",{className:"text-xs space-y-1.5 text-muted-foreground",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(H,{className:"w-3.5 h-3.5 mt-0.5 text-primary"})," Up to ",s.totalStills," stills across your scenes"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(H,{className:"w-3.5 h-3.5 mt-0.5 text-primary"})," 16:9 and 9:16 crops of every final still"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(H,{className:"w-3.5 h-3.5 mt-0.5 text-primary"})," 3 rounds of edits"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(H,{className:"w-3.5 h-3.5 mt-0.5 text-primary"})," 15-day lead time"]})]}),r&&e.jsxs("p",{className:"mt-3 text-xs text-destructive",children:["Fits up to ",a," scene",a===1?"":"s"," at ",F," stills each — you have ",N,"."]})]},s.id)})}),i&&v>i.totalStills&&e.jsxs("p",{className:"text-sm text-destructive",children:[i.label," includes ",i.totalStills," stills, but you've allocated ",v,".",N*F>i.totalStills?` Remove ${N-Math.floor(i.totalStills/F)} scene${N-Math.floor(i.totalStills/F)===1?"":"s"} (go back to Step 1) or choose Signature.`:" Reduce per-scene stills below or choose Signature."]}),e.jsxs("div",{className:"p-6 rounded-lg border bg-card",children:[e.jsxs("div",{className:"flex items-baseline justify-between mb-4",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-serif",children:["Trueth Studio",i?` · ${i.label}`:" · Pick a package"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i?`Up to ${i.totalStills} stills · 16:9 + 9:16 crops · 3 rounds of edits`:"Select Essentials or Signature above to continue."})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-3xl font-serif",children:i?Ae(i.priceCents):"—"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"one-time"})]})]}),e.jsxs("ul",{className:"text-sm space-y-2 text-muted-foreground",children:[e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(H,{className:"w-4 h-4 mt-0.5 text-primary"})," ",A.length," talent cast"]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(H,{className:"w-4 h-4 mt-0.5 text-primary"})," ",`${o.filter(s=>s.description.trim()).length} scene(s) · ${v} stills allocated`]}),e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx(H,{className:"w-4 h-4 mt-0.5 text-primary"})," Destination: ",$]})]})]}),e.jsxs("div",{className:"p-5 rounded-lg border bg-card space-y-3",children:[e.jsxs("div",{className:"flex items-baseline justify-between",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-sm",children:"Stills per scene"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:i?`Evenly split by default — adjust to give some scenes more coverage. Minimum ${F} per scene.`:"Pick a package above to split the included stills across your scenes."})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:M("text-sm font-medium tabular-nums",i&&v>i.totalStills?"text-destructive":"text-foreground"),children:[v,i?` / ${i.totalStills}`:""]}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"allocated"})]})]}),e.jsx("div",{className:"space-y-2",children:o.filter(s=>s.description.trim().length>5).map((s,t)=>{var y;const a=s.stillsCount||F,r=a>F,d=i?v<i.totalStills:!1;return e.jsxs("div",{className:"flex items-center gap-3 py-1.5",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("p",{className:"text-sm truncate",children:[e.jsxs("span",{className:"text-muted-foreground mr-1.5",children:["Scene ",t+1,"."]}),((y=s.title)==null?void 0:y.trim())||s.description.split(`
2`)[0].slice(0,60)]})}),e.jsxs("div",{className:"inline-flex items-center gap-2",children:[e.jsx(_,{type:"button",variant:"outline",size:"sm",className:"h-7 w-7 p-0",onClick:()=>{f(!0),x(j=>j.map(b=>b.id===s.id?{...b,stillsCount:Math.max(F,a-1)}:b))},disabled:!r,"aria-label":"Decrease stills",children:"−"}),e.jsx("span",{className:"min-w-[2ch] text-center text-sm font-medium tabular-nums",children:a}),e.jsx(_,{type:"button",variant:"outline",size:"sm",className:"h-7 w-7 p-0",onClick:()=>{f(!0),x(j=>j.map(b=>b.id===s.id?{...b,stillsCount:a+1}:b))},disabled:!d,"aria-label":"Increase stills",children:"+"})]})]},s.id)})}),i&&P&&e.jsx("button",{type:"button",className:"text-xs text-muted-foreground underline hover:text-foreground",onClick:()=>f(!1),children:"Reset to even split"})]}),e.jsxs(Ds,{type:"multiple",className:"rounded-lg border bg-card divide-y",children:[e.jsxs(fe,{value:"brief",className:"border-0 px-4",children:[e.jsx(je,{className:"text-sm font-medium",children:`Scenes (${o.filter(s=>s.description.trim()).length})`}),e.jsxs(be,{children:[e.jsx("ol",{className:"space-y-3 list-decimal list-inside",children:o.filter(s=>s.description.trim()).map(s=>{var a;const t=D.filter(r=>(s.talentIds??[]).includes(r.id));return e.jsxs("li",{className:"text-sm",children:[s.title&&e.jsxs("span",{className:"font-medium",children:[s.title,": "]}),e.jsx("span",{className:"text-muted-foreground whitespace-pre-wrap",children:s.description}),t.length>0&&e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:["Cast: ",t.map(r=>
2r.display_name||r.first_name||r.name).join(", ")]}),((a=s.productUsage)==null?void 0:a.trim())&&e.jsxs("div",{className:"mt-0.5 text-xs text-muted-foreground italic",children:["Product/wardrobe: ",s.productUsage]})]},s.id)})}),(I.length>0||h.trim())&&e.jsxs("div",{className:"mt-3 pt-3 border-t space-y-2",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Inspiration"}),I.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:I.map((s,t)=>e.jsx("img",{src:URL.createObjectURL(s),alt:"",className:"w-12 h-12 object-cover rounded border"},t))}),h.trim()&&e.jsx("p",{className:"text-sm text-muted-foreground break-all",children:h})]})]})]}),e.jsxs(fe,{value:"destination",className:"border-0 px-4",children:[e.jsx(je,{className:"text-sm font-medium",children:"Destination"}),e.jsx(be,{children:e.jsx("p",{className:"text-sm text-muted-foreground capitalize",children:$})})]}),e.jsxs(fe,{value:"brand",className:"border-0 px-4",children:[e.jsx(je,{className:"text-sm font-medium",children:"Brand"}),e.jsx(be,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground mb-1",children:"Colors"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:E.map((s,t)=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-5 h-5 rounded border",style:{backgroundColor:s}}),e.jsx("span",{className:"text-xs font-mono",children:s})]},t))})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["Brand guidelines: ",q?q.name:Q.trim()?Q.trim():"none"]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["Brand logo: ",G&&O?`${G.name} (permission confirmed)`:"none"]})]})})]}),e.jsxs(fe,{value:"refs",className:"border-0 px-4",children:[e.jsx(je,{className:"text-sm font-medium",children:"References & notes"}),e.jsx(be,{children:e.jsxs("div",{className:"space-y-3",children:[(()=>{const s=o.filter(t=>{var a,r;return((a=L[t.id])==null?void 0:a.product)||((r=L[t.id])==null?void 0:r.wardrobe)}).map((t,a)=>({s:t,idx:a,files:L[t.id]}));return s.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No product or wardrobe references."}):s.map(({s:t,idx:a,files:r})=>e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("p",{className:"text-xs font-medium",children:["Scene ",a+1,t.title?` · ${t.title}`:""]}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[r.product&&e.jsxs("div",{className:"flex items-center gap-2 p-2 rounded border",children:[e.jsx("img",{src:URL.createObjectURL(r.product),alt:"Product",className:"w-12 h-12 object-cover rounded"}),e.jsxs("div",{className:"text-xs",children:[e.jsx("p",{className:"font-medium",children:"Product"}),e.jsx("p",{className:"text-muted-foreground truncate max-w-[140px]",children:r.product.name})]})]}),r.wardrobe&&e.jsxs("div",{className:"flex items-center gap-2 p-2 rounded border",children:[e.jsx("img",{src:URL.createObjectURL(r.wardrobe),alt:"Wardrobe",className:"w-12 h-12 object-cover rounded"}),e.jsxs("div",{className:"text-xs",children:[e.jsx("p",{className:"font-medium",children:"Wardrobe"}),e.jsx("p",{className:"text-muted-foreground truncate max-w-[140px]",children:r.wardrobe.name})]})]})]})]},t.id))})(),re&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground mb-1",children:"Notes"}),e.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:re})]})]})})]})]}),e.jsxs("div",{className:"p-6 rounded-lg border bg-card space-y-3",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium",children:"Where should we send updates?"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Studio briefs are handled separately from your Trueth account. We'll email you a secure link to your private review portal once a creator accepts."})]}),e.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(T,{htmlFor:"guest-name",children:"Your name"}),e.jsx(se,{id:"guest-name",value:$e,onChange:s=>vs(s.target.value),placeholder:"Jane Doe"})]}),e.jsxs("div",{children:[e.jsx(T,{htmlFor:"guest-email",children:"Email"}),e.jsx(se,{id:"guest-email",type:"email",value:ae,onChange:s=>Ns(s.target.value),placeholder:"[email protected]",required:!0})]})]})]}),e.jsxs("label",{className:"flex items-start gap-3 p-3 rounded border bg-muted/30 cursor-pointer",children:[e.jsx("input",{type:"checkbox",className:"mt-1 h-4 w-4",checked:Ge,onChange:s=>bs(s.target.checked)}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["I agree to the"," ",e.jsx("a",{href:"/terms",target:"_blank",rel:"noopener noreferrer",className:"underline text-foreground",children:"Terms and Conditions"}),"."]})]}),e.jsx(_,{size:"lg",className:"w-full",onClick:Cs,disabled:Ke||!ae||!Ge||!i||(i?v>i.totalStills:!1),children:Ke?"Preparing checkout…":i?`Pay ${Ae(i.priceCents)} and submit brief`:"Pick a package to continue"}),e.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Trueth will hold your payment for 48 hours while your brief is reviewed. If it isn't accepted by a creator, you'll be issued a full refund."})]}),e.jsxs("div",{className:"flex justify-between mt-10",children:[e.jsxs(_,{variant:"ghost",onClick:()=>S(Math.max(0,l-1)),disabled:l===0,children:[e.jsx(Vs,{className:"w-4 h-4 mr-2"})," Back"]}),l<xe.length-1&&e.jsxs(_,{onClick:()=>S(l+1),disabled:!Ss,children:["Next ",e.jsx(Js,{className:"w-4 h-4 ml-2"})]})]})]}),e.jsx(He,{open:!!Ce,onOpenChange:s=>!s&&qe(null),children:e.jsxs(We,{className:"max-w-2xl p-0 max-h-[90dvh] overflow-hidden flex flex-col force-light-theme",children:[e.jsx(Ye,{className:"p-6 pb-2 shrink-0",children:e.jsx(Ve,{children:"Complete your Studio brief"})}),Ce&&e.jsx("div",{className:"p-6 pt-2 overflow-y-auto flex-1 min-h-0",children:e.jsx(Fs,{stripe:Ls,options:{clientSecret:Ce},children:e.jsx(Gs,{className:"force-light-theme"})})})]})})]})}export{Kt 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.