1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[4536],{39235(e,t,r){r.d(t,{z:()=>a});var s=r(72361),i=r(68413);function a(e){let{size:t=16,className:r}=e,a=(0,i.useId)(),n=`smart-ai-g-${a}`,o=`smart-ai-s-${a}`;return(0,s.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:r,"aria-hidden":"true",children:[(0,s.jsxs)("defs",{children:[(0,s.jsxs)("linearGradient",{id:n,x1:"2",y1:"2",x2:"22",y2:"22",gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{offset:"0",stopColor:"#6366f1"}),(0,s.jsx)("stop",{offset:"0.55",stopColor:"#a855f7"}),(0,s.jsx)("stop",{offset:"1",stopColor:"#ec4899"})]}),(0,s.jsxs)("linearGradient",{id:o,x1:"16",y1:"1",x2:"23",y2:"8",gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{offset:"0",stopColor:"#fbbf24"}),(0,s.jsx)("stop",{offset:"1",stopColor:"#f59e0b"})]})]}),(0,s.jsx)("rect",{x:"1.5",y:"3.5",width:"19",height:"19",rx:"5.5",fill:`url(#${n})`}),(0,s.jsx)("path",{d:"M5.2 18.5 L8.35 8.5 L10.15 8.5 L13.3 18.5 L11.35 18.5 L10.7 16.2 L7.8 16.2 L7.15 18.5 Z M8.3 14.45 L10.2 14.45 L9.25 11.05 Z",fill:"#fff"}),(0,s.jsx)("rect",{x:"14.6",y:"8.5",width:"1.9",height:"10",rx:"0.6",fill:"#fff"}),(0,s.jsx)("path",{d:"M19.5 1.2 L20.5 4.2 L23.5 5.2 L20.5 6.2 L19.5 9.2 L18.5 6.2 L15.5 5.2 L18.5 4.2 Z",fill:`url(#${o})`})]})}},64989(e,t,r){r.d(t,{e:()=>f});var s=r(72361),i=r(68413),a=r(6702),n=r(39235),o=r(61631),l=r(38417),d=r(81204),c=r(46775),u=r(24328),m=r(48196),p=r(80270);function x(e){let{discount:t,ratio:r,timeDiscounts:i}=e,{t:n}=(0,a.Bd)();if(i&&Object.keys(i).length>0){let e=i.off_peak,t=i.peak,r=null!=e&&null!=t?` (${n("off-peak {{off}} · peak {{peak}}",{off:Math.round(1e3*e)/100,peak:Math.round(1e3*t)/100})})`:"";return(0,s.jsxs)("span",{className:"inline-flex shrink-0 items-center rounded-md bg-emerald-50 px-2 py-0.5 text-[11px] font-medium text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",children:[n("Floating group discount"),r]})}if(null==t||t<=0)return null;let o=Math.round(1e3*t)/100,l=Math.round(1e4*t)/100,d="number"==typeof r&&r>0?n("Approximately {{ratio}}x multiplier",{ratio:r}):"";return(0,s.jsxs)("span",{className:"inline-flex shrink-0 items-center rounded-md bg-emerald-50 px-2 py-0.5 text-[11px] font-medium text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",children:[n("Group discount",{zhe:o,percent:l}),d?` (${d})`:""]})}function h(e){let{category:t}=e;if(t&&/æºè½|auto/i.test(t))return(0,s.jsx)("span",{className:"flex size-4 shrink-0 items-center justify-center",children:(0,s.jsx)(n.z,{size:16})});let r=t?(0,p.P)(t):void 0;return r?(0,s.jsx)("span",{className:"flex size-4 shrink-0 items-center justify-center",children:(0,l.Y)(r,16)}):null}function f(e){let{options:t,value:r,onValueChange:n,placeholder:l,disabled:p,compact:f}=e,{t:g}=(0,a.Bd)(),[b,j]=(0,i.useState)(!1),[w,y]=(0,i.useState)(""),k=t.find(e=>e.value===r),v=(0,i.useMemo)(()=>{let e=w.trim().toLowerCase();return e?t.filter(t=>{let r=String(t.ratio??"").toLowerCase();return t.value.toLowerCase().includes(e)||t.label.toLowerCase().includes(e)||t.desc?.toLowerCase().includes(e)||r.includes(e)}):t},[t,w]);return(0,s.jsxs)(m.AM,{open:b,onOpenChange:j,children:[(0,s.jsxs)(m.Wv,{render:(0,s.jsx)(c.$,{type:"button",variant:"outline",role:"combobox","aria-expanded":b,disabled:p,className:(0,d.cn)("border-border/70 bg-card hover:bg-muted/30 hover:text-foreground active:bg-background data-popup-open:border-ring data-popup-open:bg-background data-popup-open:ring-ring/20 justify-between overflow-hidden rounded-md text-start shadow-none transition-[background-color,border-color,box-shadow] duration-150 data-popup-open:ring-[3px]",f?"h-8 w-56 gap-1 px-2.5 py-1 text-[12px]":"h-auto min-h-14 w-full gap-2 px-3 py-2 sm:min-h-[72px] sm:gap-2.5 sm:px-3.5 sm:py-2.5",f&&!k&&"border-dashed border-amber-300/70 bg-amber-50/50 hover:bg-amber-50 dark:border-amber-500/30 dark:bg-amber-500/10 dark:hover:bg-amber-500/15")}),children:[f?k?(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[(0,s.jsx)(h,{category:k.category}),(0,s.jsx)("span",{className:"text-foreground min-w-0 truncate font-medium",children:k.label}),k.timeDiscounts&&Object.keys(k.timeDiscounts).length>0?(0,s.jsx)("span",{className:"shrink-0 rounded bg-emerald-50 px-1.5 py-px text-[11px] font-medium text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",children:g("Floating")}):null!=k.discount&&k.discount>0&&(0,s.jsxs)("span",{className:"shrink-0 rounded bg-emerald-50 px-1.5 py-px text-[11px] font-medium text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300",children:[Math.round(1e3*k.discount)/100,g("æ")]})]}):(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium text-amber-700 dark:text-amber-400",children:l||g("Select a group")}):(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 items-center justify-between gap-2 overflow-hidden sm:gap-3",children:[(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-hidden",children:[(0,s.jsx)(h,{category:k?.category}),(0,s.jsxs)("span",{className:"min-w-0 flex-1 overflow-hidden",children:[(0,s.jsx)("span",{className:"block truncate font-medium",children:k?.label||l||g("Select a group")}),k?.desc&&(0,s.jsx)("span",{className:"text-muted-foreground block truncate text-[11px] sm:text-xs",children:k.desc})]})]}),(0,s.jsx)("span",{className:"hidden sm:block",children:(0,s.jsx)(x,{discount:k?.discount,ratio:k?.ratio,timeDiscounts:k?.timeDiscounts})})]}),(0,s.jsx)(o.Mls,{className:"h-4 w-4 shrink-0 opacity-50"})]}),(0,s.jsx)(m.hl,{align:f?"start":"center",className:(0,d.cn)("data-closed:zoom-out-100 data-open:zoom-in-100 data-[side=bottom]:slide-in-from-top-0 data-[side=left]:slide-in-from-right-0 data-[side=right]:sli
1de-in-from-left-0 data-[side=top]:slide-in-from-bottom-0 overflow-hidden rounded-lg p-0 shadow-lg data-closed:duration-75 data-open:duration-100",f?"w-[40rem] max-w-[calc(100vw-1rem)]":"w-[max(var(--anchor-width),340px)]"),onWheel:e=>e.stopPropagation(),onTouchMove:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:(0,s.jsxs)(u.uB,{shouldFilter:!1,children:[(0,s.jsx)(u.G7,{placeholder:g("Search..."),value:w,onValueChange:y}),(0,s.jsxs)(u.oI,{className:"max-h-[360px]",children:[(0,s.jsx)(u.xL,{children:g("No group found.")}),(0,s.jsx)(u.L$,{children:v.map(e=>(0,s.jsxs)(u.h_,{value:e.value,onSelect:()=>{n(e.value),j(!1),y("")},className:"data-[selected=true]:bg-muted items-start gap-3 rounded-lg px-3 py-3 transition-colors",children:[(0,s.jsx)(o.Jlk,{className:(0,d.cn)("mt-0.5 h-4 w-4",r===e.value?"opacity-100":"opacity-0")}),(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(h,{category:e.category}),(0,s.jsx)("span",{className:"min-w-0 font-medium whitespace-normal",children:e.label})]}),e.desc&&(0,s.jsx)("span",{className:"text-muted-foreground block text-xs leading-5 whitespace-normal",children:e.desc})]}),(0,s.jsx)(x,{discount:e.discount,ratio:e.ratio,timeDiscounts:e.timeDiscounts})]},e.value))})]})]})})]})}},89663(e,t,r){r.d(t,{x:()=>n});var s=r(68413),i=r(53540),a=r(64577);function n(){let{data:e}=(0,i.I)({queryKey:["user-self-groups"],queryFn:a.K4,staleTime:3e5}),t=(0,s.useMemo)(()=>{let t=e?.data;return t?Object.entries(t).filter(e=>{let[,t]=e;return!!t.label}).sort((e,t)=>{let[,r]=e,[,s]=t;return(r.order??Number.MAX_SAFE_INTEGER)-(s.order??Number.MAX_SAFE_INTEGER)}).map(e=>{let[t,r]=e;return{value:t,label:r.label||r.desc||t,desc:r.label?r.desc:void 0,category:r.category,ratio:r.display_ratio??void 0,discount:r.discount??void 0,timeDiscounts:r.time_discounts??void 0}}):[]},[e]),r=(0,s.useMemo)(()=>{let e=new Map;for(let r of t)e.set(r.value,r);return e},[t]);return{options:t,optionMap:r}}},80270(e,t,r){r.d(t,{P:()=>i});let s=[[/claude|anthropic/i,"Anthropic"],[/codex|gpt|openai|chatgpt/i,"OpenAI"],[/gemini|google/i,"Gemini.Color"],[/æºè°±|zhipu|glm|chatglm/i,"Zhipu.Color"],[/kimi|moonshot|æä¹æé¢/i,"Kimi"],[/minimax/i,"Minimax.Color"],[/grok|xai/i,"XAI"],[/doubao|åè|è±å
/i,"Doubao.Color"],[/deepseek/i,"DeepSeek.Color"],[/qwen|éä¹|é¿é/i,"Qwen.Color"],[/cohere/i,"Cohere.Color"],[/mistral/i,"Mistral.Color"],[/é¶ä¸|ä¸ç©|(^|[^a-z])yi([^a-z]|$)/i,"Yi.Color"],[/typesafe|jev/i,"local:typesafe.png"]];function i(e){for(let[t,r]of s)if(t.test(e))return r}},38417(e,t,r){r.d(t,{Y:()=>a});var s=r(72361),i=r(28277);function a(e){let t,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;if(!e||"string"!=typeof e)return(0,s.jsx)("div",{className:"bg-muted text-muted-foreground flex items-center justify-center rounded-full text-xs font-medium",style:{width:a,height:a},children:"?"});let n=e.trim();if(n.startsWith("local:"))return(0,s.jsx)("img",{src:`/logos/${n.slice(6)}`,alt:"","aria-hidden":"true",width:a,height:a,className:"dark:invert",style:{width:a,height:a}});if(!n)return(0,s.jsx)("div",{className:"bg-muted text-muted-foreground flex items-center justify-center rounded-full text-xs font-medium",style:{width:a,height:a},children:"?"});let o=n.split("."),l=o[0],d=i[l];if(d&&o.length>1&&d[o[1]]?(t=d[o[1]],r=2):(t=i[l],r=o.length>1&&/^[A-Z]/.test(o[1])?2:1),!t||"function"!=typeof t&&"object"!=typeof t){let e=n.charAt(0).toUpperCase();return(0,s.jsx)("div",{className:"bg-muted text-muted-foreground flex items-center justify-center rounded-full text-xs font-medium",style:{width:a,height:a},children:e})}let c={};for(let e=r;e<o.length;e++){let t=o[e];if(!t)continue;let r=t.indexOf("=");if(-1===r){c[t.trim()]=!0;continue}let s=t.slice(0,r).trim(),i=t.slice(r+1).trim();c[s]=function(e){if(null==e)return!0;let t=String(e).trim();return(t.startsWith("{")&&t.endsWith("}")&&(t=t.slice(1,-1).trim()),t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))?t.slice(1,-1):"true"===t||"false"!==t&&(/^-?\d+(?:\.\d+)?$/.test(t)?Number(t):t)}(i)}return null==c.size&&null!=a&&(c.size=a),(0,s.jsx)(t,{...c})}}}]);
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.