tokentracker-cli 0.53.0 → 0.53.1
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/dashboard/dist/assets/{ActivityHeatmap-DxG6nWd8.js → ActivityHeatmap-M9Zne20q.js} +1 -1
- package/dashboard/dist/assets/{Card-elSTHm8n.js → Card-N6YvRmVP.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-Dwgemzr7.js → DashboardPage-Dgaz67re.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-C2wvMfrD.js → DevicePage-C-EiL_-U.js} +1 -1
- package/dashboard/dist/assets/{DialogTitle-CMFjOJ50.js → DialogTitle-hXdNnZq8.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-DCbWciTj.js → FadeIn-CyWLyCl4.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-BhUIdtrF.js → HeaderGithubStar-B7sA2XoJ.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-Bde82Wpb.js → LandingPage-CAd4Dox0.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardAvatar-vZuYlLXm.js → LeaderboardAvatar-DC2p_hQK.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-BlNgDJKg.js → LeaderboardPage-D5s4A7sE.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfileModal-Dn9JIBFs.js → LeaderboardProfileModal-2-VwNTSP.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfilePage-CDN-r_jK.js → LeaderboardProfilePage-Bj1jGsIU.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-BwIP_3r8.js → LimitsPage-BWTqT1af.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-B5mrdt7F.js → LocalOnlyNotice-CdTTz2px.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-DBaw5EFC.js → LoginPage-BsbXmH5M.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-CqmFr5o-.js → PopoverPopup-DSeGKiD8.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-Ax4c0bmp.js → ResetPasswordPage-9YyTy0mZ.js} +1 -1
- package/dashboard/dist/assets/{Select-Z5d1CFkx.js → Select-BIFMo6Hv.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-ZW0ZMGMh.js → SelectItemText-BPXH8jVm.js} +1 -1
- package/dashboard/dist/assets/{SettingsPage-CE26ZYBM.js → SettingsPage-Cipd7CHs.js} +1 -1
- package/dashboard/dist/assets/{SkillsPage-vZmBklCt.js → SkillsPage-ezexAJLL.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-BTqLJHOM.js → WidgetsPage-CpOhLj5o.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-CsbHheR1.js → WrappedPage-C7ZeQJx8.js} +1 -1
- package/dashboard/dist/assets/{agent-logos-BYWYJrI4.js → agent-logos-D7FpojEC.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-DiB5PbN3.js → arrow-up-right-CN7iU22l.js} +1 -1
- package/dashboard/dist/assets/{download-1IDeQ9W3.js → download-BGSDT4F-.js} +1 -1
- package/dashboard/dist/assets/{info-BnfXXgYt.js → info-3cVYLHPW.js} +1 -1
- package/dashboard/dist/assets/{main-n_Ek7Fhl.js → main-DRFL3nJu.js} +19 -16
- package/dashboard/dist/assets/{use-limits-display-prefs-DUIZ_cD6.js → use-limits-display-prefs-CqEQXSpu.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-CahaBEoP.js → use-native-settings-Bu6AMGKt.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-DfH4m3cw.js → use-usage-limits-C6X9k8f5.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-DGHtGVKk.js → useCurrency-C8QFVOTT.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-ffKrg51O.js → useScrollLock-DTIAMG6Z.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +1 -1
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/dashboard/dist/assets/{IpCheckPage-DpK9rEMa.js → IpCheckPage-Bb6ohs7K.js} +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as p,r as c,j as e,aK as b}from"./main-
|
|
1
|
+
import{Y as p,r as c,j as e,aK as b}from"./main-DRFL3nJu.js";const f={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_APP_VERSION:"0.53.1",VITE_INSFORGE_ANON_KEY:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3OC0xMjM0LTU2NzgtOTBhYi1jZGVmMTIzNDU2NzgiLCJlbWFpbCI6ImFub25AaW5zZm9yZ2UuY29tIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODExNDU5NDd9.T0auta_IrVIh0uXW1bob5QSnzvsnJmN28r5XkSGEuQY",VITE_INSFORGE_BASE_URL:"https://srctyff5.us-east.insforge.app"};function x(){return b(),`${(f&&"https://srctyff5.us-east.insforge.app"||"https://srctyff5.us-east.insforge.app").replace(/\/$/,"")}/functions/tokentracker-device-flow-grant`}function l(a){return(a||"").toUpperCase().replace(/\s+/g,"").replace(/[^A-Z0-9-]/g,"")}function k(){const a=p(),[m,u]=c.useState(""),[t,r]=c.useState({kind:"idle",message:""});c.useEffect(()=>{try{const i=new URLSearchParams(window.location.search).get("user_code");i&&u(l(i))}catch{}},[]);async function g(d){if(d?.preventDefault?.(),!a?.signedIn){r({kind:"error",message:"Please sign in first."});return}const i=l(m);if(!/^[A-HJKMNP-Z2-9]{4}-[A-HJKMNP-Z2-9]{4}$/.test(i)){r({kind:"error",message:"Invalid code format. Expected XXXX-XXXX."});return}r({kind:"working",message:"Approving…"});try{const n=await a.getAccessToken?.();if(!n){r({kind:"error",message:"No access token — please sign in again."});return}const s=await fetch(x(),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({user_code:i})}),o=await s.json().catch(()=>({}));s.ok?r({kind:"success",message:o.status==="already_approved"?`Already approved earlier${o.client_info?" ("+o.client_info+")":""}.`:`Approved${o.client_info?" for "+o.client_info:""}. You can close this tab — your CLI will pick it up within a few seconds.`}):s.status===404?r({kind:"error",message:"Code not found. Double-check what your CLI printed."}):s.status===410?r({kind:"error",message:"Code expired. Re-run `tracker device-login` and try again."}):s.status===401?r({kind:"error",message:"Session expired. Sign out, sign in, and try again."}):r({kind:"error",message:o?.error||`Server error (HTTP ${s.status}).`})}catch(n){r({kind:"error",message:`Network error: ${n?.message||n}`})}}return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white dark:bg-oai-gray-950 px-6 py-12",children:e.jsxs("div",{className:"w-full max-w-md rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 p-8",children:[e.jsx("h1",{className:"text-2xl font-semibold text-oai-gray-900 dark:text-white mb-2",children:"Approve your CLI"}),e.jsx("p",{className:"text-sm text-oai-gray-500 dark:text-oai-gray-400 mb-6",children:"Type the code your CLI showed you. We'll link it to your account so token usage from that machine flows into your leaderboard profile."}),a?.signedIn?null:e.jsx("div",{className:"rounded-md border border-amber-200 bg-amber-50 dark:bg-amber-900/20 dark:border-amber-800 p-4 mb-4",children:e.jsx("p",{className:"text-sm text-amber-700 dark:text-amber-300",children:"Sign in first, then return to this page."})}),e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"block text-xs font-medium uppercase tracking-wide text-oai-gray-500 dark:text-oai-gray-400 mb-1",children:"CLI code"}),e.jsx("input",{type:"text",value:m,onChange:d=>u(l(d.target.value)),placeholder:"XXXX-XXXX",spellCheck:!1,autoCapitalize:"characters",maxLength:9,className:"w-full font-mono text-xl tracking-widest text-center rounded-md border border-oai-gray-300 dark:border-oai-gray-700 bg-white dark:bg-oai-gray-900 text-oai-gray-900 dark:text-white px-4 py-3 focus:outline-none focus:ring-inset focus:ring-2 focus:ring-emerald-600"})]}),e.jsx("button",{type:"submit",disabled:t.kind==="working"||!a?.signedIn,className:"w-full rounded-md bg-emerald-600 hover:bg-emerald-500 disabled:bg-oai-gray-300 disabled:cursor-not-allowed text-white font-medium py-3 transition-colors",children:t.kind==="working"?"Approving…":"Approve"})]}),t.kind==="success"&&e.jsx("div",{className:"mt-4 rounded-md border border-emerald-200 bg-emerald-50 dark:bg-emerald-900/20 dark:border-emerald-800 p-4",children:e.jsx("p",{className:"text-sm text-emerald-700 dark:text-emerald-300",children:t.message})}),t.kind==="error"&&e.jsx("div",{className:"mt-4 rounded-md border border-red-200 bg-red-50 dark:bg-red-900/20 dark:border-red-800 p-4",children:e.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:t.message})})]})})}export{k as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bQ as s,b9 as T,r as i,b4 as W,a as k,bf as K,be as ee,j as I,bY as te,b$ as ne,b as oe,bR as se,bG as re,bJ as ae,b8 as ie,bL as le}from"./main-n_Ek7Fhl.js";import{x as z,P as G,w as L,A as x,l as H,v as ue,r as de,I as pe,h as ce,i as ge,j as fe,k as me,z as Se,m as Ce,s as Pe,e as Oe,f as Re,u as xe}from"./useScrollLock-ffKrg51O.js";function Ee(){return new z({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new G,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function he(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Ee(),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 Ie(e,t,o=!1){return new z({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0})}const w=s(e=>e.triggerIdProp??e.activeTriggerId),Y=s(e=>e.openProp??e.open),$=s(e=>(e.popupElement?.id??e.floatingId)||void 0);function Q(e,t){return t!==void 0&&Y(e)&&w(e)===t}function ve(e,t){return Q(e,t)?!0:t!==void 0&&Y(e)&&w(e)==null&&e.triggerCount===1}const ye={open:Y,mounted:s(e=>e.mounted),transitionStatus:s(e=>e.transitionStatus),floatingRootContext:s(e=>e.floatingRootContext),triggerCount:s(e=>e.triggerCount),preventUnmountingOnClose:s(e=>e.preventUnmountingOnClose),payload:s(e=>e.payload),activeTriggerId:w,activeTriggerElement:s(e=>e.mounted?e.activeTriggerElement:null),popupId:$,isTriggerActive:s((e,t)=>t!==void 0&&w(e)===t),isOpenedByTrigger:s((e,t)=>Q(e,t)),isMountedByTrigger:s((e,t)=>t!==void 0&&w(e)===t&&e.mounted),triggerProps:s((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:s((e,t)=>ve(e,t)?$(e):void 0),popupProps:s(e=>e.popupProps),popupElement:s(e=>e.popupElement),positionerElement:s(e=>e.positionerElement)},q=i.createContext(!1),X=i.createContext(void 0);function b(e){const t=i.useContext(X);if(e===!1&&t===void 0)throw new Error(W(27));return t}const be={...L,...K},Ye=i.forwardRef(function(t,o){const{render:r,className:a,style:l,forceRender:u=!1,...d}=t,{store:p}=b(),n=p.useState("open"),C=p.useState("nested"),m=p.useState("mounted"),S=p.useState("transitionStatus");return k("div",t,{state:{open:n,transitionStatus:S},ref:[p.context.backdropRef,o],stateAttributesMapping:be,props:[{role:"presentation",hidden:!m,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:u||!C})});let Te=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),we=(function(e){return e[e.open=x.open]="open",e[e.closed=x.closed]="closed",e[e.startingStyle=x.startingStyle]="startingStyle",e[e.endingStyle=x.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const Z=i.createContext(void 0);function V(){const e=i.useContext(Z);if(e===void 0)throw new Error(W(26));return e}const De={...L,...K,nestedDialogOpen(e){return e?{[we.nestedDialogOpen]:""}:null}},_e=i.forwardRef(function(t,o){const{render:r,className:a,style:l,finalFocus:u,initialFocus:d,...p}=t,{store:n}=b(),C=n.useState("descriptionElementId"),m=n.useState("disablePointerDismissal"),S=n.useState("floatingRootContext"),O=n.useState("popupProps"),f=n.useState("modal"),R=n.useState("mounted"),E=n.useState("nested"),h=n.useState("nestedOpenDialogCount"),g=n.useState("open"),v=n.useState("openMethod"),P=n.useState("titleElementId"),c=n.useState("transitionStatus"),M=n.useState("role"),N=S.useState("floatingId"),F=p.id??N;V(),ee({open:g,ref:n.context.popupRef,onComplete(){g&&n.context.onOpenChangeComplete?.(!0)}});function B(D){return D==="touch"?n.context.popupRef.current:!0}const j=d===void 0?B:d,U=h>0,y=n.useStateSetter("popupElement"),A=k("div",t,{state:{open:g,nested:E,transitionStatus:c,nestedDialogOpen:U},props:[O,{id:F,"aria-labelledby":P??void 0,"aria-describedby":C??void 0,role:M,...H,hidden:!R,onKeyDown(D){ue.has(D.key)&&D.stopPropagation()},style:{[Te.nestedDialogs]:h}},p],ref:[o,n.context.popupRef,y],stateAttributesMapping:De});return I.jsx(de,{context:S,openInteractionType:v,disabled:!R,closeOnFocusOut:!m,initialFocus:j,returnFocus:u,modal:f!==!1,restoreFocus:"popup",children:A})}),$e=i.forwardRef(function(t,o){const{keepMounted:r=!1,...a}=t,{store:l}=b(),u=l.useState("mounted"),d=l.useState("modal"),p=l.useState("open");return u||r?I.jsx(Z.Provider,{value:r,children:I.jsxs(te,{ref:o,...a,children:[u&&d===!0&&I.jsx(pe,{ref:l.context.internalBackdropRef,inert:ne(!p)}),t.children]})}):null});function ke(e){const{store:t,parentContext:o,actionsRef:r,isDrawer:a}=e,l=t.useState("open");ce(t,l),ge(t);const{forceUnmount:u}=fe(l,t),d=i.useCallback(()=>{t.setOpen(!1,oe(se))},[t]);return i.useImperativeHandle(r,()=>({unmount:u,close:d}),[u,d]),{parentContext:o,isDrawer:a}}function Me({store:e,dialogRoot:t}){const{parentContext:o,isDrawer:r}=t,a=e.useState("open"),l=e.useState("disablePointerDismissal"),u=e.useState("modal"),d=e.useState("popupElement"),p=e.useState("floatingRootContext"),[n,C]=i.useState(0),[m,S]=i.useState(0),O=n===0,f=me(p,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:u==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(g){if(!e.context.outsidePressEnabledRef.current||"button"in g&&g.button!==0||"touches"in g&&g.touches.length!==1)return!1;const v=re(g);if(O&&!l){const P=v;return u&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===P||e.context.backdropRef.current===P||ae(P,d)&&!P?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:O});Se(a&&u===!0,d),e.useContextCallback("onNestedDialogOpen",(g,v)=>{C(g),S(v)}),e.useContextCallback("onNestedDialogClose",()=>{C(0),S(0)}),i.useEffect(()=>(o?.onNestedDialogOpen&&a&&o.onNestedDialogOpen(n+1,m+(r?1:0)),o?.onNestedDialogClose&&!a&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&a&&o.onNestedDialogClose()}),[r,a,n,m,o]);const R=f.reference??T,E=f.trigger??T,h=i.useMemo(()=>ie(H,f.floating),[f.floating]);return Ce(e,{activeTriggerProps:R,inactiveTriggerProps:E,popupProps:h,nestedOpenDialogCount:n,nestedOpenDrawerCount:m}),null}const Ne={...ye,modal:s(e=>e.modal),nested:s(e=>e.nested),nestedOpenDialogCount:s(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:s(e=>e.nestedOpenDrawerCount),disablePointerDismissal:s(e=>e.disablePointerDismissal),openMethod:s(e=>e.openMethod),descriptionElementId:s(e=>e.descriptionElementId),titleElementId:s(e=>e.titleElementId),viewportElement:s(e=>e.viewportElement),role:s(e=>e.role)};class _ extends le{constructor(t,o,r=!1){const a=new G,l=Fe(t);l.floatingRootContext=Ie(a,o,r),super(l,{popupRef:i.createRef(),backdropRef:i.createRef(),internalBackdropRef:i.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:a,onOpenChange:void 0,onOpenChangeComplete:void 0},Ne)}setOpen=(t,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,o);const r={open:t};Pe(r,t,o.trigger),this.update(r)};static useStore(t,o){return Oe(t,(a,l)=>new _(o,a,l),!0).store}}function Fe(e={}){return{...he(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function Be(e,t="dialog"){const{children:o,open:r,defaultOpen:a=!1,onOpenChange:l,onOpenChangeComplete:u,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:n,handle:C,triggerId:m,defaultTriggerId:S=null}=e,O=t==="drawer",f=t==="alert-dialog",R=f?!0:p,E=f||d,h=f?"alertdialog":"dialog",g=b(!0),P={modal:R,disablePointerDismissal:E,nested:!!g,role:h},c=_.useStore(C?.store,{open:a,openProp:r,activeTriggerId:S,triggerIdProp:m,...P});Re(()=>{const y=r===void 0&&c.state.open===!1&&a===!0?{open:!0,activeTriggerId:S}:null;f?c.update(y?{...P,...y}:P):y&&c.update(y)}),c.useControlledProp("openProp",r),c.useControlledProp("triggerIdProp",m),c.useSyncedValues(P),c.useContextCallback("onOpenChange",l),c.useContextCallback("onOpenChangeComplete",u);const M=c.useState("open"),N=c.useState("mounted"),F=c.useState("payload"),B=ke({store:c,actionsRef:n,parentContext:g?.store.context,isDrawer:O}),j=M||N,U=i.useMemo(()=>({store:c}),[c]);return I.jsx(q.Provider,{value:!1,children:I.jsxs(X.Provider,{value:U,children:[j&&I.jsx(Me,{store:c,dialogRoot:B}),typeof o=="function"?o({payload:F}):o]})})}function Je(e){const t=i.useContext(q)?"drawer":"dialog";return Be(e,t)}let J=(function(e){return e[e.open=x.open]="open",e[e.closed=x.closed]="closed",e[e.startingStyle=x.startingStyle]="startingStyle",e[e.endingStyle=x.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const je={...L,...K,nested(e){return e?{[J.nested]:""}:null},nestedDialogOpen(e){return e?{[J.nestedDialogOpen]:""}:null}},We=i.forwardRef(function(t,o){const{render:r,className:a,style:l,children:u,...d}=t,p=V(),{store:n}=b(),C=n.useState("open"),m=n.useState("nested"),S=n.useState("transitionStatus"),O=n.useState("nestedOpenDialogCount"),f=n.useState("mounted"),R=n.useStateSetter("viewportElement"),E=O>0;return k("div",t,{enabled:p||f,state:{open:C,nested:m,transitionStatus:S,nestedDialogOpen:E},ref:[o,R],stateAttributesMapping:je,props:[{role:"presentation",hidden:!f,style:{pointerEvents:C?void 0:"none"},children:u},d]})}),ze=i.forwardRef(function(t,o){const{render:r,className:a,style:l,id:u,...d}=t,{store:p}=b(),n=xe(u);return p.useSyncedValueWithCleanup("titleElementId",n),k("h2",t,{ref:o,props:[{id:n},d]})});export{Je as D,$e as a,Ye as b,We as c,_e as d,ze as e,Ie as f,he as g,ye as p,b as u};
|
|
1
|
+
import{bQ as s,b9 as T,r as i,b4 as W,a as k,bf as K,be as ee,j as I,bY as te,b$ as ne,b as oe,bR as se,bG as re,bJ as ae,b8 as ie,bL as le}from"./main-DRFL3nJu.js";import{x as z,P as G,w as L,A as x,l as H,v as ue,r as de,I as pe,h as ce,i as ge,j as fe,k as me,z as Se,m as Ce,s as Pe,e as Oe,f as Re,u as xe}from"./useScrollLock-DTIAMG6Z.js";function Ee(){return new z({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new G,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function he(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Ee(),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 Ie(e,t,o=!1){return new z({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0})}const w=s(e=>e.triggerIdProp??e.activeTriggerId),Y=s(e=>e.openProp??e.open),$=s(e=>(e.popupElement?.id??e.floatingId)||void 0);function Q(e,t){return t!==void 0&&Y(e)&&w(e)===t}function ve(e,t){return Q(e,t)?!0:t!==void 0&&Y(e)&&w(e)==null&&e.triggerCount===1}const ye={open:Y,mounted:s(e=>e.mounted),transitionStatus:s(e=>e.transitionStatus),floatingRootContext:s(e=>e.floatingRootContext),triggerCount:s(e=>e.triggerCount),preventUnmountingOnClose:s(e=>e.preventUnmountingOnClose),payload:s(e=>e.payload),activeTriggerId:w,activeTriggerElement:s(e=>e.mounted?e.activeTriggerElement:null),popupId:$,isTriggerActive:s((e,t)=>t!==void 0&&w(e)===t),isOpenedByTrigger:s((e,t)=>Q(e,t)),isMountedByTrigger:s((e,t)=>t!==void 0&&w(e)===t&&e.mounted),triggerProps:s((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:s((e,t)=>ve(e,t)?$(e):void 0),popupProps:s(e=>e.popupProps),popupElement:s(e=>e.popupElement),positionerElement:s(e=>e.positionerElement)},q=i.createContext(!1),X=i.createContext(void 0);function b(e){const t=i.useContext(X);if(e===!1&&t===void 0)throw new Error(W(27));return t}const be={...L,...K},Ye=i.forwardRef(function(t,o){const{render:r,className:a,style:l,forceRender:u=!1,...d}=t,{store:p}=b(),n=p.useState("open"),C=p.useState("nested"),m=p.useState("mounted"),S=p.useState("transitionStatus");return k("div",t,{state:{open:n,transitionStatus:S},ref:[p.context.backdropRef,o],stateAttributesMapping:be,props:[{role:"presentation",hidden:!m,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:u||!C})});let Te=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),we=(function(e){return e[e.open=x.open]="open",e[e.closed=x.closed]="closed",e[e.startingStyle=x.startingStyle]="startingStyle",e[e.endingStyle=x.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const Z=i.createContext(void 0);function V(){const e=i.useContext(Z);if(e===void 0)throw new Error(W(26));return e}const De={...L,...K,nestedDialogOpen(e){return e?{[we.nestedDialogOpen]:""}:null}},_e=i.forwardRef(function(t,o){const{render:r,className:a,style:l,finalFocus:u,initialFocus:d,...p}=t,{store:n}=b(),C=n.useState("descriptionElementId"),m=n.useState("disablePointerDismissal"),S=n.useState("floatingRootContext"),O=n.useState("popupProps"),f=n.useState("modal"),R=n.useState("mounted"),E=n.useState("nested"),h=n.useState("nestedOpenDialogCount"),g=n.useState("open"),v=n.useState("openMethod"),P=n.useState("titleElementId"),c=n.useState("transitionStatus"),M=n.useState("role"),N=S.useState("floatingId"),F=p.id??N;V(),ee({open:g,ref:n.context.popupRef,onComplete(){g&&n.context.onOpenChangeComplete?.(!0)}});function B(D){return D==="touch"?n.context.popupRef.current:!0}const j=d===void 0?B:d,U=h>0,y=n.useStateSetter("popupElement"),A=k("div",t,{state:{open:g,nested:E,transitionStatus:c,nestedDialogOpen:U},props:[O,{id:F,"aria-labelledby":P??void 0,"aria-describedby":C??void 0,role:M,...H,hidden:!R,onKeyDown(D){ue.has(D.key)&&D.stopPropagation()},style:{[Te.nestedDialogs]:h}},p],ref:[o,n.context.popupRef,y],stateAttributesMapping:De});return I.jsx(de,{context:S,openInteractionType:v,disabled:!R,closeOnFocusOut:!m,initialFocus:j,returnFocus:u,modal:f!==!1,restoreFocus:"popup",children:A})}),$e=i.forwardRef(function(t,o){const{keepMounted:r=!1,...a}=t,{store:l}=b(),u=l.useState("mounted"),d=l.useState("modal"),p=l.useState("open");return u||r?I.jsx(Z.Provider,{value:r,children:I.jsxs(te,{ref:o,...a,children:[u&&d===!0&&I.jsx(pe,{ref:l.context.internalBackdropRef,inert:ne(!p)}),t.children]})}):null});function ke(e){const{store:t,parentContext:o,actionsRef:r,isDrawer:a}=e,l=t.useState("open");ce(t,l),ge(t);const{forceUnmount:u}=fe(l,t),d=i.useCallback(()=>{t.setOpen(!1,oe(se))},[t]);return i.useImperativeHandle(r,()=>({unmount:u,close:d}),[u,d]),{parentContext:o,isDrawer:a}}function Me({store:e,dialogRoot:t}){const{parentContext:o,isDrawer:r}=t,a=e.useState("open"),l=e.useState("disablePointerDismissal"),u=e.useState("modal"),d=e.useState("popupElement"),p=e.useState("floatingRootContext"),[n,C]=i.useState(0),[m,S]=i.useState(0),O=n===0,f=me(p,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:u==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(g){if(!e.context.outsidePressEnabledRef.current||"button"in g&&g.button!==0||"touches"in g&&g.touches.length!==1)return!1;const v=re(g);if(O&&!l){const P=v;return u&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===P||e.context.backdropRef.current===P||ae(P,d)&&!P?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:O});Se(a&&u===!0,d),e.useContextCallback("onNestedDialogOpen",(g,v)=>{C(g),S(v)}),e.useContextCallback("onNestedDialogClose",()=>{C(0),S(0)}),i.useEffect(()=>(o?.onNestedDialogOpen&&a&&o.onNestedDialogOpen(n+1,m+(r?1:0)),o?.onNestedDialogClose&&!a&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&a&&o.onNestedDialogClose()}),[r,a,n,m,o]);const R=f.reference??T,E=f.trigger??T,h=i.useMemo(()=>ie(H,f.floating),[f.floating]);return Ce(e,{activeTriggerProps:R,inactiveTriggerProps:E,popupProps:h,nestedOpenDialogCount:n,nestedOpenDrawerCount:m}),null}const Ne={...ye,modal:s(e=>e.modal),nested:s(e=>e.nested),nestedOpenDialogCount:s(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:s(e=>e.nestedOpenDrawerCount),disablePointerDismissal:s(e=>e.disablePointerDismissal),openMethod:s(e=>e.openMethod),descriptionElementId:s(e=>e.descriptionElementId),titleElementId:s(e=>e.titleElementId),viewportElement:s(e=>e.viewportElement),role:s(e=>e.role)};class _ extends le{constructor(t,o,r=!1){const a=new G,l=Fe(t);l.floatingRootContext=Ie(a,o,r),super(l,{popupRef:i.createRef(),backdropRef:i.createRef(),internalBackdropRef:i.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:a,onOpenChange:void 0,onOpenChangeComplete:void 0},Ne)}setOpen=(t,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!t&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(t,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,o);const r={open:t};Pe(r,t,o.trigger),this.update(r)};static useStore(t,o){return Oe(t,(a,l)=>new _(o,a,l),!0).store}}function Fe(e={}){return{...he(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...e}}function Be(e,t="dialog"){const{children:o,open:r,defaultOpen:a=!1,onOpenChange:l,onOpenChangeComplete:u,disablePointerDismissal:d=!1,modal:p=!0,actionsRef:n,handle:C,triggerId:m,defaultTriggerId:S=null}=e,O=t==="drawer",f=t==="alert-dialog",R=f?!0:p,E=f||d,h=f?"alertdialog":"dialog",g=b(!0),P={modal:R,disablePointerDismissal:E,nested:!!g,role:h},c=_.useStore(C?.store,{open:a,openProp:r,activeTriggerId:S,triggerIdProp:m,...P});Re(()=>{const y=r===void 0&&c.state.open===!1&&a===!0?{open:!0,activeTriggerId:S}:null;f?c.update(y?{...P,...y}:P):y&&c.update(y)}),c.useControlledProp("openProp",r),c.useControlledProp("triggerIdProp",m),c.useSyncedValues(P),c.useContextCallback("onOpenChange",l),c.useContextCallback("onOpenChangeComplete",u);const M=c.useState("open"),N=c.useState("mounted"),F=c.useState("payload"),B=ke({store:c,actionsRef:n,parentContext:g?.store.context,isDrawer:O}),j=M||N,U=i.useMemo(()=>({store:c}),[c]);return I.jsx(q.Provider,{value:!1,children:I.jsxs(X.Provider,{value:U,children:[j&&I.jsx(Me,{store:c,dialogRoot:B}),typeof o=="function"?o({payload:F}):o]})})}function Je(e){const t=i.useContext(q)?"drawer":"dialog";return Be(e,t)}let J=(function(e){return e[e.open=x.open]="open",e[e.closed=x.closed]="closed",e[e.startingStyle=x.startingStyle]="startingStyle",e[e.endingStyle=x.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const je={...L,...K,nested(e){return e?{[J.nested]:""}:null},nestedDialogOpen(e){return e?{[J.nestedDialogOpen]:""}:null}},We=i.forwardRef(function(t,o){const{render:r,className:a,style:l,children:u,...d}=t,p=V(),{store:n}=b(),C=n.useState("open"),m=n.useState("nested"),S=n.useState("transitionStatus"),O=n.useState("nestedOpenDialogCount"),f=n.useState("mounted"),R=n.useStateSetter("viewportElement"),E=O>0;return k("div",t,{enabled:p||f,state:{open:C,nested:m,transitionStatus:S,nestedDialogOpen:E},ref:[o,R],stateAttributesMapping:je,props:[{role:"presentation",hidden:!f,style:{pointerEvents:C?void 0:"none"},children:u},d]})}),ze=i.forwardRef(function(t,o){const{render:r,className:a,style:l,id:u,...d}=t,{store:p}=b(),n=xe(u);return p.useSyncedValueWithCleanup("titleElementId",n),k("h2",t,{ref:o,props:[{id:n},d]})});export{Je as D,$e as a,Ye as b,We as c,_e as d,ze as e,Ie as f,he as g,ye as p,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as d,j as n,m as a}from"./main-
|
|
1
|
+
import{e as d,j as n,m as a}from"./main-DRFL3nJu.js";function v({children:i,delay:t=0,duration:o=.35,y:e=12,className:s="",once:r=!0}){return d()?n.jsx("div",{className:s,children:i}):n.jsx(a.div,{initial:{opacity:0,y:e},animate:{opacity:1,y:0},transition:{duration:o,delay:t,ease:[.16,1,.3,1]},className:s,children:i})}function x({children:i,staggerDelay:t=.1,initialDelay:o=0,className:e=""}){return d()?n.jsx("div",{className:e,children:i}):n.jsx(a.div,{initial:"hidden",animate:"visible",variants:{hidden:{},visible:{transition:{staggerChildren:t,delayChildren:o}}},className:e,children:i})}function h({children:i,className:t="",y:o=12}){return d()?n.jsx("div",{className:t,children:i}):n.jsx(a.div,{variants:{hidden:{opacity:0,y:o},visible:{opacity:1,y:0,transition:{duration:.35,ease:[.16,1,.3,1]}}},className:t,children:i})}export{v as F,x as S,h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,aF as c,j as t}from"./main-
|
|
1
|
+
import{r as s,aF as c,j as t}from"./main-DRFL3nJu.js";function u({repo:r="mm7894215/TokenTracker"}){const[a,o]=s.useState(null);return s.useEffect(()=>{if(typeof window>"u")return;const n=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,i=typeof document<"u"&&(document.documentElement?.classList.contains("screenshot-capture")||document.body?.classList.contains("screenshot-capture"));c({prefersReducedMotion:n,screenshotCapture:i})&&fetch(`https://api.github.com/repos/${r}`).then(e=>e.json()).then(e=>{e&&typeof e.stargazers_count=="number"&&o(e.stargazers_count)}).catch(()=>{})},[r]),t.jsxs("a",{href:`https://github.com/${r}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-2 px-3 py-1.5 rounded-md border border-oai-gray-200 dark:border-oai-gray-700 bg-oai-gray-50 dark:bg-oai-gray-800 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-700 transition-colors no-underline",children:[t.jsx("svg",{height:"16",viewBox:"0 0 16 16",width:"16",className:"shrink-0 fill-oai-gray-700 dark:fill-oai-gray-300",children:t.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})}),t.jsx("span",{className:"text-xs font-medium text-oai-gray-700 dark:text-oai-gray-300 whitespace-nowrap",children:"Star"}),a!==null&&t.jsx("span",{className:"text-xs font-semibold text-oai-gray-900 dark:text-oai-white tabular-nums whitespace-nowrap",children:a})]})}export{u as H};
|