@juejin-opensource/jusage 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard/assets/{dashboard-BcYn7CaU.js → dashboard-BuoaCKAO.js} +1 -1
- package/dist/dashboard/assets/{download-CteP_gYs.js → download-Dxb9oVNa.js} +1 -1
- package/dist/dashboard/assets/{downloads-dKq4xNjC.js → downloads-BGBukFcp.js} +1 -1
- package/dist/dashboard/assets/{index-CWwN4M6h.css → index-D3jJkpMe.css} +1 -1
- package/dist/dashboard/assets/{index-flWmwEjH.js → index-DLtjtn6U.js} +16 -16
- package/dist/dashboard/assets/index-sxwOKh3b.js +1 -0
- package/dist/dashboard/assets/{model-provider-0f_aGOIG.js → model-provider-z76eVBRd.js} +1 -1
- package/dist/dashboard/assets/pricing-Bix3wcTu.js +1 -0
- package/dist/dashboard/assets/rank-wigwKGFb.js +16 -0
- package/dist/dashboard/assets/{settings-KbZOVhnT.js → settings-BItuk443.js} +1 -1
- package/dist/dashboard/assets/useLocalStorage-CqfyLuzE.js +16 -0
- package/dist/dashboard/index.html +2 -2
- package/package.json +3 -3
- package/dist/dashboard/assets/index-BfeJy_UY.js +0 -1
- package/dist/dashboard/assets/pricing-OObJBgJw.js +0 -1
- package/dist/dashboard/assets/rank-CuAJ5i73.js +0 -16
- package/dist/dashboard/assets/useLocalStorage-BdF6kE3i.js +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{r as m,c as K,j as e,B as M,C as fe,a as R,M as A,A as he,b as pe,Q as xe,e as we,f as be,g as ge,h as se,i as B,k as I,l as ke,T as z,P as J,L as ve,u as oe,m as ye,n as je,D as Q,o as Ne,S as $,d as Se,p as Re}from"./index-DLtjtn6U.js";import{g as Ce,S as T,M as Me}from"./model-provider-z76eVBRd.js";import{P,C as H,G as X}from"./downloads-BGBukFcp.js";import{L as q,S as k,a as N,b as S}from"./index-sxwOKh3b.js";import{C as F,T as O,L as Ie,a as Le,S as D,i as Ae,u as ze}from"./useLocalStorage-CqfyLuzE.js";const Te=t=>m.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},t),m.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.47 13.03a.75.75 0 0 1 0-1.06L9.44 8 5.47 4.03a.75.75 0 0 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0",clipRule:"evenodd"}));/**
|
|
2
|
+
* @license lucide-react v1.24.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 Ee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]],Pe=K("circle-dollar-sign",Ee);/**
|
|
7
|
+
* @license lucide-react v1.24.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Oe=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],De=K("coins",Oe);/**
|
|
12
|
+
* @license lucide-react v1.24.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Ue=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],Fe=K("share-2",Ue),Ve=["today","week","month","all"];function $e(t){return typeof t=="string"&&Ve.includes(t)}const re=[{key:"anthropic",label:"Anthropic",icon:"claude"},{key:"openai",label:"OpenAI",icon:"openai"},{key:"google",label:"Google",icon:"google"},{key:"alibaba",label:"阿里",icon:"alibaba"},{key:"moonshot",label:"Moonshot",icon:"moonshot"},{key:"doubao",label:"Doubao",icon:"doubao"},{key:"minimax",label:"MiniMax",icon:"minimax"},{key:"xai",label:"xAI",icon:"grok"},{key:"deepseek",label:"DeepSeek",icon:"deepseek"},{key:"zhipu",label:"Zhipu",icon:"zhipu"}],He={anthropic:"anthropic",claude:"anthropic",codex:"openai",openai:"openai",gemini:"google",google:"google",alibaba:"alibaba",qwen:"alibaba",kimi:"moonshot",moonshot:"moonshot",grok:"xai",xai:"xai",deepseek:"deepseek",zai:"zhipu",zhipu:"zhipu"},Y=new Map(re.map((t,a)=>[t.key,a]));function Be(t){const a=He[t.key]??t.key,s=re.find(r=>r.key===a);return s||(a==="unknown"?{key:"other",label:"其他",icon:"unknown"}:{key:a,label:t.label,icon:t.icon})}function Ge(t,a){if(t.key==="other")return 1;if(a.key==="other")return-1;const s=Y.get(t.key),r=Y.get(a.key);return s!==void 0||r!==void 0?(s??Number.MAX_SAFE_INTEGER)-(r??Number.MAX_SAFE_INTEGER):t.label.localeCompare(a.label)}function Z(t,a=""){const s=new Map;s.set("other",{key:"other",label:"其他",icon:"unknown",models:[]});for(const o of new Set(t.filter(Boolean))){const i=Ce(o),n=Be(i),d=s.get(n.key)??{...n,models:[]};d.models.push(o),s.set(n.key,d)}const r=a.trim().toLocaleLowerCase();return[...s.values()].flatMap(o=>{const i=o.label.toLocaleLowerCase().includes(r),n=r&&!i?o.models.filter(d=>`${o.label} ${d}`.toLocaleLowerCase().includes(r)):o.models;return n.length===0&&!(o.key==="other"&&(!r||i))?[]:[{...o,models:n.sort((d,h)=>d.localeCompare(h))}]}).sort(Ge)}function Ke(t,a=""){const s=new Set,r=[];for(const o of t)a&&o.tool!==a||!o.model||s.has(o.model)||(s.add(o.model),r.push(o));return r}function ie(t){return t==null||!Number.isFinite(t)||t<1?"—":String(Math.floor(t))}function qe(t,a){const s=t.map(r=>({pinned:!1,row:r}));return a?[{pinned:!0,row:a},...s]:s}const We="!h-8 !min-h-8";function Je({models:t,onChange:a,value:s}){var b;const[r,o]=m.useState(!1),[i,n]=m.useState(""),d=m.useMemo(()=>Z(t),[t]),h=m.useMemo(()=>Z(t,i),[t,i]),_=d.find(f=>f.models.includes(s)),c=m.useMemo(()=>[...new Set(t.filter(Boolean))].sort((f,j)=>f.localeCompare(j)),[t]),[p,l]=m.useState((_==null?void 0:_.key)??"all"),u=!i&&p==="all"?"all":h.some(f=>f.key===p)?p:(b=h[0])==null?void 0:b.key,g=h.find(f=>f.key===u),v=u==="all"?c:(g==null?void 0:g.models)??[],x=_&&s?`${_.label} › ${s}`:"全部模型";m.useEffect(()=>{r&&l((_==null?void 0:_.key)??"all")},[r,_]);const w=f=>{o(f),f||n("")},L=f=>{a(f),o(!1),n("")};return e.jsxs(P,{isOpen:r,onOpenChange:w,children:[e.jsxs(M,{"aria-label":`模型筛选:${x}`,className:`${We} min-w-0 max-w-[7.5rem] shrink justify-between gap-1.5 px-2.5 !text-xs font-normal sm:max-w-52 sm:shrink-0 sm:px-3`,size:"sm",variant:"secondary",children:[e.jsx("span",{className:"min-w-0 truncate",children:x}),e.jsx(fe,{className:"size-3.5 shrink-0 text-muted"})]}),e.jsx(P.Content,{className:"w-[min(34rem,calc(100vw-1rem))] overflow-hidden rounded-xl border-0 bg-overlay p-0 text-overlay-foreground shadow-surface",placement:"bottom start",children:e.jsxs(P.Dialog,{className:"p-0 outline-none",children:[e.jsx(P.Heading,{className:"sr-only",children:"模型筛选"}),e.jsxs(T,{className:"border-b border-border p-2",value:i,onChange:n,children:[e.jsx(q,{className:"sr-only",children:"搜索厂商或模型"}),e.jsxs(T.Group,{className:"!h-8 !min-h-8 focus-within:!border-border focus-within:!shadow-none focus-within:!outline-none focus-within:!ring-0",children:[e.jsx(T.SearchIcon,{}),e.jsx(T.Input,{autoFocus:!0,className:"!text-xs",placeholder:"搜索厂商或模型"}),e.jsx(T.ClearButton,{})]})]}),h.length>0?e.jsxs("div",{className:"grid min-h-56 grid-cols-[minmax(7.5rem,0.8fr)_minmax(0,1.4fr)] divide-x divide-border",children:[e.jsxs("div",{"aria-label":"模型厂商",className:"max-h-72 overscroll-contain overflow-y-auto p-1.5",role:"listbox",children:[i?null:e.jsxs("button",{className:R("mb-1 flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-xs transition-colors hover:bg-surface-secondary",!s&&"bg-accent/10 text-foreground"),type:"button",onClick:()=>{s?L(""):l("all")},children:[e.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:s?null:e.jsx(H,{className:"size-3 text-accent"})}),e.jsx("span",{className:"min-w-0 flex-1 font-medium",children:"全部厂商"}),e.jsx("span",{className:"shrink-0 tabular-nums text-[10px] text-muted",children:c.length})]}),h.map(f=>{const j=f.key===u,E=f.models.includes(s);return e.jsxs("button",{"aria-selected":j,className:R("flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-xs transition-colors hover:bg-surface-secondary",j&&"bg-surface-secondary text-foreground"),role:"option",type:"button",onClick:()=>l(f.key),onMouseEnter:()=>l(f.key),children:[e.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center rounded-md bg-white",children:e.jsx(Me,{provider:f,size:13})}),e.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:f.label}),e.jsx("span",{className:"shrink-0 tabular-nums text-[10px] text-muted",children:f.models.length}),E?e.jsx(H,{className:"size-3 shrink-0 text-accent"}):e.jsx(Te,{className:"size-3 shrink-0 text-muted"})]},f.key)})]}),e.jsx("div",{"aria-label":u==="all"?"全部模型":"具体模型",className:"max-h-72 overscroll-contain overflow-y-auto p-1.5",role:"listbox",children:v.map(f=>{const j=f===s;return e.jsxs("button",{"aria-selected":j,className:R("flex w-full items-center gap-2 rounded-lg px-2.5 py-2 text-left text-xs transition-colors hover:bg-surface-secondary",j&&"bg-accent/10 text-foreground hover:bg-accent/15"),role:"option",type:"button",onClick:()=>L(f),children:[e.jsx("span",{className:"min-w-0 flex-1 truncate",children:f}),j?e.jsx(H,{className:"size-3 shrink-0 text-accent"}):null]},f)})})]}):e.jsx("div",{className:"flex min-h-40 items-center justify-center px-6 text-center text-xs text-muted",children:"没有匹配的厂商或模型"})]})})]})}const Qe="https://juejin.cn/aiusage/rank",le=5;function Xe({board:t,loading:a,metric:s,modelLabel:r,onOpenChange:o,open:i,profiles:n,toolLabel:d}){const h=(t==null?void 0:t.currentUser)??null,_=m.useRef(null),[c,p]=m.useState(null),[l,u]=m.useState(null);m.useEffect(()=>{i&&(p(null),u(null))},[i]);const g=b=>c===b?b==="download"?"生成中…":"复制中…":(l==null?void 0:l.action)===b?l.state==="success"?b==="download"?"已下载":"已复制":b==="download"?"下载失败":"复制失败":b==="download"?"下载到本地":"复制分享图",v=(b,f)=>{p(null),u({action:b,state:f})},x=()=>_.current?ke(_.current):Promise.reject(new Error("分享海报尚未准备完成")),w=async()=>{if(!(c||a)){p("download"),u(null);try{be(await x()),v("download","success")}catch(b){console.error("[rank-share] download failed",b),v("download","error")}}},L=async()=>{if(!(c||a)){p("copy"),u(null);try{await ge(x()),v("copy","success")}catch(b){console.error("[rank-share] clipboard write failed",b),v("copy","error")}}};return e.jsx(A,{children:e.jsx(A.Backdrop,{isOpen:i,onOpenChange:o,variant:"blur",children:e.jsx(A.Container,{className:"px-3 py-8 sm:px-4",scroll:"inside",size:"sm",children:e.jsx(A.Dialog,{"aria-label":"分享排行榜",className:"!w-full !max-w-[420px] !overflow-visible !border-0 !bg-transparent !p-0 !shadow-none",children:e.jsxs(A.Body,{className:"space-y-3 p-0",children:[e.jsxs("section",{"aria-label":`${s==="tokens"?"Token":"消费"} 排行榜分享预览`,className:"relative isolate overflow-hidden rounded-[22px] border border-white/85 bg-[#edf7ff] px-4 pb-4 pt-5 text-[#18283a] shadow-[0_18px_36px_rgb(56_121_188_/0.18)] dark:border-white/10 dark:bg-[#0d1b2d] dark:text-[#eaf4ff] dark:shadow-[0_18px_36px_rgb(0_0_0_/0.38)] sm:px-5 sm:pb-5 sm:pt-6",ref:_,children:[e.jsx(st,{}),e.jsxs("div",{className:"relative z-10",children:[e.jsxs("header",{className:"flex items-start justify-between gap-3",children:[e.jsxs("h2",{className:"inline-flex whitespace-nowrap pt-0.5 text-[28px] font-black italic leading-none tracking-[-0.055em] text-[#14243a] dark:text-[#f1f8ff] sm:text-[32px]",children:[e.jsx("span",{children:"Token"}),e.jsx("span",{className:"ml-2",children:"排行榜"})]}),e.jsx("div",{"aria-label":"排行榜指标",className:"-mr-1.5 -mt-1 shrink-0",children:e.jsx(at,{children:s==="tokens"?"按 Token":"按消费"})})]}),e.jsxs("section",{className:"mt-5","aria-label":"排行榜",children:[e.jsxs("div",{className:"flex flex-wrap gap-1.5 text-[10px] font-medium text-[#5c7d9c] dark:text-[#a8c1da]",children:[e.jsx("span",{className:"max-w-32 truncate rounded-full border border-white/80 bg-white/[0.5] px-2 py-1 shadow-[inset_0_1px_0_rgb(255_255_255_/0.9)] backdrop-blur-sm dark:border-white/10 dark:bg-white/[0.08] dark:shadow-none",children:d}),e.jsx("span",{className:"max-w-44 truncate rounded-full border border-white/80 bg-white/[0.5] px-2 py-1 shadow-[inset_0_1px_0_rgb(255_255_255_/0.9)] backdrop-blur-sm dark:border-white/10 dark:bg-white/[0.08] dark:shadow-none",children:r})]}),a?e.jsx(et,{}):e.jsx(Ye,{currentUser:h,profiles:n,rows:(t==null?void 0:t.rows)??[]})]}),e.jsx(tt,{})]})]}),e.jsxs("div",{className:"flex items-center justify-center gap-2 pb-1",children:[e.jsxs(M,{isDisabled:a||c==="copy",isPending:c==="download",onPress:()=>void w(),size:"sm",children:[e.jsx(he,{className:"size-3.5"}),g("download")]}),e.jsxs(M,{isDisabled:a||c==="download",isPending:c==="copy",onPress:()=>void L(),size:"sm",variant:"tertiary",children:[e.jsx(pe,{className:"size-3.5"}),g("copy")]}),e.jsx(M,{size:"sm",slot:"close",variant:"tertiary",children:"关闭"})]})]})})})})})}function Ye({currentUser:t,profiles:a,rows:s}){const r=s.slice(0,le),o=t?r.some(i=>te(i,t)):!1;return e.jsxs("div",{className:"mt-5","aria-label":"排行榜列表",children:[r.length>0?e.jsx("ol",{className:"space-y-1.5",children:r.map(i=>e.jsx(ee,{isCurrentUser:!!(t&&te(i,t)),profiles:a,row:i},`${i.userHash}-${i.rank}`))}):e.jsx("p",{className:"mt-3 px-2 text-[11px] text-[#7892ac] dark:text-[#9bb7d2]",children:"暂无排行榜数据"}),t&&!o?e.jsxs(e.Fragment,{children:[r.length>0&&e.jsx("div",{"aria-hidden":!0,className:"py-2 text-center text-sm font-black tracking-[0.3em] text-[#7892ac] dark:text-[#9bb7d2]",children:"· · ·"}),e.jsx("ol",{className:"my-1.5 py-1.5",children:e.jsx(ee,{isCurrentUser:!0,profiles:a,row:t})})]}):null,!t&&e.jsxs("div",{className:"mt-4 flex items-center justify-between rounded-xl border border-dashed border-[#b9d8ff] bg-white/[0.32] px-3 py-2.5 text-[11px] dark:border-white/15 dark:bg-white/[0.05]",children:[e.jsx("span",{className:"font-semibold text-[#5c7d9c] dark:text-[#a8c1da]",children:"我的排名"}),e.jsx("span",{className:"font-bold text-[#334e69] dark:text-[#f1f8ff]",children:"登录后查看"})]})]})}function ee({isCurrentUser:t,profiles:a,row:s}){const r=ot(s,a),o=se(s.totalTokens??s.tokens),i=B(s.costUsd),n=ie(s.rank);return e.jsxs("li",{className:t?"relative mx-5 my-4 origin-center scale-110 py-1.5":"relative","data-current-user":t?"true":void 0,children:[t&&e.jsxs("p",{className:"mb-3 text-[10px] font-semibold tracking-[0.04em] text-[#1e80ff] dark:text-[#79b7ff]",children:["@",r.displayName," · 排名"]}),e.jsxs("div",{className:`grid grid-cols-[2.5rem_minmax(0,1fr)_auto] items-center gap-1 rounded-xl px-2 py-2.5 ${t?"border border-[#8ec0ff]/80 bg-[#dcedff]/90 shadow-[0_8px_18px_rgb(30_128_255_/0.16),inset_0_1px_0_rgb(255_255_255_/0.9)] dark:border-[#4b91d1] dark:bg-[#173b5f]/90 dark:shadow-[0_8px_18px_rgb(0_0_0_/0.25)]":"border border-white/55 bg-white/[0.38] shadow-[inset_0_1px_0_rgb(255_255_255_/0.72)] dark:border-white/[0.07] dark:bg-white/[0.045] dark:shadow-none"}`,children:[e.jsx("span",{className:`text-center text-[17px] font-black leading-none tabular-nums ${t?"text-[#1e80ff] dark:text-[#79b7ff]":Ze(s.rank)}`,children:n==="—"?"未上榜":`#${n}`}),e.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[e.jsxs(I,{className:"size-7 shrink-0 border border-white/80 shadow-sm dark:border-white/15",size:"sm",children:[r.avatarUrl?e.jsx(I.Image,{alt:"",loading:"eager",src:r.avatarUrl}):null,e.jsx(I.Fallback,{color:"accent",delayMs:0,children:r.displayName.slice(0,1).toUpperCase()||"J"})]}),e.jsx("span",{className:"min-w-0 truncate text-[12px] font-semibold text-[#294560] dark:text-[#dceeff]",children:r.displayName})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-3 text-right text-[10px] font-bold tabular-nums",children:[e.jsxs("span",{className:"inline-flex w-auto shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[#b9d8ff]/85 bg-[#e4f1ff]/80 px-2 py-1 text-[#1e80ff] shadow-[inset_0_1px_0_rgb(255_255_255_/0.82)] dark:border-[#356796] dark:bg-[#193755]/80 dark:text-[#79b7ff] dark:shadow-none",title:`Token:${o}`,children:[e.jsx(De,{"aria-hidden":!0,className:"size-3 shrink-0"}),e.jsx("span",{children:o})]}),e.jsxs("span",{className:"inline-flex w-auto shrink-0 items-center gap-1 whitespace-nowrap rounded-full border border-[#a8d9ba]/85 bg-[#e6f8ec]/80 px-2 py-1 text-[#22a05a] shadow-[inset_0_1px_0_rgb(255_255_255_/0.82)] dark:border-[#377b55] dark:bg-[#153d29]/80 dark:text-[#63d98a] dark:shadow-none",title:`消费:${i}`,children:[e.jsx(Pe,{"aria-hidden":!0,className:"size-3 shrink-0"}),e.jsx("span",{children:i})]})]})]})]})}function te(t,a){return t.userHash===a.userHash||!!t.uid&&t.uid===a.uid||t.isCurrentUser&&a.isCurrentUser}function Ze(t){return t===1?"text-[#f26b42] dark:text-[#ff9b74]":t===2?"text-[#e39a3a] dark:text-[#ffc36b]":t===3?"text-[#8f79d8] dark:text-[#b9a7ff]":"text-[#5c7d9c] dark:text-[#a8c1da]"}function et(){return e.jsxs("div",{className:"mt-5","aria-label":"排行榜加载中",children:[e.jsx("div",{className:"space-y-1.5",children:Array.from({length:le},(t,a)=>e.jsxs("div",{className:"grid grid-cols-[2.5rem_minmax(0,1fr)_auto] items-center gap-1 rounded-xl border border-white/55 bg-white/[0.38] px-2 py-2.5 dark:border-white/[0.07] dark:bg-white/[0.045]",children:[e.jsx(k,{className:"mx-auto h-5 w-7 rounded"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{className:"size-7 rounded-full"}),e.jsx(k,{className:"h-3 w-24 rounded"})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[e.jsx(k,{className:"h-6 w-16 rounded-full"}),e.jsx(k,{className:"h-6 w-14 rounded-full"})]})]},a))}),e.jsxs("div",{className:"my-4 py-1.5",children:[e.jsx(k,{className:"mb-1.5 ml-3 h-3 w-24 rounded"}),e.jsx(k,{className:"h-11 w-full rounded-xl"})]})]})}function tt(){return e.jsxs("footer",{className:"mt-8 flex items-center justify-between gap-3 rounded-2xl border border-white/75 bg-white/[0.52] px-3 py-2.5 shadow-[inset_0_1px_0_rgb(255_255_255_/0.9)] backdrop-blur-sm dark:border-white/10 dark:bg-white/[0.06] dark:shadow-none",children:[e.jsxs("div",{className:"min-w-0 pl-1",children:[e.jsx("p",{className:"text-[13px] font-semibold text-[#385775] dark:text-[#d6e8fa]",children:"扫码查看排行榜"}),e.jsx("p",{className:"mt-1 truncate text-[11px] text-[#7892ac] dark:text-[#9bb7d2]",children:"Juejin Usage · Token 排行榜"})]}),e.jsx(xe,{bgColor:"#ffffff",className:"size-[58px] shrink-0 rounded-lg bg-white p-1 shadow-sm",fgColor:"#14243a",imageSettings:{excavate:!0,height:12,src:we,width:12},level:"H",marginSize:1,size:58,title:"扫码查看 Juejin Usage 排行榜",value:Qe})]})}function at({children:t}){return e.jsx(F,{className:"h-6 min-h-6 border border-[#b9d8ff] bg-[#e4f1ff]/90 px-2.5 text-[#1e80ff] shadow-[inset_0_1px_0_rgb(255_255_255_/0.9),0_2px_8px_rgb(56_121_188_/0.08)] backdrop-blur-md dark:border-[#356796] dark:bg-[#193755]/90 dark:text-[#79b7ff] dark:shadow-none",size:"sm",variant:"secondary",children:e.jsx(F.Label,{className:"text-[10px] font-semibold leading-none",children:t})})}function st(){return e.jsxs("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 overflow-hidden",children:[e.jsx("div",{className:"absolute -right-16 -top-20 size-72 rounded-full bg-[#cfe8ff]/75 blur-3xl dark:bg-[#1e80ff]/20"}),e.jsx("div",{className:"absolute right-12 top-5 size-24 rounded-full bg-white/70 blur-2xl dark:bg-[#4b9cff]/15"}),e.jsx("div",{className:"absolute -left-12 bottom-24 size-40 rounded-full bg-[#dbeeff]/80 blur-3xl dark:bg-[#347ff0]/15"}),e.jsx("span",{className:"absolute right-9 top-12 size-2.5 rounded-full bg-[#7eb6ff]/75"}),e.jsx("span",{className:"absolute right-28 top-20 size-1.5 rounded-full bg-[#5aa2ff]/60"}),e.jsx("span",{className:"absolute right-5 top-40 size-2 rounded-full border-2 border-[#8ec0ff]/80"}),e.jsxs("svg",{className:"absolute -right-1 top-9 h-32 w-24 rotate-[16deg] opacity-60 dark:opacity-15",fill:"none",viewBox:"0 0 112 148",children:[e.jsx("rect",{fill:"#f5f9ff",height:"132",rx:"14",stroke:"#c5dcff",strokeWidth:"2",width:"96",x:"8",y:"8"}),e.jsx("path",{d:"M28 40H84M28 56H72M28 72H78M28 88H64",stroke:"#c5dcff",strokeLinecap:"round",strokeWidth:"6"})]}),e.jsxs("svg",{className:"absolute right-6 top-20 h-36 w-28 rotate-[7deg] opacity-70 drop-shadow-[0_10px_18px_rgb(30_128_255_/0.12)] dark:opacity-25",fill:"none",viewBox:"0 0 128 168",children:[e.jsx("rect",{fill:"#eef6ff",height:"148",rx:"16",stroke:"#7eb6ff",strokeWidth:"2.5",width:"108",x:"10",y:"10"}),e.jsx("path",{d:"M34 46H94M34 66H82M34 86H88M34 106H70",stroke:"#8ec0ff",strokeLinecap:"round",strokeWidth:"7"})]}),e.jsxs("svg",{className:"absolute -bottom-4 -right-2 size-20 rotate-[14deg] opacity-65 dark:opacity-25",fill:"none",viewBox:"0 0 64 64",children:[e.jsx("path",{d:"M20 14h24v12c0 8-5.5 14-12 14s-12-6-12-14V14z",fill:"#e8f3ff",stroke:"#7eb6ff",strokeLinejoin:"round",strokeWidth:"2"}),e.jsx("path",{d:"M20 18H14c0 8 4 12 8 13M44 18h6c0 8-4 12-8 13",stroke:"#5aa2ff",strokeLinecap:"round",strokeWidth:"2"}),e.jsx("path",{d:"M28 40v6h8v-6M24 50h16",stroke:"#8ec0ff",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.5"}),e.jsx("circle",{cx:"32",cy:"24",fill:"#1e80ff",r:"3"})]})]})}function ot(t,a){const s=t,r=s.uid??t.userHash,o=a[r];return{avatarUrl:(o==null?void 0:o.avatarUrl)??s.avatarUrl??null,displayName:(o==null?void 0:o.userName)??t.displayName}}const ae=[{id:"today",label:"今天"},{id:"week",label:"本周"},{id:"month",label:"本月"},{id:"all",label:"全部"}],ne="!h-8 !min-h-8",ce="w-50 !max-h-64 overflow-hidden rounded-xl bg-surface shadow-md",de="!max-h-64 overflow-y-auto!";function rt(){const t=window.open(X,"_blank");if(t){t.opener=null;return}window.location.assign(X)}function it({loading:t,metric:a,model:s,modelOptions:r,onModelChange:o,onToolChange:i,profiles:n,board:d,tool:h,tools:_,value:c,onChange:p}){var x;const[l,u]=m.useState(!1),g=((x=_.find(w=>w.key===h))==null?void 0:x.displayName)??"全部工具",v=s||"全部模型";return e.jsxs("div",{"aria-label":"排行榜筛选",className:"mb-4 flex w-full min-w-0 items-center gap-1.5 sm:gap-2",children:[e.jsx("div",{className:"shrink-0 sm:hidden",children:e.jsx(nt,{ariaLabel:"时间范围",options:ae.map(w=>({id:w.id,label:w.label})),placeholder:"时间范围",value:c,onChange:w=>p(w),allowEmpty:!1})}),e.jsx(z,{className:"hidden w-fit shrink-0 text-center sm:block",selectedKey:c,onSelectionChange:w=>p(String(w)),children:e.jsx(z.ListContainer,{children:e.jsx(z.List,{"aria-label":"时间范围",className:"w-fit *:h-6 *:w-fit *:px-3 *:text-sm *:font-normal *:data-[selected=true]:text-accent-foreground",children:ae.map(w=>e.jsxs(z.Tab,{id:w.id,children:[e.jsx("span",{className:"text-xs font-normal",children:w.label}),e.jsx(z.Indicator,{className:"bg-accent"})]},w.id))})})}),e.jsx(lt,{tools:_,value:h,onChange:i}),e.jsx(Je,{models:r.map(w=>w.model),value:s,onChange:o}),e.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[e.jsxs(O,{closeDelay:80,delay:100,children:[e.jsx(M,{"aria-label":"GitHub 仓库",className:"size-8 min-h-8 min-w-8 shrink-0 p-0",isIconOnly:!0,onPress:rt,size:"sm",variant:"tertiary",children:e.jsx(Ie,{className:"size-4"})}),e.jsx(O.Content,{placement:"bottom",children:e.jsx("p",{children:"GitHub 仓库"})})]}),e.jsxs(O,{closeDelay:80,delay:100,children:[e.jsx(M,{"aria-label":"分享排行榜",className:"size-8 min-h-8 min-w-8 shrink-0 p-0",isIconOnly:!0,onPress:()=>u(!0),size:"sm",variant:"tertiary",children:e.jsx(Fe,{className:"size-4"})}),e.jsx(O.Content,{placement:"bottom",children:e.jsx("p",{children:"分享"})})]}),e.jsx(Le,{})]}),e.jsx(Xe,{board:d,loading:t,metric:a,modelLabel:v,onOpenChange:u,open:l,profiles:n,toolLabel:g})]})}function lt({onChange:t,tools:a,value:s}){const r=a.find(o=>o.key===s);return e.jsxs(N,{"aria-label":"工具筛选",className:"min-w-0 max-w-[7.5rem] shrink text-xs sm:max-w-52 sm:shrink-0",variant:"secondary",value:s||"all",onChange:o=>t(o==="all"||o==null?"":String(o)),children:[e.jsx(q,{className:"sr-only",children:"工具筛选"}),e.jsxs(N.Trigger,{className:`${ne} !w-fit max-w-[7.5rem] items-center leading-none ps-2.5 pe-7 !text-xs font-normal sm:max-w-52 sm:ps-3 sm:pe-8`,children:[e.jsx(N.Value,{className:"min-w-0 max-w-20 !text-xs sm:max-w-40",children:()=>r?e.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[e.jsx(J,{provider:r.key,size:14}),e.jsx("span",{className:"truncate",children:r.displayName})]}):"全部工具"}),e.jsx(N.Indicator,{className:"size-3.5 text-muted"})]}),e.jsx(N.Popover,{className:ce,placement:"bottom start",children:e.jsxs(S,{"aria-label":"工具筛选",className:de,children:[e.jsxs(S.Item,{id:"all",textValue:"全部工具",children:["全部工具",e.jsx(S.ItemIndicator,{})]}),a.map(o=>e.jsxs(S.Item,{className:"gap-2! rounded-lg px-1.5 py-1 text-xs",id:o.key,textValue:o.displayName,children:[e.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:e.jsx(J,{provider:o.key,size:14})}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:o.displayName}),e.jsx(S.ItemIndicator,{})]},o.key))]})})]})}function nt({allowEmpty:t=!0,ariaLabel:a,onChange:s,options:r,placeholder:o,value:i}){return e.jsxs(N,{"aria-label":a,className:"min-w-0 max-w-[7.5rem] shrink text-xs sm:max-w-52 sm:shrink-0",variant:"secondary",value:t?i||"all":i,onChange:n=>{if(t){s(n==="all"||n==null?"":String(n));return}n!=null&&s(String(n))},children:[e.jsx(q,{className:"sr-only",children:a}),e.jsxs(N.Trigger,{className:`${ne} !w-fit max-w-[7.5rem] items-center leading-none ps-2.5 pe-7 !text-xs font-normal sm:max-w-52 sm:ps-3 sm:pe-8`,children:[e.jsx(N.Value,{className:"min-w-0 max-w-20 !text-xs sm:max-w-40"}),e.jsx(N.Indicator,{className:"size-3.5 text-muted"})]}),e.jsx(N.Popover,{className:ce,placement:"bottom start",children:e.jsxs(S,{"aria-label":a,className:de,children:[t?e.jsxs(S.Item,{id:"all",textValue:o,children:[o,e.jsx(S.ItemIndicator,{})]}):null,r.map(n=>e.jsxs(S.Item,{id:n.id,textValue:n.label,children:[n.label,e.jsx(S.ItemIndicator,{})]},n.id))]})})]})}const ct="inline-flex h-8 max-w-full items-center rounded-full border border-white/70 bg-white/55 p-0.5 shadow-[0_1px_2px_rgb(15_60_120_/0.06)] backdrop-blur-md dark:border-white/10 dark:bg-white/[0.08] dark:shadow-none";function dt({cost:t,hideFromLeaderboard:a=!1,loading:s,metric:r,onMetricChange:o,tokens:i}){var d,h;const n=[{id:"tokens",label:"按 Token",rank:(d=i==null?void 0:i.currentUser)==null?void 0:d.rank},{id:"cost",label:"按消费",rank:(h=t==null?void 0:t.currentUser)==null?void 0:h.rank}];return e.jsx("div",{"aria-label":"排行指标",className:ct,role:"tablist",children:n.map(({id:_,label:c,rank:p})=>{const l=r===_,u=a||s?null:ut(p);return e.jsxs("button",{"aria-label":u?`${c} ${u}`:c,"aria-selected":l,className:R("inline-flex h-full items-center gap-1 rounded-full px-2 text-xs font-medium transition-colors sm:px-2.5",l?"bg-white text-[#1e80ff] shadow-xs dark:bg-white/15 dark:text-[#4b9cff]":"text-muted hover:text-foreground dark:text-foreground/55 dark:hover:text-foreground/85"),onClick:()=>o(_),role:"tab",type:"button",children:[e.jsx("span",{children:c}),a?null:s?e.jsx(k,{"aria-label":`${c}排名加载中`,className:"h-3 w-6 rounded-sm"}):u?e.jsx("span",{className:"tabular-nums opacity-80",children:u}):null]},_)})})}function ut(t){const a=ie(t);return a==="—"?null:`#${a}`}function mt({aside:t,children:a}){const s=Math.max(0,a.length-2),r=a.slice(0,s),o=a.slice(s,s+1),i=a.slice(s+1);return e.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2.5 sm:gap-3",children:[e.jsxs("span",{className:"relative inline-flex items-baseline leading-none",children:[r,e.jsxs("span",{className:"relative inline-block",children:[o,e.jsx("svg",{"aria-hidden":!0,className:"pointer-events-none absolute left-1/2 top-[calc(100%-1px)] h-2.5 w-7 -translate-x-1/2 text-[#1e80ff] sm:h-3 sm:w-9 dark:text-[#4b9cff]",fill:"none",viewBox:"0 0 36 12",children:e.jsx("path",{d:"M2 7.5C8 3.5 13 2.5 18 5C23 7.5 28 8.5 34 4.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2.8"})})]}),i]}),t]})}const G="rounded-2xl border border-white/60 bg-white/90 shadow-[0_8px_30px_rgb(15_60_120_/0.06)] dark:border-white/8 dark:bg-surface dark:shadow-[0_8px_30px_rgb(0_0_0_/0.35)]",_t="240px 0px";function ft({global:t,hideFromLeaderboard:a=!1,hideToggleDisabled:s=!1,loading:r,metric:o,onHideFromLeaderboardChange:i,onMetricChange:n,profiles:d,refreshing:h=!1,showHideToggle:_=!1}){const c=(t==null?void 0:t[o])??null;return e.jsxs("section",{"aria-labelledby":"rank-users-title",className:"space-y-3 sm:space-y-4",children:[e.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-3",children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight sm:text-3xl",id:"rank-users-title",children:e.jsx(mt,{children:"用户排行榜"})}),e.jsx(dt,{cost:(t==null?void 0:t.cost)??null,hideFromLeaderboard:a,loading:r,metric:o,onMetricChange:n,tokens:(t==null?void 0:t.tokens)??null})]}),_?e.jsx(D,{className:"shrink-0 self-start sm:self-center",isDisabled:s,isSelected:a,size:"sm",onChange:p=>i==null?void 0:i(p),children:e.jsxs(D.Content,{className:"gap-1.5 text-xs font-normal text-muted",children:[e.jsx(D.Control,{children:e.jsx(D.Thumb,{})}),"隐藏自己"]})}):null]}),r&&c==null?e.jsx(bt,{}):e.jsx("div",{className:R("transition-opacity duration-150",h&&"pointer-events-none opacity-60"),children:e.jsx(ht,{board:c,hideFromLeaderboard:a,profiles:d})})]})}function ht({board:t,hideFromLeaderboard:a,profiles:s}){const r=(t==null?void 0:t.rows)??[],o=a?null:(t==null?void 0:t.currentUser)??null,i=qe(r,o);return r.length===0&&!o?e.jsxs("div",{className:R(G,"flex min-h-56 flex-col items-center justify-center gap-2 overflow-hidden text-center"),children:[e.jsx("p",{className:"text-sm",children:"当前范围暂无用户排行数据"}),e.jsx("p",{className:"text-xs text-muted",children:"产生用量后再回来看看"})]}):e.jsxs("div",{className:R(G,"min-w-0"),children:[e.jsxs("div",{"aria-hidden":!0,className:"flex items-center gap-2 px-4 py-2.5 text-[11px] text-muted sm:gap-5 sm:px-6 sm:py-3 sm:text-xs",children:[e.jsx("span",{className:"w-10 shrink-0 sm:w-12"}),e.jsx("span",{className:"min-w-0 flex-1",children:"用户"}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2 sm:gap-8",children:[e.jsx("span",{className:"w-[3.25rem] text-right sm:w-24",children:"总 Token"}),e.jsx("span",{className:"w-[3.25rem] text-right sm:w-20",children:"总费用"})]})]}),e.jsx("ol",{className:"min-w-0",children:i.map(({pinned:n,row:d})=>{const h=d,_=h.uid??d.userHash,c=s[_],p=(c==null?void 0:c.userName)??d.displayName,l=(c==null?void 0:c.avatarUrl)??h.avatarUrl,u=(c==null?void 0:c.profileUrl)??`https://juejin.cn/user/${encodeURIComponent(_)}`,g=h.totalTokens??d.tokens;return e.jsx("li",{className:R("min-w-0 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.04]",n?"sticky top-0 z-10 border-b border-[#1e80ff]/15 bg-[#eef6ff]/95 shadow-[0_8px_16px_rgb(15_60_120_/0.06)] dark:border-[#4b9cff]/20 dark:bg-[#16324f]/95 dark:shadow-[0_8px_16px_rgb(0_0_0_/0.25)]":"[content-visibility:auto] [contain-intrinsic-size:auto_56px]"),children:e.jsxs("div",{className:"flex min-w-0 items-center gap-2 px-4 py-3 sm:gap-5 sm:px-6 sm:py-4",children:[e.jsx(xt,{rank:d.rank}),e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 sm:gap-2.5",children:[e.jsx(pt,{fallback:p.slice(0,1),src:l}),e.jsx("a",{className:"min-w-0 truncate text-sm font-semibold text-foreground underline-offset-2 hover:underline sm:text-[15px]",href:u,rel:"noreferrer",target:"_blank",title:p,children:p}),d.isCurrentUser&&e.jsx(F,{className:"shrink-0",color:"success",size:"sm",variant:"soft",children:e.jsx(F.Label,{children:"我"})})]}),e.jsx(wt,{costUsd:d.costUsd,tokens:g})]})},n?`pinned-${d.userHash}`:d.userHash)})})]})}function pt({fallback:t,src:a}){const s=m.useRef(null),[r,o]=m.useState(!a);return m.useEffect(()=>{if(!a){o(!0);return}const i=s.current;if(!i)return;if(typeof IntersectionObserver>"u"){o(!0);return}const n=new IntersectionObserver(d=>{d.some(h=>h.isIntersecting)&&(o(!0),n.disconnect())},{rootMargin:_t,threshold:.01});return n.observe(i),()=>n.disconnect()},[a]),e.jsx("span",{className:"inline-flex shrink-0",ref:s,children:e.jsxs(I,{className:"size-7 sm:size-8",size:"sm",children:[r&&a?e.jsx(I.Image,{alt:"",decoding:"async",loading:"lazy",src:a}):null,e.jsx(I.Fallback,{children:t})]})})}function xt({rank:t}){return e.jsx("span",{"aria-label":`第 ${t} 名`,className:R("w-10 shrink-0 text-center font-bold tabular-nums leading-none sm:w-12",t>99?"text-base sm:text-lg":"text-xl sm:text-2xl",t===1&&"text-[#F53F3F] dark:text-[#ff6b6b]",t===2&&"text-[#F77234] dark:text-[#ff9a5c]",t===3&&"text-[#FF7D00] dark:text-[#ffb020]",t>3&&"text-foreground/55 dark:text-foreground/45"),children:t})}function wt({costUsd:t,tokens:a}){return e.jsxs("div",{className:"flex shrink-0 items-center gap-2 sm:gap-8",children:[e.jsx("span",{className:"w-[3.25rem] truncate text-right text-xs font-medium tabular-nums text-foreground sm:w-24 sm:text-sm",title:`${a.toLocaleString("zh-CN")} Token`,children:se(a)}),e.jsx("span",{className:"w-[3.25rem] truncate text-right text-xs font-medium tabular-nums text-foreground sm:w-20 sm:text-sm",title:B(t),children:B(t)})]})}function bt(){return e.jsxs("div",{"aria-label":"用户排行榜加载中",className:R(G,"min-w-0 overflow-hidden"),children:[e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 sm:gap-5 sm:px-6 sm:py-3",children:[e.jsx("span",{className:"w-10 shrink-0 sm:w-12"}),e.jsx(k,{className:"h-3 w-8 rounded-md"}),e.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2 sm:gap-8",children:[e.jsx(k,{className:"h-3 w-12 rounded-md sm:w-16"}),e.jsx(k,{className:"h-3 w-12 rounded-md sm:w-14"})]})]}),Array.from({length:7},(t,a)=>e.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 sm:gap-5 sm:px-6 sm:py-4",children:[e.jsx(k,{className:"h-6 w-10 shrink-0 rounded-md sm:h-7 sm:w-12"}),e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 sm:gap-2.5",children:[e.jsx(k,{className:"size-7 shrink-0 rounded-full sm:size-8"}),e.jsx(k,{className:"h-4 w-24 max-w-full rounded-md sm:w-36"})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2 sm:gap-8",children:[e.jsx(k,{className:"h-3.5 w-12 rounded-md sm:h-4 sm:w-20"}),e.jsx(k,{className:"h-3.5 w-12 rounded-md sm:h-4 sm:w-16"})]})]},a))]})}const gt=JSON.parse('[{"content":{"content_id":"7668309258707386378","item_type":2,"format":"","author_id":"1468603264447661","title":"我的AI工作流整理【个人向】","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["6809640642101116936","7337236878996799522"]},"content_counter":{"view":1255,"like":20,"collect":20,"hot_rank":801,"comment_count":8,"interact_count":28},"author":{"user_id":"1468603264447661","name":"昭阳","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/be57be505955ef23e4ad41465db23038~300x300.image","is_followed":false},"author_counter":{"level":3,"power":502,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668540866239529010","item_type":2,"format":"","author_id":"3271760779459694","title":"DeepSeek V4-Flash 更新:代码与 Agent 能力全面增强","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093","6809640408797167623","7467857238493757466"]},"content_counter":{"view":1060,"like":10,"collect":1,"hot_rank":558,"comment_count":0,"interact_count":10},"author":{"user_id":"3271760779459694","name":"勇宝趣学前端","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/5a2596246a214e4bff4a4ceff6213c54~300x300.image","is_followed":false},"author_counter":{"level":4,"power":3937,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7667863898348126271","item_type":2,"format":"","author_id":"817692379985752","title":"KotlinLLM 开源 ,一个可以在运行时自己生成永久 Kotlin 代码的 Agent 库","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809635626879549454","tag_ids":["6809640407484334093","6809640400832167949","6809640642101116936"]},"content_counter":{"view":936,"like":13,"collect":9,"hot_rank":549,"comment_count":2,"interact_count":15},"author":{"user_id":"817692379985752","name":"恋猫de小郭","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/f4117a39915ab646a21a190e1fc5795d~300x300.image","is_followed":false},"author_counter":{"level":8,"power":162020,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668191994554073142","item_type":2,"format":"","author_id":"817692379985752","title":"Flutter Starling : 用 Swift和 Flutter 写了一个 Linux 桌面系统,震惊我一整年","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809635626879549454","tag_ids":["6809640407484334093","6809641090145058824","6809640400832167949"]},"content_counter":{"view":789,"like":16,"collect":8,"hot_rank":522,"comment_count":3,"interact_count":19},"author":{"user_id":"817692379985752","name":"恋猫de小郭","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/f4117a39915ab646a21a190e1fc5795d~300x300.image","is_followed":false},"author_counter":{"level":8,"power":162020,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668634785267695625","item_type":2,"format":"","author_id":"2101921964109880","title":"DeepSeek-V4-Flash 正式版来了!这次提升有点夸张。","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["6809640408797167623","6809640482725953550","6809640642101116936"]},"content_counter":{"view":795,"like":10,"collect":3,"hot_rank":441,"comment_count":0,"interact_count":10},"author":{"user_id":"2101921964109880","name":"cxuanAI","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/5920859b1d1dd54b8e09b7a55c956f0b~300x300.image","is_followed":false},"author_counter":{"level":6,"power":66857,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668305038255521838","item_type":2,"format":"","author_id":"465848661970824","title":"Spring之父再次出山,开发了新的AI框架!","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637769959178254","tag_ids":["6809640408797167623"]},"content_counter":{"view":725,"like":8,"collect":16,"hot_rank":387,"comment_count":0,"interact_count":8},"author":{"user_id":"465848661970824","name":"苏三说技术","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/dc678f02170ae25eb82989d0f7715e1f~300x300.image","is_followed":false},"author_counter":{"level":7,"power":77230,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7667895598095826970","item_type":2,"format":"","author_id":"1046390797768519","title":"别再只用 Loading、Success、Error 表示所有页面状态了","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809635626879549454","tag_ids":["6809640615584727053","6809640400832167949"]},"content_counter":{"view":574,"like":5,"collect":13,"hot_rank":315,"comment_count":2,"interact_count":7},"author":{"user_id":"1046390797768519","name":"RockByte","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/dc915432f9ea15229a7cbaeb90b832a9~300x300.image","is_followed":false},"author_counter":{"level":5,"power":11195,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668535450420019236","item_type":2,"format":"","author_id":"1239904848718135","title":"我用AI写了半年代码——回头看,这5个能力正在退化","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093","7467857238494019610","6809640398105870343"]},"content_counter":{"view":497,"like":4,"collect":3,"hot_rank":279,"comment_count":3,"interact_count":7},"author":{"user_id":"1239904848718135","name":"kyriewen","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/dc010ce441d17f8236be40eb2d03ef25~300x300.image","is_followed":false},"author_counter":{"level":5,"power":8065,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668341210563870720","item_type":2,"format":"","author_id":"3109843365802925","title":"公司取消前端岗后,做了 10 年 Java 的我,第一次认真拥抱 AI","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637771511070734","tag_ids":["6809640408797167623","6809640407484334093","6809641073527226376"]},"content_counter":{"view":572,"like":1,"collect":3,"hot_rank":270,"comment_count":1,"interact_count":2},"author":{"user_id":"3109843365802925","name":"天天摸鱼的java工程师","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/154899ea78d48ae7f7b6f942da934035~300x300.image","is_followed":false},"author_counter":{"level":5,"power":20605,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668490153107783732","item_type":2,"format":"","author_id":"1747564987417529","title":"DeepSeek-V4-Flash 接入 Codex(Windows 版)","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637776263217160","tag_ids":["6809640419505209358"]},"content_counter":{"view":516,"like":0,"collect":1,"hot_rank":234,"comment_count":1,"interact_count":1},"author":{"user_id":"1747564987417529","name":"iMountTai","avatar":"https://p6-passport.byteacctimg.com/img/mosaic-legacy/3793/3131589739~300x300.image","is_followed":false},"author_counter":{"level":1,"power":36,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668608790367682595","item_type":2,"format":"","author_id":"3280598428302727","title":"DeepSeek V4-Flash 正式版深度解读:一行 changelog 里的暗涌与野心","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["6809640642101116936","7257794499869573175"]},"content_counter":{"view":422,"like":4,"collect":1,"hot_rank":216,"comment_count":0,"interact_count":4},"author":{"user_id":"3280598428302727","name":"土豆1250","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/d885d8cedee72a3f762988d43f4e6cf9~300x300.image","is_followed":false},"author_counter":{"level":4,"power":3230,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7667863898349289535","item_type":2,"format":"","author_id":"131597124767479","title":"用户埋点怎么设计","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637776263217160","tag_ids":["6809640408797167623"]},"content_counter":{"view":340,"like":6,"collect":8,"hot_rank":207,"comment_count":0,"interact_count":6},"author":{"user_id":"131597124767479","name":"Harries","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/a4c138f466be404ddcc48d60e50672d7~300x300.image","is_followed":false},"author_counter":{"level":6,"power":33562,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668204673984675850","item_type":2,"format":"","author_id":"3193422001474199","title":"从零开发一个 Coding Agent(四):使用状态机校验大模型事件流","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093","6809640408797167623","6809640642101116936"]},"content_counter":{"view":398,"like":3,"collect":6,"hot_rank":198,"comment_count":0,"interact_count":3},"author":{"user_id":"3193422001474199","name":"东方小月","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/2361b8d5a0de5981a126064173e399d6~300x300.image","is_followed":false},"author_counter":{"level":5,"power":23223,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668532403132301362","item_type":2,"format":"","author_id":"1081575170131006","title":"全栈工程师必会技术栈:从入门到架构的完整成长地图 🗺️","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093","6809640408797167623","6809640458684203021"]},"content_counter":{"view":296,"like":5,"collect":10,"hot_rank":189,"comment_count":2,"interact_count":7},"author":{"user_id":"1081575170131006","name":"前端小小栈","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/d214cb622791e83300abdd4c3260ec4b~300x300.image","is_followed":false},"author_counter":{"level":5,"power":5595,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668589503620546611","item_type":2,"format":"","author_id":"1239904846873326","title":"bm2,MoonBit实现的pm2替代品","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637772874219534","tag_ids":["6809640407484334093","6809640408797167623","6809640482725953550"]},"content_counter":{"view":212,"like":4,"collect":4,"hot_rank":162,"comment_count":4,"interact_count":8},"author":{"user_id":"1239904846873326","name":"前端之虎陈随易","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/1e53615038b0e9a227c4627ee0bb0a65~300x300.image","is_followed":false},"author_counter":{"level":5,"power":22346,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668274158058504201","item_type":2,"format":"","author_id":"4001878056904584","title":"Spring Boot 集成 OnlyOffice,5 分钟搞定 Word/Excel 在线编辑","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637769959178254","tag_ids":["6809640408797167623","6809640445233070094","6809640482725953550"]},"content_counter":{"view":288,"like":3,"collect":11,"hot_rank":153,"comment_count":0,"interact_count":3},"author":{"user_id":"4001878056904584","name":"SimonKing","avatar":"https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/mirror-assets/16cadd4c73660bef648~tplv-t2oaga2asx-image.image","is_followed":false},"author_counter":{"level":5,"power":12998,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7669024144831168518","item_type":2,"format":"","author_id":"4441682708283191","title":"DeepSeek-V4-Flash 正式版上线了,但这 3 个坑我帮你提前踩了","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637776263217160","tag_ids":["6809640407484334093","6809640408797167623","6809640398105870343"]},"content_counter":{"view":298,"like":2,"collect":1,"hot_rank":144,"comment_count":0,"interact_count":2},"author":{"user_id":"4441682708283191","name":"万少","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/3559b8826a8e632112e62195b3a1c745~300x300.image","is_followed":false},"author_counter":{"level":5,"power":12410,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668933720747638834","item_type":2,"format":"","author_id":"1204720476890477","title":"架构没变、规模没变,DeepSeek V4 Flash 正式版凭什么暴涨 47 分?","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["6809640407484334093","7467857238493757466","7197380506562871333"]},"content_counter":{"view":283,"like":2,"collect":1,"hot_rank":135,"comment_count":0,"interact_count":2},"author":{"user_id":"1204720476890477","name":"小帅不太帅","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/939ad8ae4c08781557a64b2b48b77a7d~300x300.image","is_followed":false},"author_counter":{"level":5,"power":6158,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7667907789688274953","item_type":2,"format":"","author_id":"1662117311414462","title":"JS 代码技巧 vol.10 — 20 个 V8 引擎原理,解释\\"为什么这样写快\\"","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093","6809640398105870343","6809640404791590919"]},"content_counter":{"view":204,"like":3,"collect":4,"hot_rank":117,"comment_count":0,"interact_count":3},"author":{"user_id":"1662117311414462","name":"不简说","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/079dd96c51924889586213e3d88d5890~300x300.image","is_followed":false},"author_counter":{"level":4,"power":2596,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7667748470229860378","item_type":2,"format":"","author_id":"3271760779459694","title":"《道德经》第 9 章:别把系统和自己都推到过载","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637772874219534","tag_ids":["6809640407484334093","6809640408797167623","6809640482725953550"]},"content_counter":{"view":123,"like":5,"collect":2,"hot_rank":108,"comment_count":1,"interact_count":6},"author":{"user_id":"3271760779459694","name":"勇宝趣学前端","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/5a2596246a214e4bff4a4ceff6213c54~300x300.image","is_followed":false},"author_counter":{"level":4,"power":3937,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668524314757349385","item_type":2,"format":"","author_id":"4371313964097565","title":"Agentic AI 工程实战","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["6809640642101116936"]},"content_counter":{"view":151,"like":4,"collect":3,"hot_rank":99,"comment_count":0,"interact_count":4},"author":{"user_id":"4371313964097565","name":"Shockang","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/4665bb630e37a2f96abecb263cd5f753~300x300.image","is_followed":false},"author_counter":{"level":4,"power":2368,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668309258707320842","item_type":2,"format":"","author_id":"1380642337863272","title":"SDKMAN vs jEnv vs JetTUI,JDK 版本管理到底选哪个","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637771511070734","tag_ids":["6809640408797167623"]},"content_counter":{"view":74,"like":2,"collect":1,"hot_rank":99,"comment_count":6,"interact_count":8},"author":{"user_id":"1380642337863272","name":"极客悟道","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/4a2d5c0741c2ab9451777574d769dab2~300x300.image","is_followed":false},"author_counter":{"level":3,"power":474,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668880520002240566","item_type":2,"format":"","author_id":"149189314230039","title":"GPT-5.6 Luna 降价 80%:Agent 真正该重算的是单次成功成本","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["6809640642101116936","7257794499869573175","7197380216015028281"]},"content_counter":{"view":142,"like":4,"collect":1,"hot_rank":99,"comment_count":0,"interact_count":4},"author":{"user_id":"149189314230039","name":"武子康","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/2176f1cd005191db850b0d9d8967a45b~300x300.image","is_followed":false},"author_counter":{"level":5,"power":10970,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668906037449834502","item_type":2,"format":"","author_id":"1239904846873326","title":"MoonBit抓包模块pcap,查看电脑的每一次联网通信","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637772874219534","tag_ids":["6809640407484334093","6809640408797167623","6809640482725953550"]},"content_counter":{"view":106,"like":3,"collect":4,"hot_rank":90,"comment_count":2,"interact_count":5},"author":{"user_id":"1239904846873326","name":"前端之虎陈随易","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/1e53615038b0e9a227c4627ee0bb0a65~300x300.image","is_followed":false},"author_counter":{"level":5,"power":22346,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668613701019467782","item_type":2,"format":"","author_id":"1239904848718135","title":"面试官让我手写虚拟列表——AI生成的版本,快速滚动几下就白屏了","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093","6809640398105870343","6809640404791590919"]},"content_counter":{"view":164,"like":2,"collect":2,"hot_rank":90,"comment_count":0,"interact_count":2},"author":{"user_id":"1239904848718135","name":"kyriewen","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/dc010ce441d17f8236be40eb2d03ef25~300x300.image","is_followed":false},"author_counter":{"level":5,"power":8065,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668508411719090230","item_type":2,"format":"","author_id":"1694775710064217","title":"iOS 客户端视角扫盲:WKWebView 里 window、messageHandlers 与 Native 回调到底怎么工作?","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809635626661445640","tag_ids":["6809640398105870343"]},"content_counter":{"view":111,"like":5,"collect":9,"hot_rank":90,"comment_count":0,"interact_count":5},"author":{"user_id":"1694775710064217","name":"大龄秃头程序员","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/b57565666e223f09fdfeb2c5102c6e4a~300x300.image","is_followed":false},"author_counter":{"level":3,"power":525,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668247452035579939","item_type":2,"format":"","author_id":"1151943919285431","title":"面试官突然问:“数仓哪一层最适合做RAG?”他一下被问住了…","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["6809640404791590919"]},"content_counter":{"view":179,"like":2,"collect":4,"hot_rank":90,"comment_count":0,"interact_count":2},"author":{"user_id":"1151943919285431","name":"神奇小汤圆","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/7faa641980319649e45a847fcd54c46e~300x300.image","is_followed":false},"author_counter":{"level":5,"power":11601,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668613701018583046","item_type":2,"format":"","author_id":"220360279590862","title":"AI时代,程序员该往哪走?","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["6809640407484334093","6809640408797167623"]},"content_counter":{"view":128,"like":2,"collect":2,"hot_rank":81,"comment_count":1,"interact_count":3},"author":{"user_id":"220360279590862","name":"程序员_小雨","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/254baefb585a9a27d77df8976366f55e~300x300.image","is_followed":false},"author_counter":{"level":4,"power":3173,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668341210564214784","item_type":2,"format":"","author_id":"3148645291002232","title":"从火焰图到代码:如何揪出“用久必卡”的前端性能瓶颈","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093"]},"content_counter":{"view":189,"like":0,"collect":5,"hot_rank":81,"comment_count":0,"interact_count":0},"author":{"user_id":"3148645291002232","name":"IT橘子皮","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/e1dcb4a9ffbfc57847420b18b52b1296~300x300.image","is_followed":false},"author_counter":{"level":5,"power":10129,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668198031946809380","item_type":2,"format":"","author_id":"858052674727959","title":"15|(前端转全栈)从一个副标题字段看懂后端完整交付链路","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637769959178254","tag_ids":["6809640407484334093","6809640408797167623","6809640404791590919"]},"content_counter":{"view":109,"like":3,"collect":4,"hot_rank":81,"comment_count":1,"interact_count":4},"author":{"user_id":"858052674727959","name":"swipe","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/ba6476a882ad6e83b4332cd6b7d48c6e~300x300.image","is_followed":false},"author_counter":{"level":4,"power":4558,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668494151793803305","item_type":2,"format":"","author_id":"2770425030646920","title":"深入理解 Flutter 架构:从 Widget 到 GPU 像素的全链路解析","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809635626879549454","tag_ids":["6809641090145058824","6809641091428515853","6809640404791590919"]},"content_counter":{"view":104,"like":3,"collect":1,"hot_rank":81,"comment_count":1,"interact_count":4},"author":{"user_id":"2770425030646920","name":"GitLqr","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/ccc4bb40b0cda1df6b2b885e69c63cc4~300x300.image","is_followed":false},"author_counter":{"level":5,"power":20432,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7669321508946919451","item_type":2,"format":"","author_id":"1574156382242637","title":"给 AI Agent 加上语音交互:ASR + 流式 TTS 实战","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640642101116936","6809640407484334093","6809640408797167623"]},"content_counter":{"view":58,"like":6,"collect":3,"hot_rank":72,"comment_count":0,"interact_count":6},"author":{"user_id":"1574156382242637","name":"云浪","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/f56a64387805ddf3200e9d065da433b9~300x300.image","is_followed":false},"author_counter":{"level":4,"power":4022,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668632356999462946","item_type":2,"format":"","author_id":"3350967174045047","title":"从 mldong 到 jeeflow:一个工作流引擎的独立进化","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637769959178254","tag_ids":["6809640408797167623"]},"content_counter":{"view":108,"like":2,"collect":3,"hot_rank":72,"comment_count":1,"interact_count":3},"author":{"user_id":"3350967174045047","name":"mldong","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/cd319eca3d1c3138ae5798e314786040~300x300.image","is_followed":false},"author_counter":{"level":5,"power":9064,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668247452035350563","item_type":2,"format":"","author_id":"3386151544043960","title":"腾讯 Mars XLog 日志框架的编译和修改","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809635626879549454","tag_ids":["6809640400832167949"]},"content_counter":{"view":119,"like":3,"collect":4,"hot_rank":72,"comment_count":0,"interact_count":3},"author":{"user_id":"3386151544043960","name":"李斯维","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/e202048c011082de7974c4447a899765~300x300.image","is_followed":false},"author_counter":{"level":3,"power":1636,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668718271143952435","item_type":2,"format":"","author_id":"976022055165608","title":"DeepSeek V4-Flash 正式版发布:Agent 基准、价格与 Codex 接入保姆级教程","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["7467857238494019610","7467857238493757466","7516396389476401162"]},"content_counter":{"view":152,"like":0,"collect":1,"hot_rank":63,"comment_count":0,"interact_count":0},"author":{"user_id":"976022055165608","name":"极客密码","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/31dc63f4c1be7194a4e3ba134d121210~300x300.image","is_followed":false},"author_counter":{"level":5,"power":5744,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668598831861661722","item_type":2,"format":"","author_id":"2832784963939438","title":"2840亿参数只卖白菜价:DeepSeek V4 Flash 正式版上线,Agent 能力暴涨6倍","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["6809640499062767624","6809640642101116936"]},"content_counter":{"view":130,"like":1,"collect":1,"hot_rank":63,"comment_count":0,"interact_count":1},"author":{"user_id":"2832784963939438","name":"怕浪猫","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/0e141e0ee39472b8dbddd3a4d8983a38~300x300.image","is_followed":false},"author_counter":{"level":5,"power":5955,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668331078025773071","item_type":2,"format":"","author_id":"199452905712459","title":"教你用最简单的数学自底向上地高效学习SQL注入","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637769959178254","tag_ids":["6809640408797167623"]},"content_counter":{"view":104,"like":2,"collect":0,"hot_rank":63,"comment_count":0,"interact_count":2},"author":{"user_id":"199452905712459","name":"大侠在此在在此","avatar":"https://p26-passport.byteacctimg.com/img/mosaic-legacy/3793/3131589739~300x300.image","is_followed":false},"author_counter":{"level":1,"power":26,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668316523342987270","item_type":2,"format":"","author_id":"1020824523126637","title":"从原始采样到可缩放心电图:用 h5ECG 绘制自己的 ECG","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093"]},"content_counter":{"view":65,"like":0,"collect":2,"hot_rank":63,"comment_count":4,"interact_count":4},"author":{"user_id":"1020824523126637","name":"洪贺","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/76096d8d5fc4b8f99a2428512573b74c~300x300.image","is_followed":false},"author_counter":{"level":1,"power":28,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668206734344667174","item_type":2,"format":"","author_id":"392940069589529","title":"React 状态提升:一个 ColorPicker,彻底搞懂状态该放哪里","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640357354012685","6809640543006490638","6809640406058270733"]},"content_counter":{"view":70,"like":4,"collect":0,"hot_rank":63,"comment_count":0,"interact_count":4},"author":{"user_id":"392940069589529","name":"烬羽","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/17a70c62f5d39e21845ced34dd665b0a~300x300.image","is_followed":false},"author_counter":{"level":4,"power":1840,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668202727697317922","item_type":2,"format":"","author_id":"3667626523633389","title":"tailwind 速记","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093"]},"content_counter":{"view":95,"like":3,"collect":7,"hot_rank":63,"comment_count":0,"interact_count":3},"author":{"user_id":"3667626523633389","name":"时光不负努力","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/0a77281dbfaaeb49a2feb08a5d5db15f~300x300.image","is_followed":false},"author_counter":{"level":3,"power":1066,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7669268061262397503","item_type":2,"format":"","author_id":"2172290706715565","title":"栗子前端技术周刊第 140 期 - pnpm、Node 新 API 文档网站、Oxlint...","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093","6809640398105870343","6809640361531539470"]},"content_counter":{"view":90,"like":3,"collect":1,"hot_rank":63,"comment_count":0,"interact_count":3},"author":{"user_id":"2172290706715565","name":"晓得迷路了","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/2245abbd9a1b2147a918ec036c2149e1~300x300.image","is_followed":false},"author_counter":{"level":5,"power":26100,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7669068704309329960","item_type":2,"format":"","author_id":"3192637495714686","title":"网页端OCR, 加载6mb大小模型, 又快又准, 百度这次真香","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637769959178254","tag_ids":["6809640408797167623","6809640407484334093"]},"content_counter":{"view":77,"like":3,"collect":4,"hot_rank":54,"comment_count":0,"interact_count":3},"author":{"user_id":"3192637495714686","name":"半刻纬度","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/07e4b5b998a373958f919e974f769f01~300x300.image","is_followed":false},"author_counter":{"level":5,"power":24376,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7669036838767034387","item_type":2,"format":"","author_id":"1611207712190058","title":"Android:Hilt框架入门 · 在ViewUI和ComposeUI下的应用","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809635626879549454","tag_ids":["6809640400832167949","6809641107346063368"]},"content_counter":{"view":70,"like":3,"collect":0,"hot_rank":54,"comment_count":0,"interact_count":3},"author":{"user_id":"1611207712190058","name":"Lesile","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/c861ba9bf058d6b23878f43ea1708508~300x300.image","is_followed":false},"author_counter":{"level":2,"power":150,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668692837795725347","item_type":2,"format":"","author_id":"3806962499980916","title":" 08|韧性:一套接口接三家 API —— LLMProvider","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["7467857238494019610"]},"content_counter":{"view":71,"like":3,"collect":2,"hot_rank":54,"comment_count":0,"interact_count":3},"author":{"user_id":"3806962499980916","name":"浪遏","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/5c1619281bed61a788ee074772296e90~300x300.image","is_followed":false},"author_counter":{"level":5,"power":6111,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668602914118041610","item_type":2,"format":"","author_id":"2463384809252397","title":"Go语言第四章(类型转换)","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637769959178254","tag_ids":["6809640408797167623","6809640364677267469"]},"content_counter":{"view":66,"like":3,"collect":2,"hot_rank":54,"comment_count":0,"interact_count":3},"author":{"user_id":"2463384809252397","name":"小满zs","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/f406e4f16ef06556e95d7fe50241a5e8~300x300.image","is_followed":false},"author_counter":{"level":6,"power":31270,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668564914921881636","item_type":2,"format":"","author_id":"245921884145240","title":"VS Code 内置浏览器打开网页","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640407484334093"]},"content_counter":{"view":85,"like":1,"collect":1,"hot_rank":54,"comment_count":1,"interact_count":2},"author":{"user_id":"245921884145240","name":"笨笨狗吞噬者","avatar":"https://p3-passport.byteacctimg.com/img/user-avatar/24ee78f33f9379577dc9dffa1b6669a8~300x300.image","is_followed":false},"author_counter":{"level":4,"power":4767,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668547554775695400","item_type":2,"format":"","author_id":"3669540352043419","title":"React 组件重新渲染时,到底重新执行了什么","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637767543259144","tag_ids":["6809640357354012685","6809640407484334093","6809640404791590919"]},"content_counter":{"view":88,"like":2,"collect":3,"hot_rank":54,"comment_count":1,"interact_count":3},"author":{"user_id":"3669540352043419","name":"Revolution61","avatar":"https://p26-passport.byteacctimg.com/img/user-avatar/abdd9a332b03603e265e249e7f415bf9~300x300.image","is_followed":false},"author_counter":{"level":3,"power":654,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668247452035874851","item_type":2,"format":"","author_id":"3737995265453661","title":"改了20字描述,MCP工具调用准确率飙到85%","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["7467857241178259507","7467857238494019610","7516396389476401162"]},"content_counter":{"view":89,"like":1,"collect":0,"hot_rank":54,"comment_count":1,"interact_count":2},"author":{"user_id":"3737995265453661","name":"码哥字节","avatar":"https://p6-passport.byteacctimg.com/img/user-avatar/8be362627ed4532e3af99463b755598f~300x300.image","is_followed":false},"author_counter":{"level":5,"power":9471,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7667750500684152867","item_type":2,"format":"","author_id":"3956505282886506","title":"BCrypt 还是 Argon2?Spring Security 密码加密方案深度解析与实战对比","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637769959178254","tag_ids":["6809640445233070094","6809640703325372423"]},"content_counter":{"view":89,"like":2,"collect":2,"hot_rank":54,"comment_count":0,"interact_count":2},"author":{"user_id":"3956505282886506","name":"都叫我大帅哥","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/4330d38b5347bc9896ed88eaf9592a9a~300x300.image","is_followed":false},"author_counter":{"level":5,"power":7163,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}},{"content":{"content_id":"7668977124872732722","item_type":2,"format":"","author_id":"3456520291098686","title":"AI编程出海第二步:验证关键词能否做站","brief":"","status":2,"ctime":0,"mtime":0,"category_id":"6809637773935378440","tag_ids":["6809640408797167623","6809640407484334093","6809640642101116936"]},"content_counter":{"view":62,"like":2,"collect":2,"hot_rank":45,"comment_count":0,"interact_count":2},"author":{"user_id":"3456520291098686","name":"卷福同学","avatar":"https://p9-passport.byteacctimg.com/img/user-avatar/ea20d1a80e4b73968e0be6c4027915d8~300x300.image","is_followed":false},"author_counter":{"level":5,"power":6374,"follower":0,"followee":0,"publish":0,"view":0,"like":0,"hot_rank":0},"user_interact":{"is_user_like":false,"is_user_collect":false,"is_follow":false}}]'),kt=ve,U=(()=>{const t=new Map;for(const a of gt){const s=a.author;!(s!=null&&s.user_id)||t.has(s.user_id)||t.set(s.user_id,{userId:s.user_id,name:s.name,avatar:s.avatar})}return Array.from(t.values())})();Array.from({length:kt},(t,a)=>{const s=U.length>0?U[a%U.length]:void 0,r=a===0,o=r?"c0dec001":(Math.imul(73244475,a+17)>>>0).toString(16).padStart(8,"0"),i=s?a<U.length?s.userId:`${s.userId}-${a}`:o;return{displayName:(s==null?void 0:s.name)??`用户 ${o}`,userHash:o,uid:i,avatarUrl:s==null?void 0:s.avatar,tokens:r?15e9:Math.max(12e7,95e8-a*175e6+a*7%5*45e6),costUsd:r?14e3:Math.max(80,Number((8200-a*145+a*11%7*38).toFixed(2))),isCurrentUser:r}});const vt=1e4;function yt(t,a){return`${t}|${a.tool??""}|${a.model??""}`}function jt(t,a={}){const s=Ae(),r=je(),{authStatus:o}=oe(),[i,n]=m.useState(0),d=m.useRef(null),h=m.useRef(!1),[_,c]=m.useState({data:null,loading:!0,refreshing:!1,error:null}),p=m.useCallback(l=>{h.current=(l==null?void 0:l.silent)!==!0,n(u=>u+1)},[]);return m.useEffect(()=>{let l=!1;const u=yt(t,a),g=h.current;return h.current=!1,c(x=>x.data==null?{...x,loading:!0,refreshing:!1,error:null}:d.current!=null&&d.current!==u||g?{...x,loading:!1,refreshing:!0,error:null}:x),ye(t,void 0,a).then(x=>{l||(d.current=u,c({data:x,loading:!1,refreshing:!1,error:null}))}).catch(x=>{l||c(w=>({data:w.data,loading:!1,refreshing:!1,error:x instanceof Error?x.message:"排行榜加载失败"}))}),()=>{l=!0}},[t,i,s,r,o,a.model,a.tool]),m.useEffect(()=>{let l=0,u=performance.now();const g=x=>{x-u>=vt&&(u=x,p({silent:!0})),l=requestAnimationFrame(g)};l=requestAnimationFrame(g);const v=()=>{u=performance.now(),p({silent:!0})};return window.addEventListener("focus",v),()=>{cancelAnimationFrame(l),window.removeEventListener("focus",v)}},[p]),{..._,reload:p}}function Nt(){const[t,a]=ze("tud.rankRange","today",$e),[s,r]=m.useState(""),[o,i]=m.useState(""),[n,d]=m.useState("tokens"),[h,_]=m.useState(!1),[c,p]=m.useState(!1),{data:l,error:u,loading:g,refreshing:v,reload:x}=jt(t,{tool:s||void 0,model:o||void 0}),w=g||v,{authStatus:L,userId:b,userName:f,avatarLarge:j}=oe(),E=!0;m.useEffect(()=>{const y=()=>{x()};return window.addEventListener(Q,y),()=>window.removeEventListener(Q,y)},[x]),m.useEffect(()=>{let y=!1;return Ne().then(V=>{y||_(V.hideFromLeaderboard)}).catch(()=>{y||_(!1)}),()=>{y=!0}},[E]);const ue=!g&&!u&&l!=null&&l.global.cost.currentUser==null&&l.global.tokens.currentUser==null,C=l==null?void 0:l.filterOptions,me=m.useMemo(()=>Ke((C==null?void 0:C.models)??[],s),[C==null?void 0:C.models,s]),W=m.useMemo(()=>{const y={...(l==null?void 0:l.profiles)??{}};return b&&f&&(y[b]={uid:b,userName:f,avatarUrl:j,profileUrl:`https://juejin.cn/user/${encodeURIComponent(b)}`}),y},[l==null?void 0:l.profiles,b,f,j]),_e=y=>{const V=h;_(y),p(!0),Re(y).then(()=>{x()}).catch(()=>{_(V)}).finally(()=>{p(!1)})};return e.jsxs("div",{"aria-busy":w,className:"relative flex w-full min-w-0 flex-col",children:[e.jsx(it,{board:(l==null?void 0:l.global[n])??null,loading:w,metric:n,model:o,modelOptions:me,onChange:a,onModelChange:i,onToolChange:y=>{r(y),i("")},profiles:W,tool:s,tools:(C==null?void 0:C.tools)??[],value:t}),e.jsxs("div",{className:"space-y-6",children:[u!=null&&l==null&&e.jsxs("div",{className:"flex w-full flex-col gap-4 sm:flex-row sm:items-center",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx($,{description:u,title:"排行榜加载失败",tone:"error"})}),e.jsx(M,{className:"shrink-0 self-start sm:self-center",onPress:()=>x(),variant:"secondary",children:"重试"})]}),u!=null&&l!=null&&e.jsxs("div",{className:"flex w-full flex-col gap-4 sm:flex-row sm:items-center",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx($,{description:`${u}。下面显示的是上次成功加载的数据,可能不是最新的。`,title:"排行榜刷新失败",tone:"warn"})}),e.jsx(M,{className:"shrink-0 self-start sm:self-center",onPress:()=>x(),variant:"secondary",children:"重试"})]}),ue&&e.jsxs("div",{className:"flex w-full flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx($,{description:"无法标注你的排名。请前往设置绑定鉴权 Token,或登录后再查看个人名次。",title:"鉴权无效或未登录",tone:"warn"})}),e.jsx(M,{className:"shrink-0 self-start sm:self-center",onPress:()=>{Se()},variant:"secondary",children:"去设置"})]}),!(u!=null&&l==null)&&e.jsx(ft,{global:(l==null?void 0:l.global)??null,hideFromLeaderboard:h,hideToggleDisabled:c,loading:g,metric:n,onHideFromLeaderboardChange:_e,onMetricChange:d,profiles:W,refreshing:v,showHideToggle:E})]})]})}const Lt=Nt;export{Lt as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,d as n}from"./index-
|
|
1
|
+
import{r as t,d as n}from"./index-DLtjtn6U.js";function e(){return t.useEffect(()=>{n()},[]),null}const s=e;export{s as component};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{t as _,an as f,j as u,aS as T,aU as O,r,bI as ce,aD as Q,b0 as de,b1 as ue,ai as fe,aJ as pe,bJ as be,b3 as $e,am as A,X as D,ay as H,_ as P,ao as X,b4 as he,b6 as me,ak as xe,al as B,bK as ve,aV as L,bL as ge,bM as ye,aF as we,bN as Pe,G as Ce,aa as Y,bO as Se,a6 as Re,bP as Ee,bQ as Te,bR as Oe,bS as Me,bT as Ne,bU as De,c as F,bt as Ie,B as je}from"./index-DLtjtn6U.js";import{u as U}from"./index-sxwOKh3b.js";const ke=_({defaultVariants:{color:"default",variant:"secondary"},slots:{base:"chip",label:"chip__label"},variants:{color:{accent:{base:"chip--accent"},danger:{base:"chip--danger"},default:{base:"chip--default"},success:{base:"chip--success"},warning:{base:"chip--warning"}},size:{lg:{base:"chip--lg"},md:{base:"chip--md"},sm:{base:"chip--sm"}},variant:{primary:{base:"chip--primary"},secondary:{base:"chip--secondary"},soft:{base:"chip--soft"},tertiary:{base:"chip--tertiary"}}}}),_e=_({defaultVariants:{size:"md"},slots:{base:"switch",content:"switch__content",control:"switch__control",icon:"switch__icon",thumb:"switch__thumb"},variants:{size:{lg:{base:"switch--lg"},md:{base:"switch--md"},sm:{base:"switch--sm"}}}}),Ae=_({slots:{base:"tooltip",trigger:"tooltip__trigger"}}),Z=r.createContext({}),z=({children:e,className:t,color:a,size:n,variant:o,...s})=>{const i=f.useMemo(()=>ke({color:a,size:n,variant:o}),[a,n,o]),d=f.useMemo(()=>typeof e=="string"||typeof e=="number"?u.jsx(ee,{children:e}):e,[e]);return u.jsx(Z,{value:{slots:i},children:u.jsx(T.span,{...s,className:O(i.base,t),"data-slot":"chip",children:d})})},ee=({children:e,className:t,...a})=>{const{slots:n}=r.use(Z);return u.jsx(T.span,{className:O(n==null?void 0:n.label,t),"data-slot":"chip-label",...a,children:e})},$t=Object.assign(z,{Root:z,Label:ee});function He(e,t,a){let{labelProps:n,inputProps:o,isSelected:s,...i}=ce(e,t,a);return{labelProps:n,inputProps:{...o,role:"switch",checked:s},isSelected:s,...i}}const Be=r.createContext(null),te=r.createContext(null),ae=r.createContext(null),Le=r.forwardRef(function(t,a){let{inputRef:n=null,...o}=t;[t,a]=Q(o,a,Be);let{validationBehavior:s}=de(ue)||{},i=t.validationBehavior??s??"native",d=fe(pe(n,t.inputRef!==void 0?t.inputRef:null)),l=be(t),c=He({...$e(t),children:typeof t.children=="function"?!0:t.children,validationBehavior:i},l,d),{descriptionProps:b,errorMessageProps:h,isSelected:m,isDisabled:$,isReadOnly:x,isInvalid:y,validationDetails:p,validationErrors:C}=c,v=A({...t,defaultClassName:"react-aria-SwitchField",values:{isSelected:m,isDisabled:$,isReadOnly:x,isInvalid:y,isRequired:t.isRequired||!1,state:l}}),w=D(t,{global:!0});return delete w.id,delete w.onClick,f.createElement(H.div,{...P(w,v),ref:a,slot:t.slot||void 0,"data-selected":m||void 0,"data-disabled":$||void 0,"data-readonly":x||void 0,"data-invalid":y||void 0,"data-required":t.isRequired||void 0},f.createElement(X,{values:[[te,l],[ae,{...c,inputRef:d,defaultClassName:"react-aria-SwitchButton",isRequired:t.isRequired}],[he,{slots:{description:b,errorMessage:h}}],[me,{isInvalid:y,validationDetails:p,validationErrors:C}]]},v.children))}),Fe=r.forwardRef(function(t,a){let{labelProps:n,inputProps:o,isSelected:s,isDisabled:i,isReadOnly:d,isPressed:l,isInvalid:c,inputRef:b,defaultClassName:h,isRequired:m}=r.useContext(ae),{isFocused:$,isFocusVisible:x,focusProps:y}=xe(),p=i||d,C=r.useContext(te),{hoverProps:v,isHovered:w}=B({...t,isDisabled:p}),q=A({...t,defaultClassName:h,values:{isSelected:s,isPressed:l,isHovered:w,isFocused:$,isFocusVisible:x,isDisabled:i,isReadOnly:d,isInvalid:c,isRequired:m||!1,state:C}}),I=D(t,{global:!0});return delete I.id,delete I.onClick,f.createElement(H.label,{...P(I,n,v,q),ref:a,slot:t.slot||void 0,"data-selected":s||void 0,"data-pressed":l||void 0,"data-hovered":w||void 0,"data-focused":$||void 0,"data-focus-visible":x||void 0,"data-disabled":i||void 0,"data-readonly":d||void 0,"data-invalid":c||void 0,"data-required":m||void 0},f.createElement(ve,{elementType:"span"},f.createElement("input",{...P(o,y),ref:b})),q.children)}),N=r.createContext({}),j=({children:e,className:t,size:a,...n})=>{const o=f.useMemo(()=>_e({size:a}),[a]);return u.jsx(Le,{"data-slot":"switch",...n,className:L(t,o.base()),children:s=>u.jsx(N,{value:{slots:o,state:s},children:typeof e=="function"?e(s):e})})};j.displayName="HeroUI.Switch";const ne=({children:e,className:t,...a})=>{const{slots:n}=r.use(N);return u.jsx(Fe,{"data-slot":"switch-content",...a,className:L(t,n==null?void 0:n.content()),children:e})};ne.displayName="HeroUI.Switch.Content";const oe=({children:e,className:t,...a})=>{const{slots:n}=r.use(N);return u.jsx(T.span,{className:O(n==null?void 0:n.control,t),"data-slot":"switch-control",...a,children:e})};oe.displayName="HeroUI.Switch.Control";const re=({children:e,className:t,...a})=>{const{slots:n}=r.use(N);return u.jsx(T.span,{className:O(n==null?void 0:n.thumb,t),"data-slot":"switch-thumb",...a,children:e})};re.displayName="HeroUI.Switch.Thumb";const se=({children:e,className:t,...a})=>{const{slots:n}=r.use(N);return u.jsx(T.span,{className:O(n==null?void 0:n.icon,t),"data-slot":"switch-icon",...a,children:e})};se.displayName="HeroUI.Switch.Icon";const ht=Object.assign(j,{Root:j,Content:ne,Control:oe,Thumb:re,Icon:se}),k=f.createContext(null);function Ve(e){let{children:t}=e,a=r.useContext(k),[n,o]=r.useState(0),s=r.useMemo(()=>({parent:a,modalCount:n,addModal(){o(i=>i+1),a&&a.addModal()},removeModal(){o(i=>i-1),a&&a.removeModal()}}),[a,n]);return f.createElement(k.Provider,{value:s},t)}function qe(){let e=r.useContext(k);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function Ue(e){let{modalProviderProps:t}=qe();return f.createElement("div",{"data-overlay-container":!0,...e,...t})}function ze(e){return f.createElement(Ve,null,f.createElement(Ue,e))}function We(e){let t=ge(),{portalContainer:a=t?null:document.body,...n}=e,{getContainer:o}=ye();if(!e.portalContainer&&o&&(a=o()),f.useEffect(()=>{if(a!=null&&a.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[a]),!a)return null;let s=f.createElement(ze,n);return we.createPortal(s,a)}const Je=1500,W=500;let S={},Ke=0,E=!1,g=null,R=null;function ie(e={}){let{delay:t=Je,closeDelay:a=W}=e,{isOpen:n,open:o,close:s}=Pe(e),[i,d]=r.useState(!1),l=r.useMemo(()=>`${++Ke}`,[]),c=r.useRef(null),b=r.useRef(s),h=()=>{S[l]=x},m=()=>{for(let p in S)p!==l&&(S[p](!0,!0),delete S[p])},$=p=>{c.current&&clearTimeout(c.current),c.current=null,m(),h(),d(!!p),E=!0,o(),g&&(clearTimeout(g),g=null),R&&(clearTimeout(R),R=null)},x=(p,C)=>{d(!!C),p||a<=0?(c.current&&clearTimeout(c.current),c.current=null,b.current()):c.current||(c.current=setTimeout(()=>{c.current=null,b.current()},a)),g&&(clearTimeout(g),g=null),E&&(R&&clearTimeout(R),R=setTimeout(()=>{delete S[l],R=null,E=!1},Math.max(W,a)))},y=()=>{m(),h(),!n&&!E?(g&&clearTimeout(g),g=setTimeout(()=>{g=null,E=!0,$(!1)},t)):n||$(!0)};return r.useEffect(()=>{b.current=s},[s]),r.useEffect(()=>()=>{c.current&&clearTimeout(c.current),S[l]&&delete S[l]},[l]),{isOpen:n,shouldSkipAnimation:i,open:p=>{!p&&t>0&&!c.current?y():$(E)},close:x}}function Ge(e,t){let a=D(e,{labelable:!0}),{hoverProps:n}=B({onHoverStart:()=>t==null?void 0:t.open(!0),onHoverEnd:()=>t==null?void 0:t.close()});return{tooltipProps:P(a,n,{role:"tooltip"})}}function Qe(e,t,a){let{isDisabled:n,trigger:o,shouldCloseOnPress:s=!0}=e,i=Ce(),d=r.useRef(!1),l=r.useRef(!1),c=()=>{(d.current||l.current)&&t.open(l.current)},b=v=>{!d.current&&!l.current&&t.close(v)};r.useEffect(()=>{let v=w=>{a&&a.current&&w.key==="Escape"&&(w.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",v,!0),()=>{document.removeEventListener("keydown",v,!0)}},[a,t]);let h=()=>{o!=="focus"&&(Se()==="pointer"?d.current=!0:d.current=!1,c())},m=()=>{o!=="focus"&&(l.current=!1,d.current=!1,b())},$=()=>{s&&(l.current=!1,d.current=!1,b(!0))},x=()=>{Re()&&(l.current=!0,c())},y=()=>{l.current=!1,d.current=!1,b(!0)},{hoverProps:p}=B({isDisabled:n,onHoverStart:h,onHoverEnd:m}),{focusableProps:C}=Y({isDisabled:n,onFocus:x,onBlur:y},a);return{triggerProps:{"aria-describedby":t.isOpen?i:void 0,...P(C,p,{onPointerDown:$,onKeyDown:$}),tabIndex:void 0},tooltipProps:{id:i}}}const M=r.createContext(null),le=r.createContext(null);function Xe(e){let t=ie(e),a=r.useRef(null),{triggerProps:n,tooltipProps:o}=Qe(e,t,a);return f.createElement(X,{values:[[M,t],[le,{...o,triggerRef:a}]]},f.createElement(Ee,{...n,ref:a},e.children))}const Ye=r.forwardRef(function({UNSTABLE_portalContainer:t,...a},n){[a,n]=Q(a,n,le);let o=r.useContext(M),s=ie(a),i=a.isOpen!=null||a.defaultOpen!=null||!o?s:o,d=Te(n,i.isOpen),l=a.isExiting||!i.shouldSkipAnimation&&d||!1;return!i.isOpen&&!l?null:f.createElement(We,{portalContainer:t},f.createElement(Ze,{...a,tooltipRef:n,isExiting:l}))});function Ze(e){let t=r.useContext(M),a=r.useRef(null),{overlayProps:n,arrowProps:o,placement:s,triggerAnchorPoint:i}=Oe({placement:e.placement||"top",targetRef:e.triggerRef,overlayRef:e.tooltipRef,arrowRef:a,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,containerPadding:e.containerPadding,onClose:()=>t.close(!0)}),d=Me(e.tooltipRef,!!s),l=e.isEntering||!t.shouldSkipAnimation&&d||!1,c=A({...e,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:l,isExiting:e.isExiting,state:t}});e=P(e,n);let{tooltipProps:b}=Ge(e,t),h=D(e,{global:!0});return f.createElement(H.div,{...P(h,c,b),ref:e.tooltipRef,style:{...n.style,"--trigger-anchor-point":i?`${i.x}px ${i.y}px`:void 0,...c.style},"data-placement":s??void 0,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},f.createElement(Ne.Provider,{value:{...o,placement:s,ref:a}},c.children))}const J=e=>{if(!e)return;const t=e.trim(),a=parseFloat(t);if(!Number.isNaN(a))return t.endsWith("ms")?a:t.endsWith("s")?a*1e3:a},V=r.createContext({}),et=({children:e,shouldSkipAnimation:t})=>{const a=r.use(M);return!a||t?e:u.jsx(M,{value:{...a,shouldSkipAnimation:!1},children:e})},K=({children:e,closeDelay:t,delay:a,shouldSkipAnimation:n=!1,...o})=>{const s=f.useMemo(()=>Ae(),[]),i=U("--tooltip-delay"),d=U("--tooltip-close-delay"),l=a??J(i),c=t??J(d);return u.jsx(V,{value:{slots:s},children:u.jsx(Xe,{closeDelay:c,"data-slot":"tooltip-root",delay:l,...o,children:u.jsx(et,{shouldSkipAnimation:n,children:e})})})},tt=({children:e,className:t,offset:a,showArrow:n=!1,...o})=>{const{slots:s}=r.use(V),i=a||(n?7:3);return u.jsx(Ye,{...o,className:L(t,s==null?void 0:s.base()),offset:i,children:e})},at=({children:e,className:t,...a})=>{const n=u.jsx("svg",{"data-slot":"overlay-arrow",fill:"none",height:"12",viewBox:"0 0 12 12",width:"12",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M0 0C5.48483 8 6.5 8 12 0Z"})}),o=f.isValidElement(e)?f.cloneElement(e,{"data-slot":"overlay-arrow"}):n;return u.jsx(De,{"data-slot":"tooltip-arrow",...a,className:t,children:o})},nt=({children:e,className:t,...a})=>{const{slots:n}=r.use(V),o=r.useRef(null),{focusableProps:s}=Y({},o);return u.jsx(T.div,{ref:o,className:O(n==null?void 0:n.trigger,t),"data-slot":"tooltip-trigger",role:"button",...P(s,a),children:e})},G=Object.assign(K,{Root:K,Trigger:nt,Content:tt,Arrow:at}),mt=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.418 2.489c.9-1.196 2.382-1.724 3.154-1.391.852.367 1.539 2.08 1.054 3.702a4 4 0 0 1-2.616 5.559c.309.471.49 1.035.49 1.641v2.25a.75.75 0 0 1-1.5 0V12a1.5 1.5 0 0 0-3 0v2.25a.75.75 0 0 1-1.5 0v-.75h-.876a2.626 2.626 0 0 1-2.625-2.625c0-.621-.504-1.125-1.125-1.125h-.125a.75.75 0 0 1 0-1.5h.125a2.625 2.625 0 0 1 2.625 2.625c0 .621.504 1.125 1.125 1.125H6.5c0-.606.18-1.17.488-1.641A4 4 0 0 1 4.373 4.8c-.484-1.623.202-3.335 1.054-3.702.772-.333 2.254.195 3.155 1.39zm2.549.02a1.4 1.4 0 0 0-.35.098 2.5 2.5 0 0 0-1 .784l-.451.598H7.834l-.45-.598a2.5 2.5 0 0 0-1.001-.784 1.4 1.4 0 0 0-.352-.099c-.063.088-.14.231-.204.429a2.5 2.5 0 0 0-.016 1.434l.163.546-.242.517c-.13.279-.21.586-.228.913l-.004.142a2.5 2.5 0 0 0 2.5 2.5h3a2.5 2.5 0 0 0 2.267-3.555l-.242-.517.163-.547a2.5 2.5 0 0 0-.016-1.433 1.6 1.6 0 0 0-.205-.429",clipRule:"evenodd"}));/**
|
|
2
|
+
* @license lucide-react v1.24.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 ot=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],rt=F("moon",ot);/**
|
|
7
|
+
* @license lucide-react v1.24.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const st=[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715",key:"xlf6rm"}],["path",{d:"M16 12a4 4 0 0 0-4-4",key:"6vsxu"}],["path",{d:"m19 5-1.256 1.256",key:"1yg6a6"}],["path",{d:"M20 12h2",key:"1q8mjw"}]],it=F("sun-moon",st);/**
|
|
12
|
+
* @license lucide-react v1.24.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const lt=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],ct=F("sun",lt),dt={system:it,light:ct,dark:rt},ut={system:"跟随系统",light:"浅色",dark:"深色"};function xt(){const{themeMode:e,toggleTheme:t}=Ie(),a=dt[e],n=ut[e];return u.jsxs(G,{closeDelay:80,delay:100,children:[u.jsx(je,{"aria-label":`切换主题:当前${n}`,className:"size-8 min-h-8 min-w-8 shrink-0 p-0",isIconOnly:!0,onPress:t,size:"sm",variant:"tertiary",children:u.jsx(a,{className:e==="system"?"size-4 scale-[1.2]":"size-4"})}),u.jsx(G.Content,{placement:"bottom",children:u.jsx("p",{children:`主题:${n}`})})]})}function vt(){return!1}function ft(e,t,a){try{const n=localStorage.getItem(e);if(n==null)return t;const o=JSON.parse(n);return a&&!a(o)?t:o}catch{return t}}function gt(e,t,a){const[n,o]=r.useState(()=>ft(e,t,a));return r.useEffect(()=>{try{localStorage.setItem(e,JSON.stringify(n))}catch{}},[e,n]),[n,o]}export{$t as C,mt as L,ht as S,G as T,xt as a,vt as i,gt as u};
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>AI Usage Dashboard</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-DLtjtn6U.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-D3jJkpMe.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juejin-opensource/jusage",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Juejin AI Usage 统计 CLI:Token 用量明细追踪,本地记录、云端同步,内置用量看板。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@juejin-opensource/jusage-core": "0.1.
|
|
37
|
+
"@juejin-opensource/jusage-core": "0.1.9"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.13.10",
|
|
41
41
|
"typescript": "^5.8.2",
|
|
42
|
-
"@juejin-opensource/jusage-dashboard": "0.1.
|
|
42
|
+
"@juejin-opensource/jusage-dashboard": "0.1.9"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=20"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,$ as bl,au as gl,a7 as $l,t as L,aX as Y,aC as T,ax as F,am as f,G as z,ac as hl,aG as xl,bU as Ee,Z as R,bV as pl,bW as vl,bX as ml,ae as J,y as Se,w as Me,bY as ge,bZ as N,av as $e,U as Q,V as yl,K as Pl,W as K,b_ as Dl,b$ as O,_ as Bl,ab as Re,ak as Ae,a5 as he,c0 as Cl,aD as we,at as El,ag as Sl,c1 as Ml,c2 as Rl,ai as H,aj as Fe,al as k,aJ as Al,an as ee,c3 as wl,aK as Fl,c4 as Ke,b1 as ke,ay as ze,c5 as Kl,ah as Le,c6 as kl,b3 as U,ar as zl,as as Ll,az as Il,aA as Vl,c7 as Tl,X as jl,c8 as Nl,af as Ol,aZ as Ul,a_ as Zl,bM as _l,O as ql,aY as Wl,a$ as Ie,b0 as Gl,b2 as Xl,aq as Ve,c9 as Yl,ca as Jl,b5 as Ql,j as B,bK as Hl,aR as Te,aT as X,aU as I,bg as ea,cb as ta,cc as xe,cd as la,ce as aa}from"./index-flWmwEjH.js";function ra(l,e){let{collection:a,onLoadMore:t,scrollOffset:r=1,direction:o="end"}=l,i=s.useRef(null),u=bl(n=>{for(let b of n)b.isIntersecting&&t&&t()});gl(()=>{if(e.current){const n=100*r,b=o==="start"?`${n}% 0px 0px 0px`:`0px ${n}% ${n}% ${n}%`;i.current=new IntersectionObserver(u,{root:$l(e==null?void 0:e.current),rootMargin:b}),i.current.observe(e.current)}return()=>{i.current&&i.current.disconnect()}},[a,e,r,o])}const oa=L({base:"label",defaultVariants:{isDisabled:!1,isInvalid:!1,isRequired:!1},variants:{isDisabled:{true:"label--disabled"},isInvalid:{true:"label--invalid"},isRequired:{true:"label--required"}}}),ia=L({base:"list-box",defaultVariants:{variant:"default"},variants:{variant:{danger:"list-box--danger",default:"list-box--default"}}}),sa=L({defaultVariants:{variant:"default"},slots:{indicator:"list-box-item__indicator",item:"list-box-item"},variants:{variant:{danger:{item:"list-box-item--danger"},default:{item:"list-box-item--default"}}}}),na=L({base:"list-box-section"}),ua=L({defaultVariants:{fullWidth:!1,variant:"primary"},slots:{base:"select",indicator:"select__indicator",popover:"select__popover",trigger:"select__trigger",value:"select__value"},variants:{fullWidth:{false:{},true:{base:"select--full-width",trigger:"select__trigger--full-width"}},variant:{primary:{base:"select--primary"},secondary:{base:"select--secondary"}}}}),ca=L({defaultVariants:{animationType:"shimmer"},slots:{base:"skeleton"},variants:{animationType:{none:"skeleton--none",pulse:"skeleton--pulse",shimmer:"skeleton--shimmer"}}}),te=s.createContext({}),da=Y(function(e,a){[e,a]=T(e,a,te);let{elementType:t="label",...r}=e,o=F[t];return f.createElement(o,{className:"react-aria-Label",...r,ref:a})});function je(l){let{id:e,label:a,"aria-labelledby":t,"aria-label":r,labelElementType:o="label"}=l;e=z(e);let i=z(),u={};a&&(t=t?`${i} ${t}`:i,u={id:i,htmlFor:o==="label"?e:void 0});let n=hl({id:e,"aria-label":r,"aria-labelledby":t});return{labelProps:u,fieldProps:n}}const fa=s.createContext(null),ar=s.createContext(null),ba=s.createContext({}),ga=s.createContext({}),ue=class ue extends xl{filter(e,a){let t=a.getItem(this.prevKey);if(t&&t.type!=="separator"){let r=this.clone();return a.addDescendants(r,e),r}return null}};ue.type="separator";let pe=ue;var Ne={};Ne={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var Oe={};Oe={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Ue={};Ue={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Ze={};Ze={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var _e={};_e={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var qe={};qe={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var We={};We={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Ge={};Ge={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Xe={};Xe={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Ye={};Ye={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Je={};Je={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Qe={};Qe={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var He={};He={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var et={};et={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var tt={};tt={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var lt={};lt={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var at={};at={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var rt={};rt={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var ot={};ot={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var it={};it={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var st={};st={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var nt={};nt={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var ut={};ut={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var ct={};ct={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var dt={};dt={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var ft={};ft={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var bt={};bt={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var gt={};gt={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var $t={};$t={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var ht={};ht={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var xt={};xt={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var pt={};pt={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var vt={};vt={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var mt={};mt={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var yt={};yt={"ar-AE":Ne,"bg-BG":Oe,"cs-CZ":Ue,"da-DK":Ze,"de-DE":_e,"el-GR":qe,"en-US":We,"es-ES":Ge,"et-EE":Xe,"fi-FI":Ye,"fr-FR":Je,"he-IL":Qe,"hr-HR":He,"hu-HU":et,"it-IT":tt,"ja-JP":lt,"ko-KR":at,"lt-LT":rt,"lv-LV":ot,"nb-NO":it,"nl-NL":st,"pl-PL":nt,"pt-BR":ut,"pt-PT":ct,"ro-RO":dt,"ru-RU":ft,"sk-SK":bt,"sl-SI":gt,"sr-SP":$t,"sv-SE":ht,"tr-TR":xt,"uk-UA":pt,"zh-CN":vt,"zh-TW":mt};function $a(l){let{onContextMenu:e}=l,a=s.useRef(!1),{longPressProps:t}=Ee({onLongPressStart(){a.current=!1},onLongPress(r){a.current?a.current=!1:e==null||e({target:r.target,x:r.x,y:r.y})}});return e?{contextMenuProps:R(pl()?t:{},{onContextMenu(r){r.stopPropagation(),r.preventDefault(),a.current=!0;let o=r.currentTarget.getBoundingClientRect();e({target:r.currentTarget,x:r.clientX-o.x,y:r.clientY-o.y})},onKeyDown(r){if(vl()&&r.ctrlKey&&r.key==="Enter"){a.current=!1;let o=r.currentTarget;r.stopPropagation(),setTimeout(()=>{if(a.current)a.current=!1;else{let i=o.getBoundingClientRect();e({target:o,x:i.width/2,y:i.height/2})}},10)}}})}:{contextMenuProps:{}}}function ha(l){return l&&l.__esModule?l.default:l}function xa(l,e,a){let{type:t="menu",isDisabled:r,trigger:o="press"}=l,i=z(),{triggerProps:u,overlayProps:n}=ml({type:t},e,a),b=(c,m,P="first")=>{if(!c||m.isDefaultPrevented())return!1;e.toggle(P)},{keyboardProps:d}=J({isDisabled:r,shortcuts:{Enter:c=>b(o!=="longPress",c,"first")," ":c=>b(o!=="longPress",c,"first"),ArrowDown:c=>b(o!=="longPress",c,"first"),ArrowUp:c=>b(o!=="longPress",c,"last"),"Alt+Enter":c=>b(o==="longPress",c,"first"),"Alt+ ":c=>b(o==="longPress",c,"first"),"Alt+ArrowDown":c=>b(!0,c,"first"),"Alt+ArrowUp":c=>b(!0,c,"last")}}),$=Se(ha(yt),"@react-aria/menu"),{longPressProps:x}=Ee({isDisabled:r||o!=="longPress",accessibilityDescription:$.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),g={preventFocusOnPress:!0,onPressStart(c){c.pointerType!=="touch"&&c.pointerType!=="keyboard"&&!r&&(ge(c.target),e.open(c.pointerType==="virtual"?"first":null))},onPress(c){c.pointerType==="touch"&&!r&&(ge(c.target),e.toggle())}};delete u.onPress;let{contextMenuProps:p}=$a({onContextMenu(c){let m=c.target.getBoundingClientRect();e.setPoint({x:m.x+c.x,y:m.y+c.y}),e.open()}});s.useEffect(()=>{if(e.isOpen&&o==="contextMenu"){let c=m=>{(m.button===2||m.button===0&&m.ctrlKey===!0)&&Me(m)===document.body&&e.close()};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)}},[e,o]);let v;if(o==="press")v={...g,...d};else if(o==="longPress")v={...x,...d};else if(o==="contextMenu"){v=p;let{"aria-haspopup":c,"aria-expanded":m,"aria-controls":P,...h}=u;u=h}return{menuTriggerProps:{...u,...v,id:i},menuProps:{...n,"aria-labelledby":i,autoFocus:e.focusStrategy||!0,onClose:e.close}}}class ve{constructor(e){this.ref=e}getItemRect(e){let a=this.ref.current;if(!a)return null;let t=e!=null?N(this.ref,e):null;if(!t)return null;let r=a.getBoundingClientRect(),o=t.getBoundingClientRect();return{x:o.left-r.left-a.clientLeft+a.scrollLeft,y:o.top-r.top-a.clientTop+a.scrollTop,width:o.width,height:o.height}}getContentSize(){let e=this.ref.current;return{width:(e==null?void 0:e.scrollWidth)??0,height:(e==null?void 0:e.scrollHeight)??0}}getVisibleRect(){let e=this.ref.current;return{x:(e==null?void 0:e.scrollLeft)??0,y:(e==null?void 0:e.scrollTop)??0,width:(e==null?void 0:e.clientWidth)??0,height:(e==null?void 0:e.clientHeight)??0}}}class le{constructor(...e){if(e.length===1){let a=e[0];this.collection=a.collection,this.ref=a.ref,this.collator=a.collator,this.disabledKeys=a.disabledKeys||new Set,this.disabledBehavior=a.disabledBehavior||"all",this.orientation=a.orientation||"vertical",this.direction=a.direction,this.layout=a.layout||"stack",this.layoutDelegate=a.layoutDelegate||new ve(a.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new ve(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}isDisabled(e){var a,t;return this.disabledBehavior==="all"&&(((a=e.props)==null?void 0:a.isDisabled)||this.disabledKeys.has(e.key))&&((t=e.props)==null?void 0:t.disabledBehavior)!=="selection"}findNextNonDisabled(e,a,t=!1){let r=e;for(;r!=null;){let o=this.collection.getItem(r);if((o==null?void 0:o.type)==="item"&&(t||!this.isDisabled(o)))return r;r=a(r)}return null}getNextKey(e,a){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,r=>this.collection.getKeyAfter(r),a==null?void 0:a.includeDisabled)}getPreviousKey(e,a){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,r=>this.collection.getKeyBefore(r),a==null?void 0:a.includeDisabled)}findKey(e,a,t){let r=e,o=this.layoutDelegate.getItemRect(r);if(!o||r==null)return null;let i=o;do{if(r=a(r),r==null)break;o=this.layoutDelegate.getItemRect(r)}while(o&&t(i,o)&&r!=null);return r}isSameRow(e,a){return e.y===a.y||e.x!==a.x}isSameColumn(e,a){return e.x===a.x||e.y!==a.y}isReversed(e){let a=this.getNextKey(e),t=N(this.ref,e);if(a!=null){let o=N(this.ref,a);return!t||!o?!1:t.getBoundingClientRect().top>o.getBoundingClientRect().top}let r=this.getPreviousKey(e);if(r!=null){let o=N(this.ref,r);return!t||!o?!1:o.getBoundingClientRect().top>t.getBoundingClientRect().top}return!1}getKeyBelow(e,a){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getNextKey(t,a),this.isSameRow):this.orientation==="vertical"?this.isReversed(e)?this.getPreviousKey(e,a):this.getNextKey(e,a):this.getNextKey(e,a)}getKeyAbove(e,a){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(e,t=>this.getPreviousKey(t,a),this.isSameRow):this.orientation==="vertical"?this.isReversed(e)?this.getNextKey(e,a):this.getPreviousKey(e,a):this.getPreviousKey(e,a)}getNextColumn(e,a,t){return a?this.getPreviousKey(e,t):this.getNextKey(e,t)}getKeyRightOf(e,a){let t=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[t](r),a==null?void 0:a.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="rtl",a):this.findKey(e,r=>this.getNextColumn(r,this.direction==="rtl",a),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="rtl",a):null}getKeyLeftOf(e,a){let t=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,r=>this.layoutDelegate[t](r),a==null?void 0:a.includeDisabled)):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(e,this.direction==="ltr",a):this.findKey(e,r=>this.getNextColumn(r,this.direction==="ltr",a),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(e,this.direction==="ltr",a):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,a=>this.collection.getKeyAfter(a))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,a=>this.collection.getKeyBefore(a))}getKeyPageAbove(e){let a=this.ref.current,t=this.layoutDelegate.getItemRect(e);if(!t)return null;let r=this.isReversed(e);if(a&&!$e(a))return this.getFirstKey();let o=e;if(this.orientation==="horizontal"){let i=Math.max(0,t.x+t.width-this.layoutDelegate.getVisibleRect().width);for(;t&&t.x>i&&o!=null;)o=this.getKeyAbove(o),t=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=this.layoutDelegate.getVisibleRect(),u=r?t.y-i.height:Math.max(0,t.y+t.height-i.height);for(;t&&t.y>u&&o!=null;)o=this.getKeyAbove(o),t=o==null?null:this.layoutDelegate.getItemRect(o)}return o??(r?this.getLastKey():this.getFirstKey())}getKeyPageBelow(e){let a=this.ref.current,t=this.layoutDelegate.getItemRect(e);if(!t)return null;let r=this.isReversed(e);if(a&&!$e(a))return this.getLastKey();let o=e;if(this.orientation==="horizontal"){let i=Math.min(this.layoutDelegate.getContentSize().width,t.x-t.width+this.layoutDelegate.getVisibleRect().width);for(;t&&t.x<i&&o!=null;)o=this.getKeyBelow(o),t=o==null?null:this.layoutDelegate.getItemRect(o)}else{let i=Math.min(this.layoutDelegate.getContentSize().height,t.y-t.height+this.layoutDelegate.getVisibleRect().height);for(;t&&t.y<i&&o!=null;)o=this.getKeyBelow(o),t=o==null?null:this.layoutDelegate.getItemRect(o)}return o??(r?this.getFirstKey():this.getLastKey())}getKeyForSearch(e,a){if(!this.collator)return null;let t=this.collection,r=a||this.getFirstKey();for(;r!=null;){let o=t.getItem(r);if(!o)return null;let i=o.textValue.slice(0,e.length);if(o.textValue&&this.collator.compare(i,e)===0)return r;r=this.getNextKey(r)}return null}}let W=new Map;function ae(l){let{locale:e}=Q(),a=e+(l?Object.entries(l).sort((r,o)=>r[0]<o[0]?-1:1).join():"");if(W.has(a))return W.get(a);let t=new Intl.Collator(e,l);return W.set(a,t),t}function pa(l){let{selectionManager:e,collection:a,disabledKeys:t,ref:r,keyboardDelegate:o,layoutDelegate:i,orientation:u}=l,n=ae({usage:"search",sensitivity:"base"}),b=e.disabledBehavior,d=s.useMemo(()=>o||new le({collection:a,disabledKeys:t,disabledBehavior:b,ref:r,collator:n,layoutDelegate:i,orientation:u}),[o,i,a,t,r,n,b,u]),{collectionProps:$}=yl({...l,ref:r,selectionManager:e,keyboardDelegate:d});return{listProps:$}}const me=new WeakMap;function va(l){let e=me.get(l);if(e!=null)return e;let a=0,t=r=>{for(let o of r)o.type==="section"?t(Pl(o,l)):o.type==="item"&&a++};return t(l),me.set(l,a),a}var Pt={};Pt={colorSwatchPicker:"تغييرات الألوان",dropzoneLabel:"DropZone",selectPlaceholder:"حدد عنصرًا",tableResizer:"أداة تغيير الحجم"};var Dt={};Dt={colorSwatchPicker:"Цветови мостри",dropzoneLabel:"DropZone",selectPlaceholder:"Изберете предмет",tableResizer:"Преоразмерител"};var Bt={};Bt={colorSwatchPicker:"Vzorky barev",dropzoneLabel:"Místo pro přetažení",selectPlaceholder:"Vyberte položku",tableResizer:"Změna velikosti"};var Ct={};Ct={colorSwatchPicker:"Farveprøver",dropzoneLabel:"DropZone",selectPlaceholder:"Vælg et element",tableResizer:"Størrelsesændring"};var Et={};Et={colorSwatchPicker:"Farbfelder",dropzoneLabel:"Ablegebereich",selectPlaceholder:"Element wählen",tableResizer:"Größenanpassung"};var St={};St={colorSwatchPicker:"Χρωματικά δείγματα",dropzoneLabel:"DropZone",selectPlaceholder:"Επιλέξτε ένα αντικείμενο",tableResizer:"Αλλαγή μεγέθους"};var Mt={};Mt={selectPlaceholder:"Select an item",tableResizer:"Resizer",dropzoneLabel:"DropZone",colorSwatchPicker:"Color swatches"};var Rt={};Rt={colorSwatchPicker:"Muestras de colores",dropzoneLabel:"DropZone",selectPlaceholder:"Seleccionar un artículo",tableResizer:"Cambiador de tamaño"};var At={};At={colorSwatchPicker:"Värvinäidised",dropzoneLabel:"DropZone",selectPlaceholder:"Valige üksus",tableResizer:"Suuruse muutja"};var wt={};wt={colorSwatchPicker:"Värimallit",dropzoneLabel:"DropZone",selectPlaceholder:"Valitse kohde",tableResizer:"Koon muuttaja"};var Ft={};Ft={colorSwatchPicker:"Échantillons de couleurs",dropzoneLabel:"DropZone",selectPlaceholder:"Sélectionner un élément",tableResizer:"Redimensionneur"};var Kt={};Kt={colorSwatchPicker:"דוגמיות צבע",dropzoneLabel:"DropZone",selectPlaceholder:"בחר פריט",tableResizer:"שינוי גודל"};var kt={};kt={colorSwatchPicker:"Uzorci boja",dropzoneLabel:"Zona spuštanja",selectPlaceholder:"Odaberite stavku",tableResizer:"Promjena veličine"};var zt={};zt={colorSwatchPicker:"Színtárak",dropzoneLabel:"DropZone",selectPlaceholder:"Válasszon ki egy elemet",tableResizer:"Átméretező"};var Lt={};Lt={colorSwatchPicker:"Campioni di colore",dropzoneLabel:"Zona di rilascio",selectPlaceholder:"Seleziona un elemento",tableResizer:"Ridimensionamento"};var It={};It={colorSwatchPicker:"カラースウォッチ",dropzoneLabel:"ドロップゾーン",selectPlaceholder:"項目を選択",tableResizer:"サイズ変更ツール"};var Vt={};Vt={colorSwatchPicker:"색상 견본",dropzoneLabel:"드롭 영역",selectPlaceholder:"항목 선택",tableResizer:"크기 조정기"};var Tt={};Tt={colorSwatchPicker:"Spalvų pavyzdžiai",dropzoneLabel:"„DropZone“",selectPlaceholder:"Pasirinkite elementą",tableResizer:"Dydžio keitiklis"};var jt={};jt={colorSwatchPicker:"Krāsu paraugi",dropzoneLabel:"DropZone",selectPlaceholder:"Izvēlēties vienumu",tableResizer:"Izmēra mainītājs"};var Nt={};Nt={colorSwatchPicker:"Fargekart",dropzoneLabel:"Droppsone",selectPlaceholder:"Velg et element",tableResizer:"Størrelsesendrer"};var Ot={};Ot={colorSwatchPicker:"kleurstalen",dropzoneLabel:"DropZone",selectPlaceholder:"Selecteer een item",tableResizer:"Resizer"};var Ut={};Ut={colorSwatchPicker:"Próbki kolorów",dropzoneLabel:"Strefa upuszczania",selectPlaceholder:"Wybierz element",tableResizer:"Zmiana rozmiaru"};var Zt={};Zt={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var _t={};_t={colorSwatchPicker:"Amostras de cores",dropzoneLabel:"DropZone",selectPlaceholder:"Selecione um item",tableResizer:"Redimensionador"};var qt={};qt={colorSwatchPicker:"Specimene de culoare",dropzoneLabel:"Zonă de plasare",selectPlaceholder:"Selectați un element",tableResizer:"Instrument de redimensionare"};var Wt={};Wt={colorSwatchPicker:"Цветовые образцы",dropzoneLabel:"DropZone",selectPlaceholder:"Выберите элемент",tableResizer:"Средство изменения размера"};var Gt={};Gt={colorSwatchPicker:"Vzorkovníky farieb",dropzoneLabel:"DropZone",selectPlaceholder:"Vyberte položku",tableResizer:"Nástroj na zmenu veľkosti"};var Xt={};Xt={colorSwatchPicker:"Barvne palete",dropzoneLabel:"DropZone",selectPlaceholder:"Izberite element",tableResizer:"Spreminjanje velikosti"};var Yt={};Yt={colorSwatchPicker:"Uzorci boje",dropzoneLabel:"DropZone",selectPlaceholder:"Izaberite stavku",tableResizer:"Promena veličine"};var Jt={};Jt={colorSwatchPicker:"Färgrutor",dropzoneLabel:"DropZone",selectPlaceholder:"Välj en artikel",tableResizer:"Storleksändrare"};var Qt={};Qt={colorSwatchPicker:"Renk örnekleri",dropzoneLabel:"Bırakma Bölgesi",selectPlaceholder:"Bir öğe seçin",tableResizer:"Yeniden boyutlandırıcı"};var Ht={};Ht={colorSwatchPicker:"Зразки кольорів",dropzoneLabel:"DropZone",selectPlaceholder:"Виберіть елемент",tableResizer:"Засіб змінення розміру"};var el={};el={colorSwatchPicker:"颜色色板",dropzoneLabel:"放置区域",selectPlaceholder:"选择一个项目",tableResizer:"尺寸调整器"};var tl={};tl={colorSwatchPicker:"色票",dropzoneLabel:"放置區",selectPlaceholder:"選取項目",tableResizer:"大小調整器"};var ll={};ll={"ar-AE":Pt,"bg-BG":Dt,"cs-CZ":Bt,"da-DK":Ct,"de-DE":Et,"el-GR":St,"en-US":Mt,"es-ES":Rt,"et-EE":At,"fi-FI":wt,"fr-FR":Ft,"he-IL":Kt,"hr-HR":kt,"hu-HU":zt,"it-IT":Lt,"ja-JP":It,"ko-KR":Vt,"lt-LT":Tt,"lv-LV":jt,"nb-NO":Nt,"nl-NL":Ot,"pl-PL":Ut,"pt-BR":Zt,"pt-PT":_t,"ro-RO":qt,"ru-RU":Wt,"sk-SK":Gt,"sl-SI":Xt,"sr-SP":Yt,"sv-SE":Jt,"tr-TR":Qt,"uk-UA":Ht,"zh-CN":el,"zh-TW":tl};const Z=s.createContext({}),al=s.createContext(null),ma=s.forwardRef(function(e,a){let{render:t}=s.useContext(al);return f.createElement(f.Fragment,null,t(e,a))});function rl(l,e){var o;let a=l==null?void 0:l.renderDropIndicator,t=(o=l==null?void 0:l.isVirtualDragging)==null?void 0:o.call(l),r=s.useCallback(i=>{if(t||e!=null&&e.isDropTarget(i))return a?a(i):f.createElement(ma,{target:i})},[e==null?void 0:e.target,t,a]);return l!=null&&l.useDropIndicator?r:void 0}function ya(l,e,a){var o,i,u;let t=l.focusedKey,r=null;if((o=e==null?void 0:e.isVirtualDragging)!=null&&o.call(e)&&((i=a==null?void 0:a.target)==null?void 0:i.type)==="item"&&(r=a.target.key,a.target.dropPosition==="after")){let n=a.collection.getKeyAfter(r),b=null;if(n!=null){let d=((u=a.collection.getItem(r))==null?void 0:u.level)??0;for(;n!=null;){let $=a.collection.getItem(n);if(!$)break;if($.type!=="item"){n=a.collection.getKeyAfter(n);continue}if(($.level??0)<=d)break;b=n,n=a.collection.getKeyAfter(n)}}r=n??b??r}return s.useMemo(()=>new Set([t,r].filter(n=>n!=null)),[t,r])}const re=new WeakMap;function Pa(l){return typeof l=="string"?l.replace(/\s*/g,""):""+l}function Da(l,e){let a=re.get(l);if(!a)throw new Error("Unknown list");return`${a.id}-option-${Pa(e)}`}function Ba(l,e,a){let t=K(l,{labelable:!0}),r=l.selectionBehavior||"toggle",o=l.orientation||"vertical",i=l.linkBehavior||(r==="replace"?"action":"override");r==="toggle"&&i==="action"&&(i="override");let{listProps:u}=pa({...l,ref:a,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,linkBehavior:i}),{focusWithinProps:n}=Dl({onFocusWithin:l.onFocus,onBlurWithin:l.onBlur,onFocusWithinChange:l.onFocusChange}),b=z(l.id);re.set(e,{id:b,shouldUseVirtualFocus:l.shouldUseVirtualFocus,shouldSelectOnPressUp:l.shouldSelectOnPressUp,shouldFocusOnHover:l.shouldFocusOnHover,isVirtualized:l.isVirtualized,onAction:l.onAction,linkBehavior:i,UNSTABLE_itemBehavior:l.UNSTABLE_itemBehavior});let{labelProps:d,fieldProps:$}=je({...l,id:b,labelElementType:"span"});return{labelProps:d,listBoxProps:R(t,n,e.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox","aria-orientation":o,...R($,u)})}}function Ca(l,e,a){var y,A;let{key:t}=l,r=re.get(e),o=l.isDisabled??e.selectionManager.isDisabled(t),i=l.isSelected??e.selectionManager.isSelected(t),u=l.shouldSelectOnPressUp??(r==null?void 0:r.shouldSelectOnPressUp),n=l.shouldFocusOnHover??(r==null?void 0:r.shouldFocusOnHover),b=l.shouldUseVirtualFocus??(r==null?void 0:r.shouldUseVirtualFocus),d=l.isVirtualized??(r==null?void 0:r.isVirtualized),$=O(),x=O(),g={role:"option","aria-disabled":o||void 0,"aria-selected":e.selectionManager.selectionMode!=="none"?i:void 0,"aria-label":l["aria-label"],"aria-labelledby":$,"aria-describedby":x},p=e.collection.getItem(t);if(d){let S=Number(p==null?void 0:p.index);g["aria-posinset"]=Number.isNaN(S)?void 0:S+1,g["aria-setsize"]=va(e.collection)}let v=r!=null&&r.onAction?()=>{var S;return(S=r==null?void 0:r.onAction)==null?void 0:S.call(r,t)}:void 0,c=Da(e,t),{itemProps:m,isPressed:P,isFocused:h,hasAction:E,allowsSelection:C}=Bl({selectionManager:e.selectionManager,key:t,ref:a,shouldSelectOnPressUp:u,allowsDifferentPressOrigin:u&&n,isVirtualized:d,shouldUseVirtualFocus:b,isDisabled:o,onAction:v||(y=p==null?void 0:p.props)!=null&&y.onAction?Re((A=p==null?void 0:p.props)==null?void 0:A.onAction,v):void 0,linkBehavior:r==null?void 0:r.linkBehavior,UNSTABLE_itemBehavior:r==null?void 0:r.UNSTABLE_itemBehavior,id:c}),{hoverProps:M}=Ae({isDisabled:o||!n,onHoverStart(){he()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(t))}}),D=K(p==null?void 0:p.props);delete D.id;let w=Cl(p==null?void 0:p.props);return{optionProps:{...g,...R(D,m,M,w),id:c},labelProps:{id:$},descriptionProps:{id:x},isFocused:h,isFocusVisible:h&&e.selectionManager.isFocused&&he(),isSelected:i,isDisabled:o,isPressed:P,allowsSelection:C,hasAction:E}}function Ea(l){let{heading:e,"aria-label":a}=l,t=z();return{itemProps:{role:"presentation"},headingProps:e?{id:t,role:"presentation",onMouseDown:r=>{r.preventDefault()}}:{},groupProps:{role:"group","aria-label":a,"aria-labelledby":e?t:void 0}}}const oe=s.createContext(null),V=s.createContext(null),Sa=s.forwardRef(function(e,a){[e,a]=T(e,a,oe);let t=s.useContext(V);return t?f.createElement(ol,{state:t,props:e,listBoxRef:a}):f.createElement(we,{content:f.createElement(El,e)},r=>f.createElement(Ma,{props:e,listBoxRef:a,collection:r}))});function Ma({props:l,listBoxRef:e,collection:a}){l={...l,collection:a,children:null,items:null};let{layoutDelegate:t}=s.useContext(H),r=Ke({...l,layoutDelegate:t});return f.createElement(ol,{state:r,props:l,listBoxRef:e})}function ol({state:l,props:e,listBoxRef:a}){[e,a]=T(e,a,fa);let{dragAndDropHooks:t,layout:r="stack",orientation:o="vertical",filter:i}=e,u=Rl(l,i),{collection:n,selectionManager:b}=u,d=!!(t!=null&&t.useDraggableCollectionState),$=!!(t!=null&&t.useDroppableCollectionState),{direction:x}=Q(),{disabledBehavior:g,disabledKeys:p}=b,v=ae({usage:"search",sensitivity:"base"}),{isVirtualized:c,layoutDelegate:m,dropTargetDelegate:P,CollectionRoot:h}=s.useContext(H),E=s.useMemo(()=>e.keyboardDelegate||new le({collection:n,collator:v,ref:a,disabledKeys:p,disabledBehavior:g,layout:r,orientation:o,direction:x,layoutDelegate:m}),[n,v,a,g,p,o,x,e.keyboardDelegate,r,m]),{listBoxProps:C}=Ba({...e,shouldSelectOnPressUp:d||e.shouldSelectOnPressUp,keyboardDelegate:E,isVirtualized:c},u,a);s.useRef(d),s.useRef($),s.useEffect(()=>{},[d,$]);let M,D,w,y=!1,A=null,S=s.useRef(null);if(d&&t){M=t.useDraggableCollectionState({collection:n,selectionManager:b,preview:t.renderDragPreview?S:void 0}),t.useDraggableCollection({},M,a);let q=t.DragPreview;A=t.renderDragPreview?f.createElement(q,{ref:S},t.renderDragPreview):null}if($&&t){D=t.useDroppableCollectionState({collection:n,selectionManager:b});let q=t.dropTargetDelegate||P||new t.ListDropTargetDelegate(n,a,{orientation:o,layout:r,direction:x});w=t.useDroppableCollection({keyboardDelegate:E,dropTargetDelegate:q},D,a),y=D.isDropTarget({type:"root"})}let{focusProps:cl,isFocused:ce,isFocusVisible:de}=Fe(),_=u.collection.size===0,fe={isDropTarget:y,isEmpty:_,isFocused:ce,isFocusVisible:de,layout:e.layout||"stack",orientation:o,state:u},dl=k({...e,children:void 0,defaultClassName:"react-aria-ListBox",values:fe}),be=null;_&&e.renderEmptyState&&(be=f.createElement("div",{role:"option",style:{display:"contents"}},e.renderEmptyState(fe)));let fl=K(e,{global:!0});return f.createElement(Al,null,f.createElement(F.div,{...R(fl,dl,C,cl,w==null?void 0:w.collectionProps),ref:a,slot:e.slot||void 0,onScroll:e.onScroll,"data-drop-target":y||void 0,"data-empty":_||void 0,"data-focused":ce||void 0,"data-focus-visible":de||void 0,"data-layout":e.layout||"stack","data-orientation":o},f.createElement(ee,{values:[[oe,e],[V,u],[Z,{dragAndDropHooks:t,dragState:M,dropState:D}],[ga,{elementType:"div"}],[al,{render:wa}],[wl,{name:"ListBoxSection",render:il}]]},f.createElement(Fl,null,f.createElement(h,{collection:n,scrollRef:a,persistedKeys:ya(b,t,D),renderDropIndicator:rl(t,D)}))),be,A))}function il(l,e,a,t="react-aria-ListBoxSection"){let r=s.useContext(V),{dragAndDropHooks:o,dropState:i}=s.useContext(Z),{CollectionBranch:u}=s.useContext(H),[n,b]=ke(),{headingProps:d,groupProps:$}=Ea({heading:b,"aria-label":l["aria-label"]??void 0}),x=k({...l,id:void 0,children:void 0,defaultClassName:t,values:void 0}),g=K(l,{global:!0});return delete g.id,f.createElement(F.section,{...R(g,x,$),ref:e},f.createElement(ba.Provider,{value:{...d,ref:n}},f.createElement(u,{collection:r.collection,parent:a,renderDropIndicator:rl(o,i)})))}const Ra=Sl(Ml,il),Aa=ze(Kl,function(e,a,t){let r=Le(a),o=s.useContext(V),{dragAndDropHooks:i,dragState:u,dropState:n}=s.useContext(Z),b=u&&!(u.isDisabled||u.selectionManager.isDisabled(t.key)),{optionProps:d,labelProps:$,descriptionProps:x,...g}=Ca({key:t.key,"aria-label":e==null?void 0:e["aria-label"]},o,r),{hoverProps:p,isHovered:v}=Ae({isDisabled:!g.allowsSelection&&!g.hasAction&&!b,onHoverStart:t.props.onHoverStart,onHoverChange:t.props.onHoverChange,onHoverEnd:t.props.onHoverEnd}),{keyboardProps:c}=J(e),{focusProps:m}=kl(e),P=null;u&&i&&(P=i.useDraggableItem({key:t.key,hasAction:g.hasAction},u));let h=null;n&&i&&(h=i.useDroppableItem({target:{type:"item",key:t.key,dropPosition:"on"}},n,r));let E=u&&u.isDragging(t.key),C=k({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...g,isHovered:v,selectionMode:o.selectionManager.selectionMode,selectionBehavior:o.selectionManager.selectionBehavior,allowsDragging:!!u,isDragging:E,isDropTarget:h==null?void 0:h.isDropTarget}});s.useEffect(()=>{t.textValue},[t.textValue]);let M=e.href?F.a:F.div,D=K(e,{global:!0});return delete D.id,delete D.onClick,e.href&&d.tabIndex==null&&(d.tabIndex=-1),f.createElement(M,{...R(D,C,d,p,c,m,P==null?void 0:P.dragProps,h==null?void 0:h.dropProps),ref:r,"data-allows-dragging":!!u||void 0,"data-selected":g.isSelected||void 0,"data-disabled":g.isDisabled||void 0,"data-hovered":v||void 0,"data-focused":g.isFocused||void 0,"data-focus-visible":g.isFocusVisible||void 0,"data-pressed":g.isPressed||void 0,"data-dragging":E||void 0,"data-drop-target":(h==null?void 0:h.isDropTarget)||void 0,"data-selection-mode":o.selectionManager.selectionMode==="none"?void 0:o.selectionManager.selectionMode},f.createElement(ee,{values:[[U,{slots:{[Ll]:$,label:$,description:x}}],[zl,{isSelected:g.isSelected}]]},C.children))});function wa(l,e){e=Le(e);let{dragAndDropHooks:a,dropState:t}=s.useContext(Z),{dropIndicatorProps:r,isHidden:o,isDropTarget:i}=a.useDropIndicator(l,t,e);return o?null:f.createElement(Ka,{...l,dropIndicatorProps:r,isDropTarget:i,ref:e})}function Fa(l,e){let{dropIndicatorProps:a,isDropTarget:t,...r}=l,o=k({...r,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:t}});return f.createElement(f.Fragment,null,f.createElement(F.div,{...a,...o,role:"option",ref:e,"data-drop-target":t||void 0}))}const Ka=s.forwardRef(Fa);ze(Il,function(e,a,t){let r=s.useContext(V),{isLoading:o,onLoadMore:i,scrollOffset:u,...n}=e,b=s.useRef(null),d=s.useMemo(()=>({onLoadMore:i,collection:r==null?void 0:r.collection,sentinelRef:b,scrollOffset:u}),[i,u,r==null?void 0:r.collection]);ra(d,b);let $=k({...n,id:void 0,children:t.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),x={tabIndex:-1};return f.createElement(f.Fragment,null,f.createElement("div",{style:{position:"relative",width:0,height:0},inert:Vl(!0)},f.createElement("div",{"data-testid":"loadMoreSentinel",ref:b,style:{position:"absolute",height:1,width:1}})),o&&$.children&&f.createElement(f.Fragment,null,f.createElement(F.div,{...R(K(e,{global:!0}),x),...$,role:"option",ref:a},$.children)))});function ka(l){let{description:e,errorMessage:a,isInvalid:t,validationState:r}=l,{labelProps:o,fieldProps:i}=je(l),u=O([!!e,!!a,t,r]),n=O([!!e,!!a,t,r]);return i=R(i,{"aria-describedby":[u,n,l["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:o,fieldProps:i,descriptionProps:{id:u},errorMessageProps:{id:n}}}const ie=new WeakMap;function za(l,e,a){let{keyboardDelegate:t,isDisabled:r,isRequired:o,name:i,form:u,validationBehavior:n="aria"}=l,b=ae({usage:"search",sensitivity:"base"}),d=s.useMemo(()=>t||new le(e.collection,e.disabledKeys,a,b),[t,e.collection,e.disabledKeys,b,a]),{menuTriggerProps:$,menuProps:x}=xa({isDisabled:r,type:"listbox"},e,a),{keyboardProps:g}=J({shortcuts:{ArrowLeft:()=>{var A,S;if(e.selectionManager.selectionMode==="multiple")return!1;let y=e.selectedKey!=null?(A=d.getKeyAbove)==null?void 0:A.call(d,e.selectedKey):(S=d.getFirstKey)==null?void 0:S.call(d);y!=null&&e.setSelectedKey(y)},ArrowRight:()=>{var A,S;if(e.selectionManager.selectionMode==="multiple")return!1;let y=e.selectedKey!=null?(A=d.getKeyBelow)==null?void 0:A.call(d,e.selectedKey):(S=d.getFirstKey)==null?void 0:S.call(d);y!=null&&e.setSelectedKey(y)}},allowRepeats:!0,onKeyDown:l.onKeyDown,onKeyUp:l.onKeyUp}),{typeSelectProps:p}=Tl({keyboardDelegate:d,selectionManager:e.selectionManager,onTypeSelect(y){e.setSelectedKey(y)}}),{isInvalid:v,validationErrors:c,validationDetails:m}=e.displayValidation,{labelProps:P,fieldProps:h,descriptionProps:E,errorMessageProps:C}=ka({...l,labelElementType:"span",isInvalid:v,errorMessage:l.errorMessage||c});e.selectionManager.selectionMode==="multiple"&&(p={});let M=K(l,{labelable:!0}),D=R(p,$,h),w=z();return ie.set(e,{isDisabled:r,isRequired:o,name:i,form:u,validationBehavior:n}),{labelProps:{...P,onClick:()=>{var y;l.isDisabled||((y=a.current)==null||y.focus(),Nl("keyboard"))}},triggerProps:R(M,{...D,isDisabled:r,onKeyDown:Re(D.onKeyDown,g.onKeyDown),onKeyUp:g.onKeyUp,"aria-labelledby":[w,D["aria-labelledby"],D["aria-label"]&&!D["aria-labelledby"]?D.id:null].filter(Boolean).join(" "),onFocus(y){e.isFocused||(l.onFocus&&l.onFocus(y),l.onFocusChange&&l.onFocusChange(!0),e.setFocused(!0))},onBlur(y){e.isOpen||(l.onBlur&&l.onBlur(y),l.onFocusChange&&l.onFocusChange(!1),e.setFocused(!1))}}),valueProps:{id:w},menuProps:{...x,onAction:void 0,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:y=>{jl(y.currentTarget,y.relatedTarget)||(l.onBlur&&l.onBlur(y),l.onFocusChange&&l.onFocusChange(!1),e.setFocused(!1))},"aria-labelledby":[h["aria-labelledby"],D["aria-label"]&&!h["aria-labelledby"]?D.id:null].filter(Boolean).join(" ")},descriptionProps:E,errorMessageProps:C,isInvalid:v,validationErrors:c,validationDetails:m,hiddenSelectProps:{isDisabled:r,name:i,label:l.label,state:e,triggerRef:a,form:u}}}function La(l,e,a){let t=ie.get(e)||{},{autoComplete:r,name:o=t.name,form:i=t.form,isDisabled:u=t.isDisabled}=l,{validationBehavior:n,isRequired:b}=t,{visuallyHiddenProps:d}=Ol({style:{position:"fixed",top:0,left:0}});Ul(l.selectRef,e.defaultValue,e.setValue),Zl({validationBehavior:n,focus:()=>{var g;return(g=a.current)==null?void 0:g.focus()}},e,l.selectRef);let $=e.setValue,x=s.useCallback(g=>{let p=Me(g);p.multiple?$(Array.from(p.selectedOptions,v=>v.value)):$(g.currentTarget.value)},[$]);return{containerProps:{...d,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:r,disabled:u,multiple:e.selectionManager.selectionMode==="multiple",required:n==="native"&&b,name:o,form:i,value:e.value??"",onChange:x,onInput:x}}}function Ia(l){let{state:e,triggerRef:a,label:t,name:r,form:o,isDisabled:i}=l,u=s.useRef(null),n=s.useRef(null),{containerProps:b,selectProps:d}=La({...l,selectRef:e.collection.size<=300?u:n},e,a),$=Array.isArray(e.value)?e.value:[e.value];if(e.collection.size<=300)return f.createElement("div",{...b,"data-testid":"hidden-select-container"},f.createElement("label",null,t,f.createElement("select",{...d,ref:u},f.createElement("option",{value:"",label:" "}," "),[...e.collection.getKeys()].map(x=>{let g=e.collection.getItem(x);if(g&&g.type==="item")return f.createElement("option",{key:g.key,value:g.key},g.textValue)}),e.collection.size===0&&r&&$.map((x,g)=>f.createElement("option",{key:g,value:x??""})))));if(r){let x=ie.get(e)||{},{validationBehavior:g}=x;$.length===0&&($=[null]);let p=$.map((v,c)=>{let m={type:"hidden",autoComplete:d.autoComplete,name:r,form:o,disabled:i,value:v??""};return g==="native"?f.createElement("input",{key:c,...m,ref:c===0?n:null,style:{display:"none"},type:"text",required:c===0?d.required:!1,onChange:()=>{}}):f.createElement("input",{key:c,...m,ref:c===0?n:null})});return f.createElement(f.Fragment,null,p)}return null}function Va(l){let{selectionMode:e="single",shouldCloseOnSelect:a=e==="single"}=l,t=_l(l),[r,o]=s.useState(null),i=s.useMemo(()=>l.defaultValue!==void 0?l.defaultValue:e==="single"?l.defaultSelectedKey??null:[],[l.defaultValue,l.defaultSelectedKey,e]),u=s.useMemo(()=>l.value!==void 0?l.value:e==="single"?l.selectedKey:void 0,[l.value,l.selectedKey,e]),[n,b]=ql(u,i,l.onChange),d=e==="single"&&Array.isArray(n)?n[0]:n,$=h=>{var E;if(e==="single"){let C=Array.isArray(h)?h[0]??null:h;b(C),C!==d&&((E=l.onSelectionChange)==null||E.call(l,C))}else{let C=[];Array.isArray(h)?C=h:h!=null&&(C=[h]),b(C)}},x=Ke({...l,selectionMode:e,disallowEmptySelection:e==="single",allowDuplicateSelectionEvents:!0,selectedKeys:s.useMemo(()=>Ta(d),[d]),onSelectionChange:h=>{if(h!=="all"){if(e==="single"){let E=h.values().next().value??null;$(E)}else $([...h]);a&&t.close(),v.commitValidation()}}}),g=x.selectionManager.firstSelectedKey,p=s.useMemo(()=>[...x.selectionManager.selectedKeys].map(h=>x.collection.getItem(h)).filter(h=>h!=null),[x.selectionManager.selectedKeys,x.collection]),v=Wl({...l,value:Array.isArray(d)&&d.length===0?null:d}),[c,m]=s.useState(!1),[P]=s.useState(d);return{...v,...x,...t,value:d,defaultValue:i??P,setValue:$,selectedKey:g,setSelectedKey:$,selectedItem:p[0]??null,selectedItems:p,defaultSelectedKey:l.defaultSelectedKey??(l.selectionMode==="single"?P:null),focusStrategy:r,open(h=null){(x.collection.size!==0||l.allowsEmptyCollection)&&(o(h),t.open())},toggle(h=null){(x.collection.size!==0||l.allowsEmptyCollection)&&(o(h),t.toggle())},isFocused:c,setFocused:m}}function Ta(l){if(l!==void 0)return l===null?[]:Array.isArray(l)?l:[l]}function ja(l={}){let{locale:e}=Q();return s.useMemo(()=>new Intl.ListFormat(e,l),[e,l])}function Na(l){return l&&l.__esModule?l.default:l}const se=s.createContext(null),ne=s.createContext(null),Oa=Y(function(e,a){[e,a]=T(e,a,se);let{children:t,isDisabled:r=!1,isInvalid:o=!1,isRequired:i=!1}=e,u=s.useMemo(()=>typeof t=="function"?t({isOpen:!1,isDisabled:r,isInvalid:o,isRequired:i,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):t,[t,r,o,i]);return f.createElement(we,{content:u},n=>f.createElement(Za,{props:e,collection:n,selectRef:a}))}),Ua=[te,Ve,U];function Za({props:l,selectRef:e,collection:a}){let{validationBehavior:t}=Ie(Gl)||{},r=l.validationBehavior??t??"native",o=Va({...l,collection:a,children:void 0,validationBehavior:r}),{isFocusVisible:i,focusProps:u}=Fe({within:!0}),n=s.useRef(null),[b,d]=ke(!l["aria-label"]&&!l["aria-labelledby"]),{labelProps:$,triggerProps:x,valueProps:g,menuProps:p,descriptionProps:v,errorMessageProps:c,hiddenSelectProps:m,...P}=za({...Xl(l),label:d,validationBehavior:r},o,n),h=s.useMemo(()=>({isOpen:o.isOpen,isFocused:o.isFocused,isFocusVisible:i,isDisabled:l.isDisabled||!1,isInvalid:P.isInvalid||!1,isRequired:l.isRequired||!1}),[o.isOpen,o.isFocused,i,l.isDisabled,P.isInvalid,l.isRequired]),E=k({...l,values:h,defaultClassName:"react-aria-Select"}),C=K(l,{global:!0});delete C.id;let M=s.useRef(null);return f.createElement(ee,{values:[[se,l],[ne,o],[sl,g],[te,{...$,ref:b,elementType:"span"}],[Ve,{...x,ref:n,isPressed:o.isOpen,autoFocus:l.autoFocus}],[Yl,o],[Jl,{trigger:"Select",triggerRef:n,scrollRef:M,placement:"bottom start","aria-labelledby":p["aria-labelledby"],clearContexts:Ua}],[oe,{...p,ref:M}],[V,o],[U,{slots:{description:v,errorMessage:c}}],[Ql,P]]},f.createElement(F.div,{...R(C,E,u),ref:e,slot:l.slot||void 0,"data-focused":o.isFocused||void 0,"data-focus-visible":i||void 0,"data-open":o.isOpen||void 0,"data-disabled":l.isDisabled||void 0,"data-invalid":P.isInvalid||void 0,"data-required":l.isRequired||void 0},E.children,f.createElement(Ia,{...m,autoComplete:l.autoComplete})))}const sl=s.createContext(null),_a=Y(function(e,a){var p;[e,a]=T(e,a,sl);let t=s.useContext(ne),{placeholder:r}=Ie(se),o=t.selectedItems.map(v=>{var m;let c=(m=v.props)==null?void 0:m.children;return typeof c=="function"&&(c=c({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:"single",selectionBehavior:"toggle"})),c}),i=ja(),u=s.useMemo(()=>t.selectedItems.map(v=>v==null?void 0:v.textValue),[t.selectedItems]),n=t.selectionManager.selectionMode,b=s.useMemo(()=>n==="single"?u[0]??"":i.format(u),[n,i,u]),d=s.useMemo(()=>{if(n==="single")return o[0];let v=i.formatToParts(u);if(v.length===0)return null;let c=0;return v.map(m=>m.type==="element"?f.createElement(s.Fragment,{key:c},o[c++]):m.value)},[n,i,u,o]),$=Se(Na(ll),"react-aria-components"),x=k({...e,defaultChildren:d??r??$.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:((p=t.selectedItems[0])==null?void 0:p.value)??null,selectedItems:s.useMemo(()=>t.selectedItems.map(v=>v.value??null),[t.selectedItems]),selectedText:b,isPlaceholder:t.selectedItems.length===0,state:t}}),g=K(e,{global:!0});return f.createElement(F.span,{ref:a,...g,...x,"data-placeholder":t.selectedItems.length===0||void 0},f.createElement(U.Provider,{value:void 0},x.children))}),qa=s.createContext(!1),Wa=({children:l})=>B.jsx(qa,{value:!0,children:l}),G=new Map;function Ga(l,e,a=!0){const t=Hl();return s.useMemo(()=>{if(e!==void 0)return e;if(!t){if(a&&G.has(l))return G.get(l);try{const r=document.documentElement,o=getComputedStyle(r).getPropertyValue(l).trim()||void 0;return a&&G.set(l,o),o}catch{return}}},[l,e,t,a])}const ye=({animationType:l,className:e,...a})=>{const t=Ga("--skeleton-animation",l),r=f.useMemo(()=>ca({animationType:t}),[t]);return B.jsx(Te.div,{className:r.base({className:e}),...a})},rr=Object.assign(ye,{Root:ye}),Pe=({children:l,className:e,isDisabled:a,isInvalid:t,isRequired:r,...o})=>B.jsx(da,{className:oa({isRequired:r,isDisabled:a,isInvalid:t,className:e}),"data-slot":"label",...o,children:l}),or=Object.assign(Pe,{Root:Pe}),nl=s.createContext({}),De=({children:l,className:e,variant:a,...t})=>{const r=f.useMemo(()=>sa({variant:a}),[a]);return B.jsx(Aa,{className:I(e,r.item()),"data-slot":"list-box-item",...t,children:o=>B.jsx(nl,{value:{slots:r,state:o},children:typeof l=="function"?l(o):l})})},ul=({children:l,className:e,...a})=>{const{slots:t,state:r}=s.use(nl),o=r==null?void 0:r.isSelected,i=typeof l=="function"?l(r??{}):l||B.jsx("svg",{"aria-hidden":"true","data-slot":"list-box-item-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:o?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:B.jsx("polyline",{points:"1 9 7 14 15 4"})});return B.jsx(Te.span,{"aria-hidden":"true",className:X(t==null?void 0:t.indicator,e),"data-slot":"list-box-item-indicator","data-visible":o||void 0,...a,children:i})},Xa=Object.assign(De,{Root:De,Indicator:ul}),Ya=({children:l,className:e,...a})=>{const t=f.useMemo(()=>na({class:typeof e=="string"?e:void 0}),[e]);return B.jsx(Ra,{className:t,...a,children:l})},Ja=Ya;function Be({className:l,variant:e,...a}){const t=f.useMemo(()=>ia({variant:e}),[e]);return B.jsx(Sa,{className:I(l,t),"data-slot":"list-box",...a})}const ir=Object.assign(Be,{Root:Be,Item:Xa,ItemIndicator:ul,Section:Ja}),j=s.createContext({}),Ce=({children:l,className:e,fullWidth:a,variant:t,...r})=>{const o=f.useMemo(()=>ua({fullWidth:a,variant:t}),[a,t]);return B.jsx(Wa,{children:B.jsx(j,{value:{slots:o},children:B.jsx(Oa,{"data-slot":"select",...r,className:I(e,o==null?void 0:o.base()),children:i=>B.jsx(B.Fragment,{children:typeof l=="function"?l(i):l})})})})},Qa=({children:l,className:e,...a})=>{const{slots:t}=s.use(j);return B.jsx(aa,{className:I(e,t==null?void 0:t.trigger()),"data-slot":"select-trigger",...a,children:r=>B.jsx(B.Fragment,{children:typeof l=="function"?l(r):l})})},Ha=({children:l,className:e,...a})=>{const{slots:t}=s.use(j);return B.jsx(_a,{className:I(e,t==null?void 0:t.value()),"data-slot":"select-value",...a,children:l})},er=({children:l,className:e,...a})=>{const{slots:t}=s.use(j),r=s.use(ne);return l&&f.isValidElement(l)?f.cloneElement(l,{...a,className:X(t==null?void 0:t.indicator,e),"data-slot":"select-indicator","data-open":xe(r==null?void 0:r.isOpen)}):B.jsx(la,{className:X(t==null?void 0:t.indicator,e),"data-open":xe(r==null?void 0:r.isOpen),"data-slot":"select-default-indicator",...a})},tr=({children:l,className:e,placement:a="bottom",...t})=>{const{slots:r}=s.use(j);return B.jsx(ea,{value:{variant:"default"},children:B.jsx(ta,{...t,className:I(e,r==null?void 0:r.popover()),"data-slot":"select-popover",placement:a,children:l})})},sr=Object.assign(Ce,{Root:Ce,Trigger:Qa,Value:Ha,Indicator:er,Popover:tr});export{ve as $,or as L,rr as S,sr as a,ir as b,ae as c,Z as d,ra as e,rl as f,fa as g,le as h,al as i,ar as j,ya as k,ll as l,ka as m,te as n,Ga as u};
|