tokentracker-cli 0.83.1 → 0.83.2

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 (107) hide show
  1. package/dashboard/dist/assets/{AchievementBadge-tMxPvIPA.js → AchievementBadge-BrSr5pjk.js} +1 -1
  2. package/dashboard/dist/assets/AchievementsPage-za-wqAO2.js +2 -0
  3. package/dashboard/dist/assets/AchievementsSection-CGRVm1uS.js +1 -0
  4. package/dashboard/dist/assets/BadgeDetailModal-D1XDT2dG.js +1 -0
  5. package/dashboard/dist/assets/{Card-D479hjUR.js → Card-DX2Wwm9U.js} +1 -1
  6. package/dashboard/dist/assets/{ClawdAnimated-ChoWfPva.js → ClawdAnimated-D6JzFu8y.js} +1 -1
  7. package/dashboard/dist/assets/CommandPalette-NWiETwtS.js +1 -0
  8. package/dashboard/dist/assets/CommunityStatsModal-D4FdxAWd.js +1 -0
  9. package/dashboard/dist/assets/{ConfirmModal-CCFe2duP.js → ConfirmModal-SAheZUAv.js} +1 -1
  10. package/dashboard/dist/assets/DashboardPage-CjnBsm3Q.js +1 -0
  11. package/dashboard/dist/assets/{DevicePage-Bk9mryIp.js → DevicePage-Cf-PHRlL.js} +1 -1
  12. package/dashboard/dist/assets/DialogClose-pg5pVOeD.js +1 -0
  13. package/dashboard/dist/assets/DialogDescription-CVuGFYFU.js +1 -0
  14. package/dashboard/dist/assets/{DialogTitle-vIrqSKer.js → DialogTitle-Im7ESzoS.js} +1 -1
  15. package/dashboard/dist/assets/FadeIn-CGGFraHR.js +1 -0
  16. package/dashboard/dist/assets/{HeaderGithubStar-CFt_WMjW.js → HeaderGithubStar-DRTZXRsx.js} +1 -1
  17. package/dashboard/dist/assets/{IpCheckPage-CSWXPm3B.js → IpCheckPage-Dn62HUZu.js} +1 -1
  18. package/dashboard/dist/assets/LandingPage-CLsljoir.js +2 -0
  19. package/dashboard/dist/assets/{LeaderboardAvatar-CQkIM_Gb.js → LeaderboardAvatar-DktI_89h.js} +1 -1
  20. package/dashboard/dist/assets/LeaderboardPage-t87ElnDI.js +2 -0
  21. package/dashboard/dist/assets/{LeaderboardProfileModal-DRPXqVvC.js → LeaderboardProfileModal-DN7HurS3.js} +4 -4
  22. package/dashboard/dist/assets/{LeaderboardProfilePage-Bef_4_ug.js → LeaderboardProfilePage-CprOXLXX.js} +3 -3
  23. package/dashboard/dist/assets/{LimitsPage-bSZCJNkv.js → LimitsPage-DRX3XMYx.js} +3 -3
  24. package/dashboard/dist/assets/{LocalOnlyNotice-CIEE7t0-.js → LocalOnlyNotice-B8BtIdAA.js} +1 -1
  25. package/dashboard/dist/assets/LoginCard-OoduGJmK.js +1 -0
  26. package/dashboard/dist/assets/LoginModal-DoDoCpr6.js +1 -0
  27. package/dashboard/dist/assets/LoginPage-Dn2KMisI.js +1 -0
  28. package/dashboard/dist/assets/PetPage-CVaG5H3O.js +1 -0
  29. package/dashboard/dist/assets/PopoverPopup-B2HqJNaq.js +1 -0
  30. package/dashboard/dist/assets/ProviderIcon-BYl1Yyf3.js +1 -0
  31. package/dashboard/dist/assets/ResetPasswordPage-DWfgvuvR.js +1 -0
  32. package/dashboard/dist/assets/{Select-Ch5kjPZu.js → Select-ClnnGJY1.js} +1 -1
  33. package/dashboard/dist/assets/SelectItemText-iaFWq7GD.js +1 -0
  34. package/dashboard/dist/assets/SettingsPage-zwAOWRur.js +1 -0
  35. package/dashboard/dist/assets/SkillsPage-BB96nB2i.js +1 -0
  36. package/dashboard/dist/assets/TokenGalaxy-9_VJKdPr.js +4314 -0
  37. package/dashboard/dist/assets/TrendMonitor-D9RHcQgH.js +19 -0
  38. package/dashboard/dist/assets/WidgetsPage-CjAT6p0C.js +1 -0
  39. package/dashboard/dist/assets/{WrappedPage-CPAtRfkp.js → WrappedPage-ba6teG1N.js} +1 -1
  40. package/dashboard/dist/assets/__vite-browser-external-DWKjPxnU.js +1350 -0
  41. package/dashboard/dist/assets/__vite-browser-external-D_0JUhT7.css +1 -0
  42. package/dashboard/dist/assets/agent-logos-HCzl7U8i.js +1 -0
  43. package/dashboard/dist/assets/{arrow-up-right-Bm0oL1jH.js → arrow-up-right-TvEj8NTT.js} +1 -1
  44. package/dashboard/dist/assets/{check-DR7E_A1J.js → check-Cz3lYRiR.js} +1 -1
  45. package/dashboard/dist/assets/{copy-BtstNk2s.js → copy-CTtF84H9.js} +1 -1
  46. package/dashboard/dist/assets/{download-zOVMvQXI.js → download-B5WAY6Nh.js} +1 -1
  47. package/dashboard/dist/assets/{flame-DQaixlOI.js → flame-Cja4F8Mj.js} +1 -1
  48. package/dashboard/dist/assets/{format-tokens-Cbac-ZGw.js → format-tokens-UavRPN4W.js} +1 -1
  49. package/dashboard/dist/assets/{icons-iL7TjE7A.js → icons-BW2vjmu_.js} +1 -1
  50. package/dashboard/dist/assets/index-0w19KMWl.js +9 -0
  51. package/dashboard/dist/assets/index-Bfxr6erc.js +1 -0
  52. package/dashboard/dist/assets/index-BnzrUY9J.js +1 -0
  53. package/dashboard/dist/assets/{info-BtnxfCu0.js → info-F-75j15K.js} +1 -1
  54. package/dashboard/dist/assets/{limits-providers-DkoPB8B2.js → limits-providers-8NsMiLNP.js} +1 -1
  55. package/dashboard/dist/assets/{link-2-Bh0vUBU6.js → link-2-C_eJlLvb.js} +1 -1
  56. package/dashboard/dist/assets/{loader-circle-BVF4Sglg.js → loader-circle-BjzQhjhO.js} +1 -1
  57. package/dashboard/dist/assets/module-kH5GsDis.js +2 -0
  58. package/dashboard/dist/assets/provider-display-D1zp03ID.js +42 -0
  59. package/dashboard/dist/assets/react-Nv3-bJyw.js +1 -0
  60. package/dashboard/dist/assets/skills-api-DazKXxME.js +1 -0
  61. package/dashboard/dist/assets/{terminal-BUoPNPs5.js → terminal-DBXjwlTm.js} +1 -1
  62. package/dashboard/dist/assets/{trash-2-DrGpFJsR.js → trash-2-DLG8hKJm.js} +1 -1
  63. package/dashboard/dist/assets/{use-community-stats-D6Kxm_DN.js → use-community-stats-BQB72xAN.js} +1 -1
  64. package/dashboard/dist/assets/{use-limits-display-prefs-BCh-4-Bo.js → use-limits-display-prefs-CH8MmjYf.js} +1 -1
  65. package/dashboard/dist/assets/{use-native-settings-o-TL7MGQ.js → use-native-settings-__RhxrW5.js} +1 -1
  66. package/dashboard/dist/assets/{use-ordered-list-sMvpJjOK.js → use-ordered-list-AhnqpdnT.js} +1 -1
  67. package/dashboard/dist/assets/use-reduced-motion-CA2IXeeO.js +1 -0
  68. package/dashboard/dist/assets/{use-session-efficiency-pref-BsG2CJqB.js → use-session-efficiency-pref-CCYtJ_cN.js} +1 -1
  69. package/dashboard/dist/assets/use-transform-BhcppNI4.js +1 -0
  70. package/dashboard/dist/assets/{use-usage-limits-DVhgZkTD.js → use-usage-limits-CbA095lv.js} +1 -1
  71. package/dashboard/dist/assets/{useCurrency-DqxQMZty.js → useCurrency-Dt2GqkDm.js} +1 -1
  72. package/dashboard/dist/assets/{useScrollLock-DZpDnNt6.js → useScrollLock-C5d53j7C.js} +1 -1
  73. package/dashboard/dist/assets/{useTokenFormat-CdYh0d_c.js → useTokenFormat-dnqZK7Z-.js} +1 -1
  74. package/dashboard/dist/assets/{zap-9gvAtu1o.js → zap-Bw5OO91s.js} +1 -1
  75. package/dashboard/dist/index.html +2 -2
  76. package/dashboard/dist/share.html +2 -2
  77. package/package.json +1 -1
  78. package/src/commands/serve.js +21 -4
  79. package/src/commands/sync.js +142 -73
  80. package/src/lib/cursor-store.js +52 -2
  81. package/src/lib/local-api.js +143 -35
  82. package/src/lib/pricing/seed-snapshot.json +1 -1
  83. package/src/lib/runtime-config.js +19 -1
  84. package/dashboard/dist/assets/AchievementsPage-qqu8DWOa.js +0 -2
  85. package/dashboard/dist/assets/AchievementsSection-iRzgGWeO.js +0 -1
  86. package/dashboard/dist/assets/BadgeDetailModal-D3lYNgOJ.js +0 -1
  87. package/dashboard/dist/assets/CommunityStatsModal-CR-VAT3e.js +0 -1
  88. package/dashboard/dist/assets/DashboardPage-DGzKf5-y.js +0 -1
  89. package/dashboard/dist/assets/DialogClose-8Fw7R9Ma.js +0 -1
  90. package/dashboard/dist/assets/DialogDescription-DDeAH6I9.js +0 -1
  91. package/dashboard/dist/assets/FadeIn-DdYC9vT8.js +0 -1
  92. package/dashboard/dist/assets/LandingPage-D7WEaged.js +0 -4314
  93. package/dashboard/dist/assets/LeaderboardPage-nRXBc0bw.js +0 -2
  94. package/dashboard/dist/assets/LoginPage-2c5mYQJ1.js +0 -1
  95. package/dashboard/dist/assets/PetPage-BMi50Olg.js +0 -1
  96. package/dashboard/dist/assets/PopoverPopup-ByOC1OEv.js +0 -1
  97. package/dashboard/dist/assets/ResetPasswordPage-CNeptbJw.js +0 -1
  98. package/dashboard/dist/assets/SelectItemText-D4laqPg3.js +0 -1
  99. package/dashboard/dist/assets/SettingsPage-DlFD5hy9.js +0 -1
  100. package/dashboard/dist/assets/SkillsPage-ChdsShAm.js +0 -1
  101. package/dashboard/dist/assets/TrendMonitor-ueTTQIih.js +0 -19
  102. package/dashboard/dist/assets/WidgetsPage-a6S6gqVf.js +0 -1
  103. package/dashboard/dist/assets/__vite-browser-external-C44tPAD-.css +0 -1
  104. package/dashboard/dist/assets/__vite-browser-external-Djkun5S2.js +0 -1354
  105. package/dashboard/dist/assets/agent-logos-CwuIej9M.js +0 -1
  106. package/dashboard/dist/assets/provider-display-BgCflQrF.js +0 -42
  107. package/dashboard/dist/assets/use-transform-Bjy8uQ3M.js +0 -1
@@ -0,0 +1,42 @@
1
+ import{k as Ne,r as i,j as e,c as n,U as Ie,a4 as He,a5 as Ge,X as Oe,Z as qe}from"./__vite-browser-external-DWKjPxnU.js";import{u as Ze}from"./useCurrency-Dt2GqkDm.js";import{u as Ae}from"./useTokenFormat-dnqZK7Z-.js";import{M as Ke,T as Ve}from"./terminal-DBXjwlTm.js";import{I as Je}from"./info-F-75j15K.js";const Qe=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],et=Ne("pause",Qe);const tt=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],at=Ne("play",tt);const rt=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],ot=Ne("rotate-ccw",rt),te={emerald:{light:["#ebedf0","#a7f3d0","#6ee7b7","#34d399","#10b981"],dark:["#2d333b","#065f46","#059669","#10b981","#34d399"],gridColor:{light:"rgba(16, 185, 129, 0.12)",dark:"rgba(52, 211, 153, 0.08)"}},ocean:{light:["#f1f5f9","#93c5fd","#60a5fa","#3b82f6","#1d4ed8"],dark:["#1e293b","#1e3a8a","#2563eb","#3b82f6","#60a5fa"],gridColor:{light:"rgba(59, 130, 246, 0.12)",dark:"rgba(96, 165, 250, 0.08)"}},neon:{light:["#faf5ff","#ebd5ff","#c084fc","#a855f7","#7e22ce"],dark:["#2e1065","#581c87","#8b5cf6","#a855f7","#c084fc"],gridColor:{light:"rgba(168, 85, 247, 0.12)",dark:"rgba(192, 132, 252, 0.08)"}},amber:{light:["#fffbeb","#fde68a","#f59e0b","#d97706","#b45309"],dark:["#451a03","#78350f","#b45309","#d97706","#f59e0b"],gridColor:{light:"rgba(245, 158, 11, 0.12)",dark:"rgba(245, 158, 11, 0.08)"}}};function nt(s,x){const h=/^#([0-9a-f]{6})$/i.exec(s);if(!h)return s;const c=parseInt(h[1],16),v=c>>16&255,D=c>>8&255,Y=c&255,R=T=>Math.max(0,Math.min(255,Math.round(T*x)));return`rgb(${R(v)}, ${R(D)}, ${R(Y)})`}function O(s,x,h,c,v){const D=Math.cos(c),Y=Math.sin(c),R=s*D-x*Y,T=s*Y+x*D,A=h,S=Math.cos(v),$=Math.sin(v),q=R,p=T*S-A*$,k=T*$+A*S;return{x:q,y:p,z:k}}function st(s,x,h,c,v){return O(s,x,h,c,v)}function Ee(s,x,h=c=>Number(c).toLocaleString()){const c=h(x);if(s>=4){const v=Math.floor(Math.random()*3)+1;return n(`heatmap.3d.voxel.joke.${v}`,{value:c})}else return s===3?n("heatmap.3d.voxel.level3",{value:c}):s===2?n("heatmap.3d.voxel.level2",{value:c}):s===1?n("heatmap.3d.voxel.level1",{value:c}):n("heatmap.3d.voxel.level0")}function Se({weeks:s,palette:x="auto",isDark:h=!1,interactive:c=!1,autoRotateInit:v=!1,onResetViewRef:D=null}){const{formatTokens:Y,formatTokensTooltip:R}=Ae(),T=te[x]||(x==="auto"?te.emerald:null),A=T?h?T.dark:T.light:Array.isArray(x)?x:h?te.emerald.dark:te.emerald.light,S=T?h?T.gridColor.dark:T.gridColor.light:h?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",$=-.2,q=.88,[p,k]=i.useState({yaw:$,pitch:q}),[ce,Z]=i.useState(v),[he,L]=i.useState(1),C=c?13:10.5,fe=i.useMemo(()=>{const t=[],r=s.length;if(r===0||!c)return[];for(let l=0;l<=7;l++){const o=(l-3.5)*C,d=O(-r/2*C,o,0,p.yaw,p.pitch),u=O(r/2*C,o,0,p.yaw,p.pitch);t.push({d:`M${d.x},${d.y} L${u.x},${u.y}`,key:`horiz-${l}`})}for(let l=0;l<=r;l+=4){const o=(l-r/2)*C,d=O(o,-3.5*C,0,p.yaw,p.pitch),u=O(o,3.5*C,0,p.yaw,p.pitch);t.push({d:`M${d.x},${d.y} L${u.x},${u.y}`,key:`vert-${l}`})}if(r%4!==0){const l=(r-r/2)*C,o=O(l,-3.5*C,0,p.yaw,p.pitch),d=O(l,3.5*C,0,p.yaw,p.pitch);t.push({d:`M${o.x},${o.y} L${d.x},${d.y}`,key:"vert-last"})}return t},[s.length,p,C,c]);i.useEffect(()=>{D&&(D.current={reset:()=>{k({yaw:$,pitch:q}),Z(!1),L(1),be()},toggleAutoRotate:t=>{Z(t)}})},[D]);const K=i.useRef(null),I=i.useRef(null),F=i.useRef(!1),de=i.useRef({x:0,y:0}),V=i.useRef({yaw:$,pitch:q}),U=i.useRef({x:0,y:0}),oe=i.useRef({x:0,y:0,time:0}),ne=i.useRef(null),[ge,ye]=i.useState(0),J=i.useRef(null),se=i.useRef(!0);i.useEffect(()=>(se.current=!0,()=>{se.current=!1}),[]);const be=()=>{J.current&&cancelAnimationFrame(J.current),ye(0);const t=performance.now(),r=1200,l=o=>{if(!se.current)return;const d=o-t,u=Math.min(1,d/r),j=1-Math.pow(1-u,3);ye(j),u<1?J.current=requestAnimationFrame(l):J.current=null};J.current=requestAnimationFrame(l)};i.useEffect(()=>(be(),()=>{J.current&&cancelAnimationFrame(J.current)}),[c]),i.useEffect(()=>{if(!ce||F.current||typeof window>"u"||typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let r;const l=()=>{if(typeof document<"u"&&document.visibilityState==="hidden"){r=requestAnimationFrame(l);return}k(o=>({yaw:o.yaw+.002,pitch:o.pitch})),r=requestAnimationFrame(l)};return r=requestAnimationFrame(l),()=>cancelAnimationFrame(r)},[ce]);const me=(t,r)=>{c&&(F.current=!0,de.current={x:t,y:r},V.current={yaw:p.yaw,pitch:p.pitch},U.current={x:0,y:0},oe.current={x:t,y:r,time:performance.now()},ne.current&&cancelAnimationFrame(ne.current))},X=(t,r)=>{if(!F.current)return;const l=t-de.current.x,o=r-de.current.y,d=performance.now(),u=d-oe.current.time;u>0&&(U.current={x:(t-oe.current.x)/u,y:(r-oe.current.y)/u}),oe.current={x:t,y:r,time:d};const j=.005,f=V.current.yaw-l*j,g=Math.PI/2.3,P=Math.max(-g,Math.min(g,V.current.pitch-o*j));k({yaw:f,pitch:P})},ve=()=>{if(!F.current)return;F.current=!1;let t=-U.current.x*12,r=-U.current.y*12;const l=.95,o=()=>{F.current||(t*=l,r*=l,!(Math.abs(t)<.01&&Math.abs(r)<.01)&&(k(d=>{const u=d.yaw+t*.005,j=Math.PI/2.3,f=Math.max(-j,Math.min(j,d.pitch+r*.005));return{yaw:u,pitch:f}}),ne.current=requestAnimationFrame(o)))};ne.current=requestAnimationFrame(o)},[y,xe]=i.useState(null),[Q,pe]=i.useState({x:0,y:0,shiftX:0}),b=i.useRef(null);i.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]),i.useEffect(()=>{if(!c||!I.current)return;const t=l=>{l.preventDefault();const o=-l.deltaY*.0025;L(d=>{const u=d+o;return Math.max(.5,Math.min(3,u))})},r=I.current;return r.addEventListener("wheel",t,{passive:!1}),()=>{r.removeEventListener("wheel",t)}},[c]);const z=i.useMemo(()=>{const t=[];return s.forEach((r,l)=>{(Array.isArray(r)?r:[]).forEach((o,d)=>{o&&t.push({key:o.day||`${l}-${d}`,col:l,row:d,level:o.level||0,value:o.value||0,day:o.day,models:o.models||null})})}),t},[s]),ke=C-(c?1.8:1.5),we=c?38:28,ee=t=>Math.max(1.8,Number(t)/4*we),ae=i.useMemo(()=>{if(z.length===0)return[];const t=s.length;return z.map(r=>{const l=ee(r.level),o=Math.sqrt(Math.pow(r.col-t/2,2)+Math.pow(r.row-3.5,2)),d=Math.sqrt(Math.pow(t/2,2)+Math.pow(3.5,2)),u=o/d*.4,j=Math.min(1,Math.max(0,(ge-u)*(1/.6))),f=l*j,g=(r.col-t/2)*C,P=(r.row-3.5)*C,N=ke/2,G=[{x:g-N,y:P-N,z:0},{x:g+N,y:P-N,z:0},{x:g+N,y:P+N,z:0},{x:g-N,y:P+N,z:0},{x:g-N,y:P-N,z:f},{x:g+N,y:P-N,z:f},{x:g+N,y:P+N,z:f},{x:g-N,y:P+N,z:f}].map(W=>O(W.x,W.y,W.z,p.yaw,p.pitch)),ue=O(g,P,f/2,p.yaw,p.pitch),Le=[{name:"top",indices:[4,5,6,7],scale:1,normal:[0,0,1]},{name:"bottom",indices:[3,2,1,0],scale:.4,normal:[0,0,-1]},{name:"left",indices:[3,0,4,7],scale:.55,normal:[-1,0,0]},{name:"right",indices:[1,2,6,5],scale:.75,normal:[1,0,0]},{name:"front",indices:[0,1,5,4],scale:.85,normal:[0,-1,0]},{name:"back",indices:[2,3,7,6],scale:.65,normal:[0,1,0]}],Pe=A[Math.min(4,Math.max(0,Number(r.level)||0))],ze=[],De=.35,Ye=-.4,Ue=.83;return Le.forEach(W=>{const je=st(W.normal[0],W.normal[1],W.normal[2],p.yaw,p.pitch);if(je.z>.001){const Me=G[W.indices[0]],Te=G[W.indices[1]],_e=G[W.indices[2]],$e=G[W.indices[3]],Xe=`M${Me.x},${Me.y} L${Te.x},${Te.y} L${_e.x},${_e.y} L${$e.x},${$e.y} Z`,Be=je.x*De+je.y*Ye+je.z*Ue,We=h?.18:0,Fe=W.scale*(.82+.28*Math.max(0,Be))+We;ze.push({name:W.name,d:Xe,fill:nt(Pe,Fe)})}}),{...r,centerProj:ue,renderedFaces:ze}})},[z,p,A,s.length,ge,C,ke,we]),le=i.useMemo(()=>[...ae].sort((t,r)=>t.centerProj.z-r.centerProj.z),[ae]),_=i.useMemo(()=>{if(le.length===0)return{minX:-100,minY:-100,maxX:100,maxY:100};let t=1/0,r=1/0,l=-1/0,o=-1/0;return le.forEach(d=>{const u=C*2,j=d.centerProj.x,f=d.centerProj.y;j-u<t&&(t=j-u),j+u>l&&(l=j+u),f-u<r&&(r=f-u),f+u>o&&(o=f+u)}),{minX:t,minY:r,maxX:l,maxY:o}},[le,C]),E=12,a=_.maxX-_.minX+E*2,m=_.maxY-_.minY+E*2,M=a/he,w=m/he,B=_.minX-E+(a-M)/2,H=_.minY-E+(m-w)/2,ie=`${B} ${H} ${M} ${w}`;return z.length===0?e.jsx("div",{className:"py-8 text-center text-sm text-oai-gray-500",children:n("heatmap.empty")}):e.jsxs("div",{ref:I,className:`relative select-none outline-none ${c?"cursor-grab active:cursor-grabbing w-full h-full flex items-center justify-center":"w-full overflow-hidden flex justify-center"}`,onMouseDown:t=>{if(!c)return;me(t.clientX,t.clientY);const r=o=>X(o.clientX,o.clientY),l=()=>{ve(),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",l)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",l)},onTouchStart:t=>{!c||t.touches.length===0||me(t.touches[0].clientX,t.touches[0].clientY)},onTouchMove:t=>{!c||t.touches.length===0||X(t.touches[0].clientX,t.touches[0].clientY)},onTouchEnd:()=>{c&&ve()},children:[e.jsxs("svg",{ref:K,viewBox:ie,width:c?"95%":"100%",height:c?"95%":"auto",role:"img","aria-label":n("heatmap.iso.aria")||"3D interactive activity heatmap",style:{display:"block",width:"100%",height:"auto",maxWidth:c?"none":`${a}px`,maxHeight:c?"78vh":"none"},className:"transition-transform duration-300 ease-out",children:[c&&fe.map(t=>e.jsx("path",{d:t.d,fill:"none",stroke:S,strokeWidth:.25,strokeDasharray:"1.5 2.5",strokeLinecap:"round"},t.key)),le.map(t=>{const r=y&&y.key===t.key;return e.jsxs("g",{onMouseEnter:l=>{if(b.current&&(clearTimeout(b.current),b.current=null),xe(t),c&&K.current){const o=O((t.col-s.length/2)*C,(t.row-3.5)*C,ee(t.level),p.yaw,p.pitch);let d=0,u=0;const j=K.current;if(I.current&&typeof j.createSVGPoint=="function"&&typeof j.getScreenCTM=="function")try{const N=j.createSVGPoint();N.x=o.x,N.y=o.y;const re=j.getScreenCTM();if(re){const G=N.matrixTransform(re),ue=I.current.getBoundingClientRect();d=G.x-ue.left,u=G.y-ue.top}}catch{const re=j.getBoundingClientRect(),G=_.maxX-_.minX+E*2,ue=_.maxY-_.minY+E*2;d=(o.x-(_.minX-E))/G*re.width,u=(o.y-(_.minY-E))/ue*re.height}else{const N=j.getBoundingClientRect(),re=_.maxX-_.minX+E*2,G=_.maxY-_.minY+E*2;d=(o.x-(_.minX-E))/re*N.width,u=(o.y-(_.minY-E))/G*N.height}const f=140;let g=0;const P=I.current?I.current.getBoundingClientRect().width:j.getBoundingClientRect().width;d<f?g=f-d:d>P-f&&(g=P-f-d),pe({x:d,y:u,shiftX:g})}},onMouseLeave:()=>{b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{xe(null)},150)},className:"transition-all duration-200",style:{filter:r?"brightness(1.15) drop-shadow(0 4px 6px rgba(0,0,0,0.15))":"none",cursor:c?"pointer":"default"},children:[!c&&t.day&&e.jsx("title",{children:`${t.day}: ${R(t.value)} tokens`}),t.renderedFaces.map((l,o)=>e.jsx("path",{d:l.d,fill:l.fill,stroke:l.fill,strokeWidth:.25,strokeLinejoin:"round"},o))]},t.key)})]}),c&&y&&e.jsxs("div",{onMouseEnter:()=>{b.current&&(clearTimeout(b.current),b.current=null)},onMouseLeave:()=>{b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{xe(null)},150)},className:"absolute z-[9999] w-0 h-0 transition-all duration-100 ease-out",style:{left:`${Q.x}px`,top:`${Q.y}px`},children:[e.jsxs("div",{className:"absolute left-0 bottom-[10px] backdrop-blur-md bg-white/90 dark:bg-oai-gray-900/90 border border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-xl rounded-xl p-3.5 max-w-[280px] min-w-[200px] flex flex-col gap-2 animate-in fade-in zoom-in-95 duration-100",style:{transform:`translateX(calc(-50% + ${Q.shiftX}px))`},children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-oai-gray-100 dark:border-oai-gray-800/80 pb-1.5",children:[e.jsx("span",{className:"text-[11px] font-semibold text-oai-gray-500 dark:text-oai-gray-400",children:y.day}),(()=>{const t=y.level===0?h?"#9ca3af":"#6b7280":A[y.level];return e.jsxs("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-medium",style:{backgroundColor:t+"22",color:t,border:`1px solid ${t}44`},children:["Level ",y.level]})})()]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{title:R(y.value),className:"text-lg font-bold text-oai-gray-900 dark:text-white leading-none",children:Y(y.value)}),e.jsx("span",{className:"text-[10px] text-oai-gray-400 uppercase tracking-wider font-semibold",children:"Tokens"})]}),y.models&&Object.keys(y.models).length>0?e.jsxs("div",{className:"mt-1.5 border-t border-oai-gray-100 dark:border-oai-gray-800/60 pt-2 flex flex-col gap-1.5",children:[e.jsx("div",{className:"text-[10px] font-semibold text-oai-gray-400 dark:text-oai-gray-500 uppercase tracking-wider",children:"Model Breakdown"}),e.jsx("div",{className:"flex flex-col gap-2 max-h-[150px] overflow-y-auto pr-1.5 scrollbar-thin",children:Object.entries(y.models).map(([t,r])=>({name:t,val:Number(r)})).sort((t,r)=>r.val-t.val).map(({name:t,val:r})=>{const l=Number(y.value)||1,o=Math.round(r/l*100);return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center justify-between text-[11px] gap-3",children:[e.jsx("span",{className:"font-medium text-oai-gray-750 dark:text-oai-gray-200 truncate max-w-[120px]",title:t,children:t}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{title:R(r),className:"font-mono text-oai-gray-900 dark:text-oai-gray-100 font-semibold",children:Y(r)}),e.jsxs("span",{className:"text-[9px] text-oai-gray-450 dark:text-oai-gray-500 min-w-[28px] text-right font-medium",children:[o,"%"]})]})]}),e.jsx("div",{className:"w-full h-1 bg-oai-gray-100 dark:bg-oai-gray-800/85 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${o}%`,backgroundColor:A[4],boxShadow:`0 0 4px ${A[4]}55`}})})]},t)})})]}):e.jsx("p",{className:"text-[11px] text-oai-gray-600 dark:text-oai-gray-300 leading-relaxed font-normal mt-1 border-t border-dashed border-oai-gray-100 dark:border-oai-gray-800/60 pt-1.5",children:Ee(y.level,y.value,Y)})]})]}),e.jsx("div",{className:"absolute bottom-[6px] left-0 -translate-x-1/2 w-2.5 h-2.5 rotate-45 bg-white dark:bg-oai-gray-900 border-r border-b border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-sm",style:{marginBottom:"1px"}})]})]})}const lt=12,it=3,ct=26,dt=["#ebedf0","#a7f3d0","#6ee7b7","#34d399","#10b981"],mt=["#121212","#065f46","#059669","#10b981","#34d399"];function xt(s){if(typeof s!="string")return null;const x=/^(\d{4})-(\d{2})-(\d{2})$/.exec(s.trim());if(!x)return null;const h=new Date(Date.UTC(Number(x[1]),Number(x[2])-1,Number(x[3])));return Number.isFinite(h.getTime())?h:null}function Re(s,x){return new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()+x))}function ut(s,x){return Math.floor((Date.UTC(x.getUTCFullYear(),x.getUTCMonth(),x.getUTCDate())-Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()))/864e5)}function pt(s,x){const h=x==="mon"?1:0,c=s.getUTCDay();return Re(s,-((c-h+7)%7))}function ht(s,x,h,c){if(!s)return[];const v=xt(x)||new Date,D=[];for(let S=11;S>=0;S-=1)D.push(new Date(Date.UTC(v.getUTCFullYear(),v.getUTCMonth()-S,1)));const Y=pt(v,h),R=Re(Y,-(s-1)*7),T=[],A=new Set;for(const S of D){const $=Math.floor(ut(R,S)/7);$<0||$>=s||A.has($)||(A.add($),T.push({label:c[S.getUTCMonth()],index:$}))}return T}function jt({heatmap:s,timeZoneLabel:x,timeZoneShortLabel:h,hideLegend:c=!1,embedded:v=!1}){const{resolvedTheme:D}=Ie(),{currency:Y,rate:R}=Ze(),{formatTokens:T,formatTokensTooltip:A}=Ae(),S=D==="dark",$=S?mt:dt,q=i.useRef(null),p=i.useRef(null),[k,ce]=i.useState(null),[Z,he]=i.useState({x:0,y:0,shiftX:0,flipY:!1}),L=i.useRef(null);i.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]);const[C,fe]=i.useState(!1),[K,I]=i.useState(!1),[F,de]=i.useState(!1),V=i.useRef(null),[U,oe]=i.useState("emerald"),ne=[n("heatmap.month.jan"),n("heatmap.month.feb"),n("heatmap.month.mar"),n("heatmap.month.apr"),n("heatmap.month.may"),n("heatmap.month.jun"),n("heatmap.month.jul"),n("heatmap.month.aug"),n("heatmap.month.sep"),n("heatmap.month.oct"),n("heatmap.month.nov"),n("heatmap.month.dec")],ge=(a,m)=>{if(!m||!m.day)return;L.current&&(clearTimeout(L.current),L.current=null),ce(m);const M=a.currentTarget.getBoundingClientRect(),w=typeof window<"u"?window.innerWidth:1024,B=M.left+M.width/2,H=M.top<300,ie=H?M.bottom:M.top,t=140;let r=0;B<t?r=t-B:B>w-t&&(r=w-t-B),he({x:B,y:ie,shiftX:r,flipY:H})},ye=()=>{L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{ce(null)},150)},J=()=>{I(!1),fe(!0)},se=()=>{I(!0)},be=a=>{a.target===a.currentTarget&&K&&(fe(!1),I(!1))};i.useEffect(()=>{if(!C||K)return;const a=m=>{m.key==="Escape"&&se()};return window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[C,K]);const me=i.useMemo(()=>({emerald:{accentText:"text-emerald-500 dark:text-emerald-400",accentBg:"bg-emerald-500/10 dark:bg-emerald-400/10",accentBorder:"border-emerald-500/20 dark:border-emerald-400/15",hoverBorder:"hover:border-emerald-500/30 dark:hover:border-emerald-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(16,185,129,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(52,211,153,0.25)]",rawColor:"#10b981"},ocean:{accentText:"text-blue-500 dark:text-blue-400",accentBg:"bg-blue-500/10 dark:bg-blue-400/10",accentBorder:"border-blue-500/20 dark:border-blue-400/15",hoverBorder:"hover:border-blue-500/30 dark:hover:border-blue-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(59,130,246,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(96,165,250,0.25)]",rawColor:"#3b82f6"},neon:{accentText:"text-purple-500 dark:text-purple-400",accentBg:"bg-purple-500/10 dark:bg-purple-400/10",accentBorder:"border-purple-500/20 dark:border-purple-400/15",hoverBorder:"hover:border-purple-500/30 dark:hover:border-purple-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(168,85,247,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(192,132,252,0.25)]",rawColor:"#a855f7"},amber:{accentText:"text-amber-500 dark:text-amber-400",accentBg:"bg-amber-500/10 dark:bg-amber-400/10",accentBorder:"border-amber-500/20 dark:border-amber-400/15",hoverBorder:"hover:border-amber-500/30 dark:hover:border-amber-400/30",hoverGlow:"hover:shadow-[0_0_20px_-3px_rgba(245,158,11,0.15)] hover:dark:shadow-[0_0_20px_-3px_rgba(245,158,11,0.25)]",rawColor:"#f59e0b"}}),[]),X=me[U]||me.emerald,ve=te[U]?S?te[U].dark:te[U].light:S?te.emerald.dark:te.emerald.light,[y,xe]=i.useState(()=>{if(v)return"2d";try{return window.localStorage?.getItem("tt:heatmap-view")==="3d"?"3d":"2d"}catch{return"2d"}});i.useEffect(()=>{if(!v)try{window.localStorage?.setItem("tt:heatmap-view",y)}catch{}},[y,v]),i.useEffect(()=>{if(y!=="2d")return;const a=q.current;a&&(a.scrollLeft=a.scrollWidth)},[s?.weeks,y]),i.useEffect(()=>{const a=q.current;if(!a)return;const m=()=>{L.current&&(clearTimeout(L.current),L.current=null),ce(null)};return a.addEventListener("scroll",m),()=>a.removeEventListener("scroll",m)},[]);const Q=s?.week_starts_on==="mon"?"mon":"sun",pe=i.useMemo(()=>{const a=Array.isArray(s?.weeks)?s.weeks:[];if(!a.length)return{weeks:[]};const m=[];for(const M of a)for(const w of Array.isArray(M)?M:[])w?.day&&m.push({day:w.day,total_tokens:w.total_tokens??w.value??0,billable_total_tokens:w.billable_total_tokens??w.value??w.total_tokens??0,models:w.models??null});return He({dailyRows:m,weeks:Math.max(52,a.length),to:s?.to,weekStartsOn:Q})},[s?.to,s?.weeks,Q]),b=pe?.weeks||[],z=i.useMemo(()=>{let a=0,m=0,M={day:"无数据",value:0},w=0,B=0;const H=[];b.forEach(f=>{(Array.isArray(f)?f:[]).forEach(g=>{g&&g.day&&H.push(g)})}),H.sort((f,g)=>f.day.localeCompare(g.day)),H.forEach(f=>{const g=Number(f.value)||0;a+=g,g>0?(m++,w++,w>B&&(B=w)):w=0,g>M.value&&(M={day:f.day,value:g})});const ie=H.length||365,t=(m/ie*100).toFixed(1);let r="heatmap.3d.modal.ai.eval.default",l="heatmap.3d.modal.ai.title.default";a>=15e6?(l="heatmap.3d.modal.ai.title.peak",r="heatmap.3d.modal.ai.eval.peak"):a>=5e6?(l="heatmap.3d.modal.ai.title.heavy",r="heatmap.3d.modal.ai.eval.heavy"):a>=1e6?(l="heatmap.3d.modal.ai.title.core",r="heatmap.3d.modal.ai.eval.core"):a>=2e4&&(l="heatmap.3d.modal.ai.title.steady",r="heatmap.3d.modal.ai.eval.steady");const o=s?.total_cost_usd,d=Number(o),j=o!=null&&(typeof o!="string"||o.trim()!=="")&&Number.isFinite(d)?d:a/15e5;return{totalTokens:a,activeDays:m,activeRate:t,maxSingleDay:M,maxStreak:B,aiEvaluationTitleKey:l,aiEvaluationKey:r,totalCostUsd:j}},[b,s?.total_cost_usd]),Ce=i.useMemo(()=>Ge(z.totalCostUsd,{currency:Y,rate:R}),[z.totalCostUsd,Y,R]),ke=Q==="mon"?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(a=>n(`heatmap.day.${a.toLowerCase()}`)):["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(a=>n(`heatmap.day.${a.toLowerCase()}`)),we=i.useMemo(()=>ht(b.length,pe?.to,Q,ne),[pe?.to,b.length,Q,ne]);if(!b.length)return e.jsx("div",{className:"py-8 text-center text-sm text-oai-gray-500",children:n("heatmap.empty")});const ee=v?10:lt,ae=v?2:it,le=v?22:ct,_=le+b.length*ee+Math.max(0,b.length-1)*ae,E=`${le}px repeat(${b.length}, ${ee}px)`;return e.jsxs("div",{ref:p,className:v?"relative":"relative rounded-xl border border-oai-gray-200 dark:border-oai-gray-800 bg-white dark:bg-oai-gray-900 p-5",children:[!v&&e.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[e.jsx("h3",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:n("heatmap.title")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{role:"tablist","aria-label":"Heatmap view",className:"flex rounded-md border border-oai-gray-200 dark:border-oai-gray-800 p-0.5 text-[10px]",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":y==="2d",onClick:()=>xe("2d"),className:y==="2d"?"px-2 py-0.5 rounded bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800 dark:text-oai-white font-medium":"px-2 py-0.5 rounded text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-gray-700 dark:hover:text-oai-gray-200",children:n("heatmap.view.2d")}),e.jsx("button",{type:"button",role:"tab","aria-selected":y==="3d",onClick:()=>xe("3d"),className:y==="3d"?"px-2 py-0.5 rounded bg-oai-gray-100 text-oai-black dark:bg-oai-gray-800 dark:text-oai-white font-medium":"px-2 py-0.5 rounded text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-gray-700 dark:hover:text-oai-gray-200",children:n("heatmap.view.3d")})]}),e.jsx("span",{className:"text-xs text-oai-gray-400 dark:text-oai-gray-450",children:h||n("heatmap.legend.utc")})]})]}),y==="3d"&&e.jsxs("div",{onClick:J,className:"cursor-pointer group relative overflow-hidden rounded-lg hover:border-oai-gray-350 dark:hover:border-oai-gray-700 border border-transparent transition-all",title:n("heatmap.3d.hover_tip"),children:[e.jsx(Se,{weeks:b,isDark:S,palette:U}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-oai-gray-900/5 to-transparent pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity flex items-end justify-center pb-2",children:e.jsxs("span",{className:"text-[10px] bg-white/95 dark:bg-oai-gray-900/95 shadow border border-oai-gray-200/60 dark:border-oai-gray-800/80 px-2.5 py-1 rounded-full font-medium text-oai-gray-500 dark:text-oai-gray-400 flex items-center gap-1 transform translate-y-2 group-hover:translate-y-0 transition-transform duration-200",children:[e.jsx(Ke,{size:9}),n("heatmap.3d.hover_tip")]})})]}),y==="2d"&&e.jsx("div",{ref:q,className:`overflow-x-auto overflow-y-hidden heatmap-scroll-thin${v?"":" pb-1"}`,children:e.jsxs("div",{style:{minWidth:_},children:[e.jsxs("div",{className:"grid text-[10px] uppercase text-oai-gray-400 dark:text-oai-gray-400 mb-1",style:{gridTemplateColumns:E,columnGap:ae},children:[e.jsx("span",{}),we.map(a=>e.jsx("span",{style:{gridColumnStart:a.index+2},className:"whitespace-nowrap",children:a.label},`${a.label}-${a.index}`))]}),e.jsxs("div",{className:"grid",style:{gridTemplateColumns:E,columnGap:ae},children:[e.jsx("div",{className:"grid text-[10px] text-oai-gray-400 dark:text-oai-gray-400 sticky left-0 bg-white dark:bg-oai-gray-900 pr-2",style:{gridTemplateRows:`repeat(7, ${ee}px)`,rowGap:ae},children:ke.map(a=>e.jsx("span",{className:"leading-none",children:a},a))}),e.jsx("div",{className:"grid",style:{gridAutoFlow:"column",gridTemplateRows:`repeat(7, ${ee}px)`,gap:ae},children:b.map((a,m)=>(Array.isArray(a)?a:[]).map((M,w)=>{if(!M)return null;const B=M.day||`e-${m}-${w}`,H=Number(M.level)||0,ie=$[H]||$[0];return e.jsx("span",{onMouseEnter:t=>ge(t,M),onMouseLeave:ye,className:"rounded-[2px] transition-transform hover:scale-125 hover:z-10 cursor-pointer",style:{width:ee,height:ee,background:ie}},B)}))})]})]})}),!c&&e.jsxs("div",{className:"flex items-center justify-center gap-2 mt-3",children:[e.jsx("span",{className:"text-[10px] text-oai-gray-400 dark:text-oai-gray-400",children:n("heatmap.legend.less")}),e.jsx("div",{className:"flex gap-0.5",children:$.map((a,m)=>e.jsx("span",{className:"rounded-[1px]",style:{width:10,height:10,background:a}},m))}),e.jsx("span",{className:"text-[10px] text-oai-gray-400 dark:text-oai-gray-400",children:n("heatmap.legend.more")})]}),C&&e.jsx("div",{onAnimationEnd:be,onClick:a=>{a.target===a.currentTarget&&se()},className:`fixed inset-0 z-50 flex items-center justify-center p-3 md:p-6 backdrop-blur-md bg-black/15 dark:bg-black/40 ${K?"animate-tt-fade-out":"animate-tt-fade-in"}`,children:e.jsxs("div",{className:`relative w-full max-w-6xl h-[88vh] backdrop-blur-2xl bg-white/90 dark:bg-oai-gray-900/90 border border-oai-gray-200/50 dark:border-white/10 shadow-2xl rounded-2xl flex flex-col md:flex-row overflow-hidden ${K?"animate-tt-modal-exit":"animate-tt-modal"}`,children:[e.jsx("button",{type:"button",onClick:se,className:"absolute top-4 right-4 z-50 p-2 rounded-full border border-oai-gray-200/60 dark:border-oai-gray-800/60 bg-white/50 dark:bg-oai-gray-900/50 text-oai-gray-500 dark:text-oai-gray-400 hover:text-oai-gray-900 dark:hover:text-white hover:rotate-90 hover:scale-105 active:scale-95 transition-all duration-300",children:e.jsx(Oe,{size:16})}),e.jsxs("div",{className:"w-full md:w-[340px] border-b md:border-b-0 md:border-r border-zinc-200/50 dark:border-zinc-800/40 p-5 md:p-6 flex flex-col gap-6 overflow-y-auto backdrop-blur-md bg-zinc-50/50 dark:bg-zinc-950/50",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 select-none",children:[e.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:X.rawColor}}),e.jsx("span",{className:"relative inline-flex rounded-full h-1.5 w-1.5",style:{backgroundColor:X.rawColor}})]}),e.jsx("span",{className:"text-[9px] font-extrabold uppercase tracking-widest font-mono text-zinc-400 dark:text-zinc-500",children:"3D Insight"})]}),e.jsx("h4",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight leading-none mt-2 select-none",children:n("heatmap.3d.modal.title")}),e.jsx("p",{className:"text-[11px] leading-relaxed text-zinc-400 dark:text-zinc-500 mt-2 font-normal select-none",children:n("heatmap.3d.modal.desc")})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-5 gap-y-5 border-y border-zinc-200/50 dark:border-zinc-800/50 py-5 select-none",children:[e.jsxs("div",{className:"flex flex-col gap-1 relative group cursor-help",children:[e.jsx("div",{className:"absolute left-0 bottom-full mb-2 pointer-events-none opacity-0 translate-y-1 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-200 z-50",children:e.jsxs("div",{className:"bg-white dark:bg-zinc-950 text-zinc-900 dark:text-zinc-50 text-[10px] font-semibold font-mono rounded-lg px-2.5 py-1.5 shadow-xl border border-zinc-200 dark:border-zinc-800/80 whitespace-nowrap flex flex-col",children:[e.jsx("span",{className:"text-[9px] text-zinc-400 dark:text-zinc-500",children:n("heatmap.3d.modal.stats.precision_total_tokens")}),e.jsxs("span",{className:"mt-0.5 font-bold text-zinc-900 dark:text-zinc-50",children:[A(z.totalTokens)," Tokens"]})]})}),e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:n("heatmap.3d.modal.stats.total_tokens")}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:T(z.totalTokens,{decimals:2})}),e.jsx("div",{className:"opacity-30 group-hover:opacity-60 transition-opacity",children:e.jsx("svg",{width:"24",height:"10",viewBox:"0 0 24 10",fill:"none",children:e.jsx("path",{d:"M1 9C3 7 5 7 7 4C9 1 11 0 13 2C15 4 17 0 23 0",stroke:X.rawColor,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 group cursor-default",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:n("heatmap.3d.modal.stats.estimated_cost")}),e.jsx("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:Ce})]}),e.jsxs("div",{className:"flex flex-col gap-1 group cursor-default",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:n("heatmap.3d.modal.stats.active_rate_days")}),e.jsxs("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:[z.activeRate,"% ",e.jsxs("span",{className:"text-[10px] font-bold text-zinc-400 dark:text-zinc-500 font-mono",children:["(",z.activeDays,"D)"]})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 group cursor-default",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:n("heatmap.3d.modal.stats.max_streak")}),e.jsxs("span",{className:"text-xl font-black text-amber-500 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:[z.maxStreak," ",e.jsx("span",{className:"text-[10px] font-bold text-amber-500/80 font-mono",children:n("heatmap.3d.modal.stats.days_suffix")})]})]}),e.jsxs("div",{className:"flex flex-col gap-1 col-span-2 relative group cursor-help",children:[e.jsx("div",{className:"absolute left-0 bottom-full mb-2 pointer-events-none opacity-0 translate-y-1 group-hover:opacity-100 group-hover:translate-y-0 transition-all duration-200 z-50",children:e.jsxs("div",{className:"bg-white dark:bg-zinc-950 text-zinc-900 dark:text-zinc-50 text-[10px] font-semibold font-mono rounded-lg px-2.5 py-1.5 shadow-xl border border-zinc-200 dark:border-zinc-800/80 whitespace-nowrap flex flex-col",children:[e.jsx("span",{className:"text-[9px] text-zinc-400 dark:text-zinc-500",children:n("heatmap.3d.modal.stats.precision_peak_value")}),e.jsxs("span",{className:"mt-0.5 font-bold text-zinc-900 dark:text-zinc-50",children:[z.maxSingleDay.value>0?A(z.maxSingleDay.value):n("heatmap.3d.modal.stats.no_data")," Tokens"]}),e.jsx("span",{className:"text-[8px] text-zinc-400 dark:text-zinc-500 mt-0.5",children:z.maxSingleDay.day!=="无数据"?z.maxSingleDay.day:n("heatmap.3d.modal.stats.no_data")})]})}),e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:n("heatmap.3d.modal.stats.peak_day")}),e.jsxs("span",{className:"text-xl font-black text-zinc-900 dark:text-zinc-50 tracking-tight font-mono transition-transform duration-200 group-hover:-translate-y-[1px]",children:[z.maxSingleDay.value>0?T(z.maxSingleDay.value,{decimals:2}):n("heatmap.3d.modal.stats.no_data")," ",e.jsxs("span",{className:"text-[10px] font-bold text-zinc-400 dark:text-zinc-500 font-mono",children:["(",z.maxSingleDay.day!=="无数据"?z.maxSingleDay.day:n("heatmap.3d.modal.stats.no_data"),")"]})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-2.5 py-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 select-none",children:[e.jsx(Ve,{size:11,style:{color:X.rawColor}}),e.jsx("span",{className:"text-[9px] font-extrabold uppercase tracking-widest font-mono",style:{color:X.rawColor},children:n(z.aiEvaluationTitleKey)})]}),e.jsxs("div",{className:"pl-3.5 border-l-2 relative transition-all duration-300 group",style:{borderColor:X.rawColor},children:[e.jsx("div",{className:"absolute inset-y-0 left-0 w-[3px] blur-[2px] opacity-15 pointer-events-none rounded-full",style:{backgroundColor:X.rawColor}}),e.jsx("p",{className:"text-[11px] leading-relaxed text-zinc-600 dark:text-zinc-400 font-normal",children:n(z.aiEvaluationKey)})]})]}),e.jsx("div",{className:"mt-auto border-t border-zinc-200/50 dark:border-zinc-800/50 pt-4 select-none",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[9px] font-bold text-zinc-400 dark:text-zinc-500 uppercase tracking-widest font-mono",children:n("heatmap.3d.modal.legend.title")}),e.jsx("span",{className:"text-[10px] font-medium text-zinc-500 dark:text-zinc-400",children:n(`heatmap.3d.modal.palette.${U}`)})]}),e.jsx("div",{className:"flex gap-1",children:ve.map((a,m)=>e.jsx("div",{className:"flex-1 h-1 rounded-[2px]",style:{backgroundColor:a},title:`Level ${m}`},m))})]})})]}),e.jsxs("div",{className:"flex-1 h-full relative flex items-center justify-center overflow-hidden p-4",children:[e.jsx("div",{className:"absolute top-1/4 left-1/3 w-96 h-96 rounded-full blur-[130px] pointer-events-none -translate-x-1/2 -translate-y-1/2 transition-all duration-500",style:{backgroundColor:X.rawColor+"15"}}),e.jsx("div",{className:"absolute bottom-1/4 right-1/3 w-80 h-80 rounded-full blur-[120px] pointer-events-none translate-x-1/2 translate-y-1/2 bg-purple-500/[0.04] dark:bg-purple-500/[0.08]"}),e.jsxs("div",{className:"absolute top-4 left-1/2 -translate-x-1/2 flex items-center gap-3 p-1.5 backdrop-blur-md bg-white/70 dark:bg-oai-gray-900/75 border border-oai-gray-200/60 dark:border-oai-gray-800/80 rounded-full shadow-lg z-30 select-none",children:[e.jsx("div",{className:"flex items-center gap-1.5 px-2",children:Object.keys(me).map(a=>{const m=U===a;return e.jsx("button",{type:"button",onClick:()=>oe(a),title:n(`heatmap.3d.modal.palette.${a}`),className:`w-3.5 h-3.5 rounded-full transition-all duration-200 relative hover:scale-125 ${a==="emerald"?"bg-[#10b981]":a==="ocean"?"bg-[#3b82f6]":a==="neon"?"bg-[#a855f7]":"bg-[#f59e0b]"}`,children:m&&e.jsx("span",{className:"absolute inset-0 rounded-full ring-2 ring-offset-1 ring-offset-white dark:ring-offset-oai-gray-900 ring-oai-gray-900 dark:ring-white scale-110"})},a)})}),e.jsx("div",{className:"w-[1px] h-4 bg-oai-gray-200 dark:bg-oai-gray-800"}),e.jsxs("div",{className:"flex items-center gap-1 pr-1",children:[e.jsx("button",{type:"button",onClick:()=>{const a=!F;de(a),V.current&&V.current.toggleAutoRotate(a)},title:F?n("heatmap.3d.modal.control.pause"):n("heatmap.3d.modal.control.play"),className:`p-1.5 rounded-full transition-all duration-200 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 ${F?X.accentText:"text-oai-gray-400 hover:text-oai-gray-600 dark:hover:text-oai-gray-250"}`,children:F?e.jsx(et,{size:12}):e.jsx(at,{size:12})}),e.jsx("button",{type:"button",onClick:()=>{de(!1),V.current&&V.current.reset()},title:n("heatmap.3d.modal.control.reset"),className:"p-1.5 rounded-full text-oai-gray-400 hover:text-oai-gray-600 dark:hover:text-oai-gray-250 hover:bg-oai-gray-100 dark:hover:bg-oai-gray-800 transition-all duration-200",children:e.jsx(ot,{size:12})})]})]}),e.jsx(Se,{weeks:b,isDark:S,interactive:!0,palette:U,autoRotateInit:F,onResetViewRef:V}),e.jsxs("div",{className:"absolute bottom-4 right-4 flex items-center gap-1.5 text-[9px] font-bold text-oai-gray-400 bg-white/80 dark:bg-oai-gray-900/80 border border-oai-gray-200/50 dark:border-oai-gray-800/80 rounded-md px-2.5 py-1.5 select-none pointer-events-none backdrop-blur-md shadow-sm",children:[e.jsx(Je,{size:10,className:X.accentText}),e.jsx("span",{children:n("heatmap.3d.modal.footer.tip")})]})]})]})}),k&&!C&&typeof document<"u"&&qe.createPortal(e.jsxs("div",{className:"fixed z-[9999] w-0 h-0 transition-all duration-100 ease-out pointer-events-none",style:{position:"fixed",left:`${Z.x}px`,top:`${Z.y}px`},children:[e.jsxs("div",{className:`absolute left-0 ${Z.flipY?"top-[10px]":"bottom-[10px]"} backdrop-blur-md bg-white/95 dark:bg-oai-gray-900/95 border border-oai-gray-200/50 dark:border-oai-gray-800/50 shadow-xl rounded-xl p-3.5 max-w-[280px] min-w-[200px] flex flex-col gap-2 animate-in fade-in zoom-in-95 duration-100`,style:{transform:`translateX(calc(-50% + ${Z.shiftX}px))`},children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-oai-gray-100 dark:border-oai-gray-800/80 pb-1.5",children:[e.jsx("span",{className:"text-[11px] font-semibold text-oai-gray-500 dark:text-oai-gray-400",children:k.day}),(()=>{const a=k.level===0?S?"#9ca3af":"#6b7280":$[k.level];return e.jsxs("span",{className:"text-[10px] px-2 py-0.5 rounded-full font-medium",style:{backgroundColor:a+"22",color:a,border:`1px solid ${a}44`},children:["Level ",k.level]})})()]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{title:A(k.total_tokens??k.value),className:"text-lg font-bold text-oai-gray-900 dark:text-white leading-none",children:T(k.total_tokens??k.value)}),e.jsx("span",{className:"text-[10px] text-oai-gray-400 uppercase tracking-wider font-semibold",children:"Tokens"})]}),k.models&&Object.keys(k.models).length>0?e.jsxs("div",{className:"mt-1.5 border-t border-oai-gray-100 dark:border-oai-gray-800/60 pt-2 flex flex-col gap-1.5",children:[e.jsx("div",{className:"text-[10px] font-semibold text-oai-gray-400 dark:text-oai-gray-500 uppercase tracking-wider",children:"Model Breakdown"}),e.jsx("div",{className:"flex flex-col gap-2 max-h-[150px] overflow-y-auto pr-1.5 oai-scrollbar",children:Object.entries(k.models).map(([a,m])=>({name:a,val:Number(m)})).sort((a,m)=>m.val-a.val).map(({name:a,val:m})=>{const M=Number(k.total_tokens??k.value)||1,w=Math.round(m/M*100);return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center justify-between text-[11px] gap-3",children:[e.jsx("span",{className:"font-medium text-oai-gray-750 dark:text-oai-gray-200 truncate max-w-[120px]",title:a,children:a}),e.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[e.jsx("span",{title:A(m),className:"font-mono text-oai-gray-900 dark:text-oai-gray-100 font-semibold",children:T(m)}),e.jsxs("span",{className:"text-[9px] text-oai-gray-450 dark:text-oai-gray-500 min-w-[28px] text-right font-medium",children:[w,"%"]})]})]}),e.jsx("div",{className:"w-full h-1 bg-oai-gray-100 dark:bg-oai-gray-800/85 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-300",style:{width:`${w}%`,backgroundColor:$[4],boxShadow:`0 0 4px ${$[4]}55`}})})]},a)})})]}):e.jsx("p",{className:"text-[11px] text-oai-gray-600 dark:text-oai-gray-300 leading-relaxed font-normal mt-1 border-t border-dashed border-oai-gray-100 dark:border-oai-gray-800/60 pt-1.5",children:Ee(k.level,k.total_tokens??k.value,T)})]})]}),e.jsx("div",{className:`absolute left-0 -translate-x-1/2 w-2.5 h-2.5 rotate-45 bg-white dark:bg-oai-gray-900 shadow-sm ${Z.flipY?"top-[6px] border-l border-t":"bottom-[6px] border-r border-b"} border-oai-gray-200/50 dark:border-oai-gray-800/50`,style:Z.flipY?{marginTop:"1px"}:{marginBottom:"1px"}})]}),document.body),e.jsx("style",{children:`
2
+ @keyframes tt-fade-in {
3
+ from { opacity: 0; }
4
+ to { opacity: 1; }
5
+ }
6
+ @keyframes tt-fade-out {
7
+ from { opacity: 1; }
8
+ to { opacity: 0; }
9
+ }
10
+ @keyframes tt-modal-entrance {
11
+ from {
12
+ opacity: 0;
13
+ transform: scale(0.96) translateY(10px);
14
+ }
15
+ to {
16
+ opacity: 1;
17
+ transform: scale(1) translateY(0);
18
+ }
19
+ }
20
+ @keyframes tt-modal-exit {
21
+ from {
22
+ opacity: 1;
23
+ transform: scale(1) translateY(0);
24
+ }
25
+ to {
26
+ opacity: 0;
27
+ transform: scale(0.96) translateY(10px);
28
+ }
29
+ }
30
+ .animate-tt-fade-in {
31
+ animation: tt-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
32
+ }
33
+ .animate-tt-fade-out {
34
+ animation: tt-fade-out 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
35
+ }
36
+ .animate-tt-modal {
37
+ animation: tt-modal-entrance 0.3s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
38
+ }
39
+ .animate-tt-modal-exit {
40
+ animation: tt-modal-exit 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
41
+ }
42
+ `})]})}const ft={anythingllm:"AnythingLLM",pianthropic:"Pi · Anthropic",pigithubcopilot:"Pi · GitHub Copilot",picopilot:"Pi · Copilot"};function gt(s){return String(s||"").trim().toLowerCase().replace(/[\s_-]+/g,"")}function Nt(s){const x=String(s||"").trim();if(!x)return"";const h=ft[gt(x)];return h||x.charAt(0).toUpperCase()+x.slice(1)}export{jt as A,Nt as f};
@@ -0,0 +1 @@
1
+ import{r as P,j as Ve}from"./__vite-browser-external-DWKjPxnU.js";const Ws=P.createContext({});function Co(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Mo=typeof window<"u",Do=Mo?P.useLayoutEffect:P.useEffect,Je=P.createContext(null);function Qe(t,e){t.indexOf(e)===-1&&t.push(e)}function qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Q=(t,e,n)=>n>e?e:n<t?t:n;let tn=()=>{};const st={},Ks=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Hs=t=>typeof t=="object"&&t!==null,zs=t=>/^0[^.\s]+$/u.test(t);function Gs(t){let e;return()=>(e===void 0&&(e=t()),e)}const z=t=>t,Bt=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Et=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class en{constructor(){this.subscriptions=[]}add(e){return Qe(this.subscriptions,e),()=>qt(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const W=t=>t*1e3,H=t=>t/1e3,$s=(t,e)=>e?t*(1e3/e):0,_s=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Eo=1e-7,Ro=12;function Lo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=_s(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Eo&&++a<Ro);return o}function Ft(t,e,n,s){if(t===e&&n===s)return z;const i=r=>Lo(r,0,1,t,n);return r=>r===0||r===1?r:_s(i(r),e,s)}const Xs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ys=t=>e=>1-t(1-e),qs=Ft(.33,1.53,.69,.99),nn=Ys(qs),Zs=Xs(nn),Js=t=>t>=1?1:(t*=2)<1?.5*nn(t):.5*(2-Math.pow(2,-10*(t-1))),sn=t=>1-Math.sin(Math.acos(t)),Qs=Ys(sn),ti=Xs(sn),ko=Ft(.42,0,1,1),Bo=Ft(0,0,.58,1),ei=Ft(.42,0,.58,1),Fo=t=>Array.isArray(t)&&typeof t[0]!="number",ni=t=>Array.isArray(t)&&typeof t[0]=="number",Io={linear:z,easeIn:ko,easeInOut:ei,easeOut:Bo,circIn:sn,circInOut:ti,circOut:Qs,backIn:nn,backInOut:Zs,backOut:qs,anticipate:Js},Oo=t=>typeof t=="string",Vn=t=>{if(ni(t)){tn(t.length===4);const[e,n,s,i]=t;return Ft(e,n,s,i)}else if(Oo(t))return Io[t];return t},jt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function jo(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(l){r.has(l)&&(u.schedule(l),t()),l(o)}const u={schedule:(l,c=!1,h=!1)=>{const p=h&&s?e:n;return c&&r.add(l),p.add(l),l},cancel:l=>{n.delete(l),r.delete(l)},process:l=>{if(o=l,s){i=!0;return}s=!0;const c=e;e=n,n=c,e.forEach(a),e.clear(),s=!1,i&&(i=!1,u.process(l))}};return u}const No=40;function si(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=jt.reduce((v,w)=>(v[w]=jo(r),v),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:h,preRender:f,render:p,postRender:d}=o,m=()=>{const v=st.useManualTiming,w=v?i.timestamp:performance.now();n=!1,v||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,No),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),u.process(i),l.process(i),c.process(i),h.process(i),f.process(i),p.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:jt.reduce((v,w)=>{const A=o[w];return v[w]=(D,V=!1,b=!1)=>(n||g(),A.schedule(D,V,b)),v},{}),cancel:v=>{for(let w=0;w<jt.length;w++)o[jt[w]].cancel(v)},state:i,steps:o}}const{schedule:M,cancel:it,state:I,steps:ce}=si(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0);let Kt;function Uo(){Kt=void 0}const j={now:()=>(Kt===void 0&&j.set(I.isProcessing||st.useManualTiming?I.timestamp:performance.now()),Kt),set:t=>{Kt=t,queueMicrotask(Uo)}},ii=t=>e=>typeof e=="string"&&e.startsWith(t),oi=ii("--"),Wo=ii("var(--"),on=t=>Wo(t)?Ko.test(t.split("/*")[0].trim()):!1,Ko=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Cn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const wt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Rt={...wt,transform:t=>Q(0,1,t)},Nt={...wt,default:1},Vt=t=>Math.round(t*1e5)/1e5,rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ho(t){return t==null}const zo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,an=(t,e)=>n=>!!(typeof n=="string"&&zo.test(n)&&n.startsWith(t)||e&&!Ho(n)&&Object.prototype.hasOwnProperty.call(n,e)),ri=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(rn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Go=t=>Q(0,255,t),he={...wt,transform:t=>Math.round(Go(t))},ct={test:an("rgb","red"),parse:ri("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+he.transform(t)+", "+he.transform(e)+", "+he.transform(n)+", "+Vt(Rt.transform(s))+")"};function $o(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ce={test:an("#"),parse:$o,transform:ct.transform},It=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),et=It("deg"),J=It("%"),T=It("px"),_o=It("vh"),Xo=It("vw"),Mn={...J,parse:t=>J.parse(t)/100,transform:t=>J.transform(t*100)},gt={test:an("hsl","hue"),parse:ri("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+J.transform(Vt(e))+", "+J.transform(Vt(n))+", "+Vt(Rt.transform(s))+")"},L={test:t=>ct.test(t)||Ce.test(t)||gt.test(t),parse:t=>ct.test(t)?ct.parse(t):gt.test(t)?gt.parse(t):Ce.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ct.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},Yo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qo(t){return isNaN(t)&&typeof t=="string"&&(t.match(rn)?.length||0)+(t.match(Yo)?.length||0)>0}const ai="number",li="color",Zo="var",Jo="var(",Dn="${}",Qo=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function xt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Qo,u=>(L.test(u)?(s.color.push(r),i.push(li),n.push(L.parse(u))):u.startsWith(Jo)?(s.var.push(r),i.push(Zo),n.push(u)):(s.number.push(r),i.push(ai),n.push(parseFloat(u))),++r,Dn)).split(Dn);return{values:n,split:a,indexes:s,types:i}}function tr(t){return xt(t).values}function ui({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===ai?i+=Vt(s[r]):o===li?i+=L.transform(s[r]):i+=s[r]}return i}}function er(t){return ui(xt(t))}const nr=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,sr=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:nr(t);function ir(t){const e=xt(t);return ui(e)(e.values.map((s,i)=>sr(s,e.split[i])))}const _={test:qo,parse:tr,createTransformer:er,getAnimatableNone:ir};function fe(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function or({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;i=fe(u,a,t+1/3),r=fe(u,a,t),o=fe(u,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Zt(t,e){return n=>n>0?e:t}const C=(t,e,n)=>t+(e-t)*n,de=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},rr=[Ce,ct,gt],ar=t=>rr.find(e=>e.test(t));function En(t){const e=ar(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=or(n)),n}const Rn=(t,e)=>{const n=En(t),s=En(e);if(!n||!s)return Zt(t,e);const i={...n};return r=>(i.red=de(n.red,s.red,r),i.green=de(n.green,s.green,r),i.blue=de(n.blue,s.blue,r),i.alpha=C(n.alpha,s.alpha,r),ct.transform(i))},Me=new Set(["none","hidden"]);function lr(t,e){return Me.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ur(t,e){return n=>C(t,e,n)}function ln(t){return typeof t=="number"?ur:typeof t=="string"?on(t)?Zt:L.test(t)?Rn:fr:Array.isArray(t)?ci:typeof t=="object"?L.test(t)?Rn:cr:Zt}function ci(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>ln(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function cr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ln(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function hr(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const fr=(t,e)=>{const n=_.createTransformer(e),s=xt(t),i=xt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Me.has(t)&&!i.values.length||Me.has(e)&&!s.values.length?lr(t,e):Bt(ci(hr(s,i),i.values),n):Zt(t,e)};function hi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):ln(t)(t,e)}const dr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>it(e),now:()=>I.isProcessing?I.timestamp:j.now()}},fi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Jt=2e4;function un(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Jt;)e+=n,s=t.next(e);return e>=Jt?1/0:e}function pr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(un(s),Jt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:H(i)}}const E={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function De(t,e){return t*Math.sqrt(1-e*e)}const mr=12;function gr(t,e,n){let s=n;for(let i=1;i<mr;i++)s=s-t(s)/e(s);return s}const pe=.001;function yr({duration:t=E.duration,bounce:e=E.bounce,velocity:n=E.velocity,mass:s=E.mass}){let i,r,o=1-e;o=Q(E.minDamping,E.maxDamping,o),t=Q(E.minDuration,E.maxDuration,H(t)),o<1?(i=l=>{const c=l*o,h=c*t,f=c-n,p=De(l,o),d=Math.exp(-h);return pe-f/p*d},r=l=>{const h=l*o*t,f=h*n+n,p=Math.pow(o,2)*Math.pow(l,2)*t,d=Math.exp(-h),m=De(Math.pow(l,2),o);return(-i(l)+pe>0?-1:1)*((f-p)*d)/m}):(i=l=>{const c=Math.exp(-l*t),h=(l-n)*t+1;return-pe+c*h},r=l=>{const c=Math.exp(-l*t),h=(n-l)*(t*t);return c*h});const a=5/t,u=gr(i,r,a);if(t=W(t),isNaN(u))return{stiffness:E.stiffness,damping:E.damping,duration:t};{const l=Math.pow(u,2)*s;return{stiffness:l,damping:o*2*Math.sqrt(s*l),duration:t}}}const vr=["duration","bounce"],xr=["stiffness","damping","mass"];function Ln(t,e){return e.some(n=>t[n]!==void 0)}function Tr(t){let e={velocity:E.velocity,stiffness:E.stiffness,damping:E.damping,mass:E.mass,isResolvedFromDuration:!1,...t};if(!Ln(t,xr)&&Ln(t,vr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:E.mass,stiffness:i,damping:r}}else{const n=yr({...t,velocity:0});e={...e,...n,mass:E.mass},e.isResolvedFromDuration=!0}return e}function Qt(t=E.visualDuration,e=E.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:u,damping:l,mass:c,duration:h,velocity:f,isResolvedFromDuration:p}=Tr({...n,velocity:-H(n.velocity||0)}),d=f||0,m=l/(2*Math.sqrt(u*c)),g=o-r,y=H(Math.sqrt(u/c)),x=Math.abs(g)<5;s||(s=x?E.restSpeed.granular:E.restSpeed.default),i||(i=x?E.restDelta.granular:E.restDelta.default);let v,w,A,D,V,b;if(m<1)A=De(y,m),D=(d+m*y*g)/A,v=S=>{const R=Math.exp(-m*y*S);return o-R*(D*Math.sin(A*S)+g*Math.cos(A*S))},V=m*y*D+g*A,b=m*y*g-D*A,w=S=>Math.exp(-m*y*S)*(V*Math.sin(A*S)+b*Math.cos(A*S));else if(m===1){v=R=>o-Math.exp(-y*R)*(g+(d+y*g)*R);const S=d+y*g;w=R=>Math.exp(-y*R)*(y*S*R-d)}else{const S=y*Math.sqrt(m*m-1);v=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(S*X,300);return o-tt*((d+m*y*g)*Math.sinh(Y)+S*g*Math.cosh(Y))/S};const R=(d+m*y*g)/S,U=m*y*R-g*S,rt=m*y*g-R*S;w=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(S*X,300);return tt*(U*Math.sinh(Y)+rt*Math.cosh(Y))}}const B={calculatedDuration:p&&h||null,velocity:S=>W(w(S)),next:S=>{if(!p&&m<1){const U=Math.exp(-m*y*S),rt=Math.sin(A*S),X=Math.cos(A*S),tt=o-U*(D*rt+g*X),Y=W(U*(V*rt+b*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-tt)<=i,a.value=a.done?o:tt,a}const R=v(S);if(p)a.done=S>=h;else{const U=W(w(S));a.done=Math.abs(U)<=s&&Math.abs(o-R)<=i}return a.value=a.done?o:R,a},toString:()=>{const S=Math.min(un(B),Jt),R=fi(U=>B.next(S*U).value,S,30);return S+"ms "+R},toTransition:()=>{}};return B}Qt.applyToOptions=t=>{const e=pr(t,100,Qt);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const wr=5;function di(t,e,n){const s=Math.max(e-wr,0);return $s(n-t(s),e-s)}function Ee({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},p=b=>a!==void 0&&b<a||u!==void 0&&b>u,d=b=>a===void 0?u:u===void 0||Math.abs(a-b)<Math.abs(u-b)?a:u;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const x=b=>-m*Math.exp(-b/s),v=b=>y+x(b),w=b=>{const B=x(b),S=v(b);f.done=Math.abs(B)<=l,f.value=f.done?y:S};let A,D;const V=b=>{p(f.value)&&(A=b,D=Qt({keyframes:[f.value,d(f.value)],velocity:di(v,b,f.value),damping:i,stiffness:r,restDelta:l,restSpeed:c}))};return V(0),{calculatedDuration:null,next:b=>{let B=!1;return!D&&A===void 0&&(B=!0,w(b),V(b)),A!==void 0&&b>=A?D.next(b-A):(!B&&w(b),f)}}}function Pr(t,e,n){const s=[],i=n||st.mix||hi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const u=Array.isArray(e)?e[o]||z:e;a=Bt(u,a)}s.push(a)}return s}function Sr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(tn(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Pr(e,s,i),u=a.length,l=c=>{if(o&&c<t[0])return e[0];let h=0;if(u>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Et(t[h],t[h+1],c);return a[h](f)};return n?c=>l(Q(t[0],t[r-1],c)):l}function br(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Et(0,e,s);t.push(C(n,1,i))}}function Ar(t){const e=[0];return br(e,t.length-1),e}function Vr(t,e){return t.map(n=>n*e)}function Cr(t,e){return t.map(()=>e||ei).splice(0,t.length-1)}function Ct({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fo(s)?s.map(Vn):Vn(s),r={done:!1,value:e[0]},o=Vr(n&&n.length===e.length?n:Ar(e),t),a=Sr(o,e,{ease:Array.isArray(i)?i:Cr(e,i)});return{calculatedDuration:t,next:u=>(r.value=a(u),r.done=u>=t,r)}}const Mr=t=>t!==null;function re(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Mr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Dr={decay:Ee,inertia:Ee,tween:Ct,keyframes:Ct,spring:Qt};function pi(t){typeof t.type=="string"&&(t.type=Dr[t.type])}class cn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Er=t=>t/100;class te extends cn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;pi(e);const{type:n=Ct,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const u=n||Ct;u!==Ct&&typeof a[0]!="number"&&(this.mixKeyframes=Bt(Er,hi(a[0],a[1])),a=[0,100]);const l=u({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=un(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:p,type:d,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=s;if(h){const b=Math.min(this.currentTime,i)/a;let B=Math.floor(b),S=b%1;!S&&b>=1&&(S=1),S===1&&B--,B=Math.min(B,h+1),B%2&&(f==="reverse"?(S=1-S,p&&(S-=p/a)):f==="mirror"&&(w=o)),v=Q(0,1,S)*a}let A;x?(this.delayState.value=c[0],A=this.delayState):A=w.next(v),r&&!x&&(A.value=r(A.value));let{done:D}=A;!x&&u!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return V&&d!==Ee&&(A.value=re(c,this.options,g,this.speed)),m&&m(A.value),V&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return H(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return di(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(j.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=H(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=dr,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(j.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Rr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ht=t=>t*180/Math.PI,Re=t=>{const e=ht(Math.atan2(t[1],t[0]));return Le(e)},Lr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Re,rotateZ:Re,skewX:t=>ht(Math.atan(t[1])),skewY:t=>ht(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Le=t=>(t=t%360,t<0&&(t+=360),t),kn=Re,Bn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),kr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bn,scaleY:Fn,scale:t=>(Bn(t)+Fn(t))/2,rotateX:t=>Le(ht(Math.atan2(t[6],t[5]))),rotateY:t=>Le(ht(Math.atan2(-t[2],t[0]))),rotateZ:kn,rotate:kn,skewX:t=>ht(Math.atan(t[4])),skewY:t=>ht(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ke(t){return t.includes("scale")?1:0}function Be(t,e){if(!t||t==="none")return ke(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=kr,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Lr,i=a}if(!i)return ke(e);const r=s[e],o=i[1].split(",").map(Fr);return typeof r=="function"?r(o):o[r]}const Br=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Be(n,e)};function Fr(t){return parseFloat(t.trim())}const Pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],St=new Set([...Pt,"pathRotation"]),In=t=>t===wt||t===T,Ir=new Set(["x","y","z"]),Or=Pt.filter(t=>!Ir.has(t));function jr(t){const e=[];return Or.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const nt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Be(e,"x"),y:(t,{transform:e})=>Be(e,"y")};nt.translateX=nt.x;nt.translateY=nt.y;const ft=new Set;let Fe=!1,Ie=!1,Oe=!1;function mi(){if(Ie){const t=Array.from(ft).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=jr(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ie=!1,Fe=!1,ft.forEach(t=>t.complete(Oe)),ft.clear()}function gi(){ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ie=!0)})}function Nr(){Oe=!0,gi(),mi(),Oe=!1}class hn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),Fe||(Fe=!0,M.read(gi),M.resolveKeyframes(mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Rr(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ur=t=>t.startsWith("--");function yi(t,e,n){Ur(e)?t.style.setProperty(e,n):t.style[e]=n}const Wr={};function vi(t,e){const n=Gs(t);return()=>Wr[e]??n()}const Kr=vi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),xi=vi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),At=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,On={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:At([0,.65,.55,1]),circOut:At([.55,0,1,.45]),backIn:At([.31,.01,.66,-.59]),backOut:At([.33,1.53,.69,.99])};function Ti(t,e){if(t)return typeof t=="function"?xi()?fi(t,e):"ease-out":ni(t)?At(t):Array.isArray(t)?t.map(n=>Ti(n,e)||On.easeOut):On[t]}function Hr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:u}={},l=void 0){const c={[e]:n};u&&(c.offset=u);const h=Ti(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),t.animate(c,f)}function wi(t){return typeof t=="function"&&"applyToOptions"in t}function zr({type:t,...e}){return wi(t)&&xi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Pi extends cn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,tn(typeof e.type!="string");const l=zr(e);this.animation=Hr(n,s,i,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=re(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),yi(n,s,c),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return H(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=W(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Kr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),z):i(this)}}const Si={anticipate:Js,backInOut:Zs,circInOut:ti};function Gr(t){return t in Si}function $r(t){typeof t.ease=="string"&&Gr(t.ease)&&(t.ease=Si[t.ease])}const me=10;class _r extends Pi{constructor(e){$r(e),pi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new te({...o,autoplay:!1}),u=Math.max(me,j.now()-this.startTime),l=Q(0,me,u-me),c=a.sample(u).value,{name:h}=this.options;r&&h&&yi(r,h,c),n.setWithVelocity(a.sample(Math.max(0,u-l)).value,c,l),a.stop()}}const jn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function Xr(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Yr(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=jn(i,e),a=jn(r,e);return!o||!a?!1:Xr(t)||(n==="spring"||wi(n))&&s}function je(t){t.duration=0,t.type="keyframes"}const bi=new Set(["opacity","clipPath","filter","transform"]),qr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Zr(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&qr.test(t[e]))return!0;return!1}const Jr=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Qr=Gs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ta(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Qr()&&n&&(bi.has(n)||Jr.has(n)&&Zr(a))&&(n!=="transform"||!c)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const ea=40;class na extends cn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:u,motionValue:l,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:u,motionValue:l,element:c,...h},p=c?.KeyframeResolver||hn;this.keyframeResolver=new p(a,(d,m,g)=>this.onKeyframesResolved(d,m,f,!g),u,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:u,isHandoff:l,onUpdate:c}=s;this.resolvedAt=j.now();let h=!0;Yr(e,r,o,a)||(h=!1,(st.instantAnimations||!u)&&c?.(re(e,s,n)),e[0]=e[e.length-1],je(s),s.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ea?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=h&&!l&&ta(p),m=p.motionValue?.owner?.current;let g;if(d)try{g=new _r({...p,element:m})}catch{g=new te(p)}else g=new te(p);g.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Nr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Ai(t,e,n,s=0,i=1){const r=Array.from(t).sort((l,c)=>l.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const Nn=30,sa=t=>!isNaN(parseFloat(t)),Un={current:void 0};class ia{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=j.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=sa(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new en);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Un.current&&Un.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Nn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nn);return $s(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Tt(t,e){return new ia(t,e)}function Vi(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function fn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Vi(n,t):n}const oa={type:"spring",stiffness:500,damping:25,restSpeed:10},ra=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),aa={type:"keyframes",duration:.8},la={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ua=(t,{keyframes:e})=>e.length>2?aa:St.has(t)?t.startsWith("scale")?ra(e[1]):oa:la,ca=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function ha(t){for(const e in t)if(!ca.has(e))return!0;return!1}const dn=(t,e,n,s={},i,r)=>o=>{const a=fn(s,t)||{},u=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-W(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};ha(a)||Object.assign(c,ua(t,c)),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(je(c),c.delay===0&&(h=!0)),(st.instantAnimations||st.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,je(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=re(c.keyframes,a);if(f!==void 0){M.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new te(c):new na(c)},fa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function da(t){const e=fa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ci(t,e,n=1){const[s,i]=da(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Ks(o)?parseFloat(o):o}return on(i)?Ci(i,e,n+1):i}function Wn(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function pn(t,e,n,s){if(typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function dt(t,e,n){const s=t.getProps();return pn(s,e,n!==void 0?n:s.custom,t)}const Mi=new Set(["width","height","top","left","right","bottom",...Pt]),Ne=t=>Array.isArray(t);function pa(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Tt(n))}function ma(t){return Ne(t)?t[t.length-1]||0:t}function ga(t,e){const n=dt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=ma(r[o]);pa(t,o,a)}}const O=t=>!!(t&&t.getVelocity);function ya(t){return!!(O(t)&&t.add)}function Ue(t,e){const n=t.getValue("willChange");if(ya(n))return n.add(e);if(!n&&st.WillChange){const s=new st.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function mn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const va="framerAppearId",Di="data-"+mn(va);function Ei(t){return t.props[Di]}function xa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ri(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const u=t.getDefaultTransition();r=r?Vi(r,u):u;const l=r?.reduceMotion,c=r?.skipAnimations;s&&(r=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],p=r?.path;p&&p.animateVisualElement(t,a,r,n,h);for(const d in a){const m=t.getValue(d,t.latestValues[d]??null),g=a[d];if(g===void 0||f&&xa(f,d))continue;const y={delay:n,...fn(r||{},d)};c&&(y.skipAnimations=!0);const x=m.get();if(x!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===x&&!y.velocity){M.update(()=>m.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const D=Ei(t);if(D){const V=window.MotionHandoffAnimation(D,d,M);V!==null&&(y.startTime=V,v=!0)}}Ue(t,d);const w=l??t.shouldReduceMotion;m.start(dn(d,m,g,w&&Mi.has(d)?{type:!1}:y,t,v));const A=m.animation;A&&h.push(A)}if(o){const d=()=>M.update(()=>{o&&ga(t,o)});h.length?Promise.all(h).then(d):d()}return h}function We(t,e,n={}){const s=dt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Ri(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:c,staggerDirection:h}=i;return Ta(t,e,u,l,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,l]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>l())}else return Promise.all([r(),o(n.delay)])}function Ta(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(We(u,e,{...o,delay:n+(typeof s=="function"?0:s)+Ai(t.variantChildren,u,s,i,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}function wa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>We(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=We(t,e,n);else{const i=typeof e=="function"?dt(t,e,n.custom):e;s=Promise.all(Ri(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Pa={test:t=>t==="auto",parse:t=>t},Li=t=>e=>e.test(t),ki=[wt,T,J,et,Xo,_o,Pa],Kn=t=>ki.find(Li(t));function Sa(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||zs(t):!0}const ba=new Set(["brightness","contrast","saturate","opacity"]);function Aa(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(rn)||[];if(!s)return t;const i=n.replace(s,"");let r=ba.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Va=/\b([a-z-]*)\(.*?\)/gu,Ke={..._,getAnimatableNone:t=>{const e=t.match(Va);return e?e.map(Aa).join(" "):t}},He={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Hn={...wt,transform:Math.round},Ca={rotate:et,pathRotation:et,rotateX:et,rotateY:et,rotateZ:et,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:et,skewX:et,skewY:et,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Rt,originX:Mn,originY:Mn,originZ:T},ee={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...Ca,zIndex:Hn,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:Hn},Ma={...ee,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:Ke,WebkitFilter:Ke,mask:He,WebkitMask:He},Bi=t=>Ma[t],Da=new Set([Ke,He]);function Fi(t,e){let n=Bi(t);return Da.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ea=new Set(["auto","none","0"]);function Ra(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Ea.has(r)&&xt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Fi(n,i)}class La extends hn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),on(h))){const f=Ci(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Mi.has(s)||e.length!==2)return;const[i,r]=e,o=Kn(i),a=Kn(r),u=Cn(i),l=Cn(r);if(u!==l&&nt[s]){this.needsMeasurement=!0;return}if(o!==a)if(In(o)&&In(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else nt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Sa(e[i]))&&s.push(i);s.length&&Ra(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=nt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=nt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,u])=>{e.getValue(a).set(u)}),this.resolveNoneKeyframes()}}const gn=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Ii(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;e&&(s=e.current);const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const ze=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ka(t){return Hs(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:yn}=si(queueMicrotask,!1),$={x:!1,y:!1};function Oi(){return $.x||$.y}function Ba(t){return t==="x"||t==="y"?$[t]?null:($[t]=!0,()=>{$[t]=!1}):$.x||$.y?null:($.x=$.y=!0,()=>{$.x=$.y=!1})}function ji(t,e){const n=Ii(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Fa(t){return!(t.pointerType==="touch"||Oi())}function Ia(t,e,n={}){const[s,i,r]=ji(t,n);return s.forEach(o=>{let a=!1,u=!1,l;const c=()=>{o.removeEventListener("pointerleave",d)},h=g=>{l&&(l(g),l=void 0),c()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),u&&(u=!1,h(g))},p=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},d=g=>{if(g.pointerType!=="touch"){if(a){u=!0;return}h(g)}},m=g=>{if(!Fa(g))return;u=!1;const y=e(o,g);typeof y=="function"&&(l=y,o.addEventListener("pointerleave",d,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",p,i)}),r}const Ni=(t,e)=>e?t===e?!0:Ni(t,e.parentElement):!1,vn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Oa=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ja(t){return Oa.has(t.tagName)||t.isContentEditable===!0}const Na=new Set(["INPUT","SELECT","TEXTAREA"]);function Ua(t){return Na.has(t.tagName)||t.isContentEditable===!0}const Ht=new WeakSet;function zn(t){return e=>{e.key==="Enter"&&t(e)}}function ge(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Wa=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=zn(()=>{if(Ht.has(n))return;ge(n,"down");const i=zn(()=>{ge(n,"up")}),r=()=>ge(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Gn(t){return vn(t)&&!Oi()}const $n=new WeakSet;function Ka(t,e,n={}){const[s,i,r]=ji(t,n),o=a=>{const u=a.currentTarget;if(!Gn(a)||$n.has(a))return;Ht.add(u),n.stopPropagation&&$n.add(a);const l=e(u,a),c={...i,capture:!0},h=(d,m)=>{window.removeEventListener("pointerup",f,c),window.removeEventListener("pointercancel",p,c),Ht.has(u)&&Ht.delete(u),Gn(d)&&typeof l=="function"&&l(d,{success:m})},f=d=>{h(d,u===window||u===document||n.useGlobalTarget||Ni(u,d.target))},p=d=>{h(d,!1)};window.addEventListener("pointerup",f,c),window.addEventListener("pointercancel",p,c)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),ka(a)&&(a.addEventListener("focus",l=>Wa(l,i)),!ja(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function xn(t){return Hs(t)&&"ownerSVGElement"in t}const zt=new WeakMap;let Gt;const Ui=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:xn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ha=Ui("inline","width","offsetWidth"),za=Ui("block","height","offsetHeight");function Ga({target:t,borderBoxSize:e}){zt.get(t)?.forEach(n=>{n(t,{get width(){return Ha(t,e)},get height(){return za(t,e)}})})}function $a(t){t.forEach(Ga)}function _a(){typeof ResizeObserver>"u"||(Gt=new ResizeObserver($a))}function Xa(t,e){Gt||_a();const n=Ii(t);return n.forEach(s=>{let i=zt.get(s);i||(i=new Set,zt.set(s,i)),i.add(e),Gt?.observe(s)}),()=>{n.forEach(s=>{const i=zt.get(s);i?.delete(e),i?.size||Gt?.unobserve(s)})}}const $t=new Set;let yt;function Ya(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};$t.forEach(e=>e(t))},window.addEventListener("resize",yt)}function qa(t){return $t.add(t),yt||Ya(),()=>{$t.delete(t),!$t.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function _n(t,e){return typeof t=="function"?qa(t):Xa(t,e)}function Za(t){return xn(t)&&t.tagName==="svg"}const Ja=[...ki,L,_],Qa=t=>Ja.find(Li(t)),Xn=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Xn(),y:Xn()}),Yn=()=>({min:0,max:0}),k=()=>({x:Yn(),y:Yn()}),tl=new WeakMap;function ae(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Lt(t){return typeof t=="string"||Array.isArray(t)}const Tn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wn=["initial",...Tn];function le(t){return ae(t.animate)||wn.some(e=>Lt(t[e]))}function Wi(t){return!!(le(t)||t.variants)}function el(t,e,n){for(const s in e){const i=e[s],r=n[s];if(O(i))t.addValue(s,i);else if(O(r))t.addValue(s,Tt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Tt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Ge={current:null},Ki={current:!1},nl=typeof window<"u";function sl(){if(Ki.current=!0,!!nl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ge.current=t.matches;t.addEventListener("change",e),e()}else Ge.current=!1}const qn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ne={};function Hi(t){ne=t}function il(){return ne}class ol{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=hn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=j.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,M.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=le(n),this.isVariantNode=Wi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const d=f[p];l[p]!==void 0&&O(d)&&d.set(l[p])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,tl.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ki.current||sl(),this.shouldReduceMotion=Ge.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&bi.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:l,duration:c}=n.accelerate,h=new Pi({element:this.current,name:e,keyframes:a,times:u,ease:l,duration:W(c)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=St.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ne){const n=ne[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):k()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<qn.length;s++){const i=qn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=el(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Tt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ks(s)||zs(s))?s=parseFloat(s):!Qa(s)&&_.test(n)&&(s=Fi(e,n)),this.setBaseTarget(e,O(s)?s.get():s)),O(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=pn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!O(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new en),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){yn.render(this.render)}}class zi extends ol{constructor(){super(...arguments),this.KeyframeResolver=La}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;O(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ot{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Gi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function rl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function al(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ye(t){return t===void 0||t===1}function $e({scale:t,scaleX:e,scaleY:n}){return!ye(t)||!ye(e)||!ye(n)}function ut(t){return $e(t)||$i(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function $i(t){return Zn(t.x)||Zn(t.y)}function Zn(t){return t&&t!=="0%"}function se(t,e,n){const s=t-n,i=e*s;return n+i}function Jn(t,e,n,s,i){return i!==void 0&&(t=se(t,i,s)),se(t,n,s)+e}function _e(t,e=0,n=1,s,i){t.min=Jn(t.min,e,n,s,i),t.max=Jn(t.max,e,n,s,i)}function _i(t,{x:e,y:n}){_e(t.x,e.translate,e.scale,e.originPoint),_e(t.y,n.translate,n.scale,n.originPoint)}const Qn=.999999999999,ts=1.0000000000001;function ll(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(Z(t.x,-r.scroll.offset.x),Z(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,_i(t,o)),s&&ut(r.latestValues)&&_t(t,r.latestValues,r.layout?.layoutBox))}e.x<ts&&e.x>Qn&&(e.x=1),e.y<ts&&e.y>Qn&&(e.y=1)}function Z(t,e){t.min+=e,t.max+=e}function es(t,e,n,s,i=.5){const r=C(t.min,t.max,i);_e(t,e,n,r,s)}function ns(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function _t(t,e,n){const s=n??t;es(t.x,ns(e.x,s.x),e.scaleX,e.scale,e.originX),es(t.y,ns(e.y,s.y),e.scaleY,e.scale,e.originY)}function Xi(t,e){return Gi(al(t.getBoundingClientRect(),e))}function ul(t,e,n){const s=Xi(t,n),{scroll:i}=e;return i&&(Z(s.x,i.offset.x),Z(s.y,i.offset.y)),s}const cl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hl=Pt.length;function fl(t,e,n){let s="",i=!0;for(let o=0;o<hl;o++){const a=Pt[o],u=t[a];if(u===void 0)continue;let l=!0;if(typeof u=="number")l=u===(a.startsWith("scale")?1:0);else{const c=parseFloat(u);l=a.startsWith("scale")?c===1:c===0}if(!l||n){const c=ze(u,ee[a]);if(!l){i=!1;const h=cl[a]||a;s+=`${h}(${c}) `}n&&(e[a]=c)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${ze(r,ee.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Pn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const u in e){const l=e[u];if(St.has(u)){o=!0;continue}else if(oi(u)){i[u]=l;continue}else{const c=ze(l,ee[u]);u.startsWith("origin")?(a=!0,r[u]=c):s[u]=c}}if(e.transform||(o||n?s.transform=fl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:u="50%",originY:l="50%",originZ:c=0}=r;s.transformOrigin=`${u} ${l} ${c}`}}function Yi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ss(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=ss(t,e.target.x),s=ss(t,e.target.y);return`${n}% ${s}%`}},dl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=_.parse(t);if(i.length>5)return s;const r=_.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=u;const l=C(a,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),r(i)}},Xe={borderRadius:{...bt,applyTo:[...gn]},borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomLeftRadius:bt,borderBottomRightRadius:bt,boxShadow:dl};function qi(t,{layout:e,layoutId:n}){return St.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Xe[t]||t==="opacity")}function Sn(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(O(s[o])||i&&O(i[o])||qi(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function pl(t){return window.getComputedStyle(t)}class ml extends zi{constructor(){super(...arguments),this.type="html",this.renderInstance=Yi}readValueFromInstance(e,n){if(St.has(n))return this.projection?.isProjecting?ke(n):Br(e,n);{const s=pl(e),i=(oi(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Xi(e,n)}build(e,n,s){Pn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Sn(e,n,s)}}const gl={offset:"stroke-dashoffset",array:"stroke-dasharray"},yl={offset:"strokeDashoffset",array:"strokeDasharray"};function vl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?gl:yl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const xl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zi(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},u,l,c){if(Pn(t,a,l),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete h.transformBox);for(const p of xl)h[p]!==void 0&&(f[p]=h[p],delete h[p]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&vl(h,i,r,o,!1)}const Ji=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Qi=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Tl(t,e,n,s){Yi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ji.has(i)?i:mn(i),e.attrs[i])}function to(t,e,n){const s=Sn(t,e,n);for(const i in t)if(O(t[i])||O(e[i])){const r=Pt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class wl extends zi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(St.has(n)){const s=Bi(n);return s&&s.default||0}return n=Ji.has(n)?n:mn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return to(e,n,s)}build(e,n,s){Zi(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Tl(e,n,s,i)}mount(e){this.isSVGTag=Qi(e.tagName),super.mount(e)}}const Pl=wn.length;function eo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?eo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Pl;n++){const s=wn[n],i=t.props[s];(Lt(i)||i===!1)&&(e[s]=i)}return e}function no(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Sl=[...Tn].reverse(),bl=Tn.length;function Al(t){return e=>Promise.all(e.map(({animation:n,options:s})=>wa(t,n,s)))}function Vl(t){let e=Al(t),n=is(),s=!0,i=!1;const r=l=>(c,h)=>{const f=dt(t,h,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:d,...m}=f;c={...c,...m,...d}}return c};function o(l){e=l(t)}function a(l){const{props:c}=t,h=eo(t.parent)||{},f=[],p=new Set;let d={},m=1/0;for(let y=0;y<bl;y++){const x=Sl[y],v=n[x],w=c[x]!==void 0?c[x]:h[x],A=Lt(w),D=x===l?v.isActive:null;D===!1&&(m=y);let V=w===h[x]&&w!==c[x]&&A;if(V&&(s||i)&&t.manuallyAnimateOnMount&&(V=!1),v.protectedKeys={...d},!v.isActive&&D===null||!w&&!v.prevProp||ae(w)||typeof w=="boolean")continue;if(x==="exit"&&v.isActive&&D!==!0){v.prevResolvedValues&&(d={...d,...v.prevResolvedValues});continue}const b=Cl(v.prevProp,w);let B=b||x===l&&v.isActive&&!V&&A||y>m&&A,S=!1;const R=Array.isArray(w)?w:[w];let U=R.reduce(r(x),{});D===!1&&(U={});const{prevResolvedValues:rt={}}=v,X={...rt,...U},tt=F=>{B=!0,p.has(F)&&(S=!0,p.delete(F)),v.needsAnimating[F]=!0;const K=t.getValue(F);K&&(K.liveStyle=!1)};for(const F in X){const K=U[F],at=rt[F];if(d.hasOwnProperty(F))continue;let pt=!1;Ne(K)&&Ne(at)?pt=!no(K,at)||b:pt=K!==at,pt?K!=null?tt(F):p.add(F):K!==void 0&&p.has(F)?tt(F):v.protectedKeys[F]=!0}v.prevProp=w,v.prevResolvedValues=U,v.isActive&&(d={...d,...U}),(s||i)&&t.blockInitialAnimation&&(B=!1);const Y=V&&b;B&&(!Y||S)&&f.push(...R.map(F=>{const K={type:x};if(typeof F=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:at}=t,pt=dt(at,F);if(at.enteringChildren&&pt){const{delayChildren:Vo}=pt.transition||{};K.delay=Ai(at.enteringChildren,t,Vo)}}return{animation:F,options:K}}))}if(p.size){const y={};if(typeof c.initial!="boolean"){const x=dt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(y.transition=x.transition)}p.forEach(x=>{const v=t.getBaseTarget(x),w=t.getValue(x);w&&(w.liveStyle=!0),y[x]=v??null}),f.push({animation:y})}let g=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function u(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(l,c)),n[l].isActive=c;const h=a(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=is(),i=!0}}}function Cl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!no(e,t):!1}function lt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function is(){return{animate:lt(!0),whileInView:lt(),whileHover:lt(),whileTap:lt(),whileDrag:lt(),whileFocus:lt(),exit:lt()}}function Ye(t,e){t.min=e.min,t.max=e.max}function G(t,e){Ye(t.x,e.x),Ye(t.y,e.y)}function os(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const so=1e-4,Ml=1-so,Dl=1+so,io=.01,El=0-io,Rl=0+io;function N(t){return t.max-t.min}function Ll(t,e,n){return Math.abs(t-e)<=n}function rs(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Ml&&t.scale<=Dl||isNaN(t.scale))&&(t.scale=1),(t.translate>=El&&t.translate<=Rl||isNaN(t.translate))&&(t.translate=0)}function Mt(t,e,n,s){rs(t.x,e.x,n.x,s?s.originX:void 0),rs(t.y,e.y,n.y,s?s.originY:void 0)}function as(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+N(e)}function kl(t,e,n,s){as(t.x,e.x,n.x,s?.x),as(t.y,e.y,n.y,s?.y)}function ls(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+N(e)}function ie(t,e,n,s){ls(t.x,e.x,n.x,s?.x),ls(t.y,e.y,n.y,s?.y)}function us(t,e,n,s,i){return t-=e,t=se(t,1/n,s),i!==void 0&&(t=se(t,1/i,s)),t}function Bl(t,e=0,n=1,s=.5,i,r=t,o=t){if(J.test(e)&&(e=parseFloat(e),e=C(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=C(r.min,r.max,s);t===r&&(a-=e),t.min=us(t.min,e,n,a,i),t.max=us(t.max,e,n,a,i)}function cs(t,e,[n,s,i],r,o){Bl(t,e[n],e[s],e[i],e.scale,r,o)}const Fl=["x","scaleX","originX"],Il=["y","scaleY","originY"];function hs(t,e,n,s){cs(t.x,e,Fl,n?n.x:void 0,s?s.x:void 0),cs(t.y,e,Il,n?n.y:void 0,s?s.y:void 0)}function fs(t){return t.translate===0&&t.scale===1}function oo(t){return fs(t.x)&&fs(t.y)}function ds(t,e){return t.min===e.min&&t.max===e.max}function Ol(t,e){return ds(t.x,e.x)&&ds(t.y,e.y)}function ps(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ro(t,e){return ps(t.x,e.x)&&ps(t.y,e.y)}function ms(t){return N(t.x)/N(t.y)}function gs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function jl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:c,pathRotation:h,rotateX:f,rotateY:p,skewX:d,skewY:m}=n;l&&(s=`perspective(${l}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),p&&(s+=`rotateY(${p}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(s+=`scale(${a}, ${u})`),s||"none"}const Nl=gn.length,ys=t=>typeof t=="string"?parseFloat(t):t,vs=t=>typeof t=="number"||T.test(t);function Ul(t,e,n,s,i,r){i?(t.opacity=C(0,n.opacity??1,Wl(s)),t.opacityExit=C(e.opacity??1,0,Kl(s))):r&&(t.opacity=C(e.opacity??1,n.opacity??1,s));for(let o=0;o<Nl;o++){const a=gn[o];let u=xs(e,a),l=xs(n,a);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||vs(u)===vs(l)?(t[a]=Math.max(C(ys(u),ys(l),s),0),(J.test(l)||J.test(u))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function xs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Wl=ao(0,.5,Qs),Kl=ao(.5,.95,z);function ao(t,e,n){return s=>s<t?0:s>e?1:n(Et(t,e,s))}function Hl(t,e,n){const s=O(t)?t:Tt(t);return s.start(dn("",s,e,n)),s.animation}function kt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const zl=(t,e)=>t.depth-e.depth;class Gl{constructor(){this.children=[],this.isDirty=!1}add(e){Qe(this.children,e),this.isDirty=!0}remove(e){qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(zl),this.isDirty=!1,this.children.forEach(e)}}function $l(t,e){const n=j.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(it(s),t(r-e))};return M.setup(s,!0),()=>it(s)}function Xt(t){return O(t)?t.get():t}class _l{constructor(){this.members=[]}add(e){Qe(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(qt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(qt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ve=["","X","Y","Z"],Xl=1e3;let Yl=0;function xe(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function lo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ei(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&lo(s)}function uo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=Yl++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Jl),this.nodes.forEach(iu),this.nodes.forEach(ou),this.nodes.forEach(Ql)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Gl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new en),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const u=this.eventHandlers.get(o);u&&u.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=xn(o)&&!Za(o),this.instance=o;const{layoutId:a,layout:u,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,c&&c(),c=$l(f,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ps)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const d=this.options.transition||l.getDefaultTransition()||cu,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=l.getProps(),y=!this.targetLayout||!ro(this.targetLayout,p),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...fn(d,"layout"),onPlay:m,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x,v.path)}else h||Ps(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),it(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ru),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&lo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(eu),this.nodes.forEach(Ts);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ws);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nu),this.nodes.forEach(su),this.nodes.forEach(ql),this.nodes.forEach(Zl)):this.nodes.forEach(ws),this.clearAllSnapshots();const a=j.now();I.delta=Q(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,ce.update.process(I),ce.preRender.process(I),ce.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tu),this.sharedNodes.forEach(au)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!N(this.snapshot.measuredBox.x)&&!N(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=k()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!oo(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||ut(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return o&&(u=this.removeTransform(u)),hu(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return k();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(fu))){const{scroll:l}=this.root;l&&(Z(a.x,l.offset.x),Z(a.y,l.offset.y))}return a}removeElementScroll(o){const a=k();if(G(a,o),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){const l=this.path[u],{scroll:c,options:h}=l;l!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&G(a,o),Z(a.x,c.offset.x),Z(a.y,c.offset.y))}return a}applyTransform(o,a=!1,u){const l=u||k();G(l,o);for(let c=0;c<this.path.length;c++){const h=this.path[c];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Z(l.x,-h.scroll.offset.x),Z(l.y,-h.scroll.offset.y)),ut(h.latestValues)&&_t(l,h.latestValues,h.layout?.layoutBox)}return ut(this.latestValues)&&_t(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(o){const a=k();G(a,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!ut(l.latestValues))continue;let c;l.instance&&($e(l.latestValues)&&l.updateSnapshot(),c=k(),G(c,l.measurePageBox())),hs(a,l.latestValues,l.snapshot?.layoutBox,c)}return ut(this.latestValues)&&hs(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kl(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):G(this.target,this.layout.layoutBox),_i(this.target,this.targetDelta)):G(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||$e(this.parent.latestValues)||$i(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,u){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),ie(this.relativeTargetOrigin,a,u,this.options.layoutAnchor||void 0),G(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===I.timestamp&&(u=!1),u)return;const{layout:l,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||c))return;G(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;ll(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=k());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(os(this.prevProjectionDelta.x,this.projectionDelta.x),os(this.prevProjectionDelta.y,this.projectionDelta.y)),Mt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!gs(this.projectionDelta.x,this.prevProjectionDelta.x)||!gs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1,u){const l=this.snapshot,c=l?l.latestValues:{},h={...this.latestValues},f=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=k(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,y=this.getStack(),x=!y||y.members.length<=1,v=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(uu));this.animationProgress=0;let w;const A=u?.interpolateProjection(o);this.mixTargetDelta=D=>{const V=D/1e3,b=A?.(V);b?(f.x.translate=b.x,f.x.scale=C(o.x.scale,1,V),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=b.y,f.y.scale=C(o.y.scale,1,V),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(Ss(f.x,o.x,V),Ss(f.y,o.y,V)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ie(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),lu(this.relativeTarget,this.relativeTargetOrigin,p,V),w&&Ol(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=k()),G(w,this.relativeTarget)),g&&(this.animationValues=h,Ul(h,c,this.latestValues,V,v,x)),b&&b.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=b.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(it(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Hl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:u,layout:l,latestValues:c}=o;if(!(!a||!u||!l)){if(this!==o&&this.layout&&l&&co(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||k();const h=N(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+h;const f=N(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+f}G(a,u),_t(a,c),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new _l),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const l={};u.z&&xe("z",o,l,this.animationValues);for(let c=0;c<ve.length;c++)xe(`rotate${ve[c]}`,o,l,this.animationValues),xe(`skew${ve[c]}`,o,l,this.animationValues);o.render();for(const c in l)o.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Xt(a?.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Xt(a?.pointerEvents)||""),this.hasProjected&&!ut(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=l.animationValues||l.latestValues;this.applyTransformsToTarget();let h=jl(this.projectionDeltaWithTransform,this.treeScale,c);u&&(h=u(c,h)),o.transform=h;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,l.animationValues?o.opacity=l===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=l===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const d in Xe){if(c[d]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=Xe[d],x=h==="none"?c[d]:m(c[d],l);if(g){const v=g.length;for(let w=0;w<v;w++)o[g[w]]=x}else y?this.options.visualElement.renderState.vars[d]=x:o[d]=x}this.options.layoutId&&(o.pointerEvents=l===this?Xt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Ts),this.root.sharedNodes.clear()}}}function ql(t){t.updateLayout()}function Zl(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;if(i==="size")q(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],f=N(h);h.min=n[c].min,h.max=h.min+f});else if(i==="x"||i==="y"){const c=i==="x"?"y":"x";Ye(r?e.measuredBox[c]:e.layoutBox[c],n[c])}else co(i,e.layoutBox,n)&&q(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],f=N(n[c]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+f)});const o=vt();Mt(o,n,e.layoutBox);const a=vt();r?Mt(a,t.applyTransform(s,!0),e.measuredBox):Mt(a,n,e.layoutBox);const u=!oo(o);let l=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const p=t.options.layoutAnchor||void 0,d=k();ie(d,e.layoutBox,h.layoutBox,p);const m=k();ie(m,n,f.layoutBox,p),ro(d,m)||(l=!0),c.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Jl(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Ql(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tu(t){t.clearSnapshot()}function Ts(t){t.clearMeasurements()}function eu(t){t.isLayoutDirty=!0,t.updateLayout()}function ws(t){t.isLayoutDirty=!1}function nu(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function su(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ps(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function iu(t){t.resolveTargetDelta()}function ou(t){t.calcProjection()}function ru(t){t.resetSkewAndRotation()}function au(t){t.removeLeadSnapshot()}function Ss(t,e,n){t.translate=C(e.translate,0,n),t.scale=C(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function bs(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function lu(t,e,n,s){bs(t.x,e.x,n.x,s),bs(t.y,e.y,n.y,s)}function uu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const cu={duration:.45,ease:[.4,0,.1,1]},As=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vs=As("applewebkit/")&&!As("chrome/")?Math.round:z;function Cs(t){t.min=Vs(t.min),t.max=Vs(t.max)}function hu(t){Cs(t.x),Cs(t.y)}function co(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ll(ms(e),ms(n),.2)}function fu(t){return t!==t.root&&t.scroll?.wasRoot}const du=uo({attachResizeListener:(t,e)=>kt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Te={current:void 0},ho=uo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Te.current){const t=new du({});t.mount(window),t.setOptions({layoutScroll:!0}),Te.current=t}return Te.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),fo=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function pu(t=!0){const e=P.useContext(Je);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=P.useId();P.useEffect(()=>{if(t)return i(r)},[t]);const o=P.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const po=P.createContext({strict:!1}),Ms={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Ds=!1;function mu(){if(Ds)return;const t={};for(const e in Ms)t[e]={isEnabled:n=>Ms[e].some(s=>!!n[s])};Hi(t),Ds=!0}function mo(){return mu(),il()}function gu(t){const e=mo();for(const n in t)e[n]={...e[n],...t[n]};Hi(e)}const yu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function oe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||yu.has(t)}let go=t=>!oe(t);function vu(t){typeof t=="function"&&(go=e=>e.startsWith("on")?!oe(e):t(e))}try{vu(require("@emotion/is-prop-valid").default)}catch{}function xu(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||O(t[i])||(go(i)||n===!0&&oe(i)||!e&&!oe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const ue=P.createContext({});function Tu(t,e){if(le(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Lt(n)?n:void 0,animate:Lt(s)?s:void 0}}return t.inherit!==!1?e:{}}function wu(t){const{initial:e,animate:n}=Tu(t,P.useContext(ue));return P.useMemo(()=>({initial:e,animate:n}),[Es(e),Es(n)])}function Es(t){return Array.isArray(t)?t.join(" "):t}const bn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yo(t,e,n){for(const s in e)!O(e[s])&&!qi(s,n)&&(t[s]=e[s])}function Pu({transformTemplate:t},e){return P.useMemo(()=>{const n=bn();return Pn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Su(t,e){const n=t.style||{},s={};return yo(s,n,t),Object.assign(s,Pu(t,e)),s}function bu(t,e){const n={},s=Su(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const vo=()=>({...bn(),attrs:{}});function Au(t,e,n,s){const i=P.useMemo(()=>{const r=vo();return Zi(r,e,Qi(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};yo(r,t.style,t),i.style={...r,...i.style}}return i}const Vu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function An(t){return typeof t!="string"||t.includes("-")?!1:!!(Vu.indexOf(t)>-1||/[A-Z]/u.test(t))}function Cu(t,e,n,{latestValues:s},i,r=!1,o){const u=(o??An(t)?Au:bu)(e,s,i,t),l=xu(e,typeof t=="string",r),c=t!==P.Fragment?{...l,...u,ref:n}:{},{children:h}=e,f=P.useMemo(()=>O(h)?h.get():h,[h]);return P.createElement(t,{...c,children:f})}function Mu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Du(n,s,i,t),renderState:e()}}function Du(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Xt(r[f]);let{initial:o,animate:a}=t;const u=le(t),l=Wi(t);e&&l&&!u&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!ae(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const d=pn(t,f[p]);if(d){const{transitionEnd:m,transition:g,...y}=d;for(const x in y){let v=y[x];if(Array.isArray(v)){const w=c?v.length-1:0;v=v[w]}v!==null&&(i[x]=v)}for(const x in m)i[x]=m[x]}}}return i}const xo=t=>(e,n)=>{const s=P.useContext(ue),i=P.useContext(Je),r=()=>Mu(t,e,s,i);return n?r():Co(r)},Eu=xo({scrapeMotionValuesFromProps:Sn,createRenderState:bn}),Ru=xo({scrapeMotionValuesFromProps:to,createRenderState:vo}),Lu=Symbol.for("motionComponentSymbol");function ku(t,e,n){const s=P.useRef(n);P.useInsertionEffect(()=>{s.current=n});const i=P.useRef(null);return P.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const o=s.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[e])}const To=P.createContext({});function mt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Bu(t,e,n,s,i,r){const{visualElement:o}=P.useContext(ue),a=P.useContext(po),u=P.useContext(Je),l=P.useContext(fo),c=l.reducedMotion,h=l.skipAnimations,f=P.useRef(null),p=P.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const d=f.current,m=P.useContext(To);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Fu(f.current,n,i,m);const g=P.useRef(!1);P.useInsertionEffect(()=>{d&&g.current&&d.update(n,u)});const y=n[Di],x=P.useRef(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Do(()=>{p.current=!0,d&&(g.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),x.current&&d.animationState&&d.animationState.animateChanges())}),P.useEffect(()=>{d&&(!x.current&&d.animationState&&d.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),d.enteringChildren=void 0)}),d}function Fu(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:u,layoutRoot:l,layoutAnchor:c,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:wo(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&mt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:u,layoutRoot:l,layoutAnchor:c})}function wo(t){if(t)return t.options.allowProjection!==!1?t.projection:wo(t.parent)}function we(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&gu(s);const r=n?n==="svg":An(t),o=r?Ru:Eu;function a(l,c){let h;const f={...P.useContext(fo),...l,layoutId:Iu(l)},{isStatic:p}=f,d=wu(l),m=o(l,p);if(!p&&typeof window<"u"){Ou();const g=ju(f);h=g.MeasureLayout,d.visualElement=Bu(t,m,f,i,g.ProjectionNode,r)}return Ve.jsxs(ue.Provider,{value:d,children:[h&&d.visualElement?Ve.jsx(h,{visualElement:d.visualElement,...f}):null,Cu(t,l,ku(m,d.visualElement,c),m,p,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const u=P.forwardRef(a);return u[Lu]=t,u}function Iu({layoutId:t}){const e=P.useContext(Ws).id;return e&&t!==void 0?e+"-"+t:t}function Ou(t,e){P.useContext(po).strict}function ju(t){const e=mo(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Nu(t,e){if(typeof Proxy>"u")return we;const n=new Map,s=(r,o)=>we(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,we(o,void 0,t,e)),n.get(o))})}const Uu=(t,e)=>e.isSVG??An(t)?new wl(e):new ml(e,{allowProjection:t!==P.Fragment});class Wu extends ot{constructor(e){super(e),e.animationState||(e.animationState=Vl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ae(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Ku=0;class Hu extends ot{constructor(){super(...arguments),this.id=Ku++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:r,custom:o}=this.node.getProps();if(typeof r=="string"||typeof r=="object"&&r!==null&&!Array.isArray(r)){const a=dt(this.node,r,o);if(a){const{transition:u,transitionEnd:l,...c}=a;for(const h in c)this.node.getValue(h)?.jump(c[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const zu={animation:{Feature:Wu},exit:{Feature:Hu}};function Ot(t){return{point:{x:t.pageX,y:t.pageY}}}const Gu=t=>e=>vn(e)&&t(e,Ot(e));function Dt(t,e,n,s){return kt(t,e,Gu(n),s)}const Po=({current:t})=>t?t.ownerDocument.defaultView:null,Rs=(t,e)=>Math.abs(t-e);function $u(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Ls=new Set(["auto","scroll"]);class So{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ut(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Pe(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=$u(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:y}=d,{timestamp:x}=I;this.history.push({...y,timestamp:x});const{onStart:v,onMove:w}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Ut(m,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Pe(d.type==="pointercancel"?this.lastMoveEventInfo:Ut(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,v),y&&y(d,v)},!vn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const u=Ot(e),l=Ut(u,this.transformPagePoint),{point:c}=l,{timestamp:h}=I;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Pe(l,this.history));const p={passive:!0,capture:!0};this.removeListeners=Bt(Dt(this.contextWindow,"pointermove",this.handlePointerMove,p),Dt(this.contextWindow,"pointerup",this.handlePointerUp,p),Dt(this.contextWindow,"pointercancel",this.handlePointerUp,p)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Ls.has(s.overflowX)||Ls.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),M.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),it(this.updatePoint)}}function Ut(t,e){return e?{point:e(t.point)}:t}function ks(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Pe({point:t},e){return{point:t,delta:ks(t,bo(e)),offset:ks(t,_u(e)),velocity:Xu(e,.1)}}function _u(t){return t[0]}function bo(t){return t[t.length-1]}function Xu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=bo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>W(e)*2&&(s=t[1]);const r=H(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Yu(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?C(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?C(n,t,s.max):Math.min(t,n)),t}function Bs(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function qu(t,{top:e,left:n,bottom:s,right:i}){return{x:Bs(t.x,n,i),y:Bs(t.y,e,s)}}function Fs(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Zu(t,e){return{x:Fs(t.x,e.x),y:Fs(t.y,e.y)}}function Ju(t,e){let n=.5;const s=N(t),i=N(e);return i>s?n=Et(e.min,e.max-s,t.min):s>i&&(n=Et(t.min,t.max-i,e.min)),Q(0,1,n)}function Qu(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const qe=.35;function tc(t=qe){return t===!1?t=0:t===!0&&(t=qe),{x:Is(t,"left","right"),y:Is(t,"top","bottom")}}function Is(t,e,n){return{min:Os(t,e),max:Os(t,n)}}function Os(t,e){return typeof t=="number"?t:t[e]||0}const ec=new WeakMap;class nc{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=k(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(Ot(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:p,dragPropagation:d,onDragStart:m}=this.getProps();if(p&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ba(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),q(y=>{let x=this.getAxisMotionValue(y).get()||0;if(J.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[y];w&&(x=N(w)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&M.update(()=>m(h,f),!1,!0),Ue(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:d,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(d&&this.currentDirection===null){this.currentDirection=ic(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&M.update(()=>g(h,f),!1,!0)},u=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new So(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:u,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Po(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&M.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Wt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Yu(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&mt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=qu(s.layoutBox,e):this.constraints=!1,this.elastic=tc(n),i!==this.constraints&&!mt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&q(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Qu(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!mt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const r=ul(s,i.root,this.visualElement.getTransformPagePoint());let o=Zu(i.layout.layoutBox,r);if(n){const a=n(rl(o));this.hasMutatedConstraints=!!a,a&&(o=Gi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},l=q(c=>{if(!Wt(c,n,this.currentDirection))return;let h=u&&u[c]||{};(o===!0||o===c)&&(h={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,d={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ue(this.visualElement,e),s.start(dn(e,s,0,n,this.visualElement,!1))}stopAnimation(){q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){q(n=>{const{drag:s}=this.getProps();if(!Wt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],u=r.get()||0;r.set(e[n]-C(o,a,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!mt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};q(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const u=a.get();i[o]=Ju({min:u,max:u},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),q(o=>{if(!Wt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:u,max:l}=this.constraints[o];a.set(C(u,l,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ec.set(this.visualElement,this);const e=this.visualElement.current,n=Dt(e,"pointerdown",l=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=l.target,p=f!==e&&Ua(f);c&&h&&!p&&this.start(l)});let s;const i=()=>{const{dragConstraints:l}=this.getProps();mt(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),s||(s=sc(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M.read(i);const a=kt(window,"resize",()=>this.scalePositionWithinConstraints()),u=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(q(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=l[h].translate,f.set(f.get()+l[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),u&&u(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=qe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function js(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function sc(t,e,n){const s=_n(t,js(n)),i=_n(e,js(n));return()=>{s(),i()}}function Wt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ic(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class oc extends ot{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new nc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Se=t=>(e,n)=>{t&&M.update(()=>t(e,n),!1,!0)};class rc extends ot{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new So(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Po(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Se(e),onStart:Se(n),onMove:Se(s),onEnd:(r,o)=>{delete this.session,i&&M.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Dt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let be=!1;class ac extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),be&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Yt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),be=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),yn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;be=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Ao(t){const[e,n]=pu(),s=P.useContext(Ws);return Ve.jsx(ac,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(To),isPresent:e,safeToRemove:n})}const lc={pan:{Feature:rc},drag:{Feature:oc,ProjectionNode:ho,MeasureLayout:Ao}};function Ns(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&M.postRender(()=>r(e,Ot(e)))}class uc extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=Ia(e,(n,s)=>(Ns(this.node,s,"Start"),i=>Ns(this.node,i,"End"))))}unmount(){}}class cc extends ot{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Bt(kt(this.node.current,"focus",()=>this.onFocus()),kt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Us(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&M.postRender(()=>r(e,Ot(e)))}class hc extends ot{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Ka(e,(i,r)=>(Us(this.node,r,"Start"),(o,{success:a})=>Us(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Ze=new WeakMap,Ae=new WeakMap,fc=t=>{const e=Ze.get(t.target);e&&e(t)},dc=t=>{t.forEach(fc)};function pc({root:t,...e}){const n=t||document;Ae.has(n)||Ae.set(n,{});const s=Ae.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(dc,{root:t,...e})),s[i]}function mc(t,e,n){const s=pc(e);return Ze.set(t,n),s.observe(t),()=>{Ze.delete(t),s.unobserve(t)}}const gc={some:0,all:1};class yc extends ot{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:gc[i]},a=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,r&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=l?c:h;f&&f(u)};this.stopObserver=mc(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(vc(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function vc({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const xc={inView:{Feature:yc},tap:{Feature:hc},focus:{Feature:cc},hover:{Feature:uc}},Tc={layout:{ProjectionNode:ho,MeasureLayout:Ao}},wc={...zu,...xc,...lc,...Tc},Pc=Nu(wc,Uu),Vc=Pc;export{xn as A,Za as B,tl as C,Hl as D,Ri as E,Qt as F,ml as H,te as J,Ws as L,fo as M,Je as P,wl as S,ol as V,ka as a,Do as b,pu as c,Sr as d,Tt as e,it as f,M as g,Ki as h,sl as i,Un as j,Fo as k,k as l,Vc as m,C as n,qt as o,Ge as p,O as q,Ii as r,Ar as s,pr as t,Co as u,br as v,Ys as w,wi as x,W as y,Et as z};
@@ -0,0 +1 @@
1
+ import{k as l,J as u}from"./__vite-browser-external-DWKjPxnU.js";const f=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],k=l("search",f),c="tokentracker-skills";async function r(e){const t=new URL(`/functions/${c}`,window.location.origin);if(e)for(const[i,s]of Object.entries(e))s!=null&&s!==""&&t.searchParams.set(i,String(s));const o=await fetch(t.toString(),{headers:{Accept:"application/json"},cache:"no-store"}),a=await o.json().catch(()=>null);if(!o.ok)throw new Error(a?.error||`Request failed with HTTP ${o.status}`);return a}async function n(e){const t=await u(),o=await fetch(`/functions/${c}`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...t},cache:"no-store",body:JSON.stringify(e)}),a=await o.json().catch(()=>null);if(!o.ok||a?.ok===!1)throw new Error(a?.error||`Request failed with HTTP ${o.status}`);return a}function p(){return r({mode:"installed"})}function h(e={}){return r({mode:"discover",...e.force?{force:1}:{}})}function S(e,t=0,o=20){return r({mode:"search",q:e,offset:t,limit:o})}function m(){return r({mode:"repos"})}function g(e,t){return n({action:"install",skill:e,targets:t})}function w(e){return n({action:"uninstall",id:e})}function y(e){return n({action:"restore",id:e})}function j(e,t){return n({action:"set_targets",id:e,targets:t})}function _(e,t){return n({action:"import_local",directory:e,targets:t})}function T(e,t){return n({action:"delete_local",directory:e,targets:t||[]})}function L(e){return n({action:"add_repo",repo:e})}function R(e,t){return n({action:"remove_repo",owner:e,name:t})}function v(e={}){return r({mode:"popular",...e.force?{force:1}:{}})}function P(e={}){return r({mode:"updates",...e.force?{force:1}:{}})}function A(e={}){return r({mode:"skill_usage",...e.force?{force:1}:{}})}export{k as S,m as a,v as b,P as c,h as d,A as e,T as f,p as g,j as h,g as i,_ as j,R as k,L as l,y as r,S as s,w as u};
@@ -1 +1 @@
1
- import{k as t}from"./__vite-browser-external-Djkun5S2.js";const a=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],i=t("maximize-2",a);const e=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],m=t("terminal",e);export{i as M,m as T};
1
+ import{k as t}from"./__vite-browser-external-DWKjPxnU.js";const a=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],i=t("maximize-2",a);const e=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],m=t("terminal",e);export{i as M,m as T};
@@ -1 +1 @@
1
- import{k as a}from"./__vite-browser-external-Djkun5S2.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};
1
+ import{k as a}from"./__vite-browser-external-DWKjPxnU.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};
@@ -1 +1 @@
1
- import{r as p,g as N,a as M}from"./__vite-browser-external-Djkun5S2.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
+ import{r as p,g as N,b as M}from"./__vite-browser-external-DWKjPxnU.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,o as D,p as K,q as j,t as J}from"./__vite-browser-external-Djkun5S2.js";import{L as q}from"./limits-providers-DkoPB8B2.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
+ import{r as a,o as D,p as K,q as j,t as J}from"./__vite-browser-external-DWKjPxnU.js";import{L as q}from"./limits-providers-8NsMiLNP.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{j as a,b as x,r as o,S as g,U as m,q as b,t as u,p as f,M as h}from"./__vite-browser-external-Djkun5S2.js";import{C as y}from"./Card-D479hjUR.js";function j({checked:s,onChange:t,disabled:e,ariaLabel:r}){return a.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":r,onClick:t,disabled:e,className:x("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:opacity-50 disabled:cursor-not-allowed",s?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:a.jsx("span",{className:x("inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",s?"translate-x-[18px]":"translate-x-[3px]")})})}function k({label:s,hint:t,control:e}){return a.jsxs("div",{className:"flex items-center justify-between gap-4 py-3",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:s}),t?a.jsx("div",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:t}):null]}),a.jsx("div",{className:"shrink-0",children:e})]})}function N({title:s,subtitle:t,action:e,children:r}){return a.jsxs(y,{children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h2",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:s}),t?a.jsx("p",{className:"mt-1 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:t}):null]}),e?a.jsx("div",{className:"shrink-0",children:e}):null]}),a.jsx("div",{className:"-mb-3 divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:r})]})}function w({options:s,value:t,onChange:e,disabled:r=!1}){return a.jsx("div",{className:"inline-flex items-center rounded-lg border border-oai-gray-200 bg-oai-gray-50 p-0.5 dark:border-oai-gray-800 dark:bg-oai-gray-900",children:s.map(({value:l,label:d,Icon:i})=>{const n=t===l;return a.jsxs("button",{type:"button",onClick:()=>e(l),"aria-pressed":n,disabled:r,className:x("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",n?"bg-white text-oai-black shadow-sm dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-500 hover:text-oai-black dark:text-oai-gray-400 dark:hover:text-white"),children:[i?a.jsx(i,{className:"h-3.5 w-3.5","aria-hidden":!0}):null,a.jsx("span",{children:d})]},l)})})}function S(){const[s,t]=o.useState(null),e=g()&&m();o.useEffect(()=>{if(!e)return;const i=b(n=>t(n));return u(),i},[e]);const r=o.useCallback((i,n)=>{e&&(t(c=>c&&{...c,[i]:n}),f(i,n))},[e]),l=o.useCallback(i=>{e&&h(i)},[e]),d=o.useCallback(()=>{e&&u()},[e]);return{available:e,settings:s,setSetting:r,runAction:l,refresh:d}}export{w as S,j as T,N as a,k as b,S as u};
1
+ import{j as a,d as x,r as o,P as g,Q as m,q as b,t as u,p as f,K as h}from"./__vite-browser-external-DWKjPxnU.js";import{C as y}from"./Card-DX2Wwm9U.js";function j({checked:s,onChange:t,disabled:e,ariaLabel:r}){return a.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-label":r,onClick:t,disabled:e,className:x("relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-oai-brand-500 disabled:opacity-50 disabled:cursor-not-allowed",s?"bg-oai-brand-500":"bg-oai-gray-300 dark:bg-oai-gray-700"),children:a.jsx("span",{className:x("inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform",s?"translate-x-[18px]":"translate-x-[3px]")})})}function k({label:s,hint:t,control:e}){return a.jsxs("div",{className:"flex items-center justify-between gap-4 py-3",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm text-oai-gray-900 dark:text-oai-gray-200",children:s}),t?a.jsx("div",{className:"mt-0.5 text-xs text-oai-gray-500 dark:text-oai-gray-400",children:t}):null]}),a.jsx("div",{className:"shrink-0",children:e})]})}function N({title:s,subtitle:t,action:e,children:r}){return a.jsxs(y,{children:[a.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("h2",{className:"text-sm font-medium text-oai-gray-500 dark:text-oai-gray-300 uppercase tracking-wide",children:s}),t?a.jsx("p",{className:"mt-1 truncate text-xs text-oai-gray-500 dark:text-oai-gray-400",children:t}):null]}),e?a.jsx("div",{className:"shrink-0",children:e}):null]}),a.jsx("div",{className:"-mb-3 divide-y divide-oai-gray-200/60 dark:divide-oai-gray-800/60",children:r})]})}function w({options:s,value:t,onChange:e,disabled:r=!1}){return a.jsx("div",{className:"inline-flex items-center rounded-lg border border-oai-gray-200 bg-oai-gray-50 p-0.5 dark:border-oai-gray-800 dark:bg-oai-gray-900",children:s.map(({value:l,label:d,Icon:i})=>{const n=t===l;return a.jsxs("button",{type:"button",onClick:()=>e(l),"aria-pressed":n,disabled:r,className:x("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",n?"bg-white text-oai-black shadow-sm dark:bg-oai-gray-800 dark:text-white":"text-oai-gray-500 hover:text-oai-black dark:text-oai-gray-400 dark:hover:text-white"),children:[i?a.jsx(i,{className:"h-3.5 w-3.5","aria-hidden":!0}):null,a.jsx("span",{children:d})]},l)})})}function S(){const[s,t]=o.useState(null),e=g()&&m();o.useEffect(()=>{if(!e)return;const i=b(n=>t(n));return u(),i},[e]);const r=o.useCallback((i,n)=>{e&&(t(c=>c&&{...c,[i]:n}),f(i,n))},[e]),l=o.useCallback(i=>{e&&h(i)},[e]),d=o.useCallback(()=>{e&&u()},[e]);return{available:e,settings:s,setSetting:r,runAction:l,refresh:d}}export{w as S,j as T,N as a,k as b,S as u};
@@ -1,4 +1,4 @@
1
- import{r as c,R as P,a0 as Oe}from"./__vite-browser-external-Djkun5S2.js";function In(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function wt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:wt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Vt(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:wt(e)?mt(e)?e:Be(e)||Vt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function yt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Mn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ke(e){const t=yt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ht(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function qt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,a)=>{const s=Object.entries(a);for(const[l,u]of s){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=qt(1),ze=qt(-1);function An(e){return"clientX"in e&&"clientY"in e}function xt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function On(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function gt(e){if(On(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return An(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Nt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Tn(e){return e.matches(Nt)?e:e.querySelector(Nt)}const Nn={display:"none"};function Ln(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:Nn},n)}function kn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function zn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Gt=c.createContext(null);function Pn(e){const t=c.useContext(Gt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Bn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(a=>{var s;return(s=a[o])==null?void 0:s.call(a,i)})},[e]),t]}const Fn={draggable:`
1
+ import{r as c,R as P,Z as Oe}from"./__vite-browser-external-DWKjPxnU.js";function In(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function me(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function wt(e){return"nodeType"in e}function B(e){var t,n;return e?me(e)?e:wt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function mt(e){const{Document:t}=B(e);return e instanceof t}function Be(e){return me(e)?!1:e instanceof B(e).HTMLElement}function Vt(e){return e instanceof B(e).SVGElement}function ye(e){return e?me(e)?e.document:wt(e)?mt(e)?e:Be(e)||Vt(e)?e.ownerDocument:document:document:document}const Q=tt?c.useLayoutEffect:c.useEffect;function yt(e){const t=c.useRef(e);return Q(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Mn(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ke(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ke(e){const t=yt(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function ht(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let ct={};function $e(e,t){return c.useMemo(()=>{if(t)return t;const n=ct[e]==null?0:ct[e]+1;return ct[e]=n,e+"-"+n},[e,t])}function qt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,a)=>{const s=Object.entries(a);for(const[l,u]of s){const f=i[l];f!=null&&(i[l]=f+e*u)}return i},{...t})}}const we=qt(1),ze=qt(-1);function An(e){return"clientX"in e&&"clientY"in e}function xt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function On(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function gt(e){if(On(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return An(e)?{x:e.clientX,y:e.clientY}:null}const _e=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_e.Translate.toString(e),_e.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Nt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Tn(e){return e.matches(Nt)?e:e.querySelector(Nt)}const Nn={display:"none"};function Ln(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:Nn},n)}function kn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function zn(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Gt=c.createContext(null);function Pn(e){const t=c.useContext(Gt);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Bn(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:i}=r;e.forEach(a=>{var s;return(s=a[o])==null?void 0:s.call(a,i)})},[e]),t]}const Fn={draggable:`
2
2
  To pick up a draggable item, press the space bar.
3
3
  While dragging, use the arrow keys to move the item.
4
4
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -0,0 +1 @@
1
+ import{r as o}from"./__vite-browser-external-DWKjPxnU.js";import{h as r,i as t,p as s}from"./react-Nv3-bJyw.js";function i(){!r.current&&t();const[e]=o.useState(s.current);return e}export{i as u};