@wjarka/cezarion 0.14.2-pr403.638 → 0.14.2-pr403.642

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.
Files changed (33) hide show
  1. package/dist/server/server.d.ts +58 -58
  2. package/package.json +3 -3
  3. package/web/dist/assets/{agent-accounts-lH0uqc5U.js → agent-accounts-BxBsIXGa.js} +1 -1
  4. package/web/dist/assets/alert-dialog-BOp2HnnL.js +43 -0
  5. package/web/dist/assets/{collapsible-DuhzznQs.js → collapsible-bb0csfMs.js} +1 -1
  6. package/web/dist/assets/{commit-list-MD8C46Eb.js → commit-list-D4K8XC2O.js} +1 -1
  7. package/web/dist/assets/{compare-variants-DSEVnpAG.js → compare-variants-BU2WMK3F.js} +1 -1
  8. package/web/dist/assets/{diff-controls-Cz_oKS6S.js → diff-controls-DaO836o4.js} +1 -1
  9. package/web/dist/assets/{dropdown-menu-DRsTa4Jc.js → dropdown-menu-DAmCVaLJ.js} +1 -1
  10. package/web/dist/assets/{git-toolbar-B5I5F0B6.js → git-toolbar-rk3doc2w.js} +1 -1
  11. package/web/dist/assets/{github-BaES4ISu.js → github-Dyl0KAjI.js} +1 -1
  12. package/web/dist/assets/{index-JL0OPK_b.js → index-dLpvgRdd.js} +3 -3
  13. package/web/dist/assets/{markdown-DY-rA5uY.js → markdown-Ir62-VMS.js} +1 -1
  14. package/web/dist/assets/{pill-_Wk1VfdB.js → pill-Dvvq0Otw.js} +1 -1
  15. package/web/dist/assets/{project-router-Cb5YDX_u.js → project-router-CvFAMDcP.js} +1 -1
  16. package/web/dist/assets/{prompt-templates-B1hqHiqw.js → prompt-templates-BGGpAIzb.js} +1 -1
  17. package/web/dist/assets/{repo-git-DxX3HJBb.js → repo-git-gnFoxzNB.js} +1 -1
  18. package/web/dist/assets/{run-diff-BYpiBhK-.js → run-diff-DrQsmf3-.js} +1 -1
  19. package/web/dist/assets/run-header-D4kNXnnF.js +1 -0
  20. package/web/dist/assets/{skills-1oQ2Ta40.js → skills-Cz9q9FDi.js} +1 -1
  21. package/web/dist/assets/{tab-link-CIpL_y6a.js → tab-link-CkIV8ixq.js} +1 -1
  22. package/web/dist/assets/{task-changes-C-ORdeDF.js → task-changes-B4DhpZ2g.js} +1 -1
  23. package/web/dist/assets/{task-commits-BICWseAK.js → task-commits-Ch0miwrp.js} +1 -1
  24. package/web/dist/assets/{task-files-BdwZaRBf.js → task-files-C8u-pKAP.js} +1 -1
  25. package/web/dist/assets/task-thread-C0C35J3F.js +9 -0
  26. package/web/dist/assets/{textarea-D0TUpZFn.js → textarea-DfvlPIgO.js} +1 -1
  27. package/web/dist/assets/{thread-loading-DG-FuEXf.js → thread-loading-B9uTF0dX.js} +1 -1
  28. package/web/dist/assets/{token-metrics-KPNHIhUC.js → token-metrics-BLzFUb8F.js} +1 -1
  29. package/web/dist/assets/{workflows-BhSetBjb.js → workflows-RDzWdar1.js} +1 -1
  30. package/web/dist/index.html +11 -11
  31. package/web/dist/assets/alert-dialog-4-bC0tiB.js +0 -43
  32. package/web/dist/assets/run-header-C_G_7iro.js +0 -1
  33. package/web/dist/assets/task-thread-JNGouk4t.js +0 -9
@@ -3962,19 +3962,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
3962
3962
  } & {
3963
3963
  "/repo/commit/:sha": {
3964
3964
  $get: {
3965
- output: string;
3966
- outputFormat: "text";
3967
- status: import("hono/utils/http-status").ContentfulStatusCode;
3968
- input: {
3969
- query: {
3970
- structured?: string | undefined;
3971
- };
3972
- } & {
3973
- param: {
3974
- sha: string;
3975
- };
3976
- };
3977
- } | {
3978
3965
  output: {
3979
3966
  error: string;
3980
3967
  code?: "invalid_input" | undefined;
@@ -4038,6 +4025,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
4038
4025
  sha: string;
4039
4026
  };
4040
4027
  };
4028
+ } | {
4029
+ output: string;
4030
+ outputFormat: "text";
4031
+ status: import("hono/utils/http-status").ContentfulStatusCode;
4032
+ input: {
4033
+ query: {
4034
+ structured?: string | undefined;
4035
+ };
4036
+ } & {
4037
+ param: {
4038
+ sha: string;
4039
+ };
4040
+ };
4041
4041
  };
4042
4042
  };
4043
4043
  } & {
@@ -10098,20 +10098,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
10098
10098
  } & {
10099
10099
  "/runs/:id/handoff": {
10100
10100
  $get: {
10101
- output: string;
10102
- outputFormat: "text";
10103
- status: 200;
10101
+ output: {
10102
+ error: string;
10103
+ };
10104
+ outputFormat: "json";
10105
+ status: 404;
10104
10106
  input: {
10105
10107
  param: {
10106
10108
  id: string;
10107
10109
  };
10108
10110
  };
10109
10111
  } | {
10110
- output: {
10111
- error: string;
10112
- };
10113
- outputFormat: "json";
10114
- status: 404;
10112
+ output: string;
10113
+ outputFormat: "text";
10114
+ status: 200;
10115
10115
  input: {
10116
10116
  param: {
10117
10117
  id: string;
@@ -10149,20 +10149,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
10149
10149
  } & {
10150
10150
  "/runs/:id/diff": {
10151
10151
  $get: {
10152
- output: string;
10153
- outputFormat: "text";
10154
- status: import("hono/utils/http-status").ContentfulStatusCode;
10152
+ output: {
10153
+ error: string;
10154
+ };
10155
+ outputFormat: "json";
10156
+ status: 404;
10155
10157
  input: {
10156
10158
  param: {
10157
10159
  id: string;
10158
10160
  };
10159
10161
  };
10160
10162
  } | {
10161
- output: {
10162
- error: string;
10163
- };
10164
- outputFormat: "json";
10165
- status: 404;
10163
+ output: string;
10164
+ outputFormat: "text";
10165
+ status: import("hono/utils/http-status").ContentfulStatusCode;
10166
10166
  input: {
10167
10167
  param: {
10168
10168
  id: string;
@@ -12539,19 +12539,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
12539
12539
  } & {
12540
12540
  "/repo/commit/:sha": {
12541
12541
  $get: {
12542
- output: string;
12543
- outputFormat: "text";
12544
- status: import("hono/utils/http-status").ContentfulStatusCode;
12545
- input: {
12546
- query: {
12547
- structured?: string | undefined;
12548
- };
12549
- } & {
12550
- param: {
12551
- sha: string;
12552
- };
12553
- };
12554
- } | {
12555
12542
  output: {
12556
12543
  error: string;
12557
12544
  code?: "invalid_input" | undefined;
@@ -12615,6 +12602,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
12615
12602
  sha: string;
12616
12603
  };
12617
12604
  };
12605
+ } | {
12606
+ output: string;
12607
+ outputFormat: "text";
12608
+ status: import("hono/utils/http-status").ContentfulStatusCode;
12609
+ input: {
12610
+ query: {
12611
+ structured?: string | undefined;
12612
+ };
12613
+ } & {
12614
+ param: {
12615
+ sha: string;
12616
+ };
12617
+ };
12618
12618
  };
12619
12619
  };
12620
12620
  } & {
@@ -18675,20 +18675,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18675
18675
  } & {
18676
18676
  "/runs/:id/handoff": {
18677
18677
  $get: {
18678
- output: string;
18679
- outputFormat: "text";
18680
- status: 200;
18678
+ output: {
18679
+ error: string;
18680
+ };
18681
+ outputFormat: "json";
18682
+ status: 404;
18681
18683
  input: {
18682
18684
  param: {
18683
18685
  id: string;
18684
18686
  };
18685
18687
  };
18686
18688
  } | {
18687
- output: {
18688
- error: string;
18689
- };
18690
- outputFormat: "json";
18691
- status: 404;
18689
+ output: string;
18690
+ outputFormat: "text";
18691
+ status: 200;
18692
18692
  input: {
18693
18693
  param: {
18694
18694
  id: string;
@@ -18726,20 +18726,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18726
18726
  } & {
18727
18727
  "/runs/:id/diff": {
18728
18728
  $get: {
18729
- output: string;
18730
- outputFormat: "text";
18731
- status: import("hono/utils/http-status").ContentfulStatusCode;
18729
+ output: {
18730
+ error: string;
18731
+ };
18732
+ outputFormat: "json";
18733
+ status: 404;
18732
18734
  input: {
18733
18735
  param: {
18734
18736
  id: string;
18735
18737
  };
18736
18738
  };
18737
18739
  } | {
18738
- output: {
18739
- error: string;
18740
- };
18741
- outputFormat: "json";
18742
- status: 404;
18740
+ output: string;
18741
+ outputFormat: "text";
18742
+ status: import("hono/utils/http-status").ContentfulStatusCode;
18743
18743
  input: {
18744
18744
  param: {
18745
18745
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wjarka/cezarion",
3
- "version": "0.14.2-pr403.638",
3
+ "version": "0.14.2-pr403.642",
4
4
  "description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -50,8 +50,8 @@
50
50
  "zod": "^4.4.3"
51
51
  },
52
52
  "devDependencies": {
53
- "@open-mercato/cezar-api-client": "0.14.2-pr403.638",
54
- "@open-mercato/cezar-contract": "0.14.2-pr403.638",
53
+ "@open-mercato/cezar-api-client": "0.14.2-pr403.642",
54
+ "@open-mercato/cezar-contract": "0.14.2-pr403.642",
55
55
  "@types/node": "^20.14.0",
56
56
  "@types/ws": "^8.18.1",
57
57
  "esbuild": "^0.28.1",
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{C as r,D as i,I as a,Jn as o,M as s,N as c,O as l,S as u,T as d,b as f,j as p,k as m,un as h,w as g,x as _,z as v}from"./alert-dialog-4-bC0tiB.js";import{t as y}from"./utils-GZNjgma4.js";import{_ as b,g as x,h as ee,m as te,p as S}from"./dropdown-menu-DRsTa4Jc.js";var C=e(t(),1),w=n(),T=`Popover`,[E,ne]=s(T,[b]),D=b(),[O,k]=E(T),A=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:s=!1}=e,c=D(t),l=C.useRef(null),[u,d]=C.useState(!1),[f,p]=m({prop:r,defaultProp:a??!1,onChange:o,caller:T});return(0,w.jsx)(x,{...c,children:(0,w.jsx)(O,{scope:t,contentId:i(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:C.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:C.useCallback(()=>d(!0),[]),onCustomAnchorRemove:C.useCallback(()=>d(!1),[]),modal:s,children:n})})};A.displayName=T;var j=`PopoverAnchor`,M=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=k(j,n),a=D(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return C.useEffect(()=>(o(),()=>s()),[o,s]),(0,w.jsx)(S,{...a,...r,ref:t})});M.displayName=j;var N=`PopoverTrigger`,P=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=k(N,n),a=D(n),o=v(t,i.triggerRef),s=(0,w.jsx)(c.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":J(i.open),...r,ref:o,onClick:p(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,w.jsx)(S,{asChild:!0,...a,children:s})});P.displayName=N;var F=`PopoverPortal`,[re,I]=E(F,{forceMount:void 0}),L=e=>{let{__scopePopover:t,forceMount:n,children:i,container:a}=e,o=k(F,t);return(0,w.jsx)(re,{scope:t,forceMount:n,children:(0,w.jsx)(l,{present:n||o.open,children:(0,w.jsx)(r,{asChild:!0,container:a,children:i})})})};L.displayName=F;var R=`PopoverContent`,z=C.forwardRef((e,t)=>{let n=I(R,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=k(R,e.__scopePopover);return(0,w.jsx)(l,{present:r||a.open,children:a.modal?(0,w.jsx)(V,{...i,ref:t}):(0,w.jsx)(H,{...i,ref:t})})});z.displayName=R;var B=a(`PopoverContent.RemoveScroll`),V=C.forwardRef((e,t)=>{let n=k(R,e.__scopePopover),r=C.useRef(null),i=v(t,r),a=C.useRef(!1);return C.useEffect(()=>{let e=r.current;if(e)return f(e)},[]),(0,w.jsx)(_,{as:B,allowPinchZoom:!0,children:(0,w.jsx)(U,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:p(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:p(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:p(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),H=C.forwardRef((e,t)=>{let n=k(R,e.__scopePopover),r=C.useRef(!1),i=C.useRef(!1);return(0,w.jsx)(U,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),U=C.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:f,...p}=e,m=k(R,n),h=D(n);return u(),(0,w.jsx)(g,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(d,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>m.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,w.jsx)(ee,{"data-state":J(m.open),role:`dialog`,id:m.contentId,...h,...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)`}})})})}),W=`PopoverClose`,G=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=k(W,n);return(0,w.jsx)(c.button,{type:`button`,...r,ref:t,onClick:p(e.onClick,()=>i.onOpenChange(!1))})});G.displayName=W;var K=`PopoverArrow`,q=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=D(n);return(0,w.jsx)(te,{...i,...r,ref:t})});q.displayName=K;function J(e){return e?`open`:`closed`}var Y=A,X=M,Z=P,ie=L,ae=z;function Q(e){let t=e.visualViewport;return t?Math.max(0,Math.round(e.innerHeight-t.height-t.offsetTop)):0}function oe(e,t,n,r=250){let i=e.visualViewport;if(!i)return t(0),()=>{};let a,o=()=>{let i=Q(e);t(i),n&&(clearTimeout(a),a=setTimeout(()=>n(i),r))};return t(Q(e)),i.addEventListener(`resize`,o),i.addEventListener(`scroll`,o),()=>{clearTimeout(a),i.removeEventListener(`resize`,o),i.removeEventListener(`scroll`,o),t(0)}}function se(e){let t=e.visualViewport;return t?{top:Math.max(0,Math.round(t.offsetTop)),bottom:Q(e)}:{top:0,bottom:0}}function ce(e,t=0){let n=typeof t==`number`?{top:t,right:t,bottom:t,left:t}:t;return{top:(n.top??0)+e.top,right:n.right??0,bottom:(n.bottom??0)+e.bottom,left:n.left??0}}function le(e,t){let n=e.visualViewport;if(!n)return t({top:0,bottom:0}),()=>{};let r=()=>t(se(e));return r(),n.addEventListener(`resize`,r),n.addEventListener(`scroll`,r),()=>{n.removeEventListener(`resize`,r),n.removeEventListener(`scroll`,r)}}function ue(){let[e,t]=(0,C.useState)({top:0,bottom:0});return(0,C.useEffect)(()=>le(window,e=>t(t=>t.top===e.top&&t.bottom===e.bottom?t:e)),[]),e}function de(e){let t=(0,C.useRef)(e);t.current=e,(0,C.useEffect)(()=>{let e=document.documentElement;return oe(window,t=>e.style.setProperty(`--kb`,`${t}px`),e=>t.current?.(e))},[])}var $=C.createContext(null);function fe({...e}){let t=C.useRef(!1);return(0,w.jsx)($,{value:t,children:(0,w.jsx)(Y,{"data-slot":`popover`,...e})})}function pe({onPointerDownCapture:e,onKeyDownCapture:t,...n}){let r=C.useContext($);return(0,w.jsx)(Z,{"data-slot":`popover-trigger`,...n,onPointerDownCapture:t=>{r&&(r.current=t.pointerType===`touch`),e?.(t)},onKeyDownCapture:e=>{r&&(r.current=!1),t?.(e)}})}function me({className:e,align:t=`center`,sideOffset:n=4,collisionPadding:r,onOpenAutoFocus:i,...a}){let o=ue(),s=C.useContext($);return(0,w.jsx)(ie,{children:(0,w.jsx)(ae,{"data-slot":`popover-content`,align:t,sideOffset:n,onOpenAutoFocus:e=>{let t=s?.current;if(s&&(s.current=!1),i?.(e),e.defaultPrevented||!t)return;let n=e.target;n instanceof HTMLElement&&n.querySelector(`[cmdk-input]`)&&(e.preventDefault(),n.focus({preventScroll:!0}))},collisionPadding:ce(o,r),className:y(`z-50 w-72 max-w-(--radix-popover-content-available-width) [overflow-wrap:anywhere] origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...a})})}function he({...e}){return(0,w.jsx)(X,{"data-slot":`popover-anchor`,...e})}function ge(){let e=h(),t=o(),n=(e.data?.profiles??[]).map(e=>({provider:e.provider,id:e.id,label:e.label,configDir:e.configDir})),r=t.data?.info?.root;return{accounts:n,repoAccount:r?e.data?.selections?.[r]:void 0}}function _e(e,t){return e.filter(e=>e.provider===t).length>1}export{me as a,he as i,ge as n,pe as o,fe as r,de as s,_e as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{C as r,D as i,I as a,Jn as o,M as s,N as c,O as l,S as u,T as d,b as f,j as p,k as m,un as h,w as g,x as _,z as v}from"./alert-dialog-BOp2HnnL.js";import{t as y}from"./utils-GZNjgma4.js";import{_ as b,g as x,h as ee,m as te,p as S}from"./dropdown-menu-DAmCVaLJ.js";var C=e(t(),1),w=n(),T=`Popover`,[E,ne]=s(T,[b]),D=b(),[O,k]=E(T),A=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:s=!1}=e,c=D(t),l=C.useRef(null),[u,d]=C.useState(!1),[f,p]=m({prop:r,defaultProp:a??!1,onChange:o,caller:T});return(0,w.jsx)(x,{...c,children:(0,w.jsx)(O,{scope:t,contentId:i(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:C.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:u,onCustomAnchorAdd:C.useCallback(()=>d(!0),[]),onCustomAnchorRemove:C.useCallback(()=>d(!1),[]),modal:s,children:n})})};A.displayName=T;var j=`PopoverAnchor`,M=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=k(j,n),a=D(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return C.useEffect(()=>(o(),()=>s()),[o,s]),(0,w.jsx)(S,{...a,...r,ref:t})});M.displayName=j;var N=`PopoverTrigger`,P=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=k(N,n),a=D(n),o=v(t,i.triggerRef),s=(0,w.jsx)(c.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":J(i.open),...r,ref:o,onClick:p(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,w.jsx)(S,{asChild:!0,...a,children:s})});P.displayName=N;var F=`PopoverPortal`,[re,I]=E(F,{forceMount:void 0}),L=e=>{let{__scopePopover:t,forceMount:n,children:i,container:a}=e,o=k(F,t);return(0,w.jsx)(re,{scope:t,forceMount:n,children:(0,w.jsx)(l,{present:n||o.open,children:(0,w.jsx)(r,{asChild:!0,container:a,children:i})})})};L.displayName=F;var R=`PopoverContent`,z=C.forwardRef((e,t)=>{let n=I(R,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=k(R,e.__scopePopover);return(0,w.jsx)(l,{present:r||a.open,children:a.modal?(0,w.jsx)(V,{...i,ref:t}):(0,w.jsx)(H,{...i,ref:t})})});z.displayName=R;var B=a(`PopoverContent.RemoveScroll`),V=C.forwardRef((e,t)=>{let n=k(R,e.__scopePopover),r=C.useRef(null),i=v(t,r),a=C.useRef(!1);return C.useEffect(()=>{let e=r.current;if(e)return f(e)},[]),(0,w.jsx)(_,{as:B,allowPinchZoom:!0,children:(0,w.jsx)(U,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:p(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:p(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:p(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),H=C.forwardRef((e,t)=>{let n=k(R,e.__scopePopover),r=C.useRef(!1),i=C.useRef(!1);return(0,w.jsx)(U,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),U=C.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:f,...p}=e,m=k(R,n),h=D(n);return u(),(0,w.jsx)(g,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,w.jsx)(d,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>m.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,w.jsx)(ee,{"data-state":J(m.open),role:`dialog`,id:m.contentId,...h,...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)`}})})})}),W=`PopoverClose`,G=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=k(W,n);return(0,w.jsx)(c.button,{type:`button`,...r,ref:t,onClick:p(e.onClick,()=>i.onOpenChange(!1))})});G.displayName=W;var K=`PopoverArrow`,q=C.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=D(n);return(0,w.jsx)(te,{...i,...r,ref:t})});q.displayName=K;function J(e){return e?`open`:`closed`}var Y=A,X=M,Z=P,ie=L,ae=z;function Q(e){let t=e.visualViewport;return t?Math.max(0,Math.round(e.innerHeight-t.height-t.offsetTop)):0}function oe(e,t,n,r=250){let i=e.visualViewport;if(!i)return t(0),()=>{};let a,o=()=>{let i=Q(e);t(i),n&&(clearTimeout(a),a=setTimeout(()=>n(i),r))};return t(Q(e)),i.addEventListener(`resize`,o),i.addEventListener(`scroll`,o),()=>{clearTimeout(a),i.removeEventListener(`resize`,o),i.removeEventListener(`scroll`,o),t(0)}}function se(e){let t=e.visualViewport;return t?{top:Math.max(0,Math.round(t.offsetTop)),bottom:Q(e)}:{top:0,bottom:0}}function ce(e,t=0){let n=typeof t==`number`?{top:t,right:t,bottom:t,left:t}:t;return{top:(n.top??0)+e.top,right:n.right??0,bottom:(n.bottom??0)+e.bottom,left:n.left??0}}function le(e,t){let n=e.visualViewport;if(!n)return t({top:0,bottom:0}),()=>{};let r=()=>t(se(e));return r(),n.addEventListener(`resize`,r),n.addEventListener(`scroll`,r),()=>{n.removeEventListener(`resize`,r),n.removeEventListener(`scroll`,r)}}function ue(){let[e,t]=(0,C.useState)({top:0,bottom:0});return(0,C.useEffect)(()=>le(window,e=>t(t=>t.top===e.top&&t.bottom===e.bottom?t:e)),[]),e}function de(e){let t=(0,C.useRef)(e);t.current=e,(0,C.useEffect)(()=>{let e=document.documentElement;return oe(window,t=>e.style.setProperty(`--kb`,`${t}px`),e=>t.current?.(e))},[])}var $=C.createContext(null);function fe({...e}){let t=C.useRef(!1);return(0,w.jsx)($,{value:t,children:(0,w.jsx)(Y,{"data-slot":`popover`,...e})})}function pe({onPointerDownCapture:e,onKeyDownCapture:t,...n}){let r=C.useContext($);return(0,w.jsx)(Z,{"data-slot":`popover-trigger`,...n,onPointerDownCapture:t=>{r&&(r.current=t.pointerType===`touch`),e?.(t)},onKeyDownCapture:e=>{r&&(r.current=!1),t?.(e)}})}function me({className:e,align:t=`center`,sideOffset:n=4,collisionPadding:r,onOpenAutoFocus:i,...a}){let o=ue(),s=C.useContext($);return(0,w.jsx)(ie,{children:(0,w.jsx)(ae,{"data-slot":`popover-content`,align:t,sideOffset:n,onOpenAutoFocus:e=>{let t=s?.current;if(s&&(s.current=!1),i?.(e),e.defaultPrevented||!t)return;let n=e.target;n instanceof HTMLElement&&n.querySelector(`[cmdk-input]`)&&(e.preventDefault(),n.focus({preventScroll:!0}))},collisionPadding:ce(o,r),className:y(`z-50 w-72 max-w-(--radix-popover-content-available-width) [overflow-wrap:anywhere] origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...a})})}function he({...e}){return(0,w.jsx)(X,{"data-slot":`popover-anchor`,...e})}function ge(){let e=h(),t=o(),n=(e.data?.profiles??[]).map(e=>({provider:e.provider,id:e.id,label:e.label,configDir:e.configDir})),r=t.data?.info?.root;return{accounts:n,repoAccount:r?e.data?.selections?.[r]:void 0}}function _e(e,t){return e.filter(e=>e.provider===t).length>1}export{me as a,he as i,ge as n,pe as o,fe as r,de as s,_e as t};