1import{e,r as C,a as vs}from"./vendor-react-BsIZDGja.js";import{B as nt,E as ot,u as Ns,y as oe,F as lt,e as it,a as ct,g as Pe,G as dt,H as pt,I as mt,J as xt,K as ut,M as gt,N as ht,d as ft,t as E,L as Ce,C as us,O as yt}from"./index-BOKch6Y6.js";import{c as Cs}from"./vendor-query-CoZHtb0k.js";import{e as jt}from"./pptxExport-CsUgrhm4.js";import{a as bt}from"./vendor-clerk-BIGLA9lg.js";import{S as gs}from"./skeleton-C9mvYMqi.js";import{c as V}from"./createLucideIcon-BvKhkVn4.js";import{A as vt}from"./arrow-left-BVKehLxH.js";import{F as Nt}from"./file-down-CvJyQ64t.js";import{L as Be}from"./loader-circle-Bqryf2xq.js";import{m as Ct}from"./proxy-Cjx5t8I4.js";import{C as hs}from"./check-BDafCcBR.js";import{C as At}from"./copy-D6INIqtj.js";import{T as ge,P as we,S as Y,L as X,a as he,U as Te,b as be,c as es,M as wt,d as kt,C as St,e as Rt,E as Mt}from"./users-C2v03wsT.js";import{Z as pe}from"./zap-CeoDlq7A.js";import{F as Fe,T as As}from"./trending-up-TLJyk8yN.js";import{D as It}from"./download-DL1j5n7t.js";import{C as $t}from"./chevron-down-BepMgxNz.js";import{T as ws}from"./triangle-alert-DnQ7VUpf.js";import"./vendor-recharts-C4n2D9md.js";import"./vendor-gsap-a3sj5zmn.js";const Pt=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Bt=V("camera",Pt);const Ft=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ss=V("circle-play",Ft);const Tt=[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]],Dt=V("clapperboard",Tt);const _t=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],Et=V("film",_t);const Wt=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],ke=V("git-branch",Wt);const Jt=[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]],ks=V("headphones",Jt);const Lt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Kt=V("image",Lt);const Ht=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],Se=V("lightbulb",Ht);const Vt=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],Ot=V("map",Vt);const Gt=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]],Ut=V("megaphone",Gt);const zt=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Ss=V("mic",zt);const qt=[["path",{d:"M15.033 9.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56V7.648a.
1645.645 0 0 1 .967-.56z",key:"vbtd3f"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]],Qt=V("monitor-play",qt);const Yt=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],Rs=V("music",Yt);const Xt=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],Zt=V("newspaper",Xt);const er=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],He=V("pencil",er);const sr=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],ts=V("radio",sr);const tr=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ae=V("refresh-cw",tr);const rr=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],Ms=V("undo-2",rr);const ar=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],fs=V("video",ar);const nr=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],Is=V("volume-2",nr),je="#FF5C1A",$s=C.createContext(null);function or({strategyId:s,cardKey:i,children:a}){return e.jsx($s.Provider,{value:{strategyId:s,cardKey:i},children:a})}function ys(s,i,a){if(!s)return s;const l=(t,r)=>typeof r=="number"?Array.isArray(t)?[...t]:[]:{...t??{}},u=l(s.strategyJson,i[0]);let g=u,c=s.strategyJson;for(let t=0;t<i.length-1;t++){const r=i[t],m=i[t+1];c=c?.[r],g[r]=l(c,m),g=g[r]}return g[i[i.length-1]]=a,{...s,strategyJson:u}}function o({path:s,value:i,multiline:a,className:l,style:u,placeholder:g,as:c="span",label:t}){const r=C.useContext($s),m=Cs(),p=nt(),x=ot(),{isDark:y}=Ns(),w=y?"#ffffff":"#1A0500",B=S=>y?`rgba(255,255,255,${S})`:`rgba(26,5,0,${S})`,Q=y?"rgba(20,8,4,0.92)":"rgba(255,255,255,0.97)",P=y?"rgba(255,255,255,0.10)":"rgba(26,5,0,0.12)",K=y?"rgba(255,255,255,0.07)":"rgba(26,5,0,0.08)",I=y?"rgba(255,255,255,0.04)":"rgba(26,5,0,0.04)",te=y?"rgba(255,255,255,0.10)":"rgba(26,5,0,0.12)",Z=y?"0 20px 60px -12px rgba(0,0,0,0.6)":"0 8px 32px -8px rgba(0,0,0,0.12)",[U,G]=C.useState(!1),[O,W]=C.useState(i??""),[_,F]=C.useState("idle"),[me,de]=C.useState(!1),R=C.useRef(null),z=C.useRef(null),re=C.useRef(i??"");if(C.useEffect(()=>{U||(re.current=i??"")},[i,U]),C.useEffect(()=>()=>{R.current&&clearTimeout(R.current),z.current&&clearTimeout(z.current)},[]),!r)return e.jsx(e.Fragment,{children:i});const xe=[r.cardKey,...s],le=()=>{W(re.current),F("idle"),G(!0)},ae=()=>{G(!1),W(re.current)},ee=async()=>{if(O===re.current){G(!1);return}F("saving");try{await p.mutateAsync({id:r.strategyId,data:{path:xe,value:O}}),re.current=O,m.setQueryData(oe(r.strategyId),S=>ys(S,xe,O)),F("saved"),de(!0),G(!1),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>F("idle"),1600),R.current&&clearTimeout(R.current),R.current=setTimeout(()=>de(!1),6e3)}catch{F("error")}},ue=async S=>{S.stopPropagation();try{const ne=(await x.mutateAsync({id:r.strategyId,data:{path:xe}}))?.value??"";re.current=ne,W(ne),m.setQueryData(oe(r.strategyId),fe=>ys(fe,xe,ne)),de(!1),F("saved"),z.current&&clearTimeout(z.current),z.current=setTimeout(()=>F("idle"),1600)}catch{F("error")}},ie=c,$=re.current;return e.jsxs(e.Fragment,{children:[e.jsxs(ie,{className:`group/edit relative inline-block cursor-pointer ${l??""}`,style:{...u,cursor:"pointer"},onClick:le,title:"Click to edit",children:[$?.trim()?$:e.jsx("span",{style:{opacity:.35},children:g??"â"}),e.jsx(He,{className:"inline-block w-3 h-3 ml-1.5 align-middle opacity-0 group-hover/edit:opacity-50 transition-opacity"}),_==="saved"&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider ml-2 align-middle",style:{color:je},children:"Saved"}),_==="error"&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider ml-2 align-middle",style:{color:"#FF6B6B"},children:"Couldn't save"}),me&&e.jsx("button",{onClick:ue,className:"inline-flex items-center ml-1.5 align-middle opacity-70 hover:opacity-100",style:{color:B(.55)},title:"Undo last edit",children:e.jsx(Ms,{className:"w-3 h-3"})})]}),U&&vs.createPortal(e.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-[200] flex justify-center px-4 pb-6 pointer-events-none",onKeyDown:S=>{S.key==="Escape"&&ae(),(S.metaKey||S.ctrlKey)&&S.key==="Enter"&&(S.preventDefault(),ee())},children:e.jsxs("div",{className:"pointer-events-auto w-full max-w-3xl border",style:{background:Q,backdropFilter:"blur(24px)",borderColor:P,borderRadius:12,boxShadow:Z},children:[e.jsxs("div",{className:"flex items-center gap-4 px-6 pt-5 pb-4 border-b",style:{borderColor:K},children:[e.jsx("div",{className:"flex items-center justify-center w-9 h-9 shrink-0 border",style:{borderColor:`${je}40`,background:`${je}12`,borderRadius:8},children:e.jsx(He,{className:"w-4 h-4",style:{color:je}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-sm tracking-wide leading-none mb-1.5",style:{color:w},children:t??"Edit Text"}),e.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em]",style:{color:`${je}90`},children:_==="error"?"Couldn't save â try again":_==="saving"?"Savingâ¦":"No credits used"})]}),e.jsx("button",{onClick:ae,className:"font-mono text-[10px] uppercase tracking-widest px-3 py-1.5 border shrink-0 transition-colors",style:{borderColor:B(.14),color:B(.55),borderRadius:6},onMouseEnter:S=>{S.currentTarget.style.color=w,S.currentTarget.style.borderColor=B(.35)},onMouseLeave:S=>{S.currentTarget.style.color=B(.55),S.currentTarget.style.borderColor=B(.14)},children:"Cancel"})]}),e.jsxs("div",{className:"px-6 py-4 flex flex-col sm:flex-row sm:items-center gap-3",children:[a?e.jsx("textarea",{autoFocus:!0,rows:3,value:O,onChange:S=>W(S.target.value),placeholder:g,className:"flex-1 min-w-0 font-['JetBrains_Mono'] text-[13px] outline-none px-4 py-3 border resize-none transition-colors focus:border-orange-500/40",style:{background:I,borderColor:te,borderRadius:8,color:w}}
1):e.jsx("input",{autoFocus:!0,type:"text",value:O,onChange:S=>W(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),ee())},placeholder:g,className:"flex-1 min-w-0 font-['JetBrains_Mono'] text-[13px] outline-none px-4 py-3 border transition-colors focus:border-orange-500/40",style:{background:I,borderColor:te,borderRadius:8,color:w}}),e.jsxs("button",{onClick:ee,disabled:_==="saving",className:"font-mono text-[11px] uppercase tracking-widest px-5 py-3 flex items-center justify-center gap-2 shrink-0 transition-opacity hover:opacity-90",style:{background:je,color:"#fff",borderRadius:8,opacity:_==="saving"?.6:1,boxShadow:`0 8px 24px -8px ${je}80`},children:[e.jsx(He,{className:"w-3.5 h-3.5"})," ",_==="saving"?"Savingâ¦":"Save"]})]})]})}),document.body)]})}const lr=1500,ir=3e3,cr=4,dr={brand_experience:{eventIdentity:[{field:"eventIdentityKeyVisualImage",kind:"single"},{field:"eventIdentityElementImages",kind:"array"}],experienceArchitecture:[{field:"experienceArchitectureImages",kind:"record"}],activations:[{field:"activationImages",kind:"array"}],peakMoment:[{field:"peakMomentImage",kind:"single"}],wildcard:[{field:"cannesWildcardImage",kind:"single"}]},marketing:{contentPillars:[],campaignJourney:[{field:"marketingCampaignJourneyImages",kind:"array"}],channelPlays:[{field:"marketingChannelPlaysImages",kind:"array"}],heroMoment:[{field:"marketingHeroMomentImages",kind:"array"}],wildcard:[{field:"marketingCannesWildcardImage",kind:"single"}]},pr:{narrativeAngles:[],earnedMediaJourney:[{field:"prEarnedMediaJourneyImages",kind:"array"}],prPlays:[{field:"prPlaysImages",kind:"array"}],heroStunt:[{field:"prHeroStuntImages",kind:"array"}],wildcard:[{field:"prCannesWildcardImage",kind:"single"}]},tvc:{craftKit:[],filmCampaignJourney:[{field:"tvcFilmCampaignJourneyImages",kind:"array"}],filmFormats:[{field:"tvcFilmFormatsImages",kind:"array"}],heroFilm:[{field:"tvcHeroFilmImages",kind:"array"}],wildcard:[{field:"tvcCannesWildcardImage",kind:"single"}]},design:{identitySystem:[{field:"designIdentitySystemImage",kind:"single"}],designJourney:[{field:"designJourneyImages",kind:"array"}],applicationSuite:[{field:"designApplicationSuiteImages",kind:"array"}],heroApplication:[{field:"designCard14Images",kind:"array"}],wildcard:[{field:"designWildcardImage",kind:"single"}]},audio_ads:{},radio:{}};function Ve(s){return typeof s=="string"&&s.length>0}function pr(s,i,a){const l=dr[s]?.[i]??[];let u=0;for(const g of l){const c=a[g.field];if(g.kind==="single")Ve(c)&&(u+=1);else if(g.kind==="array")Array.isArray(c)&&(u+=c.filter(Ve).length);else if(g.kind==="record"&&c&&typeof c=="object")for(const t of Object.values(c))Array.isArray(t)&&(u+=t.filter(Ve).length)}return u}function mr(s,i,a){let l=0;for(const u of i){const g=pr(s,u,a),c=Math.min(g,cr);l+=lr+c*ir}return l}const xr=10,ur=14;function gr(s){return s>=xr&&s<=ur}function Ps(s,i){return i===void 0?s:`${s}:${i}`}function hr(s,i){const[a,l]=C.useState({}),u=C.useRef(null);return C.useEffect(()=>{if(!s||!i){l({});return}const g=new EventSource(`/api/strategies/${s}/image-stream`,{withCredentials:!0});return u.current=g,g.onmessage=c=>{try{const t=JSON.parse(c.data);if(t?.imageBase64&&t.field){const r=Ps(t.field,t.index);l(m=>({...m,[r]:`data:image/png;base64,${t.imageBase64}`}))}}catch{}},g.onerror=()=>{},()=>{g.close(),u.current=null}},[s,i]),{frames:a}}function De(s,i,a){return s[Ps(i,a)]}const n="#FF5C1A",Bs="rgba(255,255,255,0.55)",Fs=C.createContext({isDark:!0,BG:"#0D0200",FG:"#ffffff",fg:s=>"rgba(255,255,255,1)",GBORDER:"rgba(255,255,255,0.08)"}),Ts=()=>C.useContext(Fs),Ds=C.createContext({isDark:!0,fg:s=>`rgba(255,255,255,${s})`,WARM:"rgba(255,255,255,0.55)",cardBg:"rgba(255,255,255,0.02)",cardBdr:"rgba(255,255,255,0.06)"}),N=()=>C.useContext(Ds),fr="__IMAGE_GENERATION_FAILED__",yr="__IMAGE_GENERATION_DECLINED__";function J(s){return s?s===yr?"declined":s===fr?"failed":"ready":"loading"}function L({label:s,state:i,aspectRatio:a}){const{isDark:l,fg:u,WARM:g,cardBg:c,cardBdr:t}=N();return e.jsx("div",{className:"w-full flex flex-col items-center justify-center gap-2 text-center px-4",style:{aspectRatio:a,background:c,borderBottom:`1px solid ${u(.05)}`},children:i==="declined"?e.jsxs(e.Fragment,{children:[e.jsx(ws,{className:"w-4 h-4 shrink-0",style:{color:`${n}99`}}),e.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wide leading-relaxed",style:{color:`${n}99`},children:"Declined by image provider"})]}):s&&e.jsx("p",{className:"font-['Anton'] uppercase text-center text-xs",style:{color:"rgba(255,255,255,0.18)"},children:s})})}const Re=C.createContext({}),_s=C.createContext("presentation");function D({aspectRatio:s,field:i,index:a}){const{isDark:l,fg:u,WARM:g,cardBg:c,cardBdr:t}
1=N(),r=C.useContext(_s),m=C.useContext(Re);if(r==="strategy")return null;const p=i?De(m,i,a):void 0;return p?e.jsxs("div",{className:"relative overflow-hidden",style:{aspectRatio:s},children:[e.jsx("img",{src:p,alt:"Generating",className:"w-full h-full object-cover",style:{filter:"blur(1.5px)",animation:"strite-sharpen 0.6s ease-out forwards"}},p),e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{boxShadow:"inset 0 0 24px rgba(255,92,26,0.25)"}}),e.jsx("div",{className:"absolute inset-x-0 bottom-0 px-2 py-1 font-['JetBrains_Mono'] text-[9px] uppercase tracking-[0.15em]",style:{background:"rgba(0,0,0,0.55)",color:n},children:"Imagining"}),e.jsx("style",{children:` 2 @keyframes strite-sharpen { 3 from { filter: blur(6px); opacity: 0.6; } 4 to { filter: blur(1.5px); opacity: 1; } 5 } 6 `})]}):e.jsxs("div",{className:"img-particle-loader",style:{aspectRatio:s},children:[e.jsx("div",{className:"img-particle-loader__noise"}),e.jsx("span",{className:"img-particle-loader__label",children:"Imagining"})]})}const Ze=[{sec:5,credits:8e3},{sec:10,credits:18e3},{sec:15,credits:25e3}],Es=3e3,Ws=C.createContext(null),jr=[{scale:2,studioCreditsCost:3e3,label:"2à â 3,000 credits"},{scale:4,studioCreditsCost:6e3,label:"4à â 6,000 credits"}],Js=C.createContext(null);function Ne(s,i){return i==null?s:`${s}:${i}`}function br({state:s,error:i}){return s==="pending"?e.jsxs("div",{className:"flex items-center gap-2 px-5 py-3 border-b",style:{borderColor:"rgba(255,255,255,0.05)",background:"rgba(255,255,255,0.015)"},children:[e.jsx("div",{className:"w-3 h-3 rounded-full border-2 border-t-transparent animate-spin",style:{borderColor:`${n}60`,borderTopColor:"transparent"}}),e.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wide",style:{color:`${n}80`},children:"Rendering videoâ¦"})]}):e.jsx("div",{className:"flex items-center gap-2 px-5 py-3 border-b",style:{borderColor:"rgba(255,255,255,0.05)",background:"rgba(255,255,255,0.015)"},children:s==="declined"?e.jsxs(e.Fragment,{children:[e.jsx(ws,{className:"w-3.5 h-3.5 shrink-0",style:{color:`${n}99`}}),e.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wide",style:{color:`${n}99`},children:"Video declined by provider â token refunded"})]}):e.jsx("p",{className:"font-mono text-[10px] uppercase tracking-wide",style:{color:"rgba(255,255,255,0.25)"},children:i||"Video generation failed"})})}function vr(s){return s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60)||"asset"}async function Nr(s,i){try{const l=await(await fetch(s)).blob(),u=URL.createObjectURL(l),g=document.createElement("a");g.href=u,g.download=i,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(u)}catch{const a=document.createElement("a");a.href=s,a.download=i,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}function Oe({onClick:s,active:i,title:a,children:l}){return e.jsx("button",{type:"button",onClick:s,title:a,className:"flex items-center justify-center w-7 h-7 border transition-colors rounded-md",style:{borderColor:i?n:`${n}50`,background:i?"rgba(255,92,26,0.18)":"rgba(13,2,0,0.75)",color:n,backdropFilter:"blur(4px)"},children:l})}function js({anchorRef:s,open:i,alignRight:a=!1,children:l}){const[u,g]=C.useState({});return C.useEffect(()=>{if(i&&s.current){const c=s.current.getBoundingClientRect(),t={position:"fixed",bottom:window.innerHeight-c.top+4,zIndex:9999};a?t.right=window.innerWidth-c.right:t.left=c.left,g(t)}},[i,s]),i?vs.createPortal(e.jsx("div",{style:u,children:l}),document.body):null}function H({src:s,alt:i,aspectRatio:a,videoField:l,videoIndex:u,context:g}){const[c,t]=C.useState(!0),[r,m]=C.useState("video"),[p,x]=C.useState("original"),[y,w]=C.useState(5),[B,Q]=C.useState(!1),[P,K]=C.useState(!1),I=C.useRef(null),te=C.useRef(null),Z=C.useContext(Ws),U=C.useContext(Js),G=l?Ne(l,u):null,O=G?Z?.generatedVideos[G]:void 0,W=!!G&&!!Z?.pendingKeys.has(G),_=O?.status==="ready"&&!!O.videoUrl,F=!!G&&!!Z?.pendingRegenKeys.has(G),me=(Z?.totalCreditsAvailable??0)>=Es,de=Ze.find($=>$.sec===y).credits,R=(Z?.totalCreditsAvailable??0)>
6=de,z=U?.strategyJson,re=l!=null?Array.isArray(z?.[`${l}_2x`])?z[`${l}_2x`][u??0]:z?.[`${l}_2x`]:void 0,xe=l!=null?Array.isArray(z?.[`${l}_4x`])?z[`${l}_4x`][u??0]:z?.[`${l}_4x`]:void 0,le=re?`data:image/png;base64,${re}`:void 0,ae=xe?`data:image/png;base64,${xe}`:void 0;C.useEffect(()=>{ae&&p!=="4x"?x("4x"):le&&p==="original"&&x("2x")},[!!le,!!ae]);const ee=p==="4x"&&ae?ae:p==="2x"&&le?le:s,ue=vr(g||i||"strite-asset"),ie=_&&r==="video";return e.jsxs("div",{className:"relative w-full group",style:{aspectRatio:a},children:[e.jsx("div",{className:"absolute inset-0 overflow-hidden",children:ie?e.jsx("video",{src:O.videoUrl,controls:!0,playsInline:!0,preload:"metadata",className:"w-full h-full block",style:{objectFit:"cover",background:"#000"}}):e.jsx("img",{src:ee,alt:i,className:"w-full h-full block",style:{objectFit:"cover"}})}),e.jsxs("div",{className:"absolute top-2 right-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-100 transition-opacity",children:[(le||ae)&&!ie&&e.jsx("div",{className:"flex items-center rounded overflow-hidden border",style:{borderColor:"rgba(255,255,255,0.18)",background:"rgba(13,2,0,0.85)",backdropFilter:"blur(4px)"},children:["original",...le?["2x"]:[],...ae?["4x"]:[]].map($=>e.jsx("button",{type:"button",onClick:()=>x($),className:"px-2 py-1 font-mono text-[9px] uppercase tracking-wide transition-colors",style:{color:p===$?"#FF5C1A":"rgba(255,255,255,0.55)",background:p===$?"rgba(255,92,26,0.15)":"transparent"},children:$==="original"?"Orig":$},$))}),e.jsx(Oe,{title:ie?"Download video":"Download image",onClick:()=>Nr(ie?O.videoUrl:ee,ie?`${ue}.mp4`:p!=="original"?`${ue}_${p}.png`:`${ue}.png`),children:e.jsx(It,{className:"w-3.5 h-3.5"})})]}),_&&e.jsxs("div",{className:"absolute top-2 left-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-100 transition-opacity",children:[e.jsx(Oe,{title:"Show image",active:r==="image",onClick:()=>m("image"),children:e.jsx(Kt,{className:"w-3.5 h-3.5"})}),e.jsx(Oe,{title:"Show video",active:r==="video",onClick:()=>m("video"),children:e.jsx(fs,{className:"w-3.5 h-3.5"})})]}),l&&Z&&e.jsxs("div",{className:"absolute bottom-2 left-2 right-2 flex items-start justify-between flex-wrap-reverse gap-1.5 opacity-0 group-hover:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-100 transition-opacity",children:[e.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[e.jsxs("button",{type:"button",disabled:F||!me,onClick:()=>Z.requestRegenerate(l,u,g||i||""),title:me?"Regenerate this image · 3,000 credits":"Not enough credits â buy a pack or upgrade",className:"flex items-center gap-1.5 px-3 py-1.5 border font-mono text-[10px] uppercase tracking-wide rounded-md transition-colors disabled:opacity-50 disabled:cursor-not-allowed",style:{borderColor:"rgba(255,255,255,0.25)",background:"rgba(13,2,0,0.75)",color:"rgba(255,255,255,0.85)",backdropFilter:"blur(4px)"},children:[e.jsx(Ae,{className:`w-3.5 h-3.5 ${F?"animate-spin":""}`}),e.jsx("span",{className:"hidden sm:inline",children:F?"Regeneratingâ¦":me?"Regenerate · 3,000":"Not enough credits"})]}),U&&(()=>{const $=Ne(l,u),S=U.pendingUpscaleKeys.has($);return e.jsxs("div",{className:"relative",tabIndex:-1,onBlur:se=>{se.currentTarget.contains(se.relatedTarget)||K(!1)},children:[e.jsxs("button",{ref:I,type:"button",disabled:S,onClick:se=>{se.stopPropagation(),K(ne=>!ne)},title:"Upscale this image",className:"flex items-center gap-1 px-2 py-1.5 border font-mono text-[10px] uppercase tracking-wide rounded-md transition-colors disabled:opacity-50",style:{borderColor:"rgba(255,255,255,0.20)",background:"rgba(13,2,0,0.75)",color:"rgba(255,255,255,0.75)",backdropFilter:"blur(4px)"},children:[e.jsx(pe,{className:`w-3.5 h-3.5 ${S?"animate-pulse":""}`}),e.jsx("span",{className:"hidden sm:inline",children:S?"Upscalingâ¦":"Upscale"})]}),e.jsx(js,{anchorRef:I,open:P&&!S,children:e.jsx("div",{className:"rounded-md border overflow-hidden min-w-[160px]",style:{borderColor:"rgba(255,255,255,0.18)",background:"rgba(13,2,0,0.96)",backdropFilter:"blur(8px)"},children:jr.map(se=>{const ne=U.totalCreditsAvailable>=se.studioCreditsCost;return e.jsxs("button",{type:"button",disabled:!ne,onClick:()=>{K(!1),U.requestUpscale(l,u,se.scale)},title:ne?void 0:"Not enough credits â buy a pack or upgrade",className:"flex items-center justify-between w-full text-left font-mono text-[10px] tracking-wide px-3 py-2 transition-colors whitespace-nowrap gap-3 disabled:opacity-40 disabled:cursor-not-allowed",style:{color:ne?"rgba(255,255,255,0.85)":"rgba(255,255,255,0.35)",background:"transparent"},children:[e.jsx("span",{children:se.label}),!ne&&e.jsx("span",{className:"text-[9px]",style:{color:`${n}80`},children:"upgrade"})]},se.scale)})})})]})})()]}),!_&&(W||O?.status==="pending"?e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 border font-mono text-[10px] uppercase tracking-wide rounded-md",style:{borderColor:`${n}40`,background:"rgba(0,0,0,0.6)",color:n},children:[e.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"}),"Rendering videoâ¦"]}):e.jsxs("div",{className:"flex items-center gap-1 flex-wrap justify-end",children:[e.jsxs("div",{className:"relative",tabIndex:-1,onBlur:$=>{$.currentTarget.contains($.relatedTarget)||Q(!1)},children:[e.jsxs("button",{ref:te,type:"button",onClick:$=>{$.stopPropagation(),Q(S=>!S)},className:"flex items-center gap-1 font-mono text-[10px] tracking-wide rounded-md border px-2 py-1.5 outline-none",style:{borderColor:`${n}50`,background:"rgba(13,2,0,0.85)",color:n,backdropFilter:"blur(4px)"},children:[y,"s",e.jsx($t,{className:`w-3 h-3 transition-transform ${B?"rotate-180":""}`})]}
6),e.jsx(js,{anchorRef:te,open:B,alignRight:!0,children:e.jsx("div",{className:"rounded-md border overflow-hidden",style:{borderColor:`${n}50`,background:"rgba(13,2,0,0.95)",backdropFilter:"blur(4px)"},children:Ze.map($=>{const S=(Z?.totalCreditsAvailable??0)>=$.credits;return e.jsxs("button",{type:"button",disabled:!S,onClick:()=>{w($.sec),Q(!1)},className:"flex items-center justify-between w-full text-left font-mono text-[10px] tracking-wide px-2 py-1.5 transition-colors whitespace-nowrap gap-3 disabled:opacity-40 disabled:cursor-not-allowed",style:{color:S?$.sec===y?n:"rgba(255,255,255,0.7)":"rgba(255,255,255,0.35)",background:$.sec===y?"rgba(255,92,26,0.12)":"transparent"},children:[e.jsxs("span",{children:[$.sec,"s · ",$.credits.toLocaleString()]}),!S&&e.jsx("span",{className:"text-[9px]",style:{color:`${n}80`},children:"upgrade"})]},$.sec)})})})]}),e.jsxs("button",{type:"button",disabled:!R,onClick:()=>Z.requestVideo(l,u,g||i||"",y),title:R?void 0:"Not enough credits â buy a pack or upgrade",className:"flex items-center gap-1.5 px-3 py-1.5 border font-mono text-[10px] uppercase tracking-wide rounded-md transition-colors disabled:opacity-40 disabled:cursor-not-allowed",style:{borderColor:`${n}50`,background:"rgba(13,2,0,0.75)",color:n,backdropFilter:"blur(4px)"},children:[e.jsx(fs,{className:"w-3.5 h-3.5"}),R?`Generate video · ${de.toLocaleString()}`:"Not enough credits"]})]}))]}),l&&U&&(()=>{const $=Ne(l,u);return U.pendingUpscaleKeys.has($)?e.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",style:{background:"rgba(0,0,0,0.55)"},children:e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 border font-mono text-[10px] uppercase tracking-wide",style:{borderColor:"rgba(255,255,255,0.20)",background:"rgba(13,2,0,0.85)",color:"rgba(255,255,255,0.85)"},children:[e.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"}),"Upscalingâ¦"]})}):null})(),(O?.status==="declined"||O?.status==="failed")&&!W&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0",children:e.jsx(br,{state:O.status,error:O.error})}),c&&e.jsx("div",{className:"img-dissolve-mask",onAnimationEnd:()=>t(!1)})]})}const Cr=["titleSlide","objectives","targetAudience","problemStatement","strategicPillars","keyDifferentiators","creativePlatform","creativePillars","creativeTagline","visualMoodboard","eventIdentity","experienceArchitecture","activations","peakMoment","wildcard","awards"],Ar={titleSlide:{title:"Title Slide",icon:Y},objectives:{title:"Business Objectives",icon:be},targetAudience:{title:"Target Audience",icon:Te},problemStatement:{title:"Problem & Insight",icon:Se},strategicPillars:{title:"Strategic Pillars",icon:X},keyDifferentiators:{title:"Key Differentiators",icon:he},creativePlatform:{title:"Creative Platform",icon:pe},creativePillars:{title:"Creative Pillars",icon:X},creativeTagline:{title:"The Tagline",icon:Y},visualMoodboard:{title:"Combined Moodboard",icon:we},eventIdentity:{title:"Event Identity",icon:es},experienceArchitecture:{title:"Experience Architecture",icon:Ot},activations:{title:"Key Activations",icon:Fe},peakMoment:{title:"The Peak Moment",icon:Fe},wildcard:{title:"Cannes Wildcard",icon:pe,cannes:!0},awards:{title:"Award Categories",icon:ge}},wr=["titleSlide","objectives","targetAudience","problemStatement","strategicPillars","keyDifferentiators","campaignPlatform","creativePillars","campaignTagline","visualMoodboard","contentPillars","campaignJourney","channelPlays","heroMoment","wildcard","awards"],kr={titleSlide:{title:"Title Slide",icon:Y},objectives:{title:"Business Objectives",icon:be},targetAudience:{title:"Target Audience",icon:Te},problemStatement:{title:"Problem & Human Truth",icon:Se},strategicPillars:{title:"Strategic Pillars",icon:X},keyDifferentiators:{title:"Key Differentiators",icon:he},campaignPlatform:{title:"Campaign Platform",icon:pe},creativePillars:{title:"Creative Pillars",icon:X},campaignTagline:{title:"Campaign Tagline",icon:Y},visualMoodboard:{title:"Visual Moodboard",icon:we},contentPillars:{title:"Content Pillars",icon:ts},campaignJourney:{title:"Campaign Journey",icon:ke},channelPlays:{title:"Channel Plays",icon:As},heroMoment:{title:"Hero Moment",icon:Fe},wildcard:{title:"Cannes Wildcard",icon:pe,cannes:!0},awards:{title:"Award Categories",icon:ge}},Sr=["titleSlide","objectives","targetStakeholders","problemStatement","strategicPillars","keyDifferentiators","prPlatform","creativePillars","campaignTagline","visualMoodboard","narrativeAngles","earnedMediaJourney","prPlays","heroStunt","wildcard","awards"],Rr={titleSlide:{title:"Title Slide",icon:Y},objectives:{title:"Communication Objectives",icon:be},targetStakeholders:{title:"Target Stakeholders",icon:Te},problemStatement:{title:"Problem & News Hook",icon:Zt},strategicPillars:{title:"Strategic Pillars",icon:X},keyDifferentiators:{title:"Key Differentiators",icon:he}
6,prPlatform:{title:"PR Platform",icon:Ut},creativePillars:{title:"Creative Pillars",icon:X},campaignTagline:{title:"Campaign Tagline",icon:Y},visualMoodboard:{title:"Visual Moodboard",icon:we},narrativeAngles:{title:"Narrative Angles",icon:Ss},earnedMediaJourney:{title:"Earned Media Journey",icon:ke},prPlays:{title:"PR Plays",icon:As},heroStunt:{title:"Hero Stunt",icon:Fe},wildcard:{title:"Cannes PR Wildcard",icon:pe,cannes:!0},awards:{title:"Award Categories",icon:ge}},Mr=["titleSlide","objectives","targetListener","problemStatement","strategicPillars","keyDifferentiators","sonicPlatform","creativePillars","campaignTagline","sonicMoodboard","sonicIdentityKit","audioCampaignJourney","audioFormats","heroSpot","wildcard","awards"],Ir={titleSlide:{title:"Title Slide",icon:Y},objectives:{title:"Audio Objectives",icon:be},targetListener:{title:"Target Listener",icon:ks},problemStatement:{title:"Problem & Listener Truth",icon:Se},strategicPillars:{title:"Strategic Pillars",icon:X},keyDifferentiators:{title:"Key Differentiators",icon:he},sonicPlatform:{title:"Sonic Platform",icon:Is},creativePillars:{title:"Creative Pillars",icon:X},campaignTagline:{title:"Campaign Tagline",icon:Y},sonicMoodboard:{title:"Sonic Moodboard",icon:Rs},sonicIdentityKit:{title:"Sonic Identity Kit",icon:es},audioCampaignJourney:{title:"Audio Campaign Journey",icon:ke},audioFormats:{title:"Audio Formats",icon:ts},heroSpot:{title:"Hero Spot",icon:ss},wildcard:{title:"Cannes Audio Wildcard",icon:pe,cannes:!0},awards:{title:"Award Categories",icon:ge}},$r=["titleSlide","objectives","targetViewer","problemStatement","strategicPillars","keyDifferentiators","filmPlatform","creativePillars","campaignTagline","visualMoodboard","craftKit","filmCampaignJourney","filmFormats","heroFilm","wildcard","awards"],Pr={titleSlide:{title:"Title Slide",icon:Y},objectives:{title:"Film Objectives",icon:be},targetViewer:{title:"Target Viewer",icon:Qt},problemStatement:{title:"Problem & Human Truth",icon:Se},strategicPillars:{title:"Strategic Pillars",icon:X},keyDifferentiators:{title:"Key Differentiators",icon:he},filmPlatform:{title:"Film Platform",icon:Et},creativePillars:{title:"Creative Pillars",icon:X},campaignTagline:{title:"Campaign Tagline",icon:Y},visualMoodboard:{title:"Visual Moodboard",icon:we},craftKit:{title:"Craft Kit",icon:Dt},filmCampaignJourney:{title:"Film Campaign Journey",icon:ke},filmFormats:{title:"Film Formats",icon:Bt},heroFilm:{title:"Hero Film",icon:ss},wildcard:{title:"Cannes Film Wildcard",icon:pe,cannes:!0},awards:{title:"Award Categories",icon:ge}},Br=["titleSlide","objectives","targetAudience","problemStatement","strategicPillars","keyDifferentiators","designPlatform","creativePillars","designLine","visualMoodboard","identitySystem","designJourney","applicationSuite","heroApplication","wildcard","awards"],Fr={titleSlide:{title:"Title Slide",icon:Y},objectives:{title:"Design Objectives",icon:be},targetAudience:{title:"Target Audience",icon:Te},problemStatement:{title:"Problem & Visual Truth",icon:Mt},strategicPillars:{title:"Strategic Pillars",icon:X},keyDifferentiators:{title:"Key Differentiators",icon:he},designPlatform:{title:"Design Platform",icon:Rt},creativePillars:{title:"Creative Pillars",icon:X},designLine:{title:"The Design Line",icon:Y},visualMoodboard:{title:"Visual Moodboard",icon:we},identitySystem:{title:"Identity System",icon:es},designJourney:{title:"Design Journey",icon:St},applicationSuite:{title:"Application Suite",icon:kt},heroApplication:{title:"Hero Application",icon:wt},wildcard:{title:"D&AD Wildcard",icon:pe,cannes:!0},awards:{title:"Award Categories",icon:ge}},Tr=["titleSlide","objectives","targetListener","problemStatement","strategicPillars","keyDifferentiators","radioPlatform","creativePillars","campaignTagline","radioSonicMoodboard","radioVoiceKit","radioCampaignJourney","radioFormats","heroSpot","wildcard","awards"],Dr={titleSlide:{title:"Title Slide",icon:Y},objectives:{title:"Radio Objectives",icon:be},targetListener:{title:"Target Listener",icon:ks},problemStatement:{title:"Problem & Listener Truth",icon:Se},strategicPillars:{title:"Strategic Pillars",icon:X},keyDifferentiators:{title:"Key Differentiators",icon:he}
6,radioPlatform:{title:"Radio Platform",icon:ts},creativePillars:{title:"Creative Pillars",icon:X},campaignTagline:{title:"Campaign Tagline",icon:Y},radioSonicMoodboard:{title:"Sonic Moodboard",icon:Rs},radioVoiceKit:{title:"Radio Voice Kit",icon:Ss},radioCampaignJourney:{title:"Radio Campaign Journey",icon:ke},radioFormats:{title:"Radio Formats",icon:Is},heroSpot:{title:"Hero Spot",icon:ss},wildcard:{title:"Cannes Radio Wildcard",icon:pe,cannes:!0},awards:{title:"Award Categories",icon:ge}};function _r(s){return s==="marketing"?wr:s==="pr"?Sr:s==="audio_ads"?Mr:s==="tvc"?$r:s==="radio"?Tr:s==="design"?Br:Cr}function Er(s){return s==="marketing"?kr:s==="pr"?Rr:s==="audio_ads"?Ir:s==="tvc"?Pr:s==="radio"?Dr:s==="design"?Fr:Ar}function Wr({cardKey:s,index:i,meta:a,onCopy:l,copiedKey:u,children:g,regenerable:c,selected:t,onToggleSelect:r,onRevert:m,canRevert:p,isRegenerating:x}){const{isDark:y}=Ts(),w=te=>y?`rgba(255,255,255,${te})`:`rgba(26,5,0,${te})`,B=y?"rgba(255,255,255,0.55)":"rgba(26,5,0,0.65)",Q=y?"#0d0b0a":"#f9f6f3",P=y?"rgba(255,255,255,0.07)":"rgba(26,5,0,0.10)",K=a.icon,I=a.cannes;return e.jsx(Ds.Provider,{value:{isDark:y,fg:w,WARM:B,cardBg:Q,cardBdr:P},children:e.jsxs(Ct.div,{initial:{opacity:0,y:32},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.5,ease:[.16,1,.3,1]},className:"relative border group slide",style:{borderColor:t?n:I?`${n}35`:P,background:I?y?"#241510":"#fff7f2":Q,borderRadius:8,overflow:"hidden",transition:"border-color 0.2s"},children:[x&&e.jsxs("div",{className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 px-10",style:{background:"rgba(13,2,0,0.6)",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"},children:[e.jsx(Be,{className:"w-5 h-5 animate-spin",style:{color:n}}),e.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em]",style:{color:B},children:"Regeneratingâ¦"}),e.jsx("div",{className:"w-full max-w-[220px] h-[3px] overflow-hidden",style:{background:w(.1),borderRadius:2},children:e.jsx("div",{className:"h-full",style:{width:"40%",background:n,borderRadius:2,animation:"cardRegenBarSlide 1.1s ease-in-out infinite"}})})]}),e.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none select-none",children:e.jsx("span",{className:"absolute right-6 bottom-4 font-['Anton'] leading-none",style:{fontSize:"clamp(80px,12vw,140px)",color:I?`${n}08`:w(.04)},children:(i+1).toString().padStart(2,"0")})}),e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-300",style:{background:n}}),e.jsxs("div",{className:"flex items-center justify-between px-8 py-6 border-b",style:{borderColor:I?`${n}20`:P},children:[e.jsxs("div",{className:"flex items-center gap-4",children:[c&&r&&e.jsx("button",{onClick:r,className:"flex items-center justify-center w-5 h-5 border shrink-0 transition-colors",style:{borderColor:t?n:w(.2),background:t?n:"transparent",cursor:"none"},"aria-label":t?"Deselect card":"Select card for regeneration",children:t&&e.jsx(hs,{className:"w-3 h-3 text-white"})}),e.jsx("div",{className:"flex items-center justify-center w-8 h-8 border",style:{borderColor:I?`${n}40`:w(.1)},children:e.jsx(K,{className:"w-3.5 h-3.5",style:{color:n}})}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] mb-0.5",style:{color:`${n}70`},children:[I?"â
":"",(i+1).toString().padStart(2,"0")]}),e.jsx("h2",{className:"font-['Anton'] uppercase text-base leading-none tracking-wider",style:{color:y?"#fff":"#1A0500"},children:a.title})]})]}),e.jsxs("div",{className:"no-print flex items-center gap-2",children:[c&&p&&m&&e.jsxs("button",{className:"font-mono text-[10px] uppercase tracking-widest px-3 py-1.5 border flex items-center gap-1.5 opacity-0 group-hover:opacity-100 transition-all duration-200",style:{borderColor:w(.1),color:B,cursor:"none"},onClick:m,children:[e.jsx(Ms,{className:"w-3 h-3"}),"Undo"]}),e.jsxs("button",{className:"font-mono text-[10px] uppercase tracking-widest px-3 py-1.5 border flex items-center gap-1.5 opacity-0 group-hover:opacity-100 transition-all duration-200",style:{borderColor:"rgba(255,255,255,0.1)",color:Bs,cursor:"none"},onClick:l,children:[u===s?e.jsx(hs,{className:"w-3 h-3",style:{color:n}}):e.jsx(At,{className:"w-3 h-3"}),u===s?"Copied":"Copy"]})]})]}),e.jsx("div",{className:"px-8 py-7 relative z-10",children:g})]})})}function j({children:s}){const{fg:i}=N();return e.jsx("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] mb-2",style:{color:i(.32)},children:s})}function v({children:s,className:i=""}){const{fg:a,cardBg:l}=N();return e.jsx("div",{className:`p-5 border ${i}`,style:{borderColor:a(.06),background:l},children:s})}function Jr({data:s,discipline:i}){const{isDark:a,fg:l,WARM:u,cardBg:g,cardBdr:c}
6=N(),t=s?.filmName?"filmName":s?.campaignName?"campaignName":"projectName",r=s?.filmName||s?.campaignName||s?.projectName||"",m=s?.clientName||"",p=s?.filmTagline?"filmTagline":s?.broadcastTagline?"broadcastTagline":s?.headlineTagline?"headlineTagline":s?.campaignTagline?"campaignTagline":"conceptTagline",x=s?.filmTagline||s?.broadcastTagline||s?.headlineTagline||s?.campaignTagline||s?.conceptTagline||"";return e.jsxs("div",{className:"py-8 text-center",children:[e.jsx("p",{className:"font-mono text-xs uppercase tracking-[0.3em] mb-4",style:{color:n},children:m}),e.jsx("h1",{className:"font-['Anton'] uppercase leading-[0.9] mb-8",style:{color:a?"#fff":"#1A0500",fontSize:"clamp(32px,5vw,64px)"},children:e.jsx(o,{path:[t],value:r})}),e.jsx("div",{className:"inline-block border px-8 py-4",style:{borderColor:`${n}30`},children:e.jsxs("p",{className:"font-mono text-sm italic",style:{color:u},children:['"',e.jsx(o,{path:[p],value:x}),'"']})})]})}function Lr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c={Awareness:"#3B82F6",Consideration:"#8B5CF6",Conversion:n};return e.jsx("div",{className:"space-y-3",children:(s?.items||[]).map((t,r)=>e.jsx(v,{children:e.jsxs("div",{className:"flex gap-5",children:[e.jsx("span",{className:"font-['Anton'] text-2xl shrink-0 leading-none mt-0.5",style:{color:n},children:t.number??r+1}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["items",r,"title"],value:t.title})}),t.funnel&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${c[t.funnel]||n}40`,color:c[t.funnel]||n},children:t.funnel})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["items",r,"description"],value:t.description})})]})]})},r))})}function Kr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"p-6 border rounded-md",style:{borderColor:`${n}25`,background:`${n}08`},children:[e.jsx(j,{children:"Archetype"}),e.jsx("p",{className:"font-['Anton'] uppercase text-3xl",style:{color:n},children:e.jsx(o,{path:["archetypeName"],value:s?.archetypeName})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[e.jsxs(v,{children:[e.jsx(j,{children:"Profile"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["description"],value:s?.description})})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Demographics"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["demographics"],value:s?.demographics})})]})]}),(s?.mediaConsumptionHabits||s?.culturalCues)&&e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[s?.mediaConsumptionHabits&&e.jsxs(v,{children:[e.jsx(j,{children:"Media & Habits"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["mediaConsumptionHabits"],value:s.mediaConsumptionHabits})})]}),s?.culturalCues&&e.jsxs(v,{children:[e.jsx(j,{children:"Cultural Cues"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["culturalCues"],value:s.culturalCues})})]})]})]})}function Hr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();if(s?.reputationalProblem!==void 0||s?.newsHook!==void 0)return e.jsxs("div",{className:"space-y-3",children:[e.jsxs(v,{children:[e.jsx(j,{children:"Reputational Problem"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["reputationalProblem"],value:s?.reputationalProblem})})]}),e.jsxs("div",{className:"p-6 border rounded-md",style:{borderColor:`${n}25`,background:`${n}06`},children:[e.jsx(j,{children:"The News Hook"}),e.jsxs("p",{className:"font-mono text-sm italic font-medium leading-relaxed",style:{color:l},children:['"',e.jsx(o,{multiline:!0,path:["newsHook"],value:s?.newsHook}),'"']})]})]});if(s?.listenerTruth!==void 0)return e.jsxs("div",{className:"space-y-3",children:[e.jsxs(v,{children:[e.jsx(j,{children:"The Problem"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["problem"],value:s?.problem})})]}),e.jsxs("div",{className:"p-6 border rounded-md",style:{borderColor:`${n}25`,background:`${n}06`},children:[e.jsx(j,{children:"Listener Truth"}),e.jsxs("p",{className:"font-mono text-sm italic font-medium leading-relaxed",style:{color:l},children:['"',e.jsx(o,{multiline:!0,path:["listenerTruth"],value:s?.listenerTruth}),'"']})]})]});const c=s?.humanTruth||s?.humanInsight||s?.visualTruth,t=s?.humanTruth?"humanTruth":s?.visualTruth?"visualTruth":"humanInsight",r=s?.humanTruth?"Human Truth":s?.visualTruth?"Visual Truth":"Human Insight";return e.jsxs("div",{className:"space-y-3",children:[e.jsxs(v,{children:[e.jsx(j,{children:"The Problem"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["problem"],value:s?.problem})})]}),e.jsxs("div",{className:"p-6 border rounded-md",style:{borderColor:`${n}25`,background:`${n}06`},children:[e.jsx(j,{children:r}),e.jsxs("p",{className:"font-mono text-sm italic font-medium leading-relaxed",style:{color:l},children:['"',e.jsx(o,{multiline:!0,path:[t],value:c}),'"']})]})]})}function Vr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-3",children:[s?.intro&&e.jsx("p",{className:"font-mono text-sm leading-relaxed border-l-2 pl-4 mb-4",style:{color:l,borderColor:n},children:e.jsx(o,{multiline:!0,path:["intro"],value:s.intro})}),e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:(s?.pillars||[]).map((c,t)=>e.jsx(v,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"font-['Anton'] text-xl shrink-0 leading-none mt-0.5",style:{color:n},children:t+1}),e.jsxs("div",{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["pillars",t,"name"],value:c.name})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["pillars",t,"description"],value:c.description})})]})]})},t))}),s?.acronymNote&&e.jsx("p",{className:"font-mono text-[10px] italic mt-2",style:{color:`${n}50`},children:e.jsx(o,{path:["acronymNote"],value:s.acronymNote})})]})}function Or({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsx("div",{className:"grid md:grid-cols-3 gap-3",children:(s?.items||[]).map((c,t)=>e.jsxs(v,{children:[e.jsx(he,{className:"w-3.5 h-3.5 mb-3",style:{color:n}}),e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["items",t,"title"],value:c.title})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["items",t,"description"],value:c.description})})]},t))})}function Gr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"py-10 px-6 border rounded-md text-center",style:{borderColor:`${n}25`,background:`${n}06`},children:[e.jsx(j,{children:"Creative Line"}),e.jsxs("p",{className:"font-['Anton'] uppercase leading-[0.9]",style:{fontSize:"clamp(24px,4vw,48px)",color:n},children:['"',e.jsx(o,{path:["creativeLine"],value:s?.creativeLine}),'"']})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Concept Narrative"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["conceptNarrative"],value:s?.conceptNarrative})})]})]})}function Ur({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"py-10 px-6 border rounded-md text-center",style:{borderColor:`${n}25`,background:`${n}06`},children:[e.jsx(j,{children:"Big Idea"}),e.jsxs("p",{className:"font-['Anton'] uppercase leading-[0.9]",style:{fontSize:"clamp(24px,4vw,48px)",color:n},children:['"',e.jsx(o,{path:["bigIdeaLine"],value:s?.bigIdeaLine}),'"']})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Platform Narrative"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["platformNarrative"],value:s?.platformNarrative})})]})]})}function zr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=Array.isArray(s)?s:s?.pillars||[],t=Array.isArray(s)?[]:["pillars"];return e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:c.map((r,m)=>e.jsx(v,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-1 self-stretch shrink-0",style:{background:n}}),e.jsxs("div",{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:[...t,m,"name"],value:r.name})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:[...t,m,"description"],value:r.description})})]})]})},m))})}function Ge({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.tagline!==void 0?"tagline":"campaignTagline",t=s?.tagline||s?.campaignTagline||"";return e.jsxs("div",{className:"py-16 text-center",children:[e.jsx(j,{children:"The Line"}),e.jsxs("p",{className:"font-['Anton'] uppercase leading-none",style:{color:i?"#fff":"#1A0500",fontSize:"clamp(28px,6vw,72px)"},children:['"',e.jsx(o,{path:[c],value:t}),'"']})]})}function qr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.colorPalette||[],t=s?.directions||[],r=Array.isArray(s?.savedImages)?s.savedImages:[],m=C.useContext(Re);return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:t.map((p,x)=>{const y=r[x]??null;return e.jsxs(v,{className:"!p-0 overflow-hidden",children:[y?e.jsx("img",{src:`data:image/png;base64,${y}`,alt:p.label,className:"w-full block",style:{aspectRatio:"1/1",objectFit:"cover"}}):De(m,s?.videoField,x)?e.jsx(D,{aspectRatio:"1/1",field:s?.videoField,index:x}):e.jsx("div",{className:"w-full flex items-center justify-center",style:{aspectRatio:"1/1",background:p.hexSwatch?`${p.hexSwatch}22`:a(.02),borderBottom:`1px solid ${a(.05)}`},children:e.jsx("p",{className:"font-['Anton'] uppercase text-center px-4 text-xs",style:{color:a(.18)},children:p.label})}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[p.hexSwatch&&e.jsx("div",{className:"w-4 h-4 shrink-0 border border-white/10",style:{background:p.hexSwatch}}),e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["directions",x,"label"],value:p.label})})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["directions",x,"description"],value:p.description})}),p.pinterestQuery&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:`${n}60`},children:["ð ",p.pinterestQuery]})]})]},x)})}),c.length>0&&e.jsxs("div",{children:[e.jsx(j,{children:"Colour Palette"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:c.map((p,x)=>e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx("div",{className:"w-10 h-10 border border-white/10",style:{background:p}}),e.jsx("p",{className:"font-mono text-[9px]",style:{color:a(.3)},children:p})]},x))})]})]})}function Qr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:(s?.materials||[]).map((c,t)=>e.jsxs(v,{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["materials",t,"name"],value:c.name})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["materials",t,"reasoning"],value:c.reasoning})})]},t))})}const bs=4;function Yr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=(s?.directions||[]).slice(0,bs),t=(s?.materials||[]).slice(0,bs),r=s?.colorPalette||[],m=Array.isArray(s?.savedImages)?s.savedImages:[],p=Array.isArray(s?.materialSavedImages)?s.materialSavedImages:[];return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(j,{children:"Visual"}),e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:c.map((x,y)=>{const w=m[y]??null,B=J(w);return e.jsxs(v,{className:"!p-0 overflow-hidden",children:[B==="ready"?e.jsx(H,{src:`data:image/png;base64,${w}`,alt:x.label,aspectRatio:"1/1",videoField:s?.videoField,videoIndex:y,context:`${x.label}: ${x.description??""}`}):B==="loading"?e.jsx(D,{aspectRatio:"1/1",field:s?.videoField,index:y}
6):e.jsx(L,{label:x.label,state:B,aspectRatio:"1/1"}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[x.hexSwatch&&e.jsx("div",{className:"w-4 h-4 shrink-0 border border-white/10",style:{background:x.hexSwatch}}),e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["directions",y,"label"],value:x.label})})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["directions",y,"description"],value:x.description})}),x.pinterestQuery&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:`${n}60`},children:["ð ",x.pinterestQuery]})]})]},y)})})]}),t.length>0&&e.jsxs("div",{children:[e.jsx(j,{children:"Materials"}),e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:t.map((x,y)=>{const w=p[y]??null,B=J(w);return e.jsxs(v,{className:"!p-0 overflow-hidden",children:[B==="ready"?e.jsx(H,{src:`data:image/png;base64,${w}`,alt:x.name,aspectRatio:"1/1",videoField:s?.materialVideoField,videoIndex:y,context:`${x.name}: ${x.reasoning??""}`}):B==="loading"?e.jsx(D,{aspectRatio:"1/1",field:s?.materialVideoField,index:y}):e.jsx(L,{label:x.name,state:B,aspectRatio:"1/1"}),e.jsxs("div",{className:"p-4",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["materials",y,"name"],value:x.name})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["materials",y,"reasoning"],value:x.reasoning})})]})]},y)})})]}),r.length>0&&e.jsxs("div",{children:[e.jsx(j,{children:"Colour Palette"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:r.map((x,y)=>e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx("div",{className:"w-10 h-10 border border-white/10",style:{background:x}}),e.jsx("p",{className:"font-mono text-[9px]",style:{color:a(.3)},children:x})]},y))})]})]})}function Xr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.eventName??"",t=s?.keyVisualDescription??"",r=Array.isArray(s?.brandedElements)?s.brandedElements:[],m=s?.savedImage??null,p=Array.isArray(s?.savedImages)?s.savedImages:[],x=J(m);return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(j,{children:"Key Visual"}),e.jsxs(v,{className:x==="ready"||x==="loading"?"!p-0 overflow-hidden":void 0,children:[x==="ready"&&e.jsx(H,{src:`data:image/png;base64,${m}`,alt:c,aspectRatio:"16/9",videoField:s?.videoField,context:`${c}: ${t}`}),x==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField}),x==="declined"&&e.jsx(L,{state:"declined",aspectRatio:"16/9"}),x==="failed"&&e.jsxs("div",{className:"p-4",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["eventName"],value:c})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["keyVisualDescription"],value:t})})]})]}),(x==="ready"||x==="loading"||x==="declined")&&e.jsxs("div",{className:"mt-2",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["eventName"],value:c})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["keyVisualDescription"],value:t})})]})]}),r.length>0&&e.jsxs("div",{children:[e.jsx(j,{children:"Branded Elements"}),e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:r.map((y,w)=>{const B=y?.element!==void 0?"element":"name",Q=y?.element??y?.name??"",P=p[w]??null,K=J(P);return e.jsxs(v,{className:"!p-0 overflow-hidden",children:[K==="ready"?e.jsx(H,{src:`data:image/png;base64,${P}`,alt:Q,aspectRatio:"16/9",videoField:s?.elementsVideoField,videoIndex:w,context:`${Q}: ${y?.description??""}`}):K==="loading"?e.jsx(D,{aspectRatio:"16/9",field:s?.elementsVideoField,index:w}):e.jsx(L,{label:Q,state:K,aspectRatio:"16/9"}),e.jsxs("div",{className:"p-4",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["brandedElements",w,B],value:Q})}),y?.description&&e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["brandedElements",w,"description"],value:y.description})})]})]},w)})})]})]})}function Zr({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.savedImagesByAct&&typeof s.savedImagesByAct=="object"?s.savedImagesByAct:{};return e.jsx("div",{className:"space-y-3",children:(s?.acts||[]).map((t,r)=>{const m=r+1,p=c[`act${m}Images`]?.[0]??null,x=J(p);return e.jsxs(v,{className:x==="ready"||x==="loading"?"!p-0 overflow-hidden":void 0,children:[x==="ready"&&e.jsx(H,{src:`data:image/png;base64,${p}`,alt:t.name,aspectRatio:"16/9",videoField:`experienceArchitectureImages.act${m}Images`,videoIndex:0,context:`${t.name}: ${t.description??""}`}),x==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:`act${m}Images`}),(x==="failed"||x==="declined")&&e.jsx(L,{label:t.name,state:x,aspectRatio:"16/9"}),e.jsxs("div",{className:x==="ready"||x==="loading"?"p-4 flex items-start gap-4":"flex items-start gap-4",children:[e.jsxs("div",{className:"font-mono text-[10px] uppercase tracking-wider border px-2 py-1 shrink-0 mt-0.5",style:{borderColor:`${n}30`,color:n},children:["ACT ",m]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["acts",r,"name"],value:t.name})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["acts",r,"description"],value:t.description})}),t.touchpoints&&e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.28)},children:e.jsx(o,{path:["acts",r,"touchpoints"],value:t.touchpoints})})]})]})]},r)})})}function ea({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsx("div",{className:"space-y-3",children:(s?.items||[]).map((t,r)=>{const m=c[r]??null,p=J(m);return e.jsxs(v,{className:p==="ready"||p==="loading"?"!p-0 overflow-hidden":void 0,children:[p==="ready"&&e.jsx(H,{src:`data:image/png;base64,${m}`,alt:t.name,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:r,context:`${t.name}: ${t.description??""}`}),p==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:r}),(p==="failed"||p==="declined")&&e.jsx(L,{label:t.name,state:p,aspectRatio:"16/9"}),e.jsxs("div",{className:p==="ready"||p==="loading"?"p-4":void 0,children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-2 mb-2",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["items",r,"name"],value:t.name})}),t.pillarTag&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5
6shrink-0",style:{borderColor:`${n}30`,color:n},children:t.pillarTag})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["items",r,"description"],value:t.description})}),t.instagrammableHook&&e.jsxs("p",{className:"font-mono text-[10px] border-t pt-2",style:{borderColor:a(.05),color:a(.28)},children:["ð¸ ",e.jsx("span",{className:"",children:e.jsx(o,{path:["items",r,"instagrammableHook"],value:t.instagrammableHook})})]})]})]},r)})})}function sa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=J(s?.savedImage);return e.jsx("div",{className:"space-y-3",children:(s?.acts||[]).map((t,r)=>{const m=t.narrative!==void 0?"narrative":"narrativeBeat",p=t.sensoryCues!==void 0?"sensoryCues":"craftCues";return e.jsxs(v,{className:r===0&&(c==="ready"||c==="loading")?"!p-0 overflow-hidden":void 0,children:[r===0&&c==="ready"&&e.jsx(H,{src:`data:image/png;base64,${s.savedImage}`,alt:t.title,aspectRatio:"16/9",videoField:s?.videoField,context:`${t.title}: ${t.narrative||t.narrativeBeat||""}`}),r===0&&c==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField}),r===0&&(c==="failed"||c==="declined")&&e.jsx(L,{label:t.title,state:c,aspectRatio:"16/9"}),e.jsxs("div",{className:r===0&&(c==="ready"||c==="loading")?"p-4":void 0,children:[e.jsx("p",{className:"font-['Anton'] uppercase text-lg mb-2",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["acts",r,"title"],value:t.title})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["acts",r,m],value:t.narrative||t.narrativeBeat})}),(t.sensoryCues||t.craftCues)&&e.jsx("p",{className:"font-mono text-[10px] border-t pt-2",style:{borderColor:a(.05),color:a(.28)},children:e.jsx("span",{className:"",children:e.jsx(o,{path:["acts",r,p],value:t.sensoryCues||t.craftCues})})})]})]},r)})})}function ta({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.territories||[];return e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:c.map((t,r)=>e.jsx(v,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"font-['Anton'] text-base shrink-0 leading-none mt-0.5",style:{color:n},children:(r+1).toString().padStart(2,"0")}),e.jsxs("div",{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["territories",r,"title"],value:t.title})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["territories",r,"reasoning"],value:t.reasoning})})]})]})},r))})}const Ue=["#FF5C1A","#E8501A","#D0451A","#B83A1A","#A0301A","#882618","#701C16"];function ra({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.phases||[],t=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-[19px] top-6 bottom-6 w-px",style:{background:"rgba(255,92,26,0.20)"}}),e.jsx("div",{className:"space-y-3",children:c.map((r,m)=>{const p=t[m]??null,x=J(p);return e.jsxs("div",{className:"flex gap-5",children:[e.jsx("div",{className:"relative shrink-0 flex flex-col items-center",style:{width:38},children:e.jsx("div",{className:"w-[38px] h-[38px] border flex items-center justify-center shrink-0 z-10",style:{borderColor:Ue[m]||n,background:u},children:e.jsx("span",{className:"font-['Anton'] text-[10px]",style:{color:Ue[m]||n},children:(m+1).toString().padStart(2,"0")})})}),e.jsxs("div",{className:"flex-1 border mb-0 overflow-hidden",style:{borderColor:a(.06),background:a(.02)},children:[x==="ready"&&e.jsx(H,{src:`data:image/png;base64,${p}`,alt:r.phase,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:m,context:`${r.phase}: ${r.objective??""}`}),x==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:m}),(x==="failed"||x==="declined")&&e.jsx(L,{label:r.phase,state:x,aspectRatio:"16/9"}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("span",{className:"font-['Anton'] uppercase text-sm",style:{color:Ue[m]||n}
6,children:e.jsx(o,{path:["phases",m,"phase"],value:r.phase})}),e.jsxs("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.08),color:a(.3)},children:["Phase ",m+1]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["phases",m,"objective"],value:r.objective})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 border-t pt-3 mt-2",style:{borderColor:a(.05)},children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Channels"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",m,"keyChannels"],value:r.keyChannels})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Signature Asset"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",m,"signatureAsset"],value:r.signatureAsset})})]})]})]})]})]},m)})})]})}function aa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsx("div",{className:"space-y-3",children:(s?.items||[]).map((t,r)=>{const m=c[r]??null,p=J(m);return e.jsxs(v,{className:p==="ready"||p==="loading"?"!p-0 overflow-hidden":void 0,children:[p==="ready"&&e.jsx(H,{src:`data:image/png;base64,${m}`,alt:t.name,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:r,context:`${t.name}: ${t.description??""}`}),p==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:r}),(p==="failed"||p==="declined")&&e.jsx(L,{label:t.name,state:p,aspectRatio:"16/9"}),e.jsxs("div",{className:p==="ready"||p==="loading"?"p-4":void 0,children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-2 mb-2",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["items",r,"name"],value:t.name})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.format&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.1),color:a(.35)},children:t.format}),t.pillarTag&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:t.pillarTag})]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["items",r,"description"],value:t.description})}),t.shareabilityHook&&e.jsxs("p",{className:"font-mono text-[10px] border-t pt-2",style:{borderColor:a(.05),color:a(.28)},children:["â ",e.jsx("span",{className:"",children:e.jsx(o,{path:["items",r,"shareabilityHook"],value:t.shareabilityHook})})]})]})]},r)})})}function na({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsx("div",{className:"space-y-3",children:(s?.acts||[]).map((t,r)=>{const m=c[r]??null,p=J(m);return e.jsxs(v,{className:p==="ready"||p==="loading"?"!p-0 overflow-hidden":void 0,children:[p==="ready"&&e.jsx(H,{src:`data:image/png;base64,${m}`,alt:t.title,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:r,context:`${t.title}: ${t.narrativeBeat??""}`}),p==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:r}),(p==="failed"||p==="declined")&&e.jsx(L,{label:t.title,state:p,aspectRatio:"16/9"}),e.jsxs("div",{className:p==="ready"||p==="loading"?"p-4":void 0,children:[e.jsx("p",{className:"font-['Anton'] uppercase text-lg mb-2",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["acts",r,"title"],value:t.title})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["acts",r,"narrativeBeat"],value:t.narrativeBeat})}),t.craftCues&&e.jsx("p",{className:"font-mono text-[10px] border-t pt-2",style:{borderColor:a(.05),color:a(.28)},children:e.jsxs("span",{className:"",children:["Craft: ",e.jsx(o,{path:["acts",r,"craftCues"],value:t.craftCues})]})})]})]},r)})})}function oa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"p-6 border rounded-md",style:{borderColor:`${n}25`,background:`${n}08`},children:[e.jsx(j,{children:"Primary Archetype"}),e.jsx("p",{className:"font-['Anton'] uppercase text-3xl mb-2",style:{color:n},children:e.jsx(o,{path:["primaryArchetype"],value:s?.primaryArchetype})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["primaryDescription"],value:s?.primaryDescription})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[s?.secondaryAudiences&&e.jsxs(v,{children:[e.jsx(j,{children:"Secondary Audiences"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["secondaryAudiences"],value:s.secondaryAudiences})})]}),s?.journalistProfiles&&e.jsxs(v,{children:[e.jsx(j,{children:"Journalist & Editor Profiles"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["journalistProfiles"],value:s.journalistProfiles})})]}),s?.creatorTiers&&e.jsxs(v,{children:[e.jsx(j,{children:"Creator & Influencer Tiers"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["creatorTiers"],value:s.creatorTiers})})]}),s?.spokespeople&&e.jsxs(v,{children:[e.jsx(j,{children:"Key Spokespeople"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["spokespeople"],value:s.spokespeople})})]})]})]})}function la({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"py-10 px-6 border rounded-md text-center",style:{borderColor:`${n}25`,background:`${n}06`},children:[e.jsx(j,{children:"The Idea"}),e.jsxs("p",{className:"font-['Anton'] uppercase leading-[0.9]",style:{fontSize:"clamp(24px,4vw,48px)",color:n},children:['"',e.jsx(o,{path:["bigIdeaLine"],value:s?.bigIdeaLine}),'"']})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Platform Narrative"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["platformNarrative"],value:s?.platformNarrative})})]})]})}const ia={Business:"#3B82F6",Lifestyle:"#EC4899",Tech:"#8B5CF6",Culture:"#F59E0B",Sustainability:"#10B981",Health:"#EF4444",Regional:n,Politics:"#6B7280",Sport:"#14B8A6",Fashion:"#F472B6"};function ca({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.angles||[];return e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:c.map((t,r)=>{const m=ia[t.beat]||n;return e.jsxs(v,{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5
6shrink-0",style:{borderColor:`${m}40`,color:m},children:t.beat}),e.jsx("p",{className:"font-['Anton'] uppercase text-base leading-tight",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["angles",r,"title"],value:t.title})})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["angles",r,"reasoning"],value:t.reasoning})})]},r)})})}const ze=["#FF5C1A","#E8501A","#D0451A","#B83A1A","#A0301A","#882618","#701C16"];function da({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.phases||[],t=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-[19px] top-6 bottom-6 w-px",style:{background:"rgba(255,92,26,0.20)"}}),e.jsx("div",{className:"space-y-3",children:c.map((r,m)=>{const p=t[m]??null,x=J(p);return e.jsxs("div",{className:"flex gap-5",children:[e.jsx("div",{className:"relative shrink-0 flex flex-col items-center",style:{width:38},children:e.jsx("div",{className:"w-[38px] h-[38px] border flex items-center justify-center shrink-0 z-10",style:{borderColor:ze[m]||n,background:u},children:e.jsx("span",{className:"font-['Anton'] text-[10px]",style:{color:ze[m]||n},children:(m+1).toString().padStart(2,"0")})})}),e.jsxs("div",{className:"flex-1 border",style:{borderColor:a(.06),background:a(.02)},children:[x==="ready"&&e.jsx(H,{src:`data:image/png;base64,${p}`,alt:r.phase,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:m,context:`${r.phase}: ${r.objective??""}`}),x==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:m}),(x==="failed"||x==="declined")&&e.jsx(L,{label:r.phase,state:x,aspectRatio:"16/9"}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("span",{className:"font-['Anton'] uppercase text-sm",style:{color:ze[m]||n},children:e.jsx(o,{path:["phases",m,"phase"],value:r.phase})}),e.jsxs("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.08),color:a(.3)},children:["Phase ",m+1]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["phases",m,"objective"],value:r.objective})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 border-t pt-3 mt-2",style:{borderColor:a(.05)},children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Target Media"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",m,"targetMedia"],value:r.targetMedia})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Signature Asset"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",m,"signatureAsset"],value:r.signatureAsset})})]})]})]})]})]},m)})})]})}function pa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsx("div",{className:"space-y-3",children:(s?.items||[]).map((t,r)=>{const m=c[r]??null,p=J(m);return e.jsxs(v,{className:p==="ready"||p==="loading"?"!p-0 overflow-hidden":void 0,children:[p==="ready"&&e.jsx(H,{src:`data:image/png;base64,${m}`,alt:t.name,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:r,context:`${t.name}: ${t.description??""}`}),p==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:r}),(p==="failed"||p==="declined")&&e.jsx(L,{label:t.name,state:p,aspectRatio:"16/9"}),e.jsxs("div",{className:p==="ready"||p==="loading"?"p-4":void 0,children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-2 mb-2",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["items",r,"name"],value:t.name})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.format&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.1),color:a(.35)},children:t.format}),t.pillarTag&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:t.pillarTag})]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["items",r,"description"],value:t.description})}),t.headlineHook&&e.jsxs("p",{className:"font-mono text-[10px] border-t pt-2 italic",style:{borderColor:a(.05),color:a(.3)},children:["ð° ",e.jsxs("span",{className:"",children:['"',e.jsx(o,{path:["items",r,"headlineHook"],value:t.headlineHook}),'"']})]})]})]},r)})})}function ma({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsx("div",{className:"space-y-3",children:(s?.acts||[]).map((t,r)=>{const m=c[r]??null,p=J(m);return e.jsxs(v,{className:p==="ready"||p==="loading"?"!p-0 overflow-hidden":void 0,children:[p==="ready"&&e.jsx(H,{src:`data:image/png;base64,${m}`,alt:t.title,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:r,context:`${t.title}: ${t.narrativeBeat??""}`}),p==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:r}),(p==="failed"||p==="declined")&&e.jsx(L,{label:t.title,state:p,aspectRatio:"16/9"}),e.jsx("div",{className:p==="ready"||p==="loading"?"p-4":void 0,children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsxs("div",{className:"font-mono text-[10px] uppercase tracking-wider border px-2 py-1 shrink-0 mt-0.5",style:{borderColor:`${n}30`,color:n},children:["ACT ",r+1]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-lg mb-2",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["acts",r,"title"],value:t.title})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["acts",r,"narrativeBeat"],value:t.narrativeBeat})}),t.executionCues&&e.jsxs("p",{className:"font-mono text-[10px] border-t pt-2",style:{borderColor:a(.05),color:a(.28)},children:["â¡ ",e.jsx("span",{className:"",children:e.jsx(o,{path:["acts",r,"executionCues"],value:t.executionCues})})]})]})]})})]},r)})})}function xa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"p-6 border rounded-md",style:{borderColor:`${n}25`,background:`${n}08`},children:[e.jsx(j,{children:"Listener Archetype"}),e.jsx("p",{className:"font-['Anton'] uppercase text-3xl",style:{color:n},children:e.jsx(o,{path:["archetypeName"],value:s?.archetypeName})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[e.jsxs(v,{children:[e.jsx(j,{children:"Listening Behaviour"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["listeningBehaviour"],value:s?.listeningBehaviour})})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Demographics"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["demographics"],value:s?.demographics})})]})]}),(s?.listeningContexts||s?.platformHabits)&&e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[s?.listeningContexts&&e.jsxs(v,{children:[e.jsx(j,{children:"Listening Contexts"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["listeningContexts"],value:s.listeningContexts})})]}),s?.platformHabits&&e.jsxs(v,{children:[e.jsx(j,{children:"Platform Habits"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["platformHabits"],value:s.platformHabits})})]})]}),(s?.daypartingHabits||s?.stationLoyalty||s?.languagePreference)&&e.jsxs("div",{className:"grid md:grid-cols-3 gap-3",children:[s?.daypartingHabits&&e.jsxs(v,{children:[e.jsx(j,{children:"Dayparting Habits"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["daypartingHabits"],value:s.daypartingHabits})})]}),s?.stationLoyalty&&e.jsxs(v,{children:[e.jsx(j,{children:"Station Loyalty"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["stationLoyalty"],value:s.stationLoyalty})})]}),s?.languagePreference&&e.jsxs(v,{children:[e.jsx(j,{children:"Language Preference"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["languagePreference"],value:s.languagePreference})})]})]})]})}function ua({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"py-10 px-6 border rounded-md text-center",style:{borderColor:`${n}25`,background:`${n}06`},children:[e.jsx(j,{children:"Sonic Line"}),e.jsxs("p",{className:"font-['Anton'] uppercase leading-[0.9]",style:{fontSize:"clamp(24px,4vw,48px)",color:n},children:['"',e.jsx(o,{path:["sonicLine"],value:s?.sonicLine}),'"']})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Platform Narrative"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["platformNarrative"],value:s?.platformNarrative})})]})]})}function ga({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:(s?.directions||[]).map((c,t)=>e.jsxs(v,{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["directions",t,"label"],value:c.label})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-3",style:{color:l},children:e.jsx(o,{multiline:!0,path:["directions",t,"description"],value:c.description})}),e.jsxs("div",{className:"space-y-1 border-t pt-3",style:{borderColor:a(.05)},children:[c.referenceTrack&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:`${n}70`},children:["ðµ ",e.jsx(o,{path:["directions",t,"referenceTrack"],value:c.referenceTrack})]}),c.moodDescriptor&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:a(.35)},children:["Mood: ",e.jsx(o,{path:["directions",t,"moodDescriptor"],value:c.moodDescriptor})]}),c.bpmCue&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:a(.35)},children:["Tempo: ",e.jsx(o,{path:["directions",t,"bpmCue"],value:c.bpmCue})]})]})]},t))}),s?.tonalPalette&&e.jsxs("div",{className:"p-5 border rounded-md",style:{borderColor:a(.06),background:`${n}04`},children:[e.jsx(j,{children:"Tonal Palette â Voice & Instrumentation"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["tonalPalette"],value:s.tonalPalette})})]})]})}function ha({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.assets||[];return e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:c.map((t,r)=>e.jsx(v,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"font-['Anton'] text-base shrink-0 leading-none mt-0.5",style:{color:n},children:(r+1).toString().padStart(2,"0")}),e.jsxs("div",{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["assets",r,"name"],value:t.name})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["assets",r,"reasoning"],value:t.reasoning})})]})]})},r))})}const qe=["#FF5C1A","#E8501A","#D0451A","#B83A1A","#A0301A","#882618","#701C16"];function fa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.phases||[];return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-[19px] top-6 bottom-6 w-px",style:{background:"rgba(255,92,26,0.20)"}}),e.jsx("div",{className:"space-y-3",children:c.map((t,r)=>e.jsxs("div",{className:"flex gap-5",children:[e.jsx("div",{className:"relative shrink-0 flex flex-col items-center",style:{width:38},children:e.jsx("div",{className:"w-[38px] h-[38px] border flex items-center justify-center shrink-0 z-10",style:{borderColor:qe[r]||n,background:u},children:e.jsx("span",{className:"font-['Anton'] text-[10px]",style:{color:qe[r]||n},children:(r+1).toString().padStart(2,"0")})})}),e.jsxs("div",{className:"flex-1 border p-4",style:{borderColor:a(.06),background:a(.02)},children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("span",{className:"font-['Anton'] uppercase text-sm",style:{color:qe[r]||n},children:e.jsx(o,{path:["phases",r,"phase"],value:t.phase})}),e.jsxs("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.08),color:a(.3)},children:["Phase ",r+1]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["phases",r,"objective"],value:t.objective})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 border-t pt-3 mt-2",style:{borderColor:a(.05)},children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Platforms"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",r,"targetPlatforms"],value:t.targetPlatforms})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Signature Asset"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",r,"signatureAsset"],value:t.signatureAsset})})]})]})]})]},r))})]})}function ya({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsx("div",{className:"space-y-3",children:(s?.items||[]).map((c,t)=>e.jsxs(v,{children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-2 mb-2",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["items",t,"name"],value:c.name})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.format&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.1),color:a(.35)},children:c.format}),c.pillarTag&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:c.pillarTag})]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["items",t,"description"],value:c.description})}),c.listenerHook&&e.jsxs("p",{className:"font-mono text-[10px] border-t pt-2",style:{borderColor:a(.05),color:a(.28)},children:["ð§ ",e.jsx("span",{className:"",children:e.jsx(o,{path:["items",t,"listenerHook"],value:c.listenerHook})})]})]},t))})}function ja({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.acts||[];return e.jsx("div",{className:"space-y-3",children:c.map((t,r)=>e.jsxs("div",{className:"border overflow-hidden",style:{borderColor:a(.06)},children:[e.jsxs("div",{className:"flex items-center gap-3 px-5 py-3 border-b",style:{borderColor:a(.05),background:a(.02)},children:[e.jsxs("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:["ACT ",r+1]}),e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["acts",r,"title"],value:t.title})})]}),e.jsxs("div",{className:"p-5 space-y-3",children:[t.dialogue&&e.jsxs("div",{className:"p-4 border-l-2",style:{borderColor:n,background:"rgba(255,92,26,0.04)"},children:[e.jsx(j,{children:"Dialogue / VO"}),e.jsxs("p",{className:"font-mono text-sm leading-relaxed italic",style:{color:l},children:['"',e.jsx(o,{multiline:!0,path:["acts",r,"dialogue"],value:t.dialogue}),'"']})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-3",children:[t.sfx&&e.jsxs("div",{className:"p-3 border rounded-md",style:{borderColor:a(.05),background:a(.01)},children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"SFX"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.45)},children:e.jsx(o,
6{path:["acts",r,"sfx"],value:t.sfx})})]}),t.musicDirection&&e.jsxs("div",{className:"p-3 border rounded-md",style:{borderColor:a(.05),background:a(.01)},children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Music"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.45)},children:e.jsx(o,{path:["acts",r,"musicDirection"],value:t.musicDirection})})]}),t.silenceBeat&&e.jsxs("div",{className:"p-3 border rounded-md",style:{borderColor:a(.05),background:a(.01)},children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Silence"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.45)},children:e.jsx(o,{path:["acts",r,"silenceBeat"],value:t.silenceBeat})})]})]})]})]},r))})}function ba({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"py-10 px-6 border rounded-md text-center",style:{borderColor:`${n}25`,background:`${n}06`},children:[e.jsx(j,{children:"The Radio Voice"}),e.jsxs("p",{className:"font-['Anton'] uppercase leading-[0.9]",style:{fontSize:"clamp(24px,4vw,48px)",color:n},children:['"',e.jsx(o,{path:["radioLine"],value:s?.radioLine}),'"']})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Brand Radio Worldview"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["platformNarrative"],value:s?.platformNarrative})})]})]})}function va({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:(s?.directions||[]).map((c,t)=>e.jsxs(v,{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["directions",t,"label"],value:c.label})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["directions",t,"description"],value:c.description})}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 border-t pt-2 mt-1",style:{borderColor:a(.05)},children:[c.referenceStation&&e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-0.5",style:{color:`${n}50`},children:"Reference"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.3)},children:e.jsx(o,{path:["directions",t,"referenceStation"],value:c.referenceStation})})]}),c.moodDescriptor&&e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-0.5",style:{color:`${n}50`},children:"Mood"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.3)},children:e.jsx(o,{path:["directions",t,"moodDescriptor"],value:c.moodDescriptor})})]}),c.tempoCue&&e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-0.5",style:{color:`${n}50`},children:"Tempo"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.3)},children:e.jsx(o,{path:["directions",t,"tempoCue"],value:c.tempoCue})})]})]})]},t))}),s?.tonalPalette&&e.jsxs("div",{className:"p-5 border rounded-md",style:{borderColor:`${n}20`,background:`${n}04`},children:[e.jsx(j,{children:"Tonal Palette"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["tonalPalette"],value:s.tonalPalette})})]})]})}function Na({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.elements||[];return e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:c.map((t,r)=>e.jsx(v,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"font-['Anton'] text-base shrink-0 leading-none mt-0.5",style:{color:n},children:(r+1).toString().padStart(2,"0")}),e.jsxs("div",{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["elements",r,"name"],value:t.name})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["elements",r,"reasoning"],value:t.reasoning})})]})]})},r))})}const Qe=["#FF5C1A","#E8501A","#D0451A","#B83A1A","#A0301A","#882618","#701C16"];function Ca({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.phases||[];return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-[19px] top-6 bottom-6 w-px",style:{background:"rgba(255,92,26,0.20)"}}),e.jsx("div",{className:"space-y-3",children:c.map((t,r)=>e.jsxs("div",{className:"flex gap-5",children:[e.jsx("div",{className:"relative shrink-0 flex flex-col items-center",style:{width:38},children:e.jsx("div",{className:"w-[38px] h-[38px] border flex items-center justify-center shrink-0 z-10",style:{borderColor:Qe[r]||n,background:u},children:e.jsx("span",{className:"font-['Anton'] text-[10px]",style:{color:Qe[r]||n},children:(r+1).toString().padStart(2,"0")})})}),e.jsxs("div",{className:"flex-1 border p-4",style:{borderColor:a(.06),background:a(.02)},children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("span",{className:"font-['Anton'] uppercase text-sm",style:{color:Qe[r]||n},children:e.jsx(o,{path:["phases",r,"phase"],value:t.phase})}),e.jsxs("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.08),color:a(.3)},children:["Phase ",r+1]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["phases",r,"objective"],value:t.objective})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 border-t pt-3 mt-2",style:{borderColor:a(.05)},children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Stations & Dayparts"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",r,"targetStationsAndDayparts"],value:t.targetStationsAndDayparts})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Signature Asset"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",r,"signatureAsset"],value:t.signatureAsset})})]})]})]})]},r))})]})}function Aa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsx("div",{className:"space-y-3",children:(s?.items||[]).map((c,t)=>e.jsxs(v,{children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-2 mb-2",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["items",t,"name"],value:c.name})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.format&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.1),color:a(.35)},children:c.format}),c.pillarTag&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:c.pillarTag})]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["items",t,"description"],value:c.description})}),c.listenerHook&&e.jsxs("p",{className:"font-mono text-[10px] border-t pt-2",style:{borderColor:a(.05),color:a(.28)},children:["ð» ",e.jsx("span",{className:"",children:e.jsx(o,{path:["items",t,"listenerHook"],value:c.listenerHook})})]})]},t))})}function wa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.acts||[],t=s?.cutdown30s,r=s?.cutdown15s;return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"space-y-3",children:c.map((m,p)=>e.jsxs("div",{className:"border overflow-hidden",style:{borderColor:a(.06)},children:[e.jsxs("div",{className:"flex items-center gap-3 px-5 py-3 border-b",style:{borderColor:a(.05),background:a(.02)},children:[e.jsxs("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:["ACT ",p+1]}),e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["acts",p,"title"],value:m.title})}),m.timing&&e.jsx("span",{className:"ml-auto font-mono text-[9px]",style:{color:a(.3)},children:m.timing})]}),e.jsxs("div",{className:"p-5 space-y-3",children:[m.dialogue&&e.jsxs("div",{className:"p-4 border-l-2",style:{borderColor:n,background:`${n}05`},children:[e.jsx(j,{children:"Dialogue / VO"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed italic",style:{color:l},children:e.jsx(o,{multiline:!0,path:["acts",p,"dialogue"],value:m.dialogue})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[m.sfxCues&&e.jsxs("div",{className:"p-3 border rounded-md",style:{borderColor:a(.05),background:a(.01)},children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"SFX"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.45)},children:e.jsx(o,{path:["acts",p,"sfxCues"],value:m.sfxCues})})]}),m.musicDirection&&e.jsxs("div",{className:"p-3 border rounded-md",style:{borderColor:a(.05),background:a(.01)},children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Music"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.45)},children:e.jsx(o,{path:["acts",p,"musicDirection"],value:m.musicDirection})})]})]})]})]},p))}),(t||r)&&e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[t&&e.jsxs("div",{className:"border overflow-hidden",style:{borderColor:a(.06)},children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b",style:{borderColor:a(.05),background:a(.02)},children:[e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:"30s Cutdown"}),t.timing&&e.jsx("span",{className:"ml-auto font-mono text-[9px]",style:{color:a(.3)},children:t.timing})]}),e.jsxs("div",{className:"p-4 space-y-2",children:[e.jsx("p",{className:"font-mono text-sm leading-relaxed italic",style:{color:l},children:e.jsx(o,{multiline:!0,path:["cutdown30s","dialogue"],value:t.dialogue})}),t.sfxCues&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:a(.28)},children:["SFX: ",e.jsx(o,{path:["cutdown30s","sfxCues"],value:t.sfxCues})]})]})]}),r&&e.jsxs("div",{className:"border overflow-hidden",style:{borderColor:a(.06)},children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b",style:{borderColor:a(.05),background:a(.02)},children:[e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:"15s Cutdown"}),r.timing&&e.jsx("span",{className:"ml-auto font-mono text-[9px]",style:{color:a(.3)},children:r.timing})]}),e.jsxs("div",{className:"p-4 space-y-2",children:[e.jsx("p",{className:"font-mono text-sm leading-relaxed italic",style:{color:l},children:e.jsx(o,{multiline:!0,path:["cutdown15s","dialogue"],value:r.dialogue})}),r.sfxCues&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:a(.28)},children:["SFX: ",e.jsx(o,{path:["cutdown15s","sfxCues"],value:r.sfxCues})]})]})]})]})]})}function ka({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"p-6 border rounded-md",style:{borderColor:`${n}25`,background:`${n}08`},children:[e.jsx(j,{children:"Viewer Archetype"}),e.jsx("p",{className:"font-['Anton'] uppercase text-3xl",style:{color:n},children:e.jsx(o,{path:["archetypeName"],value:s?.archetypeName})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[e.jsxs(v,{children:[e.jsx(j,{children:"Viewing Behaviour"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["viewingBehaviour"],value:s?.viewingBehaviour})})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Demographics"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["demographics"],value:s?.demographics})})]})]}),(s?.viewingContexts||s?.culturalCues)&&e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[s?.viewingContexts&&e.jsxs(v,{children:[e.jsx(j,{children:"Viewing Contexts"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["viewingContexts"],value:s.viewingContexts})})]}),s?.culturalCues&&e.jsxs(v,{children:[e.jsx(j,{children:"Cultural Cues"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["culturalCues"],value:s.culturalCues})})]})]})]})}function Sa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"py-10 px-6 border rounded-md text-center",style:{borderColor:`${n}25`,background:`${n}06`},children:[e.jsx(j,{children:"The Film Idea"}),e.jsxs("p",{className:"font-['Anton'] uppercase leading-[0.9]",style:{fontSize:"clamp(24px,4vw,48px)",color:n},children:['"',e.jsx(o,{path:["filmLine"],value:s?.filmLine}),'"']})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Directorial Worldview"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["platformNarrative"],value:s?.platformNarrative})})]})]})}function Ra({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.colorPalette||[],t=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:(s?.directions||[]).map((r,m)=>{const p=t[m]??null,x=J(p);return e.jsxs(v,{className:x==="ready"||x==="loading"?"!p-0 overflow-hidden":void 0,children:[x==="ready"&&e.jsx(H,{src:`data:image/png;base64,${p}`,alt:r.label,aspectRatio:"1/1",videoField:s?.videoField,videoIndex:m,context:`${r.label}: ${r.description??""}`}),x==="loading"&&e.jsx(D,{aspectRatio:"1/1",field:s?.videoField,index:m}),(x==="failed"||x==="declined")&&e.jsx(L,{label:r.label,state:x,aspectRatio:"1/1"}),e.jsxs("div",{className:x==="ready"||x==="loading"?"p-4":void 0,children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.hexSwatch&&e.jsx("div",{className:"w-4 h-4 shrink-0 border border-white/10",style:{background:r.hexSwatch}}),e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["directions",m,"label"],value:r.label})})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l}
6,children:e.jsx(o,{multiline:!0,path:["directions",m,"description"],value:r.description})}),e.jsxs("div",{className:"space-y-1 border-t pt-2 mt-1",style:{borderColor:a(.05)},children:[r.referenceFilm&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:`${n}70`},children:["ð¬ ",e.jsx(o,{path:["directions",m,"referenceFilm"],value:r.referenceFilm})]}),r.pinterestQuery&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:`${n}50`},children:["ð ",e.jsx(o,{path:["directions",m,"pinterestQuery"],value:r.pinterestQuery})]})]})]})]},m)})}),c.length>0&&e.jsxs("div",{children:[e.jsx(j,{children:"Colour Palette"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:c.map((r,m)=>e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx("div",{className:"w-10 h-10 border border-white/10",style:{background:r}}),e.jsx("p",{className:"font-mono text-[9px]",style:{color:a(.3)},children:r})]},m))})]}),s?.cinematographyNote&&e.jsxs("div",{className:"p-5 border rounded-md",style:{borderColor:`${n}20`,background:`${n}04`},children:[e.jsx(j,{children:"Cinematography Style"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["cinematographyNote"],value:s.cinematographyNote})})]})]})}function Ma({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.elements||s?.assets||[],t=s?.elements!==void 0?"elements":"assets";return e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:c.map((r,m)=>e.jsx(v,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"font-['Anton'] text-base shrink-0 leading-none mt-0.5",style:{color:n},children:(m+1).toString().padStart(2,"0")}),e.jsxs("div",{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:[t,m,"name"],value:r.name})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:[t,m,"reasoning"],value:r.reasoning})})]})]})},m))})}const Ye=["#FF5C1A","#E8501A","#D0451A","#B83A1A","#A0301A","#882618","#701C16"];function Ia({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.phases||[],t=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-[19px] top-6 bottom-6 w-px",style:{background:"rgba(255,92,26,0.20)"}}),e.jsx("div",{className:"space-y-3",children:c.map((r,m)=>{const p=t[m]??null,x=J(p);return e.jsxs("div",{className:"flex gap-5",children:[e.jsx("div",{className:"relative shrink-0 flex flex-col items-center",style:{width:38},children:e.jsx("div",{className:"w-[38px] h-[38px] border flex items-center justify-center shrink-0 z-10",style:{borderColor:Ye[m]||n,background:u},children:e.jsx("span",{className:"font-['Anton'] text-[10px]",style:{color:Ye[m]||n},children:(m+1).toString().padStart(2,"0")})})}),e.jsxs("div",{className:"flex-1 border overflow-hidden",style:{borderColor:a(.06),background:a(.02)},children:[x==="ready"&&e.jsx(H,{src:`data:image/png;base64,${p}`,alt:r.phase,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:m,context:`${r.phase}: ${r.objective??""}`}),x==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:m}),(x==="failed"||x==="declined")&&e.jsx(L,{label:r.phase,state:x,aspectRatio:"16/9"}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("span",{className:"font-['Anton'] uppercase text-sm",style:{color:Ye[m]||n},children:e.jsx(o,{path:["phases",m,"phase"],value:r.phase})}),e.jsxs("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.08),color:a(.3)},children:["Phase ",m+1]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["phases",m,"objective"],value:r.objective})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 border-t pt-3 mt-2",style:{borderColor:a(.05)},children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Placements"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",m,"targetPlacements"],value:r.targetPlacements})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Signature Asset"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",m,"signatureAsset"],value:r.signatureAsset})})]})]})]})]})]},m)})})]})}function $a({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsx("div",{className:"space-y-3",children:(s?.items||[]).map((t,r)=>{const m=c[r]??null,p=J(m);return e.jsxs(v,{className:p==="ready"||p==="loading"?"!p-0 overflow-hidden":void 0,children:[p==="ready"&&e.jsx(H,{src:`data:image/png;base64,${m}`,alt:t.name,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:r,context:`${t.name}: ${t.description??""}`}),p==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:r}),(p==="failed"||p==="declined")&&e.jsx(L,{label:t.name,state:p,aspectRatio:"16/9"}),e.jsxs("div",{className:p==="ready"||p==="loading"?"p-4":void 0,children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-2 mb-2",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["items",r,"name"],value:t.name})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.format&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.1),color:a(.35)},children:t.format}),t.pillarTag&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:t.pillarTag})]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["items",r,"description"],value:t.description})}),t.viewerHook&&e.jsxs("p",{className:"font-mono text-[10px] border-t pt-2",style:{borderColor:a(.05),color:a(.28)},children:["ð¬ ",e.jsx("span",{className:"",children:e.jsx(o,{path:["items",r,"viewerHook"],value:t.viewerHook})})]})]})]},r)})})}function Pa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.acts||[],t=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsx("div",{className:"space-y-3",children:c.map((r,m)=>{const p=t[m]??null,x=J(p);return e.jsxs("div",{className:"border overflow-hidden",style:{borderColor:a(.06)},children:[x==="ready"&&e.jsx(H,{src:`data:image/png;base64,${p}`,alt:r.title,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:m,context:`${r.title}: ${r.sceneDescription??""}`}),x==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:m}),(x==="failed"||x==="declined")&&e.jsx(L,{label:r.title,state:x,aspectRatio:"16/9"}),e.jsxs("div",{className:"flex items-center gap-3 px-5 py-3 border-b",style:{borderColor:a(.05),background:a(.02)},children:[e.jsxs("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:["ACT ",m+1]}),e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["acts",m,"title"],value:r.title})})]}),e.jsxs("div",{className:"p-5 space-y-3",children:[r.sceneDescription&&e.jsxs("div",{children:[e.jsx(j,{children:"Scene"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["acts",m,"sceneDescription"],value:r.sceneDescription})})]}
6),r.keyVisualFrames&&e.jsxs("div",{className:"p-3 border-l-2",style:{borderColor:`${n}40`,background:`${n}03`},children:[e.jsx(j,{children:"Key Visual Frames"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed italic",style:{color:a(.6)},children:e.jsx(o,{multiline:!0,path:["acts",m,"keyVisualFrames"],value:r.keyVisualFrames})})]}),r.dialogue&&e.jsxs("div",{className:"p-4 border-l-2",style:{borderColor:n,background:`${n}05`},children:[e.jsx(j,{children:"Dialogue / VO"}),e.jsxs("p",{className:"font-mono text-sm leading-relaxed italic",style:{color:l},children:['"',e.jsx(o,{multiline:!0,path:["acts",m,"dialogue"],value:r.dialogue}),'"']})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[r.musicDirection&&e.jsxs("div",{className:"p-3 border rounded-md",style:{borderColor:a(.05),background:a(.01)},children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Music"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.45)},children:e.jsx(o,{path:["acts",m,"musicDirection"],value:r.musicDirection})})]}),r.craftCues&&e.jsxs("div",{className:"p-3 border rounded-md",style:{borderColor:a(.05),background:a(.01)},children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Craft Cues"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.45)},children:e.jsx(o,{path:["acts",m,"craftCues"],value:r.craftCues})})]})]})]})]},m)})})}function Ba({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=J(s?.savedImage),t=s?.showImages!==!1,r=s?.aspectRatio??"16/9";return e.jsxs("div",{className:"space-y-3",children:[t&&(c==="ready"||c==="loading")&&e.jsxs(v,{className:"!p-0 overflow-hidden",children:[c==="ready"&&e.jsx(H,{src:`data:image/png;base64,${s.savedImage}`,alt:s?.idea,aspectRatio:r,videoField:s?.videoField,context:`${s?.idea??""}: ${s?.rationale??""}`}),c==="loading"&&e.jsx(D,{aspectRatio:r,field:s?.videoField})]}),t&&c==="declined"&&e.jsx(v,{className:"!p-0 overflow-hidden",children:e.jsx(L,{state:"declined",aspectRatio:r})}),e.jsxs("div",{className:"p-6 border rounded-md",style:{borderColor:`${n}30`,background:`${n}06`},children:[e.jsx(j,{children:"The Idea"}),e.jsx("p",{className:"font-['Anton'] uppercase leading-tight",style:{fontSize:"clamp(24px,3.5vw,42px)",color:n},children:e.jsx(o,{path:["idea"],value:s?.idea})})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Why It Could Win"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["rationale"],value:s?.rationale})})]})]})}function Fa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsx("div",{className:"space-y-3",children:(s?.shows||[]).map((c,t)=>e.jsxs(v,{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(ge,{className:"w-3.5 h-3.5",style:{color:n}}),e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["shows",t,"name"],value:c.name})})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:(c.categories||[]).map((r,m)=>e.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wider border px-3 py-1",style:{borderColor:`${n}25`,color:n},children:r},m))})]},t))})}function Ta({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"p-6 border rounded-md",style:{borderColor:`${n}25`,background:`${n}08`},children:[e.jsx(j,{children:"Archetype"}),e.jsx("p",{className:"font-['Anton'] uppercase text-3xl",style:{color:n},children:e.jsx(o,{path:["archetypeName"],value:s?.archetypeName})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[e.jsxs(v,{children:[e.jsx(j,{children:"Visual Behaviour"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["visualBehaviour"],value:s?.visualBehaviour})})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Aesthetic Sensibility"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["aestheticSensibility"],value:s?.aestheticSensibility})})]})]}),(s?.culturalContext||s?.demographics)&&e.jsxs("div",{className:"grid md:grid-cols-2 gap-3",children:[s?.culturalContext&&e.jsxs(v,{children:[e.jsx(j,{children:"Cultural Context"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["culturalContext"],value:s.culturalContext})})]}),s?.demographics&&e.jsxs(v,{children:[e.jsx(j,{children:"Demographics"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["demographics"],value:s.demographics})})]})]})]})}function Da({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N();return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"py-10 px-6 border rounded-md text-center",style:{borderColor:`${n}25`,background:`${n}06`},children:[e.jsx(j,{children:"The Design Idea"}),e.jsxs("p",{className:"font-['Anton'] uppercase leading-[0.9]",style:{fontSize:"clamp(24px,4vw,48px)",color:n},children:['"',e.jsx(o,{path:["bigIdea"],value:s?.bigIdea}),'"']})]}),e.jsxs(v,{children:[e.jsx(j,{children:"Design Platform Narrative"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["platformNarrative"],value:s?.platformNarrative})})]})]})}function _a({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.colorPalette||[],t=s?.directions||[],r=Array.isArray(s?.savedImages)?s.savedImages:[],m=C.useContext(Re);return e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:t.map((p,x)=>{const y=r[x]??null;return e.jsxs(v,{className:"!p-0 overflow-hidden",children:[y?e.jsx("img",{src:`data:image/png;base64,${y}`,alt:p.label,className:"w-full block",style:{aspectRatio:"1/1",objectFit:"cover"}}):De(m,s?.videoField,x)?e.jsx(D,{aspectRatio:"1/1",field:s?.videoField,index:x}):e.jsx("div",{className:"w-full flex items-center justify-center",style:{aspectRatio:"1/1",background:a(.02),borderBottom:`1px solid ${a(.05)}`},children:e.jsx("p",{className:"font-['Anton'] uppercase text-center px-4 text-xs",style:{color:a(.18)},children:p.label})}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[p.hexSwatch&&e.jsx("div",{className:"w-4 h-4 shrink-0 border border-white/10",style:{background:p.hexSwatch}}),e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["directions",x,"label"],value:p.label})})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["directions",x,"description"],value:p.description})}),e.jsxs("div",{className:"space-y-1 border-t pt-2 mt-1",style:{borderColor:a(.05)},children:[p.referenceStudio&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:`${n}70`},children:["⦠",e.jsx(o,{path:["directions",x,"referenceStudio"],value:p.referenceStudio})]}),p.pinterestQuery&&e.jsxs("p",{className:"font-mono text-[10px]",style:{color:`${n}50`},children:["ð ",e.jsx(o,{path:["directions",x,"pinterestQuery"],value:p.pinterestQuery})]})]})]})]},x)})}),c.length>0&&e.jsxs("div",{children:[e.jsx(j,{children:"Colour Palette"}),e.jsx("div",{className:"flex gap-2 flex-wrap",children:c.map((p,x)=>e.jsxs("div",{className:"flex flex-col items-center gap-1",children:[e.jsx("div",{className:"w-10 h-10 border border-white/10",style:{background:p}}),e.jsx("p",{className:"font-mono text-[9px]",style:{color:a(.3)},children:p})]},x))})]}),s?.typographyNote&&e.jsxs("div",{className:"p-5 border rounded-md",style:{borderColor:`${n}20`,background:`${n}04`},children:[e.jsx(j,{children:"Typography Direction"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["typographyNote"],value:s.typographyNote})})]})]})}function Ea({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.elements||[],t=s?.showImages===!0,r=J(s?.savedImage);return e.jsxs("div",{className:"space-y-3",children:[t&&(r==="ready"||r==="loading")&&e.jsxs(v,{className:"!p-0 overflow-hidden",children:[r==="ready"&&e.jsx(H,{src:`data:image/png;base64,${s.savedImage}`,alt:"Identity System",aspectRatio:"16/9",videoField:s?.videoField,context:"Identity System"}),r==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField})]}),t&&r==="declined"&&e.jsx(v,{className:"!p-0 overflow-hidden",children:e.jsx(L,{state:"declined",aspectRatio:"16/9"})}),e.jsx("div",{className:"grid md:grid-cols-2 gap-3",children:c.map((m,p)=>e.jsx(v,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"font-['Anton'] text-base shrink-0 leading-none mt-0.5",style:{color:n},children:(p+1).toString().padStart(2,"0")}),e.jsxs("div",{children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base mb-1",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["elements",p,"name"],value:m.name})}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["elements",p,"reasoning"],value:m.reasoning})})]})]})},p))})]})}const Xe=["#FF5C1A","#E8501A","#D0451A","#B83A1A","#A0301A","#882618","#701C16"];function Wa({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),{BG:c}=Ts(),t=s?.phases||[],r=s?.showImages===!0,m=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-[19px] top-6 bottom-6 w-px",style:{background:"rgba(255,92,26,0.20)"}}),e.jsx("div",{className:"space-y-3",children:t.map((p,x)=>{const y=m[x]??null,w=J(y),B=r&&!!p?.phase;return e.jsxs("div",{className:"flex gap-5",children:[e.jsx("div",{className:"relative shrink-0 flex flex-col items-center",style:{width:38},children:e.jsx("div",{className:"w-[38px] h-[38px] border flex items-center justify-center shrink-0 z-10",style:{borderColor:Xe[x]||n,background:c},children:e.jsx("span",{className:"font-['Anton'] text-[10px]",style:{color:Xe[x]||n},children:(x+1).toString().padStart(2,"0")})})}),e.jsxs("div",{className:"flex-1 border overflow-hidden",style:{borderColor:a(.06),background:a(.02)},children:[B&&(w==="ready"?e.jsx(H,{src:`data:image/png;base64,${y}`,alt:p.phase,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:x,context:`${p.phase}: ${p.objective??""}`}):w==="loading"?e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:x}):e.jsx(L,{label:p.phase,state:w,aspectRatio:"16/9"})),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("span",{className:"font-['Anton'] uppercase text-sm",style:{color:Xe[x]||n},children:e.jsx(o,{path:["phases",x,"phase"],value:p.phase})}),e.jsxs("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.08),color:a(.3)},children:["Phase ",x+1]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["phases",x,"objective"],value:p.objective})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 border-t pt-3 mt-2",style:{borderColor:a(.05)},children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Key Deliverable"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",x,"keyDeliverable"],value:p.keyDeliverable})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Signature Output"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.4)},children:e.jsx(o,{path:["phases",x,"signatureOutput"],value:p.signatureOutput})})]})]})]})]})]},x)})})]})}function Ja({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.showImages===!0,t=Array.isArray(s?.savedImages)?s.savedImages:[];return e.jsx("div",{className:"space-y-3",children:(s?.items||[]).map((r,m)=>{const p=t[m]??null,x=J(p);return e.jsxs(v,{className:c&&(x==="ready"||x==="loading")?"!p-0 overflow-hidden":void 0,children:[c&&x==="ready"&&e.jsx(H,{src:`data:image/png;base64,${p}`,alt:r.name,aspectRatio:"16/9",videoField:s?.videoField,videoIndex:m,context:`${r.name}: ${r.description??""}`}),c&&x==="loading"&&e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:m}),c&&(x==="failed"||x==="declined")&&e.jsx(L,{label:r.name,state:x,aspectRatio:"16/9"}),e.jsxs("div",{className:c&&(x==="ready"||x==="loading")?"p-4":void 0,children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-2 mb-2",children:[e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["items",m,"name"],value:r.name})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.format&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:a(.1),color:a(.35)},children:r.format}),r.pillarTag&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:r.pillarTag})]})]}),e.jsx("p",{className:"font-mono text-sm leading-relaxed mb-2",style:{color:l},children:e.jsx(o,{multiline:!0,path:["items",m,"description"],value:r.description})}),r.impactNote&&e.jsxs("p",{className:"font-mono text-[10px] border-t pt-2",style:{borderColor:a(.05),color:a(.28)},children:["⦠",e.jsx("span",{className:"",children:e.jsx(o,{path:["items",m,"impactNote"],value:r.
6impactNote})})]})]})]},m)})})}function La({data:s}){const{isDark:i,fg:a,WARM:l,cardBg:u,cardBdr:g}=N(),c=s?.acts||[],t=Array.isArray(s?.savedImages)?s.savedImages:[],r=s?.showImages===!0,m=C.useContext(Re);return e.jsx("div",{className:"space-y-3",children:c.map((p,x)=>{const y=t[x]??null,w=J(y);return e.jsxs("div",{className:"border overflow-hidden",style:{borderColor:a(.06)},children:[r?w==="ready"?e.jsx("img",{src:`data:image/png;base64,${y}`,alt:p.title,className:"w-full block",style:{aspectRatio:"16/9",objectFit:"cover",borderBottom:`1px solid ${n}`}}):w==="failed"||w==="declined"?e.jsx(L,{label:p.title,state:w,aspectRatio:"16/9"}):De(m,s?.videoField,x)?e.jsx(D,{aspectRatio:"16/9",field:s?.videoField,index:x}):e.jsx("div",{className:"w-full flex items-center justify-center",style:{aspectRatio:"16/9",background:a(.02),borderBottom:`1px solid ${a(.05)}`},children:e.jsx("p",{className:"font-['Anton'] uppercase text-center px-4 text-xs",style:{color:a(.18)},children:p.title})}):e.jsx("div",{className:"w-full flex items-center justify-center px-6",style:{aspectRatio:"16/9",background:a(.02),borderBottom:`1px solid ${a(.05)}`},children:e.jsx("p",{className:"font-['Anton'] uppercase text-center text-xs",style:{color:a(.18)},children:p.title})}),e.jsxs("div",{className:"flex items-center gap-3 px-5 py-3 border-b",style:{borderColor:a(.05),background:a(.02)},children:[e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-2 py-0.5",style:{borderColor:`${n}30`,color:n},children:(x+1).toString().padStart(2,"0")}),e.jsx("p",{className:"font-['Anton'] uppercase text-base",style:{color:i?"#fff":"#1A0500"},children:e.jsx(o,{path:["acts",x,"title"],value:p.title})})]}),e.jsxs("div",{className:"p-5 space-y-3",children:[p.context&&e.jsxs("div",{children:[e.jsx(j,{children:"Context"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:e.jsx(o,{multiline:!0,path:["acts",x,"context"],value:p.context})})]}),p.visualDescription&&e.jsxs("div",{className:"p-3 border-l-2",style:{borderColor:`${n}40`,background:`${n}03`},children:[e.jsx(j,{children:"Visual Description"}),e.jsx("p",{className:"font-mono text-sm leading-relaxed italic",style:{color:a(.6)},children:e.jsx(o,{multiline:!0,path:["acts",x,"visualDescription"],value:p.visualDescription})})]}),p.designRationale&&e.jsxs("div",{className:"p-4 border-l-2",style:{borderColor:n,background:`${n}05`},children:[e.jsx(j,{children:"Design Rationale"}),e.jsxs("p",{className:"font-mono text-sm leading-relaxed",style:{color:l},children:['"',e.jsx(o,{multiline:!0,path:["acts",x,"designRationale"],value:p.designRationale}),'"']})]}),p.productionNote&&e.jsxs("div",{className:"p-3 border rounded-md",style:{borderColor:a(.05),background:a(.01)},children:[e.jsx("p",{className:"font-mono text-[9px] uppercase tracking-wider mb-1",style:{color:`${n}50`},children:"Production Note"}),e.jsx("p",{className:"font-mono text-[10px]",style:{color:a(.45)},children:e.jsx(o,{path:["acts",x,"productionNote"],value:p.productionNote})})]})]})]},x)})})}function Ka(s,i){return s==="titleSlide"?a=>e.jsx(Jr,{...a,discipline:i}):s==="objectives"?Lr:s==="targetAudience"?i==="design"?Ta:Kr:s==="targetStakeholders"?oa:s==="problemStatement"?Hr:s==="strategicPillars"?Vr:s==="keyDifferentiators"?Or:s==="creativePlatform"?Gr:s==="campaignPlatform"?Ur:s==="prPlatform"?la:s==="creativePillars"?zr:s==="creativeTagline"||s==="campaignTagline"?Ge:s==="visualMoodboard"?i==="tvc"?Ra:i==="design"?_a:!i||i==="brand_experience"?Yr:qr:s==="materialMoodboard"?Qr:s==="eventIdentity"?Xr:s==="experienceArchitecture"?Zr:s==="activations"?ea:s==="peakMoment"?sa:s==="contentPillars"?ta:s==="campaignJourney"?ra:s==="channelPlays"?aa:s==="heroMoment"?na:s==="narrativeAngles"?ca:s==="earnedMediaJourney"?da:s==="prPlays"?pa:s==="heroStunt"?ma:s==="targetListener"?xa:s==="sonicPlatform"?ua:s==="sonicMoodboard"?ga:s==="sonicIdentityKit"?ha:s==="audioCampaignJourney"?fa:s==="audioFormats"?ya:s==="heroSpot"?i==="radio"?wa:ja:s==="radioPlatform"?ba:s==="radioSonicMoodboard"?va:s==="radioVoiceKit"?Na:s==="radioCampaignJourney"?Ca:s==="radioFormats"?Aa:s==="targetViewer"?ka:s==="filmPlatform"?Sa:s==="craftKit"?Ma:s==="filmCampaignJourney"?Ia:s==="filmFormats"?$a:s==="heroFilm"?Pa:s==="designPlatform"?Da:s==="designLine"?Ge:s==="identitySystem"?Ea:s==="designJourney"?Wa:s==="applicationSuite"?Ja:s==="heroApplication"?La:s==="wildcard"?Ba:s==="awards"?Fa:null}function pn(){const s=lt(),i=Number(s.id),a=it(),l=new URLSearchParams(a).get("adminSecret")??void 0,[u,g]=C.useState(null),[c,t]=C.useState(!1),[r,m]=C.useState(!1),[p,x]=C.useState(!1),{isDark:y}=Ns(),w=y?"#0D0200":"#ffffff",B=y?"rgba(13,2,0,0.92)":"rgba(255,255,255,0.93)",Q=y?"rgba(255,255,255,0.06)":"rgba(26,5,0,0.08)",P=d=>y?`rgba(255,255,255,${d})`:`rgba(26,5,0,${d}
6)`,K=y?"#ffffff":"#1A0500",I=P,te=y?"rgba(255,255,255,0.08)":"rgba(26,5,0,0.10)",[Z,U]=C.useState(!1),[G,O]=C.useState(!1),{user:W}=bt(),_=Cs(),{data:F}=ct({userId:W?.id??""},{query:{enabled:!!W?.id,queryKey:Pe({userId:W?.id??""})}}),me=F?.plan??"free";C.useEffect(()=>{if(sessionStorage.getItem("strite_token_used")){sessionStorage.removeItem("strite_token_used"),x(!0);const f=setTimeout(()=>x(!1),5e3);return()=>clearTimeout(f)}},[]);const de=!!i&&!Number.isNaN(i),{data:R,isLoading:z,error:re,refetch:xe,isFetching:le}=dt(i,{query:{enabled:de,queryKey:l?[...oe(i),{adminSecret:l}]:oe(i),...l&&de?{queryFn:({signal:d})=>yt(i,{signal:d,headers:{"x-admin-secret":l}})}:{},retry:2,retryDelay:d=>Math.min(1e3*2**d,4e3)}}),ae=R?.generationStatus,ee=ae==="pending"||ae==="images_pending",{frames:ue}=hr(i?String(i):void 0,ee),ie=Object.values(ue)[0],$=pt(),S=mt(),se=xt(),ne=ut(),fe=gt(),rs=ht(),[as,ns]=C.useState(new Set),[os,ls]=C.useState(new Set),[Me,is]=C.useState(new Set),[ye,_e]=C.useState(new Set),[Ls,Ie]=C.useState(new Set),[cs,ds]=C.useState(null),[ps,Ee]=C.useState(""),[,Ks]=ft(),Hs=d=>{_e(f=>{const h=new Set(f);return h.has(d)?h.delete(d):h.add(d),h})},Vs=async()=>{if(!W?.id||ye.size===0||fe.isPending)return;const d=Array.from(ye);Ie(new Set(d));try{await fe.mutateAsync({id:i,data:{sectionKeys:d,instruction:ps.trim()||void 0}}),_.invalidateQueries({queryKey:oe(i)}),_.invalidateQueries({queryKey:Pe()}),_e(new Set),Ee(""),E.success(`Regenerating ${d.length} card${d.length===1?"":"s"}⦠this can take a few minutes, feel free to navigate away.`)}catch(f){const h=f?.status??f?.response?.status,b=f?.response?.data?.error;h===402?E.error(b||"Not enough Studio Credits for this regeneration."):h===403?E.error(b||"Card regeneration isn't available on your plan."):h===409?E.error(b||"One of these cards is already regenerating."):E.error(b||"Card regeneration failed. Please try again."),Ie(new Set)}},Os=async d=>{if(!(!W?.id||rs.isPending)){ds(d);try{await rs.mutateAsync({id:i,data:{sectionKey:d}}),_.invalidateQueries({queryKey:oe(i)}),E.success("Reverted to the previous version.")}catch{E.error("Nothing to revert for this card.")}finally{ds(null)}}},Gs=(d,f,h,b)=>{if(!W?.id||S.isPending)return;const A=Ze.find(T=>T.sec===b)?.credits??1/0;if($e<A){E.error("Not enough credits to generate a video. Buy a pack or upgrade your plan.");return}const M=Ne(d,f);as.has(M)||(ns(T=>new Set(T).add(M)),S.mutate({id:i,data:{userId:W.id,field:d,index:f,context:h,durationSec:b}},{onSuccess:()=>{_.invalidateQueries({queryKey:oe(i)})},onError:T=>{const q=T?.status??T?.response?.status;E.error(q===402?"Not enough credits to generate a video.":"Video generation failed. Please try again.")},onSettled:()=>{ns(T=>{const q=new Set(T);return q.delete(M),q})}}))},Us=(d,f,h)=>{if(!W?.id||se.isPending)return;if($e<Es){E.error("Not enough credits to regenerate this image. Buy a pack or upgrade your plan.");return}const b=Ne(d,f);os.has(b)||(ls(A=>new Set(A).add(b)),se.mutate({id:i,data:{userId:W.id,field:d,index:f,context:h}},{onSuccess:A=>{A?.status==="declined"?E.error("The image provider declined this request. Please try a different image."):A?.status==="failed"?E.error(A?.error||"Image regeneration failed. Please try again."):_.invalidateQueries({queryKey:oe(i)})},onError:A=>{const M=A?.status??A?.response?.status;E.error(M===402?"Not enough credits to regenerate this image.":"Image regeneration failed. Please try again.")},onSettled:()=>{ls(A=>{const M=new Set(A);return M.delete(b),M})}}))},zs=(d,f,h)=>{if(!W?.id)return;const b=Ne(d,f);Me.has(b)||(is(A=>new Set(A).add(b)),ne.mutate({id:i,data:{userId:W.id,field:d,index:f,scale:h}},{onSuccess:A=>{if(A?.status==="failed")E.error(A?.error||"Upscale failed â credits refunded.");else if(A?.imageBase64){const M=`${d}_${h}x`;_.setQueryData(oe(i),T=>{if(!T)return T;const q={...T.strategyJson??{}};if(f!=null){const ve=Array.isArray(q[M])?[...q[M]]:[];ve[f]=A.imageBase64,q[M]=ve}else q[M]=A.imageBase64;return{...T,strategyJson:q}}),E.success("Image upscaled successfully."),_.invalidateQueries({queryKey:Pe()})}
6else _.invalidateQueries({queryKey:oe(i)})},onError:A=>{const M=A?.status??A?.response?.status;M===402?E.error("Not enough Studio Credits to upscale. Credits were not charged."):M===413?E.error("Image is too large for upscaling â credits refunded."):E.error("Upscale failed â please try again.")},onSettled:()=>{is(A=>{const M=new Set(A);return M.delete(b),M})}}))},qs=async()=>{if(!(!W?.id||G)){U(!1),O(!0);try{const d=await $.mutateAsync({id:i,data:{userId:W.id}});Ks(`/studio/${d.id}`)}catch(d){O(!1);const f=d?.response?.data?.error??"Could not regenerate. Check your quota.";E.error(f)}}};C.useEffect(()=>{const d=R;if(!d||d.generationStatus!=="pending"&&d.generationStatus!=="images_pending"&&d.generationStatus!=="videos_pending"||Me.size>0)return;let f=!1,h;const b=async()=>{try{const A=await fetch(`/api/strategies/${i}/generation-status`,{cache:"no-store"});if(!A.ok)throw new Error(`HTTP ${A.status}`);const T=(await A.json()).generationStatus;if(T&&T!==d.generationStatus){await _.invalidateQueries({queryKey:oe(i)});return}}catch{}f||(h=setTimeout(b,3e3))};return h=setTimeout(b,3e3),()=>{f=!0,h&&clearTimeout(h)}},[R?.generationStatus,i,Me.size]);const ce=R?.strategyJson?.cardRegenerationStatus??{},We=Object.keys(ce).filter(d=>ce[d]==="pending"),ms=C.useRef({});C.useEffect(()=>{if(We.length===0)return;let d=!1,f;const h=async()=>{try{const b=await fetch(`/api/strategies/${i}/regeneration-status`,{cache:"no-store"});if(!b.ok)throw new Error(`HTTP ${b.status}`);const M=(await b.json()).status??{};if(!We.some(q=>M[q]==="pending")){await _.invalidateQueries({queryKey:oe(i)});return}}catch{}d||(f=setTimeout(h,3e3))};return f=setTimeout(h,3e3),()=>{d=!0,f&&clearTimeout(f)}},[We.length,i]),C.useEffect(()=>{const d=ms.current,f=[],h=[];for(const[b,A]of Object.entries(ce))d[b]==="pending"&&A==="ready"&&f.push(b),d[b]==="pending"&&A==="failed"&&h.push(b);f.length>0&&(E.success(`Regenerated ${f.length} card${f.length===1?"":"s"}
6.`),_.invalidateQueries({queryKey:Pe()})),h.length>0&&E.error("Card regeneration failed. Your credits have been refunded."),(f.length>0||h.length>0)&&Ie(b=>{const A=new Set(b);return[...f,...h].forEach(M=>A.delete(M)),A}),ms.current={...d,...ce}},[JSON.stringify(ce)]),C.useEffect(()=>{Ie(d=>{const f=new Set(d);let h=!1;for(const b of d){const A=ce[b];(A==="ready"||A==="failed")&&(f.delete(b),h=!0)}return h?f:d})},[JSON.stringify(ce)]);const Qs=async()=>{if(!(me==="pro"||me==="strategist"||me==="agency")){m(!0);return}if(!(!R||c)){t(!0);try{await jt(R)}catch(f){console.error("PPTX export error:",f),E.error("Export failed. Please try again.")}finally{t(!1)}}};if(!de)return e.jsx("div",{className:"p-12 text-center",style:{background:w,color:K},children:"Strategy not found."});if(z)return e.jsxs("div",{className:"p-8",style:{background:w,flex:1,minHeight:0,overflowY:"auto"},children:[e.jsx(gs,{className:"h-10 w-48 mb-12 bg-white/5"}),[1,2,3].map(d=>e.jsx(gs,{className:"h-48 w-full mb-4 bg-white/5"},d))]});if(!R){const f=re?.status===404;return e.jsx("div",{className:"p-12 text-center",style:{background:w,color:K},children:f?"Strategy not found.":e.jsxs("div",{className:"flex flex-col items-center gap-4",children:[e.jsx("p",{children:"Couldn't load this strategy. This can happen on a slow connection."}),e.jsx("button",{onClick:()=>xe(),disabled:le,className:"font-mono text-xs uppercase tracking-wide px-4 py-2 rounded border border-white/20 hover:bg-white/10 disabled:opacity-50",children:le?"Retryingâ¦":"Retry"})]})})}if(R.generationStatus==="failed")return e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center relative overflow-hidden",style:{background:w},children:[e.jsx(Ce,{href:"/dashboard",children:e.jsxs("button",{className:"absolute top-6 left-6 flex items-center gap-2 font-['JetBrains_Mono'] text-[11px] uppercase tracking-[0.22em] transition-colors",style:{color:P(.4)},children:[e.jsx("span",{style:{fontSize:12},children:"â"})," Dashboard"]})}),e.jsxs("div",{className:"w-full max-w-sm px-8 text-center",children:[e.jsx("div",{className:"w-12 h-12 mx-auto mb-8 rounded-full flex items-center justify-center",style:{background:"rgba(255,45,0,0.12)",border:"1px solid rgba(255,45,0,0.25)"},children:e.jsx("span",{style:{color:"#FF2D00",fontSize:20},children:"â"})}),e.jsx("h2",{className:"font-['Anton'] text-2xl uppercase tracking-wide mb-3",style:{color:K},children:"Generation Failed"}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-xs leading-relaxed mb-8",style:{color:P(.55)},children:"The server was restarted while your strategy was generating. Go back to the dashboard and generate a new one â it only takes 90 seconds."}),e.jsx(Ce,{href:"/dashboard",children:e.jsx("button",{className:"font-['JetBrains_Mono'] text-xs uppercase tracking-[0.18em] px-6 py-3 rounded transition-colors",style:{background:"rgba(255,92,26,0.15)",border:"1px solid rgba(255,92,26,0.35)",color:n},children:"Back to Dashboard"})})]})]});if(R.generationStatus==="pending"){const d=["Understanding the brief","Defining strategic pillars","Shaping creative direction"];return e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center relative overflow-hidden",style:{background:w,cursor:"none"},children:[e.jsx(us,{}),e.jsx(Ce,{href:"/dashboard",children:e.jsxs("button",{className:"absolute top-6 left-6 flex items-center gap-2 font-['JetBrains_Mono'] text-[11px] uppercase tracking-[0.22em] transition-colors hover:text-white",style:{color:I(.45),cursor:"none"},children:[e.jsx("span",{style:{fontSize:12},children:"â"})," Dashboard"]})}),e.jsxs("div",{className:"w-full max-w-md px-8 text-center",children:[ie?e.jsxs("div",{className:"relative w-40 h-40 mx-auto mb-10 rounded-lg overflow-hidden border",style:{borderColor:"rgba(255,92,26,0.3)"},children:[e.jsx("img",{src:ie,alt:"Live preview",className:"w-full h-full object-cover",style:{filter:"blur(1.5px)",animation:"strite-sharpen 0.6s ease-out forwards"}},ie),e.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{boxShadow:"inset 0 0 24px rgba(255,92,26,0.25)"}})]}):e.jsxs("div",{className:"relative w-16 h-16 mx-auto mb-10",children:[e.jsx("div",{className:"absolute inset-0 rounded-full border-2",style:{borderColor:"rgba(255,92,26,0.15)"}}),e.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-transparent animate-spin",style:{borderTopColor:n}}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"w-2 h-2 rounded-full animate-pulse",style:{background:n}})})]}),e.jsx("style",{children:`
7 @keyframes strite-sharpen { 8 from { filter: blur(6px); opacity: 0.6; } 9 to { filter: blur(1.5px); opacity: 1; } 10 } 11 `}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-[10px] uppercase tracking-[0.35em] mb-4",style:{color:`${n}80`},children:"Generating"}),e.jsx("h1",{className:"font-['Anton'] uppercase leading-none mb-3",style:{fontSize:"clamp(28px,5vw,42px)",color:K},children:R.projectName}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-[11px] uppercase tracking-[0.25em] mb-10",style:{color:n},children:R.clientName}),e.jsx("div",{className:"space-y-3 flex flex-col items-center",children:d.map((f,h)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-1 h-1 rounded-full shrink-0 animate-pulse",style:{background:n,animationDelay:`${h*.4}s`}}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-xs uppercase tracking-[0.18em]",style:{color:I(.45)},children:f})]},h))}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-[10px] mt-10",style:{color:I(.35)},children:"You can leave this page â generation continues in the background."})]})]})}const k=R.discipline,Ys=_r(k),Je=Er(k),Xs=R?.extraBriefFields?.designDisciplineType,Zs=k==="design"&&Xs==="Product Design"?{...Je,identitySystem:{...Je.identitySystem,title:"Product System"}}:Je,xs={brand_experience:"Brand Experience",marketing:"Marketing",pr:"PR",audio_ads:"Audio Ads",tvc:"TVC",radio:"Radio",design:"Design"},Le=(d,f=0)=>d==null?"":typeof d=="string"?d:typeof d=="number"||typeof d=="boolean"?String(d):Array.isArray(d)?d.map((h,b)=>{const A=" ".repeat(f*2);return typeof h=="object"&&h!==null?`${A}${b+1}. ${Le(h,f+1)}`:`${A}⢠${h}`}).join(` 12`):typeof d=="object"?Object.entries(d).filter(([,h])=>h!=null&&h!=="").map(([h,b])=>{const A=h.replace(/([A-Z])/g," $1").replace(/^./,T=>T.toUpperCase()).trim(),M=" ".repeat(f*2);if(typeof b=="object"&&b!==null){const T=Le(b,f+1);return`${M}${A}: 13${T.split(` 14`).map(q=>" "+q).join(` 15`)}`}return`${M}${A}: ${b}`}).join(` 16`):String(d),et=new Set(["savedImage","savedImages","savedImagesByAct","videoField","aspectRatio","showImages","userPlan","brand_logo_base64"]),Ke=d=>d==null||typeof d!="object"?d:Array.isArray(d)?d.map(Ke):Object.fromEntries(Object.entries(d).filter(([f])=>!et.has(f)).map(([f,h])=>[f,Ke(h)])),st=(d,f)=>{navigator.clipboard.writeText(Le(Ke(f))),g(d),E.success("Copied"),setTimeout(()=>g(null),2e3)},tt=R.strategyJson?.generatedVideos??{},$e=F?Math.max(0,(F.creditAllowance??0)-(F.creditsUsedThisCycle??0))+(F.creditBalance??0):0;return e.jsx(Fs.Provider,{value:{isDark:y,BG:w,FG:K,fg:P,GBORDER:te},children:e.jsx(_s.Provider,{value:R?.generationMode??"presentation",children:e.jsx(Re.Provider,{value:ue,children:e.jsx(Js.Provider,{value:{strategyId:i,totalCreditsAvailable:$e,pendingUpscaleKeys:Me,requestUpscale:zs,strategyJson:R?.strategyJson??null},children:e.jsx(Ws.Provider,{value:{strategyId:i,totalCreditsAvailable:$e,generatedVideos:tt,pendingKeys:as,requestVideo:Gs,pendingRegenKeys:os,requestRegenerate:Us},children:e.jsxs("div",{className:"strategy-page relative",style:{background:w,cursor:"none",flex:1,minHeight:0,overflowY:"auto"},children:[e.jsx("div",{className:"no-print",children:e.jsx(us,{})}),e.jsxs("nav",{className:"sticky top-0 z-50 flex items-center justify-between px-4 sm:px-8 h-16",style:{background:B,backdropFilter:"blur(20px)",borderBottom:`1px solid ${Q}`},children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(Ce,{href:"/dashboard",children:e.jsxs("button",{className:"flex items-center gap-2 font-['JetBrains_Mono'] text-[11px] uppercase tracking-[0.22em] transition-colors",style:{color:P(.45),cursor:"none"},onMouseEnter:d=>{d.currentTarget.style.color=y?"#fff":"#1A0500"},onMouseLeave:d=>{d.currentTarget.style.color=P(.45)},children:[e.jsx(vt,{className:"w-3 h-3"})," Projects"]})}),e.jsx("span",{className:"hidden sm:block w-px h-4",style:{background:P(.1)}}),e.jsxs("div",{className:"hidden sm:block",children:[e.jsx("p",{className:"font-['JetBrains_Mono'] text-[10px] uppercase tracking-[0.22em]",style:{color:`${n}80`},children:R.clientName}),e.jsx("p",{className:"font-['JetBrains_Mono'] uppercase text-base leading-none font-bold",style:{color:y?"#fff":"#1A0500"},children:R.projectName})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>U(!0),disabled:G,className:"font-['JetBrains_Mono'] uppercase border px-3 sm:px-5 py-2 text-[12px] transition-all duration-200 disabled:opacity-50 rounded-md flex items-center gap-1.5",style:{borderColor:P(.18),color:P(.55),background:"transparent",curs
16or:"none"},onMouseEnter:d=>{if(!G){const f=d.currentTarget;f.style.borderColor=P(.4),f.style.color=y?"#fff":"#1A0500"}},onMouseLeave:d=>{if(!G){const f=d.currentTarget;f.style.borderColor=P(.18),f.style.color=P(.55)}},children:[e.jsx(Ae,{className:`w-3.5 h-3.5 shrink-0 ${G?"animate-spin":""}`}),e.jsx("span",{className:"hidden sm:inline",children:G?"REGENERATINGâ¦":"REGENERATE"})]}),e.jsxs("button",{onClick:()=>Qs(),disabled:c||ee,title:ee?"Visuals still generating â export available once complete":"Export a PPTX deck",className:"font-['JetBrains_Mono'] uppercase border px-3 sm:px-5 py-2 text-[12px] transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed rounded-md flex items-center gap-1.5",style:{borderColor:P(.18),color:P(.45),background:"transparent",cursor:"none"},onMouseEnter:d=>{if(!c&&!ee){const f=d.currentTarget;f.style.borderColor=P(.4),f.style.color=y?"#fff":"#1A0500"}},onMouseLeave:d=>{if(!c&&!ee){const f=d.currentTarget;f.style.borderColor=P(.18),f.style.color=P(.45)}},children:[e.jsx(Nt,{className:"w-3.5 h-3.5 shrink-0"}),e.jsx("span",{className:"hidden sm:inline",children:c?"EXPORTINGâ¦":ee?"GENERATINGâ¦":"PPTX"})]}),e.jsx(Ce,{href:"/studio",children:e.jsx("button",{className:"font-['JetBrains_Mono'] uppercase text-xs px-6 py-2 flex items-center gap-2 transition-all duration-300 rounded-md",style:{border:`1px solid ${n}`,background:"rgba(255,92,26,0.16)",backdropFilter:"blur(12px)",cursor:"none",color:y?"#fff":"#1A0500"},onMouseEnter:d=>{d.currentTarget.style.background="rgba(255,92,26,0.30)",d.currentTarget.style.boxShadow="0 0 30px rgba(255,92,26,0.25)"},onMouseLeave:d=>{d.currentTarget.style.background="rgba(255,92,26,0.16)",d.currentTarget.style.boxShadow="none"},children:"+ New Brief"})})]})]}),p&&e.jsxs("div",{className:"no-print relative z-40 w-full px-4 py-3 flex items-center justify-center gap-3",style:{background:"rgba(13,2,0,0.92)",borderBottom:"1px solid rgba(255,92,26,0.22)",backdropFilter:"blur(12px)"},children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0 animate-pulse flex-shrink-0",style:{background:n}}),e.jsxs("p",{className:"font-['JetBrains_Mono'] text-[11px] uppercase tracking-[0.14em] text-center",style:{color:"rgba(255,92,26,0.85)"},children:["Monthly credit allowance used. Drawing from your credit balance.",F&&F.creditBalance!=null&&e.jsxs(e.Fragment,{children:[" ","You have ",F.creditBalance," credit",F.creditBalance===1?"":"s"," remaining."]})]}),e.jsx("button",{onClick:()=>x(!1),className:"font-['JetBrains_Mono'] text-[10px] ml-1 flex-shrink-0",style:{color:I(.35),cursor:"none",background:"none",border:"none",padding:0},children:"â"})]}),e.jsxs("div",{id:"print-content",children:[e.jsxs("div",{className:"deck-header max-w-5xl mx-auto px-8 pt-14 pb-12 border-b relative z-10",style:{borderColor:te},children:[e.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[e.jsx("p",{className:"font-['JetBrains_Mono'] text-[10px] uppercase tracking-[0.3em]",style:{color:n},children:"16-Card Strategy Deck"}),k&&xs[k]&&e.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wider border px-3 py-1",style:{borderColor:`${n}30`,color:`${n}80`},children:xs[k]})]}),e.jsx("h1",{className:"font-['Anton'] uppercase leading-none mb-4",style:{fontSize:"clamp(40px,6vw,72px)",color:K},children:R.projectName}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-sm leading-relaxed",style:{color:P(.6)},children:R.briefSummary})]}),e.jsx("main",{id:"deck-output",className:"max-w-5xl mx-auto px-8 py-10 space-y-4 relative z-10",children:Ys.map((d,f)=>{const h=R.strategyJson,b=h?.[d],A=R.generationStatus==="images_pending"||(h?.designCard14Images?.length??0)>0||(h?.designJourneyImages?.length??0)>0||(h?.designApplicationSuiteImages?.length??0)>0||typeof h?.designIdentitySystemImage=="string"||typeof h?.designWildcardImage=="string",M=d==="visualMoodboard"&&(!k||k==="brand_experience")?{...b,materials:h?.materialMoodboard?.materials??[],savedImages:h?.card10Images??[],materialSavedImages:h?.card11Images??[],videoField:"card10Images",materialVideoField:"card11Images"}:d==="eventIdentity"&&(!k||k==="brand_experience")?{...b,savedImage:h?.eventIdentityKeyVisualImage??null,savedImages:h?.eventIdentityElementImages??[],videoField:"eventIdentityKeyVisualImage",elementsVideoField:"eventIdentityElementImages"}:d==="visualMoodboard"&&k==="design"?{...b,savedImages:h?.designCard10Images??[],videoField:"designCard10Images"}:d==="heroApplication"&&k==="design"?{...b,savedImages:h?.designCard14Images??[],showImages:A,videoField:"designCard14Images"}:d==="identitySystem"&&k==="design"?{...b,savedImage:h?.designIdentitySystemImage??null,showImages:A,videoField:"designIdentitySystemImage"}:d==="designJourney"&&k==="design"?{...b,savedImages:h?.designJourneyImages??[],showImages:A,videoField:"designJourneyImages"}:d==="applicationSuite"&&k==="design"?{...b,savedImages:h?.designApplicationSuiteImages??[],showImages:A,videoField:"designApplicationSuiteImages"}:d==="visualMoodboard"&&k==="marketing"?{...b,savedImages:h?.marketingMoodboardImages??[],videoField:"marketingMoodboardImages"}:d==="experienceArchitecture"&&(!k||k==="brand_experience")?{...b,savedImagesByAct:h?.experienceArchitectureImages??{}}:d==="activations"&&(!k||k==="brand_experience")?{...b,savedImages:h?.activationImages??[],videoField:"activationImages"}:d==="peakMoment"&&(!k||k==="brand_experience")?{...b,savedImage:h?.peakMomentImage??null,videoField:"peakMomentImage"}:d==="wildcard"&&(!k||k==="brand_experience")?{...b,savedImage:h?.cannesWildcardImage??null,videoField:"cannesWildcardImage"}:d==="wildcard"&&k==="design"?{...b,savedImage:h?.designWildcardImage??null,showImages:A,videoField:"designWildcardImage"}:d==="wildcard"&&k==="marketing"?{...b,savedImage:h?.marketingCannesWildcardImage??null,aspectRatio:"16/9",videoField:"marketingCannesWildcardImage"}:d==="heroMoment"&&k==="marketing"?{...b,savedImages:h?.marketingHeroMomentImages??[],videoField:"marketingHeroMomentImages"}:d==="campaignJourney"&&k==="marketing"?{...b,savedImages:h?.marketingCampaignJourneyImages??[],videoField:"marketingCampaignJourneyImages"}:d==="channelPlays"&&k==="marketing"?{...b,savedImages:h?.marketingChannelPlaysImages??[],videoField:"marketingChannelPlaysImages"}:d==="visualMoodboard"&&k==="tvc"?{...b,savedImages:h?.tvcMoodboardImages??[],videoField:"tvcMoodboardImages"}:d==="wildcard"&&k==="tvc"?{...b,savedImage:h?.tvcCannesWildcardImage??null,aspectRatio:"16/9",videoField:"tvcCannesWildcardImage"}:d==="heroFilm"&&k==="tvc"?{...b,savedImages:h?.tvcHeroFilmImages??[],videoField:"tvcHeroFilmImages"}:d==="filmCampaignJourney"&&k==="tvc"?{...b,savedImages:h?.tvcFilmCampaignJourneyImages??[],videoField:"tvcFilmCampaignJourneyImages"}:d==="filmFormats"&&k==="tvc"?{...b,savedImages:h?.tvcFilmFormatsImages??[],videoField:"tvcFilmFormatsImages"}:d==="visualMoodboard"&&k==="pr"?{...b,savedImages:h?.prMoodboardImages??[],videoField:"prMoodboardImages"}:d==="wildcard"&&k==="pr"?{...b,savedImage:h?.prCannesWildcardImage??null,aspectRatio:"16/9",videoField:"prCannesWildcardImage"}:d==="heroStunt"&&k==="pr"?{...b,savedImages:h?.prHeroStuntImages??[],videoField:"prHeroStuntImages"}:d==="earnedMediaJourney"&&k==="pr"?{...b,savedImages:h?.prEarnedMediaJourneyImages??[],videoField:"prEarnedMediaJourneyImages"}:d==="prPlays"&&k==="pr"?{...b,savedImages:h?.prPlaysImages??[],videoField:"prPlaysImages"}:b,T=Zs[d],q=Ka(d,k);if(!T)return null;const ve=gr(f),rt=h?.cardVersionHistory??{},at=ve&&rt[d]!==void 0;return e.jsx(Wr,{cardKey:d,index:f,meta:T,onCopy:()=>st(d,M),copiedKey:u,regenerable:ve,selected:ye.has(d),onToggleSelect:ve?()=>Hs(d):void 0,onRevert:()=>Os(d),canRevert:at&&cs!==d&&ce[d]!=="pending",isRegenerating:cs===d||ce[d]==="pending"||Ls.has(d)&&ce[d]!=="ready"&&ce[d]!=="failed",children:q?e.jsx(or,{strategyId:i,cardKey:d,children:e.jsx(q,{data:M})}):e.jsx("pre",{className:"font-['JetBrains_Mono'] text-xs whitespace-pre-wrap",style:{color:"rgba(255,255,255,0.35)"},children:JSON.stringify(M,null,2)})},d)})})]}),ye.size>0&&e.jsx("div",{className:"no-print fixed bottom-0 left-0 right-0 z-40 flex justify-center px-4 pb-6 pointer-events-none",children:e.jsxs("div",{className:"pointer-events-auto w-full max-w-3xl border",style:{background:"rgba(20,8,4,0.88)",backdropFilter:"blur(24px)",borderColor:"rgba(255,255,255,0.1)",borderRadius:12,boxShadow:"0 20px 60px -12px rgba(0,0,0,0.6)"},children:[e.jsxs("div",{className:"flex items-center gap-4 px-6 pt-5 pb-4 border-b",style:{borderColor:"rgba(255,255,255,0.07)"},children:[e.jsx("div",{className:"flex items-center justify-center w-9 h-9 shrink-0 border",style:{borderColor:`${n}40`,background:`${n}12`,borderRadius:8},children:e.jsx(Ae,{className:"w-4 h-4",style:{color:n}})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"font-['Anton'] uppercase text-white text-sm tracking-wide leading-none mb-1.5",children:[ye.size," card",ye.size===1?"":"s"," selected"]}),e.jsxs("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em]",style:{color:`${n}90`}
16,children:[mr(k??"brand_experience",Array.from(ye),R.strategyJson??{}).toLocaleString()," credits"]})]}),e.jsx("button",{onClick:()=>{_e(new Set),Ee("")},className:"font-mono text-[10px] uppercase tracking-widest px-3 py-1.5 border shrink-0 transition-colors hover:text-white",style:{borderColor:"rgba(255,255,255,0.12)",color:Bs,cursor:"none",borderRadius:6},children:"Cancel"})]}),e.jsxs("div",{className:"px-6 py-4 flex flex-col sm:flex-row sm:items-center gap-3",children:[e.jsx("input",{type:"text",value:ps,onChange:d=>Ee(d.target.value),placeholder:"Optional â tell it what to change, e.g. âmake it bolder, add a night market activationâ",className:"flex-1 min-w-0 font-['JetBrains_Mono'] text-[13px] text-white outline-none px-4 py-3 border transition-colors focus:border-orange-500/40",style:{background:"rgba(255,255,255,0.04)",borderColor:"rgba(255,255,255,0.1)",borderRadius:8}}),e.jsx("button",{className:"font-mono text-[11px] uppercase tracking-widest px-5 py-3 flex items-center justify-center gap-2 shrink-0 transition-opacity hover:opacity-90",style:{background:n,color:"#fff",cursor:"none",borderRadius:8,opacity:fe.isPending?.6:1,boxShadow:`0 8px 24px -8px ${n}80`},onClick:Vs,disabled:fe.isPending,children:fe.isPending?e.jsxs(e.Fragment,{children:[e.jsx(Be,{className:"w-3.5 h-3.5 animate-spin"})," Regeneratingâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ae,{className:"w-3.5 h-3.5"})," Regenerate Selected"]})})]})]})}),e.jsx("div",{className:"max-w-5xl mx-auto px-8 py-12 border-t relative z-10",style:{borderColor:te},children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsx("img",{src:"/strite-logo.png",alt:"Strite.ai",style:{height:"clamp(24px,3vw,42px)",width:"auto",opacity:.15}})})}),Z&&e.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center",style:{background:"rgba(0,0,0,0.80)",backdropFilter:"blur(12px)"},onClick:()=>U(!1),children:e.jsxs("div",{className:"relative w-full max-w-md mx-4 border p-10",style:{background:y?"rgba(13,2,0,0.95)":"#ffffff",borderColor:`${n}30`,borderRadius:16},onClick:d=>d.stopPropagation(),children:[e.jsx("button",{onClick:()=>U(!1),className:"absolute top-4 right-5 font-['JetBrains_Mono'] text-xs uppercase tracking-widest transition-colors",style:{color:I(.35),cursor:"none"},onMouseEnter:d=>d.currentTarget.style.color="#FF5C1A",onMouseLeave:d=>d.currentTarget.style.color=I(.35),children:"â"}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-[10px] uppercase tracking-[0.3em] mb-3",style:{color:n},children:"Confirm Regeneration"}),e.jsx("h2",{className:"font-['Anton'] uppercase text-3xl leading-tight mb-4",style:{color:K},children:"Regenerate This Strategy?"}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-xs leading-relaxed mb-2",style:{color:I(.6)},children:"The AI will rewrite the entire 16-card deck using your original brief and save it as a new version. Your current deck stays exactly as it is â you can always come back to it."}),(()=>{const f=R?.generationMode==="presentation"?55e3:25e3;return e.jsxs("div",{className:"flex items-start gap-3 mb-8 mt-4 border px-4 py-3",style:{borderColor:`${n}25`,background:`${n}08`,borderRadius:10},children:[e.jsx(Ae,{className:"w-3.5 h-3.5 shrink-0 mt-0.5",style:{color:n}}),e.jsxs("div",{children:[e.jsxs("p",{className:"font-['JetBrains_Mono'] text-[11px] uppercase tracking-[0.15em]",style:{color:n},children:["Costs ",f.toLocaleString()," Studio Credits"]}),F&&(()=>{const h=F.creditBalance??0,b=F.creditAllowance??0,A=F.creditsUsedThisCycle??0,M=Math.max(0,b-A)+h;return e.jsxs("p",{className:"font-['JetBrains_Mono'] text-[10px] mt-1 uppercase tracking-[0.1em]",style:{color:I(.5)},children:[M.toLocaleString()," credits remaining"]})})()]})]})})(),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>U(!1),className:"flex-1 font-['JetBrains_Mono'] uppercase text-xs py-3 border transition-all duration-200",style:{borderColor:I(.14),color:I(.55),background:"transparent",cursor:"none",borderRadius:8},onMouseEnter:d=>{d.currentTarget.style.borderColor=I(.35),d.currentTarget.style.color=K}
16,onMouseLeave:d=>{d.currentTarget.style.borderColor=I(.14),d.currentTarget.style.color=I(.55)},children:"Cancel"}),e.jsx("button",{onClick:qs,className:"flex-1 font-['Anton'] uppercase text-sm py-3 transition-all duration-200",style:{background:n,color:"white",cursor:"none",borderRadius:8},onMouseEnter:d=>{d.currentTarget.style.background="#FF2D00"},onMouseLeave:d=>{d.currentTarget.style.background=n},children:"Regenerate"})]})]})}),r&&e.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center",style:{background:"rgba(0,0,0,0.80)",backdropFilter:"blur(12px)"},onClick:()=>m(!1),children:e.jsxs("div",{className:"relative w-full max-w-md mx-4 border p-10",style:{background:y?"rgba(13,2,0,0.95)":"#ffffff",borderColor:`${n}30`,borderRadius:16},onClick:d=>d.stopPropagation(),children:[e.jsx("button",{onClick:()=>m(!1),className:"absolute top-4 right-5 font-['JetBrains_Mono'] text-xs uppercase tracking-widest transition-colors",style:{color:I(.35),cursor:"none"},onMouseEnter:d=>d.currentTarget.style.color="#FF5C1A",onMouseLeave:d=>d.currentTarget.style.color=I(.35),children:"â"}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-[10px] uppercase tracking-[0.3em] mb-3",style:{color:n},children:"Paid Feature"}),e.jsx("h2",{className:"font-['Anton'] uppercase text-3xl leading-tight mb-4",style:{color:K},children:"Export to PowerPoint"}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-xs leading-relaxed mb-8",style:{color:I(.6)},children:"PPTX export is available on Creator and Pro plans. Upgrade to download a fully-branded 16-slide deck built for boardrooms, client pitches, and awards submissions."}),e.jsx("div",{className:"space-y-2 mb-8",children:["16-slide deck with dark cinematic design","All strategy cards â data mapped to slides","Ready for Keynote, Google Slides & PowerPoint","Cannes awards entries built-in"].map((d,f)=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-1 h-1 rounded-full shrink-0",style:{background:n}}),e.jsx("p",{className:"font-['JetBrains_Mono'] text-xs",style:{color:I(.6)},children:d})]},f))}),e.jsx("a",{href:"/pricing",onClick:()=>m(!1),className:"block w-full font-['Anton'] uppercase text-sm py-3.5 text-center transition-all duration-200",style:{background:n,color:"white",cursor:"none"},onMouseEnter:d=>{d.currentTarget.style.background="#FF2D00"},onMouseLeave:d=>{d.currentTarget.style.background=n},children:"Upgrade to unlock â"})]})})]})})})})})})}export{pn 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.