tokentracker-cli 1.3.8 → 1.3.10

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.
Files changed (129) hide show
  1. package/README.de.md +7 -6
  2. package/README.ja.md +6 -5
  3. package/README.ko.md +6 -5
  4. package/README.md +7 -6
  5. package/README.zh-CN.md +6 -5
  6. package/dashboard/dist/assets/{AchievementBadge-BqLeP5y3.js → AchievementBadge-vU4Dwu_p.js} +1 -1
  7. package/dashboard/dist/assets/{AchievementsPage-BwVkM45R.js → AchievementsPage-C8LspyPK.js} +2 -2
  8. package/dashboard/dist/assets/{AchievementsSection-CglgOcQ1.js → AchievementsSection-CP8J07fV.js} +1 -1
  9. package/dashboard/dist/assets/{BadgeDetailModal-IurF0cmo.js → BadgeDetailModal-Ci1egHvR.js} +1 -1
  10. package/dashboard/dist/assets/{BotAnimated-C4_NxPuy.js → BotAnimated-CMXILM_h.js} +1 -1
  11. package/dashboard/dist/assets/{Card-C-UuIN42.js → Card-BHHCCnqR.js} +1 -1
  12. package/dashboard/dist/assets/{CloudCheckoutPage-CrMDquLi.js → CloudCheckoutPage-BY9Hsbix.js} +1 -1
  13. package/dashboard/dist/assets/{CloudPage-D6xTPnMs.js → CloudPage-Y6JgOXcJ.js} +2 -2
  14. package/dashboard/dist/assets/{CommandPalette-8LFLY-LQ.js → CommandPalette-BRWQFJwy.js} +1 -1
  15. package/dashboard/dist/assets/CommunityStatsModal-krT4ZZX9.js +1 -0
  16. package/dashboard/dist/assets/{ConfirmModal-St89kP59.js → ConfirmModal-ZvPOJ0he.js} +1 -1
  17. package/dashboard/dist/assets/Controls-CQlxw03i.js +1 -0
  18. package/dashboard/dist/assets/{DashboardPage-BvGqFvP7.js → DashboardPage-Dbi0d2JY.js} +1 -1
  19. package/dashboard/dist/assets/{DateRangePopover-Cbd1idiF.js → DateRangePopover-DJ8RpQfV.js} +1 -1
  20. package/dashboard/dist/assets/DevicePage-C4_cbw3M.js +1 -0
  21. package/dashboard/dist/assets/{DialogClose-Cb1-Hd8P.js → DialogClose-Dx5AqmUG.js} +1 -1
  22. package/dashboard/dist/assets/DialogDescription-LvhfT1Ox.js +1 -0
  23. package/dashboard/dist/assets/{DialogTitle-VXrHY7H0.js → DialogTitle-Cro2S8s8.js} +1 -1
  24. package/dashboard/dist/assets/{ElectricLogo-DmQqYnSD.js → ElectricLogo-gqnBCtSG.js} +1 -1
  25. package/dashboard/dist/assets/{FadeIn-BEieTXMD.js → FadeIn-B9oATcDZ.js} +1 -1
  26. package/dashboard/dist/assets/{HeaderGithubStar-BlYC_PSb.js → HeaderGithubStar-CYa94wna.js} +1 -1
  27. package/dashboard/dist/assets/{HoverTooltip-C5Pe7iBz.js → HoverTooltip-BJ4qLyuS.js} +1 -1
  28. package/dashboard/dist/assets/{IpCheckPage-Diln3EdG.js → IpCheckPage-Clpq3jdY.js} +1 -1
  29. package/dashboard/dist/assets/{LandingPage-BzGYuAO7.js → LandingPage-CuazuOAo.js} +2 -2
  30. package/dashboard/dist/assets/{LeaderboardPage-Bn-ehU5S.js → LeaderboardPage-BSF1Lbtq.js} +2 -2
  31. package/dashboard/dist/assets/{LeaderboardProBadge-SovdGwYs.js → LeaderboardProBadge-K32gY52s.js} +1 -1
  32. package/dashboard/dist/assets/{LeaderboardProfileModal-BhxmTcHh.js → LeaderboardProfileModal-D5gpn7pP.js} +3 -3
  33. package/dashboard/dist/assets/{LeaderboardProfilePage-3iAYvoTb.js → LeaderboardProfilePage-BmO9nIi-.js} +1 -1
  34. package/dashboard/dist/assets/{LimitsPage-DHxFAdqK.js → LimitsPage-D9ZJ1TeK.js} +1 -1
  35. package/dashboard/dist/assets/{LocalOnlyNotice-HlGfiiI3.js → LocalOnlyNotice-BkzysTS7.js} +1 -1
  36. package/dashboard/dist/assets/{LoginCard-CamUYmiF.js → LoginCard-Do3SNJFU.js} +1 -1
  37. package/dashboard/dist/assets/{LoginModal-CcmYUJ45.js → LoginModal-hph1i_YK.js} +1 -1
  38. package/dashboard/dist/assets/{LoginPage-DMNNmZwr.js → LoginPage-DXYAaFjJ.js} +1 -1
  39. package/dashboard/dist/assets/{PetPage-D6xFX8QA.js → PetPage-D1Pk4OKI.js} +2 -2
  40. package/dashboard/dist/assets/{PopoverPopup-CKKgItAT.js → PopoverPopup-CAIuP_a5.js} +1 -1
  41. package/dashboard/dist/assets/{ProviderIcon-B-uS3pJ3.js → ProviderIcon-R6Bsj81X.js} +1 -1
  42. package/dashboard/dist/assets/{ResetPasswordPage-DX4RJjX0.js → ResetPasswordPage-BR3GTF-3.js} +1 -1
  43. package/dashboard/dist/assets/{Select-Dcg7FYAt.js → Select-38Dh-OWv.js} +1 -1
  44. package/dashboard/dist/assets/{SelectItemText-4vuj6xMs.js → SelectItemText-90n7jKbI.js} +1 -1
  45. package/dashboard/dist/assets/{SelfHostPage-ButVBgE7.js → SelfHostPage-BKVYkHI6.js} +1 -1
  46. package/dashboard/dist/assets/{ServiceStatusPage-DJDDO6lV.js → ServiceStatusPage-PBmBn29J.js} +1 -1
  47. package/dashboard/dist/assets/{SessionsPage-CiUirFMD.js → SessionsPage-58MfDHhe.js} +3 -3
  48. package/dashboard/dist/assets/SettingsPage-BNLHbZUQ.js +5 -0
  49. package/dashboard/dist/assets/{SkillsPage-D2tfFFY8.js → SkillsPage-DMMTk4jD.js} +1 -1
  50. package/dashboard/dist/assets/{TokenGalaxy-TQ-eWK8P.js → TokenGalaxy-BdPETjru.js} +1 -1
  51. package/dashboard/dist/assets/{TooltipPopup-BhSCJqFR.js → TooltipPopup-BXl-vM4L.js} +1 -1
  52. package/dashboard/dist/assets/{TrendMonitor-CP6ZZ53c.js → TrendMonitor-wPfTlX-7.js} +1 -1
  53. package/dashboard/dist/assets/{WidgetsPage-BdeR7P8D.js → WidgetsPage-CuwRMWka.js} +1 -1
  54. package/dashboard/dist/assets/{WrappedPage-OqcqupRE.js → WrappedPage-DOpA9kkg.js} +1 -1
  55. package/dashboard/dist/assets/{__vite-browser-external-BXwSXUpN.js → __vite-browser-external-Go6WKt6Z.js} +3 -3
  56. package/dashboard/dist/assets/__vite-browser-external-kAUz3kFs.css +1 -0
  57. package/dashboard/dist/assets/{agent-logos-E6GfkcgD.js → agent-logos-D7eMvAlk.js} +1 -1
  58. package/dashboard/dist/assets/{arrow-left-D_ufthLH.js → arrow-left--eOVP_Dk.js} +1 -1
  59. package/dashboard/dist/assets/{arrow-right-CgV_OrFz.js → arrow-right-DJYhwBMz.js} +1 -1
  60. package/dashboard/dist/assets/{arrow-up-right-CzeEeXRz.js → arrow-up-right-DhDvpd-S.js} +1 -1
  61. package/dashboard/dist/assets/{calendar-days-BQdTF7ec.js → calendar-days-BuOFlNcJ.js} +1 -1
  62. package/dashboard/dist/assets/{check-C--D8Lze.js → check-UztXSVYi.js} +1 -1
  63. package/dashboard/dist/assets/{chevron-down-BzkceD4z.js → chevron-down-CbJ2QGDU.js} +1 -1
  64. package/dashboard/dist/assets/{cloud-checkout-m1Yllbij.js → cloud-checkout-CoRQjKEu.js} +1 -1
  65. package/dashboard/dist/assets/{composite-7DhFi6TA.js → composite-PlKvZfdM.js} +1 -1
  66. package/dashboard/dist/assets/{download-BSyGLtfW.js → download-McE9gFto.js} +1 -1
  67. package/dashboard/dist/assets/{external-link-KzFbueBT.js → external-link-DZWnR9gS.js} +1 -1
  68. package/dashboard/dist/assets/{flame-DlPM_oaj.js → flame-0xjueXt4.js} +1 -1
  69. package/dashboard/dist/assets/{format-tokens-BHBaWyA3.js → format-tokens-CZoG68uJ.js} +1 -1
  70. package/dashboard/dist/assets/{gift-BhWBQnun.js → gift-pKc80Nqb.js} +1 -1
  71. package/dashboard/dist/assets/{host-mode--iIPGrkN.js → host-mode-99_v1j5J.js} +1 -1
  72. package/dashboard/dist/assets/{icons-COEaSBYi.js → icons-BtfYKSGC.js} +1 -1
  73. package/dashboard/dist/assets/{index-Cf4HcmLp.js → index-Cgthm7BO.js} +1 -1
  74. package/dashboard/dist/assets/{index-Bo8CSxCq.js → index-CyZxN1O0.js} +1 -1
  75. package/dashboard/dist/assets/{index-CW6A_Ff_.js → index-DuaQmNZo.js} +1 -1
  76. package/dashboard/dist/assets/{info-D1gOdsM_.js → info-C8vkxwsO.js} +1 -1
  77. package/dashboard/dist/assets/{link-2-CXDnDOK4.js → link-2-CQzIW5b6.js} +1 -1
  78. package/dashboard/dist/assets/{loader-circle-DWeQPecG.js → loader-circle-B9GqzQyC.js} +1 -1
  79. package/dashboard/dist/assets/{modifiers.esm-BljqMT7V.js → modifiers.esm-ChkCUrZp.js} +1 -1
  80. package/dashboard/dist/assets/{monitor-smartphone-DpkdtOjk.js → monitor-smartphone-DQjBY1W3.js} +1 -1
  81. package/dashboard/dist/assets/{play-BlGNrekI.js → play-qC6xc6fe.js} +1 -1
  82. package/dashboard/dist/assets/{plus-CpYVQ_t-.js → plus-CoNHx5Og.js} +1 -1
  83. package/dashboard/dist/assets/{provider-display-D6Blvktj.js → provider-display-x2EG6zAY.js} +1 -1
  84. package/dashboard/dist/assets/{react-BMJ2wuz1.js → react-EctmAw3f.js} +1 -1
  85. package/dashboard/dist/assets/{safePolygon-BFHXICk1.js → safePolygon-DlSbLtZC.js} +1 -1
  86. package/dashboard/dist/assets/{search-0NxXkytY.js → search-CBcpAj9I.js} +1 -1
  87. package/dashboard/dist/assets/{server-GHkrUKSI.js → server-DtMUoEq0.js} +1 -1
  88. package/dashboard/dist/assets/{shield-check-C16cbx1z.js → shield-check-ByUPtUmu.js} +1 -1
  89. package/dashboard/dist/assets/{skills-api-DAm1fFB4.js → skills-api-BD9VNRej.js} +1 -1
  90. package/dashboard/dist/assets/{sortable.esm-CkOax8h0.js → sortable.esm-B6qEViGJ.js} +1 -1
  91. package/dashboard/dist/assets/{store-DR444-5P.js → store-BgW2uBRe.js} +1 -1
  92. package/dashboard/dist/assets/{terminal-BpvNaIz9.js → terminal-DWPNkr2L.js} +1 -1
  93. package/dashboard/dist/assets/{trash-DX8LwOmN.js → trash-DdbRpgD1.js} +1 -1
  94. package/dashboard/dist/assets/{use-community-stats-BFW4-DYG.js → use-community-stats-43ySv9uM.js} +1 -1
  95. package/dashboard/dist/assets/{use-latest-request-guard-Cpcl08EJ.js → use-latest-request-guard-BuezAv4k.js} +1 -1
  96. package/dashboard/dist/assets/{use-limits-display-prefs-BqixyeAa.js → use-limits-display-prefs-Yi0Hznar.js} +1 -1
  97. package/dashboard/dist/assets/{use-native-settings-BSx7lGEK.js → use-native-settings-BaSrhrM8.js} +1 -1
  98. package/dashboard/dist/assets/{use-ordered-list-UCjB0_zK.js → use-ordered-list-CBD-EIBf.js} +1 -1
  99. package/dashboard/dist/assets/use-reduced-motion-ObUuoXUE.js +1 -0
  100. package/dashboard/dist/assets/{use-session-efficiency-pref-BgOJaGEy.js → use-session-efficiency-pref-CwaFIkE5.js} +1 -1
  101. package/dashboard/dist/assets/{use-transform-Y98QifnQ.js → use-transform-Dea4uz8K.js} +1 -1
  102. package/dashboard/dist/assets/{use-usage-limits-DJGO-Kxv.js → use-usage-limits-DxkYcUIR.js} +1 -1
  103. package/dashboard/dist/assets/{useCurrency-DL458pqS.js → useCurrency-CcZktkbA.js} +1 -1
  104. package/dashboard/dist/assets/{usePositioner-DnCQwlVT.js → usePositioner-BLGIGihf.js} +1 -1
  105. package/dashboard/dist/assets/{useTokenFormat-CYLt9pgs.js → useTokenFormat--dhm3nNf.js} +1 -1
  106. package/dashboard/dist/assets/{zap-BW6E_Jv3.js → zap-CWTmP6Zw.js} +1 -1
  107. package/dashboard/dist/index.html +14 -12
  108. package/dashboard/dist/ip-check.html +2 -2
  109. package/dashboard/dist/leaderboard.html +2 -2
  110. package/dashboard/dist/llms.txt +3 -2
  111. package/dashboard/dist/share.html +2 -2
  112. package/package.json +2 -2
  113. package/src/commands/init.js +9 -0
  114. package/src/commands/status.js +11 -0
  115. package/src/commands/sync.js +197 -122
  116. package/src/lib/dumate.js +95 -0
  117. package/src/lib/pricing/seed-snapshot.json +1 -1
  118. package/src/lib/qoder-cn-cli-limits.js +117 -0
  119. package/src/lib/qoder-limits.js +24 -11
  120. package/src/lib/rollout.js +12 -9
  121. package/src/lib/session-analytics.js +210 -19
  122. package/src/lib/upload-queue.js +134 -0
  123. package/dashboard/dist/assets/CommunityStatsModal-DYTjxABN.js +0 -1
  124. package/dashboard/dist/assets/Controls-BJAwM2gB.js +0 -1
  125. package/dashboard/dist/assets/DevicePage-BcSU0xgf.js +0 -1
  126. package/dashboard/dist/assets/DialogDescription-DQvYzWMp.js +0 -1
  127. package/dashboard/dist/assets/SettingsPage-CB4CML8u.js +0 -5
  128. package/dashboard/dist/assets/__vite-browser-external-DvNSoTb8.css +0 -1
  129. package/dashboard/dist/assets/use-reduced-motion-C6zOHbfR.js +0 -1
@@ -1 +1 @@
1
- import{o as M,d as E,r,P as I,c as i,j as o,y as L}from"./__vite-browser-external-BXwSXUpN.js";import{m as j}from"./react-BMJ2wuz1.js";import{P as A}from"./ProviderIcon-B-uS3pJ3.js";import{g as $}from"./skills-api-DAm1fFB4.js";import{A as R}from"./index-CW6A_Ff_.js";import{S as K}from"./search-0NxXkytY.js";import{u as q}from"./use-reduced-motion-C6zOHbfR.js";const N={name:"corner-down-left",size:24,node:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]};N.node;const O=M(N),P=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function Q(){const f=E(),d=q(),[u,g]=r.useState(!1),[x,h]=r.useState(""),[n,l]=r.useState(0),[m,k]=r.useState([]),b=r.useRef(null),w=r.useRef(null);r.useEffect(()=>{const e=t=>{(t.metaKey||t.ctrlKey)&&(t.key==="k"||t.key==="K")&&(t.preventDefault(),g(c=>!c))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),r.useEffect(()=>{if(!u)return;h(""),l(0);const e=requestAnimationFrame(()=>b.current?.focus());return P&&!m.length&&$().then(t=>k(t?.skills||[])).catch(()=>k([])),()=>cancelAnimationFrame(e)},[u,m.length]);const y=r.useMemo(()=>{const e=I().flatMap(a=>a.items.map(c=>({kind:"page",id:`page:${c.id}`,label:c.label,sub:i("cmdk.group.pages"),Icon:c.icon,run:()=>f(c.to)}))),t=(m||[]).map(a=>({kind:"skill",id:`skill:${a.id||a.directory}`,label:a.name||a.directory,sub:a.repoOwner&&a.repoName?`${a.repoOwner}/${a.repoName}`:i("cmdk.group.skills"),provider:(a.targets||[])[0]||"claude",run:()=>f(`/skills?skill=${encodeURIComponent(a.directory||a.id)}`)}));return[...e,...t]},[f,m]),s=r.useMemo(()=>{const e=x.trim().toLowerCase();return e?y.filter(t=>t.label.toLowerCase().includes(e)||String(t.sub||"").toLowerCase().includes(e)):y},[y,x]);r.useEffect(()=>{n>=s.length&&l(s.length?s.length-1:0)},[n,s.length]),r.useEffect(()=>{if(!u)return;w.current?.querySelector(`[data-cmdk-index="${n}"]`)?.scrollIntoView({block:"nearest"})},[n,u]);const p=r.useCallback(()=>g(!1),[]),v=r.useCallback(e=>{e&&(p(),e.run())},[p]),C=e=>{e.key==="ArrowDown"?(e.preventDefault(),l(t=>Math.min(t+1,Math.max(0,s.length-1)))):e.key==="ArrowUp"?(e.preventDefault(),l(t=>Math.max(t-1,0))):e.key==="Enter"?(e.preventDefault(),v(s[n])):e.key==="Escape"&&(e.preventDefault(),p())},S={duration:d?0:.12},D=d?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return o.jsx(R,{children:u?o.jsxs(j.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:d?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:S,children:[o.jsx("button",{type:"button","aria-label":i("cmdk.close"),onClick:p,className:"absolute inset-0 cursor-default bg-oai-black/40"}),o.jsxs(j.div,{role:"dialog","aria-modal":"true","aria-label":i("cmdk.open_aria"),initial:d?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:d?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:D,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[o.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[o.jsx(K,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),o.jsx("input",{ref:b,type:"text",value:x,onChange:e=>{h(e.target.value),l(0)},onKeyDown:C,"aria-label":i("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":s[n]?`cmdk-opt-${n}`:void 0,role:"combobox","aria-expanded":"true",placeholder:i("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),o.jsx("div",{ref:w,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:s.length===0?o.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:i("cmdk.empty")}):s.map((e,t)=>{const a=t===n;return o.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${t}`,"data-cmdk-index":t,"aria-selected":a,onMouseMove:()=>l(t),onClick:()=>v(e),className:L("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",a?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[o.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:e.kind==="skill"?o.jsx(A,{provider:e.provider,size:16}):o.jsx(e.Icon,{className:"h-4 w-4","aria-hidden":!0})}),o.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:e.label}),o.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:e.sub}),a?o.jsx(O,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},e.id)})})]})]}):null})}export{Q as CommandPalette};
1
+ import{o as M,d as E,r,P as I,c as i,j as o,y as L}from"./__vite-browser-external-Go6WKt6Z.js";import{m as j}from"./react-EctmAw3f.js";import{P as A}from"./ProviderIcon-R6Bsj81X.js";import{g as $}from"./skills-api-BD9VNRej.js";import{A as R}from"./index-DuaQmNZo.js";import{S as K}from"./search-CBcpAj9I.js";import{u as q}from"./use-reduced-motion-ObUuoXUE.js";const N={name:"corner-down-left",size:24,node:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]};N.node;const O=M(N),P=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1");function Q(){const f=E(),d=q(),[u,g]=r.useState(!1),[x,h]=r.useState(""),[n,l]=r.useState(0),[m,k]=r.useState([]),b=r.useRef(null),w=r.useRef(null);r.useEffect(()=>{const e=t=>{(t.metaKey||t.ctrlKey)&&(t.key==="k"||t.key==="K")&&(t.preventDefault(),g(c=>!c))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),r.useEffect(()=>{if(!u)return;h(""),l(0);const e=requestAnimationFrame(()=>b.current?.focus());return P&&!m.length&&$().then(t=>k(t?.skills||[])).catch(()=>k([])),()=>cancelAnimationFrame(e)},[u,m.length]);const y=r.useMemo(()=>{const e=I().flatMap(a=>a.items.map(c=>({kind:"page",id:`page:${c.id}`,label:c.label,sub:i("cmdk.group.pages"),Icon:c.icon,run:()=>f(c.to)}))),t=(m||[]).map(a=>({kind:"skill",id:`skill:${a.id||a.directory}`,label:a.name||a.directory,sub:a.repoOwner&&a.repoName?`${a.repoOwner}/${a.repoName}`:i("cmdk.group.skills"),provider:(a.targets||[])[0]||"claude",run:()=>f(`/skills?skill=${encodeURIComponent(a.directory||a.id)}`)}));return[...e,...t]},[f,m]),s=r.useMemo(()=>{const e=x.trim().toLowerCase();return e?y.filter(t=>t.label.toLowerCase().includes(e)||String(t.sub||"").toLowerCase().includes(e)):y},[y,x]);r.useEffect(()=>{n>=s.length&&l(s.length?s.length-1:0)},[n,s.length]),r.useEffect(()=>{if(!u)return;w.current?.querySelector(`[data-cmdk-index="${n}"]`)?.scrollIntoView({block:"nearest"})},[n,u]);const p=r.useCallback(()=>g(!1),[]),v=r.useCallback(e=>{e&&(p(),e.run())},[p]),C=e=>{e.key==="ArrowDown"?(e.preventDefault(),l(t=>Math.min(t+1,Math.max(0,s.length-1)))):e.key==="ArrowUp"?(e.preventDefault(),l(t=>Math.max(t-1,0))):e.key==="Enter"?(e.preventDefault(),v(s[n])):e.key==="Escape"&&(e.preventDefault(),p())},S={duration:d?0:.12},D=d?{duration:0}:{type:"spring",stiffness:460,damping:34,mass:.6};return o.jsx(R,{children:u?o.jsxs(j.div,{className:"fixed inset-0 z-[120] flex items-start justify-center px-4 pt-[16vh]",initial:d?!1:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:S,children:[o.jsx("button",{type:"button","aria-label":i("cmdk.close"),onClick:p,className:"absolute inset-0 cursor-default bg-oai-black/40"}),o.jsxs(j.div,{role:"dialog","aria-modal":"true","aria-label":i("cmdk.open_aria"),initial:d?!1:{opacity:0,y:-8,scale:.985},animate:{opacity:1,y:0,scale:1},exit:d?{opacity:0}:{opacity:0,y:-8,scale:.985},transition:D,className:"relative w-full max-w-xl overflow-hidden rounded-2xl border border-oai-gray-200 bg-oai-white shadow-2xl dark:border-oai-gray-800 dark:bg-oai-gray-950",children:[o.jsxs("div",{className:"flex items-center gap-2.5 border-b border-oai-gray-200 px-4 dark:border-oai-gray-800",children:[o.jsx(K,{className:"h-4 w-4 shrink-0 text-oai-gray-400","aria-hidden":!0}),o.jsx("input",{ref:b,type:"text",value:x,onChange:e=>{h(e.target.value),l(0)},onKeyDown:C,"aria-label":i("cmdk.placeholder"),"aria-controls":"cmdk-listbox","aria-activedescendant":s[n]?`cmdk-opt-${n}`:void 0,role:"combobox","aria-expanded":"true",placeholder:i("cmdk.placeholder"),className:"h-12 w-full bg-transparent text-sm text-oai-black placeholder:text-oai-gray-400 focus:outline-none dark:text-white"})]}),o.jsx("div",{ref:w,id:"cmdk-listbox",role:"listbox",className:"max-h-[min(56vh,22rem)] overflow-y-auto p-1.5",children:s.length===0?o.jsx("div",{className:"px-3 py-8 text-center text-sm text-oai-gray-500 dark:text-oai-gray-400",children:i("cmdk.empty")}):s.map((e,t)=>{const a=t===n;return o.jsxs("button",{type:"button",role:"option",id:`cmdk-opt-${t}`,"data-cmdk-index":t,"aria-selected":a,onMouseMove:()=>l(t),onClick:()=>v(e),className:L("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors",a?"bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800/70 dark:text-white":"text-oai-gray-700 dark:text-oai-gray-200"),children:[o.jsx("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center text-oai-gray-500 dark:text-oai-gray-400",children:e.kind==="skill"?o.jsx(A,{provider:e.provider,size:16}):o.jsx(e.Icon,{className:"h-4 w-4","aria-hidden":!0})}),o.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:e.label}),o.jsx("span",{className:"shrink-0 truncate text-xs text-oai-gray-400 dark:text-oai-gray-500",children:e.sub}),a?o.jsx(O,{className:"h-3.5 w-3.5 shrink-0 text-oai-gray-400","aria-hidden":!0}):null]},e.id)})})]})]}):null})}export{Q as CommandPalette};
@@ -0,0 +1 @@
1
+ import{o as R,j as e,an as P,l as z,r as D,c as n,X as S,i as K}from"./__vite-browser-external-Go6WKt6Z.js";import{m as M}from"./react-EctmAw3f.js";import{A as U,W as B}from"./icons-BtfYKSGC.js";import{u as F}from"./useTokenFormat--dhm3nNf.js";import{P as G}from"./ProviderIcon-R6Bsj81X.js";import{T as W}from"./TrendMonitor-wPfTlX-7.js";import{T as V}from"./AchievementBadge-vU4Dwu_p.js";import{T as X}from"./terminal-DWPNkr2L.js";import{D as Y,a as Z,b as H,c as q,d as J,e as Q}from"./DialogTitle-Cro2S8s8.js";import{D as ee}from"./DialogDescription-LvhfT1Ox.js";import{D as ae}from"./DialogClose-Dx5AqmUG.js";import"./useCurrency-CcZktkbA.js";import"./DateRangePopover-DJ8RpQfV.js";import"./use-latest-request-guard-BuezAv4k.js";import"./PopoverPopup-CAIuP_a5.js";import"./store-BgW2uBRe.js";import"./composite-PlKvZfdM.js";import"./SelectItemText-90n7jKbI.js";import"./usePositioner-BLGIGihf.js";import"./safePolygon-DlSbLtZC.js";import"./use-reduced-motion-ObUuoXUE.js";import"./zap-CWTmP6Zw.js";import"./flame-0xjueXt4.js";import"./calendar-days-BuOFlNcJ.js";import"./shield-check-ByUPtUmu.js";const C={name:"trending-down",size:24,node:[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]};C.node;const te=R(C),O=10,_={input:"var(--community-token-input)",cache_read:"var(--community-token-cache-read)",cache_write:"var(--community-token-cache-write)",output:"var(--community-token-output)",reasoning:"var(--community-token-reasoning)"},re={CLAUDE:"var(--community-claude)",CODEX:"var(--community-codex)",GEMINI:"var(--community-gemini)",CURSOR:"var(--community-cursor)",OPENCODE:"var(--community-opencode)",HERMES:"var(--community-hermes)",KIMI:"var(--community-kimi)",MIMO:"var(--community-mimo)",COPILOT:"var(--community-copilot)",KIRO:"var(--community-kiro)",GROK:"var(--community-grok)",DEEPSEEK:"var(--community-deepseek)",ZCODE:"var(--community-zcode)",WORKBUDDY:"var(--community-workbuddy)",MINIMAX:"var(--community-minimax)",DROID:"var(--community-droid)",DUMATE:"var(--community-dumate)"};function ie(t){return re[String(t||"").toUpperCase()]||"var(--community-muted)"}const se=[[/claude|fable|opus|sonnet|haiku/,"CLAUDE"],[/gpt|codex|o3|o4/,"CODEX"],[/gemini/,"GEMINI"],[/composer|cursor/,"CURSOR"],[/kimi/,"KIMI"],[/mimo/,"MIMO"],[/copilot/,"COPILOT"],[/kiro/,"KIRO"],[/grok/,"GROK"],[/deepseek/,"DEEPSEEK"],[/glm/,"ZCODE"],[/hy3/,"WORKBUDDY"],[/minimax/,"MINIMAX"]],g=["overview","providers","community","models"];function oe(t){const s=String(t||"").toLowerCase(),a=se.find(([i])=>i.test(s));return a?a[1]:""}function x(t){const s=Number(t);return Number.isFinite(s)?`${s.toFixed(1)}%`:"—"}function p(t){return K(Number(t)||0)}function ne(t){return t?new Date(`${t}T00:00:00Z`).toLocaleDateString(void 0,{month:"short",day:"numeric",timeZone:"UTC"}):""}function k(){return e.jsx("div",{className:"flex h-full min-h-40 items-center justify-center text-xs text-oai-gray-400",children:n("leaderboard.community.modal.no_data")})}function b({children:t,detail:s}){return e.jsxs("div",{className:"mb-3 flex items-baseline justify-between gap-4",children:[e.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide text-oai-gray-500 dark:text-oai-gray-400",children:t}),s?e.jsx("span",{className:"text-xs text-oai-gray-400",children:s}):null]})}function A({value:t,label:s}){const a=Number(t);if(!Number.isFinite(a))return null;const i=Math.sign(a)!==-1,r=i?V:te;return e.jsxs("span",{className:`inline-flex items-center gap-1 text-xs font-medium tabular-nums ${i?"text-emerald-600 dark:text-emerald-400":"text-rose-600 dark:text-rose-400"}`,title:s,children:[e.jsx(r,{className:"size-3","aria-hidden":"true"}),i?"+":"",a.toFixed(1),"%"]})}function j({label:t,value:s,title:a,delta:i,deltaLabel:r}){return e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-xs font-medium text-oai-gray-500 dark:text-oai-gray-400",children:t}),e.jsxs("div",{className:"mt-1 flex min-w-0 items-baseline gap-2",children:[e.jsx("span",{className:"truncate text-xl font-semibold leading-none tracking-tight text-oai-black tabular-nums dark:text-white",title:a,children:s}),e.jsx(A,{value:i,label:r})]})]})}function I({fillWidth:t,share:s,color:a="var(--oai-blue)",ariaLabel:i,dataAttrs:r,children:o}){return e.jsxs("div",{...r,className:"group relative grid min-h-11 grid-cols-[minmax(0,1fr)_auto] items-center gap-3 overflow-hidden px-2.5 transition-colors hover:bg-oai-gray-50 dark:hover:bg-oai-gray-900/60",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 opacity-[0.15] transition-opacity group-hover:opacity-[0.22] dark:opacity-[0.24] dark:group-hover:opacity-[0.32]",style:{width:`${t}%`,backgroundColor:a},role:"progressbar","aria-label":i,"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":Number(s)||0}),o]})}function T({rank:t,provider:s,name:a,fillWidth:i,share:r,tokens:o,tokensTitle:l,dataAttrs:c}){return e.jsxs(I,{fillWidth:i,share:r,color:ie(s),ariaLabel:`${a} ${x(r)}`,dataAttrs:c,children:[e.jsxs("div",{className:"relative flex min-w-0 items-center gap-2.5",children:[e.jsx("span",{className:`w-5 shrink-0 text-xs tabular-nums ${t<=3?"font-semibold text-oai-gray-700 dark:text-oai-gray-200":"text-oai-gray-400"}`,children:t}),e.jsx("span",{className:"grid size-6 shrink-0 place-items-center text-oai-gray-700 dark:text-oai-gray-200",children:e.jsx(G,{provider:s,size:15})}),e.jsx("span",{className:"truncate text-xs font-medium text-oai-gray-700 dark:text-oai-gray-200",title:a,children:a})]}),e.jsxs("div",{className:"relative min-w-[4.5rem] text-right",children:[e.jsx("div",{className:"text-xs font-semibold text-oai-black tabular-nums dark:text-white",title:l,children:o}),e.jsx("div",{className:"text-xs text-oai-gray-500 tabular-nums dark:text-oai-gray-400",children:x(r)})]})]})}function le({rows:t,formatTokensTooltip:s}){return t.length?e.jsxs("div",{className:"mt-7",children:[e.jsx(b,{children:n("leaderboard.community.modal.token_mix")}),e.jsx("div",{className:"flex h-1.5 overflow-hidden bg-oai-gray-100 dark:bg-oai-gray-800",children:t.map(a=>e.jsx("div",{style:{width:`${Math.max(Number(a.share)||0,0)}%`,backgroundColor:_[a.key]||"var(--community-muted)"},title:`${n(`leaderboard.community.modal.token_mix.${a.key}`)} · ${x(a.share)}`},a.key))}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-x-5 gap-y-1.5",children:t.map(a=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",title:s(a.tokens),children:[e.jsx("span",{className:"size-2",style:{backgroundColor:_[a.key]||"var(--community-muted)"}}),n(`leaderboard.community.modal.token_mix.${a.key}`),e.jsx("span",{className:"tabular-nums text-oai-gray-700 dark:text-oai-gray-200",children:x(a.share)})]},a.key))})]}):null}function f({label:t,value:s,title:a,delta:i,deltaLabel:r,className:o=""}){return e.jsxs("div",{className:`min-w-0 ${o}`,children:[e.jsx("div",{className:"truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:t}),e.jsxs("div",{className:"mt-1 flex min-w-0 items-baseline gap-2",children:[e.jsx("span",{className:"truncate text-base font-semibold leading-none tracking-tight tabular-nums text-oai-black dark:text-white",title:a,children:s}),e.jsx(A,{value:i,label:r})]})]})}function de({trendRows:t,activeDevelopers30d:s,developerGrowthPct:a,formatTokens:i,formatTokensTooltip:r}){if(!t.length)return null;const o=t.reduce((m,h)=>m+h.value,0),l=t.reduce((m,h)=>m.value<h.value?h:m,t[0]),c=o/t.length;return e.jsxs("div",{className:"mt-5 grid grid-cols-3 divide-x divide-oai-gray-100 border-y border-oai-gray-100 py-3.5 dark:divide-oai-gray-800/80 dark:border-oai-gray-800/80",children:[e.jsx(f,{className:"pr-4",label:n("leaderboard.community.modal.daily_average"),value:i(c),title:r(c)}),e.jsx(f,{className:"px-4",label:`${n("leaderboard.community.modal.peak_day")} · ${l.day}`,value:i(l.value),title:r(l.value)}),e.jsx(f,{className:"pl-4",label:n("leaderboard.community.modal.active_30d"),value:p(s),title:Number(s).toLocaleString(),delta:a,deltaLabel:n("leaderboard.community.modal.vs_previous_week")})]})}function me({trendRows:t,mix:s,activeDevelopers30d:a,developerGrowthPct:i,formatTokens:r,formatTokensTooltip:o}){return!t.length&&!s.length?e.jsx(k,{}):e.jsxs("div",{children:[e.jsx(b,{detail:n("leaderboard.community.modal.utc_note"),children:n("leaderboard.community.modal.community_activity")}),e.jsx(W,{embedded:!0,rows:t,from:t[0]?.day,to:t.at(-1)?.day,chartHeightClass:"h-44"}),e.jsx(de,{trendRows:t,activeDevelopers30d:a,developerGrowthPct:i,formatTokens:r,formatTokensTooltip:o}),e.jsx(le,{rows:s,formatTokensTooltip:o})]})}function ce({rows:t,maxShare:s,formatTokens:a,formatTokensTooltip:i}){return t.length?e.jsx("div",{className:"space-y-0.5",children:t.map((r,o)=>e.jsx(T,{rank:o+1,dataAttrs:{"data-provider-rank":o+1,"data-provider-name":r.name},provider:String(r.name).toUpperCase(),name:r.name,fillWidth:Math.max((Number(r.share)||0)/s*100,2),share:r.share,tokens:a(r.tokens),tokensTitle:i(r.tokens)},r.name))}):e.jsx(k,{})}function ue({rows:t,maxShare:s,formatTokens:a,formatTokensTooltip:i}){return t.length?e.jsx("div",{className:"space-y-0.5",children:t.map((r,o)=>{const l=Number(r.share)||0;return e.jsx(T,{rank:o+1,dataAttrs:{"data-model-rank":o+1,"data-model-name":r.name},provider:oe(r.name),name:r.name,fillWidth:Math.max(l/s*100,2),share:l,tokens:a(r.tokens),tokensTitle:i(r.tokens)},r.name)})}):e.jsx(k,{})}function xe({name:t}){const s=String(t||"").toLowerCase();return s==="darwin"?e.jsx(U,{className:"size-3.5"}):s==="win32"?e.jsx(B,{className:"size-3.5"}):e.jsx(X,{className:"size-4","aria-hidden":"true"})}const he=.175,ye=.3;function ge({bands:t,formatTokensTooltip:s}){const a=t.reduce((r,o)=>Math.max(r,Number(o.developer_share)||0),0)||1,i=r=>`${n(`leaderboard.community.modal.band.${r.key}`)} · ${n("leaderboard.community.modal.developer_count",{count:p(r.developers)})} (${s(r.tokens)})`;return e.jsxs("div",{children:[e.jsx("div",{className:"flex gap-2 border-b border-oai-gray-200 dark:border-oai-gray-800",children:t.map((r,o)=>{const l=Number(r.developer_share)||0,c=Math.max(l/a*80,2);return e.jsxs("div",{className:"relative h-32 min-w-0 flex-1",title:i(r),children:[e.jsx("div",{role:"progressbar","aria-label":n("leaderboard.community.modal.developer_share_title",{share:x(l)}),"aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":l,className:"absolute inset-x-0 bottom-0",style:{height:`${c}%`,backgroundColor:"var(--oai-blue)",opacity:ye+o*he}}),e.jsx("div",{className:"absolute inset-x-0 text-center text-xs font-medium tabular-nums text-oai-gray-700 dark:text-oai-gray-200",style:{bottom:`calc(${c}% + 4px)`},children:x(l)})]},r.key)})}),e.jsx("div",{className:"mt-2 flex gap-2",children:t.map(r=>e.jsxs("div",{className:"min-w-0 flex-1 text-center",title:i(r),children:[e.jsx("div",{className:"truncate text-xs font-medium text-oai-gray-700 dark:text-oai-gray-200",children:n(`leaderboard.community.modal.band.${r.key}`)}),e.jsx("div",{className:"truncate text-xs tabular-nums text-oai-gray-500 dark:text-oai-gray-400",children:p(r.developers)})]},r.key))})]})}function pe({bands:t,platforms:s,formatTokensTooltip:a}){return!t.length&&!s.length?e.jsx(k,{}):e.jsxs("div",{className:"space-y-8",children:[t.length?e.jsxs("div",{children:[e.jsx(b,{children:n("leaderboard.community.modal.usage_distribution")}),e.jsx(ge,{bands:t,formatTokensTooltip:a})]}):null,s.length?e.jsxs("div",{children:[e.jsx(b,{children:n("leaderboard.community.modal.platforms")}),e.jsx("div",{className:"space-y-0.5",children:s.map(i=>e.jsxs(I,{fillWidth:Math.max(Number(i.share)||0,1),share:i.share,ariaLabel:`${n(`leaderboard.community.modal.platform.${i.name}`)} ${x(i.share)}`,children:[e.jsxs("div",{className:"relative flex min-w-0 items-center gap-2.5",children:[e.jsx("span",{className:"grid size-6 shrink-0 place-items-center text-oai-gray-700 dark:text-oai-gray-200",children:e.jsx(xe,{name:i.name})}),e.jsx("span",{className:"truncate text-xs font-medium text-oai-gray-700 dark:text-oai-gray-200",children:n(`leaderboard.community.modal.platform.${i.name}`)})]}),e.jsxs("div",{className:"relative min-w-[4.5rem] text-right",children:[e.jsx("div",{className:"text-xs font-semibold text-oai-black tabular-nums dark:text-white",children:x(i.share)}),e.jsx("div",{className:"text-xs text-oai-gray-500 tabular-nums dark:text-oai-gray-400",title:Number(i.machines||0).toLocaleString(),children:n("leaderboard.community.modal.machine_count",{count:p(i.machines)})})]})]},i.name))})]}):null]})}function ve({isOpen:t,onClose:s,communityStats:a}){const{formatTokens:i,formatTokensTooltip:r}=F(),[o,l]=D.useState("overview"),c=a?.status==="ready",m=D.useMemo(()=>{if(!c)return null;const d=(Array.isArray(a.providers)?a.providers:[]).slice(0,O),u=(Array.isArray(a.topModels)?a.topModels:[]).slice(0,O),y=v=>v.reduce(($,L)=>Math.max($,Number(L.share)||0),0)||1;return{providers:d,models:u,providersMaxShare:y(d),modelsMaxShare:y(u),trendRows:(Array.isArray(a.dailyGrowth)?a.dailyGrowth:[]).map(v=>({day:ne(v.day),value:Number(v.tokens)||0})),mix:Array.isArray(a.tokenMix)?a.tokenMix:[],bands:Array.isArray(a.userDistribution)?a.userDistribution:[],platforms:Array.isArray(a.platforms)?a.platforms:[]}},[c,a]);if(!m)return null;const h=Number(a.tokenFloor)||0,N=Number(a.activeDevelopersTotal)||Number(a.totalEntries)||0,w=Number(a.tokens30d)||0,E=d=>{if(d.key!=="ArrowRight"&&d.key!=="ArrowLeft")return;d.preventDefault();const u=d.key==="ArrowRight"?1:-1,y=g[(g.indexOf(o)+u+g.length)%g.length];l(y),d.currentTarget.querySelector(`[data-tab-id="${y}"]`)?.focus()};return e.jsx(Y,{open:t,onOpenChange:d=>!d&&s(),children:e.jsxs(Z,{children:[e.jsx(H,{className:"fixed inset-0 z-[100] bg-black/50 backdrop-blur-[3px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),e.jsx(q,{className:"fixed inset-0 z-[101] flex items-center justify-center p-2 sm:p-5",children:e.jsxs(J,{className:"relative flex h-[min(42rem,92vh)] w-full max-w-xl flex-col overflow-hidden rounded-2xl bg-white shadow-2xl ring-1 ring-black/10 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-3 data-[ending-style]:scale-[0.98] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-3 data-[starting-style]:scale-[0.98] data-[starting-style]:opacity-0 dark:bg-oai-gray-950 dark:ring-white/10",children:[e.jsxs("header",{"data-testid":"community-metrics-header",className:"shrink-0 px-5 pt-5 sm:px-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(Q,{className:"text-lg font-semibold tracking-[-0.02em] text-oai-black dark:text-white",children:n("leaderboard.community.modal.title")}),e.jsx(ee,{className:"sr-only",children:n("leaderboard.community.modal.description")})]}),e.jsx(ae,{className:"-mr-1 -mt-1 grid size-8 place-items-center rounded-full text-oai-gray-400 transition-colors hover:bg-black/5 hover:text-oai-black dark:hover:bg-white/10 dark:hover:text-white","aria-label":n("shared.dialog.close"),children:e.jsx(S,{className:"size-4"})})]}),e.jsxs("div",{className:"mt-4 grid grid-cols-3 gap-x-5",children:[e.jsx(j,{label:n("leaderboard.community.modal.total_tokens"),value:i(h),title:r(h)}),e.jsx(j,{label:n("leaderboard.community.modal.tokens_30d"),value:i(w),title:r(w),delta:a.tokenGrowthPct,deltaLabel:n("leaderboard.community.modal.vs_previous_week")}),e.jsx(j,{label:n("leaderboard.community.modal.contributors"),value:p(N),title:N.toLocaleString()})]}),e.jsx("div",{className:"mt-4 flex items-end overflow-x-auto border-b border-oai-gray-100 dark:border-oai-gray-900",role:"tablist","aria-label":n("leaderboard.community.modal.views"),onKeyDown:E,children:g.map(d=>{const u=o===d;return e.jsxs("button",{type:"button",role:"tab","data-tab-id":d,"aria-selected":u,tabIndex:u?0:-1,onClick:()=>l(d),className:`relative mr-5 h-10 shrink-0 text-sm font-medium transition-colors last:mr-0 ${u?"text-oai-black dark:text-white":"text-oai-gray-500 hover:text-oai-gray-700 dark:text-oai-gray-400 dark:hover:text-oai-gray-200"}`,children:[n(`leaderboard.community.modal.tab.${d}`),u?e.jsx(M.span,{layoutId:"community-metrics-tab-underline",className:"absolute inset-x-0 -bottom-px h-0.5 rounded-full bg-oai-black dark:bg-white",transition:{type:"spring",stiffness:420,damping:34}}):null]},d)})})]}),e.jsx("div",{"data-testid":"community-metrics-content",className:"min-h-0 flex-1 overflow-y-auto px-5 py-5 sm:px-6",children:e.jsxs(M.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.18,ease:[.16,1,.3,1]},className:"h-full",children:[o==="overview"?e.jsx(me,{trendRows:m.trendRows,mix:m.mix,activeDevelopers30d:Number(a.activeDevelopers30d)||0,developerGrowthPct:a.developerGrowthPct,formatTokens:i,formatTokensTooltip:r}):null,o==="providers"?e.jsx(ce,{rows:m.providers,maxShare:m.providersMaxShare,formatTokens:i,formatTokensTooltip:r}):null,o==="community"?e.jsx(pe,{bands:m.bands,platforms:m.platforms,formatTokensTooltip:r}):null,o==="models"?e.jsx(ue,{rows:m.models,maxShare:m.modelsMaxShare,formatTokens:i,formatTokensTooltip:r}):null]},o)})]})})]})})}function Ge(t){return e.jsx(P,{mode:z.COMPACT,children:e.jsx(ve,{...t})})}export{Ge as CommunityStatsModal};
@@ -1 +1 @@
1
- import{j as a,B as r,y as p}from"./__vite-browser-external-BXwSXUpN.js";import{D as m,a as y,b,c as u,d as f,e as h}from"./DialogTitle-VXrHY7H0.js";import{D as j}from"./DialogDescription-DQvYzWMp.js";function _({open:l,title:n,description:t,error:s=null,confirmLabel:d,cancelLabel:o,destructive:c=!1,busy:e=!1,onConfirm:g,onCancel:i}){return a.jsx(m,{open:l,onOpenChange:x=>{!x&&!e&&i?.()},children:a.jsxs(y,{children:[a.jsx(b,{className:"fixed inset-0 z-[100] bg-black/40 backdrop-blur-[2px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),a.jsx(u,{className:"fixed inset-0 z-[101] flex items-center justify-center p-4",children:a.jsxs(f,{className:"relative w-full max-w-md rounded-2xl bg-white p-6 shadow-[0_20px_60px_-20px_rgba(0,0,0,0.25)] ring-1 ring-oai-gray-200 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-2 data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-2 data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0 dark:bg-oai-gray-950 dark:shadow-[0_20px_60px_-10px_rgba(0,0,0,0.65)] dark:ring-oai-gray-800",children:[a.jsx(h,{className:"text-base font-semibold text-oai-black dark:text-white",children:n}),t?a.jsx(j,{className:"mt-2 text-sm leading-6 text-oai-gray-600 dark:text-oai-gray-300",children:t}):null,s?a.jsx("p",{className:"mt-2 text-sm leading-6 text-red-600 dark:text-red-400",role:"alert",children:s}):null,a.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[a.jsx(r,{type:"button",variant:"secondary",size:"sm",disabled:e,onClick:()=>i?.(),children:o}),a.jsx(r,{type:"button",size:"sm",disabled:e,onClick:()=>g?.(),className:p(c&&"!bg-red-600 hover:!bg-red-700 focus-visible:!outline-red-600 dark:!bg-red-600 dark:hover:!bg-red-500"),children:d})]})]})})]})})}export{_ as C};
1
+ import{j as a,B as r,y as p}from"./__vite-browser-external-Go6WKt6Z.js";import{D as m,a as y,b,c as u,d as f,e as h}from"./DialogTitle-Cro2S8s8.js";import{D as j}from"./DialogDescription-LvhfT1Ox.js";function _({open:l,title:n,description:t,error:s=null,confirmLabel:d,cancelLabel:o,destructive:c=!1,busy:e=!1,onConfirm:g,onCancel:i}){return a.jsx(m,{open:l,onOpenChange:x=>{!x&&!e&&i?.()},children:a.jsxs(y,{children:[a.jsx(b,{className:"fixed inset-0 z-[100] bg-black/40 backdrop-blur-[2px] transition-opacity duration-200 ease-out data-[ending-style]:opacity-0 data-[starting-style]:opacity-0"}),a.jsx(u,{className:"fixed inset-0 z-[101] flex items-center justify-center p-4",children:a.jsxs(f,{className:"relative w-full max-w-md rounded-2xl bg-white p-6 shadow-[0_20px_60px_-20px_rgba(0,0,0,0.25)] ring-1 ring-oai-gray-200 transition-[opacity,transform] duration-[220ms] ease-[cubic-bezier(0.16,1,0.3,1)] data-[ending-style]:translate-y-2 data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[starting-style]:translate-y-2 data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0 dark:bg-oai-gray-950 dark:shadow-[0_20px_60px_-10px_rgba(0,0,0,0.65)] dark:ring-oai-gray-800",children:[a.jsx(h,{className:"text-base font-semibold text-oai-black dark:text-white",children:n}),t?a.jsx(j,{className:"mt-2 text-sm leading-6 text-oai-gray-600 dark:text-oai-gray-300",children:t}):null,s?a.jsx("p",{className:"mt-2 text-sm leading-6 text-red-600 dark:text-red-400",role:"alert",children:s}):null,a.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[a.jsx(r,{type:"button",variant:"secondary",size:"sm",disabled:e,onClick:()=>i?.(),children:o}),a.jsx(r,{type:"button",size:"sm",disabled:e,onClick:()=>g?.(),className:p(c&&"!bg-red-600 hover:!bg-red-700 focus-visible:!outline-red-600 dark:!bg-red-600 dark:hover:!bg-red-500"),children:d})]})]})})]})})}export{_ as C};
@@ -0,0 +1 @@
1
+ import{j as e,y as n}from"./__vite-browser-external-Go6WKt6Z.js";import{C as c}from"./Card-BHHCCnqR.js";function g({checked:r,onChange:a,disabled:i,ariaLabel:s,id:t}){return e.jsx("button",{type:"button",id:t,role:"switch","aria-checked":r,"aria-label":s,onClick:a,disabled:i,className:"relative inline-flex h-11 w-11 min-h-11 min-w-11 shrink-0 items-center justify-center rounded-full bg-transparent p-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:cursor-not-allowed disabled:opacity-50",children:e.jsx("span",{"aria-hidden":"true",className:n("tt-toggle-track relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors",r?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:e.jsx("span",{className:n("tt-toggle-thumb inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",r?"translate-x-[18px]":"translate-x-[3px]")})})})}function u({label:r,hint:a,control:i}){return e.jsxs("div",{className:"flex flex-col gap-2 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:r}),a?e.jsx("div",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:a}):null]}),e.jsx("div",{className:"self-end sm:shrink-0 sm:self-auto",children:i})]})}function b({title:r,subtitle:a,action:i,children:s}){return e.jsxs(c,{className:"rounded-lg",children:[e.jsxs("div",{className:n("flex justify-between gap-4",a?"mb-3 items-start":"mb-2 items-center"),children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:r}),a?e.jsx("p",{className:"mt-1 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:a}):null]}),i?e.jsx("div",{className:"shrink-0",children:i}):null]}),e.jsx("div",{className:"-mb-3 divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:s})]})}const f="w-full rounded-md border border-oai-gray-300 bg-transparent px-2.5 py-1.5 text-sm text-oai-black outline-none transition-colors focus:border-oai-brand-500 focus:ring-1 focus:ring-inset focus:ring-oai-brand-500 dark:border-oai-gray-700 dark:text-white";function h({options:r,value:a,onChange:i,disabled:s=!1}){return e.jsx("div",{className:"inline-flex items-center rounded-lg border border-oai-gray-200 bg-oai-gray-50 p-0.5 dark:border-oai-gray-800 dark:bg-oai-gray-900",children:r.map(({value:t,label:d,Icon:o})=>{const l=a===t;return e.jsxs("button",{type:"button",onClick:()=>i(t),"aria-pressed":l,disabled:s,className:n("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:cursor-not-allowed disabled:opacity-50",l?"bg-white text-oai-black shadow-sm dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-500 hover:text-oai-black dark:text-oai-gray-400 dark:hover:text-white"),children:[o?e.jsx(o,{className:"h-3.5 w-3.5","aria-hidden":!0}):null,e.jsx("span",{children:d})]},t)})})}export{h as S,g as T,u as a,b,f as c};