!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a09e9c-6ca3-74f1-b14c-5b0973ad034d")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,191379,e=>{"use strict";let t=(0,e.i(202913).default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["ArrowUpRight",0,t],191379)},969949,e=>{"use strict";let t=(0,e.i(202913).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],969949)},258338,e=>{"use strict";var t=e.i(693207);e.s(["Layers",()=>t.default])},782888,e=>{"use strict";var t,r=((t={}).CodeDebugging="code:debugging",t.CodeSecurityReview="code:review_security",t.CodeGeneralImpl="code:general_impl",t.CodeSqlDatabase="code:sql_database",t.CodeFrontendUi="code:frontend_ui",t.CodeDevopsConfig="code:devops_config",t.CodeShellExecution="code:shell_execution",t.CodeFileReadWrite="code:file_read_write",t.CodeRepoScan="code:repo_scan",t.AgentMultiStepPlanning="agent:multi_step_planning",t.AgentWebSearch="agent:web_search",t.AgentWorkflowExecution="agent:workflow_execution",t.AgentToolDispatch="agent:tool_dispatch",t.AgentMemoryExtraction="agent:memory_extraction",t.ClassificationTagging="classification_tagging",t.DataExtraction="data:extraction",t.DataTransformation="data:transformation",t.Devops="devops",t.Summarization="summarization",t.Translation="translation",t.ContentWriting="content_writing",t.ResearchReport="research_report",t.QaKnowledge="qa_knowledge",t.ConversationalReply="conversational_reply",t.CustomerSupport="customer_support",t.FinanceTrading="finance_trading",t.SecurityAudit="security_audit",t.Math="math",t.RoleplayFiction="roleplay_fiction",t.Other="other",t);Object.values(r);let a=[{tag:"code:general_impl",displayName:"Code Generation",description:"Write new code to solve a non-trivial problem (function, class, feature)."},{tag:"code:debugging",displayName:"Debugging",description:"Diagnose why something doesn't work — stack traces, bug location, fix proposal."},{tag:"code:review_security",displayName:"Code Review",description:"Audit code for vulnerabilities, correctness, or quality issues."},{tag:"code:sql_database",displayName:"SQL & Database",description:"Write or analyze SQL queries, schema design, query optimization."},{tag:"code:frontend_ui",displayName:"Frontend & UI",description:"Write or modify UI components — HTML/CSS/React/Vue/etc."},{tag:"code:devops_config",displayName:"DevOps & Config",description:"Infrastructure config files — Dockerfile, Kubernetes, Terraform, GitHub Actions."},{tag:"code:shell_execution",displayName:"Shell Execution",description:"Run or generate a shell command."},{tag:"code:file_read_write",displayName:"File I/O",description:"Read or write file contents — open, cat, edit, save."},{tag:"code:repo_scan",displayName:"Repo Scanning",description:"Search or list files in a repo — find, grep, list."},{tag:"agent:multi_step_planning",displayName:"Multi-step Planning",description:"Decompose a goal into a multi-step execution plan."},{tag:"agent:web_search",displayName:"Web Search",description:"Search the web or look up online information."},{tag:"agent:workflow_execution",displayName:"Workflow Execution",description:"Execute or orchestrate a multi-step workflow/pipeline. Default for autonomous agent system prompts."},{tag:"agent:tool_dispatch",displayName:"Tool Dispatch",description:"Call a specific tool or function within an agent context."},{tag:"agent:memory_extraction",displayName:"Memory Extraction",description:"Extract or store memory facts from a conversation."},{tag:"classification_tagging",displayName:"Classification",description:"Assign a label or category to supplied text — sentiment, intent, urgency."},{tag:"data:extraction",displayName:"Data Extraction",description:"Pull values out of supplied text — names, dates, entities, fields."},{tag:"data:transformation",displayName:"Data Transformation",description:"Reshape or restructure supplied data — JSON↔CSV, sort, group, reformat."},{tag:"devops",displayName:"DevOps",description:"Deployment operations, cluster management, infrastructure at the system level."},{tag:"summarization",displayName:"Summarization",description:"Produce a shorter version of supplied text."},{tag:"translation",displayName:"Translation",description:"Translate text from one language to another."},{tag:"content_writing",displayName:"Content Writing",description:"Draft net-new prose — emails, blog posts, social copy, marketing."},{tag:"research_report",displayName:"Research & Reports",description:"Produce a written report from multiple sources — market analysis, comparison."},{tag:"qa_knowledge",displayName:"Q&A & Knowledge",description:"Factual Q&A from world knowledge — explain X, what is Y, how does Z work."},{tag:"conversational_reply",displayName:"Conversation",description:"Genuine chat-turn reply in a conversational register."},{tag:"customer_support",displayName:"Customer Support",description:"Customer support ticket handling — schedule, book, route, FAQ, billing."},{tag:"finance_trading",displayName:"Finance & Trading",description:"Trading signals, market analysis, financial modeling."},{tag:"security_audit",displayName:"Security Audit",description:"Penetration test, threat modeling, vulnerability scan, compliance review."},{tag:"math",displayName:"Math",description:"Solve equations, proofs, integrals, derivatives."},{tag:"roleplay_fiction",displayName:"Roleplay & Fiction",description:"Character roleplay, interactive fiction, narrative continuation."},{tag:"other",displayName:"Other",description:"True last resort: corrupted text, empty messages, pure gibberish."}],i=a.reduce((e,t)=>(e[t.tag]=t.displayName,e),{});e.s(["TaskTypeTag",()=>r,"buildTaskTypePresetPrompt",0,function(){let e=a.map(e=>`${e.displayName} — ${e.description}`).join("\n");return`You are a task-type classifier for AI gateway traffic. Given a prompt, assign the single best task type based on the actual work the model is being asked to perform. IMPORTANT RULES: - Classify by the TASK being requested — not by tools, code, or boilerplate in the system prompt context. - Many agent system prompts list available tools (exec, read, grep, web_search) — these are capabilities the agent HAS, not what the user is asking for. Only assign code or agent categories when the user message explicitly requests that operation. - When the user message is short or trivial (e.g. "hi", "yes", "ok"), classify based on what kind of interaction the system prompt establishes. - Prefer a specific value over "Other" whenever there is a reasonable match. Task type definitions: ${e}`},"getTaskTypeDisplayName",0,function(e){return i[e]??e},"getTaskTypeDisplayNames",0,function(){return a.map(e=>e.displayName)}])},557225,630056,e=>{"use strict";var t=e.i(222666),r=e.i(505962),a=e.i(452473),i=e.i(188363),o=e.i(687421),n=e.i(678998);function s(e){return e.toLowerCase()}let l=new Map([[s(o.ProviderName.OpenAI),{url:(0,n.getLocalIconUri)("OpenAI.svg"),className:"dark:invert"}],[s(o.ProviderName.Perplexity),{url:(0,n.getLocalIconUri)("Perplexity.png")}],[s(o.ProviderName.Poolside),{url:(0,n.getLocalIconUri)("poolside-logomark-solid-color.svg")}],[s(o.ProviderName.Perceptron),{url:(0,n.getFaviconUrl)("https://www.perceptron.inc")}],["voyageai",{url:(0,n.getFaviconUrl)("https://www.voyageai.com")}],[s(o.ProviderName.GoogleAIStudio),{url:(0,n.getLocalIconUri)("GoogleAIStudio.svg")}],[s(o.ProviderName.Anthropic),{url:(0,n.getLocalIconUri)("Anthropic.svg")}],[s(o.ProviderName.ClaudeOnAws),{url:(0,n.getLocalIconUri)("Anthropic.svg")}],[s(o.ProviderName.Cohere),{url:(0,n.getLocalIconUri)("Cohere.png")}],[s(o.ProviderName.Deepgram),{url:(0,n.getLocalIconUri)("Deepgram.svg"),className:"dark:invert"}],[s(o.ProviderName.DeepSeek),{url:(0,n.getLocalIconUri)("DeepSeek.png")}],[s(o.ProviderName.Together),{url:(0,n.getFaviconUrl)("https://www.together.ai/")}],[s(o.ProviderName.Infermatic),{url:(0,n.getFaviconUrl)("https://infermatic.ai/")}],[s(o.ProviderName.HuggingFace),{url:(0,n.getFaviconUrl)("https://huggingface.co/")}],[s(o.ProviderName.AI21),{url:(0,n.getFaviconUrl)("https://ai21.com/")}],[s(o.ProviderName.Featherless),{url:(0,n.getFaviconUrl)("https://featherless.ai/")}],[s(o.ProviderName.Reflection),{url:(0,n.getFaviconUrl)("https://railway.app/")}],[s(o.ProviderName.Inflection),{url:(0,n.getFaviconUrl)("https://inflection.ai/")}],[s(o.ProviderName.Minimax),{url:(0,n.getFaviconUrl)("https://minimaxi.com/")}],[s(o.ProviderName.Liquid),{url:(0,n.getFaviconUrl)("https://www.liquid.ai/"),className:"dark:invert"}],[s(o.ProviderName.Inception),{url:(0,n.getLocalIconUri)("Inception.svg"),className:"dark:invert"}],[s(o.ProviderName.Relace),{url:(0,n.getFaviconUrl)("https://www.relace.ai")}],[s(o.ProviderName.Sourceful),{url:(0,n.getFaviconUrl)("https://www.sourceful.com/")}],[s(o.ProviderName.BytePlus),{url:(0,n.getFaviconUrl)("https://www.byteplus.com")}],[s(o.ProviderName.Xiaomi),{url:(0,n.getFaviconUrl)("https://www.mi.com")}],["arcee-ai",{url:(0,n.getFaviconUrl)("https://www.arcee.ai")}],["fish-audio",{url:(0,n.getFaviconUrl)("https://fish.audio/")}],["z-ai",{url:(0,n.getFaviconUrl)("https://z.ai/"),className:"dark:invert"}],["moonshotai",{url:(0,n.getLocalIconUri)("MoonshotAI.png")}],["morph",{url:(0,n.getFaviconUrl)("https://morphllm.com")}],["qwen",{url:(0,n.getLocalIconUri)("Qwen.png")}],["google",{url:(0,n.getLocalIconUri)("GoogleGemini.svg")}],["microsoft",{url:(0,n.getLocalIconUri)("Microsoft.svg")}],["nousresearch",{url:(0,n.getFaviconUrl)("https://nousresearch.com/")}],["nvidia",{url:(0,n.getFaviconUrl)("https://nvidia.com/")}],["meta-llama",{url:(0,n.getLocalIconUri)("Meta.png")}],["meta",{url:(0,n.getLocalIconUri)("Meta.png")}],["databricks",{url:(0,n.getFaviconUrl)("https://databricks.com/")}],["openrouter",{url:(0,n.getLocalIconUri)("openrouter-glyph-light.svg"),darkUrl:(0,n.getLocalIconUri)("openrouter-glyph-dark.svg")}],["mistralai",{url:(0,n.getLocalIconUri)("Mistral.png")}],["x-ai",{url:(0,n.getFaviconUrl)("https://x.ai/")}],["amazon",{url:(0,n.getFaviconUrl)("https://nova.amazon.com/")}],["aion-labs",{url:(0,n.getFaviconUrl)("https://www.aionlabs.ai/")}],["allenai",{url:(0,n.getFaviconUrl)("https://allenai.org/")}],["switchpoint",{url:(0,n.getFaviconUrl)("https://switchpoint.dev/")}],["thedrummer",{url:(0,n.getLocalIconUri)("TheDrummer.png")}],["deepcogito",{url:(0,n.getFaviconUrl)("https://www.deepcogito.com/")}],["baidu",{url:(0,n.getFaviconUrl)("https://www.baidu.com/")}],["kwaipilot",{url:(0,n.getLocalIconUri)("Kwaipilot.png")}],["kwaivgi",{url:(0,n.getLocalIconUri)("KlingAI.png")}],["black-forest-labs",{url:(0,n.getFaviconUrl)("https://bfl.ai")}],["prime-intellect",{url:(0,n.getFaviconUrl)("https://www.primeintellect.ai/")}],["primeintellect",{url:(0,n.getFaviconUrl)("https://www.primeintellect.ai/")}],["essentialai",{url:(0,n.getFaviconUrl)("https://www.essential.ai/")}],["bytedance-seed",{url:(0,n.getFaviconUrl)("https://seed.bytedance.com/")}],[s(o.ProviderName.Seed),{url:(0,n.getFaviconUrl)("https://seed.bytedance.com/")}],["writer",{url:(0,n.getFaviconUrl)("https://writer.com/"),className:"dark:invert"}],["stepfun",{url:(0,n.getFaviconUrl)("https://platform.stepfun.ai/")}],["stepfun-ai",{url:(0,n.getFaviconUrl)("https://platform.stepfun.ai/")}],[s(o.ProviderName.Recraft),{url:(0,n.getLocalIconUri)("Recraft.svg"),className:"dark:invert"}],["bytedance",{url:(0,n.getFaviconUrl)("https://seed.bytedance.com/")}],["alibaba",{url:(0,n.getFaviconUrl)("https://www.alibabacloud.com")}],["inclusionai",{url:(0,n.getFaviconUrl)("https://www.inclusion-ai.org/")}],["tencent",{url:(0,n.getLocalIconUri)("Tencent.png")}],["ibm-granite",{url:(0,n.getLocalIconUri)("IBMGranite.svg"),className:"dark:invert"}],["nex-agi",{url:(0,n.getLocalIconUri)("NexAGI.svg"),className:"dark:invert"}],["thinkingmachines",{url:(0,n.getFaviconUrl)("https://thinkingmachines.ai/")}],["sakana",{url:(0,n.getFaviconUrl)("https://sakana.ai")}],[s(o.ProviderName.HeyGen),{url:(0,n.getFaviconUrl)("https://heygen.com")}],["zyphra",{url:(0,n.getLocalIconUri)("Zyphra.svg"),className:"dark:invert"}],["sesame",{url:(0,n.getFaviconUrl)("https://www.sesame.com")}],["canopylabs",{url:(0,n.getFaviconUrl)("https://canopylabs.ai"),className:"dark:invert"}],["hexgrad",{url:(0,n.getLocalIconUri)("Hexgrad.png")}],[s(o.ProviderName.Krea),{url:(0,n.getFaviconUrl)("https://www.krea.ai")}],[s(o.ProviderName.Runway),{url:(0,n.getFaviconUrl)("https://runwayml.com")}],[s(o.ProviderName.Upstage),{url:(0,n.getFaviconUrl)("https://www.upstage.ai/")}],["stealth",{url:(0,n.getLocalIconUri)("Stealth.svg"),className:"invert-0 dark:invert"}]]),c=new Map([["microsoft/mai-",{url:(0,n.getLocalIconUri)("MAI.png")}]]),u=/^\/(?![/\\])/u,d=/^data:image\//iu;function g(e,t){var r;let a=l.get(e.toLowerCase());return t&&(!t.startsWith("data:")||d.test(t))?(r=a?.className,u.test(t)||d.test(t)?{url:t}:t.startsWith("//")?{url:(0,n.getFaviconUrl)(`https:${t}`)}:t.startsWith("http")?{url:(0,n.getFaviconUrl)(t)}:{url:(0,n.getLocalIconUri)(t),className:r}):a??{url:n.HUGGING_FACE_FAVICON_URL}}function p({permaslug:e,author:t,iconUri:r}){let a=e.toLowerCase().replace(/^~/,"");for(let[e,t]of c)if(a.startsWith(e))return t;return g(t,r)}e.s(["getAuthorIconInfo",0,g,"getModelAuthorIconInfo",0,p],630056);var m=e.i(837556);e.s(["AuthorIcon",0,function(e){let o,n,s,l,c,u,d,h=(0,r.c)(25),{author:v,permaslug:f,iconUri:w,className:y,frame:N,frameRingClassName:b,bare:U}=e,k=void 0!==N&&N,x=void 0!==U&&U;if(h[0]!==v||h[1]!==x||h[2]!==y||h[3]!==k||h[4]!==b||h[5]!==w||h[6]!==f){c=Symbol.for("react.early_return_sentinel");e:{if(n=void 0===f?g(v,w):p({permaslug:f,author:v,iconUri:w}),x){let e;h[12]!==y?(e=(0,a.cn)("flex size-6 shrink-0 items-center justify-center","[&_img]:object-contain",y),h[12]=y,h[13]=e):e=h[13],c=(0,t.jsx)("div",{className:e,children:(0,t.jsx)(i.RemoteFavicon,{className:(0,a.cn)("size-full overflow-hidden",n?.className),faviconFor:v,imgSrc:n.url,imgSrcDark:n.darkUrl,size:256})});break e}if(k){c=(0,t.jsx)(m.IconFrame,{className:y,ringClassName:b,children:(0,t.jsx)(i.RemoteFavicon,{className:(0,a.cn)("size-full",n?.className),faviconFor:v,imgSrc:n.url,imgSrcDark:n.darkUrl,size:256})});break e}h[14]!==y?(l=(0,a.cn)("flex items-center justify-center","size-6 shrink-0 rounded-full border","bg-background p-1",y),h[14]=y,h[15]=l):l=h[15],o=i.RemoteFavicon,s=(0,a.cn)("overflow-hidden rounded-full",n?.className)}h[0]=v,h[1]=x,h[2]=y,h[3]=k,h[4]=b,h[5]=w,h[6]=f,h[7]=o,h[8]=n,h[9]=s,h[10]=l,h[11]=c}else o=h[7],n=h[8],s=h[9],l=h[10],c=h[11];return c!==Symbol.for("react.early_return_sentinel")?c:(h[16]!==o||h[17]!==v||h[18]!==n.darkUrl||h[19]!==n.url||h[20]!==s?(u=(0,t.jsx)(o,{className:s,faviconFor:v,imgSrc:n.url,imgSrcDark:n.darkUrl,size:256}),h[16]=o,h[17]=v,h[18]=n.darkUrl,h[19]=n.url,h[20]=s,h[21]=u):u=h[21],h[22]!==l||h[23]!==u?(d=(0,t.jsx)("div",{className:l,children:u}),h[22]=l,h[23]=u,h[24]=d):d=h[24],d)}],557225)},837556,e=>{"use strict";var t=e.i(222666),r=e.i(505962),a=e.i(452473);e.s(["IconFrame",0,function(e){let i,o,n,s,l,c,u=(0,r.c)(15),{children:d,className:g,variant:p,decorative:m,ringClassName:h}=e,v=void 0!==m&&m||void 0;u[0]!==g?(i=(0,a.cn)("relative flex shrink-0 items-center justify-center","box-content p-px","overflow-hidden rounded-sm bg-background","size-6",g),u[0]=g,u[1]=i):i=u[1],u[2]===Symbol.for("react.memo_cache_sentinel")?(o=(0,a.cn)("absolute inset-px flex items-center justify-center","[&_img]:absolute [&_img]:inset-0 [&_img]:size-full [&_img]:object-contain","[&_img]:rounded-sm"),u[2]=o):o=u[2],u[3]!==d?(n=(0,t.jsx)("div",{className:o,children:d}),u[3]=d,u[4]=n):n=u[4];let f="app"===(void 0===p?"default":p)&&"dark:inset-px dark:ring-white";return u[5]!==h||u[6]!==f?(s=(0,a.cn)("pointer-events-none absolute inset-0 rounded-[inherit] ring-1 ring-inset ring-border/60",f,h),u[5]=h,u[6]=f,u[7]=s):s=u[7],u[8]!==s?(l=(0,t.jsx)("div",{"aria-hidden":!0,className:s}),u[8]=s,u[9]=l):l=u[9],u[10]!==v||u[11]!==i||u[12]!==n||u[13]!==l?(c=(0,t.jsxs)("div",{"aria-hidden":v,className:i,children:[n,l]}),u[10]=v,u[11]=i,u[12]=n,u[13]=l,u[14]=c):c=u[14],c}])},759024,e=>{"use strict";var t=e.i(222666),r=e.i(505962),a=e.i(704318),i=e.i(452473),o=e.i(691038),n=e.i(778084),s=e.i(648156);e.s(["InfoTooltip",0,function(e){var l;let c,u,d,g,p,m,h,v,f=(0,r.c)(33),{align:w,"aria-label":y,children:N,className:b,contentClassName:U,icon:k,side:x,sideOffset:F}=e,S=void 0===x?"bottom":x,I=(0,o.useMediaMd)();f[0]!==y||f[1]!==N?(c=y??("string"==typeof(l=N)&&l.trim().length>0?l.trim():"Information"),f[0]=y,f[1]=N,f[2]=c):c=f[2],f[3]!==b?(u=(0,i.cn)("inline-flex items-center justify-center border-0 bg-transparent p-0 align-middle text-[inherit] leading-[inherit] focus-visible:outline-none focus-visible:border-focus-border focus-visible:shadow-focus",b),f[3]=b,f[4]=u):u=f[4],f[5]!==k?(d=k??(0,t.jsx)(a.InformationCircleIcon,{className:"inline h-4 w-4 text-muted-foreground"}),f[5]=k,f[6]=d):d=f[6],f[7]!==c||f[8]!==u||f[9]!==d?(g=(0,t.jsx)("button",{type:"button",tabIndex:-1,"aria-label":c,className:u,children:d}),f[7]=c,f[8]=u,f[9]=d,f[10]=g):g=f[10];let _=g;if(I){let e,r;return f[11]!==U?(e=(0,i.cn)("max-w-xs",U),f[11]=U,f[12]=e):e=f[12],f[13]!==w||f[14]!==N||f[15]!==S||f[16]!==F||f[17]!==e||f[18]!==_?(r=(0,t.jsx)(s.Tooltip,{align:w,className:e,content:N,side:S,sideOffset:F,children:_}),f[13]=w,f[14]=N,f[15]=S,f[16]=F,f[17]=e,f[18]=_,f[19]=r):r=f[19],r}return f[20]!==_?(p=(0,t.jsx)(n.PopoverTrigger,{render:_}),f[20]=_,f[21]=p):p=f[21],f[22]!==U?(m=(0,i.cn)("w-52 p-2 text-xs",U),f[22]=U,f[23]=m):m=f[23],f[24]!==w||f[25]!==N||f[26]!==S||f[27]!==F||f[28]!==m?(h=(0,t.jsx)(n.PopoverContent,{align:w,side:S,sideOffset:F,className:m,children:N}),f[24]=w,f[25]=N,f[26]=S,f[27]=F,f[28]=m,f[29]=h):h=f[29],f[30]!==p||f[31]!==h?(v=(0,t.jsxs)(n.Popover,{children:[p,h]}),f[30]=p,f[31]=h,f[32]=v):v=f[32],v}])},188363,e=>{"use strict";var t=e.i(222666),r=e.i(505962),a=e.i(948992),i=e.i(678998),o=e.i(270401);let n=/\.(png|jpe?g|ico|svg|webp|gif|bmp)$/i;e.s(["RemoteFavicon",0,function(e){let s,l,c,u,d,g,p,m,h,v,f,w,y=(0,r.c)(51),[N,b]=(0,o.useState)(null),[U,k]=(0,o.useState)(null),[x,F]=(0,o.useState)(!1),[S,I]=(0,o.useState)(!1),_=e.size||256,L=e.hasCuratedFaviconUrl??!1;y[0]!==x||y[1]!==S||y[2]!==e.faviconFor||y[3]!==e.imgSrc||y[4]!==_||y[5]!==L?(s=function({faviconFor:e,size:t,didCuratedIconFail:r,didSiteIconFail:a,hasCuratedFaviconUrl:o,imgSrc:s}){if(s)return{source:"given",src:s};if(o&&(e=>{try{let{pathname:t}=new URL(e);return n.test(t)}catch{return!1}})(e)&&!r)return{source:"curated",src:(0,i.getCdnImageUrl)(e)};let l=a?(0,i.getParentSiteUrl)(e):null;return null!==l?{source:"parent-site",src:(0,i.getFaviconUrl)(l,t)}:{source:"site",src:(0,i.getFaviconUrl)(e,t)}}({faviconFor:e.faviconFor,size:_,didCuratedIconFail:x,didSiteIconFail:S,hasCuratedFaviconUrl:L,imgSrc:e.imgSrc}),y[0]=x,y[1]=S,y[2]=e.faviconFor,y[3]=e.imgSrc,y[4]=_,y[5]=L,y[6]=s):s=y[6];let{source:C,src:P}=s;y[7]!==e.faviconFor||y[8]!==_||y[9]!==C?(l=t=>{"site"!==C||_<=16||t>16||null!==(0,i.getParentSiteUrl)(e.faviconFor)&&I(!0)},y[7]=e.faviconFor,y[8]=_,y[9]=C,y[10]=l):l=y[10];let j=l;y[11]!==e.faviconFor||y[12]!==C?(c=t=>{switch(C){case"curated":if((0,i.isOpenRouterHostedUrl)(e.faviconFor))return void b(t);F(!0);return;case"site":if(null===(0,i.getParentSiteUrl)(e.faviconFor))return void b(t);I(!0);return;case"given":case"parent-site":return void b(t);default:b(t)}},y[11]=e.faviconFor,y[12]=C,y[13]=c):c=y[13];let A=c;y[14]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{b(null)},y[14]=u):u=y[14],y[15]!==P?(d=[P],y[15]=P,y[16]=d):d=y[16],(0,o.useEffect)(u,d),y[17]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{F(!1),I(!1)},y[17]=g):g=y[17],y[18]!==e.faviconFor||y[19]!==e.imgSrc||y[20]!==_?(p=[e.faviconFor,e.imgSrc,_],y[18]=e.faviconFor,y[19]=e.imgSrc,y[20]=_,y[21]=p):p=y[21],(0,o.useEffect)(g,p),y[22]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{k(null)},y[22]=m):m=y[22],y[23]!==e.imgSrcDark?(h=[e.imgSrcDark],y[23]=e.imgSrcDark,y[24]=h):h=y[24],(0,o.useEffect)(m,h);let T=`Favicon for ${e.faviconFor}`;y[25]!==_||y[26]!==T?(v={width:_,height:_,alt:T,className:"h-full w-full object-cover"},y[25]=_,y[26]=T,y[27]=v):v=y[27];let R=v;if(e.imgSrcDark){let r,i,o;return y[28]!==N||y[29]!==R||y[30]!==A||y[31]!==j||y[32]!==P?(r=(0,t.jsx)("span",{className:"block h-full w-full shrink-0 dark:hidden",children:N?(0,t.jsx)("span",{className:"bg-muted",children:(0,t.jsx)(a.GlobeAltIcon,{className:"h-4 w-4 text-muted-foreground/60"})}):(0,t.jsx)("img",{...R,src:P,onError:e=>A(e.toString()),onLoad:e=>j(e.currentTarget.naturalWidth)})}),y[28]=N,y[29]=R,y[30]=A,y[31]=j,y[32]=P,y[33]=r):r=y[33],y[34]!==U||y[35]!==R||y[36]!==e.imgSrcDark?(i=(0,t.jsx)("span",{className:"hidden h-full w-full shrink-0 dark:block",children:U?(0,t.jsx)("span",{className:"bg-muted",children:(0,t.jsx)(a.GlobeAltIcon,{className:"h-4 w-4 text-muted-foreground/60"})}):(0,t.jsx)("img",{...R,src:e.imgSrcDark,onError:e=>k(e.toString())})}),y[34]=U,y[35]=R,y[36]=e.imgSrcDark,y[37]=i):i=y[37],y[38]!==e.className||y[39]!==r||y[40]!==i?(o=(0,t.jsxs)("div",{className:e.className,children:[r,i]}),y[38]=e.className,y[39]=r,y[40]=i,y[41]=o):o=y[41],o}return y[42]!==N||y[43]!==R||y[44]!==A||y[45]!==j||y[46]!==P?(f=N?(0,t.jsx)("span",{className:"bg-muted",children:(0,t.jsx)(a.GlobeAltIcon,{className:"h-4 w-4 text-muted-foreground/60"})}):(0,t.jsx)("picture",{className:"h-full w-full shrink-0",children:(0,t.jsx)("img",{...R,src:P,loading:"lazy",decoding:"async",onError:e=>A(e.toString()),onLoad:e=>j(e.currentTarget.naturalWidth)})}),y[42]=N,y[43]=R,y[44]=A,y[45]=j,y[46]=P,y[47]=f):f=y[47],y[48]!==e.className||y[49]!==f?(w=(0,t.jsx)("div",{className:e.className,children:f}),y[48]=e.className,y[49]=f,y[50]=w):w=y[50],w}])},379684,e=>{"use strict";var t=e.i(222666),r=e.i(505962),a=e.i(734293),i=e.i(452473),o=e.i(654847),n=e.i(191379),s=e.i(551365),l=e.i(971531),c=e.i(639580),u=e.i(664288);let d="text-foreground underline underline-offset-2 decoration-current/40 hover:text-accent-foreground hover:decoration-current transition-colors";e.s(["LINK_CLASSES",0,d,"TextLink",0,function(e){let g,p,m,h,v,f,w,y,N,b,U,k,x,F,S,I,_,L,C,P,j,A,T=(0,r.c)(71);T[0]!==e?({render:y,children:g,className:p,icon:m,iconPosition:N,showExternalIcon:b,prefetch:U,onFocus:h,onMouseEnter:v,onTouchStart:f,...w}=e,T[0]=e,T[1]=g,T[2]=p,T[3]=m,T[4]=h,T[5]=v,T[6]=f,T[7]=w,T[8]=y,T[9]=N,T[10]=b,T[11]=U):(g=T[1],p=T[2],m=T[3],h=T[4],v=T[5],f=T[6],w=T[7],y=T[8],N=T[9],b=T[10],U=T[11]);let R=void 0===N?"end":N,D=void 0!==b&&b,z=void 0===U?"hover":U,M=(0,c.useLocalizedHref)(w.href);T[12]!==M?(k=(0,o.getHrefString)(M),T[12]=M,T[13]=k):k=T[13],T[14]!==z||T[15]!==k?(x={prefetch:z,href:k},T[14]=z,T[15]=k,T[16]=x):x=T[16],T[17]!==h||T[18]!==v||T[19]!==f?(F={onFocus:h,onMouseEnter:v,onTouchStart:f},T[17]=h,T[18]=v,T[19]=f,T[20]=F):F=T[20];let E=(0,l.useLinkPrefetch)(x,F);T[21]!==p?(S=(0,i.cn)(d,"text-xs cursor-pointer",p),T[21]=p,T[22]=S):S=T[22];let O=S;T[23]!==m||T[24]!==D?(I=m??(D?(0,t.jsx)(n.ArrowUpRight,{className:"inline size-3 align-[-1px]"}):null),T[23]=m,T[24]=D,T[25]=I):I=T[25];let G=I;T[26]!==R||T[27]!==G?(_="start"===R&&G?(0,t.jsx)("span",{className:"mr-0.5 inline-flex",children:G}):null,T[26]=R,T[27]=G,T[28]=_):_=T[28];let W=_;T[29]!==R||T[30]!==G?(L="end"===R&&G?(0,t.jsx)("span",{className:"ml-0.5 inline-flex",children:G}):null,T[29]=R,T[30]=G,T[31]=L):L=T[31];let H=L,$=(0,o.isCrossZoneHref)(M);T[32]!==g||T[33]!==y?(C=y?(0,u.getChildContent)(y):g,T[32]=g,T[33]=y,T[34]=C):C=T[34];let q=C;T[35]!==q||T[36]!==H||T[37]!==M||T[38]!==h||T[39]!==v||T[40]!==f||T[41]!==w||T[42]!==y||T[43]!==O||T[44]!==W?(P=y?{className:O,children:(0,t.jsxs)(t.Fragment,{children:[W,q,H]}),...w,onFocus:h,onMouseEnter:v,onTouchStart:f,href:M}:{},T[35]=q,T[36]=H,T[37]=M,T[38]=h,T[39]=v,T[40]=f,T[41]=w,T[42]=y,T[43]=O,T[44]=W,T[45]=P):P=T[45],T[46]!==y||T[47]!==P?(j={render:y,defaultTagName:"a",props:P},T[46]=y,T[47]=P,T[48]=j):j=T[48];let K=(0,a.useRender)(j);if(y){if($)throw Error(`TextLink: cross-zone href "${(0,o.getHrefString)(M)}" cannot be combined with the render prop. Use a plain element instead.`);return K}if($){let e,r,a;if(T[49]!==w){let{href:t,replace:r,scroll:a,shallow:i,passHref:o,legacyBehavior:n,locale:s,onNavigate:l,...c}=w;e=c,T[49]=w,T[50]=e}else e=T[50];return T[51]!==M?(r=(0,o.getHrefString)(M),T[51]=M,T[52]=r):r=T[52],T[53]!==e||T[54]!==g||T[55]!==H||T[56]!==h||T[57]!==v||T[58]!==f||T[59]!==O||T[60]!==W||T[61]!==r?(a=(0,t.jsxs)("a",{href:r,className:O,onFocus:h,onMouseEnter:v,onTouchStart:f,...e,children:[W,g,H]}),T[53]=e,T[54]=g,T[55]=H,T[56]=h,T[57]=v,T[58]=f,T[59]=O,T[60]=W,T[61]=r,T[62]=a):a=T[62],a}return T[63]!==g||T[64]!==H||T[65]!==M||T[66]!==E||T[67]!==w||T[68]!==O||T[69]!==W?(A=(0,t.jsxs)(s.default,{className:O,...w,...E,href:M,children:[W,g,H]}),T[63]=g,T[64]=H,T[65]=M,T[66]=E,T[67]=w,T[68]=O,T[69]=W,T[70]=A):A=T[70],A}])},664288,e=>{"use strict";e.s(["getChildContent",0,function(e){let{props:t}=e;if("object"==typeof t&&null!==t&&"children"in t)return t.children}])},678998,e=>{"use strict";e.i(687421);let t=(e,t=256)=>`https://t0.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=${e}&size=${t}`,r=new Set(["ac","co","com","edu","go","gob","gov","ltd","me","ne","net","nom","or","org","plc","sch"]),a=new Set(["amazonaws.com","azurewebsites.net","cloudfront.net","firebaseapp.com","fly.dev","github.io","gitlab.io","herokuapp.com","ngrok.app","ngrok.io","netlify.app","onrender.com","pages.dev","run.app","vercel.app","web.app","workers.dev"]),i=e=>{try{let t=new URL(e).hostname.toLowerCase().replace(/\.$/,"");return"openrouter.ai"===t||t.endsWith(".openrouter.ai")}catch{return!1}},o=t("https://huggingface.co/");e.s(["HUGGING_FACE_FAVICON_URL",0,o,"getCdnImageUrl",0,e=>i(e)?e:`/api/frontend/v1/image-proxy?url=${encodeURIComponent(e)}`,"getFaviconUrl",0,t,"getLocalIconUri",0,e=>`/images/icons/${e}`,"getParentSiteUrl",0,e=>{let t=(e=>{let t=/^[a-z][a-z\d+\-.]*:\/\//iu.test(e)?e:`https://${e}`;try{return new URL(t).hostname.toLowerCase().replace(/\.$/u,"")}catch{return null}})(e);if(null===t)return null;let i=t.split(".").slice(1);if(i.length<2||2===i.length&&2===(i[1]??"").length&&r.has(i[0]??""))return null;let o=i.join(".");return[...a].some(e=>o===e||o.endsWith(`.${e}`))?null:`https://${o}`},"isOpenRouterHostedUrl",0,i])},175817,e=>{"use strict";e.s(["getTotalTokens",0,e=>e?e.total_prompt_tokens+(e.total_completion_tokens??0):0])}]); //# sourceMappingURL=1-sv48u57494-.js.map //# chunkId=01a09e9c-6ca3-74f1-b14c-5b0973ad034d