1/*! For license information please see 1815.1fd76389.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunktokenos_frontend=self.webpackChunktokenos_frontend||[]).push([[1815],{11815:(e,t,s)=>{s.r(t),s.d(t,{default:()=>F});var a=s(78195),n=s(44628),i=s(26095),r=s(60932),l=s(75576),c=s(72486),o=s(75602),d=s(31893);const x=(0,s(70501).A)("Image",[["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"}]]);var p=s(74541),m=s(60628),h=s(30979),g=s(34676),u=s(56238),b=s(72406),v=s(9333),y=s(4929),f=s(5427),j=s(81523),w=s(3017),N=s(21864);const k=(0,j.getApiBaseUrl)(),F=()=>{var e;const t=(0,i.Zp)(),s=(0,i.zy)(),j=(0,b.v)(),{publicKey:F}=j,A="string"===typeof(null===(e=s.state)||void 0===e?void 0:e.prompt)?s.state.prompt:"",[S,z]=(0,n.useState)({name:"",description:"",category:"trading",price:"0.50",prompt:A,logoFile:null,logoPreview:null}),[C,B]=(0,n.useState)(null),[P,_]=(0,n.useState)(null),[O,T]=(0,n.useState)(!1),[I,M]=(0,n.useState)(""),[D,L]=(0,n.useState)(0),[U,W]=(0,n.useState)(null),[q,R]=(0,n.useState)(!1),[G,E]=(0,n.useState)(0),[$,J]=(0,n.useState)(!1),[K,H]=(0,n.useState)(!1),[Y,Z]=(0,n.useState)([]),[V,Q]=(0,n.useState)({}
2),[X,ee]=(0,n.useState)(null);n.useEffect((()=>{F&&te()}),[F]),n.useEffect((()=>{let e;return U&&O&&(e=setInterval((async()=>{try{const t=await v.A.get("".concat(k,"/agent-generation-progress/").concat(U));if(t.data.success){const{progress:s,current_step:a,status:n}=t.data;L(s||0),M(a||"Processing..."),"completed"!==n&&"failed"!==n||(clearInterval(e),"failed"===n&&(T(!1),M("\u274c "+(t.data.error||"Unknown error")),setTimeout((()=>{M("")}),5e3)))}}catch(t){console.error("Progress polling error:",t)}}),2e3)),()=>{e&&clearInterval(e)}}),[U,O]);const te=async()=>{try{const e=await v.A.get("".concat(k,"/user-credits/").concat(F.toString()));E(e.data.credits||0)}catch(e){console.error("Failed to fetch credits:",e)}},se=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!F)return M("\u26a0\ufe0f Please connect your wallet first"),void setTimeout((()=>M("")),3e3);T(!0),L(0),M("Initializing intelligent agent builder...");const t=setInterval((()=>{L((e=>{if(e>=90)return clearInterval(t),90;const s=e<30?2:e<60?1:.5;return Math.min(e+s,90)}))}),1e3),s=["\ud83d\udd0d Analyzing your requirements...","\ud83c\udfd7\ufe0f Designing agent architecture...","\ud83d\udcb0 Integrating x402 payment system...","\ud83e\udd16 Generating main.py...","\ud83d\udce6 Generating requirements.txt and dependencies...","\ud83d\udcdd Creating comprehensive README.md...","\ud83d\udd27 Building agent_core.py logic...","\ud83d\udee0\ufe0f Implementing tool functions...","\u2728 Optimizing code and adding error handling...","\ud83d\udd10 Adding security and validation...","\ud83d\udcca Almost done, finalizing files..."];let n=0;const i=setInterval((()=>{n<s.length&&(M(s[n]),n++)}),5e3);try{const s={prompt:String(S.prompt||""),category:String(S.category||"general"),wallet:String(F.toString()),skip_analysis:Boolean(e)};if(console.log("[AgentWorkspace] Request data:",JSON.stringify(s)),e&&V&&Object.keys(V).length>0){const e={};for(const[t,s]of Object.entries(V))s&&"string"===typeof s&&s.trim()&&(e[String(t)]=String(s));Object.keys(e).length>0&&(s.clarifications=e,console.log("[AgentWorkspace] Including clarifications:",Object.keys(e).length))}let n;console.log("[AgentWorkspace] Sending POST to:","".concat(k,"/generate-agent-code"));try{const e=await(0,w.jD)(j,F,s);n=await v.A.post("".concat(k,"/generate-agent-code"),e)}catch(c){if(console.error("[AgentWorkspace] Axios error:",c),console.error("[AgentWorkspace] Request data that failed:",s),c.message&&c.message.includes("circular"))throw new Error("Data serialization error. Please refresh the page and try again.");throw c}if(n.data.task_id&&W(n.data.task_id),n.data.needs_clarification){clearInterval(t),clearInterval(i);const e=(n.data.questions||[]).filter((e=>e&&"string"===typeof e)).map((e=>String(e).trim())).filter((e=>e.length>0));if(0===e.length){console.log("\u26a0\ufe0f No valid questions provided, retrying with skip_analysis..."),s.skip_analysis=!0;const e=await(0,w.jD)(j,F,s),t=await v.A.post("".concat(k,"/generate-agent-code"),e);return void(t.data.success&&(M("\u2705 Agent generated successfully with x402!"),B(t.data.code),z((0,a.A)((0,a.A)({},S),{},{name:t.data.suggested_name||S.name}))))}return T(!1),Z(e),ee(n.data.analysis||{}),void H(!0)}n.data.success&&(clearInterval(t),clearInterval(i),M("\u2705 Agent generated successfully with x402!"),L(100),B(n.data.code),z((0,a.A)((0,a.A)({},S),{},{name:n.data.suggested_name||S.name})),console.log("\u2705 Agent Generated:",{pattern:n.data.pattern_used,files:n.data.files_generated}))}catch(o){var r,l;return clearInterval(t),clearInterval(i),M("\u274c "+((null===(r=o.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.detail)||o.message)),L(0),console.error("[AgentWorkspace] Generation failed:",o),void setTimeout((()=>{T(!1),M("")}),5e3)}setTimeout((()=>{T(!1),M(""),L(0),W(null)}),3e3)},ae=C?Object.keys(C):[],ne=P&&ae.includes(P)?P:ae[0],ie=ne?C[ne]:"",re=S.prompt||S.name?{name:S.name||"Untitled agent",description:S.description,category:S.category,price_per_call:S.price,model:"claude-sonnet-5",provider:"anthropic",tools:[],eval_cases:[]}:null;return(0,N.jsxs)("div",{className:"min-h-screen text-white pt-16 pb-20 v5-body",style:{background:"#050505"},"data-testid":"agent-workspace",children:[(0,N.jsxs)("div",{className:"h-14 border-b border-white/10 px-4 sm:px-6 flex items-center justify-between gap-4 sticky top-16 z-30 backdrop-blur-md",style:{background:"rgba(11,12,16,0.92)"},"data-testid":"agent-workspace-toolbar",children:[(0,N.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,N.jsxs)("div",{className:"flex items-center rounded-lg border border-white/10 p-0.5",style:{background:"#050505"},"data-testid":"workspace-switcher",children:[(0,N.jsxs)("button",{onClick:()=>t("/build"),className:"px-3 py-1.5 rounded-md text-[11px] v5-mono text-zinc-400 hover:text-white transition-colors flex items-center gap-1.5","data-testid":"switch-app-builder",children:[(0,N.jsx)(r.A,{className:"w-3.5 h-3.5"})," App Builder"]}),(0,N.jsxs)("button",{className:"px-3 py-1.5 rounded-md text-[11px] v5-mono text-white flex items-center gap-1.5",style:{background:"rgba(176,38,255,0.18)",border:"1px solid rgba(176,38,255,0.4)"},"data-testid":"switch-agent-builder",children:[(0,N.jsx)(l.A,{className:"w-3.5 h-3.5",style:{color:"#D9A6FF"}})," Agent Builder"]})]}),(0,N.jsxs)("span",{className:"v5-badge-live ml-1","data-testid":"agent-workspace-v5-badge",children:[(0,N.jsx)("span",{className:"v5-dot"})," v5.0 live"]}),(0,N.jsxs)("button",{onClick:()=>t("/agents/create"),className:"hidden md:inline-flex items-center gap-1.5 text-[11px] v5-mono text-zinc-500 hover:text-[#00F0FF] transition-colors ml-2","data-testid":"link-spec-builder",children:[(0,N.jsx)(c.A,{className:"w-3.5 h-3.5"})," spec-driven builder \u2192"]})]}),F&&(0,N.jsx)("div",{className:"flex items-center gap-2 flex-shrink-0",children:(0,N.jsxs)("div",{className:"flex items-center gap-1.5 pl-2.5 pr-1 py-1 rounded-lg border border-white/10 v5-mono",style:{background:"#0B0C10"},"data-testid":"agent-credits-chip",children:[(0,N.jsx)(o.A,{className:"w-3.5 h-3.5",style:{color:"#FFB800"}}),(0,N.jsx)("span",{className:"text-xs font-semibold",style:{color:"#FFB800"}
2,children:G.toLocaleString()}),(0,N.jsx)("button",{onClick:()=>J(!0),title:"Buy credits \u2014 20% off with $TOS",className:"ml-1 w-6 h-6 rounded-md flex items-center justify-center text-sm font-bold transition-transform active:scale-95",style:{background:"#00FF94",color:"#050505"},"data-testid":"agent-add-credits-btn",children:"+"})]})})]}),(0,N.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 grid grid-cols-1 lg:grid-cols-12 gap-6 lg:gap-8",children:[(0,N.jsxs)("div",{className:"lg:col-span-5 space-y-5",children:[(0,N.jsxs)("div",{className:"v5-rise",children:[(0,N.jsxs)("div",{className:"inline-flex items-center gap-2 border border-[#FF007F]/30 rounded-full px-3 py-1 mb-4",style:{background:"rgba(255,0,127,0.08)"},children:[(0,N.jsx)(l.A,{className:"w-3.5 h-3.5",style:{color:"#FF7AB5"}}),(0,N.jsx)("span",{className:"text-[11px] uppercase tracking-widest v5-mono",style:{color:"#FF7AB5"},children:"Code-gen agent builder"})]}),(0,N.jsxs)("h1",{className:"text-3xl sm:text-4xl font-black v5-display leading-tight mb-2",children:["Generate a full",(0,N.jsx)("br",{}),(0,N.jsx)("span",{style:{background:"linear-gradient(135deg,#FF007F,#B026FF)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"x402 agent codebase."})]}),(0,N.jsx)("p",{className:"text-sm text-zinc-400 leading-relaxed max-w-md",children:"Describe the agent. The builder analyzes the brief, asks only what it must, and generates a runnable Python agent with x402 USDC payments wired in \u2014 ready to publish or run inside an Autopilot."})]}),(0,N.jsxs)("div",{className:"v5-surface rounded-2xl p-5 space-y-4","data-testid":"agent-spec-form",children:[(0,N.jsxs)("div",{className:"text-[10px] uppercase tracking-[0.2em] text-zinc-500 v5-mono flex items-center gap-2",children:[(0,N.jsx)("span",{className:O?"v5-dot":"v5-dot-static",style:{color:O?"#00F0FF":"#71717A"}})," Brief"]}),(0,N.jsxs)("div",{children:[(0,N.jsx)("label",{className:"block text-[10px] uppercase tracking-widest text-zinc-500 v5-mono mb-1.5",children:"Agent prompt"}),(0,N.jsx)("textarea",{"data-testid":"agent-prompt-input",value:S.prompt,onChange:e=>z((0,a.A)((0,a.A)({},S),{},{prompt:e.target.value})),className:"v5-input w-full px-4 py-3 text-sm text-white h-32",placeholder:"Describe your agent... e.g., 'A trading-signal bot that monitors Solana token prices and posts alerts'"})]}),(0,N.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,N.jsxs)("div",{children:[(0,N.jsx)("label",{className:"block text-[10px] uppercase tracking-widest text-zinc-500 v5-mono mb-1.5",children:"Agent name"}),(0,N.jsx)("input",{"data-testid":"agent-name-input",type:"text",value:S.name,onChange:e=>z((0,a.A)((0,a.A)({},S),{},{name:e.target.value})),className:"v5-input w-full px-4 py-2.5 text-sm text-white",placeholder:"My Trading Agent"})]}),(0,N.jsxs)("div",{children:[(0,N.jsx)("label",{className:"block text-[10px] uppercase tracking-widest text-zinc-500 v5-mono mb-1.5",children:"Category"}),(0,N.jsxs)("select",{"data-testid":"agent-category-select",value:S.category,onChange:e=>z((0,a.A)((0,a.A)({},S),{},{category:e.target.value})),className:"v5-select w-full !h-[42px] !text-sm",children:[(0,N.jsx)("option",{value:"trading",children:"Trading"}),(0,N.jsx)("option",{value:"social",children:"Social"}),(0,N.jsx)("option",{value:"analytics",children:"Analytics"}),(0,N.jsx)("option",{value:"automation",children:"Automation"}),(0,N.jsx)("option",{value:"security",children:"Security"})]})]})]}),(0,N.jsxs)("div",{children:[(0,N.jsx)("label",{className:"block text-[10px] uppercase tracking-widest text-zinc-500 v5-mono mb-1.5",children:"Description"}),(0,N.jsx)("textarea",{"data-testid":"agent-description-input",value:S.description,onChange:e=>z((0,a.A)((0,a.A)({},S),{},{description:e.target.value})),className:"v5-input w-full px-4 py-3 text-sm text-white h-24",placeholder:"What does your agent do?"})]}),(0,N.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,N.jsxs)("div",{children:[(0,N.jsx)("label",{className:"block text-[10px] uppercase tracking-widest text-zinc-500 v5-mono mb-1.5",children:"Price per call (USDC)"}),(0,N.jsxs)("div",{className:"relative",children:[(0,N.jsx)(d.A,{className:"w-3.5 h-3.5 absolute left-3 top-1/2 -translate-y-1/2 text-zinc-500"}),(0,N.jsx)("input",{"data-testid":"agent-price-input",type:"number",step:"0.01",value:S.price,onChange:e=>z((0,a.A)((0,a.A)({},S),{},{price:e.target.value})),className:"v5-input w-full pl-8 pr-4 py-2.5 text-sm text-white"})]})]}),(0,N.jsxs)("div",{children:[(0,N.jsxs)("label",{className:"block text-[10px] uppercase tracking-widest text-zinc-500 v5-mono mb-1.5",children:["Logo ",(0,N.jsx)("span",{className:"normal-case tracking-normal text-zinc-600",children:"(optional)"})]}),S.logoPreview?(0,N.jsxs)("div",{className:"flex items-center gap-3",children:[(0,N.jsx)("img",{src:S.logoPreview,alt:"Logo preview",className:"w-[42px] h-[42px] rounded-lg object-cover border border-[#B026FF]/50","data-testid":"agent-logo-preview"}),(0,N.jsx)("button",{onClick:()=>{z((0,a.A)((0,a.A)({},S),{},{logoFile:null,logoPreview:null}))},className:"text-[11px] px-2.5 py-1.5 rounded-lg border border-red-500/30 text-red-300 hover:bg-red-500/10 transition-colors","data-testid":"agent-logo-remove",children:"Remove"})]}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{const t=e.target.files[0];if(!t)return;if(!t.type.startsWith("image/"))return void console.error("Please select an image file");if(t.size>2097152)return void console.error("Image must be under 2MB");const s=new FileReader;s.onloadend=()=>{z((0,a.A)((0,a.A)({},S),{},{logoFile:t,logoPreview:s.result}))},s.readAsDataURL(t)},className:"hidden",id:"logo-upload","data-testid":"agent-logo-input"}),(0,N.jsxs)("label",{htmlFor:"logo-upload",className:"flex items-center gap-2 h-[42px] px-3 rounded-lg border border-dashed border-white/15 hover:border-[#B026FF]/50 cursor-pointer transition-colors text-[11px] text-zinc-400","data-testid":"agent-logo-dropzone",children:[(0,N.jsx)(x,{className:"w-4 h-4 text-zinc-500"})," Upload PNG/JPG \xb7 \u22642MB"]})]})]})]}),(0,N.jsx)("p",{className:"text-[11px] text-zinc-500",children:"No logo? A gradient mark with your agent's initials is generated automatically."}),(0,N.jsxs)("button",{"data-testid":"agent-generate-btn",onClick:se,disabled:O||!F||!S.prompt,className:"v5-glow-btn w-full px-6 py-3.5 rounded-xl font-bold flex items-center justify-center gap-2 disabled:opacity-40 disabled:cursor-not-allowed",children:[(0,N.jsx)(p.A,{className:"w-5 h-5"}),O?"Generating...":F?"Generate Agent Code":"Connect Wallet"]})]}),C&&(0,N.jsxs)("div",{className:"rounded-2xl border border-[#00FF94]/30 p-5 v5-rise",style:{background:"rgba(0,255,148,0.05)"},"data-testid":"agent-publish-card",children:[(0,N.jsxs)("div",{className:"flex items-center gap-2 text-[11px] uppercase tracking-widest text-[#00FF94] v5-mono mb-2",children:[(0,N.jsx)("span",{className:"v5-dot-static"})," Agent code generated"]}),(0,N.jsxs)("p",{className:"text-sm text-zinc-300 mb-4",children:[ae.length," files with x402 payments wired in. Publish to list it on the marketplace as an MCP tool and A2A endpoint."]}),(0,N.jsxs)("button",{"data-testid":"agent-publish-btn",onClick:async()=>
2{if(F){R(!0);try{let e=null;if(S.logoFile){M("\ud83d\udce4 Uploading agent logo...");const t=new FormData;t.append("logo",S.logoFile),t.append("agent_name",S.name);const s=await v.A.post("".concat(k,"/upload-agent-logo"),t,{headers:{"Content-Type":"multipart/form-data"}});s.data.success&&(e=s.data.logo_url,console.log("\u2705 Logo uploaded:",e))}const s=await v.A.post("".concat(k,"/agents/register"),{name:S.name,description:S.description,category:S.category,price_per_call:S.price,creator_wallet:F.toString(),source_code:C,logo_url:e});s.data.success&&(console.log("\u2705 Agent published to marketplace!"),t("/agents/".concat(s.data.agent_id)))}catch(a){var e,s;console.error("Publishing failed:",(null===(e=a.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.detail)||a.message)}finally{R(!1),M("")}}else console.error("Wallet not connected")},disabled:q,className:"w-full px-6 py-3.5 rounded-xl font-bold flex items-center justify-center gap-2 transition-all hover:brightness-110 active:scale-[0.99] disabled:opacity-50",style:{background:"linear-gradient(135deg, #00FF94, #00F0FF)",color:"#050505",boxShadow:"0 0 24px rgba(0,255,148,0.25)"},children:[(0,N.jsx)(m.A,{className:"w-5 h-5"}),q?"Publishing...":"Publish to Marketplace"]})]})]}),(0,N.jsxs)("div",{className:"lg:col-span-7 space-y-4",children:[(0,N.jsxs)("div",{className:"text-[10px] uppercase tracking-[0.2em] text-zinc-500 v5-mono flex items-center gap-2",children:[(0,N.jsx)("span",{className:"v5-dot-static",style:{color:"#B026FF"}})," Inspector"]}),(0,N.jsxs)("div",{className:"rounded-2xl border border-white/10 overflow-hidden",style:{background:"#050505"},"data-testid":"agent-code-inspector",children:[(0,N.jsxs)("div",{className:"h-10 px-2 flex items-center gap-1 border-b border-white/10 overflow-x-auto v5-scrollbar",style:{background:"#0B0C10"},children:[(0,N.jsx)(h.A,{className:"w-3.5 h-3.5 ml-1 mr-1 flex-shrink-0",style:{color:"#00F0FF"}}),ae.length?ae.map((e=>(0,N.jsx)("button",{onClick:()=>_(e),"data-testid":"agent-file-tab-".concat(e.replace(/[^a-zA-Z0-9_-]/g,"_")),className:"px-2.5 py-1 rounded-md text-[11px] v5-mono whitespace-nowrap transition-colors ".concat(ne===e?"text-[#00F0FF] border border-[#00F0FF]/30":"text-zinc-500 hover:text-white border border-transparent"),style:ne===e?{background:"rgba(0,240,255,0.06)"}:{},children:e},e))):(0,N.jsx)("span",{className:"text-[11px] v5-mono text-zinc-600",children:"generated files appear here"}),ne&&(0,N.jsx)("button",{onClick:()=>{var e;return null===(e=navigator.clipboard)||void 0===e?void 0:e.writeText("string"===typeof ie?ie:JSON.stringify(ie,null,2)).catch((()=>{}))},className:"ml-auto p-1 text-zinc-500 hover:text-white transition-colors flex-shrink-0",title:"Copy file","data-testid":"agent-file-copy",children:(0,N.jsx)(g.A,{className:"w-3.5 h-3.5"})})]}),C?(0,N.jsx)("pre",{className:"p-4 text-[12px] leading-relaxed text-zinc-300 v5-mono overflow-auto max-h-[560px] v5-scrollbar","data-testid":"agent-file-content",children:"string"===typeof ie?ie:JSON.stringify(ie,null,2)}):(0,N.jsxs)("div",{className:"relative p-8 v5-grid-bg min-h-[420px] flex flex-col justify-center","data-testid":"agent-inspector-empty",children:[(0,N.jsx)("div",{className:"v5-scan"}),(0,N.jsxs)("div",{className:"relative max-w-md",children:[(0,N.jsx)("div",{className:"v5-badge-autopilot mb-4",children:"Autopilot-ready"}),(0,N.jsx)("h3",{className:"text-xl font-bold v5-display mb-2",children:"What you get"}),(0,N.jsx)("p",{className:"text-sm text-zinc-400 mb-5",children:"A complete agent package generated from your brief, verified by Jev before it reaches you."}),(0,N.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:[[r.A,"#00F0FF","main.py + agent_core.py","runnable agent with tool functions"],[d.A,"#FF007F","x402 payments","USDC per call, quote \u2192 settle \u2192 receipt"],[l.A,"#B026FF","MCP tool manifest","discoverable by any MCP client"],[m.A,"#00FF94","ERC-8004 identity","Robinhood Chain 4663 \xb7 Base"]].map((e=>{let[t,s,a,n]=e;return(0,N.jsxs)("div",{className:"v5-tile p-3",children:[(0,N.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,N.jsx)(t,{className:"w-3.5 h-3.5",style:{color:s}}),(0,N.jsx)("span",{className:"text-xs font-semibold text-white",children:a})]}),(0,N.jsx)("div",{className:"text-[11px] text-zinc-500",children:n})]},a)}))})]})]})]}),(0,N.jsx)(f.G,{spec:re,modelSettings:{}})]})]}),O&&(0,N.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",style:{background:"rgba(5,5,5,0.85)",backdropFilter:"blur(8px)"},"data-testid":"agent-progress-overlay",children:(0,N.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-white/15 p-6 shadow-2xl",style:{background:"#0B0C10"},children:[(0,N.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,N.jsx)("span",{className:"w-10 h-10 rounded-xl flex items-center justify-center",style:{background:"rgba(176,38,255,0.15)",border:"1px solid rgba(176,38,255,0.35)"},children:(0,N.jsx)(u.A,{className:"w-5 h-5 animate-spin",style:{color:"#D9A6FF"}})}),(0,N.jsxs)("div",{children:[(0,N.jsx)("h3",{className:"text-base font-bold v5-display",children:"Building your agent"}),(0,N.jsx)("p",{className:"text-[11px] text-zinc-500 v5-mono",children:"plan \u2192 generate \u2192 verify \xb7 x402 wired
2in"})]})]}),(0,N.jsxs)("div",{className:"rounded-lg border border-white/10 px-3 py-2.5 mb-4 text-xs text-zinc-300 v5-mono min-h-[40px] flex items-center",style:{background:"#050505"},"data-testid":"agent-progress-step",children:[(0,N.jsx)("span",{className:"v5-dot mr-2",style:{color:"#00F0FF"}})," ",I||"Initializing intelligent agent builder..."]}),(0,N.jsxs)("div",{className:"flex justify-between text-[11px] text-zinc-500 v5-mono mb-1.5",children:[(0,N.jsx)("span",{children:"progress"}),(0,N.jsxs)("span",{"data-testid":"agent-progress-pct",children:[Math.round(D),"%"]})]}),(0,N.jsx)("div",{className:"w-full rounded-full h-2 overflow-hidden",style:{background:"rgba(255,255,255,0.06)"},children:(0,N.jsx)("div",{className:"h-full rounded-full transition-all duration-500",style:{width:"".concat(D,"%"),background:"linear-gradient(90deg, #B026FF, #00F0FF)"}})}),U&&(0,N.jsxs)("p",{className:"text-[10px] text-zinc-600 v5-mono mt-4",children:["task ",U.substring(0,16),"\u2026"]})]})}),(0,N.jsx)(y.A,{isOpen:$,onClose:()=>J(!1),onPurchaseSuccess:e=>{E(G+e),te()}}),K&&(0,N.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",style:{background:"rgba(5,5,5,0.9)",backdropFilter:"blur(8px)"},"data-testid":"agent-clarify-modal",children:(0,N.jsxs)("div",{className:"w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-2xl border border-white/15 p-6 shadow-2xl v5-scrollbar",style:{background:"#0B0C10"},children:[(0,N.jsxs)("div",{className:"flex items-center justify-between mb-5",children:[(0,N.jsxs)("h3",{className:"text-lg font-bold flex items-center gap-2 v5-display",children:[(0,N.jsx)(l.A,{className:"w-5 h-5",style:{color:"#D9A6FF"}}),"Refine the brief"]}),(0,N.jsx)("button",{onClick:()=>H(!1),className:"text-zinc-500 hover:text-white text-xl leading-none","data-testid":"agent-clarify-close",children:"\xd7"})]}),(0,N.jsx)("p",{className:"text-sm text-zinc-300 mb-4",children:"The builder analyzed your request. Answer any questions below to sharpen the result, or skip them and let it research best practices."}),(0,N.jsxs)("div",{className:"rounded-lg border border-[#00F0FF]/25 p-3 mb-5 text-xs",style:{background:"rgba(0,240,255,0.05)",color:"#9AE8F0"},children:[(0,N.jsx)("strong",{children:"All questions are optional."})," Answer what you know, skip the rest."]}),X&&(0,N.jsxs)("div",{className:"rounded-lg border border-white/10 p-3 mb-5 text-xs v5-mono",style:{background:"#050505"},"data-testid":"agent-analysis-summary",children:[(0,N.jsx)("div",{className:"text-zinc-500 mb-1",children:"analysis"}),(0,N.jsxs)("div",{className:"text-white",children:["complexity: ",(0,N.jsx)("span",{style:{color:"#D9A6FF"},children:X.complexity_level})]}),(0,N.jsxs)("div",{className:"text-white",children:["pattern: ",(0,N.jsx)("span",{style:{color:"#00F0FF"},children:X.recommended_pattern})]})]}),(0,N.jsx)("div",{className:"space-y-3 mb-5",children:Y&&Y.length>0?Y.map(((e,t)=>(0,N.jsxs)("div",{className:"rounded-lg border border-white/10 p-3",style:{background:"#050505"},children:[(0,N.jsxs)("label",{className:"block text-sm font-medium text-zinc-200 mb-2",children:[t+1,". ",e]}),(0,N.jsx)("textarea",{"data-testid":"agent-clarify-answer-".concat(t),value:V[e]||"",onChange:t=>Q((0,a.A)((0,a.A)({},V),{},{[e]:t.target.value})),className:"v5-input w-full px-3 py-2 text-sm text-white",rows:"3",placeholder:"Your answer..."})]},t))):(0,N.jsxs)("div",{className:"rounded-lg border border-[#FFB800]/30 p-5 text-center",style:{background:"rgba(255,184,0,0.06)"},children:[(0,N.jsx)("p",{className:"text-[#FFB800] font-semibold mb-1",children:"No questions needed"}),(0,N.jsx)("p",{className:"text-zinc-300 text-sm",children:"Your request was clear enough. Continue to generate."})]})}),(0,N.jsxs)("div",{className:"flex gap-3",children:[(0,N.jsx)("button",{onClick:()=>{H(!1),Q({})},className:"v5-btn-secondary flex-1 px-5 py-3 rounded-xl font-semibold text-sm","data-testid":"agent-clarify-skip",children:"Skip all questions"}),(0,N.jsx)("button",{onClick:()=>{console.log("\ud83d\udcdd Proceeding with user clarifications (optional)..."),console.log("Answers provided:",Object.keys(V).length),H(!1),se(!0)},className:"v5-glow-btn flex-1 px-5 py-3 rounded-xl font-bold text-sm","data-testid":"agent-clarify-submit",children:"Generate agent"})]})]})})]})}},4929:(e,t,s)=>{s.d(t,{A:()=>y});var a=s(44628),n=s(9055),i=s(75602),r=s(31893),l=s(35579),c=s(99809),o=s(72081),d=s(72406),x=s(45535),p=s(56646),m=s(86002),h=s(96103),g=s(21798),u=s(81523),b=s(21864);const v=[{id:"SOL",label:"SOL",icon:n.A,field:"sol",fmt:e=>
2"".concat(e," SOL"),active:"border-sky-400 bg-sky-400/10 text-sky-300"},{id:"TOS",label:"$TOS \xb7 20% off",icon:i.A,field:"tos",fmt:e=>"".concat(Number(e).toLocaleString()," $TOS"),active:"border-fuchsia-400 bg-fuchsia-400/10 text-fuchsia-300"},{id:"USDC",label:"USDC",icon:r.A,field:"usdc",fmt:e=>"".concat(Number(e).toFixed(2)," USDC"),active:"border-emerald-400 bg-emerald-400/10 text-emerald-300"}],y=e=>{let{isOpen:t,onClose:s,onPurchaseSuccess:n}=e;const[i,r]=(0,a.useState)(null),[y,f]=(0,a.useState)(""),[j,w]=(0,a.useState)(null),[N,k]=(0,a.useState)("SOL"),[F,A]=(0,a.useState)(!1),[S,z]=(0,a.useState)(null),{connected:C,publicKey:B,sendTransaction:P}=(0,d.v)(),_=async()=>{f("");try{const e=await fetch("".concat((0,u.getBackendBaseUrl)(),"/api/credits/pricing")),t=await e.json();if(!e.ok)throw new Error(t.detail||"Price feed unavailable");r(t),j&&w(t.packages.find((e=>e.id===j.id))||null)}catch(e){f(e.message)}};if((0,a.useEffect)((()=>{if(!t)return;_();const e=setInterval(_,45e3);return()=>clearInterval(e)}),[t]),!t)return null;const O=v.find((e=>e.id===N)),T=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O;return e&&t?e[t.field]:null},I=i?new x.PublicKey(i.treasury):null,M=async(e,t,s)=>{const a=(0,g.createRpcConnection)("confirmed"),n=new x.PublicKey(e),i=await(0,p.Ob)(n,B),r=await(0,p.Ob)(n,I),l=BigInt(Math.round(t*10**s)),c=(new x.Transaction).add((0,m.CA)(B,r,I,n)).add((0,h.C3)(i,r,B,l));return P(c,a)};return(0,b.jsx)("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm flex items-center justify-center z-50 p-4","data-testid":"credit-purchase-modal",children:(0,b.jsxs)("div",{className:"rounded-2xl border border-zinc-800 max-w-2xl w-full max-h-[90vh] overflow-y-auto",style:{background:"#0B0C10"},children:[(0,b.jsxs)("div",{className:"flex items-start justify-between p-6 border-b border-zinc-800 sticky top-0 z-10 rounded-t-2xl",style:{background:"#0B0C10"},children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("h2",{className:"text-2xl font-bold text-white flex items-center",style:{fontFamily:"Space Grotesk, sans-serif"},children:[(0,b.jsx)(l.A,{className:"w-6 h-6 mr-3 text-[#B026FF]"})," Buy TokenOS credits"]}),(0,b.jsx)("p",{className:"text-zinc-400 mt-1 text-sm",children:"Pay in SOL, $TOS or USDC \u2014 priced live at market, verified on-chain before credits land."})]}),(0,b.jsx)("button",{onClick:s,className:"text-zinc-500 hover:text-white p-2","data-testid":"credit-modal-close",children:(0,b.jsx)(c.A,{className:"w-5 h-5"})})]}),(0,b.jsxs)("div",{className:"px-6 pt-4 flex items-center justify-between text-[11px] text-zinc-500",style:{fontFamily:"Source Code Pro, monospace"},"data-testid":"credit-price-feed",children:[i?(0,b.jsxs)("span",{children:["Price sheet ",new Date(i.as_of).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})," \xb7 SOL $",i.prices.SOL.toFixed(2)," \xb7 $TOS $",i.prices.TOS.toFixed(5)," \xb7 repriced twice daily",i.stale?" \xb7 refreshing":""]}):(0,b.jsx)("span",{children:y?"Price feed: ".concat(y):"Loading live prices\u2026"}),(0,b.jsxs)("button",{onClick:_,className:"inline-flex items-center gap-1 hover:text-white","data-testid":"credit-price-refresh",children:[(0,b.jsx)(o.A,{className:"w-3 h-3"})," refresh"]})]}),(0,b.jsx)("div",{className:"p-6 space-y-3",children:((null===i||void 0===i?void 0:i.packages)||[]).map((e=>{const t=(null===j||void 0===j?void 0:j.id)===e.id;return(0,b.jsxs)("div",{onClick:()=>w(e),"data-testid":"credit-package-".concat(e.credits),className:"relative border rounded-xl p-5 cursor-pointer transition-colors ".concat(t?"border-[#B026FF] bg-[#B026FF]/10":"border-zinc-800 hover:border-zinc-600"),children:[e.popular&&(0,b.jsx)("span",{className:"absolute -top-2.5 left-5 px-2 py-0.5 rounded-full text-[10px] font-bold text-black",style:{background:"#00F0FF"},children:"MOST POPULAR"}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("h3",{className:"text-lg font-bold text-white",children:[e.credits.toLocaleString()," credits"]}),(0,b.jsxs)("p",{className:"text-zinc-500 text-xs mt-0.5",children:[e.description," \xb7 $",e.usd_per_credit.toFixed(3)," / credit"]})]}),(0,b.jsxs)("div",{className:"text-right",children:[(0,b.jsxs)("div",{className:"text-white font-semibold",children:["$",e.usd.toFixed(2)]}),(0,b.jsxs)("div",{className:"text-[11px] text-zinc-500",style:{fontFamily:"Source Code Pro, monospace"},children:[e.sol," SOL \xb7 ",e.usdc," USDC \xb7 ",(0,b.jsxs)("span",{className:"text-fuchsia-300",children:[e.tos.toLocaleStr
2ing()," $TOS ($",e.tos_usd.toFixed(2),")"]})]})]})]})]},e.id)}))}),j&&(0,b.jsxs)("div",{className:"px-6 pb-4",children:[(0,b.jsx)("h3",{className:"text-white text-sm font-medium mb-2",children:"Pay with"}),(0,b.jsx)("div",{className:"grid grid-cols-3 gap-2",children:v.map((e=>(0,b.jsxs)("button",{onClick:()=>k(e.id),"data-testid":"credit-pay-".concat(e.id),className:"p-3 rounded-lg border text-sm transition-colors flex flex-col items-center gap-1 ".concat(N===e.id?e.active:"border-zinc-800 text-zinc-300 hover:border-zinc-600"),children:[(0,b.jsx)(e.icon,{className:"w-4 h-4"}),(0,b.jsx)("span",{className:"font-semibold",children:e.fmt(T(j,e))}),(0,b.jsx)("span",{className:"text-[10px] opacity-70",children:e.label})]},e.id)))})]}),S&&(0,b.jsx)("div",{className:"px-6 pb-2",children:(0,b.jsxs)("div",{"data-testid":"purchase-error",className:"flex items-start gap-2 rounded-lg border border-red-500/40 bg-red-500/10 px-4 py-3 text-sm text-red-300",children:[(0,b.jsx)("span",{children:"\u26a0"}),(0,b.jsx)("span",{children:S})]})}),(0,b.jsxs)("div",{className:"p-6 pt-4 border-t border-zinc-800",children:[(0,b.jsx)("button",{onClick:async()=>{if(C&&B&&j&&i){A(!0),z(null);try{const e=await fetch("".concat((0,u.getBackendBaseUrl)(),"/api/credits/pricing")),t=await e.json(),a=t.packages.find((e=>e.id===j.id)),i=T(a);let r;r="SOL"===N?await(async e=>{const t=(0,g.createRpcConnection)("confirmed"),s=(new x.Transaction).add(x.SystemProgram.transfer({fromPubkey:B,toPubkey:I,lamports:Math.round(e*x.LAMPORTS_PER_SOL)}));return P(s,t)})(i):"TOS"===N?await M(t.mints.TOS,i,6):await M(t.mints.USDC,i,6);const l=await fetch("".concat((0,u.getBackendBaseUrl)(),"/api/purchase-credits"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({wallet_address:B.toString(),credits:a.credits,payment_method:N,transaction_signature:r,amount:i})}),c=await l.text();if(!l.ok)throw new Error("Credit purchase verification failed: ".concat(c));null===n||void 0===n||n(a.credits),s()}catch(e){const t=(0,g.friendlyRpcError)(e,"Payments"),s=String(e.message||e);z(t||(/reject|cancel|denied/i.test(s)?"Transaction was cancelled in your wallet.":"Purchase failed: ".concat(s.slice(0,300))))}finally{A(!1)}}},disabled:!j||F||!i||!C,"data-testid":"credit-purchase-submit",className:"w-full text-white py-3.5 rounded-xl font-semibold disabled:opacity-40 disabled:cursor-not-allowed hover:opacity-90 transition-opacity flex items-center justify-center",style:{background:"linear-gradient(135deg,#B026FF,#FF007F)"},children:F?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"})," Confirming on-chain\u2026"]}):C?j?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l.A,{className:"w-4 h-4 mr-2"})," Pay ",O.fmt(T(j))," for ",j.credits.toLocaleString()," credits"]}):"Select a package":"Connect your wallet"}),(0,b.jsx)("p",{className:"text-[10px] text-zinc-600 mt-2 text-center",children:"Prices are set from market rates twice a day and verified on-chain against the same sheet. Paying with $TOS is always 20% cheaper. Credits are a prepaid platform utility \u2014 not an investment."})]})]})})}},5427:(e,t,s)=>{s.d(t,{G:()=>x});s(44628);var a=s(75576),n=s(71355),i=s(37634),r=s(200),l=s(31838),c=s(21864);const o=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(/\s+/).filter(Boolean).slice(0,2).map((e=>{var t;return null===(t=e[0])||void 0===t?void 0:t.toUpperCase()})).join("")||"AG"},d=e=>{let{icon:t,label:s,children:a}=e;return(0,c.jsxs)("div",{className:"flex items-start gap-2 text-[11px]",children:[(0,c.jsx)(t,{className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0 text-zinc-500"}),(0,c.jsx)("span",{className:"text-zinc-500 w-20 flex-shrink-0 v5-mono uppercase tracking-wider text-[10px] pt-0.5",children:s}),(0,c.jsx)("div",{className:"flex-1 min-w-0 text-zinc-200",children:a})]})},x=e=>{var t,s;let{spec:x,modelSettings:p={},evalReport:m,publishStatus:h}=e;if(!x)return(0,c.jsxs)("div",{className:"v5-surface rounded-2xl p-6","data-testid":"spec-sheet-empty",children:[(0,c.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,c.jsx)("div",{className:"w-12 h-12 rounded-xl border border-dashed border-white/15 flex items-center justify-center",children:(0,c.jsx)(a.A,{className:"w-5 h-5 text-zinc-600"})}),(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"text-sm font-semibold text-zinc-300 v5-display",children:"Agent spec sheet"}),(0,c.jsx)("div",{className:"text-[11px] text-zinc-500",children:"Fills in live as the builder drafts your agent."})]})]}),(0,c.jsx)("div",{className:"space-y-2",children:[80,60,70].map(((e,t)=>(0,c.jsx)("div",{className:"h-2.5 rounded v5-shimmer",style:{width:"".concat(e,"%")}},t)))})]});const g=p[x.model],u=null===m||void 0===m?void 0:m.verdict,b="green"===u?"#00FF94":"yellow"===u?"#FFB800":"red"===u?"#FF3366":"#71717A";return(0,c.jsxs)("div",{className:"v5-surface rounded-2xl p-5 space-y-4 v5-rise","data-testid":"spec-sheet",children:[(0,c.jsxs)("div",{className:"flex items-start gap-3",children:[(0,c.jsx)("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center text-sm font-black text-white flex-shrink-0 v5-display",style:{background:"linear-gradient(135deg, #B026FF, #FF007F 60%, #00F0FF)",boxShadow:"0 0 20px rgba(176,38,255,0.35)"},"data-testid":"spec-sheet-avatar",children:o(x.name)}),(0,c.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,c.jsx)("div",{className:"text-base font-bold text-white v5-display truncate","data-testid":"spec-sheet-name",children:x.name||"Untitled agent"}),(0,c.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mt-1",children:[(0,c.jsx)("span",{className:"px-2 py-0.5 rounded-full text-[10px] v5-mono border border-[#B026FF]/30 text-[#D9A6FF]",style:{background:"rgba(176,38,255,0.1)"},children:x.category||"general"}),(0,c.jsxs)("span",{className:"px-2 py-0.5 rounded-full text-[10px] v5-mono border border-[#00FF94]/30 text-[#00FF94]",style:{background:"rgba(0,255,148,0.08)"},"data-testid":"spec-sheet-price",children:["$",x.price_per_call," USDC / call"]}),"done"===h&&(0,c.jsx)("span",{className:"v5-badge-live",children:"published"})]})]})]}),x.description&&(0,c.jsx)("p",{className:"text-xs text-zinc-400 leading-relaxed line-clamp-3","data-testid":"spec-sheet-description",children:x.description}),(0,c.jsxs)("div",{className:"space-y-2 pt-3 border-t border-white/10",children:[(0,c.jsxs)(d,{icon:n.A,label:"model",children:[(0,c.jsx)("span",{className:"text-white",children:(null===g||void 0===g?void 0:g.name)||x.model}),(0,c.jsxs)("span",{className:"text-zinc-500",children:[" \xb7 ",x.provider]})]}),(0,c.jsxs)(d,{icon:i.A,label:"effort",children:[(0,c.jsx)("span",{className:"capitalize",children:x.reasoning_effort||"auto"}),null!==g&&void 0!==g&&g.multiplier?(0,c.jsxs)("span",{className:"text-zinc-500",children:[" \xb7 ",g.multiplier,"x credits"]}):null]}),(0,c.jsx)(d,{icon:r.A,label:"tools",children:null!==(t=x.tools)&&void 0!==t&&t.length?(0,c.jsx)("div",{className:"flex flex-wrap gap-1",children:x.tools.map((e=>(0,c.jsx)("span",{className:"px-1.5 py-0.5 rounded text-[10px] v5-mono border border-white/10 text-zinc-300",style:{background:"rgba(255,255,255,0.03)"},children:e},e)))}):(0,c.jsx)("span",{className:"text-zinc-500",children:"none \u2014 pure reasoning agent"})}),(0,c.jsxs)(d,{icon:l.A,label:"evals",children:[(0,c.jsxs)("span",{children:[(null===(s=x.eval_cases)||void 0===s?void 0:s.length)||0," cases"]}),u&&(0,c.jsxs)("span",{className:"ml-2 font-semibold v5-mono",style:{color:b},"data-testid":"spec-sheet-verdict",children:[u.toUpperCase()," ",m.passed,"/",m.total]})]})]})]})}},35579:(e,t,s)=>{s.d(t,{A:()=>a});
2const a=(0,s(70501).A)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},31893:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(70501).A)("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]])},31838:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(70501).A)("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]])},37634:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(70501).A)("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]])},56238:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(70501).A)("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]])},72081:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(70501).A)("RefreshCw",[["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"}]])},30979:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(70501).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},200:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(70501).A)("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},86002:(e,t,s)=>{s.d(t,{CA:()=>r});var a=s(45535),n=s(90739),i=s(32775).Buffer;function r(e,t,s,a){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.x5,c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:n.EK;return l(e,t,s,a,i.from([1]),r,c)}function l(e,t,s,i,r){let l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:n.x5,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:n.EK;const o=[{pubkey:e,isSigner:!0,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:s,isSigner:!1,isWritable:!1},{pubkey:i,isSigner:!1,isWritable:!1},{pubkey:a.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:l,isSigner:!1,isWritable:!1}];return new a.TransactionInstruction({keys:o,programId:c,data:r})}},96103:(e,t,s)=>{s.d(t,{C3:()=>x});var a=s(10801),n=s(68739),i=s(45535),r=s(90739),l=s(13341),c=s(76191),o=s(32775).Buffer;const d=(0,a.w3)([(0,a.u8)("instruction"),(0,n._l)("amount")]);function x(e,t,s,a){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],x=arguments.length>5&&void 0!==arguments[5]?arguments[5]:r.x5;const p=(0,l.d)([{pubkey:e,isSigner:!1,isWritable:!0},{pubkey:t,isSigner:!1,isWritable:!0}],s,n),m=o.alloc(d.span);return d.encode({instruction:c._.Transfer,amount:BigInt(a)},m),new i.TransactionInstruction({keys:p,programId:x,data:m})}}}]);
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.