tokentracker-cli 0.84.6 → 0.84.7
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/README.de.md +10 -8
- package/README.ja.md +9 -7
- package/README.ko.md +9 -7
- package/README.md +12 -10
- package/README.zh-CN.md +9 -7
- package/dashboard/dist/assets/{AchievementBadge-CKIvD3lG.js → AchievementBadge-DAPsTMsx.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-CZWCUiS5.js → AchievementsPage-B9oXfXvm.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-BSk_fR8P.js → AchievementsSection-DI_LTZb3.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-CjHkcmuq.js → BadgeDetailModal--WCrJWVa.js} +1 -1
- package/dashboard/dist/assets/Card-BzbSN3EC.js +1 -0
- package/dashboard/dist/assets/{ClawdAnimated-Cl6gmF7u.js → ClawdAnimated-Dgxae1At.js} +1 -1
- package/dashboard/dist/assets/{CommandPalette-B0rcodcF.js → CommandPalette-BiZBYV5A.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-BtlTJbf4.js → CommunityStatsModal-C6jZx10_.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-tJCWVZQH.js → ConfirmModal-lD-mHMvO.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-Dtxq8dzI.js → DashboardPage-DCPNoiRG.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-9USuEsRu.js → DevicePage-DiF2IOjJ.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-DxHdqMcl.js → DialogClose-Crx2EFnI.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-CHsHo924.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-C1ZeQgf2.js → DialogTitle-amHXttsp.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-Cx4jLl9G.js → FadeIn-CIhF_9PP.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-BOyuGkoA.js → HeaderGithubStar-D6Ph2GuY.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-BDhqMR3L.js → HoverTooltip-BS8eO6tj.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-DTvA9Wmx.js → IpCheckPage-Cz1Je6WS.js} +1 -1
- package/dashboard/dist/assets/LandingPage-DqeXJfwn.js +2 -0
- package/dashboard/dist/assets/{LeaderboardAvatar-3ibNg6If.js → LeaderboardAvatar-D09yLoVA.js} +1 -1
- package/dashboard/dist/assets/LeaderboardPage-BetpFetS.js +2 -0
- package/dashboard/dist/assets/{LeaderboardProfileModal-DeGbJtvi.js → LeaderboardProfileModal-UW3KnANZ.js} +4 -4
- package/dashboard/dist/assets/{LeaderboardProfilePage-DEPzO6hW.js → LeaderboardProfilePage-Chd_2AVY.js} +1 -1
- package/dashboard/dist/assets/LimitsPage-uhpNteXJ.js +4 -0
- package/dashboard/dist/assets/{LocalOnlyNotice-C76LAT_3.js → LocalOnlyNotice-CpFFX8ro.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-DEyCJT67.js → LoginCard-DkZpGnVu.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-CueMQgAZ.js → LoginModal-CALv6jkD.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-CwqBb5Fd.js → LoginPage-BZuXHYAT.js} +1 -1
- package/dashboard/dist/assets/PetPage-C1LuDyYr.js +1 -0
- package/dashboard/dist/assets/{PopoverPopup-Dt9VY2VQ.js → PopoverPopup-CluVhrMr.js} +1 -1
- package/dashboard/dist/assets/{ProviderIcon-CHx4ohfx.js → ProviderIcon-D3YKjVKb.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-DB6R7fjf.js → ResetPasswordPage-CzN50nX5.js} +1 -1
- package/dashboard/dist/assets/{SegmentedControl-BINOpXIY.js → SegmentedControl-DFOAcEKU.js} +1 -1
- package/dashboard/dist/assets/{Select-DcYXcsKv.js → Select-B3W_ihs_.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-BDv2Kb3x.js → SelectItemText-FXRtXnFV.js} +1 -1
- package/dashboard/dist/assets/ServiceStatusPage-BItZqH7q.js +1 -0
- package/dashboard/dist/assets/{SessionsPage-cL_w0ytB.js → SessionsPage-DVQU-hTH.js} +2 -2
- package/dashboard/dist/assets/SettingsPage-ByvrwOi6.js +1 -0
- package/dashboard/dist/assets/SkillsPage-DrGr5Qij.js +1 -0
- package/dashboard/dist/assets/{TokenGalaxy-BHq4YSv2.js → TokenGalaxy-ClF_n9od.js} +1 -1
- package/dashboard/dist/assets/{ToolbarRootContext-akXaaKb6.js → ToolbarRootContext-B82hGhAf.js} +1 -1
- package/dashboard/dist/assets/{TrendMonitor-DPhFXzQc.js → TrendMonitor-DkWm7_1z.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-Nf0UEz7s.js → WidgetsPage-DCY4pyR2.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-D4zOSsqD.js → WrappedPage-yGQ4DLqj.js} +1 -1
- package/dashboard/dist/assets/__vite-browser-external-BdRrPLk6.js +1483 -0
- package/dashboard/dist/assets/__vite-browser-external-hXV_ZYTG.css +1 -0
- package/dashboard/dist/assets/{agent-logos-Bja3VCAa.js → agent-logos-D5SHGOxB.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-CzcCNJJ2.js → arrow-up-right-CbMcAcss.js} +1 -1
- package/dashboard/dist/assets/{check-DUHSZCYn.js → check-Dyzh7lTz.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-jLvhaNUy.js → chevron-right-DT06ZIKC.js} +1 -1
- package/dashboard/dist/assets/{copy-ChyH-ynx.js → copy-B3Kt3Wrf.js} +1 -1
- package/dashboard/dist/assets/{download-CgwvXrUe.js → download-B3rOytqI.js} +1 -1
- package/dashboard/dist/assets/external-link-BamTP0Ks.js +1 -0
- package/dashboard/dist/assets/{flame-ysf1F8uB.js → flame-msy2h1ms.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-DAa2cubl.js → format-tokens-8b1OUM_8.js} +1 -1
- package/dashboard/dist/assets/{icons-DccoWQq9.js → icons-C2NR2_Tf.js} +1 -1
- package/dashboard/dist/assets/{index-kkQrDRat.js → index-C8sDJzUY.js} +1 -1
- package/dashboard/dist/assets/{index-CxExExXh.js → index-CvTfpiCF.js} +1 -1
- package/dashboard/dist/assets/{index-CAycNPQf.js → index-x3vFJQFt.js} +1 -1
- package/dashboard/dist/assets/{info-DWQQIq9M.js → info-C9j23aGq.js} +1 -1
- package/dashboard/dist/assets/limits-providers-ySB9Ci5l.js +1 -0
- package/dashboard/dist/assets/{link-2-CKeVVq4P.js → link-2-rrcyTT6S.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-Dw0tu6IN.js → loader-circle-x9x9I8Hv.js} +1 -1
- package/dashboard/dist/assets/{maximize-2-BMU0YzEF.js → maximize-2-7TWFb2k7.js} +1 -1
- package/dashboard/dist/assets/{provider-display-Cf9I-VLS.js → provider-display-JbSwpvxU.js} +1 -1
- package/dashboard/dist/assets/{react-BhbcISKy.js → react-DK5clHtY.js} +1 -1
- package/dashboard/dist/assets/{search-BoY8EW1z.js → search-DukXRvEV.js} +1 -1
- package/dashboard/dist/assets/{skills-api-KVH21GJw.js → skills-api-BUFJuwiR.js} +1 -1
- package/dashboard/dist/assets/{store-BL7rSajG.js → store-BTh7bv09.js} +1 -1
- package/dashboard/dist/assets/{terminal-CeMuITdm.js → terminal-CcUqLtn1.js} +1 -1
- package/dashboard/dist/assets/{trash-2-jVUCKqrR.js → trash-2-Bq7hnvNq.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-uWK0fE6l.js → use-community-stats-qTpx6ugG.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-DWsF4ShM.js → use-limits-display-prefs-Di_J4eVv.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-SEbqWDvc.js → use-native-settings-CIqpv9Z3.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-D4UhrPvw.js → use-ordered-list-OwogSXT7.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-5QGGPoom.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-DbysyUTJ.js → use-session-efficiency-pref-CjAvMh7u.js} +1 -1
- package/dashboard/dist/assets/{use-transform-DaEssGaZ.js → use-transform-KZLdt-NZ.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-CmmQ34Ov.js → use-usage-limits-Tbifa037.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-DvBEn4rx.js → useCurrency-D2td-bkn.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-QozsdFng.js → useScrollLock-Cvyfyezc.js} +1 -1
- package/dashboard/dist/assets/useTokenFormat-DYIUS6IH.js +1 -0
- package/dashboard/dist/assets/{zap-Dp_aJ1q6.js → zap-B19mEed5.js} +1 -1
- package/dashboard/dist/brand-logos/qoder.svg +5 -0
- package/dashboard/dist/index.html +18 -15
- package/dashboard/dist/ip-check.html +2 -2
- package/dashboard/dist/leaderboard.html +2 -2
- package/dashboard/dist/llms.txt +3 -2
- package/dashboard/dist/share.html +2 -2
- package/package.json +2 -2
- package/src/commands/init.js +1 -0
- package/src/commands/status.js +17 -0
- package/src/commands/sync.js +146 -126
- package/src/lib/local-api.js +4 -1
- package/src/lib/pet-packages.js +44 -2
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/provider-status.js +104 -0
- package/src/lib/qoder-limits.js +985 -0
- package/src/lib/rollout.js +385 -0
- package/src/lib/usage-limits.js +32 -2
- package/dashboard/dist/assets/Card-D6hdzwvI.js +0 -1
- package/dashboard/dist/assets/DialogDescription-DgUSe6A1.js +0 -1
- package/dashboard/dist/assets/LandingPage-k1271lWV.js +0 -2
- package/dashboard/dist/assets/LeaderboardPage-Byww5UpT.js +0 -2
- package/dashboard/dist/assets/LimitsPage-DPtqL0PS.js +0 -4
- package/dashboard/dist/assets/PetPage--xQAjW4_.js +0 -1
- package/dashboard/dist/assets/SettingsPage-CHGA0bQS.js +0 -1
- package/dashboard/dist/assets/SkillsPage-I29SqkXO.js +0 -1
- package/dashboard/dist/assets/__vite-browser-external-UqlSqI-1.js +0 -1465
- package/dashboard/dist/assets/__vite-browser-external-WKilYZnq.css +0 -1
- package/dashboard/dist/assets/limits-providers-B_18X9Rp.js +0 -1
- package/dashboard/dist/assets/use-reduced-motion-C3UrOh55.js +0 -1
- package/dashboard/dist/assets/useTokenFormat-BTLrL7Mi.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{m as c}from"./__vite-browser-external-BdRrPLk6.js";const e=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],o=c("search",e);export{o as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{x as l}from"./__vite-browser-external-BdRrPLk6.js";const i="tokentracker-skills";async function r(t){const e=new URL(`/functions/${i}`,window.location.origin);if(t)for(const[c,s]of Object.entries(t))s!=null&&s!==""&&e.searchParams.set(c,String(s));const o=await fetch(e.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),a=await o.json().catch(()=>null);if(!o.ok)throw new Error(a?.error||`Request failed with HTTP ${o.status}`);return a}async function n(t){const e=await l(),o=await fetch(`/functions/${i}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...e},cache:"no-store",body:JSON.stringify(t)}),a=await o.json().catch(()=>null);if(!o.ok||a?.ok===!1)throw new Error(a?.error||`Request failed with HTTP ${o.status}`);return a}function f(){return r({mode:"installed"})}function d(t={}){return r({mode:"discover",...t.force?{force:1}:{}})}function p(t,e=0,o=20){return r({mode:"search",q:t,offset:e,limit:o})}function k(){return r({mode:"repos"})}function S(t,e){return n({action:"install",skill:t,targets:e})}function h(t){return n({action:"uninstall",id:t})}function g(t){return n({action:"restore",id:t})}function m(t,e){return n({action:"set_targets",id:t,targets:e})}function w(t,e){return n({action:"import_local",directory:t,targets:e})}function y(t,e){return n({action:"delete_local",directory:t,targets:e||[]})}function j(t){return n({action:"add_repo",repo:t})}function T(t,e){return n({action:"remove_repo",owner:t,name:e})}function R(t={}){return r({mode:"popular",...t.force?{force:1}:{}})}function _(t={}){return r({mode:"updates",...t.force?{force:1}:{}})}function v(t={}){return r({mode:"skill_usage",...t.force?{force:1}:{}})}export{k as a,R as b,_ as c,d,v as e,y as f,f as g,m as h,S as i,w as j,T as k,j as l,g as r,p as s,h as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{W as o,Y as r}from"./__vite-browser-external-BdRrPLk6.js";import{F as u,P as d}from"./useScrollLock-Cvyfyezc.js";function a(){return new u({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new d,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function m(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:a(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:r,inactiveTriggerProps:r,popupProps:r}}function P(e,n,g=!1){return new u({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:g,onOpenChange:void 0})}const t=o(e=>e.triggerIdProp??e.activeTriggerId),i=o(e=>e.openProp??e.open),p=o(e=>(e.popupElement?.id??e.floatingId)||void 0);function l(e,n){return n!==void 0&&i(e)&&t(e)===n}function s(e,n){return l(e,n)?!0:n!==void 0&&i(e)&&t(e)==null&&e.triggerCount===1}const E={open:i,mounted:o(e=>e.mounted),transitionStatus:o(e=>e.transitionStatus),floatingRootContext:o(e=>e.floatingRootContext),triggerCount:o(e=>e.triggerCount),preventUnmountingOnClose:o(e=>e.preventUnmountingOnClose),payload:o(e=>e.payload),activeTriggerId:t,activeTriggerElement:o(e=>e.mounted?e.activeTriggerElement:null),popupId:p,isTriggerActive:o((e,n)=>n!==void 0&&t(e)===n),isOpenedByTrigger:o((e,n)=>l(e,n)),isMountedByTrigger:o((e,n)=>n!==void 0&&t(e)===n&&e.mounted),triggerProps:o((e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:o((e,n)=>s(e,n)?p(e):void 0),popupProps:o(e=>e.popupProps),popupElement:o(e=>e.popupElement),positionerElement:o(e=>e.positionerElement)};export{m as a,P as c,E as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{m as e}from"./__vite-browser-external-BdRrPLk6.js";const o=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],a=e("terminal",o);export{a as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{m as a}from"./__vite-browser-external-BdRrPLk6.js";const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],o=a("trash-2",t);export{o as T};
|
package/dashboard/dist/assets/{use-community-stats-uWK0fE6l.js → use-community-stats-qTpx6ugG.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,g as N,b as M}from"./__vite-browser-external-
|
|
1
|
+
import{r as p,g as N,b as M}from"./__vite-browser-external-BdRrPLk6.js";const D=6e3,S=2500,E=100;function h(t,r){let o;const n=new Promise((a,i)=>{o=setTimeout(()=>i(new Error("landing stats timeout")),r)});return Promise.race([t,n]).finally(()=>{o!=null&&clearTimeout(o)})}const A=5*6e4,P=1440*6e4,k="tokentracker:community-stats:v2";let s=null;function C(t){const r=Number(t?.tokenFloor)||0,o=Number(t?.totalEntries)||0;return!(r>0)||!(o>0)?null:{tokenFloor:r,totalEntries:o,top:Array.isArray(t?.top)?t.top:[],topModels:Array.isArray(t?.topModels)?t.topModels:[],providers:Array.isArray(t?.providers)?t.providers:[],dailyGrowth:Array.isArray(t?.dailyGrowth)?t.dailyGrowth:[],tokenMix:Array.isArray(t?.tokenMix)?t.tokenMix:[],userDistribution:Array.isArray(t?.userDistribution)?t.userDistribution:[],platforms:Array.isArray(t?.platforms)?t.platforms:[],activeDevelopersTotal:Number(t?.activeDevelopersTotal)||0,activeDevelopers30d:Number(t?.activeDevelopers30d)||0,tokens30d:Number(t?.tokens30d)||0,tokenGrowthPct:t?.tokenGrowthPct!=null&&Number.isFinite(Number(t.tokenGrowthPct))?Number(t.tokenGrowthPct):null,developerGrowthPct:t?.developerGrowthPct!=null&&Number.isFinite(Number(t.developerGrowthPct))?Number(t.developerGrowthPct):null,generatedAt:typeof t?.generatedAt=="string"?t.generatedAt:null}}function G(){if(typeof window>"u"||!window.localStorage)return null;try{const t=JSON.parse(window.localStorage.getItem(k)||"null"),r=Number(t?.cachedAt)||0,o=C(t?.data),n=Date.now()-r;return!o||n<0||n>P?null:{data:o,isFresh:n<A}}catch{return null}}function I(t){if(!(typeof window>"u"||!window.localStorage))try{window.localStorage.setItem(k,JSON.stringify({cachedAt:Date.now(),data:t}))}catch{}}function F(){if(s&&Date.now()-s.at<A)return s.promise;const t=Promise.all([h(N({period:"total",limit:E,offset:0}),D),h(M(),S).catch(()=>null)]);return s={at:Date.now(),promise:t},t.catch(()=>{s?.promise===t&&(s=null)}),t}function O({enabled:t=!0}={}){const[r]=p.useState(()=>G()),[o,n]=p.useState(()=>r?{status:"ready",...r.data}:{status:"loading",tokenFloor:null,totalEntries:null,top:[]});return p.useEffect(()=>{if(!t||r?.isFresh)return;let a=!1,i=null,u=null;const y=async()=>{try{const[l,e]=await F();if(a)return;const c=Array.isArray(l?.entries)?l.entries:[],b=c.reduce((m,T)=>m+(Number(T?.total_tokens)||0),0),d=Number(e?.total_tokens)||0;d>0||(s=null);const w=Number(r?.data?.tokenFloor)||0,f=d>0?d:w>0?w:b;if(!c.length||!(f>0)){n(m=>({...m,status:"error"}));return}const g=Array.isArray(e?.top_models)?e.top_models:r?.data?.topModels||[],_={tokenFloor:f,totalEntries:Number(l?.total_entries)||c.length,top:c.slice(0,3),topModels:g,providers:Array.isArray(e?.providers)?e.providers:[],dailyGrowth:Array.isArray(e?.daily_growth)?e.daily_growth:[],tokenMix:Array.isArray(e?.token_mix)?e.token_mix:[],userDistribution:Array.isArray(e?.user_distribution)?e.user_distribution:[],platforms:Array.isArray(e?.platforms)?e.platforms:[],activeDevelopersTotal:Number(e?.active_developers_total)||0,activeDevelopers30d:Number(e?.active_developers_30d)||0,tokens30d:Number(e?.tokens_30d)||0,tokenGrowthPct:e?.token_growth_pct==null?null:Number(e.token_growth_pct),developerGrowthPct:e?.developer_growth_pct==null?null:Number(e.developer_growth_pct),generatedAt:typeof e?.generated_at=="string"?e.generated_at:null};n({status:"ready",..._}),d>0&&I(_)}catch{a||n(e=>e.status==="ready"?e:{...e,status:"error"})}};return typeof window<"u"&&"requestIdleCallback"in window?i=window.requestIdleCallback(y,{timeout:1500}):u=setTimeout(y,400),()=>{a=!0,i!=null&&typeof window.cancelIdleCallback=="function"&&window.cancelIdleCallback(i),u!=null&&clearTimeout(u)}},[t,r]),o}export{O as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,
|
|
1
|
+
import{r as a,q as D,t as K,v as j,w as J}from"./__vite-browser-external-BdRrPLk6.js";import{L as q}from"./limits-providers-ySB9Ci5l.js";const p=q,g="tt.limits.providerOrder",E="tt.limits.providerVisibility",h="tt.limits.displayMode",O="tt.limits.updatedAt",M="limitsPreferences",B="limitsDisplayMode",w=Object.freeze({USED:"used",REMAINING:"remaining"}),v=new Set(Object.values(w)),L=new Set([g,E,h,O]);function A(){return[...p]}function b(){return Object.fromEntries(p.map(e=>[e,!0]))}function _(e){const t=[];if(Array.isArray(e))for(const n of e)p.includes(n)&&!t.includes(n)&&t.push(n);for(const n of p)t.includes(n)||t.push(n);return t}function N(e){const t=b();if(!e||typeof e!="object"||Array.isArray(e))return t;for(const n of p)typeof e[n]=="boolean"&&(t[n]=e[n]);return t}function G(e){return v.has(e)?e:w.USED}function y(e){if(e!=null){if(typeof e=="number")return Number.isSafeInteger(e)?e:void 0;if(typeof e=="string"){const t=e.trim();if(t==="")return;const n=Number(t);return Number.isSafeInteger(n)?n:void 0}}}function m(e={}){const t=e&&typeof e=="object"?e:{};return{displayMode:G(t.displayMode),providerOrder:_(t.providerOrder),providerVisibility:N(t.providerVisibility),updatedAt:y(t.updatedAt)}}function F(){if(typeof window>"u")return A();try{const e=window.localStorage.getItem(g);return _(e?JSON.parse(e):void 0)}catch{return A()}}function H(){if(typeof window>"u")return b();try{const e=window.localStorage.getItem(E);return N(e?JSON.parse(e):void 0)}catch{return b()}}function Q(){if(typeof window>"u")return w.USED;try{const e=window.localStorage.getItem(h);return v.has(e)?e:w.USED}catch{return w.USED}}function W(){if(!(typeof window>"u"))try{return y(window.localStorage.getItem(O))}catch{return}}function X(){if(typeof window>"u")return!1;try{for(const e of L)if(window.localStorage.getItem(e)!==null)return!0}catch{return!1}return!1}function S(){return m({displayMode:Q(),providerOrder:F(),providerVisibility:H(),updatedAt:W()})}function Z(e){if(typeof window>"u")return;const t=m(e);try{window.localStorage.setItem(g,JSON.stringify(t.providerOrder)),window.localStorage.setItem(E,JSON.stringify(t.providerVisibility)),window.localStorage.setItem(h,t.displayMode),t.updatedAt===void 0?window.localStorage.removeItem(O):window.localStorage.setItem(O,String(t.updatedAt))}catch(n){console.warn("[tokentracker] limits preferences localStorage write failed:",n)}}function $(e){const t=m(e);return{displayMode:t.displayMode,providerOrder:[...t.providerOrder],providerVisibility:{...t.providerVisibility},updatedAt:t.updatedAt??null}}function ee(...e){let t;for(const s of e){const c=y(s);c!==void 0&&(t=t===void 0?c:Math.max(t,c))}const n=Date.now();return t!==void 0&&n<=t?t+1:n}function te(e,t){return e.length===t.length&&e.every((n,s)=>n===t[s])}function re(e,t){return p.every(n=>e[n]===t[n])}function k(e,t){return e.displayMode===t.displayMode&&te(e.providerOrder,t.providerOrder)&&re(e.providerVisibility,t.providerVisibility)}function ie(e,t){return k(e,t)&&y(e.updatedAt)===y(t.updatedAt)}function V(e,t){const n=y(e.updatedAt),s=y(t.updatedAt);return n!==void 0&&(s===void 0||n>s)}function de(){const[e,t]=a.useState(S),n=a.useRef(e),s=a.useCallback((o,r={})=>{const i=m(o);return n.current=i,t(i),r.writeLocal&&Z(i),i},[]),c=a.useCallback(o=>{D()&&K(M,$(o))},[]),u=a.useCallback(o=>{const r=S(),i=V(r,n.current)?s(r):n.current,d=m(o(i));if(k(i,d))return;const f=ee(r.updatedAt,i.updatedAt),l=s({...d,updatedAt:f},{writeLocal:!0});c(l)},[s,c]),P=a.useCallback(o=>{v.has(o)&&u(r=>({...r,displayMode:o}))},[u]),I=a.useCallback(o=>{if(!v.has(o))return;const r=S();if(r.updatedAt!==void 0){s(r);return}s({...r,displayMode:o,updatedAt:void 0},{writeLocal:!0})},[s]);a.useEffect(()=>{if(!D())return;const o=j(r=>{const i=r?.[M];if(i&&typeof i=="object"){const d=m(i);if(!X()){s(d,{writeLocal:!0});return}const f=S();if(V(d,f))s(d,{writeLocal:!0});else{const l=s(f);ie(d,f)||c(l)}return}I(r?.[B])});return J(),o},[I,s,c]),a.useEffect(()=>{if(typeof window>"u")return;const o=r=>{(r.key===null||L.has(r.key))&&s(S())};return window.addEventListener("storage",o),()=>window.removeEventListener("storage",o)},[s]);const U=a.useCallback(o=>{p.includes(o)&&u(r=>({...r,providerVisibility:{...r.providerVisibility,[o]:!r.providerVisibility[o]}}))},[u]),x=a.useCallback(o=>{u(r=>{const i=r.providerOrder.indexOf(o);if(i<=0)return r;const d=[...r.providerOrder];return[d[i-1],d[i]]=[d[i],d[i-1]],{...r,providerOrder:d}})},[u]),C=a.useCallback(o=>{u(r=>{const i=r.providerOrder.indexOf(o);if(i<0||i>=r.providerOrder.length-1)return r;const d=[...r.providerOrder];return[d[i],d[i+1]]=[d[i+1],d[i]],{...r,providerOrder:d}})},[u]),R=a.useCallback((o,r)=>{o!==r&&u(i=>{const d=i.providerOrder.indexOf(o),f=i.providerOrder.indexOf(r);if(d<0||f<0)return i;const l=[...i.providerOrder],[z]=l.splice(d,1);return l.splice(f,0,z),{...i,providerOrder:l}})},[u]),Y=a.useCallback(()=>{u(()=>({displayMode:w.USED,providerOrder:A(),providerVisibility:b()}))},[u]),T=a.useMemo(()=>e.providerOrder.filter(o=>e.providerVisibility[o]!==!1),[e.providerOrder,e.providerVisibility]);return{order:e.providerOrder,visibility:e.providerVisibility,displayMode:e.displayMode,setDisplayMode:P,visibleOrdered:T,toggle:U,moveUp:x,moveDown:C,moveToward:R,reset:Y}}export{w as L,de as u};
|
package/dashboard/dist/assets/{use-native-settings-SEbqWDvc.js → use-native-settings-CIqpv9Z3.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,
|
|
1
|
+
import{j as a,e as x,r as o,S as m,U as g,v as b,w as u,t as f,N as h}from"./__vite-browser-external-BdRrPLk6.js";import{C as y}from"./Card-BzbSN3EC.js";function N({checked:t,onChange:s,disabled:e,ariaLabel:r}){return a.jsx("button",{type:"button",role:"switch","aria-checked":t,"aria-label":r,onClick:s,disabled:e,className:x("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:opacity-50 disabled:cursor-not-allowed",t?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:a.jsx("span",{className:x("inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",t?"translate-x-[18px]":"translate-x-[3px]")})})}function j({label:t,hint:s,control:e}){return a.jsxs("div",{className:"flex flex-col gap-2 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:t}),s?a.jsx("div",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:s}):null]}),a.jsx("div",{className:"self-end sm:shrink-0 sm:self-auto",children:e})]})}function k({title:t,subtitle:s,action:e,children:r}){return a.jsxs(y,{className:"rounded-lg",children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h2",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:t}),s?a.jsx("p",{className:"mt-1 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:s}):null]}),e?a.jsx("div",{className:"shrink-0",children:e}):null]}),a.jsx("div",{className:"-mb-3 divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:r})]})}function w({options:t,value:s,onChange:e,disabled:r=!1}){return a.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:t.map(({value:l,label:d,Icon:i})=>{const n=s===l;return a.jsxs("button",{type:"button",onClick:()=>e(l),"aria-pressed":n,disabled:r,className:x("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",n?"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:[i?a.jsx(i,{className:"h-3.5 w-3.5","aria-hidden":!0}):null,a.jsx("span",{children:d})]},l)})})}function S(){const[t,s]=o.useState(null),e=m()&&g();o.useEffect(()=>{if(!e)return;const i=b(n=>s(n));return u(),i},[e]);const r=o.useCallback((i,n)=>{e&&(s(c=>c&&{...c,[i]:n}),f(i,n))},[e]),l=o.useCallback(i=>{e&&h(i)},[e]),d=o.useCallback(()=>{e&&u()},[e]);return{available:e,settings:t,setSetting:r,runAction:l,refresh:d}}export{w as S,N as T,k as a,j as b,S as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,
|
|
1
|
+
import{r as c,d as P,a2 as Oe}from"./__vite-browser-external-BdRrPLk6.js";function In(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function wt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:wt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Vt(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:wt(e)?mt(e)?e:Be(e)||Vt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function yt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Mn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ke(e){const t=yt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ht(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function qt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,a)=>{const s=Object.entries(a);for(const[l,u]of s){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=qt(1),ze=qt(-1);function An(e){return"clientX"in e&&"clientY"in e}function xt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function On(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function gt(e){if(On(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return An(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Nt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Tn(e){return e.matches(Nt)?e:e.querySelector(Nt)}const Nn={display:"none"};function Ln(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:Nn},n)}function kn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function zn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Gt=c.createContext(null);function Pn(e){const t=c.useContext(Gt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Bn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(a=>{var s;return(s=a[o])==null?void 0:s.call(a,i)})},[e]),t]}const Fn={draggable:`
|
|
2
2
|
To pick up a draggable item, press the space bar.
|
|
3
3
|
While dragging, use the arrow keys to move the item.
|
|
4
4
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o}from"./__vite-browser-external-BdRrPLk6.js";import{h as r,i as t,p as s}from"./react-DK5clHtY.js";function i(){!r.current&&t();const[e]=o.useState(s.current);return e}export{i as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{m as u,r as n}from"./__vite-browser-external-BdRrPLk6.js";const f=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],E=u("pencil",f),i="tt.qualityPerDollar.enabled";function l(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(i)==="1"}catch{return!1}}function y(){const[r,o]=n.useState(l);n.useEffect(()=>{if(typeof window>"u")return;const t=e=>{(e.key===null||e.key===i)&&o(l())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[]);const a=n.useCallback(t=>{const e=!!t;o(e);try{window.localStorage.setItem(i,e?"1":"0")}catch{}},[]),s=n.useCallback(()=>a(!l()),[a]);return{enabled:r,setEnabled:a,toggle:s}}const d="tt.sessionEfficiency.enabled";function c(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(d)==="1"}catch{return!1}}function g(){const[r,o]=n.useState(c);n.useEffect(()=>{if(typeof window>"u")return;const t=e=>{(e.key===null||e.key===d)&&o(c())};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)},[]);const a=n.useCallback(t=>{const e=!!t;o(e);try{window.localStorage.setItem(d,e?"1":"0")}catch{}},[]),s=n.useCallback(()=>a(!c()),[a]);return{enabled:r,setEnabled:a,toggle:s}}export{E as P,g as a,y as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as y,u as l,e as A,M as p,b as h,f as C,g as V,j as u}from"./react-
|
|
1
|
+
import{d as y,u as l,e as A,M as p,b as h,f as C,g as V,j as u}from"./react-DK5clHtY.js";import{r as f}from"./__vite-browser-external-BdRrPLk6.js";function x(...t){const e=!Array.isArray(t[0]),n=e?0:-1,o=t[0+n],s=t[1+n],c=t[2+n],r=t[3+n],a=y(s,c,r);return e?a(o):a}function E(t){const e=l(()=>A(t)),{isStatic:n}=f.useContext(p);if(n){const[,o]=f.useState(t);f.useEffect(()=>e.on("change",o),[])}return e}function m(t,e){const n=E(e()),o=()=>n.set(e());return o(),h(()=>{const s=()=>V.preRender(o,!1,!0),c=t.map(r=>r.on("change",s));return()=>{c.forEach(r=>r()),C(o)}}),n}function L(t){u.current=[],t();const e=m(u.current,t);return u.current=void 0,e}function g(t,e,n,o){if(typeof t=="function")return L(t);const c=typeof e=="function"?e:x(e,n,o),r=Array.isArray(t)?i(t,c):i([t],([d])=>c(d)),a=Array.isArray(t)?void 0:t.accelerate;return a&&!a.isTransformed&&typeof e!="function"&&Array.isArray(n)&&o?.clamp!==!1&&(r.accelerate={...a,times:e,keyframes:n,isTransformed:!0}),r}function i(t,e){const n=l(()=>[]);return m(t,()=>{n.length=0;const o=t.length;for(let s=0;s<o;s++)n[s]=t[s].get();return e(n)})}export{g as a,E as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{q as _,ae as K,r as w,c as g,af as F,ag as M,ah as b}from"./__vite-browser-external-BdRrPLk6.js";import{l as x}from"./limits-providers-ySB9Ci5l.js";const S="native:notificationPermission";let E=null;function N(){return typeof window<"u"&&!!window.chrome?.webview}function v(){return _()?E||"unknown":N()?"granted":typeof Notification>"u"?"unsupported":Notification.permission}function L(e){if(typeof window>"u")return()=>{};const i=t=>{const a=t?.detail?.status;typeof a=="string"&&(E=a),e(v())};return window.addEventListener(S,i),e(v()),_()&&K({type:"getNotificationStatus"}),()=>window.removeEventListener(S,i)}async function I(){if(_()){K({type:"requestNotificationPermission"});return}N()||typeof Notification<"u"&&Notification.permission==="default"&&await Notification.requestPermission().catch(()=>"denied")}const p="tt.limitAlerts.enabled";function O(){try{return window.localStorage.getItem(p)==="1"}catch{return!1}}function U(){const[e,i]=w.useState(O),[t,a]=w.useState("unknown");w.useEffect(()=>L(a),[]);const y=w.useCallback(async n=>{const l=!!n;l&&await I();try{window.localStorage.setItem(p,l?"1":"0")}catch{}i(l)},[]);return{enabled:e,setEnabled:y,permissionBlocked:t==="denied"}}function A(e,i){if(!(e>0))return null;const t=(e-i)/e;return Number.isFinite(t)?Math.min(Math.max(t,0),1):null}function z(e,i,t=.03){return e>i+t}function D(e){const i=Math.max(0,Math.floor(e)),t=Math.floor(i/3600);return t>24?`${Math.floor(t/24)}d`:t>0?`${t}h`:`${Math.floor(i/60)}m`}function j(e,i){if(typeof e.windowSeconds=="number")return e.windowSeconds;if(e.windowSecondsField&&i){const t=i[e.windowSecondsField];return typeof t=="number"&&t>0?t:null}return null}function R(e){return e==null?NaN:typeof e=="number"?e*1e3:Date.parse(e)}function C({usedPercent:e,windowSeconds:i,resetMs:t,mode:a,now:y=Date.now()}){const n=Math.min(Math.max(Number(e)||0,0),100)/100,l={pacePercent:null,paceOver:!1,expectedPercent:null,runsOutEta:null,projectedEnd:null};if(!(i>0)||!Number.isFinite(t))return l;const r=Math.max(0,(t-y)/1e3),s=A(i,r);if(s==null)return l;if(l.expectedPercent=Math.round(s*100),l.paceOver=z(n,s),n>=.05){const u=a==="remaining"?1-s:s;l.pacePercent=u*100}if(s>.02&&n>0){const u=i*s,c=n/u,m=n/s;m>=1&&c>0?l.runsOutEta=D((1-n)/c):l.projectedEnd=Math.round(Math.min(m,1)*100)}return l}const T={claude:{windows(e){const i=Array.isArray(e.weekly_scoped)?e.weekly_scoped.map(t=>({key:`scoped-${t.label}`,label:t.label,window:t,pctField:"utilization",resetField:"resets_at",windowSeconds:604800})):[];return[{key:"5h",labelKey:"limits.label.claude_5h",window:e.five_hour,pctField:"utilization",resetField:"resets_at",windowSeconds:5*3600},{key:"7d",labelKey:"limits.label.claude_7d",window:e.seven_day,pctField:"utilization",resetField:"resets_at",windowSeconds:7*86400},{key:"opus",labelKey:"limits.label.claude_opus",window:e.seven_day_opus,pctField:"utilization",resetField:"resets_at",windowSeconds:7*86400},...i]}},codex:{extra:"codex_meta",windows(e){return[{key:"5h",labelKey:"limits.label.codex_5h",window:e.primary_window,windowSecondsField:"limit_window_seconds"},{key:"7d",labelKey:"limits.label.codex_7d",window:e.secondary_window,windowSecondsField:"limit_window_seconds"},{key:"credits",labelKey:"limits.label.codex_credits",window:e.credit_window},{key:"spark-5h",labelKey:"limits.label.codex_spark_5h",window:e.spark_primary_window,windowSecondsField:"limit_window_seconds"},{key:"spark-7d",labelKey:"limits.label.codex_spark_7d",window:e.spark_secondary_window,windowSecondsField:"limit_window_seconds"}]}},cursor:{windows(e){return[{key:"plan",labelKey:"limits.label.cursor_plan",window:e.primary_window},{key:"auto",labelKey:"limits.label.cursor_auto",window:e.secondary_window},{key:"api",labelKey:"limits.label.cursor_api",window:e.tertiary_window}]}},gemini:{windows(e){return[{key:"pro",labelKey:"limits.label.gemini_pro",window:e.primary_window},{key:"flash",labelKey:"limits.label.gemini_flash",window:e.secondary_window},{key:"lite",labelKey:"limits.label.gemini_lite",window:e.tertiary_window}]}},kimi:{extra:"kimi_parallel",windows(e){return[{key:"weekly",labelKey:"limits.label.kimi_weekly",window:e.primary_window,windowSeconds:7*86400},{key:"5h",labelKey:"limits.label.kimi_5h",window:e.secondary_window,windowSeconds:5*3600},{key:"total",labelKey:"limits.label.kimi_total",window:e.tertiary_window}]}},kiro:{windows(e){return[{key:"month",labelKey:"limits.label.kiro_month",window:e.primary_window},{key:"bonus",labelKey:"limits.label.kiro_bonus",window:e.secondary_window}]}},grok:{windows(e){const i=typeof e.period_type=="string"?e.period_type:null,t=i==="weekly"?"limits.label.grok_week":i==="daily"?"limits.label.grok_day":"limits.label.grok_month",a=i==="weekly"?7*86400:i==="daily"?86400:void 0;return[{key:i==="weekly"?"week":i==="daily"?"day":"month",labelKey:t,window:e.primary_window,windowSeconds:a},{key:"ondemand",labelKey:"limits.label.grok_ondemand",window:e.secondary_window}]}},antigravity:{windows(e){return[{key:"claude-weekly",labelKey:"limits.label.antigravity_claude_weekly",window:e.primary_window},{key:"claude-5h",labelKey:"limits.label.antigravity_claude_5h",window:e.secondary_window},{key:"gemini-weekly",labelKey:"limits.label.antigravity_gemini_weekly",window:e.tertiary_window},{key:"gemini-5h",labelKey:"limits.label.antigravity_gemini_5h",window:e.quaternary_window}]}},copilot:{extra:"copilot_otel",windows(e){return[{key:"premium",labelKey:"limits.label.copilot_premium",window:e.primary_window},{key:"chat",labelKey:"limits.label.copilot_chat",window:e.secondary_window}]}},zcode:{windows(e){return e.plan_kind==="coding-plan"?[{key:"5h",labelKey:"limits.label.zcode_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.zcode_weekly",window:e.secondary_window},{key:"tools",labelKey:"limits.label.zcode_tools",window:e.tertiary_window}]:[{key:"glm52",labelKey:"limits.label.zcode_glm52",window:e.primary_window},{key:"glm5t",labelKey:"limits.label.zcode_glm5t",window:e.secondary_window}]}},opencodeGo:{windows(e){return[{key:"5h",labelKey:"limits.label.opencode_go_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.opencode_go_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.opencode_go_monthly",window:e.tertiary_window}]}},qoder:{windows(e){return[{key:"credits",labelKey:"limits.label.qoder_credits",window:e.primary_window},{key:"ultimate",labelKey:"limits.label.qoder_ultimate",window:e.secondary_window,timeKind:"expiry"}]}}},P="tt.limitAlerts.cycles.v1";function q(){try{return JSON.parse(window.localStorage.getItem(P)||"{}")}catch{return{}}}function $(e){try{window.localStorage.setItem(P,JSON.stringify(e))}catch{}}function B(e,{now:i=Date.now()}={}){const t=[],a=T;for(const[y,n]of Object.entries(e||{})){const l=a[y];if(!(!n?.configured||n.error||!l))for(const r of l.windows(n)){if(!r.window)continue;const s=Number(r.pctField==="utilization"?r.window.utilization:r.window.used_percent),u=r.resetField==="resets_at"?r.window.resets_at:r.window.reset_at,c=R(u),m=C({usedPercent:s,windowSeconds:j(r,r.window),resetMs:c,mode:"used",now:i});!m.runsOutEta||!m.paceOver||s<20||!(c>i)||t.push({id:`${y}:${r.key}:${c}`,providerId:y,windowKey:r.key,resetMs:c,usedPercent:s,runsOutEta:m.runsOutEta})}}return t}function V(e){const i=q(),t=B(e);for(const n of t){if(i[n.id])continue;const l=x(n.providerId),r=g("limits.alert.title",{provider:l}),s=g("limits.alert.body",{eta:n.runsOutEta,percent:Math.round(n.usedPercent)});let u=F({title:r,body:s,id:n.id});!u&&typeof Notification<"u"&&Notification.permission==="granted"&&(new Notification(r,{body:s,tag:n.id}),u=!0),u&&(i[n.id]=Date.now())}const a=Date.now()-864e5,y=Object.fromEntries(Object.entries(i).filter(([n,l])=>{const r=Number(n.split(":").at(-1));return Number.isFinite(r)?r>=a:Number(l)>=a}).slice(-100));return $(y),t.length}function W(e){const i=!!e?.initialState,[t,a]=w.useState(()=>i?e?.initialState?.data??null:null),[y,n]=w.useState(()=>i?e?.initialState?.error??null:null),[l,r]=w.useState(!i),s=!!e?.initialRefresh,u=!!e?.publishToPreloadCache;w.useEffect(()=>{if(!(!t||typeof window>"u"))try{window.localStorage.getItem(p)==="1"&&V(t)}catch{}},[t]);const c=w.useCallback((o,d)=>{!u||!o||typeof o!="object"||M(o,{source:d})},[u]),m=w.useCallback(async()=>{try{const o=await b({refresh:!0}),d=o&&typeof o=="object"?o:null;a(d),n(null),c(d,"manual-refresh")}catch(o){n(o?.message||String(o))}},[c]),k=w.useCallback(async()=>{try{const o=await b(),d=o&&typeof o=="object"?o:null;a(d),n(null),c(d,"page-load")}catch(o){n(o?.message||String(o))}},[c]);return w.useEffect(()=>{if(typeof window>"u"||typeof document>"u")return;const o=15e3;let d=Date.now();const f=()=>{if(document.visibilityState!=="visible")return;const h=Date.now();h-d<o||(d=h,k())};return window.addEventListener("focus",f),document.addEventListener("visibilitychange",f),()=>{window.removeEventListener("focus",f),document.removeEventListener("visibilitychange",f)}},[k]),w.useEffect(()=>{if(i&&!s)return;let o=!1;return(async()=>{try{const d=await b();if(o)return;const f=d&&typeof d=="object"?d:null;a(f),n(null),c(f,"page-load")}catch(d){if(o)return;n(d?.message||String(d))}finally{o||r(!1)}})(),()=>{o=!0}},[i,s,c]),{data:t,error:y,isLoading:l,refresh:m}}export{T as P,j as a,U as b,C as c,R as r,V as s,W as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,C as t,D as r,
|
|
1
|
+
import{r as e,C as t,D as r,y as c}from"./__vite-browser-external-BdRrPLk6.js";const s=Object.freeze({currency:c,rate:1,symbol:"$",rates:{...r},rateSource:"default",rateFetchedAt:null,setCurrency:()=>{}});function a(){return e.useContext(t)??s}export{a as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bK as Ve,bL as _t,aH as Ot,aG as H,aI as wt,aU as K,bM as Ct,bn as je,j as Se,bs as ze,r as g,P as X,bN as ot,bO as Dt,aJ as it,aS as Ne,bc as Gt,bP as ct,bQ as xt,aW as x,aV as ke,ba as he,bR as Xe,bS as le,bT as ae,aE as C,aZ as Ut,bU as It,bV as Je,bd as Kt,b7 as ut,b2 as lt,b4 as Vt,bW as Xt,aD as be,b6 as $t,bX as qt,A as Pe,b1 as jt,bY as Ze,aL as Ye,bZ as zt,b_ as He,a_ as Jt,aR as Le,a$ as Zt,aT as Ie,bj as _e,bi as Qt,b$ as en,bg as tn,aF as nn,V as Te,c0 as me,c1 as rn,aO as sn,az as on,W as De,c2 as at,bu as cn,bo as Qe}from"./__vite-browser-external-UqlSqI-1.js";function Fe(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...Fe(e,s.id,n)])}function ft(e,t){let n=[],r=e.find(s=>s.id===t)?.parentId;for(;r;){const s=e.find(o=>o.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function un(e){e.preventDefault(),e.stopPropagation()}function ln(e){return"nativeEvent"in e}function an(e){return e.pointerType===""&&e.isTrusted?!0:Ve&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fn(e){return _t?!1:!Ve&&e.width===0&&e.height===0||Ve&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function qn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function dn(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Ae(e){const t=Ot(pn,e).current;return t.next=e,H(t.effect),t}function pn(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let We=0;function Ge(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(We);function o(){s&&!s()||e?.focus({preventScroll:n})}if(r)return o(),wt;const i=requestAnimationFrame(o);return We=i,()=>{We===i&&(cancelAnimationFrame(i),We=0)}}const Ue={inert:new WeakMap,"aria-hidden":new WeakMap},dt="data-base-ui-inert",$e={inert:new WeakSet,"aria-hidden":new WeakSet};let xe=new WeakMap,Ke=0;function gn(e){return $e[e]}function kt(e){return e?Ct(e)?e.host:kt(e.parentNode):null}const pt=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=kt(n);return e.contains(r)?r:null}).filter(n=>n!=null),gt=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},ht=(e,t,n)=>{const r=[],s=o=>{!o||n.has(o)||Array.from(o.children).forEach(i=>{je(i)!=="script"&&(t.has(i)?s(i):r.push(i))})};return s(e),r};function hn(e,t,n,r,{mark:s=!0}){let o=null;r?o="inert":n&&(o="aria-hidden");let i=null,u=null;const h=pt(t,e),f=s?ht(t,gt(h),new Set(h)):[],k=[],L=[];if(o){const b=Ue[o],T=gn(o);u=T,i=b;const A=pt(t,Array.from(t.querySelectorAll("[aria-live]"))),P=h.concat(A);ht(t,gt(P),new Set(P)).forEach(y=>{const E=y.getAttribute(o),Z=E!==null&&E!=="false",B=(b.get(y)||0)+1;b.set(y,B),k.push(y),B===1&&Z&&T.add(y),Z||y.setAttribute(o,o==="inert"?"":"true")})}return s&&f.forEach(b=>{const T=(xe.get(b)||0)+1;xe.set(b,T),L.push(b),T===1&&b.setAttribute(dt,"")}),Ke+=1,()=>{i&&k.forEach(b=>{const A=(i.get(b)||0)-1;i.set(b,A),A||(!u?.has(b)&&o&&b.removeAttribute(o),u?.delete(b))}),s&&L.forEach(b=>{const T=(xe.get(b)||0)-1;xe.set(b,T),T||b.removeAttribute(dt)}),Ke-=1,Ke||(Ue.inert=new WeakMap,Ue["aria-hidden"]=new WeakMap,$e.inert=new WeakSet,$e["aria-hidden"]=new WeakSet,xe=new WeakMap)}}function mt(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,o=K(e[0]).body;return hn(e,o,n,r,{mark:s})}function Pt(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class mn{nodesRef={current:[]};events=Pt();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const Ft=g.createContext(null),Mt=g.createContext(null),et=()=>g.useContext(Ft)?.id||null,tt=e=>{const t=g.useContext(Mt);return e??t};function jn(e){const t=ze(),n=tt(e),r=et();return H(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function zn(e){const{children:t,id:n}=e,r=et();return Se.jsx(Ft.Provider,{value:g.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Jn(e){const{children:t,externalTree:n}=e,r=Ot(()=>n??new mn).current;return Se.jsx(Mt.Provider,{value:r,children:t})}function bn(e,t){const n=Ye(be(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const bt=20;let fe=[];function nt(){fe=fe.filter(e=>e.deref()?.isConnected)}function Et(e){nt(),e&&je(e)!=="body"&&(fe.push(new WeakRef(e)),fe.length>bt&&(fe=fe.slice(-bt)))}function yt(){return nt(),fe[fe.length-1]?.deref()}function En(e){return e?Ze(e)?e:xt(e)[0]||e:null}function Rt(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=zt(e).filter(s=>{const o=s.getAttribute("data-tabindex")||"";return Ze(s)||s.hasAttribute("data-tabindex")&&!o.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Zn(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:o=!0,restoreFocus:i=!1,modal:u=!0,closeOnFocusOut:h=!0,openInteractionType:f="",nextFocusableElement:k,previousFocusableElement:L,beforeContentFocusGuardRef:b,externalTree:T,getInsideElements:A}=e,P="rootStore"in t?t.rootStore:t,_=P.useState("open"),y=P.useState("domReferenceElement"),E=P.useState("floatingElement"),{events:Z,dataRef:B}=P.context,$=X(()=>B.current.floatingContext?.nodeId),J=s===!1,D=ot(y)&&J,se=Ae(s),F=Ae(o),q=Ae(f),ve=Ae(_),W=tt(T),R=Dt(),Y=g.useRef(!1),oe=g.useRef(!1),ee=g.useRef(!1),te=g.useRef(null),Ee=g.useRef(""),de=g.useRef(""),pe=g.useRef(null),ye=g.useRef(null),S=it(pe,b,R?.beforeInsideRef),j=it(ye,R?.afterInsideRef),ie=Ne(),ce=Ne(),Oe=Gt(),Me=R!=null,p=ct(E),ne=X((m=p)=>m?xt(m):[]),Q=X(()=>A?.().filter(m=>m!=null)??[]);g.useEffect(()=>{if(r||!u)return;function m(N){N.key==="Tab"&&C(p,ae(K(p)))&&ne().length===0&&!D&&un(N)}const I=K(p);return x(I,"keydown",m)},[r,p,u,D,ne]),g.useEffect(()=>{if(r||!_)return;const m=K(p);function I(){ee.current=!1}function N(z){const a=be(z),O=Q(),d=C(E,a)||C(y,a)||C(R?.portalNode,a)||O.some(M=>M===a||C(M,a));ee.current=!d,de.current=z.pointerType||"keyboard",a?.closest(`[${$t}]`)&&(oe.current=!0,ce.start(0,()=>{oe.current=!1}))}function G(){de.current="keyboard"}return ke(x(m,"pointerdown",N,!0),x(m,"pointerup",I,!0),x(m,"pointercancel",I,!0),x(m,"keydown",G,!0),I)},[r,E,y,p,_,R,ce,Q]),g.useEffect(()=>{if(r||!h)return;const m=K(p);function I(){oe.current=!0,ce.start(0,()=>{oe.current=!1})}function N(O){const d=be(O);Ze(d)&&(te.current=d)}function G(O){const d=O.relatedTarget,M=O.currentTarget,U=be(O);u&&d==null&&U!=null&&C(E,U)&&Et(U),queueMicrotask(()=>{const w=$(),Re=P.context.triggerElements,c=Q(),l=d?.hasAttribute(Xe("focus-guard"))&&[pe.current,ye.current,R?.beforeInsideRef.current,R?.afterInsideRef.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,le(L),le(k)].includes(d),V=!(C(y,d)||C(E,d)||C(d,E)||C(R?.portalNode,d)||c.some(v=>v===d||C(v,d))||d!=null&&Re.hasElement(d)||Re.hasMatchingElement(v=>C(v,d))||l||W&&(Fe(W.nodesRef.current,w).find(v=>C(v.context?.elements.floating,d)||C(v.context?.elements.domReference,d))||ft(W.nodesRef.current,w).find(v=>[v.context?.elements.floating,ct(v.context?.elements.floating)].includes(d)||v.context?.elements.domReference===d)));if(M===y&&p&&Rt(p),i&&M!==y&&!qt(U)&&ae(m)===m.body){if(he(p)&&(p.focus(),i==="popup")){Oe.request(()=>{p.focus()});return}const v=ne(),ue=te.current,we=(ue&&v.includes(ue)?ue:null)||v[v.length-1]||p;he(we)&&we.focus()}if(B.current.insideReactTree){B.current.insideReactTree=!1;return}(D||!u)&&d&&V&&!oe.current&&(D||d!==yt())&&(Y.current=!0,P.setOpen(!1,Pe(jt,O)))})}function z(){ee.current||(B.current.insideReactTree=!0,ie.start(0,()=>{B.current.insideReactTree=!1}))}const a=he(y)?y:null;if(!(!E&&!a))return ke(a&&x(a,"focusout",G),a&&x(a,"pointerdown",I),E&&x(E,"focusin",N),E&&x(E,"focusout",G),E&&R&&x(E,"focusout",z,!0))},[r,y,E,p,u,W,R,P,h,i,ne,D,$,B,ie,ce,Oe,k,L,Q]),g.useEffect(()=>{if(r||!E||!_)return;const m=Array.from(R?.portalNode?.querySelectorAll(`[${Xe("portal")}]`)||[]),N=(W?ft(W.nodesRef.current,$()):[]).find(M=>ot(M.context?.elements.domReference||null))?.context?.elements.domReference,z=[...[E,...m,pe.current,ye.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,...Q()],N,le(L),le(k),D?y:null].filter(M=>M!=null),a=mt(z,{ariaHidden:u||D,mark:!1}),O=[E,...m].filter(M=>M!=null),d=mt(O);return()=>{d(),a()}},[_,r,y,E,u,R,D,W,$,k,L,Q]),H(()=>{if(!_||r||!he(p))return;const m=K(p),I=ae(m);queueMicrotask(()=>{const N=se.current,G=typeof N=="function"?N(q.current||""):N;if(G===void 0||G===!1||C(p,I))return;let a=null;const O=()=>(a==null&&(a=ne(p)),a[0]||p);let d;G===!0||G===null?d=O():d=le(G),d=d||O();const M=C(p,ae(m));Ge(d,{preventScroll:d===p,shouldFocus(){if(!ve.current)return!1;if(M)return!0;const U=ae(m);return!(U!==d&&C(p,U))}})})},[r,_,p,ne,se,q,ve]),H(()=>{if(r||!p)return;const m=K(p),I=ae(m),N=q.current==null;Et(I);function G(a){if(a.open||(Ee.current=bn(a.nativeEvent,de.current)),a.reason===Ut&&a.nativeEvent.type==="mouseleave"&&(Y.current=!0),a.reason===It)if(a.nested)Y.current=!1;else if(an(a.nativeEvent)||fn(a.nativeEvent))Y.current=!1;else{let O=!1;K(p).createElement("div").focus({get preventScroll(){return O=!0,!1}}),O?Y.current=!1:Y.current=!0}}Z.on("openchange",G);function z(){const a=F.current;let O=typeof a=="function"?a(Ee.current):a;if(O===void 0||O===!1)return null;O===null&&(O=!0);const d=y?.isConnected?y:null,M=I?.isConnected&&je(I)!=="body"?I:null;let U=N?M||d:d||M;return U||(U=yt()||null),typeof O=="boolean"?U:le(O)||U||null}return()=>{Z.off("openchange",G);const a=ae(m),O=Q(),d=C(E,a)||O.some(w=>w===a||C(w,a))||W&&Fe(W.nodesRef.current,$(),!1).some(w=>C(w.context?.elements.floating,a)),M=F.current,U=z();queueMicrotask(()=>{const w=En(U),Re=typeof M!="boolean";M&&!Y.current&&he(w)&&(!(!Re&&w!==a&&a!==m.body)||d)&&w.focus({preventScroll:!0}),Y.current=!1})}},[r,E,p,F,q,Z,W,y,$,Q]),H(()=>{if(!Je||_||!E)return;const m=ae(K(E));!he(m)||!Kt(m)||C(E,m)&&m.blur()},[_,E]),H(()=>{if(!(r||!R))return R.setFocusManagerState({modal:u,closeOnFocusOut:h,open:_,onOpenChange:P.setOpen,domReference:y}),()=>{R.setFocusManagerState(null)}},[r,R,u,_,P,h,y]),H(()=>{if(!(r||!p))return Rt(p),()=>{queueMicrotask(nt)}},[r,p]);const ge=!r&&(u?!D:!0)&&(Me||u);return Se.jsxs(g.Fragment,{children:[ge&&Se.jsx(ut,{"data-type":"inside",ref:S,onFocus:m=>{if(u){const I=ne();Ge(I[I.length-1])}else R?.portalNode&&(Y.current=!1,lt(m,R.portalNode)?Vt(y)?.focus():le(L??R.beforeOutsideRef)?.focus())}}),n,ge&&Se.jsx(ut,{"data-type":"inside",ref:j,onFocus:m=>{u?Ge(ne()[0]):R?.portalNode&&(h&&(Y.current=!0),lt(m,R.portalNode)?Xt(y)?.focus():le(k??R.afterOutsideRef)?.focus())}})]})}function yn(){return!1}function Rn(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Qn(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:o="sloppy",referencePress:i=yn,bubbles:u,externalTree:h}=t,f="rootStore"in e?e.rootStore:e,k=f.useState("open"),L=f.useState("floatingElement"),{dataRef:b}=f.context,T=tt(h),A=X(typeof s=="function"?s:()=>!1),P=typeof s=="function"?A:s,_=P!==!1,y=X(()=>o),{escapeKey:E,outsidePress:Z}=Rn(u),B=g.useRef(!1),$=g.useRef(!1),J=g.useRef(!1),D=g.useRef(!1),se=g.useRef(""),F=g.useRef(null),q=Ne(),ve=Ne(),W=X(()=>{ve.clear(),b.current.insideReactTree=!1}),R=X(S=>{const j=b.current.floatingContext?.nodeId;return(T?Fe(T.nodesRef.current,j):[]).some(ce=>ce.context?.open&&!ce.context.dataRef.current[S])}),Y=X(S=>He(S,f.select("floatingElement"))||He(S,f.select("domReferenceElement"))),oe=X(S=>{i()&&f.setOpen(!1,Pe(Jt,S.nativeEvent))}),ee=X(S=>{if(!k||!n||!r||S.key!=="Escape"||D.current||!E&&R("__escapeKeyBubbles"))return;const j=ln(S)?S.nativeEvent:S,ie=Pe(Zt,j);f.setOpen(!1,ie),ie.isCanceled||S.preventDefault(),!E&&!ie.isPropagationAllowed&&S.stopPropagation()}),te=X(()=>{b.current.insideReactTree=!0,ve.start(0,W)}),Ee=X(S=>{if(!k||!n||S.button!==0)return;const j=be(S.nativeEvent);C(f.select("floatingElement"),j)&&(B.current||(B.current=!0,$.current=!1))}),de=X(S=>{!k||!n||(S.defaultPrevented||S.nativeEvent.defaultPrevented)&&B.current&&($.current=!0)});g.useEffect(()=>{if(!k||!n)return;b.current.__escapeKeyBubbles=E,b.current.__outsidePressBubbles=Z;const S=new Le,j=new Le;function ie(){S.clear(),D.current=!0}function ce(){S.start(Je?5:0,()=>{D.current=!1})}function Oe(){J.current=!0,j.start(0,()=>{J.current=!1})}function Me(){B.current=!1,$.current=!1}function p(){const c=se.current,l=c==="pen"||!c?"mouse":c,V=y(),v=typeof V=="function"?V():V;return typeof v=="string"?v:v[l]}function ne(c){const l=p();return l==="intentional"&&c.type!=="click"||l==="sloppy"&&c.type==="click"}function Q(c){const l=b.current.floatingContext?.nodeId,V=T&&Fe(T.nodesRef.current,l).some(v=>He(c,v.context?.elements.floating));return Y(c)||V}function ge(c){if(ne(c)){c.type!=="click"&&!Y(c)&&(j.clear(),J.current=!1),W();return}if(b.current.insideReactTree){W();return}const l=be(c),V=`[${Xe("inert")}]`,v=Ie(l)?l.getRootNode():null,ue=Array.from((Ct(v)?v:K(f.select("floatingElement"))).querySelectorAll(V)),we=f.context.triggerElements;if(l&&(we.hasElement(l)||we.hasMatchingElement(re=>C(re,l))))return;let Ce=Ie(l)?l:null;for(;Ce&&!_e(Ce);){const re=Qt(Ce);if(_e(re)||!Ie(re))break;Ce=re}if(!(ue.length&&Ie(l)&&!en(l)&&!C(l,f.select("floatingElement"))&&ue.every(re=>!C(Ce,re)))){if(he(l)&&!("touches"in c)){const re=_e(l),Be=tn(l),st=/auto|scroll/,At=re||st.test(Be.overflowX),Wt=re||st.test(Be.overflowY),Nt=At&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,Lt=Wt&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,Yt=Be.direction==="rtl",Bt=Lt&&(Yt?c.offsetX<=l.offsetWidth-l.clientWidth:c.offsetX>l.clientWidth),Ht=Nt&&c.offsetY>l.clientHeight;if(Bt||Ht)return}if(!Q(c)){if(p()==="intentional"&&J.current){j.clear(),J.current=!1;return}typeof P=="function"&&!P(c)||R("__outsidePressBubbles")||(f.setOpen(!1,Pe(It,c)),W())}}}function m(c){p()!=="sloppy"||c.pointerType==="touch"||!f.select("open")||!n||Y(c)||ge(c)}function I(c){if(p()!=="sloppy"||!f.select("open")||!n||Y(c))return;const l=c.touches[0];l&&(F.current={startTime:Date.now(),startX:l.clientX,startY:l.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},q.start(1e3,()=>{F.current&&(F.current.dismissOnTouchEnd=!1,F.current.dismissOnMouseDown=!1)}))}function N(c,l){const V=be(c);if(!V)return;const v=x(V,c.type,()=>{l(c),v()})}function G(c){se.current="touch",N(c,I)}function z(c){q.clear(),c.type==="pointerdown"&&(se.current=c.pointerType),!(c.type==="mousedown"&&F.current&&!F.current.dismissOnMouseDown)&&N(c,l=>{l.type==="pointerdown"?m(l):ge(l)})}function a(c){if(!B.current)return;const l=$.current;if(Me(),p()==="intentional"){if(c.type==="pointercancel"){l&&Oe();return}if(!Q(c)){if(l){Oe();return}typeof P=="function"&&!P(c)||(j.clear(),J.current=!0,W())}}}function O(c){if(p()!=="sloppy"||!F.current||Y(c))return;const l=c.touches[0];if(!l)return;const V=Math.abs(l.clientX-F.current.startX),v=Math.abs(l.clientY-F.current.startY),ue=Math.sqrt(V*V+v*v);ue>5&&(F.current.dismissOnTouchEnd=!0),ue>10&&(ge(c),q.clear(),F.current=null)}function d(c){N(c,O)}function M(c){p()!=="sloppy"||!F.current||Y(c)||(F.current.dismissOnTouchEnd&&ge(c),q.clear(),F.current=null)}function U(c){N(c,M)}const w=K(L),Re=ke(r&&ke(x(w,"keydown",ee),x(w,"compositionstart",ie),x(w,"compositionend",ce)),_&&ke(x(w,"click",z,!0),x(w,"pointerdown",z,!0),x(w,"pointerup",a,!0),x(w,"pointercancel",a,!0),x(w,"mousedown",z,!0),x(w,"mouseup",a,!0),x(w,"touchstart",G,!0),x(w,"touchmove",d,!0),x(w,"touchend",U,!0)));return()=>{Re(),S.clear(),j.clear(),Me(),J.current=!1}},[b,L,r,_,P,k,n,E,Z,ee,W,y,R,Y,T,f,q]),g.useEffect(W,[P,W]);const pe=g.useMemo(()=>({onKeyDown:ee,onPointerDown:oe,onClick:oe}),[ee,oe]),ye=g.useMemo(()=>({onKeyDown:ee,onPointerDown:de,onMouseDown:de,onClickCapture:te,onMouseDownCapture(S){te(),Ee(S)},onPointerDownCapture(S){te(),Ee(S)},onMouseUpCapture:te,onTouchEndCapture:te,onTouchMoveCapture:te}),[ee,te,Ee,de]);return g.useMemo(()=>n?{reference:pe,floating:ye,trigger:pe}:{},[n,pe,ye])}function Tn(e){const t=g.useRef(!0);t.current&&(t.current=!1,e())}const Sn={open:Te(e=>e.open),transitionStatus:Te(e=>e.transitionStatus),domReferenceElement:Te(e=>e.domReferenceElement),referenceElement:Te(e=>e.positionReference??e.referenceElement),floatingElement:Te(e=>e.floatingElement),floatingId:Te(e=>e.floatingId)};class vn extends nn{constructor(t){const{syncOnly:n,nested:r,onOpenChange:s,triggerElements:o,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:Pt(),nested:r,triggerElements:o},Sn),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&dn(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function On(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:o,onOpenChange:i}=e,u=t.useState("open"),h=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),k=t.context.triggerElements,L=i,b=g.useRef(null);r===void 0&&b.current===null&&(b.current=new vn({open:u,transitionStatus:void 0,referenceElement:h,floatingElement:f,triggerElements:k,onOpenChange:L,floatingId:s,syncOnly:!0,nested:o}));const T=r??b.current;return t.useSyncedValue("floatingId",s),H(()=>{const A={open:u,floatingId:s,referenceElement:h,floatingElement:f};Ie(h)&&(A.domReferenceElement=h),T.state.positionReference===T.state.referenceElement&&(A.positionReference=h),T.update(A)},[u,s,h,f,T]),T.context.onOpenChange=L,T.context.nested=o,T}function wn(e,t=!1,n=!1){const[r,s]=g.useState(e&&t?"idle":void 0),[o,i]=g.useState(e);return e&&!o&&(i(!0),s("starting")),!e&&o&&r!=="ending"&&!n&&s("ending"),!e&&!o&&r==="ending"&&s(void 0),H(()=>{if(!e&&o&&r!=="ending"&&n){const u=me.request(()=>{s("ending")});return()=>{me.cancel(u)}}},[e,o,r,n]),H(()=>{if(!e||t)return;const u=me.request(()=>{s(void 0)});return()=>{me.cancel(u)}},[t,e]),H(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&s("starting");const u=me.request(()=>{s("idle")});return()=>{me.cancel(u)}},[t,e,o,r]),{mounted:o,setMounted:i,transitionStatus:r}}const er={tabIndex:-1,[rn]:""};function tr(e){return t=>t==="touch"?e.current:!0}function nr(e,t,n=!1){const r=ze(),s=et()!=null,o=g.useRef(null);e===void 0&&o.current===null&&(o.current=t(r,s));const i=e??o.current;return On({popupStore:i,treatPopupAsFloatingElement:n,floatingRootContext:i.state.floatingRootContext,floatingId:r,nested:s,onOpenChange:i.setOpen}),{store:i,internalStore:o.current}}function Cn(e,t){const n=g.useRef(null),r=g.useRef(null);return g.useCallback(s=>{if(e===void 0)return;let o=!1;if(n.current!==null){const i=n.current,u=r.current,h=t.context.triggerElements.getById(i);u&&h===u&&(t.context.triggerElements.delete(i),o=!0),n.current=null,r.current=null}if(s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s),o=!0),o){const i=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==i&&t.set("triggerCount",i)}},[t,e])}function rr(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const s=n?.id??null;(s||t)&&(e.activeTriggerId=s,e.activeTriggerElement=n??null)}function sr(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function or(e,t,n,r){Tn(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function ir(e,t,n,r){const s=n.useState("isMountedByTrigger",e),o=Cn(e,n),i=X(u=>{if(o(u),!u)return;const h=n.select("open"),f=n.select("activeTriggerId");if(f===e){n.update({activeTriggerElement:u,...h?r:null});return}f==null&&h&&n.update({activeTriggerId:e,activeTriggerElement:u,...r})});return H(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:i,isMountedByThisTrigger:s}}function cr(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),s=e.useState("triggerCount");H(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}const o=e.context.triggerElements.size,i={};e.state.triggerCount!==o&&(i.triggerCount=o);const u=e.select("activeTriggerId");let h=null;if(u){const f=e.context.triggerElements.getById(u);f?f!==e.state.activeTriggerElement&&(i.activeTriggerElement=f):h=u}if(!h&&!u&&o===1){const f=e.context.triggerElements.entries().next();if(!f.done){const[k,L]=f.value;i.activeTriggerId=k,i.activeTriggerElement=L}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),h&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const f=Pe(sn);e.setOpen(!1,f),f.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,s,n])}function ur(e,t,n){const{mounted:r,setMounted:s,transitionStatus:o}=wn(e),i=t.useState("preventUnmountingOnClose"),u=e?!1:i;t.useSyncedValues({mounted:r,transitionStatus:o,preventUnmountingOnClose:u});const h=X(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return on({enabled:r&&!e&&!u,open:e,ref:t.context.popupRef,onComplete(){e||h()}}),{forceUnmount:h,transitionStatus:o}}function lr(e,t){e.useSyncedValues(t),H(()=>()=>{e.update({activeTriggerProps:De,inactiveTriggerProps:De,popupProps:De})},[e])}function ar(e,t){H(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),H(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class fr{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}let rt=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=at.startingStyle]="startingStyle",e[e.endingStyle=at.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),qe=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const xn={[qe.popupOpen]:""},In={[qe.popupOpen]:"",[qe.pressed]:""},kn={[rt.open]:""},Pn={[rt.closed]:""},Fn={[rt.anchorHidden]:""},dr={open(e){return e?xn:null}},pr={open(e){return e?In:null}},gr={open(e){return e?kn:Pn},anchorHidden(e){return e?Fn:null}};function hr(e){return ze(e,"base-ui")}const Mn="ArrowUp",An="ArrowDown",Wn="ArrowLeft",Nn="ArrowRight",Ln="Home",Yn="End",Bn=new Set([Wn,Nn]),Hn=new Set([Mn,An]),_n=new Set([...Bn,...Hn]),mr=new Set([..._n,Ln,Yn]),br=g.forwardRef(function(t,n){const{cutout:r,...s}=t;let o;if(r){const i=r.getBoundingClientRect();o=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${i.left}px ${i.top}px,${i.left}px ${i.bottom}px,${i.right}px ${i.bottom}px,${i.right}px ${i.top}px,${i.left}px ${i.top}px)`}return Se.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});let Tt={},St={},vt="";function Dn(e){if(typeof document>"u")return!1;const t=K(e);return Ye(t).innerWidth-t.documentElement.clientWidth>0}function Gn(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=K(e),r=n.documentElement,s=n.body,o=Qe(r)?r:s,i=o.style.overflowY,u=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const h=o.offsetWidth;o.style.overflowY="hidden";const f=o.offsetWidth;return o.style.overflowY=i,r.style.scrollbarGutter=u,h===f}function Un(e){const t=K(e),n=t.documentElement,r=t.body,s=Qe(n)?n:r,o={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,o)}}function Kn(e){const t=K(e),n=t.documentElement,r=t.body,s=Ye(n);let o=0,i=0,u=!1;const h=me.create();if(Je&&(s.visualViewport?.scale??1)!==1)return()=>{};function f(){const T=s.getComputedStyle(n),A=s.getComputedStyle(r),y=(T.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,i=n.scrollLeft,Tt={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},vt=n.style.scrollBehavior,St={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const E=n.scrollHeight>n.clientHeight,Z=n.scrollWidth>n.clientWidth,B=T.overflowY==="scroll"||A.overflowY==="scroll",$=T.overflowX==="scroll"||A.overflowX==="scroll",J=Math.max(0,s.innerWidth-r.clientWidth),D=Math.max(0,s.innerHeight-r.clientHeight),se=parseFloat(A.marginTop)+parseFloat(A.marginBottom),F=parseFloat(A.marginLeft)+parseFloat(A.marginRight),q=Qe(n)?n:r;if(u=Gn(e),u){n.style.scrollbarGutter=y,q.style.overflowY="hidden",q.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:y,overflowY:"hidden",overflowX:"hidden"}),(E||B)&&(n.style.overflowY="scroll"),(Z||$)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:se||D?`calc(100dvh - ${se+D}px)`:"100dvh",width:F||J?`calc(100vw - ${F+J}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function k(){Object.assign(n.style,Tt),Object.assign(r.style,St),u||(n.scrollTop=o,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=vt)}function L(){k(),h.request(f)}f();const b=x(s,"resize",L);return()=>{h.cancel(),k(),typeof s.removeEventListener=="function"&&b()}}class Vn{lockCount=0;restore=null;timeoutLock=Le.create();timeoutUnlock=Le.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=K(t).documentElement,s=Ye(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=wt;return}const o=cn||!Dn(t);this.restore=o?Un(t):Kn(t)}}const Xn=new Vn;function Er(e=!0,t=null){H(()=>{if(e)return Xn.acquire(t)},[e,t])}export{pr as A,jn as B,rt as C,zn as D,Ge as E,vn as F,un as G,an as H,br as I,fn as J,fr as P,er as a,mr as b,tr as c,Zn as d,ar as e,cr as f,ur as g,Qn as h,Er as i,lr as j,nr as k,Tn as l,wn as m,qn as n,tt as o,gr as p,et as q,Fe as r,rr as s,dr as t,hr as u,Ae as v,sr as w,Jn as x,or as y,ir as z};
|
|
1
|
+
import{bM as Xe,bN as _t,aI as Ot,aH as H,aJ as wt,aV as K,bO as Ct,bE as je,j as Se,bJ as ze,r as g,Q as V,bP as ot,bQ as Gt,aK as it,aT as Ne,bt as Dt,bR as ct,bS as xt,aX as x,aW as ke,bb as he,bT as Ve,bU as le,bV as ae,aF as C,a_ as Ut,bW as It,bX as Je,bu as Kt,b8 as ut,b3 as lt,b5 as Xt,bY as Vt,aE as be,b7 as $t,bZ as qt,E as Pe,b2 as jt,b_ as Qe,aM as Ye,b$ as zt,c0 as He,a$ as Jt,aS as Le,b0 as Qt,aU as Ie,bA as _e,bz as Zt,c1 as en,bx as tn,aG as nn,W as Te,c2 as me,c3 as rn,aP as sn,aA as on,Y as Ge,c4 as at,bL as cn,bF as Ze}from"./__vite-browser-external-BdRrPLk6.js";function Fe(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...Fe(e,s.id,n)])}function ft(e,t){let n=[],r=e.find(s=>s.id===t)?.parentId;for(;r;){const s=e.find(o=>o.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function un(e){e.preventDefault(),e.stopPropagation()}function ln(e){return"nativeEvent"in e}function an(e){return e.pointerType===""&&e.isTrusted?!0:Xe&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function fn(e){return _t?!1:!Xe&&e.width===0&&e.height===0||Xe&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function qn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function dn(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Ae(e){const t=Ot(pn,e).current;return t.next=e,H(t.effect),t}function pn(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let We=0;function De(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(We);function o(){s&&!s()||e?.focus({preventScroll:n})}if(r)return o(),wt;const i=requestAnimationFrame(o);return We=i,()=>{We===i&&(cancelAnimationFrame(i),We=0)}}const Ue={inert:new WeakMap,"aria-hidden":new WeakMap},dt="data-base-ui-inert",$e={inert:new WeakSet,"aria-hidden":new WeakSet};let xe=new WeakMap,Ke=0;function gn(e){return $e[e]}function kt(e){return e?Ct(e)?e.host:kt(e.parentNode):null}const pt=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=kt(n);return e.contains(r)?r:null}).filter(n=>n!=null),gt=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},ht=(e,t,n)=>{const r=[],s=o=>{!o||n.has(o)||Array.from(o.children).forEach(i=>{je(i)!=="script"&&(t.has(i)?s(i):r.push(i))})};return s(e),r};function hn(e,t,n,r,{mark:s=!0}){let o=null;r?o="inert":n&&(o="aria-hidden");let i=null,u=null;const h=pt(t,e),f=s?ht(t,gt(h),new Set(h)):[],k=[],L=[];if(o){const b=Ue[o],T=gn(o);u=T,i=b;const A=pt(t,Array.from(t.querySelectorAll("[aria-live]"))),P=h.concat(A);ht(t,gt(P),new Set(P)).forEach(y=>{const E=y.getAttribute(o),Q=E!==null&&E!=="false",B=(b.get(y)||0)+1;b.set(y,B),k.push(y),B===1&&Q&&T.add(y),Q||y.setAttribute(o,o==="inert"?"":"true")})}return s&&f.forEach(b=>{const T=(xe.get(b)||0)+1;xe.set(b,T),L.push(b),T===1&&b.setAttribute(dt,"")}),Ke+=1,()=>{i&&k.forEach(b=>{const A=(i.get(b)||0)-1;i.set(b,A),A||(!u?.has(b)&&o&&b.removeAttribute(o),u?.delete(b))}),s&&L.forEach(b=>{const T=(xe.get(b)||0)-1;xe.set(b,T),T||b.removeAttribute(dt)}),Ke-=1,Ke||(Ue.inert=new WeakMap,Ue["aria-hidden"]=new WeakMap,$e.inert=new WeakSet,$e["aria-hidden"]=new WeakSet,xe=new WeakMap)}}function mt(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,o=K(e[0]).body;return hn(e,o,n,r,{mark:s})}function Pt(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class mn{nodesRef={current:[]};events=Pt();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const Ft=g.createContext(null),Mt=g.createContext(null),et=()=>g.useContext(Ft)?.id||null,tt=e=>{const t=g.useContext(Mt);return e??t};function jn(e){const t=ze(),n=tt(e),r=et();return H(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function zn(e){const{children:t,id:n}=e,r=et();return Se.jsx(Ft.Provider,{value:g.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Jn(e){const{children:t,externalTree:n}=e,r=Ot(()=>n??new mn).current;return Se.jsx(Mt.Provider,{value:r,children:t})}function bn(e,t){const n=Ye(be(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const bt=20;let fe=[];function nt(){fe=fe.filter(e=>e.deref()?.isConnected)}function Et(e){nt(),e&&je(e)!=="body"&&(fe.push(new WeakRef(e)),fe.length>bt&&(fe=fe.slice(-bt)))}function yt(){return nt(),fe[fe.length-1]?.deref()}function En(e){return e?Qe(e)?e:xt(e)[0]||e:null}function Rt(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=zt(e).filter(s=>{const o=s.getAttribute("data-tabindex")||"";return Qe(s)||s.hasAttribute("data-tabindex")&&!o.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Qn(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:o=!0,restoreFocus:i=!1,modal:u=!0,closeOnFocusOut:h=!0,openInteractionType:f="",nextFocusableElement:k,previousFocusableElement:L,beforeContentFocusGuardRef:b,externalTree:T,getInsideElements:A}=e,P="rootStore"in t?t.rootStore:t,_=P.useState("open"),y=P.useState("domReferenceElement"),E=P.useState("floatingElement"),{events:Q,dataRef:B}=P.context,$=V(()=>B.current.floatingContext?.nodeId),J=s===!1,G=ot(y)&&J,se=Ae(s),F=Ae(o),q=Ae(f),ve=Ae(_),W=tt(T),R=Gt(),Y=g.useRef(!1),oe=g.useRef(!1),ee=g.useRef(!1),te=g.useRef(null),Ee=g.useRef(""),de=g.useRef(""),pe=g.useRef(null),ye=g.useRef(null),S=it(pe,b,R?.beforeInsideRef),j=it(ye,R?.afterInsideRef),ie=Ne(),ce=Ne(),Oe=Dt(),Me=R!=null,p=ct(E),ne=V((m=p)=>m?xt(m):[]),Z=V(()=>A?.().filter(m=>m!=null)??[]);g.useEffect(()=>{if(r||!u)return;function m(N){N.key==="Tab"&&C(p,ae(K(p)))&&ne().length===0&&!G&&un(N)}const I=K(p);return x(I,"keydown",m)},[r,p,u,G,ne]),g.useEffect(()=>{if(r||!_)return;const m=K(p);function I(){ee.current=!1}function N(z){const a=be(z),O=Z(),d=C(E,a)||C(y,a)||C(R?.portalNode,a)||O.some(M=>M===a||C(M,a));ee.current=!d,de.current=z.pointerType||"keyboard",a?.closest(`[${$t}]`)&&(oe.current=!0,ce.start(0,()=>{oe.current=!1}))}function D(){de.current="keyboard"}return ke(x(m,"pointerdown",N,!0),x(m,"pointerup",I,!0),x(m,"pointercancel",I,!0),x(m,"keydown",D,!0),I)},[r,E,y,p,_,R,ce,Z]),g.useEffect(()=>{if(r||!h)return;const m=K(p);function I(){oe.current=!0,ce.start(0,()=>{oe.current=!1})}function N(O){const d=be(O);Qe(d)&&(te.current=d)}function D(O){const d=O.relatedTarget,M=O.currentTarget,U=be(O);u&&d==null&&U!=null&&C(E,U)&&Et(U),queueMicrotask(()=>{const w=$(),Re=P.context.triggerElements,c=Z(),l=d?.hasAttribute(Ve("focus-guard"))&&[pe.current,ye.current,R?.beforeInsideRef.current,R?.afterInsideRef.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,le(L),le(k)].includes(d),X=!(C(y,d)||C(E,d)||C(d,E)||C(R?.portalNode,d)||c.some(v=>v===d||C(v,d))||d!=null&&Re.hasElement(d)||Re.hasMatchingElement(v=>C(v,d))||l||W&&(Fe(W.nodesRef.current,w).find(v=>C(v.context?.elements.floating,d)||C(v.context?.elements.domReference,d))||ft(W.nodesRef.current,w).find(v=>[v.context?.elements.floating,ct(v.context?.elements.floating)].includes(d)||v.context?.elements.domReference===d)));if(M===y&&p&&Rt(p),i&&M!==y&&!qt(U)&&ae(m)===m.body){if(he(p)&&(p.focus(),i==="popup")){Oe.request(()=>{p.focus()});return}const v=ne(),ue=te.current,we=(ue&&v.includes(ue)?ue:null)||v[v.length-1]||p;he(we)&&we.focus()}if(B.current.insideReactTree){B.current.insideReactTree=!1;return}(G||!u)&&d&&X&&!oe.current&&(G||d!==yt())&&(Y.current=!0,P.setOpen(!1,Pe(jt,O)))})}function z(){ee.current||(B.current.insideReactTree=!0,ie.start(0,()=>{B.current.insideReactTree=!1}))}const a=he(y)?y:null;if(!(!E&&!a))return ke(a&&x(a,"focusout",D),a&&x(a,"pointerdown",I),E&&x(E,"focusin",N),E&&x(E,"focusout",D),E&&R&&x(E,"focusout",z,!0))},[r,y,E,p,u,W,R,P,h,i,ne,G,$,B,ie,ce,Oe,k,L,Z]),g.useEffect(()=>{if(r||!E||!_)return;const m=Array.from(R?.portalNode?.querySelectorAll(`[${Ve("portal")}]`)||[]),N=(W?ft(W.nodesRef.current,$()):[]).find(M=>ot(M.context?.elements.domReference||null))?.context?.elements.domReference,z=[...[E,...m,pe.current,ye.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,...Z()],N,le(L),le(k),G?y:null].filter(M=>M!=null),a=mt(z,{ariaHidden:u||G,mark:!1}),O=[E,...m].filter(M=>M!=null),d=mt(O);return()=>{d(),a()}},[_,r,y,E,u,R,G,W,$,k,L,Z]),H(()=>{if(!_||r||!he(p))return;const m=K(p),I=ae(m);queueMicrotask(()=>{const N=se.current,D=typeof N=="function"?N(q.current||""):N;if(D===void 0||D===!1||C(p,I))return;let a=null;const O=()=>(a==null&&(a=ne(p)),a[0]||p);let d;D===!0||D===null?d=O():d=le(D),d=d||O();const M=C(p,ae(m));De(d,{preventScroll:d===p,shouldFocus(){if(!ve.current)return!1;if(M)return!0;const U=ae(m);return!(U!==d&&C(p,U))}})})},[r,_,p,ne,se,q,ve]),H(()=>{if(r||!p)return;const m=K(p),I=ae(m),N=q.current==null;Et(I);function D(a){if(a.open||(Ee.current=bn(a.nativeEvent,de.current)),a.reason===Ut&&a.nativeEvent.type==="mouseleave"&&(Y.current=!0),a.reason===It)if(a.nested)Y.current=!1;else if(an(a.nativeEvent)||fn(a.nativeEvent))Y.current=!1;else{let O=!1;K(p).createElement("div").focus({get preventScroll(){return O=!0,!1}}),O?Y.current=!1:Y.current=!0}}Q.on("openchange",D);function z(){const a=F.current;let O=typeof a=="function"?a(Ee.current):a;if(O===void 0||O===!1)return null;O===null&&(O=!0);const d=y?.isConnected?y:null,M=I?.isConnected&&je(I)!=="body"?I:null;let U=N?M||d:d||M;return U||(U=yt()||null),typeof O=="boolean"?U:le(O)||U||null}return()=>{Q.off("openchange",D);const a=ae(m),O=Z(),d=C(E,a)||O.some(w=>w===a||C(w,a))||W&&Fe(W.nodesRef.current,$(),!1).some(w=>C(w.context?.elements.floating,a)),M=F.current,U=z();queueMicrotask(()=>{const w=En(U),Re=typeof M!="boolean";M&&!Y.current&&he(w)&&(!(!Re&&w!==a&&a!==m.body)||d)&&w.focus({preventScroll:!0}),Y.current=!1})}},[r,E,p,F,q,Q,W,y,$,Z]),H(()=>{if(!Je||_||!E)return;const m=ae(K(E));!he(m)||!Kt(m)||C(E,m)&&m.blur()},[_,E]),H(()=>{if(!(r||!R))return R.setFocusManagerState({modal:u,closeOnFocusOut:h,open:_,onOpenChange:P.setOpen,domReference:y}),()=>{R.setFocusManagerState(null)}},[r,R,u,_,P,h,y]),H(()=>{if(!(r||!p))return Rt(p),()=>{queueMicrotask(nt)}},[r,p]);const ge=!r&&(u?!G:!0)&&(Me||u);return Se.jsxs(g.Fragment,{children:[ge&&Se.jsx(ut,{"data-type":"inside",ref:S,onFocus:m=>{if(u){const I=ne();De(I[I.length-1])}else R?.portalNode&&(Y.current=!1,lt(m,R.portalNode)?Xt(y)?.focus():le(L??R.beforeOutsideRef)?.focus())}}),n,ge&&Se.jsx(ut,{"data-type":"inside",ref:j,onFocus:m=>{u?De(ne()[0]):R?.portalNode&&(h&&(Y.current=!0),lt(m,R.portalNode)?Vt(y)?.focus():le(k??R.afterOutsideRef)?.focus())}})]})}function yn(){return!1}function Rn(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Zn(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:o="sloppy",referencePress:i=yn,bubbles:u,externalTree:h}=t,f="rootStore"in e?e.rootStore:e,k=f.useState("open"),L=f.useState("floatingElement"),{dataRef:b}=f.context,T=tt(h),A=V(typeof s=="function"?s:()=>!1),P=typeof s=="function"?A:s,_=P!==!1,y=V(()=>o),{escapeKey:E,outsidePress:Q}=Rn(u),B=g.useRef(!1),$=g.useRef(!1),J=g.useRef(!1),G=g.useRef(!1),se=g.useRef(""),F=g.useRef(null),q=Ne(),ve=Ne(),W=V(()=>{ve.clear(),b.current.insideReactTree=!1}),R=V(S=>{const j=b.current.floatingContext?.nodeId;return(T?Fe(T.nodesRef.current,j):[]).some(ce=>ce.context?.open&&!ce.context.dataRef.current[S])}),Y=V(S=>He(S,f.select("floatingElement"))||He(S,f.select("domReferenceElement"))),oe=V(S=>{i()&&f.setOpen(!1,Pe(Jt,S.nativeEvent))}),ee=V(S=>{if(!k||!n||!r||S.key!=="Escape"||G.current||!E&&R("__escapeKeyBubbles"))return;const j=ln(S)?S.nativeEvent:S,ie=Pe(Qt,j);f.setOpen(!1,ie),ie.isCanceled||S.preventDefault(),!E&&!ie.isPropagationAllowed&&S.stopPropagation()}),te=V(()=>{b.current.insideReactTree=!0,ve.start(0,W)}),Ee=V(S=>{if(!k||!n||S.button!==0)return;const j=be(S.nativeEvent);C(f.select("floatingElement"),j)&&(B.current||(B.current=!0,$.current=!1))}),de=V(S=>{!k||!n||(S.defaultPrevented||S.nativeEvent.defaultPrevented)&&B.current&&($.current=!0)});g.useEffect(()=>{if(!k||!n)return;b.current.__escapeKeyBubbles=E,b.current.__outsidePressBubbles=Q;const S=new Le,j=new Le;function ie(){S.clear(),G.current=!0}function ce(){S.start(Je?5:0,()=>{G.current=!1})}function Oe(){J.current=!0,j.start(0,()=>{J.current=!1})}function Me(){B.current=!1,$.current=!1}function p(){const c=se.current,l=c==="pen"||!c?"mouse":c,X=y(),v=typeof X=="function"?X():X;return typeof v=="string"?v:v[l]}function ne(c){const l=p();return l==="intentional"&&c.type!=="click"||l==="sloppy"&&c.type==="click"}function Z(c){const l=b.current.floatingContext?.nodeId,X=T&&Fe(T.nodesRef.current,l).some(v=>He(c,v.context?.elements.floating));return Y(c)||X}function ge(c){if(ne(c)){c.type!=="click"&&!Y(c)&&(j.clear(),J.current=!1),W();return}if(b.current.insideReactTree){W();return}const l=be(c),X=`[${Ve("inert")}]`,v=Ie(l)?l.getRootNode():null,ue=Array.from((Ct(v)?v:K(f.select("floatingElement"))).querySelectorAll(X)),we=f.context.triggerElements;if(l&&(we.hasElement(l)||we.hasMatchingElement(re=>C(re,l))))return;let Ce=Ie(l)?l:null;for(;Ce&&!_e(Ce);){const re=Zt(Ce);if(_e(re)||!Ie(re))break;Ce=re}if(!(ue.length&&Ie(l)&&!en(l)&&!C(l,f.select("floatingElement"))&&ue.every(re=>!C(Ce,re)))){if(he(l)&&!("touches"in c)){const re=_e(l),Be=tn(l),st=/auto|scroll/,At=re||st.test(Be.overflowX),Wt=re||st.test(Be.overflowY),Nt=At&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,Lt=Wt&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,Yt=Be.direction==="rtl",Bt=Lt&&(Yt?c.offsetX<=l.offsetWidth-l.clientWidth:c.offsetX>l.clientWidth),Ht=Nt&&c.offsetY>l.clientHeight;if(Bt||Ht)return}if(!Z(c)){if(p()==="intentional"&&J.current){j.clear(),J.current=!1;return}typeof P=="function"&&!P(c)||R("__outsidePressBubbles")||(f.setOpen(!1,Pe(It,c)),W())}}}function m(c){p()!=="sloppy"||c.pointerType==="touch"||!f.select("open")||!n||Y(c)||ge(c)}function I(c){if(p()!=="sloppy"||!f.select("open")||!n||Y(c))return;const l=c.touches[0];l&&(F.current={startTime:Date.now(),startX:l.clientX,startY:l.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},q.start(1e3,()=>{F.current&&(F.current.dismissOnTouchEnd=!1,F.current.dismissOnMouseDown=!1)}))}function N(c,l){const X=be(c);if(!X)return;const v=x(X,c.type,()=>{l(c),v()})}function D(c){se.current="touch",N(c,I)}function z(c){q.clear(),c.type==="pointerdown"&&(se.current=c.pointerType),!(c.type==="mousedown"&&F.current&&!F.current.dismissOnMouseDown)&&N(c,l=>{l.type==="pointerdown"?m(l):ge(l)})}function a(c){if(!B.current)return;const l=$.current;if(Me(),p()==="intentional"){if(c.type==="pointercancel"){l&&Oe();return}if(!Z(c)){if(l){Oe();return}typeof P=="function"&&!P(c)||(j.clear(),J.current=!0,W())}}}function O(c){if(p()!=="sloppy"||!F.current||Y(c))return;const l=c.touches[0];if(!l)return;const X=Math.abs(l.clientX-F.current.startX),v=Math.abs(l.clientY-F.current.startY),ue=Math.sqrt(X*X+v*v);ue>5&&(F.current.dismissOnTouchEnd=!0),ue>10&&(ge(c),q.clear(),F.current=null)}function d(c){N(c,O)}function M(c){p()!=="sloppy"||!F.current||Y(c)||(F.current.dismissOnTouchEnd&&ge(c),q.clear(),F.current=null)}function U(c){N(c,M)}const w=K(L),Re=ke(r&&ke(x(w,"keydown",ee),x(w,"compositionstart",ie),x(w,"compositionend",ce)),_&&ke(x(w,"click",z,!0),x(w,"pointerdown",z,!0),x(w,"pointerup",a,!0),x(w,"pointercancel",a,!0),x(w,"mousedown",z,!0),x(w,"mouseup",a,!0),x(w,"touchstart",D,!0),x(w,"touchmove",d,!0),x(w,"touchend",U,!0)));return()=>{Re(),S.clear(),j.clear(),Me(),J.current=!1}},[b,L,r,_,P,k,n,E,Q,ee,W,y,R,Y,T,f,q]),g.useEffect(W,[P,W]);const pe=g.useMemo(()=>({onKeyDown:ee,onPointerDown:oe,onClick:oe}),[ee,oe]),ye=g.useMemo(()=>({onKeyDown:ee,onPointerDown:de,onMouseDown:de,onClickCapture:te,onMouseDownCapture(S){te(),Ee(S)},onPointerDownCapture(S){te(),Ee(S)},onMouseUpCapture:te,onTouchEndCapture:te,onTouchMoveCapture:te}),[ee,te,Ee,de]);return g.useMemo(()=>n?{reference:pe,floating:ye,trigger:pe}:{},[n,pe,ye])}function Tn(e){const t=g.useRef(!0);t.current&&(t.current=!1,e())}const Sn={open:Te(e=>e.open),transitionStatus:Te(e=>e.transitionStatus),domReferenceElement:Te(e=>e.domReferenceElement),referenceElement:Te(e=>e.positionReference??e.referenceElement),floatingElement:Te(e=>e.floatingElement),floatingId:Te(e=>e.floatingId)};class vn extends nn{constructor(t){const{syncOnly:n,nested:r,onOpenChange:s,triggerElements:o,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:Pt(),nested:r,triggerElements:o},Sn),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&dn(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function On(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:o,onOpenChange:i}=e,u=t.useState("open"),h=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),k=t.context.triggerElements,L=i,b=g.useRef(null);r===void 0&&b.current===null&&(b.current=new vn({open:u,transitionStatus:void 0,referenceElement:h,floatingElement:f,triggerElements:k,onOpenChange:L,floatingId:s,syncOnly:!0,nested:o}));const T=r??b.current;return t.useSyncedValue("floatingId",s),H(()=>{const A={open:u,floatingId:s,referenceElement:h,floatingElement:f};Ie(h)&&(A.domReferenceElement=h),T.state.positionReference===T.state.referenceElement&&(A.positionReference=h),T.update(A)},[u,s,h,f,T]),T.context.onOpenChange=L,T.context.nested=o,T}function wn(e,t=!1,n=!1){const[r,s]=g.useState(e&&t?"idle":void 0),[o,i]=g.useState(e);return e&&!o&&(i(!0),s("starting")),!e&&o&&r!=="ending"&&!n&&s("ending"),!e&&!o&&r==="ending"&&s(void 0),H(()=>{if(!e&&o&&r!=="ending"&&n){const u=me.request(()=>{s("ending")});return()=>{me.cancel(u)}}},[e,o,r,n]),H(()=>{if(!e||t)return;const u=me.request(()=>{s(void 0)});return()=>{me.cancel(u)}},[t,e]),H(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&s("starting");const u=me.request(()=>{s("idle")});return()=>{me.cancel(u)}},[t,e,o,r]),{mounted:o,setMounted:i,transitionStatus:r}}const er={tabIndex:-1,[rn]:""};function tr(e){return t=>t==="touch"?e.current:!0}function nr(e,t,n=!1){const r=ze(),s=et()!=null,o=g.useRef(null);e===void 0&&o.current===null&&(o.current=t(r,s));const i=e??o.current;return On({popupStore:i,treatPopupAsFloatingElement:n,floatingRootContext:i.state.floatingRootContext,floatingId:r,nested:s,onOpenChange:i.setOpen}),{store:i,internalStore:o.current}}function Cn(e,t){const n=g.useRef(null),r=g.useRef(null);return g.useCallback(s=>{if(e===void 0)return;let o=!1;if(n.current!==null){const i=n.current,u=r.current,h=t.context.triggerElements.getById(i);u&&h===u&&(t.context.triggerElements.delete(i),o=!0),n.current=null,r.current=null}if(s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s),o=!0),o){const i=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==i&&t.set("triggerCount",i)}},[t,e])}function rr(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const s=n?.id??null;(s||t)&&(e.activeTriggerId=s,e.activeTriggerElement=n??null)}function sr(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function or(e,t,n,r){Tn(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function ir(e,t,n,r){const s=n.useState("isMountedByTrigger",e),o=Cn(e,n),i=V(u=>{if(o(u),!u)return;const h=n.select("open"),f=n.select("activeTriggerId");if(f===e){n.update({activeTriggerElement:u,...h?r:null});return}f==null&&h&&n.update({activeTriggerId:e,activeTriggerElement:u,...r})});return H(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:i,isMountedByThisTrigger:s}}function cr(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),s=e.useState("triggerCount");H(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}const o=e.context.triggerElements.size,i={};e.state.triggerCount!==o&&(i.triggerCount=o);const u=e.select("activeTriggerId");let h=null;if(u){const f=e.context.triggerElements.getById(u);f?f!==e.state.activeTriggerElement&&(i.activeTriggerElement=f):h=u}if(!h&&!u&&o===1){const f=e.context.triggerElements.entries().next();if(!f.done){const[k,L]=f.value;i.activeTriggerId=k,i.activeTriggerElement=L}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),h&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===h&&!e.context.triggerElements.getById(h)){const f=Pe(sn);e.setOpen(!1,f),f.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,s,n])}function ur(e,t,n){const{mounted:r,setMounted:s,transitionStatus:o}=wn(e),i=t.useState("preventUnmountingOnClose"),u=e?!1:i;t.useSyncedValues({mounted:r,transitionStatus:o,preventUnmountingOnClose:u});const h=V(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return on({enabled:r&&!e&&!u,open:e,ref:t.context.popupRef,onComplete(){e||h()}}),{forceUnmount:h,transitionStatus:o}}function lr(e,t){e.useSyncedValues(t),H(()=>()=>{e.update({activeTriggerProps:Ge,inactiveTriggerProps:Ge,popupProps:Ge})},[e])}function ar(e,t){H(()=>{!t&&e.state.openMethod!==null&&e.set("openMethod",null)},[t,e]),H(()=>()=>{e.state.openMethod!==null&&e.set("openMethod",null)},[e])}class fr{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}let rt=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=at.startingStyle]="startingStyle",e[e.endingStyle=at.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),qe=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const xn={[qe.popupOpen]:""},In={[qe.popupOpen]:"",[qe.pressed]:""},kn={[rt.open]:""},Pn={[rt.closed]:""},Fn={[rt.anchorHidden]:""},dr={open(e){return e?xn:null}},pr={open(e){return e?In:null}},gr={open(e){return e?kn:Pn},anchorHidden(e){return e?Fn:null}};function hr(e){return ze(e,"base-ui")}const Mn="ArrowUp",An="ArrowDown",Wn="ArrowLeft",Nn="ArrowRight",Ln="Home",Yn="End",Bn=new Set([Wn,Nn]),Hn=new Set([Mn,An]),_n=new Set([...Bn,...Hn]),mr=new Set([..._n,Ln,Yn]),br=g.forwardRef(function(t,n){const{cutout:r,...s}=t;let o;if(r){const i=r.getBoundingClientRect();o=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${i.left}px ${i.top}px,${i.left}px ${i.bottom}px,${i.right}px ${i.bottom}px,${i.right}px ${i.top}px,${i.left}px ${i.top}px)`}return Se.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});let Tt={},St={},vt="";function Gn(e){if(typeof document>"u")return!1;const t=K(e);return Ye(t).innerWidth-t.documentElement.clientWidth>0}function Dn(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=K(e),r=n.documentElement,s=n.body,o=Ze(r)?r:s,i=o.style.overflowY,u=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const h=o.offsetWidth;o.style.overflowY="hidden";const f=o.offsetWidth;return o.style.overflowY=i,r.style.scrollbarGutter=u,h===f}function Un(e){const t=K(e),n=t.documentElement,r=t.body,s=Ze(n)?n:r,o={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,o)}}function Kn(e){const t=K(e),n=t.documentElement,r=t.body,s=Ye(n);let o=0,i=0,u=!1;const h=me.create();if(Je&&(s.visualViewport?.scale??1)!==1)return()=>{};function f(){const T=s.getComputedStyle(n),A=s.getComputedStyle(r),y=(T.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,i=n.scrollLeft,Tt={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},vt=n.style.scrollBehavior,St={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const E=n.scrollHeight>n.clientHeight,Q=n.scrollWidth>n.clientWidth,B=T.overflowY==="scroll"||A.overflowY==="scroll",$=T.overflowX==="scroll"||A.overflowX==="scroll",J=Math.max(0,s.innerWidth-r.clientWidth),G=Math.max(0,s.innerHeight-r.clientHeight),se=parseFloat(A.marginTop)+parseFloat(A.marginBottom),F=parseFloat(A.marginLeft)+parseFloat(A.marginRight),q=Ze(n)?n:r;if(u=Dn(e),u){n.style.scrollbarGutter=y,q.style.overflowY="hidden",q.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:y,overflowY:"hidden",overflowX:"hidden"}),(E||B)&&(n.style.overflowY="scroll"),(Q||$)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:se||G?`calc(100dvh - ${se+G}px)`:"100dvh",width:F||J?`calc(100vw - ${F+J}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function k(){Object.assign(n.style,Tt),Object.assign(r.style,St),u||(n.scrollTop=o,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=vt)}function L(){k(),h.request(f)}f();const b=x(s,"resize",L);return()=>{h.cancel(),k(),typeof s.removeEventListener=="function"&&b()}}class Xn{lockCount=0;restore=null;timeoutLock=Le.create();timeoutUnlock=Le.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=K(t).documentElement,s=Ye(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=wt;return}const o=cn||!Gn(t);this.restore=o?Un(t):Kn(t)}}const Vn=new Xn;function Er(e=!0,t=null){H(()=>{if(e)return Vn.acquire(t)},[e,t])}export{pr as A,jn as B,rt as C,zn as D,De as E,vn as F,un as G,an as H,br as I,fn as J,fr as P,er as a,mr as b,tr as c,Qn as d,ar as e,cr as f,ur as g,Zn as h,Er as i,lr as j,nr as k,Tn as l,wn as m,qn as n,tt as o,gr as p,et as q,Fe as r,rr as s,dr as t,hr as u,Ae as v,sr as w,Jn as x,or as y,ir as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,T as r,n,o as a,p as s}from"./__vite-browser-external-BdRrPLk6.js";const T=Object.freeze({mode:n.COMPACT,setMode:()=>{},formatTokens:(o,t={})=>s(o,t),formatTokensTooltip:(o,t={})=>a(o,t)});function f(){return e.useContext(r)??T}export{f as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{m as a}from"./__vite-browser-external-BdRrPLk6.js";const o=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],e=a("zap",o);export{e as Z};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" fill-rule="evenodd">
|
|
2
|
+
<!-- Qoder Mono from @lobehub/icons (LobeHub/lobe-icons). -->
|
|
3
|
+
<path opacity=".5" d="M23.376 14.458v-4.056c0-2.304-1.003-4.154-2.748-5.075L11.612.574l-.046.086-.045.086c1.68.886 2.644 2.673 2.644 4.902v4.056a7.928 7.928 0 01-.014.454l-.005.061c-.005.081-.01.164-.018.245a4.897 4.897 0 01-.011.1l-.01.076c-.008.068-.015.135-.025.203l-.018.113-.01.058a9.99 9.99 0 01-.098.513l-.007.03a7.209 7.209 0 01-.074.294l-.024.086c-.027.099-.056.197-.087.296l-.027.085a9.592 9.592 0 01-.111.323l-.033.085-.018.046c-.032.082-.064.166-.098.248-.019.048-.04.096-.061.145l-.007.017a6 6 0 01-.084.187c-.024.056-.05.11-.077.165-.03.061-.058.122-.089.182a9.423 9.423 0 01-.176.332c-.03.056-.062.111-.094.167-.031.053-.062.108-.095.16-.033.055-.066.11-.101.164-.033.053-.065.104-.1.155-.034.055-.07.107-.111.169l-.099.144a15.193 15.193 0 01-.34.457c-.04.05-.08.102-.121.151l-.107.128-.007.008a6.987 6.987 0 01-.262.298l-.149.16-.116.12a9.562 9.562 0 01-.204.198l-.03.03-.072.069a9.05 9.05 0 01-.263.235l-.025.022-.029.026-.042.035a11.7 11.7 0 01-.22.18l-.07.055-.018.013a8.904 8.904 0 01-.194.146c-.029.02-.057.042-.086.063a7.7 7.7 0 01-.22.152l-.057.04a8.865 8.865 0 01-.293.185l-.062.037a10.424 10.424 0 01-.307.173l-.037.02-.196.103-.108.052-.012.006a6.196 6.196 0 01-.315.143c-.065.028-.13.054-.196.08l-.035.014-.086.034c-.07.026-.143.05-.215.075l-.039.014-.064.023a8.056 8.056 0 01-.323.097l-.63.173a7.285 7.285 0 01-.33.08l-.07.015c-.053.012-.104.023-.157.032l-.065.011-.085.015a2.332 2.332 0 01-.194.027l-.085.01a4.715 4.715 0 01-.16.018l-.034.003a4.861 4.861 0 01-.246.016h-.033a2.714 2.714 0 01-.155.005h-.106a3.384 3.384 0 01-.225-.007H4.86l-.15-.012-.066-.006a5.586 5.586 0 01-.187-.02l-.04-.005a5.14 5.14 0 01-.219-.035l-.054-.01a6.943 6.943 0 01-.347-.082l-.03-.008-.038-.01a5.034 5.034 0 01-.269-.086l-.063-.023a4.216 4.216 0 01-.188-.073l-.071-.031-.016-.007a4.959 4.959 0 01-.16-.074l-.026-.013a.164.164 0 00-.014-.007l-.671-.351.486.486h.016l8.995 4.742.093.048.03.014.02.01c.056.026.111.052.169.076l.016.008.073.032.195.076.022.008a.718.718 0 01.03.012l.014.004a4.693 4.693 0 00.323.1l.027.007c.073.02.147.038.22.055l.018.004.027.006.066.013.088.016c.075.014.15.026.226.038l.042.004c.064.009.128.016.193.022l.126.012.06.003.05.002.098.005c.046.002.094.002.14.003h.12c.05 0 .1-.002.161-.005h.033l.07-.004a6.17 6.17 0 00.184-.014l.033-.003a.753.753 0 00.058-.005l.108-.012.081-.01.08-.01.129-.021.082-.014.071-.012c.054-.01.107-.021.16-.033l.066-.013.059-.013c.096-.022.192-.046.287-.073l.63-.172a7.354 7.354 0 00.397-.122l.04-.015c.075-.025.149-.051.222-.078.032-.011.062-.024.093-.037l.03-.012c.067-.027.135-.054.2-.082l.128-.056.195-.09.021-.01.102-.05c.068-.034.135-.069.202-.105l.037-.02.073-.038c.08-.044.16-.092.24-.139l.026-.015a8.086 8.086 0 00.322-.2l.065-.045 1.98.902a1.748 1.748 0 002.472-1.59v-7.33l.004.004z"/>
|
|
4
|
+
<path d="M11.617.576a3.904 3.904 0 00-.093-.047c-.016-.009-.033-.016-.05-.024a5.854 5.854 0 00-.166-.077l-.09-.04a4.094 4.094 0 00-.194-.074c-.017-.006-.035-.015-.053-.02l-.013-.005a5.18 5.18 0 00-.277-.088l-.07-.019a4.034 4.034 0 00-.219-.053c-.015-.003-.03-.008-.044-.012L10.253.1l-.057-.011a5.177 5.177 0 00-.225-.036L9.928.047a5.972 5.972 0 00-.191-.022L9.669.02a1.33 1.33 0 00-.058-.005L9.515.009a4.058 4.058 0 00-.111-.005C9.354 0 9.304 0 9.254 0h-.109c-.052 0-.106.004-.16.004L8.884.01A5.32 5.32 0 008.7.022l-.083.006h-.008c-.05.005-.1.013-.15.019l-.12.014c-.056.008-.112.018-.169.028-.037.006-.074.011-.11.018a7.054 7.054 0 00-.572.133l-.63.172c-.111.031-.22.064-.33.1-.037.011-.072.025-.108.037a12.91 12.91 0 00-.345.126c-.067.027-.133.054-.2.083l-.128.055a11.916 11.916 0 00-.318.15 7.376 7.376 0 00-.311.163c-.082.045-.16.092-.24.14a9.424 9.424 0 00-.35.218l-.016.01-.06.04a9.242 9.242 0 00-.51.37 12.54 12.54 0 00-.315.254l-.043.034-.01.007-.045.041c-.09.078-.18.158-.268.24l-.106.101c-.07.067-.139.135-.207.204l-.056.054-.063.067-.153.164-.12.133-.148.17c-.024.03-.049.057-.073.086l-.043.053a5.96 5.96 0 00-.123.155l-.118.151c-.04.053-.08.106-.118.16l-.075.101-.038.056-.107.155-.11.164a9.91 9.91 0 00-.168.265c-.012.02-.023.043-.037.063a12.43 12.43 0 00-.192.335l-.09.168c-.019.034-.04.07-.057.105-.011.022-.02.043-.032.065l-.092.188-.08.167a19.15 19.15 0 00-.083.192c-.017.038-.035.076-.05.115-.008.016-.014.034-.021.051-.035.083-.067.167-.1.253l-.051.134c-.04.11-.077.22-.113.33l-.02.057c0 .002 0 .005-.002.007l-.008.026c-.032.1-.06.2-.09.301l-.023.089c-.027.1-.052.2-.075.301l-.007.03a7.63 7.63 0 00-.057.267l-.008.048c-.015.074-.026.148-.038.223L.082 8.4c-.011.078-.02.156-.029.234-.006.051-.013.103-.017.154a6.57 6.57 0 00-.02.26c-.003.044-.007.086-.009.13-.004.128-.007.257-.007.386v4.056c0 1.478.42 2.741 1.138 3.692A4.75 4.75 0 002.73 18.67l9.015 4.753c-1.656-.874-2.728-2.685-2.73-5.051v-4.056c0-.13.004-.26.01-.39.002-.043.006-.085.01-.128.005-.088.01-.174.019-.261l.017-.155c.01-.077.018-.155.029-.234l.026-.164c.013-.074.025-.15.039-.223.02-.105.04-.21.064-.313l.008-.031c.023-.1.048-.201.075-.301l.023-.088c.028-.1.058-.202.09-.302l.008-.025.021-.063c.036-.11.073-.22.113-.33l.052-.134c.031-.085.065-.169.1-.253.022-.056.047-.111.07-.166a13.856 13.856 0 01.164-.358c.03-.063.06-.126.092-.188l.088-.172a9.22 9.22 0 01.187-.338l.096-.164c.034-.057.069-.112.104-.168l.1-.159a10.49 10.49 0 01.567-.786l.123-.155.116-.139c.05-.057.098-.115.148-.171a14.092 14.092 0 01.272-.297 9.706 9.706 0 01.432-.425c.088-.083.177-.163.268-.241l.054-.048a10.08 10.08 0 01.553-.435l.092-.068c.075-.053.15-.105.226-.156.019-.013.038-.028.06-.04a9.18 9.18 0 01.362-.227c.08-.047.16-.094.241-.139l.11-.058a7.643 7.643 0 01.521-.256l.126-.056a7.509 7.509 0 01.546-.208l.107-.037c.11-.036.22-.069.33-.1l.63-.172c.095-.026.191-.05.287-.072l.097-.02c.062-.014.125-.029.187-.04l.114-.018c.055-.01.11-.02.166-.028.04-.006.08-.01.12-.014.053-.007.105-.014.157-.019l.083-.006c.061-.005.123-.01.184-.013.034-.003.067-.003.101-.004l.16-.006h.11a3.187 3.187 0 01.261.008l.153.01.067.007c.064.006.128.013.192.022l.043.005a5.232 5.232 0 01.281.047l.141.03c.073.016.146.035.218.053l.07.019c.094.026.187.055.278.087l.067.025a4.326 4.326 0 01.449.19l.143.072L11.617.576z"/>
|
|
5
|
+
</svg>
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"price": "0",
|
|
124
124
|
"priceCurrency": "USD"
|
|
125
125
|
},
|
|
126
|
-
"description": "Local-first AI coding usage tracker for
|
|
126
|
+
"description": "Local-first AI coding usage tracker for 28 tools, with a desktop pet, four widgets, achievements, native macOS and Windows apps, accurate cross-provider deduplication, and no prompt collection."
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"@type": "WebSite",
|
|
@@ -190,7 +190,8 @@
|
|
|
190
190
|
{ "@type": "ListItem", "position": 24, "name": "Droid" },
|
|
191
191
|
{ "@type": "ListItem", "position": 25, "name": "Mimo Code" },
|
|
192
192
|
{ "@type": "ListItem", "position": 26, "name": "ZCode" },
|
|
193
|
-
{ "@type": "ListItem", "position": 27, "name": "
|
|
193
|
+
{ "@type": "ListItem", "position": 27, "name": "Qoder" },
|
|
194
|
+
{ "@type": "ListItem", "position": 28, "name": "AnythingLLM Desktop" }
|
|
194
195
|
]
|
|
195
196
|
},
|
|
196
197
|
{
|
|
@@ -209,7 +210,7 @@
|
|
|
209
210
|
"name": "Which AI coding CLIs does Token Tracker support?",
|
|
210
211
|
"acceptedAnswer": {
|
|
211
212
|
"@type": "Answer",
|
|
212
|
-
"text": "Token Tracker supports
|
|
213
|
+
"text": "Token Tracker supports 28 AI coding tools, including Claude Code, Codex CLI, Cursor, Gemini CLI, Antigravity, Kiro, OpenCode, OpenClaw, GitHub Copilot, Kimi Code, Grok Build, Kilo, Roo Code, Zed, Goose, Droid, Mimo Code, ZCode, Qoder, and AnythingLLM Desktop."
|
|
213
214
|
}
|
|
214
215
|
},
|
|
215
216
|
{
|
|
@@ -233,7 +234,7 @@
|
|
|
233
234
|
"name": "What does Token Tracker track?",
|
|
234
235
|
"acceptedAnswer": {
|
|
235
236
|
"@type": "Answer",
|
|
236
|
-
"text": "Token Tracker tracks input, output, cached, and cache-creation tokens per model, project, and time window. It also detects
|
|
237
|
+
"text": "Token Tracker tracks input, output, cached, and cache-creation tokens per model, project, and time window. It also detects usage limits for 12 providers, including Claude, Codex, Cursor, Gemini, Antigravity, and Qoder."
|
|
237
238
|
}
|
|
238
239
|
},
|
|
239
240
|
{
|
|
@@ -241,7 +242,7 @@
|
|
|
241
242
|
"name": "How do I monitor AI token usage and cost across tools?",
|
|
242
243
|
"acceptedAnswer": {
|
|
243
244
|
"@type": "Answer",
|
|
244
|
-
"text": "Install Token Tracker with npx tokentracker-cli. It is an AI token usage and cost tracker that monitors token consumption and spend across all
|
|
245
|
+
"text": "Install Token Tracker with npx tokentracker-cli. It is an AI token usage and cost tracker that monitors token consumption and spend across all 28 supported tools in one dashboard, with per-model pricing across 2,200+ models so you can see cost by model, project, and time window without manual tracking."
|
|
245
246
|
}
|
|
246
247
|
},
|
|
247
248
|
{
|
|
@@ -257,15 +258,15 @@
|
|
|
257
258
|
]
|
|
258
259
|
}
|
|
259
260
|
</script>
|
|
260
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
261
|
-
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-
|
|
261
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-BdRrPLk6.js"></script>
|
|
262
|
+
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-hXV_ZYTG.css">
|
|
262
263
|
</head>
|
|
263
264
|
<body>
|
|
264
265
|
<main class="aeo-seed-content" aria-label="Token Tracker AI-readable summary">
|
|
265
266
|
<h1>Token Tracker: monitor AI token usage and cost with a local dashboard and desktop companion</h1>
|
|
266
267
|
<p>
|
|
267
268
|
Token Tracker is a free, open-source, local-first dashboard that automatically tracks and monitors token usage
|
|
268
|
-
and cost across
|
|
269
|
+
and cost across 28 AI coding tools — including Claude Code, OpenAI Codex, Cursor, and Gemini CLI. A desktop pet
|
|
269
270
|
reacts to real token activity, four desktop widgets
|
|
270
271
|
keep usage visible, and achievements turn coding history into progress. Native macOS and Windows apps
|
|
271
272
|
sit on top of accurate cross-provider deduplication. Token counts only — never prompts or conversations.
|
|
@@ -290,9 +291,10 @@
|
|
|
290
291
|
<li><strong>Desktop pet</strong> — a pixel companion that reacts to real token burn, streaks, and rest.</li>
|
|
291
292
|
<li><strong>Four desktop widgets</strong> — usage, activity heatmap, top models, and limits at a glance.</li>
|
|
292
293
|
<li><strong>Achievements</strong> — unlock milestones from local and optional account-wide activity.</li>
|
|
293
|
-
<li><strong>Unified usage dashboard</strong> — input, output, cached, and cache-creation tokens across
|
|
294
|
+
<li><strong>Unified usage dashboard</strong> — input, output, cached, and cache-creation tokens across 28 AI coding tools.</li>
|
|
294
295
|
<li><strong>Cost analysis</strong> — per-model pricing across 2,200+ models with an offline snapshot.</li>
|
|
295
|
-
<li><strong>Usage limits view</strong> — live
|
|
296
|
+
<li><strong>Usage limits view</strong> — live quota and subscription status for 12 providers, with last-good caching for local providers such as Antigravity and Qoder.</li>
|
|
297
|
+
<li><strong>Service Status page</strong> — live operational and incident status from eight official provider status pages.</li>
|
|
296
298
|
<li><strong>Project attribution</strong> — see which repository or workspace consumed which tokens.</li>
|
|
297
299
|
<li><strong>Activity heatmap & trend charts</strong> — GitHub-style contribution calendar plus day / week / month / total / custom-range charts.</li>
|
|
298
300
|
<li><strong>Skills browser</strong> — discover and install agent skills from the open ecosystem.</li>
|
|
@@ -300,11 +302,11 @@
|
|
|
300
302
|
</ul>
|
|
301
303
|
<p><em>Privacy by design</em>: token counts only, never prompts or conversation content. Local-first; cloud sync is optional and powers only the public leaderboard.</p>
|
|
302
304
|
|
|
303
|
-
<h2>Supported AI coding tools (
|
|
305
|
+
<h2>Supported AI coding tools (28)</h2>
|
|
304
306
|
<p>
|
|
305
307
|
Use Token Tracker as a Claude Code token tracker, Codex token tracker, Cursor token tracker,
|
|
306
308
|
Gemini token tracker, OpenCode token tracker, or GitHub Copilot token tracker — one dashboard
|
|
307
|
-
covers all
|
|
309
|
+
covers all 28 tools below.
|
|
308
310
|
</p>
|
|
309
311
|
<ul>
|
|
310
312
|
<li><strong>Claude Code</strong> — Anthropic's official coding agent CLI; integrated via SessionEnd hook.</li>
|
|
@@ -333,6 +335,7 @@
|
|
|
333
335
|
<li><strong>Droid (Factory)</strong> — passive cumulative session reader.</li>
|
|
334
336
|
<li><strong>Mimo Code</strong> — passive SQLite reader that excludes mirrored Claude history.</li>
|
|
335
337
|
<li><strong>ZCode</strong> — passive SQLite reader for Z.ai-native turns.</li>
|
|
338
|
+
<li><strong>Qoder</strong> — passive SQLite reader with exact prompt, cached-input, and completion token counters.</li>
|
|
336
339
|
<li><strong>AnythingLLM Desktop</strong> — passive per-message token metrics reader.</li>
|
|
337
340
|
</ul>
|
|
338
341
|
|
|
@@ -364,7 +367,7 @@
|
|
|
364
367
|
<p>Run <code>npx tokentracker-cli</code>. The CLI auto-detects your AI coding tools, installs hooks, and opens the dashboard.</p>
|
|
365
368
|
|
|
366
369
|
<h3>Which AI coding tools does Token Tracker support?</h3>
|
|
367
|
-
<p>Token Tracker supports
|
|
370
|
+
<p>Token Tracker supports 28 tools: Claude Code, Codex CLI, Cursor, Gemini CLI, Antigravity, Kiro, OpenCode, OpenClaw, Every Code, Hermes Agent, GitHub Copilot, Kimi Code, CodeBuddy, WorkBuddy, Grok Build, oh-my-pi, pi, Craft Agents, Kilo CLI, Kilo Code, Roo Code, Zed Agent, Goose, Droid, Mimo Code, ZCode, Qoder, and AnythingLLM Desktop.</p>
|
|
368
371
|
|
|
369
372
|
<h3>Is Token Tracker free and open source?</h3>
|
|
370
373
|
<p>Yes. Source on GitHub at <a href="https://github.com/mm7894215/TokenTracker">github.com/mm7894215/TokenTracker</a>; npm package <code>tokentracker-cli</code>.</p>
|
|
@@ -373,10 +376,10 @@
|
|
|
373
376
|
<p>No. Only token counts, model names, timestamps, and project attribution are recorded. Prompts and completions are never read or uploaded.</p>
|
|
374
377
|
|
|
375
378
|
<h3>What does Token Tracker track?</h3>
|
|
376
|
-
<p>Input, output, cached, and cache-creation tokens per model, project, and time window. It also surfaces
|
|
379
|
+
<p>Input, output, cached, and cache-creation tokens per model, project, and time window. It also surfaces usage limits for 12 providers, including Claude, Codex, Cursor, Gemini, Antigravity, and Qoder.</p>
|
|
377
380
|
|
|
378
381
|
<h3>How do I monitor AI token usage and cost across tools?</h3>
|
|
379
|
-
<p>Token Tracker is an AI token usage and cost tracker: install it with <code>npx tokentracker-cli</code>, and it monitors token consumption and spend across all
|
|
382
|
+
<p>Token Tracker is an AI token usage and cost tracker: install it with <code>npx tokentracker-cli</code>, and it monitors token consumption and spend across all 28 tools in one dashboard, with per-model pricing across 2,200+ models so you can see cost by model, project, and time window without manual tracking.</p>
|
|
380
383
|
|
|
381
384
|
<h3>Does Token Tracker work offline?</h3>
|
|
382
385
|
<p>Yes. Token Tracker is local-first. All parsing, aggregation, and dashboard rendering happen on your machine. Cloud sync is optional and powers only the public leaderboard.</p>
|
|
@@ -165,8 +165,8 @@
|
|
|
165
165
|
]
|
|
166
166
|
}
|
|
167
167
|
</script>
|
|
168
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
169
|
-
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-
|
|
168
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-BdRrPLk6.js"></script>
|
|
169
|
+
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-hXV_ZYTG.css">
|
|
170
170
|
</head>
|
|
171
171
|
<body>
|
|
172
172
|
<main class="aeo-seed-content" aria-label="Claude IP Check AI-readable summary">
|
|
@@ -136,8 +136,8 @@
|
|
|
136
136
|
]
|
|
137
137
|
}
|
|
138
138
|
</script>
|
|
139
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
140
|
-
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-
|
|
139
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-BdRrPLk6.js"></script>
|
|
140
|
+
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-hXV_ZYTG.css">
|
|
141
141
|
</head>
|
|
142
142
|
<body>
|
|
143
143
|
<main class="aeo-seed-content" aria-label="AI Coding Token Usage Leaderboard AI-readable summary">
|
package/dashboard/dist/llms.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Token Tracker LLMs Index
|
|
2
2
|
|
|
3
3
|
Token Tracker is a free, open-source, local-first AI coding usage and cost
|
|
4
|
-
tracker for
|
|
4
|
+
tracker for 28 tools. Its distinctive desktop experience includes a pixel pet
|
|
5
5
|
powered by real token activity, four desktop widgets, and achievements. The
|
|
6
6
|
same data powers a cross-platform CLI, a native macOS menu bar app, a native
|
|
7
7
|
Windows system tray app, and a dashboard. It records token counts and
|
|
@@ -23,7 +23,7 @@ timestamps, never prompts, responses, or source code.
|
|
|
23
23
|
- [npm package](https://www.npmjs.com/package/tokentracker-cli)
|
|
24
24
|
- [Latest release](https://github.com/mm7894215/TokenTracker/releases/latest)
|
|
25
25
|
|
|
26
|
-
## Supported AI coding tools (
|
|
26
|
+
## Supported AI coding tools (28)
|
|
27
27
|
- Claude Code
|
|
28
28
|
- Codex CLI
|
|
29
29
|
- Cursor
|
|
@@ -50,6 +50,7 @@ timestamps, never prompts, responses, or source code.
|
|
|
50
50
|
- Droid (Factory)
|
|
51
51
|
- Mimo Code
|
|
52
52
|
- ZCode
|
|
53
|
+
- Qoder
|
|
53
54
|
- AnythingLLM Desktop
|
|
54
55
|
|
|
55
56
|
## Capabilities
|