@tom2012/cc-web 2026.4.26-c → 2026.4.26-d
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/README.md +1 -1
- package/backend/dist/approval-manager.d.ts.map +1 -1
- package/backend/dist/approval-manager.js +19 -1
- package/backend/dist/approval-manager.js.map +1 -1
- package/backend/dist/hooks-manager.d.ts.map +1 -1
- package/backend/dist/hooks-manager.js +10 -1
- package/backend/dist/hooks-manager.js.map +1 -1
- package/backend/dist/index.d.ts.map +1 -1
- package/backend/dist/index.js +66 -100
- package/backend/dist/index.js.map +1 -1
- package/backend/dist/notify-service.d.ts.map +1 -1
- package/backend/dist/notify-service.js +55 -18
- package/backend/dist/notify-service.js.map +1 -1
- package/backend/dist/plugin-manager.d.ts +3 -1
- package/backend/dist/plugin-manager.d.ts.map +1 -1
- package/backend/dist/plugin-manager.js +6 -1
- package/backend/dist/plugin-manager.js.map +1 -1
- package/backend/dist/routes/claude.d.ts.map +1 -1
- package/backend/dist/routes/claude.js +2 -1
- package/backend/dist/routes/claude.js.map +1 -1
- package/backend/dist/routes/filesystem.d.ts.map +1 -1
- package/backend/dist/routes/filesystem.js +15 -1
- package/backend/dist/routes/filesystem.js.map +1 -1
- package/backend/dist/routes/plugin-bridge.d.ts.map +1 -1
- package/backend/dist/routes/plugin-bridge.js +8 -1
- package/backend/dist/routes/plugin-bridge.js.map +1 -1
- package/frontend/dist/assets/{AssistantMessageContent-C0ZaP9eO.js → AssistantMessageContent-DqHct3Ck.js} +2 -2
- package/frontend/dist/assets/{GraphPreview-BaFsJMQN.js → GraphPreview-DDzwYb3w.js} +2 -2
- package/frontend/dist/assets/MobilePage-5nKL4ztD.js +14 -0
- package/frontend/dist/assets/{OfficePreview-DhIp2aOs.js → OfficePreview-BUzkkas_.js} +2 -2
- package/frontend/dist/assets/{ProjectPage-B0giZHPu.js → ProjectPage-CNFXiRv-.js} +5 -5
- package/frontend/dist/assets/SettingsPage-Dhmz6Kys.js +13 -0
- package/frontend/dist/assets/{SkillHubPage-DmD53E8a.js → SkillHubPage-DRLSM0ND.js} +3 -3
- package/frontend/dist/assets/{chevron-down-EqKf9tlu.js → chevron-down-CtzzxYuu.js} +1 -1
- package/frontend/dist/assets/{chevron-up-CWbUGBga.js → chevron-up-CBkngNQ6.js} +1 -1
- package/frontend/dist/assets/index-BrpW1kym.js +75 -0
- package/frontend/dist/assets/index-CR3beFmz.css +1 -0
- package/frontend/dist/assets/{index-DeKR9qRA.js → index-UPu5taSd.js} +1 -1
- package/frontend/dist/assets/index-YAu_Jeuq.js +13 -0
- package/frontend/dist/assets/{jszip.min-C6Lnkih6.js → jszip.min-CIqhAS2U.js} +1 -1
- package/frontend/dist/assets/{search-BOlGnsRY.js → search-W7udjbkr.js} +1 -1
- package/frontend/dist/index.html +2 -2
- package/package.json +1 -1
- package/frontend/dist/assets/MobilePage-BKYl9xD_.js +0 -14
- package/frontend/dist/assets/SettingsPage-IqCwCOnP.js +0 -13
- package/frontend/dist/assets/index-BEiRWS1U.js +0 -75
- package/frontend/dist/assets/index-Big9FXD0.css +0 -1
- package/frontend/dist/assets/index-O5uIzaFm.js +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{c as e,r as t,j as n,U as r,W as o,R as i,$ as a,b5 as l,a1 as s,a0 as c,b4 as f,V as u,Y as d,d as p,b6 as m,aS as h}from"./index-BrpW1kym.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.309.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const g=e("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]),y=e("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.309.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/function v(e){const r=w(e),o=t.forwardRef((e,o)=>{const{children:i,...a}=e,l=t.Children.toArray(i),s=l.find(b);if(s){const e=s.props.children,i=l.map(n=>n===s?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:n);return n.jsx(r,{...a,ref:o,children:t.isValidElement(e)?t.cloneElement(e,void 0,i):null})}return n.jsx(r,{...a,ref:o,children:i})});return o.displayName=`${e}.Slot`,o}function w(e){const n=t.forwardRef((e,n)=>{const{children:o,...i}=e;if(t.isValidElement(o)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(o),a=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(i,o.props);return o.type!==t.Fragment&&(a.ref=n?r(n,e):e),t.cloneElement(o,a)}return t.Children.count(o)>1?t.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var x=Symbol("radix.slottable");function b(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===x}function R(e){const t=e+"CollectionProvider",[r,l]=o(t),[s,c]=r(t,{collectionRef:{current:null},itemMap:new Map}),f=e=>{const{scope:t,children:r}=e,o=i.useRef(null),a=i.useRef(new Map).current;return n.jsx(s,{scope:t,itemMap:a,collectionRef:o,children:r})};f.displayName=t;const u=e+"CollectionSlot",d=v(u),p=i.forwardRef((e,t)=>{const{scope:r,children:o}=e,i=c(u,r),l=a(t,i.collectionRef);return n.jsx(d,{ref:l,children:o})});p.displayName=u;const m=e+"CollectionItemSlot",h="data-radix-collection-item",g=v(m),y=i.forwardRef((e,t)=>{const{scope:r,children:o,...l}=e,s=i.useRef(null),f=a(t,s),u=c(m,r);return i.useEffect(()=>(u.itemMap.set(s,{ref:s,...l}),()=>{u.itemMap.delete(s)})),n.jsx(g,{[h]:"",ref:f,children:o})});return y.displayName=m,[{Provider:f,Slot:p,ItemSlot:y},function(t){const n=c(e+"CollectionConsumer",t);return i.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},l]}var A=t.createContext(void 0);function S(e){const n=t.useContext(A);return e||n||"ltr"}var C="rovingFocusGroup.onEntryFocus",T={bubbles:!1,cancelable:!0},E="RovingFocusGroup",[P,D,O]=R(E),[j,F]=o(E,[O]),[L,M]=j(E),k=t.forwardRef((e,t)=>n.jsx(P.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(P.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(I,{...e,ref:t})})}));k.displayName=E;var I=t.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:l=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:y=!1,...v}=e,w=t.useRef(null),x=a(r,w),b=S(d),[R,A]=f({prop:p,defaultProp:m??null,onChange:h,caller:E}),[P,O]=t.useState(!1),j=u(g),F=D(o),M=t.useRef(!1),[k,I]=t.useState(0);return t.useEffect(()=>{const e=w.current;if(e)return e.addEventListener(C,j),()=>e.removeEventListener(C,j)},[j]),n.jsx(L,{scope:o,orientation:i,dir:b,loop:l,currentTabStopId:R,onItemFocus:t.useCallback(e=>A(e),[A]),onItemShiftTab:t.useCallback(()=>O(!0),[]),onFocusableItemAdd:t.useCallback(()=>I(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>I(e=>e-1),[]),children:n.jsx(s.div,{tabIndex:P||0===k?-1:0,"data-orientation":i,...v,ref:x,style:{outline:"none",...e.style},onMouseDown:c(e.onMouseDown,()=>{M.current=!0}),onFocus:c(e.onFocus,e=>{const t=!M.current;if(e.target===e.currentTarget&&t&&!P){const t=new CustomEvent(C,T);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=F().filter(e=>e.focusable);W([e.find(e=>e.active),e.find(e=>e.id===R),...e].filter(Boolean).map(e=>e.ref.current),y)}}M.current=!1}),onBlur:c(e.onBlur,()=>O(!1))})})}),N="RovingFocusGroupItem",_=t.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:a=!1,tabStopId:f,children:u,...d}=e,p=l(),m=f||p,h=M(N,o),g=h.currentTabStopId===m,y=D(o),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:x}=h;return t.useEffect(()=>{if(i)return v(),()=>w()},[i,v,w]),n.jsx(P.ItemSlot,{scope:o,id:m,focusable:i,active:a,children:n.jsx(s.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...d,ref:r,onMouseDown:c(e.onMouseDown,e=>{i?h.onItemFocus(m):e.preventDefault()}),onFocus:c(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:c(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:H[r]}(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=h.loop?(r=i+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(i+1)}setTimeout(()=>W(o))}var n,r}),children:"function"==typeof u?u({isCurrentTabStop:g,hasTabStop:null!=x}):u})})});_.displayName=N;var H={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function W(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var z=k,$=_,V="Tabs",[B]=o(V,[F]),K=F(),[Y,G]=B(V),U=t.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:a,orientation:c="horizontal",dir:u,activationMode:d="automatic",...p}=e,m=S(u),[h,g]=f({prop:o,onChange:i,defaultProp:a??"",caller:V});return n.jsx(Y,{scope:r,baseId:l(),value:h,onValueChange:g,orientation:c,dir:m,activationMode:d,children:n.jsx(s.div,{dir:m,"data-orientation":c,...p,ref:t})})});U.displayName=V;var X="TabsList",q=t.forwardRef((e,t)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,a=G(X,r),l=K(r);return n.jsx(z,{asChild:!0,...l,orientation:a.orientation,dir:a.dir,loop:o,children:n.jsx(s.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});q.displayName=X;var Z="TabsTrigger",J=t.forwardRef((e,t)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...a}=e,l=G(Z,r),f=K(r),u=te(l.baseId,o),d=ne(l.baseId,o),p=o===l.value;return n.jsx($,{asChild:!0,...f,focusable:!i,active:p,children:n.jsx(s.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":d,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...a,ref:t,onMouseDown:c(e.onMouseDown,e=>{i||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(o)}),onKeyDown:c(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(o)}),onFocus:c(e.onFocus,()=>{const e="manual"!==l.activationMode;p||i||!e||l.onValueChange(o)})})})});J.displayName=Z;var Q="TabsContent",ee=t.forwardRef((e,r)=>{const{__scopeTabs:o,value:i,forceMount:a,children:l,...c}=e,f=G(Q,o),u=te(f.baseId,i),p=ne(f.baseId,i),m=i===f.value,h=t.useRef(m);return t.useEffect(()=>{const e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),n.jsx(d,{present:a||m,children:({present:t})=>n.jsx(s.div,{"data-state":m?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":u,hidden:!t,id:p,tabIndex:0,...c,ref:r,style:{...e.style,animationDuration:h.current?"0s":void 0},children:t&&l})})});function te(e,t){return`${e}-trigger-${t}`}function ne(e,t){return`${e}-content-${t}`}ee.displayName=Q;var re=q,oe=J,ie=ee;const ae=U,le=t.forwardRef(({className:e,...t},r)=>n.jsx(re,{ref:r,className:p("flex rounded-md bg-muted p-1 text-muted-foreground data-[orientation=horizontal]:h-10 data-[orientation=horizontal]:items-center data-[orientation=horizontal]:justify-center data-[orientation=horizontal]:inline-flex data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-center data-[orientation=vertical]:justify-start",e),...t}));le.displayName=re.displayName;const se=t.forwardRef(({className:e,...t},r)=>n.jsx(oe,{ref:r,className:p("inline-flex items-center justify-center whitespace-nowrap rounded-sm text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm data-[orientation=horizontal]:px-3 data-[orientation=horizontal]:py-1.5",e),...t}));se.displayName=oe.displayName;const ce=t.forwardRef(({className:e,...t},r)=>n.jsx(ie,{ref:r,className:p("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ce.displayName=ie.displayName;const fe=["top","right","bottom","left"],ue=Math.min,de=Math.max,pe=Math.round,me=Math.floor,he=e=>({x:e,y:e}),ge={left:"right",right:"left",bottom:"top",top:"bottom"};function ye(e,t,n){return de(e,ue(t,n))}function ve(e,t){return"function"==typeof e?e(t):e}function we(e){return e.split("-")[0]}function xe(e){return e.split("-")[1]}function be(e){return"x"===e?"y":"x"}function Re(e){return"y"===e?"height":"width"}function Ae(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Se(e){return be(Ae(e))}function Ce(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Te=["left","right"],Ee=["right","left"],Pe=["top","bottom"],De=["bottom","top"];function Oe(e,t,n,r){const o=xe(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Ee:Te:t?Te:Ee;case"left":case"right":return t?Pe:De;default:return[]}}(we(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(Ce)))),i}function je(e){const t=we(e);return ge[t]+e.slice(t.length)}function Fe(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Le(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Me(e,t,n){let{reference:r,floating:o}=e;const i=Ae(t),a=Se(t),l=Re(a),s=we(t),c="y"===i,f=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(xe(t)){case"start":p[a]-=d*(n&&c?-1:1);break;case"end":p[a]+=d*(n&&c?-1:1)}return p}async function ke(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:p=0}=ve(t,e),m=Fe(p),h=l[d?"floating"===u?"reference":"floating":u],g=Le(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:s})),y="floating"===u?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=Le(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:s}):y);return{top:(g.top-x.top+m.top)/w.y,bottom:(x.bottom-g.bottom+m.bottom)/w.y,left:(g.left-x.left+m.left)/w.x,right:(x.right-g.right+m.right)/w.x}}function Ie(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ne(e){return fe.some(t=>e[t]>=0)}const _e=new Set(["left","top"]);function He(){return"undefined"!=typeof window}function We(e){return Ve(e)?(e.nodeName||"").toLowerCase():"#document"}function ze(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function $e(e){var t;return null==(t=(Ve(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ve(e){return!!He()&&(e instanceof Node||e instanceof ze(e).Node)}function Be(e){return!!He()&&(e instanceof Element||e instanceof ze(e).Element)}function Ke(e){return!!He()&&(e instanceof HTMLElement||e instanceof ze(e).HTMLElement)}function Ye(e){return!(!He()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ze(e).ShadowRoot)}function Ge(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function Ue(e){return/^(table|td|th)$/.test(We(e))}function Xe(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const qe=/transform|translate|scale|rotate|perspective|filter/,Ze=/paint|layout|strict|content/,Je=e=>!!e&&"none"!==e;let Qe;function et(e){const t=Be(e)?rt(e):e;return Je(t.transform)||Je(t.translate)||Je(t.scale)||Je(t.rotate)||Je(t.perspective)||!tt()&&(Je(t.backdropFilter)||Je(t.filter))||qe.test(t.willChange||"")||Ze.test(t.contain||"")}function tt(){return null==Qe&&(Qe="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qe}function nt(e){return/^(html|body|#document)$/.test(We(e))}function rt(e){return ze(e).getComputedStyle(e)}function ot(e){return Be(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function it(e){if("html"===We(e))return e;const t=e.assignedSlot||e.parentNode||Ye(e)&&e.host||$e(e);return Ye(t)?t.host:t}function at(e){const t=it(e);return nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ke(t)&&Ge(t)?t:at(t)}function lt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=at(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=ze(o);if(i){const e=st(a);return t.concat(a,a.visualViewport||[],Ge(o)?o:[],e&&n?lt(e):[])}return t.concat(o,lt(o,[],n))}function st(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ct(e){const t=rt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ke(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,l=pe(n)!==i||pe(r)!==a;return l&&(n=i,r=a),{width:n,height:r,$:l}}function ft(e){return Be(e)?e:e.contextElement}function ut(e){const t=ft(e);if(!Ke(t))return he(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ct(t);let a=(i?pe(n.width):n.width)/r,l=(i?pe(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}const dt=he(0);function pt(e){const t=ze(e);return tt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:dt}function mt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ft(e);let a=he(1);t&&(r?Be(r)&&(a=ut(r)):a=ut(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ze(e))&&t}(i,n,r)?pt(i):he(0);let s=(o.left+l.x)/a.x,c=(o.top+l.y)/a.y,f=o.width/a.x,u=o.height/a.y;if(i){const e=ze(i),t=r&&Be(r)?ze(r):r;let n=e,o=st(n);for(;o&&r&&t!==n;){const e=ut(o),t=o.getBoundingClientRect(),r=rt(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,f*=e.x,u*=e.y,s+=i,c+=a,n=ze(o),o=st(n)}}return Le({width:f,height:u,x:s,y:c})}function ht(e,t){const n=ot(e).scrollLeft;return t?t.left+n:mt($e(e)).left+n}function gt(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ht(e,n),y:n.top+t.scrollTop}}function yt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=ze(e),r=$e(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;const e=tt();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=ht(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:l,y:s}}(e,n);else if("document"===t)r=function(e){const t=$e(e),n=ot(e),r=e.ownerDocument.body,o=de(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=de(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ht(e);const l=-n.scrollTop;return"rtl"===rt(r).direction&&(a+=de(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:l}}($e(e));else if(Be(t))r=function(e,t){const n=mt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ke(e)?ut(e):he(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=pt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Le(r)}function vt(e,t){const n=it(e);return!(n===t||!Be(n)||nt(n))&&("fixed"===rt(n).position||vt(n,t))}function wt(e,t,n){const r=Ke(t),o=$e(t),i="fixed"===n,a=mt(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const s=he(0);function c(){s.x=ht(o)}if(r||!r&&!i)if(("body"!==We(t)||Ge(o))&&(l=ot(t)),r){const e=mt(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const f=!o||r||i?he(0):gt(o,l);return{x:a.left+l.scrollLeft-s.x-f.x,y:a.top+l.scrollTop-s.y-f.y,width:a.width,height:a.height}}function xt(e){return"static"===rt(e).position}function bt(e,t){if(!Ke(e)||"fixed"===rt(e).position)return null;if(t)return t(e);let n=e.offsetParent;return $e(e)===n&&(n=n.ownerDocument.body),n}function Rt(e,t){const n=ze(e);if(Xe(e))return n;if(!Ke(e)){let t=it(e);for(;t&&!nt(t);){if(Be(t)&&!xt(t))return t;t=it(t)}return n}let r=bt(e,t);for(;r&&Ue(r)&&xt(r);)r=bt(r,t);return r&&nt(r)&&xt(r)&&!et(r)?n:r||function(e){let t=it(e);for(;Ke(t)&&!nt(t);){if(et(t))return t;if(Xe(t))return null;t=it(t)}return null}(e)||n}const At={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=$e(r),l=!!t&&Xe(t.floating);if(r===a||l&&i)return n;let s={scrollLeft:0,scrollTop:0},c=he(1);const f=he(0),u=Ke(r);if((u||!u&&!i)&&(("body"!==We(r)||Ge(a))&&(s=ot(r)),u)){const e=mt(r);c=ut(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}const d=!a||u||i?he(0):gt(a,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-s.scrollTop*c.y+f.y+d.y}},getDocumentElement:$e,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Xe(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=lt(e,[],!1).filter(e=>Be(e)&&"body"!==We(e)),o=null;const i="fixed"===rt(e).position;let a=i?it(e):e;for(;Be(a)&&!nt(a);){const t=rt(a),n=et(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||Ge(a)&&!n&&vt(e,a))?r=r.filter(e=>e!==a):o=t,a=it(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=yt(t,i[0],o);let l=a.top,s=a.right,c=a.bottom,f=a.left;for(let u=1;u<i.length;u++){const e=yt(t,i[u],o);l=de(e.top,l),s=ue(e.right,s),c=ue(e.bottom,c),f=de(e.left,f)}return{width:s-f,height:c-l,x:f,y:l}},getOffsetParent:Rt,getElementRects:async function(e){const t=this.getOffsetParent||Rt,n=this.getDimensions,r=await n(e.floating);return{reference:wt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ct(e);return{width:t,height:n}},getScale:ut,isElement:Be,isRTL:function(e){return"rtl"===rt(e).direction}};function St(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ct(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=ft(e),f=o||i?[...c?lt(c):[],...t?lt(t):[]]:[];f.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const u=c&&l?function(e,t){let n,r=null;const o=$e(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:f,top:u,width:d,height:p}=c;if(l||t(),!d||!p)return;const m={rootMargin:-me(u)+"px "+-me(o.clientWidth-(f+d))+"px "+-me(o.clientHeight-(u+p))+"px "+-me(f)+"px",threshold:de(0,ue(1,s))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||St(c,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(y){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(c,n):null;let d,p=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!s&&m.observe(c),t&&m.observe(t));let h=s?mt(e):null;return s&&function t(){const r=mt(e);h&&!St(h,r)&&n();h=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(d)}}const Tt=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=we(n),l=xe(n),s="y"===Ae(n),c=_e.has(a)?-1:1,f=i&&s?-1:1,u=ve(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*f,y:d*c}:{x:d*c,y:p*f}}(t,e);return a===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},Et=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=ve(e,t),f={x:n,y:r},u=await i.detectOverflow(t,c),d=Ae(we(o)),p=be(d);let m=f[p],h=f[d];if(a){const e="y"===p?"bottom":"right";m=ye(m+u["y"===p?"top":"left"],m,m-u[e])}if(l){const e="y"===d?"bottom":"right";h=ye(h+u["y"===d?"top":"left"],h,h-u[e])}const g=s.fn({...t,[p]:m,[d]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[d]:l}}}}}},Pt=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=ve(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=we(o),v=Ae(l),w=we(l)===l,x=await(null==s.isRTL?void 0:s.isRTL(c.floating)),b=d||(w||!h?[je(l)]:function(e){const t=je(e);return[Ce(e),t,Ce(t)]}(l)),R="none"!==m;!d&&R&&b.push(...Oe(l,h,m,x));const A=[l,...b],S=await s.detectOverflow(t,g),C=[];let T=(null==(r=i.flip)?void 0:r.overflows)||[];if(f&&C.push(S[y]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=xe(e),o=Se(e),i=Re(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=je(a)),[a,je(a)]}(o,a,x);C.push(S[e[0]],S[e[1]])}if(T=[...T,{placement:o,overflows:C}],!C.every(e=>e<=0)){var E,P;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=A[e];if(t){if(!("alignment"===u&&v!==Ae(t))||T.every(e=>Ae(e.placement)!==v||e.overflows[0]>0))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(P=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:P.placement;if(!n)switch(p){case"bestFit":{var D;const e=null==(D=T.filter(e=>{if(R){const t=Ae(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:D[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Dt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:l}=t,{apply:s=()=>{},...c}=ve(e,t),f=await a.detectOverflow(t,c),u=we(o),d=xe(o),p="y"===Ae(o),{width:m,height:h}=i.floating;let g,y;"top"===u||"bottom"===u?(g=u,y=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=u,g="end"===d?"top":"bottom");const v=h-f.top-f.bottom,w=m-f.left-f.right,x=ue(h-f[g],v),b=ue(m-f[y],w),R=!t.middlewareData.shift;let A=x,S=b;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(A=v),R&&!d){const e=de(f.left,0),t=de(f.right,0),n=de(f.top,0),r=de(f.bottom,0);p?S=m-2*(0!==e||0!==t?e+t:de(f.left,f.right)):A=h-2*(0!==n||0!==r?n+r:de(f.top,f.bottom))}await s({...t,availableWidth:S,availableHeight:A});const C=await a.getDimensions(l.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}},Ot=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=ve(e,t);switch(o){case"referenceHidden":{const e=Ie(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ne(e)}}}case"escaped":{const e=Ie(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ne(e)}}}default:return{}}}}},jt=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:l,middlewareData:s}=t,{element:c,padding:f=0}=ve(e,t)||{};if(null==c)return{};const u=Fe(f),d={x:n,y:r},p=Se(o),m=Re(p),h=await a.getDimensions(c),g="y"===p,y=g?"top":"left",v=g?"bottom":"right",w=g?"clientHeight":"clientWidth",x=i.reference[m]+i.reference[p]-d[p]-i.floating[m],b=d[p]-i.reference[p],R=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let A=R?R[w]:0;A&&await(null==a.isElement?void 0:a.isElement(R))||(A=l.floating[w]||i.floating[m]);const S=x/2-b/2,C=A/2-h[m]/2-1,T=ue(u[y],C),E=ue(u[v],C),P=T,D=A-h[m]-E,O=A/2-h[m]/2+S,j=ye(P,O,D),F=!s.arrow&&null!=xe(o)&&O!==j&&i.reference[m]/2-(O<P?T:E)-h[m]/2<0,L=F?O<P?O-P:O-D:0;return{[p]:d[p]+L,data:{[p]:j,centerOffset:O-j-L,...F&&{alignmentOffset:L}},reset:F}}}),Ft=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=ve(e,t),f={x:n,y:r},u=Ae(o),d=be(u);let p=f[d],m=f[u];const h=ve(l,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,v;const e="y"===d?"width":"height",t=_e.has(we(o)),n=i.reference[u]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[u])||0)+(t?0:g.crossAxis),r=i.reference[u]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[u]:m}}}},Lt=(e,t,n)=>{const r=new Map,o={platform:At,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,l=a.detectOverflow?a:{...a,detectOverflow:ke},s=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:u}=Me(c,r,s),d=r,p=0;const m={};for(let h=0;h<i.length;h++){const n=i[h];if(!n)continue;const{name:g,fn:y}=n,{x:v,y:w,data:x,reset:b}=await y({x:f,y:u,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});f=null!=v?v:f,u=null!=w?w:u,m[g]={...m[g],...x},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:u}=Me(c,d,s))),h=-1)}return{x:f,y:u,placement:d,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var Mt="undefined"!=typeof document?t.useLayoutEffect:function(){};function kt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!kt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!kt(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function It(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Nt(e,t){const n=It(e);return Math.round(t*n)/n}function _t(e){const n=t.useRef(e);return Mt(()=>{n.current=e}),n}const Ht=(e,t)=>{const n=Tt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wt=(e,t)=>{const n=Et(e);return{name:n.name,fn:n.fn,options:[e,t]}},zt=(e,t)=>{const n=Pt(e);return{name:n.name,fn:n.fn,options:[e,t]}},$t=(e,t)=>{const n=Dt(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vt=(e,t)=>{const n=Ot(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bt=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?jt({element:n.current,padding:r}).fn(t):{}:n?jt({element:n,padding:r}).fn(t):{};var o}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Kt=t.forwardRef((e,t)=>{const{children:r,width:o=10,height:i=5,...a}=e;return n.jsx(s.svg,{...a,ref:t,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:n.jsx("polygon",{points:"0,0 30,0 15,10"})})});Kt.displayName="Arrow";var Yt=Kt;function Gt(e){const[n,r]=t.useState(void 0);return h(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),n}var Ut="Popper",[Xt,qt]=o(Ut),[Zt,Jt]=Xt(Ut),Qt=e=>{const{__scopePopper:r,children:o}=e,[i,a]=t.useState(null);return n.jsx(Zt,{scope:r,anchor:i,onAnchorChange:a,children:o})};Qt.displayName=Ut;var en="PopperAnchor",tn=t.forwardRef((e,r)=>{const{__scopePopper:o,virtualRef:i,...l}=e,c=Jt(en,o),f=t.useRef(null),u=a(r,f),d=t.useRef(null);return t.useEffect(()=>{const e=d.current;d.current=(null==i?void 0:i.current)||f.current,e!==d.current&&c.onAnchorChange(d.current)}),i?null:n.jsx(s.div,{...l,ref:u})});tn.displayName=en;var nn="PopperContent",[rn,on]=Xt(nn),an=t.forwardRef((e,r)=>{var o,i,l,c,f,d;const{__scopePopper:p,side:g="bottom",sideOffset:y=0,align:v="center",alignOffset:w=0,arrowPadding:x=0,avoidCollisions:b=!0,collisionBoundary:R=[],collisionPadding:A=0,sticky:S="partial",hideWhenDetached:C=!1,updatePositionStrategy:T="optimized",onPlaced:E,...P}=e,D=Jt(nn,p),[O,j]=t.useState(null),F=a(r,e=>j(e)),[L,M]=t.useState(null),k=Gt(L),I=(null==k?void 0:k.width)??0,N=(null==k?void 0:k.height)??0,_=g+("center"!==v?"-"+v:""),H="number"==typeof A?A:{top:0,right:0,bottom:0,left:0,...A},W=Array.isArray(R)?R:[R],z=W.length>0,$={padding:H,boundary:W.filter(fn),altBoundary:z},{refs:V,floatingStyles:B,placement:K,isPositioned:Y,middlewareData:G}=function(e){void 0===e&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:l}={},transform:s=!0,whileElementsMounted:c,open:f}=e,[u,d]=t.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,h]=t.useState(o);kt(p,o)||h(o);const[g,y]=t.useState(null),[v,w]=t.useState(null),x=t.useCallback(e=>{e!==S.current&&(S.current=e,y(e))},[]),b=t.useCallback(e=>{e!==C.current&&(C.current=e,w(e))},[]),R=a||g,A=l||v,S=t.useRef(null),C=t.useRef(null),T=t.useRef(u),E=null!=c,P=_t(c),D=_t(i),O=_t(f),j=t.useCallback(()=>{if(!S.current||!C.current)return;const e={placement:n,strategy:r,middleware:p};D.current&&(e.platform=D.current),Lt(S.current,C.current,e).then(e=>{const t={...e,isPositioned:!1!==O.current};F.current&&!kt(T.current,t)&&(T.current=t,m.flushSync(()=>{d(t)}))})},[p,n,r,D,O]);Mt(()=>{!1===f&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[f]);const F=t.useRef(!1);Mt(()=>(F.current=!0,()=>{F.current=!1}),[]),Mt(()=>{if(R&&(S.current=R),A&&(C.current=A),R&&A){if(P.current)return P.current(R,A,j);j()}},[R,A,j,P,E]);const L=t.useMemo(()=>({reference:S,floating:C,setReference:x,setFloating:b}),[x,b]),M=t.useMemo(()=>({reference:R,floating:A}),[R,A]),k=t.useMemo(()=>{const e={position:r,left:0,top:0};if(!M.floating)return e;const t=Nt(M.floating,u.x),n=Nt(M.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...It(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,M.floating,u.x,u.y]);return t.useMemo(()=>({...u,update:j,refs:L,elements:M,floatingStyles:k}),[u,j,L,M,k])}({strategy:"fixed",placement:_,whileElementsMounted:(...e)=>Ct(...e,{animationFrame:"always"===T}),elements:{reference:D.anchor},middleware:[Ht({mainAxis:y+N,alignmentAxis:w}),b&&Wt({mainAxis:!0,crossAxis:!1,limiter:"partial"===S?{fn:Ft(U).fn,options:[U,X]}:void 0,...$}),b&&zt({...$}),$t({...$,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),L&&Bt({element:L,padding:x}),un({arrowWidth:I,arrowHeight:N}),C&&Vt({strategy:"referenceHidden",...$})]});var U,X;const[q,Z]=dn(K),J=u(E);h(()=>{Y&&(null==J||J())},[Y,J]);const Q=null==(o=G.arrow)?void 0:o.x,ee=null==(i=G.arrow)?void 0:i.y,te=0!==(null==(l=G.arrow)?void 0:l.centerOffset),[ne,re]=t.useState();return h(()=>{O&&re(window.getComputedStyle(O).zIndex)},[O]),n.jsx("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:Y?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null==(c=G.transformOrigin)?void 0:c.x,null==(f=G.transformOrigin)?void 0:f.y].join(" "),...(null==(d=G.hide)?void 0:d.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:n.jsx(rn,{scope:p,placedSide:q,onArrowChange:M,arrowX:Q,arrowY:ee,shouldHideArrow:te,children:n.jsx(s.div,{"data-side":q,"data-align":Z,...P,ref:F,style:{...P.style,animation:Y?void 0:"none"}})})})});an.displayName=nn;var ln="PopperArrow",sn={top:"bottom",right:"left",bottom:"top",left:"right"},cn=t.forwardRef(function(e,t){const{__scopePopper:r,...o}=e,i=on(ln,r),a=sn[i.placedSide];return n.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:n.jsx(Yt,{...o,ref:t,style:{...o.style,display:"block"}})})});function fn(e){return null!==e}cn.displayName=ln;var un=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o;const{placement:i,rects:a,middlewareData:l}=t,s=0!==(null==(n=l.arrow)?void 0:n.centerOffset),c=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[u,d]=dn(i),p={start:"0%",center:"50%",end:"100%"}[d],m=((null==(r=l.arrow)?void 0:r.x)??0)+c/2,h=((null==(o=l.arrow)?void 0:o.y)??0)+f/2;let g="",y="";return"bottom"===u?(g=s?p:`${m}px`,y=-f+"px"):"top"===u?(g=s?p:`${m}px`,y=`${a.floating.height+f}px`):"right"===u?(g=-f+"px",y=s?p:`${h}px`):"left"===u&&(g=`${a.floating.width+f}px`,y=s?p:`${h}px`),{data:{x:g,y:y}}}});function dn(e){const[t,n="center"]=e.split("-");return[t,n]}var pn=Qt,mn=tn,hn=an,gn=cn;function yn(e,[t,n]){return Math.min(n,Math.max(t,e))}export{mn as A,hn as C,$ as I,pn as R,g as S,ae as T,y as U,le as a,se as b,ce as c,qt as d,F as e,R as f,z as g,gn as h,yn as i,Gt as j,S as u};
|