1import{a1 as d,m as n,j as t,b,p as l,s as p,V as k,W as x,am as u}from"./index-DL0d_lAK.js";import{a as f}from"./AssetManager-1guXkkVJ.js";import{G as h}from"./globe-EvdRHgaC.js";import{F as g}from"./facebook-BbOQPb3V.js";/** 2 * @license lucide-react v0.451.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const w=d("Swords",[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]]),c={label:"Detect competitors",icon:t.jsx(b,{size:16}),invoke:({brandId:e})=>n("detect-competitors",{brand_id:e})},m={label:"Scan domain",icon:t.jsx(h,{size:16}),prompt:"https://competitor.com",invoke:async({brandId:e,input:a})=>{const{fields:o={}}=await n("scan-brand",{url:a}),y=(Array.isArray(o.social_links)?o.social_links:[]).map(s=>s==null?void 0:s.url).find(s=>String(s).includes("instagram.com"))??null,r=o.name||l(a)||a,{error:i}=await p.from("competitors").insert({brand_id:e,name:r,website:a,description:o.description??null,instagram_url:y});if(i)throw i;return{done:`Added ${r}`}}},j=e=>e.website?t.jsx(u,{host:l(e.website),size:48,className:"w-12 h-12 rounded-md border border-border bg-white object-contain p-2"}):t.jsx("div",{className:"w-12 h-12 rounded-md flex items-center justify-center bg-slate-500/10 text-slate-500",children:t.jsx(w,{size:22})});function _(){return t.jsx(f,{rowLinks:[{key:"instagram_url",icon:x,title:"Open Instagram",className:"text-[#E1306C] hover:text-[#C13584]"},{key:"facebook_url",icon:g,title:"Open Facebook",className:"text-[#1877F2] hover:text-[#0E5FCB]"}],table:"competitors",title:"Competitors",subtitleKey:"website",renderAvatar:j,actions:[c,m],fields:[{key:"name",label:"Name"},{key:"website",label:"Website"},{key:"instagram_url",label:"Instagram",placeholder:"instagram.com/them or @handle",normalize:k},{key:"facebook_url",label:"Facebook URL"},{key:"description",label:"Description",type:"textarea"},{key:"strengths",label:"Strengths",type:"textarea"},{key:"weaknesses",label:"Weaknesses",type:"textarea"},{key:"notes",label:"Notes",type:"textarea"}]})}const z=Object.freeze(Object.defineProperty({__proto__:null,default:_,detectCompetitors:c,scanDomain:m},Symbol.toStringTag,{value:"Module"}));export{z as C,w as S,c as d,m as s};
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.