tokentracker-cli 0.91.0 → 0.91.3
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 +6 -5
- package/README.ja.md +8 -5
- package/README.ko.md +8 -5
- package/README.md +6 -5
- package/README.zh-CN.md +5 -4
- package/dashboard/dist/assets/{AchievementBadge-iyRg0rYF.js → AchievementBadge-LHOuekQ3.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-CkBm3bN3.js → AchievementsPage-DNzeYWBl.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-a4Z7VtlP.js → AchievementsSection-Ch5dImt8.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-DHTN0Ky6.js → BadgeDetailModal-CuikWkUy.js} +1 -1
- package/dashboard/dist/assets/{Card-CdygGEqz.js → Card-Chwjmxjz.js} +1 -1
- package/dashboard/dist/assets/{ClawdAnimated-D-Z823Nc.js → ClawdAnimated-BdB7aycS.js} +1 -1
- package/dashboard/dist/assets/{CommandPalette-VGkj8w2X.js → CommandPalette-BMwuSEWM.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-BDT4xqfF.js → CommunityStatsModal-eEDF-xn8.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-BIKv4AlL.js → ConfirmModal-Be7f6XdL.js} +1 -1
- package/dashboard/dist/assets/{Controls-BkZVm9t1.js → Controls-CtBFPCBY.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-BFkdjUdd.js → DashboardPage-M0p-SU-f.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-BGw861bu.js → DevicePage-CAfcUond.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-CSEl6ru8.js → DialogClose-kd1wIljN.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-CjJLpfCL.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-CWPdu5V-.js → DialogTitle-DhB-tbnZ.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-CdCANtvs.js → FadeIn-B8eRWBdy.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-dQQnH85f.js → HeaderGithubStar-DmWep8uP.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-CqJUI-WG.js → HoverTooltip-DDyTZli0.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-BRqTXlSu.js → IpCheckPage-CN8hYm4o.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-DhMTgDng.js → LandingPage-B3cHASqK.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardAvatar-BrGcByG1.js → LeaderboardAvatar-CEcLXrJL.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-BmdopPjo.js → LeaderboardPage-H6HW9hon.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-DRZqPo-A.js → LeaderboardProfileModal-B_5PyjRA.js} +4 -4
- package/dashboard/dist/assets/{LeaderboardProfilePage-CTbC39KX.js → LeaderboardProfilePage-DR9KWLWv.js} +3 -3
- package/dashboard/dist/assets/{LimitsPage-B7AuLq1S.js → LimitsPage-Da0hRxO_.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-DyIAspoq.js → LocalOnlyNotice-DuTdva_n.js} +1 -1
- package/dashboard/dist/assets/LoginCard-DOL3osrj.js +1 -0
- package/dashboard/dist/assets/{LoginModal-D3bmr_jI.js → LoginModal-DBmaQL2L.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-D7SgmEhZ.js → LoginPage-Dk08VrkC.js} +1 -1
- package/dashboard/dist/assets/{PetPage-5A3Q0zlw.js → PetPage-BbCIdpzx.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-ajEhdI8m.js → PopoverPopup-C1fJZ4qt.js} +1 -1
- package/dashboard/dist/assets/ProviderIcon-FfLD-f73.js +1 -0
- package/dashboard/dist/assets/{ResetPasswordPage-Bwbt8tH2.js → ResetPasswordPage-Bg7eVc6L.js} +1 -1
- package/dashboard/dist/assets/{SegmentedControl-BSa5hMnN.js → SegmentedControl-CFNHcUz7.js} +1 -1
- package/dashboard/dist/assets/{Select-kPKDGb7M.js → Select-B0Q0eDcJ.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-DNgLclTV.js → SelectItemText-BVbLYxSQ.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-C1j7rPDp.js → ServiceStatusPage-DCZH2kz5.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-BgoKs_Yq.js → SessionsPage-DO5Et7ss.js} +2 -2
- package/dashboard/dist/assets/{SettingsPage-BUaPftV0.js → SettingsPage-afgxGfzT.js} +2 -2
- package/dashboard/dist/assets/{SkillsPage-C5GkzfWW.js → SkillsPage-DDKiHCF7.js} +1 -1
- package/dashboard/dist/assets/{TokenGalaxy-DZffAa_0.js → TokenGalaxy-DV1Xoe5z.js} +1 -1
- package/dashboard/dist/assets/{ToolbarRootContext-CuLP92P_.js → ToolbarRootContext-DNckd9Qz.js} +1 -1
- package/dashboard/dist/assets/TrendMonitor-CliMJxCC.js +19 -0
- package/dashboard/dist/assets/{WidgetsPage-BUhiCpcq.js → WidgetsPage-BrwG6YMM.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-sNFISXVG.js → WrappedPage-Ft9YJd0D.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-Cyw7ZNtj.js → __vite-browser-external-C6_BtvDo.js} +4 -3
- package/dashboard/dist/assets/agent-logos-yYNu1ZUy.js +1 -0
- package/dashboard/dist/assets/{arrow-up-right-BcRkt7hr.js → arrow-up-right-B_K57Vbg.js} +1 -1
- package/dashboard/dist/assets/{check-qhr4U2S5.js → check-xH63o2xJ.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-iLGEAP7_.js → chevron-right-D3F2rAfr.js} +1 -1
- package/dashboard/dist/assets/{copy-BhEPCq-q.js → copy-WPfJGGI0.js} +1 -1
- package/dashboard/dist/assets/{download-D7O1ZzsX.js → download-BgtWtEXI.js} +1 -1
- package/dashboard/dist/assets/{external-link-CY2kK2hC.js → external-link-DSHGoZRM.js} +1 -1
- package/dashboard/dist/assets/{flame-D4FPuBNn.js → flame-CNGl6Qac.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-CVHJ7Hdh.js → format-tokens-jVm2UX7Y.js} +1 -1
- package/dashboard/dist/assets/{icons-B_-51UXa.js → icons-B1JZg-Id.js} +1 -1
- package/dashboard/dist/assets/{index-cwdr25Zm.js → index-BTZibjLi.js} +1 -1
- package/dashboard/dist/assets/{index-Djv-aJy0.js → index-BjD81Qce.js} +1 -1
- package/dashboard/dist/assets/{index-ClVWat-1.js → index-CUFHknAy.js} +1 -1
- package/dashboard/dist/assets/{info-DOab0eZz.js → info-CLM460KM.js} +1 -1
- package/dashboard/dist/assets/{limits-providers-CESm2d6B.js → limits-providers-CFO4O1qh.js} +1 -1
- package/dashboard/dist/assets/{link-2-B4LMsC4m.js → link-2-BHOsUnAI.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-CPx6wpSn.js → loader-circle-CgcIQi92.js} +1 -1
- package/dashboard/dist/assets/{maximize-2-C9z8mbdn.js → maximize-2-DvqfuJEA.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-5xRgAl_R.js → modifiers.esm-CNiwIkPh.js} +1 -1
- package/dashboard/dist/assets/module-CV1mYFsv.js +3 -0
- package/dashboard/dist/assets/{monitor-smartphone-B9HAspdR.js → monitor-smartphone-BLutpxrG.js} +1 -1
- package/dashboard/dist/assets/provider-display-BxIgWUEa.js +42 -0
- package/dashboard/dist/assets/{react-C45OGvDd.js → react-CM-ozVnh.js} +1 -1
- package/dashboard/dist/assets/{search-Bg1qyEdz.js → search-4T07INKt.js} +1 -1
- package/dashboard/dist/assets/{skills-api-a8pi7UTd.js → skills-api-EXMD3LD1.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-CtPp8cFA.js → sortable.esm-jC6mPJiL.js} +1 -1
- package/dashboard/dist/assets/{store-b8zXM1yr.js → store-CvSEdgf2.js} +1 -1
- package/dashboard/dist/assets/{terminal-CPf0K0Fn.js → terminal-D9fyE2pP.js} +1 -1
- package/dashboard/dist/assets/{trash-2-uorzBdA0.js → trash-2-QLUsAY3l.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-DaVwywsM.js → use-community-stats-Chrt3kpU.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-UIzz7PJ3.js → use-limits-display-prefs-BJJd750e.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-C2XOfMH3.js → use-ordered-list-BBJp5lFv.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-BvXZCGFC.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-D5KHakYg.js → use-session-efficiency-pref-BXbvx2Ht.js} +1 -1
- package/dashboard/dist/assets/{use-transform-Cfo_2_id.js → use-transform-BVp_MUsU.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-CANTpxrA.js → use-usage-limits-Dk3EkeIs.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-CjvWekKH.js → useCurrency-Bi88Sd__.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-ChQdbuJg.js → useScrollLock-if34g2H-.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-4MY04JPl.js → useTokenFormat-C2cz-5qJ.js} +1 -1
- package/dashboard/dist/assets/{zap-BSXHFUBb.js → zap-D1yHmcQR.js} +1 -1
- package/dashboard/dist/index.html +12 -10
- package/dashboard/dist/ip-check.html +1 -1
- package/dashboard/dist/leaderboard.html +1 -1
- package/dashboard/dist/llms.txt +2 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +2 -2
- package/src/commands/init.js +2 -1
- package/src/commands/status.js +46 -0
- package/src/commands/sync.js +188 -4
- package/src/lib/account-usage-dedup.js +267 -0
- package/src/lib/local-api.js +4 -0
- package/src/lib/pricing/curated-overrides.json +15 -9
- package/src/lib/pricing/index.js +32 -1
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +730 -1
- package/src/lib/source-metadata.js +1 -1
- package/src/lib/trae-cn-config.js +539 -0
- package/dashboard/dist/assets/DialogDescription-DfNXnqay.js +0 -1
- package/dashboard/dist/assets/LoginCard-LcOaKaCK.js +0 -1
- package/dashboard/dist/assets/ProviderIcon-C4yuu9FG.js +0 -1
- package/dashboard/dist/assets/TrendMonitor-BKLAKJmT.js +0 -19
- package/dashboard/dist/assets/agent-logos-Bwf2YFHS.js +0 -1
- package/dashboard/dist/assets/module-BRJxSJmz.js +0 -3
- package/dashboard/dist/assets/provider-display-C0NS0EvN.js +0 -42
- package/dashboard/dist/assets/use-reduced-motion-CNyMWBog.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as c}from"./__vite-browser-external-
|
|
1
|
+
import{m as c}from"./__vite-browser-external-C6_BtvDo.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{N as E,O as I,P as R,Q as $}from"./__vite-browser-external-C6_BtvDo.js";function s(e){return typeof e=="string"?e.trim():""}function g(e){return Array.isArray(e)?[...new Set(e.map(s).filter(Boolean))]:[]}function v(e){const t=s(e).replace(/\\/g,"/");if(!t||t.startsWith("/")||/^[A-Za-z]:\//.test(t))return"";const n=t.replace(/\/+$/g,"").split("/").filter(Boolean);return!n.length||n.some(r=>r==="."||r==="..")?"":n.join("/")}function C(e){const t=s(e).replace(/\\/g,"/");return!t||t.startsWith("/")||t.includes(":/")||/[A-Za-z]:\//.test(t)?"":t}function S(e){return s(e?.key)||s(e?.id)||`local:${s(e?.directory)}`}function L(e){return(Array.isArray(e)?e:[]).filter(t=>t?.scope!=="system").map(t=>{const n=v(t?.directory),r=C(S(t));if(!r||!n)return null;const i=t?.scope==="plugin"?"plugin":t?.managed?"managed":"local",o=v(t?.sourceName);return{key:r,name:s(t?.name)||n.split("/").pop()||"Skill",directory:n,targets:g(t?.targets),managed:t?.managed===!0,readOnly:t?.readOnly===!0,scope:i,...o?{sourceName:o}:{}}}).filter(t=>!!t)}function N(e){return{id:s(e?.id),name:s(e?.device_name)||s(e?.id),platform:s(e?.platform)||null,scannedAt:s(e?.scanned_at)||null}}function m(e,t){const n=Array.isArray(e.deviceSources)?e.deviceSources:[];return n.some(r=>r.id===t.id)?e:{...e,deviceSources:[...n,t]}}function q(e,t,n){const r=(Array.isArray(e)?e:[]).filter(o=>o?.scope!=="system").map(o=>({...o})),i=new Map;r.forEach((o,a)=>i.set(S(o).toLowerCase(),a));for(const o of Array.isArray(t?.devices)?t.devices:[]){const a=N(o);if(!(!a.id||a.id===n))for(const c of Array.isArray(o?.skills)?o.skills:[]){if(c?.scope==="system")continue;const l=S(c),p=s(c?.directory);if(!l||!p)continue;const h=l.toLowerCase(),k=g(c.targets),y=i.get(h);if(y!=null){const f=r[y];if(f.remote===!0&&f.inventoryOnly===!0){const A=[...new Set([...g(f.targets),...k])],U=Object.fromEntries(A.map(_=>[_,"synced"]));r[y]=m({...f,targets:A,targetStates:U},a)}else r[y]=m(f,a);continue}const w=k,b=Object.fromEntries(w.map(f=>[f,"synced"])),j=m({id:`remote:${encodeURIComponent(l)}`,key:l,name:s(c.name)||p.split(/[\\/]/).pop()||"Skill",directory:p,description:"",targets:w,targetStates:b,managed:!1,readOnly:!0,inventoryOnly:!0,remote:!0,scope:s(c.scope)||"local",sourceName:s(c.sourceName)||null},a);i.set(h,r.length),r.push(j)}}return r.sort((o,a)=>String(o.name||o.directory).localeCompare(String(a.name||a.directory))||String(o.id||o.key).localeCompare(String(a.id||a.key)))}const T="tokentracker-skills",P="tokentracker-account-skills",J=15e3;async function d(e){const t=new URL(`/functions/${T}`,window.location.origin);if(e)for(const[i,o]of Object.entries(e))o!=null&&o!==""&&t.searchParams.set(i,String(o));const n=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),r=await n.json().catch(()=>null);if(!n.ok)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}async function u(e){const t=await $(),n=await fetch(`/functions/${T}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),r=await n.json().catch(()=>null);if(!n.ok||r?.ok===!1)throw new Error(r?.error||`Request failed with HTTP ${n.status}`);return r}function x(){return d({mode:"installed"})}function H(e={}){return d({mode:"discover",...e.force?{force:1}:{}})}function z(e,t=0,n=20){return d({mode:"search",q:e,offset:t,limit:n})}function B(){return d({mode:"repos"})}function M(e,t){return u({action:"install",skill:e,targets:t})}function D(e){return u({action:"uninstall",id:e})}function G(e){return u({action:"restore",id:e})}function Q(e,t){return u({action:"set_targets",id:e,targets:t})}function W(e,t){return u({action:"import_local",directory:e,targets:t})}function Z(e,t){return u({action:"delete_local",directory:e,targets:t||[]})}function F(e){return u({action:"add_repo",repo:e})}function V(e,t){return u({action:"remove_repo",owner:e,name:t})}function X(e={}){return d({mode:"popular",...e.force?{force:1}:{}})}function Y(e={}){return d({mode:"updates",...e.force?{force:1}:{}})}function ee(e={}){return d({mode:"skill_usage",...e.force?{force:1}:{}})}async function O({accessToken:e,method:t="GET",body:n}){if(!e||!E(e))throw new Error("Skills sync requires sign-in");const r=I();if(!r)throw new Error("InsForge base URL not configured");const i={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${e}`},o=R();o&&(i.apikey=o);const a=new AbortController,c=setTimeout(()=>a.abort(),J);try{const l=await fetch(`${r.replace(/\/$/,"")}/functions/${P}`,{method:t,headers:i,cache:"no-store",signal:a.signal,...n==null?{}:{body:JSON.stringify(n)}}),p=await l.json().catch(()=>null);if(!l.ok)throw new Error(p?.error||`Request failed with HTTP ${l.status}`);return p}finally{clearTimeout(c)}}function te(e){return O({accessToken:e})}function ne({accessToken:e,deviceId:t,skills:n}){return O({accessToken:e,method:"POST",body:{device_id:t,skills:L(n)}})}export{te as a,B as b,X as c,H as d,Y as e,ee as f,x as g,Z as h,M as i,Q as j,W as k,V as l,q as m,F as n,ne as p,G as r,z as s,D as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,d as P,a3 as Oe}from"./__vite-browser-external-
|
|
1
|
+
import{r as c,d as P,a3 as Oe}from"./__vite-browser-external-C6_BtvDo.js";function Sn(){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 bt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:bt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function wt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Wt(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:bt(e)?wt(e)?e:Be(e)||Wt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function mt(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 En(){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 Je(e){const t=mt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ft(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 Ht(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,s)=>{const a=Object.entries(s);for(const[l,u]of a){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=Ht(1),ze=Ht(-1);function In(e){return"clientX"in e&&"clientY"in e}function yt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function Mn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function ht(e){if(Mn(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 In(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}}}),Tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function An(e){return e.matches(Tt)?e:e.querySelector(Tt)}const On={display:"none"};function Tn(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:On},n)}function Nn(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 Ln(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Kt=c.createContext(null);function kn(e){const t=c.useContext(Kt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function zn(){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(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const Pn={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.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$ as t}from"./__vite-browser-external-C6_BtvDo.js";import{F as p,P as g}from"./useScrollLock-if34g2H-.js";function d(){return new p({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new g,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function c(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:d(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:t,inactiveTriggerProps:t,popupProps:t}}function m(e,n,l=!1){return new p({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:l,onOpenChange:void 0})}const o=e=>e.triggerIdProp??e.activeTriggerId,r=e=>e.openProp??e.open,i=e=>(e.popupElement?.id??e.floatingId)||void 0;function u(e,n){return n!==void 0&&r(e)&&o(e)===n}function a(e,n){return u(e,n)?!0:n!==void 0&&r(e)&&o(e)==null&&e.triggerCount===1}const P={open:r,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:o,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:i,isTriggerActive:(e,n)=>n!==void 0&&o(e)===n,isOpenedByTrigger:(e,n)=>u(e,n),isMountedByTrigger:(e,n)=>n!==void 0&&o(e)===n&&e.mounted,triggerProps:(e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,n)=>a(e,n)?i(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};export{m as a,c,P as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./__vite-browser-external-
|
|
1
|
+
import{m as e}from"./__vite-browser-external-C6_BtvDo.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{m as a}from"./__vite-browser-external-
|
|
1
|
+
import{m as a}from"./__vite-browser-external-C6_BtvDo.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-DaVwywsM.js → use-community-stats-Chrt3kpU.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-C6_BtvDo.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,q as D,t as K,v as j,w as J}from"./__vite-browser-external-
|
|
1
|
+
import{r as a,q as D,t as K,v as j,w as J}from"./__vite-browser-external-C6_BtvDo.js";import{L as q}from"./limits-providers-CFO4O1qh.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f}from"./__vite-browser-external-
|
|
1
|
+
import{r as f}from"./__vite-browser-external-C6_BtvDo.js";function O(t){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(t);if(!n)return null;const i=JSON.parse(n);return Array.isArray(i)?i.filter(o=>typeof o=="string"):null}catch{return null}}function m(t,n){if(!(typeof window>"u"))try{window.localStorage.setItem(t,JSON.stringify(n))}catch{}}function S(t,n){if(!t)return n;const i=new Set(n),o=t.filter(u=>i.has(u)),c=n.filter(u=>!o.includes(u));return[...o,...c]}function p(t,n){const i=f.useMemo(()=>n.join("|"),[n]),[o,c]=f.useState(()=>S(O(t),n));f.useEffect(()=>{c(r=>{const e=S(r,n);return e.length===r.length&&e.every((l,d)=>l===r[d])?r:(m(t,e),e)})},[i,n,t]);const u=f.useCallback((r,e)=>{!r||!e||r===e||c(s=>{const l=s.indexOf(r),d=s.indexOf(e);if(l===-1||d===-1)return s;const w=s.slice(),[h]=w.splice(l,1);return w.splice(d,0,h),m(t,w),w})},[t]),a=f.useCallback(()=>{m(t,n),c(n)},[t,n]);return{order:o,reorder:u,reset:a}}export{p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o}from"./__vite-browser-external-C6_BtvDo.js";import{h as r,i as t,p as s}from"./react-CM-ozVnh.js";function i(){!r.current&&t();const[e]=o.useState(s.current);return e}export{i as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as u,r as n}from"./__vite-browser-external-
|
|
1
|
+
import{m as u,r as n}from"./__vite-browser-external-C6_BtvDo.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-CM-ozVnh.js";import{r as f}from"./__vite-browser-external-C6_BtvDo.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{q as b,ae as v,r as c,c as g,af as F,ag as x,ah as f}from"./__vite-browser-external-
|
|
1
|
+
import{q as b,ae as v,r as c,c as g,af as F,ag as x,ah as f}from"./__vite-browser-external-C6_BtvDo.js";import{l as M}from"./limits-providers-CFO4O1qh.js";const S="native:notificationPermission";let E=null;function N(){return typeof window<"u"&&!!window.chrome?.webview}function K(){return b()?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(K())};return window.addEventListener(S,i),e(K()),b()&&v({type:"getNotificationStatus"}),()=>window.removeEventListener(S,i)}async function I(){if(b()){v({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]=c.useState(O),[t,a]=c.useState("unknown");c.useEffect(()=>L(a),[]);const y=c.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 q(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,w=n/u,m=n/s;m>=1&&w>0?l.runsOutEta=D((1-n)/w):l.projectedEnd=Math.round(Math.min(m,1)*100)}return l}const R={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,windowSecondsField:"limit_window_seconds"},{key:"auto",labelKey:"limits.label.cursor_auto",window:e.secondary_window,windowSecondsField:"limit_window_seconds"},{key:"api",labelKey:"limits.label.cursor_api",window:e.tertiary_window,windowSecondsField:"limit_window_seconds"}]}},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:{extra:"kiro_credits",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"}]}},qoderCn:{windows(e){return[{key:"credits",labelKey:"limits.label.qoder_cn_credits",window:e.primary_window},{key:"ultimate",labelKey:"limits.label.qoder_cn_ultimate",window:e.secondary_window,timeKind:"expiry"}]}},codingPlan:{windows(e){return[{key:"5h",labelKey:"limits.label.ark_coding_plan_5h",window:e.primary_window},{key:"weekly",labelKey:"limits.label.ark_coding_plan_weekly",window:e.secondary_window},{key:"monthly",labelKey:"limits.label.ark_coding_plan_monthly",window:e.tertiary_window}]}}},P="tt.limitAlerts.cycles.v1";function T(){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=R;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,w=q(u),m=C({usedPercent:s,windowSeconds:j(r,r.window),resetMs:w,mode:"used",now:i});!m.runsOutEta||!m.paceOver||s<20||!(w>i)||t.push({id:`${y}:${r.key}:${w}`,providerId:y,windowKey:r.key,resetMs:w,usedPercent:s,runsOutEta:m.runsOutEta})}}return t}function V(e){const i=T(),t=B(e);for(const n of t){if(i[n.id])continue;const l=M(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]=c.useState(()=>i?e?.initialState?.data??null:null),[y,n]=c.useState(()=>i?e?.initialState?.error??null:null),[l,r]=c.useState(!i),s=!!e?.initialRefresh,u=!!e?.publishToPreloadCache;c.useEffect(()=>{if(!(!t||typeof window>"u"))try{window.localStorage.getItem(p)==="1"&&V(t)}catch{}},[t]);const w=c.useCallback((o,d)=>{!u||!o||typeof o!="object"||x(o,{source:d})},[u]),m=c.useCallback(async()=>{try{const o=await f({refresh:!0}),d=o&&typeof o=="object"?o:null;a(d),n(null),w(d,"manual-refresh")}catch(o){n(o?.message||String(o))}},[w]),k=c.useCallback(async()=>{try{const o=await f(),d=o&&typeof o=="object"?o:null;a(d),n(null),w(d,"page-load")}catch(o){n(o?.message||String(o))}},[w]);return c.useEffect(()=>{if(typeof window>"u"||typeof document>"u")return;const o=15e3;let d=Date.now();const _=()=>{if(document.visibilityState!=="visible")return;const h=Date.now();h-d<o||(d=h,k())};return window.addEventListener("focus",_),document.addEventListener("visibilitychange",_),()=>{window.removeEventListener("focus",_),document.removeEventListener("visibilitychange",_)}},[k]),c.useEffect(()=>{if(i&&!s)return;let o=!1;return(async()=>{try{const d=await f();if(o)return;const _=d&&typeof d=="object"?d:null;a(_),n(null),w(_,"page-load")}catch(d){if(o)return;n(d?.message||String(d))}finally{o||r(!1)}})(),()=>{o=!0}},[i,s,w]),{data:t,error:y,isLoading:l,refresh:m}}export{R as P,j as a,U as b,C as c,q as r,V as s,W as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,C as t,D as r,x as c}from"./__vite-browser-external-
|
|
1
|
+
import{r as e,C as t,D as r,x as c}from"./__vite-browser-external-C6_BtvDo.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{bQ as Bt,bR as Ve,aI as $e,aF as H,aJ as Ht,be as U,bS as St,bH as je,j as Re,bT as ze,r as m,bc as K,bU as rt,bV as Yt,aK as ot,bb as Ne,bx as Dt,bW as st,bX as Ot,bg as I,bf as Ie,bw as be,bY as Ke,bZ as fe,b_ as de,aE as w,bj as Gt,b$ as wt,c0 as Je,by as _t,bt as it,bo as ct,bq as Ut,c1 as Xt,aD as Ee,bs as Vt,c2 as Kt,A as ke,bn as qt,c3 as Qe,aN as Le,c4 as $t,c5 as Ye,bk as jt,ba as We,bl as zt,bd as xe,bD as De,bC as Jt,c6 as Qt,bA as Zt,aG as en,c7 as ye,aQ as tn,aA as nn,Z as Ge,c8 as rn,c9 as ut,az as on,bO as sn,bI as cn}from"./__vite-browser-external-Cyw7ZNtj.js";function Pe(e,t,n=!0){return e.filter(o=>o.parentId===t).flatMap(o=>[...!n||o.context?.open?[o]:[],...Pe(e,o.id,n)])}function lt(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}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 Bt?!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 Vn(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 Me(e){const t=$e(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 Ae=0;function _e(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;cancelAnimationFrame(Ae);function s(){o&&!o()||e?.focus({preventScroll:n})}if(r)return s(),Ht;const i=requestAnimationFrame(s);return Ae=i,()=>{Ae===i&&(cancelAnimationFrame(i),Ae=0)}}const Ue={inert:new WeakMap,"aria-hidden":new WeakMap},at="data-base-ui-inert",qe={inert:new WeakSet,"aria-hidden":new WeakSet};let Ce=new WeakMap,Xe=0;function gn(e){return qe[e]}function Ct(e){return e?St(e)?e.host:Ct(e.parentNode):null}const ft=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ct(n);return e.contains(r)?r:null}).filter(n=>n!=null),dt=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},pt=(e,t,n)=>{const r=[],o=s=>{!s||n.has(s)||Array.from(s.children).forEach(i=>{je(i)!=="script"&&(t.has(i)?o(i):r.push(i))})};return o(e),r};function hn(e,t,n,r,{mark:o=!0}){let s=null;r?s="inert":n&&(s="aria-hidden");let i=null,l=null;const d=ft(t,e),f=o?pt(t,dt(d),new Set(d)):[],v=[],P=[];if(s){const a=Ue[s],y=gn(s);l=y,i=a;const C=ft(t,Array.from(t.querySelectorAll("[aria-live]"))),N=d.concat(C);pt(t,dt(N),new Set(N)).forEach(T=>{const E=T.getAttribute(s),Z=E!==null&&E!=="false",Y=(a.get(T)||0)+1;a.set(T,Y),v.push(T),Y===1&&Z&&y.add(T),Z||T.setAttribute(s,s==="inert"?"":"true")})}return o&&f.forEach(a=>{const y=(Ce.get(a)||0)+1;Ce.set(a,y),P.push(a),y===1&&a.setAttribute(at,"")}),Xe+=1,()=>{i&&v.forEach(a=>{const C=(i.get(a)||0)-1;i.set(a,C),C||(!l?.has(a)&&s&&a.removeAttribute(s),l?.delete(a))}),o&&P.forEach(a=>{const y=(Ce.get(a)||0)-1;Ce.set(a,y),y||a.removeAttribute(at)}),Xe-=1,Xe||(Ue.inert=new WeakMap,Ue["aria-hidden"]=new WeakMap,qe.inert=new WeakSet,qe["aria-hidden"]=new WeakSet,Ce=new WeakMap)}}function gt(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t,s=U(e[0]).body;return hn(e,s,n,r,{mark:o})}function xt(){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=xt();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 It=m.createContext(null),kt=m.createContext(null),Ze=()=>m.useContext(It)?.id||null,et=e=>{const t=m.useContext(kt);return e??t};function Kn(e){const t=ze(),n=et(e),r=Ze();return H(()=>{if(!t)return;const o={id:t,parentId:r};return n?.addNode(o),()=>{n?.removeNode(o)}},[n,t,r]),t}function qn(e){const{children:t,id:n}=e,r=Ze();return Re.jsx(It.Provider,{value:m.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function $n(e){const{children:t,externalTree:n}=e,r=$e(()=>n??new mn).current;return Re.jsx(kt.Provider,{value:r,children:t})}function bn(e,t){const n=Le(Ee(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 ht=20;let pe=[];function tt(){pe=pe.filter(e=>e.deref()?.isConnected)}function mt(e){tt(),e&&je(e)!=="body"&&(pe.push(new WeakRef(e)),pe.length>ht&&(pe=pe.slice(-ht)))}function bt(){return tt(),pe[pe.length-1]?.deref()}function yn(e){return e?Qe(e)?e:Ot(e)[0]||e:null}function yt(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=$t(e).filter(o=>{const s=o.getAttribute("data-tabindex")||"";return Qe(o)||o.hasAttribute("data-tabindex")&&!s.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 jn(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:i=!1,modal:l=!0,closeOnFocusOut:d=!0,openInteractionType:f="",nextFocusableElement:v,previousFocusableElement:P,beforeContentFocusGuardRef:a,externalTree:y,getInsideElements:C}=e,N="rootStore"in t?t.rootStore:t,D=N.useState("open"),T=N.useState("domReferenceElement"),E=N.useState("floatingElement"),{events:Z,dataRef:Y}=N.context,q=K(()=>Y.current.floatingContext?.nodeId),J=o===!1,G=rt(T)&&J,se=Me(o),M=Me(s),$=Me(f),ve=Me(D),W=et(y),R=Yt(),B=m.useRef(!1),ie=m.useRef(!1),te=m.useRef(!1),ne=m.useRef(null),ge=m.useRef(""),ae=m.useRef(""),he=m.useRef(null),Te=m.useRef(null),S=ot(he,a,R?.beforeInsideRef),j=ot(Te,R?.afterInsideRef),ce=Ne(),ue=Ne(),Se=Dt(),Fe=R!=null,h=st(E),re=K((b=h)=>b?Ot(b):[]),ee=K(()=>C?.().filter(b=>b!=null)??[]);m.useEffect(()=>{if(r||!l)return;function b(L){L.key==="Tab"&&w(h,de(U(h)))&&re().length===0&&!G&&un(L)}const F=U(h);return I(F,"keydown",b)},[r,h,l,G,re]),m.useEffect(()=>{if(r||!D)return;const b=U(h);function F(){te.current=!1}function L(z){const g=Ee(z),x=ee(),p=w(E,g)||w(T,g)||w(R?.portalNode,g)||x.some(A=>A===g||w(A,g));te.current=!p,ae.current=z.pointerType||"keyboard",g?.closest(`[${Vt}]`)&&(ie.current=!0,ue.start(0,()=>{ie.current=!1}))}function _(){ae.current="keyboard"}return Ie(I(b,"pointerdown",L,!0),I(b,"pointerup",F,!0),I(b,"pointercancel",F,!0),I(b,"keydown",_,!0),F)},[r,E,T,h,D,R,ue,ee]),m.useEffect(()=>{if(r||!d)return;const b=U(h);function F(){ie.current=!0,ue.start(0,()=>{ie.current=!1})}function L(x){const p=Ee(x);Qe(p)&&(ne.current=p)}function _(x){const p=x.relatedTarget,A=x.currentTarget,X=Ee(x);l&&p==null&&X!=null&&w(E,X)&&mt(X),queueMicrotask(()=>{const k=q(),Q=N.context.triggerElements,c=ee(),u=p?.hasAttribute(Ke("focus-guard"))&&[he.current,Te.current,R?.beforeInsideRef.current,R?.afterInsideRef.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,fe(P),fe(v)].includes(p),V=!(w(T,p)||w(E,p)||w(p,E)||w(R?.portalNode,p)||c.some(O=>O===p||w(O,p))||Q.hasMatchingElement(O=>w(O,p))||u||W&&(Pe(W.nodesRef.current,k).find(O=>w(O.context?.elements.floating,p)||w(O.context?.elements.domReference,p))||lt(W.nodesRef.current,k).find(O=>[O.context?.elements.floating,st(O.context?.elements.floating)].includes(p)||O.context?.elements.domReference===p)));if(A===T&&h&&yt(h),i&&A!==T&&!Kt(X)&&de(b)===b.body){if(be(h)&&(h.focus(),i==="popup")){Se.request(()=>{h.focus()});return}const O=re(),le=ne.current,Oe=(le&&O.includes(le)?le:null)||O[O.length-1]||h;be(Oe)&&Oe.focus()}if(Y.current.insideReactTree){Y.current.insideReactTree=!1;return}(G||!l)&&p&&V&&!ie.current&&(G||p!==bt())&&(B.current=!0,N.setOpen(!1,ke(qt,x)))})}function z(){te.current||(Y.current.insideReactTree=!0,ce.start(0,()=>{Y.current.insideReactTree=!1}))}const g=be(T)?T:null;if(!(!E&&!g))return Ie(g&&I(g,"focusout",_),g&&I(g,"pointerdown",F),E&&I(E,"focusin",L),E&&I(E,"focusout",_),E&&R&&I(E,"focusout",z,!0))},[r,T,E,h,l,W,R,N,d,i,re,G,q,Y,ce,ue,Se,v,P,ee]),m.useEffect(()=>{if(r||!E||!D)return;const b=Array.from(R?.portalNode?.querySelectorAll(`[${Ke("portal")}]`)||[]),L=(W?lt(W.nodesRef.current,q()):[]).find(A=>rt(A.context?.elements.domReference||null))?.context?.elements.domReference,z=[...[E,...b,he.current,Te.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,...ee()],L,fe(P),fe(v),G?T:null].filter(A=>A!=null),g=gt(z,{ariaHidden:l||G,mark:!1}),x=[E,...b].filter(A=>A!=null),p=gt(x);return()=>{p(),g()}},[D,r,T,E,l,R,G,W,q,v,P,ee]),H(()=>{if(!D||r||!be(h))return;ge.current="",ae.current="";const b=U(h),F=de(b);queueMicrotask(()=>{const L=se.current,_=typeof L=="function"?L($.current||""):L;if(_===void 0||_===!1||w(h,F))return;let g=null;const x=()=>(g==null&&(g=re(h)),g[0]||h);let p;_===!0||_===null?p=x():p=fe(_),p=p||x();const A=w(h,de(b));_e(p,{preventScroll:p===h,shouldFocus(){if(!ve.current)return!1;if(A)return!0;const X=de(b);return!(X!==p&&w(h,X))}})})},[r,D,h,re,se,$,ve]),H(()=>{if(r||!h)return;const b=U(h),F=de(b),L=$.current==null;mt(F);function _(g){if(g.open||(ge.current=bn(g.nativeEvent,ae.current)),g.reason===Gt&&g.nativeEvent.type==="mouseleave"&&(B.current=!0),g.reason===wt)if(g.nested)B.current=!1;else if(an(g.nativeEvent)||fn(g.nativeEvent))B.current=!1;else{let x=!1;U(h).createElement("div").focus({get preventScroll(){return x=!0,!1}}),x?B.current=!1:B.current=!0}}Z.on("openchange",_);function z(g){const x=M.current;let p=typeof x=="function"?x(g):x;if(p===void 0||p===!1)return null;p===null&&(p=!0);const A=T?.isConnected?T:null,X=F?.isConnected&&je(F)!=="body"?F:null;let k=L?X||A:A||X;return k||(k=bt()||null),typeof p=="boolean"?k:fe(p)||k||null}return()=>{Z.off("openchange",_);const g=de(b),x=ee(),p=w(E,g)||x.some(Q=>Q===g||w(Q,g))||W&&Pe(W.nodesRef.current,q(),!1).some(Q=>w(Q.context?.elements.floating,g)),A=M.current,X=ge.current,k=z(X);queueMicrotask(()=>{const Q=yn(k),c=typeof A!="boolean";if(A&&!B.current&&be(Q)&&(!(!c&&Q!==g&&g!==b.body)||p)){const u={preventScroll:!0};X==="keyboard"&&(u.focusVisible=!0),Q.focus(u)}B.current=!1})}},[r,E,h,M,$,Z,W,T,q,ee]),H(()=>{if(!Je||D||!E)return;const b=de(U(E));!be(b)||!_t(b)||w(E,b)&&b.blur()},[D,E]),H(()=>{if(!(r||!R))return R.setFocusManagerState({modal:l,closeOnFocusOut:d,open:D,onOpenChange:N.setOpen,domReference:T}),()=>{R.setFocusManagerState(null)}},[r,R,l,D,N,d,T]),H(()=>{if(!(r||!h))return yt(h),()=>{queueMicrotask(tt)}},[r,h]);const me=!r&&(l?!G:!0)&&(Fe||l);return Re.jsxs(m.Fragment,{children:[me&&Re.jsx(it,{"data-type":"inside",ref:S,onFocus:b=>{if(l){const F=re();_e(F[F.length-1])}else R?.portalNode&&(B.current=!1,ct(b,R.portalNode)?Ut(T)?.focus():fe(P??R.beforeOutsideRef)?.focus())}}),n,me&&Re.jsx(it,{"data-type":"inside",ref:j,onFocus:b=>{l?_e(re()[0]):R?.portalNode&&(d&&(B.current=!0),ct(b,R.portalNode)?Xt(T)?.focus():fe(v??R.afterOutsideRef)?.focus())}})]})}function En(){return!1}function Tn(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:o=!0,outsidePressEvent:s="sloppy",referencePress:i=En,bubbles:l,externalTree:d}=t,f="rootStore"in e?e.rootStore:e,v=f.useState("open"),P=f.useState("floatingElement"),{dataRef:a}=f.context,y=et(d),C=K(typeof o=="function"?o:()=>!1),N=typeof o=="function"?C:o,D=N!==!1,T=K(()=>s),{escapeKey:E,outsidePress:Z}=Tn(l),Y=m.useRef(!1),q=m.useRef(!1),J=m.useRef(!1),G=m.useRef(!1),se=m.useRef(""),M=m.useRef(null),$=Ne(),ve=Ne(),W=K(()=>{ve.clear(),a.current.insideReactTree=!1}),R=K(S=>{const j=a.current.floatingContext?.nodeId;return(y?Pe(y.nodesRef.current,j):[]).some(ue=>ue.context?.open&&!ue.context.dataRef.current[S])}),B=K(S=>Ye(S,f.select("floatingElement"))||Ye(S,f.select("domReferenceElement"))),ie=K(S=>{i()&&f.setOpen(!1,ke(jt,S.nativeEvent))}),te=K(S=>{if(!v||!n||!r||S.key!=="Escape"||G.current||!E&&R("__escapeKeyBubbles"))return;const j=ln(S)?S.nativeEvent:S,ce=ke(zt,j);f.setOpen(!1,ce),ce.isCanceled||S.preventDefault(),!E&&!ce.isPropagationAllowed&&S.stopPropagation()}),ne=K(()=>{a.current.insideReactTree=!0,ve.start(0,W)}),ge=K(S=>{if(!v||!n||S.button!==0)return;const j=Ee(S.nativeEvent);w(f.select("floatingElement"),j)&&(Y.current||(Y.current=!0,q.current=!1))}),ae=K(S=>{!v||!n||(S.defaultPrevented||S.nativeEvent.defaultPrevented)&&Y.current&&(q.current=!0)});m.useEffect(()=>{if(!v||!n)return W;a.current.__escapeKeyBubbles=E,a.current.__outsidePressBubbles=Z;const S=new We,j=new We;function ce(){S.clear(),G.current=!0}function ue(){S.start(Je?5:0,()=>{G.current=!1})}function Se(){J.current=!0,j.start(0,()=>{J.current=!1})}function Fe(){Y.current=!1,q.current=!1}function h(){const c=se.current,u=c==="pen"||!c?"mouse":c,V=T(),O=typeof V=="function"?V():V;return typeof O=="string"?O:O[u]}function re(c){const u=h();return u==="intentional"&&c.type!=="click"||u==="sloppy"&&c.type==="click"}function ee(c){const u=a.current.floatingContext?.nodeId,V=y&&Pe(y.nodesRef.current,u).some(O=>Ye(c,O.context?.elements.floating));return B(c)||V}function me(c){if(re(c)){c.type!=="click"&&!B(c)&&(j.clear(),J.current=!1),W();return}if(a.current.insideReactTree){W();return}const u=Ee(c),V=`[${Ke("inert")}]`,O=xe(u)?u.getRootNode():null,le=Array.from((St(O)?O:U(f.select("floatingElement"))).querySelectorAll(V)),Oe=f.context.triggerElements;if(u&&(Oe.hasElement(u)||Oe.hasMatchingElement(oe=>w(oe,u))))return;let we=xe(u)?u:null;for(;we&&!De(we);){const oe=Jt(we);if(De(oe)||!xe(oe))break;we=oe}if(!(le.length&&xe(u)&&!Qt(u)&&!w(u,f.select("floatingElement"))&&le.every(oe=>!w(we,oe)))){if(be(u)&&!("touches"in c)){const oe=De(u),He=Zt(u),nt=/auto|scroll/,Pt=oe||nt.test(He.overflowX),Ft=oe||nt.test(He.overflowY),Mt=Pt&&u.clientWidth>0&&u.scrollWidth>u.clientWidth,At=Ft&&u.clientHeight>0&&u.scrollHeight>u.clientHeight,Nt=He.direction==="rtl",Wt=At&&(Nt?c.offsetX<=u.offsetWidth-u.clientWidth:c.offsetX>u.clientWidth),Lt=Mt&&c.offsetY>u.clientHeight;if(Wt||Lt)return}if(!ee(c)){if(h()==="intentional"&&J.current){j.clear(),J.current=!1;return}typeof N=="function"&&!N(c)||R("__outsidePressBubbles")||(f.setOpen(!1,ke(wt,c)),W())}}}function b(c){h()!=="sloppy"||c.pointerType==="touch"||!f.select("open")||!n||B(c)||me(c)}function F(c){if(h()!=="sloppy"||!f.select("open")||!n||B(c))return;const u=c.touches[0];u&&(M.current={startTime:Date.now(),startX:u.clientX,startY:u.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$.start(1e3,()=>{M.current&&(M.current.dismissOnTouchEnd=!1,M.current.dismissOnMouseDown=!1)}))}function L(c,u){const V=Ee(c);if(!V)return;const O=I(V,c.type,()=>{u(c),O()})}function _(c){se.current="touch",L(c,F)}function z(c){$.clear(),c.type==="pointerdown"&&(se.current=c.pointerType),!(c.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)&&L(c,u=>{u.type==="pointerdown"?b(u):me(u)})}function g(c){if(!Y.current)return;const u=q.current;if(Fe(),h()==="intentional"){if(c.type==="pointercancel"){u&&Se();return}if(!ee(c)){if(u){Se();return}typeof N=="function"&&!N(c)||(j.clear(),J.current=!0,W())}}}function x(c){if(h()!=="sloppy"||!M.current||B(c))return;const u=c.touches[0];if(!u)return;const V=Math.abs(u.clientX-M.current.startX),O=Math.abs(u.clientY-M.current.startY),le=Math.sqrt(V*V+O*O);le>5&&(M.current.dismissOnTouchEnd=!0),le>10&&(me(c),$.clear(),M.current=null)}function p(c){L(c,x)}function A(c){h()!=="sloppy"||!M.current||B(c)||(M.current.dismissOnTouchEnd&&me(c),$.clear(),M.current=null)}function X(c){L(c,A)}const k=U(P),Q=Ie(r&&Ie(I(k,"keydown",te),I(k,"compositionstart",ce),I(k,"compositionend",ue)),D&&Ie(I(k,"click",z,!0),I(k,"pointerdown",z,!0),I(k,"pointerup",g,!0),I(k,"pointercancel",g,!0),I(k,"mousedown",z,!0),I(k,"mouseup",g,!0),I(k,"touchstart",_,!0),I(k,"touchmove",p,!0),I(k,"touchend",X,!0)));return()=>{Q(),S.clear(),j.clear(),Fe(),J.current=!1,W()}},[a,P,r,D,N,v,n,E,Z,te,W,T,R,B,y,f,$]);const he=m.useMemo(()=>({onKeyDown:te,onPointerDown:ie,onClick:ie}),[te,ie]),Te=m.useMemo(()=>({onKeyDown:te,onPointerDown:ae,onMouseDown:ae,onClickCapture:ne,onMouseDownCapture(S){ne(),ge(S)},onPointerDownCapture(S){ne(),ge(S)},onMouseUpCapture:ne,onTouchEndCapture:ne,onTouchMoveCapture:ne}),[te,ne,ge,ae]);return m.useMemo(()=>n?{reference:he,floating:Te,trigger:he}:{},[n,he,Te])}const Rn={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class vn extends en{constructor(t){const{syncOnly:n,nested:r,onOpenChange:o,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:xt(),nested:r,triggerElements:s},Rn),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 Sn(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:s,onOpenChange:i}=e,l=t.useState("open"),d=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),v=t.context.triggerElements,P=i,a=m.useRef(null);r===void 0&&a.current===null&&(a.current=new vn({open:l,transitionStatus:void 0,referenceElement:d,floatingElement:f,triggerElements:v,onOpenChange:P,floatingId:o,syncOnly:!0,nested:s}));const y=r??a.current;return t.useSyncedValue("floatingId",o),H(()=>{const C={open:l,floatingId:o,referenceElement:d,floatingElement:f};xe(d)&&(C.domReferenceElement=d),y.state.positionReference===y.state.referenceElement&&(C.positionReference=d),y.update(C)},[l,o,d,f,y]),y.context.onOpenChange=P,y.context.nested=s,y}function On(e,t=!1,n=!1){const[r,o]=m.useState(e&&t?"idle":void 0),[s,i]=m.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),H(()=>{if(!e&&s&&r!=="ending"&&n){const l=ye.request(()=>{o("ending")});return()=>{ye.cancel(l)}}},[e,s,r,n]),H(()=>{if(!e||t)return;const l=ye.request(()=>{o(void 0)});return()=>{ye.cancel(l)}},[t,e]),H(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const l=ye.request(()=>{o("idle")});return()=>{ye.cancel(l)}},[t,e,s,r]),{mounted:s,setMounted:i,transitionStatus:r}}const Jn={tabIndex:-1,[rn]:""};function Qn(e){return t=>t==="touch"?e.current:!0}function Zn(e,t=!1){const n=ze(),r=Ze()!=null,o=$e(()=>e(n,r)).current;return Sn({popupStore:o,treatPopupAsFloatingElement:t,floatingRootContext:o.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:o.setOpen}),o}function er({handle:e,store:t}){return H(()=>e.attachStore(t),[e,t]),null}function wn(e,t){const n=m.useRef(null),r=m.useRef(null);return m.useCallback(o=>{if(e===void 0)return;let s=!1;if(n.current!==null){const i=n.current,l=r.current,d=t.context.triggerElements.getById(i);l&&d===l&&(t.context.triggerElements.delete(i),s=!0),n.current=null,r.current=null}if(o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o),s=!0),s){const i=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==i&&t.set("triggerCount",i)}},[t,e])}function tr(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const o=n?.id??null;(o||t)&&(e.activeTriggerId=o,e.activeTriggerElement=n??null)}function nr(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function rr(e,t,n,r){const o=n.useState("isMountedByTrigger",e),s=wn(e,n),i=K(d=>{const f=n.select("open"),v=n.select("activeTriggerId");if(v===e){n.update({activeTriggerElement:d,...f?r:null});return}v==null&&f&&n.update({activeTriggerId:e,activeTriggerElement:d,...r})}),l=m.useCallback(d=>{s(d),d&&i(d)},[s,i]);return H(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:o}}function or(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=m.useRef(null),o=e.useState("open"),s=e.useState("triggerCount"),i=e.useState("activeTriggerId"),l=e.useState("activeTriggerElement");H(()=>{if(!o){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const d=e.context.triggerElements.size,f={};e.state.triggerCount!==d&&(f.triggerCount=d);const v=e.select("activeTriggerId");let P=null;if(v){const a=e.context.triggerElements.getById(v);if(a)r.current=v,a!==e.state.activeTriggerElement&&(f.activeTriggerElement=a);else{for(const[y,C]of e.context.triggerElements.entries())if(C===e.state.activeTriggerElement){f.activeTriggerId=y,f.activeTriggerElement=C,r.current=y;break}f.activeTriggerId===void 0&&(r.current===v?P=v:r.current=null)}}else r.current=null;if(!P&&!v&&d===1){const a=e.context.triggerElements.entries().next();if(!a.done){const[y,C]=a.value;f.activeTriggerId=y,f.activeTriggerElement=C,r.current=y}}(f.triggerCount!==void 0||f.activeTriggerId!==void 0||f.activeTriggerElement!==void 0)&&e.update(f),P&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===P&&!e.context.triggerElements.getById(P)){const a=ke(tn);e.setOpen(!1,a),a.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,s,i,l,n])}function sr(e,t,n){const{mounted:r,setMounted:o,transitionStatus:s}=On(e),i=t.useState("preventUnmountingOnClose"),l=e?!1:i;t.useSyncedValues({mounted:r,transitionStatus:s,preventUnmountingOnClose:l});const d=K(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return nn({enabled:r&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:s}}function ir(e,t){e.useSyncedValues(t),H(()=>()=>{e.update({activeTriggerProps:Ge,inactiveTriggerProps:Ge,popupProps:Ge})},[e])}function cr(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 ur{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ut.startingStyle]="startingStyle",e[e.endingStyle=ut.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({});const Cn={"data-popup-open":""},xn={"data-popup-open":"","data-pressed":""},In={"data-open":""},kn={"data-closed":""},Pn={"data-anchor-hidden":""},lr={open(e){return e?Cn:null}},ar={open(e){return e?xn:null}},Fn={open(e){return e?In:kn},anchorHidden(e){return e?Pn:null}},fr={...Fn,...on};function dr(e){return ze(e,"base-ui")}const Mn="ArrowUp",An="ArrowDown",Nn="ArrowLeft",Wn="ArrowRight",Ln="Home",Bn="End",pr=new Set([Mn,An,Nn,Wn,Ln,Bn]),gr=m.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const i=r.getBoundingClientRect();s=`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 Re.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});let Et={},Tt={},Rt="";function Be(e,t){return cn(e)?e:t}function vt(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Be(t,n)).overflowY)}function Hn(e){if(typeof document>"u")return!1;const t=U(e);return Le(t).innerWidth-t.documentElement.clientWidth>0}function Yn(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=U(e),r=n.documentElement,o=n.body,s=Be(r,o),i=s.style.overflowY,l=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";const d=s.offsetWidth;s.style.overflowY="hidden";const f=s.offsetWidth;return s.style.overflowY=i,r.style.scrollbarGutter=l,d===f}function Dn(e){const t=U(e),n=t.documentElement,r=t.body,o=Be(n,r),s={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,s)}}function Gn(e){const t=U(e),n=t.documentElement,r=t.body,o=Le(n);let s=0,i=0,l=!1;const d=ye.create();if(Je&&(o.visualViewport?.scale??1)!==1)return()=>{};function f(){const y=o.getComputedStyle(n),C=o.getComputedStyle(r),T=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,Et={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Rt=n.style.scrollBehavior,Tt={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,Y=y.overflowY==="scroll"||C.overflowY==="scroll",q=y.overflowX==="scroll"||C.overflowX==="scroll",J=Math.max(0,o.innerWidth-r.clientWidth),G=Math.max(0,o.innerHeight-r.clientHeight),se=parseFloat(C.marginTop)+parseFloat(C.marginBottom),M=parseFloat(C.marginLeft)+parseFloat(C.marginRight),$=Be(n,r);if(l=Yn(e),l){n.style.scrollbarGutter=T,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(E||Y)&&(n.style.overflowY="scroll"),(Z||q)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:se||G?`calc(100dvh - ${se+G}px)`:"100dvh",width:M||J?`calc(100vw - ${M+J}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function v(){Object.assign(n.style,Et),Object.assign(r.style,Tt),l||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Rt)}function P(){v(),d.request(f)}f();const a=I(o,"resize",P);return()=>{d.cancel(),v(),typeof o.removeEventListener=="function"&&a()}}class _n{lockCount=0;restore=null;timeoutLock=We.create();timeoutUnlock=We.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 n=U(t),r=n.documentElement,o=n.body,s=Le(r);if(vt(s,r,o)){const l=new s.MutationObserver(()=>{vt(s,r,o)||(l.disconnect(),this.restore=null,this.lock(t))}),d={attributes:!0};l.observe(r,d),l.observe(o,d),this.restore=()=>l.disconnect();return}const i=sn||!Hn(t);this.restore=i?Dn(t):Gn(t)}}const Un=new _n;function hr(e=!0,t=null){H(()=>{if(e)return Un.acquire(t)},[e,t])}export{Kn as A,qn as B,pr as C,fn as D,_e as E,vn as F,un as G,an as H,gr as I,ur as P,Fn as a,jn as b,Qn as c,Jn as d,zn as e,hr as f,ir as g,Zn as h,cr as i,or as j,sr as k,er as l,On as m,Vn as n,et as o,fr as p,Ze as q,Pe as r,tr as s,lr as t,dr as u,Me as v,nr as w,$n as x,rr as y,ar as z};
|
|
1
|
+
import{bQ as Bt,bR as Ve,aI as $e,aF as H,aJ as Ht,be as U,bS as St,bH as je,j as Re,bT as ze,r as m,bc as K,bU as rt,bV as Yt,aK as ot,bb as Ne,bx as Dt,bW as st,bX as Ot,bg as I,bf as Ie,bw as be,bY as Ke,bZ as fe,b_ as de,aE as w,bj as Gt,b$ as wt,c0 as Je,by as _t,bt as it,bo as ct,bq as Ut,c1 as Xt,aD as Ee,bs as Vt,c2 as Kt,A as ke,bn as qt,c3 as Qe,aN as Le,c4 as $t,c5 as Ye,bk as jt,ba as We,bl as zt,bd as xe,bD as De,bC as Jt,c6 as Qt,bA as Zt,aG as en,c7 as ye,aQ as tn,aA as nn,$ as Ge,c8 as rn,c9 as ut,az as on,bO as sn,bI as cn}from"./__vite-browser-external-C6_BtvDo.js";function Pe(e,t,n=!0){return e.filter(o=>o.parentId===t).flatMap(o=>[...!n||o.context?.open?[o]:[],...Pe(e,o.id,n)])}function lt(e,t){let n=[],r=e.find(o=>o.id===t)?.parentId;for(;r;){const o=e.find(s=>s.id===r);r=o?.parentId,o&&(n=n.concat(o))}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 Bt?!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 Vn(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 Me(e){const t=$e(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 Ae=0;function _e(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:o}=t;cancelAnimationFrame(Ae);function s(){o&&!o()||e?.focus({preventScroll:n})}if(r)return s(),Ht;const i=requestAnimationFrame(s);return Ae=i,()=>{Ae===i&&(cancelAnimationFrame(i),Ae=0)}}const Ue={inert:new WeakMap,"aria-hidden":new WeakMap},at="data-base-ui-inert",qe={inert:new WeakSet,"aria-hidden":new WeakSet};let Ce=new WeakMap,Xe=0;function gn(e){return qe[e]}function Ct(e){return e?St(e)?e.host:Ct(e.parentNode):null}const ft=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ct(n);return e.contains(r)?r:null}).filter(n=>n!=null),dt=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},pt=(e,t,n)=>{const r=[],o=s=>{!s||n.has(s)||Array.from(s.children).forEach(i=>{je(i)!=="script"&&(t.has(i)?o(i):r.push(i))})};return o(e),r};function hn(e,t,n,r,{mark:o=!0}){let s=null;r?s="inert":n&&(s="aria-hidden");let i=null,l=null;const d=ft(t,e),f=o?pt(t,dt(d),new Set(d)):[],v=[],P=[];if(s){const a=Ue[s],y=gn(s);l=y,i=a;const C=ft(t,Array.from(t.querySelectorAll("[aria-live]"))),N=d.concat(C);pt(t,dt(N),new Set(N)).forEach(T=>{const E=T.getAttribute(s),Z=E!==null&&E!=="false",Y=(a.get(T)||0)+1;a.set(T,Y),v.push(T),Y===1&&Z&&y.add(T),Z||T.setAttribute(s,s==="inert"?"":"true")})}return o&&f.forEach(a=>{const y=(Ce.get(a)||0)+1;Ce.set(a,y),P.push(a),y===1&&a.setAttribute(at,"")}),Xe+=1,()=>{i&&v.forEach(a=>{const C=(i.get(a)||0)-1;i.set(a,C),C||(!l?.has(a)&&s&&a.removeAttribute(s),l?.delete(a))}),o&&P.forEach(a=>{const y=(Ce.get(a)||0)-1;Ce.set(a,y),y||a.removeAttribute(at)}),Xe-=1,Xe||(Ue.inert=new WeakMap,Ue["aria-hidden"]=new WeakMap,qe.inert=new WeakSet,qe["aria-hidden"]=new WeakSet,Ce=new WeakMap)}}function gt(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0}=t,s=U(e[0]).body;return hn(e,s,n,r,{mark:o})}function xt(){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=xt();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 It=m.createContext(null),kt=m.createContext(null),Ze=()=>m.useContext(It)?.id||null,et=e=>{const t=m.useContext(kt);return e??t};function Kn(e){const t=ze(),n=et(e),r=Ze();return H(()=>{if(!t)return;const o={id:t,parentId:r};return n?.addNode(o),()=>{n?.removeNode(o)}},[n,t,r]),t}function qn(e){const{children:t,id:n}=e,r=Ze();return Re.jsx(It.Provider,{value:m.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function $n(e){const{children:t,externalTree:n}=e,r=$e(()=>n??new mn).current;return Re.jsx(kt.Provider,{value:r,children:t})}function bn(e,t){const n=Le(Ee(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 ht=20;let pe=[];function tt(){pe=pe.filter(e=>e.deref()?.isConnected)}function mt(e){tt(),e&&je(e)!=="body"&&(pe.push(new WeakRef(e)),pe.length>ht&&(pe=pe.slice(-ht)))}function bt(){return tt(),pe[pe.length-1]?.deref()}function yn(e){return e?Qe(e)?e:Ot(e)[0]||e:null}function yt(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=$t(e).filter(o=>{const s=o.getAttribute("data-tabindex")||"";return Qe(o)||o.hasAttribute("data-tabindex")&&!s.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 jn(e){const{context:t,children:n,disabled:r=!1,initialFocus:o=!0,returnFocus:s=!0,restoreFocus:i=!1,modal:l=!0,closeOnFocusOut:d=!0,openInteractionType:f="",nextFocusableElement:v,previousFocusableElement:P,beforeContentFocusGuardRef:a,externalTree:y,getInsideElements:C}=e,N="rootStore"in t?t.rootStore:t,D=N.useState("open"),T=N.useState("domReferenceElement"),E=N.useState("floatingElement"),{events:Z,dataRef:Y}=N.context,q=K(()=>Y.current.floatingContext?.nodeId),J=o===!1,G=rt(T)&&J,se=Me(o),M=Me(s),$=Me(f),ve=Me(D),W=et(y),R=Yt(),B=m.useRef(!1),ie=m.useRef(!1),te=m.useRef(!1),ne=m.useRef(null),ge=m.useRef(""),ae=m.useRef(""),he=m.useRef(null),Te=m.useRef(null),S=ot(he,a,R?.beforeInsideRef),j=ot(Te,R?.afterInsideRef),ce=Ne(),ue=Ne(),Se=Dt(),Fe=R!=null,h=st(E),re=K((b=h)=>b?Ot(b):[]),ee=K(()=>C?.().filter(b=>b!=null)??[]);m.useEffect(()=>{if(r||!l)return;function b(L){L.key==="Tab"&&w(h,de(U(h)))&&re().length===0&&!G&&un(L)}const F=U(h);return I(F,"keydown",b)},[r,h,l,G,re]),m.useEffect(()=>{if(r||!D)return;const b=U(h);function F(){te.current=!1}function L(z){const g=Ee(z),x=ee(),p=w(E,g)||w(T,g)||w(R?.portalNode,g)||x.some(A=>A===g||w(A,g));te.current=!p,ae.current=z.pointerType||"keyboard",g?.closest(`[${Vt}]`)&&(ie.current=!0,ue.start(0,()=>{ie.current=!1}))}function _(){ae.current="keyboard"}return Ie(I(b,"pointerdown",L,!0),I(b,"pointerup",F,!0),I(b,"pointercancel",F,!0),I(b,"keydown",_,!0),F)},[r,E,T,h,D,R,ue,ee]),m.useEffect(()=>{if(r||!d)return;const b=U(h);function F(){ie.current=!0,ue.start(0,()=>{ie.current=!1})}function L(x){const p=Ee(x);Qe(p)&&(ne.current=p)}function _(x){const p=x.relatedTarget,A=x.currentTarget,X=Ee(x);l&&p==null&&X!=null&&w(E,X)&&mt(X),queueMicrotask(()=>{const k=q(),Q=N.context.triggerElements,c=ee(),u=p?.hasAttribute(Ke("focus-guard"))&&[he.current,Te.current,R?.beforeInsideRef.current,R?.afterInsideRef.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,fe(P),fe(v)].includes(p),V=!(w(T,p)||w(E,p)||w(p,E)||w(R?.portalNode,p)||c.some(O=>O===p||w(O,p))||Q.hasMatchingElement(O=>w(O,p))||u||W&&(Pe(W.nodesRef.current,k).find(O=>w(O.context?.elements.floating,p)||w(O.context?.elements.domReference,p))||lt(W.nodesRef.current,k).find(O=>[O.context?.elements.floating,st(O.context?.elements.floating)].includes(p)||O.context?.elements.domReference===p)));if(A===T&&h&&yt(h),i&&A!==T&&!Kt(X)&&de(b)===b.body){if(be(h)&&(h.focus(),i==="popup")){Se.request(()=>{h.focus()});return}const O=re(),le=ne.current,Oe=(le&&O.includes(le)?le:null)||O[O.length-1]||h;be(Oe)&&Oe.focus()}if(Y.current.insideReactTree){Y.current.insideReactTree=!1;return}(G||!l)&&p&&V&&!ie.current&&(G||p!==bt())&&(B.current=!0,N.setOpen(!1,ke(qt,x)))})}function z(){te.current||(Y.current.insideReactTree=!0,ce.start(0,()=>{Y.current.insideReactTree=!1}))}const g=be(T)?T:null;if(!(!E&&!g))return Ie(g&&I(g,"focusout",_),g&&I(g,"pointerdown",F),E&&I(E,"focusin",L),E&&I(E,"focusout",_),E&&R&&I(E,"focusout",z,!0))},[r,T,E,h,l,W,R,N,d,i,re,G,q,Y,ce,ue,Se,v,P,ee]),m.useEffect(()=>{if(r||!E||!D)return;const b=Array.from(R?.portalNode?.querySelectorAll(`[${Ke("portal")}]`)||[]),L=(W?lt(W.nodesRef.current,q()):[]).find(A=>rt(A.context?.elements.domReference||null))?.context?.elements.domReference,z=[...[E,...b,he.current,Te.current,R?.beforeOutsideRef.current,R?.afterOutsideRef.current,...ee()],L,fe(P),fe(v),G?T:null].filter(A=>A!=null),g=gt(z,{ariaHidden:l||G,mark:!1}),x=[E,...b].filter(A=>A!=null),p=gt(x);return()=>{p(),g()}},[D,r,T,E,l,R,G,W,q,v,P,ee]),H(()=>{if(!D||r||!be(h))return;ge.current="",ae.current="";const b=U(h),F=de(b);queueMicrotask(()=>{const L=se.current,_=typeof L=="function"?L($.current||""):L;if(_===void 0||_===!1||w(h,F))return;let g=null;const x=()=>(g==null&&(g=re(h)),g[0]||h);let p;_===!0||_===null?p=x():p=fe(_),p=p||x();const A=w(h,de(b));_e(p,{preventScroll:p===h,shouldFocus(){if(!ve.current)return!1;if(A)return!0;const X=de(b);return!(X!==p&&w(h,X))}})})},[r,D,h,re,se,$,ve]),H(()=>{if(r||!h)return;const b=U(h),F=de(b),L=$.current==null;mt(F);function _(g){if(g.open||(ge.current=bn(g.nativeEvent,ae.current)),g.reason===Gt&&g.nativeEvent.type==="mouseleave"&&(B.current=!0),g.reason===wt)if(g.nested)B.current=!1;else if(an(g.nativeEvent)||fn(g.nativeEvent))B.current=!1;else{let x=!1;U(h).createElement("div").focus({get preventScroll(){return x=!0,!1}}),x?B.current=!1:B.current=!0}}Z.on("openchange",_);function z(g){const x=M.current;let p=typeof x=="function"?x(g):x;if(p===void 0||p===!1)return null;p===null&&(p=!0);const A=T?.isConnected?T:null,X=F?.isConnected&&je(F)!=="body"?F:null;let k=L?X||A:A||X;return k||(k=bt()||null),typeof p=="boolean"?k:fe(p)||k||null}return()=>{Z.off("openchange",_);const g=de(b),x=ee(),p=w(E,g)||x.some(Q=>Q===g||w(Q,g))||W&&Pe(W.nodesRef.current,q(),!1).some(Q=>w(Q.context?.elements.floating,g)),A=M.current,X=ge.current,k=z(X);queueMicrotask(()=>{const Q=yn(k),c=typeof A!="boolean";if(A&&!B.current&&be(Q)&&(!(!c&&Q!==g&&g!==b.body)||p)){const u={preventScroll:!0};X==="keyboard"&&(u.focusVisible=!0),Q.focus(u)}B.current=!1})}},[r,E,h,M,$,Z,W,T,q,ee]),H(()=>{if(!Je||D||!E)return;const b=de(U(E));!be(b)||!_t(b)||w(E,b)&&b.blur()},[D,E]),H(()=>{if(!(r||!R))return R.setFocusManagerState({modal:l,closeOnFocusOut:d,open:D,onOpenChange:N.setOpen,domReference:T}),()=>{R.setFocusManagerState(null)}},[r,R,l,D,N,d,T]),H(()=>{if(!(r||!h))return yt(h),()=>{queueMicrotask(tt)}},[r,h]);const me=!r&&(l?!G:!0)&&(Fe||l);return Re.jsxs(m.Fragment,{children:[me&&Re.jsx(it,{"data-type":"inside",ref:S,onFocus:b=>{if(l){const F=re();_e(F[F.length-1])}else R?.portalNode&&(B.current=!1,ct(b,R.portalNode)?Ut(T)?.focus():fe(P??R.beforeOutsideRef)?.focus())}}),n,me&&Re.jsx(it,{"data-type":"inside",ref:j,onFocus:b=>{l?_e(re()[0]):R?.portalNode&&(d&&(B.current=!0),ct(b,R.portalNode)?Xt(T)?.focus():fe(v??R.afterOutsideRef)?.focus())}})]})}function En(){return!1}function Tn(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:o=!0,outsidePressEvent:s="sloppy",referencePress:i=En,bubbles:l,externalTree:d}=t,f="rootStore"in e?e.rootStore:e,v=f.useState("open"),P=f.useState("floatingElement"),{dataRef:a}=f.context,y=et(d),C=K(typeof o=="function"?o:()=>!1),N=typeof o=="function"?C:o,D=N!==!1,T=K(()=>s),{escapeKey:E,outsidePress:Z}=Tn(l),Y=m.useRef(!1),q=m.useRef(!1),J=m.useRef(!1),G=m.useRef(!1),se=m.useRef(""),M=m.useRef(null),$=Ne(),ve=Ne(),W=K(()=>{ve.clear(),a.current.insideReactTree=!1}),R=K(S=>{const j=a.current.floatingContext?.nodeId;return(y?Pe(y.nodesRef.current,j):[]).some(ue=>ue.context?.open&&!ue.context.dataRef.current[S])}),B=K(S=>Ye(S,f.select("floatingElement"))||Ye(S,f.select("domReferenceElement"))),ie=K(S=>{i()&&f.setOpen(!1,ke(jt,S.nativeEvent))}),te=K(S=>{if(!v||!n||!r||S.key!=="Escape"||G.current||!E&&R("__escapeKeyBubbles"))return;const j=ln(S)?S.nativeEvent:S,ce=ke(zt,j);f.setOpen(!1,ce),ce.isCanceled||S.preventDefault(),!E&&!ce.isPropagationAllowed&&S.stopPropagation()}),ne=K(()=>{a.current.insideReactTree=!0,ve.start(0,W)}),ge=K(S=>{if(!v||!n||S.button!==0)return;const j=Ee(S.nativeEvent);w(f.select("floatingElement"),j)&&(Y.current||(Y.current=!0,q.current=!1))}),ae=K(S=>{!v||!n||(S.defaultPrevented||S.nativeEvent.defaultPrevented)&&Y.current&&(q.current=!0)});m.useEffect(()=>{if(!v||!n)return W;a.current.__escapeKeyBubbles=E,a.current.__outsidePressBubbles=Z;const S=new We,j=new We;function ce(){S.clear(),G.current=!0}function ue(){S.start(Je?5:0,()=>{G.current=!1})}function Se(){J.current=!0,j.start(0,()=>{J.current=!1})}function Fe(){Y.current=!1,q.current=!1}function h(){const c=se.current,u=c==="pen"||!c?"mouse":c,V=T(),O=typeof V=="function"?V():V;return typeof O=="string"?O:O[u]}function re(c){const u=h();return u==="intentional"&&c.type!=="click"||u==="sloppy"&&c.type==="click"}function ee(c){const u=a.current.floatingContext?.nodeId,V=y&&Pe(y.nodesRef.current,u).some(O=>Ye(c,O.context?.elements.floating));return B(c)||V}function me(c){if(re(c)){c.type!=="click"&&!B(c)&&(j.clear(),J.current=!1),W();return}if(a.current.insideReactTree){W();return}const u=Ee(c),V=`[${Ke("inert")}]`,O=xe(u)?u.getRootNode():null,le=Array.from((St(O)?O:U(f.select("floatingElement"))).querySelectorAll(V)),Oe=f.context.triggerElements;if(u&&(Oe.hasElement(u)||Oe.hasMatchingElement(oe=>w(oe,u))))return;let we=xe(u)?u:null;for(;we&&!De(we);){const oe=Jt(we);if(De(oe)||!xe(oe))break;we=oe}if(!(le.length&&xe(u)&&!Qt(u)&&!w(u,f.select("floatingElement"))&&le.every(oe=>!w(we,oe)))){if(be(u)&&!("touches"in c)){const oe=De(u),He=Zt(u),nt=/auto|scroll/,Pt=oe||nt.test(He.overflowX),Ft=oe||nt.test(He.overflowY),Mt=Pt&&u.clientWidth>0&&u.scrollWidth>u.clientWidth,At=Ft&&u.clientHeight>0&&u.scrollHeight>u.clientHeight,Nt=He.direction==="rtl",Wt=At&&(Nt?c.offsetX<=u.offsetWidth-u.clientWidth:c.offsetX>u.clientWidth),Lt=Mt&&c.offsetY>u.clientHeight;if(Wt||Lt)return}if(!ee(c)){if(h()==="intentional"&&J.current){j.clear(),J.current=!1;return}typeof N=="function"&&!N(c)||R("__outsidePressBubbles")||(f.setOpen(!1,ke(wt,c)),W())}}}function b(c){h()!=="sloppy"||c.pointerType==="touch"||!f.select("open")||!n||B(c)||me(c)}function F(c){if(h()!=="sloppy"||!f.select("open")||!n||B(c))return;const u=c.touches[0];u&&(M.current={startTime:Date.now(),startX:u.clientX,startY:u.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},$.start(1e3,()=>{M.current&&(M.current.dismissOnTouchEnd=!1,M.current.dismissOnMouseDown=!1)}))}function L(c,u){const V=Ee(c);if(!V)return;const O=I(V,c.type,()=>{u(c),O()})}function _(c){se.current="touch",L(c,F)}function z(c){$.clear(),c.type==="pointerdown"&&(se.current=c.pointerType),!(c.type==="mousedown"&&M.current&&!M.current.dismissOnMouseDown)&&L(c,u=>{u.type==="pointerdown"?b(u):me(u)})}function g(c){if(!Y.current)return;const u=q.current;if(Fe(),h()==="intentional"){if(c.type==="pointercancel"){u&&Se();return}if(!ee(c)){if(u){Se();return}typeof N=="function"&&!N(c)||(j.clear(),J.current=!0,W())}}}function x(c){if(h()!=="sloppy"||!M.current||B(c))return;const u=c.touches[0];if(!u)return;const V=Math.abs(u.clientX-M.current.startX),O=Math.abs(u.clientY-M.current.startY),le=Math.sqrt(V*V+O*O);le>5&&(M.current.dismissOnTouchEnd=!0),le>10&&(me(c),$.clear(),M.current=null)}function p(c){L(c,x)}function A(c){h()!=="sloppy"||!M.current||B(c)||(M.current.dismissOnTouchEnd&&me(c),$.clear(),M.current=null)}function X(c){L(c,A)}const k=U(P),Q=Ie(r&&Ie(I(k,"keydown",te),I(k,"compositionstart",ce),I(k,"compositionend",ue)),D&&Ie(I(k,"click",z,!0),I(k,"pointerdown",z,!0),I(k,"pointerup",g,!0),I(k,"pointercancel",g,!0),I(k,"mousedown",z,!0),I(k,"mouseup",g,!0),I(k,"touchstart",_,!0),I(k,"touchmove",p,!0),I(k,"touchend",X,!0)));return()=>{Q(),S.clear(),j.clear(),Fe(),J.current=!1,W()}},[a,P,r,D,N,v,n,E,Z,te,W,T,R,B,y,f,$]);const he=m.useMemo(()=>({onKeyDown:te,onPointerDown:ie,onClick:ie}),[te,ie]),Te=m.useMemo(()=>({onKeyDown:te,onPointerDown:ae,onMouseDown:ae,onClickCapture:ne,onMouseDownCapture(S){ne(),ge(S)},onPointerDownCapture(S){ne(),ge(S)},onMouseUpCapture:ne,onTouchEndCapture:ne,onTouchMoveCapture:ne}),[te,ne,ge,ae]);return m.useMemo(()=>n?{reference:he,floating:Te,trigger:he}:{},[n,he,Te])}const Rn={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId};class vn extends en{constructor(t){const{syncOnly:n,nested:r,onOpenChange:o,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:xt(),nested:r,triggerElements:s},Rn),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 Sn(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:o,nested:s,onOpenChange:i}=e,l=t.useState("open"),d=t.useState("activeTriggerElement"),f=t.useState(n?"popupElement":"positionerElement"),v=t.context.triggerElements,P=i,a=m.useRef(null);r===void 0&&a.current===null&&(a.current=new vn({open:l,transitionStatus:void 0,referenceElement:d,floatingElement:f,triggerElements:v,onOpenChange:P,floatingId:o,syncOnly:!0,nested:s}));const y=r??a.current;return t.useSyncedValue("floatingId",o),H(()=>{const C={open:l,floatingId:o,referenceElement:d,floatingElement:f};xe(d)&&(C.domReferenceElement=d),y.state.positionReference===y.state.referenceElement&&(C.positionReference=d),y.update(C)},[l,o,d,f,y]),y.context.onOpenChange=P,y.context.nested=s,y}function On(e,t=!1,n=!1){const[r,o]=m.useState(e&&t?"idle":void 0),[s,i]=m.useState(e);return e&&!s&&(i(!0),o("starting")),!e&&s&&r!=="ending"&&!n&&o("ending"),!e&&!s&&r==="ending"&&o(void 0),H(()=>{if(!e&&s&&r!=="ending"&&n){const l=ye.request(()=>{o("ending")});return()=>{ye.cancel(l)}}},[e,s,r,n]),H(()=>{if(!e||t)return;const l=ye.request(()=>{o(void 0)});return()=>{ye.cancel(l)}},[t,e]),H(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&o("starting");const l=ye.request(()=>{o("idle")});return()=>{ye.cancel(l)}},[t,e,s,r]),{mounted:s,setMounted:i,transitionStatus:r}}const Jn={tabIndex:-1,[rn]:""};function Qn(e){return t=>t==="touch"?e.current:!0}function Zn(e,t=!1){const n=ze(),r=Ze()!=null,o=$e(()=>e(n,r)).current;return Sn({popupStore:o,treatPopupAsFloatingElement:t,floatingRootContext:o.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:o.setOpen}),o}function er({handle:e,store:t}){return H(()=>e.attachStore(t),[e,t]),null}function wn(e,t){const n=m.useRef(null),r=m.useRef(null);return m.useCallback(o=>{if(e===void 0)return;let s=!1;if(n.current!==null){const i=n.current,l=r.current,d=t.context.triggerElements.getById(i);l&&d===l&&(t.context.triggerElements.delete(i),s=!0),n.current=null,r.current=null}if(o!==null&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o),s=!0),s){const i=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==i&&t.set("triggerCount",i)}},[t,e])}function tr(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const o=n?.id??null;(o||t)&&(e.activeTriggerId=o,e.activeTriggerElement=n??null)}function nr(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function rr(e,t,n,r){const o=n.useState("isMountedByTrigger",e),s=wn(e,n),i=K(d=>{const f=n.select("open"),v=n.select("activeTriggerId");if(v===e){n.update({activeTriggerElement:d,...f?r:null});return}v==null&&f&&n.update({activeTriggerId:e,activeTriggerElement:d,...r})}),l=m.useCallback(d=>{s(d),d&&i(d)},[s,i]);return H(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:o}}function or(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=m.useRef(null),o=e.useState("open"),s=e.useState("triggerCount"),i=e.useState("activeTriggerId"),l=e.useState("activeTriggerElement");H(()=>{if(!o){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}const d=e.context.triggerElements.size,f={};e.state.triggerCount!==d&&(f.triggerCount=d);const v=e.select("activeTriggerId");let P=null;if(v){const a=e.context.triggerElements.getById(v);if(a)r.current=v,a!==e.state.activeTriggerElement&&(f.activeTriggerElement=a);else{for(const[y,C]of e.context.triggerElements.entries())if(C===e.state.activeTriggerElement){f.activeTriggerId=y,f.activeTriggerElement=C,r.current=y;break}f.activeTriggerId===void 0&&(r.current===v?P=v:r.current=null)}}else r.current=null;if(!P&&!v&&d===1){const a=e.context.triggerElements.entries().next();if(!a.done){const[y,C]=a.value;f.activeTriggerId=y,f.activeTriggerElement=C,r.current=y}}(f.triggerCount!==void 0||f.activeTriggerId!==void 0||f.activeTriggerElement!==void 0)&&e.update(f),P&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===P&&!e.context.triggerElements.getById(P)){const a=ke(tn);e.setOpen(!1,a),a.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,e,s,i,l,n])}function sr(e,t,n){const{mounted:r,setMounted:o,transitionStatus:s}=On(e),i=t.useState("preventUnmountingOnClose"),l=e?!1:i;t.useSyncedValues({mounted:r,transitionStatus:s,preventUnmountingOnClose:l});const d=K(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return nn({enabled:r&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||d()}}),{forceUnmount:d,transitionStatus:s}}function ir(e,t){e.useSyncedValues(t),H(()=>()=>{e.update({activeTriggerProps:Ge,inactiveTriggerProps:Ge,popupProps:Ge})},[e])}function cr(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 ur{constructor(){this.idMap=new Map}add(t,n){this.idMap.set(t,n)}delete(t){this.idMap.delete(t)}hasElement(t){for(const n of this.idMap.values())if(n===t)return!0;return!1}hasMatchingElement(t){for(const n of this.idMap.values())if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}}(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ut.startingStyle]="startingStyle",e[e.endingStyle=ut.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({});const Cn={"data-popup-open":""},xn={"data-popup-open":"","data-pressed":""},In={"data-open":""},kn={"data-closed":""},Pn={"data-anchor-hidden":""},lr={open(e){return e?Cn:null}},ar={open(e){return e?xn:null}},Fn={open(e){return e?In:kn},anchorHidden(e){return e?Pn:null}},fr={...Fn,...on};function dr(e){return ze(e,"base-ui")}const Mn="ArrowUp",An="ArrowDown",Nn="ArrowLeft",Wn="ArrowRight",Ln="Home",Bn="End",pr=new Set([Mn,An,Nn,Wn,Ln,Bn]),gr=m.forwardRef(function(t,n){const{cutout:r,...o}=t;let s;if(r){const i=r.getBoundingClientRect();s=`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 Re.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...o,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});let Et={},Tt={},Rt="";function Be(e,t){return cn(e)?e:t}function vt(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Be(t,n)).overflowY)}function Hn(e){if(typeof document>"u")return!1;const t=U(e);return Le(t).innerWidth-t.documentElement.clientWidth>0}function Yn(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=U(e),r=n.documentElement,o=n.body,s=Be(r,o),i=s.style.overflowY,l=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",s.style.overflowY="scroll";const d=s.offsetWidth;s.style.overflowY="hidden";const f=s.offsetWidth;return s.style.overflowY=i,r.style.scrollbarGutter=l,d===f}function Dn(e){const t=U(e),n=t.documentElement,r=t.body,o=Be(n,r),s={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,s)}}function Gn(e){const t=U(e),n=t.documentElement,r=t.body,o=Le(n);let s=0,i=0,l=!1;const d=ye.create();if(Je&&(o.visualViewport?.scale??1)!==1)return()=>{};function f(){const y=o.getComputedStyle(n),C=o.getComputedStyle(r),T=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,i=n.scrollLeft,Et={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Rt=n.style.scrollBehavior,Tt={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,Y=y.overflowY==="scroll"||C.overflowY==="scroll",q=y.overflowX==="scroll"||C.overflowX==="scroll",J=Math.max(0,o.innerWidth-r.clientWidth),G=Math.max(0,o.innerHeight-r.clientHeight),se=parseFloat(C.marginTop)+parseFloat(C.marginBottom),M=parseFloat(C.marginLeft)+parseFloat(C.marginRight),$=Be(n,r);if(l=Yn(e),l){n.style.scrollbarGutter=T,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:T,overflowY:"hidden",overflowX:"hidden"}),(E||Y)&&(n.style.overflowY="scroll"),(Z||q)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:se||G?`calc(100dvh - ${se+G}px)`:"100dvh",width:M||J?`calc(100vw - ${M+J}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),r.scrollTop=s,r.scrollLeft=i,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function v(){Object.assign(n.style,Et),Object.assign(r.style,Tt),l||(n.scrollTop=s,n.scrollLeft=i,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Rt)}function P(){v(),d.request(f)}f();const a=I(o,"resize",P);return()=>{d.cancel(),v(),typeof o.removeEventListener=="function"&&a()}}class _n{lockCount=0;restore=null;timeoutLock=We.create();timeoutUnlock=We.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 n=U(t),r=n.documentElement,o=n.body,s=Le(r);if(vt(s,r,o)){const l=new s.MutationObserver(()=>{vt(s,r,o)||(l.disconnect(),this.restore=null,this.lock(t))}),d={attributes:!0};l.observe(r,d),l.observe(o,d),this.restore=()=>l.disconnect();return}const i=sn||!Hn(t);this.restore=i?Dn(t):Gn(t)}}const Un=new _n;function hr(e=!0,t=null){H(()=>{if(e)return Un.acquire(t)},[e,t])}export{Kn as A,qn as B,pr as C,fn as D,_e as E,vn as F,un as G,an as H,gr as I,ur as P,Fn as a,jn as b,Qn as c,Jn as d,zn as e,hr as f,ir as g,Zn as h,cr as i,or as j,sr as k,er as l,On as m,Vn as n,et as o,fr as p,Ze as q,Pe as r,tr as s,lr as t,dr as u,Me as v,nr as w,$n as x,rr as y,ar as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,T as r,n,o as a,p as s}from"./__vite-browser-external-
|
|
1
|
+
import{r as e,T as r,n,o as a,p as s}from"./__vite-browser-external-C6_BtvDo.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{m as a}from"./__vite-browser-external-
|
|
1
|
+
import{m as a}from"./__vite-browser-external-C6_BtvDo.js";const o=[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]],e=a("zap",o);export{e as Z};
|
|
@@ -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 33 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",
|
|
@@ -196,6 +196,7 @@
|
|
|
196
196
|
{ "@type": "ListItem", "position": 30, "name": "AnythingLLM Desktop" },
|
|
197
197
|
{ "@type": "ListItem", "position": 31, "name": "Claude Science" },
|
|
198
198
|
{ "@type": "ListItem", "position": 32, "name": "DeepSeek Harness" }
|
|
199
|
+
{ "@type": "ListItem", "position": 33, "name": "TRAE Work CN" }
|
|
199
200
|
]
|
|
200
201
|
},
|
|
201
202
|
{
|
|
@@ -213,7 +214,7 @@
|
|
|
213
214
|
"@type": "Quest "name": "Which AI coding CLIs does Token Tracker support?",
|
|
214
215
|
"acceptedAnswer": {
|
|
215
216
|
"@type": "Answer",
|
|
216
|
-
"text": "Token Tracker supports
|
|
217
|
+
"text": "Token Tracker supports 33 AI coding tools, including 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, Prime Agent, Craft Agents, Reasonix, Kilo CLI, Kilo Code, Roo Code, Zed Agent, Goose, Droid, Mimo Code, ZCode, Qoder, AnythingLLM Desktop, Claude Science, DeepSeek Harness, and TRAE Work CN."
|
|
217
218
|
}
|
|
218
219
|
},
|
|
219
220
|
{
|
|
@@ -245,7 +246,7 @@
|
|
|
245
246
|
"name": "How do I monitor AI token usage and cost across tools?",
|
|
246
247
|
"acceptedAnswer": {
|
|
247
248
|
"@type": "Answer",
|
|
248
|
-
"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
|
|
249
|
+
"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 33 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."
|
|
249
250
|
}
|
|
250
251
|
},
|
|
251
252
|
{
|
|
@@ -261,7 +262,7 @@
|
|
|
261
262
|
]
|
|
262
263
|
}
|
|
263
264
|
</script>
|
|
264
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
265
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-C6_BtvDo.js"></script>
|
|
265
266
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CRYifSM4.css">
|
|
266
267
|
</head>
|
|
267
268
|
<body>
|
|
@@ -269,7 +270,7 @@
|
|
|
269
270
|
<h1>Token Tracker: monitor AI token usage and cost with a local dashboard and desktop companion</h1>
|
|
270
271
|
<p>
|
|
271
272
|
Token Tracker is a free, open-source, local-first dashboard that automatically tracks and monitors token usage
|
|
272
|
-
and cost across
|
|
273
|
+
and cost across 33 AI coding tools — including Claude Code, OpenAI Codex, Cursor, Gemini CLI, DeepSeek Harness, and TRAE Work CN. A desktop pet
|
|
273
274
|
reacts to real token activity, four desktop widgets
|
|
274
275
|
keep usage visible, and achievements turn coding history into progress. Native macOS and Windows apps
|
|
275
276
|
sit on top of accurate cross-provider deduplication. Token counts only — never prompts or conversations.
|
|
@@ -294,7 +295,7 @@
|
|
|
294
295
|
<li><strong>Desktop pet</strong> — a pixel companion that reacts to real token burn, streaks, and rest.</li>
|
|
295
296
|
<li><strong>Four desktop widgets</strong> — usage, activity heatmap, top models, and limits at a glance.</li>
|
|
296
297
|
<li><strong>Achievements</strong> — unlock milestones from local and optional account-wide activity.</li>
|
|
297
|
-
<li><strong>Unified usage dashboard</strong> — input, output, cached, and cache-creation tokens across
|
|
298
|
+
<li><strong>Unified usage dashboard</strong> — input, output, cached, and cache-creation tokens across 33 AI coding tools.</li>
|
|
298
299
|
<li><strong>Cost analysis</strong> — per-model pricing across 2,200+ models with an offline snapshot.</li>
|
|
299
300
|
<li><strong>Usage limits view</strong> — live quota and subscription status for 13 providers, with last-good caching for local providers such as Antigravity and Qoder.</li>
|
|
300
301
|
<li><strong>Service Status page</strong> — live operational and incident status from eight official provider status pages.</li>
|
|
@@ -305,11 +306,11 @@
|
|
|
305
306
|
</ul>
|
|
306
307
|
<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>
|
|
307
308
|
|
|
308
|
-
<h2>Supported AI coding tools (
|
|
309
|
+
<h2>Supported AI coding tools (33)</h2>
|
|
309
310
|
<p>
|
|
310
311
|
Use Token Tracker as a Claude Code token tracker, Codex token tracker, Cursor token tracker,
|
|
311
312
|
Gemini token tracker, OpenCode token tracker, GitHub Copilot token tracker, or DeepSeek Harness token tracker — one dashboard
|
|
312
|
-
covers all
|
|
313
|
+
covers all 33 tools below.
|
|
313
314
|
</p>
|
|
314
315
|
<ul>
|
|
315
316
|
<li><strong>Claude Code</strong> — Anthropic's official coding agent CLI; integrated via SessionEnd hook.</li>
|
|
@@ -344,6 +345,7 @@
|
|
|
344
345
|
<li><strong>AnythingLLM Desktop</strong> — passive per-message token metrics reader.</li>
|
|
345
346
|
<li><strong>Claude Science</strong> — passive reader for the <code>frames</code> table of <code>operon-cli.db</code>.</li>
|
|
346
347
|
<li><strong>DeepSeek Harness</strong> — passive session reader (<code>~/.dsh/sessions/**/session.jsonl[.zstd]</code>).</li>
|
|
348
|
+
<li><strong>TRAE Work CN</strong> — macOS signed-in app session-token reader; its internal API may change.</li>
|
|
347
349
|
</ul>
|
|
348
350
|
|
|
349
351
|
<h2>Who should use Token Tracker</h2>
|
|
@@ -374,7 +376,7 @@
|
|
|
374
376
|
<p>Run <code>npx tokentracker-cli</code>. The CLI auto-detects your AI coding tools, installs hooks, and opens the dashboard.</p>
|
|
375
377
|
|
|
376
378
|
<h3>Which AI coding tools does Token Tracker support?</h3>
|
|
377
|
-
<p>Token Tracker supports
|
|
379
|
+
<p>Token Tracker supports 33 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, Prime Agent, Craft Agents, Reasonix, Kilo CLI, Kilo Code, Roo Code, Zed Agent, Goose, Droid, Mimo Code, ZCode, Qoder, AnythingLLM Desktop, Claude Science, DeepSeek Harness, and TRAE Work CN.</p>
|
|
378
380
|
|
|
379
381
|
<h3>Is Token Tracker free and open source?</h3>
|
|
380
382
|
<p>Yes. Source on GitHub at <a href="https://github.com/xiufengsun/TokenTracker">github.com/xiufengsun/TokenTracker</a>; npm package <code>tokentracker-cli</code>.</p>
|
|
@@ -386,7 +388,7 @@
|
|
|
386
388
|
<p>Input, output, cached, and cache-creation tokens per model, project, and time window. It also surfaces usage limits for 13 providers, including Claude, Codex, Cursor, Gemini, Antigravity, Qoder, and Qoder CN.</p>
|
|
387
389
|
|
|
388
390
|
<h3>How do I monitor AI token usage and cost across tools?</h3>
|
|
389
|
-
<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
|
|
391
|
+
<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 33 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>
|
|
390
392
|
|
|
391
393
|
<h3>Does Token Tracker work offline?</h3>
|
|
392
394
|
<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,7 +165,7 @@
|
|
|
165
165
|
]
|
|
166
166
|
}
|
|
167
167
|
</script>
|
|
168
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
168
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-C6_BtvDo.js"></script>
|
|
169
169
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CRYifSM4.css">
|
|
170
170
|
</head>
|
|
171
171
|
<body>
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
]
|
|
137
137
|
}
|
|
138
138
|
</script>
|
|
139
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
139
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-C6_BtvDo.js"></script>
|
|
140
140
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CRYifSM4.css">
|
|
141
141
|
</head>
|
|
142
142
|
<body>
|
package/dashboard/dist/llms.txt
CHANGED
|
@@ -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/xiufengsun/TokenTracker/releases/latest)
|
|
25
25
|
|
|
26
|
-
## Supported AI coding tools (
|
|
26
|
+
## Supported AI coding tools (33)
|
|
27
27
|
- Claude Code
|
|
28
28
|
- Codex CLI
|
|
29
29
|
- Cursor
|
|
@@ -56,6 +56,7 @@ timestamps, never prompts, responses, or source code.
|
|
|
56
56
|
- AnythingLLM Desktop
|
|
57
57
|
- Claude Science
|
|
58
58
|
- DeepSeek Harness
|
|
59
|
+
- TRAE Work CN
|
|
59
60
|
|
|
60
61
|
## Capabilities
|
|
61
62
|
- Desktop pet that reacts to real token burn, streaks, and rest
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"description": "Shareable Token Tracker dashboard snapshot."
|
|
76
76
|
}
|
|
77
77
|
</script>
|
|
78
|
-
<script type="module" crossorigin src="/assets/__vite-browser-external-
|
|
78
|
+
<script type="module" crossorigin src="/assets/__vite-browser-external-C6_BtvDo.js"></script>
|
|
79
79
|
<link rel="stylesheet" crossorigin href="/assets/__vite-browser-external-CRYifSM4.css">
|
|
80
80
|
</head>
|
|
81
81
|
<body>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokentracker-cli",
|
|
3
|
-
"version": "0.91.
|
|
4
|
-
"description": "Local-first AI coding token usage and cost tracker for
|
|
3
|
+
"version": "0.91.3",
|
|
4
|
+
"description": "Local-first AI coding token usage and cost tracker for 33 tools, with a dashboard, desktop pet, widgets, achievements, and native macOS/Windows apps.",
|
|
5
5
|
"main": "src/cli.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"tokentracker-cli": "bin/tracker.js",
|
package/src/commands/init.js
CHANGED
|
@@ -103,7 +103,7 @@ const DIVIDER = "----------------------------------------------";
|
|
|
103
103
|
const DEFAULT_DASHBOARD_URL = "https://www.tokentracker.cc";
|
|
104
104
|
|
|
105
105
|
// Single source of truth for the welcome screen's provider count + sample list.
|
|
106
|
-
// test/discovery-metadata.test.js keeps this aligned with public
|
|
106
|
+
// test/discovery-metadata.test.js keeps this aligned with public 32-tool copy.
|
|
107
107
|
const SUPPORTED_PROVIDERS = [
|
|
108
108
|
"Claude Code",
|
|
109
109
|
"Codex CLI",
|
|
@@ -137,6 +137,7 @@ const SUPPORTED_PROVIDERS = [
|
|
|
137
137
|
"AnythingLLM Desktop",
|
|
138
138
|
"Claude Science",
|
|
139
139
|
"DeepSeek Harness",
|
|
140
|
+
"TRAE Work CN",
|
|
140
141
|
];
|
|
141
142
|
|
|
142
143
|
async function cmdInit(argv) {
|