tokentracker-cli 1.3.7 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dashboard/dist/assets/{AchievementBadge-B6Ys-Iv6.js → AchievementBadge-C6ZoXGzv.js} +1 -1
  2. package/dashboard/dist/assets/{AchievementsPage-C7EJYb05.js → AchievementsPage-BkHoOrUq.js} +2 -2
  3. package/dashboard/dist/assets/{AchievementsSection-KjJeaWDP.js → AchievementsSection-BmK0_LQF.js} +1 -1
  4. package/dashboard/dist/assets/{BadgeDetailModal-BdoapwT5.js → BadgeDetailModal-DwoD1Nsr.js} +1 -1
  5. package/dashboard/dist/assets/BotAnimated-m4GXCXTJ.js +1 -0
  6. package/dashboard/dist/assets/{Card-CMShFKqX.js → Card-D_SqQIBC.js} +1 -1
  7. package/dashboard/dist/assets/{CloudCheckoutPage-DQ16a4Ui.js → CloudCheckoutPage-BSYvxA_x.js} +1 -1
  8. package/dashboard/dist/assets/{CloudPage-D1PEMzr2.js → CloudPage-Bwnj7Ocg.js} +2 -2
  9. package/dashboard/dist/assets/{CommandPalette-t3sXFKqr.js → CommandPalette-CBMCbek2.js} +1 -1
  10. package/dashboard/dist/assets/{CommunityStatsModal-DHyreMHY.js → CommunityStatsModal-DkMCREYc.js} +1 -1
  11. package/dashboard/dist/assets/{ConfirmModal-DiguIoDY.js → ConfirmModal-DAt5opxx.js} +1 -1
  12. package/dashboard/dist/assets/Controls-DsJLsMpr.js +1 -0
  13. package/dashboard/dist/assets/DashboardPage-B4hR6Jr1.js +1 -0
  14. package/dashboard/dist/assets/{DateRangePopover-CVZTfOUX.js → DateRangePopover-CyAT0F7i.js} +1 -1
  15. package/dashboard/dist/assets/{DevicePage-BagH0rTy.js → DevicePage-CaZzXt8j.js} +1 -1
  16. package/dashboard/dist/assets/{DialogClose-IWs31AbB.js → DialogClose-Dg8Rrcbc.js} +1 -1
  17. package/dashboard/dist/assets/DialogDescription-gdxwXQBG.js +1 -0
  18. package/dashboard/dist/assets/{DialogTitle-CI8xcLkd.js → DialogTitle-CgQTzYDB.js} +1 -1
  19. package/dashboard/dist/assets/{ElectricLogo-CakZnEiu.js → ElectricLogo-PbWNE6Jw.js} +1 -1
  20. package/dashboard/dist/assets/{FadeIn-BJiqknMG.js → FadeIn-CgGVCeA7.js} +1 -1
  21. package/dashboard/dist/assets/{HeaderGithubStar-Bo6VoGCl.js → HeaderGithubStar-D8I6O4H1.js} +1 -1
  22. package/dashboard/dist/assets/{HoverTooltip-DjJmYzbc.js → HoverTooltip-BQ0w0NcA.js} +1 -1
  23. package/dashboard/dist/assets/{IpCheckPage-Cp2ELhP8.js → IpCheckPage-D9vVoMNk.js} +1 -1
  24. package/dashboard/dist/assets/{LandingPage-gvBFMTKh.js → LandingPage-DNV9PcRZ.js} +2 -2
  25. package/dashboard/dist/assets/{LeaderboardPage-CbWwclwl.js → LeaderboardPage-BVfC39jk.js} +2 -2
  26. package/dashboard/dist/assets/{LeaderboardProBadge-QK4hLmn1.js → LeaderboardProBadge-g6XLqOpA.js} +1 -1
  27. package/dashboard/dist/assets/{LeaderboardProfileModal-DuggTNlv.js → LeaderboardProfileModal-Dxwperqt.js} +3 -3
  28. package/dashboard/dist/assets/{LeaderboardProfilePage-CZZAm33s.js → LeaderboardProfilePage-C9552VgQ.js} +1 -1
  29. package/dashboard/dist/assets/{LimitsPage-DJkws70g.js → LimitsPage-CWaM8Ubc.js} +1 -1
  30. package/dashboard/dist/assets/{LocalOnlyNotice-Cf9NPAL1.js → LocalOnlyNotice-DJ8t4CkI.js} +1 -1
  31. package/dashboard/dist/assets/{LoginCard-s3qsEOET.js → LoginCard-5cDUjlaP.js} +1 -1
  32. package/dashboard/dist/assets/{LoginModal-BTLHl4eP.js → LoginModal-CaEskXOR.js} +1 -1
  33. package/dashboard/dist/assets/{LoginPage-DDqQpy85.js → LoginPage--buWhwDc.js} +1 -1
  34. package/dashboard/dist/assets/PetPage-DZlGXdiW.js +2 -0
  35. package/dashboard/dist/assets/{PopoverPopup-B_fwRpm_.js → PopoverPopup-IQrgeWzz.js} +1 -1
  36. package/dashboard/dist/assets/{ProviderIcon-B1oef_V8.js → ProviderIcon-CSKhjDnT.js} +1 -1
  37. package/dashboard/dist/assets/{ResetPasswordPage-BduujSou.js → ResetPasswordPage-ClzIMLjQ.js} +1 -1
  38. package/dashboard/dist/assets/{Select-ClkKzKsi.js → Select-KHVnbrwD.js} +1 -1
  39. package/dashboard/dist/assets/{SelectItemText-D_4VNKEi.js → SelectItemText-BqAFvX8b.js} +1 -1
  40. package/dashboard/dist/assets/{SelfHostPage-CDNLHmOx.js → SelfHostPage-DHA9hDnA.js} +1 -1
  41. package/dashboard/dist/assets/{ServiceStatusPage-V1exv7gK.js → ServiceStatusPage-A4WcSrnG.js} +1 -1
  42. package/dashboard/dist/assets/{SessionsPage-BR5gBSc1.js → SessionsPage-CWu0gXwO.js} +1 -1
  43. package/dashboard/dist/assets/SettingsPage-DzurIV6u.js +5 -0
  44. package/dashboard/dist/assets/{SkillsPage-D0oeWRew.js → SkillsPage-CfM8w0xf.js} +1 -1
  45. package/dashboard/dist/assets/{TokenGalaxy-h5USfWnF.js → TokenGalaxy-BiCXCnEH.js} +1 -1
  46. package/dashboard/dist/assets/TooltipPopup-BcnMVc6a.js +1 -0
  47. package/dashboard/dist/assets/{TrendMonitor-gMTrGZzH.js → TrendMonitor-PFSJn43N.js} +1 -1
  48. package/dashboard/dist/assets/{WidgetsPage-xghIyvm_.js → WidgetsPage-CnH4zkP8.js} +1 -1
  49. package/dashboard/dist/assets/{WrappedPage-O4zzP87x.js → WrappedPage-BpsnuM4e.js} +1 -1
  50. package/dashboard/dist/assets/__vite-browser-external-CbUj3l39.css +1 -0
  51. package/dashboard/dist/assets/{__vite-browser-external-DKVGjnxf.js → __vite-browser-external-CbhiyufG.js} +2 -2
  52. package/dashboard/dist/assets/{agent-logos-CyXPIQ5S.js → agent-logos-DFupeEJz.js} +1 -1
  53. package/dashboard/dist/assets/{arrow-left-BqMZ7dgK.js → arrow-left-Cu0jOgzo.js} +1 -1
  54. package/dashboard/dist/assets/{arrow-right-D2cfRUf2.js → arrow-right-DgFuyz9F.js} +1 -1
  55. package/dashboard/dist/assets/{arrow-up-right-DSJpQHMH.js → arrow-up-right-COoZfksW.js} +1 -1
  56. package/dashboard/dist/assets/{calendar-days-Cpu5CPAM.js → calendar-days-B_QPPq3a.js} +1 -1
  57. package/dashboard/dist/assets/{check-BTSG8HIW.js → check-D_enaDhp.js} +1 -1
  58. package/dashboard/dist/assets/{chevron-down-0nuZGQbD.js → chevron-down-Di_xdF9P.js} +1 -1
  59. package/dashboard/dist/assets/{cloud-checkout-Jv0vhd5v.js → cloud-checkout-DNFMqoiZ.js} +1 -1
  60. package/dashboard/dist/assets/{composite-_t6vz49X.js → composite-CUbvhoGL.js} +1 -1
  61. package/dashboard/dist/assets/{download-CzxvhDR9.js → download-CrDgjohg.js} +1 -1
  62. package/dashboard/dist/assets/{external-link-BwKhoPLM.js → external-link-DgnNV6zS.js} +1 -1
  63. package/dashboard/dist/assets/{flame-Bni4FlSO.js → flame-Lsd5DkgX.js} +1 -1
  64. package/dashboard/dist/assets/{format-tokens-BLPhLm4w.js → format-tokens-DSxX2imE.js} +1 -1
  65. package/dashboard/dist/assets/{gift-lj3smodH.js → gift-BA3WiW1-.js} +1 -1
  66. package/dashboard/dist/assets/{host-mode-DluVCV7W.js → host-mode-BiJLkMdX.js} +1 -1
  67. package/dashboard/dist/assets/{icons-BThVE2Zq.js → icons-BxxxA-aw.js} +1 -1
  68. package/dashboard/dist/assets/{index-CETYrL7R.js → index-BTC0A20d.js} +1 -1
  69. package/dashboard/dist/assets/{index-D_ERbEBI.js → index-BlvkImKO.js} +1 -1
  70. package/dashboard/dist/assets/{index-CarMa6Pv.js → index-V-WILWJ0.js} +1 -1
  71. package/dashboard/dist/assets/{info-DSgWF_40.js → info-CluBWyTe.js} +1 -1
  72. package/dashboard/dist/assets/{link-2-C7H_UH8Q.js → link-2-M880npIj.js} +1 -1
  73. package/dashboard/dist/assets/{loader-circle-B2ln5DKm.js → loader-circle-BEowiVYF.js} +1 -1
  74. package/dashboard/dist/assets/{modifiers.esm-DHEGy9eE.js → modifiers.esm-pR4sKZep.js} +1 -1
  75. package/dashboard/dist/assets/{monitor-smartphone-BI3aJPNi.js → monitor-smartphone-GOnwL7NC.js} +1 -1
  76. package/dashboard/dist/assets/{play-CVxzAkNo.js → play-C2Yih72t.js} +1 -1
  77. package/dashboard/dist/assets/{plus-UGoZah-U.js → plus-KF6U4UP_.js} +1 -1
  78. package/dashboard/dist/assets/{provider-display-C-ibpm5u.js → provider-display-Bio3tJX4.js} +1 -1
  79. package/dashboard/dist/assets/{react-_bbDNdaT.js → react-Dt52_FiQ.js} +1 -1
  80. package/dashboard/dist/assets/{safePolygon-DeLf2a7a.js → safePolygon-D7wQNKcm.js} +1 -1
  81. package/dashboard/dist/assets/{search-BzL7DvcZ.js → search-CW0YCdKx.js} +1 -1
  82. package/dashboard/dist/assets/{server-BsilXoLs.js → server-DKLG1DuM.js} +1 -1
  83. package/dashboard/dist/assets/{shield-check-Dx8cSMB0.js → shield-check-DkJ3sCHH.js} +1 -1
  84. package/dashboard/dist/assets/{skills-api-CnOpyIPR.js → skills-api-yS1uW-mw.js} +1 -1
  85. package/dashboard/dist/assets/{sortable.esm-DrIfxJ2p.js → sortable.esm-DZo9A4kG.js} +1 -1
  86. package/dashboard/dist/assets/{store-CjkDYjXp.js → store-BbYtf4Vy.js} +1 -1
  87. package/dashboard/dist/assets/{terminal-CExBqXDx.js → terminal-FK6txO2c.js} +1 -1
  88. package/dashboard/dist/assets/{trash-DSHRpaMy.js → trash-QX4FHz_p.js} +1 -1
  89. package/dashboard/dist/assets/{use-community-stats-B1W63PCE.js → use-community-stats-DaURJ5sU.js} +1 -1
  90. package/dashboard/dist/assets/{use-latest-request-guard-8-lur0NI.js → use-latest-request-guard-BZnnoQct.js} +1 -1
  91. package/dashboard/dist/assets/{use-limits-display-prefs-Dq0e_5PV.js → use-limits-display-prefs-C77UTTya.js} +1 -1
  92. package/dashboard/dist/assets/{use-native-settings-CkPyWn4W.js → use-native-settings-DHS101SR.js} +1 -1
  93. package/dashboard/dist/assets/{use-ordered-list-Cul7GZDv.js → use-ordered-list-h5iXqXbU.js} +1 -1
  94. package/dashboard/dist/assets/use-reduced-motion-Bpc6LGag.js +1 -0
  95. package/dashboard/dist/assets/use-session-efficiency-pref-DZVvvmoq.js +1 -0
  96. package/dashboard/dist/assets/{use-transform-DzUhSbxH.js → use-transform-dcPyhMQK.js} +1 -1
  97. package/dashboard/dist/assets/{use-usage-limits-3ZkgTe7n.js → use-usage-limits-BBAi4Wvb.js} +1 -1
  98. package/dashboard/dist/assets/{useCurrency-EbqxSlEF.js → useCurrency-CW5GHWIB.js} +1 -1
  99. package/dashboard/dist/assets/{usePositioner-cTX1WPQP.js → usePositioner-BQgBHX5s.js} +1 -1
  100. package/dashboard/dist/assets/{useTokenFormat-CanmWK4w.js → useTokenFormat-DntK8yNR.js} +1 -1
  101. package/dashboard/dist/assets/{zap-DQHYg9o6.js → zap-Brp6hC7u.js} +1 -1
  102. package/dashboard/dist/index.html +2 -2
  103. package/dashboard/dist/ip-check.html +2 -2
  104. package/dashboard/dist/leaderboard.html +2 -2
  105. package/dashboard/dist/share.html +2 -2
  106. package/package.json +1 -1
  107. package/src/lib/pricing/seed-snapshot.json +1 -1
  108. package/dashboard/dist/assets/BotAnimated-coLP7eiI.js +0 -1
  109. package/dashboard/dist/assets/CloudUsageExport-Dn7_qVGy.js +0 -4
  110. package/dashboard/dist/assets/Controls-D6267L_q.js +0 -1
  111. package/dashboard/dist/assets/DashboardPage-0xC6i2rZ.js +0 -1
  112. package/dashboard/dist/assets/DialogDescription-JwE-wyWI.js +0 -1
  113. package/dashboard/dist/assets/PetPage-D4P5yDL8.js +0 -1
  114. package/dashboard/dist/assets/SettingsPage-LJJCS1G0.js +0 -2
  115. package/dashboard/dist/assets/TooltipPopup-1KxZ_iHu.js +0 -1
  116. package/dashboard/dist/assets/__vite-browser-external-DvNSoTb8.css +0 -1
  117. package/dashboard/dist/assets/skins-Mc0sI20C.js +0 -1
  118. package/dashboard/dist/assets/use-pet-settings-DkNURWe6.js +0 -2
  119. package/dashboard/dist/assets/use-reduced-motion-CkHJN2uY.js +0 -1
@@ -1 +0,0 @@
1
- import{r as _,j as I}from"./__vite-browser-external-DKVGjnxf.js";import{r as Wt,c as Zt,d as mt,e as Jt}from"./use-pet-settings-DkNURWe6.js";import{T as j,r as $,c as u,a as et,l as H,b as y,d as U,s as rt,e as T,p as Yt,h as pt,f as te,S as ee,t as at,g as jt,i as se,j as ne,k as ie,C as oe,m as xt,n as re}from"./skins-Mc0sI20C.js";function nt(t,e=.55,s=.62){const n=(t%360+360)%360,i=(1-Math.abs(2*s-1))*e,r=i*(1-Math.abs(n/60%2-1)),o=s-i/2,[l,c,p]=n<60?[i,r,0]:n<120?[r,i,0]:n<180?[0,i,r]:n<240?[0,r,i]:n<300?[r,0,i]:[i,0,r],h=f=>Math.round((f+o)*255).toString(16).padStart(2,"0");return`#${h(l)}${h(c)}${h(p)}`}function ae(t,e,s,n,i=1){const r=t.phase+e*t.speed*j,o=Math.cos(t.tilt),l=Math.sin(t.tilt),c=Math.sqrt(Math.max(0,1-t.k*t.k)),p=64,h=t.sweep*j;let f="",M="",k=null;for(let P=0;P<=p;P++){const x=r+P/p*h,m=Math.cos(x),g=Math.sin(x),d=t.a*(m*o+g*-l*t.k)+t.cx,C=t.a*(m*l+g*o*t.k)+t.cy,R=t.a*g*c<0,a=$(d*s),O=$(C*s),E=R!==k?"M":"L";R?M+=`${E}${a} ${O}`:f+=`${E}${a} ${O}`,k=R}const A=Math.cos(t.tilt)*t.a*s,w=Math.sin(t.tilt)*t.a*s;return{id:n,front:f,back:M,width:t.width*s,opacity:i,grad:{x1:$(t.cx*s-A),y1:$(t.cy*s-w),x2:$(t.cx*s+A),y2:$(t.cy*s+w),stops:[nt(t.hue),nt(t.hue+t.hueSpan*.5),nt(t.hue+t.hueSpan)]}}}const D=et(659918),gt=Array.from({length:6},(t,e)=>({a:1.3+D()*.1,k:.05+D()*.4,tilt:e/6*Math.PI+D()*.5,speed:3+D()*.7,phase:D()*j,sweep:.6+D()*.25,hue:e*360/6+D()*30,hueSpan:60+D()*60,width:.05+D()*.012,cx:0,cy:.1})),ce=Array.from({length:4},(t,e)=>({a:.78+e*.2,k:.05+e*.02,tilt:-.62+e*.05,speed:.3,phase:.06*e,sweep:.4,hue:95+e*62,hueSpan:100,width:.05,cx:0,cy:-.12})),Mt=[-.557,-.013,.532],bt=.165,At=1.25,wt=et(48879),le=Array.from({length:5},(t,e)=>({birth:e*.2,angle:wt()*j,rho:.58+wt()*.18}));function he(t,e){const s=[];for(const n of le){const i=t-n.birth;if(i<0||i>.62)continue;const r=n.rho*Math.pow(.75,i*10),o=n.angle+i*100*Math.PI/180;s.push({x:Math.cos(o)*r*e,y:Math.sin(o)*r*e,r:(.04+.028*u(i/.55))*e,depth:u(1-r/.8),opacity:u(i/.06)*u((.62-i)/.08)})}return s}const kt=et(49383),pe=Array.from({length:4},(t,e)=>{const s=e-1.5;return{a:.85*(1+s*.03),k:.15/.85*(1+s*.16),tilt:34*Math.PI/180+s*.035,speed:210/360,phase:-e*.045+kt()*.012,sweep:.34,hue:e*85+kt()*20,hueSpan:80,width:.095,cx:0,cy:0}}),ue=.129,de="#2496e8",fe=-42,It=1.003,ye=.15,me=1.14,xe=.054,ut=15.46,ct=.186,lt=.412,st={yaw:28.49,pitch:28.62,roll:-13},J=t=>t*Math.PI/180;function tt(t,e,s){const n=Math.cos(s),i=Math.sin(s);return[[t[0]*n+e[0]*i,t[1]*n+e[1]*i,t[2]*n+e[2]*i],[e[0]*n-t[0]*i,e[1]*n-t[1]*i,e[2]*n-t[2]*i]]}function Ht(t,e,s=ut){let n=[0,0,1],i=[1,0,0],r=[0,1,0];[n,i]=tt(n,i,J(t.yaw)),[r,n]=tt(r,n,J(t.pitch)),[i,r]=tt(i,r,J(t.roll));const o=l=>{const[c,p]=tt(n,i,J(s*l));return{x:c[0]*e,y:c[1]*e,a:p[0],b:p[1],c:r[0],d:r[1],depth:c[2]}};return[o(-1),o(1)]}const Pt=et(24301),Et=(()=>{const t=[];let e=1.4;for(;e<900;)t.push(e),e+=1.9+Pt()*2.7,Pt()<.18&&(t.push(e),e+=.24);return t})(),ge=.18;function Me(t){for(let e=0;e<Et.length;e++){const s=Et[e];if(t<s)break;const n=(t-s)/ge;if(n>=0&&n<=1)return n<.45?1-n/.45:(n-.45)/.55}return 1}function be(t,e={}){const{wander:s=1,blink:n=!0,float:i=!0}=e;return{dYaw:(H(t,11.3,.4)*5.5+H(t,3.7,2.1)*1.6)*s,dPitch:(H(t,9.1,1.3)*4.2+H(t,4.3,.7)*1.3)*s,dRoll:H(t,13.7,3.2)*2.2*s,lid:n?Me(t):1,driftX:i?H(t,7.9,1.9)*.006:0,driftY:i?H(t,5.3,.3)*.007:0,breath:i?1+Math.sin(t/3.4*Math.PI*2)*.005:1}}function Ae(t){return .06+.94*u(t)}const L=(t,e,s=0,n=1)=>({w:t,h:e,tilt:s,open:n}),F=(t,e,s=0,n=1)=>[L(t,e,s,n),L(t,e,-s,n)],Xt=[{id:"neutre",gaze:{...st},split:ut,eyes:[L(ct,lt),L(ct,lt)]},{id:"attentif",gaze:{yaw:4,pitch:5,roll:-4},split:16,eyes:F(.21,.44)},{id:"surpris",gaze:{yaw:3,pitch:-3,roll:0},split:19,eyes:F(.45,.47)},{id:"excite",gaze:{yaw:6,pitch:-14,roll:0},split:19.5,eyes:F(.4,.56,-10)},{id:"heureux",gaze:{yaw:5,pitch:9,roll:0},split:17,eyes:F(.27,.17,14)},{id:"hilare",gaze:{yaw:4,pitch:14,roll:0},split:18,eyes:F(.34,.13,20)},{id:"colere",gaze:{yaw:3,pitch:7,roll:0},split:17,eyes:F(.34,.15,30)},{id:"triste",gaze:{yaw:3,pitch:-13,roll:0},split:16,eyes:F(.22,.4,-28)},{id:"effraye",gaze:{yaw:2,pitch:-20,roll:0},split:20.5,eyes:F(.4,.6)},{id:"mefiant",gaze:{yaw:12,pitch:6,roll:-6},split:16,eyes:[L(.21,.4),L(.22,.15)]},{id:"confus",gaze:{yaw:-14,pitch:3,roll:8},split:16.5,eyes:[L(.2,.44,-18),L(.28,.17,14)]},{id:"curieux",gaze:{yaw:16,pitch:-9,roll:-15},split:16.5,eyes:[L(.24,.46,-8),L(.2,.38,-8)]},{id:"fier",gaze:{yaw:5,pitch:17,roll:0},split:17,eyes:F(.3,.15,18)},{id:"timide",gaze:{yaw:-19,pitch:-14,roll:-7},split:14,eyes:F(.17,.3)},{id:"blase",gaze:{yaw:-22,pitch:2,roll:0},split:16,eyes:F(.3,.12)},{id:"somnolent",gaze:{yaw:6,pitch:-9,roll:-3},split:16,eyes:F(.2,.42,0,.42)}],Ot=new Map(Xt.map(t=>[t.id,t])),zt=(t,e,s)=>({w:y(t.w,e.w,s),h:y(t.h,e.h,s),tilt:y(t.tilt??0,e.tilt??0,s),open:y(t.open,e.open,s)});function we(t,e,s){return{id:e.id,gaze:{yaw:y(t.gaze.yaw,e.gaze.yaw,s),pitch:y(t.gaze.pitch,e.gaze.pitch,s),roll:y(t.gaze.roll,e.gaze.roll,s)},split:y(t.split,e.split,s),eyes:[zt(t.eyes[0],e.eyes[0],s),zt(t.eyes[1],e.eyes[1],s)]}}const X=(t,e)=>[{w:t,h:e,open:1},{w:t,h:e,open:1}];function S(t={}){return{sil:U(1),offX:0,offY:0,gaze:{...st},split:ut,eyes:X(ct,lt),eyeAlpha:1,bodyAlpha:1,dots:[],arcs:[],notif:null,dotsBehind:!1,...t}}const Gt=-.1875,ke=Yt(pt(0,-.505,.132,0,.13,.075),0,Gt),Ie=Yt(pt(0,-.2535,.1345,0,.2535,.1345),0,0),Pe=(t={})=>({radii:[...ke],rot:0,cx:0,cy:Gt,sx:1,sy:1,...t}),Ee=(t={})=>({radii:[...Ie],rot:0,cx:0,cy:0,sx:1,sy:1,...t}),Oe=te(pt(0,0,.118,0,.172,.012)),Rt=.213;function _t(t){return rt("triangle",{rot:t,cx:-Rt*Math.sin(t),cy:Rt*Math.cos(t)})}function St(t,e){const s=((t-e*.5)/1.5%1+1)%1,n=s<.5?.5-.5*Math.cos(s*j):0;return u(n*2)}const Ut=[{id:"idle",duration:2.4,morph:.45,blinkIn:!1,baseFace:!0,baseBody:!0,pose:()=>S()},{id:"thinking",duration:2.6,morph:.4,baseFace:!1,baseBody:!1,blinkIn:!0,pose:t=>{const e=St(t,1),s=.3+.7*T.easeOutCubic(u(t/.3));return S({sil:U(bt*(1+(At-1)*e),{cx:Mt[1]}),eyeAlpha:0,dots:[0,2].map(n=>{const i=St(t,n);return{x:Mt[n]*s,y:0,r:bt*(1+(At-1)*i),opacity:.55+.45*i}})})}},{id:"wink",duration:1.6,morph:.3,blinkIn:!0,baseFace:!1,baseBody:!0,pose:()=>S({gaze:{yaw:-5.37,pitch:4.55,roll:6.7},split:16.25,eyes:[{w:.236,h:.464,open:1},{w:.447,h:.089,open:1}]})},{id:"wide",duration:1.8,morph:.55,blinkIn:!0,baseFace:!1,baseBody:!0,pose:()=>S({gaze:{yaw:6.92,pitch:-21.96,roll:11.6},split:18.43,eyes:X(.356,.875)})},{id:"alert",duration:2.4,minDuration:2,morph:.45,baseFace:!1,baseBody:!1,blinkIn:!1,pose:t=>{const e=u(t/1.5),s=T.easeInOutCubic(e)*.82-.087,n=t>1.6?u((t-1.6)/.4):0,i=s*(1-n)+.1*n,r=Math.sin(t*2.5*j)*.005,o=17.7*Math.PI/180;return S({sil:Ee({rot:o,cx:i,cy:-.325-r}),eyeAlpha:0,dots:[{x:i-Math.sin(o)*.58,y:-.325+Math.cos(o)*.58+r*2.8,r:.118,d:Oe,rot:o*180/Math.PI,opacity:1}]})}},{id:"notify",duration:2.2,morph:.5,blinkIn:!0,baseFace:!1,baseBody:!0,pose:t=>{const e=u(t/.45),s=1+(me-1)*Math.sin(e*Math.PI)*(1-e*.35),n=ye*(e<1?s:1),i=fe*Math.PI/180;return S({gaze:{yaw:-21.94,pitch:-5.82,roll:-12.2},split:18.89,eyes:X(.505,.498),notif:{x:Math.cos(i)*It,y:Math.sin(i)*It,r:n,notch:n+xe}})}},{id:"exclaim",duration:2,morph:.45,baseFace:!1,baseBody:!1,blinkIn:!1,pose:()=>S({sil:Pe(),eyeAlpha:0,dots:[{x:-.012,y:.526,r:.113,opacity:1}]})},{id:"sleep",duration:2.4,morph:.5,baseFace:!1,baseBody:!1,blinkIn:!1,pose:t=>S({sil:U(.1585,{cy:.11+Math.sin(t*(j/.6))*.19}),eyeAlpha:0})},{id:"egg",duration:1.8,morph:.4,baseFace:!1,baseBody:!1,blinkIn:!0,pose:()=>S({sil:rt("egg"),gaze:{yaw:19.97,pitch:26.01,roll:-17.1},split:11.07,eyes:X(.164,.385)})},{id:"hexagon",duration:1.6,morph:.4,baseFace:!1,baseBody:!1,blinkIn:!0,pose:()=>S({sil:rt("hexagon"),gaze:{yaw:23.11,pitch:24.42,roll:-13.3},split:13.37,eyes:X(.177,.411)})},{id:"play",duration:2,morph:.5,baseFace:!1,baseBody:!1,blinkIn:!0,pose:t=>{const e=u(t/.35)*u((2.2-t)/.5);return S({sil:_t(0),gaze:{yaw:12,pitch:-8,roll:-6},split:15,eyes:X(.18,.34),arcs:ce.map((s,n)=>({id:`sw${n}`,seed:{...s,cx:.45-t*.42},t,opacity:e}))})}},{id:"orbit",duration:3.4,minDuration:2.5,morph:.6,baseFace:!1,baseBody:!1,blinkIn:!1,pose:t=>{const e=T.easeInOutCubic(u(t/.35)),s=-j*1.25*t*e,n=T.easeInOutCubic(u((t-1.6)/.9)),i=_t(s),r=U(1,{rot:s}),o={radii:i.radii.map((c,p)=>c+(r.radii[p]-c)*n),rot:s,cx:i.cx*(1-n),cy:i.cy*(1-n),sx:1,sy:1},l=u(t/.8)*u((3.6-t)/.9);return S({sil:o,gaze:{yaw:st.yaw+Math.sin(t*6.5)*65*(1-n),pitch:-4+n*32,roll:-13},eyes:X(.18,.34+n*.07),arcs:gt.map((c,p)=>({id:`rg${p}`,seed:c,t,opacity:l*u((t-p*.13)/.3)}))})}},{id:"swirl",duration:1.3,minDuration:1.3,morph:.3,baseFace:!0,baseBody:!0,blinkIn:!0,pose:t=>S({arcs:gt.slice(0,3).map((e,s)=>({id:`sw${s}`,seed:e,t,opacity:u((t-s*.06)/.14)*u((1.22-t)/.34)}))})},{id:"burst",duration:2.6,minDuration:2.4,morph:.4,baseFace:!1,baseBody:!1,blinkIn:!1,pose:t=>{const e=1-.834*T.easeOutQuint(u(t/.7)),s=T.easeOutQuint(u((t-1.7)/.7));return S({sil:U(e+(1-e)*s),eyeAlpha:u((t-1.85)/.4),dots:he(t,1),dotsBehind:!0})}},{id:"comet",duration:2.4,minDuration:2.4,morph:.45,baseFace:!1,baseBody:!1,blinkIn:!1,pose:t=>{const e=1-(1-ue)*T.easeOutQuint(u(t/.55)),s=T.easeOutQuint(u((t-1.85)/.6)),n=u((t-.15)/.25)*u((1.95-t)/.3);return S({sil:U(e+(1-e)*s,{cy:Math.sin(u(t/1.7)*Math.PI)*.035}),eyeAlpha:u((t-2)/.35),arcs:pe.map((i,r)=>({id:`cm${r}`,seed:i,t,opacity:n}))})}}],Q=new Map(Ut.map(t=>[t.id,t])),Y=100,Tt=5.5+1.6,vt=4.2+1.3,ze=.006,Re=.007;function Ft(t,e,s){const n=[],i=Ht(t.gaze,Y,t.split);for(let r=0;r<2;r++){const o=i[r];if(o.depth<=.02)continue;const l=t.eyes[r],c=(l.tilt??0)*Math.PI/180,p=Math.cos(c),h=Math.sin(c),f=o.a*p+o.c*h,M=o.b*p+o.d*h,k=-o.a*h+o.c*p,A=-o.b*h+o.d*p,w=Math.max(l.w*Y,.01)/2,P=Math.max(l.h*Y,.01)/2,x=Math.min(w,P),m=P>w,g=m?P-x:w-x,d=jt(s,Math.atan2(o.y,o.x)-e.rot);n.push({x:o.x*d,y:o.y*d,ax:(m?k:f)*g,ay:(m?A:M)*g,r:x,m:[f,M,k,A]})}return n}function _e(t,e,s,n,i){const r=n-e,o=i-s,l=r*r+o*o;let c=1/0,p=0,h=0;for(let M=0;M<t.length;M++){const k=t[M];let A=l>0?((k.x-e)*r+(k.y-s)*o)/l:0;A=A<0?0:A>1?1:A;const w=e+A*r-k.x,P=s+A*o-k.y,x=w*w+P*P;x<c&&(c=x,p=w,h=P)}const f=Math.sqrt(c);return{d:f,ux:f>1e-9?p/f:0,uy:f>1e-9?h/f:0}}const Se=Math.hypot(ze,Re)*Y;function Bt(t,e,s,n){let i=1/0,r=0,o=0;for(const l of e){const c=l.x+s,p=l.y+n,h=_e(t,c-l.ax,p-l.ay,c+l.ax,p+l.ay),[f,M,k,A]=l.m,w=l.r*Math.hypot(f*h.ux+M*h.uy,k*h.ux+A*h.uy)+Se;h.d-w<i&&(i=h.d-w,r=h.ux,o=h.uy)}return{marge:i,ux:r,uy:o}}const $t=12,Te=8;function ve(t){if(!t.length)return{x:0,y:0};const e=(x,m)=>{let g=1/0;for(const d of t)g=Math.min(g,Bt(d.contour,d.empreintes,x,m).marge);return g};let s=1/0;for(const x of t)s=Math.min(s,Bt(x.calContour,x.reference,0,0).marge);let n=0,i=0;const r=t[0].empreintes;for(const x of r)n-=x.x/r.length,i-=x.y/r.length;const o=Math.max(.35*Y,Math.hypot(n,i)*1.25);s=Math.min(s,e(n,i));const l=e(0,0);if(l>=s&&l>=0)return{x:0,y:0};const c=Math.max(s,0);let p=0,h=0,f=1/0,M=0,k=0,A=l;for(let x=0;x<$t;x++){const m=x/$t*Math.PI*2,g=Math.cos(m),d=Math.sin(m);if(e(g*o,d*o)<c){for(const R of[.3,.6,1]){const a=e(g*o*R,d*o*R);a>A&&(A=a,M=g*o*R,k=d*o*R)}continue}let C=0,v=o;for(let R=0;R<Te;R++){const a=(C+v)/2;e(g*a,d*a)>=c?v=a:C=a}v<f&&(f=v,p=g*v,h=d*v)}const w=f===1/0?M:p,P=f===1/0?k:h;return{x:+(w/Y).toFixed(6),y:+(P/Y).toFixed(6)}}function Fe(t,e,s){return t.baseFace&&s?{gaze:s.gaze,split:s.split,eyes:s.eyes}:{gaze:e.gaze,split:e.split,eyes:e.eyes}}function Be(t){const e=n=>JSON.stringify([n.gaze,n.split,n.eyes,n.sil.rot,n.sil.cx,n.sil.cy,n.sil.sx,n.sil.sy]);if(e(t.pose(0))===e(t.pose(t.duration)))return[0];const s=3;return Array.from({length:s},(n,i)=>i/(s-1)*t.duration)}function $e(t,e,s){const n=[];for(const i of Be(t)){const r=t.pose(i),o=at({...r.sil,radii:e},Y),l=at(r.sil,Y),c=Fe(t,r,s),p=[];for(const h of[-Tt,Tt])for(const f of[-vt,vt])p.push({...c,gaze:{yaw:c.gaze.yaw+h,pitch:c.gaze.pitch+f,roll:c.gaze.roll}});for(const h of p)n.push({empreintes:Ft(h,r.sil,e),reference:Ft(h,r.sil,r.sil.radii),contour:o,calContour:l})}return ve(n)}const it={x:0,y:0},ht=(t,e)=>`${t}|${e??""}`;function Ce(){return new Map(ee.map(t=>{const e=new Map;for(const s of Ut){if(!s.baseBody)continue;const n=s.baseFace?[null,...Xt]:[null];for(const i of n)e.set(ht(s.id,i?.id??null),$e(s,t.radii,i))}return[t.radii,e]}))}const Le=Ce();function Ct(t,e,s){if(!t)return it;const n=Le.get(t);return n?n.get(ht(e,s))??n.get(ht(e,null))??it:it}const ot={yaw:0,pitch:0,mix:0,spin:0,wander:1},Ne=(t,e,s)=>({yaw:y(t.yaw,e.yaw,s),pitch:y(t.pitch,e.pitch,s),mix:y(t.mix,e.mix,s),spin:y(t.spin,e.spin,s),wander:y(t.wander,e.wander,s)}),Lt=(t,e,s)=>({w:y(t.w,e.w,s),h:y(t.h,e.h,s),open:y(t.open,e.open,s),tilt:y(t.tilt??0,e.tilt??0,s)});function Nt(t,e,s){const n=1-s;return{sil:ie(t.sil,e.sil,s),offX:y(t.offX,e.offX,s),offY:y(t.offY,e.offY,s),gaze:{yaw:y(t.gaze.yaw,e.gaze.yaw,s),pitch:y(t.gaze.pitch,e.gaze.pitch,s),roll:y(t.gaze.roll,e.gaze.roll,s)},split:y(t.split,e.split,s),eyes:[Lt(t.eyes[0],e.eyes[0],s),Lt(t.eyes[1],e.eyes[1],s)],eyeAlpha:y(t.eyeAlpha,e.eyeAlpha,s),bodyAlpha:y(t.bodyAlpha,e.bodyAlpha,s),dots:[...t.dots.map(i=>({...i,opacity:i.opacity*n})),...e.dots.map(i=>({...i,opacity:i.opacity*s}))],arcs:[...t.arcs.map(i=>({...i,id:`a${i.id}`,opacity:i.opacity*n})),...e.arcs.map(i=>({...i,id:`b${i.id}`,opacity:i.opacity*s}))],notif:s<.5?t.notif:e.notif,dotsBehind:s<.5?t.dotsBehind:e.dotsBehind}}class G{scale;cur;prev=null;departFige=null;tCur=0;tPrev=0;blinkAt=-10;pts=[];shape=null;shapePrev=null;shapeAt=-10;expr=null;exprPrev=null;exprAt=-10;look=ot;lookPrev=ot;lookAt=-10;lookMorph=.24;static SHAPE_MORPH=.45;static LOOK_MORPH=.24;constructor(e=100,s="idle",n=null,i=null){this.scale=e,this.cur=s,this.shape=n,this.expr=i}setExpression(e,s=0){e!==this.expr&&(this.exprPrev=this.expr,this.expr=e,this.exprAt=s)}exprAtTime(e){const s=this.expr,n=this.exprPrev;if(!s||!n)return s;const i=(e-this.exprAt)/G.SHAPE_MORPH;return i>=1?s:we(n,s,T.easeOutQuint(u(i)))}setShape(e,s=0){e!==this.shape&&(this.shapePrev=this.shape,this.shape=e,this.shapeAt=s)}shapeAtTime(e){const s=this.shape,n=this.shapePrev;if(!s||!n)return s;const i=(e-this.shapeAt)/G.SHAPE_MORPH;if(i>=1)return s;const r=T.easeOutQuint(u(i));return s.map((o,l)=>y(n[l]??o,o,r))}setLook(e,s,n=G.LOOK_MORPH){e&&!Number.isFinite(e.yaw+e.pitch+e.mix+e.spin+e.wander)||(this.lookPrev=this.lookAtTime(s),this.look=e??ot,this.lookAt=s,this.lookMorph=n)}lookAtTime(e){const s=(e-this.lookAt)/this.lookMorph;return s>=1?this.look:Ne(this.lookPrev,this.look,T.easeOutQuint(u(s)))}posed(e,s,n,i){let r=e.pose(s);return e.baseBody&&n&&(r={...r,sil:{...r.sil,radii:n}}),e.baseFace&&i&&(r={...r,gaze:i.gaze,split:i.split,eyes:i.eyes}),r}decalageAtTime(e,s){const n=(r,o,l,c)=>{if(l===c)return c;const p=(e-r)/o;if(p>=1)return c;const h=T.easeOutQuint(u(p));return{x:y(l.x,c.x,h),y:y(l.y,c.y,h)}},i=r=>n(this.exprAt,G.SHAPE_MORPH,Ct(r,s,this.exprPrev?.id??null),Ct(r,s,this.expr?.id??null));return n(this.shapeAt,G.SHAPE_MORPH,i(this.shapePrev),i(this.shape))}get state(){return this.cur}reset(e,s){this.cur=e,this.prev=null,this.departFige=null,this.tCur=s,this.tPrev=s,this.blinkAt=-10}origine(e,s,n){if(this.departFige)return this.departFige;if(!this.prev)return null;const i=Q.get(this.prev);return this.posed(i,Math.max(0,e-this.tPrev),s,n)}poseComposee(e){const s=Q.get(this.cur),n=this.shapeAtTime(e),i=this.exprAtTime(e),r=this.posed(s,Math.max(0,e-this.tCur),n,i),o=e-this.tCur;if(o>=s.morph)return r;const l=this.origine(e,n,i);return l?Nt(l,r,T.easeOutQuint(u(o/s.morph))):r}setState(e,s){if(e===this.cur)return;const n=Q.get(this.cur).morph,i=this.prev!==null&&s-this.tCur<n;this.departFige=i?this.poseComposee(s):null,this.prev=this.cur,this.tPrev=this.tCur,this.cur=e,this.tCur=s,Q.get(e)?.blinkIn&&(this.blinkAt=s)}sample(e){const s=this.scale,n=Q.get(this.cur),i=this.shapeAtTime(e),r=this.exprAtTime(e);let o=this.posed(n,Math.max(0,e-this.tCur),i,r),l=this.decalageAtTime(e,this.cur);const c=e-this.tCur,p=c<n.morph?this.origine(e,i,r):null;if(p){const b=T.easeOutQuint(u(c/n.morph));o=Nt(p,o,b);const N=this.prev;if(N){const z=this.decalageAtTime(e,N);l={x:y(z.x,l.x,b),y:y(z.y,l.y,b)}}}const h=o.eyeAlpha>.01,f=this.lookAtTime(e),M=be(e,{wander:h?f.wander:0,blink:h}),k={yaw:y(o.gaze.yaw,f.yaw,f.mix)+M.dYaw-f.spin,pitch:y(o.gaze.pitch,f.pitch,f.mix)+M.dPitch,roll:o.gaze.roll+M.dRoll},A=u((e-this.blinkAt)/.2),w=A<1?Math.abs(A*2-1):1,P=Math.min(M.lid,w),x=o.offX+M.driftX,m=o.offY+M.driftY,g={...o.sil,cx:o.sil.cx+x,cy:o.sil.cy+m,sy:o.sil.sy*M.breath},d=se(at(g,s,this.pts)),C=(b,N)=>jt(o.sil.radii,Math.atan2(N,b)-o.sil.rot),v=[];if(o.eyeAlpha>.01){const b=Ht(k,s,o.split);for(let N=0;N<2;N++){const z=b[N];if(z.depth<=.02)continue;const q=o.eyes[N],dt=C(z.x,z.y),ft=(q.tilt??0)*Math.PI/180,W=Math.cos(ft),Z=Math.sin(ft),Qt=z.a*W+z.c*Z,Vt=z.b*W+z.d*Z,Kt=-z.a*Z+z.c*W,qt=-z.b*Z+z.d*W,yt=Ae(Math.min(P,q.open));v.push({d:ne(q.w*s,q.h*s),matrix:`matrix(${$(Qt)},${$(Vt*yt)},${$(Kt)},${$(qt*yt)},${$(z.x*dt+(x+l.x)*s)},${$(z.y*dt+(m+l.y)*s)})`,alpha:o.eyeAlpha*u(z.depth/.12)})}}const R=o.dots.filter(b=>b.opacity>.01&&b.r>5e-4).map(b=>({...b,x:(b.x+x)*s,y:(b.y+m)*s,r:b.r*s})),a=o.notif?C(o.notif.x,o.notif.y):1,O=o.notif?(o.notif.x*a+x)*s:0,E=o.notif?(o.notif.y*a+m)*s:0,V=o.notif?{x:O,y:E,r:o.notif.r*s}:null,K=o.notif?{x:O,y:E,r:o.notif.notch*s}:null;return{bodyPath:d,bodyAlpha:o.bodyAlpha,eyes:v,dots:R,dotsBehind:o.dotsBehind,arcs:o.arcs.filter(b=>b.opacity>.01).map(b=>ae(b.seed,b.t,s,b.id,b.opacity)),notif:V,notch:K}}}const Dt=100,De=158,B=De,Ye=1e3/30,je=34;function He(){const[t,e]=_.useState(()=>typeof document>"u"?!1:document.documentElement.classList.contains("dark"));return _.useEffect(()=>{if(typeof MutationObserver!="function")return;const s=document.documentElement,n=new MutationObserver(()=>e(s.classList.contains("dark")));return n.observe(s,{attributes:!0,attributeFilter:["class"]}),()=>n.disconnect()},[]),t}function Xe(){const[t,e]=_.useState(()=>typeof document>"u"?!0:document.visibilityState!=="hidden");return _.useEffect(()=>{if(typeof document>"u")return;const s=()=>e(document.visibilityState!=="hidden");return document.addEventListener("visibilitychange",s),()=>document.removeEventListener("visibilitychange",s)},[]),t}function Ge(){const[t,e]=_.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return _.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const s=window.matchMedia("(prefers-reduced-motion: reduce)"),n=i=>e(i.matches);return s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[]),t}function Ke({state:t="idle-living",dragState:e=null,size:s=48,className:n="",leanX:i=0,shape:r=Zt,color:o="auto",paper:l=null}){const c=Jt(e==="running-left"||e==="running-right"?e:t),p=Ge(),h=Xe(),f=He(),M=l||(f?mt.dark:mt.light),k=oe.get(Wt(o,f)).hex,A=_.useId(),w=_.useMemo(()=>A.replace(/[^a-zA-Z0-9_-]/g,""),[A]),P=`bot-mask-${w}`,x=_.useRef(null);x.current===null&&(x.current=new G(Dt,c.state,xt.get(r)?.radii??null,Ot.get(c.expression)??null));const m=x.current,g=_.useRef(0),[d,C]=_.useState(()=>m.sample(0));_.useEffect(()=>{m.setShape(xt.get(r)?.radii??null,g.current)},[m,r]),_.useEffect(()=>{m.setExpression(Ot.get(c.expression)??null,g.current)},[m,c.expression]),_.useEffect(()=>{m.state!==c.state&&(m.setState(c.state,g.current),C(m.sample(g.current)))},[m,c.state]),_.useEffect(()=>{const a=Math.min(1,Math.abs(i));if(a<=0||!Q.get(c.state)?.baseFace){m.setLook(null,g.current);return}m.setLook({yaw:i*je,pitch:st.pitch,mix:a,spin:0,wander:1-a},g.current)},[m,i,c.state]),_.useEffect(()=>{if(p||!h)return;let a=0,O=0,E=0;const V=K=>{a=requestAnimationFrame(V);const b=O?Math.min((K-O)/1e3,.064):0;O=K,g.current+=b,E+=b*1e3,!(E<Ye)&&(E=0,C(m.sample(g.current)))};return a=requestAnimationFrame(V),()=>cancelAnimationFrame(a)},[m,p,h]);const v=a=>{const E={fill:a.color??(a.depth===void 0?k:re(M,k,a.depth)),opacity:a.opacity};return a.d?{...E,d:a.d,transform:`translate(${a.x} ${a.y}) rotate(${a.rot??0}) scale(${Dt})`}:{...E,cx:a.x,cy:a.y,r:a.r}},R=d.dots.map((a,O)=>{const E=v(a);return a.d?I.jsx("path",{...E},O):I.jsx("circle",{...E},O)});return I.jsxs("svg",{"aria-hidden":"true",className:`bot-animated ${n}`,width:s,height:s,viewBox:`${-B} ${-B} ${B*2} ${B*2}`,children:[I.jsxs("defs",{children:[I.jsxs("mask",{id:P,maskUnits:"userSpaceOnUse",x:-B,y:-B,width:B*2,height:B*2,children:[I.jsx("path",{d:d.bodyPath,fill:"#fff"}),d.eyes.map((a,O)=>I.jsx("path",{d:a.d,transform:a.matrix,opacity:a.alpha,fill:"#000"},O)),d.notch?I.jsx("circle",{cx:d.notch.x,cy:d.notch.y,r:d.notch.r,fill:"#000"}):null]}),d.arcs.map(a=>I.jsx("linearGradient",{id:`${w}-${a.id}`,gradientUnits:"userSpaceOnUse",x1:a.grad.x1,y1:a.grad.y1,x2:a.grad.x2,y2:a.grad.y2,children:a.grad.stops.map((O,E)=>I.jsx("stop",{offset:E/(a.grad.stops.length-1),stopColor:O},E))},a.id))]}),I.jsx("g",{fill:"none",strokeLinecap:"round",children:d.arcs.map(a=>I.jsx("path",{d:a.back,stroke:`url(#${w}-${a.id})`,strokeWidth:a.width,opacity:a.opacity},a.id))}),d.dotsBehind?I.jsx("g",{children:R}):null,I.jsxs("g",{opacity:d.bodyAlpha,children:[I.jsx("path",{d:d.bodyPath,fill:M}),I.jsx("g",{mask:`url(#${P})`,children:I.jsx("rect",{x:-B,y:-B,width:B*2,height:B*2,fill:k})})]}),d.dotsBehind?null:I.jsx("g",{children:R}),d.notif?I.jsx("circle",{cx:d.notif.x,cy:d.notif.y,r:d.notif.r,fill:de}):null,I.jsx("g",{fill:"none",strokeLinecap:"round",children:d.arcs.map(a=>I.jsx("path",{d:a.front,stroke:`url(#${w}-${a.id})`,strokeWidth:a.width,opacity:a.opacity},`f${a.id}`))})]})}export{Ke as BotAnimated};
@@ -1,4 +0,0 @@
1
- import{o as be,bh as we,bi as ye,r as i,M as _e,J as ke,bj as ve,x as ce,ai as le,bk as Ee,aB as je,ak as Se,aj as Ce,ah as Ne,j as r,aM as De,X as Re,c as f,a as Pe,bl as de,B as Z,ar as Te,bm as Ie}from"./__vite-browser-external-DKVGjnxf.js";import{u as Oe,D as ze,a as Le,b as Ae,c as Ue,d as $e,e as Be}from"./DialogTitle-CI8xcLkd.js";import{u as Me,d as Fe,t as qe}from"./composite-_t6vz49X.js";import{k as Ge,l as Je}from"./SelectItemText-D_4VNKEi.js";import{u as Ke}from"./safePolygon-DeLf2a7a.js";import{D as Ye}from"./DialogClose-IWs31AbB.js";import{D as Ve}from"./DateRangePopover-CVZTfOUX.js";import{C as He}from"./calendar-days-Cpu5CPAM.js";import{C as ue}from"./chevron-down-0nuZGQbD.js";import{D as fe}from"./download-CzxvhDR9.js";import{P as Qe,a as Ze,b as Xe,c as We,d as et}from"./PopoverPopup-B_fwRpm_.js";const pe={name:"pencil",size:24,node:[["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"}]]};pe.node;const yt=be(pe),tt=we(function(a,t){const{render:c,className:s,style:n,disabled:h=!1,nativeButton:_=!0,id:k,payload:o,handle:m,...b}=a,O=Oe(!0),l=Ke(m)??O;if(!l)throw new Error(ye(79));const v=Me(k),T=l.useState("floatingRootContext"),u=l.useState("isOpenedByTrigger",v),E=l.useState("triggerPopupId",v),j=i.useRef(null),{registerTrigger:w,isMountedByThisTrigger:x}=Fe(v,j,l,{payload:o}),{getButtonProps:C,buttonRef:N}=_e({disabled:h,native:_}),y=Ge(T),S=Je(()=>l.select("open"),J=>{l.set("openMethod",J)}),F={disabled:h,open:u},I=l.useState("triggerProps",x);return ke("button",a,{state:F,ref:[N,t,w,j],props:[y.reference,I,S,{[ve]:"",id:v,"aria-haspopup":"dialog","aria-expanded":u,"aria-controls":E},b,C],stateAttributesMapping:qe})}),ee="tt.qualityPerDollar.enabled";function X(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(ee)==="1"}catch{return!1}}function _t(){const[e,a]=i.useState(X);i.useEffect(()=>{if(typeof window>"u")return;const s=n=>{(n.key===null||n.key===ee)&&a(X())};return window.addEventListener("storage",s),()=>window.removeEventListener("storage",s)},[]);const t=i.useCallback(s=>{const n=!!s;a(n);try{window.localStorage.setItem(ee,n?"1":"0")}catch{}},[]),c=i.useCallback(()=>t(!X()),[t]);return{enabled:e,setEnabled:t,toggle:c}}const te="tt.sessionEfficiency.enabled";function W(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(te)==="1"}catch{return!1}}function kt(){const[e,a]=i.useState(W);i.useEffect(()=>{if(typeof window>"u")return;const s=n=>{(n.key===null||n.key===te)&&a(W())};return window.addEventListener("storage",s),()=>window.removeEventListener("storage",s)},[]);const t=i.useCallback(s=>{const n=!!s;a(n);try{window.localStorage.setItem(te,n?"1":"0")}catch{}},[]),c=i.useCallback(()=>t(!W()),[t]);return{enabled:e,setEnabled:t,toggle:c}}const G=["total_tokens","billable_total_tokens","input_tokens","output_tokens","cached_input_tokens","cache_creation_input_tokens","reasoning_output_tokens","conversation_count","total_cost_usd"];class p extends Error{constructor(a,t=0){super(a),this.code=a,this.status=t}code;status}function M(e){return typeof e=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Number.isFinite(Date.parse(e+"T00:00:00Z"))&&new Date(e+"T00:00:00Z").toISOString().slice(0,10)===e}function at(e,a){if(!Ne(e))throw new p("export_auth_required",401);try{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),c=JSON.parse(atob(t.padEnd(Math.ceil(t.length/4)*4,"=")));if((c.sub||c.user_id)!==a||c.role!=="authenticated"||!Number.isFinite(c.exp)||c.exp*1e3<=Date.now())throw Error()}catch{throw new p("export_auth_required",401)}}function ge(e){if(typeof e?.membership?.can_read_cloud!="boolean")throw new p("export_invalid_data",503);if(!e.membership.can_read_cloud)throw new p("export_access_denied",402);const a=e.membership;return JSON.stringify([e.environment,a.phase,a.status,a.hosting_mode,a.expires_at,a.trial_ends_at,a.transition_ends_at,a.read_only_until])}async function rt({userId:e,auth:a,from:t,to:c,deviceId:s=null,signal:n,assertCurrent:h=()=>{},fetchImpl:_=fetch}){if(!M(t)||!M(c)||t>c)throw new p("export_invalid_dates",400);if(typeof a!="function")throw new p("export_auth_required",401);if(!e||s&&!/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(s))throw new p("export_invalid_scope",400);const k=ce(),o=le();if(!k)throw new p("export_instance_changed",409);const m=()=>{if(n?.aborted)throw new p("export_cancelled",409);if(h(),k!==ce()||o!==le())throw new p("export_instance_changed",409)};async function b(u,E){m();const j=await je(a);m(),at(j||"",e);const w=new URL(Se(k,u));for(const[y,S]of Object.entries(E))w.searchParams.set(y,S);const x=new AbortController,C=()=>x.abort();n?.addEventListener("abort",C,{once:!0});const N=setTimeout(C,25e3);try{const y=await Ce(w.toString(),{method:"GET",cache:"no-store",redirect:"error",signal:x.signal,headers:{Accept:"application/json",Authorization:"Bearer "+j,...o?{apikey:o}:{}}},_);if(m(),!y.ok)throw new p(y.status===401?"export_auth_required":y.status===402||y.status===403?"export_access_denied":"export_failed",y.status);const S=await y.json();return m(),S}finally{clearTimeout(N),n?.removeEventListener("abort",C)}}const O=ge(await b("tokentracker-billing",{action:"account"})),U={from:t,to:c,tz_offset_minutes:"0",...s?{device_id:s}:{}};if(await b("tokentracker-account-daily",U),ge(await b("tokentracker-billing",{action:"account"}))!==O)throw new p("export_access_changed",409);const l=await b("tokentracker-account-daily",U);if(!M(l?.from)||!M(l?.to)||l.from<t||l.to>c||l.from>l.to||!Array.isArray(l.data)||l.data.length>1096)throw new p("export_invalid_data",503);const v=new Set,T=l.data.map(u=>{if(!M(u?.day)||u.day<l.from||u.day>l.to||v.has(u.day))throw new p("export_invalid_data",503);v.add(u.day);const E={day:u.day};for(const j of G){const w=u[j];if(typeof w!="number"||!Number.isFinite(w)||w<0||j!=="total_cost_usd"&&!Number.isSafeInteger(w))throw new p("export_invalid_data",503);E[j==="total_cost_usd"?"estimated_cost_usd":j]=w}return E}).sort((u,E)=>u.day.localeCompare(E.day));return m(),{schema:"tokentracker.cloud-usage.v1",metadata:{source:"cloud",backend_origin:new URL(k).origin,exported_at:new Date().toISOString(),timezone:"UTC",requested_range:{from:t,to:c},effective_range:{from:l.from,to:l.to},device_scope:s?"selected":"all",aggregation:"daily_all_providers",cost_currency:"USD",cost_basis:"estimated",row_count:T.length},rows:T}}function ot(e){const a=String(e??"");return'"'+(/^[\s]*[=+\-@]/.test(a)?"'"+a:a).replace(/"/g,'""')+'"'}function nt(e,a){if(a==="json")return JSON.stringify(e,null,2)+`
2
- `;const t=e.metadata,c=["row_type","source","backend_origin","exported_at","timezone","cost_currency","cost_basis","requested_from","requested_to","effective_from","effective_to","device_scope","aggregation","row_count","day",...G.map(n=>n==="total_cost_usd"?"estimated_cost_usd":n)],s=[t.source,t.backend_origin,t.exported_at,t.timezone,t.cost_currency,t.cost_basis,t.requested_range.from,t.requested_range.to,t.effective_range.from,t.effective_range.to,t.device_scope,t.aggregation,t.row_count];return[c,["metadata",...s,"",...G.map(()=>"")],...e.rows.map(n=>["usage",...s,n.day,...G.map(h=>n[h==="total_cost_usd"?"estimated_cost_usd":h])])].map(n=>n.map(ot).join(",")).join(`\r
3
- `)+`\r
4
- `}async function st(e,a,{signal:t,assertCurrent:c=()=>{}}={}){const s=nt(e,a),n=`tokentracker-cloud-usage-${e.metadata.effective_range.from}-${e.metadata.effective_range.to}.${a}`,h=()=>{if(t?.aborted)throw new p("export_cancelled",409);c()};h();const _=await Ee({filename:n,content:s,format:a,signal:t});if(h(),_?.saved===!0)return;if(_!==null)throw new p("export_failed",503);const k=new Blob([s],{type:a==="csv"?"text/csv;charset=utf-8":"application/json;charset=utf-8"}),o=URL.createObjectURL(k);try{const m=document.createElement("a");m.href=o,m.download=n,document.body.appendChild(m);try{m.click()}finally{m.remove()}}finally{setTimeout(()=>URL.revokeObjectURL(o),1e3)}}function it({open:e,onOpenChange:a,title:t,triggerLabel:c=t,icon:s,wide:n=!1,preventClose:h=!1,initialFocus:_,children:k}){return r.jsxs(ze,{open:e,onOpenChange:(o,m)=>{if(!o&&h){m.cancel();return}a(o)},children:[r.jsxs(tt,{className:"inline-flex h-11 w-full items-center gap-3 rounded-md border-0 bg-transparent p-0 text-left text-sm font-medium text-oai-black transition-colors hover:bg-oai-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-oai-gray-500 dark:text-oai-white dark:hover:bg-oai-gray-800",children:[s?r.jsx(s,{size:16,className:"shrink-0","aria-hidden":!0}):null,r.jsx("span",{className:"min-w-0 flex-1",children:c}),r.jsx(De,{size:16,className:"shrink-0 text-oai-gray-500 dark:text-oai-gray-400","aria-hidden":!0})]}),r.jsxs(Le,{children:[r.jsx(Ae,{className:"tt-cloud-action-backdrop fixed inset-0 z-[100] bg-black/40 dark:bg-black/60"}),r.jsx(Ue,{className:"tt-cloud-settings fixed inset-0 z-[101] flex items-center justify-center overflow-y-auto overscroll-contain p-4",children:r.jsxs($e,{initialFocus:_,"aria-modal":"true",className:`tt-cloud-action-popup tt-cloud-theme relative max-h-[calc(100dvh-2rem)] w-full ${n?"max-w-2xl":"max-w-lg"} overflow-y-auto overscroll-contain rounded-xl bg-white p-5 shadow-xl outline-none dark:bg-oai-gray-900`,children:[r.jsxs("div",{className:"mb-3 flex min-h-11 items-center justify-between gap-4",children:[r.jsx(Be,{className:"min-w-0 text-lg font-semibold text-oai-black dark:text-oai-white",children:t}),r.jsx(Ye,{disabled:h,"aria-label":f("shared.dialog.close"),className:"inline-flex size-11 min-h-11 min-w-11 shrink-0 items-center justify-center rounded-md border-0 bg-transparent p-0 text-oai-gray-500 transition-colors hover:bg-oai-gray-100 hover:text-oai-black focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-oai-gray-500 disabled:cursor-wait disabled:opacity-40 dark:text-oai-gray-400 dark:hover:bg-oai-gray-800 dark:hover:text-oai-white",children:r.jsx(Re,{size:18,"aria-hidden":!0})})]}),r.jsx("div",{"data-settings-panel":"cloud",className:"min-w-0",children:k})]})})]})]})}function ct(e){return e?.status===401?f("cloud.export.error_auth"):e?.status===402||e?.status===403?f("cloud.export.error_access"):e?.code==="export_invalid_dates"?f("cloud.export.error_dates"):e?.status===409?f("cloud.export.error_changed"):f("cloud.export.error_failed")}function vt({from:e,to:a,deviceId:t=null,auth:c,compact:s=!1,panelContainer:n=null,layout:h="default",dialogOpen:_,onDialogOpenChange:k}){const o=h==="settings-row",m=Pe(),b=c||m,O=b?.signedIn?b.user?.id:null,U=new Date().toISOString().slice(0,10),l=new Date(Date.now()-29*864e5).toISOString().slice(0,10),[v,T]=i.useState(e||l),[u,E]=i.useState(a||U),[j,w]=i.useState(!1),x=o&&typeof _=="boolean"?_:j,[C,N]=i.useState(!1),[y,S]=i.useState(null),[F,I]=i.useState(null),[J,L]=i.useState(!1),[me,he]=i.useState(2),ae=i.useId(),K=i.useRef(null),D=i.useRef(0),A=i.useRef(null),z=i.useRef(!1),$=i.useRef(!1),re=i.useRef(x);re.current=x;const oe=i.useRef(x);if(K.current={userId:O,client:b?.client,start:v,end:u,deviceId:t,from:e,to:a},i.useEffect(()=>{$.current=!0;const d=()=>{++D.current,A.current?.abort(),z.current=!1,N(!1),I(null),S(null),L(!1)};return window.addEventListener(de,d),()=>{$.current=!1,++D.current,A.current?.abort(),window.removeEventListener(de,d)}},[]),i.useEffect(()=>{++D.current,A.current?.abort(),z.current=!1,N(!1),S(null),I(null),L(!1),e&&T(e),a&&E(a)},[O,b?.client,e,a,t]),i.useEffect(()=>{o&&oe.current&&!x&&ne(),oe.current=x},[x,o]),i.useEffect(()=>{const d=window.matchMedia?.("(max-width: 639px)");if(!d)return;const g=()=>he(d.matches?1:2);return g(),d.addEventListener("change",g),()=>d.removeEventListener("change",g)},[]),!O||b?.enabled===!1)return null;function ne(){++D.current,A.current?.abort(),z.current=!1,N(!1),S(null),I(null),L(!1)}function xe(d){d||ne(),typeof _!="boolean"&&w(d),k?.(d)}function Y(d,g){++D.current,A.current?.abort(),z.current=!1,N(!1),S(null),I(null),d(g)}async function se(d){if(z.current)return;z.current=!0;const g=K.current,H=++D.current,Q=new AbortController;A.current=Q,N(!0),S(null),I(null);const q=()=>{const R=K.current;if(!$.current||H!==D.current||o&&!re.current||!R||Object.keys(g).some(P=>g[P]!==R[P])||g.client&&!Ie(g.client))throw new p("export_cancelled",409)};try{const R=await rt({userId:g.userId,auth:b.getAccessToken,from:g.start,to:g.end,deviceId:g.deviceId,signal:Q.signal,assertCurrent:q});q(),await st(R,d,{signal:Q.signal,assertCurrent:q}),q();const P=R.metadata.effective_range,ie=R.rows.length?f("cloud.export.success",{count:R.rows.length,from:P.from,to:P.to}):f("cloud.export.empty");I(P.from!==g.start||P.to!==g.end?`${ie} ${f("cloud.export.truncated",{from:P.from,to:P.to})}`:ie)}catch(R){$.current&&H===D.current&&S(ct(R))}finally{H===D.current&&(z.current=!1,$.current&&N(!1))}}const V="hover:!text-oai-black dark:hover:!text-oai-white hover:!bg-oai-gray-100 dark:hover:!bg-oai-gray-800 focus:!ring-oai-gray-500/40";let B=null;return(o||x)&&(B=r.jsxs("div",{id:ae,className:o?void 0:s?"w-full rounded-lg bg-oai-gray-50 p-4 dark:bg-oai-gray-950/50":"mt-2 border-l-2 border-oai-gray-200 pl-3 dark:border-oai-gray-700","aria-busy":C,children:[o?null:r.jsx("p",{className:"text-xs leading-5 text-oai-gray-600 dark:text-oai-gray-300",children:f("cloud.export.description")}),r.jsxs("div",{className:o?"space-y-4":"mt-3 flex flex-wrap items-end gap-3",children:[o?r.jsxs(Qe,{open:J,onOpenChange:L,children:[r.jsxs(Ze,{disabled:C,"aria-label":f("trend.zoom.pick_range"),className:"inline-flex h-10 min-h-10 w-full items-center gap-2 rounded-md border border-oai-gray-300 bg-transparent px-3 text-sm text-oai-black transition-colors hover:bg-oai-gray-50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-oai-gray-500 disabled:opacity-50 dark:border-oai-gray-700 dark:text-oai-white dark:hover:bg-oai-gray-800",children:[r.jsx(He,{size:16,className:"shrink-0 text-oai-gray-500","aria-hidden":!0}),r.jsxs("span",{className:"flex-1 text-left tabular-nums",children:[v," → ",u]}),r.jsx(ue,{size:14,className:"shrink-0 text-oai-gray-500","aria-hidden":!0})]}),r.jsx(Xe,{children:r.jsx(We,{sideOffset:8,side:"bottom",align:"start",className:"z-[110]",children:r.jsx(et,{className:"max-w-[calc(100vw-2rem)] rounded-xl border border-oai-gray-200 bg-white shadow-lg outline-none dark:border-oai-gray-700 dark:bg-oai-gray-900",children:r.jsx(Ve,{from:v,to:u,numberOfMonths:me,onApply:(d,g)=>{Y(T,d),E(g),L(!1)},onCancel:()=>L(!1)})})})})]}):r.jsxs(r.Fragment,{children:[r.jsxs("label",{className:"min-w-0 text-xs text-oai-gray-700 dark:text-oai-gray-200",children:[f("cloud.export.from"),r.jsx("input",{type:"date",value:v,onChange:d=>Y(T,d.target.value),className:`${o?"min-h-10 min-w-0 w-full ":""}mt-1 block rounded-md border border-oai-gray-300 bg-white px-2 py-1.5 text-sm text-oai-black focus:outline-none focus:ring-2 focus:ring-inset focus:ring-oai-gray-500/40 dark:border-oai-gray-700 dark:bg-oai-gray-900 dark:text-oai-white`})]}),r.jsxs("label",{className:"min-w-0 text-xs text-oai-gray-700 dark:text-oai-gray-200",children:[f("cloud.export.to"),r.jsx("input",{type:"date",value:u,onChange:d=>Y(E,d.target.value),className:`${o?"min-h-10 min-w-0 w-full ":""}mt-1 block rounded-md border border-oai-gray-300 bg-white px-2 py-1.5 text-sm text-oai-black focus:outline-none focus:ring-2 focus:ring-inset focus:ring-oai-gray-500/40 dark:border-oai-gray-700 dark:bg-oai-gray-900 dark:text-oai-white`})]})]}),r.jsxs("div",{className:o?"flex justify-end gap-2":"flex gap-2",children:[r.jsx(Z,{type:"button",variant:o?"secondary":"ghost",size:"sm",className:`${V} ${o?"!min-h-8 !h-8":""}`,disabled:C,onClick:()=>se("csv"),children:f("cloud.export.csv")}),r.jsx(Z,{type:"button",variant:o?"secondary":"ghost",size:"sm",className:`${V} ${o?"!min-h-8 !h-8":""}`,disabled:C,onClick:()=>se("json"),children:f("cloud.export.json")})]})]}),C?r.jsx("p",{role:"status",className:"mt-2 text-xs text-oai-gray-600 dark:text-oai-gray-300",children:f("cloud.export.busy")}):null,y?r.jsx("p",{role:"alert",className:"mt-2 text-xs text-red-700 dark:text-red-300",children:y}):null,F?r.jsx("p",{role:"status",className:"mt-2 text-xs text-oai-gray-600 dark:text-oai-gray-300",children:F}):null]})),o?r.jsx(it,{open:x,onOpenChange:xe,title:f("cloud.export.open"),icon:fe,children:B}):r.jsxs("section",{className:s&&!o?"tt-cloud-theme contents":"tt-cloud-theme","aria-label":f("cloud.export.open"),children:[r.jsxs(Z,{type:"button",variant:"ghost",size:"sm",className:`${V} ${o?"!h-11 !w-full !justify-start !px-0 !text-oai-black dark:!text-oai-white active:!scale-100":s?"!h-10 !px-0":""}`,"aria-expanded":x,"aria-controls":ae,onClick:()=>w(d=>!d),children:[r.jsx(fe,{className:`${o?"mr-3":"mr-2"} h-4 w-4 shrink-0`,"aria-hidden":"true"}),f("cloud.export.open"),o?r.jsx(ue,{size:16,className:`ml-auto shrink-0 transition-transform motion-reduce:transition-none ${x?"rotate-180":""}`,"aria-hidden":!0}):null]}),!o&&n&&B?Te.createPortal(B,n):B]})}export{it as C,yt as P,vt as a,kt as b,_t as u};
@@ -1 +0,0 @@
1
- import{j as e,y as n}from"./__vite-browser-external-DKVGjnxf.js";import{C as c}from"./Card-CMShFKqX.js";function g({checked:a,onChange:s,disabled:i,ariaLabel:r,id:t}){return e.jsx("button",{type:"button",id:t,role:"switch","aria-checked":a,"aria-label":r,onClick:s,disabled:i,className:"relative inline-flex h-11 w-11 min-h-11 min-w-11 shrink-0 items-center justify-center rounded-full bg-transparent p-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:cursor-not-allowed disabled:opacity-50",children:e.jsx("span",{"aria-hidden":"true",className:n("tt-toggle-track relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors",a?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:e.jsx("span",{className:n("tt-toggle-thumb inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",a?"translate-x-[18px]":"translate-x-[3px]")})})})}function u({label:a,hint:s,control:i}){return e.jsxs("div",{className:"flex flex-col gap-2 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:a}),s?e.jsx("div",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:s}):null]}),e.jsx("div",{className:"self-end sm:shrink-0 sm:self-auto",children:i})]})}function h({title:a,subtitle:s,action:i,children:r}){return e.jsxs(c,{className:"rounded-lg",children:[e.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:a}),s?e.jsx("p",{className:"mt-1 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:s}):null]}),i?e.jsx("div",{className:"shrink-0",children:i}):null]}),e.jsx("div",{className:"-mb-3 divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:r})]})}function b({options:a,value:s,onChange:i,disabled:r=!1}){return e.jsx("div",{className:"inline-flex items-center rounded-lg border border-oai-gray-200 bg-oai-gray-50 p-0.5 dark:border-oai-gray-800 dark:bg-oai-gray-900",children:a.map(({value:t,label:o,Icon:l})=>{const d=s===t;return e.jsxs("button",{type:"button",onClick:()=>i(t),"aria-pressed":d,disabled:r,className:n("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",d?"bg-white text-oai-black shadow-sm dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-500 hover:text-oai-black dark:text-oai-gray-400 dark:hover:text-white"),children:[l?e.jsx(l,{className:"h-3.5 w-3.5","aria-hidden":!0}):null,e.jsx("span",{children:o})]},t)})})}export{b as S,g as T,u as a,h as b};