@noxickon/onyx 4.0.3 → 4.0.5

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.
@@ -6,4 +6,4 @@ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var q=J(Y,U,H,G,K+"."+U,
6
6
  `},$m={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function Lm(t){let{announcements:e=$m,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=_m}=t;const{announce:o,announcement:i}=Mm(),l=Rn("DndLiveRegion"),[a,c]=k.useState(!1);if(k.useEffect(()=>{c(!0)},[]),Im(k.useMemo(()=>({onDragStart(u){let{active:f}=u;o(e.onDragStart({active:f}))},onDragMove(u){let{active:f,over:m}=u;e.onDragMove&&o(e.onDragMove({active:f,over:m}))},onDragOver(u){let{active:f,over:m}=u;o(e.onDragOver({active:f,over:m}))},onDragEnd(u){let{active:f,over:m}=u;o(e.onDragEnd({active:f,over:m}))},onDragCancel(u){let{active:f,over:m}=u;o(e.onDragCancel({active:f,over:m}))}}),[o,e])),!a)return null;const d=k.createElement(k.Fragment,null,k.createElement(Pm,{id:r,value:s.draggable}),k.createElement(Tm,{id:l,announcement:i}));return n?it.createPortal(d,n):d}var Ie;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Ie||(Ie={}));function er(){}function Kt(t,e){return k.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function Os(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return k.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const ct=Object.freeze({x:0,y:0});function nl(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function zm(t,e){const n=Zn(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function rl(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function Fm(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function Eo(t){let{left:e,top:n,height:r,width:s}=t;return[{x:e,y:n},{x:e+s,y:n},{x:e,y:n+r},{x:e+s,y:n+r}]}function sl(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function So(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const ol=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=So(e,e.left,e.top),o=[];for(const i of r){const{id:l}=i,a=n.get(l);if(a){const c=nl(So(a),s);o.push({id:l,data:{droppableContainer:i,value:c}})}}return o.sort(rl)},il=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=Eo(e),o=[];for(const i of r){const{id:l}=i,a=n.get(l);if(a){const c=Eo(a),d=s.reduce((f,m,h)=>f+nl(c[h],m),0),u=Number((d/4).toFixed(4));o.push({id:l,data:{droppableContainer:i,value:u}})}}return o.sort(rl)};function Vm(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height),i=s-r,l=o-n;if(r<s&&n<o){const a=e.width*e.height,c=t.width*t.height,d=i*l,u=d/(a+c-d);return Number(u.toFixed(4))}return 0}const Bm=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=[];for(const o of r){const{id:i}=o,l=n.get(i);if(l){const a=Vm(l,e);a>0&&s.push({id:i,data:{droppableContainer:o,value:a}})}}return s.sort(Fm)};function Wm(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function ll(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:ct}function Hm(t){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return s.reduce((i,l)=>({...i,top:i.top+t*l.y,bottom:i.bottom+t*l.y,left:i.left+t*l.x,right:i.right+t*l.x}),{...n})}}const Ym=Hm(1);function al(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function qm(t,e,n){const r=al(e);if(!r)return t;const{scaleX:s,scaleY:o,x:i,y:l}=r,a=t.left-i-(1-s)*parseFloat(n),c=t.top-l-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=s?t.width/s:t.width,u=o?t.height/o:t.height;return{width:d,height:u,top:c,right:a+d,bottom:c+u,left:a}}const Gm={ignoreTransform:!1};function sn(t,e){e===void 0&&(e=Gm);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:d}=Ve(t).getComputedStyle(t);c&&(n=qm(n,c,d))}const{top:r,left:s,width:o,height:i,bottom:l,right:a}=n;return{top:r,left:s,width:o,height:i,bottom:l,right:a}}function ko(t){return sn(t,{ignoreTransform:!0})}function Um(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function Km(t,e){return e===void 0&&(e=Ve(t).getComputedStyle(t)),e.position==="fixed"}function Xm(t,e){e===void 0&&(e=Ve(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const o=e[s];return typeof o=="string"?n.test(o):!1})}function hr(t,e){const n=[];function r(s){if(e!=null&&n.length>=e||!s)return n;if(Cs(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!Sn(s)||Zi(s)||n.includes(s))return n;const o=Ve(t).getComputedStyle(s);return s!==t&&Xm(s,o)&&n.push(s),Km(s,o)?n:r(s.parentNode)}return t?r(t):n}function cl(t){const[e]=hr(t,1);return e??null}function Wr(t){return!fr||!t?null:nn(t)?t:ws(t)?Cs(t)||t===rn(t).scrollingElement?window:Sn(t)?t:null:null}function dl(t){return nn(t)?t.scrollX:t.scrollLeft}function ul(t){return nn(t)?t.scrollY:t.scrollTop}function ts(t){return{x:dl(t),y:ul(t)}}var _e;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(_e||(_e={}));function fl(t){return!fr||!t?!1:t===document.scrollingElement}function ml(t){const e={x:0,y:0},n=fl(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},s=t.scrollTop<=e.y,o=t.scrollLeft<=e.x,i=t.scrollTop>=r.y,l=t.scrollLeft>=r.x;return{isTop:s,isLeft:o,isBottom:i,isRight:l,maxScroll:r,minScroll:e}}const Qm={x:.2,y:.2};function Jm(t,e,n,r,s){let{top:o,left:i,right:l,bottom:a}=n;r===void 0&&(r=10),s===void 0&&(s=Qm);const{isTop:c,isBottom:d,isLeft:u,isRight:f}=ml(t),m={x:0,y:0},h={x:0,y:0},p={height:e.height*s.y,width:e.width*s.x};return!c&&o<=e.top+p.height?(m.y=_e.Backward,h.y=r*Math.abs((e.top+p.height-o)/p.height)):!d&&a>=e.bottom-p.height&&(m.y=_e.Forward,h.y=r*Math.abs((e.bottom-p.height-a)/p.height)),!f&&l>=e.right-p.width?(m.x=_e.Forward,h.x=r*Math.abs((e.right-p.width-l)/p.width)):!u&&i<=e.left+p.width&&(m.x=_e.Backward,h.x=r*Math.abs((e.left+p.width-i)/p.width)),{direction:m,speed:h}}function Zm(t){if(t===document.scrollingElement){const{innerWidth:o,innerHeight:i}=window;return{top:0,left:0,right:o,bottom:i,width:o,height:i}}const{top:e,left:n,right:r,bottom:s}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:s,width:t.clientWidth,height:t.clientHeight}}function pl(t){return t.reduce((e,n)=>qt(e,ts(n)),ct)}function e1(t){return t.reduce((e,n)=>e+dl(n),0)}function t1(t){return t.reduce((e,n)=>e+ul(n),0)}function hl(t,e){if(e===void 0&&(e=sn),!t)return;const{top:n,left:r,bottom:s,right:o}=e(t);cl(t)&&(s<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const n1=[["x",["left","right"],e1],["y",["top","bottom"],t1]];class Es{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=hr(n),s=pl(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[o,i,l]of n1)for(const a of i)Object.defineProperty(this,a,{get:()=>{const c=l(r),d=s[o]-c;return this.rect[a]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class gn{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var s;(s=this.target)==null||s.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function r1(t){const{EventTarget:e}=Ve(t);return t instanceof e?t:rn(t)}function Hr(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var nt;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(nt||(nt={}));function Ro(t){t.preventDefault()}function s1(t){t.stopPropagation()}var he;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(he||(he={}));const gl={start:[he.Space,he.Enter],cancel:[he.Esc],end:[he.Space,he.Enter,he.Tab]},o1=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case he.Right:return{...n,x:n.x+25};case he.Left:return{...n,x:n.x-25};case he.Down:return{...n,y:n.y+25};case he.Up:return{...n,y:n.y-25}}};class Nn{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new gn(rn(n)),this.windowListeners=new gn(Ve(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(nt.Resize,this.handleCancel),this.windowListeners.add(nt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(nt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&hl(r),n(ct)}handleKeyDown(e){if(pr(e)){const{active:n,context:r,options:s}=this.props,{keyboardCodes:o=gl,coordinateGetter:i=o1,scrollBehavior:l="smooth"}=s,{code:a}=e;if(o.end.includes(a)){this.handleEnd(e);return}if(o.cancel.includes(a)){this.handleCancel(e);return}const{collisionRect:c}=r.current,d=c?{x:c.left,y:c.top}:ct;this.referenceCoordinates||(this.referenceCoordinates=d);const u=i(e,{active:n,context:r.current,currentCoordinates:d});if(u){const f=yn(u,d),m={x:0,y:0},{scrollableAncestors:h}=r.current;for(const p of h){const g=e.code,{isTop:x,isRight:v,isLeft:y,isBottom:w,maxScroll:C,minScroll:O}=ml(p),S=Zm(p),E={x:Math.min(g===he.Right?S.right-S.width/2:S.right,Math.max(g===he.Right?S.left:S.left+S.width/2,u.x)),y:Math.min(g===he.Down?S.bottom-S.height/2:S.bottom,Math.max(g===he.Down?S.top:S.top+S.height/2,u.y))},R=g===he.Right&&!v||g===he.Left&&!y,N=g===he.Down&&!w||g===he.Up&&!x;if(R&&E.x!==u.x){const j=p.scrollLeft+f.x,D=g===he.Right&&j<=C.x||g===he.Left&&j>=O.x;if(D&&!f.y){p.scrollTo({left:j,behavior:l});return}D?m.x=p.scrollLeft-j:m.x=g===he.Right?p.scrollLeft-C.x:p.scrollLeft-O.x,m.x&&p.scrollBy({left:-m.x,behavior:l});break}else if(N&&E.y!==u.y){const j=p.scrollTop+f.y,D=g===he.Down&&j<=C.y||g===he.Up&&j>=O.y;if(D&&!f.x){p.scrollTo({top:j,behavior:l});return}D?m.y=p.scrollTop-j:m.y=g===he.Down?p.scrollTop-C.y:p.scrollTop-O.y,m.y&&p.scrollBy({top:-m.y,behavior:l});break}}this.handleMove(e,qt(yn(u,this.referenceCoordinates),m))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Nn.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=gl,onActivation:s}=e,{active:o}=n;const{code:i}=t.nativeEvent;if(r.start.includes(i)){const l=o.activatorNode.current;return l&&t.target!==l?!1:(t.preventDefault(),s?.({event:t.nativeEvent}),!0)}return!1}}];function No(t){return!!(t&&"distance"in t)}function jo(t){return!!(t&&"delay"in t)}class Ss{constructor(e,n,r){var s;r===void 0&&(r=r1(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:o}=e,{target:i}=o;this.props=e,this.events=n,this.document=rn(i),this.documentListeners=new gn(this.document),this.listeners=new gn(r),this.windowListeners=new gn(Ve(i)),this.initialCoordinates=(s=Zn(o))!=null?s:ct,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(nt.Resize,this.handleCancel),this.windowListeners.add(nt.DragStart,Ro),this.windowListeners.add(nt.VisibilityChange,this.handleCancel),this.windowListeners.add(nt.ContextMenu,Ro),this.documentListeners.add(nt.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(jo(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(No(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:s}=this.props;s(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(nt.Click,s1,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(nt.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:s,props:o}=this,{onMove:i,options:{activationConstraint:l}}=o;if(!s)return;const a=(n=Zn(e))!=null?n:ct,c=yn(s,a);if(!r&&l){if(No(l)){if(l.tolerance!=null&&Hr(c,l.tolerance))return this.handleCancel();if(Hr(c,l.distance))return this.handleStart()}if(jo(l)&&Hr(c,l.tolerance))return this.handleCancel();this.handlePending(l,c);return}e.cancelable&&e.preventDefault(),i(a)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===he.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const i1={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class jn extends Ss{constructor(e){const{event:n}=e,r=rn(n.target);super(e,i1,r)}}jn.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const l1={move:{name:"mousemove"},end:{name:"mouseup"}};var ns;(function(t){t[t.RightClick=2]="RightClick"})(ns||(ns={}));class a1 extends Ss{constructor(e){super(e,l1,rn(e.event.target))}}a1.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===ns.RightClick?!1:(r?.({event:n}),!0)}}];const Yr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class c1 extends Ss{constructor(e){super(e,Yr)}static setup(){return window.addEventListener(Yr.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(Yr.move.name,e)};function e(){}}}c1.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:s}=n;return s.length>1?!1:(r?.({event:n}),!0)}}];var xn;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(xn||(xn={}));var tr;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(tr||(tr={}));function d1(t){let{acceleration:e,activator:n=xn.Pointer,canScroll:r,draggingRect:s,enabled:o,interval:i=5,order:l=tr.TreeOrder,pointerCoordinates:a,scrollableAncestors:c,scrollableAncestorRects:d,delta:u,threshold:f}=t;const m=f1({delta:u,disabled:!o}),[h,p]=km(),g=k.useRef({x:0,y:0}),x=k.useRef({x:0,y:0}),v=k.useMemo(()=>{switch(n){case xn.Pointer:return a?{top:a.y,bottom:a.y,left:a.x,right:a.x}:null;case xn.DraggableRect:return s}},[n,s,a]),y=k.useRef(null),w=k.useCallback(()=>{const O=y.current;if(!O)return;const S=g.current.x*x.current.x,E=g.current.y*x.current.y;O.scrollBy(S,E)},[]),C=k.useMemo(()=>l===tr.TreeOrder?[...c].reverse():c,[l,c]);k.useEffect(()=>{if(!o||!c.length||!v){p();return}for(const O of C){if(r?.(O)===!1)continue;const S=c.indexOf(O),E=d[S];if(!E)continue;const{direction:R,speed:N}=Jm(O,E,v,e,f);for(const j of["x","y"])m[j][R[j]]||(N[j]=0,R[j]=0);if(N.x>0||N.y>0){p(),y.current=O,h(w,i),g.current=N,x.current=R;return}}g.current={x:0,y:0},x.current={x:0,y:0},p()},[e,w,r,p,o,i,JSON.stringify(v),JSON.stringify(m),h,c,C,d,JSON.stringify(f)])}const u1={x:{[_e.Backward]:!1,[_e.Forward]:!1},y:{[_e.Backward]:!1,[_e.Forward]:!1}};function f1(t){let{delta:e,disabled:n}=t;const r=Jn(e);return kn(s=>{if(n||!r||!s)return u1;const o={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[_e.Backward]:s.x[_e.Backward]||o.x===-1,[_e.Forward]:s.x[_e.Forward]||o.x===1},y:{[_e.Backward]:s.y[_e.Backward]||o.y===-1,[_e.Forward]:s.y[_e.Forward]||o.y===1}}},[n,e,r])}function m1(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return kn(s=>{var o;return e==null?null:(o=r??s)!=null?o:null},[r,e])}function p1(t,e){return k.useMemo(()=>t.reduce((n,r)=>{const{sensor:s}=r,o=s.activators.map(i=>({eventName:i.eventName,handler:e(i.handler,r)}));return[...n,...o]},[]),[t,e])}var wn;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(wn||(wn={}));var rs;(function(t){t.Optimized="optimized"})(rs||(rs={}));const Do=new Map;function h1(t,e){let{dragging:n,dependencies:r,config:s}=e;const[o,i]=k.useState(null),{frequency:l,measure:a,strategy:c}=s,d=k.useRef(t),u=g(),f=vn(u),m=k.useCallback(function(x){x===void 0&&(x=[]),!f.current&&i(v=>v===null?x:v.concat(x.filter(y=>!v.includes(y))))},[f]),h=k.useRef(null),p=kn(x=>{if(u&&!n)return Do;if(!x||x===Do||d.current!==t||o!=null){const v=new Map;for(let y of t){if(!y)continue;if(o&&o.length>0&&!o.includes(y.id)&&y.rect.current){v.set(y.id,y.rect.current);continue}const w=y.node.current,C=w?new Es(a(w),w):null;y.rect.current=C,C&&v.set(y.id,C)}return v}return x},[t,o,n,u,a]);return k.useEffect(()=>{d.current=t},[t]),k.useEffect(()=>{u||m()},[n,u]),k.useEffect(()=>{o&&o.length>0&&i(null)},[JSON.stringify(o)]),k.useEffect(()=>{u||typeof l!="number"||h.current!==null||(h.current=setTimeout(()=>{m(),h.current=null},l))},[l,u,m,...r]),{droppableRects:p,measureDroppableContainers:m,measuringScheduled:o!=null};function g(){switch(c){case wn.Always:return!1;case wn.BeforeDragging:return n;default:return!n}}}function ks(t,e){return kn(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function g1(t,e){return ks(t,e)}function x1(t){let{callback:e,disabled:n}=t;const r=mr(e),s=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return k.useEffect(()=>()=>s?.disconnect(),[s]),s}function gr(t){let{callback:e,disabled:n}=t;const r=mr(e),s=k.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return k.useEffect(()=>()=>s?.disconnect(),[s]),s}function b1(t){return new Es(sn(t),t)}function Po(t,e,n){e===void 0&&(e=b1);const[r,s]=k.useState(null);function o(){s(a=>{if(!t)return null;if(t.isConnected===!1){var c;return(c=a??n)!=null?c:null}const d=e(t);return JSON.stringify(a)===JSON.stringify(d)?a:d})}const i=x1({callback(a){if(t)for(const c of a){const{type:d,target:u}=c;if(d==="childList"&&u instanceof HTMLElement&&u.contains(t)){o();break}}}}),l=gr({callback:o});return lt(()=>{o(),t?(l?.observe(t),i?.observe(document.body,{childList:!0,subtree:!0})):(l?.disconnect(),i?.disconnect())},[t]),r}function v1(t){const e=ks(t);return ll(t,e)}const To=[];function y1(t){const e=k.useRef(t),n=kn(r=>t?r&&r!==To&&t&&e.current&&t.parentNode===e.current.parentNode?r:hr(t):To,[t]);return k.useEffect(()=>{e.current=t},[t]),n}function w1(t){const[e,n]=k.useState(null),r=k.useRef(t),s=k.useCallback(o=>{const i=Wr(o.target);i&&n(l=>l?(l.set(i,ts(i)),new Map(l)):null)},[]);return k.useEffect(()=>{const o=r.current;if(t!==o){i(o);const l=t.map(a=>{const c=Wr(a);return c?(c.addEventListener("scroll",s,{passive:!0}),[c,ts(c)]):null}).filter(a=>a!=null);n(l.length?new Map(l):null),r.current=t}return()=>{i(t),i(o)};function i(l){l.forEach(a=>{const c=Wr(a);c?.removeEventListener("scroll",s)})}},[s,t]),k.useMemo(()=>t.length?e?Array.from(e.values()).reduce((o,i)=>qt(o,i),ct):pl(t):ct,[t,e])}function Mo(t,e){e===void 0&&(e=[]);const n=k.useRef(null);return k.useEffect(()=>{n.current=null},e),k.useEffect(()=>{const r=t!==ct;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?yn(t,n.current):ct}function C1(t){k.useEffect(()=>{if(!fr)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n?.()}},t.map(e=>{let{sensor:n}=e;return n}))}function O1(t,e){return k.useMemo(()=>t.reduce((n,r)=>{let{eventName:s,handler:o}=r;return n[s]=i=>{o(i,e)},n},{}),[t,e])}function xl(t){return k.useMemo(()=>t?Um(t):null,[t])}const Io=[];function E1(t,e){e===void 0&&(e=sn);const[n]=t,r=xl(n?Ve(n):null),[s,o]=k.useState(Io);function i(){o(()=>t.length?t.map(a=>fl(a)?r:new Es(e(a),a)):Io)}const l=gr({callback:i});return lt(()=>{l?.disconnect(),i(),t.forEach(a=>l?.observe(a))},[t]),s}function bl(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return Sn(e)?e:t}function S1(t){let{measure:e}=t;const[n,r]=k.useState(null),s=k.useCallback(c=>{for(const{target:d}of c)if(Sn(d)){r(u=>{const f=e(d);return u?{...u,width:f.width,height:f.height}:f});break}},[e]),o=gr({callback:s}),i=k.useCallback(c=>{const d=bl(c);o?.disconnect(),d&&o?.observe(d),r(d?e(d):null)},[e,o]),[l,a]=Qn(i);return k.useMemo(()=>({nodeRef:l,rect:n,setRef:a}),[n,l,a])}const k1=[{sensor:jn,options:{}},{sensor:Nn,options:{}}],R1={current:{}},Hn={draggable:{measure:ko},droppable:{measure:ko,strategy:wn.WhileDragging,frequency:rs.Optimized},dragOverlay:{measure:sn}};class bn extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const N1={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new bn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:er},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Hn,measureDroppableContainers:er,windowRect:null,measuringScheduled:!1},vl={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:er,draggableNodes:new Map,over:null,measureDroppableContainers:er},Dn=k.createContext(vl),yl=k.createContext(N1);function j1(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new bn}}}function D1(t,e){switch(e.type){case Ie.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case Ie.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case Ie.DragEnd:case Ie.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ie.RegisterDroppable:{const{element:n}=e,{id:r}=n,s=new bn(t.droppable.containers);return s.set(r,n),{...t,droppable:{...t.droppable,containers:s}}}case Ie.SetDroppableDisabled:{const{id:n,key:r,disabled:s}=e,o=t.droppable.containers.get(n);if(!o||r!==o.key)return t;const i=new bn(t.droppable.containers);return i.set(n,{...o,disabled:s}),{...t,droppable:{...t.droppable,containers:i}}}case Ie.UnregisterDroppable:{const{id:n,key:r}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const o=new bn(t.droppable.containers);return o.delete(n),{...t,droppable:{...t.droppable,containers:o}}}default:return t}}function P1(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:s}=k.useContext(Dn),o=Jn(r),i=Jn(n?.id);return k.useEffect(()=>{if(!e&&!r&&o&&i!=null){if(!pr(o)||document.activeElement===o.target)return;const l=s.get(i);if(!l)return;const{activatorNode:a,node:c}=l;if(!a.current&&!c.current)return;requestAnimationFrame(()=>{for(const d of[a.current,c.current]){if(!d)continue;const u=jm(d);if(u){u.focus();break}}})}},[r,e,s,i,o]),null}function wl(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((s,o)=>o({transform:s,...r}),n):n}function T1(t){return k.useMemo(()=>({draggable:{...Hn.draggable,...t?.draggable},droppable:{...Hn.droppable,...t?.droppable},dragOverlay:{...Hn.dragOverlay,...t?.dragOverlay}}),[t?.draggable,t?.droppable,t?.dragOverlay])}function M1(t){let{activeNode:e,measure:n,initialRect:r,config:s=!0}=t;const o=k.useRef(!1),{x:i,y:l}=typeof s=="boolean"?{x:s,y:s}:s;lt(()=>{if(!i&&!l||!e){o.current=!1;return}if(o.current||!r)return;const c=e?.node.current;if(!c||c.isConnected===!1)return;const d=n(c),u=ll(d,r);if(i||(u.x=0),l||(u.y=0),o.current=!0,Math.abs(u.x)>0||Math.abs(u.y)>0){const f=cl(c);f&&f.scrollBy({top:u.y,left:u.x})}},[e,i,l,r,n])}const xr=k.createContext({...ct,scaleX:1,scaleY:1});var Tt;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Tt||(Tt={}));const br=k.memo(function(e){var n,r,s,o;let{id:i,accessibility:l,autoScroll:a=!0,children:c,sensors:d=k1,collisionDetection:u=Bm,measuring:f,modifiers:m,...h}=e;const p=k.useReducer(D1,void 0,j1),[g,x]=p,[v,y]=Am(),[w,C]=k.useState(Tt.Uninitialized),O=w===Tt.Initialized,{draggable:{active:S,nodes:E,translate:R},droppable:{containers:N}}=g,j=S!=null?E.get(S):null,D=k.useRef({initial:null,translated:null}),P=k.useMemo(()=>{var Le;return S!=null?{id:S,data:(Le=j?.data)!=null?Le:R1,rect:D}:null},[S,j]),M=k.useRef(null),[z,A]=k.useState(null),[$,I]=k.useState(null),V=vn(h,Object.values(h)),_=Rn("DndDescribedBy",i),F=k.useMemo(()=>N.getEnabled(),[N]),W=T1(f),{droppableRects:B,measureDroppableContainers:H,measuringScheduled:G}=h1(F,{dragging:O,dependencies:[R.x,R.y],config:W.droppable}),K=m1(E,S),Y=k.useMemo(()=>$?Zn($):null,[$]),Q=qa(),X=g1(K,W.draggable.measure);M1({activeNode:S!=null?E.get(S):null,config:Q.layoutShiftCompensation,initialRect:X,measure:W.draggable.measure});const U=Po(K,W.draggable.measure,X),J=Po(K?K.parentElement:null),q=k.useRef({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:B,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),se=N.getNodeFor((n=q.current.over)==null?void 0:n.id),ee=S1({measure:W.dragOverlay.measure}),te=(r=ee.nodeRef.current)!=null?r:K,ae=O?(s=ee.rect)!=null?s:U:null,de=!!(ee.nodeRef.current&&ee.rect),fe=v1(de?null:U),ge=xl(te?Ve(te):null),Z=y1(O?se??K:null),ie=E1(Z),oe=wl(m,{transform:{x:R.x-fe.x,y:R.y-fe.y,scaleX:1,scaleY:1},activatorEvent:$,active:P,activeNodeRect:U,containerNodeRect:J,draggingNodeRect:ae,over:q.current.over,overlayNodeRect:ee.rect,scrollableAncestors:Z,scrollableAncestorRects:ie,windowRect:ge}),me=Y?qt(Y,R):null,Se=w1(Z),Ee=Mo(Se),He=Mo(Se,[U]),Ye=qt(oe,Ee),qe=ae?Ym(ae,oe):null,et=P&&qe?u({active:P,collisionRect:qe,droppableRects:B,droppableContainers:F,pointerCoordinates:me}):null,vt=sl(et,"id"),[Fe,_t]=k.useState(null),Oe=de?oe:qt(oe,He),be=Wm(Oe,(o=Fe?.rect)!=null?o:null,U),je=k.useRef(null),ve=k.useCallback((Le,Ge)=>{let{sensor:Ue,options:kt}=Ge;if(M.current==null)return;const tt=E.get(M.current);if(!tt)return;const Ke=Le.nativeEvent,ut=new Ue({active:M.current,activeNode:tt,event:Ke,options:kt,context:q,onAbort($e){if(!E.get($e))return;const{onDragAbort:ft}=V.current,yt={id:$e};ft?.(yt),v({type:"onDragAbort",event:yt})},onPending($e,Rt,ft,yt){if(!E.get($e))return;const{onDragPending:dn}=V.current,Nt={id:$e,constraint:Rt,initialCoordinates:ft,offset:yt};dn?.(Nt),v({type:"onDragPending",event:Nt})},onStart($e){const Rt=M.current;if(Rt==null)return;const ft=E.get(Rt);if(!ft)return;const{onDragStart:yt}=V.current,cn={activatorEvent:Ke,active:{id:Rt,data:ft.data,rect:D}};it.unstable_batchedUpdates(()=>{yt?.(cn),C(Tt.Initializing),x({type:Ie.DragStart,initialCoordinates:$e,active:Rt}),v({type:"onDragStart",event:cn}),A(je.current),I(Ke)})},onMove($e){x({type:Ie.DragMove,coordinates:$e})},onEnd:Bt(Ie.DragEnd),onCancel:Bt(Ie.DragCancel)});je.current=ut;function Bt($e){return async function(){const{active:ft,collisions:yt,over:cn,scrollAdjustedTranslate:dn}=q.current;let Nt=null;if(ft&&dn){const{cancelDrop:un}=V.current;Nt={activatorEvent:Ke,active:ft,collisions:yt,delta:dn,over:cn},$e===Ie.DragEnd&&typeof un=="function"&&await Promise.resolve(un(Nt))&&($e=Ie.DragCancel)}M.current=null,it.unstable_batchedUpdates(()=>{x({type:$e}),C(Tt.Uninitialized),_t(null),A(null),I(null),je.current=null;const un=$e===Ie.DragEnd?"onDragEnd":"onDragCancel";if(Nt){const Nr=V.current[un];Nr?.(Nt),v({type:un,event:Nt})}})}}},[E]),Be=k.useCallback((Le,Ge)=>(Ue,kt)=>{const tt=Ue.nativeEvent,Ke=E.get(kt);if(M.current!==null||!Ke||tt.dndKit||tt.defaultPrevented)return;const ut={active:Ke};Le(Ue,Ge.options,ut)===!0&&(tt.dndKit={capturedBy:Ge.sensor},M.current=kt,ve(Ue,Ge))},[E,ve]),Mn=p1(d,Be);C1(d),lt(()=>{U&&w===Tt.Initializing&&C(Tt.Initialized)},[U,w]),k.useEffect(()=>{const{onDragMove:Le}=V.current,{active:Ge,activatorEvent:Ue,collisions:kt,over:tt}=q.current;if(!Ge||!Ue)return;const Ke={active:Ge,activatorEvent:Ue,collisions:kt,delta:{x:Ye.x,y:Ye.y},over:tt};it.unstable_batchedUpdates(()=>{Le?.(Ke),v({type:"onDragMove",event:Ke})})},[Ye.x,Ye.y]),k.useEffect(()=>{const{active:Le,activatorEvent:Ge,collisions:Ue,droppableContainers:kt,scrollAdjustedTranslate:tt}=q.current;if(!Le||M.current==null||!Ge||!tt)return;const{onDragOver:Ke}=V.current,ut=kt.get(vt),Bt=ut&&ut.rect.current?{id:ut.id,rect:ut.rect.current,data:ut.data,disabled:ut.disabled}:null,$e={active:Le,activatorEvent:Ge,collisions:Ue,delta:{x:tt.x,y:tt.y},over:Bt};it.unstable_batchedUpdates(()=>{_t(Bt),Ke?.($e),v({type:"onDragOver",event:$e})})},[vt]),lt(()=>{q.current={activatorEvent:$,active:P,activeNode:K,collisionRect:qe,collisions:et,droppableRects:B,draggableNodes:E,draggingNode:te,draggingNodeRect:ae,droppableContainers:N,over:Fe,scrollableAncestors:Z,scrollAdjustedTranslate:Ye},D.current={initial:ae,translated:qe}},[P,K,et,qe,E,te,ae,B,N,Fe,Z,Ye]),d1({...Q,delta:R,draggingRect:qe,pointerCoordinates:me,scrollableAncestors:Z,scrollableAncestorRects:ie});const Rr=k.useMemo(()=>({active:P,activeNode:K,activeNodeRect:U,activatorEvent:$,collisions:et,containerNodeRect:J,dragOverlay:ee,draggableNodes:E,droppableContainers:N,droppableRects:B,over:Fe,measureDroppableContainers:H,scrollableAncestors:Z,scrollableAncestorRects:ie,measuringConfiguration:W,measuringScheduled:G,windowRect:ge}),[P,K,U,$,et,J,ee,E,N,B,Fe,H,Z,ie,W,G,ge]),In=k.useMemo(()=>({activatorEvent:$,activators:Mn,active:P,activeNodeRect:U,ariaDescribedById:{draggable:_},dispatch:x,draggableNodes:E,over:Fe,measureDroppableContainers:H}),[$,Mn,P,U,x,_,E,Fe,H]);return k.createElement(tl.Provider,{value:y},k.createElement(Dn.Provider,{value:In},k.createElement(yl.Provider,{value:Rr},k.createElement(xr.Provider,{value:be},c)),k.createElement(P1,{disabled:l?.restoreFocus===!1})),k.createElement(Lm,{...l,hiddenTextDescribedById:_}));function qa(){const Le=z?.autoScrollEnabled===!1,Ge=typeof a=="object"?a.enabled===!1:a===!1,Ue=O&&!Le&&!Ge;return typeof a=="object"?{...a,enabled:Ue}:{enabled:Ue}}}),I1=k.createContext(null),Ao="button",A1="Draggable";function Cl(t){let{id:e,data:n,disabled:r=!1,attributes:s}=t;const o=Rn(A1),{activators:i,activatorEvent:l,active:a,activeNodeRect:c,ariaDescribedById:d,draggableNodes:u,over:f}=k.useContext(Dn),{role:m=Ao,roleDescription:h="draggable",tabIndex:p=0}=s??{},g=a?.id===e,x=k.useContext(g?xr:I1),[v,y]=Qn(),[w,C]=Qn(),O=O1(i,e),S=vn(n);lt(()=>(u.set(e,{id:e,key:o,node:v,activatorNode:w,data:S}),()=>{const R=u.get(e);R&&R.key===o&&u.delete(e)}),[u,e]);const E=k.useMemo(()=>({role:m,tabIndex:p,"aria-disabled":r,"aria-pressed":g&&m===Ao?!0:void 0,"aria-roledescription":h,"aria-describedby":d.draggable}),[r,m,p,g,h,d.draggable]);return{active:a,activatorEvent:l,activeNodeRect:c,attributes:E,isDragging:g,listeners:r?void 0:O,node:v,over:f,setNodeRef:y,setActivatorNodeRef:C,transform:x}}function Ol(){return k.useContext(yl)}const _1="Droppable",$1={timeout:25};function Rs(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:s}=t;const o=Rn(_1),{active:i,dispatch:l,over:a,measureDroppableContainers:c}=k.useContext(Dn),d=k.useRef({disabled:n}),u=k.useRef(!1),f=k.useRef(null),m=k.useRef(null),{disabled:h,updateMeasurementsFor:p,timeout:g}={...$1,...s},x=vn(p??r),v=k.useCallback(()=>{if(!u.current){u.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{c(Array.isArray(x.current)?x.current:[x.current]),m.current=null},g)},[g]),y=gr({callback:v,disabled:h||!i}),w=k.useCallback((E,R)=>{y&&(R&&(y.unobserve(R),u.current=!1),E&&y.observe(E))},[y]),[C,O]=Qn(w),S=vn(e);return k.useEffect(()=>{!y||!C.current||(y.disconnect(),u.current=!1,y.observe(C.current))},[C,y]),k.useEffect(()=>(l({type:Ie.RegisterDroppable,element:{id:r,key:o,disabled:n,node:C,rect:f,data:S}}),()=>l({type:Ie.UnregisterDroppable,key:o,id:r})),[r]),k.useEffect(()=>{n!==d.current.disabled&&(l({type:Ie.SetDroppableDisabled,id:r,key:o,disabled:n}),d.current.disabled=n)},[r,o,n,l]),{active:i,rect:f,isOver:a?.id===r,node:C,over:a,setNodeRef:O}}function L1(t){let{animation:e,children:n}=t;const[r,s]=k.useState(null),[o,i]=k.useState(null),l=Jn(n);return!n&&!r&&l&&s(l),lt(()=>{if(!o)return;const a=r?.key,c=r?.props.id;if(a==null||c==null){s(null);return}Promise.resolve(e(c,o)).then(()=>{s(null)})},[e,r,o]),k.createElement(k.Fragment,null,n,r?k.cloneElement(r,{ref:i}):null)}const z1={x:0,y:0,scaleX:1,scaleY:1};function F1(t){let{children:e}=t;return k.createElement(Dn.Provider,{value:vl},k.createElement(xr.Provider,{value:z1},e))}const V1={position:"fixed",touchAction:"none"},B1=t=>pr(t)?"transform 250ms ease":void 0,W1=k.forwardRef((t,e)=>{let{as:n,activatorEvent:r,adjustScale:s,children:o,className:i,rect:l,style:a,transform:c,transition:d=B1}=t;if(!l)return null;const u=s?c:{...c,scaleX:1,scaleY:1},f={...V1,width:l.width,height:l.height,top:l.top,left:l.left,transform:at.Transform.toString(u),transformOrigin:s&&r?zm(r,l):void 0,transition:typeof d=="function"?d(r):d,...a};return k.createElement(n,{className:i,style:f,ref:e},o)}),H1=t=>e=>{let{active:n,dragOverlay:r}=e;const s={},{styles:o,className:i}=t;if(o!=null&&o.active)for(const[l,a]of Object.entries(o.active))a!==void 0&&(s[l]=n.node.style.getPropertyValue(l),n.node.style.setProperty(l,a));if(o!=null&&o.dragOverlay)for(const[l,a]of Object.entries(o.dragOverlay))a!==void 0&&r.node.style.setProperty(l,a);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[a,c]of Object.entries(s))n.node.style.setProperty(a,c);i!=null&&i.active&&n.node.classList.remove(i.active)}},Y1=t=>{let{transform:{initial:e,final:n}}=t;return[{transform:at.Transform.toString(e)},{transform:at.Transform.toString(n)}]},q1={duration:250,easing:"ease",keyframes:Y1,sideEffects:H1({styles:{active:{opacity:"0"}}})};function G1(t){let{config:e,draggableNodes:n,droppableContainers:r,measuringConfiguration:s}=t;return mr((o,i)=>{if(e===null)return;const l=n.get(o);if(!l)return;const a=l.node.current;if(!a)return;const c=bl(i);if(!c)return;const{transform:d}=Ve(i).getComputedStyle(i),u=al(d);if(!u)return;const f=typeof e=="function"?e:U1(e);return hl(a,s.draggable.measure),f({active:{id:o,data:l.data,node:a,rect:s.draggable.measure(a)},draggableNodes:n,dragOverlay:{node:i,rect:s.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:s,transform:u})})}function U1(t){const{duration:e,easing:n,sideEffects:r,keyframes:s}={...q1,...t};return o=>{let{active:i,dragOverlay:l,transform:a,...c}=o;if(!e)return;const d={x:l.rect.left-i.rect.left,y:l.rect.top-i.rect.top},u={scaleX:a.scaleX!==1?i.rect.width*a.scaleX/l.rect.width:1,scaleY:a.scaleY!==1?i.rect.height*a.scaleY/l.rect.height:1},f={x:a.x-d.x,y:a.y-d.y,...u},m=s({...c,active:i,dragOverlay:l,transform:{initial:a,final:f}}),[h]=m,p=m[m.length-1];if(JSON.stringify(h)===JSON.stringify(p))return;const g=r?.({active:i,dragOverlay:l,...c}),x=l.node.animate(m,{duration:e,easing:n,fill:"forwards"});return new Promise(v=>{x.onfinish=()=>{g?.(),v()}})}}let _o=0;function K1(t){return k.useMemo(()=>{if(t!=null)return _o++,_o},[t])}const X1=k.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:r,style:s,transition:o,modifiers:i,wrapperElement:l="div",className:a,zIndex:c=999}=t;const{activatorEvent:d,active:u,activeNodeRect:f,containerNodeRect:m,draggableNodes:h,droppableContainers:p,dragOverlay:g,over:x,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:w,windowRect:C}=Ol(),O=k.useContext(xr),S=K1(u?.id),E=wl(i,{activatorEvent:d,active:u,activeNodeRect:f,containerNodeRect:m,draggingNodeRect:g.rect,over:x,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:w,transform:O,windowRect:C}),R=ks(f),N=G1({config:r,draggableNodes:h,droppableContainers:p,measuringConfiguration:v}),j=R?g.setRef:void 0;return k.createElement(F1,null,k.createElement(L1,{animation:N},u&&S?k.createElement(W1,{key:S,id:u.id,ref:j,as:l,activatorEvent:d,adjustScale:e,className:a,transition:o,rect:R,style:{zIndex:c,...s},transform:E},n):null))}),El=k.createContext(null),Q1=t=>{const e=T.compilerRuntimeExports.c(20),{children:n,onDragCancel:r,onDragEnd:s,onDragOver:o,onDragStart:i}=t,[l,a]=k.useState(null),[c,d]=k.useState(null);let u;e[0]!==r?(u=v=>{a(null),d(null),r?.({active:v.active,over:v.over})},e[0]=r,e[1]=u):u=e[1];let f;e[2]!==s?(f=v=>{a(null),d(null),s?.({active:v.active,over:v.over})},e[2]=s,e[3]=f):f=e[3];let m;e[4]!==o?(m=v=>{d(v.over?String(v.over.id):null),o?.({active:v.active,over:v.over})},e[4]=o,e[5]=m):m=e[5];let h;e[6]!==i?(h=v=>{a(String(v.active.id)),i?.({active:v.active,over:null})},e[6]=i,e[7]=h):h=e[7];let p;e[8]!==l||e[9]!==c?(p={activeId:l,overId:c},e[8]=l,e[9]=c,e[10]=p):p=e[10];let g;e[11]!==n||e[12]!==p?(g=b.jsx(El.Provider,{value:p,children:n}),e[11]=n,e[12]=p,e[13]=g):g=e[13];let x;return e[14]!==u||e[15]!==f||e[16]!==m||e[17]!==h||e[18]!==g?(x=b.jsx(br,{onDragCancel:u,onDragEnd:f,onDragOver:m,onDragStart:h,children:g}),e[14]=u,e[15]=f,e[16]=m,e[17]=h,e[18]=g,e[19]=x):x=e[19],x},J1=(t,e)=>t?"dragging":e?"disabled":"idle",Sl=t=>{const e=T.compilerRuntimeExports.c(32);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,data:s,disabled:l,id:i,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,c=k.useId(),d=i??c;let u;e[7]!==s||e[8]!==a||e[9]!==d?(u={data:s,disabled:a,id:d},e[7]=s,e[8]=a,e[9]=d,e[10]=u):u=e[10];const{attributes:f,isDragging:m,listeners:h,setNodeRef:p,transform:g}=Cl(u),x=!a&&!m;let v;e[11]!==r||e[12]!==a||e[13]!==m||e[14]!==x?(v=L("touch-none",{"cursor-grab":x,"cursor-grabbing":m,"cursor-not-allowed":a,"z-50":m},r),e[11]=r,e[12]=a,e[13]=m,e[14]=x,e[15]=v):v=e[15];let y;e[16]!==g?(y=at.Translate.toString(g),e[16]=g,e[17]=y):y=e[17];let w;e[18]!==y?(w={transform:y},e[18]=y,e[19]=w):w=e[19];let C;e[20]!==a||e[21]!==m?(C=J1(m,a),e[20]=a,e[21]=m,e[22]=C):C=e[22];let O;return e[23]!==f||e[24]!==n||e[25]!==o||e[26]!==h||e[27]!==p||e[28]!==v||e[29]!==w||e[30]!==C?(O=b.jsx("div",{className:v,ref:p,style:w,...o,...h,...f,"data-ox-slot":"draggable","data-ox-state":C,children:n}),e[23]=f,e[24]=n,e[25]=o,e[26]=h,e[27]=p,e[28]=v,e[29]=w,e[30]=C,e[31]=O):O=e[31],O},Z1=(t,e)=>t?"over":e?"disabled":"idle",kl=t=>{const e=T.compilerRuntimeExports.c(23);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,data:s,disabled:l,id:i,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,c=k.useId(),d=i??c;let u;e[7]!==s||e[8]!==a||e[9]!==d?(u={data:s,disabled:a,id:d},e[7]=s,e[8]=a,e[9]=d,e[10]=u):u=e[10];const{isOver:f,setNodeRef:m}=Rs(u),h=f&&!a;let p;e[11]!==r||e[12]!==h?(p=L({"ring-2 ring-primary":h},r),e[11]=r,e[12]=h,e[13]=p):p=e[13];let g;e[14]!==a||e[15]!==f?(g=Z1(f,a),e[14]=a,e[15]=f,e[16]=g):g=e[16];let x;return e[17]!==n||e[18]!==o||e[19]!==m||e[20]!==p||e[21]!==g?(x=b.jsx("div",{className:p,ref:m,...o,"data-ox-slot":"droppable","data-ox-state":g,children:n}),e[17]=n,e[18]=o,e[19]=m,e[20]=p,e[21]=g,e[22]=x):x=e[22],x},ep=()=>{const t=k.useContext(El);if(!t)throw new Error("Dnd components must be used within OxDndContext");return t},tp=Object.assign(Q1,{Draggable:Sl,Droppable:kl}),Rl=k.createContext(void 0),np=t=>{const e=T.compilerRuntimeExports.c(10),{children:n,defaultOpen:r,onOpenChange:s,open:o}=t,i=r===void 0?!1:r,[l,a]=k.useState(i),c=o!==void 0,d=c?o:l;let u;e[0]!==c||e[1]!==s?(u=p=>{c||a(p),s?.(p)},e[0]=c,e[1]=s,e[2]=u):u=e[2];const f=u;let m;e[3]!==s||e[4]!==d||e[5]!==f?(m={open:d,setOpen:f,onOpenChange:s},e[3]=s,e[4]=d,e[5]=f,e[6]=m):m=e[6];let h;return e[7]!==n||e[8]!==m?(h=b.jsx(Rl.Provider,{value:m,children:n}),e[7]=n,e[8]=m,e[9]=h):h=e[9],h},rp=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("flex-1 overflow-y-auto p-4",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"drawer-body",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Nl=()=>{const t=k.useContext(Rl);if(t===void 0)throw new Error("useDrawerContext must be used within an OxDrawer component");return t},sp={left:"inset-y-0 left-0 h-full w-full sm:w-3/4 sm:max-w-sm border-r",right:"inset-y-0 right-0 h-full w-full sm:w-3/4 sm:max-w-sm border-l",top:"inset-x-0 top-0 w-full max-h-[80vh] border-b",bottom:"inset-x-0 bottom-0 w-full max-h-[80vh] border-t"},op=t=>{const e=T.compilerRuntimeExports.c(39);let n,r,s,o,i;e[0]!==t?({children:n,className:r,closeOnOutsideClick:o,side:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!0:o,a=i===void 0?"right":i,{open:c,setOpen:d}=Nl(),[u,f]=k.useState(!1),m=k.useRef(null),h=k.useRef(null);let p;e[6]!==d?(p=()=>{d(!1)},e[6]=d,e[7]=p):p=e[7];const g=p;let x;e[8]!==c||e[9]!==u?(x=$=>{$.target===m.current&&!c&&u&&f(!1)},e[8]=c,e[9]=u,e[10]=x):x=e[10];const v=x;let y,w;e[11]!==c?(y=()=>{c&&f(!0)},w=[c],e[11]=c,e[12]=y,e[13]=w):(y=e[12],w=e[13]),k.useEffect(y,w);let C,O;e[14]!==c||e[15]!==u?(C=()=>{if(u)return c&&(h.current=document.activeElement,document.body.classList.add("overflow-hidden"),requestAnimationFrame(()=>{m.current?.focus()})),()=>{document.body.classList.remove("overflow-hidden"),h.current&&(h.current.focus(),h.current=null)}},O=[c,u],e[14]=c,e[15]=u,e[16]=C,e[17]=O):(C=e[16],O=e[17]),k.useEffect(C,O);let S,E;if(e[18]!==l||e[19]!==g||e[20]!==u?(E=()=>{if(!u)return;const $=V=>{V.key==="Escape"&&g()},I=V=>{l&&m.current&&!m.current.contains(V.target)&&g()};return document.addEventListener("keydown",$),l&&document.addEventListener("mousedown",I),()=>{document.removeEventListener("keydown",$),document.removeEventListener("mousedown",I)}},S=[u,l,g],e[18]=l,e[19]=g,e[20]=u,e[21]=S,e[22]=E):(S=e[21],E=e[22]),k.useEffect(E,S),!u)return null;let R;e[23]===Symbol.for("react.memo_cache_sentinel")?(R=L("fixed inset-0","ox-drawer-backdrop"),e[23]=R):R=e[23];const N=c?"open":"closing";let j;e[24]!==N?(j=b.jsx("div",{className:R,"data-ox-slot":"drawer-backdrop","data-ox-state":N}),e[24]=N,e[25]=j):j=e[25];const D=sp[a];let P;e[26]!==r||e[27]!==D?(P=L("fixed z-50 flex flex-col bg-background text-foreground","ox-drawer-animate",D,r),e[26]=r,e[27]=D,e[28]=P):P=e[28];const M=c?"open":"closing";let z;e[29]!==n||e[30]!==s||e[31]!==v||e[32]!==a||e[33]!==P||e[34]!==M?(z=b.jsx("div",{"aria-modal":"true",className:P,ref:m,role:"dialog",tabIndex:-1,onAnimationEnd:v,...s,"data-ox-side":a,"data-ox-slot":"drawer-content","data-ox-state":M,children:n}),e[29]=n,e[30]=s,e[31]=v,e[32]=a,e[33]=P,e[34]=M,e[35]=z):z=e[35];let A;return e[36]!==j||e[37]!==z?(A=it.createPortal(b.jsxs(b.Fragment,{children:[j,z]}),document.body),e[36]=j,e[37]=z,e[38]=A):A=e[38],A},ip=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mx-4 flex shrink-0 flex-col gap-2 border-t py-4",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"drawer-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},lp=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mx-4 flex shrink-0 items-center justify-between border-b py-4",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"drawer-header",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},ap=t=>{const e=T.compilerRuntimeExports.c(17);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:i,onClick:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?!1:i,{setOpen:a}=Nl();let c;e[6]!==l||e[7]!==o||e[8]!==a?(c=m=>{l||(a(!0),o?.(m))},e[6]=l,e[7]=o,e[8]=a,e[9]=c):c=e[9];const d=c,u=l?"disabled":"enabled";let f;return e[10]!==n||e[11]!==r||e[12]!==l||e[13]!==s||e[14]!==d||e[15]!==u?(f=b.jsx(Je,{className:r,disabled:l,variant:"ghost",onClick:d,...s,"data-ox-slot":"drawer-trigger","data-ox-state":u,children:n}),e[10]=n,e[11]=r,e[12]=l,e[13]=s,e[14]=d,e[15]=u,e[16]=f):f=e[16],f},nr=Object.assign(np,{Body:rp,Content:op,Footer:ip,Header:lp,Trigger:ap}),jl=k.createContext(null),Dl=k.createContext(null),cp=t=>{const e=T.compilerRuntimeExports.c(5),{children:n}=t,[r,s]=k.useState(null);let o;e[0]!==r?(o={anchor:r,onAnchorChange:s},e[0]=r,e[1]=o):o=e[1];let i;return e[2]!==n||e[3]!==o?(i=b.jsx(jl.Provider,{value:o,children:n}),e[2]=n,e[3]=o,e[4]=i):i=e[4],i},Ns=()=>{const t=k.useContext(jl);if(!t)throw new Error("usePopperContext must be used within OxPopper");return t},Pl=()=>{const t=k.useContext(Dl);if(!t)throw new Error("usePopperContentContext must be used within OxPopper.Content");return t},dp=dt("OxPopperAnchor","div"),up=t=>{const e=T.compilerRuntimeExports.c(19);let n,r,s,o;e[0]!==t?({asChild:s,children:n,virtualRef:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=s===void 0?!1:s,l=Ns(),a=k.useRef(null);let c;e[5]!==l?(c=h=>{a.current=h,l.onAnchorChange(h)},e[5]=l,e[6]=c):c=e[6];const d=c;let u,f;if(e[7]!==l||e[8]!==o?(u=()=>{o?.current&&l.onAnchorChange(o.current)},f=[l,o],e[7]=l,e[8]=o,e[9]=u,e[10]=f):(u=e[9],f=e[10]),k.useEffect(u,f),o)return null;if(i){let h;return e[11]!==n||e[12]!==r||e[13]!==d?(h=b.jsx(dp,{ref:d,...r,children:n}),e[11]=n,e[12]=r,e[13]=d,e[14]=h):h=e[14],h}let m;return e[15]!==n||e[16]!==r||e[17]!==d?(m=b.jsx("div",{ref:d,...r,children:n}),e[15]=n,e[16]=r,e[17]=d,e[18]=m):m=e[18],m};function vr(){return typeof window<"u"}function on(t){return Tl(t)?(t.nodeName||"").toLowerCase():"#document"}function Qe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function bt(t){var e;return(e=(Tl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Tl(t){return vr()?t instanceof Node||t instanceof Qe(t).Node:!1}function ze(t){return vr()?t instanceof Element||t instanceof Qe(t).Element:!1}function xt(t){return vr()?t instanceof HTMLElement||t instanceof Qe(t).HTMLElement:!1}function $o(t){return!vr()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Qe(t).ShadowRoot}const fp=new Set(["inline","contents"]);function Pn(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=st(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!fp.has(s)}const mp=new Set(["table","td","th"]);function pp(t){return mp.has(on(t))}const hp=[":popover-open",":modal"];function yr(t){return hp.some(e=>{try{return t.matches(e)}catch{return!1}})}const gp=["transform","translate","scale","rotate","perspective"],xp=["transform","translate","scale","rotate","perspective","filter"],bp=["paint","layout","strict","content"];function js(t){const e=Ds(),n=ze(t)?st(t):t;return gp.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||xp.some(r=>(n.willChange||"").includes(r))||bp.some(r=>(n.contain||"").includes(r))}function vp(t){let e=Mt(t);for(;xt(e)&&!Xt(e);){if(js(e))return e;if(yr(e))return null;e=Mt(e)}return null}function Ds(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yp=new Set(["html","body","#document"]);function Xt(t){return yp.has(on(t))}function st(t){return Qe(t).getComputedStyle(t)}function wr(t){return ze(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Mt(t){if(on(t)==="html")return t;const e=t.assignedSlot||t.parentNode||$o(t)&&t.host||bt(t);return $o(e)?e.host:e}function Ml(t){const e=Mt(t);return Xt(e)?t.ownerDocument?t.ownerDocument.body:t.body:xt(e)&&Pn(e)?e:Ml(e)}function Cn(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=Ml(t),o=s===((r=t.ownerDocument)==null?void 0:r.body),i=Qe(s);if(o){const l=ss(i);return e.concat(i,i.visualViewport||[],Pn(s)?s:[],l&&n?Cn(l):[])}return e.concat(s,Cn(s,[],n))}function ss(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const wp=["top","right","bottom","left"],It=Math.min,Xe=Math.max,rr=Math.round,zn=Math.floor,gt=t=>({x:t,y:t}),Cp={left:"right",right:"left",bottom:"top",top:"bottom"},Op={start:"end",end:"start"};function os(t,e,n){return Xe(t,It(e,n))}function Ot(t,e){return typeof t=="function"?t(e):t}function Et(t){return t.split("-")[0]}function ln(t){return t.split("-")[1]}function Ps(t){return t==="x"?"y":"x"}function Ts(t){return t==="y"?"height":"width"}const Ep=new Set(["top","bottom"]);function ht(t){return Ep.has(Et(t))?"y":"x"}function Ms(t){return Ps(ht(t))}function Sp(t,e,n){n===void 0&&(n=!1);const r=ln(t),s=Ms(t),o=Ts(s);let i=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(i=sr(i)),[i,sr(i)]}function kp(t){const e=sr(t);return[is(t),e,is(e)]}function is(t){return t.replace(/start|end/g,e=>Op[e])}const Lo=["left","right"],zo=["right","left"],Rp=["top","bottom"],Np=["bottom","top"];function jp(t,e,n){switch(t){case"top":case"bottom":return n?e?zo:Lo:e?Lo:zo;case"left":case"right":return e?Rp:Np;default:return[]}}function Dp(t,e,n,r){const s=ln(t);let o=jp(Et(t),n==="start",r);return s&&(o=o.map(i=>i+"-"+s),e&&(o=o.concat(o.map(is)))),o}function sr(t){return t.replace(/left|right|bottom|top/g,e=>Cp[e])}function Pp(t){return{top:0,right:0,bottom:0,left:0,...t}}function Il(t){return typeof t!="number"?Pp(t):{top:t,right:t,bottom:t,left:t}}function or(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}var Tp=typeof document<"u",Mp=function(){},ir=Tp?k.useLayoutEffect:Mp;const Ip={...ce},Ap=Ip.useInsertionEffect,_p=Ap||(t=>t());function $p(t){const e=ce.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return _p(()=>{e.current=t}),ce.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function Fo(t,e,n){let{reference:r,floating:s}=t;const o=ht(e),i=Ms(e),l=Ts(i),a=Et(e),c=o==="y",d=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,f=r[l]/2-s[l]/2;let m;switch(a){case"top":m={x:d,y:r.y-s.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-s.width,y:u};break;default:m={x:r.x,y:r.y}}switch(ln(e)){case"start":m[i]-=f*(n&&c?-1:1);break;case"end":m[i]+=f*(n&&c?-1:1);break}return m}const Lp=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:i}=n,l=o.filter(Boolean),a=await(i.isRTL==null?void 0:i.isRTL(e));let c=await i.getElementRects({reference:t,floating:e,strategy:s}),{x:d,y:u}=Fo(c,r,a),f=r,m={},h=0;for(let p=0;p<l.length;p++){const{name:g,fn:x}=l[p],{x:v,y,data:w,reset:C}=await x({x:d,y:u,initialPlacement:r,placement:f,strategy:s,middlewareData:m,rects:c,platform:i,elements:{reference:t,floating:e}});d=v??d,u=y??u,m={...m,[g]:{...m[g],...w}},C&&h<=50&&(h++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:s}):C.rects),{x:d,y:u}=Fo(c,f,a)),p=-1)}return{x:d,y:u,placement:f,strategy:s,middlewareData:m}};async function On(t,e){var n;e===void 0&&(e={});const{x:r,y:s,platform:o,rects:i,elements:l,strategy:a}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Ot(e,t),h=Il(m),g=l[f?u==="floating"?"reference":"floating":u],x=or(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:a})),v=u==="floating"?{x:r,y:s,width:i.floating.width,height:i.floating.height}:i.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),w=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},C=or(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:y,strategy:a}):v);return{top:(x.top-C.top+h.top)/w.y,bottom:(C.bottom-x.bottom+h.bottom)/w.y,left:(x.left-C.left+h.left)/w.x,right:(C.right-x.right+h.right)/w.x}}const zp=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:o,platform:i,elements:l,middlewareData:a}=e,{element:c,padding:d=0}=Ot(t,e)||{};if(c==null)return{};const u=Il(d),f={x:n,y:r},m=Ms(s),h=Ts(m),p=await i.getDimensions(c),g=m==="y",x=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=o.reference[h]+o.reference[m]-f[m]-o.floating[h],C=f[m]-o.reference[m],O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let S=O?O[y]:0;(!S||!await(i.isElement==null?void 0:i.isElement(O)))&&(S=l.floating[y]||o.floating[h]);const E=w/2-C/2,R=S/2-p[h]/2-1,N=It(u[x],R),j=It(u[v],R),D=N,P=S-p[h]-j,M=S/2-p[h]/2+E,z=os(D,M,P),A=!a.arrow&&ln(s)!=null&&M!==z&&o.reference[h]/2-(M<D?N:j)-p[h]/2<0,$=A?M<D?M-D:M-P:0;return{[m]:f[m]+$,data:{[m]:z,centerOffset:M-z-$,...A&&{alignmentOffset:$}},reset:A}}}),Fp=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:s,middlewareData:o,rects:i,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:p=!0,...g}=Ot(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=Et(s),v=ht(l),y=Et(l)===l,w=await(a.isRTL==null?void 0:a.isRTL(c.floating)),C=f||(y||!p?[sr(l)]:kp(l)),O=h!=="none";!f&&O&&C.push(...Dp(l,p,h,w));const S=[l,...C],E=await On(e,g),R=[];let N=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&R.push(E[x]),u){const M=Sp(s,i,w);R.push(E[M[0]],E[M[1]])}if(N=[...N,{placement:s,overflows:R}],!R.every(M=>M<=0)){var j,D;const M=(((j=o.flip)==null?void 0:j.index)||0)+1,z=S[M];if(z&&(!(u==="alignment"?v!==ht(z):!1)||N.every(I=>ht(I.placement)===v?I.overflows[0]>0:!0)))return{data:{index:M,overflows:N},reset:{placement:z}};let A=(D=N.filter($=>$.overflows[0]<=0).sort(($,I)=>$.overflows[1]-I.overflows[1])[0])==null?void 0:D.placement;if(!A)switch(m){case"bestFit":{var P;const $=(P=N.filter(I=>{if(O){const V=ht(I.placement);return V===v||V==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(V=>V>0).reduce((V,_)=>V+_,0)]).sort((I,V)=>I[1]-V[1])[0])==null?void 0:P[0];$&&(A=$);break}case"initialPlacement":A=l;break}if(s!==A)return{reset:{placement:A}}}return{}}}};function Vo(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Bo(t){return wp.some(e=>t[e]>=0)}const Vp=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=Ot(t,e);switch(r){case"referenceHidden":{const o=await On(e,{...s,elementContext:"reference"}),i=Vo(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Bo(i)}}}case"escaped":{const o=await On(e,{...s,altBoundary:!0}),i=Vo(o,n.floating);return{data:{escapedOffsets:i,escaped:Bo(i)}}}default:return{}}}}},Al=new Set(["left","top"]);async function Bp(t,e){const{placement:n,platform:r,elements:s}=t,o=await(r.isRTL==null?void 0:r.isRTL(s.floating)),i=Et(n),l=ln(n),a=ht(n)==="y",c=Al.has(i)?-1:1,d=o&&a?-1:1,u=Ot(e,t);let{mainAxis:f,crossAxis:m,alignmentAxis:h}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof h=="number"&&(m=l==="end"?h*-1:h),a?{x:m*d,y:f*c}:{x:f*c,y:m*d}}const Wp=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:o,placement:i,middlewareData:l}=e,a=await Bp(e,t);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+a.x,y:o+a.y,data:{...a,placement:i}}}}},Hp=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:g=>{let{x,y:v}=g;return{x,y:v}}},...a}=Ot(t,e),c={x:n,y:r},d=await On(e,a),u=ht(Et(s)),f=Ps(u);let m=c[f],h=c[u];if(o){const g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",v=m+d[g],y=m-d[x];m=os(v,m,y)}if(i){const g=u==="y"?"top":"left",x=u==="y"?"bottom":"right",v=h+d[g],y=h-d[x];h=os(v,h,y)}const p=l.fn({...e,[f]:m,[u]:h});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[f]:o,[u]:i}}}}}},Yp=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:o,middlewareData:i}=e,{offset:l=0,mainAxis:a=!0,crossAxis:c=!0}=Ot(t,e),d={x:n,y:r},u=ht(s),f=Ps(u);let m=d[f],h=d[u];const p=Ot(l,e),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(a){const y=f==="y"?"height":"width",w=o.reference[f]-o.floating[y]+g.mainAxis,C=o.reference[f]+o.reference[y]-g.mainAxis;m<w?m=w:m>C&&(m=C)}if(c){var x,v;const y=f==="y"?"width":"height",w=Al.has(Et(s)),C=o.reference[u]-o.floating[y]+(w&&((x=i.offset)==null?void 0:x[u])||0)+(w?0:g.crossAxis),O=o.reference[u]+o.reference[y]+(w?0:((v=i.offset)==null?void 0:v[u])||0)-(w?g.crossAxis:0);h<C?h=C:h>O&&(h=O)}return{[f]:m,[u]:h}}}},qp=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:s,rects:o,platform:i,elements:l}=e,{apply:a=()=>{},...c}=Ot(t,e),d=await On(e,c),u=Et(s),f=ln(s),m=ht(s)==="y",{width:h,height:p}=o.floating;let g,x;u==="top"||u==="bottom"?(g=u,x=f===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(x=u,g=f==="end"?"top":"bottom");const v=p-d.top-d.bottom,y=h-d.left-d.right,w=It(p-d[g],v),C=It(h-d[x],y),O=!e.middlewareData.shift;let S=w,E=C;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(E=y),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(S=v),O&&!f){const N=Xe(d.left,0),j=Xe(d.right,0),D=Xe(d.top,0),P=Xe(d.bottom,0);m?E=h-2*(N!==0||j!==0?N+j:Xe(d.left,d.right)):S=p-2*(D!==0||P!==0?D+P:Xe(d.top,d.bottom))}await a({...e,availableWidth:E,availableHeight:S});const R=await i.getDimensions(l.floating);return h!==R.width||p!==R.height?{reset:{rects:!0}}:{}}}};function _l(t){const e=st(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=xt(t),o=s?t.offsetWidth:n,i=s?t.offsetHeight:r,l=rr(n)!==o||rr(r)!==i;return l&&(n=o,r=i),{width:n,height:r,$:l}}function Is(t){return ze(t)?t:t.contextElement}function Gt(t){const e=Is(t);if(!xt(e))return gt(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:o}=_l(e);let i=(o?rr(n.width):n.width)/r,l=(o?rr(n.height):n.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Gp=gt(0);function $l(t){const e=Qe(t);return!Ds()||!e.visualViewport?Gp:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Up(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Qe(t)?!1:e}function Ft(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),o=Is(t);let i=gt(1);e&&(r?ze(r)&&(i=Gt(r)):i=Gt(t));const l=Up(o,n,r)?$l(o):gt(0);let a=(s.left+l.x)/i.x,c=(s.top+l.y)/i.y,d=s.width/i.x,u=s.height/i.y;if(o){const f=Qe(o),m=r&&ze(r)?Qe(r):r;let h=f,p=ss(h);for(;p&&r&&m!==h;){const g=Gt(p),x=p.getBoundingClientRect(),v=st(p),y=x.left+(p.clientLeft+parseFloat(v.paddingLeft))*g.x,w=x.top+(p.clientTop+parseFloat(v.paddingTop))*g.y;a*=g.x,c*=g.y,d*=g.x,u*=g.y,a+=y,c+=w,h=Qe(p),p=ss(h)}}return or({width:d,height:u,x:a,y:c})}function Cr(t,e){const n=wr(t).scrollLeft;return e?e.left+n:Ft(bt(t)).left+n}function Ll(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-Cr(t,n),s=n.top+e.scrollTop;return{x:r,y:s}}function Kp(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const o=s==="fixed",i=bt(r),l=e?yr(e.floating):!1;if(r===i||l&&o)return n;let a={scrollLeft:0,scrollTop:0},c=gt(1);const d=gt(0),u=xt(r);if((u||!u&&!o)&&((on(r)!=="body"||Pn(i))&&(a=wr(r)),xt(r))){const m=Ft(r);c=Gt(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const f=i&&!u&&!o?Ll(i,a):gt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-a.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-a.scrollTop*c.y+d.y+f.y}}function Xp(t){return Array.from(t.getClientRects())}function Qp(t){const e=bt(t),n=wr(t),r=t.ownerDocument.body,s=Xe(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Xe(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Cr(t);const l=-n.scrollTop;return st(r).direction==="rtl"&&(i+=Xe(e.clientWidth,r.clientWidth)-s),{width:s,height:o,x:i,y:l}}const Wo=25;function Jp(t,e){const n=Qe(t),r=bt(t),s=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,l=0,a=0;if(s){o=s.width,i=s.height;const d=Ds();(!d||d&&e==="fixed")&&(l=s.offsetLeft,a=s.offsetTop)}const c=Cr(r);if(c<=0){const d=r.ownerDocument,u=d.body,f=getComputedStyle(u),m=d.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(r.clientWidth-u.clientWidth-m);h<=Wo&&(o-=h)}else c<=Wo&&(o+=c);return{width:o,height:i,x:l,y:a}}const Zp=new Set(["absolute","fixed"]);function eh(t,e){const n=Ft(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,o=xt(t)?Gt(t):gt(1),i=t.clientWidth*o.x,l=t.clientHeight*o.y,a=s*o.x,c=r*o.y;return{width:i,height:l,x:a,y:c}}function Ho(t,e,n){let r;if(e==="viewport")r=Jp(t,n);else if(e==="document")r=Qp(bt(t));else if(ze(e))r=eh(e,n);else{const s=$l(t);r={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return or(r)}function zl(t,e){const n=Mt(t);return n===e||!ze(n)||Xt(n)?!1:st(n).position==="fixed"||zl(n,e)}function th(t,e){const n=e.get(t);if(n)return n;let r=Cn(t,[],!1).filter(l=>ze(l)&&on(l)!=="body"),s=null;const o=st(t).position==="fixed";let i=o?Mt(t):t;for(;ze(i)&&!Xt(i);){const l=st(i),a=js(i);!a&&l.position==="fixed"&&(s=null),(o?!a&&!s:!a&&l.position==="static"&&!!s&&Zp.has(s.position)||Pn(i)&&!a&&zl(t,i))?r=r.filter(d=>d!==i):s=l,i=Mt(i)}return e.set(t,r),r}function nh(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const i=[...n==="clippingAncestors"?yr(e)?[]:th(e,this._c):[].concat(n),r],l=i[0],a=i.reduce((c,d)=>{const u=Ho(e,d,s);return c.top=Xe(u.top,c.top),c.right=It(u.right,c.right),c.bottom=It(u.bottom,c.bottom),c.left=Xe(u.left,c.left),c},Ho(e,l,s));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function rh(t){const{width:e,height:n}=_l(t);return{width:e,height:n}}function sh(t,e,n){const r=xt(e),s=bt(e),o=n==="fixed",i=Ft(t,!0,o,e);let l={scrollLeft:0,scrollTop:0};const a=gt(0);function c(){a.x=Cr(s)}if(r||!r&&!o)if((on(e)!=="body"||Pn(s))&&(l=wr(e)),r){const m=Ft(e,!0,o,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}else s&&c();o&&!r&&s&&c();const d=s&&!r&&!o?Ll(s,l):gt(0),u=i.left+l.scrollLeft-a.x-d.x,f=i.top+l.scrollTop-a.y-d.y;return{x:u,y:f,width:i.width,height:i.height}}function qr(t){return st(t).position==="static"}function Yo(t,e){if(!xt(t)||st(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return bt(t)===n&&(n=n.ownerDocument.body),n}function Fl(t,e){const n=Qe(t);if(yr(t))return n;if(!xt(t)){let s=Mt(t);for(;s&&!Xt(s);){if(ze(s)&&!qr(s))return s;s=Mt(s)}return n}let r=Yo(t,e);for(;r&&pp(r)&&qr(r);)r=Yo(r,e);return r&&Xt(r)&&qr(r)&&!js(r)?n:r||vp(t)||n}const oh=async function(t){const e=this.getOffsetParent||Fl,n=this.getDimensions,r=await n(t.floating);return{reference:sh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ih(t){return st(t).direction==="rtl"}const lh={convertOffsetParentRelativeRectToViewportRelativeRect:Kp,getDocumentElement:bt,getClippingRect:nh,getOffsetParent:Fl,getElementRects:oh,getClientRects:Xp,getDimensions:rh,getScale:Gt,isElement:ze,isRTL:ih};function Vl(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ah(t,e){let n=null,r;const s=bt(t);function o(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,a){l===void 0&&(l=!1),a===void 0&&(a=1),o();const c=t.getBoundingClientRect(),{left:d,top:u,width:f,height:m}=c;if(l||e(),!f||!m)return;const h=zn(u),p=zn(s.clientWidth-(d+f)),g=zn(s.clientHeight-(u+m)),x=zn(d),y={rootMargin:-h+"px "+-p+"px "+-g+"px "+-x+"px",threshold:Xe(0,It(1,a))||1};let w=!0;function C(O){const S=O[0].intersectionRatio;if(S!==a){if(!w)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Vl(c,t.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(C,{...y,root:s.ownerDocument})}catch{n=new IntersectionObserver(C,y)}n.observe(t)}return i(!0),o}function ch(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,c=Is(t),d=s||o?[...c?Cn(c):[],...Cn(e)]:[];d.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const u=c&&l?ah(c,n):null;let f=-1,m=null;i&&(m=new ResizeObserver(x=>{let[v]=x;v&&v.target===c&&m&&(m.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(e)})),n()}),c&&!a&&m.observe(c),m.observe(e));let h,p=a?Ft(t):null;a&&g();function g(){const x=Ft(t);p&&!Vl(p,x)&&n(),p=x,h=requestAnimationFrame(g)}return n(),()=>{var x;d.forEach(v=>{s&&v.removeEventListener("scroll",n),o&&v.removeEventListener("resize",n)}),u?.(),(x=m)==null||x.disconnect(),m=null,a&&cancelAnimationFrame(h)}}const dh=Wp,uh=Hp,fh=Fp,mh=qp,ph=Vp,qo=zp,hh=Yp,gh=(t,e,n)=>{const r=new Map,s={platform:lh,...n},o={...s.platform,_c:r};return Lp(t,e,{...s,platform:o})};var xh=typeof document<"u",bh=function(){},Yn=xh?k.useLayoutEffect:bh;function lr(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!lr(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const o=s[r];if(!(o==="_owner"&&t.$$typeof)&&!lr(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Bl(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Go(t,e){const n=Bl(t);return Math.round(e*n)/n}function Gr(t){const e=ce.useRef(t);return Yn(()=>{e.current=t}),e}function vh(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:a,open:c}=t,[d,u]=ce.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,m]=ce.useState(r);lr(f,r)||m(r);const[h,p]=ce.useState(null),[g,x]=ce.useState(null),v=ce.useCallback(I=>{I!==O.current&&(O.current=I,p(I))},[]),y=ce.useCallback(I=>{I!==S.current&&(S.current=I,x(I))},[]),w=o||h,C=i||g,O=ce.useRef(null),S=ce.useRef(null),E=ce.useRef(d),R=a!=null,N=Gr(a),j=Gr(s),D=Gr(c),P=ce.useCallback(()=>{if(!O.current||!S.current)return;const I={placement:e,strategy:n,middleware:f};j.current&&(I.platform=j.current),gh(O.current,S.current,I).then(V=>{const _={...V,isPositioned:D.current!==!1};M.current&&!lr(E.current,_)&&(E.current=_,Ga.flushSync(()=>{u(_)}))})},[f,e,n,j,D]);Yn(()=>{c===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,u(I=>({...I,isPositioned:!1})))},[c]);const M=ce.useRef(!1);Yn(()=>(M.current=!0,()=>{M.current=!1}),[]),Yn(()=>{if(w&&(O.current=w),C&&(S.current=C),w&&C){if(N.current)return N.current(w,C,P);P()}},[w,C,P,N,R]);const z=ce.useMemo(()=>({reference:O,floating:S,setReference:v,setFloating:y}),[v,y]),A=ce.useMemo(()=>({reference:w,floating:C}),[w,C]),$=ce.useMemo(()=>{const I={position:n,left:0,top:0};if(!A.floating)return I;const V=Go(A.floating,d.x),_=Go(A.floating,d.y);return l?{...I,transform:"translate("+V+"px, "+_+"px)",...Bl(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:_}},[n,l,A.floating,d.x,d.y]);return ce.useMemo(()=>({...d,update:P,refs:z,elements:A,floatingStyles:$}),[d,P,z,A,$])}const yh=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?qo({element:r.current,padding:s}).fn(n):{}:r?qo({element:r,padding:s}).fn(n):{}}}},wh=(t,e)=>({...dh(t),options:[t,e]}),Ch=(t,e)=>({...uh(t),options:[t,e]}),Oh=(t,e)=>({...hh(t),options:[t,e]}),Eh=(t,e)=>({...fh(t),options:[t,e]}),Sh=(t,e)=>({...mh(t),options:[t,e]}),kh=(t,e)=>({...ph(t),options:[t,e]}),Rh=(t,e)=>({...yh(t),options:[t,e]}),Nh={...ce};let Uo=!1,jh=0;const Ko=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+jh++;function Dh(){const[t,e]=ce.useState(()=>Uo?Ko():void 0);return ir(()=>{t==null&&e(Ko())},[]),ce.useEffect(()=>{Uo=!0},[]),t}const Ph=Nh.useId,Wl=Ph||Dh;let En;process.env.NODE_ENV!=="production"&&(En=new Set);function Th(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const s="Floating UI: "+n.join(" ");if(!((t=En)!=null&&t.has(s))){var o;(o=En)==null||o.add(s),console.warn(s)}}function Mh(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];const s="Floating UI: "+n.join(" ");if(!((t=En)!=null&&t.has(s))){var o;(o=En)==null||o.add(s),console.error(s)}}const Ih=ce.forwardRef(function(e,n){const{context:{placement:r,elements:{floating:s},middlewareData:{arrow:o,shift:i}},width:l=14,height:a=7,tipRadius:c=0,strokeWidth:d=0,staticOffset:u,stroke:f,d:m,style:{transform:h,...p}={},...g}=e;process.env.NODE_ENV!=="production"&&(n||Th("The `ref` prop is required for `FloatingArrow`."));const x=Wl(),[v,y]=ce.useState(!1);if(ir(()=>{if(!s)return;st(s).direction==="rtl"&&y(!0)},[s]),!s)return null;const[w,C]=r.split("-"),O=w==="top"||w==="bottom";let S=u;(O&&i!=null&&i.x||!O&&i!=null&&i.y)&&(S=null);const E=d*2,R=E/2,N=l/2*(c/-8+1),j=a/2*c/4,D=!!m,P=S&&C==="end"?"bottom":"top";let M=S&&C==="end"?"right":"left";S&&v&&(M=C==="end"?"left":"right");const z=o?.x!=null?S||o.x:"",A=o?.y!=null?S||o.y:"",$=m||"M0,0"+(" H"+l)+(" L"+(l-N)+","+(a-j))+(" Q"+l/2+","+a+" "+N+","+(a-j))+" Z",I={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[w];return b.jsxs("svg",{...g,"aria-hidden":!0,ref:n,width:D?l:l+E,height:l,viewBox:"0 0 "+l+" "+(a>l?a:l),style:{position:"absolute",pointerEvents:"none",[M]:z,[P]:A,[w]:O||D?"100%":"calc(100% - "+E/2+"px)",transform:[I,h].filter(V=>!!V).join(" "),...p},children:[E>0&&b.jsx("path",{clipPath:"url(#"+x+")",fill:"none",stroke:f,strokeWidth:E+(m?0:1),d:$}),b.jsx("path",{stroke:E&&!m?g.fill:"none",d:$}),b.jsx("clipPath",{id:x,children:b.jsx("rect",{x:-R,y:R*(D?-1:1),width:l+E,height:l})})]})});function Ah(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(s=>s(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const _h=ce.createContext(null),$h=ce.createContext(null),Lh=()=>{var t;return((t=ce.useContext(_h))==null?void 0:t.id)||null},zh=()=>ce.useContext($h);function Fh(t){const{open:e=!1,onOpenChange:n,elements:r}=t,s=Wl(),o=ce.useRef({}),[i]=ce.useState(()=>Ah()),l=Lh()!=null;if(process.env.NODE_ENV!=="production"){const m=r.reference;m&&!ze(m)&&Mh("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,c]=ce.useState(r.reference),d=$p((m,h,p)=>{o.current.openEvent=m?h:void 0,i.emit("openchange",{open:m,event:h,reason:p,nested:l}),n?.(m,h,p)}),u=ce.useMemo(()=>({setPositionReference:c}),[]),f=ce.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return ce.useMemo(()=>({dataRef:o,open:e,onOpenChange:d,elements:f,events:i,floatingId:s,refs:u}),[e,d,f,i,s,u])}function Vh(t){t===void 0&&(t={});const{nodeId:e}=t,n=Fh({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,s=r.elements,[o,i]=ce.useState(null),[l,a]=ce.useState(null),d=s?.domReference||o,u=ce.useRef(null),f=zh();ir(()=>{d&&(u.current=d)},[d]);const m=vh({...t,elements:{...s,...l&&{reference:l}}}),h=ce.useCallback(y=>{const w=ze(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;a(w),m.refs.setReference(w)},[m.refs]),p=ce.useCallback(y=>{(ze(y)||y===null)&&(u.current=y,i(y)),(ze(m.refs.reference.current)||m.refs.reference.current===null||y!==null&&!ze(y))&&m.refs.setReference(y)},[m.refs]),g=ce.useMemo(()=>({...m.refs,setReference:p,setPositionReference:h,domReference:u}),[m.refs,p,h]),x=ce.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),v=ce.useMemo(()=>({...m,...r,refs:g,elements:x,nodeId:e}),[m,g,x,e,r]);return ir(()=>{r.dataRef.current.floatingContext=v;const y=f?.nodesRef.current.find(w=>w.id===e);y&&(y.context=v)}),ce.useMemo(()=>({...m,context:v,refs:g,elements:x}),[m,g,x,v])}const Bh=()=>{const t=Pl();return b.jsx(Ih,{className:L("fill-popover [&>path:last-of-type]:stroke-popover","[&>path:first-of-type]:stroke-border dark:[&>path:first-of-type]:stroke-popover-stroke"),context:t.floatingContext,height:5,ref:t.onArrowChange,strokeWidth:1,width:10})};function Hl(t){const[e,n="center"]=t.split("-");return[e,n]}const Wh=t=>({fn(e){const{middlewareData:n,placement:r,rects:s}=e,i=n.arrow?.centerOffset!==0,l=i?0:t.arrowWidth,a=i?0:t.arrowHeight,[c,d]=Hl(r),u={center:"50%",end:"100%",start:"0%"}[d],f=(n.arrow?.x??0)+l/2,m=(n.arrow?.y??0)+a/2;let h="",p="";switch(c){case"bottom":{h=i?u:`${f}px`,p=`${-a}px`;break}case"top":{h=i?u:`${f}px`,p=`${s.floating.height+a}px`;break}case"right":{h=`${-a}px`,p=i?u:`${m}px`;break}case"left":{h=`${s.floating.width+a}px`,p=i?u:`${m}px`;break}}return{data:{x:h,y:p}}},name:"transformOrigin",options:t}),Hh=k.forwardRef(({align:t="center",alignOffset:e=0,arrowPadding:n=0,avoidCollisions:r=!0,children:s,collisionPadding:o=0,hideWhenDetached:i=!1,onPlaced:l,side:a="bottom",sideOffset:c=0,sticky:d="partial",style:u,...f},m)=>{const h=Ns(),[p,g]=k.useState(null),[x,v]=k.useState(null),y=T.useSize(x),w=y?.width??0,C=y?.height??0,O=a+(t!=="center"?"-"+t:""),{context:S,floatingStyles:E,isPositioned:R,middlewareData:N,placement:j,refs:D}=Vh({elements:{reference:h.anchor},middleware:[wh({alignmentAxis:e,mainAxis:c+C}),r&&Ch({crossAxis:!1,limiter:d==="partial"?Oh():void 0,mainAxis:!0,padding:o}),r&&Eh({padding:o}),Sh({apply:({availableHeight:V,availableWidth:_,elements:F,rects:W})=>{const{height:B,width:H}=W.reference,G=F.floating.style;G.setProperty("--ox-popper-available-width",`${_}px`),G.setProperty("--ox-popper-available-height",`${V}px`),G.setProperty("--ox-popper-anchor-width",`${H}px`),G.setProperty("--ox-popper-anchor-height",`${B}px`)},padding:o}),x&&Rh({element:x,padding:n}),Wh({arrowHeight:C,arrowWidth:w}),i&&kh({strategy:"referenceHidden"})].filter(Boolean),placement:O,strategy:"fixed",whileElementsMounted:(...V)=>ch(...V,{animationFrame:!1})}),[P,M]=Hl(j),z=N.transformOrigin,[A,$]=k.useState(),I=k.useCallback(V=>{g(V),typeof m=="function"?m(V):m&&(m.current=V)},[m]);return k.useLayoutEffect(()=>{p&&$(globalThis.getComputedStyle(p).zIndex)},[p]),k.useLayoutEffect(()=>{R&&l?.()},[R,l]),b.jsx("div",{"data-ox-popper-content-wrapper":"",ref:D.setFloating,style:{...E,minWidth:"max-content",transform:R?E.transform:"translate(0, -200%)",zIndex:A,"--ox-popper-transform-origin":z?`${z.x} ${z.y}`:void 0,...N.hide?.referenceHidden&&{pointerEvents:"none",visibility:"hidden"}},children:b.jsx(Dl.Provider,{value:{floatingContext:S,onArrowChange:v,placedSide:P},children:b.jsx("div",{"data-align":M,"data-ox-side":P,"data-side":P,ref:I,...f,style:{...u,animation:R?void 0:"none",position:"relative"},children:s})})})}),ke=Object.assign(cp,{Anchor:up,Arrow:Bh,Content:Hh}),Yl=k.createContext(void 0),Yh=t=>{const e=T.compilerRuntimeExports.c(23),{align:n,children:r,closeOnOutsideClick:s,defaultOpen:o,disabled:i,onOpenChange:l,open:a,side:c}=t,d=n===void 0?"start":n,u=s===void 0?!0:s,f=o===void 0?!1:o,m=i===void 0?!1:i,h=c===void 0?"bottom":c;let p;e[0]!==u||e[1]!==a||e[2]!==f||e[3]!==m||e[4]!==l?(p={closeOnEscape:!0,closeOnOutsideClick:u,defaultOpen:f,disabled:m,onOpenChange:l,open:a},e[0]=u,e[1]=a,e[2]=f,e[3]=m,e[4]=l,e[5]=p):p=e[5];const{close:g,containerRef:x,isClosing:v,isVisible:y,open:w,toggle:C}=T.usePopperState(p);let O;e[6]!==d||e[7]!==g||e[8]!==m||e[9]!==v||e[10]!==y||e[11]!==w||e[12]!==h||e[13]!==C?(O={align:d,close:g,disabled:m,isClosing:v,isVisible:y,open:w,side:h,toggle:C},e[6]=d,e[7]=g,e[8]=m,e[9]=v,e[10]=y,e[11]=w,e[12]=h,e[13]=C,e[14]=O):O=e[14];const S=O;let E;e[15]!==r?(E=b.jsx(ke,{children:r}),e[15]=r,e[16]=E):E=e[16];let R;e[17]!==x||e[18]!==E?(R=b.jsx("div",{className:"inline-block","data-ox-slot":"dropdown",ref:x,children:E}),e[17]=x,e[18]=E,e[19]=R):R=e[19];let N;return e[20]!==S||e[21]!==R?(N=b.jsx(Yl.Provider,{value:S,children:R}),e[20]=S,e[21]=R,e[22]=N):N=e[22],N},qh=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("grid min-h-0 flex-1 grid-cols-[auto_1fr_auto] gap-y-0.5 overflow-y-auto",'**:data-[ox-slot="icon"]:col-start-1 **:data-[ox-slot="icon"]:mr-2 **:data-[ox-slot="icon"]:justify-self-center','**:data-[ox-slot="dropdown-label"]:col-start-2','**:data-[ox-slot="dropdown-shortcut"]:col-start-3 **:data-[ox-slot="dropdown-shortcut"]:justify-self-end',r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("ul",{className:o,...s,"data-ox-slot":"dropdown-body",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i};function Or(){const t=k.useContext(Yl);if(t===void 0)throw new Error("Dropdown components must be used within an OxDropdown");return t}const Gh=t=>{const e=T.compilerRuntimeExports.c(15);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{align:o,isClosing:i,isVisible:l,side:a}=Or();if(!l)return null;const c=i?"closing":"open";let d;e[4]!==r?(d=L("z-50 flex max-h-96 min-w-52 flex-col gap-1 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",r),e[4]=r,e[5]=d):d=e[5];let u;e[6]!==n||e[7]!==s||e[8]!==d?(u=b.jsx("div",{className:d,...s,"data-ox-slot":"dropdown-content",children:n}),e[6]=n,e[7]=s,e[8]=d,e[9]=u):u=e[9];let f;return e[10]!==o||e[11]!==a||e[12]!==c||e[13]!==u?(f=b.jsx(ke.Content,{align:o,className:"ox-dropdown-animate","data-ox-state":c,role:"menu",side:a,sideOffset:8,children:u}),e[10]=o,e[11]=a,e[12]=c,e[13]=u,e[14]=f):f=e[14],f},Uh=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("col-span-3 shrink-0 px-3 py-2",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"dropdown-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Kh=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("col-span-3 shrink-0 px-3 py-2",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,"data-ox-slot":"dropdown-header",...s,children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},ql=L("group col-span-3 grid h-8 grid-cols-subgrid items-center gap-1 rounded-sm px-2 py-1.5 text-left text-sm",'[&_svg:not([class*="size-"])]:size-4 [&_svg:not([class*="text-"])]:text-muted-foreground',"cursor-pointer hover:bg-neutral-accent hover:text-neutral-accent-foreground","outline-hidden focus:bg-neutral-accent focus:text-neutral-accent-foreground","aria-disabled:ox-default-disabled","aria-disabled:hover:bg-transparent aria-disabled:hover:text-current","aria-disabled:focus:bg-transparent aria-disabled:focus:text-current"),Xh=t=>"href"in t,Qh=t=>{const e=T.compilerRuntimeExports.c(21);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,disabled:l,href:s,onClick:o,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,{close:c}=Or();let d;e[7]!==r?(d=L(ql,r),e[7]=r,e[8]=d):d=e[8];const u=d;let f;e[9]!==c||e[10]!==a||e[11]!==o?(f=x=>{if(a){x.preventDefault();return}o?.(x),c()},e[9]=c,e[10]=a,e[11]=o,e[12]=f):f=e[12];const m=f,h=a?void 0:s,p=a?-1:void 0;let g;return e[13]!==n||e[14]!==a||e[15]!==m||e[16]!==u||e[17]!==i||e[18]!==h||e[19]!==p?(g=b.jsx("li",{className:"contents","data-ox-slot":"dropdown-item",children:b.jsx("a",{"aria-disabled":a,className:u,href:h,role:"menuitem",tabIndex:p,onClick:m,...i,"data-ox-slot":"dropdown-link",children:n})}),e[13]=n,e[14]=a,e[15]=m,e[16]=u,e[17]=i,e[18]=h,e[19]=p,e[20]=g):g=e[20],g},Jh=t=>{const e=T.compilerRuntimeExports.c(19);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:i,onClick:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?!1:i,{close:a}=Or();let c;e[6]!==r?(c=L(ql,r),e[6]=r,e[7]=c):c=e[7];const d=c;let u;e[8]!==a||e[9]!==l||e[10]!==s?(u=p=>{if(l){p.preventDefault();return}s?.(p),a()},e[8]=a,e[9]=l,e[10]=s,e[11]=u):u=e[11];const f=u,m=l?-1:void 0;let h;return e[12]!==d||e[13]!==n||e[14]!==l||e[15]!==f||e[16]!==o||e[17]!==m?(h=b.jsx("li",{className:"contents","data-ox-slot":"dropdown-item",children:b.jsx("button",{"aria-disabled":l,className:d,role:"menuitem",tabIndex:m,type:"button",onClick:f,...o,"data-ox-slot":"dropdown-button",children:n})}),e[12]=d,e[13]=n,e[14]=l,e[15]=f,e[16]=o,e[17]=m,e[18]=h):h=e[18],h},Zh=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=Xh(t)?b.jsx(Qh,{...t}):b.jsx(Jh,{...t}),e[0]=t,e[1]=n):n=e[1],n},eg=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("overflow-hidden text-sm font-medium text-ellipsis",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("span",{className:o,...s,"data-ox-slot":"dropdown-label",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},tg=t=>{const e=T.compilerRuntimeExports.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let s;e[3]!==n?(s=L("col-span-3",n),e[3]=n,e[4]=s):s=e[4];let o;return e[5]!==r||e[6]!==s?(o=b.jsx("li",{className:"contents",children:b.jsx(Vs,{className:s,role:"separator",...r})}),e[5]=r,e[6]=s,e[7]=o):o=e[7],o},ng=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("ml-auto text-xs tracking-widest text-muted-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("span",{className:o,...s,"data-ox-slot":"dropdown-shortcut",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},rg=dt("OxDropdownTrigger","button"),sg=t=>{const e=T.compilerRuntimeExports.c(37);let n,r,s,o,i,l,a,c,d,u;e[0]!==t?({animateIcon:o,asChild:i,children:n,className:r,disabled:l,hideIcon:a,icon:c,size:d,variant:u,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10]);const f=o===void 0?!0:o,m=i===void 0?!1:i,h=l===void 0?!1:l,p=a===void 0?!1:a,g=c===void 0?le.ChevronDown:c,x=d===void 0?"md":d,v=u===void 0?"ghost":u,{disabled:y,open:w,toggle:C}=Or(),O=h||y;if(m){const j=w?"open":"closed";let D;return e[11]!==n||e[12]!==r||e[13]!==s||e[14]!==O||e[15]!==w||e[16]!==j||e[17]!==C?(D=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx(rg,{"aria-expanded":w,"aria-haspopup":"menu",className:r,disabled:O,type:"button",onClick:C,...s,"data-ox-slot":"dropdown-trigger","data-ox-state":j,children:n})}),e[11]=n,e[12]=r,e[13]=s,e[14]=O,e[15]=w,e[16]=j,e[17]=C,e[18]=D):D=e[18],D}const S=w?"open":"closed";let E;e[19]!==n?(E=b.jsx("span",{className:"flex items-center gap-2",children:n}),e[19]=n,e[20]=E):E=e[20];let R;e[21]!==f||e[22]!==p||e[23]!==g||e[24]!==w?(R=!p&&g?b.jsx(ue,{className:L("text-current",{"transition-transform duration-200":f,"rotate-180":f&&w}),icon:g}):null,e[21]=f,e[22]=p,e[23]=g,e[24]=w,e[25]=R):R=e[25];let N;return e[26]!==r||e[27]!==s||e[28]!==O||e[29]!==w||e[30]!==x||e[31]!==R||e[32]!==S||e[33]!==E||e[34]!==C||e[35]!==v?(N=b.jsx(ke.Anchor,{asChild:!0,children:b.jsxs(Je,{"aria-expanded":w,"aria-haspopup":"menu",className:r,disabled:O,size:x,variant:v,onClick:C,...s,"data-ox-slot":"dropdown-trigger","data-ox-state":S,children:[E,R]})}),e[26]=r,e[27]=s,e[28]=O,e[29]=w,e[30]=x,e[31]=R,e[32]=S,e[33]=E,e[34]=C,e[35]=v,e[36]=N):N=e[36],N},Qt=Object.assign(Yh,{Body:qh,Content:Gh,Footer:Uh,Header:Kh,Item:Zh,Label:eg,Separator:tg,Shortcut:ng,Trigger:sg}),Gl=k.createContext(null),Er=()=>{const t=k.useContext(Gl);if(!t)throw new Error("useEndlessListContext must be used within OxEndlessList");return t},Ul=k.createContext(null),og=()=>{const t=k.useContext(Ul);if(!t)throw new Error("useItemContext must be used within OxEndlessList.Items");return t},ig=5,lg=5,ag=t=>{const e=T.compilerRuntimeExports.c(37);let n,r,s,o,i,l,a,c,d,u,f,m,h,p;e[0]!==t?({children:n,className:r,data:s,estimateSize:i,gap:d,getItemKey:l,hasNextPage:u,isError:f,isLoading:m,loadMoreThreshold:h,onLoadMore:a,overscan:p,style:c,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14]);const g=d===void 0?0:d,x=u===void 0?!1:u,v=f===void 0?!1:f,y=m===void 0?!1:m,w=h===void 0?ig:h,C=p===void 0?lg:p,[O,S]=k.useState(null);let E;e[15]!==s||e[16]!==i||e[17]!==g||e[18]!==l||e[19]!==x||e[20]!==v||e[21]!==y||e[22]!==w||e[23]!==a||e[24]!==C||e[25]!==O?(E={data:s,estimateSize:i,gap:g,getItemKey:l,hasNextPage:x,isError:v,isLoading:y,itemCount:s.length,loadMoreThreshold:w,onLoadMore:a,overscan:C,scrollElement:O},e[15]=s,e[16]=i,e[17]=g,e[18]=l,e[19]=x,e[20]=v,e[21]=y,e[22]=w,e[23]=a,e[24]=C,e[25]=O,e[26]=E):E=e[26];const R=E;let N;e[27]!==r?(N=L("relative overflow-auto",r),e[27]=r,e[28]=N):N=e[28];let j;e[29]!==n||e[30]!==o||e[31]!==c||e[32]!==N?(j=b.jsx("div",{className:N,"data-ox-slot":"endless-list",ref:S,style:c,...o,children:n}),e[29]=n,e[30]=o,e[31]=c,e[32]=N,e[33]=j):j=e[33];let D;return e[34]!==R||e[35]!==j?(D=b.jsx(Gl.Provider,{value:R,children:j}),e[34]=R,e[35]=j,e[36]=D):D=e[36],D},cg=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{isLoading:o,itemCount:i}=Er();if(i>0||o)return null;let l;e[4]!==r?(l=L("flex min-h-full items-center justify-center text-muted-foreground",r),e[4]=r,e[5]=l):l=e[5];const a=n??"No items to display";let c;return e[6]!==s||e[7]!==l||e[8]!==a?(c=b.jsx("div",{className:l,"data-ox-slot":"endless-list-empty",...s,children:a}),e[6]=s,e[7]=l,e[8]=a,e[9]=c):c=e[9],c},dg=t=>{const e=T.compilerRuntimeExports.c(13);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{isError:o,onLoadMore:i}=Er();if(!o)return null;let l;e[4]!==r?(l=L("sticky bottom-0 flex items-center justify-center gap-2 bg-background/80 py-4 backdrop-blur-sm",r),e[4]=r,e[5]=l):l=e[5];let a;e[6]!==n||e[7]!==i?(a=n??b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"text-destructive",children:"Failed to load items"}),i&&b.jsx(Je,{size:"sm",variant:"secondary",onClick:i,children:"Retry"})]}),e[6]=n,e[7]=i,e[8]=a):a=e[8];let c;return e[9]!==s||e[10]!==l||e[11]!==a?(c=b.jsx("div",{className:l,"data-ox-slot":"endless-list-error",...s,children:a}),e[9]=s,e[10]=l,e[11]=a,e[12]=c):c=e[12],c},ug=t=>{const e=T.compilerRuntimeExports.c(16),{children:n,className:r}=t,{index:s,item:o,paddingY:i,virtualItem:l,virtualizer:a}=og();let c;e[0]!==a?(c=x=>{a.measureElement(x)},e[0]=a,e[1]=c):c=e[1];const d=c;let u;e[2]!==r?(u=L("w-full",r),e[2]=r,e[3]=u):u=e[3];const f=l.index,m=`translateY(${l.start+i}px)`;let h;e[4]!==m?(h={left:0,position:"absolute",top:0,transform:m,width:"100%"},e[4]=m,e[5]=h):h=e[5];let p;e[6]!==n||e[7]!==s||e[8]!==o?(p=n(o,s),e[6]=n,e[7]=s,e[8]=o,e[9]=p):p=e[9];let g;return e[10]!==d||e[11]!==u||e[12]!==h||e[13]!==p||e[14]!==l.index?(g=b.jsx("div",{className:u,"data-index":f,"data-ox-slot":"endless-list-item",ref:d,style:h,children:p}),e[10]=d,e[11]=u,e[12]=h,e[13]=p,e[14]=l.index,e[15]=g):g=e[15],g};function Yt(t,e,n){let r=n.initialDeps??[],s,o=!0;function i(){var l,a,c;let d;n.key&&((l=n.debug)!=null&&l.call(n))&&(d=Date.now());const u=t();if(!(u.length!==r.length||u.some((h,p)=>r[p]!==h)))return s;r=u;let m;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(m=Date.now()),s=e(...u),n.key&&((c=n.debug)!=null&&c.call(n))){const h=Math.round((Date.now()-d)*100)/100,p=Math.round((Date.now()-m)*100)/100,g=p/16,x=(v,y)=>{for(v=String(v);v.length<y;)v=" "+v;return v};console.info(`%c⏱ ${x(p,5)} /${x(h,5)} ms`,`
7
7
  font-size: .6rem;
8
8
  font-weight: bold;
9
- color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(s),o=!1,s}return i.updateDeps=l=>{r=l},i}function Xo(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const fg=(t,e)=>Math.abs(t-e)<1.01,mg=(t,e,n)=>{let r;return function(...s){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,s),n)}},Qo=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},pg=t=>t,hg=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),r=[];for(let s=e;s<=n;s++)r.push(s);return r},gg=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const s=i=>{const{width:l,height:a}=i;e({width:Math.round(l),height:Math.round(a)})};if(s(Qo(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(i=>{const l=()=>{const a=i[0];if(a?.borderBoxSize){const c=a.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(Qo(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},Jo={passive:!0},Zo=typeof window>"u"?!0:"onscrollend"in window,xg=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;let s=0;const o=t.options.useScrollendEvent&&Zo?()=>{}:mg(r,()=>{e(s,!1)},t.options.isScrollingResetDelay),i=d=>()=>{const{horizontal:u,isRtl:f}=t.options;s=u?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),e(s,d)},l=i(!0),a=i(!1);a(),n.addEventListener("scroll",l,Jo);const c=t.options.useScrollendEvent&&Zo;return c&&n.addEventListener("scrollend",a,Jo),()=>{n.removeEventListener("scroll",l),c&&n.removeEventListener("scrollend",a)}},bg=(t,e,n)=>{if(e?.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},vg=(t,{adjustments:e=0,behavior:n},r)=>{var s,o;const i=t+e;(o=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[r.options.horizontal?"left":"top"]:i,behavior:n})};class yg{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const i=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=r())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=r())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:pg,rangeExtractor:hg,onChange:()=>{},measureElement:bg,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=Yt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,o=new Map;for(let i=r-1;i>=0;i--){const l=n[i];if(s.has(l.lane))continue;const a=o.get(l.lane);if(a==null||l.end>a.end?o.set(l.lane,l):l.end<a.end&&s.set(l.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=Yt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,o,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:i,lanes:l}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=Yt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:i,lanes:l},a)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const f of this.laneAssignments.keys())f>=n&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,c),u=new Array(l).fill(void 0);for(let f=0;f<c;f++){const m=d[f];m&&(u[m.lane]=f)}for(let f=c;f<n;f++){const m=o(f),h=this.laneAssignments.get(f);let p,g;if(h!==void 0&&this.options.lanes>1){p=h;const w=u[p],C=w!==void 0?d[w]:void 0;g=C?C.end+this.options.gap:r+s}else{const w=this.options.lanes===1?d[f-1]:this.getFurthestMeasurement(d,f);g=w?w.end+this.options.gap:r+s,p=w?w.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,p)}const x=a.get(m),v=typeof x=="number"?x:this.options.estimateSize(f),y=g+v;d[f]={index:f,start:g,size:v,end:y,key:m,lane:p},u[p]=f}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Yt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,o)=>this.range=n.length>0&&r>0?wg({measurements:n,outerSize:r,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Yt(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,o,i)=>o===null||i===null?[]:n({startIndex:o,endIndex:i,overscan:r,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const i=o.key,l=this.elementsCache.get(i);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(i,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,i=r-o;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,i,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,s)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=Yt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let o=0,i=n.length;o<i;o++){const l=n[o],a=r[l];s.push(a)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return Xo(r[Kl(0,r.length-1,s=>Xo(r[s]).start,n)])},this.getOffsetForAlignment=(n,r,s=0)=>{const o=this.getSize(),i=this.getScrollOffset();r==="auto"&&(r=n>=i+o?"end":"start"),r==="center"?n+=(s-o)/2:r==="end"&&(n-=o);const l=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(s.end>=i+o-this.options.scrollPaddingEnd)r="end";else if(s.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const l=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,r,s.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const i=10,l=c=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(n,c);if(!d){console.warn("Failed to get offset for index:",n);return}const[u,f]=d;this._scrollToOffset(u,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const m=this.getScrollOffset(),h=this.getOffsetForIndex(n,f);if(!h){console.warn("Failed to get offset for index:",n);return}fg(h[0],m)||a(f)})},a=c=>{this.targetWindow&&(o++,o<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,i),this.targetWindow.requestAnimationFrame(()=>l(c))):console.warn(`Failed to scroll to index ${n} after ${i} attempts.`))};l(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let i=r.length-1;for(;i>=0&&o.some(l=>l===null);){const l=r[i];o[l.lane]===null&&(o[l.lane]=l.end),i--}s=Math.max(...o.filter(l=>l!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}}const Kl=(t,e,n,r)=>{for(;t<=e;){const s=(t+e)/2|0,o=n(s);if(o<r)t=s+1;else if(o>r)e=s-1;else return s}return t>0?t-1:0};function wg({measurements:t,outerSize:e,scrollOffset:n,lanes:r}){const s=t.length-1,o=a=>t[a].start;if(t.length<=r)return{startIndex:0,endIndex:s};let i=Kl(0,s,o,n),l=i;if(r===1)for(;l<s&&t[l].end<n+e;)l++;else if(r>1){const a=Array(r).fill(0);for(;l<s&&a.some(d=>d<n+e);){const d=t[l];a[d.lane]=d.end,l++}const c=Array(r).fill(n+e);for(;i>=0&&c.some(d=>d>=n);){const d=t[i];c[d.lane]=d.start,i--}i=Math.max(0,i-i%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:i,endIndex:l}}const ei=typeof document<"u"?ce.useLayoutEffect:ce.useEffect;function Cg(t){const e=ce.useReducer(()=>({}),{})[1],n={...t,onChange:(s,o)=>{var i;o?it.flushSync(e):e(),(i=t.onChange)==null||i.call(t,s,o)}},[r]=ce.useState(()=>new yg(n));return r.setOptions(n),ei(()=>r._didMount(),[]),ei(()=>r._willUpdate()),r}function Og(t){return Cg({observeElementRect:gg,observeElementOffset:xg,scrollToFn:vg,...t})}const Eg=({children:t,className:e,paddingY:n=0})=>{const{data:r,estimateSize:s,gap:o,getItemKey:i,hasNextPage:l,isError:a,isLoading:c,loadMoreThreshold:d,onLoadMore:u,overscan:f,scrollElement:m}=Er(),h=k.useCallback(w=>i(r[w],w),[r,i]),p=k.useCallback(w=>typeof s=="function"?s(w):s,[s]),g=Og({count:r.length,enabled:!!m,estimateSize:p,gap:o,getItemKey:h,getScrollElement:()=>m,overscan:f}),x=g.getVirtualItems(),v=x.at(-1);k.useEffect(()=>{if(!v)return;v.index>=r.length-d&&l&&!c&&!a&&u&&u()},[v,r.length,l,c,a,d,u]);const y=k.Children.only(t);return b.jsx("div",{className:L("relative w-full",e),"data-ox-slot":"endless-list-items",style:{height:g.getTotalSize()+n*2},children:x.map(w=>{const C=r[w.index];return b.jsx(Ul.Provider,{value:{index:w.index,item:C,paddingY:n,virtualItem:w,virtualizer:g},children:k.isValidElement(y)?k.cloneElement(y):null},w.key)})})},Sg=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{hasNextPage:o,isLoading:i}=Er();if(!i||!o)return null;let l;e[4]!==r?(l=L("sticky bottom-0 flex items-center justify-center bg-background/80 py-4 backdrop-blur-sm",r),e[4]=r,e[5]=l):l=e[5];let a;e[6]!==n?(a=n??b.jsx(ys,{size:"sm"}),e[6]=n,e[7]=a):a=e[7];let c;return e[8]!==s||e[9]!==l||e[10]!==a?(c=b.jsx("div",{className:l,"data-ox-slot":"endless-list-loader",...s,children:a}),e[8]=s,e[9]=l,e[10]=a,e[11]=c):c=e[11],c},kg=Object.assign(ag,{Empty:cg,Error:dg,Item:ug,Items:Eg,Loader:Sg}),Xl=k.createContext(null),Rg=t=>{const e=T.compilerRuntimeExports.c(30),{align:n,children:r,closeDelay:s,defaultOpen:o,disabled:i,onOpenChange:l,open:a,openDelay:c,side:d}=t,u=n===void 0?"center":n,f=s===void 0?300:s,m=o===void 0?!1:o,h=i===void 0?!1:i,p=c===void 0?700:c,g=d===void 0?"bottom":d;let x;e[0]!==a||e[1]!==m||e[2]!==h||e[3]!==l?(x={closeOnEscape:!0,closeOnOutsideClick:!1,defaultOpen:m,disabled:h,onOpenChange:l,open:a},e[0]=a,e[1]=m,e[2]=h,e[3]=l,e[4]=x):x=e[4];const{close:v,containerRef:y,isClosing:w,isVisible:C,open:O,setOpen:S}=T.usePopperState(x),E=k.useRef(null);let R;e[5]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{E.current&&(clearTimeout(E.current),E.current=null)},e[5]=R):R=e[5];const N=R;let j;e[6]!==v||e[7]!==f?(j=()=>{N(),E.current=setTimeout(()=>{v()},f)},e[6]=v,e[7]=f,e[8]=j):j=e[8];const D=j;let P,M;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=()=>()=>{N()},M=[N],e[9]=P,e[10]=M):(P=e[9],M=e[10]),k.useEffect(P,M);let z;e[11]!==u||e[12]!==v||e[13]!==f||e[14]!==w||e[15]!==C||e[16]!==O||e[17]!==p||e[18]!==S||e[19]!==g||e[20]!==D?(z={align:u,clearCloseTimer:N,close:v,closeDelay:f,isClosing:w,isVisible:C,open:O,openDelay:p,setOpen:S,side:g,startCloseTimer:D},e[11]=u,e[12]=v,e[13]=f,e[14]=w,e[15]=C,e[16]=O,e[17]=p,e[18]=S,e[19]=g,e[20]=D,e[21]=z):z=e[21];const A=z;let $;e[22]!==r?($=b.jsx(ke,{children:r}),e[22]=r,e[23]=$):$=e[23];let I;e[24]!==y||e[25]!==$?(I=b.jsx("div",{"data-ox-slot":"hovercard",ref:y,children:$}),e[24]=y,e[25]=$,e[26]=I):I=e[26];let V;return e[27]!==A||e[28]!==I?(V=b.jsx(Xl.Provider,{value:A,children:I}),e[27]=A,e[28]=I,e[29]=V):V=e[29],V},Ql=()=>{const t=k.useContext(Xl);if(!t)throw new Error("useHoverCardContext must be used within OxHoverCard");return t},Ng=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,forceMount:l,onPointerEnter:o,onPointerLeave:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,{align:c,clearCloseTimer:d,isClosing:u,isVisible:f,side:m,startCloseTimer:h}=Ql();let p;e[7]!==d||e[8]!==o?(p=S=>{d(),o?.(S)},e[7]=d,e[8]=o,e[9]=p):p=e[9];const g=p;let x;e[10]!==i||e[11]!==h?(x=S=>{h(),i?.(S)},e[10]=i,e[11]=h,e[12]=x):x=e[12];const v=x;if(!f&&!a)return null;let y;e[13]!==r?(y=L("ox-hovercard-animate min-w-64 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md",r),e[13]=r,e[14]=y):y=e[14];const w=u?"closing":"open";let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=b.jsx(ke.Arrow,{}),e[15]=C):C=e[15];let O;return e[16]!==c||e[17]!==n||e[18]!==s||e[19]!==g||e[20]!==v||e[21]!==m||e[22]!==y||e[23]!==w?(O=b.jsxs(ke.Content,{align:c,className:y,side:m,sideOffset:8,...s,"data-ox-slot":"hovercard-content","data-ox-state":w,onPointerEnter:g,onPointerLeave:v,children:[C,n]}),e[16]=c,e[17]=n,e[18]=s,e[19]=g,e[20]=v,e[21]=m,e[22]=y,e[23]=w,e[24]=O):O=e[24],O},jg=dt("OxHoverCardTrigger","div"),Dg=t=>{const e=T.compilerRuntimeExports.c(27);let n,r,s,o,i,l;e[0]!==t?({asChild:l,children:n,className:r,onPointerEnter:o,onPointerLeave:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,{clearCloseTimer:c,openDelay:d,setOpen:u,startCloseTimer:f}=Ql(),m=k.useRef(null);let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{m.current&&(clearTimeout(m.current),m.current=null)},e[7]=h):h=e[7];const p=h;let g;e[8]!==c||e[9]!==o||e[10]!==d||e[11]!==u?(g=S=>{p(),c(),m.current=setTimeout(()=>{u(!0)},d),o?.(S)},e[8]=c,e[9]=o,e[10]=d,e[11]=u,e[12]=g):g=e[12];const x=g;let v;e[13]!==i||e[14]!==f?(v=S=>{p(),f(),i?.(S)},e[13]=i,e[14]=f,e[15]=v):v=e[15];const y=v;let w;e[16]!==r||e[17]!==s||e[18]!==x||e[19]!==y?(w={...s,className:r,"data-ox-slot":"hovercard-trigger",onPointerEnter:x,onPointerLeave:y},e[16]=r,e[17]=s,e[18]=x,e[19]=y,e[20]=w):w=e[20];const C=w;if(a){let S;return e[21]!==n||e[22]!==C?(S=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx(jg,{...C,children:n})}),e[21]=n,e[22]=C,e[23]=S):S=e[23],S}let O;return e[24]!==n||e[25]!==C?(O=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx("div",{...C,children:n})}),e[24]=n,e[25]=C,e[26]=O):O=e[26],O},Pg=Object.assign(Rg,{Content:Ng,Trigger:Dg}),Tg={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},Mg=({alt:t,className:e,fallback:n,height:r,objectFit:s,onLoadComplete:o,onLoadError:i,src:l,width:a,...c})=>{const[d,u]=k.useState("loading"),f=k.useRef(l);f.current!==l&&(f.current=l,u("loading"));const m=()=>{u("loaded"),o?.()},h=()=>{u("error"),i?.()},p=a&&r,g=s&&Tg[s],x=d==="loading";return d==="error"?n?b.jsx("div",{className:L({"size-full":!p},e),"data-ox-slot":"image-fallback",style:{width:a,height:r},children:n}):b.jsxs("div",{className:L("flex flex-col items-center justify-center gap-2 bg-muted text-muted-foreground",{"size-full":!p},e),"data-ox-slot":"image-fallback",style:{width:a,height:r},children:[b.jsx(ue,{icon:le.ImageOff,size:"md"}),b.jsx("span",{className:"text-sm",children:t})]}):b.jsxs("div",{className:L("relative",{"size-full":!p}),style:{width:a,height:r},children:[x?b.jsx(Vt,{className:"absolute inset-0 size-full"}):null,b.jsx("img",{alt:t,className:L("size-full",g,{invisible:x},e),"data-ox-slot":"image",height:r,src:l,width:a,onError:h,onLoad:m,...c},l)]})},ar=t=>{const e=T.compilerRuntimeExports.c(82),{data:n,level:r,trailingComma:s}=t,o=s===void 0?!1:s,[i,l]=k.useState(r>2);if(n===null){let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=b.jsx("span",{className:"text-muted-foreground",children:"null"}),e[0]=d):d=e[0];let u;e[1]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[1]=o,e[2]=u):u=e[2];let f;return e[3]!==u?(f=b.jsxs(b.Fragment,{children:[d,u]}),e[3]=u,e[4]=f):f=e[4],f}if(n===void 0){let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=b.jsx("span",{className:"text-muted-foreground",children:"undefined"}),e[5]=d):d=e[5];let u;e[6]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[6]=o,e[7]=u):u=e[7];let f;return e[8]!==u?(f=b.jsxs(b.Fragment,{children:[d,u]}),e[8]=u,e[9]=f):f=e[9],f}if(typeof n=="string"){let d;e[10]!==n?(d=b.jsxs("span",{className:We.green.text,children:['"',n,'"']}),e[10]=n,e[11]=d):d=e[11];let u;e[12]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[12]=o,e[13]=u):u=e[13];let f;return e[14]!==d||e[15]!==u?(f=b.jsxs(b.Fragment,{children:[d,u]}),e[14]=d,e[15]=u,e[16]=f):f=e[16],f}if(typeof n=="number"){let d;e[17]!==n?(d=b.jsx("span",{className:We.blue.text,children:n}),e[17]=n,e[18]=d):d=e[18];let u;e[19]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[19]=o,e[20]=u):u=e[20];let f;return e[21]!==d||e[22]!==u?(f=b.jsxs(b.Fragment,{children:[d,u]}),e[21]=d,e[22]=u,e[23]=f):f=e[23],f}if(typeof n=="boolean"){let d;e[24]!==n?(d=n.toString(),e[24]=n,e[25]=d):d=e[25];let u;e[26]!==d?(u=b.jsx("span",{className:We.amber.text,children:d}),e[26]=d,e[27]=u):u=e[27];let f;e[28]!==o?(f=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[28]=o,e[29]=f):f=e[29];let m;return e[30]!==u||e[31]!==f?(m=b.jsxs(b.Fragment,{children:[u,f]}),e[30]=u,e[31]=f,e[32]=m):m=e[32],m}if(Array.isArray(n)){if(n.length===0){let v;return e[33]===Symbol.for("react.memo_cache_sentinel")?(v=b.jsx("span",{className:"text-muted-foreground",children:"[]"}),e[33]=v):v=e[33],v}const d=i?"collapsed":"expanded";let u;e[34]!==i?(u=()=>l(!i),e[34]=i,e[35]=u):u=e[35];let f;e[36]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx("span",{className:"text-foreground",children:"["}),e[36]=f):f=e[36];let m;e[37]!==i||e[38]!==n.length?(m=i?b.jsxs("span",{className:"ml-1 text-muted-foreground",children:[n.length," item",n.length!==1?"s":""]}):null,e[37]=i,e[38]=n.length,e[39]=m):m=e[39];let h;e[40]!==d||e[41]!==u||e[42]!==m?(h=b.jsxs("button",{className:"ox-focus-ring text-muted-foreground hover:text-foreground","data-ox-state":d,onClick:u,children:[f,m]}),e[40]=d,e[41]=u,e[42]=m,e[43]=h):h=e[43];let p;e[44]!==i||e[45]!==n||e[46]!==r||e[47]!==o?(p=i?null:b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"ml-2 border-l border-muted pl-3",children:n.map((v,y)=>b.jsx("div",{className:"block",children:b.jsx(ar,{data:v,level:r+1,trailingComma:y<n.length-1})},y))}),b.jsxs("div",{children:[b.jsx("span",{className:"text-foreground",children:"]"}),o&&b.jsx("span",{className:"text-muted-foreground",children:","})]})]}),e[44]=i,e[45]=n,e[46]=r,e[47]=o,e[48]=p):p=e[48];let g;e[49]!==i?(g=i&&b.jsx("span",{className:"text-foreground",children:"]"}),e[49]=i,e[50]=g):g=e[50];let x;return e[51]!==h||e[52]!==p||e[53]!==g?(x=b.jsxs("div",{className:"inline","data-ox-slot":"json-array",children:[h,p,g]}),e[51]=h,e[52]=p,e[53]=g,e[54]=x):x=e[54],x}if(typeof n=="object"){let d;e[55]!==n?(d=Object.keys(n),e[55]=n,e[56]=d):d=e[56];const u=d;if(u.length===0){let w;return e[57]===Symbol.for("react.memo_cache_sentinel")?(w=b.jsx("span",{className:"text-muted-foreground",children:"{}"}),e[57]=w):w=e[57],w}const f=i?"collapsed":"expanded";let m;e[58]!==i?(m=()=>l(!i),e[58]=i,e[59]=m):m=e[59];let h;e[60]===Symbol.for("react.memo_cache_sentinel")?(h=b.jsx("span",{className:"text-foreground",children:"{"}),e[60]=h):h=e[60];let p;e[61]!==i||e[62]!==u.length?(p=i?b.jsxs("span",{className:"ml-1 text-muted-foreground",children:[u.length," key",u.length!==1?"s":""]}):null,e[61]=i,e[62]=u.length,e[63]=p):p=e[63];let g;e[64]!==f||e[65]!==m||e[66]!==p?(g=b.jsxs("button",{className:"ox-focus-ring text-muted-foreground hover:text-foreground","data-ox-state":f,onClick:m,children:[h,p]}),e[64]=f,e[65]=m,e[66]=p,e[67]=g):g=e[67];let x;e[68]!==i||e[69]!==n||e[70]!==u||e[71]!==r||e[72]!==o?(x=i?null:b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"ml-2 border-l border-muted pl-3",children:u.map((w,C)=>b.jsxs("div",{className:"block",children:[b.jsxs("span",{className:"text-foreground",children:['"',w,'"']}),b.jsx("span",{className:"text-muted-foreground",children:": "}),b.jsx(ar,{data:n[w],level:r+1,trailingComma:C<u.length-1})]},w))}),b.jsxs("div",{children:[b.jsx("span",{className:"text-foreground",children:"}"}),o&&b.jsx("span",{className:"text-muted-foreground",children:","})]})]}),e[68]=i,e[69]=n,e[70]=u,e[71]=r,e[72]=o,e[73]=x):x=e[73];let v;e[74]!==i?(v=i&&b.jsx("span",{className:"text-foreground",children:"}"}),e[74]=i,e[75]=v):v=e[75];let y;return e[76]!==g||e[77]!==x||e[78]!==v?(y=b.jsxs("div",{className:"inline",children:[g,x,v]}),e[76]=g,e[77]=x,e[78]=v,e[79]=y):y=e[79],y}const a=String(n);let c;return e[80]!==a?(c=b.jsx("span",{className:"text-muted-foreground",children:a}),e[80]=a,e[81]=c):c=e[81],c},Ig=t=>{const e=T.compilerRuntimeExports.c(27);let n,r,s;e[0]!==t?({className:n,value:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const[o,i]=k.useState(!1);let l;e[4]!==s?(l=(()=>{if(s==null)return{parsedData:null,isValid:!0,error:null};if(typeof s=="object")return{parsedData:s,isValid:!0,error:null};if(typeof s=="string")try{return{parsedData:JSON.parse(s),isValid:!0,error:null}}catch(C){const O=C;return{parsedData:null,isValid:!1,error:O instanceof Error?O.message:"Invalid JSON"}}return{parsedData:s,isValid:!0,error:null}})(),e[4]=s,e[5]=l):l=e[5];const{error:a,isValid:c,parsedData:d}=l;let u;e[6]!==d||e[7]!==s?(u=async()=>{const w=typeof s=="string"?s:JSON.stringify(d,null,2);try{await navigator.clipboard.writeText(w),i(!0),setTimeout(()=>i(!1),2e3)}catch(C){console.error("Failed to copy:",C)}},e[6]=d,e[7]=s,e[8]=u):u=e[8];const f=u;let m;c?o?m="copied":m="default":m="error";let h;e[9]!==n?(h=L("relative w-full overflow-auto rounded-lg border bg-card p-4 font-mono text-sm",n),e[9]=n,e[10]=h):h=e[10];const p=o?le.Check:le.Copy;let g;e[11]!==p?(g=b.jsx(ue,{icon:p}),e[11]=p,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==g?(x=b.jsx(Je,{"aria-label":"Copy JSON to clipboard",className:"absolute top-1 right-1",size:"sm",variant:"ghost",onClick:f,children:g}),e[13]=f,e[14]=g,e[15]=x):x=e[15];let v;e[16]!==a||e[17]!==c||e[18]!==d||e[19]!==s?(v=b.jsx("div",{className:"pr-8 text-card-foreground",children:c?b.jsx(ar,{data:d,level:0}):b.jsxs("div",{className:"text-destructive-400",children:[b.jsx("div",{className:"font-medium",children:"Invalid JSON:"}),b.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:a}),b.jsx("div",{className:"mt-2 text-muted-foreground",children:b.jsx("pre",{className:"whitespace-pre-wrap",children:s})})]})}),e[16]=a,e[17]=c,e[18]=d,e[19]=s,e[20]=v):v=e[20];let y;return e[21]!==r||e[22]!==m||e[23]!==h||e[24]!==x||e[25]!==v?(y=b.jsxs("div",{className:h,...r,"data-ox-slot":"json-field","data-ox-state":m,children:[x,v]}),e[21]=r,e[22]=m,e[23]=h,e[24]=x,e[25]=v,e[26]=y):y=e[26],y},Ag=Object.assign(Ig,{Node:ar});function As(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function _g(t,e){return t.reduce((n,r,s)=>{const o=e.get(r);return o&&(n[s]=o),n},Array(t.length))}function Fn(t){return t!==null&&t>=0}function $g(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Lg(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const Vn={scaleX:1,scaleY:1},zg=t=>{var e;let{rects:n,activeNodeRect:r,activeIndex:s,overIndex:o,index:i}=t;const l=(e=n[s])!=null?e:r;if(!l)return null;const a=Fg(n,i,s);if(i===s){const c=n[o];return c?{x:s<o?c.left+c.width-(l.left+l.width):c.left-l.left,y:0,...Vn}:null}return i>s&&i<=o?{x:-l.width-a,y:0,...Vn}:i<s&&i>=o?{x:l.width+a,y:0,...Vn}:{x:0,y:0,...Vn}};function Fg(t,e,n){const r=t[e],s=t[e-1],o=t[e+1];return!r||!s&&!o?0:n<e?s?r.left-(s.left+s.width):o.left-(r.left+r.width):o?o.left-(r.left+r.width):r.left-(s.left+s.width)}const _s=t=>{let{rects:e,activeIndex:n,overIndex:r,index:s}=t;const o=As(e,r,n),i=e[s],l=o[s];return!l||!i?null:{x:l.left-i.left,y:l.top-i.top,scaleX:l.width/i.width,scaleY:l.height/i.height}},Bn={scaleX:1,scaleY:1},$s=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:s,rects:o,overIndex:i}=t;const l=(e=o[n])!=null?e:r;if(!l)return null;if(s===n){const c=o[i];return c?{x:0,y:n<i?c.top+c.height-(l.top+l.height):c.top-l.top,...Bn}:null}const a=Vg(o,s,n);return s>n&&s<=i?{x:0,y:-l.height-a,...Bn}:s<n&&s>=i?{x:0,y:l.height+a,...Bn}:{x:0,y:0,...Bn}};function Vg(t,e,n){const r=t[e],s=t[e-1],o=t[e+1];return r?n<e?s?r.top-(s.top+s.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const Jl="Sortable",Zl=k.createContext({activeIndex:-1,containerId:Jl,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:_s,disabled:{draggable:!1,droppable:!1}});function Ls(t){let{children:e,id:n,items:r,strategy:s=_s,disabled:o=!1}=t;const{active:i,dragOverlay:l,droppableRects:a,over:c,measureDroppableContainers:d}=Ol(),u=Rn(Jl,n),f=l.rect!==null,m=k.useMemo(()=>r.map(O=>typeof O=="object"&&"id"in O?O.id:O),[r]),h=i!=null,p=i?m.indexOf(i.id):-1,g=c?m.indexOf(c.id):-1,x=k.useRef(m),v=!$g(m,x.current),y=g!==-1&&p===-1||v,w=Lg(o);lt(()=>{v&&h&&d(m)},[v,m,h,d]),k.useEffect(()=>{x.current=m},[m]);const C=k.useMemo(()=>({activeIndex:p,containerId:u,disabled:w,disableTransforms:y,items:m,overIndex:g,useDragOverlay:f,sortedRects:_g(m,a),strategy:s}),[p,u,w.draggable,w.droppable,y,m,g,a,f,s]);return k.createElement(Zl.Provider,{value:C},e)}const Bg=t=>{let{id:e,items:n,activeIndex:r,overIndex:s}=t;return As(n,r,s).indexOf(e)},Wg=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:s,items:o,newIndex:i,previousItems:l,previousContainerId:a,transition:c}=t;return!c||!r||l!==o&&s===i?!1:n?!0:i!==s&&e===a},Hg={duration:200,easing:"ease"},ea="transform",Yg=at.Transition.toString({property:ea,duration:0,easing:"linear"}),qg={roleDescription:"sortable"};function Gg(t){let{disabled:e,index:n,node:r,rect:s}=t;const[o,i]=k.useState(null),l=k.useRef(n);return lt(()=>{if(!e&&n!==l.current&&r.current){const a=s.current;if(a){const c=sn(r.current,{ignoreTransform:!0}),d={x:a.left-c.left,y:a.top-c.top,scaleX:a.width/c.width,scaleY:a.height/c.height};(d.x||d.y)&&i(d)}}n!==l.current&&(l.current=n)},[e,n,r,s]),k.useEffect(()=>{o&&i(null)},[o]),o}function zs(t){let{animateLayoutChanges:e=Wg,attributes:n,disabled:r,data:s,getNewIndex:o=Bg,id:i,strategy:l,resizeObserverConfig:a,transition:c=Hg}=t;const{items:d,containerId:u,activeIndex:f,disabled:m,disableTransforms:h,sortedRects:p,overIndex:g,useDragOverlay:x,strategy:v}=k.useContext(Zl),y=Ug(r,m),w=d.indexOf(i),C=k.useMemo(()=>({sortable:{containerId:u,index:w,items:d},...s}),[u,s,w,d]),O=k.useMemo(()=>d.slice(d.indexOf(i)),[d,i]),{rect:S,node:E,isOver:R,setNodeRef:N}=Rs({id:i,data:C,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...a}}),{active:j,activatorEvent:D,activeNodeRect:P,attributes:M,setNodeRef:z,listeners:A,isDragging:$,over:I,setActivatorNodeRef:V,transform:_}=Cl({id:i,data:C,attributes:{...qg,...n},disabled:y.draggable}),F=Sm(N,z),W=!!j,B=W&&!h&&Fn(f)&&Fn(g),H=!x&&$,G=H&&B?_:null,Y=B?G??(l??v)({rects:p,activeNodeRect:P,activeIndex:f,overIndex:g,index:w}):null,Q=Fn(f)&&Fn(g)?o({id:i,items:d,activeIndex:f,overIndex:g}):w,X=j?.id,U=k.useRef({activeId:X,items:d,newIndex:Q,containerId:u}),J=d!==U.current.items,q=e({active:j,containerId:u,isDragging:$,isSorting:W,id:i,index:w,items:d,newIndex:U.current.newIndex,previousItems:U.current.items,previousContainerId:U.current.containerId,transition:c,wasDragging:U.current.activeId!=null}),se=Gg({disabled:!q,index:w,node:E,rect:S});return k.useEffect(()=>{W&&U.current.newIndex!==Q&&(U.current.newIndex=Q),u!==U.current.containerId&&(U.current.containerId=u),d!==U.current.items&&(U.current.items=d)},[W,Q,u,d]),k.useEffect(()=>{if(X===U.current.activeId)return;if(X!=null&&U.current.activeId==null){U.current.activeId=X;return}const te=setTimeout(()=>{U.current.activeId=X},50);return()=>clearTimeout(te)},[X]),{active:j,activeIndex:f,attributes:M,data:C,rect:S,index:w,newIndex:Q,items:d,isOver:R,isSorting:W,isDragging:$,listeners:A,node:E,overIndex:g,over:I,setNodeRef:F,setActivatorNodeRef:V,setDroppableNodeRef:N,setDraggableNodeRef:z,transform:se??Y,transition:ee()};function ee(){if(se||J&&U.current.newIndex===w)return Yg;if(!(H&&!pr(D)||!c)&&(W||q))return at.Transition.toString({...c,property:ea})}}function Ug(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t?.draggable)!=null?n:e.draggable,droppable:(r=t?.droppable)!=null?r:e.droppable}}function cr(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const Kg=[he.Down,he.Right,he.Up,he.Left],Fs=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:o,over:i,scrollableAncestors:l}}=e;if(Kg.includes(t.code)){if(t.preventDefault(),!n||!r)return;const a=[];o.getEnabled().forEach(u=>{if(!u||u!=null&&u.disabled)return;const f=s.get(u.id);if(f)switch(t.code){case he.Down:r.top<f.top&&a.push(u);break;case he.Up:r.top>f.top&&a.push(u);break;case he.Left:r.left>f.left&&a.push(u);break;case he.Right:r.left<f.left&&a.push(u);break}});const c=il({collisionRect:r,droppableRects:s,droppableContainers:a});let d=sl(c,"id");if(d===i?.id&&c.length>1&&(d=c[1].id),d!=null){const u=o.get(n.id),f=o.get(d),m=f?s.get(f.id):null,h=f?.node.current;if(h&&m&&u&&f){const g=hr(h).some((O,S)=>l[S]!==O),x=ta(u,f),v=Xg(u,f),y=g||!x?{x:0,y:0}:{x:v?r.width-m.width:0,y:v?r.height-m.height:0},w={x:m.left,y:m.top};return y.x&&y.y?w:yn(w,y)}}}};function ta(t,e){return!cr(t)||!cr(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function Xg(t,e){return!cr(t)||!cr(e)||!ta(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}const na=k.createContext(null),Qg=()=>{const t=k.useContext(na);if(!t)throw new Error("KanbanCardHandle must be used within an OxKanban.Card");return t},ra=k.createContext(null),Jg=()=>{const t=k.useContext(ra);if(!t)throw new Error("KanbanCard must be used within an OxKanban.Column");return t},sa=k.createContext(null),oa=()=>{const t=k.useContext(sa);if(!t)throw new Error("Kanban components must be used within an OxKanban");return t},Zg=t=>{const e=T.compilerRuntimeExports.c(47);let n,r,s,o,i,l,a,c;e[0]!==t?({children:n,className:r,columnGap:a,disabled:c,onMove:o,onReorder:i,style:l,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=a===void 0?16:a,u=c===void 0?!1:c,[f,m]=k.useState(null),[h,p]=k.useState(null);let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=new Map,e[9]=g):g=e[9];const x=k.useRef(g);let v;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=new Map,e[10]=v):v=e[10];const y=k.useRef(v);let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=new Map,e[11]=w):w=e[11];const C=k.useRef(w),O=k.useRef(null);let S;e[12]===Symbol.for("react.memo_cache_sentinel")?(S={coordinateGetter:Fs},e[12]=S):S=e[12];const E=Os(Kt(jn),Kt(Nn,S));let R;e[13]===Symbol.for("react.memo_cache_sentinel")?(R=(X,U,J)=>{x.current.set(X,U),y.current.set(X,J)},e[13]=R):R=e[13];const N=R;let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=X=>{x.current.delete(X),y.current.delete(X)},e[14]=j):j=e[14];const D=j;let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=X=>{const U=String(X.active.id);m(U),p(y.current.get(U)??null)},e[15]=P):P=e[15];const M=P;let z;e[16]!==o||e[17]!==i?(z=X=>{const{active:U,over:J}=X;if(!J)return;const q=String(U.id),se=String(J.id),ee=x.current.get(q);if(!ee)return;const te=x.current.get(se)??se,ae=C.current.get(te)??[];let de=ae.indexOf(se);de===-1&&(de=ae.length);const fe=O.current;if(!(fe?.column===te&&fe?.index===de))if(O.current={column:te,index:de},ee===te){const ge=ae.indexOf(q);ge!==de&&ge!==-1&&i&&i(q,ee,ge,de)}else o(q,ee,te,de)},e[16]=o,e[17]=i,e[18]=z):z=e[18];const A=z;let $;e[19]===Symbol.for("react.memo_cache_sentinel")?($=()=>{m(null),p(null),O.current=null},e[19]=$):$=e[19];const I=$;let V;e[20]!==h||e[21]!==f||e[22]!==u?(V={activeCardContent:h,activeId:f,columnCardIdsMap:C,disabled:u,registerCard:N,unregisterCard:D},e[20]=h,e[21]=f,e[22]=u,e[23]=V):V=e[23];const _=V,F=u?void 0:E;let W;e[24]!==r?(W=L("flex",r),e[24]=r,e[25]=W):W=e[25];let B;e[26]!==d||e[27]!==l?(B={gap:d,...l},e[26]=d,e[27]=l,e[28]=B):B=e[28];let H;e[29]!==n||e[30]!==s||e[31]!==W||e[32]!==B?(H=b.jsx("div",{className:W,"data-ox-slot":"kanban",style:B,...s,children:n}),e[29]=n,e[30]=s,e[31]=W,e[32]=B,e[33]=H):H=e[33];let G;e[34]!==h||e[35]!==f?(G=f&&h?b.jsx("div",{className:"cursor-grabbing rounded-md border border-primary bg-background p-3 shadow-xl ring-2 ring-primary/20",children:h}):null,e[34]=h,e[35]=f,e[36]=G):G=e[36];let K;e[37]!==G?(K=b.jsx(X1,{children:G}),e[37]=G,e[38]=K):K=e[38];let Y;e[39]!==A||e[40]!==F||e[41]!==H||e[42]!==K?(Y=b.jsxs(br,{collisionDetection:il,sensors:F,onDragEnd:I,onDragOver:A,onDragStart:M,children:[H,K]}),e[39]=A,e[40]=F,e[41]=H,e[42]=K,e[43]=Y):Y=e[43];let Q;return e[44]!==_||e[45]!==Y?(Q=b.jsx(sa.Provider,{value:_,children:Y}),e[44]=_,e[45]=Y,e[46]=Q):Q=e[46],Q},ex=t=>{const e=T.compilerRuntimeExports.c(48);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,disabled:l,id:o,style:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,[c,d]=k.useState(!1),{registerCard:u,unregisterCard:f}=oa(),{columnId:m,disabled:h}=Jg(),p=h||a;let g,x;e[7]!==n||e[8]!==m||e[9]!==o||e[10]!==u||e[11]!==f?(g=()=>(u(o,m,n),()=>{f(o)}),x=[n,m,o,u,f],e[7]=n,e[8]=m,e[9]=o,e[10]=u,e[11]=f,e[12]=g,e[13]=x):(g=e[12],x=e[13]),k.useEffect(g,x);let v;e[14]!==p||e[15]!==o?(v={disabled:p,id:o},e[14]=p,e[15]=o,e[16]=v):v=e[16];const{attributes:y,isDragging:w,listeners:C,setActivatorNodeRef:O,setNodeRef:S,transform:E,transition:R}=zs(v);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{d(!0)},e[17]=N):N=e[17];const j=N,D=w?.5:1;let P;e[18]!==E?(P=at.Transform.toString(E),e[18]=E,e[19]=P):P=e[19];let M;e[20]!==i||e[21]!==D||e[22]!==P||e[23]!==R?(M={opacity:D,transform:P,transition:R,...i},e[20]=i,e[21]=D,e[22]=P,e[23]=R,e[24]=M):M=e[24];const z=M;let A;e[25]!==y||e[26]!==p||e[27]!==w||e[28]!==C||e[29]!==O?(A={attributes:y,disabled:p,isDragging:w,listeners:C,registerHandle:j,setActivatorNodeRef:O},e[25]=y,e[26]=p,e[27]=w,e[28]=C,e[29]=O,e[30]=A):A=e[30];const $=A;let I;e[31]!==y||e[32]!==c||e[33]!==C?(I=c?{}:{...y,...C},e[31]=y,e[32]=c,e[33]=C,e[34]=I):I=e[34];const V=I;let _;e[35]!==r?(_=L("rounded-md bg-background p-3 shadow-sm",r),e[35]=r,e[36]=_):_=e[36];const F=w?"dragging":void 0;let W;e[37]!==z||e[38]!==n||e[39]!==s||e[40]!==V||e[41]!==S||e[42]!==_||e[43]!==F?(W=b.jsx("div",{className:_,"data-ox-slot":"kanban-card","data-ox-state":F,ref:S,style:z,...V,...s,children:n}),e[37]=z,e[38]=n,e[39]=s,e[40]=V,e[41]=S,e[42]=_,e[43]=F,e[44]=W):W=e[44];let B;return e[45]!==$||e[46]!==W?(B=b.jsx(na.Provider,{value:$,children:W}),e[45]=$,e[46]=W,e[47]=B):B=e[47],B},tx=t=>{const e=T.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{attributes:o,disabled:i,listeners:l,registerHandle:a,setActivatorNodeRef:c}=Qg();let d,u;e[4]!==a?(d=()=>{a()},u=[a],e[4]=a,e[5]=d,e[6]=u):(d=e[5],u=e[6]),k.useEffect(d,u);let f;e[7]!==r||e[8]!==i?(f=L("flex cursor-grab touch-none items-center justify-center",{"cursor-not-allowed opacity-50":i},r),e[7]=r,e[8]=i,e[9]=f):f=e[9];let m;e[10]!==n?(m=n??b.jsx(le.GripVertical,{className:"size-4 text-muted-foreground"}),e[10]=n,e[11]=m):m=e[11];let h;return e[12]!==o||e[13]!==i||e[14]!==s||e[15]!==l||e[16]!==c||e[17]!==f||e[18]!==m?(h=b.jsx("button",{"aria-label":"Drag to reorder",className:f,disabled:i,ref:c,type:"button",...o,...l,...s,"data-ox-slot":"kanban-card-handle",children:m}),e[12]=o,e[13]=i,e[14]=s,e[15]=l,e[16]=c,e[17]=f,e[18]=m,e[19]=h):h=e[19],h},ia=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mt-3",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"kanban-column-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},la=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mb-3 font-medium",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"kanban-column-header",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},nx=t=>{const e=T.compilerRuntimeExports.c(53);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,disabled:c,emptyState:o,gap:d,heading:i,id:l,style:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=c===void 0?!1:c,f=d===void 0?8:d,{columnCardIdsMap:m,disabled:h}=oa(),p=h||u;let g;e[10]!==l?(g={id:l},e[10]=l,e[11]=g):g=e[11];const{isOver:x,setNodeRef:v}=Rs(g);let y;e[12]!==n?(y={cards:[],footer:null,header:null},k.Children.forEach(n,W=>{k.isValidElement(W)&&(W.type===la?y.header=W:W.type===ia?y.footer=W:y.cards.push(W))}),e[12]=n,e[13]=y):y=e[13];const{cards:w,footer:C,header:O}=y;let S;if(e[14]!==w){S=[];for(const W of w){const B=W.props;B.id&&S.push(B.id)}e[14]=w,e[15]=S}else S=e[15];const E=S;let R;e[16]!==m.current||e[17]!==l||e[18]!==E?(R=()=>{const W=m.current;return W.set(l,E),()=>{W.delete(l)}},e[16]=m.current,e[17]=l,e[18]=E,e[19]=R):R=e[19];let N;e[20]!==m||e[21]!==l||e[22]!==E?(N=[l,E,m],e[20]=m,e[21]=l,e[22]=E,e[23]=N):N=e[23],k.useEffect(R,N);let j;e[24]!==p||e[25]!==l?(j={columnId:l,disabled:p},e[24]=p,e[25]=l,e[26]=j):j=e[26];const D=j;let P;e[27]!==r||e[28]!==x?(P=L("flex min-w-64 flex-col rounded-lg bg-muted/50 p-3",{"ring-2 ring-primary":x},r),e[27]=r,e[28]=x,e[29]=P):P=e[29];const M=x?"over":void 0;let z;e[30]!==O||e[31]!==i?(z=O??(i&&b.jsx("div",{className:"mb-3 font-medium",children:i})),e[30]=O,e[31]=i,e[32]=z):z=e[32];let A;e[33]!==f?(A={gap:f},e[33]=f,e[34]=A):A=e[34];const $=w.length>0?w:o;let I;e[35]!==A||e[36]!==$?(I=b.jsx("div",{className:"flex flex-1 flex-col",style:A,children:$}),e[35]=A,e[36]=$,e[37]=I):I=e[37];let V;e[38]!==E||e[39]!==I?(V=b.jsx(Ls,{items:E,strategy:$s,children:I}),e[38]=E,e[39]=I,e[40]=V):V=e[40];let _;e[41]!==s||e[42]!==C||e[43]!==v||e[44]!==a||e[45]!==V||e[46]!==P||e[47]!==M||e[48]!==z?(_=b.jsxs("div",{className:P,ref:v,style:a,...s,"data-ox-slot":"kanban-column","data-ox-state":M,children:[z,V,C]}),e[41]=s,e[42]=C,e[43]=v,e[44]=a,e[45]=V,e[46]=P,e[47]=M,e[48]=z,e[49]=_):_=e[49];let F;return e[50]!==D||e[51]!==_?(F=b.jsx(ra.Provider,{value:D,children:_}),e[50]=D,e[51]=_,e[52]=F):F=e[52],F},rx=Object.assign(Zg,{Card:ex,CardHandle:tx,Column:nx,ColumnFooter:ia,ColumnHeader:la}),sx=dt("OxLink","a"),ox=t=>{const e=T.compilerRuntimeExports.c(26);let n,r,s,o,i,l,a,c;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,size:a,variant:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=i===void 0?!1:i,u=l===void 0?!1:l,f=a===void 0?"md":a,m=c===void 0?"primary":c;let h;e[9]!==r||e[10]!==f||e[11]!==m?(h=L(Cd({variant:m,size:f}),r),e[9]=r,e[10]=f,e[11]=m,e[12]=h):h=e[12];const p=h,g=u||void 0,x=u?void 0:o,v=u?-1:void 0,y=u?ix:void 0;let w;e[13]!==p||e[14]!==s||e[15]!==g||e[16]!==x||e[17]!==v||e[18]!==y?(w={"aria-disabled":g,href:x,tabIndex:v,onClick:y,className:p,...s,"data-ox-slot":"link"},e[13]=p,e[14]=s,e[15]=g,e[16]=x,e[17]=v,e[18]=y,e[19]=w):w=e[19];const C=w;if(d){let S;return e[20]!==n||e[21]!==C?(S=b.jsx(sx,{...C,children:n}),e[20]=n,e[21]=C,e[22]=S):S=e[22],S}let O;return e[23]!==n||e[24]!==C?(O=b.jsx("a",{...C,children:n}),e[23]=n,e[24]=C,e[25]=O):O=e[25],O};function ix(t){return t.preventDefault()}const lx=t=>{const e=T.compilerRuntimeExports.c(9),{children:n,className:r,columns:s,gap:o}=t,i=o===void 0?16:o,l=k.useRef(null);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const c=k.useRef(a),d=k.Children.toArray(n),{containerHeight:u,positions:f}=T.useMasonry(l,c,s,i,d.length);let m;e[1]!==r?(m=L("relative",r),e[1]=r,e[2]=m):m=e[2];const h="masonry",p="list",g=u||void 0;let x;e[3]!==g?(x={height:g},e[3]=g,e[4]=x):x=e[4];const v=d.map((w,C)=>{const O=f[C],S=O!==void 0,E=k.isValidElement(w)?w.key:C;return b.jsx("div",{"data-index":C,ref:R=>{c.current[C]=R},role:"listitem",style:{position:"absolute",transform:S?`translate(${O.x}px, ${O.y}px)`:void 0,visibility:S?"visible":"hidden",width:S?O.width:void 0},children:w},E??C)});let y;return e[5]!==m||e[6]!==x||e[7]!==v?(y=b.jsx("div",{className:m,"data-ox-slot":h,ref:l,role:p,style:x,children:v}),e[5]=m,e[6]=x,e[7]=v,e[8]=y):y=e[8],y},aa=k.createContext(null),ax={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"},cx=t=>{const e=T.compilerRuntimeExports.c(59);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,closeOnOutsideClick:l,isOpen:o,onClose:i,persistent:a,showCloseButton:c,size:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=l===void 0?!0:l,f=a===void 0?!1:a,m=c===void 0?!0:c,h=d===void 0?"sm":d,p=k.useId(),g=k.useId(),x=k.useRef(null),[v,y]=k.useState(!1);let w;e[10]!==i?(w=Q=>Q?void 0:i?.(),e[10]=i,e[11]=w):w=e[11];let C;e[12]!==o||e[13]!==w?(C={value:o,onChange:w,defaultValue:!1,name:"OxDialog"},e[12]=o,e[13]=w,e[14]=C):C=e[14];const[O,S]=T.useControllableState(C),E=v&&O;let R;e[15]!==E?(R={containerRef:x,options:{enabled:E,restoreFocus:!0,trapFocus:!0,autoFocus:!0}},e[15]=E,e[16]=R):R=e[16],T.useFocus(R);let N;e[17]!==S?(N=()=>S(!1),e[17]=S,e[18]=N):N=e[18];let j;e[19]!==g||e[20]!==f||e[21]!==m||e[22]!==N||e[23]!==p?(j={onClose:N,titleId:p,bodyId:g,persistent:f,showCloseButton:m},e[19]=g,e[20]=f,e[21]=m,e[22]=N,e[23]=p,e[24]=j):j=e[24];const D=j;let P;e[25]!==O||e[26]!==v?(P=Q=>{Q.target===x.current&&!O&&v&&(y(!1),x.current?.close())},e[25]=O,e[26]=v,e[27]=P):P=e[27];const M=P;let z;e[28]!==O||e[29]!==f||e[30]!==S?(z=()=>{f&&O?x.current?.showModal():f||S(!1)},e[28]=O,e[29]=f,e[30]=S,e[31]=z):z=e[31];const A=z;let $,I;e[32]!==O?($=()=>{O&&y(!0)},I=[O],e[32]=O,e[33]=$,e[34]=I):($=e[33],I=e[34]),k.useEffect($,I);let V,_;e[35]!==O||e[36]!==v?(V=()=>{const Q=x.current;if(!(!Q||!v))return O&&(document.body.classList.add("overflow-hidden"),Q.showModal()),dx},_=[O,v],e[35]=O,e[36]=v,e[37]=V,e[38]=_):(V=e[37],_=e[38]),k.useEffect(V,_);let F,W;if(e[39]!==u||e[40]!==A||e[41]!==f||e[42]!==v?(F=()=>{const Q=x.current;if(!Q||!v)return;const X=q=>{q.key==="Escape"&&f&&(q.preventDefault(),q.stopPropagation())},U=q=>{q.preventDefault(),A()},J=q=>{u&&q.target===Q&&A()};return document.addEventListener("keydown",X),Q.addEventListener("cancel",U),Q.addEventListener("click",J),Q.addEventListener("close",A),()=>{document.removeEventListener("keydown",X),Q.removeEventListener("cancel",U),Q.removeEventListener("click",J),Q.removeEventListener("close",A)}},W=[v,u,A,f],e[39]=u,e[40]=A,e[41]=f,e[42]=v,e[43]=F,e[44]=W):(F=e[43],W=e[44]),k.useEffect(F,W),!v)return null;const B=ax[h];let H;e[45]!==r||e[46]!==B?(H=L("fixed inset-0 m-auto grid h-fit w-full gap-4 rounded-lg border bg-background p-6 text-foreground shadow-lg","ox-dialog-animation ox-dialog-backdrop","max-w-[calc(100%-2rem)]",B,r),e[45]=r,e[46]=B,e[47]=H):H=e[47];const G=O?"open":"closing";let K;e[48]!==n||e[49]!==D?(K=b.jsx(aa.Provider,{value:D,children:n}),e[48]=n,e[49]=D,e[50]=K):K=e[50];let Y;return e[51]!==g||e[52]!==s||e[53]!==M||e[54]!==H||e[55]!==G||e[56]!==K||e[57]!==p?(Y=it.createPortal(b.jsx("dialog",{"aria-describedby":g,"aria-labelledby":p,className:H,ref:x,role:"dialog",onAnimationEnd:M,...s,"data-ox-slot":"dialog","data-ox-state":G,children:K}),document.body),e[51]=g,e[52]=s,e[53]=M,e[54]=H,e[55]=G,e[56]=K,e[57]=p,e[58]=Y):Y=e[58],Y};function dx(){document.body.classList.remove("overflow-hidden")}const ca=()=>{const t=k.useContext(aa);if(!t)throw new Error("Dialog sub-components must be used within OxDialog");return t},ux=t=>{const e=T.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{bodyId:o}=ca();let i;e[4]!==r?(i=L("text-sm",r),e[4]=r,e[5]=i):i=e[5];let l;return e[6]!==o||e[7]!==n||e[8]!==s||e[9]!==i?(l=b.jsx("div",{id:o,className:i,...s,"data-ox-slot":"dialog-body",children:n}),e[6]=o,e[7]=n,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},fx=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("flex flex-col-reverse gap-2","sm:flex-row sm:justify-end",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"dialog-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},mx=t=>{const e=T.compilerRuntimeExports.c(17);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{onClose:o,persistent:i,showCloseButton:l,titleId:a}=ca(),c=l&&!i;let d;e[4]!==r?(d=L("flex flex-col gap-2 text-center sm:text-left",r),e[4]=r,e[5]=d):d=e[5];let u;e[6]!==n||e[7]!==s||e[8]!==d||e[9]!==a?(u=b.jsx("div",{id:a,className:d,...s,"data-ox-slot":"dialog-header",children:n}),e[6]=n,e[7]=s,e[8]=d,e[9]=a,e[10]=u):u=e[10];let f;e[11]!==o||e[12]!==c?(f=c?b.jsx(Je,{"aria-label":"Close Dialog",className:"absolute top-4 right-4",variant:"ghost",onClick:o,children:b.jsx(ue,{icon:le.X})}):null,e[11]=o,e[12]=c,e[13]=f):f=e[13];let m;return e[14]!==u||e[15]!==f?(m=b.jsxs(b.Fragment,{children:[u,f]}),e[14]=u,e[15]=f,e[16]=m):m=e[16],m},px=Object.assign(cx,{Body:ux,Footer:fx,Header:mx}),da=640,hn=k.createContext(null),Sr=()=>{const t=k.useContext(hn);if(!t)throw new Error("useNotificationsContext must be used within a NotificationsContext.Provider");return t},ua=t=>{const e=T.compilerRuntimeExports.c(43);let n,r,s,o,i,l,a,c,d,u,f;e[0]!==t?({children:n,className:r,icon:o,img:i,message:l,path:a,timestamp:u,title:f,type:c,unread:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11]);const m=c===void 0?"default":c,h=d===void 0?!1:d,{isMobile:p,onItemClick:g,setOpen:x}=Sr(),v=rt[m].icon;let y;e[12]!==o||e[13]!==i||e[14]!==p||e[15]!==l||e[16]!==g||e[17]!==x||e[18]!==u||e[19]!==f||e[20]!==m||e[21]!==h?(y=()=>{const N={id:crypto.randomUUID(),icon:o,img:i,message:l,read:!h,timestamp:u||new Date,title:f||"",type:m};g?.(N),p&&x(!1)},e[12]=o,e[13]=i,e[14]=p,e[15]=l,e[16]=g,e[17]=x,e[18]=u,e[19]=f,e[20]=m,e[21]=h,e[22]=y):y=e[22];const w=y;let C;e[23]!==n||e[24]!==o||e[25]!==i||e[26]!==l||e[27]!==a||e[28]!==v||e[29]!==u||e[30]!==f||e[31]!==m||e[32]!==h?(C=n||b.jsxs(b.Fragment,{children:[i?b.jsx(ps,{alt:"User avatar",className:"mt-0.5","data-ox-slot":"notifications-icon",fallback:"NA",size:"sm",src:i}):b.jsx(ue.Box,{className:"mt-0.5",color:m,size:"md",children:b.jsx(ue,{icon:o??v,path:a})}),b.jsxs("div",{className:"min-w-0 flex-1","data-ox-slot":"notifications-content",children:[f&&b.jsx("h5",{className:"mb-1 text-sm leading-tight font-semibold text-pretty text-foreground",children:f}),l&&b.jsx("p",{className:"mb-1 text-xs leading-4",children:l}),u&&b.jsx("p",{className:"text-xs text-muted-foreground",children:ds(u)})]}),h&&b.jsx("div",{className:"mt-1.5 size-2 shrink-0 rounded-full bg-destructive","data-ox-slot":"notifications-unread"})]}),e[23]=n,e[24]=o,e[25]=i,e[26]=l,e[27]=a,e[28]=v,e[29]=u,e[30]=f,e[31]=m,e[32]=h,e[33]=C):C=e[33];const O=C;let S;e[34]!==r||e[35]!==h?(S=L("col-span-3 grid cursor-pointer grid-cols-subgrid items-start gap-3 p-3 text-left","ox-focus-ring hover:bg-neutral-accent/60",{"bg-neutral-accent/40":h},r),e[34]=r,e[35]=h,e[36]=S):S=e[36];const E=h?"unread":"read";let R;return e[37]!==s||e[38]!==w||e[39]!==O||e[40]!==S||e[41]!==E?(R=b.jsx("li",{className:"contents",children:b.jsx("button",{className:S,"data-ox-slot":"notifications-button",...s,"data-ox-state":E,onClick:w,children:O})}),e[37]=s,e[38]=w,e[39]=O,e[40]=S,e[41]=E,e[42]=R):R=e[42],R},ti=L("grid min-h-0 flex-1 auto-rows-min grid-cols-[auto_1fr_auto] overflow-y-auto",'[&_[data-ox-slot="notifications-icon"]]:col-start-1 [&_[data-ox-slot="notifications-icon"]]:justify-self-center','[&_[data-ox-slot="notifications-content"]]:cols-start-2','[&_[data-ox-slot="notifications-unread"]]:col-start-3 [&_[data-ox-slot="notifications-unread"]]:justify-self-end'),dr=t=>{const e=T.compilerRuntimeExports.c(52);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{emptyMessage:o,isMobile:i,items:l,onMarkAllRead:a,setOpen:c,unreadCount:d}=Sr(),u=l.length>0,f=d>0;let m;e[4]!==i||e[5]!==a||e[6]!==c?(m=()=>{a?.(),i&&c(!1)},e[4]=i,e[5]=a,e[6]=c,e[7]=m):m=e[7];const h=m;let p;e[8]!==n||e[9]!==o||e[10]!==u||e[11]!==l?(p=n||b.jsx(b.Fragment,{children:u?l.map(hx):b.jsxs("li",{className:"col-span-3 px-3 py-8 text-center",role:"status",children:[b.jsx(ue,{className:"mx-auto mb-2 opacity-50",icon:le.Bell,size:"3xl"}),b.jsx("p",{className:"text-sm opacity-50",children:o})]})}),e[8]=n,e[9]=o,e[10]=u,e[11]=l,e[12]=p):p=e[12];const g=p;if(i){let S;e[13]!==c?(S=()=>c(!1),e[13]=c,e[14]=S):S=e[14];let E;e[15]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx(ue,{icon:le.X}),e[15]=E):E=e[15];let R;e[16]!==S?(R=b.jsx(Je,{"aria-label":"Close notifications",variant:"ghost",onClick:S,children:E}),e[16]=S,e[17]=R):R=e[17];let N;e[18]===Symbol.for("react.memo_cache_sentinel")?(N=b.jsx("h5",{className:"text-sm font-semibold text-foreground",children:"Notifications"}),e[18]=N):N=e[18];let j;e[19]!==h||e[20]!==f||e[21]!==a?(j=f&&a&&b.jsx("button",{className:"cursor-pointer text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:h,children:"Mark all read"}),e[19]=h,e[20]=f,e[21]=a,e[22]=j):j=e[22];let D;e[23]!==j?(D=b.jsx("div",{className:"flex items-center gap-2",children:j}),e[23]=j,e[24]=D):D=e[24];let P;e[25]!==R||e[26]!==D?(P=b.jsxs("div",{className:"flex h-15 items-center justify-between border-b border-border px-4",children:[R,N,D]}),e[25]=R,e[26]=D,e[27]=P):P=e[27];let M;e[28]!==r?(M=L(ti,r),e[28]=r,e[29]=M):M=e[29];let z;e[30]!==s||e[31]!==g||e[32]!==M?(z=b.jsx("ul",{className:M,"data-ox-slot":"notifications-body",...s,children:g}),e[30]=s,e[31]=g,e[32]=M,e[33]=z):z=e[33];let A;return e[34]!==z||e[35]!==P?(A=b.jsxs(nr.Content,{closeOnOutsideClick:!0,side:"right",children:[P,z]}),e[34]=z,e[35]=P,e[36]=A):A=e[36],A}let x;e[37]===Symbol.for("react.memo_cache_sentinel")?(x=b.jsx("h5",{className:"text-sm font-semibold text-foreground",children:"Notifications"}),e[37]=x):x=e[37];let v;e[38]!==f||e[39]!==a?(v=f&&a&&b.jsx("button",{className:"ox-focus-ring cursor-pointer rounded-lg p-1 text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:a,children:"Mark all read"}),e[38]=f,e[39]=a,e[40]=v):v=e[40];let y;e[41]!==v?(y=b.jsx(Qt.Header,{className:"p-2",children:b.jsxs("div",{className:"flex items-center justify-between",children:[x,v]})}),e[41]=v,e[42]=y):y=e[42];let w;e[43]!==r?(w=L("w-85",ti,r),e[43]=r,e[44]=w):w=e[44];let C;e[45]!==s||e[46]!==g||e[47]!==w?(C=b.jsx("ul",{className:w,"data-ox-slot":"notifications-body",...s,children:g}),e[45]=s,e[46]=g,e[47]=w,e[48]=C):C=e[48];let O;return e[49]!==y||e[50]!==C?(O=b.jsxs(Qt.Content,{className:"p-0",children:[y,C]}),e[49]=y,e[50]=C,e[51]=O):O=e[51],O};function hx(t,e){return b.jsx(ua,{className:L({"border-t border-border":e>0}),icon:t.icon,img:t.img,message:t.message,path:t.path,timestamp:t.timestamp,title:t.title,type:t.type,unread:!t.read},t.id)}const ur=t=>{const e=T.compilerRuntimeExports.c(44);let n,r,s,o,i;e[0]!==t?({children:n,className:r,customIcon:s,unreadCount:i,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const{disabled:l,isMobile:a,open:c,setOpen:d,unreadCount:u}=Sr(),f=i??u,m=f>0,h=s??le.Bell,p=`Notifications${m?` (${f} unread)`:""}`;if(a){let O;e[6]!==l?(O=L({"opacity-50":l}),e[6]=l,e[7]=O):O=e[7];const S=c?"open":"closed";let E;e[8]!==d?(E=()=>d(!0),e[8]=d,e[9]=E):E=e[9];let R;e[10]!==n||e[11]!==h?(R=n||b.jsx(ue,{icon:h,size:"md"}),e[10]=n,e[11]=h,e[12]=R):R=e[12];let N;e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==o||e[17]!==S||e[18]!==E||e[19]!==R?(N=b.jsx(Je,{"aria-label":p,className:r,disabled:l,variant:"ghost",...o,"data-ox-state":S,onClick:E,children:R}),e[13]=p,e[14]=r,e[15]=l,e[16]=o,e[17]=S,e[18]=E,e[19]=R,e[20]=N):N=e[20];let j;return e[21]!==O||e[22]!==N||e[23]!==f?(j=b.jsx(Qr,{className:O,count:f,variant:"primary",children:N}),e[21]=O,e[22]=N,e[23]=f,e[24]=j):j=e[24],j}let g;e[25]!==l?(g=L({"opacity-50":l}),e[25]=l,e[26]=g):g=e[26];let x;e[27]!==r||e[28]!==c?(x=L("flex h-10 min-w-10 items-center justify-center rounded-lg border border-transparent bg-transparent px-2 text-sm","ox-focus-ring enabled:cursor-pointer enabled:text-foreground enabled:hover:bg-neutral-accent disabled:ox-default-disabled",{"bg-neutral-accent":c},r),e[27]=r,e[28]=c,e[29]=x):x=e[29];const v=c?"open":"closed";let y;e[30]!==n||e[31]!==h?(y=n||b.jsx(ue,{icon:h,size:"md"}),e[30]=n,e[31]=h,e[32]=y):y=e[32];let w;e[33]!==p||e[34]!==l||e[35]!==o||e[36]!==x||e[37]!==v||e[38]!==y?(w=b.jsx(Qt.Trigger,{"aria-label":p,className:x,"data-ox-slot":"notifications-trigger",disabled:l,hideIcon:!0,...o,"data-ox-state":v,children:y}),e[33]=p,e[34]=l,e[35]=o,e[36]=x,e[37]=v,e[38]=y,e[39]=w):w=e[39];let C;return e[40]!==g||e[41]!==w||e[42]!==f?(C=b.jsx(Qr,{className:g,count:f,variant:"primary",children:w}),e[40]=g,e[41]=w,e[42]=f,e[43]=C):C=e[43],C},gx=t=>{const e=T.compilerRuntimeExports.c(68);let n,r,s,o,i,l,a,c;e[0]!==t?({children:n,disabled:i,emptyMessage:l,items:a,onItemClick:s,onMarkAllRead:o,unreadCount:c,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=i===void 0?!1:i,u=l===void 0?"No notifications":l;let f;e[9]!==a?(f=a===void 0?[]:a,e[9]=a,e[10]=f):f=e[10];const m=f,h=c===void 0?0:c,[p,g]=k.useState(!1),[x,v]=k.useState(!1);let y,w;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const D=()=>{v(window.innerWidth<da)};return D(),window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},w=[],e[11]=y,e[12]=w):(y=e[11],w=e[12]),k.useEffect(y,w);let C;e[13]!==d||e[14]!==u||e[15]!==x||e[16]!==m||e[17]!==s||e[18]!==o||e[19]!==p||e[20]!==h?(C={disabled:d,emptyMessage:u,isMobile:x,items:m,open:p,setOpen:g,unreadCount:h,onItemClick:s,onMarkAllRead:o},e[13]=d,e[14]=u,e[15]=x,e[16]=m,e[17]=s,e[18]=o,e[19]=p,e[20]=h,e[21]=C):C=e[21];const O=C;if(n){let D;e[22]!==n?(D=k.Children.toArray(n).find(xx),e[22]=n,e[23]=D):D=e[23];const P=D;let M;e[24]!==n?(M=k.Children.toArray(n).find(bx),e[24]=n,e[25]=M):M=e[25];const z=M;if(x){let V;e[26]!==z||e[27]!==p?(V=b.jsx(nr,{open:p,onOpenChange:g,children:z}),e[26]=z,e[27]=p,e[28]=V):V=e[28];let _;e[29]!==r||e[30]!==V||e[31]!==P?(_=b.jsxs("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"mobile",children:[P,V]}),e[29]=r,e[30]=V,e[31]=P,e[32]=_):_=e[32];let F;return e[33]!==O||e[34]!==_?(F=b.jsx(hn.Provider,{value:O,children:_}),e[33]=O,e[34]=_,e[35]=F):F=e[35],F}let A;e[36]!==z||e[37]!==d||e[38]!==p||e[39]!==P?(A=b.jsxs(Qt,{align:"end",disabled:d,open:p,side:"bottom",onOpenChange:g,children:[P,z]}),e[36]=z,e[37]=d,e[38]=p,e[39]=P,e[40]=A):A=e[40];let $;e[41]!==r||e[42]!==A?($=b.jsx("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"desktop",children:A}),e[41]=r,e[42]=A,e[43]=$):$=e[43];let I;return e[44]!==O||e[45]!==$?(I=b.jsx(hn.Provider,{value:O,children:$}),e[44]=O,e[45]=$,e[46]=I):I=e[46],I}if(x){let D;e[47]===Symbol.for("react.memo_cache_sentinel")?(D=b.jsx(ur,{}),e[47]=D):D=e[47];let P;e[48]===Symbol.for("react.memo_cache_sentinel")?(P=b.jsx(dr,{}),e[48]=P):P=e[48];let M;e[49]!==p?(M=b.jsx(nr,{open:p,onOpenChange:g,children:P}),e[49]=p,e[50]=M):M=e[50];let z;e[51]!==r||e[52]!==M?(z=b.jsxs("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"mobile",children:[D,M]}),e[51]=r,e[52]=M,e[53]=z):z=e[53];let A;return e[54]!==O||e[55]!==z?(A=b.jsx(hn.Provider,{value:O,children:z}),e[54]=O,e[55]=z,e[56]=A):A=e[56],A}let S,E;e[57]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx(ur,{}),S=b.jsx(dr,{}),e[57]=S,e[58]=E):(S=e[57],E=e[58]);let R;e[59]!==d||e[60]!==p?(R=b.jsxs(Qt,{align:"end",disabled:d,open:p,side:"bottom",onOpenChange:g,children:[E,S]}),e[59]=d,e[60]=p,e[61]=R):R=e[61];let N;e[62]!==r||e[63]!==R?(N=b.jsx("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"desktop",children:R}),e[62]=r,e[63]=R,e[64]=N):N=e[64];let j;return e[65]!==O||e[66]!==N?(j=b.jsx(hn.Provider,{value:O,children:N}),e[65]=O,e[66]=N,e[67]=j):j=e[67],j};function xx(t){return k.isValidElement(t)&&t.type===ur}function bx(t){return k.isValidElement(t)&&t.type===dr}const vx=t=>{const e=T.compilerRuntimeExports.c(45);let n,r,s,o,i,l,a,c,d,u,f,m;e[0]!==t?({children:n,className:r,href:o,icon:i,img:l,message:a,path:c,timestamp:f,title:m,type:d,unread:u,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12]);const h=d===void 0?"default":d,p=u===void 0?!1:u,{isMobile:g,onItemClick:x,setOpen:v}=Sr(),y=rt[h].icon;let w;e[13]!==i||e[14]!==l||e[15]!==g||e[16]!==a||e[17]!==x||e[18]!==v||e[19]!==f||e[20]!==m||e[21]!==h||e[22]!==p?(w=()=>{const j={id:crypto.randomUUID(),icon:i,img:l,message:a,read:!p,timestamp:f||new Date,title:m||"",type:h};x?.(j),g&&v(!1)},e[13]=i,e[14]=l,e[15]=g,e[16]=a,e[17]=x,e[18]=v,e[19]=f,e[20]=m,e[21]=h,e[22]=p,e[23]=w):w=e[23];const C=w;let O;e[24]!==n||e[25]!==i||e[26]!==l||e[27]!==a||e[28]!==c||e[29]!==y||e[30]!==f||e[31]!==m||e[32]!==h||e[33]!==p?(O=n||b.jsxs(b.Fragment,{children:[l?b.jsx(ps,{alt:"User avatar",className:"mt-0.5","data-ox-slot":"notifications-icon",fallback:"NA",size:"md",src:l}):b.jsx(ue.Box,{className:"mt-0.5",color:h,"data-ox-slot":"notifications-icon",size:"md",children:b.jsx(ue,{icon:i??y,path:c})}),b.jsxs("div",{className:"min-w-0 flex-1","data-ox-slot":"notifications-content",children:[m&&b.jsx("h5",{className:"mb-1 text-sm leading-tight font-semibold text-pretty text-foreground",children:m}),a&&b.jsx("p",{className:"mb-1 text-xs leading-4",children:a}),f&&b.jsx("p",{className:"text-xs text-muted-foreground",children:ds(f)})]}),p&&b.jsx("div",{className:"mt-1.5 size-2 shrink-0 rounded-full bg-destructive","data-ox-slot":"notifications-unread"})]}),e[24]=n,e[25]=i,e[26]=l,e[27]=a,e[28]=c,e[29]=y,e[30]=f,e[31]=m,e[32]=h,e[33]=p,e[34]=O):O=e[34];const S=O;let E;e[35]!==r||e[36]!==p?(E=L("col-span-3 grid cursor-pointer grid-cols-subgrid items-start gap-3 p-3 text-left","ox-focus-ring hover:bg-neutral-accent/60",{"bg-neutral-accent/40":p},r),e[35]=r,e[36]=p,e[37]=E):E=e[37];const R=p?"unread":"read";let N;return e[38]!==s||e[39]!==C||e[40]!==o||e[41]!==S||e[42]!==E||e[43]!==R?(N=b.jsx("li",{className:"contents",children:b.jsx("a",{className:E,"data-ox-slot":"notifications-link",href:o,...s,"data-ox-state":R,onClick:C,children:S})}),e[38]=s,e[39]=C,e[40]=o,e[41]=S,e[42]=E,e[43]=R,e[44]=N):N=e[44],N},yx=Object.assign(gx,{Body:dr,Button:ua,Link:vx,Trigger:ur}),fa=k.createContext(void 0),ma=()=>{const t=k.useContext(fa);if(!t)throw new Error("PageOutline components must be used within an OxPageOutline");return t},wx=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o;e[0]!==t?({children:n,className:r,scrollOffset:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o===void 0?0:o;let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=new Map,e[5]=l):l=e[5];const a=k.useRef(l),c=k.useRef(null);let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[6]=d):d=e[6];const[u,f]=k.useState(d),{activeId:m,setActiveId:h}=T.useScrollSpy(u);let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=(D,P)=>{a.current.set(D,P),f(M=>M.includes(D)?M:[...M,D])},e[7]=p):p=e[7];const g=p;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=D=>{a.current.delete(D),f(P=>P.filter(M=>M!==D))},e[8]=x):x=e[8];const v=x;let y;e[9]!==i||e[10]!==h?(y=D=>{const P=D.replace("#","");h(P),Ni(`#${P}`,{behavior:"smooth",offset:i}).catch(Cx)},e[9]=i,e[10]=h,e[11]=y):y=e[11];const w=y;let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=D=>{c.current=D},e[12]=C):C=e[12];const O=C;let S;e[13]!==m||e[14]!==w?(S={activeId:m,itemReferences:a,registerItem:g,scrollToSection:w,setContentRef:O,unregisterItem:v},e[13]=m,e[14]=w,e[15]=S):S=e[15];const E=S;let R;e[16]!==r?(R=L(r),e[16]=r,e[17]=R):R=e[17];let N;e[18]!==n||e[19]!==s||e[20]!==R?(N=b.jsx("nav",{className:R,"data-ox-slot":"page-outline",...s,children:n}),e[18]=n,e[19]=s,e[20]=R,e[21]=N):N=e[21];let j;return e[22]!==E||e[23]!==N?(j=b.jsx(fa.Provider,{value:E,children:N}),e[22]=E,e[23]=N,e[24]=j):j=e[24],j};function Cx(t){console.error("Failed to scroll to element:",t)}const Ox=t=>{const e=T.compilerRuntimeExports.c(21);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{activeId:o,itemReferences:i,setContentRef:l}=ma(),a=k.useRef(null);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={height:0,opacity:0,top:0},e[4]=c):c=e[4];const[d,u]=k.useState(c),f=k.useRef("");let m,h;e[5]!==l?(m=()=>{a.current&&l(a.current)},h=[l],e[5]=l,e[6]=m,e[7]=h):(m=e[6],h=e[7]),k.useLayoutEffect(m,h);let p,g;e[8]!==o||e[9]!==i?(p=()=>{if(f.current===o)return;if(f.current=o,!o||!a.current){u({height:0,opacity:0,top:0});return}const w=i.current.get(o);if(!w){u({height:0,opacity:0,top:0});return}const C=a.current.getBoundingClientRect(),O=w.getBoundingClientRect();u({height:O.height,opacity:1,top:O.top-C.top})},g=[o,i],e[8]=o,e[9]=i,e[10]=p,e[11]=g):(p=e[10],g=e[11]),k.useLayoutEffect(p,g);let x;e[12]!==r?(x=L("relative border-l border-border",r),e[12]=r,e[13]=x):x=e[13];let v;e[14]!==d?(v=b.jsx("div",{className:"pointer-events-none absolute left-0 w-0.5 -translate-x-px rounded-full bg-primary transition-all duration-150 ease-out",style:d}),e[14]=d,e[15]=v):v=e[15];let y;return e[16]!==n||e[17]!==s||e[18]!==x||e[19]!==v?(y=b.jsxs("div",{className:x,"data-ox-slot":"page-outline-content",ref:a,...s,children:[v,n]}),e[16]=n,e[17]=s,e[18]=x,e[19]=v,e[20]=y):y=e[20],y},Ex=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mb-2 text-sm font-medium text-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,"data-ox-slot":"page-outline-header",...s,children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Sx={1:"pl-3",2:"pl-6",3:"pl-9"},kx=t=>{const e=T.compilerRuntimeExports.c(29);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,href:s,level:l,onClick:o,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?1:l,{activeId:c,registerItem:d,scrollToSection:u,unregisterItem:f}=ma(),m=k.useRef(null);let h;e[7]!==s?(h=s.startsWith("#")?s.slice(1):s,e[7]=s,e[8]=h):h=e[8];const p=h,g=c===p;let x,v;e[9]!==p||e[10]!==d||e[11]!==f?(x=()=>(m.current&&d(p,m.current),()=>f(p)),v=[p,d,f],e[9]=p,e[10]=d,e[11]=f,e[12]=x,e[13]=v):(x=e[12],v=e[13]),k.useEffect(x,v);let y;e[14]!==s||e[15]!==o||e[16]!==u?(y=N=>{N.preventDefault(),u(s),o?.(N)},e[14]=s,e[15]=o,e[16]=u,e[17]=y):y=e[17];const w=y,C=Sx[a],O=g&&"text-foreground";let S;e[18]!==r||e[19]!==C||e[20]!==O?(S=L("block py-1.5 text-sm","text-muted-foreground transition-colors duration-150 hover:text-foreground",C,O,r),e[18]=r,e[19]=C,e[20]=O,e[21]=S):S=e[21];const E=g?"active":"inactive";let R;return e[22]!==n||e[23]!==w||e[24]!==s||e[25]!==i||e[26]!==S||e[27]!==E?(R=b.jsx("a",{className:S,"data-ox-slot":"page-outline-item","data-ox-state":E,href:s,ref:m,onClick:w,...i,children:n}),e[22]=n,e[23]=w,e[24]=s,e[25]=i,e[26]=S,e[27]=E,e[28]=R):R=e[28],R},Rx=Object.assign(wx,{Content:Ox,Header:Ex,Item:kx}),Nx=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mx-auto flex w-full justify-center",r),e[4]=r,e[5]=o):o=e[5];let i;e[6]!==n?(i=b.jsx("ul",{className:"flex items-center gap-1",children:n}),e[6]=n,e[7]=i):i=e[7];let l;return e[8]!==s||e[9]!==o||e[10]!==i?(l=b.jsx("nav",{"aria-label":"pagination",className:o,role:"navigation",...s,"data-ox-slot":"pagination",children:i}),e[8]=s,e[9]=o,e[10]=i,e[11]=l):l=e[11],l},jx=t=>{const e=T.compilerRuntimeExports.c(10);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let s;e[3]!==n?(s=L(At({variant:"ghost",size:"md",iconOnly:!0}),"pointer-events-none",n),e[3]=n,e[4]=s):s=e[4];let o,i;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(ue,{icon:le.MoreHorizontal}),i=b.jsx("span",{className:"sr-only",children:"More pages"}),e[5]=o,e[6]=i):(o=e[5],i=e[6]);let l;return e[7]!==r||e[8]!==s?(l=b.jsxs("span",{"aria-hidden":"true",className:s,role:"presentation",...r,"data-ox-slot":"pagination-ellipsis",children:[o,i]}),e[7]=r,e[8]=s,e[9]=l):l=e[9],l},Dx=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L(r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("li",{className:o,...s,"data-ox-slot":"pagination-item",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Px=dt("OxPaginationLink","a"),Tx=t=>{const e=T.compilerRuntimeExports.c(27);let n,r,s,o,i,l,a;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,isActive:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const c=i===void 0?!1:i,d=l===void 0?!1:l,u=a===void 0?!1:a;let f;e[8]!==r||e[9]!==u?(f=L(At({variant:u?"default":"ghost",size:"md",iconOnly:!0}),r),e[8]=r,e[9]=u,e[10]=f):f=e[10];const m=f;let h;e[11]!==d||e[12]!==s?(h=C=>{if(d){C.preventDefault();return}s.onClick?.(C)},e[11]=d,e[12]=s,e[13]=h):h=e[13];const p=h,g=u?"page":void 0,x=d?!0:void 0;let v;e[14]!==m||e[15]!==s||e[16]!==p||e[17]!==o||e[18]!==g||e[19]!==x?(v={"aria-current":g,"aria-disabled":x,href:o,className:m,...s,onClick:p,"data-ox-slot":"pagination-link"},e[14]=m,e[15]=s,e[16]=p,e[17]=o,e[18]=g,e[19]=x,e[20]=v):v=e[20];const y=v;if(c){let C;return e[21]!==n||e[22]!==y?(C=b.jsx(Px,{...y,children:n}),e[21]=n,e[22]=y,e[23]=C):C=e[23],C}let w;return e[24]!==n||e[25]!==y?(w=b.jsx("a",{...y,children:n}),e[24]=n,e[25]=y,e[26]=w):w=e[26],w},Mx=dt("OxPaginationNext","a"),Ix=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=i===void 0?!1:i,c=l===void 0?!1:l,d=k.Children.count(n)>0;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"hidden sm:block",children:"Next"}),b.jsx(ue,{icon:le.ChevronRight})]}),e[7]=u):u=e[7];const m=d?n:u;let h;e[8]!==r?(h=L(At({variant:"ghost",size:"md"}),"size-9 p-0 sm:h-9 sm:w-auto sm:px-4",r),e[8]=r,e[9]=h):h=e[9];const p=h;let g;e[10]!==c||e[11]!==s?(g=O=>{if(c){O.preventDefault();return}s.onClick?.(O)},e[10]=c,e[11]=s,e[12]=g):g=e[12];const x=g,v=c?!0:void 0;let y;e[13]!==p||e[14]!==s||e[15]!==x||e[16]!==o||e[17]!==v?(y={"aria-label":"Go to next page","aria-disabled":v,href:o,className:p,...s,onClick:x,"data-ox-slot":"pagination-next"},e[13]=p,e[14]=s,e[15]=x,e[16]=o,e[17]=v,e[18]=y):y=e[18];const w=y;if(a){let O;return e[19]!==m||e[20]!==w?(O=b.jsx(Mx,{...w,children:m}),e[19]=m,e[20]=w,e[21]=O):O=e[21],O}let C;return e[22]!==m||e[23]!==w?(C=b.jsx("a",{...w,children:m}),e[22]=m,e[23]=w,e[24]=C):C=e[24],C},Ax=dt("OxPaginationPrevious","a"),_x=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=i===void 0?!1:i,c=l===void 0?!1:l,d=k.Children.count(n)>0;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsxs(b.Fragment,{children:[b.jsx(ue,{icon:le.ChevronLeft}),b.jsx("span",{className:"hidden sm:block",children:"Previous"})]}),e[7]=u):u=e[7];const m=d?n:u;let h;e[8]!==r?(h=L(At({variant:"ghost",size:"md"}),"size-9 p-0 sm:h-9 sm:w-auto sm:px-4",r),e[8]=r,e[9]=h):h=e[9];const p=h;let g;e[10]!==c||e[11]!==s?(g=O=>{if(c){O.preventDefault();return}s.onClick?.(O)},e[10]=c,e[11]=s,e[12]=g):g=e[12];const x=g,v=c?!0:void 0;let y;e[13]!==p||e[14]!==s||e[15]!==x||e[16]!==o||e[17]!==v?(y={"aria-label":"Go to previous page","aria-disabled":v,href:o,className:p,...s,onClick:x,"data-ox-slot":"pagination-previous"},e[13]=p,e[14]=s,e[15]=x,e[16]=o,e[17]=v,e[18]=y):y=e[18];const w=y;if(a){let O;return e[19]!==m||e[20]!==w?(O=b.jsx(Ax,{...w,children:m}),e[19]=m,e[20]=w,e[21]=O):O=e[21],O}let C;return e[22]!==m||e[23]!==w?(C=b.jsx("a",{...w,children:m}),e[22]=m,e[23]=w,e[24]=C):C=e[24],C},$x=Object.assign(Nx,{Ellipsis:jx,Item:Dx,Link:Tx,Next:Ix,Previous:_x}),pa=k.createContext(null),Lx=t=>{const e=T.compilerRuntimeExports.c(22),{align:n,children:r,closeOnOutsideClick:s,defaultOpen:o,disabled:i,onOpenChange:l,open:a,side:c}=t,d=n===void 0?"center":n,u=s===void 0?!0:s,f=o===void 0?!1:o,m=i===void 0?!1:i,h=c===void 0?"bottom":c;let p;e[0]!==u||e[1]!==a||e[2]!==f||e[3]!==m||e[4]!==l?(p={closeOnEscape:!0,closeOnOutsideClick:u,defaultOpen:f,disabled:m,onOpenChange:l,open:a},e[0]=u,e[1]=a,e[2]=f,e[3]=m,e[4]=l,e[5]=p):p=e[5];const{close:g,containerRef:x,isClosing:v,isVisible:y,open:w,toggle:C}=T.usePopperState(p);let O;e[6]!==d||e[7]!==g||e[8]!==v||e[9]!==y||e[10]!==w||e[11]!==h||e[12]!==C?(O={align:d,close:g,isClosing:v,isVisible:y,open:w,side:h,toggle:C},e[6]=d,e[7]=g,e[8]=v,e[9]=y,e[10]=w,e[11]=h,e[12]=C,e[13]=O):O=e[13];const S=O;let E;e[14]!==r?(E=b.jsx(ke,{children:r}),e[14]=r,e[15]=E):E=e[15];let R;e[16]!==x||e[17]!==E?(R=b.jsx("div",{"data-ox-slot":"popover",ref:x,children:E}),e[16]=x,e[17]=E,e[18]=R):R=e[18];let N;return e[19]!==S||e[20]!==R?(N=b.jsx(pa.Provider,{value:S,children:R}),e[19]=S,e[20]=R,e[21]=N):N=e[21],N},ha=()=>{const t=k.useContext(pa);if(!t)throw new Error("usePopoverContext must be used within OxPopover");return t},zx=t=>{const e=T.compilerRuntimeExports.c(23);let n,r,s,o;e[0]!==t?({children:n,className:r,showCloseButton:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o===void 0?!0:o,{align:l,close:a,isClosing:c,isVisible:d,side:u}=ha();if(!d)return null;let f;e[5]!==r?(f=L("ox-popover-animate relative max-w-sm min-w-64 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md",r),e[5]=r,e[6]=f):f=e[6];const m=c?"closing":"open";let h;e[7]!==a||e[8]!==i?(h=i&&b.jsx("div",{className:"absolute top-2 right-2",children:b.jsx(Je,{"aria-label":"Close popover",size:"sm",variant:"ghost",onClick:a,children:b.jsx(ue,{icon:le.X})})}),e[7]=a,e[8]=i,e[9]=h):h=e[9];let p;e[10]!==i?(p=L({"pr-8":i}),e[10]=i,e[11]=p):p=e[11];let g;e[12]!==n||e[13]!==p?(g=b.jsx("div",{className:p,children:n}),e[12]=n,e[13]=p,e[14]=g):g=e[14];let x;return e[15]!==l||e[16]!==s||e[17]!==u||e[18]!==f||e[19]!==m||e[20]!==h||e[21]!==g?(x=b.jsxs(ke.Content,{align:l,className:f,side:u,sideOffset:8,...s,"data-ox-slot":"popover-content","data-ox-state":m,children:[h,g]}),e[15]=l,e[16]=s,e[17]=u,e[18]=f,e[19]=m,e[20]=h,e[21]=g,e[22]=x):x=e[22],x},Fx=dt("OxPopoverTrigger","button"),Vx=t=>{const e=T.compilerRuntimeExports.c(19);let n,r,s,o,i;e[0]!==t?({asChild:i,children:n,className:r,onClick:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?!1:i,{toggle:a}=ha();let c;e[6]!==o||e[7]!==a?(c=h=>{a(),o?.(h)},e[6]=o,e[7]=a,e[8]=c):c=e[8];const d=c;let u;e[9]!==r||e[10]!==s||e[11]!==d?(u={type:"button",...s,className:r,"aria-haspopup":"dialog","data-ox-slot":"popover-trigger",onClick:d},e[9]=r,e[10]=s,e[11]=d,e[12]=u):u=e[12];const f=u;if(l){let h;return e[13]!==n||e[14]!==f?(h=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx(Fx,{...f,children:n})}),e[13]=n,e[14]=f,e[15]=h):h=e[15],h}let m;return e[16]!==n||e[17]!==f?(m=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx("button",{...f,children:n})}),e[16]=n,e[17]=f,e[18]=m):m=e[18],m},qn=Object.assign(Lx,{Content:zx,Trigger:Vx}),Bx=t=>{const e=T.compilerRuntimeExports.c(19);let n,r,s,o,i;e[0]!==t?({buffer:n,className:r,max:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?100:o,c=Math.max(0,Math.min(i===void 0?0:i,l)),d=n?Math.max(0,Math.min(n,l)):0;let u;e[6]!==r?(u=L("relative h-2 overflow-hidden rounded-full bg-primary/20",r),e[6]=r,e[7]=u):u=e[7];let f;e[8]!==n||e[9]!==d||e[10]!==l?(f=n!==void 0?b.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full bg-primary/30 transition-all duration-300",style:{width:`${d/l*100}%`}}):null,e[8]=n,e[9]=d,e[10]=l,e[11]=f):f=e[11];const m=`${c/l*100}%`;let h;e[12]!==m?(h=b.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full bg-primary transition-all duration-300",style:{width:m}}),e[12]=m,e[13]=h):h=e[13];let p;return e[14]!==s||e[15]!==u||e[16]!==f||e[17]!==h?(p=b.jsxs("div",{className:u,"data-ox-slot":"progress",role:"progressbar",...s,children:[f,h]}),e[14]=s,e[15]=u,e[16]=f,e[17]=h,e[18]=p):p=e[18],p},Wx=t=>{const e=T.compilerRuntimeExports.c(23);let n,r,s,o,i;e[0]!==t?({className:n,max:s,showPercentage:o,value:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=s===void 0?100:s,a=o===void 0?!1:o,d=Math.max(0,Math.min(i===void 0?0:i,l));let u;e[6]!==l||e[7]!==d?(u=Math.round(d/l*100),e[6]=l,e[7]=d,e[8]=u):u=e[8];const f=u,m=2*Math.PI*24,h=m-d/l*m;let p;e[9]!==n?(p=L("inline-flex items-center justify-center",n),e[9]=n,e[10]=p):p=e[10];let g;e[11]!==h?(g=b.jsx("svg",{className:"-rotate-90 transform",height:52,width:52,children:b.jsx("circle",{className:"stroke-primary transition-all duration-300 ease-in-out",cx:26,cy:26,fill:"none",r:24,strokeLinecap:"round",strokeWidth:"4",style:{strokeDasharray:m,strokeDashoffset:h}})}),e[11]=h,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==a?(x=a&&b.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:b.jsxs("span",{className:"text-xs font-medium text-foreground",children:[f,"%"]})}),e[13]=f,e[14]=a,e[15]=x):x=e[15];let v;e[16]!==g||e[17]!==x?(v=b.jsxs("div",{className:"relative",children:[g,x]}),e[16]=g,e[17]=x,e[18]=v):v=e[18];let y;return e[19]!==r||e[20]!==p||e[21]!==v?(y=b.jsx("div",{className:p,"data-ox-slot":"progress",...r,children:v}),e[19]=r,e[20]=p,e[21]=v,e[22]=y):y=e[22],y},Hx=Object.assign(Bx,{Circular:Wx}),Vs=t=>{const e=T.compilerRuntimeExports.c(13);let n,r,s,o;e[0]!==t?({className:n,decorative:s,orientation:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=s===void 0?!0:s,l=o===void 0?"horizontal":o,a=i?void 0:l,c=l==="horizontal"?"h-px w-full":"h-full w-px";let d;e[5]!==n||e[6]!==c?(d=L("shrink-0 bg-border",c,n),e[5]=n,e[6]=c,e[7]=d):d=e[7];const u=i?"none":"separator";let f;return e[8]!==r||e[9]!==a||e[10]!==d||e[11]!==u?(f=b.jsx("div",{"aria-orientation":a,className:d,role:u,...r,"data-ox-slot":"separator"}),e[8]=r,e[9]=a,e[10]=d,e[11]=u,e[12]=f):f=e[12],f},Yx={rectangle:"rounded-lg",circle:"rounded-full"},Vt=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({animate:s,className:n,shape:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=s===void 0?!0:s,a=Yx[o===void 0?"rectangle":o];let c;e[5]!==i||e[6]!==n||e[7]!==a?(c=L("relative overflow-hidden bg-secondary",a,{"animate-pulse":i},n),e[5]=i,e[6]=n,e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==r||e[10]!==c?(d=b.jsx("div",{"aria-busy":"true","aria-label":"Loading...",className:c,"data-ox-slot":"skeleton",role:"status",...r}),e[9]=r,e[10]=c,e[11]=d):d=e[11],d},ni=(t,e,n)=>{if(Array.isArray(t))return[Math.max(e,Math.min(n,t[0])),Math.max(e,Math.min(n,t[1]))];const r=Math.max(e,Math.min(n,t));return[r,r]},ri=(t,e,n)=>(t-e)/(n-e)*100,qx=(t,e,n,r)=>{const s=e+t/100*(n-e),o=Math.round(s/r)*r;return Math.max(e,Math.min(n,o))},Gx=t=>{const e=T.compilerRuntimeExports.c(122);let n,r,s,o,i,l,a,c,d,u,f,m,h,p;e[0]!==t?({"aria-label":n,"aria-labelledby":r,className:s,defaultValue:c,disabled:d,max:u,min:f,onChange:l,onChangeCommitted:a,orientation:m,showValue:h,step:p,value:o,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14]);const g=c===void 0?0:c,x=d===void 0?!1:d,v=u===void 0?100:u,y=f===void 0?0:f,w=m===void 0?"horizontal":m,C=h===void 0?!1:h,O=p===void 0?1:p,S=k.useRef(null),E=k.useRef(!1),R=k.useRef(0),N=o!==void 0,j=Array.isArray(g)||Array.isArray(o),D=o||g;let P;e[15]!==v||e[16]!==y||e[17]!==D?(P=ni(D,y,v),e[15]=v,e[16]=y,e[17]=D,e[18]=P):P=e[18];const[M,z]=k.useState(P);let A;e[19]!==o||e[20]!==M||e[21]!==N||e[22]!==v||e[23]!==y?(A=N?ni(o,y,v):M,e[19]=o,e[20]=M,e[21]=N,e[22]=v,e[23]=y,e[24]=A):A=e[24];const $=A;let I;e[25]!==x||e[26]!==N||e[27]!==j||e[28]!==l?(I=Oe=>{if(x)return;const be=j?Oe:Oe[0];N||z(Oe),l?.(be)},e[25]=x,e[26]=N,e[27]=j,e[28]=l,e[29]=I):I=e[29];const V=I;let _;e[30]!==v||e[31]!==y||e[32]!==w||e[33]!==O?(_=Oe=>{if(!S.current)return y;const be=S.current.getBoundingClientRect(),je=w==="horizontal"?(Oe.clientX-be.left)/be.width*100:(be.bottom-Oe.clientY)/be.height*100;return qx(Math.max(0,Math.min(100,je)),y,v,O)},e[30]=v,e[31]=y,e[32]=w,e[33]=O,e[34]=_):_=e[34];const F=_;let W;e[35]!==$||e[36]!==x||e[37]!==F||e[38]!==V||e[39]!==j?(W=(Oe,be)=>{if(x)return;Oe.preventDefault(),E.current=!0,R.current=be||0;const je=F(Oe);if(j&&be!==void 0){const ve=[...$];ve[be]=je,be===0&&ve[0]>ve[1]?ve[1]=ve[0]:be===1&&ve[1]<ve[0]&&(ve[0]=ve[1]),V(ve)}else V([je,je])},e[35]=$,e[36]=x,e[37]=F,e[38]=V,e[39]=j,e[40]=W):W=e[40];const B=W;let H;e[41]!==$||e[42]!==x||e[43]!==F||e[44]!==V||e[45]!==j?(H=Oe=>{if(x||E.current)return;const be=F(Oe);if(j){const[je,ve]=$,Be=Math.abs(be-je),Mn=Math.abs(be-ve),Rr=Be<=Mn?0:1,In=[...$];In[Rr]=be,V(In)}else V([be,be])},e[41]=$,e[42]=x,e[43]=F,e[44]=V,e[45]=j,e[46]=H):H=e[46];const G=H;let K;e[47]!==$||e[48]!==x||e[49]!==V||e[50]!==j||e[51]!==v||e[52]!==y||e[53]!==O?(K=(Oe,be)=>{if(x)return;let je;e:switch(Oe.key){case"ArrowRight":case"ArrowUp":{je=O;break e}case"ArrowLeft":case"ArrowDown":{je=-O;break e}case"PageUp":{je=(v-y)*.1;break e}case"PageDown":{je=-(v-y)*.1;break e}case"Home":{je=y-$[be];break e}case"End":{je=v-$[be];break e}default:return}Oe.preventDefault();const ve=[...$];ve[be]=Math.max(y,Math.min(v,$[be]+je)),j&&(be===0&&ve[0]>ve[1]?ve[1]=ve[0]:be===1&&ve[1]<ve[0]&&(ve[0]=ve[1])),V(ve)},e[47]=$,e[48]=x,e[49]=V,e[50]=j,e[51]=v,e[52]=y,e[53]=O,e[54]=K):K=e[54];const Y=K;let Q,X;e[55]!==$||e[56]!==F||e[57]!==V||e[58]!==j||e[59]!==a?(Q=()=>{const Oe=je=>{if(!E.current)return;const ve=F(je);if(j){const Be=[...$];Be[R.current]=ve,R.current===0&&Be[0]>Be[1]?Be[1]=Be[0]:R.current===1&&Be[1]<Be[0]&&(Be[0]=Be[1]),V(Be)}else V([ve,ve])},be=()=>{E.current&&(E.current=!1,a?.(j?$:$[0]))};return E.current&&(document.addEventListener("mousemove",Oe),document.addEventListener("mouseup",be)),()=>{document.removeEventListener("mousemove",Oe),document.removeEventListener("mouseup",be)}},X=[F,j,$,V,a],e[55]=$,e[56]=F,e[57]=V,e[58]=j,e[59]=a,e[60]=Q,e[61]=X):(Q=e[60],X=e[61]),k.useEffect(Q,X);const[U,J]=$,q=ri(U,y,v),se=ri(J,y,v);let ee;e[62]!==s?(ee=L("w-full py-3",s),e[62]=s,e[63]=ee):ee=e[63];let te;e[64]!==x?(te=L("relative h-1.5 w-full cursor-pointer rounded-full bg-muted",{"ox-default-disabled":x}),e[64]=x,e[65]=te):te=e[65];const ae=`${j?q:0}%`,de=`${j?se-q:q}%`;let fe;e[66]!==ae||e[67]!==de?(fe=b.jsx("div",{className:"absolute h-full rounded-full bg-primary",style:{left:ae,width:de}}),e[66]=ae,e[67]=de,e[68]=fe):fe=e[68];const ge=j?`${n} minimum`:n,Z=String(U);let ie;e[69]!==x?(ie=L("ox-focus-ring absolute top-1/2 size-4 -translate-1/2 cursor-grab rounded-full border-2 border-primary bg-background ring-ring/50 hover:ring-4 active:cursor-grabbing",{"cursor-not-allowed":x}),e[69]=x,e[70]=ie):ie=e[70];const oe=`${q}%`;let me;e[71]!==oe?(me={left:oe},e[71]=oe,e[72]=me):me=e[72];const Se=x?-1:0;let Ee;e[73]!==Y?(Ee=Oe=>Y(Oe,0),e[73]=Y,e[74]=Ee):Ee=e[74];let He;e[75]!==B?(He=Oe=>B(Oe,0),e[75]=B,e[76]=He):He=e[76];let Ye;e[77]!==r||e[78]!==v||e[79]!==y||e[80]!==U||e[81]!==w||e[82]!==ge||e[83]!==Z||e[84]!==ie||e[85]!==me||e[86]!==Se||e[87]!==Ee||e[88]!==He?(Ye=b.jsx("div",{"aria-label":ge,"aria-labelledby":r,"aria-orientation":w,"aria-valuemax":v,"aria-valuemin":y,"aria-valuenow":U,"aria-valuetext":Z,className:ie,role:"slider",style:me,tabIndex:Se,onKeyDown:Ee,onMouseDown:He}),e[77]=r,e[78]=v,e[79]=y,e[80]=U,e[81]=w,e[82]=ge,e[83]=Z,e[84]=ie,e[85]=me,e[86]=Se,e[87]=Ee,e[88]=He,e[89]=Ye):Ye=e[89];let qe;e[90]!==n||e[91]!==r||e[92]!==x||e[93]!==Y||e[94]!==B||e[95]!==j||e[96]!==v||e[97]!==se||e[98]!==J||e[99]!==y||e[100]!==w?(qe=j?b.jsx("div",{"aria-label":j?`${n} maximum`:n,"aria-labelledby":r,"aria-orientation":w,"aria-valuemax":v,"aria-valuemin":y,"aria-valuenow":J,"aria-valuetext":String(J),className:L("ox-focus-ring absolute top-1/2 size-4 -translate-1/2 cursor-grab rounded-full border-2 border-primary bg-background ring-ring/50 hover:ring-4 active:cursor-grabbing",{"cursor-not-allowed":x}),role:"slider",style:{left:`${se}%`},tabIndex:x?-1:0,onKeyDown:Oe=>Y(Oe,1),onMouseDown:Oe=>B(Oe,1)}):null,e[90]=n,e[91]=r,e[92]=x,e[93]=Y,e[94]=B,e[95]=j,e[96]=v,e[97]=se,e[98]=J,e[99]=y,e[100]=w,e[101]=qe):qe=e[101];let et;e[102]!==G||e[103]!==te||e[104]!==fe||e[105]!==Ye||e[106]!==qe?(et=b.jsxs("div",{className:te,ref:S,onClick:G,children:[fe,Ye,qe]}),e[102]=G,e[103]=te,e[104]=fe,e[105]=Ye,e[106]=qe,e[107]=et):et=e[107];let vt;e[108]!==j||e[109]!==v||e[110]!==J||e[111]!==y||e[112]!==U||e[113]!==C?(vt=C&&b.jsxs("div",{className:L("mt-2 flex justify-between text-xs text-muted-foreground"),children:[b.jsx("span",{children:j?`${U} - ${J}`:U}),b.jsxs("span",{children:[y," - ",v]})]}),e[108]=j,e[109]=v,e[110]=J,e[111]=y,e[112]=U,e[113]=C,e[114]=vt):vt=e[114];let Fe;e[115]!==et||e[116]!==vt?(Fe=b.jsxs("div",{className:"relative py-3",children:[et,vt]}),e[115]=et,e[116]=vt,e[117]=Fe):Fe=e[117];let _t;return e[118]!==i||e[119]!==ee||e[120]!==Fe?(_t=b.jsx("div",{className:ee,"data-ox-slot":"slider",...i,children:Fe}),e[118]=i,e[119]=ee,e[120]=Fe,e[121]=_t):_t=e[121],_t},ga=k.createContext(null),xa=k.createContext(null),Ux=()=>{const t=k.useContext(ga);if(!t)throw new Error("SortableList components must be used within an OxSortableList");return t},Kx=()=>{const t=k.useContext(xa);if(!t)throw new Error("SortableListHandle must be used within an OxSortableList.Item");return t},Xx=t=>{const e=T.compilerRuntimeExports.c(58);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,columns:l,direction:a,disabled:c,gap:d,onReorder:o,style:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=l===void 0?3:l,f=a===void 0?"vertical":a,m=c===void 0?!1:c,h=d===void 0?8:d,p=k.useId();let g,x,v;if(e[10]!==p||e[11]!==n){g=k.Children.toArray(n);let Y;e[15]!==p?(Y=(Q,X)=>`${p}-item-${X}`,e[15]=p,e[16]=Y):Y=e[16],x=g.map(Y),v=new Map,x.forEach((Q,X)=>{v.set(Q,X)}),e[10]=p,e[11]=n,e[12]=g,e[13]=x,e[14]=v}else g=e[12],x=e[13],v=e[14];let y;e[17]!==g||e[18]!==x||e[19]!==v?(y={childArray:g,itemIds:x,itemIndexMap:v},e[17]=g,e[18]=x,e[19]=v,e[20]=y):y=e[20];const{childArray:w,itemIds:C,itemIndexMap:O}=y;let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S={coordinateGetter:Fs},e[21]=S):S=e[21];const E=Os(Kt(jn),Kt(Nn,S));let R;e:switch(f){case"horizontal":{R=zg;break e}case"grid":{R=_s;break e}default:R=$s}const N=R;let j;e[22]!==O||e[23]!==o?(j=Y=>{const{active:Q,over:X}=Y;if(X&&Q.id!==X.id){const U=O.get(String(Q.id)),J=O.get(String(X.id));U!==void 0&&J!==void 0&&o(U,J)}},e[22]=O,e[23]=o,e[24]=j):j=e[24];const D=j;let P;e[25]!==u||e[26]!==f||e[27]!==h?(P=f==="grid"?{display:"grid",gap:h,gridTemplateColumns:`repeat(${u}, 1fr)`}:{display:"flex",flexDirection:f==="vertical"?"column":"row",gap:h},e[25]=u,e[26]=f,e[27]=h,e[28]=P):P=e[28];const M=P;let z;e[29]!==M||e[30]!==i?(z={...M,...i},e[29]=M,e[30]=i,e[31]=z):z=e[31];const A=z;let $;e[32]!==f||e[33]!==m?($={direction:f,disabled:m},e[32]=f,e[33]=m,e[34]=$):$=e[34];const I=$;let V;if(e[35]!==w||e[36]!==C){let Y;e[38]!==C?(Y=(Q,X)=>k.isValidElement(Q)?k.cloneElement(Q,{__sortableId:C[X],__sortableIndex:X}):Q,e[38]=C,e[39]=Y):Y=e[39],V=w.map(Y),e[35]=w,e[36]=C,e[37]=V}else V=e[37];const _=V,F=m?void 0:E;let W;e[40]!==r?(W=L(r),e[40]=r,e[41]=W):W=e[41];let B;e[42]!==s||e[43]!==_||e[44]!==A||e[45]!==W?(B=b.jsx("div",{className:W,"data-ox-slot":"sortable-list",style:A,...s,children:_}),e[42]=s,e[43]=_,e[44]=A,e[45]=W,e[46]=B):B=e[46];let H;e[47]!==C||e[48]!==N||e[49]!==B?(H=b.jsx(Ls,{items:C,strategy:N,children:B}),e[47]=C,e[48]=N,e[49]=B,e[50]=H):H=e[50];let G;e[51]!==D||e[52]!==F||e[53]!==H?(G=b.jsx(br,{collisionDetection:ol,sensors:F,onDragEnd:D,children:H}),e[51]=D,e[52]=F,e[53]=H,e[54]=G):G=e[54];let K;return e[55]!==I||e[56]!==G?(K=b.jsx(ga.Provider,{value:I,children:G}),e[55]=I,e[56]=G,e[57]=K):K=e[57],K},Qx=t=>{const e=T.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{attributes:o,disabled:i,listeners:l,registerHandle:a,setActivatorNodeRef:c}=Kx();let d,u;e[4]!==a?(d=()=>{a()},u=[a],e[4]=a,e[5]=d,e[6]=u):(d=e[5],u=e[6]),k.useEffect(d,u);let f;e[7]!==r||e[8]!==i?(f=L("flex cursor-grab touch-none items-center justify-center",{"cursor-not-allowed opacity-50":i},r),e[7]=r,e[8]=i,e[9]=f):f=e[9];let m;e[10]!==n?(m=n??b.jsx(le.GripVertical,{className:"size-4 text-muted-foreground"}),e[10]=n,e[11]=m):m=e[11];let h;return e[12]!==o||e[13]!==i||e[14]!==s||e[15]!==l||e[16]!==c||e[17]!==f||e[18]!==m?(h=b.jsx("button",{"aria-label":"Drag to reorder",className:f,"data-ox-slot":"sortable-list-handle",disabled:i,ref:c,type:"button",...o,...l,...s,children:m}),e[12]=o,e[13]=i,e[14]=s,e[15]=l,e[16]=c,e[17]=f,e[18]=m,e[19]=h):h=e[19],h},Jx=t=>{const e=T.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a;e[0]!==t?({__sortableId:n,__sortableIndex:r,children:s,className:o,disabled:a,style:l,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const c=a===void 0?!1:a,[d,u]=k.useState(!1),{disabled:f}=Ux(),m=f||c,h=n??`fallback-${r}`;let p;e[8]!==m||e[9]!==h?(p={disabled:m,id:h},e[8]=m,e[9]=h,e[10]=p):p=e[10];const{attributes:g,isDragging:x,listeners:v,setActivatorNodeRef:y,setNodeRef:w,transform:C,transition:O}=zs(p);let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{u(!0)},e[11]=S):S=e[11];const E=S;let R;e[12]!==C?(R=at.Transform.toString(C),e[12]=C,e[13]=R):R=e[13];let N;e[14]!==l||e[15]!==R||e[16]!==O?(N={transform:R,transition:O,...l},e[14]=l,e[15]=R,e[16]=O,e[17]=N):N=e[17];const j=N;let D;e[18]!==g||e[19]!==m||e[20]!==x||e[21]!==v||e[22]!==y?(D={attributes:g,disabled:m,isDragging:x,listeners:v,registerHandle:E,setActivatorNodeRef:y},e[18]=g,e[19]=m,e[20]=x,e[21]=v,e[22]=y,e[23]=D):D=e[23];const P=D;let M;e[24]!==g||e[25]!==d||e[26]!==v?(M=d?{}:{...g,...v},e[24]=g,e[25]=d,e[26]=v,e[27]=M):M=e[27];const z=M;let A;e[28]!==o||e[29]!==x?(A=L({"opacity-50":x},o),e[28]=o,e[29]=x,e[30]=A):A=e[30];const $=x?"dragging":void 0;let I;e[31]!==s||e[32]!==i||e[33]!==z||e[34]!==j||e[35]!==w||e[36]!==A||e[37]!==$?(I=b.jsx("div",{className:A,"data-ox-slot":"sortable-list-item","data-ox-state":$,ref:w,style:j,...z,...i,children:s}),e[31]=s,e[32]=i,e[33]=z,e[34]=j,e[35]=w,e[36]=A,e[37]=$,e[38]=I):I=e[38];let V;return e[39]!==P||e[40]!==I?(V=b.jsx(xa.Provider,{value:P,children:I}),e[39]=P,e[40]=I,e[41]=V):V=e[41],V},Zx=Object.assign(Xx,{Handle:Qx,Item:Jx}),eb={loading:{title:"Loading...",message:"Good things take time",icon:le.LoaderCircle,showAction:!1},empty:{title:"Nothing here",message:"It's so empty... like my soul",icon:le.PackageOpen,showAction:!1},offline:{title:"You're offline",message:"Did you forget to pay the internet bill?",icon:le.WifiOff,showAction:!0},success:{title:"Success!",message:"Everything went perfectly as planned",icon:le.CircleCheck,showAction:!1},warning:{title:"Heads up!",message:"Something needs your attention",icon:le.AlertCircle,showAction:!1},info:{title:"Just so you know",message:"Here's some helpful information",icon:le.Info,showAction:!1},401:{title:"Please log in",message:"You need to authenticate to access this page",showAction:!0},403:{title:"Access denied",message:"You don't have permission to view this content",showAction:!0},404:{title:"Page not found",message:"Nothing to see here... just... go away... now.",showAction:!0},408:{title:"Request timeout",message:"Taking too long? Try refreshing the page",showAction:!0},429:{title:"Slow down there!",message:"Too many requests. Take a coffee break",showAction:!0},500:{title:"Oops! We broke something",message:"Don't worry, it's not your fault... probably",showAction:!0},502:{title:"Bad gateway",message:"The server is having an existential crisis",showAction:!0},503:{title:"Taking a quick nap",message:"Service will be back after coffee break",showAction:!0},504:{title:"Server timeout",message:"Server is slower than a Windows 95 boot",showAction:!0}},tb=t=>t==="success"?rt.success:t==="warning"?rt.warning:t==="info"?rt.info:typeof t=="number"?rt.destructive:{text:"text-primary"},nb=t=>{const e=T.compilerRuntimeExports.c(66);let n,r,s,o,i,l,a,c,d;e[0]!==t?({action:n,children:r,className:s,inline:a,message:i,onBack:l,title:c,type:d,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=a===void 0?!1:a;if(r){let _;e[10]!==s?(_=L("min-h-screen w-full",s),e[10]=s,e[11]=_):_=e[11];let F;return e[12]!==r||e[13]!==_?(F=b.jsx("div",{className:_,children:r}),e[12]=r,e[13]=_,e[14]=F):F=e[14],F}const f=eb[d],m=c||f.title,h=i||f.message;let p;e[15]!==l?(p=()=>{l?l():globalThis.history.back()},e[15]=l,e[16]=p):p=e[16];const g=p;let x;e[17]!==n||e[18]!==f.showAction||e[19]!==g?(x=()=>n!==void 0?n:f.showAction?b.jsx(Je,{variant:"secondary",onClick:g,children:"Back"}):null,e[17]=n,e[18]=f.showAction,e[19]=g,e[20]=x):x=e[20];const v=x;let y,w,C,O,S,E,R,N;if(e[21]!==s||e[22]!==f.icon||e[23]!==f.path||e[24]!==o||e[25]!==u||e[26]!==d){const _=tb(d),F=()=>f.icon?b.jsx(ue,{className:L(_.text,{"animate-spin":d==="loading"}),icon:f.icon,path:f.path,size:"2xl"}):typeof d=="number"?b.jsx("div",{className:L("bg-linear-to-br from-primary from-20% to-accent bg-clip-text text-3xl font-bold text-transparent"),children:d}):null;E=typeof d=="number"?"assertive":"polite";const W=!u;e[35]!==s||e[36]!==u||e[37]!==W?(R=L("flex w-full items-center justify-center",{"min-h-screen bg-background":W,"h-full":u},s),e[35]=s,e[36]=u,e[37]=W,e[38]=R):R=e[38],N="status-display",y=typeof d=="number"?"alert":"status",w=o,e[39]===Symbol.for("react.memo_cache_sentinel")?(S=L("flex max-w-md flex-col items-center space-y-6 text-center"),e[39]=S):S=e[39],C="flex items-center space-x-4",O=F(),e[21]=s,e[22]=f.icon,e[23]=f.path,e[24]=o,e[25]=u,e[26]=d,e[27]=y,e[28]=w,e[29]=C,e[30]=O,e[31]=S,e[32]=E,e[33]=R,e[34]=N}else y=e[27],w=e[28],C=e[29],O=e[30],S=e[31],E=e[32],R=e[33],N=e[34];let j;e[40]!==C||e[41]!==O?(j=b.jsx("div",{className:C,children:O}),e[40]=C,e[41]=O,e[42]=j):j=e[42];let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D=L("font-bold text-foreground","text-xl"),e[43]=D):D=e[43];let P;e[44]!==m?(P=b.jsx("h1",{id:"status-title","aria-describedby":"status-message",className:D,children:m}),e[44]=m,e[45]=P):P=e[45];let M;e[46]===Symbol.for("react.memo_cache_sentinel")?(M=L("text-muted-foreground","text-base"),e[46]=M):M=e[46];let z;e[47]!==h?(z=b.jsx("p",{id:"status-message",className:M,children:h}),e[47]=h,e[48]=z):z=e[48];let A;e[49]!==P||e[50]!==z?(A=b.jsxs("div",{className:"space-y-2",children:[P,z]}),e[49]=P,e[50]=z,e[51]=A):A=e[51];let $;e[52]!==v?($=v(),e[52]=v,e[53]=$):$=e[53];let I;e[54]!==j||e[55]!==A||e[56]!==$||e[57]!==S?(I=b.jsxs("div",{className:S,children:[j,A,$]}),e[54]=j,e[55]=A,e[56]=$,e[57]=S,e[58]=I):I=e[58];let V;return e[59]!==y||e[60]!==w||e[61]!==I||e[62]!==E||e[63]!==R||e[64]!==N?(V=b.jsx("div",{"aria-live":E,className:R,"data-ox-slot":N,role:y,...w,children:I}),e[59]=y,e[60]=w,e[61]=I,e[62]=E,e[63]=R,e[64]=N,e[65]=V):V=e[65],V},ba=k.createContext(null),Bs=()=>{const t=k.useContext(ba);if(!t)throw new Error("OxStepperItem must be used within OxStepper");return t},va=t=>{const e=T.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{orientation:o}=Bs(),i=o==="vertical";let l;e[4]!==r||e[5]!==i?(l=L("mt-2 p-4",{"border-t border-border":i},r),e[4]=r,e[5]=i,e[6]=l):l=e[6];let a;return e[7]!==n||e[8]!==s||e[9]!==l?(a=b.jsx("div",{className:l,...s,"data-ox-slot":"stepper-actions",children:n}),e[7]=n,e[8]=s,e[9]=l,e[10]=a):a=e[10],a},rb=(t,e,n)=>t==="error"?rt.destructive.icon:t==="warning"?rt.warning.icon:e||(n?rt.success.icon:null),ya=(t,e)=>t==="error"?rt.destructive:t==="warning"?rt.warning:We[e],si=(t,e)=>t==="error"||t==="warning"?e.text:"text-foreground",wa=t=>{const e=T.compilerRuntimeExports.c(18);let n,r,s,o;e[0]!==t?({className:n,state:s,stepIndex:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{color:i,currentStep:l,orientation:a}=Bs(),c=l>o,d=s||(c?"completed":"current");let u;e[5]!==d||e[6]!==i?(u=ya(d,i),e[5]=d,e[6]=i,e[7]=u):u=e[7];const f=u,m=a==="horizontal",h=a==="vertical",p=!c;let g;e[8]!==n||e[9]!==c||e[10]!==f.borderSubtle||e[11]!==m||e[12]!==h||e[13]!==p?(g=L("flex-1 border transition-colors duration-300",{"mx-4 mt-[19px]":m,"my-2 min-h-6":h,"border-border":p,[f.borderSubtle]:c},n),e[8]=n,e[9]=c,e[10]=f.borderSubtle,e[11]=m,e[12]=h,e[13]=p,e[14]=g):g=e[14];let x;return e[15]!==r||e[16]!==g?(x=b.jsx("div",{className:g,...r,"data-ox-slot":"stepper-connector"}),e[15]=r,e[16]=g,e[17]=x):x=e[17],x},Ca=k.createContext(null),Ze=()=>k.useContext(Ca),Jt=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,disabled:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=Ze(),l=s??!!i?.disabled;let a;e[5]!==r?(a=L("text-sm leading-relaxed text-pretty text-muted-foreground","aria-disabled:opacity-50",r),e[5]=r,e[6]=a):a=e[6];let c;return e[7]!==n||e[8]!==o||e[9]!==l||e[10]!==a?(c=b.jsx("div",{"aria-disabled":l,className:a,...o,"data-ox-slot":"description",children:n}),e[7]=n,e[8]=o,e[9]=l,e[10]=a,e[11]=c):c=e[11],c},Oa=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=Ze(),i=typeof o?.error=="string"?o.error:void 0,l=n??i;if(!l)return null;let a;e[4]!==r?(a=L("flex items-start gap-1.5 text-sm leading-relaxed text-pretty text-destructive",'[&>svg:not([class*="size-"])]:size-3.5',"[&>svg]:mt-0.75","[&>svg]:shrink-0","[&>svg]:text-current",r),e[4]=r,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==s||e[8]!==a?(c=b.jsx("div",{className:a,role:"alert",...s,"data-ox-slot":"error",children:l}),e[6]=l,e[7]=s,e[8]=a,e[9]=c):c=e[9],c},sb={1:"text-2xl font-bold",2:"text-xl font-semibold",3:"text-lg font-semibold",4:"text-base font-semibold",5:"text-sm font-semibold",6:"text-sm font-medium",7:"text-sm"},Ea=({as:t="h2",children:e,className:n,level:r,...s})=>{const o=r??(t!=="div"?Number.parseInt(t.slice(1)):2),i=T.clamp(o,1,7),l={className:L("text-foreground",sb[i],n),...s,"data-ox-slot":"heading",...t==="div"&&{role:"heading","aria-level":o}};return k.createElement(t,l,e)},Sa=t=>{const e=T.compilerRuntimeExports.c(21);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,disabled:s,htmlFor:i,id:l,required:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const c=Ze(),d=a??c?.required??!1,u=s??c?.disabled??!1,f=i??c?.id,m=l??c?.labelId,h=f&&!u;let p;e[8]!==r||e[9]!==h?(p=L("block text-sm font-medium text-foreground","aria-disabled:opacity-50",{"cursor-pointer":h},r),e[8]=r,e[9]=h,e[10]=p):p=e[10];let g;e[11]!==d?(g=d&&b.jsx("span",{"aria-hidden":"true",className:"ml-1 text-destructive",children:"*"}),e[11]=d,e[12]=g):g=e[12];let x;return e[13]!==n||e[14]!==o||e[15]!==u||e[16]!==f||e[17]!==m||e[18]!==p||e[19]!==g?(x=b.jsxs("label",{id:m,"aria-disabled":u,className:p,htmlFor:f,...o,"data-ox-slot":"label",children:[n,g]}),e[13]=n,e[14]=o,e[15]=u,e[16]=f,e[17]=m,e[18]=p,e[19]=g,e[20]=x):x=e[20],x},ob=t=>{const e=T.compilerRuntimeExports.c(16);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,required:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,a=i===void 0?!1:i;let c;e[6]!==r?(c=L("block text-base font-semibold text-foreground","aria-disabled:opacity-50",r),e[6]=r,e[7]=c):c=e[7];let d;e[8]!==a?(d=a&&b.jsx("span",{"aria-hidden":"true",className:"ml-1 text-destructive",children:"*"}),e[8]=a,e[9]=d):d=e[9];let u;return e[10]!==n||e[11]!==l||e[12]!==s||e[13]!==c||e[14]!==d?(u=b.jsxs("legend",{"aria-disabled":l,className:c,...s,"data-ox-slot":"legend",children:[n,d]}),e[10]=n,e[11]=l,e[12]=s,e[13]=c,e[14]=d,e[15]=u):u=e[15],u},ib={completed:"check",error:"close",warning:"warning",current:"current step",upcoming:"upcoming step"},ka=t=>{const e=T.compilerRuntimeExports.c(70);let n,r,s,o,i,l,a,c;e[0]!==t?({children:n,className:r,description:s,icon:i,state:l,stepIndex:a,title:c,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=a===void 0?0:a,{color:u,currentStep:f,onStepChange:m,orientation:h,totalSteps:p,type:g}=Bs(),x=f===d,v=f>d;let y,w,C,O,S,E,R,N;if(e[9]!==r||e[10]!==u||e[11]!==f||e[12]!==s||e[13]!==o||e[14]!==i||e[15]!==x||e[16]!==v||e[17]!==m||e[18]!==h||e[19]!==l||e[20]!==d||e[21]!==c||e[22]!==p||e[23]!==g){N=Symbol.for("react.early_return_sentinel");e:{let $;l?$=l:d<f?$="completed":d===f?$="current":$="upcoming";const I=g==="non-linear"||v||x,V=rb($,i,v),_=ya($,u);let F;e[32]!==I||e[33]!==m||e[34]!==d?(F=()=>{I&&m&&m(d)},e[32]=I,e[33]=m,e[34]=d,e[35]=F):F=e[35];const W=F,B=()=>b.jsx("button",{"aria-current":x?"step":void 0,"aria-describedby":s?`step-${d}-desc`:void 0,"aria-label":`${c} - ${ib[$]} (${d+1} of ${p})`,className:L("flex items-center justify-center rounded-lg transition-colors","enabled:cursor-pointer","ox-focus-ring",{"cursor-pointer":I,"opacity-50":$==="upcoming"}),disabled:!I,type:"button",onClick:W,children:b.jsx("div",{className:L("flex size-10 shrink-0 items-center justify-center rounded-lg border",_.borderSubtle,_.bgSubtle),children:V?b.jsx(ue,{className:_.text,icon:V}):b.jsx("span",{className:L("text-base font-medium text-current"),children:d+1})})});if(h==="horizontal"){let G;e[36]!==r?(G=L("flex flex-col items-center text-center",r),e[36]=r,e[37]=G):G=e[37];let K;e[38]!==s||e[39]!==d?(K=s?b.jsx(Jt,{id:`step-${d}-desc`,children:s}):null,e[38]=s,e[39]=d,e[40]=K):K=e[40],N=b.jsxs("div",{className:G,"data-ox-slot":"stepper-item",...o,children:[B(),b.jsxs("div",{className:"mt-2",children:[b.jsx("h6",{className:L("text-sm font-medium",si($,_)),children:c}),K]})]});break e}e[41]!==r?(O=L("flex gap-3",r),e[41]=r,e[42]=O):O=e[42],S="stepper-item",E=o;let H;e[43]!==l||e[44]!==d||e[45]!==p?(H=d<p-1?b.jsx(wa,{state:l,stepIndex:d}):null,e[43]=l,e[44]=d,e[45]=p,e[46]=H):H=e[46],R=b.jsxs("div",{className:"flex flex-col items-center",children:[B(),H]}),C="flex-1",w="mb-4",y=L("text-sm font-medium",si($,_))}e[9]=r,e[10]=u,e[11]=f,e[12]=s,e[13]=o,e[14]=i,e[15]=x,e[16]=v,e[17]=m,e[18]=h,e[19]=l,e[20]=d,e[21]=c,e[22]=p,e[23]=g,e[24]=y,e[25]=w,e[26]=C,e[27]=O,e[28]=S,e[29]=E,e[30]=R,e[31]=N}else y=e[24],w=e[25],C=e[26],O=e[27],S=e[28],E=e[29],R=e[30],N=e[31];if(N!==Symbol.for("react.early_return_sentinel"))return N;let j;e[47]!==y||e[48]!==c?(j=b.jsx("h6",{className:y,children:c}),e[47]=y,e[48]=c,e[49]=j):j=e[49];let D;e[50]!==s||e[51]!==d?(D=s?b.jsx(Jt,{id:`step-${d}-desc`,children:s}):null,e[50]=s,e[51]=d,e[52]=D):D=e[52];let P;e[53]!==j||e[54]!==D||e[55]!==w?(P=b.jsxs("div",{className:w,children:[j,D]}),e[53]=j,e[54]=D,e[55]=w,e[56]=P):P=e[56];let M;e[57]!==n||e[58]!==x?(M=x&&n?b.jsx("div",{className:"mb-4 rounded-lg border border-border bg-card p-4",children:n}):null,e[57]=n,e[58]=x,e[59]=M):M=e[59];let z;e[60]!==P||e[61]!==M||e[62]!==C?(z=b.jsxs("div",{className:C,children:[P,M]}),e[60]=P,e[61]=M,e[62]=C,e[63]=z):z=e[63];let A;return e[64]!==z||e[65]!==O||e[66]!==S||e[67]!==E||e[68]!==R?(A=b.jsxs("div",{className:O,"data-ox-slot":S,...E,children:[R,z]}),e[64]=z,e[65]=O,e[66]=S,e[67]=E,e[68]=R,e[69]=A):A=e[69],A},lb=t=>{const e=T.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a,c;e[0]!==t?({children:n,className:r,color:i,currentStep:l,onStepChange:o,orientation:a,type:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=i===void 0?"violet":i,u=l===void 0?0:l,f=a===void 0?"vertical":a,m=c===void 0?"linear":c;let h,p,g,x,v,y,w,C,O;if(e[9]!==n||e[10]!==r||e[11]!==d||e[12]!==u||e[13]!==s||e[14]!==o||e[15]!==f||e[16]!==m){const R=k.Children.toArray(n).filter(ab);let N;e[26]!==n?(N=k.Children.toArray(n).find(cb),e[26]=n,e[27]=N):N=e[27],p=N;const j=R.map(db),D={color:d,currentStep:u,onStepChange:o,orientation:f,totalSteps:R.length,type:m};h=ba.Provider,x=D,v="Step-by-step progress",e[28]!==r?(y=L("w-full",r),e[28]=r,e[29]=y):y=e[29],w="navigation",C=s,O="stepper",g=f==="horizontal"?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"flex w-full items-start",children:j.map((P,M)=>b.jsxs(k.Fragment,{children:[k.cloneElement(P,{className:L("min-w-0 flex-1",P.props.className)}),M<R.length-1?b.jsx(wa,{state:R[M].props.state,stepIndex:M}):null]},M))}),R[u]?.props.children?b.jsx("div",{className:"mt-6 rounded-lg border border-border bg-card p-4",children:R[u].props.children}):null]}):j,e[9]=n,e[10]=r,e[11]=d,e[12]=u,e[13]=s,e[14]=o,e[15]=f,e[16]=m,e[17]=h,e[18]=p,e[19]=g,e[20]=x,e[21]=v,e[22]=y,e[23]=w,e[24]=C,e[25]=O}else h=e[17],p=e[18],g=e[19],x=e[20],v=e[21],y=e[22],w=e[23],C=e[24],O=e[25];let S;e[30]!==p||e[31]!==g||e[32]!==v||e[33]!==y||e[34]!==w||e[35]!==C||e[36]!==O?(S=b.jsxs("div",{"aria-label":v,className:y,role:w,...C,"data-ox-slot":O,children:[g,p]}),e[30]=p,e[31]=g,e[32]=v,e[33]=y,e[34]=w,e[35]=C,e[36]=O,e[37]=S):S=e[37];let E;return e[38]!==h||e[39]!==x||e[40]!==S?(E=b.jsx(h,{value:x,children:S}),e[38]=h,e[39]=x,e[40]=S,e[41]=E):E=e[41],E};function ab(t){return k.isValidElement(t)&&t.type===ka}function cb(t){return k.isValidElement(t)&&t.type===va}function db(t,e){return k.cloneElement(t,{stepIndex:e,key:e})}const ub=Object.assign(lb,{Actions:va,Item:ka}),ls=k.createContext(void 0),fb=t=>{const e=T.compilerRuntimeExports.c(78);let n,r,s,o,i,l,a,c,d,u,f,m;e[0]!==t?({allRowIds:l,children:n,className:r,draggable:a,isLoading:c,onRowReorder:o,onSelectionChange:i,selectable:d,selectedRows:u,skeletonColumns:f,skeletonRows:m,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12]);let h;e[13]!==l?(h=l===void 0?[]:l,e[13]=l,e[14]=h):h=e[14];const p=h,g=a===void 0?!1:a,x=c===void 0?!1:c,v=d===void 0?!1:d;let y;e[15]!==u?(y=u===void 0?[]:u,e[15]=u,e[16]=y):y=e[16];const w=y,C=f===void 0?3:f,O=m===void 0?5:m,[S,E]=k.useState(null);let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=[],e[17]=R):R=e[17];const[N,j]=k.useState(R);let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=[],e[18]=D):D=e[18];const P=k.useRef(D),M=k.useRef(!1);let z;e[19]===Symbol.for("react.memo_cache_sentinel")?(z={coordinateGetter:Fs},e[19]=z):z=e[19];const A=Os(Kt(jn),Kt(Nn,z));let $;e[20]===Symbol.for("react.memo_cache_sentinel")?($=()=>{M.current||(M.current=!0,queueMicrotask(()=>{M.current=!1,j([...P.current])}))},e[20]=$):$=e[20];const I=$;let V;e[21]===Symbol.for("react.memo_cache_sentinel")?(V=Z=>{P.current.includes(Z)||(P.current=[...P.current,Z],I())},e[21]=V):V=e[21];const _=V;let F;e[22]===Symbol.for("react.memo_cache_sentinel")?(F=Z=>{P.current=P.current.filter(ie=>ie!==Z),I()},e[22]=F):F=e[22];const W=F;let B;e[23]!==o||e[24]!==N?(B=Z=>{const{active:ie,over:oe}=Z;if(E(null),oe&&ie.id!==oe.id){const me=N.indexOf(String(ie.id)),Se=N.indexOf(String(oe.id)),Ee=As(N,me,Se);P.current=Ee,j(Ee),o?.(Ee)}},e[23]=o,e[24]=N,e[25]=B):B=e[25];const H=B,G=p.length>0&&w.length===p.length,K=w.length>0&&w.length<p.length,Y=Math.max(1,Math.min(C,20)),Q=Math.max(1,Math.min(O,50));let X;e[26]!==S?(X=Z=>S===Z,e[26]=S,e[27]=X):X=e[27];let U;e[28]!==w?(U=Z=>w.includes(Z),e[28]=w,e[29]=U):U=e[29];let J;e[30]!==i||e[31]!==w?(J=Z=>{if(!i)return;const ie=w.includes(Z);i(ie?w.filter(oe=>oe!==Z):[...w,Z])},e[30]=i,e[31]=w,e[32]=J):J=e[32];let q;e[33]!==p||e[34]!==G||e[35]!==i?(q=()=>{i&&i(G?[]:[...p])},e[33]=p,e[34]=G,e[35]=i,e[36]=q):q=e[36];let se;e[37]!==p||e[38]!==g||e[39]!==S||e[40]!==G||e[41]!==K||e[42]!==x||e[43]!==o||e[44]!==i||e[45]!==v||e[46]!==w||e[47]!==X||e[48]!==U||e[49]!==J||e[50]!==q||e[51]!==Y||e[52]!==Q?(se={allRowIds:p,draggable:g,draggingRowId:S,isLoading:x,selectable:v,selectedRows:w,skeletonColumns:Y,skeletonRows:Q,onRowReorder:o,onSelectionChange:i,registerRowId:_,unregisterRowId:W,isDragging:X,isSelected:U,toggleSelection:J,toggleAll:q,isAllSelected:G,isIndeterminate:K},e[37]=p,e[38]=g,e[39]=S,e[40]=G,e[41]=K,e[42]=x,e[43]=o,e[44]=i,e[45]=v,e[46]=w,e[47]=X,e[48]=U,e[49]=J,e[50]=q,e[51]=Y,e[52]=Q,e[53]=se):se=e[53];const ee=se;let te;e[54]!==r?(te=L("w-full caption-bottom text-sm",r),e[54]=r,e[55]=te):te=e[55];let ae;e[56]!==g||e[57]!==v?(ae=(v||g)&&b.jsxs("colgroup",{children:[g&&b.jsx("col",{className:"w-12"}),v&&b.jsx("col",{className:"w-12"})]}),e[56]=g,e[57]=v,e[58]=ae):ae=e[58];let de;e[59]!==n||e[60]!==s||e[61]!==te||e[62]!==ae?(de=b.jsx("div",{className:"overflow-hidden rounded-md border border-border",children:b.jsxs("table",{className:te,...s,"data-ox-slot":"table",children:[ae,n]})}),e[59]=n,e[60]=s,e[61]=te,e[62]=ae,e[63]=de):de=e[63];const fe=de;if(g){let Z;e[64]===Symbol.for("react.memo_cache_sentinel")?(Z=Se=>E(String(Se.active.id)),e[64]=Z):Z=e[64];let ie;e[65]!==N||e[66]!==fe?(ie=b.jsx(Ls,{items:N,strategy:$s,children:fe}),e[65]=N,e[66]=fe,e[67]=ie):ie=e[67];let oe;e[68]!==H||e[69]!==A||e[70]!==ie?(oe=b.jsx(br,{collisionDetection:ol,sensors:A,onDragEnd:H,onDragStart:Z,children:ie}),e[68]=H,e[69]=A,e[70]=ie,e[71]=oe):oe=e[71];let me;return e[72]!==ee||e[73]!==oe?(me=b.jsx(ls.Provider,{value:ee,children:oe}),e[72]=ee,e[73]=oe,e[74]=me):me=e[74],me}let ge;return e[75]!==ee||e[76]!==fe?(ge=b.jsx(ls.Provider,{value:ee,children:fe}),e[75]=ee,e[76]=fe,e[77]=ge):ge=e[77],ge},Ws=()=>k.useContext(ls),Ra=t=>{const e=T.compilerRuntimeExports.c(7),{columns:n}=t,r=Ws();let s;e[0]!==r?.selectable?(s=r?.selectable?b.jsx("td",{className:"px-3 py-2",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(Vt,{className:"h-[21px] w-4",shape:"circle"})})}):null,e[0]=r?.selectable,e[1]=s):s=e[1];let o;e[2]!==n?(o=Array.from({length:n}).map(mb),e[2]=n,e[3]=o):o=e[3];let i;return e[4]!==s||e[5]!==o?(i=b.jsxs("tr",{className:"border-b transition-colors",children:[s,o]}),e[4]=s,e[5]=o,e[6]=i):i=e[6],i};function mb(t,e){return b.jsx("td",{className:"px-3 py-2",children:b.jsx(Vt,{className:"h-[21px] w-full"})},e)}const pb=t=>{const e=T.compilerRuntimeExports.c(13);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=Ws();let i;e[4]!==r?(i=L("[&_tr:last-child]:border-0",r),e[4]=r,e[5]=i):i=e[5];let l;e[6]!==n||e[7]!==o?(l=o?.isLoading?Array.from({length:o.skeletonRows}).map((c,d)=>b.jsx(Ra,{columns:o.skeletonColumns},d)):n,e[6]=n,e[7]=o,e[8]=l):l=e[8];let a;return e[9]!==s||e[10]!==i||e[11]!==l?(a=b.jsx("tbody",{className:i,...s,"data-ox-slot":"table-body",children:l}),e[9]=s,e[10]=i,e[11]=l,e[12]=a):a=e[12],a},hb=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("p-3 align-middle whitespace-nowrap",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("td",{className:o,...s,"data-ox-slot":"table-cell",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},gb=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mb-4 flex items-center justify-between gap-4",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"table-controls",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},xb=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("border-t border-border font-medium",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("tfoot",{className:o,...s,"data-ox-slot":"table-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},bb=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("h-10 px-3 text-left align-middle font-medium whitespace-nowrap text-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("th",{className:o,...s,"data-ox-slot":"table-head",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Na=k.createContext({isHeader:!1}),vb=()=>k.useContext(Na),yb=t=>{const e=T.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={isHeader:!0},e[4]=o):o=e[4];let i;e[5]!==r?(i=L("[&_tr]:border-b",r),e[5]=r,e[6]=i):i=e[6];let l;return e[7]!==n||e[8]!==s||e[9]!==i?(l=b.jsx(Na.Provider,{value:o,children:b.jsx("thead",{className:i,...s,"data-ox-slot":"table-header",children:n})}),e[7]=n,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},Pt=t=>t==="indeterminate",wb=t=>{const e=T.compilerRuntimeExports.c(53);let n,r,s,o,i,l,a,c,d,u,f,m;e[0]!==t?({checked:n,className:r,defaultChecked:s,disabled:o,error:l,id:u,name:a,onChange:c,onCheckedChange:d,required:f,value:m,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12]);const h=Ze(),p=k.useId(),g=k.useRef(null),x=o??h?.disabled??!1,v=l??!!h?.error,y=f??h?.required??!1,w=u??h?.id??p,C=s??!1;let O;e[13]!==d?(O=Y=>{Y!==void 0&&d?.(Y)},e[13]=d,e[14]=O):O=e[14];let S;e[15]!==n||e[16]!==C||e[17]!==O?(S={value:n,defaultValue:C,onChange:O,name:"OxCheckbox"},e[15]=n,e[16]=C,e[17]=O,e[18]=S):S=e[18];const[E,R]=T.useControllableState(S);let N,j;e[19]!==E?(N=()=>{g.current&&(g.current.indeterminate=Pt(E))},j=[E],e[19]=E,e[20]=N,e[21]=j):(N=e[20],j=e[21]),k.useEffect(N,j);let D;e[22]!==E||e[23]!==x?(D=()=>x?"disabled":Pt(E)?"indeterminate":E?"checked":"unchecked",e[22]=E,e[23]=x,e[24]=D):D=e[24];const P=D;let M;Pt(E)?M="mixed":E?M="true":M="false";let z;e[25]!==c||e[26]!==R?(z=Y=>{c?.(Y),R(Q=>Pt(Q)?!0:Y.target.checked)},e[25]=c,e[26]=R,e[27]=z):z=e[27];const A=z,$=Pt(E)?le.Minus:le.Check;let I;e[28]!==E?(I=Pt(E)?!1:E??!1,e[28]=E,e[29]=I):I=e[29];const V=I,_=M;let F;e[30]!==r?(F=L("peer size-4 shrink-0 cursor-pointer appearance-none rounded-sm border border-input bg-transparent shadow-xs","transition-shadow outline-none","ox-focus-ring","checked:border-primary checked:bg-primary",'data-[ox-state="indeterminate"]:border-primary data-[ox-state="indeterminate"]:bg-primary',"aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",r),e[30]=r,e[31]=F):F=e[31];const W=P();let B;e[32]!==M||e[33]!==i||e[34]!==A||e[35]!==v||e[36]!==w||e[37]!==V||e[38]!==x||e[39]!==y||e[40]!==a||e[41]!==F||e[42]!==W||e[43]!==m?(B=b.jsx("input",{id:w,"aria-checked":_,"aria-invalid":v,"aria-required":y,className:F,"data-ox-slot":"checkbox",disabled:x,name:a,ref:g,required:y,type:"checkbox",value:m,onChange:A,...i,checked:V,"data-ox-state":W}),e[32]=M,e[33]=i,e[34]=A,e[35]=v,e[36]=w,e[37]=V,e[38]=x,e[39]=y,e[40]=a,e[41]=F,e[42]=W,e[43]=m,e[44]=B):B=e[44];let H;e[45]!==E?(H=L("pointer-events-none absolute inset-0 m-auto text-primary-foreground",{"opacity-80":Pt(E),"opacity-0 peer-checked:opacity-80":!Pt(E)}),e[45]=E,e[46]=H):H=e[46];let G;e[47]!==$||e[48]!==H?(G=b.jsx(ue,{className:H,icon:$}),e[47]=$,e[48]=H,e[49]=G):G=e[49];let K;return e[50]!==B||e[51]!==G?(K=b.jsxs("div",{className:'relative inline-flex shrink-0 [&_svg:not([class*="size-"])]:size-3.5',children:[B,G]}),e[50]=B,e[51]=G,e[52]=K):K=e[52],K},ja=k.createContext(void 0),Cb=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,disabled:s,name:i,onChange:l,value:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);let c;e[8]!==a?(c=a===void 0?[]:a,e[8]=a,e[9]=c):c=e[9];const d=c,u=Ze(),f=s??u?.disabled??!1;let m;e[10]!==f||e[11]!==i||e[12]!==l||e[13]!==d?(m={value:d,onChange:l,name:i,disabled:f},e[10]=f,e[11]=i,e[12]=l,e[13]=d,e[14]=m):m=e[14];const h=u?.labelId;let p;e[15]!==r?(p=L("space-y-2",r),e[15]=r,e[16]=p):p=e[16];let g;e[17]!==n||e[18]!==o||e[19]!==h||e[20]!==p?(g=b.jsx("div",{"aria-labelledby":h,className:p,"data-ox-slot":"checkbox-group",role:"group",...o,children:n}),e[17]=n,e[18]=o,e[19]=h,e[20]=p,e[21]=g):g=e[21];let x;return e[22]!==m||e[23]!==g?(x=b.jsx(ja.Provider,{value:m,children:g}),e[22]=m,e[23]=g,e[24]=x):x=e[24],x},Ob=()=>k.useContext(ja),Eb=t=>{const e=T.compilerRuntimeExports.c(37);let n,r,s,o,i,l,a,c,d;e[0]!==t?({className:n,disabled:o,error:a,id:l,name:i,onChange:s,required:c,value:d,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=a===void 0?!1:a,f=c===void 0?!1:c,m=k.useId(),h=Ob();if(!h)throw new Error("CheckboxGroupItem must be used within CheckboxGroup");const p=l||m,g=o??h.disabled??!1,x=i??h.name;let v;e[10]!==h.value||e[11]!==d?(v=h.value?.includes(d)??!1,e[10]=h.value,e[11]=d,e[12]=v):v=e[12];const y=v;let w;e[13]!==h||e[14]!==s||e[15]!==d?(w=P=>{s?.(P);const M=h.value,A=P.target.checked?[...M,d]:M.filter($=>$!==d);h.onChange?.(A)},e[13]=h,e[14]=s,e[15]=d,e[16]=w):w=e[16];const C=w;let O;e[17]!==g||e[18]!==y?(O=()=>g?"disabled":y?"checked":"unchecked",e[17]=g,e[18]=y,e[19]=O):O=e[19];const S=O;let E;e[20]!==n?(E=L("peer size-4 shrink-0 cursor-pointer appearance-none rounded-sm border border-input bg-transparent shadow-xs","transition-shadow outline-none","ox-focus-ring","checked:border-primary checked:bg-primary","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[20]=n,e[21]=E):E=e[21];const R=S();let N;e[22]!==g||e[23]!==r||e[24]!==u||e[25]!==C||e[26]!==p||e[27]!==y||e[28]!==x||e[29]!==f||e[30]!==E||e[31]!==R||e[32]!==d?(N=b.jsx("input",{id:p,"aria-checked":y,"aria-invalid":u,"aria-required":f,className:E,"data-ox-slot":"checkbox",disabled:g,name:x,required:f,type:"checkbox",value:d,onChange:C,...r,checked:y,"data-ox-state":R}),e[22]=g,e[23]=r,e[24]=u,e[25]=C,e[26]=p,e[27]=y,e[28]=x,e[29]=f,e[30]=E,e[31]=R,e[32]=d,e[33]=N):N=e[33];let j;e[34]===Symbol.for("react.memo_cache_sentinel")?(j=b.jsx(ue,{className:"pointer-events-none absolute inset-0 m-auto text-primary-foreground opacity-0 peer-checked:opacity-80",icon:le.Check}),e[34]=j):j=e[34];let D;return e[35]!==N?(D=b.jsxs("div",{className:'relative inline-flex shrink-0 [&_svg:not([class*="size-"])]:size-3.5',children:[N,j]}),e[35]=N,e[36]=D):D=e[36],D},as=Object.assign(wb,{Group:Cb,GroupItem:Eb}),Da=k.createContext(null),Sb=t=>t.map(e=>e.includes("/")?e:`.${e}`).join(","),oi=t=>{const e={B:1,KB:1024,MB:1048576,GB:1073741824},n=t.match(/^(\d+(?:\.\d+)?)\s*(B|KB|MB|GB)$/i);if(!n)throw new Error(`Invalid size format: ${t}. Use format like "5MB", "1.5GB", etc.`);const[,r,s]=n;return Number.parseFloat(r)*e[s.toUpperCase()]},kb=(t,e)=>e.some(n=>n.includes("/")?n.endsWith("/*")?t.type.startsWith(n.slice(0,-1)):t.type===n:t.name.toLowerCase().endsWith(`.${n.toLowerCase()}`)),Rb=t=>{t.preventDefault(),t.stopPropagation()},Nb=t=>{const e=T.compilerRuntimeExports.c(74);let n,r,s,o,i,l,a,c,d,u,f;e[0]!==t?({accept:d,children:n,className:r,disabled:u,maxFiles:o,maxSize:i,minSize:l,multiple:f,onError:a,onFileSelect:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11]);let m;e[12]!==d?(m=d===void 0?[]:d,e[12]=d,e[13]=m):m=e[13];const h=m,p=u===void 0?!1:u,g=f===void 0?!1:f,x=k.useRef(null);let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[14]=v):v=e[14];const[y,w]=k.useState(v),[C,O]=k.useState(!1),[S,E]=k.useState();let R;e[15]!==h||e[16]!==o||e[17]!==i||e[18]!==l||e[19]!==g?(R=ee=>{if(!g&&ee.length>1)return"Only single file selection is allowed";if(o&&ee.length>o)return`Maximum ${o} file${o===1?"":"s"} allowed`;if(ee.length===0)return null;if(h.length>0&&ee.filter(ae=>!kb(ae,h)).length>0)return`Invalid file type. Accepted formats: ${h.join(", ")}`;if(i){const te=oi(i);if(ee.filter(de=>de.size>te).length>0)return`File size must not exceed ${i}`}if(l){const te=oi(l);if(ee.filter(de=>de.size<te).length>0)return`File size must be at least ${l}`}return null},e[15]=h,e[16]=o,e[17]=i,e[18]=l,e[19]=g,e[20]=R):R=e[20];const N=R;let j;e[21]!==a||e[22]!==c||e[23]!==N?(j=ee=>{const te=N(ee);if(te){E(te),a?.(te);return}E(void 0),w(ee),c?.(ee)},e[21]=a,e[22]=c,e[23]=N,e[24]=j):j=e[24];const D=j;let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=()=>{w([]),E(void 0)},e[25]=P):P=e[25];const M=P;let z;e[26]!==p?(z=()=>{!p&&x.current&&x.current.click()},e[26]=p,e[27]=z):z=e[27];const A=z;let $;e[28]!==D?($=ee=>{const te=[...ee.target.files||[]];te.length>0&&D(te),ee.target.value=""},e[28]=D,e[29]=$):$=e[29];const I=$;let V;e[30]!==h||e[31]!==p||e[32]!==S||e[33]!==y||e[34]!==C||e[35]!==o||e[36]!==i||e[37]!==l||e[38]!==g||e[39]!==a||e[40]!==c||e[41]!==A||e[42]!==D||e[43]!==N?(V={accept:h,clearFiles:M,disabled:p,error:S,files:y,isDragActive:C,maxFiles:o,maxSize:i,minSize:l,multiple:g,onError:a,onFileSelect:c,openFilePicker:A,selectFiles:D,validateFiles:N},e[30]=h,e[31]=p,e[32]=S,e[33]=y,e[34]=C,e[35]=o,e[36]=i,e[37]=l,e[38]=g,e[39]=a,e[40]=c,e[41]=A,e[42]=D,e[43]=N,e[44]=V):V=e[44];const _=V;let F;e[45]!==p?(F=ee=>{ee.preventDefault(),ee.stopPropagation(),p||O(!0)},e[45]=p,e[46]=F):F=e[46];const W=F;let B;e[47]!==p?(B=ee=>{ee.preventDefault(),ee.stopPropagation(),!p&&!ee.currentTarget.contains(ee.relatedTarget)&&O(!1)},e[47]=p,e[48]=B):B=e[48];const H=B;let G;e[49]!==p||e[50]!==D?(G=ee=>{if(ee.preventDefault(),ee.stopPropagation(),p)return;O(!1);const te=[...ee.dataTransfer.files];D(te)},e[49]=p,e[50]=D,e[51]=G):G=e[51];const K=G;let Y;e[52]!==r?(Y=L("relative",r),e[52]=r,e[53]=Y):Y=e[53];const Q=C?"drag-active":"idle";let X;e[54]!==h?(X=h.length>0?Sb(h):void 0,e[54]=h,e[55]=X):X=e[55];let U;e[56]===Symbol.for("react.memo_cache_sentinel")?(U={display:"none"},e[56]=U):U=e[56];let J;e[57]!==p||e[58]!==I||e[59]!==g||e[60]!==X?(J=b.jsx("input",{accept:X,className:"hidden","data-ox-slot":"file-upload-input",disabled:p,multiple:g,ref:x,style:U,type:"file",onChange:I}),e[57]=p,e[58]=I,e[59]=g,e[60]=X,e[61]=J):J=e[61];let q;e[62]!==n||e[63]!==s||e[64]!==W||e[65]!==H||e[66]!==K||e[67]!==Y||e[68]!==Q||e[69]!==J?(q=b.jsxs("div",{className:Y,"data-ox-slot":"file-upload",...s,"data-ox-state":Q,onDragEnter:W,onDragLeave:H,onDragOver:Rb,onDrop:K,children:[n,J]}),e[62]=n,e[63]=s,e[64]=W,e[65]=H,e[66]=K,e[67]=Y,e[68]=Q,e[69]=J,e[70]=q):q=e[70];let se;return e[71]!==_||e[72]!==q?(se=b.jsx(Da.Provider,{value:_,children:q}),e[71]=_,e[72]=q,e[73]=se):se=e[73],se},Hs=()=>{const t=k.useContext(Da);if(!t)throw new Error("useFileUploadContext must be used within a FileUploadContext.Provider");return t},jb=t=>{const e=T.compilerRuntimeExports.c(29);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o,error:i,isDragActive:l,openFilePicker:a}=Hs();let c;e[4]!==o||e[5]!==i||e[6]!==l?(c=()=>i?"error":l?"drag-active":o?"disabled":"idle",e[4]=o,e[5]=i,e[6]=l,e[7]=c):c=e[7];const d=c,u=!l&&!i,f=!i&&!o;let m;e[8]!==r||e[9]!==o||e[10]!==i||e[11]!==l||e[12]!==u||e[13]!==f?(m=L("rounded-lg border-2 border-dashed p-6 transition-all duration-200",{"border-border bg-card":u,"border-primary bg-card":l,"border-destructive bg-card":i,"cursor-pointer focus:border-primary focus:outline-none":f,"ox-default-disabled":o},r),e[8]=r,e[9]=o,e[10]=i,e[11]=l,e[12]=u,e[13]=f,e[14]=m):m=e[14];const h=o?-1:0,p=d();let g;e[15]!==o||e[16]!==a?(g=y=>{(y.key==="Enter"||y.key===" ")&&!o&&(y.preventDefault(),a())},e[15]=o,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==i?(x=i&&b.jsx("div",{className:"mt-2 text-center text-sm text-destructive",children:i}),e[18]=i,e[19]=x):x=e[19];let v;return e[20]!==n||e[21]!==s||e[22]!==a||e[23]!==m||e[24]!==h||e[25]!==p||e[26]!==g||e[27]!==x?(v=b.jsxs("div",{className:m,role:"button",tabIndex:h,...s,"data-ox-slot":"file-upload-area","data-ox-state":p,onClick:a,onKeyDown:g,children:[n,x]}),e[20]=n,e[21]=s,e[22]=a,e[23]=m,e[24]=h,e[25]=p,e[26]=g,e[27]=x,e[28]=v):v=e[28],v},Db=t=>{const e=T.compilerRuntimeExports.c(16);let n,r,s,o,i;e[0]!==t?({children:n,className:r,size:o,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?"md":o,a=i===void 0?"primary":i,{disabled:c,openFilePicker:d}=Hs();let u;e[6]!==r?(u=L("cursor-pointer",r),e[6]=r,e[7]=u):u=e[7];let f;return e[8]!==n||e[9]!==c||e[10]!==s||e[11]!==d||e[12]!==l||e[13]!==u||e[14]!==a?(f=b.jsx(Je,{className:u,disabled:c,size:l,type:"button",variant:a,...s,onClick:d,children:n}),e[8]=n,e[9]=c,e[10]=s,e[11]=d,e[12]=l,e[13]=u,e[14]=a,e[15]=f):f=e[15],f},Pb=t=>{const e=T.compilerRuntimeExports.c(41);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const[o,i]=k.useState(!1),{disabled:l,isDragActive:a,openFilePicker:c}=Hs();let d;e[4]!==l||e[5]!==a||e[6]!==o?(d=()=>a?"drag-active":o?"hovered":l?"disabled":"idle",e[4]=l,e[5]=a,e[6]=o,e[7]=d):d=e[7];const u=d,f=(o||a)&&!l;let m;e[8]!==r||e[9]!==l?(m=L("ox-backdrop-blur-parent group relative w-fit cursor-pointer overflow-hidden rounded-lg","ox-focus-ring",{"cursor-not-allowed opacity-50":l},r),e[8]=r,e[9]=l,e[10]=m):m=e[10];const h=l?-1:0,p=u();let g;e[11]!==l||e[12]!==c?(g=D=>{(D.key==="Enter"||D.key===" ")&&!l&&(D.preventDefault(),c())},e[11]=l,e[12]=c,e[13]=g):g=e[13];let x,v;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=()=>i(!0),v=()=>i(!1),e[14]=x,e[15]=v):(x=e[14],v=e[15]);const y=!f;let w;e[16]!==a||e[17]!==f||e[18]!==y?(w=L("absolute inset-0 flex w-full items-center justify-center transition-all duration-200","bg-background/70 backdrop-blur-sm",{"pointer-events-none opacity-0":y,"opacity-100":f,"bg-primary/60":a}),e[16]=a,e[17]=f,e[18]=y,e[19]=w):w=e[19];const C=!f;let O;e[20]!==a||e[21]!==f||e[22]!==C?(O=L("flex flex-col items-center gap-2 text-white transition-transform duration-200",{"scale-90":C,"scale-100":f,"scale-110":a}),e[20]=a,e[21]=f,e[22]=C,e[23]=O):O=e[23];const S=a?le.CloudUpload:le.Upload;let E;e[24]!==S?(E=b.jsx(ue,{className:"text-white drop-shadow-[0_0_12px_rgba(255,255,255,0.7)]",icon:S,size:"xl"}),e[24]=S,e[25]=E):E=e[25];let R;e[26]!==O||e[27]!==E?(R=b.jsx("div",{className:O,children:E}),e[26]=O,e[27]=E,e[28]=R):R=e[28];let N;e[29]!==R||e[30]!==w?(N=b.jsx("div",{className:w,"data-ox-slot":"file-upload-overlay-backdrop",children:R}),e[29]=R,e[30]=w,e[31]=N):N=e[31];let j;return e[32]!==n||e[33]!==s||e[34]!==c||e[35]!==N||e[36]!==m||e[37]!==h||e[38]!==p||e[39]!==g?(j=b.jsxs("div",{className:m,role:"button",tabIndex:h,...s,"data-ox-slot":"file-upload-overlay","data-ox-state":p,onClick:c,onKeyDown:g,onMouseEnter:x,onMouseLeave:v,children:[n,N]}),e[32]=n,e[33]=s,e[34]=c,e[35]=N,e[36]=m,e[37]=h,e[38]=p,e[39]=g,e[40]=j):j=e[40],j},Tb=Object.assign(Nb,{Area:jb,Button:Db,Overlay:Pb}),Mb=t=>{const e=T.compilerRuntimeExports.c(14);let n,r,s,o,i;e[0]!==t?({children:n,className:r,fullWidth:o,noValidate:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,a=i===void 0?!0:i;let c;e[6]!==r||e[7]!==l?(c=L({"w-full":l},r),e[6]=r,e[7]=l,e[8]=c):c=e[8];let d;return e[9]!==n||e[10]!==s||e[11]!==a||e[12]!==c?(d=b.jsx("form",{className:c,"data-ox-slot":"form",noValidate:a,...s,children:n}),e[9]=n,e[10]=s,e[11]=a,e[12]=c,e[13]=d):d=e[13],d},Ib=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Jt,{...t}),e[0]=t,e[1]=n):n=e[1],n},Ab=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Oa,{...t}),e[0]=t,e[1]=n):n=e[1],n},_b=L("grid grid-cols-[auto_1fr] items-center gap-x-3 gap-y-1",'input[data-ox-slot="checkbox"]:col-start-1','input[data-ox-slot="checkbox"]:row-start-1','input[data-ox-slot="radio"]:col-start-1','input[data-ox-slot="radio"]:row-start-1','button[data-ox-slot="switch"]:col-start-1','button[data-ox-slot="switch"]:row-start-1',"*:data-[ox-slot=label]:col-start-2","*:data-[ox-slot=description]:col-start-2","*:data-[ox-slot=error]:col-start-2"),$b=L("grid grid-cols-[1fr_auto] items-center gap-x-3 gap-y-1",'input[data-ox-slot="checkbox"]:col-start-2','input[data-ox-slot="checkbox"]:row-start-1','input[data-ox-slot="radio"]:col-start-2','input[data-ox-slot="radio"]:row-start-1','button[data-ox-slot="switch"]:col-start-2','button[data-ox-slot="switch"]:row-start-1',"*:data-[ox-slot=label]:col-start-1","*:data-[ox-slot=label]:row-start-1","*:data-[ox-slot=description]:col-start-1","*:data-[ox-slot=error]:col-start-1"),Lb=t=>{const e=T.compilerRuntimeExports.c(28);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,disabled:i,error:l,id:s,labelPosition:a,orientation:c,required:d,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=i===void 0?!1:i,f=l===void 0?!1:l,m=a===void 0?"start":a,h=c===void 0?"vertical":c,p=d===void 0?!1:d,g=k.useId(),x=s??g,v=`${x}-label`,y=h==="horizontal",w=m==="end";let C;e[10]!==u||e[11]!==f||e[12]!==x||e[13]!==v||e[14]!==p?(C={disabled:u,error:f,id:x,labelId:v,required:p},e[10]=u,e[11]=f,e[12]=x,e[13]=v,e[14]=p,e[15]=C):C=e[15];const O=!y,S=y&&!w,E=y&&w;let R;e[16]!==r||e[17]!==O||e[18]!==S||e[19]!==E?(R=L({"space-y-1":O,[_b]:S,[$b]:E},r),e[16]=r,e[17]=O,e[18]=S,e[19]=E,e[20]=R):R=e[20];let N;e[21]!==n||e[22]!==o||e[23]!==R?(N=b.jsx("div",{className:R,...o,"data-ox-slot":"form-field",children:n}),e[21]=n,e[22]=o,e[23]=R,e[24]=N):N=e[24];let j;return e[25]!==N||e[26]!==C?(j=b.jsx(Ca.Provider,{value:C,children:N}),e[25]=N,e[26]=C,e[27]=j):j=e[27],j},zb=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,layout:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o==="grid";let l;e[5]!==r||e[6]!==i?(l=L("space-y-6",{"md:>*:data-[ox-slot=heading]:[grid-column:1] md:>*:data-[ox-slot=description]:[grid-column:1] md:>div:[grid-column:2] md:grid md:grid-cols-[1fr_2fr] md:gap-x-8 md:gap-y-3":i},r),e[5]=r,e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==n||e[9]!==s||e[10]!==l?(a=b.jsx("div",{className:l,"data-ox-slot":"form-group",...s,children:n}),e[8]=n,e[9]=s,e[10]=l,e[11]=a):a=e[11],a},Fb=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Ea,{...t}),e[0]=t,e[1]=n):n=e[1],n},Vb=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Sa,{...t}),e[0]=t,e[1]=n):n=e[1],n},Bb=Object.assign(Mb,{Description:Ib,Error:Ab,Field:Lb,Group:zb,GroupTitle:Fb,Label:Vb}),Tn=k.createContext(null),an=()=>{const t=k.useContext(Tn);if(!t)throw new Error("useBaseInputContext must be used within a BaseInput component");return t},St=t=>{const e=T.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o}=an();let i;e[4]!==r?(i=L("enabled:cursor-pointer","disabled:ox-default-disabled",r),e[4]=r,e[5]=i):i=e[5];let l;return e[6]!==n||e[7]!==o||e[8]!==s||e[9]!==i?(l=b.jsx("button",{className:i,disabled:o,tabIndex:-1,type:"button",...s,"data-ox-slot":"input-button",children:n}),e[6]=n,e[7]=o,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},Wb=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},kr=t=>{const e=T.compilerRuntimeExports.c(21);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o,error:i,setShowValidation:l,showValidation:a,validationMessage:c}=an(),d=a&&!!c,u=!i;let f;e[4]!==r||e[5]!==o||e[6]!==i||e[7]!==u?(f=L("flex h-9 w-full items-center gap-2 rounded-md border bg-transparent px-3 py-1","dark:bg-input/30","text-base shadow-xs md:text-sm",'[&_svg:not([class*="size-"])]:size-4',"transition-[color,box-shadow]","outline-none focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",{"border-input":u,"border-destructive ring-destructive/20 dark:ring-destructive/40":i,"cursor-not-allowed opacity-50 [&_svg]:opacity-50":o},r),e[4]=r,e[5]=o,e[6]=i,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==n||e[10]!==s||e[11]!==f?(m=b.jsx(qn.Trigger,{asChild:!0,children:b.jsx("div",{className:f,...s,"data-ox-slot":"input-container",children:n})}),e[9]=n,e[10]=s,e[11]=f,e[12]=m):m=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=b.jsx(ue,{className:"text-destructive",icon:le.CircleAlert,size:"sm"}),e[13]=h):h=e[13];let p;e[14]!==c?(p=b.jsx(qn.Content,{showCloseButton:!1,children:b.jsxs("div",{className:"flex items-center gap-2 text-base text-destructive-foreground md:text-sm",children:[h,c]})}),e[14]=c,e[15]=p):p=e[15];let g;return e[16]!==d||e[17]!==l||e[18]!==m||e[19]!==p?(g=b.jsxs(qn,{closeOnOutsideClick:!0,open:d,side:"bottom",onOpenChange:l,children:[m,p]}),e[16]=d,e[17]=l,e[18]=m,e[19]=p,e[20]=g):g=e[20],g},Pa=k.createContext(null),Ys=()=>{const t=k.useContext(Pa);if(!t)throw new Error("useDateContext must be used within a DateInput component");return t},Hb=()=>{const t=T.compilerRuntimeExports.c(10),{close:e,day:n,month:r,setValue:s,year:o}=Ys();let i;t[0]!==n||t[1]!==r||t[2]!==o?(i=n&&r&&o&&o.length===4?`${o}-${r.padStart(2,"0")}-${n.padStart(2,"0")}`:void 0,t[0]=n,t[1]=r,t[2]=o,t[3]=i):i=t[3];const l=i;let a;t[4]!==e||t[5]!==s?(a=u=>{const[f,m,h]=u.split("-");s({day:h,month:m,year:f}),e()},t[4]=e,t[5]=s,t[6]=a):a=t[6];const c=a;let d;return t[7]!==l||t[8]!==c?(d=b.jsx(Ji,{value:l,onChange:c}),t[7]=l,t[8]=c,t[9]=d):d=t[9],d},Yb=t=>{if(!t)return{day:"",month:"",year:""};const[e="",n="",r=""]=t.split("-");return{day:r,month:n,year:e}},Ta=(t,e,n)=>{if(!t&&!e&&!n)return"";const r=t?t.padStart(2,"0"):"",s=e?e.padStart(2,"0"):"";return`${n?n.padStart(4,"0"):""}-${s}-${r}`},qb=(t,e)=>{if(!t)return 31;const n=Number.parseInt(t,10);if(n<1||n>12)return 31;const r=e&&e.length===4?Number.parseInt(e,10):new Date().getFullYear(),s=new Date(r,n-1,1);return lf(s)},Gb=t=>t.length===2?Number.parseInt(t,10)<50?`20${t}`:`19${t}`:t,Ub=(t,e,n)=>{if(!t||!e||!n||n.length<4)return!1;const r=Ta(t,e,n),s=sm(r,"yyyy-MM-dd",new Date);return Vi(s)},Kb=t=>{const e=T.compilerRuntimeExports.c(20),{defaultValue:n,onChange:r,value:s}=t,o=n??"";let i;e[0]!==r?(i=x=>r?.(x??""),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==o||e[3]!==i||e[4]!==s?(l={value:s,defaultValue:o,onChange:i},e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5];const[a,c]=T.useControllableState(l);let d;e[6]!==a?(d=Yb(a),e[6]=a,e[7]=d):d=e[7];const{day:u,month:f,year:m}=d;let h;e[8]!==u||e[9]!==f||e[10]!==c||e[11]!==m?(h=x=>{const v=x.day??u,y=x.month??f,w=x.year??m,C=Ta(v,y,w);c(C)},e[8]=u,e[9]=f,e[10]=c,e[11]=m,e[12]=h):h=e[12];const p=h;let g;return e[13]!==a||e[14]!==u||e[15]!==f||e[16]!==c||e[17]!==p||e[18]!==m?(g={autoCompleteYear:Gb,dateValue:a,day:u,getMaxDayForMonth:qb,isValidCompleteDate:Ub,month:f,setDateValue:c,setValue:p,year:m},e[13]=a,e[14]=u,e[15]=f,e[16]=c,e[17]=p,e[18]=m,e[19]=g):g=e[19],g},Xb=t=>{const e=T.compilerRuntimeExports.c(70);let n,r,s,o,i,l,a,c,d,u,f,m,h,p,g;e[0]!==t?({children:n,className:r,defaultOpen:o,defaultValue:m,disabled:i,error:a,onChange:c,onOpenChange:d,open:u,pickOnly:h,readOnly:p,required:f,validationMessage:s,value:g,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p,e[15]=g):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14],g=e[15]);const x=m===void 0?"":m,v=h===void 0?!1:h,y=p===void 0?!1:p,w=Ze(),C=i??w?.disabled??!1,O=a??!!w?.error,S=f??w?.required??!1,E=y||v;let R;e[16]!==c?(R=Z=>c?.(Z??""),e[16]=c,e[17]=R):R=e[17];let N;e[18]!==x||e[19]!==R||e[20]!==g?(N={value:g,defaultValue:x,onChange:R},e[18]=x,e[19]=R,e[20]=g,e[21]=N):N=e[21];const{autoCompleteYear:j,day:D,getMaxDayForMonth:P,isValidCompleteDate:M,month:z,setValue:A,year:$}=Kb(N);let I;e[22]!==o||e[23]!==C||e[24]!==d||e[25]!==u?(I={closeOnEscape:!0,closeOnOutsideClick:!0,defaultOpen:o,disabled:C,onOpenChange:d,open:u},e[22]=o,e[23]=C,e[24]=d,e[25]=u,e[26]=I):I=e[26];const{close:V,containerRef:_,isClosing:F,isVisible:W,open:B,toggle:H}=T.usePopperState(I),[G,K]=k.useState(s??""),[Y,Q]=k.useState(!!s),X=w?.id;let U;e[27]!==O||e[28]!==C||e[29]!==S||e[30]!==Y||e[31]!==X||e[32]!==G?(U={disabled:C,error:O,id:X,required:S,setShowValidation:Q,setValidationMessage:K,showValidation:Y,validationMessage:G},e[27]=O,e[28]=C,e[29]=S,e[30]=Y,e[31]=X,e[32]=G,e[33]=U):U=e[33];let J;e[34]!==j||e[35]!==V||e[36]!==D||e[37]!==E||e[38]!==P||e[39]!==B||e[40]!==M||e[41]!==z||e[42]!==v||e[43]!==A||e[44]!==H||e[45]!==$?(J={autoCompleteYear:j,close:V,day:D,getMaxDayForMonth:P,isValidCompleteDate:M,month:z,open:B,pickOnly:v,readOnly:E,setValue:A,toggle:H,year:$},e[34]=j,e[35]=V,e[36]=D,e[37]=E,e[38]=P,e[39]=B,e[40]=M,e[41]=z,e[42]=v,e[43]=A,e[44]=H,e[45]=$,e[46]=J):J=e[46];let q;e[47]!==r?(q=L("w-fit",r),e[47]=r,e[48]=q):q=e[48];let se;e[49]!==n||e[50]!==l?(se=b.jsx(kr,{...l,children:n}),e[49]=n,e[50]=l,e[51]=se):se=e[51];let ee;e[52]!==q||e[53]!==se?(ee=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx("div",{className:q,children:se})}),e[52]=q,e[53]=se,e[54]=ee):ee=e[54];let te;e[55]!==F||e[56]!==W?(te=W&&b.jsx(ke.Content,{align:"center",className:"ox-date-input-animate","data-ox-state":F?"closing":"open",side:"bottom",sideOffset:8,children:b.jsx(Hb,{})}),e[55]=F,e[56]=W,e[57]=te):te=e[57];let ae;e[58]!==ee||e[59]!==te?(ae=b.jsxs(ke,{children:[ee,te]}),e[58]=ee,e[59]=te,e[60]=ae):ae=e[60];let de;e[61]!==_||e[62]!==ae?(de=b.jsx("div",{ref:_,children:ae}),e[61]=_,e[62]=ae,e[63]=de):de=e[63];let fe;e[64]!==de||e[65]!==J?(fe=b.jsx(Pa.Provider,{value:J,children:de}),e[64]=de,e[65]=J,e[66]=fe):fe=e[66];let ge;return e[67]!==fe||e[68]!==U?(ge=b.jsx(Tn.Provider,{value:U,children:fe}),e[67]=fe,e[68]=U,e[69]=ge):ge=e[69],ge},zt=t=>{const e=T.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({className:n,id:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=k.useId(),{disabled:i,error:l,id:a,required:c,setShowValidation:d,setValidationMessage:u}=an();let f;e[4]!==d||e[5]!==u?(f=v=>{v.preventDefault(),u(v.currentTarget.validationMessage),d(!0)},e[4]=d,e[5]=u,e[6]=f):f=e[6];const m=f,h=s??a??o;let p;e[7]!==n?(p=L("w-full min-w-10 appearance-none bg-transparent outline-none","placeholder:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50",n),e[7]=n,e[8]=p):p=e[8];let g;e[9]!==d?(g=()=>d(!1),e[9]=d,e[10]=g):g=e[10];let x;return e[11]!==i||e[12]!==r||e[13]!==l||e[14]!==m||e[15]!==h||e[16]!==c||e[17]!==p||e[18]!==g?(x=b.jsx("input",{id:h,"aria-invalid":l,"aria-required":c,className:p,disabled:i,required:c,onInput:g,onInvalid:m,...r,"data-ox-slot":"input"}),e[11]=i,e[12]=r,e[13]=l,e[14]=m,e[15]=h,e[16]=c,e[17]=p,e[18]=g,e[19]=x):x=e[19],x},Ur=ot(["text-center","[appearance:textfield]","[&::-webkit-inner-spin-button]:appearance-none","[&::-webkit-outer-spin-button]:appearance-none"],{variants:{type:{day:"w-6 min-w-6",month:"w-6 min-w-6",year:"w-10 min-w-10"},pickOnly:{true:"enabled:cursor-pointer",false:""}}}),ii=ot("text-muted-foreground",{variants:{disabled:{true:"opacity-50",false:""}}}),Qb=()=>{const t=T.compilerRuntimeExports.c(92),{disabled:e,setValidationMessage:n}=an(),{autoCompleteYear:r,day:s,getMaxDayForMonth:o,isValidCompleteDate:i,month:l,open:a,pickOnly:c,readOnly:d,setValue:u,toggle:f,year:m}=Ys(),h=k.useRef(null),p=k.useRef(null),g=k.useRef(null);let x;t[0]!==s||t[1]!==o||t[2]!==l||t[3]!==u||t[4]!==m?(x=Z=>{const ie=o(l,m);let oe;s?oe=Number.parseInt(s,10):Z===1?oe=0:oe=ie+1;let me;Z===1?me=oe>=ie?1:oe+1:me=oe<=1?ie:oe-1,u({day:String(me)})},t[0]=s,t[1]=o,t[2]=l,t[3]=u,t[4]=m,t[5]=x):x=t[5];const v=x;let y;t[6]!==s||t[7]!==o||t[8]!==l||t[9]!==u||t[10]!==m?(y=Z=>{let ie;l?ie=Number.parseInt(l,10):Z===1?ie=0:ie=13;let oe;Z===1?oe=ie>=12?1:ie+1:oe=ie<=1?12:ie-1;const me=o(String(oe),m);(s?Number.parseInt(s,10):0)>me?u({day:String(me),month:String(oe)}):u({month:String(oe)})},t[6]=s,t[7]=o,t[8]=l,t[9]=u,t[10]=m,t[11]=y):y=t[11];const w=y;let C;t[12]!==o||t[13]!==l||t[14]!==u||t[15]!==m?(C=Z=>{const ie=Z.target.value,oe=o(l,m);(ie===""||/^\d{1,2}$/.test(ie)&&Number.parseInt(ie,10)<=oe)&&u({day:ie})},t[12]=o,t[13]=l,t[14]=u,t[15]=m,t[16]=C):C=t[16];const O=C;let S;t[17]!==u?(S=Z=>{const ie=Z.target.value;(ie===""||/^\d{1,2}$/.test(ie)&&Number.parseInt(ie,10)<=12)&&u({month:ie})},t[17]=u,t[18]=S):S=t[18];const E=S;let R;t[19]!==u?(R=Z=>{const ie=Z.target.value;(ie===""||/^\d{1,4}$/.test(ie)&&Number.parseInt(ie,10)<=2100)&&u({year:ie})},t[19]=u,t[20]=R):R=t[20];const N=R;let j;t[21]!==v?(j=Z=>{Z.key==="ArrowUp"?(Z.preventDefault(),v(1)):Z.key==="ArrowDown"?(Z.preventDefault(),v(-1)):(Z.key==="Tab"&&!Z.shiftKey||Z.key==="Enter"||Z.key==="-")&&(Z.preventDefault(),p.current?.focus())},t[21]=v,t[22]=j):j=t[22];const D=j;let P;t[23]!==w||t[24]!==l?(P=Z=>{Z.key==="ArrowUp"?(Z.preventDefault(),w(1)):Z.key==="ArrowDown"?(Z.preventDefault(),w(-1)):Z.key==="Tab"&&Z.shiftKey?(Z.preventDefault(),h.current?.focus()):Z.key==="Tab"&&!Z.shiftKey||Z.key==="Enter"||Z.key==="-"?(Z.preventDefault(),g.current?.focus()):Z.key==="Backspace"&&l===""&&h.current?.focus()},t[23]=w,t[24]=l,t[25]=P):P=t[25];const M=P;let z;t[26]!==m?(z=Z=>{Z.key==="Tab"&&Z.shiftKey?(Z.preventDefault(),p.current?.focus()):Z.key==="Backspace"&&m===""&&p.current?.focus()},t[26]=m,t[27]=z):z=t[27];const A=z;let $;t[28]!==s||t[29]!==i||t[30]!==l||t[31]!==n||t[32]!==m?($=()=>{s&&l&&m?i(s,l,m)?n(""):n("Invalid date"):n("")},t[28]=s,t[29]=i,t[30]=l,t[31]=n,t[32]=m,t[33]=$):$=t[33];const I=$;let V;t[34]!==I?(V=()=>{I()},t[34]=I,t[35]=V):V=t[35];const _=V;let F;t[36]!==I?(F=()=>{I()},t[36]=I,t[37]=F):F=t[37];const W=F;let B;t[38]!==r||t[39]!==u||t[40]!==I||t[41]!==m?(B=()=>{if(m.length===2){const Z=r(m);u({year:Z})}I()},t[38]=r,t[39]=u,t[40]=I,t[41]=m,t[42]=B):B=t[42];const H=B;let G;t[43]!==a||t[44]!==c||t[45]!==f?(G=()=>{c&&!a&&f()},t[43]=a,t[44]=c,t[45]=f,t[46]=G):G=t[46];const K=G,Y=c&&!e;let Q;t[47]!==Y?(Q=L("flex items-center gap-1 bg-transparent font-mono",{"cursor-pointer":Y}),t[47]=Y,t[48]=Q):Q=t[48];let X;t[49]!==c?(X=Ur({type:"day",pickOnly:c}),t[49]=c,t[50]=X):X=t[50];let U;t[51]!==s||t[52]!==_||t[53]!==O||t[54]!==D||t[55]!==d||t[56]!==X?(U=b.jsx(zt,{"aria-label":"Day",autoComplete:"off",className:X,inputMode:"numeric",max:"31",min:"0",pattern:"[0-9]*",placeholder:"dd",readOnly:d,ref:h,type:"number",value:s,onBlur:_,onChange:O,onKeyDown:D}),t[51]=s,t[52]=_,t[53]=O,t[54]=D,t[55]=d,t[56]=X,t[57]=U):U=t[57];let J;t[58]!==e?(J=ii({disabled:e}),t[58]=e,t[59]=J):J=t[59];let q;t[60]!==J?(q=b.jsx("span",{className:J,children:"-"}),t[60]=J,t[61]=q):q=t[61];let se;t[62]!==c?(se=Ur({type:"month",pickOnly:c}),t[62]=c,t[63]=se):se=t[63];let ee;t[64]!==W||t[65]!==E||t[66]!==M||t[67]!==l||t[68]!==d||t[69]!==se?(ee=b.jsx(zt,{"aria-label":"Month",autoComplete:"off",className:se,inputMode:"numeric",max:"12",min:"0",pattern:"[0-9]*",placeholder:"mm",readOnly:d,ref:p,type:"number",value:l,onBlur:W,onChange:E,onKeyDown:M}),t[64]=W,t[65]=E,t[66]=M,t[67]=l,t[68]=d,t[69]=se,t[70]=ee):ee=t[70];let te;t[71]!==e?(te=ii({disabled:e}),t[71]=e,t[72]=te):te=t[72];let ae;t[73]!==te?(ae=b.jsx("span",{className:te,children:"-"}),t[73]=te,t[74]=ae):ae=t[74];let de;t[75]!==c?(de=Ur({type:"year",pickOnly:c}),t[75]=c,t[76]=de):de=t[76];let fe;t[77]!==H||t[78]!==N||t[79]!==A||t[80]!==d||t[81]!==de||t[82]!==m?(fe=b.jsx(zt,{"aria-label":"Year",autoComplete:"off",className:de,inputMode:"numeric",max:"2100",min:"0",pattern:"[0-9]*",placeholder:"yyyy",readOnly:d,ref:g,type:"number",value:m,onBlur:H,onChange:N,onKeyDown:A}),t[77]=H,t[78]=N,t[79]=A,t[80]=d,t[81]=de,t[82]=m,t[83]=fe):fe=t[83];let ge;return t[84]!==K||t[85]!==Q||t[86]!==U||t[87]!==q||t[88]!==ee||t[89]!==ae||t[90]!==fe?(ge=b.jsxs("div",{className:Q,"data-ox-slot":"input-date",onClick:K,children:[U,q,ee,ae,fe]}),t[84]=K,t[85]=Q,t[86]=U,t[87]=q,t[88]=ee,t[89]=ae,t[90]=fe,t[91]=ge):ge=t[91],ge},Jb=t=>{const e=T.compilerRuntimeExports.c(6);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];const{toggle:r}=Ys();let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=b.jsx(ue,{icon:le.Calendar}),e[2]=s):s=e[2];let o;return e[3]!==n||e[4]!==r?(o=b.jsx(St,{onClick:r,...n,children:s}),e[3]=n,e[4]=r,e[5]=o):o=e[5],o},Zb=Object.assign(Qb,{Button:Wb,Container:Xb,PickerButton:Jb}),e0=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},Ma=k.createContext(null),t0=t=>{const e=T.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a,c,d,u,f,m,h,p,g,x;e[0]!==t?({children:n,defaultValue:s,disabled:o,error:l,locale:h,max:a,maximumFractionDigits:c,min:d,minimumFractionDigits:u,onChange:f,required:m,steps:p,useGrouping:g,validationMessage:r,value:x,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p,e[15]=g,e[16]=x):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14],g=e[15],x=e[16]);const v=h===void 0?"en-US":h,y=p===void 0?1:p,w=g===void 0?!0:g,C=Ze(),O=o??C?.disabled??!1,S=l??!!C?.error,E=m??C?.required??!1,R=k.useId(),N=new Intl.NumberFormat(v,{useGrouping:w!==!1,minimumFractionDigits:u,maximumFractionDigits:c});let j;e[17]!==f?(j=q=>f?.(q),e[17]=f,e[18]=j):j=e[18];let D;e[19]!==s||e[20]!==j||e[21]!==x?(D={value:x,onChange:j,defaultValue:s,name:"OxNumberInput"},e[19]=s,e[20]=j,e[21]=x,e[22]=D):D=e[22];const[P,M]=T.useControllableState(D),[z,A]=k.useState(P!==void 0?N.format(P):""),[$,I]=k.useState(r??""),[V,_]=k.useState(!!r),F=n0;let W;e[23]!==a||e[24]!==d?(W=q=>T.clamp(q,d??-1/0,a??1/0),e[23]=a,e[24]=d,e[25]=W):W=e[25];const B=W,H=q=>{let se=F(z);se===void 0&&(se=P!==void 0?P:0);const ee=B(se),te=B(ee+q);M(te),A(N.format(te))};let G;e[26]!==H||e[27]!==y?(G=()=>H(y),e[26]=H,e[27]=y,e[28]=G):G=e[28];const K=G;let Y;e[29]!==H||e[30]!==y?(Y=()=>H(-y),e[29]=H,e[30]=y,e[31]=Y):Y=e[31];const Q=Y,X=C?.id;let U;e[32]!==S||e[33]!==O||e[34]!==E||e[35]!==V||e[36]!==X||e[37]!==$?(U={disabled:O,error:S,id:X,required:E,setShowValidation:_,setValidationMessage:I,showValidation:V,validationMessage:$},e[32]=S,e[33]=O,e[34]=E,e[35]=V,e[36]=X,e[37]=$,e[38]=U):U=e[38];let J;return e[39]!==n||e[40]!==i?(J=b.jsx(kr,{...i,children:n}),e[39]=n,e[40]=i,e[41]=J):J=e[41],b.jsx(Tn.Provider,{value:U,children:b.jsx(Ma.Provider,{value:{clampValue:B,displayValue:z,formatter:N,handleDecrement:Q,handleIncrement:K,inputId:R,internalValue:P,max:a,min:d,parse:F,setDisplayValue:A,setInternalValue:M,steps:y},children:J})})};function n0(t){if(!t.trim())return;const e=t.replaceAll(/[^\d.-]/g,""),n=Number.parseFloat(e);return!Number.isNaN(n)&&Number.isFinite(n)?n:void 0}const qs=()=>{const t=k.useContext(Ma);if(!t)throw new Error("useNumberContext must be used within a Number component");return t},r0=()=>{const t=T.compilerRuntimeExports.c(4),{handleDecrement:e,inputId:n}=qs();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=b.jsx(ue,{icon:le.Minus}),t[0]=r):r=t[0];let s;return t[1]!==e||t[2]!==n?(s=b.jsx(St,{"aria-controls":n,"aria-label":"Decrease value",onClick:e,children:r}),t[1]=e,t[2]=n,t[3]=s):s=t[3],s},s0=()=>{const t=T.compilerRuntimeExports.c(4),{handleIncrement:e,inputId:n}=qs();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=b.jsx(ue,{icon:le.Plus}),t[0]=r):r=t[0];let s;return t[1]!==e||t[2]!==n?(s=b.jsx(St,{"aria-controls":n,"aria-label":"Increase value",onClick:e,children:r}),t[1]=e,t[2]=n,t[3]=s):s=t[3],s},o0=t=>{const e=t.nativeEvent,n=t.target,r=n.value.slice(0,n.selectionStart??void 0)+(e.data??"")+n.value.slice(n.selectionEnd??void 0);!/^-?[\d.,]*$/.test(r)&&r!==""&&t.preventDefault()},i0=t=>{const e=T.compilerRuntimeExports.c(42);let n,r,s,o;e[0]!==t?({"aria-label":n,"aria-labelledby":r,className:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{clampValue:i,displayValue:l,formatter:a,handleDecrement:c,handleIncrement:d,inputId:u,internalValue:f,max:m,min:h,parse:p,setDisplayValue:g,setInternalValue:x}=qs(),[v,y]=k.useState(!1);let w;e[5]!==g?(w=z=>{g(z.target.value)},e[5]=g,e[6]=w):w=e[6];const C=w;let O;e[7]!==i||e[8]!==l||e[9]!==a||e[10]!==p||e[11]!==g||e[12]!==x?(O=()=>{const z=p(l);if(z!==void 0){const A=i(z);x(A),g(a.format(A))}else x(void 0),g("")},e[7]=i,e[8]=l,e[9]=a,e[10]=p,e[11]=g,e[12]=x,e[13]=O):O=e[13];const S=O;let E;e[14]!==a||e[15]!==p||e[16]!==g||e[17]!==x?(E=z=>{const A=z.clipboardData.getData("text"),$=p(A);$!==void 0&&(z.preventDefault(),g(a.format($)),x($))},e[14]=a,e[15]=p,e[16]=g,e[17]=x,e[18]=E):E=e[18];const R=E;let N;e[19]!==S||e[20]!==c||e[21]!==d||e[22]!==v?(N={onArrowDown:c,onArrowUp:d,onEnter:S,enabled:v,allowRepeat:!0},e[19]=S,e[20]=c,e[21]=d,e[22]=v,e[23]=N):N=e[23],T.useKeyboard(N);let j;e[24]!==s?(j=L("text-center font-mono",s),e[24]=s,e[25]=j):j=e[25];let D;e[26]!==S?(D=()=>{y(!1),S()},e[26]=S,e[27]=D):D=e[27];let P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=()=>y(!0),e[28]=P):P=e[28];let M;return e[29]!==n||e[30]!==r||e[31]!==l||e[32]!==o||e[33]!==C||e[34]!==R||e[35]!==u||e[36]!==f||e[37]!==m||e[38]!==h||e[39]!==j||e[40]!==D?(M=b.jsx(zt,{id:u,"aria-label":n,"aria-labelledby":r,"aria-valuemax":m,"aria-valuemin":h,"aria-valuenow":f,autoComplete:"off",className:j,inputMode:"decimal",role:"spinbutton",type:"text",value:l,onBeforeInput:o0,onBlur:D,onChange:C,onFocus:P,onPaste:R,...o}),e[29]=n,e[30]=r,e[31]=l,e[32]=o,e[33]=C,e[34]=R,e[35]=u,e[36]=f,e[37]=m,e[38]=h,e[39]=j,e[40]=D,e[41]=M):M=e[41],M},l0=Object.assign(i0,{Button:e0,Container:t0,DecrementButton:r0,IncrementButton:s0}),a0=t=>{switch(t){case"numeric":return{inputMode:"numeric",pattern:"[0-9]*"};case"alphanumeric":return{inputMode:"text",pattern:"[A-Z0-9]*"};default:return{inputMode:"text"}}},c0=(t,e)=>{switch(e){case"numeric":return t.replaceAll(/[^0-9]/g,"");case"alphanumeric":return t.replaceAll(/[^A-Z0-9]/gi,"").toUpperCase();default:return t}},d0=t=>{const e=T.compilerRuntimeExports.c(23),{className:n,disabled:r,error:s,length:o,onComplete:i,onValueChange:l,placeholder:a,type:c}=t,d=r===void 0?!1:r,u=s===void 0?!1:s,f=o===void 0?6:o,m=a===void 0?"":a,h=c===void 0?"numeric":c,p=k.useId();let g;e[0]!==f?(g=()=>Array.from({length:f},u0),e[0]=f,e[1]=g):g=e[1];const[x,v]=k.useState(g);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[2]=y):y=e[2];const w=k.useRef(y);let C;e[3]!==h?(C=a0(h),e[3]=h,e[4]=C):C=e[4];const O=C;let S,E;e[5]!==f?(E=()=>{w.current=w.current.slice(0,f)},S=[f],e[5]=f,e[6]=S,e[7]=E):(S=e[6],E=e[7]),k.useEffect(E,S);let R;e[8]===Symbol.for("react.memo_cache_sentinel")?(R=D=>it.flushSync(()=>{v(D)}),e[8]=R):R=e[8];const N=R;let j;if(e[9]!==p||e[10]!==n||e[11]!==x||e[12]!==d||e[13]!==u||e[14]!==f||e[15]!==i||e[16]!==l||e[17]!==m||e[18]!==h||e[19]!==O){const D=(A,$)=>{const I=c0($,h),V=[...x];V[A]=I[0]||"";const _=V[A]&&A<f-1?A+1:void 0;N(V),_!==void 0&&w.current[_]?.focus();const F=V.filter(f0),W=F.join("");l?.(W),F.length===f&&i?.(W)},P=(A,$)=>{const I=[...x];if($.key==="Backspace"){if(x[A]){I[A]="",N(I);const V=I.filter(m0);l?.(V.join(""))}else if(A>0){I[A-1]="",N(I),w.current[A-1]?.focus();const V=I.filter(p0);l?.(V.join(""))}}$.key==="ArrowLeft"&&A>0&&w.current[A-1]?.focus(),$.key==="ArrowRight"&&A<f-1&&w.current[A+1]?.focus()},M=A=>{w.current[A]?.select()};let z;e[21]!==n?(z=L("inline-flex gap-2 font-mono",n),e[21]=n,e[22]=z):z=e[22],j=b.jsx("div",{className:z,"data-ox-slot":"otp-input",children:Array.from({length:f},(A,$)=>{const I=$===0||x.slice(0,$).every(h0),V=d||!I;return b.jsx("input",{id:`${p}-digit-${$}`,"aria-disabled":V,"aria-invalid":u,"aria-label":`Digit ${$+1} of ${f}`,autoComplete:"one-time-code",className:L("size-9 rounded-md border border-input bg-transparent text-center shadow-xs transition-[color,box-shadow]","dark:bg-input/30","ox-focus-ring focus-visible:border-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40"),"data-ox-slot":"otp-digit",disabled:V,maxLength:1,placeholder:m,ref:_=>{w.current[$]=_},type:"text",value:x[$],onChange:_=>D($,_.target.value),onFocus:()=>M($),onKeyDown:_=>P($,_),onPaste:g0,...O},$)})}),e[9]=p,e[10]=n,e[11]=x,e[12]=d,e[13]=u,e[14]=f,e[15]=i,e[16]=l,e[17]=m,e[18]=h,e[19]=O,e[20]=j}else j=e[20];return j};function u0(){return""}function f0(t){return t!==""}function m0(t){return t!==""}function p0(t){return t!==""}function h0(t){return t!==""}function g0(t){return t.preventDefault()}const x0=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},Ia=k.createContext(null),Gs=()=>{const t=k.useContext(Ia);if(!t)throw new Error("useTextContext must be used within a Text component");return t},b0=()=>{const t=T.compilerRuntimeExports.c(6),{handleClear:e,internalValue:n}=Gs(),r=!n;let s;t[0]!==r?(s=L({invisible:r}),t[0]=r,t[1]=s):s=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(ue,{icon:le.X}),t[2]=o):o=t[2];let i;return t[3]!==e||t[4]!==s?(i=b.jsx(St,{"aria-label":"Clear input",className:s,onClick:e,children:o}),t[3]=e,t[4]=s,t[5]=i):i=t[5],i},v0=t=>{const e=T.compilerRuntimeExports.c(47);let n,r,s,o,i,l,a,c,d,u,f;e[0]!==t?({children:n,className:r,defaultValue:o,disabled:i,error:a,onChange:c,required:d,type:u,validationMessage:s,value:f,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11]);const m=u===void 0?"text":u,h=Ze(),p=i??h?.disabled??!1,g=a??!!h?.error,x=d??h?.required??!1,v=k.useRef(null);let y;e[12]!==c?(y=K=>{c?.(K??"")},e[12]=c,e[13]=y):y=e[13];let w;e[14]!==o||e[15]!==y||e[16]!==f?(w={defaultValue:o,name:"OxTextInput",onChange:y,value:f},e[14]=o,e[15]=y,e[16]=f,e[17]=w):w=e[17];const[C,O]=T.useControllableState(w),S=C??"";let E;e[18]!==O?(E=K=>O(K),e[18]=O,e[19]=E):E=e[19];const R=E,[N,j]=k.useState(m),[D,P]=k.useState(s??""),[M,z]=k.useState(!!s);let A;e[20]!==R?(A=()=>{R(""),v.current?.focus()},e[20]=R,e[21]=A):A=e[21];const $=A;let I;e[22]!==N?(I=()=>{N==="password"?j("text"):N==="text"&&j("password")},e[22]=N,e[23]=I):I=e[23];const V=I,_=h?.id;let F;e[24]!==g||e[25]!==p||e[26]!==x||e[27]!==M||e[28]!==_||e[29]!==D?(F={disabled:p,error:g,id:_,required:x,setShowValidation:z,setValidationMessage:P,showValidation:M,validationMessage:D},e[24]=g,e[25]=p,e[26]=x,e[27]=M,e[28]=_,e[29]=D,e[30]=F):F=e[30];let W;e[31]!==N||e[32]!==$||e[33]!==V||e[34]!==S||e[35]!==R?(W={handleClear:$,handleTypeToggle:V,inputRef:v,internalValue:S,setInternalValue:R,type:N},e[31]=N,e[32]=$,e[33]=V,e[34]=S,e[35]=R,e[36]=W):W=e[36];let B;e[37]!==n||e[38]!==r||e[39]!==l?(B=b.jsx(kr,{className:r,...l,children:n}),e[37]=n,e[38]=r,e[39]=l,e[40]=B):B=e[40];let H;e[41]!==B||e[42]!==W?(H=b.jsx(Ia.Provider,{value:W,children:B}),e[41]=B,e[42]=W,e[43]=H):H=e[43];let G;return e[44]!==H||e[45]!==F?(G=b.jsx(Tn.Provider,{value:F,children:H}),e[44]=H,e[45]=F,e[46]=G):G=e[46],G},y0=t=>{const e=T.compilerRuntimeExports.c(14);let n,r,s,o,i;e[0]!==t?({className:n,currentLength:o,disabled:i,maxLength:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?0:o,a=i===void 0?!1:i;let c;e[6]!==n?(c=L("mt-1 text-right font-mono text-xs text-muted-foreground tabular-nums","aria-disabled:ox-default-disabled",n),e[6]=n,e[7]=c):c=e[7];let d;return e[8]!==l||e[9]!==a||e[10]!==r||e[11]!==s||e[12]!==c?(d=b.jsxs("div",{"aria-disabled":a,className:c,...r,"data-ox-slot":"input-counter",children:[l,"/",s]}),e[8]=l,e[9]=a,e[10]=r,e[11]=s,e[12]=c,e[13]=d):d=e[13],d},w0=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(y0,{...t}),e[0]=t,e[1]=n):n=e[1],n},C0=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i,l,a;e[0]!==t?({autoComplete:n,className:r,id:o,maxLength:i,placeholder:l,spellCheck:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const c=a===void 0?!1:a,{disabled:d,error:u,required:f}=an(),{inputRef:m,internalValue:h,setInternalValue:p,type:g}=Gs();let x;e[8]!==p?(x=w=>{p(w.target.value)},e[8]=p,e[9]=x):x=e[9];const v=x;let y;return e[10]!==n||e[11]!==r||e[12]!==d||e[13]!==s||e[14]!==u||e[15]!==v||e[16]!==o||e[17]!==m||e[18]!==h||e[19]!==i||e[20]!==l||e[21]!==f||e[22]!==c||e[23]!==g?(y=b.jsx(zt,{id:o,"aria-invalid":u,"aria-required":f,autoComplete:n,className:r,disabled:d,maxLength:i,placeholder:l,ref:m,required:f,spellCheck:c,type:g,value:h,onChange:v,...s}),e[10]=n,e[11]=r,e[12]=d,e[13]=s,e[14]=u,e[15]=v,e[16]=o,e[17]=m,e[18]=h,e[19]=i,e[20]=l,e[21]=f,e[22]=c,e[23]=g,e[24]=y):y=e[24],y},O0=()=>{const t=T.compilerRuntimeExports.c(6),{handleTypeToggle:e,type:n}=Gs(),r=n==="text",s=r?"Hide password":"Show password",o=r?le.EyeOff:le.Eye;let i;t[0]!==o?(i=b.jsx(ue,{icon:o}),t[0]=o,t[1]=i):i=t[1];let l;return t[2]!==e||t[3]!==s||t[4]!==i?(l=b.jsx(St,{"aria-label":s,onClick:e,children:i}),t[2]=e,t[3]=s,t[4]=i,t[5]=l):l=t[5],l},E0=Object.assign(C0,{Button:x0,ClearButton:b0,Container:v0,Counter:w0,VisibilityButton:O0}),S0=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},Aa=k.createContext(null),k0=t=>{if(!t)return{hours:"",minutes:""};const[e="",n=""]=t.split(":");return{hours:e,minutes:n}},li=(t,e)=>{if(!t&&!e)return"";const n=t?t.padStart(2,"0"):"",r=e?e.padStart(2,"0"):"";return`${n}:${r}`},R0=t=>{const e=T.compilerRuntimeExports.c(21),{defaultValue:n,onChange:r,value:s}=t,o=n??"";let i;e[0]!==r?(i=v=>r?.(v??""),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==o||e[3]!==i||e[4]!==s?(l={defaultValue:o,name:"OxTimeInput",onChange:i,value:s},e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5];const[a,c]=T.useControllableState(l);let d;e[6]!==a?(d=k0(a),e[6]=a,e[7]=d):d=e[7];const{hours:u,minutes:f}=d;let m;e[8]!==f||e[9]!==c?(m=v=>{const y=li(v,f);c(y)},e[8]=f,e[9]=c,e[10]=m):m=e[10];const h=m;let p;e[11]!==u||e[12]!==c?(p=v=>{const y=li(u,v);c(y)},e[11]=u,e[12]=c,e[13]=p):p=e[13];const g=p;let x;return e[14]!==u||e[15]!==f||e[16]!==h||e[17]!==g||e[18]!==c||e[19]!==a?(x={hours:u,minutes:f,setHours:h,setMinutes:g,timeValue:a,setTimeValue:c},e[14]=u,e[15]=f,e[16]=h,e[17]=g,e[18]=c,e[19]=a,e[20]=x):x=e[20],x},N0=t=>{const e=T.compilerRuntimeExports.c(39);let n,r,s,o,i,l,a,c,d,u;e[0]!==t?({children:n,className:r,defaultValue:d,disabled:o,error:l,onChange:a,required:c,validationMessage:s,value:u,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10]);const f=d===void 0?"":d,m=Ze(),h=o??m?.disabled??!1,p=l??!!m?.error,g=c??m?.required??!1;let x;e[11]!==f||e[12]!==a||e[13]!==u?(x={value:u,defaultValue:f,onChange:a},e[11]=f,e[12]=a,e[13]=u,e[14]=x):x=e[14];const{hours:v,minutes:y,setHours:w,setMinutes:C}=R0(x),[O,S]=k.useState(s??""),[E,R]=k.useState(!!s),N=m?.id;let j;e[15]!==p||e[16]!==h||e[17]!==g||e[18]!==E||e[19]!==N||e[20]!==O?(j={disabled:h,error:p,id:N,required:g,setShowValidation:R,setValidationMessage:S,showValidation:E,validationMessage:O},e[15]=p,e[16]=h,e[17]=g,e[18]=E,e[19]=N,e[20]=O,e[21]=j):j=e[21];let D;e[22]!==v||e[23]!==y||e[24]!==w||e[25]!==C?(D={hours:v,minutes:y,setHours:w,setMinutes:C},e[22]=v,e[23]=y,e[24]=w,e[25]=C,e[26]=D):D=e[26];let P;e[27]!==r?(P=L("w-fit",r),e[27]=r,e[28]=P):P=e[28];let M;e[29]!==n||e[30]!==i||e[31]!==P?(M=b.jsx(kr,{className:P,...i,children:n}),e[29]=n,e[30]=i,e[31]=P,e[32]=M):M=e[32];let z;e[33]!==D||e[34]!==M?(z=b.jsx(Aa.Provider,{value:D,children:M}),e[33]=D,e[34]=M,e[35]=z):z=e[35];let A;return e[36]!==j||e[37]!==z?(A=b.jsx(Tn.Provider,{value:j,children:z}),e[36]=j,e[37]=z,e[38]=A):A=e[38],A},j0=()=>{const t=k.useContext(Aa);if(!t)throw new Error("useTimeContext must be used within a TimeInput component");return t},ai=["w-8 min-w-8 text-center","[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"],D0=()=>{const t=T.compilerRuntimeExports.c(24),{hours:e,minutes:n,setHours:r,setMinutes:s}=j0(),{disabled:o}=an(),i=k.useRef(null),l=k.useRef(null);let a;t[0]!==r?(a=S=>{const E=S.target.value;(E===""||/^\d{1,2}$/.test(E)&&Number.parseInt(E,10)<=23)&&r(E)},t[0]=r,t[1]=a):a=t[1];const c=a;let d;t[2]!==s?(d=S=>{const E=S.target.value;(E===""||/^\d{1,2}$/.test(E)&&Number.parseInt(E,10)<=59)&&s(E)},t[2]=s,t[3]=d):d=t[3];const u=d;let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=S=>{(S.key==="Tab"||S.key==="Enter"||S.key===":")&&(S.preventDefault(),l.current?.focus())},t[4]=f):f=t[4];const m=f;let h;t[5]!==n?(h=S=>{S.key==="Backspace"&&n===""&&i.current?.focus()},t[5]=n,t[6]=h):h=t[6];const p=h;let g;t[7]===Symbol.for("react.memo_cache_sentinel")?(g=L(ai),t[7]=g):g=t[7];let x;t[8]!==c||t[9]!==e?(x=b.jsx(zt,{autoComplete:"off",className:g,max:"23",min:"0",placeholder:"hh",ref:i,type:"number",value:e,onChange:c,onKeyDown:m}),t[8]=c,t[9]=e,t[10]=x):x=t[10];let v;t[11]!==o?(v=L("text-muted-foreground",{"opacity-50":o}),t[11]=o,t[12]=v):v=t[12];let y;t[13]!==v?(y=b.jsx("span",{className:v,children:":"}),t[13]=v,t[14]=y):y=t[14];let w;t[15]===Symbol.for("react.memo_cache_sentinel")?(w=L(ai),t[15]=w):w=t[15];let C;t[16]!==u||t[17]!==p||t[18]!==n?(C=b.jsx(zt,{autoComplete:"off",className:w,max:"59",min:"0",placeholder:"mm",ref:l,type:"number",value:n,onChange:u,onKeyDown:p}),t[16]=u,t[17]=p,t[18]=n,t[19]=C):C=t[19];let O;return t[20]!==x||t[21]!==y||t[22]!==C?(O=b.jsxs("div",{className:"flex items-center gap-1 bg-transparent font-mono","data-ox-slot":"input-time",children:[x,y,C]}),t[20]=x,t[21]=y,t[22]=C,t[23]=O):O=t[23],O},P0=Object.assign(D0,{Button:S0,Container:N0}),_a=k.createContext(void 0),T0=t=>{const e=T.compilerRuntimeExports.c(31);let n,r,s,o,i,l,a,c,d,u;e[0]!==t?({children:n,className:r,defaultValue:o,disabled:i,error:a,name:c,onChange:d,required:u,value:s,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10]);const f=Ze(),m=i??f?.disabled??!1,h=a??!!f?.error,p=u??f?.required??!1,[g,x]=k.useState(o),v=s!==void 0,y=v?s:g;let w;e[11]!==v||e[12]!==d?(w=j=>{v||x(j),d?.(j)},e[11]=v,e[12]=d,e[13]=w):w=e[13];const C=w;let O;e[14]!==y||e[15]!==C||e[16]!==m||e[17]!==c?(O={value:y,onChange:C,name:c,disabled:m},e[14]=y,e[15]=C,e[16]=m,e[17]=c,e[18]=O):O=e[18];const S=f?.labelId;let E;e[19]!==r?(E=L("space-y-2",r),e[19]=r,e[20]=E):E=e[20];let R;e[21]!==n||e[22]!==l||e[23]!==h||e[24]!==p||e[25]!==S||e[26]!==E?(R=b.jsx("div",{"aria-invalid":h,"aria-labelledby":S,"aria-required":p,className:E,"data-ox-slot":"radio-group",role:"radiogroup",...l,children:n}),e[21]=n,e[22]=l,e[23]=h,e[24]=p,e[25]=S,e[26]=E,e[27]=R):R=e[27];let N;return e[28]!==O||e[29]!==R?(N=b.jsx(_a.Provider,{value:O,children:R}),e[28]=O,e[29]=R,e[30]=N):N=e[30],N},M0=()=>{const t=k.useContext(_a);if(!t)throw new Error("OxRadio must be used within OxRadioGroup");return t},I0=t=>{const e=T.compilerRuntimeExports.c(32);let n,r,s,o,i,l,a,c;e[0]!==t?({className:n,disabled:o,error:a,id:l,name:i,onChange:s,value:c,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=a===void 0?!1:a,u=k.useId(),f=M0();if(!f)throw new Error("RadioGroupItem must be used within RadioGroup");const m=l||u,h=o??f.disabled??!1,p=i??f.name,g=f.value===c;let x;e[9]!==f||e[10]!==s||e[11]!==c?(x=N=>{s?.(N),c!==void 0&&f.onChange?.(c)},e[9]=f,e[10]=s,e[11]=c,e[12]=x):x=e[12];const v=x;let y;e[13]!==h||e[14]!==g?(y=()=>h?"disabled":g?"checked":"unchecked",e[13]=h,e[14]=g,e[15]=y):y=e[15];const w=y;let C;e[16]!==n||e[17]!==d?(C=L("peer aspect-square size-4 shrink-0 cursor-pointer appearance-none rounded-full border border-input text-primary shadow-xs","dark:bg-input/30","transition-[color,box-shadow] outline-none","ox-focus-ring","aria-disabled:ox-default-disabled",{"border-destructive":d},n),e[16]=n,e[17]=d,e[18]=C):C=e[18];const O=w();let S;e[19]!==h||e[20]!==r||e[21]!==v||e[22]!==m||e[23]!==g||e[24]!==p||e[25]!==C||e[26]!==O||e[27]!==c?(S=b.jsx("input",{id:m,"aria-checked":g,"aria-disabled":h,className:C,disabled:h,name:p,type:"radio",value:c,onChange:v,...r,checked:g,"data-ox-slot":"radio","data-ox-state":O}),e[19]=h,e[20]=r,e[21]=v,e[22]=m,e[23]=g,e[24]=p,e[25]=C,e[26]=O,e[27]=c,e[28]=S):S=e[28];let E;e[29]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx("div",{className:"pointer-events-none absolute inset-0 m-auto size-2 rounded-full bg-primary opacity-0 peer-checked:opacity-100"}),e[29]=E):E=e[29];let R;return e[30]!==S?(R=b.jsxs("div",{className:"relative inline-flex shrink-0",children:[S,E]}),e[30]=S,e[31]=R):R=e[31],R},A0={Group:T0,Item:I0},$a=k.createContext(void 0),Us=()=>{const t=k.useContext($a);if(!t)throw new Error("Select components must be used within an OxSelect");return t},La=t=>{const e=T.compilerRuntimeExports.c(38);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,{close:a,multiple:c,onSelect:d,selectedValue:u}=Us();let f;e[6]!==n||e[7]!==a||e[8]!==c||e[9]!==d||e[10]!==i?(f=()=>{d({label:n,value:i}),c||a()},e[6]=n,e[7]=a,e[8]=c,e[9]=d,e[10]=i,e[11]=f):f=e[11];const m=f;let h;e[12]!==a||e[13]!==m?(h=E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),m()),E.key==="Escape"&&a()},e[12]=a,e[13]=m,e[14]=h):h=e[14];const p=h;let g,x,v,y;e[15]!==r||e[16]!==u||e[17]!==i?(g=u.includes(i),y="none",x=g,v=L("relative flex w-full items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-start text-popover-foreground","ox-focus-ring enabled:cursor-pointer enabled:hover:bg-neutral-accent enabled:hover:text-neutral-accent-foreground","disabled:ox-default-disabled","[&_svg]:pointer-events-none [&_svg]:shrink-0",{"bg-neutral-accent text-neutral-accent-foreground":g},r),e[15]=r,e[16]=u,e[17]=i,e[18]=g,e[19]=x,e[20]=v,e[21]=y):(g=e[18],x=e[19],v=e[20],y=e[21]);const w=l?-1:0;let C;e[22]!==l||e[23]!==g?(C=g&&!l?b.jsx(ue,{className:"absolute right-2 text-primary","data-ox-slot":"select-check-icon",icon:le.Check}):null,e[22]=l,e[23]=g,e[24]=C):C=e[24];let O;e[25]!==n||e[26]!==l||e[27]!==s||e[28]!==m||e[29]!==p||e[30]!==x||e[31]!==v||e[32]!==w||e[33]!==C?(O=b.jsxs("button",{"aria-selected":x,className:v,disabled:l,role:"option",tabIndex:w,type:"button",onClick:m,onKeyDown:p,...s,"data-ox-slot":"select-item",children:[n,C]}),e[25]=n,e[26]=l,e[27]=s,e[28]=m,e[29]=p,e[30]=x,e[31]=v,e[32]=w,e[33]=C,e[34]=O):O=e[34];let S;return e[35]!==y||e[36]!==O?(S=b.jsx("li",{role:y,children:O}),e[35]=y,e[36]=O,e[37]=S):S=e[37],S},_0=t=>{const e=[];return k.Children.forEach(t,n=>{(typeof n=="string"||typeof n=="number")&&e.push(n)}),e.length>0?e.join(""):t},$0=t=>{const e=new Map,n=r=>{if(!k.isValidElement(r))return;if(r.type===La||us(r,"select-item")){const{children:i,value:l}=r.props,a=_0(i);e.set(l,a);return}const s=r.props,{children:o}=s;o&&k.Children.forEach(o,n)};for(const r of t)n(r);return e},za=t=>{const e=T.compilerRuntimeExports.c(19);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{buttonRef:o,isClosing:i,isVisible:l,multiple:a,selectId:c}=Us(),d=k.useRef(null);let u,f;if(e[4]!==o||e[5]!==l?(u=()=>{if(l&&o.current&&d.current){const v=o.current.offsetWidth;d.current.style.width=`${v}px`}},f=[o,l],e[4]=o,e[5]=l,e[6]=u,e[7]=f):(u=e[6],f=e[7]),k.useLayoutEffect(u,f),!l)return null;const m=i?"closing":"open",h=`${c}-listbox`;let p;e[8]!==r?(p=L("flex max-h-72 flex-col gap-y-0.5 overflow-x-hidden overflow-y-auto",r),e[8]=r,e[9]=p):p=e[9];let g;e[10]!==n||e[11]!==s||e[12]!==a||e[13]!==h||e[14]!==p?(g=b.jsx("ul",{id:h,"aria-multiselectable":a,className:p,role:"listbox",...s,"data-ox-slot":"select-content",children:n}),e[10]=n,e[11]=s,e[12]=a,e[13]=h,e[14]=p,e[15]=g):g=e[15];let x;return e[16]!==m||e[17]!==g?(x=b.jsx(ke.Content,{align:"start",className:'ox-select-animate rounded-lg border border-border bg-popover p-1 text-sm text-popover-foreground shadow-md [&_svg:not([class*="size-"])]:size-4',"data-ox-state":m,ref:d,side:"bottom",sideOffset:8,children:g}),e[16]=m,e[17]=g,e[18]=x):x=e[18],x},ci=t=>t==null?[]:Array.isArray(t)?t:[t],L0=t=>{const e=T.compilerRuntimeExports.c(71),{children:n,className:r,defaultOpen:s,defaultValue:o,disabled:i,error:l,id:a,isLoading:c,multiple:d,onChange:u,onOpenChange:f,open:m,required:h,value:p}=t,g=s===void 0?!1:s,x=o===void 0?null:o,v=c===void 0?!1:c,y=d===void 0?!1:d,w=Ze(),C=k.useId(),O=k.useRef(null),{checkOverflow:S,handleResize:E,overflowAmount:R}=T.useOverflowDetection(),N=i??w?.disabled??!1,j=l??!!w?.error,D=h??w?.required??!1,P=a??w?.id??C;let M;e[0]!==m||e[1]!==g||e[2]!==N||e[3]!==f?(M={closeOnEscape:!0,closeOnOutsideClick:!0,defaultOpen:g,disabled:N,onOpenChange:f,open:m},e[0]=m,e[1]=g,e[2]=N,e[3]=f,e[4]=M):M=e[4];const{close:z,containerRef:A,isClosing:$,isVisible:I,open:V,toggle:_}=T.usePopperState(M);let F;if(e[5]!==n){e:{const oe=k.Children.toArray(n).find(z0);if(!oe||!k.isValidElement(oe)){let Se;e[7]===Symbol.for("react.memo_cache_sentinel")?(Se=new Map,e[7]=Se):Se=e[7],F=Se;break e}const me=k.Children.toArray(oe.props.children||[]);F=$0(me)}e[5]=n,e[6]=F}else F=e[6];const W=F;let B;e[8]!==x?(B=new Set(ci(x)),e[8]=x,e[9]=B):B=e[9];let H;e[10]!==y||e[11]!==u?(H=oe=>{if(!oe)return;let me;y?me=[...oe]:oe.size>0?me=[...oe][0]:me=null,u?.(me)},e[10]=y,e[11]=u,e[12]=H):H=e[12];let G;e[13]!==p?(G=p!==void 0?new Set(ci(p)):void 0,e[13]=p,e[14]=G):G=e[14];let K;e[15]!==B||e[16]!==H||e[17]!==G?(K={defaultValue:B,name:"OxSelect",onChange:H,value:G},e[15]=B,e[16]=H,e[17]=G,e[18]=K):K=e[18];const[Y,Q]=T.useControllableState(K);let X;e[19]!==W||e[20]!==Y?(X=[...Y??new Set].filter(oe=>oe===""?W.has(""):!0).map(oe=>({label:W.get(oe)??oe,value:oe})),e[19]=W,e[20]=Y,e[21]=X):X=e[21];const U=X;let J;e[22]!==S?(J=()=>{S()},e[22]=S,e[23]=J):J=e[23];let q;if(e[24]!==S||e[25]!==Y?(q=[Y,S],e[24]=S,e[25]=Y,e[26]=q):q=e[26],k.useLayoutEffect(J,q),v){let oe;e[27]!==r?(oe=L("flex w-full flex-col",r),e[27]=r,e[28]=oe):oe=e[28];const me=!j;let Se;e[29]!==j||e[30]!==me?(Se=L("h-9 w-full rounded-lg border",{"border-destructive":j,"border-input":me}),e[29]=j,e[30]=me,e[31]=Se):Se=e[31];let Ee;e[32]!==Se?(Ee=b.jsx(Vt,{className:Se}),e[32]=Se,e[33]=Ee):Ee=e[33];let He;return e[34]!==oe||e[35]!==Ee?(He=b.jsx("div",{className:oe,children:Ee}),e[34]=oe,e[35]=Ee,e[36]=He):He=e[36],He}let se;e[37]!==y||e[38]!==Q?(se=oe=>{const{value:me}=oe;Q(Se=>{const Ee=new Set(Se);return y?Ee.has(me)?Ee.delete(me):Ee.add(me):(Ee.clear(),Ee.add(me)),Ee})},e[37]=y,e[38]=Q,e[39]=se):se=e[39];const ee=se;let te;e[40]!==Y?(te=Y??new Set,e[40]=Y,e[41]=te):te=e[41];let ae;e[42]!==te?(ae=[...te],e[42]=te,e[43]=ae):ae=e[43];let de;e[44]!==z||e[45]!==E||e[46]!==j||e[47]!==P||e[48]!==$||e[49]!==N||e[50]!==D||e[51]!==I||e[52]!==y||e[53]!==ee||e[54]!==V||e[55]!==R||e[56]!==U||e[57]!==ae||e[58]!==_?(de={buttonRef:O,close:z,disabled:N,error:j,handleResize:E,isClosing:$,isVisible:I,multiple:y,onSelect:ee,open:V,overflowAmount:R,required:D,selectedOptions:U,selectedValue:ae,selectId:P,toggle:_},e[44]=z,e[45]=E,e[46]=j,e[47]=P,e[48]=$,e[49]=N,e[50]=D,e[51]=I,e[52]=y,e[53]=ee,e[54]=V,e[55]=R,e[56]=U,e[57]=ae,e[58]=_,e[59]=de):de=e[59];let fe;e[60]!==r?(fe=L('flex w-full flex-col text-sm [&_svg:not([class*="size-"])]:size-4',r),e[60]=r,e[61]=fe):fe=e[61];let ge;e[62]!==n?(ge=b.jsx(ke,{children:n}),e[62]=n,e[63]=ge):ge=e[63];let Z;e[64]!==A||e[65]!==fe||e[66]!==ge?(Z=b.jsx("div",{className:fe,ref:A,children:ge}),e[64]=A,e[65]=fe,e[66]=ge,e[67]=Z):Z=e[67];let ie;return e[68]!==de||e[69]!==Z?(ie=b.jsx($a.Provider,{value:de,children:Z}),e[68]=de,e[69]=Z,e[70]=ie):ie=e[70],ie};function z0(t){return k.isValidElement(t)&&(t.type===za||us(t,"select-content"))}const F0=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,label:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);let i;e[5]!==r||e[6]!==o?(i=o?b.jsx("div",{className:L("px-2 py-1.5 text-xs font-semibold text-muted-foreground",r),children:o}):null,e[5]=r,e[6]=o,e[7]=i):i=e[7];let l;return e[8]!==n||e[9]!==s||e[10]!==i?(l=b.jsxs("div",{role:"group",...s,"data-ox-slot":"select-group",children:[i,n]}),e[8]=n,e[9]=s,e[10]=i,e[11]=l):l=e[11],l},V0=t=>{const e=T.compilerRuntimeExports.c(41);let n,r,s,o,i,l;e[0]!==t?({className:n,disabled:s,displayAsTag:o,placeholder:i,tagColor:l,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=o===void 0?!1:o,c=i===void 0?"Select an option":i,d=l===void 0?"purple":l,{buttonRef:u,disabled:f,error:m,handleResize:h,multiple:p,open:g,overflowAmount:x,required:v,selectId:y,selectedOptions:w,toggle:C}=Us(),O=x>0,S=s??f,E=`${y}-listbox`;let R;e[7]!==c||e[8]!==w?(R=w.length>0?`Selected: ${w.map(B0).join(", ")}`:c,e[7]=c,e[8]=w,e[9]=R):R=e[9];let N;e[10]!==n?(N=L("flex h-9 w-full items-center gap-x-2 rounded-lg border border-input bg-transparent px-3 py-2 text-left text-sm enabled:cursor-pointer","dark:bg-input/30 dark:enabled:hover:bg-input/50","ox-focus-ring focus-visible:border-ring","disabled:cursor-not-allowed disabled:opacity-50","shadow-xs transition-[color,box-shadow]","[&>span:empty]:text-muted-foreground","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[10]=n,e[11]=N):N=e[11];const j=g?"open":"closed";let D;e[12]!==a||e[13]!==h||e[14]!==S||e[15]!==p||e[16]!==x||e[17]!==c||e[18]!==w||e[19]!==O||e[20]!==d?(D=w.length>0?b.jsxs("div",{className:L("flex min-w-0 flex-1 items-center overflow-hidden","**:data-[ox-slot=icon]:hidden",{"opacity-50":S&&a}),children:[b.jsx("div",{className:L("truncate",{"flex gap-1":a&&p}),ref:h,children:a&&p?w.map(A=>b.jsx(Jr,{color:d,"data-ox-state":"selected",children:A.label},String(A.value))):w.map((A,$,I)=>{const V=I.length-x,_=$===V-1;return b.jsxs("span",{"data-ox-state":"selected",children:[A.label,$<I.length-1&&!_&&", "]},String(A.value))})}),O&&p?b.jsxs(Jr,{className:"ml-1",color:d,children:["+",x]}):null]}):b.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),e[12]=a,e[13]=h,e[14]=S,e[15]=p,e[16]=x,e[17]=c,e[18]=w,e[19]=O,e[20]=d,e[21]=D):D=e[21];let P;e[22]!==g?(P=L("shrink-0 text-muted-foreground opacity-50 transition-transform duration-300 ease-in-out",{"rotate-180":g}),e[22]=g,e[23]=P):P=e[23];let M;e[24]!==P?(M=b.jsx(ue,{className:P,icon:le.ChevronDown}),e[24]=P,e[25]=M):M=e[25];let z;return e[26]!==u||e[27]!==r||e[28]!==m||e[29]!==S||e[30]!==g||e[31]!==v||e[32]!==y||e[33]!==M||e[34]!==E||e[35]!==R||e[36]!==N||e[37]!==j||e[38]!==D||e[39]!==C?(z=b.jsx(ke.Anchor,{asChild:!0,children:b.jsxs("button",{id:y,"aria-controls":E,"aria-disabled":S,"aria-expanded":g,"aria-haspopup":"listbox","aria-invalid":m,"aria-label":R,"aria-required":v,className:N,disabled:S,ref:u,role:"combobox",type:"button",onClick:C,...r,"data-ox-slot":"select-trigger","data-ox-state":j,children:[D,M]})}),e[26]=u,e[27]=r,e[28]=m,e[29]=S,e[30]=g,e[31]=v,e[32]=y,e[33]=M,e[34]=E,e[35]=R,e[36]=N,e[37]=j,e[38]=D,e[39]=C,e[40]=z):z=e[40],z};function B0(t){return t.label}const W0=Object.assign(L0,{Content:za,Group:F0,Item:La,Trigger:V0}),H0=t=>{const e=T.compilerRuntimeExports.c(28);let n,r,s,o,i,l,a,c;e[0]!==t?({checked:c,className:n,disabled:r,error:o,id:l,onChange:i,required:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=c===void 0?!1:c,u=Ze(),f=k.useId(),m=r??u?.disabled??!1,h=o??!!u?.error,p=a??u?.required??!1,g=l??u?.id??f;let x;e[9]!==d||e[10]!==i?(x=()=>{i?.(!d)},e[9]=d,e[10]=i,e[11]=x):x=e[11];const v=x,y=d?"checked":"unchecked",w=h||void 0;let C;e[12]!==n?(C=L("peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs","transition-all outline-none","data-[state=checked]:bg-primary data-[state=unchecked]:bg-input","dark:data-[state=unchecked]:bg-input/80","ox-focus-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive",n),e[12]=n,e[13]=C):C=e[13];let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O=L("pointer-events-none block size-4 rounded-full ring-0 transition-transform","bg-background","dark:data-[state=unchecked]:bg-foreground","dark:data-[state=checked]:bg-primary-foreground","data-[state=checked]:translate-x-[calc(100%-2px)]","data-[state=unchecked]:translate-x-0"),e[14]=O):O=e[14];let S;e[15]!==y?(S=b.jsx("span",{className:O,"data-state":y}),e[15]=y,e[16]=S):S=e[16];let E;return e[17]!==d||e[18]!==y||e[19]!==s||e[20]!==v||e[21]!==g||e[22]!==m||e[23]!==p||e[24]!==w||e[25]!==C||e[26]!==S?(E=b.jsx("button",{id:g,"aria-checked":d,"aria-disabled":m,"aria-invalid":w,"aria-required":p,className:C,"data-ox-slot":"switch","data-state":y,disabled:m,role:"switch",type:"button",onClick:v,...s,children:S}),e[17]=d,e[18]=y,e[19]=s,e[20]=v,e[21]=g,e[22]=m,e[23]=p,e[24]=w,e[25]=C,e[26]=S,e[27]=E):E=e[27],E},Y0=t=>{const e=T.compilerRuntimeExports.c(38);let n,r,s,o,i,l,a,c,d,u,f,m;e[0]!==t?({className:n,disabled:r,error:o,id:a,name:i,onChange:l,placeholder:d,required:c,rows:u,showMaxLength:f,value:m,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12]);const h=d===void 0?"Enter text...":d,p=u===void 0?3:u,g=f===void 0?!1:f,x=Ze(),v=k.useId(),[y,w]=k.useState(0),C=r??x?.disabled??!1,O=o??!!x?.error,S=c??x?.required??!1,R=`${a??x?.id??v}-textarea`,N=s.maxLength,j=m!==void 0;let D;j?D=typeof m=="string"?m.length:0:D=y;let P;e[13]!==j||e[14]!==l?(P=V=>{j||w(V.target.value.length),l?.(V)},e[13]=j,e[14]=l,e[15]=P):P=e[15];const M=P;let z;e[16]!==n?(z=L("flex field-sizing-content min-h-16 w-full","rounded-lg border border-input bg-transparent px-3 py-2 shadow-xs","text-base placeholder:text-muted-foreground sm:text-sm","transition-[color,box-shadow] outline-none","ox-focus-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[16]=n,e[17]=z):z=e[17];let A;e[18]!==s||e[19]!==M||e[20]!==O||e[21]!==C||e[22]!==S||e[23]!==i||e[24]!==h||e[25]!==p||e[26]!==z||e[27]!==R||e[28]!==m?(A=b.jsx("textarea",{id:R,"aria-invalid":O,"aria-required":S,className:z,"data-ox-slot":"textarea",disabled:C,name:i,placeholder:h,required:S,rows:p,value:m,onChange:M,...s}),e[18]=s,e[19]=M,e[20]=O,e[21]=C,e[22]=S,e[23]=i,e[24]=h,e[25]=p,e[26]=z,e[27]=R,e[28]=m,e[29]=A):A=e[29];let $;e[30]!==D||e[31]!==C||e[32]!==N||e[33]!==g?($=g&&typeof N=="number"?b.jsxs("div",{className:L("mt-1 text-right font-mono text-xs text-muted-foreground tabular-nums",{"opacity-50":C}),"data-ox-slot":"input-counter",children:[D,"/",N]}):null,e[30]=D,e[31]=C,e[32]=N,e[33]=g,e[34]=$):$=e[34];let I;return e[35]!==A||e[36]!==$?(I=b.jsxs("div",{className:"flex w-full flex-col",children:[A,$]}),e[35]=A,e[36]=$,e[37]=I):I=e[37],I},q0=t=>{const e=T.compilerRuntimeExports.c(64);let n,r,s,o;e[0]!==t?({children:n,className:r,rowId:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=Ws(),{isHeader:l}=vb();let a;e[5]!==i?(a=i??{},e[5]=i,e[6]=a):a=e[6];const{draggable:c,registerRowId:d,unregisterRowId:u}=a;let f,m;e[7]!==c||e[8]!==d||e[9]!==o||e[10]!==u?(f=()=>{if(o&&c)return d?.(o),()=>u?.(o)},m=[o,c,d,u],e[7]=c,e[8]=d,e[9]=o,e[10]=u,e[11]=f,e[12]=m):(f=e[11],m=e[12]),k.useEffect(f,m);const h=!i?.draggable||!o||l,p=o??"";let g;e[13]!==h||e[14]!==p?(g={disabled:h,id:p},e[13]=h,e[14]=p,e[15]=g):g=e[15];const{attributes:x,isDragging:v,listeners:y,setNodeRef:w,transform:C,transition:O}=zs(g);let S;e[16]!==C?(S=at.Transform.toString(C),e[16]=C,e[17]=S):S=e[17];let E;e[18]!==S||e[19]!==O?(E={transform:S,transition:O},e[18]=S,e[19]=O,e[20]=E):E=e[20];const R=E;let N;e[21]!==i||e[22]!==o?(N=()=>{o&&i?.selectable&&i.toggleSelection(o)},e[21]=i,e[22]=o,e[23]=N):N=e[23];const j=N;let D;e[24]!==i?(D=()=>{i?.toggleAll()},e[24]=i,e[25]=D):D=e[25];const P=D;let M,z,A;if(e[26]!==x||e[27]!==r||e[28]!==i||e[29]!==P||e[30]!==j||e[31]!==v||e[32]!==l||e[33]!==y||e[34]!==o){const W=o&&i?.isSelected(o),B=l?"th":"td";let H;e[38]!==B||e[39]!==x||e[40]!==i?.draggable||e[41]!==l||e[42]!==y||e[43]!==o?(H=()=>i?.draggable?l?b.jsx(B,{className:"h-10 w-12 px-3",children:b.jsx("span",{className:"sr-only",children:"Reorder"})}):o?b.jsx(B,{className:"px-3 py-2",children:b.jsx("button",{"aria-label":"Drag to reorder",className:"flex cursor-grab touch-none items-center justify-center",type:"button",...x,...y,children:b.jsx(le.GripVertical,{className:"size-4 text-muted-foreground"})})}):b.jsx(B,{className:"px-3 py-2"}):null,e[38]=B,e[39]=x,e[40]=i?.draggable,e[41]=l,e[42]=y,e[43]=o,e[44]=H):H=e[44],M=H;let G;e[45]!==B||e[46]!==i||e[47]!==P||e[48]!==j||e[49]!==l||e[50]!==o?(G=()=>i?.selectable?l?b.jsx(B,{className:"h-10 w-12 px-3",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(as,{"aria-label":"Select all rows",checked:i.isIndeterminate?"indeterminate":i.isAllSelected,onCheckedChange:P})})}):o?b.jsx(B,{className:"px-3 py-2",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(as,{"aria-label":`Select row ${o}`,checked:i.isSelected(o),onCheckedChange:j})})}):b.jsx(B,{className:"px-3 py-2"}):null,e[45]=B,e[46]=i,e[47]=P,e[48]=j,e[49]=l,e[50]=o,e[51]=G):G=e[51],z=G,A=L("border-b transition-colors",{"hover:bg-muted/50":!l},{"bg-muted":i?.selectable&&W},{"opacity-50":v},r),e[26]=x,e[27]=r,e[28]=i,e[29]=P,e[30]=j,e[31]=v,e[32]=l,e[33]=y,e[34]=o,e[35]=M,e[36]=z,e[37]=A}else M=e[35],z=e[36],A=e[37];const $=l?void 0:w,I=l?void 0:R;let V;e[52]!==M?(V=M(),e[52]=M,e[53]=V):V=e[53];let _;e[54]!==z?(_=z(),e[54]=z,e[55]=_):_=e[55];let F;return e[56]!==n||e[57]!==s||e[58]!==A||e[59]!==$||e[60]!==I||e[61]!==V||e[62]!==_?(F=b.jsxs("tr",{className:A,"data-ox-slot":"table-row",ref:$,style:I,...s,children:[V,_,n]}),e[56]=n,e[57]=s,e[58]=A,e[59]=$,e[60]=I,e[61]=V,e[62]=_,e[63]=F):F=e[63],F},G0=Object.assign(fb,{Body:pb,Cell:hb,Controls:gb,Footer:xb,Head:bb,Header:yb,Row:q0,SkeletonRow:Ra}),Fa=k.createContext(null),U0=t=>{const e=T.compilerRuntimeExports.c(24);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,defaultValue:s,onValueChange:i,value:a,variant:l,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const c=l===void 0?"pills":l,[d,u]=k.useState(s||""),f=a!==void 0,m=f?a:d;let h;e[8]!==f||e[9]!==i?(h=C=>{f||u(C),i?.(C)},e[8]=f,e[9]=i,e[10]=h):h=e[10];const p=h;let g;e[11]!==m||e[12]!==p||e[13]!==c?(g={value:m,variant:c,onValueChange:p},e[11]=m,e[12]=p,e[13]=c,e[14]=g):g=e[14];const x=g;let v;e[15]!==r?(v=L("w-full",r),e[15]=r,e[16]=v):v=e[16];let y;e[17]!==n||e[18]!==o||e[19]!==v?(y=b.jsx("div",{className:v,...o,"data-ox-slot":"tabs",children:n}),e[17]=n,e[18]=o,e[19]=v,e[20]=y):y=e[20];let w;return e[21]!==x||e[22]!==y?(w=b.jsx(Fa.Provider,{value:x,children:y}),e[21]=x,e[22]=y,e[23]=w):w=e[23],w},Ks=()=>{const t=k.useContext(Fa);if(!t)throw new Error("Tabs components must be used within OxTabs");return t},K0=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,value:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{value:i}=Ks();if(!(i===o))return null;const a=`tab-${o}`;let c;e[5]!==r?(c=L("pt-4",r),e[5]=r,e[6]=c):c=e[6];let d;return e[7]!==n||e[8]!==s||e[9]!==a||e[10]!==c?(d=b.jsx("div",{"aria-labelledby":a,className:c,role:"tabpanel",...s,"data-ox-slot":"tabs-content",children:n}),e[7]=n,e[8]=s,e[9]=a,e[10]=c,e[11]=d):d=e[11],d},X0=ot("flex",{variants:{variant:{bordered:"border-b border-border",pills:"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]"}},defaultVariants:{variant:"pills"}}),Q0=ot(["inline-flex items-center justify-center gap-1.5 text-sm font-medium whitespace-nowrap","transition-[color,box-shadow]","ox-focus-ring cursor-pointer","disabled:pointer-events-none disabled:opacity-50",'[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4'],{variants:{variant:{bordered:["relative rounded-t-lg border-t border-r border-l border-transparent px-4 py-2","hover:bg-muted hover:text-foreground","data-[ox-state=active]:border-border data-[ox-state=active]:text-foreground","data-[ox-state=inactive]:text-muted-foreground"],pills:["h-[calc(100%-1px)] flex-1 rounded-md border border-transparent px-2 py-1","data-[ox-state=active]:bg-input/30 data-[ox-state=active]:border-input data-[ox-state=active]:text-foreground data-[ox-state=active]:shadow-sm","data-[ox-state=inactive]:text-muted-foreground"]}},defaultVariants:{variant:"pills"}}),J0=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{variant:o}=Ks();let i;e[4]!==r||e[5]!==o?(i=L(X0({variant:o}),r),e[4]=r,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==n||e[8]!==s||e[9]!==i||e[10]!==o?(l=b.jsx("div",{className:i,role:"tablist",...s,"data-ox-slot":"tabs-list","data-ox-variant":o,children:n}),e[7]=n,e[8]=s,e[9]=i,e[10]=o,e[11]=l):l=e[11],l},Z0=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,{onValueChange:a,value:c,variant:d}=Ks(),u=c===i;let f;e[6]!==l||e[7]!==a||e[8]!==i?(f=()=>{l||a(i)},e[6]=l,e[7]=a,e[8]=i,e[9]=f):f=e[9];const m=f;let h;e[10]!==m?(h=w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),m())},e[10]=m,e[11]=h):h=e[11];const p=h,g=l||void 0;let x;e[12]!==r||e[13]!==d?(x=L(Q0({variant:d}),r),e[12]=r,e[13]=d,e[14]=x):x=e[14];const v=u?"active":"inactive";let y;return e[15]!==n||e[16]!==l||e[17]!==s||e[18]!==m||e[19]!==p||e[20]!==u||e[21]!==g||e[22]!==x||e[23]!==v?(y=b.jsx("button",{"aria-disabled":g,"aria-selected":u,className:x,disabled:l,role:"tab",type:"button",onClick:m,onKeyDown:p,...s,"data-ox-slot":"tabs-trigger","data-ox-state":v,children:n}),e[15]=n,e[16]=l,e[17]=s,e[18]=m,e[19]=p,e[20]=u,e[21]=g,e[22]=x,e[23]=v,e[24]=y):y=e[24],y},e2=Object.assign(U0,{Content:K0,List:J0,Trigger:Z0}),t2=t=>{const e=T.compilerRuntimeExports.c(32);let n,r,s,o,i;e[0]!==t?({className:n,onThemeChange:o,size:i,theme:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?"md":i,{setTheme:a,theme:c}=T.useOxTheme(),d=r??c,u=d==="dark";let f;e[6]!==r||e[7]!==u||e[8]!==o||e[9]!==a?(f=()=>{const E=u?"light":"dark";r===void 0&&a(E),o?.(E)},e[6]=r,e[7]=u,e[8]=o,e[9]=a,e[10]=f):f=e[10];const m=f,h=u?"Switch to light mode":"Switch to dark mode";let p;e[11]!==n||e[12]!==l?(p=L(At({variant:"ghost",size:l,iconOnly:!0}),n),e[11]=n,e[12]=l,e[13]=p):p=e[13];const g=u?"opacity-0 blur-[2px]":"blur-0 opacity-100";let x;e[14]!==g?(x=L("transition-all duration-200",g),e[14]=g,e[15]=x):x=e[15];let v;e[16]!==x?(v=b.jsx(ue,{className:x,icon:le.Sun}),e[16]=x,e[17]=v):v=e[17];const y=u?"blur-0 opacity-100":"opacity-0 blur-[2px]";let w;e[18]!==y?(w=L("absolute inset-0 transition-all duration-200",y),e[18]=y,e[19]=w):w=e[19];let C;e[20]!==w?(C=b.jsx(ue,{className:w,icon:le.Moon}),e[20]=w,e[21]=C):C=e[21];let O;e[22]!==C||e[23]!==v?(O=b.jsxs("span",{className:"relative flex items-center justify-center",children:[v,C]}),e[22]=C,e[23]=v,e[24]=O):O=e[24];let S;return e[25]!==s||e[26]!==m||e[27]!==O||e[28]!==h||e[29]!==p||e[30]!==d?(S=b.jsx("button",{"aria-label":h,className:p,type:"button",onClick:m,...s,"data-ox-slot":"theme-switcher","data-theme":d,children:O}),e[25]=s,e[26]=m,e[27]=O,e[28]=h,e[29]=p,e[30]=d,e[31]=S):S=e[31],S},n2=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("grid grid-cols-[1fr_auto_1fr] items-start gap-4 text-sm",'[&_svg:not([class*="size-"])]:size-5 [&>svg]:text-current',r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("ol",{"aria-label":"Timeline",className:o,"data-ox-slot":"timeline",role:"list",...s,children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},r2=t=>{const e=T.compilerRuntimeExports.c(45);let n,r,s,o,i,l,a,c,d,u;e[0]!==t?({align:a,children:n,className:r,color:c,description:s,icon:i,label:l,showSeparator:d,timestamp:u,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10]);const f=a===void 0?"left":a,m=c===void 0?"purple":c,h=d===void 0?!1:d,p=n||s;let g;e[11]!==r?(g=L("col-span-3 grid grid-cols-subgrid",r),e[11]=r,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==m||e[15]!==p||e[16]!==l||e[17]!==u?(x=f==="left"&&b.jsxs("div",{className:"space-y-1 text-right",children:[b.jsx("h6",{className:L("text-sm leading-tight font-medium",We[m].text),children:l}),p&&b.jsx(Jt,{children:p}),u&&b.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),e[13]=f,e[14]=m,e[15]=p,e[16]=l,e[17]=u,e[18]=x):x=e[18];let v;e[19]!==x?(v=b.jsx("div",{children:x}),e[19]=x,e[20]=v):v=e[20];const y=i||le.Circle;let w;e[21]!==y?(w=b.jsx(ue,{icon:y}),e[21]=y,e[22]=w):w=e[22];let C;e[23]!==m||e[24]!==w?(C=b.jsx(ue.Box,{color:m,size:"lg",children:w}),e[23]=m,e[24]=w,e[25]=C):C=e[25];let O;e[26]!==h?(O=h?b.jsx(Vs,{className:"mx-auto",orientation:"vertical"}):null,e[26]=h,e[27]=O):O=e[27];let S;e[28]!==O||e[29]!==C?(S=b.jsxs("div",{className:"grid shrink-0 grid-rows-[auto_1fr] gap-4",children:[C,O]}),e[28]=O,e[29]=C,e[30]=S):S=e[30];let E;e[31]!==f||e[32]!==m||e[33]!==p||e[34]!==l||e[35]!==u?(E=f==="right"&&b.jsxs("div",{className:"space-y-1 text-left",children:[b.jsx("h6",{className:L("text-sm leading-tight font-medium",We[m].text),children:l}),p&&b.jsx(Jt,{children:p}),u&&b.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),e[31]=f,e[32]=m,e[33]=p,e[34]=l,e[35]=u,e[36]=E):E=e[36];let R;e[37]!==E?(R=b.jsx("div",{children:E}),e[37]=E,e[38]=R):R=e[38];let N;return e[39]!==o||e[40]!==S||e[41]!==R||e[42]!==g||e[43]!==v?(N=b.jsxs("li",{className:g,"data-ox-slot":"timeline-item",role:"listitem",...o,children:[v,S,R]}),e[39]=o,e[40]=S,e[41]=R,e[42]=g,e[43]=v,e[44]=N):N=e[44],N},s2=Object.assign(n2,{Item:r2}),Va=k.createContext(null),o2=t=>{const e=T.compilerRuntimeExports.c(15),{align:n,children:r,maxToasts:s,position:o}=t,i=n===void 0?"right":n,l=s===void 0?3:s,a=o===void 0?"top":o;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[d,u]=k.useState(c);let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=O=>{u(S=>S.map(E=>E.id===O?{...E,isRemoving:!0}:E)),setTimeout(()=>{u(S=>T.reject(S,E=>E.id===O))},200)},e[1]=f):f=e[1];const m=f;let h;e[2]!==l?(h=(O,S,E,R)=>{const N=T.uniqueId(),j=E?.duration??5e3,D={id:N,title:O,type:S,duration:j,description:E?.description,icon:E?.icon,color:E?.color,customContent:R};return u(P=>T.take([D,...P],l)),j>0&&setTimeout(()=>{m(N)},j),N},e[2]=l,e[3]=h):h=e[3];const p=h;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=O=>{O?m(O):u([])},e[4]=g):g=e[4];const x=g;let v;e[5]!==p?(v=Object.assign((O,S)=>p(O,"default",S),{success:(O,S)=>p(O,"success",S),destructive:(O,S)=>p(O,"destructive",S),warning:(O,S)=>p(O,"warning",S),info:(O,S)=>p(O,"info",S),custom:(O,S)=>p("","default",{duration:S?.duration},O),dismiss:x}),e[5]=p,e[6]=v):v=e[6];const y=v;let w;e[7]!==i||e[8]!==a||e[9]!==d?(w=b.jsx(Ba,{align:i,position:a,toasts:d,onRemove:m}),e[7]=i,e[8]=a,e[9]=d,e[10]=w):w=e[10];let C;return e[11]!==r||e[12]!==w||e[13]!==y?(C=b.jsxs(Va.Provider,{value:y,children:[r,w]}),e[11]=r,e[12]=w,e[13]=y,e[14]=C):C=e[14],C},i2=()=>{const t=k.useContext(Va);if(!t)throw new Error("useOxToast must be used within a ToastProvider");return t},l2=t=>{const e=T.compilerRuntimeExports.c(48),{index:n,onRemove:r,position:s,toast:o}=t,i=o.icon??rt[o.type].icon,[l,a]=k.useState(!0);let c,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{const D=setTimeout(()=>a(!1),50);return()=>clearTimeout(D)},d=[],e[0]=c,e[1]=d):(c=e[0],d=e[1]),k.useEffect(c,d);const u=n*8,f=1-n*.05;let m;e[2]!==n||e[3]!==l||e[4]!==s||e[5]!==f||e[6]!==u||e[7]!==o.isRemoving?(m=()=>{const P=l?s==="top"?-16:16:0,M=o.isRemoving||l?0:1;return s==="top"?{top:`${u+P}px`,transform:`scale(${f})`,zIndex:30-n,opacity:M}:{top:`${-u+P}px`,transform:`scale(${f})`,zIndex:30-n,opacity:M}},e[2]=n,e[3]=l,e[4]=s,e[5]=f,e[6]=u,e[7]=o.isRemoving,e[8]=m):m=e[8];const h=m;if(o.customContent){let D;e[9]!==h?(D=h(),e[9]=h,e[10]=D):D=e[10];let P;e[11]!==r||e[12]!==o.id?(P=()=>r(o.id),e[11]=r,e[12]=o.id,e[13]=P):P=e[13];let M;return e[14]!==D||e[15]!==P||e[16]!==o.customContent?(M=b.jsx("div",{className:"pointer-events-auto absolute w-full cursor-pointer rounded-lg border border-border bg-card transition-all duration-300 ease-out md:w-80","data-ox-slot":"toast-item",role:"status",style:D,onClick:P,children:o.customContent}),e[14]=D,e[15]=P,e[16]=o.customContent,e[17]=M):M=e[17],M}const p=o.description?`${o.id}-desc`:void 0;let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=L("pointer-events-auto absolute","flex w-full items-center gap-3 md:w-80",'[&_svg:not([class*="size-"])]:size-5 [&>svg]:text-current',"cursor-pointer","rounded-lg border border-border bg-card p-4","transition-all duration-300 ease-out"),e[18]=g):g=e[18];const x=o.type==="destructive"||o.type==="warning"?"alert":"status";let v;e[19]!==h?(v=h(),e[19]=h,e[20]=v):v=e[20];let y;e[21]!==r||e[22]!==o.id?(y=()=>r(o.id),e[21]=r,e[22]=o.id,e[23]=y):y=e[23];let w;e[24]!==o.type?(w=b.jsxs("span",{className:"sr-only",children:[o.type," notification:"]}),e[24]=o.type,e[25]=w):w=e[25];const C=o.color??o.type;let O;e[26]!==i||e[27]!==o.path?(O=b.jsx(ue,{icon:i,path:o.path}),e[26]=i,e[27]=o.path,e[28]=O):O=e[28];let S;e[29]!==C||e[30]!==O?(S=b.jsx(ue.Box,{color:C,size:"md",children:O}),e[29]=C,e[30]=O,e[31]=S):S=e[31];let E;e[32]!==o.title?(E=b.jsx("div",{className:"text-xs font-medium text-foreground",children:o.title}),e[32]=o.title,e[33]=E):E=e[33];let R;e[34]!==o.description||e[35]!==o.id?(R=o.description?b.jsx("p",{id:`${o.id}-desc`,className:"mt-1 text-xs",children:o.description}):null,e[34]=o.description,e[35]=o.id,e[36]=R):R=e[36];let N;e[37]!==E||e[38]!==R?(N=b.jsxs("div",{className:"flex-1",children:[E,R]}),e[37]=E,e[38]=R,e[39]=N):N=e[39];let j;return e[40]!==S||e[41]!==N||e[42]!==p||e[43]!==x||e[44]!==v||e[45]!==y||e[46]!==w?(j=b.jsxs("div",{"aria-describedby":p,className:g,"data-ox-slot":"toast-item",role:x,style:v,onClick:y,children:[w,S,N]}),e[40]=S,e[41]=N,e[42]=p,e[43]=x,e[44]=v,e[45]=y,e[46]=w,e[47]=j):j=e[47],j},a2={left:"left-1/2 -translate-x-1/2 md:translate-none md:left-4",center:"left-1/2 -translate-x-1/2",right:"left-1/2 -translate-x-1/2 md:translate-none md:left-auto md:right-4"},c2={top:"top-4",bottom:"bottom-24"},Ba=t=>{const e=T.compilerRuntimeExports.c(13),{align:n,onRemove:r,position:s,toasts:o}=t,i=a2[n],l=c2[s];let a;e[0]!==i||e[1]!==l?(a=L("pointer-events-none fixed z-50 w-11/12 md:w-80",i,l),e[0]=i,e[1]=l,e[2]=a):a=e[2];let c;if(e[3]!==r||e[4]!==s||e[5]!==o){let u;e[7]!==r||e[8]!==s?(u=(f,m)=>b.jsx(l2,{index:m,position:s,toast:f,onRemove:r},f.id),e[7]=r,e[8]=s,e[9]=u):u=e[9],c=o.map(u),e[3]=r,e[4]=s,e[5]=o,e[6]=c}else c=e[6];let d;return e[10]!==a||e[11]!==c?(d=it.createPortal(b.jsx("div",{"aria-atomic":"false","aria-label":"Notifications","aria-live":"polite",className:a,"data-ox-slot":"toast-container",role:"region",children:c}),document.body),e[10]=a,e[11]=c,e[12]=d):d=e[12],d},Wa=k.createContext(null),d2=()=>k.useContext(Wa),u2=t=>{const e=T.compilerRuntimeExports.c(48);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,disabled:s,id:a,onPressedChange:i,pressed:l,size:c,value:d,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=k.useId(),f=d2(),m=a||u,h=f!==null,p=s||f?.disabled||!1,g=c||f?.size||"md";let x,v,y,w,C;if(e[10]!==p||e[11]!==g||e[12]!==n||e[13]!==r||e[14]!==f||e[15]!==m||e[16]!==h||e[17]!==i||e[18]!==l||e[19]!==d){const S=Li(n);let E;if(e[25]!==p||e[26]!==f||e[27]!==h||e[28]!==i||e[29]!==l||e[30]!==d){if(h&&d!==void 0){if(f.type==="single")E=f.value===d;else{let N;e[33]!==f.value?(N=f.value||[],e[33]=f.value,e[34]=N):N=e[34],E=N.includes(d)}let R;e[35]!==p||e[36]!==f||e[37]!==d?(R=()=>{!p&&f.onToggle&&f.onToggle(d)},e[35]=p,e[36]=f,e[37]=d,e[38]=R):R=e[38],x=R}else E=l||!1,x=()=>{!p&&i&&i(!E)};e[25]=p,e[26]=f,e[27]=h,e[28]=i,e[29]=l,e[30]=d,e[31]=x,e[32]=E}else x=e[31],E=e[32];v=m,y=p||void 0,w=E,C=L(At({size:g,variant:E?"default":"ghost",iconOnly:S}),r),e[10]=p,e[11]=g,e[12]=n,e[13]=r,e[14]=f,e[15]=m,e[16]=h,e[17]=i,e[18]=l,e[19]=d,e[20]=x,e[21]=v,e[22]=y,e[23]=w,e[24]=C}else x=e[20],v=e[21],y=e[22],w=e[23],C=e[24];let O;return e[39]!==p||e[40]!==n||e[41]!==o||e[42]!==x||e[43]!==v||e[44]!==y||e[45]!==w||e[46]!==C?(O=b.jsx("button",{id:v,"aria-disabled":y,"aria-pressed":w,className:C,disabled:p,role:"button",type:"button",onClick:x,...o,"data-ox-slot":"toggle",children:n}),e[39]=p,e[40]=n,e[41]=o,e[42]=x,e[43]=v,e[44]=y,e[45]=w,e[46]=C,e[47]=O):O=e[47],O},f2=t=>{const e=T.compilerRuntimeExports.c(30);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,disabled:l,name:o,onValueChange:i,size:a,type:c,value:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=l===void 0?!1:l,f=a===void 0?"md":a,m=c===void 0?"single":c;let h;e[10]!==i||e[11]!==m||e[12]!==d?(h=w=>{if(i)if(m==="single")i(d===w?"":w);else{const C=d||[],O=C.includes(w)?C.filter(S=>S!==w):[...C,w];i(O)}},e[10]=i,e[11]=m,e[12]=d,e[13]=h):h=e[13];const p=h;let g;e[14]!==u||e[15]!==p||e[16]!==o||e[17]!==f||e[18]!==m||e[19]!==d?(g={value:d,onToggle:p,size:f,name:o,disabled:u,type:m},e[14]=u,e[15]=p,e[16]=o,e[17]=f,e[18]=m,e[19]=d,e[20]=g):g=e[20];let x;e[21]!==r?(x=L("flex flex-wrap gap-2",r),e[21]=r,e[22]=x):x=e[22];let v;e[23]!==n||e[24]!==s||e[25]!==x?(v=b.jsx("div",{className:x,role:"group",...s,"data-ox-slot":"toggle-group",children:n}),e[23]=n,e[24]=s,e[25]=x,e[26]=v):v=e[26];let y;return e[27]!==g||e[28]!==v?(y=b.jsx(Wa.Provider,{value:g,children:v}),e[27]=g,e[28]=v,e[29]=y):y=e[29],y},m2=Object.assign(u2,{Group:f2}),Ha=k.createContext(null),Ya=()=>k.useContext(Ha),p2=({align:t="center",children:e,className:n,content:r,disabled:s=!1,hoverDelay:o=700,interactive:i=!1,position:l="top",trigger:a="hover"})=>{const c=Ya(),[d,u]=k.useState(!1),[f,m]=k.useState(!1),[h,p]=k.useState(!1),g=k.useRef(null),x=k.useRef(null),v=k.useRef(null),y=s?!1:d;k.useEffect(()=>(y?(v.current&&clearTimeout(v.current),p(!1),m(!0),c?.onTooltipOpen()):f&&(p(!0),c?.onTooltipClose(),v.current=setTimeout(()=>{m(!1),p(!1)},100)),()=>{v.current&&clearTimeout(v.current)}),[y,f,c]);const w=k.useCallback(()=>{x.current&&clearTimeout(x.current),g.current&&clearTimeout(g.current),g.current=null,u(!0)},[]),C=k.useCallback(()=>{g.current&&clearTimeout(g.current),x.current&&clearTimeout(x.current),g.current=null,u(!1)},[]),O=k.useCallback(()=>{if(g.current&&clearTimeout(g.current),c?.shouldSkipDelay()??!1){u(!0);return}g.current=setTimeout(()=>{u(!0),g.current=null},o)},[o,c]),S=k.useCallback(()=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{u(!1),x.current=null},100)},[]),E=k.useCallback(()=>{x.current&&clearTimeout(x.current)},[]),R=k.useMemo(()=>a==="hover"?{onBlur:C,onFocus:w,onPointerEnter:O,onPointerLeave:i?S:C}:a==="click"?{onClick:()=>u(D=>!D)}:{onBlur:C,onFocus:w},[a,C,w,O,S,i]),N=k.useMemo(()=>i?{onPointerEnter:E,onPointerLeave:C}:{},[i,E,C]),j=k.isValidElement(e)?k.cloneElement(e,R):e;return b.jsxs(ke,{children:[b.jsx(ke.Anchor,{asChild:!0,children:j}),f&&b.jsxs(ke.Content,{align:t,"aria-live":"polite",className:L("ox-tooltip-animate max-w-xs rounded-md border border-border bg-popover px-3.75 py-2.5 text-xs text-popover-foreground shadow-md",n),"data-ox-state":h?"closing":"open",role:"tooltip",side:l,sideOffset:2,...N,children:[b.jsx(ke.Arrow,{}),r]})]})},h2=t=>{const e=T.compilerRuntimeExports.c(12),{children:n,skipDelayDuration:r}=t,s=r===void 0?300:r,[o,i]=k.useState(!1),l=k.useRef(0);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{i(!0)},e[0]=a):a=e[0];const c=a;let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{l.current=Date.now(),i(!1)},e[1]=d):d=e[1];const u=d;let f;e[2]!==o||e[3]!==s?(f=()=>o?!0:Date.now()-l.current<s,e[2]=o,e[3]=s,e[4]=f):f=e[4];const m=f;let h;e[5]!==o||e[6]!==m||e[7]!==s?(h={isTooltipOpen:o,onTooltipClose:u,onTooltipOpen:c,shouldSkipDelay:m,skipDelayDuration:s},e[5]=o,e[6]=m,e[7]=s,e[8]=h):h=e[8];const p=h;let g;return e[9]!==n||e[10]!==p?(g=b.jsx(Ha.Provider,{value:p,children:n}),e[9]=n,e[10]=p,e[11]=g):g=e[11],g};exports.MOBILE_BREAKPOINT=da;exports.OxAccordion=kd;exports.OxAlert=Td;exports.OxAspectRatio=zd;exports.OxAvatar=ps;exports.OxBadge=Qr;exports.OxBreadcrumb=ru;exports.OxButton=Je;exports.OxCalendar=Ji;exports.OxCard=ym;exports.OxCheckbox=as;exports.OxDateInput=Zb;exports.OxDescription=Jt;exports.OxDescriptionList=Em;exports.OxDialog=px;exports.OxDndContext=tp;exports.OxDraggable=Sl;exports.OxDrawer=nr;exports.OxDropdown=Qt;exports.OxDroppable=kl;exports.OxEndlessList=kg;exports.OxError=Oa;exports.OxFileUpload=Tb;exports.OxForm=Bb;exports.OxHeading=Ea;exports.OxHoverCard=Pg;exports.OxIcon=ue;exports.OxIcon$1=Ai;exports.OxImage=Mg;exports.OxJsonField=Ag;exports.OxKanban=rx;exports.OxLabel=Sa;exports.OxLegend=ob;exports.OxLink=ox;exports.OxMasonry=lx;exports.OxNotifications=yx;exports.OxNumberInput=l0;exports.OxOtpInput=d0;exports.OxPageOutline=Rx;exports.OxPagination=$x;exports.OxPopover=qn;exports.OxPopper=ke;exports.OxProgress=Hx;exports.OxRadio=A0;exports.OxSelect=W0;exports.OxSeparator=Vs;exports.OxSkeleton=Vt;exports.OxSlider=Gx;exports.OxSortableList=Zx;exports.OxSpinner=ys;exports.OxStatusDisplay=nb;exports.OxStepper=ub;exports.OxSwitch=H0;exports.OxTable=G0;exports.OxTabs=e2;exports.OxTag=Jr;exports.OxTextInput=E0;exports.OxTextarea=Y0;exports.OxThemeSwitcher=t2;exports.OxTimeInput=P0;exports.OxTimeline=s2;exports.OxToast=Ba;exports.OxToastProvider=o2;exports.OxToggle=m2;exports.OxTooltip=p2;exports.OxTooltipProvider=h2;exports.buildMailTo=Ka;exports.buildUrl=Ua;exports.cn=L;exports.copyToClipboard=Lc;exports.createId=Wc;exports.createSlot=dt;exports.formatBytes=Yc;exports.formatCurrency=qc;exports.formatDate=Gc;exports.formatNumber=Uc;exports.formatTimestamp=ds;exports.generateRandomString=Si;exports.handleFormErrors=Ri;exports.handleGraphQLFormErrors=Hc;exports.hasDataSlot=us;exports.parseGraphQLErrors=ki;exports.scrollToElement=Ni;exports.useDndContext=ep;exports.useOxToast=i2;exports.useOxTooltipContext=Ya;exports.usePopperContentContext=Pl;exports.usePopperContext=Ns;exports.validateEmail=td;exports.validatePhone=sd;exports.validateUrl=nd;
9
+ color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(s),o=!1,s}return i.updateDeps=l=>{r=l},i}function Xo(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const fg=(t,e)=>Math.abs(t-e)<1.01,mg=(t,e,n)=>{let r;return function(...s){t.clearTimeout(r),r=t.setTimeout(()=>e.apply(this,s),n)}},Qo=t=>{const{offsetWidth:e,offsetHeight:n}=t;return{width:e,height:n}},pg=t=>t,hg=t=>{const e=Math.max(t.startIndex-t.overscan,0),n=Math.min(t.endIndex+t.overscan,t.count-1),r=[];for(let s=e;s<=n;s++)r.push(s);return r},gg=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;const s=i=>{const{width:l,height:a}=i;e({width:Math.round(l),height:Math.round(a)})};if(s(Qo(n)),!r.ResizeObserver)return()=>{};const o=new r.ResizeObserver(i=>{const l=()=>{const a=i[0];if(a?.borderBoxSize){const c=a.borderBoxSize[0];if(c){s({width:c.inlineSize,height:c.blockSize});return}}s(Qo(n))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},Jo={passive:!0},Zo=typeof window>"u"?!0:"onscrollend"in window,xg=(t,e)=>{const n=t.scrollElement;if(!n)return;const r=t.targetWindow;if(!r)return;let s=0;const o=t.options.useScrollendEvent&&Zo?()=>{}:mg(r,()=>{e(s,!1)},t.options.isScrollingResetDelay),i=d=>()=>{const{horizontal:u,isRtl:f}=t.options;s=u?n.scrollLeft*(f&&-1||1):n.scrollTop,o(),e(s,d)},l=i(!0),a=i(!1);a(),n.addEventListener("scroll",l,Jo);const c=t.options.useScrollendEvent&&Zo;return c&&n.addEventListener("scrollend",a,Jo),()=>{n.removeEventListener("scroll",l),c&&n.removeEventListener("scrollend",a)}},bg=(t,e,n)=>{if(e?.borderBoxSize){const r=e.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return t[n.options.horizontal?"offsetWidth":"offsetHeight"]},vg=(t,{adjustments:e=0,behavior:n},r)=>{var s,o;const i=t+e;(o=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[r.options.horizontal?"left":"top"]:i,behavior:n})};class yg{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const i=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var o;return(o=r())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=r())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:pg,rangeExtractor:hg,onChange:()=>{},measureElement:bg,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=Yt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,o=new Map;for(let i=r-1;i>=0;i--){const l=n[i];if(s.has(l.lane))continue;const a=o.get(l.lane);if(a==null||l.end>a.end?o.set(l.lane,l):l.end<a.end&&s.set(l.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((i,l)=>i.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=Yt(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,o,i,l)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:i,lanes:l}),{key:!1,skipInitialOnChange:!0,onChange:()=>{this.notify(this.isScrolling)}}),this.getMeasurements=Yt(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:o,enabled:i,lanes:l},a)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const f of this.laneAssignments.keys())f>=n&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const d=this.measurementsCache.slice(0,c),u=new Array(l).fill(void 0);for(let f=0;f<c;f++){const m=d[f];m&&(u[m.lane]=f)}for(let f=c;f<n;f++){const m=o(f),h=this.laneAssignments.get(f);let p,g;if(h!==void 0&&this.options.lanes>1){p=h;const w=u[p],C=w!==void 0?d[w]:void 0;g=C?C.end+this.options.gap:r+s}else{const w=this.options.lanes===1?d[f-1]:this.getFurthestMeasurement(d,f);g=w?w.end+this.options.gap:r+s,p=w?w.lane:f%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(f,p)}const x=a.get(m),v=typeof x=="number"?x:this.options.estimateSize(f),y=g+v;d[f]={index:f,start:g,size:v,end:y,key:m,lane:p},u[p]=f}return this.measurementsCache=d,d},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=Yt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,o)=>this.range=n.length>0&&r>0?wg({measurements:n,outerSize:r,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=Yt(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,o,i)=>o===null||i===null?[]:n({startIndex:o,endIndex:i,overscan:r,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this._measureElement=(n,r)=>{const s=this.indexFromElement(n),o=this.measurementsCache[s];if(!o)return;const i=o.key,l=this.elementsCache.get(i);l!==n&&(l&&this.observer.unobserve(l),this.observer.observe(n),this.elementsCache.set(i,n)),n.isConnected&&this.resizeItem(s,this.options.measureElement(n,r,this))},this.resizeItem=(n,r)=>{const s=this.measurementsCache[n];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,i=r-o;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,i,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",i),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,r)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((r,s)=>{r.isConnected||(this.observer.unobserve(r),this.elementsCache.delete(s))});return}this._measureElement(n,void 0)},this.getVirtualItems=Yt(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let o=0,i=n.length;o<i;o++){const l=n[o],a=r[l];s.push(a)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return Xo(r[Kl(0,r.length-1,s=>Xo(r[s]).start,n)])},this.getOffsetForAlignment=(n,r,s=0)=>{const o=this.getSize(),i=this.getScrollOffset();r==="auto"&&(r=n>=i+o?"end":"start"),r==="center"?n+=(s-o)/2:r==="end"&&(n-=o);const l=this.getTotalSize()+this.options.scrollMargin-o;return Math.max(Math.min(l,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.measurementsCache[n];if(!s)return;const o=this.getSize(),i=this.getScrollOffset();if(r==="auto")if(s.end>=i+o-this.options.scrollPaddingEnd)r="end";else if(s.start<=i+this.options.scrollPaddingStart)r="start";else return[i,r];const l=r==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,r,s.size),r]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:r="start",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,r),{adjustments:void 0,behavior:s})},this.scrollToIndex=(n,{align:r="auto",behavior:s}={})=>{s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let o=0;const i=10,l=c=>{if(!this.targetWindow)return;const d=this.getOffsetForIndex(n,c);if(!d){console.warn("Failed to get offset for index:",n);return}const[u,f]=d;this._scrollToOffset(u,{adjustments:void 0,behavior:s}),this.targetWindow.requestAnimationFrame(()=>{const m=this.getScrollOffset(),h=this.getOffsetForIndex(n,f);if(!h){console.warn("Failed to get offset for index:",n);return}fg(h[0],m)||a(f)})},a=c=>{this.targetWindow&&(o++,o<i?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",o,i),this.targetWindow.requestAnimationFrame(()=>l(c))):console.warn(`Failed to scroll to index ${n} after ${i} attempts.`))};l(r)},this.scrollBy=(n,{behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:r})},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const o=Array(this.options.lanes).fill(null);let i=r.length-1;for(;i>=0&&o.some(l=>l===null);){const l=r[i];o[l.lane]===null&&(o[l.lane]=l.end),i--}s=Math.max(...o.filter(l=>l!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}}const Kl=(t,e,n,r)=>{for(;t<=e;){const s=(t+e)/2|0,o=n(s);if(o<r)t=s+1;else if(o>r)e=s-1;else return s}return t>0?t-1:0};function wg({measurements:t,outerSize:e,scrollOffset:n,lanes:r}){const s=t.length-1,o=a=>t[a].start;if(t.length<=r)return{startIndex:0,endIndex:s};let i=Kl(0,s,o,n),l=i;if(r===1)for(;l<s&&t[l].end<n+e;)l++;else if(r>1){const a=Array(r).fill(0);for(;l<s&&a.some(d=>d<n+e);){const d=t[l];a[d.lane]=d.end,l++}const c=Array(r).fill(n+e);for(;i>=0&&c.some(d=>d>=n);){const d=t[i];c[d.lane]=d.start,i--}i=Math.max(0,i-i%r),l=Math.min(s,l+(r-1-l%r))}return{startIndex:i,endIndex:l}}const ei=typeof document<"u"?ce.useLayoutEffect:ce.useEffect;function Cg(t){const e=ce.useReducer(()=>({}),{})[1],n={...t,onChange:(s,o)=>{var i;o?it.flushSync(e):e(),(i=t.onChange)==null||i.call(t,s,o)}},[r]=ce.useState(()=>new yg(n));return r.setOptions(n),ei(()=>r._didMount(),[]),ei(()=>r._willUpdate()),r}function Og(t){return Cg({observeElementRect:gg,observeElementOffset:xg,scrollToFn:vg,...t})}const Eg=({children:t,className:e,paddingY:n=0})=>{const{data:r,estimateSize:s,gap:o,getItemKey:i,hasNextPage:l,isError:a,isLoading:c,loadMoreThreshold:d,onLoadMore:u,overscan:f,scrollElement:m}=Er(),h=k.useCallback(w=>i(r[w],w),[r,i]),p=k.useCallback(w=>typeof s=="function"?s(w):s,[s]),g=Og({count:r.length,enabled:!!m,estimateSize:p,gap:o,getItemKey:h,getScrollElement:()=>m,overscan:f}),x=g.getVirtualItems(),v=x.at(-1);k.useEffect(()=>{if(!v)return;v.index>=r.length-d&&l&&!c&&!a&&u&&u()},[v,r.length,l,c,a,d,u]);const y=k.Children.only(t);return b.jsx("div",{className:L("relative w-full",e),"data-ox-slot":"endless-list-items",style:{height:g.getTotalSize()+n*2},children:x.map(w=>{const C=r[w.index];return b.jsx(Ul.Provider,{value:{index:w.index,item:C,paddingY:n,virtualItem:w,virtualizer:g},children:k.isValidElement(y)?k.cloneElement(y):null},w.key)})})},Sg=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{hasNextPage:o,isLoading:i}=Er();if(!i||!o)return null;let l;e[4]!==r?(l=L("sticky bottom-0 flex items-center justify-center bg-background/80 py-4 backdrop-blur-sm",r),e[4]=r,e[5]=l):l=e[5];let a;e[6]!==n?(a=n??b.jsx(ys,{size:"sm"}),e[6]=n,e[7]=a):a=e[7];let c;return e[8]!==s||e[9]!==l||e[10]!==a?(c=b.jsx("div",{className:l,"data-ox-slot":"endless-list-loader",...s,children:a}),e[8]=s,e[9]=l,e[10]=a,e[11]=c):c=e[11],c},kg=Object.assign(ag,{Empty:cg,Error:dg,Item:ug,Items:Eg,Loader:Sg}),Xl=k.createContext(null),Rg=t=>{const e=T.compilerRuntimeExports.c(30),{align:n,children:r,closeDelay:s,defaultOpen:o,disabled:i,onOpenChange:l,open:a,openDelay:c,side:d}=t,u=n===void 0?"center":n,f=s===void 0?300:s,m=o===void 0?!1:o,h=i===void 0?!1:i,p=c===void 0?700:c,g=d===void 0?"bottom":d;let x;e[0]!==a||e[1]!==m||e[2]!==h||e[3]!==l?(x={closeOnEscape:!0,closeOnOutsideClick:!1,defaultOpen:m,disabled:h,onOpenChange:l,open:a},e[0]=a,e[1]=m,e[2]=h,e[3]=l,e[4]=x):x=e[4];const{close:v,containerRef:y,isClosing:w,isVisible:C,open:O,setOpen:S}=T.usePopperState(x),E=k.useRef(null);let R;e[5]===Symbol.for("react.memo_cache_sentinel")?(R=()=>{E.current&&(clearTimeout(E.current),E.current=null)},e[5]=R):R=e[5];const N=R;let j;e[6]!==v||e[7]!==f?(j=()=>{N(),E.current=setTimeout(()=>{v()},f)},e[6]=v,e[7]=f,e[8]=j):j=e[8];const D=j;let P,M;e[9]===Symbol.for("react.memo_cache_sentinel")?(P=()=>()=>{N()},M=[N],e[9]=P,e[10]=M):(P=e[9],M=e[10]),k.useEffect(P,M);let z;e[11]!==u||e[12]!==v||e[13]!==f||e[14]!==w||e[15]!==C||e[16]!==O||e[17]!==p||e[18]!==S||e[19]!==g||e[20]!==D?(z={align:u,clearCloseTimer:N,close:v,closeDelay:f,isClosing:w,isVisible:C,open:O,openDelay:p,setOpen:S,side:g,startCloseTimer:D},e[11]=u,e[12]=v,e[13]=f,e[14]=w,e[15]=C,e[16]=O,e[17]=p,e[18]=S,e[19]=g,e[20]=D,e[21]=z):z=e[21];const A=z;let $;e[22]!==r?($=b.jsx(ke,{children:r}),e[22]=r,e[23]=$):$=e[23];let I;e[24]!==y||e[25]!==$?(I=b.jsx("div",{"data-ox-slot":"hovercard",ref:y,children:$}),e[24]=y,e[25]=$,e[26]=I):I=e[26];let V;return e[27]!==A||e[28]!==I?(V=b.jsx(Xl.Provider,{value:A,children:I}),e[27]=A,e[28]=I,e[29]=V):V=e[29],V},Ql=()=>{const t=k.useContext(Xl);if(!t)throw new Error("useHoverCardContext must be used within OxHoverCard");return t},Ng=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,forceMount:l,onPointerEnter:o,onPointerLeave:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,{align:c,clearCloseTimer:d,isClosing:u,isVisible:f,side:m,startCloseTimer:h}=Ql();let p;e[7]!==d||e[8]!==o?(p=S=>{d(),o?.(S)},e[7]=d,e[8]=o,e[9]=p):p=e[9];const g=p;let x;e[10]!==i||e[11]!==h?(x=S=>{h(),i?.(S)},e[10]=i,e[11]=h,e[12]=x):x=e[12];const v=x;if(!f&&!a)return null;let y;e[13]!==r?(y=L("ox-hovercard-animate min-w-64 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md",r),e[13]=r,e[14]=y):y=e[14];const w=u?"closing":"open";let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=b.jsx(ke.Arrow,{}),e[15]=C):C=e[15];let O;return e[16]!==c||e[17]!==n||e[18]!==s||e[19]!==g||e[20]!==v||e[21]!==m||e[22]!==y||e[23]!==w?(O=b.jsxs(ke.Content,{align:c,className:y,side:m,sideOffset:8,...s,"data-ox-slot":"hovercard-content","data-ox-state":w,onPointerEnter:g,onPointerLeave:v,children:[C,n]}),e[16]=c,e[17]=n,e[18]=s,e[19]=g,e[20]=v,e[21]=m,e[22]=y,e[23]=w,e[24]=O):O=e[24],O},jg=dt("OxHoverCardTrigger","div"),Dg=t=>{const e=T.compilerRuntimeExports.c(27);let n,r,s,o,i,l;e[0]!==t?({asChild:l,children:n,className:r,onPointerEnter:o,onPointerLeave:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,{clearCloseTimer:c,openDelay:d,setOpen:u,startCloseTimer:f}=Ql(),m=k.useRef(null);let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{m.current&&(clearTimeout(m.current),m.current=null)},e[7]=h):h=e[7];const p=h;let g;e[8]!==c||e[9]!==o||e[10]!==d||e[11]!==u?(g=S=>{p(),c(),m.current=setTimeout(()=>{u(!0)},d),o?.(S)},e[8]=c,e[9]=o,e[10]=d,e[11]=u,e[12]=g):g=e[12];const x=g;let v;e[13]!==i||e[14]!==f?(v=S=>{p(),f(),i?.(S)},e[13]=i,e[14]=f,e[15]=v):v=e[15];const y=v;let w;e[16]!==r||e[17]!==s||e[18]!==x||e[19]!==y?(w={...s,className:r,"data-ox-slot":"hovercard-trigger",onPointerEnter:x,onPointerLeave:y},e[16]=r,e[17]=s,e[18]=x,e[19]=y,e[20]=w):w=e[20];const C=w;if(a){let S;return e[21]!==n||e[22]!==C?(S=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx(jg,{...C,children:n})}),e[21]=n,e[22]=C,e[23]=S):S=e[23],S}let O;return e[24]!==n||e[25]!==C?(O=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx("div",{...C,children:n})}),e[24]=n,e[25]=C,e[26]=O):O=e[26],O},Pg=Object.assign(Rg,{Content:Ng,Trigger:Dg}),Tg={contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"},Mg=({alt:t,className:e,fallback:n,height:r,objectFit:s,onLoadComplete:o,onLoadError:i,src:l,width:a,...c})=>{const[d,u]=k.useState("loading"),f=k.useRef(l);f.current!==l&&(f.current=l,u("loading"));const m=()=>{u("loaded"),o?.()},h=()=>{u("error"),i?.()},p=a&&r,g=s&&Tg[s],x=d==="loading";return d==="error"?n?b.jsx("div",{className:L({"size-full":!p},e),"data-ox-slot":"image-fallback",style:{width:a,height:r},children:n}):b.jsxs("div",{className:L("flex flex-col items-center justify-center gap-2 bg-muted text-muted-foreground",{"size-full":!p},e),"data-ox-slot":"image-fallback",style:{width:a,height:r},children:[b.jsx(ue,{icon:le.ImageOff,size:"md"}),b.jsx("span",{className:"text-sm",children:t})]}):b.jsxs("div",{className:L("relative",{"size-full":!p}),style:{width:a,height:r},children:[x?b.jsx(Vt,{className:"absolute inset-0 size-full"}):null,b.jsx("img",{alt:t,className:L("size-full",g,{invisible:x},e),"data-ox-slot":"image",height:r,src:l,width:a,onError:h,onLoad:m,...c},l)]})},ar=t=>{const e=T.compilerRuntimeExports.c(82),{data:n,level:r,trailingComma:s}=t,o=s===void 0?!1:s,[i,l]=k.useState(r>2);if(n===null){let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=b.jsx("span",{className:"text-muted-foreground",children:"null"}),e[0]=d):d=e[0];let u;e[1]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[1]=o,e[2]=u):u=e[2];let f;return e[3]!==u?(f=b.jsxs(b.Fragment,{children:[d,u]}),e[3]=u,e[4]=f):f=e[4],f}if(n===void 0){let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=b.jsx("span",{className:"text-muted-foreground",children:"undefined"}),e[5]=d):d=e[5];let u;e[6]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[6]=o,e[7]=u):u=e[7];let f;return e[8]!==u?(f=b.jsxs(b.Fragment,{children:[d,u]}),e[8]=u,e[9]=f):f=e[9],f}if(typeof n=="string"){let d;e[10]!==n?(d=b.jsxs("span",{className:We.green.text,children:['"',n,'"']}),e[10]=n,e[11]=d):d=e[11];let u;e[12]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[12]=o,e[13]=u):u=e[13];let f;return e[14]!==d||e[15]!==u?(f=b.jsxs(b.Fragment,{children:[d,u]}),e[14]=d,e[15]=u,e[16]=f):f=e[16],f}if(typeof n=="number"){let d;e[17]!==n?(d=b.jsx("span",{className:We.blue.text,children:n}),e[17]=n,e[18]=d):d=e[18];let u;e[19]!==o?(u=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[19]=o,e[20]=u):u=e[20];let f;return e[21]!==d||e[22]!==u?(f=b.jsxs(b.Fragment,{children:[d,u]}),e[21]=d,e[22]=u,e[23]=f):f=e[23],f}if(typeof n=="boolean"){let d;e[24]!==n?(d=n.toString(),e[24]=n,e[25]=d):d=e[25];let u;e[26]!==d?(u=b.jsx("span",{className:We.amber.text,children:d}),e[26]=d,e[27]=u):u=e[27];let f;e[28]!==o?(f=o&&b.jsx("span",{className:"text-muted-foreground",children:","}),e[28]=o,e[29]=f):f=e[29];let m;return e[30]!==u||e[31]!==f?(m=b.jsxs(b.Fragment,{children:[u,f]}),e[30]=u,e[31]=f,e[32]=m):m=e[32],m}if(Array.isArray(n)){if(n.length===0){let v;return e[33]===Symbol.for("react.memo_cache_sentinel")?(v=b.jsx("span",{className:"text-muted-foreground",children:"[]"}),e[33]=v):v=e[33],v}const d=i?"collapsed":"expanded";let u;e[34]!==i?(u=()=>l(!i),e[34]=i,e[35]=u):u=e[35];let f;e[36]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx("span",{className:"text-foreground",children:"["}),e[36]=f):f=e[36];let m;e[37]!==i||e[38]!==n.length?(m=i?b.jsxs("span",{className:"ml-1 text-muted-foreground",children:[n.length," item",n.length!==1?"s":""]}):null,e[37]=i,e[38]=n.length,e[39]=m):m=e[39];let h;e[40]!==d||e[41]!==u||e[42]!==m?(h=b.jsxs("button",{className:"ox-focus-ring text-muted-foreground hover:text-foreground","data-ox-state":d,onClick:u,children:[f,m]}),e[40]=d,e[41]=u,e[42]=m,e[43]=h):h=e[43];let p;e[44]!==i||e[45]!==n||e[46]!==r||e[47]!==o?(p=i?null:b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"ml-2 border-l border-muted pl-3",children:n.map((v,y)=>b.jsx("div",{className:"block",children:b.jsx(ar,{data:v,level:r+1,trailingComma:y<n.length-1})},y))}),b.jsxs("div",{children:[b.jsx("span",{className:"text-foreground",children:"]"}),o&&b.jsx("span",{className:"text-muted-foreground",children:","})]})]}),e[44]=i,e[45]=n,e[46]=r,e[47]=o,e[48]=p):p=e[48];let g;e[49]!==i?(g=i&&b.jsx("span",{className:"text-foreground",children:"]"}),e[49]=i,e[50]=g):g=e[50];let x;return e[51]!==h||e[52]!==p||e[53]!==g?(x=b.jsxs("div",{className:"inline","data-ox-slot":"json-array",children:[h,p,g]}),e[51]=h,e[52]=p,e[53]=g,e[54]=x):x=e[54],x}if(typeof n=="object"){let d;e[55]!==n?(d=Object.keys(n),e[55]=n,e[56]=d):d=e[56];const u=d;if(u.length===0){let w;return e[57]===Symbol.for("react.memo_cache_sentinel")?(w=b.jsx("span",{className:"text-muted-foreground",children:"{}"}),e[57]=w):w=e[57],w}const f=i?"collapsed":"expanded";let m;e[58]!==i?(m=()=>l(!i),e[58]=i,e[59]=m):m=e[59];let h;e[60]===Symbol.for("react.memo_cache_sentinel")?(h=b.jsx("span",{className:"text-foreground",children:"{"}),e[60]=h):h=e[60];let p;e[61]!==i||e[62]!==u.length?(p=i?b.jsxs("span",{className:"ml-1 text-muted-foreground",children:[u.length," key",u.length!==1?"s":""]}):null,e[61]=i,e[62]=u.length,e[63]=p):p=e[63];let g;e[64]!==f||e[65]!==m||e[66]!==p?(g=b.jsxs("button",{className:"ox-focus-ring text-muted-foreground hover:text-foreground","data-ox-state":f,onClick:m,children:[h,p]}),e[64]=f,e[65]=m,e[66]=p,e[67]=g):g=e[67];let x;e[68]!==i||e[69]!==n||e[70]!==u||e[71]!==r||e[72]!==o?(x=i?null:b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"ml-2 border-l border-muted pl-3",children:u.map((w,C)=>b.jsxs("div",{className:"block",children:[b.jsxs("span",{className:"text-foreground",children:['"',w,'"']}),b.jsx("span",{className:"text-muted-foreground",children:": "}),b.jsx(ar,{data:n[w],level:r+1,trailingComma:C<u.length-1})]},w))}),b.jsxs("div",{children:[b.jsx("span",{className:"text-foreground",children:"}"}),o&&b.jsx("span",{className:"text-muted-foreground",children:","})]})]}),e[68]=i,e[69]=n,e[70]=u,e[71]=r,e[72]=o,e[73]=x):x=e[73];let v;e[74]!==i?(v=i&&b.jsx("span",{className:"text-foreground",children:"}"}),e[74]=i,e[75]=v):v=e[75];let y;return e[76]!==g||e[77]!==x||e[78]!==v?(y=b.jsxs("div",{className:"inline",children:[g,x,v]}),e[76]=g,e[77]=x,e[78]=v,e[79]=y):y=e[79],y}const a=String(n);let c;return e[80]!==a?(c=b.jsx("span",{className:"text-muted-foreground",children:a}),e[80]=a,e[81]=c):c=e[81],c},Ig=t=>{const e=T.compilerRuntimeExports.c(27);let n,r,s;e[0]!==t?({className:n,value:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const[o,i]=k.useState(!1);let l;e[4]!==s?(l=(()=>{if(s==null)return{parsedData:null,isValid:!0,error:null};if(typeof s=="object")return{parsedData:s,isValid:!0,error:null};if(typeof s=="string")try{return{parsedData:JSON.parse(s),isValid:!0,error:null}}catch(C){const O=C;return{parsedData:null,isValid:!1,error:O instanceof Error?O.message:"Invalid JSON"}}return{parsedData:s,isValid:!0,error:null}})(),e[4]=s,e[5]=l):l=e[5];const{error:a,isValid:c,parsedData:d}=l;let u;e[6]!==d||e[7]!==s?(u=async()=>{const w=typeof s=="string"?s:JSON.stringify(d,null,2);try{await navigator.clipboard.writeText(w),i(!0),setTimeout(()=>i(!1),2e3)}catch(C){console.error("Failed to copy:",C)}},e[6]=d,e[7]=s,e[8]=u):u=e[8];const f=u;let m;c?o?m="copied":m="default":m="error";let h;e[9]!==n?(h=L("relative w-full overflow-auto rounded-lg border bg-card p-4 font-mono text-sm",n),e[9]=n,e[10]=h):h=e[10];const p=o?le.Check:le.Copy;let g;e[11]!==p?(g=b.jsx(ue,{icon:p}),e[11]=p,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==g?(x=b.jsx(Je,{"aria-label":"Copy JSON to clipboard",className:"absolute top-1 right-1",size:"sm",variant:"ghost",onClick:f,children:g}),e[13]=f,e[14]=g,e[15]=x):x=e[15];let v;e[16]!==a||e[17]!==c||e[18]!==d||e[19]!==s?(v=b.jsx("div",{className:"pr-8 text-card-foreground",children:c?b.jsx(ar,{data:d,level:0}):b.jsxs("div",{className:"text-destructive-400",children:[b.jsx("div",{className:"font-medium",children:"Invalid JSON:"}),b.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:a}),b.jsx("div",{className:"mt-2 text-muted-foreground",children:b.jsx("pre",{className:"whitespace-pre-wrap",children:s})})]})}),e[16]=a,e[17]=c,e[18]=d,e[19]=s,e[20]=v):v=e[20];let y;return e[21]!==r||e[22]!==m||e[23]!==h||e[24]!==x||e[25]!==v?(y=b.jsxs("div",{className:h,...r,"data-ox-slot":"json-field","data-ox-state":m,children:[x,v]}),e[21]=r,e[22]=m,e[23]=h,e[24]=x,e[25]=v,e[26]=y):y=e[26],y},Ag=Object.assign(Ig,{Node:ar});function As(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function _g(t,e){return t.reduce((n,r,s)=>{const o=e.get(r);return o&&(n[s]=o),n},Array(t.length))}function Fn(t){return t!==null&&t>=0}function $g(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Lg(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const Vn={scaleX:1,scaleY:1},zg=t=>{var e;let{rects:n,activeNodeRect:r,activeIndex:s,overIndex:o,index:i}=t;const l=(e=n[s])!=null?e:r;if(!l)return null;const a=Fg(n,i,s);if(i===s){const c=n[o];return c?{x:s<o?c.left+c.width-(l.left+l.width):c.left-l.left,y:0,...Vn}:null}return i>s&&i<=o?{x:-l.width-a,y:0,...Vn}:i<s&&i>=o?{x:l.width+a,y:0,...Vn}:{x:0,y:0,...Vn}};function Fg(t,e,n){const r=t[e],s=t[e-1],o=t[e+1];return!r||!s&&!o?0:n<e?s?r.left-(s.left+s.width):o.left-(r.left+r.width):o?o.left-(r.left+r.width):r.left-(s.left+s.width)}const _s=t=>{let{rects:e,activeIndex:n,overIndex:r,index:s}=t;const o=As(e,r,n),i=e[s],l=o[s];return!l||!i?null:{x:l.left-i.left,y:l.top-i.top,scaleX:l.width/i.width,scaleY:l.height/i.height}},Bn={scaleX:1,scaleY:1},$s=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:s,rects:o,overIndex:i}=t;const l=(e=o[n])!=null?e:r;if(!l)return null;if(s===n){const c=o[i];return c?{x:0,y:n<i?c.top+c.height-(l.top+l.height):c.top-l.top,...Bn}:null}const a=Vg(o,s,n);return s>n&&s<=i?{x:0,y:-l.height-a,...Bn}:s<n&&s>=i?{x:0,y:l.height+a,...Bn}:{x:0,y:0,...Bn}};function Vg(t,e,n){const r=t[e],s=t[e-1],o=t[e+1];return r?n<e?s?r.top-(s.top+s.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const Jl="Sortable",Zl=k.createContext({activeIndex:-1,containerId:Jl,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:_s,disabled:{draggable:!1,droppable:!1}});function Ls(t){let{children:e,id:n,items:r,strategy:s=_s,disabled:o=!1}=t;const{active:i,dragOverlay:l,droppableRects:a,over:c,measureDroppableContainers:d}=Ol(),u=Rn(Jl,n),f=l.rect!==null,m=k.useMemo(()=>r.map(O=>typeof O=="object"&&"id"in O?O.id:O),[r]),h=i!=null,p=i?m.indexOf(i.id):-1,g=c?m.indexOf(c.id):-1,x=k.useRef(m),v=!$g(m,x.current),y=g!==-1&&p===-1||v,w=Lg(o);lt(()=>{v&&h&&d(m)},[v,m,h,d]),k.useEffect(()=>{x.current=m},[m]);const C=k.useMemo(()=>({activeIndex:p,containerId:u,disabled:w,disableTransforms:y,items:m,overIndex:g,useDragOverlay:f,sortedRects:_g(m,a),strategy:s}),[p,u,w.draggable,w.droppable,y,m,g,a,f,s]);return k.createElement(Zl.Provider,{value:C},e)}const Bg=t=>{let{id:e,items:n,activeIndex:r,overIndex:s}=t;return As(n,r,s).indexOf(e)},Wg=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:s,items:o,newIndex:i,previousItems:l,previousContainerId:a,transition:c}=t;return!c||!r||l!==o&&s===i?!1:n?!0:i!==s&&e===a},Hg={duration:200,easing:"ease"},ea="transform",Yg=at.Transition.toString({property:ea,duration:0,easing:"linear"}),qg={roleDescription:"sortable"};function Gg(t){let{disabled:e,index:n,node:r,rect:s}=t;const[o,i]=k.useState(null),l=k.useRef(n);return lt(()=>{if(!e&&n!==l.current&&r.current){const a=s.current;if(a){const c=sn(r.current,{ignoreTransform:!0}),d={x:a.left-c.left,y:a.top-c.top,scaleX:a.width/c.width,scaleY:a.height/c.height};(d.x||d.y)&&i(d)}}n!==l.current&&(l.current=n)},[e,n,r,s]),k.useEffect(()=>{o&&i(null)},[o]),o}function zs(t){let{animateLayoutChanges:e=Wg,attributes:n,disabled:r,data:s,getNewIndex:o=Bg,id:i,strategy:l,resizeObserverConfig:a,transition:c=Hg}=t;const{items:d,containerId:u,activeIndex:f,disabled:m,disableTransforms:h,sortedRects:p,overIndex:g,useDragOverlay:x,strategy:v}=k.useContext(Zl),y=Ug(r,m),w=d.indexOf(i),C=k.useMemo(()=>({sortable:{containerId:u,index:w,items:d},...s}),[u,s,w,d]),O=k.useMemo(()=>d.slice(d.indexOf(i)),[d,i]),{rect:S,node:E,isOver:R,setNodeRef:N}=Rs({id:i,data:C,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...a}}),{active:j,activatorEvent:D,activeNodeRect:P,attributes:M,setNodeRef:z,listeners:A,isDragging:$,over:I,setActivatorNodeRef:V,transform:_}=Cl({id:i,data:C,attributes:{...qg,...n},disabled:y.draggable}),F=Sm(N,z),W=!!j,B=W&&!h&&Fn(f)&&Fn(g),H=!x&&$,G=H&&B?_:null,Y=B?G??(l??v)({rects:p,activeNodeRect:P,activeIndex:f,overIndex:g,index:w}):null,Q=Fn(f)&&Fn(g)?o({id:i,items:d,activeIndex:f,overIndex:g}):w,X=j?.id,U=k.useRef({activeId:X,items:d,newIndex:Q,containerId:u}),J=d!==U.current.items,q=e({active:j,containerId:u,isDragging:$,isSorting:W,id:i,index:w,items:d,newIndex:U.current.newIndex,previousItems:U.current.items,previousContainerId:U.current.containerId,transition:c,wasDragging:U.current.activeId!=null}),se=Gg({disabled:!q,index:w,node:E,rect:S});return k.useEffect(()=>{W&&U.current.newIndex!==Q&&(U.current.newIndex=Q),u!==U.current.containerId&&(U.current.containerId=u),d!==U.current.items&&(U.current.items=d)},[W,Q,u,d]),k.useEffect(()=>{if(X===U.current.activeId)return;if(X!=null&&U.current.activeId==null){U.current.activeId=X;return}const te=setTimeout(()=>{U.current.activeId=X},50);return()=>clearTimeout(te)},[X]),{active:j,activeIndex:f,attributes:M,data:C,rect:S,index:w,newIndex:Q,items:d,isOver:R,isSorting:W,isDragging:$,listeners:A,node:E,overIndex:g,over:I,setNodeRef:F,setActivatorNodeRef:V,setDroppableNodeRef:N,setDraggableNodeRef:z,transform:se??Y,transition:ee()};function ee(){if(se||J&&U.current.newIndex===w)return Yg;if(!(H&&!pr(D)||!c)&&(W||q))return at.Transition.toString({...c,property:ea})}}function Ug(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t?.draggable)!=null?n:e.draggable,droppable:(r=t?.droppable)!=null?r:e.droppable}}function cr(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const Kg=[he.Down,he.Right,he.Up,he.Left],Fs=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:o,over:i,scrollableAncestors:l}}=e;if(Kg.includes(t.code)){if(t.preventDefault(),!n||!r)return;const a=[];o.getEnabled().forEach(u=>{if(!u||u!=null&&u.disabled)return;const f=s.get(u.id);if(f)switch(t.code){case he.Down:r.top<f.top&&a.push(u);break;case he.Up:r.top>f.top&&a.push(u);break;case he.Left:r.left>f.left&&a.push(u);break;case he.Right:r.left<f.left&&a.push(u);break}});const c=il({collisionRect:r,droppableRects:s,droppableContainers:a});let d=sl(c,"id");if(d===i?.id&&c.length>1&&(d=c[1].id),d!=null){const u=o.get(n.id),f=o.get(d),m=f?s.get(f.id):null,h=f?.node.current;if(h&&m&&u&&f){const g=hr(h).some((O,S)=>l[S]!==O),x=ta(u,f),v=Xg(u,f),y=g||!x?{x:0,y:0}:{x:v?r.width-m.width:0,y:v?r.height-m.height:0},w={x:m.left,y:m.top};return y.x&&y.y?w:yn(w,y)}}}};function ta(t,e){return!cr(t)||!cr(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function Xg(t,e){return!cr(t)||!cr(e)||!ta(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}const na=k.createContext(null),Qg=()=>{const t=k.useContext(na);if(!t)throw new Error("KanbanCardHandle must be used within an OxKanban.Card");return t},ra=k.createContext(null),Jg=()=>{const t=k.useContext(ra);if(!t)throw new Error("KanbanCard must be used within an OxKanban.Column");return t},sa=k.createContext(null),oa=()=>{const t=k.useContext(sa);if(!t)throw new Error("Kanban components must be used within an OxKanban");return t},Zg=t=>{const e=T.compilerRuntimeExports.c(47);let n,r,s,o,i,l,a,c;e[0]!==t?({children:n,className:r,columnGap:a,disabled:c,onMove:o,onReorder:i,style:l,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=a===void 0?16:a,u=c===void 0?!1:c,[f,m]=k.useState(null),[h,p]=k.useState(null);let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=new Map,e[9]=g):g=e[9];const x=k.useRef(g);let v;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=new Map,e[10]=v):v=e[10];const y=k.useRef(v);let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=new Map,e[11]=w):w=e[11];const C=k.useRef(w),O=k.useRef(null);let S;e[12]===Symbol.for("react.memo_cache_sentinel")?(S={coordinateGetter:Fs},e[12]=S):S=e[12];const E=Os(Kt(jn),Kt(Nn,S));let R;e[13]===Symbol.for("react.memo_cache_sentinel")?(R=(X,U,J)=>{x.current.set(X,U),y.current.set(X,J)},e[13]=R):R=e[13];const N=R;let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=X=>{x.current.delete(X),y.current.delete(X)},e[14]=j):j=e[14];const D=j;let P;e[15]===Symbol.for("react.memo_cache_sentinel")?(P=X=>{const U=String(X.active.id);m(U),p(y.current.get(U)??null)},e[15]=P):P=e[15];const M=P;let z;e[16]!==o||e[17]!==i?(z=X=>{const{active:U,over:J}=X;if(!J)return;const q=String(U.id),se=String(J.id),ee=x.current.get(q);if(!ee)return;const te=x.current.get(se)??se,ae=C.current.get(te)??[];let de=ae.indexOf(se);de===-1&&(de=ae.length);const fe=O.current;if(!(fe?.column===te&&fe?.index===de))if(O.current={column:te,index:de},ee===te){const ge=ae.indexOf(q);ge!==de&&ge!==-1&&i&&i(q,ee,ge,de)}else o(q,ee,te,de)},e[16]=o,e[17]=i,e[18]=z):z=e[18];const A=z;let $;e[19]===Symbol.for("react.memo_cache_sentinel")?($=()=>{m(null),p(null),O.current=null},e[19]=$):$=e[19];const I=$;let V;e[20]!==h||e[21]!==f||e[22]!==u?(V={activeCardContent:h,activeId:f,columnCardIdsMap:C,disabled:u,registerCard:N,unregisterCard:D},e[20]=h,e[21]=f,e[22]=u,e[23]=V):V=e[23];const _=V,F=u?void 0:E;let W;e[24]!==r?(W=L("flex",r),e[24]=r,e[25]=W):W=e[25];let B;e[26]!==d||e[27]!==l?(B={gap:d,...l},e[26]=d,e[27]=l,e[28]=B):B=e[28];let H;e[29]!==n||e[30]!==s||e[31]!==W||e[32]!==B?(H=b.jsx("div",{className:W,"data-ox-slot":"kanban",style:B,...s,children:n}),e[29]=n,e[30]=s,e[31]=W,e[32]=B,e[33]=H):H=e[33];let G;e[34]!==h||e[35]!==f?(G=f&&h?b.jsx("div",{className:"cursor-grabbing rounded-md border border-primary bg-background p-3 shadow-xl ring-2 ring-primary/20",children:h}):null,e[34]=h,e[35]=f,e[36]=G):G=e[36];let K;e[37]!==G?(K=b.jsx(X1,{children:G}),e[37]=G,e[38]=K):K=e[38];let Y;e[39]!==A||e[40]!==F||e[41]!==H||e[42]!==K?(Y=b.jsxs(br,{collisionDetection:il,sensors:F,onDragEnd:I,onDragOver:A,onDragStart:M,children:[H,K]}),e[39]=A,e[40]=F,e[41]=H,e[42]=K,e[43]=Y):Y=e[43];let Q;return e[44]!==_||e[45]!==Y?(Q=b.jsx(sa.Provider,{value:_,children:Y}),e[44]=_,e[45]=Y,e[46]=Q):Q=e[46],Q},ex=t=>{const e=T.compilerRuntimeExports.c(48);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,disabled:l,id:o,style:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?!1:l,[c,d]=k.useState(!1),{registerCard:u,unregisterCard:f}=oa(),{columnId:m,disabled:h}=Jg(),p=h||a;let g,x;e[7]!==n||e[8]!==m||e[9]!==o||e[10]!==u||e[11]!==f?(g=()=>(u(o,m,n),()=>{f(o)}),x=[n,m,o,u,f],e[7]=n,e[8]=m,e[9]=o,e[10]=u,e[11]=f,e[12]=g,e[13]=x):(g=e[12],x=e[13]),k.useEffect(g,x);let v;e[14]!==p||e[15]!==o?(v={disabled:p,id:o},e[14]=p,e[15]=o,e[16]=v):v=e[16];const{attributes:y,isDragging:w,listeners:C,setActivatorNodeRef:O,setNodeRef:S,transform:E,transition:R}=zs(v);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{d(!0)},e[17]=N):N=e[17];const j=N,D=w?.5:1;let P;e[18]!==E?(P=at.Transform.toString(E),e[18]=E,e[19]=P):P=e[19];let M;e[20]!==i||e[21]!==D||e[22]!==P||e[23]!==R?(M={opacity:D,transform:P,transition:R,...i},e[20]=i,e[21]=D,e[22]=P,e[23]=R,e[24]=M):M=e[24];const z=M;let A;e[25]!==y||e[26]!==p||e[27]!==w||e[28]!==C||e[29]!==O?(A={attributes:y,disabled:p,isDragging:w,listeners:C,registerHandle:j,setActivatorNodeRef:O},e[25]=y,e[26]=p,e[27]=w,e[28]=C,e[29]=O,e[30]=A):A=e[30];const $=A;let I;e[31]!==y||e[32]!==c||e[33]!==C?(I=c?{}:{...y,...C},e[31]=y,e[32]=c,e[33]=C,e[34]=I):I=e[34];const V=I;let _;e[35]!==r?(_=L("rounded-md bg-background p-3 shadow-sm",r),e[35]=r,e[36]=_):_=e[36];const F=w?"dragging":void 0;let W;e[37]!==z||e[38]!==n||e[39]!==s||e[40]!==V||e[41]!==S||e[42]!==_||e[43]!==F?(W=b.jsx("div",{className:_,"data-ox-slot":"kanban-card","data-ox-state":F,ref:S,style:z,...V,...s,children:n}),e[37]=z,e[38]=n,e[39]=s,e[40]=V,e[41]=S,e[42]=_,e[43]=F,e[44]=W):W=e[44];let B;return e[45]!==$||e[46]!==W?(B=b.jsx(na.Provider,{value:$,children:W}),e[45]=$,e[46]=W,e[47]=B):B=e[47],B},tx=t=>{const e=T.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{attributes:o,disabled:i,listeners:l,registerHandle:a,setActivatorNodeRef:c}=Qg();let d,u;e[4]!==a?(d=()=>{a()},u=[a],e[4]=a,e[5]=d,e[6]=u):(d=e[5],u=e[6]),k.useEffect(d,u);let f;e[7]!==r||e[8]!==i?(f=L("flex cursor-grab touch-none items-center justify-center",{"cursor-not-allowed opacity-50":i},r),e[7]=r,e[8]=i,e[9]=f):f=e[9];let m;e[10]!==n?(m=n??b.jsx(le.GripVertical,{className:"size-4 text-muted-foreground"}),e[10]=n,e[11]=m):m=e[11];let h;return e[12]!==o||e[13]!==i||e[14]!==s||e[15]!==l||e[16]!==c||e[17]!==f||e[18]!==m?(h=b.jsx("button",{"aria-label":"Drag to reorder",className:f,disabled:i,ref:c,type:"button",...o,...l,...s,"data-ox-slot":"kanban-card-handle",children:m}),e[12]=o,e[13]=i,e[14]=s,e[15]=l,e[16]=c,e[17]=f,e[18]=m,e[19]=h):h=e[19],h},ia=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mt-3",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"kanban-column-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},la=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mb-3 font-medium",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"kanban-column-header",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},nx=t=>{const e=T.compilerRuntimeExports.c(53);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,disabled:c,emptyState:o,gap:d,heading:i,id:l,style:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=c===void 0?!1:c,f=d===void 0?8:d,{columnCardIdsMap:m,disabled:h}=oa(),p=h||u;let g;e[10]!==l?(g={id:l},e[10]=l,e[11]=g):g=e[11];const{isOver:x,setNodeRef:v}=Rs(g);let y;e[12]!==n?(y={cards:[],footer:null,header:null},k.Children.forEach(n,W=>{k.isValidElement(W)&&(W.type===la?y.header=W:W.type===ia?y.footer=W:y.cards.push(W))}),e[12]=n,e[13]=y):y=e[13];const{cards:w,footer:C,header:O}=y;let S;if(e[14]!==w){S=[];for(const W of w){const B=W.props;B.id&&S.push(B.id)}e[14]=w,e[15]=S}else S=e[15];const E=S;let R;e[16]!==m.current||e[17]!==l||e[18]!==E?(R=()=>{const W=m.current;return W.set(l,E),()=>{W.delete(l)}},e[16]=m.current,e[17]=l,e[18]=E,e[19]=R):R=e[19];let N;e[20]!==m||e[21]!==l||e[22]!==E?(N=[l,E,m],e[20]=m,e[21]=l,e[22]=E,e[23]=N):N=e[23],k.useEffect(R,N);let j;e[24]!==p||e[25]!==l?(j={columnId:l,disabled:p},e[24]=p,e[25]=l,e[26]=j):j=e[26];const D=j;let P;e[27]!==r||e[28]!==x?(P=L("flex min-w-64 flex-col rounded-lg bg-muted/50 p-3",{"ring-2 ring-primary":x},r),e[27]=r,e[28]=x,e[29]=P):P=e[29];const M=x?"over":void 0;let z;e[30]!==O||e[31]!==i?(z=O??(i&&b.jsx("div",{className:"mb-3 font-medium",children:i})),e[30]=O,e[31]=i,e[32]=z):z=e[32];let A;e[33]!==f?(A={gap:f},e[33]=f,e[34]=A):A=e[34];const $=w.length>0?w:o;let I;e[35]!==A||e[36]!==$?(I=b.jsx("div",{className:"flex flex-1 flex-col",style:A,children:$}),e[35]=A,e[36]=$,e[37]=I):I=e[37];let V;e[38]!==E||e[39]!==I?(V=b.jsx(Ls,{items:E,strategy:$s,children:I}),e[38]=E,e[39]=I,e[40]=V):V=e[40];let _;e[41]!==s||e[42]!==C||e[43]!==v||e[44]!==a||e[45]!==V||e[46]!==P||e[47]!==M||e[48]!==z?(_=b.jsxs("div",{className:P,ref:v,style:a,...s,"data-ox-slot":"kanban-column","data-ox-state":M,children:[z,V,C]}),e[41]=s,e[42]=C,e[43]=v,e[44]=a,e[45]=V,e[46]=P,e[47]=M,e[48]=z,e[49]=_):_=e[49];let F;return e[50]!==D||e[51]!==_?(F=b.jsx(ra.Provider,{value:D,children:_}),e[50]=D,e[51]=_,e[52]=F):F=e[52],F},rx=Object.assign(Zg,{Card:ex,CardHandle:tx,Column:nx,ColumnFooter:ia,ColumnHeader:la}),sx=dt("OxLink","a"),ox=t=>{const e=T.compilerRuntimeExports.c(26);let n,r,s,o,i,l,a,c;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,size:a,variant:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=i===void 0?!1:i,u=l===void 0?!1:l,f=a===void 0?"md":a,m=c===void 0?"primary":c;let h;e[9]!==r||e[10]!==f||e[11]!==m?(h=L(Cd({variant:m,size:f}),r),e[9]=r,e[10]=f,e[11]=m,e[12]=h):h=e[12];const p=h,g=u||void 0,x=u?void 0:o,v=u?-1:void 0,y=u?ix:void 0;let w;e[13]!==p||e[14]!==s||e[15]!==g||e[16]!==x||e[17]!==v||e[18]!==y?(w={"aria-disabled":g,href:x,tabIndex:v,onClick:y,className:p,...s,"data-ox-slot":"link"},e[13]=p,e[14]=s,e[15]=g,e[16]=x,e[17]=v,e[18]=y,e[19]=w):w=e[19];const C=w;if(d){let S;return e[20]!==n||e[21]!==C?(S=b.jsx(sx,{...C,children:n}),e[20]=n,e[21]=C,e[22]=S):S=e[22],S}let O;return e[23]!==n||e[24]!==C?(O=b.jsx("a",{...C,children:n}),e[23]=n,e[24]=C,e[25]=O):O=e[25],O};function ix(t){return t.preventDefault()}const lx=t=>{const e=T.compilerRuntimeExports.c(9),{children:n,className:r,columns:s,gap:o}=t,i=o===void 0?16:o,l=k.useRef(null);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const c=k.useRef(a),d=k.Children.toArray(n),{containerHeight:u,positions:f}=T.useMasonry(l,c,s,i,d.length);let m;e[1]!==r?(m=L("relative",r),e[1]=r,e[2]=m):m=e[2];const h="masonry",p="list",g=u||void 0;let x;e[3]!==g?(x={height:g},e[3]=g,e[4]=x):x=e[4];const v=d.map((w,C)=>{const O=f[C],S=O!==void 0,E=k.isValidElement(w)?w.key:C;return b.jsx("div",{"data-index":C,ref:R=>{c.current[C]=R},role:"listitem",style:{position:"absolute",transform:S?`translate(${O.x}px, ${O.y}px)`:void 0,visibility:S?"visible":"hidden",width:S?O.width:void 0},children:w},E??C)});let y;return e[5]!==m||e[6]!==x||e[7]!==v?(y=b.jsx("div",{className:m,"data-ox-slot":h,ref:l,role:p,style:x,children:v}),e[5]=m,e[6]=x,e[7]=v,e[8]=y):y=e[8],y},aa=k.createContext(null),ax={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"},cx=t=>{const e=T.compilerRuntimeExports.c(59);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,closeOnOutsideClick:l,isOpen:o,onClose:i,persistent:a,showCloseButton:c,size:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=l===void 0?!0:l,f=a===void 0?!1:a,m=c===void 0?!0:c,h=d===void 0?"sm":d,p=k.useId(),g=k.useId(),x=k.useRef(null),[v,y]=k.useState(!1);let w;e[10]!==i?(w=Q=>Q?void 0:i?.(),e[10]=i,e[11]=w):w=e[11];let C;e[12]!==o||e[13]!==w?(C={value:o,onChange:w,defaultValue:!1,name:"OxDialog"},e[12]=o,e[13]=w,e[14]=C):C=e[14];const[O,S]=T.useControllableState(C),E=v&&O;let R;e[15]!==E?(R={containerRef:x,options:{enabled:E,restoreFocus:!0,trapFocus:!0,autoFocus:!0}},e[15]=E,e[16]=R):R=e[16],T.useFocus(R);let N;e[17]!==S?(N=()=>S(!1),e[17]=S,e[18]=N):N=e[18];let j;e[19]!==g||e[20]!==f||e[21]!==m||e[22]!==N||e[23]!==p?(j={onClose:N,titleId:p,bodyId:g,persistent:f,showCloseButton:m},e[19]=g,e[20]=f,e[21]=m,e[22]=N,e[23]=p,e[24]=j):j=e[24];const D=j;let P;e[25]!==O||e[26]!==v?(P=Q=>{Q.target===x.current&&!O&&v&&(y(!1),x.current?.close())},e[25]=O,e[26]=v,e[27]=P):P=e[27];const M=P;let z;e[28]!==O||e[29]!==f||e[30]!==S?(z=()=>{f&&O?x.current?.showModal():f||S(!1)},e[28]=O,e[29]=f,e[30]=S,e[31]=z):z=e[31];const A=z;let $,I;e[32]!==O?($=()=>{O&&y(!0)},I=[O],e[32]=O,e[33]=$,e[34]=I):($=e[33],I=e[34]),k.useEffect($,I);let V,_;e[35]!==O||e[36]!==v?(V=()=>{const Q=x.current;if(!(!Q||!v))return O&&(document.body.classList.add("overflow-hidden"),Q.showModal()),dx},_=[O,v],e[35]=O,e[36]=v,e[37]=V,e[38]=_):(V=e[37],_=e[38]),k.useEffect(V,_);let F,W;if(e[39]!==u||e[40]!==A||e[41]!==f||e[42]!==v?(F=()=>{const Q=x.current;if(!Q||!v)return;const X=q=>{q.key==="Escape"&&f&&(q.preventDefault(),q.stopPropagation())},U=q=>{q.preventDefault(),A()},J=q=>{u&&q.target===Q&&A()};return document.addEventListener("keydown",X),Q.addEventListener("cancel",U),Q.addEventListener("click",J),Q.addEventListener("close",A),()=>{document.removeEventListener("keydown",X),Q.removeEventListener("cancel",U),Q.removeEventListener("click",J),Q.removeEventListener("close",A)}},W=[v,u,A,f],e[39]=u,e[40]=A,e[41]=f,e[42]=v,e[43]=F,e[44]=W):(F=e[43],W=e[44]),k.useEffect(F,W),!v)return null;const B=ax[h];let H;e[45]!==r||e[46]!==B?(H=L("fixed inset-0 m-auto grid h-fit w-full gap-4 rounded-lg border bg-background p-6 text-foreground shadow-lg","ox-dialog-animation ox-dialog-backdrop","max-w-[calc(100%-2rem)]",B,r),e[45]=r,e[46]=B,e[47]=H):H=e[47];const G=O?"open":"closing";let K;e[48]!==n||e[49]!==D?(K=b.jsx(aa.Provider,{value:D,children:n}),e[48]=n,e[49]=D,e[50]=K):K=e[50];let Y;return e[51]!==g||e[52]!==s||e[53]!==M||e[54]!==H||e[55]!==G||e[56]!==K||e[57]!==p?(Y=it.createPortal(b.jsx("dialog",{"aria-describedby":g,"aria-labelledby":p,className:H,ref:x,role:"dialog",onAnimationEnd:M,...s,"data-ox-slot":"dialog","data-ox-state":G,children:K}),document.body),e[51]=g,e[52]=s,e[53]=M,e[54]=H,e[55]=G,e[56]=K,e[57]=p,e[58]=Y):Y=e[58],Y};function dx(){document.body.classList.remove("overflow-hidden")}const ca=()=>{const t=k.useContext(aa);if(!t)throw new Error("Dialog sub-components must be used within OxDialog");return t},ux=t=>{const e=T.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{bodyId:o}=ca();let i;e[4]!==r?(i=L("text-sm",r),e[4]=r,e[5]=i):i=e[5];let l;return e[6]!==o||e[7]!==n||e[8]!==s||e[9]!==i?(l=b.jsx("div",{id:o,className:i,...s,"data-ox-slot":"dialog-body",children:n}),e[6]=o,e[7]=n,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},fx=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("flex flex-col-reverse gap-2","sm:flex-row sm:justify-end",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"dialog-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},mx=t=>{const e=T.compilerRuntimeExports.c(17);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{onClose:o,persistent:i,showCloseButton:l,titleId:a}=ca(),c=l&&!i;let d;e[4]!==r?(d=L("flex flex-col gap-2 text-center sm:text-left",r),e[4]=r,e[5]=d):d=e[5];let u;e[6]!==n||e[7]!==s||e[8]!==d||e[9]!==a?(u=b.jsx("div",{id:a,className:d,...s,"data-ox-slot":"dialog-header",children:n}),e[6]=n,e[7]=s,e[8]=d,e[9]=a,e[10]=u):u=e[10];let f;e[11]!==o||e[12]!==c?(f=c?b.jsx(Je,{"aria-label":"Close Dialog",className:"absolute top-4 right-4",variant:"ghost",onClick:o,children:b.jsx(ue,{icon:le.X})}):null,e[11]=o,e[12]=c,e[13]=f):f=e[13];let m;return e[14]!==u||e[15]!==f?(m=b.jsxs(b.Fragment,{children:[u,f]}),e[14]=u,e[15]=f,e[16]=m):m=e[16],m},px=Object.assign(cx,{Body:ux,Footer:fx,Header:mx}),da=640,hn=k.createContext(null),Sr=()=>{const t=k.useContext(hn);if(!t)throw new Error("useNotificationsContext must be used within a NotificationsContext.Provider");return t},ua=t=>{const e=T.compilerRuntimeExports.c(43);let n,r,s,o,i,l,a,c,d,u,f;e[0]!==t?({children:n,className:r,icon:o,img:i,message:l,path:a,timestamp:u,title:f,type:c,unread:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11]);const m=c===void 0?"default":c,h=d===void 0?!1:d,{isMobile:p,onItemClick:g,setOpen:x}=Sr(),v=rt[m].icon;let y;e[12]!==o||e[13]!==i||e[14]!==p||e[15]!==l||e[16]!==g||e[17]!==x||e[18]!==u||e[19]!==f||e[20]!==m||e[21]!==h?(y=()=>{const N={id:crypto.randomUUID(),icon:o,img:i,message:l,read:!h,timestamp:u||new Date,title:f||"",type:m};g?.(N),p&&x(!1)},e[12]=o,e[13]=i,e[14]=p,e[15]=l,e[16]=g,e[17]=x,e[18]=u,e[19]=f,e[20]=m,e[21]=h,e[22]=y):y=e[22];const w=y;let C;e[23]!==n||e[24]!==o||e[25]!==i||e[26]!==l||e[27]!==a||e[28]!==v||e[29]!==u||e[30]!==f||e[31]!==m||e[32]!==h?(C=n||b.jsxs(b.Fragment,{children:[i?b.jsx(ps,{alt:"User avatar",className:"mt-0.5","data-ox-slot":"notifications-icon",fallback:"NA",size:"sm",src:i}):b.jsx(ue.Box,{className:"mt-0.5",color:m,size:"md",children:b.jsx(ue,{icon:o??v,path:a})}),b.jsxs("div",{className:"min-w-0 flex-1","data-ox-slot":"notifications-content",children:[f&&b.jsx("h5",{className:"mb-1 text-sm leading-tight font-semibold text-pretty text-foreground",children:f}),l&&b.jsx("p",{className:"mb-1 text-xs leading-4",children:l}),u&&b.jsx("p",{className:"text-xs text-muted-foreground",children:ds(u)})]}),h&&b.jsx("div",{className:"mt-1.5 size-2 shrink-0 rounded-full bg-destructive","data-ox-slot":"notifications-unread"})]}),e[23]=n,e[24]=o,e[25]=i,e[26]=l,e[27]=a,e[28]=v,e[29]=u,e[30]=f,e[31]=m,e[32]=h,e[33]=C):C=e[33];const O=C;let S;e[34]!==r||e[35]!==h?(S=L("col-span-3 grid cursor-pointer grid-cols-subgrid items-start gap-3 p-3 text-left","ox-focus-ring hover:bg-neutral-accent/60",{"bg-neutral-accent/40":h},r),e[34]=r,e[35]=h,e[36]=S):S=e[36];const E=h?"unread":"read";let R;return e[37]!==s||e[38]!==w||e[39]!==O||e[40]!==S||e[41]!==E?(R=b.jsx("li",{className:"contents",children:b.jsx("button",{className:S,"data-ox-slot":"notifications-button",...s,"data-ox-state":E,onClick:w,children:O})}),e[37]=s,e[38]=w,e[39]=O,e[40]=S,e[41]=E,e[42]=R):R=e[42],R},ti=L("grid min-h-0 flex-1 auto-rows-min grid-cols-[auto_1fr_auto] overflow-y-auto",'[&_[data-ox-slot="notifications-icon"]]:col-start-1 [&_[data-ox-slot="notifications-icon"]]:justify-self-center','[&_[data-ox-slot="notifications-content"]]:cols-start-2','[&_[data-ox-slot="notifications-unread"]]:col-start-3 [&_[data-ox-slot="notifications-unread"]]:justify-self-end'),dr=t=>{const e=T.compilerRuntimeExports.c(52);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{emptyMessage:o,isMobile:i,items:l,onMarkAllRead:a,setOpen:c,unreadCount:d}=Sr(),u=l.length>0,f=d>0;let m;e[4]!==i||e[5]!==a||e[6]!==c?(m=()=>{a?.(),i&&c(!1)},e[4]=i,e[5]=a,e[6]=c,e[7]=m):m=e[7];const h=m;let p;e[8]!==n||e[9]!==o||e[10]!==u||e[11]!==l?(p=n||b.jsx(b.Fragment,{children:u?l.map(hx):b.jsxs("li",{className:"col-span-3 px-3 py-8 text-center",role:"status",children:[b.jsx(ue,{className:"mx-auto mb-2 opacity-50",icon:le.Bell,size:"3xl"}),b.jsx("p",{className:"text-sm opacity-50",children:o})]})}),e[8]=n,e[9]=o,e[10]=u,e[11]=l,e[12]=p):p=e[12];const g=p;if(i){let S;e[13]!==c?(S=()=>c(!1),e[13]=c,e[14]=S):S=e[14];let E;e[15]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx(ue,{icon:le.X}),e[15]=E):E=e[15];let R;e[16]!==S?(R=b.jsx(Je,{"aria-label":"Close notifications",variant:"ghost",onClick:S,children:E}),e[16]=S,e[17]=R):R=e[17];let N;e[18]===Symbol.for("react.memo_cache_sentinel")?(N=b.jsx("h5",{className:"text-sm font-semibold text-foreground",children:"Notifications"}),e[18]=N):N=e[18];let j;e[19]!==h||e[20]!==f||e[21]!==a?(j=f&&a&&b.jsx("button",{className:"cursor-pointer text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:h,children:"Mark all read"}),e[19]=h,e[20]=f,e[21]=a,e[22]=j):j=e[22];let D;e[23]!==j?(D=b.jsx("div",{className:"flex items-center gap-2",children:j}),e[23]=j,e[24]=D):D=e[24];let P;e[25]!==R||e[26]!==D?(P=b.jsxs("div",{className:"flex h-15 items-center justify-between border-b border-border px-4",children:[R,N,D]}),e[25]=R,e[26]=D,e[27]=P):P=e[27];let M;e[28]!==r?(M=L(ti,r),e[28]=r,e[29]=M):M=e[29];let z;e[30]!==s||e[31]!==g||e[32]!==M?(z=b.jsx("ul",{className:M,"data-ox-slot":"notifications-body",...s,children:g}),e[30]=s,e[31]=g,e[32]=M,e[33]=z):z=e[33];let A;return e[34]!==z||e[35]!==P?(A=b.jsxs(nr.Content,{closeOnOutsideClick:!0,side:"right",children:[P,z]}),e[34]=z,e[35]=P,e[36]=A):A=e[36],A}let x;e[37]===Symbol.for("react.memo_cache_sentinel")?(x=b.jsx("h5",{className:"text-sm font-semibold text-foreground",children:"Notifications"}),e[37]=x):x=e[37];let v;e[38]!==f||e[39]!==a?(v=f&&a&&b.jsx("button",{className:"ox-focus-ring cursor-pointer rounded-lg p-1 text-xs text-muted-foreground transition-colors hover:text-foreground",onClick:a,children:"Mark all read"}),e[38]=f,e[39]=a,e[40]=v):v=e[40];let y;e[41]!==v?(y=b.jsx(Qt.Header,{className:"p-2",children:b.jsxs("div",{className:"flex items-center justify-between",children:[x,v]})}),e[41]=v,e[42]=y):y=e[42];let w;e[43]!==r?(w=L("w-85",ti,r),e[43]=r,e[44]=w):w=e[44];let C;e[45]!==s||e[46]!==g||e[47]!==w?(C=b.jsx("ul",{className:w,"data-ox-slot":"notifications-body",...s,children:g}),e[45]=s,e[46]=g,e[47]=w,e[48]=C):C=e[48];let O;return e[49]!==y||e[50]!==C?(O=b.jsxs(Qt.Content,{className:"p-0",children:[y,C]}),e[49]=y,e[50]=C,e[51]=O):O=e[51],O};function hx(t,e){return b.jsx(ua,{className:L({"border-t border-border":e>0}),icon:t.icon,img:t.img,message:t.message,path:t.path,timestamp:t.timestamp,title:t.title,type:t.type,unread:!t.read},t.id)}const ur=t=>{const e=T.compilerRuntimeExports.c(44);let n,r,s,o,i;e[0]!==t?({children:n,className:r,customIcon:s,unreadCount:i,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const{disabled:l,isMobile:a,open:c,setOpen:d,unreadCount:u}=Sr(),f=i??u,m=f>0,h=s??le.Bell,p=`Notifications${m?` (${f} unread)`:""}`;if(a){let O;e[6]!==l?(O=L({"opacity-50":l}),e[6]=l,e[7]=O):O=e[7];const S=c?"open":"closed";let E;e[8]!==d?(E=()=>d(!0),e[8]=d,e[9]=E):E=e[9];let R;e[10]!==n||e[11]!==h?(R=n||b.jsx(ue,{icon:h,size:"md"}),e[10]=n,e[11]=h,e[12]=R):R=e[12];let N;e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==o||e[17]!==S||e[18]!==E||e[19]!==R?(N=b.jsx(Je,{"aria-label":p,className:r,disabled:l,variant:"ghost",...o,"data-ox-state":S,onClick:E,children:R}),e[13]=p,e[14]=r,e[15]=l,e[16]=o,e[17]=S,e[18]=E,e[19]=R,e[20]=N):N=e[20];let j;return e[21]!==O||e[22]!==N||e[23]!==f?(j=b.jsx(Qr,{className:O,count:f,variant:"primary",children:N}),e[21]=O,e[22]=N,e[23]=f,e[24]=j):j=e[24],j}let g;e[25]!==l?(g=L({"opacity-50":l}),e[25]=l,e[26]=g):g=e[26];let x;e[27]!==r||e[28]!==c?(x=L("flex h-10 min-w-10 items-center justify-center rounded-lg border border-transparent bg-transparent px-2 text-sm","ox-focus-ring enabled:cursor-pointer enabled:text-foreground enabled:hover:bg-neutral-accent disabled:ox-default-disabled",{"bg-neutral-accent":c},r),e[27]=r,e[28]=c,e[29]=x):x=e[29];const v=c?"open":"closed";let y;e[30]!==n||e[31]!==h?(y=n||b.jsx(ue,{icon:h,size:"md"}),e[30]=n,e[31]=h,e[32]=y):y=e[32];let w;e[33]!==p||e[34]!==l||e[35]!==o||e[36]!==x||e[37]!==v||e[38]!==y?(w=b.jsx(Qt.Trigger,{"aria-label":p,className:x,"data-ox-slot":"notifications-trigger",disabled:l,hideIcon:!0,...o,"data-ox-state":v,children:y}),e[33]=p,e[34]=l,e[35]=o,e[36]=x,e[37]=v,e[38]=y,e[39]=w):w=e[39];let C;return e[40]!==g||e[41]!==w||e[42]!==f?(C=b.jsx(Qr,{className:g,count:f,variant:"primary",children:w}),e[40]=g,e[41]=w,e[42]=f,e[43]=C):C=e[43],C},gx=t=>{const e=T.compilerRuntimeExports.c(68);let n,r,s,o,i,l,a,c;e[0]!==t?({children:n,disabled:i,emptyMessage:l,items:a,onItemClick:s,onMarkAllRead:o,unreadCount:c,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=i===void 0?!1:i,u=l===void 0?"No notifications":l;let f;e[9]!==a?(f=a===void 0?[]:a,e[9]=a,e[10]=f):f=e[10];const m=f,h=c===void 0?0:c,[p,g]=k.useState(!1),[x,v]=k.useState(!1);let y,w;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{const D=()=>{v(window.innerWidth<da)};return D(),window.addEventListener("resize",D),()=>{window.removeEventListener("resize",D)}},w=[],e[11]=y,e[12]=w):(y=e[11],w=e[12]),k.useEffect(y,w);let C;e[13]!==d||e[14]!==u||e[15]!==x||e[16]!==m||e[17]!==s||e[18]!==o||e[19]!==p||e[20]!==h?(C={disabled:d,emptyMessage:u,isMobile:x,items:m,open:p,setOpen:g,unreadCount:h,onItemClick:s,onMarkAllRead:o},e[13]=d,e[14]=u,e[15]=x,e[16]=m,e[17]=s,e[18]=o,e[19]=p,e[20]=h,e[21]=C):C=e[21];const O=C;if(n){let D;e[22]!==n?(D=k.Children.toArray(n).find(xx),e[22]=n,e[23]=D):D=e[23];const P=D;let M;e[24]!==n?(M=k.Children.toArray(n).find(bx),e[24]=n,e[25]=M):M=e[25];const z=M;if(x){let V;e[26]!==z||e[27]!==p?(V=b.jsx(nr,{open:p,onOpenChange:g,children:z}),e[26]=z,e[27]=p,e[28]=V):V=e[28];let _;e[29]!==r||e[30]!==V||e[31]!==P?(_=b.jsxs("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"mobile",children:[P,V]}),e[29]=r,e[30]=V,e[31]=P,e[32]=_):_=e[32];let F;return e[33]!==O||e[34]!==_?(F=b.jsx(hn.Provider,{value:O,children:_}),e[33]=O,e[34]=_,e[35]=F):F=e[35],F}let A;e[36]!==z||e[37]!==d||e[38]!==p||e[39]!==P?(A=b.jsxs(Qt,{align:"end",disabled:d,open:p,side:"bottom",onOpenChange:g,children:[P,z]}),e[36]=z,e[37]=d,e[38]=p,e[39]=P,e[40]=A):A=e[40];let $;e[41]!==r||e[42]!==A?($=b.jsx("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"desktop",children:A}),e[41]=r,e[42]=A,e[43]=$):$=e[43];let I;return e[44]!==O||e[45]!==$?(I=b.jsx(hn.Provider,{value:O,children:$}),e[44]=O,e[45]=$,e[46]=I):I=e[46],I}if(x){let D;e[47]===Symbol.for("react.memo_cache_sentinel")?(D=b.jsx(ur,{}),e[47]=D):D=e[47];let P;e[48]===Symbol.for("react.memo_cache_sentinel")?(P=b.jsx(dr,{}),e[48]=P):P=e[48];let M;e[49]!==p?(M=b.jsx(nr,{open:p,onOpenChange:g,children:P}),e[49]=p,e[50]=M):M=e[50];let z;e[51]!==r||e[52]!==M?(z=b.jsxs("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"mobile",children:[D,M]}),e[51]=r,e[52]=M,e[53]=z):z=e[53];let A;return e[54]!==O||e[55]!==z?(A=b.jsx(hn.Provider,{value:O,children:z}),e[54]=O,e[55]=z,e[56]=A):A=e[56],A}let S,E;e[57]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx(ur,{}),S=b.jsx(dr,{}),e[57]=S,e[58]=E):(S=e[57],E=e[58]);let R;e[59]!==d||e[60]!==p?(R=b.jsxs(Qt,{align:"end",disabled:d,open:p,side:"bottom",onOpenChange:g,children:[E,S]}),e[59]=d,e[60]=p,e[61]=R):R=e[61];let N;e[62]!==r||e[63]!==R?(N=b.jsx("div",{"data-ox-slot":"notifications",...r,"data-ox-state":"desktop",children:R}),e[62]=r,e[63]=R,e[64]=N):N=e[64];let j;return e[65]!==O||e[66]!==N?(j=b.jsx(hn.Provider,{value:O,children:N}),e[65]=O,e[66]=N,e[67]=j):j=e[67],j};function xx(t){return k.isValidElement(t)&&t.type===ur}function bx(t){return k.isValidElement(t)&&t.type===dr}const vx=t=>{const e=T.compilerRuntimeExports.c(45);let n,r,s,o,i,l,a,c,d,u,f,m;e[0]!==t?({children:n,className:r,href:o,icon:i,img:l,message:a,path:c,timestamp:f,title:m,type:d,unread:u,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12]);const h=d===void 0?"default":d,p=u===void 0?!1:u,{isMobile:g,onItemClick:x,setOpen:v}=Sr(),y=rt[h].icon;let w;e[13]!==i||e[14]!==l||e[15]!==g||e[16]!==a||e[17]!==x||e[18]!==v||e[19]!==f||e[20]!==m||e[21]!==h||e[22]!==p?(w=()=>{const j={id:crypto.randomUUID(),icon:i,img:l,message:a,read:!p,timestamp:f||new Date,title:m||"",type:h};x?.(j),g&&v(!1)},e[13]=i,e[14]=l,e[15]=g,e[16]=a,e[17]=x,e[18]=v,e[19]=f,e[20]=m,e[21]=h,e[22]=p,e[23]=w):w=e[23];const C=w;let O;e[24]!==n||e[25]!==i||e[26]!==l||e[27]!==a||e[28]!==c||e[29]!==y||e[30]!==f||e[31]!==m||e[32]!==h||e[33]!==p?(O=n||b.jsxs(b.Fragment,{children:[l?b.jsx(ps,{alt:"User avatar",className:"mt-0.5","data-ox-slot":"notifications-icon",fallback:"NA",size:"md",src:l}):b.jsx(ue.Box,{className:"mt-0.5",color:h,"data-ox-slot":"notifications-icon",size:"md",children:b.jsx(ue,{icon:i??y,path:c})}),b.jsxs("div",{className:"min-w-0 flex-1","data-ox-slot":"notifications-content",children:[m&&b.jsx("h5",{className:"mb-1 text-sm leading-tight font-semibold text-pretty text-foreground",children:m}),a&&b.jsx("p",{className:"mb-1 text-xs leading-4",children:a}),f&&b.jsx("p",{className:"text-xs text-muted-foreground",children:ds(f)})]}),p&&b.jsx("div",{className:"mt-1.5 size-2 shrink-0 rounded-full bg-destructive","data-ox-slot":"notifications-unread"})]}),e[24]=n,e[25]=i,e[26]=l,e[27]=a,e[28]=c,e[29]=y,e[30]=f,e[31]=m,e[32]=h,e[33]=p,e[34]=O):O=e[34];const S=O;let E;e[35]!==r||e[36]!==p?(E=L("col-span-3 grid cursor-pointer grid-cols-subgrid items-start gap-3 p-3 text-left","ox-focus-ring hover:bg-neutral-accent/60",{"bg-neutral-accent/40":p},r),e[35]=r,e[36]=p,e[37]=E):E=e[37];const R=p?"unread":"read";let N;return e[38]!==s||e[39]!==C||e[40]!==o||e[41]!==S||e[42]!==E||e[43]!==R?(N=b.jsx("li",{className:"contents",children:b.jsx("a",{className:E,"data-ox-slot":"notifications-link",href:o,...s,"data-ox-state":R,onClick:C,children:S})}),e[38]=s,e[39]=C,e[40]=o,e[41]=S,e[42]=E,e[43]=R,e[44]=N):N=e[44],N},yx=Object.assign(gx,{Body:dr,Button:ua,Link:vx,Trigger:ur}),fa=k.createContext(void 0),ma=()=>{const t=k.useContext(fa);if(!t)throw new Error("PageOutline components must be used within an OxPageOutline");return t},wx=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o;e[0]!==t?({children:n,className:r,scrollOffset:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o===void 0?0:o;let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=new Map,e[5]=l):l=e[5];const a=k.useRef(l),c=k.useRef(null);let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[6]=d):d=e[6];const[u,f]=k.useState(d),{activeId:m,setActiveId:h}=T.useScrollSpy(u);let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=(D,P)=>{a.current.set(D,P),f(M=>M.includes(D)?M:[...M,D])},e[7]=p):p=e[7];const g=p;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=D=>{a.current.delete(D),f(P=>P.filter(M=>M!==D))},e[8]=x):x=e[8];const v=x;let y;e[9]!==i||e[10]!==h?(y=D=>{const P=D.replace("#","");h(P),Ni(`#${P}`,{behavior:"smooth",offset:i}).catch(Cx)},e[9]=i,e[10]=h,e[11]=y):y=e[11];const w=y;let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=D=>{c.current=D},e[12]=C):C=e[12];const O=C;let S;e[13]!==m||e[14]!==w?(S={activeId:m,itemReferences:a,registerItem:g,scrollToSection:w,setContentRef:O,unregisterItem:v},e[13]=m,e[14]=w,e[15]=S):S=e[15];const E=S;let R;e[16]!==r?(R=L(r),e[16]=r,e[17]=R):R=e[17];let N;e[18]!==n||e[19]!==s||e[20]!==R?(N=b.jsx("nav",{className:R,"data-ox-slot":"page-outline",...s,children:n}),e[18]=n,e[19]=s,e[20]=R,e[21]=N):N=e[21];let j;return e[22]!==E||e[23]!==N?(j=b.jsx(fa.Provider,{value:E,children:N}),e[22]=E,e[23]=N,e[24]=j):j=e[24],j};function Cx(t){console.error("Failed to scroll to element:",t)}const Ox=t=>{const e=T.compilerRuntimeExports.c(21);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{activeId:o,itemReferences:i,setContentRef:l}=ma(),a=k.useRef(null);let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={height:0,opacity:0,top:0},e[4]=c):c=e[4];const[d,u]=k.useState(c),f=k.useRef("");let m,h;e[5]!==l?(m=()=>{a.current&&l(a.current)},h=[l],e[5]=l,e[6]=m,e[7]=h):(m=e[6],h=e[7]),k.useLayoutEffect(m,h);let p,g;e[8]!==o||e[9]!==i?(p=()=>{if(f.current===o)return;if(f.current=o,!o||!a.current){u({height:0,opacity:0,top:0});return}const w=i.current.get(o);if(!w){u({height:0,opacity:0,top:0});return}const C=a.current.getBoundingClientRect(),O=w.getBoundingClientRect();u({height:O.height,opacity:1,top:O.top-C.top})},g=[o,i],e[8]=o,e[9]=i,e[10]=p,e[11]=g):(p=e[10],g=e[11]),k.useLayoutEffect(p,g);let x;e[12]!==r?(x=L("relative border-l border-border",r),e[12]=r,e[13]=x):x=e[13];let v;e[14]!==d?(v=b.jsx("div",{className:"pointer-events-none absolute left-0 w-0.5 -translate-x-px rounded-full bg-primary transition-all duration-150 ease-out",style:d}),e[14]=d,e[15]=v):v=e[15];let y;return e[16]!==n||e[17]!==s||e[18]!==x||e[19]!==v?(y=b.jsxs("div",{className:x,"data-ox-slot":"page-outline-content",ref:a,...s,children:[v,n]}),e[16]=n,e[17]=s,e[18]=x,e[19]=v,e[20]=y):y=e[20],y},Ex=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mb-2 text-sm font-medium text-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,"data-ox-slot":"page-outline-header",...s,children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Sx={1:"pl-3",2:"pl-6",3:"pl-9"},kx=t=>{const e=T.compilerRuntimeExports.c(29);let n,r,s,o,i,l;e[0]!==t?({children:n,className:r,href:s,level:l,onClick:o,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=l===void 0?1:l,{activeId:c,registerItem:d,scrollToSection:u,unregisterItem:f}=ma(),m=k.useRef(null);let h;e[7]!==s?(h=s.startsWith("#")?s.slice(1):s,e[7]=s,e[8]=h):h=e[8];const p=h,g=c===p;let x,v;e[9]!==p||e[10]!==d||e[11]!==f?(x=()=>(m.current&&d(p,m.current),()=>f(p)),v=[p,d,f],e[9]=p,e[10]=d,e[11]=f,e[12]=x,e[13]=v):(x=e[12],v=e[13]),k.useEffect(x,v);let y;e[14]!==s||e[15]!==o||e[16]!==u?(y=N=>{N.preventDefault(),u(s),o?.(N)},e[14]=s,e[15]=o,e[16]=u,e[17]=y):y=e[17];const w=y,C=Sx[a],O=g&&"text-foreground";let S;e[18]!==r||e[19]!==C||e[20]!==O?(S=L("block py-1.5 text-sm","text-muted-foreground transition-colors duration-150 hover:text-foreground",C,O,r),e[18]=r,e[19]=C,e[20]=O,e[21]=S):S=e[21];const E=g?"active":"inactive";let R;return e[22]!==n||e[23]!==w||e[24]!==s||e[25]!==i||e[26]!==S||e[27]!==E?(R=b.jsx("a",{className:S,"data-ox-slot":"page-outline-item","data-ox-state":E,href:s,ref:m,onClick:w,...i,children:n}),e[22]=n,e[23]=w,e[24]=s,e[25]=i,e[26]=S,e[27]=E,e[28]=R):R=e[28],R},Rx=Object.assign(wx,{Content:Ox,Header:Ex,Item:kx}),Nx=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mx-auto flex w-full justify-center",r),e[4]=r,e[5]=o):o=e[5];let i;e[6]!==n?(i=b.jsx("ul",{className:"flex items-center gap-1",children:n}),e[6]=n,e[7]=i):i=e[7];let l;return e[8]!==s||e[9]!==o||e[10]!==i?(l=b.jsx("nav",{"aria-label":"pagination",className:o,role:"navigation",...s,"data-ox-slot":"pagination",children:i}),e[8]=s,e[9]=o,e[10]=i,e[11]=l):l=e[11],l},jx=t=>{const e=T.compilerRuntimeExports.c(10);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let s;e[3]!==n?(s=L(At({variant:"ghost",size:"md",iconOnly:!0}),"pointer-events-none",n),e[3]=n,e[4]=s):s=e[4];let o,i;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(ue,{icon:le.MoreHorizontal}),i=b.jsx("span",{className:"sr-only",children:"More pages"}),e[5]=o,e[6]=i):(o=e[5],i=e[6]);let l;return e[7]!==r||e[8]!==s?(l=b.jsxs("span",{"aria-hidden":"true",className:s,role:"presentation",...r,"data-ox-slot":"pagination-ellipsis",children:[o,i]}),e[7]=r,e[8]=s,e[9]=l):l=e[9],l},Dx=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L(r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("li",{className:o,...s,"data-ox-slot":"pagination-item",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Px=dt("OxPaginationLink","a"),Tx=t=>{const e=T.compilerRuntimeExports.c(27);let n,r,s,o,i,l,a;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,isActive:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const c=i===void 0?!1:i,d=l===void 0?!1:l,u=a===void 0?!1:a;let f;e[8]!==r||e[9]!==u?(f=L(At({variant:u?"default":"ghost",size:"md",iconOnly:!0}),r),e[8]=r,e[9]=u,e[10]=f):f=e[10];const m=f;let h;e[11]!==d||e[12]!==s?(h=C=>{if(d){C.preventDefault();return}s.onClick?.(C)},e[11]=d,e[12]=s,e[13]=h):h=e[13];const p=h,g=u?"page":void 0,x=d?!0:void 0;let v;e[14]!==m||e[15]!==s||e[16]!==p||e[17]!==o||e[18]!==g||e[19]!==x?(v={"aria-current":g,"aria-disabled":x,href:o,className:m,...s,onClick:p,"data-ox-slot":"pagination-link"},e[14]=m,e[15]=s,e[16]=p,e[17]=o,e[18]=g,e[19]=x,e[20]=v):v=e[20];const y=v;if(c){let C;return e[21]!==n||e[22]!==y?(C=b.jsx(Px,{...y,children:n}),e[21]=n,e[22]=y,e[23]=C):C=e[23],C}let w;return e[24]!==n||e[25]!==y?(w=b.jsx("a",{...y,children:n}),e[24]=n,e[25]=y,e[26]=w):w=e[26],w},Mx=dt("OxPaginationNext","a"),Ix=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=i===void 0?!1:i,c=l===void 0?!1:l,d=k.Children.count(n)>0;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"hidden sm:block",children:"Next"}),b.jsx(ue,{icon:le.ChevronRight})]}),e[7]=u):u=e[7];const m=d?n:u;let h;e[8]!==r?(h=L(At({variant:"ghost",size:"md"}),"size-9 p-0 sm:h-9 sm:w-auto sm:px-4",r),e[8]=r,e[9]=h):h=e[9];const p=h;let g;e[10]!==c||e[11]!==s?(g=O=>{if(c){O.preventDefault();return}s.onClick?.(O)},e[10]=c,e[11]=s,e[12]=g):g=e[12];const x=g,v=c?!0:void 0;let y;e[13]!==p||e[14]!==s||e[15]!==x||e[16]!==o||e[17]!==v?(y={"aria-label":"Go to next page","aria-disabled":v,href:o,className:p,...s,onClick:x,"data-ox-slot":"pagination-next"},e[13]=p,e[14]=s,e[15]=x,e[16]=o,e[17]=v,e[18]=y):y=e[18];const w=y;if(a){let O;return e[19]!==m||e[20]!==w?(O=b.jsx(Mx,{...w,children:m}),e[19]=m,e[20]=w,e[21]=O):O=e[21],O}let C;return e[22]!==m||e[23]!==w?(C=b.jsx("a",{...w,children:m}),e[22]=m,e[23]=w,e[24]=C):C=e[24],C},Ax=dt("OxPaginationPrevious","a"),_x=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i,l;e[0]!==t?({asChild:i,children:n,className:r,disabled:l,href:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=i===void 0?!1:i,c=l===void 0?!1:l,d=k.Children.count(n)>0;let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=b.jsxs(b.Fragment,{children:[b.jsx(ue,{icon:le.ChevronLeft}),b.jsx("span",{className:"hidden sm:block",children:"Previous"})]}),e[7]=u):u=e[7];const m=d?n:u;let h;e[8]!==r?(h=L(At({variant:"ghost",size:"md"}),"size-9 p-0 sm:h-9 sm:w-auto sm:px-4",r),e[8]=r,e[9]=h):h=e[9];const p=h;let g;e[10]!==c||e[11]!==s?(g=O=>{if(c){O.preventDefault();return}s.onClick?.(O)},e[10]=c,e[11]=s,e[12]=g):g=e[12];const x=g,v=c?!0:void 0;let y;e[13]!==p||e[14]!==s||e[15]!==x||e[16]!==o||e[17]!==v?(y={"aria-label":"Go to previous page","aria-disabled":v,href:o,className:p,...s,onClick:x,"data-ox-slot":"pagination-previous"},e[13]=p,e[14]=s,e[15]=x,e[16]=o,e[17]=v,e[18]=y):y=e[18];const w=y;if(a){let O;return e[19]!==m||e[20]!==w?(O=b.jsx(Ax,{...w,children:m}),e[19]=m,e[20]=w,e[21]=O):O=e[21],O}let C;return e[22]!==m||e[23]!==w?(C=b.jsx("a",{...w,children:m}),e[22]=m,e[23]=w,e[24]=C):C=e[24],C},$x=Object.assign(Nx,{Ellipsis:jx,Item:Dx,Link:Tx,Next:Ix,Previous:_x}),pa=k.createContext(null),Lx=t=>{const e=T.compilerRuntimeExports.c(22),{align:n,children:r,closeOnOutsideClick:s,defaultOpen:o,disabled:i,onOpenChange:l,open:a,side:c}=t,d=n===void 0?"center":n,u=s===void 0?!0:s,f=o===void 0?!1:o,m=i===void 0?!1:i,h=c===void 0?"bottom":c;let p;e[0]!==u||e[1]!==a||e[2]!==f||e[3]!==m||e[4]!==l?(p={closeOnEscape:!0,closeOnOutsideClick:u,defaultOpen:f,disabled:m,onOpenChange:l,open:a},e[0]=u,e[1]=a,e[2]=f,e[3]=m,e[4]=l,e[5]=p):p=e[5];const{close:g,containerRef:x,isClosing:v,isVisible:y,open:w,toggle:C}=T.usePopperState(p);let O;e[6]!==d||e[7]!==g||e[8]!==v||e[9]!==y||e[10]!==w||e[11]!==h||e[12]!==C?(O={align:d,close:g,isClosing:v,isVisible:y,open:w,side:h,toggle:C},e[6]=d,e[7]=g,e[8]=v,e[9]=y,e[10]=w,e[11]=h,e[12]=C,e[13]=O):O=e[13];const S=O;let E;e[14]!==r?(E=b.jsx(ke,{children:r}),e[14]=r,e[15]=E):E=e[15];let R;e[16]!==x||e[17]!==E?(R=b.jsx("div",{"data-ox-slot":"popover",ref:x,children:E}),e[16]=x,e[17]=E,e[18]=R):R=e[18];let N;return e[19]!==S||e[20]!==R?(N=b.jsx(pa.Provider,{value:S,children:R}),e[19]=S,e[20]=R,e[21]=N):N=e[21],N},ha=()=>{const t=k.useContext(pa);if(!t)throw new Error("usePopoverContext must be used within OxPopover");return t},zx=t=>{const e=T.compilerRuntimeExports.c(23);let n,r,s,o;e[0]!==t?({children:n,className:r,showCloseButton:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o===void 0?!0:o,{align:l,close:a,isClosing:c,isVisible:d,side:u}=ha();if(!d)return null;let f;e[5]!==r?(f=L("ox-popover-animate relative max-w-sm min-w-64 rounded-lg border bg-popover p-4 text-popover-foreground shadow-md",r),e[5]=r,e[6]=f):f=e[6];const m=c?"closing":"open";let h;e[7]!==a||e[8]!==i?(h=i&&b.jsx("div",{className:"absolute top-2 right-2",children:b.jsx(Je,{"aria-label":"Close popover",size:"sm",variant:"ghost",onClick:a,children:b.jsx(ue,{icon:le.X})})}),e[7]=a,e[8]=i,e[9]=h):h=e[9];let p;e[10]!==i?(p=L({"pr-8":i}),e[10]=i,e[11]=p):p=e[11];let g;e[12]!==n||e[13]!==p?(g=b.jsx("div",{className:p,children:n}),e[12]=n,e[13]=p,e[14]=g):g=e[14];let x;return e[15]!==l||e[16]!==s||e[17]!==u||e[18]!==f||e[19]!==m||e[20]!==h||e[21]!==g?(x=b.jsxs(ke.Content,{align:l,className:f,side:u,sideOffset:8,...s,"data-ox-slot":"popover-content","data-ox-state":m,children:[h,g]}),e[15]=l,e[16]=s,e[17]=u,e[18]=f,e[19]=m,e[20]=h,e[21]=g,e[22]=x):x=e[22],x},Fx=dt("OxPopoverTrigger","button"),Vx=t=>{const e=T.compilerRuntimeExports.c(19);let n,r,s,o,i;e[0]!==t?({asChild:i,children:n,className:r,onClick:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?!1:i,{toggle:a}=ha();let c;e[6]!==o||e[7]!==a?(c=h=>{a(),o?.(h)},e[6]=o,e[7]=a,e[8]=c):c=e[8];const d=c;let u;e[9]!==r||e[10]!==s||e[11]!==d?(u={type:"button",...s,className:r,"aria-haspopup":"dialog","data-ox-slot":"popover-trigger",onClick:d},e[9]=r,e[10]=s,e[11]=d,e[12]=u):u=e[12];const f=u;if(l){let h;return e[13]!==n||e[14]!==f?(h=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx(Fx,{...f,children:n})}),e[13]=n,e[14]=f,e[15]=h):h=e[15],h}let m;return e[16]!==n||e[17]!==f?(m=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx("button",{...f,children:n})}),e[16]=n,e[17]=f,e[18]=m):m=e[18],m},qn=Object.assign(Lx,{Content:zx,Trigger:Vx}),Bx=t=>{const e=T.compilerRuntimeExports.c(19);let n,r,s,o,i;e[0]!==t?({buffer:n,className:r,max:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?100:o,c=Math.max(0,Math.min(i===void 0?0:i,l)),d=n?Math.max(0,Math.min(n,l)):0;let u;e[6]!==r?(u=L("relative h-2 overflow-hidden rounded-full bg-primary/20",r),e[6]=r,e[7]=u):u=e[7];let f;e[8]!==n||e[9]!==d||e[10]!==l?(f=n!==void 0?b.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full bg-primary/30 transition-all duration-300",style:{width:`${d/l*100}%`}}):null,e[8]=n,e[9]=d,e[10]=l,e[11]=f):f=e[11];const m=`${c/l*100}%`;let h;e[12]!==m?(h=b.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full bg-primary transition-all duration-300",style:{width:m}}),e[12]=m,e[13]=h):h=e[13];let p;return e[14]!==s||e[15]!==u||e[16]!==f||e[17]!==h?(p=b.jsxs("div",{className:u,"data-ox-slot":"progress",role:"progressbar",...s,children:[f,h]}),e[14]=s,e[15]=u,e[16]=f,e[17]=h,e[18]=p):p=e[18],p},Wx=t=>{const e=T.compilerRuntimeExports.c(23);let n,r,s,o,i;e[0]!==t?({className:n,max:s,showPercentage:o,value:i,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=s===void 0?100:s,a=o===void 0?!1:o,d=Math.max(0,Math.min(i===void 0?0:i,l));let u;e[6]!==l||e[7]!==d?(u=Math.round(d/l*100),e[6]=l,e[7]=d,e[8]=u):u=e[8];const f=u,m=2*Math.PI*24,h=m-d/l*m;let p;e[9]!==n?(p=L("inline-flex items-center justify-center",n),e[9]=n,e[10]=p):p=e[10];let g;e[11]!==h?(g=b.jsx("svg",{className:"-rotate-90 transform",height:52,width:52,children:b.jsx("circle",{className:"stroke-primary transition-all duration-300 ease-in-out",cx:26,cy:26,fill:"none",r:24,strokeLinecap:"round",strokeWidth:"4",style:{strokeDasharray:m,strokeDashoffset:h}})}),e[11]=h,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==a?(x=a&&b.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:b.jsxs("span",{className:"text-xs font-medium text-foreground",children:[f,"%"]})}),e[13]=f,e[14]=a,e[15]=x):x=e[15];let v;e[16]!==g||e[17]!==x?(v=b.jsxs("div",{className:"relative",children:[g,x]}),e[16]=g,e[17]=x,e[18]=v):v=e[18];let y;return e[19]!==r||e[20]!==p||e[21]!==v?(y=b.jsx("div",{className:p,"data-ox-slot":"progress",...r,children:v}),e[19]=r,e[20]=p,e[21]=v,e[22]=y):y=e[22],y},Hx=Object.assign(Bx,{Circular:Wx}),Vs=t=>{const e=T.compilerRuntimeExports.c(13);let n,r,s,o;e[0]!==t?({className:n,decorative:s,orientation:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=s===void 0?!0:s,l=o===void 0?"horizontal":o,a=i?void 0:l,c=l==="horizontal"?"h-px w-full":"h-full w-px";let d;e[5]!==n||e[6]!==c?(d=L("shrink-0 bg-border",c,n),e[5]=n,e[6]=c,e[7]=d):d=e[7];const u=i?"none":"separator";let f;return e[8]!==r||e[9]!==a||e[10]!==d||e[11]!==u?(f=b.jsx("div",{"aria-orientation":a,className:d,role:u,...r,"data-ox-slot":"separator"}),e[8]=r,e[9]=a,e[10]=d,e[11]=u,e[12]=f):f=e[12],f},Yx={rectangle:"rounded-lg",circle:"rounded-full"},Vt=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({animate:s,className:n,shape:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=s===void 0?!0:s,a=Yx[o===void 0?"rectangle":o];let c;e[5]!==i||e[6]!==n||e[7]!==a?(c=L("relative overflow-hidden bg-secondary",a,{"animate-pulse":i},n),e[5]=i,e[6]=n,e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==r||e[10]!==c?(d=b.jsx("div",{"aria-busy":"true","aria-label":"Loading...",className:c,"data-ox-slot":"skeleton",role:"status",...r}),e[9]=r,e[10]=c,e[11]=d):d=e[11],d},ni=(t,e,n)=>{if(Array.isArray(t))return[Math.max(e,Math.min(n,t[0])),Math.max(e,Math.min(n,t[1]))];const r=Math.max(e,Math.min(n,t));return[r,r]},ri=(t,e,n)=>(t-e)/(n-e)*100,qx=(t,e,n,r)=>{const s=e+t/100*(n-e),o=Math.round(s/r)*r;return Math.max(e,Math.min(n,o))},Gx=t=>{const e=T.compilerRuntimeExports.c(122);let n,r,s,o,i,l,a,c,d,u,f,m,h,p;e[0]!==t?({"aria-label":n,"aria-labelledby":r,className:s,defaultValue:c,disabled:d,max:u,min:f,onChange:l,onChangeCommitted:a,orientation:m,showValue:h,step:p,value:o,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14]);const g=c===void 0?0:c,x=d===void 0?!1:d,v=u===void 0?100:u,y=f===void 0?0:f,w=m===void 0?"horizontal":m,C=h===void 0?!1:h,O=p===void 0?1:p,S=k.useRef(null),E=k.useRef(!1),R=k.useRef(0),N=o!==void 0,j=Array.isArray(g)||Array.isArray(o),D=o||g;let P;e[15]!==v||e[16]!==y||e[17]!==D?(P=ni(D,y,v),e[15]=v,e[16]=y,e[17]=D,e[18]=P):P=e[18];const[M,z]=k.useState(P);let A;e[19]!==o||e[20]!==M||e[21]!==N||e[22]!==v||e[23]!==y?(A=N?ni(o,y,v):M,e[19]=o,e[20]=M,e[21]=N,e[22]=v,e[23]=y,e[24]=A):A=e[24];const $=A;let I;e[25]!==x||e[26]!==N||e[27]!==j||e[28]!==l?(I=Oe=>{if(x)return;const be=j?Oe:Oe[0];N||z(Oe),l?.(be)},e[25]=x,e[26]=N,e[27]=j,e[28]=l,e[29]=I):I=e[29];const V=I;let _;e[30]!==v||e[31]!==y||e[32]!==w||e[33]!==O?(_=Oe=>{if(!S.current)return y;const be=S.current.getBoundingClientRect(),je=w==="horizontal"?(Oe.clientX-be.left)/be.width*100:(be.bottom-Oe.clientY)/be.height*100;return qx(Math.max(0,Math.min(100,je)),y,v,O)},e[30]=v,e[31]=y,e[32]=w,e[33]=O,e[34]=_):_=e[34];const F=_;let W;e[35]!==$||e[36]!==x||e[37]!==F||e[38]!==V||e[39]!==j?(W=(Oe,be)=>{if(x)return;Oe.preventDefault(),E.current=!0,R.current=be||0;const je=F(Oe);if(j&&be!==void 0){const ve=[...$];ve[be]=je,be===0&&ve[0]>ve[1]?ve[1]=ve[0]:be===1&&ve[1]<ve[0]&&(ve[0]=ve[1]),V(ve)}else V([je,je])},e[35]=$,e[36]=x,e[37]=F,e[38]=V,e[39]=j,e[40]=W):W=e[40];const B=W;let H;e[41]!==$||e[42]!==x||e[43]!==F||e[44]!==V||e[45]!==j?(H=Oe=>{if(x||E.current)return;const be=F(Oe);if(j){const[je,ve]=$,Be=Math.abs(be-je),Mn=Math.abs(be-ve),Rr=Be<=Mn?0:1,In=[...$];In[Rr]=be,V(In)}else V([be,be])},e[41]=$,e[42]=x,e[43]=F,e[44]=V,e[45]=j,e[46]=H):H=e[46];const G=H;let K;e[47]!==$||e[48]!==x||e[49]!==V||e[50]!==j||e[51]!==v||e[52]!==y||e[53]!==O?(K=(Oe,be)=>{if(x)return;let je;e:switch(Oe.key){case"ArrowRight":case"ArrowUp":{je=O;break e}case"ArrowLeft":case"ArrowDown":{je=-O;break e}case"PageUp":{je=(v-y)*.1;break e}case"PageDown":{je=-(v-y)*.1;break e}case"Home":{je=y-$[be];break e}case"End":{je=v-$[be];break e}default:return}Oe.preventDefault();const ve=[...$];ve[be]=Math.max(y,Math.min(v,$[be]+je)),j&&(be===0&&ve[0]>ve[1]?ve[1]=ve[0]:be===1&&ve[1]<ve[0]&&(ve[0]=ve[1])),V(ve)},e[47]=$,e[48]=x,e[49]=V,e[50]=j,e[51]=v,e[52]=y,e[53]=O,e[54]=K):K=e[54];const Y=K;let Q,X;e[55]!==$||e[56]!==F||e[57]!==V||e[58]!==j||e[59]!==a?(Q=()=>{const Oe=je=>{if(!E.current)return;const ve=F(je);if(j){const Be=[...$];Be[R.current]=ve,R.current===0&&Be[0]>Be[1]?Be[1]=Be[0]:R.current===1&&Be[1]<Be[0]&&(Be[0]=Be[1]),V(Be)}else V([ve,ve])},be=()=>{E.current&&(E.current=!1,a?.(j?$:$[0]))};return E.current&&(document.addEventListener("mousemove",Oe),document.addEventListener("mouseup",be)),()=>{document.removeEventListener("mousemove",Oe),document.removeEventListener("mouseup",be)}},X=[F,j,$,V,a],e[55]=$,e[56]=F,e[57]=V,e[58]=j,e[59]=a,e[60]=Q,e[61]=X):(Q=e[60],X=e[61]),k.useEffect(Q,X);const[U,J]=$,q=ri(U,y,v),se=ri(J,y,v);let ee;e[62]!==s?(ee=L("w-full py-3",s),e[62]=s,e[63]=ee):ee=e[63];let te;e[64]!==x?(te=L("relative h-1.5 w-full cursor-pointer rounded-full bg-muted",{"ox-default-disabled":x}),e[64]=x,e[65]=te):te=e[65];const ae=`${j?q:0}%`,de=`${j?se-q:q}%`;let fe;e[66]!==ae||e[67]!==de?(fe=b.jsx("div",{className:"absolute h-full rounded-full bg-primary",style:{left:ae,width:de}}),e[66]=ae,e[67]=de,e[68]=fe):fe=e[68];const ge=j?`${n} minimum`:n,Z=String(U);let ie;e[69]!==x?(ie=L("ox-focus-ring absolute top-1/2 size-4 -translate-1/2 cursor-grab rounded-full border-2 border-primary bg-background ring-ring/50 hover:ring-4 active:cursor-grabbing",{"cursor-not-allowed":x}),e[69]=x,e[70]=ie):ie=e[70];const oe=`${q}%`;let me;e[71]!==oe?(me={left:oe},e[71]=oe,e[72]=me):me=e[72];const Se=x?-1:0;let Ee;e[73]!==Y?(Ee=Oe=>Y(Oe,0),e[73]=Y,e[74]=Ee):Ee=e[74];let He;e[75]!==B?(He=Oe=>B(Oe,0),e[75]=B,e[76]=He):He=e[76];let Ye;e[77]!==r||e[78]!==v||e[79]!==y||e[80]!==U||e[81]!==w||e[82]!==ge||e[83]!==Z||e[84]!==ie||e[85]!==me||e[86]!==Se||e[87]!==Ee||e[88]!==He?(Ye=b.jsx("div",{"aria-label":ge,"aria-labelledby":r,"aria-orientation":w,"aria-valuemax":v,"aria-valuemin":y,"aria-valuenow":U,"aria-valuetext":Z,className:ie,role:"slider",style:me,tabIndex:Se,onKeyDown:Ee,onMouseDown:He}),e[77]=r,e[78]=v,e[79]=y,e[80]=U,e[81]=w,e[82]=ge,e[83]=Z,e[84]=ie,e[85]=me,e[86]=Se,e[87]=Ee,e[88]=He,e[89]=Ye):Ye=e[89];let qe;e[90]!==n||e[91]!==r||e[92]!==x||e[93]!==Y||e[94]!==B||e[95]!==j||e[96]!==v||e[97]!==se||e[98]!==J||e[99]!==y||e[100]!==w?(qe=j?b.jsx("div",{"aria-label":j?`${n} maximum`:n,"aria-labelledby":r,"aria-orientation":w,"aria-valuemax":v,"aria-valuemin":y,"aria-valuenow":J,"aria-valuetext":String(J),className:L("ox-focus-ring absolute top-1/2 size-4 -translate-1/2 cursor-grab rounded-full border-2 border-primary bg-background ring-ring/50 hover:ring-4 active:cursor-grabbing",{"cursor-not-allowed":x}),role:"slider",style:{left:`${se}%`},tabIndex:x?-1:0,onKeyDown:Oe=>Y(Oe,1),onMouseDown:Oe=>B(Oe,1)}):null,e[90]=n,e[91]=r,e[92]=x,e[93]=Y,e[94]=B,e[95]=j,e[96]=v,e[97]=se,e[98]=J,e[99]=y,e[100]=w,e[101]=qe):qe=e[101];let et;e[102]!==G||e[103]!==te||e[104]!==fe||e[105]!==Ye||e[106]!==qe?(et=b.jsxs("div",{className:te,ref:S,onClick:G,children:[fe,Ye,qe]}),e[102]=G,e[103]=te,e[104]=fe,e[105]=Ye,e[106]=qe,e[107]=et):et=e[107];let vt;e[108]!==j||e[109]!==v||e[110]!==J||e[111]!==y||e[112]!==U||e[113]!==C?(vt=C&&b.jsxs("div",{className:L("mt-2 flex justify-between text-xs text-muted-foreground"),children:[b.jsx("span",{children:j?`${U} - ${J}`:U}),b.jsxs("span",{children:[y," - ",v]})]}),e[108]=j,e[109]=v,e[110]=J,e[111]=y,e[112]=U,e[113]=C,e[114]=vt):vt=e[114];let Fe;e[115]!==et||e[116]!==vt?(Fe=b.jsxs("div",{className:"relative py-3",children:[et,vt]}),e[115]=et,e[116]=vt,e[117]=Fe):Fe=e[117];let _t;return e[118]!==i||e[119]!==ee||e[120]!==Fe?(_t=b.jsx("div",{className:ee,"data-ox-slot":"slider",...i,children:Fe}),e[118]=i,e[119]=ee,e[120]=Fe,e[121]=_t):_t=e[121],_t},ga=k.createContext(null),xa=k.createContext(null),Ux=()=>{const t=k.useContext(ga);if(!t)throw new Error("SortableList components must be used within an OxSortableList");return t},Kx=()=>{const t=k.useContext(xa);if(!t)throw new Error("SortableListHandle must be used within an OxSortableList.Item");return t},Xx=t=>{const e=T.compilerRuntimeExports.c(58);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,columns:l,direction:a,disabled:c,gap:d,onReorder:o,style:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=l===void 0?3:l,f=a===void 0?"vertical":a,m=c===void 0?!1:c,h=d===void 0?8:d,p=k.useId();let g,x,v;if(e[10]!==p||e[11]!==n){g=k.Children.toArray(n);let Y;e[15]!==p?(Y=(Q,X)=>`${p}-item-${X}`,e[15]=p,e[16]=Y):Y=e[16],x=g.map(Y),v=new Map,x.forEach((Q,X)=>{v.set(Q,X)}),e[10]=p,e[11]=n,e[12]=g,e[13]=x,e[14]=v}else g=e[12],x=e[13],v=e[14];let y;e[17]!==g||e[18]!==x||e[19]!==v?(y={childArray:g,itemIds:x,itemIndexMap:v},e[17]=g,e[18]=x,e[19]=v,e[20]=y):y=e[20];const{childArray:w,itemIds:C,itemIndexMap:O}=y;let S;e[21]===Symbol.for("react.memo_cache_sentinel")?(S={coordinateGetter:Fs},e[21]=S):S=e[21];const E=Os(Kt(jn),Kt(Nn,S));let R;e:switch(f){case"horizontal":{R=zg;break e}case"grid":{R=_s;break e}default:R=$s}const N=R;let j;e[22]!==O||e[23]!==o?(j=Y=>{const{active:Q,over:X}=Y;if(X&&Q.id!==X.id){const U=O.get(String(Q.id)),J=O.get(String(X.id));U!==void 0&&J!==void 0&&o(U,J)}},e[22]=O,e[23]=o,e[24]=j):j=e[24];const D=j;let P;e[25]!==u||e[26]!==f||e[27]!==h?(P=f==="grid"?{display:"grid",gap:h,gridTemplateColumns:`repeat(${u}, 1fr)`}:{display:"flex",flexDirection:f==="vertical"?"column":"row",gap:h},e[25]=u,e[26]=f,e[27]=h,e[28]=P):P=e[28];const M=P;let z;e[29]!==M||e[30]!==i?(z={...M,...i},e[29]=M,e[30]=i,e[31]=z):z=e[31];const A=z;let $;e[32]!==f||e[33]!==m?($={direction:f,disabled:m},e[32]=f,e[33]=m,e[34]=$):$=e[34];const I=$;let V;if(e[35]!==w||e[36]!==C){let Y;e[38]!==C?(Y=(Q,X)=>k.isValidElement(Q)?k.cloneElement(Q,{__sortableId:C[X],__sortableIndex:X}):Q,e[38]=C,e[39]=Y):Y=e[39],V=w.map(Y),e[35]=w,e[36]=C,e[37]=V}else V=e[37];const _=V,F=m?void 0:E;let W;e[40]!==r?(W=L(r),e[40]=r,e[41]=W):W=e[41];let B;e[42]!==s||e[43]!==_||e[44]!==A||e[45]!==W?(B=b.jsx("div",{className:W,"data-ox-slot":"sortable-list",style:A,...s,children:_}),e[42]=s,e[43]=_,e[44]=A,e[45]=W,e[46]=B):B=e[46];let H;e[47]!==C||e[48]!==N||e[49]!==B?(H=b.jsx(Ls,{items:C,strategy:N,children:B}),e[47]=C,e[48]=N,e[49]=B,e[50]=H):H=e[50];let G;e[51]!==D||e[52]!==F||e[53]!==H?(G=b.jsx(br,{collisionDetection:ol,sensors:F,onDragEnd:D,children:H}),e[51]=D,e[52]=F,e[53]=H,e[54]=G):G=e[54];let K;return e[55]!==I||e[56]!==G?(K=b.jsx(ga.Provider,{value:I,children:G}),e[55]=I,e[56]=G,e[57]=K):K=e[57],K},Qx=t=>{const e=T.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{attributes:o,disabled:i,listeners:l,registerHandle:a,setActivatorNodeRef:c}=Kx();let d,u;e[4]!==a?(d=()=>{a()},u=[a],e[4]=a,e[5]=d,e[6]=u):(d=e[5],u=e[6]),k.useEffect(d,u);let f;e[7]!==r||e[8]!==i?(f=L("flex cursor-grab touch-none items-center justify-center",{"cursor-not-allowed opacity-50":i},r),e[7]=r,e[8]=i,e[9]=f):f=e[9];let m;e[10]!==n?(m=n??b.jsx(le.GripVertical,{className:"size-4 text-muted-foreground"}),e[10]=n,e[11]=m):m=e[11];let h;return e[12]!==o||e[13]!==i||e[14]!==s||e[15]!==l||e[16]!==c||e[17]!==f||e[18]!==m?(h=b.jsx("button",{"aria-label":"Drag to reorder",className:f,"data-ox-slot":"sortable-list-handle",disabled:i,ref:c,type:"button",...o,...l,...s,children:m}),e[12]=o,e[13]=i,e[14]=s,e[15]=l,e[16]=c,e[17]=f,e[18]=m,e[19]=h):h=e[19],h},Jx=t=>{const e=T.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a;e[0]!==t?({__sortableId:n,__sortableIndex:r,children:s,className:o,disabled:a,style:l,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const c=a===void 0?!1:a,[d,u]=k.useState(!1),{disabled:f}=Ux(),m=f||c,h=n??`fallback-${r}`;let p;e[8]!==m||e[9]!==h?(p={disabled:m,id:h},e[8]=m,e[9]=h,e[10]=p):p=e[10];const{attributes:g,isDragging:x,listeners:v,setActivatorNodeRef:y,setNodeRef:w,transform:C,transition:O}=zs(p);let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{u(!0)},e[11]=S):S=e[11];const E=S;let R;e[12]!==C?(R=at.Transform.toString(C),e[12]=C,e[13]=R):R=e[13];let N;e[14]!==l||e[15]!==R||e[16]!==O?(N={transform:R,transition:O,...l},e[14]=l,e[15]=R,e[16]=O,e[17]=N):N=e[17];const j=N;let D;e[18]!==g||e[19]!==m||e[20]!==x||e[21]!==v||e[22]!==y?(D={attributes:g,disabled:m,isDragging:x,listeners:v,registerHandle:E,setActivatorNodeRef:y},e[18]=g,e[19]=m,e[20]=x,e[21]=v,e[22]=y,e[23]=D):D=e[23];const P=D;let M;e[24]!==g||e[25]!==d||e[26]!==v?(M=d?{}:{...g,...v},e[24]=g,e[25]=d,e[26]=v,e[27]=M):M=e[27];const z=M;let A;e[28]!==o||e[29]!==x?(A=L({"opacity-50":x},o),e[28]=o,e[29]=x,e[30]=A):A=e[30];const $=x?"dragging":void 0;let I;e[31]!==s||e[32]!==i||e[33]!==z||e[34]!==j||e[35]!==w||e[36]!==A||e[37]!==$?(I=b.jsx("div",{className:A,"data-ox-slot":"sortable-list-item","data-ox-state":$,ref:w,style:j,...z,...i,children:s}),e[31]=s,e[32]=i,e[33]=z,e[34]=j,e[35]=w,e[36]=A,e[37]=$,e[38]=I):I=e[38];let V;return e[39]!==P||e[40]!==I?(V=b.jsx(xa.Provider,{value:P,children:I}),e[39]=P,e[40]=I,e[41]=V):V=e[41],V},Zx=Object.assign(Xx,{Handle:Qx,Item:Jx}),eb={loading:{title:"Loading...",message:"Good things take time",icon:le.LoaderCircle,showAction:!1},empty:{title:"Nothing here",message:"It's so empty... like my soul",icon:le.PackageOpen,showAction:!1},offline:{title:"You're offline",message:"Did you forget to pay the internet bill?",icon:le.WifiOff,showAction:!0},success:{title:"Success!",message:"Everything went perfectly as planned",icon:le.CircleCheck,showAction:!1},warning:{title:"Heads up!",message:"Something needs your attention",icon:le.AlertCircle,showAction:!1},info:{title:"Just so you know",message:"Here's some helpful information",icon:le.Info,showAction:!1},401:{title:"Please log in",message:"You need to authenticate to access this page",showAction:!0},403:{title:"Access denied",message:"You don't have permission to view this content",showAction:!0},404:{title:"Page not found",message:"Nothing to see here... just... go away... now.",showAction:!0},408:{title:"Request timeout",message:"Taking too long? Try refreshing the page",showAction:!0},429:{title:"Slow down there!",message:"Too many requests. Take a coffee break",showAction:!0},500:{title:"Oops! We broke something",message:"Don't worry, it's not your fault... probably",showAction:!0},502:{title:"Bad gateway",message:"The server is having an existential crisis",showAction:!0},503:{title:"Taking a quick nap",message:"Service will be back after coffee break",showAction:!0},504:{title:"Server timeout",message:"Server is slower than a Windows 95 boot",showAction:!0}},tb=t=>t==="success"?rt.success:t==="warning"?rt.warning:t==="info"?rt.info:typeof t=="number"?rt.destructive:{text:"text-primary"},nb=t=>{const e=T.compilerRuntimeExports.c(66);let n,r,s,o,i,l,a,c,d;e[0]!==t?({action:n,children:r,className:s,inline:a,message:i,onBack:l,title:c,type:d,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=a===void 0?!1:a;if(r){let _;e[10]!==s?(_=L("min-h-screen w-full",s),e[10]=s,e[11]=_):_=e[11];let F;return e[12]!==r||e[13]!==_?(F=b.jsx("div",{className:_,children:r}),e[12]=r,e[13]=_,e[14]=F):F=e[14],F}const f=eb[d],m=c||f.title,h=i||f.message;let p;e[15]!==l?(p=()=>{l?l():globalThis.history.back()},e[15]=l,e[16]=p):p=e[16];const g=p;let x;e[17]!==n||e[18]!==f.showAction||e[19]!==g?(x=()=>n!==void 0?n:f.showAction?b.jsx(Je,{variant:"secondary",onClick:g,children:"Back"}):null,e[17]=n,e[18]=f.showAction,e[19]=g,e[20]=x):x=e[20];const v=x;let y,w,C,O,S,E,R,N;if(e[21]!==s||e[22]!==f.icon||e[23]!==f.path||e[24]!==o||e[25]!==u||e[26]!==d){const _=tb(d),F=()=>f.icon?b.jsx(ue,{className:L(_.text,{"animate-spin":d==="loading"}),icon:f.icon,path:f.path,size:"2xl"}):typeof d=="number"?b.jsx("div",{className:L("bg-linear-to-br from-primary from-20% to-accent bg-clip-text text-3xl font-bold text-transparent"),children:d}):null;E=typeof d=="number"?"assertive":"polite";const W=!u;e[35]!==s||e[36]!==u||e[37]!==W?(R=L("flex w-full items-center justify-center",{"min-h-screen bg-background":W,"h-full":u},s),e[35]=s,e[36]=u,e[37]=W,e[38]=R):R=e[38],N="status-display",y=typeof d=="number"?"alert":"status",w=o,e[39]===Symbol.for("react.memo_cache_sentinel")?(S=L("flex max-w-md flex-col items-center space-y-6 text-center"),e[39]=S):S=e[39],C="flex items-center space-x-4",O=F(),e[21]=s,e[22]=f.icon,e[23]=f.path,e[24]=o,e[25]=u,e[26]=d,e[27]=y,e[28]=w,e[29]=C,e[30]=O,e[31]=S,e[32]=E,e[33]=R,e[34]=N}else y=e[27],w=e[28],C=e[29],O=e[30],S=e[31],E=e[32],R=e[33],N=e[34];let j;e[40]!==C||e[41]!==O?(j=b.jsx("div",{className:C,children:O}),e[40]=C,e[41]=O,e[42]=j):j=e[42];let D;e[43]===Symbol.for("react.memo_cache_sentinel")?(D=L("font-bold text-foreground","text-xl"),e[43]=D):D=e[43];let P;e[44]!==m?(P=b.jsx("h1",{id:"status-title","aria-describedby":"status-message",className:D,children:m}),e[44]=m,e[45]=P):P=e[45];let M;e[46]===Symbol.for("react.memo_cache_sentinel")?(M=L("text-muted-foreground","text-base"),e[46]=M):M=e[46];let z;e[47]!==h?(z=b.jsx("p",{id:"status-message",className:M,children:h}),e[47]=h,e[48]=z):z=e[48];let A;e[49]!==P||e[50]!==z?(A=b.jsxs("div",{className:"space-y-2",children:[P,z]}),e[49]=P,e[50]=z,e[51]=A):A=e[51];let $;e[52]!==v?($=v(),e[52]=v,e[53]=$):$=e[53];let I;e[54]!==j||e[55]!==A||e[56]!==$||e[57]!==S?(I=b.jsxs("div",{className:S,children:[j,A,$]}),e[54]=j,e[55]=A,e[56]=$,e[57]=S,e[58]=I):I=e[58];let V;return e[59]!==y||e[60]!==w||e[61]!==I||e[62]!==E||e[63]!==R||e[64]!==N?(V=b.jsx("div",{"aria-live":E,className:R,"data-ox-slot":N,role:y,...w,children:I}),e[59]=y,e[60]=w,e[61]=I,e[62]=E,e[63]=R,e[64]=N,e[65]=V):V=e[65],V},ba=k.createContext(null),Bs=()=>{const t=k.useContext(ba);if(!t)throw new Error("OxStepperItem must be used within OxStepper");return t},va=t=>{const e=T.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{orientation:o}=Bs(),i=o==="vertical";let l;e[4]!==r||e[5]!==i?(l=L("mt-2 p-4",{"border-t border-border":i},r),e[4]=r,e[5]=i,e[6]=l):l=e[6];let a;return e[7]!==n||e[8]!==s||e[9]!==l?(a=b.jsx("div",{className:l,...s,"data-ox-slot":"stepper-actions",children:n}),e[7]=n,e[8]=s,e[9]=l,e[10]=a):a=e[10],a},rb=(t,e,n)=>t==="error"?rt.destructive.icon:t==="warning"?rt.warning.icon:e||(n?rt.success.icon:null),ya=(t,e)=>t==="error"?rt.destructive:t==="warning"?rt.warning:We[e],si=(t,e)=>t==="error"||t==="warning"?e.text:"text-foreground",wa=t=>{const e=T.compilerRuntimeExports.c(18);let n,r,s,o;e[0]!==t?({className:n,state:s,stepIndex:o,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{color:i,currentStep:l,orientation:a}=Bs(),c=l>o,d=s||(c?"completed":"current");let u;e[5]!==d||e[6]!==i?(u=ya(d,i),e[5]=d,e[6]=i,e[7]=u):u=e[7];const f=u,m=a==="horizontal",h=a==="vertical",p=!c;let g;e[8]!==n||e[9]!==c||e[10]!==f.borderSubtle||e[11]!==m||e[12]!==h||e[13]!==p?(g=L("flex-1 border transition-colors duration-300",{"mx-4 mt-[19px]":m,"my-2 min-h-6":h,"border-border":p,[f.borderSubtle]:c},n),e[8]=n,e[9]=c,e[10]=f.borderSubtle,e[11]=m,e[12]=h,e[13]=p,e[14]=g):g=e[14];let x;return e[15]!==r||e[16]!==g?(x=b.jsx("div",{className:g,...r,"data-ox-slot":"stepper-connector"}),e[15]=r,e[16]=g,e[17]=x):x=e[17],x},Ca=k.createContext(null),Ze=()=>k.useContext(Ca),Jt=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,disabled:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=Ze(),l=s??!!i?.disabled;let a;e[5]!==r?(a=L("text-sm leading-relaxed text-pretty text-muted-foreground","aria-disabled:opacity-50",r),e[5]=r,e[6]=a):a=e[6];let c;return e[7]!==n||e[8]!==o||e[9]!==l||e[10]!==a?(c=b.jsx("div",{"aria-disabled":l,className:a,...o,"data-ox-slot":"description",children:n}),e[7]=n,e[8]=o,e[9]=l,e[10]=a,e[11]=c):c=e[11],c},Oa=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=Ze(),i=typeof o?.error=="string"?o.error:void 0,l=n??i;if(!l)return null;let a;e[4]!==r?(a=L("flex items-start gap-1.5 text-sm leading-relaxed text-pretty text-destructive",'[&>svg:not([class*="size-"])]:size-3.5',"[&>svg]:mt-0.75","[&>svg]:shrink-0","[&>svg]:text-current",r),e[4]=r,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==s||e[8]!==a?(c=b.jsx("div",{className:a,role:"alert",...s,"data-ox-slot":"error",children:l}),e[6]=l,e[7]=s,e[8]=a,e[9]=c):c=e[9],c},sb={1:"text-2xl font-bold",2:"text-xl font-semibold",3:"text-lg font-semibold",4:"text-base font-semibold",5:"text-sm font-semibold",6:"text-sm font-medium",7:"text-sm"},Ea=({as:t="h2",children:e,className:n,level:r,...s})=>{const o=r??(t!=="div"?Number.parseInt(t.slice(1)):2),i=T.clamp(o,1,7),l={className:L("text-foreground",sb[i],n),...s,"data-ox-slot":"heading",...t==="div"&&{role:"heading","aria-level":o}};return k.createElement(t,l,e)},Sa=t=>{const e=T.compilerRuntimeExports.c(21);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,disabled:s,htmlFor:i,id:l,required:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const c=Ze(),d=a??c?.required??!1,u=s??c?.disabled??!1,f=i??c?.id,m=l??c?.labelId,h=f&&!u;let p;e[8]!==r||e[9]!==h?(p=L("block text-sm font-medium text-foreground","aria-disabled:opacity-50",{"cursor-pointer":h},r),e[8]=r,e[9]=h,e[10]=p):p=e[10];let g;e[11]!==d?(g=d&&b.jsx("span",{"aria-hidden":"true",className:"ml-1 text-destructive",children:"*"}),e[11]=d,e[12]=g):g=e[12];let x;return e[13]!==n||e[14]!==o||e[15]!==u||e[16]!==f||e[17]!==m||e[18]!==p||e[19]!==g?(x=b.jsxs("label",{id:m,"aria-disabled":u,className:p,htmlFor:f,...o,"data-ox-slot":"label",children:[n,g]}),e[13]=n,e[14]=o,e[15]=u,e[16]=f,e[17]=m,e[18]=p,e[19]=g,e[20]=x):x=e[20],x},ob=t=>{const e=T.compilerRuntimeExports.c(16);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,required:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,a=i===void 0?!1:i;let c;e[6]!==r?(c=L("block text-base font-semibold text-foreground","aria-disabled:opacity-50",r),e[6]=r,e[7]=c):c=e[7];let d;e[8]!==a?(d=a&&b.jsx("span",{"aria-hidden":"true",className:"ml-1 text-destructive",children:"*"}),e[8]=a,e[9]=d):d=e[9];let u;return e[10]!==n||e[11]!==l||e[12]!==s||e[13]!==c||e[14]!==d?(u=b.jsxs("legend",{"aria-disabled":l,className:c,...s,"data-ox-slot":"legend",children:[n,d]}),e[10]=n,e[11]=l,e[12]=s,e[13]=c,e[14]=d,e[15]=u):u=e[15],u},ib={completed:"check",error:"close",warning:"warning",current:"current step",upcoming:"upcoming step"},ka=t=>{const e=T.compilerRuntimeExports.c(70);let n,r,s,o,i,l,a,c;e[0]!==t?({children:n,className:r,description:s,icon:i,state:l,stepIndex:a,title:c,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=a===void 0?0:a,{color:u,currentStep:f,onStepChange:m,orientation:h,totalSteps:p,type:g}=Bs(),x=f===d,v=f>d;let y,w,C,O,S,E,R,N;if(e[9]!==r||e[10]!==u||e[11]!==f||e[12]!==s||e[13]!==o||e[14]!==i||e[15]!==x||e[16]!==v||e[17]!==m||e[18]!==h||e[19]!==l||e[20]!==d||e[21]!==c||e[22]!==p||e[23]!==g){N=Symbol.for("react.early_return_sentinel");e:{let $;l?$=l:d<f?$="completed":d===f?$="current":$="upcoming";const I=g==="non-linear"||v||x,V=rb($,i,v),_=ya($,u);let F;e[32]!==I||e[33]!==m||e[34]!==d?(F=()=>{I&&m&&m(d)},e[32]=I,e[33]=m,e[34]=d,e[35]=F):F=e[35];const W=F,B=()=>b.jsx("button",{"aria-current":x?"step":void 0,"aria-describedby":s?`step-${d}-desc`:void 0,"aria-label":`${c} - ${ib[$]} (${d+1} of ${p})`,className:L("flex items-center justify-center rounded-lg transition-colors","enabled:cursor-pointer","ox-focus-ring",{"cursor-pointer":I,"opacity-50":$==="upcoming"}),disabled:!I,type:"button",onClick:W,children:b.jsx("div",{className:L("flex size-10 shrink-0 items-center justify-center rounded-lg border",_.borderSubtle,_.bgSubtle),children:V?b.jsx(ue,{className:_.text,icon:V}):b.jsx("span",{className:L("text-base font-medium text-current"),children:d+1})})});if(h==="horizontal"){let G;e[36]!==r?(G=L("flex flex-col items-center text-center",r),e[36]=r,e[37]=G):G=e[37];let K;e[38]!==s||e[39]!==d?(K=s?b.jsx(Jt,{id:`step-${d}-desc`,children:s}):null,e[38]=s,e[39]=d,e[40]=K):K=e[40],N=b.jsxs("div",{className:G,"data-ox-slot":"stepper-item",...o,children:[B(),b.jsxs("div",{className:"mt-2",children:[b.jsx("h6",{className:L("text-sm font-medium",si($,_)),children:c}),K]})]});break e}e[41]!==r?(O=L("flex gap-3",r),e[41]=r,e[42]=O):O=e[42],S="stepper-item",E=o;let H;e[43]!==l||e[44]!==d||e[45]!==p?(H=d<p-1?b.jsx(wa,{state:l,stepIndex:d}):null,e[43]=l,e[44]=d,e[45]=p,e[46]=H):H=e[46],R=b.jsxs("div",{className:"flex flex-col items-center",children:[B(),H]}),C="flex-1",w="mb-4",y=L("text-sm font-medium",si($,_))}e[9]=r,e[10]=u,e[11]=f,e[12]=s,e[13]=o,e[14]=i,e[15]=x,e[16]=v,e[17]=m,e[18]=h,e[19]=l,e[20]=d,e[21]=c,e[22]=p,e[23]=g,e[24]=y,e[25]=w,e[26]=C,e[27]=O,e[28]=S,e[29]=E,e[30]=R,e[31]=N}else y=e[24],w=e[25],C=e[26],O=e[27],S=e[28],E=e[29],R=e[30],N=e[31];if(N!==Symbol.for("react.early_return_sentinel"))return N;let j;e[47]!==y||e[48]!==c?(j=b.jsx("h6",{className:y,children:c}),e[47]=y,e[48]=c,e[49]=j):j=e[49];let D;e[50]!==s||e[51]!==d?(D=s?b.jsx(Jt,{id:`step-${d}-desc`,children:s}):null,e[50]=s,e[51]=d,e[52]=D):D=e[52];let P;e[53]!==j||e[54]!==D||e[55]!==w?(P=b.jsxs("div",{className:w,children:[j,D]}),e[53]=j,e[54]=D,e[55]=w,e[56]=P):P=e[56];let M;e[57]!==n||e[58]!==x?(M=x&&n?b.jsx("div",{className:"mb-4 rounded-lg border border-border bg-card p-4",children:n}):null,e[57]=n,e[58]=x,e[59]=M):M=e[59];let z;e[60]!==P||e[61]!==M||e[62]!==C?(z=b.jsxs("div",{className:C,children:[P,M]}),e[60]=P,e[61]=M,e[62]=C,e[63]=z):z=e[63];let A;return e[64]!==z||e[65]!==O||e[66]!==S||e[67]!==E||e[68]!==R?(A=b.jsxs("div",{className:O,"data-ox-slot":S,...E,children:[R,z]}),e[64]=z,e[65]=O,e[66]=S,e[67]=E,e[68]=R,e[69]=A):A=e[69],A},lb=t=>{const e=T.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a,c;e[0]!==t?({children:n,className:r,color:i,currentStep:l,onStepChange:o,orientation:a,type:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=i===void 0?"violet":i,u=l===void 0?0:l,f=a===void 0?"vertical":a,m=c===void 0?"linear":c;let h,p,g,x,v,y,w,C,O;if(e[9]!==n||e[10]!==r||e[11]!==d||e[12]!==u||e[13]!==s||e[14]!==o||e[15]!==f||e[16]!==m){const R=k.Children.toArray(n).filter(ab);let N;e[26]!==n?(N=k.Children.toArray(n).find(cb),e[26]=n,e[27]=N):N=e[27],p=N;const j=R.map(db),D={color:d,currentStep:u,onStepChange:o,orientation:f,totalSteps:R.length,type:m};h=ba.Provider,x=D,v="Step-by-step progress",e[28]!==r?(y=L("w-full",r),e[28]=r,e[29]=y):y=e[29],w="navigation",C=s,O="stepper",g=f==="horizontal"?b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"flex w-full items-start",children:j.map((P,M)=>b.jsxs(k.Fragment,{children:[k.cloneElement(P,{className:L("min-w-0 flex-1",P.props.className)}),M<R.length-1?b.jsx(wa,{state:R[M].props.state,stepIndex:M}):null]},M))}),R[u]?.props.children?b.jsx("div",{className:"mt-6 rounded-lg border border-border bg-card p-4",children:R[u].props.children}):null]}):j,e[9]=n,e[10]=r,e[11]=d,e[12]=u,e[13]=s,e[14]=o,e[15]=f,e[16]=m,e[17]=h,e[18]=p,e[19]=g,e[20]=x,e[21]=v,e[22]=y,e[23]=w,e[24]=C,e[25]=O}else h=e[17],p=e[18],g=e[19],x=e[20],v=e[21],y=e[22],w=e[23],C=e[24],O=e[25];let S;e[30]!==p||e[31]!==g||e[32]!==v||e[33]!==y||e[34]!==w||e[35]!==C||e[36]!==O?(S=b.jsxs("div",{"aria-label":v,className:y,role:w,...C,"data-ox-slot":O,children:[g,p]}),e[30]=p,e[31]=g,e[32]=v,e[33]=y,e[34]=w,e[35]=C,e[36]=O,e[37]=S):S=e[37];let E;return e[38]!==h||e[39]!==x||e[40]!==S?(E=b.jsx(h,{value:x,children:S}),e[38]=h,e[39]=x,e[40]=S,e[41]=E):E=e[41],E};function ab(t){return k.isValidElement(t)&&t.type===ka}function cb(t){return k.isValidElement(t)&&t.type===va}function db(t,e){return k.cloneElement(t,{stepIndex:e,key:e})}const ub=Object.assign(lb,{Actions:va,Item:ka}),ls=k.createContext(void 0),fb=t=>{const e=T.compilerRuntimeExports.c(78);let n,r,s,o,i,l,a,c,d,u,f,m;e[0]!==t?({allRowIds:l,children:n,className:r,draggable:a,isLoading:c,onRowReorder:o,onSelectionChange:i,selectable:d,selectedRows:u,skeletonColumns:f,skeletonRows:m,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12]);let h;e[13]!==l?(h=l===void 0?[]:l,e[13]=l,e[14]=h):h=e[14];const p=h,g=a===void 0?!1:a,x=c===void 0?!1:c,v=d===void 0?!1:d;let y;e[15]!==u?(y=u===void 0?[]:u,e[15]=u,e[16]=y):y=e[16];const w=y,C=f===void 0?3:f,O=m===void 0?5:m,[S,E]=k.useState(null);let R;e[17]===Symbol.for("react.memo_cache_sentinel")?(R=[],e[17]=R):R=e[17];const[N,j]=k.useState(R);let D;e[18]===Symbol.for("react.memo_cache_sentinel")?(D=[],e[18]=D):D=e[18];const P=k.useRef(D),M=k.useRef(!1);let z;e[19]===Symbol.for("react.memo_cache_sentinel")?(z={coordinateGetter:Fs},e[19]=z):z=e[19];const A=Os(Kt(jn),Kt(Nn,z));let $;e[20]===Symbol.for("react.memo_cache_sentinel")?($=()=>{M.current||(M.current=!0,queueMicrotask(()=>{M.current=!1,j([...P.current])}))},e[20]=$):$=e[20];const I=$;let V;e[21]===Symbol.for("react.memo_cache_sentinel")?(V=Z=>{P.current.includes(Z)||(P.current=[...P.current,Z],I())},e[21]=V):V=e[21];const _=V;let F;e[22]===Symbol.for("react.memo_cache_sentinel")?(F=Z=>{P.current=P.current.filter(ie=>ie!==Z),I()},e[22]=F):F=e[22];const W=F;let B;e[23]!==o||e[24]!==N?(B=Z=>{const{active:ie,over:oe}=Z;if(E(null),oe&&ie.id!==oe.id){const me=N.indexOf(String(ie.id)),Se=N.indexOf(String(oe.id)),Ee=As(N,me,Se);P.current=Ee,j(Ee),o?.(Ee)}},e[23]=o,e[24]=N,e[25]=B):B=e[25];const H=B,G=p.length>0&&w.length===p.length,K=w.length>0&&w.length<p.length,Y=Math.max(1,Math.min(C,20)),Q=Math.max(1,Math.min(O,50));let X;e[26]!==S?(X=Z=>S===Z,e[26]=S,e[27]=X):X=e[27];let U;e[28]!==w?(U=Z=>w.includes(Z),e[28]=w,e[29]=U):U=e[29];let J;e[30]!==i||e[31]!==w?(J=Z=>{if(!i)return;const ie=w.includes(Z);i(ie?w.filter(oe=>oe!==Z):[...w,Z])},e[30]=i,e[31]=w,e[32]=J):J=e[32];let q;e[33]!==p||e[34]!==G||e[35]!==i?(q=()=>{i&&i(G?[]:[...p])},e[33]=p,e[34]=G,e[35]=i,e[36]=q):q=e[36];let se;e[37]!==p||e[38]!==g||e[39]!==S||e[40]!==G||e[41]!==K||e[42]!==x||e[43]!==o||e[44]!==i||e[45]!==v||e[46]!==w||e[47]!==X||e[48]!==U||e[49]!==J||e[50]!==q||e[51]!==Y||e[52]!==Q?(se={allRowIds:p,draggable:g,draggingRowId:S,isLoading:x,selectable:v,selectedRows:w,skeletonColumns:Y,skeletonRows:Q,onRowReorder:o,onSelectionChange:i,registerRowId:_,unregisterRowId:W,isDragging:X,isSelected:U,toggleSelection:J,toggleAll:q,isAllSelected:G,isIndeterminate:K},e[37]=p,e[38]=g,e[39]=S,e[40]=G,e[41]=K,e[42]=x,e[43]=o,e[44]=i,e[45]=v,e[46]=w,e[47]=X,e[48]=U,e[49]=J,e[50]=q,e[51]=Y,e[52]=Q,e[53]=se):se=e[53];const ee=se;let te;e[54]!==r?(te=L("w-full caption-bottom text-sm",r),e[54]=r,e[55]=te):te=e[55];let ae;e[56]!==g||e[57]!==v?(ae=(v||g)&&b.jsxs("colgroup",{children:[g&&b.jsx("col",{className:"w-12"}),v&&b.jsx("col",{className:"w-12"})]}),e[56]=g,e[57]=v,e[58]=ae):ae=e[58];let de;e[59]!==n||e[60]!==s||e[61]!==te||e[62]!==ae?(de=b.jsx("div",{className:"overflow-hidden rounded-md border border-border",children:b.jsxs("table",{className:te,...s,"data-ox-slot":"table",children:[ae,n]})}),e[59]=n,e[60]=s,e[61]=te,e[62]=ae,e[63]=de):de=e[63];const fe=de;if(g){let Z;e[64]===Symbol.for("react.memo_cache_sentinel")?(Z=Se=>E(String(Se.active.id)),e[64]=Z):Z=e[64];let ie;e[65]!==N||e[66]!==fe?(ie=b.jsx(Ls,{items:N,strategy:$s,children:fe}),e[65]=N,e[66]=fe,e[67]=ie):ie=e[67];let oe;e[68]!==H||e[69]!==A||e[70]!==ie?(oe=b.jsx(br,{collisionDetection:ol,sensors:A,onDragEnd:H,onDragStart:Z,children:ie}),e[68]=H,e[69]=A,e[70]=ie,e[71]=oe):oe=e[71];let me;return e[72]!==ee||e[73]!==oe?(me=b.jsx(ls.Provider,{value:ee,children:oe}),e[72]=ee,e[73]=oe,e[74]=me):me=e[74],me}let ge;return e[75]!==ee||e[76]!==fe?(ge=b.jsx(ls.Provider,{value:ee,children:fe}),e[75]=ee,e[76]=fe,e[77]=ge):ge=e[77],ge},Ws=()=>k.useContext(ls),Ra=t=>{const e=T.compilerRuntimeExports.c(7),{columns:n}=t,r=Ws();let s;e[0]!==r?.selectable?(s=r?.selectable?b.jsx("td",{className:"px-3 py-2",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(Vt,{className:"h-[21px] w-4",shape:"circle"})})}):null,e[0]=r?.selectable,e[1]=s):s=e[1];let o;e[2]!==n?(o=Array.from({length:n}).map(mb),e[2]=n,e[3]=o):o=e[3];let i;return e[4]!==s||e[5]!==o?(i=b.jsxs("tr",{className:"border-b transition-colors",children:[s,o]}),e[4]=s,e[5]=o,e[6]=i):i=e[6],i};function mb(t,e){return b.jsx("td",{className:"px-3 py-2",children:b.jsx(Vt,{className:"h-[21px] w-full"})},e)}const pb=t=>{const e=T.compilerRuntimeExports.c(13);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=Ws();let i;e[4]!==r?(i=L("[&_tr:last-child]:border-0",r),e[4]=r,e[5]=i):i=e[5];let l;e[6]!==n||e[7]!==o?(l=o?.isLoading?Array.from({length:o.skeletonRows}).map((c,d)=>b.jsx(Ra,{columns:o.skeletonColumns},d)):n,e[6]=n,e[7]=o,e[8]=l):l=e[8];let a;return e[9]!==s||e[10]!==i||e[11]!==l?(a=b.jsx("tbody",{className:i,...s,"data-ox-slot":"table-body",children:l}),e[9]=s,e[10]=i,e[11]=l,e[12]=a):a=e[12],a},hb=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("p-3 align-middle whitespace-nowrap",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("td",{className:o,...s,"data-ox-slot":"table-cell",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},gb=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("mb-4 flex items-center justify-between gap-4",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("div",{className:o,...s,"data-ox-slot":"table-controls",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},xb=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("border-t border-border font-medium",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("tfoot",{className:o,...s,"data-ox-slot":"table-footer",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},bb=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("h-10 px-3 text-left align-middle font-medium whitespace-nowrap text-foreground",r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("th",{className:o,...s,"data-ox-slot":"table-head",children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},Na=k.createContext({isHeader:!1}),vb=()=>k.useContext(Na),yb=t=>{const e=T.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o={isHeader:!0},e[4]=o):o=e[4];let i;e[5]!==r?(i=L("[&_tr]:border-b",r),e[5]=r,e[6]=i):i=e[6];let l;return e[7]!==n||e[8]!==s||e[9]!==i?(l=b.jsx(Na.Provider,{value:o,children:b.jsx("thead",{className:i,...s,"data-ox-slot":"table-header",children:n})}),e[7]=n,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},Pt=t=>t==="indeterminate",wb=t=>{const e=T.compilerRuntimeExports.c(53);let n,r,s,o,i,l,a,c,d,u,f,m;e[0]!==t?({checked:n,className:r,defaultChecked:s,disabled:o,error:l,id:u,name:a,onChange:c,onCheckedChange:d,required:f,value:m,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12]);const h=Ze(),p=k.useId(),g=k.useRef(null),x=o??h?.disabled??!1,v=l??!!h?.error,y=f??h?.required??!1,w=u??h?.id??p,C=s??!1;let O;e[13]!==d?(O=Y=>{Y!==void 0&&d?.(Y)},e[13]=d,e[14]=O):O=e[14];let S;e[15]!==n||e[16]!==C||e[17]!==O?(S={value:n,defaultValue:C,onChange:O,name:"OxCheckbox"},e[15]=n,e[16]=C,e[17]=O,e[18]=S):S=e[18];const[E,R]=T.useControllableState(S);let N,j;e[19]!==E?(N=()=>{g.current&&(g.current.indeterminate=Pt(E))},j=[E],e[19]=E,e[20]=N,e[21]=j):(N=e[20],j=e[21]),k.useEffect(N,j);let D;e[22]!==E||e[23]!==x?(D=()=>x?"disabled":Pt(E)?"indeterminate":E?"checked":"unchecked",e[22]=E,e[23]=x,e[24]=D):D=e[24];const P=D;let M;Pt(E)?M="mixed":E?M="true":M="false";let z;e[25]!==c||e[26]!==R?(z=Y=>{c?.(Y),R(Q=>Pt(Q)?!0:Y.target.checked)},e[25]=c,e[26]=R,e[27]=z):z=e[27];const A=z,$=Pt(E)?le.Minus:le.Check;let I;e[28]!==E?(I=Pt(E)?!1:E??!1,e[28]=E,e[29]=I):I=e[29];const V=I,_=M;let F;e[30]!==r?(F=L("peer size-4 shrink-0 cursor-pointer appearance-none rounded-sm border border-input bg-transparent shadow-xs","transition-shadow outline-none","ox-focus-ring","checked:border-primary checked:bg-primary",'data-[ox-state="indeterminate"]:border-primary data-[ox-state="indeterminate"]:bg-primary',"aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",r),e[30]=r,e[31]=F):F=e[31];const W=P();let B;e[32]!==M||e[33]!==i||e[34]!==A||e[35]!==v||e[36]!==w||e[37]!==V||e[38]!==x||e[39]!==y||e[40]!==a||e[41]!==F||e[42]!==W||e[43]!==m?(B=b.jsx("input",{id:w,"aria-checked":_,"aria-invalid":v,"aria-required":y,className:F,"data-ox-slot":"checkbox",disabled:x,name:a,ref:g,required:y,type:"checkbox",value:m,onChange:A,...i,checked:V,"data-ox-state":W}),e[32]=M,e[33]=i,e[34]=A,e[35]=v,e[36]=w,e[37]=V,e[38]=x,e[39]=y,e[40]=a,e[41]=F,e[42]=W,e[43]=m,e[44]=B):B=e[44];let H;e[45]!==E?(H=L("pointer-events-none absolute inset-0 m-auto text-primary-foreground",{"opacity-80":Pt(E),"opacity-0 peer-checked:opacity-80":!Pt(E)}),e[45]=E,e[46]=H):H=e[46];let G;e[47]!==$||e[48]!==H?(G=b.jsx(ue,{className:H,icon:$}),e[47]=$,e[48]=H,e[49]=G):G=e[49];let K;return e[50]!==B||e[51]!==G?(K=b.jsxs("div",{className:'relative inline-flex shrink-0 [&_svg:not([class*="size-"])]:size-3.5',children:[B,G]}),e[50]=B,e[51]=G,e[52]=K):K=e[52],K},ja=k.createContext(void 0),Cb=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,disabled:s,name:i,onChange:l,value:a,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);let c;e[8]!==a?(c=a===void 0?[]:a,e[8]=a,e[9]=c):c=e[9];const d=c,u=Ze(),f=s??u?.disabled??!1;let m;e[10]!==f||e[11]!==i||e[12]!==l||e[13]!==d?(m={value:d,onChange:l,name:i,disabled:f},e[10]=f,e[11]=i,e[12]=l,e[13]=d,e[14]=m):m=e[14];const h=u?.labelId;let p;e[15]!==r?(p=L("space-y-2",r),e[15]=r,e[16]=p):p=e[16];let g;e[17]!==n||e[18]!==o||e[19]!==h||e[20]!==p?(g=b.jsx("div",{"aria-labelledby":h,className:p,"data-ox-slot":"checkbox-group",role:"group",...o,children:n}),e[17]=n,e[18]=o,e[19]=h,e[20]=p,e[21]=g):g=e[21];let x;return e[22]!==m||e[23]!==g?(x=b.jsx(ja.Provider,{value:m,children:g}),e[22]=m,e[23]=g,e[24]=x):x=e[24],x},Ob=()=>k.useContext(ja),Eb=t=>{const e=T.compilerRuntimeExports.c(37);let n,r,s,o,i,l,a,c,d;e[0]!==t?({className:n,disabled:o,error:a,id:l,name:i,onChange:s,required:c,value:d,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=a===void 0?!1:a,f=c===void 0?!1:c,m=k.useId(),h=Ob();if(!h)throw new Error("CheckboxGroupItem must be used within CheckboxGroup");const p=l||m,g=o??h.disabled??!1,x=i??h.name;let v;e[10]!==h.value||e[11]!==d?(v=h.value?.includes(d)??!1,e[10]=h.value,e[11]=d,e[12]=v):v=e[12];const y=v;let w;e[13]!==h||e[14]!==s||e[15]!==d?(w=P=>{s?.(P);const M=h.value,A=P.target.checked?[...M,d]:M.filter($=>$!==d);h.onChange?.(A)},e[13]=h,e[14]=s,e[15]=d,e[16]=w):w=e[16];const C=w;let O;e[17]!==g||e[18]!==y?(O=()=>g?"disabled":y?"checked":"unchecked",e[17]=g,e[18]=y,e[19]=O):O=e[19];const S=O;let E;e[20]!==n?(E=L("peer size-4 shrink-0 cursor-pointer appearance-none rounded-sm border border-input bg-transparent shadow-xs","transition-shadow outline-none","ox-focus-ring","checked:border-primary checked:bg-primary","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[20]=n,e[21]=E):E=e[21];const R=S();let N;e[22]!==g||e[23]!==r||e[24]!==u||e[25]!==C||e[26]!==p||e[27]!==y||e[28]!==x||e[29]!==f||e[30]!==E||e[31]!==R||e[32]!==d?(N=b.jsx("input",{id:p,"aria-checked":y,"aria-invalid":u,"aria-required":f,className:E,"data-ox-slot":"checkbox",disabled:g,name:x,required:f,type:"checkbox",value:d,onChange:C,...r,checked:y,"data-ox-state":R}),e[22]=g,e[23]=r,e[24]=u,e[25]=C,e[26]=p,e[27]=y,e[28]=x,e[29]=f,e[30]=E,e[31]=R,e[32]=d,e[33]=N):N=e[33];let j;e[34]===Symbol.for("react.memo_cache_sentinel")?(j=b.jsx(ue,{className:"pointer-events-none absolute inset-0 m-auto text-primary-foreground opacity-0 peer-checked:opacity-80",icon:le.Check}),e[34]=j):j=e[34];let D;return e[35]!==N?(D=b.jsxs("div",{className:'relative inline-flex shrink-0 [&_svg:not([class*="size-"])]:size-3.5',children:[N,j]}),e[35]=N,e[36]=D):D=e[36],D},as=Object.assign(wb,{Group:Cb,GroupItem:Eb}),Da=k.createContext(null),Sb=t=>t.map(e=>e.includes("/")?e:`.${e}`).join(","),oi=t=>{const e={B:1,KB:1024,MB:1048576,GB:1073741824},n=t.match(/^(\d+(?:\.\d+)?)\s*(B|KB|MB|GB)$/i);if(!n)throw new Error(`Invalid size format: ${t}. Use format like "5MB", "1.5GB", etc.`);const[,r,s]=n;return Number.parseFloat(r)*e[s.toUpperCase()]},kb=(t,e)=>e.some(n=>n.includes("/")?n.endsWith("/*")?t.type.startsWith(n.slice(0,-1)):t.type===n:t.name.toLowerCase().endsWith(`.${n.toLowerCase()}`)),Rb=t=>{t.preventDefault(),t.stopPropagation()},Nb=t=>{const e=T.compilerRuntimeExports.c(74);let n,r,s,o,i,l,a,c,d,u,f;e[0]!==t?({accept:d,children:n,className:r,disabled:u,maxFiles:o,maxSize:i,minSize:l,multiple:f,onError:a,onFileSelect:c,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11]);let m;e[12]!==d?(m=d===void 0?[]:d,e[12]=d,e[13]=m):m=e[13];const h=m,p=u===void 0?!1:u,g=f===void 0?!1:f,x=k.useRef(null);let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[14]=v):v=e[14];const[y,w]=k.useState(v),[C,O]=k.useState(!1),[S,E]=k.useState();let R;e[15]!==h||e[16]!==o||e[17]!==i||e[18]!==l||e[19]!==g?(R=ee=>{if(!g&&ee.length>1)return"Only single file selection is allowed";if(o&&ee.length>o)return`Maximum ${o} file${o===1?"":"s"} allowed`;if(ee.length===0)return null;if(h.length>0&&ee.filter(ae=>!kb(ae,h)).length>0)return`Invalid file type. Accepted formats: ${h.join(", ")}`;if(i){const te=oi(i);if(ee.filter(de=>de.size>te).length>0)return`File size must not exceed ${i}`}if(l){const te=oi(l);if(ee.filter(de=>de.size<te).length>0)return`File size must be at least ${l}`}return null},e[15]=h,e[16]=o,e[17]=i,e[18]=l,e[19]=g,e[20]=R):R=e[20];const N=R;let j;e[21]!==a||e[22]!==c||e[23]!==N?(j=ee=>{const te=N(ee);if(te){E(te),a?.(te);return}E(void 0),w(ee),c?.(ee)},e[21]=a,e[22]=c,e[23]=N,e[24]=j):j=e[24];const D=j;let P;e[25]===Symbol.for("react.memo_cache_sentinel")?(P=()=>{w([]),E(void 0)},e[25]=P):P=e[25];const M=P;let z;e[26]!==p?(z=()=>{!p&&x.current&&x.current.click()},e[26]=p,e[27]=z):z=e[27];const A=z;let $;e[28]!==D?($=ee=>{const te=[...ee.target.files||[]];te.length>0&&D(te),ee.target.value=""},e[28]=D,e[29]=$):$=e[29];const I=$;let V;e[30]!==h||e[31]!==p||e[32]!==S||e[33]!==y||e[34]!==C||e[35]!==o||e[36]!==i||e[37]!==l||e[38]!==g||e[39]!==a||e[40]!==c||e[41]!==A||e[42]!==D||e[43]!==N?(V={accept:h,clearFiles:M,disabled:p,error:S,files:y,isDragActive:C,maxFiles:o,maxSize:i,minSize:l,multiple:g,onError:a,onFileSelect:c,openFilePicker:A,selectFiles:D,validateFiles:N},e[30]=h,e[31]=p,e[32]=S,e[33]=y,e[34]=C,e[35]=o,e[36]=i,e[37]=l,e[38]=g,e[39]=a,e[40]=c,e[41]=A,e[42]=D,e[43]=N,e[44]=V):V=e[44];const _=V;let F;e[45]!==p?(F=ee=>{ee.preventDefault(),ee.stopPropagation(),p||O(!0)},e[45]=p,e[46]=F):F=e[46];const W=F;let B;e[47]!==p?(B=ee=>{ee.preventDefault(),ee.stopPropagation(),!p&&!ee.currentTarget.contains(ee.relatedTarget)&&O(!1)},e[47]=p,e[48]=B):B=e[48];const H=B;let G;e[49]!==p||e[50]!==D?(G=ee=>{if(ee.preventDefault(),ee.stopPropagation(),p)return;O(!1);const te=[...ee.dataTransfer.files];D(te)},e[49]=p,e[50]=D,e[51]=G):G=e[51];const K=G;let Y;e[52]!==r?(Y=L("relative",r),e[52]=r,e[53]=Y):Y=e[53];const Q=C?"drag-active":"idle";let X;e[54]!==h?(X=h.length>0?Sb(h):void 0,e[54]=h,e[55]=X):X=e[55];let U;e[56]===Symbol.for("react.memo_cache_sentinel")?(U={display:"none"},e[56]=U):U=e[56];let J;e[57]!==p||e[58]!==I||e[59]!==g||e[60]!==X?(J=b.jsx("input",{accept:X,className:"hidden","data-ox-slot":"file-upload-input",disabled:p,multiple:g,ref:x,style:U,type:"file",onChange:I}),e[57]=p,e[58]=I,e[59]=g,e[60]=X,e[61]=J):J=e[61];let q;e[62]!==n||e[63]!==s||e[64]!==W||e[65]!==H||e[66]!==K||e[67]!==Y||e[68]!==Q||e[69]!==J?(q=b.jsxs("div",{className:Y,"data-ox-slot":"file-upload",...s,"data-ox-state":Q,onDragEnter:W,onDragLeave:H,onDragOver:Rb,onDrop:K,children:[n,J]}),e[62]=n,e[63]=s,e[64]=W,e[65]=H,e[66]=K,e[67]=Y,e[68]=Q,e[69]=J,e[70]=q):q=e[70];let se;return e[71]!==_||e[72]!==q?(se=b.jsx(Da.Provider,{value:_,children:q}),e[71]=_,e[72]=q,e[73]=se):se=e[73],se},Hs=()=>{const t=k.useContext(Da);if(!t)throw new Error("useFileUploadContext must be used within a FileUploadContext.Provider");return t},jb=t=>{const e=T.compilerRuntimeExports.c(29);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o,error:i,isDragActive:l,openFilePicker:a}=Hs();let c;e[4]!==o||e[5]!==i||e[6]!==l?(c=()=>i?"error":l?"drag-active":o?"disabled":"idle",e[4]=o,e[5]=i,e[6]=l,e[7]=c):c=e[7];const d=c,u=!l&&!i,f=!i&&!o;let m;e[8]!==r||e[9]!==o||e[10]!==i||e[11]!==l||e[12]!==u||e[13]!==f?(m=L("rounded-lg border-2 border-dashed p-6 transition-all duration-200",{"border-border bg-card":u,"border-primary bg-card":l,"border-destructive bg-card":i,"cursor-pointer focus:border-primary focus:outline-none":f,"ox-default-disabled":o},r),e[8]=r,e[9]=o,e[10]=i,e[11]=l,e[12]=u,e[13]=f,e[14]=m):m=e[14];const h=o?-1:0,p=d();let g;e[15]!==o||e[16]!==a?(g=y=>{(y.key==="Enter"||y.key===" ")&&!o&&(y.preventDefault(),a())},e[15]=o,e[16]=a,e[17]=g):g=e[17];let x;e[18]!==i?(x=i&&b.jsx("div",{className:"mt-2 text-center text-sm text-destructive",children:i}),e[18]=i,e[19]=x):x=e[19];let v;return e[20]!==n||e[21]!==s||e[22]!==a||e[23]!==m||e[24]!==h||e[25]!==p||e[26]!==g||e[27]!==x?(v=b.jsxs("div",{className:m,role:"button",tabIndex:h,...s,"data-ox-slot":"file-upload-area","data-ox-state":p,onClick:a,onKeyDown:g,children:[n,x]}),e[20]=n,e[21]=s,e[22]=a,e[23]=m,e[24]=h,e[25]=p,e[26]=g,e[27]=x,e[28]=v):v=e[28],v},Db=t=>{const e=T.compilerRuntimeExports.c(16);let n,r,s,o,i;e[0]!==t?({children:n,className:r,size:o,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?"md":o,a=i===void 0?"primary":i,{disabled:c,openFilePicker:d}=Hs();let u;e[6]!==r?(u=L("cursor-pointer",r),e[6]=r,e[7]=u):u=e[7];let f;return e[8]!==n||e[9]!==c||e[10]!==s||e[11]!==d||e[12]!==l||e[13]!==u||e[14]!==a?(f=b.jsx(Je,{className:u,disabled:c,size:l,type:"button",variant:a,...s,onClick:d,children:n}),e[8]=n,e[9]=c,e[10]=s,e[11]=d,e[12]=l,e[13]=u,e[14]=a,e[15]=f):f=e[15],f},Pb=t=>{const e=T.compilerRuntimeExports.c(41);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const[o,i]=k.useState(!1),{disabled:l,isDragActive:a,openFilePicker:c}=Hs();let d;e[4]!==l||e[5]!==a||e[6]!==o?(d=()=>a?"drag-active":o?"hovered":l?"disabled":"idle",e[4]=l,e[5]=a,e[6]=o,e[7]=d):d=e[7];const u=d,f=(o||a)&&!l;let m;e[8]!==r||e[9]!==l?(m=L("ox-backdrop-blur-parent group relative w-fit cursor-pointer overflow-hidden rounded-lg","ox-focus-ring",{"cursor-not-allowed opacity-50":l},r),e[8]=r,e[9]=l,e[10]=m):m=e[10];const h=l?-1:0,p=u();let g;e[11]!==l||e[12]!==c?(g=D=>{(D.key==="Enter"||D.key===" ")&&!l&&(D.preventDefault(),c())},e[11]=l,e[12]=c,e[13]=g):g=e[13];let x,v;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=()=>i(!0),v=()=>i(!1),e[14]=x,e[15]=v):(x=e[14],v=e[15]);const y=!f;let w;e[16]!==a||e[17]!==f||e[18]!==y?(w=L("absolute inset-0 flex w-full items-center justify-center transition-all duration-200","bg-background/70 backdrop-blur-sm",{"pointer-events-none opacity-0":y,"opacity-100":f,"bg-primary/60":a}),e[16]=a,e[17]=f,e[18]=y,e[19]=w):w=e[19];const C=!f;let O;e[20]!==a||e[21]!==f||e[22]!==C?(O=L("flex flex-col items-center gap-2 text-white transition-transform duration-200",{"scale-90":C,"scale-100":f,"scale-110":a}),e[20]=a,e[21]=f,e[22]=C,e[23]=O):O=e[23];const S=a?le.CloudUpload:le.Upload;let E;e[24]!==S?(E=b.jsx(ue,{className:"text-white drop-shadow-[0_0_12px_rgba(255,255,255,0.7)]",icon:S,size:"xl"}),e[24]=S,e[25]=E):E=e[25];let R;e[26]!==O||e[27]!==E?(R=b.jsx("div",{className:O,children:E}),e[26]=O,e[27]=E,e[28]=R):R=e[28];let N;e[29]!==R||e[30]!==w?(N=b.jsx("div",{className:w,"data-ox-slot":"file-upload-overlay-backdrop",children:R}),e[29]=R,e[30]=w,e[31]=N):N=e[31];let j;return e[32]!==n||e[33]!==s||e[34]!==c||e[35]!==N||e[36]!==m||e[37]!==h||e[38]!==p||e[39]!==g?(j=b.jsxs("div",{className:m,role:"button",tabIndex:h,...s,"data-ox-slot":"file-upload-overlay","data-ox-state":p,onClick:c,onKeyDown:g,onMouseEnter:x,onMouseLeave:v,children:[n,N]}),e[32]=n,e[33]=s,e[34]=c,e[35]=N,e[36]=m,e[37]=h,e[38]=p,e[39]=g,e[40]=j):j=e[40],j},Tb=Object.assign(Nb,{Area:jb,Button:Db,Overlay:Pb}),Mb=t=>{const e=T.compilerRuntimeExports.c(14);let n,r,s,o,i;e[0]!==t?({children:n,className:r,fullWidth:o,noValidate:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,a=i===void 0?!0:i;let c;e[6]!==r||e[7]!==l?(c=L({"w-full":l},r),e[6]=r,e[7]=l,e[8]=c):c=e[8];let d;return e[9]!==n||e[10]!==s||e[11]!==a||e[12]!==c?(d=b.jsx("form",{className:c,"data-ox-slot":"form",noValidate:a,...s,children:n}),e[9]=n,e[10]=s,e[11]=a,e[12]=c,e[13]=d):d=e[13],d},Ib=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Jt,{...t}),e[0]=t,e[1]=n):n=e[1],n},Ab=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Oa,{...t}),e[0]=t,e[1]=n):n=e[1],n},_b=L("grid grid-cols-[auto_1fr] items-center gap-x-3 gap-y-1",'input[data-ox-slot="checkbox"]:col-start-1','input[data-ox-slot="checkbox"]:row-start-1','input[data-ox-slot="radio"]:col-start-1','input[data-ox-slot="radio"]:row-start-1','button[data-ox-slot="switch"]:col-start-1','button[data-ox-slot="switch"]:row-start-1',"*:data-[ox-slot=label]:col-start-2","*:data-[ox-slot=description]:col-start-2","*:data-[ox-slot=error]:col-start-2"),$b=L("grid grid-cols-[1fr_auto] items-center gap-x-3 gap-y-1",'input[data-ox-slot="checkbox"]:col-start-2','input[data-ox-slot="checkbox"]:row-start-1','input[data-ox-slot="radio"]:col-start-2','input[data-ox-slot="radio"]:row-start-1','button[data-ox-slot="switch"]:col-start-2','button[data-ox-slot="switch"]:row-start-1',"*:data-[ox-slot=label]:col-start-1","*:data-[ox-slot=label]:row-start-1","*:data-[ox-slot=description]:col-start-1","*:data-[ox-slot=error]:col-start-1"),Lb=t=>{const e=T.compilerRuntimeExports.c(28);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,disabled:i,error:l,id:s,labelPosition:a,orientation:c,required:d,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=i===void 0?!1:i,f=l===void 0?!1:l,m=a===void 0?"start":a,h=c===void 0?"vertical":c,p=d===void 0?!1:d,g=k.useId(),x=s??g,v=`${x}-label`,y=h==="horizontal",w=m==="end";let C;e[10]!==u||e[11]!==f||e[12]!==x||e[13]!==v||e[14]!==p?(C={disabled:u,error:f,id:x,labelId:v,required:p},e[10]=u,e[11]=f,e[12]=x,e[13]=v,e[14]=p,e[15]=C):C=e[15];const O=!y,S=y&&!w,E=y&&w;let R;e[16]!==r||e[17]!==O||e[18]!==S||e[19]!==E?(R=L({"space-y-1":O,[_b]:S,[$b]:E},r),e[16]=r,e[17]=O,e[18]=S,e[19]=E,e[20]=R):R=e[20];let N;e[21]!==n||e[22]!==o||e[23]!==R?(N=b.jsx("div",{className:R,...o,"data-ox-slot":"form-field",children:n}),e[21]=n,e[22]=o,e[23]=R,e[24]=N):N=e[24];let j;return e[25]!==N||e[26]!==C?(j=b.jsx(Ca.Provider,{value:C,children:N}),e[25]=N,e[26]=C,e[27]=j):j=e[27],j},zb=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,layout:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=o==="grid";let l;e[5]!==r||e[6]!==i?(l=L("space-y-6",{"md:>*:data-[ox-slot=heading]:[grid-column:1] md:>*:data-[ox-slot=description]:[grid-column:1] md:>div:[grid-column:2] md:grid md:grid-cols-[1fr_2fr] md:gap-x-8 md:gap-y-3":i},r),e[5]=r,e[6]=i,e[7]=l):l=e[7];let a;return e[8]!==n||e[9]!==s||e[10]!==l?(a=b.jsx("div",{className:l,"data-ox-slot":"form-group",...s,children:n}),e[8]=n,e[9]=s,e[10]=l,e[11]=a):a=e[11],a},Fb=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Ea,{...t}),e[0]=t,e[1]=n):n=e[1],n},Vb=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(Sa,{...t}),e[0]=t,e[1]=n):n=e[1],n},Bb=Object.assign(Mb,{Description:Ib,Error:Ab,Field:Lb,Group:zb,GroupTitle:Fb,Label:Vb}),Tn=k.createContext(null),an=()=>{const t=k.useContext(Tn);if(!t)throw new Error("useBaseInputContext must be used within a BaseInput component");return t},St=t=>{const e=T.compilerRuntimeExports.c(11);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o}=an();let i;e[4]!==r?(i=L("enabled:cursor-pointer","disabled:ox-default-disabled",r),e[4]=r,e[5]=i):i=e[5];let l;return e[6]!==n||e[7]!==o||e[8]!==s||e[9]!==i?(l=b.jsx("button",{className:i,disabled:o,tabIndex:-1,type:"button",...s,"data-ox-slot":"input-button",children:n}),e[6]=n,e[7]=o,e[8]=s,e[9]=i,e[10]=l):l=e[10],l},Wb=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},kr=t=>{const e=T.compilerRuntimeExports.c(21);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{disabled:o,error:i,setShowValidation:l,showValidation:a,validationMessage:c}=an(),d=a&&!!c,u=!i;let f;e[4]!==r||e[5]!==o||e[6]!==i||e[7]!==u?(f=L("flex h-9 w-full items-center gap-2 rounded-md border bg-transparent px-3 py-1","dark:bg-input/30","text-base shadow-xs md:text-sm",'[&_svg:not([class*="size-"])]:size-4',"transition-[color,box-shadow]","outline-none focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",{"border-input":u,"border-destructive ring-destructive/20 dark:ring-destructive/40":i,"cursor-not-allowed opacity-50 [&_svg]:opacity-50":o},r),e[4]=r,e[5]=o,e[6]=i,e[7]=u,e[8]=f):f=e[8];let m;e[9]!==n||e[10]!==s||e[11]!==f?(m=b.jsx(qn.Trigger,{asChild:!0,children:b.jsx("div",{className:f,...s,"data-ox-slot":"input-container",children:n})}),e[9]=n,e[10]=s,e[11]=f,e[12]=m):m=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=b.jsx(ue,{className:"text-destructive",icon:le.CircleAlert,size:"sm"}),e[13]=h):h=e[13];let p;e[14]!==c?(p=b.jsx(qn.Content,{showCloseButton:!1,children:b.jsxs("div",{className:"flex items-center gap-2 text-base text-destructive-foreground md:text-sm",children:[h,c]})}),e[14]=c,e[15]=p):p=e[15];let g;return e[16]!==d||e[17]!==l||e[18]!==m||e[19]!==p?(g=b.jsxs(qn,{closeOnOutsideClick:!0,open:d,side:"bottom",onOpenChange:l,children:[m,p]}),e[16]=d,e[17]=l,e[18]=m,e[19]=p,e[20]=g):g=e[20],g},Pa=k.createContext(null),Ys=()=>{const t=k.useContext(Pa);if(!t)throw new Error("useDateContext must be used within a DateInput component");return t},Hb=()=>{const t=T.compilerRuntimeExports.c(10),{close:e,day:n,month:r,setValue:s,year:o}=Ys();let i;t[0]!==n||t[1]!==r||t[2]!==o?(i=n&&r&&o&&o.length===4?`${o}-${r.padStart(2,"0")}-${n.padStart(2,"0")}`:void 0,t[0]=n,t[1]=r,t[2]=o,t[3]=i):i=t[3];const l=i;let a;t[4]!==e||t[5]!==s?(a=u=>{const[f,m,h]=u.split("-");s({day:h,month:m,year:f}),e()},t[4]=e,t[5]=s,t[6]=a):a=t[6];const c=a;let d;return t[7]!==l||t[8]!==c?(d=b.jsx(Ji,{value:l,onChange:c}),t[7]=l,t[8]=c,t[9]=d):d=t[9],d},Yb=t=>{if(!t)return{day:"",month:"",year:""};const[e="",n="",r=""]=t.split("-");return{day:r,month:n,year:e}},Ta=(t,e,n)=>{if(!t&&!e&&!n)return"";const r=t?t.padStart(2,"0"):"",s=e?e.padStart(2,"0"):"";return`${n?n.padStart(4,"0"):""}-${s}-${r}`},qb=(t,e)=>{if(!t)return 31;const n=Number.parseInt(t,10);if(n<1||n>12)return 31;const r=e&&e.length===4?Number.parseInt(e,10):new Date().getFullYear(),s=new Date(r,n-1,1);return lf(s)},Gb=t=>t.length===2?Number.parseInt(t,10)<50?`20${t}`:`19${t}`:t,Ub=(t,e,n)=>{if(!t||!e||!n||n.length<4)return!1;const r=Ta(t,e,n),s=sm(r,"yyyy-MM-dd",new Date);return Vi(s)},Kb=t=>{const e=T.compilerRuntimeExports.c(20),{defaultValue:n,onChange:r,value:s}=t,o=n??"";let i;e[0]!==r?(i=x=>r?.(x??""),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==o||e[3]!==i||e[4]!==s?(l={value:s,defaultValue:o,onChange:i},e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5];const[a,c]=T.useControllableState(l);let d;e[6]!==a?(d=Yb(a),e[6]=a,e[7]=d):d=e[7];const{day:u,month:f,year:m}=d;let h;e[8]!==u||e[9]!==f||e[10]!==c||e[11]!==m?(h=x=>{const v=x.day??u,y=x.month??f,w=x.year??m,C=Ta(v,y,w);c(C)},e[8]=u,e[9]=f,e[10]=c,e[11]=m,e[12]=h):h=e[12];const p=h;let g;return e[13]!==a||e[14]!==u||e[15]!==f||e[16]!==c||e[17]!==p||e[18]!==m?(g={autoCompleteYear:Gb,dateValue:a,day:u,getMaxDayForMonth:qb,isValidCompleteDate:Ub,month:f,setDateValue:c,setValue:p,year:m},e[13]=a,e[14]=u,e[15]=f,e[16]=c,e[17]=p,e[18]=m,e[19]=g):g=e[19],g},Xb=t=>{const e=T.compilerRuntimeExports.c(70);let n,r,s,o,i,l,a,c,d,u,f,m,h,p,g;e[0]!==t?({children:n,className:r,defaultOpen:o,defaultValue:m,disabled:i,error:a,onChange:c,onOpenChange:d,open:u,pickOnly:h,readOnly:p,required:f,validationMessage:s,value:g,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p,e[15]=g):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14],g=e[15]);const x=m===void 0?"":m,v=h===void 0?!1:h,y=p===void 0?!1:p,w=Ze(),C=i??w?.disabled??!1,O=a??!!w?.error,S=f??w?.required??!1,E=y||v;let R;e[16]!==c?(R=Z=>c?.(Z??""),e[16]=c,e[17]=R):R=e[17];let N;e[18]!==x||e[19]!==R||e[20]!==g?(N={value:g,defaultValue:x,onChange:R},e[18]=x,e[19]=R,e[20]=g,e[21]=N):N=e[21];const{autoCompleteYear:j,day:D,getMaxDayForMonth:P,isValidCompleteDate:M,month:z,setValue:A,year:$}=Kb(N);let I;e[22]!==o||e[23]!==C||e[24]!==d||e[25]!==u?(I={closeOnEscape:!0,closeOnOutsideClick:!0,defaultOpen:o,disabled:C,onOpenChange:d,open:u},e[22]=o,e[23]=C,e[24]=d,e[25]=u,e[26]=I):I=e[26];const{close:V,containerRef:_,isClosing:F,isVisible:W,open:B,toggle:H}=T.usePopperState(I),[G,K]=k.useState(s??""),[Y,Q]=k.useState(!!s),X=w?.id;let U;e[27]!==O||e[28]!==C||e[29]!==S||e[30]!==Y||e[31]!==X||e[32]!==G?(U={disabled:C,error:O,id:X,required:S,setShowValidation:Q,setValidationMessage:K,showValidation:Y,validationMessage:G},e[27]=O,e[28]=C,e[29]=S,e[30]=Y,e[31]=X,e[32]=G,e[33]=U):U=e[33];let J;e[34]!==j||e[35]!==V||e[36]!==D||e[37]!==E||e[38]!==P||e[39]!==B||e[40]!==M||e[41]!==z||e[42]!==v||e[43]!==A||e[44]!==H||e[45]!==$?(J={autoCompleteYear:j,close:V,day:D,getMaxDayForMonth:P,isValidCompleteDate:M,month:z,open:B,pickOnly:v,readOnly:E,setValue:A,toggle:H,year:$},e[34]=j,e[35]=V,e[36]=D,e[37]=E,e[38]=P,e[39]=B,e[40]=M,e[41]=z,e[42]=v,e[43]=A,e[44]=H,e[45]=$,e[46]=J):J=e[46];let q;e[47]!==r?(q=L("w-fit",r),e[47]=r,e[48]=q):q=e[48];let se;e[49]!==n||e[50]!==l?(se=b.jsx(kr,{...l,children:n}),e[49]=n,e[50]=l,e[51]=se):se=e[51];let ee;e[52]!==q||e[53]!==se?(ee=b.jsx(ke.Anchor,{asChild:!0,children:b.jsx("div",{className:q,children:se})}),e[52]=q,e[53]=se,e[54]=ee):ee=e[54];let te;e[55]!==F||e[56]!==W?(te=W&&b.jsx(ke.Content,{align:"center",className:"ox-date-input-animate","data-ox-state":F?"closing":"open",side:"bottom",sideOffset:8,children:b.jsx(Hb,{})}),e[55]=F,e[56]=W,e[57]=te):te=e[57];let ae;e[58]!==ee||e[59]!==te?(ae=b.jsxs(ke,{children:[ee,te]}),e[58]=ee,e[59]=te,e[60]=ae):ae=e[60];let de;e[61]!==_||e[62]!==ae?(de=b.jsx("div",{ref:_,children:ae}),e[61]=_,e[62]=ae,e[63]=de):de=e[63];let fe;e[64]!==de||e[65]!==J?(fe=b.jsx(Pa.Provider,{value:J,children:de}),e[64]=de,e[65]=J,e[66]=fe):fe=e[66];let ge;return e[67]!==fe||e[68]!==U?(ge=b.jsx(Tn.Provider,{value:U,children:fe}),e[67]=fe,e[68]=U,e[69]=ge):ge=e[69],ge},zt=t=>{const e=T.compilerRuntimeExports.c(20);let n,r,s;e[0]!==t?({className:n,id:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const o=k.useId(),{disabled:i,error:l,id:a,required:c,setShowValidation:d,setValidationMessage:u}=an();let f;e[4]!==d||e[5]!==u?(f=v=>{v.preventDefault(),u(v.currentTarget.validationMessage),d(!0)},e[4]=d,e[5]=u,e[6]=f):f=e[6];const m=f,h=s??a??o;let p;e[7]!==n?(p=L("w-full min-w-10 appearance-none bg-transparent outline-none","placeholder:text-muted-foreground","disabled:cursor-not-allowed disabled:opacity-50",n),e[7]=n,e[8]=p):p=e[8];let g;e[9]!==d?(g=()=>d(!1),e[9]=d,e[10]=g):g=e[10];let x;return e[11]!==i||e[12]!==r||e[13]!==l||e[14]!==m||e[15]!==h||e[16]!==c||e[17]!==p||e[18]!==g?(x=b.jsx("input",{id:h,"aria-invalid":l,"aria-required":c,className:p,disabled:i,required:c,onInput:g,onInvalid:m,...r,"data-ox-slot":"input"}),e[11]=i,e[12]=r,e[13]=l,e[14]=m,e[15]=h,e[16]=c,e[17]=p,e[18]=g,e[19]=x):x=e[19],x},Ur=ot(["text-center","[appearance:textfield]","[&::-webkit-inner-spin-button]:appearance-none","[&::-webkit-outer-spin-button]:appearance-none"],{variants:{type:{day:"w-6 min-w-6",month:"w-6 min-w-6",year:"w-10 min-w-10"},pickOnly:{true:"enabled:cursor-pointer",false:""}}}),ii=ot("text-muted-foreground",{variants:{disabled:{true:"opacity-50",false:""}}}),Qb=()=>{const t=T.compilerRuntimeExports.c(92),{disabled:e,setValidationMessage:n}=an(),{autoCompleteYear:r,day:s,getMaxDayForMonth:o,isValidCompleteDate:i,month:l,open:a,pickOnly:c,readOnly:d,setValue:u,toggle:f,year:m}=Ys(),h=k.useRef(null),p=k.useRef(null),g=k.useRef(null);let x;t[0]!==s||t[1]!==o||t[2]!==l||t[3]!==u||t[4]!==m?(x=Z=>{const ie=o(l,m);let oe;s?oe=Number.parseInt(s,10):Z===1?oe=0:oe=ie+1;let me;Z===1?me=oe>=ie?1:oe+1:me=oe<=1?ie:oe-1,u({day:String(me)})},t[0]=s,t[1]=o,t[2]=l,t[3]=u,t[4]=m,t[5]=x):x=t[5];const v=x;let y;t[6]!==s||t[7]!==o||t[8]!==l||t[9]!==u||t[10]!==m?(y=Z=>{let ie;l?ie=Number.parseInt(l,10):Z===1?ie=0:ie=13;let oe;Z===1?oe=ie>=12?1:ie+1:oe=ie<=1?12:ie-1;const me=o(String(oe),m);(s?Number.parseInt(s,10):0)>me?u({day:String(me),month:String(oe)}):u({month:String(oe)})},t[6]=s,t[7]=o,t[8]=l,t[9]=u,t[10]=m,t[11]=y):y=t[11];const w=y;let C;t[12]!==o||t[13]!==l||t[14]!==u||t[15]!==m?(C=Z=>{const ie=Z.target.value,oe=o(l,m);(ie===""||/^\d{1,2}$/.test(ie)&&Number.parseInt(ie,10)<=oe)&&u({day:ie})},t[12]=o,t[13]=l,t[14]=u,t[15]=m,t[16]=C):C=t[16];const O=C;let S;t[17]!==u?(S=Z=>{const ie=Z.target.value;(ie===""||/^\d{1,2}$/.test(ie)&&Number.parseInt(ie,10)<=12)&&u({month:ie})},t[17]=u,t[18]=S):S=t[18];const E=S;let R;t[19]!==u?(R=Z=>{const ie=Z.target.value;(ie===""||/^\d{1,4}$/.test(ie)&&Number.parseInt(ie,10)<=2100)&&u({year:ie})},t[19]=u,t[20]=R):R=t[20];const N=R;let j;t[21]!==v?(j=Z=>{Z.key==="ArrowUp"?(Z.preventDefault(),v(1)):Z.key==="ArrowDown"?(Z.preventDefault(),v(-1)):(Z.key==="Tab"&&!Z.shiftKey||Z.key==="Enter"||Z.key==="-")&&(Z.preventDefault(),p.current?.focus())},t[21]=v,t[22]=j):j=t[22];const D=j;let P;t[23]!==w||t[24]!==l?(P=Z=>{Z.key==="ArrowUp"?(Z.preventDefault(),w(1)):Z.key==="ArrowDown"?(Z.preventDefault(),w(-1)):Z.key==="Tab"&&Z.shiftKey?(Z.preventDefault(),h.current?.focus()):Z.key==="Tab"&&!Z.shiftKey||Z.key==="Enter"||Z.key==="-"?(Z.preventDefault(),g.current?.focus()):Z.key==="Backspace"&&l===""&&h.current?.focus()},t[23]=w,t[24]=l,t[25]=P):P=t[25];const M=P;let z;t[26]!==m?(z=Z=>{Z.key==="Tab"&&Z.shiftKey?(Z.preventDefault(),p.current?.focus()):Z.key==="Backspace"&&m===""&&p.current?.focus()},t[26]=m,t[27]=z):z=t[27];const A=z;let $;t[28]!==s||t[29]!==i||t[30]!==l||t[31]!==n||t[32]!==m?($=()=>{s&&l&&m?i(s,l,m)?n(""):n("Invalid date"):n("")},t[28]=s,t[29]=i,t[30]=l,t[31]=n,t[32]=m,t[33]=$):$=t[33];const I=$;let V;t[34]!==I?(V=()=>{I()},t[34]=I,t[35]=V):V=t[35];const _=V;let F;t[36]!==I?(F=()=>{I()},t[36]=I,t[37]=F):F=t[37];const W=F;let B;t[38]!==r||t[39]!==u||t[40]!==I||t[41]!==m?(B=()=>{if(m.length===2){const Z=r(m);u({year:Z})}I()},t[38]=r,t[39]=u,t[40]=I,t[41]=m,t[42]=B):B=t[42];const H=B;let G;t[43]!==a||t[44]!==c||t[45]!==f?(G=()=>{c&&!a&&f()},t[43]=a,t[44]=c,t[45]=f,t[46]=G):G=t[46];const K=G,Y=c&&!e;let Q;t[47]!==Y?(Q=L("flex items-center gap-1 bg-transparent font-mono",{"cursor-pointer":Y}),t[47]=Y,t[48]=Q):Q=t[48];let X;t[49]!==c?(X=Ur({type:"day",pickOnly:c}),t[49]=c,t[50]=X):X=t[50];let U;t[51]!==s||t[52]!==_||t[53]!==O||t[54]!==D||t[55]!==d||t[56]!==X?(U=b.jsx(zt,{"aria-label":"Day",autoComplete:"off",className:X,inputMode:"numeric",max:"31",min:"0",pattern:"[0-9]*",placeholder:"dd",readOnly:d,ref:h,type:"number",value:s,onBlur:_,onChange:O,onKeyDown:D}),t[51]=s,t[52]=_,t[53]=O,t[54]=D,t[55]=d,t[56]=X,t[57]=U):U=t[57];let J;t[58]!==e?(J=ii({disabled:e}),t[58]=e,t[59]=J):J=t[59];let q;t[60]!==J?(q=b.jsx("span",{className:J,children:"-"}),t[60]=J,t[61]=q):q=t[61];let se;t[62]!==c?(se=Ur({type:"month",pickOnly:c}),t[62]=c,t[63]=se):se=t[63];let ee;t[64]!==W||t[65]!==E||t[66]!==M||t[67]!==l||t[68]!==d||t[69]!==se?(ee=b.jsx(zt,{"aria-label":"Month",autoComplete:"off",className:se,inputMode:"numeric",max:"12",min:"0",pattern:"[0-9]*",placeholder:"mm",readOnly:d,ref:p,type:"number",value:l,onBlur:W,onChange:E,onKeyDown:M}),t[64]=W,t[65]=E,t[66]=M,t[67]=l,t[68]=d,t[69]=se,t[70]=ee):ee=t[70];let te;t[71]!==e?(te=ii({disabled:e}),t[71]=e,t[72]=te):te=t[72];let ae;t[73]!==te?(ae=b.jsx("span",{className:te,children:"-"}),t[73]=te,t[74]=ae):ae=t[74];let de;t[75]!==c?(de=Ur({type:"year",pickOnly:c}),t[75]=c,t[76]=de):de=t[76];let fe;t[77]!==H||t[78]!==N||t[79]!==A||t[80]!==d||t[81]!==de||t[82]!==m?(fe=b.jsx(zt,{"aria-label":"Year",autoComplete:"off",className:de,inputMode:"numeric",max:"2100",min:"0",pattern:"[0-9]*",placeholder:"yyyy",readOnly:d,ref:g,type:"number",value:m,onBlur:H,onChange:N,onKeyDown:A}),t[77]=H,t[78]=N,t[79]=A,t[80]=d,t[81]=de,t[82]=m,t[83]=fe):fe=t[83];let ge;return t[84]!==K||t[85]!==Q||t[86]!==U||t[87]!==q||t[88]!==ee||t[89]!==ae||t[90]!==fe?(ge=b.jsxs("div",{className:Q,"data-ox-slot":"input-date",onClick:K,children:[U,q,ee,ae,fe]}),t[84]=K,t[85]=Q,t[86]=U,t[87]=q,t[88]=ee,t[89]=ae,t[90]=fe,t[91]=ge):ge=t[91],ge},Jb=t=>{const e=T.compilerRuntimeExports.c(6);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];const{toggle:r}=Ys();let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=b.jsx(ue,{icon:le.Calendar}),e[2]=s):s=e[2];let o;return e[3]!==n||e[4]!==r?(o=b.jsx(St,{onClick:r,...n,children:s}),e[3]=n,e[4]=r,e[5]=o):o=e[5],o},Zb=Object.assign(Qb,{Button:Wb,Container:Xb,PickerButton:Jb}),e0=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},Ma=k.createContext(null),t0=t=>{const e=T.compilerRuntimeExports.c(42);let n,r,s,o,i,l,a,c,d,u,f,m,h,p,g,x;e[0]!==t?({children:n,defaultValue:s,disabled:o,error:l,locale:h,max:a,maximumFractionDigits:c,min:d,minimumFractionDigits:u,onChange:f,required:m,steps:p,useGrouping:g,validationMessage:r,value:x,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m,e[13]=h,e[14]=p,e[15]=g,e[16]=x):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12],h=e[13],p=e[14],g=e[15],x=e[16]);const v=h===void 0?"en-US":h,y=p===void 0?1:p,w=g===void 0?!0:g,C=Ze(),O=o??C?.disabled??!1,S=l??!!C?.error,E=m??C?.required??!1,R=k.useId(),N=new Intl.NumberFormat(v,{useGrouping:w!==!1,minimumFractionDigits:u,maximumFractionDigits:c});let j;e[17]!==f?(j=q=>f?.(q),e[17]=f,e[18]=j):j=e[18];let D;e[19]!==s||e[20]!==j||e[21]!==x?(D={value:x,onChange:j,defaultValue:s,name:"OxNumberInput"},e[19]=s,e[20]=j,e[21]=x,e[22]=D):D=e[22];const[P,M]=T.useControllableState(D),[z,A]=k.useState(P!==void 0?N.format(P):""),[$,I]=k.useState(r??""),[V,_]=k.useState(!!r),F=n0;let W;e[23]!==a||e[24]!==d?(W=q=>T.clamp(q,d??-1/0,a??1/0),e[23]=a,e[24]=d,e[25]=W):W=e[25];const B=W,H=q=>{let se=F(z);se===void 0&&(se=P!==void 0?P:0);const ee=B(se),te=B(ee+q);M(te),A(N.format(te))};let G;e[26]!==H||e[27]!==y?(G=()=>H(y),e[26]=H,e[27]=y,e[28]=G):G=e[28];const K=G;let Y;e[29]!==H||e[30]!==y?(Y=()=>H(-y),e[29]=H,e[30]=y,e[31]=Y):Y=e[31];const Q=Y,X=C?.id;let U;e[32]!==S||e[33]!==O||e[34]!==E||e[35]!==V||e[36]!==X||e[37]!==$?(U={disabled:O,error:S,id:X,required:E,setShowValidation:_,setValidationMessage:I,showValidation:V,validationMessage:$},e[32]=S,e[33]=O,e[34]=E,e[35]=V,e[36]=X,e[37]=$,e[38]=U):U=e[38];let J;return e[39]!==n||e[40]!==i?(J=b.jsx(kr,{...i,children:n}),e[39]=n,e[40]=i,e[41]=J):J=e[41],b.jsx(Tn.Provider,{value:U,children:b.jsx(Ma.Provider,{value:{clampValue:B,displayValue:z,formatter:N,handleDecrement:Q,handleIncrement:K,inputId:R,internalValue:P,max:a,min:d,parse:F,setDisplayValue:A,setInternalValue:M,steps:y},children:J})})};function n0(t){if(!t.trim())return;const e=t.replaceAll(/[^\d.-]/g,""),n=Number.parseFloat(e);return!Number.isNaN(n)&&Number.isFinite(n)?n:void 0}const qs=()=>{const t=k.useContext(Ma);if(!t)throw new Error("useNumberContext must be used within a Number component");return t},r0=()=>{const t=T.compilerRuntimeExports.c(4),{handleDecrement:e,inputId:n}=qs();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=b.jsx(ue,{icon:le.Minus}),t[0]=r):r=t[0];let s;return t[1]!==e||t[2]!==n?(s=b.jsx(St,{"aria-controls":n,"aria-label":"Decrease value",onClick:e,children:r}),t[1]=e,t[2]=n,t[3]=s):s=t[3],s},s0=()=>{const t=T.compilerRuntimeExports.c(4),{handleIncrement:e,inputId:n}=qs();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=b.jsx(ue,{icon:le.Plus}),t[0]=r):r=t[0];let s;return t[1]!==e||t[2]!==n?(s=b.jsx(St,{"aria-controls":n,"aria-label":"Increase value",onClick:e,children:r}),t[1]=e,t[2]=n,t[3]=s):s=t[3],s},o0=t=>{const e=t.nativeEvent,n=t.target,r=n.value.slice(0,n.selectionStart??void 0)+(e.data??"")+n.value.slice(n.selectionEnd??void 0);!/^-?[\d.,]*$/.test(r)&&r!==""&&t.preventDefault()},i0=t=>{const e=T.compilerRuntimeExports.c(42);let n,r,s,o;e[0]!==t?({"aria-label":n,"aria-labelledby":r,className:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{clampValue:i,displayValue:l,formatter:a,handleDecrement:c,handleIncrement:d,inputId:u,internalValue:f,max:m,min:h,parse:p,setDisplayValue:g,setInternalValue:x}=qs(),[v,y]=k.useState(!1);let w;e[5]!==g?(w=z=>{g(z.target.value)},e[5]=g,e[6]=w):w=e[6];const C=w;let O;e[7]!==i||e[8]!==l||e[9]!==a||e[10]!==p||e[11]!==g||e[12]!==x?(O=()=>{const z=p(l);if(z!==void 0){const A=i(z);x(A),g(a.format(A))}else x(void 0),g("")},e[7]=i,e[8]=l,e[9]=a,e[10]=p,e[11]=g,e[12]=x,e[13]=O):O=e[13];const S=O;let E;e[14]!==a||e[15]!==p||e[16]!==g||e[17]!==x?(E=z=>{const A=z.clipboardData.getData("text"),$=p(A);$!==void 0&&(z.preventDefault(),g(a.format($)),x($))},e[14]=a,e[15]=p,e[16]=g,e[17]=x,e[18]=E):E=e[18];const R=E;let N;e[19]!==S||e[20]!==c||e[21]!==d||e[22]!==v?(N={onArrowDown:c,onArrowUp:d,onEnter:S,enabled:v,allowRepeat:!0},e[19]=S,e[20]=c,e[21]=d,e[22]=v,e[23]=N):N=e[23],T.useKeyboard(N);let j;e[24]!==s?(j=L("text-center font-mono",s),e[24]=s,e[25]=j):j=e[25];let D;e[26]!==S?(D=()=>{y(!1),S()},e[26]=S,e[27]=D):D=e[27];let P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=()=>y(!0),e[28]=P):P=e[28];let M;return e[29]!==n||e[30]!==r||e[31]!==l||e[32]!==o||e[33]!==C||e[34]!==R||e[35]!==u||e[36]!==f||e[37]!==m||e[38]!==h||e[39]!==j||e[40]!==D?(M=b.jsx(zt,{id:u,"aria-label":n,"aria-labelledby":r,"aria-valuemax":m,"aria-valuemin":h,"aria-valuenow":f,autoComplete:"off",className:j,inputMode:"decimal",role:"spinbutton",type:"text",value:l,onBeforeInput:o0,onBlur:D,onChange:C,onFocus:P,onPaste:R,...o}),e[29]=n,e[30]=r,e[31]=l,e[32]=o,e[33]=C,e[34]=R,e[35]=u,e[36]=f,e[37]=m,e[38]=h,e[39]=j,e[40]=D,e[41]=M):M=e[41],M},l0=Object.assign(i0,{Button:e0,Container:t0,DecrementButton:r0,IncrementButton:s0}),a0=t=>{switch(t){case"numeric":return{inputMode:"numeric",pattern:"[0-9]*"};case"alphanumeric":return{inputMode:"text",pattern:"[A-Z0-9]*"};default:return{inputMode:"text"}}},c0=(t,e)=>{switch(e){case"numeric":return t.replaceAll(/[^0-9]/g,"");case"alphanumeric":return t.replaceAll(/[^A-Z0-9]/gi,"").toUpperCase();default:return t}},d0=t=>{const e=T.compilerRuntimeExports.c(23),{className:n,disabled:r,error:s,length:o,onComplete:i,onValueChange:l,placeholder:a,type:c}=t,d=r===void 0?!1:r,u=s===void 0?!1:s,f=o===void 0?6:o,m=a===void 0?"":a,h=c===void 0?"numeric":c,p=k.useId();let g;e[0]!==f?(g=()=>Array.from({length:f},u0),e[0]=f,e[1]=g):g=e[1];const[x,v]=k.useState(g);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[2]=y):y=e[2];const w=k.useRef(y);let C;e[3]!==h?(C=a0(h),e[3]=h,e[4]=C):C=e[4];const O=C;let S,E;e[5]!==f?(E=()=>{w.current=w.current.slice(0,f)},S=[f],e[5]=f,e[6]=S,e[7]=E):(S=e[6],E=e[7]),k.useEffect(E,S);let R;e[8]===Symbol.for("react.memo_cache_sentinel")?(R=D=>it.flushSync(()=>{v(D)}),e[8]=R):R=e[8];const N=R;let j;if(e[9]!==p||e[10]!==n||e[11]!==x||e[12]!==d||e[13]!==u||e[14]!==f||e[15]!==i||e[16]!==l||e[17]!==m||e[18]!==h||e[19]!==O){const D=(A,$)=>{const I=c0($,h),V=[...x];V[A]=I[0]||"";const _=V[A]&&A<f-1?A+1:void 0;N(V),_!==void 0&&w.current[_]?.focus();const F=V.filter(f0),W=F.join("");l?.(W),F.length===f&&i?.(W)},P=(A,$)=>{const I=[...x];if($.key==="Backspace"){if(x[A]){I[A]="",N(I);const V=I.filter(m0);l?.(V.join(""))}else if(A>0){I[A-1]="",N(I),w.current[A-1]?.focus();const V=I.filter(p0);l?.(V.join(""))}}$.key==="ArrowLeft"&&A>0&&w.current[A-1]?.focus(),$.key==="ArrowRight"&&A<f-1&&w.current[A+1]?.focus()},M=A=>{w.current[A]?.select()};let z;e[21]!==n?(z=L("inline-flex gap-2 font-mono",n),e[21]=n,e[22]=z):z=e[22],j=b.jsx("div",{className:z,"data-ox-slot":"otp-input",children:Array.from({length:f},(A,$)=>{const I=$===0||x.slice(0,$).every(h0),V=d||!I;return b.jsx("input",{id:`${p}-digit-${$}`,"aria-disabled":V,"aria-invalid":u,"aria-label":`Digit ${$+1} of ${f}`,autoComplete:"one-time-code",className:L("size-9 rounded-md border border-input bg-transparent text-center shadow-xs transition-[color,box-shadow]","dark:bg-input/30","ox-focus-ring focus-visible:border-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40"),"data-ox-slot":"otp-digit",disabled:V,maxLength:1,placeholder:m,ref:_=>{w.current[$]=_},type:"text",value:x[$],onChange:_=>D($,_.target.value),onFocus:()=>M($),onKeyDown:_=>P($,_),onPaste:g0,...O},$)})}),e[9]=p,e[10]=n,e[11]=x,e[12]=d,e[13]=u,e[14]=f,e[15]=i,e[16]=l,e[17]=m,e[18]=h,e[19]=O,e[20]=j}else j=e[20];return j};function u0(){return""}function f0(t){return t!==""}function m0(t){return t!==""}function p0(t){return t!==""}function h0(t){return t!==""}function g0(t){return t.preventDefault()}const x0=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},Ia=k.createContext(null),Gs=()=>{const t=k.useContext(Ia);if(!t)throw new Error("useTextContext must be used within a Text component");return t},b0=()=>{const t=T.compilerRuntimeExports.c(6),{handleClear:e,internalValue:n}=Gs(),r=!n;let s;t[0]!==r?(s=L({invisible:r}),t[0]=r,t[1]=s):s=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=b.jsx(ue,{icon:le.X}),t[2]=o):o=t[2];let i;return t[3]!==e||t[4]!==s?(i=b.jsx(St,{"aria-label":"Clear input",className:s,onClick:e,children:o}),t[3]=e,t[4]=s,t[5]=i):i=t[5],i},v0=t=>{const e=T.compilerRuntimeExports.c(47);let n,r,s,o,i,l,a,c,d,u,f;e[0]!==t?({children:n,className:r,defaultValue:o,disabled:i,error:a,onChange:c,required:d,type:u,validationMessage:s,value:f,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11]);const m=u===void 0?"text":u,h=Ze(),p=i??h?.disabled??!1,g=a??!!h?.error,x=d??h?.required??!1,v=k.useRef(null);let y;e[12]!==c?(y=K=>{c?.(K??"")},e[12]=c,e[13]=y):y=e[13];let w;e[14]!==o||e[15]!==y||e[16]!==f?(w={defaultValue:o,name:"OxTextInput",onChange:y,value:f},e[14]=o,e[15]=y,e[16]=f,e[17]=w):w=e[17];const[C,O]=T.useControllableState(w),S=C??"";let E;e[18]!==O?(E=K=>O(K),e[18]=O,e[19]=E):E=e[19];const R=E,[N,j]=k.useState(m),[D,P]=k.useState(s??""),[M,z]=k.useState(!!s);let A;e[20]!==R?(A=()=>{R(""),v.current?.focus()},e[20]=R,e[21]=A):A=e[21];const $=A;let I;e[22]!==N?(I=()=>{N==="password"?j("text"):N==="text"&&j("password")},e[22]=N,e[23]=I):I=e[23];const V=I,_=h?.id;let F;e[24]!==g||e[25]!==p||e[26]!==x||e[27]!==M||e[28]!==_||e[29]!==D?(F={disabled:p,error:g,id:_,required:x,setShowValidation:z,setValidationMessage:P,showValidation:M,validationMessage:D},e[24]=g,e[25]=p,e[26]=x,e[27]=M,e[28]=_,e[29]=D,e[30]=F):F=e[30];let W;e[31]!==N||e[32]!==$||e[33]!==V||e[34]!==S||e[35]!==R?(W={handleClear:$,handleTypeToggle:V,inputRef:v,internalValue:S,setInternalValue:R,type:N},e[31]=N,e[32]=$,e[33]=V,e[34]=S,e[35]=R,e[36]=W):W=e[36];let B;e[37]!==n||e[38]!==r||e[39]!==l?(B=b.jsx(kr,{className:r,...l,children:n}),e[37]=n,e[38]=r,e[39]=l,e[40]=B):B=e[40];let H;e[41]!==B||e[42]!==W?(H=b.jsx(Ia.Provider,{value:W,children:B}),e[41]=B,e[42]=W,e[43]=H):H=e[43];let G;return e[44]!==H||e[45]!==F?(G=b.jsx(Tn.Provider,{value:F,children:H}),e[44]=H,e[45]=F,e[46]=G):G=e[46],G},y0=t=>{const e=T.compilerRuntimeExports.c(14);let n,r,s,o,i;e[0]!==t?({className:n,currentLength:o,disabled:i,maxLength:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?0:o,a=i===void 0?!1:i;let c;e[6]!==n?(c=L("mt-1 text-right font-mono text-xs text-muted-foreground tabular-nums","aria-disabled:ox-default-disabled",n),e[6]=n,e[7]=c):c=e[7];let d;return e[8]!==l||e[9]!==a||e[10]!==r||e[11]!==s||e[12]!==c?(d=b.jsxs("div",{"aria-disabled":a,className:c,...r,"data-ox-slot":"input-counter",children:[l,"/",s]}),e[8]=l,e[9]=a,e[10]=r,e[11]=s,e[12]=c,e[13]=d):d=e[13],d},w0=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(y0,{...t}),e[0]=t,e[1]=n):n=e[1],n},C0=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i,l,a;e[0]!==t?({autoComplete:n,className:r,id:o,maxLength:i,placeholder:l,spellCheck:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const c=a===void 0?!1:a,{disabled:d,error:u,required:f}=an(),{inputRef:m,internalValue:h,setInternalValue:p,type:g}=Gs();let x;e[8]!==p?(x=w=>{p(w.target.value)},e[8]=p,e[9]=x):x=e[9];const v=x;let y;return e[10]!==n||e[11]!==r||e[12]!==d||e[13]!==s||e[14]!==u||e[15]!==v||e[16]!==o||e[17]!==m||e[18]!==h||e[19]!==i||e[20]!==l||e[21]!==f||e[22]!==c||e[23]!==g?(y=b.jsx(zt,{id:o,"aria-invalid":u,"aria-required":f,autoComplete:n,className:r,disabled:d,maxLength:i,placeholder:l,ref:m,required:f,spellCheck:c,type:g,value:h,onChange:v,...s}),e[10]=n,e[11]=r,e[12]=d,e[13]=s,e[14]=u,e[15]=v,e[16]=o,e[17]=m,e[18]=h,e[19]=i,e[20]=l,e[21]=f,e[22]=c,e[23]=g,e[24]=y):y=e[24],y},O0=()=>{const t=T.compilerRuntimeExports.c(6),{handleTypeToggle:e,type:n}=Gs(),r=n==="text",s=r?"Hide password":"Show password",o=r?le.EyeOff:le.Eye;let i;t[0]!==o?(i=b.jsx(ue,{icon:o}),t[0]=o,t[1]=i):i=t[1];let l;return t[2]!==e||t[3]!==s||t[4]!==i?(l=b.jsx(St,{"aria-label":s,onClick:e,children:i}),t[2]=e,t[3]=s,t[4]=i,t[5]=l):l=t[5],l},E0=Object.assign(C0,{Button:x0,ClearButton:b0,Container:v0,Counter:w0,VisibilityButton:O0}),S0=t=>{const e=T.compilerRuntimeExports.c(2);let n;return e[0]!==t?(n=b.jsx(St,{...t}),e[0]=t,e[1]=n):n=e[1],n},Aa=k.createContext(null),k0=t=>{if(!t)return{hours:"",minutes:""};const[e="",n=""]=t.split(":");return{hours:e,minutes:n}},li=(t,e)=>{if(!t&&!e)return"";const n=t?t.padStart(2,"0"):"",r=e?e.padStart(2,"0"):"";return`${n}:${r}`},R0=t=>{const e=T.compilerRuntimeExports.c(21),{defaultValue:n,onChange:r,value:s}=t,o=n??"";let i;e[0]!==r?(i=v=>r?.(v??""),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==o||e[3]!==i||e[4]!==s?(l={defaultValue:o,name:"OxTimeInput",onChange:i,value:s},e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5];const[a,c]=T.useControllableState(l);let d;e[6]!==a?(d=k0(a),e[6]=a,e[7]=d):d=e[7];const{hours:u,minutes:f}=d;let m;e[8]!==f||e[9]!==c?(m=v=>{const y=li(v,f);c(y)},e[8]=f,e[9]=c,e[10]=m):m=e[10];const h=m;let p;e[11]!==u||e[12]!==c?(p=v=>{const y=li(u,v);c(y)},e[11]=u,e[12]=c,e[13]=p):p=e[13];const g=p;let x;return e[14]!==u||e[15]!==f||e[16]!==h||e[17]!==g||e[18]!==c||e[19]!==a?(x={hours:u,minutes:f,setHours:h,setMinutes:g,timeValue:a,setTimeValue:c},e[14]=u,e[15]=f,e[16]=h,e[17]=g,e[18]=c,e[19]=a,e[20]=x):x=e[20],x},N0=t=>{const e=T.compilerRuntimeExports.c(39);let n,r,s,o,i,l,a,c,d,u;e[0]!==t?({children:n,className:r,defaultValue:d,disabled:o,error:l,onChange:a,required:c,validationMessage:s,value:u,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10]);const f=d===void 0?"":d,m=Ze(),h=o??m?.disabled??!1,p=l??!!m?.error,g=c??m?.required??!1;let x;e[11]!==f||e[12]!==a||e[13]!==u?(x={value:u,defaultValue:f,onChange:a},e[11]=f,e[12]=a,e[13]=u,e[14]=x):x=e[14];const{hours:v,minutes:y,setHours:w,setMinutes:C}=R0(x),[O,S]=k.useState(s??""),[E,R]=k.useState(!!s),N=m?.id;let j;e[15]!==p||e[16]!==h||e[17]!==g||e[18]!==E||e[19]!==N||e[20]!==O?(j={disabled:h,error:p,id:N,required:g,setShowValidation:R,setValidationMessage:S,showValidation:E,validationMessage:O},e[15]=p,e[16]=h,e[17]=g,e[18]=E,e[19]=N,e[20]=O,e[21]=j):j=e[21];let D;e[22]!==v||e[23]!==y||e[24]!==w||e[25]!==C?(D={hours:v,minutes:y,setHours:w,setMinutes:C},e[22]=v,e[23]=y,e[24]=w,e[25]=C,e[26]=D):D=e[26];let P;e[27]!==r?(P=L("w-fit",r),e[27]=r,e[28]=P):P=e[28];let M;e[29]!==n||e[30]!==i||e[31]!==P?(M=b.jsx(kr,{className:P,...i,children:n}),e[29]=n,e[30]=i,e[31]=P,e[32]=M):M=e[32];let z;e[33]!==D||e[34]!==M?(z=b.jsx(Aa.Provider,{value:D,children:M}),e[33]=D,e[34]=M,e[35]=z):z=e[35];let A;return e[36]!==j||e[37]!==z?(A=b.jsx(Tn.Provider,{value:j,children:z}),e[36]=j,e[37]=z,e[38]=A):A=e[38],A},j0=()=>{const t=k.useContext(Aa);if(!t)throw new Error("useTimeContext must be used within a TimeInput component");return t},ai=["w-8 min-w-8 text-center","[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"],D0=()=>{const t=T.compilerRuntimeExports.c(24),{hours:e,minutes:n,setHours:r,setMinutes:s}=j0(),{disabled:o}=an(),i=k.useRef(null),l=k.useRef(null);let a;t[0]!==r?(a=S=>{const E=S.target.value;(E===""||/^\d{1,2}$/.test(E)&&Number.parseInt(E,10)<=23)&&r(E)},t[0]=r,t[1]=a):a=t[1];const c=a;let d;t[2]!==s?(d=S=>{const E=S.target.value;(E===""||/^\d{1,2}$/.test(E)&&Number.parseInt(E,10)<=59)&&s(E)},t[2]=s,t[3]=d):d=t[3];const u=d;let f;t[4]===Symbol.for("react.memo_cache_sentinel")?(f=S=>{(S.key==="Tab"||S.key==="Enter"||S.key===":")&&(S.preventDefault(),l.current?.focus())},t[4]=f):f=t[4];const m=f;let h;t[5]!==n?(h=S=>{S.key==="Backspace"&&n===""&&i.current?.focus()},t[5]=n,t[6]=h):h=t[6];const p=h;let g;t[7]===Symbol.for("react.memo_cache_sentinel")?(g=L(ai),t[7]=g):g=t[7];let x;t[8]!==c||t[9]!==e?(x=b.jsx(zt,{autoComplete:"off",className:g,max:"23",min:"0",placeholder:"hh",ref:i,type:"number",value:e,onChange:c,onKeyDown:m}),t[8]=c,t[9]=e,t[10]=x):x=t[10];let v;t[11]!==o?(v=L("text-muted-foreground",{"opacity-50":o}),t[11]=o,t[12]=v):v=t[12];let y;t[13]!==v?(y=b.jsx("span",{className:v,children:":"}),t[13]=v,t[14]=y):y=t[14];let w;t[15]===Symbol.for("react.memo_cache_sentinel")?(w=L(ai),t[15]=w):w=t[15];let C;t[16]!==u||t[17]!==p||t[18]!==n?(C=b.jsx(zt,{autoComplete:"off",className:w,max:"59",min:"0",placeholder:"mm",ref:l,type:"number",value:n,onChange:u,onKeyDown:p}),t[16]=u,t[17]=p,t[18]=n,t[19]=C):C=t[19];let O;return t[20]!==x||t[21]!==y||t[22]!==C?(O=b.jsxs("div",{className:"flex items-center gap-1 bg-transparent font-mono","data-ox-slot":"input-time",children:[x,y,C]}),t[20]=x,t[21]=y,t[22]=C,t[23]=O):O=t[23],O},P0=Object.assign(D0,{Button:S0,Container:N0}),_a=k.createContext(void 0),T0=t=>{const e=T.compilerRuntimeExports.c(31);let n,r,s,o,i,l,a,c,d,u;e[0]!==t?({children:n,className:r,defaultValue:o,disabled:i,error:a,name:c,onChange:d,required:u,value:s,...l}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10]);const f=Ze(),m=i??f?.disabled??!1,h=a??!!f?.error,p=u??f?.required??!1,[g,x]=k.useState(o),v=s!==void 0,y=v?s:g;let w;e[11]!==v||e[12]!==d?(w=j=>{v||x(j),d?.(j)},e[11]=v,e[12]=d,e[13]=w):w=e[13];const C=w;let O;e[14]!==y||e[15]!==C||e[16]!==m||e[17]!==c?(O={value:y,onChange:C,name:c,disabled:m},e[14]=y,e[15]=C,e[16]=m,e[17]=c,e[18]=O):O=e[18];const S=f?.labelId;let E;e[19]!==r?(E=L("space-y-2",r),e[19]=r,e[20]=E):E=e[20];let R;e[21]!==n||e[22]!==l||e[23]!==h||e[24]!==p||e[25]!==S||e[26]!==E?(R=b.jsx("div",{"aria-invalid":h,"aria-labelledby":S,"aria-required":p,className:E,"data-ox-slot":"radio-group",role:"radiogroup",...l,children:n}),e[21]=n,e[22]=l,e[23]=h,e[24]=p,e[25]=S,e[26]=E,e[27]=R):R=e[27];let N;return e[28]!==O||e[29]!==R?(N=b.jsx(_a.Provider,{value:O,children:R}),e[28]=O,e[29]=R,e[30]=N):N=e[30],N},M0=()=>{const t=k.useContext(_a);if(!t)throw new Error("OxRadio must be used within OxRadioGroup");return t},I0=t=>{const e=T.compilerRuntimeExports.c(32);let n,r,s,o,i,l,a,c;e[0]!==t?({className:n,disabled:o,error:a,id:l,name:i,onChange:s,value:c,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=a===void 0?!1:a,u=k.useId(),f=M0();if(!f)throw new Error("RadioGroupItem must be used within RadioGroup");const m=l||u,h=o??f.disabled??!1,p=i??f.name,g=f.value===c;let x;e[9]!==f||e[10]!==s||e[11]!==c?(x=N=>{s?.(N),c!==void 0&&f.onChange?.(c)},e[9]=f,e[10]=s,e[11]=c,e[12]=x):x=e[12];const v=x;let y;e[13]!==h||e[14]!==g?(y=()=>h?"disabled":g?"checked":"unchecked",e[13]=h,e[14]=g,e[15]=y):y=e[15];const w=y;let C;e[16]!==n||e[17]!==d?(C=L("peer aspect-square size-4 shrink-0 cursor-pointer appearance-none rounded-full border border-input text-primary shadow-xs","dark:bg-input/30","transition-[color,box-shadow] outline-none","ox-focus-ring","aria-disabled:ox-default-disabled",{"border-destructive":d},n),e[16]=n,e[17]=d,e[18]=C):C=e[18];const O=w();let S;e[19]!==h||e[20]!==r||e[21]!==v||e[22]!==m||e[23]!==g||e[24]!==p||e[25]!==C||e[26]!==O||e[27]!==c?(S=b.jsx("input",{id:m,"aria-checked":g,"aria-disabled":h,className:C,disabled:h,name:p,type:"radio",value:c,onChange:v,...r,checked:g,"data-ox-slot":"radio","data-ox-state":O}),e[19]=h,e[20]=r,e[21]=v,e[22]=m,e[23]=g,e[24]=p,e[25]=C,e[26]=O,e[27]=c,e[28]=S):S=e[28];let E;e[29]===Symbol.for("react.memo_cache_sentinel")?(E=b.jsx("div",{className:"pointer-events-none absolute inset-0 m-auto size-2 rounded-full bg-primary opacity-0 peer-checked:opacity-100"}),e[29]=E):E=e[29];let R;return e[30]!==S?(R=b.jsxs("div",{className:"relative inline-flex shrink-0",children:[S,E]}),e[30]=S,e[31]=R):R=e[31],R},A0={Group:T0,Item:I0},$a=k.createContext(void 0),Us=()=>{const t=k.useContext($a);if(!t)throw new Error("Select components must be used within an OxSelect");return t},La=t=>{const e=T.compilerRuntimeExports.c(38);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,{close:a,multiple:c,onSelect:d,selectedValue:u}=Us();let f;e[6]!==n||e[7]!==a||e[8]!==c||e[9]!==d||e[10]!==i?(f=()=>{d({label:n,value:i}),c||a()},e[6]=n,e[7]=a,e[8]=c,e[9]=d,e[10]=i,e[11]=f):f=e[11];const m=f;let h;e[12]!==a||e[13]!==m?(h=E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),m()),E.key==="Escape"&&a()},e[12]=a,e[13]=m,e[14]=h):h=e[14];const p=h;let g,x,v,y;e[15]!==r||e[16]!==u||e[17]!==i?(g=u.includes(i),y="none",x=g,v=L("relative flex w-full items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-start text-popover-foreground","ox-focus-ring enabled:cursor-pointer enabled:hover:bg-neutral-accent enabled:hover:text-neutral-accent-foreground","disabled:ox-default-disabled","[&_svg]:pointer-events-none [&_svg]:shrink-0",{"bg-neutral-accent text-neutral-accent-foreground":g},r),e[15]=r,e[16]=u,e[17]=i,e[18]=g,e[19]=x,e[20]=v,e[21]=y):(g=e[18],x=e[19],v=e[20],y=e[21]);const w=l?-1:0;let C;e[22]!==l||e[23]!==g?(C=g&&!l?b.jsx(ue,{className:"absolute right-2 text-primary","data-ox-slot":"select-check-icon",icon:le.Check}):null,e[22]=l,e[23]=g,e[24]=C):C=e[24];let O;e[25]!==n||e[26]!==l||e[27]!==s||e[28]!==m||e[29]!==p||e[30]!==x||e[31]!==v||e[32]!==w||e[33]!==C?(O=b.jsxs("button",{"aria-selected":x,className:v,disabled:l,role:"option",tabIndex:w,type:"button",onClick:m,onKeyDown:p,...s,"data-ox-slot":"select-item",children:[n,C]}),e[25]=n,e[26]=l,e[27]=s,e[28]=m,e[29]=p,e[30]=x,e[31]=v,e[32]=w,e[33]=C,e[34]=O):O=e[34];let S;return e[35]!==y||e[36]!==O?(S=b.jsx("li",{role:y,children:O}),e[35]=y,e[36]=O,e[37]=S):S=e[37],S},_0=t=>{const e=[];return k.Children.forEach(t,n=>{(typeof n=="string"||typeof n=="number")&&e.push(n)}),e.length>0?e.join(""):t},$0=t=>{const e=new Map,n=r=>{if(!k.isValidElement(r))return;if(r.type===La||us(r,"select-item")){const{children:i,value:l}=r.props,a=_0(i);e.set(l,a);return}const s=r.props,{children:o}=s;o&&k.Children.forEach(o,n)};for(const r of t)n(r);return e},za=t=>{const e=T.compilerRuntimeExports.c(19);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{buttonRef:o,isClosing:i,isVisible:l,multiple:a,selectId:c}=Us(),d=k.useRef(null);let u,f;if(e[4]!==o||e[5]!==l?(u=()=>{if(l&&o.current&&d.current){const v=o.current.offsetWidth;d.current.style.width=`${v}px`}},f=[o,l],e[4]=o,e[5]=l,e[6]=u,e[7]=f):(u=e[6],f=e[7]),k.useLayoutEffect(u,f),!l)return null;const m=i?"closing":"open",h=`${c}-listbox`;let p;e[8]!==r?(p=L("flex max-h-72 flex-col gap-y-0.5 overflow-x-hidden overflow-y-auto",r),e[8]=r,e[9]=p):p=e[9];let g;e[10]!==n||e[11]!==s||e[12]!==a||e[13]!==h||e[14]!==p?(g=b.jsx("ul",{id:h,"aria-multiselectable":a,className:p,role:"listbox",...s,"data-ox-slot":"select-content",children:n}),e[10]=n,e[11]=s,e[12]=a,e[13]=h,e[14]=p,e[15]=g):g=e[15];let x;return e[16]!==m||e[17]!==g?(x=b.jsx(ke.Content,{align:"start",className:'z-50 ox-select-animate rounded-lg border border-border bg-popover p-1 text-sm text-popover-foreground shadow-md [&_svg:not([class*="size-"])]:size-4',"data-ox-state":m,ref:d,side:"bottom",sideOffset:8,children:g}),e[16]=m,e[17]=g,e[18]=x):x=e[18],x},ci=t=>t==null?[]:Array.isArray(t)?t:[t],L0=t=>{const e=T.compilerRuntimeExports.c(71),{children:n,className:r,defaultOpen:s,defaultValue:o,disabled:i,error:l,id:a,isLoading:c,multiple:d,onChange:u,onOpenChange:f,open:m,required:h,value:p}=t,g=s===void 0?!1:s,x=o===void 0?null:o,v=c===void 0?!1:c,y=d===void 0?!1:d,w=Ze(),C=k.useId(),O=k.useRef(null),{checkOverflow:S,handleResize:E,overflowAmount:R}=T.useOverflowDetection(),N=i??w?.disabled??!1,j=l??!!w?.error,D=h??w?.required??!1,P=a??w?.id??C;let M;e[0]!==m||e[1]!==g||e[2]!==N||e[3]!==f?(M={closeOnEscape:!0,closeOnOutsideClick:!0,defaultOpen:g,disabled:N,onOpenChange:f,open:m},e[0]=m,e[1]=g,e[2]=N,e[3]=f,e[4]=M):M=e[4];const{close:z,containerRef:A,isClosing:$,isVisible:I,open:V,toggle:_}=T.usePopperState(M);let F;if(e[5]!==n){e:{const oe=k.Children.toArray(n).find(z0);if(!oe||!k.isValidElement(oe)){let Se;e[7]===Symbol.for("react.memo_cache_sentinel")?(Se=new Map,e[7]=Se):Se=e[7],F=Se;break e}const me=k.Children.toArray(oe.props.children||[]);F=$0(me)}e[5]=n,e[6]=F}else F=e[6];const W=F;let B;e[8]!==x?(B=new Set(ci(x)),e[8]=x,e[9]=B):B=e[9];let H;e[10]!==y||e[11]!==u?(H=oe=>{if(!oe)return;let me;y?me=[...oe]:oe.size>0?me=[...oe][0]:me=null,u?.(me)},e[10]=y,e[11]=u,e[12]=H):H=e[12];let G;e[13]!==p?(G=p!==void 0?new Set(ci(p)):void 0,e[13]=p,e[14]=G):G=e[14];let K;e[15]!==B||e[16]!==H||e[17]!==G?(K={defaultValue:B,name:"OxSelect",onChange:H,value:G},e[15]=B,e[16]=H,e[17]=G,e[18]=K):K=e[18];const[Y,Q]=T.useControllableState(K);let X;e[19]!==W||e[20]!==Y?(X=[...Y??new Set].filter(oe=>oe===""?W.has(""):!0).map(oe=>({label:W.get(oe)??oe,value:oe})),e[19]=W,e[20]=Y,e[21]=X):X=e[21];const U=X;let J;e[22]!==S?(J=()=>{S()},e[22]=S,e[23]=J):J=e[23];let q;if(e[24]!==S||e[25]!==Y?(q=[Y,S],e[24]=S,e[25]=Y,e[26]=q):q=e[26],k.useLayoutEffect(J,q),v){let oe;e[27]!==r?(oe=L("flex w-full flex-col",r),e[27]=r,e[28]=oe):oe=e[28];const me=!j;let Se;e[29]!==j||e[30]!==me?(Se=L("h-9 w-full rounded-lg border",{"border-destructive":j,"border-input":me}),e[29]=j,e[30]=me,e[31]=Se):Se=e[31];let Ee;e[32]!==Se?(Ee=b.jsx(Vt,{className:Se}),e[32]=Se,e[33]=Ee):Ee=e[33];let He;return e[34]!==oe||e[35]!==Ee?(He=b.jsx("div",{className:oe,children:Ee}),e[34]=oe,e[35]=Ee,e[36]=He):He=e[36],He}let se;e[37]!==y||e[38]!==Q?(se=oe=>{const{value:me}=oe;Q(Se=>{const Ee=new Set(Se);return y?Ee.has(me)?Ee.delete(me):Ee.add(me):(Ee.clear(),Ee.add(me)),Ee})},e[37]=y,e[38]=Q,e[39]=se):se=e[39];const ee=se;let te;e[40]!==Y?(te=Y??new Set,e[40]=Y,e[41]=te):te=e[41];let ae;e[42]!==te?(ae=[...te],e[42]=te,e[43]=ae):ae=e[43];let de;e[44]!==z||e[45]!==E||e[46]!==j||e[47]!==P||e[48]!==$||e[49]!==N||e[50]!==D||e[51]!==I||e[52]!==y||e[53]!==ee||e[54]!==V||e[55]!==R||e[56]!==U||e[57]!==ae||e[58]!==_?(de={buttonRef:O,close:z,disabled:N,error:j,handleResize:E,isClosing:$,isVisible:I,multiple:y,onSelect:ee,open:V,overflowAmount:R,required:D,selectedOptions:U,selectedValue:ae,selectId:P,toggle:_},e[44]=z,e[45]=E,e[46]=j,e[47]=P,e[48]=$,e[49]=N,e[50]=D,e[51]=I,e[52]=y,e[53]=ee,e[54]=V,e[55]=R,e[56]=U,e[57]=ae,e[58]=_,e[59]=de):de=e[59];let fe;e[60]!==r?(fe=L('flex w-full flex-col text-sm [&_svg:not([class*="size-"])]:size-4',r),e[60]=r,e[61]=fe):fe=e[61];let ge;e[62]!==n?(ge=b.jsx(ke,{children:n}),e[62]=n,e[63]=ge):ge=e[63];let Z;e[64]!==A||e[65]!==fe||e[66]!==ge?(Z=b.jsx("div",{className:fe,ref:A,children:ge}),e[64]=A,e[65]=fe,e[66]=ge,e[67]=Z):Z=e[67];let ie;return e[68]!==de||e[69]!==Z?(ie=b.jsx($a.Provider,{value:de,children:Z}),e[68]=de,e[69]=Z,e[70]=ie):ie=e[70],ie};function z0(t){return k.isValidElement(t)&&(t.type===za||us(t,"select-content"))}const F0=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,label:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);let i;e[5]!==r||e[6]!==o?(i=o?b.jsx("div",{className:L("px-2 py-1.5 text-xs font-semibold text-muted-foreground",r),children:o}):null,e[5]=r,e[6]=o,e[7]=i):i=e[7];let l;return e[8]!==n||e[9]!==s||e[10]!==i?(l=b.jsxs("div",{role:"group",...s,"data-ox-slot":"select-group",children:[i,n]}),e[8]=n,e[9]=s,e[10]=i,e[11]=l):l=e[11],l},V0=t=>{const e=T.compilerRuntimeExports.c(41);let n,r,s,o,i,l;e[0]!==t?({className:n,disabled:s,displayAsTag:o,placeholder:i,tagColor:l,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6]);const a=o===void 0?!1:o,c=i===void 0?"Select an option":i,d=l===void 0?"purple":l,{buttonRef:u,disabled:f,error:m,handleResize:h,multiple:p,open:g,overflowAmount:x,required:v,selectId:y,selectedOptions:w,toggle:C}=Us(),O=x>0,S=s??f,E=`${y}-listbox`;let R;e[7]!==c||e[8]!==w?(R=w.length>0?`Selected: ${w.map(B0).join(", ")}`:c,e[7]=c,e[8]=w,e[9]=R):R=e[9];let N;e[10]!==n?(N=L("flex h-9 w-full items-center gap-x-2 rounded-lg border border-input bg-transparent px-3 py-2 text-left text-sm enabled:cursor-pointer","dark:bg-input/30 dark:enabled:hover:bg-input/50","ox-focus-ring focus-visible:border-ring","disabled:cursor-not-allowed disabled:opacity-50","shadow-xs transition-[color,box-shadow]","[&>span:empty]:text-muted-foreground","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[10]=n,e[11]=N):N=e[11];const j=g?"open":"closed";let D;e[12]!==a||e[13]!==h||e[14]!==S||e[15]!==p||e[16]!==x||e[17]!==c||e[18]!==w||e[19]!==O||e[20]!==d?(D=w.length>0?b.jsxs("div",{className:L("flex min-w-0 flex-1 items-center overflow-hidden","**:data-[ox-slot=icon]:hidden",{"opacity-50":S&&a}),children:[b.jsx("div",{className:L("truncate",{"flex gap-1":a&&p}),ref:h,children:a&&p?w.map(A=>b.jsx(Jr,{color:d,"data-ox-state":"selected",children:A.label},String(A.value))):w.map((A,$,I)=>{const V=I.length-x,_=$===V-1;return b.jsxs("span",{"data-ox-state":"selected",children:[A.label,$<I.length-1&&!_&&", "]},String(A.value))})}),O&&p?b.jsxs(Jr,{className:"ml-1",color:d,children:["+",x]}):null]}):b.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),e[12]=a,e[13]=h,e[14]=S,e[15]=p,e[16]=x,e[17]=c,e[18]=w,e[19]=O,e[20]=d,e[21]=D):D=e[21];let P;e[22]!==g?(P=L("shrink-0 text-muted-foreground opacity-50 transition-transform duration-300 ease-in-out",{"rotate-180":g}),e[22]=g,e[23]=P):P=e[23];let M;e[24]!==P?(M=b.jsx(ue,{className:P,icon:le.ChevronDown}),e[24]=P,e[25]=M):M=e[25];let z;return e[26]!==u||e[27]!==r||e[28]!==m||e[29]!==S||e[30]!==g||e[31]!==v||e[32]!==y||e[33]!==M||e[34]!==E||e[35]!==R||e[36]!==N||e[37]!==j||e[38]!==D||e[39]!==C?(z=b.jsx(ke.Anchor,{asChild:!0,children:b.jsxs("button",{id:y,"aria-controls":E,"aria-disabled":S,"aria-expanded":g,"aria-haspopup":"listbox","aria-invalid":m,"aria-label":R,"aria-required":v,className:N,disabled:S,ref:u,role:"combobox",type:"button",onClick:C,...r,"data-ox-slot":"select-trigger","data-ox-state":j,children:[D,M]})}),e[26]=u,e[27]=r,e[28]=m,e[29]=S,e[30]=g,e[31]=v,e[32]=y,e[33]=M,e[34]=E,e[35]=R,e[36]=N,e[37]=j,e[38]=D,e[39]=C,e[40]=z):z=e[40],z};function B0(t){return t.label}const W0=Object.assign(L0,{Content:za,Group:F0,Item:La,Trigger:V0}),H0=t=>{const e=T.compilerRuntimeExports.c(28);let n,r,s,o,i,l,a,c;e[0]!==t?({checked:c,className:n,disabled:r,error:o,id:l,onChange:i,required:a,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8]);const d=c===void 0?!1:c,u=Ze(),f=k.useId(),m=r??u?.disabled??!1,h=o??!!u?.error,p=a??u?.required??!1,g=l??u?.id??f;let x;e[9]!==d||e[10]!==i?(x=()=>{i?.(!d)},e[9]=d,e[10]=i,e[11]=x):x=e[11];const v=x,y=d?"checked":"unchecked",w=h||void 0;let C;e[12]!==n?(C=L("peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs","transition-all outline-none","data-[state=checked]:bg-primary data-[state=unchecked]:bg-input","dark:data-[state=unchecked]:bg-input/80","ox-focus-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive",n),e[12]=n,e[13]=C):C=e[13];let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O=L("pointer-events-none block size-4 rounded-full ring-0 transition-transform","bg-background","dark:data-[state=unchecked]:bg-foreground","dark:data-[state=checked]:bg-primary-foreground","data-[state=checked]:translate-x-[calc(100%-2px)]","data-[state=unchecked]:translate-x-0"),e[14]=O):O=e[14];let S;e[15]!==y?(S=b.jsx("span",{className:O,"data-state":y}),e[15]=y,e[16]=S):S=e[16];let E;return e[17]!==d||e[18]!==y||e[19]!==s||e[20]!==v||e[21]!==g||e[22]!==m||e[23]!==p||e[24]!==w||e[25]!==C||e[26]!==S?(E=b.jsx("button",{id:g,"aria-checked":d,"aria-disabled":m,"aria-invalid":w,"aria-required":p,className:C,"data-ox-slot":"switch","data-state":y,disabled:m,role:"switch",type:"button",onClick:v,...s,children:S}),e[17]=d,e[18]=y,e[19]=s,e[20]=v,e[21]=g,e[22]=m,e[23]=p,e[24]=w,e[25]=C,e[26]=S,e[27]=E):E=e[27],E},Y0=t=>{const e=T.compilerRuntimeExports.c(38);let n,r,s,o,i,l,a,c,d,u,f,m;e[0]!==t?({className:n,disabled:r,error:o,id:a,name:i,onChange:l,placeholder:d,required:c,rows:u,showMaxLength:f,value:m,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u,e[11]=f,e[12]=m):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10],f=e[11],m=e[12]);const h=d===void 0?"Enter text...":d,p=u===void 0?3:u,g=f===void 0?!1:f,x=Ze(),v=k.useId(),[y,w]=k.useState(0),C=r??x?.disabled??!1,O=o??!!x?.error,S=c??x?.required??!1,R=`${a??x?.id??v}-textarea`,N=s.maxLength,j=m!==void 0;let D;j?D=typeof m=="string"?m.length:0:D=y;let P;e[13]!==j||e[14]!==l?(P=V=>{j||w(V.target.value.length),l?.(V)},e[13]=j,e[14]=l,e[15]=P):P=e[15];const M=P;let z;e[16]!==n?(z=L("flex field-sizing-content min-h-16 w-full","rounded-lg border border-input bg-transparent px-3 py-2 shadow-xs","text-base placeholder:text-muted-foreground sm:text-sm","transition-[color,box-shadow] outline-none","ox-focus-ring","aria-disabled:ox-default-disabled","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",n),e[16]=n,e[17]=z):z=e[17];let A;e[18]!==s||e[19]!==M||e[20]!==O||e[21]!==C||e[22]!==S||e[23]!==i||e[24]!==h||e[25]!==p||e[26]!==z||e[27]!==R||e[28]!==m?(A=b.jsx("textarea",{id:R,"aria-invalid":O,"aria-required":S,className:z,"data-ox-slot":"textarea",disabled:C,name:i,placeholder:h,required:S,rows:p,value:m,onChange:M,...s}),e[18]=s,e[19]=M,e[20]=O,e[21]=C,e[22]=S,e[23]=i,e[24]=h,e[25]=p,e[26]=z,e[27]=R,e[28]=m,e[29]=A):A=e[29];let $;e[30]!==D||e[31]!==C||e[32]!==N||e[33]!==g?($=g&&typeof N=="number"?b.jsxs("div",{className:L("mt-1 text-right font-mono text-xs text-muted-foreground tabular-nums",{"opacity-50":C}),"data-ox-slot":"input-counter",children:[D,"/",N]}):null,e[30]=D,e[31]=C,e[32]=N,e[33]=g,e[34]=$):$=e[34];let I;return e[35]!==A||e[36]!==$?(I=b.jsxs("div",{className:"flex w-full flex-col",children:[A,$]}),e[35]=A,e[36]=$,e[37]=I):I=e[37],I},q0=t=>{const e=T.compilerRuntimeExports.c(64);let n,r,s,o;e[0]!==t?({children:n,className:r,rowId:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const i=Ws(),{isHeader:l}=vb();let a;e[5]!==i?(a=i??{},e[5]=i,e[6]=a):a=e[6];const{draggable:c,registerRowId:d,unregisterRowId:u}=a;let f,m;e[7]!==c||e[8]!==d||e[9]!==o||e[10]!==u?(f=()=>{if(o&&c)return d?.(o),()=>u?.(o)},m=[o,c,d,u],e[7]=c,e[8]=d,e[9]=o,e[10]=u,e[11]=f,e[12]=m):(f=e[11],m=e[12]),k.useEffect(f,m);const h=!i?.draggable||!o||l,p=o??"";let g;e[13]!==h||e[14]!==p?(g={disabled:h,id:p},e[13]=h,e[14]=p,e[15]=g):g=e[15];const{attributes:x,isDragging:v,listeners:y,setNodeRef:w,transform:C,transition:O}=zs(g);let S;e[16]!==C?(S=at.Transform.toString(C),e[16]=C,e[17]=S):S=e[17];let E;e[18]!==S||e[19]!==O?(E={transform:S,transition:O},e[18]=S,e[19]=O,e[20]=E):E=e[20];const R=E;let N;e[21]!==i||e[22]!==o?(N=()=>{o&&i?.selectable&&i.toggleSelection(o)},e[21]=i,e[22]=o,e[23]=N):N=e[23];const j=N;let D;e[24]!==i?(D=()=>{i?.toggleAll()},e[24]=i,e[25]=D):D=e[25];const P=D;let M,z,A;if(e[26]!==x||e[27]!==r||e[28]!==i||e[29]!==P||e[30]!==j||e[31]!==v||e[32]!==l||e[33]!==y||e[34]!==o){const W=o&&i?.isSelected(o),B=l?"th":"td";let H;e[38]!==B||e[39]!==x||e[40]!==i?.draggable||e[41]!==l||e[42]!==y||e[43]!==o?(H=()=>i?.draggable?l?b.jsx(B,{className:"h-10 w-12 px-3",children:b.jsx("span",{className:"sr-only",children:"Reorder"})}):o?b.jsx(B,{className:"px-3 py-2",children:b.jsx("button",{"aria-label":"Drag to reorder",className:"flex cursor-grab touch-none items-center justify-center",type:"button",...x,...y,children:b.jsx(le.GripVertical,{className:"size-4 text-muted-foreground"})})}):b.jsx(B,{className:"px-3 py-2"}):null,e[38]=B,e[39]=x,e[40]=i?.draggable,e[41]=l,e[42]=y,e[43]=o,e[44]=H):H=e[44],M=H;let G;e[45]!==B||e[46]!==i||e[47]!==P||e[48]!==j||e[49]!==l||e[50]!==o?(G=()=>i?.selectable?l?b.jsx(B,{className:"h-10 w-12 px-3",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(as,{"aria-label":"Select all rows",checked:i.isIndeterminate?"indeterminate":i.isAllSelected,onCheckedChange:P})})}):o?b.jsx(B,{className:"px-3 py-2",children:b.jsx("div",{className:"flex items-center justify-center",children:b.jsx(as,{"aria-label":`Select row ${o}`,checked:i.isSelected(o),onCheckedChange:j})})}):b.jsx(B,{className:"px-3 py-2"}):null,e[45]=B,e[46]=i,e[47]=P,e[48]=j,e[49]=l,e[50]=o,e[51]=G):G=e[51],z=G,A=L("border-b transition-colors",{"hover:bg-muted/50":!l},{"bg-muted":i?.selectable&&W},{"opacity-50":v},r),e[26]=x,e[27]=r,e[28]=i,e[29]=P,e[30]=j,e[31]=v,e[32]=l,e[33]=y,e[34]=o,e[35]=M,e[36]=z,e[37]=A}else M=e[35],z=e[36],A=e[37];const $=l?void 0:w,I=l?void 0:R;let V;e[52]!==M?(V=M(),e[52]=M,e[53]=V):V=e[53];let _;e[54]!==z?(_=z(),e[54]=z,e[55]=_):_=e[55];let F;return e[56]!==n||e[57]!==s||e[58]!==A||e[59]!==$||e[60]!==I||e[61]!==V||e[62]!==_?(F=b.jsxs("tr",{className:A,"data-ox-slot":"table-row",ref:$,style:I,...s,children:[V,_,n]}),e[56]=n,e[57]=s,e[58]=A,e[59]=$,e[60]=I,e[61]=V,e[62]=_,e[63]=F):F=e[63],F},G0=Object.assign(fb,{Body:pb,Cell:hb,Controls:gb,Footer:xb,Head:bb,Header:yb,Row:q0,SkeletonRow:Ra}),Fa=k.createContext(null),U0=t=>{const e=T.compilerRuntimeExports.c(24);let n,r,s,o,i,l,a;e[0]!==t?({children:n,className:r,defaultValue:s,onValueChange:i,value:a,variant:l,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7]);const c=l===void 0?"pills":l,[d,u]=k.useState(s||""),f=a!==void 0,m=f?a:d;let h;e[8]!==f||e[9]!==i?(h=C=>{f||u(C),i?.(C)},e[8]=f,e[9]=i,e[10]=h):h=e[10];const p=h;let g;e[11]!==m||e[12]!==p||e[13]!==c?(g={value:m,variant:c,onValueChange:p},e[11]=m,e[12]=p,e[13]=c,e[14]=g):g=e[14];const x=g;let v;e[15]!==r?(v=L("w-full",r),e[15]=r,e[16]=v):v=e[16];let y;e[17]!==n||e[18]!==o||e[19]!==v?(y=b.jsx("div",{className:v,...o,"data-ox-slot":"tabs",children:n}),e[17]=n,e[18]=o,e[19]=v,e[20]=y):y=e[20];let w;return e[21]!==x||e[22]!==y?(w=b.jsx(Fa.Provider,{value:x,children:y}),e[21]=x,e[22]=y,e[23]=w):w=e[23],w},Ks=()=>{const t=k.useContext(Fa);if(!t)throw new Error("Tabs components must be used within OxTabs");return t},K0=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s,o;e[0]!==t?({children:n,className:r,value:o,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o):(n=e[1],r=e[2],s=e[3],o=e[4]);const{value:i}=Ks();if(!(i===o))return null;const a=`tab-${o}`;let c;e[5]!==r?(c=L("pt-4",r),e[5]=r,e[6]=c):c=e[6];let d;return e[7]!==n||e[8]!==s||e[9]!==a||e[10]!==c?(d=b.jsx("div",{"aria-labelledby":a,className:c,role:"tabpanel",...s,"data-ox-slot":"tabs-content",children:n}),e[7]=n,e[8]=s,e[9]=a,e[10]=c,e[11]=d):d=e[11],d},X0=ot("flex",{variants:{variant:{bordered:"border-b border-border",pills:"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]"}},defaultVariants:{variant:"pills"}}),Q0=ot(["inline-flex items-center justify-center gap-1.5 text-sm font-medium whitespace-nowrap","transition-[color,box-shadow]","ox-focus-ring cursor-pointer","disabled:pointer-events-none disabled:opacity-50",'[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*="size-"])]:size-4'],{variants:{variant:{bordered:["relative rounded-t-lg border-t border-r border-l border-transparent px-4 py-2","hover:bg-muted hover:text-foreground","data-[ox-state=active]:border-border data-[ox-state=active]:text-foreground","data-[ox-state=inactive]:text-muted-foreground"],pills:["h-[calc(100%-1px)] flex-1 rounded-md border border-transparent px-2 py-1","data-[ox-state=active]:bg-input/30 data-[ox-state=active]:border-input data-[ox-state=active]:text-foreground data-[ox-state=active]:shadow-sm","data-[ox-state=inactive]:text-muted-foreground"]}},defaultVariants:{variant:"pills"}}),J0=t=>{const e=T.compilerRuntimeExports.c(12);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);const{variant:o}=Ks();let i;e[4]!==r||e[5]!==o?(i=L(X0({variant:o}),r),e[4]=r,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==n||e[8]!==s||e[9]!==i||e[10]!==o?(l=b.jsx("div",{className:i,role:"tablist",...s,"data-ox-slot":"tabs-list","data-ox-variant":o,children:n}),e[7]=n,e[8]=s,e[9]=i,e[10]=o,e[11]=l):l=e[11],l},Z0=t=>{const e=T.compilerRuntimeExports.c(25);let n,r,s,o,i;e[0]!==t?({children:n,className:r,disabled:o,value:i,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=o===void 0?!1:o,{onValueChange:a,value:c,variant:d}=Ks(),u=c===i;let f;e[6]!==l||e[7]!==a||e[8]!==i?(f=()=>{l||a(i)},e[6]=l,e[7]=a,e[8]=i,e[9]=f):f=e[9];const m=f;let h;e[10]!==m?(h=w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),m())},e[10]=m,e[11]=h):h=e[11];const p=h,g=l||void 0;let x;e[12]!==r||e[13]!==d?(x=L(Q0({variant:d}),r),e[12]=r,e[13]=d,e[14]=x):x=e[14];const v=u?"active":"inactive";let y;return e[15]!==n||e[16]!==l||e[17]!==s||e[18]!==m||e[19]!==p||e[20]!==u||e[21]!==g||e[22]!==x||e[23]!==v?(y=b.jsx("button",{"aria-disabled":g,"aria-selected":u,className:x,disabled:l,role:"tab",type:"button",onClick:m,onKeyDown:p,...s,"data-ox-slot":"tabs-trigger","data-ox-state":v,children:n}),e[15]=n,e[16]=l,e[17]=s,e[18]=m,e[19]=p,e[20]=u,e[21]=g,e[22]=x,e[23]=v,e[24]=y):y=e[24],y},e2=Object.assign(U0,{Content:K0,List:J0,Trigger:Z0}),t2=t=>{const e=T.compilerRuntimeExports.c(32);let n,r,s,o,i;e[0]!==t?({className:n,onThemeChange:o,size:i,theme:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5]);const l=i===void 0?"md":i,{setTheme:a,theme:c}=T.useOxTheme(),d=r??c,u=d==="dark";let f;e[6]!==r||e[7]!==u||e[8]!==o||e[9]!==a?(f=()=>{const E=u?"light":"dark";r===void 0&&a(E),o?.(E)},e[6]=r,e[7]=u,e[8]=o,e[9]=a,e[10]=f):f=e[10];const m=f,h=u?"Switch to light mode":"Switch to dark mode";let p;e[11]!==n||e[12]!==l?(p=L(At({variant:"ghost",size:l,iconOnly:!0}),n),e[11]=n,e[12]=l,e[13]=p):p=e[13];const g=u?"opacity-0 blur-[2px]":"blur-0 opacity-100";let x;e[14]!==g?(x=L("transition-all duration-200",g),e[14]=g,e[15]=x):x=e[15];let v;e[16]!==x?(v=b.jsx(ue,{className:x,icon:le.Sun}),e[16]=x,e[17]=v):v=e[17];const y=u?"blur-0 opacity-100":"opacity-0 blur-[2px]";let w;e[18]!==y?(w=L("absolute inset-0 transition-all duration-200",y),e[18]=y,e[19]=w):w=e[19];let C;e[20]!==w?(C=b.jsx(ue,{className:w,icon:le.Moon}),e[20]=w,e[21]=C):C=e[21];let O;e[22]!==C||e[23]!==v?(O=b.jsxs("span",{className:"relative flex items-center justify-center",children:[v,C]}),e[22]=C,e[23]=v,e[24]=O):O=e[24];let S;return e[25]!==s||e[26]!==m||e[27]!==O||e[28]!==h||e[29]!==p||e[30]!==d?(S=b.jsx("button",{"aria-label":h,className:p,type:"button",onClick:m,...s,"data-ox-slot":"theme-switcher","data-theme":d,children:O}),e[25]=s,e[26]=m,e[27]=O,e[28]=h,e[29]=p,e[30]=d,e[31]=S):S=e[31],S},n2=t=>{const e=T.compilerRuntimeExports.c(10);let n,r,s;e[0]!==t?({children:n,className:r,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let o;e[4]!==r?(o=L("grid grid-cols-[1fr_auto_1fr] items-start gap-4 text-sm",'[&_svg:not([class*="size-"])]:size-5 [&>svg]:text-current',r),e[4]=r,e[5]=o):o=e[5];let i;return e[6]!==n||e[7]!==s||e[8]!==o?(i=b.jsx("ol",{"aria-label":"Timeline",className:o,"data-ox-slot":"timeline",role:"list",...s,children:n}),e[6]=n,e[7]=s,e[8]=o,e[9]=i):i=e[9],i},r2=t=>{const e=T.compilerRuntimeExports.c(45);let n,r,s,o,i,l,a,c,d,u;e[0]!==t?({align:a,children:n,className:r,color:c,description:s,icon:i,label:l,showSeparator:d,timestamp:u,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d,e[10]=u):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9],u=e[10]);const f=a===void 0?"left":a,m=c===void 0?"purple":c,h=d===void 0?!1:d,p=n||s;let g;e[11]!==r?(g=L("col-span-3 grid grid-cols-subgrid",r),e[11]=r,e[12]=g):g=e[12];let x;e[13]!==f||e[14]!==m||e[15]!==p||e[16]!==l||e[17]!==u?(x=f==="left"&&b.jsxs("div",{className:"space-y-1 text-right",children:[b.jsx("h6",{className:L("text-sm leading-tight font-medium",We[m].text),children:l}),p&&b.jsx(Jt,{children:p}),u&&b.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),e[13]=f,e[14]=m,e[15]=p,e[16]=l,e[17]=u,e[18]=x):x=e[18];let v;e[19]!==x?(v=b.jsx("div",{children:x}),e[19]=x,e[20]=v):v=e[20];const y=i||le.Circle;let w;e[21]!==y?(w=b.jsx(ue,{icon:y}),e[21]=y,e[22]=w):w=e[22];let C;e[23]!==m||e[24]!==w?(C=b.jsx(ue.Box,{color:m,size:"lg",children:w}),e[23]=m,e[24]=w,e[25]=C):C=e[25];let O;e[26]!==h?(O=h?b.jsx(Vs,{className:"mx-auto",orientation:"vertical"}):null,e[26]=h,e[27]=O):O=e[27];let S;e[28]!==O||e[29]!==C?(S=b.jsxs("div",{className:"grid shrink-0 grid-rows-[auto_1fr] gap-4",children:[C,O]}),e[28]=O,e[29]=C,e[30]=S):S=e[30];let E;e[31]!==f||e[32]!==m||e[33]!==p||e[34]!==l||e[35]!==u?(E=f==="right"&&b.jsxs("div",{className:"space-y-1 text-left",children:[b.jsx("h6",{className:L("text-sm leading-tight font-medium",We[m].text),children:l}),p&&b.jsx(Jt,{children:p}),u&&b.jsx("span",{className:"text-xs text-muted-foreground",children:u})]}),e[31]=f,e[32]=m,e[33]=p,e[34]=l,e[35]=u,e[36]=E):E=e[36];let R;e[37]!==E?(R=b.jsx("div",{children:E}),e[37]=E,e[38]=R):R=e[38];let N;return e[39]!==o||e[40]!==S||e[41]!==R||e[42]!==g||e[43]!==v?(N=b.jsxs("li",{className:g,"data-ox-slot":"timeline-item",role:"listitem",...o,children:[v,S,R]}),e[39]=o,e[40]=S,e[41]=R,e[42]=g,e[43]=v,e[44]=N):N=e[44],N},s2=Object.assign(n2,{Item:r2}),Va=k.createContext(null),o2=t=>{const e=T.compilerRuntimeExports.c(15),{align:n,children:r,maxToasts:s,position:o}=t,i=n===void 0?"right":n,l=s===void 0?3:s,a=o===void 0?"top":o;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[d,u]=k.useState(c);let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=O=>{u(S=>S.map(E=>E.id===O?{...E,isRemoving:!0}:E)),setTimeout(()=>{u(S=>T.reject(S,E=>E.id===O))},200)},e[1]=f):f=e[1];const m=f;let h;e[2]!==l?(h=(O,S,E,R)=>{const N=T.uniqueId(),j=E?.duration??5e3,D={id:N,title:O,type:S,duration:j,description:E?.description,icon:E?.icon,color:E?.color,customContent:R};return u(P=>T.take([D,...P],l)),j>0&&setTimeout(()=>{m(N)},j),N},e[2]=l,e[3]=h):h=e[3];const p=h;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=O=>{O?m(O):u([])},e[4]=g):g=e[4];const x=g;let v;e[5]!==p?(v=Object.assign((O,S)=>p(O,"default",S),{success:(O,S)=>p(O,"success",S),destructive:(O,S)=>p(O,"destructive",S),warning:(O,S)=>p(O,"warning",S),info:(O,S)=>p(O,"info",S),custom:(O,S)=>p("","default",{duration:S?.duration},O),dismiss:x}),e[5]=p,e[6]=v):v=e[6];const y=v;let w;e[7]!==i||e[8]!==a||e[9]!==d?(w=b.jsx(Ba,{align:i,position:a,toasts:d,onRemove:m}),e[7]=i,e[8]=a,e[9]=d,e[10]=w):w=e[10];let C;return e[11]!==r||e[12]!==w||e[13]!==y?(C=b.jsxs(Va.Provider,{value:y,children:[r,w]}),e[11]=r,e[12]=w,e[13]=y,e[14]=C):C=e[14],C},i2=()=>{const t=k.useContext(Va);if(!t)throw new Error("useOxToast must be used within a ToastProvider");return t},l2=t=>{const e=T.compilerRuntimeExports.c(48),{index:n,onRemove:r,position:s,toast:o}=t,i=o.icon??rt[o.type].icon,[l,a]=k.useState(!0);let c,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{const D=setTimeout(()=>a(!1),50);return()=>clearTimeout(D)},d=[],e[0]=c,e[1]=d):(c=e[0],d=e[1]),k.useEffect(c,d);const u=n*8,f=1-n*.05;let m;e[2]!==n||e[3]!==l||e[4]!==s||e[5]!==f||e[6]!==u||e[7]!==o.isRemoving?(m=()=>{const P=l?s==="top"?-16:16:0,M=o.isRemoving||l?0:1;return s==="top"?{top:`${u+P}px`,transform:`scale(${f})`,zIndex:30-n,opacity:M}:{top:`${-u+P}px`,transform:`scale(${f})`,zIndex:30-n,opacity:M}},e[2]=n,e[3]=l,e[4]=s,e[5]=f,e[6]=u,e[7]=o.isRemoving,e[8]=m):m=e[8];const h=m;if(o.customContent){let D;e[9]!==h?(D=h(),e[9]=h,e[10]=D):D=e[10];let P;e[11]!==r||e[12]!==o.id?(P=()=>r(o.id),e[11]=r,e[12]=o.id,e[13]=P):P=e[13];let M;return e[14]!==D||e[15]!==P||e[16]!==o.customContent?(M=b.jsx("div",{className:"pointer-events-auto absolute w-full cursor-pointer rounded-lg border border-border bg-card transition-all duration-300 ease-out md:w-80","data-ox-slot":"toast-item",role:"status",style:D,onClick:P,children:o.customContent}),e[14]=D,e[15]=P,e[16]=o.customContent,e[17]=M):M=e[17],M}const p=o.description?`${o.id}-desc`:void 0;let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=L("pointer-events-auto absolute","flex w-full items-center gap-3 md:w-80",'[&_svg:not([class*="size-"])]:size-5 [&>svg]:text-current',"cursor-pointer","rounded-lg border border-border bg-card p-4","transition-all duration-300 ease-out"),e[18]=g):g=e[18];const x=o.type==="destructive"||o.type==="warning"?"alert":"status";let v;e[19]!==h?(v=h(),e[19]=h,e[20]=v):v=e[20];let y;e[21]!==r||e[22]!==o.id?(y=()=>r(o.id),e[21]=r,e[22]=o.id,e[23]=y):y=e[23];let w;e[24]!==o.type?(w=b.jsxs("span",{className:"sr-only",children:[o.type," notification:"]}),e[24]=o.type,e[25]=w):w=e[25];const C=o.color??o.type;let O;e[26]!==i||e[27]!==o.path?(O=b.jsx(ue,{icon:i,path:o.path}),e[26]=i,e[27]=o.path,e[28]=O):O=e[28];let S;e[29]!==C||e[30]!==O?(S=b.jsx(ue.Box,{color:C,size:"md",children:O}),e[29]=C,e[30]=O,e[31]=S):S=e[31];let E;e[32]!==o.title?(E=b.jsx("div",{className:"text-xs font-medium text-foreground",children:o.title}),e[32]=o.title,e[33]=E):E=e[33];let R;e[34]!==o.description||e[35]!==o.id?(R=o.description?b.jsx("p",{id:`${o.id}-desc`,className:"mt-1 text-xs",children:o.description}):null,e[34]=o.description,e[35]=o.id,e[36]=R):R=e[36];let N;e[37]!==E||e[38]!==R?(N=b.jsxs("div",{className:"flex-1",children:[E,R]}),e[37]=E,e[38]=R,e[39]=N):N=e[39];let j;return e[40]!==S||e[41]!==N||e[42]!==p||e[43]!==x||e[44]!==v||e[45]!==y||e[46]!==w?(j=b.jsxs("div",{"aria-describedby":p,className:g,"data-ox-slot":"toast-item",role:x,style:v,onClick:y,children:[w,S,N]}),e[40]=S,e[41]=N,e[42]=p,e[43]=x,e[44]=v,e[45]=y,e[46]=w,e[47]=j):j=e[47],j},a2={left:"left-1/2 -translate-x-1/2 md:translate-none md:left-4",center:"left-1/2 -translate-x-1/2",right:"left-1/2 -translate-x-1/2 md:translate-none md:left-auto md:right-4"},c2={top:"top-4",bottom:"bottom-24"},Ba=t=>{const e=T.compilerRuntimeExports.c(13),{align:n,onRemove:r,position:s,toasts:o}=t,i=a2[n],l=c2[s];let a;e[0]!==i||e[1]!==l?(a=L("pointer-events-none fixed z-50 w-11/12 md:w-80",i,l),e[0]=i,e[1]=l,e[2]=a):a=e[2];let c;if(e[3]!==r||e[4]!==s||e[5]!==o){let u;e[7]!==r||e[8]!==s?(u=(f,m)=>b.jsx(l2,{index:m,position:s,toast:f,onRemove:r},f.id),e[7]=r,e[8]=s,e[9]=u):u=e[9],c=o.map(u),e[3]=r,e[4]=s,e[5]=o,e[6]=c}else c=e[6];let d;return e[10]!==a||e[11]!==c?(d=it.createPortal(b.jsx("div",{"aria-atomic":"false","aria-label":"Notifications","aria-live":"polite",className:a,"data-ox-slot":"toast-container",role:"region",children:c}),document.body),e[10]=a,e[11]=c,e[12]=d):d=e[12],d},Wa=k.createContext(null),d2=()=>k.useContext(Wa),u2=t=>{const e=T.compilerRuntimeExports.c(48);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,disabled:s,id:a,onPressedChange:i,pressed:l,size:c,value:d,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=k.useId(),f=d2(),m=a||u,h=f!==null,p=s||f?.disabled||!1,g=c||f?.size||"md";let x,v,y,w,C;if(e[10]!==p||e[11]!==g||e[12]!==n||e[13]!==r||e[14]!==f||e[15]!==m||e[16]!==h||e[17]!==i||e[18]!==l||e[19]!==d){const S=Li(n);let E;if(e[25]!==p||e[26]!==f||e[27]!==h||e[28]!==i||e[29]!==l||e[30]!==d){if(h&&d!==void 0){if(f.type==="single")E=f.value===d;else{let N;e[33]!==f.value?(N=f.value||[],e[33]=f.value,e[34]=N):N=e[34],E=N.includes(d)}let R;e[35]!==p||e[36]!==f||e[37]!==d?(R=()=>{!p&&f.onToggle&&f.onToggle(d)},e[35]=p,e[36]=f,e[37]=d,e[38]=R):R=e[38],x=R}else E=l||!1,x=()=>{!p&&i&&i(!E)};e[25]=p,e[26]=f,e[27]=h,e[28]=i,e[29]=l,e[30]=d,e[31]=x,e[32]=E}else x=e[31],E=e[32];v=m,y=p||void 0,w=E,C=L(At({size:g,variant:E?"default":"ghost",iconOnly:S}),r),e[10]=p,e[11]=g,e[12]=n,e[13]=r,e[14]=f,e[15]=m,e[16]=h,e[17]=i,e[18]=l,e[19]=d,e[20]=x,e[21]=v,e[22]=y,e[23]=w,e[24]=C}else x=e[20],v=e[21],y=e[22],w=e[23],C=e[24];let O;return e[39]!==p||e[40]!==n||e[41]!==o||e[42]!==x||e[43]!==v||e[44]!==y||e[45]!==w||e[46]!==C?(O=b.jsx("button",{id:v,"aria-disabled":y,"aria-pressed":w,className:C,disabled:p,role:"button",type:"button",onClick:x,...o,"data-ox-slot":"toggle",children:n}),e[39]=p,e[40]=n,e[41]=o,e[42]=x,e[43]=v,e[44]=y,e[45]=w,e[46]=C,e[47]=O):O=e[47],O},f2=t=>{const e=T.compilerRuntimeExports.c(30);let n,r,s,o,i,l,a,c,d;e[0]!==t?({children:n,className:r,disabled:l,name:o,onValueChange:i,size:a,type:c,value:d,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s,e[4]=o,e[5]=i,e[6]=l,e[7]=a,e[8]=c,e[9]=d):(n=e[1],r=e[2],s=e[3],o=e[4],i=e[5],l=e[6],a=e[7],c=e[8],d=e[9]);const u=l===void 0?!1:l,f=a===void 0?"md":a,m=c===void 0?"single":c;let h;e[10]!==i||e[11]!==m||e[12]!==d?(h=w=>{if(i)if(m==="single")i(d===w?"":w);else{const C=d||[],O=C.includes(w)?C.filter(S=>S!==w):[...C,w];i(O)}},e[10]=i,e[11]=m,e[12]=d,e[13]=h):h=e[13];const p=h;let g;e[14]!==u||e[15]!==p||e[16]!==o||e[17]!==f||e[18]!==m||e[19]!==d?(g={value:d,onToggle:p,size:f,name:o,disabled:u,type:m},e[14]=u,e[15]=p,e[16]=o,e[17]=f,e[18]=m,e[19]=d,e[20]=g):g=e[20];let x;e[21]!==r?(x=L("flex flex-wrap gap-2",r),e[21]=r,e[22]=x):x=e[22];let v;e[23]!==n||e[24]!==s||e[25]!==x?(v=b.jsx("div",{className:x,role:"group",...s,"data-ox-slot":"toggle-group",children:n}),e[23]=n,e[24]=s,e[25]=x,e[26]=v):v=e[26];let y;return e[27]!==g||e[28]!==v?(y=b.jsx(Wa.Provider,{value:g,children:v}),e[27]=g,e[28]=v,e[29]=y):y=e[29],y},m2=Object.assign(u2,{Group:f2}),Ha=k.createContext(null),Ya=()=>k.useContext(Ha),p2=({align:t="center",children:e,className:n,content:r,disabled:s=!1,hoverDelay:o=700,interactive:i=!1,position:l="top",trigger:a="hover"})=>{const c=Ya(),[d,u]=k.useState(!1),[f,m]=k.useState(!1),[h,p]=k.useState(!1),g=k.useRef(null),x=k.useRef(null),v=k.useRef(null),y=s?!1:d;k.useEffect(()=>(y?(v.current&&clearTimeout(v.current),p(!1),m(!0),c?.onTooltipOpen()):f&&(p(!0),c?.onTooltipClose(),v.current=setTimeout(()=>{m(!1),p(!1)},100)),()=>{v.current&&clearTimeout(v.current)}),[y,f,c]);const w=k.useCallback(()=>{x.current&&clearTimeout(x.current),g.current&&clearTimeout(g.current),g.current=null,u(!0)},[]),C=k.useCallback(()=>{g.current&&clearTimeout(g.current),x.current&&clearTimeout(x.current),g.current=null,u(!1)},[]),O=k.useCallback(()=>{if(g.current&&clearTimeout(g.current),c?.shouldSkipDelay()??!1){u(!0);return}g.current=setTimeout(()=>{u(!0),g.current=null},o)},[o,c]),S=k.useCallback(()=>{x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{u(!1),x.current=null},100)},[]),E=k.useCallback(()=>{x.current&&clearTimeout(x.current)},[]),R=k.useMemo(()=>a==="hover"?{onBlur:C,onFocus:w,onPointerEnter:O,onPointerLeave:i?S:C}:a==="click"?{onClick:()=>u(D=>!D)}:{onBlur:C,onFocus:w},[a,C,w,O,S,i]),N=k.useMemo(()=>i?{onPointerEnter:E,onPointerLeave:C}:{},[i,E,C]),j=k.isValidElement(e)?k.cloneElement(e,R):e;return b.jsxs(ke,{children:[b.jsx(ke.Anchor,{asChild:!0,children:j}),f&&b.jsxs(ke.Content,{align:t,"aria-live":"polite",className:L("ox-tooltip-animate max-w-xs rounded-md border border-border bg-popover px-3.75 py-2.5 text-xs text-popover-foreground shadow-md",n),"data-ox-state":h?"closing":"open",role:"tooltip",side:l,sideOffset:2,...N,children:[b.jsx(ke.Arrow,{}),r]})]})},h2=t=>{const e=T.compilerRuntimeExports.c(12),{children:n,skipDelayDuration:r}=t,s=r===void 0?300:r,[o,i]=k.useState(!1),l=k.useRef(0);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{i(!0)},e[0]=a):a=e[0];const c=a;let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{l.current=Date.now(),i(!1)},e[1]=d):d=e[1];const u=d;let f;e[2]!==o||e[3]!==s?(f=()=>o?!0:Date.now()-l.current<s,e[2]=o,e[3]=s,e[4]=f):f=e[4];const m=f;let h;e[5]!==o||e[6]!==m||e[7]!==s?(h={isTooltipOpen:o,onTooltipClose:u,onTooltipOpen:c,shouldSkipDelay:m,skipDelayDuration:s},e[5]=o,e[6]=m,e[7]=s,e[8]=h):h=e[8];const p=h;let g;return e[9]!==n||e[10]!==p?(g=b.jsx(Ha.Provider,{value:p,children:n}),e[9]=n,e[10]=p,e[11]=g):g=e[11],g};exports.MOBILE_BREAKPOINT=da;exports.OxAccordion=kd;exports.OxAlert=Td;exports.OxAspectRatio=zd;exports.OxAvatar=ps;exports.OxBadge=Qr;exports.OxBreadcrumb=ru;exports.OxButton=Je;exports.OxCalendar=Ji;exports.OxCard=ym;exports.OxCheckbox=as;exports.OxDateInput=Zb;exports.OxDescription=Jt;exports.OxDescriptionList=Em;exports.OxDialog=px;exports.OxDndContext=tp;exports.OxDraggable=Sl;exports.OxDrawer=nr;exports.OxDropdown=Qt;exports.OxDroppable=kl;exports.OxEndlessList=kg;exports.OxError=Oa;exports.OxFileUpload=Tb;exports.OxForm=Bb;exports.OxHeading=Ea;exports.OxHoverCard=Pg;exports.OxIcon=ue;exports.OxIcon$1=Ai;exports.OxImage=Mg;exports.OxJsonField=Ag;exports.OxKanban=rx;exports.OxLabel=Sa;exports.OxLegend=ob;exports.OxLink=ox;exports.OxMasonry=lx;exports.OxNotifications=yx;exports.OxNumberInput=l0;exports.OxOtpInput=d0;exports.OxPageOutline=Rx;exports.OxPagination=$x;exports.OxPopover=qn;exports.OxPopper=ke;exports.OxProgress=Hx;exports.OxRadio=A0;exports.OxSelect=W0;exports.OxSeparator=Vs;exports.OxSkeleton=Vt;exports.OxSlider=Gx;exports.OxSortableList=Zx;exports.OxSpinner=ys;exports.OxStatusDisplay=nb;exports.OxStepper=ub;exports.OxSwitch=H0;exports.OxTable=G0;exports.OxTabs=e2;exports.OxTag=Jr;exports.OxTextInput=E0;exports.OxTextarea=Y0;exports.OxThemeSwitcher=t2;exports.OxTimeInput=P0;exports.OxTimeline=s2;exports.OxToast=Ba;exports.OxToastProvider=o2;exports.OxToggle=m2;exports.OxTooltip=p2;exports.OxTooltipProvider=h2;exports.buildMailTo=Ka;exports.buildUrl=Ua;exports.cn=L;exports.copyToClipboard=Lc;exports.createId=Wc;exports.createSlot=dt;exports.formatBytes=Yc;exports.formatCurrency=qc;exports.formatDate=Gc;exports.formatNumber=Uc;exports.formatTimestamp=ds;exports.generateRandomString=Si;exports.handleFormErrors=Ri;exports.handleGraphQLFormErrors=Hc;exports.hasDataSlot=us;exports.parseGraphQLErrors=ki;exports.scrollToElement=Ni;exports.useDndContext=ep;exports.useOxToast=i2;exports.useOxTooltipContext=Ya;exports.usePopperContentContext=Pl;exports.usePopperContext=Ns;exports.validateEmail=td;exports.validatePhone=sd;exports.validateUrl=nd;