@tickernelz/paperclip-pro-server 2026.928.0 → 2026.928.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/build-info.json +1 -1
  2. package/dist/routes/issues.d.ts.map +1 -1
  3. package/dist/routes/issues.js +19 -7
  4. package/dist/routes/issues.js.map +1 -1
  5. package/dist/routes/openapi.js +1 -1
  6. package/dist/routes/openapi.js.map +1 -1
  7. package/dist/services/adapter-config-schema.d.ts.map +1 -1
  8. package/dist/services/adapter-config-schema.js +32 -8
  9. package/dist/services/adapter-config-schema.js.map +1 -1
  10. package/dist/services/execution-workspaces.d.ts +6 -4
  11. package/dist/services/execution-workspaces.d.ts.map +1 -1
  12. package/dist/services/execution-workspaces.js +25 -4
  13. package/dist/services/execution-workspaces.js.map +1 -1
  14. package/dist/services/heartbeat.d.ts +9 -3
  15. package/dist/services/heartbeat.d.ts.map +1 -1
  16. package/dist/services/heartbeat.js +27 -3
  17. package/dist/services/heartbeat.js.map +1 -1
  18. package/dist/services/legacy-execution-recovery.d.ts.map +1 -1
  19. package/dist/services/legacy-execution-recovery.js +2 -1
  20. package/dist/services/legacy-execution-recovery.js.map +1 -1
  21. package/dist/services/steering-acknowledgements.d.ts +9 -0
  22. package/dist/services/steering-acknowledgements.d.ts.map +1 -0
  23. package/dist/services/steering-acknowledgements.js +25 -0
  24. package/dist/services/steering-acknowledgements.js.map +1 -0
  25. package/dist/services/task-watchdogs.d.ts +1 -1
  26. package/package.json +21 -21
  27. package/ui-dist/assets/{Agents.production-DWWgo4A7.js → Agents.production-jEVgGnQD.js} +2 -2
  28. package/ui-dist/assets/{CompanyActivity.production-DA1vWn15.js → CompanyActivity.production-D55CMhVL.js} +1 -1
  29. package/ui-dist/assets/{CompanyExport-B2fFD7mk.js → CompanyExport-BKFNfLEZ.js} +1 -1
  30. package/ui-dist/assets/{CompanySkills.production-CPTxTVTQ.js → CompanySkills.production-BAMuC3sl.js} +1 -1
  31. package/ui-dist/assets/{Costs.production-bu8MzAPR.js → Costs.production-BgKjdIvf.js} +1 -1
  32. package/ui-dist/assets/{MarkdownBody-D0eCfSWN.js → MarkdownBody-DJQ35hak.js} +1 -1
  33. package/ui-dist/assets/{MarkdownEditor-Pip4OXiJ.js → MarkdownEditor-DfrwLv1M.js} +1 -1
  34. package/ui-dist/assets/{OrgChart.production-BHlwZQTx.js → OrgChart.production-DB1AFxvf.js} +1 -1
  35. package/ui-dist/assets/{RoutineDetail.production-WBEY9g9e.js → RoutineDetail.production-2uUOMx6c.js} +1 -1
  36. package/ui-dist/assets/{RoutineRunVariablesDialog-IRX4TLng.js → RoutineRunVariablesDialog-Bt4KAWCh.js} +1 -1
  37. package/ui-dist/assets/{Routines.production-7tYNG689.js → Routines.production-Bc2tvohM.js} +1 -1
  38. package/ui-dist/assets/{checkbox-CmMbs2PZ.js → checkbox-757DLJRS.js} +1 -1
  39. package/ui-dist/assets/{definition-Dxm_TuVz.js → definition-CY8sfltb.js} +1 -1
  40. package/ui-dist/assets/{index-CZl9vxyj.js → index-Dgrf6BZM.js} +166 -166
  41. package/ui-dist/assets/index-J-4PQOv1.css +1 -0
  42. package/ui-dist/assets/{label-C2ddSDJj.js → label-BueB30Ch.js} +1 -1
  43. package/ui-dist/assets/{router-DyZkoSkG.js → router-Bb8nJWyv.js} +1 -1
  44. package/ui-dist/assets/{sheet-DeCxNmfl.js → sheet-CQJe5sfn.js} +1 -1
  45. package/ui-dist/index.html +9 -9
  46. package/ui-dist/sw.js +1 -1
  47. package/ui-dist/assets/index-GCNIGBzC.css +0 -1
@@ -1,4 +1,4 @@
1
- var Ot=Object.defineProperty;var i=(e,t)=>Ot(e,"name",{value:t,configurable:!0});import{i as Ie}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as Tt,Ir as jt,Lr as kt,S as M,l as At,t as Ge}from"./createLucideIcon-r3v6fbGz.js";import{Q as Ye}from"./mention-chips-DXumPrOR.js";import{X as Mt,Y as Ft,l as Lt}from"./zap-P-cXfK28.js";import{C as $t}from"./MarkdownEditor-Pip4OXiJ.js";import{a as Wt,c as Ut,o as zt,r as Kt,u as Bt}from"./checkbox-CmMbs2PZ.js";import{a as Vt,c as Ht,r as qt}from"./agents-BlSzFh-1.js";import{t as Gt}from"./check-DDiXDm2i.js";import{t as Yt}from"./button-CAPbz11u.js";var s=Ie(kt(),1),f=Ie(Tt(),1),Xt=Object.defineProperty,Qt=i((e,t)=>Xt(e,"name",{value:t,configurable:!0}),"__name"),Zt=s.forwardRef(Qt(i(function(t,n){return(0,f.jsx)(At.label,{...t,ref:n,onMouseDown:i(r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())},"onMouseDown")})},"Label2"),"Label")),Jt=Zt,en=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],tn=Ge("chevrons-up-down",en),nn=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Yr=Ge("play",nn),Ae=1,rn=.9,on=.8,sn=.17,ye=.1,Ee=.999,an=.9999,ln=.99,un=/[\\\/_+.#"@\[\(\{&]/,cn=/[\\\/_+.#"@\[\(\{&]/g,dn=/[\s-]/,Xe=/[\s-]/g;function De(e,t,n,r,o,a,u){if(a===t.length)return o===e.length?Ae:ln;var l=`${o},${a}`;if(u[l]!==void 0)return u[l];for(var m=r.charAt(a),c=n.indexOf(m,o),p=0,g,y,E,_;c>=0;)g=De(e,t,n,r,c+1,a+1,u),g>p&&(c===o?g*=Ae:un.test(e.charAt(c-1))?(g*=on,E=e.slice(o,c-1).match(cn),E&&o>0&&(g*=Math.pow(Ee,E.length))):dn.test(e.charAt(c-1))?(g*=rn,_=e.slice(o,c-1).match(Xe),_&&o>0&&(g*=Math.pow(Ee,_.length))):(g*=sn,o>0&&(g*=Math.pow(Ee,c-o))),e.charAt(c)!==t.charAt(a)&&(g*=an)),(g<ye&&n.charAt(c-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(c-1)!==r.charAt(a))&&(y=De(e,t,n,r,c+1,a+2,u),y*ye>g&&(g=y*ye)),g>p&&(p=g),c=n.indexOf(m,c+1);return u[l]=p,p}i(De,"G");function Me(e){return e.toLowerCase().replace(Xe," ")}i(Me,"D");function fn(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,De(e,t,Me(e),Me(t),0,0,{})}i(fn,"W");var Xr=!!(typeof window<"u"&&window.document&&window.document.createElement);function Z(e,t,{checkForDefaultPrevented:n=!0}={}){return i(function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)},"handleEvent")}i(Z,"composeEventHandlers");function Fe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}i(Fe,"setRef");function ee(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Fe(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Fe(e[o],null)}}}}i(ee,"composeRefs");function re(...e){return s.useCallback(ee(...e),e)}i(re,"useComposedRefs");function mn(e,t){const n=s.createContext(t),r=i(a=>{const{children:u,...l}=a,m=s.useMemo(()=>l,Object.values(l));return(0,f.jsx)(n.Provider,{value:m,children:u})},"Provider");r.displayName=e+"Provider";function o(a){const u=s.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return i(o,"useContext2"),[r,o]}i(mn,"createContext2");function pn(e,t=[]){let n=[];function r(a,u){const l=s.createContext(u),m=n.length;n=[...n,u];const c=i(g=>{const{scope:y,children:E,..._}=g,C=y?.[e]?.[m]||l,R=s.useMemo(()=>_,Object.values(_));return(0,f.jsx)(C.Provider,{value:R,children:E})},"Provider");c.displayName=a+"Provider";function p(g,y){const E=y?.[e]?.[m]||l,_=s.useContext(E);if(_)return _;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${a}\``)}return i(p,"useContext2"),[c,p]}i(r,"createContext3");const o=i(()=>{const a=n.map(u=>s.createContext(u));return i(function(l){const m=l?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...l,[e]:m}}),[l,m])},"useScope")},"createScope");return o.scopeName=e,[r,vn(o,...t)]}i(pn,"createContextScope");function vn(...e){const t=e[0];if(e.length===1)return t;const n=i(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return i(function(a){const u=r.reduce((l,{useScope:m,scopeName:c})=>{const p=m(a)[`__scope${c}`];return{...l,...p}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}i(vn,"composeContextScopes");var de=globalThis?.document?s.useLayoutEffect:()=>{},gn=s[" useId ".trim().toString()]||(()=>{}),hn=0;function Y(e){const[t,n]=s.useState(gn());return de(()=>{e||n(r=>r??String(hn++))},[e]),e||(t?`radix-${t}`:"")}i(Y,"useId");var bn=s[" useInsertionEffect ".trim().toString()]||de;function xn({prop:e,defaultProp:t,onChange:n=i(()=>{},"onChange"),caller:r}){const[o,a,u]=yn({defaultProp:t,onChange:n}),l=e!==void 0,m=l?e:o;{const c=s.useRef(e!==void 0);s.useEffect(()=>{const p=c.current;c.current=l},[l,r])}return[m,s.useCallback(c=>{if(l){const p=En(c)?c(e):c;p!==e&&u.current?.(p)}else a(c)},[l,e,a,u])]}i(xn,"useControllableState");function yn({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),a=s.useRef(t);return bn(()=>{a.current=t},[t]),s.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}i(yn,"useUncontrolledState");function En(e){return typeof e=="function"}i(En,"isFunction");var Qe=Ie(jt(),1);function Ze(e){const t=wn(e),n=s.forwardRef((r,o)=>{const{children:a,...u}=r,l=s.Children.toArray(a),m=l.find(Nn);if(m){const c=m.props.children,p=l.map(g=>g===m?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:g);return(0,f.jsx)(t,{...u,ref:o,children:s.isValidElement(c)?s.cloneElement(c,void 0,p):null})}return(0,f.jsx)(t,{...u,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}i(Ze,"createSlot");function wn(e){const t=s.forwardRef((n,r)=>{const{children:o,...a}=n;if(s.isValidElement(o)){const u=Rn(o),l=Sn(a,o.props);return o.type!==s.Fragment&&(l.ref=r?ee(r,u):u),s.cloneElement(o,l)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}i(wn,"createSlotClone");var Cn=Symbol("radix.slottable");function Nn(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cn}i(Nn,"isSlottable");function Sn(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const l=a(...u);return o(...u),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}i(Sn,"mergeProps");function Rn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}i(Rn,"getElementRef$1");var O=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Ze(`Primitive.${t}`),r=s.forwardRef((o,a)=>{const{asChild:u,...l}=o,m=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,f.jsx)(m,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Dn(e,t){e&&Qe.flushSync(()=>e.dispatchEvent(t))}i(Dn,"dispatchDiscreteCustomEvent");function fe(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}i(fe,"useCallbackRef");function _n(e,t=globalThis?.document){const n=fe(e);s.useEffect(()=>{const r=i(o=>{o.key==="Escape"&&n(o)},"handleKeyDown");return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}i(_n,"useEscapeKeydown");var Pn="DismissableLayer",_e="dismissableLayer.update",In="dismissableLayer.pointerDownOutside",On="dismissableLayer.focusOutside",Le,Je=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),et=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:u,onDismiss:l,...m}=e,c=s.useContext(Je),[p,g]=s.useState(null),y=p?.ownerDocument??globalThis?.document,[,E]=s.useState({}),_=re(t,h=>g(h)),C=Array.from(c.layers),[R]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),T=C.indexOf(R),j=p?C.indexOf(p):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,D=j>=T,F=kn(h=>{const W=h.target,B=[...c.branches].some(U=>U.contains(W));!D||B||(o?.(h),u?.(h),h.defaultPrevented||l?.())},y),N=An(h=>{const W=h.target;[...c.branches].some(B=>B.contains(W))||(a?.(h),u?.(h),h.defaultPrevented||l?.())},y);return _n(h=>{j===c.layers.size-1&&(r?.(h),!h.defaultPrevented&&l&&(h.preventDefault(),l()))},y),s.useEffect(()=>{if(p)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Le=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(p)),c.layers.add(p),$e(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Le)}},[p,y,n,c]),s.useEffect(()=>()=>{p&&(c.layers.delete(p),c.layersWithOutsidePointerEventsDisabled.delete(p),$e())},[p,c]),s.useEffect(()=>{const h=i(()=>E({}),"handleUpdate");return document.addEventListener(_e,h),()=>document.removeEventListener(_e,h)},[]),(0,f.jsx)(O.div,{...m,ref:_,style:{pointerEvents:k?D?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,F.onPointerDownCapture)})});et.displayName=Pn;var Tn="DismissableLayerBranch",jn=s.forwardRef((e,t)=>{const n=s.useContext(Je),r=s.useRef(null),o=re(t,r);return s.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),(0,f.jsx)(O.div,{...e,ref:o})});jn.displayName=Tn;function kn(e,t=globalThis?.document){const n=fe(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=i(l=>{if(l.target&&!r.current){let m=i(function(){tt(In,n,c,{discrete:!0})},"handleAndDispatchPointerDownOutsideEvent2");const c={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=m,t.addEventListener("click",o.current,{once:!0})):m()}else t.removeEventListener("click",o.current);r.current=!1},"handlePointerDown"),u=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:i(()=>r.current=!0,"onPointerDownCapture")}}i(kn,"usePointerDownOutside");function An(e,t=globalThis?.document){const n=fe(e),r=s.useRef(!1);return s.useEffect(()=>{const o=i(a=>{a.target&&!r.current&&tt(On,n,{originalEvent:a},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:i(()=>r.current=!0,"onFocusCapture"),onBlurCapture:i(()=>r.current=!1,"onBlurCapture")}}i(An,"useFocusOutside");function $e(){const e=new CustomEvent(_e);document.dispatchEvent(e)}i($e,"dispatchUpdate");function tt(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Dn(o,a):o.dispatchEvent(a)}i(tt,"handleAndDispatchCustomEvent");var we="focusScope.autoFocusOnMount",Ce="focusScope.autoFocusOnUnmount",We={bubbles:!1,cancelable:!0},Mn="FocusScope",nt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...u}=e,[l,m]=s.useState(null),c=fe(o),p=fe(a),g=s.useRef(null),y=re(t,C=>m(C)),E=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let C=i(function(k){if(E.paused||!l)return;const D=k.target;l.contains(D)?g.current=D:Q(g.current,{select:!0})},"handleFocusIn2"),R=i(function(k){if(E.paused||!l)return;const D=k.relatedTarget;D!==null&&(l.contains(D)||Q(g.current,{select:!0}))},"handleFocusOut2"),T=i(function(k){if(document.activeElement===document.body)for(const D of k)D.removedNodes.length>0&&Q(l)},"handleMutations2");document.addEventListener("focusin",C),document.addEventListener("focusout",R);const j=new MutationObserver(T);return l&&j.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",R),j.disconnect()}}},[r,l,E.paused]),s.useEffect(()=>{if(l){ze.add(E);const C=document.activeElement;if(!l.contains(C)){const R=new CustomEvent(we,We);l.addEventListener(we,c),l.dispatchEvent(R),R.defaultPrevented||(Fn(zn(rt(l)),{select:!0}),document.activeElement===C&&Q(l))}return()=>{l.removeEventListener(we,c),setTimeout(()=>{const R=new CustomEvent(Ce,We);l.addEventListener(Ce,p),l.dispatchEvent(R),R.defaultPrevented||Q(C??document.body,{select:!0}),l.removeEventListener(Ce,p),ze.remove(E)},0)}}},[l,c,p,E]);const _=s.useCallback(C=>{if(!n&&!r||E.paused)return;const R=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,T=document.activeElement;if(R&&T){const j=C.currentTarget,[k,D]=Ln(j);k&&D?!C.shiftKey&&T===D?(C.preventDefault(),n&&Q(k,{select:!0})):C.shiftKey&&T===k&&(C.preventDefault(),n&&Q(D,{select:!0})):T===j&&C.preventDefault()}},[n,r,E.paused]);return(0,f.jsx)(O.div,{tabIndex:-1,...u,ref:y,onKeyDown:_})});nt.displayName=Mn;function Fn(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Q(r,{select:t}),document.activeElement!==n)return}i(Fn,"focusFirst");function Ln(e){const t=rt(e);return[Ue(t,e),Ue(t.reverse(),e)]}i(Ln,"getTabbableEdges");function rt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}i(rt,"getTabbableCandidates");function Ue(e,t){for(const n of e)if(!$n(n,{upTo:t}))return n}i(Ue,"findVisible");function $n(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}i($n,"isHidden");function Wn(e){return e instanceof HTMLInputElement&&"select"in e}i(Wn,"isSelectableInput");function Q(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wn(e)&&t&&e.select()}}i(Q,"focus");var ze=Un();function Un(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Ke(e,t),e.unshift(t)},remove(t){e=Ke(e,t),e[0]?.resume()}}}i(Un,"createFocusScopesStack");function Ke(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}i(Ke,"arrayRemove");function zn(e){return e.filter(t=>t.tagName!=="A")}i(zn,"removeLinks");var Kn="Portal",ot=s.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=s.useState(!1);de(()=>a(!0),[]);const u=n||o&&globalThis?.document?.body;return u?Qe.createPortal((0,f.jsx)(O.div,{...r,ref:t}),u):null});ot.displayName=Kn;function Bn(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}i(Bn,"useStateMachine");var he=i(e=>{const{present:t,children:n}=e,r=Vn(t),o=typeof n=="function"?n({present:r.isPresent}):s.Children.only(n),a=re(r.ref,Hn(o));return typeof n=="function"||r.isPresent?s.cloneElement(o,{ref:a}):null},"Presence");he.displayName="Presence";function Vn(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),a=s.useRef("none"),[u,l]=Bn(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const m=pe(r.current);a.current=u==="mounted"?m:"none"},[u]),de(()=>{const m=r.current,c=o.current;if(c!==e){const p=a.current,g=pe(m);e?l("MOUNT"):g==="none"||m?.display==="none"?l("UNMOUNT"):l(c&&p!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),de(()=>{if(t){let m;const c=t.ownerDocument.defaultView??window,p=i(y=>{const E=pe(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&E&&(l("ANIMATION_END"),!o.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",m=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},"handleAnimationEnd"),g=i(y=>{y.target===t&&(a.current=pe(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{c.clearTimeout(m),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(m=>{r.current=m?getComputedStyle(m):null,n(m)},[])}}i(Vn,"usePresence");function pe(e){return e?.animationName||"none"}i(pe,"getAnimationName");function Hn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}i(Hn,"getElementRef");var Ne=0;function qn(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Be()),document.body.insertAdjacentElement("beforeend",e[1]??Be()),Ne++,()=>{Ne===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ne--}},[])}i(qn,"useFocusGuards");function Be(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}i(Be,"createFocusGuard");var be="Dialog",[st,Qr]=pn(be),[Gn,K]=st(be),at=i(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:u=!0}=e,l=s.useRef(null),m=s.useRef(null),[c,p]=xn({prop:r,defaultProp:o??!1,onChange:a,caller:be});return(0,f.jsx)(Gn,{scope:t,triggerRef:l,contentRef:m,contentId:Y(),titleId:Y(),descriptionId:Y(),open:c,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(g=>!g),[p]),modal:u,children:n})},"Dialog");at.displayName=be;var it="DialogTrigger",Yn=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(it,n),a=re(t,o.triggerRef);return(0,f.jsx)(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":je(o.open),...r,ref:a,onClick:Z(e.onClick,o.onOpenToggle)})});Yn.displayName=it;var Oe="DialogPortal",[Xn,lt]=st(Oe,{forceMount:void 0}),ut=i(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=K(Oe,t);return(0,f.jsx)(Xn,{scope:t,forceMount:n,children:s.Children.map(r,u=>(0,f.jsx)(he,{present:n||a.open,children:(0,f.jsx)(ot,{asChild:!0,container:o,children:u})}))})},"DialogPortal");ut.displayName=Oe;var ge="DialogOverlay",ct=s.forwardRef((e,t)=>{const n=lt(ge,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=K(ge,e.__scopeDialog);return a.modal?(0,f.jsx)(he,{present:r||a.open,children:(0,f.jsx)(Zn,{...o,ref:t})}):null});ct.displayName=ge;var Qn=Ze("DialogOverlay.RemoveScroll"),Zn=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(ge,n);return(0,f.jsx)(Mt,{as:Qn,allowPinchZoom:!0,shards:[o.contentRef],children:(0,f.jsx)(O.div,{"data-state":je(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),te="DialogContent",dt=s.forwardRef((e,t)=>{const n=lt(te,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=K(te,e.__scopeDialog);return(0,f.jsx)(he,{present:r||a.open,children:a.modal?(0,f.jsx)(Jn,{...o,ref:t}):(0,f.jsx)(er,{...o,ref:t})})});dt.displayName=te;var Jn=s.forwardRef((e,t)=>{const n=K(te,e.__scopeDialog),r=s.useRef(null),o=re(t,n.contentRef,r);return s.useEffect(()=>{const a=r.current;if(a)return Ft(a)},[]),(0,f.jsx)(ft,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,a=>{const u=a.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&a.preventDefault()}),onFocusOutside:Z(e.onFocusOutside,a=>a.preventDefault())})}),er=s.forwardRef((e,t)=>{const n=K(te,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return(0,f.jsx)(ft,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i(a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},"onCloseAutoFocus"),onInteractOutside:i(a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=a.target;n.triggerRef.current?.contains(u)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()},"onInteractOutside")})}),ft=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...u}=e,l=K(te,n),m=s.useRef(null),c=re(t,m);return qn(),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(nt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,f.jsx)(et,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":je(l.open),...u,ref:c,onDismiss:i(()=>l.onOpenChange(!1),"onDismiss")})}),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(or,{titleId:l.titleId}),(0,f.jsx)(ar,{contentRef:m,descriptionId:l.descriptionId})]})]})}),Te="DialogTitle",tr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(Te,n);return(0,f.jsx)(O.h2,{id:o.titleId,...r,ref:t})});tr.displayName=Te;var mt="DialogDescription",nr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(mt,n);return(0,f.jsx)(O.p,{id:o.descriptionId,...r,ref:t})});nr.displayName=mt;var pt="DialogClose",rr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(pt,n);return(0,f.jsx)(O.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});rr.displayName=pt;function je(e){return e?"open":"closed"}i(je,"getState");var vt="DialogTitleWarning",[Zr,gt]=mn(vt,{contentName:te,titleName:Te,docsSlug:"dialog"}),or=i(({titleId:e})=>{const t=gt(vt),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1
+ var Ot=Object.defineProperty;var i=(e,t)=>Ot(e,"name",{value:t,configurable:!0});import{i as Ie}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as Tt,Ir as jt,Lr as kt,S as M,l as At,t as Ge}from"./createLucideIcon-r3v6fbGz.js";import{Q as Ye}from"./mention-chips-DXumPrOR.js";import{X as Mt,Y as Ft,l as Lt}from"./zap-P-cXfK28.js";import{C as $t}from"./MarkdownEditor-DfrwLv1M.js";import{a as Wt,c as Ut,o as zt,r as Kt,u as Bt}from"./checkbox-757DLJRS.js";import{a as Vt,c as Ht,r as qt}from"./agents-BlSzFh-1.js";import{t as Gt}from"./check-DDiXDm2i.js";import{t as Yt}from"./button-CAPbz11u.js";var s=Ie(kt(),1),f=Ie(Tt(),1),Xt=Object.defineProperty,Qt=i((e,t)=>Xt(e,"name",{value:t,configurable:!0}),"__name"),Zt=s.forwardRef(Qt(i(function(t,n){return(0,f.jsx)(At.label,{...t,ref:n,onMouseDown:i(r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())},"onMouseDown")})},"Label2"),"Label")),Jt=Zt,en=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],tn=Ge("chevrons-up-down",en),nn=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Yr=Ge("play",nn),Ae=1,rn=.9,on=.8,sn=.17,ye=.1,Ee=.999,an=.9999,ln=.99,un=/[\\\/_+.#"@\[\(\{&]/,cn=/[\\\/_+.#"@\[\(\{&]/g,dn=/[\s-]/,Xe=/[\s-]/g;function De(e,t,n,r,o,a,u){if(a===t.length)return o===e.length?Ae:ln;var l=`${o},${a}`;if(u[l]!==void 0)return u[l];for(var m=r.charAt(a),c=n.indexOf(m,o),p=0,g,y,E,_;c>=0;)g=De(e,t,n,r,c+1,a+1,u),g>p&&(c===o?g*=Ae:un.test(e.charAt(c-1))?(g*=on,E=e.slice(o,c-1).match(cn),E&&o>0&&(g*=Math.pow(Ee,E.length))):dn.test(e.charAt(c-1))?(g*=rn,_=e.slice(o,c-1).match(Xe),_&&o>0&&(g*=Math.pow(Ee,_.length))):(g*=sn,o>0&&(g*=Math.pow(Ee,c-o))),e.charAt(c)!==t.charAt(a)&&(g*=an)),(g<ye&&n.charAt(c-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(c-1)!==r.charAt(a))&&(y=De(e,t,n,r,c+1,a+2,u),y*ye>g&&(g=y*ye)),g>p&&(p=g),c=n.indexOf(m,c+1);return u[l]=p,p}i(De,"G");function Me(e){return e.toLowerCase().replace(Xe," ")}i(Me,"D");function fn(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,De(e,t,Me(e),Me(t),0,0,{})}i(fn,"W");var Xr=!!(typeof window<"u"&&window.document&&window.document.createElement);function Z(e,t,{checkForDefaultPrevented:n=!0}={}){return i(function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)},"handleEvent")}i(Z,"composeEventHandlers");function Fe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}i(Fe,"setRef");function ee(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Fe(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Fe(e[o],null)}}}}i(ee,"composeRefs");function re(...e){return s.useCallback(ee(...e),e)}i(re,"useComposedRefs");function mn(e,t){const n=s.createContext(t),r=i(a=>{const{children:u,...l}=a,m=s.useMemo(()=>l,Object.values(l));return(0,f.jsx)(n.Provider,{value:m,children:u})},"Provider");r.displayName=e+"Provider";function o(a){const u=s.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return i(o,"useContext2"),[r,o]}i(mn,"createContext2");function pn(e,t=[]){let n=[];function r(a,u){const l=s.createContext(u),m=n.length;n=[...n,u];const c=i(g=>{const{scope:y,children:E,..._}=g,C=y?.[e]?.[m]||l,R=s.useMemo(()=>_,Object.values(_));return(0,f.jsx)(C.Provider,{value:R,children:E})},"Provider");c.displayName=a+"Provider";function p(g,y){const E=y?.[e]?.[m]||l,_=s.useContext(E);if(_)return _;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${a}\``)}return i(p,"useContext2"),[c,p]}i(r,"createContext3");const o=i(()=>{const a=n.map(u=>s.createContext(u));return i(function(l){const m=l?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...l,[e]:m}}),[l,m])},"useScope")},"createScope");return o.scopeName=e,[r,vn(o,...t)]}i(pn,"createContextScope");function vn(...e){const t=e[0];if(e.length===1)return t;const n=i(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return i(function(a){const u=r.reduce((l,{useScope:m,scopeName:c})=>{const p=m(a)[`__scope${c}`];return{...l,...p}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}i(vn,"composeContextScopes");var de=globalThis?.document?s.useLayoutEffect:()=>{},gn=s[" useId ".trim().toString()]||(()=>{}),hn=0;function Y(e){const[t,n]=s.useState(gn());return de(()=>{e||n(r=>r??String(hn++))},[e]),e||(t?`radix-${t}`:"")}i(Y,"useId");var bn=s[" useInsertionEffect ".trim().toString()]||de;function xn({prop:e,defaultProp:t,onChange:n=i(()=>{},"onChange"),caller:r}){const[o,a,u]=yn({defaultProp:t,onChange:n}),l=e!==void 0,m=l?e:o;{const c=s.useRef(e!==void 0);s.useEffect(()=>{const p=c.current;c.current=l},[l,r])}return[m,s.useCallback(c=>{if(l){const p=En(c)?c(e):c;p!==e&&u.current?.(p)}else a(c)},[l,e,a,u])]}i(xn,"useControllableState");function yn({defaultProp:e,onChange:t}){const[n,r]=s.useState(e),o=s.useRef(n),a=s.useRef(t);return bn(()=>{a.current=t},[t]),s.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}i(yn,"useUncontrolledState");function En(e){return typeof e=="function"}i(En,"isFunction");var Qe=Ie(jt(),1);function Ze(e){const t=wn(e),n=s.forwardRef((r,o)=>{const{children:a,...u}=r,l=s.Children.toArray(a),m=l.find(Nn);if(m){const c=m.props.children,p=l.map(g=>g===m?s.Children.count(c)>1?s.Children.only(null):s.isValidElement(c)?c.props.children:null:g);return(0,f.jsx)(t,{...u,ref:o,children:s.isValidElement(c)?s.cloneElement(c,void 0,p):null})}return(0,f.jsx)(t,{...u,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}i(Ze,"createSlot");function wn(e){const t=s.forwardRef((n,r)=>{const{children:o,...a}=n;if(s.isValidElement(o)){const u=Rn(o),l=Sn(a,o.props);return o.type!==s.Fragment&&(l.ref=r?ee(r,u):u),s.cloneElement(o,l)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}i(wn,"createSlotClone");var Cn=Symbol("radix.slottable");function Nn(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Cn}i(Nn,"isSlottable");function Sn(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...u)=>{const l=a(...u);return o(...u),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}i(Sn,"mergeProps");function Rn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}i(Rn,"getElementRef$1");var O=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Ze(`Primitive.${t}`),r=s.forwardRef((o,a)=>{const{asChild:u,...l}=o,m=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,f.jsx)(m,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Dn(e,t){e&&Qe.flushSync(()=>e.dispatchEvent(t))}i(Dn,"dispatchDiscreteCustomEvent");function fe(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}i(fe,"useCallbackRef");function _n(e,t=globalThis?.document){const n=fe(e);s.useEffect(()=>{const r=i(o=>{o.key==="Escape"&&n(o)},"handleKeyDown");return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}i(_n,"useEscapeKeydown");var Pn="DismissableLayer",_e="dismissableLayer.update",In="dismissableLayer.pointerDownOutside",On="dismissableLayer.focusOutside",Le,Je=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),et=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:u,onDismiss:l,...m}=e,c=s.useContext(Je),[p,g]=s.useState(null),y=p?.ownerDocument??globalThis?.document,[,E]=s.useState({}),_=re(t,h=>g(h)),C=Array.from(c.layers),[R]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),T=C.indexOf(R),j=p?C.indexOf(p):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,D=j>=T,F=kn(h=>{const W=h.target,B=[...c.branches].some(U=>U.contains(W));!D||B||(o?.(h),u?.(h),h.defaultPrevented||l?.())},y),N=An(h=>{const W=h.target;[...c.branches].some(B=>B.contains(W))||(a?.(h),u?.(h),h.defaultPrevented||l?.())},y);return _n(h=>{j===c.layers.size-1&&(r?.(h),!h.defaultPrevented&&l&&(h.preventDefault(),l()))},y),s.useEffect(()=>{if(p)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Le=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(p)),c.layers.add(p),$e(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Le)}},[p,y,n,c]),s.useEffect(()=>()=>{p&&(c.layers.delete(p),c.layersWithOutsidePointerEventsDisabled.delete(p),$e())},[p,c]),s.useEffect(()=>{const h=i(()=>E({}),"handleUpdate");return document.addEventListener(_e,h),()=>document.removeEventListener(_e,h)},[]),(0,f.jsx)(O.div,{...m,ref:_,style:{pointerEvents:k?D?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,F.onPointerDownCapture)})});et.displayName=Pn;var Tn="DismissableLayerBranch",jn=s.forwardRef((e,t)=>{const n=s.useContext(Je),r=s.useRef(null),o=re(t,r);return s.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),(0,f.jsx)(O.div,{...e,ref:o})});jn.displayName=Tn;function kn(e,t=globalThis?.document){const n=fe(e),r=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const a=i(l=>{if(l.target&&!r.current){let m=i(function(){tt(In,n,c,{discrete:!0})},"handleAndDispatchPointerDownOutsideEvent2");const c={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=m,t.addEventListener("click",o.current,{once:!0})):m()}else t.removeEventListener("click",o.current);r.current=!1},"handlePointerDown"),u=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:i(()=>r.current=!0,"onPointerDownCapture")}}i(kn,"usePointerDownOutside");function An(e,t=globalThis?.document){const n=fe(e),r=s.useRef(!1);return s.useEffect(()=>{const o=i(a=>{a.target&&!r.current&&tt(On,n,{originalEvent:a},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:i(()=>r.current=!0,"onFocusCapture"),onBlurCapture:i(()=>r.current=!1,"onBlurCapture")}}i(An,"useFocusOutside");function $e(){const e=new CustomEvent(_e);document.dispatchEvent(e)}i($e,"dispatchUpdate");function tt(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Dn(o,a):o.dispatchEvent(a)}i(tt,"handleAndDispatchCustomEvent");var we="focusScope.autoFocusOnMount",Ce="focusScope.autoFocusOnUnmount",We={bubbles:!1,cancelable:!0},Mn="FocusScope",nt=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...u}=e,[l,m]=s.useState(null),c=fe(o),p=fe(a),g=s.useRef(null),y=re(t,C=>m(C)),E=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(r){let C=i(function(k){if(E.paused||!l)return;const D=k.target;l.contains(D)?g.current=D:Q(g.current,{select:!0})},"handleFocusIn2"),R=i(function(k){if(E.paused||!l)return;const D=k.relatedTarget;D!==null&&(l.contains(D)||Q(g.current,{select:!0}))},"handleFocusOut2"),T=i(function(k){if(document.activeElement===document.body)for(const D of k)D.removedNodes.length>0&&Q(l)},"handleMutations2");document.addEventListener("focusin",C),document.addEventListener("focusout",R);const j=new MutationObserver(T);return l&&j.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",R),j.disconnect()}}},[r,l,E.paused]),s.useEffect(()=>{if(l){ze.add(E);const C=document.activeElement;if(!l.contains(C)){const R=new CustomEvent(we,We);l.addEventListener(we,c),l.dispatchEvent(R),R.defaultPrevented||(Fn(zn(rt(l)),{select:!0}),document.activeElement===C&&Q(l))}return()=>{l.removeEventListener(we,c),setTimeout(()=>{const R=new CustomEvent(Ce,We);l.addEventListener(Ce,p),l.dispatchEvent(R),R.defaultPrevented||Q(C??document.body,{select:!0}),l.removeEventListener(Ce,p),ze.remove(E)},0)}}},[l,c,p,E]);const _=s.useCallback(C=>{if(!n&&!r||E.paused)return;const R=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,T=document.activeElement;if(R&&T){const j=C.currentTarget,[k,D]=Ln(j);k&&D?!C.shiftKey&&T===D?(C.preventDefault(),n&&Q(k,{select:!0})):C.shiftKey&&T===k&&(C.preventDefault(),n&&Q(D,{select:!0})):T===j&&C.preventDefault()}},[n,r,E.paused]);return(0,f.jsx)(O.div,{tabIndex:-1,...u,ref:y,onKeyDown:_})});nt.displayName=Mn;function Fn(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Q(r,{select:t}),document.activeElement!==n)return}i(Fn,"focusFirst");function Ln(e){const t=rt(e);return[Ue(t,e),Ue(t.reverse(),e)]}i(Ln,"getTabbableEdges");function rt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}i(rt,"getTabbableCandidates");function Ue(e,t){for(const n of e)if(!$n(n,{upTo:t}))return n}i(Ue,"findVisible");function $n(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}i($n,"isHidden");function Wn(e){return e instanceof HTMLInputElement&&"select"in e}i(Wn,"isSelectableInput");function Q(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wn(e)&&t&&e.select()}}i(Q,"focus");var ze=Un();function Un(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Ke(e,t),e.unshift(t)},remove(t){e=Ke(e,t),e[0]?.resume()}}}i(Un,"createFocusScopesStack");function Ke(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}i(Ke,"arrayRemove");function zn(e){return e.filter(t=>t.tagName!=="A")}i(zn,"removeLinks");var Kn="Portal",ot=s.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=s.useState(!1);de(()=>a(!0),[]);const u=n||o&&globalThis?.document?.body;return u?Qe.createPortal((0,f.jsx)(O.div,{...r,ref:t}),u):null});ot.displayName=Kn;function Bn(e,t){return s.useReducer((n,r)=>t[n][r]??n,e)}i(Bn,"useStateMachine");var he=i(e=>{const{present:t,children:n}=e,r=Vn(t),o=typeof n=="function"?n({present:r.isPresent}):s.Children.only(n),a=re(r.ref,Hn(o));return typeof n=="function"||r.isPresent?s.cloneElement(o,{ref:a}):null},"Presence");he.displayName="Presence";function Vn(e){const[t,n]=s.useState(),r=s.useRef(null),o=s.useRef(e),a=s.useRef("none"),[u,l]=Bn(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const m=pe(r.current);a.current=u==="mounted"?m:"none"},[u]),de(()=>{const m=r.current,c=o.current;if(c!==e){const p=a.current,g=pe(m);e?l("MOUNT"):g==="none"||m?.display==="none"?l("UNMOUNT"):l(c&&p!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),de(()=>{if(t){let m;const c=t.ownerDocument.defaultView??window,p=i(y=>{const E=pe(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&E&&(l("ANIMATION_END"),!o.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",m=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},"handleAnimationEnd"),g=i(y=>{y.target===t&&(a.current=pe(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{c.clearTimeout(m),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(m=>{r.current=m?getComputedStyle(m):null,n(m)},[])}}i(Vn,"usePresence");function pe(e){return e?.animationName||"none"}i(pe,"getAnimationName");function Hn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}i(Hn,"getElementRef");var Ne=0;function qn(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Be()),document.body.insertAdjacentElement("beforeend",e[1]??Be()),Ne++,()=>{Ne===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ne--}},[])}i(qn,"useFocusGuards");function Be(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}i(Be,"createFocusGuard");var be="Dialog",[st,Qr]=pn(be),[Gn,K]=st(be),at=i(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:u=!0}=e,l=s.useRef(null),m=s.useRef(null),[c,p]=xn({prop:r,defaultProp:o??!1,onChange:a,caller:be});return(0,f.jsx)(Gn,{scope:t,triggerRef:l,contentRef:m,contentId:Y(),titleId:Y(),descriptionId:Y(),open:c,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(g=>!g),[p]),modal:u,children:n})},"Dialog");at.displayName=be;var it="DialogTrigger",Yn=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(it,n),a=re(t,o.triggerRef);return(0,f.jsx)(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":je(o.open),...r,ref:a,onClick:Z(e.onClick,o.onOpenToggle)})});Yn.displayName=it;var Oe="DialogPortal",[Xn,lt]=st(Oe,{forceMount:void 0}),ut=i(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=K(Oe,t);return(0,f.jsx)(Xn,{scope:t,forceMount:n,children:s.Children.map(r,u=>(0,f.jsx)(he,{present:n||a.open,children:(0,f.jsx)(ot,{asChild:!0,container:o,children:u})}))})},"DialogPortal");ut.displayName=Oe;var ge="DialogOverlay",ct=s.forwardRef((e,t)=>{const n=lt(ge,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=K(ge,e.__scopeDialog);return a.modal?(0,f.jsx)(he,{present:r||a.open,children:(0,f.jsx)(Zn,{...o,ref:t})}):null});ct.displayName=ge;var Qn=Ze("DialogOverlay.RemoveScroll"),Zn=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(ge,n);return(0,f.jsx)(Mt,{as:Qn,allowPinchZoom:!0,shards:[o.contentRef],children:(0,f.jsx)(O.div,{"data-state":je(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),te="DialogContent",dt=s.forwardRef((e,t)=>{const n=lt(te,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=K(te,e.__scopeDialog);return(0,f.jsx)(he,{present:r||a.open,children:a.modal?(0,f.jsx)(Jn,{...o,ref:t}):(0,f.jsx)(er,{...o,ref:t})})});dt.displayName=te;var Jn=s.forwardRef((e,t)=>{const n=K(te,e.__scopeDialog),r=s.useRef(null),o=re(t,n.contentRef,r);return s.useEffect(()=>{const a=r.current;if(a)return Ft(a)},[]),(0,f.jsx)(ft,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,a=>{const u=a.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&a.preventDefault()}),onFocusOutside:Z(e.onFocusOutside,a=>a.preventDefault())})}),er=s.forwardRef((e,t)=>{const n=K(te,e.__scopeDialog),r=s.useRef(!1),o=s.useRef(!1);return(0,f.jsx)(ft,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i(a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},"onCloseAutoFocus"),onInteractOutside:i(a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=a.target;n.triggerRef.current?.contains(u)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()},"onInteractOutside")})}),ft=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...u}=e,l=K(te,n),m=s.useRef(null),c=re(t,m);return qn(),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(nt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,f.jsx)(et,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":je(l.open),...u,ref:c,onDismiss:i(()=>l.onOpenChange(!1),"onDismiss")})}),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(or,{titleId:l.titleId}),(0,f.jsx)(ar,{contentRef:m,descriptionId:l.descriptionId})]})]})}),Te="DialogTitle",tr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(Te,n);return(0,f.jsx)(O.h2,{id:o.titleId,...r,ref:t})});tr.displayName=Te;var mt="DialogDescription",nr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(mt,n);return(0,f.jsx)(O.p,{id:o.descriptionId,...r,ref:t})});nr.displayName=mt;var pt="DialogClose",rr=s.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=K(pt,n);return(0,f.jsx)(O.button,{type:"button",...r,ref:t,onClick:Z(e.onClick,()=>o.onOpenChange(!1))})});rr.displayName=pt;function je(e){return e?"open":"closed"}i(je,"getState");var vt="DialogTitleWarning",[Zr,gt]=mn(vt,{contentName:te,titleName:Te,docsSlug:"dialog"}),or=i(({titleId:e})=>{const t=gt(vt),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
2
 
3
3
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
4
 
@@ -12,4 +12,4 @@ import(${JSON.stringify(t.entry.module)});`:" ";return u.createElement(u.Fragmen
12
12
  console.log(
13
13
  "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
14
14
  );
15
- `}});if(Tt(e))return u.createElement(lt,{title:"Unhandled Thrown Response!"},u.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let a;if(e instanceof Error)a=e;else{let s=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(s)}return u.createElement(lt,{title:"Application Error!",isOutsideRemixApp:t},u.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),u.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),r)}o(ta,"RemixRootDefaultErrorBoundary");function lt({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:a}=z();return a.root?.Layout&&!n?r:u.createElement("html",{lang:"en"},u.createElement("head",null,u.createElement("meta",{charSet:"utf-8"}),u.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),u.createElement("title",null,e)),u.createElement("body",null,u.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r,t?u.createElement(Zo,null):null)))}o(lt,"BoundaryShell");var na=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{na&&(window.__reactRouterVersion="7.18.2")}catch{}function ks({basename:e,children:t,useTransitions:n,window:r}){let a=u.useRef();a.current==null&&(a.current=Rr({window:r,v5Compat:!0}));let s=a.current,[i,l]=u.useState({action:s.action,location:s.location}),c=u.useCallback(d=>{n===!1?l(d):u.startTransition(()=>l(d))},[n]);return u.useLayoutEffect(()=>s.listen(c),[s,c]),u.createElement(Kt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:s,useTransitions:n})}o(ks,"BrowserRouter");function ra({basename:e,children:t,history:n,useTransitions:r}){let[a,s]=u.useState({action:n.action,location:n.location}),i=u.useCallback(l=>{r===!1?s(l):u.startTransition(()=>s(l))},[r]);return u.useLayoutEffect(()=>n.listen(i),[n,i]),u.createElement(Kt,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:n,useTransitions:r})}o(ra,"HistoryRouter");ra.displayName="unstable_HistoryRouter";var ce=u.forwardRef(o(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:s,replace:i,mask:l,state:c,target:d,to:m,preventScrollReset:f,viewTransition:g,defaultShouldRevalidate:v,...w},y){let{basename:h,navigator:I,useTransitions:R}=u.useContext(L),S=typeof m=="string"&&He.test(m),k=Nt(m,h);m=k.to;let E=oo(m,{relative:a}),$=_(),A=null;if(l){let F=Se(l,[],$.mask?$.mask.pathname:"/",!0);h!=="/"&&(F.pathname=F.pathname==="/"?h:M([h,F.pathname])),A=I.createHref(F)}let[N,P,U]=Qo(r,w),Q=ia(m,{replace:i,mask:l,state:c,target:d,preventScrollReset:f,relative:a,viewTransition:g,defaultShouldRevalidate:v,useTransitions:R});function T(F){t&&t(F),F.defaultPrevented||Q(F)}o(T,"handleClick");let H=!(k.isExternal||s),j=u.createElement("a",{...w,...U,href:(H?A:void 0)||k.absoluteURL||E,onClick:H?T:t,ref:ea(y,P),target:d,"data-discover":!S&&n==="render"?"true":void 0});return N&&!S?u.createElement(u.Fragment,null,j,u.createElement(Ko,{page:E})):j},"LinkWithRef"));ce.displayName="Link";var Xt=u.forwardRef(o(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:s,to:i,viewTransition:l,children:c,...d},m){let f=le(i,{relative:d.relative}),g=_(),v=u.useContext(ue),{navigator:w,basename:y}=u.useContext(L),h=v!=null&&ha(f)&&l===!0,I=w.encodeLocation?w.encodeLocation(f).pathname:f.pathname,R=g.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(R=R.toLowerCase(),S=S?S.toLowerCase():null,I=I.toLowerCase()),S&&y&&(S=B(S,y)||S);const k=I!=="/"&&I.endsWith("/")?I.length-1:I.length;let E=R===I||!a&&R.startsWith(I)&&R.charAt(k)==="/",$=S!=null&&(S===I||!a&&S.startsWith(I)&&S.charAt(I.length)==="/"),A={isActive:E,isPending:$,isTransitioning:h},N=E?t:void 0,P;typeof r=="function"?P=r(A):P=[r,E?"active":null,$?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let U=typeof s=="function"?s(A):s;return u.createElement(ce,{...d,"aria-current":N,className:P,ref:m,style:U,to:i,viewTransition:l},typeof c=="function"?c(A):c)},"NavLinkWithRef"));Xt.displayName="NavLink";var oa=u.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:s,method:i=he,action:l,onSubmit:c,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g,...v},w)=>{let{useTransitions:y}=u.useContext(L),h=ca(),I=da(l,{relative:d}),R=i.toLowerCase()==="get"?"get":"post",S=typeof l=="string"&&He.test(l),k=o(E=>{if(c&&c(E),E.defaultPrevented)return;E.preventDefault();let $=E.nativeEvent.submitter,A=$?.getAttribute("formmethod")||i,N=o(()=>h($||E.currentTarget,{fetcherKey:t,method:A,navigate:n,replace:a,state:s,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g}),"doSubmit");y&&n!==!1?u.startTransition(()=>N()):N()},"submitHandler");return u.createElement("form",{ref:w,method:R,action:I,onSubmit:r?c:k,...v,"data-discover":!S&&e==="render"?"true":void 0})});oa.displayName="Form";function aa({getKey:e,storageKey:t,...n}){let r=u.useContext(ke),{basename:a}=u.useContext(L),s=_(),i=Qt();fa({getKey:e,storageKey:t});let l=u.useMemo(()=>{if(!r||!e)return null;let d=Ue(s,i,a,e);return d!==s.key?d:null},[]);if(!r||r.isSpaMode)return null;let c=((d,m)=>{if(!window.history.state||!window.history.state.key){let f=Math.random().toString(32).slice(2);window.history.replaceState({key:f},"")}try{let f=JSON.parse(sessionStorage.getItem(d)||"{}")[m||window.history.state.key];typeof f=="number"&&window.scrollTo(0,f)}catch{sessionStorage.removeItem(d)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),u.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${it(JSON.stringify(t||Me))}, ${it(JSON.stringify(l))})`}})}o(aa,"ScrollRestoration");aa.displayName="ScrollRestoration";function Zt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}o(Zt,"getDataRouterConsoleError2");function Ke(e){let t=u.useContext(G);return C(t,Zt(e)),t}o(Ke,"useDataRouterContext3");function sa(e){let t=u.useContext(ue);return C(t,Zt(e)),t}o(sa,"useDataRouterState2");function ia(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c,useTransitions:d}={}){let m=xe(),f=_(),g=le(e,{relative:i});return u.useCallback(v=>{if(Lo(v,t)){v.preventDefault();let w=n!==void 0?n:oe(f)===oe(g),y=o(()=>m(e,{replace:w,mask:r,state:a,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c}),"doNavigate");d?u.startTransition(()=>y()):y()}},[f,m,g,n,r,a,t,e,s,i,l,c,d])}o(ia,"useLinkClickHandler");function $s(e){D(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=u.useRef(Ne(e)),n=u.useRef(!1),r=_(),a=u.useMemo(()=>Ao(r.search,n.current?null:t.current),[r.search]),s=xe();return[a,u.useCallback((i,l)=>{const c=Ne(typeof i=="function"?i(new URLSearchParams(a)):i);n.current=!0,s("?"+c,l)},[s,a])]}o($s,"useSearchParams");var ua=0,la=o(()=>`__${String(++ua)}__`,"getUniqueFetcherId");function ca(){let{router:e}=Ke("useSubmit"),{basename:t}=u.useContext(L),n=vo(),r=e.fetch,a=e.navigate;return u.useCallback(async(s,i={})=>{let{action:l,method:c,encType:d,formData:m,body:f}=To(s,t);if(i.navigate===!1){let g=i.fetcherKey||la();await r(g,n,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:m,body:f,formMethod:i.method||c,formEncType:i.encType||d,flushSync:i.flushSync})}else await a(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:m,body:f,formMethod:i.method||c,formEncType:i.encType||d,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,a,t,n])}o(ca,"useSubmit");function da(e,{relative:t}={}){let{basename:n}=u.useContext(L),r=u.useContext(O);C(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),s={...le(e||".",{relative:t})},i=_();if(e==null){s.search=i.search;let l=new URLSearchParams(s.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(m=>m).forEach(m=>l.append("index",m));let d=l.toString();s.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:M([n,s.pathname])),oe(s)}o(da,"useFormAction");var Me="react-router-scroll-positions",me={};function Ue(e,t,n,r){let a=null;return r&&(n!=="/"?a=r({...e,pathname:B(e.pathname,n)||e.pathname},t):a=r(e,t)),a==null&&(a=e.key),a}o(Ue,"getScrollRestorationKey");function fa({getKey:e,storageKey:t}={}){let{router:n}=Ke("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:a}=sa("useScrollRestoration"),{basename:s}=u.useContext(L),i=_(),l=Qt(),c=wo();u.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),ma(u.useCallback(()=>{if(c.state==="idle"){let d=Ue(i,l,s,e);me[d]=window.scrollY}try{sessionStorage.setItem(t||Me,JSON.stringify(me))}catch(d){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${d}).`)}window.history.scrollRestoration="auto"},[c.state,e,s,i,l,t])),typeof document<"u"&&(u.useLayoutEffect(()=>{try{let d=sessionStorage.getItem(t||Me);d&&(me=JSON.parse(d))}catch{}},[t]),u.useLayoutEffect(()=>{let d=n?.enableScrollRestoration(me,()=>window.scrollY,e?(m,f)=>Ue(m,f,s,e):void 0);return()=>d&&d()},[n,s,e]),u.useLayoutEffect(()=>{if(r!==!1){if(typeof r=="number"){window.scrollTo(0,r);return}try{if(i.hash){let d=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(d){d.scrollIntoView();return}}}catch{D(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[i,r,a]))}o(fa,"useScrollRestoration");function Ps(e,t){let{capture:n}=t||{};u.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("beforeunload",e,r),()=>{window.removeEventListener("beforeunload",e,r)}},[e,n])}o(Ps,"useBeforeUnload");function ma(e,t){let{capture:n}=t||{};u.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,n])}o(ma,"usePageHide");function ha(e,{relative:t}={}){let n=u.useContext(Ft);C(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ke("useViewTransitionState"),a=le(e,{relative:t});if(!n.isTransitioning)return!1;let s=B(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=B(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ge(a.pathname,i)!=null||ge(a.pathname,s)!=null}o(ha,"useViewTransitionState");var ct=60,je=3600,we=24*je,dt=7*we,ft=30*we;function pa(e){const t=Date.now(),n=new Date(e).getTime(),r=Math.round((t-n)/1e3);return r<ct?"just now":r<je?`${Math.floor(r/ct)}m ago`:r<we?`${Math.floor(r/je)}h ago`:r<dt?`${Math.floor(r/we)}d ago`:r<ft?`${Math.floor(r/dt)}w ago`:`${Math.floor(r/ft)}mo ago`}o(pa,"timeAgo");var en="from",tn="fromHref",nn="paperclip:issue-detail-breadcrumb:";function rn(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.label=="string"&&typeof t.href=="string"}o(rn,"isIssueDetailBreadcrumb");function on(e){return e==="issues"||e==="inbox"}o(on,"isIssueDetailSource");function an(e){if(typeof e!="object"||e===null)return!1;const t=e,n=t.originKind===void 0||typeof t.originKind=="string",r=t.originId===void 0||t.originId===null||typeof t.originId=="string",a=t.blockerAttention===void 0||typeof t.blockerAttention=="object"&&t.blockerAttention!==null;return typeof t.id=="string"&&(t.identifier===null||typeof t.identifier=="string")&&typeof t.title=="string"&&typeof t.status=="string"&&a&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.projectName===null||typeof t.projectName=="string")&&n&&r}o(an,"isIssueDetailHeaderSeed");function ga(e){return{id:e.id,identifier:e.identifier??null,title:e.title,status:e.status,blockerAttention:e.blockerAttention,priority:e.priority,projectId:e.projectId??null,projectName:e.project?.name??null,originKind:e.originKind,originId:e.originId??null}}o(ga,"createIssueDetailHeaderSeed");function sn(e,t){const n=ga(t);return typeof e!="object"||e===null?{issueDetailHeaderSeed:n}:{...e,issueDetailHeaderSeed:n}}o(sn,"withIssueDetailHeaderSeed");function ya(e){if(typeof e!="object"||e===null)return null;const t=e.issueDetailHeaderSeed;return an(t)?t:null}o(ya,"readIssueDetailHeaderSeed");function va(e){if(!e)return null;const t=new URLSearchParams(e).get(en);return on(t)?t:null}o(va,"readIssueDetailSourceFromSearch");function wa(e){if(!e)return null;const t=new URLSearchParams(e).get(tn);return t&&t.startsWith("/")?t:null}o(wa,"readIssueDetailBreadcrumbHrefFromSearch");function un(e,t){return on(e?.issueDetailSource)?e.issueDetailSource:t?t.label==="Inbox"||t.href.includes("/inbox")?"inbox":t.label==="Tasks"||t.href.includes("/issues")?"issues":null:null}o(un,"inferIssueDetailSource");function mt(e){return e==="inbox"?{label:"Inbox",href:"/inbox"}:{label:"Tasks",href:"/issues"}}o(mt,"breadcrumbForSource");function Ls(e,t,n){return{issueDetailBreadcrumb:{label:e,href:t},issueDetailSource:n}}o(Ls,"createIssueDetailLocationState");function As(e){return typeof e!="object"||e===null?{issueDetailInboxQuickArchiveArmed:!0}:{...e,issueDetailInboxQuickArchiveArmed:!0}}o(As,"armIssueDetailInboxQuickArchive");function Ia(e){if(typeof window>"u"||!window.sessionStorage)return null;const t=window.sessionStorage.getItem(`${nn}${e}`);if(!t)return null;try{const n=JSON.parse(t),r=rn(n.issueDetailBreadcrumb)?n.issueDetailBreadcrumb:null,a=un(n,r);if(!r||!a)return null;const s=an(n.issueDetailHeaderSeed)?n.issueDetailHeaderSeed:void 0;return{issueDetailBreadcrumb:r,issueDetailSource:a,issueDetailInboxQuickArchiveArmed:n.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:s}}catch{return null}}o(Ia,"readStoredIssueDetailLocationState");function ln(e,t){if(typeof e=="object"&&e!==null){const a=e.issueDetailBreadcrumb;if(rn(a)){const s=un(e,a);if(!s)return null;const i=ya(e)??void 0;return{issueDetailBreadcrumb:a,issueDetailSource:s,issueDetailInboxQuickArchiveArmed:e.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:i}}}const n=va(t),r=wa(t);return n?{issueDetailBreadcrumb:r?{...mt(n),href:r}:mt(n),issueDetailSource:n,issueDetailInboxQuickArchiveArmed:!1}:null}o(ln,"normalizeIssueDetailLocationState");function Ds(e,t,n){if(typeof window>"u"||!window.sessionStorage)return;const r=ln(t,n);r&&window.sessionStorage.setItem(`${nn}${e}`,JSON.stringify(r))}o(Ds,"rememberIssueDetailLocationState");function Ra(e){return`/issues/${e}`}o(Ra,"createIssueDetailPath");function _s(e){if(!e)return!1;const t=new URLSearchParams(e);return t.has(en)||t.has(tn)}o(_s,"hasLegacyIssueDetailQuery");function Sa(e,t,n){const r=ln(t,n);return r||(e?Ia(e):null)}o(Sa,"readIssueDetailLocationState");function Ts(e,t,n){return Sa(e,t,n)?.issueDetailBreadcrumb??null}o(Ts,"readIssueDetailBreadcrumb");var ht=class extends Error{static{o(this,"CommentSubmissionUnknownError")}constructor(){super("We couldn’t confirm whether this comment was saved. Review the conversation before starting another draft."),this.name="CommentSubmissionUnknownError"}};function pt(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e,n=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;return typeof t.id=="string"&&n.test(t.id)&&typeof t.issueId=="string"&&n.test(t.issueId)&&typeof t.body=="string"}o(pt,"hasCommentReceipt");async function gt(e,t){try{const n=await e;if(!t(n))throw new ht;return n}catch(n){throw n instanceof Dn&&n.status<500?n:new ht}}o(gt,"confirmedCommentResponse");function yt(e){const t=new URLSearchParams;return e?.attention&&t.set("attention",e.attention),e?.status&&t.set("status",e.status),e?.projectId&&t.set("projectId",e.projectId),e?.parentId&&t.set("parentId",e.parentId),e?.assigneeAgentId&&t.set("assigneeAgentId",e.assigneeAgentId),e?.participantAgentId&&t.set("participantAgentId",e.participantAgentId),e?.assigneeUserId&&t.set("assigneeUserId",e.assigneeUserId),e?.touchedByUserId&&t.set("touchedByUserId",e.touchedByUserId),e?.inboxArchivedByUserId&&t.set("inboxArchivedByUserId",e.inboxArchivedByUserId),e?.unreadForUserId&&t.set("unreadForUserId",e.unreadForUserId),e?.labelId&&t.set("labelId",e.labelId),e?.workspaceId&&t.set("workspaceId",e.workspaceId),e?.executionWorkspaceId&&t.set("executionWorkspaceId",e.executionWorkspaceId),e?.originKind&&t.set("originKind",e.originKind),e?.originKindPrefix&&t.set("originKindPrefix",e.originKindPrefix),e?.originId&&t.set("originId",e.originId),e?.descendantOf&&t.set("descendantOf",e.descendantOf),e?.createdFromIssueId&&t.set("createdFromIssueId",e.createdFromIssueId),e?.includeRoutineExecutions&&t.set("includeRoutineExecutions","true"),e?.includeBlockedBy&&t.set("includeBlockedBy","true"),e?.includeBlockedInboxAttention&&t.set("includeBlockedInboxAttention","true"),e?.includeLiveDescendantSummary&&t.set("includeLiveDescendantSummary","true"),e?.hasPlanDocument!==void 0&&t.set("hasPlanDocument",e.hasPlanDocument?"true":"false"),e?.q&&t.set("q",e.q),e?.limit&&t.set("limit",String(e.limit)),e?.offset!==void 0&&t.set("offset",String(e.offset)),e?.sortField&&t.set("sortField",e.sortField),e?.sortDir&&t.set("sortDir",e.sortDir),e?.afterId&&t.set("afterId",e.afterId),t}o(yt,"issueListSearchParams");var K={listAll:o(async(e,t,n)=>{const a=new Map;let s;for(;;){const i=await K.list(e,{...t,limit:500,sortField:"id",sortDir:"asc",afterId:s},n);for(const l of i)a.set(l.id,l);if(i.length<500)return[...a.values()];s=i[i.length-1].id}},"listAll"),list:o((e,t,n)=>{const r=yt(t).toString(),a=`/companies/${e}/issues${r?`?${r}`:""}`;return n?p.get(a,n):p.get(a)},"list"),listCompact:o((e,t,n)=>{const r=yt(t);r.set("view","compact");const a=`/companies/${e}/issues?${r.toString()}`;return n?p.get(a,n):p.get(a)},"listCompact"),count:o((e,t)=>{const n=new URLSearchParams;return n.set("attention",t.attention),t.status&&n.set("status",t.status),t.assigneeAgentId&&n.set("assigneeAgentId",t.assigneeAgentId),t.assigneeUserId&&n.set("assigneeUserId",t.assigneeUserId),t.projectId&&n.set("projectId",t.projectId),t.labelId&&n.set("labelId",t.labelId),t.q&&n.set("q",t.q),p.get(`/companies/${e}/issues/count?${n.toString()}`)},"count"),listLabels:o(e=>p.get(`/companies/${e}/labels`),"listLabels"),createLabel:o((e,t)=>p.post(`/companies/${e}/labels`,t),"createLabel"),deleteLabel:o(e=>p.delete(`/labels/${e}`),"deleteLabel"),get:o((e,t)=>t?p.get(`/issues/${e}`,t):p.get(`/issues/${e}`),"get"),getRunnerGoal:o((e,t)=>{const n=t?`?agentId=${encodeURIComponent(t)}`:"";return p.get(`/issues/${e}/runner-goal${n}`)},"getRunnerGoal"),actOnRunnerGoal:o((e,t)=>p.post(`/issues/${e}/runner-goal/actions`,t),"actOnRunnerGoal"),getModelOverride:o(e=>p.get(`/issues/${e}/model-override`),"getModelOverride"),setModelOverride:o((e,t)=>p.put(`/issues/${e}/model-override`,t),"setModelOverride"),getWatchdog:o(e=>p.get(`/issues/${e}/watchdog`),"getWatchdog"),upsertWatchdog:o((e,t)=>p.put(`/issues/${e}/watchdog`,t),"upsertWatchdog"),deleteWatchdog:o(e=>p.delete(`/issues/${e}/watchdog`),"deleteWatchdog"),markRead:o(e=>p.post(`/issues/${e}/read`,{}),"markRead"),markUnread:o(e=>p.delete(`/issues/${e}/read`),"markUnread"),archiveFromInbox:o(e=>p.post(`/issues/${e}/inbox-archive`,{}),"archiveFromInbox"),unarchiveFromInbox:o(e=>p.delete(`/issues/${e}/inbox-archive`),"unarchiveFromInbox"),create:o((e,t)=>p.post(`/companies/${e}/issues`,t),"create"),update:o((e,t)=>{const n=p.patch(`/issues/${e}`,t);return typeof t.comment=="string"?gt(n,r=>pt(r?.comment)):n},"update"),decideStalledReview:o((e,t)=>p.post(`/issues/${e}/stalled-review-decision`,t),"decideStalledReview"),resolveRecoveryAction:o((e,t)=>p.post(`/issues/${e}/recovery-actions/resolve`,t),"resolveRecoveryAction"),previewTreeControl:o((e,t)=>p.post(`/issues/${e}/tree-control/preview`,t),"previewTreeControl"),createTreeHold:o((e,t)=>p.post(`/issues/${e}/tree-holds`,t),"createTreeHold"),getTreeHold:o((e,t)=>p.get(`/issues/${e}/tree-holds/${t}`),"getTreeHold"),listTreeHolds:o((e,t)=>{const n=new URLSearchParams;t?.status&&n.set("status",t.status),t?.mode&&n.set("mode",t.mode),t?.includeMembers&&n.set("includeMembers","true");const r=n.toString();return p.get(`/issues/${e}/tree-holds${r?`?${r}`:""}`)},"listTreeHolds"),getTreeControlState:o(e=>p.get(`/issues/${e}/tree-control/state`),"getTreeControlState"),releaseTreeHold:o((e,t,n)=>p.post(`/issues/${e}/tree-holds/${t}/release`,n),"releaseTreeHold"),checkMonitorNow:o(e=>p.post(`/issues/${e}/monitor/check-now`,{}),"checkMonitorNow"),retryScheduledRetryNow:o(e=>p.post(`/issues/${e}/scheduled-retry/retry-now`,{}),"retryScheduledRetryNow"),remove:o(e=>p.delete(`/issues/${e}`),"remove"),checkout:o((e,t)=>p.post(`/issues/${e}/checkout`,{agentId:t,expectedStatuses:["todo","backlog","blocked","in_review"]}),"checkout"),release:o(e=>p.post(`/issues/${e}/release`,{}),"release"),listComments:o((e,t)=>{const n=new URLSearchParams;t?.after&&n.set("after",t.after),t?.order&&n.set("order",t.order),t?.limit&&n.set("limit",String(t.limit));const r=n.toString();return p.get(`/issues/${e}/comments${r?`?${r}`:""}`)},"listComments"),getQueuedComments:o(e=>p.get(`/issues/${e}/queued-comments`),"getQueuedComments"),editQueuedComment:o((e,t,n)=>p.patch(`/issues/${e}/queued-comments/${t}`,n),"editQueuedComment"),reorderQueuedComments:o((e,t)=>p.put(`/issues/${e}/queued-comments/order`,t),"reorderQueuedComments"),interruptQueuedComments:o((e,t)=>p.post(`/issues/${e}/queued-comments/interrupt`,t),"interruptQueuedComments"),interruptLatestQueuedComments:o(async(e,t)=>{const n=await K.getQueuedComments(e);if(!n.queueId||n.targetRunId&&n.targetRunId!==t)throw new Error("The queued messages changed. Refresh and try again.");return K.interruptQueuedComments(e,{queueId:n.queueId,revision:n.revision,targetRunId:n.targetRunId})},"interruptLatestQueuedComments"),steerQueuedComment:o((e,t,n)=>p.post(`/issues/${e}/queued-comments/${t}/steer`,n),"steerQueuedComment"),discardQueuedComment:o((e,t,n)=>p.delete(`/issues/${e}/queued-comments/${t}`,n),"discardQueuedComment"),listInteractions:o(e=>p.get(`/issues/${e}/interactions`),"listInteractions"),listAcceptedPlanDecompositions:o(e=>p.get(`/issues/${e}/accepted-plan-decompositions`),"listAcceptedPlanDecompositions"),createInteraction:o((e,t)=>p.post(`/issues/${e}/interactions`,t),"createInteraction"),acceptInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/accept`,n??{}),"acceptInteraction"),rejectInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/reject`,n?{reason:n}:{}),"rejectInteraction"),cancelInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/cancel`,n?{reason:n}:{}),"cancelInteraction"),skipInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/skip`,n?{reason:n}:{}),"skipInteraction"),respondToInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/respond`,n),"respondToInteraction"),submitInteractionVerdicts:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/verdicts`,{verdicts:n}),"submitInteractionVerdicts"),getComment:o((e,t)=>p.get(`/issues/${e}/comments/${t}`),"getComment"),listFeedbackVotes:o(e=>p.get(`/issues/${e}/feedback-votes`),"listFeedbackVotes"),getCostSummary:o((e,t={})=>{const n=t.excludeRoot?"?excludeRoot=true":"";return p.get(`/issues/${e}/cost-summary${n}`)},"getCostSummary"),listFeedbackTraces:o((e,t)=>{const n=new URLSearchParams;for(const[a,s]of Object.entries(t??{}))s!==void 0&&n.set(a,String(s));const r=n.toString();return p.get(`/issues/${e}/feedback-traces${r?`?${r}`:""}`)},"listFeedbackTraces"),upsertFeedbackVote:o((e,t)=>p.post(`/issues/${e}/feedback-votes`,t),"upsertFeedbackVote"),addComment:o((e,t,n,r,a,s,i)=>gt(p.post(`/issues/${e}/comments`,{body:t,...s?{clientRequestId:s}:{},...n===void 0?{}:{reopen:n},...r===void 0?{}:{interrupt:r},...a?.length?{attachmentIds:a}:{},...i===void 0?{}:{deliver:i}}),pt),"addComment"),cancelComment:o((e,t)=>p.delete(`/issues/${e}/comments/${t}?mode=cancel`),"cancelComment"),deleteComment:o((e,t)=>p.delete(`/issues/${e}/comments/${t}`),"deleteComment"),listDocuments:o((e,t)=>p.get(`/issues/${e}/documents${t?.includeSystem?"?includeSystem=true":""}`),"listDocuments"),getDocument:o((e,t)=>p.get(`/issues/${e}/documents/${encodeURIComponent(t)}`),"getDocument"),getDocumentPdf:o((e,t)=>p.getBlob(`/issues/${e}/documents/${encodeURIComponent(t)}/pdf`),"getDocumentPdf"),upsertDocument:o((e,t,n)=>p.put(`/issues/${e}/documents/${encodeURIComponent(t)}`,n),"upsertDocument"),lockDocument:o((e,t)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/lock`,{}),"lockDocument"),unlockDocument:o((e,t)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/unlock`,{}),"unlockDocument"),listDocumentRevisions:o((e,t)=>p.get(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions`),"listDocumentRevisions"),restoreDocumentRevision:o((e,t,n)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions/${n}/restore`,{}),"restoreDocumentRevision"),deleteDocument:o((e,t)=>p.delete(`/issues/${e}/documents/${encodeURIComponent(t)}`),"deleteDocument"),listAttachments:o(e=>p.get(`/issues/${e}/attachments`),"listAttachments"),uploadAttachment:o((e,t,n,r)=>{const a=new FormData;return a.append("file",n),r&&a.append("issueCommentId",r),p.postForm(`/companies/${e}/issues/${t}/attachments`,a)},"uploadAttachment"),deleteAttachment:o(e=>p.delete(`/attachments/${e}`),"deleteAttachment"),listApprovals:o(e=>p.get(`/issues/${e}/approvals`),"listApprovals"),linkApproval:o((e,t)=>p.post(`/issues/${e}/approvals`,{approvalId:t}),"linkApproval"),unlinkApproval:o((e,t)=>p.delete(`/issues/${e}/approvals/${t}`),"unlinkApproval"),listWorkProducts:o((e,t)=>p.get(`/issues/${e}/work-products${t?.refreshPullRequests?"?refreshPullRequests=true":""}`),"listWorkProducts"),ensureWorkProductReviewDocument:o((e,t)=>p.post(`/issues/${e}/work-products/${t}/review-document`,{}),"ensureWorkProductReviewDocument"),createWorkProduct:o((e,t)=>p.post(`/issues/${e}/work-products`,t),"createWorkProduct"),updateWorkProduct:o((e,t)=>p.patch(`/work-products/${e}`,t),"updateWorkProduct"),deleteWorkProduct:o(e=>p.delete(`/work-products/${e}`),"deleteWorkProduct")};function V(e){return new Date(e).getTime()}o(V,"toTimestamp");function xa(){const e=globalThis.crypto?.randomUUID?.();return e?`optimistic-${e}`:`optimistic-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}o(xa,"createOptimisticCommentId");function Ve(e){return[...e].sort((t,n)=>{const r=V(t.createdAt)-V(n.createdAt);return r!==0?r:t.id.localeCompare(n.id)})}o(Ve,"sortIssueComments");function vt(e){return Ve(e).reverse()}o(vt,"sortIssueCommentsDesc");function Os(e){const t=new Date,n=xa();return{id:n,clientId:n,companyId:e.companyId,issueId:e.issueId,authorType:"user",authorAgentId:null,authorUserId:e.authorUserId,body:e.body,presentation:null,metadata:null,clientStatus:e.clientStatus??"pending",queueTargetRunId:e.queueTargetRunId??null,createdAt:t,updatedAt:t}}o(Os,"createOptimisticIssueComment");function Ns(e){return e.runId||e.interruptedRunId||e.comment.id&&(e.comment.id===e.activeRunWakeCommentId||e.comment.id===e.activeRunCommentId)||e.comment.authorAgentId&&e.activeRunAgentId&&e.comment.authorAgentId===e.activeRunAgentId?!1:e.comment.clientStatus==="queued"?!0:e.activeRunStartedAt?V(e.comment.createdAt)>=V(e.activeRunStartedAt):!1}o(Ns,"isQueuedIssueComment");function Ms(e,t){const n=t.queuedTargetRunId??null;return!n||!t.targetRunIsLive||t.runningRunId&&t.runningRunId!==n?e:{...e,clientStatus:"queued",queueState:"queued",queueTargetRunId:n}}o(Ms,"applyLocalQueuedIssueCommentState");function Us(e,t){const n=e??[],r=[...n],a=new Set(r.map(i=>i.id)),s=new Set;for(const i of t){if(a.has(i.id))continue;const l=n.find(c=>!s.has(c.id)&&c.issueId===i.issueId&&c.authorType===i.authorType&&c.authorUserId===i.authorUserId&&c.body===i.body&&Math.abs(V(c.createdAt)-V(i.createdAt))<=6e4);if(l){s.add(l.id);const c={...l,clientId:i.clientId};r[r.findIndex(d=>d.id===l.id)]=c;continue}r.push(i)}return Ve(r)}o(Us,"mergeIssueComments");function js(e,t){const n=e.findIndex(r=>r.clientId===t);return n===-1?{comments:e,comment:null}:{comments:e.filter(r=>r.clientId!==t),comment:e[n]??null}}o(js,"takeOptimisticIssueComment");function Fs(e){return Ve((e??[]).flatMap(t=>t))}o(Fs,"flattenIssueCommentPages");function Ea(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}o(Ea,"getNextIssueCommentPageParam");function wt(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}o(wt,"getNextPageCursor");async function Bs(e){const t=(e.pages??[]).map(i=>[...i]),n=e.pageParams?[...e.pageParams].slice(0,t.length):t.map(()=>null);for(;n.length<t.length;)n.push(null);if(e.pageSize<=0)return{pages:t,pageParams:n};let r=wt(t[t.length-1],e.pageSize);const a=Math.max(0,e.maxPages??Number.POSITIVE_INFINITY),s=new Set;for(;r&&!s.has(r)&&s.size<a;){s.add(r);const i=[...await e.fetchPage(r)];t.push(i),n.push(r),r=wt(i,e.pageSize)}return{pages:t,pageParams:n}}o(Bs,"loadRemainingIssueCommentPages");function Hs(e){return e.activeDetailTab!=="chat"||!e.hasOlderComments||e.initialPageLoading||e.olderPageLoading||e.loadedCommentCount===0?!1:e.loadedCommentCount<e.autoLoadLimit}o(Hs,"shouldAutoloadOlderIssueComments");function Ws(e,t){if(!e)return e;const n={...e};return t.reopen===!0&&(e.status==="done"||e.status==="cancelled"||e.status==="blocked")&&(n.status="todo"),t.reassignment&&(n.assigneeAgentId=t.reassignment.assigneeAgentId,n.assigneeUserId=t.reassignment.assigneeUserId),n}o(Ws,"applyOptimisticIssueCommentUpdate");function ba(e,t){if(!e)return e;const n={...e,updatedAt:new Date},r=o(s=>Object.prototype.hasOwnProperty.call(t,s),"hasOwn"),a=o(s=>{r(s)&&(n[s]=t[s])},"assign");if(a("status"),a("priority"),a("assigneeAgentId"),a("assigneeUserId"),a("projectId"),a("parentId"),a("projectWorkspaceId"),a("executionWorkspaceId"),a("executionWorkspacePreference"),a("executionWorkspaceSettings"),a("hiddenAt"),r("labelIds")&&Array.isArray(t.labelIds)){const s=t.labelIds.filter(i=>typeof i=="string");n.labelIds=s,e.labels&&(n.labels=e.labels.filter(i=>s.includes(i.id)))}if(r("blockedByIssueIds")&&Array.isArray(t.blockedByIssueIds)&&e.blockedBy){const s=new Set(t.blockedByIssueIds.filter(i=>typeof i=="string"));n.blockedBy=e.blockedBy.filter(i=>s.has(i.id))}return r("projectId")&&(n.project=e.project?.id===n.projectId?e.project:null),r("parentId")&&(n.ancestors=void 0),r("executionWorkspaceId")&&(n.currentExecutionWorkspace=e.currentExecutionWorkspace?.id===n.executionWorkspaceId?e.currentExecutionWorkspace:null),n}o(ba,"applyOptimisticIssueFieldUpdate");function Ca(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}o(Ca,"matchesIssueRef$1");function qs(e,t,n){if(!e)return e;let r=!1;const a=e.map(s=>Ca(s,t)?(r=!0,ba(s,n)??s):s);return r?a:e}o(qs,"applyOptimisticIssueFieldUpdateToCollection");function zs(e,t){if(!e||e.length===0)return[[t]];const n=e.map(r=>[...r]);for(let r=0;r<n.length;r+=1){const a=n[r].findIndex(s=>s.id===t.id);if(a!==-1)return n[r][a]=t,n[r]=vt(n[r]),n}return n[0]=vt([...n[0],t]),n}o(zs,"upsertIssueCommentInPages");function Qs(e,t){return!e||e.length===0?[]:e.map(n=>n.filter(r=>r.id!==t)).filter(n=>n.length>0)}o(Qs,"removeIssueCommentFromPages");var ka=["issues","detail"],cn=6e4,$a=3e4;function re(e){return typeof e=="string"&&e.length>0}o(re,"isNonEmptyString");function dn(e,t){const n=new Set;return re(e)&&n.add(e),re(t?.id)&&n.add(t.id),re(t?.identifier)&&n.add(t.identifier),Array.from(n)}o(dn,"collectIssueRefs");function Pa(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}o(Pa,"matchesIssueRef");function Ie(e){if(typeof e!="object"||e===null)return!1;const t=e;return re(t.id)&&re(t.companyId)&&typeof t.title=="string"&&typeof t.status=="string"&&typeof t.workMode=="string"&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.parentId===null||typeof t.parentId=="string")&&(t.identifier===null||typeof t.identifier=="string")&&(t.description===null||typeof t.description=="string")&&(t.assigneeAgentId===null||typeof t.assigneeAgentId=="string")&&(t.assigneeUserId===null||typeof t.assigneeUserId=="string")&&(t.executionRunId===null||typeof t.executionRunId=="string")&&(t.issueNumber===null||typeof t.issueNumber=="number")&&typeof t.requestDepth=="number"&&t.createdAt!=null&&t.updatedAt!=null}o(Ie,"isCompleteIssueSnapshot");function It(e,t){return e?{...e,...t}:t}o(It,"mergeIssueSnapshots");function fn(e,t,n){const r=dn(t,n);for(const a of r){const s=e.getQueryData(ie.issues.detail(a));if(Ie(s))return s}return e.getQueriesData({queryKey:ka}).map(([,a])=>a).find(a=>Ie(a)&&Pa(a,r))}o(fn,"getCachedIssueDetail");function mn(e,t,n){if(!Ie(t))return t;const r=dn(n?.issueRef,t),a=It(fn(e,n?.issueRef,t),t);for(const s of r)e.setQueryData(ie.issues.detail(s),i=>It(i,a));return a}o(mn,"seedIssueDetailCache");async function hn(e,t,n){return mn(e,n?await K.get(t,n):await K.get(t),{issueRef:t})}o(hn,"fetchIssueDetail");function La(e,t,n){return{queryKey:ie.issues.detail(t),queryFn:o(({signal:r})=>hn(e,t,{signal:r}),"queryFn"),placeholderData:fn(e,t,n?.placeholderIssue??void 0)}}o(La,"getIssueDetailQueryOptions");function Aa(e,t,n){return Ie(n?.issue)&&mn(e,n.issue,{issueRef:t}),e.prefetchQuery({queryKey:ie.issues.detail(t),queryFn:o(()=>hn(e,t),"queryFn"),staleTime:cn})}o(Aa,"prefetchIssueDetail");function Da(e,t){return e.prefetchInfiniteQuery({queryKey:ie.issues.comments(t),queryFn:o(({pageParam:n})=>K.listComments(t,{order:"desc",limit:50,...n?{after:n}:{}}),"queryFn"),initialPageParam:null,getNextPageParam:o(n=>Ea(n,50),"getNextPageParam"),staleTime:$a,pages:1})}o(Da,"prefetchIssueComments");function _a(e,t,n){return Promise.all([Aa(e,t,n),Da(e,t)])}o(_a,"prefetchIssueDetailForNavigation");var Ta=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Oa=Re("box",Ta),Na=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Ma=Re("briefcase",Na),Ua=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]],ja=Re("compass",Ua),Fa=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ba=Re("layers",Fa),Rt={folder:yr,rocket:cr,code:On,terminal:ir,database:Un,globe:mr,package:sr,boxes:Fn,box:Oa,layers:Ba,briefcase:Ma,compass:ja,target:Qn,flame:fr,zap:lr,star:ar,bug:er,wrench:or,hammer:Jn,lightbulb:zn,sparkles:ur,shield:Kn,lock:Gn,search:nr,cog:tr,brain:jn,cpu:Bn,"git-branch":Wn,"file-code":qn,puzzle:Yn,gem:Nn,atom:Hn,heart:hr,mail:Xn,"message-square":rr,crown:Mn,radar:Vn,telescope:Zn,hexagon:dr},Ha="folder";function Wa(e){return e&&$n.includes(e)?Rt[e]:Rt[Ha]}o(Wa,"getProjectIcon");var x=bt(kn(),1),qa={xs:{box:"h-4 w-4 rounded-sm",icon:"h-2.5 w-2.5"},sm:{box:"h-6 w-6 rounded-md",icon:"h-3.5 w-3.5"},md:{box:"h-7 w-7 rounded-lg",icon:"h-4 w-4"},lg:{box:"h-9 w-9 rounded-lg",icon:"h-5 w-5"}};function za({color:e,icon:t,size:n="md",className:r}){const a=qa[n],s=!!e,i=Wa(t);return(0,x.jsx)("span",{"aria-hidden":!0,className:Be("inline-flex shrink-0 items-center justify-center",a.box,s?"text-white":"bg-muted text-muted-foreground",r),style:s?{backgroundColor:e??void 0}:void 0,children:(0,x.jsx)(i,{className:a.icon})})}o(za,"ProjectTile");var ae=null,Fe=new Set;function pn(){for(const e of Fe)e()}o(pn,"emitQuicklookChange");function St(e){ae!==e&&(ae=e,pn())}o(St,"openQuicklookId");function xt(e){ae===e&&(ae=null,pn())}o(xt,"closeQuicklookId");function Qa(e){return Fe.add(e),()=>{Fe.delete(e)}}o(Qa,"subscribeQuicklook");function Ja(e){return u.useSyncExternalStore(Qa,()=>ae===e,()=>!1)}o(Ja,"useIsQuicklookOpen");var Ka=120,Va=13,Ya="w-72 p-3";function Ga(e="start"){return e==="start"?-13:e==="end"?Va:0}o(Ga,"quicklookAlignOffset");function Xa(e){if(!e)return null;const t=e.replace(/!\[[^\]]*]\([^)]+\)/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[#>*_`~-]+/g," ").replace(/\s+/g," ").trim();return t?t.length>180?`${t.slice(0,177).trimEnd()}...`:t:null}o(Xa,"summarizeIssueDescription");function Za({className:e}){return(0,x.jsx)("span",{className:Be("text-xs",e),"aria-hidden":!0,children:"·"})}o(Za,"QuicklookSeparator");function es(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}o(es,"statusLabel");function ts({issue:e,linkTo:t,linkState:n,compact:r=!1}){const a=(0,u.useMemo)(()=>Xa(e.description),[e.description]),s=e.project?.name;return(0,x.jsxs)("div",{className:Be("space-y-2",r&&"space-y-1.5"),children:[(0,x.jsxs)("div",{className:"flex items-center gap-1",children:[(0,x.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,x.jsx)(wr,{status:e.status,size:"md",title:es(e.status)}),(0,x.jsx)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-muted-foreground",children:e.identifier??e.id.slice(0,8)}),s?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Za,{className:"shrink-0 text-muted-foreground"}),(0,x.jsxs)("span",{className:"flex min-w-0 max-w-(--sz-12rem) flex-1 items-center gap-1 text-(length:--text-micro) text-muted-foreground",title:s,"data-testid":"quicklook-project",children:[(0,x.jsx)(za,{size:"xs"}),(0,x.jsx)("span",{className:"truncate",children:s})]})]}):null]}),(0,x.jsx)("span",{className:"shrink-0 text-(length:--text-micro) text-muted-foreground",children:pa(new Date(e.updatedAt))})]}),(0,x.jsx)(ce,{to:t,state:n??sn(null,e),className:"block text-sm font-medium leading-snug hover:underline line-clamp-2",children:e.title}),a?(0,x.jsx)("p",{className:"text-xs leading-5 text-muted-foreground [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:4] overflow-hidden",children:a}):null]})}o(ts,"IssueQuicklookCard");var ns=u.forwardRef(o(function({issuePathId:t,to:n,children:r,className:a,state:s,disableIssueQuicklook:i=!1,issuePrefetch:l=null,issueQuicklookSide:c="top",issueQuicklookAlign:d="start",onClick:m,onClickCapture:f,onMouseEnter:g,onFocus:v,onBlur:w,onTouchStart:y,...h},I){const R=Ln(),S=u.useMemo(()=>Symbol("issue-quicklook"),[]),k=Ja(S),E=u.useRef(null),$=u.useRef(null),A=u.useRef(null),N=u.useCallback(b=>{$.current=b,typeof I=="function"?I(b):I&&(I.current=b)},[I]),P=u.useCallback(()=>{E.current&&(clearTimeout(E.current),E.current=null)},[]),U=u.useCallback(()=>{P(),St(S)},[P,S]),Q=u.useCallback(()=>{P(),E.current=setTimeout(()=>{E.current=null,St(S)},Ka)},[P,S]),T=u.useCallback(()=>{P(),xt(S)},[P,S]);u.useEffect(()=>()=>{P(),xt(S)},[P,S]),u.useEffect(()=>{if(!k)return;const b=12,Xe=o((q,te,J)=>{if(!q)return!1;const W=q.getBoundingClientRect();return te>=W.left-b&&te<=W.right+b&&J>=W.top-b&&J<=W.bottom+b},"nearBox"),bn=o((q,te)=>{const J=$.current,W=A.current;if(J?.matches(":hover")||W?.matches(":hover")||Xe(J,q,te)||Xe(W,q,te))return!0;const Pe=document.activeElement;return J===Pe||!!W&&!!Pe&&W.contains(Pe)},"stillEngaged"),Ze=o(q=>{bn(q.clientX,q.clientY)||T()},"onPointerMove");return document.addEventListener("pointermove",Ze,{passive:!0}),()=>document.removeEventListener("pointermove",Ze)},[k,T]);const H=l?sn(s,l):s,{data:j,isLoading:F}=_n({...La(R,t,{placeholderIssue:l??void 0}),enabled:k,staleTime:cn}),En=Ra(t),ee=u.useCallback(()=>{_a(R,t,{issue:l})},[t,l,R]),Ge=(0,x.jsx)(ce,{ref:N,to:n,state:H,className:a,onMouseEnter:o(b=>{ee(),g?.(b)},"onMouseEnter"),onFocus:o(b=>{ee(),U(),v?.(b)},"onFocus"),onBlur:o(b=>{setTimeout(()=>T(),0),w?.(b)},"onBlur"),onTouchStart:o(b=>{ee(),y?.(b)},"onTouchStart"),onClickCapture:o(b=>{ee(),f?.(b)},"onClickCapture"),onClick:o(b=>{T(),m?.(b)},"onClick"),...h,children:r});return i?Ge:(0,x.jsxs)(vr,{open:k,onOpenChange:o(b=>b?U():T(),"onOpenChange"),children:[(0,x.jsx)(gr,{asChild:!0,onMouseEnter:o(()=>{ee(),Q()},"onMouseEnter"),onMouseLeave:T,children:Ge}),(0,x.jsx)(pr,{ref:A,"data-quicklook":!0,className:Ya,side:c,align:d,alignOffset:Ga(d),onMouseEnter:U,onMouseLeave:T,onOpenAutoFocus:o(b=>b.preventDefault(),"onOpenAutoFocus"),onCloseAutoFocus:o(b=>b.preventDefault(),"onCloseAutoFocus"),children:j?(0,x.jsx)(ts,{issue:j,linkTo:En,linkState:H,compact:!0}):(0,x.jsxs)("div",{className:"space-y-2",children:[(0,x.jsx)("div",{className:"h-4 w-24 rounded bg-accent/50"}),(0,x.jsx)("div",{className:"h-4 w-full rounded bg-accent/40"}),(0,x.jsx)("div",{className:"h-4 w-3/4 rounded bg-accent/30"}),F?null:(0,x.jsx)("p",{className:"text-xs text-muted-foreground",children:"Unable to load task preview."})]})})]})},"IssueLinkQuicklookImpl")),gn=new Set(["dashboard","companies","company","skills","teams-catalog","org","agents","chats","apps","projects","workspaces","execution-workspaces","issues","tasks","routines","goals","artifacts","tools","approvals","costs","usage","activity","audit","decisions","inbox","board-chat","artifacts","u","design-guide","search","settings","timeline"]),Ye=new Set(["auth","invite","board-claim","cli-auth","docs","instance"]);function se(e){return e.trim().toUpperCase()}o(se,"normalizeCompanyPrefix");function yn(e){const t=e.match(/^([^?#]*)(\?[^#]*)?(#.*)?$/);return{pathname:t?.[1]??e,search:t?.[2]??"",hash:t?.[3]??""}}o(yn,"splitPath");function rs(e){return e.split("/").filter(Boolean)[0]??null}o(rs,"getRootSegment");function os(e){if(e==="/")return!0;const t=rs(e);return t?Ye.has(t.toLowerCase()):!0}o(os,"isGlobalPath");function vn(e){const t=e.split("/").filter(Boolean);if(t.length===0)return null;const n=t[0].toLowerCase();return Ye.has(n)||gn.has(n)?null:se(t[0])}o(vn,"extractCompanyPrefixFromPath");function Et(e,t){const{pathname:n,search:r,hash:a}=yn(e);if(!n.startsWith("/")||os(n)||!t)return e;const s=se(t);return vn(n)?e:`/${s}${n}${r}${a}`}o(Et,"applyCompanyPrefix");function as(e,...t){const n=["cases",...t].filter(Boolean).join("/");return e?`/${se(e)}/${n}`:`/${n}`}o(as,"caseHref");function Js(e){const{pathname:t,search:n,hash:r}=yn(e),a=t.split("/").filter(Boolean);if(a.length>=2){const s=a[1].toLowerCase();if(!Ye.has(a[0].toLowerCase())&&gn.has(s))return`/${a.slice(1).join("/")}${n}${r}`}return`${t}${n}${r}`}o(Js,"toCompanyRelativePath");var wn=/^[A-Z][A-Z0-9]*-\d+$/i,ss=/^issue:\/\/:?([^?#\s]+)(?:[?#].*)?$/i,is=/issue:\/\/:?[^\s<>()]+|https?:\/\/[^\s<>()]+|\/(?:[^\s<>()/]+\/)*issues\/[A-Z][A-Z0-9]*-\d+(?=$|[\s<>)\],.;!?:])|\b[A-Z][A-Z0-9]*-\d+\b/gi;function In(e){if(!e)return null;const t=e.trim();if(!t||/^https?:\/\//i.test(t))return null;const n=t.split("/").filter(Boolean),r=n.findIndex(s=>s==="issues");if(r===-1||r===n.length-1)return null;const a=decodeURIComponent(n[r+1]??"");return!a||a.startsWith(":")?null:wn.test(a)?a.toUpperCase():a}o(In,"parseIssuePathIdFromPath");function Rn(e,t){if(!e)return null;const n=e.trim(),r=n.match(ss);if(r?.[1]){const i=decodeURIComponent(r[1]);return{issuePathId:i,href:`/issues/${encodeURIComponent(i)}`}}const a=In(e);if(a)return{issuePathId:a,href:`/issues/${encodeURIComponent(a)}`};if(!wn.test(n))return null;const s=n.toUpperCase();if(t&&t.size>0){const i=s.split("-")[0];if(!i||!t.has(i))return null}return{issuePathId:s,href:`/issues/${encodeURIComponent(s)}`}}o(Rn,"parseIssueReferenceFromHref");function us(e){let t=e,n="";for(;t.length>0;){const r=t.at(-1);if(!r||!/[),.;!?:\]]/.test(r))break;if(r===")"){const a=(t.match(/\(/g)??[]).length;if((t.match(/\)/g)??[]).length<=a)break}if(r==="]"){const a=(t.match(/\[/g)??[]).length;if((t.match(/\]/g)??[]).length<=a)break}n=`${r}${n}`,t=t.slice(0,-1)}return{core:t,trailing:n}}o(us,"splitTrailingPunctuation");function Sn(e,t,n="text"){return{type:"link",url:t,children:[{type:n,value:e}]}}o(Sn,"createIssueLinkNode");function ls(e,t){const n=[];let r=0,a=!1;for(const s of e.matchAll(is)){const i=s[0];if(!i)continue;const l=s.index??0,c=l+i.length,{core:d,trailing:m}=us(i),f=Rn(d,t);f&&(a=!0,l>r&&n.push({type:"text",value:e.slice(r,l)}),n.push(Sn(d,f.href)),m&&n.push({type:"text",value:m}),r=c)}return a?(r<e.length&&n.push({type:"text",value:e.slice(r)}),n):null}o(ls,"linkifyIssueReferencesInText");function xn(e,t){if(!Array.isArray(e.children)||e.children.length===0||e.type==="link"||e.type==="linkReference"||e.type==="code"||e.type==="definition"||e.type==="html")return;const n=[];for(const r of e.children){if(r.type==="inlineCode"&&typeof r.value=="string"){const a=Rn(r.value,t);if(a){n.push(Sn(r.value,a.href,"inlineCode"));continue}}if(r.type==="text"&&typeof r.value=="string"){const a=ls(r.value,t);if(a){n.push(...a);continue}}xn(r,t),n.push(r)}e.children=n}o(xn,"rewriteMarkdownTree");function Ks(e){const t=e?.knownPrefixes&&e.knownPrefixes.length>0?new Set(e.knownPrefixes.map(n=>n.toUpperCase())):void 0;return n=>{xn(n,t)}}o(Ks,"remarkLinkIssueReferences");function $e(e,t){if(typeof e=="string")return Et(e,t);if(e.pathname&&e.pathname.startsWith("/")){const n=Et(e.pathname,t);if(n!==e.pathname)return{...e,pathname:n}}return e}o($e,"resolveTo");function de(){const{selectedCompany:e}=An(),t=uo(),n=_();if(t.companyPrefix)return se(t.companyPrefix);const r=vn(n.pathname);return r||(e?se(e.issuePrefix):null)}o(de,"useActiveCompanyPrefix");function Vs(){const e=de();return u.useCallback((...t)=>as(e,...t),[e])}o(Vs,"useCaseHref");var Ys=u.forwardRef(o(function({to:t,disableIssueQuicklook:n=!1,issuePrefetch:r=null,issueQuicklookSide:a,issueQuicklookAlign:s,...i},l){const c=$e(t,de()),d=In(typeof c=="string"?c:c.pathname);return d?(0,x.jsx)(ns,{ref:l,to:c,issuePathId:d,disableIssueQuicklook:n,issuePrefetch:r,issueQuicklookSide:a,issueQuicklookAlign:s,...i}):(0,x.jsx)(ce,{ref:l,to:c,...i})},"CompanyLink")),Gs=u.forwardRef(o(function({to:t,...n},r){const a=de();return(0,x.jsx)(Xt,{ref:r,to:$e(t,a),...n})},"CompanyNavLink"));function Xs({to:e,...t}){const n=de();return(0,x.jsx)(Eo,{to:$e(e,n),...t})}o(Xs,"Navigate");function Zs(){const e=xe(),t=de();return u.useCallback(((n,r)=>{if(typeof n=="number"){e(n);return}e($e(n,t),r)}),[e,t])}o(Zs,"useNavigate");export{ce as $,Fs as A,K as B,La as C,ba as D,Ws as E,Us as F,_s as G,As as H,Qs as I,Sa as J,Ts as K,Hs as L,Ns as M,Bs as N,qs as O,Ca as P,ks as Q,js as R,Oa as S,Ms as T,Ls as U,ht as V,Ra as W,sn as X,Ds as Y,pa as Z,Ga as _,Vs as a,xe as at,Ba as b,Ks as c,$s as ct,os as d,Ss as et,se as f,Ya as g,ts as h,de as i,_ as it,Ea as j,Os as k,Et as l,ns as m,Gs as n,xs as nt,Zs as o,Is as ot,Js as p,ya as q,Xs as r,Ps as rt,Rn as s,uo as st,Ys as t,bo as tt,vn as u,za as v,_a as w,ja as x,Rt as y,zs as z};
15
+ `}});if(Tt(e))return u.createElement(lt,{title:"Unhandled Thrown Response!"},u.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let a;if(e instanceof Error)a=e;else{let s=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(s)}return u.createElement(lt,{title:"Application Error!",isOutsideRemixApp:t},u.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),u.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),r)}o(ta,"RemixRootDefaultErrorBoundary");function lt({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:a}=z();return a.root?.Layout&&!n?r:u.createElement("html",{lang:"en"},u.createElement("head",null,u.createElement("meta",{charSet:"utf-8"}),u.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),u.createElement("title",null,e)),u.createElement("body",null,u.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},r,t?u.createElement(Zo,null):null)))}o(lt,"BoundaryShell");var na=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{na&&(window.__reactRouterVersion="7.18.2")}catch{}function ks({basename:e,children:t,useTransitions:n,window:r}){let a=u.useRef();a.current==null&&(a.current=Rr({window:r,v5Compat:!0}));let s=a.current,[i,l]=u.useState({action:s.action,location:s.location}),c=u.useCallback(d=>{n===!1?l(d):u.startTransition(()=>l(d))},[n]);return u.useLayoutEffect(()=>s.listen(c),[s,c]),u.createElement(Kt,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:s,useTransitions:n})}o(ks,"BrowserRouter");function ra({basename:e,children:t,history:n,useTransitions:r}){let[a,s]=u.useState({action:n.action,location:n.location}),i=u.useCallback(l=>{r===!1?s(l):u.startTransition(()=>s(l))},[r]);return u.useLayoutEffect(()=>n.listen(i),[n,i]),u.createElement(Kt,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:n,useTransitions:r})}o(ra,"HistoryRouter");ra.displayName="unstable_HistoryRouter";var ce=u.forwardRef(o(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:s,replace:i,mask:l,state:c,target:d,to:m,preventScrollReset:f,viewTransition:g,defaultShouldRevalidate:v,...w},y){let{basename:h,navigator:I,useTransitions:R}=u.useContext(L),S=typeof m=="string"&&He.test(m),k=Nt(m,h);m=k.to;let E=oo(m,{relative:a}),$=_(),A=null;if(l){let F=Se(l,[],$.mask?$.mask.pathname:"/",!0);h!=="/"&&(F.pathname=F.pathname==="/"?h:M([h,F.pathname])),A=I.createHref(F)}let[N,P,U]=Qo(r,w),Q=ia(m,{replace:i,mask:l,state:c,target:d,preventScrollReset:f,relative:a,viewTransition:g,defaultShouldRevalidate:v,useTransitions:R});function T(F){t&&t(F),F.defaultPrevented||Q(F)}o(T,"handleClick");let H=!(k.isExternal||s),j=u.createElement("a",{...w,...U,href:(H?A:void 0)||k.absoluteURL||E,onClick:H?T:t,ref:ea(y,P),target:d,"data-discover":!S&&n==="render"?"true":void 0});return N&&!S?u.createElement(u.Fragment,null,j,u.createElement(Ko,{page:E})):j},"LinkWithRef"));ce.displayName="Link";var Xt=u.forwardRef(o(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:s,to:i,viewTransition:l,children:c,...d},m){let f=le(i,{relative:d.relative}),g=_(),v=u.useContext(ue),{navigator:w,basename:y}=u.useContext(L),h=v!=null&&ha(f)&&l===!0,I=w.encodeLocation?w.encodeLocation(f).pathname:f.pathname,R=g.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(R=R.toLowerCase(),S=S?S.toLowerCase():null,I=I.toLowerCase()),S&&y&&(S=B(S,y)||S);const k=I!=="/"&&I.endsWith("/")?I.length-1:I.length;let E=R===I||!a&&R.startsWith(I)&&R.charAt(k)==="/",$=S!=null&&(S===I||!a&&S.startsWith(I)&&S.charAt(I.length)==="/"),A={isActive:E,isPending:$,isTransitioning:h},N=E?t:void 0,P;typeof r=="function"?P=r(A):P=[r,E?"active":null,$?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let U=typeof s=="function"?s(A):s;return u.createElement(ce,{...d,"aria-current":N,className:P,ref:m,style:U,to:i,viewTransition:l},typeof c=="function"?c(A):c)},"NavLinkWithRef"));Xt.displayName="NavLink";var oa=u.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:s,method:i=he,action:l,onSubmit:c,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g,...v},w)=>{let{useTransitions:y}=u.useContext(L),h=ca(),I=da(l,{relative:d}),R=i.toLowerCase()==="get"?"get":"post",S=typeof l=="string"&&He.test(l),k=o(E=>{if(c&&c(E),E.defaultPrevented)return;E.preventDefault();let $=E.nativeEvent.submitter,A=$?.getAttribute("formmethod")||i,N=o(()=>h($||E.currentTarget,{fetcherKey:t,method:A,navigate:n,replace:a,state:s,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g}),"doSubmit");y&&n!==!1?u.startTransition(()=>N()):N()},"submitHandler");return u.createElement("form",{ref:w,method:R,action:I,onSubmit:r?c:k,...v,"data-discover":!S&&e==="render"?"true":void 0})});oa.displayName="Form";function aa({getKey:e,storageKey:t,...n}){let r=u.useContext(ke),{basename:a}=u.useContext(L),s=_(),i=Qt();fa({getKey:e,storageKey:t});let l=u.useMemo(()=>{if(!r||!e)return null;let d=Ue(s,i,a,e);return d!==s.key?d:null},[]);if(!r||r.isSpaMode)return null;let c=((d,m)=>{if(!window.history.state||!window.history.state.key){let f=Math.random().toString(32).slice(2);window.history.replaceState({key:f},"")}try{let f=JSON.parse(sessionStorage.getItem(d)||"{}")[m||window.history.state.key];typeof f=="number"&&window.scrollTo(0,f)}catch{sessionStorage.removeItem(d)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),u.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${it(JSON.stringify(t||Me))}, ${it(JSON.stringify(l))})`}})}o(aa,"ScrollRestoration");aa.displayName="ScrollRestoration";function Zt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}o(Zt,"getDataRouterConsoleError2");function Ke(e){let t=u.useContext(G);return C(t,Zt(e)),t}o(Ke,"useDataRouterContext3");function sa(e){let t=u.useContext(ue);return C(t,Zt(e)),t}o(sa,"useDataRouterState2");function ia(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c,useTransitions:d}={}){let m=xe(),f=_(),g=le(e,{relative:i});return u.useCallback(v=>{if(Lo(v,t)){v.preventDefault();let w=n!==void 0?n:oe(f)===oe(g),y=o(()=>m(e,{replace:w,mask:r,state:a,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c}),"doNavigate");d?u.startTransition(()=>y()):y()}},[f,m,g,n,r,a,t,e,s,i,l,c,d])}o(ia,"useLinkClickHandler");function $s(e){D(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=u.useRef(Ne(e)),n=u.useRef(!1),r=_(),a=u.useMemo(()=>Ao(r.search,n.current?null:t.current),[r.search]),s=xe();return[a,u.useCallback((i,l)=>{const c=Ne(typeof i=="function"?i(new URLSearchParams(a)):i);n.current=!0,s("?"+c,l)},[s,a])]}o($s,"useSearchParams");var ua=0,la=o(()=>`__${String(++ua)}__`,"getUniqueFetcherId");function ca(){let{router:e}=Ke("useSubmit"),{basename:t}=u.useContext(L),n=vo(),r=e.fetch,a=e.navigate;return u.useCallback(async(s,i={})=>{let{action:l,method:c,encType:d,formData:m,body:f}=To(s,t);if(i.navigate===!1){let g=i.fetcherKey||la();await r(g,n,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:m,body:f,formMethod:i.method||c,formEncType:i.encType||d,flushSync:i.flushSync})}else await a(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:m,body:f,formMethod:i.method||c,formEncType:i.encType||d,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[r,a,t,n])}o(ca,"useSubmit");function da(e,{relative:t}={}){let{basename:n}=u.useContext(L),r=u.useContext(O);C(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),s={...le(e||".",{relative:t})},i=_();if(e==null){s.search=i.search;let l=new URLSearchParams(s.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(m=>m).forEach(m=>l.append("index",m));let d=l.toString();s.search=d?`?${d}`:""}}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:M([n,s.pathname])),oe(s)}o(da,"useFormAction");var Me="react-router-scroll-positions",me={};function Ue(e,t,n,r){let a=null;return r&&(n!=="/"?a=r({...e,pathname:B(e.pathname,n)||e.pathname},t):a=r(e,t)),a==null&&(a=e.key),a}o(Ue,"getScrollRestorationKey");function fa({getKey:e,storageKey:t}={}){let{router:n}=Ke("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:a}=sa("useScrollRestoration"),{basename:s}=u.useContext(L),i=_(),l=Qt(),c=wo();u.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),ma(u.useCallback(()=>{if(c.state==="idle"){let d=Ue(i,l,s,e);me[d]=window.scrollY}try{sessionStorage.setItem(t||Me,JSON.stringify(me))}catch(d){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${d}).`)}window.history.scrollRestoration="auto"},[c.state,e,s,i,l,t])),typeof document<"u"&&(u.useLayoutEffect(()=>{try{let d=sessionStorage.getItem(t||Me);d&&(me=JSON.parse(d))}catch{}},[t]),u.useLayoutEffect(()=>{let d=n?.enableScrollRestoration(me,()=>window.scrollY,e?(m,f)=>Ue(m,f,s,e):void 0);return()=>d&&d()},[n,s,e]),u.useLayoutEffect(()=>{if(r!==!1){if(typeof r=="number"){window.scrollTo(0,r);return}try{if(i.hash){let d=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(d){d.scrollIntoView();return}}}catch{D(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[i,r,a]))}o(fa,"useScrollRestoration");function Ps(e,t){let{capture:n}=t||{};u.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("beforeunload",e,r),()=>{window.removeEventListener("beforeunload",e,r)}},[e,n])}o(Ps,"useBeforeUnload");function ma(e,t){let{capture:n}=t||{};u.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,n])}o(ma,"usePageHide");function ha(e,{relative:t}={}){let n=u.useContext(Ft);C(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ke("useViewTransitionState"),a=le(e,{relative:t});if(!n.isTransitioning)return!1;let s=B(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=B(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ge(a.pathname,i)!=null||ge(a.pathname,s)!=null}o(ha,"useViewTransitionState");var ct=60,je=3600,we=24*je,dt=7*we,ft=30*we;function pa(e){const t=Date.now(),n=new Date(e).getTime(),r=Math.round((t-n)/1e3);return r<ct?"just now":r<je?`${Math.floor(r/ct)}m ago`:r<we?`${Math.floor(r/je)}h ago`:r<dt?`${Math.floor(r/we)}d ago`:r<ft?`${Math.floor(r/dt)}w ago`:`${Math.floor(r/ft)}mo ago`}o(pa,"timeAgo");var en="from",tn="fromHref",nn="paperclip:issue-detail-breadcrumb:";function rn(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.label=="string"&&typeof t.href=="string"}o(rn,"isIssueDetailBreadcrumb");function on(e){return e==="issues"||e==="inbox"}o(on,"isIssueDetailSource");function an(e){if(typeof e!="object"||e===null)return!1;const t=e,n=t.originKind===void 0||typeof t.originKind=="string",r=t.originId===void 0||t.originId===null||typeof t.originId=="string",a=t.blockerAttention===void 0||typeof t.blockerAttention=="object"&&t.blockerAttention!==null;return typeof t.id=="string"&&(t.identifier===null||typeof t.identifier=="string")&&typeof t.title=="string"&&typeof t.status=="string"&&a&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.projectName===null||typeof t.projectName=="string")&&n&&r}o(an,"isIssueDetailHeaderSeed");function ga(e){return{id:e.id,identifier:e.identifier??null,title:e.title,status:e.status,blockerAttention:e.blockerAttention,priority:e.priority,projectId:e.projectId??null,projectName:e.project?.name??null,originKind:e.originKind,originId:e.originId??null}}o(ga,"createIssueDetailHeaderSeed");function sn(e,t){const n=ga(t);return typeof e!="object"||e===null?{issueDetailHeaderSeed:n}:{...e,issueDetailHeaderSeed:n}}o(sn,"withIssueDetailHeaderSeed");function ya(e){if(typeof e!="object"||e===null)return null;const t=e.issueDetailHeaderSeed;return an(t)?t:null}o(ya,"readIssueDetailHeaderSeed");function va(e){if(!e)return null;const t=new URLSearchParams(e).get(en);return on(t)?t:null}o(va,"readIssueDetailSourceFromSearch");function wa(e){if(!e)return null;const t=new URLSearchParams(e).get(tn);return t&&t.startsWith("/")?t:null}o(wa,"readIssueDetailBreadcrumbHrefFromSearch");function un(e,t){return on(e?.issueDetailSource)?e.issueDetailSource:t?t.label==="Inbox"||t.href.includes("/inbox")?"inbox":t.label==="Tasks"||t.href.includes("/issues")?"issues":null:null}o(un,"inferIssueDetailSource");function mt(e){return e==="inbox"?{label:"Inbox",href:"/inbox"}:{label:"Tasks",href:"/issues"}}o(mt,"breadcrumbForSource");function Ls(e,t,n){return{issueDetailBreadcrumb:{label:e,href:t},issueDetailSource:n}}o(Ls,"createIssueDetailLocationState");function As(e){return typeof e!="object"||e===null?{issueDetailInboxQuickArchiveArmed:!0}:{...e,issueDetailInboxQuickArchiveArmed:!0}}o(As,"armIssueDetailInboxQuickArchive");function Ia(e){if(typeof window>"u"||!window.sessionStorage)return null;const t=window.sessionStorage.getItem(`${nn}${e}`);if(!t)return null;try{const n=JSON.parse(t),r=rn(n.issueDetailBreadcrumb)?n.issueDetailBreadcrumb:null,a=un(n,r);if(!r||!a)return null;const s=an(n.issueDetailHeaderSeed)?n.issueDetailHeaderSeed:void 0;return{issueDetailBreadcrumb:r,issueDetailSource:a,issueDetailInboxQuickArchiveArmed:n.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:s}}catch{return null}}o(Ia,"readStoredIssueDetailLocationState");function ln(e,t){if(typeof e=="object"&&e!==null){const a=e.issueDetailBreadcrumb;if(rn(a)){const s=un(e,a);if(!s)return null;const i=ya(e)??void 0;return{issueDetailBreadcrumb:a,issueDetailSource:s,issueDetailInboxQuickArchiveArmed:e.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:i}}}const n=va(t),r=wa(t);return n?{issueDetailBreadcrumb:r?{...mt(n),href:r}:mt(n),issueDetailSource:n,issueDetailInboxQuickArchiveArmed:!1}:null}o(ln,"normalizeIssueDetailLocationState");function Ds(e,t,n){if(typeof window>"u"||!window.sessionStorage)return;const r=ln(t,n);r&&window.sessionStorage.setItem(`${nn}${e}`,JSON.stringify(r))}o(Ds,"rememberIssueDetailLocationState");function Ra(e){return`/issues/${e}`}o(Ra,"createIssueDetailPath");function _s(e){if(!e)return!1;const t=new URLSearchParams(e);return t.has(en)||t.has(tn)}o(_s,"hasLegacyIssueDetailQuery");function Sa(e,t,n){const r=ln(t,n);return r||(e?Ia(e):null)}o(Sa,"readIssueDetailLocationState");function Ts(e,t,n){return Sa(e,t,n)?.issueDetailBreadcrumb??null}o(Ts,"readIssueDetailBreadcrumb");var ht=class extends Error{static{o(this,"CommentSubmissionUnknownError")}constructor(){super("We couldn’t confirm whether this comment was saved. Review the conversation before starting another draft."),this.name="CommentSubmissionUnknownError"}};function pt(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e,n=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;return typeof t.id=="string"&&n.test(t.id)&&typeof t.issueId=="string"&&n.test(t.issueId)&&typeof t.body=="string"}o(pt,"hasCommentReceipt");async function gt(e,t){try{const n=await e;if(!t(n))throw new ht;return n}catch(n){throw n instanceof Dn&&n.status<500?n:new ht}}o(gt,"confirmedCommentResponse");function yt(e){const t=new URLSearchParams;return e?.attention&&t.set("attention",e.attention),e?.status&&t.set("status",e.status),e?.projectId&&t.set("projectId",e.projectId),e?.parentId&&t.set("parentId",e.parentId),e?.assigneeAgentId&&t.set("assigneeAgentId",e.assigneeAgentId),e?.participantAgentId&&t.set("participantAgentId",e.participantAgentId),e?.assigneeUserId&&t.set("assigneeUserId",e.assigneeUserId),e?.touchedByUserId&&t.set("touchedByUserId",e.touchedByUserId),e?.inboxArchivedByUserId&&t.set("inboxArchivedByUserId",e.inboxArchivedByUserId),e?.unreadForUserId&&t.set("unreadForUserId",e.unreadForUserId),e?.labelId&&t.set("labelId",e.labelId),e?.workspaceId&&t.set("workspaceId",e.workspaceId),e?.executionWorkspaceId&&t.set("executionWorkspaceId",e.executionWorkspaceId),e?.originKind&&t.set("originKind",e.originKind),e?.originKindPrefix&&t.set("originKindPrefix",e.originKindPrefix),e?.originId&&t.set("originId",e.originId),e?.descendantOf&&t.set("descendantOf",e.descendantOf),e?.createdFromIssueId&&t.set("createdFromIssueId",e.createdFromIssueId),e?.includeRoutineExecutions&&t.set("includeRoutineExecutions","true"),e?.includeBlockedBy&&t.set("includeBlockedBy","true"),e?.includeBlockedInboxAttention&&t.set("includeBlockedInboxAttention","true"),e?.includeLiveDescendantSummary&&t.set("includeLiveDescendantSummary","true"),e?.hasPlanDocument!==void 0&&t.set("hasPlanDocument",e.hasPlanDocument?"true":"false"),e?.q&&t.set("q",e.q),e?.limit&&t.set("limit",String(e.limit)),e?.offset!==void 0&&t.set("offset",String(e.offset)),e?.sortField&&t.set("sortField",e.sortField),e?.sortDir&&t.set("sortDir",e.sortDir),e?.afterId&&t.set("afterId",e.afterId),t}o(yt,"issueListSearchParams");var K={listAll:o(async(e,t,n)=>{const a=new Map;let s;for(;;){const i=await K.list(e,{...t,limit:500,sortField:"id",sortDir:"asc",afterId:s},n);for(const l of i)a.set(l.id,l);if(i.length<500)return[...a.values()];s=i[i.length-1].id}},"listAll"),list:o((e,t,n)=>{const r=yt(t).toString(),a=`/companies/${e}/issues${r?`?${r}`:""}`;return n?p.get(a,n):p.get(a)},"list"),listCompact:o((e,t,n)=>{const r=yt(t);r.set("view","compact");const a=`/companies/${e}/issues?${r.toString()}`;return n?p.get(a,n):p.get(a)},"listCompact"),count:o((e,t)=>{const n=new URLSearchParams;return n.set("attention",t.attention),t.status&&n.set("status",t.status),t.assigneeAgentId&&n.set("assigneeAgentId",t.assigneeAgentId),t.assigneeUserId&&n.set("assigneeUserId",t.assigneeUserId),t.projectId&&n.set("projectId",t.projectId),t.labelId&&n.set("labelId",t.labelId),t.q&&n.set("q",t.q),p.get(`/companies/${e}/issues/count?${n.toString()}`)},"count"),listLabels:o(e=>p.get(`/companies/${e}/labels`),"listLabels"),createLabel:o((e,t)=>p.post(`/companies/${e}/labels`,t),"createLabel"),deleteLabel:o(e=>p.delete(`/labels/${e}`),"deleteLabel"),get:o((e,t)=>t?p.get(`/issues/${e}`,t):p.get(`/issues/${e}`),"get"),getRunnerGoal:o((e,t)=>{const n=t?`?agentId=${encodeURIComponent(t)}`:"";return p.get(`/issues/${e}/runner-goal${n}`)},"getRunnerGoal"),actOnRunnerGoal:o((e,t)=>p.post(`/issues/${e}/runner-goal/actions`,t),"actOnRunnerGoal"),getModelOverride:o(e=>p.get(`/issues/${e}/model-override`),"getModelOverride"),setModelOverride:o((e,t)=>p.put(`/issues/${e}/model-override`,t),"setModelOverride"),getWatchdog:o(e=>p.get(`/issues/${e}/watchdog`),"getWatchdog"),upsertWatchdog:o((e,t)=>p.put(`/issues/${e}/watchdog`,t),"upsertWatchdog"),deleteWatchdog:o(e=>p.delete(`/issues/${e}/watchdog`),"deleteWatchdog"),markRead:o(e=>p.post(`/issues/${e}/read`,{}),"markRead"),markUnread:o(e=>p.delete(`/issues/${e}/read`),"markUnread"),archiveFromInbox:o(e=>p.post(`/issues/${e}/inbox-archive`,{}),"archiveFromInbox"),unarchiveFromInbox:o(e=>p.delete(`/issues/${e}/inbox-archive`),"unarchiveFromInbox"),create:o((e,t)=>p.post(`/companies/${e}/issues`,t),"create"),update:o((e,t)=>{const n=p.patch(`/issues/${e}`,t);return typeof t.comment=="string"?gt(n,r=>pt(r?.comment)):n},"update"),decideStalledReview:o((e,t)=>p.post(`/issues/${e}/stalled-review-decision`,t),"decideStalledReview"),resolveRecoveryAction:o((e,t)=>p.post(`/issues/${e}/recovery-actions/resolve`,t),"resolveRecoveryAction"),previewTreeControl:o((e,t)=>p.post(`/issues/${e}/tree-control/preview`,t),"previewTreeControl"),createTreeHold:o((e,t)=>p.post(`/issues/${e}/tree-holds`,t),"createTreeHold"),getTreeHold:o((e,t)=>p.get(`/issues/${e}/tree-holds/${t}`),"getTreeHold"),listTreeHolds:o((e,t)=>{const n=new URLSearchParams;t?.status&&n.set("status",t.status),t?.mode&&n.set("mode",t.mode),t?.includeMembers&&n.set("includeMembers","true");const r=n.toString();return p.get(`/issues/${e}/tree-holds${r?`?${r}`:""}`)},"listTreeHolds"),getTreeControlState:o(e=>p.get(`/issues/${e}/tree-control/state`),"getTreeControlState"),releaseTreeHold:o((e,t,n)=>p.post(`/issues/${e}/tree-holds/${t}/release`,n),"releaseTreeHold"),checkMonitorNow:o(e=>p.post(`/issues/${e}/monitor/check-now`,{}),"checkMonitorNow"),retryScheduledRetryNow:o(e=>p.post(`/issues/${e}/scheduled-retry/retry-now`,{}),"retryScheduledRetryNow"),remove:o(e=>p.delete(`/issues/${e}`),"remove"),checkout:o((e,t)=>p.post(`/issues/${e}/checkout`,{agentId:t,expectedStatuses:["todo","backlog","blocked","in_review"]}),"checkout"),release:o(e=>p.post(`/issues/${e}/release`,{}),"release"),listComments:o((e,t)=>{const n=new URLSearchParams;t?.after&&n.set("after",t.after),t?.order&&n.set("order",t.order),t?.limit&&n.set("limit",String(t.limit));const r=n.toString();return p.get(`/issues/${e}/comments${r?`?${r}`:""}`)},"listComments"),getQueuedComments:o(e=>p.get(`/issues/${e}/queued-comments`),"getQueuedComments"),editQueuedComment:o((e,t,n)=>p.patch(`/issues/${e}/queued-comments/${t}`,n),"editQueuedComment"),reorderQueuedComments:o((e,t)=>p.put(`/issues/${e}/queued-comments/order`,t),"reorderQueuedComments"),interruptQueuedComments:o((e,t)=>p.post(`/issues/${e}/queued-comments/interrupt`,t),"interruptQueuedComments"),interruptLatestQueuedComments:o(async(e,t)=>{const n=await K.getQueuedComments(e);if(!n.queueId||n.targetRunId&&n.targetRunId!==t)throw new Error("The queued messages changed. Refresh and try again.");return K.interruptQueuedComments(e,{queueId:n.queueId,revision:n.revision,targetRunId:n.targetRunId})},"interruptLatestQueuedComments"),steerQueuedComment:o((e,t,n)=>p.post(`/issues/${e}/queued-comments/${t}/steer`,n),"steerQueuedComment"),discardQueuedComment:o((e,t,n)=>p.delete(`/issues/${e}/queued-comments/${t}`,n),"discardQueuedComment"),listInteractions:o(e=>p.get(`/issues/${e}/interactions`),"listInteractions"),listAcceptedPlanDecompositions:o(e=>p.get(`/issues/${e}/accepted-plan-decompositions`),"listAcceptedPlanDecompositions"),createInteraction:o((e,t)=>p.post(`/issues/${e}/interactions`,t),"createInteraction"),acceptInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/accept`,n??{}),"acceptInteraction"),rejectInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/reject`,n?{reason:n}:{}),"rejectInteraction"),cancelInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/cancel`,n?{reason:n}:{}),"cancelInteraction"),skipInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/skip`,n?{reason:n}:{}),"skipInteraction"),respondToInteraction:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/respond`,n),"respondToInteraction"),submitInteractionVerdicts:o((e,t,n)=>p.post(`/issues/${e}/interactions/${t}/verdicts`,{verdicts:n}),"submitInteractionVerdicts"),getComment:o((e,t)=>p.get(`/issues/${e}/comments/${t}`),"getComment"),listFeedbackVotes:o(e=>p.get(`/issues/${e}/feedback-votes`),"listFeedbackVotes"),getCostSummary:o((e,t={})=>{const n=t.excludeRoot?"?excludeRoot=true":"";return p.get(`/issues/${e}/cost-summary${n}`)},"getCostSummary"),listFeedbackTraces:o((e,t)=>{const n=new URLSearchParams;for(const[a,s]of Object.entries(t??{}))s!==void 0&&n.set(a,String(s));const r=n.toString();return p.get(`/issues/${e}/feedback-traces${r?`?${r}`:""}`)},"listFeedbackTraces"),upsertFeedbackVote:o((e,t)=>p.post(`/issues/${e}/feedback-votes`,t),"upsertFeedbackVote"),addComment:o((e,t,n,r,a,s,i)=>gt(p.post(`/issues/${e}/comments`,{body:t,...s?{clientRequestId:s}:{},...n===void 0?{}:{reopen:n},...r===void 0?{}:{interrupt:r},...a?.length?{attachmentIds:a}:{},...i===void 0?{}:{deliver:i}}),pt),"addComment"),cancelComment:o((e,t)=>p.delete(`/issues/${e}/comments/${t}?mode=cancel`),"cancelComment"),deleteComment:o((e,t)=>p.delete(`/issues/${e}/comments/${t}`),"deleteComment"),listDocuments:o((e,t)=>p.get(`/issues/${e}/documents${t?.includeSystem?"?includeSystem=true":""}`),"listDocuments"),getDocument:o((e,t)=>p.get(`/issues/${e}/documents/${encodeURIComponent(t)}`),"getDocument"),getDocumentPdf:o((e,t)=>p.getBlob(`/issues/${e}/documents/${encodeURIComponent(t)}/pdf`),"getDocumentPdf"),upsertDocument:o((e,t,n)=>p.put(`/issues/${e}/documents/${encodeURIComponent(t)}`,n),"upsertDocument"),lockDocument:o((e,t)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/lock`,{}),"lockDocument"),unlockDocument:o((e,t)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/unlock`,{}),"unlockDocument"),listDocumentRevisions:o((e,t)=>p.get(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions`),"listDocumentRevisions"),restoreDocumentRevision:o((e,t,n)=>p.post(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions/${n}/restore`,{}),"restoreDocumentRevision"),deleteDocument:o((e,t)=>p.delete(`/issues/${e}/documents/${encodeURIComponent(t)}`),"deleteDocument"),listAttachments:o(e=>p.get(`/issues/${e}/attachments`),"listAttachments"),uploadAttachment:o((e,t,n,r)=>{const a=new FormData;return a.append("file",n),r&&a.append("issueCommentId",r),p.postForm(`/companies/${e}/issues/${t}/attachments`,a)},"uploadAttachment"),deleteAttachment:o(e=>p.delete(`/attachments/${e}`),"deleteAttachment"),listApprovals:o(e=>p.get(`/issues/${e}/approvals`),"listApprovals"),linkApproval:o((e,t)=>p.post(`/issues/${e}/approvals`,{approvalId:t}),"linkApproval"),unlinkApproval:o((e,t)=>p.delete(`/issues/${e}/approvals/${t}`),"unlinkApproval"),listWorkProducts:o((e,t)=>p.get(`/issues/${e}/work-products${t?.refreshPullRequests?"?refreshPullRequests=true":""}`),"listWorkProducts"),ensureWorkProductReviewDocument:o((e,t)=>p.post(`/issues/${e}/work-products/${t}/review-document`,{}),"ensureWorkProductReviewDocument"),createWorkProduct:o((e,t)=>p.post(`/issues/${e}/work-products`,t),"createWorkProduct"),updateWorkProduct:o((e,t)=>p.patch(`/work-products/${e}`,t),"updateWorkProduct"),deleteWorkProduct:o(e=>p.delete(`/work-products/${e}`),"deleteWorkProduct")};function V(e){return new Date(e).getTime()}o(V,"toTimestamp");function xa(){const e=globalThis.crypto?.randomUUID?.();return e?`optimistic-${e}`:`optimistic-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}o(xa,"createOptimisticCommentId");function Ve(e){return[...e].sort((t,n)=>{const r=V(t.createdAt)-V(n.createdAt);return r!==0?r:t.id.localeCompare(n.id)})}o(Ve,"sortIssueComments");function vt(e){return Ve(e).reverse()}o(vt,"sortIssueCommentsDesc");function Os(e){const t=new Date,n=xa();return{id:n,clientId:n,companyId:e.companyId,issueId:e.issueId,authorType:"user",authorAgentId:null,authorUserId:e.authorUserId,body:e.body,presentation:null,metadata:null,clientStatus:e.clientStatus??"pending",queueTargetRunId:e.queueTargetRunId??null,createdAt:t,updatedAt:t}}o(Os,"createOptimisticIssueComment");function Ns(e){return e.runId||e.interruptedRunId||e.comment.id&&(e.comment.id===e.activeRunWakeCommentId||e.comment.id===e.activeRunCommentId)||e.comment.authorAgentId&&e.activeRunAgentId&&e.comment.authorAgentId===e.activeRunAgentId?!1:e.comment.clientStatus==="queued"?!0:e.activeRunStartedAt?V(e.comment.createdAt)>=V(e.activeRunStartedAt):!1}o(Ns,"isQueuedIssueComment");function Ms(e,t){const n=t.queuedTargetRunId??null;return!n||!t.targetRunIsLive||t.runningRunId&&t.runningRunId!==n?e:{...e,clientStatus:"queued",queueState:"queued",queueTargetRunId:n}}o(Ms,"applyLocalQueuedIssueCommentState");function Us(e,t){const n=e??[],r=[...n],a=new Set(r.map(i=>i.id)),s=new Set;for(const i of t){if(a.has(i.id))continue;const l=n.find(c=>!s.has(c.id)&&c.issueId===i.issueId&&c.authorType===i.authorType&&c.authorUserId===i.authorUserId&&c.body===i.body&&Math.abs(V(c.createdAt)-V(i.createdAt))<=6e4);if(l){s.add(l.id);const c={...l,clientId:i.clientId};r[r.findIndex(d=>d.id===l.id)]=c;continue}r.push(i)}return Ve(r)}o(Us,"mergeIssueComments");function js(e,t){const n=e.findIndex(r=>r.clientId===t);return n===-1?{comments:e,comment:null}:{comments:e.filter(r=>r.clientId!==t),comment:e[n]??null}}o(js,"takeOptimisticIssueComment");function Fs(e){return Ve((e??[]).flatMap(t=>t))}o(Fs,"flattenIssueCommentPages");function Ea(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}o(Ea,"getNextIssueCommentPageParam");function wt(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}o(wt,"getNextPageCursor");async function Bs(e){const t=(e.pages??[]).map(i=>[...i]),n=e.pageParams?[...e.pageParams].slice(0,t.length):t.map(()=>null);for(;n.length<t.length;)n.push(null);if(e.pageSize<=0)return{pages:t,pageParams:n};let r=wt(t[t.length-1],e.pageSize);const a=Math.max(0,e.maxPages??Number.POSITIVE_INFINITY),s=new Set;for(;r&&!s.has(r)&&s.size<a;){s.add(r);const i=[...await e.fetchPage(r)];t.push(i),n.push(r),r=wt(i,e.pageSize)}return{pages:t,pageParams:n}}o(Bs,"loadRemainingIssueCommentPages");function Hs(e){return e.activeDetailTab!=="chat"||!e.hasOlderComments||e.initialPageLoading||e.olderPageLoading||e.loadedCommentCount===0?!1:e.loadedCommentCount<e.autoLoadLimit}o(Hs,"shouldAutoloadOlderIssueComments");function Ws(e,t){if(!e)return e;const n={...e};return t.reopen===!0&&(e.status==="done"||e.status==="cancelled"||e.status==="blocked")&&(n.status="todo"),t.reassignment&&(n.assigneeAgentId=t.reassignment.assigneeAgentId,n.assigneeUserId=t.reassignment.assigneeUserId),n}o(Ws,"applyOptimisticIssueCommentUpdate");function ba(e,t){if(!e)return e;const n={...e,updatedAt:new Date},r=o(s=>Object.prototype.hasOwnProperty.call(t,s),"hasOwn"),a=o(s=>{r(s)&&(n[s]=t[s])},"assign");if(a("status"),a("priority"),a("assigneeAgentId"),a("assigneeUserId"),a("projectId"),a("parentId"),a("projectWorkspaceId"),a("executionWorkspaceId"),a("executionWorkspacePreference"),a("executionWorkspaceSettings"),a("hiddenAt"),r("labelIds")&&Array.isArray(t.labelIds)){const s=t.labelIds.filter(i=>typeof i=="string");n.labelIds=s,e.labels&&(n.labels=e.labels.filter(i=>s.includes(i.id)))}if(r("blockedByIssueIds")&&Array.isArray(t.blockedByIssueIds)&&e.blockedBy){const s=new Set(t.blockedByIssueIds.filter(i=>typeof i=="string"));n.blockedBy=e.blockedBy.filter(i=>s.has(i.id))}return r("projectId")&&(n.project=e.project?.id===n.projectId?e.project:null),r("parentId")&&(n.ancestors=void 0),r("executionWorkspaceId")&&(n.currentExecutionWorkspace=e.currentExecutionWorkspace?.id===n.executionWorkspaceId?e.currentExecutionWorkspace:null),n}o(ba,"applyOptimisticIssueFieldUpdate");function Ca(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}o(Ca,"matchesIssueRef$1");function qs(e,t,n){if(!e)return e;let r=!1;const a=e.map(s=>Ca(s,t)?(r=!0,ba(s,n)??s):s);return r?a:e}o(qs,"applyOptimisticIssueFieldUpdateToCollection");function zs(e,t){if(!e||e.length===0)return[[t]];const n=e.map(r=>[...r]);for(let r=0;r<n.length;r+=1){const a=n[r].findIndex(s=>s.id===t.id);if(a!==-1)return n[r][a]=t,n[r]=vt(n[r]),n}return n[0]=vt([...n[0],t]),n}o(zs,"upsertIssueCommentInPages");function Qs(e,t){return!e||e.length===0?[]:e.map(n=>n.filter(r=>r.id!==t)).filter(n=>n.length>0)}o(Qs,"removeIssueCommentFromPages");var ka=["issues","detail"],cn=6e4,$a=3e4;function re(e){return typeof e=="string"&&e.length>0}o(re,"isNonEmptyString");function dn(e,t){const n=new Set;return re(e)&&n.add(e),re(t?.id)&&n.add(t.id),re(t?.identifier)&&n.add(t.identifier),Array.from(n)}o(dn,"collectIssueRefs");function Pa(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}o(Pa,"matchesIssueRef");function Ie(e){if(typeof e!="object"||e===null)return!1;const t=e;return re(t.id)&&re(t.companyId)&&typeof t.title=="string"&&typeof t.status=="string"&&typeof t.workMode=="string"&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.parentId===null||typeof t.parentId=="string")&&(t.identifier===null||typeof t.identifier=="string")&&(t.description===null||typeof t.description=="string")&&(t.assigneeAgentId===null||typeof t.assigneeAgentId=="string")&&(t.assigneeUserId===null||typeof t.assigneeUserId=="string")&&(t.executionRunId===null||typeof t.executionRunId=="string")&&(t.issueNumber===null||typeof t.issueNumber=="number")&&typeof t.requestDepth=="number"&&t.createdAt!=null&&t.updatedAt!=null}o(Ie,"isCompleteIssueSnapshot");function It(e,t){return e?{...e,...t}:t}o(It,"mergeIssueSnapshots");function fn(e,t,n){const r=dn(t,n);for(const a of r){const s=e.getQueryData(ie.issues.detail(a));if(Ie(s))return s}return e.getQueriesData({queryKey:ka}).map(([,a])=>a).find(a=>Ie(a)&&Pa(a,r))}o(fn,"getCachedIssueDetail");function mn(e,t,n){if(!Ie(t))return t;const r=dn(n?.issueRef,t),a=It(fn(e,n?.issueRef,t),t);for(const s of r)e.setQueryData(ie.issues.detail(s),i=>It(i,a));return a}o(mn,"seedIssueDetailCache");async function hn(e,t,n){return mn(e,n?await K.get(t,n):await K.get(t),{issueRef:t})}o(hn,"fetchIssueDetail");function La(e,t,n){return{queryKey:ie.issues.detail(t),queryFn:o(({signal:r})=>hn(e,t,{signal:r}),"queryFn"),placeholderData:fn(e,t,n?.placeholderIssue??void 0)}}o(La,"getIssueDetailQueryOptions");function Aa(e,t,n){return Ie(n?.issue)&&mn(e,n.issue,{issueRef:t}),e.prefetchQuery({queryKey:ie.issues.detail(t),queryFn:o(()=>hn(e,t),"queryFn"),staleTime:cn})}o(Aa,"prefetchIssueDetail");function Da(e,t){return e.prefetchInfiniteQuery({queryKey:ie.issues.comments(t),queryFn:o(({pageParam:n})=>K.listComments(t,{order:"desc",limit:50,...n?{after:n}:{}}),"queryFn"),initialPageParam:null,getNextPageParam:o(n=>Ea(n,50),"getNextPageParam"),staleTime:$a,pages:1})}o(Da,"prefetchIssueComments");function _a(e,t,n){return Promise.all([Aa(e,t,n),Da(e,n?.issue?.id??t)])}o(_a,"prefetchIssueDetailForNavigation");var Ta=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Oa=Re("box",Ta),Na=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Ma=Re("briefcase",Na),Ua=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]],ja=Re("compass",Ua),Fa=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ba=Re("layers",Fa),Rt={folder:yr,rocket:cr,code:On,terminal:ir,database:Un,globe:mr,package:sr,boxes:Fn,box:Oa,layers:Ba,briefcase:Ma,compass:ja,target:Qn,flame:fr,zap:lr,star:ar,bug:er,wrench:or,hammer:Jn,lightbulb:zn,sparkles:ur,shield:Kn,lock:Gn,search:nr,cog:tr,brain:jn,cpu:Bn,"git-branch":Wn,"file-code":qn,puzzle:Yn,gem:Nn,atom:Hn,heart:hr,mail:Xn,"message-square":rr,crown:Mn,radar:Vn,telescope:Zn,hexagon:dr},Ha="folder";function Wa(e){return e&&$n.includes(e)?Rt[e]:Rt[Ha]}o(Wa,"getProjectIcon");var x=bt(kn(),1),qa={xs:{box:"h-4 w-4 rounded-sm",icon:"h-2.5 w-2.5"},sm:{box:"h-6 w-6 rounded-md",icon:"h-3.5 w-3.5"},md:{box:"h-7 w-7 rounded-lg",icon:"h-4 w-4"},lg:{box:"h-9 w-9 rounded-lg",icon:"h-5 w-5"}};function za({color:e,icon:t,size:n="md",className:r}){const a=qa[n],s=!!e,i=Wa(t);return(0,x.jsx)("span",{"aria-hidden":!0,className:Be("inline-flex shrink-0 items-center justify-center",a.box,s?"text-white":"bg-muted text-muted-foreground",r),style:s?{backgroundColor:e??void 0}:void 0,children:(0,x.jsx)(i,{className:a.icon})})}o(za,"ProjectTile");var ae=null,Fe=new Set;function pn(){for(const e of Fe)e()}o(pn,"emitQuicklookChange");function St(e){ae!==e&&(ae=e,pn())}o(St,"openQuicklookId");function xt(e){ae===e&&(ae=null,pn())}o(xt,"closeQuicklookId");function Qa(e){return Fe.add(e),()=>{Fe.delete(e)}}o(Qa,"subscribeQuicklook");function Ja(e){return u.useSyncExternalStore(Qa,()=>ae===e,()=>!1)}o(Ja,"useIsQuicklookOpen");var Ka=120,Va=13,Ya="w-72 p-3";function Ga(e="start"){return e==="start"?-13:e==="end"?Va:0}o(Ga,"quicklookAlignOffset");function Xa(e){if(!e)return null;const t=e.replace(/!\[[^\]]*]\([^)]+\)/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[#>*_`~-]+/g," ").replace(/\s+/g," ").trim();return t?t.length>180?`${t.slice(0,177).trimEnd()}...`:t:null}o(Xa,"summarizeIssueDescription");function Za({className:e}){return(0,x.jsx)("span",{className:Be("text-xs",e),"aria-hidden":!0,children:"·"})}o(Za,"QuicklookSeparator");function es(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}o(es,"statusLabel");function ts({issue:e,linkTo:t,linkState:n,compact:r=!1}){const a=(0,u.useMemo)(()=>Xa(e.description),[e.description]),s=e.project?.name;return(0,x.jsxs)("div",{className:Be("space-y-2",r&&"space-y-1.5"),children:[(0,x.jsxs)("div",{className:"flex items-center gap-1",children:[(0,x.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,x.jsx)(wr,{status:e.status,size:"md",title:es(e.status)}),(0,x.jsx)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-muted-foreground",children:e.identifier??e.id.slice(0,8)}),s?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Za,{className:"shrink-0 text-muted-foreground"}),(0,x.jsxs)("span",{className:"flex min-w-0 max-w-(--sz-12rem) flex-1 items-center gap-1 text-(length:--text-micro) text-muted-foreground",title:s,"data-testid":"quicklook-project",children:[(0,x.jsx)(za,{size:"xs"}),(0,x.jsx)("span",{className:"truncate",children:s})]})]}):null]}),(0,x.jsx)("span",{className:"shrink-0 text-(length:--text-micro) text-muted-foreground",children:pa(new Date(e.updatedAt))})]}),(0,x.jsx)(ce,{to:t,state:n??sn(null,e),className:"block text-sm font-medium leading-snug hover:underline line-clamp-2",children:e.title}),a?(0,x.jsx)("p",{className:"text-xs leading-5 text-muted-foreground [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:4] overflow-hidden",children:a}):null]})}o(ts,"IssueQuicklookCard");var ns=u.forwardRef(o(function({issuePathId:t,to:n,children:r,className:a,state:s,disableIssueQuicklook:i=!1,issuePrefetch:l=null,issueQuicklookSide:c="top",issueQuicklookAlign:d="start",onClick:m,onClickCapture:f,onMouseEnter:g,onFocus:v,onBlur:w,onTouchStart:y,...h},I){const R=Ln(),S=u.useMemo(()=>Symbol("issue-quicklook"),[]),k=Ja(S),E=u.useRef(null),$=u.useRef(null),A=u.useRef(null),N=u.useCallback(b=>{$.current=b,typeof I=="function"?I(b):I&&(I.current=b)},[I]),P=u.useCallback(()=>{E.current&&(clearTimeout(E.current),E.current=null)},[]),U=u.useCallback(()=>{P(),St(S)},[P,S]),Q=u.useCallback(()=>{P(),E.current=setTimeout(()=>{E.current=null,St(S)},Ka)},[P,S]),T=u.useCallback(()=>{P(),xt(S)},[P,S]);u.useEffect(()=>()=>{P(),xt(S)},[P,S]),u.useEffect(()=>{if(!k)return;const b=12,Xe=o((q,te,J)=>{if(!q)return!1;const W=q.getBoundingClientRect();return te>=W.left-b&&te<=W.right+b&&J>=W.top-b&&J<=W.bottom+b},"nearBox"),bn=o((q,te)=>{const J=$.current,W=A.current;if(J?.matches(":hover")||W?.matches(":hover")||Xe(J,q,te)||Xe(W,q,te))return!0;const Pe=document.activeElement;return J===Pe||!!W&&!!Pe&&W.contains(Pe)},"stillEngaged"),Ze=o(q=>{bn(q.clientX,q.clientY)||T()},"onPointerMove");return document.addEventListener("pointermove",Ze,{passive:!0}),()=>document.removeEventListener("pointermove",Ze)},[k,T]);const H=l?sn(s,l):s,{data:j,isLoading:F}=_n({...La(R,t,{placeholderIssue:l??void 0}),enabled:k,staleTime:cn}),En=Ra(t),ee=u.useCallback(()=>{_a(R,t,{issue:l})},[t,l,R]),Ge=(0,x.jsx)(ce,{ref:N,to:n,state:H,className:a,onMouseEnter:o(b=>{ee(),g?.(b)},"onMouseEnter"),onFocus:o(b=>{ee(),U(),v?.(b)},"onFocus"),onBlur:o(b=>{setTimeout(()=>T(),0),w?.(b)},"onBlur"),onTouchStart:o(b=>{ee(),y?.(b)},"onTouchStart"),onClickCapture:o(b=>{ee(),f?.(b)},"onClickCapture"),onClick:o(b=>{T(),m?.(b)},"onClick"),...h,children:r});return i?Ge:(0,x.jsxs)(vr,{open:k,onOpenChange:o(b=>b?U():T(),"onOpenChange"),children:[(0,x.jsx)(gr,{asChild:!0,onMouseEnter:o(()=>{ee(),Q()},"onMouseEnter"),onMouseLeave:T,children:Ge}),(0,x.jsx)(pr,{ref:A,"data-quicklook":!0,className:Ya,side:c,align:d,alignOffset:Ga(d),onMouseEnter:U,onMouseLeave:T,onOpenAutoFocus:o(b=>b.preventDefault(),"onOpenAutoFocus"),onCloseAutoFocus:o(b=>b.preventDefault(),"onCloseAutoFocus"),children:j?(0,x.jsx)(ts,{issue:j,linkTo:En,linkState:H,compact:!0}):(0,x.jsxs)("div",{className:"space-y-2",children:[(0,x.jsx)("div",{className:"h-4 w-24 rounded bg-accent/50"}),(0,x.jsx)("div",{className:"h-4 w-full rounded bg-accent/40"}),(0,x.jsx)("div",{className:"h-4 w-3/4 rounded bg-accent/30"}),F?null:(0,x.jsx)("p",{className:"text-xs text-muted-foreground",children:"Unable to load task preview."})]})})]})},"IssueLinkQuicklookImpl")),gn=new Set(["dashboard","companies","company","skills","teams-catalog","org","agents","chats","apps","projects","workspaces","execution-workspaces","issues","tasks","routines","goals","artifacts","tools","approvals","costs","usage","activity","audit","decisions","inbox","board-chat","artifacts","u","design-guide","search","settings","timeline"]),Ye=new Set(["auth","invite","board-claim","cli-auth","docs","instance"]);function se(e){return e.trim().toUpperCase()}o(se,"normalizeCompanyPrefix");function yn(e){const t=e.match(/^([^?#]*)(\?[^#]*)?(#.*)?$/);return{pathname:t?.[1]??e,search:t?.[2]??"",hash:t?.[3]??""}}o(yn,"splitPath");function rs(e){return e.split("/").filter(Boolean)[0]??null}o(rs,"getRootSegment");function os(e){if(e==="/")return!0;const t=rs(e);return t?Ye.has(t.toLowerCase()):!0}o(os,"isGlobalPath");function vn(e){const t=e.split("/").filter(Boolean);if(t.length===0)return null;const n=t[0].toLowerCase();return Ye.has(n)||gn.has(n)?null:se(t[0])}o(vn,"extractCompanyPrefixFromPath");function Et(e,t){const{pathname:n,search:r,hash:a}=yn(e);if(!n.startsWith("/")||os(n)||!t)return e;const s=se(t);return vn(n)?e:`/${s}${n}${r}${a}`}o(Et,"applyCompanyPrefix");function as(e,...t){const n=["cases",...t].filter(Boolean).join("/");return e?`/${se(e)}/${n}`:`/${n}`}o(as,"caseHref");function Js(e){const{pathname:t,search:n,hash:r}=yn(e),a=t.split("/").filter(Boolean);if(a.length>=2){const s=a[1].toLowerCase();if(!Ye.has(a[0].toLowerCase())&&gn.has(s))return`/${a.slice(1).join("/")}${n}${r}`}return`${t}${n}${r}`}o(Js,"toCompanyRelativePath");var wn=/^[A-Z][A-Z0-9]*-\d+$/i,ss=/^issue:\/\/:?([^?#\s]+)(?:[?#].*)?$/i,is=/issue:\/\/:?[^\s<>()]+|https?:\/\/[^\s<>()]+|\/(?:[^\s<>()/]+\/)*issues\/[A-Z][A-Z0-9]*-\d+(?=$|[\s<>)\],.;!?:])|\b[A-Z][A-Z0-9]*-\d+\b/gi;function In(e){if(!e)return null;const t=e.trim();if(!t||/^https?:\/\//i.test(t))return null;const n=t.split("/").filter(Boolean),r=n.findIndex(s=>s==="issues");if(r===-1||r===n.length-1)return null;const a=decodeURIComponent(n[r+1]??"");return!a||a.startsWith(":")?null:wn.test(a)?a.toUpperCase():a}o(In,"parseIssuePathIdFromPath");function Rn(e,t){if(!e)return null;const n=e.trim(),r=n.match(ss);if(r?.[1]){const i=decodeURIComponent(r[1]);return{issuePathId:i,href:`/issues/${encodeURIComponent(i)}`}}const a=In(e);if(a)return{issuePathId:a,href:`/issues/${encodeURIComponent(a)}`};if(!wn.test(n))return null;const s=n.toUpperCase();if(t&&t.size>0){const i=s.split("-")[0];if(!i||!t.has(i))return null}return{issuePathId:s,href:`/issues/${encodeURIComponent(s)}`}}o(Rn,"parseIssueReferenceFromHref");function us(e){let t=e,n="";for(;t.length>0;){const r=t.at(-1);if(!r||!/[),.;!?:\]]/.test(r))break;if(r===")"){const a=(t.match(/\(/g)??[]).length;if((t.match(/\)/g)??[]).length<=a)break}if(r==="]"){const a=(t.match(/\[/g)??[]).length;if((t.match(/\]/g)??[]).length<=a)break}n=`${r}${n}`,t=t.slice(0,-1)}return{core:t,trailing:n}}o(us,"splitTrailingPunctuation");function Sn(e,t,n="text"){return{type:"link",url:t,children:[{type:n,value:e}]}}o(Sn,"createIssueLinkNode");function ls(e,t){const n=[];let r=0,a=!1;for(const s of e.matchAll(is)){const i=s[0];if(!i)continue;const l=s.index??0,c=l+i.length,{core:d,trailing:m}=us(i),f=Rn(d,t);f&&(a=!0,l>r&&n.push({type:"text",value:e.slice(r,l)}),n.push(Sn(d,f.href)),m&&n.push({type:"text",value:m}),r=c)}return a?(r<e.length&&n.push({type:"text",value:e.slice(r)}),n):null}o(ls,"linkifyIssueReferencesInText");function xn(e,t){if(!Array.isArray(e.children)||e.children.length===0||e.type==="link"||e.type==="linkReference"||e.type==="code"||e.type==="definition"||e.type==="html")return;const n=[];for(const r of e.children){if(r.type==="inlineCode"&&typeof r.value=="string"){const a=Rn(r.value,t);if(a){n.push(Sn(r.value,a.href,"inlineCode"));continue}}if(r.type==="text"&&typeof r.value=="string"){const a=ls(r.value,t);if(a){n.push(...a);continue}}xn(r,t),n.push(r)}e.children=n}o(xn,"rewriteMarkdownTree");function Ks(e){const t=e?.knownPrefixes&&e.knownPrefixes.length>0?new Set(e.knownPrefixes.map(n=>n.toUpperCase())):void 0;return n=>{xn(n,t)}}o(Ks,"remarkLinkIssueReferences");function $e(e,t){if(typeof e=="string")return Et(e,t);if(e.pathname&&e.pathname.startsWith("/")){const n=Et(e.pathname,t);if(n!==e.pathname)return{...e,pathname:n}}return e}o($e,"resolveTo");function de(){const{selectedCompany:e}=An(),t=uo(),n=_();if(t.companyPrefix)return se(t.companyPrefix);const r=vn(n.pathname);return r||(e?se(e.issuePrefix):null)}o(de,"useActiveCompanyPrefix");function Vs(){const e=de();return u.useCallback((...t)=>as(e,...t),[e])}o(Vs,"useCaseHref");var Ys=u.forwardRef(o(function({to:t,disableIssueQuicklook:n=!1,issuePrefetch:r=null,issueQuicklookSide:a,issueQuicklookAlign:s,...i},l){const c=$e(t,de()),d=In(typeof c=="string"?c:c.pathname);return d?(0,x.jsx)(ns,{ref:l,to:c,issuePathId:d,disableIssueQuicklook:n,issuePrefetch:r,issueQuicklookSide:a,issueQuicklookAlign:s,...i}):(0,x.jsx)(ce,{ref:l,to:c,...i})},"CompanyLink")),Gs=u.forwardRef(o(function({to:t,...n},r){const a=de();return(0,x.jsx)(Xt,{ref:r,to:$e(t,a),...n})},"CompanyNavLink"));function Xs({to:e,...t}){const n=de();return(0,x.jsx)(Eo,{to:$e(e,n),...t})}o(Xs,"Navigate");function Zs(){const e=xe(),t=de();return u.useCallback(((n,r)=>{if(typeof n=="number"){e(n);return}e($e(n,t),r)}),[e,t])}o(Zs,"useNavigate");export{ce as $,Fs as A,K as B,La as C,ba as D,Ws as E,Us as F,_s as G,As as H,Qs as I,Sa as J,Ts as K,Hs as L,Ns as M,Bs as N,qs as O,Ca as P,ks as Q,js as R,Oa as S,Ms as T,Ls as U,ht as V,Ra as W,sn as X,Ds as Y,pa as Z,Ga as _,Vs as a,xe as at,Ba as b,Ks as c,$s as ct,os as d,Ss as et,se as f,Ya as g,ts as h,de as i,_ as it,Ea as j,Os as k,Et as l,ns as m,Gs as n,xs as nt,Zs as o,Is as ot,Js as p,ya as q,Xs as r,Ps as rt,Rn as s,uo as st,Ys as t,bo as tt,vn as u,za as v,_a as w,ja as x,Rt as y,zs as z};
@@ -1 +1 @@
1
- var k=Object.defineProperty;var o=(t,e)=>k(t,"name",{value:e,configurable:!0});import{i as v}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as R,Lr as T,S as i,c as O,m as A,s as z,t as x}from"./createLucideIcon-r3v6fbGz.js";import{Q as $}from"./mention-chips-DXumPrOR.js";import{A as h,C as f,D as j,E as _,O as y,S as b,T as S,k as C,w}from"./MarkdownEditor-Pip4OXiJ.js";import{n as N}from"./button-CAPbz11u.js";var c=v(T(),1),a=v(R(),1),M=Object.defineProperty,d=o((t,e)=>M(t,"name",{value:e,configurable:!0}),"__name"),[F,vt]=O("AlertDialog",[h]),g=h(),H=d(t=>{const{__scopeAlertDialog:e,...r}=t,l=g(e);return(0,a.jsx)(b,{...l,...r,modal:!0})},"AlertDialog"),L=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(C,{...n,...s,ref:r})},"AlertDialogTrigger2"),"AlertDialogTrigger")),E=d(t=>{const{__scopeAlertDialog:e,...r}=t,l=g(e);return(0,a.jsx)(j,{...l,...r})},"AlertDialogPortal"),q=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(_,{...n,...s,ref:r})},"AlertDialogOverlay2"),"AlertDialogOverlay")),[I,V]=F("AlertDialogContent"),Q=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,children:s,...n}=e,p=g(l),m=c.useRef(null),P=A(r,m),D=c.useRef(null);return(0,a.jsx)(I,{scope:l,cancelRef:D,children:(0,a.jsx)(w,{role:"alertdialog",...p,...n,ref:P,onOpenAutoFocus:z(n.onOpenAutoFocus,u=>{u.preventDefault(),D.current?.focus({preventScroll:!0})}),onPointerDownOutside:o(u=>u.preventDefault(),"onPointerDownOutside"),onInteractOutside:o(u=>u.preventDefault(),"onInteractOutside"),children:s})})},"AlertDialogContent2"),"AlertDialogContent")),X=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(y,{...n,...s,ref:r})},"AlertDialogTitle2"),"AlertDialogTitle")),B=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(S,{...n,...s,ref:r})},"AlertDialogDescription2"),"AlertDialogDescription")),G=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(f,{...n,...s,ref:r})},"AlertDialogAction2"),"AlertDialogAction")),J="AlertDialogCancel",K=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,{cancelRef:n}=V(J,l),p=g(l),m=A(r,n);return(0,a.jsx)(f,{...p,...s,ref:m})},"AlertDialogCancel2"),"AlertDialogCancel")),U=H,W=L,Y=E,Z=q,tt=Q,et=G,at=K,ot=X,rt=B,lt=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],At=x("folder-search",lt),st=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ht=x("pencil",st),nt=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],jt=x("refresh-cw",nt);function _t({...t}){return(0,a.jsx)(U,{"data-slot":"alert-dialog",...t})}o(_t,"AlertDialog");function yt({...t}){return(0,a.jsx)(W,{"data-slot":"alert-dialog-trigger",...t})}o(yt,"AlertDialogTrigger");function it({...t}){return(0,a.jsx)(Y,{"data-slot":"alert-dialog-portal",...t})}o(it,"AlertDialogPortal");function ct({className:t,...e}){return(0,a.jsx)(Z,{"data-slot":"alert-dialog-overlay",className:i("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 duration-100",t),...e})}o(ct,"AlertDialogOverlay");function bt({className:t,...e}){return(0,a.jsxs)(it,{children:[(0,a.jsx)(ct,{}),(0,a.jsx)(tt,{"data-slot":"alert-dialog-content",className:i("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.97] data-[state=open]:zoom-in-[0.97] fixed top-(--sz-calc-26) md:top-(--pct-50) left-(--pct-50) z-50 grid w-full max-w-(--sz-calc-25) translate-x-(--pct-neg-50) translate-y-0 md:translate-y-(--pct-neg-50) gap-4 rounded-lg border p-6 shadow-lg duration-150 ease-(--e-cubic-bezier-0_16-1-0_3-1) outline-none sm:max-w-lg [&>*]:min-w-0",t),...e})]})}o(bt,"AlertDialogContent");function St({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-header",className:i("flex flex-col gap-2 text-center sm:text-left",t),...e})}o(St,"AlertDialogHeader");function Ct({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-footer",className:i("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}o(Ct,"AlertDialogFooter");function wt({className:t,...e}){return(0,a.jsx)(ot,{"data-slot":"alert-dialog-title",className:i("text-lg leading-none font-semibold",t),...e})}o(wt,"AlertDialogTitle");function Nt({className:t,...e}){return(0,a.jsx)(rt,{"data-slot":"alert-dialog-description",className:i("text-muted-foreground text-sm",t),...e})}o(Nt,"AlertDialogDescription");function Pt({className:t,...e}){return(0,a.jsx)(et,{"data-slot":"alert-dialog-action",className:i(N(),t),...e})}o(Pt,"AlertDialogAction");function kt({className:t,...e}){return(0,a.jsx)(at,{"data-slot":"alert-dialog-cancel",className:i(N({variant:"outline"}),t),...e})}o(kt,"AlertDialogCancel");function Rt({...t}){return(0,a.jsx)(b,{"data-slot":"sheet",...t})}o(Rt,"Sheet");function Tt({...t}){return(0,a.jsx)(C,{"data-slot":"sheet-trigger",...t})}o(Tt,"SheetTrigger");function Ot({...t}){return(0,a.jsx)(f,{"data-slot":"sheet-close",...t})}o(Ot,"SheetClose");function dt({...t}){return(0,a.jsx)(j,{"data-slot":"sheet-portal",...t})}o(dt,"SheetPortal");function gt({className:t,...e}){return(0,a.jsx)(_,{"data-slot":"sheet-overlay",className:i("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}o(gt,"SheetOverlay");function zt({className:t,children:e,side:r="right",showCloseButton:l=!0,...s}){return(0,a.jsxs)(dt,{children:[(0,a.jsx)(gt,{}),(0,a.jsxs)(w,{"data-slot":"sheet-content",className:i("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[e,l&&(0,a.jsxs)(f,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,a.jsx)($,{className:"size-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}o(zt,"SheetContent");function $t({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"sheet-header",className:i("flex flex-col gap-1.5 p-4",t),...e})}o($t,"SheetHeader");function Mt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"sheet-footer",className:i("mt-auto flex flex-col gap-2 p-4",t),...e})}o(Mt,"SheetFooter");function Ft({className:t,...e}){return(0,a.jsx)(y,{"data-slot":"sheet-title",className:i("text-foreground font-semibold",t),...e})}o(Ft,"SheetTitle");function Ht({className:t,...e}){return(0,a.jsx)(S,{"data-slot":"sheet-description",className:i("text-muted-foreground text-sm",t),...e})}o(Ht,"SheetDescription");export{yt as _,Mt as a,At as b,Tt as c,kt as d,bt as f,wt as g,St as h,Ht as i,_t as l,Ct as m,Ot as n,$t as o,Nt as p,zt as r,Ft as s,Rt as t,Pt as u,jt as v,ht as y};
1
+ var k=Object.defineProperty;var o=(t,e)=>k(t,"name",{value:e,configurable:!0});import{i as v}from"./rolldown-runtime-ZpX3ckPj.js";import{Fr as R,Lr as T,S as i,c as O,m as A,s as z,t as x}from"./createLucideIcon-r3v6fbGz.js";import{Q as $}from"./mention-chips-DXumPrOR.js";import{A as h,C as f,D as j,E as _,O as y,S as b,T as S,k as C,w}from"./MarkdownEditor-DfrwLv1M.js";import{n as N}from"./button-CAPbz11u.js";var c=v(T(),1),a=v(R(),1),M=Object.defineProperty,d=o((t,e)=>M(t,"name",{value:e,configurable:!0}),"__name"),[F,vt]=O("AlertDialog",[h]),g=h(),H=d(t=>{const{__scopeAlertDialog:e,...r}=t,l=g(e);return(0,a.jsx)(b,{...l,...r,modal:!0})},"AlertDialog"),L=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(C,{...n,...s,ref:r})},"AlertDialogTrigger2"),"AlertDialogTrigger")),E=d(t=>{const{__scopeAlertDialog:e,...r}=t,l=g(e);return(0,a.jsx)(j,{...l,...r})},"AlertDialogPortal"),q=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(_,{...n,...s,ref:r})},"AlertDialogOverlay2"),"AlertDialogOverlay")),[I,V]=F("AlertDialogContent"),Q=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,children:s,...n}=e,p=g(l),m=c.useRef(null),P=A(r,m),D=c.useRef(null);return(0,a.jsx)(I,{scope:l,cancelRef:D,children:(0,a.jsx)(w,{role:"alertdialog",...p,...n,ref:P,onOpenAutoFocus:z(n.onOpenAutoFocus,u=>{u.preventDefault(),D.current?.focus({preventScroll:!0})}),onPointerDownOutside:o(u=>u.preventDefault(),"onPointerDownOutside"),onInteractOutside:o(u=>u.preventDefault(),"onInteractOutside"),children:s})})},"AlertDialogContent2"),"AlertDialogContent")),X=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(y,{...n,...s,ref:r})},"AlertDialogTitle2"),"AlertDialogTitle")),B=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(S,{...n,...s,ref:r})},"AlertDialogDescription2"),"AlertDialogDescription")),G=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,n=g(l);return(0,a.jsx)(f,{...n,...s,ref:r})},"AlertDialogAction2"),"AlertDialogAction")),J="AlertDialogCancel",K=c.forwardRef(d(o(function(e,r){const{__scopeAlertDialog:l,...s}=e,{cancelRef:n}=V(J,l),p=g(l),m=A(r,n);return(0,a.jsx)(f,{...p,...s,ref:m})},"AlertDialogCancel2"),"AlertDialogCancel")),U=H,W=L,Y=E,Z=q,tt=Q,et=G,at=K,ot=X,rt=B,lt=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],At=x("folder-search",lt),st=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],ht=x("pencil",st),nt=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],jt=x("refresh-cw",nt);function _t({...t}){return(0,a.jsx)(U,{"data-slot":"alert-dialog",...t})}o(_t,"AlertDialog");function yt({...t}){return(0,a.jsx)(W,{"data-slot":"alert-dialog-trigger",...t})}o(yt,"AlertDialogTrigger");function it({...t}){return(0,a.jsx)(Y,{"data-slot":"alert-dialog-portal",...t})}o(it,"AlertDialogPortal");function ct({className:t,...e}){return(0,a.jsx)(Z,{"data-slot":"alert-dialog-overlay",className:i("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 duration-100",t),...e})}o(ct,"AlertDialogOverlay");function bt({className:t,...e}){return(0,a.jsxs)(it,{children:[(0,a.jsx)(ct,{}),(0,a.jsx)(tt,{"data-slot":"alert-dialog-content",className:i("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.97] data-[state=open]:zoom-in-[0.97] fixed top-(--sz-calc-26) md:top-(--pct-50) left-(--pct-50) z-50 grid w-full max-w-(--sz-calc-25) translate-x-(--pct-neg-50) translate-y-0 md:translate-y-(--pct-neg-50) gap-4 rounded-lg border p-6 shadow-lg duration-150 ease-(--e-cubic-bezier-0_16-1-0_3-1) outline-none sm:max-w-lg [&>*]:min-w-0",t),...e})]})}o(bt,"AlertDialogContent");function St({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-header",className:i("flex flex-col gap-2 text-center sm:text-left",t),...e})}o(St,"AlertDialogHeader");function Ct({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-footer",className:i("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}o(Ct,"AlertDialogFooter");function wt({className:t,...e}){return(0,a.jsx)(ot,{"data-slot":"alert-dialog-title",className:i("text-lg leading-none font-semibold",t),...e})}o(wt,"AlertDialogTitle");function Nt({className:t,...e}){return(0,a.jsx)(rt,{"data-slot":"alert-dialog-description",className:i("text-muted-foreground text-sm",t),...e})}o(Nt,"AlertDialogDescription");function Pt({className:t,...e}){return(0,a.jsx)(et,{"data-slot":"alert-dialog-action",className:i(N(),t),...e})}o(Pt,"AlertDialogAction");function kt({className:t,...e}){return(0,a.jsx)(at,{"data-slot":"alert-dialog-cancel",className:i(N({variant:"outline"}),t),...e})}o(kt,"AlertDialogCancel");function Rt({...t}){return(0,a.jsx)(b,{"data-slot":"sheet",...t})}o(Rt,"Sheet");function Tt({...t}){return(0,a.jsx)(C,{"data-slot":"sheet-trigger",...t})}o(Tt,"SheetTrigger");function Ot({...t}){return(0,a.jsx)(f,{"data-slot":"sheet-close",...t})}o(Ot,"SheetClose");function dt({...t}){return(0,a.jsx)(j,{"data-slot":"sheet-portal",...t})}o(dt,"SheetPortal");function gt({className:t,...e}){return(0,a.jsx)(_,{"data-slot":"sheet-overlay",className:i("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}o(gt,"SheetOverlay");function zt({className:t,children:e,side:r="right",showCloseButton:l=!0,...s}){return(0,a.jsxs)(dt,{children:[(0,a.jsx)(gt,{}),(0,a.jsxs)(w,{"data-slot":"sheet-content",className:i("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...s,children:[e,l&&(0,a.jsxs)(f,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,a.jsx)($,{className:"size-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}o(zt,"SheetContent");function $t({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"sheet-header",className:i("flex flex-col gap-1.5 p-4",t),...e})}o($t,"SheetHeader");function Mt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"sheet-footer",className:i("mt-auto flex flex-col gap-2 p-4",t),...e})}o(Mt,"SheetFooter");function Ft({className:t,...e}){return(0,a.jsx)(y,{"data-slot":"sheet-title",className:i("text-foreground font-semibold",t),...e})}o(Ft,"SheetTitle");function Ht({className:t,...e}){return(0,a.jsx)(S,{"data-slot":"sheet-description",className:i("text-muted-foreground text-sm",t),...e})}o(Ht,"SheetDescription");export{yt as _,Mt as a,At as b,Tt as c,kt as d,bt as f,wt as g,St as h,Ht as i,_t as l,Ct as m,Ot as n,$t as o,Nt as p,zt as r,Ft as s,Rt as t,Pt as u,jt as v,ht as y};
@@ -41,7 +41,7 @@
41
41
  }
42
42
  })();
43
43
  </script>
44
- <script type="module" crossorigin src="/assets/index-CZl9vxyj.js"></script>
44
+ <script type="module" crossorigin src="/assets/index-Dgrf6BZM.js"></script>
45
45
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-ZpX3ckPj.js">
46
46
  <link rel="modulepreload" crossorigin href="/assets/createLucideIcon-r3v6fbGz.js">
47
47
  <link rel="modulepreload" crossorigin href="/assets/preload-helper-CceJXRIF.js">
@@ -49,19 +49,19 @@
49
49
  <link rel="modulepreload" crossorigin href="/assets/agents-BlSzFh-1.js">
50
50
  <link rel="modulepreload" crossorigin href="/assets/button-CAPbz11u.js">
51
51
  <link rel="modulepreload" crossorigin href="/assets/EmptyState-DPcc0zYh.js">
52
- <link rel="modulepreload" crossorigin href="/assets/router-DyZkoSkG.js">
52
+ <link rel="modulepreload" crossorigin href="/assets/router-Bb8nJWyv.js">
53
53
  <link rel="modulepreload" crossorigin href="/assets/bot-DZDpMzjD.js">
54
54
  <link rel="modulepreload" crossorigin href="/assets/mention-chips-DXumPrOR.js">
55
55
  <link rel="modulepreload" crossorigin href="/assets/dist-5v80Jc6A.js">
56
56
  <link rel="modulepreload" crossorigin href="/assets/dist-D1zgkcBw.js">
57
57
  <link rel="modulepreload" crossorigin href="/assets/AgentAvatar-PT82VwmU.js">
58
58
  <link rel="modulepreload" crossorigin href="/assets/dist-DCJXgQu0.js">
59
- <link rel="modulepreload" crossorigin href="/assets/MarkdownEditor-Pip4OXiJ.js">
60
- <link rel="modulepreload" crossorigin href="/assets/sheet-DeCxNmfl.js">
59
+ <link rel="modulepreload" crossorigin href="/assets/MarkdownEditor-DfrwLv1M.js">
60
+ <link rel="modulepreload" crossorigin href="/assets/sheet-CQJe5sfn.js">
61
61
  <link rel="modulepreload" crossorigin href="/assets/check-DDiXDm2i.js">
62
62
  <link rel="modulepreload" crossorigin href="/assets/chevron-right-B9JUOr38.js">
63
- <link rel="modulepreload" crossorigin href="/assets/checkbox-CmMbs2PZ.js">
64
- <link rel="modulepreload" crossorigin href="/assets/label-C2ddSDJj.js">
63
+ <link rel="modulepreload" crossorigin href="/assets/checkbox-757DLJRS.js">
64
+ <link rel="modulepreload" crossorigin href="/assets/label-BueB30Ch.js">
65
65
  <link rel="modulepreload" crossorigin href="/assets/clipboard-CYJ5Q78m.js">
66
66
  <link rel="modulepreload" crossorigin href="/assets/loader-circle-BD9wx-lw.js">
67
67
  <link rel="modulepreload" crossorigin href="/assets/octagon-alert-rGMwyrWA.js">
@@ -81,15 +81,15 @@
81
81
  <link rel="modulepreload" crossorigin href="/assets/card-dmVcp3AX.js">
82
82
  <link rel="modulepreload" crossorigin href="/assets/skeleton-CKir8TUW.js">
83
83
  <link rel="modulepreload" crossorigin href="/assets/PageSkeleton-DHjTwRT3.js">
84
- <link rel="modulepreload" crossorigin href="/assets/RoutineRunVariablesDialog-IRX4TLng.js">
84
+ <link rel="modulepreload" crossorigin href="/assets/RoutineRunVariablesDialog-Bt4KAWCh.js">
85
85
  <link rel="modulepreload" crossorigin href="/assets/tabs-DWRZjksg.js">
86
86
  <link rel="modulepreload" crossorigin href="/assets/save-DUnPDT6R.js">
87
87
  <link rel="modulepreload" crossorigin href="/assets/use-adapter-capabilities-BiWYK4zJ.js">
88
88
  <link rel="modulepreload" crossorigin href="/assets/external-link-0lrOvZWO.js">
89
- <link rel="modulepreload" crossorigin href="/assets/MarkdownBody-D0eCfSWN.js">
89
+ <link rel="modulepreload" crossorigin href="/assets/MarkdownBody-DJQ35hak.js">
90
90
  <link rel="modulepreload" crossorigin href="/assets/file-text-C9vgFckt.js">
91
91
  <link rel="modulepreload" crossorigin href="/assets/SidebarContext-D01pu4wh.js">
92
- <link rel="stylesheet" crossorigin href="/assets/index-GCNIGBzC.css">
92
+ <link rel="stylesheet" crossorigin href="/assets/index-J-4PQOv1.css">
93
93
  </head>
94
94
  <body>
95
95
  <div id="root"></div>
package/ui-dist/sw.js CHANGED
@@ -4,7 +4,7 @@
4
4
  // browser install a new worker, which — via skipWaiting + controllerchange —
5
5
  // reloads parked tabs onto the fresh bundle. Left as the literal placeholder in
6
6
  // dev, where HMR (not the worker) drives refreshes.
7
- const BUILD_ID = "index-CZl9vxyj";
7
+ const BUILD_ID = "index-Dgrf6BZM";
8
8
  // Separate this allowlisted cache from older workers that cached arbitrary URLs.
9
9
  const CACHE_NAME = `paperclip-public-assets-${BUILD_ID}`;
10
10
  const privateRequests = new Set();