@undefineds.co/xpod 0.4.17 → 0.4.18
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/config/xpod.base.json +3 -0
- package/dist/components/context.jsonld +14 -0
- package/dist/identity/ValidatingIdentityProviderHttpHandler.d.ts +32 -1
- package/dist/identity/ValidatingIdentityProviderHttpHandler.js +53 -1
- package/dist/identity/ValidatingIdentityProviderHttpHandler.jsonld +53 -0
- package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +39 -10
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsList.js +15 -4
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +1 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.js +4 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.d.ts +5 -1
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.js +2 -2
- package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.js +5 -1
- package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +4 -0
- package/node_modules/@undefineds.co/ai-connections/dist/controller.js +3 -1
- package/node_modules/@undefineds.co/extension-sdk/dist/layout.d.ts +39 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/layout.js +40 -0
- package/node_modules/@undefineds.co/extension-sdk/dist/react/app-layout.d.ts +13 -1
- package/node_modules/@undefineds.co/extension-sdk/dist/react/app-layout.js +11 -3
- package/node_modules/@undefineds.co/extension-sdk/dist/react/workspace-layout.d.ts +13 -4
- package/node_modules/@undefineds.co/extension-sdk/dist/react/workspace-layout.js +68 -11
- package/node_modules/@undefineds.co/shared-ui/dist/auth-surface.js +6 -6
- package/node_modules/@undefineds.co/shared-ui/dist/dialog.js +4 -4
- package/node_modules/@undefineds.co/shared-ui/dist/login.js +1 -1
- package/node_modules/@undefineds.co/shared-ui/dist/theme.css +128 -79
- package/node_modules/@undefineds.co/shared-ui/dist/toast.js +1 -1
- package/node_modules/@undefineds.co/shared-ui/dist/tooltip.js +1 -1
- package/node_modules/@undefineds.co/solid-sdk/dist/access-route.cjs +87 -9
- package/node_modules/@undefineds.co/solid-sdk/dist/access-route.d.ts +31 -3
- package/node_modules/@undefineds.co/solid-sdk/dist/access-route.js +156 -14
- package/node_modules/@undefineds.co/solid-sdk/dist/index.cjs +86 -8
- package/package.json +2 -2
- package/static/app/assets/global.css +1 -0
- package/static/app/assets/{index-BCZVzMpj.js → index-BeAi28iA.js} +1 -1
- package/static/app/assets/inrupt-smoke.js +37 -36
- package/static/app/assets/main.js +3 -3
- package/static/app/index.html +2 -2
- package/static/app/inrupt-smoke.html +2 -1
- package/static/dashboard/assets/{AiConfigContext-BedwuLTE.js → AiConfigContext-DelSqO6L.js} +1 -1
- package/static/dashboard/assets/{AiConfigPage-hNTayf8G.js → AiConfigPage-dbg0aDvd.js} +1 -1
- package/static/dashboard/assets/DocumentProcessingPanel-0-3nlwQf.js +1 -0
- package/static/dashboard/assets/IndexLifecyclePanel-DOI3IxOD.js +1 -0
- package/static/dashboard/assets/{IndexSubjectPanel-Bv97-ouZ.js → IndexSubjectPanel-ClDgj0SY.js} +1 -1
- package/static/dashboard/assets/ModelAssignmentsPanel-BSWH19oT.js +1 -0
- package/static/dashboard/assets/ModelsPage-BrzxCkEl.js +11 -0
- package/static/{settings/assets/NetworkPage-D50kdbEu.js → dashboard/assets/NetworkPage-CxEKeaPz.js} +2 -2
- package/static/dashboard/assets/{PaneListHeader-ByqK_C6i.js → PaneListHeader-xEjcBu9g.js} +1 -1
- package/static/dashboard/assets/SearchIndexingPanel-BGlSvEl5.js +1 -0
- package/static/dashboard/assets/{StatusSubjectPanel-DPegcFpA.js → StatusSubjectPanel-6s3JXbOd.js} +1 -1
- package/static/dashboard/assets/StatusWorkspace-LYMDa4b0.js +1 -0
- package/static/dashboard/assets/{SystemSettingsPage-LyXmd6uP.js → SystemSettingsPage-CF_vH-qe.js} +1 -1
- package/static/dashboard/assets/SystemSettingsSubjectPanel-hsfHcJRV.js +33 -0
- package/static/dashboard/assets/{XpodAiConnectionsPodStore-DXNERI2-.js → XpodAiConnectionsPodStore-CHM-ZwI3.js} +1 -1
- package/static/dashboard/assets/{activity-BwRbcTha.js → activity-B7UdTZ1N.js} +1 -1
- package/static/dashboard/assets/{badge-BbRb9MsQ.js → badge-B6RuxNt1.js} +1 -1
- package/static/dashboard/assets/collection-runtime-CKBQm3Fl.js +1 -0
- package/static/dashboard/assets/dashboard-1zrtbMhM.css +1 -0
- package/static/dashboard/assets/{dashboard-D2ozrATv.js → dashboard-Dm_h60lA.js} +175 -135
- package/static/dashboard/assets/{download-SIHe8Y5t.js → download-BW035kpj.js} +1 -1
- package/static/dashboard/assets/{external-link-CiYw5Q4U.js → external-link-BMrNvf3c.js} +1 -1
- package/static/dashboard/assets/{index-DC1jRaVA.js → index-2jlFzexm.js} +1 -1
- package/static/dashboard/assets/index-CQDQ8WVr.js +4 -0
- package/static/dashboard/assets/{key-round-nKtxP6pb.js → key-round-C9vxhn7T.js} +1 -1
- package/static/dashboard/assets/{rotate-ccw-CQm5hHMN.js → rotate-ccw-8Vm0-INc.js} +1 -1
- package/static/dashboard/assets/{skeleton-TKyLbiPs.js → skeleton-CY_602wn.js} +1 -1
- package/static/dashboard/assets/{waypoints-BQS9t0ky.js → waypoints-DdEdgkxD.js} +1 -1
- package/static/dashboard/assets/workspace-layout-Wed840qR.js +1 -0
- package/static/dashboard/dashboard.html +2 -2
- package/static/settings/assets/{AiConfigContext-eLRkXFtH.js → AiConfigContext-CR3YhTA-.js} +1 -1
- package/static/settings/assets/AiConfigPage-DnOvX2Kx.js +1 -0
- package/static/settings/assets/DocumentProcessingPanel-CccpHBs3.js +1 -0
- package/static/settings/assets/IndexLifecyclePanel-BrECzBoM.js +1 -0
- package/static/settings/assets/{IndexSubjectPanel-DT0c11VQ.js → IndexSubjectPanel-CP84xXye.js} +1 -1
- package/static/settings/assets/ModelAssignmentsPanel-DbFi67Kk.js +1 -0
- package/static/settings/assets/ModelsPage-xjHA88qy.js +11 -0
- package/static/settings/assets/NetworkPage-Bj4wc0bh.js +2 -0
- package/static/settings/assets/{PaneListHeader-Da5jZFvG.js → PaneListHeader-Bz0UAhZr.js} +1 -1
- package/static/settings/assets/SearchIndexingPanel-ykhvw1Vl.js +1 -0
- package/static/settings/assets/{StatusSubjectPanel-Upqqlvon.js → StatusSubjectPanel-B2Y6ib3d.js} +1 -1
- package/static/settings/assets/StatusWorkspace-tx3Xg56J.js +1 -0
- package/static/settings/assets/SystemSettingsPage-BbFkv_Wn.js +1 -0
- package/static/settings/assets/SystemSettingsSubjectPanel-CcbpQmTc.js +33 -0
- package/static/settings/assets/{XpodAiConnectionsPodStore-nFgD_usD.js → XpodAiConnectionsPodStore-B11u0BOi.js} +2 -2
- package/static/settings/assets/{activity-CWy1W2W0.js → activity-BE8Hz8WF.js} +1 -1
- package/static/settings/assets/auth-callback-5waKJF0n.js +1 -0
- package/static/settings/assets/{badge-v30yFaaj.js → badge-xeRbYBMf.js} +1 -1
- package/static/settings/assets/collection-runtime-DIBObcT5.js +1 -0
- package/static/settings/assets/{download-C3Dzb60R.js → download-xI5yyfk7.js} +1 -1
- package/static/settings/assets/{external-link-DnkJGKNc.js → external-link-DmbiCMuc.js} +1 -1
- package/static/settings/assets/global-1zrtbMhM.css +1 -0
- package/static/settings/assets/{global-B_WO-aYY.js → global-BOl78fr8.js} +160 -120
- package/static/settings/assets/index-CFVXiUnV.js +4 -0
- package/static/settings/assets/index-DK6qlahe.js +1 -0
- package/static/settings/assets/{index-browser-DzhsXZHm.js → index-browser-Bk7jaLCd.js} +1 -1
- package/static/settings/assets/{key-round-DoDbsLae.js → key-round-B3VIp8oI.js} +1 -1
- package/static/settings/assets/{rotate-ccw-DNR_R3oT.js → rotate-ccw-DRzTN49Z.js} +1 -1
- package/static/settings/assets/{settings-BOznrBjy.js → settings-CCM17CMX.js} +1 -1
- package/static/settings/assets/{skeleton-BjHhu9qI.js → skeleton-Ckhw5HG7.js} +1 -1
- package/static/settings/assets/{waypoints-BXNph9Fd.js → waypoints-BFMI-qS6.js} +1 -1
- package/static/settings/assets/workspace-layout-Co0KpMKd.js +1 -0
- package/static/settings/auth-callback.html +3 -3
- package/static/settings/settings.html +3 -3
- package/static/app/assets/main.css +0 -1
- package/static/dashboard/assets/DocumentProcessingPanel-BSb_vOj7.js +0 -1
- package/static/dashboard/assets/IndexLifecyclePanel-DAHx-PBG.js +0 -1
- package/static/dashboard/assets/ModelAssignmentsPanel-CEJZs9At.js +0 -1
- package/static/dashboard/assets/ModelsPage-DkBVXmKT.js +0 -11
- package/static/dashboard/assets/NetworkPage-BDqKgRZQ.js +0 -2
- package/static/dashboard/assets/SearchIndexingPanel-M-WYaQP3.js +0 -1
- package/static/dashboard/assets/StatusWorkspace-CPIkjO9S.js +0 -1
- package/static/dashboard/assets/SystemSettingsSubjectPanel-CYHqNIn2.js +0 -33
- package/static/dashboard/assets/collection-runtime-BRfZD5oS.js +0 -1
- package/static/dashboard/assets/dashboard-rk080mvG.css +0 -1
- package/static/dashboard/assets/dialog-BbRbILBP.js +0 -1
- package/static/dashboard/assets/index-CExLoewO.js +0 -41
- package/static/dashboard/assets/index-CTgU8YW1.js +0 -4
- package/static/dashboard/assets/workspace-layout-Csbbr3vZ.js +0 -1
- package/static/settings/assets/AiConfigPage-BMO-ytdK.js +0 -1
- package/static/settings/assets/DocumentProcessingPanel-CH-HBRzQ.js +0 -1
- package/static/settings/assets/IndexLifecyclePanel-ChEMn9D8.js +0 -1
- package/static/settings/assets/ModelAssignmentsPanel-T59L_wOk.js +0 -1
- package/static/settings/assets/ModelsPage-m_SP4PdE.js +0 -11
- package/static/settings/assets/SearchIndexingPanel-DQQd3-Jw.js +0 -1
- package/static/settings/assets/StatusWorkspace-CPB49bGd.js +0 -1
- package/static/settings/assets/SystemSettingsPage-C0wrxcNw.js +0 -1
- package/static/settings/assets/SystemSettingsSubjectPanel-BOm7tUH1.js +0 -33
- package/static/settings/assets/auth-callback-HhgEuohz.js +0 -1
- package/static/settings/assets/collection-runtime-B7oomxic.js +0 -1
- package/static/settings/assets/dialog-BAe7moyL.js +0 -1
- package/static/settings/assets/global-rk080mvG.css +0 -1
- package/static/settings/assets/index-B51ot_m_.js +0 -1
- package/static/settings/assets/index-CHBQVfuZ.js +0 -41
- package/static/settings/assets/index-DbqRFton.js +0 -4
- package/static/settings/assets/workspace-layout-TZ7fteel.js +0 -1
- /package/static/app/assets/{_commonjsHelpers-B-UnjaXt.js → global-BGMlqT2c.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o}from"./dashboard-
|
|
1
|
+
import{c as o}from"./dashboard-Dm_h60lA.js";const a=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],e=o("download",a);export{e as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./dashboard-
|
|
1
|
+
import{c as a}from"./dashboard-Dm_h60lA.js";const e=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],n=a("external-link",e);export{n as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as P,u as ct,Q as ye,m as ve,l as Yt,T as be,j as J,P as Pt}from"./dashboard-D2ozrATv.js";var Ae=Object.defineProperty,Re=(t,e)=>Ae(t,"name",{value:e,configurable:!0});function qt(t){const[e,n]=P.useState(void 0);return ct(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,c;if("borderBoxSize"in s){const l=s.borderBoxSize,a=Array.isArray(l)?l[0]:l;i=a.inlineSize,c=a.blockSize}else i=t.offsetWidth,c=t.offsetHeight;n({width:i,height:c})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}Re(qt,"useSize");const Oe=["top","right","bottom","left"],q=Math.min,B=Math.max,at=Math.round,st=Math.floor,j=t=>({x:t,y:t}),Pe={left:"right",right:"left",bottom:"top",top:"bottom"};function Ut(t,e,n){return B(t,q(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function et(t){return t.split("-")[1]}function Ct(t){return t==="x"?"y":"x"}function St(t){return t==="y"?"height":"width"}function z(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Et(t){return Ct(z(t))}function Ce(t,e,n){n===void 0&&(n=!1);const o=et(t),r=Et(t),s=St(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(i=ft(i)),[i,ft(i)]}function Se(t){const e=ft(t);return[Rt(t),e,Rt(e)]}function Rt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Ft=["left","right"],Ht=["right","left"],Ee=["top","bottom"],Le=["bottom","top"];function Te(t,e,n){switch(t){case"top":case"bottom":return n?e?Ht:Ft:e?Ft:Ht;case"left":case"right":return e?Ee:Le;default:return[]}}function De(t,e,n,o){const r=et(t);let s=Te(U(t),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),e&&(s=s.concat(s.map(Rt)))),s}function ft(t){const e=U(t);return Pe[e]+t.slice(e.length)}function $e(t){var e,n,o,r;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(r=t.left)!=null?r:0}}function Kt(t){return typeof t!="number"?$e(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function kt(t,e,n){let{reference:o,floating:r}=t;const s=z(e),i=Et(e),c=St(i),l=U(e),a=s==="y",d=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let f;switch(l){case"top":f={x:d,y:o.y-r.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-r.width,y:u};break;default:f={x:o.x,y:o.y}}const p=et(e);return p&&(f[i]+=m*(p==="end"?1:-1)*(n&&a?-1:1)),f}async function _e(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),p=Kt(f),w=c[m?u==="floating"?"reference":"floating":u],g=ut(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},A=ut(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-A.top+p.top)/v.y,bottom:(A.bottom-g.bottom+p.bottom)/v.y,left:(g.left-A.left+p.left)/v.x,right:(A.right-g.right+p.right)/v.x}}const Me=50,We=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:_e},l=await(i.isRTL==null?void 0:i.isRTL(e));let a=await i.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:u}=kt(a,o,l),m=o,f=0;const p={};for(let h=0;h<s.length;h++){const w=s[h];if(!w)continue;const{name:g,fn:x}=w,{x:b,y:v,data:A,reset:y}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:a,platform:c,elements:{reference:t,floating:e}});d=b??d,u=v??u,p[g]={...p[g],...A},y&&f<Me&&(f++,typeof y=="object"&&(y.placement&&(m=y.placement),y.rects&&(a=y.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:r}):y.rects),{x:d,y:u}=kt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:r,middlewareData:p}},Fe=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=I(t,e)||{};if(a==null)return{};const u=Kt(d),m={x:n,y:o},f=Et(r),p=St(f),h=await i.getDimensions(a),w=f==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",v=s.reference[p]+s.reference[f]-m[f]-s.floating[p],A=m[f]-s.reference[f],y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a));let O=y?y[b]:0;(!O||!await(i.isElement==null?void 0:i.isElement(y)))&&(O=c.floating[b]||s.floating[p]);const S=v/2-A/2,$=O/2-h[p]/2-1,C=q(u[g],$),H=q(u[x],$),k=O-h[p]-H,D=O/2-h[p]/2+S,E=Ut(C,D,k),W=!l.arrow&&et(r)!=null&&D!==E&&s.reference[p]/2-(D<C?C:H)-h[p]/2<0,L=W?D<C?D-C:D-k:0;return{[f]:m[f]+L,data:{[f]:E,centerOffset:D-E-L,...W&&{alignmentOffset:L}},reset:W}}}),He=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=U(r),x=z(c),b=U(c)===c,v=await(l.isRTL==null?void 0:l.isRTL(a.floating)),A=m||(b||!h?[ft(c)]:Se(c)),y=p!=="none";!m&&y&&A.push(...De(c,h,p,v));const O=[c,...A],S=await l.detectOverflow(e,w),$=[];let C=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&$.push(S[g]),u){const E=Ce(r,i,v);$.push(S[E[0]],S[E[1]])}if(C=[...C,{placement:r,overflows:$}],!$.every(E=>E<=0)){var H,k;const E=(((H=s.flip)==null?void 0:H.index)||0)+1,W=O[E];if(W&&(!(u==="alignment"?x!==z(W):!1)||C.every(R=>z(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:E,overflows:C},reset:{placement:W}};let L=(k=C.filter(_=>_.overflows[0]<=0).sort((_,R)=>_.overflows[1]-R.overflows[1])[0])==null?void 0:k.placement;if(!L)switch(f){case"bestFit":{var D;const _=(D=C.filter(R=>{if(y){const T=z(R.placement);return T===x||T==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,F)=>T+F,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:D[0];_&&(L=_);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}};function zt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Nt(t){return Oe.some(e=>t[e]>=0)}const ke=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...s}=I(t,e);switch(r){case"referenceHidden":{const i=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=zt(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Nt(c)}}}case"escaped":{const i=await o.detectOverflow(e,{...s,altBoundary:!0}),c=zt(i,n.floating);return{data:{escapedOffsets:c,escaped:Nt(c)}}}default:return{}}}}},Zt=new Set(["left","top"]);async function ze(t,e){const{placement:n,platform:o,elements:r}=t,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=U(n),c=et(n),l=z(n)==="y",a=Zt.has(i)?-1:1,d=s&&l?-1:1,u=I(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(f=c==="end"?p*-1:p),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}const Ne=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=e,l=await ze(e,t);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},Ve=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:s}=e,{mainAxis:i=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:b,y:v}=x;return{x:b,y:v}}},...a}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,a),m=z(r),f=Ct(m);let p=d[f],h=d[m];const w=(x,b)=>Ut(b+u[x==="y"?"top":"left"],b,b-u[x==="y"?"bottom":"right"]);i&&(p=w(f,p)),c&&(h=w(m,h));const g=l.fn({...e,[f]:p,[m]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:i,[m]:c}}}}}},Be=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,o;const{x:r,y:s,placement:i,rects:c,middlewareData:l}=e,{offset:a=0,mainAxis:d=!0,crossAxis:u=!0}=I(t,e),m={x:r,y:s},f=z(i),p=Ct(f);let h=m[p],w=m[f];const g=I(a,e),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(n=g.mainAxis)!=null?n:0,crossAxis:(o=g.crossAxis)!=null?o:0};if(d){const A=p==="y"?"height":"width",y=c.reference[p]-c.floating[A]+x.mainAxis,O=c.reference[p]+c.reference[A]-x.mainAxis;h<y?h=y:h>O&&(h=O)}if(u){var b,v;const A=p==="y"?"width":"height",y=Zt.has(U(i)),O=c.reference[f]-c.floating[A]+(y&&((b=l.offset)==null?void 0:b[f])||0)+(y?0:x.crossAxis),S=c.reference[f]+c.reference[A]+(y?0:((v=l.offset)==null?void 0:v[f])||0)-(y?x.crossAxis:0);w<O?w=O:w>S&&(w=S)}return{[p]:h,[f]:w}}}},je=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:r,elements:s}=e,{apply:i=()=>{},...c}=I(t,e),l=await r.detectOverflow(e,c),a=U(n),d=et(n),u=z(n)==="y",{width:m,height:f}=o.floating;let p,h;a==="top"||a==="bottom"?(p=a,h=d===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(h=a,p=d==="end"?"top":"bottom");const w=f-l.top-l.bottom,g=m-l.left-l.right,x=q(f-l[p],w),b=q(m-l[h],g),v=e.middlewareData.shift,A=!v;let y=x,O=b;v!=null&&v.enabled.x&&(O=g),v!=null&&v.enabled.y&&(y=w),A&&!d&&(u?O=m-2*B(l.left,l.right):y=f-2*B(l.top,l.bottom)),await i({...e,availableWidth:O,availableHeight:y});const S=await r.getDimensions(s.floating);return m!==S.width||f!==S.height?{reset:{rects:!0}}:{}}}};function pt(){return typeof window<"u"}function nt(t){return Gt(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function X(t){var e;return(e=(Gt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Gt(t){return pt()?t instanceof Node||t instanceof M(t).Node:!1}function N(t){return pt()?t instanceof Element||t instanceof M(t).Element:!1}function K(t){return pt()?t instanceof HTMLElement||t instanceof M(t).HTMLElement:!1}function Vt(t){return!pt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof M(t).ShadowRoot}function mt(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=V(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&r!=="inline"&&r!=="contents"}function Ie(t){return/^(table|td|th)$/.test(nt(t))}function ht(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Xe=/transform|translate|scale|rotate|perspective|filter/,Ye=/paint|layout|strict|content/,Z=t=>!!t&&t!=="none";let vt;function Lt(t){const e=N(t)?V(t):t;return Z(e.transform)||Z(e.translate)||Z(e.scale)||Z(e.rotate)||Z(e.perspective)||!Tt()&&(Z(e.backdropFilter)||Z(e.filter))||Xe.test(e.willChange||"")||Ye.test(e.contain||"")}function qe(t){let e=G(t);for(;K(e)&&!ot(e);){if(Lt(e))return e;if(ht(e))return null;e=G(e)}return null}function Tt(){return vt==null&&(vt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vt}function ot(t){return/^(html|body|#document)$/.test(nt(t))}function V(t){return M(t).getComputedStyle(t)}function gt(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if(nt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Vt(t)&&t.host||X(t);return Vt(e)?e.host:e}function Qt(t){const e=G(t);return ot(e)?(t.ownerDocument||t).body:K(e)&&mt(e)?e:Qt(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Qt(t),s=r===((o=t.ownerDocument)==null?void 0:o.body),i=M(r);if(s){const c=Ot(i);return e.concat(i,i.visualViewport||[],mt(r)?r:[],c&&n?rt(c):[])}else return e.concat(r,rt(r,[],n))}function Ot(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Jt(t){const e=V(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=K(t),s=r?t.offsetWidth:n,i=r?t.offsetHeight:o,c=at(n)!==s||at(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function Dt(t){return N(t)?t:t.contextElement}function tt(t){const e=Dt(t);if(!K(e))return j(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:s}=Jt(e);let i=(s?at(n.width):n.width)/o,c=(s?at(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Ue=j(0);function te(t){const e=M(t);return!Tt()||!e.visualViewport?Ue:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ke(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===M(t)}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=Dt(t);let i=j(1);e&&(o?N(o)&&(i=tt(o)):i=tt(t));const c=Ke(s,n,o)?te(s):j(0);let l=(r.left+c.x)/i.x,a=(r.top+c.y)/i.y,d=r.width/i.x,u=r.height/i.y;if(s&&o){const m=M(s),f=N(o)?M(o):o;let p=m,h=Ot(p);for(;h&&f!==p;){const w=tt(h),g=h.getBoundingClientRect(),x=V(h),b=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,v=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,d*=w.x,u*=w.y,l+=b,a+=v,p=M(h),h=Ot(p)}}return ut({width:d,height:u,x:l,y:a})}function wt(t,e){const n=gt(t).scrollLeft;return e?e.left+n:Q(X(t)).left+n}function ee(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function Ze(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const s=r==="fixed",i=X(o),c=e?ht(e.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},a=j(1);const d=j(0),u=K(o);if((u||!s)&&((nt(o)!=="body"||mt(i))&&(l=gt(o)),u)){const f=Q(o);a=tt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=i&&!u&&!s?ee(i,l):j(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ge(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Qe(t){const e=gt(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+wt(t);const i=-e.scrollTop;return V(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:i}}const Je=25;function tn(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=M(t),s=X(t),i=r.visualViewport;let c=s.clientWidth,l=s.clientHeight,a=0,d=0;if(i){const m=!Tt()||e==="fixed";o?m||(a=-i.offsetLeft,d=-i.offsetTop):(c=i.width,l=i.height,m&&(a=i.offsetLeft,d=i.offsetTop))}if(wt(s)<=0){const m=s.ownerDocument,f=m.body,p=getComputedStyle(f),h=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-h),g=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;g<=Je&&(c-=g)}return{width:c,height:l,x:a,y:d}}function en(t,e){const n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,s=tt(t),i=t.clientWidth*s.x,c=t.clientHeight*s.y,l=r*s.x,a=o*s.y;return{width:i,height:c,x:l,y:a}}function Bt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=tn(t,n,e);else if(e==="document")o=Qe(X(t));else if(N(e))o=en(e,n);else{const r=te(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ut(o)}function nn(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(c=>N(c)&&nt(c)!=="body"),r=null;const s=V(t).position==="fixed";let i=s?G(t):t;for(;N(i)&&!ot(i);){const c=V(i),l=Lt(i),a=r?r.position:s?"fixed":"";!l&&(a==="fixed"||a==="absolute"&&c.position==="static")?o=o.filter(u=>u!==i):r=c,i=G(i)}return e.set(t,o),o}function on(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[...n==="clippingAncestors"?ht(e)?[]:nn(e,this._c):[].concat(n),o],c=Bt(e,i[0],r);let l=c.top,a=c.right,d=c.bottom,u=c.left;for(let m=1;m<i.length;m++){const f=Bt(e,i[m],r);l=B(f.top,l),a=q(f.right,a),d=q(f.bottom,d),u=B(f.left,u)}return{width:a-u,height:d-l,x:u,y:l}}function rn(t){const{width:e,height:n}=Jt(t);return{width:e,height:n}}function sn(t,e,n){const o=K(e),r=X(e),s=n==="fixed",i=Q(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=j(0);if((o||!s)&&((nt(e)!=="body"||mt(r))&&(c=gt(e)),o)){const m=Q(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&r&&(l.x=wt(r));const a=r&&!o&&!s?ee(r,c):j(0),d=i.left+c.scrollLeft-l.x-a.x,u=i.top+c.scrollTop-l.y-a.y;return{x:d,y:u,width:i.width,height:i.height}}function bt(t){return V(t).position==="static"}function jt(t,e){if(!K(t)||V(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){const n=M(t);if(ht(t))return n;if(!K(t)){let r=G(t);for(;r&&!ot(r);){if(N(r)&&!bt(r))return r;r=G(r)}return n}let o=jt(t,e);for(;o&&Ie(o)&&bt(o);)o=jt(o,e);return o&&ot(o)&&bt(o)&&!Lt(o)?n:o||qe(t)||n}const cn=async function(t){const e=this.getOffsetParent||ne,n=this.getDimensions,o=await n(t.floating);return{reference:sn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ln(t){return V(t).direction==="rtl"}const an={convertOffsetParentRelativeRectToViewportRelativeRect:Ze,getDocumentElement:X,getClippingRect:on,getOffsetParent:ne,getElementRects:cn,getClientRects:Ge,getDimensions:rn,getScale:tt,isElement:N,isRTL:ln};function oe(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function fn(t,e,n){let o=null,r;const s=X(t);function i(){var d;clearTimeout(r),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),i();const m=t.getBoundingClientRect(),{left:f,top:p,width:h,height:w}=m;if(d||e(),!h||!w)return;const g=st(p),x=st(s.clientWidth-(f+h)),b=st(s.clientHeight-(p+w)),v=st(f),y={rootMargin:-g+"px "+-x+"px "+-b+"px "+-v+"px",threshold:B(0,q(1,u))||1};let O=!0;function S($){const C=$[0].intersectionRatio;if(!oe(m,t.getBoundingClientRect()))return c();if(C!==u){if(!O)return c();C?c(!1,C):r=setTimeout(()=>{c(!1,1e-7)},1e3)}O=!1}try{o=new IntersectionObserver(S,{...y,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,y)}o.observe(t)}const l=M(t),a=()=>c(n);return l.addEventListener("resize",a),c(!0),()=>{l.removeEventListener("resize",a),i()}}function un(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Dt(t),d=r||s?[...a?rt(a):[],...e?rt(e):[]]:[];d.forEach(g=>{r&&g.addEventListener("scroll",n),s&&g.addEventListener("resize",n)});const u=a&&c?fn(a,n,s):null;let m=-1,f=null;i&&(f=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(e)})),n()}),a&&!l&&f.observe(a),e&&f.observe(e));let p,h=l?Q(t):null;l&&w();function w(){const g=Q(t);h&&!oe(h,g)&&n(),h=g,p=requestAnimationFrame(w)}return n(),()=>{var g;d.forEach(x=>{r&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const dn=Ne,pn=Ve,mn=He,hn=je,gn=ke,It=Fe,wn=Be,xn=(t,e,n)=>{const o=new Map,r=n??{},s={...an,...r.platform,_c:o};return We(t,e,{...r,platform:s})};var yn=typeof document<"u",vn=function(){},lt=yn?P.useLayoutEffect:vn;function dt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!dt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&t.$$typeof)&&!dt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function re(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Xt(t,e){const n=re(t);return Math.round(e*n)/n}function At(t){const e=P.useRef(t);return lt(()=>{e.current=t}),e}function bn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[d,u]=P.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,f]=P.useState(o);dt(m,o)||f(o);const[p,h]=P.useState(null),[w,g]=P.useState(null),x=P.useCallback(R=>{R!==y.current&&(y.current=R,h(R))},[]),b=P.useCallback(R=>{R!==O.current&&(O.current=R,g(R))},[]),v=s||p,A=i||w,y=P.useRef(null),O=P.useRef(null),S=P.useRef(d),$=l!=null,C=At(l),H=At(r),k=At(a),D=P.useCallback(()=>{if(!y.current||!O.current)return;const R={placement:e,strategy:n,middleware:m};H.current&&(R.platform=H.current),xn(y.current,O.current,R).then(T=>{const F={...T,isPositioned:k.current!==!1};E.current&&!dt(S.current,F)&&(S.current=F,ye.flushSync(()=>{u(F)}))})},[m,e,n,H,k]);lt(()=>{a===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[a]);const E=P.useRef(!1);lt(()=>(E.current=!0,()=>{E.current=!1}),[]),lt(()=>{if(v&&(y.current=v),A&&(O.current=A),v&&A){if(C.current)return C.current(v,A,D);D()}},[v,A,D,C,$]);const W=P.useMemo(()=>({reference:y,floating:O,setReference:x,setFloating:b}),[x,b]),L=P.useMemo(()=>({reference:v,floating:A}),[v,A]),_=P.useMemo(()=>{const R={position:n,left:0,top:0};if(!L.floating)return R;const T=Xt(L.floating,d.x),F=Xt(L.floating,d.y);return c?{...R,transform:"translate("+T+"px, "+F+"px)",...re(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:F}},[n,c,L.floating,d.x,d.y]);return P.useMemo(()=>({...d,update:D,refs:W,elements:L,floatingStyles:_}),[d,D,W,L,_])}const An=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?It({element:o.current,padding:r}).fn(n):{}:o?It({element:o,padding:r}).fn(n):{}}}},Rn=(t,e)=>{const n=dn(t);return{name:n.name,fn:n.fn,options:[t,e]}},On=(t,e)=>{const n=pn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Pn=(t,e)=>({fn:wn(t).fn,options:[t,e]}),Cn=(t,e)=>{const n=mn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Sn=(t,e)=>{const n=hn(t);return{name:n.name,fn:n.fn,options:[t,e]}},En=(t,e)=>{const n=gn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Ln=(t,e)=>{const n=An(t);return{name:n.name,fn:n.fn,options:[t,e]}};var Tn=Object.defineProperty,Y=(t,e)=>Tn(t,"name",{value:e,configurable:!0}),ie="Popper",[se,jn]=ve(ie),[Dn,ce]=se(ie),$n=Y(t=>{const{__scopePopper:e,children:n}=t,[o,r]=P.useState(null),[s,i]=P.useState(void 0);return J.jsx(Dn,{scope:e,anchor:o,onAnchorChange:r,placementState:s,setPlacementState:i,children:n})},"Popper"),_n="PopperAnchor",Mn=P.forwardRef(Y(function(e,n){const{__scopePopper:o,virtualRef:r,...s}=e,i=ce(_n,o),c=P.useRef(null),l=i.onAnchorChange,a=P.useCallback(h=>{c.current=h,h&&l(h)},[l]),d=Yt(n,a),u=P.useRef(null);P.useEffect(()=>{if(!r)return;const h=u.current;u.current=r.current,h!==u.current&&l(u.current)});const m=i.placementState&&xt(i.placementState),f=m?.[0],p=m?.[1];return r?null:J.jsx(Pt.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...s,ref:d})},"PopperAnchor")),le="PopperContent",[Wn,In]=se(le),Fn=P.forwardRef(Y(function(e,n){const{__scopePopper:o,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:a=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:m="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:h,...w}=e,g=ce(le,o),[x,b]=P.useState(null),v=Yt(n,b),[A,y]=P.useState(null),O=qt(A),S=O?.width??0,$=O?.height??0,C=r+(i!=="center"?"-"+i:""),H=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(d)?d:[d],D=k.length>0,E={padding:H,boundary:k.filter(ae),altBoundary:D},{refs:W,floatingStyles:L,placement:_,isPositioned:R,middlewareData:T}=bn({strategy:"fixed",placement:C,whileElementsMounted:Y((...yt)=>un(...yt,{animationFrame:p==="always"}),"whileElementsMounted"),elements:{reference:g.anchor},middleware:[Rn({mainAxis:s+$,alignmentAxis:c}),a&&On({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Pn():void 0,...E}),a&&Cn({...E}),Sn({...E,apply:Y(({elements:yt,rects:Wt,availableWidth:he,availableHeight:ge})=>{const{width:we,height:xe}=Wt.reference,it=yt.floating.style;it.setProperty("--radix-popper-available-width",`${he}px`),it.setProperty("--radix-popper-available-height",`${ge}px`),it.setProperty("--radix-popper-anchor-width",`${we}px`),it.setProperty("--radix-popper-anchor-height",`${xe}px`)},"apply")}),A&&Ln({element:A,padding:l}),Hn({arrowWidth:S,arrowHeight:$}),f&&En({strategy:"referenceHidden",...E,boundary:D?E.boundary:void 0})]}),F=g.setPlacementState;ct(()=>(F(_),()=>{F(void 0)}),[_,F]);const[$t,_t]=xt(_),Mt=be(h);ct(()=>{R&&Mt?.()},[R,Mt]);const fe=T.arrow?.x,ue=T.arrow?.y,de=T.arrow?.centerOffset!==0,[pe,me]=P.useState();return ct(()=>{x&&me(window.getComputedStyle(x).zIndex)},[x]),J.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:R?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:J.jsx(Wn,{scope:o,placedSide:$t,placedAlign:_t,onArrowChange:y,arrowX:fe,arrowY:ue,shouldHideArrow:de,children:J.jsx(Pt.div,{"data-side":$t,"data-align":_t,...w,ref:v,style:{...w.style,animation:R?w.style?.animation:"none"}})})})},"PopperContent"));function ae(t){return t!==null}Y(ae,"isNotNull");var Hn=Y(t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:r}=e,i=r.arrow?.centerOffset!==0,c=i?0:t.arrowWidth,l=i?0:t.arrowHeight,[a,d]=xt(n),u={start:"0%",center:"50%",end:"100%"}[d],m=(r.arrow?.x??0)+c/2,f=(r.arrow?.y??0)+l/2;let p="",h="";return a==="bottom"?(p=i?u:`${m}px`,h=`${-l}px`):a==="top"?(p=i?u:`${m}px`,h=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,h=i?u:`${f}px`):a==="left"&&(p=`${o.floating.width+l}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}}),"transformOrigin");function xt(t){const[e,n="center"]=t.split("-");return[e,n]}Y(xt,"getSideAndAlignFromPlacement");var Xn=$n,Yn=Mn,qn=Fn,kn=Object.defineProperty,zn=(t,e)=>kn(t,"name",{value:e,configurable:!0}),Nn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Vn=P.forwardRef(zn(function(e,n){return J.jsx(Pt.span,{...e,ref:n,style:{...Nn,...e.style}})},"VisuallyHidden")),Un=Vn;export{Yn as A,qn as C,Xn as R,Nn as V,Un as a,jn as c};
|
|
1
|
+
import{r as C,T as ct,U as ye,V as ve,W as Yt,X as be,j as Q,Y as Ct}from"./dashboard-Dm_h60lA.js";var Ae=Object.defineProperty,Re=(t,e)=>Ae(t,"name",{value:e,configurable:!0});function Ut(t){const[e,n]=C.useState(void 0);return ct(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,c;if("borderBoxSize"in s){const l=s.borderBoxSize,a=Array.isArray(l)?l[0]:l;i=a.inlineSize,c=a.blockSize}else i=t.offsetWidth,c=t.offsetHeight;n({width:i,height:c})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}Re(Ut,"useSize");const Oe=["top","right","bottom","left"],U=Math.min,B=Math.max,at=Math.round,st=Math.floor,j=t=>({x:t,y:t}),Ce={left:"right",right:"left",bottom:"top",top:"bottom"};function qt(t,e,n){return B(t,U(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function q(t){return t.split("-")[0]}function et(t){return t.split("-")[1]}function Pt(t){return t==="x"?"y":"x"}function St(t){return t==="y"?"height":"width"}function z(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Et(t){return Pt(z(t))}function Pe(t,e,n){n===void 0&&(n=!1);const o=et(t),r=Et(t),s=St(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(i=ft(i)),[i,ft(i)]}function Se(t){const e=ft(t);return[Rt(t),e,Rt(e)]}function Rt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Ft=["left","right"],Ht=["right","left"],Ee=["top","bottom"],Le=["bottom","top"];function Te(t,e,n){switch(t){case"top":case"bottom":return n?e?Ht:Ft:e?Ft:Ht;case"left":case"right":return e?Ee:Le;default:return[]}}function De(t,e,n,o){const r=et(t);let s=Te(q(t),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),e&&(s=s.concat(s.map(Rt)))),s}function ft(t){const e=q(t);return Ce[e]+t.slice(e.length)}function $e(t){var e,n,o,r;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(r=t.left)!=null?r:0}}function Kt(t){return typeof t!="number"?$e(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function kt(t,e,n){let{reference:o,floating:r}=t;const s=z(e),i=Et(e),c=St(i),l=q(e),a=s==="y",d=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let f;switch(l){case"top":f={x:d,y:o.y-r.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-r.width,y:u};break;default:f={x:o.x,y:o.y}}const p=et(e);return p&&(f[i]+=m*(p==="end"?1:-1)*(n&&a?-1:1)),f}async function _e(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),p=Kt(f),w=c[m?u==="floating"?"reference":"floating":u],g=ut(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},A=ut(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-A.top+p.top)/v.y,bottom:(A.bottom-g.bottom+p.bottom)/v.y,left:(g.left-A.left+p.left)/v.x,right:(A.right-g.right+p.right)/v.x}}const Me=50,We=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:_e},l=await(i.isRTL==null?void 0:i.isRTL(e));let a=await i.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:u}=kt(a,o,l),m=o,f=0;const p={};for(let h=0;h<s.length;h++){const w=s[h];if(!w)continue;const{name:g,fn:x}=w,{x:b,y:v,data:A,reset:y}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:a,platform:c,elements:{reference:t,floating:e}});d=b??d,u=v??u,p[g]={...p[g],...A},y&&f<Me&&(f++,typeof y=="object"&&(y.placement&&(m=y.placement),y.rects&&(a=y.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:r}):y.rects),{x:d,y:u}=kt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:r,middlewareData:p}},Fe=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=I(t,e)||{};if(a==null)return{};const u=Kt(d),m={x:n,y:o},f=Et(r),p=St(f),h=await i.getDimensions(a),w=f==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",v=s.reference[p]+s.reference[f]-m[f]-s.floating[p],A=m[f]-s.reference[f],y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a));let O=y?y[b]:0;(!O||!await(i.isElement==null?void 0:i.isElement(y)))&&(O=c.floating[b]||s.floating[p]);const S=v/2-A/2,$=O/2-h[p]/2-1,P=U(u[g],$),H=U(u[x],$),k=O-h[p]-H,D=O/2-h[p]/2+S,E=qt(P,D,k),W=!l.arrow&&et(r)!=null&&D!==E&&s.reference[p]/2-(D<P?P:H)-h[p]/2<0,L=W?D<P?D-P:D-k:0;return{[f]:m[f]+L,data:{[f]:E,centerOffset:D-E-L,...W&&{alignmentOffset:L}},reset:W}}}),He=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=q(r),x=z(c),b=q(c)===c,v=await(l.isRTL==null?void 0:l.isRTL(a.floating)),A=m||(b||!h?[ft(c)]:Se(c)),y=p!=="none";!m&&y&&A.push(...De(c,h,p,v));const O=[c,...A],S=await l.detectOverflow(e,w),$=[];let P=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&$.push(S[g]),u){const E=Pe(r,i,v);$.push(S[E[0]],S[E[1]])}if(P=[...P,{placement:r,overflows:$}],!$.every(E=>E<=0)){var H,k;const E=(((H=s.flip)==null?void 0:H.index)||0)+1,W=O[E];if(W&&(!(u==="alignment"?x!==z(W):!1)||P.every(R=>z(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:E,overflows:P},reset:{placement:W}};let L=(k=P.filter(_=>_.overflows[0]<=0).sort((_,R)=>_.overflows[1]-R.overflows[1])[0])==null?void 0:k.placement;if(!L)switch(f){case"bestFit":{var D;const _=(D=P.filter(R=>{if(y){const T=z(R.placement);return T===x||T==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,F)=>T+F,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:D[0];_&&(L=_);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}};function zt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Nt(t){return Oe.some(e=>t[e]>=0)}const ke=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...s}=I(t,e);switch(r){case"referenceHidden":{const i=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=zt(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Nt(c)}}}case"escaped":{const i=await o.detectOverflow(e,{...s,altBoundary:!0}),c=zt(i,n.floating);return{data:{escapedOffsets:c,escaped:Nt(c)}}}default:return{}}}}},Zt=new Set(["left","top"]);async function ze(t,e){const{placement:n,platform:o,elements:r}=t,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=q(n),c=et(n),l=z(n)==="y",a=Zt.has(i)?-1:1,d=s&&l?-1:1,u=I(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(f=c==="end"?p*-1:p),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}const Ne=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=e,l=await ze(e,t);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},Ve=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:s}=e,{mainAxis:i=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:b,y:v}=x;return{x:b,y:v}}},...a}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,a),m=z(r),f=Pt(m);let p=d[f],h=d[m];const w=(x,b)=>qt(b+u[x==="y"?"top":"left"],b,b-u[x==="y"?"bottom":"right"]);i&&(p=w(f,p)),c&&(h=w(m,h));const g=l.fn({...e,[f]:p,[m]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:i,[m]:c}}}}}},Be=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,o;const{x:r,y:s,placement:i,rects:c,middlewareData:l}=e,{offset:a=0,mainAxis:d=!0,crossAxis:u=!0}=I(t,e),m={x:r,y:s},f=z(i),p=Pt(f);let h=m[p],w=m[f];const g=I(a,e),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(n=g.mainAxis)!=null?n:0,crossAxis:(o=g.crossAxis)!=null?o:0};if(d){const A=p==="y"?"height":"width",y=c.reference[p]-c.floating[A]+x.mainAxis,O=c.reference[p]+c.reference[A]-x.mainAxis;h<y?h=y:h>O&&(h=O)}if(u){var b,v;const A=p==="y"?"width":"height",y=Zt.has(q(i)),O=c.reference[f]-c.floating[A]+(y&&((b=l.offset)==null?void 0:b[f])||0)+(y?0:x.crossAxis),S=c.reference[f]+c.reference[A]+(y?0:((v=l.offset)==null?void 0:v[f])||0)-(y?x.crossAxis:0);w<O?w=O:w>S&&(w=S)}return{[p]:h,[f]:w}}}},je=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:r,elements:s}=e,{apply:i=()=>{},...c}=I(t,e),l=await r.detectOverflow(e,c),a=q(n),d=et(n),u=z(n)==="y",{width:m,height:f}=o.floating;let p,h;a==="top"||a==="bottom"?(p=a,h=d===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(h=a,p=d==="end"?"top":"bottom");const w=f-l.top-l.bottom,g=m-l.left-l.right,x=U(f-l[p],w),b=U(m-l[h],g),v=e.middlewareData.shift,A=!v;let y=x,O=b;v!=null&&v.enabled.x&&(O=g),v!=null&&v.enabled.y&&(y=w),A&&!d&&(u?O=m-2*B(l.left,l.right):y=f-2*B(l.top,l.bottom)),await i({...e,availableWidth:O,availableHeight:y});const S=await r.getDimensions(s.floating);return m!==S.width||f!==S.height?{reset:{rects:!0}}:{}}}};function pt(){return typeof window<"u"}function nt(t){return Gt(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function X(t){var e;return(e=(Gt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Gt(t){return pt()?t instanceof Node||t instanceof M(t).Node:!1}function N(t){return pt()?t instanceof Element||t instanceof M(t).Element:!1}function K(t){return pt()?t instanceof HTMLElement||t instanceof M(t).HTMLElement:!1}function Vt(t){return!pt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof M(t).ShadowRoot}function mt(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=V(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&r!=="inline"&&r!=="contents"}function Ie(t){return/^(table|td|th)$/.test(nt(t))}function ht(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Xe=/transform|translate|scale|rotate|perspective|filter/,Ye=/paint|layout|strict|content/,Z=t=>!!t&&t!=="none";let vt;function Lt(t){const e=N(t)?V(t):t;return Z(e.transform)||Z(e.translate)||Z(e.scale)||Z(e.rotate)||Z(e.perspective)||!Tt()&&(Z(e.backdropFilter)||Z(e.filter))||Xe.test(e.willChange||"")||Ye.test(e.contain||"")}function Ue(t){let e=G(t);for(;K(e)&&!ot(e);){if(Lt(e))return e;if(ht(e))return null;e=G(e)}return null}function Tt(){return vt==null&&(vt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vt}function ot(t){return/^(html|body|#document)$/.test(nt(t))}function V(t){return M(t).getComputedStyle(t)}function gt(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if(nt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Vt(t)&&t.host||X(t);return Vt(e)?e.host:e}function Jt(t){const e=G(t);return ot(e)?(t.ownerDocument||t).body:K(e)&&mt(e)?e:Jt(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Jt(t),s=r===((o=t.ownerDocument)==null?void 0:o.body),i=M(r);if(s){const c=Ot(i);return e.concat(i,i.visualViewport||[],mt(r)?r:[],c&&n?rt(c):[])}else return e.concat(r,rt(r,[],n))}function Ot(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qt(t){const e=V(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=K(t),s=r?t.offsetWidth:n,i=r?t.offsetHeight:o,c=at(n)!==s||at(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function Dt(t){return N(t)?t:t.contextElement}function tt(t){const e=Dt(t);if(!K(e))return j(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:s}=Qt(e);let i=(s?at(n.width):n.width)/o,c=(s?at(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const qe=j(0);function te(t){const e=M(t);return!Tt()||!e.visualViewport?qe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ke(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===M(t)}function J(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=Dt(t);let i=j(1);e&&(o?N(o)&&(i=tt(o)):i=tt(t));const c=Ke(s,n,o)?te(s):j(0);let l=(r.left+c.x)/i.x,a=(r.top+c.y)/i.y,d=r.width/i.x,u=r.height/i.y;if(s&&o){const m=M(s),f=N(o)?M(o):o;let p=m,h=Ot(p);for(;h&&f!==p;){const w=tt(h),g=h.getBoundingClientRect(),x=V(h),b=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,v=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,d*=w.x,u*=w.y,l+=b,a+=v,p=M(h),h=Ot(p)}}return ut({width:d,height:u,x:l,y:a})}function wt(t,e){const n=gt(t).scrollLeft;return e?e.left+n:J(X(t)).left+n}function ee(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function Ze(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const s=r==="fixed",i=X(o),c=e?ht(e.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},a=j(1);const d=j(0),u=K(o);if((u||!s)&&((nt(o)!=="body"||mt(i))&&(l=gt(o)),u)){const f=J(o);a=tt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=i&&!u&&!s?ee(i,l):j(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ge(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Je(t){const e=gt(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+wt(t);const i=-e.scrollTop;return V(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:i}}const Qe=25;function tn(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=M(t),s=X(t),i=r.visualViewport;let c=s.clientWidth,l=s.clientHeight,a=0,d=0;if(i){const m=!Tt()||e==="fixed";o?m||(a=-i.offsetLeft,d=-i.offsetTop):(c=i.width,l=i.height,m&&(a=i.offsetLeft,d=i.offsetTop))}if(wt(s)<=0){const m=s.ownerDocument,f=m.body,p=getComputedStyle(f),h=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-h),g=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;g<=Qe&&(c-=g)}return{width:c,height:l,x:a,y:d}}function en(t,e){const n=J(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,s=tt(t),i=t.clientWidth*s.x,c=t.clientHeight*s.y,l=r*s.x,a=o*s.y;return{width:i,height:c,x:l,y:a}}function Bt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=tn(t,n,e);else if(e==="document")o=Je(X(t));else if(N(e))o=en(e,n);else{const r=te(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ut(o)}function nn(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(c=>N(c)&&nt(c)!=="body"),r=null;const s=V(t).position==="fixed";let i=s?G(t):t;for(;N(i)&&!ot(i);){const c=V(i),l=Lt(i),a=r?r.position:s?"fixed":"";!l&&(a==="fixed"||a==="absolute"&&c.position==="static")?o=o.filter(u=>u!==i):r=c,i=G(i)}return e.set(t,o),o}function on(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[...n==="clippingAncestors"?ht(e)?[]:nn(e,this._c):[].concat(n),o],c=Bt(e,i[0],r);let l=c.top,a=c.right,d=c.bottom,u=c.left;for(let m=1;m<i.length;m++){const f=Bt(e,i[m],r);l=B(f.top,l),a=U(f.right,a),d=U(f.bottom,d),u=B(f.left,u)}return{width:a-u,height:d-l,x:u,y:l}}function rn(t){const{width:e,height:n}=Qt(t);return{width:e,height:n}}function sn(t,e,n){const o=K(e),r=X(e),s=n==="fixed",i=J(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=j(0);if((o||!s)&&((nt(e)!=="body"||mt(r))&&(c=gt(e)),o)){const m=J(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&r&&(l.x=wt(r));const a=r&&!o&&!s?ee(r,c):j(0),d=i.left+c.scrollLeft-l.x-a.x,u=i.top+c.scrollTop-l.y-a.y;return{x:d,y:u,width:i.width,height:i.height}}function bt(t){return V(t).position==="static"}function jt(t,e){if(!K(t)||V(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){const n=M(t);if(ht(t))return n;if(!K(t)){let r=G(t);for(;r&&!ot(r);){if(N(r)&&!bt(r))return r;r=G(r)}return n}let o=jt(t,e);for(;o&&Ie(o)&&bt(o);)o=jt(o,e);return o&&ot(o)&&bt(o)&&!Lt(o)?n:o||Ue(t)||n}const cn=async function(t){const e=this.getOffsetParent||ne,n=this.getDimensions,o=await n(t.floating);return{reference:sn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ln(t){return V(t).direction==="rtl"}const an={convertOffsetParentRelativeRectToViewportRelativeRect:Ze,getDocumentElement:X,getClippingRect:on,getOffsetParent:ne,getElementRects:cn,getClientRects:Ge,getDimensions:rn,getScale:tt,isElement:N,isRTL:ln};function oe(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function fn(t,e,n){let o=null,r;const s=X(t);function i(){var d;clearTimeout(r),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),i();const m=t.getBoundingClientRect(),{left:f,top:p,width:h,height:w}=m;if(d||e(),!h||!w)return;const g=st(p),x=st(s.clientWidth-(f+h)),b=st(s.clientHeight-(p+w)),v=st(f),y={rootMargin:-g+"px "+-x+"px "+-b+"px "+-v+"px",threshold:B(0,U(1,u))||1};let O=!0;function S($){const P=$[0].intersectionRatio;if(!oe(m,t.getBoundingClientRect()))return c();if(P!==u){if(!O)return c();P?c(!1,P):r=setTimeout(()=>{c(!1,1e-7)},1e3)}O=!1}try{o=new IntersectionObserver(S,{...y,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,y)}o.observe(t)}const l=M(t),a=()=>c(n);return l.addEventListener("resize",a),c(!0),()=>{l.removeEventListener("resize",a),i()}}function un(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Dt(t),d=r||s?[...a?rt(a):[],...e?rt(e):[]]:[];d.forEach(g=>{r&&g.addEventListener("scroll",n),s&&g.addEventListener("resize",n)});const u=a&&c?fn(a,n,s):null;let m=-1,f=null;i&&(f=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(e)})),n()}),a&&!l&&f.observe(a),e&&f.observe(e));let p,h=l?J(t):null;l&&w();function w(){const g=J(t);h&&!oe(h,g)&&n(),h=g,p=requestAnimationFrame(w)}return n(),()=>{var g;d.forEach(x=>{r&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const dn=Ne,pn=Ve,mn=He,hn=je,gn=ke,It=Fe,wn=Be,xn=(t,e,n)=>{const o=new Map,r=n??{},s={...an,...r.platform,_c:o};return We(t,e,{...r,platform:s})};var yn=typeof document<"u",vn=function(){},lt=yn?C.useLayoutEffect:vn;function dt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!dt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&t.$$typeof)&&!dt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function re(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Xt(t,e){const n=re(t);return Math.round(e*n)/n}function At(t){const e=C.useRef(t);return lt(()=>{e.current=t}),e}function bn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[d,u]=C.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,f]=C.useState(o);dt(m,o)||f(o);const[p,h]=C.useState(null),[w,g]=C.useState(null),x=C.useCallback(R=>{R!==y.current&&(y.current=R,h(R))},[]),b=C.useCallback(R=>{R!==O.current&&(O.current=R,g(R))},[]),v=s||p,A=i||w,y=C.useRef(null),O=C.useRef(null),S=C.useRef(d),$=l!=null,P=At(l),H=At(r),k=At(a),D=C.useCallback(()=>{if(!y.current||!O.current)return;const R={placement:e,strategy:n,middleware:m};H.current&&(R.platform=H.current),xn(y.current,O.current,R).then(T=>{const F={...T,isPositioned:k.current!==!1};E.current&&!dt(S.current,F)&&(S.current=F,ye.flushSync(()=>{u(F)}))})},[m,e,n,H,k]);lt(()=>{a===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[a]);const E=C.useRef(!1);lt(()=>(E.current=!0,()=>{E.current=!1}),[]),lt(()=>{if(v&&(y.current=v),A&&(O.current=A),v&&A){if(P.current)return P.current(v,A,D);D()}},[v,A,D,P,$]);const W=C.useMemo(()=>({reference:y,floating:O,setReference:x,setFloating:b}),[x,b]),L=C.useMemo(()=>({reference:v,floating:A}),[v,A]),_=C.useMemo(()=>{const R={position:n,left:0,top:0};if(!L.floating)return R;const T=Xt(L.floating,d.x),F=Xt(L.floating,d.y);return c?{...R,transform:"translate("+T+"px, "+F+"px)",...re(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:F}},[n,c,L.floating,d.x,d.y]);return C.useMemo(()=>({...d,update:D,refs:W,elements:L,floatingStyles:_}),[d,D,W,L,_])}const An=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?It({element:o.current,padding:r}).fn(n):{}:o?It({element:o,padding:r}).fn(n):{}}}},Rn=(t,e)=>{const n=dn(t);return{name:n.name,fn:n.fn,options:[t,e]}},On=(t,e)=>{const n=pn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Cn=(t,e)=>({fn:wn(t).fn,options:[t,e]}),Pn=(t,e)=>{const n=mn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Sn=(t,e)=>{const n=hn(t);return{name:n.name,fn:n.fn,options:[t,e]}},En=(t,e)=>{const n=gn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Ln=(t,e)=>{const n=An(t);return{name:n.name,fn:n.fn,options:[t,e]}};var Tn=Object.defineProperty,Y=(t,e)=>Tn(t,"name",{value:e,configurable:!0}),ie="Popper",[se,jn]=ve(ie),[Dn,ce]=se(ie),$n=Y(t=>{const{__scopePopper:e,children:n}=t,[o,r]=C.useState(null),[s,i]=C.useState(void 0);return Q.jsx(Dn,{scope:e,anchor:o,onAnchorChange:r,placementState:s,setPlacementState:i,children:n})},"Popper"),_n="PopperAnchor",Mn=C.forwardRef(Y(function(e,n){const{__scopePopper:o,virtualRef:r,...s}=e,i=ce(_n,o),c=C.useRef(null),l=i.onAnchorChange,a=C.useCallback(h=>{c.current=h,h&&l(h)},[l]),d=Yt(n,a),u=C.useRef(null);C.useEffect(()=>{if(!r)return;const h=u.current;u.current=r.current,h!==u.current&&l(u.current)});const m=i.placementState&&xt(i.placementState),f=m?.[0],p=m?.[1];return r?null:Q.jsx(Ct.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...s,ref:d})},"PopperAnchor")),le="PopperContent",[Wn,In]=se(le),Fn=C.forwardRef(Y(function(e,n){const{__scopePopper:o,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:a=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:m="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:h,...w}=e,g=ce(le,o),[x,b]=C.useState(null),v=Yt(n,b),[A,y]=C.useState(null),O=Ut(A),S=O?.width??0,$=O?.height??0,P=r+(i!=="center"?"-"+i:""),H=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(d)?d:[d],D=k.length>0,E={padding:H,boundary:k.filter(ae),altBoundary:D},{refs:W,floatingStyles:L,placement:_,isPositioned:R,middlewareData:T}=bn({strategy:"fixed",placement:P,whileElementsMounted:Y((...yt)=>un(...yt,{animationFrame:p==="always"}),"whileElementsMounted"),elements:{reference:g.anchor},middleware:[Rn({mainAxis:s+$,alignmentAxis:c}),a&&On({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Cn():void 0,...E}),a&&Pn({...E}),Sn({...E,apply:Y(({elements:yt,rects:Wt,availableWidth:he,availableHeight:ge})=>{const{width:we,height:xe}=Wt.reference,it=yt.floating.style;it.setProperty("--radix-popper-available-width",`${he}px`),it.setProperty("--radix-popper-available-height",`${ge}px`),it.setProperty("--radix-popper-anchor-width",`${we}px`),it.setProperty("--radix-popper-anchor-height",`${xe}px`)},"apply")}),A&&Ln({element:A,padding:l}),Hn({arrowWidth:S,arrowHeight:$}),f&&En({strategy:"referenceHidden",...E,boundary:D?E.boundary:void 0})]}),F=g.setPlacementState;ct(()=>(F(_),()=>{F(void 0)}),[_,F]);const[$t,_t]=xt(_),Mt=be(h);ct(()=>{R&&Mt?.()},[R,Mt]);const fe=T.arrow?.x,ue=T.arrow?.y,de=T.arrow?.centerOffset!==0,[pe,me]=C.useState();return ct(()=>{x&&me(window.getComputedStyle(x).zIndex)},[x]),Q.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:R?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Q.jsx(Wn,{scope:o,placedSide:$t,placedAlign:_t,onArrowChange:y,arrowX:fe,arrowY:ue,shouldHideArrow:de,children:Q.jsx(Ct.div,{"data-side":$t,"data-align":_t,...w,ref:v,style:{...w.style,animation:R?w.style?.animation:"none"}})})})},"PopperContent"));function ae(t){return t!==null}Y(ae,"isNotNull");var Hn=Y(t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:r}=e,i=r.arrow?.centerOffset!==0,c=i?0:t.arrowWidth,l=i?0:t.arrowHeight,[a,d]=xt(n),u={start:"0%",center:"50%",end:"100%"}[d],m=(r.arrow?.x??0)+c/2,f=(r.arrow?.y??0)+l/2;let p="",h="";return a==="bottom"?(p=i?u:`${m}px`,h=`${-l}px`):a==="top"?(p=i?u:`${m}px`,h=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,h=i?u:`${f}px`):a==="left"&&(p=`${o.floating.width+l}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}}),"transformOrigin");function xt(t){const[e,n="center"]=t.split("-");return[e,n]}Y(xt,"getSideAndAlignFromPlacement");var Xn=$n,Yn=Mn,Un=Fn,kn=Object.defineProperty,zn=(t,e)=>kn(t,"name",{value:e,configurable:!0}),Nn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Vn=C.forwardRef(zn(function(e,n){return Q.jsx(Ct.span,{...e,ref:n,style:{...Nn,...e.style}})},"VisuallyHidden")),qn=Vn;export{Yn as A,Un as C,Xn as R,Nn as V,qn as a,jn as c};
|