tokentracker-cli 1.3.15 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/{AchievementBadge-CSXb26DC.js → AchievementBadge-DWECUOAX.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-Bs6vIpd0.js → AchievementsPage-Bakfwwn_.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-BO4u-574.js → AchievementsSection-DiEX2_5U.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-ic60vrZX.js → BadgeDetailModal-ClVMnxVW.js} +1 -1
- package/dashboard/dist/assets/{BotAnimated-BHHAUEQL.js → BotAnimated-D7eyrAPs.js} +1 -1
- package/dashboard/dist/assets/{Card-8t2FYLJV.js → Card-CsAQxZZ8.js} +1 -1
- package/dashboard/dist/assets/{CloudCheckoutPage-CXaDDial.js → CloudCheckoutPage-BAN-DtXB.js} +1 -1
- package/dashboard/dist/assets/{CloudPage-DN6s_UrT.js → CloudPage-D9sNlUAy.js} +2 -2
- package/dashboard/dist/assets/{CommandPalette-D7dHMpHK.js → CommandPalette-D9TNT6un.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-C55r20Vb.js → CommunityStatsModal-CotRRQNH.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-jSEqSSnW.js → ConfirmModal-C_il5anp.js} +1 -1
- package/dashboard/dist/assets/{Controls-CqmoR37l.js → Controls-Bd1kODP4.js} +1 -1
- package/dashboard/dist/assets/DashboardPage-De0EL8Hn.js +1 -0
- package/dashboard/dist/assets/{DateRangePopover-z89rKqjK.js → DateRangePopover-quw6hpxy.js} +1 -1
- package/dashboard/dist/assets/DevicePage-CP20lVYv.js +1 -0
- package/dashboard/dist/assets/{DialogClose-imfpTM8a.js → DialogClose-BEUL9bD6.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-DpkD2qwW.js +1 -0
- package/dashboard/dist/assets/DialogTitle-C--sXGjf.js +1 -0
- package/dashboard/dist/assets/{ElectricLogo-CrnDjhtG.js → ElectricLogo-DhP7S1Cu.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-CAr2EMcK.js → FadeIn-BPH15_jE.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-UK7qFFNh.js → HeaderGithubStar-DziE8s6w.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-fs1HBOXB.js → HoverTooltip-tQyY2CuV.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-Bk-MlPWf.js → IpCheckPage-BjoB05O7.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-DJnPCdqP.js → LandingPage-Cav49COr.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardPage-wVjwsqyc.js → LeaderboardPage-CHjFKLvs.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProBadge-BaQdHu06.js → LeaderboardProBadge-D97MfK5W.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardProfileModal-D5ZZtIPl.js → LeaderboardProfileModal-NNTwtWSu.js} +3 -3
- package/dashboard/dist/assets/{LeaderboardProfilePage-BZsBL2jT.js → LeaderboardProfilePage-xI81GH3D.js} +1 -1
- package/dashboard/dist/assets/{LimitsPage-Cks_mKSL.js → LimitsPage-BPOo3FOW.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-DLnC_Tq4.js → LocalOnlyNotice-j8Tijts2.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-FXZbjmOY.js → LoginCard-C7_n6J7k.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-_R-0ZtpQ.js → LoginModal-DwlNscw5.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-MzDRyv1Q.js → LoginPage-BqhWatt2.js} +1 -1
- package/dashboard/dist/assets/{PetPage-DJ58EiPT.js → PetPage-CJlC0V0i.js} +2 -2
- package/dashboard/dist/assets/PopoverPopup-wleZ4DTI.js +1 -0
- package/dashboard/dist/assets/{ProviderIcon-xSNRuia-.js → ProviderIcon-biLVsOGr.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-BcVcWbsW.js → ResetPasswordPage-5Sl45OsN.js} +1 -1
- package/dashboard/dist/assets/Select-77l2QNqa.js +1 -0
- package/dashboard/dist/assets/SelectItemText-BQbmtjd3.js +1 -0
- package/dashboard/dist/assets/{SelfHostPage-BLocCkUo.js → SelfHostPage-C8hlgVu4.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-CzMjS7EQ.js → ServiceStatusPage-DrY9Mef8.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-Dqzuthrd.js → SessionsPage-BDTsH3Mk.js} +2 -2
- package/dashboard/dist/assets/SettingsPage-C_id9Go3.js +5 -0
- package/dashboard/dist/assets/SkillsPage-kb6_5uUk.js +1 -0
- package/dashboard/dist/assets/{TokenGalaxy-B2sMNsM0.js → TokenGalaxy-BoS0yUFS.js} +1 -1
- package/dashboard/dist/assets/TooltipPopup-LV1aWIRZ.js +1 -0
- package/dashboard/dist/assets/{TrendMonitor-DpMcMWVh.js → TrendMonitor-DN-nwcSA.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-aKfztwsk.js → WidgetsPage-C6lvwceS.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-NoY2hqbF.js → WrappedPage-CfC39wWP.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-kAUz3kFs.css → __vite-browser-external-B0m8a6Te.css} +1 -1
- package/dashboard/dist/assets/__vite-browser-external-DpZbUcLL.js +45 -0
- package/dashboard/dist/assets/{agent-logos-Oh8CLAYk.js → agent-logos-CvcdCGj5.js} +1 -1
- package/dashboard/dist/assets/{arrow-left-Mwggxctm.js → arrow-left-BX4LX5TF.js} +1 -1
- package/dashboard/dist/assets/{arrow-right-Crx-kuck.js → arrow-right-Aktjo2RL.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-uwoo8I0B.js → arrow-up-right-kkQt6Du0.js} +1 -1
- package/dashboard/dist/assets/{calendar-days-C6MeKaqh.js → calendar-days-OvLTNZBH.js} +1 -1
- package/dashboard/dist/assets/{check-dsWQRYNj.js → check-v5Ie379p.js} +1 -1
- package/dashboard/dist/assets/{chevron-down-BIf5bhyB.js → chevron-down-CPlz1cYW.js} +1 -1
- package/dashboard/dist/assets/{cloud-checkout-GnFRQdnr.js → cloud-checkout-C_Rhiwno.js} +1 -1
- package/dashboard/dist/assets/composite-DD_boZdD.js +1 -0
- package/dashboard/dist/assets/{download-B7eyvOxn.js → download-NqHXZ-zn.js} +1 -1
- package/dashboard/dist/assets/{external-link-RNTsFDG4.js → external-link-B0D03J0f.js} +1 -1
- package/dashboard/dist/assets/{flame-uwCJ6brb.js → flame-av87we58.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-Bf7JxB4E.js → format-tokens-B43Ehkbb.js} +1 -1
- package/dashboard/dist/assets/{gift-BY7kCGBK.js → gift-CZus7M21.js} +1 -1
- package/dashboard/dist/assets/{host-mode-Bs-UHw-7.js → host-mode-Dd9fzAdq.js} +1 -1
- package/dashboard/dist/assets/{icons-CrLu8vlW.js → icons-CnScwnf_.js} +1 -1
- package/dashboard/dist/assets/{index-CXQag63s.js → index-BZTIoCof.js} +1 -1
- package/dashboard/dist/assets/{index-DYIIk93n.js → index-Cj9NdXOj.js} +1 -1
- package/dashboard/dist/assets/{index-DieuzFHA.js → index-D3XPaYEL.js} +1 -1
- package/dashboard/dist/assets/{info-BteHQN_N.js → info-BUmCmjwd.js} +1 -1
- package/dashboard/dist/assets/{link-2-C1RSbOHv.js → link-2-t-wSLB2a.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-BM3x6_YL.js → loader-circle-DM-FdXeX.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-BHzOJfH3.js → modifiers.esm-D5AKZNa7.js} +1 -1
- package/dashboard/dist/assets/module-DOCYJaxl.js +3 -0
- package/dashboard/dist/assets/{monitor-smartphone-Ps3VptSt.js → monitor-smartphone-CDHFLZS-.js} +1 -1
- package/dashboard/dist/assets/{play-7MpFYU7a.js → play-BIQH--yZ.js} +1 -1
- package/dashboard/dist/assets/{plus-Dk-p9OaZ.js → plus-CztG5eum.js} +1 -1
- package/dashboard/dist/assets/{provider-display-Czwv4ClR.js → provider-display-B2gZ38Oh.js} +1 -1
- package/dashboard/dist/assets/{react-D9vco0ZF.js → react-D1u6HsZx.js} +1 -1
- package/dashboard/dist/assets/safePolygon-ClG4WM06.js +1 -0
- package/dashboard/dist/assets/{search-Z2Hfw99-.js → search-NNy_fIbJ.js} +1 -1
- package/dashboard/dist/assets/{server-Dh_OraRG.js → server-N94HJtJY.js} +1 -1
- package/dashboard/dist/assets/{shield-check-59NUSZvk.js → shield-check-BGfaKXG9.js} +1 -1
- package/dashboard/dist/assets/{skills-api-Bguk8iPD.js → skills-api-CWydQc4G.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-C9M-1k5o.js → sortable.esm-BF83ljWQ.js} +1 -1
- package/dashboard/dist/assets/store-l5WfCa7P.js +1 -0
- package/dashboard/dist/assets/{terminal-DKTXh9tj.js → terminal-CRBThKUQ.js} +1 -1
- package/dashboard/dist/assets/{trash-CQRRKbCs.js → trash-BXN5tg81.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-BoOd2Hhq.js → use-community-stats-dHketgyF.js} +1 -1
- package/dashboard/dist/assets/{use-latest-request-guard-vQtFEBIX.js → use-latest-request-guard-CdM1Pn_p.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-BRTj9_xd.js → use-limits-display-prefs-dOm4SCFU.js} +1 -1
- package/dashboard/dist/assets/{use-native-settings-CC6uEn3j.js → use-native-settings-GL9uAidm.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-BUx6eIN7.js → use-ordered-list-Btz_NSiA.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-D9n2I_eN.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-BsUypXPb.js → use-session-efficiency-pref-BPZel3HL.js} +1 -1
- package/dashboard/dist/assets/{use-transform-oomGXI86.js → use-transform-D2xePGbE.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-CXeCKJZ_.js → use-usage-limits-vEmyPwMY.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-DIZEXq5g.js → useCurrency-DnhS0llv.js} +1 -1
- package/dashboard/dist/assets/usePositioner-7yozJJJ0.js +1 -0
- package/dashboard/dist/assets/{useTokenFormat-DKURSOqb.js → useTokenFormat-DvjyXv8i.js} +1 -1
- package/dashboard/dist/assets/{zap-BQ8nGK7b.js → zap-CElRpX2w.js} +1 -1
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist/ip-check.html +2 -2
- package/dashboard/dist/leaderboard.html +2 -2
- package/dashboard/dist/share.html +2 -2
- package/package.json +2 -2
- package/src/commands/status.js +1 -1
- package/src/commands/sync.js +34 -4
- package/src/lib/cloud-usage-reset.js +115 -0
- package/src/lib/diagnostics.js +1 -1
- package/src/lib/kimi-model-repair.js +173 -0
- package/src/lib/kimi-session.js +216 -0
- package/src/lib/local-api.js +46 -1
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/qoder-cn-cli-limits.js +9 -7
- package/src/lib/qoder-limits.js +45 -15
- package/src/lib/rollout.js +6 -4
- package/src/lib/session-analytics.js +47 -9
- package/dashboard/dist/assets/DashboardPage-BLr2XmyZ.js +0 -1
- package/dashboard/dist/assets/DevicePage-Ddm5uKOw.js +0 -1
- package/dashboard/dist/assets/DialogDescription-BE5CNMW0.js +0 -1
- package/dashboard/dist/assets/DialogTitle-Ca1-hka8.js +0 -1
- package/dashboard/dist/assets/PopoverPopup-uQa7G-IO.js +0 -1
- package/dashboard/dist/assets/Select-Dwix4ZFd.js +0 -1
- package/dashboard/dist/assets/SelectItemText-Bz5cn5Gk.js +0 -1
- package/dashboard/dist/assets/SettingsPage-DEdNhzKR.js +0 -5
- package/dashboard/dist/assets/SkillsPage-CqocOQID.js +0 -1
- package/dashboard/dist/assets/TooltipPopup-LzbtjRSA.js +0 -1
- package/dashboard/dist/assets/__vite-browser-external-BnGukaND.js +0 -45
- package/dashboard/dist/assets/composite-lINFdwLI.js +0 -1
- package/dashboard/dist/assets/module-BNnaKM__.js +0 -3
- package/dashboard/dist/assets/safePolygon-Ca2iBTNb.js +0 -1
- package/dashboard/dist/assets/store-nR9Ah4fr.js +0 -1
- package/dashboard/dist/assets/use-reduced-motion-BZBrXeyc.js +0 -1
- package/dashboard/dist/assets/usePositioner-Drh2sy7w.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as j,aW as we,aX as De,aY as Fe,aZ as Le,a_ as le,a$ as He,b0 as te,b1 as Te,b2 as Q,b3 as ue,b4 as ae,b5 as K,N as ee,b6 as J,b7 as ge,b8 as Xe,b9 as Ce,ba as _,ar as Ye}from"./__vite-browser-external-BnGukaND.js";import{i as fe,a as Re,b as _e,g as de,c as ne}from"./composite-lINFdwLI.js";function Ne(e,s){return s!=null&&!fe(s)?0:typeof e=="function"?e():e}function me(e,s,r){const p=Ne(e,r);return typeof p=="number"?p:p?.[s]}function be(e){return typeof e=="function"?e():e}function Pe(e,s){return s||e==="click"||e==="mousedown"}function Be(e){return e?.includes("mouse")&&e!=="mousedown"}function qe(e){const s=j.useCallback(p=>e===void 0?we:e.subscribeStore(p),[e]),r=j.useCallback(()=>e===void 0?void 0:e.store,[e]);return De.useSyncExternalStore(s,r,()=>e?.serverStore)}class pe{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new le,this.restTimeout=new le,this.handleCloseOptions=void 0}static create(){return new pe}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const ie=new WeakMap;function ce(e){if(!e.performedPointerEventsMutation)return;const s=e.pointerEventsScopeElement;s&&ie.get(s)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),ie.delete(s)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Se(e,s){const{scopeElement:r,referenceElement:p,floatingElement:c}=s,o=ie.get(r);o&&o!==e&&ce(o),ce(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=r,e.pointerEventsReferenceElement=p,e.pointerEventsFloatingElement=c,ie.set(r,e),r.style.pointerEvents="none",p.style.pointerEvents="auto",c.style.pointerEvents="auto"}function Me(e){const s=e.context.dataRef.current,r=Fe(()=>s.hoverInteractionState??pe.create()).current;return s.hoverInteractionState||(s.hoverInteractionState=r),Le(s.hoverInteractionState.disposeEffect),s.hoverInteractionState}function Ge(e,s={}){const{enabled:r=!0,closeDelay:p=0,nodeId:c}=s,o="rootStore"in e?e.rootStore:e,X=o.useState("open"),S=o.useState("floatingElement"),H=o.useState("domReferenceElement"),{dataRef:Y}=o.context,u=Re(),M=_e(),f=Me(o),U=He(),$=te(()=>Pe(Y.current.openEvent?.type,f.interactedInside)),i=te(()=>Be(Y.current.openEvent?.type)),D=te(()=>{ce(f)});Te(()=>{X||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,D())},[X,f,D]),j.useEffect(()=>D,[D]),Te(()=>{if(r&&X&&f.handleCloseOptions?.blockPointerEvents&&i()&&Q(H)&&S){const N=H,F=S,t=ue(S),C=u?.nodesRef.current.find(b=>b.id===M)?.context?.elements.floating;C&&(C.style.pointerEvents="");const k=f.pointerEventsScopeElement!==F?f.pointerEventsScopeElement:null,h=C!==F?C:null,g=f.handleCloseOptions?.getScope?.()??k??h??N.closest("[data-rootownerid]")??t.body;return Se(f,{scopeElement:g,referenceElement:N,floatingElement:F}),()=>{D()}}},[r,X,H,S,f,i,u,M,D]),j.useEffect(()=>{if(!r)return;function N(){return!!(u&&M&&de(u.nodesRef.current,M).length>0)}function F(b){const I=me(p,"close",f.pointerType),q=()=>{o.setOpen(!1,ee(J,b)),u?.events.emit("floating.closed",b)};I?f.openChangeTimeout.start(I,q):(f.openChangeTimeout.clear(),q())}function t(b){const I=ge(b);if(!Xe(I)){f.interactedInside=!1;return}f.interactedInside=I?.closest("[aria-haspopup]")!=null}function C(){f.openChangeTimeout.clear(),U.clear(),u?.events.off("floating.closed",h),D()}function k(b){if(N()&&u){u.events.on("floating.closed",h);return}if(Ce(b.relatedTarget,o.context.triggerElements))return;const I=Y.current.floatingContext?.nodeId??c,q=b.relatedTarget;if(!(u&&I&&Q(q)&&de(u.nodesRef.current,I,!1).some(B=>_(B.context?.elements.floating,q)))){if(f.handler){f.handler(b);return}D(),i()&&!$()&&F(b)}}function h(b){!u||!M||N()||U.start(0,()=>{u.events.off("floating.closed",h),o.setOpen(!1,ee(J,b)),u.events.emit("floating.closed",b)})}const g=S;return ae(g&&K(g,"mouseenter",C),g&&K(g,"mouseleave",k),g&&K(g,"pointerdown",t,!0),()=>{u?.events.off("floating.closed",h)})},[r,S,o,Y,p,c,i,$,D,f,u,M,U])}const Ae={current:null};function Qe(e,s={}){const{enabled:r=!0,delay:p=0,handleClose:c=null,mouseOnly:o=!1,restMs:X=0,move:S=!0,triggerElementRef:H=Ae,externalTree:Y,isActiveTrigger:u=!0,getHandleCloseContext:M,isClosing:f,shouldOpen:U,guardStaleOpen:$=!1}=s,i="rootStore"in e?e.rootStore:e,{dataRef:D,events:N}=i.context,F=Re(Y),t=Me(i),C=j.useRef(!1),k=ne(c),h=ne(p),g=ne(X),b=ne(r),I=ne(U),q=ne(f),x=te(()=>Pe(D.current.openEvent?.type,t.interactedInside)),B=te(()=>I.current?.()!==!1),G=te((v,a,O)=>{const T=i.context.triggerElements;if(T.hasElement(a))return!v||!_(v,a);if(!Q(O))return!1;const Z=O;return T.hasMatchingElement(A=>_(A,Z))&&(!v||!_(v,Z))}),E=te(()=>{if(!t.handler)return;ue(i.select("domReferenceElement")).removeEventListener("mousemove",t.handler),t.handler=void 0}),n=te(()=>{ce(t)});return u&&(t.handleCloseOptions=c?.__options),j.useEffect(()=>E,[E]),j.useEffect(()=>{if(!r)return;function v(a){a.open?C.current=!1:(C.current=a.reason===J,E(),t.openChangeTimeout.clear(),t.restTimeout.clear(),t.blockMouseMove=!0,t.restTimeoutPending=!1)}return N.on("openchange",v),()=>{N.off("openchange",v)}},[r,N,t,E]),j.useEffect(()=>{if(!r)return;function v(d,W=!0){const R=me(h.current,"close",t.pointerType);R?t.openChangeTimeout.start(R,()=>{i.setOpen(!1,ee(J,d)),F?.events.emit("floating.closed",d)}):W&&(t.openChangeTimeout.clear(),i.setOpen(!1,ee(J,d)),F?.events.emit("floating.closed",d))}const a=H.current??(u?i.select("domReferenceElement"):null);if(!Q(a))return;function O(d){if(t.openChangeTimeout.clear(),t.blockMouseMove=!1,o&&!fe(t.pointerType))return;const W=be(g.current),R=me(h.current,"open",t.pointerType),P=ge(d),l=d.currentTarget??null,w=i.select("domReferenceElement");let y=l;if(Q(P)&&!i.context.triggerElements.hasElement(P)){for(const ve of i.context.triggerElements.elements())if(_(ve,P)){y=ve;break}}Q(l)&&Q(w)&&!i.context.triggerElements.hasElement(l)&&_(l,w)&&(y=w);const L=y==null?!1:G(w,y,P),V=i.select("open"),z=q.current?.()??i.select("transitionStatus")==="ending",he=!V&&z&&C.current,Ie=!L&&Q(y)&&Q(w)&&_(w,y)&&he,ye=W>0&&!R,ke=L&&(V||he)||Ie,Ee=!V||L;if(ke){B()&&i.setOpen(!0,ee(J,d,y));return}ye||(R?t.openChangeTimeout.start(R,()=>{Ee&&B()&&i.setOpen(!0,ee(J,d,y))}):Ee&&B()&&i.setOpen(!0,ee(J,d,y)))}function T(d){if(x()){n();return}E();const W=i.select("domReferenceElement"),R=ue(W);t.restTimeout.clear(),t.restTimeoutPending=!1;const P=D.current.floatingContext??M?.();if(Ce(d.relatedTarget,i.context.triggerElements))return;if(k.current&&P){i.select("open")||t.openChangeTimeout.clear();const w=H.current;t.handler=k.current({...P,tree:F,x:d.clientX,y:d.clientY,onClose(){n(),E(),b.current&&!x()&&w===i.select("domReferenceElement")&&v(d,!0)}}),R.addEventListener("mousemove",t.handler),t.handler(d);return}(t.pointerType!=="touch"||!_(i.select("floatingElement"),d.relatedTarget))&&v(d)}function Z(d){_(a,d.relatedTarget)||(t.openChangeTimeout.clear(),t.restTimeout.clear(),t.restTimeoutPending=!1)}const A=$?K(a,"mouseout",Z):void 0;return S?ae(K(a,"mousemove",O,{once:!0}),K(a,"mouseenter",O),K(a,"mouseleave",T),A):ae(K(a,"mouseenter",O),K(a,"mouseleave",T),A)},[E,n,D,h,i,r,k,t,u,G,x,o,S,g,H,F,b,M,q,B,$]),j.useMemo(()=>{if(!r)return;function v(a){t.pointerType=a.pointerType}return{onPointerDown:v,onPointerEnter:v,onMouseMove(a){const{nativeEvent:O}=a,T=a.currentTarget,Z=i.select("domReferenceElement"),A=i.select("open"),d=G(Z,T,a.target);if(o&&!fe(t.pointerType))return;if(A&&d&&t.handleCloseOptions?.blockPointerEvents){const P=i.select("floatingElement");if(P){const l=t.handleCloseOptions?.getScope?.()??T.ownerDocument.body;Se(t,{scopeElement:l,referenceElement:T,floatingElement:P})}}const W=be(g.current);if(A&&!d||W===0||!d&&t.restTimeoutPending&&a.movementX**2+a.movementY**2<2)return;t.restTimeout.clear();function R(){if(t.restTimeoutPending=!1,x())return;const P=i.select("open");!t.blockMouseMove&&(!P||d)&&B()&&i.setOpen(!0,ee(J,O,T))}t.pointerType==="touch"?Ye.flushSync(()=>{R()}):d&&A?R():(t.restTimeoutPending=!0,t.restTimeout.start(W,R))}}},[r,t,x,G,o,i,g,B])}const Oe=.1,We=Oe*Oe,m=.5;function oe(e,s,r,p,c,o){return p>=s!=o>=s&&e<=(c-r)*(s-p)/(o-p)+r}function re(e,s,r,p,c,o,X,S,H,Y){let u=!1;return oe(e,s,r,p,c,o)&&(u=!u),oe(e,s,c,o,X,S)&&(u=!u),oe(e,s,X,S,H,Y)&&(u=!u),oe(e,s,H,Y,r,p)&&(u=!u),u}function Ve(e,s,r){return e>=r.x&&e<=r.x+r.width&&s>=r.y&&s<=r.y+r.height}function se(e,s,r,p,c,o){const X=Math.min(r,c),S=Math.max(r,c),H=Math.min(p,o),Y=Math.max(p,o);return e>=X&&e<=S&&s>=H&&s<=Y}function Ze(e={}){const{blockPointerEvents:s=!1}=e,r=new le,p=({x:c,y:o,placement:X,elements:S,onClose:H,nodeId:Y,tree:u})=>{const M=X?.split("-")[0];let f=!1,U=null,$=null,i=typeof performance<"u"?performance.now():0;function D(F,t){const C=performance.now(),k=C-i;if(U===null||$===null||k===0)return U=F,$=t,i=C,!1;const h=F-U,g=t-$,b=h*h+g*g,I=k*k*We;return U=F,$=t,i=C,b<I}function N(){r.clear(),H()}return function(t){r.clear();const C=S.domReference,k=S.floating;if(!C||!k||M==null||c==null||o==null)return;const{clientX:h,clientY:g}=t,b=ge(t),I=t.type==="mouseleave",q=_(k,b),x=_(C,b);if(q&&(f=!0,!I))return;if(x&&(f=!1,!I)){f=!0;return}if(I&&Q(t.relatedTarget)&&_(k,t.relatedTarget))return;function B(){return!!(u&&de(u.nodesRef.current,Y).length>0)}function G(){B()||N()}if(B())return;const E=C.getBoundingClientRect(),n=k.getBoundingClientRect(),v=c>n.right-n.width/2,a=o>n.bottom-n.height/2,O=n.width>E.width,T=n.height>E.height,Z=(O?E:n).left,A=(O?E:n).right,d=(T?E:n).top,W=(T?E:n).bottom;if(M==="top"&&o>=E.bottom-1||M==="bottom"&&o<=E.top+1||M==="left"&&c>=E.right-1||M==="right"&&c<=E.left+1){G();return}let R=!1;switch(M){case"top":R=se(h,g,Z,E.top+1,A,n.bottom-1);break;case"bottom":R=se(h,g,Z,n.top+1,A,E.bottom-1);break;case"left":R=se(h,g,n.right-1,W,E.left+1,d);break;case"right":R=se(h,g,E.right-1,W,n.left+1,d);break}if(R)return;if(f&&!Ve(h,g,E)){G();return}if(!I&&D(h,g)){G();return}let P=!1;switch(M){case"top":{const l=O?m/2:m*4,w=O||v?c+l:c-l,y=O?c-l:v?c+l:c-l,L=o+m+1,V=v||O?n.bottom-m:n.top,z=v?O?n.bottom-m:n.top:n.bottom-m;P=re(h,g,w,L,y,L,n.left,V,n.right,z);break}case"bottom":{const l=O?m/2:m*4,w=O||v?c+l:c-l,y=O?c-l:v?c+l:c-l,L=o-m,V=v||O?n.top+m:n.bottom,z=v?O?n.top+m:n.bottom:n.top+m;P=re(h,g,w,L,y,L,n.left,V,n.right,z);break}case"left":{const l=T?m/2:m*4,w=T||a?o+l:o-l,y=T?o-l:a?o+l:o-l,L=c+m+1,V=a||T?n.right-m:n.left,z=a?T?n.right-m:n.left:n.right-m;P=re(h,g,V,n.top,z,n.bottom,L,w,L,y);break}case"right":{const l=T?m/2:m*4,w=T||a?o+l:o-l,y=T?o-l:a?o+l:o-l,L=c-m,V=a||T?n.left+m:n.right,z=a?T?n.left+m:n.right:n.left+m;P=re(h,g,L,w,L,y,V,n.top,z,n.bottom);break}}P?f||r.start(40,G):G()}};return p.__options={...e,blockPointerEvents:s},p}export{Qe as a,Ge as b,Me as c,me as g,Ze as s,qe as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{J as r}from"./__vite-browser-external-BnGukaND.js";import{F as g}from"./composite-lINFdwLI.js";function a(e,n,u=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new g({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:n,syncOnly:!0,nested:u,onOpenChange:void 0}),floatingId:n,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:r,inactiveTriggerProps:r,popupProps:r}}const o=e=>e.triggerIdProp??e.activeTriggerId,t=e=>e.openProp??e.open,i=e=>(e.popupElement?.id??e.floatingId)||void 0;function p(e,n){return n!==void 0&&t(e)&&o(e)===n}function l(e,n){return p(e,n)?!0:n!==void 0&&t(e)&&o(e)==null&&e.triggerCount===1}const c={open:t,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:o,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:i,isTriggerActive:(e,n)=>n!==void 0&&o(e)===n,isOpenedByTrigger:(e,n)=>p(e,n),isMountedByTrigger:(e,n)=>n!==void 0&&o(e)===n&&e.mounted,triggerProps:(e,n)=>n?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,n)=>l(e,n)?i(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};export{a as c,c as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o}from"./__vite-browser-external-BnGukaND.js";import{h as r,i as t,p as s}from"./react-D9vco0ZF.js";function i(){!r.current&&t();const[e]=o.useState(s.current);return e}export{i as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b2 as z,bH as oe,bG as me,bI as te,bJ as Y,bK as je,bL as Me,bM as ze,bN as qt,bO as Et,bP as Kt,bQ as Ue,bR as Ct,bS as $e,bT as Ne,bU as gt,bV as Pt,r as b,ar as Gt,b1 as xe,b0 as Jt,b3 as Qt,bW as Zt,J as en,K as tn}from"./__vite-browser-external-BnGukaND.js";import{a as nn,c as Ee,z as on}from"./composite-lINFdwLI.js";const de=Math.min,q=Math.max,Le=Math.round,Ce=Math.floor,K=e=>({x:e,y:e}),sn={left:"right",right:"left",bottom:"top",top:"bottom"};function Mt(e,t,n){return q(e,de(t,n))}function ne(e,t){return typeof e=="function"?e(t):e}function j(e){return e.split("-")[0]}function G(e){return e.split("-")[1]}function Ye(e){return e==="x"?"y":"x"}function qe(e){return e==="y"?"height":"width"}function X(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ke(e){return Ye(X(e))}function rn(e,t,n){n===void 0&&(n=!1);const o=G(e),i=Ke(e),s=qe(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=De(r)),[r,De(r)]}function cn(e){const t=De(e);return[Xe(e),t,Xe(t)]}function Xe(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ht=["left","right"],pt=["right","left"],ln=["top","bottom"],fn=["bottom","top"];function an(e,t,n){switch(e){case"top":case"bottom":return n?t?pt:ht:t?ht:pt;case"left":case"right":return t?ln:fn;default:return[]}}function un(e,t,n,o){const i=G(e);let s=an(j(e),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),t&&(s=s.concat(s.map(Xe)))),s}function De(e){const t=j(e);return sn[t]+e.slice(t.length)}function dn(e){var t,n,o,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(o=e.bottom)!=null?o:0,left:(i=e.left)!=null?i:0}}function Lt(e){return typeof e!="number"?dn(e):{top:e,right:e,bottom:e,left:e}}function Te(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function xt(e,t,n){let{reference:o,floating:i}=e;const s=X(t),r=Ke(t),c=qe(r),l=j(t),f=s==="y",u=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,d=o[c]/2-i[c]/2;let a;switch(l){case"top":a={x:u,y:o.y-i.height};break;case"bottom":a={x:u,y:o.y+o.height};break;case"right":a={x:o.x+o.width,y:g};break;case"left":a={x:o.x-i.width,y:g};break;default:a={x:o.x,y:o.y}}const m=G(t);return m&&(a[r]+=d*(m==="end"?1:-1)*(n&&f?-1:1)),a}async function mn(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:l}=e,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:g="floating",altBoundary:d=!1,padding:a=0}=ne(t,e),m=Lt(a),p=c[d?g==="floating"?"reference":"floating":g],w=Te(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:u,strategy:l})),x=g==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),y=await(s.isElement==null?void 0:s.isElement(R))&&await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1},A=Te(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:R,strategy:l}):x);return{top:(w.top-A.top+m.top)/y.y,bottom:(A.bottom-w.bottom+m.bottom)/y.y,left:(w.left-A.left+m.left)/y.x,right:(A.right-w.right+m.right)/y.x}}const gn=50,hn=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:mn},l=await(r.isRTL==null?void 0:r.isRTL(t));let f=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:g}=xt(f,o,l),d=o,a=0;const m={};for(let h=0;h<s.length;h++){const p=s[h];if(!p)continue;const{name:w,fn:x}=p,{x:R,y,data:A,reset:v}=await x({x:u,y:g,initialPlacement:o,placement:d,strategy:i,middlewareData:m,rects:f,platform:c,elements:{reference:e,floating:t}});u=R??u,g=y??g,m[w]={...m[w],...A},v&&a<gn&&(a++,typeof v=="object"&&(v.placement&&(d=v.placement),v.rects&&(f=v.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):v.rects),{x:u,y:g}=xt(f,d,l)),h=-1)}return{x:u,y:g,placement:d,strategy:i,middlewareData:m}},pn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:f}=t,{mainAxis:u=!0,crossAxis:g=!0,fallbackPlacements:d,fallbackStrategy:a="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...p}=ne(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=j(i),x=X(c),R=j(c)===c,y=await(l.isRTL==null?void 0:l.isRTL(f.floating)),A=d||(R||!h?[De(c)]:cn(c)),v=m!=="none";!d&&v&&A.push(...un(c,h,m,y));const P=[c,...A],S=await l.detectOverflow(t,p),L=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&L.push(S[w]),g){const k=rn(i,r,y);L.push(S[k[0]],S[k[1]])}if(M=[...M,{placement:i,overflows:L}],!L.every(k=>k<=0)){var E,$;const k=(((E=s.flip)==null?void 0:E.index)||0)+1,V=P[k];if(V&&(!(g==="alignment"?x!==X(V):!1)||M.every(O=>X(O.placement)===x?O.overflows[0]>0:!0)))return{data:{index:k,overflows:M},reset:{placement:V}};let T=($=M.filter(F=>F.overflows[0]<=0).sort((F,O)=>F.overflows[1]-O.overflows[1])[0])==null?void 0:$.placement;if(!T)switch(a){case"bestFit":{var W;const F=(W=M.filter(O=>{if(v){const H=X(O.placement);return H===x||H==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(H=>H>0).reduce((H,B)=>H+B,0)]).sort((O,H)=>O[1]-H[1])[0])==null?void 0:W[0];F&&(T=F);break}case"initialPlacement":T=c;break}if(i!==T)return{reset:{placement:T}}}return{}}}},Dt=new Set(["left","top"]);async function xn(e,t){const{placement:n,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=j(n),c=G(n),l=X(n)==="y",f=Dt.has(r)?-1:1,u=s&&l?-1:1,g=ne(t,e);let{mainAxis:d,crossAxis:a,alignmentAxis:m}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return c&&typeof m=="number"&&(a=c==="end"?m*-1:m),l?{x:a*u,y:d*f}:{x:d*f,y:a*u}}const wn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=t,l=await xn(t,e);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},yn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i,platform:s}=t,{mainAxis:r=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:R,y}=x;return{x:R,y}}},...f}=ne(e,t),u={x:n,y:o},g=await s.detectOverflow(t,f),d=X(i),a=Ye(d);let m=u[a],h=u[d];const p=(x,R)=>Mt(R+g[x==="y"?"top":"left"],R,R-g[x==="y"?"bottom":"right"]);r&&(m=p(a,m)),c&&(h=p(d,h));const w=l.fn({...t,[a]:m,[d]:h});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[a]:r,[d]:c}}}}}},bn=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,o;const{x:i,y:s,placement:r,rects:c,middlewareData:l}=t,{offset:f=0,mainAxis:u=!0,crossAxis:g=!0}=ne(e,t),d={x:i,y:s},a=X(r),m=Ye(a);let h=d[m],p=d[a];const w=ne(f,t),x=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(o=w.crossAxis)!=null?o:0};if(u){const A=m==="y"?"height":"width",v=c.reference[m]-c.floating[A]+x.mainAxis,P=c.reference[m]+c.reference[A]-x.mainAxis;h<v?h=v:h>P&&(h=P)}if(g){var R,y;const A=m==="y"?"width":"height",v=Dt.has(j(r)),P=c.reference[a]-c.floating[A]+(v&&((R=l.offset)==null?void 0:R[a])||0)+(v?0:x.crossAxis),S=c.reference[a]+c.reference[A]+(v?0:((y=l.offset)==null?void 0:y[a])||0)-(v?x.crossAxis:0);p<P?p=P:p>S&&(p=S)}return{[m]:h,[a]:p}}}},vn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:o,platform:i,elements:s}=t,{apply:r=()=>{},...c}=ne(e,t),l=await i.detectOverflow(t,c),f=j(n),u=G(n),g=X(n)==="y",{width:d,height:a}=o.floating;let m,h;f==="top"||f==="bottom"?(m=f,h=u===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(h=f,m=u==="end"?"top":"bottom");const p=a-l.top-l.bottom,w=d-l.left-l.right,x=de(a-l[m],p),R=de(d-l[h],w),y=t.middlewareData.shift,A=!y;let v=x,P=R;y!=null&&y.enabled.x&&(P=w),y!=null&&y.enabled.y&&(v=p),A&&!u&&(g?P=d-2*q(l.left,l.right):v=a-2*q(l.top,l.bottom)),await r({...t,availableWidth:P,availableHeight:v});const S=await i.getDimensions(s.floating);return d!==S.width||a!==S.height?{reset:{rects:!0}}:{}}}};function Tt(e){const t=te(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=me(e),s=i?e.offsetWidth:n,r=i?e.offsetHeight:o,c=Le(n)!==s||Le(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function Ge(e){return z(e)?e:e.contextElement}function ue(e){const t=Ge(e);if(!me(t))return K(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:s}=Tt(t);let r=(s?Le(n.width):n.width)/o,c=(s?Le(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Rn=K(0);function Ft(e){const t=Y(e);return!Pt()||!t.visualViewport?Rn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function An(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Y(e)}function se(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=Ge(e);let r=K(1);t&&(o?z(o)&&(r=ue(o)):r=ue(e));const c=An(s,n,o)?Ft(s):K(0);let l=(i.left+c.x)/r.x,f=(i.top+c.y)/r.y,u=i.width/r.x,g=i.height/r.y;if(s&&o){const d=Y(s),a=z(o)?Y(o):o;let m=d,h=gt(m);for(;h&&a!==m;){const p=ue(h),w=h.getBoundingClientRect(),x=te(h),R=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,y=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,f*=p.y,u*=p.x,g*=p.y,l+=R,f+=y,m=Y(h),h=gt(m)}}return Te({width:u,height:g,x:l,y:f})}function ke(e,t){const n=$e(e).scrollLeft;return t?t.left+n:se(oe(e)).left+n}function $t(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-ke(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function On(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const s=i==="fixed",r=oe(o),c=t?je(t.floating):!1;if(o===r||c&&s)return n;let l={scrollLeft:0,scrollTop:0},f=K(1);const u=K(0),g=me(o);if((g||!s)&&((Ue(o)!=="body"||Ct(r))&&(l=$e(o)),g)){const a=se(o);f=ue(o),u.x=a.x+o.clientLeft,u.y=a.y+o.clientTop}const d=r&&!g&&!s?$t(r,l):K(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+u.x+d.x,y:n.y*f.y-l.scrollTop*f.y+u.y+d.y}}function Sn(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function En(e){const t=$e(e),n=e.ownerDocument.body,o=q(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=q(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let s=-t.scrollLeft+ke(e);const r=-t.scrollTop;return te(n).direction==="rtl"&&(s+=q(e.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}const Cn=25;function Pn(e,t,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",i=Y(e),s=oe(e),r=i.visualViewport;let c=s.clientWidth,l=s.clientHeight,f=0,u=0;if(r){const d=!Pt()||t==="fixed";o?d||(f=-r.offsetLeft,u=-r.offsetTop):(c=r.width,l=r.height,d&&(f=r.offsetLeft,u=r.offsetTop))}if(ke(s)<=0){const d=s.ownerDocument,a=d.body,m=getComputedStyle(a),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,p=Math.abs(s.clientWidth-a.clientWidth-h),w=getComputedStyle(s).scrollbarGutter==="stable both-edges"?p/2:p;w<=Cn&&(c-=w)}return{width:c,height:l,x:f,y:u}}function Mn(e,t){const n=se(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,s=ue(e),r=e.clientWidth*s.x,c=e.clientHeight*s.y,l=i*s.x,f=o*s.y;return{width:r,height:c,x:l,y:f}}function wt(e,t,n){let o;if(t==="viewport"||t==="layoutViewport")o=Pn(e,n,t);else if(t==="document")o=En(oe(e));else if(z(t))o=Mn(t,n);else{const i=Ft(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Te(o)}function Ln(e,t){const n=t.get(e);if(n)return n;let o=Ne(e,[],!1).filter(c=>z(c)&&Ue(c)!=="body"),i=null;const s=te(e).position==="fixed";let r=s?Me(e):e;for(;z(r)&&!ze(r);){const c=te(r),l=Et(r),f=i?i.position:s?"fixed":"";!l&&(f==="fixed"||f==="absolute"&&c.position==="static")?o=o.filter(g=>g!==r):i=c,r=Me(r)}return t.set(e,o),o}function Dn(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const r=[...n==="clippingAncestors"?je(t)?[]:Ln(t,this._c):[].concat(n),o],c=wt(t,r[0],i);let l=c.top,f=c.right,u=c.bottom,g=c.left;for(let d=1;d<r.length;d++){const a=wt(t,r[d],i);l=q(a.top,l),f=de(a.right,f),u=de(a.bottom,u),g=q(a.left,g)}return{width:f-g,height:u-l,x:g,y:l}}function Tn(e){const{width:t,height:n}=Tt(e);return{width:t,height:n}}function Fn(e,t,n){const o=me(t),i=oe(t),s=n==="fixed",r=se(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=K(0);if((o||!s)&&((Ue(t)!=="body"||Ct(i))&&(c=$e(t)),o)){const d=se(t,!0,s,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}!o&&i&&(l.x=ke(i));const f=i&&!o&&!s?$t(i,c):K(0),u=r.left+c.scrollLeft-l.x-f.x,g=r.top+c.scrollTop-l.y-f.y;return{x:u,y:g,width:r.width,height:r.height}}function Ie(e){return te(e).position==="static"}function yt(e,t){if(!me(e)||te(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return oe(e)===n&&(n=n.ownerDocument.body),n}function kt(e,t){const n=Y(e);if(je(e))return n;if(!me(e)){let i=Me(e);for(;i&&!ze(i);){if(z(i)&&!Ie(i))return i;i=Me(i)}return n}let o=yt(e,t);for(;o&&qt(o)&&Ie(o);)o=yt(o,t);return o&&ze(o)&&Ie(o)&&!Et(o)?n:o||Kt(e)||n}const $n=async function(e){const t=this.getOffsetParent||kt,n=this.getDimensions,o=await n(e.floating);return{reference:Fn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function kn(e){return te(e).direction==="rtl"}const Wn={convertOffsetParentRelativeRectToViewportRelativeRect:On,getDocumentElement:oe,getClippingRect:Dn,getOffsetParent:kt,getElementRects:$n,getClientRects:Sn,getDimensions:Tn,getScale:ue,isElement:z,isRTL:kn};function Wt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Vn(e,t,n){let o=null,i;const s=oe(e);function r(){var u;clearTimeout(i),(u=o)==null||u.disconnect(),o=null}function c(u,g){u===void 0&&(u=!1),g===void 0&&(g=1),r();const d=e.getBoundingClientRect(),{left:a,top:m,width:h,height:p}=d;if(u||t(),!h||!p)return;const w=Ce(m),x=Ce(s.clientWidth-(a+h)),R=Ce(s.clientHeight-(m+p)),y=Ce(a),v={rootMargin:-w+"px "+-x+"px "+-R+"px "+-y+"px",threshold:q(0,de(1,g))||1};let P=!0;function S(L){const M=L[0].intersectionRatio;if(!Wt(d,e.getBoundingClientRect()))return c();if(M!==g){if(!P)return c();M?c(!1,M):i=setTimeout(()=>{c(!1,1e-7)},1e3)}P=!1}try{o=new IntersectionObserver(S,{...v,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,v)}o.observe(e)}const l=Y(e),f=()=>c(n);return l.addEventListener("resize",f),c(!0),()=>{l.removeEventListener("resize",f),r()}}function bt(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,f=Ge(e),u=i||s?[...f?Ne(f):[],...t?Ne(t):[]]:[];u.forEach(w=>{i&&w.addEventListener("scroll",n),s&&w.addEventListener("resize",n)});const g=f&&c?Vn(f,n,s):null;let d=-1,a=null;r&&(a=new ResizeObserver(w=>{let[x]=w;x&&x.target===f&&a&&t&&(a.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var R;(R=a)==null||R.observe(t)})),n()}),f&&!l&&a.observe(f),t&&a.observe(t));let m,h=l?se(e):null;l&&p();function p(){const w=se(e);h&&!Wt(h,w)&&n(),h=w,m=requestAnimationFrame(p)}return n(),()=>{var w;u.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),g?.(),(w=a)==null||w.disconnect(),a=null,l&&cancelAnimationFrame(m)}}const Bn=wn,Hn=yn,In=pn,_n=vn,zn=bn,Nn=(e,t,n)=>{const o=new Map,i=n??{},s={...Wn,...i.platform,_c:o};return hn(e,t,{...i,platform:s})};var Xn=typeof document<"u",jn=function(){},Pe=Xn?b.useLayoutEffect:jn;function Fe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Fe(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Fe(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Vt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vt(e,t){const n=Vt(e);return Math.round(t*n)/n}function _e(e){const t=b.useRef(e);return Pe(()=>{t.current=e}),t}function Un(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:r}={},transform:c=!0,whileElementsMounted:l,open:f}=e,[u,g]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,a]=b.useState(o);Fe(d,o)||a(o);const[m,h]=b.useState(null),[p,w]=b.useState(null),x=b.useCallback(O=>{O!==v.current&&(v.current=O,h(O))},[]),R=b.useCallback(O=>{O!==P.current&&(P.current=O,w(O))},[]),y=s||m,A=r||p,v=b.useRef(null),P=b.useRef(null),S=b.useRef(u),L=l!=null,M=_e(l),E=_e(i),$=_e(f),W=b.useCallback(()=>{if(!v.current||!P.current)return;const O={placement:t,strategy:n,middleware:d};E.current&&(O.platform=E.current),Nn(v.current,P.current,O).then(H=>{const B={...H,isPositioned:$.current!==!1};k.current&&!Fe(S.current,B)&&(S.current=B,Gt.flushSync(()=>{g(B)}))})},[d,t,n,E,$]);Pe(()=>{f===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,g(O=>({...O,isPositioned:!1})))},[f]);const k=b.useRef(!1);Pe(()=>(k.current=!0,()=>{k.current=!1}),[]),Pe(()=>{if(y&&(v.current=y),A&&(P.current=A),y&&A){if(M.current)return M.current(y,A,W);W()}},[y,A,W,M,L]);const V=b.useMemo(()=>({reference:v,floating:P,setReference:x,setFloating:R}),[x,R]),T=b.useMemo(()=>({reference:y,floating:A}),[y,A]),F=b.useMemo(()=>{const O={position:n,left:0,top:0};if(!T.floating)return O;const H=vt(T.floating,u.x),B=vt(T.floating,u.y);return c?{...O,transform:"translate("+H+"px, "+B+"px)",...Vt(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:B}},[n,c,T.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:W,refs:V,elements:T,floatingStyles:F}),[u,W,V,T,F])}const Yn=(e,t)=>{const n=Bn(e);return{name:n.name,fn:n.fn,options:[e,t]}},qn=(e,t)=>{const n=Hn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kn=(e,t)=>({fn:zn(e).fn,options:[e,t]}),Gn=(e,t)=>{const n=In(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jn=(e,t)=>{const n=_n(e);return{name:n.name,fn:n.fn,options:[e,t]}};function Qn(e){return Zn(e,e.rootContext)}function Zn(e,t){const{nodeId:n,externalTree:o}=e,i=t.useState("referenceElement"),s=t.useState("floatingElement"),r=t.useState("domReferenceElement"),c=t.useState("open"),l=t.useState("floatingId"),[f,u]=b.useState(null),[g,d]=b.useState(void 0),[a,m]=b.useState(void 0),h=b.useRef(null),p=nn(o),w=b.useMemo(()=>({reference:i,floating:s,domReference:r}),[i,s,r]),x=Un({...e,elements:{...w,...f&&{reference:f}}}),R=z(g)?g:null,y=a===void 0?t.state.floatingElement:a;t.useSyncedValue("referenceElement",g??null),t.useSyncedValue("domReferenceElement",g===void 0?r:R),t.useSyncedValue("floatingElement",y);const A=b.useCallback(E=>{const $=z(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;u($),x.refs.setReference($)},[x.refs]),v=b.useCallback(E=>{(z(E)||E===null)&&(h.current=E,d(E)),(z(x.refs.reference.current)||x.refs.reference.current===null||E!==null&&!z(E))&&x.refs.setReference(E)},[x.refs,d]),P=b.useCallback(E=>{m(E),x.refs.setFloating(E)},[x.refs]),S=b.useMemo(()=>({...x.refs,setReference:v,setFloating:P,setPositionReference:A,domReference:h}),[x.refs,v,P,A]),L=b.useMemo(()=>({...x.elements,domReference:r}),[x.elements,r]),M=b.useMemo(()=>({...x,dataRef:t.context.dataRef,open:c,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:S,elements:L,nodeId:n,rootStore:t}),[x,S,L,n,t,c,l]);return xe(()=>{r&&(h.current=r)},[r]),xe(()=>{t.context.dataRef.current.floatingContext=M;const E=p?.nodesRef.current.find($=>$.id===n);E&&(E.context=M)}),b.useMemo(()=>({...x,context:M,refs:S,elements:L,rootStore:t}),[x,S,L,M,t])}const eo=b.createContext(void 0);function to(){return b.useContext(eo)?.direction??"ltr"}const no=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:l}=t,{element:f,padding:u=0,offsetParent:g="real"}=ne(e,t)||{};if(f==null)return{};const d=Lt(u),a={x:n,y:o},m=Ke(i),h=qe(m),p=await r.getDimensions(f),w=m==="y",x=w?"top":"left",R=w?"bottom":"right",y=w?"clientHeight":"clientWidth",A=s.reference[h]+s.reference[m]-a[m]-s.floating[h],v=a[m]-s.reference[m],P=g==="real"?await r.getOffsetParent?.(f):c.floating;let S=c.floating[y]||s.floating[h];(!S||!await r.isElement?.(P))&&(S=c.floating[y]||s.floating[h]);const L=A/2-v/2,M=S/2-p[h]/2-1,E=Math.min(d[x],M),$=Math.min(d[R],M),W=E,k=S-p[h]-$,V=S/2-p[h]/2+L,T=Mt(W,V,k),F=!l.arrow&&G(i)!=null&&V!==T&&s.reference[h]/2-(V<W?E:$)-p[h]/2<0,O=F?V<W?V-W:V-k:0;return{[m]:a[m]+O,data:{[m]:T,centerOffset:V-T-O,...F&&{alignmentOffset:O}},reset:F}}}),oo=(e,t)=>{const{name:n,fn:o}=no(e);return{name:n,fn:o,options:[e,t]}},io={name:"hide",async fn(e){const{width:t,height:n,x:o,y:i}=e.rects.reference,s=t===0&&n===0&&o===0&&i===0,r=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:r.top-n>=0||r.right-t>=0||r.bottom-n>=0||r.left-t>=0||s}}}},so={sideX:"left",sideY:"top"},ro="--available-width",co="--available-height",lo="--anchor-width",fo="--anchor-height",ao="--transform-origin",Rt=ro,At=co;function Bt(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function Ot(e,t,n){const{rects:o,placement:i}=e;return{side:Bt(t,j(i),n),align:G(i)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function po(e){return uo(e,Qn)}function uo(e,t){const{anchor:n,positionMethod:o="absolute",side:i="bottom",sideOffset:s=0,align:r="center",alignOffset:c=0,collisionBoundary:l,collisionPadding:f=5,sticky:u=!1,arrowPadding:g=5,disableAnchorTracking:d=!1,inline:a,keepMounted:m=!1,floatingRootContext:h,mounted:p,collisionAvoidance:w,shift:x,nodeId:R,adaptiveOrigin:y,lazyFlip:A=!1,externalTree:v}=e,[P,S]=b.useState(null);!p&&P!==null&&S(null);const L=w.side||"flip",M=w.align||"flip",E=w.fallbackAxisSide||"end",$=x?.crossAxis??!1,W=x?.rootBoundary,k=typeof n=="function"?n:void 0,V=Jt(k),T=k?V:n,F=Ee(n),O=Ee(p),B=to()==="rtl",we=P||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":B?"left":"right","inline-start":B?"right":"left"}[i],Ht=r==="center"?we:`${we}-${r}`;let D=f;typeof D=="number"?D={top:D,right:D,bottom:D,left:D}:D&&(D={top:D.top||0,right:D.right||0,bottom:D.bottom||0,left:D.left||0});const J=1,It=i==="bottom"?J:0,_t=i==="top"?J:0,zt=i==="right"?J:0,Nt=i==="left"?J:0,ye={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:D},ie=b.useRef(null),We=Ee(s),Ve=Ee(c),Xt=typeof s!="function"?s:0,jt=typeof c!="function"?c:0,re=[];a&&re.push(a),re.push(Yn(C=>{const _=Ot(C,i,B),N=typeof We.current=="function"?We.current(_):We.current,I=typeof Ve.current=="function"?Ve.current(_):Ve.current;return{mainAxis:N,crossAxis:I,alignmentAxis:I}},[Xt,jt,B,i]));const Je=M==="none"&&L!=="shift",Qe=!Je&&(u||$||L==="shift"),Ze=L==="none"?null:Gn({...ye,padding:{top:D.top+J+It,right:D.right+J+Nt,bottom:D.bottom+J+_t,left:D.left+J+zt},mainAxis:!$&&L==="flip",crossAxis:M==="flip"?"alignment":!1,fallbackAxisSideDirection:E}),et=Je?null:qn({...ye,rootBoundary:W,mainAxis:M!=="none",crossAxis:Qe,limiter:u||$?void 0:Kn(C=>{if(!ie.current)return{};const{width:_,height:N}=ie.current.getBoundingClientRect(),I=X(j(C.placement)),Z=I==="y"?_:N,U=I==="y"?D.left+D.right:D.top+D.bottom;return{offset:Z/2+U/2}})},[ye,u,$,W,D,M]);L==="shift"||M==="shift"||r==="center"?re.push(et,Ze):re.push(Ze,et),re.push(Jn({...ye,apply({elements:{floating:C},availableWidth:_,availableHeight:N,rects:I}){if(!O.current)return;const Z=C.style;Z.setProperty(Rt,`${_}px`),Z.setProperty(At,`${N}px`);const U=Y(C).devicePixelRatio||1,{x:Ae,y:ae,width:Oe,height:ee}=I.reference,he=(Math.round((Ae+Oe)*U)-Math.round(Ae*U))/U,pe=(Math.round((ae+ee)*U)-Math.round(ae*U))/U;Z.setProperty(lo,`${he}px`),Z.setProperty(fo,`${pe}px`)}}),oo(C=>({element:ie.current||Qt(C.elements.floating).createElement("div"),padding:ie.current?g:0,offsetParent:"floating"}),[g]),{name:"transformOrigin",fn(C){const{elements:{floating:_},middlewareData:N,placement:I,platform:Z,rects:U,y:Ae}=C,ae=j(I),Oe=G(I),ee=X(ae)==="y",he=ie.current,pe=typeof s=="function"?s(Ot(C,i,B)):s;let Se;if(!he&&Oe&&Math.abs(ee?N.shift?.x||0:N.shift?.y||0)<=1)Se=Oe==="start"===(ee&&Z.isRTL?.(_)===!0)?"100%":"0%";else{const Ut=ee?N.arrow?.x||0:N.arrow?.y||0,Yt=ee?he?.clientWidth||0:he?.clientHeight||0;Se=`${Ut+Yt/2}px`}let He=ae==="top"||ae==="left"?`calc(100% + ${pe}px)`:`${-pe}px`;return Qe&&ee&&Math.abs(N.shift?.y||0)>pe&&(He=`${U.reference.y+U.reference.height/2-Ae}px`),_.style.setProperty(ao,ee?`${Se} ${He}`:`${He} ${Se}`),{}}},io,y),xe(()=>{!p&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[p,h]);const Be=b.useMemo(()=>({ancestorScroll:!d,elementResize:!d&&typeof ResizeObserver<"u",layoutShift:!d&&typeof IntersectionObserver<"u"}),[d]),{refs:ce,elements:ge,x:tt,y:nt,middlewareData:le,update:be,placement:ot,context:it,isPositioned:Q,floatingStyles:st}=t({rootContext:h,open:m?p:void 0,placement:Ht,middleware:re,strategy:o,whileElementsMounted:m?void 0:(...C)=>bt(...C,Be),nodeId:R,externalTree:v}),{sideX:rt,sideY:ct}=le.adaptiveOrigin||so,ve=Q?o:"fixed",lt=b.useMemo(()=>{let C;return Q?y?C={position:ve,[rt]:tt,[ct]:nt}:C={...st,position:ve}:C={position:ve,top:0,left:0},C[Rt]="100vw",C[At]="100vh",Q||(C.opacity=0),C},[y,ve,rt,tt,ct,nt,st,Q]),Re=b.useRef(null);xe(()=>{if(!p)return;const C=F.current,_=typeof C=="function"?C():C,I=(St(_)?_.current:_)||null||null;I!==Re.current&&(ce.setPositionReference(I),Re.current=I)},[p,ce,T,F]),b.useEffect(()=>{if(!p)return;const C=F.current;typeof C!="function"&&St(C)&&C.current!==Re.current&&(ce.setPositionReference(C.current),Re.current=C.current)},[p,ce,T,F]),b.useEffect(()=>{if(m&&p&&ge.reference&&ge.floating)return bt(ge.reference,ge.floating,be,Be)},[m,p,ge,be,Be]);const fe=j(ot),ft=Bt(i,fe,B),at=G(ot)||"center",ut=!!le.hide?.referenceHidden;xe(()=>{A&&p&&Q&&fe!==we&&S(fe)},[A,p,Q,fe,we]);const dt=b.useMemo(()=>({position:"absolute",top:le.arrow?.y,left:le.arrow?.x}),[le.arrow]),mt=le.arrow?.centerOffset!==0;return b.useMemo(()=>({positionerStyles:lt,arrowStyles:dt,arrowRef:ie,arrowUncentered:mt,side:ft,align:at,physicalSide:fe,anchorHidden:ut,refs:ce,context:it,isPositioned:Q,update:be}),[lt,dt,ie,mt,ft,at,fe,ut,ce,it,Q,be])}function St(e){return e!=null&&"current"in e}function mo(e){return e==="starting"?Zt:en}function xo(e,t,{styles:n,transitionStatus:o,props:i,refs:s,hidden:r,inert:c=!1}){const l={...n};return c&&(l.pointerEvents="none"),tn("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:r,style:l},mo(o),i],stateAttributesMapping:on})}export{xo as a,to as b,mo as g,Wn as p,Te as r,po as u};
|