chordia-ui 3.3.2 → 3.3.3
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 +4 -0
- package/dist/SmallButton.cjs.js +1 -1
- package/dist/SmallButton.cjs.js.map +1 -1
- package/dist/SmallButton.es.js +170 -162
- package/dist/SmallButton.es.js.map +1 -1
- package/dist/components/chat.cjs.js +8 -8
- package/dist/components/chat.cjs.js.map +1 -1
- package/dist/components/chat.es.js +329 -335
- package/dist/components/chat.es.js.map +1 -1
- package/dist/components/data.cjs.js +1 -1
- package/dist/components/data.cjs.js.map +1 -1
- package/dist/components/data.es.js +83 -80
- package/dist/components/data.es.js.map +1 -1
- package/dist/components/layout.cjs.js +1 -1
- package/dist/components/layout.cjs.js.map +1 -1
- package/dist/components/layout.es.js +3 -1
- package/dist/components/layout.es.js.map +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.es2.js +4 -4
- package/dist/index.es2.js.map +1 -1
- package/dist/pages/interactionDetails.cjs.js +2 -2
- package/dist/pages/interactionDetails.cjs.js.map +1 -1
- package/dist/pages/interactionDetails.es.js +117 -123
- package/dist/pages/interactionDetails.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/ChatHistoryPanel.jsx +3 -3
- package/src/components/chat/ChatInterface.jsx +14 -14
- package/src/components/common/MessageThread.jsx +19 -19
- package/src/components/data/DataTable.jsx +18 -15
- package/src/components/layout/SplitPane.jsx +2 -0
- package/src/components/login/LoginPage.jsx +4 -4
- package/src/components/primitives/SmallButton.jsx +14 -6
package/README.md
CHANGED
|
@@ -104,6 +104,10 @@ import { DataTable } from 'chordia-ui/components/data';
|
|
|
104
104
|
|
|
105
105
|
If you omit `onMaxColumnsError`, the table still works; users just won’t see a toast for the max‑columns case.
|
|
106
106
|
|
|
107
|
+
### 5. DataTable theming note
|
|
108
|
+
|
|
109
|
+
`DataTable` uses design tokens for top surfaces (header row, filter row, and top control strip). Set `--primary-foreground` in your host theme to control these backgrounds consistently across table chrome.
|
|
110
|
+
|
|
107
111
|
## LoginPage Integration
|
|
108
112
|
|
|
109
113
|
`LoginPage` delegates all auth behavior to host callbacks.
|
package/dist/SmallButton.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const x=require("react/jsx-runtime"),gt=require("react");require("lucide-react");const xt=require("react-dom");function vt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=vt(gt),yt=vt(xt);function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function nt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wt(...e){return t=>{let n=!1;const o=e.map(r=>{const i=nt(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():nt(e[r],null)}}}}function ne(...e){return f.useCallback(wt(...e),e)}function bt(e,t=[]){let n=[];function o(i,s){const c=f.createContext(s),a=n.length;n=[...n,s];const l=d=>{var y;const{scope:m,children:p,...h}=d,g=((y=m==null?void 0:m[e])==null?void 0:y[a])||c,v=f.useMemo(()=>h,Object.values(h));return x.jsx(g.Provider,{value:v,children:p})};l.displayName=i+"Provider";function u(d,m){var g;const p=((g=m==null?void 0:m[e])==null?void 0:g[a])||c,h=f.useContext(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,u]}const r=()=>{const i=n.map(s=>f.createContext(s));return function(c){const a=(c==null?void 0:c[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...c,[e]:a}}),[c,a])}};return r.scopeName=e,[o,wn(r,...t)]}function wn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const s=o.reduce((c,{useScope:a,scopeName:l})=>{const d=a(i)[`__scope${l}`];return{...c,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function bn(e){const t=Cn(e),n=f.forwardRef((o,r)=>{const{children:i,...s}=o,c=f.Children.toArray(i),a=c.find(En);if(a){const l=a.props.children,u=c.map(d=>d===a?f.Children.count(l)>1?f.Children.only(null):f.isValidElement(l)?l.props.children:null:d);return x.jsx(t,{...s,ref:r,children:f.isValidElement(l)?f.cloneElement(l,void 0,u):null})}return x.jsx(t,{...s,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}function Cn(e){const t=f.forwardRef((n,o)=>{const{children:r,...i}=n;if(f.isValidElement(r)){const s=Sn(r),c=Pn(i,r.props);return r.type!==f.Fragment&&(c.ref=o?wt(o,s):s),f.cloneElement(r,c)}return f.Children.count(r)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ct=Symbol("radix.slottable");function Rn(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ct,t}function En(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ct}function Pn(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...c)=>{const a=i(...c);return r(...c),a}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function Sn(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var An=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q=An.reduce((e,t)=>{const n=bn(`Primitive.${t}`),o=f.forwardRef((r,i)=>{const{asChild:s,...c}=r,a=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...c,ref:i})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Tn(e,t){e&&yt.flushSync(()=>e.dispatchEvent(t))}function Ce(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function On(e,t=globalThis==null?void 0:globalThis.document){const n=Ce(e);f.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Dn="DismissableLayer",Ne="dismissableLayer.update",Ln="dismissableLayer.pointerDownOutside",Nn="dismissableLayer.focusOutside",ot,Rt=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Et=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...a}=e,l=f.useContext(Rt),[u,d]=f.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),h=ne(t,R=>d(R)),g=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=u?g.indexOf(u):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,w=b>=y,P=jn(R=>{const A=R.target,M=[...l.branches].some(T=>T.contains(A));!w||M||(r==null||r(R),s==null||s(R),R.defaultPrevented||c==null||c())},m),E=kn(R=>{const A=R.target;[...l.branches].some(T=>T.contains(A))||(i==null||i(R),s==null||s(R),R.defaultPrevented||c==null||c())},m);return On(R=>{b===l.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},m),f.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ot=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),rt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ot)}},[u,m,n,l]),f.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),rt())},[u,l]),f.useEffect(()=>{const R=()=>p({});return document.addEventListener(Ne,R),()=>document.removeEventListener(Ne,R)},[]),x.jsx(Q.div,{...a,ref:h,style:{pointerEvents:C?w?"auto":"none":void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,P.onPointerDownCapture)})});Et.displayName=Dn;var Mn="DismissableLayerBranch",_n=f.forwardRef((e,t)=>{const n=f.useContext(Rt),o=f.useRef(null),r=ne(t,o);return f.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(Q.div,{...e,ref:r})});_n.displayName=Mn;function jn(e,t=globalThis==null?void 0:globalThis.document){const n=Ce(e),o=f.useRef(!1),r=f.useRef(()=>{});return f.useEffect(()=>{const i=c=>{if(c.target&&!o.current){let a=function(){Pt(Ln,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=a,t.addEventListener("click",r.current,{once:!0})):a()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function kn(e,t=globalThis==null?void 0:globalThis.document){const n=Ce(e),o=f.useRef(!1);return f.useEffect(()=>{const r=i=>{i.target&&!o.current&&Pt(Nn,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function rt(){const e=new CustomEvent(Ne);document.dispatchEvent(e)}function Pt(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Tn(r,i):r.dispatchEvent(i)}var K=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},$n=f[" useId ".trim().toString()]||(()=>{}),In=0;function Wn(e){const[t,n]=f.useState($n());return K(()=>{e||n(o=>o??String(In++))},[e]),e||(t?`radix-${t}`:"")}const Fn=["top","right","bottom","left"],Z=Math.min,I=Math.max,ve=Math.round,he=Math.floor,V=e=>({x:e,y:e}),Bn={left:"right",right:"left",bottom:"top",top:"bottom"};function Me(e,t,n){return I(e,Z(t,n))}function X(e,t){return typeof e=="function"?e(t):e}function q(e){return e.split("-")[0]}function se(e){return e.split("-")[1]}function Ie(e){return e==="x"?"y":"x"}function We(e){return e==="y"?"height":"width"}function z(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Fe(e){return Ie(z(e))}function Hn(e,t,n){n===void 0&&(n=!1);const o=se(e),r=Fe(e),i=We(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ye(s)),[s,ye(s)]}function zn(e){const t=ye(e);return[_e(e),t,_e(t)]}function _e(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const it=["left","right"],st=["right","left"],Vn=["top","bottom"],Un=["bottom","top"];function Yn(e,t,n){switch(e){case"top":case"bottom":return n?t?st:it:t?it:st;case"left":case"right":return t?Vn:Un;default:return[]}}function Xn(e,t,n,o){const r=se(e);let i=Yn(q(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(_e)))),i}function ye(e){const t=q(e);return Bn[t]+e.slice(t.length)}function qn(e){return{top:0,right:0,bottom:0,left:0,...e}}function St(e){return typeof e!="number"?qn(e):{top:e,right:e,bottom:e,left:e}}function we(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function ct(e,t,n){let{reference:o,floating:r}=e;const i=z(t),s=Fe(t),c=We(s),a=q(t),l=i==="y",u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let p;switch(a){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(se(t)){case"start":p[s]-=m*(n&&l?-1:1);break;case"end":p[s]+=m*(n&&l?-1:1);break}return p}async function Gn(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:a}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=X(t,e),h=St(p),v=c[m?d==="floating"?"reference":"floating":d],y=we(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:u,strategy:a})),b=d==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),w=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},P=we(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:C,strategy:a}):b);return{top:(y.top-P.top+h.top)/w.y,bottom:(P.bottom-y.bottom+h.bottom)/w.y,left:(y.left-P.left+h.left)/w.x,right:(P.right-y.right+h.right)/w.x}}const Kn=50,Zn=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:Gn},a=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=ct(l,o,a),m=o,p=0;const h={};for(let g=0;g<i.length;g++){const v=i[g];if(!v)continue;const{name:y,fn:b}=v,{x:C,y:w,data:P,reset:E}=await b({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:h,rects:l,platform:c,elements:{reference:e,floating:t}});u=C??u,d=w??d,h[y]={...h[y],...P},E&&p<Kn&&(p++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(l=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:u,y:d}=ct(l,m,a)),g=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:h}},Jn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:a}=t,{element:l,padding:u=0}=X(e,t)||{};if(l==null)return{};const d=St(u),m={x:n,y:o},p=Fe(r),h=We(p),g=await s.getDimensions(l),v=p==="y",y=v?"top":"left",b=v?"bottom":"right",C=v?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-m[p]-i.floating[h],P=m[p]-i.reference[p],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let R=E?E[C]:0;(!R||!await(s.isElement==null?void 0:s.isElement(E)))&&(R=c.floating[C]||i.floating[h]);const A=w/2-P/2,M=R/2-g[h]/2-1,T=Z(d[y],M),j=Z(d[b],M),k=T,D=R-g[h]-j,O=R/2-g[h]/2+A,$=Me(k,O,D),L=!a.arrow&&se(r)!=null&&O!==$&&i.reference[h]/2-(O<k?T:j)-g[h]/2<0,N=L?O<k?O-k:O-D:0;return{[p]:m[p]+N,data:{[p]:$,centerOffset:O-$-N,...L&&{alignmentOffset:N}},reset:L}}}),Qn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:a,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=X(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=q(r),b=z(c),C=q(c)===c,w=await(a.isRTL==null?void 0:a.isRTL(l.floating)),P=m||(C||!g?[ye(c)]:zn(c)),E=h!=="none";!m&&E&&P.push(...Xn(c,g,h,w));const R=[c,...P],A=await a.detectOverflow(t,v),M=[];let T=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&M.push(A[y]),d){const O=Hn(r,s,w);M.push(A[O[0]],A[O[1]])}if(T=[...T,{placement:r,overflows:M}],!M.every(O=>O<=0)){var j,k;const O=(((j=i.flip)==null?void 0:j.index)||0)+1,$=R[O];if($&&(!(d==="alignment"?b!==z($):!1)||T.every(S=>z(S.placement)===b?S.overflows[0]>0:!0)))return{data:{index:O,overflows:T},reset:{placement:$}};let L=(k=T.filter(N=>N.overflows[0]<=0).sort((N,S)=>N.overflows[1]-S.overflows[1])[0])==null?void 0:k.placement;if(!L)switch(p){case"bestFit":{var D;const N=(D=T.filter(S=>{if(E){const _=z(S.placement);return _===b||_==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(_=>_>0).reduce((_,H)=>_+H,0)]).sort((S,_)=>S[1]-_[1])[0])==null?void 0:D[0];N&&(L=N);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}};function at(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lt(e){return Fn.some(t=>e[t]>=0)}const eo=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...i}=X(e,t);switch(r){case"referenceHidden":{const s=await o.detectOverflow(t,{...i,elementContext:"reference"}),c=at(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:lt(c)}}}case"escaped":{const s=await o.detectOverflow(t,{...i,altBoundary:!0}),c=at(s,n.floating);return{data:{escapedOffsets:c,escaped:lt(c)}}}default:return{}}}}},At=new Set(["left","top"]);async function to(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=q(n),c=se(n),a=z(n)==="y",l=At.has(s)?-1:1,u=i&&a?-1:1,d=X(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof h=="number"&&(p=c==="end"?h*-1:h),a?{x:p*u,y:m*l}:{x:m*l,y:p*u}}const no=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=t,a=await to(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:s}}}}},oo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:a={fn:y=>{let{x:b,y:C}=y;return{x:b,y:C}}},...l}=X(e,t),u={x:n,y:o},d=await i.detectOverflow(t,l),m=z(q(r)),p=Ie(m);let h=u[p],g=u[m];if(s){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",C=h+d[y],w=h-d[b];h=Me(C,h,w)}if(c){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",C=g+d[y],w=g-d[b];g=Me(C,g,w)}const v=a.fn({...t,[p]:h,[m]:g});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[p]:s,[m]:c}}}}}},ro=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=t,{offset:c=0,mainAxis:a=!0,crossAxis:l=!0}=X(e,t),u={x:n,y:o},d=z(r),m=Ie(d);let p=u[m],h=u[d];const g=X(c,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const C=m==="y"?"height":"width",w=i.reference[m]-i.floating[C]+v.mainAxis,P=i.reference[m]+i.reference[C]-v.mainAxis;p<w?p=w:p>P&&(p=P)}if(l){var y,b;const C=m==="y"?"width":"height",w=At.has(q(r)),P=i.reference[d]-i.floating[C]+(w&&((y=s.offset)==null?void 0:y[d])||0)+(w?0:v.crossAxis),E=i.reference[d]+i.reference[C]+(w?0:((b=s.offset)==null?void 0:b[d])||0)-(w?v.crossAxis:0);h<P?h=P:h>E&&(h=E)}return{[m]:p,[d]:h}}}},io=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:s,elements:c}=t,{apply:a=()=>{},...l}=X(e,t),u=await s.detectOverflow(t,l),d=q(r),m=se(r),p=z(r)==="y",{width:h,height:g}=i.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(y=d,v=m==="end"?"top":"bottom");const b=g-u.top-u.bottom,C=h-u.left-u.right,w=Z(g-u[v],b),P=Z(h-u[y],C),E=!t.middlewareData.shift;let R=w,A=P;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(R=b),E&&!m){const T=I(u.left,0),j=I(u.right,0),k=I(u.top,0),D=I(u.bottom,0);p?A=h-2*(T!==0||j!==0?T+j:I(u.left,u.right)):R=g-2*(k!==0||D!==0?k+D:I(u.top,u.bottom))}await a({...t,availableWidth:A,availableHeight:R});const M=await s.getDimensions(c.floating);return h!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function Re(){return typeof window<"u"}function ce(e){return Tt(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function U(e){var t;return(t=(Tt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tt(e){return Re()?e instanceof Node||e instanceof W(e).Node:!1}function F(e){return Re()?e instanceof Element||e instanceof W(e).Element:!1}function G(e){return Re()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function ut(e){return!Re()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function fe(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=B(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function so(e){return/^(table|td|th)$/.test(ce(e))}function Ee(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const co=/transform|translate|scale|rotate|perspective|filter/,ao=/paint|layout|strict|content/,ee=e=>!!e&&e!=="none";let Oe;function Be(e){const t=F(e)?B(e):e;return ee(t.transform)||ee(t.translate)||ee(t.scale)||ee(t.rotate)||ee(t.perspective)||!He()&&(ee(t.backdropFilter)||ee(t.filter))||co.test(t.willChange||"")||ao.test(t.contain||"")}function lo(e){let t=J(e);for(;G(t)&&!re(t);){if(Be(t))return t;if(Ee(t))return null;t=J(t)}return null}function He(){return Oe==null&&(Oe=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Oe}function re(e){return/^(html|body|#document)$/.test(ce(e))}function B(e){return W(e).getComputedStyle(e)}function Pe(e){return F(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if(ce(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ut(e)&&e.host||U(e);return ut(t)?t.host:t}function Ot(e){const t=J(e);return re(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&fe(t)?t:Ot(t)}function le(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Ot(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=W(r);if(i){const c=je(s);return t.concat(s,s.visualViewport||[],fe(r)?r:[],c&&n?le(c):[])}else return t.concat(r,le(r,[],n))}function je(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dt(e){const t=B(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=G(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=ve(n)!==i||ve(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function ze(e){return F(e)?e:e.contextElement}function oe(e){const t=ze(e);if(!G(t))return V(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Dt(t);let s=(i?ve(n.width):n.width)/o,c=(i?ve(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const uo=V(0);function Lt(e){const t=W(e);return!He()||!t.visualViewport?uo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==W(e)?!1:t}function te(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=ze(e);let s=V(1);t&&(o?F(o)&&(s=oe(o)):s=oe(e));const c=fo(i,n,o)?Lt(i):V(0);let a=(r.left+c.x)/s.x,l=(r.top+c.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const m=W(i),p=o&&F(o)?W(o):o;let h=m,g=je(h);for(;g&&o&&p!==h;){const v=oe(g),y=g.getBoundingClientRect(),b=B(g),C=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,w=y.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;a*=v.x,l*=v.y,u*=v.x,d*=v.y,a+=C,l+=w,h=W(g),g=je(h)}}return we({width:u,height:d,x:a,y:l})}function Se(e,t){const n=Pe(e).scrollLeft;return t?t.left+n:te(U(e)).left+n}function Nt(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Se(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function po(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=U(o),c=t?Ee(t.floating):!1;if(o===s||c&&i)return n;let a={scrollLeft:0,scrollTop:0},l=V(1);const u=V(0),d=G(o);if((d||!d&&!i)&&((ce(o)!=="body"||fe(s))&&(a=Pe(o)),d)){const p=te(o);l=oe(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}const m=s&&!d&&!i?Nt(s,a):V(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+u.x+m.x,y:n.y*l.y-a.scrollTop*l.y+u.y+m.y}}function mo(e){return Array.from(e.getClientRects())}function ho(e){const t=U(e),n=Pe(e),o=e.ownerDocument.body,r=I(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=I(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Se(e);const c=-n.scrollTop;return B(o).direction==="rtl"&&(s+=I(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const ft=25;function go(e,t){const n=W(e),o=U(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,a=0;if(r){i=r.width,s=r.height;const u=He();(!u||u&&t==="fixed")&&(c=r.offsetLeft,a=r.offsetTop)}const l=Se(o);if(l<=0){const u=o.ownerDocument,d=u.body,m=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-d.clientWidth-p);h<=ft&&(i-=h)}else l<=ft&&(i+=l);return{width:i,height:s,x:c,y:a}}function xo(e,t){const n=te(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=G(e)?oe(e):V(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,a=r*i.x,l=o*i.y;return{width:s,height:c,x:a,y:l}}function dt(e,t,n){let o;if(t==="viewport")o=go(e,n);else if(t==="document")o=ho(U(e));else if(F(t))o=xo(t,n);else{const r=Lt(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return we(o)}function Mt(e,t){const n=J(e);return n===t||!F(n)||re(n)?!1:B(n).position==="fixed"||Mt(n,t)}function vo(e,t){const n=t.get(e);if(n)return n;let o=le(e,[],!1).filter(c=>F(c)&&ce(c)!=="body"),r=null;const i=B(e).position==="fixed";let s=i?J(e):e;for(;F(s)&&!re(s);){const c=B(s),a=Be(s);!a&&c.position==="fixed"&&(r=null),(i?!a&&!r:!a&&c.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||fe(s)&&!a&&Mt(e,s))?o=o.filter(u=>u!==s):r=c,s=J(s)}return t.set(e,o),o}function yo(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Ee(t)?[]:vo(t,this._c):[].concat(n),o],c=dt(t,s[0],r);let a=c.top,l=c.right,u=c.bottom,d=c.left;for(let m=1;m<s.length;m++){const p=dt(t,s[m],r);a=I(p.top,a),l=Z(p.right,l),u=Z(p.bottom,u),d=I(p.left,d)}return{width:l-d,height:u-a,x:d,y:a}}function wo(e){const{width:t,height:n}=Dt(e);return{width:t,height:n}}function bo(e,t,n){const o=G(t),r=U(t),i=n==="fixed",s=te(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const a=V(0);function l(){a.x=Se(r)}if(o||!o&&!i)if((ce(t)!=="body"||fe(r))&&(c=Pe(t)),o){const p=te(t,!0,i,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else r&&l();i&&!o&&r&&l();const u=r&&!o&&!i?Nt(r,c):V(0),d=s.left+c.scrollLeft-a.x-u.x,m=s.top+c.scrollTop-a.y-u.y;return{x:d,y:m,width:s.width,height:s.height}}function De(e){return B(e).position==="static"}function pt(e,t){if(!G(e)||B(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return U(e)===n&&(n=n.ownerDocument.body),n}function _t(e,t){const n=W(e);if(Ee(e))return n;if(!G(e)){let r=J(e);for(;r&&!re(r);){if(F(r)&&!De(r))return r;r=J(r)}return n}let o=pt(e,t);for(;o&&so(o)&&De(o);)o=pt(o,t);return o&&re(o)&&De(o)&&!Be(o)?n:o||lo(e)||n}const Co=async function(e){const t=this.getOffsetParent||_t,n=this.getDimensions,o=await n(e.floating);return{reference:bo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ro(e){return B(e).direction==="rtl"}const Eo={convertOffsetParentRelativeRectToViewportRelativeRect:po,getDocumentElement:U,getClippingRect:yo,getOffsetParent:_t,getElementRects:Co,getClientRects:mo,getDimensions:wo,getScale:oe,isElement:F,isRTL:Ro};function jt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Po(e,t){let n=null,o;const r=U(e);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),i();const l=e.getBoundingClientRect(),{left:u,top:d,width:m,height:p}=l;if(c||t(),!m||!p)return;const h=he(d),g=he(r.clientWidth-(u+m)),v=he(r.clientHeight-(d+p)),y=he(u),C={rootMargin:-h+"px "+-g+"px "+-v+"px "+-y+"px",threshold:I(0,Z(1,a))||1};let w=!0;function P(E){const R=E[0].intersectionRatio;if(R!==a){if(!w)return s();R?s(!1,R):o=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!jt(l,e.getBoundingClientRect())&&s(),w=!1}try{n=new IntersectionObserver(P,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(P,C)}n.observe(e)}return s(!0),i}function So(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=ze(e),u=r||i?[...l?le(l):[],...t?le(t):[]]:[];u.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=l&&c?Po(l,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),l&&!a&&p.observe(l),t&&p.observe(t));let h,g=a?te(e):null;a&&v();function v(){const y=te(e);g&&!jt(g,y)&&n(),g=y,h=requestAnimationFrame(v)}return n(),()=>{var y;u.forEach(b=>{r&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,a&&cancelAnimationFrame(h)}}const Ao=no,To=oo,Oo=Qn,Do=io,Lo=eo,mt=Jn,No=ro,Mo=(e,t,n)=>{const o=new Map,r={platform:Eo,...n},i={...r.platform,_c:o};return Zn(e,t,{...r,platform:i})};var _o=typeof document<"u",jo=function(){},xe=_o?gt.useLayoutEffect:jo;function be(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!be(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!be(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function kt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ht(e,t){const n=kt(e);return Math.round(t*n)/n}function Le(e){const t=f.useRef(e);return xe(()=>{t.current=e}),t}function ko(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:a,open:l}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=f.useState(o);be(m,o)||p(o);const[h,g]=f.useState(null),[v,y]=f.useState(null),b=f.useCallback(S=>{S!==E.current&&(E.current=S,g(S))},[]),C=f.useCallback(S=>{S!==R.current&&(R.current=S,y(S))},[]),w=i||h,P=s||v,E=f.useRef(null),R=f.useRef(null),A=f.useRef(u),M=a!=null,T=Le(a),j=Le(r),k=Le(l),D=f.useCallback(()=>{if(!E.current||!R.current)return;const S={placement:t,strategy:n,middleware:m};j.current&&(S.platform=j.current),Mo(E.current,R.current,S).then(_=>{const H={..._,isPositioned:k.current!==!1};O.current&&!be(A.current,H)&&(A.current=H,yt.flushSync(()=>{d(H)}))})},[m,t,n,j,k]);xe(()=>{l===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(S=>({...S,isPositioned:!1})))},[l]);const O=f.useRef(!1);xe(()=>(O.current=!0,()=>{O.current=!1}),[]),xe(()=>{if(w&&(E.current=w),P&&(R.current=P),w&&P){if(T.current)return T.current(w,P,D);D()}},[w,P,D,T,M]);const $=f.useMemo(()=>({reference:E,floating:R,setReference:b,setFloating:C}),[b,C]),L=f.useMemo(()=>({reference:w,floating:P}),[w,P]),N=f.useMemo(()=>{const S={position:n,left:0,top:0};if(!L.floating)return S;const _=ht(L.floating,u.x),H=ht(L.floating,u.y);return c?{...S,transform:"translate("+_+"px, "+H+"px)",...kt(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:H}},[n,c,L.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:D,refs:$,elements:L,floatingStyles:N}),[u,D,$,L,N])}const $o=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?mt({element:o.current,padding:r}).fn(n):{}:o?mt({element:o,padding:r}).fn(n):{}}}},Io=(e,t)=>{const n=Ao(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wo=(e,t)=>{const n=To(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fo=(e,t)=>({fn:No(e).fn,options:[e,t]}),Bo=(e,t)=>{const n=Oo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ho=(e,t)=>{const n=Do(e);return{name:n.name,fn:n.fn,options:[e,t]}},zo=(e,t)=>{const n=Lo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vo=(e,t)=>{const n=$o(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Uo="Arrow",$t=f.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return x.jsx(Q.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});$t.displayName=Uo;var Yo=$t;function Xo(e){const[t,n]=f.useState(void 0);return K(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,c;if("borderBoxSize"in i){const a=i.borderBoxSize,l=Array.isArray(a)?a[0]:a;s=l.inlineSize,c=l.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Ve="Popper",[It,Wt]=bt(Ve),[qo,Ft]=It(Ve),Bt=e=>{const{__scopePopper:t,children:n}=e,[o,r]=f.useState(null);return x.jsx(qo,{scope:t,anchor:o,onAnchorChange:r,children:n})};Bt.displayName=Ve;var Ht="PopperAnchor",zt=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Ft(Ht,n),s=f.useRef(null),c=ne(t,s),a=f.useRef(null);return f.useEffect(()=>{const l=a.current;a.current=(o==null?void 0:o.current)||s.current,l!==a.current&&i.onAnchorChange(a.current)}),o?null:x.jsx(Q.div,{...r,ref:c})});zt.displayName=Ht;var Ue="PopperContent",[Go,Ko]=It(Ue),Vt=f.forwardRef((e,t)=>{var Ge,Ke,Ze,Je,Qe,et;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:a=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:h,...g}=e,v=Ft(Ue,n),[y,b]=f.useState(null),C=ne(t,ae=>b(ae)),[w,P]=f.useState(null),E=Xo(w),R=(E==null?void 0:E.width)??0,A=(E==null?void 0:E.height)??0,M=o+(i!=="center"?"-"+i:""),T=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},j=Array.isArray(l)?l:[l],k=j.length>0,D={padding:T,boundary:j.filter(Jo),altBoundary:k},{refs:O,floatingStyles:$,placement:L,isPositioned:N,middlewareData:S}=ko({strategy:"fixed",placement:M,whileElementsMounted:(...ae)=>So(...ae,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Io({mainAxis:r+A,alignmentAxis:s}),a&&Wo({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Fo():void 0,...D}),a&&Bo({...D}),Ho({...D,apply:({elements:ae,rects:tt,availableWidth:gn,availableHeight:xn})=>{const{width:vn,height:yn}=tt.reference,me=ae.floating.style;me.setProperty("--radix-popper-available-width",`${gn}px`),me.setProperty("--radix-popper-available-height",`${xn}px`),me.setProperty("--radix-popper-anchor-width",`${vn}px`),me.setProperty("--radix-popper-anchor-height",`${yn}px`)}}),w&&Vo({element:w,padding:c}),Qo({arrowWidth:R,arrowHeight:A}),m&&zo({strategy:"referenceHidden",...D})]}),[_,H]=Xt(L),pe=Ce(h);K(()=>{N&&(pe==null||pe())},[N,pe]);const fn=(Ge=S.arrow)==null?void 0:Ge.x,dn=(Ke=S.arrow)==null?void 0:Ke.y,pn=((Ze=S.arrow)==null?void 0:Ze.centerOffset)!==0,[mn,hn]=f.useState();return K(()=>{y&&hn(window.getComputedStyle(y).zIndex)},[y]),x.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:N?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:mn,"--radix-popper-transform-origin":[(Je=S.transformOrigin)==null?void 0:Je.x,(Qe=S.transformOrigin)==null?void 0:Qe.y].join(" "),...((et=S.hide)==null?void 0:et.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(Go,{scope:n,placedSide:_,onArrowChange:P,arrowX:fn,arrowY:dn,shouldHideArrow:pn,children:x.jsx(Q.div,{"data-side":_,"data-align":H,...g,ref:C,style:{...g.style,animation:N?void 0:"none"}})})})});Vt.displayName=Ue;var Ut="PopperArrow",Zo={top:"bottom",right:"left",bottom:"top",left:"right"},Yt=f.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=Ko(Ut,o),s=Zo[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]: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:x.jsx(Yo,{...r,ref:n,style:{...r.style,display:"block"}})})});Yt.displayName=Ut;function Jo(e){return e!==null}var Qo=e=>({name:"transformOrigin",options:e,fn(t){var v,y,b;const{placement:n,rects:o,middlewareData:r}=t,s=((v=r.arrow)==null?void 0:v.centerOffset)!==0,c=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,u]=Xt(n),d={start:"0%",center:"50%",end:"100%"}[u],m=(((y=r.arrow)==null?void 0:y.x)??0)+c/2,p=(((b=r.arrow)==null?void 0:b.y)??0)+a/2;let h="",g="";return l==="bottom"?(h=s?d:`${m}px`,g=`${-a}px`):l==="top"?(h=s?d:`${m}px`,g=`${o.floating.height+a}px`):l==="right"?(h=`${-a}px`,g=s?d:`${p}px`):l==="left"&&(h=`${o.floating.width+a}px`,g=s?d:`${p}px`),{data:{x:h,y:g}}}});function Xt(e){const[t,n="center"]=e.split("-");return[t,n]}var er=Bt,tr=zt,nr=Vt,or=Yt,rr="Portal",qt=f.forwardRef((e,t)=>{var c;const{container:n,...o}=e,[r,i]=f.useState(!1);K(()=>i(!0),[]);const s=n||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?xt.createPortal(x.jsx(Q.div,{...o,ref:t}),s):null});qt.displayName=rr;function ir(e,t){return f.useReducer((n,o)=>t[n][o]??n,e)}var Ye=e=>{const{present:t,children:n}=e,o=sr(t),r=typeof n=="function"?n({present:o.isPresent}):f.Children.only(n),i=ne(o.ref,cr(r));return typeof n=="function"||o.isPresent?f.cloneElement(r,{ref:i}):null};Ye.displayName="Presence";function sr(e){const[t,n]=f.useState(),o=f.useRef(null),r=f.useRef(e),i=f.useRef("none"),s=e?"mounted":"unmounted",[c,a]=ir(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const l=ge(o.current);i.current=c==="mounted"?l:"none"},[c]),K(()=>{const l=o.current,u=r.current;if(u!==e){const m=i.current,p=ge(l);e?a("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?a("UNMOUNT"):a(u&&m!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,a]),K(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=p=>{const g=ge(o.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(a("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=p=>{p.target===t&&(i.current=ge(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:f.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function ge(e){return(e==null?void 0:e.animationName)||"none"}function cr(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ar=f[" useInsertionEffect ".trim().toString()]||K;function lr({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,i,s]=ur({defaultProp:t,onChange:n}),c=e!==void 0,a=c?e:r;{const u=f.useRef(e!==void 0);f.useEffect(()=>{const d=u.current;d!==c&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,o])}const l=f.useCallback(u=>{var d;if(c){const m=fr(u)?u(e):u;m!==e&&((d=s.current)==null||d.call(s,m))}else i(u)},[c,e,i,s]);return[a,l]}function ur({defaultProp:e,onChange:t}){const[n,o]=f.useState(e),r=f.useRef(n),i=f.useRef(t);return ar(()=>{i.current=t},[t]),f.useEffect(()=>{var s;r.current!==n&&((s=i.current)==null||s.call(i,n),r.current=n)},[n,r]),[n,o,i]}function fr(e){return typeof e=="function"}var dr=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"}),pr="VisuallyHidden",Gt=f.forwardRef((e,t)=>x.jsx(Q.span,{...e,ref:t,style:{...dr,...e.style}}));Gt.displayName=pr;var mr=Gt,[Ae,Fr]=bt("Tooltip",[Wt]),Te=Wt(),Kt="TooltipProvider",hr=700,ke="tooltip.open",[gr,Xe]=Ae(Kt),Zt=e=>{const{__scopeTooltip:t,delayDuration:n=hr,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=e,s=f.useRef(!0),c=f.useRef(!1),a=f.useRef(0);return f.useEffect(()=>{const l=a.current;return()=>window.clearTimeout(l)},[]),x.jsx(gr,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(a.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:f.useCallback(l=>{c.current=l},[]),disableHoverableContent:r,children:i})};Zt.displayName=Kt;var ue="Tooltip",[xr,de]=Ae(ue),Jt=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:i,disableHoverableContent:s,delayDuration:c}=e,a=Xe(ue,e.__scopeTooltip),l=Te(t),[u,d]=f.useState(null),m=Wn(),p=f.useRef(0),h=s??a.disableHoverableContent,g=c??a.delayDuration,v=f.useRef(!1),[y,b]=lr({prop:o,defaultProp:r??!1,onChange:R=>{R?(a.onOpen(),document.dispatchEvent(new CustomEvent(ke))):a.onClose(),i==null||i(R)},caller:ue}),C=f.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),w=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,b(!0)},[b]),P=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),E=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,b(!0),p.current=0},g)},[g,b]);return f.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),x.jsx(er,{...l,children:x.jsx(xr,{scope:t,contentId:m,open:y,stateAttribute:C,trigger:u,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{a.isOpenDelayedRef.current?E():w()},[a.isOpenDelayedRef,E,w]),onTriggerLeave:f.useCallback(()=>{h?P():(window.clearTimeout(p.current),p.current=0)},[P,h]),onOpen:w,onClose:P,disableHoverableContent:h,children:n})})};Jt.displayName=ue;var $e="TooltipTrigger",Qt=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=de($e,n),i=Xe($e,n),s=Te(n),c=f.useRef(null),a=ne(t,c,r.onTriggerChange),l=f.useRef(!1),u=f.useRef(!1),d=f.useCallback(()=>l.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),x.jsx(tr,{asChild:!0,...s,children:x.jsx(Q.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:a,onPointerMove:Y(e.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Y(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:Y(e.onBlur,r.onClose),onClick:Y(e.onClick,r.onClose)})})});Qt.displayName=$e;var qe="TooltipPortal",[vr,yr]=Ae(qe,{forceMount:void 0}),en=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,i=de(qe,t);return x.jsx(vr,{scope:t,forceMount:n,children:x.jsx(Ye,{present:n||i.open,children:x.jsx(qt,{asChild:!0,container:r,children:o})})})};en.displayName=qe;var ie="TooltipContent",tn=f.forwardRef((e,t)=>{const n=yr(ie,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,s=de(ie,e.__scopeTooltip);return x.jsx(Ye,{present:o||s.open,children:s.disableHoverableContent?x.jsx(nn,{side:r,...i,ref:t}):x.jsx(wr,{side:r,...i,ref:t})})}),wr=f.forwardRef((e,t)=>{const n=de(ie,e.__scopeTooltip),o=Xe(ie,e.__scopeTooltip),r=f.useRef(null),i=ne(t,r),[s,c]=f.useState(null),{trigger:a,onClose:l}=n,u=r.current,{onPointerInTransitChange:d}=o,m=f.useCallback(()=>{c(null),d(!1)},[d]),p=f.useCallback((h,g)=>{const v=h.currentTarget,y={x:h.clientX,y:h.clientY},b=Er(y,v.getBoundingClientRect()),C=Pr(y,b),w=Sr(g.getBoundingClientRect()),P=Tr([...C,...w]);c(P),d(!0)},[d]);return f.useEffect(()=>()=>m(),[m]),f.useEffect(()=>{if(a&&u){const h=v=>p(v,u),g=v=>p(v,a);return a.addEventListener("pointerleave",h),u.addEventListener("pointerleave",g),()=>{a.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",g)}}},[a,u,p,m]),f.useEffect(()=>{if(s){const h=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},b=(a==null?void 0:a.contains(v))||(u==null?void 0:u.contains(v)),C=!Ar(y,s);b?m():C&&(m(),l())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[a,u,s,l,m]),x.jsx(nn,{...e,ref:i})}),[br,Cr]=Ae(ue,{isInside:!1}),Rr=Rn("TooltipContent"),nn=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:s,...c}=e,a=de(ie,n),l=Te(n),{onClose:u}=a;return f.useEffect(()=>(document.addEventListener(ke,u),()=>document.removeEventListener(ke,u)),[u]),f.useEffect(()=>{if(a.trigger){const d=m=>{const p=m.target;p!=null&&p.contains(a.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[a.trigger,u]),x.jsx(Et,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:x.jsxs(nr,{"data-state":a.stateAttribute,...l,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(Rr,{children:o}),x.jsx(br,{scope:n,isInside:!0,children:x.jsx(mr,{id:a.contentId,role:"tooltip",children:r||o})})]})})});tn.displayName=ie;var on="TooltipArrow",rn=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Te(n);return Cr(on,n).isInside?null:x.jsx(or,{...r,...o,ref:t})});rn.displayName=on;function Er(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Pr(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Sr(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Ar(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const c=t[i],a=t[s],l=c.x,u=c.y,d=a.x,m=a.y;u>o!=m>o&&n<(d-l)*(o-u)/(m-u)+l&&(r=!r)}return r}function Tr(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Or(t)}function Or(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Dr=Zt,Lr=Jt,Nr=Qt,Mr=en,_r=tn,jr=rn;function sn({delayDuration:e=0,...t}){return x.jsx(Dr,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function cn({...e}){return x.jsx(sn,{children:x.jsx(Lr,{"data-slot":"tooltip",...e})})}function an({...e}){return x.jsx(Nr,{"data-slot":"tooltip-trigger",...e})}function ln({sideOffset:e=8,children:t,style:n,...o}){return x.jsx(Mr,{children:x.jsxs(_r,{"data-slot":"tooltip-content",sideOffset:e,style:{background:"rgba(30, 33, 37, 0.96)",color:"white",fontSize:"var(--text-xs, 10px)",lineHeight:1.4,padding:"6px 12px",borderRadius:"var(--radius-lg, 8px)",boxShadow:"0 4px 16px rgba(0, 0, 0, 0.2)",zIndex:50,width:"fit-content",textWrap:"balance",animationDuration:"0.15s",...n},...o,children:[t,x.jsx(jr,{style:{fill:"rgba(30, 33, 37, 0.96)",width:10,height:5}})]})})}function kr({level:e=1,label:t="dev",color:n="rgba(30, 33, 37, 0.65)",showLabel:o=!1,direction:r}){const s=[{dots:"●○○○○",text:"Expected — very typical",level:1},{dots:"●●○○○",text:"Typical",level:2},{dots:"●●●○○",text:"Notable",level:3},{dots:"●●●●○",text:"Atypical",level:4},{dots:"●●●●●",text:"Highly atypical — very uncommon",level:5}],c=s.find(l=>l.level===e),a=x.jsxs("div",{style:{minWidth:"260px"},children:[x.jsx("div",{style:{fontWeight:650,marginBottom:"6px",fontSize:"12px"},children:"Deviation from the norm"}),x.jsx("div",{style:{fontSize:"11.5px",lineHeight:1.5,marginBottom:"8px",opacity:.9},children:"Highlights how common or uncommon this behavior is relative to similar calls."}),c&&x.jsxs("div",{style:{fontSize:"11px",lineHeight:1.7,fontFamily:"ui-monospace, monospace",marginBottom:"10px",padding:"6px 8px",background:"rgba(255, 255, 255, 0.12)",borderRadius:"6px",fontWeight:600},children:[x.jsx("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:x.jsxs("span",{children:[c.dots," ",c.text]})}),r&&x.jsx("div",{style:{fontSize:"10px",marginTop:"4px",opacity:.8},children:r==="up"?"Positive deviation":"Negative deviation"})]}),x.jsxs("div",{style:{fontSize:"10.5px",lineHeight:1.7,fontFamily:"ui-monospace, monospace",opacity:.75},children:[x.jsx("div",{style:{fontSize:"10px",marginBottom:"4px",opacity:.7,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Full scale:"}),s.slice().reverse().map(l=>x.jsxs("div",{style:{opacity:l.level===e?.5:.7,fontSize:l.level===e?"10px":"10.5px"},children:[l.dots," ",l.text]},l.level))]})]});return x.jsxs(cn,{children:[x.jsx(an,{asChild:!0,children:x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",cursor:"help"},children:[o&&x.jsx("div",{style:{fontSize:"10px",color:n,fontWeight:650,letterSpacing:"0.02em",textTransform:"uppercase",opacity:.75},children:t}),x.jsx("div",{style:{display:"flex",gap:"3px",alignItems:"center"},children:Array.from({length:5}).map((l,u)=>{const d=u<e;return x.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",background:d?n:`${n}15`,border:d?"none":`1px solid ${n}40`,transition:"all 0.2s ease",opacity:d?.75:.5}},u)})})]})}),x.jsx(ln,{style:{maxWidth:300,padding:16},side:"bottom",sideOffset:8,children:a})]})}function un({variant:e="default",padding:t="md",railColor:n,interactive:o=!1,isActive:r=!1,onClick:i,style:s,className:c,children:a,borderRadius:l,...u}){const d=o||!!i,m={default:{background:"var(--paper)",border:"1px solid var(--border)",boxShadow:"0 1px 3px var(--shadow)"},elevated:{background:"var(--paper-elevated)",border:"1px solid var(--border)",boxShadow:"0 2px 6px var(--shadow)"},secondary:{background:"var(--paper-secondary)",border:"1px solid var(--border-subtle)",boxShadow:"none"},ghost:{background:"transparent",border:"none",boxShadow:"none"}},p={none:0,sm:8,md:14,lg:20},h=m[e]||m.default,g=p[t]??p.md,v={position:"relative",borderRadius:l||"var(--radius-md, 6px)",overflow:"auto",padding:n?`${g}px ${g}px ${g}px ${g+10}px`:g,transition:"background 0.15s, border-color 0.15s, box-shadow 0.15s",...h,...d&&{cursor:"pointer"},...r&&{background:"var(--hover-warm-subtle, rgba(200,170,120,0.06))",borderColor:"var(--border-hover)"},...s},y=["custom-thin-scrollbar-library",c].filter(Boolean).join(" "),b=w=>{!d||r||(w.currentTarget.style.background="var(--hover-warm-subtle, rgba(200,170,120,0.06))",w.currentTarget.style.borderColor="var(--border-hover)")},C=w=>{d&&(r?(w.currentTarget.style.background="var(--hover-warm-subtle, rgba(200,170,120,0.06))",w.currentTarget.style.borderColor="var(--border-hover)"):(w.currentTarget.style.background=h.background,w.currentTarget.style.borderColor=h.border.replace("1px solid ","")))};return x.jsxs("div",{style:v,className:y,onClick:i,onMouseEnter:b,onMouseLeave:C,...u,children:[n&&x.jsx("div",{style:{position:"absolute",left:0,top:0,bottom:0,width:4,background:n}}),a]})}function $r({title:e,children:t,borderRadius:n}){return x.jsxs(un,{variant:"elevated",padding:"sm",borderRadius:n,children:[x.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--text-strong)",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:8,marginTop:4},children:e}),t]})}function Ir({children:e,variant:t="default",size:n="md",...o}){const r={default:{color:"var(--text-muted)",backgroundColor:"var(--hover-warm)",borderColor:"var(--border)"},policy:{color:"var(--rail-compliance)",backgroundColor:"rgba(201,138,90,0.1)",borderColor:"rgba(201,138,90,0.25)"},tool:{color:"var(--rail-discovery)",backgroundColor:"rgba(94,136,176,0.1)",borderColor:"rgba(94,136,176,0.25)"},global:{color:"var(--rail-tone)",backgroundColor:"rgba(155,122,168,0.1)",borderColor:"rgba(155,122,168,0.25)"},phase:{color:"var(--rail-outcome)",backgroundColor:"rgba(107,124,147,0.1)",borderColor:"rgba(107,124,147,0.25)"}},i={sm:{fontSize:"var(--text-xs)",padding:"1px 6px"},md:{fontSize:"var(--text-sm)",padding:"2px 8px"}},s=r[t]||r.default,c=i[n]||i.md;return x.jsx("span",{style:{display:"inline-flex",alignItems:"center",borderRadius:"var(--radius-sm)",border:`1px solid ${s.borderColor}`,...s,...c,...o.style},...o,children:e})}function Wr({children:e,onClick:t,variant:n="secondary",disabled:o=!1,size:r="md",...i}){const s={primary:{backgroundColor:"var(--rail-tone)",color:"white",border:"none"},secondary:{backgroundColor:"transparent",border:"1px solid var(--border)",color:"var(--text-base)"},ghost:{backgroundColor:"transparent",border:"none",color:"var(--text-muted)"},danger:{backgroundColor:"var(--rail-signal-churn)",color:"white",border:"none"}},c={sm:{fontSize:"var(--text-xs)",padding:"4px 10px"},md:{fontSize:"var(--text-sm)",padding:"6px 14px"}},a={borderRadius:"var(--radius)",transition:"var(--transition-fast)",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontWeight:"var(--font-medium)",textDecoration:"none",userSelect:"none"},l=g=>{o||(n==="secondary"||n==="ghost"?g.currentTarget.style.backgroundColor="var(--hover-warm)":n==="danger"&&(g.currentTarget.style.opacity="0.85"))},u=g=>{o||(n==="secondary"||n==="ghost"?g.currentTarget.style.backgroundColor="transparent":n==="danger"&&(g.currentTarget.style.opacity="1"))},d=s[n]||s.secondary,m=c[r]||c.md,{style:p,...h}=i;return x.jsx("button",{onClick:o?void 0:t,onMouseEnter:l,onMouseLeave:u,style:{...a,...d,...m,...p},disabled:o,...h,children:e})}exports.Card=un;exports.DetailCard=$r;exports.DeviationIndicator=kr;exports.SmallButton=Wr;exports.Tag=Ir;exports.Tooltip=cn;exports.TooltipContent=ln;exports.TooltipProvider=sn;exports.TooltipTrigger=an;
|
|
1
|
+
"use strict";const x=require("react/jsx-runtime"),gt=require("react");require("lucide-react");const xt=require("react-dom");function vt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=vt(gt),yt=vt(xt);function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function nt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wt(...e){return t=>{let n=!1;const o=e.map(r=>{const i=nt(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<o.length;r++){const i=o[r];typeof i=="function"?i():nt(e[r],null)}}}}function ne(...e){return f.useCallback(wt(...e),e)}function bt(e,t=[]){let n=[];function o(i,s){const c=f.createContext(s),a=n.length;n=[...n,s];const l=d=>{var y;const{scope:m,children:p,...h}=d,g=((y=m==null?void 0:m[e])==null?void 0:y[a])||c,v=f.useMemo(()=>h,Object.values(h));return x.jsx(g.Provider,{value:v,children:p})};l.displayName=i+"Provider";function u(d,m){var g;const p=((g=m==null?void 0:m[e])==null?void 0:g[a])||c,h=f.useContext(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,u]}const r=()=>{const i=n.map(s=>f.createContext(s));return function(c){const a=(c==null?void 0:c[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...c,[e]:a}}),[c,a])}};return r.scopeName=e,[o,wn(r,...t)]}function wn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const s=o.reduce((c,{useScope:a,scopeName:l})=>{const d=a(i)[`__scope${l}`];return{...c,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function bn(e){const t=Cn(e),n=f.forwardRef((o,r)=>{const{children:i,...s}=o,c=f.Children.toArray(i),a=c.find(Rn);if(a){const l=a.props.children,u=c.map(d=>d===a?f.Children.count(l)>1?f.Children.only(null):f.isValidElement(l)?l.props.children:null:d);return x.jsx(t,{...s,ref:r,children:f.isValidElement(l)?f.cloneElement(l,void 0,u):null})}return x.jsx(t,{...s,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}function Cn(e){const t=f.forwardRef((n,o)=>{const{children:r,...i}=n;if(f.isValidElement(r)){const s=Pn(r),c=Sn(i,r.props);return r.type!==f.Fragment&&(c.ref=o?wt(o,s):s),f.cloneElement(r,c)}return f.Children.count(r)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ct=Symbol("radix.slottable");function En(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ct,t}function Rn(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ct}function Sn(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...c)=>{const a=i(...c);return r(...c),a}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function Pn(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var An=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Q=An.reduce((e,t)=>{const n=bn(`Primitive.${t}`),o=f.forwardRef((r,i)=>{const{asChild:s,...c}=r,a=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(a,{...c,ref:i})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Tn(e,t){e&&yt.flushSync(()=>e.dispatchEvent(t))}function Ce(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function On(e,t=globalThis==null?void 0:globalThis.document){const n=Ce(e);f.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Dn="DismissableLayer",Ne="dismissableLayer.update",Ln="dismissableLayer.pointerDownOutside",Nn="dismissableLayer.focusOutside",ot,Et=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rt=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...a}=e,l=f.useContext(Et),[u,d]=f.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),h=ne(t,E=>d(E)),g=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),b=u?g.indexOf(u):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,w=b>=y,S=jn(E=>{const A=E.target,M=[...l.branches].some(T=>T.contains(A));!w||M||(r==null||r(E),s==null||s(E),E.defaultPrevented||c==null||c())},m),R=kn(E=>{const A=E.target;[...l.branches].some(T=>T.contains(A))||(i==null||i(E),s==null||s(E),E.defaultPrevented||c==null||c())},m);return On(E=>{b===l.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},m),f.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(ot=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),rt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ot)}},[u,m,n,l]),f.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),rt())},[u,l]),f.useEffect(()=>{const E=()=>p({});return document.addEventListener(Ne,E),()=>document.removeEventListener(Ne,E)},[]),x.jsx(Q.div,{...a,ref:h,style:{pointerEvents:C?w?"auto":"none":void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,S.onPointerDownCapture)})});Rt.displayName=Dn;var Mn="DismissableLayerBranch",_n=f.forwardRef((e,t)=>{const n=f.useContext(Et),o=f.useRef(null),r=ne(t,o);return f.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(Q.div,{...e,ref:r})});_n.displayName=Mn;function jn(e,t=globalThis==null?void 0:globalThis.document){const n=Ce(e),o=f.useRef(!1),r=f.useRef(()=>{});return f.useEffect(()=>{const i=c=>{if(c.target&&!o.current){let a=function(){St(Ln,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=a,t.addEventListener("click",r.current,{once:!0})):a()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function kn(e,t=globalThis==null?void 0:globalThis.document){const n=Ce(e),o=f.useRef(!1);return f.useEffect(()=>{const r=i=>{i.target&&!o.current&&St(Nn,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function rt(){const e=new CustomEvent(Ne);document.dispatchEvent(e)}function St(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Tn(r,i):r.dispatchEvent(i)}var K=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},$n=f[" useId ".trim().toString()]||(()=>{}),In=0;function Wn(e){const[t,n]=f.useState($n());return K(()=>{e||n(o=>o??String(In++))},[e]),e||(t?`radix-${t}`:"")}const Fn=["top","right","bottom","left"],Z=Math.min,I=Math.max,ve=Math.round,he=Math.floor,V=e=>({x:e,y:e}),Bn={left:"right",right:"left",bottom:"top",top:"bottom"};function Me(e,t,n){return I(e,Z(t,n))}function X(e,t){return typeof e=="function"?e(t):e}function q(e){return e.split("-")[0]}function se(e){return e.split("-")[1]}function Ie(e){return e==="x"?"y":"x"}function We(e){return e==="y"?"height":"width"}function z(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Fe(e){return Ie(z(e))}function Hn(e,t,n){n===void 0&&(n=!1);const o=se(e),r=Fe(e),i=We(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ye(s)),[s,ye(s)]}function zn(e){const t=ye(e);return[_e(e),t,_e(t)]}function _e(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const it=["left","right"],st=["right","left"],Vn=["top","bottom"],Un=["bottom","top"];function Yn(e,t,n){switch(e){case"top":case"bottom":return n?t?st:it:t?it:st;case"left":case"right":return t?Vn:Un;default:return[]}}function Xn(e,t,n,o){const r=se(e);let i=Yn(q(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(_e)))),i}function ye(e){const t=q(e);return Bn[t]+e.slice(t.length)}function qn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pt(e){return typeof e!="number"?qn(e):{top:e,right:e,bottom:e,left:e}}function we(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function ct(e,t,n){let{reference:o,floating:r}=e;const i=z(t),s=Fe(t),c=We(s),a=q(t),l=i==="y",u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let p;switch(a){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(se(t)){case"start":p[s]-=m*(n&&l?-1:1);break;case"end":p[s]+=m*(n&&l?-1:1);break}return p}async function Gn(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:a}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=X(t,e),h=Pt(p),v=c[m?d==="floating"?"reference":"floating":d],y=we(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:u,strategy:a})),b=d==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),w=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},S=we(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:C,strategy:a}):b);return{top:(y.top-S.top+h.top)/w.y,bottom:(S.bottom-y.bottom+h.bottom)/w.y,left:(y.left-S.left+h.left)/w.x,right:(S.right-y.right+h.right)/w.x}}const Kn=50,Zn=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:Gn},a=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=ct(l,o,a),m=o,p=0;const h={};for(let g=0;g<i.length;g++){const v=i[g];if(!v)continue;const{name:y,fn:b}=v,{x:C,y:w,data:S,reset:R}=await b({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:h,rects:l,platform:c,elements:{reference:e,floating:t}});u=C??u,d=w??d,h[y]={...h[y],...S},R&&p<Kn&&(p++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(l=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):R.rects),{x:u,y:d}=ct(l,m,a)),g=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:h}},Jn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:a}=t,{element:l,padding:u=0}=X(e,t)||{};if(l==null)return{};const d=Pt(u),m={x:n,y:o},p=Fe(r),h=We(p),g=await s.getDimensions(l),v=p==="y",y=v?"top":"left",b=v?"bottom":"right",C=v?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-m[p]-i.floating[h],S=m[p]-i.reference[p],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let E=R?R[C]:0;(!E||!await(s.isElement==null?void 0:s.isElement(R)))&&(E=c.floating[C]||i.floating[h]);const A=w/2-S/2,M=E/2-g[h]/2-1,T=Z(d[y],M),j=Z(d[b],M),k=T,D=E-g[h]-j,O=E/2-g[h]/2+A,$=Me(k,O,D),L=!a.arrow&&se(r)!=null&&O!==$&&i.reference[h]/2-(O<k?T:j)-g[h]/2<0,N=L?O<k?O-k:O-D:0;return{[p]:m[p]+N,data:{[p]:$,centerOffset:O-$-N,...L&&{alignmentOffset:N}},reset:L}}}),Qn=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:a,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=X(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=q(r),b=z(c),C=q(c)===c,w=await(a.isRTL==null?void 0:a.isRTL(l.floating)),S=m||(C||!g?[ye(c)]:zn(c)),R=h!=="none";!m&&R&&S.push(...Xn(c,g,h,w));const E=[c,...S],A=await a.detectOverflow(t,v),M=[];let T=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&M.push(A[y]),d){const O=Hn(r,s,w);M.push(A[O[0]],A[O[1]])}if(T=[...T,{placement:r,overflows:M}],!M.every(O=>O<=0)){var j,k;const O=(((j=i.flip)==null?void 0:j.index)||0)+1,$=E[O];if($&&(!(d==="alignment"?b!==z($):!1)||T.every(P=>z(P.placement)===b?P.overflows[0]>0:!0)))return{data:{index:O,overflows:T},reset:{placement:$}};let L=(k=T.filter(N=>N.overflows[0]<=0).sort((N,P)=>N.overflows[1]-P.overflows[1])[0])==null?void 0:k.placement;if(!L)switch(p){case"bestFit":{var D;const N=(D=T.filter(P=>{if(R){const _=z(P.placement);return _===b||_==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(_=>_>0).reduce((_,H)=>_+H,0)]).sort((P,_)=>P[1]-_[1])[0])==null?void 0:D[0];N&&(L=N);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}};function at(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lt(e){return Fn.some(t=>e[t]>=0)}const eo=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...i}=X(e,t);switch(r){case"referenceHidden":{const s=await o.detectOverflow(t,{...i,elementContext:"reference"}),c=at(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:lt(c)}}}case"escaped":{const s=await o.detectOverflow(t,{...i,altBoundary:!0}),c=at(s,n.floating);return{data:{escapedOffsets:c,escaped:lt(c)}}}default:return{}}}}},At=new Set(["left","top"]);async function to(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=q(n),c=se(n),a=z(n)==="y",l=At.has(s)?-1:1,u=i&&a?-1:1,d=X(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof h=="number"&&(p=c==="end"?h*-1:h),a?{x:p*u,y:m*l}:{x:m*l,y:p*u}}const no=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=t,a=await to(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:s}}}}},oo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:a={fn:y=>{let{x:b,y:C}=y;return{x:b,y:C}}},...l}=X(e,t),u={x:n,y:o},d=await i.detectOverflow(t,l),m=z(q(r)),p=Ie(m);let h=u[p],g=u[m];if(s){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",C=h+d[y],w=h-d[b];h=Me(C,h,w)}if(c){const y=m==="y"?"top":"left",b=m==="y"?"bottom":"right",C=g+d[y],w=g-d[b];g=Me(C,g,w)}const v=a.fn({...t,[p]:h,[m]:g});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[p]:s,[m]:c}}}}}},ro=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=t,{offset:c=0,mainAxis:a=!0,crossAxis:l=!0}=X(e,t),u={x:n,y:o},d=z(r),m=Ie(d);let p=u[m],h=u[d];const g=X(c,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const C=m==="y"?"height":"width",w=i.reference[m]-i.floating[C]+v.mainAxis,S=i.reference[m]+i.reference[C]-v.mainAxis;p<w?p=w:p>S&&(p=S)}if(l){var y,b;const C=m==="y"?"width":"height",w=At.has(q(r)),S=i.reference[d]-i.floating[C]+(w&&((y=s.offset)==null?void 0:y[d])||0)+(w?0:v.crossAxis),R=i.reference[d]+i.reference[C]+(w?0:((b=s.offset)==null?void 0:b[d])||0)-(w?v.crossAxis:0);h<S?h=S:h>R&&(h=R)}return{[m]:p,[d]:h}}}},io=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:s,elements:c}=t,{apply:a=()=>{},...l}=X(e,t),u=await s.detectOverflow(t,l),d=q(r),m=se(r),p=z(r)==="y",{width:h,height:g}=i.floating;let v,y;d==="top"||d==="bottom"?(v=d,y=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(y=d,v=m==="end"?"top":"bottom");const b=g-u.top-u.bottom,C=h-u.left-u.right,w=Z(g-u[v],b),S=Z(h-u[y],C),R=!t.middlewareData.shift;let E=w,A=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=b),R&&!m){const T=I(u.left,0),j=I(u.right,0),k=I(u.top,0),D=I(u.bottom,0);p?A=h-2*(T!==0||j!==0?T+j:I(u.left,u.right)):E=g-2*(k!==0||D!==0?k+D:I(u.top,u.bottom))}await a({...t,availableWidth:A,availableHeight:E});const M=await s.getDimensions(c.floating);return h!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function Ee(){return typeof window<"u"}function ce(e){return Tt(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function U(e){var t;return(t=(Tt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tt(e){return Ee()?e instanceof Node||e instanceof W(e).Node:!1}function F(e){return Ee()?e instanceof Element||e instanceof W(e).Element:!1}function G(e){return Ee()?e instanceof HTMLElement||e instanceof W(e).HTMLElement:!1}function ut(e){return!Ee()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof W(e).ShadowRoot}function fe(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=B(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function so(e){return/^(table|td|th)$/.test(ce(e))}function Re(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const co=/transform|translate|scale|rotate|perspective|filter/,ao=/paint|layout|strict|content/,ee=e=>!!e&&e!=="none";let Oe;function Be(e){const t=F(e)?B(e):e;return ee(t.transform)||ee(t.translate)||ee(t.scale)||ee(t.rotate)||ee(t.perspective)||!He()&&(ee(t.backdropFilter)||ee(t.filter))||co.test(t.willChange||"")||ao.test(t.contain||"")}function lo(e){let t=J(e);for(;G(t)&&!re(t);){if(Be(t))return t;if(Re(t))return null;t=J(t)}return null}function He(){return Oe==null&&(Oe=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Oe}function re(e){return/^(html|body|#document)$/.test(ce(e))}function B(e){return W(e).getComputedStyle(e)}function Se(e){return F(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if(ce(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ut(e)&&e.host||U(e);return ut(t)?t.host:t}function Ot(e){const t=J(e);return re(t)?e.ownerDocument?e.ownerDocument.body:e.body:G(t)&&fe(t)?t:Ot(t)}function le(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Ot(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=W(r);if(i){const c=je(s);return t.concat(s,s.visualViewport||[],fe(r)?r:[],c&&n?le(c):[])}else return t.concat(r,le(r,[],n))}function je(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Dt(e){const t=B(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=G(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=ve(n)!==i||ve(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function ze(e){return F(e)?e:e.contextElement}function oe(e){const t=ze(e);if(!G(t))return V(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Dt(t);let s=(i?ve(n.width):n.width)/o,c=(i?ve(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const uo=V(0);function Lt(e){const t=W(e);return!He()||!t.visualViewport?uo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==W(e)?!1:t}function te(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=ze(e);let s=V(1);t&&(o?F(o)&&(s=oe(o)):s=oe(e));const c=fo(i,n,o)?Lt(i):V(0);let a=(r.left+c.x)/s.x,l=(r.top+c.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const m=W(i),p=o&&F(o)?W(o):o;let h=m,g=je(h);for(;g&&o&&p!==h;){const v=oe(g),y=g.getBoundingClientRect(),b=B(g),C=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,w=y.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;a*=v.x,l*=v.y,u*=v.x,d*=v.y,a+=C,l+=w,h=W(g),g=je(h)}}return we({width:u,height:d,x:a,y:l})}function Pe(e,t){const n=Se(e).scrollLeft;return t?t.left+n:te(U(e)).left+n}function Nt(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Pe(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function po(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=U(o),c=t?Re(t.floating):!1;if(o===s||c&&i)return n;let a={scrollLeft:0,scrollTop:0},l=V(1);const u=V(0),d=G(o);if((d||!d&&!i)&&((ce(o)!=="body"||fe(s))&&(a=Se(o)),d)){const p=te(o);l=oe(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}const m=s&&!d&&!i?Nt(s,a):V(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+u.x+m.x,y:n.y*l.y-a.scrollTop*l.y+u.y+m.y}}function mo(e){return Array.from(e.getClientRects())}function ho(e){const t=U(e),n=Se(e),o=e.ownerDocument.body,r=I(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=I(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+Pe(e);const c=-n.scrollTop;return B(o).direction==="rtl"&&(s+=I(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const ft=25;function go(e,t){const n=W(e),o=U(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,a=0;if(r){i=r.width,s=r.height;const u=He();(!u||u&&t==="fixed")&&(c=r.offsetLeft,a=r.offsetTop)}const l=Pe(o);if(l<=0){const u=o.ownerDocument,d=u.body,m=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-d.clientWidth-p);h<=ft&&(i-=h)}else l<=ft&&(i+=l);return{width:i,height:s,x:c,y:a}}function xo(e,t){const n=te(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=G(e)?oe(e):V(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,a=r*i.x,l=o*i.y;return{width:s,height:c,x:a,y:l}}function dt(e,t,n){let o;if(t==="viewport")o=go(e,n);else if(t==="document")o=ho(U(e));else if(F(t))o=xo(t,n);else{const r=Lt(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return we(o)}function Mt(e,t){const n=J(e);return n===t||!F(n)||re(n)?!1:B(n).position==="fixed"||Mt(n,t)}function vo(e,t){const n=t.get(e);if(n)return n;let o=le(e,[],!1).filter(c=>F(c)&&ce(c)!=="body"),r=null;const i=B(e).position==="fixed";let s=i?J(e):e;for(;F(s)&&!re(s);){const c=B(s),a=Be(s);!a&&c.position==="fixed"&&(r=null),(i?!a&&!r:!a&&c.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||fe(s)&&!a&&Mt(e,s))?o=o.filter(u=>u!==s):r=c,s=J(s)}return t.set(e,o),o}function yo(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Re(t)?[]:vo(t,this._c):[].concat(n),o],c=dt(t,s[0],r);let a=c.top,l=c.right,u=c.bottom,d=c.left;for(let m=1;m<s.length;m++){const p=dt(t,s[m],r);a=I(p.top,a),l=Z(p.right,l),u=Z(p.bottom,u),d=I(p.left,d)}return{width:l-d,height:u-a,x:d,y:a}}function wo(e){const{width:t,height:n}=Dt(e);return{width:t,height:n}}function bo(e,t,n){const o=G(t),r=U(t),i=n==="fixed",s=te(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const a=V(0);function l(){a.x=Pe(r)}if(o||!o&&!i)if((ce(t)!=="body"||fe(r))&&(c=Se(t)),o){const p=te(t,!0,i,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else r&&l();i&&!o&&r&&l();const u=r&&!o&&!i?Nt(r,c):V(0),d=s.left+c.scrollLeft-a.x-u.x,m=s.top+c.scrollTop-a.y-u.y;return{x:d,y:m,width:s.width,height:s.height}}function De(e){return B(e).position==="static"}function pt(e,t){if(!G(e)||B(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return U(e)===n&&(n=n.ownerDocument.body),n}function _t(e,t){const n=W(e);if(Re(e))return n;if(!G(e)){let r=J(e);for(;r&&!re(r);){if(F(r)&&!De(r))return r;r=J(r)}return n}let o=pt(e,t);for(;o&&so(o)&&De(o);)o=pt(o,t);return o&&re(o)&&De(o)&&!Be(o)?n:o||lo(e)||n}const Co=async function(e){const t=this.getOffsetParent||_t,n=this.getDimensions,o=await n(e.floating);return{reference:bo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Eo(e){return B(e).direction==="rtl"}const Ro={convertOffsetParentRelativeRectToViewportRelativeRect:po,getDocumentElement:U,getClippingRect:yo,getOffsetParent:_t,getElementRects:Co,getClientRects:mo,getDimensions:wo,getScale:oe,isElement:F,isRTL:Eo};function jt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function So(e,t){let n=null,o;const r=U(e);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),i();const l=e.getBoundingClientRect(),{left:u,top:d,width:m,height:p}=l;if(c||t(),!m||!p)return;const h=he(d),g=he(r.clientWidth-(u+m)),v=he(r.clientHeight-(d+p)),y=he(u),C={rootMargin:-h+"px "+-g+"px "+-v+"px "+-y+"px",threshold:I(0,Z(1,a))||1};let w=!0;function S(R){const E=R[0].intersectionRatio;if(E!==a){if(!w)return s();E?s(!1,E):o=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!jt(l,e.getBoundingClientRect())&&s(),w=!1}try{n=new IntersectionObserver(S,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,C)}n.observe(e)}return s(!0),i}function Po(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=ze(e),u=r||i?[...l?le(l):[],...t?le(t):[]]:[];u.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=l&&c?So(l,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(y=>{let[b]=y;b&&b.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),l&&!a&&p.observe(l),t&&p.observe(t));let h,g=a?te(e):null;a&&v();function v(){const y=te(e);g&&!jt(g,y)&&n(),g=y,h=requestAnimationFrame(v)}return n(),()=>{var y;u.forEach(b=>{r&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,a&&cancelAnimationFrame(h)}}const Ao=no,To=oo,Oo=Qn,Do=io,Lo=eo,mt=Jn,No=ro,Mo=(e,t,n)=>{const o=new Map,r={platform:Ro,...n},i={...r.platform,_c:o};return Zn(e,t,{...r,platform:i})};var _o=typeof document<"u",jo=function(){},xe=_o?gt.useLayoutEffect:jo;function be(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!be(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!be(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function kt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ht(e,t){const n=kt(e);return Math.round(t*n)/n}function Le(e){const t=f.useRef(e);return xe(()=>{t.current=e}),t}function ko(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:a,open:l}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=f.useState(o);be(m,o)||p(o);const[h,g]=f.useState(null),[v,y]=f.useState(null),b=f.useCallback(P=>{P!==R.current&&(R.current=P,g(P))},[]),C=f.useCallback(P=>{P!==E.current&&(E.current=P,y(P))},[]),w=i||h,S=s||v,R=f.useRef(null),E=f.useRef(null),A=f.useRef(u),M=a!=null,T=Le(a),j=Le(r),k=Le(l),D=f.useCallback(()=>{if(!R.current||!E.current)return;const P={placement:t,strategy:n,middleware:m};j.current&&(P.platform=j.current),Mo(R.current,E.current,P).then(_=>{const H={..._,isPositioned:k.current!==!1};O.current&&!be(A.current,H)&&(A.current=H,yt.flushSync(()=>{d(H)}))})},[m,t,n,j,k]);xe(()=>{l===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[l]);const O=f.useRef(!1);xe(()=>(O.current=!0,()=>{O.current=!1}),[]),xe(()=>{if(w&&(R.current=w),S&&(E.current=S),w&&S){if(T.current)return T.current(w,S,D);D()}},[w,S,D,T,M]);const $=f.useMemo(()=>({reference:R,floating:E,setReference:b,setFloating:C}),[b,C]),L=f.useMemo(()=>({reference:w,floating:S}),[w,S]),N=f.useMemo(()=>{const P={position:n,left:0,top:0};if(!L.floating)return P;const _=ht(L.floating,u.x),H=ht(L.floating,u.y);return c?{...P,transform:"translate("+_+"px, "+H+"px)",...kt(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:H}},[n,c,L.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:D,refs:$,elements:L,floatingStyles:N}),[u,D,$,L,N])}const $o=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?mt({element:o.current,padding:r}).fn(n):{}:o?mt({element:o,padding:r}).fn(n):{}}}},Io=(e,t)=>{const n=Ao(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wo=(e,t)=>{const n=To(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fo=(e,t)=>({fn:No(e).fn,options:[e,t]}),Bo=(e,t)=>{const n=Oo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ho=(e,t)=>{const n=Do(e);return{name:n.name,fn:n.fn,options:[e,t]}},zo=(e,t)=>{const n=Lo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vo=(e,t)=>{const n=$o(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Uo="Arrow",$t=f.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return x.jsx(Q.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});$t.displayName=Uo;var Yo=$t;function Xo(e){const[t,n]=f.useState(void 0);return K(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,c;if("borderBoxSize"in i){const a=i.borderBoxSize,l=Array.isArray(a)?a[0]:a;s=l.inlineSize,c=l.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Ve="Popper",[It,Wt]=bt(Ve),[qo,Ft]=It(Ve),Bt=e=>{const{__scopePopper:t,children:n}=e,[o,r]=f.useState(null);return x.jsx(qo,{scope:t,anchor:o,onAnchorChange:r,children:n})};Bt.displayName=Ve;var Ht="PopperAnchor",zt=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Ft(Ht,n),s=f.useRef(null),c=ne(t,s),a=f.useRef(null);return f.useEffect(()=>{const l=a.current;a.current=(o==null?void 0:o.current)||s.current,l!==a.current&&i.onAnchorChange(a.current)}),o?null:x.jsx(Q.div,{...r,ref:c})});zt.displayName=Ht;var Ue="PopperContent",[Go,Ko]=It(Ue),Vt=f.forwardRef((e,t)=>{var Ge,Ke,Ze,Je,Qe,et;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:a=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:h,...g}=e,v=Ft(Ue,n),[y,b]=f.useState(null),C=ne(t,ae=>b(ae)),[w,S]=f.useState(null),R=Xo(w),E=(R==null?void 0:R.width)??0,A=(R==null?void 0:R.height)??0,M=o+(i!=="center"?"-"+i:""),T=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},j=Array.isArray(l)?l:[l],k=j.length>0,D={padding:T,boundary:j.filter(Jo),altBoundary:k},{refs:O,floatingStyles:$,placement:L,isPositioned:N,middlewareData:P}=ko({strategy:"fixed",placement:M,whileElementsMounted:(...ae)=>Po(...ae,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Io({mainAxis:r+A,alignmentAxis:s}),a&&Wo({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Fo():void 0,...D}),a&&Bo({...D}),Ho({...D,apply:({elements:ae,rects:tt,availableWidth:gn,availableHeight:xn})=>{const{width:vn,height:yn}=tt.reference,me=ae.floating.style;me.setProperty("--radix-popper-available-width",`${gn}px`),me.setProperty("--radix-popper-available-height",`${xn}px`),me.setProperty("--radix-popper-anchor-width",`${vn}px`),me.setProperty("--radix-popper-anchor-height",`${yn}px`)}}),w&&Vo({element:w,padding:c}),Qo({arrowWidth:E,arrowHeight:A}),m&&zo({strategy:"referenceHidden",...D})]}),[_,H]=Xt(L),pe=Ce(h);K(()=>{N&&(pe==null||pe())},[N,pe]);const fn=(Ge=P.arrow)==null?void 0:Ge.x,dn=(Ke=P.arrow)==null?void 0:Ke.y,pn=((Ze=P.arrow)==null?void 0:Ze.centerOffset)!==0,[mn,hn]=f.useState();return K(()=>{y&&hn(window.getComputedStyle(y).zIndex)},[y]),x.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:N?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:mn,"--radix-popper-transform-origin":[(Je=P.transformOrigin)==null?void 0:Je.x,(Qe=P.transformOrigin)==null?void 0:Qe.y].join(" "),...((et=P.hide)==null?void 0:et.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(Go,{scope:n,placedSide:_,onArrowChange:S,arrowX:fn,arrowY:dn,shouldHideArrow:pn,children:x.jsx(Q.div,{"data-side":_,"data-align":H,...g,ref:C,style:{...g.style,animation:N?void 0:"none"}})})})});Vt.displayName=Ue;var Ut="PopperArrow",Zo={top:"bottom",right:"left",bottom:"top",left:"right"},Yt=f.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=Ko(Ut,o),s=Zo[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]: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:x.jsx(Yo,{...r,ref:n,style:{...r.style,display:"block"}})})});Yt.displayName=Ut;function Jo(e){return e!==null}var Qo=e=>({name:"transformOrigin",options:e,fn(t){var v,y,b;const{placement:n,rects:o,middlewareData:r}=t,s=((v=r.arrow)==null?void 0:v.centerOffset)!==0,c=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,u]=Xt(n),d={start:"0%",center:"50%",end:"100%"}[u],m=(((y=r.arrow)==null?void 0:y.x)??0)+c/2,p=(((b=r.arrow)==null?void 0:b.y)??0)+a/2;let h="",g="";return l==="bottom"?(h=s?d:`${m}px`,g=`${-a}px`):l==="top"?(h=s?d:`${m}px`,g=`${o.floating.height+a}px`):l==="right"?(h=`${-a}px`,g=s?d:`${p}px`):l==="left"&&(h=`${o.floating.width+a}px`,g=s?d:`${p}px`),{data:{x:h,y:g}}}});function Xt(e){const[t,n="center"]=e.split("-");return[t,n]}var er=Bt,tr=zt,nr=Vt,or=Yt,rr="Portal",qt=f.forwardRef((e,t)=>{var c;const{container:n,...o}=e,[r,i]=f.useState(!1);K(()=>i(!0),[]);const s=n||r&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?xt.createPortal(x.jsx(Q.div,{...o,ref:t}),s):null});qt.displayName=rr;function ir(e,t){return f.useReducer((n,o)=>t[n][o]??n,e)}var Ye=e=>{const{present:t,children:n}=e,o=sr(t),r=typeof n=="function"?n({present:o.isPresent}):f.Children.only(n),i=ne(o.ref,cr(r));return typeof n=="function"||o.isPresent?f.cloneElement(r,{ref:i}):null};Ye.displayName="Presence";function sr(e){const[t,n]=f.useState(),o=f.useRef(null),r=f.useRef(e),i=f.useRef("none"),s=e?"mounted":"unmounted",[c,a]=ir(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const l=ge(o.current);i.current=c==="mounted"?l:"none"},[c]),K(()=>{const l=o.current,u=r.current;if(u!==e){const m=i.current,p=ge(l);e?a("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?a("UNMOUNT"):a(u&&m!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,a]),K(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=p=>{const g=ge(o.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(a("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},m=p=>{p.target===t&&(i.current=ge(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:f.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function ge(e){return(e==null?void 0:e.animationName)||"none"}function cr(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ar=f[" useInsertionEffect ".trim().toString()]||K;function lr({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,i,s]=ur({defaultProp:t,onChange:n}),c=e!==void 0,a=c?e:r;{const u=f.useRef(e!==void 0);f.useEffect(()=>{const d=u.current;d!==c&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,o])}const l=f.useCallback(u=>{var d;if(c){const m=fr(u)?u(e):u;m!==e&&((d=s.current)==null||d.call(s,m))}else i(u)},[c,e,i,s]);return[a,l]}function ur({defaultProp:e,onChange:t}){const[n,o]=f.useState(e),r=f.useRef(n),i=f.useRef(t);return ar(()=>{i.current=t},[t]),f.useEffect(()=>{var s;r.current!==n&&((s=i.current)==null||s.call(i,n),r.current=n)},[n,r]),[n,o,i]}function fr(e){return typeof e=="function"}var dr=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"}),pr="VisuallyHidden",Gt=f.forwardRef((e,t)=>x.jsx(Q.span,{...e,ref:t,style:{...dr,...e.style}}));Gt.displayName=pr;var mr=Gt,[Ae,Fr]=bt("Tooltip",[Wt]),Te=Wt(),Kt="TooltipProvider",hr=700,ke="tooltip.open",[gr,Xe]=Ae(Kt),Zt=e=>{const{__scopeTooltip:t,delayDuration:n=hr,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=e,s=f.useRef(!0),c=f.useRef(!1),a=f.useRef(0);return f.useEffect(()=>{const l=a.current;return()=>window.clearTimeout(l)},[]),x.jsx(gr,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(a.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:f.useCallback(l=>{c.current=l},[]),disableHoverableContent:r,children:i})};Zt.displayName=Kt;var ue="Tooltip",[xr,de]=Ae(ue),Jt=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:i,disableHoverableContent:s,delayDuration:c}=e,a=Xe(ue,e.__scopeTooltip),l=Te(t),[u,d]=f.useState(null),m=Wn(),p=f.useRef(0),h=s??a.disableHoverableContent,g=c??a.delayDuration,v=f.useRef(!1),[y,b]=lr({prop:o,defaultProp:r??!1,onChange:E=>{E?(a.onOpen(),document.dispatchEvent(new CustomEvent(ke))):a.onClose(),i==null||i(E)},caller:ue}),C=f.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),w=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,b(!0)},[b]),S=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b(!1)},[b]),R=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,b(!0),p.current=0},g)},[g,b]);return f.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),x.jsx(er,{...l,children:x.jsx(xr,{scope:t,contentId:m,open:y,stateAttribute:C,trigger:u,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{a.isOpenDelayedRef.current?R():w()},[a.isOpenDelayedRef,R,w]),onTriggerLeave:f.useCallback(()=>{h?S():(window.clearTimeout(p.current),p.current=0)},[S,h]),onOpen:w,onClose:S,disableHoverableContent:h,children:n})})};Jt.displayName=ue;var $e="TooltipTrigger",Qt=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=de($e,n),i=Xe($e,n),s=Te(n),c=f.useRef(null),a=ne(t,c,r.onTriggerChange),l=f.useRef(!1),u=f.useRef(!1),d=f.useCallback(()=>l.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),x.jsx(tr,{asChild:!0,...s,children:x.jsx(Q.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:a,onPointerMove:Y(e.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{r.open&&r.onClose(),l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Y(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:Y(e.onBlur,r.onClose),onClick:Y(e.onClick,r.onClose)})})});Qt.displayName=$e;var qe="TooltipPortal",[vr,yr]=Ae(qe,{forceMount:void 0}),en=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,i=de(qe,t);return x.jsx(vr,{scope:t,forceMount:n,children:x.jsx(Ye,{present:n||i.open,children:x.jsx(qt,{asChild:!0,container:r,children:o})})})};en.displayName=qe;var ie="TooltipContent",tn=f.forwardRef((e,t)=>{const n=yr(ie,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,s=de(ie,e.__scopeTooltip);return x.jsx(Ye,{present:o||s.open,children:s.disableHoverableContent?x.jsx(nn,{side:r,...i,ref:t}):x.jsx(wr,{side:r,...i,ref:t})})}),wr=f.forwardRef((e,t)=>{const n=de(ie,e.__scopeTooltip),o=Xe(ie,e.__scopeTooltip),r=f.useRef(null),i=ne(t,r),[s,c]=f.useState(null),{trigger:a,onClose:l}=n,u=r.current,{onPointerInTransitChange:d}=o,m=f.useCallback(()=>{c(null),d(!1)},[d]),p=f.useCallback((h,g)=>{const v=h.currentTarget,y={x:h.clientX,y:h.clientY},b=Rr(y,v.getBoundingClientRect()),C=Sr(y,b),w=Pr(g.getBoundingClientRect()),S=Tr([...C,...w]);c(S),d(!0)},[d]);return f.useEffect(()=>()=>m(),[m]),f.useEffect(()=>{if(a&&u){const h=v=>p(v,u),g=v=>p(v,a);return a.addEventListener("pointerleave",h),u.addEventListener("pointerleave",g),()=>{a.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",g)}}},[a,u,p,m]),f.useEffect(()=>{if(s){const h=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},b=(a==null?void 0:a.contains(v))||(u==null?void 0:u.contains(v)),C=!Ar(y,s);b?m():C&&(m(),l())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[a,u,s,l,m]),x.jsx(nn,{...e,ref:i})}),[br,Cr]=Ae(ue,{isInside:!1}),Er=En("TooltipContent"),nn=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:s,...c}=e,a=de(ie,n),l=Te(n),{onClose:u}=a;return f.useEffect(()=>(document.addEventListener(ke,u),()=>document.removeEventListener(ke,u)),[u]),f.useEffect(()=>{if(a.trigger){const d=m=>{const p=m.target;p!=null&&p.contains(a.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[a.trigger,u]),x.jsx(Rt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:x.jsxs(nr,{"data-state":a.stateAttribute,...l,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(Er,{children:o}),x.jsx(br,{scope:n,isInside:!0,children:x.jsx(mr,{id:a.contentId,role:"tooltip",children:r||o})})]})})});tn.displayName=ie;var on="TooltipArrow",rn=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Te(n);return Cr(on,n).isInside?null:x.jsx(or,{...r,...o,ref:t})});rn.displayName=on;function Rr(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Sr(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Pr(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Ar(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const c=t[i],a=t[s],l=c.x,u=c.y,d=a.x,m=a.y;u>o!=m>o&&n<(d-l)*(o-u)/(m-u)+l&&(r=!r)}return r}function Tr(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Or(t)}function Or(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Dr=Zt,Lr=Jt,Nr=Qt,Mr=en,_r=tn,jr=rn;function sn({delayDuration:e=0,...t}){return x.jsx(Dr,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function cn({...e}){return x.jsx(sn,{children:x.jsx(Lr,{"data-slot":"tooltip",...e})})}function an({...e}){return x.jsx(Nr,{"data-slot":"tooltip-trigger",...e})}function ln({sideOffset:e=8,children:t,style:n,...o}){return x.jsx(Mr,{children:x.jsxs(_r,{"data-slot":"tooltip-content",sideOffset:e,style:{background:"rgba(30, 33, 37, 0.96)",color:"white",fontSize:"var(--text-xs, 10px)",lineHeight:1.4,padding:"6px 12px",borderRadius:"var(--radius-lg, 8px)",boxShadow:"0 4px 16px rgba(0, 0, 0, 0.2)",zIndex:50,width:"fit-content",textWrap:"balance",animationDuration:"0.15s",...n},...o,children:[t,x.jsx(jr,{style:{fill:"rgba(30, 33, 37, 0.96)",width:10,height:5}})]})})}function kr({level:e=1,label:t="dev",color:n="rgba(30, 33, 37, 0.65)",showLabel:o=!1,direction:r}){const s=[{dots:"●○○○○",text:"Expected — very typical",level:1},{dots:"●●○○○",text:"Typical",level:2},{dots:"●●●○○",text:"Notable",level:3},{dots:"●●●●○",text:"Atypical",level:4},{dots:"●●●●●",text:"Highly atypical — very uncommon",level:5}],c=s.find(l=>l.level===e),a=x.jsxs("div",{style:{minWidth:"260px"},children:[x.jsx("div",{style:{fontWeight:650,marginBottom:"6px",fontSize:"12px"},children:"Deviation from the norm"}),x.jsx("div",{style:{fontSize:"11.5px",lineHeight:1.5,marginBottom:"8px",opacity:.9},children:"Highlights how common or uncommon this behavior is relative to similar calls."}),c&&x.jsxs("div",{style:{fontSize:"11px",lineHeight:1.7,fontFamily:"ui-monospace, monospace",marginBottom:"10px",padding:"6px 8px",background:"rgba(255, 255, 255, 0.12)",borderRadius:"6px",fontWeight:600},children:[x.jsx("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:x.jsxs("span",{children:[c.dots," ",c.text]})}),r&&x.jsx("div",{style:{fontSize:"10px",marginTop:"4px",opacity:.8},children:r==="up"?"Positive deviation":"Negative deviation"})]}),x.jsxs("div",{style:{fontSize:"10.5px",lineHeight:1.7,fontFamily:"ui-monospace, monospace",opacity:.75},children:[x.jsx("div",{style:{fontSize:"10px",marginBottom:"4px",opacity:.7,textTransform:"uppercase",letterSpacing:"0.05em"},children:"Full scale:"}),s.slice().reverse().map(l=>x.jsxs("div",{style:{opacity:l.level===e?.5:.7,fontSize:l.level===e?"10px":"10.5px"},children:[l.dots," ",l.text]},l.level))]})]});return x.jsxs(cn,{children:[x.jsx(an,{asChild:!0,children:x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",cursor:"help"},children:[o&&x.jsx("div",{style:{fontSize:"10px",color:n,fontWeight:650,letterSpacing:"0.02em",textTransform:"uppercase",opacity:.75},children:t}),x.jsx("div",{style:{display:"flex",gap:"3px",alignItems:"center"},children:Array.from({length:5}).map((l,u)=>{const d=u<e;return x.jsx("div",{style:{width:"6px",height:"6px",borderRadius:"50%",background:d?n:`${n}15`,border:d?"none":`1px solid ${n}40`,transition:"all 0.2s ease",opacity:d?.75:.5}},u)})})]})}),x.jsx(ln,{style:{maxWidth:300,padding:16},side:"bottom",sideOffset:8,children:a})]})}function un({variant:e="default",padding:t="md",railColor:n,interactive:o=!1,isActive:r=!1,onClick:i,style:s,className:c,children:a,borderRadius:l,...u}){const d=o||!!i,m={default:{background:"var(--paper)",border:"1px solid var(--border)",boxShadow:"0 1px 3px var(--shadow)"},elevated:{background:"var(--paper-elevated)",border:"1px solid var(--border)",boxShadow:"0 2px 6px var(--shadow)"},secondary:{background:"var(--paper-secondary)",border:"1px solid var(--border-subtle)",boxShadow:"none"},ghost:{background:"transparent",border:"none",boxShadow:"none"}},p={none:0,sm:8,md:14,lg:20},h=m[e]||m.default,g=p[t]??p.md,v={position:"relative",borderRadius:l||"var(--radius-md, 6px)",overflow:"auto",padding:n?`${g}px ${g}px ${g}px ${g+10}px`:g,transition:"background 0.15s, border-color 0.15s, box-shadow 0.15s",...h,...d&&{cursor:"pointer"},...r&&{background:"var(--hover-warm-subtle, rgba(200,170,120,0.06))",borderColor:"var(--border-hover)"},...s},y=["custom-thin-scrollbar-library",c].filter(Boolean).join(" "),b=w=>{!d||r||(w.currentTarget.style.background="var(--hover-warm-subtle, rgba(200,170,120,0.06))",w.currentTarget.style.borderColor="var(--border-hover)")},C=w=>{d&&(r?(w.currentTarget.style.background="var(--hover-warm-subtle, rgba(200,170,120,0.06))",w.currentTarget.style.borderColor="var(--border-hover)"):(w.currentTarget.style.background=h.background,w.currentTarget.style.borderColor=h.border.replace("1px solid ","")))};return x.jsxs("div",{style:v,className:y,onClick:i,onMouseEnter:b,onMouseLeave:C,...u,children:[n&&x.jsx("div",{style:{position:"absolute",left:0,top:0,bottom:0,width:4,background:n}}),a]})}function $r({title:e,children:t,borderRadius:n}){return x.jsxs(un,{variant:"elevated",padding:"sm",borderRadius:n,children:[x.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--text-strong)",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:8,marginTop:4},children:e}),t]})}function Ir({children:e,variant:t="default",size:n="md",...o}){const r={default:{color:"var(--text-muted)",backgroundColor:"var(--hover-warm)",borderColor:"var(--border)"},policy:{color:"var(--rail-compliance)",backgroundColor:"rgba(201,138,90,0.1)",borderColor:"rgba(201,138,90,0.25)"},tool:{color:"var(--rail-discovery)",backgroundColor:"rgba(94,136,176,0.1)",borderColor:"rgba(94,136,176,0.25)"},global:{color:"var(--rail-tone)",backgroundColor:"rgba(155,122,168,0.1)",borderColor:"rgba(155,122,168,0.25)"},phase:{color:"var(--rail-outcome)",backgroundColor:"rgba(107,124,147,0.1)",borderColor:"rgba(107,124,147,0.25)"}},i={sm:{fontSize:"var(--text-xs)",padding:"1px 6px"},md:{fontSize:"var(--text-sm)",padding:"2px 8px"}},s=r[t]||r.default,c=i[n]||i.md;return x.jsx("span",{style:{display:"inline-flex",alignItems:"center",borderRadius:"var(--radius-sm)",border:`1px solid ${s.borderColor}`,...s,...c,...o.style},...o,children:e})}function Wr({children:e,onClick:t,variant:n="secondary",disabled:o=!1,size:r="md",...i}){const s={primary:{backgroundColor:"var(--Base-Strong, #0B0B0B)",color:"white",border:"none",fontSize:"16px",fontWeight:600},secondary:{backgroundColor:"transparent",border:"1px solid var(--border)",color:"var(--text-base)",fontSize:"16px",fontWeight:600},ghost:{backgroundColor:"transparent",border:"none",color:"var(--text-muted)",fontSize:"16px",fontWeight:600},danger:{backgroundColor:"var(--rail-signal-churn)",color:"white",border:"none",fontSize:"16px",fontWeight:600}},c={sm:{fontSize:"var(--text-xs)",padding:"4px 10px"},md:{fontSize:"var(--text-sm)",padding:"6px 14px"}},a={borderRadius:"var(--radius)",transition:"var(--transition-fast)",cursor:o?"not-allowed":"pointer",opacity:o?.5:1,display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"var(--font-sans)",fontWeight:"var(--font-medium)",textDecoration:"none",userSelect:"none"},l=g=>{o||(n==="secondary"||n==="ghost"?g.currentTarget.style.backgroundColor="#ECEEF2":n==="danger"&&(g.currentTarget.style.opacity="0.85"))},u=g=>{o||(n==="secondary"||n==="ghost"?g.currentTarget.style.backgroundColor="transparent":n==="danger"&&(g.currentTarget.style.opacity="1"))},d=s[n]||s.secondary,m=c[r]||c.md,{style:p,...h}=i;return x.jsx("button",{onClick:o?void 0:t,onMouseEnter:l,onMouseLeave:u,style:{...a,...d,...m,...p},disabled:o,...h,children:e})}exports.Card=un;exports.DetailCard=$r;exports.DeviationIndicator=kr;exports.SmallButton=Wr;exports.Tag=Ir;exports.Tooltip=cn;exports.TooltipContent=ln;exports.TooltipProvider=sn;exports.TooltipTrigger=an;
|
|
2
2
|
//# sourceMappingURL=SmallButton.cjs.js.map
|