1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[50177],{403:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(71847).A)("megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]])},861:(e,t,a)=>{a.d(t,{Qg:()=>r,bL:()=>o,s6:()=>i});var s=a(12115),n=a(97602),l=a(95155),r=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),i=s.forwardRef((e,t)=>(0,l.jsx)(n.sG.span,{...e,ref:t,style:{...r,...e.style}}));i.displayName="VisuallyHidden";var o=i},5033:(e,t,a)=>{a.d(t,{h:()=>c});var s=a(95155),n=a(12115),l=a(54679),r=a(97003),i=a(67001),o=a(35299),d=a(95740);function c(e){let{open:t,onOpenChange:a,onSubmit:c,isGenerating:u=!1}=e,[m,p]=(0,n.useState)("");return(0,n.useEffect)(()=>{t&&p("")},[t]),(0,s.jsx)(l.lG,{open:t,onOpenChange:e=>!u&&a(e),children:(0,s.jsxs)(l.Cf,{className:"sm:max-w-md",children:[(0,s.jsxs)(l.c7,{children:[(0,s.jsx)(l.L3,{children:"Add a prompt (optional)"}),(0,s.jsx)(l.rr,{children:"Give the AI extra direction â tone, angle, audience, or offers to highlight. Skip to generate with the defaults."})]}),(0,s.jsx)(i.T,{value:m,onChange:e=>p(e.target.value),placeholder:"e.g. Emphasize free shipping and our 30-day money-back guarantee. Keep the tone playful.",rows:4,autoFocus:!0,disabled:u,onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&!u&&(e.preventDefault(),c(m.trim()))}}),(0,s.jsxs)(l.Es,{children:[(0,s.jsx)(r.$,{variant:"outline",onClick:()=>c(""),disabled:u,children:"Skip"}),(0,s.jsx)(r.$,{onClick:()=>c(m.trim()),disabled:u,children:u?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.A,{className:"h-4 w-4 mr-2 animate-spin"}),"Generating..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.A,{className:"h-4 w-4 mr-2"}),"Generate"]})})]})]})})}},7220:(e,t,a)=>{a.d(t,{I:()=>d,SQ:()=>o,_2:()=>c,lp:()=>u,mB:()=>m,rI:()=>r,ty:()=>i});var s=a(95155);a(12115);var n=a(47971),l=a(25016);function r(e){let{...t}=e;return(0,s.jsx)(n.bL,{"data-slot":"dropdown-menu",...t})}function i(e){let{...t}=e;return(0,s.jsx)(n.l9,{"data-slot":"dropdown-menu-trigger",...t})}function o(e){let{className:t,sideOffset:a=4,...r}=e;return(0,s.jsx)(n.ZL,{children:(0,s.jsx)(n.UC,{"data-slot":"dropdown-menu-content",sideOffset:a,className:(0,l.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...r})})}function d(e){let{...t}=e;return(0,s.jsx)(n.YJ,{"data-slot":"dropdown-menu-group",...t})}function c(e){let{className:t,inset:a,variant:r="default",...i}=e;return(0,s.jsx)(n.q7,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":r,className:(0,l.cn)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...i})}function u(e){let{className:t,inset:a,...r}=e;return(0,s.jsx)(n.JU,{"data-slot":"dropdown-menu-label","data-inset":a,className:(0,l.cn)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...r})}function m(e){let{className:t,...a}=e;return(0,s.jsx)(n.wv,{"data-slot":"dropdown-menu-separator",className:(0,l.cn)("bg-border -mx-1 my-1 h-px",t),...a})}},8597:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(71847).A)("mouse-pointer-2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.5
179 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]])},10489:(e,t,a)=>{a.d(t,{b:()=>i});var s=a(12115),n=a(97602),l=a(95155),r=s.forwardRef((e,t)=>(0,l.jsx)(n.sG.label,{...e,ref:t,onMouseDown:t=>{var a;t.target.closest("button, input, select, textarea")||(null==(a=e.onMouseDown)||a.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));r.displayName="Label";var i=r},13444:(e,t,a)=>{a.r(t),a.d(t,{EditCreativeModal:()=>E});var s=a(95155),n=a(12115),l=a(47650),r=a(97003),i=a(90235),o=a(47507),d=a(97377),c=a(25016),u=a(46276),m=a(18170);let p={id:"1",text:""};function h(e){var t;return{callToAction:null!=(t=null==e?void 0:e.callToAction)?t:"",primaryText:(null==e?void 0:e.primaryText)?[{id:"1",text:e.primaryText}]:[{...p}],headline:(null==e?void 0:e.headline)?[{id:"1",text:e.headline}]:[{...p}],description:(null==e?void 0:e.description)?[{id:"1",text:e.description}]:[{...p}]}}var x=a(80275),v=a(42196),f=a(65229);function g(e){let{fileName:t,preview:a,previewUrl:n,isVideo:l,onClose:i}=e;return(0,s.jsx)("div",{className:"flex-shrink-0 px-4 sm:px-6 py-3 sm:py-4 border-b relative",children:(0,s.jsxs)("div",{className:"flex items-start gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"relative w-12 h-12 sm:w-16 sm:h-16 rounded-lg overflow-hidden border bg-muted flex-shrink-0",children:a||n?(0,s.jsx)("img",{src:n||a,alt:t,className:"w-full h-full object-cover",onError:e=>{e.target.style.display="none"}}):(0,s.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:l?(0,s.jsx)(x.A,{className:"w-6 h-6 text-muted-foreground"}):(0,s.jsx)(v.A,{className:"w-6 h-6 text-muted-foreground"})})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h2",{className:"text-xl sm:text-2xl font-semibold",children:"Edit Creative Texts"}),(0,s.jsxs)("p",{className:"text-xs sm:text-sm text-muted-foreground mt-0.5 sm:mt-1",children:["Modify texts for ",(0,s.jsx)("span",{className:"font-medium",children:t}),"."]})]}),(0,s.jsx)(r.$,{variant:"ghost",size:"icon",className:"absolute top-2 right-2 sm:top-4 sm:right-4 h-8 w-8 sm:h-10 sm:w-10",onClick:i,children:(0,s.jsx)(f.A,{className:"h-4 w-4 sm:h-5 sm:w-5"})})]})})}var b=a(7220),y=a(75426),j=a(35299),w=a(95740),k=a(5033),N=a(22954);function A(e){var t,a;let{currentFile:l,allCreatives:i,isGenerating:d,selectedFramework:c,onFrameworkChange:u,onCopyFrom:m,onCopyToAll:p,onGenerateWithAI:h}=e,[f,g]=(0,n.useState)(!1),[A,C]=(0,n.useState)(!1),T=async e=>{await h(e),C(!1)},z=null!=(a=null==i?void 0:i.filter(e=>e.file!==l&&e.texts&&(e.texts.primaryText||e.texts.headline||e.texts.description)))?a:[];return(0,s.jsxs)("div",{className:"px-4 sm:px-6 pt-3 sm:pt-4 pb-2 sm:pb-3 flex-shrink-0 space-y-3",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)(b.rI,{open:f,onOpenChange:g,children:[(0,s.jsx)(b.ty,{asChild:!0,children:(0,s.jsxs)(r.$,{variant:"outline",size:"sm",className:"gap-2",children:[(0,s.jsx)(y.A,{className:"h-4 w-4"}),"Copy From..."]})}),(0,s.jsx)(b.SQ,{align:"start",className:"w-56",children:z.length>0?z.map((e,t)=>(0,s.jsx)(b._2,{onClick:()=>{m(e.file),g(!1)},className:"cursor-pointer",children:(0,s.jsxs)("div",{className:"flex items-center gap-2 w-full",children:[e.file.type.startsWith("image/")?(0,s.jsx)(v.A,{className:"h-4 w-4 flex-shrink-0"}):(0,s.jsx)(x.A,{className:"h-4 w-4 flex-shrink-0"}),(0,s.jsx)("span",{className:"truncate",children:e.file.name})]})},t)):(0,s.jsx)(b._2,{disabled:!0,children:"No other creatives with text"})})]}),(0,s.jsxs)(r.$,{variant:"outline",size:"sm",className:"gap-2",onClick:p,children:[(0,s.jsx)(y.A,{className:"h-4 w-4"}),"Copy to All"]})]}),(0,s.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,s.jsxs)(o.l6,{value:c,onValueChange:e=>u(e),children:[(0,s.jsx)(o.bq,{className:"flex-1 h-9 text-sm",children:(0,s.jsx)(o.yv,{placeholder:"Select framework...",children:c&&(null==(t=N.ei.find(e=>e.value===c))?void 0:t.label)})}),(0,s.jsx)(o.gC,{children:N.ei.map(e=>(0,s.jsx)(o.eb,{value:e.value,className:"py-2",children:(0,s.jsxs)("div",{className:"flex flex-col items-start",children:[(0,s.jsx)("span",{className:"font-medium",children:e.label}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:e.useCase})]})},e.value))})]}),(0,s.jsx)(r.$,{variant:"outline",size:"sm",className:"gap-2 whitespace-nowrap",onClick:()=>C(!0),disabled:d||!c,children:d?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j.A,{className:"h-4 w-4 animate-spin"}),"Generating..."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(w.A,{className:"h-4 w-4"}),"Generate with AI"]})})]}),(0,s.jsx)(k.h,{open:A,onOpenChange:C,onSubmit:T,isGenerating:d})]})}var C=a(67001),T=a(71360),z=a(6191);function S(e){let{field:t,label:a,placeholder:n,variations:l,onAdd:i,onUpdate:o,onDelete:d}=e;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-2 sm:mb-3",children:[(0,s.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:a}),(0,s.jsxs)("span",{className:"text-xs sm:text-sm text-muted-foreground",children:[l.length," of ",5]})]}),(0,s.jsx)("div",{className:"space-y-2",children:l.map((e,a)=>(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(C.T,{value:e.text,onChange:a=>o(t,e.id,a.target.value),placeholder:"".concat(n," variation ").concat(a+1),className:"min-h-[80px] sm:min-h-[90px] pr-10 text-sm sm:text-base"}),l.length>1&&(0,s.jsx)(r.$,{variant:"ghost",size:"icon",className:"absolute top-1 right-1 sm:top-2 sm:right-2 h-7 w-7 sm:h-8 sm:w-8",onClick:()=>d(t,e.id),children:(0,s.jsx)(T.A,{className:"h-3 w-3 sm:h-4 sm:w-4"})})]},e.id))}),l.length<5&&(0,s.jsxs)(r.$,{variant:"outline",className:"w-full mt-2 sm:mt-3 h-9 sm:h-10 text-sm sm:text-base",onClick:()=>i(t),children:[(0,s.jsx)(z.A,{className:"h-3 w-3 sm:h-4 sm:w-4 mr-2"}),"Add Variation"]})]})}function E(e){let{isOpen:t,onClose:a,file:x,previewUrl:v,initialTexts:f,campaignObjective:b,brandSummary:y,allCreatives:j,onSave:w,onCopyToAll:k}
1=e,[N,C]=(0,n.useState)(""),{mounted:T,shouldRender:z,handleClose:E}=function(e){let{isOpen:t,onClose:a}=e,[s,l]=(0,n.useState)(!1),[r,i]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(t)i(!0),document.body.style.overflow="hidden",requestAnimationFrame(()=>{l(!0)});else{l(!1),document.body.style.overflow="";let e=setTimeout(()=>{i(!1)},300);return()=>clearTimeout(e)}return()=>{document.body.style.overflow=""}},[t]),{mounted:s,shouldRender:r,handleClose:(0,n.useCallback)(()=>{l(!1),setTimeout(a,300)},[a])}}({isOpen:t,onClose:a}),{preview:M,isVideo:_}=function(e){let{file:t,isOpen:a}=e,[s,l]=(0,n.useState)(null),r=!!t&&t.type.startsWith("video/");return(0,n.useEffect)(()=>{if(t&&!r&&a){let e=URL.createObjectURL(t);return l(e),()=>{URL.revokeObjectURL(e),l(null)}}},[t,r,a]),{preview:s,isVideo:r}}({file:x,isOpen:t}),{texts:D,isGenerating:O,addVariation:U,updateVariation:F,deleteVariation:L,setCallToAction:P,copyFromCreative:I,generateWithAI:$}=function(e){let{isOpen:t,file:a,initialTexts:s,campaignObjective:l,brandSummary:r,creativeUrl:i,isVideo:o,videoUrl:d,allCreatives:c}=e,[u,x]=(0,n.useState)(()=>h(s)),{isGenerating:v,generateAdCopy:f}=(0,m.$)();(0,n.useEffect)(()=>{t&&x(h(s))},[t,a]);let g=(0,n.useCallback)(e=>{x(t=>({...t,[e]:[...t[e],{id:Date.now().toString(),text:""}]}))},[]),b=(0,n.useCallback)((e,t,a)=>{x(s=>({...s,[e]:s[e].map(e=>e.id===t?{...e,text:a}:e)}))},[]),y=(0,n.useCallback)((e,t)=>{x(a=>({...a,[e]:a[e].filter(e=>e.id!==t)}))},[]),j=(0,n.useCallback)(e=>{x(t=>({...t,callToAction:e}))},[]);return{texts:u,isGenerating:v,addVariation:g,updateVariation:b,deleteVariation:y,setCallToAction:j,copyFromCreative:(0,n.useCallback)(e=>{let t=null==c?void 0:c.find(t=>t.file===e);if(null==t?void 0:t.texts){var a;x({callToAction:null!=(a=t.texts.callToAction)?a:"",primaryText:t.texts.primaryText?[{id:"1",text:t.texts.primaryText}]:[{...p}],headline:t.texts.headline?[{id:"1",text:t.texts.headline}]:[{...p}],description:t.texts.description?[{id:"1",text:t.texts.description}]:[{...p}]})}},[c]),generateWithAI:(0,n.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",{data:s,error:n}=await f({productName:null==a?void 0:a.name.replace(/\.[^/.]+$/,""),campaignObjective:l,additionalContext:t||void 0,brandSummary:r,creativeUrl:o?void 0:i,isVideo:o,videoUrl:o?d:void 0,framework:e});return s?(x(e=>({...e,primaryText:s.primaryText.map((e,t)=>({id:"".concat(Date.now(),"-primary-").concat(t),text:e})),headline:s.headline.map((e,t)=>({id:"".concat(Date.now(),"-headline-").concat(t),text:e})),description:s.description.map((e,t)=>({id:"".concat(Date.now(),"-description-").concat(t),text:e}))})),null):n},[a,l,r,i,o,d,f])}}({isOpen:t,file:x,initialTexts:f,campaignObjective:b,brandSummary:y,creativeUrl:v||M,isVideo:_,videoUrl:_?v||M:void 0,allCreatives:j}),q=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!N)return;let t=await $(N,e);t?(0,u.oR)({title:"Error",description:t,variant:"destructive"}):(0,u.oR)({title:"Success",description:"Ad copy generated successfully"})};return x&&z?(0,l.createPortal)((0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:(0,c.cn)("fixed inset-0 bg-black/50 z-50 transition-opacity duration-300",T?"opacity-100":"opacity-0"),onClick:E}),(0,s.jsx)("div",{className:(0,c.cn)("fixed right-0 top-0 h-screen w-full sm:w-[480px] bg-background shadow-xl z-50","transform transition-transform duration-300 ease-in-out",T?"translate-x-0":"translate-x-full"),children:(0,s.jsxs)("div",{className:"h-full overflow-hidden flex flex-col",children:[(0,s.jsx)(g,{fileName:x.name,preview:M,previewUrl:v,isVideo:_,onClose:E}),(0,s.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col",children:[(0,s.jsx)(A,{currentFile:x,allCreatives:j,isGenerating:O,selectedFramework:N,onFrameworkChange:C,onCopyFrom:I,onCopyToAll:()=>{null==k||k(D),a()},onGenerateWithAI:q}),(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 sm:px-6 space-y-4 sm:space-y-6 pb-4 sm:pb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.J,{className:"text-base sm:text-lg font-semibold",children:"Call to Action"}),(0,s.jsxs)(o.l6,{value:D.callToAction||void 0,onValueChange:P,children:[(0,s.jsx)(o.bq,{className:"w-full mt-2 h-10 sm:h-11 text-sm sm:text-base",children:(0,s.jsx)(o.yv,{placeholder:"Select a call to action"})}),(0,s.jsx)(o.gC,{children:d.PO.map(e=>(0,s.jsx)(o.eb,{value:e.value,className:"cursor-pointer",children:e.label},e.value))})]})]}),(0,s.jsx)(S,{field:"primaryText",label:"Primary Text",placeholder:"Primary Text",variations:D.primaryText,onAdd:U,onUpdate:F,onDelete:L}),(0,s.jsx)(S,{field:"headline",label:"Headline",placeholder:"Headline",variations:D.headline,onAdd:U,onUpdate:F,onDelete:L}),(0,s.jsx)(S,{field:"description",label:"Description",placeholder:"Description",variations:D.description,onAdd:U,onUpdate:F,onDelete:L})]}),(0,s.jsxs)("div",{className:"flex justify-end gap-3 px-4 sm:px-6 py-3 sm:py-4 border-t flex-shrink-0 bg-background",children:[(0,s.jsx)(r.$,{variant:"outline",onClick:E,children:"Cancel"}),(0,s.jsx)(r.$,{onClick:()=>{null==w||w(D),a()},children:"Save Changes"})]})]})]})})]}),document.body):null}},18170:(e,t,a)=>{a.d(t,{$:()=>i});var s=a(12115),n=a(8525),l=a(49341),r=a(42175);
1function i(){let[e,t]=(0,s.useState)(!1);return{isGenerating:e,generateAdCopy:(0,s.useCallback)(async e=>{t(!0);try{var a,s,i,o;let{data:{session:t}}=await n.supabase.auth.getSession();if(e.isVideo&&e.videoUrl){let a=await fetch("/api/generate-ad-copy-video",{method:"POST",headers:{"Content-Type":"application/json",...(null==t?void 0:t.access_token)?{Authorization:"Bearer ".concat(t.access_token)}:{}},credentials:"include",body:JSON.stringify({productName:e.productName,campaignObjective:e.campaignObjective,additionalContext:e.additionalContext,brandSummary:e.brandSummary,videoUrl:e.videoUrl,framework:e.framework,callToAction:e.callToAction})});if(!a.ok){let e=await a.json().catch(()=>({}));(0,l.v)(e);let t=e.error||"Failed to generate ad copy for video";return{data:null,error:t}}let n=await a.json(),o=202===a.status&&(null==n||null==(s=n.data)?void 0:s.jobId)?await (0,r.v)({jobId:n.data.jobId,accessToken:null!=(i=null==t?void 0:t.access_token)?i:null}):n;return{data:{primaryText:(null==o?void 0:o.primaryText)||[],headline:(null==o?void 0:o.headline)||[],description:(null==o?void 0:o.description)||[]},error:null}}let d=await fetch("/api/generate-ad-copy",{method:"POST",headers:{"Content-Type":"application/json",...(null==t?void 0:t.access_token)?{Authorization:"Bearer ".concat(t.access_token)}:{}},credentials:"include",body:JSON.stringify({productName:e.productName,campaignObjective:e.campaignObjective,additionalContext:e.additionalContext,brandSummary:e.brandSummary,creativeUrl:e.creativeUrl||void 0,isVideo:e.isVideo||!1,framework:e.framework,callToAction:e.callToAction})});if(!d.ok){let e=await d.json().catch(()=>({}));(0,l.v)(e);let t=e.error||"Failed to generate ad copy";return{data:null,error:t}}let c=await d.json(),u=202===d.status&&(null==c||null==(a=c.data)?void 0:a.jobId)?await (0,r.v)({jobId:c.data.jobId,accessToken:null!=(o=null==t?void 0:t.access_token)?o:null}):c;return{data:{primaryText:(null==u?void 0:u.primaryText)||[],headline:(null==u?void 0:u.headline)||[],description:(null==u?void 0:u.description)||[]},error:null}}catch(e){return console.error("Error generating ad copy:",e),{data:null,error:e instanceof Error?e.message:"Failed to generate ad copy"}}finally{t(!1)}},[])}}},22954:(e,t,a)=>{a.d(t,{ei:()=>s});let s=[{value:"hook-benefit-proof",label:"Hook â Benefit â Proof",description:"Hook with pain/curiosity, core benefit, light proof",useCase:"Warm audiences, retargeting, product-aware traffic"},{value:"problem-solution",label:"Problem â Solution",description:"Clear problem, product as solution",useCase:"Cold traffic, problem-aware audiences"},{value:"before-after",label:"Before â After",description:"Before state, after state, product as bridge",useCase:"Transformational outcomes, testimonial-style ads"}]},29633:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(71847).A)("briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]])},37586:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(71847).A)("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},42175:(e,t,a)=>{a.d(t,{v:()=>s});async function s(e){let{jobId:t,accessToken:a,signal:s,intervalMs:n=2e3,timeoutMs:l=9e4}=e,r=Date.now();for(;Date.now()-r<l;){var i,o,d,c,u;if(null==s?void 0:s.aborted)throw new DOMException("Polling aborted","AbortError");let e=await fetch("/api/jobs/".concat(t),{method:"GET",headers:{...a?{Authorization:"Bearer ".concat(a)}:{}},signal:s});if(!e.ok)throw Error((await e.json().catch(()=>({}))).reason||"Failed to poll queued job");let l=await e.json(),r=null==(i=l.data)?void 0:i.status;if("completed"===r)return null!=(c=null==(d=l.data)||null==(o=d.result)?void 0:o.entity)?c:null;if("failed"===r||"cancelled"===r)throw Error((null==(u=l.data)?void 0:u.error)||"Queued job failed");await function(e){return new Promise(t=>setTimeout(t,e))}(n)}throw Error("Timed out waiting for queued job")}},47507:(e,t,a)=>{a.d(t,{TR:()=>x,bq:()=>p,eb:()=>v,gC:()=>h,l6:()=>c,mi:()=>f,s3:()=>u,yv:()=>m});var s=a(95155),n=a(12115),l=a(47887),r=a(24033),i=a(5917),o=a(12108),d=a(25016);function c(e){let{...t}=e;return(0,s.jsx)(l.bL,{"data-slot":"select",onOpenChange:e=>{var a;try{let t=new CustomEvent("globalDropdownOpenChange",{detail:{open:e,source:"root"}});window.dispatchEvent(t)}catch(e){}null==(a=t.onOpenChange)||a.call(t,e)},...t})}function u(e){let{...t}=e;return(0,s.jsx)(l.YJ,{"data-slot":"select-group",...t})}function m(e){let{...t}=e;return(0,s.jsx)(l.WT,{"data-slot":"select-value",...t})}function p(e){let{className:t,size:a="default",children:n,...i}=e,o=null==t?void 0:t.includes("form-field-white-bg");return(0,s.jsxs)(l.l9,{"data-slot":"select-trigger","data-size":a,onPointerDown:e=>{var t;try{let e=new CustomEvent("globalDropdownOpenChange",{detail:{open:!0,source:"trigger"}});window.dispatchEvent(e)}catch(e){}null==(t=i.onPointerDown)||t.call(i,e)},className:(0,d.cn)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-fit items-center justify-between gap-2 rounded-md border px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 cursor-pointer",!o&&"bg-transparent dark:bg-input/30 dark:hover:bg-input/50",t),...i,children:[n,(0,s.jsx)(l.In,{asChild:!0,children:(0,s.jsx)(r.A,{className:"size-4 opacity-50"})})]})}function h(e){let{className:t,children:a,position:r="popper",...i}=e;return n.useEffect(()=>{try{let e=new CustomEvent("globalDropdownContentMounted",{detail:{source:"select"}});window.dispatchEvent(e)}catch(e){}return()=>{}},[]),(0,s.jsx)(l.ZL,{children:(0,s.jsxs)(l.UC,{"data-slot":"select-content",className:(0,d.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
1de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md","popper"===r&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,onCloseAutoFocus:e=>{try{e.preventDefault()}catch(e){}},...i,children:[(0,s.jsx)(g,{}),(0,s.jsx)(l.LM,{className:(0,d.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:a}),(0,s.jsx)(b,{})]})})}function x(e){let{className:t,...a}=e;return(0,s.jsx)(l.JU,{"data-slot":"select-label",className:(0,d.cn)("text-muted-foreground px-2 py-1.5 text-xs",t),...a})}function v(e){let{className:t,children:a,...n}=e;return(0,s.jsxs)(l.q7,{"data-slot":"select-item",className:(0,d.cn)("focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 transition-colors",t),...n,children:[(0,s.jsx)("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,s.jsx)(l.VF,{children:(0,s.jsx)(i.A,{className:"size-4"})})}),(0,s.jsx)(l.p4,{children:a})]})}function f(e){let{className:t,...a}=e;return(0,s.jsx)(l.wv,{"data-slot":"select-separator",className:(0,d.cn)("bg-border pointer-events-none -mx-1 my-1 h-px",t),...a})}function g(e){let{className:t,...a}=e;return(0,s.jsx)(l.PP,{"data-slot":"select-scroll-up-button",className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(o.A,{className:"size-4"})})}function b(e){let{className:t,...a}=e;return(0,s.jsx)(l.wn,{"data-slot":"select-scroll-down-button",className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...a,children:(0,s.jsx)(r.A,{className:"size-4"})})}},48055:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(71847).A)("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},60952:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(71847).A)("shopping-bag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]])},65993:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(71847).A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]])},66955:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(71847).A)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]])},67001:(e,t,a)=>{a.d(t,{T:()=>l});var s=a(95155);a(12115);var n=a(25016);function l(e){let{className:t,...a}=e;return(0,s.jsx)("textarea",{"data-slot":"textarea",className:(0,n.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...a})}},78108:(e,t,a)=>{a.d(t,{Z:()=>n});var s=a(12115);function n(e){let t=s.useRef({value:e,previous:e});return s.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}},90235:(e,t,a)=>{a.d(t,{J:()=>r});var s=a(95155);a(12115);var n=a(10489),l=a(25016);function r(e){let{className:t,...a}=e;return(0,s.jsx)(n.b,{"data-slot":"label",className:(0,l.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...a})}},91169:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(71847).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},95740:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(71847).A)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]])}}]);
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.