forge-openclaw-plugin 0.2.72 → 0.2.78

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.
@@ -1,4 +1,4 @@
1
- import{r as a,j as g,b as Ce,a as Qe,c as Je,d as et,_ as tt,u as nt,e as _,s as Se,f as rt,g as ot,h as at}from"./vendor-fiXu5f59.js";function O(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ue(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Re(...e){return t=>{let n=!1;const r=e.map(o=>{const i=ue(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():ue(e[o],null)}}}}function I(...e){return a.useCallback(Re(...e),e)}function it(e,t){const n=a.createContext(t),r=i=>{const{children:c,...s}=i,d=a.useMemo(()=>s,Object.values(s));return g.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function o(i){const c=a.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function st(e,t=[]){let n=[];function r(i,c){const s=a.createContext(c),d=n.length;n=[...n,c];const l=v=>{var E;const{scope:h,children:p,...R}=v,u=((E=h==null?void 0:h[e])==null?void 0:E[d])||s,m=a.useMemo(()=>R,Object.values(R));return g.jsx(u.Provider,{value:m,children:p})};l.displayName=i+"Provider";function f(v,h){var u;const p=((u=h==null?void 0:h[e])==null?void 0:u[d])||s,R=a.useContext(p);if(R)return R;if(c!==void 0)return c;throw new Error(`\`${v}\` must be used within \`${i}\``)}return[l,f]}const o=()=>{const i=n.map(c=>a.createContext(c));return function(s){const d=(s==null?void 0:s[e])||i;return a.useMemo(()=>({[`__scope${e}`]:{...s,[e]:d}}),[s,d])}};return o.scopeName=e,[r,ct(o,...t)]}function ct(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const c=r.reduce((s,{useScope:d,scopeName:l})=>{const v=d(i)[`__scope${l}`];return{...s,...v}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var j=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},ut=Ce[" useId ".trim().toString()]||(()=>{}),lt=0;function q(e){const[t,n]=a.useState(ut());return j(()=>{n(r=>r??String(lt++))},[e]),e||(t?`radix-${t}`:"")}var dt=Ce[" useInsertionEffect ".trim().toString()]||j;function ft({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=vt({defaultProp:t,onChange:n}),s=e!==void 0,d=s?e:o;{const f=a.useRef(e!==void 0);a.useEffect(()=>{const v=f.current;v!==s&&console.warn(`${r} is changing from ${v?"controlled":"uncontrolled"} to ${s?"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.`),f.current=s},[s,r])}const l=a.useCallback(f=>{var v;if(s){const h=mt(f)?f(e):f;h!==e&&((v=c.current)==null||v.call(c,h))}else i(f)},[s,e,i,c]);return[d,l]}function vt({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),i=a.useRef(t);return dt(()=>{i.current=t},[t]),a.useEffect(()=>{var c;o.current!==n&&((c=i.current)==null||c.call(i,n),o.current=n)},[n,o]),[n,r,i]}function mt(e){return typeof e=="function"}function we(e){const t=gt(e),n=a.forwardRef((r,o)=>{const{children:i,...c}=r,s=a.Children.toArray(i),d=s.find(pt);if(d){const l=d.props.children,f=s.map(v=>v===d?a.Children.count(l)>1?a.Children.only(null):a.isValidElement(l)?l.props.children:null:v);return g.jsx(t,{...c,ref:o,children:a.isValidElement(l)?a.cloneElement(l,void 0,f):null})}return g.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function gt(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n;if(a.isValidElement(o)){const c=yt(o),s=Et(i,o.props);return o.type!==a.Fragment&&(s.ref=r?Re(r,c):c),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ht=Symbol("radix.slottable");function pt(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ht}function Et(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const d=i(...s);return o(...s),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function yt(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],D=bt.reduce((e,t)=>{const n=we(`Primitive.${t}`),r=a.forwardRef((o,i)=>{const{asChild:c,...s}=o,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ct(e,t){e&&Qe.flushSync(()=>e.dispatchEvent(t))}function B(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function St(e,t=globalThis==null?void 0:globalThis.document){const n=B(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Rt="DismissableLayer",re="dismissableLayer.update",wt="dismissableLayer.pointerDownOutside",Pt="dismissableLayer.focusOutside",le,Pe=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ne=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:s,...d}=e,l=a.useContext(Pe),[f,v]=a.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=a.useState({}),R=I(t,y=>v(y)),u=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),E=u.indexOf(m),b=f?u.indexOf(f):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=E,w=xt(y=>{const T=y.target,L=[...l.branches].some(W=>W.contains(T));!S||L||(o==null||o(y),c==null||c(y),y.defaultPrevented||s==null||s())},h),P=Ot(y=>{const T=y.target;[...l.branches].some(W=>W.contains(T))||(i==null||i(y),c==null||c(y),y.defaultPrevented||s==null||s())},h);return St(y=>{b===l.layers.size-1&&(r==null||r(y),!y.defaultPrevented&&s&&(y.preventDefault(),s()))},h),a.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(le=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),de(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=le)}},[f,h,n,l]),a.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),de())},[f,l]),a.useEffect(()=>{const y=()=>p({});return document.addEventListener(re,y),()=>document.removeEventListener(re,y)},[]),g.jsx(D.div,{...d,ref:R,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,P.onFocusCapture),onBlurCapture:O(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,w.onPointerDownCapture)})});Ne.displayName=Rt;var Nt="DismissableLayerBranch",Dt=a.forwardRef((e,t)=>{const n=a.useContext(Pe),r=a.useRef(null),o=I(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(D.div,{...e,ref:o})});Dt.displayName=Nt;function xt(e,t=globalThis==null?void 0:globalThis.document){const n=B(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let d=function(){De(wt,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ot(e,t=globalThis==null?void 0:globalThis.document){const n=B(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&De(Pt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function de(){const e=new CustomEvent(re);document.dispatchEvent(e)}function De(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ct(o,i):o.dispatchEvent(i)}var Q="focusScope.autoFocusOnMount",J="focusScope.autoFocusOnUnmount",fe={bubbles:!1,cancelable:!0},Tt="FocusScope",xe=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}=e,[s,d]=a.useState(null),l=B(o),f=B(i),v=a.useRef(null),h=I(t,u=>d(u)),p=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let u=function(C){if(p.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:x(v.current,{select:!0})},m=function(C){if(p.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||x(v.current,{select:!0}))},E=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&x(s)};document.addEventListener("focusin",u),document.addEventListener("focusout",m);const b=new MutationObserver(E);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",m),b.disconnect()}}},[r,s,p.paused]),a.useEffect(()=>{if(s){me.add(p);const u=document.activeElement;if(!s.contains(u)){const E=new CustomEvent(Q,fe);s.addEventListener(Q,l),s.dispatchEvent(E),E.defaultPrevented||(At(_t(Oe(s)),{select:!0}),document.activeElement===u&&x(s))}return()=>{s.removeEventListener(Q,l),setTimeout(()=>{const E=new CustomEvent(J,fe);s.addEventListener(J,f),s.dispatchEvent(E),E.defaultPrevented||x(u??document.body,{select:!0}),s.removeEventListener(J,f),me.remove(p)},0)}}},[s,l,f,p]);const R=a.useCallback(u=>{if(!n&&!r||p.paused)return;const m=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,E=document.activeElement;if(m&&E){const b=u.currentTarget,[C,S]=It(b);C&&S?!u.shiftKey&&E===S?(u.preventDefault(),n&&x(C,{select:!0})):u.shiftKey&&E===C&&(u.preventDefault(),n&&x(S,{select:!0})):E===b&&u.preventDefault()}},[n,r,p.paused]);return g.jsx(D.div,{tabIndex:-1,...c,ref:h,onKeyDown:R})});xe.displayName=Tt;function At(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(x(r,{select:t}),document.activeElement!==n)return}function It(e){const t=Oe(e),n=ve(t,e),r=ve(t.reverse(),e);return[n,r]}function Oe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ve(e,t){for(const n of e)if(!Lt(n,{upTo:t}))return n}function Lt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mt(e){return e instanceof HTMLInputElement&&"select"in e}function x(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mt(e)&&t&&e.select()}}var me=Ft();function Ft(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ge(e,t),e.unshift(t)},remove(t){var n;e=ge(e,t),(n=e[0])==null||n.resume()}}}function ge(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _t(e){return e.filter(t=>t.tagName!=="A")}var kt="Portal",Te=a.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=a.useState(!1);j(()=>i(!0),[]);const c=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return c?Je.createPortal(g.jsx(D.div,{...r,ref:t}),c):null});Te.displayName=kt;function Wt(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var H=e=>{const{present:t,children:n}=e,r=jt(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),i=I(r.ref,Bt(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:i}):null};H.displayName="Presence";function jt(e){const[t,n]=a.useState(),r=a.useRef(null),o=a.useRef(e),i=a.useRef("none"),c=e?"mounted":"unmounted",[s,d]=Wt(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const l=$(r.current);i.current=s==="mounted"?l:"none"},[s]),j(()=>{const l=r.current,f=o.current;if(f!==e){const h=i.current,p=$(l);e?d("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?d("UNMOUNT"):d(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),j(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,v=p=>{const u=$(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&u&&(d("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=p=>{p.target===t&&(i.current=$(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:a.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function $(e){return(e==null?void 0:e.animationName)||"none"}function Bt(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ee=0;function Ut(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??he()),document.body.insertAdjacentElement("beforeend",e[1]??he()),ee++,()=>{ee===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ee--}},[])}function he(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var G="right-scroll-bar-position",Y="width-before-scroll-bar",$t="with-scroll-bars-hidden",Vt="--removed-body-scroll-bar-size",Ae=et(),te=function(){},z=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:te,onWheelCapture:te,onTouchMoveCapture:te}),o=r[0],i=r[1],c=e.forwardProps,s=e.children,d=e.className,l=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,p=e.noRelative,R=e.noIsolation,u=e.inert,m=e.allowPinchZoom,E=e.as,b=E===void 0?"div":E,C=e.gapMode,S=tt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,P=nt([n,t]),y=_(_({},S),o);return a.createElement(a.Fragment,null,f&&a.createElement(w,{sideCar:Ae,removeScrollBar:l,shards:v,noRelative:p,noIsolation:R,inert:u,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:C}),c?a.cloneElement(a.Children.only(s),_(_({},y),{ref:P})):a.createElement(b,_({},y,{className:d,ref:P}),s))});z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};z.classNames={fullWidth:Y,zeroRight:G};var Kt={left:0,top:0,right:0,gap:0},ne=function(e){return parseInt(e||"",10)||0},Gt=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ne(n),ne(r),ne(o)]},Yt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kt;var t=Gt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Xt=Se(),k="data-scroll-locked",Ht=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
1
+ import{r as a,j as g,b as Ce,a as Qe,c as Je,d as et,_ as tt,u as nt,e as _,s as Se,f as rt,g as ot,h as at}from"./vendor-BVU0cZC9.js";function O(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ue(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Re(...e){return t=>{let n=!1;const r=e.map(o=>{const i=ue(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():ue(e[o],null)}}}}function I(...e){return a.useCallback(Re(...e),e)}function it(e,t){const n=a.createContext(t),r=i=>{const{children:c,...s}=i,d=a.useMemo(()=>s,Object.values(s));return g.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function o(i){const c=a.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function st(e,t=[]){let n=[];function r(i,c){const s=a.createContext(c),d=n.length;n=[...n,c];const l=v=>{var E;const{scope:h,children:p,...R}=v,u=((E=h==null?void 0:h[e])==null?void 0:E[d])||s,m=a.useMemo(()=>R,Object.values(R));return g.jsx(u.Provider,{value:m,children:p})};l.displayName=i+"Provider";function f(v,h){var u;const p=((u=h==null?void 0:h[e])==null?void 0:u[d])||s,R=a.useContext(p);if(R)return R;if(c!==void 0)return c;throw new Error(`\`${v}\` must be used within \`${i}\``)}return[l,f]}const o=()=>{const i=n.map(c=>a.createContext(c));return function(s){const d=(s==null?void 0:s[e])||i;return a.useMemo(()=>({[`__scope${e}`]:{...s,[e]:d}}),[s,d])}};return o.scopeName=e,[r,ct(o,...t)]}function ct(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const c=r.reduce((s,{useScope:d,scopeName:l})=>{const v=d(i)[`__scope${l}`];return{...s,...v}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var j=globalThis!=null&&globalThis.document?a.useLayoutEffect:()=>{},ut=Ce[" useId ".trim().toString()]||(()=>{}),lt=0;function q(e){const[t,n]=a.useState(ut());return j(()=>{n(r=>r??String(lt++))},[e]),e||(t?`radix-${t}`:"")}var dt=Ce[" useInsertionEffect ".trim().toString()]||j;function ft({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,c]=vt({defaultProp:t,onChange:n}),s=e!==void 0,d=s?e:o;{const f=a.useRef(e!==void 0);a.useEffect(()=>{const v=f.current;v!==s&&console.warn(`${r} is changing from ${v?"controlled":"uncontrolled"} to ${s?"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.`),f.current=s},[s,r])}const l=a.useCallback(f=>{var v;if(s){const h=mt(f)?f(e):f;h!==e&&((v=c.current)==null||v.call(c,h))}else i(f)},[s,e,i,c]);return[d,l]}function vt({defaultProp:e,onChange:t}){const[n,r]=a.useState(e),o=a.useRef(n),i=a.useRef(t);return dt(()=>{i.current=t},[t]),a.useEffect(()=>{var c;o.current!==n&&((c=i.current)==null||c.call(i,n),o.current=n)},[n,o]),[n,r,i]}function mt(e){return typeof e=="function"}function we(e){const t=gt(e),n=a.forwardRef((r,o)=>{const{children:i,...c}=r,s=a.Children.toArray(i),d=s.find(pt);if(d){const l=d.props.children,f=s.map(v=>v===d?a.Children.count(l)>1?a.Children.only(null):a.isValidElement(l)?l.props.children:null:v);return g.jsx(t,{...c,ref:o,children:a.isValidElement(l)?a.cloneElement(l,void 0,f):null})}return g.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function gt(e){const t=a.forwardRef((n,r)=>{const{children:o,...i}=n;if(a.isValidElement(o)){const c=yt(o),s=Et(i,o.props);return o.type!==a.Fragment&&(s.ref=r?Re(r,c):c),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ht=Symbol("radix.slottable");function pt(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ht}function Et(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const d=i(...s);return o(...s),d}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function yt(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],D=bt.reduce((e,t)=>{const n=we(`Primitive.${t}`),r=a.forwardRef((o,i)=>{const{asChild:c,...s}=o,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...s,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ct(e,t){e&&Qe.flushSync(()=>e.dispatchEvent(t))}function B(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e}),a.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function St(e,t=globalThis==null?void 0:globalThis.document){const n=B(e);a.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Rt="DismissableLayer",re="dismissableLayer.update",wt="dismissableLayer.pointerDownOutside",Pt="dismissableLayer.focusOutside",le,Pe=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ne=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:c,onDismiss:s,...d}=e,l=a.useContext(Pe),[f,v]=a.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=a.useState({}),R=I(t,y=>v(y)),u=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),E=u.indexOf(m),b=f?u.indexOf(f):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,S=b>=E,w=xt(y=>{const T=y.target,L=[...l.branches].some(W=>W.contains(T));!S||L||(o==null||o(y),c==null||c(y),y.defaultPrevented||s==null||s())},h),P=Ot(y=>{const T=y.target;[...l.branches].some(W=>W.contains(T))||(i==null||i(y),c==null||c(y),y.defaultPrevented||s==null||s())},h);return St(y=>{b===l.layers.size-1&&(r==null||r(y),!y.defaultPrevented&&s&&(y.preventDefault(),s()))},h),a.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(le=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),de(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=le)}},[f,h,n,l]),a.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),de())},[f,l]),a.useEffect(()=>{const y=()=>p({});return document.addEventListener(re,y),()=>document.removeEventListener(re,y)},[]),g.jsx(D.div,{...d,ref:R,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,P.onFocusCapture),onBlurCapture:O(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,w.onPointerDownCapture)})});Ne.displayName=Rt;var Nt="DismissableLayerBranch",Dt=a.forwardRef((e,t)=>{const n=a.useContext(Pe),r=a.useRef(null),o=I(t,r);return a.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(D.div,{...e,ref:o})});Dt.displayName=Nt;function xt(e,t=globalThis==null?void 0:globalThis.document){const n=B(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let d=function(){De(wt,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ot(e,t=globalThis==null?void 0:globalThis.document){const n=B(e),r=a.useRef(!1);return a.useEffect(()=>{const o=i=>{i.target&&!r.current&&De(Pt,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function de(){const e=new CustomEvent(re);document.dispatchEvent(e)}function De(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ct(o,i):o.dispatchEvent(i)}var Q="focusScope.autoFocusOnMount",J="focusScope.autoFocusOnUnmount",fe={bubbles:!1,cancelable:!0},Tt="FocusScope",xe=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...c}=e,[s,d]=a.useState(null),l=B(o),f=B(i),v=a.useRef(null),h=I(t,u=>d(u)),p=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let u=function(C){if(p.paused||!s)return;const S=C.target;s.contains(S)?v.current=S:x(v.current,{select:!0})},m=function(C){if(p.paused||!s)return;const S=C.relatedTarget;S!==null&&(s.contains(S)||x(v.current,{select:!0}))},E=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&x(s)};document.addEventListener("focusin",u),document.addEventListener("focusout",m);const b=new MutationObserver(E);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",m),b.disconnect()}}},[r,s,p.paused]),a.useEffect(()=>{if(s){me.add(p);const u=document.activeElement;if(!s.contains(u)){const E=new CustomEvent(Q,fe);s.addEventListener(Q,l),s.dispatchEvent(E),E.defaultPrevented||(At(_t(Oe(s)),{select:!0}),document.activeElement===u&&x(s))}return()=>{s.removeEventListener(Q,l),setTimeout(()=>{const E=new CustomEvent(J,fe);s.addEventListener(J,f),s.dispatchEvent(E),E.defaultPrevented||x(u??document.body,{select:!0}),s.removeEventListener(J,f),me.remove(p)},0)}}},[s,l,f,p]);const R=a.useCallback(u=>{if(!n&&!r||p.paused)return;const m=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,E=document.activeElement;if(m&&E){const b=u.currentTarget,[C,S]=It(b);C&&S?!u.shiftKey&&E===S?(u.preventDefault(),n&&x(C,{select:!0})):u.shiftKey&&E===C&&(u.preventDefault(),n&&x(S,{select:!0})):E===b&&u.preventDefault()}},[n,r,p.paused]);return g.jsx(D.div,{tabIndex:-1,...c,ref:h,onKeyDown:R})});xe.displayName=Tt;function At(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(x(r,{select:t}),document.activeElement!==n)return}function It(e){const t=Oe(e),n=ve(t,e),r=ve(t.reverse(),e);return[n,r]}function Oe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ve(e,t){for(const n of e)if(!Lt(n,{upTo:t}))return n}function Lt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mt(e){return e instanceof HTMLInputElement&&"select"in e}function x(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mt(e)&&t&&e.select()}}var me=Ft();function Ft(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ge(e,t),e.unshift(t)},remove(t){var n;e=ge(e,t),(n=e[0])==null||n.resume()}}}function ge(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _t(e){return e.filter(t=>t.tagName!=="A")}var kt="Portal",Te=a.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,i]=a.useState(!1);j(()=>i(!0),[]);const c=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return c?Je.createPortal(g.jsx(D.div,{...r,ref:t}),c):null});Te.displayName=kt;function Wt(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var H=e=>{const{present:t,children:n}=e,r=jt(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),i=I(r.ref,Bt(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:i}):null};H.displayName="Presence";function jt(e){const[t,n]=a.useState(),r=a.useRef(null),o=a.useRef(e),i=a.useRef("none"),c=e?"mounted":"unmounted",[s,d]=Wt(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const l=$(r.current);i.current=s==="mounted"?l:"none"},[s]),j(()=>{const l=r.current,f=o.current;if(f!==e){const h=i.current,p=$(l);e?d("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?d("UNMOUNT"):d(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),j(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,v=p=>{const u=$(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&u&&(d("ANIMATION_END"),!o.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},h=p=>{p.target===t&&(i.current=$(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:a.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function $(e){return(e==null?void 0:e.animationName)||"none"}function Bt(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ee=0;function Ut(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??he()),document.body.insertAdjacentElement("beforeend",e[1]??he()),ee++,()=>{ee===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ee--}},[])}function he(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var G="right-scroll-bar-position",Y="width-before-scroll-bar",$t="with-scroll-bars-hidden",Vt="--removed-body-scroll-bar-size",Ae=et(),te=function(){},z=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:te,onWheelCapture:te,onTouchMoveCapture:te}),o=r[0],i=r[1],c=e.forwardProps,s=e.children,d=e.className,l=e.removeScrollBar,f=e.enabled,v=e.shards,h=e.sideCar,p=e.noRelative,R=e.noIsolation,u=e.inert,m=e.allowPinchZoom,E=e.as,b=E===void 0?"div":E,C=e.gapMode,S=tt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=h,P=nt([n,t]),y=_(_({},S),o);return a.createElement(a.Fragment,null,f&&a.createElement(w,{sideCar:Ae,removeScrollBar:l,shards:v,noRelative:p,noIsolation:R,inert:u,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:C}),c?a.cloneElement(a.Children.only(s),_(_({},y),{ref:P})):a.createElement(b,_({},y,{className:d,ref:P}),s))});z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};z.classNames={fullWidth:Y,zeroRight:G};var Kt={left:0,top:0,right:0,gap:0},ne=function(e){return parseInt(e||"",10)||0},Gt=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ne(n),ne(r),ne(o)]},Yt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Kt;var t=Gt(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Xt=Se(),k="data-scroll-locked",Ht=function(e,t,n,r){var o=e.left,i=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
2
2
  .`.concat($t,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(s,"px ").concat(r,`;