@collective-intelligence/external-apps-client-sdk-react 0.1.1 → 0.1.2
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.
|
@@ -45,5 +45,5 @@ var __defProp=Object.defineProperty;var __returnValue=(v)=>v;function __exportSe
|
|
|
45
45
|
`)};var d6=function(){var J2=parseInt(document.body.getAttribute(Y5)||"0",10);return isFinite(J2)?J2:0};var _J=function(){K5.useEffect(function(){return document.body.setAttribute(Y5,(d6()+1).toString()),function(){var J2=d6()-1;if(J2<=0)document.body.removeAttribute(Y5);else document.body.setAttribute(Y5,J2.toString())}},[])};var K9=function(J2){var{noRelative:Z,noImportant:Q,gapMode:q}=J2,X2=q===undefined?"margin":q;_J();var Y2=K5.useMemo(function(){return Y9(X2)},[X2]);return K5.createElement(hJ,{styles:xJ(Y2,!Z,X2,!Q?"!important":"")})};var W9=false;if(typeof window<"u")try{W5=Object.defineProperty({},"passive",{get:function(){return W9=true,true}}),window.addEventListener("test",W5,W5),window.removeEventListener("test",W5,W5)}catch(J2){W9=false}var W5;var l02=W9?{passive:false}:false;var gJ=function(J2){return J2.tagName==="TEXTAREA"};var c6=function(J2,Z){if(!(J2 instanceof Element))return false;var Q=window.getComputedStyle(J2);return Q[Z]!=="hidden"&&!(Q.overflowY===Q.overflowX&&!gJ(J2)&&Q[Z]==="visible")};var vJ=function(J2){return c6(J2,"overflowY")};var fJ=function(J2){return c6(J2,"overflowX")};var G9=function(J2,Z){var Q=Z.ownerDocument,q=Z;do{if(typeof ShadowRoot<"u"&&q instanceof ShadowRoot)q=q.host;var X2=i6(J2,q);if(X2){var Y2=l6(J2,q),K=Y2[1],W=Y2[2];if(K>W)return true}q=q.parentNode}while(q&&q!==Q.body);return false};var uJ=function(J2){var{scrollTop:Z,scrollHeight:Q,clientHeight:q}=J2;return[Z,Q,q]};var mJ=function(J2){var{scrollLeft:Z,scrollWidth:Q,clientWidth:q}=J2;return[Z,Q,q]};var i6=function(J2,Z){return J2==="v"?vJ(Z):fJ(Z)};var l6=function(J2,Z){return J2==="v"?uJ(Z):mJ(Z)};var pJ=function(J2,Z){return J2==="h"&&Z==="rtl"?-1:1};var s6=function(J2,Z,Q,q,X2){var Y2=pJ(J2,window.getComputedStyle(Z).direction),K=Y2*q,W=Q.target,z2=Z.contains(W),B=false,H=K>0,G=0,$=0;do{if(!W)break;var U2=l6(J2,W),V2=U2[0],L=U2[1],j=U2[2],T=L-j-Y2*V2;if(V2||T){if(i6(J2,W))G+=T,$+=V2}var F=W.parentNode;W=F&&F.nodeType===Node.DOCUMENT_FRAGMENT_NODE?F.host:F}while(!z2&&W!==document.body||z2&&(Z.contains(W)||Z===W));if(H&&(X2&&Math.abs(G)<1||!X2&&K>G))B=true;else if(!H&&(X2&&Math.abs($)<1||!X2&&-K>$))B=true;return B};var q1=function(J2){return"changedTouches"in J2?[J2.changedTouches[0].clientX,J2.changedTouches[0].clientY]:[0,0]};var r6=function(J2){return[J2.deltaX,J2.deltaY]};var a6=function(J2){return J2&&"current"in J2?J2.current:J2};var dJ=function(J2,Z){return J2[0]===Z[0]&&J2[1]===Z[1]};var cJ=function(J2){return`
|
|
46
46
|
.block-interactivity-`.concat(J2,` {pointer-events: none;}
|
|
47
47
|
.allow-interactivity-`).concat(J2,` {pointer-events: all;}
|
|
48
|
-
`)};var iJ=0;var G5=[];function o6(J2){var Z=p.useRef([]),Q=p.useRef([0,0]),q=p.useRef(),X2=p.useState(iJ++)[0],Y2=p.useState(k5)[0],K=p.useRef(J2);p.useEffect(function(){K.current=J2},[J2]),p.useEffect(function(){if(J2.inert){document.body.classList.add("block-interactivity-".concat(X2));var L=x6([J2.lockRef.current],(J2.shards||[]).map(a6),true).filter(Boolean);return L.forEach(function(j){return j.classList.add("allow-interactivity-".concat(X2))}),function(){document.body.classList.remove("block-interactivity-".concat(X2)),L.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(X2))})}}return},[J2.inert,J2.lockRef.current,J2.shards]);var W=p.useCallback(function(L,j){if("touches"in L&&L.touches.length===2||L.type==="wheel"&&L.ctrlKey)return!K.current.allowPinchZoom;var T=q1(L),F=Q.current,D="deltaX"in L?L.deltaX:F[0]-T[0],M2="deltaY"in L?L.deltaY:F[1]-T[1],O,I=L.target,N=Math.abs(D)>Math.abs(M2)?"h":"v";if("touches"in L&&N==="h"&&I.type==="range")return false;var b=window.getSelection(),A=b&&b.anchorNode,w=A?A===I||A.contains(I):false;if(w)return false;var g=G9(N,I);if(!g)return true;if(g)O=N;else O=N==="v"?"h":"v",g=G9(N,I);if(!g)return false;if(!q.current&&"changedTouches"in L&&(D||M2))q.current=O;if(!O)return true;var y=q.current||O;return s6(y,j,L,y==="h"?D:M2,true)},[]),z2=p.useCallback(function(L){var j=L;if(!G5.length||G5[G5.length-1]!==Y2)return;var T="deltaY"in j?r6(j):q1(j),F=Z.current.filter(function(O){return O.name===j.type&&(O.target===j.target||j.target===O.shadowParent)&&dJ(O.delta,T)})[0];if(F&&F.should){if(j.cancelable)j.preventDefault();return}if(!F){var D=(K.current.shards||[]).map(a6).filter(Boolean).filter(function(O){return O.contains(j.target)}),M2=D.length>0?W(j,D[0]):!K.current.noIsolation;if(M2){if(j.cancelable)j.preventDefault()}}},[]),B=p.useCallback(function(L,j,T,F){var D={name:L,delta:j,target:T,should:F,shadowParent:lJ(T)};Z.current.push(D),setTimeout(function(){Z.current=Z.current.filter(function(M2){return M2!==D})},1)},[]),H=p.useCallback(function(L){Q.current=q1(L),q.current=undefined},[]),G=p.useCallback(function(L){B(L.type,r6(L),L.target,W(L,J2.lockRef.current))},[]),$=p.useCallback(function(L){B(L.type,q1(L),L.target,W(L,J2.lockRef.current))},[]);p.useEffect(function(){return G5.push(Y2),J2.setCallbacks({onScrollCapture:G,onWheelCapture:G,onTouchMoveCapture:$}),document.addEventListener("wheel",z2,l02),document.addEventListener("touchmove",z2,l02),document.addEventListener("touchstart",H,l02),function(){G5=G5.filter(function(L){return L!==Y2}),document.removeEventListener("wheel",z2,l02),document.removeEventListener("touchmove",z2,l02),document.removeEventListener("touchstart",H,l02)}},[]);var{removeScrollBar:U2,inert:V2}=J2;return p.createElement(p.Fragment,null,V2?p.createElement(Y2,{styles:cJ(X2)}):null,U2?p.createElement(K9,{noRelative:J2.noRelative,gapMode:J2.gapMode}):null)}function lJ(J2){var Z=null;while(J2!==null){if(J2 instanceof ShadowRoot)Z=J2.host,J2=J2.host;J2=J2.parentNode}return Z}var n6=J9(Q1,o6);var t6=X1.forwardRef(function(J2,Z){return X1.createElement(N5,Y0({},J2,{ref:Z,sideCar:n6}))});t6.classNames=N5.classNames;var z9=t6;var sJ=Object.defineProperty;var C=(J2,Z)=>sJ(J2,"name",{value:Z,configurable:true});var $9=["Enter"," "];var rJ=["ArrowDown","PageUp","Home"];var J8=["ArrowUp","PageDown","End"];var aJ=[...rJ,...J8];var oJ={ltr:[...$9,"ArrowRight"],rtl:[...$9,"ArrowLeft"]};var nJ={ltr:["ArrowLeft"],rtl:["ArrowRight"]};var K1="Menu";var[A5,tJ,eJ]=H5(K1);var[s02,DY]=U02(K1,[eJ,v1,s1]);var W1=v1();var Z8=s1();var[Q8,C02]=s02(K1);var[JZ,b5]=s02(K1);var ZZ=C((J2)=>{let{__scopeMenu:Z,open:Q=false,children:q,dir:X2,onOpenChange:Y2,modal:K=true}=J2,W=W1(Z),[z2,B]=k2.useState(null),H=k2.useRef(false),G=e(Y2),$=V5(X2);return k2.useEffect(()=>{let U2=C(()=>{H.current=true,document.addEventListener("pointerdown",V2,{capture:true,once:true}),document.addEventListener("pointermove",V2,{capture:true,once:true})},"handleKeyDown"),V2=C(()=>H.current=false,"handlePointer");return document.addEventListener("keydown",U2,{capture:true}),()=>{document.removeEventListener("keydown",U2,{capture:true}),document.removeEventListener("pointerdown",V2,{capture:true}),document.removeEventListener("pointermove",V2,{capture:true})}},[]),k2.useEffect(()=>{if(!Q)return;let U2=C(()=>G(false),"handleBlur");return window.addEventListener("blur",U2),()=>window.removeEventListener("blur",U2)},[Q,G]),P(f1,{...W,children:P(Q8,{scope:Z,open:Q,onOpenChange:G,content:z2,onContentChange:B,children:P(JZ,{scope:Z,onClose:k2.useCallback(()=>G(false),[G]),isUsingKeyboardRef:H,dir:$,modal:K,children:q})})})},"Menu");var q8=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,...X2}=Z,Y2=W1(q);return P(G6,{...Y2,...X2,ref:Q})},"MenuAnchor"));var X8="MenuPortal";var[QZ,Y8]=s02(X8,{forceMount:undefined});var qZ=C((J2)=>{let{__scopeMenu:Z,forceMount:Q,children:q,container:X2}=J2,Y2=C02(X8,Z);return P(QZ,{scope:Z,forceMount:Q,children:P(O5,{present:Q||Y2.open,children:P(B6,{asChild:true,container:X2,children:q})})})},"MenuPortal");var T02="MenuContent";var[XZ,U9]=s02(T02);var YZ=k2.forwardRef(C(function(Z,Q){let q=Y8(T02,Z.__scopeMenu),{forceMount:X2=q.forceMount,...Y2}=Z,K=C02(T02,Z.__scopeMenu),W=b5(T02,Z.__scopeMenu);return P(A5.Provider,{scope:Z.__scopeMenu,children:P(O5,{present:X2||K.open,children:P(A5.Slot,{scope:Z.__scopeMenu,children:W.modal?P(KZ,{...Y2,ref:Q}):P(WZ,{...Y2,ref:Q})})})})},"MenuContent"));var KZ=k2.forwardRef(C(function(Z,Q){let q=C02(T02,Z.__scopeMenu),X2=k2.useRef(null),Y2=m(Q,X2);return k2.useEffect(()=>{let K=X2.current;if(K)return h6(K)},[]),P(H9,{...Z,ref:Y2,trapFocus:q.open,disableOutsidePointerEvents:q.open,disableOutsideScroll:true,onFocusOutside:x2(Z.onFocusOutside,(K)=>K.preventDefault(),{checkForDefaultPrevented:false}),onDismiss:()=>q.onOpenChange(false)})},"MenuRootContentModal"));var WZ=k2.forwardRef(C(function(Z,Q){let q=C02(T02,Z.__scopeMenu);return P(H9,{...Z,ref:Q,trapFocus:false,disableOutsidePointerEvents:false,disableOutsideScroll:false,onDismiss:()=>q.onOpenChange(false)})},"MenuRootContentNonModal"));var GZ=K0("MenuContent.ScrollLock");var H9=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,loop:X2=false,trapFocus:Y2,onOpenAutoFocus:K,onCloseAutoFocus:W,disableOutsidePointerEvents:z2,onEntryFocus:B,onEscapeKeyDown:H,onPointerDownOutside:G,onFocusOutside:$,onInteractOutside:U2,onDismiss:V2,disableOutsideScroll:L,...j}=Z,T=C02(T02,q),F=b5(T02,q),D=W1(q),M2=Z8(q),O=tJ(q),[I,N]=k2.useState(null),b=k2.useRef(null),A=m(Q,b,T.onContentChange),w=k2.useRef(0),g=k2.useRef(""),y=k2.useRef(0),S2=k2.useRef(null),_=k2.useRef("right"),d=k2.useRef(0),f2=L?z9:k2.Fragment,R=L?{as:GZ,allowPinchZoom:true}:undefined,h=C((E)=>{let A02=g.current+E,M02=O().filter((Z0)=>!Z0.disabled),S02=document.activeElement,$5=M02.find((Z0)=>Z0.ref.current===S02)?.textValue,B5=M02.map((Z0)=>Z0.textValue),y5=V8(B5,A02,$5),h02=M02.find((Z0)=>Z0.textValue===y5)?.ref.current;if(C(function Z0(r02){if(g.current=r02,window.clearTimeout(w.current),r02!=="")w.current=window.setTimeout(()=>Z0(""),1000)},"updateSearch")(A02),h02)setTimeout(()=>h02.focus())},"handleTypeaheadSearch");k2.useEffect(()=>{return()=>window.clearTimeout(w.current)},[]),x5();let u2=k2.useCallback((E)=>{return _.current===S2.current?.side&&j8(E,S2.current?.area)},[]);return P(XZ,{scope:q,searchRef:g,onItemEnter:k2.useCallback((E)=>{if(u2(E))E.preventDefault()},[u2]),onItemLeave:k2.useCallback((E)=>{if(u2(E))return;b.current?.focus(),N(null)},[u2]),onTriggerLeave:k2.useCallback((E)=>{if(u2(E))E.preventDefault()},[u2]),pointerGraceTimerRef:y,onPointerGraceIntentChange:k2.useCallback((E)=>{S2.current=E},[]),children:P(f2,{...R,children:P(o9,{asChild:true,trapped:Y2,onMountAutoFocus:x2(K,(E)=>{E.preventDefault(),b.current?.focus({preventScroll:true})}),onUnmountAutoFocus:W,children:P(c9,{asChild:true,disableOutsidePointerEvents:z2,onEscapeKeyDown:H,onPointerDownOutside:G,onFocusOutside:$,onInteractOutside:U2,onDismiss:V2,children:P(S6,{asChild:true,...M2,dir:F.dir,orientation:"vertical",loop:X2,currentTabStopId:I,onCurrentTabStopIdChange:N,onEntryFocus:x2(B,(E)=>{if(!F.isUsingKeyboardRef.current)E.preventDefault()}),preventScrollOnEntryFocus:true,children:P(z6,{role:"menu","aria-orientation":"vertical","data-state":L9(T.open),"data-radix-menu-content":"",dir:F.dir,...D,...j,ref:A,style:{outline:"none",...j.style},onKeyDown:x2(j.onKeyDown,(E)=>{let M02=E.target.closest("[data-radix-menu-content]")===E.currentTarget,S02=E.ctrlKey||E.altKey||E.metaKey,$5=E.key.length===1;if(M02){if(E.key==="Tab")E.preventDefault();if(!S02&&$5)h(E.key)}let B5=b.current;if(E.target!==B5)return;if(!aJ.includes(E.key))return;E.preventDefault();let h02=O().filter((Z0)=>!Z0.disabled).map((Z0)=>Z0.ref.current);if(J8.includes(E.key))h02.reverse();U8(h02)}),onBlur:x2(Z.onBlur,(E)=>{if(!E.currentTarget.contains(E.target))window.clearTimeout(w.current),g.current=""}),onPointerMove:x2(Z.onPointerMove,z5((E)=>{let A02=E.target,M02=d.current!==E.clientX;if(E.currentTarget.contains(A02)&&M02){let S02=E.clientX>d.current?"right":"left";_.current=S02,d.current=E.clientX}}))})})})})})})},"MenuContentImpl"));var K8=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,...X2}=Z;return P(c.div,{role:"group",...X2,ref:Q})},"MenuGroup"));var zZ=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,...X2}=Z;return P(c.div,{...X2,ref:Q})},"MenuLabel"));var B9="MenuItem";var e6="menu.itemSelect";var V9=k2.forwardRef(C(function(Z,Q){let{disabled:q=false,onSelect:X2,...Y2}=Z,K=k2.useRef(null),W=b5(B9,Z.__scopeMenu),z2=U9(B9,Z.__scopeMenu),B=m(Q,K),H=k2.useRef(false),G=C(()=>{let $=K.current;if(!q&&$){let U2=new CustomEvent(e6,{bubbles:true,cancelable:true});if($.addEventListener(e6,(V2)=>X2?.(V2),{once:true}),U5($,U2),U2.defaultPrevented)H.current=false;else W.onClose()}},"handleSelect");return P(W8,{...Y2,ref:B,disabled:q,onClick:x2(Z.onClick,G),onPointerDown:($)=>{Z.onPointerDown?.($),H.current=true},onPointerUp:x2(Z.onPointerUp,($)=>{if(!H.current)$.currentTarget?.click()}),onKeyDown:x2(Z.onKeyDown,($)=>{if(q||$.target!==$.currentTarget)return;if(z2.searchRef.current!==""&&$.key===" ")return;if($9.includes($.key))$.currentTarget.click(),$.preventDefault()})})},"MenuItem"));var W8=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,disabled:X2=false,textValue:Y2,...K}=Z,W=U9(B9,q),z2=Z8(q),B=k2.useRef(null),H=m(Q,B),[G,$]=k2.useState(false),[U2,V2]=k2.useState("");return k2.useEffect(()=>{let L=B.current;if(L)V2((L.textContent??"").trim())},[K.children]),P(A5.ItemSlot,{scope:q,disabled:X2,textValue:Y2??U2,children:P(R6,{asChild:true,...z2,focusable:!X2,children:P(c.div,{role:"menuitem","data-highlighted":G?"":undefined,"aria-disabled":X2||undefined,"data-disabled":X2?"":undefined,...K,ref:H,onPointerMove:x2(Z.onPointerMove,z5((L)=>{if(X2)W.onItemLeave(L);else if(W.onItemEnter(L),!L.defaultPrevented)L.currentTarget.focus({preventScroll:true})})),onPointerLeave:x2(Z.onPointerLeave,z5((L)=>W.onItemLeave(L))),onFocus:x2(Z.onFocus,()=>$(true)),onBlur:x2(Z.onBlur,()=>$(false))})})})},"MenuItemImpl"));var $Z=k2.forwardRef(C(function(Z,Q){let{checked:q=false,onCheckedChange:X2,...Y2}=Z;return P(z8,{scope:Z.__scopeMenu,checked:q,children:P(V9,{role:"menuitemcheckbox","aria-checked":E5(q)?"mixed":q,...Y2,ref:Q,"data-state":G1(q),onSelect:x2(Y2.onSelect,()=>X2?.(E5(q)?true:!q),{checkForDefaultPrevented:false})})})},"MenuCheckboxItem"));var BZ="MenuRadioGroup";var[UZ,HZ]=s02(BZ,{value:undefined,onValueChange:C(()=>{},"onValueChange")});var VZ=k2.forwardRef(C(function(Z,Q){let{value:q,onValueChange:X2,...Y2}=Z,K=e(X2);return P(UZ,{scope:Z.__scopeMenu,value:q,onValueChange:K,children:P(K8,{...Y2,ref:Q})})},"MenuRadioGroup"));var LZ="MenuRadioItem";var jZ=k2.forwardRef(C(function(Z,Q){let{value:q,...X2}=Z,Y2=HZ(LZ,Z.__scopeMenu),K=q===Y2.value;return P(z8,{scope:Z.__scopeMenu,checked:K,children:P(V9,{role:"menuitemradio","aria-checked":K,...X2,ref:Q,"data-state":G1(K),onSelect:x2(X2.onSelect,()=>Y2.onValueChange?.(q),{checkForDefaultPrevented:false})})})},"MenuRadioItem"));var G8="MenuItemIndicator";var[z8,FZ]=s02(G8,{checked:false});var DZ=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,forceMount:X2,...Y2}=Z,K=FZ(G8,q);return P(O5,{present:X2||E5(K.checked)||K.checked===true,children:P(c.span,{...Y2,ref:Q,"data-state":G1(K.checked)})})},"MenuItemIndicator"));var TZ=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,...X2}=Z;return P(c.div,{role:"separator","aria-orientation":"horizontal",...X2,ref:Q})},"MenuSeparator"));var $8="MenuSub";var[MZ,B8]=s02($8);var OZ=C((J2)=>{let{__scopeMenu:Z,children:Q,open:q=false,onOpenChange:X2}=J2,Y2=C02($8,Z),K=W1(Z),[W,z2]=k2.useState(null),[B,H]=k2.useState(null),G=e(X2);return k2.useEffect(()=>{if(Y2.open===false)G(false);return()=>G(false)},[Y2.open,G]),P(f1,{...K,children:P(Q8,{scope:Z,open:q,onOpenChange:G,content:B,onContentChange:H,children:P(MZ,{scope:Z,contentId:e02(),triggerId:e02(),trigger:W,onTriggerChange:z2,children:Q})})})},"MenuSub");var Y1="MenuSubTrigger";var IZ=k2.forwardRef(C(function(Z,Q){let q=C02(Y1,Z.__scopeMenu),X2=b5(Y1,Z.__scopeMenu),Y2=B8(Y1,Z.__scopeMenu),K=U9(Y1,Z.__scopeMenu),W=k2.useRef(null),{pointerGraceTimerRef:z2,onPointerGraceIntentChange:B}=K,H={__scopeMenu:Z.__scopeMenu},G=k2.useCallback(()=>{if(W.current)window.clearTimeout(W.current);W.current=null},[]);k2.useEffect(()=>G,[G]),k2.useEffect(()=>{let U2=z2.current;return()=>{window.clearTimeout(U2),B(null)}},[z2,B]);let $=m(Q,Y2.onTriggerChange);return P(q8,{asChild:true,...H,children:P(W8,{id:Y2.triggerId,"aria-haspopup":"menu","aria-expanded":q.open,"aria-controls":q.open?Y2.contentId:undefined,"data-state":L9(q.open),...Z,ref:$,onClick:(U2)=>{if(Z.onClick?.(U2),Z.disabled||U2.defaultPrevented)return;if(U2.currentTarget.focus(),!q.open)q.onOpenChange(true)},onPointerMove:x2(Z.onPointerMove,z5((U2)=>{if(K.onItemEnter(U2),U2.defaultPrevented)return;if(!Z.disabled&&!q.open&&!W.current)K.onPointerGraceIntentChange(null),W.current=window.setTimeout(()=>{q.onOpenChange(true),G()},100)})),onPointerLeave:x2(Z.onPointerLeave,z5((U2)=>{G();let V2=q.content?.getBoundingClientRect();if(V2){let L=q.content?.dataset.side,j=L==="right",T=j?-5:5,F=V2[j?"left":"right"],D=V2[j?"right":"left"];K.onPointerGraceIntentChange({area:[{x:U2.clientX+T,y:U2.clientY},{x:F,y:V2.top},{x:D,y:V2.top},{x:D,y:V2.bottom},{x:F,y:V2.bottom}],side:L}),window.clearTimeout(z2.current),z2.current=window.setTimeout(()=>K.onPointerGraceIntentChange(null),300)}else{if(K.onTriggerLeave(U2),U2.defaultPrevented)return;K.onPointerGraceIntentChange(null)}})),onKeyDown:x2(Z.onKeyDown,(U2)=>{if(Z.disabled||U2.target!==U2.currentTarget)return;if(K.searchRef.current!==""&&U2.key===" ")return;if(oJ[X2.dir].includes(U2.key))q.onOpenChange(true),q.content?.focus(),U2.preventDefault()})})})},"MenuSubTrigger"));var NZ="MenuSubContent";var kZ=k2.forwardRef(C(function(Z,Q){let q=Y8(T02,Z.__scopeMenu),{forceMount:X2=q.forceMount,align:Y2="start",...K}=Z,W=C02(T02,Z.__scopeMenu),z2=b5(T02,Z.__scopeMenu),B=B8(NZ,Z.__scopeMenu),H=k2.useRef(null),G=m(Q,H);return P(A5.Provider,{scope:Z.__scopeMenu,children:P(O5,{present:X2||W.open,children:P(A5.Slot,{scope:Z.__scopeMenu,children:P(H9,{id:B.contentId,"aria-labelledby":B.triggerId,...K,ref:G,align:Y2,side:z2.dir==="rtl"?"left":"right",disableOutsidePointerEvents:false,disableOutsideScroll:false,trapFocus:false,onOpenAutoFocus:($)=>{if(z2.isUsingKeyboardRef.current)H.current?.focus();$.preventDefault()},onCloseAutoFocus:($)=>$.preventDefault(),onFocusOutside:x2(Z.onFocusOutside,($)=>{if($.target!==B.trigger)W.onOpenChange(false)}),onEscapeKeyDown:x2(Z.onEscapeKeyDown,($)=>{z2.onClose(),$.preventDefault()}),onKeyDown:x2(Z.onKeyDown,($)=>{let U2=$.currentTarget.contains($.target),V2=nJ[z2.dir].includes($.key);if(U2&&V2)W.onOpenChange(false),B.trigger?.focus(),$.preventDefault()})})})})})},"MenuSubContent"));function L9(J2){return J2?"open":"closed"}C(L9,"getOpenState");function E5(J2){return J2==="indeterminate"}C(E5,"isIndeterminate");function G1(J2){return E5(J2)?"indeterminate":J2?"checked":"unchecked"}C(G1,"getCheckedState");function U8(J2){let Z=document.activeElement;for(let Q of J2){if(Q===Z)return;if(Q.focus(),document.activeElement!==Z)return}}C(U8,"focusFirst");function H8(J2,Z){return J2.map((Q,q)=>J2[(Z+q)%J2.length])}C(H8,"wrapArray");function V8(J2,Z,Q){let X2=Z.length>1&&Array.from(Z).every((B)=>B===Z[0])?Z[0]:Z,Y2=Q?J2.indexOf(Q):-1,K=H8(J2,Math.max(Y2,0));if(X2.length===1)K=K.filter((B)=>B!==Q);let z2=K.find((B)=>B.toLowerCase().startsWith(X2.toLowerCase()));return z2!==Q?z2:undefined}C(V8,"getNextMatch");function L8(J2,Z){let{x:Q,y:q}=J2,X2=false;for(let Y2=0,K=Z.length-1;Y2<Z.length;K=Y2++){let W=Z[Y2],z2=Z[K],B=W.x,H=W.y,G=z2.x,$=z2.y;if(H>q!==$>q&&Q<(G-B)*(q-H)/($-H)+B)X2=!X2}return X2}C(L8,"isPointInPolygon");function j8(J2,Z){if(!Z)return false;let Q={x:J2.clientX,y:J2.clientY};return L8(Q,Z)}C(j8,"isPointerInGraceArea");function z5(J2){return(Z)=>Z.pointerType==="mouse"?J2(Z):undefined}C(z5,"whenMouse");var TY=ZZ;var MY=q8;var OY=qZ;var IY=YZ;var NY=K8;var kY=zZ;var AY=V9;var EY=$Z;var bY=VZ;var yY=jZ;var PY=DZ;var wY=TZ;var SY=OZ;var RY=IZ;var CY=kZ;import{forwardRef as H2,createElement as Z2}from"react";import{forwardRef as x22,createElement as c03}from"react";import{jsx as _02,jsxs as s72}from"react/jsx-runtime";import{jsx as d03,jsxs as i72}from"react/jsx-runtime";import{jsx as S2}from"react/jsx-runtime";import{jsx as h2}from"react/jsx-runtime";var g=(...S3)=>S3.filter((h,E,v2)=>{return Boolean(h)&&h.trim()!==""&&v2.indexOf(h)===E}).join(" ").trim();var n03=(S3)=>S3.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var i03=(S3)=>S3.replace(/^([A-Z])|[\s-_]+(\w)/g,(h,E,v2)=>v2?v2.toUpperCase():E.toLowerCase());var a03=(S3)=>{let h=i03(S3);return h.charAt(0).toUpperCase()+h.slice(1)};var o03={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var e03=(S3)=>{for(let h in S3)if(h.startsWith("aria-")||h==="role"||h==="title")return true;return false};var y2=x22(({color:S3="currentColor",size:h=24,strokeWidth:E=2,absoluteStrokeWidth:v2,className:r02="",children:P2,iconNode:V2,...s03},E2)=>c03("svg",{ref:E2,...o03,width:h,height:h,stroke:S3,strokeWidth:v2?Number(E)*24/Number(h):E,className:g("lucide",r02),...!P2&&!e03(s03)&&{"aria-hidden":"true"},...s03},[...V2.map(([v22,G2])=>c03(v22,G2)),...Array.isArray(P2)?P2:[P2]]));var y=(S3,h)=>{let E=H2(({className:v2,...r02},P2)=>Z2(y2,{ref:P2,iconNode:h,className:g(`lucide-${n03(a03(S3))}`,`lucide-${S3}`,v2),...r02}));return E.displayName=a03(S3),E};var $2=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]];var H=y("braces",$2);var B2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]];var Z=y("circle-alert",B2);var J2=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]];var $=y("circle-check-big",J2);var Q2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]];var B=y("circle-check",Q2);var Y2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]];var J3=y("circle-plus",Y2);var q2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]];var Q=y("circle-user",q2);var K2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]];var Y3=y("circle-x",K2);var T2=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]];var q=y("code-xml",T2);var X2=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]];var G=y("ellipsis-vertical",X2);var O2=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]];var x3=y("ellipsis",O2);var k22=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]];var K=y("funnel",k22);var D2=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]];var T=y("house",D2);var f2=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]];var X3=y("layers",f2);var W2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]];var O=y("loader-circle",W2);var F2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]];var k3=y("panel-left",F2);var A2=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]];var D=y("send-horizontal",A2);var P2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]];var f3=y("shield-x",P2);var z2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]];var W=y("sparkles",z2);var C2=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]];var V2=y("square-pen",C2);var b2=[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]];var F=y("test-tube-diagonal",b2);var w2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]];var A=y("triangle-alert",w2);var M2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]];var I=y("activity",M2);var l22=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]];var N=y("app-window",l22);var R2=[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]];var t2=y("apple",R2);var U2=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]];var L=y("archive",U2);var m2=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]];var p2=y("arrow-down",m2);var g2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]];var j=y("arrow-left",g2);var I2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]];var u2=y("arrow-right",I2);var N2=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]];var _=y("arrow-up-down",N2);var t22=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]];var d=y("arrow-up",t22);var L2=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]];var r2=y("at-sign",L2);var p22=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]];var a2=y("award",p22);var j2=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]];var z3=y("bell",j2);var u22=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]];var s2=y("book",u22);var _2=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]];var n2=y("bot",_2);var d2=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]];var i3=y("box",d2);var r22=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]];var o2=y("briefcase",r22);var a22=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]];var e2=y("building",a22);var s22=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]];var c2=y("calculator",s22);var n22=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]];var y12=y("calendar-days",n22);var i22=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]];var S12=y("calendar",i22);var o22=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]];var C3=y("check",o22);var e22=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]];var b=y("chevron-down",e22);var c22=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]];var w=y("chevron-left",c22);var y42=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]];var M3=y("chevron-right",y42);var S42=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]];var l3=y("chevron-up",S42);var h42=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]];var h12=y("chevrons-up-down",h42);var V42=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]];var V12=y("circle",V42);var E42=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]];var E12=y("clock",E42);var v42=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]];var v12=y("cloud",v42);var G42=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]];var G12=y("code",G42);var x42=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]];var x12=y("copy",x42);var H42=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]];var H12=y("cpu",H42);var Z42=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]];var R=y("credit-card",Z42);var $42=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]];var Z12=y("database",$42);var B42=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]];var $12=y("dot",B42);var J42=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]];var B12=y("download",J42);var Q42=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]];var J12=y("eraser",Q42);var Y42=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]];var Q12=y("external-link",Y42);var q42=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]];var Y12=y("eye-off",q42);var K42=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]];var q12=y("eye",K42);var T42=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]];var K12=y("file-spreadsheet",T42);var X42=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]];var T12=y("file-text",X42);var O42=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]];var X12=y("file",O42);var k42=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]];var O12=y("folder-input",k42);var D42=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]];var k12=y("folder-open",D42);var f42=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]];var D12=y("folder-plus",f42);var W42=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]];var f12=y("folder",W42);var F42=[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]];var W12=y("git-compare-arrows",F42);var A42=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]];var F12=y("git-fork",A42);var P42=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]];var A12=y("globe",P42);var z42=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]];var P12=y("grip-vertical",z42);var C42=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]];var z12=y("hash",C42);var b42=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]];var C12=y("history",b42);var w42=[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]];var b12=y("id-card",w42);var M42=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]];var w12=y("inbox",M42);var l42=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]];var M12=y("info",l42);var R42=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]];var l12=y("key",R42);var U42=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]];var R12=y("layout-grid",U42);var m42=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]];var U12=y("layout-dashboard",m42);var g42=[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]];var m12=y("link-2-off",g42);var I42=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]];var g12=y("link-2",I42);var N42=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]];var I12=y("list-filter",N42);var t42=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]];var N12=y("list",t42);var L42=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]];var t12=y("log-out",L42);var p42=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]];var L12=y("mail",p42);var j42=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]];var p12=y("map-pin",j42);var u42=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]];var j12=y("maximize",u42);var _42=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]];var u12=y("megaphone",_42);var d42=[["path",{d:"M12 12v-2",key:"fwoke6"}],["path",{d:"M12 18v-2",key:"qj6yno"}],["path",{d:"M16 12v-2",key:"heuere"}],["path",{d:"M16 18v-2",key:"s1ct0w"}],["path",{d:"M2 11h1.5",key:"15p63e"}],["path",{d:"M20 18v-2",key:"12ehxp"}],["path",{d:"M20.5 11H22",key:"khsy7a"}],["path",{d:"M4 18v-2",key:"1c3oqr"}],["path",{d:"M8 12v-2",key:"1mwtfd"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["rect",{x:"2",y:"6",width:"20",height:"10",rx:"2",key:"1qcswk"}]];var _12=y("memory-stick",d42);var r42=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]];var d12=y("message-square-plus",r42);var a42=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]];var r12=y("message-square",a42);var s42=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]];var a12=y("mic",s42);var n42=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]];var s12=y("minimize-2",n42);var i42=[["path",{d:"M5 12h14",key:"1ays0h"}]];var n12=y("minus",i42);var o42=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]];var i12=y("monitor",o42);var e42=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]];var o12=y("moon",e42);var c42=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]];var e12=y("panel-top",c42);var y72=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]];var c12=y("paperclip",y72);var S72=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]];var y03=y("pause",S72);var h72=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]];var S02=y("pencil",h72);var V72=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]];var h02=y("play",V72);var E72=[["path",{d:"M9 2v6",key:"17ngun"}],["path",{d:"M15 2v6",key:"s7yy2p"}],["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M5 8h14",key:"pcz4l3"}],["path",{d:"M6 11V8h12v3a6 6 0 1 1-12 0Z",key:"wtfw2c"}]];var V02=y("plug-2",E72);var v7=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]];var E03=y("plus",v7);var G72=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]];var v03=y("power",G72);var x72=[["path",{d:"M12 17V7",key:"pyj7ub"}],["path",{d:"M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8",key:"1elt7d"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]];var G03=y("receipt",x72);var H72=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]];var x03=y("refresh-cw",H72);var Z72=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]];var H02=y("rocket",Z72);var $72=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]];var Z0=y("rotate-ccw",$72);var B72=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]];var $02=y("save",B72);var J72=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]];var U3=y("search",J72);var Q72=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]];var B03=y("send",Q72);var Y72=[["path",{d:"M6 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2",key:"4b9dqc"}],["path",{d:"M6 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2",key:"22nnkd"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m13 6-4 6h6l-4 6",key:"14hqih"}]];var J03=y("server-crash",Y72);var q72=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]];var Q03=y("settings-2",q72);var K72=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]];var Y02=y("settings",K72);var T72=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]];var q02=y("shield-alert",T72);var X72=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]];var K02=y("shield-check",X72);var O72=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]];var T03=y("shield",O72);var k72=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}]];var X03=y("signal-high",k72);var D72=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}]];var O03=y("signal-medium",D72);var f72=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}]];var k03=y("signal-low",f72);var W72=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}],["path",{d:"M22 4v16",key:"sih9yq"}]];var D02=y("signal",W72);var F72=[["path",{d:"M14 13V8.5C14 7 15 7 15 5a3 3 0 0 0-6 0c0 2 1 2 1 3.5V13",key:"i9gjdv"}],["path",{d:"M20 15.5a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 4 15.5V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1z",key:"1vzg3v"}],["path",{d:"M5 22h14",key:"ehvnwv"}]];var f03=y("stamp",F72);var A72=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]];var W03=y("sun",A72);var P72=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]];var F02=y("table",P72);var z72=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]];var A02=y("tag",z72);var C72=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]];var P03=y("terminal",C72);var b72=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]];var z03=y("test-tube",b72);var w72=[["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}],["path",{d:"M17 14V2",key:"8ymqnk"}]];var C03=y("thumbs-down",w72);var M72=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]];var b03=y("thumbs-up",M72);var l72=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]];var w03=y("toggle-left",l72);var R72=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]];var M02=y("trash-2",R72);var U72=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]];var l03=y("trending-up",U72);var m72=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]];var R03=y("type",m72);var g72=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]];var U03=y("upload",g72);var I72=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]];var m03=y("user-check",I72);var N72=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]];var g03=y("user-cog",N72);var t7=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]];var I03=y("user-plus",t7);var L72=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]];var N03=y("user-x",L72);var p72=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]];var t03=y("user",p72);var j72=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]];var L03=y("users",j72);var u72=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]];var p03=y("workflow",u72);var _72=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]];var j03=y("wrench",_72);var d72=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]];var m3=y("x",d72);var r72=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]];var u03=y("zap",r72);var kV0=y("linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{height:"12",key:"mk3on5",width:"4",x:"2",y:"9"}],["circle",{cx:"4",cy:"4",key:"bt5ra8",r:"2"}]]);import*as k10 from"react";import{Fragment as ai,jsx as q3,jsxs as mi}from"react/jsx-runtime";import{jsx as v2,jsxs as O3}from"react/jsx-runtime";import*as P3 from"react";import{Fragment as Xi,jsx as c3}from"react/jsx-runtime";import{jsx as Q3,jsxs as j3}from"react/jsx-runtime";import{jsx as oi}from"react/jsx-runtime";import{jsx as V3,jsxs as r3}from"react/jsx-runtime";import{jsx as Y10}from"react/jsx-runtime";import*as et from"react";import{jsx as Ei}from"react/jsx-runtime";import{jsx as ji}from"react/jsx-runtime";var ii=Object.defineProperty;var h=(i10,t3)=>ii(i10,"name",{value:t3,configurable:true});var R3="ContextMenu";var[bi,ba]=U02(R3,[DY]);var J10=DY();var[di,vt]=bi(R3);var li=h((i10)=>{let{__scopeContextMenu:t3,children:a3,onOpenChange:m10,open:b3,dir:d3,modal:l10=true}=i10,y3=k10.useRef(false);if(S5){let F3=k10.useRef(false);k10.useEffect(()=>{if(b3===true&&!y3.current&&!F3.current)F3.current=true,console.warn("ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport.")},[b3])}let[z10,X10]=p1({prop:b3,defaultProp:false,onChange:m10,caller:R3}),U10=J10(t3);return q3(di,{scope:t3,open:z10,onOpenChange:X10,modal:l10,hasInteractedRef:y3,children:q3(TY,{...U10,dir:d3,open:z10,onOpenChange:X10,modal:l10,children:a3})})},"ContextMenu");var ni="ContextMenuTrigger";var yi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,disabled:b3=false,...d3}=t3,l10=vt(ni,m10),y3=J10(m10),[z10,X10]=k10.useState({x:0,y:0}),U10=k10.useMemo(()=>({current:{getBoundingClientRect:h(()=>DOMRect.fromRect({width:0,height:0,...z10}),"getBoundingClientRect")}}),[z10]),F3=k10.useRef(0),Z3=k10.useCallback(()=>window.clearTimeout(F3.current),[]),f10=h((W3)=>{l10.hasInteractedRef.current=true,X10({x:W3.clientX,y:W3.clientY}),l10.onOpenChange(true)},"handleOpen");return k10.useEffect(()=>Z3,[Z3]),k10.useEffect(()=>void(b3&&Z3()),[b3,Z3]),mi(ai,{children:[q3(MY,{...y3,virtualRef:U10}),q3(c.span,{"data-state":l10.open?"open":"closed","data-disabled":b3?"":undefined,...d3,ref:a3,style:{WebkitTouchCallout:"none",...t3.style},onContextMenu:b3?t3.onContextMenu:x2(t3.onContextMenu,(W3)=>{Z3(),f10(W3),W3.preventDefault()}),onPointerDown:b3?t3.onPointerDown:x2(t3.onPointerDown,u3((W3)=>{if(Z3(),l10.open)l10.onOpenChange(false);F3.current=window.setTimeout(()=>f10(W3),700)})),onPointerMove:b3?t3.onPointerMove:x2(t3.onPointerMove,u3(Z3)),onPointerCancel:b3?t3.onPointerCancel:x2(t3.onPointerCancel,u3(Z3)),onPointerUp:b3?t3.onPointerUp:x2(t3.onPointerUp,u3(Z3))})]})},"ContextMenuTrigger"));var ki=h((i10)=>{let{__scopeContextMenu:t3,...a3}=i10,m10=J10(t3);return q3(OY,{...m10,...a3})},"ContextMenuPortal");var zi="ContextMenuContent";var Pi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=vt(zi,m10),l10=J10(m10),y3=k10.useRef(false);return q3(IY,{...l10,...b3,ref:a3,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:(z10)=>{if(t3.onCloseAutoFocus?.(z10),!z10.defaultPrevented&&y3.current)z10.preventDefault();y3.current=false},onInteractOutside:(z10)=>{if(t3.onInteractOutside?.(z10),!z10.defaultPrevented&&!d3.modal)y3.current=true},style:{...t3.style,...{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}})},"ContextMenuContent"));var vi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(NY,{...d3,...b3,ref:a3})},"ContextMenuGroup"));var ci=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(kY,{...d3,...b3,ref:a3})},"ContextMenuLabel"));var hi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(AY,{...d3,...b3,ref:a3})},"ContextMenuItem"));var qi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(EY,{...d3,...b3,ref:a3})},"ContextMenuCheckboxItem"));var Ji=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(bY,{...d3,...b3,ref:a3})},"ContextMenuRadioGroup"));var Ki=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(yY,{...d3,...b3,ref:a3})},"ContextMenuRadioItem"));var Qi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(PY,{...d3,...b3,ref:a3})},"ContextMenuItemIndicator"));var $i=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(wY,{...d3,...b3,ref:a3})},"ContextMenuSeparator"));var Zi="ContextMenuSub";var gi=h((i10)=>{let{__scopeContextMenu:t3,children:a3,onOpenChange:m10,open:b3,defaultOpen:d3}=i10,l10=J10(t3),[y3,z10]=p1({prop:b3,defaultProp:d3??false,onChange:m10,caller:Zi});return q3(SY,{...l10,open:y3,onOpenChange:z10,children:a3})},"ContextMenuSub");var Bi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(RY,{...d3,...b3,ref:a3})},"ContextMenuSubTrigger"));var Vi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(CY,{...d3,...b3,ref:a3,style:{...t3.style,...{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}})},"ContextMenuSubContent"));function u3(i10){return(t3)=>t3.pointerType!=="mouse"?i10(t3):undefined}h(u3,"whenTouchOrPen");var ct=li;var ht=yi;var M8=ki;var qt=Pi;var na=({...i10})=>v2(ct,{"data-slot":"context-menu",...i10});var ya=({...i10})=>v2(ht,{"data-slot":"context-menu-trigger",...i10});var qa=({className:i10,...t3})=>v2(M8,{children:v2(qt,{"data-slot":"context-menu-content",className:Pq("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",i10),...t3})});var Yi=Object.defineProperty;var K3=(i10,t3)=>Yi(i10,"name",{value:t3,configurable:true});var D3="Dialog";var[Ct,Ra]=U02(D3);var[Ui,g3]=Ct(D3);var Tt=K3((i10)=>{let{__scopeDialog:t3,children:a3,open:m10,defaultOpen:b3,onOpenChange:d3,modal:l10=true}=i10,y3=P3.useRef(null),z10=P3.useRef(null),[X10,U10]=p1({prop:m10,defaultProp:b3??false,onChange:d3,caller:D3}),[F3,Z3]=P3.useState(0),[f10,W3]=P3.useState(0);return c3(Ui,{scope:t3,triggerRef:y3,contentRef:z10,contentId:e02(),titleId:e02(),descriptionId:e02(),titlePresent:F3>0,descriptionPresent:f10>0,setTitleCount:Z3,setDescriptionCount:W3,open:X10,onOpenChange:U10,onOpenToggle:P3.useCallback(()=>U10((ti)=>!ti),[U10]),modal:l10,children:a3})},"Dialog");var Fi="DialogTrigger";var wt=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,...b3}=t3,d3=g3(Fi,m10),l10=m(a3,d3.triggerRef);return c3(c.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d3.open,"aria-controls":d3.open?d3.contentId:undefined,"data-state":w3(d3.open),...b3,ref:l10,onClick:x2(t3.onClick,d3.onOpenToggle)})},"DialogTrigger"));var At="DialogPortal";var[ui,Rt]=Ct(At,{forceMount:undefined});var Mt=K3((i10)=>{let{__scopeDialog:t3,forceMount:a3,children:m10,container:b3}=i10,d3=g3(At,t3);return c3(ui,{scope:t3,forceMount:a3,children:P3.Children.map(m10,(l10)=>c3(O5,{present:a3||d3.open,children:c3(B6,{asChild:true,container:b3,children:l10})}))})},"DialogPortal");var S3="DialogOverlay";var ot=P3.forwardRef(K3(function(t3,a3){let m10=Rt(S3,t3.__scopeDialog),{forceMount:b3=m10.forceMount,...d3}=t3,l10=g3(S3,t3.__scopeDialog);return l10.modal?c3(O5,{present:b3||l10.open,children:c3(Hi,{...d3,ref:a3})}):null},"DialogOverlay"));var Gi=K0("DialogOverlay.RemoveScroll");var Hi=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,...b3}=t3,d3=g3(S3,m10),l10=a8(),y3=m(a3,l10);return c3(z9,{as:Gi,allowPinchZoom:true,shards:[d3.contentRef],children:c3(c.div,{"data-state":w3(d3.open),...b3,ref:y3,style:{pointerEvents:"auto",...b3.style}})})},"DialogOverlayImpl"));var H3="DialogContent";var Ot=P3.forwardRef(K3(function(t3,a3){let m10=Rt(H3,t3.__scopeDialog),{forceMount:b3=m10.forceMount,...d3}=t3,l10=g3(H3,t3.__scopeDialog);return c3(O5,{present:b3||l10.open,children:l10.modal?c3(fi,{...d3,ref:a3}):c3(Ii,{...d3,ref:a3})})},"DialogContent"));var fi=P3.forwardRef(K3(function(t3,a3){let m10=g3(H3,t3.__scopeDialog),b3=P3.useRef(null),d3=m(a3,m10.contentRef,b3);return P3.useEffect(()=>{let l10=b3.current;if(l10)return h6(l10)},[]),c3(St,{...t3,ref:d3,trapFocus:m10.open,disableOutsidePointerEvents:m10.open,onCloseAutoFocus:x2(t3.onCloseAutoFocus,(l10)=>{l10.preventDefault(),m10.triggerRef.current?.focus()}),onPointerDownOutside:x2(t3.onPointerDownOutside,(l10)=>{let y3=l10.detail.originalEvent,z10=y3.button===0&&y3.ctrlKey===true;if(y3.button===2||z10)l10.preventDefault()}),onFocusOutside:x2(t3.onFocusOutside,(l10)=>l10.preventDefault())})},"DialogContentModal"));var Ii=P3.forwardRef(K3(function(t3,a3){let m10=g3(H3,t3.__scopeDialog),b3=P3.useRef(false),d3=P3.useRef(false);return c3(St,{...t3,ref:a3,trapFocus:false,disableOutsidePointerEvents:false,onCloseAutoFocus:(l10)=>{if(t3.onCloseAutoFocus?.(l10),!l10.defaultPrevented){if(!b3.current)m10.triggerRef.current?.focus();l10.preventDefault()}b3.current=false,d3.current=false},onInteractOutside:(l10)=>{if(t3.onInteractOutside?.(l10),!l10.defaultPrevented){if(b3.current=true,l10.detail.originalEvent.type==="pointerdown")d3.current=true}let y3=l10.target;if(m10.triggerRef.current?.contains(y3))l10.preventDefault();if(l10.detail.originalEvent.type==="focusin"&&d3.current)l10.preventDefault()}})},"DialogContentNonModal"));var St=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,trapFocus:b3,onOpenAutoFocus:d3,onCloseAutoFocus:l10,...y3}=t3,z10=g3(H3,m10);return x5(),c3(Xi,{children:c3(o9,{asChild:true,loop:true,trapped:b3,onMountAutoFocus:d3,onUnmountAutoFocus:l10,children:c3(c9,{role:"dialog",id:z10.contentId,"aria-describedby":z10.descriptionPresent?z10.descriptionId:undefined,"aria-labelledby":z10.titlePresent?z10.titleId:undefined,"data-state":w3(z10.open),...y3,ref:a3,deferPointerDownOutside:true,onDismiss:()=>z10.onOpenChange(false)})})})},"DialogContentImpl"));var Li="DialogTitle";var Et=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,...b3}=t3,d3=g3(Li,m10),{setTitleCount:l10}=d3;return l2(()=>{return l10((y3)=>y3+1),()=>l10((y3)=>y3-1)},[l10]),c3(c.h2,{id:d3.titleId,...b3,ref:a3})},"DialogTitle"));var Ni="DialogDescription";var Dt=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,...b3}=t3,d3=g3(Ni,m10),{setDescriptionCount:l10}=d3;return l2(()=>{return l10((y3)=>y3+1),()=>l10((y3)=>y3-1)},[l10]),c3(c.p,{id:d3.descriptionId,...b3,ref:a3})},"DialogDescription"));var Ci="DialogClose";var x10=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,...b3}=t3,d3=g3(Ci,m10);return c3(c.button,{type:"button",...b3,ref:a3,onClick:x2(t3.onClick,()=>d3.onOpenChange(false))})},"DialogClose"));function w3(i10){return i10?"open":"closed"}K3(w3,"getState");var Oa=({...i10})=>Q3(Tt,{"data-slot":"dialog",...i10});var wi=({...i10})=>Q3(Mt,{"data-slot":"dialog-portal",...i10});var Ai=({className:i10,...t3})=>Q3(ot,{"data-slot":"dialog-overlay",className:Pq("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",i10),...t3});var Ri={lg:"sm:max-w-2xl",md:"sm:max-w-lg",xl:"sm:max-w-4xl"};var Mi={content:"",viewport:"max-h-[calc(100vh-2rem)]"};var Da=({className:i10,children:t3,fixedBottom:a3=false,height:m10="viewport",size:b3="md",showCloseButton:d3=true,...l10})=>j3(wi,{"data-slot":"dialog-portal",children:[Q3(Ai,{}),j3(Ot,{"data-slot":"dialog-content",className:Pq("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex flex-col w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",Ri[b3],Mi[m10],a3&&"[&_[data-slot=dialog-footer]]:sticky [&_[data-slot=dialog-footer]]:bottom-0 [&_[data-slot=dialog-footer]]:z-10 [&_[data-slot=dialog-footer]]:-mx-6 [&_[data-slot=dialog-footer]]:border-t [&_[data-slot=dialog-footer]]:bg-background [&_[data-slot=dialog-footer]]:px-6 [&_[data-slot=dialog-footer]]:py-4 [&_[data-slot=form-actions]]:sticky [&_[data-slot=form-actions]]:bottom-0 [&_[data-slot=form-actions]]:z-10 [&_[data-slot=form-actions]]:-mx-6 [&_[data-slot=form-actions]]:border-t [&_[data-slot=form-actions]]:bg-background [&_[data-slot=form-actions]]:px-6 [&_[data-slot=form-actions]]:py-4",i10),...l10,children:[t3,d3?j3(x10,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[Q3(m3,{}),Q3("span",{className:"sr-only",children:"Close"})]}):null]})]});var sa=({className:i10,...t3})=>Q3(Et,{"data-slot":"dialog-title",className:Pq("text-lg leading-none font-semibold",i10),...t3});var _a=({className:i10,...t3})=>Q3(Dt,{"data-slot":"dialog-description",className:Pq("text-muted-foreground text-sm",i10),...t3});var im=({className:i10,type:t3,...a3})=>oi("input",{type:t3,"data-slot":"input",className:Pq("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i10),...a3});var nm=({className:i10,...t3})=>V3("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:Pq("mx-auto flex w-full justify-center",i10),...t3});var ym=({className:i10,children:t3,...a3})=>V3("ul",{"data-slot":"pagination-content",className:Pq("flex flex-row items-center gap-1",i10),...a3,children:t3});var km=({...i10})=>V3("li",{"data-slot":"pagination-item",...i10});var vm=({className:i10,...t3})=>r3("span",{"aria-hidden":true,"data-slot":"pagination-ellipsis",className:Pq("flex size-9 items-center justify-center",i10),...t3,children:[V3(x3,{className:"size-4"}),V3("span",{className:"sr-only",children:"More pages"})]});var Jm=({className:i10,...t3})=>Y10("div",{"data-slot":"table-container",className:"relative w-full max-w-full overflow-x-auto",children:Y10("table",{"data-slot":"table",className:Pq("min-w-full w-max caption-bottom text-sm",i10),...t3})});var Km=({className:i10,...t3})=>Y10("thead",{"data-slot":"table-header",className:Pq("[&_tr]:border-b",i10),...t3});var Qm=({className:i10,...t3})=>Y10("tbody",{"data-slot":"table-body",className:Pq("[&_tr:last-child]:border-0",i10),...t3});var Zm=({className:i10,...t3})=>Y10("tr",{"data-slot":"table-row",className:Pq("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",i10),...t3});var gm=({className:i10,...t3})=>Y10("th",{"data-slot":"table-head",className:Pq("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",i10),...t3});var Bm=({className:i10,...t3})=>Y10("td",{"data-slot":"table-cell",className:Pq("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",i10),...t3});var Vm=({className:i10,...t3})=>Y10("caption",{"data-slot":"table-caption",className:Pq("text-muted-foreground mt-4 text-sm",i10),...t3});var Oi=Object.defineProperty;var Si=(i10,t3)=>Oi(i10,"name",{value:t3,configurable:true});var Di=et.forwardRef(Si(function(t3,a3){return Ei(c.label,{...t3,ref:a3,onMouseDown:(m10)=>{if(m10.target.closest("button, input, select, textarea"))return;if(t3.onMouseDown?.(m10),!m10.defaultPrevented&&m10.detail>1)m10.preventDefault()}})},"Label"));var pt=Di;var um=({className:i10,...t3})=>ji(pt,{"data-slot":"label",className:Pq("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",i10),...t3});var d3=Object.defineProperty;var e3=(a3)=>a3;function f10(a3,b3){this[a3]=e3.bind(null,b3)}var g10=(a3,b3)=>{for(var c10 in b3)d3(a3,c10,{get:b3[c10],enumerable:true,configurable:true,set:f10.bind(b3,c10)})};import{Fragment as te,useId as z10}from"react";import{jsx as r10,jsxs as y3}from"react/jsx-runtime";import{useId as ge}from"react";import{jsx as b3,jsxs as T3}from"react/jsx-runtime";import{jsx as f13,jsxs as ue,Fragment as Te}from"react/jsx-runtime";"use client";var L3={};g10(L3,{ResourceTablePrimitive:()=>re,ResourcePaginationPrimitive:()=>ne,ResourceListPrimitive:()=>ie,ResourceFormPrimitive:()=>ce,ResourceFiltersBar:()=>pe,ResourceFilterPrimitive:()=>ae,ResourceDialogPrimitive:()=>se,ResourceActionPrimitive:()=>le});var D8=(...e10)=>e10.filter(Boolean).join(" ");var Pe={border:"1px solid currentColor",borderRadius:"0.5rem",padding:"0.75rem"};var re=({caption:e10,className:i10,columns:t3,empty:n3="No resources found",getRowKey:l10,onRowClick:o3,renderActions:s3,actionsLabel:m10="Actions",stickyActions:a3=true,isPending:c10=false,isRowSelected:N3,isRowExpanded:d10,onExpandedChange:v3,renderDetails:R10,renderContextMenu:p3,renderCell:B3,rows:I3,style:Re})=>{let k11=s3!==undefined||R10!==undefined,E=a3?"sticky right-0 z-10 shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":"";return y3(Jm,{className:D8("ci-resource-table",i10),style:{borderCollapse:"collapse",width:"100%",...Re},children:[e10?r10(Vm,{children:e10}):null,r10(Km,{children:y3(Zm,{children:[t3.map((u10)=>r10(gm,{scope:"col",children:u10.label},u10.id)),k11?r10(gm,{className:E,children:r10("span",{className:"sr-only",children:m10})}):null]})}),r10(Qm,{children:I3.length===0?r10(Zm,{children:r10(Bm,{className:"py-10",colSpan:Math.max(t3.length+(k11?1:0),1),children:n3})}):I3.map((u10)=>{let C10=d10?.(u10)??false,H10=R10?.(u10,C10),_3=!!H10,W3=y3(Zm,{"data-state":N3?.(u10)?"selected":undefined,tabIndex:o3?0:undefined,className:o3?"cursor-pointer":undefined,onKeyDown:(P5)=>{if(P5.target===P5.currentTarget&&(P5.key==="Enter"||P5.key===" "))P5.preventDefault(),o3?.(u10)},onClick:(P5)=>{if(P5.target instanceof Element&&P5.target.closest("[data-slot='row-actions']"))return;o3?.(u10)},children:[t3.map((P5)=>r10(Bm,{children:B3(u10,P5)},P5.id)),k11?y3(Bm,{"data-slot":"row-actions",className:`flex gap-2 justify-end ${E}`,children:[s3?.(u10),_3&&v3?r10(CZ,{type:"button",variant:"ghost",size:"icon","aria-label":C10?"Collapse":"Expand","aria-expanded":C10,disabled:c10,onClick:()=>v3(u10,!C10),children:C10?r10(b,{}):r10(M3,{})}):null]}):null]},l10(u10));return y3(te,{children:[p3?y3(na,{children:[r10(ya,{asChild:true,children:W3}),r10(qa,{children:p3(u10)})]}):W3,_3&&C10?r10(Zm,{className:"hover:bg-transparent",children:r10(Bm,{colSpan:t3.length+(k11?1:0),children:H10})}):null]},l10(u10))})})]})};var ie=({ariaLabel:e10="Resources",className:i10,empty:t3="No resources found",getItemKey:n3,items:l10,renderItem:o3,renderContainer:s3,style:m10})=>s3?s3(l10.length===0?t3:l10.map((a3,c10)=>r10(te,{children:o3(a3,c10)},n3(a3)))):r10("ul",{"aria-label":e10,className:D8("ci-resource-list",i10),style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"none",...m10},children:l10.length===0?r10("li",{children:t3}):l10.map((a3,c10)=>r10("li",{children:o3(a3,c10)},n3(a3)))});var ae=({className:e10,inputProps:i10,label:t3,onChange:n3,style:l10,value:o3})=>r10(im,{...i10,"aria-label":t3,className:D8("ci-resource-filter",e10),onChange:(s3)=>{n3(s3.currentTarget.value)},style:l10,type:"search",value:o3});var ye=(e10,i10)=>{if(i10<=7)return Array.from({length:i10},(l10,o3)=>o3+1);let t3=Math.max(2,Math.min(e10-1,i10-3)),n3=Math.min(i10-1,Math.max(e10+1,4));return[1,...t3>2?[null]:[],...Array.from({length:n3-t3+1},(l10,o3)=>t3+o3),...n3<i10-1?[null]:[],i10]};var ne=({className:e10,currentPage:i10,hasNextPage:t3,hasPreviousPage:n3=false,isPending:l10=false,nextLabel:o3="Next",onNext:s3,onPrevious:m10,onPageChange:a3,totalPages:c10,ellipsisLabel:N3="More pages",previousLabel:d10="Previous",style:v3})=>r10(nm,{"aria-label":"Resource pagination",className:D8("ci-resource-pagination",e10),style:v3,children:y3(ym,{children:[r10(km,{children:r10(CZ,{variant:"ghost",disabled:!n3||l10,onClick:m10,type:"button",children:d10})}),i10!==undefined&&c10!==undefined&&a3?ye(i10,c10).map((R10,p3)=>r10(km,{children:R10===null?r10(vm,{"aria-label":N3}):r10(CZ,{type:"button",size:"icon",variant:R10===i10?"outline":"ghost","aria-current":R10===i10?"page":undefined,disabled:l10,onClick:()=>a3(R10),children:R10})},R10??`gap-${p3}`)):null,i10!==undefined&&(c10===undefined||!a3)?r10(km,{children:y3("span",{"aria-live":"polite",children:["Page ",i10]})}):null,r10(km,{children:r10(CZ,{variant:"ghost",disabled:!t3||l10,onClick:s3,type:"button",children:o3})})]})});var le=({children:e10,className:i10,components:t3,disabled:n3=false,onClick:l10,pending:o3=false,style:s3})=>{let m10=t3?.Button??CZ;return r10(m10,{"aria-busy":o3,className:D8("ci-resource-action",i10),disabled:n3||o3,onClick:l10,style:s3,type:"button",children:e10})};var se=({children:e10,className:i10,components:t3,open:n3,onOpenChange:l10,description:o3,style:s3,title:m10})=>{let a3=z10(),c10=z10();if(!t3?.Dialog)return r10(Oa,{open:n3,...l10?{onOpenChange:l10}:{},children:y3(Da,{className:i10,style:s3,"aria-describedby":o3?c10:undefined,children:[r10(sa,{children:m10}),o3?r10(_a,{id:c10,children:o3}):null,e10]})});if(!n3)return null;let N3=t3.Dialog;return y3(N3,{open:n3,"aria-labelledby":a3,"aria-modal":"true",className:D8("ci-resource-dialog",i10),style:{...Pe,...s3},children:[r10("h2",{id:a3,children:m10}),e10]})};var be=(e10)=>e10===null||e10===undefined?"":String(e10);var Ne=({field:e10,id:i10,value:t3,disabled:n3,errorId:l10,onChange:o3})=>{let s3={"aria-describedby":l10,"aria-invalid":l10!==undefined,disabled:n3,id:i10,name:e10.name,required:e10.control!=="checkbox"&&e10.required===true&&t3!==null};if(e10.control==="select"){let m10=e10.options??[];return T3("select",{...s3,disabled:n3||e10.readOnly,className:"border-input bg-background h-9 w-full rounded-md border px-3 text-sm focus-visible:ring-ring focus-visible:ring-2",value:m10.findIndex((a3)=>a3.value===t3),onChange:(a3)=>{let c10=m10[Number(a3.currentTarget.value)];if(c10)o3(c10.value)},children:[T3("option",{value:-1,disabled:true,children:["Select ",e10.label]}),m10.map((a3,c10)=>b3("option",{value:c10,children:a3.label},c10))]})}if(e10.control==="checkbox")return b3(im,{...s3,className:"size-4",type:"checkbox",checked:t3===true,disabled:n3||e10.readOnly,onChange:(m10)=>o3(m10.currentTarget.checked)});if(e10.control==="custom")return T3("p",{role:"alert",children:["A custom control is required for ",e10.label,"."]});return b3(im,{...s3,readOnly:e10.readOnly,type:e10.control,value:be(t3),onChange:(m10)=>{let a3=m10.currentTarget;o3(e10.control==="number"&&a3.value!==""?a3.valueAsNumber:a3.value)}})};var ve=({field:e10,value:i10,error:t3,disabled:n3,onChange:l10,renderControl:o3})=>{let s3=ge(),m10=t3?`${s3}-error`:undefined,a3={disabled:n3,errorId:m10,field:e10,id:s3,onChange:(c10)=>{if(!n3&&!e10.readOnly)l10(c10)},value:i10};return T3("div",{className:"grid gap-2",children:[T3(um,{htmlFor:s3,children:[e10.label,e10.required?" *":""]}),e10.control==="custom"&&o3?o3(a3):b3(Ne,{...a3}),e10.nullable?b3(CZ,{"aria-label":`Clear ${e10.label}`,type:"button",variant:"ghost",size:"sm",className:"justify-self-start",disabled:n3||e10.readOnly||i10===null,onClick:()=>l10(null),children:"Clear"}):null,t3?b3("p",{id:m10,role:"alert",className:"text-destructive text-sm",children:t3}):null]})};var ce=({label:e10,fields:i10,values:t3,errors:n3,onChange:l10,onSubmit:o3,onCancel:s3,renderControl:m10,pending:a3=false,disabled:c10=false,submitLabel:N3="Save",cancelLabel:d10="Cancel",error:v3,className:R10})=>T3("form",{"aria-label":e10,"aria-busy":a3,className:R10??"grid gap-4",onSubmit:(p3)=>{if(p3.preventDefault(),!a3&&!c10)o3()},children:[v3?b3("div",{role:"alert",className:"text-destructive text-sm",children:v3}):null,i10.map((p3)=>b3(ve,{field:p3,value:t3[p3.name],error:n3?.[p3.name],disabled:c10||a3,onChange:(B3)=>l10(p3.name,B3),renderControl:m10},p3.name)),T3("div",{"data-slot":"form-actions",className:"flex justify-end gap-2",children:[s3?b3(CZ,{type:"button",variant:"outline",disabled:a3,onClick:s3,children:d10}):null,b3(CZ,{type:"submit",disabled:c10||a3,children:N3})]})]});var me=(e10)=>f13("div",{className:"contents",children:e10.control},e10.key);var pe=({label:e10="Filter by",layout:i10="stacked",controls:t3})=>{if(t3.length===0)return null;let n3=t3.filter((o3)=>!o3.fullWidth),l10=t3.filter((o3)=>o3.fullWidth);return f13("div",{className:"mb-4",children:i10==="inline"?f13("form",{className:"flex flex-wrap items-end gap-2",onSubmit:(o3)=>o3.preventDefault(),children:t3.map(me)}):ue(Te,{children:[n3.length>0?ue("form",{className:"flex flex-wrap gap-2 mb-2",onSubmit:(o3)=>o3.preventDefault(),children:[f13(um,{className:"mt-3 mr-2",children:e10}),n3.map(me)]}):null,l10.map((o3)=>f13("form",{className:"mb-2 last:mb-0",onSubmit:(s3)=>s3.preventDefault(),children:o3.control},o3.key))]})})};var{ResourceActionPrimitive:Ge,ResourceDialogPrimitive:Je,ResourceFilterPrimitive:Qe,ResourceFormPrimitive:Ue,ResourceFiltersBar:Xe,ResourceListPrimitive:Ye,ResourcePaginationPrimitive:Ze,ResourceTablePrimitive:qe}=L3;import{useMemo as useMemo12,useState as useState19}from"react";import{jsxDEV as jsxDEV2,Fragment as Fragment5}from"react/jsx-dev-runtime";var isObject2=(value)=>value!==null&&typeof value==="object"&&!Array.isArray(value);var schemaProperties=(entity,mode="entity")=>{const properties=entity.contract.schemas[mode]?.properties;return isObject2(properties)?properties:{}};var requiredFields=(entity,mode)=>{const required=entity.contract.schemas[mode]?.required;return new Set(Array.isArray(required)?required.filter((value)=>typeof value==="string"):[])};var scalarTypes=(schema)=>{const{type}=schema;if(typeof type==="string"){return[type]}return Array.isArray(type)?type.filter((value)=>typeof value==="string"):[]};var presentationSchema=(schema)=>{const union=schema.anyOf??schema.oneOf;if(!Array.isArray(union)){return schema}const members=union.filter(isObject2);const values=members.filter((member)=>member.type!=="null");const[value]=values;if(members.length===2&&values.length===1&&value!==undefined){return{...schema,...value,type:[...scalarTypes(value),"null"]}}return schema};var defaultControl=(schema)=>{if(schema.$ref!==undefined||(schema.anyOf!==undefined||schema.oneOf!==undefined)&&schema.type===undefined){return"custom"}if(Array.isArray(schema.enum)){return"select"}const types=scalarTypes(schema);if(types.includes("boolean")){return"checkbox"}if(types.includes("number")||types.includes("integer")){return"number"}if(schema.format==="email"){return"email"}if(schema.format==="date"){return"date"}if(schema.format==="date-time"){return"datetime-local"}return types.some((type)=>type==="object"||type==="array")?"custom":"text"};var configuredControl=(config,schema)=>{switch(config.control){case"text":case"email":case"number":case"checkbox":case"date":case"datetime-local":case"select":case"custom":{return config.control}case undefined:{return defaultControl(schema)}default:{return"custom"}}};var formFields=(entity,mode)=>{const properties=schemaProperties(entity,mode);const entityProperties=schemaProperties(entity);const required=requiredFields(entity,mode);return entity.config.forms[mode].fields.map((name)=>{const config=entity.config.fields[name];if(config===undefined){throw new Error(`Missing entity field configuration: ${name}`)}const candidate=properties[name]??entityProperties[name];const schema=isObject2(candidate)?presentationSchema(candidate):{};const entityField=entityProperties[name];const enums=Array.isArray(schema.enum)?schema.enum.filter((value)=>typeof value==="string"||typeof value==="number"||typeof value==="boolean"):[];return{control:configuredControl(config,schema),label:config.label,name,nullable:scalarTypes(schema).includes("null")||Array.isArray(schema.enum)&&schema.enum.includes(null),options:enums.map((value)=>({label:String(value),value})),readOnly:config.readOnly===true||schema.readOnly===true||isObject2(entityField)&&entityField.readOnly===true,required:required.has(name)}})};var displayValue=(value)=>{if(value===null||value===undefined){return"—"}if(typeof value==="boolean"){return value?"Yes":"No"}return typeof value==="object"?JSON.stringify(value):String(value)};var renderField=(entity,record,name,renderers)=>{const renderer=entity.config.fields[name]?.renderer;return renderer===undefined||renderers?.[renderer]===undefined?displayValue(record.value[name]):renderers[renderer]({field:name,record})};var sortFor=(state,field)=>{const[current]=state.state.sort;return[{direction:current?.field===field&¤t.direction==="asc"?"desc":"asc",field}]};var QueryControls=({view})=>jsxDEV2(Xe,{controls:[{control:jsxDEV2(Qe,{label:"Search",onChange:(value)=>view.setTextSearch(value),value:view.state.textSearch},undefined,false,undefined,this),fullWidth:true,key:"search"}]},undefined,false,undefined,this);var EntityStatus=({state})=>{if(state.authState.status!=="authenticated"){return jsxDEV2("output",{children:state.authState.status},undefined,false,undefined,this)}if(state.loading){return jsxDEV2("output",{children:"Loading"},undefined,false,undefined,this)}if(state.error!==null){return jsxDEV2("output",{role:"alert",children:state.error.message},undefined,false,undefined,this)}return null};var EntityPagination=({result,view,pending})=>{if(result===undefined||result.pagination!=="page"){return null}return jsxDEV2(Ze,{currentPage:result.page,totalPages:result.totalPages,hasPreviousPage:result.page>1,hasNextPage:result.page<result.totalPages,isPending:pending,onPageChange:(page)=>view.setPage(page),onPrevious:()=>view.setPage(result.page-1),onNext:()=>view.setPage(result.page+1)},undefined,false,undefined,this)};var ControlledEntityTable=({entity,empty,renderers,variant,view})=>{const result=useEntityList(entity.contract,view.query);const names=variant===undefined?entity.config.table.columns:entity.config.table.variants?.[variant]?.columns??entity.config.table.columns;const columns=names.map((name)=>({id:name,label:entity.config.fields[name]?.label??name}));const hasStatus=result.authState.status!=="authenticated"||result.loading||result.error!==null;return jsxDEV2("section",{children:[jsxDEV2(QueryControls,{view},undefined,false,undefined,this),hasStatus?jsxDEV2(EntityStatus,{state:result},undefined,false,undefined,this):jsxDEV2(Fragment5,{children:[jsxDEV2(qe,{columns:columns.map((column)=>({...column,label:entity.contract.query.sortableFields.includes(column.id)?jsxDEV2("button",{type:"button",onClick:()=>view.setSort(sortFor(view,column.id)),children:column.label},undefined,false,undefined,this):column.label})),empty,getRowKey:(record)=>record.id,renderCell:(record,column)=>{const name=names.find((field)=>field===column.id);return name===undefined?null:renderField(entity,record,name,renderers)},rows:result.data?.items??[]},undefined,false,undefined,this),jsxDEV2(EntityPagination,{pending:result.refreshing,result:result.data,view},undefined,false,undefined,this)]},undefined,true,undefined,this)]},undefined,true,undefined,this)};var UrlEntityTable=(props)=>jsxDEV2(ControlledEntityTable,{...props,view:useEntityViewState(props.namespace,{contract:props.entity.contract,pageSize:props.pageSize??25})},undefined,false,undefined,this);var MemoryEntityTable=(props)=>jsxDEV2(ControlledEntityTable,{...props,view:useMemoryEntityViewState(props.pageSize===undefined?{}:{pageSize:props.pageSize})},undefined,false,undefined,this);var EntityTable=(props)=>props.viewState==="memory"?jsxDEV2(MemoryEntityTable,{...props},undefined,false,undefined,this):jsxDEV2(UrlEntityTable,{...props,namespace:props.namespace},undefined,false,undefined,this);var ControlledEntityList=({entity,empty,renderers,view})=>{const result=useEntityList(entity.contract,view.query);const hasStatus=result.authState.status!=="authenticated"||result.loading||result.error!==null;return jsxDEV2("section",{children:[jsxDEV2(QueryControls,{view},undefined,false,undefined,this),hasStatus?jsxDEV2(EntityStatus,{state:result},undefined,false,undefined,this):jsxDEV2(Fragment5,{children:[jsxDEV2(Ye,{empty,getItemKey:(record)=>record.id,items:result.data?.items??[],renderItem:(record)=>jsxDEV2("article",{children:[jsxDEV2("strong",{children:renderField(entity,record,entity.config.list.title,renderers)},undefined,false,undefined,this),entity.config.list.description===undefined?null:jsxDEV2("p",{children:renderField(entity,record,entity.config.list.description,renderers)},undefined,false,undefined,this)]},undefined,true,undefined,this)},undefined,false,undefined,this),jsxDEV2(EntityPagination,{pending:result.refreshing,result:result.data,view},undefined,false,undefined,this)]},undefined,true,undefined,this)]},undefined,true,undefined,this)};var UrlEntityList=(props)=>jsxDEV2(ControlledEntityList,{...props,view:useEntityViewState(props.namespace,{contract:props.entity.contract,pageSize:props.pageSize??25})},undefined,false,undefined,this);var MemoryEntityList=(props)=>jsxDEV2(ControlledEntityList,{...props,view:useMemoryEntityViewState(props.pageSize===undefined?{}:{pageSize:props.pageSize})},undefined,false,undefined,this);var EntityList=(props)=>props.viewState==="memory"?jsxDEV2(MemoryEntityList,{...props},undefined,false,undefined,this):jsxDEV2(UrlEntityList,{...props,namespace:props.namespace},undefined,false,undefined,this);var initialFormValues=(entity,mode,supplied,record)=>{const values={};const properties=schemaProperties(entity,mode);const required=requiredFields(entity,mode);for(const name of entity.config.forms[mode].fields){const schema=properties[name];if(required.has(name)&&isObject2(schema)&&scalarTypes(presentationSchema(schema)).includes("boolean")){values[name]=false}if(isObject2(schema)&&schema.default!==undefined){values[name]=schema.default}if(record?.value[name]!==undefined){values[name]=record.value[name]}if(supplied?.[name]!==undefined){values[name]=supplied[name]}}return values};var controlRenderer=(entity,controls)=>function renderEntityControl(props){const fields=entity.config.fields;const key=fields[props.field.name]?.control;return key===undefined||controls?.[key]===undefined?jsxDEV2("p",{role:"alert",children:["A custom control is required for ",props.field.label,"."]},undefined,true,undefined,this):controls[key](props)};var mutationMessage=(mutation)=>{if(mutation.status==="conflict"){return"This entity changed. Your draft is preserved."}if(mutation.status==="uncertain"){return"The write outcome is unknown. Resubmit the same action to resolve it."}return mutation.error?.resourceError.message};var writableValues=(fields,values)=>{const writable=new Set(fields.filter((field)=>!field.readOnly).map((field)=>field.name));return Object.fromEntries(Object.entries(values).filter(([name])=>writable.has(name)))};var displayedValues=(fields,values)=>Object.fromEntries(Object.entries(values).map(([name,value])=>{if(typeof value!=="string"||fields.find((field)=>field.name===name)?.control!=="datetime-local"){return[name,value]}const date=new Date(value);if(Number.isNaN(date.getTime())){return[name,value]}return[name,new Date(date.getTime()-date.getTimezoneOffset()*60000).toISOString().slice(0,23)]}));var wireValue=(fields,name,value)=>{if(typeof value!=="string"||value===""||fields.find((field)=>field.name===name)?.control!=="datetime-local"){return value}const date=new Date(value);return Number.isNaN(date.getTime())?value:date.toISOString()};var CreateEntityForm=(props)=>{const mutation=useEntityCreate(props.entity.contract);const[values,setValues]=useState19(()=>initialFormValues(props.entity,"create",props.initialValues));const fields=useMemo12(()=>formFields(props.entity,"create"),[props.entity]);return jsxDEV2(Ue,{label:"Create entity",fields,values:displayedValues(fields,values),disabled:!mutation.available,pending:mutation.pending,error:mutationMessage(mutation),...props.onCancel===undefined?{}:{onCancel:props.onCancel},onChange:(name,value)=>setValues((current)=>({...current,[name]:wireValue(fields,name,value)})),onSubmit:async()=>{const value=writableValues(fields,values);const action=mutation.status==="uncertain"?mutation.resubmit():mutation.submit({value});const result=await action;if(result.ok){props.onSuccess?.(result.value)}},renderControl:controlRenderer(props.entity,props.controls),submitLabel:mutation.status==="uncertain"?"Resubmit":"Create"},undefined,false,undefined,this)};var UpdateEntityForm=(props)=>{const mutation=useEntityUpdate(props.entity.contract,{id:props.record.id});const[draft,setDraft]=useState19(()=>({expectedRevision:props.record.revision,values:initialFormValues(props.entity,"update",props.initialValues,props.record)}));const{expectedRevision,values}=draft;const fields=useMemo12(()=>formFields(props.entity,"update"),[props.entity]);return jsxDEV2(Ue,{label:"Update entity",fields,values:displayedValues(fields,values),disabled:!mutation.available,pending:mutation.pending,error:mutationMessage(mutation),...props.onCancel===undefined?{}:{onCancel:props.onCancel},onChange:(name,value)=>setDraft((current)=>({...current,values:{...current.values,[name]:wireValue(fields,name,value)}})),onSubmit:async()=>{const value=writableValues(fields,values);const result=await(mutation.status==="uncertain"?mutation.resubmit():mutation.submit({expectedRevision,value}));if(result.ok){props.onSuccess?.(result.value)}},renderControl:controlRenderer(props.entity,props.controls),submitLabel:mutation.status==="uncertain"?"Resubmit":"Save"},undefined,false,undefined,this)};var EntityForm=(props)=>{const runtime=useEntityRuntime();if(runtime.state.status!=="authenticated"){return jsxDEV2("output",{children:runtime.state.status},undefined,false,undefined,this)}return props.mode==="create"?jsxDEV2(CreateEntityForm,{...props},runtime.formScope,false,undefined,this):jsxDEV2(UpdateEntityForm,{...props,record:props.record},JSON.stringify([runtime.formScope,props.record.id]),false,undefined,this)};
|
|
48
|
+
`)};var iJ=0;var G5=[];function o6(J2){var Z=p.useRef([]),Q=p.useRef([0,0]),q=p.useRef(),X2=p.useState(iJ++)[0],Y2=p.useState(k5)[0],K=p.useRef(J2);p.useEffect(function(){K.current=J2},[J2]),p.useEffect(function(){if(J2.inert){document.body.classList.add("block-interactivity-".concat(X2));var L=x6([J2.lockRef.current],(J2.shards||[]).map(a6),true).filter(Boolean);return L.forEach(function(j){return j.classList.add("allow-interactivity-".concat(X2))}),function(){document.body.classList.remove("block-interactivity-".concat(X2)),L.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(X2))})}}return},[J2.inert,J2.lockRef.current,J2.shards]);var W=p.useCallback(function(L,j){if("touches"in L&&L.touches.length===2||L.type==="wheel"&&L.ctrlKey)return!K.current.allowPinchZoom;var T=q1(L),F=Q.current,D="deltaX"in L?L.deltaX:F[0]-T[0],M2="deltaY"in L?L.deltaY:F[1]-T[1],O,I=L.target,N=Math.abs(D)>Math.abs(M2)?"h":"v";if("touches"in L&&N==="h"&&I.type==="range")return false;var b=window.getSelection(),A=b&&b.anchorNode,w=A?A===I||A.contains(I):false;if(w)return false;var g=G9(N,I);if(!g)return true;if(g)O=N;else O=N==="v"?"h":"v",g=G9(N,I);if(!g)return false;if(!q.current&&"changedTouches"in L&&(D||M2))q.current=O;if(!O)return true;var y=q.current||O;return s6(y,j,L,y==="h"?D:M2,true)},[]),z2=p.useCallback(function(L){var j=L;if(!G5.length||G5[G5.length-1]!==Y2)return;var T="deltaY"in j?r6(j):q1(j),F=Z.current.filter(function(O){return O.name===j.type&&(O.target===j.target||j.target===O.shadowParent)&&dJ(O.delta,T)})[0];if(F&&F.should){if(j.cancelable)j.preventDefault();return}if(!F){var D=(K.current.shards||[]).map(a6).filter(Boolean).filter(function(O){return O.contains(j.target)}),M2=D.length>0?W(j,D[0]):!K.current.noIsolation;if(M2){if(j.cancelable)j.preventDefault()}}},[]),B=p.useCallback(function(L,j,T,F){var D={name:L,delta:j,target:T,should:F,shadowParent:lJ(T)};Z.current.push(D),setTimeout(function(){Z.current=Z.current.filter(function(M2){return M2!==D})},1)},[]),H=p.useCallback(function(L){Q.current=q1(L),q.current=undefined},[]),G=p.useCallback(function(L){B(L.type,r6(L),L.target,W(L,J2.lockRef.current))},[]),$=p.useCallback(function(L){B(L.type,q1(L),L.target,W(L,J2.lockRef.current))},[]);p.useEffect(function(){return G5.push(Y2),J2.setCallbacks({onScrollCapture:G,onWheelCapture:G,onTouchMoveCapture:$}),document.addEventListener("wheel",z2,l02),document.addEventListener("touchmove",z2,l02),document.addEventListener("touchstart",H,l02),function(){G5=G5.filter(function(L){return L!==Y2}),document.removeEventListener("wheel",z2,l02),document.removeEventListener("touchmove",z2,l02),document.removeEventListener("touchstart",H,l02)}},[]);var{removeScrollBar:U2,inert:V2}=J2;return p.createElement(p.Fragment,null,V2?p.createElement(Y2,{styles:cJ(X2)}):null,U2?p.createElement(K9,{noRelative:J2.noRelative,gapMode:J2.gapMode}):null)}function lJ(J2){var Z=null;while(J2!==null){if(J2 instanceof ShadowRoot)Z=J2.host,J2=J2.host;J2=J2.parentNode}return Z}var n6=J9(Q1,o6);var t6=X1.forwardRef(function(J2,Z){return X1.createElement(N5,Y0({},J2,{ref:Z,sideCar:n6}))});t6.classNames=N5.classNames;var z9=t6;var sJ=Object.defineProperty;var C=(J2,Z)=>sJ(J2,"name",{value:Z,configurable:true});var $9=["Enter"," "];var rJ=["ArrowDown","PageUp","Home"];var J8=["ArrowUp","PageDown","End"];var aJ=[...rJ,...J8];var oJ={ltr:[...$9,"ArrowRight"],rtl:[...$9,"ArrowLeft"]};var nJ={ltr:["ArrowLeft"],rtl:["ArrowRight"]};var K1="Menu";var[A5,tJ,eJ]=H5(K1);var[s02,DY]=U02(K1,[eJ,v1,s1]);var W1=v1();var Z8=s1();var[Q8,C02]=s02(K1);var[JZ,b5]=s02(K1);var ZZ=C((J2)=>{let{__scopeMenu:Z,open:Q=false,children:q,dir:X2,onOpenChange:Y2,modal:K=true}=J2,W=W1(Z),[z2,B]=k2.useState(null),H=k2.useRef(false),G=e(Y2),$=V5(X2);return k2.useEffect(()=>{let U2=C(()=>{H.current=true,document.addEventListener("pointerdown",V2,{capture:true,once:true}),document.addEventListener("pointermove",V2,{capture:true,once:true})},"handleKeyDown"),V2=C(()=>H.current=false,"handlePointer");return document.addEventListener("keydown",U2,{capture:true}),()=>{document.removeEventListener("keydown",U2,{capture:true}),document.removeEventListener("pointerdown",V2,{capture:true}),document.removeEventListener("pointermove",V2,{capture:true})}},[]),k2.useEffect(()=>{if(!Q)return;let U2=C(()=>G(false),"handleBlur");return window.addEventListener("blur",U2),()=>window.removeEventListener("blur",U2)},[Q,G]),P(f1,{...W,children:P(Q8,{scope:Z,open:Q,onOpenChange:G,content:z2,onContentChange:B,children:P(JZ,{scope:Z,onClose:k2.useCallback(()=>G(false),[G]),isUsingKeyboardRef:H,dir:$,modal:K,children:q})})})},"Menu");var q8=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,...X2}=Z,Y2=W1(q);return P(G6,{...Y2,...X2,ref:Q})},"MenuAnchor"));var X8="MenuPortal";var[QZ,Y8]=s02(X8,{forceMount:undefined});var qZ=C((J2)=>{let{__scopeMenu:Z,forceMount:Q,children:q,container:X2}=J2,Y2=C02(X8,Z);return P(QZ,{scope:Z,forceMount:Q,children:P(O5,{present:Q||Y2.open,children:P(B6,{asChild:true,container:X2,children:q})})})},"MenuPortal");var T02="MenuContent";var[XZ,U9]=s02(T02);var YZ=k2.forwardRef(C(function(Z,Q){let q=Y8(T02,Z.__scopeMenu),{forceMount:X2=q.forceMount,...Y2}=Z,K=C02(T02,Z.__scopeMenu),W=b5(T02,Z.__scopeMenu);return P(A5.Provider,{scope:Z.__scopeMenu,children:P(O5,{present:X2||K.open,children:P(A5.Slot,{scope:Z.__scopeMenu,children:W.modal?P(KZ,{...Y2,ref:Q}):P(WZ,{...Y2,ref:Q})})})})},"MenuContent"));var KZ=k2.forwardRef(C(function(Z,Q){let q=C02(T02,Z.__scopeMenu),X2=k2.useRef(null),Y2=m(Q,X2);return k2.useEffect(()=>{let K=X2.current;if(K)return h6(K)},[]),P(H9,{...Z,ref:Y2,trapFocus:q.open,disableOutsidePointerEvents:q.open,disableOutsideScroll:true,onFocusOutside:x2(Z.onFocusOutside,(K)=>K.preventDefault(),{checkForDefaultPrevented:false}),onDismiss:()=>q.onOpenChange(false)})},"MenuRootContentModal"));var WZ=k2.forwardRef(C(function(Z,Q){let q=C02(T02,Z.__scopeMenu);return P(H9,{...Z,ref:Q,trapFocus:false,disableOutsidePointerEvents:false,disableOutsideScroll:false,onDismiss:()=>q.onOpenChange(false)})},"MenuRootContentNonModal"));var GZ=K0("MenuContent.ScrollLock");var H9=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,loop:X2=false,trapFocus:Y2,onOpenAutoFocus:K,onCloseAutoFocus:W,disableOutsidePointerEvents:z2,onEntryFocus:B,onEscapeKeyDown:H,onPointerDownOutside:G,onFocusOutside:$,onInteractOutside:U2,onDismiss:V2,disableOutsideScroll:L,...j}=Z,T=C02(T02,q),F=b5(T02,q),D=W1(q),M2=Z8(q),O=tJ(q),[I,N]=k2.useState(null),b=k2.useRef(null),A=m(Q,b,T.onContentChange),w=k2.useRef(0),g=k2.useRef(""),y=k2.useRef(0),S2=k2.useRef(null),_=k2.useRef("right"),d=k2.useRef(0),f2=L?z9:k2.Fragment,R=L?{as:GZ,allowPinchZoom:true}:undefined,h=C((E)=>{let A02=g.current+E,M02=O().filter((Z0)=>!Z0.disabled),S02=document.activeElement,$5=M02.find((Z0)=>Z0.ref.current===S02)?.textValue,B5=M02.map((Z0)=>Z0.textValue),y5=V8(B5,A02,$5),h02=M02.find((Z0)=>Z0.textValue===y5)?.ref.current;if(C(function Z0(r02){if(g.current=r02,window.clearTimeout(w.current),r02!=="")w.current=window.setTimeout(()=>Z0(""),1000)},"updateSearch")(A02),h02)setTimeout(()=>h02.focus())},"handleTypeaheadSearch");k2.useEffect(()=>{return()=>window.clearTimeout(w.current)},[]),x5();let u2=k2.useCallback((E)=>{return _.current===S2.current?.side&&j8(E,S2.current?.area)},[]);return P(XZ,{scope:q,searchRef:g,onItemEnter:k2.useCallback((E)=>{if(u2(E))E.preventDefault()},[u2]),onItemLeave:k2.useCallback((E)=>{if(u2(E))return;b.current?.focus(),N(null)},[u2]),onTriggerLeave:k2.useCallback((E)=>{if(u2(E))E.preventDefault()},[u2]),pointerGraceTimerRef:y,onPointerGraceIntentChange:k2.useCallback((E)=>{S2.current=E},[]),children:P(f2,{...R,children:P(o9,{asChild:true,trapped:Y2,onMountAutoFocus:x2(K,(E)=>{E.preventDefault(),b.current?.focus({preventScroll:true})}),onUnmountAutoFocus:W,children:P(c9,{asChild:true,disableOutsidePointerEvents:z2,onEscapeKeyDown:H,onPointerDownOutside:G,onFocusOutside:$,onInteractOutside:U2,onDismiss:V2,children:P(S6,{asChild:true,...M2,dir:F.dir,orientation:"vertical",loop:X2,currentTabStopId:I,onCurrentTabStopIdChange:N,onEntryFocus:x2(B,(E)=>{if(!F.isUsingKeyboardRef.current)E.preventDefault()}),preventScrollOnEntryFocus:true,children:P(z6,{role:"menu","aria-orientation":"vertical","data-state":L9(T.open),"data-radix-menu-content":"",dir:F.dir,...D,...j,ref:A,style:{outline:"none",...j.style},onKeyDown:x2(j.onKeyDown,(E)=>{let M02=E.target.closest("[data-radix-menu-content]")===E.currentTarget,S02=E.ctrlKey||E.altKey||E.metaKey,$5=E.key.length===1;if(M02){if(E.key==="Tab")E.preventDefault();if(!S02&&$5)h(E.key)}let B5=b.current;if(E.target!==B5)return;if(!aJ.includes(E.key))return;E.preventDefault();let h02=O().filter((Z0)=>!Z0.disabled).map((Z0)=>Z0.ref.current);if(J8.includes(E.key))h02.reverse();U8(h02)}),onBlur:x2(Z.onBlur,(E)=>{if(!E.currentTarget.contains(E.target))window.clearTimeout(w.current),g.current=""}),onPointerMove:x2(Z.onPointerMove,z5((E)=>{let A02=E.target,M02=d.current!==E.clientX;if(E.currentTarget.contains(A02)&&M02){let S02=E.clientX>d.current?"right":"left";_.current=S02,d.current=E.clientX}}))})})})})})})},"MenuContentImpl"));var K8=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,...X2}=Z;return P(c.div,{role:"group",...X2,ref:Q})},"MenuGroup"));var zZ=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,...X2}=Z;return P(c.div,{...X2,ref:Q})},"MenuLabel"));var B9="MenuItem";var e6="menu.itemSelect";var V9=k2.forwardRef(C(function(Z,Q){let{disabled:q=false,onSelect:X2,...Y2}=Z,K=k2.useRef(null),W=b5(B9,Z.__scopeMenu),z2=U9(B9,Z.__scopeMenu),B=m(Q,K),H=k2.useRef(false),G=C(()=>{let $=K.current;if(!q&&$){let U2=new CustomEvent(e6,{bubbles:true,cancelable:true});if($.addEventListener(e6,(V2)=>X2?.(V2),{once:true}),U5($,U2),U2.defaultPrevented)H.current=false;else W.onClose()}},"handleSelect");return P(W8,{...Y2,ref:B,disabled:q,onClick:x2(Z.onClick,G),onPointerDown:($)=>{Z.onPointerDown?.($),H.current=true},onPointerUp:x2(Z.onPointerUp,($)=>{if(!H.current)$.currentTarget?.click()}),onKeyDown:x2(Z.onKeyDown,($)=>{if(q||$.target!==$.currentTarget)return;if(z2.searchRef.current!==""&&$.key===" ")return;if($9.includes($.key))$.currentTarget.click(),$.preventDefault()})})},"MenuItem"));var W8=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,disabled:X2=false,textValue:Y2,...K}=Z,W=U9(B9,q),z2=Z8(q),B=k2.useRef(null),H=m(Q,B),[G,$]=k2.useState(false),[U2,V2]=k2.useState("");return k2.useEffect(()=>{let L=B.current;if(L)V2((L.textContent??"").trim())},[K.children]),P(A5.ItemSlot,{scope:q,disabled:X2,textValue:Y2??U2,children:P(R6,{asChild:true,...z2,focusable:!X2,children:P(c.div,{role:"menuitem","data-highlighted":G?"":undefined,"aria-disabled":X2||undefined,"data-disabled":X2?"":undefined,...K,ref:H,onPointerMove:x2(Z.onPointerMove,z5((L)=>{if(X2)W.onItemLeave(L);else if(W.onItemEnter(L),!L.defaultPrevented)L.currentTarget.focus({preventScroll:true})})),onPointerLeave:x2(Z.onPointerLeave,z5((L)=>W.onItemLeave(L))),onFocus:x2(Z.onFocus,()=>$(true)),onBlur:x2(Z.onBlur,()=>$(false))})})})},"MenuItemImpl"));var $Z=k2.forwardRef(C(function(Z,Q){let{checked:q=false,onCheckedChange:X2,...Y2}=Z;return P(z8,{scope:Z.__scopeMenu,checked:q,children:P(V9,{role:"menuitemcheckbox","aria-checked":E5(q)?"mixed":q,...Y2,ref:Q,"data-state":G1(q),onSelect:x2(Y2.onSelect,()=>X2?.(E5(q)?true:!q),{checkForDefaultPrevented:false})})})},"MenuCheckboxItem"));var BZ="MenuRadioGroup";var[UZ,HZ]=s02(BZ,{value:undefined,onValueChange:C(()=>{},"onValueChange")});var VZ=k2.forwardRef(C(function(Z,Q){let{value:q,onValueChange:X2,...Y2}=Z,K=e(X2);return P(UZ,{scope:Z.__scopeMenu,value:q,onValueChange:K,children:P(K8,{...Y2,ref:Q})})},"MenuRadioGroup"));var LZ="MenuRadioItem";var jZ=k2.forwardRef(C(function(Z,Q){let{value:q,...X2}=Z,Y2=HZ(LZ,Z.__scopeMenu),K=q===Y2.value;return P(z8,{scope:Z.__scopeMenu,checked:K,children:P(V9,{role:"menuitemradio","aria-checked":K,...X2,ref:Q,"data-state":G1(K),onSelect:x2(X2.onSelect,()=>Y2.onValueChange?.(q),{checkForDefaultPrevented:false})})})},"MenuRadioItem"));var G8="MenuItemIndicator";var[z8,FZ]=s02(G8,{checked:false});var DZ=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,forceMount:X2,...Y2}=Z,K=FZ(G8,q);return P(O5,{present:X2||E5(K.checked)||K.checked===true,children:P(c.span,{...Y2,ref:Q,"data-state":G1(K.checked)})})},"MenuItemIndicator"));var TZ=k2.forwardRef(C(function(Z,Q){let{__scopeMenu:q,...X2}=Z;return P(c.div,{role:"separator","aria-orientation":"horizontal",...X2,ref:Q})},"MenuSeparator"));var $8="MenuSub";var[MZ,B8]=s02($8);var OZ=C((J2)=>{let{__scopeMenu:Z,children:Q,open:q=false,onOpenChange:X2}=J2,Y2=C02($8,Z),K=W1(Z),[W,z2]=k2.useState(null),[B,H]=k2.useState(null),G=e(X2);return k2.useEffect(()=>{if(Y2.open===false)G(false);return()=>G(false)},[Y2.open,G]),P(f1,{...K,children:P(Q8,{scope:Z,open:q,onOpenChange:G,content:B,onContentChange:H,children:P(MZ,{scope:Z,contentId:e02(),triggerId:e02(),trigger:W,onTriggerChange:z2,children:Q})})})},"MenuSub");var Y1="MenuSubTrigger";var IZ=k2.forwardRef(C(function(Z,Q){let q=C02(Y1,Z.__scopeMenu),X2=b5(Y1,Z.__scopeMenu),Y2=B8(Y1,Z.__scopeMenu),K=U9(Y1,Z.__scopeMenu),W=k2.useRef(null),{pointerGraceTimerRef:z2,onPointerGraceIntentChange:B}=K,H={__scopeMenu:Z.__scopeMenu},G=k2.useCallback(()=>{if(W.current)window.clearTimeout(W.current);W.current=null},[]);k2.useEffect(()=>G,[G]),k2.useEffect(()=>{let U2=z2.current;return()=>{window.clearTimeout(U2),B(null)}},[z2,B]);let $=m(Q,Y2.onTriggerChange);return P(q8,{asChild:true,...H,children:P(W8,{id:Y2.triggerId,"aria-haspopup":"menu","aria-expanded":q.open,"aria-controls":q.open?Y2.contentId:undefined,"data-state":L9(q.open),...Z,ref:$,onClick:(U2)=>{if(Z.onClick?.(U2),Z.disabled||U2.defaultPrevented)return;if(U2.currentTarget.focus(),!q.open)q.onOpenChange(true)},onPointerMove:x2(Z.onPointerMove,z5((U2)=>{if(K.onItemEnter(U2),U2.defaultPrevented)return;if(!Z.disabled&&!q.open&&!W.current)K.onPointerGraceIntentChange(null),W.current=window.setTimeout(()=>{q.onOpenChange(true),G()},100)})),onPointerLeave:x2(Z.onPointerLeave,z5((U2)=>{G();let V2=q.content?.getBoundingClientRect();if(V2){let L=q.content?.dataset.side,j=L==="right",T=j?-5:5,F=V2[j?"left":"right"],D=V2[j?"right":"left"];K.onPointerGraceIntentChange({area:[{x:U2.clientX+T,y:U2.clientY},{x:F,y:V2.top},{x:D,y:V2.top},{x:D,y:V2.bottom},{x:F,y:V2.bottom}],side:L}),window.clearTimeout(z2.current),z2.current=window.setTimeout(()=>K.onPointerGraceIntentChange(null),300)}else{if(K.onTriggerLeave(U2),U2.defaultPrevented)return;K.onPointerGraceIntentChange(null)}})),onKeyDown:x2(Z.onKeyDown,(U2)=>{if(Z.disabled||U2.target!==U2.currentTarget)return;if(K.searchRef.current!==""&&U2.key===" ")return;if(oJ[X2.dir].includes(U2.key))q.onOpenChange(true),q.content?.focus(),U2.preventDefault()})})})},"MenuSubTrigger"));var NZ="MenuSubContent";var kZ=k2.forwardRef(C(function(Z,Q){let q=Y8(T02,Z.__scopeMenu),{forceMount:X2=q.forceMount,align:Y2="start",...K}=Z,W=C02(T02,Z.__scopeMenu),z2=b5(T02,Z.__scopeMenu),B=B8(NZ,Z.__scopeMenu),H=k2.useRef(null),G=m(Q,H);return P(A5.Provider,{scope:Z.__scopeMenu,children:P(O5,{present:X2||W.open,children:P(A5.Slot,{scope:Z.__scopeMenu,children:P(H9,{id:B.contentId,"aria-labelledby":B.triggerId,...K,ref:G,align:Y2,side:z2.dir==="rtl"?"left":"right",disableOutsidePointerEvents:false,disableOutsideScroll:false,trapFocus:false,onOpenAutoFocus:($)=>{if(z2.isUsingKeyboardRef.current)H.current?.focus();$.preventDefault()},onCloseAutoFocus:($)=>$.preventDefault(),onFocusOutside:x2(Z.onFocusOutside,($)=>{if($.target!==B.trigger)W.onOpenChange(false)}),onEscapeKeyDown:x2(Z.onEscapeKeyDown,($)=>{z2.onClose(),$.preventDefault()}),onKeyDown:x2(Z.onKeyDown,($)=>{let U2=$.currentTarget.contains($.target),V2=nJ[z2.dir].includes($.key);if(U2&&V2)W.onOpenChange(false),B.trigger?.focus(),$.preventDefault()})})})})})},"MenuSubContent"));function L9(J2){return J2?"open":"closed"}C(L9,"getOpenState");function E5(J2){return J2==="indeterminate"}C(E5,"isIndeterminate");function G1(J2){return E5(J2)?"indeterminate":J2?"checked":"unchecked"}C(G1,"getCheckedState");function U8(J2){let Z=document.activeElement;for(let Q of J2){if(Q===Z)return;if(Q.focus(),document.activeElement!==Z)return}}C(U8,"focusFirst");function H8(J2,Z){return J2.map((Q,q)=>J2[(Z+q)%J2.length])}C(H8,"wrapArray");function V8(J2,Z,Q){let X2=Z.length>1&&Array.from(Z).every((B)=>B===Z[0])?Z[0]:Z,Y2=Q?J2.indexOf(Q):-1,K=H8(J2,Math.max(Y2,0));if(X2.length===1)K=K.filter((B)=>B!==Q);let z2=K.find((B)=>B.toLowerCase().startsWith(X2.toLowerCase()));return z2!==Q?z2:undefined}C(V8,"getNextMatch");function L8(J2,Z){let{x:Q,y:q}=J2,X2=false;for(let Y2=0,K=Z.length-1;Y2<Z.length;K=Y2++){let W=Z[Y2],z2=Z[K],B=W.x,H=W.y,G=z2.x,$=z2.y;if(H>q!==$>q&&Q<(G-B)*(q-H)/($-H)+B)X2=!X2}return X2}C(L8,"isPointInPolygon");function j8(J2,Z){if(!Z)return false;let Q={x:J2.clientX,y:J2.clientY};return L8(Q,Z)}C(j8,"isPointerInGraceArea");function z5(J2){return(Z)=>Z.pointerType==="mouse"?J2(Z):undefined}C(z5,"whenMouse");var TY=ZZ;var MY=q8;var OY=qZ;var IY=YZ;var NY=K8;var kY=zZ;var AY=V9;var EY=$Z;var bY=VZ;var yY=jZ;var PY=DZ;var wY=TZ;var SY=OZ;var RY=IZ;var CY=kZ;import{forwardRef as H2,createElement as Z2}from"react";import{forwardRef as x22,createElement as c03}from"react";import{jsx as _02,jsxs as s72}from"react/jsx-runtime";import{jsx as d03,jsxs as i72}from"react/jsx-runtime";import{jsx as S2}from"react/jsx-runtime";import{jsx as h2}from"react/jsx-runtime";var g=(...S3)=>S3.filter((h,E,v2)=>{return Boolean(h)&&h.trim()!==""&&v2.indexOf(h)===E}).join(" ").trim();var n03=(S3)=>S3.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var i03=(S3)=>S3.replace(/^([A-Z])|[\s-_]+(\w)/g,(h,E,v2)=>v2?v2.toUpperCase():E.toLowerCase());var a03=(S3)=>{let h=i03(S3);return h.charAt(0).toUpperCase()+h.slice(1)};var o03={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var e03=(S3)=>{for(let h in S3)if(h.startsWith("aria-")||h==="role"||h==="title")return true;return false};var y2=x22(({color:S3="currentColor",size:h=24,strokeWidth:E=2,absoluteStrokeWidth:v2,className:r02="",children:P2,iconNode:V2,...s03},E2)=>c03("svg",{ref:E2,...o03,width:h,height:h,stroke:S3,strokeWidth:v2?Number(E)*24/Number(h):E,className:g("lucide",r02),...!P2&&!e03(s03)&&{"aria-hidden":"true"},...s03},[...V2.map(([v22,G2])=>c03(v22,G2)),...Array.isArray(P2)?P2:[P2]]));var y=(S3,h)=>{let E=H2(({className:v2,...r02},P2)=>Z2(y2,{ref:P2,iconNode:h,className:g(`lucide-${n03(a03(S3))}`,`lucide-${S3}`,v2),...r02}));return E.displayName=a03(S3),E};var $2=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]];var H=y("braces",$2);var B2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]];var Z=y("circle-alert",B2);var J2=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]];var $=y("circle-check-big",J2);var Q2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]];var B=y("circle-check",Q2);var Y2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]];var J3=y("circle-plus",Y2);var q2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]];var Q=y("circle-user",q2);var K2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]];var Y3=y("circle-x",K2);var T2=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]];var q=y("code-xml",T2);var X2=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]];var G=y("ellipsis-vertical",X2);var O2=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]];var x3=y("ellipsis",O2);var k22=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]];var K=y("funnel",k22);var D2=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]];var T=y("house",D2);var f2=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]];var X3=y("layers",f2);var W2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]];var O=y("loader-circle",W2);var F2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]];var k3=y("panel-left",F2);var A2=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]];var D=y("send-horizontal",A2);var P2=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m14.5 9.5-5 5",key:"17q4r4"}],["path",{d:"m9.5 9.5 5 5",key:"18nt4w"}]];var f3=y("shield-x",P2);var z2=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]];var W=y("sparkles",z2);var C2=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]];var V2=y("square-pen",C2);var b2=[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]];var F=y("test-tube-diagonal",b2);var w2=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]];var A=y("triangle-alert",w2);var M2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]];var I=y("activity",M2);var l22=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]];var N=y("app-window",l22);var R2=[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]];var t2=y("apple",R2);var U2=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]];var L=y("archive",U2);var m2=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]];var p2=y("arrow-down",m2);var g2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]];var j=y("arrow-left",g2);var I2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]];var u2=y("arrow-right",I2);var N2=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]];var _=y("arrow-up-down",N2);var t22=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]];var d=y("arrow-up",t22);var L2=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]];var r2=y("at-sign",L2);var p22=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]];var a2=y("award",p22);var j2=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]];var z3=y("bell",j2);var u22=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]];var s2=y("book",u22);var _2=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]];var n2=y("bot",_2);var d2=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]];var i3=y("box",d2);var r22=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]];var o2=y("briefcase",r22);var a22=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]];var e2=y("building",a22);var s22=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]];var c2=y("calculator",s22);var n22=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]];var y12=y("calendar-days",n22);var i22=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]];var S12=y("calendar",i22);var o22=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]];var C3=y("check",o22);var e22=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]];var b=y("chevron-down",e22);var c22=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]];var w=y("chevron-left",c22);var y42=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]];var M3=y("chevron-right",y42);var S42=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]];var l3=y("chevron-up",S42);var h42=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]];var h12=y("chevrons-up-down",h42);var V42=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]];var V12=y("circle",V42);var E42=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]];var E12=y("clock",E42);var v42=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]];var v12=y("cloud",v42);var G42=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]];var G12=y("code",G42);var x42=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]];var x12=y("copy",x42);var H42=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]];var H12=y("cpu",H42);var Z42=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]];var R=y("credit-card",Z42);var $42=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]];var Z12=y("database",$42);var B42=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]];var $12=y("dot",B42);var J42=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]];var B12=y("download",J42);var Q42=[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]];var J12=y("eraser",Q42);var Y42=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]];var Q12=y("external-link",Y42);var q42=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]];var Y12=y("eye-off",q42);var K42=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]];var q12=y("eye",K42);var T42=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]];var K12=y("file-spreadsheet",T42);var X42=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]];var T12=y("file-text",X42);var O42=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]];var X12=y("file",O42);var k42=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]];var O12=y("folder-input",k42);var D42=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]];var k12=y("folder-open",D42);var f42=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]];var D12=y("folder-plus",f42);var W42=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]];var f12=y("folder",W42);var F42=[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]];var W12=y("git-compare-arrows",F42);var A42=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]];var F12=y("git-fork",A42);var P42=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]];var A12=y("globe",P42);var z42=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]];var P12=y("grip-vertical",z42);var C42=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]];var z12=y("hash",C42);var b42=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]];var C12=y("history",b42);var w42=[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]];var b12=y("id-card",w42);var M42=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]];var w12=y("inbox",M42);var l42=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]];var M12=y("info",l42);var R42=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]];var l12=y("key",R42);var U42=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]];var R12=y("layout-grid",U42);var m42=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]];var U12=y("layout-dashboard",m42);var g42=[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]];var m12=y("link-2-off",g42);var I42=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]];var g12=y("link-2",I42);var N42=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]];var I12=y("list-filter",N42);var t42=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]];var N12=y("list",t42);var L42=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]];var t12=y("log-out",L42);var p42=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]];var L12=y("mail",p42);var j42=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]];var p12=y("map-pin",j42);var u42=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]];var j12=y("maximize",u42);var _42=[["path",{d:"M11 6a13 13 0 0 0 8.4-2.8A1 1 0 0 1 21 4v12a1 1 0 0 1-1.6.8A13 13 0 0 0 11 14H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2z",key:"q8bfy3"}],["path",{d:"M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14",key:"1853fq"}],["path",{d:"M8 6v8",key:"15ugcq"}]];var u12=y("megaphone",_42);var d42=[["path",{d:"M12 12v-2",key:"fwoke6"}],["path",{d:"M12 18v-2",key:"qj6yno"}],["path",{d:"M16 12v-2",key:"heuere"}],["path",{d:"M16 18v-2",key:"s1ct0w"}],["path",{d:"M2 11h1.5",key:"15p63e"}],["path",{d:"M20 18v-2",key:"12ehxp"}],["path",{d:"M20.5 11H22",key:"khsy7a"}],["path",{d:"M4 18v-2",key:"1c3oqr"}],["path",{d:"M8 12v-2",key:"1mwtfd"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["rect",{x:"2",y:"6",width:"20",height:"10",rx:"2",key:"1qcswk"}]];var _12=y("memory-stick",d42);var r42=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 8v6",key:"1ib9pf"}],["path",{d:"M9 11h6",key:"1fldmi"}]];var d12=y("message-square-plus",r42);var a42=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]];var r12=y("message-square",a42);var s42=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]];var a12=y("mic",s42);var n42=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]];var s12=y("minimize-2",n42);var i42=[["path",{d:"M5 12h14",key:"1ays0h"}]];var n12=y("minus",i42);var o42=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]];var i12=y("monitor",o42);var e42=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]];var o12=y("moon",e42);var c42=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]];var e12=y("panel-top",c42);var y72=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]];var c12=y("paperclip",y72);var S72=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]];var y03=y("pause",S72);var h72=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]];var S02=y("pencil",h72);var V72=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]];var h02=y("play",V72);var E72=[["path",{d:"M9 2v6",key:"17ngun"}],["path",{d:"M15 2v6",key:"s7yy2p"}],["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M5 8h14",key:"pcz4l3"}],["path",{d:"M6 11V8h12v3a6 6 0 1 1-12 0Z",key:"wtfw2c"}]];var V02=y("plug-2",E72);var v7=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]];var E03=y("plus",v7);var G72=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]];var v03=y("power",G72);var x72=[["path",{d:"M12 17V7",key:"pyj7ub"}],["path",{d:"M16 8h-6a2 2 0 0 0 0 4h4a2 2 0 0 1 0 4H8",key:"1elt7d"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]];var G03=y("receipt",x72);var H72=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]];var x03=y("refresh-cw",H72);var Z72=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]];var H02=y("rocket",Z72);var $72=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]];var Z0=y("rotate-ccw",$72);var B72=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]];var $02=y("save",B72);var J72=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]];var U3=y("search",J72);var Q72=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]];var B03=y("send",Q72);var Y72=[["path",{d:"M6 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2",key:"4b9dqc"}],["path",{d:"M6 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-2",key:"22nnkd"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m13 6-4 6h6l-4 6",key:"14hqih"}]];var J03=y("server-crash",Y72);var q72=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]];var Q03=y("settings-2",q72);var K72=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]];var Y02=y("settings",K72);var T72=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]];var q02=y("shield-alert",T72);var X72=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]];var K02=y("shield-check",X72);var O72=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]];var T03=y("shield",O72);var k72=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}]];var X03=y("signal-high",k72);var D72=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}]];var O03=y("signal-medium",D72);var f72=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}]];var k03=y("signal-low",f72);var W72=[["path",{d:"M2 20h.01",key:"4haj6o"}],["path",{d:"M7 20v-4",key:"j294jx"}],["path",{d:"M12 20v-8",key:"i3yub9"}],["path",{d:"M17 20V8",key:"1tkaf5"}],["path",{d:"M22 4v16",key:"sih9yq"}]];var D02=y("signal",W72);var F72=[["path",{d:"M14 13V8.5C14 7 15 7 15 5a3 3 0 0 0-6 0c0 2 1 2 1 3.5V13",key:"i9gjdv"}],["path",{d:"M20 15.5a2.5 2.5 0 0 0-2.5-2.5h-11A2.5 2.5 0 0 0 4 15.5V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1z",key:"1vzg3v"}],["path",{d:"M5 22h14",key:"ehvnwv"}]];var f03=y("stamp",F72);var A72=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]];var W03=y("sun",A72);var P72=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]];var F02=y("table",P72);var z72=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]];var A02=y("tag",z72);var C72=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]];var P03=y("terminal",C72);var b72=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]];var z03=y("test-tube",b72);var w72=[["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}],["path",{d:"M17 14V2",key:"8ymqnk"}]];var C03=y("thumbs-down",w72);var M72=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]];var b03=y("thumbs-up",M72);var l72=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]];var w03=y("toggle-left",l72);var R72=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]];var M02=y("trash-2",R72);var U72=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]];var l03=y("trending-up",U72);var m72=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]];var R03=y("type",m72);var g72=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]];var U03=y("upload",g72);var I72=[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]];var m03=y("user-check",I72);var N72=[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]];var g03=y("user-cog",N72);var t7=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]];var I03=y("user-plus",t7);var L72=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]];var N03=y("user-x",L72);var p72=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]];var t03=y("user",p72);var j72=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]];var L03=y("users",j72);var u72=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]];var p03=y("workflow",u72);var _72=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]];var j03=y("wrench",_72);var d72=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]];var m3=y("x",d72);var r72=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]];var u03=y("zap",r72);var kV0=y("linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{height:"12",key:"mk3on5",width:"4",x:"2",y:"9"}],["circle",{cx:"4",cy:"4",key:"bt5ra8",r:"2"}]]);import*as k10 from"react";import{Fragment as ai,jsx as q3,jsxs as mi}from"react/jsx-runtime";import{jsx as v2,jsxs as O3}from"react/jsx-runtime";import*as P3 from"react";import{Fragment as Xi,jsx as c3}from"react/jsx-runtime";import{jsx as Q3,jsxs as j3}from"react/jsx-runtime";import{jsx as oi}from"react/jsx-runtime";import{jsx as V3,jsxs as r3}from"react/jsx-runtime";import{jsx as Y10}from"react/jsx-runtime";import*as et from"react";import{jsx as Ei}from"react/jsx-runtime";import{jsx as ji}from"react/jsx-runtime";var ii=Object.defineProperty;var h=(i10,t3)=>ii(i10,"name",{value:t3,configurable:true});var R3="ContextMenu";var[bi,ba]=U02(R3,[DY]);var J10=DY();var[di,vt]=bi(R3);var li=h((i10)=>{let{__scopeContextMenu:t3,children:a3,onOpenChange:m10,open:b3,dir:d3,modal:l10=true}=i10,y3=k10.useRef(false);if(S5){let F3=k10.useRef(false);k10.useEffect(()=>{if(b3===true&&!y3.current&&!F3.current)F3.current=true,console.warn("ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport.")},[b3])}let[z10,X10]=p1({prop:b3,defaultProp:false,onChange:m10,caller:R3}),U10=J10(t3);return q3(di,{scope:t3,open:z10,onOpenChange:X10,modal:l10,hasInteractedRef:y3,children:q3(TY,{...U10,dir:d3,open:z10,onOpenChange:X10,modal:l10,children:a3})})},"ContextMenu");var ni="ContextMenuTrigger";var yi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,disabled:b3=false,...d3}=t3,l10=vt(ni,m10),y3=J10(m10),[z10,X10]=k10.useState({x:0,y:0}),U10=k10.useMemo(()=>({current:{getBoundingClientRect:h(()=>DOMRect.fromRect({width:0,height:0,...z10}),"getBoundingClientRect")}}),[z10]),F3=k10.useRef(0),Z3=k10.useCallback(()=>window.clearTimeout(F3.current),[]),f10=h((W3)=>{l10.hasInteractedRef.current=true,X10({x:W3.clientX,y:W3.clientY}),l10.onOpenChange(true)},"handleOpen");return k10.useEffect(()=>Z3,[Z3]),k10.useEffect(()=>void(b3&&Z3()),[b3,Z3]),mi(ai,{children:[q3(MY,{...y3,virtualRef:U10}),q3(c.span,{"data-state":l10.open?"open":"closed","data-disabled":b3?"":undefined,...d3,ref:a3,style:{WebkitTouchCallout:"none",...t3.style},onContextMenu:b3?t3.onContextMenu:x2(t3.onContextMenu,(W3)=>{Z3(),f10(W3),W3.preventDefault()}),onPointerDown:b3?t3.onPointerDown:x2(t3.onPointerDown,u3((W3)=>{if(Z3(),l10.open)l10.onOpenChange(false);F3.current=window.setTimeout(()=>f10(W3),700)})),onPointerMove:b3?t3.onPointerMove:x2(t3.onPointerMove,u3(Z3)),onPointerCancel:b3?t3.onPointerCancel:x2(t3.onPointerCancel,u3(Z3)),onPointerUp:b3?t3.onPointerUp:x2(t3.onPointerUp,u3(Z3))})]})},"ContextMenuTrigger"));var ki=h((i10)=>{let{__scopeContextMenu:t3,...a3}=i10,m10=J10(t3);return q3(OY,{...m10,...a3})},"ContextMenuPortal");var zi="ContextMenuContent";var Pi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=vt(zi,m10),l10=J10(m10),y3=k10.useRef(false);return q3(IY,{...l10,...b3,ref:a3,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:(z10)=>{if(t3.onCloseAutoFocus?.(z10),!z10.defaultPrevented&&y3.current)z10.preventDefault();y3.current=false},onInteractOutside:(z10)=>{if(t3.onInteractOutside?.(z10),!z10.defaultPrevented&&!d3.modal)y3.current=true},style:{...t3.style,...{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}})},"ContextMenuContent"));var vi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(NY,{...d3,...b3,ref:a3})},"ContextMenuGroup"));var ci=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(kY,{...d3,...b3,ref:a3})},"ContextMenuLabel"));var hi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(AY,{...d3,...b3,ref:a3})},"ContextMenuItem"));var qi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(EY,{...d3,...b3,ref:a3})},"ContextMenuCheckboxItem"));var Ji=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(bY,{...d3,...b3,ref:a3})},"ContextMenuRadioGroup"));var Ki=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(yY,{...d3,...b3,ref:a3})},"ContextMenuRadioItem"));var Qi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(PY,{...d3,...b3,ref:a3})},"ContextMenuItemIndicator"));var $i=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(wY,{...d3,...b3,ref:a3})},"ContextMenuSeparator"));var Zi="ContextMenuSub";var gi=h((i10)=>{let{__scopeContextMenu:t3,children:a3,onOpenChange:m10,open:b3,defaultOpen:d3}=i10,l10=J10(t3),[y3,z10]=p1({prop:b3,defaultProp:d3??false,onChange:m10,caller:Zi});return q3(SY,{...l10,open:y3,onOpenChange:z10,children:a3})},"ContextMenuSub");var Bi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(RY,{...d3,...b3,ref:a3})},"ContextMenuSubTrigger"));var Vi=k10.forwardRef(h(function(t3,a3){let{__scopeContextMenu:m10,...b3}=t3,d3=J10(m10);return q3(CY,{...d3,...b3,ref:a3,style:{...t3.style,...{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}})},"ContextMenuSubContent"));function u3(i10){return(t3)=>t3.pointerType!=="mouse"?i10(t3):undefined}h(u3,"whenTouchOrPen");var ct=li;var ht=yi;var M8=ki;var qt=Pi;var na=({...i10})=>v2(ct,{"data-slot":"context-menu",...i10});var ya=({...i10})=>v2(ht,{"data-slot":"context-menu-trigger",...i10});var qa=({className:i10,...t3})=>v2(M8,{children:v2(qt,{"data-slot":"context-menu-content",className:Pq("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",i10),...t3})});var Yi=Object.defineProperty;var K3=(i10,t3)=>Yi(i10,"name",{value:t3,configurable:true});var D3="Dialog";var[Ct,Ra]=U02(D3);var[Ui,g3]=Ct(D3);var Tt=K3((i10)=>{let{__scopeDialog:t3,children:a3,open:m10,defaultOpen:b3,onOpenChange:d3,modal:l10=true}=i10,y3=P3.useRef(null),z10=P3.useRef(null),[X10,U10]=p1({prop:m10,defaultProp:b3??false,onChange:d3,caller:D3}),[F3,Z3]=P3.useState(0),[f10,W3]=P3.useState(0);return c3(Ui,{scope:t3,triggerRef:y3,contentRef:z10,contentId:e02(),titleId:e02(),descriptionId:e02(),titlePresent:F3>0,descriptionPresent:f10>0,setTitleCount:Z3,setDescriptionCount:W3,open:X10,onOpenChange:U10,onOpenToggle:P3.useCallback(()=>U10((ti)=>!ti),[U10]),modal:l10,children:a3})},"Dialog");var Fi="DialogTrigger";var wt=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,...b3}=t3,d3=g3(Fi,m10),l10=m(a3,d3.triggerRef);return c3(c.button,{type:"button","aria-haspopup":"dialog","aria-expanded":d3.open,"aria-controls":d3.open?d3.contentId:undefined,"data-state":w3(d3.open),...b3,ref:l10,onClick:x2(t3.onClick,d3.onOpenToggle)})},"DialogTrigger"));var At="DialogPortal";var[ui,Rt]=Ct(At,{forceMount:undefined});var Mt=K3((i10)=>{let{__scopeDialog:t3,forceMount:a3,children:m10,container:b3}=i10,d3=g3(At,t3);return c3(ui,{scope:t3,forceMount:a3,children:P3.Children.map(m10,(l10)=>c3(O5,{present:a3||d3.open,children:c3(B6,{asChild:true,container:b3,children:l10})}))})},"DialogPortal");var S3="DialogOverlay";var ot=P3.forwardRef(K3(function(t3,a3){let m10=Rt(S3,t3.__scopeDialog),{forceMount:b3=m10.forceMount,...d3}=t3,l10=g3(S3,t3.__scopeDialog);return l10.modal?c3(O5,{present:b3||l10.open,children:c3(Hi,{...d3,ref:a3})}):null},"DialogOverlay"));var Gi=K0("DialogOverlay.RemoveScroll");var Hi=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,...b3}=t3,d3=g3(S3,m10),l10=a8(),y3=m(a3,l10);return c3(z9,{as:Gi,allowPinchZoom:true,shards:[d3.contentRef],children:c3(c.div,{"data-state":w3(d3.open),...b3,ref:y3,style:{pointerEvents:"auto",...b3.style}})})},"DialogOverlayImpl"));var H3="DialogContent";var Ot=P3.forwardRef(K3(function(t3,a3){let m10=Rt(H3,t3.__scopeDialog),{forceMount:b3=m10.forceMount,...d3}=t3,l10=g3(H3,t3.__scopeDialog);return c3(O5,{present:b3||l10.open,children:l10.modal?c3(fi,{...d3,ref:a3}):c3(Ii,{...d3,ref:a3})})},"DialogContent"));var fi=P3.forwardRef(K3(function(t3,a3){let m10=g3(H3,t3.__scopeDialog),b3=P3.useRef(null),d3=m(a3,m10.contentRef,b3);return P3.useEffect(()=>{let l10=b3.current;if(l10)return h6(l10)},[]),c3(St,{...t3,ref:d3,trapFocus:m10.open,disableOutsidePointerEvents:m10.open,onCloseAutoFocus:x2(t3.onCloseAutoFocus,(l10)=>{l10.preventDefault(),m10.triggerRef.current?.focus()}),onPointerDownOutside:x2(t3.onPointerDownOutside,(l10)=>{let y3=l10.detail.originalEvent,z10=y3.button===0&&y3.ctrlKey===true;if(y3.button===2||z10)l10.preventDefault()}),onFocusOutside:x2(t3.onFocusOutside,(l10)=>l10.preventDefault())})},"DialogContentModal"));var Ii=P3.forwardRef(K3(function(t3,a3){let m10=g3(H3,t3.__scopeDialog),b3=P3.useRef(false),d3=P3.useRef(false);return c3(St,{...t3,ref:a3,trapFocus:false,disableOutsidePointerEvents:false,onCloseAutoFocus:(l10)=>{if(t3.onCloseAutoFocus?.(l10),!l10.defaultPrevented){if(!b3.current)m10.triggerRef.current?.focus();l10.preventDefault()}b3.current=false,d3.current=false},onInteractOutside:(l10)=>{if(t3.onInteractOutside?.(l10),!l10.defaultPrevented){if(b3.current=true,l10.detail.originalEvent.type==="pointerdown")d3.current=true}let y3=l10.target;if(m10.triggerRef.current?.contains(y3))l10.preventDefault();if(l10.detail.originalEvent.type==="focusin"&&d3.current)l10.preventDefault()}})},"DialogContentNonModal"));var St=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,trapFocus:b3,onOpenAutoFocus:d3,onCloseAutoFocus:l10,...y3}=t3,z10=g3(H3,m10);return x5(),c3(Xi,{children:c3(o9,{asChild:true,loop:true,trapped:b3,onMountAutoFocus:d3,onUnmountAutoFocus:l10,children:c3(c9,{role:"dialog",id:z10.contentId,"aria-describedby":z10.descriptionPresent?z10.descriptionId:undefined,"aria-labelledby":z10.titlePresent?z10.titleId:undefined,"data-state":w3(z10.open),...y3,ref:a3,deferPointerDownOutside:true,onDismiss:()=>z10.onOpenChange(false)})})})},"DialogContentImpl"));var Li="DialogTitle";var Et=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,...b3}=t3,d3=g3(Li,m10),{setTitleCount:l10}=d3;return l2(()=>{return l10((y3)=>y3+1),()=>l10((y3)=>y3-1)},[l10]),c3(c.h2,{id:d3.titleId,...b3,ref:a3})},"DialogTitle"));var Ni="DialogDescription";var Dt=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,...b3}=t3,d3=g3(Ni,m10),{setDescriptionCount:l10}=d3;return l2(()=>{return l10((y3)=>y3+1),()=>l10((y3)=>y3-1)},[l10]),c3(c.p,{id:d3.descriptionId,...b3,ref:a3})},"DialogDescription"));var Ci="DialogClose";var x10=P3.forwardRef(K3(function(t3,a3){let{__scopeDialog:m10,...b3}=t3,d3=g3(Ci,m10);return c3(c.button,{type:"button",...b3,ref:a3,onClick:x2(t3.onClick,()=>d3.onOpenChange(false))})},"DialogClose"));function w3(i10){return i10?"open":"closed"}K3(w3,"getState");var Oa=({...i10})=>Q3(Tt,{"data-slot":"dialog",...i10});var wi=({...i10})=>Q3(Mt,{"data-slot":"dialog-portal",...i10});var Ai=({className:i10,...t3})=>Q3(ot,{"data-slot":"dialog-overlay",className:Pq("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",i10),...t3});var Ri={lg:"sm:max-w-2xl",md:"sm:max-w-lg",xl:"sm:max-w-4xl"};var Mi={content:"",viewport:"max-h-[calc(100vh-2rem)]"};var Da=({className:i10,children:t3,fixedBottom:a3=false,height:m10="viewport",size:b3="md",showCloseButton:d3=true,...l10})=>j3(wi,{"data-slot":"dialog-portal",children:[Q3(Ai,{}),j3(Ot,{"data-slot":"dialog-content",className:Pq("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex flex-col w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200",Ri[b3],Mi[m10],a3&&"[&_[data-slot=dialog-footer]]:sticky [&_[data-slot=dialog-footer]]:bottom-0 [&_[data-slot=dialog-footer]]:z-10 [&_[data-slot=dialog-footer]]:-mx-6 [&_[data-slot=dialog-footer]]:border-t [&_[data-slot=dialog-footer]]:bg-background [&_[data-slot=dialog-footer]]:px-6 [&_[data-slot=dialog-footer]]:py-4 [&_[data-slot=form-actions]]:sticky [&_[data-slot=form-actions]]:bottom-0 [&_[data-slot=form-actions]]:z-10 [&_[data-slot=form-actions]]:-mx-6 [&_[data-slot=form-actions]]:border-t [&_[data-slot=form-actions]]:bg-background [&_[data-slot=form-actions]]:px-6 [&_[data-slot=form-actions]]:py-4",i10),...l10,children:[t3,d3?j3(x10,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[Q3(m3,{}),Q3("span",{className:"sr-only",children:"Close"})]}):null]})]});var sa=({className:i10,...t3})=>Q3(Et,{"data-slot":"dialog-title",className:Pq("text-lg leading-none font-semibold",i10),...t3});var _a=({className:i10,...t3})=>Q3(Dt,{"data-slot":"dialog-description",className:Pq("text-muted-foreground text-sm",i10),...t3});var im=({className:i10,type:t3,...a3})=>oi("input",{type:t3,"data-slot":"input",className:Pq("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i10),...a3});var nm=({className:i10,...t3})=>V3("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:Pq("mx-auto flex w-full justify-center",i10),...t3});var ym=({className:i10,children:t3,...a3})=>V3("ul",{"data-slot":"pagination-content",className:Pq("flex flex-row items-center gap-1",i10),...a3,children:t3});var km=({...i10})=>V3("li",{"data-slot":"pagination-item",...i10});var vm=({className:i10,...t3})=>r3("span",{"aria-hidden":true,"data-slot":"pagination-ellipsis",className:Pq("flex size-9 items-center justify-center",i10),...t3,children:[V3(x3,{className:"size-4"}),V3("span",{className:"sr-only",children:"More pages"})]});var Jm=({className:i10,...t3})=>Y10("div",{"data-slot":"table-container",className:"relative w-full max-w-full overflow-x-auto",children:Y10("table",{"data-slot":"table",className:Pq("min-w-full w-max caption-bottom text-sm",i10),...t3})});var Km=({className:i10,...t3})=>Y10("thead",{"data-slot":"table-header",className:Pq("[&_tr]:border-b",i10),...t3});var Qm=({className:i10,...t3})=>Y10("tbody",{"data-slot":"table-body",className:Pq("[&_tr:last-child]:border-0",i10),...t3});var Zm=({className:i10,...t3})=>Y10("tr",{"data-slot":"table-row",className:Pq("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",i10),...t3});var gm=({className:i10,...t3})=>Y10("th",{"data-slot":"table-head",className:Pq("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",i10),...t3});var Bm=({className:i10,...t3})=>Y10("td",{"data-slot":"table-cell",className:Pq("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",i10),...t3});var Vm=({className:i10,...t3})=>Y10("caption",{"data-slot":"table-caption",className:Pq("text-muted-foreground mt-4 text-sm",i10),...t3});var Oi=Object.defineProperty;var Si=(i10,t3)=>Oi(i10,"name",{value:t3,configurable:true});var Di=et.forwardRef(Si(function(t3,a3){return Ei(c.label,{...t3,ref:a3,onMouseDown:(m10)=>{if(m10.target.closest("button, input, select, textarea"))return;if(t3.onMouseDown?.(m10),!m10.defaultPrevented&&m10.detail>1)m10.preventDefault()}})},"Label"));var pt=Di;var um=({className:i10,...t3})=>ji(pt,{"data-slot":"label",className:Pq("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",i10),...t3});var d3=Object.defineProperty;var e3=(a3)=>a3;function f10(a3,b3){this[a3]=e3.bind(null,b3)}var g10=(a3,b3)=>{for(var c10 in b3)d3(a3,c10,{get:b3[c10],enumerable:true,configurable:true,set:f10.bind(b3,c10)})};import{Fragment as te,useId as z10}from"react";import{jsx as r10,jsxs as P5}from"react/jsx-runtime";import{useId as ge}from"react";import{jsx as g13,jsxs as v3}from"react/jsx-runtime";import{jsx as k13,jsxs as ue,Fragment as Te}from"react/jsx-runtime";"use client";var L3={};g10(L3,{ResourceTablePrimitive:()=>re,ResourcePaginationPrimitive:()=>ne,ResourceListPrimitive:()=>ie,ResourceFormPrimitive:()=>ce,ResourceFiltersBar:()=>pe,ResourceFilterPrimitive:()=>ae,ResourceDialogPrimitive:()=>se,ResourceActionPrimitive:()=>le});var D8=(...e10)=>e10.filter(Boolean).join(" ");var Pe={border:"1px solid currentColor",borderRadius:"0.5rem",padding:"0.75rem"};var re=({caption:e10,className:i10,columns:t3,empty:n3="No resources found",getRowKey:l10,onRowClick:o3,renderActions:s3,actionsLabel:m10="Actions",stickyActions:a3=true,isPending:c10=false,isRowSelected:b3,isRowExpanded:d10,onExpandedChange:N3,renderDetails:T3,renderContextMenu:u10,renderCell:F3,rows:I3,style:Re})=>{let A3=s3!==undefined||T3!==undefined,E=a3?"sticky right-0 z-10 shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)]":"";return P5(Jm,{className:D8("ci-resource-table",i10),style:{borderCollapse:"collapse",width:"100%",...Re},children:[e10?r10(Vm,{children:e10}):null,r10(Km,{children:P5(Zm,{children:[t3.map((p3)=>r10(gm,{scope:"col",children:p3.label},p3.id)),A3?r10(gm,{className:E,children:r10("span",{className:"sr-only",children:m10})}):null]})}),r10(Qm,{children:I3.length===0?r10(Zm,{children:r10(Bm,{className:"py-10",colSpan:Math.max(t3.length+(A3?1:0),1),children:n3})}):I3.map((p3)=>{let C10=d10?.(p3)??false,H10=T3?.(p3,C10),_3=!!H10,W3=P5(Zm,{"data-state":b3?.(p3)?"selected":undefined,tabIndex:o3?0:undefined,className:o3?"cursor-pointer":undefined,onKeyDown:(R10)=>{if(R10.target===R10.currentTarget&&(R10.key==="Enter"||R10.key===" "))R10.preventDefault(),o3?.(p3)},onClick:(R10)=>{if(R10.target instanceof Element&&R10.target.closest("[data-slot='row-actions']"))return;o3?.(p3)},children:[t3.map((R10)=>r10(Bm,{children:F3(p3,R10)},R10.id)),A3?P5(Bm,{"data-slot":"row-actions",className:`flex gap-2 justify-end ${E}`,children:[s3?.(p3),_3&&N3?r10(CZ,{type:"button",variant:"ghost",size:"icon","aria-label":C10?"Collapse":"Expand","aria-expanded":C10,disabled:c10,onClick:()=>N3(p3,!C10),children:C10?r10(b,{}):r10(M3,{})}):null]}):null]},l10(p3));return P5(te,{children:[u10?P5(na,{children:[r10(ya,{asChild:true,children:W3}),r10(qa,{children:u10(p3)})]}):W3,_3&&C10?r10(Zm,{className:"hover:bg-transparent",children:r10(Bm,{colSpan:t3.length+(A3?1:0),children:H10})}):null]},l10(p3))})})]})};var ie=({ariaLabel:e10="Resources",className:i10,empty:t3="No resources found",getItemKey:n3,items:l10,renderItem:o3,renderContainer:s3,style:m10})=>s3?s3(l10.length===0?t3:l10.map((a3,c10)=>r10(te,{children:o3(a3,c10)},n3(a3)))):r10("ul",{"aria-label":e10,className:D8("ci-resource-list",i10),style:{display:"flex",flexDirection:"column",gap:"1rem",listStyle:"none",...m10},children:l10.length===0?r10("li",{children:t3}):l10.map((a3,c10)=>r10("li",{children:o3(a3,c10)},n3(a3)))});var ae=({className:e10,inputProps:i10,label:t3,onChange:n3,style:l10,value:o3})=>r10(im,{...i10,"aria-label":t3,className:D8("ci-resource-filter",e10),onChange:(s3)=>{n3(s3.currentTarget.value)},style:l10,type:"search",value:o3});var ye=(e10,i10)=>{if(i10<=7)return Array.from({length:i10},(l10,o3)=>o3+1);let t3=Math.max(2,Math.min(e10-1,i10-3)),n3=Math.min(i10-1,Math.max(e10+1,4));return[1,...t3>2?[null]:[],...Array.from({length:n3-t3+1},(l10,o3)=>t3+o3),...n3<i10-1?[null]:[],i10]};var ne=({className:e10,currentPage:i10,hasNextPage:t3,hasPreviousPage:n3=false,isPending:l10=false,navigationLabel:o3="Resource pagination",nextLabel:s3="Next",onNext:m10,onPrevious:a3,onPageChange:c10,totalPages:b3,ellipsisLabel:d10="More pages",previousLabel:N3="Previous",style:T3})=>r10(nm,{"aria-label":o3,className:D8("ci-resource-pagination",e10),style:T3,children:P5(ym,{children:[r10(km,{children:r10(CZ,{variant:"ghost",disabled:!n3||l10,onClick:a3,type:"button",children:N3})}),i10!==undefined&&b3!==undefined&&c10?ye(i10,b3).map((u10,F3)=>r10(km,{children:u10===null?r10(vm,{"aria-label":d10}):r10(CZ,{type:"button",size:"icon",variant:u10===i10?"outline":"ghost","aria-current":u10===i10?"page":undefined,disabled:l10,onClick:()=>c10(u10),children:u10})},u10??`gap-${F3}`)):null,i10!==undefined&&(b3===undefined||!c10)?r10(km,{children:P5("span",{"aria-live":"polite",children:["Page ",i10]})}):null,r10(km,{children:r10(CZ,{variant:"ghost",disabled:!t3||l10,onClick:m10,type:"button",children:s3})})]})});var le=({children:e10,className:i10,components:t3,disabled:n3=false,onClick:l10,pending:o3=false,style:s3})=>{let m10=t3?.Button??CZ;return r10(m10,{"aria-busy":o3,className:D8("ci-resource-action",i10),disabled:n3||o3,onClick:l10,style:s3,type:"button",children:e10})};var se=({children:e10,className:i10,components:t3,open:n3,onOpenChange:l10,description:o3,style:s3,title:m10})=>{let a3=z10(),c10=z10();if(!t3?.Dialog)return r10(Oa,{open:n3,...l10?{onOpenChange:l10}:{},children:P5(Da,{className:i10,style:s3,"aria-describedby":o3?c10:undefined,children:[r10(sa,{children:m10}),o3?r10(_a,{id:c10,children:o3}):null,e10]})});if(!n3)return null;let b3=t3.Dialog;return P5(b3,{open:n3,"aria-labelledby":a3,"aria-modal":"true",className:D8("ci-resource-dialog",i10),style:{...Pe,...s3},children:[r10("h2",{id:a3,children:m10}),e10]})};var be=(e10)=>e10===null||e10===undefined?"":String(e10);var Ne=({field:e10,id:i10,value:t3,disabled:n3,errorId:l10,onChange:o3})=>{let s3={"aria-describedby":l10,"aria-invalid":l10!==undefined,disabled:n3,id:i10,name:e10.name,required:e10.control!=="checkbox"&&e10.required===true&&t3!==null};if(e10.control==="select"){let m10=e10.options??[];return v3("select",{...s3,disabled:n3||e10.readOnly,className:"border-input bg-background h-9 w-full rounded-md border px-3 text-sm focus-visible:ring-ring focus-visible:ring-2",value:m10.findIndex((a3)=>a3.value===t3),onChange:(a3)=>{let c10=m10[Number(a3.currentTarget.value)];if(c10)o3(c10.value)},children:[v3("option",{value:-1,disabled:true,children:["Select ",e10.label]}),m10.map((a3,c10)=>g13("option",{value:c10,children:a3.label},c10))]})}if(e10.control==="checkbox")return g13(im,{...s3,className:"size-4",type:"checkbox",checked:t3===true,disabled:n3||e10.readOnly,onChange:(m10)=>o3(m10.currentTarget.checked)});if(e10.control==="custom")return v3("p",{role:"alert",children:["A custom control is required for ",e10.label,"."]});return g13(im,{...s3,readOnly:e10.readOnly,type:e10.control,value:be(t3),onChange:(m10)=>{let a3=m10.currentTarget;o3(e10.control==="number"&&a3.value!==""?a3.valueAsNumber:a3.value)}})};var ve=({field:e10,value:i10,error:t3,disabled:n3,onChange:l10,renderControl:o3})=>{let s3=ge(),m10=t3?`${s3}-error`:undefined,a3={disabled:n3,errorId:m10,field:e10,id:s3,onChange:(c10)=>{if(!n3&&!e10.readOnly)l10(c10)},value:i10};return v3("div",{className:"grid gap-2",children:[v3(um,{htmlFor:s3,children:[e10.label,e10.required?" *":""]}),e10.control==="custom"&&o3?o3(a3):g13(Ne,{...a3}),e10.nullable?g13(CZ,{"aria-label":`Clear ${e10.label}`,type:"button",variant:"ghost",size:"sm",className:"justify-self-start",disabled:n3||e10.readOnly||i10===null,onClick:()=>l10(null),children:"Clear"}):null,t3?g13("p",{id:m10,role:"alert",className:"text-destructive text-sm",children:t3}):null]})};var ce=({label:e10,fields:i10,values:t3,errors:n3,onChange:l10,onSubmit:o3,onCancel:s3,renderControl:m10,pending:a3=false,disabled:c10=false,submitLabel:b3="Save",cancelLabel:d10="Cancel",error:N3,className:T3})=>v3("form",{"aria-label":e10,"aria-busy":a3,className:T3??"grid gap-4",onSubmit:(u10)=>{if(u10.preventDefault(),!a3&&!c10)o3()},children:[N3?g13("div",{role:"alert",className:"text-destructive text-sm",children:N3}):null,i10.map((u10)=>g13(ve,{field:u10,value:t3[u10.name],error:n3?.[u10.name],disabled:c10||a3,onChange:(F3)=>l10(u10.name,F3),renderControl:m10},u10.name)),v3("div",{"data-slot":"form-actions",className:"flex justify-end gap-2",children:[s3?g13(CZ,{type:"button",variant:"outline",disabled:a3,onClick:s3,children:d10}):null,g13(CZ,{type:"submit",disabled:c10||a3,children:b3})]})]});var me=(e10)=>k13("div",{className:"contents",children:e10.control},e10.key);var pe=({label:e10="Filter by",layout:i10="stacked",controls:t3})=>{if(t3.length===0)return null;let n3=t3.filter((o3)=>!o3.fullWidth),l10=t3.filter((o3)=>o3.fullWidth);return k13("div",{className:"mb-4",children:i10==="inline"?k13("form",{className:"flex flex-wrap items-end gap-2",onSubmit:(o3)=>o3.preventDefault(),children:t3.map(me)}):ue(Te,{children:[n3.length>0?ue("form",{className:"flex flex-wrap gap-2 mb-2",onSubmit:(o3)=>o3.preventDefault(),children:[k13(um,{className:"mt-3 mr-2",children:e10}),n3.map(me)]}):null,l10.map((o3)=>k13("form",{className:"mb-2 last:mb-0",onSubmit:(s3)=>s3.preventDefault(),children:o3.control},o3.key))]})})};var{ResourceActionPrimitive:Ge,ResourceDialogPrimitive:Je,ResourceFilterPrimitive:Qe,ResourceFormPrimitive:Ue,ResourceFiltersBar:Xe,ResourceListPrimitive:Ye,ResourcePaginationPrimitive:Ze,ResourceTablePrimitive:qe}=L3;import{useMemo as useMemo12,useState as useState19}from"react";import{jsxDEV as jsxDEV2,Fragment as Fragment5}from"react/jsx-dev-runtime";var isObject2=(value)=>value!==null&&typeof value==="object"&&!Array.isArray(value);var schemaProperties=(entity,mode="entity")=>{const properties=entity.contract.schemas[mode]?.properties;return isObject2(properties)?properties:{}};var requiredFields=(entity,mode)=>{const required=entity.contract.schemas[mode]?.required;return new Set(Array.isArray(required)?required.filter((value)=>typeof value==="string"):[])};var scalarTypes=(schema)=>{const{type}=schema;if(typeof type==="string"){return[type]}return Array.isArray(type)?type.filter((value)=>typeof value==="string"):[]};var presentationSchema=(schema)=>{const union=schema.anyOf??schema.oneOf;if(!Array.isArray(union)){return schema}const members=union.filter(isObject2);const values=members.filter((member)=>member.type!=="null");const[value]=values;if(members.length===2&&values.length===1&&value!==undefined){return{...schema,...value,type:[...scalarTypes(value),"null"]}}return schema};var defaultControl=(schema)=>{if(schema.$ref!==undefined||(schema.anyOf!==undefined||schema.oneOf!==undefined)&&schema.type===undefined){return"custom"}if(Array.isArray(schema.enum)){return"select"}const types=scalarTypes(schema);if(types.includes("boolean")){return"checkbox"}if(types.includes("number")||types.includes("integer")){return"number"}if(schema.format==="email"){return"email"}if(schema.format==="date"){return"date"}if(schema.format==="date-time"){return"datetime-local"}return types.some((type)=>type==="object"||type==="array")?"custom":"text"};var configuredControl=(config,schema)=>{switch(config.control){case"text":case"email":case"number":case"checkbox":case"date":case"datetime-local":case"select":case"custom":{return config.control}case undefined:{return defaultControl(schema)}default:{return"custom"}}};var formFields=(entity,mode)=>{const properties=schemaProperties(entity,mode);const entityProperties=schemaProperties(entity);const required=requiredFields(entity,mode);return entity.config.forms[mode].fields.map((name)=>{const config=entity.config.fields[name];if(config===undefined){throw new Error(`Missing entity field configuration: ${name}`)}const candidate=properties[name]??entityProperties[name];const schema=isObject2(candidate)?presentationSchema(candidate):{};const entityField=entityProperties[name];const enums=Array.isArray(schema.enum)?schema.enum.filter((value)=>typeof value==="string"||typeof value==="number"||typeof value==="boolean"):[];return{control:configuredControl(config,schema),label:config.label,name,nullable:scalarTypes(schema).includes("null")||Array.isArray(schema.enum)&&schema.enum.includes(null),options:enums.map((value)=>({label:String(value),value})),readOnly:config.readOnly===true||schema.readOnly===true||isObject2(entityField)&&entityField.readOnly===true,required:required.has(name)}})};var displayValue=(value)=>{if(value===null||value===undefined){return"—"}if(typeof value==="boolean"){return value?"Yes":"No"}return typeof value==="object"?JSON.stringify(value):String(value)};var renderField=(entity,record,name,renderers)=>{const renderer=entity.config.fields[name]?.renderer;return renderer===undefined||renderers?.[renderer]===undefined?displayValue(record.value[name]):renderers[renderer]({field:name,record})};var sortFor=(state,field)=>{const[current]=state.state.sort;return[{direction:current?.field===field&¤t.direction==="asc"?"desc":"asc",field}]};var QueryControls=({view})=>jsxDEV2(Xe,{controls:[{control:jsxDEV2(Qe,{label:"Search",onChange:(value)=>view.setTextSearch(value),value:view.state.textSearch},undefined,false,undefined,this),fullWidth:true,key:"search"}]},undefined,false,undefined,this);var EntityStatus=({state})=>{if(state.authState.status!=="authenticated"){return jsxDEV2("output",{children:state.authState.status},undefined,false,undefined,this)}if(state.loading){return jsxDEV2("output",{children:"Loading"},undefined,false,undefined,this)}if(state.error!==null){return jsxDEV2("output",{role:"alert",children:state.error.message},undefined,false,undefined,this)}return null};var EntityPagination=({result,view,pending})=>{if(result===undefined||result.pagination!=="page"){return null}return jsxDEV2(Ze,{currentPage:result.page,totalPages:result.totalPages,hasPreviousPage:result.page>1,hasNextPage:result.page<result.totalPages,isPending:pending,onPageChange:(page)=>view.setPage(page),onPrevious:()=>view.setPage(result.page-1),onNext:()=>view.setPage(result.page+1)},undefined,false,undefined,this)};var ControlledEntityTable=({entity,empty,renderers,variant,view})=>{const result=useEntityList(entity.contract,view.query);const names=variant===undefined?entity.config.table.columns:entity.config.table.variants?.[variant]?.columns??entity.config.table.columns;const columns=names.map((name)=>({id:name,label:entity.config.fields[name]?.label??name}));const hasStatus=result.authState.status!=="authenticated"||result.loading||result.error!==null;return jsxDEV2("section",{children:[jsxDEV2(QueryControls,{view},undefined,false,undefined,this),hasStatus?jsxDEV2(EntityStatus,{state:result},undefined,false,undefined,this):jsxDEV2(Fragment5,{children:[jsxDEV2(qe,{columns:columns.map((column)=>({...column,label:entity.contract.query.sortableFields.includes(column.id)?jsxDEV2("button",{type:"button",onClick:()=>view.setSort(sortFor(view,column.id)),children:column.label},undefined,false,undefined,this):column.label})),empty,getRowKey:(record)=>record.id,renderCell:(record,column)=>{const name=names.find((field)=>field===column.id);return name===undefined?null:renderField(entity,record,name,renderers)},rows:result.data?.items??[]},undefined,false,undefined,this),jsxDEV2(EntityPagination,{pending:result.refreshing,result:result.data,view},undefined,false,undefined,this)]},undefined,true,undefined,this)]},undefined,true,undefined,this)};var UrlEntityTable=(props)=>jsxDEV2(ControlledEntityTable,{...props,view:useEntityViewState(props.namespace,{contract:props.entity.contract,pageSize:props.pageSize??25})},undefined,false,undefined,this);var MemoryEntityTable=(props)=>jsxDEV2(ControlledEntityTable,{...props,view:useMemoryEntityViewState(props.pageSize===undefined?{}:{pageSize:props.pageSize})},undefined,false,undefined,this);var EntityTable=(props)=>props.viewState==="memory"?jsxDEV2(MemoryEntityTable,{...props},undefined,false,undefined,this):jsxDEV2(UrlEntityTable,{...props,namespace:props.namespace},undefined,false,undefined,this);var ControlledEntityList=({entity,empty,renderers,view})=>{const result=useEntityList(entity.contract,view.query);const hasStatus=result.authState.status!=="authenticated"||result.loading||result.error!==null;return jsxDEV2("section",{children:[jsxDEV2(QueryControls,{view},undefined,false,undefined,this),hasStatus?jsxDEV2(EntityStatus,{state:result},undefined,false,undefined,this):jsxDEV2(Fragment5,{children:[jsxDEV2(Ye,{empty,getItemKey:(record)=>record.id,items:result.data?.items??[],renderItem:(record)=>jsxDEV2("article",{children:[jsxDEV2("strong",{children:renderField(entity,record,entity.config.list.title,renderers)},undefined,false,undefined,this),entity.config.list.description===undefined?null:jsxDEV2("p",{children:renderField(entity,record,entity.config.list.description,renderers)},undefined,false,undefined,this)]},undefined,true,undefined,this)},undefined,false,undefined,this),jsxDEV2(EntityPagination,{pending:result.refreshing,result:result.data,view},undefined,false,undefined,this)]},undefined,true,undefined,this)]},undefined,true,undefined,this)};var UrlEntityList=(props)=>jsxDEV2(ControlledEntityList,{...props,view:useEntityViewState(props.namespace,{contract:props.entity.contract,pageSize:props.pageSize??25})},undefined,false,undefined,this);var MemoryEntityList=(props)=>jsxDEV2(ControlledEntityList,{...props,view:useMemoryEntityViewState(props.pageSize===undefined?{}:{pageSize:props.pageSize})},undefined,false,undefined,this);var EntityList=(props)=>props.viewState==="memory"?jsxDEV2(MemoryEntityList,{...props},undefined,false,undefined,this):jsxDEV2(UrlEntityList,{...props,namespace:props.namespace},undefined,false,undefined,this);var initialFormValues=(entity,mode,supplied,record)=>{const values={};const properties=schemaProperties(entity,mode);const required=requiredFields(entity,mode);for(const name of entity.config.forms[mode].fields){const schema=properties[name];if(required.has(name)&&isObject2(schema)&&scalarTypes(presentationSchema(schema)).includes("boolean")){values[name]=false}if(isObject2(schema)&&schema.default!==undefined){values[name]=schema.default}if(record?.value[name]!==undefined){values[name]=record.value[name]}if(supplied?.[name]!==undefined){values[name]=supplied[name]}}return values};var controlRenderer=(entity,controls)=>function renderEntityControl(props){const fields=entity.config.fields;const key=fields[props.field.name]?.control;return key===undefined||controls?.[key]===undefined?jsxDEV2("p",{role:"alert",children:["A custom control is required for ",props.field.label,"."]},undefined,true,undefined,this):controls[key](props)};var mutationMessage=(mutation)=>{if(mutation.status==="conflict"){return"This entity changed. Your draft is preserved."}if(mutation.status==="uncertain"){return"The write outcome is unknown. Resubmit the same action to resolve it."}return mutation.error?.resourceError.message};var writableValues=(fields,values)=>{const writable=new Set(fields.filter((field)=>!field.readOnly).map((field)=>field.name));return Object.fromEntries(Object.entries(values).filter(([name])=>writable.has(name)))};var displayedValues=(fields,values)=>Object.fromEntries(Object.entries(values).map(([name,value])=>{if(typeof value!=="string"||fields.find((field)=>field.name===name)?.control!=="datetime-local"){return[name,value]}const date=new Date(value);if(Number.isNaN(date.getTime())){return[name,value]}return[name,new Date(date.getTime()-date.getTimezoneOffset()*60000).toISOString().slice(0,23)]}));var wireValue=(fields,name,value)=>{if(typeof value!=="string"||value===""||fields.find((field)=>field.name===name)?.control!=="datetime-local"){return value}const date=new Date(value);return Number.isNaN(date.getTime())?value:date.toISOString()};var CreateEntityForm=(props)=>{const mutation=useEntityCreate(props.entity.contract);const[values,setValues]=useState19(()=>initialFormValues(props.entity,"create",props.initialValues));const fields=useMemo12(()=>formFields(props.entity,"create"),[props.entity]);return jsxDEV2(Ue,{label:"Create entity",fields,values:displayedValues(fields,values),disabled:!mutation.available,pending:mutation.pending,error:mutationMessage(mutation),...props.onCancel===undefined?{}:{onCancel:props.onCancel},onChange:(name,value)=>setValues((current)=>({...current,[name]:wireValue(fields,name,value)})),onSubmit:async()=>{const value=writableValues(fields,values);const action=mutation.status==="uncertain"?mutation.resubmit():mutation.submit({value});const result=await action;if(result.ok){props.onSuccess?.(result.value)}},renderControl:controlRenderer(props.entity,props.controls),submitLabel:mutation.status==="uncertain"?"Resubmit":"Create"},undefined,false,undefined,this)};var UpdateEntityForm=(props)=>{const mutation=useEntityUpdate(props.entity.contract,{id:props.record.id});const[draft,setDraft]=useState19(()=>({expectedRevision:props.record.revision,values:initialFormValues(props.entity,"update",props.initialValues,props.record)}));const{expectedRevision,values}=draft;const fields=useMemo12(()=>formFields(props.entity,"update"),[props.entity]);return jsxDEV2(Ue,{label:"Update entity",fields,values:displayedValues(fields,values),disabled:!mutation.available,pending:mutation.pending,error:mutationMessage(mutation),...props.onCancel===undefined?{}:{onCancel:props.onCancel},onChange:(name,value)=>setDraft((current)=>({...current,values:{...current.values,[name]:wireValue(fields,name,value)}})),onSubmit:async()=>{const value=writableValues(fields,values);const result=await(mutation.status==="uncertain"?mutation.resubmit():mutation.submit({expectedRevision,value}));if(result.ok){props.onSuccess?.(result.value)}},renderControl:controlRenderer(props.entity,props.controls),submitLabel:mutation.status==="uncertain"?"Resubmit":"Save"},undefined,false,undefined,this)};var EntityForm=(props)=>{const runtime=useEntityRuntime();if(runtime.state.status!=="authenticated"){return jsxDEV2("output",{children:runtime.state.status},undefined,false,undefined,this)}return props.mode==="create"?jsxDEV2(CreateEntityForm,{...props},runtime.formScope,false,undefined,this):jsxDEV2(UpdateEntityForm,{...props,record:props.record},JSON.stringify([runtime.formScope,props.record.id]),false,undefined,this)};
|
|
49
49
|
export{__export,FederatedAuthError,resourceKeys,ResourceQueryError,unwrapResourceResult,createResourceListQueryOptions,mapResourceAuthState,hasResourceCapability,clearProtectedResourceQueries,EntityRuntimeProvider,createDelegatedEntitySource,defineEntity,useEntityUpdate,useEntityCreate,useEntityDelete,useEntityList,useEntityRecord,useEntityViewState,useMemoryEntityViewState,EntityTable,EntityList,EntityForm};
|
package/dist/index.d.ts
CHANGED
|
@@ -346,11 +346,85 @@ export type ExternalApplicationOperationSuccess = EnvelopeSuccess<"context_get",
|
|
|
346
346
|
conversationId: string;
|
|
347
347
|
runId: string;
|
|
348
348
|
}> | EnvelopeSuccess<"conversations_history", ConversationHistory>;
|
|
349
|
+
/**
|
|
350
|
+
* Operations only the confidential application itself may invoke. They stay
|
|
351
|
+
* out of `externalApplicationOperationIds`, so browser clients and the user
|
|
352
|
+
* proxy never offer them.
|
|
353
|
+
*/
|
|
354
|
+
/** A person whose only role in the application's Organization is `member`. */
|
|
355
|
+
export interface MemberUser {
|
|
356
|
+
email: string | null;
|
|
357
|
+
name: string | null;
|
|
358
|
+
userId: string;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* How create-or-get resolved the email: a new user, an existing CI user who
|
|
362
|
+
* joined the Organization as a member, or a user who already was one.
|
|
363
|
+
*/
|
|
364
|
+
export type MemberUserResolution = "created" | "existing" | "linked";
|
|
365
|
+
export interface MemberUserPage {
|
|
366
|
+
items: MemberUser[];
|
|
367
|
+
page: number;
|
|
368
|
+
pageSize: number;
|
|
369
|
+
totalItems: number;
|
|
370
|
+
}
|
|
371
|
+
export type ExternalApplicationServiceOperationRequest = {
|
|
372
|
+
input: {
|
|
373
|
+
email: string;
|
|
374
|
+
name: string;
|
|
375
|
+
};
|
|
376
|
+
operationId: "members_create_or_get";
|
|
377
|
+
} | {
|
|
378
|
+
input: {
|
|
379
|
+
userId: string;
|
|
380
|
+
};
|
|
381
|
+
operationId: "members_get";
|
|
382
|
+
} | {
|
|
383
|
+
input: {
|
|
384
|
+
page?: number;
|
|
385
|
+
pageSize?: number;
|
|
386
|
+
};
|
|
387
|
+
operationId: "members_list";
|
|
388
|
+
} | {
|
|
389
|
+
input: {
|
|
390
|
+
name: string;
|
|
391
|
+
userId: string;
|
|
392
|
+
};
|
|
393
|
+
operationId: "members_update";
|
|
394
|
+
} | {
|
|
395
|
+
input: {
|
|
396
|
+
userId: string;
|
|
397
|
+
};
|
|
398
|
+
operationId: "members_remove";
|
|
399
|
+
} | {
|
|
400
|
+
input: {
|
|
401
|
+
userId: string;
|
|
402
|
+
};
|
|
403
|
+
operationId: "users_list_company_links";
|
|
404
|
+
} | {
|
|
405
|
+
input: {
|
|
406
|
+
entityIds: string[];
|
|
407
|
+
userId: string;
|
|
408
|
+
};
|
|
409
|
+
operationId: "users_link_companies";
|
|
410
|
+
};
|
|
411
|
+
/** A user's linked company entities, in entity id order. */
|
|
412
|
+
export interface UserCompanyLinks {
|
|
413
|
+
entityIds: string[];
|
|
414
|
+
}
|
|
415
|
+
export type ExternalApplicationServiceOperationSuccess = EnvelopeSuccess<"members_create_or_get", MemberUser & {
|
|
416
|
+
outcome: MemberUserResolution;
|
|
417
|
+
}> | EnvelopeSuccess<"members_get", MemberUser> | EnvelopeSuccess<"members_list", MemberUserPage> | EnvelopeSuccess<"members_update", MemberUser> | EnvelopeSuccess<"members_remove", {
|
|
418
|
+
userId: string;
|
|
419
|
+
}> | EnvelopeSuccess<"users_list_company_links", UserCompanyLinks> | EnvelopeSuccess<"users_link_companies", UserCompanyLinks>;
|
|
420
|
+
/** Every operation a confidential server client may invoke. */
|
|
421
|
+
export type ExternalApplicationServerOperationRequest = ExternalApplicationOperationRequest | ExternalApplicationServiceOperationRequest;
|
|
349
422
|
export type ExternalApplicationOperationId = ExternalApplicationOperationRequest["operationId"];
|
|
350
|
-
export type
|
|
423
|
+
export type ExternalApplicationServerOperationId = ExternalApplicationServerOperationRequest["operationId"];
|
|
424
|
+
export type ExternalApplicationOperationRequestFor<Id extends ExternalApplicationServerOperationId> = Extract<ExternalApplicationServerOperationRequest, {
|
|
351
425
|
operationId: Id;
|
|
352
426
|
}>;
|
|
353
|
-
export type ExternalApplicationOperationSuccessFor<Id extends
|
|
427
|
+
export type ExternalApplicationOperationSuccessFor<Id extends ExternalApplicationServerOperationId> = Extract<ExternalApplicationOperationSuccess | ExternalApplicationServiceOperationSuccess, {
|
|
354
428
|
operationId: Id;
|
|
355
429
|
}>;
|
|
356
430
|
export type ClientOperationId = ExternalApplicationOperationId;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{EntityForm,EntityList,EntityRuntimeProvider,EntityTable,FederatedAuthError,__export,createDelegatedEntitySource,defineEntity,useEntityViewState,useMemoryEntityViewState}from"./index-6memxjn1.js";var exports_src={};__export(exports_src,{useWorkflows:()=>useWorkflows,useSkills:()=>useSkills,useSession:()=>useSession,useRuns:()=>useRuns,useOrganizationClient:()=>useOrganizationClient,useMemoryEntityViewState:()=>useMemoryEntityViewState,useKnowledge:()=>useKnowledge,useEntityViewState:()=>useEntityViewState,useCollectiveIntelligenceClient:()=>useCollectiveIntelligenceClient,useCollectiveIntelligenceAuth:()=>useCollectiveIntelligenceAuth,useClientContext:()=>useClientContext,useAttachments:()=>useAttachments,useAgents:()=>useAgents,useAgentInvocation:()=>useAgentInvocation,defineEntity:()=>defineEntity,createPromptKeyHandler:()=>createPromptKeyHandler,createDelegatedEntitySource:()=>createDelegatedEntitySource,clientSdkReactEntrypoint:()=>clientSdkReactEntrypoint,SessionGate:()=>SessionGate,LoginCallbackPrimitive:()=>LoginCallbackPrimitive,LoginCallback:()=>LoginCallback,LoginButton:()=>LoginButton,EntityTable:()=>EntityTable,EntityList:()=>EntityList,EntityForm:()=>EntityForm,CollectiveIntelligenceProvider:()=>CollectiveIntelligenceProvider,CollectiveIntelligenceLoginProvider:()=>CollectiveIntelligenceLoginProvider,AgentPromptPrimitive:()=>AgentPromptPrimitive,AgentPrompt:()=>AgentPrompt});import{useCallback,useId,useState as useState2}from"react";import{QueryClient,QueryClientProvider}from"@tanstack/react-query";import{createContext,useContext,useMemo,useState}from"react";import{jsxDEV}from"react/jsx-dev-runtime";var ClientContext=createContext(null);var CollectiveIntelligenceProvider=(props)=>{const{clientFactory}=props;const[queryClient]=useState(()=>new QueryClient({defaultOptions:{mutations:{retry:false},queries:{retry:false}}}));const ownedClient=useMemo(()=>clientFactory===undefined?undefined:clientFactory(),[clientFactory]);const client=props.client??ownedClient;if(client===undefined){throw new TypeError("A client or clientFactory is required")}return jsxDEV(ClientContext.Provider,{value:client,children:jsxDEV(QueryClientProvider,{client:queryClient,children:props.entitySource===undefined?props.children:jsxDEV(EntityRuntimeProvider,{source:props.entitySource,children:props.children},undefined,false,undefined,this)},undefined,false,undefined,this)},undefined,false,undefined,this)};var useCollectiveIntelligenceClient=()=>{const client=useContext(ClientContext);if(client===null){throw new Error("CollectiveIntelligenceProvider must wrap Collective Intelligence hooks")}return client};var useOrganizationClient=(organizationId)=>{const client=useCollectiveIntelligenceClient();return useMemo(()=>client.forOrganization(organizationId),[client,organizationId])};var useKnowledge=(organizationId)=>useOrganizationClient(organizationId).knowledge;var useAgents=(organizationId)=>useOrganizationClient(organizationId).agents;var useSkills=(organizationId)=>useOrganizationClient(organizationId).skills;var useWorkflows=(organizationId)=>useOrganizationClient(organizationId).workflows;var useRuns=(organizationId)=>useOrganizationClient(organizationId).runs;var useAttachments=(organizationId)=>useOrganizationClient(organizationId).attachments;var useClientContext=(organizationId)=>useOrganizationClient(organizationId).context;import{jsxDEV as jsxDEV2}from"react/jsx-dev-runtime";var ignoreSubmit=()=>false;var createPromptKeyHandler=(onSubmit)=>(event)=>{if(event.key==="Enter"&&!event.shiftKey&&!event.isComposing){event.preventDefault();onSubmit()}};var AgentPromptPrimitive=({autoFocus=false,className,components,id,label,onChange,onSubmit,pending,status,style,submitLabel="Send",value})=>{const Form=components?.Form??"form";const Label=components?.Label??"label";const Textarea=components?.Textarea??"textarea";const Button=components?.Button??"button";const Status=components?.Status??"div";const statusId=`${id}-status`;const submit=(event)=>{event.preventDefault();if(!pending){onSubmit()}};const onKeyDown=(event)=>{createPromptKeyHandler(pending?ignoreSubmit:onSubmit)({isComposing:event.nativeEvent.isComposing,key:event.key,preventDefault:()=>{event.preventDefault()},shiftKey:event.shiftKey})};return jsxDEV2(Form,{className:["ci-agent-prompt",className].filter(Boolean).join(" "),onSubmit:submit,style,children:[jsxDEV2(Label,{className:"ci-agent-prompt__label",htmlFor:id,children:label},undefined,false,undefined,this),jsxDEV2(Textarea,{"aria-describedby":statusId,autoFocus,className:"ci-agent-prompt__input",disabled:pending,id,onChange:(event)=>{onChange(event.currentTarget.value)},onKeyDown,value},undefined,false,undefined,this),jsxDEV2(Button,{className:"ci-agent-prompt__submit",disabled:pending||value.trim().length===0,type:"submit",children:submitLabel},undefined,false,undefined,this),jsxDEV2(Status,{"aria-live":"polite",className:"ci-agent-prompt__status",id:statusId,children:status},undefined,false,undefined,this)]},undefined,true,undefined,this)};var useAgentInvocation=(organizationId)=>{const{agents}=useOrganizationClient(organizationId);const[state,setState]=useState2({status:"idle"});const invoke=useCallback(async(input)=>{setState({status:"submitting"});try{const result=await agents.invoke(input);setState(result.ok?{result,status:"success"}:{result,status:"failure"});return result}catch(error){setState({error,status:"error"});throw error}},[agents]);return{invoke,reset:()=>{setState({status:"idle"})},state}};var invocationStatus=(state)=>{switch(state.status){case"submitting":{return"Sending"}case"success":{return"Request started"}case"failure":{return state.result.error.message}case"error":{return"Request failed"}case"idle":{return null}default:{return null}}};var EMPTY_AGENT_PROMPT_COMPONENTS={};var EMPTY_AGENT_PROMPT_STYLE={};var createDefaultIdempotencyKey=()=>globalThis.crypto.randomUUID();var AgentPrompt=({agentId,autoFocus=false,className="",components=EMPTY_AGENT_PROMPT_COMPONENTS,createIdempotencyKey=createDefaultIdempotencyKey,label="Message",onResult,organizationId,style=EMPTY_AGENT_PROMPT_STYLE,submitLabel="Send"})=>{const id=`ci-agent-prompt-${useId().replaceAll(":","")}`;const[value,setValue]=useState2("");const invocation=useAgentInvocation(organizationId);const submit=()=>{const prompt=value.trim();if(prompt.length===0||invocation.state.status==="submitting"){return}const submitInvocation=async()=>{try{const result=await invocation.invoke({agentId,idempotencyKey:createIdempotencyKey(),input:{prompt}});if(result.ok){setValue("")}onResult?.(result)}catch{}};submitInvocation()};return jsxDEV2(AgentPromptPrimitive,{autoFocus,className,components,id,label,onChange:setValue,onSubmit:submit,pending:invocation.state.status==="submitting",status:invocationStatus(invocation.state),style,submitLabel,value},undefined,false,undefined,this)};import{createContext as createContext2,useCallback as useCallback2,useContext as useContext2,useEffect,useMemo as useMemo2,useSyncExternalStore}from"react";import{jsxDEV as jsxDEV3}from"react/jsx-dev-runtime";var AuthContext=createContext2(null);var toFederatedAuthError=(error)=>new FederatedAuthError("authorization_failed",error.message);var unknownAuthError=()=>new FederatedAuthError("authorization_failed","Sign in failed");var CollectiveIntelligenceLoginProvider=(props)=>{const state=useSyncExternalStore(props.auth.subscribe,props.auth.getState,props.auth.getState);const contextValue=useMemo2(()=>({auth:props.auth,state}),[props.auth,state]);return jsxDEV3(AuthContext.Provider,{value:contextValue,children:props.clientFactory===undefined?jsxDEV3(CollectiveIntelligenceProvider,{client:props.client,entitySource:props.entitySource,children:props.children},undefined,false,undefined,this):jsxDEV3(CollectiveIntelligenceProvider,{clientFactory:props.clientFactory,entitySource:props.entitySource,children:props.children},undefined,false,undefined,this)},undefined,false,undefined,this)};var useCollectiveIntelligenceAuth=()=>{const value=useContext2(AuthContext);if(value===null){throw new Error("CollectiveIntelligenceLoginProvider must wrap authentication bindings")}return{...value,beginLogin:value.auth.beginLogin,completeLogin:value.auth.completeLogin,logout:value.auth.logout,reauthorize:value.auth.reauthorize}};var LoginButton=({children="Sign in with Collective Intelligence",className,components,disabled=false,onError,returnTo,style})=>{const{auth,state}=useCollectiveIntelligenceAuth();const Button=components?.Button??"button";const redirecting=state.status==="redirecting";const onClick=useCallback2((event)=>{event.preventDefault();const target=returnTo??globalThis.location.href;const begin=async()=>{try{await auth.beginLogin({returnTo:target})}catch(error){onError?.(error instanceof Error?toFederatedAuthError(error):unknownAuthError())}};begin()},[auth,onError,returnTo]);return jsxDEV3(Button,{"aria-busy":redirecting,className:["ci-login-button",className].filter(Boolean).join(" "),disabled:disabled||redirecting,onClick,style,type:"button",children},undefined,false,undefined,this)};var callbackMessage=(state)=>{switch(state.status){case"authenticated":{return"Sign in complete"}case"error":{return state.error.message}case"expired":{return"Sign in expired"}case"anonymous":case"redirecting":{return"Completing sign in"}default:{return"Completing sign in"}}};var LoginCallbackPrimitive=({className,components,state,style})=>{const Status=components?.Status??"div";return jsxDEV3(Status,{"aria-live":"polite",className:["ci-login-callback",className].filter(Boolean).join(" "),style,children:callbackMessage(state)},undefined,false,undefined,this)};var LoginCallback=({callbackUrl,onComplete,onError,...primitiveProps})=>{const{auth,state}=useCollectiveIntelligenceAuth();useEffect(()=>{const url=callbackUrl??globalThis.location.href;const complete=async()=>{try{const{returnTo}=await auth.completeLogin(url);onComplete?.(returnTo)}catch(error){onError?.(error instanceof Error?toFederatedAuthError(error):unknownAuthError())}};complete()},[auth,callbackUrl,onComplete,onError]);return jsxDEV3(LoginCallbackPrimitive,{...primitiveProps,state},undefined,false,undefined,this)};var useSession=()=>{const{state}=useCollectiveIntelligenceAuth();return state};var SessionGate=({children,fallback=null})=>{const session=useSession();if(session.status!=="authenticated"){return fallback}return children};"use client";var clientSdkReactEntrypoint="react";"use client";var{AgentPrompt:AgentPrompt2,AgentPromptPrimitive:AgentPromptPrimitive2,CollectiveIntelligenceLoginProvider:CollectiveIntelligenceLoginProvider2,CollectiveIntelligenceProvider:CollectiveIntelligenceProvider2,LoginButton:LoginButton2,LoginCallback:LoginCallback2,LoginCallbackPrimitive:LoginCallbackPrimitive2,SessionGate:SessionGate2,clientSdkReactEntrypoint:clientSdkReactEntrypoint2,createPromptKeyHandler:createPromptKeyHandler2,useAgents:useAgents2,useAttachments:useAttachments2,useClientContext:useClientContext2,useCollectiveIntelligenceAuth:useCollectiveIntelligenceAuth2,useCollectiveIntelligenceClient:useCollectiveIntelligenceClient2,useKnowledge:useKnowledge2,useOrganizationClient:useOrganizationClient2,useRuns:useRuns2,useSession:useSession2,useSkills:useSkills2,useWorkflows:useWorkflows2,useAgentInvocation:useAgentInvocation2}=exports_src;export{useWorkflows2 as useWorkflows,useSkills2 as useSkills,useSession2 as useSession,useRuns2 as useRuns,useOrganizationClient2 as useOrganizationClient,useKnowledge2 as useKnowledge,useCollectiveIntelligenceClient2 as useCollectiveIntelligenceClient,useCollectiveIntelligenceAuth2 as useCollectiveIntelligenceAuth,useClientContext2 as useClientContext,useAttachments2 as useAttachments,useAgents2 as useAgents,useAgentInvocation2 as useAgentInvocation,createPromptKeyHandler2 as createPromptKeyHandler,clientSdkReactEntrypoint2 as clientSdkReactEntrypoint,SessionGate2 as SessionGate,LoginCallbackPrimitive2 as LoginCallbackPrimitive,LoginCallback2 as LoginCallback,LoginButton2 as LoginButton,CollectiveIntelligenceProvider2 as CollectiveIntelligenceProvider,CollectiveIntelligenceLoginProvider2 as CollectiveIntelligenceLoginProvider,AgentPromptPrimitive2 as AgentPromptPrimitive,AgentPrompt2 as AgentPrompt};
|
|
2
|
+
import{EntityForm,EntityList,EntityRuntimeProvider,EntityTable,FederatedAuthError,__export,createDelegatedEntitySource,defineEntity,useEntityViewState,useMemoryEntityViewState}from"./index-fq2ck59k.js";var exports_src={};__export(exports_src,{useWorkflows:()=>useWorkflows,useSkills:()=>useSkills,useSession:()=>useSession,useRuns:()=>useRuns,useOrganizationClient:()=>useOrganizationClient,useMemoryEntityViewState:()=>useMemoryEntityViewState,useKnowledge:()=>useKnowledge,useEntityViewState:()=>useEntityViewState,useCollectiveIntelligenceClient:()=>useCollectiveIntelligenceClient,useCollectiveIntelligenceAuth:()=>useCollectiveIntelligenceAuth,useClientContext:()=>useClientContext,useAttachments:()=>useAttachments,useAgents:()=>useAgents,useAgentInvocation:()=>useAgentInvocation,defineEntity:()=>defineEntity,createPromptKeyHandler:()=>createPromptKeyHandler,createDelegatedEntitySource:()=>createDelegatedEntitySource,clientSdkReactEntrypoint:()=>clientSdkReactEntrypoint,SessionGate:()=>SessionGate,LoginCallbackPrimitive:()=>LoginCallbackPrimitive,LoginCallback:()=>LoginCallback,LoginButton:()=>LoginButton,EntityTable:()=>EntityTable,EntityList:()=>EntityList,EntityForm:()=>EntityForm,CollectiveIntelligenceProvider:()=>CollectiveIntelligenceProvider,CollectiveIntelligenceLoginProvider:()=>CollectiveIntelligenceLoginProvider,AgentPromptPrimitive:()=>AgentPromptPrimitive,AgentPrompt:()=>AgentPrompt});import{useCallback,useId,useState as useState2}from"react";import{QueryClient,QueryClientProvider}from"@tanstack/react-query";import{createContext,useContext,useMemo,useState}from"react";import{jsxDEV}from"react/jsx-dev-runtime";var ClientContext=createContext(null);var CollectiveIntelligenceProvider=(props)=>{const{clientFactory}=props;const[queryClient]=useState(()=>new QueryClient({defaultOptions:{mutations:{retry:false},queries:{retry:false}}}));const ownedClient=useMemo(()=>clientFactory===undefined?undefined:clientFactory(),[clientFactory]);const client=props.client??ownedClient;if(client===undefined){throw new TypeError("A client or clientFactory is required")}return jsxDEV(ClientContext.Provider,{value:client,children:jsxDEV(QueryClientProvider,{client:queryClient,children:props.entitySource===undefined?props.children:jsxDEV(EntityRuntimeProvider,{source:props.entitySource,children:props.children},undefined,false,undefined,this)},undefined,false,undefined,this)},undefined,false,undefined,this)};var useCollectiveIntelligenceClient=()=>{const client=useContext(ClientContext);if(client===null){throw new Error("CollectiveIntelligenceProvider must wrap Collective Intelligence hooks")}return client};var useOrganizationClient=(organizationId)=>{const client=useCollectiveIntelligenceClient();return useMemo(()=>client.forOrganization(organizationId),[client,organizationId])};var useKnowledge=(organizationId)=>useOrganizationClient(organizationId).knowledge;var useAgents=(organizationId)=>useOrganizationClient(organizationId).agents;var useSkills=(organizationId)=>useOrganizationClient(organizationId).skills;var useWorkflows=(organizationId)=>useOrganizationClient(organizationId).workflows;var useRuns=(organizationId)=>useOrganizationClient(organizationId).runs;var useAttachments=(organizationId)=>useOrganizationClient(organizationId).attachments;var useClientContext=(organizationId)=>useOrganizationClient(organizationId).context;import{jsxDEV as jsxDEV2}from"react/jsx-dev-runtime";var ignoreSubmit=()=>false;var createPromptKeyHandler=(onSubmit)=>(event)=>{if(event.key==="Enter"&&!event.shiftKey&&!event.isComposing){event.preventDefault();onSubmit()}};var AgentPromptPrimitive=({autoFocus=false,className,components,id,label,onChange,onSubmit,pending,status,style,submitLabel="Send",value})=>{const Form=components?.Form??"form";const Label=components?.Label??"label";const Textarea=components?.Textarea??"textarea";const Button=components?.Button??"button";const Status=components?.Status??"div";const statusId=`${id}-status`;const submit=(event)=>{event.preventDefault();if(!pending){onSubmit()}};const onKeyDown=(event)=>{createPromptKeyHandler(pending?ignoreSubmit:onSubmit)({isComposing:event.nativeEvent.isComposing,key:event.key,preventDefault:()=>{event.preventDefault()},shiftKey:event.shiftKey})};return jsxDEV2(Form,{className:["ci-agent-prompt",className].filter(Boolean).join(" "),onSubmit:submit,style,children:[jsxDEV2(Label,{className:"ci-agent-prompt__label",htmlFor:id,children:label},undefined,false,undefined,this),jsxDEV2(Textarea,{"aria-describedby":statusId,autoFocus,className:"ci-agent-prompt__input",disabled:pending,id,onChange:(event)=>{onChange(event.currentTarget.value)},onKeyDown,value},undefined,false,undefined,this),jsxDEV2(Button,{className:"ci-agent-prompt__submit",disabled:pending||value.trim().length===0,type:"submit",children:submitLabel},undefined,false,undefined,this),jsxDEV2(Status,{"aria-live":"polite",className:"ci-agent-prompt__status",id:statusId,children:status},undefined,false,undefined,this)]},undefined,true,undefined,this)};var useAgentInvocation=(organizationId)=>{const{agents}=useOrganizationClient(organizationId);const[state,setState]=useState2({status:"idle"});const invoke=useCallback(async(input)=>{setState({status:"submitting"});try{const result=await agents.invoke(input);setState(result.ok?{result,status:"success"}:{result,status:"failure"});return result}catch(error){setState({error,status:"error"});throw error}},[agents]);return{invoke,reset:()=>{setState({status:"idle"})},state}};var invocationStatus=(state)=>{switch(state.status){case"submitting":{return"Sending"}case"success":{return"Request started"}case"failure":{return state.result.error.message}case"error":{return"Request failed"}case"idle":{return null}default:{return null}}};var EMPTY_AGENT_PROMPT_COMPONENTS={};var EMPTY_AGENT_PROMPT_STYLE={};var createDefaultIdempotencyKey=()=>globalThis.crypto.randomUUID();var AgentPrompt=({agentId,autoFocus=false,className="",components=EMPTY_AGENT_PROMPT_COMPONENTS,createIdempotencyKey=createDefaultIdempotencyKey,label="Message",onResult,organizationId,style=EMPTY_AGENT_PROMPT_STYLE,submitLabel="Send"})=>{const id=`ci-agent-prompt-${useId().replaceAll(":","")}`;const[value,setValue]=useState2("");const invocation=useAgentInvocation(organizationId);const submit=()=>{const prompt=value.trim();if(prompt.length===0||invocation.state.status==="submitting"){return}const submitInvocation=async()=>{try{const result=await invocation.invoke({agentId,idempotencyKey:createIdempotencyKey(),input:{prompt}});if(result.ok){setValue("")}onResult?.(result)}catch{}};submitInvocation()};return jsxDEV2(AgentPromptPrimitive,{autoFocus,className,components,id,label,onChange:setValue,onSubmit:submit,pending:invocation.state.status==="submitting",status:invocationStatus(invocation.state),style,submitLabel,value},undefined,false,undefined,this)};import{createContext as createContext2,useCallback as useCallback2,useContext as useContext2,useEffect,useMemo as useMemo2,useSyncExternalStore}from"react";import{jsxDEV as jsxDEV3}from"react/jsx-dev-runtime";var AuthContext=createContext2(null);var toFederatedAuthError=(error)=>new FederatedAuthError("authorization_failed",error.message);var unknownAuthError=()=>new FederatedAuthError("authorization_failed","Sign in failed");var CollectiveIntelligenceLoginProvider=(props)=>{const state=useSyncExternalStore(props.auth.subscribe,props.auth.getState,props.auth.getState);const contextValue=useMemo2(()=>({auth:props.auth,state}),[props.auth,state]);return jsxDEV3(AuthContext.Provider,{value:contextValue,children:props.clientFactory===undefined?jsxDEV3(CollectiveIntelligenceProvider,{client:props.client,entitySource:props.entitySource,children:props.children},undefined,false,undefined,this):jsxDEV3(CollectiveIntelligenceProvider,{clientFactory:props.clientFactory,entitySource:props.entitySource,children:props.children},undefined,false,undefined,this)},undefined,false,undefined,this)};var useCollectiveIntelligenceAuth=()=>{const value=useContext2(AuthContext);if(value===null){throw new Error("CollectiveIntelligenceLoginProvider must wrap authentication bindings")}return{...value,beginLogin:value.auth.beginLogin,completeLogin:value.auth.completeLogin,logout:value.auth.logout,reauthorize:value.auth.reauthorize}};var LoginButton=({children="Sign in with Collective Intelligence",className,components,disabled=false,onError,returnTo,style})=>{const{auth,state}=useCollectiveIntelligenceAuth();const Button=components?.Button??"button";const redirecting=state.status==="redirecting";const onClick=useCallback2((event)=>{event.preventDefault();const target=returnTo??globalThis.location.href;const begin=async()=>{try{await auth.beginLogin({returnTo:target})}catch(error){onError?.(error instanceof Error?toFederatedAuthError(error):unknownAuthError())}};begin()},[auth,onError,returnTo]);return jsxDEV3(Button,{"aria-busy":redirecting,className:["ci-login-button",className].filter(Boolean).join(" "),disabled:disabled||redirecting,onClick,style,type:"button",children},undefined,false,undefined,this)};var callbackMessage=(state)=>{switch(state.status){case"authenticated":{return"Sign in complete"}case"error":{return state.error.message}case"expired":{return"Sign in expired"}case"anonymous":case"redirecting":{return"Completing sign in"}default:{return"Completing sign in"}}};var LoginCallbackPrimitive=({className,components,state,style})=>{const Status=components?.Status??"div";return jsxDEV3(Status,{"aria-live":"polite",className:["ci-login-callback",className].filter(Boolean).join(" "),style,children:callbackMessage(state)},undefined,false,undefined,this)};var LoginCallback=({callbackUrl,onComplete,onError,...primitiveProps})=>{const{auth,state}=useCollectiveIntelligenceAuth();useEffect(()=>{const url=callbackUrl??globalThis.location.href;const complete=async()=>{try{const{returnTo}=await auth.completeLogin(url);onComplete?.(returnTo)}catch(error){onError?.(error instanceof Error?toFederatedAuthError(error):unknownAuthError())}};complete()},[auth,callbackUrl,onComplete,onError]);return jsxDEV3(LoginCallbackPrimitive,{...primitiveProps,state},undefined,false,undefined,this)};var useSession=()=>{const{state}=useCollectiveIntelligenceAuth();return state};var SessionGate=({children,fallback=null})=>{const session=useSession();if(session.status!=="authenticated"){return fallback}return children};"use client";var clientSdkReactEntrypoint="react";"use client";var{AgentPrompt:AgentPrompt2,AgentPromptPrimitive:AgentPromptPrimitive2,CollectiveIntelligenceLoginProvider:CollectiveIntelligenceLoginProvider2,CollectiveIntelligenceProvider:CollectiveIntelligenceProvider2,LoginButton:LoginButton2,LoginCallback:LoginCallback2,LoginCallbackPrimitive:LoginCallbackPrimitive2,SessionGate:SessionGate2,clientSdkReactEntrypoint:clientSdkReactEntrypoint2,createPromptKeyHandler:createPromptKeyHandler2,useAgents:useAgents2,useAttachments:useAttachments2,useClientContext:useClientContext2,useCollectiveIntelligenceAuth:useCollectiveIntelligenceAuth2,useCollectiveIntelligenceClient:useCollectiveIntelligenceClient2,useKnowledge:useKnowledge2,useOrganizationClient:useOrganizationClient2,useRuns:useRuns2,useSession:useSession2,useSkills:useSkills2,useWorkflows:useWorkflows2,useAgentInvocation:useAgentInvocation2}=exports_src;export{useWorkflows2 as useWorkflows,useSkills2 as useSkills,useSession2 as useSession,useRuns2 as useRuns,useOrganizationClient2 as useOrganizationClient,useKnowledge2 as useKnowledge,useCollectiveIntelligenceClient2 as useCollectiveIntelligenceClient,useCollectiveIntelligenceAuth2 as useCollectiveIntelligenceAuth,useClientContext2 as useClientContext,useAttachments2 as useAttachments,useAgents2 as useAgents,useAgentInvocation2 as useAgentInvocation,createPromptKeyHandler2 as createPromptKeyHandler,clientSdkReactEntrypoint2 as clientSdkReactEntrypoint,SessionGate2 as SessionGate,LoginCallbackPrimitive2 as LoginCallbackPrimitive,LoginCallback2 as LoginCallback,LoginButton2 as LoginButton,CollectiveIntelligenceProvider2 as CollectiveIntelligenceProvider,CollectiveIntelligenceLoginProvider2 as CollectiveIntelligenceLoginProvider,AgentPromptPrimitive2 as AgentPromptPrimitive,AgentPrompt2 as AgentPrompt};
|
package/dist/resources.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{EntityForm,EntityList,EntityTable,ResourceQueryError,__export,clearProtectedResourceQueries,createDelegatedEntitySource,createResourceListQueryOptions,defineEntity,hasResourceCapability,mapResourceAuthState,resourceKeys,unwrapResourceResult,useEntityCreate,useEntityDelete,useEntityList,useEntityRecord,useEntityUpdate,useEntityViewState,useMemoryEntityViewState}from"./index-6memxjn1.js";var exports_resources={};__export(exports_resources,{useMemoryEntityViewState:()=>useMemoryEntityViewState,useEntityViewState:()=>useEntityViewState,useEntityUpdate:()=>useEntityUpdate,useEntityRecord:()=>useEntityRecord,useEntityList:()=>useEntityList,useEntityDelete:()=>useEntityDelete,useEntityCreate:()=>useEntityCreate,unwrapResourceResult:()=>unwrapResourceResult,mapResourceAuthState:()=>mapResourceAuthState,hasResourceCapability:()=>hasResourceCapability,defineEntity:()=>defineEntity,createDelegatedEntitySource:()=>createDelegatedEntitySource,ResourceTable:()=>ResourceTable,ResourceQueryError:()=>ResourceQueryError,ResourceProvider:()=>ResourceProvider,ResourcePagination:()=>ResourcePagination,ResourceList:()=>ResourceList,ResourceLifecycleAction:()=>ResourceLifecycleAction,ResourceFilter:()=>ResourceFilter,ResourceCapabilityAction:()=>ResourceCapabilityAction,EntityTable:()=>EntityTable,EntityList:()=>EntityList,EntityForm:()=>EntityForm});import{useMutation,useQuery,useQueryClient as useQueryClient2}from"@tanstack/react-query";import{mutationOptions}from"@tanstack/react-query";var invalidateResource=async(options)=>{await options.queryClient.invalidateQueries({queryKey:resourceKeys.resource(options.organizationId,options.client.definition.id,options.client.definition.version)})};var createResourceMutationOptions=(options)=>mutationOptions({mutationFn:async(input)=>{let result;switch(options.operation){case"hard_delete":{unwrapResourceResult(await options.client.hardDelete(input));break}case"restore":{result=unwrapResourceResult(await options.client.restore(input));break}case"soft_delete":{result=unwrapResourceResult(await options.client.softDelete(input));break}default:{throw new TypeError(`Unknown resource operation: ${String(options.operation)}`)}}return result},mutationKey:[...resourceKeys.resource(options.organizationId,options.client.definition.id,options.client.definition.version),"mutations",options.operation],onSuccess:async()=>{await invalidateResource(options)}});import{useQueryClient}from"@tanstack/react-query";import{createContext,useContext,useEffect,useMemo,useRef}from"react";import{jsxDEV}from"react/jsx-dev-runtime";var useResourceQueryCleanup=(queryClient,authStatus,organizationId)=>{const previousOrganizationId=useRef(null);const input=useMemo(()=>({authStatus,organizationId}),[authStatus,organizationId]);useEffect(()=>{const previous=previousOrganizationId.current;previousOrganizationId.current=input.organizationId;if(input.authStatus!=="authenticated"){clearProtectedResourceQueries(queryClient);return}if(previous!==null&&previous!==input.organizationId){clearProtectedResourceQueries(queryClient,previous)}},[input,queryClient])};var ResourceContext=createContext(null);var ResourceProvider=({authState,capabilities,children,organizationId})=>{const queryClient=useQueryClient();useResourceQueryCleanup(queryClient,authState.status,organizationId);const value=useMemo(()=>({authState,capabilities,organizationId}),[authState,capabilities,organizationId]);return jsxDEV(ResourceContext.Provider,{value,children},undefined,false,undefined,this)};var useResourceContext=()=>{const value=useContext(ResourceContext);if(value===null){throw new Error("ResourceProvider must wrap resource bindings")}return value};var authStateForError=(error,fallback)=>error instanceof ResourceQueryError?mapResourceAuthState({correlationId:error.correlationId,error:error.resourceError,ok:false}):fallback;var useResourceList=(client,query)=>{const context=useResourceContext();const result=useQuery({...createResourceListQueryOptions({client,organizationId:context.organizationId,query}),enabled:context.authState.status==="authenticated"});return{...result,authState:authStateForError(result.error,context.authState)}};var useResourceLifecycleMutation=(client,operation)=>{const{capabilities,organizationId}=useResourceContext();const queryClient=useQueryClient2();const mutation=useMutation(createResourceMutationOptions({client,operation,organizationId,queryClient}));let capability;if(operation==="hard_delete"){capability="hardDelete"}else if(operation==="soft_delete"){capability="softDelete"}else{capability=operation}return{...mutation,available:capabilities[capability]===true}};import{jsxDEV as jsxDEV2,Fragment}from"react/jsx-dev-runtime";var nextQuery=(query,result)=>{if(result.pagination==="cursor"){return result.nextCursor===undefined?undefined:{...query,pagination:{cursor:result.nextCursor,limit:query.pagination.mode==="cursor"?query.pagination.limit:25,mode:"cursor"}}}return result.page>=result.totalPages?undefined:{...query,pagination:{mode:"page",page:result.page+1,pageSize:result.pageSize}}};var previousQuery=(query,result)=>result.pagination==="page"&&result.page>1?{...query,pagination:{mode:"page",page:result.page-1,pageSize:result.pageSize}}:undefined;var DefaultStatus=({authState,error,pending})=>{let message=authState.status;if(authState.status==="authenticated"){message=pending?"Loading resources":error?.message??""}return jsxDEV2("output",{"aria-live":"polite",children:message},undefined,false,undefined,this)};var ResourceList=({client,components,onQueryChange,query,renderItem})=>{const resourceQuery=useResourceList(client,query);const Status=components.Status??DefaultStatus;if(resourceQuery.authState.status!=="authenticated"||resourceQuery.isPending||resourceQuery.error!==null){return jsxDEV2(Status,{authState:resourceQuery.authState,pending:resourceQuery.isPending,...resourceQuery.error===null?{}:{error:resourceQuery.error}},undefined,false,undefined,this)}const{List}=components;const{Pagination}=components;const result=resourceQuery.data;const next=nextQuery(query,result);const previous=previousQuery(query,result);return jsxDEV2(Fragment,{children:[jsxDEV2(List,{getItemKey:(item)=>item.id,items:result.items,renderItem},undefined,false,undefined,this),Pagination===undefined?null:jsxDEV2(Pagination,{hasNextPage:next!==undefined,hasPreviousPage:previous!==undefined,isPending:resourceQuery.isFetching,onNext:()=>{if(next!==undefined){onQueryChange?.(next)}},onPrevious:()=>{if(previous!==undefined){onQueryChange?.(previous)}},...result.pagination==="page"?{currentPage:result.page}:{}},undefined,false,undefined,this)]},undefined,true,undefined,this)};var ResourceCapabilityAction=({capability,children,components,unsupported="disable"})=>{const{capabilities}=useResourceContext();const supported=capabilities[capability]===true;if(!supported&&unsupported==="hide"){return null}const{Action}=components;return jsxDEV2(Action,{disabled:!supported,children},undefined,false,undefined,this)};var ResourceFilter=({components,label="Search resources",onQueryChange,query})=>{const{Filter}=components;const{textSearch:_textSearch,...queryWithoutTextSearch}=query;return jsxDEV2(Filter,{label,onChange:(value)=>{onQueryChange(value===""?queryWithoutTextSearch:{...query,textSearch:value})},value:query.textSearch??""},undefined,false,undefined,this)};var ResourcePagination=({components,isPending=false,onQueryChange,query,result})=>{const{Pagination}=components;const next=nextQuery(query,result);const previous=previousQuery(query,result);return jsxDEV2(Pagination,{hasNextPage:next!==undefined,hasPreviousPage:previous!==undefined,isPending,onNext:()=>{if(next!==undefined){onQueryChange(next)}},onPrevious:()=>{if(previous!==undefined){onQueryChange(previous)}},...result.pagination==="page"?{currentPage:result.page}:{}},undefined,false,undefined,this)};var ResourceTable=({caption,client,columns,components,query})=>{const resourceQuery=useResourceList(client,query);const Status=components.Status??DefaultStatus;if(resourceQuery.authState.status!=="authenticated"||resourceQuery.isPending||resourceQuery.error!==null){return jsxDEV2(Status,{authState:resourceQuery.authState,pending:resourceQuery.isPending,...resourceQuery.error===null?{}:{error:resourceQuery.error}},undefined,false,undefined,this)}const{Table}=components;return jsxDEV2(Table,{caption,columns,getRowKey:(row)=>row.id,renderCell:(row,column)=>column.render(row),rows:resourceQuery.data.items},undefined,false,undefined,this)};var ResourceLifecycleAction=({children,client,components,input,operation,unsupported="disable"})=>{const mutation=useResourceLifecycleMutation(client,operation);if(!mutation.available&&unsupported==="hide"){return null}const{Action}=components;return jsxDEV2(Action,{disabled:!mutation.available,onClick:()=>{mutation.mutate(input)},pending:mutation.isPending,children},undefined,false,undefined,this)};var{defineEntity:defineEntity2,EntityForm:EntityForm2,EntityList:EntityList2,EntityTable:EntityTable2,ResourceCapabilityAction:ResourceCapabilityAction2,ResourceFilter:ResourceFilter2,ResourceLifecycleAction:ResourceLifecycleAction2,ResourceList:ResourceList2,ResourcePagination:ResourcePagination2,ResourceProvider:ResourceProvider2,ResourceQueryError:ResourceQueryError2,ResourceTable:ResourceTable2,hasResourceCapability:hasResourceCapability2,mapResourceAuthState:mapResourceAuthState2,unwrapResourceResult:unwrapResourceResult2,useEntityCreate:useEntityCreate2,useEntityDelete:useEntityDelete2,useEntityList:useEntityList2,useEntityRecord:useEntityRecord2,useEntityUpdate:useEntityUpdate2,useEntityViewState:useEntityViewState2,useMemoryEntityViewState:useMemoryEntityViewState2}=exports_resources;export{useMemoryEntityViewState2 as useMemoryEntityViewState,useEntityViewState2 as useEntityViewState,useEntityUpdate2 as useEntityUpdate,useEntityRecord2 as useEntityRecord,useEntityList2 as useEntityList,useEntityDelete2 as useEntityDelete,useEntityCreate2 as useEntityCreate,unwrapResourceResult2 as unwrapResourceResult,mapResourceAuthState2 as mapResourceAuthState,hasResourceCapability2 as hasResourceCapability,defineEntity2 as defineEntity,ResourceTable2 as ResourceTable,ResourceQueryError2 as ResourceQueryError,ResourceProvider2 as ResourceProvider,ResourcePagination2 as ResourcePagination,ResourceList2 as ResourceList,ResourceLifecycleAction2 as ResourceLifecycleAction,ResourceFilter2 as ResourceFilter,ResourceCapabilityAction2 as ResourceCapabilityAction,EntityTable2 as EntityTable,EntityList2 as EntityList,EntityForm2 as EntityForm};
|
|
2
|
+
import{EntityForm,EntityList,EntityTable,ResourceQueryError,__export,clearProtectedResourceQueries,createDelegatedEntitySource,createResourceListQueryOptions,defineEntity,hasResourceCapability,mapResourceAuthState,resourceKeys,unwrapResourceResult,useEntityCreate,useEntityDelete,useEntityList,useEntityRecord,useEntityUpdate,useEntityViewState,useMemoryEntityViewState}from"./index-fq2ck59k.js";var exports_resources={};__export(exports_resources,{useMemoryEntityViewState:()=>useMemoryEntityViewState,useEntityViewState:()=>useEntityViewState,useEntityUpdate:()=>useEntityUpdate,useEntityRecord:()=>useEntityRecord,useEntityList:()=>useEntityList,useEntityDelete:()=>useEntityDelete,useEntityCreate:()=>useEntityCreate,unwrapResourceResult:()=>unwrapResourceResult,mapResourceAuthState:()=>mapResourceAuthState,hasResourceCapability:()=>hasResourceCapability,defineEntity:()=>defineEntity,createDelegatedEntitySource:()=>createDelegatedEntitySource,ResourceTable:()=>ResourceTable,ResourceQueryError:()=>ResourceQueryError,ResourceProvider:()=>ResourceProvider,ResourcePagination:()=>ResourcePagination,ResourceList:()=>ResourceList,ResourceLifecycleAction:()=>ResourceLifecycleAction,ResourceFilter:()=>ResourceFilter,ResourceCapabilityAction:()=>ResourceCapabilityAction,EntityTable:()=>EntityTable,EntityList:()=>EntityList,EntityForm:()=>EntityForm});import{useMutation,useQuery,useQueryClient as useQueryClient2}from"@tanstack/react-query";import{mutationOptions}from"@tanstack/react-query";var invalidateResource=async(options)=>{await options.queryClient.invalidateQueries({queryKey:resourceKeys.resource(options.organizationId,options.client.definition.id,options.client.definition.version)})};var createResourceMutationOptions=(options)=>mutationOptions({mutationFn:async(input)=>{let result;switch(options.operation){case"hard_delete":{unwrapResourceResult(await options.client.hardDelete(input));break}case"restore":{result=unwrapResourceResult(await options.client.restore(input));break}case"soft_delete":{result=unwrapResourceResult(await options.client.softDelete(input));break}default:{throw new TypeError(`Unknown resource operation: ${String(options.operation)}`)}}return result},mutationKey:[...resourceKeys.resource(options.organizationId,options.client.definition.id,options.client.definition.version),"mutations",options.operation],onSuccess:async()=>{await invalidateResource(options)}});import{useQueryClient}from"@tanstack/react-query";import{createContext,useContext,useEffect,useMemo,useRef}from"react";import{jsxDEV}from"react/jsx-dev-runtime";var useResourceQueryCleanup=(queryClient,authStatus,organizationId)=>{const previousOrganizationId=useRef(null);const input=useMemo(()=>({authStatus,organizationId}),[authStatus,organizationId]);useEffect(()=>{const previous=previousOrganizationId.current;previousOrganizationId.current=input.organizationId;if(input.authStatus!=="authenticated"){clearProtectedResourceQueries(queryClient);return}if(previous!==null&&previous!==input.organizationId){clearProtectedResourceQueries(queryClient,previous)}},[input,queryClient])};var ResourceContext=createContext(null);var ResourceProvider=({authState,capabilities,children,organizationId})=>{const queryClient=useQueryClient();useResourceQueryCleanup(queryClient,authState.status,organizationId);const value=useMemo(()=>({authState,capabilities,organizationId}),[authState,capabilities,organizationId]);return jsxDEV(ResourceContext.Provider,{value,children},undefined,false,undefined,this)};var useResourceContext=()=>{const value=useContext(ResourceContext);if(value===null){throw new Error("ResourceProvider must wrap resource bindings")}return value};var authStateForError=(error,fallback)=>error instanceof ResourceQueryError?mapResourceAuthState({correlationId:error.correlationId,error:error.resourceError,ok:false}):fallback;var useResourceList=(client,query)=>{const context=useResourceContext();const result=useQuery({...createResourceListQueryOptions({client,organizationId:context.organizationId,query}),enabled:context.authState.status==="authenticated"});return{...result,authState:authStateForError(result.error,context.authState)}};var useResourceLifecycleMutation=(client,operation)=>{const{capabilities,organizationId}=useResourceContext();const queryClient=useQueryClient2();const mutation=useMutation(createResourceMutationOptions({client,operation,organizationId,queryClient}));let capability;if(operation==="hard_delete"){capability="hardDelete"}else if(operation==="soft_delete"){capability="softDelete"}else{capability=operation}return{...mutation,available:capabilities[capability]===true}};import{jsxDEV as jsxDEV2,Fragment}from"react/jsx-dev-runtime";var nextQuery=(query,result)=>{if(result.pagination==="cursor"){return result.nextCursor===undefined?undefined:{...query,pagination:{cursor:result.nextCursor,limit:query.pagination.mode==="cursor"?query.pagination.limit:25,mode:"cursor"}}}return result.page>=result.totalPages?undefined:{...query,pagination:{mode:"page",page:result.page+1,pageSize:result.pageSize}}};var previousQuery=(query,result)=>result.pagination==="page"&&result.page>1?{...query,pagination:{mode:"page",page:result.page-1,pageSize:result.pageSize}}:undefined;var DefaultStatus=({authState,error,pending})=>{let message=authState.status;if(authState.status==="authenticated"){message=pending?"Loading resources":error?.message??""}return jsxDEV2("output",{"aria-live":"polite",children:message},undefined,false,undefined,this)};var ResourceList=({client,components,onQueryChange,query,renderItem})=>{const resourceQuery=useResourceList(client,query);const Status=components.Status??DefaultStatus;if(resourceQuery.authState.status!=="authenticated"||resourceQuery.isPending||resourceQuery.error!==null){return jsxDEV2(Status,{authState:resourceQuery.authState,pending:resourceQuery.isPending,...resourceQuery.error===null?{}:{error:resourceQuery.error}},undefined,false,undefined,this)}const{List}=components;const{Pagination}=components;const result=resourceQuery.data;const next=nextQuery(query,result);const previous=previousQuery(query,result);return jsxDEV2(Fragment,{children:[jsxDEV2(List,{getItemKey:(item)=>item.id,items:result.items,renderItem},undefined,false,undefined,this),Pagination===undefined?null:jsxDEV2(Pagination,{hasNextPage:next!==undefined,hasPreviousPage:previous!==undefined,isPending:resourceQuery.isFetching,onNext:()=>{if(next!==undefined){onQueryChange?.(next)}},onPrevious:()=>{if(previous!==undefined){onQueryChange?.(previous)}},...result.pagination==="page"?{currentPage:result.page}:{}},undefined,false,undefined,this)]},undefined,true,undefined,this)};var ResourceCapabilityAction=({capability,children,components,unsupported="disable"})=>{const{capabilities}=useResourceContext();const supported=capabilities[capability]===true;if(!supported&&unsupported==="hide"){return null}const{Action}=components;return jsxDEV2(Action,{disabled:!supported,children},undefined,false,undefined,this)};var ResourceFilter=({components,label="Search resources",onQueryChange,query})=>{const{Filter}=components;const{textSearch:_textSearch,...queryWithoutTextSearch}=query;return jsxDEV2(Filter,{label,onChange:(value)=>{onQueryChange(value===""?queryWithoutTextSearch:{...query,textSearch:value})},value:query.textSearch??""},undefined,false,undefined,this)};var ResourcePagination=({components,isPending=false,onQueryChange,query,result})=>{const{Pagination}=components;const next=nextQuery(query,result);const previous=previousQuery(query,result);return jsxDEV2(Pagination,{hasNextPage:next!==undefined,hasPreviousPage:previous!==undefined,isPending,onNext:()=>{if(next!==undefined){onQueryChange(next)}},onPrevious:()=>{if(previous!==undefined){onQueryChange(previous)}},...result.pagination==="page"?{currentPage:result.page}:{}},undefined,false,undefined,this)};var ResourceTable=({caption,client,columns,components,query})=>{const resourceQuery=useResourceList(client,query);const Status=components.Status??DefaultStatus;if(resourceQuery.authState.status!=="authenticated"||resourceQuery.isPending||resourceQuery.error!==null){return jsxDEV2(Status,{authState:resourceQuery.authState,pending:resourceQuery.isPending,...resourceQuery.error===null?{}:{error:resourceQuery.error}},undefined,false,undefined,this)}const{Table}=components;return jsxDEV2(Table,{caption,columns,getRowKey:(row)=>row.id,renderCell:(row,column)=>column.render(row),rows:resourceQuery.data.items},undefined,false,undefined,this)};var ResourceLifecycleAction=({children,client,components,input,operation,unsupported="disable"})=>{const mutation=useResourceLifecycleMutation(client,operation);if(!mutation.available&&unsupported==="hide"){return null}const{Action}=components;return jsxDEV2(Action,{disabled:!mutation.available,onClick:()=>{mutation.mutate(input)},pending:mutation.isPending,children},undefined,false,undefined,this)};var{defineEntity:defineEntity2,EntityForm:EntityForm2,EntityList:EntityList2,EntityTable:EntityTable2,ResourceCapabilityAction:ResourceCapabilityAction2,ResourceFilter:ResourceFilter2,ResourceLifecycleAction:ResourceLifecycleAction2,ResourceList:ResourceList2,ResourcePagination:ResourcePagination2,ResourceProvider:ResourceProvider2,ResourceQueryError:ResourceQueryError2,ResourceTable:ResourceTable2,hasResourceCapability:hasResourceCapability2,mapResourceAuthState:mapResourceAuthState2,unwrapResourceResult:unwrapResourceResult2,useEntityCreate:useEntityCreate2,useEntityDelete:useEntityDelete2,useEntityList:useEntityList2,useEntityRecord:useEntityRecord2,useEntityUpdate:useEntityUpdate2,useEntityViewState:useEntityViewState2,useMemoryEntityViewState:useMemoryEntityViewState2}=exports_resources;export{useMemoryEntityViewState2 as useMemoryEntityViewState,useEntityViewState2 as useEntityViewState,useEntityUpdate2 as useEntityUpdate,useEntityRecord2 as useEntityRecord,useEntityList2 as useEntityList,useEntityDelete2 as useEntityDelete,useEntityCreate2 as useEntityCreate,unwrapResourceResult2 as unwrapResourceResult,mapResourceAuthState2 as mapResourceAuthState,hasResourceCapability2 as hasResourceCapability,defineEntity2 as defineEntity,ResourceTable2 as ResourceTable,ResourceQueryError2 as ResourceQueryError,ResourceProvider2 as ResourceProvider,ResourcePagination2 as ResourcePagination,ResourceList2 as ResourceList,ResourceLifecycleAction2 as ResourceLifecycleAction,ResourceFilter2 as ResourceFilter,ResourceCapabilityAction2 as ResourceCapabilityAction,EntityTable2 as EntityTable,EntityList2 as EntityList,EntityForm2 as EntityForm};
|
package/package.json
CHANGED