kaizenai 0.2.0 → 0.2.1
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.
|
@@ -461,7 +461,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
461
461
|
3. Refresh the page.
|
|
462
462
|
4. Right-click the get-current-period-usage request.
|
|
463
463
|
5. Copy > Copy as cURL.
|
|
464
|
-
6. Paste it here.`;function d8({open:e,onOpenChange:t,onSubmit:n}){const r=_.useRef(null),[s,a]=_.useState(""),[l,u]=_.useState(!1);_.useEffect(()=>{e&&(a(""),setTimeout(()=>{var p;return(p=r.current)==null?void 0:p.focus()},0))},[e]);async function h(){const p=await navigator.clipboard.readText();a(p)}async function d(){await navigator.clipboard.writeText(Ok),u(!0),setTimeout(()=>u(!1),2e3)}const g=s.trim().length>0;return f.jsx(ip,{open:e,onOpenChange:t,children:f.jsx(kd,{size:"lg",children:f.jsxs("form",{onSubmit:p=>{p.preventDefault(),g&&n(s.trim())},children:[f.jsxs(op,{className:"space-y-4",children:[f.jsx(sp,{children:"Import Cursor Session"}),f.jsxs(S0,{children:["Paste the copied ",f.jsx("code",{children:"get-current-period-usage"})," curl command and Kaizen will import the session for you."]}),f.jsx("div",{className:"rounded-xl border border-border bg-card px-3 py-3 text-sm text-muted-foreground whitespace-pre-line",children:Ok}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(tt,{type:"button",variant:"ghost",size:"sm",onClick:()=>void h(),children:"Paste Clipboard"}),f.jsxs(tt,{type:"button",variant:"ghost",size:"sm",onClick:()=>void d(),children:[l?f.jsx(Wi,{className:"h-4 w-4"}):f.jsx(Cd,{className:"h-4 w-4"}),f.jsx("span",{className:"ml-1",children:l?"Copied":"Copy Steps"})]})]}),f.jsx(lp,{ref:r,value:s,onChange:p=>a(p.target.value),rows:10,placeholder:"Paste the copied curl command here",className:"font-mono text-xs"})]}),f.jsxs(ap,{children:[f.jsx(tt,{type:"button",variant:"ghost",size:"sm",onClick:()=>t(!1),children:"Cancel"}),f.jsx(tt,{type:"submit",variant:"secondary",size:"sm",disabled:!g,children:"Import Session"})]})]})})})}const h8=["top","right","bottom","left"],Zo=Math.min,ri=Math.max,_m=Math.round,yf=Math.floor,gs=e=>({x:e,y:e}),f8={left:"right",right:"left",bottom:"top",top:"bottom"};function Rb(e,t,n){return ri(e,Zo(t,n))}function Xs(e,t){return typeof e=="function"?e(t):e}function Zs(e){return e.split("-")[0]}function xc(e){return e.split("-")[1]}function C0(e){return e==="x"?"y":"x"}function k0(e){return e==="y"?"height":"width"}function us(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function E0(e){return C0(us(e))}function m8(e,t,n){n===void 0&&(n=!1);const r=xc(e),s=E0(e),a=k0(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=bm(l)),[l,bm(l)]}function p8(e){const t=bm(e);return[Tb(e),t,Tb(t)]}function Tb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Lk=["left","right"],zk=["right","left"],g8=["top","bottom"],v8=["bottom","top"];function _8(e,t,n){switch(e){case"top":case"bottom":return n?t?zk:Lk:t?Lk:zk;case"left":case"right":return t?g8:v8;default:return[]}}function b8(e,t,n,r){const s=xc(e);let a=_8(Zs(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(Tb)))),a}function bm(e){const t=Zs(e);return f8[t]+e.slice(t.length)}function y8(e){return{top:0,right:0,bottom:0,left:0,...e}}function DN(e){return typeof e!="number"?y8(e):{top:e,right:e,bottom:e,left:e}}function ym(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Pk(e,t,n){let{reference:r,floating:s}=e;const a=us(t),l=E0(t),u=k0(l),h=Zs(t),d=a==="y",g=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,v=r[u]/2-s[u]/2;let y;switch(h){case"top":y={x:g,y:r.y-s.height};break;case"bottom":y={x:g,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-s.width,y:p};break;default:y={x:r.x,y:r.y}}switch(xc(t)){case"start":y[l]-=v*(n&&d?-1:1);break;case"end":y[l]+=v*(n&&d?-1:1);break}return y}async function x8(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:u,strategy:h}=e,{boundary:d="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:v=!1,padding:y=0}=Xs(t,e),w=DN(y),C=u[v?p==="floating"?"reference":"floating":p],k=ym(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(C)))==null||n?C:C.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:d,rootBoundary:g,strategy:h})),R=p==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),N=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},j=ym(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:R,offsetParent:E,strategy:h}):R);return{top:(k.top-j.top+w.top)/N.y,bottom:(j.bottom-k.bottom+w.bottom)/N.y,left:(k.left-j.left+w.left)/N.x,right:(j.right-k.right+w.right)/N.x}}const w8=50,S8=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,u=l.detectOverflow?l:{...l,detectOverflow:x8},h=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:g,y:p}=Pk(d,r,h),v=r,y=0;const w={};for(let S=0;S<a.length;S++){const C=a[S];if(!C)continue;const{name:k,fn:R}=C,{x:E,y:N,data:j,reset:D}=await R({x:g,y:p,initialPlacement:r,placement:v,strategy:s,middlewareData:w,rects:d,platform:u,elements:{reference:e,floating:t}});g=E??g,p=N??p,w[k]={...w[k],...j},D&&y<w8&&(y++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(d=D.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:g,y:p}=Pk(d,v,h)),S=-1)}return{x:g,y:p,placement:v,strategy:s,middlewareData:w}},C8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:u,middlewareData:h}=t,{element:d,padding:g=0}=Xs(e,t)||{};if(d==null)return{};const p=DN(g),v={x:n,y:r},y=E0(s),w=k0(y),S=await l.getDimensions(d),C=y==="y",k=C?"top":"left",R=C?"bottom":"right",E=C?"clientHeight":"clientWidth",N=a.reference[w]+a.reference[y]-v[y]-a.floating[w],j=v[y]-a.reference[y],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let L=D?D[E]:0;(!L||!await(l.isElement==null?void 0:l.isElement(D)))&&(L=u.floating[E]||a.floating[w]);const U=N/2-j/2,Y=L/2-S[w]/2-1,P=Zo(p[k],Y),V=Zo(p[R],Y),I=P,W=L-S[w]-V,K=L/2-S[w]/2+U,q=Rb(I,K,W),O=!h.arrow&&xc(s)!=null&&K!==q&&a.reference[w]/2-(K<I?P:V)-S[w]/2<0,F=O?K<I?K-I:K-W:0;return{[y]:v[y]+F,data:{[y]:q,centerOffset:K-q-F,...O&&{alignmentOffset:F}},reset:O}}}),k8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:l,initialPlacement:u,platform:h,elements:d}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...C}=Xs(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const k=Zs(s),R=us(u),E=Zs(u)===u,N=await(h.isRTL==null?void 0:h.isRTL(d.floating)),j=v||(E||!S?[bm(u)]:p8(u)),D=w!=="none";!v&&D&&j.push(...b8(u,S,w,N));const L=[u,...j],U=await h.detectOverflow(t,C),Y=[];let P=((r=a.flip)==null?void 0:r.overflows)||[];if(g&&Y.push(U[k]),p){const K=m8(s,l,N);Y.push(U[K[0]],U[K[1]])}if(P=[...P,{placement:s,overflows:Y}],!Y.every(K=>K<=0)){var V,I;const K=(((V=a.flip)==null?void 0:V.index)||0)+1,q=L[K];if(q&&(!(p==="alignment"?R!==us(q):!1)||P.every(H=>us(H.placement)===R?H.overflows[0]>0:!0)))return{data:{index:K,overflows:P},reset:{placement:q}};let O=(I=P.filter(F=>F.overflows[0]<=0).sort((F,H)=>F.overflows[1]-H.overflows[1])[0])==null?void 0:I.placement;if(!O)switch(y){case"bestFit":{var W;const F=(W=P.filter(H=>{if(D){const $=us(H.placement);return $===R||$==="y"}return!0}).map(H=>[H.placement,H.overflows.filter($=>$>0).reduce(($,M)=>$+M,0)]).sort((H,$)=>H[1]-$[1])[0])==null?void 0:W[0];F&&(O=F);break}case"initialPlacement":O=u;break}if(s!==O)return{reset:{placement:O}}}return{}}}};function Bk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ik(e){return h8.some(t=>e[t]>=0)}const E8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...a}=Xs(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),u=Bk(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Ik(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),u=Bk(l,n.floating);return{data:{escapedOffsets:u,escaped:Ik(u)}}}default:return{}}}}},jN=new Set(["left","top"]);async function R8(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Zs(n),u=xc(n),h=us(n)==="y",d=jN.has(l)?-1:1,g=a&&h?-1:1,p=Xs(t,e);let{mainAxis:v,crossAxis:y,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(y=u==="end"?w*-1:w),h?{x:y*g,y:v*d}:{x:v*d,y:y*g}}const T8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:l,middlewareData:u}=t,h=await R8(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+h.x,y:a+h.y,data:{...h,placement:l}}}}},N8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:a}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:h={fn:k=>{let{x:R,y:E}=k;return{x:R,y:E}}},...d}=Xs(e,t),g={x:n,y:r},p=await a.detectOverflow(t,d),v=us(Zs(s)),y=C0(v);let w=g[y],S=g[v];if(l){const k=y==="y"?"top":"left",R=y==="y"?"bottom":"right",E=w+p[k],N=w-p[R];w=Rb(E,w,N)}if(u){const k=v==="y"?"top":"left",R=v==="y"?"bottom":"right",E=S+p[k],N=S-p[R];S=Rb(E,S,N)}const C=h.fn({...t,[y]:w,[v]:S});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[y]:l,[v]:u}}}}}},M8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:a,middlewareData:l}=t,{offset:u=0,mainAxis:h=!0,crossAxis:d=!0}=Xs(e,t),g={x:n,y:r},p=us(s),v=C0(p);let y=g[v],w=g[p];const S=Xs(u,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const E=v==="y"?"height":"width",N=a.reference[v]-a.floating[E]+C.mainAxis,j=a.reference[v]+a.reference[E]-C.mainAxis;y<N?y=N:y>j&&(y=j)}if(d){var k,R;const E=v==="y"?"width":"height",N=jN.has(Zs(s)),j=a.reference[p]-a.floating[E]+(N&&((k=l.offset)==null?void 0:k[p])||0)+(N?0:C.crossAxis),D=a.reference[p]+a.reference[E]+(N?0:((R=l.offset)==null?void 0:R[p])||0)-(N?C.crossAxis:0);w<j?w=j:w>D&&(w=D)}return{[v]:y,[p]:w}}}},A8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:a,platform:l,elements:u}=t,{apply:h=()=>{},...d}=Xs(e,t),g=await l.detectOverflow(t,d),p=Zs(s),v=xc(s),y=us(s)==="y",{width:w,height:S}=a.floating;let C,k;p==="top"||p==="bottom"?(C=p,k=v===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(k=p,C=v==="end"?"top":"bottom");const R=S-g.top-g.bottom,E=w-g.left-g.right,N=Zo(S-g[C],R),j=Zo(w-g[k],E),D=!t.middlewareData.shift;let L=N,U=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(L=R),D&&!v){const P=ri(g.left,0),V=ri(g.right,0),I=ri(g.top,0),W=ri(g.bottom,0);y?U=w-2*(P!==0||V!==0?P+V:ri(g.left,g.right)):L=S-2*(I!==0||W!==0?I+W:ri(g.top,g.bottom))}await h({...t,availableWidth:U,availableHeight:L});const Y=await l.getDimensions(u.floating);return w!==Y.width||S!==Y.height?{reset:{rects:!0}}:{}}}};function cp(){return typeof window<"u"}function wc(e){return ON(e)?(e.nodeName||"").toLowerCase():"#document"}function ii(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ys(e){var t;return(t=(ON(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ON(e){return cp()?e instanceof Node||e instanceof ii(e).Node:!1}function Vi(e){return cp()?e instanceof Element||e instanceof ii(e).Element:!1}function to(e){return cp()?e instanceof HTMLElement||e instanceof ii(e).HTMLElement:!1}function Hk(e){return!cp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ii(e).ShadowRoot}function Ed(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=qi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function D8(e){return/^(table|td|th)$/.test(wc(e))}function up(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const j8=/transform|translate|scale|rotate|perspective|filter/,O8=/paint|layout|strict|content/,Ca=e=>!!e&&e!=="none";let m_;function R0(e){const t=Vi(e)?qi(e):e;return Ca(t.transform)||Ca(t.translate)||Ca(t.scale)||Ca(t.rotate)||Ca(t.perspective)||!T0()&&(Ca(t.backdropFilter)||Ca(t.filter))||j8.test(t.willChange||"")||O8.test(t.contain||"")}function L8(e){let t=Qo(e);for(;to(t)&&!cc(t);){if(R0(t))return t;if(up(t))return null;t=Qo(t)}return null}function T0(){return m_==null&&(m_=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),m_}function cc(e){return/^(html|body|#document)$/.test(wc(e))}function qi(e){return ii(e).getComputedStyle(e)}function dp(e){return Vi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qo(e){if(wc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hk(e)&&e.host||ys(e);return Hk(t)?t.host:t}function LN(e){const t=Qo(e);return cc(t)?e.ownerDocument?e.ownerDocument.body:e.body:to(t)&&Ed(t)?t:LN(t)}function od(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=LN(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=ii(s);if(a){const u=Nb(l);return t.concat(l,l.visualViewport||[],Ed(s)?s:[],u&&n?od(u):[])}else return t.concat(s,od(s,[],n))}function Nb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zN(e){const t=qi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=to(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,u=_m(n)!==a||_m(r)!==l;return u&&(n=a,r=l),{width:n,height:r,$:u}}function N0(e){return Vi(e)?e:e.contextElement}function rc(e){const t=N0(e);if(!to(t))return gs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=zN(t);let l=(a?_m(n.width):n.width)/r,u=(a?_m(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const z8=gs(0);function PN(e){const t=ii(e);return!T0()||!t.visualViewport?z8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function P8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ii(e)?!1:t}function $a(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=N0(e);let l=gs(1);t&&(r?Vi(r)&&(l=rc(r)):l=rc(e));const u=P8(a,n,r)?PN(a):gs(0);let h=(s.left+u.x)/l.x,d=(s.top+u.y)/l.y,g=s.width/l.x,p=s.height/l.y;if(a){const v=ii(a),y=r&&Vi(r)?ii(r):r;let w=v,S=Nb(w);for(;S&&r&&y!==w;){const C=rc(S),k=S.getBoundingClientRect(),R=qi(S),E=k.left+(S.clientLeft+parseFloat(R.paddingLeft))*C.x,N=k.top+(S.clientTop+parseFloat(R.paddingTop))*C.y;h*=C.x,d*=C.y,g*=C.x,p*=C.y,h+=E,d+=N,w=ii(S),S=Nb(w)}}return ym({width:g,height:p,x:h,y:d})}function hp(e,t){const n=dp(e).scrollLeft;return t?t.left+n:$a(ys(e)).left+n}function BN(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-hp(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function B8(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=ys(r),u=t?up(t.floating):!1;if(r===l||u&&a)return n;let h={scrollLeft:0,scrollTop:0},d=gs(1);const g=gs(0),p=to(r);if((p||!p&&!a)&&((wc(r)!=="body"||Ed(l))&&(h=dp(r)),p)){const y=$a(r);d=rc(r),g.x=y.x+r.clientLeft,g.y=y.y+r.clientTop}const v=l&&!p&&!a?BN(l,h):gs(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-h.scrollLeft*d.x+g.x+v.x,y:n.y*d.y-h.scrollTop*d.y+g.y+v.y}}function I8(e){return Array.from(e.getClientRects())}function H8(e){const t=ys(e),n=dp(e),r=e.ownerDocument.body,s=ri(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ri(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+hp(e);const u=-n.scrollTop;return qi(r).direction==="rtl"&&(l+=ri(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:l,y:u}}const Fk=25;function F8(e,t){const n=ii(e),r=ys(e),s=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,u=0,h=0;if(s){a=s.width,l=s.height;const g=T0();(!g||g&&t==="fixed")&&(u=s.offsetLeft,h=s.offsetTop)}const d=hp(r);if(d<=0){const g=r.ownerDocument,p=g.body,v=getComputedStyle(p),y=g.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(r.clientWidth-p.clientWidth-y);w<=Fk&&(a-=w)}else d<=Fk&&(a+=d);return{width:a,height:l,x:u,y:h}}function U8(e,t){const n=$a(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=to(e)?rc(e):gs(1),l=e.clientWidth*a.x,u=e.clientHeight*a.y,h=s*a.x,d=r*a.y;return{width:l,height:u,x:h,y:d}}function Uk(e,t,n){let r;if(t==="viewport")r=F8(e,n);else if(t==="document")r=H8(ys(e));else if(Vi(t))r=U8(t,n);else{const s=PN(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ym(r)}function IN(e,t){const n=Qo(e);return n===t||!Vi(n)||cc(n)?!1:qi(n).position==="fixed"||IN(n,t)}function $8(e,t){const n=t.get(e);if(n)return n;let r=od(e,[],!1).filter(u=>Vi(u)&&wc(u)!=="body"),s=null;const a=qi(e).position==="fixed";let l=a?Qo(e):e;for(;Vi(l)&&!cc(l);){const u=qi(l),h=R0(l);!h&&u.position==="fixed"&&(s=null),(a?!h&&!s:!h&&u.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Ed(l)&&!h&&IN(e,l))?r=r.filter(g=>g!==l):s=u,l=Qo(l)}return t.set(e,r),r}function W8(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?up(t)?[]:$8(t,this._c):[].concat(n),r],u=Uk(t,l[0],s);let h=u.top,d=u.right,g=u.bottom,p=u.left;for(let v=1;v<l.length;v++){const y=Uk(t,l[v],s);h=ri(y.top,h),d=Zo(y.right,d),g=Zo(y.bottom,g),p=ri(y.left,p)}return{width:d-p,height:g-h,x:p,y:h}}function V8(e){const{width:t,height:n}=zN(e);return{width:t,height:n}}function q8(e,t,n){const r=to(t),s=ys(t),a=n==="fixed",l=$a(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const h=gs(0);function d(){h.x=hp(s)}if(r||!r&&!a)if((wc(t)!=="body"||Ed(s))&&(u=dp(t)),r){const y=$a(t,!0,a,t);h.x=y.x+t.clientLeft,h.y=y.y+t.clientTop}else s&&d();a&&!r&&s&&d();const g=s&&!r&&!a?BN(s,u):gs(0),p=l.left+u.scrollLeft-h.x-g.x,v=l.top+u.scrollTop-h.y-g.y;return{x:p,y:v,width:l.width,height:l.height}}function p_(e){return qi(e).position==="static"}function $k(e,t){if(!to(e)||qi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ys(e)===n&&(n=n.ownerDocument.body),n}function HN(e,t){const n=ii(e);if(up(e))return n;if(!to(e)){let s=Qo(e);for(;s&&!cc(s);){if(Vi(s)&&!p_(s))return s;s=Qo(s)}return n}let r=$k(e,t);for(;r&&D8(r)&&p_(r);)r=$k(r,t);return r&&cc(r)&&p_(r)&&!R0(r)?n:r||L8(e)||n}const K8=async function(e){const t=this.getOffsetParent||HN,n=this.getDimensions,r=await n(e.floating);return{reference:q8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function G8(e){return qi(e).direction==="rtl"}const Y8={convertOffsetParentRelativeRectToViewportRelativeRect:B8,getDocumentElement:ys,getClippingRect:W8,getOffsetParent:HN,getElementRects:K8,getClientRects:I8,getDimensions:V8,getScale:rc,isElement:Vi,isRTL:G8};function FN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function X8(e,t){let n=null,r;const s=ys(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,h){u===void 0&&(u=!1),h===void 0&&(h=1),a();const d=e.getBoundingClientRect(),{left:g,top:p,width:v,height:y}=d;if(u||t(),!v||!y)return;const w=yf(p),S=yf(s.clientWidth-(g+v)),C=yf(s.clientHeight-(p+y)),k=yf(g),E={rootMargin:-w+"px "+-S+"px "+-C+"px "+-k+"px",threshold:ri(0,Zo(1,h))||1};let N=!0;function j(D){const L=D[0].intersectionRatio;if(L!==h){if(!N)return l();L?l(!1,L):r=setTimeout(()=>{l(!1,1e-7)},1e3)}L===1&&!FN(d,e.getBoundingClientRect())&&l(),N=!1}try{n=new IntersectionObserver(j,{...E,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,E)}n.observe(e)}return l(!0),a}function Z8(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,d=N0(e),g=s||a?[...d?od(d):[],...t?od(t):[]]:[];g.forEach(k=>{s&&k.addEventListener("scroll",n,{passive:!0}),a&&k.addEventListener("resize",n)});const p=d&&u?X8(d,n):null;let v=-1,y=null;l&&(y=new ResizeObserver(k=>{let[R]=k;R&&R.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(t)})),n()}),d&&!h&&y.observe(d),t&&y.observe(t));let w,S=h?$a(e):null;h&&C();function C(){const k=$a(e);S&&!FN(S,k)&&n(),S=k,w=requestAnimationFrame(C)}return n(),()=>{var k;g.forEach(R=>{s&&R.removeEventListener("scroll",n),a&&R.removeEventListener("resize",n)}),p==null||p(),(k=y)==null||k.disconnect(),y=null,h&&cancelAnimationFrame(w)}}const Q8=T8,J8=N8,e9=k8,t9=A8,n9=E8,Wk=C8,r9=M8,i9=(e,t,n)=>{const r=new Map,s={platform:Y8,...n},a={...s.platform,_c:r};return S8(e,t,{...s,platform:a})};var s9=typeof document<"u",o9=function(){},Xf=s9?_.useLayoutEffect:o9;function xm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xm(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&e.$$typeof)&&!xm(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function UN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vk(e,t){const n=UN(e);return Math.round(t*n)/n}function g_(e){const t=_.useRef(e);return Xf(()=>{t.current=e}),t}function a9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:u=!0,whileElementsMounted:h,open:d}=e,[g,p]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=_.useState(r);xm(v,r)||y(r);const[w,S]=_.useState(null),[C,k]=_.useState(null),R=_.useCallback(H=>{H!==D.current&&(D.current=H,S(H))},[]),E=_.useCallback(H=>{H!==L.current&&(L.current=H,k(H))},[]),N=a||w,j=l||C,D=_.useRef(null),L=_.useRef(null),U=_.useRef(g),Y=h!=null,P=g_(h),V=g_(s),I=g_(d),W=_.useCallback(()=>{if(!D.current||!L.current)return;const H={placement:t,strategy:n,middleware:v};V.current&&(H.platform=V.current),i9(D.current,L.current,H).then($=>{const M={...$,isPositioned:I.current!==!1};K.current&&!xm(U.current,M)&&(U.current=M,Hi.flushSync(()=>{p(M)}))})},[v,t,n,V,I]);Xf(()=>{d===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,p(H=>({...H,isPositioned:!1})))},[d]);const K=_.useRef(!1);Xf(()=>(K.current=!0,()=>{K.current=!1}),[]),Xf(()=>{if(N&&(D.current=N),j&&(L.current=j),N&&j){if(P.current)return P.current(N,j,W);W()}},[N,j,W,P,Y]);const q=_.useMemo(()=>({reference:D,floating:L,setReference:R,setFloating:E}),[R,E]),O=_.useMemo(()=>({reference:N,floating:j}),[N,j]),F=_.useMemo(()=>{const H={position:n,left:0,top:0};if(!O.floating)return H;const $=Vk(O.floating,g.x),M=Vk(O.floating,g.y);return u?{...H,transform:"translate("+$+"px, "+M+"px)",...UN(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:M}},[n,u,O.floating,g.x,g.y]);return _.useMemo(()=>({...g,update:W,refs:q,elements:O,floatingStyles:F}),[g,W,q,O,F])}const l9=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Wk({element:r.current,padding:s}).fn(n):{}:r?Wk({element:r,padding:s}).fn(n):{}}}},c9=(e,t)=>{const n=Q8(e);return{name:n.name,fn:n.fn,options:[e,t]}},u9=(e,t)=>{const n=J8(e);return{name:n.name,fn:n.fn,options:[e,t]}},d9=(e,t)=>({fn:r9(e).fn,options:[e,t]}),h9=(e,t)=>{const n=e9(e);return{name:n.name,fn:n.fn,options:[e,t]}},f9=(e,t)=>{const n=t9(e);return{name:n.name,fn:n.fn,options:[e,t]}},m9=(e,t)=>{const n=n9(e);return{name:n.name,fn:n.fn,options:[e,t]}},p9=(e,t)=>{const n=l9(e);return{name:n.name,fn:n.fn,options:[e,t]}};var g9="Arrow",$N=_.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...a}=e;return f.jsx(Tt.svg,{...a,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});$N.displayName=g9;var v9=$N;function _9(e){const[t,n]=_.useState(void 0);return br(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let l,u;if("borderBoxSize"in a){const h=a.borderBoxSize,d=Array.isArray(h)?h[0]:h;l=d.inlineSize,u=d.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var M0="Popper",[WN,ea]=eo(M0),[b9,VN]=WN(M0),qN=e=>{const{__scopePopper:t,children:n}=e,[r,s]=_.useState(null);return f.jsx(b9,{scope:t,anchor:r,onAnchorChange:s,children:n})};qN.displayName=M0;var KN="PopperAnchor",GN=_.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,a=VN(KN,n),l=_.useRef(null),u=Ut(t,l),h=_.useRef(null);return _.useEffect(()=>{const d=h.current;h.current=(r==null?void 0:r.current)||l.current,d!==h.current&&a.onAnchorChange(h.current)}),r?null:f.jsx(Tt.div,{...s,ref:u})});GN.displayName=KN;var A0="PopperContent",[y9,x9]=WN(A0),YN=_.forwardRef((e,t)=>{var te,le,pe,xe,Me,Re;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:h=!0,collisionBoundary:d=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=e,C=VN(A0,n),[k,R]=_.useState(null),E=Ut(t,je=>R(je)),[N,j]=_.useState(null),D=_9(N),L=(D==null?void 0:D.width)??0,U=(D==null?void 0:D.height)??0,Y=r+(a!=="center"?"-"+a:""),P=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},V=Array.isArray(d)?d:[d],I=V.length>0,W={padding:P,boundary:V.filter(S9),altBoundary:I},{refs:K,floatingStyles:q,placement:O,isPositioned:F,middlewareData:H}=a9({strategy:"fixed",placement:Y,whileElementsMounted:(...je)=>Z8(...je,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[c9({mainAxis:s+U,alignmentAxis:l}),h&&u9({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?d9():void 0,...W}),h&&h9({...W}),f9({...W,apply:({elements:je,rects:Xe,availableWidth:ft,availableHeight:pt})=>{const{width:he,height:Le}=Xe.reference,Ae=je.floating.style;Ae.setProperty("--radix-popper-available-width",`${ft}px`),Ae.setProperty("--radix-popper-available-height",`${pt}px`),Ae.setProperty("--radix-popper-anchor-width",`${he}px`),Ae.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),N&&p9({element:N,padding:u}),C9({arrowWidth:L,arrowHeight:U}),v&&m9({strategy:"referenceHidden",...W})]}),[$,M]=QN(O),B=$i(w);br(()=>{F&&(B==null||B())},[F,B]);const X=(te=H.arrow)==null?void 0:te.x,A=(le=H.arrow)==null?void 0:le.y,re=((pe=H.arrow)==null?void 0:pe.centerOffset)!==0,[se,Z]=_.useState();return br(()=>{k&&Z(window.getComputedStyle(k).zIndex)},[k]),f.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:F?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(xe=H.transformOrigin)==null?void 0:xe.x,(Me=H.transformOrigin)==null?void 0:Me.y].join(" "),...((Re=H.hide)==null?void 0:Re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(y9,{scope:n,placedSide:$,onArrowChange:j,arrowX:X,arrowY:A,shouldHideArrow:re,children:f.jsx(Tt.div,{"data-side":$,"data-align":M,...S,ref:E,style:{...S.style,animation:F?void 0:"none"}})})})});YN.displayName=A0;var XN="PopperArrow",w9={top:"bottom",right:"left",bottom:"top",left:"right"},ZN=_.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,a=x9(XN,r),l=w9[a.placedSide];return f.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:f.jsx(v9,{...s,ref:n,style:{...s.style,display:"block"}})})});ZN.displayName=XN;function S9(e){return e!==null}var C9=e=>({name:"transformOrigin",options:e,fn(t){var C,k,R;const{placement:n,rects:r,middlewareData:s}=t,l=((C=s.arrow)==null?void 0:C.centerOffset)!==0,u=l?0:e.arrowWidth,h=l?0:e.arrowHeight,[d,g]=QN(n),p={start:"0%",center:"50%",end:"100%"}[g],v=(((k=s.arrow)==null?void 0:k.x)??0)+u/2,y=(((R=s.arrow)==null?void 0:R.y)??0)+h/2;let w="",S="";return d==="bottom"?(w=l?p:`${v}px`,S=`${-h}px`):d==="top"?(w=l?p:`${v}px`,S=`${r.floating.height+h}px`):d==="right"?(w=`${-h}px`,S=l?p:`${y}px`):d==="left"&&(w=`${r.floating.width+h}px`,S=l?p:`${y}px`),{data:{x:w,y:S}}}});function QN(e){const[t,n="center"]=e.split("-");return[t,n]}var fp=qN,Rd=GN,mp=YN,pp=ZN,JN=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),k9="VisuallyHidden",eM=_.forwardRef((e,t)=>f.jsx(Tt.span,{...e,ref:t,style:{...JN,...e.style}}));eM.displayName=k9;var E9=eM,[gp]=eo("Tooltip",[ea]),vp=ea(),tM="TooltipProvider",R9=700,Mb="tooltip.open",[T9,D0]=gp(tM),nM=e=>{const{__scopeTooltip:t,delayDuration:n=R9,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:a}=e,l=_.useRef(!0),u=_.useRef(!1),h=_.useRef(0);return _.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),f.jsx(T9,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:_.useCallback(()=>{window.clearTimeout(h.current),l.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:_.useCallback(d=>{u.current=d},[]),disableHoverableContent:s,children:a})};nM.displayName=tM;var ad="Tooltip",[N9,Td]=gp(ad),rM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:a,disableHoverableContent:l,delayDuration:u}=e,h=D0(ad,e.__scopeTooltip),d=vp(t),[g,p]=_.useState(null),v=Gs(),y=_.useRef(0),w=l??h.disableHoverableContent,S=u??h.delayDuration,C=_.useRef(!1),[k,R]=lc({prop:r,defaultProp:s??!1,onChange:L=>{L?(h.onOpen(),document.dispatchEvent(new CustomEvent(Mb))):h.onClose(),a==null||a(L)},caller:ad}),E=_.useMemo(()=>k?C.current?"delayed-open":"instant-open":"closed",[k]),N=_.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C.current=!1,R(!0)},[R]),j=_.useCallback(()=>{window.clearTimeout(y.current),y.current=0,R(!1)},[R]),D=_.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,R(!0),y.current=0},S)},[S,R]);return _.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),f.jsx(fp,{...d,children:f.jsx(N9,{scope:t,contentId:v,open:k,stateAttribute:E,trigger:g,onTriggerChange:p,onTriggerEnter:_.useCallback(()=>{h.isOpenDelayedRef.current?D():N()},[h.isOpenDelayedRef,D,N]),onTriggerLeave:_.useCallback(()=>{w?j():(window.clearTimeout(y.current),y.current=0)},[j,w]),onOpen:N,onClose:j,disableHoverableContent:w,children:n})})};rM.displayName=ad;var Ab="TooltipTrigger",iM=_.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Td(Ab,n),a=D0(Ab,n),l=vp(n),u=_.useRef(null),h=Ut(t,u,s.onTriggerChange),d=_.useRef(!1),g=_.useRef(!1),p=_.useCallback(()=>d.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),f.jsx(Rd,{asChild:!0,...l,children:f.jsx(Tt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:h,onPointerMove:Be(e.onPointerMove,v=>{v.pointerType!=="touch"&&!g.current&&!a.isPointerInTransitRef.current&&(s.onTriggerEnter(),g.current=!0)}),onPointerLeave:Be(e.onPointerLeave,()=>{s.onTriggerLeave(),g.current=!1}),onPointerDown:Be(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Be(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:Be(e.onBlur,s.onClose),onClick:Be(e.onClick,s.onClose)})})});iM.displayName=Ab;var j0="TooltipPortal",[M9,A9]=gp(j0,{forceMount:void 0}),sM=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:s}=e,a=Td(j0,t);return f.jsx(M9,{scope:t,forceMount:n,children:f.jsx(ji,{present:n||a.open,children:f.jsx(yc,{asChild:!0,container:s,children:r})})})};sM.displayName=j0;var uc="TooltipContent",oM=_.forwardRef((e,t)=>{const n=A9(uc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...a}=e,l=Td(uc,e.__scopeTooltip);return f.jsx(ji,{present:r||l.open,children:l.disableHoverableContent?f.jsx(aM,{side:s,...a,ref:t}):f.jsx(D9,{side:s,...a,ref:t})})}),D9=_.forwardRef((e,t)=>{const n=Td(uc,e.__scopeTooltip),r=D0(uc,e.__scopeTooltip),s=_.useRef(null),a=Ut(t,s),[l,u]=_.useState(null),{trigger:h,onClose:d}=n,g=s.current,{onPointerInTransitChange:p}=r,v=_.useCallback(()=>{u(null),p(!1)},[p]),y=_.useCallback((w,S)=>{const C=w.currentTarget,k={x:w.clientX,y:w.clientY},R=P9(k,C.getBoundingClientRect()),E=B9(k,R),N=I9(S.getBoundingClientRect()),j=F9([...E,...N]);u(j),p(!0)},[p]);return _.useEffect(()=>()=>v(),[v]),_.useEffect(()=>{if(h&&g){const w=C=>y(C,g),S=C=>y(C,h);return h.addEventListener("pointerleave",w),g.addEventListener("pointerleave",S),()=>{h.removeEventListener("pointerleave",w),g.removeEventListener("pointerleave",S)}}},[h,g,y,v]),_.useEffect(()=>{if(l){const w=S=>{const C=S.target,k={x:S.clientX,y:S.clientY},R=(h==null?void 0:h.contains(C))||(g==null?void 0:g.contains(C)),E=!H9(k,l);R?v():E&&(v(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[h,g,l,d,v]),f.jsx(aM,{...e,ref:a})}),[j9,O9]=gp(ad,{isInside:!1}),L9=zP("TooltipContent"),aM=_.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=e,h=Td(uc,n),d=vp(n),{onClose:g}=h;return _.useEffect(()=>(document.addEventListener(Mb,g),()=>document.removeEventListener(Mb,g)),[g]),_.useEffect(()=>{if(h.trigger){const p=v=>{const y=v.target;y!=null&&y.contains(h.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,g]),f.jsx(bc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:f.jsxs(mp,{"data-state":h.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(L9,{children:r}),f.jsx(j9,{scope:n,isInside:!0,children:f.jsx(E9,{id:h.contentId,role:"tooltip",children:s||r})})]})})});oM.displayName=uc;var lM="TooltipArrow",z9=_.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=vp(n);return O9(lM,n).isInside?null:f.jsx(pp,{...s,...r,ref:t})});z9.displayName=lM;function P9(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,s,a)){case a:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function B9(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function I9(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function H9(e,t){const{x:n,y:r}=e;let s=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const u=t[a],h=t[l],d=u.x,g=u.y,p=h.x,v=h.y;g>r!=v>r&&n<(p-d)*(r-g)/(v-g)+d&&(s=!s)}return s}function F9(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),U9(t)}function U9(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const a=t[t.length-1],l=t[t.length-2];if((a.x-l.x)*(s.y-l.y)>=(a.y-l.y)*(s.x-l.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const a=n[n.length-1],l=n[n.length-2];if((a.x-l.x)*(s.y-l.y)>=(a.y-l.y)*(s.x-l.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var $9=nM,cM=rM,uM=iM,dM=sM,O0=oM;function W9({className:e,...t}){return f.jsx("kbd",{className:me("pointer-events-none inline-flex h-5 min-w-5 items-center justify-center rounded border border-border/60 bg-muted/50 px-1.5 font-mono text-[11px] font-medium text-current select-none",e),...t})}function V9({className:e,...t}){return f.jsx("span",{className:me("inline-flex items-center gap-0.5",e),...t})}const q9="z-50 overflow-hidden rounded-md border border-border backdrop-blur-md p-0.5 text-[11px] font-medium text-card-foreground shadow-sm animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",K9=$9,ds=cM,hs=uM,Fi=_.forwardRef(({className:e,sideOffset:t=4,...n},r)=>f.jsx(dM,{children:f.jsx(O0,{ref:r,sideOffset:t,className:me("z-50 overflow-hidden rounded-md bg-card text-card-foreground border border-border backdrop-blur-md px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...n})}));Fi.displayName=O0.displayName;const Lu=cM,zu=uM;function hM(e){return e.toUpperCase()}function G9(e){const t=e.split("+");return f.jsx(V9,{children:t.map((n,r)=>f.jsx(W9,{children:hM(n)},`${n}-${r}`))})}const Zl=_.forwardRef(({className:e,sideOffset:t=4,children:n,shortcut:r,...s},a)=>{const l=r===void 0?null:Array.isArray(r)?r[0]??null:r;return f.jsx(dM,{children:f.jsx(O0,{ref:a,sideOffset:t,className:me(q9,e),...s,children:l?G9(l):f.jsx("span",{children:typeof n=="string"?hM(n):n})})})});Zl.displayName="HotkeyTooltipContent";const Y9="0.2.0",X9={version:Y9},Pn="Kaizen",qk="kaizen",Z9=".kaizen",Q9=".kaizen-dev",v_=".kaizen",J9="KAIZEN_RUNTIME_PROFILE",L0=`kaizen/${X9.version}`,e7="[kaizen]",t7=`~/${Pn}`,_p="kaizen:";function bp(){var t;return(t=globalThis.process)==null?void 0:t.env}function n7(e=bp()){const t=e==null?void 0:e[J9];return(t==null?void 0:t.trim().toLowerCase())==="dev"?"dev":"prod"}function r7(e=bp()){return n7(e)==="dev"?Q9:Z9}function i7(e=bp()){return`~/${r7(e)}`}function s7(e=bp()){return`${i7(e)}/keybindings.json`}function xf(e){return e?`${qk} ${e}`:qk}const wm=[{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"max",label:"Max"}],Db=[{id:"minimal",label:"Minimal"},{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"xhigh",label:"XHigh"}],jb=[{id:"off",label:"Off"},{id:"standard",label:"Standard"},{id:"high",label:"High"}],Ob="claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]",fM=[{id:"composer-2[fast=true]",label:"Composer 2",supportsEffort:!1},{id:"composer-1.5[]",label:"Composer 1.5",supportsEffort:!1},{id:"gpt-5.3-codex[reasoning=medium,fast=false]",label:"Codex 5.3",supportsEffort:!1},{id:"gpt-5.4[reasoning=medium,context=272k,fast=false]",label:"GPT-5.4",supportsEffort:!1},{id:"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]",label:"Sonnet 4.6",supportsEffort:!1},{id:"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]",label:"Opus 4.6",supportsEffort:!1},{id:"claude-opus-4-5[thinking=true]",label:"Opus 4.5",supportsEffort:!1},{id:"gpt-5.2[reasoning=medium,fast=false]",label:"GPT-5.2",supportsEffort:!1},{id:"gemini-3.1-pro[]",label:"Gemini 3.1 Pro",supportsEffort:!1},{id:"gpt-5.4-mini[reasoning=medium]",label:"GPT-5.4 Mini",supportsEffort:!1},{id:"gpt-5.4-nano[reasoning=medium]",label:"GPT-5.4 Nano",supportsEffort:!1},{id:"claude-haiku-4-5[thinking=true]",label:"Haiku 4.5",supportsEffort:!1},{id:"gpt-5.3-codex-spark[reasoning=medium]",label:"Codex 5.3 Spark",supportsEffort:!1},{id:"grok-4-20[thinking=true]",label:"Grok 4.20",supportsEffort:!1},{id:"claude-sonnet-4-5[thinking=true,context=200k]",label:"Sonnet 4.5",supportsEffort:!1},{id:"gpt-5.2-codex[reasoning=medium,fast=false]",label:"Codex 5.2",supportsEffort:!1},{id:"gemini-3-flash[]",label:"Gemini 3 Flash",supportsEffort:!1},{id:"claude-sonnet-4[thinking=false,context=200k]",label:"Sonnet 4",supportsEffort:!1},{id:"kimi-k2.5[]",label:"Kimi K2.5",supportsEffort:!1}],o7={"composer-2-fast":"composer-2[fast=true]","composer-1.5":"composer-1.5[]","gpt-5.3-codex":"gpt-5.3-codex[reasoning=medium,fast=false]","gpt-5.4":"gpt-5.4[reasoning=medium,context=272k,fast=false]","gpt-5.4-medium":"gpt-5.4[reasoning=medium,context=272k,fast=false]","claude-4.6-sonnet-medium-thinking":"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]","claude-4.6-opus-high-thinking":"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]","claude-4.5-opus-high-thinking":"claude-opus-4-5[thinking=true]","gpt-5.2":"gpt-5.2[reasoning=medium,fast=false]","gemini-3.1-pro":"gemini-3.1-pro[]","gpt-5.4-mini":"gpt-5.4-mini[reasoning=medium]","gpt-5.4-mini-medium":"gpt-5.4-mini[reasoning=medium]","gpt-5.4-nano":"gpt-5.4-nano[reasoning=medium]","gpt-5.4-nano-medium":"gpt-5.4-nano[reasoning=medium]","claude-haiku-4.5":"claude-haiku-4-5[thinking=true]","gpt-5.3-codex-spark-preview":"gpt-5.3-codex-spark[reasoning=medium]","grok-4-20":"grok-4-20[thinking=true]","grok-4-20-thinking":"grok-4-20[thinking=true]","claude-4.5-sonnet-thinking":"claude-sonnet-4-5[thinking=true,context=200k]","gpt-5.2-codex":"gpt-5.2-codex[reasoning=medium,fast=false]","gemini-3-flash":"gemini-3-flash[]","claude-4-sonnet":"claude-sonnet-4[thinking=false,context=200k]","kimi-k2.5":"kimi-k2.5[]"};function a7(e){return e?fM.some(t=>t.id===e)?e:o7[e]??Ob:Ob}function Kk(e){const t=e.indexOf("[");return t>=0?e.slice(0,t):e}function Yl(e){const t=e.match(/\bfast=(true|false)\b/);return t?t[1]==="true"?"fast":"standard":null}function Gk(e){return wm.some(t=>t.id===e)}function Yk(e){return Db.some(t=>t.id===e)}const Lb=[{id:"200k",label:"200k"},{id:"1m",label:"1M"}];function l7(e){return jb.some(t=>t.id===e)}const qo=[{id:"claude",label:"Claude",systemActive:!0,defaultModel:"sonnet",defaultEffort:"high",defaultModelOptions:{reasoningEffort:"high",contextWindow:"200k"},supportsPlanMode:!0,models:[{id:"opus",label:"Opus",supportsEffort:!0,contextWindowOptions:[...Lb]},{id:"sonnet",label:"Sonnet",supportsEffort:!0,contextWindowOptions:[...Lb]},{id:"haiku",label:"Haiku",supportsEffort:!0}],efforts:[...wm]},{id:"codex",label:"Codex",systemActive:!0,defaultModel:"gpt-5.4",defaultModelOptions:{reasoningEffort:"high",fastMode:!1},supportsPlanMode:!0,models:[{id:"gpt-5.4",label:"GPT-5.4",supportsEffort:!1},{id:"gpt-5.3-codex",label:"GPT-5.3 Codex",supportsEffort:!1},{id:"gpt-5.3-codex-spark",label:"GPT-5.3 Codex Spark",supportsEffort:!1}],efforts:[]},{id:"gemini",label:"Gemini",systemActive:!1,defaultModel:"auto-gemini-2.5",defaultModelOptions:{thinkingMode:"standard"},supportsPlanMode:!0,models:[{id:"auto-gemini-3",label:"Auto (Gemini 3)",supportsEffort:!1},{id:"auto-gemini-2.5",label:"Auto (Gemini 2.5)",supportsEffort:!1},{id:"gemini-3.1-pro-preview",label:"3.1 Pro Preview",supportsEffort:!1},{id:"gemini-3-pro-preview",label:"3 Pro Preview",supportsEffort:!1},{id:"gemini-3-flash-preview",label:"3 Flash Preview",supportsEffort:!1},{id:"gemini-2.5-pro",label:"2.5 Pro",supportsEffort:!1},{id:"gemini-2.5-flash",label:"2.5 Flash",supportsEffort:!1},{id:"gemini-2.5-flash-lite",label:"2.5 Flash Lite",supportsEffort:!1}],efforts:[]},{id:"cursor",label:"Cursor",systemActive:!0,defaultModel:Ob,defaultModelOptions:{},supportsPlanMode:!0,models:[...fM],efforts:[]}],Wn={claude:{active:!0},codex:{active:!0},gemini:{active:!0},cursor:{active:!0}};function Jt(e){const t=qo.find(n=>n.id===e);if(!t)throw new Error(`Unknown provider: ${e}`);return t}function z0(e,t){const n=Wn[t],r=e==null?void 0:e[t];return{active:(r==null?void 0:r.active)??n.active}}function c7(e,t){const n=Jt(e),r=z0(t,e);return n.systemActive&&r.active?null:`Provider ${n.label} is currently not active.`}function Xk(e,t){const n=Jt(e),r=z0(t,e);return n.systemActive&&r.active}function u7(e){return qo.map(t=>{const n=z0(e,t.id),r=t.systemActive&&n.active;return{...t,active:n.active,isSelectable:r,isUsageEnabled:r,isInactive:!r,inactiveMessage:c7(t.id,e)}})}function P0(e){return u7(e).filter(t=>t.isSelectable).map(({active:t,isSelectable:n,isUsageEnabled:r,isInactive:s,inactiveMessage:a,...l})=>l)}function Ri(e){return Jt(e).defaultModelOptions}const mM=Ri("claude");Ri("codex");Ri("gemini");Ri("cursor");function d7(e){return Jt("claude").models.find(t=>t.id===e)}function h7(e){var t;return((t=d7(e))==null?void 0:t.contextWindowOptions)??[]}function f7(e,t){const n=h7(e);if(n.length!==0)return n.some(r=>r.id===t)?t:mM.contextWindow}const m7=["idea","todo","progress","testing","done"],Zk={idea:"IDEA",todo:"TODO",progress:"PROGRESS",testing:"TESTING",done:"DONE"},os={submitChatMessage:["enter"],toggleProjectsSidebar:["ctrl+a"],toggleEmbeddedTerminal:["cmd+j","ctrl+`"],toggleRightSidebar:["cmd+b","ctrl+b"],openInFinder:["cmd+alt+f","ctrl+alt+f"],openInEditor:["cmd+shift+o","ctrl+shift+o"],addSplitTerminal:["cmd+/","ctrl+/"]},Qk=8,p7=10*1024*1024,Jk=["image/png","image/jpeg","image/webp","image/gif"],g7="/assets/icon-4rSnra9R.svg";function Sm({alt:e="",className:t,...n}){return f.jsx("img",{alt:e,src:g7,className:me("shrink-0 object-contain",t),...n})}var yp="Popover",[pM]=eo(yp,[ea]),Nd=ea(),[v7,ta]=pM(yp),gM=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:s,onOpenChange:a,modal:l=!1}=e,u=Nd(t),h=_.useRef(null),[d,g]=_.useState(!1),[p,v]=lc({prop:r,defaultProp:s??!1,onChange:a,caller:yp});return f.jsx(fp,{...u,children:f.jsx(v7,{scope:t,contentId:Gs(),triggerRef:h,open:p,onOpenChange:v,onOpenToggle:_.useCallback(()=>v(y=>!y),[v]),hasCustomAnchor:d,onCustomAnchorAdd:_.useCallback(()=>g(!0),[]),onCustomAnchorRemove:_.useCallback(()=>g(!1),[]),modal:l,children:n})})};gM.displayName=yp;var vM="PopoverAnchor",_M=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(vM,n),a=Nd(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=s;return _.useEffect(()=>(l(),()=>u()),[l,u]),f.jsx(Rd,{...a,...r,ref:t})});_M.displayName=vM;var bM="PopoverTrigger",yM=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(bM,n),a=Nd(n),l=Ut(t,s.triggerRef),u=f.jsx(Tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":kM(s.open),...r,ref:l,onClick:Be(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?u:f.jsx(Rd,{asChild:!0,...a,children:u})});yM.displayName=bM;var B0="PopoverPortal",[_7,b7]=pM(B0,{forceMount:void 0}),xM=e=>{const{__scopePopover:t,forceMount:n,children:r,container:s}=e,a=ta(B0,t);return f.jsx(_7,{scope:t,forceMount:n,children:f.jsx(ji,{present:n||a.open,children:f.jsx(yc,{asChild:!0,container:s,children:r})})})};xM.displayName=B0;var dc="PopoverContent",wM=_.forwardRef((e,t)=>{const n=b7(dc,e.__scopePopover),{forceMount:r=n.forceMount,...s}=e,a=ta(dc,e.__scopePopover);return f.jsx(ji,{present:r||a.open,children:a.modal?f.jsx(x7,{...s,ref:t}):f.jsx(w7,{...s,ref:t})})});wM.displayName=dc;var y7=Fa("PopoverContent.RemoveScroll"),x7=_.forwardRef((e,t)=>{const n=ta(dc,e.__scopePopover),r=_.useRef(null),s=Ut(t,r),a=_.useRef(!1);return _.useEffect(()=>{const l=r.current;if(l)return tp(l)},[]),f.jsx(Sd,{as:y7,allowPinchZoom:!0,children:f.jsx(SM,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Be(e.onCloseAutoFocus,l=>{var u;l.preventDefault(),a.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Be(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,h=u.button===0&&u.ctrlKey===!0,d=u.button===2||h;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Be(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),w7=_.forwardRef((e,t)=>{const n=ta(dc,e.__scopePopover),r=_.useRef(!1),s=_.useRef(!1);return f.jsx(SM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,a),a.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{var h,d;(h=e.onInteractOutside)==null||h.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),SM=_.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:g,...p}=e,v=ta(dc,n),y=Nd(n);return Jm(),f.jsx(wd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:f.jsx(bc,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:g,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:f.jsx(mp,{"data-state":kM(v.open),role:"dialog",id:v.contentId,...y,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),CM="PopoverClose",S7=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(CM,n);return f.jsx(Tt.button,{type:"button",...r,ref:t,onClick:Be(e.onClick,()=>s.onOpenChange(!1))})});S7.displayName=CM;var C7="PopoverArrow",k7=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Nd(n);return f.jsx(pp,{...s,...r,ref:t})});k7.displayName=C7;function kM(e){return e?"open":"closed"}var EM=gM,E7=_M,R7=yM,RM=xM,I0=wM;const TM=EM,NM=R7,H0=_.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>f.jsx(RM,{children:f.jsx(I0,{ref:s,align:t,sideOffset:n,[sd]:"",onCloseAutoFocus:a=>{var l;a.preventDefault(),window.dispatchEvent(new Event(gm)),(l=r.onCloseAutoFocus)==null||l.call(r,a)},className:me("z-50 w-72 rounded-xl border border-border bg-background p-4 shadow-lg backdrop-blur-md outline-hidden animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...r})}));H0.displayName=I0.displayName;function T7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:me("shrink-0",e),...t,children:f.jsx("path",{d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})})}function N7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 158.7128 157.296",fill:"currentColor","aria-hidden":"true",className:me("shrink-0",e),...t,children:f.jsx("path",{d:"M60.8734 57.2556V42.3124c0-1.2586.4722-2.2029 1.5728-2.8314l30.0443-17.3023c4.0899-2.3593 8.9662-3.4599 13.9988-3.4599 18.8759 0 30.8307 14.6289 30.8307 30.2006 0 1.1007 0 2.3593-.158 3.6178l-31.1446-18.2467c-1.8872-1.1006-3.7754-1.1006-5.6629 0L60.8734 57.2556Zm70.1542 58.2005V79.7487c0-2.2028-.9446-3.7756-2.8318-4.8763l-39.481-22.9651 12.8982-7.3934c1.1007-.6285 2.0453-.6285 3.1458 0l30.0441 17.3024c8.6523 5.0341 14.4708 15.7296 14.4708 26.1107 0 11.9539-7.0769 22.965-18.2461 27.527ZM51.593 83.9964l-12.8982-7.5497c-1.1007-.6285-1.5728-1.5728-1.5728-2.8314V39.0105c0-16.8303 12.8982-29.5722 30.3585-29.5722 6.607 0 12.7403 2.2029 17.9324 6.1349l-30.987 17.9324c-1.8871 1.1007-2.8314 2.6735-2.8314 4.8764v45.6159ZM79.3562 100.0403 60.8733 89.6592V67.6383l18.4829-10.3811 18.4812 10.3811v22.0209l-18.4812 10.3811Zm11.8757 47.8188c-6.607 0-12.7403-2.2031-17.9324-6.1344l30.9866-17.9333c1.8872-1.1005 2.8318-2.6728 2.8318-4.8759v-45.616l13.0564 7.5498c1.1005.6285 1.5723 1.5728 1.5723 2.8314v34.6051c0 16.8297-13.0564 29.5723-30.5147 29.5723ZM53.9522 112.7822 23.9079 95.4798c-8.652-5.0343-14.471-15.7296-14.471-26.1107 0-12.1119 7.2356-22.9652 18.403-27.5272v35.8634c0 2.2028.9443 3.7756 2.8314 4.8763l39.3248 22.8068-12.8982 7.3938c-1.1007.6287-2.045.6287-3.1456 0ZM52.2229 138.5791c-17.7745 0-30.8306-13.3713-30.8306-29.8871 0-1.2585.1578-2.5169.3143-3.7754l30.987 17.9323c1.8871 1.1005 3.7757 1.1005 5.6628 0l39.4811-22.807v14.9435c0 1.2585-.4721 2.2021-1.5728 2.8308l-30.0443 17.3025c-4.0898 2.359-8.9662 3.4605-13.9989 3.4605h.0014ZM91.2319 157.296c19.0327 0 34.9188-13.5272 38.5383-31.4594 17.6164-4.562 28.9425-21.0779 28.9425-37.908 0-11.0112-4.719-21.7066-13.2133-29.4143.7867-3.3035 1.2595-6.607 1.2595-9.909 0-22.4929-18.2471-39.3247-39.3251-39.3247-4.2461 0-8.3363.6285-12.4262 2.045-7.0792-6.9213-16.8318-11.3254-27.5271-11.3254-19.0331 0-34.9191 13.5268-38.5384 31.4591C11.3255 36.0212 0 52.5373 0 69.3675c0 11.0112 4.7184 21.7065 13.2125 29.4142-.7865 3.3035-1.2586 6.6067-1.2586 9.9092 0 22.4923 18.2466 39.3241 39.3248 39.3241 4.2462 0 8.3362-.6277 12.426-2.0441 7.0776 6.921 16.8302 11.3251 27.5271 11.3251Z"})})}function M7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:me("shrink-0",e),...t,children:f.jsx("path",{d:"M12 0C12 0 12 8 8 12C4 16 0 12 0 12C0 12 4 12 8 12C12 12 12 16 12 24C12 24 12 16 16 12C20 8 24 12 24 12C24 12 16 12 16 12C12 12 12 4 12 0Z"})})}function A7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:me("shrink-0",e),...t,children:f.jsx("path",{d:"M12 0 2.4 5.5v13L12 24l9.6-5.5v-13Zm0 3.1 6.8 3.9v5.1L15 14.3V9.7L12 8l-3 1.7v4.6l-3.8-2.2V7Zm-6.8 9.8 3.8 2.2v4.5l3 1.8 3-1.8v-4.5l3.8-2.2v3.8L12 20.9l-6.8-3.9Z"})})}function D7(e){return!(e.startsWith("gemini-3")||e==="auto-gemini-3")}const j7=["Composer","GPT","Claude","Gemini","Grok","Kimi"];function O7(e){return e.startsWith("composer-")?"Composer":e.startsWith("gpt-")?"GPT":e.startsWith("claude-")?"Claude":e.startsWith("gemini-")?"Gemini":e.startsWith("grok-")?"Grok":"Kimi"}function __(e,t){const n=Yl(t);return!n||n==="standard"?e:`${e} (${n==="fast"?"Fast":"Standard"})`}const Cm={claude:T7,codex:N7,gemini:M7,cursor:A7},wf={auto:Tn,opus:ti,sonnet:Tn,haiku:ls,"gpt-5.4":ti,"gpt-5.4[reasoning=medium,context=272k,fast=false]":ti,"gpt-5.4-mini[reasoning=medium]":Tn,"gpt-5.4-nano[reasoning=medium]":ls,"gpt-5.3-codex":Tn,"gpt-5.3-codex[reasoning=medium,fast=false]":Tn,"gpt-5.3-codex-spark[reasoning=medium]":ls,"gpt-5.2[reasoning=medium,fast=false]":Tn,"gpt-5.2-codex[reasoning=medium,fast=false]":Tn,"gpt-5.3-codex-spark":ls,"gemini-2.5-pro":ti,"gemini-2.5-flash":Tn,"gemini-2.5-flash-lite":ls,"auto-gemini-3":ti,"auto-gemini-2.5":Tn,"gemini-3.1-pro-preview":ti,"gemini-3.1-pro[]":ti,"gemini-3-flash[]":Tn,"gemini-3-pro-preview":ti,"gemini-3-flash-preview":Tn,"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]":ti,"claude-opus-4-5[thinking=true]":ti,"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]":Tn,"claude-sonnet-4-5[thinking=true,context=200k]":Tn,"claude-sonnet-4[thinking=false,context=200k]":Tn,"claude-haiku-4-5[thinking=true]":ls,"grok-4-20[thinking=true]":ti,"kimi-k2.5[]":Tn,"composer-2[fast=true]":ti,"composer-1.5[]":Tn};function Ir({onClick:e,selected:t,icon:n,label:r,description:s,disabled:a}){return f.jsxs("button",{onClick:e,disabled:a,className:me("w-full flex items-center gap-2 p-2 border border-border/0 rounded-lg text-left transition-opacity",t?"bg-muted border-border":"hover:opacity-60",a&&"opacity-40 cursor-not-allowed"),children:[n,f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-medium",children:r}),s?f.jsx("div",{className:"text-xs text-muted-foreground",children:s}):null]})]})}function zo({trigger:e,triggerClassName:t,disabled:n=!1,children:r}){const[s,a]=_.useState(!1);return n?f.jsx("button",{disabled:!0,className:me("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md text-muted-foreground [&>svg]:shrink-0 opacity-70 cursor-default",t),children:e}):f.jsxs(TM,{open:s,onOpenChange:a,children:[f.jsx(NM,{asChild:!0,children:f.jsx("button",{className:me("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md transition-colors text-muted-foreground [&>svg]:shrink-0","hover:bg-muted/50",t),children:e})}),f.jsx(H0,{align:"center",className:"w-64 p-1",children:f.jsx("div",{className:"max-h-[min(24rem,60vh)] space-y-1 overflow-y-auto pr-1",children:typeof r=="function"?r(()=>a(!1)):r})})]})}function Pu({availableProviders:e,selectedProvider:t,disabled:n=!1,showProviderPicker:r=!0,providerLocked:s=!1,model:a,modelOptions:l,onProviderChange:u,onModelChange:h,onClaudeReasoningEffortChange:d,onClaudeContextWindowChange:g,onCodexReasoningEffortChange:p,onGeminiThinkingModeChange:v,onCodexFastModeChange:y,planMode:w=!1,onPlanModeChange:S,includePlanMode:C=!0,className:k}){var $,M,B,X,A,re,se;const[R,E]=_.useState(null),N=e.find(Z=>Z.id===t)??Jt(t),j=Cm[t],D=wf[a]??Tn,L=C&&(N==null?void 0:N.supportsPlanMode)&&S,U=t==="claude"?l:null,Y=t==="codex"?l:null,P=t==="gemini"?l:null,V=(($=N.models.find(Z=>Z.id===a))==null?void 0:$.contextWindowOptions)??[],I=(U==null?void 0:U.contextWindow)??Lb[0].id,W=I==="1m"?Mk:Ak,K=t==="claude"||t==="codex",q=t==="cursor"?Yl(a):null,O=N.id==="cursor"?N.models.filter(Z=>Kk(Z.id)===Kk(a)):[],F=t==="cursor"&&O.some(Z=>Yl(Z.id)==="fast")&&O.some(Z=>Yl(Z.id)==="standard"),H=N.id==="cursor"?j7.map(Z=>({family:Z,models:N.models.filter(te=>O7(te.id)===Z)})).filter(Z=>Z.models.length>0):[];return _.useEffect(()=>{E(null)},[t]),f.jsx("div",{className:me("max-w-full overflow-x-auto scrollbar-hide",n&&"pointer-events-none opacity-60",k),children:f.jsxs("div",{className:"flex w-max items-center justify-center gap-0.5 mx-auto",children:[r?f.jsx(zo,{disabled:s||!u,trigger:f.jsxs(f.Fragment,{children:[f.jsx(j,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"hidden md:inline",children:(N==null?void 0:N.label)??t})]}),children:Z=>e.map(te=>{const le=Cm[te.id];return f.jsx(Ir,{onClick:()=>{u==null||u(te.id),Z()},selected:t===te.id,icon:f.jsx(le,{className:"h-4 w-4 text-muted-foreground"}),label:te.label},te.id)})}):null,f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(D,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:N.id==="cursor"?__(((M=N.models.find(Z=>Z.id===a))==null?void 0:M.label)??a,a):((B=N.models.find(Z=>Z.id===a))==null?void 0:B.label)??a})]}),children:Z=>{var te;return N.id==="cursor"?R?f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:()=>E(null),className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground transition-opacity hover:opacity-70",children:[f.jsx(bN,{className:"h-4 w-4"}),f.jsx("span",{children:R})]}),(te=H.find(le=>le.family===R))==null?void 0:te.models.map(le=>{const pe=wf[le.id]??Tn;return f.jsx(Ir,{onClick:()=>{h(t,le.id),E(null),Z()},selected:a===le.id,icon:f.jsx(pe,{className:"h-4 w-4 text-muted-foreground"}),label:__(le.label,le.id)},le.id)})]}):H.map(le=>{var Me;const pe=le.models.some(Re=>Re.id===a),xe=wf[((Me=le.models[0])==null?void 0:Me.id)??""]??Tn;return f.jsxs("div",{className:"relative",children:[f.jsx(Ir,{onClick:()=>E(le.family),selected:pe,icon:f.jsx(xe,{className:"h-4 w-4 text-muted-foreground"}),label:le.family,description:`${le.models.length} model${le.models.length===1?"":"s"}`}),f.jsx(Tr,{className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"})]},le.family)}):N.models.map(le=>{const pe=wf[le.id]??Tn;return f.jsx(Ir,{onClick:()=>{h(t,le.id),Z()},selected:a===le.id,icon:f.jsx(pe,{className:"h-4 w-4 text-muted-foreground"}),label:N.id==="cursor"?__(le.label,le.id):le.label},le.id)})}}),F?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[q==="fast"?f.jsx(ls,{className:"h-3.5 w-3.5"}):f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:q==="fast"?"Fast":"Standard"})]}),triggerClassName:q==="fast"?"text-emerald-500 dark:text-emerald-400":void 0,children:Z=>f.jsxs(f.Fragment,{children:[O.filter(te=>Yl(te.id)==="standard").map(te=>f.jsx(Ir,{onClick:()=>{h(t,te.id),Z()},selected:a===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:"Standard"},te.id)),O.filter(te=>Yl(te.id)==="fast").map(te=>f.jsx(Ir,{onClick:()=>{h(t,te.id),Z()},selected:a===te.id,icon:f.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),label:"Fast"},te.id))]})}):null,K?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:t==="claude"?((X=wm.find(Z=>Z.id===l.reasoningEffort))==null?void 0:X.label)??l.reasoningEffort:((A=Db.find(Z=>Z.id===l.reasoningEffort))==null?void 0:A.label)??l.reasoningEffort})]}),children:Z=>t==="claude"?wm.map(te=>f.jsx(Ir,{onClick:()=>{d(te.id),Z()},selected:l.reasoningEffort===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,disabled:te.id==="max"&&a!=="opus"},te.id)):Db.map(te=>f.jsx(Ir,{onClick:()=>{p(te.id),Z()},selected:l.reasoningEffort===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label},te.id))}):null,t==="claude"&&V.length>1?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(W,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:((re=V.find(Z=>Z.id===I))==null?void 0:re.label)??I})]}),children:Z=>V.map(te=>f.jsx(Ir,{onClick:()=>{g(te.id),Z()},selected:I===te.id,icon:te.id==="1m"?f.jsx(Mk,{className:"h-4 w-4 text-muted-foreground"}):f.jsx(Ak,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,description:te.id==="1m"?"Expanded context window":"Standard context window"},te.id))}):null,t==="gemini"?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:((se=jb.find(Z=>Z.id===(P==null?void 0:P.thinkingMode)))==null?void 0:se.label)??(P==null?void 0:P.thinkingMode)??"Standard"})]}),children:Z=>jb.map(te=>f.jsx(Ir,{onClick:()=>{v(te.id),Z()},selected:(P==null?void 0:P.thinkingMode)===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,disabled:te.id==="off"&&!D7(a)},te.id))}):null,t==="codex"?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[Y!=null&&Y.fastMode?f.jsx(ls,{className:"h-3.5 w-3.5"}):f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:Y!=null&&Y.fastMode?"Fast Mode":"Standard"})]}),triggerClassName:Y!=null&&Y.fastMode?"text-emerald-500 dark:text-emerald-400":void 0,children:Z=>f.jsxs(f.Fragment,{children:[f.jsx(Ir,{onClick:()=>{y(!1),Z()},selected:!(Y!=null&&Y.fastMode),icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:"Standard"}),f.jsx(Ir,{onClick:()=>{y(!0),Z()},selected:!!(Y!=null&&Y.fastMode),icon:f.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),label:"Fast Mode"})]})}):null,L?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[w?f.jsx(mm,{className:"h-3.5 w-3.5"}):f.jsx(Tk,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"hidden md:inline",children:w?"Plan":"Implement"}),f.jsx("span",{className:"md:hidden",children:w?"Plan":"Impl"})]}),triggerClassName:w?"text-blue-400 dark:text-blue-300":void 0,children:Z=>f.jsxs(f.Fragment,{children:[f.jsx(Ir,{onClick:()=>{S(!1),Z()},selected:!w,icon:f.jsx(Tk,{className:"h-4 w-4 text-muted-foreground"}),label:"Implement",description:"Start execution"}),f.jsx(Ir,{onClick:()=>{S(!0),Z()},selected:w,icon:f.jsx(mm,{className:"h-4 w-4 text-muted-foreground"}),label:"Plan",description:"Review a plan before execution"})]})}):null]})})}const xp=({children:e,className:t,shimmerWidth:n=100,animate:r=!0,...s})=>f.jsx("span",{style:{"--shiny-width":`${Math.min(n,100)}px`},className:me("mx-auto max-w-md text-foreground/50",r?["animate-shiny-text [background-size:var(--shiny-width)_100%] bg-clip-text [background-position:0_0] bg-no-repeat [transition:background-position_1s_cubic-bezier(.6,.6,0,1)_infinite]","bg-gradient-to-r from-transparent via-black/80 via-50% to-transparent dark:via-white/80"]:["text-neutral"],t),...s,children:e});function zb(e){return e.split(/[\s_-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const L7=[/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(['"])([\s\S]*)\1$/,/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(.+)$/,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(.+)$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(.+)$/i];function z7(e){const t=e.trim();for(const n of L7){const r=t.match(n);if(!r)continue;const s=(r[2]??r[1]??"").trim();if(s)return s}return t}function km(e){return e.split("/").pop()||e}function P7(e,t){if(e===void 0)return null;const n=Math.max(0,t-e),r=6e4,s=60*r,a=24*s,l=7*a;return n<r?"now":n<s?`${Math.floor(n/r)}m`:n<a?`${Math.floor(n/s)}h`:n<l?`${Math.floor(n/a)}d`:`${Math.floor(n/l)}w`}const B7='button, select, input, textarea, [role="combobox"], [role="listbox"], [data-no-touch-drag]';function e2(e){var t;try{(t=navigator.vibrate)==null||t.call(navigator,e)}catch{}}function F0({enabled:e,visualElementRef:t,onTap:n,onContextMenu:r,onDragStart:s,onDragMove:a,onDragEnd:l,holdDelay:u=300,contextMenuDelay:h=2500,scrollThreshold:d=8,dragMoveThreshold:g=5}){const[p,v]=_.useState(!1),[y,w]=_.useState(!1),[S,C]=_.useState(null),[k,R]=_.useState(null),E=_.useCallback(O=>{R(O)},[]),N=_.useRef("idle"),j=_.useRef({x:0,y:0}),D=_.useRef(null),L=_.useRef(null),U=_.useRef(n),Y=_.useRef(r),P=_.useRef(s),V=_.useRef(a),I=_.useRef(l);U.current=n,Y.current=r,P.current=s,V.current=a,I.current=l;const W=_.useCallback((O,F)=>{const H=(t==null?void 0:t.current)??k;if(!H)return document.elementFromPoint(O,F);const $=H.style.pointerEvents;H.style.pointerEvents="none";const M=document.elementFromPoint(O,F);return H.style.pointerEvents=$,M},[t,k]),K=_.useCallback(()=>{D.current&&(clearTimeout(D.current),D.current=null),L.current&&(clearTimeout(L.current),L.current=null)},[]),q=_.useCallback(()=>{K(),N.current="idle",w(!1),v(!1),C(null)},[K]);return _.useEffect(()=>{if(!k||!e)return;const O=M=>{if(M.target.closest(B7))return;const B=M.touches[0];B&&(j.current={x:B.clientX,y:B.clientY},N.current="holding",D.current=setTimeout(()=>{D.current=null,N.current==="holding"&&(N.current="armed",w(!0),e2(30),L.current=setTimeout(()=>{var A;if(L.current=null,N.current!=="armed")return;e2(100);const X={...j.current};N.current="idle",w(!1),(A=Y.current)==null||A.call(Y,X)},h))},u))},F=M=>{var Z,te;const B=N.current;if(B==="idle")return;const X=M.touches[0];if(!X)return;const A=X.clientX-j.current.x,re=X.clientY-j.current.y,se=Math.sqrt(A*A+re*re);if(B==="holding"){se>d&&(K(),N.current="idle");return}if(B==="armed"){se>g&&(L.current&&(clearTimeout(L.current),L.current=null),N.current="dragging",w(!1),v(!0),C({x:X.clientX,y:X.clientY}),M.preventDefault(),(Z=P.current)==null||Z.call(P,{x:X.clientX,y:X.clientY}));return}if(B==="dragging"){M.preventDefault(),C({x:X.clientX,y:X.clientY});const le=W(X.clientX,X.clientY);(te=V.current)==null||te.call(V,{x:X.clientX,y:X.clientY,elementBelow:le})}},H=M=>{var X,A;const B=N.current;if(B==="holding"){K(),N.current="idle",w(!1),v(!1),M.preventDefault(),(X=U.current)==null||X.call(U);return}if(B==="armed"){q();return}if(B==="dragging"){const re=M.changedTouches[0];if(re){const se=W(re.clientX,re.clientY);(A=I.current)==null||A.call(I,{x:re.clientX,y:re.clientY,elementBelow:se})}q()}},$=()=>{var M;N.current==="dragging"&&((M=I.current)==null||M.call(I,{x:0,y:0,elementBelow:null})),q()};return k.addEventListener("touchstart",O,{passive:!1}),k.addEventListener("touchmove",F,{passive:!1}),k.addEventListener("touchend",H),k.addEventListener("touchcancel",$),()=>{k.removeEventListener("touchstart",O),k.removeEventListener("touchmove",F),k.removeEventListener("touchend",H),k.removeEventListener("touchcancel",$),K(),N.current="idle"}},[k,e,u,h,d,g,K,q,W]),{touchRef:E,isDragging:p,isArmed:y,dragPosition:S}}function MM({position:e,children:t,className:n}){return e?Hi.createPortal(f.jsx("div",{style:{position:"fixed",left:e.x,top:e.y,transform:"translate(-50%, calc(-100% - 14px))",zIndex:9999,pointerEvents:"none",willChange:"transform"},className:me("flex items-center gap-2 rounded-xl border-2 border-primary/60 bg-card px-3 py-2","shadow-[0_8px_32px_rgba(0,0,0,0.25)] dark:shadow-[0_8px_32px_rgba(0,0,0,0.5)]","min-w-[120px] max-w-[240px]","scale-[1.04]",n),children:t}),document.body):null}const I7=new Set(["starting","running"]);function H7({chat:e,activeChatId:t,nowMs:n,showProviderIcon:r=!1,isCompleted:s=!1,onSelectChat:a,onDeleteChat:l,draggable:u=!1,onDragStart:h,onDragEnd:d,isTouchDevice:g=!1,onTouchDragMove:p,onTouchDragEnd:v}){const y=P7(e.lastMessageAt,n),w=g&&u,S=e.provider?Cm[e.provider]:null,{touchRef:C,isArmed:k,isDragging:R,dragPosition:E}=F0({enabled:w,onTap:()=>a(e.chatId),onDragStart:()=>h==null?void 0:h(e),onDragMove:({x:N,y:j,elementBelow:D})=>p==null?void 0:p(N,j,D),onDragEnd:({x:N,y:j,elementBelow:D})=>{v==null||v(N,j,D),d==null||d()}});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{ref:w?C:void 0,"data-chat-id":hk(e.chatId),className:me("group flex items-center gap-2 pl-2.5 pr-0.5 py-0.5 rounded-lg cursor-pointer border transition-all duration-150 select-none",t===hk(e.chatId)?"bg-muted hover:bg-muted border-border":"border-border/0 hover:border-border hover:bg-muted/20 dark:hover:border-slate-400/10",k&&"scale-[1.03] shadow-md ring-2 ring-primary/50 bg-card border-primary/40",R&&!k&&"opacity-20 scale-[0.98]"),draggable:u&&!g,onDragStart:u&&!g?()=>h==null?void 0:h(e):void 0,onDragEnd:u&&!g?d:void 0,onClick:g?void 0:()=>a(e.chatId),children:[I7.has(e.status)?f.jsx(oi,{className:"size-3.5 flex-shrink-0 animate-spin text-muted-foreground"}):e.status==="waiting_for_user"?f.jsx("div",{className:"relative",children:f.jsxs("div",{className:"rounded-full z-0 size-3.5 flex items-center justify-center",children:[f.jsx("div",{className:"absolute rounded-full z-0 size-2.5 bg-blue-400/80 animate-ping"}),f.jsx("div",{className:"rounded-full z-0 size-2.5 bg-blue-400 ring-2 ring-muted/20 dark:ring-muted/50"})]})}):s?f.jsx("div",{className:"relative",children:f.jsxs("div",{className:"rounded-full z-0 size-3.5 flex items-center justify-center",children:[f.jsx("div",{className:"absolute rounded-full z-0 size-2.5 bg-emerald-400/80 animate-ping"}),f.jsx("div",{className:"rounded-full z-0 size-2.5 bg-emerald-400 ring-2 ring-muted/20 dark:ring-muted/50"})]})}):null,r&&S?f.jsx(S,{className:"size-3.5 flex-shrink-0 text-muted-foreground/80","aria-label":`${e.provider} provider`}):null,f.jsx("span",{className:"text-sm truncate flex-1 translate-y-[-0.5px]",children:e.status!=="idle"&&e.status!=="waiting_for_user"?f.jsx(xp,{animate:e.status==="running",shimmerWidth:Math.max(20,e.title.length*3),children:e.title}):e.title}),f.jsxs("div",{className:"relative h-7 w-7 mr-[2px] shrink-0",children:[y?f.jsx("span",{className:"hidden md:flex absolute inset-0 items-center justify-end pr-1 text-[11px] text-muted-foreground opacity-50 transition-opacity group-hover:opacity-0",children:y}):null,f.jsx(tt,{variant:"ghost",size:"icon",className:me("absolute inset-0 h-7 w-7 opacity-100 cursor-pointer rounded-sm hover:!bg-transparent !border-0",y?"md:opacity-0 md:group-hover:opacity-100":"opacity-100 md:opacity-0 md:group-hover:opacity-100"),"data-no-touch-drag":!0,onClick:N=>{N.stopPropagation(),l(e.chatId)},title:"Delete chat",children:f.jsx(h6,{className:"size-3.5"})})]})]},e._id),f.jsx(MM,{position:E,children:f.jsx("span",{className:"text-sm font-medium truncate",children:e.title})})]})}function F7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>r=>{t.forEach(s=>s(r))},t)}const wp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Sc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function U0(e){return"nodeType"in e}function Wr(e){var t,n;return e?Sc(e)?e:U0(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function $0(e){const{Document:t}=Wr(e);return e instanceof t}function Md(e){return Sc(e)?!1:e instanceof Wr(e).HTMLElement}function AM(e){return e instanceof Wr(e).SVGElement}function Cc(e){return e?Sc(e)?e.document:U0(e)?$0(e)?e:Md(e)||AM(e)?e.ownerDocument:document:document:document}const _s=wp?_.useLayoutEffect:_.useEffect;function W0(e){const t=_.useRef(e);return _s(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function U7(){const e=_.useRef(null),t=_.useCallback((r,s)=>{e.current=setInterval(r,s)},[]),n=_.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ld(e,t){t===void 0&&(t=[e]);const n=_.useRef(e);return _s(()=>{n.current!==e&&(n.current=e)},t),n}function Ad(e,t){const n=_.useRef();return _.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Em(e){const t=W0(e),n=_.useRef(null),r=_.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,r]}function Pb(e){const t=_.useRef();return _.useEffect(()=>{t.current=e},[e]),t.current}let b_={};function Dd(e,t){return _.useMemo(()=>{if(t)return t;const n=b_[e]==null?0:b_[e]+1;return b_[e]=n,e+"-"+n},[e,t])}function DM(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((a,l)=>{const u=Object.entries(l);for(const[h,d]of u){const g=a[h];g!=null&&(a[h]=g+e*d)}return a},{...t})}}const ic=DM(1),Rm=DM(-1);function $7(e){return"clientX"in e&&"clientY"in e}function V0(e){if(!e)return!1;const{KeyboardEvent:t}=Wr(e.target);return t&&e instanceof t}function W7(e){if(!e)return!1;const{TouchEvent:t}=Wr(e.target);return t&&e instanceof t}function Bb(e){if(W7(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return $7(e)?{x:e.clientX,y:e.clientY}:null}const cd=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[cd.Translate.toString(e),cd.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),t2="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function V7(e){return e.matches(t2)?e:e.querySelector(t2)}const q7={display:"none"};function K7(e){let{id:t,value:n}=e;return ye.createElement("div",{id:t,style:q7},n)}function G7(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ye.createElement("div",{id:t,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function Y7(){const[e,t]=_.useState("");return{announce:_.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const jM=_.createContext(null);function X7(e){const t=_.useContext(jM);_.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Z7(){const[e]=_.useState(()=>new Set),t=_.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[_.useCallback(r=>{let{type:s,event:a}=r;e.forEach(l=>{var u;return(u=l[s])==null?void 0:u.call(l,a)})},[e]),t]}const Q7={draggable:`
|
|
464
|
+
6. Paste it here.`;function d8({open:e,onOpenChange:t,onSubmit:n}){const r=_.useRef(null),[s,a]=_.useState(""),[l,u]=_.useState(!1);_.useEffect(()=>{e&&(a(""),setTimeout(()=>{var p;return(p=r.current)==null?void 0:p.focus()},0))},[e]);async function h(){const p=await navigator.clipboard.readText();a(p)}async function d(){await navigator.clipboard.writeText(Ok),u(!0),setTimeout(()=>u(!1),2e3)}const g=s.trim().length>0;return f.jsx(ip,{open:e,onOpenChange:t,children:f.jsx(kd,{size:"lg",children:f.jsxs("form",{onSubmit:p=>{p.preventDefault(),g&&n(s.trim())},children:[f.jsxs(op,{className:"space-y-4",children:[f.jsx(sp,{children:"Import Cursor Session"}),f.jsxs(S0,{children:["Paste the copied ",f.jsx("code",{children:"get-current-period-usage"})," curl command and Kaizen will import the session for you."]}),f.jsx("div",{className:"rounded-xl border border-border bg-card px-3 py-3 text-sm text-muted-foreground whitespace-pre-line",children:Ok}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(tt,{type:"button",variant:"ghost",size:"sm",onClick:()=>void h(),children:"Paste Clipboard"}),f.jsxs(tt,{type:"button",variant:"ghost",size:"sm",onClick:()=>void d(),children:[l?f.jsx(Wi,{className:"h-4 w-4"}):f.jsx(Cd,{className:"h-4 w-4"}),f.jsx("span",{className:"ml-1",children:l?"Copied":"Copy Steps"})]})]}),f.jsx(lp,{ref:r,value:s,onChange:p=>a(p.target.value),rows:10,placeholder:"Paste the copied curl command here",className:"font-mono text-xs"})]}),f.jsxs(ap,{children:[f.jsx(tt,{type:"button",variant:"ghost",size:"sm",onClick:()=>t(!1),children:"Cancel"}),f.jsx(tt,{type:"submit",variant:"secondary",size:"sm",disabled:!g,children:"Import Session"})]})]})})})}const h8=["top","right","bottom","left"],Zo=Math.min,ri=Math.max,_m=Math.round,yf=Math.floor,gs=e=>({x:e,y:e}),f8={left:"right",right:"left",bottom:"top",top:"bottom"};function Rb(e,t,n){return ri(e,Zo(t,n))}function Xs(e,t){return typeof e=="function"?e(t):e}function Zs(e){return e.split("-")[0]}function xc(e){return e.split("-")[1]}function C0(e){return e==="x"?"y":"x"}function k0(e){return e==="y"?"height":"width"}function us(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function E0(e){return C0(us(e))}function m8(e,t,n){n===void 0&&(n=!1);const r=xc(e),s=E0(e),a=k0(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=bm(l)),[l,bm(l)]}function p8(e){const t=bm(e);return[Tb(e),t,Tb(t)]}function Tb(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Lk=["left","right"],zk=["right","left"],g8=["top","bottom"],v8=["bottom","top"];function _8(e,t,n){switch(e){case"top":case"bottom":return n?t?zk:Lk:t?Lk:zk;case"left":case"right":return t?g8:v8;default:return[]}}function b8(e,t,n,r){const s=xc(e);let a=_8(Zs(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(Tb)))),a}function bm(e){const t=Zs(e);return f8[t]+e.slice(t.length)}function y8(e){return{top:0,right:0,bottom:0,left:0,...e}}function DN(e){return typeof e!="number"?y8(e):{top:e,right:e,bottom:e,left:e}}function ym(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Pk(e,t,n){let{reference:r,floating:s}=e;const a=us(t),l=E0(t),u=k0(l),h=Zs(t),d=a==="y",g=r.x+r.width/2-s.width/2,p=r.y+r.height/2-s.height/2,v=r[u]/2-s[u]/2;let y;switch(h){case"top":y={x:g,y:r.y-s.height};break;case"bottom":y={x:g,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-s.width,y:p};break;default:y={x:r.x,y:r.y}}switch(xc(t)){case"start":y[l]-=v*(n&&d?-1:1);break;case"end":y[l]+=v*(n&&d?-1:1);break}return y}async function x8(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:u,strategy:h}=e,{boundary:d="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:v=!1,padding:y=0}=Xs(t,e),w=DN(y),C=u[v?p==="floating"?"reference":"floating":p],k=ym(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(C)))==null||n?C:C.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:d,rootBoundary:g,strategy:h})),R=p==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),N=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},j=ym(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:R,offsetParent:E,strategy:h}):R);return{top:(k.top-j.top+w.top)/N.y,bottom:(j.bottom-k.bottom+w.bottom)/N.y,left:(k.left-j.left+w.left)/N.x,right:(j.right-k.right+w.right)/N.x}}const w8=50,S8=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,u=l.detectOverflow?l:{...l,detectOverflow:x8},h=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:g,y:p}=Pk(d,r,h),v=r,y=0;const w={};for(let S=0;S<a.length;S++){const C=a[S];if(!C)continue;const{name:k,fn:R}=C,{x:E,y:N,data:j,reset:D}=await R({x:g,y:p,initialPlacement:r,placement:v,strategy:s,middlewareData:w,rects:d,platform:u,elements:{reference:e,floating:t}});g=E??g,p=N??p,w[k]={...w[k],...j},D&&y<w8&&(y++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(d=D.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:g,y:p}=Pk(d,v,h)),S=-1)}return{x:g,y:p,placement:v,strategy:s,middlewareData:w}},C8=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:u,middlewareData:h}=t,{element:d,padding:g=0}=Xs(e,t)||{};if(d==null)return{};const p=DN(g),v={x:n,y:r},y=E0(s),w=k0(y),S=await l.getDimensions(d),C=y==="y",k=C?"top":"left",R=C?"bottom":"right",E=C?"clientHeight":"clientWidth",N=a.reference[w]+a.reference[y]-v[y]-a.floating[w],j=v[y]-a.reference[y],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d));let L=D?D[E]:0;(!L||!await(l.isElement==null?void 0:l.isElement(D)))&&(L=u.floating[E]||a.floating[w]);const U=N/2-j/2,Y=L/2-S[w]/2-1,P=Zo(p[k],Y),V=Zo(p[R],Y),I=P,W=L-S[w]-V,K=L/2-S[w]/2+U,q=Rb(I,K,W),O=!h.arrow&&xc(s)!=null&&K!==q&&a.reference[w]/2-(K<I?P:V)-S[w]/2<0,F=O?K<I?K-I:K-W:0;return{[y]:v[y]+F,data:{[y]:q,centerOffset:K-q-F,...O&&{alignmentOffset:F}},reset:O}}}),k8=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:l,initialPlacement:u,platform:h,elements:d}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...C}=Xs(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const k=Zs(s),R=us(u),E=Zs(u)===u,N=await(h.isRTL==null?void 0:h.isRTL(d.floating)),j=v||(E||!S?[bm(u)]:p8(u)),D=w!=="none";!v&&D&&j.push(...b8(u,S,w,N));const L=[u,...j],U=await h.detectOverflow(t,C),Y=[];let P=((r=a.flip)==null?void 0:r.overflows)||[];if(g&&Y.push(U[k]),p){const K=m8(s,l,N);Y.push(U[K[0]],U[K[1]])}if(P=[...P,{placement:s,overflows:Y}],!Y.every(K=>K<=0)){var V,I;const K=(((V=a.flip)==null?void 0:V.index)||0)+1,q=L[K];if(q&&(!(p==="alignment"?R!==us(q):!1)||P.every(H=>us(H.placement)===R?H.overflows[0]>0:!0)))return{data:{index:K,overflows:P},reset:{placement:q}};let O=(I=P.filter(F=>F.overflows[0]<=0).sort((F,H)=>F.overflows[1]-H.overflows[1])[0])==null?void 0:I.placement;if(!O)switch(y){case"bestFit":{var W;const F=(W=P.filter(H=>{if(D){const $=us(H.placement);return $===R||$==="y"}return!0}).map(H=>[H.placement,H.overflows.filter($=>$>0).reduce(($,M)=>$+M,0)]).sort((H,$)=>H[1]-$[1])[0])==null?void 0:W[0];F&&(O=F);break}case"initialPlacement":O=u;break}if(s!==O)return{reset:{placement:O}}}return{}}}};function Bk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ik(e){return h8.some(t=>e[t]>=0)}const E8=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...a}=Xs(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),u=Bk(l,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Ik(u)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),u=Bk(l,n.floating);return{data:{escapedOffsets:u,escaped:Ik(u)}}}default:return{}}}}},jN=new Set(["left","top"]);async function R8(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=Zs(n),u=xc(n),h=us(n)==="y",d=jN.has(l)?-1:1,g=a&&h?-1:1,p=Xs(t,e);let{mainAxis:v,crossAxis:y,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(y=u==="end"?w*-1:w),h?{x:y*g,y:v*d}:{x:v*d,y:y*g}}const T8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:l,middlewareData:u}=t,h=await R8(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:s+h.x,y:a+h.y,data:{...h,placement:l}}}}},N8=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:a}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:h={fn:k=>{let{x:R,y:E}=k;return{x:R,y:E}}},...d}=Xs(e,t),g={x:n,y:r},p=await a.detectOverflow(t,d),v=us(Zs(s)),y=C0(v);let w=g[y],S=g[v];if(l){const k=y==="y"?"top":"left",R=y==="y"?"bottom":"right",E=w+p[k],N=w-p[R];w=Rb(E,w,N)}if(u){const k=v==="y"?"top":"left",R=v==="y"?"bottom":"right",E=S+p[k],N=S-p[R];S=Rb(E,S,N)}const C=h.fn({...t,[y]:w,[v]:S});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[y]:l,[v]:u}}}}}},M8=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:a,middlewareData:l}=t,{offset:u=0,mainAxis:h=!0,crossAxis:d=!0}=Xs(e,t),g={x:n,y:r},p=us(s),v=C0(p);let y=g[v],w=g[p];const S=Xs(u,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(h){const E=v==="y"?"height":"width",N=a.reference[v]-a.floating[E]+C.mainAxis,j=a.reference[v]+a.reference[E]-C.mainAxis;y<N?y=N:y>j&&(y=j)}if(d){var k,R;const E=v==="y"?"width":"height",N=jN.has(Zs(s)),j=a.reference[p]-a.floating[E]+(N&&((k=l.offset)==null?void 0:k[p])||0)+(N?0:C.crossAxis),D=a.reference[p]+a.reference[E]+(N?0:((R=l.offset)==null?void 0:R[p])||0)-(N?C.crossAxis:0);w<j?w=j:w>D&&(w=D)}return{[v]:y,[p]:w}}}},A8=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:a,platform:l,elements:u}=t,{apply:h=()=>{},...d}=Xs(e,t),g=await l.detectOverflow(t,d),p=Zs(s),v=xc(s),y=us(s)==="y",{width:w,height:S}=a.floating;let C,k;p==="top"||p==="bottom"?(C=p,k=v===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(k=p,C=v==="end"?"top":"bottom");const R=S-g.top-g.bottom,E=w-g.left-g.right,N=Zo(S-g[C],R),j=Zo(w-g[k],E),D=!t.middlewareData.shift;let L=N,U=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(U=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(L=R),D&&!v){const P=ri(g.left,0),V=ri(g.right,0),I=ri(g.top,0),W=ri(g.bottom,0);y?U=w-2*(P!==0||V!==0?P+V:ri(g.left,g.right)):L=S-2*(I!==0||W!==0?I+W:ri(g.top,g.bottom))}await h({...t,availableWidth:U,availableHeight:L});const Y=await l.getDimensions(u.floating);return w!==Y.width||S!==Y.height?{reset:{rects:!0}}:{}}}};function cp(){return typeof window<"u"}function wc(e){return ON(e)?(e.nodeName||"").toLowerCase():"#document"}function ii(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ys(e){var t;return(t=(ON(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ON(e){return cp()?e instanceof Node||e instanceof ii(e).Node:!1}function Vi(e){return cp()?e instanceof Element||e instanceof ii(e).Element:!1}function to(e){return cp()?e instanceof HTMLElement||e instanceof ii(e).HTMLElement:!1}function Hk(e){return!cp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ii(e).ShadowRoot}function Ed(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=qi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function D8(e){return/^(table|td|th)$/.test(wc(e))}function up(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const j8=/transform|translate|scale|rotate|perspective|filter/,O8=/paint|layout|strict|content/,Ca=e=>!!e&&e!=="none";let m_;function R0(e){const t=Vi(e)?qi(e):e;return Ca(t.transform)||Ca(t.translate)||Ca(t.scale)||Ca(t.rotate)||Ca(t.perspective)||!T0()&&(Ca(t.backdropFilter)||Ca(t.filter))||j8.test(t.willChange||"")||O8.test(t.contain||"")}function L8(e){let t=Qo(e);for(;to(t)&&!cc(t);){if(R0(t))return t;if(up(t))return null;t=Qo(t)}return null}function T0(){return m_==null&&(m_=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),m_}function cc(e){return/^(html|body|#document)$/.test(wc(e))}function qi(e){return ii(e).getComputedStyle(e)}function dp(e){return Vi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qo(e){if(wc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Hk(e)&&e.host||ys(e);return Hk(t)?t.host:t}function LN(e){const t=Qo(e);return cc(t)?e.ownerDocument?e.ownerDocument.body:e.body:to(t)&&Ed(t)?t:LN(t)}function od(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=LN(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=ii(s);if(a){const u=Nb(l);return t.concat(l,l.visualViewport||[],Ed(s)?s:[],u&&n?od(u):[])}else return t.concat(s,od(s,[],n))}function Nb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zN(e){const t=qi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=to(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,u=_m(n)!==a||_m(r)!==l;return u&&(n=a,r=l),{width:n,height:r,$:u}}function N0(e){return Vi(e)?e:e.contextElement}function rc(e){const t=N0(e);if(!to(t))return gs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=zN(t);let l=(a?_m(n.width):n.width)/r,u=(a?_m(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const z8=gs(0);function PN(e){const t=ii(e);return!T0()||!t.visualViewport?z8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function P8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ii(e)?!1:t}function $a(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=N0(e);let l=gs(1);t&&(r?Vi(r)&&(l=rc(r)):l=rc(e));const u=P8(a,n,r)?PN(a):gs(0);let h=(s.left+u.x)/l.x,d=(s.top+u.y)/l.y,g=s.width/l.x,p=s.height/l.y;if(a){const v=ii(a),y=r&&Vi(r)?ii(r):r;let w=v,S=Nb(w);for(;S&&r&&y!==w;){const C=rc(S),k=S.getBoundingClientRect(),R=qi(S),E=k.left+(S.clientLeft+parseFloat(R.paddingLeft))*C.x,N=k.top+(S.clientTop+parseFloat(R.paddingTop))*C.y;h*=C.x,d*=C.y,g*=C.x,p*=C.y,h+=E,d+=N,w=ii(S),S=Nb(w)}}return ym({width:g,height:p,x:h,y:d})}function hp(e,t){const n=dp(e).scrollLeft;return t?t.left+n:$a(ys(e)).left+n}function BN(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-hp(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function B8(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=ys(r),u=t?up(t.floating):!1;if(r===l||u&&a)return n;let h={scrollLeft:0,scrollTop:0},d=gs(1);const g=gs(0),p=to(r);if((p||!p&&!a)&&((wc(r)!=="body"||Ed(l))&&(h=dp(r)),p)){const y=$a(r);d=rc(r),g.x=y.x+r.clientLeft,g.y=y.y+r.clientTop}const v=l&&!p&&!a?BN(l,h):gs(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-h.scrollLeft*d.x+g.x+v.x,y:n.y*d.y-h.scrollTop*d.y+g.y+v.y}}function I8(e){return Array.from(e.getClientRects())}function H8(e){const t=ys(e),n=dp(e),r=e.ownerDocument.body,s=ri(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ri(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+hp(e);const u=-n.scrollTop;return qi(r).direction==="rtl"&&(l+=ri(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:l,y:u}}const Fk=25;function F8(e,t){const n=ii(e),r=ys(e),s=n.visualViewport;let a=r.clientWidth,l=r.clientHeight,u=0,h=0;if(s){a=s.width,l=s.height;const g=T0();(!g||g&&t==="fixed")&&(u=s.offsetLeft,h=s.offsetTop)}const d=hp(r);if(d<=0){const g=r.ownerDocument,p=g.body,v=getComputedStyle(p),y=g.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,w=Math.abs(r.clientWidth-p.clientWidth-y);w<=Fk&&(a-=w)}else d<=Fk&&(a+=d);return{width:a,height:l,x:u,y:h}}function U8(e,t){const n=$a(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=to(e)?rc(e):gs(1),l=e.clientWidth*a.x,u=e.clientHeight*a.y,h=s*a.x,d=r*a.y;return{width:l,height:u,x:h,y:d}}function Uk(e,t,n){let r;if(t==="viewport")r=F8(e,n);else if(t==="document")r=H8(ys(e));else if(Vi(t))r=U8(t,n);else{const s=PN(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ym(r)}function IN(e,t){const n=Qo(e);return n===t||!Vi(n)||cc(n)?!1:qi(n).position==="fixed"||IN(n,t)}function $8(e,t){const n=t.get(e);if(n)return n;let r=od(e,[],!1).filter(u=>Vi(u)&&wc(u)!=="body"),s=null;const a=qi(e).position==="fixed";let l=a?Qo(e):e;for(;Vi(l)&&!cc(l);){const u=qi(l),h=R0(l);!h&&u.position==="fixed"&&(s=null),(a?!h&&!s:!h&&u.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Ed(l)&&!h&&IN(e,l))?r=r.filter(g=>g!==l):s=u,l=Qo(l)}return t.set(e,r),r}function W8(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?up(t)?[]:$8(t,this._c):[].concat(n),r],u=Uk(t,l[0],s);let h=u.top,d=u.right,g=u.bottom,p=u.left;for(let v=1;v<l.length;v++){const y=Uk(t,l[v],s);h=ri(y.top,h),d=Zo(y.right,d),g=Zo(y.bottom,g),p=ri(y.left,p)}return{width:d-p,height:g-h,x:p,y:h}}function V8(e){const{width:t,height:n}=zN(e);return{width:t,height:n}}function q8(e,t,n){const r=to(t),s=ys(t),a=n==="fixed",l=$a(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const h=gs(0);function d(){h.x=hp(s)}if(r||!r&&!a)if((wc(t)!=="body"||Ed(s))&&(u=dp(t)),r){const y=$a(t,!0,a,t);h.x=y.x+t.clientLeft,h.y=y.y+t.clientTop}else s&&d();a&&!r&&s&&d();const g=s&&!r&&!a?BN(s,u):gs(0),p=l.left+u.scrollLeft-h.x-g.x,v=l.top+u.scrollTop-h.y-g.y;return{x:p,y:v,width:l.width,height:l.height}}function p_(e){return qi(e).position==="static"}function $k(e,t){if(!to(e)||qi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ys(e)===n&&(n=n.ownerDocument.body),n}function HN(e,t){const n=ii(e);if(up(e))return n;if(!to(e)){let s=Qo(e);for(;s&&!cc(s);){if(Vi(s)&&!p_(s))return s;s=Qo(s)}return n}let r=$k(e,t);for(;r&&D8(r)&&p_(r);)r=$k(r,t);return r&&cc(r)&&p_(r)&&!R0(r)?n:r||L8(e)||n}const K8=async function(e){const t=this.getOffsetParent||HN,n=this.getDimensions,r=await n(e.floating);return{reference:q8(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function G8(e){return qi(e).direction==="rtl"}const Y8={convertOffsetParentRelativeRectToViewportRelativeRect:B8,getDocumentElement:ys,getClippingRect:W8,getOffsetParent:HN,getElementRects:K8,getClientRects:I8,getDimensions:V8,getScale:rc,isElement:Vi,isRTL:G8};function FN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function X8(e,t){let n=null,r;const s=ys(e);function a(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,h){u===void 0&&(u=!1),h===void 0&&(h=1),a();const d=e.getBoundingClientRect(),{left:g,top:p,width:v,height:y}=d;if(u||t(),!v||!y)return;const w=yf(p),S=yf(s.clientWidth-(g+v)),C=yf(s.clientHeight-(p+y)),k=yf(g),E={rootMargin:-w+"px "+-S+"px "+-C+"px "+-k+"px",threshold:ri(0,Zo(1,h))||1};let N=!0;function j(D){const L=D[0].intersectionRatio;if(L!==h){if(!N)return l();L?l(!1,L):r=setTimeout(()=>{l(!1,1e-7)},1e3)}L===1&&!FN(d,e.getBoundingClientRect())&&l(),N=!1}try{n=new IntersectionObserver(j,{...E,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,E)}n.observe(e)}return l(!0),a}function Z8(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:h=!1}=r,d=N0(e),g=s||a?[...d?od(d):[],...t?od(t):[]]:[];g.forEach(k=>{s&&k.addEventListener("scroll",n,{passive:!0}),a&&k.addEventListener("resize",n)});const p=d&&u?X8(d,n):null;let v=-1,y=null;l&&(y=new ResizeObserver(k=>{let[R]=k;R&&R.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var E;(E=y)==null||E.observe(t)})),n()}),d&&!h&&y.observe(d),t&&y.observe(t));let w,S=h?$a(e):null;h&&C();function C(){const k=$a(e);S&&!FN(S,k)&&n(),S=k,w=requestAnimationFrame(C)}return n(),()=>{var k;g.forEach(R=>{s&&R.removeEventListener("scroll",n),a&&R.removeEventListener("resize",n)}),p==null||p(),(k=y)==null||k.disconnect(),y=null,h&&cancelAnimationFrame(w)}}const Q8=T8,J8=N8,e9=k8,t9=A8,n9=E8,Wk=C8,r9=M8,i9=(e,t,n)=>{const r=new Map,s={platform:Y8,...n},a={...s.platform,_c:r};return S8(e,t,{...s,platform:a})};var s9=typeof document<"u",o9=function(){},Xf=s9?_.useLayoutEffect:o9;function xm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xm(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&e.$$typeof)&&!xm(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function UN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vk(e,t){const n=UN(e);return Math.round(t*n)/n}function g_(e){const t=_.useRef(e);return Xf(()=>{t.current=e}),t}function a9(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:u=!0,whileElementsMounted:h,open:d}=e,[g,p]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,y]=_.useState(r);xm(v,r)||y(r);const[w,S]=_.useState(null),[C,k]=_.useState(null),R=_.useCallback(H=>{H!==D.current&&(D.current=H,S(H))},[]),E=_.useCallback(H=>{H!==L.current&&(L.current=H,k(H))},[]),N=a||w,j=l||C,D=_.useRef(null),L=_.useRef(null),U=_.useRef(g),Y=h!=null,P=g_(h),V=g_(s),I=g_(d),W=_.useCallback(()=>{if(!D.current||!L.current)return;const H={placement:t,strategy:n,middleware:v};V.current&&(H.platform=V.current),i9(D.current,L.current,H).then($=>{const M={...$,isPositioned:I.current!==!1};K.current&&!xm(U.current,M)&&(U.current=M,Hi.flushSync(()=>{p(M)}))})},[v,t,n,V,I]);Xf(()=>{d===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,p(H=>({...H,isPositioned:!1})))},[d]);const K=_.useRef(!1);Xf(()=>(K.current=!0,()=>{K.current=!1}),[]),Xf(()=>{if(N&&(D.current=N),j&&(L.current=j),N&&j){if(P.current)return P.current(N,j,W);W()}},[N,j,W,P,Y]);const q=_.useMemo(()=>({reference:D,floating:L,setReference:R,setFloating:E}),[R,E]),O=_.useMemo(()=>({reference:N,floating:j}),[N,j]),F=_.useMemo(()=>{const H={position:n,left:0,top:0};if(!O.floating)return H;const $=Vk(O.floating,g.x),M=Vk(O.floating,g.y);return u?{...H,transform:"translate("+$+"px, "+M+"px)",...UN(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:M}},[n,u,O.floating,g.x,g.y]);return _.useMemo(()=>({...g,update:W,refs:q,elements:O,floatingStyles:F}),[g,W,q,O,F])}const l9=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Wk({element:r.current,padding:s}).fn(n):{}:r?Wk({element:r,padding:s}).fn(n):{}}}},c9=(e,t)=>{const n=Q8(e);return{name:n.name,fn:n.fn,options:[e,t]}},u9=(e,t)=>{const n=J8(e);return{name:n.name,fn:n.fn,options:[e,t]}},d9=(e,t)=>({fn:r9(e).fn,options:[e,t]}),h9=(e,t)=>{const n=e9(e);return{name:n.name,fn:n.fn,options:[e,t]}},f9=(e,t)=>{const n=t9(e);return{name:n.name,fn:n.fn,options:[e,t]}},m9=(e,t)=>{const n=n9(e);return{name:n.name,fn:n.fn,options:[e,t]}},p9=(e,t)=>{const n=l9(e);return{name:n.name,fn:n.fn,options:[e,t]}};var g9="Arrow",$N=_.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...a}=e;return f.jsx(Tt.svg,{...a,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});$N.displayName=g9;var v9=$N;function _9(e){const[t,n]=_.useState(void 0);return br(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let l,u;if("borderBoxSize"in a){const h=a.borderBoxSize,d=Array.isArray(h)?h[0]:h;l=d.inlineSize,u=d.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var M0="Popper",[WN,ea]=eo(M0),[b9,VN]=WN(M0),qN=e=>{const{__scopePopper:t,children:n}=e,[r,s]=_.useState(null);return f.jsx(b9,{scope:t,anchor:r,onAnchorChange:s,children:n})};qN.displayName=M0;var KN="PopperAnchor",GN=_.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,a=VN(KN,n),l=_.useRef(null),u=Ut(t,l),h=_.useRef(null);return _.useEffect(()=>{const d=h.current;h.current=(r==null?void 0:r.current)||l.current,d!==h.current&&a.onAnchorChange(h.current)}),r?null:f.jsx(Tt.div,{...s,ref:u})});GN.displayName=KN;var A0="PopperContent",[y9,x9]=WN(A0),YN=_.forwardRef((e,t)=>{var te,le,pe,xe,Me,Re;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:h=!0,collisionBoundary:d=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=e,C=VN(A0,n),[k,R]=_.useState(null),E=Ut(t,je=>R(je)),[N,j]=_.useState(null),D=_9(N),L=(D==null?void 0:D.width)??0,U=(D==null?void 0:D.height)??0,Y=r+(a!=="center"?"-"+a:""),P=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},V=Array.isArray(d)?d:[d],I=V.length>0,W={padding:P,boundary:V.filter(S9),altBoundary:I},{refs:K,floatingStyles:q,placement:O,isPositioned:F,middlewareData:H}=a9({strategy:"fixed",placement:Y,whileElementsMounted:(...je)=>Z8(...je,{animationFrame:y==="always"}),elements:{reference:C.anchor},middleware:[c9({mainAxis:s+U,alignmentAxis:l}),h&&u9({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?d9():void 0,...W}),h&&h9({...W}),f9({...W,apply:({elements:je,rects:Xe,availableWidth:ft,availableHeight:pt})=>{const{width:he,height:Le}=Xe.reference,Ae=je.floating.style;Ae.setProperty("--radix-popper-available-width",`${ft}px`),Ae.setProperty("--radix-popper-available-height",`${pt}px`),Ae.setProperty("--radix-popper-anchor-width",`${he}px`),Ae.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),N&&p9({element:N,padding:u}),C9({arrowWidth:L,arrowHeight:U}),v&&m9({strategy:"referenceHidden",...W})]}),[$,M]=QN(O),B=$i(w);br(()=>{F&&(B==null||B())},[F,B]);const X=(te=H.arrow)==null?void 0:te.x,A=(le=H.arrow)==null?void 0:le.y,re=((pe=H.arrow)==null?void 0:pe.centerOffset)!==0,[se,Z]=_.useState();return br(()=>{k&&Z(window.getComputedStyle(k).zIndex)},[k]),f.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:F?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(xe=H.transformOrigin)==null?void 0:xe.x,(Me=H.transformOrigin)==null?void 0:Me.y].join(" "),...((Re=H.hide)==null?void 0:Re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(y9,{scope:n,placedSide:$,onArrowChange:j,arrowX:X,arrowY:A,shouldHideArrow:re,children:f.jsx(Tt.div,{"data-side":$,"data-align":M,...S,ref:E,style:{...S.style,animation:F?void 0:"none"}})})})});YN.displayName=A0;var XN="PopperArrow",w9={top:"bottom",right:"left",bottom:"top",left:"right"},ZN=_.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,a=x9(XN,r),l=w9[a.placedSide];return f.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:f.jsx(v9,{...s,ref:n,style:{...s.style,display:"block"}})})});ZN.displayName=XN;function S9(e){return e!==null}var C9=e=>({name:"transformOrigin",options:e,fn(t){var C,k,R;const{placement:n,rects:r,middlewareData:s}=t,l=((C=s.arrow)==null?void 0:C.centerOffset)!==0,u=l?0:e.arrowWidth,h=l?0:e.arrowHeight,[d,g]=QN(n),p={start:"0%",center:"50%",end:"100%"}[g],v=(((k=s.arrow)==null?void 0:k.x)??0)+u/2,y=(((R=s.arrow)==null?void 0:R.y)??0)+h/2;let w="",S="";return d==="bottom"?(w=l?p:`${v}px`,S=`${-h}px`):d==="top"?(w=l?p:`${v}px`,S=`${r.floating.height+h}px`):d==="right"?(w=`${-h}px`,S=l?p:`${y}px`):d==="left"&&(w=`${r.floating.width+h}px`,S=l?p:`${y}px`),{data:{x:w,y:S}}}});function QN(e){const[t,n="center"]=e.split("-");return[t,n]}var fp=qN,Rd=GN,mp=YN,pp=ZN,JN=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),k9="VisuallyHidden",eM=_.forwardRef((e,t)=>f.jsx(Tt.span,{...e,ref:t,style:{...JN,...e.style}}));eM.displayName=k9;var E9=eM,[gp]=eo("Tooltip",[ea]),vp=ea(),tM="TooltipProvider",R9=700,Mb="tooltip.open",[T9,D0]=gp(tM),nM=e=>{const{__scopeTooltip:t,delayDuration:n=R9,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:a}=e,l=_.useRef(!0),u=_.useRef(!1),h=_.useRef(0);return _.useEffect(()=>{const d=h.current;return()=>window.clearTimeout(d)},[]),f.jsx(T9,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:_.useCallback(()=>{window.clearTimeout(h.current),l.current=!1},[]),onClose:_.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:_.useCallback(d=>{u.current=d},[]),disableHoverableContent:s,children:a})};nM.displayName=tM;var ad="Tooltip",[N9,Td]=gp(ad),rM=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:a,disableHoverableContent:l,delayDuration:u}=e,h=D0(ad,e.__scopeTooltip),d=vp(t),[g,p]=_.useState(null),v=Gs(),y=_.useRef(0),w=l??h.disableHoverableContent,S=u??h.delayDuration,C=_.useRef(!1),[k,R]=lc({prop:r,defaultProp:s??!1,onChange:L=>{L?(h.onOpen(),document.dispatchEvent(new CustomEvent(Mb))):h.onClose(),a==null||a(L)},caller:ad}),E=_.useMemo(()=>k?C.current?"delayed-open":"instant-open":"closed",[k]),N=_.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C.current=!1,R(!0)},[R]),j=_.useCallback(()=>{window.clearTimeout(y.current),y.current=0,R(!1)},[R]),D=_.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,R(!0),y.current=0},S)},[S,R]);return _.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),f.jsx(fp,{...d,children:f.jsx(N9,{scope:t,contentId:v,open:k,stateAttribute:E,trigger:g,onTriggerChange:p,onTriggerEnter:_.useCallback(()=>{h.isOpenDelayedRef.current?D():N()},[h.isOpenDelayedRef,D,N]),onTriggerLeave:_.useCallback(()=>{w?j():(window.clearTimeout(y.current),y.current=0)},[j,w]),onOpen:N,onClose:j,disableHoverableContent:w,children:n})})};rM.displayName=ad;var Ab="TooltipTrigger",iM=_.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Td(Ab,n),a=D0(Ab,n),l=vp(n),u=_.useRef(null),h=Ut(t,u,s.onTriggerChange),d=_.useRef(!1),g=_.useRef(!1),p=_.useCallback(()=>d.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),f.jsx(Rd,{asChild:!0,...l,children:f.jsx(Tt.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:h,onPointerMove:Be(e.onPointerMove,v=>{v.pointerType!=="touch"&&!g.current&&!a.isPointerInTransitRef.current&&(s.onTriggerEnter(),g.current=!0)}),onPointerLeave:Be(e.onPointerLeave,()=>{s.onTriggerLeave(),g.current=!1}),onPointerDown:Be(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Be(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:Be(e.onBlur,s.onClose),onClick:Be(e.onClick,s.onClose)})})});iM.displayName=Ab;var j0="TooltipPortal",[M9,A9]=gp(j0,{forceMount:void 0}),sM=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:s}=e,a=Td(j0,t);return f.jsx(M9,{scope:t,forceMount:n,children:f.jsx(ji,{present:n||a.open,children:f.jsx(yc,{asChild:!0,container:s,children:r})})})};sM.displayName=j0;var uc="TooltipContent",oM=_.forwardRef((e,t)=>{const n=A9(uc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...a}=e,l=Td(uc,e.__scopeTooltip);return f.jsx(ji,{present:r||l.open,children:l.disableHoverableContent?f.jsx(aM,{side:s,...a,ref:t}):f.jsx(D9,{side:s,...a,ref:t})})}),D9=_.forwardRef((e,t)=>{const n=Td(uc,e.__scopeTooltip),r=D0(uc,e.__scopeTooltip),s=_.useRef(null),a=Ut(t,s),[l,u]=_.useState(null),{trigger:h,onClose:d}=n,g=s.current,{onPointerInTransitChange:p}=r,v=_.useCallback(()=>{u(null),p(!1)},[p]),y=_.useCallback((w,S)=>{const C=w.currentTarget,k={x:w.clientX,y:w.clientY},R=P9(k,C.getBoundingClientRect()),E=B9(k,R),N=I9(S.getBoundingClientRect()),j=F9([...E,...N]);u(j),p(!0)},[p]);return _.useEffect(()=>()=>v(),[v]),_.useEffect(()=>{if(h&&g){const w=C=>y(C,g),S=C=>y(C,h);return h.addEventListener("pointerleave",w),g.addEventListener("pointerleave",S),()=>{h.removeEventListener("pointerleave",w),g.removeEventListener("pointerleave",S)}}},[h,g,y,v]),_.useEffect(()=>{if(l){const w=S=>{const C=S.target,k={x:S.clientX,y:S.clientY},R=(h==null?void 0:h.contains(C))||(g==null?void 0:g.contains(C)),E=!H9(k,l);R?v():E&&(v(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[h,g,l,d,v]),f.jsx(aM,{...e,ref:a})}),[j9,O9]=gp(ad,{isInside:!1}),L9=zP("TooltipContent"),aM=_.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=e,h=Td(uc,n),d=vp(n),{onClose:g}=h;return _.useEffect(()=>(document.addEventListener(Mb,g),()=>document.removeEventListener(Mb,g)),[g]),_.useEffect(()=>{if(h.trigger){const p=v=>{const y=v.target;y!=null&&y.contains(h.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,g]),f.jsx(bc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:f.jsxs(mp,{"data-state":h.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(L9,{children:r}),f.jsx(j9,{scope:n,isInside:!0,children:f.jsx(E9,{id:h.contentId,role:"tooltip",children:s||r})})]})})});oM.displayName=uc;var lM="TooltipArrow",z9=_.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=vp(n);return O9(lM,n).isInside?null:f.jsx(pp,{...s,...r,ref:t})});z9.displayName=lM;function P9(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,s,a)){case a:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function B9(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function I9(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function H9(e,t){const{x:n,y:r}=e;let s=!1;for(let a=0,l=t.length-1;a<t.length;l=a++){const u=t[a],h=t[l],d=u.x,g=u.y,p=h.x,v=h.y;g>r!=v>r&&n<(p-d)*(r-g)/(v-g)+d&&(s=!s)}return s}function F9(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),U9(t)}function U9(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const a=t[t.length-1],l=t[t.length-2];if((a.x-l.x)*(s.y-l.y)>=(a.y-l.y)*(s.x-l.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const a=n[n.length-1],l=n[n.length-2];if((a.x-l.x)*(s.y-l.y)>=(a.y-l.y)*(s.x-l.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var $9=nM,cM=rM,uM=iM,dM=sM,O0=oM;function W9({className:e,...t}){return f.jsx("kbd",{className:me("pointer-events-none inline-flex h-5 min-w-5 items-center justify-center rounded border border-border/60 bg-muted/50 px-1.5 font-mono text-[11px] font-medium text-current select-none",e),...t})}function V9({className:e,...t}){return f.jsx("span",{className:me("inline-flex items-center gap-0.5",e),...t})}const q9="z-50 overflow-hidden rounded-md border border-border backdrop-blur-md p-0.5 text-[11px] font-medium text-card-foreground shadow-sm animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",K9=$9,ds=cM,hs=uM,Fi=_.forwardRef(({className:e,sideOffset:t=4,...n},r)=>f.jsx(dM,{children:f.jsx(O0,{ref:r,sideOffset:t,className:me("z-50 overflow-hidden rounded-md bg-card text-card-foreground border border-border backdrop-blur-md px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...n})}));Fi.displayName=O0.displayName;const Lu=cM,zu=uM;function hM(e){return e.toUpperCase()}function G9(e){const t=e.split("+");return f.jsx(V9,{children:t.map((n,r)=>f.jsx(W9,{children:hM(n)},`${n}-${r}`))})}const Zl=_.forwardRef(({className:e,sideOffset:t=4,children:n,shortcut:r,...s},a)=>{const l=r===void 0?null:Array.isArray(r)?r[0]??null:r;return f.jsx(dM,{children:f.jsx(O0,{ref:a,sideOffset:t,className:me(q9,e),...s,children:l?G9(l):f.jsx("span",{children:typeof n=="string"?hM(n):n})})})});Zl.displayName="HotkeyTooltipContent";const Y9="0.2.1",X9={version:Y9},Pn="Kaizen",qk="kaizen",Z9=".kaizen",Q9=".kaizen-dev",v_=".kaizen",J9="KAIZEN_RUNTIME_PROFILE",L0=`kaizen/${X9.version}`,e7="[kaizen]",t7=`~/${Pn}`,_p="kaizen:";function bp(){var t;return(t=globalThis.process)==null?void 0:t.env}function n7(e=bp()){const t=e==null?void 0:e[J9];return(t==null?void 0:t.trim().toLowerCase())==="dev"?"dev":"prod"}function r7(e=bp()){return n7(e)==="dev"?Q9:Z9}function i7(e=bp()){return`~/${r7(e)}`}function s7(e=bp()){return`${i7(e)}/keybindings.json`}function xf(e){return e?`${qk} ${e}`:qk}const wm=[{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"max",label:"Max"}],Db=[{id:"minimal",label:"Minimal"},{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"xhigh",label:"XHigh"}],jb=[{id:"off",label:"Off"},{id:"standard",label:"Standard"},{id:"high",label:"High"}],Ob="claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]",fM=[{id:"composer-2[fast=true]",label:"Composer 2",supportsEffort:!1},{id:"composer-1.5[]",label:"Composer 1.5",supportsEffort:!1},{id:"gpt-5.3-codex[reasoning=medium,fast=false]",label:"Codex 5.3",supportsEffort:!1},{id:"gpt-5.4[reasoning=medium,context=272k,fast=false]",label:"GPT-5.4",supportsEffort:!1},{id:"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]",label:"Sonnet 4.6",supportsEffort:!1},{id:"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]",label:"Opus 4.6",supportsEffort:!1},{id:"claude-opus-4-5[thinking=true]",label:"Opus 4.5",supportsEffort:!1},{id:"gpt-5.2[reasoning=medium,fast=false]",label:"GPT-5.2",supportsEffort:!1},{id:"gemini-3.1-pro[]",label:"Gemini 3.1 Pro",supportsEffort:!1},{id:"gpt-5.4-mini[reasoning=medium]",label:"GPT-5.4 Mini",supportsEffort:!1},{id:"gpt-5.4-nano[reasoning=medium]",label:"GPT-5.4 Nano",supportsEffort:!1},{id:"claude-haiku-4-5[thinking=true]",label:"Haiku 4.5",supportsEffort:!1},{id:"gpt-5.3-codex-spark[reasoning=medium]",label:"Codex 5.3 Spark",supportsEffort:!1},{id:"grok-4-20[thinking=true]",label:"Grok 4.20",supportsEffort:!1},{id:"claude-sonnet-4-5[thinking=true,context=200k]",label:"Sonnet 4.5",supportsEffort:!1},{id:"gpt-5.2-codex[reasoning=medium,fast=false]",label:"Codex 5.2",supportsEffort:!1},{id:"gemini-3-flash[]",label:"Gemini 3 Flash",supportsEffort:!1},{id:"claude-sonnet-4[thinking=false,context=200k]",label:"Sonnet 4",supportsEffort:!1},{id:"kimi-k2.5[]",label:"Kimi K2.5",supportsEffort:!1}],o7={"composer-2-fast":"composer-2[fast=true]","composer-1.5":"composer-1.5[]","gpt-5.3-codex":"gpt-5.3-codex[reasoning=medium,fast=false]","gpt-5.4":"gpt-5.4[reasoning=medium,context=272k,fast=false]","gpt-5.4-medium":"gpt-5.4[reasoning=medium,context=272k,fast=false]","claude-4.6-sonnet-medium-thinking":"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]","claude-4.6-opus-high-thinking":"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]","claude-4.5-opus-high-thinking":"claude-opus-4-5[thinking=true]","gpt-5.2":"gpt-5.2[reasoning=medium,fast=false]","gemini-3.1-pro":"gemini-3.1-pro[]","gpt-5.4-mini":"gpt-5.4-mini[reasoning=medium]","gpt-5.4-mini-medium":"gpt-5.4-mini[reasoning=medium]","gpt-5.4-nano":"gpt-5.4-nano[reasoning=medium]","gpt-5.4-nano-medium":"gpt-5.4-nano[reasoning=medium]","claude-haiku-4.5":"claude-haiku-4-5[thinking=true]","gpt-5.3-codex-spark-preview":"gpt-5.3-codex-spark[reasoning=medium]","grok-4-20":"grok-4-20[thinking=true]","grok-4-20-thinking":"grok-4-20[thinking=true]","claude-4.5-sonnet-thinking":"claude-sonnet-4-5[thinking=true,context=200k]","gpt-5.2-codex":"gpt-5.2-codex[reasoning=medium,fast=false]","gemini-3-flash":"gemini-3-flash[]","claude-4-sonnet":"claude-sonnet-4[thinking=false,context=200k]","kimi-k2.5":"kimi-k2.5[]"};function a7(e){return e?fM.some(t=>t.id===e)?e:o7[e]??Ob:Ob}function Kk(e){const t=e.indexOf("[");return t>=0?e.slice(0,t):e}function Yl(e){const t=e.match(/\bfast=(true|false)\b/);return t?t[1]==="true"?"fast":"standard":null}function Gk(e){return wm.some(t=>t.id===e)}function Yk(e){return Db.some(t=>t.id===e)}const Lb=[{id:"200k",label:"200k"},{id:"1m",label:"1M"}];function l7(e){return jb.some(t=>t.id===e)}const qo=[{id:"claude",label:"Claude",systemActive:!0,defaultModel:"sonnet",defaultEffort:"high",defaultModelOptions:{reasoningEffort:"high",contextWindow:"200k"},supportsPlanMode:!0,models:[{id:"opus",label:"Opus",supportsEffort:!0,contextWindowOptions:[...Lb]},{id:"sonnet",label:"Sonnet",supportsEffort:!0,contextWindowOptions:[...Lb]},{id:"haiku",label:"Haiku",supportsEffort:!0}],efforts:[...wm]},{id:"codex",label:"Codex",systemActive:!0,defaultModel:"gpt-5.4",defaultModelOptions:{reasoningEffort:"high",fastMode:!1},supportsPlanMode:!0,models:[{id:"gpt-5.4",label:"GPT-5.4",supportsEffort:!1},{id:"gpt-5.3-codex",label:"GPT-5.3 Codex",supportsEffort:!1},{id:"gpt-5.3-codex-spark",label:"GPT-5.3 Codex Spark",supportsEffort:!1}],efforts:[]},{id:"gemini",label:"Gemini",systemActive:!1,defaultModel:"auto-gemini-2.5",defaultModelOptions:{thinkingMode:"standard"},supportsPlanMode:!0,models:[{id:"auto-gemini-3",label:"Auto (Gemini 3)",supportsEffort:!1},{id:"auto-gemini-2.5",label:"Auto (Gemini 2.5)",supportsEffort:!1},{id:"gemini-3.1-pro-preview",label:"3.1 Pro Preview",supportsEffort:!1},{id:"gemini-3-pro-preview",label:"3 Pro Preview",supportsEffort:!1},{id:"gemini-3-flash-preview",label:"3 Flash Preview",supportsEffort:!1},{id:"gemini-2.5-pro",label:"2.5 Pro",supportsEffort:!1},{id:"gemini-2.5-flash",label:"2.5 Flash",supportsEffort:!1},{id:"gemini-2.5-flash-lite",label:"2.5 Flash Lite",supportsEffort:!1}],efforts:[]},{id:"cursor",label:"Cursor",systemActive:!0,defaultModel:Ob,defaultModelOptions:{},supportsPlanMode:!0,models:[...fM],efforts:[]}],Wn={claude:{active:!0},codex:{active:!0},gemini:{active:!0},cursor:{active:!0}};function Jt(e){const t=qo.find(n=>n.id===e);if(!t)throw new Error(`Unknown provider: ${e}`);return t}function z0(e,t){const n=Wn[t],r=e==null?void 0:e[t];return{active:(r==null?void 0:r.active)??n.active}}function c7(e,t){const n=Jt(e),r=z0(t,e);return n.systemActive&&r.active?null:`Provider ${n.label} is currently not active.`}function Xk(e,t){const n=Jt(e),r=z0(t,e);return n.systemActive&&r.active}function u7(e){return qo.map(t=>{const n=z0(e,t.id),r=t.systemActive&&n.active;return{...t,active:n.active,isSelectable:r,isUsageEnabled:r,isInactive:!r,inactiveMessage:c7(t.id,e)}})}function P0(e){return u7(e).filter(t=>t.isSelectable).map(({active:t,isSelectable:n,isUsageEnabled:r,isInactive:s,inactiveMessage:a,...l})=>l)}function Ri(e){return Jt(e).defaultModelOptions}const mM=Ri("claude");Ri("codex");Ri("gemini");Ri("cursor");function d7(e){return Jt("claude").models.find(t=>t.id===e)}function h7(e){var t;return((t=d7(e))==null?void 0:t.contextWindowOptions)??[]}function f7(e,t){const n=h7(e);if(n.length!==0)return n.some(r=>r.id===t)?t:mM.contextWindow}const m7=["idea","todo","progress","testing","done"],Zk={idea:"IDEA",todo:"TODO",progress:"PROGRESS",testing:"TESTING",done:"DONE"},os={submitChatMessage:["enter"],toggleProjectsSidebar:["ctrl+a"],toggleEmbeddedTerminal:["cmd+j","ctrl+`"],toggleRightSidebar:["cmd+b","ctrl+b"],openInFinder:["cmd+alt+f","ctrl+alt+f"],openInEditor:["cmd+shift+o","ctrl+shift+o"],addSplitTerminal:["cmd+/","ctrl+/"]},Qk=8,p7=10*1024*1024,Jk=["image/png","image/jpeg","image/webp","image/gif"],g7="/assets/icon-4rSnra9R.svg";function Sm({alt:e="",className:t,...n}){return f.jsx("img",{alt:e,src:g7,className:me("shrink-0 object-contain",t),...n})}var yp="Popover",[pM]=eo(yp,[ea]),Nd=ea(),[v7,ta]=pM(yp),gM=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:s,onOpenChange:a,modal:l=!1}=e,u=Nd(t),h=_.useRef(null),[d,g]=_.useState(!1),[p,v]=lc({prop:r,defaultProp:s??!1,onChange:a,caller:yp});return f.jsx(fp,{...u,children:f.jsx(v7,{scope:t,contentId:Gs(),triggerRef:h,open:p,onOpenChange:v,onOpenToggle:_.useCallback(()=>v(y=>!y),[v]),hasCustomAnchor:d,onCustomAnchorAdd:_.useCallback(()=>g(!0),[]),onCustomAnchorRemove:_.useCallback(()=>g(!1),[]),modal:l,children:n})})};gM.displayName=yp;var vM="PopoverAnchor",_M=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(vM,n),a=Nd(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=s;return _.useEffect(()=>(l(),()=>u()),[l,u]),f.jsx(Rd,{...a,...r,ref:t})});_M.displayName=vM;var bM="PopoverTrigger",yM=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(bM,n),a=Nd(n),l=Ut(t,s.triggerRef),u=f.jsx(Tt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":kM(s.open),...r,ref:l,onClick:Be(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?u:f.jsx(Rd,{asChild:!0,...a,children:u})});yM.displayName=bM;var B0="PopoverPortal",[_7,b7]=pM(B0,{forceMount:void 0}),xM=e=>{const{__scopePopover:t,forceMount:n,children:r,container:s}=e,a=ta(B0,t);return f.jsx(_7,{scope:t,forceMount:n,children:f.jsx(ji,{present:n||a.open,children:f.jsx(yc,{asChild:!0,container:s,children:r})})})};xM.displayName=B0;var dc="PopoverContent",wM=_.forwardRef((e,t)=>{const n=b7(dc,e.__scopePopover),{forceMount:r=n.forceMount,...s}=e,a=ta(dc,e.__scopePopover);return f.jsx(ji,{present:r||a.open,children:a.modal?f.jsx(x7,{...s,ref:t}):f.jsx(w7,{...s,ref:t})})});wM.displayName=dc;var y7=Fa("PopoverContent.RemoveScroll"),x7=_.forwardRef((e,t)=>{const n=ta(dc,e.__scopePopover),r=_.useRef(null),s=Ut(t,r),a=_.useRef(!1);return _.useEffect(()=>{const l=r.current;if(l)return tp(l)},[]),f.jsx(Sd,{as:y7,allowPinchZoom:!0,children:f.jsx(SM,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Be(e.onCloseAutoFocus,l=>{var u;l.preventDefault(),a.current||(u=n.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Be(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,h=u.button===0&&u.ctrlKey===!0,d=u.button===2||h;a.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Be(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),w7=_.forwardRef((e,t)=>{const n=ta(dc,e.__scopePopover),r=_.useRef(!1),s=_.useRef(!1);return f.jsx(SM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var l,u;(l=e.onCloseAutoFocus)==null||l.call(e,a),a.defaultPrevented||(r.current||(u=n.triggerRef.current)==null||u.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{var h,d;(h=e.onInteractOutside)==null||h.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const l=a.target;((d=n.triggerRef.current)==null?void 0:d.contains(l))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),SM=_.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:g,...p}=e,v=ta(dc,n),y=Nd(n);return Jm(),f.jsx(wd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:f.jsx(bc,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:g,onEscapeKeyDown:u,onPointerDownOutside:h,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:f.jsx(mp,{"data-state":kM(v.open),role:"dialog",id:v.contentId,...y,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),CM="PopoverClose",S7=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=ta(CM,n);return f.jsx(Tt.button,{type:"button",...r,ref:t,onClick:Be(e.onClick,()=>s.onOpenChange(!1))})});S7.displayName=CM;var C7="PopoverArrow",k7=_.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,s=Nd(n);return f.jsx(pp,{...s,...r,ref:t})});k7.displayName=C7;function kM(e){return e?"open":"closed"}var EM=gM,E7=_M,R7=yM,RM=xM,I0=wM;const TM=EM,NM=R7,H0=_.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>f.jsx(RM,{children:f.jsx(I0,{ref:s,align:t,sideOffset:n,[sd]:"",onCloseAutoFocus:a=>{var l;a.preventDefault(),window.dispatchEvent(new Event(gm)),(l=r.onCloseAutoFocus)==null||l.call(r,a)},className:me("z-50 w-72 rounded-xl border border-border bg-background p-4 shadow-lg backdrop-blur-md outline-hidden animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",e),...r})}));H0.displayName=I0.displayName;function T7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:me("shrink-0",e),...t,children:f.jsx("path",{d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})})}function N7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 158.7128 157.296",fill:"currentColor","aria-hidden":"true",className:me("shrink-0",e),...t,children:f.jsx("path",{d:"M60.8734 57.2556V42.3124c0-1.2586.4722-2.2029 1.5728-2.8314l30.0443-17.3023c4.0899-2.3593 8.9662-3.4599 13.9988-3.4599 18.8759 0 30.8307 14.6289 30.8307 30.2006 0 1.1007 0 2.3593-.158 3.6178l-31.1446-18.2467c-1.8872-1.1006-3.7754-1.1006-5.6629 0L60.8734 57.2556Zm70.1542 58.2005V79.7487c0-2.2028-.9446-3.7756-2.8318-4.8763l-39.481-22.9651 12.8982-7.3934c1.1007-.6285 2.0453-.6285 3.1458 0l30.0441 17.3024c8.6523 5.0341 14.4708 15.7296 14.4708 26.1107 0 11.9539-7.0769 22.965-18.2461 27.527ZM51.593 83.9964l-12.8982-7.5497c-1.1007-.6285-1.5728-1.5728-1.5728-2.8314V39.0105c0-16.8303 12.8982-29.5722 30.3585-29.5722 6.607 0 12.7403 2.2029 17.9324 6.1349l-30.987 17.9324c-1.8871 1.1007-2.8314 2.6735-2.8314 4.8764v45.6159ZM79.3562 100.0403 60.8733 89.6592V67.6383l18.4829-10.3811 18.4812 10.3811v22.0209l-18.4812 10.3811Zm11.8757 47.8188c-6.607 0-12.7403-2.2031-17.9324-6.1344l30.9866-17.9333c1.8872-1.1005 2.8318-2.6728 2.8318-4.8759v-45.616l13.0564 7.5498c1.1005.6285 1.5723 1.5728 1.5723 2.8314v34.6051c0 16.8297-13.0564 29.5723-30.5147 29.5723ZM53.9522 112.7822 23.9079 95.4798c-8.652-5.0343-14.471-15.7296-14.471-26.1107 0-12.1119 7.2356-22.9652 18.403-27.5272v35.8634c0 2.2028.9443 3.7756 2.8314 4.8763l39.3248 22.8068-12.8982 7.3938c-1.1007.6287-2.045.6287-3.1456 0ZM52.2229 138.5791c-17.7745 0-30.8306-13.3713-30.8306-29.8871 0-1.2585.1578-2.5169.3143-3.7754l30.987 17.9323c1.8871 1.1005 3.7757 1.1005 5.6628 0l39.4811-22.807v14.9435c0 1.2585-.4721 2.2021-1.5728 2.8308l-30.0443 17.3025c-4.0898 2.359-8.9662 3.4605-13.9989 3.4605h.0014ZM91.2319 157.296c19.0327 0 34.9188-13.5272 38.5383-31.4594 17.6164-4.562 28.9425-21.0779 28.9425-37.908 0-11.0112-4.719-21.7066-13.2133-29.4143.7867-3.3035 1.2595-6.607 1.2595-9.909 0-22.4929-18.2471-39.3247-39.3251-39.3247-4.2461 0-8.3363.6285-12.4262 2.045-7.0792-6.9213-16.8318-11.3254-27.5271-11.3254-19.0331 0-34.9191 13.5268-38.5384 31.4591C11.3255 36.0212 0 52.5373 0 69.3675c0 11.0112 4.7184 21.7065 13.2125 29.4142-.7865 3.3035-1.2586 6.6067-1.2586 9.9092 0 22.4923 18.2466 39.3241 39.3248 39.3241 4.2462 0 8.3362-.6277 12.426-2.0441 7.0776 6.921 16.8302 11.3251 27.5271 11.3251Z"})})}function M7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:me("shrink-0",e),...t,children:f.jsx("path",{d:"M12 0C12 0 12 8 8 12C4 16 0 12 0 12C0 12 4 12 8 12C12 12 12 16 12 24C12 24 12 16 16 12C20 8 24 12 24 12C24 12 16 12 16 12C12 12 12 4 12 0Z"})})}function A7({className:e,...t}){return f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:me("shrink-0",e),...t,children:f.jsx("path",{d:"M12 0 2.4 5.5v13L12 24l9.6-5.5v-13Zm0 3.1 6.8 3.9v5.1L15 14.3V9.7L12 8l-3 1.7v4.6l-3.8-2.2V7Zm-6.8 9.8 3.8 2.2v4.5l3 1.8 3-1.8v-4.5l3.8-2.2v3.8L12 20.9l-6.8-3.9Z"})})}function D7(e){return!(e.startsWith("gemini-3")||e==="auto-gemini-3")}const j7=["Composer","GPT","Claude","Gemini","Grok","Kimi"];function O7(e){return e.startsWith("composer-")?"Composer":e.startsWith("gpt-")?"GPT":e.startsWith("claude-")?"Claude":e.startsWith("gemini-")?"Gemini":e.startsWith("grok-")?"Grok":"Kimi"}function __(e,t){const n=Yl(t);return!n||n==="standard"?e:`${e} (${n==="fast"?"Fast":"Standard"})`}const Cm={claude:T7,codex:N7,gemini:M7,cursor:A7},wf={auto:Tn,opus:ti,sonnet:Tn,haiku:ls,"gpt-5.4":ti,"gpt-5.4[reasoning=medium,context=272k,fast=false]":ti,"gpt-5.4-mini[reasoning=medium]":Tn,"gpt-5.4-nano[reasoning=medium]":ls,"gpt-5.3-codex":Tn,"gpt-5.3-codex[reasoning=medium,fast=false]":Tn,"gpt-5.3-codex-spark[reasoning=medium]":ls,"gpt-5.2[reasoning=medium,fast=false]":Tn,"gpt-5.2-codex[reasoning=medium,fast=false]":Tn,"gpt-5.3-codex-spark":ls,"gemini-2.5-pro":ti,"gemini-2.5-flash":Tn,"gemini-2.5-flash-lite":ls,"auto-gemini-3":ti,"auto-gemini-2.5":Tn,"gemini-3.1-pro-preview":ti,"gemini-3.1-pro[]":ti,"gemini-3-flash[]":Tn,"gemini-3-pro-preview":ti,"gemini-3-flash-preview":Tn,"claude-opus-4-6[thinking=true,context=200k,effort=high,fast=false]":ti,"claude-opus-4-5[thinking=true]":ti,"claude-sonnet-4-6[thinking=true,context=200k,effort=medium]":Tn,"claude-sonnet-4-5[thinking=true,context=200k]":Tn,"claude-sonnet-4[thinking=false,context=200k]":Tn,"claude-haiku-4-5[thinking=true]":ls,"grok-4-20[thinking=true]":ti,"kimi-k2.5[]":Tn,"composer-2[fast=true]":ti,"composer-1.5[]":Tn};function Ir({onClick:e,selected:t,icon:n,label:r,description:s,disabled:a}){return f.jsxs("button",{onClick:e,disabled:a,className:me("w-full flex items-center gap-2 p-2 border border-border/0 rounded-lg text-left transition-opacity",t?"bg-muted border-border":"hover:opacity-60",a&&"opacity-40 cursor-not-allowed"),children:[n,f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-medium",children:r}),s?f.jsx("div",{className:"text-xs text-muted-foreground",children:s}):null]})]})}function zo({trigger:e,triggerClassName:t,disabled:n=!1,children:r}){const[s,a]=_.useState(!1);return n?f.jsx("button",{disabled:!0,className:me("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md text-muted-foreground [&>svg]:shrink-0 opacity-70 cursor-default",t),children:e}):f.jsxs(TM,{open:s,onOpenChange:a,children:[f.jsx(NM,{asChild:!0,children:f.jsx("button",{className:me("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md transition-colors text-muted-foreground [&>svg]:shrink-0","hover:bg-muted/50",t),children:e})}),f.jsx(H0,{align:"center",className:"w-64 p-1",children:f.jsx("div",{className:"max-h-[min(24rem,60vh)] space-y-1 overflow-y-auto pr-1",children:typeof r=="function"?r(()=>a(!1)):r})})]})}function Pu({availableProviders:e,selectedProvider:t,disabled:n=!1,showProviderPicker:r=!0,providerLocked:s=!1,model:a,modelOptions:l,onProviderChange:u,onModelChange:h,onClaudeReasoningEffortChange:d,onClaudeContextWindowChange:g,onCodexReasoningEffortChange:p,onGeminiThinkingModeChange:v,onCodexFastModeChange:y,planMode:w=!1,onPlanModeChange:S,includePlanMode:C=!0,className:k}){var $,M,B,X,A,re,se;const[R,E]=_.useState(null),N=e.find(Z=>Z.id===t)??Jt(t),j=Cm[t],D=wf[a]??Tn,L=C&&(N==null?void 0:N.supportsPlanMode)&&S,U=t==="claude"?l:null,Y=t==="codex"?l:null,P=t==="gemini"?l:null,V=(($=N.models.find(Z=>Z.id===a))==null?void 0:$.contextWindowOptions)??[],I=(U==null?void 0:U.contextWindow)??Lb[0].id,W=I==="1m"?Mk:Ak,K=t==="claude"||t==="codex",q=t==="cursor"?Yl(a):null,O=N.id==="cursor"?N.models.filter(Z=>Kk(Z.id)===Kk(a)):[],F=t==="cursor"&&O.some(Z=>Yl(Z.id)==="fast")&&O.some(Z=>Yl(Z.id)==="standard"),H=N.id==="cursor"?j7.map(Z=>({family:Z,models:N.models.filter(te=>O7(te.id)===Z)})).filter(Z=>Z.models.length>0):[];return _.useEffect(()=>{E(null)},[t]),f.jsx("div",{className:me("max-w-full overflow-x-auto scrollbar-hide",n&&"pointer-events-none opacity-60",k),children:f.jsxs("div",{className:"flex w-max items-center justify-center gap-0.5 mx-auto",children:[r?f.jsx(zo,{disabled:s||!u,trigger:f.jsxs(f.Fragment,{children:[f.jsx(j,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"hidden md:inline",children:(N==null?void 0:N.label)??t})]}),children:Z=>e.map(te=>{const le=Cm[te.id];return f.jsx(Ir,{onClick:()=>{u==null||u(te.id),Z()},selected:t===te.id,icon:f.jsx(le,{className:"h-4 w-4 text-muted-foreground"}),label:te.label},te.id)})}):null,f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(D,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:N.id==="cursor"?__(((M=N.models.find(Z=>Z.id===a))==null?void 0:M.label)??a,a):((B=N.models.find(Z=>Z.id===a))==null?void 0:B.label)??a})]}),children:Z=>{var te;return N.id==="cursor"?R?f.jsxs(f.Fragment,{children:[f.jsxs("button",{onClick:()=>E(null),className:"flex w-full items-center gap-2 rounded-lg px-2 py-2 text-left text-sm text-muted-foreground transition-opacity hover:opacity-70",children:[f.jsx(bN,{className:"h-4 w-4"}),f.jsx("span",{children:R})]}),(te=H.find(le=>le.family===R))==null?void 0:te.models.map(le=>{const pe=wf[le.id]??Tn;return f.jsx(Ir,{onClick:()=>{h(t,le.id),E(null),Z()},selected:a===le.id,icon:f.jsx(pe,{className:"h-4 w-4 text-muted-foreground"}),label:__(le.label,le.id)},le.id)})]}):H.map(le=>{var Me;const pe=le.models.some(Re=>Re.id===a),xe=wf[((Me=le.models[0])==null?void 0:Me.id)??""]??Tn;return f.jsxs("div",{className:"relative",children:[f.jsx(Ir,{onClick:()=>E(le.family),selected:pe,icon:f.jsx(xe,{className:"h-4 w-4 text-muted-foreground"}),label:le.family,description:`${le.models.length} model${le.models.length===1?"":"s"}`}),f.jsx(Tr,{className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"})]},le.family)}):N.models.map(le=>{const pe=wf[le.id]??Tn;return f.jsx(Ir,{onClick:()=>{h(t,le.id),Z()},selected:a===le.id,icon:f.jsx(pe,{className:"h-4 w-4 text-muted-foreground"}),label:N.id==="cursor"?__(le.label,le.id):le.label},le.id)})}}),F?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[q==="fast"?f.jsx(ls,{className:"h-3.5 w-3.5"}):f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:q==="fast"?"Fast":"Standard"})]}),triggerClassName:q==="fast"?"text-emerald-500 dark:text-emerald-400":void 0,children:Z=>f.jsxs(f.Fragment,{children:[O.filter(te=>Yl(te.id)==="standard").map(te=>f.jsx(Ir,{onClick:()=>{h(t,te.id),Z()},selected:a===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:"Standard"},te.id)),O.filter(te=>Yl(te.id)==="fast").map(te=>f.jsx(Ir,{onClick:()=>{h(t,te.id),Z()},selected:a===te.id,icon:f.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),label:"Fast"},te.id))]})}):null,K?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:t==="claude"?((X=wm.find(Z=>Z.id===l.reasoningEffort))==null?void 0:X.label)??l.reasoningEffort:((A=Db.find(Z=>Z.id===l.reasoningEffort))==null?void 0:A.label)??l.reasoningEffort})]}),children:Z=>t==="claude"?wm.map(te=>f.jsx(Ir,{onClick:()=>{d(te.id),Z()},selected:l.reasoningEffort===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,disabled:te.id==="max"&&a!=="opus"},te.id)):Db.map(te=>f.jsx(Ir,{onClick:()=>{p(te.id),Z()},selected:l.reasoningEffort===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label},te.id))}):null,t==="claude"&&V.length>1?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(W,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:((re=V.find(Z=>Z.id===I))==null?void 0:re.label)??I})]}),children:Z=>V.map(te=>f.jsx(Ir,{onClick:()=>{g(te.id),Z()},selected:I===te.id,icon:te.id==="1m"?f.jsx(Mk,{className:"h-4 w-4 text-muted-foreground"}):f.jsx(Ak,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,description:te.id==="1m"?"Expanded context window":"Standard context window"},te.id))}):null,t==="gemini"?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:((se=jb.find(Z=>Z.id===(P==null?void 0:P.thinkingMode)))==null?void 0:se.label)??(P==null?void 0:P.thinkingMode)??"Standard"})]}),children:Z=>jb.map(te=>f.jsx(Ir,{onClick:()=>{v(te.id),Z()},selected:(P==null?void 0:P.thinkingMode)===te.id,icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:te.label,disabled:te.id==="off"&&!D7(a)},te.id))}):null,t==="codex"?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[Y!=null&&Y.fastMode?f.jsx(ls,{className:"h-3.5 w-3.5"}):f.jsx(Fs,{className:"h-3.5 w-3.5"}),f.jsx("span",{children:Y!=null&&Y.fastMode?"Fast Mode":"Standard"})]}),triggerClassName:Y!=null&&Y.fastMode?"text-emerald-500 dark:text-emerald-400":void 0,children:Z=>f.jsxs(f.Fragment,{children:[f.jsx(Ir,{onClick:()=>{y(!1),Z()},selected:!(Y!=null&&Y.fastMode),icon:f.jsx(Fs,{className:"h-4 w-4 text-muted-foreground"}),label:"Standard"}),f.jsx(Ir,{onClick:()=>{y(!0),Z()},selected:!!(Y!=null&&Y.fastMode),icon:f.jsx(ls,{className:"h-4 w-4 text-muted-foreground"}),label:"Fast Mode"})]})}):null,L?f.jsx(zo,{trigger:f.jsxs(f.Fragment,{children:[w?f.jsx(mm,{className:"h-3.5 w-3.5"}):f.jsx(Tk,{className:"h-3.5 w-3.5"}),f.jsx("span",{className:"hidden md:inline",children:w?"Plan":"Implement"}),f.jsx("span",{className:"md:hidden",children:w?"Plan":"Impl"})]}),triggerClassName:w?"text-blue-400 dark:text-blue-300":void 0,children:Z=>f.jsxs(f.Fragment,{children:[f.jsx(Ir,{onClick:()=>{S(!1),Z()},selected:!w,icon:f.jsx(Tk,{className:"h-4 w-4 text-muted-foreground"}),label:"Implement",description:"Start execution"}),f.jsx(Ir,{onClick:()=>{S(!0),Z()},selected:w,icon:f.jsx(mm,{className:"h-4 w-4 text-muted-foreground"}),label:"Plan",description:"Review a plan before execution"})]})}):null]})})}const xp=({children:e,className:t,shimmerWidth:n=100,animate:r=!0,...s})=>f.jsx("span",{style:{"--shiny-width":`${Math.min(n,100)}px`},className:me("mx-auto max-w-md text-foreground/50",r?["animate-shiny-text [background-size:var(--shiny-width)_100%] bg-clip-text [background-position:0_0] bg-no-repeat [transition:background-position_1s_cubic-bezier(.6,.6,0,1)_infinite]","bg-gradient-to-r from-transparent via-black/80 via-50% to-transparent dark:via-white/80"]:["text-neutral"],t),...s,children:e});function zb(e){return e.split(/[\s_-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const L7=[/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(['"])([\s\S]*)\1$/,/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(.+)$/,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(.+)$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(.+)$/i];function z7(e){const t=e.trim();for(const n of L7){const r=t.match(n);if(!r)continue;const s=(r[2]??r[1]??"").trim();if(s)return s}return t}function km(e){return e.split("/").pop()||e}function P7(e,t){if(e===void 0)return null;const n=Math.max(0,t-e),r=6e4,s=60*r,a=24*s,l=7*a;return n<r?"now":n<s?`${Math.floor(n/r)}m`:n<a?`${Math.floor(n/s)}h`:n<l?`${Math.floor(n/a)}d`:`${Math.floor(n/l)}w`}const B7='button, select, input, textarea, [role="combobox"], [role="listbox"], [data-no-touch-drag]';function e2(e){var t;try{(t=navigator.vibrate)==null||t.call(navigator,e)}catch{}}function F0({enabled:e,visualElementRef:t,onTap:n,onContextMenu:r,onDragStart:s,onDragMove:a,onDragEnd:l,holdDelay:u=300,contextMenuDelay:h=2500,scrollThreshold:d=8,dragMoveThreshold:g=5}){const[p,v]=_.useState(!1),[y,w]=_.useState(!1),[S,C]=_.useState(null),[k,R]=_.useState(null),E=_.useCallback(O=>{R(O)},[]),N=_.useRef("idle"),j=_.useRef({x:0,y:0}),D=_.useRef(null),L=_.useRef(null),U=_.useRef(n),Y=_.useRef(r),P=_.useRef(s),V=_.useRef(a),I=_.useRef(l);U.current=n,Y.current=r,P.current=s,V.current=a,I.current=l;const W=_.useCallback((O,F)=>{const H=(t==null?void 0:t.current)??k;if(!H)return document.elementFromPoint(O,F);const $=H.style.pointerEvents;H.style.pointerEvents="none";const M=document.elementFromPoint(O,F);return H.style.pointerEvents=$,M},[t,k]),K=_.useCallback(()=>{D.current&&(clearTimeout(D.current),D.current=null),L.current&&(clearTimeout(L.current),L.current=null)},[]),q=_.useCallback(()=>{K(),N.current="idle",w(!1),v(!1),C(null)},[K]);return _.useEffect(()=>{if(!k||!e)return;const O=M=>{if(M.target.closest(B7))return;const B=M.touches[0];B&&(j.current={x:B.clientX,y:B.clientY},N.current="holding",D.current=setTimeout(()=>{D.current=null,N.current==="holding"&&(N.current="armed",w(!0),e2(30),L.current=setTimeout(()=>{var A;if(L.current=null,N.current!=="armed")return;e2(100);const X={...j.current};N.current="idle",w(!1),(A=Y.current)==null||A.call(Y,X)},h))},u))},F=M=>{var Z,te;const B=N.current;if(B==="idle")return;const X=M.touches[0];if(!X)return;const A=X.clientX-j.current.x,re=X.clientY-j.current.y,se=Math.sqrt(A*A+re*re);if(B==="holding"){se>d&&(K(),N.current="idle");return}if(B==="armed"){se>g&&(L.current&&(clearTimeout(L.current),L.current=null),N.current="dragging",w(!1),v(!0),C({x:X.clientX,y:X.clientY}),M.preventDefault(),(Z=P.current)==null||Z.call(P,{x:X.clientX,y:X.clientY}));return}if(B==="dragging"){M.preventDefault(),C({x:X.clientX,y:X.clientY});const le=W(X.clientX,X.clientY);(te=V.current)==null||te.call(V,{x:X.clientX,y:X.clientY,elementBelow:le})}},H=M=>{var X,A;const B=N.current;if(B==="holding"){K(),N.current="idle",w(!1),v(!1),M.preventDefault(),(X=U.current)==null||X.call(U);return}if(B==="armed"){q();return}if(B==="dragging"){const re=M.changedTouches[0];if(re){const se=W(re.clientX,re.clientY);(A=I.current)==null||A.call(I,{x:re.clientX,y:re.clientY,elementBelow:se})}q()}},$=()=>{var M;N.current==="dragging"&&((M=I.current)==null||M.call(I,{x:0,y:0,elementBelow:null})),q()};return k.addEventListener("touchstart",O,{passive:!1}),k.addEventListener("touchmove",F,{passive:!1}),k.addEventListener("touchend",H),k.addEventListener("touchcancel",$),()=>{k.removeEventListener("touchstart",O),k.removeEventListener("touchmove",F),k.removeEventListener("touchend",H),k.removeEventListener("touchcancel",$),K(),N.current="idle"}},[k,e,u,h,d,g,K,q,W]),{touchRef:E,isDragging:p,isArmed:y,dragPosition:S}}function MM({position:e,children:t,className:n}){return e?Hi.createPortal(f.jsx("div",{style:{position:"fixed",left:e.x,top:e.y,transform:"translate(-50%, calc(-100% - 14px))",zIndex:9999,pointerEvents:"none",willChange:"transform"},className:me("flex items-center gap-2 rounded-xl border-2 border-primary/60 bg-card px-3 py-2","shadow-[0_8px_32px_rgba(0,0,0,0.25)] dark:shadow-[0_8px_32px_rgba(0,0,0,0.5)]","min-w-[120px] max-w-[240px]","scale-[1.04]",n),children:t}),document.body):null}const I7=new Set(["starting","running"]);function H7({chat:e,activeChatId:t,nowMs:n,showProviderIcon:r=!1,isCompleted:s=!1,onSelectChat:a,onDeleteChat:l,draggable:u=!1,onDragStart:h,onDragEnd:d,isTouchDevice:g=!1,onTouchDragMove:p,onTouchDragEnd:v}){const y=P7(e.lastMessageAt,n),w=g&&u,S=e.provider?Cm[e.provider]:null,{touchRef:C,isArmed:k,isDragging:R,dragPosition:E}=F0({enabled:w,onTap:()=>a(e.chatId),onDragStart:()=>h==null?void 0:h(e),onDragMove:({x:N,y:j,elementBelow:D})=>p==null?void 0:p(N,j,D),onDragEnd:({x:N,y:j,elementBelow:D})=>{v==null||v(N,j,D),d==null||d()}});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{ref:w?C:void 0,"data-chat-id":hk(e.chatId),className:me("group flex items-center gap-2 pl-2.5 pr-0.5 py-0.5 rounded-lg cursor-pointer border transition-all duration-150 select-none",t===hk(e.chatId)?"bg-muted hover:bg-muted border-border":"border-border/0 hover:border-border hover:bg-muted/20 dark:hover:border-slate-400/10",k&&"scale-[1.03] shadow-md ring-2 ring-primary/50 bg-card border-primary/40",R&&!k&&"opacity-20 scale-[0.98]"),draggable:u&&!g,onDragStart:u&&!g?()=>h==null?void 0:h(e):void 0,onDragEnd:u&&!g?d:void 0,onClick:g?void 0:()=>a(e.chatId),children:[I7.has(e.status)?f.jsx(oi,{className:"size-3.5 flex-shrink-0 animate-spin text-muted-foreground"}):e.status==="waiting_for_user"?f.jsx("div",{className:"relative",children:f.jsxs("div",{className:"rounded-full z-0 size-3.5 flex items-center justify-center",children:[f.jsx("div",{className:"absolute rounded-full z-0 size-2.5 bg-blue-400/80 animate-ping"}),f.jsx("div",{className:"rounded-full z-0 size-2.5 bg-blue-400 ring-2 ring-muted/20 dark:ring-muted/50"})]})}):s?f.jsx("div",{className:"relative",children:f.jsxs("div",{className:"rounded-full z-0 size-3.5 flex items-center justify-center",children:[f.jsx("div",{className:"absolute rounded-full z-0 size-2.5 bg-emerald-400/80 animate-ping"}),f.jsx("div",{className:"rounded-full z-0 size-2.5 bg-emerald-400 ring-2 ring-muted/20 dark:ring-muted/50"})]})}):null,r&&S?f.jsx(S,{className:"size-3.5 flex-shrink-0 text-muted-foreground/80","aria-label":`${e.provider} provider`}):null,f.jsx("span",{className:"text-sm truncate flex-1 translate-y-[-0.5px]",children:e.status!=="idle"&&e.status!=="waiting_for_user"?f.jsx(xp,{animate:e.status==="running",shimmerWidth:Math.max(20,e.title.length*3),children:e.title}):e.title}),f.jsxs("div",{className:"relative h-7 w-7 mr-[2px] shrink-0",children:[y?f.jsx("span",{className:"hidden md:flex absolute inset-0 items-center justify-end pr-1 text-[11px] text-muted-foreground opacity-50 transition-opacity group-hover:opacity-0",children:y}):null,f.jsx(tt,{variant:"ghost",size:"icon",className:me("absolute inset-0 h-7 w-7 opacity-100 cursor-pointer rounded-sm hover:!bg-transparent !border-0",y?"md:opacity-0 md:group-hover:opacity-100":"opacity-100 md:opacity-0 md:group-hover:opacity-100"),"data-no-touch-drag":!0,onClick:N=>{N.stopPropagation(),l(e.chatId)},title:"Delete chat",children:f.jsx(h6,{className:"size-3.5"})})]})]},e._id),f.jsx(MM,{position:E,children:f.jsx("span",{className:"text-sm font-medium truncate",children:e.title})})]})}function F7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>r=>{t.forEach(s=>s(r))},t)}const wp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Sc(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function U0(e){return"nodeType"in e}function Wr(e){var t,n;return e?Sc(e)?e:U0(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function $0(e){const{Document:t}=Wr(e);return e instanceof t}function Md(e){return Sc(e)?!1:e instanceof Wr(e).HTMLElement}function AM(e){return e instanceof Wr(e).SVGElement}function Cc(e){return e?Sc(e)?e.document:U0(e)?$0(e)?e:Md(e)||AM(e)?e.ownerDocument:document:document:document}const _s=wp?_.useLayoutEffect:_.useEffect;function W0(e){const t=_.useRef(e);return _s(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function U7(){const e=_.useRef(null),t=_.useCallback((r,s)=>{e.current=setInterval(r,s)},[]),n=_.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function ld(e,t){t===void 0&&(t=[e]);const n=_.useRef(e);return _s(()=>{n.current!==e&&(n.current=e)},t),n}function Ad(e,t){const n=_.useRef();return _.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Em(e){const t=W0(e),n=_.useRef(null),r=_.useCallback(s=>{s!==n.current&&(t==null||t(s,n.current)),n.current=s},[]);return[n,r]}function Pb(e){const t=_.useRef();return _.useEffect(()=>{t.current=e},[e]),t.current}let b_={};function Dd(e,t){return _.useMemo(()=>{if(t)return t;const n=b_[e]==null?0:b_[e]+1;return b_[e]=n,e+"-"+n},[e,t])}function DM(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((a,l)=>{const u=Object.entries(l);for(const[h,d]of u){const g=a[h];g!=null&&(a[h]=g+e*d)}return a},{...t})}}const ic=DM(1),Rm=DM(-1);function $7(e){return"clientX"in e&&"clientY"in e}function V0(e){if(!e)return!1;const{KeyboardEvent:t}=Wr(e.target);return t&&e instanceof t}function W7(e){if(!e)return!1;const{TouchEvent:t}=Wr(e.target);return t&&e instanceof t}function Bb(e){if(W7(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return $7(e)?{x:e.clientX,y:e.clientY}:null}const cd=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[cd.Translate.toString(e),cd.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),t2="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function V7(e){return e.matches(t2)?e:e.querySelector(t2)}const q7={display:"none"};function K7(e){let{id:t,value:n}=e;return ye.createElement("div",{id:t,style:q7},n)}function G7(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ye.createElement("div",{id:t,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function Y7(){const[e,t]=_.useState("");return{announce:_.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const jM=_.createContext(null);function X7(e){const t=_.useContext(jM);_.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Z7(){const[e]=_.useState(()=>new Set),t=_.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[_.useCallback(r=>{let{type:s,event:a}=r;e.forEach(l=>{var u;return(u=l[s])==null?void 0:u.call(l,a)})},[e]),t]}const Q7={draggable:`
|
|
465
465
|
To pick up a draggable item, press the space bar.
|
|
466
466
|
While dragging, use the arrow keys to move the item.
|
|
467
467
|
Press space again to drop the item in its new position, or press escape to cancel.
|
package/dist/client/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<link rel="apple-touch-icon" href="/app-icon-180.png" />
|
|
14
14
|
<link rel="manifest" id="app-manifest" href="/manifest.webmanifest?v=20260330" />
|
|
15
15
|
<title>Kaizen</title>
|
|
16
|
-
<script type="module" crossorigin src="/assets/index-
|
|
16
|
+
<script type="module" crossorigin src="/assets/index-BI5hJ6Xa.js"></script>
|
|
17
17
|
<link rel="stylesheet" crossorigin href="/assets/index-BJ10I6WX.css">
|
|
18
18
|
</head>
|
|
19
19
|
<body>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kaizenai",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"description": "Local web UI for coding agents",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
@@ -31,10 +31,6 @@
|
|
|
31
31
|
},
|
|
32
32
|
"packageManager": "bun@1.3.5",
|
|
33
33
|
"files": [
|
|
34
|
-
"assets/icon.png",
|
|
35
|
-
"assets/icon.svg",
|
|
36
|
-
"assets/screenshot.png",
|
|
37
|
-
"assets/screenshot-light.png",
|
|
38
34
|
"bin/",
|
|
39
35
|
"src/server/**/*.ts",
|
|
40
36
|
"!src/server/**/*.test.ts",
|
package/assets/icon.png
DELETED
|
Binary file
|
package/assets/icon.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="131" zoomAndPan="magnify" viewBox="0 0 98.25 110.999996" height="148" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="a6434bcabb"><path d="M 4.949219 2.914062 L 23.035156 2.914062 L 23.035156 66.925781 L 4.949219 66.925781 Z M 4.949219 2.914062 " clip-rule="nonzero"/></clipPath><clipPath id="f38a174fbe"><path d="M 6.4375 2.914062 L 21.546875 2.914062 C 22.371094 2.914062 23.035156 3.582031 23.035156 4.402344 L 23.035156 65.378906 C 23.035156 66.199219 22.371094 66.867188 21.546875 66.867188 L 6.4375 66.867188 C 5.617188 66.867188 4.949219 66.199219 4.949219 65.378906 L 4.949219 4.402344 C 4.949219 3.582031 5.617188 2.914062 6.4375 2.914062 Z M 6.4375 2.914062 " clip-rule="nonzero"/></clipPath><clipPath id="2f9a762088"><path d="M 0.949219 0.914062 L 19.035156 0.914062 L 19.035156 64.875 L 0.949219 64.875 Z M 0.949219 0.914062 " clip-rule="nonzero"/></clipPath><clipPath id="57da176352"><path d="M 2.4375 0.914062 L 17.546875 0.914062 C 18.371094 0.914062 19.035156 1.582031 19.035156 2.402344 L 19.035156 63.378906 C 19.035156 64.199219 18.371094 64.867188 17.546875 64.867188 L 2.4375 64.867188 C 1.617188 64.867188 0.949219 64.199219 0.949219 63.378906 L 0.949219 2.402344 C 0.949219 1.582031 1.617188 0.914062 2.4375 0.914062 Z M 2.4375 0.914062 " clip-rule="nonzero"/></clipPath><clipPath id="5f618c6616"><rect x="0" width="20" y="0" height="65"/></clipPath><clipPath id="b8b1a1fe42"><path d="M 26.238281 46.367188 L 52.355469 46.367188 L 52.355469 64.632812 L 26.238281 64.632812 Z M 26.238281 46.367188 " clip-rule="nonzero"/></clipPath><clipPath id="9c7d06bbac"><path d="M 27.726562 46.367188 L 50.835938 46.367188 C 51.660156 46.367188 52.324219 47.03125 52.324219 47.855469 L 52.324219 63.144531 C 52.324219 63.96875 51.660156 64.632812 50.835938 64.632812 L 27.726562 64.632812 C 26.902344 64.632812 26.238281 63.96875 26.238281 63.144531 L 26.238281 47.855469 C 26.238281 47.03125 26.902344 46.367188 27.726562 46.367188 Z M 27.726562 46.367188 " clip-rule="nonzero"/></clipPath><clipPath id="dd3273c87e"><path d="M 0.238281 0.367188 L 26.355469 0.367188 L 26.355469 18.632812 L 0.238281 18.632812 Z M 0.238281 0.367188 " clip-rule="nonzero"/></clipPath><clipPath id="d7d6943e7d"><path d="M 1.726562 0.367188 L 24.835938 0.367188 C 25.660156 0.367188 26.324219 1.03125 26.324219 1.855469 L 26.324219 17.144531 C 26.324219 17.96875 25.660156 18.632812 24.835938 18.632812 L 1.726562 18.632812 C 0.902344 18.632812 0.238281 17.96875 0.238281 17.144531 L 0.238281 1.855469 C 0.238281 1.03125 0.902344 0.367188 1.726562 0.367188 Z M 1.726562 0.367188 " clip-rule="nonzero"/></clipPath><clipPath id="dccb05b803"><rect x="0" width="27" y="0" height="19"/></clipPath><clipPath id="4a6dfd1cfa"><path d="M 44.101562 66.867188 L 70.21875 66.867188 L 70.21875 85.136719 L 44.101562 85.136719 Z M 44.101562 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d68c17fb59"><path d="M 48.566406 66.867188 L 65.722656 66.867188 C 68.191406 66.867188 70.1875 68.867188 70.1875 71.332031 L 70.1875 80.671875 C 70.1875 83.136719 68.191406 85.136719 65.722656 85.136719 L 48.566406 85.136719 C 46.101562 85.136719 44.101562 83.136719 44.101562 80.671875 L 44.101562 71.332031 C 44.101562 68.867188 46.101562 66.867188 48.566406 66.867188 Z M 48.566406 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d91aa65f6f"><path d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="7874e4c1c8"><path d="M 4.566406 0.867188 L 21.722656 0.867188 C 24.191406 0.867188 26.1875 2.867188 26.1875 5.332031 L 26.1875 14.671875 C 26.1875 17.136719 24.191406 19.136719 21.722656 19.136719 L 4.566406 19.136719 C 2.101562 19.136719 0.101562 17.136719 0.101562 14.671875 L 0.101562 5.332031 C 0.101562 2.867188 2.101562 0.867188 4.566406 0.867188 Z M 4.566406 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="9ce9990e41"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="5053d98786"><path d="M 44.101562 66.867188 L 70.21875 66.867188 L 70.21875 85.136719 L 44.101562 85.136719 Z M 44.101562 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="d39cc34eab"><path d="M 45.589844 66.867188 L 68.699219 66.867188 C 69.523438 66.867188 70.1875 67.535156 70.1875 68.355469 L 70.1875 83.648438 C 70.1875 84.46875 69.523438 85.136719 68.699219 85.136719 L 45.589844 85.136719 C 44.765625 85.136719 44.101562 84.46875 44.101562 83.648438 L 44.101562 68.355469 C 44.101562 67.535156 44.765625 66.867188 45.589844 66.867188 Z M 45.589844 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="7548939ec4"><path d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="e6d65400ef"><path d="M 1.589844 0.867188 L 24.699219 0.867188 C 25.523438 0.867188 26.1875 1.535156 26.1875 2.355469 L 26.1875 17.648438 C 26.1875 18.46875 25.523438 19.136719 24.699219 19.136719 L 1.589844 19.136719 C 0.765625 19.136719 0.101562 18.46875 0.101562 17.648438 L 0.101562 2.355469 C 0.101562 1.535156 0.765625 0.867188 1.589844 0.867188 Z M 1.589844 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="b8a14b9041"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="0e9cc5dcf0"><path d="M 61.667969 87.371094 L 87.785156 87.371094 L 87.785156 105.640625 L 61.667969 105.640625 Z M 61.667969 87.371094 " clip-rule="nonzero"/></clipPath><clipPath id="9aadc974f5"><path d="M 63.15625 87.371094 L 86.265625 87.371094 C 87.089844 87.371094 87.753906 88.035156 87.753906 88.859375 L 87.753906 104.152344 C 87.753906 104.972656 87.089844 105.640625 86.265625 105.640625 L 63.15625 105.640625 C 62.332031 105.640625 61.667969 104.972656 61.667969 104.152344 L 61.667969 88.859375 C 61.667969 88.035156 62.332031 87.371094 63.15625 87.371094 Z M 63.15625 87.371094 " clip-rule="nonzero"/></clipPath><clipPath id="08901b7c70"><path d="M 0.667969 0.371094 L 26.785156 0.371094 L 26.785156 18.640625 L 0.667969 18.640625 Z M 0.667969 0.371094 " clip-rule="nonzero"/></clipPath><clipPath id="17b30e43d9"><path d="M 2.15625 0.371094 L 25.265625 0.371094 C 26.089844 0.371094 26.753906 1.035156 26.753906 1.859375 L 26.753906 17.152344 C 26.753906 17.972656 26.089844 18.640625 25.265625 18.640625 L 2.15625 18.640625 C 1.332031 18.640625 0.667969 17.972656 0.667969 17.152344 L 0.667969 1.859375 C 0.667969 1.035156 1.332031 0.371094 2.15625 0.371094 Z M 2.15625 0.371094 " clip-rule="nonzero"/></clipPath><clipPath id="191fb42ae4"><rect x="0" width="27" y="0" height="19"/></clipPath><clipPath id="30d9207845"><path d="M 4.949219 60.460938 L 23.035156 60.460938 L 23.035156 100.828125 L 4.949219 100.828125 Z M 4.949219 60.460938 " clip-rule="nonzero"/></clipPath><clipPath id="52d8b1d0c8"><path d="M 0.949219 0.460938 L 19.035156 0.460938 L 19.035156 40.828125 L 0.949219 40.828125 Z M 0.949219 0.460938 " clip-rule="nonzero"/></clipPath><clipPath id="82dec45cec"><rect x="0" width="20" y="0" height="41"/></clipPath><clipPath id="9b56f823bb"><path d="M 4.949219 66.867188 L 23.035156 66.867188 L 23.035156 107.28125 L 4.949219 107.28125 Z M 4.949219 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="64a8e0ecf4"><path d="M 6.4375 66.867188 L 21.546875 66.867188 C 22.371094 66.867188 23.035156 67.535156 23.035156 68.355469 L 23.035156 105.75 C 23.035156 106.570312 22.371094 107.238281 21.546875 107.238281 L 6.4375 107.238281 C 5.617188 107.238281 4.949219 106.570312 4.949219 105.75 L 4.949219 68.355469 C 4.949219 67.535156 5.617188 66.867188 6.4375 66.867188 Z M 6.4375 66.867188 " clip-rule="nonzero"/></clipPath><clipPath id="e46f782b3b"><path d="M 0.949219 0.867188 L 19.035156 0.867188 L 19.035156 41.28125 L 0.949219 41.28125 Z M 0.949219 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="2d24d09008"><path d="M 2.4375 0.867188 L 17.546875 0.867188 C 18.371094 0.867188 19.035156 1.535156 19.035156 2.355469 L 19.035156 39.75 C 19.035156 40.570312 18.371094 41.238281 17.546875 41.238281 L 2.4375 41.238281 C 1.617188 41.238281 0.949219 40.570312 0.949219 39.75 L 0.949219 2.355469 C 0.949219 1.535156 1.617188 0.867188 2.4375 0.867188 Z M 2.4375 0.867188 " clip-rule="nonzero"/></clipPath><clipPath id="c16e5f8d8b"><rect x="0" width="20" y="0" height="42"/></clipPath><clipPath id="67ec189edb"><path d="M 44.101562 25.863281 L 70.21875 25.863281 L 70.21875 44.132812 L 44.101562 44.132812 Z M 44.101562 25.863281 " clip-rule="nonzero"/></clipPath><clipPath id="9e2c9eb0c8"><path d="M 45.589844 25.863281 L 68.699219 25.863281 C 69.523438 25.863281 70.1875 26.53125 70.1875 27.351562 L 70.1875 42.644531 C 70.1875 43.464844 69.523438 44.132812 68.699219 44.132812 L 45.589844 44.132812 C 44.765625 44.132812 44.101562 43.464844 44.101562 42.644531 L 44.101562 27.351562 C 44.101562 26.53125 44.765625 25.863281 45.589844 25.863281 Z M 45.589844 25.863281 " clip-rule="nonzero"/></clipPath><clipPath id="cfc84f52c9"><path d="M 0.101562 0.863281 L 26.21875 0.863281 L 26.21875 19.132812 L 0.101562 19.132812 Z M 0.101562 0.863281 " clip-rule="nonzero"/></clipPath><clipPath id="fc947c88aa"><path d="M 1.589844 0.863281 L 24.699219 0.863281 C 25.523438 0.863281 26.1875 1.53125 26.1875 2.351562 L 26.1875 17.644531 C 26.1875 18.464844 25.523438 19.132812 24.699219 19.132812 L 1.589844 19.132812 C 0.765625 19.132812 0.101562 18.464844 0.101562 17.644531 L 0.101562 2.351562 C 0.101562 1.53125 0.765625 0.863281 1.589844 0.863281 Z M 1.589844 0.863281 " clip-rule="nonzero"/></clipPath><clipPath id="18b158d824"><rect x="0" width="27" y="0" height="20"/></clipPath><clipPath id="8b52c897d1"><path d="M 61.667969 5.359375 L 87.785156 5.359375 L 87.785156 23.628906 L 61.667969 23.628906 Z M 61.667969 5.359375 " clip-rule="nonzero"/></clipPath><clipPath id="a669865345"><path d="M 63.15625 5.359375 L 86.265625 5.359375 C 87.089844 5.359375 87.753906 6.027344 87.753906 6.847656 L 87.753906 22.140625 C 87.753906 22.964844 87.089844 23.628906 86.265625 23.628906 L 63.15625 23.628906 C 62.332031 23.628906 61.667969 22.964844 61.667969 22.140625 L 61.667969 6.847656 C 61.667969 6.027344 62.332031 5.359375 63.15625 5.359375 Z M 63.15625 5.359375 " clip-rule="nonzero"/></clipPath><clipPath id="20a0ea2a1b"><path d="M 0.667969 0.359375 L 26.785156 0.359375 L 26.785156 18.628906 L 0.667969 18.628906 Z M 0.667969 0.359375 " clip-rule="nonzero"/></clipPath><clipPath id="ffec020ed9"><path d="M 2.15625 0.359375 L 25.265625 0.359375 C 26.089844 0.359375 26.753906 1.027344 26.753906 1.847656 L 26.753906 17.140625 C 26.753906 17.964844 26.089844 18.628906 25.265625 18.628906 L 2.15625 18.628906 C 1.332031 18.628906 0.667969 17.964844 0.667969 17.140625 L 0.667969 1.847656 C 0.667969 1.027344 1.332031 0.359375 2.15625 0.359375 Z M 2.15625 0.359375 " clip-rule="nonzero"/></clipPath><clipPath id="926de771c0"><rect x="0" width="27" y="0" height="19"/></clipPath></defs><g clip-path="url(#a6434bcabb)"><g clip-path="url(#f38a174fbe)"><g transform="matrix(1, 0, 0, 1, 4, 2)"><g clip-path="url(#5f618c6616)"><g clip-path="url(#2f9a762088)"><g clip-path="url(#57da176352)"><path fill="#84bcb8" d="M 0.949219 0.914062 L 19.035156 0.914062 L 19.035156 64.855469 L 0.949219 64.855469 Z M 0.949219 0.914062 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#b8b1a1fe42)"><g clip-path="url(#9c7d06bbac)"><g transform="matrix(1, 0, 0, 1, 26, 46)"><g clip-path="url(#dccb05b803)"><g clip-path="url(#dd3273c87e)"><g clip-path="url(#d7d6943e7d)"><path fill="#84bcb8" d="M 0.238281 0.367188 L 26.355469 0.367188 L 26.355469 18.632812 L 0.238281 18.632812 Z M 0.238281 0.367188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#4a6dfd1cfa)"><g clip-path="url(#d68c17fb59)"><g transform="matrix(1, 0, 0, 1, 44, 66)"><g clip-path="url(#9ce9990e41)"><g clip-path="url(#d91aa65f6f)"><g clip-path="url(#7874e4c1c8)"><path fill="#84bcb8" d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#5053d98786)"><g clip-path="url(#d39cc34eab)"><g transform="matrix(1, 0, 0, 1, 44, 66)"><g clip-path="url(#b8a14b9041)"><g clip-path="url(#7548939ec4)"><g clip-path="url(#e6d65400ef)"><path fill="#4a7870" d="M 0.101562 0.867188 L 26.21875 0.867188 L 26.21875 19.136719 L 0.101562 19.136719 Z M 0.101562 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#0e9cc5dcf0)"><g clip-path="url(#9aadc974f5)"><g transform="matrix(1, 0, 0, 1, 61, 87)"><g clip-path="url(#191fb42ae4)"><g clip-path="url(#08901b7c70)"><g clip-path="url(#17b30e43d9)"><path fill="#4a7870" d="M 0.667969 0.371094 L 26.785156 0.371094 L 26.785156 18.640625 L 0.667969 18.640625 Z M 0.667969 0.371094 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#30d9207845)"><g transform="matrix(1, 0, 0, 1, 4, 60)"><g clip-path="url(#82dec45cec)"><g clip-path="url(#52d8b1d0c8)"><path fill="#4a7870" d="M 0.949219 0.460938 L 19.035156 0.460938 L 19.035156 40.800781 L 0.949219 40.800781 Z M 0.949219 0.460938 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g><g clip-path="url(#9b56f823bb)"><g clip-path="url(#64a8e0ecf4)"><g transform="matrix(1, 0, 0, 1, 4, 66)"><g clip-path="url(#c16e5f8d8b)"><g clip-path="url(#e46f782b3b)"><g clip-path="url(#2d24d09008)"><path fill="#4a7870" d="M 0.949219 0.867188 L 19.035156 0.867188 L 19.035156 41.210938 L 0.949219 41.210938 Z M 0.949219 0.867188 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#67ec189edb)"><g clip-path="url(#9e2c9eb0c8)"><g transform="matrix(1, 0, 0, 1, 44, 25)"><g clip-path="url(#18b158d824)"><g clip-path="url(#cfc84f52c9)"><g clip-path="url(#fc947c88aa)"><path fill="#84bcb8" d="M 0.101562 0.863281 L 26.21875 0.863281 L 26.21875 19.132812 L 0.101562 19.132812 Z M 0.101562 0.863281 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g><g clip-path="url(#8b52c897d1)"><g clip-path="url(#a669865345)"><g transform="matrix(1, 0, 0, 1, 61, 5)"><g clip-path="url(#926de771c0)"><g clip-path="url(#20a0ea2a1b)"><g clip-path="url(#ffec020ed9)"><path fill="#84bcb8" d="M 0.667969 0.359375 L 26.785156 0.359375 L 26.785156 18.628906 L 0.667969 18.628906 Z M 0.667969 0.359375 " fill-opacity="1" fill-rule="nonzero"/></g></g></g></g></g></g></svg>
|
|
Binary file
|
package/assets/screenshot.png
DELETED
|
Binary file
|