@imagile-dev/toil-ui 0.1.0-beta.1 → 0.1.0-beta.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.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./theme-63MlXwuO.css","./theme-D3_AOEgB.css","./theme-C_ukluUB.css","./theme-BVugNGOi.css","./theme-DMjUjC0D.css","./theme-BJDDePbd.css","./Graph-BG4Q-CNd.js","./Graph-CeJeskZg.css","./PowershellMan-24GyLAoI.js","./PowershellMan-Ic3-jSrq.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./theme-63MlXwuO.css","./theme-D3_AOEgB.css","./theme-C_ukluUB.css","./theme-BVugNGOi.css","./theme-DMjUjC0D.css","./theme-BJDDePbd.css","./Graph-CS6dQALI.js","./Graph-CeJeskZg.css","./PowershellMan-rG0kojOi.js","./PowershellMan-Ic3-jSrq.css"])))=>i.map(i=>d[i]);
2
2
  var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function te(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),te(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=te(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(ee(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ne(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var N=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ie(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,N)}catch(e){N(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ae(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ie(ae.bind(null,e))}var oe={map:ne,forEach:function(e,t,n){ne(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ne(e,function(){t++}),t},toArray:function(e){return ne(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=oe,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=ae,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ie,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),m=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}function h(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&h(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),ee=Symbol.for(`react.profiler`),te=Symbol.for(`react.consumer`),ne=Symbol.for(`react.context`),re=Symbol.for(`react.forward_ref`),N=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),P=Symbol.for(`react.legacy_hidden`),ce=Symbol.for(`react.memo_cache_sentinel`),F=Symbol.for(`react.view_transition`),le=Symbol.for(`react.recoverable`),ue=Symbol.iterator;function de(e){return typeof e!=`object`||!e?null:(e=ue&&e[ue]||e[`@@iterator`],typeof e==`function`?e:null)}var fe=Symbol.for(`react.client.reference`);function pe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case ee:return`Profiler`;case M:return`StrictMode`;case N:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`;case F:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case ne:return e.displayName||`Context`;case te:return(e._context.displayName||`Context`)+`.Consumer`;case re:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?pe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}var me=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ge=[],R=-1;function _e(e){return{current:e}}function ve(e){0>R||(e.current=ge[R],ge[R]=null,R--)}function z(e,t){R++,ge[R]=e.current,e.current=t}var ye=_e(null),be=_e(null),xe=_e(null),Se=_e(null);function Ce(e,t){switch(z(xe,t),z(be,e),z(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=vp(t),e=yp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ve(ye),z(ye,e)}function we(){ve(ye),ve(be),ve(xe)}function Te(e){var t=e.memoizedState;t!==null&&(hh._currentValue=t.memoizedState,z(Se,e)),t=ye.current;var n=yp(t,e.type);t!==n&&(z(be,e),z(ye,n))}function Ee(e){be.current===e&&(ve(ye),ve(be)),Se.current===e&&(ve(Se),hh._currentValue=he)}var De,B;function V(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,B=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+De+e+B}var H=!1;function Oe(e,t){if(!e||H)return``;H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -23,44 +23,44 @@ Error generating stack: `+e.message+`
23
23
  - `).replace(/<(br|\/p|\/div|\/li|\/h[1-6]|\/tr|\/ul|\/ol)\b[^>]*>/gi,`
24
24
  `).replace(/<[^>]+>/g,``))}function dv(e){if(!iv(e))return``;if(e.type===`text`&&typeof e.text==`string`)return e.text;let t=(Array.isArray(e.content)?e.content:[]).map(dv).join(``);switch(e.type){case`heading`:return`\n${`#`.repeat(iv(e.attrs)&&typeof e.attrs.level==`number`?e.attrs.level:1)} ${t}\n`;case`taskItem`:return`\n[ ] ${t}\n`;case`listItem`:return`\n- ${t}\n`;case`paragraph`:case`blockquote`:case`codeBlock`:return`\n${t}\n`;case`hardBreak`:return`
25
25
  `;default:return t}}var fv=e=>e.replace(/^\s*h([1-6])\.\s+/gim,(e,t)=>`${`#`.repeat(Number(t))} `);function pv(e,t){return e==null?``:iv(e)?dv(e):typeof e==`string`?t===`html`||t===void 0&&/<\/?[a-z][\s\S]*?>/i.test(e)?uv(e):t===`wiki`?fv(e):e:``}var mv=e=>e.split(/\r?\n/),hv=e=>e.replace(/^\s*(?:(?:#{1,6}|[-*+]|\d+[.)]|\[[ xX]?\])\s*)+/,``).replace(/[:.]\s*$/,``).replace(/\s+/g,` `).trim().toLowerCase(),gv=/[\p{L}\p{N}][\p{L}\p{N}'’-]*/gu,_v=e=>e.match(gv)?.length??0,vv=/^(tbd|tba|todo|to do|n\/?a|none|nothing|wip|placeholder|description|details|lorem ipsum.*|[-_.=*#~]+)$/i,yv=/<[^<>\n]{1,60}>|\{[^{}\n]{1,60}\}/g;function bv(e,t){let n=new Set(t);return mv(e).filter(e=>{let t=hv(e);return t!==``&&!n.has(t)&&!vv.test(t)}).map(e=>e.replace(yv,` `)).join(`
26
- `)}var xv=/^\s*(?:#{1,6}\s*|\*{1,2})?(acceptance criteria|definition of done|done when)\s*\**\s*(?::\s*(.*))?$/i,Sv=/^\s*(?:[-*+]\s*)?\[[ xX]?\]\s+\S/;function Cv(e,t=[]){let n=e=>_v(bv(e,t)),r=mv(e);for(let e=0;e<r.length;e++){let t=xv.exec(r[e]);if(t){if(n(t[2]??``)>0)return`heading`;for(let t=e+1;t<r.length&&!/^\s*#{1,6}\s/.test(r[t]);t++)if(n(r[t])>0)return`heading`}}return r.some(e=>Sv.test(e)&&n(e)>0)?`checklist`:null}function wv(e,t){let n=t.toLowerCase();for(let t of Object.values(e.native??{})){if(!iv(t))continue;let e=iv(t.fields)?t.fields:t;for(let[t,r]of Object.entries(e))if(t.toLowerCase()===n&&r!=null&&r!==``)return{value:r,key:t};for(let[t,n]of Object.entries(e))if(/^acceptance\s*criteria$/i.test(t)&&n!=null&&n!==``)return{value:n,key:t}}return null}function Tv(e){let t=e.source.area;return t.startsWith(`jira`)?{command:`${t} issue transitions`,input:{key:e.source.key}}:t.startsWith(`ado`)&&e.typeName?{command:`${t} work-item states`,input:{type:e.typeName}}:null}var Ev={proposed:`TODO`,inprogress:`IN_PROGRESS`,resolved:`IN_PROGRESS`,completed:`DONE`,removed:`DONE`},Dv={new:`TODO`,indeterminate:`IN_PROGRESS`,done:`DONE`};function Ov(e,t,n,r){if(r)return{command:t,error:r};let i=Array.isArray(n)?n:iv(n)&&Array.isArray(n.transitions)?n.transitions:[];return e.source.area.startsWith(`ado`)?{command:t,kind:`states`,states:i.filter(iv).map(e=>({name:String(e.name??``),category:typeof e.category==`string`?e.category.toLowerCase()===`removed`?null:Ev[e.category.toLowerCase()]??null:null}))}:{command:t,kind:`transitions`,states:i.filter(iv).map(e=>{let t=iv(e.to)?e.to:{},n=iv(t.statusCategory)&&typeof t.statusCategory.key==`string`?Dv[t.statusCategory.key]??null:null;return{name:String(t.name??e.name??``),category:n}})}}var kv=(e,t,n,r)=>({check:e,label:ev[e],state:t,reason:n,source:r}),Av=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function jv(e,t,n){let r=t?.acceptanceField??null;if(r){let n=wv(e,r);if(n){let e=_v(bv(pv(n.value),t?.templateLines??[]));if(e>0)return kv(`acceptance`,`pass`,`${Av(e,`word`)} in ${n.key}.`,`field ${n.key}`)}}let i=Cv(n,t?.templateLines??[]);return i?kv(`acceptance`,`pass`,i===`heading`?`A heading in the description lists them.`:`The description has a checklist.`,`description`):kv(`acceptance`,`thin`,`None found. ${r?`${r} is empty, and the description has`:`The description has`} no acceptance criteria heading or checklist.`,r?`field ${r}, description`:`description`)}function Mv(e,t,n){let r=t?.minWords??25,i=_v(n),a=_v(bv(n,t?.templateLines??[])),o=i-a,s=o>0?`, not counting ${Av(o,`word`)} of template or placeholder text`:``;return!e.body||i===0?kv(`description`,`thin`,`No description; ${Av(r,`word`)} are needed.`,`description`):a>=r?kv(`description`,`pass`,`${Av(a,`word`)} of real text${s}.`,`description`):kv(`description`,`thin`,`${Av(a,`word`)} of real text${s}; ${Av(r,`word`)} are needed.`,`description`)}var Nv=(e,t)=>e.source.connection===t.source.connection&&(e.typeName??e.type).toLowerCase()===(t.typeName??t.type).toLowerCase(),Pv=e=>e.statusCategory===`DONE`||(e.history?.transitions??[]).some(e=>e.toCategory===`DONE`);function Fv(e,t,n){let r=e.typeName??e.type.toLowerCase();if(e.statusCategory===`DONE`)return kv(`done`,`fail`,`Already done (${e.status??`Done`}).`,`status`);if(n?.error)return kv(`done`,`thin`,`The live read failed: ${n.error}`,`toil ${n.command}`);if(n?.states){let e=n.states.filter(e=>e.category===`DONE`);return n.kind===`states`?e.length?kv(`done`,`pass`,`The ${r} workflow has a Done state: ${e.map(e=>e.name).join(`, `)}.`,`toil ${n.command}`):kv(`done`,`fail`,`The ${r} workflow has no Done state, so it can never be finished.`,`toil ${n.command}`):e.length?kv(`done`,`pass`,`It can move to Done now: ${e.map(e=>e.name).join(`, `)}.`,`toil ${n.command}`):kv(`done`,`thin`,`None of the ${Av(n.states.length,`move`)} it offers now goes straight to Done; the workflow may get there in more steps.`,`toil ${n.command}`)}if(e.statusCategory===`UNKNOWN`)return kv(`done`,`thin`,`toil couldn't tell what category the status ${e.status??`(none)`} is in, so it isn't known to be open.`,`status`);if(e.source.area===`github`)return kv(`done`,`pass`,`Open (${e.status??`open`}); a GitHub issue closes from any state.`,`status`);let i=[...t.values()].find(t=>t.id!==e.id&&Nv(t,e)&&Pv(t));return i?kv(`done`,`pass`,`Open (${e.status??`open`}), and another ${r} here reached Done ([[${i.id}]]), so the workflow gets there.`,`cache`):kv(`done`,`thin`,`Open (${e.status??`open`}), but no ${r} in this dossier has reached Done, so a way there isn't known from the cache. Check the workflow live.`,`cache`)}function Iv(e,t){let n=e.links.filter(e=>e.type===`blocks`&&e.direction===`inward`);if(!n.length)return kv(`blockers`,`pass`,`Nothing blocks it.`,`links`);let r=n.filter(e=>t.has(e.target)&&t.get(e.target).statusCategory!==`DONE`),i=n.filter(e=>!t.has(e.target));return r.length?kv(`blockers`,`fail`,`Blocked by ${r.map(e=>`[[${e.target}]] (${t.get(e.target).status??`open`})`).join(`, `)}.`,`links`):i.length?kv(`blockers`,`thin`,`Blocked by ${i.map(e=>e.target).join(`, `)}, which this dossier doesn't hold, so whether ${i.length===1?`it's`:`they're`} still open isn't known.`,`links`):kv(`blockers`,`pass`,`Its ${n.length===1?`blocker is`:`blockers are`} done (${n.map(e=>`[[${e.target}]]`).join(`, `)}).`,`links`)}var Lv=e=>e.source.area===`github`?/^[^/]+\/([^#]+)#/.exec(e.source.key)?.[1]??null:null;function Rv(e,t){if(!t.sources.includes(e.source.area))return kv(`scope`,`fail`,`It came from ${e.source.area}, which isn't one of this dossier's sources (${t.sources.join(`, `)||`none`}).`,`dossier`);let n=t.repos;if(!n.length)return kv(`scope`,`thin`,`The dossier names no repository, so an agent could plan it but has nowhere to implement it. Add one with toil dossiers add-repo.`,`dossier repos`);let r=Lv(e);return r&&n.includes(r)?kv(`scope`,`pass`,`${e.source.area} is one of the dossier's sources, and its repository, ${r}, is in the dossier.`,`dossier repos`):n.length===1?kv(`scope`,`pass`,`${e.source.area} is one of the dossier's sources, and an agent works in ${n[0]}.`,`dossier repos`):kv(`scope`,`pass`,`${e.source.area} is one of the dossier's sources, which names ${Av(n.length,`repository`,`repositories`)} (${n.join(`, `)}); one is chosen when it starts.`,`dossier repos`)}var zv={fail:0,thin:1,pass:2};function Bv({item:e,settings:t,byId:n,live:r}){let i=t.areas[e.source.area],a=e.body?pv(e.body.content,e.body.format):``,o=[jv(e,i,a),Mv(e,i,a),Fv(e,n,r),Iv(e,n),Rv(e,t)],s=o.some(e=>e.state===`fail`)?`blocked`:o.some(e=>e.state===`thin`)?`thin`:`ready`,c=o.filter(e=>e.state!==`pass`).sort((e,t)=>zv[e.state]-zv[t.state]);return{id:e.id,verdict:s,rows:o,why:c}}function Vv(e,t){let n=new Map(e.map(e=>[e.id,e]));return e.map(e=>Bv({item:e,settings:t,byId:n}))}function Hv(e){let t={ready:0,thin:0,blocked:0};for(let n of e)t[n.verdict]++;return t}var Uv=[`pr list`,`pr get`],Wv={family:`jira`,items:[`issue search`,`issue get`],history:[`issue history`],context:[],changes:[]},Gv={family:`ado`,items:[`work-item get`,`work-item get-many`],history:[`work-item history`],context:[`work-item iterations`],changes:Uv},Kv={jira:Wv,"jira-cloud":Wv,ado:Gv,"ado-cloud":Gv,github:{family:`github`,items:[`issue list`,`issue search`,`issue get`,`project items`],history:[`issue history`],context:[],changes:Uv},bitbucket:{family:`bitbucket`,items:[],history:[],context:[],changes:Uv},"bitbucket-cloud":{family:`bitbucket-cloud`,items:[],history:[],context:[],changes:Uv}},qv=Object.keys(Kv),Jv=[`estimate`,`estimateUnit`,`priority`,`type`,`team`,`dueDate`,`iteration`,`estimateLabel`,`iterationDays`],Yv=[`HUMAN`,`AGENT`,`BOT`],Xv=class extends Error{code;fix;details;constructor(e,t,n={}){super(t),this.name=`ToilError`,this.code=e,this.fix=n.fix,this.details=n.details}};function Zv(){let e=new Set,t=[];return{list:t,warn:(n,r)=>{let i=`${n}\u0000${r}`;e.has(i)||(e.add(i),t.push({code:n,message:r}))}}}var X=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Z=e=>typeof e==`string`&&e!==``?e:null,Qv=e=>typeof e==`number`&&Number.isFinite(e)?e:null;function $v(e){if(typeof e==`string`)return e===``?null:e;if(typeof e==`number`&&Number.isFinite(e))return String(e);if(Array.isArray(e)){for(let t of e){let e=$v(t);if(e!==null)return e}return null}return X(e)?Z(e.value)??Z(e.name)??Z(e.displayName)??Z(e.title):null}function ey(e){if(e==null||e===``)return null;if(typeof e!=`string`)return;let t=e.replace(/([+-]\d{2})(\d{2})$/,`$1:$2`);if(!/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/.test(t))return;let n=/T|\s/.test(t)?/(Z|[+-]\d{2}:\d{2})$/.test(t)?t:`${t}Z`:`${t}T00:00:00Z`,r=Date.parse(n.replace(` `,`T`));return Number.isNaN(r)?void 0:new Date(r).toISOString()}function ty(e){if(e==null||e===``)return null;if(typeof e!=`string`)return;let t=/^(\d{4}-\d{2}-\d{2})/.exec(e);return t?t[1]:void 0}var ny={epic:`EPIC`,story:`STORY`,"user story":`STORY`,"product backlog item":`STORY`,requirement:`STORY`,task:`TASK`,"sub-task":`TASK`,subtask:`TASK`,bug:`BUG`,defect:`BUG`,incident:`INCIDENT`};function ry(e,t={}){if(e===null)return`OTHER`;let n=e.toLowerCase();return t[n]??ny[n]??`OTHER`}function iy(e,t,n,r){return{owi:`0.2`,id:ay(e.connection,t),source:{area:e.area,connection:e.connection,key:t,command:e.command},url:null,type:`OTHER`,typeName:null,title:n,body:null,status:null,statusCategory:`UNKNOWN`,resolution:null,assignee:null,reporter:null,priority:null,estimate:null,labels:[],team:null,iteration:null,parent:null,children:[],links:[],created:null,updated:null,resolved:null,dueDate:null,history:null,unmapped:[],native:r}}var ay=(e,t)=>`${e}:${t}`;function oy(e,t,n){e.unmapped.some(e=>e.field===t)||e.unmapped.push({field:t,reason:n})}function sy(e,t,n,r){let i=ey(n);i===void 0?oy(e,t,`${r} holds ${JSON.stringify(n)}, which isn't a date-time`):e[t]=i}function cy(e,t,n){let r=ty(t);r===void 0?oy(e,`dueDate`,`${n} holds ${JSON.stringify(t)}, which isn't a date`):e.dueDate=r}function ly(e,t,n,r){return t.warn(`OWI_UNKNOWN_STATE`,`"${n}" (${e.source.area}) is a status OWI has no category for, so its items are UNKNOWN: ${r}`),oy(e,`statusCategory`,`"${n}" has no category: ${r}`),`UNKNOWN`}var uy=e=>e.fields.estimateUnit??`points`;function dy(e,t,n){let r=Z(e)??(typeof e==`number`?String(e):null);return r===null?null:{id:r,name:Z(t),email:Z(n)}}function fy(e){return e.find(e=>e.state===`current`)??[...e].reverse().find(e=>e.state===`future`)??e[e.length-1]??null}var py=[`Microsoft.VSTS.Scheduling.StoryPoints`,`Microsoft.VSTS.Scheduling.Effort`,`Microsoft.VSTS.Scheduling.Size`],my=`Microsoft.VSTS.Scheduling.OriginalEstimate`,hy={New:`TODO`,"To Do":`TODO`,Approved:`TODO`,Proposed:`TODO`,Active:`IN_PROGRESS`,"In Progress":`IN_PROGRESS`,Doing:`IN_PROGRESS`,Committed:`IN_PROGRESS`,Open:`IN_PROGRESS`,Resolved:`IN_PROGRESS`,Closed:`DONE`,Done:`DONE`,Removed:`DONE`},gy={"System.LinkTypes.Dependency-Forward":{type:`blocks`,direction:`outward`,name:`Successor`},"System.LinkTypes.Dependency-Reverse":{type:`blocks`,direction:`inward`,name:`Predecessor`},"System.LinkTypes.Related":{type:`relates`,direction:`outward`,name:`Related`},"System.LinkTypes.Duplicate-Forward":{type:`duplicates`,direction:`inward`,name:`Duplicate`},"System.LinkTypes.Duplicate-Reverse":{type:`duplicates`,direction:`outward`,name:`Duplicate Of`}},_y=`System.LinkTypes.Hierarchy-Reverse`,vy=`System.LinkTypes.Hierarchy-Forward`;function yy(e){if(X(e)&&Array.isArray(e.value))return e.value.filter(X);if(X(e)&&typeof e.id==`number`&&X(e.fields))return[e]}function by(e){if(X(e))return dy(e.uniqueName??e.id,e.displayName,typeof e.uniqueName==`string`&&e.uniqueName.includes(`@`)?e.uniqueName:null);if(typeof e==`string`){let t=/^(.*?)\s*<([^>]+)>$/.exec(e);return t?dy(t[2],t[1],t[2].includes(`@`)?t[2]:null):dy(e,e,null)}return null}var xy=e=>typeof e==`string`?/\/workItems\/(\d+)$/i.exec(e)?.[1]:void 0,Sy=(e,t)=>{let n=e.replace(/^\\+/,``).split(`\\`);return t&&n[1]?.toLowerCase()===`iteration`&&n.splice(1,1),n.join(`\\`).toLowerCase()};function Cy(e,t){if(!X(e)||e.structureType!==`iteration`)return!1;let n=e=>{if(X(e)){if(typeof e.path==`string`){let n=X(e.attributes)?e.attributes:{};t.set(Sy(e.path,!0),{id:Z(e.identifier),start:ey(n.startDate)??null,end:ey(n.finishDate)??null})}for(let t of Array.isArray(e.children)?e.children:[])n(t)}};return n(e),!0}function wy(e,t,n,r){if(typeof t.id!=`number`)return;let i=String(t.id),a=t.fields??{},o=iy(e,i,Z(a[`System.Title`])??``,{[e.command]:t});Z(a[`System.Title`])===null&&oy(o,`title`,`the record has no System.Title`);let s=X(t._links)?t._links:{},c=X(s.html)?Z(s.html.href):null,l=Z(t.url),u=Z(a[`System.TeamProject`]);c?o.url=c:l?.includes(`/_apis/`)&&u?o.url=`${l.slice(0,l.indexOf(`/_apis/`))}/${encodeURIComponent(u)}/_workitems/edit/${i}`:oy(o,`url`,`the record has no html link and no System.TeamProject to build one from`);let d=n.fields.type??`System.WorkItemType`;o.typeName=$v(a[d]),o.type=ry(o.typeName,{issue:`STORY`}),d in a||oy(o,`type`,Ty(d,n.fields.type!==void 0&&`type`)),typeof a[`System.Description`]==`string`&&(o.body={format:`html`,content:a[`System.Description`]}),o.status=Z(a[`System.State`]),o.status===null?oy(o,`status`,`the record has no System.State`):o.statusCategory=hy[o.status]??ly(o,n,o.status,`a custom state; ${e.area} work-item states shows its category`),o.statusCategory===`DONE`&&(o.resolution=Z(a[`System.Reason`])??(o.status===`Removed`?`Removed`:null)),o.assignee=by(a[`System.AssignedTo`]),o.reporter=by(a[`System.CreatedBy`]);let f=n.fields.priority??`Microsoft.VSTS.Common.Priority`;o.priority=$v(a[f]),n.fields.priority!==void 0&&a[f]===void 0&&oy(o,`priority`,Ty(f,`priority`)),o.labels=typeof a[`System.Tags`]==`string`?a[`System.Tags`].split(`;`).map(e=>e.trim()).filter(Boolean):[],n.fields.team!==void 0&&(o.team=$v(a[n.fields.team]),a[n.fields.team]===void 0&&oy(o,`team`,Ty(n.fields.team,`team`))),Ey(o,a,n);let p=n.fields.iteration??`System.IterationPath`,m=Z(a[p]);if(m===null)oy(o,`iteration`,Ty(p,n.fields.iteration!==void 0&&`iteration`));else{let e=r.get(Sy(m,!1));o.iteration={id:e?.id??null,name:m.split(`\\`).pop(),path:m,start:e?.start??null,end:e?.end??null,state:null},!e&&p===`System.IterationPath`&&m.includes(`\\`)&&oy(o,`iteration.dates`,`the iteration's dates come from ado work-item iterations: add its output to the input`)}for(let n of Array.isArray(t.relations)?t.relations:[]){if(!X(n))continue;let t=xy(n.url);if(t===void 0)continue;let r=String(n.rel??``);r===_y?o.parent=ay(e.connection,t):r===vy?o.children.push(ay(e.connection,t)):gy[r]?o.links.push({...gy[r],target:ay(e.connection,t)}):(r.startsWith(`System.LinkTypes.`)||r.startsWith(`Microsoft.VSTS.`))&&o.links.push({type:`other`,direction:`outward`,target:ay(e.connection,t),name:r})}o.parent===null&&typeof a[`System.Parent`]==`number`&&(o.parent=ay(e.connection,String(a[`System.Parent`]))),sy(o,`created`,a[`System.CreatedDate`],`System.CreatedDate`),sy(o,`updated`,a[`System.ChangedDate`],`System.ChangedDate`),sy(o,`resolved`,a[`Microsoft.VSTS.Common.ClosedDate`],`Microsoft.VSTS.Common.ClosedDate`);let h=n.fields.dueDate??(a[`Microsoft.VSTS.Scheduling.DueDate`]===void 0?`Microsoft.VSTS.Scheduling.TargetDate`:`Microsoft.VSTS.Scheduling.DueDate`);return n.fields.dueDate!==void 0&&a[h]===void 0?oy(o,`dueDate`,Ty(h,`dueDate`)):cy(o,a[h],h),o}var Ty=(e,t)=>`${e} has no value, or the record doesn't have it (Azure DevOps leaves empty fields out)${t?`; fields ${t} names it`:``}`;function Ey(e,t,n){let r=n.fields.estimate;if(r!==void 0){let i=Qv(t[r]);i===null?oy(e,`estimate`,t[r]===void 0?Ty(r,`estimate`):`${r} holds ${JSON.stringify(t[r])}, not a number`):e.estimate={value:i,unit:n.fields.estimateUnit?uy(n):r===`Microsoft.VSTS.Scheduling.OriginalEstimate`?`hours`:`points`,field:r};return}for(let n of py){let r=Qv(t[n]);if(r!==null)return void(e.estimate={value:r,unit:`points`,field:n})}let i=Qv(t[my]);if(i!==null)return void(e.estimate={value:i,unit:`hours`,field:my});oy(e,`estimate`,`none of StoryPoints, Effort, Size or OriginalEstimate has a value; Azure DevOps leaves empty fields out, so an unestimated item and one estimated in a field of the team's own look alike: point fields estimate at that field`)}function Dy(e,t){if(!Array.isArray(e.data))return;let n=t.fields.iteration??`System.IterationPath`,r=new Map,i=e.data.filter(e=>X(e)&&typeof e.id==`number`&&X(e.fields));i.sort((e,t)=>(Qv(e.rev)??0)-(Qv(t.rev)??0));for(let e of i){let t=String(e.id),i=e.fields,a=ey(i[`System.ChangedDate`]);if(!a)continue;let o=r.get(t);o||r.set(t,o={history:{transitions:[],iterations:[]},state:null,path:null});let s=by(i[`System.ChangedBy`]),c=Z(i[`System.State`]);c!==null&&c!==o.state&&(o.history.transitions.push({from:o.state,to:c,fromCategory:o.state===null?null:hy[o.state]??`UNKNOWN`,toCategory:hy[c]??`UNKNOWN`,at:a,by:s}),o.state=c);let l=Z(i[n]);l!==null&&l!==o.path&&(o.history.iterations.push({from:o.path===null?[]:[o.path],to:[l],at:a,by:s}),o.path=l)}return new Map([...r].map(([e,{history:t}])=>[e,t]))}function Oy(e,t,n,r,i){let a=`${t}#${n}`;return{owi:`0.2`,id:ay(e.connection,a),source:{area:e.area,connection:e.connection,key:a,command:e.command},url:null,repo:t,title:r,branch:{source:null,target:null},state:`OPEN`,author:null,authorKind:`HUMAN`,authorKindSource:`default`,authorKindSignal:null,reviewers:[],reviews:null,checks:null,checksAt:null,mergeable:null,size:null,workItems:[],mergeCommit:null,created:null,firstReviewAt:null,approvedAt:null,mergedAt:null,closedAt:null,updated:null,unmapped:[],native:{[e.command]:i}}}function ky(e,t,n){e.unmapped.some(e=>e.field===t)||e.unmapped.push({field:t,reason:n})}function Ay(e,t,n,r){let i=typeof n==`number`&&Number.isFinite(n)?new Date(n).toISOString():ey(n);return i===void 0?(ky(e,t,`${r} holds ${JSON.stringify(n)}, which isn't a date-time`),null):i}function jy(e){let t={};if(!X(e.included))return t;for(let n of[`reviews`,`checks`,`commits`,`files`])Array.isArray(e.included[n])&&(t[n]=e.included[n]);return t}var My=(e,t)=>e.command.endsWith(` pr list`)?`${e.command} doesn't return ${t}: map ${e.area} pr get --include ${t} for each pull request as well`:`the input wasn't read with --include ${t}: map ${e.area} pr get --include ${t}`,Ny=/^[a-z0-9]+(-[a-z0-9]+)*$/;function Py(e){return(e??[]).map(e=>{let t,n;if(typeof e==`string`){let r=e.lastIndexOf(`=`);if(r<=0)throw new Xv(`INVALID_INPUT`,`"${e}" isn't a key pattern.`,{fix:`Write it as pattern=connection, with {n} where the number is: PAY-{n}=corp-jira, or AB#{n}=corp-ado.`});t=e.slice(0,r),n=e.slice(r+1)}else({text:t,connection:n}=e);if(t.split(`{n}`).length!==2||t===`{n}`)throw new Xv(`INVALID_INPUT`,`The key pattern "${t}" must hold {n} exactly once, beside some text (PAY-{n}, AB#{n}).`,{fix:`Put {n} where the number is, once: PAY-{n}=corp-jira.`});if(!Ny.test(n))throw new Xv(`INVALID_INPUT`,`"${n}" isn't a connection name (the part after = in ${t}=${n}).`,{fix:`Name the connection the keys belong to: lowercase letters, digits and single hyphens, as toil connections list shows it.`});return{text:t,connection:n}})}var Fy=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function Iy(e){let[t,n]=e.split(`{n}`),r=/^\w/.test(t)?`(?<![\\w-])`:``,i=n===``||/\w$/.test(n)?`(?!\\w)`:``;return RegExp(`${r}${Fy(t)}(\\d+)${Fy(n)}${i}`,`g`)}var Ly=(e,t,n)=>e.text.endsWith(`#{n}`)&&!e.text.includes(`/`)?n:t,Ry=e=>e.replace(/```[\s\S]*?```/g,` `).replace(/`[^`\n]*`/g,` `);function zy(e,t,n=()=>[]){let r=[],i=e=>{r.includes(e)||r.push(e)};for(let r of e){if(!r)continue;let e=Ry(r);for(let t of n(e))i(t);for(let n of t)for(let t of e.matchAll(Iy(n.text)))i(ay(n.connection,Ly(n,t[0],t[1])))}return r}function By(e){let t=e?.split(`/`).at(-1)??``;return/^(\d+)[-_]/.exec(t)?.[1]??null}var Vy=/(?<![\w/#-])#(\d+)\b/g,Hy=[`claude/`,`copilot/`,`codex/`],Uy=/^co-authored-by:\s*(.+)$/gim,Wy=[{name:`Claude`,test:/\bclaude\b|@anthropic\.com\b/i},{name:`GitHub Copilot`,test:/\bcopilot\b/i},{name:`Codex`,test:/\bcodex\b|@openai\.com\b/i},{name:`Cursor`,test:/\bcursor\s*agent\b|@cursor\.(com|sh)\b/i},{name:`Devin`,test:/\bdevin\b|@cognition\.ai\b/i}],Gy=[`copilot`,`copilot-swe-agent[bot]`,`claude[bot]`,`devin-ai-integration[bot]`,`chatgpt-codex-connector[bot]`];function Ky(e){for(let t of e)for(let e of t.matchAll(Uy)){let t=e[1].trim();if(Wy.some(e=>e.test.test(t)))return`Co-Authored-By: ${t}`}return null}function qy(e,t,n){let r=(t,n,r)=>{e.authorKind=t,e.authorKindSource=n,e.authorKindSignal=r},i=e.author?Jy(t.changes.authors,e.author):void 0;if(i)return r(i.kind,`override`,`override for ${i.id}`);if(n.account)return r(n.account.kind,`account`,n.account.signal);let a=n.messages?Ky(n.messages):null;if(a)return r(`AGENT`,`trailer`,a);if(Hy.find(t=>e.branch.source?.toLowerCase().startsWith(t)))return r(`AGENT`,`branch`,`branch ${e.branch.source}`);r(`HUMAN`,`default`,null),n.messages===null&&ky(e,`authorKind`,`HUMAN by default: no override, account or branch says otherwise, and the commits (whose Co-Authored-By trailers can name an agent) weren't read; map pr get --include commits`)}function Jy(e,t){let n=[t.id,t.name,t.email].filter(e=>!!e).map(e=>e.toLowerCase());for(let[t,r]of Object.entries(e))if(n.includes(t.toLowerCase()))return{id:t,kind:r}}function Yy(e){let t=Array.isArray(e)?e.map(e=>{let t=e.lastIndexOf(`=`);if(t<=0)throw new Xv(`INVALID_INPUT`,`"${e}" isn't an author kind.`,{fix:`Write it as id=KIND, with KIND one of HUMAN, AGENT or BOT: release-bot=BOT.`});return[e.slice(0,t),e.slice(t+1)]}):Object.entries(e??{}),n={};for(let[e,r]of t){let t=String(r).toUpperCase();if(!Yv.includes(t))throw new Xv(`INVALID_INPUT`,`"${r}" isn't an author kind (for ${e}).`,{fix:`Use one of ${Yv.join(`, `)}.`});n[e]=t}return n}function Xy(e,t){let n=[...t].sort((e,t)=>e.at<t.at?-1:+(e.at>t.at));e.reviews=n;let r=n.filter(t=>!e.author||t.by.id.toLowerCase()!==e.author.id.toLowerCase());e.firstReviewAt=r[0]?.at??null,e.approvedAt=r.find(e=>e.state===`APPROVED`)?.at??null}function Zy(e,t){let n=e=>e.map(e=>e.at).filter(e=>e!==null).sort();if(!t.length){e.checks=`NONE`,e.checksAt=null;return}let r=t.filter(e=>e.outcome===`fail`),i=r.length?`FAILING`:t.some(e=>e.outcome===`pending`)?`PENDING`:`PASSING`;e.checks=i,e.checksAt=i===`FAILING`?n(r)[0]??null:n(t).at(-1)??null}function Qy(e){return e.flatMap(e=>{if(!X(e))return[];let t=Z(e.message)??(X(e.commit)?Z(e.commit.message):null)??Z(e.comment);return t?[t]:[]})}function $y(e,t){let n=e=>e.source.command.endsWith(` pr get`),[r,i]=n(t)||!n(e)?[t,e]:[e,t];return{...r,native:{...i.native,...r.native}}}function eb(e){if(Array.isArray(e))return e.filter(X);if(X(e)&&typeof e.pullRequestId==`number`)return[e]}var tb=e=>typeof e==`number`&&e>=5?`APPROVED`:typeof e==`number`&&e<=-5?`CHANGES_REQUESTED`:`PENDING`,nb=e=>Z(e)?.replace(/^refs\/heads\//,``)??null,rb=(e,t)=>X(e.properties)&&X(e.properties[t])?Z(String(e.properties[t].$value??``)):null,ib={succeeded:`pass`,notApplicable:`pass`,failed:`fail`,error:`fail`,pending:`pending`,notSet:`pending`};function ab(e,t,n,r){let i=String(e.pullRequestId),a=Z(t.webUrl);if(a)return`${a}/pullrequest/${i}`;let o=(Z(t.url)??Z(e.url))?.split(`/_apis/`)[0];return!o||!n||!r?null:`${o.slice(0,o.lastIndexOf(`/`))}/${encodeURIComponent(n)}/_git/${encodeURIComponent(r)}/pullrequest/${i}`}function ob(e,t,n){let r=X(t.repository)?t.repository:{},i=X(r.project)?Z(r.project.name):e.inputs.project??null,a=Z(r.name)??e.inputs.repo??null;if(!i||!a||typeof t.pullRequestId!=`number`)return;let o=String(t.pullRequestId),s=Oy(e,`${i}/${a}`,o,Z(t.title)??`Pull request ${o}`,t);s.url=ab(t,r,i,a),s.branch={source:nb(t.sourceRefName),target:nb(t.targetRefName)},s.author=by(t.createdBy),s.state=t.status===`completed`?`MERGED`:t.status===`abandoned`?`DECLINED`:t.isDraft===!0?`DRAFT`:`OPEN`,s.created=Ay(s,`created`,t.creationDate,`creationDate`);let c=s.state===`MERGED`||s.state===`DECLINED`?Ay(s,`closedAt`,t.closedDate,`closedDate`):null;s.closedAt=c,s.mergedAt=s.state===`MERGED`?c:null,ky(s,`updated`,`Azure DevOps records no last-updated time on a pull request`),s.mergeCommit=s.state===`MERGED`&&X(t.lastMergeCommit)?Z(t.lastMergeCommit.commitId):null,s.mergeable=t.mergeStatus===`succeeded`||t.mergeStatus!==`conflicts`&&null,s.mergeable===null&&s.state!==`MERGED`&&s.state!==`DECLINED`&&ky(s,`mergeable`,`Azure DevOps reported mergeStatus ${JSON.stringify(t.mergeStatus??null)}, which says neither clean nor conflicting`);let l=t=>[...t.matchAll(Vy)].map(t=>ay(e.connection,t[1])),u=By(s.branch.source);s.workItems=zy([s.title,u?`#${u}`:null,s.branch.source,Z(t.description)],n.changes.keys,l);let d=s.author?.id.toLowerCase();s.reviewers=(Array.isArray(t.reviewers)?t.reviewers.filter(X):[]).flatMap(e=>{let t=by(e);return t?[{person:t,state:tb(e.vote)}]:[]});let f=jy(t);if(f.reviews){let e=[];for(let t of f.reviews.filter(X).filter(e=>e.isDeleted!==!0)){let n=Array.isArray(t.comments)?t.comments.filter(X):[];if(rb(t,`CodeReviewThreadType`)===`VoteUpdate`){let r=Number(rb(t,`CodeReviewVoteResult`)),i=by(n[0]?.author),a=Ay(s,`reviews`,t.publishedDate??n[0]?.publishedDate,`a vote thread's publishedDate`);i&&a&&Number.isFinite(r)&&e.push({by:i,state:r>=5?`APPROVED`:r<=-5?`CHANGES_REQUESTED`:`DISMISSED`,at:a});continue}let r=n[0];if(!r||r.commentType===`system`)continue;let i=by(r.author),a=Ay(s,`reviews`,r.publishedDate,`a comment's publishedDate`);i&&a&&i.id.toLowerCase()!==d&&e.push({by:i,state:`COMMENTED`,at:a})}Xy(s,e)}else for(let t of[`reviews`,`firstReviewAt`,`approvedAt`])ky(s,t,My(e,`reviews`));if(f.checks){let e=new Map;for(let t of f.checks.filter(X)){let n=X(t.context)?`${Z(t.context.genre)??``}/${Z(t.context.name)??``}`:String(t.id),r=String(t.updatedDate??t.creationDate??``),i=e.get(n);(!i||String(i.updatedDate??i.creationDate??``)<=r)&&e.set(n,t)}Zy(s,[...e.entries()].map(([e,t])=>({name:e,outcome:ib[String(t.state)]??`pending`,at:Ay(s,`checksAt`,t.updatedDate??t.creationDate,`a status's creationDate`)})))}else ky(s,`checks`,My(e,`checks`));return f.files?(s.size={files:f.files.filter(e=>!(X(e)&&X(e.item)&&e.item.isFolder===!0)).length,additions:null,deletions:null},ky(s,`size`,`Azure DevOps lists the files a pull request changes, not the lines, so additions and deletions are empty`)):ky(s,`size`,My(e,`files`)),qy(s,n,{account:(X(t.createdBy)?Z(t.createdBy.descriptor):null)?.startsWith(`svc.`)?{kind:`BOT`,signal:`account ${s.author?.name??s.author?.id??`unknown`}, a service identity`}:null,messages:f.commits?Qy(f.commits):null}),s}function sb(e){if(Array.isArray(e))return e.filter(X);if(X(e)&&(typeof e.id==`number`||typeof e.id==`string`))return[e]}var cb=(e,t)=>{t.changes.keys.length||ky(e,`workItems`,`Bitbucket has no tracker of its own, and no key patterns were given, so no work item keys were read: pass a key pattern such as PAY-{n}=<jira connection>`)},lb=(e,t,n)=>[Z(e.title),t,Z(n)],ub=e=>X(e)?dy(e.name??e.slug,e.displayName,e.emailAddress):null,db={APPROVED:`APPROVED`,NEEDS_WORK:`CHANGES_REQUESTED`,UNAPPROVED:`PENDING`},fb={APPROVED:`APPROVED`,REVIEWED:`CHANGES_REQUESTED`,UNAPPROVED:`DISMISSED`},pb={SUCCESSFUL:`pass`,FAILED:`fail`,CANCELLED:`fail`,INPROGRESS:`pending`,UNKNOWN:`pending`};function mb(e,t,n){let r=X(t.toRef)?t.toRef:{},i=X(t.fromRef)?t.fromRef:{},a=X(r.repository)?r.repository:{},o=X(a.project)?Z(a.project.key):null,s=Z(a.slug),c=o&&s?`${o}/${s}`:e.inputs.project&&e.inputs.repo?`${e.inputs.project}/${e.inputs.repo}`:null;if(!c||t.id===void 0)return;let l=String(t.id),u=Oy(e,c,l,Z(t.title)??`Pull request ${l}`,t);u.url=Z((X(t.links)&&Array.isArray(t.links.self)?t.links.self.filter(X):[])[0]?.href),u.branch={source:Z(i.displayId),target:Z(r.displayId)};let d=X(t.author)?t.author.user:void 0;u.author=ub(d),u.state=t.state===`MERGED`?`MERGED`:t.state===`DECLINED`?`DECLINED`:t.draft===!0?`DRAFT`:`OPEN`,u.created=Ay(u,`created`,t.createdDate,`createdDate`),u.updated=Ay(u,`updated`,t.updatedDate,`updatedDate`);let f=Ay(u,`closedAt`,t.closedDate,`closedDate`);u.closedAt=u.state===`MERGED`||u.state===`DECLINED`?f:null,u.mergedAt=u.state===`MERGED`?f:null;let p=X(t.properties)?t.properties:{};u.mergeCommit=u.state===`MERGED`&&X(p.mergeCommit)?Z(p.mergeCommit.id):null;let m=X(p.mergeResult)?p.mergeResult.outcome:void 0;u.mergeable=m===`CLEAN`||m!==`CONFLICTED`&&null,u.mergeable===null&&u.state===`OPEN`&&ky(u,`mergeable`,`Bitbucket sent no properties.mergeResult outcome for it`),u.workItems=zy(lb(t,u.branch.source,t.description),n.changes.keys),cb(u,n),u.reviewers=(Array.isArray(t.reviewers)?t.reviewers.filter(X):[]).flatMap(e=>{let t=ub(e.user);return t?[{person:t,state:db[String(e.status)]??`PENDING`}]:[]});let h=jy(t);if(h.reviews)Xy(u,h.reviews.filter(X).flatMap(e=>{let t=ub(e.user),n=fb[String(e.action)],r=Ay(u,`reviews`,e.createdDate,`an activity's createdDate`);return t&&n&&r?[{by:t,state:n,at:r}]:[]}));else for(let t of[`reviews`,`firstReviewAt`,`approvedAt`])ky(u,t,My(e,`reviews`));return h.checks?Zy(u,h.checks.filter(X).map(e=>({name:Z(e.name)??Z(e.key)??`build`,outcome:pb[String(e.state)]??`pending`,at:Ay(u,`checksAt`,e.dateAdded,`a build status's dateAdded`)}))):ky(u,`checks`,My(e,`checks`)),h.files?(u.size={files:h.files.length,additions:null,deletions:null},ky(u,`size`,`Bitbucket Data Center lists the files a pull request changes, not the lines, so additions and deletions are empty`)):ky(u,`size`,My(e,`files`)),qy(u,n,{account:X(d)&&d.type===`SERVICE`?{kind:`BOT`,signal:`account ${String(d.name??d.slug)}, type SERVICE`}:null,messages:h.commits?Qy(h.commits):null}),u}var hb=e=>X(e)?dy(e.account_id??e.uuid??e.nickname,e.display_name??e.nickname,null):null,gb={SUCCESSFUL:`pass`,FAILED:`fail`,STOPPED:`fail`,INPROGRESS:`pending`};function _b(e,t,n){let r=X(t.destination)?t.destination:{},i=X(t.source)?t.source:{},a=(X(r.repository)?Z(r.repository.full_name):null)??(e.inputs.workspace&&e.inputs.repo?`${e.inputs.workspace}/${e.inputs.repo}`:null);if(!a||t.id===void 0)return;let o=String(t.id),s=Oy(e,a,o,Z(t.title)??`Pull request ${o}`,t);s.url=X(t.links)&&X(t.links.html)?Z(t.links.html.href):null,s.branch={source:X(i.branch)?Z(i.branch.name):null,target:X(r.branch)?Z(r.branch.name):null},s.author=hb(t.author),s.state=t.state===`MERGED`?`MERGED`:t.state===`DECLINED`||t.state===`SUPERSEDED`?`DECLINED`:t.draft===!0?`DRAFT`:`OPEN`,s.created=Ay(s,`created`,t.created_on,`created_on`),s.updated=Ay(s,`updated`,t.updated_on,`updated_on`),(s.state===`MERGED`||s.state===`DECLINED`)&&(ky(s,`mergedAt`,`Bitbucket Cloud's pull request records no merge or close time; updated is the nearest it has`),ky(s,`closedAt`,`Bitbucket Cloud's pull request records no merge or close time; updated is the nearest it has`)),s.mergeCommit=s.state===`MERGED`&&X(t.merge_commit)?Z(t.merge_commit.hash):null,(s.state===`OPEN`||s.state===`DRAFT`)&&ky(s,`mergeable`,`Bitbucket Cloud's pull request doesn't say whether it merges cleanly`);let c=Z(t.description)??(X(t.summary)?Z(t.summary.raw):null);s.workItems=zy(lb(t,s.branch.source,c),n.changes.keys),cb(s,n);let l=new Map;for(let e of Array.isArray(t.reviewers)?t.reviewers:[]){let t=hb(e);t&&l.set(t.id,{person:t,state:`PENDING`})}for(let e of Array.isArray(t.participants)?t.participants.filter(X):[]){let t=hb(e.user);t&&(e.role===`REVIEWER`||e.state)&&l.set(t.id,{person:t,state:e.state===`approved`||e.approved===!0?`APPROVED`:e.state===`changes_requested`?`CHANGES_REQUESTED`:`PENDING`})}s.reviewers=[...l.values()];let u=jy(t);if(u.reviews)Xy(s,u.reviews.filter(X).flatMap(e=>{let t=X(e.approval)?{e:e.approval,kind:`APPROVED`}:X(e.changes_requested)?{e:e.changes_requested,kind:`CHANGES_REQUESTED`}:null;if(!t)return[];let n=hb(t.e.user),r=Ay(s,`reviews`,t.e.date,`an activity entry's date`);return n&&r?[{by:n,state:t.kind,at:r}]:[]}));else for(let t of[`reviews`,`firstReviewAt`,`approvedAt`])ky(s,t,My(e,`reviews`));if(u.checks?Zy(s,u.checks.filter(X).map(e=>({name:Z(e.name)??Z(e.key)??`build`,outcome:gb[String(e.state)]??`pending`,at:Ay(s,`checksAt`,e.updated_on??e.created_on,`a status's updated_on`)}))):ky(s,`checks`,My(e,`checks`)),u.files){let e=u.files.filter(X);s.size={files:e.length,additions:e.reduce((e,t)=>e+(Qv(t.lines_added)??0),0),deletions:e.reduce((e,t)=>e+(Qv(t.lines_removed)??0),0)}}else ky(s,`size`,My(e,`files`));let d=X(t.author)?t.author:{};return qy(s,n,{account:d.type===`app_user`?{kind:`BOT`,signal:`account ${String(d.display_name??d.account_id)}, an app user`}:null,messages:u.commits?Qy(u.commits):null}),s}var vb=[`Estimate`,`Size`,`Story Points`],yb=`Status`,bb={todo:`TODO`,"to do":`TODO`,backlog:`TODO`,ready:`TODO`,new:`TODO`,"in progress":`IN_PROGRESS`,doing:`IN_PROGRESS`,"in review":`IN_PROGRESS`,done:`DONE`},xb=/^(?:story[ -]?points?|points?|pts|sp|estimate)\s*[:=/ -]\s*(\d+(?:\.\d+)?)$/i,Sb=`"points: N", "story points: N", "pts: N", "sp: N" or "estimate: N"`;function Cb(e){let t=e.split(`{n}`);if(t.length!==2)throw new Xv(`INVALID_INPUT`,`estimateLabel "${e}" must hold {n} exactly once, where the number is.`,{fix:`Write the label with {n} for the number, for example estimateLabel=points: {n} or estimateLabel=size/{n}.`});let n=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`^${n(t[0])}(\\d+(?:\\.\\d+)?)${n(t[1])}$`,`i`)}function wb(e){let t=Qv(e.number);if(t===null)return;let n=Z(e.html_url),r=n?/^https?:\/\/[^/]+(?:\/[^/]+)*?\/([^/]+)\/([^/]+)\/issues\/\d+$/.exec(n):null;if(r)return`${r[1]}/${r[2]}#${t}`;let i=Z(e.repository_url),a=i?/\/repos\/([^/]+)\/([^/]+)$/.exec(i):null;return a?`${a[1]}/${a[2]}#${t}`:void 0}var Tb=e=>{let t=typeof e==`string`?/\/repos\/([^/]+)\/([^/]+)\/issues\/(\d+)$/.exec(e):null;return t?`${t[1]}/${t[2]}#${t[3]}`:void 0},Eb=e=>X(e)?dy(e.login,e.name,e.email):null;function Db(e){let t=Array.isArray(e)?e:X(e)&&Array.isArray(e.issues)?e.issues:X(e)&&typeof e.number==`number`?[e]:void 0;if(!t)return;let n=t.filter(X),r=n.filter(e=>e.pull_request===void 0);return{issues:r,pulls:n.length-r.length}}function Ob(e,t,n){let r=wb(t);if(r===void 0)return;let i=iy(e,r,Z(t.title)??``,{[e.command]:t});i.url=Z(t.html_url),i.typeName=X(t.type)?Z(t.type.name):null,i.type=ry(i.typeName),t.type===void 0&&oy(i,`type`,`the record has no type field: this GitHub server doesn't have issue types`),typeof t.body==`string`&&(i.body={format:`markdown`,content:t.body}),i.status=Z(t.state),i.statusCategory=i.status===`closed`?`DONE`:i.status===`open`?`TODO`:`UNKNOWN`,i.resolution=i.status===`closed`?Z(t.state_reason):null,i.assignee=Array.isArray(t.assignees)&&t.assignees.length>0?Eb(t.assignees[0]):Eb(t.assignee),i.reporter=Eb(t.user),i.labels=(Array.isArray(t.labels)?t.labels:[]).flatMap(e=>typeof e==`string`?[e]:X(e)&&typeof e.name==`string`?[e.name]:[]);let a=Tb(t.parent_issue_url);a&&(i.parent=ay(e.connection,a)),Array.isArray(t.sub_issues)&&(i.children=t.sub_issues.flatMap(t=>X(t)&&wb(t)?[ay(e.connection,wb(t))]:[])),sy(i,`created`,t.created_at,`created_at`),sy(i,`updated`,t.updated_at,`updated_at`),sy(i,`resolved`,t.closed_at,`closed_at`),kb(i,n),i.links=Mb(e.connection,r,typeof t.body==`string`?t.body:``);let o=X(t.issue_dependencies_summary)?t.issue_dependencies_summary:{},s=Qv(o.total_blocked_by)??0,c=Qv(o.total_blocking)??0;return s+c>0&&oy(i,`links`,`GitHub records ${s} blocked-by and ${c} blocking issue dependencies for this issue, which no toil command reads yet: only "Blocked by #n", "Depends on #n" and "Blocks #n" in the body are mapped`),i}function kb(e,t){let n=t.fields.estimateLabel===void 0?xb:Cb(t.fields.estimateLabel),r=e.labels.flatMap(e=>{let t=n.exec(e.trim());return t?[{label:e,value:Number(t[1])}]:[]});r.length===1?e.estimate={value:r[0].value,unit:uy(t),field:`label:${r[0].label}`}:r.length>1&&oy(e,`estimate`,`${r.length} labels hold an estimate (${r.map(e=>`"${e.label}"`).join(`, `)}), so none was picked: keep one`)}var Ab=/\b(blocked by|depends on|blocks)\s*(?::\s*)?((?:[\w.-]+\/[\w.-]+)?#\d+(?:\s*(?:,|and|&)\s*(?:[\w.-]+\/[\w.-]+)?#\d+)*)/gi,jb=/(?:([\w.-]+)\/([\w.-]+))?#(\d+)/g;function Mb(e,t,n){let r=t.slice(0,t.lastIndexOf(`#`)),i=n.replace(/```[\s\S]*?(?:```|$)/g,` `).replace(/`[^`\n]*`/g,` `),a=[];for(let n of i.matchAll(Ab)){let i=n[1].toLowerCase();for(let o of n[2].matchAll(jb)){let n=`${o[1]?`${o[1]}/${o[2]}`:r}#${o[3]}`;if(n===t)continue;let s={type:`blocks`,direction:i===`blocks`?`outward`:`inward`,target:ay(e,n),name:i};a.some(e=>e.direction===s.direction&&e.target===s.target)||a.push(s)}}return a}function Nb(e,t){for(let n of e)for(let e of[...n.links]){let r=e.type===`blocks`?t.get(e.target):void 0;if(!r)continue;let i=e.direction===`inward`?`outward`:`inward`;r.links.some(e=>e.type===`blocks`&&e.target===n.id&&e.direction===i)||r.links.push({type:`blocks`,direction:i,target:n.id,name:i===`outward`?`blocks`:`blocked by`})}}function Pb(e){let t=X(e.milestone)?e.milestone:null,n=t?Qv(t.number):null,r=t?Z(t.title):null;return!t||n===null||r===null?null:{number:n,title:r,due:ey(t.due_on)??null,closed:t.state===`closed`}}function Fb(e,t){let n=t.fields.iterationDays===void 0?void 0:Number(t.fields.iterationDays),r=e=>`${e.source.connection}\u0000${e.source.key.slice(0,e.source.key.lastIndexOf(`#`))}`,i=new Map;for(let{item:t,issue:n}of e){let e=Pb(n);if(!e)continue;let a=i.get(r(t))??new Map;i.set(r(t),a),a.set(e.number,e)}let a=new Map;for(let[e,t]of i){let r=[...t.values()].filter(e=>e.due!==null).sort((e,t)=>e.due<t.due?-1:1);for(let i of t.values()){let t=null;if(i.due!==null){let e=n===void 0?r.filter(e=>e.due<i.due).at(-1):void 0;t=e?e.due:new Date(Date.parse(i.due)-(n??14)*864e5).toISOString()}a.set(`${e}\u0000${i.number}`,{id:String(i.number),name:i.title,path:null,start:t,end:i.due,state:i.closed?`past`:null})}}for(let{item:t,issue:n}of e){let e=Pb(n),i=e?a.get(`${r(t)}\u0000${e.number}`):void 0;i&&(t.iteration={...i})}}function Ib(e){if(!Array.isArray(e.data)||!e.data.every(e=>X(e)&&`fieldValues`in e))return;let t=[],n=0;for(let r of e.data){let i=X(r.content)?r.content:{},a=new Map;for(let e of Array.isArray(r.fieldValues)?r.fieldValues:[])X(e)&&X(e.field)&&typeof e.field.name==`string`&&a.set(e.field.name,e);if(r.type===`PULL_REQUEST`){n++;continue}if(r.type===`DRAFT_ISSUE`){typeof r.id==`string`&&t.push({key:`${e.inputs.owner??`project`}/draft/${r.id}`,item:r,values:a,draft:!0});continue}let o=X(i.repository)?Z(i.repository.nameWithOwner):null,s=Qv(i.number);o&&s!==null&&t.push({key:`${o}#${s}`,item:r,values:a,draft:!1})}return{entries:t,pulls:n}}function Lb(e,t){let n=X(t.item.content)?t.item.content:{},r=iy(e,t.key,Z(n.title)??``,{});if(r.url=Z(n.url),r.typeName=t.draft?`Draft issue`:null,r.status=t.draft?null:Z(n.state)?.toLowerCase()??null,r.statusCategory=r.status===`closed`?`DONE`:`TODO`,sy(r,`created`,t.item.createdAt,`createdAt`),sy(r,`updated`,n.updatedAt??null,`updatedAt`),!t.draft)for(let e of[`type`,`assignee`,`reporter`,`labels`,`parent`])oy(r,e,`the board carries only the title, state and URL: add github issue get output for this issue to the input`);return r}function Rb(e,t,n,r){e.native[n.command]=t.item;let i=t.values.get(yb),a=i?Z(i.name):null;a!==null&&e.status!==`closed`&&(e.status=a,e.statusCategory=bb[a.toLowerCase()]??ly(e,r,a,`a board status option of the project's own`));let o=r.fields.estimate,s=o??vb.find(e=>Qv(t.values.get(e)?.number)!==null),c=s===void 0?null:Qv(t.values.get(s)?.number);s!==void 0&&c!==null?(zb(e,`estimate`),e.estimate={value:c,unit:uy(r),field:s}):e.estimate===null&&oy(e,`estimate`,`${o?`the board item has no number in "${o}" (fields estimate)`:`the board item has no number in a field named ${vb.map(e=>`"${e}"`).join(`, `)} (point fields estimate at the project's own)`}, and no label holds one (${Bb(r)})`);let l=(t,n)=>oy(e,n,`the board item has no value in "${t}": the field is empty, or the project has no field of that name (fields ${n})`),u=r.fields.iteration,d=u?t.values.get(u):[...t.values.values()].find(e=>e.__typename===`ProjectV2ItemFieldIterationValue`);if(d&&Z(d.title)){zb(e,`iteration`);let t=ey(d.startDate)??null,n=Qv(d.duration),r=t&&n!==null?new Date(Date.parse(t)+n*864e5).toISOString():null;e.iteration={id:Z(d.iterationId),name:d.title,path:null,start:t,end:r,state:null}}else e.iteration===null&&(u?l(u,`iteration`):oy(e,`iteration`,`the board item has no iteration value (it isn't in an iteration, or the project has no iteration field), and the issue has no milestone`));for(let n of[`priority`,`team`,`dueDate`]){let i=r.fields[n];if(i===void 0)continue;zb(e,n);let a=t.values.get(i),o=a?Z(a.name)??Z(a.text)??Z(a.date)??(Qv(a.number)===null?null:String(a.number)):null;o===null?l(i,n):n===`dueDate`?cy(e,o,i):e[n]=o}if(r.fields.type!==void 0){let n=t.values.get(r.fields.type),i=n?Z(n.name)??Z(n.text):null;zb(e,`type`),i?(e.typeName=i,e.type=ry(i)):l(r.fields.type,`type`)}}var zb=(e,t)=>{e.unmapped=e.unmapped.filter(e=>e.field!==t)},Bb=e=>e.fields.estimateLabel===void 0?Sb:`"${e.fields.estimateLabel}" (fields estimateLabel)`;function Vb(e,t){e.estimate===null&&oy(e,`estimate`,`no label holds an estimate (${Bb(t)}), and no project board covers the issue: label it, name the team's own label with fields estimateLabel, or add github project items output to the input`),e.iteration===null&&oy(e,`iteration`,`the issue has no milestone, and no project board covers it: set a milestone, or add github project items output to the input`);for(let n of[`priority`,`team`,`dueDate`,`type`])t.fields[n]!==void 0&&oy(e,n,`"${t.fields[n]}" is a project field: add github project items output to the input`)}function Hb(e){if(!Array.isArray(e.data))return;let t={transitions:[],iterations:[]};for(let n of e.data){if(!X(n))continue;let e=ey(n.created_at);if(!e)continue;let r=Eb(n.actor);if(n.event===`closed`)t.transitions.push({from:`open`,to:`closed`,fromCategory:`TODO`,toCategory:`DONE`,at:e,by:r});else if(n.event===`reopened`)t.transitions.push({from:`closed`,to:`open`,fromCategory:`DONE`,toCategory:`TODO`,at:e,by:r});else if(n.event===`milestoned`||n.event===`demilestoned`){let i=X(n.milestone)?Z(n.milestone.title):null;if(i===null)continue;let a=n.event===`milestoned`?`to`:`from`,o=t.iterations.at(-1);o&&o.at===e&&o[a].length===0?o[a]=[i]:t.iterations.push({from:a===`from`?[i]:[],to:a===`to`?[i]:[],at:e,by:r})}}return t}function Ub(e){if(Array.isArray(e))return e.filter(X);if(X(e)&&typeof e.number==`number`)return[e]}var Wb={APPROVED:`APPROVED`,CHANGES_REQUESTED:`CHANGES_REQUESTED`,COMMENTED:`COMMENTED`,DISMISSED:`DISMISSED`},Gb=new Set([`failure`,`timed_out`,`cancelled`,`action_required`,`startup_failure`,`stale`]);function Kb(e){if(!X(e))return null;let t=Z(e.login)??``;return Gy.includes(t.toLowerCase())?{kind:`AGENT`,signal:`account ${t}, a coding agent's`}:e.type===`Bot`||t.endsWith(`[bot]`)?{kind:`BOT`,signal:`account ${t}, type Bot`}:null}function qb(e,t){let n=X(e.base)&&X(e.base.repo)?Z(e.base.repo.full_name):null;if(n)return n;let{owner:r,repo:i}=t.inputs;return r&&i?`${r}/${i}`:null}function Jb(e,t,n){let r=qb(t,e);if(!r||typeof t.number!=`number`)return;let i=String(t.number),a=Oy(e,r,i,Z(t.title)??`Pull request ${i}`,t);a.url=Z(t.html_url),a.branch={source:X(t.head)?Z(t.head.ref):null,target:X(t.base)?Z(t.base.ref):null},a.author=Eb(t.user),a.state=Z(t.merged_at)?`MERGED`:t.state===`closed`?`DECLINED`:t.draft===!0?`DRAFT`:`OPEN`,a.created=Ay(a,`created`,t.created_at,`created_at`),a.updated=Ay(a,`updated`,t.updated_at,`updated_at`),a.mergedAt=Ay(a,`mergedAt`,t.merged_at,`merged_at`),a.closedAt=Ay(a,`closedAt`,t.closed_at,`closed_at`),a.mergeCommit=a.state===`MERGED`?Z(t.merge_commit_sha):null;let o=t=>[...[...t.matchAll(Vy)].map(t=>ay(e.connection,`${r}#${t[1]}`)),...[...t.matchAll(/(?<![\w.-])([\w.-]+\/[\w.-]+)#(\d+)\b/g)].map(t=>ay(e.connection,`${t[1]}#${t[2]}`))],s=By(a.branch.source);a.workItems=zy([a.title,s?`#${s}`:null,a.branch.source,Z(t.body)],n.changes.keys,o).filter(e=>e!==a.id);let c=jy(t),l=Array.isArray(t.requested_reviewers)?t.requested_reviewers.flatMap(e=>Eb(e)?[Eb(e)]:[]):[],u=Array.isArray(t.requested_teams)?t.requested_teams.flatMap(e=>X(e)&&Z(e.slug)?[{id:`team:${Z(e.slug)}`,name:Z(e.name),email:null}]:[]):[],d=new Map;if(c.reviews){let e=[];for(let t of c.reviews){if(!X(t))continue;let n=Eb(t.user),r=Wb[String(t.state)],i=Ay(a,`reviews`,t.submitted_at,`a review's submitted_at`);n&&r&&i&&e.push({by:n,state:r,at:i})}Xy(a,e);for(let e of a.reviews)e.state===`APPROVED`||e.state===`CHANGES_REQUESTED`?d.set(e.by.id,{person:e.by,state:e.state}):(e.state===`DISMISSED`||!d.has(e.by.id)&&e.by.id!==a.author?.id)&&d.set(e.by.id,{person:e.by,state:`PENDING`})}else ky(a,`reviews`,My(e,`reviews`)),ky(a,`firstReviewAt`,My(e,`reviews`)),ky(a,`approvedAt`,My(e,`reviews`));for(let e of[...l,...u])d.set(e.id,{person:e,state:`PENDING`});a.reviewers=[...d.values()].filter(e=>e.person.id!==a.author?.id),c.checks?Zy(a,c.checks.filter(X).map(e=>({name:Z(e.name)??`check`,outcome:e.status===`completed`?Gb.has(String(e.conclusion))?`fail`:`pass`:`pending`,at:Ay(a,`checksAt`,e.completed_at??e.started_at,`a check run's completed_at`)}))):ky(a,`checks`,My(e,`checks`)),typeof t.mergeable==`boolean`?a.mergeable=t.mergeable:(a.state===`OPEN`||a.state===`DRAFT`)&&ky(a,`mergeable`,e.command.endsWith(` pr list`)?`${e.command} doesn't say whether a pull request merges cleanly: map ${e.area} pr get`:`GitHub had not worked out mergeability yet (mergeable was null); read it again in a moment`);let f=c.files?.filter(X),p=Qv(t.additions)??(f?f.reduce((e,t)=>e+(Qv(t.additions)??0),0):null),m=Qv(t.deletions)??(f?f.reduce((e,t)=>e+(Qv(t.deletions)??0),0):null),h=Qv(t.changed_files)??(f?f.length:null);return p!==null||m!==null||h!==null?a.size={files:h,additions:p,deletions:m}:ky(a,`size`,`${e.command} doesn't say how big a pull request is: map ${e.area} pr get`),qy(a,n,{account:Kb(t.user),messages:c.commits?Qy(c.commits):null}),a}var Yb=[`Story Points`,`Story point estimate`],Xb=`timeoriginalestimate`,Zb=`Epic Link`,Qb={new:`TODO`,indeterminate:`IN_PROGRESS`,done:`DONE`};function $b(e){if(X(e)&&Array.isArray(e.issues))return e.issues.filter(X);if(X(e)&&typeof e.key==`string`&&X(e.fields))return[e]}function ex(e,t){let n=e.fields??{};if(t in n)return t;if(X(e.names)){for(let[r,i]of Object.entries(e.names))if(i===t&&r in n)return r}}var tx=e=>X(e)?dy(e.accountId??e.name??e.key,e.displayName,e.emailAddress):null;function nx(e){let t;if(X(e))t=e;else if(typeof e==`string`){let n=/\[(.*)\]\s*$/s.exec(e)?.[1];if(n===void 0)return;t={};for(let e of n.split(/,(?=[A-Za-z]+=)/)){let n=e.indexOf(`=`);n>0&&(t[e.slice(0,n)]=e.slice(n+1)===`<null>`?null:e.slice(n+1))}}let n=Z(t?.name);if(!t||n===null)return;let r=String(t.state??``).toLowerCase();return{id:t.id===void 0||t.id===null?null:String(t.id),name:n,path:null,start:ey(t.startDate)??null,end:ey(t.endDate)??null,state:r===`active`?`current`:r===`closed`?`past`:r===`future`?`future`:null}}var rx={blocks:`blocks`,duplicate:`duplicates`,relates:`relates`};function ix(e,t,n,r){let i=Z(t.key);if(i===null)return;let a=t.fields??{},o=iy(e,i,Z(a.summary)??``,{[e.command]:t});Z(a.summary)===null&&oy(o,`title`,`the record has no summary`);let s=Z(t.self);s?.includes(`/rest/`)?o.url=`${s.slice(0,s.indexOf(`/rest/`))}/browse/${encodeURIComponent(i)}`:oy(o,`url`,`the record has no self link to take the site from`);let c=n.fields.type,l=c===void 0?X(a.issuetype)?Z(a.issuetype.name):null:$v(a[c]);if(c!==void 0&&!(c in a)&&oy(o,`type`,`the record has no field "${c}" (fields type)`),o.typeName=l,o.type=c===void 0&&X(a.issuetype)&&a.issuetype.subtask===!0?`TASK`:ry(l),typeof a.description==`string`?o.body={format:`wiki`,content:a.description}:X(a.description)&&(o.body={format:`adf`,content:a.description}),X(a.status)){o.status=Z(a.status.name);let e=X(a.status.statusCategory)?Z(a.status.statusCategory.key):null,t=e===null?void 0:Qb[e];t&&o.status&&r.set(o.status,t),o.statusCategory=t??ly(o,n,o.status??`(none)`,e===null?`the status came without its statusCategory`:`its statusCategory is "${e}"`)}else oy(o,`status`,`the record has no status field`);o.resolution=X(a.resolution)?Z(a.resolution.name):null,o.assignee=tx(a.assignee),o.reporter=tx(a.reporter);let u=n.fields.priority??`priority`;o.priority=$v(a[u]),n.fields.priority!==void 0&&!(u in a)&&oy(o,`priority`,`the record has no field "${u}" (fields priority)`),o.labels=Array.isArray(a.labels)?a.labels.filter(e=>typeof e==`string`):[],n.fields.team!==void 0&&(n.fields.team in a?o.team=$v(a[n.fields.team]):oy(o,`team`,`the record has no field "${n.fields.team}" (fields team)`)),ax(o,t,n),ox(o,t,n);let d=X(a.parent)?Z(a.parent.key):Z(a[ex(t,Zb)??Zb])??null;o.parent=d===null?null:ay(e.connection,d),o.children=(Array.isArray(a.subtasks)?a.subtasks:[]).flatMap(t=>X(t)&&typeof t.key==`string`?[ay(e.connection,t.key)]:[]);for(let t of Array.isArray(a.issuelinks)?a.issuelinks:[]){if(!X(t)||!X(t.type))continue;let n=X(t.outwardIssue)?Z(t.outwardIssue.key):null,r=X(t.inwardIssue)?Z(t.inwardIssue.key):null,i=n??r;i!==null&&o.links.push({type:rx[String(t.type.name??``).toLowerCase()]??`other`,direction:n===null?`inward`:`outward`,target:ay(e.connection,i),name:Z(n===null?t.type.inward:t.type.outward)??Z(t.type.name)??``})}sy(o,`created`,a.created,`created`),sy(o,`updated`,a.updated,`updated`),sy(o,`resolved`,a.resolutiondate,`resolutiondate`);let f=n.fields.dueDate??`duedate`;return n.fields.dueDate!==void 0&&!(f in a)?oy(o,`dueDate`,`the record has no field "${f}" (fields dueDate)`):cy(o,a[f],f),`created`in a||oy(o,`created`,`the record has no created field`),o}function ax(e,t,n){let r=t.fields??{},i=n.fields.estimate;if(i!==void 0){let a=ex(t,i);if(a===void 0)return oy(e,`estimate`,`the record has no field "${i}" (fields estimate)`);let o=Qv(r[a]);if(o===null){r[a]!==null&&r[a]!==void 0&&oy(e,`estimate`,`"${i}" holds ${JSON.stringify(r[a])}, not a number`);return}if(a===`timeoriginalestimate`){if(n.fields.estimateUnit!==void 0&&n.fields.estimateUnit!==`hours`)return oy(e,`estimate`,`${Xb} is in seconds, which OWI reads as hours, not ${n.fields.estimateUnit}`);e.estimate={value:o/3600,unit:`hours`,field:a}}else e.estimate={value:o,unit:uy(n),field:a};return}let a=!1;for(let n of Yb){let i=ex(t,n);if(i===void 0)continue;a=!0;let o=Qv(r[i]);if(o!==null)return void(e.estimate={value:o,unit:`points`,field:i})}if(`timeoriginalestimate`in r){a=!0;let t=Qv(r[Xb]);if(t!==null)return void(e.estimate={value:t/3600,unit:`hours`,field:Xb})}a||oy(e,`estimate`,`the record has none of ${[...Yb,Xb].map(e=>`"${e}"`).join(`, `)}: register the estimate field in the connection's customFields, ask for it with --fields, or point fields estimate at it`)}function ox(e,t,n){let r=n.fields.iteration??`Sprint`,i=ex(t,r);if(i===void 0){oy(e,`iteration`,`the record has no "${r}" field: register the sprint field in the connection's customFields, or point fields iteration at it`);return}let a=t.fields?.[i],o=(a==null?[]:Array.isArray(a)?a:[a]).map(nx);o.some(e=>e===void 0)&&oy(e,`iteration`,`"${i}" holds a value that isn't a sprint`),e.iteration=fy(o.filter(e=>e!==void 0))}function sx(e,t,n){if(!Array.isArray(e.data))return;let r=t.fields.iteration??`Sprint`,i={transitions:[],iterations:[]};for(let t of e.data){if(!X(t)||!Array.isArray(t.items))continue;let e=ey(t.created);if(!e)continue;let a=tx(t.author);for(let o of t.items){if(!X(o))continue;let t=String(o.field??``),s=Object.hasOwn(o,`toString`)?Z(o.toString):null;if(t.toLowerCase()===`status`&&s!==null){let t=Z(o.fromString),r=s;i.transitions.push({from:t,to:r,fromCategory:t===null?null:n(t)??`UNKNOWN`,toCategory:n(r)??`UNKNOWN`,at:e,by:a})}else if(t===r||o.fieldId===r){let t=e=>(Z(e)??``).split(`,`).map(e=>e.trim()).filter(Boolean);i.iterations.push({from:t(o.fromString),to:t(s),at:e,by:a})}}}return i}var cx=5e3,lx=Object.fromEntries(Object.entries(Kv).map(([e,t])=>[e,{items:t.items.map(t=>`${e} ${t}`),history:t.history.map(t=>`${e} ${t}`),context:t.context.map(t=>`${e} ${t}`),changes:t.changes.map(t=>`${e} ${t}`)}])),ux={jira:()=>`Jira's changelog names statuses only, and a status no item in the input is in has no category to learn`,ado:e=>`a state in the revisions is a custom one, outside the default states OWI knows; ${e} work-item states shows its category`,github:()=>`GitHub issues are only open or closed, so this should not happen; the history is kept as it was read`,bitbucket:()=>`Bitbucket has no work items, so this should not happen`,"bitbucket-cloud":()=>`Bitbucket has no work items, so this should not happen`},dx=Object.fromEntries(Object.entries(Kv).filter(([,e])=>e.family===`ado`).map(([e])=>[`${e} work-item search`,`it returns work item ids only: fetch their fields with ${e} work-item get-many and map that`])),fx=e=>X(e)&&`ok`in e&&X(e.meta)&&typeof e.meta.command==`string`;function px(e){let t=e.trim();if(t===``)throw new Xv(`INVALID_INPUT`,`The input is empty.`,{fix:`Pipe a toil command's output in (toil jira issue search … | toil util owi map), or pass the file that holds it.`});try{return mx(JSON.parse(t))}catch{}return t.split(/\r?\n/).flatMap((e,t)=>{if(e.trim()===``)return[];try{return[JSON.parse(e)]}catch(e){throw new Xv(`INVALID_INPUT`,`Line ${t+1} of the input isn't JSON (${e.message}), and the input as a whole isn't one JSON value either.`,{fix:`Pass one envelope, a JSON array of envelopes, or one envelope a line.`})}})}function mx(e){return Array.isArray(e)&&e.length>0&&e.every(e=>fx(e)||hx(e))?e:[e]}var hx=e=>X(e)&&typeof e.key==`string`&&`history`in e&&Object.keys(e).length===2;function gx(e,t={}){let n=[],r=[];return e.forEach((e,i)=>{let a=`document ${i+1}`,o=hx(e)?e:void 0,s=o?o.history:e,c=o?.key??t.key,l,u,d,f={};if(fx(s)){if(l=s.meta.command,s.ok!==!0){let e=X(s.error)?Z(s.error.code):null;r.push({at:a,command:l,reason:`the call failed${e?` (${e})`:``}, so there is nothing to map`});return}u=s.data;let e=X(s.meta.context)?s.meta.context:{};if(d=X(e.connection)?Z(e.connection.value)??void 0:void 0,X(e.inputs))for(let[t,n]of Object.entries(e.inputs))X(n)&&typeof n.value==`string`&&(f[t]=n.value)}else if(t.command!==void 0)l=t.command,u=s;else throw new Xv(`INVALID_INPUT`,`${a} of the input isn't a toil envelope, so it doesn't say which command it came from.`,{fix:`Pass the whole envelope a command printed, or name the command with --command (for example --command "jira issue search") when passing its data alone.`});let p=[...qv].sort((e,t)=>t.length-e.length).find(e=>l.startsWith(`${e} `)),m=p?lx[p]:void 0;if(!p||!m||![...m.items,...m.history,...m.context,...m.changes].includes(l)){if(dx[l]){r.push({at:a,command:l,reason:dx[l]});return}let e=Object.values(lx).flatMap(e=>[...e.items,...e.history,...e.context,...e.changes]);throw new Xv(`INVALID_INPUT`,`${a} is the output of "${l}", which OWI doesn't map.`,{fix:`Map the output of one of: ${e.join(`, `)}.`})}n.push({area:p,command:l,connection:d??p,data:u,inputs:f,at:a,...c===void 0?{}:{key:c}})}),{documents:n,skipped:r}}function _x(e){let t=Array.isArray(e)?e.map(e=>{let t=e.indexOf(`=`);if(t<=0||t===e.length-1)throw new Xv(`INVALID_INPUT`,`"${e}" isn't a field override.`,{fix:`Write it as name=field, for example estimate=customfield_10234 or estimateUnit=hours.`});return[e.slice(0,t),e.slice(t+1)]}):Object.entries(e??{}),n={};for(let[e,r]of t){if(!Jv.includes(e))throw new Xv(`INVALID_INPUT`,`"${e}" isn't an OWI field that can be pointed at a field of your own.`,{fix:`Use one of: ${Jv.join(`, `)}.`});if(e===`estimateUnit`&&![`points`,`hours`,`days`].includes(r))throw new Xv(`INVALID_INPUT`,`estimateUnit must be points, hours or days, not "${r}".`,{fix:`Pass estimateUnit=points, estimateUnit=hours or estimateUnit=days.`});if(e===`estimateLabel`&&Cb(r),e===`iterationDays`&&!(/^\d+$/.test(r)&&Number(r)>=1&&Number(r)<=366))throw new Xv(`INVALID_INPUT`,`iterationDays must be a whole number of days from 1 to 366, not "${r}".`,{fix:`Pass the sprint length in days, for example iterationDays=14.`});n[e]=r}return n}function vx(e,t={}){let n=Zv(),r={fields:t.fields??{},warn:n.warn},i=[...t.skipped??[]],a=new Map,o=0,s=0,c=(e,t)=>{if(!e)return void i.push({at:t.at,command:t.command,reason:`a record has no key to name the item by`});let n=a.get(e.id);n&&(o++,e.native={...n.native,...e.native}),a.set(e.id,e)},l=e=>t=>lx[t.area]?.[e].includes(t.command)===!0,u=e.filter(l(`items`)),d=e.filter(l(`history`)),f=e.filter(l(`context`)),p=new Map;for(let e of f){let t=p.get(e.connection)??new Map;p.set(e.connection,t),Cy(e.data,t)||i.push({at:e.at,command:e.command,reason:`it doesn't hold an iteration tree`})}let m=new Map,h=[],g=[];for(let e of u){let t=Kv[e.area].family;if(t===`jira`){let t=$b(e.data);t||i.push({at:e.at,command:e.command,reason:`it doesn't hold Jira issues`});let n=m.get(e.connection)??new Map;m.set(e.connection,n);for(let i of t??[])c(ix(e,i,r,n),e)}else if(t===`ado`){let t=yy(e.data);t||i.push({at:e.at,command:e.command,reason:`it doesn't hold work items`});for(let n of t??[])c(wy(e,n,r,p.get(e.connection)??new Map),e)}else if(e.command===`${e.area} project items`){let t=Ib(e);t?(h.push({doc:e,entries:t.entries}),s+=t.pulls):i.push({at:e.at,command:e.command,reason:`it doesn't hold project items`})}else{let t=Db(e.data);t||i.push({at:e.at,command:e.command,reason:`it doesn't hold GitHub issues`}),s+=t?.pulls??0;for(let n of t?.issues??[]){let t=Ob(e,n,r);c(t,e),t&&g.push({item:t,issue:n})}}}Fb(g,r);let _=new Set;for(let{doc:e,entries:t}of h)for(let n of t){let t=ay(e.connection,n.key);_.add(t);let i=a.get(t);i||(i=Lb(e,n),a.set(t,i)),Rb(i,n,e,r)}for(let e of a.values())Kv[e.source.area]?.family===`github`&&!_.has(e.id)&&Vb(e,r);Nb(g.map(e=>e.item).filter(e=>a.get(e.id)===e),a);let v=[],y=(e,t,n)=>{let r=ay(e.connection,t),i=a.get(r);if(!i)return void v.push({id:r,history:n});i.history=i.history?{transitions:[...i.history.transitions,...n.transitions],iterations:[...i.history.iterations,...n.iterations]}:n,i.native[e.command]=e.data};for(let e of d){let t=Kv[e.area].family;if(t===`ado`){let t=Dy(e,r);t||i.push({at:e.at,command:e.command,reason:`it doesn't hold revisions`});for(let[n,r]of t??[])y(e,n,r);continue}let n=bx(e);if(n===void 0){i.push({at:e.at,command:e.command,reason:`its output doesn't say which ${t===`github`?`issue`:`issue key`} it belongs to: wrap it as { "key": "…", "history": <envelope> }, or pass --key`});continue}let a=m.get(e.connection)??new Map,o=t===`github`?Hb(e):sx(e,r,e=>a.get(e));o?y(e,n,o):i.push({at:e.at,command:e.command,reason:`it doesn't hold a history`})}for(let e of a.values())e.history?.transitions.some(e=>e.toCategory===`UNKNOWN`||e.fromCategory===`UNKNOWN`)&&oy(e,`history.transitions`,`some statuses in the history have no category: ${ux[Kv[e.source.area]?.family??`jira`](e.source.area)}`);let b=yx(e.filter(l(`changes`)),{...r,changes:{keys:t.keys??[],authors:t.authors??{}}},i);o>0&&n.warn(`OWI_DUPLICATE_ITEM`,`${o} records named an item already in the input; the later record was kept, and native holds both.`),s>0&&n.warn(`OWI_PULL_REQUESTS_SKIPPED`,`${s} pull requests in issue lists or boards were left out: an issue list holds too little of a pull request to map it as a change; map github pr list or github pr get for those.`);let x=[...a.values()];x.length>5e3&&(n.warn(`OWI_ITEMS_CAPPED`,`The input holds ${x.length} items; the first ${cx} were mapped and ${x.length-cx} left out. Map the rest in another call.`),x=x.slice(0,cx));for(let e of i)n.warn(`OWI_SKIPPED`,`${e.at}${e.command?` (${e.command})`:``} wasn't mapped: ${e.reason}.`);let S=b;return S.length>5e3&&(n.warn(`OWI_ITEMS_CAPPED`,`The input holds ${S.length} changes; the first ${cx} were mapped and ${S.length-cx} left out. Map the rest in another call.`),S=S.slice(0,cx)),{items:x,changes:S,histories:v,skipped:i,warnings:n.list}}function yx(e,t,n){let r=new Map;for(let i of e){let e=Kv[i.area].family,a=e===`github`?Ub(i.data):e===`ado`?eb(i.data):sb(i.data);if(!a)n.push({at:i.at,command:i.command,reason:`it doesn't hold pull requests`});else for(let o of a){let a=e===`github`?Jb(i,o,t):e===`ado`?ob(i,o,t):e===`bitbucket-cloud`?_b(i,o,t):mb(i,o,t);if(!a){n.push({at:i.at,command:i.command,reason:`a pull request has no number or repository to name it by`});continue}let s=r.get(a.id);r.set(a.id,s?$y(s,a):a)}}for(let e of r.values())e.workItems=e.workItems.filter(e=>!r.has(e));return[...r.values()]}function bx(e){let t=e.key?.trim();if(!t)return;if(Kv[e.area]?.family!==`github`||t.includes(`/`))return t;let n=t.replace(/^#/,``),{owner:r,repo:i}=e.inputs;return r&&i&&/^\d+$/.test(n)?`${r}/${i}#${n}`:void 0}var xx=[`title`,`body`,`labels`,`parent`,`links`],Sx=.35,Cx=new Set(`a about above after again all also am an and any are as at be been before being below between both but by can could did do does doing down during each few for from further had has have having he her here hers him his how i if in into is it its itself just me more most my no nor not now of off on once only or other our ours out over own same she should so some such than that the their theirs them then there these they this those through to too under until up very was we were what when where which while who whom why will with would you your yours see per via etc get got`.split(` `)),wx=/[\p{L}\p{N}]+/gu,Tx=/\p{M}+/gu;function Ex(e){return e.length<=3||/^\d/.test(e)?e:e.endsWith(`ies`)&&e.length>4?`${e.slice(0,-3)}y`:e.endsWith(`sses`)?e.slice(0,-2):e.endsWith(`ing`)&&e.length>5?e.slice(0,-3):e.endsWith(`ed`)&&e.length>4?e.slice(0,-2):e.endsWith(`s`)&&!/(ss|us|is)$/.test(e)?e.slice(0,-1):e}function Dx(e){return e.normalize(`NFKD`).replace(Tx,``).toLowerCase().match(wx)??[]}var Ox=e=>e.length>=2&&!Cx.has(e)&&!/^\d{1,2}$/.test(e);function kx(e){let t=[];for(let n of Dx(e))Ox(n)&&t.push({term:Ex(n),word:n});return t}function Ax(e){let t=new Set;for(let n of Dx(e)){if(!Ox(n))continue;let e=` ${n} `;for(let n=0;n+3<=e.length;n++)t.add(e.slice(n,n+3))}return t}var jx={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`,nbsp:` `,"#39":`'`};function Mx(e){if(!e)return``;if(e.format===`adf`||typeof e.content!=`string`)return Nx(e.content);let t=e.content;return t=e.format===`html`?t.replace(/<[^<>]*>/g,` `).replace(/&(amp|lt|gt|quot|apos|nbsp|#39);/g,(e,t)=>jx[t]??` `):e.format===`wiki`?t.replace(/\[([^|[\]]*)\|[^[\]]*\]/g,`$1`).replace(/\{[A-Za-z]+(?::[^{}]*)?\}/g,` `).replace(/^h[1-6]\.\s/gm,` `):t.replace(/!?\[([^[\]]*)\]\([^()]*\)/g,`$1`).replace(/<[^<>]*>/g,` `),t.replace(/(?<![A-Za-z0-9+.-])[A-Za-z][A-Za-z0-9+.-]*:\/\/\S*/g,` `)}function Nx(e){let t=[],n=[e];for(;n.length;){let e=n.pop();if(Array.isArray(e)){for(let t=e.length-1;t>=0;t--)n.push(e[t]);continue}if(typeof e!=`object`||!e)continue;let r=e;typeof r.text==`string`?t.push(r.text):typeof r.attrs?.text==`string`&&t.push(r.attrs.text),Array.isArray(r.content)&&n.push(r.content)}return t.join(` `)}var Px=1.2,Fx=.75,Ix=2,Lx=.7,Rx=.7,zx=.3,Bx=.04,Vx=.08,Hx=.05,Ux=.1,Wx=6e7,Gx=8,Kx=.15,qx=e=>Math.round(e*1e4)/1e4,Jx=(e,t)=>e<t?-1:+(e>t),Yx=class{fields;docs=[];byId=new Map;df=new Map;labelDf=new Map;on;avgTitle;avgBody;duplicateIds=[];constructor(e,t={}){this.fields=t.fields&&t.fields.length?xx.filter(e=>t.fields.includes(e)):xx,this.on=Object.fromEntries(xx.map(e=>[e,this.fields.includes(e)]));let n=new Set,r=[];for(let t of e)n.has(t.id)?this.duplicateIds.includes(t.id)||this.duplicateIds.push(t.id):(n.add(t.id),r.push(t));r.sort((e,t)=>Jx(e.id,t.id));let i=0,a=0;for(let e of r){let t=this.read(e);this.byId.set(e.id,this.docs.length),this.docs.push(t),i+=t.titleLength,a+=t.bodyLength;for(let e of new Set([...t.title.keys(),...t.body.keys()]))this.df.set(e,(this.df.get(e)??0)+1);for(let e of t.labels)this.labelDf.set(e,(this.labelDf.get(e)??0)+1)}let o=this.docs.filter(e=>e.hasBody).length;this.avgTitle=i/(this.docs.length||1)||1,this.avgBody=o?a/o:1;for(let e of this.docs)this.weigh(e)}get size(){return this.docs.length}titleOnlyIds(){return this.on.body?this.docs.filter(e=>!e.hasBody).map(e=>e.ref.id):[]}cutBodyIds(){return this.docs.filter(e=>e.bodyCut).map(e=>e.ref.id)}has(e){return this.byId.has(e)}ref(e){let t=this.byId.get(e);return t===void 0?void 0:this.docs[t].ref}ids(){return this.docs.map(e=>e.ref.id)}query(e,t={}){let n={terms:new Map,trigrams:this.on.title?Ax(e):new Set};for(let{term:t,word:r}of kx(e))n.terms.has(t)||n.terms.set(t,r);return this.rank(this.docs,(e,t)=>this.scoreQuery(n,e,t),t)}item(e,t={}){let n=this.byId.get(e);if(n===void 0)return;let r=this.docs[n];return this.rank(this.docs.filter(e=>e!==r),(e,t)=>this.scorePair(r,e,t),t)}compare(e,t){let n=this.byId.get(e),r=this.byId.get(t);if(n===void 0||r===void 0||n===r)return;let i=this.scorePair(this.docs[n],this.docs[r],!0);return{score:i.score,why:i.why}}pairs(e={},t={}){let n=rS(e.threshold),r=iS(e.limit),i=this.docs.length,a=new Map,o=(e,t,n,r)=>{let i=a.get(e);i||a.set(e,i={docs:[],...n?{full:[],title:[]}:{},...r===void 0?{}:{label:r}}),i.docs.push(t),n&&(i.full.push(n.full),i.title.push(n.title))};this.docs.forEach((e,t)=>{for(let[n,r]of e.full)o(`t\u0000${n}`,t,{full:r,title:e.titleOnly.get(n)??0});for(let n of e.trigrams)o(`g\u0000${n}`,t);for(let n of e.labels)o(`l\u0000${n}`,t,void 0,this.labelWeight(n));e.parent!==null&&o(`p\u0000${e.parent}`,t)});let s=[...a.entries()].filter(([,e])=>e.docs.length>1).sort((e,t)=>e[1].docs.length-t[1].docs.length||Jx(e[0],t[0])),c=0,l=0;for(let[,e]of s){let t=e.docs.length*e.docs.length;if(c+t>Wx)break;c+=t,l++}let u=s.length-l,d=l?s[l-1][1].docs.length:0,f=this.docs.map(()=>[]);for(let[e,t]of s.slice(0,l))t.docs.forEach((n,r)=>f[n].push({p:t,at:r,kind:e[0]}));let p=this.docs.map(()=>[]);this.on.links&&this.docs.forEach((e,t)=>{for(let n of e.links){let e=this.byId.get(n.target);e!==void 0&&e!==t&&p[Math.min(t,e)].push(Math.max(t,e))}});let m=new Float64Array(i),h=new Float64Array(i),g=new Int32Array(i),_=new Float64Array(i),v=new Uint8Array(i),y=new Int32Array(i).fill(-1),b=u>0,x=[],S=0,C=0,w=(e,t,n,i)=>{if(x.length===r&&!Qx(e,t,n,x[x.length-1]))return;let a=x.length;for(;a>0&&Qx(e,t,n,x[a-1]);)a--;x.splice(a,0,{score:e,i:t,j:n,full:i}),x.length>r&&x.pop()};for(let e=0;e<i;e++){let t=[],r=n=>{y[n]!==e&&(y[n]=e,m[n]=0,h[n]=0,g[n]=0,_[n]=0,v[n]=0,t.push(n))};for(let{p:t,at:n,kind:i}of f[e]){let{docs:e}=t;if(i===`t`){let i=t.full,a=t.title,o=i[n],s=a[n];for(let t=n+1;t<e.length;t++){let n=e[t];r(n),m[n]=m[n]+o*i[t],h[n]=h[n]+s*a[t]}}else for(let a=n+1;a<e.length;a++){let n=e[a];r(n),i===`g`?g[n]=g[n]+1:i===`l`?_[n]=_[n]+t.label:v[n]=v[n]|1}}for(let t of p[e])r(t),v[t]=v[t]|2;let i=this.docs[e];for(let r of t){C++;let t=this.docs[r],a=!(this.on.body&&i.hasBody&&t.hasBody),o=a?i.titleNorm*t.titleNorm:i.fullNorm*t.fullNorm,s=o>0?(a?h[r]:m[r])/o:0,c=i.trigrams.size+t.trigrams.size,l=c?2*g[r]/c:0,u=eS(this.weighParts(s,l,Math.min(Vx,_[r]),v[r]&1?Hx:0,v[r]&2?Ux:0)),d=!1;b&&u<n&&u>=n-Kx&&(u=this.scorePair(i,t).score,d=!0),!(u<n)&&(S++,w(u,e,r,d))}}let T=x.map(({i:e,j:n,score:r,full:i})=>{let a=this.scorePair(this.docs[e],this.docs[n],!0);return t.rescored?.({a:this.docs[e].ref.id,b:this.docs[n].ref.id,summed:r,full:a.score,exact:i||!b}),{score:a.score,a:this.docs[e].ref,b:this.docs[n].ref,why:a.why}}).filter(e=>e.score>=n).sort((e,t)=>t.score-e.score||Jx(e.a.id,t.a.id)||Jx(e.b.id,t.b.id));return{count:S,pairs:T,search:{compared:C,skippedFeatures:u,maxItemsPerFeature:u?d:null}}}labelWeight(e){return Bx*(1-(this.labelDf.get(e)??0)/(this.docs.length||1))}read(e){let t=new Map,n=new Map,r=new Map,i=(e,t)=>{let n=r.get(e);(n===void 0||t.length<n.length||t.length===n.length&&t<n)&&r.set(e,t)},a=0;if(this.on.title)for(let{term:n,word:r}of kx(e.title))t.set(n,(t.get(n)??0)+1),i(n,r),a++;let o=0,s=!1;if(this.on.body)for(let{term:t,word:r}of kx(Mx(e.body))){if(o===5e3){s=!0;break}n.set(t,(n.get(t)??0)+1),i(t,r),o++}return{ref:{id:e.id,title:e.title,source:e.source??null,url:e.url??null},title:t,body:n,surface:r,titleLength:a,bodyLength:o,hasBody:o>0,bodyCut:s,trigrams:this.on.title?Ax(e.title):new Set,labels:this.on.labels?[...new Set(e.labels??[])].sort(Jx):[],parent:this.on.parent?e.parent??null:null,links:this.on.links?e.links??[]:[],full:new Map,fullNorm:0,titleOnly:new Map,titleNorm:0}}idf(e){let t=this.docs.length,n=this.df.get(e)??0;return Math.log(1+(t-n+.5)/(n+.5))}weigh(e){let t=t=>Xx(t,e.titleLength,this.avgTitle),n=t=>Xx(t,e.bodyLength,this.avgBody),r=0,i=0;for(let[n,r]of e.title){let a=this.idf(n)*t(r);e.titleOnly.set(n,a),i+=a*a}for(let i of new Set([...e.title.keys(),...e.body.keys()])){let a=e.title.get(i),o=e.body.get(i),s=this.idf(i)*(Ix*(a?t(a):0)+(o?n(o):0));e.full.set(i,s),r+=s*s}e.fullNorm=Math.sqrt(r),e.titleNorm=Math.sqrt(i)}scorePair(e,t,n=!1){let[r,i]=Jx(e.ref.id,t.ref.id)<=0?[e,t]:[t,e],a=!(this.on.body&&r.hasBody&&i.hasBody),o=a?r.titleOnly:r.full,s=a?i.titleOnly:i.full,c=a?r.titleNorm*i.titleNorm:r.fullNorm*i.fullNorm,l=[],u=0;for(let[e,t]of o){let a=s.get(e);if(a===void 0)continue;let o=t*a;u+=o,n&&l.push({term:e,weight:o,title:r.title.has(e)&&i.title.has(e)})}let d=c>0?u/c:0,f=this.on.title?Zx(r.trigrams,i.trigrams):0,p=r.labels.filter(e=>i.labels.includes(e)),m=Math.min(Vx,p.reduce((e,t)=>e+this.labelWeight(t),0)),h=r.parent!==null&&r.parent===i.parent?r.parent:null,g=$x(e,t),_=this.weighParts(d,f,m,h?Hx:0,g?Ux:0),v=eS(_);if(!n)return{score:v};let y=e=>{let t=r.surface.get(e),n=i.surface.get(e);return t.length<n.length||t.length===n.length&&t<=n?t:n},b=l.sort((e,t)=>t.weight-e.weight||Jx(e.term,t.term));return{score:v,why:this.explain({titleTerms:b.filter(e=>e.title).slice(0,Gx).map(e=>y(e.term)),bodyTerms:b.filter(e=>!e.title).slice(0,Gx).map(e=>y(e.term)),trigram:f,labels:p,parent:h,link:g,titleOnly:a,parts:_})}}scoreQuery(e,t,n=!1){let r=0,i=0,a=[];for(let[o,s]of e.terms){let e=this.idf(o);i+=e;let c=t.title.has(o)?Math.min(1,Xx(t.title.get(o),t.titleLength,this.avgTitle)):0,l=t.body.has(o)?Lx*Math.min(1,Xx(t.body.get(o),t.bodyLength,this.avgBody)):0,u=Math.max(c,l);u!==0&&(r+=e*u,n&&a.push({term:s,weight:e*u,title:c>=l}))}let o=i>0?r/i:0,s=this.on.title?Zx(e.trigrams,t.trigrams):0,c=this.weighParts(o,s,0,0,0),l=eS(c);if(!n)return{score:l};let u=a.sort((e,t)=>t.weight-e.weight||Jx(e.term,t.term));return{score:l,why:this.explain({titleTerms:u.filter(e=>e.title).slice(0,Gx).map(e=>e.term),bodyTerms:u.filter(e=>!e.title).slice(0,Gx).map(e=>e.term),trigram:s,labels:[],parent:null,link:null,titleOnly:this.on.body&&!t.hasBody,parts:c})}}weighParts(e,t,n,r,i){let a=this.on.title?Rx:1,o=this.on.title?zx:0;return{terms:a*e,trigram:o*t,labels:n,parent:r,link:i}}explain(e){let t={terms:qx(e.parts.terms),trigram:qx(e.parts.trigram),labels:qx(e.parts.labels),parent:qx(e.parts.parent),link:qx(e.parts.link)},n={...e,trigram:qx(e.trigram),parts:t};return{summary:nS(n),...n}}rank(e,t,n){let r=rS(n.threshold),i=iS(n.limit),a=e.map(e=>({doc:e,score:t(e).score})).filter(e=>e.score>=r).sort((e,t)=>t.score-e.score||Jx(e.doc.ref.id,t.doc.ref.id));return{count:a.length,matches:a.slice(0,i).map(({doc:e})=>{let n=t(e,!0);return{...e.ref,score:n.score,why:n.why}})}}};function Xx(e,t,n){return e*2.2/(e+Px*(.25+Fx*t/n))}function Zx(e,t){if(!e.size||!t.size)return 0;let[n,r]=e.size<=t.size?[e,t]:[t,e],i=0;for(let e of n)r.has(e)&&i++;return 2*i/(e.size+t.size)}function Qx(e,t,n,r){return e>r.score||e===r.score&&(t<r.i||t===r.i&&n<r.j)}function $x(e,t){let n=e.links.find(e=>e.target===t.ref.id);if(n)return{type:n.type,direction:n.direction,name:n.name};let r=t.links.find(t=>t.target===e.ref.id);return r?{type:r.type,direction:r.direction===`outward`?`inward`:`outward`,name:r.name}:null}function eS(e){return qx(Math.min(1,e.terms+e.trigram+e.labels+e.parent+e.link))}var tS=e=>`${Math.round(e*100)}%`;function nS(e){let t=[];return e.titleTerms.length&&t.push(`title terms ${e.titleTerms.join(`, `)}`),e.bodyTerms.length&&t.push(`body terms ${e.bodyTerms.join(`, `)}`),e.trigram>0&&t.push(`titles ${tS(e.trigram)} alike by trigram`),e.labels.length&&t.push(`shared label${e.labels.length>1?`s`:``} ${e.labels.join(`, `)}`),e.parent&&t.push(`same parent ${e.parent}`),e.link&&t.push(`linked (${e.link.name})`),t.length||t.push(`nothing in common`),e.titleOnly&&t.push(`compared on titles alone`),`${t.join(`; `)}.`}function rS(e){return e===void 0||!Number.isFinite(e)?Sx:Math.min(1,Math.max(0,e))}function iS(e){return e===void 0||!Number.isFinite(e)?10:Math.max(1,Math.floor(e))}function aS(e,t={}){let{documents:n,skipped:r}=gx(typeof e==`string`?px(e):mx(e),{command:t.command,key:t.key});return vx(n,{fields:_x(t.fields),skipped:r,keys:Py(t.keyPatterns),authors:Yy(t.authorKinds)})}var oS={readOnly:!0,caller:`toil-ui`},sS=e=>`project = ${e} ORDER BY Rank ASC`,cS=[`ado`,`ado-cloud`],lS=`SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @project ORDER BY [System.Id]`,uS=e=>typeof e==`object`&&!!e&&!Array.isArray(e),dS=e=>Array.isArray(e)?e.filter(uS):[],fS=e=>Array.isArray(e)?e.flatMap(e=>typeof e==`string`||typeof e==`number`?[String(e)]:[]):[],pS=class extends Error{call;constructor(e){super(e.error??`${e.command} failed.`),this.call=e}};function mS(e){let t=uS(e.areas)?e.areas:{},n=uS(e.dossier)?e.dossier:{};return{summary:{name:String(e.name),description:typeof n.description==`string`?n.description:null,sources:Object.entries(t).map(([e,t])=>({area:e,connection:t.connection?.value??null})),environments:Object.keys(uS(n.environments)?n.environments:{})},areas:t,dossier:n}}function hS(e){return uS(e)?Object.fromEntries(Object.entries(e).filter(e=>Jv.includes(e[0])&&typeof e[1]==`string`)):{}}function gS(e){let t=e=>e.mergedAt??e.closedAt??e.updated??e.created??``,n=e=>e.state===`OPEN`||e.state===`DRAFT`,r=e.filter(e=>!n(e)).sort((e,n)=>t(e)<t(n)?1:-1).slice(0,20),i=new Set([...e.filter(n),...r]);return e.filter(e=>i.has(e))}var _S=`reviews,checks,commits,files`,vS=[{area:`bitbucket`,all:`ALL`,id:`id`},{area:`bitbucket-cloud`,all:`ALL`,id:`id`},{area:`ado`,all:`all`,id:`id`},{area:`ado-cloud`,all:`all`,id:`id`},{area:`github`,all:`all`,id:`number`}],yS=[`.github/CODEOWNERS`,`CODEOWNERS`,`docs/CODEOWNERS`];function bS(e){let t=new Set;for(let n of e){let e=n.source.connection;n.source.area.startsWith(`jira`)?t.add(`${n.source.key.replace(/-\d+$/,``)}-{n}=${e}`):n.source.area.startsWith(`ado`)?t.add(`AB#{n}=${e}`):n.source.area===`github`&&t.add(`${n.source.key.replace(/#\d+$/,``)}#{n}=${e}`)}return[...t]}function xS(e,t,n){if(e.authorKinds===void 0)return{};if(!uS(e.authorKinds))return n.push(`The ${t} section's authorKinds isn't an object of author id to HUMAN, AGENT or BOT, so it was left out.`),{};let r={};for(let[i,a]of Object.entries(e.authorKinds))typeof a==`string`&&Yv.includes(a.toUpperCase())?r[i]=a.toUpperCase():n.push(`The ${t} section's authorKinds gives ${i} as ${JSON.stringify(a)}, which isn't HUMAN, AGENT or BOT, so it was left out.`);return r}function SS(e){let t=e.filter(e=>typeof e.number==`number`),n=e=>String(e.closed_at??e.updated_at??``),r=t.filter(e=>e.state===`closed`).sort((e,t)=>n(e)<n(t)?1:-1).slice(0,50),i=new Set([...t.filter(e=>e.state!==`closed`),...r]);return t.filter(e=>i.has(e)).map(e=>e.number)}var CS=(e,t)=>e.ok?e.meta.context?.connection?.value??t:t;async function wS(e,t,n={}){let r={dossier:[],work:[],prs:[],owners:[],builds:[],deployments:[]},i=async(t,n,i)=>{let a=await e(n,i,oS),o={command:n,input:i,ok:a.ok,error:a.ok?null:`${a.error.message}${a.error.fix?` ${a.error.fix}`:``}`};if(r[t].push(o),!a.ok){if(t===`dossier`)throw new pS(o);return null}return a},{summary:a,areas:o,dossier:s}=mS((await i(`dossier`,`dossiers show`,{dossier:t})).data),c=e=>uS(s[e])?s[e]:{},l=dS(s.repos).map(e=>String(e.name)),u={dossier:t},d={jira:[],ado:[],"ado-cloud":[],github:[]},f=[];o.jira?.inputs.project&&f.push((async()=>{let e=await i(`work`,`jira issue search`,{...u,jql:sS(o.jira.inputs.project)});if(!e)return;d.jira.push(e);let t=dS(e.data.issues).map(e=>String(e.key));for(let e of t){let t=await i(`work`,`jira issue history`,{...u,key:e});t&&d.jira.push({key:e,history:t})}})());for(let e of cS.filter(e=>o[e]))f.push((async()=>{let t=await i(`work`,`${e} work-item iterations`,u);t&&d[e].push(t);let n=await i(`work`,`${e} work-item search`,{...u,wiql:lS}),r=n?dS(n.data.workItems).map(e=>Number(e.id)):[];if(!r.length)return;let a=await i(`work`,`${e} work-item get-many`,{...u,id:r});a&&d[e].push(a);for(let t of r){let n=await i(`work`,`${e} work-item history`,{...u,id:t});n&&d[e].push(n)}})());o.github&&f.push((async()=>{let e=`${o.github.inputs.owner}/${o.github.inputs.repo}`,t=new Set,n=fS(c(`github`).projects);if(!n.length){let e=await i(`work`,`github issue list`,{...u,state:`all`});if(!e)return;d.github.push(e);for(let t of SS(dS(e.data))){let e=await i(`work`,`github issue history`,{...u,number:t});e&&d.github.push({key:String(t),history:e})}return}for(let r of n){let n=await i(`work`,`github project items`,{...u,project:Number(r)});if(n){d.github.push(n);for(let r of dS(n.data)){let n=uS(r.content)?r.content:{};uS(n.repository)&&n.repository.nameWithOwner===e&&typeof n.number==`number`&&t.add(n.number)}}}if(!t.size)return;let r=await i(`work`,`github issue get`,{...u,number:[...t],subIssues:!0});r&&d.github.push(r);for(let e of t){let t=await i(`work`,`github issue history`,{...u,number:e});t&&d.github.push({key:String(e),history:t})}})()),await Promise.all(f);let p=n.mapOwi??aS,m=Object.entries(d).flatMap(([e,t])=>t.length?p(t,{fields:hS(c(e).fields)}).items:[]),h=[],g=[],_=uS(s.environments)?s.environments:{},v=Object.entries(_).flatMap(([e,t])=>uS(t.openshift)&&typeof t.openshift.namespace==`string`?[[e,t.openshift.namespace]]:[]),y=new Map(m.map(e=>[e.id,e])),b=bS(m),x=[],S=[],C={},w=async e=>{let t=new Map,n=await i(`prs`,`${e.area} pr list`,{...u,state:e.all});if(!n)return{prs:[],gets:t};let r=xS(c(e.area),e.area,x),a=p([n],{keyPatterns:b,authorKinds:r});if(!a.changes)return x.push(`The toil Toil UI runs with maps no pull requests (it reads OWI 0.1), so none are shown. Upgrade toil to one that maps OWI 0.2 changes.`),{prs:[],gets:t};let o=a.changes,s=[n];for(let n of gS(o)){let r=Number(n.id.slice(n.id.lastIndexOf(`#`)+1)),a=await i(`prs`,`${e.area} pr get`,{...u,[e.id]:r,include:_S});a&&(s.push(a),t.set(n.id,a))}let l=p(s,{keyPatterns:b,authorKinds:r}).changes??[];return S.push(...l),{prs:l,gets:t}},T=e=>e.map(e=>Ug(e,y)),E=async e=>{let t=[];for(let[n,r]of v){let a=await i(`deployments`,`openshift deployment list`,{...u,env:n,namespace:r});a&&t.push(...Zg(a.data,n,l,e))}return t};if(o.bitbucket){let e=T((await w(vS[0])).prs);h.push(...e);for(let t of fS(c(`jenkins`).jobs))for(let n of e){let e=n.id.slice(n.id.lastIndexOf(`#`)+1),r=await i(`builds`,`jenkins pipeline runs`,{...u,name:`${t}/PR-${e}`,limit:5});r&&h.push(...Gg(r.data,CS(r,`jenkins`),`${t}/PR-${e}`,n))}}if(o[`bitbucket-cloud`]&&h.push(...T((await w(vS[1])).prs)),o.ado){let e=T((await w(vS[2])).prs);h.push(...e);let t=e[0]?.change?.source.connection??o.ado.connection?.value??`ado`;for(let n of fS(c(`ado`).builds)){let r=await i(`builds`,`ado run list`,{...u,name:n,top:20});r&&h.push(...Kg(r.data,CS(r,t),e))}for(let n of fS(c(`ado`).deployments)){let r=await i(`deployments`,`ado run list`,{...u,name:n,top:20});r&&g.push(...Qg(r.data,CS(r,t),e))}}if(o[`ado-cloud`]?.inputs.repo&&h.push(...T((await w(vS[3])).prs)),o.github){let{prs:e,gets:t}=await w(vS[4]),n=T(e);h.push(...n),r.builds.push(...r.prs.filter(e=>e.command===`github pr get`));for(let e of n){let n=t.get(e.id),r=n&&uS(n.data)&&uS(n.data.included)?n.data.included.checks:void 0,i=Array.isArray(r)?Jg(r,e.change.source.connection,e):null;i&&h.push(i)}if(e.some(e=>(e.state===`OPEN`||e.state===`DRAFT`)&&!e.reviewers.length)){let e=`${o.github.inputs.owner}/${o.github.inputs.repo}`;for(let t of yS){let n=await i(`owners`,`github repo file`,{...u,path:t}),r=n&&uS(n.data)&&typeof n.data.text==`string`?n.data.text:null;if(r!==null){C[e]={path:t,text:r};break}}}}v.length&&g.push(...await E(h.filter(e=>e.kind===`pull-request`)));let D=j_(s);return{...a,items:m,pullRequests:S,codeowners:C,prNotes:x,changes:h,deployments:g.sort(e_),people:D.people,wipLimit:D.wipLimit,peopleNotes:D.notes,readiness:ov(s),calls:r}}async function TS(e){let t=[],n=async(n,r)=>{let i=await e(n,r,oS),a={command:n,input:r,ok:i.ok,error:i.ok?null:`${i.error.message}${i.error.fix?` ${i.error.fix}`:``}`};if(t.push(a),!i.ok)throw new pS(a);return i.data},r=dS((await n(`dossiers list`,{})).dossiers).filter(e=>e.shadowedBy===null||e.shadowedBy===void 0).map(e=>String(e.name)),i=[];for(let e of r)i.push(mS(await n(`dossiers show`,{dossier:e})).summary);return{dossiers:i,calls:t}}function ES(e){let t=(e.name??e.id).replace(/[^\p{L}\p{N} .-]/gu,` `).split(/[\s.-]+/).filter(Boolean);return(t.length>1?[t[0][0],t.at(-1)[0]]:[t[0]?.[0],t[0]?.[1]]).filter(Boolean).join(``).toUpperCase()||`?`}var DS=6;function OS(e){let t=0;for(let n of e.id)t=t*31+n.charCodeAt(0)>>>0;return t%DS}function kS({person:e,labelled:t=!1}){if(!e)return(0,q.jsx)(`span`,{className:`avatar avatar--none`,...t?{role:`img`,"aria-label":`Unassigned`}:{"aria-hidden":!0},children:`–`});let n=e.name??e.id;return(0,q.jsx)(`span`,{className:`avatar avatar--${OS(e)}`,...t?{role:`img`,"aria-label":n,title:n}:{"aria-hidden":!0},children:ES(e)})}var AS=new URL(new URL(`crate-lost-Dk5CaIuV.webp`,import.meta.url).href,``+import.meta.url).href,jS=new URL(new URL(`crate-loading-B9H4D652.webp`,import.meta.url).href,``+import.meta.url).href,MS={EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art`,children:[(0,q.jsx)(`img`,{src:AS,alt:``,width:240,height:160}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art`,role:`status`,children:[(0,q.jsx)(`img`,{src:jS,alt:``,width:240,height:160}),(0,q.jsx)(`p`,{children:e})]})},NS=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0OCA0OCIgd2lkdGg9IjQ4IiBo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HJva2Utd2lkdGg9Ii43Ij48Y2lyY2xlIGN4PSI1IiBjeT0iNSIgcj0iMiIvPjxjaXJjbGUgY3g9IjQzIiBjeT0iNSIgcj0iMiIvPjxjaXJjbGUgY3g9IjUiIGN5PSI0MyIgcj0iMiIvPjxjaXJjbGUgY3g9IjQzIiBjeT0iNDMiIHI9IjIiLz48L2c+Cjwvc3ZnPgo=`,PS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2016'%20width='24'%20height='16'%20fill='none'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c!--%20A%20blocker:%20a%20wagon%20wheel%20cracked%20off%20its%20axle,%20the%20axle%20snapped%20short.%20--%3e%3cpath%20d='M1.5%209.5H8.2'%20stroke='%232e2a26'%20stroke-width='2'/%3e%3cpath%20d='M8.2%208.4%209.6%2010.6'%20stroke='%238e1c10'%20stroke-width='1.3'/%3e%3ccircle%20cx='16.5'%20cy='8.5'%20r='6'%20stroke='%234d3a26'%20stroke-width='1.6'/%3e%3ccircle%20cx='16.5'%20cy='8.5'%20r='1.4'%20fill='%232e2a26'/%3e%3cpath%20d='M16.5%202.5V7.1M16.5%209.9V14.5M10.5%208.5H15.1M17.9%208.5H22.5M12.3%204.3%2015.5%207.5M17.5%209.5%2020.7%2012.7M20.7%204.3%2017.5%207.5'%20stroke='%234d3a26'%20stroke-width='1.1'/%3e%3cpath%20d='M19.6%203.4%2021.2%205.6%2020%206.2%2021.8%208'%20stroke='%238e1c10'%20stroke-width='1.1'/%3e%3c/svg%3e`,FS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%20width='32'%20height='32'%20fill='none'%3e%3c!--%20A%20small%20brass%20pressure%20gauge:%20a%20bezel,%20a%20pale%20dial%20with%20ticks,%20and%20a%20copper%20needle.%20--%3e%3ccircle%20cx='16'%20cy='16'%20r='14.5'%20fill='%23b08d3c'%20stroke='%234a3814'%20stroke-width='1'/%3e%3ccircle%20cx='16'%20cy='16'%20r='12.2'%20fill='%23f3e8cf'%20stroke='%236e5420'%20stroke-width='.8'/%3e%3cg%20stroke='%232e2a26'%20stroke-width='1'%20stroke-linecap='round'%3e%3cpath%20d='M7.6%2021.2%209.4%2020.1M6.6%2014.6%208.6%2015M10.1%208.6%2011.4%2010.2M16%206.2V8.2M21.9%208.6%2020.6%2010.2M25.4%2014.6%2023.4%2015M24.4%2021.2%2022.6%2020.1'/%3e%3c/g%3e%3cpath%20d='M16%2016%2021.6%2010.6'%20stroke='%238c3a14'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3ccircle%20cx='16'%20cy='16'%20r='2'%20fill='%232e2a26'/%3e%3cpath%20d='M12%2023.5h8'%20stroke='%23a0522d'%20stroke-width='1.4'%20stroke-linecap='round'/%3e%3c/svg%3e`,IS=new URL(`locomotive-CPPtBzL2.webp`,import.meta.url).href,LS=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+CjwhLS0gRnJvbnRpZXIncyBiYWRnZTogdGhlIHRpbGUgYXMgYSByaXZldGVkIGJyYXNzIGJvaWxlciBwbGF0ZSB3aXRoIGEgY29wcGVyIHJ1bGUsIHRoZSBwYWdlIGEgc3VuLWJsZWFjaGVkIGhhbmRiaWxsLiBUaGUgYmFkZ2UncyBzaWxob3VldHRlLCBza2lubmVkLiAtLT4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0iZjRiIiB4MT0iMCIgeTE9IjAiIHgyPSIxIiB5Mj0iMSI+CjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iI2UyYzI3YSIvPgo8c3RvcCBvZmZzZXQ9Ii40NSIgc3RvcC1jb2xvcj0iI2IwOGQzYyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2ZTU0MjAiLz4KPC9sa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cm9rZT0iI2IwOGQzYyIgc3Ryb2tlLXdpZHRoPSIyLjQiLz4KPHBhdGggZD0iTTcgMTYuNSAyNS41IDEzLjUiIHN0cm9rZT0iIzRhMzgxNCIgc3Ryb2tlLXdpZHRoPSIuNyIvPgo8Y2lyY2xlIGN4PSIyNiIgY3k9IjEyLjIiIHI9IjIuOCIgZmlsbD0iIzJlMmEyNiIvPgo8Y2lyY2xlIGN4PSI5IiBjeT0iMTciIHI9IjEuNCIgZmlsbD0iI2UyYzI3YSIgc3Ryb2tlPSIjNGEzODE0IiBzdHJva2Utd2lkdGg9Ii42Ii8+CjxwYXRoIGQ9Ik0zLjUgMjJDMiAxOCA0IDE0IDIuNSAxMC41UzQgNiA1LjUgNC41IiBzdHJva2U9IiNhMDUyMmQiIHN0cm9rZS13aWR0aD0iMS4xIi8+Cjwvc3ZnPgo=`,VS=new URL(`wanted-poster-BnjUajnc.webp`,import.meta.url).href,HS=new URL(`wood-CrrZEj6Y.webp`,import.meta.url).href,US={"dossiers.lede":`Each dossier is one body of work: its repositories, its tracker, its pipelines and its environments. Pick one to see its stories, pull requests, builds and deployments together.`,"dossier.eyebrow":`Dossier`,"settings.eyebrow":`Settings`,"attention.note":`Open items ranked by their insights, weightiest first. Each insight names the data it rests on.`,"aging.note":`How long each item in progress has been in progress, from its history, oldest first.`,"trace.note":`Each work item with the pull requests that name it, their latest builds, and the environments running them.`,"graph.note":`Arrows run the way each link reads, from the source's own links. Blocking chains run left to right.`,"ask.note":`Answers cite the items they rest on. The agent reads; it never changes a ticket. What it suggests comes back as a proposal for you to apply.`,"empty.dossiers":`toil sees no dossiers yet. A dossier is made with toil dossiers init.`,"empty.sprint":`No sprint is running in this dossier's work items.`,"empty.burnup":`No sprint is running, so there is nothing to burn up.`,"empty.column":`Nothing here.`,"empty.prs":`No pull requests for this dossier.`,"empty.builds":`No builds for this dossier's pull requests.`,"empty.deployments":`This dossier names no environment to read deployments from.`,"empty.links":`No links between this dossier's items.`,"empty.ask":`Pick a question, or ask your own, to see how answers cite their sources.`,"loading.dossiers":`Reading the dossiers…`,"loading.dossier":`Reading {name}…`,"loading.graph":`Drawing the graph…`,"loading.answer":`Thinking…`,"ask.placeholder":`Ask about {name}`,"ask.placeholder.short":`Ask a question`,"ask.welcome":`Ask anything about {name}: its sprint, its people, what is blocked or waiting on review. Every answer cites the items it rests on.`,"status.cache":`Reading the cache`,"status.live":`Reading live through toil`,"status.registry":`Reading a command's fields`,"status.writing":`Writing`,"status.done":`Done in {seconds} s`,"status.stopped":`Stopped after {seconds} s`};Object.keys(US);function WS(e,t,n,r={}){return((t?e?.[n]:void 0)??US[n]).replace(/\{([a-z]+)\}/g,(e,t)=>r[t]??e)}var GS=(0,v.createContext)(Qm[0]),KS=GS.Provider,qS=()=>(0,v.useContext)(GS),JS={theme:Qm[0].name,scheme:`system`,wording:!0,voice:!0,saveError:null,setTheme:()=>void 0,setScheme:()=>void 0,setWording:()=>void 0,setVoice:()=>void 0},YS=(0,v.createContext)(JS),XS=YS.Provider,ZS=()=>(0,v.useContext)(YS),QS=(e,t)=>t.wording&&e.lexicon!==void 0,$S=(e,t)=>t.voice&&e.voice!==void 0;function eC(e,t,n,r=!0){let i=r?e.terms?.[t]:void 0;return i&&i.toLowerCase()!==n.toLowerCase()?`${i} (${n})`:n}function tC(){let e=qS(),{wording:t}=ZS();return(n,r)=>eC(e,n,r,t)}function nC(){let e=qS(),t=QS(e,ZS());return(n,r)=>WS(e.lexicon,t,n,r)}var rC=e=>new URL(Object.assign({"../../themes/frontier/assets/brass-plate.svg":NS,"../../themes/frontier/assets/busted-axle.svg":PS,"../../themes/frontier/assets/gauge.svg":FS,"../../themes/frontier/assets/locomotive.webp":IS,"../../themes/frontier/assets/mark.svg":LS,"../../themes/frontier/assets/rivet-rail.svg":RS,"../../themes/frontier/assets/survey-map.webp":zS,"../../themes/frontier/assets/telegraph-key.svg":BS,"../../themes/frontier/assets/wanted-poster.webp":VS,"../../themes/frontier/assets/wood.webp":HS})[`../../themes/frontier/assets/${e}`],import.meta.url).href;function iC({children:e}){let t=tC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent frontier-operator`,children:[(0,q.jsxs)(`p`,{className:`frontier-operator-name`,children:[(0,q.jsx)(`img`,{src:rC(`telegraph-key.svg`),alt:``,width:24,height:24,loading:`lazy`,decoding:`async`}),t(`agent`,`Agent`)]}),e]})}var aC={ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(iC,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art frontier-wanted`,children:[(0,q.jsx)(`img`,{src:rC(`wanted-poster.webp`),alt:``,width:240,height:160,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art frontier-steam`,role:`status`,children:[(0,q.jsx)(`img`,{src:rC(`locomotive.webp`),alt:``,width:240,height:160,decoding:`async`}),(0,q.jsx)(`p`,{children:e})]})},oC=new URL(`crop-grown-HG5zb5pJ.svg`,import.meta.url).href,sC=new URL(`crop-harvested-Q-ua5_kg.svg`,import.meta.url).href,cC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='5'%20y='11'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='10'%20y='11'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='4'%20y='12'%20width='8'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='2'%20y='13'%20width='2'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='4'%20y='13'%20width='3'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='7'%20y='13'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='8'%20y='13'%20width='4'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='12'%20y='13'%20width='2'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='14'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='2'%20y='14'%20width='3'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='5'%20y='14'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='6'%20y='14'%20width='5'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='11'%20y='14'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='12'%20y='14'%20width='2'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='14'%20y='14'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='15'%20width='14'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='15'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3c/svg%3e`,lC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='4'%20y='6'%20width='2'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='10'%20y='6'%20width='2'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='3'%20y='7'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='4'%20y='7'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='6'%20y='7'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='9'%20y='7'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='10'%20y='7'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='12'%20y='7'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='4'%20y='8'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='5'%20y='8'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='9'%20y='8'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='11'%20y='8'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='6'%20y='9'%20width='4'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='7'%20y='10'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='7'%20y='11'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='8'%20y='11'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='4'%20y='12'%20width='8'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='2'%20y='13'%20width='2'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='4'%20y='13'%20width='3'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='7'%20y='13'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='8'%20y='13'%20width='4'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='12'%20y='13'%20width='2'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='14'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='2'%20y='14'%20width='3'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='5'%20y='14'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='6'%20y='14'%20width='5'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='11'%20y='14'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='12'%20y='14'%20width='2'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='14'%20y='14'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='15'%20width='14'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='15'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3c/svg%3e`,uC=new URL(`empty-field-BN05R29i.svg`,import.meta.url).href,dC=new URL(`fields-BxauQmw0.webp`,import.meta.url).href,fC=new URL(`mark-bSC__Aar.svg`,import.meta.url).href,pC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='6'%20y='1'%20width='4'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='5'%20y='2'%20width='1'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='6'%20y='2'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='7'%20y='2'%20width='2'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='9'%20y='2'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='10'%20y='2'%20width='1'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='4'%20y='3'%20width='8'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='4'%20y='4'%20width='8'%20height='1'%20fill='%23a3200f'/%3e%3crect%20x='1'%20y='5'%20width='14'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='2'%20y='6'%20width='12'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='3'%20y='7'%20width='10'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='3'%20y='8'%20width='2'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='5'%20y='8'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='6'%20y='8'%20width='4'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='10'%20y='8'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='11'%20y='8'%20width='2'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='3'%20y='9'%20width='2'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='5'%20y='9'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='6'%20y='9'%20width='4'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='10'%20y='9'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='11'%20y='9'%20width='2'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='3'%20y='10'%20width='1'%20height='1'%20fill='%23e98aa0'/%3e%3crect%20x='4'%20y='10'%20width='8'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='12'%20y='10'%20width='1'%20height='1'%20fill='%23e98aa0'/%3e%3crect%20x='3'%20y='11'%20width='3'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='6'%20y='11'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='7'%20y='11'%20width='2'%20height='1'%20fill='%23d99a6c'/%3e%3crect%20x='9'%20y='11'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='10'%20y='11'%20width='3'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='4'%20y='12'%20width='3'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='7'%20y='12'%20width='2'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='12'%20width='3'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='4'%20y='13'%20width='3'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='7'%20y='13'%20width='2'%20height='1'%20fill='%23d8d0c0'/%3e%3crect%20x='9'%20y='13'%20width='3'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='3'%20y='14'%20width='4'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='7'%20y='14'%20width='2'%20height='1'%20fill='%23d8d0c0'/%3e%3crect%20x='9'%20y='14'%20width='4'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='2'%20y='15'%20width='2'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='4'%20y='15'%20width='1'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='5'%20y='15'%20width='6'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='11'%20y='15'%20width='1'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='15'%20width='2'%20height='1'%20fill='%233d6fb6'/%3e%3c/svg%3e`,mC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='6'%20y='1'%20width='4'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='5'%20y='2'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='10'%20y='2'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='3'%20width='8'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='15'%20y='3'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='3'%20y='4'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='4'%20width='8'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='4'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='14'%20y='4'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='15'%20y='4'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='3'%20y='5'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='5'%20width='1'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='5'%20y='5'%20width='2'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='7'%20y='5'%20width='5'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='5'%20width='3'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='3'%20y='6'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='6'%20width='1'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='5'%20y='6'%20width='2'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='7'%20y='6'%20width='5'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='6'%20width='2'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='3'%20y='7'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='7'%20width='8'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='7'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='3'%20y='8'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='8'%20width='8'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='8'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='3'%20y='9'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='9'%20width='8'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='9'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='10'%20width='8'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='14'%20y='11'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='5'%20y='12'%20width='2'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='14'%20y='12'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='4'%20y='13'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='5'%20y='13'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='7'%20y='13'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='12'%20y='13'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='5'%20y='14'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='2'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='3'%20y='15'%20width='9'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='12'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3c/svg%3e`,hC=new URL(`wood-panel-CFA5lKLa.svg`,import.meta.url).href,gC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%20width='12'%20height='12'%20shape-rendering='crispEdges'%3e%3crect%20x='0'%20y='0'%20width='12'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='1'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='1'%20width='10'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='1'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='2'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='2'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='2'%20width='8'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='2'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='2'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='3'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='3'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='3'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='3'%20width='6'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='3'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='3'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='3'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='4'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='4'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='4'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='4'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='8'%20y='4'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='4'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='4'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='4'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='5'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='5'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='5'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='5'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='8'%20y='5'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='5'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='5'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='5'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='6'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='6'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='6'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='8'%20y='6'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='6'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='6'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='7'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='7'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='7'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='7'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='8'%20y='7'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='7'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='7'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='7'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='8'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='8'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='8'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='8'%20width='6'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='8'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='8'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='8'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='9'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='9'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='9'%20width='8'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='9'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='9'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='10'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='10'%20width='10'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='10'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='11'%20width='12'%20height='1'%20fill='%233b2614'/%3e%3c/svg%3e`,_C=e=>new URL(Object.assign({"../../themes/harvest/assets/crop-grown.svg":oC,"../../themes/harvest/assets/crop-harvested.svg":sC,"../../themes/harvest/assets/crop-seed.svg":cC,"../../themes/harvest/assets/crop-sprout.svg":lC,"../../themes/harvest/assets/empty-field.svg":uC,"../../themes/harvest/assets/fields.webp":dC,"../../themes/harvest/assets/mark.svg":fC,"../../themes/harvest/assets/portrait.svg":pC,"../../themes/harvest/assets/watering-can.svg":mC,"../../themes/harvest/assets/wood-panel.svg":hC,"../../themes/harvest/assets/wood-sign.svg":gC})[`../../themes/harvest/assets/${e}`],import.meta.url).href,vC={TODO:_C(`crop-seed.svg`),IN_PROGRESS:_C(`crop-grown.svg`),DONE:_C(`crop-harvested.svg`),UNKNOWN:_C(`crop-sprout.svg`)};function yC({src:e,size:t=32,className:n}){return(0,q.jsx)(`img`,{className:n,src:e,alt:``,width:t,height:t,loading:`lazy`,decoding:`async`})}function bC(){let{health:e}=fg();return e?(0,q.jsxs)(`div`,{className:`harvest-calendar`,"aria-hidden":`true`,children:[(0,q.jsxs)(`span`,{className:`harvest-calendar-day`,children:[`Day `,e.days.gone]}),(0,q.jsx)(`span`,{className:`harvest-calendar-grid`,children:Array.from({length:e.days.total},(t,n)=>(0,q.jsx)(`i`,{className:n+1<e.days.gone?`gone`:n+1===e.days.gone?`today`:void 0},n))})]}):null}function xC({id:e,children:t}){let n=(0,v.useContext)(ug)!==null;return(0,q.jsxs)(q.Fragment,{children:[e===`sprint`&&n&&(0,q.jsx)(bC,{}),t]})}function SC({children:e}){let t=tC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent harvest-dialogue`,children:[(0,q.jsx)(yC,{src:_C(`portrait.svg`),size:48,className:`harvest-portrait`}),(0,q.jsxs)(`div`,{className:`harvest-dialogue-text`,children:[(0,q.jsx)(`p`,{className:`harvest-name`,children:t(`agent`,`Agent`)}),e]})]})}var CC={Card:({item:e,children:t})=>(0,q.jsxs)(q.Fragment,{children:[t,(0,q.jsx)(yC,{src:vC[e.statusCategory],className:`harvest-crop harvest-crop--${e.statusCategory.toLowerCase()}`})]}),Panel:xC,ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(SC,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art harvest-empty`,children:[(0,q.jsx)(`img`,{src:_C(`empty-field.svg`),alt:``,width:192,height:96,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`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u8ZKC1AUz1gotStR9quUhBX7fWyzC7XuimWh6Kf+CQKD4jZmV3fTa/SqMdOhuW0hXECZpr0D3Uxxp94ztjZW9193s5w+wUn5yrsMnGVWCSS6bzcbpTOyAaffD3FuFoOKhoSpmUICO26kMCBT0eQfUlwEoMqejtHYEp1hIe+w6XODEOASnt15303OnOEOI8RgegdQGzEKJwpPHZlAAAA`,LC=new URL(`stone-wall-DRNYiEy2.svg`,import.meta.url).href,RC=e=>new URL(Object.assign({"../../themes/overworld/assets/chest-open.svg":wC,"../../themes/overworld/assets/chest.svg":TC,"../../themes/overworld/assets/dungeon-map.webp":EC,"../../themes/overworld/assets/empty-room.webp":DC,"../../themes/overworld/assets/gem.svg":OC,"../../themes/overworld/assets/heart-empty.svg":kC,"../../themes/overworld/assets/heart.svg":AC,"../../themes/overworld/assets/key.svg":jC,"../../themes/overworld/assets/locked-door.svg":MC,"../../themes/overworld/assets/mark.svg":NC,"../../themes/overworld/assets/overworld.webp":PC,"../../themes/overworld/assets/sage-cave.webp":FC,"../../themes/overworld/assets/sage.webp":IC,"../../themes/overworld/assets/stone-wall.svg":LC})[`../../themes/overworld/assets/${e}`],import.meta.url).href,zC={TODO:{src:RC(`chest.svg`),height:20},IN_PROGRESS:{src:RC(`key.svg`),height:14},DONE:{src:RC(`chest-open.svg`),height:22},UNKNOWN:{src:RC(`chest.svg`),height:20}},BC={full:RC(`heart.svg`),empty:RC(`heart-empty.svg`)};function VC(){let{health:e}=fg();if(!e)return null;let t=Math.max(0,e.days.total-e.days.gone),n=e.done.points+e.remaining.points;return(0,q.jsxs)(`p`,{className:`ow-hud`,"aria-hidden":`true`,children:[(0,q.jsx)(`span`,{className:`ow-hearts`,children:Array.from({length:e.days.total},(e,n)=>(0,q.jsx)(`img`,{src:n<t?BC.full:BC.empty,alt:``,width:14,height:14},n))}),(0,q.jsxs)(`span`,{className:`ow-gems`,children:[(0,q.jsx)(`img`,{src:RC(`gem.svg`),alt:``,width:14,height:12}),e.done.points,`/`,n]})]})}function HC({id:e,children:t}){let n=(0,v.useContext)(ug)!==null;return(0,q.jsxs)(q.Fragment,{children:[(e===`sprint`||e===`board`)&&n&&(0,q.jsx)(VC,{}),t]})}function UC({children:e}){let t=tC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent ow-sage`,children:[(0,q.jsx)(`img`,{className:`ow-portrait`,src:RC(`sage.webp`),alt:``,width:48,height:55,loading:`lazy`,decoding:`async`}),(0,q.jsxs)(`div`,{className:`ow-sage-text`,children:[(0,q.jsx)(`p`,{className:`ow-sage-name`,children:t(`agent`,`Agent`)}),e]})]})}var WC={Card:({item:e,children:t})=>(0,q.jsxs)(q.Fragment,{children:[t,(0,q.jsx)(`img`,{className:`ow-loot ow-loot--${e.statusCategory.toLowerCase()}`,src:zC[e.statusCategory].src,alt:``,width:24,height:zC[e.statusCategory].height,loading:`lazy`,decoding:`async`})]}),Panel:HC,ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(UC,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art ow-room`,children:[(0,q.jsx)(`img`,{src:RC(`empty-room.webp`),alt:``,width:240,height:183,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art ow-cave`,role:`status`,children:[(0,q.jsx)(`img`,{src:RC(`sage-cave.webp`),alt:``,width:240,height:196,decoding:`async`}),(0,q.jsx)(`p`,{children:e})]})},GC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2016'%20width='24'%20height='16'%20fill='none'%20stroke='%231a1410'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c!--%20A%20blocker:%20the%20road%20runs%20up%20to%20a%20keep%20and%20breaks%20off.%20--%3e%3cpath%20d='M1%2013.5H7'%20stroke-width='1.4'%20stroke-dasharray='2%201.6'/%3e%3cpath%20d='M8.5%2011.5%2010%2014.5M9.5%2010.8%2011.5%2013'%20stroke='%236e1c18'%20stroke-width='1.2'/%3e%3cpath%20d='M13%2015V6h1.6V4.5h1.6V6h1.6V4.5h1.6V6H21v9Z'%20fill='%233a3733'%20stroke-width='1'/%3e%3cpath%20d='M16.4%2015v-3h1.6v3'%20stroke='%23d8cbb0'%20stroke-width='.9'/%3e%3c/svg%3e`,KC=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0Ij4KPCEtLSBUaGUgZG9zc2llciB0aXRsZSdzIG9uZSBpbGx1bWluYXRlZCBjYXBpdGFsOiBhbiBveGJsb29kIGZpZWxkIGluIGEgdGFybmlzaGVkLWdvbGQgZnJhbWUsIHJpdmV0ZWQgYXQgdGhlIGNvcm5lcnMuIC0tPgo8cmVjdCB4PSIxIiB5PSIxIiB3aWR0aD0iNjIiIGhlaWdodD0iNjIiIGZpbGw9IiM0YTE0MTEiIHN0cm9rZT0iIzljN2EzYyIgc3Ryb2tlLXdpZHRoPSIyIi8+CjxyZWN0IHg9IjUuNSIgeT0iNS41IiB3aWR0aD0iNTMiIGhlaWdodD0iNTMiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzljN2EzYyIgc3Ryb2tlLXdpZHRoPSIuOCIgb3BhY2l0eT0iLjgiLz4KPGcgc3Ryb2tlPSIjMmEwYzBhIiBzdHJva2Utd2lkdGg9Ii42IiBvcGFjaXR5PSIuNTUiPgo8cGF0aCBkPSJNOCAyMCAyMCA4TTggMzIgMzIgOE04IDQ0IDQ0IDhNOCA1NiA1NiA4TTIwIDU2IDU2IDIwTTMyIDU2IDU2IDMyTTQ0IDU2IDU2IDQ0Ii8+CjwvZz4KPGcgZmlsbD0iI2I4OTc1YSI+PGNpcmNsZSBjeD0iNS41IiBje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F0aCBkPSJNMyAzSDQ1VjQ1SDNaIiBzdHJva2U9IiM1YTQ2MzYiIHN0cm9rZS13aWR0aD0iMSIvPgo8cGF0aCBkPSJNOSA5SDM5VjM5SDlaIiBzdHJva2U9IiM5YzdhM2MiIHN0cm9rZS13aWR0aD0iMSIvPgo8cGF0aCBkPSJNMTEuNSAxMS41SDM2LjVWMzYuNUgxMS41WiIgc3Ryb2tlPSIjMTQxMTBlIiBzdHJva2Utd2lkdGg9IjEiLz4KPGcgZmlsbD0iIzZiNjY2MCIgc3Ryb2tlPSIjMTQxMTBlIiBzdHJva2Utd2lkdGg9Ii44Ij48Y2lyY2xlIGN4PSI2IiBjeT0iNiIgcj0iMi40Ii8+PGNpcmNsZSBjeD0iNDIiIGN5PSI2IiByPSIyLjQiLz48Y2lyY2xlIGN4PSI2IiBjeT0iNDIiIHI9IjIuNCIvPjxjaXJjbGUgY3g9IjQyIiBjeT0iNDIiIHI9IjIuNCIvPjwvZz4KPGcgZmlsbD0iI2JkYjZhYSI+PGNpcmNsZSBjeD0iNS4zIiBjeT0iNS4zIiByPSIuOCIvPjxjaXJjbGUgY3g9IjQxLjMiIGN5PSI1LjMiIHI9Ii44Ii8+PGNpcmNsZSBjeD0iNS4zIiBjeT0iNDEuMyIgcj0iLjgiLz48Y2lyY2xlIGN4PSI0MS4zIiBjeT0iNDEuMyIgcj0iLjgiLz48L2c+Cjwvc3ZnPgo=`,XC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%20120'%20width='200'%20height='120'%20fill='none'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c!--%20An%20empty%20state:%20a%20ledger%20lying%20open%20on%20its%20binding,%20its%20ruled%20pages%20blank.%20--%3e%3cpath%20d='M14%2024%20100%2030%20186%2024V104L100%20110%2014%20104Z'%20fill='%232b211b'%20stroke='%2314110e'%20stroke-width='1.6'/%3e%3cpath%20d='M20%2020C46%2018%2076%2020%2098%2027V104C76%2098%2046%2096%2020%2098Z'%20fill='%23e6dcc6'%20stroke='%233a3733'%20stroke-width='1.2'/%3e%3cpath%20d='M180%2020C154%2018%20124%2020%20102%2027V104C124%2098%20154%2096%20180%2098Z'%20fill='%23ddd1b8'%20stroke='%233a3733'%20stroke-width='1.2'/%3e%3cg%20stroke='%239c8a6c'%20stroke-width='.7'%3e%3cpath%20d='M30%2038C52%2037%2072%2039%2090%2043M30%2050C52%2049%2072%2051%2090%2055M30%2062C52%2061%2072%2063%2090%2067M30%2074C52%2073%2072%2075%2090%2079M110%2043C128%2039%20148%2037%20170%2038M110%2055C128%2051%20148%2049%20170%2050M110%2067C128%2063%20148%2061%20170%2062M110%2079C128%2075%20148%2073%20170%2074'/%3e%3c/g%3e%3cpath%20d='M44%2032V92M156%2032V92'%20stroke='%236e1c18'%20stroke-width='.7'%20stroke-opacity='.7'/%3e%3cpath%20d='M100%2027V108'%20stroke='%2314110e'%20stroke-width='2'/%3e%3cpath%20d='M186%2058H196V70H186'%20fill='%233a3733'%20stroke='%2314110e'%20stroke-width='1.2'/%3e%3ccircle%20cx='191'%20cy='64'%20r='1.6'%20fill='%239c7a3c'/%3e%3c/svg%3e`,ZC=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+CjwhLS0gUmVhbG0ncyBiYWRnZTogdGhlIHRpbGUgYXMgYW4gaXJvbiBwbGF0ZSB3aXRoIGEgdGFybmlzaGVkLWdvbGQgcnVsZSBhbmQgZm91ciByaXZldHMsIHRoZSBwYWdlIGFnZWQgdmVsbHVtLiBUaGUgYmFkZ2UncyBzaWxob3VldHRlLCBza2lubmVkLiAtLT4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icjlpIiB4MT0iMCIgeTE9IjAiIHgyPSIxIiB5Mj0iMSI+CjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzR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48Y2lyY2xlIGN4PSIxMy40IiBjeT0iNTAuNiIgcj0iMS45Ii8+PGNpcmNsZSBjeD0iNTAuNiIgY3k9IjUwLjYiIHI9IjEuOSIvPjxjaXJjbGUgY3g9IjQ2LjIiIGN5PSIxMy40IiByPSIxLjYiLz48L2c+CjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMyIDMyLjYpIHNjYWxlKDEuMjIpIHRyYW5zbGF0ZSgtMzEuNSAtMzIuNSkiPgo8cGF0aCBkPSJNMjMgMTcuNWgxM2w3IDd2MjBhMyAzIDAgMCAxLTMgM0gyM2EzIDMgMCAwIDEtMy0zdi0yNGEzIDMgMCAwIDEgMy0zWiIgZmlsbD0iI2Q4Y2JiMCIgc3Ryb2tlPSIjNWU0NTIwIiBzdHJva2Utd2lkdGg9Ii44Ii8+CjxwYXRoIGQ9Ik0zNiAxNy41djQuNWEyLjUgMi41IDAgMCAwIDIuNSAyLjVINDNaIiBmaWxsPSIjOWM3YTNjIi8+CjxwYXRoIGQ9Im0yNC41IDI3LjUgNSA0LjMtNSA0LjMiIHN0cm9rZT0iIzE0MTEwZSIgc3Ryb2tlLXdpZHRoPSIzLjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBkPSJNMzEuOCA0MGg2LjIiIHN0cm9rZT0iIzZlMWMxOCIgc3Ryb2tlLXdpZHRoPSIzLjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L2c+Cjwvc3ZnPgo=`,QC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20fill='none'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c!--%20A%20rest:%20a%20small%20camp%20fire%20of%20two%20crossed%20logs,%20drawn%20in%20iron,%20for%20a%20day%20with%20no%20page.%20--%3e%3cpath%20d='M3%2013.5%2013%2010.5M3%2010.5%2013%2013.5'%20stroke='%233a3733'%20stroke-width='1.5'/%3e%3cpath%20d='M8%2010.8C6%209.6%206.2%207.4%208%205.2c.3%201.4%201.6%201.8%201.6%203.4%200%201.3-.7%202-1.6%202.2Z'%20fill='%236e1c18'%20stroke='%234a1411'%20stroke-width='.8'/%3e%3c/svg%3e`,$C=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNjAgMTYiIHdpZHRoPSIxNjAiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiPgo8IS0tIFRoZSBoZWFkZXIncyBlbWJvc3NlZCBydWxlOiB0d28gdGFybmlzaGVkLWdvbGQgbGluZXMgd2l0aCBhIHNoYWRvdyBiZW5lYXRoLCBhbmQgYSByaXZldCBhdCB0aGUgY2VudHJlIGFuZCBlYWNoIGVuZC4gLS0+CjxwYXRoIGQ9Ik04IDcuNUg3ME05MCA3LjVIMTUyIiBzdHJva2U9IiM5YzdhM2MiIHN0cm9rZS13aWR0aD0iMS4yIi8+CjxwYXRoIGQ9Ik04IDlINzBNOTAgOUgxNTIiIHN0cm9rZT0iIzE0MTEwZSIgc3Ryb2tlLW9wYWNpdHk9Ii43IiBzdHJva2Utd2lkdGg9Ii44Ii8+CjxwYXRoIGQ9Ik04MCAyLjUgODUuNSA4IDgwIDEzLjUgNzQuNSA4WiIgZmlsbD0iIzZlMWMxOCIgc3Ryb2tlPSIjOWM3YTNjIiBzdHJva2Utd2lkdGg9IjEiLz4KPGcgZmlsbD0iIzZiNjY2MCIgc3Ryb2tlPSIjMTQxMTBlIiBzdHJva2Utd2lkdGg9Ii44Ij48Y2lyY2xlIGN4PSI1IiBjeT0iOCIgcj0iMi40Ii8+PGNpcmNsZSBjeD0iMTU1IiBjeT0iOCIgcj0iMi40Ii8+PC9nPgo8L3N2Zz4K`,ew=new URL(`vellum-DlU0Uxzz.webp`,import.meta.url).href,tw=new URL(`war-map-_sup_aJg.webp`,import.meta.url).href,nw=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%20width='32'%20height='32'%3e%3c!--%20A%20plain%20wax%20seal:%20oxblood,%20pressed%20with%20a%20ring%20and%20a%20single%20rivet%20mark,%20no%20device.%20--%3e%3cpath%20d='M16%202.5c2%200%202.8%201.6%204.6%202s3.4-.4%204.6.9.4%203%201.2%204.6%202.4%202.4%202.4%204.4-1.4%202.6-1.8%204.4.6%203.4-.7%204.7-3.1.8-4.7%201.7-2%202.9-4%203.1-2.9-1.5-4.8-2-3.6.2-4.8-1.1-.4-3-1.4-4.6S2.5%2018.4%202.5%2016.3%204%2013.6%204.4%2011.8%204%208.5%205.4%207.3s3.1-.6%204.7-1.5S13.9%202.5%2016%202.5Z'%20fill='%236e1c18'%20stroke='%233a0d0b'%20stroke-width='1'/%3e%3ccircle%20cx='16'%20cy='16'%20r='8.2'%20fill='none'%20stroke='%233a0d0b'%20stroke-width='1.6'/%3e%3ccircle%20cx='16'%20cy='16'%20r='8.2'%20fill='none'%20stroke='%23a5453a'%20stroke-width='.6'%20stroke-dasharray='3%209'%20transform='rotate(-30%2016%2016)'/%3e%3ccircle%20cx='16'%20cy='16'%20r='2.4'%20fill='%233a0d0b'/%3e%3c/svg%3e`,rw=`https://imagile-dev.github.io/toil`,iw=`https://kolatts.github.io/context-overflow`,aw=e=>`${iw}/glossary/${e.slug}`,ow=[{title:`Hello, Agent`,task:`New to agents: start here`,path:`/modules/getting-started`},{title:`AI Fluency 101`,task:`New to agents: then this`,path:`/modules/ai-fluency-101`},{title:`The Autonomy Spectrum`,task:`Deciding how much to hand an agent`,path:`/modules/autonomy-spectrum`},{title:`Git: Your Time Machine`,task:`Branches and pull requests, for Implement mode`,path:`/modules/git-time-machine`}],sw=e=>`${iw}${e.path}`,cw={dossiers:{title:`dossiers`,text:`A dossier names the repositories, tracker, pipelines and environments of one body of work. Each card is read from the cache a sync filled, so opening this page asks no tracker anything.`,page:`/docs/ui/`,anchor:`the-dossiers-view`},dashboard:{title:`this dashboard`,text:`Every panel is read through toil, read-only, and says which commands fed it. A call that failed shows on its own panel with toil's message and fix.`,page:`/docs/ui/`,anchor:`what-it-reads`},recommendation:{title:`the recommendation`,text:`The latest Analyze's recommendation when the dossier has one, with when it was made. Without one it is worked out by code, with no agent call, from the blockers, builds, pull requests, aging work, readiness and the sprint's pace, and the card says which.`,page:`/docs/ui/`,anchor:`the-overview`},insights:{title:`insights`,text:`An insight is something about an item that deserves a look, such as Blocked, Stale or Build failing, weightiest first. Each one names the field, history or command it rests on.`,page:`/docs/ui/`,anchor:`insights`},prs:{title:`pull requests`,text:`Read from every code host the dossier names, the open ones ranked by how long each has waited and on what. Flow figures are the team's, never one person's.`,page:`/docs/ui/`,anchor:`pull-requests`},people:{title:`the People view`,text:`What is on each person's plate, from the dossier's people section and the same items and pull requests as the dashboard. It never ranks or scores anyone.`,page:`/docs/ui/`,anchor:`people`},readiness:{title:`the Command Center`,text:`Each verdict is worked out from the cached records, with no model call and no live read. Only ready items are slated, in the dossier's order.`,page:`/docs/ui/`,anchor:`readiness-and-the-command-center`},worklog:{title:`the worklog`,text:`One page a day, folded by code from the sync, the pull requests, the builds and the agent's runs: facts only, each line linked to where it came from. Days and times are UTC.`,page:`/docs/ui/`,anchor:`worklog`},standup:{title:`the stand-up`,text:`Built by code from the worklog's days, facts only, so the same days always give the same report. Days and times are UTC.`,page:`/docs/ui/`,anchor:`stand-up`},proposal:{title:`the write gate`,text:`Nothing changes until you run the command yourself. toil's write gate then needs writes on for the connection and --allow-write on the call.`,page:`/docs/core/`,anchor:`writes`},settings:{title:`toil's configuration`,text:`Changes run toil's own connections and dossiers commands, never an edit to a file, and each is in toil's audit log as toil-ui. Nothing here writes to a tracker.`,page:`/docs/ui/`,anchor:`toils-configuration`},connections:{title:`connections`,text:`A connection is one instance of an area: its host, its credential and whether writes are on. toil connections list never returns a secret, which stays in the OS credential store.`,page:`/docs/core/`,anchor:`configuration`},"dossier-setup":{title:`dossier setup`,text:`Each form runs one toil dossiers command, which checks the file before writing it and refuses to add what's already there unless you tick Replace. A dossier holds no secret and can't turn writes on.`,page:`/docs/dossiers/`,anchor:`create-check-use-share`},"dossier-list":{title:`where dossiers come from`,text:`Your own dossiers, any folders you listed, and the ones a repository checks in. Check finds problems without contacting any service.`,page:`/docs/dossiers/`,anchor:`where-dossiers-live`},"repo-setup":{title:`setting up a repo`,text:`For a repository with a dossier checked in: which of your connections each area would use, the ones still missing, and one test read through each. It changes nothing.`,page:`/docs/dossiers/`,anchor:`onboarding-to-a-repo-that-has-a-dossier`},bounds:{title:`bounds and the time limit`,text:`toil has no command to change these, and Toil UI never edits toil's files, so they're shown as toil reports them. Only your own config file can relax a bound, and only the file workspace.`,page:`/docs/core/`,anchor:`files-and-the-workspace`},audit:{title:`usage of toil`,text:`From toil audit stats, which reads only toil's audit log on this machine and sends it nowhere. It counts the command, how it was called and how it ended, never what a call was given or got back.`,page:`/docs/core/`,anchor:`the-audit-log`},"audit-failures":{title:`failures`,text:`The log keeps each failure's error code, never its message, so the fix shown is the one that usually applies to that code.`,page:`/docs/core/`,anchor:`the-audit-log`},"model-usage":{title:`the agent's usage`,text:`Figures the Claude, Codex and Copilot SDKs reported, kept only in Toil UI's local cache and sent nowhere. A figure an SDK didn't report reads not reported; your vendor's bill is the authority.`,page:`/docs/ui/`,anchor:`what-the-agents-models-used`,glossary:[{term:`Token`,slug:`token`,text:`The atomic unit a model reads and writes.`},{term:`Input tokens`,slug:`input-tokens`,text:`Tokens the harness sends on each model provider request.`},{term:`Output tokens`,slug:`output-tokens`,text:`Tokens the model generates back.`},{term:`Cache tokens`,slug:`cache-tokens`,text:`Input tokens the provider has cached from a previous request via its prefix cache, billed at a much lower rate.`}]},caps:{title:`caps`,text:`At 80% the chat says so; at 100% the question stops, naming the cap. A cap counts only what the SDK reports, so it guards against a runaway and is not a budget.`,page:`/docs/ui/`,anchor:`what-the-agents-models-used`,glossary:[{term:`Context window`,slug:`context-window`,text:`Everything the model sees on each model provider request.`},{term:`Effort`,slug:`effort`,text:`A dial for how much reasoning the model does before it answers.`}]},agent:{title:`the agent`,text:`The agent your organization already approved answers in the chat, on your own subscription, and only reads. These are Toil UI's own settings, kept in its data folder, never in toil's config.`,page:`/docs/ui/`,anchor:`the-agent`,glossary:[{term:`Model`,slug:`model`,text:`The parameters. Stateless — does next-token prediction and nothing else.`},{term:`Model provider`,slug:`model-provider`,text:`Whatever serves a model for inference.`},{term:`Harness`,slug:`harness`,text:`Everything around the model that turns it into an agent: tools, system prompt, context-window management, permissions, hooks.`},{term:`MCP`,slug:`mcp`,text:`A protocol for plugging external tool servers into a harness — how an agent gets tools beyond what the harness ships with.`},{term:`Tool call`,slug:`tool-call`,text:`The model's output naming a tool and its arguments — just structured text.`}]},assignments:{title:`assigning work to an agent`,text:`An assignment runs on your adapter, within your time limit and usage caps. Nothing it proposes leaves this machine until you apply it through toil's write gate.`,page:`/docs/ui/`,anchor:`assigning-work-to-an-agent`,glossary:[{term:`Sandbox`,slug:`sandbox`,text:`An isolated environment the agent runs inside — container, VM, or restricted shell.`},{term:`Permission mode`,slug:`permission-mode`,text:`The permission-gating slice of an agent mode — which tool calls trigger a permission request and which run automatically.`},{term:`Human-in-the-loop`,slug:`human-in-the-loop`,text:`A working pattern where one or more humans pair with the agent during a session — reviewing, redirecting, or collaborating in real time.`},{term:`Human review`,slug:`human-review`,text:`The user reading the code the agent produced and forming a judgement on it.`}]},stale:{title:`stale sessions`,text:`A chat or an assignment works from the instructions it started on. When toil, the dossier or your instructions change, it says which, and renews on request.`,page:`/docs/ui/`,anchor:`stale-sessions`,glossary:[{term:`Session`,slug:`session`,text:`One bounded run of interaction with an agent.`},{term:`System prompt`,slug:`system-prompt`,text:`The instructions the harness prepends to every model provider request — the agent's standing brief.`},{term:`Skill`,slug:`skill`,text:`A teachable capability bundled as a unit — kept out of the context window until a context pointer pulls it in for the task at hand.`}]},answers:{title:`these answers`,text:`The agent reads through toil and cites each item it used, and an id its tools never returned is named above the answer. Analyze answers top-down: a recommendation, the issues behind it, then the evidence.`,page:`/docs/ui/`,anchor:`the-agent`,glossary:[{term:`Hallucination`,slug:`hallucination`,text:`Confidently-wrong model output.`},{term:`Primary source`,slug:`primary-source`,text:`The thing itself — code, transcripts, raw data.`},{term:`Non-determinism`,slug:`non-determinism`,text:`The same input can produce different output.`}]},"themed-wording":{title:`themed wording`,text:`The theme's own lede, eyebrows, notes, empty states and loading lines, and its names for a sprint, a board or an epic beside the real ones. Buttons, links, figures, ids, commands and errors always read the same.`,page:`/docs/themes/`,anchor:`visuals-wording-and-voice`},"themed-voice":{title:`themed agent voice`,text:`The agent answers in the theme's register. It changes phrasing only: citations, figures and proposals stay exact.`,page:`/docs/themes/`,anchor:`the-checkboxes`},"first-run":{title:`getting started`,text:`Each step ticks itself off from toil's own state: a connection to a tracker (one made by env vars counts), a dossier, and a first sync. The list goes once the first sync finishes.`,page:`/docs/ui/`,anchor:`first-run`},sync:{title:`syncing`,text:`A sync reads every dossier through toil, read-only, and keeps what it read in a cache on this machine. Every view reads that cache, so opening one asks no tracker anything.`,page:`/docs/ui/`,anchor:`sync-and-the-cache`},"sample-data":{title:`the sample data`,text:`Sample dossiers and a scripted agent, with nothing connected to a tracker. Stop this Toil UI with Ctrl+C and start it again with this command to look around first.`,page:`/docs/ui/`,anchor:`start-it`},palette:{title:`the command palette`,text:`Jumps to a dossier, a tab, an item in any dossier, a saved analysis, a setting or a theme, and runs Sync, Analyze and Ask. Items are searched in the cache, never live.`,page:`/docs/ui/`,anchor:`the-command-palette`},alignments:{title:`rolled alignments`,text:`Each card's alignment is rolled from its name alone, for play, so it says nothing about anyone or their work. Only good and neutral ones are on the list, and themed wording off removes them.`,page:`/docs/themes/`,anchor:`rolled-alignments`},"rest-days":{title:`rest days`,text:`A past day with nothing on its page, or no page at all, is a rest: a small camp fire for a short rest on a weekday, a larger one for a long rest at the weekend.`,page:`/docs/themes/`,anchor:`rest-days`},motion:{title:`motion and effects`,text:`Reduce motion stops the themes' animations and particles in this browser. Your system's reduced-motion setting stops them whichever way this is set.`,page:`/docs/themes/`,anchor:`motion-and-particles`},board:{title:`the board`,text:`Drag a card, or press M on it, to propose a move to another column. The card stays where its tracker says until you apply the command.`,page:`/docs/ui/`,anchor:`the-board`},analyses:{title:`the Analyses tab`,text:`Analyze asks the agent for a pulse check, top-down: a recommendation, the issues behind it, then the evidence. Each one is kept here with what changed since the one before, worked out by code from each one's snapshot.`,page:`/docs/ui/`,anchor:`the-dossier-page`},notifications:{title:`notifications`,text:`A notice when an agent's state changes, never for a tool call. Which states notify, quiet hours and only your own are under Settings, General.`,page:`/docs/ui/`,anchor:`notifications`},"notification-history":{title:`the notification history`,text:`The last 50 notices and sync results, kept in this browser and sent nowhere, each linking to what it's about. Mark all read clears the count and keeps them.`,page:`/docs/ui/`,anchor:`notification-history`},"theme-motion":{title:`theme motion`,text:`How much the theme's splash, loading screens, entrances and moments move: full, subtle or off. Off whenever reduced motion is asked for.`,page:`/docs/themes/`,anchor:`theme-moments`},tips:{title:`toil tips`,text:`One line about toil on each loading screen, in plain words, each with a Read more link. Turn them off here; the choice is kept in this browser.`,page:`/docs/themes/`,anchor:`toil-tips`}},lw=e=>`${rw}${e.page}#${e.anchor}`,uw={dossiers:`dossiers`,dashboard:`dashboard`,prs:`prs`,people:`people`,"command-center":`readiness`,worklog:`worklog`,standup:`standup`,item:`readiness`,assignment:`assignments`,settings:`settings`},dw={"agent-usage":`model-usage`,agent:`agent`,usage:`audit`,dossiers:`dossier-setup`,connections:`connections`};function fw(e,t){return lw(cw[e===`settings`&&t?dw[t]??`settings`:uw[e]])}var pw=`toil-ui.learning`;function mw(){try{return localStorage.getItem(pw)!==`off`}catch{return!0}}var hw=null,gw=new Set;function _w(){return hw??=mw(),hw}function vw(e){hw=e;try{localStorage.setItem(pw,e?`on`:`off`)}catch{}for(let e of gw)e()}function yw(e){return gw.add(e),()=>gw.delete(e)}function bw(){return[(0,v.useSyncExternalStore)(yw,_w,()=>!0),vw]}var xw=[{product:`ui`,version:`0.1.0-beta.1`,date:`2026-10-24`,lines:[`A blocker Gantt on the sprint timeline, with the critical chain`,`A guided first run, a command palette, and search across dossiers`,`A history of analyses, and answers that read top-down`,`Add hidden Powershell Man arcade to UI and site`,`Context Overflow glossary links in the (i)s, and Learn in Help, the chat and the CLI menu`]},{product:`ui`,version:`0.1.0-alpha.3`,date:`2026-10-21`,lines:[`A particle switch for every theme, and Fredoka in Plain`,`A stand-up report folded from the worklog, by person, with an optional agent write-up`,`Ask up front with live status and Analyze; switch agents live and install an approved SDK in one press`,`Dossier pages that preview the work, and a dossier's name and description edited in place`,`Drag the whole board card, with its moves in a context menu`]},{product:`ui`,version:`0.1.0-alpha.2`,date:`2026-10-20`,lines:[`A daily worklog per dossier, folded from the sync, pull requests, builds and agent runs`,`A People view of what each person and agent is working on`,`A refined, grimdark Realm theme`,`Assign work items to an agent, in refine, investigate and implement modes`,`npm run verify:ui, Codex in a home of its own, and the lockfile held to the pin`]},{product:`ui`,version:`0.1.0-alpha.1`,date:`2026-10-19`,lines:[`Agent adapters for Claude, Copilot and Codex`,`Board, flow, dependency graph, insights, charts and a docked chat`,`Generated art for the game themes`,`Harvest, Starship and Realm themes`,`Motion and life for the game themes`]},{product:`toil`,version:`0.1.0-beta.1`,date:`2026-10-24`,lines:[`Crate in the site's blue, in Toil UI, the welcome menu and the site's screenshot`,`Crate is the default theme everywhere, CLI included`,`Hive and Impala through one HiveServer2 provider`,`Teradata through the Teradata Query Service`,`The emails in Toil UI Plain's blue`]},{product:`toil`,version:`0.1.0-alpha.5`,date:`2026-10-21`,lines:[`Onboard to a repo's dossiers, match connections by host, and shareable dossiers by default`,`Show that a pasted secret arrived, and check the paste, on the CLI and in Toil UI`,`Ticket the work before starting it, in the skill and in Toil UI's chat`]},{product:`toil`,version:`0.1.0-alpha.4`,date:`2026-10-20`,lines:[`Read a team's sprints, backlogs, boards and work item type states`,`A dialect pre-flight lint before SQL runs, and toil db lint`,`One command shape for jira and ado, and a Services menu`,`OWI for GitHub without a board: milestones as sprints, estimate labels and links`,`Pull request tracking in Toil UI across GitHub, Bitbucket and Azure DevOps`]},{product:`toil`,version:`0.1.0-alpha.3`,date:`2026-10-19`,lines:[`Consented feedback from the site, the API, toil feedback and Toil UI`,`Playful wordmark across the site, Toil UI and the CLI`,`Match .gitignore globs in linear time`,`Skip only the bad .gitignore line, with a warning`,`Layout primitives, an overflow check, and the UI and site sweep fixes`]},{product:`toil`,version:`0.1.0-alpha.2`,date:`2026-10-19`,lines:[`Run --grep, md conversion, size outlines and YAML parsing in the bounded worker`,`Install bubblewrap for the agent's isolation, and clear failure labels on a decision`]},{product:`toil`,version:`0.1.0-alpha.1`,date:`2026-10-18`,lines:[`Add Azure DevOps Services integration beside Azure DevOps Server`,`Add the Azure DevOps Server integration`,`Page every list through meta.page, add --updated-since, work revisions and work get-batch`,`Add the Alation integration`,`Add the JFrog Artifactory integration`]}],Sw={ui:`0.1.0-beta.1`,toil:`0.1.0-beta.1`},Cw={toil:`toil`,ui:`Toil UI`},ww={toil:`https://github.com/imagile-dev/toil/blob/main/CHANGELOG.md`,ui:`https://github.com/imagile-dev/toil/blob/main/ui/CHANGELOG.md`};function Tw(e,t){let n=e=>{let t=/^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/.exec(e.trim());return t?{nums:[Number(t[1]),Number(t[2]),Number(t[3])],pre:t[4]?.split(`.`)??[]}:null},r=n(e),i=n(t);if(!r||!i)return 0;for(let e=0;e<3;e++)if(r.nums[e]!==i.nums[e])return r.nums[e]-i.nums[e];if(!r.pre.length||!i.pre.length)return i.pre.length-r.pre.length;for(let e=0;e<Math.max(r.pre.length,i.pre.length);e++){let t=r.pre[e],n=i.pre[e];if(t===void 0)return-1;if(n===void 0)return 1;let a=/^\d+$/.test(t),o=/^\d+$/.test(n);if(a&&o&&Number(t)!==Number(n))return Number(t)-Number(n);if(a!==o)return a?-1:1;if(!a&&t!==n)return t<n?-1:1}return 0}function Ew(e,t,n){return e.filter(e=>{let r=t?.[e.product];return r!==void 0&&Tw(e.version,r)>0&&Tw(e.version,n[e.product])<=0})}function Dw(e,t){let n=[];for(let r of[`ui`,`toil`]){let i=e.filter(e=>e.product===r&&Tw(e.version,t[r])<=0).sort((e,t)=>Tw(t.version,e.version))[0];i&&n.push(i)}return n}function Ow(e){if(!e)return null;try{let t=JSON.parse(e);if(!t||typeof t!=`object`)return null;let n={};for(let e of[`toil`,`ui`])typeof t[e]==`string`&&(n[e]=t[e]);return Object.keys(n).length?n:null}catch{return null}}var kw=`toil-ui.whats-new.seen`,Aw=()=>{try{return localStorage.getItem(kw)}catch{return null}},jw=e=>{try{localStorage.setItem(kw,JSON.stringify(e))}catch{}};function Mw(e=Sw,t=xw){let[n,r]=(0,v.useState)(()=>{let t=Ow(Aw());return t||jw(e),t??e}),i=Ew(t,n,e),a=(0,v.useCallback)(()=>{jw(e),r(e)},[e]);return{fresh:i,shown:i.length?i:Dw(t,e),seen:a}}function Nw({shown:e,fresh:t,isOpen:n,onOpenChange:r}){let i=[...new Set(e.map(e=>e.product))];return(0,q.jsx)(Of,{className:`palette-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:n,onOpenChange:r,children:(0,q.jsx)(Ef,{className:`palette-modal whats-new-modal`,children:(0,q.jsx)(uf,{className:`whats-new`,"aria-labelledby":`whats-new-title`,"data-whats-new":``,children:({close:n})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`whats-new__head`,children:[(0,q.jsx)(ja,{slot:`title`,id:`whats-new-title`,children:`What's new`}),(0,q.jsx)(W,{className:`btn btn--small`,onPress:n,"data-whats-new-close":``,children:`Close`})]}),(0,q.jsx)(`p`,{className:`note`,children:t?`Since this browser last looked.`:`Nothing new since this browser last looked. The latest:`}),e.map(e=>(0,q.jsxs)(`section`,{className:`whats-new__release`,"aria-labelledby":`wn-${e.product}-${e.version}`,children:[(0,q.jsxs)(`h3`,{id:`wn-${e.product}-${e.version}`,children:[Cw[e.product],` `,e.version,e.date&&(0,q.jsxs)(`span`,{className:`note`,children:[` · `,vg(e.date)]})]}),e.lines.length?(0,q.jsx)(`ul`,{children:e.lines.map(e=>(0,q.jsx)(`li`,{children:e},e))}):(0,q.jsx)(`p`,{className:`note`,children:`Nothing that changes how you use it.`})]},`${e.product}@${e.version}`)),(0,q.jsx)(`p`,{className:`whats-new__links`,children:i.map(e=>(0,q.jsxs)(`a`,{href:ww[e],target:`_blank`,rel:`noopener noreferrer`,"data-changelog":``,children:[Cw[e],`'s full changelog`,(0,q.jsx)(`span`,{className:`sr-only`,children:` (opens in a new tab)`})]},e))})]})})})})}function Pw(){return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`new-dot`,"aria-hidden":`true`,"data-new-dot":``}),(0,q.jsx)(`span`,{className:`sr-only`,children:`, with something new`})]})}function Fw({topic:e}){let t=cw[e];return(0,q.jsxs)(lf,{children:[(0,q.jsxs)(om,{delay:400,closeDelay:200,children:[(0,q.jsx)(W,{className:`btn help-button`,"data-help":e,"aria-label":`About ${t.title}`,children:(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`help-button__mark`,children:`i`})}),(0,q.jsx)(sm,{className:`help-tooltip`,offset:6,children:t.text})]}),(0,q.jsx)(Xu,{className:`popover help-popover`,placement:`bottom`,offset:6,children:(0,q.jsxs)(uf,{className:`help-popover__dialog`,"aria-label":`About ${t.title}`,children:[(0,q.jsxs)(ja,{slot:`title`,className:`help-popover__title`,children:[`About `,t.title]}),(0,q.jsx)(`p`,{children:t.text}),(0,q.jsx)(`p`,{children:(0,q.jsxs)(`a`,{href:lw(t),target:`_blank`,rel:`noopener noreferrer`,"data-read-more":``,children:[`Read more`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` about `,t.title,` in the docs (opens in a new tab)`]})]})}),t.glossary&&(0,q.jsx)(Iw,{entries:t.glossary})]})})]})}function Iw({entries:e}){let[t]=bw();return!t||!e.length?null:(0,q.jsx)(`ul`,{className:`help-glossary`,"aria-label":`Terms, from Context Overflow's glossary`,"data-glossary":``,children:e.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:e.term}),`: `,e.text,` `]}),(0,q.jsxs)(`a`,{href:aw(e),target:`_blank`,rel:`noopener noreferrer`,"data-learn-link":``,children:[`Read more on Context Overflow`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` about `,e.term,` (opens in a new tab)`]})]})]},e.slug))})}function Lw({href:e,fresh:t=!1,onWhatsNew:n}){let[r]=bw();return(0,q.jsxs)(Xd,{children:[(0,q.jsxs)(W,{className:`btn help-link`,"data-help-link":``,children:[`Help`,t&&(0,q.jsx)(Pw,{}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:` ▾`})]}),(0,q.jsx)(Xu,{className:`popover menu-popover`,placement:`bottom end`,offset:6,children:(0,q.jsxs)(Qd,{className:`menu help-menu`,"aria-label":`Help`,onAction:e=>e===`whats-new`&&n?.(),children:[(0,q.jsxs)(af,{className:`menu-item`,href:e,target:`_blank`,rel:`noopener noreferrer`,textValue:`Help for this view`,children:[`Help for this view`,(0,q.jsx)(`span`,{className:`sr-only`,children:` (opens in a new tab)`})]}),n&&(0,q.jsxs)(af,{id:`whats-new`,className:`menu-item`,textValue:`What's new`,"data-whats-new-open":``,children:[`What's new`,t&&(0,q.jsx)(Pw,{})]}),r&&(0,q.jsxs)(nf,{children:[(0,q.jsx)(ys,{className:`menu-header`,children:`Learn, on Context Overflow`}),ow.map(e=>(0,q.jsxs)(af,{id:e.path,className:`menu-item help-menu__module`,href:sw(e),target:`_blank`,rel:`noopener noreferrer`,textValue:e.title,"data-learn-link":``,children:[(0,q.jsx)(Na,{slot:`label`,children:e.title}),(0,q.jsxs)(Na,{slot:`description`,className:`note`,children:[e.task,(0,q.jsx)(`span`,{className:`sr-only`,children:` (opens in a new tab)`})]})]},e.path))]})]})})]})}function Rw(){let[e]=bw();return e?(0,q.jsxs)(lf,{children:[(0,q.jsx)(W,{className:`btn btn--small learn-button`,"data-learn":``,children:`Learn`}),(0,q.jsx)(Xu,{className:`popover help-popover`,placement:`bottom start`,offset:6,children:(0,q.jsxs)(uf,{className:`help-popover__dialog`,"aria-labelledby":`learn-title`,children:[(0,q.jsx)(ja,{slot:`title`,id:`learn-title`,className:`help-popover__title`,children:`Learn, on Context Overflow`}),(0,q.jsx)(`ul`,{className:`help-learn`,children:ow.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`a`,{href:sw(e),target:`_blank`,rel:`noopener noreferrer`,"data-learn-link":``,children:[e.title,(0,q.jsx)(`span`,{className:`sr-only`,children:` (opens in a new tab)`})]}),(0,q.jsx)(`span`,{className:`note`,children:e.task})]},e.path))})]})})]}):null}function zw({href:e,label:t}){return(0,q.jsx)(`a`,{className:`btn btn--small edit-link`,href:e,"aria-label":t,title:t,"data-edit-link":``,children:(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`✎`})})}function Bw(e,t){(0,v.useEffect)(()=>{if(!e||!t)return;let n=document.getElementById(e)??document.querySelector(`main h1`);n&&(n.tabIndex<0&&!n.hasAttribute(`tabindex`)&&n.setAttribute(`tabindex`,`-1`),n.scrollIntoView?.({block:`start`}),n.focus())},[e,t])}var Vw=e=>new URL(Object.assign({"../../themes/realm/assets/broken-road.svg":GC,"../../themes/realm/assets/capital.svg":KC,"../../themes/realm/assets/d20.svg":qC,"../../themes/realm/assets/dungeon-map.webp":JC,"../../themes/realm/assets/iron-band.svg":YC,"../../themes/realm/assets/ledger.svg":XC,"../../themes/realm/assets/mark.svg":ZC,"../../themes/realm/assets/rest.svg":QC,"../../themes/realm/assets/rule.svg":$C,"../../themes/realm/assets/vellum.webp":ew,"../../themes/realm/assets/war-map.webp":tw,"../../themes/realm/assets/wax-seal.svg":nw})[`../../themes/realm/assets/${e}`],import.meta.url).href;function Hw({item:e}){let t=(0,v.useContext)(ug),n=tC(),r=e.parent?t?.byId.get(e.parent):void 0;return!r||r.type!==`EPIC`?null:(0,q.jsxs)(`p`,{className:`realm-campaign`,children:[n(`epic`,r.typeName??`Epic`),`: `,r.title]})}function Uw(){let{health:e}=fg(),t=tC(),{wording:n}=ZS();if(!e||!n)return null;let r=e.remaining.points,i=e.done.points+r;return(0,q.jsxs)(`div`,{className:`realm-vitals`,children:[(0,q.jsxs)(`p`,{className:`realm-vital`,children:[(0,q.jsx)(`span`,{className:`realm-vital__name`,children:t(`pointsLeft`,`Points left`)}),` `,(0,q.jsxs)(`span`,{className:`realm-vital__value`,children:[r,` of `,i]})]}),(0,q.jsx)(`span`,{className:`realm-hp`,"aria-hidden":`true`,children:(0,q.jsx)(`span`,{style:{width:`${i?100*r/i:0}%`}})})]})}function Ww(){let{wording:e}=ZS();return e?(0,q.jsxs)(`p`,{className:`note realm-rests`,children:[`Camp fires mark rest days. `,(0,q.jsx)(Fw,{topic:`rest-days`})]}):null}function Gw({id:e,children:t}){let n=(0,v.useContext)(ug)!==null,{wording:r}=ZS();return e===`sprint`&&n?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Uw,{}),t]}):e===`worklog-calendar`?(0,q.jsxs)(q.Fragment,{children:[r&&(0,q.jsx)(`i`,{className:`realm-rest-key`,hidden:!0}),t,(0,q.jsx)(Ww,{})]}):t}function Kw({children:e}){let t=tC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent realm-steward`,children:[(0,q.jsxs)(`p`,{className:`realm-steward-name`,children:[(0,q.jsx)(`img`,{src:Vw(`wax-seal.svg`),alt:``,width:24,height:24,loading:`lazy`,decoding:`async`}),t(`agent`,`Agent`)]}),e]})}var qw={Card:({item:e,children:t})=>(0,q.jsxs)(q.Fragment,{children:[t,(0,q.jsx)(Hw,{item:e})]}),Panel:Gw,Header:({children:e})=>(0,q.jsxs)(q.Fragment,{children:[e,(0,q.jsx)(`img`,{className:`realm-rule realm-rule--header`,src:Vw(`rule.svg`),alt:``,width:160,height:16,loading:`lazy`,decoding:`async`,"aria-hidden":`true`})]}),ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(Kw,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art realm-ledger`,children:[(0,q.jsx)(`img`,{src:Vw(`ledger.svg`),alt:``,width:200,height:120,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art realm-roll`,role:`status`,children:[(0,q.jsx)(`img`,{className:`realm-d20`,src:Vw(`d20.svg`),alt:``,width:88,height:88,decoding:`async`}),(0,q.jsx)(`p`,{children:e})]})},Jw=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3c!--%20Black%20ICE:%20a%20cracked%20hexagonal%20barrier,%20in%20danger%20red%20on%20black.%20--%3e%3cpath%20d='M8%201%2014%204.5v7L8%2015%202%2011.5v-7Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='1.3'/%3e%3cpath%20d='m8%203.5-1.5%203.5%202.5%201.5-2%204'%20stroke='%23ff6470'%20stroke-width='1.1'%20stroke-linejoin='bevel'/%3e%3c/svg%3e`,Yw=new URL(`dead-drop-BHoO7uon.webp`,import.meta.url).href,Xw=new URL(`jack-in-Cs60f1qu.webp`,import.meta.url).href,Zw=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+CjwhLS0gU3ByYXdsJ3MgYmFkZ2U6IGEgZGFyayB0aWxlIGVkZ2VkIGluIG1hZ2VudGEgbmVvbiB3aXRoIGEgY3lhbiBnaG9zdCBvZiBpdHMgZWRnZSwgc2NhbmxpbmVzIGFjcm9zcyBpdCwgYW5kIHRoZSBwYWdlIGFzIGEgdGVybWluY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IjIuNiIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLWxpbmVqb2luPSJtaXRlciI+CjxwYXRoIGQ9Im0yNC41IDI3LjUgNSA0LjMtNSA0LjMiLz4KPC9nPgo8cmVjdCB4PSIzMS42IiB5PSIzNi40IiB3aWR0aD0iNS42IiBoZWlnaHQ9IjYuNCIgZmlsbD0iI2ZmMmU4OCIgZmlsdGVyPSJ1cmwoI2I3ZykiLz4KPHBhdGggZD0iTTIyLjUgMjIuNWg5TTIyLjUgNDVoNE0yOCA0NWg5IiBzdHJva2U9IiMzZmYwZmYiIHN0cm9rZS13aWR0aD0iLjUiIG9wYWNpdHk9Ii40NSIvPgo8L2c+Cjwvc3ZnPgo=`,Qw=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%20320'%20width='320'%20height='320'%3e%3c!--%20The%20net%20map:%20a%20megacity%20street%20grid%20as%20a%20wireframe,%20tiled%20behind%20the%20dependency%20graph.%20--%3e%3crect%20width='320'%20height='320'%20fill='%2307060f'/%3e%3cpath%20d='M0%200V320'%20stroke='%233ff0ff'%20stroke-width='1.2'%20opacity='0.32'/%3e%3cpath%20d='M58%200V320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M96%200V320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M150%200V320'%20stroke='%233ff0ff'%20stroke-width='1.2'%20opacity='0.32'/%3e%3cpath%20d='M212%200V320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M248%200V320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M290%200V320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M0%200H320'%20stroke='%233ff0ff'%20stroke-width='1.2'%20opacity='0.32'/%3e%3cpath%20d='M0%2044H320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M0%20110H320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M0%20148H320'%20stroke='%233ff0ff'%20stroke-width='1.2'%20opacity='0.32'/%3e%3cpath%20d='M0%20196H320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M0%20262H320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M0%20300H320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3crect%20x='4'%20y='4'%20width='50'%20height='36'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='4'%20y='114'%20width='50'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='4'%20y='152'%20width='50'%20height='40'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='4'%20y='266'%20width='50'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='62'%20y='114'%20width='30'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='100'%20y='4'%20width='46'%20height='36'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='100'%20y='152'%20width='46'%20height='40'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='100'%20y='266'%20width='46'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='154'%20y='48'%20width='54'%20height='58'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='154'%20y='114'%20width='54'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='216'%20y='114'%20width='28'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='216'%20y='152'%20width='28'%20height='40'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='216'%20y='266'%20width='28'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='252'%20y='4'%20width='34'%20height='36'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='252'%20y='48'%20width='34'%20height='58'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='252'%20y='114'%20width='34'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='294'%20y='4'%20width='22'%20height='36'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='294'%20y='48'%20width='22'%20height='58'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='294'%20y='152'%20width='22'%20height='40'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='294'%20y='200'%20width='22'%20height='58'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='294'%20y='266'%20width='22'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3cpath%20d='M0%20230L90%20140M90%20140H150L320%20-30M0%20550'%20stroke='%23ff2e88'%20stroke-width='0.8'%20opacity='0.28'/%3e%3ccircle%20cx='0'%20cy='110'%20r='1.8'%20fill='%23ff2e88'%20opacity='0.7'/%3e%3ccircle%20cx='96'%20cy='196'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3ccircle%20cx='290'%20cy='148'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3ccircle%20cx='58'%20cy='110'%20r='1.8'%20fill='%23ff2e88'%20opacity='0.7'/%3e%3ccircle%20cx='58'%20cy='110'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3ccircle%20cx='96'%20cy='110'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3ccircle%20cx='150'%20cy='196'%20r='1.8'%20fill='%23ff2e88'%20opacity='0.7'/%3e%3ccircle%20cx='58'%20cy='300'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3ccircle%20cx='150'%20cy='300'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3c/svg%3e`,$w=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3c!--%20The%20netrunner:%20a%20terminal%20window%20with%20a%20prompt%20and%20a%20block%20cursor,%20in%20neon.%20--%3e%3crect%20x='1.5'%20y='3.5'%20width='21'%20height='17'%20stroke='%233ff0ff'%20stroke-width='1.2'/%3e%3cpath%20d='M1.5%207.5h21'%20stroke='%233ff0ff'%20stroke-width='1'/%3e%3crect%20x='3'%20y='5'%20width='1.5'%20height='1.2'%20fill='%23ff2e88'/%3e%3crect%20x='5.5'%20y='5'%20width='1.5'%20height='1.2'%20fill='%23f2ff4a'/%3e%3cpath%20d='m5%2011%203%202.5-3%202.5'%20stroke='%233ff0ff'%20stroke-width='1.6'%20stroke-linecap='square'/%3e%3crect%20x='10'%20y='14.5'%20width='4'%20height='3'%20fill='%23ff2e88'/%3e%3c/svg%3e`,eT=new URL(`skyline-CZ4WZ55S.webp`,import.meta.url).href,tT=e=>new URL(Object.assign({"../../themes/sprawl/assets/black-ice.svg":Jw,"../../themes/sprawl/assets/dead-drop.webp":Yw,"../../themes/sprawl/assets/jack-in.webp":Xw,"../../themes/sprawl/assets/mark.svg":Zw,"../../themes/sprawl/assets/net-map.svg":Qw,"../../themes/sprawl/assets/netrunner.svg":$w,"../../themes/sprawl/assets/skyline.webp":eT})[`../../themes/sprawl/assets/${e}`],import.meta.url).href;function nT(){return(0,q.jsx)(`span`,{className:`sprawl-notch`,"aria-hidden":`true`})}function rT({children:e}){let t=tC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent sprawl-term`,children:[(0,q.jsxs)(`p`,{className:`sprawl-term__bar`,children:[(0,q.jsx)(`img`,{src:tT(`netrunner.svg`),alt:``,width:20,height:20,loading:`lazy`,decoding:`async`}),t(`agent`,`Agent`)]}),(0,q.jsx)(`div`,{className:`sprawl-term__body`,children:e})]})}var iT={Panel:({children:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(nT,{}),e]}),Header:({children:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(nT,{}),e]}),ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(rT,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art sprawl-art`,children:[(0,q.jsx)(`img`,{src:tT(`dead-drop.webp`),alt:``,width:240,height:160,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art sprawl-art sprawl-loading`,role:`status`,children:[(0,q.jsx)(`img`,{src:tT(`jack-in.webp`),alt:``,width:240,height:160,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e})]})},aT=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%20width='32'%20height='32'%3e%3ccircle%20cx='16'%20cy='16'%20r='14'%20fill='%230a1222'%20stroke='%2336d6ff'%20stroke-width='1.5'/%3e%3ccircle%20cx='16'%20cy='16'%20r='9.5'%20fill='none'%20stroke='%237fe3ff'%20stroke-width='1'%20stroke-dasharray='3%202.2'/%3e%3ccircle%20cx='16'%20cy='16'%20r='4.5'%20fill='%2336d6ff'/%3e%3ccircle%20cx='16'%20cy='16'%20r='2'%20fill='%23e6f1ff'/%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gNSA0LjMtNSA0LjMiLz4KPHBhdGggZD0iTTMxLjggNDBoNi4yIi8+CjwvZz4KPHBhdGggZD0iTTIyLjUgMjIuNWgxME0yMi41IDQ0LjJoMTciIHN0cm9rZT0iIzM2ZDZmZiIgc3Ryb2tlLXdpZHRoPSIuNSIgb3BhY2l0eT0iLjQ1Ii8+CjwvZz4KPC9zdmc+Cg==`,lT=new URL(`nebula-t0QcaA3K.webp`,import.meta.url).href,uT=new URL(`star-chart-Chk7Xt5X.svg`,import.meta.url).href,dT=new URL(`starfield-BM71b4P5.svg`,import.meta.url).href,fT=e=>new URL(Object.assign({"../../themes/starship/assets/computer.svg":aT,"../../themes/starship/assets/empty-sector.webp":oT,"../../themes/starship/assets/lightspeed.svg":sT,"../../themes/starship/assets/mark.svg":cT,"../../themes/starship/assets/nebula.webp":lT,"../../themes/starship/assets/star-chart.svg":uT,"../../themes/starship/assets/starfield.svg":dT})[`../../themes/starship/assets/${e}`],import.meta.url).href;function pT(){return(0,q.jsxs)(`span`,{className:`hud-corners`,"aria-hidden":`true`,children:[(0,q.jsx)(`i`,{className:`hud-corner hud-corner--tl`}),(0,q.jsx)(`i`,{className:`hud-corner hud-corner--tr`}),(0,q.jsx)(`i`,{className:`hud-corner hud-corner--bl`}),(0,q.jsx)(`i`,{className:`hud-corner hud-corner--br`})]})}function mT({children:e}){let t=tC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent starship-computer`,children:[(0,q.jsxs)(`p`,{className:`starship-voice`,children:[(0,q.jsx)(`img`,{src:fT(`computer.svg`),alt:``,width:24,height:24,loading:`lazy`,decoding:`async`}),t(`agent`,`Agent`)]}),e]})}var hT={Panel:({children:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(pT,{}),e]}),Header:({children:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(pT,{}),e]}),ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(mT,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art starship-empty`,children:[(0,q.jsx)(`img`,{src:fT(`empty-sector.webp`),alt:``,width:240,height:160,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art starship-jump`,role:`status`,children:[(0,q.jsx)(`img`,{src:fT(`lightspeed.svg`),alt:``,width:240,height:120,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e})]})},gT={Card:({children:e})=>e,Panel:({children:e})=>e,Avatar:kS,ChatMessage:({from:e,children:t})=>(0,q.jsx)(`div`,{className:`bubble bubble--${e}`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty`,children:[(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsx)(`p`,{className:`skin-loading`,role:`status`,children:e}),Header:({children:e})=>e},_T={crate:MS,harvest:CC,starship:hT,realm:qw,sprawl:iT,frontier:aC,overworld:WC},vT=e=>({...gT,..._T[e]}),yT=(0,v.createContext)(gT),bT=yT.Provider,xT=()=>(0,v.useContext)(yT),ST=new URL(`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+CjwhLS0gVG9pbCBVSSdzIG1hcmsgaW4gYW55IHRoZW1lIHRoYXQgYnJpbmdzIG5vbmUgb2YgaXRzIG93biwgc3VjaCBhcyBvbmUgZnJvbSB0aGUgdXNlcidzIGZvbGRlcjogdGhlIHN0YW5kYXJkIGJhZGdlLCB0aGUgc2l0ZSdzIGZhdmljb24uIC0tPgo8cGF0aCBkPSJNMTggNkg0Mkw1OCAyMlY0NkExMiAxMiAwIDAgMSA0NiA1OEgxOEExMiAxMiAwIDAgMSA2IDQ2VjE4QTEyIDEyIDA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dHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0zMS44IDQwaDYuMiIgc3Ryb2tlPSIjYjMyNjFlIiBzdHJva2Utd2lkdGg9IjMuMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjwvZz4KPC9zdmc+Cg==`,``+import.meta.url).href};function wT(e,t=`light`){let n=CT[e];return n?typeof n==`string`?n:n[t]:ST}function TT(e,t=`light`,n=document){let r=n.querySelector(`link[rel="icon"]`);r||(r=n.createElement(`link`),r.rel=`icon`,n.head.append(r)),r.type=`image/svg+xml`,r.href=wT(e,t)}var ET=[`system`,`light`,`dark`],DT=`toil-ui.theme`;function OT(){try{let e=JSON.parse(localStorage.getItem(DT)??`{}`);return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}catch{return{}}}function kT(e,t){return e===`off`?!1:e===`on`||typeof t!=`boolean`||t}function AT(e){let t=new URLSearchParams(e),n=OT();return{theme:[t.get(`theme`),n.theme].find(e=>Qm.some(t=>t.name===e))??`crate`,scheme:[t.get(`scheme`),n.scheme].find(e=>ET.includes(e))??`system`,wording:kT(t.get(`wording`),n.wording),voice:kT(t.get(`voice`),n.voice)}}function jT(e,t){return t.fromAddress||!Qm.some(t=>t.name===e.current)?null:e.source===`env`||e.source===`file`&&!t.savedBeforeSetting?e.current:null}function MT(e){let t=new URLSearchParams(e).get(`theme`),n=OT();return{fromAddress:Qm.some(e=>e.name===t),savedBeforeSetting:typeof n.theme==`string`&&n.synced!==!0}}function NT(e=null){let[t,n]=(0,v.useState)(()=>AT(window.location.search)),[r]=(0,v.useState)(()=>MT(window.location.search)),i=(0,v.useRef)(OT().synced===!0),a=(0,v.useRef)(!1),[o,s]=(0,v.useState)(null),c=e!==null&&e.disabled===null;(0,v.useEffect)(()=>{if(!e||e.disabled!==null)return;let t=!0;return e.run(`theme list`,{}).then(e=>{if(!t)return;if(!e.ok){console.warn(`Toil UI couldn't read toil's theme setting (${e.error.code}): ${e.error.message}`);return}if(a.current)return;let i=jT(e.data,r);i&&n(e=>e.theme===i?e:{...e,theme:i})},e=>console.warn(`Toil UI couldn't read toil's theme setting:`,e)),()=>{t=!1}},[e,r]),(0,v.useEffect)(()=>{th(t.theme),document.documentElement.dataset.theme=t.theme,document.documentElement.dataset.scheme=t.scheme;try{localStorage.setItem(DT,JSON.stringify({...t,...i.current?{synced:!0}:{}}))}catch{}let e=window.matchMedia?.(`(prefers-color-scheme: dark)`),n=()=>TT(t.theme,t.scheme===`system`?e?.matches?`dark`:`light`:t.scheme);return n(),e?.addEventListener(`change`,n),()=>e?.removeEventListener(`change`,n)},[t]);let l=t=>{a.current=!0,c&&(i.current=!0),n(e=>({...e,theme:t})),c&&e.run(`theme set`,{name:t}).then(e=>{if(!e.ok)return s(`Toil didn't save the theme: ${[e.error.message,e.error.fix].filter(Boolean).join(` `)}`);let t=e.meta.warnings?.find(e=>e.code===`OVERRIDDEN_BY_ENV`);s(t?`Saved to toil's config, but ${t.message}`:null)},e=>s(`Toil didn't save the theme: ${e instanceof Error?e.message:String(e)}`))};return{...t,saveError:o,setTheme:l,setScheme:e=>n(t=>({...t,scheme:e})),setWording:e=>n(t=>({...t,wording:e})),setVoice:e=>n(t=>({...t,voice:e}))}}var PT=1500,FT=`a scripted preview, not a model`,IT=`No agent is set up in this Toil UI, so nobody can answer yet. Toil UI reasons with the subscription you already have, through one of three adapters: Claude (the Claude Agent SDK, @anthropic-ai/claude-agent-sdk), GitHub Copilot (@github/copilot-sdk) or Codex (@openai/codex-sdk).`,LT=`Press Install for the one your organization approves under Settings, Agent, with its CLI on PATH, and choose it there, or pick an installed one for this chat from Answered by, above. The dashboards work without one, and toil-ui --sample shows the scripted agent.`,RT=`analyze`,zT=/\[\[([^\]]+)\]\]/g;function BT(e){let t=new Set;for(let n of e)for(let e of n.text.matchAll(zT))t.add(e[1]);return[...t]}function VT(e){let t=[],n=0;for(let r of e.matchAll(zT))r.index>n&&t.push({text:e.slice(n,r.index)}),t.push({cite:r[1]}),n=r.index+r[0].length;return n<e.length&&t.push({text:e.slice(n)}),t}function HT({id:e,withTitle:t=!1}){let{byId:n,prById:r,dossier:i}=J(),a=n.get(e),o=a?void 0:r?.get(e);return o?(0,q.jsx)(UT,{change:o,withTitle:t}):a?(0,q.jsxs)(`a`,{href:xg(i.name,e),className:`item-link`,children:[(0,q.jsxs)(`span`,{className:`key`,children:[(0,q.jsx)(`span`,{className:`source`,children:mg(a.source.area)}),` `,hg(a)]}),t&&(0,q.jsxs)(`span`,{className:`title`,children:[` `,a.title]})]}):(0,q.jsx)(`code`,{className:`missing`,children:e})}function UT({change:e,withTitle:t=!1}){let n=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`span`,{className:`key`,children:[(0,q.jsx)(`span`,{className:`source`,children:mg(e.source.area)}),` `,Fg(e.id)]}),t&&(0,q.jsxs)(`span`,{className:`title`,children:[` `,e.title]})]});return e.url?(0,q.jsx)(`a`,{href:e.url,className:`item-link`,children:n}):(0,q.jsx)(`span`,{className:`item-link`,children:n})}function WT({text:e,chips:t=!1}){return(0,q.jsx)(q.Fragment,{children:VT(e).map((e,n)=>`cite`in e?t?(0,q.jsx)(qT,{id:e.cite,detail:!0},n):(0,q.jsx)(HT,{id:e.cite},n):(0,q.jsx)(`span`,{children:e.text},n))})}var GT=e=>e.charAt(0)+e.slice(1).toLowerCase().replace(/_/g,` `);function KT(e,t,n){return e?[`${JT(e,n)}, ${e.status??Ig[e.statusCategory]}${e.status&&e.status.toLowerCase()!==Ig[e.statusCategory].toLowerCase()?` (${Ig[e.statusCategory]})`:``}`,`Assignee: ${yg(e.assignee)}`,`Estimate: ${Lg(e)}`,...e.iteration?.name?[`Sprint: ${e.iteration.name}`]:[],...e.updated?[`Updated ${Y(e.updated)}`]:[]]:t?[`Pull request in ${t.repo}, ${GT(t.state)}`,`Author: ${yg(t.author)}`,...t.checks?[`Checks: ${GT(t.checks)}`]:[],...t.workItems.length?[`Carries ${t.workItems.length} work ${t.workItems.length===1?`item`:`items`}`]:[]]:[]}function qT({id:e,detail:t=!1}){let{byId:n,prById:r,dossier:i}=J(),a=n.get(e),o=a?void 0:r?.get(e);if(!a&&!o)return(0,q.jsx)(`code`,{className:`missing`,children:e});let s=a?`${mg(a.source.area)} ${hg(a)}`:Fg(e),c=a?a.title:o.title,l=a?a.status??Ig[a.statusCategory]:GT(o.state),u=a?a.statusCategory.toLowerCase():`pr`,d=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`ticket-chip__key`,children:s}),` `,(0,q.jsx)(`span`,{className:`ticket-chip__title`,children:c}),(0,q.jsx)(`span`,{className:`sr-only`,children:`, `}),(0,q.jsx)(`span`,{className:`ticket-chip__status ticket-chip__status--${u}`,children:l})]}),f=`${s} ${c}, ${l}`,p=a?xg(i.name,e):o.url;return t&&p?(0,q.jsxs)(om,{delay:300,closeDelay:150,children:[(0,q.jsx)(ga,{className:`ticket-chip ticket-chip--cite`,href:p,"data-truncate":``,"data-cite":e,children:d}),(0,q.jsxs)(sm,{className:`cite-tooltip`,offset:6,children:[(0,q.jsxs)(`strong`,{className:`cite-tooltip__title`,children:[s,` `,c]}),KT(a,o).map(e=>(0,q.jsx)(`span`,{className:`cite-tooltip__line`,children:e},e))]})]}):p?(0,q.jsx)(`a`,{className:`ticket-chip`,href:p,title:f,"data-truncate":``,children:d}):(0,q.jsx)(`span`,{className:`ticket-chip`,title:f,"data-truncate":``,children:d})}function JT(e,t){let n=e.type.charAt(0)+e.type.slice(1).toLowerCase(),r=e.typeName&&e.typeName.toLowerCase()!==n.toLowerCase()?`${e.typeName} (${n})`:n;return t?.terms?.epic&&e.type===`EPIC`?eC(t,`epic`,e.typeName??n):r}var YT=(...e)=>e.filter(Boolean).join(` `);function XT({as:e,gap:t=`md`,className:n,...r}){return(0,q.jsx)(e??`div`,{className:YT(`l-stack`,n),"data-gap":t,...r})}function ZT({as:e,gap:t=`sm`,className:n,...r}){return(0,q.jsx)(e??`div`,{className:YT(`l-cluster`,n),"data-gap":t,...r})}function QT({as:e,min:t=`md`,className:n,...r}){return(0,q.jsx)(e??`ul`,{className:YT(`l-card-grid`,n),"data-min":t,...r})}function Q({as:e,className:t,...n}){return(0,q.jsx)(e??`article`,{className:YT(`l-card`,t),"data-card":``,...n})}function $T(){let e=(0,v.useRef)(null),[t,n]=(0,v.useState)({start:!1,end:!1}),r=(0,v.useCallback)(()=>{let t=e.current;if(!t)return;let r=t.scrollLeft>1,i=t.scrollLeft+t.clientWidth<t.scrollWidth-1;n(e=>e.start===r&&e.end===i?e:{start:r,end:i})},[]);return(0,v.useEffect)(()=>{let t=e.current;if(!t)return;r(),t.addEventListener(`scroll`,r,{passive:!0});let n=typeof ResizeObserver==`function`?new ResizeObserver(r):null;return n?.observe(t),t.firstElementChild&&n?.observe(t.firstElementChild),()=>{t.removeEventListener(`scroll`,r),n?.disconnect()}},[r]),{ref:e,edges:t,overflowing:t.start||t.end}}function eE({label:e,className:t,children:n,hint:r=`Scroll sideways for more.`}){let{ref:i,edges:a,overflowing:o}=$T(),s=(0,v.useId)();return(0,q.jsxs)(`div`,{className:YT(`l-scroll`,t),"data-more-start":a.start||void 0,"data-more-end":a.end||void 0,children:[(0,q.jsx)(`div`,{ref:i,className:`l-scroll__body`,"data-scroller":``,role:`region`,"aria-label":e,tabIndex:o?0:void 0,"aria-describedby":o?s:void 0,children:n}),o&&(0,q.jsx)(`span`,{id:s,className:`sr-only`,children:r})]})}function tE({label:e,caption:t,columns:n,rows:r,rowKey:i,wide:a=!1,className:o}){return(0,q.jsx)(`div`,{className:YT(`l-table`,o),"data-wide":a||void 0,children:(0,q.jsx)(eE,{label:e,hint:`Scroll sideways for more columns.`,children:(0,q.jsxs)(`table`,{role:`table`,children:[t&&(0,q.jsx)(`caption`,{className:`sr-only`,children:t}),(0,q.jsx)(`thead`,{role:`rowgroup`,children:(0,q.jsx)(`tr`,{role:`row`,children:n.map((e,t)=>(0,q.jsx)(`th`,{role:`columnheader`,scope:`col`,children:e.header},t))})}),(0,q.jsx)(`tbody`,{role:`rowgroup`,children:r.map(e=>(0,q.jsx)(`tr`,{role:`row`,children:n.map((t,n)=>{let r=t.rowHeader?`th`:`td`;return(0,q.jsxs)(r,{role:t.rowHeader?`rowheader`:`cell`,scope:t.rowHeader?`row`:void 0,children:[(0,q.jsx)(`span`,{className:`l-table__label`,"aria-hidden":`true`,children:t.label}),(0,q.jsx)(`span`,{className:`l-table__value`,children:t.cell(e)})]},n)})},i(e)))})]})})})}function nE(e){let t=e.replace(/[/\\]+$/,``).search(/[/\\][^/\\]*$/),n=t>0&&e.length-t<=40?t:Math.max(0,e.length-18);return[e.slice(0,n),e.slice(n)]}function rE({value:e,what:t}){let[n,r]=(0,v.useState)(null);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`button`,{type:`button`,className:`btn btn--small l-copy`,onClick:async()=>{try{await navigator.clipboard.writeText(e),r(!0)}catch{r(!1)}},"aria-label":`Copy ${t}`,children:`Copy`}),(0,q.jsx)(`span`,{role:`status`,className:`sr-only`,children:n===null?``:n?`Copied ${t}.`:`This browser wouldn't copy; select the ${t} instead.`})]})}function iE({value:e,what:t=`path`,copy:n=!0}){let[r,i]=nE(e);return(0,q.jsxs)(`span`,{className:`l-path`,children:[(0,q.jsxs)(`code`,{className:`l-path__text`,title:e,"data-truncate":``,children:[(0,q.jsx)(`span`,{className:`l-path__head`,children:r}),(0,q.jsx)(`span`,{className:`l-path__tail`,children:i})]}),n&&(0,q.jsx)(rE,{value:e,what:t})]})}function aE({value:e,what:t=`URL`,copy:n=!0}){return(0,q.jsx)(iE,{value:e,what:t,copy:n})}function oE(e){let[t,n]=(0,v.useState)(()=>typeof window.matchMedia==`function`&&window.matchMedia(e).matches);return(0,v.useEffect)(()=>{if(typeof window.matchMedia!=`function`)return;let t=window.matchMedia(e),r=()=>n(t.matches);return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}var sE=new Map([[`jira issue create`,{issueType:`--type`}],[`jira-cloud issue create`,{issueType:`--type`}]]),cE=(e,t)=>sE.get(e)?.[t]??`--${t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`,lE={posix:`bash/zsh`,powershell:`PowerShell`},uE=/['\u2018\u2019\u201A\u201B]/g,dE=/[\r\n\u0085\u2028\u2029\0]/,fE=/[&|<>^%"]/;function pE(e,t){if(dE.test(e))return`it holds a line break`;let n=t===`powershell`?fE.exec(e)?.[0]:void 0;return n?`it holds ${n}, which cmd.exe acts on when PowerShell runs npm's toil.cmd shim`:null}function mE(e,t){return pE(e,t)?null:t===`posix`?`'${e.replace(/'/g,`'\\''`)}'`:`'${e.replace(uE,e=>e+e)}'`}var hE=new Set([`ado work-item create`,`ado work-item update`,`alation document create`,`alation document update`,`jira issue create`,`jira issue update`,`jira-cloud issue create`,`jira-cloud issue update`,`splitio flag update`,`splitio flag toggle-many`]),$=(e,...t)=>t.map(t=>[t,e]),gE=new Map([...$([`app`,`hash`],`contrast library get`),...$([`app`,`trace`],`contrast finding get`),...$([`app`],`contrast app findings`,`contrast app libraries`),...$([`buildId`],`saucelabs build get`,`saucelabs build jobs`),...$([`commentId`],`github pr delete-comment`,`github pr delete-review-comment`),...$([`commit`],`ado commit status`,`bitbucket commit status`,`bitbucket-cloud commit get`,`bitbucket-cloud commit status`),...$([`deviceId`],`saucelabs device get`),...$([`fileKeyOrUrl`],`figma file comments`,`figma file get`,`figma file versions`),...$([`flag`],`splitio flag archive`,`splitio flag get`,`splitio flag kill`,`splitio flag restore`,`splitio flag set-default`,`splitio flag set-rule`,`splitio flag toggle`,`splitio flag update`),...$([`id`,`attachmentId`],`ado work-item download`),...$([`id`,`commentId`],`bitbucket pr delete-comment`,`bitbucket pr reply`,`bitbucket pr resolve`,`bitbucket-cloud pr delete-comment`,`bitbucket-cloud pr reply`,`bitbucket-cloud pr resolve`),...$([`id`,`threadId`,`commentId`],`ado pr delete-comment`),...$([`id`,`threadId`],`ado pr reply`,`ado pr resolve`,`ado-cloud pr reply`,`ado-cloud pr resolve`),...$([`id`],`ado pipeline get`,`ado pipeline run`,`ado pr abandon`,`ado pr approve`,`ado pr builds`,`ado pr comment`,`ado pr comment-inline`,`ado pr comments`,`ado pr diff`,`ado pr files`,`ado pr get`,`ado pr merge`,`ado pr reviewers`,`ado pr unapprove`,`ado pr update`,`ado pr wait-for-author`,`ado run cancel`,`ado run get`,`ado run logs`,`ado work-item assign`,`ado work-item attach`,`ado work-item attachments`,`ado work-item comment`,`ado work-item comments`,`ado work-item get`,`ado work-item get-many`,`ado work-item history`,`ado work-item link`,`ado work-item tag`,`ado work-item transition`,`ado work-item untag`,`ado work-item update`,`ado-cloud backlog items`,`ado-cloud board get`,`ado-cloud pr abandon`,`ado-cloud pr approve`,`ado-cloud pr comment`,`ado-cloud pr comment-inline`,`ado-cloud pr comments`,`ado-cloud pr get`,`ado-cloud pr merge`,`ado-cloud pr reviewers`,`ado-cloud pr threads`,`ado-cloud pr unapprove`,`ado-cloud pr update`,`ado-cloud pr wait-for-author`,`ado-cloud sprint items`,`ado-cloud work-item comment`,`ado-cloud work-item comments`,`ado-cloud work-item get`,`ado-cloud work-item get-many`,`ado-cloud work-item history`,`ado-cloud work-item transition`,`ado-cloud work-item update`,`alation column get`,`alation datasource get`,`alation document get`,`alation document update`,`alation folder get`,`alation job get`,`alation schema get`,`alation table get`,`bitbucket pr add-reviewer`,`bitbucket pr approve`,`bitbucket pr builds`,`bitbucket pr comment`,`bitbucket pr comment-inline`,`bitbucket pr comments`,`bitbucket pr decline`,`bitbucket pr diff`,`bitbucket pr files`,`bitbucket pr get`,`bitbucket pr merge`,`bitbucket pr needs-work`,`bitbucket pr reviewers`,`bitbucket pr unapprove`,`bitbucket pr update`,`bitbucket-cloud pr approve`,`bitbucket-cloud pr builds`,`bitbucket-cloud pr comment`,`bitbucket-cloud pr comment-inline`,`bitbucket-cloud pr comments`,`bitbucket-cloud pr decline`,`bitbucket-cloud pr diff`,`bitbucket-cloud pr files`,`bitbucket-cloud pr get`,`bitbucket-cloud pr merge`,`bitbucket-cloud pr request-changes`,`bitbucket-cloud pr reviewers`,`bitbucket-cloud pr unapprove`,`bitbucket-cloud pr update`,`checkmarx project get`,`checkmarx scan get`,`checkmarx scan stats`,`confluence attachment delete`,`confluence attachment download`,`confluence page attach`,`confluence page attachments`,`confluence page children`,`confluence page comment`,`confluence page comments`,`confluence page delete`,`confluence page get`,`confluence page history`,`confluence page label`,`confluence page labels`,`confluence page unlabel`,`confluence page update`,`confluence-cloud attachment delete`,`confluence-cloud attachment download`,`confluence-cloud page attach`,`confluence-cloud page attachments`,`confluence-cloud page children`,`confluence-cloud page comment`,`confluence-cloud page comments`,`confluence-cloud page delete`,`confluence-cloud page get`,`confluence-cloud page history`,`confluence-cloud page label`,`confluence-cloud page labels`,`confluence-cloud page unlabel`,`confluence-cloud page update`,`dynatrace entity get`,`dynatrace problem get`,`dynatrace trace get`,`kibana dashboard export`,`kibana rule get`,`sde project get`,`splitio change-request get`),...$([`index`],`elasticsearch index count`,`elasticsearch index search`),...$([`jobId`],`saucelabs job assets`,`saucelabs job build`,`saucelabs job delete`,`saucelabs job get`,`saucelabs job stop`,`saucelabs job update`,`saucelabs rdc-job delete`,`saucelabs rdc-job get`,`saucelabs rdc-job stop`,`saucelabs rdc-job update`),...$([`key`,`attachmentId`],`jira issue download`,`jira-cloud issue download`),...$([`key`],`confluence space get`,`confluence-cloud space get`,`jira issue assign`,`jira issue attach`,`jira issue attachments`,`jira issue comment`,`jira issue comments`,`jira issue get`,`jira issue history`,`jira issue label`,`jira issue link`,`jira issue log-work`,`jira issue set-sprint`,`jira issue transition`,`jira issue transitions`,`jira issue unlabel`,`jira issue update`,`jira-cloud issue assign`,`jira-cloud issue attach`,`jira-cloud issue attachments`,`jira-cloud issue comment`,`jira-cloud issue comments`,`jira-cloud issue get`,`jira-cloud issue history`,`jira-cloud issue label`,`jira-cloud issue link`,`jira-cloud issue log-work`,`jira-cloud issue set-sprint`,`jira-cloud issue transition`,`jira-cloud issue transitions`,`jira-cloud issue unlabel`,`jira-cloud issue update`),...$([`method`,`path`],`ado-cloud api`,`bitbucket-cloud api`,`jira api`),...$([`name`,`number`],`artifactory build get`,`jenkins run get`,`jenkins run logs`),...$([`name`],`ado project get`,`ado-cloud project get`,`artifactory build runs`,`jenkins pipeline get`,`jenkins pipeline run`,`jenkins pipeline runs`),...$([`number`,`commentId`],`github pr reply`),...$([`number`],`github issue assign`,`github issue get`,`github issue history`,`github issue label`,`github issue unassign`,`github issue unlabel`,`github pr add-reviewers`,`github pr approve`,`github pr close`,`github pr comment`,`github pr comment-inline`,`github pr comments`,`github pr diff`,`github pr disable-auto-merge`,`github pr draft`,`github pr enable-auto-merge`,`github pr enqueue`,`github pr files`,`github pr get`,`github pr merge`,`github pr ready`,`github pr remove-reviewers`,`github pr reopen`,`github pr request-changes`,`github pr review-comments`,`github pr reviewers`,`github pr reviews`,`github pr status`,`github pr threads`,`github pr update`),...$([`path`],`bitbucket-cloud file get`,`bitbucket-cloud file list`,`github repo file`),...$([`pipeline`,`step`],`bitbucket-cloud pipeline logs`),...$([`pipeline`],`bitbucket-cloud pipeline get`,`bitbucket-cloud pipeline steps`),...$([`plugin`],`skills marketplace disable`,`skills marketplace enable`,`skills marketplace sync`),...$([`pod`],`openshift pod logs`),...$([`project`],`github project fields`,`github project items`,`jira-cloud project get`),...$([`projectId`],`figma project files`),...$([`publicId`],`sonatypeiq application get`),...$([`query`],`alation search`),...$([`ref`],`github commit checks`,`github commit status`),...$([`repo`,`path`,`keyvals`],`artifactory artifact set-properties`),...$([`repo`,`path`],`artifactory artifact get`,`artifactory artifact properties`),...$([`repository`],`logscale repository query`),...$([`sessionId`,`app`],`saucelabs session install-app`),...$([`sessionId`,`command`],`saucelabs session shell`),...$([`sessionId`,`url`],`saucelabs session open-url`),...$([`sessionId`],`saucelabs session appium`,`saucelabs session delete`,`saucelabs session end-test`,`saucelabs session get`,`saucelabs session installations`,`saucelabs session launch-app`,`saucelabs session network`,`saucelabs session network-profiles`,`saucelabs session settings`,`saucelabs session start-test`,`saucelabs session tests`,`saucelabs session uninstall-app`),...$([`sql`],`db execute`,`db lint`,`db query`),...$([`table`],`db table describe`,`db table preview`),...$([`task`],`sde task get`),...$([`teamId`],`saucelabs team get`,`saucelabs team members`),...$([`threadId`],`github pr resolve`),...$([`tunnelId`],`saucelabs tunnel get`,`saucelabs tunnel jobs`,`saucelabs tunnel stop`)]),_E=e=>e.replace(/[ -]/g,`_`);function vE(e,t){return!e.command||!e.input?{line:null,reason:`toil has no command for this change.`}:xE(e.command,e.input,t,!0)}function yE(e,t){return xE(e.command,e.input,t,!1)}function bE(e,t,n){let r=[];hE.has(e)&&r.push(`put the input in a file and pass it with toil ${e}'s --input-file`),t&&r.push(`switch this card to bash/zsh, where single quotes carry it`),r.push(`apply it over MCP with the tool ${n} and the input below`);let i=r.length===1?r[0]:`${r.slice(0,-1).join(`, `)}, or ${r.at(-1)}`;return`${i.charAt(0).toUpperCase()}${i.slice(1)}.`}function xE(e,t,n,r){let i=gE.get(e)??[],a=Object.keys(t).filter(e=>!i.includes(e)).sort((e,t)=>e===`dossier`?-1:+(t===`dossier`)),o=(i,a,o)=>{let s={tool:_E(e),input:r?{...t,allowWrite:!0}:t};return{line:null,reason:`The ${i} value can't be passed safely on a ${lE[n]} command line: ${a}. ${bE(e,o,s.tool)}`,mcp:s}},s=[];for(let r of[...i.filter(e=>e in t),...a]){let a=t[r],c=i.includes(r),l=cE(e,r),u=c?`<${r}>`:l;for(let e of Array.isArray(a)?a:[a]){if(e===!0&&!c){s.push(l);continue}let t=String(e),r=pE(t,n);if(r)return o(u,r,n===`powershell`&&!r.includes(`line break`));if(c&&t.startsWith(`-`))return o(u,`it starts with -, so toil would read it as a flag`,!1);c?s.push(mE(t,n)):s.push(t.startsWith(`-`)?mE(`${l}=${t}`,n):`${l} ${mE(t,n)}`)}}return{line:`toil ${e} ${s.join(` `)}${r?` --allow-write`:``}`,reason:null}}function SE(e=typeof navigator>`u`?void 0:navigator){let t=e?.userAgentData?.platform||e?.platform||``;return/^win/i.test(t)?`powershell`:`posix`}var CE=`toil-ui.shell`,wE=new Set,TE=null;function EE(){if(TE)return TE;try{let e=localStorage.getItem(CE);if(e===`posix`||e===`powershell`)return TE=e}catch{}return TE=SE()}function DE(e){TE=e;try{localStorage.setItem(CE,e)}catch{}for(let e of wE)e()}var OE=e=>(wE.add(e),()=>wE.delete(e)),kE=()=>(0,v.useSyncExternalStore)(OE,EE,EE);function AE({proposal:e,onDismiss:t,kind:n=`Proposed change, not applied`,actions:r,children:i}){let[a,o]=(0,v.useState)(null),s=kE(),{line:c,reason:l,mcp:u}=vE(e,s),d=e.hint?{text:e.hint.text,...yE(e.hint,s)}:null,f=!!(e.command||e.hint);return(0,q.jsxs)(`article`,{className:`proposal`,"aria-label":`Proposal: ${e.title}`,children:[(0,q.jsx)(`p`,{className:`proposal-kind`,children:n}),(0,q.jsx)(`h3`,{children:e.title}),(0,q.jsx)(`p`,{children:(0,q.jsx)(WT,{text:e.reason,chips:e.from===`agent`})}),f&&(0,q.jsx)(Bf,{className:`shells`,orientation:`horizontal`,value:s,onChange:e=>DE(e),"aria-label":`Show the command for`,children:[`powershell`,`posix`].map(e=>(0,q.jsx)(Vf,{value:e,className:`shell-choice`,children:lE[e]},e))}),c?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`note`,children:[`Apply it yourself through toil's write gate: `,(0,q.jsx)(Fw,{topic:`proposal`})]}),(0,q.jsx)(`pre`,{className:`command`,children:(0,q.jsx)(`code`,{children:c})})]}):e.command&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`failure`,children:l}),u&&(0,q.jsx)(`pre`,{className:`command`,"aria-label":`MCP call to ${u.tool}`,children:(0,q.jsx)(`code`,{children:JSON.stringify({tool:u.tool,input:u.input},null,2)})})]}),e.note&&(0,q.jsx)(`p`,{className:`note`,children:e.note}),d&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`note`,children:d.text}),d.line?(0,q.jsx)(`pre`,{className:`command`,children:(0,q.jsx)(`code`,{children:d.line})}):(0,q.jsx)(`p`,{className:`failure`,children:d.reason})]}),i,(0,q.jsxs)(`div`,{className:`proposal-actions`,children:[r,c&&(0,q.jsx)(W,{className:`btn`,onPress:async()=>{try{await navigator.clipboard.writeText(c),o(`yes`)}catch{o(`no`)}},children:`Copy command`}),t&&(0,q.jsx)(W,{className:`btn btn--quiet`,onPress:t,children:`Dismiss`}),(0,q.jsx)(`span`,{className:`note`,role:`status`,children:a===`yes`?`Copied.`:a===`no`?`Couldn't copy: select the command instead.`:``})]})]})}var jE=120,ME=/^(what|whats|what's|why|how|who|whose|when|where|which)\b/i;function NE(e){let t=e.trim();return t.endsWith(`?`)||ME.test(t)}var PE=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function FE(e,t){for(let n of t){if(e.includes(n.id))return n;let t=hg(n),r=/^\d+$/.test(t)?`#${t}\\b`:`(?<![\\w#-])${PE(t)}(?![\\w-])`;if(new RegExp(r,`i`).test(e))return n}return null}var IE=new WeakMap;function LE(e,t){let n=IE.get(e);return n||IE.set(e,n=new Yx(e.filter(e=>e.statusCategory!==`DONE`))),n.query(t,{limit:3,threshold:Sx}).matches}function RE(e,t,n=new Set){for(let r of e)if(!(!r.trim()||n.has(r)||NE(r)||FE(r,t)))return{prompt:r,matches:LE(t,r)};return null}function zE(e){let t=e.replace(/\s+/g,` `).trim();return t.length<=jE?t:`${t.slice(0,119).trimEnd()}…`}var BE=e=>`Filed from a Toil UI chat: ${e.replace(/\s+/g,` `).trim()}`;function VE(e,t){let n=new Map;for(let r of e)r.source.area===t&&r.statusCategory!==`DONE`&&r.typeName&&n.set(r.typeName,(n.get(r.typeName)??0)+1);return[...n.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))[0]?.[0]??null}function HE(e){let t=new Map;for(let n of e)n.statusCategory!==`DONE`&&t.set(n.source.area,(t.get(n.source.area)??0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))[0]?.[0]??null}var UE=e=>`To attach the work instead, which writes nothing, name ${e} in the branch and in every commit message.`;function WE(e,t,n){let r=hg(t),i={id:`ticket:${n}:sub:${t.id}`,from:`ticket`,item:t.id,title:`Create a sub-task under ${r}`,reason:`The work reads closest to [[${t.id}]]. ${UE(r)}`},a=zE(e),o=t.source.area;if(o===`jira`||o===`jira-cloud`){let r=o===`jira`?`Sub-task`:`Subtask`;return{...i,command:`${o} issue create`,input:{dossier:n,project:t.source.key.split(`-`)[0],issueType:r,parent:t.source.key,summary:a,description:BE(e)},note:`${r} is Jira's default name for the type; your project may call it something else.`}}if(o===`ado`)return{...i,command:`ado work-item create`,input:{dossier:n,type:`Task`,title:a,description:BE(e),parent:t.source.key},note:null};if(o===`ado-cloud`)return{...i,command:`ado-cloud work-item create`,input:{dossier:n,type:`Task`,title:a,description:BE(e)},note:`ado-cloud work-item create takes no parent: once it exists, link it under ${r} on the board.`};if(o===`github`){let r=/^([^/]+)\/([^#]+)#(\d+)$/.exec(t.source.key);if(r)return{...i,command:`github issue create`,input:{dossier:n,owner:r[1],repo:r[2],title:a,body:`Part of #${r[3]}. ${BE(e)}`},note:`toil has no sub-issue command, so this names its parent in the body; add it as a sub-issue on GitHub if the repository uses them.`}}return{...i,command:null,input:null,note:`toil has no create command for ${o} items.`}}function GE(e,t,n,r){let i=zE(e),a=r?.source.area??HE(t),o={id:`ticket:${n}:new`,from:`ticket`,item:`${n}:new`,title:`Create a new ticket: ${i}`,reason:r?`Not one of the matches: a ticket of its own.`:`No open item shares enough words with the work to be its ticket.`};if(a===`jira`||a===`jira-cloud`)return{...o,command:`${a} issue create`,input:{dossier:n,summary:i,description:BE(e)},note:`The project and issue type come from the dossier and the connection's defaults; add --project or --type where they don't set them.`};if(a===`ado`||a===`ado-cloud`){let r=VE(t,a);return{...o,command:`${a} work-item create`,input:{dossier:n,type:r??`Task`,title:i,description:BE(e)},note:r?`${r} is the type most of the dossier's open ${a} items have; change --type if this is something else.`:`Task is a guess: no open item shows which type the process uses; change --type if it calls it something else.`}}return a===`github`?{...o,command:`github issue create`,input:{dossier:n,title:i,body:BE(e)},note:`The repository comes from the dossier; add --owner and --repo where it names none.`}:{...o,command:null,input:null,note:a?`toil has no create command for ${a} items.`:`The dossier has no open item to say which tracker a new ticket goes on.`}}function KE(e,t,n,r){let i=e.matches.flatMap(e=>t.get(e.id)?[t.get(e.id)]:[]);return[...i.map(t=>WE(e.prompt,t,r)),GE(e.prompt,n,r,i[0]??null)]}function qE({prompts:e}){let{agent:t,byId:n,dossier:r}=J(),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(new Set),u=(0,v.useMemo)(()=>new Set(t.starters(r.name).map(e=>e.label)),[t,r.name]),d=(0,v.useMemo)(()=>RE(e,r.items,u),[e,r.items,u]),f=(0,v.useMemo)(()=>d?KE(d,n,r.items,r.name):[],[d,n,r.items,r.name]);if(!d||o===d.prompt)return null;let p=d.matches[0]?n.get(d.matches[0].id):void 0;return(0,q.jsxs)(`section`,{className:`ticket-banner`,"aria-labelledby":`ticket-banner-title`,children:[(0,q.jsx)(`h3`,{id:`ticket-banner-title`,children:`Not ticketed yet`}),d.matches.length?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{children:[`This work names no ticket. These open items in `,r.name,` read closest to it:`]}),(0,q.jsx)(`ul`,{className:`rows`,children:d.matches.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(HT,{id:e.id,withTitle:!0}),` `,(0,q.jsxs)(`span`,{className:`score`,children:[Math.round(e.score*100),`% alike`]}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,e.why.summary.replace(/\.$/,``),`)`]})]},e.id))}),(0,q.jsxs)(`p`,{className:`note`,children:[`Attach it to one by naming its key in your branch and commits`,p?` (${hg(p)})`:``,`: nothing is written. Or ticket it, as a sub-task under a match or a new ticket.`]})]}):(0,q.jsxs)(`p`,{children:[`This work names no ticket, and no open item in `,r.name,` shares enough words with it to be one: there is no likely ticket. Ticket it as a new one.`]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Matched by shared words, as `,(0,q.jsx)(`code`,{children:`toil util owi similar`}),` scores them, not by meaning. Ticketing it is a proposal for you to apply; nothing is created here.`]}),(0,q.jsxs)(`div`,{className:`ticket-banner__actions`,children:[(0,q.jsx)(W,{className:`btn btn--accent btn--small`,"aria-expanded":i,"aria-controls":`ticket-banner-proposals`,onPress:()=>a(e=>!e),children:i?`Hide`:`Ticket this`}),(0,q.jsx)(W,{className:`btn btn--small`,onPress:()=>s(d.prompt),children:`Not now`})]}),i&&(0,q.jsx)(`div`,{id:`ticket-banner-proposals`,className:`ticket-banner__proposals`,children:f.filter(e=>!c.has(e.id)).map(e=>(0,q.jsx)(AE,{proposal:e,onDismiss:()=>l(t=>new Set(t).add(e.id))},e.id))})]})}var JE={claude:`Claude`,codex:`Codex`,copilot:`GitHub Copilot`},YE=[`inputTokens`,`cachedInputTokens`,`cacheWriteTokens`,`outputTokens`,`premiumRequests`];function XE(e){let t=[e.inputTokens,e.outputTokens,e.cacheWriteTokens,e.inputIncludesCached?void 0:e.cachedInputTokens];if(!(t.every(e=>e===void 0)&&e.cachedInputTokens===void 0))return t.reduce((e,t)=>e+(t??0),0)}var ZE=(e,t)=>e===void 0?t:t===void 0?e:Math.max(e,t);function QE(e,t){let n={...e,...t};for(let r of[...YE,`costUsd`]){let i=ZE(e[r],t[r]);i===void 0?delete n[r]:n[r]=i}return n}function $E(e,t){return t.at>=e.at?QE(e,t):QE(t,e)}function eD(e){let t=new Map;for(let n of e){let e=t.get(n.id);t.set(n.id,e?$E(e,n):n)}return[...t.values()]}function tD(e){let t={reports:0,costUsd:{},plan:!1};for(let n of eD(e)){t.reports++;for(let e of YE)typeof n[e]==`number`&&(t[e]=(t[e]??0)+n[e]);let e=XE(n);e!==void 0&&(t.tokens=(t.tokens??0)+e),typeof n.costUsd==`number`&&n.costSource!==`none`&&(t.costUsd[n.costSource]=(t.costUsd[n.costSource]??0)+n.costUsd),n.plan&&typeof n.costUsd==`number`&&(t.plan=!0)}return t}function nD(e,t){let n=new Map;for(let r of eD(e))n.set(t(r),[...n.get(t(r))??[],r]);return[...n].map(([e,t])=>({key:e,sample:t[0],totals:tD(t)})).sort((e,t)=>(t.totals.tokens??0)-(e.totals.tokens??0)||(e.key<t.key?-1:1))}var rD=e=>e.at.slice(0,10),iD=e=>`${e.adapter}:${e.model??``}`,aD=e=>e.model??`the CLI's default model (not named by the SDK)`;function oD(e){return e<1e3?String(Math.round(e)):e<1e6?`${e<1e4?(e/1e3).toFixed(1).replace(/\.0$/,``):Math.round(e/1e3)}k`:`${(e/1e6).toFixed(1).replace(/\.0$/,``)}M`}function sD(e){return e===0?`$0`:e<.01?`$${e.toFixed(4)}`:e<1?`$${e.toFixed(3)}`:`$${e.toFixed(2)}`}var cD=(e,t)=>e===void 0?`${t} not reported`:`${oD(e)} ${t}`;function lD(e,t){let n=[cD(e.inputTokens,`in`),cD(e.outputTokens,`out`),cD(e.cachedInputTokens,`cached`),cD(e.cacheWriteTokens,`cache write`)];return t===`copilot`?(n.push(e.premiumRequests===void 0?`premium requests not reported`:`${dD(e.premiumRequests)} premium ${e.premiumRequests===1?`request`:`requests`}`),n):(n.push(...uD(e,t)),n)}function uD(e,t){if(t===`copilot`)return[];let n=[];return e.costUsd[`sdk-estimate`]!==void 0&&n.push(`~${sD(e.costUsd[`sdk-estimate`])} (SDK estimate${e.plan?`, API-equivalent: your plan is not billed per token`:``})`),e.costUsd[`your-rates`]!==void 0&&n.push(`~${sD(e.costUsd[`your-rates`])} (computed from your rates)`),n.length||n.push(t===`codex`?`no dollar figure (add your rates under Settings, Agent usage)`:`cost not reported`),n}var dD=e=>String(Math.round(e*100)/100),fD=[{key:`claude.chat`,adapter:`claude`,scope:`chat`,units:[`tokens`,`usd`]},{key:`claude.day`,adapter:`claude`,scope:`day`,units:[`tokens`,`usd`]},{key:`codex.chat`,adapter:`codex`,scope:`chat`,units:[`tokens`,`usd`]},{key:`codex.day`,adapter:`codex`,scope:`day`,units:[`tokens`,`usd`]},{key:`copilot.chat`,adapter:`copilot`,scope:`chat`,units:[`tokens`,`premium-requests`]},{key:`copilot.day`,adapter:`copilot`,scope:`day`,units:[`tokens`,`premium-requests`]}],pD={tokens:`tokens`,usd:`US dollars`,"premium-requests":`premium requests`};function mD(e,t){return t===`usd`?sD(e):`${t===`tokens`?Math.round(e).toLocaleString(`en-US`):dD(e)} ${t===`tokens`?`tokens`:e===1?`premium request`:`premium requests`}`}var hD=[`at`,`day`,`adapter`,`model`,`dossier`,`chatId`,`turn`,`inputTokens`,`cachedInputTokens`,`cacheWriteTokens`,`outputTokens`,`premiumRequests`,`costUsd`,`costSource`,`id`],gD=e=>{if(e==null)return``;let t=String(e),n=/^[=+\-@\t\r]/.test(t)?`'${t}`:t;return/[",\n\r]/.test(n)||n!==t?`"${n.replace(/"/g,`""`)}"`:n};function _D(e){let t=eD(e).sort((e,t)=>e.at<t.at?-1:+(e.at>t.at)),n=[hD.join(`,`)];for(let e of t)n.push(hD.map(t=>gD(t===`day`?rD(e):e[t])).join(`,`));return`${n.join(`
27
- `)}\n`}function vD({usage:e}){let t=nD(e.records,iD);return(0,q.jsxs)(`div`,{className:`usage-footer`,role:`group`,"aria-label":`What this answer used`,"data-usage-footer":``,children:[t.length===0?(0,q.jsxs)(`p`,{className:`usage-line`,children:[JE[e.adapter],` reported no usage for this answer.`]}):t.map(t=>(0,q.jsxs)(`p`,{className:`usage-line`,children:[e.sample&&(0,q.jsx)(`span`,{className:`usage-sample`,children:`Sample figures, not from a model. `}),(0,q.jsxs)(`span`,{className:`usage-model`,children:[JE[t.sample.adapter],`, `,aD(t.sample),`:`]}),` `,lD(t.totals,t.sample.adapter).join(` · `)]},t.key)),e.quota&&(0,q.jsxs)(`p`,{className:`usage-line`,children:[e.quota.unlimited?`Your Copilot premium requests are unlimited`:e.quota.remaining===null?`Copilot gave no count of premium requests left`:`${e.quota.remaining} premium requests left this period${e.quota.entitlement===null?``:` of ${e.quota.entitlement}`}${e.quota.resetDate?`, until ${e.quota.resetDate.slice(0,10)}`:``}`,` `,`(experimental, from the Copilot SDK's account.getQuota).`]}),e.notices.map((e,t)=>(0,q.jsxs)(`p`,{className:`usage-notice`,role:`status`,children:[e,` `,(0,q.jsx)(zw,{href:Pg,label:`Edit the usage caps`})]},t))]})}function yD({usages:e}){if(e.length===0)return null;let t=e.flatMap(e=>e.records),n=nD(t,iD),r=tD(t),i=e[e.length-1],a=e.some(e=>e.sample);return(0,q.jsxs)(`div`,{className:`chat-usage`,"aria-label":`What this chat used`,"data-chat-usage":``,children:[(0,q.jsxs)(`p`,{className:`usage-line`,children:[a&&(0,q.jsx)(`span`,{className:`usage-sample`,children:`Sample figures. `}),`This chat: `,r.tokens===void 0?`tokens not reported`:`${oD(r.tokens)} tokens`,n.length>1?`, on ${n.length} models`:``,`.`]}),n.map(e=>(0,q.jsxs)(`p`,{className:`usage-line`,children:[(0,q.jsxs)(`span`,{className:`usage-model`,children:[JE[e.sample.adapter],`, `,aD(e.sample),`:`]}),` `,lD(e.totals,e.sample.adapter).join(` · `)]},e.key)),(0,q.jsx)(bD,{usage:i})]})}function bD({usage:e}){let t=(0,v.useId)(),n=e.context;if(!n)return(0,q.jsxs)(`p`,{className:`usage-line`,children:[`Context: not reported by the `,JE[e.adapter],` SDK.`]});let r=Math.min(1,n.used/n.window),i=`${oD(n.used)} of ${oD(n.window)} tokens (${Math.round(r*100)}%)`;return(0,q.jsxs)(`p`,{className:`usage-line context-meter`,children:[(0,q.jsxs)(`span`,{id:t,children:[`Context of the last answer: `,i]}),(0,q.jsx)(`meter`,{min:0,max:n.window,value:Math.min(n.used,n.window),"aria-labelledby":t})]})}function xD(){return(0,q.jsx)(`span`,{className:`stale-chip`,children:`Stale`})}function SD({stale:e,className:t=``}){return(0,q.jsxs)(`p`,{className:`stale-note ${t}`.trim(),"data-stale":``,children:[(0,q.jsx)(xD,{}),` `,(0,q.jsxs)(`span`,{children:[e.text,`.`]})]})}var CD=6e4;function wD({load:e}){let[t,n]=(0,v.useState)(null);return(0,v.useEffect)(()=>{if(!e)return;let t=!0,r=()=>e().then(e=>t&&n(e),()=>void 0);r();let i=setInterval(r,CD);return()=>{t=!1,clearInterval(i)}},[e]),t?.stale?(0,q.jsxs)(`p`,{className:`banner banner--stale`,role:`status`,"data-server-stale":``,children:[(0,q.jsx)(`strong`,{children:`Toil UI is out of date.`}),` `,t.stale,` Running chats and assignments started on the older one. Stop it with Ctrl+C where it runs, then start it again: `,(0,q.jsx)(`code`,{className:`any-break`,children:t.restart})]}):null}var TD=[`refine`,`investigate`,`implement`],ED={claude:`Claude`,copilot:`GitHub Copilot`,codex:`Codex`},DD={refine:{label:`Refine`,does:`Drafts acceptance criteria, suggests an estimate, splits the item into children where it is too big, checks for duplicates, and lists open questions.`,changes:`Nothing directly: every change comes back as a proposal for you to apply.`},investigate:{label:`Investigate`,does:`Researches the item across the dossier's sources (related items, pull requests, builds) and writes a report that cites each one.`,changes:`Nothing. The report is saved with the assignment, and posting it as a comment is a proposal.`},implement:{label:`Implement`,does:`Works the item in a copy of the dossier's repository, on a new local branch, through the adapter's coding runtime and its own sandbox.`,changes:`Only that branch, in a folder of its own, with no network. Pushing it and opening a pull request are proposals.`}},OD={queued:`Queued`,working:`Working`,"needs-you":`Needs you`,done:`Done`,failed:`Failed`};function kD(e,t){return e.startedAt?Math.max(0,Date.parse(e.endedAt??t)-Date.parse(e.startedAt)):null}function AD(e){if(e===null)return`not started`;let t=Math.round(e/1e3);return t<60?`${t} s`:`${Math.floor(t/60)} min ${String(t%60).padStart(2,`0`)} s`}function jD(e){return e.renewedBy?`It was renewed already, as ${e.renewedBy}.`:e.stale?e.stale.restart?e.stale.restart:e.state===`working`?`It is working now, and a renew never interrupts a turn: renew it once it ends.`:e.state===`needs-you`?`It is waiting on you: review its proposals and questions, or mark it reviewed, first.`:e.state===`queued`?`It hasn't started, so it starts on today's instructions anyway.`:null:`Nothing it started on has changed, so it doesn't need renewing.`}var MD=`toil-ui.notify.history`,ND={entries:[],read:0},PD=new Set([`needs-you`,`done`,`failed`,`cap`,`stale`,`sync`,`sync-failed`]);function FD(e){if(!e)return ND;try{let t=JSON.parse(e);return{entries:(Array.isArray(t?.entries)?t.entries:[]).filter(e=>!!e&&typeof e==`object`&&Number.isInteger(e.seq)&&typeof e.id==`string`&&typeof e.at==`string`&&PD.has(e.kind)&&typeof e.title==`string`&&typeof e.line==`string`&&typeof e.href==`string`&&/^#\//.test(e.href)).slice(0,50),read:typeof t?.read==`number`?t.read:0}}catch{return ND}}function ID(e,t){let n=Math.max(e.read,...e.entries.map(e=>e.seq),0),r=new Set(e.entries.map(e=>e.id)),i=[];for(let e of t)r.has(e.id)||(r.add(e.id),i.unshift({...e,seq:++n}));return i.length?{...e,entries:[...i,...e.entries].slice(0,50)}:e}var LD=e=>e.entries.filter(t=>t.seq>e.read).length,RD=e=>({...e,read:Math.max(e.read,...e.entries.map(e=>e.seq),0)});function zD(e=MD){let t,n=ND,r=null,i=new Set,a=()=>{try{return localStorage.getItem(e)}catch{return r}},o=()=>{let e=a();return e!==t&&(t=e,n=FD(e)),n},s=a=>{let o=JSON.stringify(a);r=o;try{localStorage.setItem(e,o)}catch{}t=o,n=a;for(let e of i)e()};return typeof window<`u`&&window.addEventListener(`storage`,t=>{if(t.key===e||t.key===null)for(let e of i)e()}),{get:o,add:e=>{let t=o(),n=ID(t,e);n!==t&&s(n)},markAllRead:()=>s(RD(o())),subscribe:e=>(i.add(e),()=>i.delete(e))}}var BD=zD(),VD=[`needs-you`,`failed`,`cap`,`done`,`stale`],HD={"needs-you":`Needs you`,failed:`Failed`,cap:`Stopped at a usage cap`,done:`Done`,stale:`Gone stale`},UD={browser:!1,states:{"needs-you":!0,failed:!0,cap:!0,done:!1,stale:!0},quiet:null,mine:!1},WD=(e,t,n=`${t}s`)=>`${e===1?`a`:e} ${e===1?t:n}`;function GD(e,t){if(e.kind!==`state`||e.state===e.previous)return null;let n=e.adapter?ED[e.adapter]:`An agent`;return{key:`assignment:${e.id}`,event:e.seq,state:e.state,agent:n,item:e.item,itemTitle:e.itemTitle??null,dossier:e.dossier,href:t.href,mine:t.mine,...KD(e.state,e)}}function KD(e,t){if(e===`needs-you`)return t.stop===`injection`?{notable:`needs-you`,why:`stopped on text in the item that looked like an instruction to it`}:{notable:`needs-you`,why:[t.questions?`asked ${WD(t.questions,`question`)}`:``,t.pending?`${t.pending} ${t.pending===1?`proposal`:`proposals`} to review`:``].filter(Boolean).join(`, `)||`waiting on you`};if(e===`done`)return{notable:`done`,why:`finished`};if(e===`failed`){if(t.stop===`usage`)return{notable:`cap`,why:`stopped at its usage cap`};if(t.stop===`cancelled`)return{notable:null,why:`stopped by a person`};if(t.stop===`time`)return{notable:`failed`,why:`stopped at its time limit`};if(t.stop===`interrupted`)return{notable:`failed`,why:`Toil UI stopped while it ran`};let e=t.message.split(`
28
- `)[0].trim();return{notable:`failed`,why:e?e.length>160?`${e.slice(0,157)}...`:e:`failed`}}return{notable:null,why:e}}var qD=/^([01]?\d|2[0-3]):([0-5]\d)$/;function JD(e,t){if(!e)return!1;let n=e=>{let t=qD.exec(e);return t?Number(t[1])*60+Number(t[2]):null},r=n(e.from),i=n(e.to);if(r===null||i===null||r===i)return!1;let a=t.getHours()*60+t.getMinutes();return r<i?a>=r&&a<i:a>=r||a<i}var YD=(e,t)=>e.notable!==null&&t.states[e.notable]&&(!t.mine||e.mine),XD=4e3,ZD=class{emit;settings;timers;windowMs;held=new Map;timer=null;constructor(e,t,n={set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)},r=XD){this.emit=e,this.settings=t,this.timers=n,this.windowMs=r}push(e,t){let n=this.held.get(e.key);n?n.last=e:this.held.set(e.key,{from:t,last:e}),this.timer===null&&(this.timer=this.timers.set(()=>this.flush(),this.windowMs))}flush(){this.timer!==null&&this.timers.clear(this.timer),this.timer=null;let e=this.settings(),t=[...this.held.values()].filter(t=>t.last.state!==t.from&&YD(t.last,e)).map(e=>e.last);this.held.clear(),t.length&&this.emit(t)}stop(){this.timer!==null&&this.timers.clear(this.timer),this.timer=null,this.held.clear()}},QD={"needs-you":[`needs you`,`need you`],done:[`finished`,`finished`],failed:[`failed`,`failed`],cap:[`stopped at a usage cap`,`stopped at a usage cap`],stale:[`went stale`,`went stale`]},$D=e=>`${e.agent} ${QD[e.notable][0]}${e.item?` on ${e.item}${e.itemTitle?` ${e.itemTitle}`:``}`:` in ${e.dossier}`}: ${e.why}`;function eO(e){let t=e.map($D);if(e.length===1){let n=e[0];return{title:`${n.agent} ${QD[n.notable][0]}`,lines:t}}let n=new Set(e.map(e=>e.notable));if(n.size===1){let r=[...n][0];return{title:`${e.length} ${r===`stale`?`sessions`:`agents`} ${QD[r][1]}`,lines:t}}return{title:`${e.length} agent updates`,lines:t}}function tO(e){if(!e)return structuredClone(UD);try{let t=JSON.parse(e),n={...UD.states};for(let e of VD)typeof t?.states?.[e]==`boolean`&&(n[e]=t.states[e]);let r=t?.quiet,i=r&&typeof r.from==`string`&&typeof r.to==`string`&&qD.test(r.from)&&qD.test(r.to)?{from:r.from,to:r.to}:null;return{browser:t?.browser===!0,states:n,quiet:i,mine:t?.mine===!0}}catch{return structuredClone(UD)}}var nO=`toil-ui.notify`,rO=`toil-ui.notify.mine`,iO=6e4,aO=5e3,oO=e=>{try{return localStorage.getItem(e)}catch{return null}},sO=(e,t)=>{try{localStorage.setItem(e,t)}catch{}},cO=()=>typeof Notification>`u`?`unsupported`:Notification.permission,lO=(0,v.createContext)(null),uO=()=>(0,v.useContext)(lO);function dO(e,t){return{...e,assign:async n=>{let r=await e.assign(n);return t(r.id),r},start:async(n,r)=>{let i=await e.start(n,r);return t(i.id),i},renew:async n=>{let r=await e.renew(n);return t(r.id),r}}}function fO(){let e=(0,v.useRef)(null),t=(0,v.useCallback)(()=>{if(!e.current)try{let t=JSON.parse(oO(rO)??`[]`);e.current=new Set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])}catch{e.current=new Set}return e.current},[]);return{mine:t,mark:(0,v.useCallback)(e=>{let n=t();n.add(e),sO(rO,JSON.stringify([...n].slice(-500)))},[t])}}function pO({assignments:e,dossier:t,mine:n,children:r}){let[i,a]=(0,v.useState)(()=>tO(oO(nO))),[o,s]=(0,v.useState)(cO),[c,l]=(0,v.useState)([]),u=(0,v.useRef)(i);u.current=i;let d=(0,v.useRef)(0),f=(0,v.useRef)(0),p=(0,v.useRef)(null),m=(0,v.useCallback)(e=>{let t=u.current,{title:n,lines:r}=eO(e);BD.add(e.map(e=>({id:`${e.key}:${e.state}${e.event===void 0?``:`:${e.event}`}`,at:new Date().toISOString(),kind:e.notable,title:eO([e]).title,line:hO(e),href:e.href})));let i=typeof document<`u`&&document.visibilityState===`hidden`;if(i&&(p.current===null&&(p.current=document.title),f.current+=e.length,document.title=`(${f.current}) ${p.current}`),!JD(t.quiet,new Date)&&(l(t=>[{id:d.current++,title:n,changes:e},...t].slice(0,3)),i&&t.browser&&cO()===`granted`))try{new Notification(n,{body:r.join(`
29
- `),tag:`toil-ui`})}catch{}},[]),h=(0,v.useMemo)(()=>new ZD(m,()=>u.current),[m]);return(0,v.useEffect)(()=>()=>h.stop(),[h]),(0,v.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&p.current!==null&&(document.title=p.current,p.current=null,f.current=0)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),(0,v.useEffect)(()=>{if(!e?.events||e.disabled)return;let t=new AbortController,r=`latest`,i,a=()=>{e.events(r,e=>{r=e.seq;let t=GD(e,{mine:n().has(e.id),href:`${bg(e.dossier)}/assignment/${encodeURIComponent(e.id)}`});t&&h.push(t,e.previous)},t.signal).then(()=>void 0,()=>void 0).finally(()=>{t.signal.aborted||(i=setTimeout(a,aO))})};return a(),()=>{t.abort(),clearTimeout(i)}},[e,h,n]),(0,v.useEffect)(()=>{if(!e||e.disabled||!t)return;let r=null,i=!0,a=()=>e.list(t,{inbox:!1}).then(e=>{if(!i)return;let t=e.assignments.filter(e=>e.stale);if(r)for(let e of t)r.has(e.id)||h.push({key:`stale:${e.id}`,state:`stale`,notable:`stale`,agent:e.adapter?ED[e.adapter]:`An agent`,item:e.item,itemTitle:e.itemTitle,why:e.stale.text,dossier:e.dossier,href:`${bg(e.dossier)}/assignment/${encodeURIComponent(e.id)}`,mine:n().has(e.id)},`fresh`);r=new Set([...r??[],...t.map(e=>e.id)])},()=>void 0);a();let o=setInterval(a,iO);return()=>{i=!1,clearInterval(o)}},[e,t,h,n]),(0,q.jsx)(lO,{value:{settings:i,save:e=>{a(e),sO(nO,JSON.stringify(e))},permission:o,ask:async()=>{if(typeof Notification>`u`)return`unsupported`;let e=Notification.permission==="default"?await Notification.requestPermission():Notification.permission;return s(e),e},report:(e,t)=>h.push(e,t),notices:c,dismiss:e=>l(t=>t.filter(t=>t.id!==e))},children:r})}function mO(){let e=uO();return(0,q.jsx)(`div`,{className:`notices`,role:`status`,"aria-label":`Notifications`,"data-notices":``,children:e?.notices.map(t=>(0,q.jsxs)(`div`,{className:`notice`,children:[(0,q.jsx)(`p`,{className:`notice__title`,children:(0,q.jsx)(`strong`,{children:t.title})}),(0,q.jsx)(`ul`,{className:`notice__lines`,children:t.changes.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(`a`,{href:e.href,children:hO(e)})},e.key))}),(0,q.jsxs)(W,{className:`btn btn--small`,onPress:()=>e.dismiss(t.id),children:[`Dismiss`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,t.title]})]})]},t.id))})}var hO=e=>`${e.item?`${e.item}${e.itemTitle?` ${e.itemTitle}`:``}`:e.dossier}: ${e.why}`;function gO({on:e,set:t,children:n}){return(0,q.jsxs)(Eo,{className:`check`,isSelected:e,onChange:t,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:e?`✓`:``}),n]})}function _O({label:e,value:t,save:n}){let[r,i]=(0,v.useState)(t),a=!qD.test(r);return(0,q.jsxs)(Yp,{className:`field-text`,value:r,onChange:e=>{i(e),qD.test(e)&&n(e)},isInvalid:a,children:[(0,q.jsx)(va,{children:e}),(0,q.jsx)(jo,{inputMode:`numeric`}),(0,q.jsxs)(qa,{className:`failure`,children:[`Use HH:MM, like 22:00. Until then the quiet hours keep `,t,`.`]})]})}function vO(){let e=uO(),[t,n]=(0,v.useState)(null);if(!e)return null;let r=e.settings,i=t=>e.save({...r,...t}),a=async t=>{if(n(null),!t)return i({browser:!1});let r=await e.ask();if(r===`granted`)return i({browser:!0});i({browser:!1}),n(r===`unsupported`?`This browser has no notifications, so Toil UI shows its notices in the page only.`:`The browser didn't allow notifications for this page, so Toil UI shows its notices in the page only. Allow them in the browser's settings for this site, then turn this on again.`)};return(0,q.jsxs)(Q,{as:`section`,className:`panel notify-setting`,"aria-labelledby":`notify-title`,children:[(0,q.jsx)(`h2`,{id:`notify-title`,children:`Notifications`}),(0,q.jsx)(`p`,{className:`note`,children:`A notice when an agent's state changes, never for a tool call or its progress. Changes within a few seconds become one notice. Saved in this browser only.`}),(0,q.jsxs)(`fieldset`,{className:`notify-states`,children:[(0,q.jsx)(`legend`,{children:`Notify when an agent is`}),VD.map(e=>(0,q.jsx)(gO,{on:r.states[e],set:t=>i({states:{...r.states,[e]:t}}),children:HD[e]},e))]}),(0,q.jsx)(gO,{on:r.mine,set:e=>i({mine:e}),children:`Only for agents I started in this browser`}),(0,q.jsx)(gO,{on:r.quiet!==null,set:e=>i({quiet:e?{from:`22:00`,to:`07:00`}:null}),children:`Quiet hours`}),r.quiet&&(0,q.jsxs)(`div`,{className:`notify-quiet`,children:[(0,q.jsx)(_O,{label:`From (HH:MM, this computer's time)`,value:r.quiet.from,save:e=>i({quiet:{...r.quiet,from:e}})}),(0,q.jsx)(_O,{label:`To (HH:MM)`,value:r.quiet.to,save:e=>i({quiet:{...r.quiet,to:e}})})]}),(0,q.jsx)(gO,{on:r.browser,set:e=>void a(e),children:`Browser notifications while this tab is hidden`}),(0,q.jsx)(`p`,{className:`note`,role:`status`,children:t??(r.browser?`The browser draws them on this computer; nothing is sent anywhere.`:`Off. The browser is asked for permission only when you turn this on.`)})]})}var yO=/^[ \t]*(?:#{1,6}[ \t]*)?(?:\*\*|__)?(recommendation|issues|evidence)(?:(?:\*\*|__)?[ \t]*[:\-–—](?:\*\*|__)?[ \t]*(.*)|(?:\*\*|__)?[ \t]*)$/gim,bO=/^[ \t]*(?:\d{1,2}[.)]|[-*•])[ \t]+/,xO=/^(?:none|nothing(?: stands out)?|no issues?)\.?$/i;function SO(e){let t=e.replace(bO,``).trim(),n=/^([^:[\]]{1,60}):\s+(.+)$/s.exec(t);return n?{title:n[1].trim(),text:n[2].trim()}:{title:null,text:t}}var CO=e=>e.split(/\n\s*\n/).map(e=>e.trim()).filter(Boolean);function wO(e){let t=[...e.matchAll(yO)].map(e=>({label:e[1].toLowerCase(),start:e.index,rest:e[2]??``,end:e.index+e[0].length})),n=t.find(e=>e.label===`recommendation`);if(!n)return null;let r=t.filter((e,r)=>e.start>=n.start&&t.findIndex(t=>t.label===e.label&&t.start>=n.start)===r),i=t=>{let n=r.findIndex(e=>e.label===t);if(n<0)return null;let i=r[n],a=r[n+1]?.start??e.length;return`${i.rest}\n${e.slice(i.end,a)}`.trim()},a=(i(`recommendation`)??``).replace(/\s*\n\s*/g,` `).trim();if(!a)return null;let o=(i(`issues`)??``).split(`
30
- `).map(e=>e.trim()).filter(Boolean),s=o.some(e=>bO.test(e)),c=[];for(let e of o)!s||bO.test(e)||!c.length?c.push(e):c[c.length-1]+=` ${e}`;let l=c.filter(e=>!xO.test(e.replace(bO,``).trim())).map(SO),u=e.slice(0,n.start).trim(),d=[...CO(i(`evidence`)??``),...l.slice(3).map(e=>e.title?`${e.title}: ${e.text}`:e.text),...CO(u)];return{recommendation:a,issues:l.slice(0,3),evidence:d,extraIssues:Math.max(0,l.length-3)}}var TO=e=>e.map(e=>e.text).join(`
26
+ `)}var xv=/^\s*(?:#{1,6}\s*|\*{1,2})?(acceptance criteria|definition of done|done when)\s*\**\s*(?::\s*(.*))?$/i,Sv=/^\s*(?:[-*+]\s*)?\[[ xX]?\]\s+\S/;function Cv(e,t=[]){let n=e=>_v(bv(e,t)),r=mv(e);for(let e=0;e<r.length;e++){let t=xv.exec(r[e]);if(t){if(n(t[2]??``)>0)return`heading`;for(let t=e+1;t<r.length&&!/^\s*#{1,6}\s/.test(r[t]);t++)if(n(r[t])>0)return`heading`}}return r.some(e=>Sv.test(e)&&n(e)>0)?`checklist`:null}function wv(e,t){let n=t.toLowerCase();for(let t of Object.values(e.native??{})){if(!iv(t))continue;let e=iv(t.fields)?t.fields:t;for(let[t,r]of Object.entries(e))if(t.toLowerCase()===n&&r!=null&&r!==``)return{value:r,key:t};for(let[t,n]of Object.entries(e))if(/^acceptance\s*criteria$/i.test(t)&&n!=null&&n!==``)return{value:n,key:t}}return null}function Tv(e){let t=e.source.area;return t.startsWith(`jira`)?{command:`${t} issue transitions`,input:{key:e.source.key}}:t.startsWith(`ado`)&&e.typeName?{command:`${t} work-item states`,input:{type:e.typeName}}:null}var Ev={proposed:`TODO`,inprogress:`IN_PROGRESS`,resolved:`IN_PROGRESS`,completed:`DONE`,removed:`DONE`},Dv={new:`TODO`,indeterminate:`IN_PROGRESS`,done:`DONE`};function Ov(e,t,n,r){if(r)return{command:t,error:r};let i=Array.isArray(n)?n:iv(n)&&Array.isArray(n.transitions)?n.transitions:[];return e.source.area.startsWith(`ado`)?{command:t,kind:`states`,states:i.filter(iv).map(e=>({name:String(e.name??``),category:typeof e.category==`string`?e.category.toLowerCase()===`removed`?null:Ev[e.category.toLowerCase()]??null:null}))}:{command:t,kind:`transitions`,states:i.filter(iv).map(e=>{let t=iv(e.to)?e.to:{},n=iv(t.statusCategory)&&typeof t.statusCategory.key==`string`?Dv[t.statusCategory.key]??null:null;return{name:String(t.name??e.name??``),category:n}})}}var kv=(e,t,n,r)=>({check:e,label:ev[e],state:t,reason:n,source:r}),Av=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function jv(e,t,n){let r=t?.acceptanceField??null;if(r){let n=wv(e,r);if(n){let e=_v(bv(pv(n.value),t?.templateLines??[]));if(e>0)return kv(`acceptance`,`pass`,`${Av(e,`word`)} in ${n.key}.`,`field ${n.key}`)}}let i=Cv(n,t?.templateLines??[]);return i?kv(`acceptance`,`pass`,i===`heading`?`A heading in the description lists them.`:`The description has a checklist.`,`description`):kv(`acceptance`,`thin`,`None found. ${r?`${r} is empty, and the description has`:`The description has`} no acceptance criteria heading or checklist.`,r?`field ${r}, description`:`description`)}function Mv(e,t,n){let r=t?.minWords??25,i=_v(n),a=_v(bv(n,t?.templateLines??[])),o=i-a,s=o>0?`, not counting ${Av(o,`word`)} of template or placeholder text`:``;return!e.body||i===0?kv(`description`,`thin`,`No description; ${Av(r,`word`)} are needed.`,`description`):a>=r?kv(`description`,`pass`,`${Av(a,`word`)} of real text${s}.`,`description`):kv(`description`,`thin`,`${Av(a,`word`)} of real text${s}; ${Av(r,`word`)} are needed.`,`description`)}var Nv=(e,t)=>e.source.connection===t.source.connection&&(e.typeName??e.type).toLowerCase()===(t.typeName??t.type).toLowerCase(),Pv=e=>e.statusCategory===`DONE`||(e.history?.transitions??[]).some(e=>e.toCategory===`DONE`);function Fv(e,t,n){let r=e.typeName??e.type.toLowerCase();if(e.statusCategory===`DONE`)return kv(`done`,`fail`,`Already done (${e.status??`Done`}).`,`status`);if(n?.error)return kv(`done`,`thin`,`The live read failed: ${n.error}`,`toil ${n.command}`);if(n?.states){let e=n.states.filter(e=>e.category===`DONE`);return n.kind===`states`?e.length?kv(`done`,`pass`,`The ${r} workflow has a Done state: ${e.map(e=>e.name).join(`, `)}.`,`toil ${n.command}`):kv(`done`,`fail`,`The ${r} workflow has no Done state, so it can never be finished.`,`toil ${n.command}`):e.length?kv(`done`,`pass`,`It can move to Done now: ${e.map(e=>e.name).join(`, `)}.`,`toil ${n.command}`):kv(`done`,`thin`,`None of the ${Av(n.states.length,`move`)} it offers now goes straight to Done; the workflow may get there in more steps.`,`toil ${n.command}`)}if(e.statusCategory===`UNKNOWN`)return kv(`done`,`thin`,`toil couldn't tell what category the status ${e.status??`(none)`} is in, so it isn't known to be open.`,`status`);if(e.source.area===`github`)return kv(`done`,`pass`,`Open (${e.status??`open`}); a GitHub issue closes from any state.`,`status`);let i=[...t.values()].find(t=>t.id!==e.id&&Nv(t,e)&&Pv(t));return i?kv(`done`,`pass`,`Open (${e.status??`open`}), and another ${r} here reached Done ([[${i.id}]]), so the workflow gets there.`,`cache`):kv(`done`,`thin`,`Open (${e.status??`open`}), but no ${r} in this dossier has reached Done, so a way there isn't known from the cache. Check the workflow live.`,`cache`)}function Iv(e,t){let n=e.links.filter(e=>e.type===`blocks`&&e.direction===`inward`);if(!n.length)return kv(`blockers`,`pass`,`Nothing blocks it.`,`links`);let r=n.filter(e=>t.has(e.target)&&t.get(e.target).statusCategory!==`DONE`),i=n.filter(e=>!t.has(e.target));return r.length?kv(`blockers`,`fail`,`Blocked by ${r.map(e=>`[[${e.target}]] (${t.get(e.target).status??`open`})`).join(`, `)}.`,`links`):i.length?kv(`blockers`,`thin`,`Blocked by ${i.map(e=>e.target).join(`, `)}, which this dossier doesn't hold, so whether ${i.length===1?`it's`:`they're`} still open isn't known.`,`links`):kv(`blockers`,`pass`,`Its ${n.length===1?`blocker is`:`blockers are`} done (${n.map(e=>`[[${e.target}]]`).join(`, `)}).`,`links`)}var Lv=e=>e.source.area===`github`?/^[^/]+\/([^#]+)#/.exec(e.source.key)?.[1]??null:null;function Rv(e,t){if(!t.sources.includes(e.source.area))return kv(`scope`,`fail`,`It came from ${e.source.area}, which isn't one of this dossier's sources (${t.sources.join(`, `)||`none`}).`,`dossier`);let n=t.repos;if(!n.length)return kv(`scope`,`thin`,`The dossier names no repository, so an agent could plan it but has nowhere to implement it. Add one with toil dossiers add-repo.`,`dossier repos`);let r=Lv(e);return r&&n.includes(r)?kv(`scope`,`pass`,`${e.source.area} is one of the dossier's sources, and its repository, ${r}, is in the dossier.`,`dossier repos`):n.length===1?kv(`scope`,`pass`,`${e.source.area} is one of the dossier's sources, and an agent works in ${n[0]}.`,`dossier repos`):kv(`scope`,`pass`,`${e.source.area} is one of the dossier's sources, which names ${Av(n.length,`repository`,`repositories`)} (${n.join(`, `)}); one is chosen when it starts.`,`dossier repos`)}var zv={fail:0,thin:1,pass:2};function Bv({item:e,settings:t,byId:n,live:r}){let i=t.areas[e.source.area],a=e.body?pv(e.body.content,e.body.format):``,o=[jv(e,i,a),Mv(e,i,a),Fv(e,n,r),Iv(e,n),Rv(e,t)],s=o.some(e=>e.state===`fail`)?`blocked`:o.some(e=>e.state===`thin`)?`thin`:`ready`,c=o.filter(e=>e.state!==`pass`).sort((e,t)=>zv[e.state]-zv[t.state]);return{id:e.id,verdict:s,rows:o,why:c}}function Vv(e,t){let n=new Map(e.map(e=>[e.id,e]));return e.map(e=>Bv({item:e,settings:t,byId:n}))}function Hv(e){let t={ready:0,thin:0,blocked:0};for(let n of e)t[n.verdict]++;return t}var Uv=[`pr list`,`pr get`],Wv={family:`jira`,items:[`issue search`,`issue get`],history:[`issue history`],context:[],changes:[]},Gv={family:`ado`,items:[`work-item get`,`work-item get-many`],history:[`work-item history`],context:[`work-item iterations`],changes:Uv},Kv={jira:Wv,"jira-cloud":Wv,ado:Gv,"ado-cloud":Gv,github:{family:`github`,items:[`issue list`,`issue search`,`issue get`,`project items`],history:[`issue history`],context:[],changes:Uv},bitbucket:{family:`bitbucket`,items:[],history:[],context:[],changes:Uv},"bitbucket-cloud":{family:`bitbucket-cloud`,items:[],history:[],context:[],changes:Uv}},qv=Object.keys(Kv),Jv=[`estimate`,`estimateUnit`,`priority`,`type`,`team`,`dueDate`,`iteration`,`estimateLabel`,`iterationDays`],Yv=[`HUMAN`,`AGENT`,`BOT`],Xv=class extends Error{code;fix;details;constructor(e,t,n={}){super(t),this.name=`ToilError`,this.code=e,this.fix=n.fix,this.details=n.details}};function Zv(){let e=new Set,t=[];return{list:t,warn:(n,r)=>{let i=`${n}\u0000${r}`;e.has(i)||(e.add(i),t.push({code:n,message:r}))}}}var X=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Z=e=>typeof e==`string`&&e!==``?e:null,Qv=e=>typeof e==`number`&&Number.isFinite(e)?e:null;function $v(e){if(typeof e==`string`)return e===``?null:e;if(typeof e==`number`&&Number.isFinite(e))return String(e);if(Array.isArray(e)){for(let t of e){let e=$v(t);if(e!==null)return e}return null}return X(e)?Z(e.value)??Z(e.name)??Z(e.displayName)??Z(e.title):null}function ey(e){if(e==null||e===``)return null;if(typeof e!=`string`)return;let t=e.replace(/([+-]\d{2})(\d{2})$/,`$1:$2`);if(!/^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})?)?$/.test(t))return;let n=/T|\s/.test(t)?/(Z|[+-]\d{2}:\d{2})$/.test(t)?t:`${t}Z`:`${t}T00:00:00Z`,r=Date.parse(n.replace(` `,`T`));return Number.isNaN(r)?void 0:new Date(r).toISOString()}function ty(e){if(e==null||e===``)return null;if(typeof e!=`string`)return;let t=/^(\d{4}-\d{2}-\d{2})/.exec(e);return t?t[1]:void 0}var ny={epic:`EPIC`,story:`STORY`,"user story":`STORY`,"product backlog item":`STORY`,requirement:`STORY`,task:`TASK`,"sub-task":`TASK`,subtask:`TASK`,bug:`BUG`,defect:`BUG`,incident:`INCIDENT`};function ry(e,t={}){if(e===null)return`OTHER`;let n=e.toLowerCase();return t[n]??ny[n]??`OTHER`}function iy(e,t,n,r){return{owi:`0.2`,id:ay(e.connection,t),source:{area:e.area,connection:e.connection,key:t,command:e.command},url:null,type:`OTHER`,typeName:null,title:n,body:null,status:null,statusCategory:`UNKNOWN`,resolution:null,assignee:null,reporter:null,priority:null,estimate:null,labels:[],team:null,iteration:null,parent:null,children:[],links:[],created:null,updated:null,resolved:null,dueDate:null,history:null,unmapped:[],native:r}}var ay=(e,t)=>`${e}:${t}`;function oy(e,t,n){e.unmapped.some(e=>e.field===t)||e.unmapped.push({field:t,reason:n})}function sy(e,t,n,r){let i=ey(n);i===void 0?oy(e,t,`${r} holds ${JSON.stringify(n)}, which isn't a date-time`):e[t]=i}function cy(e,t,n){let r=ty(t);r===void 0?oy(e,`dueDate`,`${n} holds ${JSON.stringify(t)}, which isn't a date`):e.dueDate=r}function ly(e,t,n,r){return t.warn(`OWI_UNKNOWN_STATE`,`"${n}" (${e.source.area}) is a status OWI has no category for, so its items are UNKNOWN: ${r}`),oy(e,`statusCategory`,`"${n}" has no category: ${r}`),`UNKNOWN`}var uy=e=>e.fields.estimateUnit??`points`;function dy(e,t,n){let r=Z(e)??(typeof e==`number`?String(e):null);return r===null?null:{id:r,name:Z(t),email:Z(n)}}function fy(e){return e.find(e=>e.state===`current`)??[...e].reverse().find(e=>e.state===`future`)??e[e.length-1]??null}var py=[`Microsoft.VSTS.Scheduling.StoryPoints`,`Microsoft.VSTS.Scheduling.Effort`,`Microsoft.VSTS.Scheduling.Size`],my=`Microsoft.VSTS.Scheduling.OriginalEstimate`,hy={New:`TODO`,"To Do":`TODO`,Approved:`TODO`,Proposed:`TODO`,Active:`IN_PROGRESS`,"In Progress":`IN_PROGRESS`,Doing:`IN_PROGRESS`,Committed:`IN_PROGRESS`,Open:`IN_PROGRESS`,Resolved:`IN_PROGRESS`,Closed:`DONE`,Done:`DONE`,Removed:`DONE`},gy={"System.LinkTypes.Dependency-Forward":{type:`blocks`,direction:`outward`,name:`Successor`},"System.LinkTypes.Dependency-Reverse":{type:`blocks`,direction:`inward`,name:`Predecessor`},"System.LinkTypes.Related":{type:`relates`,direction:`outward`,name:`Related`},"System.LinkTypes.Duplicate-Forward":{type:`duplicates`,direction:`inward`,name:`Duplicate`},"System.LinkTypes.Duplicate-Reverse":{type:`duplicates`,direction:`outward`,name:`Duplicate Of`}},_y=`System.LinkTypes.Hierarchy-Reverse`,vy=`System.LinkTypes.Hierarchy-Forward`;function yy(e){if(X(e)&&Array.isArray(e.value))return e.value.filter(X);if(X(e)&&typeof e.id==`number`&&X(e.fields))return[e]}function by(e){if(X(e))return dy(e.uniqueName??e.id,e.displayName,typeof e.uniqueName==`string`&&e.uniqueName.includes(`@`)?e.uniqueName:null);if(typeof e==`string`){let t=/^(.*?)\s*<([^>]+)>$/.exec(e);return t?dy(t[2],t[1],t[2].includes(`@`)?t[2]:null):dy(e,e,null)}return null}var xy=e=>typeof e==`string`?/\/workItems\/(\d+)$/i.exec(e)?.[1]:void 0,Sy=(e,t)=>{let n=e.replace(/^\\+/,``).split(`\\`);return t&&n[1]?.toLowerCase()===`iteration`&&n.splice(1,1),n.join(`\\`).toLowerCase()};function Cy(e,t){if(!X(e)||e.structureType!==`iteration`)return!1;let n=e=>{if(X(e)){if(typeof e.path==`string`){let n=X(e.attributes)?e.attributes:{};t.set(Sy(e.path,!0),{id:Z(e.identifier),start:ey(n.startDate)??null,end:ey(n.finishDate)??null})}for(let t of Array.isArray(e.children)?e.children:[])n(t)}};return n(e),!0}function wy(e,t,n,r){if(typeof t.id!=`number`)return;let i=String(t.id),a=t.fields??{},o=iy(e,i,Z(a[`System.Title`])??``,{[e.command]:t});Z(a[`System.Title`])===null&&oy(o,`title`,`the record has no System.Title`);let s=X(t._links)?t._links:{},c=X(s.html)?Z(s.html.href):null,l=Z(t.url),u=Z(a[`System.TeamProject`]);c?o.url=c:l?.includes(`/_apis/`)&&u?o.url=`${l.slice(0,l.indexOf(`/_apis/`))}/${encodeURIComponent(u)}/_workitems/edit/${i}`:oy(o,`url`,`the record has no html link and no System.TeamProject to build one from`);let d=n.fields.type??`System.WorkItemType`;o.typeName=$v(a[d]),o.type=ry(o.typeName,{issue:`STORY`}),d in a||oy(o,`type`,Ty(d,n.fields.type!==void 0&&`type`)),typeof a[`System.Description`]==`string`&&(o.body={format:`html`,content:a[`System.Description`]}),o.status=Z(a[`System.State`]),o.status===null?oy(o,`status`,`the record has no System.State`):o.statusCategory=hy[o.status]??ly(o,n,o.status,`a custom state; ${e.area} work-item states shows its category`),o.statusCategory===`DONE`&&(o.resolution=Z(a[`System.Reason`])??(o.status===`Removed`?`Removed`:null)),o.assignee=by(a[`System.AssignedTo`]),o.reporter=by(a[`System.CreatedBy`]);let f=n.fields.priority??`Microsoft.VSTS.Common.Priority`;o.priority=$v(a[f]),n.fields.priority!==void 0&&a[f]===void 0&&oy(o,`priority`,Ty(f,`priority`)),o.labels=typeof a[`System.Tags`]==`string`?a[`System.Tags`].split(`;`).map(e=>e.trim()).filter(Boolean):[],n.fields.team!==void 0&&(o.team=$v(a[n.fields.team]),a[n.fields.team]===void 0&&oy(o,`team`,Ty(n.fields.team,`team`))),Ey(o,a,n);let p=n.fields.iteration??`System.IterationPath`,m=Z(a[p]);if(m===null)oy(o,`iteration`,Ty(p,n.fields.iteration!==void 0&&`iteration`));else{let e=r.get(Sy(m,!1));o.iteration={id:e?.id??null,name:m.split(`\\`).pop(),path:m,start:e?.start??null,end:e?.end??null,state:null},!e&&p===`System.IterationPath`&&m.includes(`\\`)&&oy(o,`iteration.dates`,`the iteration's dates come from ado work-item iterations: add its output to the input`)}for(let n of Array.isArray(t.relations)?t.relations:[]){if(!X(n))continue;let t=xy(n.url);if(t===void 0)continue;let r=String(n.rel??``);r===_y?o.parent=ay(e.connection,t):r===vy?o.children.push(ay(e.connection,t)):gy[r]?o.links.push({...gy[r],target:ay(e.connection,t)}):(r.startsWith(`System.LinkTypes.`)||r.startsWith(`Microsoft.VSTS.`))&&o.links.push({type:`other`,direction:`outward`,target:ay(e.connection,t),name:r})}o.parent===null&&typeof a[`System.Parent`]==`number`&&(o.parent=ay(e.connection,String(a[`System.Parent`]))),sy(o,`created`,a[`System.CreatedDate`],`System.CreatedDate`),sy(o,`updated`,a[`System.ChangedDate`],`System.ChangedDate`),sy(o,`resolved`,a[`Microsoft.VSTS.Common.ClosedDate`],`Microsoft.VSTS.Common.ClosedDate`);let h=n.fields.dueDate??(a[`Microsoft.VSTS.Scheduling.DueDate`]===void 0?`Microsoft.VSTS.Scheduling.TargetDate`:`Microsoft.VSTS.Scheduling.DueDate`);return n.fields.dueDate!==void 0&&a[h]===void 0?oy(o,`dueDate`,Ty(h,`dueDate`)):cy(o,a[h],h),o}var Ty=(e,t)=>`${e} has no value, or the record doesn't have it (Azure DevOps leaves empty fields out)${t?`; fields ${t} names it`:``}`;function Ey(e,t,n){let r=n.fields.estimate;if(r!==void 0){let i=Qv(t[r]);i===null?oy(e,`estimate`,t[r]===void 0?Ty(r,`estimate`):`${r} holds ${JSON.stringify(t[r])}, not a number`):e.estimate={value:i,unit:n.fields.estimateUnit?uy(n):r===`Microsoft.VSTS.Scheduling.OriginalEstimate`?`hours`:`points`,field:r};return}for(let n of py){let r=Qv(t[n]);if(r!==null)return void(e.estimate={value:r,unit:`points`,field:n})}let i=Qv(t[my]);if(i!==null)return void(e.estimate={value:i,unit:`hours`,field:my});oy(e,`estimate`,`none of StoryPoints, Effort, Size or OriginalEstimate has a value; Azure DevOps leaves empty fields out, so an unestimated item and one estimated in a field of the team's own look alike: point fields estimate at that field`)}function Dy(e,t){if(!Array.isArray(e.data))return;let n=t.fields.iteration??`System.IterationPath`,r=new Map,i=e.data.filter(e=>X(e)&&typeof e.id==`number`&&X(e.fields));i.sort((e,t)=>(Qv(e.rev)??0)-(Qv(t.rev)??0));for(let e of i){let t=String(e.id),i=e.fields,a=ey(i[`System.ChangedDate`]);if(!a)continue;let o=r.get(t);o||r.set(t,o={history:{transitions:[],iterations:[]},state:null,path:null});let s=by(i[`System.ChangedBy`]),c=Z(i[`System.State`]);c!==null&&c!==o.state&&(o.history.transitions.push({from:o.state,to:c,fromCategory:o.state===null?null:hy[o.state]??`UNKNOWN`,toCategory:hy[c]??`UNKNOWN`,at:a,by:s}),o.state=c);let l=Z(i[n]);l!==null&&l!==o.path&&(o.history.iterations.push({from:o.path===null?[]:[o.path],to:[l],at:a,by:s}),o.path=l)}return new Map([...r].map(([e,{history:t}])=>[e,t]))}function Oy(e,t,n,r,i){let a=`${t}#${n}`;return{owi:`0.2`,id:ay(e.connection,a),source:{area:e.area,connection:e.connection,key:a,command:e.command},url:null,repo:t,title:r,branch:{source:null,target:null},state:`OPEN`,author:null,authorKind:`HUMAN`,authorKindSource:`default`,authorKindSignal:null,reviewers:[],reviews:null,checks:null,checksAt:null,mergeable:null,size:null,workItems:[],mergeCommit:null,created:null,firstReviewAt:null,approvedAt:null,mergedAt:null,closedAt:null,updated:null,unmapped:[],native:{[e.command]:i}}}function ky(e,t,n){e.unmapped.some(e=>e.field===t)||e.unmapped.push({field:t,reason:n})}function Ay(e,t,n,r){let i=typeof n==`number`&&Number.isFinite(n)?new Date(n).toISOString():ey(n);return i===void 0?(ky(e,t,`${r} holds ${JSON.stringify(n)}, which isn't a date-time`),null):i}function jy(e){let t={};if(!X(e.included))return t;for(let n of[`reviews`,`checks`,`commits`,`files`])Array.isArray(e.included[n])&&(t[n]=e.included[n]);return t}var My=(e,t)=>e.command.endsWith(` pr list`)?`${e.command} doesn't return ${t}: map ${e.area} pr get --include ${t} for each pull request as well`:`the input wasn't read with --include ${t}: map ${e.area} pr get --include ${t}`,Ny=/^[a-z0-9]+(-[a-z0-9]+)*$/;function Py(e){return(e??[]).map(e=>{let t,n;if(typeof e==`string`){let r=e.lastIndexOf(`=`);if(r<=0)throw new Xv(`INVALID_INPUT`,`"${e}" isn't a key pattern.`,{fix:`Write it as pattern=connection, with {n} where the number is: PAY-{n}=corp-jira, or AB#{n}=corp-ado.`});t=e.slice(0,r),n=e.slice(r+1)}else({text:t,connection:n}=e);if(t.split(`{n}`).length!==2||t===`{n}`)throw new Xv(`INVALID_INPUT`,`The key pattern "${t}" must hold {n} exactly once, beside some text (PAY-{n}, AB#{n}).`,{fix:`Put {n} where the number is, once: PAY-{n}=corp-jira.`});if(!Ny.test(n))throw new Xv(`INVALID_INPUT`,`"${n}" isn't a connection name (the part after = in ${t}=${n}).`,{fix:`Name the connection the keys belong to: lowercase letters, digits and single hyphens, as toil connections list shows it.`});return{text:t,connection:n}})}var Fy=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function Iy(e){let[t,n]=e.split(`{n}`),r=/^\w/.test(t)?`(?<![\\w-])`:``,i=n===``||/\w$/.test(n)?`(?!\\w)`:``;return RegExp(`${r}${Fy(t)}(\\d+)${Fy(n)}${i}`,`g`)}var Ly=(e,t,n)=>e.text.endsWith(`#{n}`)&&!e.text.includes(`/`)?n:t,Ry=e=>e.replace(/```[\s\S]*?```/g,` `).replace(/`[^`\n]*`/g,` `);function zy(e,t,n=()=>[]){let r=[],i=e=>{r.includes(e)||r.push(e)};for(let r of e){if(!r)continue;let e=Ry(r);for(let t of n(e))i(t);for(let n of t)for(let t of e.matchAll(Iy(n.text)))i(ay(n.connection,Ly(n,t[0],t[1])))}return r}function By(e){let t=e?.split(`/`).at(-1)??``;return/^(\d+)[-_]/.exec(t)?.[1]??null}var Vy=/(?<![\w/#-])#(\d+)\b/g,Hy=[`claude/`,`copilot/`,`codex/`],Uy=/^co-authored-by:\s*(.+)$/gim,Wy=[{name:`Claude`,test:/\bclaude\b|@anthropic\.com\b/i},{name:`GitHub Copilot`,test:/\bcopilot\b/i},{name:`Codex`,test:/\bcodex\b|@openai\.com\b/i},{name:`Cursor`,test:/\bcursor\s*agent\b|@cursor\.(com|sh)\b/i},{name:`Devin`,test:/\bdevin\b|@cognition\.ai\b/i}],Gy=[`copilot`,`copilot-swe-agent[bot]`,`claude[bot]`,`devin-ai-integration[bot]`,`chatgpt-codex-connector[bot]`];function Ky(e){for(let t of e)for(let e of t.matchAll(Uy)){let t=e[1].trim();if(Wy.some(e=>e.test.test(t)))return`Co-Authored-By: ${t}`}return null}function qy(e,t,n){let r=(t,n,r)=>{e.authorKind=t,e.authorKindSource=n,e.authorKindSignal=r},i=e.author?Jy(t.changes.authors,e.author):void 0;if(i)return r(i.kind,`override`,`override for ${i.id}`);if(n.account)return r(n.account.kind,`account`,n.account.signal);let a=n.messages?Ky(n.messages):null;if(a)return r(`AGENT`,`trailer`,a);if(Hy.find(t=>e.branch.source?.toLowerCase().startsWith(t)))return r(`AGENT`,`branch`,`branch ${e.branch.source}`);r(`HUMAN`,`default`,null),n.messages===null&&ky(e,`authorKind`,`HUMAN by default: no override, account or branch says otherwise, and the commits (whose Co-Authored-By trailers can name an agent) weren't read; map pr get --include commits`)}function Jy(e,t){let n=[t.id,t.name,t.email].filter(e=>!!e).map(e=>e.toLowerCase());for(let[t,r]of Object.entries(e))if(n.includes(t.toLowerCase()))return{id:t,kind:r}}function Yy(e){let t=Array.isArray(e)?e.map(e=>{let t=e.lastIndexOf(`=`);if(t<=0)throw new Xv(`INVALID_INPUT`,`"${e}" isn't an author kind.`,{fix:`Write it as id=KIND, with KIND one of HUMAN, AGENT or BOT: release-bot=BOT.`});return[e.slice(0,t),e.slice(t+1)]}):Object.entries(e??{}),n={};for(let[e,r]of t){let t=String(r).toUpperCase();if(!Yv.includes(t))throw new Xv(`INVALID_INPUT`,`"${r}" isn't an author kind (for ${e}).`,{fix:`Use one of ${Yv.join(`, `)}.`});n[e]=t}return n}function Xy(e,t){let n=[...t].sort((e,t)=>e.at<t.at?-1:+(e.at>t.at));e.reviews=n;let r=n.filter(t=>!e.author||t.by.id.toLowerCase()!==e.author.id.toLowerCase());e.firstReviewAt=r[0]?.at??null,e.approvedAt=r.find(e=>e.state===`APPROVED`)?.at??null}function Zy(e,t){let n=e=>e.map(e=>e.at).filter(e=>e!==null).sort();if(!t.length){e.checks=`NONE`,e.checksAt=null;return}let r=t.filter(e=>e.outcome===`fail`),i=r.length?`FAILING`:t.some(e=>e.outcome===`pending`)?`PENDING`:`PASSING`;e.checks=i,e.checksAt=i===`FAILING`?n(r)[0]??null:n(t).at(-1)??null}function Qy(e){return e.flatMap(e=>{if(!X(e))return[];let t=Z(e.message)??(X(e.commit)?Z(e.commit.message):null)??Z(e.comment);return t?[t]:[]})}function $y(e,t){let n=e=>e.source.command.endsWith(` pr get`),[r,i]=n(t)||!n(e)?[t,e]:[e,t];return{...r,native:{...i.native,...r.native}}}function eb(e){if(Array.isArray(e))return e.filter(X);if(X(e)&&typeof e.pullRequestId==`number`)return[e]}var tb=e=>typeof e==`number`&&e>=5?`APPROVED`:typeof e==`number`&&e<=-5?`CHANGES_REQUESTED`:`PENDING`,nb=e=>Z(e)?.replace(/^refs\/heads\//,``)??null,rb=(e,t)=>X(e.properties)&&X(e.properties[t])?Z(String(e.properties[t].$value??``)):null,ib={succeeded:`pass`,notApplicable:`pass`,failed:`fail`,error:`fail`,pending:`pending`,notSet:`pending`};function ab(e,t,n,r){let i=String(e.pullRequestId),a=Z(t.webUrl);if(a)return`${a}/pullrequest/${i}`;let o=(Z(t.url)??Z(e.url))?.split(`/_apis/`)[0];return!o||!n||!r?null:`${o.slice(0,o.lastIndexOf(`/`))}/${encodeURIComponent(n)}/_git/${encodeURIComponent(r)}/pullrequest/${i}`}function ob(e,t,n){let r=X(t.repository)?t.repository:{},i=X(r.project)?Z(r.project.name):e.inputs.project??null,a=Z(r.name)??e.inputs.repo??null;if(!i||!a||typeof t.pullRequestId!=`number`)return;let o=String(t.pullRequestId),s=Oy(e,`${i}/${a}`,o,Z(t.title)??`Pull request ${o}`,t);s.url=ab(t,r,i,a),s.branch={source:nb(t.sourceRefName),target:nb(t.targetRefName)},s.author=by(t.createdBy),s.state=t.status===`completed`?`MERGED`:t.status===`abandoned`?`DECLINED`:t.isDraft===!0?`DRAFT`:`OPEN`,s.created=Ay(s,`created`,t.creationDate,`creationDate`);let c=s.state===`MERGED`||s.state===`DECLINED`?Ay(s,`closedAt`,t.closedDate,`closedDate`):null;s.closedAt=c,s.mergedAt=s.state===`MERGED`?c:null,ky(s,`updated`,`Azure DevOps records no last-updated time on a pull request`),s.mergeCommit=s.state===`MERGED`&&X(t.lastMergeCommit)?Z(t.lastMergeCommit.commitId):null,s.mergeable=t.mergeStatus===`succeeded`||t.mergeStatus!==`conflicts`&&null,s.mergeable===null&&s.state!==`MERGED`&&s.state!==`DECLINED`&&ky(s,`mergeable`,`Azure DevOps reported mergeStatus ${JSON.stringify(t.mergeStatus??null)}, which says neither clean nor conflicting`);let l=t=>[...t.matchAll(Vy)].map(t=>ay(e.connection,t[1])),u=By(s.branch.source);s.workItems=zy([s.title,u?`#${u}`:null,s.branch.source,Z(t.description)],n.changes.keys,l);let d=s.author?.id.toLowerCase();s.reviewers=(Array.isArray(t.reviewers)?t.reviewers.filter(X):[]).flatMap(e=>{let t=by(e);return t?[{person:t,state:tb(e.vote)}]:[]});let f=jy(t);if(f.reviews){let e=[];for(let t of f.reviews.filter(X).filter(e=>e.isDeleted!==!0)){let n=Array.isArray(t.comments)?t.comments.filter(X):[];if(rb(t,`CodeReviewThreadType`)===`VoteUpdate`){let r=Number(rb(t,`CodeReviewVoteResult`)),i=by(n[0]?.author),a=Ay(s,`reviews`,t.publishedDate??n[0]?.publishedDate,`a vote thread's publishedDate`);i&&a&&Number.isFinite(r)&&e.push({by:i,state:r>=5?`APPROVED`:r<=-5?`CHANGES_REQUESTED`:`DISMISSED`,at:a});continue}let r=n[0];if(!r||r.commentType===`system`)continue;let i=by(r.author),a=Ay(s,`reviews`,r.publishedDate,`a comment's publishedDate`);i&&a&&i.id.toLowerCase()!==d&&e.push({by:i,state:`COMMENTED`,at:a})}Xy(s,e)}else for(let t of[`reviews`,`firstReviewAt`,`approvedAt`])ky(s,t,My(e,`reviews`));if(f.checks){let e=new Map;for(let t of f.checks.filter(X)){let n=X(t.context)?`${Z(t.context.genre)??``}/${Z(t.context.name)??``}`:String(t.id),r=String(t.updatedDate??t.creationDate??``),i=e.get(n);(!i||String(i.updatedDate??i.creationDate??``)<=r)&&e.set(n,t)}Zy(s,[...e.entries()].map(([e,t])=>({name:e,outcome:ib[String(t.state)]??`pending`,at:Ay(s,`checksAt`,t.updatedDate??t.creationDate,`a status's creationDate`)})))}else ky(s,`checks`,My(e,`checks`));return f.files?(s.size={files:f.files.filter(e=>!(X(e)&&X(e.item)&&e.item.isFolder===!0)).length,additions:null,deletions:null},ky(s,`size`,`Azure DevOps lists the files a pull request changes, not the lines, so additions and deletions are empty`)):ky(s,`size`,My(e,`files`)),qy(s,n,{account:(X(t.createdBy)?Z(t.createdBy.descriptor):null)?.startsWith(`svc.`)?{kind:`BOT`,signal:`account ${s.author?.name??s.author?.id??`unknown`}, a service identity`}:null,messages:f.commits?Qy(f.commits):null}),s}function sb(e){if(Array.isArray(e))return e.filter(X);if(X(e)&&(typeof e.id==`number`||typeof e.id==`string`))return[e]}var cb=(e,t)=>{t.changes.keys.length||ky(e,`workItems`,`Bitbucket has no tracker of its own, and no key patterns were given, so no work item keys were read: pass a key pattern such as PAY-{n}=<jira connection>`)},lb=(e,t,n)=>[Z(e.title),t,Z(n)],ub=e=>X(e)?dy(e.name??e.slug,e.displayName,e.emailAddress):null,db={APPROVED:`APPROVED`,NEEDS_WORK:`CHANGES_REQUESTED`,UNAPPROVED:`PENDING`},fb={APPROVED:`APPROVED`,REVIEWED:`CHANGES_REQUESTED`,UNAPPROVED:`DISMISSED`},pb={SUCCESSFUL:`pass`,FAILED:`fail`,CANCELLED:`fail`,INPROGRESS:`pending`,UNKNOWN:`pending`};function mb(e,t,n){let r=X(t.toRef)?t.toRef:{},i=X(t.fromRef)?t.fromRef:{},a=X(r.repository)?r.repository:{},o=X(a.project)?Z(a.project.key):null,s=Z(a.slug),c=o&&s?`${o}/${s}`:e.inputs.project&&e.inputs.repo?`${e.inputs.project}/${e.inputs.repo}`:null;if(!c||t.id===void 0)return;let l=String(t.id),u=Oy(e,c,l,Z(t.title)??`Pull request ${l}`,t);u.url=Z((X(t.links)&&Array.isArray(t.links.self)?t.links.self.filter(X):[])[0]?.href),u.branch={source:Z(i.displayId),target:Z(r.displayId)};let d=X(t.author)?t.author.user:void 0;u.author=ub(d),u.state=t.state===`MERGED`?`MERGED`:t.state===`DECLINED`?`DECLINED`:t.draft===!0?`DRAFT`:`OPEN`,u.created=Ay(u,`created`,t.createdDate,`createdDate`),u.updated=Ay(u,`updated`,t.updatedDate,`updatedDate`);let f=Ay(u,`closedAt`,t.closedDate,`closedDate`);u.closedAt=u.state===`MERGED`||u.state===`DECLINED`?f:null,u.mergedAt=u.state===`MERGED`?f:null;let p=X(t.properties)?t.properties:{};u.mergeCommit=u.state===`MERGED`&&X(p.mergeCommit)?Z(p.mergeCommit.id):null;let m=X(p.mergeResult)?p.mergeResult.outcome:void 0;u.mergeable=m===`CLEAN`||m!==`CONFLICTED`&&null,u.mergeable===null&&u.state===`OPEN`&&ky(u,`mergeable`,`Bitbucket sent no properties.mergeResult outcome for it`),u.workItems=zy(lb(t,u.branch.source,t.description),n.changes.keys),cb(u,n),u.reviewers=(Array.isArray(t.reviewers)?t.reviewers.filter(X):[]).flatMap(e=>{let t=ub(e.user);return t?[{person:t,state:db[String(e.status)]??`PENDING`}]:[]});let h=jy(t);if(h.reviews)Xy(u,h.reviews.filter(X).flatMap(e=>{let t=ub(e.user),n=fb[String(e.action)],r=Ay(u,`reviews`,e.createdDate,`an activity's createdDate`);return t&&n&&r?[{by:t,state:n,at:r}]:[]}));else for(let t of[`reviews`,`firstReviewAt`,`approvedAt`])ky(u,t,My(e,`reviews`));return h.checks?Zy(u,h.checks.filter(X).map(e=>({name:Z(e.name)??Z(e.key)??`build`,outcome:pb[String(e.state)]??`pending`,at:Ay(u,`checksAt`,e.dateAdded,`a build status's dateAdded`)}))):ky(u,`checks`,My(e,`checks`)),h.files?(u.size={files:h.files.length,additions:null,deletions:null},ky(u,`size`,`Bitbucket Data Center lists the files a pull request changes, not the lines, so additions and deletions are empty`)):ky(u,`size`,My(e,`files`)),qy(u,n,{account:X(d)&&d.type===`SERVICE`?{kind:`BOT`,signal:`account ${String(d.name??d.slug)}, type SERVICE`}:null,messages:h.commits?Qy(h.commits):null}),u}var hb=e=>X(e)?dy(e.account_id??e.uuid??e.nickname,e.display_name??e.nickname,null):null,gb={SUCCESSFUL:`pass`,FAILED:`fail`,STOPPED:`fail`,INPROGRESS:`pending`};function _b(e,t,n){let r=X(t.destination)?t.destination:{},i=X(t.source)?t.source:{},a=(X(r.repository)?Z(r.repository.full_name):null)??(e.inputs.workspace&&e.inputs.repo?`${e.inputs.workspace}/${e.inputs.repo}`:null);if(!a||t.id===void 0)return;let o=String(t.id),s=Oy(e,a,o,Z(t.title)??`Pull request ${o}`,t);s.url=X(t.links)&&X(t.links.html)?Z(t.links.html.href):null,s.branch={source:X(i.branch)?Z(i.branch.name):null,target:X(r.branch)?Z(r.branch.name):null},s.author=hb(t.author),s.state=t.state===`MERGED`?`MERGED`:t.state===`DECLINED`||t.state===`SUPERSEDED`?`DECLINED`:t.draft===!0?`DRAFT`:`OPEN`,s.created=Ay(s,`created`,t.created_on,`created_on`),s.updated=Ay(s,`updated`,t.updated_on,`updated_on`),(s.state===`MERGED`||s.state===`DECLINED`)&&(ky(s,`mergedAt`,`Bitbucket Cloud's pull request records no merge or close time; updated is the nearest it has`),ky(s,`closedAt`,`Bitbucket Cloud's pull request records no merge or close time; updated is the nearest it has`)),s.mergeCommit=s.state===`MERGED`&&X(t.merge_commit)?Z(t.merge_commit.hash):null,(s.state===`OPEN`||s.state===`DRAFT`)&&ky(s,`mergeable`,`Bitbucket Cloud's pull request doesn't say whether it merges cleanly`);let c=Z(t.description)??(X(t.summary)?Z(t.summary.raw):null);s.workItems=zy(lb(t,s.branch.source,c),n.changes.keys),cb(s,n);let l=new Map;for(let e of Array.isArray(t.reviewers)?t.reviewers:[]){let t=hb(e);t&&l.set(t.id,{person:t,state:`PENDING`})}for(let e of Array.isArray(t.participants)?t.participants.filter(X):[]){let t=hb(e.user);t&&(e.role===`REVIEWER`||e.state)&&l.set(t.id,{person:t,state:e.state===`approved`||e.approved===!0?`APPROVED`:e.state===`changes_requested`?`CHANGES_REQUESTED`:`PENDING`})}s.reviewers=[...l.values()];let u=jy(t);if(u.reviews)Xy(s,u.reviews.filter(X).flatMap(e=>{let t=X(e.approval)?{e:e.approval,kind:`APPROVED`}:X(e.changes_requested)?{e:e.changes_requested,kind:`CHANGES_REQUESTED`}:null;if(!t)return[];let n=hb(t.e.user),r=Ay(s,`reviews`,t.e.date,`an activity entry's date`);return n&&r?[{by:n,state:t.kind,at:r}]:[]}));else for(let t of[`reviews`,`firstReviewAt`,`approvedAt`])ky(s,t,My(e,`reviews`));if(u.checks?Zy(s,u.checks.filter(X).map(e=>({name:Z(e.name)??Z(e.key)??`build`,outcome:gb[String(e.state)]??`pending`,at:Ay(s,`checksAt`,e.updated_on??e.created_on,`a status's updated_on`)}))):ky(s,`checks`,My(e,`checks`)),u.files){let e=u.files.filter(X);s.size={files:e.length,additions:e.reduce((e,t)=>e+(Qv(t.lines_added)??0),0),deletions:e.reduce((e,t)=>e+(Qv(t.lines_removed)??0),0)}}else ky(s,`size`,My(e,`files`));let d=X(t.author)?t.author:{};return qy(s,n,{account:d.type===`app_user`?{kind:`BOT`,signal:`account ${String(d.display_name??d.account_id)}, an app user`}:null,messages:u.commits?Qy(u.commits):null}),s}var vb=[`Estimate`,`Size`,`Story Points`],yb=`Status`,bb={todo:`TODO`,"to do":`TODO`,backlog:`TODO`,ready:`TODO`,new:`TODO`,"in progress":`IN_PROGRESS`,doing:`IN_PROGRESS`,"in review":`IN_PROGRESS`,done:`DONE`},xb=/^(?:story[ -]?points?|points?|pts|sp|estimate)\s*[:=/ -]\s*(\d+(?:\.\d+)?)$/i,Sb=`"points: N", "story points: N", "pts: N", "sp: N" or "estimate: N"`;function Cb(e){let t=e.split(`{n}`);if(t.length!==2)throw new Xv(`INVALID_INPUT`,`estimateLabel "${e}" must hold {n} exactly once, where the number is.`,{fix:`Write the label with {n} for the number, for example estimateLabel=points: {n} or estimateLabel=size/{n}.`});let n=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`^${n(t[0])}(\\d+(?:\\.\\d+)?)${n(t[1])}$`,`i`)}function wb(e){let t=Qv(e.number);if(t===null)return;let n=Z(e.html_url),r=n?/^https?:\/\/[^/]+(?:\/[^/]+)*?\/([^/]+)\/([^/]+)\/issues\/\d+$/.exec(n):null;if(r)return`${r[1]}/${r[2]}#${t}`;let i=Z(e.repository_url),a=i?/\/repos\/([^/]+)\/([^/]+)$/.exec(i):null;return a?`${a[1]}/${a[2]}#${t}`:void 0}var Tb=e=>{let t=typeof e==`string`?/\/repos\/([^/]+)\/([^/]+)\/issues\/(\d+)$/.exec(e):null;return t?`${t[1]}/${t[2]}#${t[3]}`:void 0},Eb=e=>X(e)?dy(e.login,e.name,e.email):null;function Db(e){let t=Array.isArray(e)?e:X(e)&&Array.isArray(e.issues)?e.issues:X(e)&&typeof e.number==`number`?[e]:void 0;if(!t)return;let n=t.filter(X),r=n.filter(e=>e.pull_request===void 0);return{issues:r,pulls:n.length-r.length}}function Ob(e,t,n){let r=wb(t);if(r===void 0)return;let i=iy(e,r,Z(t.title)??``,{[e.command]:t});i.url=Z(t.html_url),i.typeName=X(t.type)?Z(t.type.name):null,i.type=ry(i.typeName),t.type===void 0&&oy(i,`type`,`the record has no type field: this GitHub server doesn't have issue types`),typeof t.body==`string`&&(i.body={format:`markdown`,content:t.body}),i.status=Z(t.state),i.statusCategory=i.status===`closed`?`DONE`:i.status===`open`?`TODO`:`UNKNOWN`,i.resolution=i.status===`closed`?Z(t.state_reason):null,i.assignee=Array.isArray(t.assignees)&&t.assignees.length>0?Eb(t.assignees[0]):Eb(t.assignee),i.reporter=Eb(t.user),i.labels=(Array.isArray(t.labels)?t.labels:[]).flatMap(e=>typeof e==`string`?[e]:X(e)&&typeof e.name==`string`?[e.name]:[]);let a=Tb(t.parent_issue_url);a&&(i.parent=ay(e.connection,a)),Array.isArray(t.sub_issues)&&(i.children=t.sub_issues.flatMap(t=>X(t)&&wb(t)?[ay(e.connection,wb(t))]:[])),sy(i,`created`,t.created_at,`created_at`),sy(i,`updated`,t.updated_at,`updated_at`),sy(i,`resolved`,t.closed_at,`closed_at`),kb(i,n),i.links=Mb(e.connection,r,typeof t.body==`string`?t.body:``);let o=X(t.issue_dependencies_summary)?t.issue_dependencies_summary:{},s=Qv(o.total_blocked_by)??0,c=Qv(o.total_blocking)??0;return s+c>0&&oy(i,`links`,`GitHub records ${s} blocked-by and ${c} blocking issue dependencies for this issue, which no toil command reads yet: only "Blocked by #n", "Depends on #n" and "Blocks #n" in the body are mapped`),i}function kb(e,t){let n=t.fields.estimateLabel===void 0?xb:Cb(t.fields.estimateLabel),r=e.labels.flatMap(e=>{let t=n.exec(e.trim());return t?[{label:e,value:Number(t[1])}]:[]});r.length===1?e.estimate={value:r[0].value,unit:uy(t),field:`label:${r[0].label}`}:r.length>1&&oy(e,`estimate`,`${r.length} labels hold an estimate (${r.map(e=>`"${e.label}"`).join(`, `)}), so none was picked: keep one`)}var Ab=/\b(blocked by|depends on|blocks)\s*(?::\s*)?((?:[\w.-]+\/[\w.-]+)?#\d+(?:\s*(?:,|and|&)\s*(?:[\w.-]+\/[\w.-]+)?#\d+)*)/gi,jb=/(?:([\w.-]+)\/([\w.-]+))?#(\d+)/g;function Mb(e,t,n){let r=t.slice(0,t.lastIndexOf(`#`)),i=n.replace(/```[\s\S]*?(?:```|$)/g,` `).replace(/`[^`\n]*`/g,` `),a=[];for(let n of i.matchAll(Ab)){let i=n[1].toLowerCase();for(let o of n[2].matchAll(jb)){let n=`${o[1]?`${o[1]}/${o[2]}`:r}#${o[3]}`;if(n===t)continue;let s={type:`blocks`,direction:i===`blocks`?`outward`:`inward`,target:ay(e,n),name:i};a.some(e=>e.direction===s.direction&&e.target===s.target)||a.push(s)}}return a}function Nb(e,t){for(let n of e)for(let e of[...n.links]){let r=e.type===`blocks`?t.get(e.target):void 0;if(!r)continue;let i=e.direction===`inward`?`outward`:`inward`;r.links.some(e=>e.type===`blocks`&&e.target===n.id&&e.direction===i)||r.links.push({type:`blocks`,direction:i,target:n.id,name:i===`outward`?`blocks`:`blocked by`})}}function Pb(e){let t=X(e.milestone)?e.milestone:null,n=t?Qv(t.number):null,r=t?Z(t.title):null;return!t||n===null||r===null?null:{number:n,title:r,due:ey(t.due_on)??null,closed:t.state===`closed`}}function Fb(e,t){let n=t.fields.iterationDays===void 0?void 0:Number(t.fields.iterationDays),r=e=>`${e.source.connection}\u0000${e.source.key.slice(0,e.source.key.lastIndexOf(`#`))}`,i=new Map;for(let{item:t,issue:n}of e){let e=Pb(n);if(!e)continue;let a=i.get(r(t))??new Map;i.set(r(t),a),a.set(e.number,e)}let a=new Map;for(let[e,t]of i){let r=[...t.values()].filter(e=>e.due!==null).sort((e,t)=>e.due<t.due?-1:1);for(let i of t.values()){let t=null;if(i.due!==null){let e=n===void 0?r.filter(e=>e.due<i.due).at(-1):void 0;t=e?e.due:new Date(Date.parse(i.due)-(n??14)*864e5).toISOString()}a.set(`${e}\u0000${i.number}`,{id:String(i.number),name:i.title,path:null,start:t,end:i.due,state:i.closed?`past`:null})}}for(let{item:t,issue:n}of e){let e=Pb(n),i=e?a.get(`${r(t)}\u0000${e.number}`):void 0;i&&(t.iteration={...i})}}function Ib(e){if(!Array.isArray(e.data)||!e.data.every(e=>X(e)&&`fieldValues`in e))return;let t=[],n=0;for(let r of e.data){let i=X(r.content)?r.content:{},a=new Map;for(let e of Array.isArray(r.fieldValues)?r.fieldValues:[])X(e)&&X(e.field)&&typeof e.field.name==`string`&&a.set(e.field.name,e);if(r.type===`PULL_REQUEST`){n++;continue}if(r.type===`DRAFT_ISSUE`){typeof r.id==`string`&&t.push({key:`${e.inputs.owner??`project`}/draft/${r.id}`,item:r,values:a,draft:!0});continue}let o=X(i.repository)?Z(i.repository.nameWithOwner):null,s=Qv(i.number);o&&s!==null&&t.push({key:`${o}#${s}`,item:r,values:a,draft:!1})}return{entries:t,pulls:n}}function Lb(e,t){let n=X(t.item.content)?t.item.content:{},r=iy(e,t.key,Z(n.title)??``,{});if(r.url=Z(n.url),r.typeName=t.draft?`Draft issue`:null,r.status=t.draft?null:Z(n.state)?.toLowerCase()??null,r.statusCategory=r.status===`closed`?`DONE`:`TODO`,sy(r,`created`,t.item.createdAt,`createdAt`),sy(r,`updated`,n.updatedAt??null,`updatedAt`),!t.draft)for(let e of[`type`,`assignee`,`reporter`,`labels`,`parent`])oy(r,e,`the board carries only the title, state and URL: add github issue get output for this issue to the input`);return r}function Rb(e,t,n,r){e.native[n.command]=t.item;let i=t.values.get(yb),a=i?Z(i.name):null;a!==null&&e.status!==`closed`&&(e.status=a,e.statusCategory=bb[a.toLowerCase()]??ly(e,r,a,`a board status option of the project's own`));let o=r.fields.estimate,s=o??vb.find(e=>Qv(t.values.get(e)?.number)!==null),c=s===void 0?null:Qv(t.values.get(s)?.number);s!==void 0&&c!==null?(zb(e,`estimate`),e.estimate={value:c,unit:uy(r),field:s}):e.estimate===null&&oy(e,`estimate`,`${o?`the board item has no number in "${o}" (fields estimate)`:`the board item has no number in a field named ${vb.map(e=>`"${e}"`).join(`, `)} (point fields estimate at the project's own)`}, and no label holds one (${Bb(r)})`);let l=(t,n)=>oy(e,n,`the board item has no value in "${t}": the field is empty, or the project has no field of that name (fields ${n})`),u=r.fields.iteration,d=u?t.values.get(u):[...t.values.values()].find(e=>e.__typename===`ProjectV2ItemFieldIterationValue`);if(d&&Z(d.title)){zb(e,`iteration`);let t=ey(d.startDate)??null,n=Qv(d.duration),r=t&&n!==null?new Date(Date.parse(t)+n*864e5).toISOString():null;e.iteration={id:Z(d.iterationId),name:d.title,path:null,start:t,end:r,state:null}}else e.iteration===null&&(u?l(u,`iteration`):oy(e,`iteration`,`the board item has no iteration value (it isn't in an iteration, or the project has no iteration field), and the issue has no milestone`));for(let n of[`priority`,`team`,`dueDate`]){let i=r.fields[n];if(i===void 0)continue;zb(e,n);let a=t.values.get(i),o=a?Z(a.name)??Z(a.text)??Z(a.date)??(Qv(a.number)===null?null:String(a.number)):null;o===null?l(i,n):n===`dueDate`?cy(e,o,i):e[n]=o}if(r.fields.type!==void 0){let n=t.values.get(r.fields.type),i=n?Z(n.name)??Z(n.text):null;zb(e,`type`),i?(e.typeName=i,e.type=ry(i)):l(r.fields.type,`type`)}}var zb=(e,t)=>{e.unmapped=e.unmapped.filter(e=>e.field!==t)},Bb=e=>e.fields.estimateLabel===void 0?Sb:`"${e.fields.estimateLabel}" (fields estimateLabel)`;function Vb(e,t){e.estimate===null&&oy(e,`estimate`,`no label holds an estimate (${Bb(t)}), and no project board covers the issue: label it, name the team's own label with fields estimateLabel, or add github project items output to the input`),e.iteration===null&&oy(e,`iteration`,`the issue has no milestone, and no project board covers it: set a milestone, or add github project items output to the input`);for(let n of[`priority`,`team`,`dueDate`,`type`])t.fields[n]!==void 0&&oy(e,n,`"${t.fields[n]}" is a project field: add github project items output to the input`)}function Hb(e){if(!Array.isArray(e.data))return;let t={transitions:[],iterations:[]};for(let n of e.data){if(!X(n))continue;let e=ey(n.created_at);if(!e)continue;let r=Eb(n.actor);if(n.event===`closed`)t.transitions.push({from:`open`,to:`closed`,fromCategory:`TODO`,toCategory:`DONE`,at:e,by:r});else if(n.event===`reopened`)t.transitions.push({from:`closed`,to:`open`,fromCategory:`DONE`,toCategory:`TODO`,at:e,by:r});else if(n.event===`milestoned`||n.event===`demilestoned`){let i=X(n.milestone)?Z(n.milestone.title):null;if(i===null)continue;let a=n.event===`milestoned`?`to`:`from`,o=t.iterations.at(-1);o&&o.at===e&&o[a].length===0?o[a]=[i]:t.iterations.push({from:a===`from`?[i]:[],to:a===`to`?[i]:[],at:e,by:r})}}return t}function Ub(e){if(Array.isArray(e))return e.filter(X);if(X(e)&&typeof e.number==`number`)return[e]}var Wb={APPROVED:`APPROVED`,CHANGES_REQUESTED:`CHANGES_REQUESTED`,COMMENTED:`COMMENTED`,DISMISSED:`DISMISSED`},Gb=new Set([`failure`,`timed_out`,`cancelled`,`action_required`,`startup_failure`,`stale`]);function Kb(e){if(!X(e))return null;let t=Z(e.login)??``;return Gy.includes(t.toLowerCase())?{kind:`AGENT`,signal:`account ${t}, a coding agent's`}:e.type===`Bot`||t.endsWith(`[bot]`)?{kind:`BOT`,signal:`account ${t}, type Bot`}:null}function qb(e,t){let n=X(e.base)&&X(e.base.repo)?Z(e.base.repo.full_name):null;if(n)return n;let{owner:r,repo:i}=t.inputs;return r&&i?`${r}/${i}`:null}function Jb(e,t,n){let r=qb(t,e);if(!r||typeof t.number!=`number`)return;let i=String(t.number),a=Oy(e,r,i,Z(t.title)??`Pull request ${i}`,t);a.url=Z(t.html_url),a.branch={source:X(t.head)?Z(t.head.ref):null,target:X(t.base)?Z(t.base.ref):null},a.author=Eb(t.user),a.state=Z(t.merged_at)?`MERGED`:t.state===`closed`?`DECLINED`:t.draft===!0?`DRAFT`:`OPEN`,a.created=Ay(a,`created`,t.created_at,`created_at`),a.updated=Ay(a,`updated`,t.updated_at,`updated_at`),a.mergedAt=Ay(a,`mergedAt`,t.merged_at,`merged_at`),a.closedAt=Ay(a,`closedAt`,t.closed_at,`closed_at`),a.mergeCommit=a.state===`MERGED`?Z(t.merge_commit_sha):null;let o=t=>[...[...t.matchAll(Vy)].map(t=>ay(e.connection,`${r}#${t[1]}`)),...[...t.matchAll(/(?<![\w.-])([\w.-]+\/[\w.-]+)#(\d+)\b/g)].map(t=>ay(e.connection,`${t[1]}#${t[2]}`))],s=By(a.branch.source);a.workItems=zy([a.title,s?`#${s}`:null,a.branch.source,Z(t.body)],n.changes.keys,o).filter(e=>e!==a.id);let c=jy(t),l=Array.isArray(t.requested_reviewers)?t.requested_reviewers.flatMap(e=>Eb(e)?[Eb(e)]:[]):[],u=Array.isArray(t.requested_teams)?t.requested_teams.flatMap(e=>X(e)&&Z(e.slug)?[{id:`team:${Z(e.slug)}`,name:Z(e.name),email:null}]:[]):[],d=new Map;if(c.reviews){let e=[];for(let t of c.reviews){if(!X(t))continue;let n=Eb(t.user),r=Wb[String(t.state)],i=Ay(a,`reviews`,t.submitted_at,`a review's submitted_at`);n&&r&&i&&e.push({by:n,state:r,at:i})}Xy(a,e);for(let e of a.reviews)e.state===`APPROVED`||e.state===`CHANGES_REQUESTED`?d.set(e.by.id,{person:e.by,state:e.state}):(e.state===`DISMISSED`||!d.has(e.by.id)&&e.by.id!==a.author?.id)&&d.set(e.by.id,{person:e.by,state:`PENDING`})}else ky(a,`reviews`,My(e,`reviews`)),ky(a,`firstReviewAt`,My(e,`reviews`)),ky(a,`approvedAt`,My(e,`reviews`));for(let e of[...l,...u])d.set(e.id,{person:e,state:`PENDING`});a.reviewers=[...d.values()].filter(e=>e.person.id!==a.author?.id),c.checks?Zy(a,c.checks.filter(X).map(e=>({name:Z(e.name)??`check`,outcome:e.status===`completed`?Gb.has(String(e.conclusion))?`fail`:`pass`:`pending`,at:Ay(a,`checksAt`,e.completed_at??e.started_at,`a check run's completed_at`)}))):ky(a,`checks`,My(e,`checks`)),typeof t.mergeable==`boolean`?a.mergeable=t.mergeable:(a.state===`OPEN`||a.state===`DRAFT`)&&ky(a,`mergeable`,e.command.endsWith(` pr list`)?`${e.command} doesn't say whether a pull request merges cleanly: map ${e.area} pr get`:`GitHub had not worked out mergeability yet (mergeable was null); read it again in a moment`);let f=c.files?.filter(X),p=Qv(t.additions)??(f?f.reduce((e,t)=>e+(Qv(t.additions)??0),0):null),m=Qv(t.deletions)??(f?f.reduce((e,t)=>e+(Qv(t.deletions)??0),0):null),h=Qv(t.changed_files)??(f?f.length:null);return p!==null||m!==null||h!==null?a.size={files:h,additions:p,deletions:m}:ky(a,`size`,`${e.command} doesn't say how big a pull request is: map ${e.area} pr get`),qy(a,n,{account:Kb(t.user),messages:c.commits?Qy(c.commits):null}),a}var Yb=[`Story Points`,`Story point estimate`],Xb=`timeoriginalestimate`,Zb=`Epic Link`,Qb={new:`TODO`,indeterminate:`IN_PROGRESS`,done:`DONE`};function $b(e){if(X(e)&&Array.isArray(e.issues))return e.issues.filter(X);if(X(e)&&typeof e.key==`string`&&X(e.fields))return[e]}function ex(e,t){let n=e.fields??{};if(t in n)return t;if(X(e.names)){for(let[r,i]of Object.entries(e.names))if(i===t&&r in n)return r}}var tx=e=>X(e)?dy(e.accountId??e.name??e.key,e.displayName,e.emailAddress):null;function nx(e){let t;if(X(e))t=e;else if(typeof e==`string`){let n=/\[(.*)\]\s*$/s.exec(e)?.[1];if(n===void 0)return;t={};for(let e of n.split(/,(?=[A-Za-z]+=)/)){let n=e.indexOf(`=`);n>0&&(t[e.slice(0,n)]=e.slice(n+1)===`<null>`?null:e.slice(n+1))}}let n=Z(t?.name);if(!t||n===null)return;let r=String(t.state??``).toLowerCase();return{id:t.id===void 0||t.id===null?null:String(t.id),name:n,path:null,start:ey(t.startDate)??null,end:ey(t.endDate)??null,state:r===`active`?`current`:r===`closed`?`past`:r===`future`?`future`:null}}var rx={blocks:`blocks`,duplicate:`duplicates`,relates:`relates`};function ix(e,t,n,r){let i=Z(t.key);if(i===null)return;let a=t.fields??{},o=iy(e,i,Z(a.summary)??``,{[e.command]:t});Z(a.summary)===null&&oy(o,`title`,`the record has no summary`);let s=Z(t.self);s?.includes(`/rest/`)?o.url=`${s.slice(0,s.indexOf(`/rest/`))}/browse/${encodeURIComponent(i)}`:oy(o,`url`,`the record has no self link to take the site from`);let c=n.fields.type,l=c===void 0?X(a.issuetype)?Z(a.issuetype.name):null:$v(a[c]);if(c!==void 0&&!(c in a)&&oy(o,`type`,`the record has no field "${c}" (fields type)`),o.typeName=l,o.type=c===void 0&&X(a.issuetype)&&a.issuetype.subtask===!0?`TASK`:ry(l),typeof a.description==`string`?o.body={format:`wiki`,content:a.description}:X(a.description)&&(o.body={format:`adf`,content:a.description}),X(a.status)){o.status=Z(a.status.name);let e=X(a.status.statusCategory)?Z(a.status.statusCategory.key):null,t=e===null?void 0:Qb[e];t&&o.status&&r.set(o.status,t),o.statusCategory=t??ly(o,n,o.status??`(none)`,e===null?`the status came without its statusCategory`:`its statusCategory is "${e}"`)}else oy(o,`status`,`the record has no status field`);o.resolution=X(a.resolution)?Z(a.resolution.name):null,o.assignee=tx(a.assignee),o.reporter=tx(a.reporter);let u=n.fields.priority??`priority`;o.priority=$v(a[u]),n.fields.priority!==void 0&&!(u in a)&&oy(o,`priority`,`the record has no field "${u}" (fields priority)`),o.labels=Array.isArray(a.labels)?a.labels.filter(e=>typeof e==`string`):[],n.fields.team!==void 0&&(n.fields.team in a?o.team=$v(a[n.fields.team]):oy(o,`team`,`the record has no field "${n.fields.team}" (fields team)`)),ax(o,t,n),ox(o,t,n);let d=X(a.parent)?Z(a.parent.key):Z(a[ex(t,Zb)??Zb])??null;o.parent=d===null?null:ay(e.connection,d),o.children=(Array.isArray(a.subtasks)?a.subtasks:[]).flatMap(t=>X(t)&&typeof t.key==`string`?[ay(e.connection,t.key)]:[]);for(let t of Array.isArray(a.issuelinks)?a.issuelinks:[]){if(!X(t)||!X(t.type))continue;let n=X(t.outwardIssue)?Z(t.outwardIssue.key):null,r=X(t.inwardIssue)?Z(t.inwardIssue.key):null,i=n??r;i!==null&&o.links.push({type:rx[String(t.type.name??``).toLowerCase()]??`other`,direction:n===null?`inward`:`outward`,target:ay(e.connection,i),name:Z(n===null?t.type.inward:t.type.outward)??Z(t.type.name)??``})}sy(o,`created`,a.created,`created`),sy(o,`updated`,a.updated,`updated`),sy(o,`resolved`,a.resolutiondate,`resolutiondate`);let f=n.fields.dueDate??`duedate`;return n.fields.dueDate!==void 0&&!(f in a)?oy(o,`dueDate`,`the record has no field "${f}" (fields dueDate)`):cy(o,a[f],f),`created`in a||oy(o,`created`,`the record has no created field`),o}function ax(e,t,n){let r=t.fields??{},i=n.fields.estimate;if(i!==void 0){let a=ex(t,i);if(a===void 0)return oy(e,`estimate`,`the record has no field "${i}" (fields estimate)`);let o=Qv(r[a]);if(o===null){r[a]!==null&&r[a]!==void 0&&oy(e,`estimate`,`"${i}" holds ${JSON.stringify(r[a])}, not a number`);return}if(a===`timeoriginalestimate`){if(n.fields.estimateUnit!==void 0&&n.fields.estimateUnit!==`hours`)return oy(e,`estimate`,`${Xb} is in seconds, which OWI reads as hours, not ${n.fields.estimateUnit}`);e.estimate={value:o/3600,unit:`hours`,field:a}}else e.estimate={value:o,unit:uy(n),field:a};return}let a=!1;for(let n of Yb){let i=ex(t,n);if(i===void 0)continue;a=!0;let o=Qv(r[i]);if(o!==null)return void(e.estimate={value:o,unit:`points`,field:i})}if(`timeoriginalestimate`in r){a=!0;let t=Qv(r[Xb]);if(t!==null)return void(e.estimate={value:t/3600,unit:`hours`,field:Xb})}a||oy(e,`estimate`,`the record has none of ${[...Yb,Xb].map(e=>`"${e}"`).join(`, `)}: register the estimate field in the connection's customFields, ask for it with --fields, or point fields estimate at it`)}function ox(e,t,n){let r=n.fields.iteration??`Sprint`,i=ex(t,r);if(i===void 0){oy(e,`iteration`,`the record has no "${r}" field: register the sprint field in the connection's customFields, or point fields iteration at it`);return}let a=t.fields?.[i],o=(a==null?[]:Array.isArray(a)?a:[a]).map(nx);o.some(e=>e===void 0)&&oy(e,`iteration`,`"${i}" holds a value that isn't a sprint`),e.iteration=fy(o.filter(e=>e!==void 0))}function sx(e,t,n){if(!Array.isArray(e.data))return;let r=t.fields.iteration??`Sprint`,i={transitions:[],iterations:[]};for(let t of e.data){if(!X(t)||!Array.isArray(t.items))continue;let e=ey(t.created);if(!e)continue;let a=tx(t.author);for(let o of t.items){if(!X(o))continue;let t=String(o.field??``),s=Object.hasOwn(o,`toString`)?Z(o.toString):null;if(t.toLowerCase()===`status`&&s!==null){let t=Z(o.fromString),r=s;i.transitions.push({from:t,to:r,fromCategory:t===null?null:n(t)??`UNKNOWN`,toCategory:n(r)??`UNKNOWN`,at:e,by:a})}else if(t===r||o.fieldId===r){let t=e=>(Z(e)??``).split(`,`).map(e=>e.trim()).filter(Boolean);i.iterations.push({from:t(o.fromString),to:t(s),at:e,by:a})}}}return i}var cx=5e3,lx=Object.fromEntries(Object.entries(Kv).map(([e,t])=>[e,{items:t.items.map(t=>`${e} ${t}`),history:t.history.map(t=>`${e} ${t}`),context:t.context.map(t=>`${e} ${t}`),changes:t.changes.map(t=>`${e} ${t}`)}])),ux={jira:()=>`Jira's changelog names statuses only, and a status no item in the input is in has no category to learn`,ado:e=>`a state in the revisions is a custom one, outside the default states OWI knows; ${e} work-item states shows its category`,github:()=>`GitHub issues are only open or closed, so this should not happen; the history is kept as it was read`,bitbucket:()=>`Bitbucket has no work items, so this should not happen`,"bitbucket-cloud":()=>`Bitbucket has no work items, so this should not happen`},dx=Object.fromEntries(Object.entries(Kv).filter(([,e])=>e.family===`ado`).map(([e])=>[`${e} work-item search`,`it returns work item ids only: fetch their fields with ${e} work-item get-many and map that`])),fx=e=>X(e)&&`ok`in e&&X(e.meta)&&typeof e.meta.command==`string`;function px(e){let t=e.trim();if(t===``)throw new Xv(`INVALID_INPUT`,`The input is empty.`,{fix:`Pipe a toil command's output in (toil jira issue search … | toil util owi map), or pass the file that holds it.`});try{return mx(JSON.parse(t))}catch{}return t.split(/\r?\n/).flatMap((e,t)=>{if(e.trim()===``)return[];try{return[JSON.parse(e)]}catch(e){throw new Xv(`INVALID_INPUT`,`Line ${t+1} of the input isn't JSON (${e.message}), and the input as a whole isn't one JSON value either.`,{fix:`Pass one envelope, a JSON array of envelopes, or one envelope a line.`})}})}function mx(e){return Array.isArray(e)&&e.length>0&&e.every(e=>fx(e)||hx(e))?e:[e]}var hx=e=>X(e)&&typeof e.key==`string`&&`history`in e&&Object.keys(e).length===2;function gx(e,t={}){let n=[],r=[];return e.forEach((e,i)=>{let a=`document ${i+1}`,o=hx(e)?e:void 0,s=o?o.history:e,c=o?.key??t.key,l,u,d,f={};if(fx(s)){if(l=s.meta.command,s.ok!==!0){let e=X(s.error)?Z(s.error.code):null;r.push({at:a,command:l,reason:`the call failed${e?` (${e})`:``}, so there is nothing to map`});return}u=s.data;let e=X(s.meta.context)?s.meta.context:{};if(d=X(e.connection)?Z(e.connection.value)??void 0:void 0,X(e.inputs))for(let[t,n]of Object.entries(e.inputs))X(n)&&typeof n.value==`string`&&(f[t]=n.value)}else if(t.command!==void 0)l=t.command,u=s;else throw new Xv(`INVALID_INPUT`,`${a} of the input isn't a toil envelope, so it doesn't say which command it came from.`,{fix:`Pass the whole envelope a command printed, or name the command with --command (for example --command "jira issue search") when passing its data alone.`});let p=[...qv].sort((e,t)=>t.length-e.length).find(e=>l.startsWith(`${e} `)),m=p?lx[p]:void 0;if(!p||!m||![...m.items,...m.history,...m.context,...m.changes].includes(l)){if(dx[l]){r.push({at:a,command:l,reason:dx[l]});return}let e=Object.values(lx).flatMap(e=>[...e.items,...e.history,...e.context,...e.changes]);throw new Xv(`INVALID_INPUT`,`${a} is the output of "${l}", which OWI doesn't map.`,{fix:`Map the output of one of: ${e.join(`, `)}.`})}n.push({area:p,command:l,connection:d??p,data:u,inputs:f,at:a,...c===void 0?{}:{key:c}})}),{documents:n,skipped:r}}function _x(e){let t=Array.isArray(e)?e.map(e=>{let t=e.indexOf(`=`);if(t<=0||t===e.length-1)throw new Xv(`INVALID_INPUT`,`"${e}" isn't a field override.`,{fix:`Write it as name=field, for example estimate=customfield_10234 or estimateUnit=hours.`});return[e.slice(0,t),e.slice(t+1)]}):Object.entries(e??{}),n={};for(let[e,r]of t){if(!Jv.includes(e))throw new Xv(`INVALID_INPUT`,`"${e}" isn't an OWI field that can be pointed at a field of your own.`,{fix:`Use one of: ${Jv.join(`, `)}.`});if(e===`estimateUnit`&&![`points`,`hours`,`days`].includes(r))throw new Xv(`INVALID_INPUT`,`estimateUnit must be points, hours or days, not "${r}".`,{fix:`Pass estimateUnit=points, estimateUnit=hours or estimateUnit=days.`});if(e===`estimateLabel`&&Cb(r),e===`iterationDays`&&!(/^\d+$/.test(r)&&Number(r)>=1&&Number(r)<=366))throw new Xv(`INVALID_INPUT`,`iterationDays must be a whole number of days from 1 to 366, not "${r}".`,{fix:`Pass the sprint length in days, for example iterationDays=14.`});n[e]=r}return n}function vx(e,t={}){let n=Zv(),r={fields:t.fields??{},warn:n.warn},i=[...t.skipped??[]],a=new Map,o=0,s=0,c=(e,t)=>{if(!e)return void i.push({at:t.at,command:t.command,reason:`a record has no key to name the item by`});let n=a.get(e.id);n&&(o++,e.native={...n.native,...e.native}),a.set(e.id,e)},l=e=>t=>lx[t.area]?.[e].includes(t.command)===!0,u=e.filter(l(`items`)),d=e.filter(l(`history`)),f=e.filter(l(`context`)),p=new Map;for(let e of f){let t=p.get(e.connection)??new Map;p.set(e.connection,t),Cy(e.data,t)||i.push({at:e.at,command:e.command,reason:`it doesn't hold an iteration tree`})}let m=new Map,h=[],g=[];for(let e of u){let t=Kv[e.area].family;if(t===`jira`){let t=$b(e.data);t||i.push({at:e.at,command:e.command,reason:`it doesn't hold Jira issues`});let n=m.get(e.connection)??new Map;m.set(e.connection,n);for(let i of t??[])c(ix(e,i,r,n),e)}else if(t===`ado`){let t=yy(e.data);t||i.push({at:e.at,command:e.command,reason:`it doesn't hold work items`});for(let n of t??[])c(wy(e,n,r,p.get(e.connection)??new Map),e)}else if(e.command===`${e.area} project items`){let t=Ib(e);t?(h.push({doc:e,entries:t.entries}),s+=t.pulls):i.push({at:e.at,command:e.command,reason:`it doesn't hold project items`})}else{let t=Db(e.data);t||i.push({at:e.at,command:e.command,reason:`it doesn't hold GitHub issues`}),s+=t?.pulls??0;for(let n of t?.issues??[]){let t=Ob(e,n,r);c(t,e),t&&g.push({item:t,issue:n})}}}Fb(g,r);let _=new Set;for(let{doc:e,entries:t}of h)for(let n of t){let t=ay(e.connection,n.key);_.add(t);let i=a.get(t);i||(i=Lb(e,n),a.set(t,i)),Rb(i,n,e,r)}for(let e of a.values())Kv[e.source.area]?.family===`github`&&!_.has(e.id)&&Vb(e,r);Nb(g.map(e=>e.item).filter(e=>a.get(e.id)===e),a);let v=[],y=(e,t,n)=>{let r=ay(e.connection,t),i=a.get(r);if(!i)return void v.push({id:r,history:n});i.history=i.history?{transitions:[...i.history.transitions,...n.transitions],iterations:[...i.history.iterations,...n.iterations]}:n,i.native[e.command]=e.data};for(let e of d){let t=Kv[e.area].family;if(t===`ado`){let t=Dy(e,r);t||i.push({at:e.at,command:e.command,reason:`it doesn't hold revisions`});for(let[n,r]of t??[])y(e,n,r);continue}let n=bx(e);if(n===void 0){i.push({at:e.at,command:e.command,reason:`its output doesn't say which ${t===`github`?`issue`:`issue key`} it belongs to: wrap it as { "key": "…", "history": <envelope> }, or pass --key`});continue}let a=m.get(e.connection)??new Map,o=t===`github`?Hb(e):sx(e,r,e=>a.get(e));o?y(e,n,o):i.push({at:e.at,command:e.command,reason:`it doesn't hold a history`})}for(let e of a.values())e.history?.transitions.some(e=>e.toCategory===`UNKNOWN`||e.fromCategory===`UNKNOWN`)&&oy(e,`history.transitions`,`some statuses in the history have no category: ${ux[Kv[e.source.area]?.family??`jira`](e.source.area)}`);let b=yx(e.filter(l(`changes`)),{...r,changes:{keys:t.keys??[],authors:t.authors??{}}},i);o>0&&n.warn(`OWI_DUPLICATE_ITEM`,`${o} records named an item already in the input; the later record was kept, and native holds both.`),s>0&&n.warn(`OWI_PULL_REQUESTS_SKIPPED`,`${s} pull requests in issue lists or boards were left out: an issue list holds too little of a pull request to map it as a change; map github pr list or github pr get for those.`);let x=[...a.values()];x.length>5e3&&(n.warn(`OWI_ITEMS_CAPPED`,`The input holds ${x.length} items; the first ${cx} were mapped and ${x.length-cx} left out. Map the rest in another call.`),x=x.slice(0,cx));for(let e of i)n.warn(`OWI_SKIPPED`,`${e.at}${e.command?` (${e.command})`:``} wasn't mapped: ${e.reason}.`);let S=b;return S.length>5e3&&(n.warn(`OWI_ITEMS_CAPPED`,`The input holds ${S.length} changes; the first ${cx} were mapped and ${S.length-cx} left out. Map the rest in another call.`),S=S.slice(0,cx)),{items:x,changes:S,histories:v,skipped:i,warnings:n.list}}function yx(e,t,n){let r=new Map;for(let i of e){let e=Kv[i.area].family,a=e===`github`?Ub(i.data):e===`ado`?eb(i.data):sb(i.data);if(!a)n.push({at:i.at,command:i.command,reason:`it doesn't hold pull requests`});else for(let o of a){let a=e===`github`?Jb(i,o,t):e===`ado`?ob(i,o,t):e===`bitbucket-cloud`?_b(i,o,t):mb(i,o,t);if(!a){n.push({at:i.at,command:i.command,reason:`a pull request has no number or repository to name it by`});continue}let s=r.get(a.id);r.set(a.id,s?$y(s,a):a)}}for(let e of r.values())e.workItems=e.workItems.filter(e=>!r.has(e));return[...r.values()]}function bx(e){let t=e.key?.trim();if(!t)return;if(Kv[e.area]?.family!==`github`||t.includes(`/`))return t;let n=t.replace(/^#/,``),{owner:r,repo:i}=e.inputs;return r&&i&&/^\d+$/.test(n)?`${r}/${i}#${n}`:void 0}var xx=[`title`,`body`,`labels`,`parent`,`links`],Sx=.35,Cx=new Set(`a about above after again all also am an and any are as at be been before being below between both but by can could did do does doing down during each few for from further had has have having he her here hers him his how i if in into is it its itself just me more most my no nor not now of off on once only or other our ours out over own same she should so some such than that the their theirs them then there these they this those through to too under until up very was we were what when where which while who whom why will with would you your yours see per via etc get got`.split(` `)),wx=/[\p{L}\p{N}]+/gu,Tx=/\p{M}+/gu;function Ex(e){return e.length<=3||/^\d/.test(e)?e:e.endsWith(`ies`)&&e.length>4?`${e.slice(0,-3)}y`:e.endsWith(`sses`)?e.slice(0,-2):e.endsWith(`ing`)&&e.length>5?e.slice(0,-3):e.endsWith(`ed`)&&e.length>4?e.slice(0,-2):e.endsWith(`s`)&&!/(ss|us|is)$/.test(e)?e.slice(0,-1):e}function Dx(e){return e.normalize(`NFKD`).replace(Tx,``).toLowerCase().match(wx)??[]}var Ox=e=>e.length>=2&&!Cx.has(e)&&!/^\d{1,2}$/.test(e);function kx(e){let t=[];for(let n of Dx(e))Ox(n)&&t.push({term:Ex(n),word:n});return t}function Ax(e){let t=new Set;for(let n of Dx(e)){if(!Ox(n))continue;let e=` ${n} `;for(let n=0;n+3<=e.length;n++)t.add(e.slice(n,n+3))}return t}var jx={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`'`,nbsp:` `,"#39":`'`};function Mx(e){if(!e)return``;if(e.format===`adf`||typeof e.content!=`string`)return Nx(e.content);let t=e.content;return t=e.format===`html`?t.replace(/<[^<>]*>/g,` `).replace(/&(amp|lt|gt|quot|apos|nbsp|#39);/g,(e,t)=>jx[t]??` `):e.format===`wiki`?t.replace(/\[([^|[\]]*)\|[^[\]]*\]/g,`$1`).replace(/\{[A-Za-z]+(?::[^{}]*)?\}/g,` `).replace(/^h[1-6]\.\s/gm,` `):t.replace(/!?\[([^[\]]*)\]\([^()]*\)/g,`$1`).replace(/<[^<>]*>/g,` `),t.replace(/(?<![A-Za-z0-9+.-])[A-Za-z][A-Za-z0-9+.-]*:\/\/\S*/g,` `)}function Nx(e){let t=[],n=[e];for(;n.length;){let e=n.pop();if(Array.isArray(e)){for(let t=e.length-1;t>=0;t--)n.push(e[t]);continue}if(typeof e!=`object`||!e)continue;let r=e;typeof r.text==`string`?t.push(r.text):typeof r.attrs?.text==`string`&&t.push(r.attrs.text),Array.isArray(r.content)&&n.push(r.content)}return t.join(` `)}var Px=1.2,Fx=.75,Ix=2,Lx=.7,Rx=.7,zx=.3,Bx=.04,Vx=.08,Hx=.05,Ux=.1,Wx=6e7,Gx=8,Kx=.15,qx=e=>Math.round(e*1e4)/1e4,Jx=(e,t)=>e<t?-1:+(e>t),Yx=class{fields;docs=[];byId=new Map;df=new Map;labelDf=new Map;on;avgTitle;avgBody;duplicateIds=[];constructor(e,t={}){this.fields=t.fields&&t.fields.length?xx.filter(e=>t.fields.includes(e)):xx,this.on=Object.fromEntries(xx.map(e=>[e,this.fields.includes(e)]));let n=new Set,r=[];for(let t of e)n.has(t.id)?this.duplicateIds.includes(t.id)||this.duplicateIds.push(t.id):(n.add(t.id),r.push(t));r.sort((e,t)=>Jx(e.id,t.id));let i=0,a=0;for(let e of r){let t=this.read(e);this.byId.set(e.id,this.docs.length),this.docs.push(t),i+=t.titleLength,a+=t.bodyLength;for(let e of new Set([...t.title.keys(),...t.body.keys()]))this.df.set(e,(this.df.get(e)??0)+1);for(let e of t.labels)this.labelDf.set(e,(this.labelDf.get(e)??0)+1)}let o=this.docs.filter(e=>e.hasBody).length;this.avgTitle=i/(this.docs.length||1)||1,this.avgBody=o?a/o:1;for(let e of this.docs)this.weigh(e)}get size(){return this.docs.length}titleOnlyIds(){return this.on.body?this.docs.filter(e=>!e.hasBody).map(e=>e.ref.id):[]}cutBodyIds(){return this.docs.filter(e=>e.bodyCut).map(e=>e.ref.id)}has(e){return this.byId.has(e)}ref(e){let t=this.byId.get(e);return t===void 0?void 0:this.docs[t].ref}ids(){return this.docs.map(e=>e.ref.id)}query(e,t={}){let n={terms:new Map,trigrams:this.on.title?Ax(e):new Set};for(let{term:t,word:r}of kx(e))n.terms.has(t)||n.terms.set(t,r);return this.rank(this.docs,(e,t)=>this.scoreQuery(n,e,t),t)}item(e,t={}){let n=this.byId.get(e);if(n===void 0)return;let r=this.docs[n];return this.rank(this.docs.filter(e=>e!==r),(e,t)=>this.scorePair(r,e,t),t)}compare(e,t){let n=this.byId.get(e),r=this.byId.get(t);if(n===void 0||r===void 0||n===r)return;let i=this.scorePair(this.docs[n],this.docs[r],!0);return{score:i.score,why:i.why}}pairs(e={},t={}){let n=rS(e.threshold),r=iS(e.limit),i=this.docs.length,a=new Map,o=(e,t,n,r)=>{let i=a.get(e);i||a.set(e,i={docs:[],...n?{full:[],title:[]}:{},...r===void 0?{}:{label:r}}),i.docs.push(t),n&&(i.full.push(n.full),i.title.push(n.title))};this.docs.forEach((e,t)=>{for(let[n,r]of e.full)o(`t\u0000${n}`,t,{full:r,title:e.titleOnly.get(n)??0});for(let n of e.trigrams)o(`g\u0000${n}`,t);for(let n of e.labels)o(`l\u0000${n}`,t,void 0,this.labelWeight(n));e.parent!==null&&o(`p\u0000${e.parent}`,t)});let s=[...a.entries()].filter(([,e])=>e.docs.length>1).sort((e,t)=>e[1].docs.length-t[1].docs.length||Jx(e[0],t[0])),c=0,l=0;for(let[,e]of s){let t=e.docs.length*e.docs.length;if(c+t>Wx)break;c+=t,l++}let u=s.length-l,d=l?s[l-1][1].docs.length:0,f=this.docs.map(()=>[]);for(let[e,t]of s.slice(0,l))t.docs.forEach((n,r)=>f[n].push({p:t,at:r,kind:e[0]}));let p=this.docs.map(()=>[]);this.on.links&&this.docs.forEach((e,t)=>{for(let n of e.links){let e=this.byId.get(n.target);e!==void 0&&e!==t&&p[Math.min(t,e)].push(Math.max(t,e))}});let m=new Float64Array(i),h=new Float64Array(i),g=new Int32Array(i),_=new Float64Array(i),v=new Uint8Array(i),y=new Int32Array(i).fill(-1),b=u>0,x=[],S=0,C=0,w=(e,t,n,i)=>{if(x.length===r&&!Qx(e,t,n,x[x.length-1]))return;let a=x.length;for(;a>0&&Qx(e,t,n,x[a-1]);)a--;x.splice(a,0,{score:e,i:t,j:n,full:i}),x.length>r&&x.pop()};for(let e=0;e<i;e++){let t=[],r=n=>{y[n]!==e&&(y[n]=e,m[n]=0,h[n]=0,g[n]=0,_[n]=0,v[n]=0,t.push(n))};for(let{p:t,at:n,kind:i}of f[e]){let{docs:e}=t;if(i===`t`){let i=t.full,a=t.title,o=i[n],s=a[n];for(let t=n+1;t<e.length;t++){let n=e[t];r(n),m[n]=m[n]+o*i[t],h[n]=h[n]+s*a[t]}}else for(let a=n+1;a<e.length;a++){let n=e[a];r(n),i===`g`?g[n]=g[n]+1:i===`l`?_[n]=_[n]+t.label:v[n]=v[n]|1}}for(let t of p[e])r(t),v[t]=v[t]|2;let i=this.docs[e];for(let r of t){C++;let t=this.docs[r],a=!(this.on.body&&i.hasBody&&t.hasBody),o=a?i.titleNorm*t.titleNorm:i.fullNorm*t.fullNorm,s=o>0?(a?h[r]:m[r])/o:0,c=i.trigrams.size+t.trigrams.size,l=c?2*g[r]/c:0,u=eS(this.weighParts(s,l,Math.min(Vx,_[r]),v[r]&1?Hx:0,v[r]&2?Ux:0)),d=!1;b&&u<n&&u>=n-Kx&&(u=this.scorePair(i,t).score,d=!0),!(u<n)&&(S++,w(u,e,r,d))}}let T=x.map(({i:e,j:n,score:r,full:i})=>{let a=this.scorePair(this.docs[e],this.docs[n],!0);return t.rescored?.({a:this.docs[e].ref.id,b:this.docs[n].ref.id,summed:r,full:a.score,exact:i||!b}),{score:a.score,a:this.docs[e].ref,b:this.docs[n].ref,why:a.why}}).filter(e=>e.score>=n).sort((e,t)=>t.score-e.score||Jx(e.a.id,t.a.id)||Jx(e.b.id,t.b.id));return{count:S,pairs:T,search:{compared:C,skippedFeatures:u,maxItemsPerFeature:u?d:null}}}labelWeight(e){return Bx*(1-(this.labelDf.get(e)??0)/(this.docs.length||1))}read(e){let t=new Map,n=new Map,r=new Map,i=(e,t)=>{let n=r.get(e);(n===void 0||t.length<n.length||t.length===n.length&&t<n)&&r.set(e,t)},a=0;if(this.on.title)for(let{term:n,word:r}of kx(e.title))t.set(n,(t.get(n)??0)+1),i(n,r),a++;let o=0,s=!1;if(this.on.body)for(let{term:t,word:r}of kx(Mx(e.body))){if(o===5e3){s=!0;break}n.set(t,(n.get(t)??0)+1),i(t,r),o++}return{ref:{id:e.id,title:e.title,source:e.source??null,url:e.url??null},title:t,body:n,surface:r,titleLength:a,bodyLength:o,hasBody:o>0,bodyCut:s,trigrams:this.on.title?Ax(e.title):new Set,labels:this.on.labels?[...new Set(e.labels??[])].sort(Jx):[],parent:this.on.parent?e.parent??null:null,links:this.on.links?e.links??[]:[],full:new Map,fullNorm:0,titleOnly:new Map,titleNorm:0}}idf(e){let t=this.docs.length,n=this.df.get(e)??0;return Math.log(1+(t-n+.5)/(n+.5))}weigh(e){let t=t=>Xx(t,e.titleLength,this.avgTitle),n=t=>Xx(t,e.bodyLength,this.avgBody),r=0,i=0;for(let[n,r]of e.title){let a=this.idf(n)*t(r);e.titleOnly.set(n,a),i+=a*a}for(let i of new Set([...e.title.keys(),...e.body.keys()])){let a=e.title.get(i),o=e.body.get(i),s=this.idf(i)*(Ix*(a?t(a):0)+(o?n(o):0));e.full.set(i,s),r+=s*s}e.fullNorm=Math.sqrt(r),e.titleNorm=Math.sqrt(i)}scorePair(e,t,n=!1){let[r,i]=Jx(e.ref.id,t.ref.id)<=0?[e,t]:[t,e],a=!(this.on.body&&r.hasBody&&i.hasBody),o=a?r.titleOnly:r.full,s=a?i.titleOnly:i.full,c=a?r.titleNorm*i.titleNorm:r.fullNorm*i.fullNorm,l=[],u=0;for(let[e,t]of o){let a=s.get(e);if(a===void 0)continue;let o=t*a;u+=o,n&&l.push({term:e,weight:o,title:r.title.has(e)&&i.title.has(e)})}let d=c>0?u/c:0,f=this.on.title?Zx(r.trigrams,i.trigrams):0,p=r.labels.filter(e=>i.labels.includes(e)),m=Math.min(Vx,p.reduce((e,t)=>e+this.labelWeight(t),0)),h=r.parent!==null&&r.parent===i.parent?r.parent:null,g=$x(e,t),_=this.weighParts(d,f,m,h?Hx:0,g?Ux:0),v=eS(_);if(!n)return{score:v};let y=e=>{let t=r.surface.get(e),n=i.surface.get(e);return t.length<n.length||t.length===n.length&&t<=n?t:n},b=l.sort((e,t)=>t.weight-e.weight||Jx(e.term,t.term));return{score:v,why:this.explain({titleTerms:b.filter(e=>e.title).slice(0,Gx).map(e=>y(e.term)),bodyTerms:b.filter(e=>!e.title).slice(0,Gx).map(e=>y(e.term)),trigram:f,labels:p,parent:h,link:g,titleOnly:a,parts:_})}}scoreQuery(e,t,n=!1){let r=0,i=0,a=[];for(let[o,s]of e.terms){let e=this.idf(o);i+=e;let c=t.title.has(o)?Math.min(1,Xx(t.title.get(o),t.titleLength,this.avgTitle)):0,l=t.body.has(o)?Lx*Math.min(1,Xx(t.body.get(o),t.bodyLength,this.avgBody)):0,u=Math.max(c,l);u!==0&&(r+=e*u,n&&a.push({term:s,weight:e*u,title:c>=l}))}let o=i>0?r/i:0,s=this.on.title?Zx(e.trigrams,t.trigrams):0,c=this.weighParts(o,s,0,0,0),l=eS(c);if(!n)return{score:l};let u=a.sort((e,t)=>t.weight-e.weight||Jx(e.term,t.term));return{score:l,why:this.explain({titleTerms:u.filter(e=>e.title).slice(0,Gx).map(e=>e.term),bodyTerms:u.filter(e=>!e.title).slice(0,Gx).map(e=>e.term),trigram:s,labels:[],parent:null,link:null,titleOnly:this.on.body&&!t.hasBody,parts:c})}}weighParts(e,t,n,r,i){let a=this.on.title?Rx:1,o=this.on.title?zx:0;return{terms:a*e,trigram:o*t,labels:n,parent:r,link:i}}explain(e){let t={terms:qx(e.parts.terms),trigram:qx(e.parts.trigram),labels:qx(e.parts.labels),parent:qx(e.parts.parent),link:qx(e.parts.link)},n={...e,trigram:qx(e.trigram),parts:t};return{summary:nS(n),...n}}rank(e,t,n){let r=rS(n.threshold),i=iS(n.limit),a=e.map(e=>({doc:e,score:t(e).score})).filter(e=>e.score>=r).sort((e,t)=>t.score-e.score||Jx(e.doc.ref.id,t.doc.ref.id));return{count:a.length,matches:a.slice(0,i).map(({doc:e})=>{let n=t(e,!0);return{...e.ref,score:n.score,why:n.why}})}}};function Xx(e,t,n){return e*2.2/(e+Px*(.25+Fx*t/n))}function Zx(e,t){if(!e.size||!t.size)return 0;let[n,r]=e.size<=t.size?[e,t]:[t,e],i=0;for(let e of n)r.has(e)&&i++;return 2*i/(e.size+t.size)}function Qx(e,t,n,r){return e>r.score||e===r.score&&(t<r.i||t===r.i&&n<r.j)}function $x(e,t){let n=e.links.find(e=>e.target===t.ref.id);if(n)return{type:n.type,direction:n.direction,name:n.name};let r=t.links.find(t=>t.target===e.ref.id);return r?{type:r.type,direction:r.direction===`outward`?`inward`:`outward`,name:r.name}:null}function eS(e){return qx(Math.min(1,e.terms+e.trigram+e.labels+e.parent+e.link))}var tS=e=>`${Math.round(e*100)}%`;function nS(e){let t=[];return e.titleTerms.length&&t.push(`title terms ${e.titleTerms.join(`, `)}`),e.bodyTerms.length&&t.push(`body terms ${e.bodyTerms.join(`, `)}`),e.trigram>0&&t.push(`titles ${tS(e.trigram)} alike by trigram`),e.labels.length&&t.push(`shared label${e.labels.length>1?`s`:``} ${e.labels.join(`, `)}`),e.parent&&t.push(`same parent ${e.parent}`),e.link&&t.push(`linked (${e.link.name})`),t.length||t.push(`nothing in common`),e.titleOnly&&t.push(`compared on titles alone`),`${t.join(`; `)}.`}function rS(e){return e===void 0||!Number.isFinite(e)?Sx:Math.min(1,Math.max(0,e))}function iS(e){return e===void 0||!Number.isFinite(e)?10:Math.max(1,Math.floor(e))}function aS(e,t={}){let{documents:n,skipped:r}=gx(typeof e==`string`?px(e):mx(e),{command:t.command,key:t.key});return vx(n,{fields:_x(t.fields),skipped:r,keys:Py(t.keyPatterns),authors:Yy(t.authorKinds)})}var oS={readOnly:!0,caller:`toil-ui`},sS=e=>`project = ${e} ORDER BY Rank ASC`,cS=[`ado`,`ado-cloud`],lS=[`jira`,`jira-cloud`],uS=`SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @project ORDER BY [System.Id]`,dS=e=>typeof e==`object`&&!!e&&!Array.isArray(e),fS=e=>Array.isArray(e)?e.filter(dS):[],pS=e=>Array.isArray(e)?e.flatMap(e=>typeof e==`string`||typeof e==`number`?[String(e)]:[]):[],mS=class extends Error{call;constructor(e){super(e.error??`${e.command} failed.`),this.call=e}};function hS(e){let t=dS(e.areas)?e.areas:{},n=dS(e.dossier)?e.dossier:{};return{summary:{name:String(e.name),description:typeof n.description==`string`?n.description:null,sources:Object.entries(t).map(([e,t])=>({area:e,connection:t.connection?.value??null})),environments:Object.keys(dS(n.environments)?n.environments:{})},areas:t,dossier:n}}function gS(e){return dS(e)?Object.fromEntries(Object.entries(e).filter(e=>Jv.includes(e[0])&&typeof e[1]==`string`)):{}}function _S(e){let t=e=>e.mergedAt??e.closedAt??e.updated??e.created??``,n=e=>e.state===`OPEN`||e.state===`DRAFT`,r=e.filter(e=>!n(e)).sort((e,n)=>t(e)<t(n)?1:-1).slice(0,20),i=new Set([...e.filter(n),...r]);return e.filter(e=>i.has(e))}var vS=`reviews,checks,commits,files`,yS=[{area:`bitbucket`,all:`ALL`,id:`id`},{area:`bitbucket-cloud`,all:`ALL`,id:`id`},{area:`ado`,all:`all`,id:`id`},{area:`ado-cloud`,all:`all`,id:`id`},{area:`github`,all:`all`,id:`number`}],bS=[`.github/CODEOWNERS`,`CODEOWNERS`,`docs/CODEOWNERS`];function xS(e){let t=new Set;for(let n of e){let e=n.source.connection;n.source.area.startsWith(`jira`)?t.add(`${n.source.key.replace(/-\d+$/,``)}-{n}=${e}`):n.source.area.startsWith(`ado`)?t.add(`AB#{n}=${e}`):n.source.area===`github`&&t.add(`${n.source.key.replace(/#\d+$/,``)}#{n}=${e}`)}return[...t]}function SS(e,t,n){if(e.authorKinds===void 0)return{};if(!dS(e.authorKinds))return n.push(`The ${t} section's authorKinds isn't an object of author id to HUMAN, AGENT or BOT, so it was left out.`),{};let r={};for(let[i,a]of Object.entries(e.authorKinds))typeof a==`string`&&Yv.includes(a.toUpperCase())?r[i]=a.toUpperCase():n.push(`The ${t} section's authorKinds gives ${i} as ${JSON.stringify(a)}, which isn't HUMAN, AGENT or BOT, so it was left out.`);return r}function CS(e){let t=e.filter(e=>typeof e.number==`number`),n=e=>String(e.closed_at??e.updated_at??``),r=t.filter(e=>e.state===`closed`).sort((e,t)=>n(e)<n(t)?1:-1).slice(0,50),i=new Set([...t.filter(e=>e.state!==`closed`),...r]);return t.filter(e=>i.has(e)).map(e=>e.number)}var wS=(e,t)=>e.ok?e.meta.context?.connection?.value??t:t;async function TS(e,t,n={}){let r={dossier:[],work:[],prs:[],owners:[],builds:[],deployments:[]},i=async(t,n,i)=>{let a=await e(n,i,oS),o={command:n,input:i,ok:a.ok,error:a.ok?null:`${a.error.message}${a.error.fix?` ${a.error.fix}`:``}`};if(r[t].push(o),!a.ok){if(t===`dossier`)throw new mS(o);return null}return a},{summary:a,areas:o,dossier:s}=hS((await i(`dossier`,`dossiers show`,{dossier:t})).data),c=e=>dS(s[e])?s[e]:{},l=fS(s.repos).map(e=>String(e.name)),u={dossier:t},d={jira:[],"jira-cloud":[],ado:[],"ado-cloud":[],github:[]},f=[];for(let e of lS.filter(e=>o[e]?.inputs.project))f.push((async()=>{let t=await i(`work`,`${e} issue search`,{...u,jql:sS(o[e].inputs.project)});if(!t)return;d[e].push(t);let n=fS(t.data.issues).map(e=>String(e.key));for(let t of n){let n=await i(`work`,`${e} issue history`,{...u,key:t});n&&d[e].push({key:t,history:n})}})());for(let e of cS.filter(e=>o[e]))f.push((async()=>{let t=await i(`work`,`${e} work-item iterations`,u);t&&d[e].push(t);let n=await i(`work`,`${e} work-item search`,{...u,wiql:uS}),r=n?fS(n.data.workItems).map(e=>Number(e.id)):[];if(!r.length)return;let a=await i(`work`,`${e} work-item get-many`,{...u,id:r});a&&d[e].push(a);for(let t of r){let n=await i(`work`,`${e} work-item history`,{...u,id:t});n&&d[e].push(n)}})());o.github&&f.push((async()=>{let e=`${o.github.inputs.owner}/${o.github.inputs.repo}`,t=new Set,n=pS(c(`github`).projects);if(!n.length){let e=await i(`work`,`github issue list`,{...u,state:`all`});if(!e)return;d.github.push(e);for(let t of CS(fS(e.data))){let e=await i(`work`,`github issue history`,{...u,number:t});e&&d.github.push({key:String(t),history:e})}return}for(let r of n){let n=await i(`work`,`github project items`,{...u,project:Number(r)});if(n){d.github.push(n);for(let r of fS(n.data)){let n=dS(r.content)?r.content:{};dS(n.repository)&&n.repository.nameWithOwner===e&&typeof n.number==`number`&&t.add(n.number)}}}if(!t.size)return;let r=await i(`work`,`github issue get`,{...u,number:[...t],subIssues:!0});r&&d.github.push(r);for(let e of t){let t=await i(`work`,`github issue history`,{...u,number:e});t&&d.github.push({key:String(e),history:t})}})()),await Promise.all(f);let p=n.mapOwi??aS,m=Object.entries(d).flatMap(([e,t])=>t.length?p(t,{fields:gS(c(e).fields)}).items:[]),h=[],g=[],_=dS(s.environments)?s.environments:{},v=Object.entries(_).flatMap(([e,t])=>dS(t.openshift)&&typeof t.openshift.namespace==`string`?[[e,t.openshift.namespace]]:[]),y=new Map(m.map(e=>[e.id,e])),b=xS(m),x=[],S=[],C={},w=async e=>{let t=new Map,n=await i(`prs`,`${e.area} pr list`,{...u,state:e.all});if(!n)return{prs:[],gets:t};let r=SS(c(e.area),e.area,x),a=p([n],{keyPatterns:b,authorKinds:r});if(!a.changes)return x.push(`The toil Toil UI runs with maps no pull requests (it reads OWI 0.1), so none are shown. Upgrade toil to one that maps OWI 0.2 changes.`),{prs:[],gets:t};let o=a.changes,s=[n];for(let n of _S(o)){let r=Number(n.id.slice(n.id.lastIndexOf(`#`)+1)),a=await i(`prs`,`${e.area} pr get`,{...u,[e.id]:r,include:vS});a&&(s.push(a),t.set(n.id,a))}let l=p(s,{keyPatterns:b,authorKinds:r}).changes??[];return S.push(...l),{prs:l,gets:t}},T=e=>e.map(e=>Ug(e,y)),E=async e=>{let t=[];for(let[n,r]of v){let a=await i(`deployments`,`openshift deployment list`,{...u,env:n,namespace:r});a&&t.push(...Zg(a.data,n,l,e))}return t};if(o.bitbucket){let e=T((await w(yS[0])).prs);h.push(...e);for(let t of pS(c(`jenkins`).jobs))for(let n of e){let e=n.id.slice(n.id.lastIndexOf(`#`)+1),r=await i(`builds`,`jenkins pipeline runs`,{...u,name:`${t}/PR-${e}`,limit:5});r&&h.push(...Gg(r.data,wS(r,`jenkins`),`${t}/PR-${e}`,n))}}if(o[`bitbucket-cloud`]&&h.push(...T((await w(yS[1])).prs)),o.ado){let e=T((await w(yS[2])).prs);h.push(...e);let t=e[0]?.change?.source.connection??o.ado.connection?.value??`ado`;for(let n of pS(c(`ado`).builds)){let r=await i(`builds`,`ado run list`,{...u,name:n,top:20});r&&h.push(...Kg(r.data,wS(r,t),e))}for(let n of pS(c(`ado`).deployments)){let r=await i(`deployments`,`ado run list`,{...u,name:n,top:20});r&&g.push(...Qg(r.data,wS(r,t),e))}}if(o[`ado-cloud`]?.inputs.repo&&h.push(...T((await w(yS[3])).prs)),o.github){let{prs:e,gets:t}=await w(yS[4]),n=T(e);h.push(...n),r.builds.push(...r.prs.filter(e=>e.command===`github pr get`));for(let e of n){let n=t.get(e.id),r=n&&dS(n.data)&&dS(n.data.included)?n.data.included.checks:void 0,i=Array.isArray(r)?Jg(r,e.change.source.connection,e):null;i&&h.push(i)}if(e.some(e=>(e.state===`OPEN`||e.state===`DRAFT`)&&!e.reviewers.length)){let e=`${o.github.inputs.owner}/${o.github.inputs.repo}`;for(let t of bS){let n=await i(`owners`,`github repo file`,{...u,path:t}),r=n&&dS(n.data)&&typeof n.data.text==`string`?n.data.text:null;if(r!==null){C[e]={path:t,text:r};break}}}}v.length&&g.push(...await E(h.filter(e=>e.kind===`pull-request`)));let D=j_(s);return{...a,items:m,pullRequests:S,codeowners:C,prNotes:x,changes:h,deployments:g.sort(e_),people:D.people,wipLimit:D.wipLimit,peopleNotes:D.notes,readiness:ov(s),calls:r}}async function ES(e){let t=[],n=async(n,r)=>{let i=await e(n,r,oS),a={command:n,input:r,ok:i.ok,error:i.ok?null:`${i.error.message}${i.error.fix?` ${i.error.fix}`:``}`};if(t.push(a),!i.ok)throw new mS(a);return i.data},r=fS((await n(`dossiers list`,{})).dossiers).filter(e=>e.shadowedBy===null||e.shadowedBy===void 0).map(e=>String(e.name)),i=[];for(let e of r)i.push(hS(await n(`dossiers show`,{dossier:e})).summary);return{dossiers:i,calls:t}}function DS(e){let t=(e.name??e.id).replace(/[^\p{L}\p{N} .-]/gu,` `).split(/[\s.-]+/).filter(Boolean);return(t.length>1?[t[0][0],t.at(-1)[0]]:[t[0]?.[0],t[0]?.[1]]).filter(Boolean).join(``).toUpperCase()||`?`}var OS=6;function kS(e){let t=0;for(let n of e.id)t=t*31+n.charCodeAt(0)>>>0;return t%OS}function AS({person:e,labelled:t=!1}){if(!e)return(0,q.jsx)(`span`,{className:`avatar avatar--none`,...t?{role:`img`,"aria-label":`Unassigned`}:{"aria-hidden":!0},children:`–`});let n=e.name??e.id;return(0,q.jsx)(`span`,{className:`avatar avatar--${kS(e)}`,...t?{role:`img`,"aria-label":n,title:n}:{"aria-hidden":!0},children:DS(e)})}var jS=new URL(new URL(`crate-lost-Dk5CaIuV.webp`,import.meta.url).href,``+import.meta.url).href,MS=new URL(new URL(`crate-loading-B9H4D652.webp`,import.meta.url).href,``+import.meta.url).href,NS={EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art`,children:[(0,q.jsx)(`img`,{src:jS,alt:``,width:240,height:160}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art`,role:`status`,children:[(0,q.jsx)(`img`,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PSIxIi8+CjxwYXRoIGQ9Ik05LjYgOS42SDM4LjRWMzguNEg5LjZaIiBzdHJva2U9IiMzYjJjMTAiIHN0cm9rZS13aWR0aD0iLjgiLz4KPGcgZmlsbD0iI2U2Yzk4MyIgc3Ryb2tlPSIjM2IyYzEwIiBzdHJva2Utd2lkdGg9Ii43Ij48Y2lyY2xlIGN4PSI1IiBjeT0iNSIgcj0iMiIvPjxjaXJjbGUgY3g9IjQzIiBjeT0iNSIgcj0iMiIvPjxjaXJjbGUgY3g9IjUiIGN5PSI0MyIgcj0iMiIvPjxjaXJjbGUgY3g9IjQzIiBjeT0iNDMiIHI9IjIiLz48L2c+Cjwvc3ZnPgo=`,FS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2016'%20width='24'%20height='16'%20fill='none'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c!--%20A%20blocker:%20a%20wagon%20wheel%20cracked%20off%20its%20axle,%20the%20axle%20snapped%20short.%20--%3e%3cpath%20d='M1.5%209.5H8.2'%20stroke='%232e2a26'%20stroke-width='2'/%3e%3cpath%20d='M8.2%208.4%209.6%2010.6'%20stroke='%238e1c10'%20stroke-width='1.3'/%3e%3ccircle%20cx='16.5'%20cy='8.5'%20r='6'%20stroke='%234d3a26'%20stroke-width='1.6'/%3e%3ccircle%20cx='16.5'%20cy='8.5'%20r='1.4'%20fill='%232e2a26'/%3e%3cpath%20d='M16.5%202.5V7.1M16.5%209.9V14.5M10.5%208.5H15.1M17.9%208.5H22.5M12.3%204.3%2015.5%207.5M17.5%209.5%2020.7%2012.7M20.7%204.3%2017.5%207.5'%20stroke='%234d3a26'%20stroke-width='1.1'/%3e%3cpath%20d='M19.6%203.4%2021.2%205.6%2020%206.2%2021.8%208'%20stroke='%238e1c10'%20stroke-width='1.1'/%3e%3c/svg%3e`,IS=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%20width='32'%20height='32'%20fill='none'%3e%3c!--%20A%20small%20brass%20pressure%20gauge:%20a%20bezel,%20a%20pale%20dial%20with%20ticks,%20and%20a%20copper%20needle.%20--%3e%3ccircle%20cx='16'%20cy='16'%20r='14.5'%20fill='%23b08d3c'%20stroke='%234a3814'%20stroke-width='1'/%3e%3ccircle%20cx='16'%20cy='16'%20r='12.2'%20fill='%23f3e8cf'%20stroke='%236e5420'%20stroke-width='.8'/%3e%3cg%20stroke='%232e2a26'%20stroke-width='1'%20stroke-linecap='round'%3e%3cpath%20d='M7.6%2021.2%209.4%2020.1M6.6%2014.6%208.6%2015M10.1%208.6%2011.4%2010.2M16%206.2V8.2M21.9%208.6%2020.6%2010.2M25.4%2014.6%2023.4%2015M24.4%2021.2%2022.6%2020.1'/%3e%3c/g%3e%3cpath%20d='M16%2016%2021.6%2010.6'%20stroke='%238c3a14'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3ccircle%20cx='16'%20cy='16'%20r='2'%20fill='%232e2a26'/%3e%3cpath%20d='M12%2023.5h8'%20stroke='%23a0522d'%20stroke-width='1.4'%20stroke-linecap='round'/%3e%3c/svg%3e`,LS=new URL(`locomotive-CPPtBzL2.webp`,import.meta.url).href,RS=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+CjwhLS0gRnJvbnRpZXIncyBiYWRnZTogdGhlIHRpbGUgYXMgYSByaXZldGVkIGJyYXNzIGJvaWxlciBwbGF0ZSB3aXRoIGEgY29wcGVyIHJ1bGUsIHRoZSBwYWdlIGEgc3VuLWJsZWFjaGVkIGhhbmRiaWxsLiBUaGUgYmFkZ2UncyBzaWxob3VldHRlLCBza2lubmVkLiAtLT4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0iZjRiIiB4MT0iMCIgeTE9IjAiIHgyPSIxIiB5Mj0iMSI+CjxzdG9wIG9mZnNldD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iMS40Ii8+CjxwYXRoIGQ9Ik05IDIwLjUgOSAxNy41TTIyIDIwLjUgMjIgMTgiIHN0cm9rZT0iIzJlMmEyNiIgc3Ryb2tlLXdpZHRoPSIxLjQiLz4KPHBhdGggZD0iTTcgMTYuNSAyNS41IDEzLjUiIHN0cm9rZT0iI2IwOGQzYyIgc3Ryb2tlLXdpZHRoPSIyLjQiLz4KPHBhdGggZD0iTTcgMTYuNSAyNS41IDEzLjUiIHN0cm9rZT0iIzRhMzgxNCIgc3Ryb2tlLXdpZHRoPSIuNyIvPgo8Y2lyY2xlIGN4PSIyNiIgY3k9IjEyLjIiIHI9IjIuOCIgZmlsbD0iIzJlMmEyNiIvPgo8Y2lyY2xlIGN4PSI5IiBjeT0iMTciIHI9IjEuNCIgZmlsbD0iI2UyYzI3YSIgc3Ryb2tlPSIjNGEzODE0IiBzdHJva2Utd2lkdGg9Ii42Ii8+CjxwYXRoIGQ9Ik0zLjUgMjJDMiAxOCA0IDE0IDIuNSAxMC41UzQgNiA1LjUgNC41IiBzdHJva2U9IiNhMDUyMmQiIHN0cm9rZS13aWR0aD0iMS4xIi8+Cjwvc3ZnPgo=`,HS=new URL(`wanted-poster-BnjUajnc.webp`,import.meta.url).href,US=new URL(`wood-CrrZEj6Y.webp`,import.meta.url).href,WS={"dossiers.lede":`Each dossier is one body of work: its repositories, its tracker, its pipelines and its environments. Pick one to see its stories, pull requests, builds and deployments together.`,"dossier.eyebrow":`Dossier`,"settings.eyebrow":`Settings`,"attention.note":`Open items ranked by their insights, weightiest first. Each insight names the data it rests on.`,"aging.note":`How long each item in progress has been in progress, from its history, oldest first.`,"trace.note":`Each work item with the pull requests that name it, their latest builds, and the environments running them.`,"graph.note":`Arrows run the way each link reads, from the source's own links. Blocking chains run left to right.`,"ask.note":`Answers cite the items they rest on. The agent reads; it never changes a ticket. What it suggests comes back as a proposal for you to apply.`,"empty.dossiers":`toil sees no dossiers yet. A dossier is made with toil dossiers init.`,"empty.sprint":`No sprint is running in this dossier's work items.`,"empty.burnup":`No sprint is running, so there is nothing to burn up.`,"empty.column":`Nothing here.`,"empty.prs":`No pull requests for this dossier.`,"empty.builds":`No builds for this dossier's pull requests.`,"empty.deployments":`This dossier names no environment to read deployments from.`,"empty.links":`No links between this dossier's items.`,"empty.ask":`Pick a question, or ask your own, to see how answers cite their sources.`,"loading.dossiers":`Reading the dossiers…`,"loading.dossier":`Reading {name}…`,"loading.graph":`Drawing the graph…`,"loading.answer":`Thinking…`,"ask.placeholder":`Ask about {name}`,"ask.placeholder.short":`Ask a question`,"ask.welcome":`Ask anything about {name}: its sprint, its people, what is blocked or waiting on review. Every answer cites the items it rests on.`,"status.cache":`Reading the cache`,"status.live":`Reading live through toil`,"status.registry":`Reading a command's fields`,"status.writing":`Writing`,"status.done":`Done in {seconds} s`,"status.stopped":`Stopped after {seconds} s`};Object.keys(WS);function GS(e,t,n,r={}){return((t?e?.[n]:void 0)??WS[n]).replace(/\{([a-z]+)\}/g,(e,t)=>r[t]??e)}var KS=(0,v.createContext)(Qm[0]),qS=KS.Provider,JS=()=>(0,v.useContext)(KS),YS={theme:Qm[0].name,scheme:`system`,wording:!0,voice:!0,saveError:null,setTheme:()=>void 0,setScheme:()=>void 0,setWording:()=>void 0,setVoice:()=>void 0},XS=(0,v.createContext)(YS),ZS=XS.Provider,QS=()=>(0,v.useContext)(XS),$S=(e,t)=>t.wording&&e.lexicon!==void 0,eC=(e,t)=>t.voice&&e.voice!==void 0;function tC(e,t,n,r=!0){let i=r?e.terms?.[t]:void 0;return i&&i.toLowerCase()!==n.toLowerCase()?`${i} (${n})`:n}function nC(){let e=JS(),{wording:t}=QS();return(n,r)=>tC(e,n,r,t)}function rC(){let e=JS(),t=$S(e,QS());return(n,r)=>GS(e.lexicon,t,n,r)}var iC=e=>new URL(Object.assign({"../../themes/frontier/assets/brass-plate.svg":PS,"../../themes/frontier/assets/busted-axle.svg":FS,"../../themes/frontier/assets/gauge.svg":IS,"../../themes/frontier/assets/locomotive.webp":LS,"../../themes/frontier/assets/mark.svg":RS,"../../themes/frontier/assets/rivet-rail.svg":zS,"../../themes/frontier/assets/survey-map.webp":BS,"../../themes/frontier/assets/telegraph-key.svg":VS,"../../themes/frontier/assets/wanted-poster.webp":HS,"../../themes/frontier/assets/wood.webp":US})[`../../themes/frontier/assets/${e}`],import.meta.url).href;function aC({children:e}){let t=nC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent frontier-operator`,children:[(0,q.jsxs)(`p`,{className:`frontier-operator-name`,children:[(0,q.jsx)(`img`,{src:iC(`telegraph-key.svg`),alt:``,width:24,height:24,loading:`lazy`,decoding:`async`}),t(`agent`,`Agent`)]}),e]})}var oC={ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(aC,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art frontier-wanted`,children:[(0,q.jsx)(`img`,{src:iC(`wanted-poster.webp`),alt:``,width:240,height:160,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art frontier-steam`,role:`status`,children:[(0,q.jsx)(`img`,{src:iC(`locomotive.webp`),alt:``,width:240,height:160,decoding:`async`}),(0,q.jsx)(`p`,{children:e})]})},sC=new URL(`crop-grown-HG5zb5pJ.svg`,import.meta.url).href,cC=new URL(`crop-harvested-Q-ua5_kg.svg`,import.meta.url).href,lC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='5'%20y='11'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='10'%20y='11'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='4'%20y='12'%20width='8'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='2'%20y='13'%20width='2'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='4'%20y='13'%20width='3'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='7'%20y='13'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='8'%20y='13'%20width='4'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='12'%20y='13'%20width='2'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='14'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='2'%20y='14'%20width='3'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='5'%20y='14'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='6'%20y='14'%20width='5'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='11'%20y='14'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='12'%20y='14'%20width='2'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='14'%20y='14'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='15'%20width='14'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='15'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3c/svg%3e`,uC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='4'%20y='6'%20width='2'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='10'%20y='6'%20width='2'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='3'%20y='7'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='4'%20y='7'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='6'%20y='7'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='9'%20y='7'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='10'%20y='7'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='12'%20y='7'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='4'%20y='8'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='5'%20y='8'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='9'%20y='8'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='11'%20y='8'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='6'%20y='9'%20width='4'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='7'%20y='10'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='7'%20y='11'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='8'%20y='11'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='4'%20y='12'%20width='8'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='2'%20y='13'%20width='2'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='4'%20y='13'%20width='3'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='7'%20y='13'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='8'%20y='13'%20width='4'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='12'%20y='13'%20width='2'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='14'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='2'%20y='14'%20width='3'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='5'%20y='14'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='6'%20y='14'%20width='5'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='11'%20y='14'%20width='1'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='12'%20y='14'%20width='2'%20height='1'%20fill='%238a5530'/%3e%3crect%20x='14'%20y='14'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='15'%20width='14'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='15'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3c/svg%3e`,dC=new URL(`empty-field-BN05R29i.svg`,import.meta.url).href,fC=new URL(`fields-BxauQmw0.webp`,import.meta.url).href,pC=new URL(`mark-bSC__Aar.svg`,import.meta.url).href,mC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='6'%20y='1'%20width='4'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='5'%20y='2'%20width='1'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='6'%20y='2'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='7'%20y='2'%20width='2'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='9'%20y='2'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='10'%20y='2'%20width='1'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='4'%20y='3'%20width='8'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='4'%20y='4'%20width='8'%20height='1'%20fill='%23a3200f'/%3e%3crect%20x='1'%20y='5'%20width='14'%20height='1'%20fill='%23f2c94c'/%3e%3crect%20x='2'%20y='6'%20width='12'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='3'%20y='7'%20width='10'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='3'%20y='8'%20width='2'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='5'%20y='8'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='6'%20y='8'%20width='4'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='10'%20y='8'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='11'%20y='8'%20width='2'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='3'%20y='9'%20width='2'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='5'%20y='9'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='6'%20y='9'%20width='4'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='10'%20y='9'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='11'%20y='9'%20width='2'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='3'%20y='10'%20width='1'%20height='1'%20fill='%23e98aa0'/%3e%3crect%20x='4'%20y='10'%20width='8'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='12'%20y='10'%20width='1'%20height='1'%20fill='%23e98aa0'/%3e%3crect%20x='3'%20y='11'%20width='3'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='6'%20y='11'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='7'%20y='11'%20width='2'%20height='1'%20fill='%23d99a6c'/%3e%3crect%20x='9'%20y='11'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='10'%20y='11'%20width='3'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='4'%20y='12'%20width='3'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='7'%20y='12'%20width='2'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='12'%20width='3'%20height='1'%20fill='%23f2c29b'/%3e%3crect%20x='4'%20y='13'%20width='3'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='7'%20y='13'%20width='2'%20height='1'%20fill='%23d8d0c0'/%3e%3crect%20x='9'%20y='13'%20width='3'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='3'%20y='14'%20width='4'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='7'%20y='14'%20width='2'%20height='1'%20fill='%23d8d0c0'/%3e%3crect%20x='9'%20y='14'%20width='4'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='2'%20y='15'%20width='2'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='4'%20y='15'%20width='1'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='5'%20y='15'%20width='6'%20height='1'%20fill='%233d6fb6'/%3e%3crect%20x='11'%20y='15'%20width='1'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='15'%20width='2'%20height='1'%20fill='%233d6fb6'/%3e%3c/svg%3e`,hC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='6'%20y='1'%20width='4'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='5'%20y='2'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='10'%20y='2'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='3'%20width='8'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='15'%20y='3'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='3'%20y='4'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='4'%20width='8'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='4'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='14'%20y='4'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='15'%20y='4'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='3'%20y='5'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='5'%20width='1'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='5'%20y='5'%20width='2'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='7'%20y='5'%20width='5'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='5'%20width='3'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='3'%20y='6'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='6'%20width='1'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='5'%20y='6'%20width='2'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='7'%20y='6'%20width='5'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='6'%20width='2'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='3'%20y='7'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='7'%20width='8'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='7'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='3'%20y='8'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='8'%20width='8'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='8'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='3'%20y='9'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='9'%20width='8'%20height='1'%20fill='%237d93b8'/%3e%3crect%20x='12'%20y='9'%20width='1'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='4'%20y='10'%20width='8'%20height='1'%20fill='%233b4a63'/%3e%3crect%20x='14'%20y='11'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='5'%20y='12'%20width='2'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='14'%20y='12'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='4'%20y='13'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='5'%20y='13'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='7'%20y='13'%20width='1'%20height='1'%20fill='%238fd14f'/%3e%3crect%20x='12'%20y='13'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='5'%20y='14'%20width='2'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='2'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='3'%20y='15'%20width='9'%20height='1'%20fill='%235c3519'/%3e%3crect%20x='12'%20y='15'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3c/svg%3e`,gC=new URL(`wood-panel-CFA5lKLa.svg`,import.meta.url).href,_C=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%20width='12'%20height='12'%20shape-rendering='crispEdges'%3e%3crect%20x='0'%20y='0'%20width='12'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='1'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='1'%20width='10'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='1'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='2'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='2'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='2'%20width='8'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='2'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='2'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='3'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='3'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='3'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='3'%20width='6'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='3'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='3'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='3'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='4'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='4'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='4'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='4'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='8'%20y='4'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='4'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='4'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='4'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='5'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='5'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='5'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='5'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='8'%20y='5'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='5'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='5'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='5'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='6'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='6'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='6'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='8'%20y='6'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='6'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='6'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='7'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='7'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='7'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='7'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='8'%20y='7'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='7'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='7'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='7'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='8'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='8'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='8'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='3'%20y='8'%20width='6'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='9'%20y='8'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='8'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='8'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='9'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='9'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='2'%20y='9'%20width='8'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='9'%20width='1'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='9'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='10'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='1'%20y='10'%20width='10'%20height='1'%20fill='%23dea36a'/%3e%3crect%20x='11'%20y='10'%20width='1'%20height='1'%20fill='%233b2614'/%3e%3crect%20x='0'%20y='11'%20width='12'%20height='1'%20fill='%233b2614'/%3e%3c/svg%3e`,vC=e=>new URL(Object.assign({"../../themes/harvest/assets/crop-grown.svg":sC,"../../themes/harvest/assets/crop-harvested.svg":cC,"../../themes/harvest/assets/crop-seed.svg":lC,"../../themes/harvest/assets/crop-sprout.svg":uC,"../../themes/harvest/assets/empty-field.svg":dC,"../../themes/harvest/assets/fields.webp":fC,"../../themes/harvest/assets/mark.svg":pC,"../../themes/harvest/assets/portrait.svg":mC,"../../themes/harvest/assets/watering-can.svg":hC,"../../themes/harvest/assets/wood-panel.svg":gC,"../../themes/harvest/assets/wood-sign.svg":_C})[`../../themes/harvest/assets/${e}`],import.meta.url).href,yC={TODO:vC(`crop-seed.svg`),IN_PROGRESS:vC(`crop-grown.svg`),DONE:vC(`crop-harvested.svg`),UNKNOWN:vC(`crop-sprout.svg`)};function bC({src:e,size:t=32,className:n}){return(0,q.jsx)(`img`,{className:n,src:e,alt:``,width:t,height:t,loading:`lazy`,decoding:`async`})}function xC(){let{health:e}=fg();return e?(0,q.jsxs)(`div`,{className:`harvest-calendar`,"aria-hidden":`true`,children:[(0,q.jsxs)(`span`,{className:`harvest-calendar-day`,children:[`Day `,e.days.gone]}),(0,q.jsx)(`span`,{className:`harvest-calendar-grid`,children:Array.from({length:e.days.total},(t,n)=>(0,q.jsx)(`i`,{className:n+1<e.days.gone?`gone`:n+1===e.days.gone?`today`:void 0},n))})]}):null}function SC({id:e,children:t}){let n=(0,v.useContext)(ug)!==null;return(0,q.jsxs)(q.Fragment,{children:[e===`sprint`&&n&&(0,q.jsx)(xC,{}),t]})}function CC({children:e}){let t=nC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent harvest-dialogue`,children:[(0,q.jsx)(bC,{src:vC(`portrait.svg`),size:48,className:`harvest-portrait`}),(0,q.jsxs)(`div`,{className:`harvest-dialogue-text`,children:[(0,q.jsx)(`p`,{className:`harvest-name`,children:t(`agent`,`Agent`)}),e]})]})}var wC={Card:({item:e,children:t})=>(0,q.jsxs)(q.Fragment,{children:[t,(0,q.jsx)(bC,{src:yC[e.statusCategory],className:`harvest-crop harvest-crop--${e.statusCategory.toLowerCase()}`})]}),Panel:SC,ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(CC,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art harvest-empty`,children:[(0,q.jsx)(`img`,{src:vC(`empty-field.svg`),alt:``,width:192,height:96,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art harvest-loading`,role:`status`,children:[(0,q.jsx)(bC,{src:vC(`watering-can.svg`),size:64,className:`harvest-can`}),(0,q.jsx)(`p`,{children:e})]})},TC=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMiAxMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjIyIiBzaGFwZS1yZW5kZXJpbmc9ImNyaXNwRWRnZXMiPgo8IS0tIE92ZXJ3b3JsZCdzIG9wZW4gY2hlc3Qgd2l0aCBpdHMgZ2VtOiBhIHF1ZXN0IGNvbXBsZXRlLiBEcmF3biBmb3IgVG9pbCBVSS4gLS0+CjxyZWN0IHg9IjEiIHk9IjAiIHdpZHRoPSIxMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMGIxMjBlIi8+PHJlY3QgeD0iMCIgeT0iMSIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0iIzBiMTIwZSIvPjxyZWN0IHg9IjEiIHk9IjEiIHdpZHRoPSIxMCIgaGVpZ2h0PSIxIiBmaWxsPSIjNmI0YTJiIi8+PHJlY3QgeD0iMTEiIHk9IjEiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiMwYjEyMGUiLz48cmVjdCB4PSIwIiB5PSIyIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMGIxMjBlIi8+PHJlY3QgeD0iMSIgeT0iMiIgd2lkdGg9IjEwIiBoZWlnaHQ9IjEiIGZpbGw9IiNmMmM5NGMiLz48cmVjdCB4PSIxMSIgeT0iMiIgd2lkdGg9IjEiIGhlaWdodD0iMSIg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TapYSxeKMrg98jn4Y5JwKdtmeo9xQEp+lebriLoDWUm/64T7MPUGvVRjGWGFJ5P1HCWr2DqgRUdae9L4N3xQWR7kS+ysTM0CnIeBMdyGycR4FUhuWQwBCSEi11IndTzp+qQ/ctYOkEWRsii1IYgjGGJSPv7LLSu8ZKC1AUz1gotStR9quUhBX7fWyzC7XuimWh6Kf+CQKD4jZmV3fTa/SqMdOhuW0hXECZpr0D3Uxxp94ztjZW9193s5w+wUn5yrsMnGVWCSS6bzcbpTOyAaffD3FuFoOKhoSpmUICO26kMCBT0eQfUlwEoMqejtHYEp1hIe+w6XODEOASnt15303OnOEOI8RgegdQGzEKJwpPHZlAAAA`,RC=new URL(`stone-wall-DRNYiEy2.svg`,import.meta.url).href,zC=e=>new URL(Object.assign({"../../themes/overworld/assets/chest-open.svg":TC,"../../themes/overworld/assets/chest.svg":EC,"../../themes/overworld/assets/dungeon-map.webp":DC,"../../themes/overworld/assets/empty-room.webp":OC,"../../themes/overworld/assets/gem.svg":kC,"../../themes/overworld/assets/heart-empty.svg":AC,"../../themes/overworld/assets/heart.svg":jC,"../../themes/overworld/assets/key.svg":MC,"../../themes/overworld/assets/locked-door.svg":NC,"../../themes/overworld/assets/mark.svg":PC,"../../themes/overworld/assets/overworld.webp":FC,"../../themes/overworld/assets/sage-cave.webp":IC,"../../themes/overworld/assets/sage.webp":LC,"../../themes/overworld/assets/stone-wall.svg":RC})[`../../themes/overworld/assets/${e}`],import.meta.url).href,BC={TODO:{src:zC(`chest.svg`),height:20},IN_PROGRESS:{src:zC(`key.svg`),height:14},DONE:{src:zC(`chest-open.svg`),height:22},UNKNOWN:{src:zC(`chest.svg`),height:20}},VC={full:zC(`heart.svg`),empty:zC(`heart-empty.svg`)};function HC(){let{health:e}=fg();if(!e)return null;let t=Math.max(0,e.days.total-e.days.gone),n=e.done.points+e.remaining.points;return(0,q.jsxs)(`p`,{className:`ow-hud`,"aria-hidden":`true`,children:[(0,q.jsx)(`span`,{className:`ow-hearts`,children:Array.from({length:e.days.total},(e,n)=>(0,q.jsx)(`img`,{src:n<t?VC.full:VC.empty,alt:``,width:14,height:14},n))}),(0,q.jsxs)(`span`,{className:`ow-gems`,children:[(0,q.jsx)(`img`,{src:zC(`gem.svg`),alt:``,width:14,height:12}),e.done.points,`/`,n]})]})}function UC({id:e,children:t}){let n=(0,v.useContext)(ug)!==null;return(0,q.jsxs)(q.Fragment,{children:[(e===`sprint`||e===`board`)&&n&&(0,q.jsx)(HC,{}),t]})}function WC({children:e}){let t=nC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent ow-sage`,children:[(0,q.jsx)(`img`,{className:`ow-portrait`,src:zC(`sage.webp`),alt:``,width:48,height:55,loading:`lazy`,decoding:`async`}),(0,q.jsxs)(`div`,{className:`ow-sage-text`,children:[(0,q.jsx)(`p`,{className:`ow-sage-name`,children:t(`agent`,`Agent`)}),e]})]})}var GC={Card:({item:e,children:t})=>(0,q.jsxs)(q.Fragment,{children:[t,(0,q.jsx)(`img`,{className:`ow-loot ow-loot--${e.statusCategory.toLowerCase()}`,src:BC[e.statusCategory].src,alt:``,width:24,height:BC[e.statusCategory].height,loading:`lazy`,decoding:`async`})]}),Panel:UC,ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(WC,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art ow-room`,children:[(0,q.jsx)(`img`,{src:zC(`empty-room.webp`),alt:``,width:240,height:183,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art ow-cave`,role:`status`,children:[(0,q.jsx)(`img`,{src:zC(`sage-cave.webp`),alt:``,width:240,height:196,decoding:`async`}),(0,q.jsx)(`p`,{children:e})]})},KC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2016'%20width='24'%20height='16'%20fill='none'%20stroke='%231a1410'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c!--%20A%20blocker:%20the%20road%20runs%20up%20to%20a%20keep%20and%20breaks%20off.%20--%3e%3cpath%20d='M1%2013.5H7'%20stroke-width='1.4'%20stroke-dasharray='2%201.6'/%3e%3cpath%20d='M8.5%2011.5%2010%2014.5M9.5%2010.8%2011.5%2013'%20stroke='%236e1c18'%20stroke-width='1.2'/%3e%3cpath%20d='M13%2015V6h1.6V4.5h1.6V6h1.6V4.5h1.6V6H21v9Z'%20fill='%233a3733'%20stroke-width='1'/%3e%3cpath%20d='M16.4%2015v-3h1.6v3'%20stroke='%23d8cbb0'%20stroke-width='.9'/%3e%3c/svg%3e`,qC=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0Ij4KPCEtLSBUaGUgZG9zc2llciB0aXRsZSdzIG9uZSBpbGx1bWluYXRlZCBjYXBpdGFsOiBhbiBveGJsb29kIGZpZWxkIGluIGEgdGFybmlzaGVkLWdvbGQgZnJhbWUsIHJpdmV0ZWQgYXQgdGhlIGNvcm5lcnMuIC0tPgo8cmVjdCB4PSIxIiB5PSIxIiB3aWR0aD0iNjIiIGhlaWdodD0iNjIiIGZpbGw9IiM0YTE0MTEiIHN0cm9rZT0iIzljN2EzYyIgc3Ryb2tlLXdpZHRoPSIyIi8+CjxyZWN0IHg9IjUuNSIgeT0iNS41IiB3aWR0aD0iNTMiIGhlaWdodD0iNTMiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzljN2EzYyIgc3Ryb2tlLXdpZHRoPSIuOCIgb3BhY2l0eT0iLjgiLz4KPGcgc3Ryb2tlPSIjMmEwYzBhIiBzdHJva2Utd2lkdGg9Ii42IiBvcGFjaXR5PSIuNTUiPgo8cGF0aCBkPSJNOCAyMCAyMCA4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iAxMlYzNkgzNlYxMloiIGZpbGw9IiMyYjIxMWIiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPgo8cGF0aCBkPSJNMSAxSDQ3VjQ3SDFaIiBzdHJva2U9IiMxNDExMGUiIHN0cm9rZS13aWR0aD0iMiIvPgo8cGF0aCBkPSJNMyAzSDQ1VjQ1SDNaIiBzdHJva2U9IiM1YTQ2MzYiIHN0cm9rZS13aWR0aD0iMSIvPgo8cGF0aCBkPSJNOSA5SDM5VjM5SDlaIiBzdHJva2U9IiM5YzdhM2MiIHN0cm9rZS13aWR0aD0iMSIvPgo8cGF0aCBkPSJNMTEuNSAxMS41SDM2LjVWMzYuNUgxMS41WiIgc3Ryb2tlPSIjMTQxMTBlIiBzdHJva2Utd2lkdGg9IjEiLz4KPGcgZmlsbD0iIzZiNjY2MCIgc3Ryb2tlPSIjMTQxMTBlIiBzdHJva2Utd2lkdGg9Ii44Ij48Y2lyY2xlIGN4PSI2IiBjeT0iNiIgcj0iMi40Ii8+PGNpcmNsZSBjeD0iNDIiIGN5PSI2IiByPSIyLjQiLz48Y2lyY2xlIGN4PSI2IiBjeT0iNDIiIHI9IjIuNCIvPjxjaXJjbGUgY3g9IjQyIiBjeT0iNDIiIHI9IjIuNCIvPjwvZz4KPGcgZmlsbD0iI2JkYjZhYSI+PGNpcmNsZSBjeD0iNS4zIiBjeT0iNS4zIiByPSIuOCIvPjxjaXJjbGUgY3g9IjQxLjMiIGN5PSI1LjMiIHI9Ii44Ii8+PGNpcmNsZSBjeD0iNS4zIiBjeT0iNDEuMyIgcj0iLjgiLz48Y2lyY2xlIGN4PSI0MS4zIiBjeT0iNDEuMyIgcj0iLjgiLz48L2c+Cjwvc3ZnPgo=`,ZC=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%20120'%20width='200'%20height='120'%20fill='none'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c!--%20An%20empty%20state:%20a%20ledger%20lying%20open%20on%20its%20binding,%20its%20ruled%20pages%20blank.%20--%3e%3cpath%20d='M14%2024%20100%2030%20186%2024V104L100%20110%2014%20104Z'%20fill='%232b211b'%20stroke='%2314110e'%20stroke-width='1.6'/%3e%3cpath%20d='M20%2020C46%2018%2076%2020%2098%2027V104C76%2098%2046%2096%2020%2098Z'%20fill='%23e6dcc6'%20stroke='%233a3733'%20stroke-width='1.2'/%3e%3cpath%20d='M180%2020C154%2018%20124%2020%20102%2027V104C124%2098%20154%2096%20180%2098Z'%20fill='%23ddd1b8'%20stroke='%233a3733'%20stroke-width='1.2'/%3e%3cg%20stroke='%239c8a6c'%20stroke-width='.7'%3e%3cpath%20d='M30%2038C52%2037%2072%2039%2090%2043M30%2050C52%2049%2072%2051%2090%2055M30%2062C52%2061%2072%2063%2090%2067M30%2074C52%2073%2072%2075%2090%2079M110%2043C128%2039%20148%2037%20170%2038M110%2055C128%2051%20148%2049%20170%2050M110%2067C128%2063%20148%2061%20170%2062M110%2079C128%2075%20148%2073%20170%2074'/%3e%3c/g%3e%3cpath%20d='M44%2032V92M156%2032V92'%20stroke='%236e1c18'%20stroke-width='.7'%20stroke-opacity='.7'/%3e%3cpath%20d='M100%2027V108'%20stroke='%2314110e'%20stroke-width='2'/%3e%3cpath%20d='M186%2058H196V70H186'%20fill='%233a3733'%20stroke='%2314110e'%20stroke-width='1.2'/%3e%3ccircle%20cx='191'%20cy='64'%20r='1.6'%20fill='%239c7a3c'/%3e%3c/svg%3e`,QC=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+CjwhLS0gUmVhbG0ncyBiYWRnZTogdGhlIHRpbGUgYXMgYW4gaXJvbiBwbGF0ZSB3aXRoIGEgdGFybmlzaGVkLWdvbGQgcnVsZSBhbmQgZm91ciByaXZldHMsIHRoZSBwYWdlIGFnZWQgdmVsbHVtLiBUaGUgYmFkZ2Uncy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ill='none'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3c!--%20A%20rest:%20a%20small%20camp%20fire%20of%20two%20crossed%20logs,%20drawn%20in%20iron,%20for%20a%20day%20with%20no%20page.%20--%3e%3cpath%20d='M3%2013.5%2013%2010.5M3%2010.5%2013%2013.5'%20stroke='%233a3733'%20stroke-width='1.5'/%3e%3cpath%20d='M8%2010.8C6%209.6%206.2%207.4%208%205.2c.3%201.4%201.6%201.8%201.6%203.4%200%201.3-.7%202-1.6%202.2Z'%20fill='%236e1c18'%20stroke='%234a1411'%20stroke-width='.8'/%3e%3c/svg%3e`,ew=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNjAgMTYiIHdpZHRoPSIxNjAiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiPgo8IS0tIFRoZSBoZWFkZXIncyBlbWJvc3NlZCBydWxlOiB0d28gdGFybmlzaGVkLWdvbGQgbGluZXMgd2l0aCBhIHNoYWRvdyBiZW5lYXRoLCBhbmQgYSByaXZldCBhdCB0aGUgY2VudHJlIGFuZCBlYWNoIGVuZC4gLS0+CjxwYXRoIGQ9Ik04IDcuNUg3ME05MCA3LjVIMTUyIiBzdHJva2U9IiM5YzdhM2MiIHN0cm9rZS13aWR0aD0iMS4yIi8+CjxwYXRoIGQ9Ik04IDlINzBNOTAgOUgxNTIiIHN0cm9rZT0iIzE0MTEwZSIgc3Ryb2tlLW9wYWNpdHk9Ii43IiBzdHJva2Utd2lkdGg9Ii44Ii8+CjxwYXRoIGQ9Ik04MCAyLjUgODUuNSA4IDgwIDEzLjUgNzQuNSA4WiIgZmlsbD0iIzZlMWMxOCIgc3Ryb2tlPSIjOWM3YTNjIiBzdHJva2Utd2lkdGg9IjEiLz4KPGcgZmlsbD0iIzZiNjY2MCIgc3Ryb2tlPSIjMTQxMTBlIiBzdHJva2Utd2lkdGg9Ii44Ij48Y2lyY2xlIGN4PSI1IiBjeT0iOCIgcj0iMi40Ii8+PGNpcmNsZSBjeD0iMTU1IiBjeT0iOCIgcj0iMi40Ii8+PC9nPgo8L3N2Zz4K`,tw=new URL(`vellum-DlU0Uxzz.webp`,import.meta.url).href,nw=new URL(`war-map-_sup_aJg.webp`,import.meta.url).href,rw=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%20width='32'%20height='32'%3e%3c!--%20A%20plain%20wax%20seal:%20oxblood,%20pressed%20with%20a%20ring%20and%20a%20single%20rivet%20mark,%20no%20device.%20--%3e%3cpath%20d='M16%202.5c2%200%202.8%201.6%204.6%202s3.4-.4%204.6.9.4%203%201.2%204.6%202.4%202.4%202.4%204.4-1.4%202.6-1.8%204.4.6%203.4-.7%204.7-3.1.8-4.7%201.7-2%202.9-4%203.1-2.9-1.5-4.8-2-3.6.2-4.8-1.1-.4-3-1.4-4.6S2.5%2018.4%202.5%2016.3%204%2013.6%204.4%2011.8%204%208.5%205.4%207.3s3.1-.6%204.7-1.5S13.9%202.5%2016%202.5Z'%20fill='%236e1c18'%20stroke='%233a0d0b'%20stroke-width='1'/%3e%3ccircle%20cx='16'%20cy='16'%20r='8.2'%20fill='none'%20stroke='%233a0d0b'%20stroke-width='1.6'/%3e%3ccircle%20cx='16'%20cy='16'%20r='8.2'%20fill='none'%20stroke='%23a5453a'%20stroke-width='.6'%20stroke-dasharray='3%209'%20transform='rotate(-30%2016%2016)'/%3e%3ccircle%20cx='16'%20cy='16'%20r='2.4'%20fill='%233a0d0b'/%3e%3c/svg%3e`,iw=`https://imagile-dev.github.io/toil`,aw=`https://kolatts.github.io/context-overflow`,ow=e=>`${aw}/glossary/${e.slug}`,sw=[{title:`Hello, Agent`,task:`New to agents: start here`,path:`/modules/getting-started`},{title:`AI Fluency 101`,task:`New to agents: then this`,path:`/modules/ai-fluency-101`},{title:`The Autonomy Spectrum`,task:`Deciding how much to hand an agent`,path:`/modules/autonomy-spectrum`},{title:`Git: Your Time Machine`,task:`Branches and pull requests, for Implement mode`,path:`/modules/git-time-machine`}],cw=e=>`${aw}${e.path}`,lw={dossiers:{title:`dossiers`,text:`A dossier names the repositories, tracker, pipelines and environments of one body of work. Each card is read from the cache a sync filled, so opening this page asks no tracker anything.`,page:`/docs/ui/`,anchor:`the-dossiers-view`},dashboard:{title:`this dashboard`,text:`Every panel is read through toil, read-only, and says which commands fed it. A call that failed shows on its own panel with toil's message and fix.`,page:`/docs/ui/`,anchor:`what-it-reads`},recommendation:{title:`the recommendation`,text:`The latest Analyze's recommendation when the dossier has one, with when it was made. Without one it is worked out by code, with no agent call, from the blockers, builds, pull requests, aging work, readiness and the sprint's pace, and the card says which.`,page:`/docs/ui/`,anchor:`the-overview`},insights:{title:`insights`,text:`An insight is something about an item that deserves a look, such as Blocked, Stale or Build failing, weightiest first. Each one names the field, history or command it rests on.`,page:`/docs/ui/`,anchor:`insights`},prs:{title:`pull requests`,text:`Read from every code host the dossier names, the open ones ranked by how long each has waited and on what. Flow figures are the team's, never one person's.`,page:`/docs/ui/`,anchor:`pull-requests`},people:{title:`the People view`,text:`What is on each person's plate, from the dossier's people section and the same items and pull requests as the dashboard. It never ranks or scores anyone.`,page:`/docs/ui/`,anchor:`people`},readiness:{title:`the Command Center`,text:`Each verdict is worked out from the cached records, with no model call and no live read. Only ready items are slated, in the dossier's order.`,page:`/docs/ui/`,anchor:`readiness-and-the-command-center`},worklog:{title:`the worklog`,text:`One page a day, folded by code from the sync, the pull requests, the builds and the agent's runs: facts only, each line linked to where it came from. Days and times are UTC.`,page:`/docs/ui/`,anchor:`worklog`},standup:{title:`the stand-up`,text:`Built by code from the worklog's days, facts only, so the same days always give the same report. Days and times are UTC.`,page:`/docs/ui/`,anchor:`stand-up`},proposal:{title:`the write gate`,text:`Nothing changes until you run the command yourself. toil's write gate then needs writes on for the connection and --allow-write on the call.`,page:`/docs/core/`,anchor:`writes`},settings:{title:`toil's configuration`,text:`Changes run toil's own connections and dossiers commands, never an edit to a file, and each is in toil's audit log as toil-ui. Nothing here writes to a tracker.`,page:`/docs/ui/`,anchor:`toils-configuration`},connections:{title:`connections`,text:`A connection is one instance of an area: its host, its credential and whether writes are on. toil connections list never returns a secret, which stays in the OS credential store.`,page:`/docs/core/`,anchor:`configuration`},"dossier-setup":{title:`dossier setup`,text:`Each form runs one toil dossiers command, which checks the file before writing it and refuses to add what's already there unless you tick Replace. A dossier holds no secret and can't turn writes on.`,page:`/docs/dossiers/`,anchor:`create-check-use-share`},"dossier-list":{title:`where dossiers come from`,text:`Your own dossiers, any folders you listed, and the ones a repository checks in. Check finds problems without contacting any service.`,page:`/docs/dossiers/`,anchor:`where-dossiers-live`},"repo-setup":{title:`setting up a repo`,text:`For a repository with a dossier checked in: which of your connections each area would use, the ones still missing, and one test read through each. It changes nothing.`,page:`/docs/dossiers/`,anchor:`onboarding-to-a-repo-that-has-a-dossier`},bounds:{title:`bounds and the time limit`,text:`toil has no command to change these, and Toil UI never edits toil's files, so they're shown as toil reports them. Only your own config file can relax a bound, and only the file workspace.`,page:`/docs/core/`,anchor:`files-and-the-workspace`},audit:{title:`usage of toil`,text:`From toil audit stats, which reads only toil's audit log on this machine and sends it nowhere. It counts the command, how it was called and how it ended, never what a call was given or got back.`,page:`/docs/core/`,anchor:`the-audit-log`},"audit-failures":{title:`failures`,text:`The log keeps each failure's error code, never its message, so the fix shown is the one that usually applies to that code.`,page:`/docs/core/`,anchor:`the-audit-log`},"model-usage":{title:`the agent's usage`,text:`Figures the Claude, Codex and Copilot SDKs reported, kept only in Toil UI's local cache and sent nowhere. A figure an SDK didn't report reads not reported; your vendor's bill is the authority.`,page:`/docs/ui/`,anchor:`what-the-agents-models-used`,glossary:[{term:`Token`,slug:`token`,text:`The atomic unit a model reads and writes.`},{term:`Input tokens`,slug:`input-tokens`,text:`Tokens the harness sends on each model provider request.`},{term:`Output tokens`,slug:`output-tokens`,text:`Tokens the model generates back.`},{term:`Cache tokens`,slug:`cache-tokens`,text:`Input tokens the provider has cached from a previous request via its prefix cache, billed at a much lower rate.`}]},caps:{title:`caps`,text:`At 80% the chat says so; at 100% the question stops, naming the cap. A cap counts only what the SDK reports, so it guards against a runaway and is not a budget.`,page:`/docs/ui/`,anchor:`what-the-agents-models-used`,glossary:[{term:`Context window`,slug:`context-window`,text:`Everything the model sees on each model provider request.`},{term:`Effort`,slug:`effort`,text:`A dial for how much reasoning the model does before it answers.`}]},agent:{title:`the agent`,text:`The agent your organization already approved answers in the chat, on your own subscription, and only reads. These are Toil UI's own settings, kept in its data folder, never in toil's config.`,page:`/docs/ui/`,anchor:`the-agent`,glossary:[{term:`Model`,slug:`model`,text:`The parameters. Stateless — does next-token prediction and nothing else.`},{term:`Model provider`,slug:`model-provider`,text:`Whatever serves a model for inference.`},{term:`Harness`,slug:`harness`,text:`Everything around the model that turns it into an agent: tools, system prompt, context-window management, permissions, hooks.`},{term:`MCP`,slug:`mcp`,text:`A protocol for plugging external tool servers into a harness — how an agent gets tools beyond what the harness ships with.`},{term:`Tool call`,slug:`tool-call`,text:`The model's output naming a tool and its arguments — just structured text.`}]},assignments:{title:`assigning work to an agent`,text:`An assignment runs on your adapter, within your time limit and usage caps. Nothing it proposes leaves this machine until you apply it through toil's write gate.`,page:`/docs/ui/`,anchor:`assigning-work-to-an-agent`,glossary:[{term:`Sandbox`,slug:`sandbox`,text:`An isolated environment the agent runs inside — container, VM, or restricted shell.`},{term:`Permission mode`,slug:`permission-mode`,text:`The permission-gating slice of an agent mode — which tool calls trigger a permission request and which run automatically.`},{term:`Human-in-the-loop`,slug:`human-in-the-loop`,text:`A working pattern where one or more humans pair with the agent during a session — reviewing, redirecting, or collaborating in real time.`},{term:`Human review`,slug:`human-review`,text:`The user reading the code the agent produced and forming a judgement on it.`}]},stale:{title:`stale sessions`,text:`A chat or an assignment works from the instructions it started on. When toil, the dossier or your instructions change, it says which, and renews on request.`,page:`/docs/ui/`,anchor:`stale-sessions`,glossary:[{term:`Session`,slug:`session`,text:`One bounded run of interaction with an agent.`},{term:`System prompt`,slug:`system-prompt`,text:`The instructions the harness prepends to every model provider request — the agent's standing brief.`},{term:`Skill`,slug:`skill`,text:`A teachable capability bundled as a unit — kept out of the context window until a context pointer pulls it in for the task at hand.`}]},answers:{title:`these answers`,text:`The agent reads through toil and cites each item it used, and an id its tools never returned is named above the answer. Analyze answers top-down: a recommendation, the issues behind it, then the evidence.`,page:`/docs/ui/`,anchor:`the-agent`,glossary:[{term:`Hallucination`,slug:`hallucination`,text:`Confidently-wrong model output.`},{term:`Primary source`,slug:`primary-source`,text:`The thing itself — code, transcripts, raw data.`},{term:`Non-determinism`,slug:`non-determinism`,text:`The same input can produce different output.`}]},"themed-wording":{title:`themed wording`,text:`The theme's own lede, eyebrows, notes, empty states and loading lines, and its names for a sprint, a board or an epic beside the real ones. Buttons, links, figures, ids, commands and errors always read the same.`,page:`/docs/themes/`,anchor:`visuals-wording-and-voice`},"themed-voice":{title:`themed agent voice`,text:`The agent answers in the theme's register. It changes phrasing only: citations, figures and proposals stay exact.`,page:`/docs/themes/`,anchor:`the-checkboxes`},"first-run":{title:`getting started`,text:`Each step ticks itself off from toil's own state: a connection to a tracker (one made by env vars counts), a dossier, and a first sync. The list goes once the first sync finishes.`,page:`/docs/ui/`,anchor:`first-run`},sync:{title:`syncing`,text:`A sync reads every dossier through toil, read-only, and keeps what it read in a cache on this machine. Every view reads that cache, so opening one asks no tracker anything.`,page:`/docs/ui/`,anchor:`sync-and-the-cache`},"sample-data":{title:`the sample data`,text:`Sample dossiers and a scripted agent, with nothing connected to a tracker. Stop this Toil UI with Ctrl+C and start it again with this command to look around first.`,page:`/docs/ui/`,anchor:`start-it`},palette:{title:`the command palette`,text:`Jumps to a dossier, a tab, an item in any dossier, a saved analysis, a setting or a theme, and runs Sync, Analyze and Ask. Items are searched in the cache, never live.`,page:`/docs/ui/`,anchor:`the-command-palette`},alignments:{title:`rolled alignments`,text:`Each card's alignment is rolled from its name alone, for play, so it says nothing about anyone or their work. Only good and neutral ones are on the list, and themed wording off removes them.`,page:`/docs/themes/`,anchor:`rolled-alignments`},"rest-days":{title:`rest days`,text:`A past day with nothing on its page, or no page at all, is a rest: a small camp fire for a short rest on a weekday, a larger one for a long rest at the weekend.`,page:`/docs/themes/`,anchor:`rest-days`},motion:{title:`motion and effects`,text:`Reduce motion stops the themes' animations and particles in this browser. Your system's reduced-motion setting stops them whichever way this is set.`,page:`/docs/themes/`,anchor:`motion-and-particles`},board:{title:`the board`,text:`Drag a card, or press M on it, to propose a move to another column. The card stays where its tracker says until you apply the command.`,page:`/docs/ui/`,anchor:`the-board`},analyses:{title:`the Analyses tab`,text:`Analyze asks the agent for a pulse check, top-down: a recommendation, the issues behind it, then the evidence. Each one is kept here with what changed since the one before, worked out by code from each one's snapshot.`,page:`/docs/ui/`,anchor:`the-dossier-page`},notifications:{title:`notifications`,text:`A notice when an agent's state changes, never for a tool call. Which states notify, quiet hours and only your own are under Settings, General.`,page:`/docs/ui/`,anchor:`notifications`},"notification-history":{title:`the notification history`,text:`The last 50 notices and sync results, kept in this browser and sent nowhere, each linking to what it's about. Mark all read clears the count and keeps them.`,page:`/docs/ui/`,anchor:`notification-history`},"theme-motion":{title:`theme motion`,text:`How much the theme's splash, loading screens, entrances and moments move: full, subtle or off. Off whenever reduced motion is asked for.`,page:`/docs/themes/`,anchor:`theme-moments`},tips:{title:`toil tips`,text:`One line about toil on each loading screen, in plain words, each with a Read more link. Turn them off here; the choice is kept in this browser.`,page:`/docs/themes/`,anchor:`toil-tips`}},uw=e=>`${iw}${e.page}#${e.anchor}`,dw={dossiers:`dossiers`,dashboard:`dashboard`,prs:`prs`,people:`people`,"command-center":`readiness`,worklog:`worklog`,standup:`standup`,item:`readiness`,assignment:`assignments`,settings:`settings`},fw={"agent-usage":`model-usage`,agent:`agent`,usage:`audit`,dossiers:`dossier-setup`,connections:`connections`};function pw(e,t){return uw(lw[e===`settings`&&t?fw[t]??`settings`:dw[e]])}var mw=`toil-ui.learning`;function hw(){try{return localStorage.getItem(mw)!==`off`}catch{return!0}}var gw=null,_w=new Set;function vw(){return gw??=hw(),gw}function yw(e){gw=e;try{localStorage.setItem(mw,e?`on`:`off`)}catch{}for(let e of _w)e()}function bw(e){return _w.add(e),()=>_w.delete(e)}function xw(){return[(0,v.useSyncExternalStore)(bw,vw,()=>!0),yw]}var Sw=[{product:`ui`,version:`0.1.0-beta.2`,date:`2026-10-26`,lines:[`Sync Jira Cloud dossiers, and let triage change Toil UI`,`Preserve USER for Claude CLI authentication`]},{product:`ui`,version:`0.1.0-beta.1`,date:`2026-10-24`,lines:[`A blocker Gantt on the sprint timeline, with the critical chain`,`A guided first run, a command palette, and search across dossiers`,`A history of analyses, and answers that read top-down`,`Add hidden Powershell Man arcade to UI and site`,`Context Overflow glossary links in the (i)s, and Learn in Help, the chat and the CLI menu`]},{product:`ui`,version:`0.1.0-alpha.3`,date:`2026-10-21`,lines:[`A particle switch for every theme, and Fredoka in Plain`,`A stand-up report folded from the worklog, by person, with an optional agent write-up`,`Ask up front with live status and Analyze; switch agents live and install an approved SDK in one press`,`Dossier pages that preview the work, and a dossier's name and description edited in place`,`Drag the whole board card, with its moves in a context menu`]},{product:`ui`,version:`0.1.0-alpha.2`,date:`2026-10-20`,lines:[`A daily worklog per dossier, folded from the sync, pull requests, builds and agent runs`,`A People view of what each person and agent is working on`,`A refined, grimdark Realm theme`,`Assign work items to an agent, in refine, investigate and implement modes`,`npm run verify:ui, Codex in a home of its own, and the lockfile held to the pin`]},{product:`ui`,version:`0.1.0-alpha.1`,date:`2026-10-19`,lines:[`Agent adapters for Claude, Copilot and Codex`,`Board, flow, dependency graph, insights, charts and a docked chat`,`Generated art for the game themes`,`Harvest, Starship and Realm themes`,`Motion and life for the game themes`]},{product:`toil`,version:`0.1.0-beta.2`,date:`2026-10-26`,lines:[]},{product:`toil`,version:`0.1.0-beta.1`,date:`2026-10-24`,lines:[`Crate in the site's blue, in Toil UI, the welcome menu and the site's screenshot`,`Crate is the default theme everywhere, CLI included`,`Hive and Impala through one HiveServer2 provider`,`Teradata through the Teradata Query Service`,`The emails in Toil UI Plain's blue`]},{product:`toil`,version:`0.1.0-alpha.5`,date:`2026-10-21`,lines:[`Onboard to a repo's dossiers, match connections by host, and shareable dossiers by default`,`Show that a pasted secret arrived, and check the paste, on the CLI and in Toil UI`,`Ticket the work before starting it, in the skill and in Toil UI's chat`]},{product:`toil`,version:`0.1.0-alpha.4`,date:`2026-10-20`,lines:[`Read a team's sprints, backlogs, boards and work item type states`,`A dialect pre-flight lint before SQL runs, and toil db lint`,`One command shape for jira and ado, and a Services menu`,`OWI for GitHub without a board: milestones as sprints, estimate labels and links`,`Pull request tracking in Toil UI across GitHub, Bitbucket and Azure DevOps`]},{product:`toil`,version:`0.1.0-alpha.3`,date:`2026-10-19`,lines:[`Consented feedback from the site, the API, toil feedback and Toil UI`,`Playful wordmark across the site, Toil UI and the CLI`,`Match .gitignore globs in linear time`,`Skip only the bad .gitignore line, with a warning`,`Layout primitives, an overflow check, and the UI and site sweep fixes`]},{product:`toil`,version:`0.1.0-alpha.2`,date:`2026-10-19`,lines:[`Run --grep, md conversion, size outlines and YAML parsing in the bounded worker`,`Install bubblewrap for the agent's isolation, and clear failure labels on a decision`]},{product:`toil`,version:`0.1.0-alpha.1`,date:`2026-10-18`,lines:[`Add Azure DevOps Services integration beside Azure DevOps Server`,`Add the Azure DevOps Server integration`,`Page every list through meta.page, add --updated-since, work revisions and work get-batch`,`Add the Alation integration`,`Add the JFrog Artifactory integration`]}],Cw={ui:`0.1.0-beta.2`,toil:`0.1.0-beta.2`},ww={toil:`toil`,ui:`Toil UI`},Tw={toil:`https://github.com/imagile-dev/toil/blob/main/CHANGELOG.md`,ui:`https://github.com/imagile-dev/toil/blob/main/ui/CHANGELOG.md`};function Ew(e,t){let n=e=>{let t=/^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?/.exec(e.trim());return t?{nums:[Number(t[1]),Number(t[2]),Number(t[3])],pre:t[4]?.split(`.`)??[]}:null},r=n(e),i=n(t);if(!r||!i)return 0;for(let e=0;e<3;e++)if(r.nums[e]!==i.nums[e])return r.nums[e]-i.nums[e];if(!r.pre.length||!i.pre.length)return i.pre.length-r.pre.length;for(let e=0;e<Math.max(r.pre.length,i.pre.length);e++){let t=r.pre[e],n=i.pre[e];if(t===void 0)return-1;if(n===void 0)return 1;let a=/^\d+$/.test(t),o=/^\d+$/.test(n);if(a&&o&&Number(t)!==Number(n))return Number(t)-Number(n);if(a!==o)return a?-1:1;if(!a&&t!==n)return t<n?-1:1}return 0}function Dw(e,t,n){return e.filter(e=>{let r=t?.[e.product];return r!==void 0&&Ew(e.version,r)>0&&Ew(e.version,n[e.product])<=0})}function Ow(e,t){let n=[];for(let r of[`ui`,`toil`]){let i=e.filter(e=>e.product===r&&Ew(e.version,t[r])<=0).sort((e,t)=>Ew(t.version,e.version))[0];i&&n.push(i)}return n}function kw(e){if(!e)return null;try{let t=JSON.parse(e);if(!t||typeof t!=`object`)return null;let n={};for(let e of[`toil`,`ui`])typeof t[e]==`string`&&(n[e]=t[e]);return Object.keys(n).length?n:null}catch{return null}}var Aw=`toil-ui.whats-new.seen`,jw=()=>{try{return localStorage.getItem(Aw)}catch{return null}},Mw=e=>{try{localStorage.setItem(Aw,JSON.stringify(e))}catch{}};function Nw(e=Cw,t=Sw){let[n,r]=(0,v.useState)(()=>{let t=kw(jw());return t||Mw(e),t??e}),i=Dw(t,n,e),a=(0,v.useCallback)(()=>{Mw(e),r(e)},[e]);return{fresh:i,shown:i.length?i:Ow(t,e),seen:a}}function Pw({shown:e,fresh:t,isOpen:n,onOpenChange:r}){let i=[...new Set(e.map(e=>e.product))];return(0,q.jsx)(Of,{className:`palette-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:n,onOpenChange:r,children:(0,q.jsx)(Ef,{className:`palette-modal whats-new-modal`,children:(0,q.jsx)(uf,{className:`whats-new`,"aria-labelledby":`whats-new-title`,"data-whats-new":``,children:({close:n})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`whats-new__head`,children:[(0,q.jsx)(ja,{slot:`title`,id:`whats-new-title`,children:`What's new`}),(0,q.jsx)(W,{className:`btn btn--small`,onPress:n,"data-whats-new-close":``,children:`Close`})]}),(0,q.jsx)(`p`,{className:`note`,children:t?`Since this browser last looked.`:`Nothing new since this browser last looked. The latest:`}),e.map(e=>(0,q.jsxs)(`section`,{className:`whats-new__release`,"aria-labelledby":`wn-${e.product}-${e.version}`,children:[(0,q.jsxs)(`h3`,{id:`wn-${e.product}-${e.version}`,children:[ww[e.product],` `,e.version,e.date&&(0,q.jsxs)(`span`,{className:`note`,children:[` · `,vg(e.date)]})]}),e.lines.length?(0,q.jsx)(`ul`,{children:e.lines.map(e=>(0,q.jsx)(`li`,{children:e},e))}):(0,q.jsx)(`p`,{className:`note`,children:`Nothing that changes how you use it.`})]},`${e.product}@${e.version}`)),(0,q.jsx)(`p`,{className:`whats-new__links`,children:i.map(e=>(0,q.jsxs)(`a`,{href:Tw[e],target:`_blank`,rel:`noopener noreferrer`,"data-changelog":``,children:[ww[e],`'s full changelog`,(0,q.jsx)(`span`,{className:`sr-only`,children:` (opens in a new tab)`})]},e))})]})})})})}function Fw(){return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`new-dot`,"aria-hidden":`true`,"data-new-dot":``}),(0,q.jsx)(`span`,{className:`sr-only`,children:`, with something new`})]})}function Iw({topic:e}){let t=lw[e];return(0,q.jsxs)(lf,{children:[(0,q.jsxs)(om,{delay:400,closeDelay:200,children:[(0,q.jsx)(W,{className:`btn help-button`,"data-help":e,"aria-label":`About ${t.title}`,children:(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`help-button__mark`,children:`i`})}),(0,q.jsx)(sm,{className:`help-tooltip`,offset:6,children:t.text})]}),(0,q.jsx)(Xu,{className:`popover help-popover`,placement:`bottom`,offset:6,children:(0,q.jsxs)(uf,{className:`help-popover__dialog`,"aria-label":`About ${t.title}`,children:[(0,q.jsxs)(ja,{slot:`title`,className:`help-popover__title`,children:[`About `,t.title]}),(0,q.jsx)(`p`,{children:t.text}),(0,q.jsx)(`p`,{children:(0,q.jsxs)(`a`,{href:uw(t),target:`_blank`,rel:`noopener noreferrer`,"data-read-more":``,children:[`Read more`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` about `,t.title,` in the docs (opens in a new tab)`]})]})}),t.glossary&&(0,q.jsx)(Lw,{entries:t.glossary})]})})]})}function Lw({entries:e}){let[t]=xw();return!t||!e.length?null:(0,q.jsx)(`ul`,{className:`help-glossary`,"aria-label":`Terms, from Context Overflow's glossary`,"data-glossary":``,children:e.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:e.term}),`: `,e.text,` `]}),(0,q.jsxs)(`a`,{href:ow(e),target:`_blank`,rel:`noopener noreferrer`,"data-learn-link":``,children:[`Read more on Context Overflow`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` about `,e.term,` (opens in a new tab)`]})]})]},e.slug))})}function Rw({href:e,fresh:t=!1,onWhatsNew:n}){let[r]=xw();return(0,q.jsxs)(Xd,{children:[(0,q.jsxs)(W,{className:`btn help-link`,"data-help-link":``,children:[`Help`,t&&(0,q.jsx)(Fw,{}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:` ▾`})]}),(0,q.jsx)(Xu,{className:`popover menu-popover`,placement:`bottom end`,offset:6,children:(0,q.jsxs)(Qd,{className:`menu help-menu`,"aria-label":`Help`,onAction:e=>e===`whats-new`&&n?.(),children:[(0,q.jsxs)(af,{className:`menu-item`,href:e,target:`_blank`,rel:`noopener noreferrer`,textValue:`Help for this view`,children:[`Help for this view`,(0,q.jsx)(`span`,{className:`sr-only`,children:` (opens in a new tab)`})]}),n&&(0,q.jsxs)(af,{id:`whats-new`,className:`menu-item`,textValue:`What's new`,"data-whats-new-open":``,children:[`What's new`,t&&(0,q.jsx)(Fw,{})]}),r&&(0,q.jsxs)(nf,{children:[(0,q.jsx)(ys,{className:`menu-header`,children:`Learn, on Context Overflow`}),sw.map(e=>(0,q.jsxs)(af,{id:e.path,className:`menu-item help-menu__module`,href:cw(e),target:`_blank`,rel:`noopener noreferrer`,textValue:e.title,"data-learn-link":``,children:[(0,q.jsx)(Na,{slot:`label`,children:e.title}),(0,q.jsxs)(Na,{slot:`description`,className:`note`,children:[e.task,(0,q.jsx)(`span`,{className:`sr-only`,children:` (opens in a new tab)`})]})]},e.path))]})]})})]})}function zw(){let[e]=xw();return e?(0,q.jsxs)(lf,{children:[(0,q.jsx)(W,{className:`btn btn--small learn-button`,"data-learn":``,children:`Learn`}),(0,q.jsx)(Xu,{className:`popover help-popover`,placement:`bottom start`,offset:6,children:(0,q.jsxs)(uf,{className:`help-popover__dialog`,"aria-labelledby":`learn-title`,children:[(0,q.jsx)(ja,{slot:`title`,id:`learn-title`,className:`help-popover__title`,children:`Learn, on Context Overflow`}),(0,q.jsx)(`ul`,{className:`help-learn`,children:sw.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`a`,{href:cw(e),target:`_blank`,rel:`noopener noreferrer`,"data-learn-link":``,children:[e.title,(0,q.jsx)(`span`,{className:`sr-only`,children:` (opens in a new tab)`})]}),(0,q.jsx)(`span`,{className:`note`,children:e.task})]},e.path))})]})})]}):null}function Bw({href:e,label:t}){return(0,q.jsx)(`a`,{className:`btn btn--small edit-link`,href:e,"aria-label":t,title:t,"data-edit-link":``,children:(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`✎`})})}function Vw(e,t){(0,v.useEffect)(()=>{if(!e||!t)return;let n=document.getElementById(e)??document.querySelector(`main h1`);n&&(n.tabIndex<0&&!n.hasAttribute(`tabindex`)&&n.setAttribute(`tabindex`,`-1`),n.scrollIntoView?.({block:`start`}),n.focus())},[e,t])}var Hw=e=>new URL(Object.assign({"../../themes/realm/assets/broken-road.svg":KC,"../../themes/realm/assets/capital.svg":qC,"../../themes/realm/assets/d20.svg":JC,"../../themes/realm/assets/dungeon-map.webp":YC,"../../themes/realm/assets/iron-band.svg":XC,"../../themes/realm/assets/ledger.svg":ZC,"../../themes/realm/assets/mark.svg":QC,"../../themes/realm/assets/rest.svg":$C,"../../themes/realm/assets/rule.svg":ew,"../../themes/realm/assets/vellum.webp":tw,"../../themes/realm/assets/war-map.webp":nw,"../../themes/realm/assets/wax-seal.svg":rw})[`../../themes/realm/assets/${e}`],import.meta.url).href;function Uw({item:e}){let t=(0,v.useContext)(ug),n=nC(),r=e.parent?t?.byId.get(e.parent):void 0;return!r||r.type!==`EPIC`?null:(0,q.jsxs)(`p`,{className:`realm-campaign`,children:[n(`epic`,r.typeName??`Epic`),`: `,r.title]})}function Ww(){let{health:e}=fg(),t=nC(),{wording:n}=QS();if(!e||!n)return null;let r=e.remaining.points,i=e.done.points+r;return(0,q.jsxs)(`div`,{className:`realm-vitals`,children:[(0,q.jsxs)(`p`,{className:`realm-vital`,children:[(0,q.jsx)(`span`,{className:`realm-vital__name`,children:t(`pointsLeft`,`Points left`)}),` `,(0,q.jsxs)(`span`,{className:`realm-vital__value`,children:[r,` of `,i]})]}),(0,q.jsx)(`span`,{className:`realm-hp`,"aria-hidden":`true`,children:(0,q.jsx)(`span`,{style:{width:`${i?100*r/i:0}%`}})})]})}function Gw(){let{wording:e}=QS();return e?(0,q.jsxs)(`p`,{className:`note realm-rests`,children:[`Camp fires mark rest days. `,(0,q.jsx)(Iw,{topic:`rest-days`})]}):null}function Kw({id:e,children:t}){let n=(0,v.useContext)(ug)!==null,{wording:r}=QS();return e===`sprint`&&n?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Ww,{}),t]}):e===`worklog-calendar`?(0,q.jsxs)(q.Fragment,{children:[r&&(0,q.jsx)(`i`,{className:`realm-rest-key`,hidden:!0}),t,(0,q.jsx)(Gw,{})]}):t}function qw({children:e}){let t=nC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent realm-steward`,children:[(0,q.jsxs)(`p`,{className:`realm-steward-name`,children:[(0,q.jsx)(`img`,{src:Hw(`wax-seal.svg`),alt:``,width:24,height:24,loading:`lazy`,decoding:`async`}),t(`agent`,`Agent`)]}),e]})}var Jw={Card:({item:e,children:t})=>(0,q.jsxs)(q.Fragment,{children:[t,(0,q.jsx)(Uw,{item:e})]}),Panel:Kw,Header:({children:e})=>(0,q.jsxs)(q.Fragment,{children:[e,(0,q.jsx)(`img`,{className:`realm-rule realm-rule--header`,src:Hw(`rule.svg`),alt:``,width:160,height:16,loading:`lazy`,decoding:`async`,"aria-hidden":`true`})]}),ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(qw,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art realm-ledger`,children:[(0,q.jsx)(`img`,{src:Hw(`ledger.svg`),alt:``,width:200,height:120,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art realm-roll`,role:`status`,children:[(0,q.jsx)(`img`,{className:`realm-d20`,src:Hw(`d20.svg`),alt:``,width:88,height:88,decoding:`async`}),(0,q.jsx)(`p`,{children:e})]})},Yw=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3c!--%20Black%20ICE:%20a%20cracked%20hexagonal%20barrier,%20in%20danger%20red%20on%20black.%20--%3e%3cpath%20d='M8%201%2014%204.5v7L8%2015%202%2011.5v-7Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='1.3'/%3e%3cpath%20d='m8%203.5-1.5%203.5%202.5%201.5-2%204'%20stroke='%23ff6470'%20stroke-width='1.1'%20stroke-linejoin='bevel'/%3e%3c/svg%3e`,Xw=new URL(`dead-drop-BHoO7uon.webp`,import.meta.url).href,Zw=new URL(`jack-in-Cs60f1qu.webp`,import.meta.url).href,Qw=`data:image/sv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MSAzLTNaIiBmaWxsPSIjMDcwNjBmIiBzdHJva2U9IiMzZmYwZmYiIHN0cm9rZS13aWR0aD0iMSIgZmlsdGVyPSJ1cmwoI2I3ZykiLz4KPHBhdGggZD0iTTM2IDE3LjV2NC41YTIuNSAyLjUgMCAwIDAgMi41IDIuNUg0M1oiIGZpbGw9IiNmZjJlODgiIG9wYWNpdHk9Ii44NSIvPgo8ZyBmaWx0ZXI9InVybCgjYjdnKSIgc3Ryb2tlPSIjM2ZmMGZmIiBzdHJva2Utd2lkdGg9IjIuNiIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIgc3Ryb2tlLWxpbmVqb2luPSJtaXRlciI+CjxwYXRoIGQ9Im0yNC41IDI3LjUgNSA0LjMtNSA0LjMiLz4KPC9nPgo8cmVjdCB4PSIzMS42IiB5PSIzNi40IiB3aWR0aD0iNS42IiBoZWlnaHQ9IjYuNCIgZmlsbD0iI2ZmMmU4OCIgZmlsdGVyPSJ1cmwoI2I3ZykiLz4KPHBhdGggZD0iTTIyLjUgMjIuNWg5TTIyLjUgNDVoNE0yOCA0NWg5IiBzdHJva2U9IiMzZmYwZmYiIHN0cm9rZS13aWR0aD0iLjUiIG9wYWNpdHk9Ii40NSIvPgo8L2c+Cjwvc3ZnPgo=`,$w=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%20320'%20width='320'%20height='320'%3e%3c!--%20The%20net%20map:%20a%20megacity%20street%20grid%20as%20a%20wireframe,%20tiled%20behind%20the%20dependency%20graph.%20--%3e%3crect%20width='320'%20height='320'%20fill='%2307060f'/%3e%3cpath%20d='M0%200V320'%20stroke='%233ff0ff'%20stroke-width='1.2'%20opacity='0.32'/%3e%3cpath%20d='M58%200V320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M96%200V320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M150%200V320'%20stroke='%233ff0ff'%20stroke-width='1.2'%20opacity='0.32'/%3e%3cpath%20d='M212%200V320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M248%200V320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M290%200V320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M0%200H320'%20stroke='%233ff0ff'%20stroke-width='1.2'%20opacity='0.32'/%3e%3cpath%20d='M0%2044H320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M0%20110H320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M0%20148H320'%20stroke='%233ff0ff'%20stroke-width='1.2'%20opacity='0.32'/%3e%3cpath%20d='M0%20196H320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M0%20262H320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3cpath%20d='M0%20300H320'%20stroke='%233ff0ff'%20stroke-width='0.6'%20opacity='0.18'/%3e%3crect%20x='4'%20y='4'%20width='50'%20height='36'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='4'%20y='114'%20width='50'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='4'%20y='152'%20width='50'%20height='40'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='4'%20y='266'%20width='50'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='62'%20y='114'%20width='30'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='100'%20y='4'%20width='46'%20height='36'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='100'%20y='152'%20width='46'%20height='40'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='100'%20y='266'%20width='46'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='154'%20y='48'%20width='54'%20height='58'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='154'%20y='114'%20width='54'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='216'%20y='114'%20width='28'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='216'%20y='152'%20width='28'%20height='40'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='216'%20y='266'%20width='28'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='252'%20y='4'%20width='34'%20height='36'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='252'%20y='48'%20width='34'%20height='58'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='252'%20y='114'%20width='34'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='294'%20y='4'%20width='22'%20height='36'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='294'%20y='48'%20width='22'%20height='58'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='294'%20y='152'%20width='22'%20height='40'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='294'%20y='200'%20width='22'%20height='58'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3crect%20x='294'%20y='266'%20width='22'%20height='30'%20stroke='%235a4bb0'%20stroke-width='0.6'%20opacity='0.35'/%3e%3cpath%20d='M0%20230L90%20140M90%20140H150L320%20-30M0%20550'%20stroke='%23ff2e88'%20stroke-width='0.8'%20opacity='0.28'/%3e%3ccircle%20cx='0'%20cy='110'%20r='1.8'%20fill='%23ff2e88'%20opacity='0.7'/%3e%3ccircle%20cx='96'%20cy='196'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3ccircle%20cx='290'%20cy='148'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3ccircle%20cx='58'%20cy='110'%20r='1.8'%20fill='%23ff2e88'%20opacity='0.7'/%3e%3ccircle%20cx='58'%20cy='110'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3ccircle%20cx='96'%20cy='110'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3ccircle%20cx='150'%20cy='196'%20r='1.8'%20fill='%23ff2e88'%20opacity='0.7'/%3e%3ccircle%20cx='58'%20cy='300'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3ccircle%20cx='150'%20cy='300'%20r='1.8'%20fill='%233ff0ff'%20opacity='0.7'/%3e%3c/svg%3e`,eT=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%3e%3c!--%20The%20netrunner:%20a%20terminal%20window%20with%20a%20prompt%20and%20a%20block%20cursor,%20in%20neon.%20--%3e%3crect%20x='1.5'%20y='3.5'%20width='21'%20height='17'%20stroke='%233ff0ff'%20stroke-width='1.2'/%3e%3cpath%20d='M1.5%207.5h21'%20stroke='%233ff0ff'%20stroke-width='1'/%3e%3crect%20x='3'%20y='5'%20width='1.5'%20height='1.2'%20fill='%23ff2e88'/%3e%3crect%20x='5.5'%20y='5'%20width='1.5'%20height='1.2'%20fill='%23f2ff4a'/%3e%3cpath%20d='m5%2011%203%202.5-3%202.5'%20stroke='%233ff0ff'%20stroke-width='1.6'%20stroke-linecap='square'/%3e%3crect%20x='10'%20y='14.5'%20width='4'%20height='3'%20fill='%23ff2e88'/%3e%3c/svg%3e`,tT=new URL(`skyline-CZ4WZ55S.webp`,import.meta.url).href,nT=e=>new URL(Object.assign({"../../themes/sprawl/assets/black-ice.svg":Yw,"../../themes/sprawl/assets/dead-drop.webp":Xw,"../../themes/sprawl/assets/jack-in.webp":Zw,"../../themes/sprawl/assets/mark.svg":Qw,"../../themes/sprawl/assets/net-map.svg":$w,"../../themes/sprawl/assets/netrunner.svg":eT,"../../themes/sprawl/assets/skyline.webp":tT})[`../../themes/sprawl/assets/${e}`],import.meta.url).href;function rT(){return(0,q.jsx)(`span`,{className:`sprawl-notch`,"aria-hidden":`true`})}function iT({children:e}){let t=nC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent sprawl-term`,children:[(0,q.jsxs)(`p`,{className:`sprawl-term__bar`,children:[(0,q.jsx)(`img`,{src:nT(`netrunner.svg`),alt:``,width:20,height:20,loading:`lazy`,decoding:`async`}),t(`agent`,`Agent`)]}),(0,q.jsx)(`div`,{className:`sprawl-term__body`,children:e})]})}var aT={Panel:({children:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(rT,{}),e]}),Header:({children:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(rT,{}),e]}),ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(iT,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art sprawl-art`,children:[(0,q.jsx)(`img`,{src:nT(`dead-drop.webp`),alt:``,width:240,height:160,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art sprawl-art sprawl-loading`,role:`status`,children:[(0,q.jsx)(`img`,{src:nT(`jack-in.webp`),alt:``,width:240,height:160,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e})]})},oT=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%20width='32'%20height='32'%3e%3ccircle%20cx='16'%20cy='16'%20r='14'%20fill='%230a1222'%20stroke='%2336d6ff'%20stroke-width='1.5'/%3e%3ccircle%20cx='16'%20cy='16'%20r='9.5'%20fill='none'%20stroke='%237fe3ff'%20stroke-width='1'%20stroke-dasharray='3%202.2'/%3e%3ccircle%20cx='16'%20cy='16'%20r='4.5'%20fill='%2336d6ff'/%3e%3ccircle%20cx='16'%20cy='16'%20r='2'%20fill='%23e6f1ff'/%3e%3c/svg%3e`,sT=new URL(`empty-sector-amtiZ3_V.webp`,import.meta.url).href,cT=new URL(`lightspeed-LxKj3vD3.svg`,import.meta.url).href,lT=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+CjwhLS0gU3RhcnNoaXAncyBiYWRnZTogYSByaXZldGVkIGh1bGwgcGxhdGUsIHRoZSBwYWdlIGEgY29uc29sZSBzY3JlZW4gd2l0aCBhIGdsb3dpbmcgcHJvbXB0LiBUaGUgYmFkZ2UncyBzaWxob3VldHRlLCBza2lubmVkLiAtLT4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0iYjZzIiB4MT0iMCIgeTE9IjAiIHgyPSIxIiB5Mj0iMSI+CjxzdG9wIG9mZnNldD0iMCIgc3RvcC1jb2xvcj0iIzRhNWY3ZCIvPgo8c3RvcCBvZmZzZXQ9Ii41NSIgc3RvcC1jb2xvcj0iIzI1MzI0YSIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiMxNDFjMmMiLz4KPC9saW5lYXJHcmFkaWVudD4KPGNsaXBQYXRoIGlkPSJiNmMiPgo8cGF0aCBkPSJNMTggNkg0Mkw1OCAyMlY0NkExMiAxMiAwIDAgMSA0NiA1OEgxOEExMiAxMiAwIDAgMSA2IDQ2VjE4QTEyIDEy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Wx0ZXI9InVybCgjYjZnKSIvPgo8cGF0aCBkPSJNMzYgMTcuNXY0LjVhMi41IDIuNSAwIDAgMCAyLjUgMi41SDQzWiIgZmlsbD0iIzFhNmY4NSIvPgo8ZyBmaWx0ZXI9InVybCgjYjZnKSIgc3Ryb2tlPSIjMzZkNmZmIiBzdHJva2Utd2lkdGg9IjMiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+CjxwYXRoIGQ9Im0yNC41IDI3LjUgNSA0LjMtNSA0LjMiLz4KPHBhdGggZD0iTTMxLjggNDBoNi4yIi8+CjwvZz4KPHBhdGggZD0iTTIyLjUgMjIuNWgxME0yMi41IDQ0LjJoMTciIHN0cm9rZT0iIzM2ZDZmZiIgc3Ryb2tlLXdpZHRoPSIuNSIgb3BhY2l0eT0iLjQ1Ii8+CjwvZz4KPC9zdmc+Cg==`,uT=new URL(`nebula-t0QcaA3K.webp`,import.meta.url).href,dT=new URL(`star-chart-Chk7Xt5X.svg`,import.meta.url).href,fT=new URL(`starfield-BM71b4P5.svg`,import.meta.url).href,pT=e=>new URL(Object.assign({"../../themes/starship/assets/computer.svg":oT,"../../themes/starship/assets/empty-sector.webp":sT,"../../themes/starship/assets/lightspeed.svg":cT,"../../themes/starship/assets/mark.svg":lT,"../../themes/starship/assets/nebula.webp":uT,"../../themes/starship/assets/star-chart.svg":dT,"../../themes/starship/assets/starfield.svg":fT})[`../../themes/starship/assets/${e}`],import.meta.url).href;function mT(){return(0,q.jsxs)(`span`,{className:`hud-corners`,"aria-hidden":`true`,children:[(0,q.jsx)(`i`,{className:`hud-corner hud-corner--tl`}),(0,q.jsx)(`i`,{className:`hud-corner hud-corner--tr`}),(0,q.jsx)(`i`,{className:`hud-corner hud-corner--bl`}),(0,q.jsx)(`i`,{className:`hud-corner hud-corner--br`})]})}function hT({children:e}){let t=nC();return(0,q.jsxs)(`div`,{className:`bubble bubble--agent starship-computer`,children:[(0,q.jsxs)(`p`,{className:`starship-voice`,children:[(0,q.jsx)(`img`,{src:pT(`computer.svg`),alt:``,width:24,height:24,loading:`lazy`,decoding:`async`}),t(`agent`,`Agent`)]}),e]})}var gT={Panel:({children:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(mT,{}),e]}),Header:({children:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(mT,{}),e]}),ChatMessage:({from:e,children:t})=>e===`agent`?(0,q.jsx)(hT,{children:t}):(0,q.jsx)(`div`,{className:`bubble bubble--you`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty skin-empty--art starship-empty`,children:[(0,q.jsx)(`img`,{src:pT(`empty-sector.webp`),alt:``,width:240,height:160,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsxs)(`div`,{className:`skin-loading skin-empty--art starship-jump`,role:`status`,children:[(0,q.jsx)(`img`,{src:pT(`lightspeed.svg`),alt:``,width:240,height:120,loading:`lazy`,decoding:`async`}),(0,q.jsx)(`p`,{children:e})]})},_T={Card:({children:e})=>e,Panel:({children:e})=>e,Avatar:AS,ChatMessage:({from:e,children:t})=>(0,q.jsx)(`div`,{className:`bubble bubble--${e}`,children:t}),EmptyState:({message:e,children:t})=>(0,q.jsxs)(`div`,{className:`skin-empty`,children:[(0,q.jsx)(`p`,{children:e}),t]}),Loading:({message:e})=>(0,q.jsx)(`p`,{className:`skin-loading`,role:`status`,children:e}),Header:({children:e})=>e},vT={crate:NS,harvest:wC,starship:gT,realm:Jw,sprawl:aT,frontier:oC,overworld:GC},yT=e=>({..._T,...vT[e]}),bT=(0,v.createContext)(_T),xT=bT.Provider,ST=()=>(0,v.useContext)(bT),CT=new URL(`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+CjwhLS0gV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maWxsPSIjZjNlZmRjIiBzdHJva2U9IiMwYjEyMGUiIHN0cm9rZS13aWR0aD0iLjgiLz4KPHBhdGggZD0iTTM2IDE3LjV2NC41YTIuNSAyLjUgMCAwIDAgMi41IDIuNUg0M1oiIGZpbGw9IiM0Y2FlNWEiLz4KPHBhdGggZD0ibTI0LjUgMjcuNSA1IDQuMy01IDQuMyIgc3Ryb2tlPSIjMGIxMjBlIiBzdHJva2Utd2lkdGg9IjMuMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0zMS44IDQwaDYuMiIgc3Ryb2tlPSIjYjMyNjFlIiBzdHJva2Utd2lkdGg9IjMuMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjwvZz4KPC9zdmc+Cg==`,``+import.meta.url).href};function TT(e,t=`light`){let n=wT[e];return n?typeof n==`string`?n:n[t]:CT}function ET(e,t=`light`,n=document){let r=n.querySelector(`link[rel="icon"]`);r||(r=n.createElement(`link`),r.rel=`icon`,n.head.append(r)),r.type=`image/svg+xml`,r.href=TT(e,t)}var DT=[`system`,`light`,`dark`],OT=`toil-ui.theme`;function kT(){try{let e=JSON.parse(localStorage.getItem(OT)??`{}`);return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}catch{return{}}}function AT(e,t){return e===`off`?!1:e===`on`||typeof t!=`boolean`||t}function jT(e){let t=new URLSearchParams(e),n=kT();return{theme:[t.get(`theme`),n.theme].find(e=>Qm.some(t=>t.name===e))??`crate`,scheme:[t.get(`scheme`),n.scheme].find(e=>DT.includes(e))??`system`,wording:AT(t.get(`wording`),n.wording),voice:AT(t.get(`voice`),n.voice)}}function MT(e,t){return t.fromAddress||!Qm.some(t=>t.name===e.current)?null:e.source===`env`||e.source===`file`&&!t.savedBeforeSetting?e.current:null}function NT(e){let t=new URLSearchParams(e).get(`theme`),n=kT();return{fromAddress:Qm.some(e=>e.name===t),savedBeforeSetting:typeof n.theme==`string`&&n.synced!==!0}}function PT(e=null){let[t,n]=(0,v.useState)(()=>jT(window.location.search)),[r]=(0,v.useState)(()=>NT(window.location.search)),i=(0,v.useRef)(kT().synced===!0),a=(0,v.useRef)(!1),[o,s]=(0,v.useState)(null),c=e!==null&&e.disabled===null;(0,v.useEffect)(()=>{if(!e||e.disabled!==null)return;let t=!0;return e.run(`theme list`,{}).then(e=>{if(!t)return;if(!e.ok){console.warn(`Toil UI couldn't read toil's theme setting (${e.error.code}): ${e.error.message}`);return}if(a.current)return;let i=MT(e.data,r);i&&n(e=>e.theme===i?e:{...e,theme:i})},e=>console.warn(`Toil UI couldn't read toil's theme setting:`,e)),()=>{t=!1}},[e,r]),(0,v.useEffect)(()=>{th(t.theme),document.documentElement.dataset.theme=t.theme,document.documentElement.dataset.scheme=t.scheme;try{localStorage.setItem(OT,JSON.stringify({...t,...i.current?{synced:!0}:{}}))}catch{}let e=window.matchMedia?.(`(prefers-color-scheme: dark)`),n=()=>ET(t.theme,t.scheme===`system`?e?.matches?`dark`:`light`:t.scheme);return n(),e?.addEventListener(`change`,n),()=>e?.removeEventListener(`change`,n)},[t]);let l=t=>{a.current=!0,c&&(i.current=!0),n(e=>({...e,theme:t})),c&&e.run(`theme set`,{name:t}).then(e=>{if(!e.ok)return s(`Toil didn't save the theme: ${[e.error.message,e.error.fix].filter(Boolean).join(` `)}`);let t=e.meta.warnings?.find(e=>e.code===`OVERRIDDEN_BY_ENV`);s(t?`Saved to toil's config, but ${t.message}`:null)},e=>s(`Toil didn't save the theme: ${e instanceof Error?e.message:String(e)}`))};return{...t,saveError:o,setTheme:l,setScheme:e=>n(t=>({...t,scheme:e})),setWording:e=>n(t=>({...t,wording:e})),setVoice:e=>n(t=>({...t,voice:e}))}}var FT=1500,IT=`a scripted preview, not a model`,LT=`No agent is set up in this Toil UI, so nobody can answer yet. Toil UI reasons with the subscription you already have, through one of three adapters: Claude (the Claude Agent SDK, @anthropic-ai/claude-agent-sdk), GitHub Copilot (@github/copilot-sdk) or Codex (@openai/codex-sdk).`,RT=`Press Install for the one your organization approves under Settings, Agent, with its CLI on PATH, and choose it there, or pick an installed one for this chat from Answered by, above. The dashboards work without one, and toil-ui --sample shows the scripted agent.`,zT=`analyze`,BT=/\[\[([^\]]+)\]\]/g;function VT(e){let t=new Set;for(let n of e)for(let e of n.text.matchAll(BT))t.add(e[1]);return[...t]}function HT(e){let t=[],n=0;for(let r of e.matchAll(BT))r.index>n&&t.push({text:e.slice(n,r.index)}),t.push({cite:r[1]}),n=r.index+r[0].length;return n<e.length&&t.push({text:e.slice(n)}),t}function UT({id:e,withTitle:t=!1}){let{byId:n,prById:r,dossier:i}=J(),a=n.get(e),o=a?void 0:r?.get(e);return o?(0,q.jsx)(WT,{change:o,withTitle:t}):a?(0,q.jsxs)(`a`,{href:xg(i.name,e),className:`item-link`,children:[(0,q.jsxs)(`span`,{className:`key`,children:[(0,q.jsx)(`span`,{className:`source`,children:mg(a.source.area)}),` `,hg(a)]}),t&&(0,q.jsxs)(`span`,{className:`title`,children:[` `,a.title]})]}):(0,q.jsx)(`code`,{className:`missing`,children:e})}function WT({change:e,withTitle:t=!1}){let n=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`span`,{className:`key`,children:[(0,q.jsx)(`span`,{className:`source`,children:mg(e.source.area)}),` `,Fg(e.id)]}),t&&(0,q.jsxs)(`span`,{className:`title`,children:[` `,e.title]})]});return e.url?(0,q.jsx)(`a`,{href:e.url,className:`item-link`,children:n}):(0,q.jsx)(`span`,{className:`item-link`,children:n})}function GT({text:e,chips:t=!1}){return(0,q.jsx)(q.Fragment,{children:HT(e).map((e,n)=>`cite`in e?t?(0,q.jsx)(JT,{id:e.cite,detail:!0},n):(0,q.jsx)(UT,{id:e.cite},n):(0,q.jsx)(`span`,{children:e.text},n))})}var KT=e=>e.charAt(0)+e.slice(1).toLowerCase().replace(/_/g,` `);function qT(e,t,n){return e?[`${YT(e,n)}, ${e.status??Ig[e.statusCategory]}${e.status&&e.status.toLowerCase()!==Ig[e.statusCategory].toLowerCase()?` (${Ig[e.statusCategory]})`:``}`,`Assignee: ${yg(e.assignee)}`,`Estimate: ${Lg(e)}`,...e.iteration?.name?[`Sprint: ${e.iteration.name}`]:[],...e.updated?[`Updated ${Y(e.updated)}`]:[]]:t?[`Pull request in ${t.repo}, ${KT(t.state)}`,`Author: ${yg(t.author)}`,...t.checks?[`Checks: ${KT(t.checks)}`]:[],...t.workItems.length?[`Carries ${t.workItems.length} work ${t.workItems.length===1?`item`:`items`}`]:[]]:[]}function JT({id:e,detail:t=!1}){let{byId:n,prById:r,dossier:i}=J(),a=n.get(e),o=a?void 0:r?.get(e);if(!a&&!o)return(0,q.jsx)(`code`,{className:`missing`,children:e});let s=a?`${mg(a.source.area)} ${hg(a)}`:Fg(e),c=a?a.title:o.title,l=a?a.status??Ig[a.statusCategory]:KT(o.state),u=a?a.statusCategory.toLowerCase():`pr`,d=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`ticket-chip__key`,children:s}),` `,(0,q.jsx)(`span`,{className:`ticket-chip__title`,children:c}),(0,q.jsx)(`span`,{className:`sr-only`,children:`, `}),(0,q.jsx)(`span`,{className:`ticket-chip__status ticket-chip__status--${u}`,children:l})]}),f=`${s} ${c}, ${l}`,p=a?xg(i.name,e):o.url;return t&&p?(0,q.jsxs)(om,{delay:300,closeDelay:150,children:[(0,q.jsx)(ga,{className:`ticket-chip ticket-chip--cite`,href:p,"data-truncate":``,"data-cite":e,children:d}),(0,q.jsxs)(sm,{className:`cite-tooltip`,offset:6,children:[(0,q.jsxs)(`strong`,{className:`cite-tooltip__title`,children:[s,` `,c]}),qT(a,o).map(e=>(0,q.jsx)(`span`,{className:`cite-tooltip__line`,children:e},e))]})]}):p?(0,q.jsx)(`a`,{className:`ticket-chip`,href:p,title:f,"data-truncate":``,children:d}):(0,q.jsx)(`span`,{className:`ticket-chip`,title:f,"data-truncate":``,children:d})}function YT(e,t){let n=e.type.charAt(0)+e.type.slice(1).toLowerCase(),r=e.typeName&&e.typeName.toLowerCase()!==n.toLowerCase()?`${e.typeName} (${n})`:n;return t?.terms?.epic&&e.type===`EPIC`?tC(t,`epic`,e.typeName??n):r}var XT=(...e)=>e.filter(Boolean).join(` `);function ZT({as:e,gap:t=`md`,className:n,...r}){return(0,q.jsx)(e??`div`,{className:XT(`l-stack`,n),"data-gap":t,...r})}function QT({as:e,gap:t=`sm`,className:n,...r}){return(0,q.jsx)(e??`div`,{className:XT(`l-cluster`,n),"data-gap":t,...r})}function $T({as:e,min:t=`md`,className:n,...r}){return(0,q.jsx)(e??`ul`,{className:XT(`l-card-grid`,n),"data-min":t,...r})}function Q({as:e,className:t,...n}){return(0,q.jsx)(e??`article`,{className:XT(`l-card`,t),"data-card":``,...n})}function eE(){let e=(0,v.useRef)(null),[t,n]=(0,v.useState)({start:!1,end:!1}),r=(0,v.useCallback)(()=>{let t=e.current;if(!t)return;let r=t.scrollLeft>1,i=t.scrollLeft+t.clientWidth<t.scrollWidth-1;n(e=>e.start===r&&e.end===i?e:{start:r,end:i})},[]);return(0,v.useEffect)(()=>{let t=e.current;if(!t)return;r(),t.addEventListener(`scroll`,r,{passive:!0});let n=typeof ResizeObserver==`function`?new ResizeObserver(r):null;return n?.observe(t),t.firstElementChild&&n?.observe(t.firstElementChild),()=>{t.removeEventListener(`scroll`,r),n?.disconnect()}},[r]),{ref:e,edges:t,overflowing:t.start||t.end}}function tE({label:e,className:t,children:n,hint:r=`Scroll sideways for more.`}){let{ref:i,edges:a,overflowing:o}=eE(),s=(0,v.useId)();return(0,q.jsxs)(`div`,{className:XT(`l-scroll`,t),"data-more-start":a.start||void 0,"data-more-end":a.end||void 0,children:[(0,q.jsx)(`div`,{ref:i,className:`l-scroll__body`,"data-scroller":``,role:`region`,"aria-label":e,tabIndex:o?0:void 0,"aria-describedby":o?s:void 0,children:n}),o&&(0,q.jsx)(`span`,{id:s,className:`sr-only`,children:r})]})}function nE({label:e,caption:t,columns:n,rows:r,rowKey:i,wide:a=!1,className:o}){return(0,q.jsx)(`div`,{className:XT(`l-table`,o),"data-wide":a||void 0,children:(0,q.jsx)(tE,{label:e,hint:`Scroll sideways for more columns.`,children:(0,q.jsxs)(`table`,{role:`table`,children:[t&&(0,q.jsx)(`caption`,{className:`sr-only`,children:t}),(0,q.jsx)(`thead`,{role:`rowgroup`,children:(0,q.jsx)(`tr`,{role:`row`,children:n.map((e,t)=>(0,q.jsx)(`th`,{role:`columnheader`,scope:`col`,children:e.header},t))})}),(0,q.jsx)(`tbody`,{role:`rowgroup`,children:r.map(e=>(0,q.jsx)(`tr`,{role:`row`,children:n.map((t,n)=>{let r=t.rowHeader?`th`:`td`;return(0,q.jsxs)(r,{role:t.rowHeader?`rowheader`:`cell`,scope:t.rowHeader?`row`:void 0,children:[(0,q.jsx)(`span`,{className:`l-table__label`,"aria-hidden":`true`,children:t.label}),(0,q.jsx)(`span`,{className:`l-table__value`,children:t.cell(e)})]},n)})},i(e)))})]})})})}function rE(e){let t=e.replace(/[/\\]+$/,``).search(/[/\\][^/\\]*$/),n=t>0&&e.length-t<=40?t:Math.max(0,e.length-18);return[e.slice(0,n),e.slice(n)]}function iE({value:e,what:t}){let[n,r]=(0,v.useState)(null);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`button`,{type:`button`,className:`btn btn--small l-copy`,onClick:async()=>{try{await navigator.clipboard.writeText(e),r(!0)}catch{r(!1)}},"aria-label":`Copy ${t}`,children:`Copy`}),(0,q.jsx)(`span`,{role:`status`,className:`sr-only`,children:n===null?``:n?`Copied ${t}.`:`This browser wouldn't copy; select the ${t} instead.`})]})}function aE({value:e,what:t=`path`,copy:n=!0}){let[r,i]=rE(e);return(0,q.jsxs)(`span`,{className:`l-path`,children:[(0,q.jsxs)(`code`,{className:`l-path__text`,title:e,"data-truncate":``,children:[(0,q.jsx)(`span`,{className:`l-path__head`,children:r}),(0,q.jsx)(`span`,{className:`l-path__tail`,children:i})]}),n&&(0,q.jsx)(iE,{value:e,what:t})]})}function oE({value:e,what:t=`URL`,copy:n=!0}){return(0,q.jsx)(aE,{value:e,what:t,copy:n})}function sE(e){let[t,n]=(0,v.useState)(()=>typeof window.matchMedia==`function`&&window.matchMedia(e).matches);return(0,v.useEffect)(()=>{if(typeof window.matchMedia!=`function`)return;let t=window.matchMedia(e),r=()=>n(t.matches);return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}var cE=new Map([[`jira issue create`,{issueType:`--type`}],[`jira-cloud issue create`,{issueType:`--type`}]]),lE=(e,t)=>cE.get(e)?.[t]??`--${t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`,uE={posix:`bash/zsh`,powershell:`PowerShell`},dE=/['\u2018\u2019\u201A\u201B]/g,fE=/[\r\n\u0085\u2028\u2029\0]/,pE=/[&|<>^%"]/;function mE(e,t){if(fE.test(e))return`it holds a line break`;let n=t===`powershell`?pE.exec(e)?.[0]:void 0;return n?`it holds ${n}, which cmd.exe acts on when PowerShell runs npm's toil.cmd shim`:null}function hE(e,t){return mE(e,t)?null:t===`posix`?`'${e.replace(/'/g,`'\\''`)}'`:`'${e.replace(dE,e=>e+e)}'`}var gE=new Set([`ado work-item create`,`ado work-item update`,`alation document create`,`alation document update`,`jira issue create`,`jira issue update`,`jira-cloud issue create`,`jira-cloud issue update`,`splitio flag update`,`splitio flag toggle-many`]),$=(e,...t)=>t.map(t=>[t,e]),_E=new Map([...$([`app`,`hash`],`contrast library get`),...$([`app`,`trace`],`contrast finding get`),...$([`app`],`contrast app findings`,`contrast app libraries`),...$([`buildId`],`saucelabs build get`,`saucelabs build jobs`),...$([`commentId`],`github pr delete-comment`,`github pr delete-review-comment`),...$([`commit`],`ado commit status`,`bitbucket commit status`,`bitbucket-cloud commit get`,`bitbucket-cloud commit status`),...$([`deviceId`],`saucelabs device get`),...$([`fileKeyOrUrl`],`figma file comments`,`figma file get`,`figma file versions`),...$([`flag`],`splitio flag archive`,`splitio flag get`,`splitio flag kill`,`splitio flag restore`,`splitio flag set-default`,`splitio flag set-rule`,`splitio flag toggle`,`splitio flag update`),...$([`id`,`attachmentId`],`ado work-item download`),...$([`id`,`commentId`],`bitbucket pr delete-comment`,`bitbucket pr reply`,`bitbucket pr resolve`,`bitbucket-cloud pr delete-comment`,`bitbucket-cloud pr reply`,`bitbucket-cloud pr resolve`),...$([`id`,`threadId`,`commentId`],`ado pr delete-comment`),...$([`id`,`threadId`],`ado pr reply`,`ado pr resolve`,`ado-cloud pr reply`,`ado-cloud pr resolve`),...$([`id`],`ado pipeline get`,`ado pipeline run`,`ado pr abandon`,`ado pr approve`,`ado pr builds`,`ado pr comment`,`ado pr comment-inline`,`ado pr comments`,`ado pr diff`,`ado pr files`,`ado pr get`,`ado pr merge`,`ado pr reviewers`,`ado pr unapprove`,`ado pr update`,`ado pr wait-for-author`,`ado run cancel`,`ado run get`,`ado run logs`,`ado work-item assign`,`ado work-item attach`,`ado work-item attachments`,`ado work-item comment`,`ado work-item comments`,`ado work-item get`,`ado work-item get-many`,`ado work-item history`,`ado work-item link`,`ado work-item tag`,`ado work-item transition`,`ado work-item untag`,`ado work-item update`,`ado-cloud backlog items`,`ado-cloud board get`,`ado-cloud pr abandon`,`ado-cloud pr approve`,`ado-cloud pr comment`,`ado-cloud pr comment-inline`,`ado-cloud pr comments`,`ado-cloud pr get`,`ado-cloud pr merge`,`ado-cloud pr reviewers`,`ado-cloud pr threads`,`ado-cloud pr unapprove`,`ado-cloud pr update`,`ado-cloud pr wait-for-author`,`ado-cloud sprint items`,`ado-cloud work-item comment`,`ado-cloud work-item comments`,`ado-cloud work-item get`,`ado-cloud work-item get-many`,`ado-cloud work-item history`,`ado-cloud work-item transition`,`ado-cloud work-item update`,`alation column get`,`alation datasource get`,`alation document get`,`alation document update`,`alation folder get`,`alation job get`,`alation schema get`,`alation table get`,`bitbucket pr add-reviewer`,`bitbucket pr approve`,`bitbucket pr builds`,`bitbucket pr comment`,`bitbucket pr comment-inline`,`bitbucket pr comments`,`bitbucket pr decline`,`bitbucket pr diff`,`bitbucket pr files`,`bitbucket pr get`,`bitbucket pr merge`,`bitbucket pr needs-work`,`bitbucket pr reviewers`,`bitbucket pr unapprove`,`bitbucket pr update`,`bitbucket-cloud pr approve`,`bitbucket-cloud pr builds`,`bitbucket-cloud pr comment`,`bitbucket-cloud pr comment-inline`,`bitbucket-cloud pr comments`,`bitbucket-cloud pr decline`,`bitbucket-cloud pr diff`,`bitbucket-cloud pr files`,`bitbucket-cloud pr get`,`bitbucket-cloud pr merge`,`bitbucket-cloud pr request-changes`,`bitbucket-cloud pr reviewers`,`bitbucket-cloud pr unapprove`,`bitbucket-cloud pr update`,`checkmarx project get`,`checkmarx scan get`,`checkmarx scan stats`,`confluence attachment delete`,`confluence attachment download`,`confluence page attach`,`confluence page attachments`,`confluence page children`,`confluence page comment`,`confluence page comments`,`confluence page delete`,`confluence page get`,`confluence page history`,`confluence page label`,`confluence page labels`,`confluence page unlabel`,`confluence page update`,`confluence-cloud attachment delete`,`confluence-cloud attachment download`,`confluence-cloud page attach`,`confluence-cloud page attachments`,`confluence-cloud page children`,`confluence-cloud page comment`,`confluence-cloud page comments`,`confluence-cloud page delete`,`confluence-cloud page get`,`confluence-cloud page history`,`confluence-cloud page label`,`confluence-cloud page labels`,`confluence-cloud page unlabel`,`confluence-cloud page update`,`dynatrace entity get`,`dynatrace problem get`,`dynatrace trace get`,`kibana dashboard export`,`kibana rule get`,`sde project get`,`splitio change-request get`),...$([`index`],`elasticsearch index count`,`elasticsearch index search`),...$([`jobId`],`saucelabs job assets`,`saucelabs job build`,`saucelabs job delete`,`saucelabs job get`,`saucelabs job stop`,`saucelabs job update`,`saucelabs rdc-job delete`,`saucelabs rdc-job get`,`saucelabs rdc-job stop`,`saucelabs rdc-job update`),...$([`key`,`attachmentId`],`jira issue download`,`jira-cloud issue download`),...$([`key`],`confluence space get`,`confluence-cloud space get`,`jira issue assign`,`jira issue attach`,`jira issue attachments`,`jira issue comment`,`jira issue comments`,`jira issue get`,`jira issue history`,`jira issue label`,`jira issue link`,`jira issue log-work`,`jira issue set-sprint`,`jira issue transition`,`jira issue transitions`,`jira issue unlabel`,`jira issue update`,`jira-cloud issue assign`,`jira-cloud issue attach`,`jira-cloud issue attachments`,`jira-cloud issue comment`,`jira-cloud issue comments`,`jira-cloud issue get`,`jira-cloud issue history`,`jira-cloud issue label`,`jira-cloud issue link`,`jira-cloud issue log-work`,`jira-cloud issue set-sprint`,`jira-cloud issue transition`,`jira-cloud issue transitions`,`jira-cloud issue unlabel`,`jira-cloud issue update`),...$([`method`,`path`],`ado-cloud api`,`bitbucket-cloud api`,`jira api`),...$([`name`,`number`],`artifactory build get`,`jenkins run get`,`jenkins run logs`),...$([`name`],`ado project get`,`ado-cloud project get`,`artifactory build runs`,`jenkins pipeline get`,`jenkins pipeline run`,`jenkins pipeline runs`),...$([`number`,`commentId`],`github pr reply`),...$([`number`],`github issue assign`,`github issue get`,`github issue history`,`github issue label`,`github issue unassign`,`github issue unlabel`,`github pr add-reviewers`,`github pr approve`,`github pr close`,`github pr comment`,`github pr comment-inline`,`github pr comments`,`github pr diff`,`github pr disable-auto-merge`,`github pr draft`,`github pr enable-auto-merge`,`github pr enqueue`,`github pr files`,`github pr get`,`github pr merge`,`github pr ready`,`github pr remove-reviewers`,`github pr reopen`,`github pr request-changes`,`github pr review-comments`,`github pr reviewers`,`github pr reviews`,`github pr status`,`github pr threads`,`github pr update`),...$([`path`],`bitbucket-cloud file get`,`bitbucket-cloud file list`,`github repo file`),...$([`pipeline`,`step`],`bitbucket-cloud pipeline logs`),...$([`pipeline`],`bitbucket-cloud pipeline get`,`bitbucket-cloud pipeline steps`),...$([`plugin`],`skills marketplace disable`,`skills marketplace enable`,`skills marketplace sync`),...$([`pod`],`openshift pod logs`),...$([`project`],`github project fields`,`github project items`,`jira-cloud project get`),...$([`projectId`],`figma project files`),...$([`publicId`],`sonatypeiq application get`),...$([`query`],`alation search`),...$([`ref`],`github commit checks`,`github commit status`),...$([`repo`,`path`,`keyvals`],`artifactory artifact set-properties`),...$([`repo`,`path`],`artifactory artifact get`,`artifactory artifact properties`),...$([`repository`],`logscale repository query`),...$([`sessionId`,`app`],`saucelabs session install-app`),...$([`sessionId`,`command`],`saucelabs session shell`),...$([`sessionId`,`url`],`saucelabs session open-url`),...$([`sessionId`],`saucelabs session appium`,`saucelabs session delete`,`saucelabs session end-test`,`saucelabs session get`,`saucelabs session installations`,`saucelabs session launch-app`,`saucelabs session network`,`saucelabs session network-profiles`,`saucelabs session settings`,`saucelabs session start-test`,`saucelabs session tests`,`saucelabs session uninstall-app`),...$([`sql`],`db execute`,`db lint`,`db query`),...$([`table`],`db table describe`,`db table preview`),...$([`task`],`sde task get`),...$([`teamId`],`saucelabs team get`,`saucelabs team members`),...$([`threadId`],`github pr resolve`),...$([`tunnelId`],`saucelabs tunnel get`,`saucelabs tunnel jobs`,`saucelabs tunnel stop`)]),vE=e=>e.replace(/[ -]/g,`_`);function yE(e,t){return!e.command||!e.input?{line:null,reason:`toil has no command for this change.`}:SE(e.command,e.input,t,!0)}function bE(e,t){return SE(e.command,e.input,t,!1)}function xE(e,t,n){let r=[];gE.has(e)&&r.push(`put the input in a file and pass it with toil ${e}'s --input-file`),t&&r.push(`switch this card to bash/zsh, where single quotes carry it`),r.push(`apply it over MCP with the tool ${n} and the input below`);let i=r.length===1?r[0]:`${r.slice(0,-1).join(`, `)}, or ${r.at(-1)}`;return`${i.charAt(0).toUpperCase()}${i.slice(1)}.`}function SE(e,t,n,r){let i=_E.get(e)??[],a=Object.keys(t).filter(e=>!i.includes(e)).sort((e,t)=>e===`dossier`?-1:+(t===`dossier`)),o=(i,a,o)=>{let s={tool:vE(e),input:r?{...t,allowWrite:!0}:t};return{line:null,reason:`The ${i} value can't be passed safely on a ${uE[n]} command line: ${a}. ${xE(e,o,s.tool)}`,mcp:s}},s=[];for(let r of[...i.filter(e=>e in t),...a]){let a=t[r],c=i.includes(r),l=lE(e,r),u=c?`<${r}>`:l;for(let e of Array.isArray(a)?a:[a]){if(e===!0&&!c){s.push(l);continue}let t=String(e),r=mE(t,n);if(r)return o(u,r,n===`powershell`&&!r.includes(`line break`));if(c&&t.startsWith(`-`))return o(u,`it starts with -, so toil would read it as a flag`,!1);c?s.push(hE(t,n)):s.push(t.startsWith(`-`)?hE(`${l}=${t}`,n):`${l} ${hE(t,n)}`)}}return{line:`toil ${e} ${s.join(` `)}${r?` --allow-write`:``}`,reason:null}}function CE(e=typeof navigator>`u`?void 0:navigator){let t=e?.userAgentData?.platform||e?.platform||``;return/^win/i.test(t)?`powershell`:`posix`}var wE=`toil-ui.shell`,TE=new Set,EE=null;function DE(){if(EE)return EE;try{let e=localStorage.getItem(wE);if(e===`posix`||e===`powershell`)return EE=e}catch{}return EE=CE()}function OE(e){EE=e;try{localStorage.setItem(wE,e)}catch{}for(let e of TE)e()}var kE=e=>(TE.add(e),()=>TE.delete(e)),AE=()=>(0,v.useSyncExternalStore)(kE,DE,DE);function jE({proposal:e,onDismiss:t,kind:n=`Proposed change, not applied`,actions:r,children:i}){let[a,o]=(0,v.useState)(null),s=AE(),{line:c,reason:l,mcp:u}=yE(e,s),d=e.hint?{text:e.hint.text,...bE(e.hint,s)}:null,f=!!(e.command||e.hint);return(0,q.jsxs)(`article`,{className:`proposal`,"aria-label":`Proposal: ${e.title}`,children:[(0,q.jsx)(`p`,{className:`proposal-kind`,children:n}),(0,q.jsx)(`h3`,{children:e.title}),(0,q.jsx)(`p`,{children:(0,q.jsx)(GT,{text:e.reason,chips:e.from===`agent`})}),f&&(0,q.jsx)(Bf,{className:`shells`,orientation:`horizontal`,value:s,onChange:e=>OE(e),"aria-label":`Show the command for`,children:[`powershell`,`posix`].map(e=>(0,q.jsx)(Vf,{value:e,className:`shell-choice`,children:uE[e]},e))}),c?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`note`,children:[`Apply it yourself through toil's write gate: `,(0,q.jsx)(Iw,{topic:`proposal`})]}),(0,q.jsx)(`pre`,{className:`command`,children:(0,q.jsx)(`code`,{children:c})})]}):e.command&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`failure`,children:l}),u&&(0,q.jsx)(`pre`,{className:`command`,"aria-label":`MCP call to ${u.tool}`,children:(0,q.jsx)(`code`,{children:JSON.stringify({tool:u.tool,input:u.input},null,2)})})]}),e.note&&(0,q.jsx)(`p`,{className:`note`,children:e.note}),d&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`note`,children:d.text}),d.line?(0,q.jsx)(`pre`,{className:`command`,children:(0,q.jsx)(`code`,{children:d.line})}):(0,q.jsx)(`p`,{className:`failure`,children:d.reason})]}),i,(0,q.jsxs)(`div`,{className:`proposal-actions`,children:[r,c&&(0,q.jsx)(W,{className:`btn`,onPress:async()=>{try{await navigator.clipboard.writeText(c),o(`yes`)}catch{o(`no`)}},children:`Copy command`}),t&&(0,q.jsx)(W,{className:`btn btn--quiet`,onPress:t,children:`Dismiss`}),(0,q.jsx)(`span`,{className:`note`,role:`status`,children:a===`yes`?`Copied.`:a===`no`?`Couldn't copy: select the command instead.`:``})]})]})}var ME=120,NE=/^(what|whats|what's|why|how|who|whose|when|where|which)\b/i;function PE(e){let t=e.trim();return t.endsWith(`?`)||NE.test(t)}var FE=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function IE(e,t){for(let n of t){if(e.includes(n.id))return n;let t=hg(n),r=/^\d+$/.test(t)?`#${t}\\b`:`(?<![\\w#-])${FE(t)}(?![\\w-])`;if(new RegExp(r,`i`).test(e))return n}return null}var LE=new WeakMap;function RE(e,t){let n=LE.get(e);return n||LE.set(e,n=new Yx(e.filter(e=>e.statusCategory!==`DONE`))),n.query(t,{limit:3,threshold:Sx}).matches}function zE(e,t,n=new Set){for(let r of e)if(!(!r.trim()||n.has(r)||PE(r)||IE(r,t)))return{prompt:r,matches:RE(t,r)};return null}function BE(e){let t=e.replace(/\s+/g,` `).trim();return t.length<=ME?t:`${t.slice(0,119).trimEnd()}…`}var VE=e=>`Filed from a Toil UI chat: ${e.replace(/\s+/g,` `).trim()}`;function HE(e,t){let n=new Map;for(let r of e)r.source.area===t&&r.statusCategory!==`DONE`&&r.typeName&&n.set(r.typeName,(n.get(r.typeName)??0)+1);return[...n.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))[0]?.[0]??null}function UE(e){let t=new Map;for(let n of e)n.statusCategory!==`DONE`&&t.set(n.source.area,(t.get(n.source.area)??0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))[0]?.[0]??null}var WE=e=>`To attach the work instead, which writes nothing, name ${e} in the branch and in every commit message.`;function GE(e,t,n){let r=hg(t),i={id:`ticket:${n}:sub:${t.id}`,from:`ticket`,item:t.id,title:`Create a sub-task under ${r}`,reason:`The work reads closest to [[${t.id}]]. ${WE(r)}`},a=BE(e),o=t.source.area;if(o===`jira`||o===`jira-cloud`){let r=o===`jira`?`Sub-task`:`Subtask`;return{...i,command:`${o} issue create`,input:{dossier:n,project:t.source.key.split(`-`)[0],issueType:r,parent:t.source.key,summary:a,description:VE(e)},note:`${r} is Jira's default name for the type; your project may call it something else.`}}if(o===`ado`)return{...i,command:`ado work-item create`,input:{dossier:n,type:`Task`,title:a,description:VE(e),parent:t.source.key},note:null};if(o===`ado-cloud`)return{...i,command:`ado-cloud work-item create`,input:{dossier:n,type:`Task`,title:a,description:VE(e)},note:`ado-cloud work-item create takes no parent: once it exists, link it under ${r} on the board.`};if(o===`github`){let r=/^([^/]+)\/([^#]+)#(\d+)$/.exec(t.source.key);if(r)return{...i,command:`github issue create`,input:{dossier:n,owner:r[1],repo:r[2],title:a,body:`Part of #${r[3]}. ${VE(e)}`},note:`toil has no sub-issue command, so this names its parent in the body; add it as a sub-issue on GitHub if the repository uses them.`}}return{...i,command:null,input:null,note:`toil has no create command for ${o} items.`}}function KE(e,t,n,r){let i=BE(e),a=r?.source.area??UE(t),o={id:`ticket:${n}:new`,from:`ticket`,item:`${n}:new`,title:`Create a new ticket: ${i}`,reason:r?`Not one of the matches: a ticket of its own.`:`No open item shares enough words with the work to be its ticket.`};if(a===`jira`||a===`jira-cloud`)return{...o,command:`${a} issue create`,input:{dossier:n,summary:i,description:VE(e)},note:`The project and issue type come from the dossier and the connection's defaults; add --project or --type where they don't set them.`};if(a===`ado`||a===`ado-cloud`){let r=HE(t,a);return{...o,command:`${a} work-item create`,input:{dossier:n,type:r??`Task`,title:i,description:VE(e)},note:r?`${r} is the type most of the dossier's open ${a} items have; change --type if this is something else.`:`Task is a guess: no open item shows which type the process uses; change --type if it calls it something else.`}}return a===`github`?{...o,command:`github issue create`,input:{dossier:n,title:i,body:VE(e)},note:`The repository comes from the dossier; add --owner and --repo where it names none.`}:{...o,command:null,input:null,note:a?`toil has no create command for ${a} items.`:`The dossier has no open item to say which tracker a new ticket goes on.`}}function qE(e,t,n,r){let i=e.matches.flatMap(e=>t.get(e.id)?[t.get(e.id)]:[]);return[...i.map(t=>GE(e.prompt,t,r)),KE(e.prompt,n,r,i[0]??null)]}function JE({prompts:e}){let{agent:t,byId:n,dossier:r}=J(),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(new Set),u=(0,v.useMemo)(()=>new Set(t.starters(r.name).map(e=>e.label)),[t,r.name]),d=(0,v.useMemo)(()=>zE(e,r.items,u),[e,r.items,u]),f=(0,v.useMemo)(()=>d?qE(d,n,r.items,r.name):[],[d,n,r.items,r.name]);if(!d||o===d.prompt)return null;let p=d.matches[0]?n.get(d.matches[0].id):void 0;return(0,q.jsxs)(`section`,{className:`ticket-banner`,"aria-labelledby":`ticket-banner-title`,children:[(0,q.jsx)(`h3`,{id:`ticket-banner-title`,children:`Not ticketed yet`}),d.matches.length?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{children:[`This work names no ticket. These open items in `,r.name,` read closest to it:`]}),(0,q.jsx)(`ul`,{className:`rows`,children:d.matches.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{id:e.id,withTitle:!0}),` `,(0,q.jsxs)(`span`,{className:`score`,children:[Math.round(e.score*100),`% alike`]}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,e.why.summary.replace(/\.$/,``),`)`]})]},e.id))}),(0,q.jsxs)(`p`,{className:`note`,children:[`Attach it to one by naming its key in your branch and commits`,p?` (${hg(p)})`:``,`: nothing is written. Or ticket it, as a sub-task under a match or a new ticket.`]})]}):(0,q.jsxs)(`p`,{children:[`This work names no ticket, and no open item in `,r.name,` shares enough words with it to be one: there is no likely ticket. Ticket it as a new one.`]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Matched by shared words, as `,(0,q.jsx)(`code`,{children:`toil util owi similar`}),` scores them, not by meaning. Ticketing it is a proposal for you to apply; nothing is created here.`]}),(0,q.jsxs)(`div`,{className:`ticket-banner__actions`,children:[(0,q.jsx)(W,{className:`btn btn--accent btn--small`,"aria-expanded":i,"aria-controls":`ticket-banner-proposals`,onPress:()=>a(e=>!e),children:i?`Hide`:`Ticket this`}),(0,q.jsx)(W,{className:`btn btn--small`,onPress:()=>s(d.prompt),children:`Not now`})]}),i&&(0,q.jsx)(`div`,{id:`ticket-banner-proposals`,className:`ticket-banner__proposals`,children:f.filter(e=>!c.has(e.id)).map(e=>(0,q.jsx)(jE,{proposal:e,onDismiss:()=>l(t=>new Set(t).add(e.id))},e.id))})]})}var YE={claude:`Claude`,codex:`Codex`,copilot:`GitHub Copilot`},XE=[`inputTokens`,`cachedInputTokens`,`cacheWriteTokens`,`outputTokens`,`premiumRequests`];function ZE(e){let t=[e.inputTokens,e.outputTokens,e.cacheWriteTokens,e.inputIncludesCached?void 0:e.cachedInputTokens];if(!(t.every(e=>e===void 0)&&e.cachedInputTokens===void 0))return t.reduce((e,t)=>e+(t??0),0)}var QE=(e,t)=>e===void 0?t:t===void 0?e:Math.max(e,t);function $E(e,t){let n={...e,...t};for(let r of[...XE,`costUsd`]){let i=QE(e[r],t[r]);i===void 0?delete n[r]:n[r]=i}return n}function eD(e,t){return t.at>=e.at?$E(e,t):$E(t,e)}function tD(e){let t=new Map;for(let n of e){let e=t.get(n.id);t.set(n.id,e?eD(e,n):n)}return[...t.values()]}function nD(e){let t={reports:0,costUsd:{},plan:!1};for(let n of tD(e)){t.reports++;for(let e of XE)typeof n[e]==`number`&&(t[e]=(t[e]??0)+n[e]);let e=ZE(n);e!==void 0&&(t.tokens=(t.tokens??0)+e),typeof n.costUsd==`number`&&n.costSource!==`none`&&(t.costUsd[n.costSource]=(t.costUsd[n.costSource]??0)+n.costUsd),n.plan&&typeof n.costUsd==`number`&&(t.plan=!0)}return t}function rD(e,t){let n=new Map;for(let r of tD(e))n.set(t(r),[...n.get(t(r))??[],r]);return[...n].map(([e,t])=>({key:e,sample:t[0],totals:nD(t)})).sort((e,t)=>(t.totals.tokens??0)-(e.totals.tokens??0)||(e.key<t.key?-1:1))}var iD=e=>e.at.slice(0,10),aD=e=>`${e.adapter}:${e.model??``}`,oD=e=>e.model??`the CLI's default model (not named by the SDK)`;function sD(e){return e<1e3?String(Math.round(e)):e<1e6?`${e<1e4?(e/1e3).toFixed(1).replace(/\.0$/,``):Math.round(e/1e3)}k`:`${(e/1e6).toFixed(1).replace(/\.0$/,``)}M`}function cD(e){return e===0?`$0`:e<.01?`$${e.toFixed(4)}`:e<1?`$${e.toFixed(3)}`:`$${e.toFixed(2)}`}var lD=(e,t)=>e===void 0?`${t} not reported`:`${sD(e)} ${t}`;function uD(e,t){let n=[lD(e.inputTokens,`in`),lD(e.outputTokens,`out`),lD(e.cachedInputTokens,`cached`),lD(e.cacheWriteTokens,`cache write`)];return t===`copilot`?(n.push(e.premiumRequests===void 0?`premium requests not reported`:`${fD(e.premiumRequests)} premium ${e.premiumRequests===1?`request`:`requests`}`),n):(n.push(...dD(e,t)),n)}function dD(e,t){if(t===`copilot`)return[];let n=[];return e.costUsd[`sdk-estimate`]!==void 0&&n.push(`~${cD(e.costUsd[`sdk-estimate`])} (SDK estimate${e.plan?`, API-equivalent: your plan is not billed per token`:``})`),e.costUsd[`your-rates`]!==void 0&&n.push(`~${cD(e.costUsd[`your-rates`])} (computed from your rates)`),n.length||n.push(t===`codex`?`no dollar figure (add your rates under Settings, Agent usage)`:`cost not reported`),n}var fD=e=>String(Math.round(e*100)/100),pD=[{key:`claude.chat`,adapter:`claude`,scope:`chat`,units:[`tokens`,`usd`]},{key:`claude.day`,adapter:`claude`,scope:`day`,units:[`tokens`,`usd`]},{key:`codex.chat`,adapter:`codex`,scope:`chat`,units:[`tokens`,`usd`]},{key:`codex.day`,adapter:`codex`,scope:`day`,units:[`tokens`,`usd`]},{key:`copilot.chat`,adapter:`copilot`,scope:`chat`,units:[`tokens`,`premium-requests`]},{key:`copilot.day`,adapter:`copilot`,scope:`day`,units:[`tokens`,`premium-requests`]}],mD={tokens:`tokens`,usd:`US dollars`,"premium-requests":`premium requests`};function hD(e,t){return t===`usd`?cD(e):`${t===`tokens`?Math.round(e).toLocaleString(`en-US`):fD(e)} ${t===`tokens`?`tokens`:e===1?`premium request`:`premium requests`}`}var gD=[`at`,`day`,`adapter`,`model`,`dossier`,`chatId`,`turn`,`inputTokens`,`cachedInputTokens`,`cacheWriteTokens`,`outputTokens`,`premiumRequests`,`costUsd`,`costSource`,`id`],_D=e=>{if(e==null)return``;let t=String(e),n=/^[=+\-@\t\r]/.test(t)?`'${t}`:t;return/[",\n\r]/.test(n)||n!==t?`"${n.replace(/"/g,`""`)}"`:n};function vD(e){let t=tD(e).sort((e,t)=>e.at<t.at?-1:+(e.at>t.at)),n=[gD.join(`,`)];for(let e of t)n.push(gD.map(t=>_D(t===`day`?iD(e):e[t])).join(`,`));return`${n.join(`
27
+ `)}\n`}function yD({usage:e}){let t=rD(e.records,aD);return(0,q.jsxs)(`div`,{className:`usage-footer`,role:`group`,"aria-label":`What this answer used`,"data-usage-footer":``,children:[t.length===0?(0,q.jsxs)(`p`,{className:`usage-line`,children:[YE[e.adapter],` reported no usage for this answer.`]}):t.map(t=>(0,q.jsxs)(`p`,{className:`usage-line`,children:[e.sample&&(0,q.jsx)(`span`,{className:`usage-sample`,children:`Sample figures, not from a model. `}),(0,q.jsxs)(`span`,{className:`usage-model`,children:[YE[t.sample.adapter],`, `,oD(t.sample),`:`]}),` `,uD(t.totals,t.sample.adapter).join(` · `)]},t.key)),e.quota&&(0,q.jsxs)(`p`,{className:`usage-line`,children:[e.quota.unlimited?`Your Copilot premium requests are unlimited`:e.quota.remaining===null?`Copilot gave no count of premium requests left`:`${e.quota.remaining} premium requests left this period${e.quota.entitlement===null?``:` of ${e.quota.entitlement}`}${e.quota.resetDate?`, until ${e.quota.resetDate.slice(0,10)}`:``}`,` `,`(experimental, from the Copilot SDK's account.getQuota).`]}),e.notices.map((e,t)=>(0,q.jsxs)(`p`,{className:`usage-notice`,role:`status`,children:[e,` `,(0,q.jsx)(Bw,{href:Pg,label:`Edit the usage caps`})]},t))]})}function bD({usages:e}){if(e.length===0)return null;let t=e.flatMap(e=>e.records),n=rD(t,aD),r=nD(t),i=e[e.length-1],a=e.some(e=>e.sample);return(0,q.jsxs)(`div`,{className:`chat-usage`,"aria-label":`What this chat used`,"data-chat-usage":``,children:[(0,q.jsxs)(`p`,{className:`usage-line`,children:[a&&(0,q.jsx)(`span`,{className:`usage-sample`,children:`Sample figures. `}),`This chat: `,r.tokens===void 0?`tokens not reported`:`${sD(r.tokens)} tokens`,n.length>1?`, on ${n.length} models`:``,`.`]}),n.map(e=>(0,q.jsxs)(`p`,{className:`usage-line`,children:[(0,q.jsxs)(`span`,{className:`usage-model`,children:[YE[e.sample.adapter],`, `,oD(e.sample),`:`]}),` `,uD(e.totals,e.sample.adapter).join(` · `)]},e.key)),(0,q.jsx)(xD,{usage:i})]})}function xD({usage:e}){let t=(0,v.useId)(),n=e.context;if(!n)return(0,q.jsxs)(`p`,{className:`usage-line`,children:[`Context: not reported by the `,YE[e.adapter],` SDK.`]});let r=Math.min(1,n.used/n.window),i=`${sD(n.used)} of ${sD(n.window)} tokens (${Math.round(r*100)}%)`;return(0,q.jsxs)(`p`,{className:`usage-line context-meter`,children:[(0,q.jsxs)(`span`,{id:t,children:[`Context of the last answer: `,i]}),(0,q.jsx)(`meter`,{min:0,max:n.window,value:Math.min(n.used,n.window),"aria-labelledby":t})]})}function SD(){return(0,q.jsx)(`span`,{className:`stale-chip`,children:`Stale`})}function CD({stale:e,className:t=``}){return(0,q.jsxs)(`p`,{className:`stale-note ${t}`.trim(),"data-stale":``,children:[(0,q.jsx)(SD,{}),` `,(0,q.jsxs)(`span`,{children:[e.text,`.`]})]})}var wD=6e4;function TD({load:e}){let[t,n]=(0,v.useState)(null);return(0,v.useEffect)(()=>{if(!e)return;let t=!0,r=()=>e().then(e=>t&&n(e),()=>void 0);r();let i=setInterval(r,wD);return()=>{t=!1,clearInterval(i)}},[e]),t?.stale?(0,q.jsxs)(`p`,{className:`banner banner--stale`,role:`status`,"data-server-stale":``,children:[(0,q.jsx)(`strong`,{children:`Toil UI is out of date.`}),` `,t.stale,` Running chats and assignments started on the older one. Stop it with Ctrl+C where it runs, then start it again: `,(0,q.jsx)(`code`,{className:`any-break`,children:t.restart})]}):null}var ED=[`refine`,`investigate`,`implement`],DD={claude:`Claude`,copilot:`GitHub Copilot`,codex:`Codex`},OD={refine:{label:`Refine`,does:`Drafts acceptance criteria, suggests an estimate, splits the item into children where it is too big, checks for duplicates, and lists open questions.`,changes:`Nothing directly: every change comes back as a proposal for you to apply.`},investigate:{label:`Investigate`,does:`Researches the item across the dossier's sources (related items, pull requests, builds) and writes a report that cites each one.`,changes:`Nothing. The report is saved with the assignment, and posting it as a comment is a proposal.`},implement:{label:`Implement`,does:`Works the item in a copy of the dossier's repository, on a new local branch, through the adapter's coding runtime and its own sandbox.`,changes:`Only that branch, in a folder of its own, with no network. Pushing it and opening a pull request are proposals.`}},kD={queued:`Queued`,working:`Working`,"needs-you":`Needs you`,done:`Done`,failed:`Failed`};function AD(e,t){return e.startedAt?Math.max(0,Date.parse(e.endedAt??t)-Date.parse(e.startedAt)):null}function jD(e){if(e===null)return`not started`;let t=Math.round(e/1e3);return t<60?`${t} s`:`${Math.floor(t/60)} min ${String(t%60).padStart(2,`0`)} s`}function MD(e){return e.renewedBy?`It was renewed already, as ${e.renewedBy}.`:e.stale?e.stale.restart?e.stale.restart:e.state===`working`?`It is working now, and a renew never interrupts a turn: renew it once it ends.`:e.state===`needs-you`?`It is waiting on you: review its proposals and questions, or mark it reviewed, first.`:e.state===`queued`?`It hasn't started, so it starts on today's instructions anyway.`:null:`Nothing it started on has changed, so it doesn't need renewing.`}var ND=`toil-ui.notify.history`,PD={entries:[],read:0},FD=new Set([`needs-you`,`done`,`failed`,`cap`,`stale`,`sync`,`sync-failed`]);function ID(e){if(!e)return PD;try{let t=JSON.parse(e);return{entries:(Array.isArray(t?.entries)?t.entries:[]).filter(e=>!!e&&typeof e==`object`&&Number.isInteger(e.seq)&&typeof e.id==`string`&&typeof e.at==`string`&&FD.has(e.kind)&&typeof e.title==`string`&&typeof e.line==`string`&&typeof e.href==`string`&&/^#\//.test(e.href)).slice(0,50),read:typeof t?.read==`number`?t.read:0}}catch{return PD}}function LD(e,t){let n=Math.max(e.read,...e.entries.map(e=>e.seq),0),r=new Set(e.entries.map(e=>e.id)),i=[];for(let e of t)r.has(e.id)||(r.add(e.id),i.unshift({...e,seq:++n}));return i.length?{...e,entries:[...i,...e.entries].slice(0,50)}:e}var RD=e=>e.entries.filter(t=>t.seq>e.read).length,zD=e=>({...e,read:Math.max(e.read,...e.entries.map(e=>e.seq),0)});function BD(e=ND){let t,n=PD,r=null,i=new Set,a=()=>{try{return localStorage.getItem(e)}catch{return r}},o=()=>{let e=a();return e!==t&&(t=e,n=ID(e)),n},s=a=>{let o=JSON.stringify(a);r=o;try{localStorage.setItem(e,o)}catch{}t=o,n=a;for(let e of i)e()};return typeof window<`u`&&window.addEventListener(`storage`,t=>{if(t.key===e||t.key===null)for(let e of i)e()}),{get:o,add:e=>{let t=o(),n=LD(t,e);n!==t&&s(n)},markAllRead:()=>s(zD(o())),subscribe:e=>(i.add(e),()=>i.delete(e))}}var VD=BD(),HD=[`needs-you`,`failed`,`cap`,`done`,`stale`],UD={"needs-you":`Needs you`,failed:`Failed`,cap:`Stopped at a usage cap`,done:`Done`,stale:`Gone stale`},WD={browser:!1,states:{"needs-you":!0,failed:!0,cap:!0,done:!1,stale:!0},quiet:null,mine:!1},GD=(e,t,n=`${t}s`)=>`${e===1?`a`:e} ${e===1?t:n}`;function KD(e,t){if(e.kind!==`state`||e.state===e.previous)return null;let n=e.adapter?DD[e.adapter]:`An agent`;return{key:`assignment:${e.id}`,event:e.seq,state:e.state,agent:n,item:e.item,itemTitle:e.itemTitle??null,dossier:e.dossier,href:t.href,mine:t.mine,...qD(e.state,e)}}function qD(e,t){if(e===`needs-you`)return t.stop===`injection`?{notable:`needs-you`,why:`stopped on text in the item that looked like an instruction to it`}:{notable:`needs-you`,why:[t.questions?`asked ${GD(t.questions,`question`)}`:``,t.pending?`${t.pending} ${t.pending===1?`proposal`:`proposals`} to review`:``].filter(Boolean).join(`, `)||`waiting on you`};if(e===`done`)return{notable:`done`,why:`finished`};if(e===`failed`){if(t.stop===`usage`)return{notable:`cap`,why:`stopped at its usage cap`};if(t.stop===`cancelled`)return{notable:null,why:`stopped by a person`};if(t.stop===`time`)return{notable:`failed`,why:`stopped at its time limit`};if(t.stop===`interrupted`)return{notable:`failed`,why:`Toil UI stopped while it ran`};let e=t.message.split(`
28
+ `)[0].trim();return{notable:`failed`,why:e?e.length>160?`${e.slice(0,157)}...`:e:`failed`}}return{notable:null,why:e}}var JD=/^([01]?\d|2[0-3]):([0-5]\d)$/;function YD(e,t){if(!e)return!1;let n=e=>{let t=JD.exec(e);return t?Number(t[1])*60+Number(t[2]):null},r=n(e.from),i=n(e.to);if(r===null||i===null||r===i)return!1;let a=t.getHours()*60+t.getMinutes();return r<i?a>=r&&a<i:a>=r||a<i}var XD=(e,t)=>e.notable!==null&&t.states[e.notable]&&(!t.mine||e.mine),ZD=4e3,QD=class{emit;settings;timers;windowMs;held=new Map;timer=null;constructor(e,t,n={set:(e,t)=>setTimeout(e,t),clear:e=>clearTimeout(e)},r=ZD){this.emit=e,this.settings=t,this.timers=n,this.windowMs=r}push(e,t){let n=this.held.get(e.key);n?n.last=e:this.held.set(e.key,{from:t,last:e}),this.timer===null&&(this.timer=this.timers.set(()=>this.flush(),this.windowMs))}flush(){this.timer!==null&&this.timers.clear(this.timer),this.timer=null;let e=this.settings(),t=[...this.held.values()].filter(t=>t.last.state!==t.from&&XD(t.last,e)).map(e=>e.last);this.held.clear(),t.length&&this.emit(t)}stop(){this.timer!==null&&this.timers.clear(this.timer),this.timer=null,this.held.clear()}},$D={"needs-you":[`needs you`,`need you`],done:[`finished`,`finished`],failed:[`failed`,`failed`],cap:[`stopped at a usage cap`,`stopped at a usage cap`],stale:[`went stale`,`went stale`]},eO=e=>`${e.agent} ${$D[e.notable][0]}${e.item?` on ${e.item}${e.itemTitle?` ${e.itemTitle}`:``}`:` in ${e.dossier}`}: ${e.why}`;function tO(e){let t=e.map(eO);if(e.length===1){let n=e[0];return{title:`${n.agent} ${$D[n.notable][0]}`,lines:t}}let n=new Set(e.map(e=>e.notable));if(n.size===1){let r=[...n][0];return{title:`${e.length} ${r===`stale`?`sessions`:`agents`} ${$D[r][1]}`,lines:t}}return{title:`${e.length} agent updates`,lines:t}}function nO(e){if(!e)return structuredClone(WD);try{let t=JSON.parse(e),n={...WD.states};for(let e of HD)typeof t?.states?.[e]==`boolean`&&(n[e]=t.states[e]);let r=t?.quiet,i=r&&typeof r.from==`string`&&typeof r.to==`string`&&JD.test(r.from)&&JD.test(r.to)?{from:r.from,to:r.to}:null;return{browser:t?.browser===!0,states:n,quiet:i,mine:t?.mine===!0}}catch{return structuredClone(WD)}}var rO=`toil-ui.notify`,iO=`toil-ui.notify.mine`,aO=6e4,oO=5e3,sO=e=>{try{return localStorage.getItem(e)}catch{return null}},cO=(e,t)=>{try{localStorage.setItem(e,t)}catch{}},lO=()=>typeof Notification>`u`?`unsupported`:Notification.permission,uO=(0,v.createContext)(null),dO=()=>(0,v.useContext)(uO);function fO(e,t){return{...e,assign:async n=>{let r=await e.assign(n);return t(r.id),r},start:async(n,r)=>{let i=await e.start(n,r);return t(i.id),i},renew:async n=>{let r=await e.renew(n);return t(r.id),r}}}function pO(){let e=(0,v.useRef)(null),t=(0,v.useCallback)(()=>{if(!e.current)try{let t=JSON.parse(sO(iO)??`[]`);e.current=new Set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])}catch{e.current=new Set}return e.current},[]);return{mine:t,mark:(0,v.useCallback)(e=>{let n=t();n.add(e),cO(iO,JSON.stringify([...n].slice(-500)))},[t])}}function mO({assignments:e,dossier:t,mine:n,children:r}){let[i,a]=(0,v.useState)(()=>nO(sO(rO))),[o,s]=(0,v.useState)(lO),[c,l]=(0,v.useState)([]),u=(0,v.useRef)(i);u.current=i;let d=(0,v.useRef)(0),f=(0,v.useRef)(0),p=(0,v.useRef)(null),m=(0,v.useCallback)(e=>{let t=u.current,{title:n,lines:r}=tO(e);VD.add(e.map(e=>({id:`${e.key}:${e.state}${e.event===void 0?``:`:${e.event}`}`,at:new Date().toISOString(),kind:e.notable,title:tO([e]).title,line:gO(e),href:e.href})));let i=typeof document<`u`&&document.visibilityState===`hidden`;if(i&&(p.current===null&&(p.current=document.title),f.current+=e.length,document.title=`(${f.current}) ${p.current}`),!YD(t.quiet,new Date)&&(l(t=>[{id:d.current++,title:n,changes:e},...t].slice(0,3)),i&&t.browser&&lO()===`granted`))try{new Notification(n,{body:r.join(`
29
+ `),tag:`toil-ui`})}catch{}},[]),h=(0,v.useMemo)(()=>new QD(m,()=>u.current),[m]);return(0,v.useEffect)(()=>()=>h.stop(),[h]),(0,v.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&p.current!==null&&(document.title=p.current,p.current=null,f.current=0)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),(0,v.useEffect)(()=>{if(!e?.events||e.disabled)return;let t=new AbortController,r=`latest`,i,a=()=>{e.events(r,e=>{r=e.seq;let t=KD(e,{mine:n().has(e.id),href:`${bg(e.dossier)}/assignment/${encodeURIComponent(e.id)}`});t&&h.push(t,e.previous)},t.signal).then(()=>void 0,()=>void 0).finally(()=>{t.signal.aborted||(i=setTimeout(a,oO))})};return a(),()=>{t.abort(),clearTimeout(i)}},[e,h,n]),(0,v.useEffect)(()=>{if(!e||e.disabled||!t)return;let r=null,i=!0,a=()=>e.list(t,{inbox:!1}).then(e=>{if(!i)return;let t=e.assignments.filter(e=>e.stale);if(r)for(let e of t)r.has(e.id)||h.push({key:`stale:${e.id}`,state:`stale`,notable:`stale`,agent:e.adapter?DD[e.adapter]:`An agent`,item:e.item,itemTitle:e.itemTitle,why:e.stale.text,dossier:e.dossier,href:`${bg(e.dossier)}/assignment/${encodeURIComponent(e.id)}`,mine:n().has(e.id)},`fresh`);r=new Set([...r??[],...t.map(e=>e.id)])},()=>void 0);a();let o=setInterval(a,aO);return()=>{i=!1,clearInterval(o)}},[e,t,h,n]),(0,q.jsx)(uO,{value:{settings:i,save:e=>{a(e),cO(rO,JSON.stringify(e))},permission:o,ask:async()=>{if(typeof Notification>`u`)return`unsupported`;let e=Notification.permission==="default"?await Notification.requestPermission():Notification.permission;return s(e),e},report:(e,t)=>h.push(e,t),notices:c,dismiss:e=>l(t=>t.filter(t=>t.id!==e))},children:r})}function hO(){let e=dO();return(0,q.jsx)(`div`,{className:`notices`,role:`status`,"aria-label":`Notifications`,"data-notices":``,children:e?.notices.map(t=>(0,q.jsxs)(`div`,{className:`notice`,children:[(0,q.jsx)(`p`,{className:`notice__title`,children:(0,q.jsx)(`strong`,{children:t.title})}),(0,q.jsx)(`ul`,{className:`notice__lines`,children:t.changes.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(`a`,{href:e.href,children:gO(e)})},e.key))}),(0,q.jsxs)(W,{className:`btn btn--small`,onPress:()=>e.dismiss(t.id),children:[`Dismiss`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,t.title]})]})]},t.id))})}var gO=e=>`${e.item?`${e.item}${e.itemTitle?` ${e.itemTitle}`:``}`:e.dossier}: ${e.why}`;function _O({on:e,set:t,children:n}){return(0,q.jsxs)(Eo,{className:`check`,isSelected:e,onChange:t,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:e?`✓`:``}),n]})}function vO({label:e,value:t,save:n}){let[r,i]=(0,v.useState)(t),a=!JD.test(r);return(0,q.jsxs)(Yp,{className:`field-text`,value:r,onChange:e=>{i(e),JD.test(e)&&n(e)},isInvalid:a,children:[(0,q.jsx)(va,{children:e}),(0,q.jsx)(jo,{inputMode:`numeric`}),(0,q.jsxs)(qa,{className:`failure`,children:[`Use HH:MM, like 22:00. Until then the quiet hours keep `,t,`.`]})]})}function yO(){let e=dO(),[t,n]=(0,v.useState)(null);if(!e)return null;let r=e.settings,i=t=>e.save({...r,...t}),a=async t=>{if(n(null),!t)return i({browser:!1});let r=await e.ask();if(r===`granted`)return i({browser:!0});i({browser:!1}),n(r===`unsupported`?`This browser has no notifications, so Toil UI shows its notices in the page only.`:`The browser didn't allow notifications for this page, so Toil UI shows its notices in the page only. Allow them in the browser's settings for this site, then turn this on again.`)};return(0,q.jsxs)(Q,{as:`section`,className:`panel notify-setting`,"aria-labelledby":`notify-title`,children:[(0,q.jsx)(`h2`,{id:`notify-title`,children:`Notifications`}),(0,q.jsx)(`p`,{className:`note`,children:`A notice when an agent's state changes, never for a tool call or its progress. Changes within a few seconds become one notice. Saved in this browser only.`}),(0,q.jsxs)(`fieldset`,{className:`notify-states`,children:[(0,q.jsx)(`legend`,{children:`Notify when an agent is`}),HD.map(e=>(0,q.jsx)(_O,{on:r.states[e],set:t=>i({states:{...r.states,[e]:t}}),children:UD[e]},e))]}),(0,q.jsx)(_O,{on:r.mine,set:e=>i({mine:e}),children:`Only for agents I started in this browser`}),(0,q.jsx)(_O,{on:r.quiet!==null,set:e=>i({quiet:e?{from:`22:00`,to:`07:00`}:null}),children:`Quiet hours`}),r.quiet&&(0,q.jsxs)(`div`,{className:`notify-quiet`,children:[(0,q.jsx)(vO,{label:`From (HH:MM, this computer's time)`,value:r.quiet.from,save:e=>i({quiet:{...r.quiet,from:e}})}),(0,q.jsx)(vO,{label:`To (HH:MM)`,value:r.quiet.to,save:e=>i({quiet:{...r.quiet,to:e}})})]}),(0,q.jsx)(_O,{on:r.browser,set:e=>void a(e),children:`Browser notifications while this tab is hidden`}),(0,q.jsx)(`p`,{className:`note`,role:`status`,children:t??(r.browser?`The browser draws them on this computer; nothing is sent anywhere.`:`Off. The browser is asked for permission only when you turn this on.`)})]})}var bO=/^[ \t]*(?:#{1,6}[ \t]*)?(?:\*\*|__)?(recommendation|issues|evidence)(?:(?:\*\*|__)?[ \t]*[:\-–—](?:\*\*|__)?[ \t]*(.*)|(?:\*\*|__)?[ \t]*)$/gim,xO=/^[ \t]*(?:\d{1,2}[.)]|[-*•])[ \t]+/,SO=/^(?:none|nothing(?: stands out)?|no issues?)\.?$/i;function CO(e){let t=e.replace(xO,``).trim(),n=/^([^:[\]]{1,60}):\s+(.+)$/s.exec(t);return n?{title:n[1].trim(),text:n[2].trim()}:{title:null,text:t}}var wO=e=>e.split(/\n\s*\n/).map(e=>e.trim()).filter(Boolean);function TO(e){let t=[...e.matchAll(bO)].map(e=>({label:e[1].toLowerCase(),start:e.index,rest:e[2]??``,end:e.index+e[0].length})),n=t.find(e=>e.label===`recommendation`);if(!n)return null;let r=t.filter((e,r)=>e.start>=n.start&&t.findIndex(t=>t.label===e.label&&t.start>=n.start)===r),i=t=>{let n=r.findIndex(e=>e.label===t);if(n<0)return null;let i=r[n],a=r[n+1]?.start??e.length;return`${i.rest}\n${e.slice(i.end,a)}`.trim()},a=(i(`recommendation`)??``).replace(/\s*\n\s*/g,` `).trim();if(!a)return null;let o=(i(`issues`)??``).split(`
30
+ `).map(e=>e.trim()).filter(Boolean),s=o.some(e=>xO.test(e)),c=[];for(let e of o)!s||xO.test(e)||!c.length?c.push(e):c[c.length-1]+=` ${e}`;let l=c.filter(e=>!SO.test(e.replace(xO,``).trim())).map(CO),u=e.slice(0,n.start).trim(),d=[...wO(i(`evidence`)??``),...l.slice(3).map(e=>e.title?`${e.title}: ${e.text}`:e.text),...wO(u)];return{recommendation:a,issues:l.slice(0,3),evidence:d,extraIssues:Math.max(0,l.length-3)}}var EO=e=>e.map(e=>e.text).join(`
31
31
 
32
- `),EO=e=>e.statusCategory!==`DONE`;function DO(e,t){let n=new Map(e.map(e=>[e.id,e])),r=[];for(let t of e){if(!EO(t))continue;let e=t.links.filter(e=>e.type===`blocks`&&e.direction===`inward`&&n.has(e.target)&&EO(n.get(e.target))).map(e=>e.target);e.length&&r.push({id:t.id,by:[...new Set(e)].sort()})}let i={};for(let t of e)t.estimate?.unit===`points`&&(i[t.id]=t.estimate.value);let a=tg([...e],[],t);return{blocked:r.sort((e,t)=>e.id.localeCompare(t.id)),points:i,sprint:a?{name:a.sprint.name,done:a.done.points,remaining:a.remaining.points}:null}}function OO(e,t){let n=wO(TO(e.parts));return{id:t.id,dossier:t.dossier,startedAt:t.startedAt,at:t.at,adapter:e.adapter??null,model:e.model??null,by:e.by,usage:e.usage??null,recommendation:n?.recommendation??null,issues:n?.issues??[],parts:e.parts,citations:e.citations.length?e.citations:BT(e.parts),unverified:e.unverified??[],warnings:e.warnings??[],proposals:e.proposals,snapshot:t.snapshot}}var kO=e=>!e.newlyBlocked.length&&!e.cleared.length&&!e.points.length&&!e.sprint&&!e.cited.length&&!e.dropped.length&&!e.recommendationChanged;function AO(e,t){if(!e)return{previous:null,newlyBlocked:[],cleared:[],points:[],sprint:null,cited:[],dropped:[],recommendationChanged:!1};let n=new Map(e.snapshot.blocked.map(e=>[e.id,new Set(e.by)])),r=new Set(t.snapshot.blocked.map(e=>e.id)),i=t.snapshot.blocked.filter(e=>!n.has(e.id)||e.by.some(t=>!n.get(e.id).has(t))),a=e.snapshot.blocked.filter(e=>!r.has(e.id)).map(e=>e.id),o=[...new Set([...Object.keys(e.snapshot.points),...Object.keys(t.snapshot.points)])].sort().flatMap(n=>{let r=e.snapshot.points[n]??null,i=t.snapshot.points[n]??null;return r===i?[]:[{id:n,from:r,to:i}]}),s=e.snapshot.sprint,c=t.snapshot.sprint,l=s?.name!==c?.name||s?.done!==c?.done||s?.remaining!==c?.remaining,u=t.citations.filter(t=>!e.citations.includes(t)),d=e.citations.filter(e=>!t.citations.includes(e)),f=(e.recommendation??``)!==(t.recommendation??``);return{previous:{id:e.id,at:e.at},newlyBlocked:i,cleared:a,points:o,sprint:l?{from:s,to:c}:null,cited:u,dropped:d,recommendationChanged:f}}function jO(e){let t=[...e].sort((e,t)=>e.at.localeCompare(t.at)||e.id.localeCompare(t.id));return t.map((e,n)=>({id:e.id,at:e.at,adapter:e.adapter,model:e.model,by:e.by,recommendation:e.recommendation,issues:e.issues,citations:e.citations,unverified:e.unverified.length,changes:AO(t[n-1]??null,e)})).reverse()}function MO(e,t){let n=[...e].sort((e,t)=>e.at.localeCompare(t.at)||e.id.localeCompare(t.id)),r=n.findIndex(e=>e.id===t);return r<0?null:{record:n[r],changes:AO(n[r-1]??null,n[r])}}function NO(e){if(e.adapter===`scripted`||e.by===`scripted`)return`the scripted preview, not a model`;let t=e.adapter?PO[e.adapter]??e.adapter:e.by;return e.model?`${t} (${e.model})`:e.adapter?`${t}, its CLI's default model`:t}var PO={claude:`Claude`,copilot:`GitHub Copilot`,codex:`Codex`};function FO({parts:e,open:t=!1,level:n=4,done:r=!0}){let i=n===3?`h3`:`h4`,a=wO(TO(e));return a?(0,q.jsxs)(`div`,{className:`analysis-body`,children:[(0,q.jsxs)(`section`,{className:`analysis-rec`,"aria-label":`Recommendation`,children:[(0,q.jsx)(i,{className:`analysis-label`,children:`Recommendation`}),(0,q.jsx)(`p`,{className:`analysis-rec__text`,children:(0,q.jsx)(WT,{text:a.recommendation,chips:!0})})]}),(0,q.jsxs)(`section`,{className:`analysis-issues`,"aria-label":`Issues`,children:[(0,q.jsx)(i,{className:`analysis-label`,children:`Issues`}),a.issues.length?(0,q.jsx)(`ol`,{className:`analysis-issues__list`,children:a.issues.map((e,t)=>(0,q.jsxs)(`li`,{children:[e.title&&(0,q.jsxs)(`strong`,{className:`analysis-issue__title`,children:[e.title,`: `]}),(0,q.jsx)(WT,{text:e.text,chips:!0})]},t))}):(0,q.jsx)(`p`,{className:`note`,children:`None stands out.`}),a.extraIssues>0&&(0,q.jsxs)(`p`,{className:`note`,children:[`The agent named `,a.extraIssues,` more `,a.extraIssues===1?`issue`:`issues`,` than the three asked for; `,a.extraIssues===1?`it is`:`they are`,` at the end of the evidence.`]})]}),a.evidence.length>0&&(0,q.jsxs)(`details`,{className:`analysis-evidence`,open:t,children:[(0,q.jsxs)(`summary`,{children:[`Evidence `,(0,q.jsxs)(`span`,{className:`note`,children:[`(`,a.evidence.length,` `,a.evidence.length===1?`paragraph`:`paragraphs`,`)`]})]}),a.evidence.map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(WT,{text:e,chips:!0})},t))]})]}):(0,q.jsxs)(q.Fragment,{children:[r&&(0,q.jsx)(`p`,{className:`note analysis-unshaped`,children:`This answer didn't start with a Recommendation line, so it is shown as it came.`}),e.map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(WT,{text:e.text,chips:!0})},t))]})}var IO=e=>e===null?`no estimate`:`${e} ${e===1?`point`:`points`}`;function LO(e){return e.previous?kO(e)?`Nothing changed since the one before: the same blockers, points and citations.`:`Since the one before: ${[e.newlyBlocked.length?`${e.newlyBlocked.length} newly blocked`:``,e.cleared.length?`${e.cleared.length} cleared`:``,e.points.length?`points moved on ${e.points.length} ${e.points.length===1?`item`:`items`}`:``,e.sprint?`sprint points moved`:``,e.cited.length?`${e.cited.length} newly cited`:``,e.dropped.length?`${e.dropped.length} dropped`:``,e.recommendationChanged?`a new recommendation`:``].filter(Boolean).join(`, `)}.`:`The first analysis kept, so there is nothing to compare it with.`}function RO({ids:e}){return(0,q.jsx)(`ul`,{className:`ticket-chips`,children:e.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(qT,{id:e,detail:!0})},e))})}function zO({changes:e}){if(!e.previous||kO(e))return(0,q.jsx)(`p`,{className:`note`,children:LO(e)});let t=e=>e?`${e.name}: ${e.done} done, ${e.remaining} left`:`no sprint running`;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`note analysis-changes__since`,children:[`Compared with the analysis of `,Y(e.previous.at),`, by the dossier's items then and now.`]}),(0,q.jsxs)(`dl`,{className:`analysis-changes`,children:[e.newlyBlocked.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Newly blocked`}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(`ul`,{className:`rows`,children:e.newlyBlocked.map(e=>(0,q.jsxs)(`li`,{className:`analysis-changes__row`,children:[(0,q.jsx)(qT,{id:e.id,detail:!0}),` `,(0,q.jsx)(`span`,{className:`note`,children:`by`}),` `,(0,q.jsx)(RO,{ids:e.by})]},e.id))})})]}),e.cleared.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Cleared`}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(RO,{ids:e.cleared})})]}),e.points.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Points moved`}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(`ul`,{className:`rows`,children:e.points.map(e=>(0,q.jsxs)(`li`,{className:`analysis-changes__row`,children:[(0,q.jsx)(qT,{id:e.id,detail:!0}),` `,(0,q.jsxs)(`span`,{children:[IO(e.from),` to `,IO(e.to)]})]},e.id))})})]}),e.sprint&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`The sprint`}),(0,q.jsxs)(`dd`,{children:[t(e.sprint.from),`, then `,t(e.sprint.to),`.`]})]}),e.cited.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Newly cited`}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(RO,{ids:e.cited})})]}),e.dropped.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`No longer cited`}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(RO,{ids:e.dropped})})]}),e.recommendationChanged&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Recommendation`}),(0,q.jsx)(`dd`,{children:`A different one from the analysis before.`})]})]})]})}var BO=[{id:`board-m`,text:`Press M on a focused board card to open its menu: propose a move, or assign it to an agent.`,topic:`assignments`},{id:`board-drag`,text:`Drag a board card to another column to propose the move. Nothing changes in the tracker until you run the command it shows.`,topic:`board`},{id:`onboard`,text:`Joining a repository that already has a dossier? toil dossiers onboard sets up the connections it needs.`,topic:`repo-setup`},{id:`analyses`,text:`Every Analyze is kept in the dossier's Analyses tab, with what changed since the one before.`,topic:`analyses`},{id:`notify`,text:`Notifications come only when an agent changes state. Pick which states, quiet hours and only your own under Settings, General.`,topic:`notifications`},{id:`write-gate`,text:`Toil UI only reads. A change goes through toil's write gate: writes on for the connection, and --allow-write on the call.`,topic:`proposal`},{id:`theme-depth`,text:`Themed wording and Themed agent voice, under Settings, General, set how far a theme goes. Buttons, ids and errors never change.`,topic:`themed-wording`},{id:`theme-motion`,text:`Theme motion, under Settings, General, plays a theme's moments in full, subtly, or not at all.`,topic:`theme-motion`},{id:`audit`,text:`Every call Toil UI makes is in toil's audit log as toil-ui. Settings, Usage sums it up.`,topic:`audit`},{id:`sync`,text:`After the first sync, a sync asks Jira, Azure DevOps and GitHub issues only for what changed since the last good one.`,topic:`sync`},{id:`last-good`,text:`A source that fails to sync keeps its last good copy, marked stale, and the Sync panel shows toil's message and fix.`,topic:`sync`},{id:`standup`,text:`The stand-up, under the Worklog tab, folds the worklog's days into done, in progress and blocked, by code alone.`,topic:`standup`},{id:`readiness`,text:`The Board's Readiness view says which items are ready to start, worked out from the cache with no model call.`,topic:`readiness`},{id:`wipe`,text:`toil-ui wipe deletes everything Toil UI synced to this machine. Your trackers are never touched.`,topic:`sync`},{id:`palette`,text:`Ctrl+K (Cmd+K on a Mac) opens the command palette: jump to a dossier, a tab, an item or a setting, or run Sync, Analyze and Ask.`,topic:`palette`},{id:`help`,text:`Help in the header opens the docs section for the view in front of you, and every (i) has a Read more link.`,topic:`dossiers`}],VO=`toil-ui.tips.order`,HO=`toil-ui.tips.seen`,UO={get(e){try{return sessionStorage.getItem(e)}catch{return null}},set(e,t){try{sessionStorage.setItem(e,t)}catch{}}};function WO(e,t=Math.random){let n=[...e];for(let e=n.length-1;e>0;e--){let r=Math.floor(t()*(e+1));[n[e],n[r]]=[n[r],n[e]]}return n}function GO(e,t,n=BO){let r=e.filter(e=>n.some(t=>t.id===e)),i=[...r,...n.map(e=>e.id).filter(e=>!r.includes(e))],a=t.filter(e=>i.includes(e)),o=a.length>=i.length?[]:a,s=i.find(e=>!o.includes(e));return{tip:n.find(e=>e.id===s),seen:[...o,s]}}function KO(){try{let e=JSON.parse(UO.get(VO)??`null`);if(Array.isArray(e)&&e.every(e=>typeof e==`string`))return e}catch{}let e=WO(BO.map(e=>e.id));return UO.set(VO,JSON.stringify(e)),e}var qO=null;function JO(){if(qO)return qO;try{let e=JSON.parse(UO.get(HO)??`[]`);qO=Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{qO=[]}return qO}function YO(){let{tip:e,seen:t}=GO(KO(),JO());return qO=t,UO.set(HO,JSON.stringify(t)),e}var XO=`toil-ui.tips`,ZO=new Set,QO=null;function $O(){try{return localStorage.getItem(XO)!==`off`}catch{return!0}}function ek(e){QO=e;try{localStorage.setItem(XO,e?`on`:`off`)}catch{}for(let e of ZO)e()}function tk(){return[(0,v.useSyncExternalStore)(e=>(ZO.add(e),()=>ZO.delete(e)),()=>QO??=$O(),()=>!0),ek]}var nk=new URL(`crate-loading-B9H4D652.webp`,import.meta.url).href,rk=new URL(`crate-lost-Dk5Ca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%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3cpath%20d='M6%2010v46M58%2010v46'%20stroke='%23e8eaed'%20stroke-width='2.5'%20stroke-dasharray='4%205'/%3e%3crect%20x='30'%20y='34'%20width='26'%20height='6'%20rx='1.5'%20fill='%235197cc'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3crect%20x='30'%20y='42'%20width='26'%20height='6'%20rx='1.5'%20fill='%235197cc'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3cpath%20d='M34%2040v2M43%2040v2M52%2040v2'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3cpath%20d='M12%2022h28'%20stroke='%23c2e0ff'%20stroke-width='4'/%3e%3cpath%20d='M34%2015l8%207%20-8%207'%20stroke='%23c2e0ff'%20stroke-width='4'/%3e%3cpath%20d='M12%2022h0'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3c/svg%3e`,ok=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3cpath%20d='M8%2044a24%2024%200%200%201%2048%200'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3cpath%20d='M12%2044a20%2020%200%200%201%208%20-16'%20stroke='%238cc4ff'%20stroke-width='6'/%3e%3cpath%20d='M22%2026a20%2020%200%200%201%2032%2018'%20stroke='%23c2e0ff'%20stroke-width='6'/%3e%3cpath%20d='M32%2044L46%2028'%20stroke='%23e8eaed'%20stroke-width='3.5'/%3e%3ccircle%20cx='32'%20cy='44'%20r='5'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3crect%20x='14'%20y='50'%20width='36'%20height='6'%20rx='3'%20fill='%235197cc'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3c/svg%3e`,sk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3crect%20x='12'%20y='8'%20width='40'%20height='50'%20rx='4'%20fill='%235197cc'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3crect%20x='17'%20y='14'%20width='30'%20height='40'%20rx='1.5'%20fill='%23e8eaed'/%3e%3crect%20x='24'%20y='5'%20width='16'%20height='7'%20rx='2'%20fill='%23c2e0ff'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3cpath%20d='M21%2022h4M28%2022h14M21%2029h4M28%2029h14M21%2036h4M28%2036h10'%20stroke='%23355f81'%20stroke-width='2.5'/%3e%3cpath%20d='M21%2046c3%20-4%205%203%208%20-1s4%202%207%20-1'%20stroke='%238cc4ff'%20stroke-width='2.5'/%3e%3c/svg%3e`,ck=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3crect%20x='38'%20y='10'%20width='20'%20height='44'%20rx='3'%20fill='%235197cc'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3cpath%20d='M42%2016h12M42%2022h12M42%2028h12M42%2034h12M42%2040h12M42%2046h12'%20stroke='%23355f81'%20stroke-width='2'/%3e%3cpath%20d='M8%2014c0%2014%2012%2018%2022%2018M8%2050c0%20-14%2012%20-18%2022%20-18'%20stroke='%23c2e0ff'%20stroke-width='4'/%3e%3cpath%20d='M26%2026l8%206%20-8%206'%20stroke='%238cc4ff'%20stroke-width='4'/%3e%3ccircle%20cx='8'%20cy='12'%20r='4'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3ccircle%20cx='8'%20cy='52'%20r='4'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3c/svg%3e`,lk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3crect%20x='8'%20y='14'%20width='40'%20height='40'%20rx='3'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3crect%20x='12'%20y='18'%20width='32'%20height='32'%20rx='1.5'%20fill='%235197cc'/%3e%3cpath%20d='M13%2019L43%2049M43%2019L13%2049'%20stroke='%2373b9f5'%20stroke-width='3'/%3e%3ccircle%20cx='44'%20cy='20'%20r='13'%20fill='%23c2e0ff'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3cpath%20d='M37.5%2020.5l4.5%204.5%208.5%20-9'%20stroke='%230f1115'%20stroke-width='3.5'/%3e%3c/svg%3e`,uk=new URL(`splash-Dgll39Db.webp`,import.meta.url).href,dk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3crect%20x='6'%20y='18'%20width='38'%20height='38'%20rx='3'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3crect%20x='10'%20y='22'%20width='30'%20height='30'%20rx='1.5'%20fill='%235197cc'/%3e%3cpath%20d='M11%2023L39%2051M39%2023L11%2051'%20stroke='%2373b9f5'%20stroke-width='3'/%3e%3cpath%20d='M14%2018l6%2012%20-5%208%207%209%20-3%209'%20stroke='%230f1115'%20stroke-width='3'/%3e%3cpath%20d='M45%206L60%2032H30Z'%20fill='%23ff8a80'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3cpath%20d='M45%2014v9'%20stroke='%230f1115'%20stroke-width='3.5'/%3e%3ccircle%20cx='45'%20cy='27.5'%20r='2'%20fill='%230f1115'/%3e%3c/svg%3e`,fk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3crect%20x='4'%20y='4'%20width='56'%20height='56'%20rx='3'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3crect%20x='8'%20y='8'%20width='48'%20height='48'%20rx='1.5'%20fill='%235197cc'/%3e%3cpath%20d='M9%209L55%2055M55%209L9%2055'%20stroke='%2373b9f5'%20stroke-width='3'/%3e%3crect%20x='4'%20y='29.0'%20width='56'%20height='6'%20fill='%23c2e0ff'/%3e%3cpath%20d='M5%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M11%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M17%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M23%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M29%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M35%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M41%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M47%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M53%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3c/svg%3e`,pk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cpath%20d='M13%2047h38'%20stroke='%23b89b6c'%20stroke-width='2'%20stroke-linecap='round'/%3e%3cpath%20d='M14%2033h21'%20stroke='%232e2a26'%20stroke-width='4'%20stroke-linecap='round'/%3e%3ccircle%20cx='37'%20cy='33'%20r='13'%20stroke='%232e2a26'%20stroke-width='2.8'/%3e%3ccircle%20cx='37'%20cy='33'%20r='10.8'%20stroke='%236e5420'%20stroke-width='.9'/%3e%3cpath%20d='M37%2029.8L37%2021.5M39.26%2030.74L45.13%2024.87M40.2%2033L48.5%2033M39.26%2035.26L45.13%2041.13M37%2036.2L37%2044.5M34.74%2035.26L28.87%2041.13M33.8%2033L25.5%2033M34.74%2030.74L28.87%2024.87'%20stroke='%232e2a26'%20stroke-width='1.8'%20stroke-linecap='round'/%3e%3ccircle%20cx='37'%20cy='33'%20r='3.4'%20fill='url(%23b)'%20stroke='%234a3814'/%3e%3cg%20transform='rotate(-38%2022%2042)'%3e%3cpath%20d='M10%2040.5h18v3H10Z'%20fill='%234d4740'%20stroke='%232e2a26'%20stroke-width='.9'/%3e%3cpath%20d='M28%2038.2a4.2%204.2%200%201%201%200%207.6v-2.4h2.6v-2.8H28Z'%20fill='%234d4740'%20stroke='%232e2a26'%20stroke-width='.9'/%3e%3c/g%3e%3c/svg%3e`,mk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cg%3e%3ccircle%20cx='17'%20cy='20'%20r='4.5'%20fill='%23a8a294'/%3e%3ccircle%20cx='13'%20cy='25'%20r='3.5'%20fill='%23a8a294'/%3e%3ccircle%20cx='47'%20cy='21'%20r='4.8'%20fill='%23a8a294'/%3e%3ccircle%20cx='52'%20cy='26'%20r='3.4'%20fill='%23a8a294'/%3e%3ccircle%20cx='17'%20cy='19.1'%20r='3.6'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='13'%20cy='24.1'%20r='2.6'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='47'%20cy='20.1'%20r='3.9'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='52'%20cy='25.1'%20r='2.5'%20fill='%23e6dfcf'/%3e%3c/g%3e%3ccircle%20cx='32'%20cy='35'%20r='18.5'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.2'/%3e%3ccircle%20cx='32'%20cy='35'%20r='15'%20fill='%23f3e8cf'%20stroke='%234a3814'/%3e%3cpath%20d='M42.81%2031.07A11.5%2011.5%200%200%201%2041.96%2040.75'%20stroke='%238c1c10'%20stroke-width='3'/%3e%3cpath%20d='M20.31%2041.75L23.34%2040'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M18.71%2032.66L22.15%2033.26'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M23.32%2024.66L25.57%2027.34'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M32%2021.5L32%2025'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M40.68%2024.66L38.43%2027.34'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M45.29%2032.66L41.85%2033.26'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M43.69%2041.75L40.66%2040'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M32%2035L41.46%2042.39'%20stroke='%236e2f12'%20stroke-width='2.4'%20stroke-linecap='round'/%3e%3ccircle%20cx='32'%20cy='35'%20r='2.6'%20fill='%232e2a26'/%3e%3cpath%20d='M22%2026l5%204.5-1.5%204%205.5%203M41%2028l-4%203.5%201%203.5M27%2046l3-4%203.5%201.5'%20stroke='%232e2a26'%20stroke-width='1'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14%2014l3.5%203.5M50%2014l-3.5%203.5M32%2011v4'%20stroke='%238c1c10'%20stroke-width='1.8'%20stroke-linecap='round'/%3e%3c/svg%3e`,hk=new URL(`depot-BjEccEGj.webp`,import.meta.url).href,gk=new URL(`gauge-sheet-ZMjQ7TPd.svg`,import.meta.url).href,_k=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cpath%20d='M15%2019h22M15%2024h30M15%2041h26M15%2046h18'%20stroke='%23b89b6c'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3cg%20transform='rotate(-11%2032%2033)'%3e%3crect%20x='12.5'%20y='23.5'%20width='39'%20height='19'%20rx='2'%20stroke='%238c1c10'%20stroke-width='2'/%3e%3crect%20x='15'%20y='26'%20width='34'%20height='14'%20rx='1'%20stroke='%238c1c10'%20stroke-width='.9'/%3e%3cpath%20transform='translate(16.7%2027)'%20d='M0%2012V0h4.2a3.4%203.4%200%200%201%200%206.8H0M8%2012%2011.6%200%2015.2%2012M9.3%207.8h4.6M19%200V12M23%200V12h2.6A5%205%200%200%200%2030.6%207V5A5%205%200%200%200%2025.6%200Z'%20stroke='%238c1c10'%20stroke-width='2.1'%20stroke-linejoin='round'%20stroke-linecap='square'/%3e%3c/g%3e%3c/svg%3e`,vk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2020'%20width='24'%20height='20'%20fill='none'%3e%3cg%3e%3ccircle%20cx='7'%20cy='13'%20r='5'%20fill='%237d7669'/%3e%3ccircle%20cx='13'%20cy='9'%20r='6.2'%20fill='%237d7669'/%3e%3ccircle%20cx='18.5'%20cy='13'%20r='4.6'%20fill='%237d7669'/%3e%3ccircle%20cx='7'%20cy='12.1'%20r='4.1'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='13'%20cy='8.1'%20r='5.3'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='18.5'%20cy='12.1'%20r='3.7'%20fill='%23e6dfcf'/%3e%3c/g%3e%3cpath%20d='M4%2018.5h16'%20stroke='%236e5420'%20stroke-width='1.4'%20stroke-linecap='round'/%3e%3c/svg%3e`,yk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cpath%20d='M15%2016h34'%20stroke='%23a0522d'%20stroke-width='2.4'%20stroke-linecap='round'/%3e%3cpath%20d='M15%2022h26M15%2027h31M15%2032h22'%20stroke='%23b89b6c'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3cpath%20d='M15%2043c3-5%204.5%201%206.5-1.5s2.5-5%204-2%202.5%203%205%20.5'%20stroke='%232e2a26'%20stroke-width='1.4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15%2047h17'%20stroke='%236e5420'%20stroke-width='1'%20stroke-linecap='round'/%3e%3cpath%20d='M40%2047l-2%206.5%203.5-2%203.5%202-2-6.5Z'%20fill='%236e2f12'/%3e%3ccircle%20cx='42.5'%20cy='42'%20r='7'%20fill='%238c1c10'%20stroke='%236e2f12'%20stroke-width='1'/%3e%3ccircle%20cx='42.5'%20cy='42'%20r='4.2'%20stroke='%23b5452f'%20stroke-width='1.2'/%3e%3ccircle%20cx='40.6'%20cy='40'%20r='1.3'%20fill='%23c46a50'%20fill-opacity='.8'/%3e%3c/svg%3e`,bk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cpath%20d='M34%2019.5C24%2014%2015%2017%2015%2024s5%209%207%2013'%20stroke='%236e5420'%20stroke-width='1.4'%20stroke-dasharray='2.2%201.4'%20stroke-linecap='round'/%3e%3cpath%20d='M31.5%2021.5h5v-3h-5Z'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='.9'/%3e%3ccircle%20cx='34'%20cy='17'%20r='2.4'%20stroke='%234a3814'%20stroke-width='1.3'/%3e%3ccircle%20cx='34'%20cy='36'%20r='15.6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.2'/%3e%3ccircle%20cx='34'%20cy='36'%20r='13'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='.9'/%3e%3cpath%20d='M34%2024.3L34%2027'%20stroke='%232e2a26'%20stroke-width='1.4'/%3e%3cpath%20d='M39.85%2025.87L39.1%2027.17'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M44.13%2030.15L42.83%2030.9'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M45.7%2036L43%2036'%20stroke='%232e2a26'%20stroke-width='1.4'/%3e%3cpath%20d='M44.13%2041.85L42.83%2041.1'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M39.85%2046.13L39.1%2044.83'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M34%2047.7L34%2045'%20stroke='%232e2a26'%20stroke-width='1.4'/%3e%3cpath%20d='M28.15%2046.13L28.9%2044.83'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M23.87%2041.85L25.17%2041.1'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M22.3%2036L25%2036'%20stroke='%232e2a26'%20stroke-width='1.4'/%3e%3cpath%20d='M23.87%2030.15L25.17%2030.9'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M28.15%2025.87L28.9%2027.17'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M34%2036L36.49%2042.01'%20stroke='%232e2a26'%20stroke-width='2'%20stroke-linecap='round'/%3e%3cpath%20d='M34%2036L44%2036'%20stroke='%236e2f12'%20stroke-width='1.3'%20stroke-linecap='round'/%3e%3ccircle%20cx='34'%20cy='36'%20r='1.6'%20fill='%232e2a26'/%3e%3c/svg%3e`,xk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cg%3e%3ccircle%20cx='22'%20cy='22'%20r='5'%20fill='%23a8a294'/%3e%3ccircle%20cx='29'%20cy='17'%20r='6.5'%20fill='%23a8a294'/%3e%3ccircle%20cx='37'%20cy='19'%20r='5.5'%20fill='%23a8a294'/%3e%3ccircle%20cx='44'%20cy='15'%20r='4.5'%20fill='%23a8a294'/%3e%3ccircle%20cx='22'%20cy='21.1'%20r='4.1'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='29'%20cy='16.1'%20r='5.6'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='37'%20cy='18.1'%20r='4.6'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='44'%20cy='14.1'%20r='3.6'%20fill='%23e6dfcf'/%3e%3c/g%3e%3cpath%20d='M29%2051V45'%20stroke='%232e2a26'%20stroke-width='4'/%3e%3cpath%20d='M23%2052h12'%20stroke='%232e2a26'%20stroke-width='2.6'%20stroke-linecap='round'/%3e%3cpath%20d='M26.5%2027h5v18h-5Z'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.1'/%3e%3cpath%20d='M25.5%2031.5h7M25.5%2037h7'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cpath%20d='M24.5%2027h9l-1-2h-7Z'%20fill='%236e5420'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cpath%20d='M29%2025v-2.5'%20stroke='%234a3814'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3cpath%20d='M31.5%2041%2043%2036.5'%20stroke='%232e2a26'%20stroke-width='2'%20stroke-linecap='round'/%3e%3ccircle%20cx='43.6'%20cy='36.2'%20r='1.8'%20fill='%23a0522d'%20stroke='%236e2f12'%20stroke-width='.8'/%3e%3c/svg%3e`,Sk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='3'%20y='3'%20width='10'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='4'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='4'%20width='10'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='4'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='5'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='4'%20y='5'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='5'%20y='5'%20width='6'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='11'%20y='5'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='12'%20y='5'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='6'%20width='10'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='13'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='7'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='7'%20width='4'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='7'%20y='7'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='8'%20y='7'%20width='5'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='7'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='8'%20width='8'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='11'%20y='8'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='12'%20y='8'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='9'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='9'%20width='10'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='13'%20y='9'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='10'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='4'%20y='10'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='5'%20y='10'%20width='8'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='11'%20width='5'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='8'%20y='11'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='9'%20y='11'%20width='4'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='12'%20width='10'%20height='1'%20fill='%232b1a0e'/%3e%3c/svg%3e`,Ck=new URL(`basket-Cj-ZPWsU.svg`,import.meta.url).href,wk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='5'%20y='1'%20width='2'%20height='1'%20fill='%23d8432a'/%3e%3crect%20x='8'%20y='1'%20width='2'%20height='1'%20fill='%23d9822b'/%3e%3crect%20x='4'%20y='2'%20width='3'%20height='1'%20fill='%23d8432a'/%3e%3crect%20x='7'%20y='2'%20width='5'%20height='1'%20fill='%23d9822b'/%3e%3crect%20x='3'%20y='3'%20width='4'%20height='1'%20fill='%23d8432a'/%3e%3crect%20x='7'%20y='3'%20width='4'%20height='1'%20fill='%23d9822b'/%3e%3crect%20x='11'%20y='3'%20width='1'%20height='1'%20fill='%23b8541c'/%3e%3crect%20x='12'%20y='3'%20width='1'%20height='1'%20fill='%23d9822b'/%3e%3crect%20x='2'%20y='4'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='5'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='5'%20y='5'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='6'%20y='5'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='8'%20y='5'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='9'%20y='5'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='11'%20y='5'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='12'%20y='5'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='4'%20y='6'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='6'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='7'%20y='6'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='9'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='6'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='12'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='13'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='7'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='7'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='5'%20y='7'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='6'%20y='7'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='8'%20y='7'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='9'%20y='7'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='11'%20y='7'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='12'%20y='7'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='7'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='8'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='0'%20y='9'%20width='4'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='14'%20y='9'%20width='2'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='4'%20y='10'%20width='3'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='10'%20width='3'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='11'%20width='3'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='7'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='11'%20width='3'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='13'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='12'%20width='1'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='5'%20y='12'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='6'%20y='12'%20width='1'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='7'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='12'%20width='1'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='11'%20y='12'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='12'%20y='12'%20width='1'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='13'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='13'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='13'%20width='3'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='7'%20y='13'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='13'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='13'%20width='3'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='13'%20y='13'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='14'%20width='3'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='14'%20width='3'%20height='1'%20fill='%232b1a0e'/%3e%3c/svg%3e`,Tk=new URL(`gate-DgvMBPi9.svg`,import.meta.url).href,Ek=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='10'%20y='0'%20width='3'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='1'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='1'%20width='3'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='13'%20y='1'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='8'%20y='2'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='2'%20width='2'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='11'%20y='2'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='12'%20y='2'%20width='2'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='14'%20y='2'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='8'%20y='3'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='3'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='10'%20y='3'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='11'%20y='3'%20width='3'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='14'%20y='3'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='4'%20width='8'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='4'%20width='4'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='13'%20y='4'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='5'%20width='7'%20height='1'%20fill='%23d8432a'/%3e%3crect%20x='9'%20y='5'%20width='4'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='6'%20width='10'%20height='1'%20fill='%23d8432a'/%3e%3crect%20x='12'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='7'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='8'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='3'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='8'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='5'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='6'%20y='8'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='7'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='8'%20y='8'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='9'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='8'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='11'%20y='8'%20width='2'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='9'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='10'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='3'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='10'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='5'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='6'%20y='10'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='7'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='8'%20y='10'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='9'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='10'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='11'%20y='10'%20width='2'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='11'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='12'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='3'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='12'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='5'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='6'%20y='12'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='7'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='8'%20y='12'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='9'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='12'%20width='2'%20height='1'%20fill='%23a3200f'/%3e%3crect%20x='12'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='13'%20width='9'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='13'%20width='2'%20height='1'%20fill='%23a3200f'/%3e%3crect%20x='12'%20y='13'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='14'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3c/svg%3e`,Dk=new URL(`splash-hOSg5Qrh.webp`,import.meta.url).href,Ok=new URL(`sprout-sheet-BLjjvTMl.svg`,import.meta.url).href,kk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='5'%20y='1'%20width='4'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='2'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='5'%20y='2'%20width='4'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='9'%20y='2'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='11'%20y='2'%20width='2'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='3'%20width='2'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='3'%20width='6'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='10'%20y='3'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='11'%20y='3'%20width='2'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='13'%20y='3'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='4'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='4'%20width='4'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='6'%20y='4'%20width='1'%20height='1'%20fill='%236b6f78'/%3e%3crect%20x='7'%20y='4'%20width='7'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='14'%20y='4'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='0'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='5'%20width='3'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='4'%20y='5'%20width='3'%20height='1'%20fill='%236b6f78'/%3e%3crect%20x='7'%20y='5'%20width='4'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='11'%20y='5'%20width='1'%20height='1'%20fill='%236b6f78'/%3e%3crect%20x='12'%20y='5'%20width='3'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='15'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='0'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='6'%20width='13'%20height='1'%20fill='%236b6f78'/%3e%3crect%20x='14'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='7'%20width='13'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='5'%20y='8'%20width='2'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='12'%20y='8'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='4'%20y='9'%20width='2'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='10'%20y='9'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='3'%20y='10'%20width='4'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='12'%20y='10'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='5'%20y='11'%20width='2'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='10'%20y='11'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='4'%20y='12'%20width='2'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='3'%20y='13'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='0'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='1'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='2'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='3'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='4'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='5'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='6'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='7'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='8'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='9'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='10'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='11'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='12'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='13'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='14'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='15'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='0'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='1'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='2'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='3'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='4'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='5'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='6'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='7'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='8'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='9'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='10'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='11'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='12'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='13'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='14'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='15'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3c/svg%3e`,Ak=new URL(`sun-Cyqqe255.svg`,import.meta.url).href,jk=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiBzaGFwZS1yZW5kZXJpbmc9ImNyaXNwRWRnZXMiPgo8IS0tIE92ZXJ3b3Js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4KPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMzIgMzIuNSkgc2NhbGUoMS4zKSB0cmFuc2xhdGUoLTMxLjUgLTMyLjUpIj4KPHBhdGggZD0iTTIzIDE3LjVoMTNsNyA3djIwYTMgMyAwIDAgMS0zIDNIMjNhMyAzIDAgMCAxLTMtM3YtMjRhMyAzIDAgMCAxIDMtM1oiIGZpbGw9IiNmZmZmZmYiLz4KPHBhdGggZD0iTTM2IDE3LjV2NC41YTIuNSAyLjUgMCAwIDAgMi41IDIuNUg0M1oiIGZpbGw9IiMxYjFmMjQiLz4KPHBhdGggZD0ibTI0LjUgMjcuNSA1IDQuMy01IDQuMyIgc3Ryb2tlPSIjMWIxZjI0IiBzdHJva2Utd2lkdGg9IjMuNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0zMS44IDQwaDYuMiIgc3Ryb2tlPSIjMGI1Y2FkIiBzdHJva2Utd2lkdGg9IjMuNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjwvZz4KPC9zdmc+Cg==`,Hk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3c!--%20A%20sword%20snapped%20a%20hand%20above%20the%20guard,%20its%20point%20fallen%20apart%20from%20it:%20a%20critical%20fail.%20--%3e%3cpath%20d='M39%2023%2053%209l4.5-1.5L56%2014%2043%2027l-1.2-1.8-1.4.8Z'%20fill='%23b9a682'%20stroke='%233a3733'%20stroke-width='1.4'/%3e%3cpath%20d='M41.5%2024.5%2055.2%2010.8'%20stroke='%23efe6d2'%20stroke-width='1'/%3e%3cpath%20d='M21%2039%2032%2028l1.2%202.4%201.4-.8.4%201.8%201%20.6L25%2043Z'%20fill='%23b9a682'%20stroke='%233a3733'%20stroke-width='1.4'/%3e%3cpath%20d='M23%2041%2033.2%2030.8'%20stroke='%23efe6d2'%20stroke-width='1'/%3e%3cpath%20d='M15.5%2033.5%2030.5%2048.5'%20stroke='%232e2a26'%20stroke-width='5.4'/%3e%3cpath%20d='M15.5%2033.5%2030.5%2048.5'%20stroke='%239c7a3c'%20stroke-width='2.6'/%3e%3ccircle%20cx='15'%20cy='33'%20r='2.6'%20fill='%239c7a3c'%20stroke='%232e2a26'%20stroke-width='1.3'/%3e%3ccircle%20cx='31'%20cy='49'%20r='2.6'%20fill='%239c7a3c'%20stroke='%232e2a26'%20stroke-width='1.3'/%3e%3cpath%20d='M21.8%2045.2%2012.6%2054.4'%20stroke='%232e2a26'%20stroke-width='6'/%3e%3cpath%20d='M20.4%2046.6l-1.8-1.8M17.8%2049.2%2016%2047.4M15.2%2051.8l-1.8-1.8'%20stroke='%236b6660'%20stroke-width='1.1'/%3e%3ccircle%20cx='11'%20cy='56'%20r='4.2'%20fill='%239c7a3c'%20stroke='%232e2a26'%20stroke-width='1.5'/%3e%3cpath%20d='M36.2%2027.2l1.4-3.6M38.6%2030.2l3.8-1.2M37.4%2028.6l2.6-2.6'%20stroke='%236e1c18'%20stroke-width='1.4'/%3e%3c/svg%3e`,Uk=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbGluZWNhcD0icm91bmQiPgo8IS0tIEEgbG9uZyByZXN0OiB0aGUgcGFydHkncyBjYW1wIGZpcmUgaW4gYSByaW5nIG9mIHN0b25lcywgdGhlIHNhbWUgZmlyZSBhcyB0aGUgd29ya2xvZydzIHJlc3QgZGF5cywgZHJhd24gbGFyZ2VyLiAtLT4KPGVsbGlwc2UgY3g9IjMyIiBjeT0iNTIiIHJ4PSIyNSIgcnk9IjYiIGZpbGw9IiMyZTJhMjY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zIi8+Cjwvc3ZnPgo=`,Wk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20width='24'%20height='24'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3c!--%20A%20candle%20in%20an%20iron%20dish,%20its%20flame%20in%20tarnished%20gold:%20the%20loading%20track%20kindles%20one%20after%20another.%20--%3e%3cellipse%20cx='12'%20cy='20.6'%20rx='8.2'%20ry='2.4'%20fill='%232e2a26'%20stroke='%239c7a3c'%20stroke-width='.8'/%3e%3cpath%20d='M8.6%2011h6.8v9.2c0%20.8-1.5%201.3-3.4%201.3s-3.4-.5-3.4-1.3Z'%20fill='%23d8cbb0'%20stroke='%233a3733'%20stroke-width='.8'/%3e%3cpath%20d='M8.6%2011c0%20.7%201.5%201.2%203.4%201.2s3.4-.5%203.4-1.2'%20fill='none'%20stroke='%238a7558'%20stroke-width='.7'/%3e%3cpath%20d='M13.9%2012v3.6c0%20.5.9.5.9%200V11.6Z'%20fill='%23b9a682'/%3e%3cpath%20d='M12%2010.6V9'%20stroke='%2314110e'%20stroke-width='.9'/%3e%3cpath%20d='M12%202.2c1.8%202.2%202.6%203.8%202.6%205.1A2.6%202.6%200%200%201%2012%209.9a2.6%202.6%200%200%201-2.6-2.6c0-1.3.8-2.9%202.6-5.1Z'%20fill='%23c9a85e'%20stroke='%237a5a26'%20stroke-width='.7'/%3e%3cpath%20d='M12%205.2c.8%201.1%201.2%201.8%201.2%202.4a1.2%201.2%200%200%201-2.4%200c0-.6.4-1.3%201.2-2.4Z'%20fill='%23efe6d2'/%3e%3c/svg%3e`,Gk=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbGluZWNhcD0icm91bmQiPgo8IS0tIFRoZS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S0xLjUgMTYuNVM0OS4yIDM0LjMgNDUuNSAzOC41WiIgZmlsbD0iI2Q4Y2JiMCIgc3Ryb2tlPSIjM2EzNzMzIiBzdHJva2Utd2lkdGg9IjEuMyIvPgo8cGF0aCBkPSJNNDUuNSAzOC41IDU2LjYgMTAiIHN0cm9rZT0iIzhhNzU1OCIgc3Ryb2tlLXdpZHRoPSIxIi8+CjxwYXRoIGQ9Ik00NC42IDQwLjggNDUuNSAzOC41IiBzdHJva2U9IiMxNDExMGUiIHN0cm9rZS13aWR0aD0iMS42Ii8+Cjwvc3ZnPgo=`,Kk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3c!--%20The%20broken%20road,%20open%20again:%20the%20keep%20that%20held%20it%20stands%20with%20its%20gate%20raised,%20and%20the%20road%20runs%20through.%20--%3e%3cpath%20d='M18%2050V20h5v-5h5v5h8v-5h5v5h5v30Z'%20fill='%233a3733'%20stroke='%231a1410'%20stroke-width='1.6'/%3e%3cpath%20d='M21%2026h22M21%2033h22M21%2040h22'%20stroke='%234a443d'%20stroke-width='1.2'/%3e%3cpath%20d='M25.5%2050V39.5a6.5%206.5%200%200%201%2013%200V50Z'%20fill='%2314110e'%20stroke='%239c7a3c'%20stroke-width='1.4'/%3e%3cpath%20d='M26.5%2033.5h11M28%2030.5v3M32%2030.5v3M36%2030.5v3'%20stroke='%236b6660'%20stroke-width='1.2'/%3e%3cpath%20d='M2%2054.5h60'%20stroke='%233a3733'%20stroke-width='1.6'/%3e%3cpath%20d='M4%2058.5h11M20%2058.5h9M35%2058.5h9M49%2058.5h11'%20stroke='%238a7558'%20stroke-width='2.2'/%3e%3cpath%20d='M27.5%2050.5h9'%20stroke='%23c9a85e'%20stroke-width='1.6'/%3e%3cpath%20d='M48.5%2012v14M48.5%2012l9%203.2-9%203.2'%20fill='%236e1c18'%20stroke='%233a0d0b'%20stroke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w0LjUtMi41IDIuNSAzLjUgMS41LTEwWk00NSA1MWwyLjUgMTAgMS44LTMuOCA0LjIgMS4yTDQ5IDUwWiIgZmlsbD0iIzZlMWMxOCIgc3Ryb2tlPSIjM2EwZDBiIiBzdHJva2Utd2lkdGg9IjEiLz4KPHBhdGggZD0iTTQzIDM3LjVjMS44IDAgMi41IDEuMyA0IDEuNnMzLS4zIDQgLjguMyAyLjYgMSA0IDIgMiAyIDMuOC0xLjIgMi4zLTEuNiAzLjkuNSAzLS42IDQuMS0yLjcuNy00LjEgMS41LTEuOCAyLjUtMy41IDIuNy0yLjUtMS4zLTQuMi0xLjctMy4xLjItNC4yLTEtLjMtMi42LTEuMi00UzMzIDUwLjkgMzMgNDkuMXMxLjMtMi40IDEuNy0zLjktLjQtMi45LjgtNCAyLjctLjUgNC4xLTEuMyAxLjYtMi40IDMuNC0yLjRaIiBmaWxsPSIjNmUxYzE4IiBzdHJva2U9IiMzYTBkMGIiIHN0cm9rZS13aWR0aD0iMSIvPgo8Y2lyY2xlIGN4PSI0My41IiBjeT0iNDgiIHI9IjUuNiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjM2EwZDBiIiBzdHJva2Utd2lkdGg9IjEuNCIvPgo8Y2lyY2xlIGN4PSI0My41IiBjeT0iNDgiIHI9IjUuNiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYTU0NTNhIiBzdHJva2Utd2lkdGg9Ii42IiBzdHJva2UtZGFzaGFycmF5PSIzIDciIHRyYW5zZm9ybT0icm90YXRlKC0zMCA0My41IDQ4KSIvPgo8Y2lyY2xlIGN4PSI0My41IiBjeT0iNDgiIHI9IjEuOCIgZmlsbD0iIzNhMGQwYiIvPgo8L3N2Zz4K`,Jk=new URL(`tray-BHNdSAiO.webp`,import.meta.url).href,Yk=new URL(`boot-sheet-C9B_iXU-.webp`,import.meta.url).href,Xk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20fill='none'%3e%3c!--%20One%20block%20of%20cipher%20text,%20decrypted:%20a%20bracketed%20cell%20in%20cyan.%20--%3e%3cpath%20d='M5%201.5H1.5v13H5M11%201.5h3.5v13H11'%20stroke='%233ff0ff'%20stroke-width='1.5'/%3e%3crect%20x='4.5'%20y='4.5'%20width='7'%20height='7'%20fill='%233ff0ff'/%3e%3c/svg%3e`,Zk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3c!--%20Gig%20closed:%20a%20terminal%20window%20with%20a%20neon%20check%20where%20the%20prompt%20was.%20--%3e%3cpath%20d='M6%2012h46l6%206v34H6Z'%20fill='%2307060f'%20stroke='%233ff0ff'%20stroke-width='2'/%3e%3cpath%20d='M6%2020h52'%20stroke='%233ff0ff'%20stroke-width='1.5'/%3e%3cpath%20d='M52%2012h6v6Z'%20fill='%23ff2e88'/%3e%3crect%20x='10'%20y='15'%20width='4'%20height='2.5'%20fill='%23ff2e88'/%3e%3crect%20x='16'%20y='15'%20width='4'%20height='2.5'%20fill='%23f2ff4a'/%3e%3cpath%20d='M18%2036l8%208%2018-18'%20stroke='%2339ff9c'%20stroke-width='5'%20stroke-linecap='square'/%3e%3cpath%20d='M18%2036l8%208%2018-18'%20stroke='%23eaffef'%20stroke-width='1.5'%20stroke-linecap='square'%20opacity='.7'/%3e%3c/svg%3e`,Qk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3c!--%20ICE%20breached:%20a%20hexagonal%20barrier%20split%20open,%20and%20a%20data%20line%20running%20clean%20through%20the%20gap.%20--%3e%3cpath%20d='M29%206%209%2017.5v29L29%2058'%20stroke='%233ff0ff'%20stroke-width='2.5'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M35%206l20%2011.5v29L35%2058'%20stroke='%233ff0ff'%20stroke-width='2.5'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M14%2021v22M50%2021v22'%20stroke='%233ff0ff'%20stroke-width='1.2'%20opacity='.55'/%3e%3cpath%20d='M2%2032h50'%20stroke='%23ff2e88'%20stroke-width='3'/%3e%3cpath%20d='M46%2025l9%207-9%207'%20stroke='%23ff2e88'%20stroke-width='3'%20stroke-linecap='square'/%3e%3crect%20x='4'%20y='29'%20width='6'%20height='6'%20fill='%23f2ff4a'/%3e%3c/svg%3e`,$k=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3c!--%20Black%20ICE%20cracked:%20the%20dark%20barrier%20from%20the%20net%20map,%20shattered%20and%20falling%20apart,%20a%20cyan%20spark%20at%20the%20break.%20--%3e%3cpath%20d='M28%204%207%2016v13l12-3%209-22Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M39%205l19%2011v12l-14%202-5-25Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M6%2039v11l20%2012%204-18-24-5Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M43%2042l16-2v10L40%2061l3-19Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M32%2021v22M21%2032h22'%20stroke='%233ff0ff'%20stroke-width='2.5'/%3e%3cpath%20d='M25%2025l14%2014M39%2025%2025%2039'%20stroke='%233ff0ff'%20stroke-width='1.4'%20opacity='.8'/%3e%3crect%20x='29'%20y='29'%20width='6'%20height='6'%20fill='%23eaf6ff'/%3e%3c/svg%3e`,eA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3c!--%20Tripped%20the%20ICE:%20the%20barrier%20closed%20and%20lit%20red,%20an%20alarm%20mark%20in%20its%20middle.%20--%3e%3cpath%20d='M32%204%2056%2018v28L32%2060%208%2046V18Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='2.5'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M32%2012%2049%2022v20L32%2052%2015%2042V22Z'%20stroke='%23ff6470'%20stroke-width='1.2'%20opacity='.5'/%3e%3cpath%20d='M32%2021v15'%20stroke='%23ff6470'%20stroke-width='5'%20stroke-linecap='square'/%3e%3crect%20x='29.5'%20y='41'%20width='5'%20height='5'%20fill='%23ff6470'/%3e%3cpath%20d='M2%2014l5%203M62%2014l-5%203M2%2050l5-3M62%2050l-5-3'%20stroke='%23ffd23f'%20stroke-width='2'/%3e%3c/svg%3e`,tA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3c!--%20Payload%20delivered:%20a%20magenta%20branch%20line%20folding%20into%20the%20cyan%20main%20line,%20carrying%20its%20packet%20home.%20--%3e%3cpath%20d='M4%2046h56'%20stroke='%233ff0ff'%20stroke-width='3'/%3e%3cpath%20d='M4%2016h14l18%2030'%20stroke='%23ff2e88'%20stroke-width='3'%20stroke-linejoin='bevel'/%3e%3crect%20x='8'%20y='40'%20width='7'%20height='12'%20fill='%2307060f'%20stroke='%233ff0ff'%20stroke-width='1.5'/%3e%3cpath%20d='M54%2036l4-4v14l-4%204Z'%20fill='%23a3125a'%20stroke='%23ff2e88'%20stroke-width='1.2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M40%2036l4-4h14l-4%204Z'%20fill='%23ff5aa3'%20stroke='%23ff2e88'%20stroke-width='1.2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M40%2036h14v14H40Z'%20fill='%23ff2e88'/%3e%3cpath%20d='M44%2043h6'%20stroke='%2312020a'%20stroke-width='2'/%3e%3ccircle%20cx='18'%20cy='16'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SIyIiBoZWlnaHQ9IjIiIGZpbGw9IiNmMmZmNGEiLz48cmVjdCB4PSIyMyIgeT0iMzkiIHdpZHRoPSIyIiBoZWlnaHQ9IjIiIGZpbGw9IiMzZmYwZmYiLz48cmVjdCB4PSI0NyIgeT0iNDUiIHdpZHRoPSIyIiBoZWlnaHQ9IjIiIGZpbGw9IiNmZjJlODgiLz48cmVjdCB4PSIxMyIgeT0iNDUiIHdpZHRoPSIyIiBoZWlnaHQ9IjIiIGZpbGw9IiMzZmYwZmYiLz4KPC9zdmc+Cg==`,rA=new URL(`shard-sheet-NpLu-BuT.svg`,import.meta.url).href,iA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%235df2a6'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%235df2a6'%20stroke-width='2.5'/%3e%3cpath%20d='M15%2047L22%2034M25%2029L29%2022L36%2034M15%2047H24M30%2047H36'%20fill='none'%20stroke='%23ffc857'%20stroke-opacity='.45'%20stroke-width='2'%20stroke-linecap='round'/%3e%3cpath%20d='M38%2048V18M30%2026L38%2017L46%2026'%20fill='none'%20stroke='%235df2a6'%20stroke-width='3.5'%20stroke-linecap='round'%20stroke-linejoin='round'%20filter='url(%23g)'/%3e%3ccircle%20cx='38'%20cy='52'%20r='2'%20fill='%235df2a6'/%3e%3c/svg%3e`,aA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%2336d6ff'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%2336d6ff'%20stroke-width='2.5'/%3e%3crect%20x='10'%20y='24'%20width='20'%20height='16'%20rx='2'%20fill='%23101b31'%20stroke='%2336d6ff'%20stroke-width='2'/%3e%3cpath%20d='M30%2028H34V36H30'%20fill='%23101b31'%20stroke='%237fe3ff'%20stroke-width='2'/%3e%3crect%20x='34'%20y='22'%20width='20'%20height='20'%20rx='10'%20fill='%23101b31'%20stroke='%2336d6ff'%20stroke-width='2'/%3e%3ccircle%20cx='44'%20cy='32'%20r='4'%20fill='%237fe3ff'%20filter='url(%23g)'/%3e%3cpath%20d='M32%2018V24M32%2040V46'%20stroke='%235df2a6'%20stroke-width='3'%20stroke-linecap='round'%20filter='url(%23g)'/%3e%3cpath%20d='M14%2032H26'%20stroke='%232a4262'%20stroke-width='2'/%3e%3c/svg%3e`,oA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%2336d6ff'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%2336d6ff'%20stroke-width='2.5'/%3e%3cellipse%20cx='32'%20cy='34'%20rx='24'%20ry='9'%20fill='none'%20stroke='%2336d6ff'%20stroke-width='1.6'%20stroke-opacity='.75'%20transform='rotate(-18%2032%2034)'/%3e%3ccircle%20cx='32'%20cy='34'%20r='11'%20fill='%23101b31'%20stroke='%237fe3ff'%20stroke-width='2'/%3e%3cpath%20d='M24%2030A11%2011%200%200%201%2040%2027'%20fill='none'%20stroke='%23a06eff'%20stroke-width='2'%20stroke-opacity='.8'/%3e%3ccircle%20cx='54'%20cy='27'%20r='3.2'%20fill='%235df2a6'%20filter='url(%23g)'/%3e%3ccircle%20cx='14'%20cy='14'%20r='1.2'%20fill='%23e6f1ff'/%3e%3ccircle%20cx='50'%20cy='12'%20r='1'%20fill='%23e6f1ff'/%3e%3ccircle%20cx='20'%20cy='52'%20r='1'%20fill='%23e6f1ff'/%3e%3c/svg%3e`,sA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%235df2a6'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%235df2a6'%20stroke-width='2.5'/%3e%3crect%20x='12'%20y='14'%20width='40'%20height='22'%20rx='1'%20fill='%23101b31'%20stroke='%232a4262'/%3e%3cpath%20d='M14%2025H22L25%2019L29%2031L33%2021L36%2025H50'%20fill='none'%20stroke='%235df2a6'%20stroke-width='2'%20stroke-linejoin='round'%20filter='url(%23g)'/%3e%3crect%20x='14'%20y='42'%20width='10'%20height='8'%20fill='%235df2a6'%20filter='url(%23g)'/%3e%3crect%20x='27'%20y='42'%20width='10'%20height='8'%20fill='%235df2a6'%20filter='url(%23g)'/%3e%3crect%20x='40'%20y='42'%20width='10'%20height='8'%20fill='%235df2a6'%20filter='url(%23g)'/%3e%3c/svg%3e`,cA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%235df2a6'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%235df2a6'%20stroke-width='2.5'/%3e%3cpath%20d='M32%2011L50%2021.5V42.5L32%2053L14%2042.5V21.5Z'%20fill='%23101b31'%20stroke='%2336d6ff'%20stroke-width='2'/%3e%3cpath%20d='M22.5%2032.5L29%2039L42%2025.5'%20fill='none'%20stroke='%235df2a6'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20filter='url(%23g)'/%3e%3c/svg%3e`,lA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='0.9'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='1.5'%20y='1.5'%20width='13'%20height='13'%20rx='1'%20fill='%230a1222'%20stroke='%232a4262'/%3e%3cpath%20d='M8%203.5L12.5%208L8%2012.5L3.5%208Z'%20fill='%2336d6ff'%20filter='url(%23g)'/%3e%3cpath%20d='M8%205.5L10.5%208L8%2010.5L5.5%208Z'%20fill='%23e6f1ff'%20fill-opacity='.8'/%3e%3c/svg%3e`,uA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%23ff7a8e'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%23ff7a8e'%20stroke-width='2.5'/%3e%3cpath%20d='M20%2022A16%2016%200%200%200%2020%2046M14%2017A23%2023%200%200%200%2014%2051M44%2022A16%2016%200%200%201%2044%2046M50%2017A23%2023%200%200%201%2050%2051'%20fill='none'%20stroke='%23ff7a8e'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-opacity='.8'/%3e%3cpath%20d='M24%2046V32A8%208%200%200%201%2040%2032V46Z'%20fill='%23e0405e'%20stroke='%23ff7a8e'%20stroke-width='2'%20filter='url(%23g)'/%3e%3cpath%20d='M28%2033A4%204%200%200%201%2032%2029'%20fill='none'%20stroke='%23e6f1ff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-opacity='.85'/%3e%3crect%20x='20'%20y='46'%20width='24'%20height='5'%20rx='1'%20fill='%232a4262'%20stroke='%23ff7a8e'%20stroke-opacity='.6'/%3e%3c/svg%3e`,dA=new URL(`sensor-sheet-Dn-dKnev.svg`,import.meta.url).href,fA=new URL(`warp-BNB4TdQ4.webp`,import.meta.url).href,pA=Object.assign({"../../themes/crate/assets/crate-loading.webp":nk,"../../themes/crate/assets/crate-lost.webp":rk,"../../themes/crate/assets/mark.svg":ik,"../../themes/crate/assets/moments/aisle.svg":ak,"../../themes/crate/assets/moments/gauge.svg":ok,"../../themes/crate/assets/moments/manifest.svg":sk,"../../themes/crate/assets/moments/merge.svg":ck,"../../themes/crate/assets/moments/signed.svg":lk,"../../themes/crate/assets/moments/splash.webp":uk,"../../themes/crate/assets/moments/split.svg":dk,"../../themes/crate/assets/moments/tote.svg":fk,"../../themes/frontier/assets/brass-plate.svg":NS,"../../themes/frontier/assets/busted-axle.svg":PS,"../../themes/frontier/assets/gauge.svg":FS,"../../themes/frontier/assets/locomotive.webp":IS,"../../themes/frontier/assets/mark.svg":LS,"../../themes/frontier/assets/moments/axle.svg":pk,"../../themes/frontier/assets/moments/blown.svg":mk,"../../themes/frontier/assets/moments/depot.webp":hk,"../../themes/frontier/assets/moments/gauge-sheet.svg":gk,"../../themes/frontier/assets/moments/paid.svg":_k,"../../themes/frontier/assets/moments/puff.svg":vk,"../../themes/frontier/assets/moments/telegram.svg":yk,"../../themes/frontier/assets/moments/watch.svg":bk,"../../themes/frontier/assets/moments/whistle.svg":xk,"../../themes/frontier/assets/rivet-rail.svg":RS,"../../themes/frontier/assets/survey-map.webp":zS,"../../themes/frontier/assets/telegraph-key.svg":BS,"../../themes/frontier/assets/wanted-poster.webp":VS,"../../themes/frontier/assets/wood.webp":HS,"../../themes/harvest/assets/crop-grown.svg":oC,"../../themes/harvest/assets/crop-harvested.svg":sC,"../../themes/harvest/assets/crop-seed.svg":cC,"../../themes/harvest/assets/crop-sprout.svg":lC,"../../themes/harvest/assets/empty-field.svg":uC,"../../themes/harvest/assets/fields.webp":dC,"../../themes/harvest/assets/mark.svg":fC,"../../themes/harvest/assets/moments/bale.svg":Sk,"../../themes/harvest/assets/moments/basket.svg":Ck,"../../themes/harvest/assets/moments/cart.svg":wk,"../../themes/harvest/assets/moments/gate.svg":Tk,"../../themes/harvest/assets/moments/moon.svg":Ek,"../../themes/harvest/assets/moments/splash.webp":Dk,"../../themes/harvest/assets/moments/sprout-sheet.svg":Ok,"../../themes/harvest/assets/moments/storm.svg":kk,"../../themes/harvest/assets/moments/sun.svg":Ak,"../../themes/harvest/assets/portrait.svg":pC,"../../themes/harvest/assets/watering-can.svg":mC,"../../themes/harvest/assets/wood-panel.svg":hC,"../../themes/harvest/assets/wood-sign.svg":gC,"../../themes/overworld/assets/chest-open.svg":wC,"../../themes/overworld/assets/chest.svg":TC,"../../themes/overworld/assets/dungeon-map.webp":EC,"../../themes/overworld/assets/empty-room.webp":DC,"../../themes/overworld/assets/gem.svg":OC,"../../themes/overworld/assets/heart-empty.svg":kC,"../../themes/overworld/assets/heart.svg":AC,"../../themes/overworld/assets/key.svg":jC,"../../themes/overworld/assets/locked-door.svg":MC,"../../themes/overworld/assets/mark.svg":NC,"../../themes/overworld/assets/moments/brazier-lit.svg":jk,"../../themes/overworld/assets/moments/brazier-out.svg":Mk,"../../themes/overworld/assets/moments/campfire.svg":Nk,"../../themes/overworld/assets/moments/chest-open.svg":Pk,"../../themes/overworld/assets/moments/door-open.svg":Fk,"../../themes/overworld/assets/moments/key-raised.svg":Ik,"../../themes/overworld/assets/moments/map-sheet.webp":Lk,"../../themes/overworld/assets/moments/step.svg":Rk,"../../themes/overworld/assets/moments/title.webp":zk,"../../themes/overworld/assets/overworld.webp":PC,"../../themes/overworld/assets/sage-cave.webp":FC,"../../themes/overworld/assets/sage.webp":IC,"../../themes/overworld/assets/stone-wall.svg":LC,"../../themes/plain/assets/mark-dark.svg":Bk,"../../themes/plain/assets/mark-light.svg":Vk,"../../themes/realm/assets/broken-road.svg":GC,"../../themes/realm/assets/capital.svg":KC,"../../themes/realm/assets/d20.svg":qC,"../../themes/realm/assets/dungeon-map.webp":JC,"../../themes/realm/assets/iron-band.svg":YC,"../../themes/realm/assets/ledger.svg":XC,"../../themes/realm/assets/mark.svg":ZC,"../../themes/realm/assets/moments/broken-blade.svg":Hk,"../../themes/realm/assets/moments/campfire.svg":Uk,"../../themes/realm/assets/moments/candle.svg":Wk,"../../themes/realm/assets/moments/ledger-quill.svg":Gk,"../../themes/realm/assets/moments/open-road.svg":Kk,"../../themes/realm/assets/moments/scroll.svg":qk,"../../themes/realm/assets/moments/tray.webp":Jk,"../../themes/realm/assets/rest.svg":QC,"../../themes/realm/assets/rule.svg":$C,"../../themes/realm/assets/vellum.webp":ew,"../../themes/realm/assets/war-map.webp":tw,"../../themes/realm/assets/wax-seal.svg":nw,"../../themes/sprawl/assets/black-ice.svg":Jw,"../../themes/sprawl/assets/dead-drop.webp":Yw,"../../themes/sprawl/assets/jack-in.webp":Xw,"../../themes/sprawl/assets/mark.svg":Zw,"../../themes/sprawl/assets/moments/boot-sheet.webp":Yk,"../../themes/sprawl/assets/moments/cipher-block.svg":Xk,"../../themes/sprawl/assets/moments/gig-closed.svg":Zk,"../../themes/sprawl/assets/moments/ice-breached.svg":Qk,"../../themes/sprawl/assets/moments/ice-cracked.svg":$k,"../../themes/sprawl/assets/moments/ice-tripped.svg":eA,"../../themes/sprawl/assets/moments/payload.svg":tA,"../../themes/sprawl/assets/moments/run-over.svg":nA,"../../themes/sprawl/assets/moments/shard-sheet.svg":rA,"../../themes/sprawl/assets/net-map.svg":Qw,"../../themes/sprawl/assets/netrunner.svg":$w,"../../themes/sprawl/assets/skyline.webp":eT,"../../themes/starship/assets/computer.svg":aT,"../../themes/starship/assets/empty-sector.webp":oT,"../../themes/starship/assets/lightspeed.svg":sT,"../../themes/starship/assets/mark.svg":cT,"../../themes/starship/assets/moments/all-clear.svg":iA,"../../themes/starship/assets/moments/docking.svg":aA,"../../themes/starship/assets/moments/mission.svg":oA,"../../themes/starship/assets/moments/nominal.svg":sA,"../../themes/starship/assets/moments/objective.svg":cA,"../../themes/starship/assets/moments/pip.svg":lA,"../../themes/starship/assets/moments/red-alert.svg":uA,"../../themes/starship/assets/moments/sensor-sheet.svg":dA,"../../themes/starship/assets/moments/warp.webp":fA,"../../themes/starship/assets/nebula.webp":lT,"../../themes/starship/assets/star-chart.svg":uT,"../../themes/starship/assets/starfield.svg":dT});function mA(e,t){let n=t?e.assets[t]:void 0;return n?pA[`../../themes/${e.name}/${n}`]??null:null}var hA={fade:()=>[{opacity:0},{opacity:1}],rise:e=>[{opacity:0,transform:`translateY(${14*e}px)`},{opacity:1,transform:`translateY(0)`}],drop:e=>[{opacity:0,transform:`translateY(${-20*e}px)`},{opacity:1,transform:`translateY(${3*e}px)`,offset:.7},{opacity:1,transform:`translateY(0)`}],pop:e=>[{opacity:0,transform:`scale(${1-.25*e})`},{opacity:1,transform:`scale(${1+.05*e})`,offset:.65},{opacity:1,transform:`scale(1)`}],slide:e=>[{opacity:0,transform:`translateX(${-28*e}px)`},{opacity:1,transform:`translateX(0)`}],stamp:e=>[{opacity:0,transform:`scale(${1+.7*e}) rotate(${-10*e}deg)`},{opacity:1,transform:`scale(${1-.06*e}) rotate(${-1*e}deg)`,offset:.6},{opacity:1,transform:`scale(1) rotate(0deg)`}],sweep:e=>[{opacity:0,transform:`translateX(${44*e}px) skewX(${-8*e}deg)`},{opacity:1,transform:`translateX(0) skewX(0deg)`}],grow:e=>[{opacity:0,transform:`scaleY(${1-.7*e})`},{opacity:1,transform:`scaleY(1)`}]};function gA(e,t){return e===`off`?null:e===`full`?{s:1,ms:t}:{s:.35,ms:Math.round(t*.6)}}function _A(e,t,n,r=320){let i=gA(n,r);return!e||!t||!i||typeof e.animate!=`function`?null:e.animate(hA[t](i.s),{duration:i.ms,easing:`cubic-bezier(0.2, 0.8, 0.2, 1)`,fill:`backwards`})}function vA(e,t,n=200){let r=gA(t,n);return!e||!r||typeof e.animate!=`function`?null:e.animate([{opacity:1,transform:`translateY(0)`},{opacity:0,transform:`translateY(${-6*r.s}px)`}],{duration:r.ms,easing:`ease-in`,fill:`forwards`})}var yA=[`item-done`,`build-passed`,`build-failed`,`blocker-cleared`,`pr-merged`,`sprint-ended`],bA={"item-done":`Done`,"build-passed":`Build passed`,"build-failed":`Build failed`,"blocker-cleared":`Blocker cleared`,"pr-merged":`Merged`,"sprint-ended":`Sprint ended`},xA=e=>e?.tips?.label??`Tip`,SA=6e3,CA=3e3,wA=1800,TA=5e3,EA=e=>e.moments??{};function DA(e=300){let[t,n]=(0,v.useState)(e<=0);return(0,v.useEffect)(()=>{if(e<=0)return;let t=setTimeout(()=>n(!0),e);return()=>clearTimeout(t)},[e]),t}function OA(){let[e,t]=(0,v.useState)(()=>typeof document<`u`&&document.hidden);return(0,v.useEffect)(()=>{let e=()=>{t(document.hidden),document.hidden?document.documentElement.dataset.pageHidden=``:delete document.documentElement.dataset.pageHidden;for(let e of document.getAnimations?.()??[])(e.effect?.target)?.closest?.(`[data-moments]`)&&(document.hidden?e.pause():e.playState===`paused`&&e.play())};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e}function kA(e,t,n=!0){let r=OA(),i=(0,v.useRef)(t);i.current=t,(0,v.useEffect)(()=>{if(!n||r)return;let t=setInterval(()=>i.current(),e);return()=>clearInterval(t)},[e,n,r])}function AA({theme:e,art:t,className:n,loop:r,face:i=null}){let a=mA(e,t.art);if(!a)return null;let o=`frames`in t?t.frames:1;return o>1?(0,q.jsxs)(`span`,{className:`m-art m-sheet ${n??``}`,style:{width:t.width,height:t.height,"--m-frames":o},"aria-hidden":`true`,children:[(0,q.jsx)(`img`,{className:r===`frames`?`m-loop--frames`:void 0,src:a,alt:``,width:t.width*o,height:t.height,decoding:`async`}),i!==null&&(0,q.jsx)(`span`,{className:`m-face`,children:i})]}):r||i!==null?(0,q.jsxs)(`span`,{className:`m-art m-hold ${n??``}`,"aria-hidden":`true`,children:[(0,q.jsx)(`img`,{className:r?`m-loop--${r}`:void 0,src:a,alt:``,width:t.width,height:t.height,decoding:`async`}),i!==null&&(0,q.jsx)(`span`,{className:`m-face`,children:i})]}):(0,q.jsx)(`img`,{className:`m-art ${n??``}`,src:a,alt:``,width:t.width,height:t.height,decoding:`async`,"aria-hidden":`true`})}function jA({tip:e,label:t}){let n=cw[e.topic];return(0,q.jsxs)(`p`,{className:`loader-tip`,"data-tip":e.id,children:[(0,q.jsx)(`span`,{className:`loader-tip__label`,children:t}),` `,(0,q.jsx)(`span`,{className:`loader-tip__text`,children:e.text}),` `,(0,q.jsxs)(`a`,{href:lw(n),target:`_blank`,rel:`noopener noreferrer`,"data-tip-more":``,children:[`Read more`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` about `,n.title,` in the docs (opens in a new tab)`]})]})]})}function MA(e){let[t,n]=(0,v.useState)(()=>e?YO():null);return(0,v.useEffect)(()=>{e&&!t&&n(YO())},[e,t]),kA(SA,()=>n(YO()),e),e?t:null}function NA(e){let[t,n]=(0,v.useState)(0);return kA(CA,()=>n(e=>e+1),!!(e&&e.length>1)),e&&e.length?e[t%e.length]:null}function PA({message:e,detail:t=null,size:n=`view`,live:r=!0,immediate:i=!1}){let a=DA(i?0:300),o=qS(),s=ZS(),c=Lm(),{Loading:l}=xT(),[u]=tk(),d=EA(o),f=NA(QS(o,s)?d.loader?.flavour:void 0),p=MA(u&&n===`view`&&a),m=t?`${e} ${t}`:e;return a?n===`inline`?(0,q.jsxs)(`div`,{className:`loader loader--inline`,"data-moments":``,"data-level":c,"data-loading":``,children:[d.loader&&(0,q.jsx)(FA,{theme:o,m:d}),(0,q.jsx)(`p`,{className:`note`,...r?{role:`status`}:{},children:m})]}):d.loader?(0,q.jsxs)(`div`,{className:`loader loader--${n} loader--themed`,"data-moments":``,"data-level":c,"data-loader":o.name,"data-loading":``,children:[(0,q.jsxs)(`div`,{className:`loader__stage`,"aria-hidden":`true`,children:[(0,q.jsx)(AA,{theme:o,art:d.loader.art,className:`loader__art`,loop:d.loader.loop}),(0,q.jsx)(FA,{theme:o,m:d})]}),(0,q.jsx)(`p`,{className:`loader__progress`,...r?{role:`status`}:{},children:m}),f&&n===`view`&&(0,q.jsx)(`p`,{className:`loader__flavour`,"aria-hidden":`true`,children:f}),p&&(0,q.jsx)(jA,{tip:p,label:xA(d)})]}):(0,q.jsxs)(`div`,{className:`loader loader--${n} loader--skin`,"data-moments":``,"data-level":c,"data-loading":``,children:[(0,q.jsx)(l,{message:m}),p&&(0,q.jsx)(jA,{tip:p,label:xA(d)})]}):(0,q.jsx)(`div`,{className:`loader loader--${n} loader--pending`,"aria-hidden":`true`,"data-loading":``})}function FA({theme:e,m:t}){let n=t.loader?.track,r=n?mA(e,n.art):null;return!n||!r?null:(0,q.jsx)(`span`,{className:`loader__track m-track--${n.motif}`,"aria-hidden":`true`,style:{"--m-count":n.count},children:Array.from({length:n.count},(e,t)=>(0,q.jsx)(`img`,{src:r,alt:``,width:n.size,height:n.size,style:{"--m-i":t}},t))})}function IA(e,t){if(!e.face||!t)return null;let n=e.face.value===`sprint-day`?t.day:t.done;return String(Math.min(e.face.max??1/0,n))}var LA=e=>e?{"data-sprint-day":e.day,"data-sprint-days":e.days,"data-items-done":e.done,"data-dossier":e.dossier}:{},RA=!1;function zA({ready:e,detail:t=null,data:n=null,preview:r=!1,onDone:i}){let a=qS(),o=Lm(),s=EA(a),[c]=(0,v.useState)(()=>{if(r)return!0;let e=RA;return RA=!0,!e}),l=DA(r?0:300),[u,d]=(0,v.useState)(!1),f=(0,v.useRef)(null),[p]=tk(),m=c&&!u&&!!s.splash&&o!==`off`&&(r||!e),h=MA(p&&l&&m),g=(0,v.useCallback)(()=>{d(!0),i?.()},[i]);return(0,v.useEffect)(()=>{if(!m||r)return;let e=setTimeout(g,wA);return()=>clearTimeout(e)},[m,r,g]),(0,v.useEffect)(()=>{if(!m)return;let e=()=>g();return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[m,g]),(0,v.useLayoutEffect)(()=>{m&&l&&_A(f.current?.querySelector(`.splash__art`)??null,s.splash?.motif,o,520)},[m,l,s.splash?.motif,o]),!m||!l||!s.splash?null:(0,q.jsx)(`div`,{className:`splash`,"data-moments":``,"data-level":o,"data-splash":a.name,...LA(n),ref:f,onPointerDown:g,children:(0,q.jsxs)(`div`,{className:`splash__inner`,children:[(0,q.jsx)(AA,{theme:a,art:s.splash.art,className:`splash__art`,loop:o===`full`?s.splash.loop:void 0,face:IA(s.splash,n)}),(0,q.jsxs)(`p`,{className:`splash__name`,"aria-hidden":`true`,children:[(0,q.jsx)(`span`,{className:`wordmark`,children:`toil`}),` `,(0,q.jsx)(`span`,{className:`splash__ui`,children:`UI`})]}),(0,q.jsx)(`p`,{className:`splash__line`,"aria-hidden":`true`,children:s.splash.line}),(0,q.jsx)(`p`,{className:`splash__progress`,role:`status`,children:r?`Preview of the launch splash. Press any key or click to close it.`:`Starting Toil UI. ${t??`Reading the dossiers…`}`}),h&&(0,q.jsx)(jA,{tip:h,label:xA(s)})]})})}function BA(e,t,n,{onMount:r=!0,ms:i=320}={}){let a=Lm(),o=(0,v.useRef)(!0);(0,v.useLayoutEffect)(()=>{let n=o.current;o.current=!1,(!n||r)&&_A(e.current,t,a,i)},[n])}var VA=(0,v.createContext)({play:()=>void 0}),HA=()=>(0,v.useContext)(VA);function UA({children:e}){let[t,n]=(0,v.useState)([]),r=(0,v.useRef)(0),i=Lm(),a=OA(),o=(0,v.useRef)(i);o.current=i;let s=(0,v.useCallback)(e=>{o.current!==`off`&&e.length&&n(t=>[...t,...e.map(e=>({id:r.current++,moment:e}))].slice(0,6))},[]),c=(0,v.useMemo)(()=>({play:s}),[s]),l=!a&&i!==`off`?t[0]:void 0,u=(0,v.useCallback)(()=>n(e=>e.slice(1)),[]);return(0,v.useEffect)(()=>{i===`off`&&n([])},[i]),(0,q.jsxs)(VA,{value:c,children:[e,l&&(0,q.jsx)(WA,{moment:l.moment,level:i,onDone:u},l.id)]})}function WA({moment:e,level:t,onDone:n}){let r=qS(),i=ZS(),a=EA(r),o=a.events?.[e.kind],s=(0,v.useRef)(null),c=e.kind===`sprint-ended`,l=bA[e.kind],u=QS(r,i)?c?a.recap?.label??o?.label:o?.label:void 0;return(0,v.useLayoutEffect)(()=>{if(!o){n();return}let e=c?360:300,r=c?240:200,i=c?TA:900-e-r;_A(s.current,o.motif,t,e),_A(s.current?.querySelector(`.moment__art`)??null,o.motif===`stamp`?`stamp`:`pop`,t,e+80);let a=null,l=setTimeout(()=>{a=vA(s.current,t,r),a?a.onfinish=n:n()},e+i);return()=>{clearTimeout(l),a?.cancel()}},[]),o?(0,q.jsxs)(`div`,{className:`moment moment--${e.kind}${c?` moment--recap`:``}`,ref:s,"data-moments":``,"data-moment":e.kind,"data-level":t,"aria-hidden":`true`,children:[(0,q.jsx)(AA,{theme:r,art:o,className:`moment__art`}),(0,q.jsxs)(`div`,{className:`moment__words`,children:[(0,q.jsxs)(`p`,{className:`moment__label`,children:[(0,q.jsx)(`strong`,{children:u&&u.toLowerCase()!==l.toLowerCase()?`${u} (${l})`:l}),e.count>1?(0,q.jsxs)(`span`,{className:`moment__count`,children:[` ×`,e.count]}):null]}),(0,q.jsx)(`p`,{className:`moment__text`,children:e.text}),c&&e.figures&&(0,q.jsx)(`ul`,{className:`moment__figures`,children:e.figures.map(e=>(0,q.jsx)(`li`,{children:e},e))})]})]}):null}var GA=new EventTarget;function KA(e){GA.dispatchEvent(new CustomEvent(`command`,{detail:e}))}function qA(e){let t=(0,v.useRef)(e);(0,v.useEffect)(()=>{t.current=e}),(0,v.useEffect)(()=>{let e=e=>t.current(e.detail);return GA.addEventListener(`command`,e),()=>GA.removeEventListener(`command`,e)},[])}var JA=()=>typeof crypto<`u`&&`randomUUID`in crypto?crypto.randomUUID():`chat-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,YA=6e4,XA=e=>String(Math.max(1,Math.round(e/1e3))),ZA=e=>e.parts.map(e=>e.text).join(`
32
+ `),DO=e=>e.statusCategory!==`DONE`;function OO(e,t){let n=new Map(e.map(e=>[e.id,e])),r=[];for(let t of e){if(!DO(t))continue;let e=t.links.filter(e=>e.type===`blocks`&&e.direction===`inward`&&n.has(e.target)&&DO(n.get(e.target))).map(e=>e.target);e.length&&r.push({id:t.id,by:[...new Set(e)].sort()})}let i={};for(let t of e)t.estimate?.unit===`points`&&(i[t.id]=t.estimate.value);let a=tg([...e],[],t);return{blocked:r.sort((e,t)=>e.id.localeCompare(t.id)),points:i,sprint:a?{name:a.sprint.name,done:a.done.points,remaining:a.remaining.points}:null}}function kO(e,t){let n=TO(EO(e.parts));return{id:t.id,dossier:t.dossier,startedAt:t.startedAt,at:t.at,adapter:e.adapter??null,model:e.model??null,by:e.by,usage:e.usage??null,recommendation:n?.recommendation??null,issues:n?.issues??[],parts:e.parts,citations:e.citations.length?e.citations:VT(e.parts),unverified:e.unverified??[],warnings:e.warnings??[],proposals:e.proposals,snapshot:t.snapshot}}var AO=e=>!e.newlyBlocked.length&&!e.cleared.length&&!e.points.length&&!e.sprint&&!e.cited.length&&!e.dropped.length&&!e.recommendationChanged;function jO(e,t){if(!e)return{previous:null,newlyBlocked:[],cleared:[],points:[],sprint:null,cited:[],dropped:[],recommendationChanged:!1};let n=new Map(e.snapshot.blocked.map(e=>[e.id,new Set(e.by)])),r=new Set(t.snapshot.blocked.map(e=>e.id)),i=t.snapshot.blocked.filter(e=>!n.has(e.id)||e.by.some(t=>!n.get(e.id).has(t))),a=e.snapshot.blocked.filter(e=>!r.has(e.id)).map(e=>e.id),o=[...new Set([...Object.keys(e.snapshot.points),...Object.keys(t.snapshot.points)])].sort().flatMap(n=>{let r=e.snapshot.points[n]??null,i=t.snapshot.points[n]??null;return r===i?[]:[{id:n,from:r,to:i}]}),s=e.snapshot.sprint,c=t.snapshot.sprint,l=s?.name!==c?.name||s?.done!==c?.done||s?.remaining!==c?.remaining,u=t.citations.filter(t=>!e.citations.includes(t)),d=e.citations.filter(e=>!t.citations.includes(e)),f=(e.recommendation??``)!==(t.recommendation??``);return{previous:{id:e.id,at:e.at},newlyBlocked:i,cleared:a,points:o,sprint:l?{from:s,to:c}:null,cited:u,dropped:d,recommendationChanged:f}}function MO(e){let t=[...e].sort((e,t)=>e.at.localeCompare(t.at)||e.id.localeCompare(t.id));return t.map((e,n)=>({id:e.id,at:e.at,adapter:e.adapter,model:e.model,by:e.by,recommendation:e.recommendation,issues:e.issues,citations:e.citations,unverified:e.unverified.length,changes:jO(t[n-1]??null,e)})).reverse()}function NO(e,t){let n=[...e].sort((e,t)=>e.at.localeCompare(t.at)||e.id.localeCompare(t.id)),r=n.findIndex(e=>e.id===t);return r<0?null:{record:n[r],changes:jO(n[r-1]??null,n[r])}}function PO(e){if(e.adapter===`scripted`||e.by===`scripted`)return`the scripted preview, not a model`;let t=e.adapter?FO[e.adapter]??e.adapter:e.by;return e.model?`${t} (${e.model})`:e.adapter?`${t}, its CLI's default model`:t}var FO={claude:`Claude`,copilot:`GitHub Copilot`,codex:`Codex`};function IO({parts:e,open:t=!1,level:n=4,done:r=!0}){let i=n===3?`h3`:`h4`,a=TO(EO(e));return a?(0,q.jsxs)(`div`,{className:`analysis-body`,children:[(0,q.jsxs)(`section`,{className:`analysis-rec`,"aria-label":`Recommendation`,children:[(0,q.jsx)(i,{className:`analysis-label`,children:`Recommendation`}),(0,q.jsx)(`p`,{className:`analysis-rec__text`,children:(0,q.jsx)(GT,{text:a.recommendation,chips:!0})})]}),(0,q.jsxs)(`section`,{className:`analysis-issues`,"aria-label":`Issues`,children:[(0,q.jsx)(i,{className:`analysis-label`,children:`Issues`}),a.issues.length?(0,q.jsx)(`ol`,{className:`analysis-issues__list`,children:a.issues.map((e,t)=>(0,q.jsxs)(`li`,{children:[e.title&&(0,q.jsxs)(`strong`,{className:`analysis-issue__title`,children:[e.title,`: `]}),(0,q.jsx)(GT,{text:e.text,chips:!0})]},t))}):(0,q.jsx)(`p`,{className:`note`,children:`None stands out.`}),a.extraIssues>0&&(0,q.jsxs)(`p`,{className:`note`,children:[`The agent named `,a.extraIssues,` more `,a.extraIssues===1?`issue`:`issues`,` than the three asked for; `,a.extraIssues===1?`it is`:`they are`,` at the end of the evidence.`]})]}),a.evidence.length>0&&(0,q.jsxs)(`details`,{className:`analysis-evidence`,open:t,children:[(0,q.jsxs)(`summary`,{children:[`Evidence `,(0,q.jsxs)(`span`,{className:`note`,children:[`(`,a.evidence.length,` `,a.evidence.length===1?`paragraph`:`paragraphs`,`)`]})]}),a.evidence.map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(GT,{text:e,chips:!0})},t))]})]}):(0,q.jsxs)(q.Fragment,{children:[r&&(0,q.jsx)(`p`,{className:`note analysis-unshaped`,children:`This answer didn't start with a Recommendation line, so it is shown as it came.`}),e.map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(GT,{text:e.text,chips:!0})},t))]})}var LO=e=>e===null?`no estimate`:`${e} ${e===1?`point`:`points`}`;function RO(e){return e.previous?AO(e)?`Nothing changed since the one before: the same blockers, points and citations.`:`Since the one before: ${[e.newlyBlocked.length?`${e.newlyBlocked.length} newly blocked`:``,e.cleared.length?`${e.cleared.length} cleared`:``,e.points.length?`points moved on ${e.points.length} ${e.points.length===1?`item`:`items`}`:``,e.sprint?`sprint points moved`:``,e.cited.length?`${e.cited.length} newly cited`:``,e.dropped.length?`${e.dropped.length} dropped`:``,e.recommendationChanged?`a new recommendation`:``].filter(Boolean).join(`, `)}.`:`The first analysis kept, so there is nothing to compare it with.`}function zO({ids:e}){return(0,q.jsx)(`ul`,{className:`ticket-chips`,children:e.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(JT,{id:e,detail:!0})},e))})}function BO({changes:e}){if(!e.previous||AO(e))return(0,q.jsx)(`p`,{className:`note`,children:RO(e)});let t=e=>e?`${e.name}: ${e.done} done, ${e.remaining} left`:`no sprint running`;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`note analysis-changes__since`,children:[`Compared with the analysis of `,Y(e.previous.at),`, by the dossier's items then and now.`]}),(0,q.jsxs)(`dl`,{className:`analysis-changes`,children:[e.newlyBlocked.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Newly blocked`}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(`ul`,{className:`rows`,children:e.newlyBlocked.map(e=>(0,q.jsxs)(`li`,{className:`analysis-changes__row`,children:[(0,q.jsx)(JT,{id:e.id,detail:!0}),` `,(0,q.jsx)(`span`,{className:`note`,children:`by`}),` `,(0,q.jsx)(zO,{ids:e.by})]},e.id))})})]}),e.cleared.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Cleared`}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(zO,{ids:e.cleared})})]}),e.points.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Points moved`}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(`ul`,{className:`rows`,children:e.points.map(e=>(0,q.jsxs)(`li`,{className:`analysis-changes__row`,children:[(0,q.jsx)(JT,{id:e.id,detail:!0}),` `,(0,q.jsxs)(`span`,{children:[LO(e.from),` to `,LO(e.to)]})]},e.id))})})]}),e.sprint&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`The sprint`}),(0,q.jsxs)(`dd`,{children:[t(e.sprint.from),`, then `,t(e.sprint.to),`.`]})]}),e.cited.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Newly cited`}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(zO,{ids:e.cited})})]}),e.dropped.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`No longer cited`}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(zO,{ids:e.dropped})})]}),e.recommendationChanged&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Recommendation`}),(0,q.jsx)(`dd`,{children:`A different one from the analysis before.`})]})]})]})}var VO=[{id:`board-m`,text:`Press M on a focused board card to open its menu: propose a move, or assign it to an agent.`,topic:`assignments`},{id:`board-drag`,text:`Drag a board card to another column to propose the move. Nothing changes in the tracker until you run the command it shows.`,topic:`board`},{id:`onboard`,text:`Joining a repository that already has a dossier? toil dossiers onboard sets up the connections it needs.`,topic:`repo-setup`},{id:`analyses`,text:`Every Analyze is kept in the dossier's Analyses tab, with what changed since the one before.`,topic:`analyses`},{id:`notify`,text:`Notifications come only when an agent changes state. Pick which states, quiet hours and only your own under Settings, General.`,topic:`notifications`},{id:`write-gate`,text:`Toil UI only reads. A change goes through toil's write gate: writes on for the connection, and --allow-write on the call.`,topic:`proposal`},{id:`theme-depth`,text:`Themed wording and Themed agent voice, under Settings, General, set how far a theme goes. Buttons, ids and errors never change.`,topic:`themed-wording`},{id:`theme-motion`,text:`Theme motion, under Settings, General, plays a theme's moments in full, subtly, or not at all.`,topic:`theme-motion`},{id:`audit`,text:`Every call Toil UI makes is in toil's audit log as toil-ui. Settings, Usage sums it up.`,topic:`audit`},{id:`sync`,text:`After the first sync, a sync asks Jira, Azure DevOps and GitHub issues only for what changed since the last good one.`,topic:`sync`},{id:`last-good`,text:`A source that fails to sync keeps its last good copy, marked stale, and the Sync panel shows toil's message and fix.`,topic:`sync`},{id:`standup`,text:`The stand-up, under the Worklog tab, folds the worklog's days into done, in progress and blocked, by code alone.`,topic:`standup`},{id:`readiness`,text:`The Board's Readiness view says which items are ready to start, worked out from the cache with no model call.`,topic:`readiness`},{id:`wipe`,text:`toil-ui wipe deletes everything Toil UI synced to this machine. Your trackers are never touched.`,topic:`sync`},{id:`palette`,text:`Ctrl+K (Cmd+K on a Mac) opens the command palette: jump to a dossier, a tab, an item or a setting, or run Sync, Analyze and Ask.`,topic:`palette`},{id:`help`,text:`Help in the header opens the docs section for the view in front of you, and every (i) has a Read more link.`,topic:`dossiers`}],HO=`toil-ui.tips.order`,UO=`toil-ui.tips.seen`,WO={get(e){try{return sessionStorage.getItem(e)}catch{return null}},set(e,t){try{sessionStorage.setItem(e,t)}catch{}}};function GO(e,t=Math.random){let n=[...e];for(let e=n.length-1;e>0;e--){let r=Math.floor(t()*(e+1));[n[e],n[r]]=[n[r],n[e]]}return n}function KO(e,t,n=VO){let r=e.filter(e=>n.some(t=>t.id===e)),i=[...r,...n.map(e=>e.id).filter(e=>!r.includes(e))],a=t.filter(e=>i.includes(e)),o=a.length>=i.length?[]:a,s=i.find(e=>!o.includes(e));return{tip:n.find(e=>e.id===s),seen:[...o,s]}}function qO(){try{let e=JSON.parse(WO.get(HO)??`null`);if(Array.isArray(e)&&e.every(e=>typeof e==`string`))return e}catch{}let e=GO(VO.map(e=>e.id));return WO.set(HO,JSON.stringify(e)),e}var JO=null;function YO(){if(JO)return JO;try{let e=JSON.parse(WO.get(UO)??`[]`);JO=Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{JO=[]}return JO}function XO(){let{tip:e,seen:t}=KO(qO(),YO());return JO=t,WO.set(UO,JSON.stringify(t)),e}var ZO=`toil-ui.tips`,QO=new Set,$O=null;function ek(){try{return localStorage.getItem(ZO)!==`off`}catch{return!0}}function tk(e){$O=e;try{localStorage.setItem(ZO,e?`on`:`off`)}catch{}for(let e of QO)e()}function nk(){return[(0,v.useSyncExternalStore)(e=>(QO.add(e),()=>QO.delete(e)),()=>$O??=ek(),()=>!0),tk]}var rk=new URL(`crate-loading-B9H4D652.webp`,import.meta.url).href,ik=new URL(`crate-lost-Dk5CaIuV.webp`,import.meta.url).href,ak=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+Cjw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cm9rZS13aWR0aD0iLjkiLz4KPHBhdGggZD0iTTM2IDE3LjV2NC41YTIuNSAyLjUgMCAwIDAgMi41IDIuNUg0M1oiIGZpbGw9IiM0ZjdiYTIiLz4KPHBhdGggZD0ibTI0LjUgMjcuNSA1IDQuMy01IDQuMyIgc3Ryb2tlPSIjMGUxNDE5IiBzdHJva2Utd2lkdGg9IjMuNiIgc3Ryb2tlLWxpbmVqb2luPSJtaXRlciIgc3Ryb2tlLWxpbmVjYXA9InNxdWFyZSIvPgo8cGF0aCBkPSJNMzEuOCA0MGg2LjIiIHN0cm9rZT0iIzBlMTQxOSIgc3Ryb2tlLXdpZHRoPSIzLjYiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiLz4KPHBhdGggZD0iTTI4LjQgMzEuOEgzMU0zNC45IDM4VjQyIiBzdHJva2U9IiNlMGVhZjUiIHN0cm9rZS13aWR0aD0iMSIvPgo8L2c+CjxnIGNsaXAtcGF0aD0idXJsKCNiNGMpIj4KPHJlY3QgeD0iMCIgeT0iNDYuNSIgd2lkdGg9IjY0IiBoZWlnaHQ9IjciIGZpbGw9InVybCgjYjRoKSIgb3BhY2l0eT0iLjkyIi8+CjxyZWN0IHg9IjAiIHk9IjQ2LjUiIHdpZHRoPSI2NCIgaGVpZ2h0PSI3IiBmaWxsPSIjZmZmIiBvcGFjaXR5PSIuMTIiLz4KPHBhdGggZD0iTTAgNDYuNUg2NE0wIDUzLjVINjQiIHN0cm9rZT0iIzE1MWUyNiIgc3Ryb2tlLXdpZHRoPSIuNiIgb3BhY2l0eT0iLjYiLz4KPC9nPgo8L3N2Zz4K`,ok=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3cpath%20d='M6%2010v46M58%2010v46'%20stroke='%23e8eaed'%20stroke-width='2.5'%20stroke-dasharray='4%205'/%3e%3crect%20x='30'%20y='34'%20width='26'%20height='6'%20rx='1.5'%20fill='%235197cc'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3crect%20x='30'%20y='42'%20width='26'%20height='6'%20rx='1.5'%20fill='%235197cc'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3cpath%20d='M34%2040v2M43%2040v2M52%2040v2'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3cpath%20d='M12%2022h28'%20stroke='%23c2e0ff'%20stroke-width='4'/%3e%3cpath%20d='M34%2015l8%207%20-8%207'%20stroke='%23c2e0ff'%20stroke-width='4'/%3e%3cpath%20d='M12%2022h0'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3c/svg%3e`,sk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3cpath%20d='M8%2044a24%2024%200%200%201%2048%200'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3cpath%20d='M12%2044a20%2020%200%200%201%208%20-16'%20stroke='%238cc4ff'%20stroke-width='6'/%3e%3cpath%20d='M22%2026a20%2020%200%200%201%2032%2018'%20stroke='%23c2e0ff'%20stroke-width='6'/%3e%3cpath%20d='M32%2044L46%2028'%20stroke='%23e8eaed'%20stroke-width='3.5'/%3e%3ccircle%20cx='32'%20cy='44'%20r='5'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3crect%20x='14'%20y='50'%20width='36'%20height='6'%20rx='3'%20fill='%235197cc'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3c/svg%3e`,ck=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3crect%20x='12'%20y='8'%20width='40'%20height='50'%20rx='4'%20fill='%235197cc'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3crect%20x='17'%20y='14'%20width='30'%20height='40'%20rx='1.5'%20fill='%23e8eaed'/%3e%3crect%20x='24'%20y='5'%20width='16'%20height='7'%20rx='2'%20fill='%23c2e0ff'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3cpath%20d='M21%2022h4M28%2022h14M21%2029h4M28%2029h14M21%2036h4M28%2036h10'%20stroke='%23355f81'%20stroke-width='2.5'/%3e%3cpath%20d='M21%2046c3%20-4%205%203%208%20-1s4%202%207%20-1'%20stroke='%238cc4ff'%20stroke-width='2.5'/%3e%3c/svg%3e`,lk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3crect%20x='38'%20y='10'%20width='20'%20height='44'%20rx='3'%20fill='%235197cc'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3cpath%20d='M42%2016h12M42%2022h12M42%2028h12M42%2034h12M42%2040h12M42%2046h12'%20stroke='%23355f81'%20stroke-width='2'/%3e%3cpath%20d='M8%2014c0%2014%2012%2018%2022%2018M8%2050c0%20-14%2012%20-18%2022%20-18'%20stroke='%23c2e0ff'%20stroke-width='4'/%3e%3cpath%20d='M26%2026l8%206%20-8%206'%20stroke='%238cc4ff'%20stroke-width='4'/%3e%3ccircle%20cx='8'%20cy='12'%20r='4'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3ccircle%20cx='8'%20cy='52'%20r='4'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2'/%3e%3c/svg%3e`,uk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3crect%20x='8'%20y='14'%20width='40'%20height='40'%20rx='3'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3crect%20x='12'%20y='18'%20width='32'%20height='32'%20rx='1.5'%20fill='%235197cc'/%3e%3cpath%20d='M13%2019L43%2049M43%2019L13%2049'%20stroke='%2373b9f5'%20stroke-width='3'/%3e%3ccircle%20cx='44'%20cy='20'%20r='13'%20fill='%23c2e0ff'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3cpath%20d='M37.5%2020.5l4.5%204.5%208.5%20-9'%20stroke='%230f1115'%20stroke-width='3.5'/%3e%3c/svg%3e`,dk=new URL(`splash-Dgll39Db.webp`,import.meta.url).href,fk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3crect%20x='6'%20y='18'%20width='38'%20height='38'%20rx='3'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3crect%20x='10'%20y='22'%20width='30'%20height='30'%20rx='1.5'%20fill='%235197cc'/%3e%3cpath%20d='M11%2023L39%2051M39%2023L11%2051'%20stroke='%2373b9f5'%20stroke-width='3'/%3e%3cpath%20d='M14%2018l6%2012%20-5%208%207%209%20-3%209'%20stroke='%230f1115'%20stroke-width='3'/%3e%3cpath%20d='M45%206L60%2032H30Z'%20fill='%23ff8a80'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3cpath%20d='M45%2014v9'%20stroke='%230f1115'%20stroke-width='3.5'/%3e%3ccircle%20cx='45'%20cy='27.5'%20r='2'%20fill='%230f1115'/%3e%3c/svg%3e`,pk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3crect%20x='4'%20y='4'%20width='56'%20height='56'%20rx='3'%20fill='%2373b9f5'%20stroke='%23e8eaed'%20stroke-width='2.5'/%3e%3crect%20x='8'%20y='8'%20width='48'%20height='48'%20rx='1.5'%20fill='%235197cc'/%3e%3cpath%20d='M9%209L55%2055M55%209L9%2055'%20stroke='%2373b9f5'%20stroke-width='3'/%3e%3crect%20x='4'%20y='29.0'%20width='56'%20height='6'%20fill='%23c2e0ff'/%3e%3cpath%20d='M5%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M11%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M17%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M23%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M29%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M35%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M41%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M47%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3cpath%20d='M53%2035.0l4%20-6'%20stroke='%230f1115'%20stroke-width='2'/%3e%3c/svg%3e`,mk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cpath%20d='M13%2047h38'%20stroke='%23b89b6c'%20stroke-width='2'%20stroke-linecap='round'/%3e%3cpath%20d='M14%2033h21'%20stroke='%232e2a26'%20stroke-width='4'%20stroke-linecap='round'/%3e%3ccircle%20cx='37'%20cy='33'%20r='13'%20stroke='%232e2a26'%20stroke-width='2.8'/%3e%3ccircle%20cx='37'%20cy='33'%20r='10.8'%20stroke='%236e5420'%20stroke-width='.9'/%3e%3cpath%20d='M37%2029.8L37%2021.5M39.26%2030.74L45.13%2024.87M40.2%2033L48.5%2033M39.26%2035.26L45.13%2041.13M37%2036.2L37%2044.5M34.74%2035.26L28.87%2041.13M33.8%2033L25.5%2033M34.74%2030.74L28.87%2024.87'%20stroke='%232e2a26'%20stroke-width='1.8'%20stroke-linecap='round'/%3e%3ccircle%20cx='37'%20cy='33'%20r='3.4'%20fill='url(%23b)'%20stroke='%234a3814'/%3e%3cg%20transform='rotate(-38%2022%2042)'%3e%3cpath%20d='M10%2040.5h18v3H10Z'%20fill='%234d4740'%20stroke='%232e2a26'%20stroke-width='.9'/%3e%3cpath%20d='M28%2038.2a4.2%204.2%200%201%201%200%207.6v-2.4h2.6v-2.8H28Z'%20fill='%234d4740'%20stroke='%232e2a26'%20stroke-width='.9'/%3e%3c/g%3e%3c/svg%3e`,hk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cg%3e%3ccircle%20cx='17'%20cy='20'%20r='4.5'%20fill='%23a8a294'/%3e%3ccircle%20cx='13'%20cy='25'%20r='3.5'%20fill='%23a8a294'/%3e%3ccircle%20cx='47'%20cy='21'%20r='4.8'%20fill='%23a8a294'/%3e%3ccircle%20cx='52'%20cy='26'%20r='3.4'%20fill='%23a8a294'/%3e%3ccircle%20cx='17'%20cy='19.1'%20r='3.6'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='13'%20cy='24.1'%20r='2.6'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='47'%20cy='20.1'%20r='3.9'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='52'%20cy='25.1'%20r='2.5'%20fill='%23e6dfcf'/%3e%3c/g%3e%3ccircle%20cx='32'%20cy='35'%20r='18.5'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.2'/%3e%3ccircle%20cx='32'%20cy='35'%20r='15'%20fill='%23f3e8cf'%20stroke='%234a3814'/%3e%3cpath%20d='M42.81%2031.07A11.5%2011.5%200%200%201%2041.96%2040.75'%20stroke='%238c1c10'%20stroke-width='3'/%3e%3cpath%20d='M20.31%2041.75L23.34%2040'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M18.71%2032.66L22.15%2033.26'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M23.32%2024.66L25.57%2027.34'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M32%2021.5L32%2025'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M40.68%2024.66L38.43%2027.34'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M45.29%2032.66L41.85%2033.26'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M43.69%2041.75L40.66%2040'%20stroke='%232e2a26'%20stroke-width='1.2'/%3e%3cpath%20d='M32%2035L41.46%2042.39'%20stroke='%236e2f12'%20stroke-width='2.4'%20stroke-linecap='round'/%3e%3ccircle%20cx='32'%20cy='35'%20r='2.6'%20fill='%232e2a26'/%3e%3cpath%20d='M22%2026l5%204.5-1.5%204%205.5%203M41%2028l-4%203.5%201%203.5M27%2046l3-4%203.5%201.5'%20stroke='%232e2a26'%20stroke-width='1'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M14%2014l3.5%203.5M50%2014l-3.5%203.5M32%2011v4'%20stroke='%238c1c10'%20stroke-width='1.8'%20stroke-linecap='round'/%3e%3c/svg%3e`,gk=new URL(`depot-BjEccEGj.webp`,import.meta.url).href,_k=new URL(`gauge-sheet-ZMjQ7TPd.svg`,import.meta.url).href,vk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cpath%20d='M15%2019h22M15%2024h30M15%2041h26M15%2046h18'%20stroke='%23b89b6c'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3cg%20transform='rotate(-11%2032%2033)'%3e%3crect%20x='12.5'%20y='23.5'%20width='39'%20height='19'%20rx='2'%20stroke='%238c1c10'%20stroke-width='2'/%3e%3crect%20x='15'%20y='26'%20width='34'%20height='14'%20rx='1'%20stroke='%238c1c10'%20stroke-width='.9'/%3e%3cpath%20transform='translate(16.7%2027)'%20d='M0%2012V0h4.2a3.4%203.4%200%200%201%200%206.8H0M8%2012%2011.6%200%2015.2%2012M9.3%207.8h4.6M19%200V12M23%200V12h2.6A5%205%200%200%200%2030.6%207V5A5%205%200%200%200%2025.6%200Z'%20stroke='%238c1c10'%20stroke-width='2.1'%20stroke-linejoin='round'%20stroke-linecap='square'/%3e%3c/g%3e%3c/svg%3e`,yk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2020'%20width='24'%20height='20'%20fill='none'%3e%3cg%3e%3ccircle%20cx='7'%20cy='13'%20r='5'%20fill='%237d7669'/%3e%3ccircle%20cx='13'%20cy='9'%20r='6.2'%20fill='%237d7669'/%3e%3ccircle%20cx='18.5'%20cy='13'%20r='4.6'%20fill='%237d7669'/%3e%3ccircle%20cx='7'%20cy='12.1'%20r='4.1'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='13'%20cy='8.1'%20r='5.3'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='18.5'%20cy='12.1'%20r='3.7'%20fill='%23e6dfcf'/%3e%3c/g%3e%3cpath%20d='M4%2018.5h16'%20stroke='%236e5420'%20stroke-width='1.4'%20stroke-linecap='round'/%3e%3c/svg%3e`,bk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cpath%20d='M15%2016h34'%20stroke='%23a0522d'%20stroke-width='2.4'%20stroke-linecap='round'/%3e%3cpath%20d='M15%2022h26M15%2027h31M15%2032h22'%20stroke='%23b89b6c'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3cpath%20d='M15%2043c3-5%204.5%201%206.5-1.5s2.5-5%204-2%202.5%203%205%20.5'%20stroke='%232e2a26'%20stroke-width='1.4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15%2047h17'%20stroke='%236e5420'%20stroke-width='1'%20stroke-linecap='round'/%3e%3cpath%20d='M40%2047l-2%206.5%203.5-2%203.5%202-2-6.5Z'%20fill='%236e2f12'/%3e%3ccircle%20cx='42.5'%20cy='42'%20r='7'%20fill='%238c1c10'%20stroke='%236e2f12'%20stroke-width='1'/%3e%3ccircle%20cx='42.5'%20cy='42'%20r='4.2'%20stroke='%23b5452f'%20stroke-width='1.2'/%3e%3ccircle%20cx='40.6'%20cy='40'%20r='1.3'%20fill='%23c46a50'%20fill-opacity='.8'/%3e%3c/svg%3e`,xk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cpath%20d='M34%2019.5C24%2014%2015%2017%2015%2024s5%209%207%2013'%20stroke='%236e5420'%20stroke-width='1.4'%20stroke-dasharray='2.2%201.4'%20stroke-linecap='round'/%3e%3cpath%20d='M31.5%2021.5h5v-3h-5Z'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='.9'/%3e%3ccircle%20cx='34'%20cy='17'%20r='2.4'%20stroke='%234a3814'%20stroke-width='1.3'/%3e%3ccircle%20cx='34'%20cy='36'%20r='15.6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.2'/%3e%3ccircle%20cx='34'%20cy='36'%20r='13'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='.9'/%3e%3cpath%20d='M34%2024.3L34%2027'%20stroke='%232e2a26'%20stroke-width='1.4'/%3e%3cpath%20d='M39.85%2025.87L39.1%2027.17'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M44.13%2030.15L42.83%2030.9'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M45.7%2036L43%2036'%20stroke='%232e2a26'%20stroke-width='1.4'/%3e%3cpath%20d='M44.13%2041.85L42.83%2041.1'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M39.85%2046.13L39.1%2044.83'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M34%2047.7L34%2045'%20stroke='%232e2a26'%20stroke-width='1.4'/%3e%3cpath%20d='M28.15%2046.13L28.9%2044.83'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M23.87%2041.85L25.17%2041.1'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M22.3%2036L25%2036'%20stroke='%232e2a26'%20stroke-width='1.4'/%3e%3cpath%20d='M23.87%2030.15L25.17%2030.9'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M28.15%2025.87L28.9%2027.17'%20stroke='%232e2a26'%20stroke-width='0.8'/%3e%3cpath%20d='M34%2036L36.49%2042.01'%20stroke='%232e2a26'%20stroke-width='2'%20stroke-linecap='round'/%3e%3cpath%20d='M34%2036L44%2036'%20stroke='%236e2f12'%20stroke-width='1.3'%20stroke-linecap='round'/%3e%3ccircle%20cx='34'%20cy='36'%20r='1.6'%20fill='%232e2a26'/%3e%3c/svg%3e`,Sk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3cdefs%3e%3clinearGradient%20id='b'%20x1='0'%20y1='0'%20x2='1'%20y2='1'%3e%3cstop%20offset='0'%20stop-color='%23e2c27a'/%3e%3cstop%20offset='.5'%20stop-color='%23b08d3c'/%3e%3cstop%20offset='1'%20stop-color='%236e5420'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='6'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.4'/%3e%3crect%20x='5.2'%20y='5.2'%20width='53.6'%20height='53.6'%20rx='4.4'%20stroke='%23e2c27a'%20stroke-opacity='.7'/%3e%3crect%20x='10'%20y='10'%20width='44'%20height='44'%20rx='1.5'%20fill='%23f3e8cf'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cg%20fill='%23e2c27a'%20stroke='%234a3814'%20stroke-width='.7'%3e%3ccircle%20cx='7.4'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='7.4'%20r='1.7'/%3e%3ccircle%20cx='7.4'%20cy='56.6'%20r='1.7'/%3e%3ccircle%20cx='56.6'%20cy='56.6'%20r='1.7'/%3e%3c/g%3e%3cg%3e%3ccircle%20cx='22'%20cy='22'%20r='5'%20fill='%23a8a294'/%3e%3ccircle%20cx='29'%20cy='17'%20r='6.5'%20fill='%23a8a294'/%3e%3ccircle%20cx='37'%20cy='19'%20r='5.5'%20fill='%23a8a294'/%3e%3ccircle%20cx='44'%20cy='15'%20r='4.5'%20fill='%23a8a294'/%3e%3ccircle%20cx='22'%20cy='21.1'%20r='4.1'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='29'%20cy='16.1'%20r='5.6'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='37'%20cy='18.1'%20r='4.6'%20fill='%23e6dfcf'/%3e%3ccircle%20cx='44'%20cy='14.1'%20r='3.6'%20fill='%23e6dfcf'/%3e%3c/g%3e%3cpath%20d='M29%2051V45'%20stroke='%232e2a26'%20stroke-width='4'/%3e%3cpath%20d='M23%2052h12'%20stroke='%232e2a26'%20stroke-width='2.6'%20stroke-linecap='round'/%3e%3cpath%20d='M26.5%2027h5v18h-5Z'%20fill='url(%23b)'%20stroke='%234a3814'%20stroke-width='1.1'/%3e%3cpath%20d='M25.5%2031.5h7M25.5%2037h7'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cpath%20d='M24.5%2027h9l-1-2h-7Z'%20fill='%236e5420'%20stroke='%234a3814'%20stroke-width='1'/%3e%3cpath%20d='M29%2025v-2.5'%20stroke='%234a3814'%20stroke-width='1.6'%20stroke-linecap='round'/%3e%3cpath%20d='M31.5%2041%2043%2036.5'%20stroke='%232e2a26'%20stroke-width='2'%20stroke-linecap='round'/%3e%3ccircle%20cx='43.6'%20cy='36.2'%20r='1.8'%20fill='%23a0522d'%20stroke='%236e2f12'%20stroke-width='.8'/%3e%3c/svg%3e`,Ck=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='3'%20y='3'%20width='10'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='4'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='4'%20width='10'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='4'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='5'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='4'%20y='5'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='5'%20y='5'%20width='6'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='11'%20y='5'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='12'%20y='5'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='6'%20width='10'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='13'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='7'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='7'%20width='4'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='7'%20y='7'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='8'%20y='7'%20width='5'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='7'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='8'%20width='8'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='11'%20y='8'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='12'%20y='8'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='9'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='9'%20width='10'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='13'%20y='9'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='10'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='4'%20y='10'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='5'%20y='10'%20width='8'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='11'%20width='5'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='8'%20y='11'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='9'%20y='11'%20width='4'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='12'%20width='10'%20height='1'%20fill='%232b1a0e'/%3e%3c/svg%3e`,wk=new URL(`basket-Cj-ZPWsU.svg`,import.meta.url).href,Tk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='5'%20y='1'%20width='2'%20height='1'%20fill='%23d8432a'/%3e%3crect%20x='8'%20y='1'%20width='2'%20height='1'%20fill='%23d9822b'/%3e%3crect%20x='4'%20y='2'%20width='3'%20height='1'%20fill='%23d8432a'/%3e%3crect%20x='7'%20y='2'%20width='5'%20height='1'%20fill='%23d9822b'/%3e%3crect%20x='3'%20y='3'%20width='4'%20height='1'%20fill='%23d8432a'/%3e%3crect%20x='7'%20y='3'%20width='4'%20height='1'%20fill='%23d9822b'/%3e%3crect%20x='11'%20y='3'%20width='1'%20height='1'%20fill='%23b8541c'/%3e%3crect%20x='12'%20y='3'%20width='1'%20height='1'%20fill='%23d9822b'/%3e%3crect%20x='2'%20y='4'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='5'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='5'%20y='5'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='6'%20y='5'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='8'%20y='5'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='9'%20y='5'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='11'%20y='5'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='12'%20y='5'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='4'%20y='6'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='6'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='7'%20y='6'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='9'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='10'%20y='6'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='12'%20y='6'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='13'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='7'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='7'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='5'%20y='7'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='6'%20y='7'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='8'%20y='7'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='9'%20y='7'%20width='2'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='11'%20y='7'%20width='1'%20height='1'%20fill='%238a5226'/%3e%3crect%20x='12'%20y='7'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='13'%20y='7'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='8'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='0'%20y='9'%20width='4'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='14'%20y='9'%20width='2'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='4'%20y='10'%20width='3'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='10'%20width='3'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='11'%20width='3'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='7'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='11'%20width='3'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='13'%20y='11'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='12'%20width='1'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='5'%20y='12'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='6'%20y='12'%20width='1'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='7'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='12'%20width='1'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='11'%20y='12'%20width='1'%20height='1'%20fill='%23c9932a'/%3e%3crect%20x='12'%20y='12'%20width='1'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='13'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='3'%20y='13'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='13'%20width='3'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='7'%20y='13'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='13'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='13'%20width='3'%20height='1'%20fill='%235c3f24'/%3e%3crect%20x='13'%20y='13'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='14'%20width='3'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='14'%20width='3'%20height='1'%20fill='%232b1a0e'/%3e%3c/svg%3e`,Ek=new URL(`gate-DgvMBPi9.svg`,import.meta.url).href,Dk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='10'%20y='0'%20width='3'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='1'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='1'%20width='3'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='13'%20y='1'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='8'%20y='2'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='2'%20width='2'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='11'%20y='2'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='12'%20y='2'%20width='2'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='14'%20y='2'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='8'%20y='3'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='3'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='10'%20y='3'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='11'%20y='3'%20width='3'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='14'%20y='3'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='4'%20width='8'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='9'%20y='4'%20width='4'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='13'%20y='4'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='5'%20width='7'%20height='1'%20fill='%23d8432a'/%3e%3crect%20x='9'%20y='5'%20width='4'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='6'%20width='10'%20height='1'%20fill='%23d8432a'/%3e%3crect%20x='12'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='7'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='8'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='3'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='8'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='5'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='6'%20y='8'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='7'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='8'%20y='8'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='9'%20y='8'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='8'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='11'%20y='8'%20width='2'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='9'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='10'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='3'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='10'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='5'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='6'%20y='10'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='7'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='8'%20y='10'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='9'%20y='10'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='10'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='11'%20y='10'%20width='2'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='11'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='12'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='3'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='12'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='5'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='6'%20y='12'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='7'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='8'%20y='12'%20width='1'%20height='1'%20fill='%23fbe7b5'/%3e%3crect%20x='9'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='12'%20width='2'%20height='1'%20fill='%23a3200f'/%3e%3crect%20x='12'%20y='12'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='13'%20width='9'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='10'%20y='13'%20width='2'%20height='1'%20fill='%23a3200f'/%3e%3crect%20x='12'%20y='13'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='14'%20width='12'%20height='1'%20fill='%232b1a0e'/%3e%3c/svg%3e`,Ok=new URL(`splash-hOSg5Qrh.webp`,import.meta.url).href,kk=new URL(`sprout-sheet-BLjjvTMl.svg`,import.meta.url).href,Ak=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20shape-rendering='crispEdges'%3e%3crect%20x='5'%20y='1'%20width='4'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='2'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='5'%20y='2'%20width='4'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='9'%20y='2'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='11'%20y='2'%20width='2'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='3'%20width='2'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='4'%20y='3'%20width='6'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='10'%20y='3'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='11'%20y='3'%20width='2'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='13'%20y='3'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='4'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='2'%20y='4'%20width='4'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='6'%20y='4'%20width='1'%20height='1'%20fill='%236b6f78'/%3e%3crect%20x='7'%20y='4'%20width='7'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='14'%20y='4'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='0'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='5'%20width='3'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='4'%20y='5'%20width='3'%20height='1'%20fill='%236b6f78'/%3e%3crect%20x='7'%20y='5'%20width='4'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='11'%20y='5'%20width='1'%20height='1'%20fill='%236b6f78'/%3e%3crect%20x='12'%20y='5'%20width='3'%20height='1'%20fill='%23a3a7ae'/%3e%3crect%20x='15'%20y='5'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='0'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='6'%20width='13'%20height='1'%20fill='%236b6f78'/%3e%3crect%20x='14'%20y='6'%20width='1'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='1'%20y='7'%20width='13'%20height='1'%20fill='%232b1a0e'/%3e%3crect%20x='5'%20y='8'%20width='2'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='12'%20y='8'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='4'%20y='9'%20width='2'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='10'%20y='9'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='3'%20y='10'%20width='4'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='12'%20y='10'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='5'%20y='11'%20width='2'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='10'%20y='11'%20width='1'%20height='1'%20fill='%23a8c9e8'/%3e%3crect%20x='4'%20y='12'%20width='2'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='3'%20y='13'%20width='1'%20height='1'%20fill='%23e0b52c'/%3e%3crect%20x='0'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='1'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='2'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='3'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='4'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='5'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='6'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='7'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='8'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='9'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='10'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='11'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='12'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='13'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='14'%20y='14'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='15'%20y='14'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='0'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='1'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='2'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='3'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='4'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='5'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='6'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='7'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='8'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='9'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='10'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='11'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='12'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='13'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3crect%20x='14'%20y='15'%20width='1'%20height='1'%20fill='%234f9a2a'/%3e%3crect%20x='15'%20y='15'%20width='1'%20height='1'%20fill='%232f6b1f'/%3e%3c/svg%3e`,jk=new URL(`sun-Cyqqe255.svg`,import.meta.url).href,Mk=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiBzaGFwZS1yZW5kZXJpbmc9ImNyaXNwRWRnZXMiPgo8IS0tIE92ZXJ3b3JsZCdzIGJyYXppZXIsIGxpdDogdGhlIGR1bmdlb24gdHJpYWwgY2xlYXJlZC4gRHJhd24gZm9yIFRvaWwgVUkuIC0tPgo8cmVjdCB4PSI4IiB5PSIwIiB3aWR0aD0iMSIgaGVp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wYTMgMyAwIDAgMS0zIDNIMjNhMyAzIDAgMCAxLTMtM3YtMjRhMyAzIDAgMCAxIDMtM1oiIGZpbGw9IiNmZmZmZmYiLz4KPHBhdGggZD0iTTM2IDE3LjV2NC41YTIuNSAyLjUgMCAwIDAgMi41IDIuNUg0M1oiIGZpbGw9IiMxYjFmMjQiLz4KPHBhdGggZD0ibTI0LjUgMjcuNSA1IDQuMy01IDQuMyIgc3Ryb2tlPSIjMWIxZjI0IiBzdHJva2Utd2lkdGg9IjMuNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik0zMS44IDQwaDYuMiIgc3Ryb2tlPSIjMGI1Y2FkIiBzdHJva2Utd2lkdGg9IjMuNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+CjwvZz4KPC9zdmc+Cg==`,Uk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3c!--%20A%20sword%20snapped%20a%20hand%20above%20the%20guard,%20its%20point%20fallen%20apart%20from%20it:%20a%20critical%20fail.%20--%3e%3cpath%20d='M39%2023%2053%209l4.5-1.5L56%2014%2043%2027l-1.2-1.8-1.4.8Z'%20fill='%23b9a682'%20stroke='%233a3733'%20stroke-width='1.4'/%3e%3cpath%20d='M41.5%2024.5%2055.2%2010.8'%20stroke='%23efe6d2'%20stroke-width='1'/%3e%3cpath%20d='M21%2039%2032%2028l1.2%202.4%201.4-.8.4%201.8%201%20.6L25%2043Z'%20fill='%23b9a682'%20stroke='%233a3733'%20stroke-width='1.4'/%3e%3cpath%20d='M23%2041%2033.2%2030.8'%20stroke='%23efe6d2'%20stroke-width='1'/%3e%3cpath%20d='M15.5%2033.5%2030.5%2048.5'%20stroke='%232e2a26'%20stroke-width='5.4'/%3e%3cpath%20d='M15.5%2033.5%2030.5%2048.5'%20stroke='%239c7a3c'%20stroke-width='2.6'/%3e%3ccircle%20cx='15'%20cy='33'%20r='2.6'%20fill='%239c7a3c'%20stroke='%232e2a26'%20stroke-width='1.3'/%3e%3ccircle%20cx='31'%20cy='49'%20r='2.6'%20fill='%239c7a3c'%20stroke='%232e2a26'%20stroke-width='1.3'/%3e%3cpath%20d='M21.8%2045.2%2012.6%2054.4'%20stroke='%232e2a26'%20stroke-width='6'/%3e%3cpath%20d='M20.4%2046.6l-1.8-1.8M17.8%2049.2%2016%2047.4M15.2%2051.8l-1.8-1.8'%20stroke='%236b6660'%20stroke-width='1.1'/%3e%3ccircle%20cx='11'%20cy='56'%20r='4.2'%20fill='%239c7a3c'%20stroke='%232e2a26'%20stroke-width='1.5'/%3e%3cpath%20d='M36.2%2027.2l1.4-3.6M38.6%2030.2l3.8-1.2M37.4%2028.6l2.6-2.6'%20stroke='%236e1c18'%20stroke-width='1.4'/%3e%3c/svg%3e`,Wk=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbGluZWNhcD0icm91bmQiPgo8IS0tIEEgbG9uZyByZXN0OiB0aGUgcGFydHkncyBjYW1wIGZpcmUgaW4gYSByaW5nIG9mIHN0b25lcywgdGhlIHNhbWUgZmlyZSBhcyB0aGUgd29ya2xvZydzIHJlc3QgZGF5cywgZHJhd24gbGFyZ2VyLiAtLT4KPGVsbGlwc2UgY3g9IjMyIiBjeT0iNTIiIHJ4PSIyNSIgcnk9IjYiIGZpbGw9IiMyZTJhMjYiIG9wYWNpdHk9Ii4zNSIvPgo8cGF0aCBkPSJNMTAgNTMuNSA1MiA0Mi41TTEyIDQyLjVsNDIgMTEiIHN0cm9rZT0iIzFhMTQxMCIgc3Ryb2tlLXdpZHRoPSI2LjUiLz4KPHBhdGggZD0iTTEwIDUzLjUgNTIgNDIuNU0xMiA0Mi41bDQyIDExIiBzdHJva2U9IiM0NjM5MmMiIHN0cm9rZS13aWR0aD0iNCIvPgo8Y2lyY2xlIGN4PSI1MiIgY3k9IjQyLjUiIHI9IjIiIGZpbGw9IiM4YTc1NTgiLz4KPGNpcmNsZSBjeD0iNTQiIGN5PSI1My41IiByPSIyIiBmaWxsPSIjOGE3NTU4Ii8+CjxwYXRoIGQ9Ik0zMiA0NmMtOS00LjUtOS42LTEyLjQtMy40LTIxLjYuNSA0LjggNC40IDYgNi42IDMuMiAxLjQtMS44LjktNS40LS4zLTguNiA3LjIgNSAxMC42IDExLjYgOS40IDE3LjZTMzcuNCA0NS42IDMyIDQ2WiIgZmlsbD0iIzZlMWMxOCIgc3Ryb2tlPSIjM2EwZDBiIiBzdHJva2Utd2lkdGg9IjEuMyIvPgo8cGF0aCBkPSJNMzIgNDUuNWMtNC44LTIuNC01LjEtNy0xLjktMTEuNi42IDIuNiAyLjQgMy40IDMuOCAxLjkuNyAyLjkgMy45IDMuOCAyLjkgNi42LS43IDIuMS0yLjQgMy4xLTQuOCAzLjFaIiBmaWxsPSIjYzlhODVlIiBzdHJva2U9IiM3YTVhMjYiIHN0cm9rZS13aWR0aD0iMSIvPgo8cGF0aCBkPSJNNyA1Ni41aDRsMS0yLjRoNC41TTQ4IDU2LjVoNC41bDEuMi0yLjJINTgiIHN0cm9rZT0iIzNhMzczMyIgc3Ryb2tlLXdpZHRoPSIxLjQiLz4KPHBhdGggZD0iTTQ0IDE2LjVsMS4yLTEuMk00Ny41IDIyLjVoMS42TTIwIDIwbC0xLjItMS4yIiBzdHJva2U9IiM5YzdhM2MiIHN0cm9rZS13aWR0aD0iMS4zIi8+Cjwvc3ZnPgo=`,Gk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20width='24'%20height='24'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3c!--%20A%20candle%20in%20an%20iron%20dish,%20its%20flame%20in%20tarnished%20gold:%20the%20loading%20track%20kindles%20one%20after%20another.%20--%3e%3cellipse%20cx='12'%20cy='20.6'%20rx='8.2'%20ry='2.4'%20fill='%232e2a26'%20stroke='%239c7a3c'%20stroke-width='.8'/%3e%3cpath%20d='M8.6%2011h6.8v9.2c0%20.8-1.5%201.3-3.4%201.3s-3.4-.5-3.4-1.3Z'%20fill='%23d8cbb0'%20stroke='%233a3733'%20stroke-width='.8'/%3e%3cpath%20d='M8.6%2011c0%20.7%201.5%201.2%203.4%201.2s3.4-.5%203.4-1.2'%20fill='none'%20stroke='%238a7558'%20stroke-width='.7'/%3e%3cpath%20d='M13.9%2012v3.6c0%20.5.9.5.9%200V11.6Z'%20fill='%23b9a682'/%3e%3cpath%20d='M12%2010.6V9'%20stroke='%2314110e'%20stroke-width='.9'/%3e%3cpath%20d='M12%202.2c1.8%202.2%202.6%203.8%202.6%205.1A2.6%202.6%200%200%201%2012%209.9a2.6%202.6%200%200%201-2.6-2.6c0-1.3.8-2.9%202.6-5.1Z'%20fill='%23c9a85e'%20stroke='%237a5a26'%20stroke-width='.7'/%3e%3cpath%20d='M12%205.2c.8%201.1%201.2%201.8%201.2%202.4a1.2%201.2%200%200%201-2.4%200c0-.6.4-1.3%201.2-2.4Z'%20fill='%23efe6d2'/%3e%3c/svg%3e`,Kk=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBzdHJva2UtbGluZWNhcD0icm91bmQiPgo8IS0tIFRoZSBob3VzZSdzIGxlZGdlciBsaWVzIG9wZW4sIGEgZnJlc2ggZW50cnkgaW5rZWQgYW5kIHRoZSBxdWlsbCBsYWlkIGFjcm9zcyBpdDogdGhlIGNoYW5nZSBpcyBlbnRlcmVkLi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NDUuNSAzOC41IDU2LjYgMTAiIHN0cm9rZT0iIzhhNzU1OCIgc3Ryb2tlLXdpZHRoPSIxIi8+CjxwYXRoIGQ9Ik00NC42IDQwLjggNDUuNSAzOC41IiBzdHJva2U9IiMxNDExMGUiIHN0cm9rZS13aWR0aD0iMS42Ii8+Cjwvc3ZnPgo=`,qk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20stroke-linejoin='round'%20stroke-linecap='round'%3e%3c!--%20The%20broken%20road,%20open%20again:%20the%20keep%20that%20held%20it%20stands%20with%20its%20gate%20raised,%20and%20the%20road%20runs%20through.%20--%3e%3cpath%20d='M18%2050V20h5v-5h5v5h8v-5h5v5h5v30Z'%20fill='%233a3733'%20stroke='%231a1410'%20stroke-width='1.6'/%3e%3cpath%20d='M21%2026h22M21%2033h22M21%2040h22'%20stroke='%234a443d'%20stroke-width='1.2'/%3e%3cpath%20d='M25.5%2050V39.5a6.5%206.5%200%200%201%2013%200V50Z'%20fill='%2314110e'%20stroke='%239c7a3c'%20stroke-width='1.4'/%3e%3cpath%20d='M26.5%2033.5h11M28%2030.5v3M32%2030.5v3M36%2030.5v3'%20stroke='%236b6660'%20stroke-width='1.2'/%3e%3cpath%20d='M2%2054.5h60'%20stroke='%233a3733'%20stroke-width='1.6'/%3e%3cpath%20d='M4%2058.5h11M20%2058.5h9M35%2058.5h9M49%2058.5h11'%20stroke='%238a7558'%20stroke-width='2.2'/%3e%3cpath%20d='M27.5%2050.5h9'%20stroke='%23c9a85e'%20stroke-width='1.6'/%3e%3cpath%20d='M48.5%2012v14M48.5%2012l9%203.2-9%203.2'%20fill='%236e1c18'%20stroke='%233a0d0b'%20stroke-width='1.2'/%3e%3c/svg%3e`,Jk=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgd2lkdGg9IjY0I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2Utd2lkdGg9IjEiLz4KPHBhdGggZD0iTTQzIDM3LjVjMS44IDAgMi41IDEuMyA0IDEuNnMzLS4zIDQgLjguMyAyLjYgMSA0IDIgMiAyIDMuOC0xLjIgMi4zLTEuNiAzLjkuNSAzLS42IDQuMS0yLjcuNy00LjEgMS41LTEuOCAyLjUtMy41IDIuNy0yLjUtMS4zLTQuMi0xLjctMy4xLjItNC4yLTEtLjMtMi42LTEuMi00UzMzIDUwLjkgMzMgNDkuMXMxLjMtMi40IDEuNy0zLjktLjQtMi45LjgtNCAyLjctLjUgNC4xLTEuMyAxLjYtMi40IDMuNC0yLjRaIiBmaWxsPSIjNmUxYzE4IiBzdHJva2U9IiMzYTBkMGIiIHN0cm9rZS13aWR0aD0iMSIvPgo8Y2lyY2xlIGN4PSI0My41IiBjeT0iNDgiIHI9IjUuNiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjM2EwZDBiIiBzdHJva2Utd2lkdGg9IjEuNCIvPgo8Y2lyY2xlIGN4PSI0My41IiBjeT0iNDgiIHI9IjUuNiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYTU0NTNhIiBzdHJva2Utd2lkdGg9Ii42IiBzdHJva2UtZGFzaGFycmF5PSIzIDciIHRyYW5zZm9ybT0icm90YXRlKC0zMCA0My41IDQ4KSIvPgo8Y2lyY2xlIGN4PSI0My41IiBjeT0iNDgiIHI9IjEuOCIgZmlsbD0iIzNhMGQwYiIvPgo8L3N2Zz4K`,Yk=new URL(`tray-BHNdSAiO.webp`,import.meta.url).href,Xk=new URL(`boot-sheet-C9B_iXU-.webp`,import.meta.url).href,Zk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%20fill='none'%3e%3c!--%20One%20block%20of%20cipher%20text,%20decrypted:%20a%20bracketed%20cell%20in%20cyan.%20--%3e%3cpath%20d='M5%201.5H1.5v13H5M11%201.5h3.5v13H11'%20stroke='%233ff0ff'%20stroke-width='1.5'/%3e%3crect%20x='4.5'%20y='4.5'%20width='7'%20height='7'%20fill='%233ff0ff'/%3e%3c/svg%3e`,Qk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3c!--%20Gig%20closed:%20a%20terminal%20window%20with%20a%20neon%20check%20where%20the%20prompt%20was.%20--%3e%3cpath%20d='M6%2012h46l6%206v34H6Z'%20fill='%2307060f'%20stroke='%233ff0ff'%20stroke-width='2'/%3e%3cpath%20d='M6%2020h52'%20stroke='%233ff0ff'%20stroke-width='1.5'/%3e%3cpath%20d='M52%2012h6v6Z'%20fill='%23ff2e88'/%3e%3crect%20x='10'%20y='15'%20width='4'%20height='2.5'%20fill='%23ff2e88'/%3e%3crect%20x='16'%20y='15'%20width='4'%20height='2.5'%20fill='%23f2ff4a'/%3e%3cpath%20d='M18%2036l8%208%2018-18'%20stroke='%2339ff9c'%20stroke-width='5'%20stroke-linecap='square'/%3e%3cpath%20d='M18%2036l8%208%2018-18'%20stroke='%23eaffef'%20stroke-width='1.5'%20stroke-linecap='square'%20opacity='.7'/%3e%3c/svg%3e`,$k=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3c!--%20ICE%20breached:%20a%20hexagonal%20barrier%20split%20open,%20and%20a%20data%20line%20running%20clean%20through%20the%20gap.%20--%3e%3cpath%20d='M29%206%209%2017.5v29L29%2058'%20stroke='%233ff0ff'%20stroke-width='2.5'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M35%206l20%2011.5v29L35%2058'%20stroke='%233ff0ff'%20stroke-width='2.5'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M14%2021v22M50%2021v22'%20stroke='%233ff0ff'%20stroke-width='1.2'%20opacity='.55'/%3e%3cpath%20d='M2%2032h50'%20stroke='%23ff2e88'%20stroke-width='3'/%3e%3cpath%20d='M46%2025l9%207-9%207'%20stroke='%23ff2e88'%20stroke-width='3'%20stroke-linecap='square'/%3e%3crect%20x='4'%20y='29'%20width='6'%20height='6'%20fill='%23f2ff4a'/%3e%3c/svg%3e`,eA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3c!--%20Black%20ICE%20cracked:%20the%20dark%20barrier%20from%20the%20net%20map,%20shattered%20and%20falling%20apart,%20a%20cyan%20spark%20at%20the%20break.%20--%3e%3cpath%20d='M28%204%207%2016v13l12-3%209-22Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M39%205l19%2011v12l-14%202-5-25Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M6%2039v11l20%2012%204-18-24-5Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M43%2042l16-2v10L40%2061l3-19Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M32%2021v22M21%2032h22'%20stroke='%233ff0ff'%20stroke-width='2.5'/%3e%3cpath%20d='M25%2025l14%2014M39%2025%2025%2039'%20stroke='%233ff0ff'%20stroke-width='1.4'%20opacity='.8'/%3e%3crect%20x='29'%20y='29'%20width='6'%20height='6'%20fill='%23eaf6ff'/%3e%3c/svg%3e`,tA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3c!--%20Tripped%20the%20ICE:%20the%20barrier%20closed%20and%20lit%20red,%20an%20alarm%20mark%20in%20its%20middle.%20--%3e%3cpath%20d='M32%204%2056%2018v28L32%2060%208%2046V18Z'%20fill='%2307060f'%20stroke='%23ff6470'%20stroke-width='2.5'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M32%2012%2049%2022v20L32%2052%2015%2042V22Z'%20stroke='%23ff6470'%20stroke-width='1.2'%20opacity='.5'/%3e%3cpath%20d='M32%2021v15'%20stroke='%23ff6470'%20stroke-width='5'%20stroke-linecap='square'/%3e%3crect%20x='29.5'%20y='41'%20width='5'%20height='5'%20fill='%23ff6470'/%3e%3cpath%20d='M2%2014l5%203M62%2014l-5%203M2%2050l5-3M62%2050l-5-3'%20stroke='%23ffd23f'%20stroke-width='2'/%3e%3c/svg%3e`,nA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%20fill='none'%3e%3c!--%20Payload%20delivered:%20a%20magenta%20branch%20line%20folding%20into%20the%20cyan%20main%20line,%20carrying%20its%20packet%20home.%20--%3e%3cpath%20d='M4%2046h56'%20stroke='%233ff0ff'%20stroke-width='3'/%3e%3cpath%20d='M4%2016h14l18%2030'%20stroke='%23ff2e88'%20stroke-width='3'%20stroke-linejoin='bevel'/%3e%3crect%20x='8'%20y='40'%20width='7'%20height='12'%20fill='%2307060f'%20stroke='%233ff0ff'%20stroke-width='1.5'/%3e%3cpath%20d='M54%2036l4-4v14l-4%204Z'%20fill='%23a3125a'%20stroke='%23ff2e88'%20stroke-width='1.2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M40%2036l4-4h14l-4%204Z'%20fill='%23ff5aa3'%20stroke='%23ff2e88'%20stroke-width='1.2'%20stroke-linejoin='bevel'/%3e%3cpath%20d='M40%2036h14v14H40Z'%20fill='%23ff2e88'/%3e%3cpath%20d='M44%2043h6'%20stroke='%2312020a'%20stroke-width='2'/%3e%3ccircle%20cx='18'%20cy='16'%20r='3'%20fill='%23ff2e88'/%3e%3c/svg%3e`,rA=`data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgd2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I0NyIgeT0iNDUiIHdpZHRoPSIyIiBoZWlnaHQ9IjIiIGZpbGw9IiNmZjJlODgiLz48cmVjdCB4PSIxMyIgeT0iNDUiIHdpZHRoPSIyIiBoZWlnaHQ9IjIiIGZpbGw9IiMzZmYwZmYiLz4KPC9zdmc+Cg==`,iA=new URL(`shard-sheet-NpLu-BuT.svg`,import.meta.url).href,aA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%235df2a6'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%235df2a6'%20stroke-width='2.5'/%3e%3cpath%20d='M15%2047L22%2034M25%2029L29%2022L36%2034M15%2047H24M30%2047H36'%20fill='none'%20stroke='%23ffc857'%20stroke-opacity='.45'%20stroke-width='2'%20stroke-linecap='round'/%3e%3cpath%20d='M38%2048V18M30%2026L38%2017L46%2026'%20fill='none'%20stroke='%235df2a6'%20stroke-width='3.5'%20stroke-linecap='round'%20stroke-linejoin='round'%20filter='url(%23g)'/%3e%3ccircle%20cx='38'%20cy='52'%20r='2'%20fill='%235df2a6'/%3e%3c/svg%3e`,oA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%2336d6ff'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%2336d6ff'%20stroke-width='2.5'/%3e%3crect%20x='10'%20y='24'%20width='20'%20height='16'%20rx='2'%20fill='%23101b31'%20stroke='%2336d6ff'%20stroke-width='2'/%3e%3cpath%20d='M30%2028H34V36H30'%20fill='%23101b31'%20stroke='%237fe3ff'%20stroke-width='2'/%3e%3crect%20x='34'%20y='22'%20width='20'%20height='20'%20rx='10'%20fill='%23101b31'%20stroke='%2336d6ff'%20stroke-width='2'/%3e%3ccircle%20cx='44'%20cy='32'%20r='4'%20fill='%237fe3ff'%20filter='url(%23g)'/%3e%3cpath%20d='M32%2018V24M32%2040V46'%20stroke='%235df2a6'%20stroke-width='3'%20stroke-linecap='round'%20filter='url(%23g)'/%3e%3cpath%20d='M14%2032H26'%20stroke='%232a4262'%20stroke-width='2'/%3e%3c/svg%3e`,sA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%2336d6ff'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%2336d6ff'%20stroke-width='2.5'/%3e%3cellipse%20cx='32'%20cy='34'%20rx='24'%20ry='9'%20fill='none'%20stroke='%2336d6ff'%20stroke-width='1.6'%20stroke-opacity='.75'%20transform='rotate(-18%2032%2034)'/%3e%3ccircle%20cx='32'%20cy='34'%20r='11'%20fill='%23101b31'%20stroke='%237fe3ff'%20stroke-width='2'/%3e%3cpath%20d='M24%2030A11%2011%200%200%201%2040%2027'%20fill='none'%20stroke='%23a06eff'%20stroke-width='2'%20stroke-opacity='.8'/%3e%3ccircle%20cx='54'%20cy='27'%20r='3.2'%20fill='%235df2a6'%20filter='url(%23g)'/%3e%3ccircle%20cx='14'%20cy='14'%20r='1.2'%20fill='%23e6f1ff'/%3e%3ccircle%20cx='50'%20cy='12'%20r='1'%20fill='%23e6f1ff'/%3e%3ccircle%20cx='20'%20cy='52'%20r='1'%20fill='%23e6f1ff'/%3e%3c/svg%3e`,cA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%235df2a6'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%235df2a6'%20stroke-width='2.5'/%3e%3crect%20x='12'%20y='14'%20width='40'%20height='22'%20rx='1'%20fill='%23101b31'%20stroke='%232a4262'/%3e%3cpath%20d='M14%2025H22L25%2019L29%2031L33%2021L36%2025H50'%20fill='none'%20stroke='%235df2a6'%20stroke-width='2'%20stroke-linejoin='round'%20filter='url(%23g)'/%3e%3crect%20x='14'%20y='42'%20width='10'%20height='8'%20fill='%235df2a6'%20filter='url(%23g)'/%3e%3crect%20x='27'%20y='42'%20width='10'%20height='8'%20fill='%235df2a6'%20filter='url(%23g)'/%3e%3crect%20x='40'%20y='42'%20width='10'%20height='8'%20fill='%235df2a6'%20filter='url(%23g)'/%3e%3c/svg%3e`,lA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%235df2a6'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%235df2a6'%20stroke-width='2.5'/%3e%3cpath%20d='M32%2011L50%2021.5V42.5L32%2053L14%2042.5V21.5Z'%20fill='%23101b31'%20stroke='%2336d6ff'%20stroke-width='2'/%3e%3cpath%20d='M22.5%2032.5L29%2039L42%2025.5'%20fill='none'%20stroke='%235df2a6'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20filter='url(%23g)'/%3e%3c/svg%3e`,uA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='0.9'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='1.5'%20y='1.5'%20width='13'%20height='13'%20rx='1'%20fill='%230a1222'%20stroke='%232a4262'/%3e%3cpath%20d='M8%203.5L12.5%208L8%2012.5L3.5%208Z'%20fill='%2336d6ff'%20filter='url(%23g)'/%3e%3cpath%20d='M8%205.5L10.5%208L8%2010.5L5.5%208Z'%20fill='%23e6f1ff'%20fill-opacity='.8'/%3e%3c/svg%3e`,dA=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%20width='64'%20height='64'%3e%3cdefs%3e%3cfilter%20id='g'%20x='-50%25'%20y='-50%25'%20width='200%25'%20height='200%25'%3e%3cfeGaussianBlur%20stdDeviation='1.5'%20result='b'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='b'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3c/defs%3e%3crect%20x='3'%20y='3'%20width='58'%20height='58'%20rx='2'%20fill='%230a1222'%20stroke='%23ff7a8e'%20stroke-opacity='.45'/%3e%3cpath%20d='M3%2013V3H13M51%203H61V13M61%2051V61H51M13%2061H3V51'%20fill='none'%20stroke='%23ff7a8e'%20stroke-width='2.5'/%3e%3cpath%20d='M20%2022A16%2016%200%200%200%2020%2046M14%2017A23%2023%200%200%200%2014%2051M44%2022A16%2016%200%200%201%2044%2046M50%2017A23%2023%200%200%201%2050%2051'%20fill='none'%20stroke='%23ff7a8e'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-opacity='.8'/%3e%3cpath%20d='M24%2046V32A8%208%200%200%201%2040%2032V46Z'%20fill='%23e0405e'%20stroke='%23ff7a8e'%20stroke-width='2'%20filter='url(%23g)'/%3e%3cpath%20d='M28%2033A4%204%200%200%201%2032%2029'%20fill='none'%20stroke='%23e6f1ff'%20stroke-width='2'%20stroke-linecap='round'%20stroke-opacity='.85'/%3e%3crect%20x='20'%20y='46'%20width='24'%20height='5'%20rx='1'%20fill='%232a4262'%20stroke='%23ff7a8e'%20stroke-opacity='.6'/%3e%3c/svg%3e`,fA=new URL(`sensor-sheet-Dn-dKnev.svg`,import.meta.url).href,pA=new URL(`warp-BNB4TdQ4.webp`,import.meta.url).href,mA=Object.assign({"../../themes/crate/assets/crate-loading.webp":rk,"../../themes/crate/assets/crate-lost.webp":ik,"../../themes/crate/assets/mark.svg":ak,"../../themes/crate/assets/moments/aisle.svg":ok,"../../themes/crate/assets/moments/gauge.svg":sk,"../../themes/crate/assets/moments/manifest.svg":ck,"../../themes/crate/assets/moments/merge.svg":lk,"../../themes/crate/assets/moments/signed.svg":uk,"../../themes/crate/assets/moments/splash.webp":dk,"../../themes/crate/assets/moments/split.svg":fk,"../../themes/crate/assets/moments/tote.svg":pk,"../../themes/frontier/assets/brass-plate.svg":PS,"../../themes/frontier/assets/busted-axle.svg":FS,"../../themes/frontier/assets/gauge.svg":IS,"../../themes/frontier/assets/locomotive.webp":LS,"../../themes/frontier/assets/mark.svg":RS,"../../themes/frontier/assets/moments/axle.svg":mk,"../../themes/frontier/assets/moments/blown.svg":hk,"../../themes/frontier/assets/moments/depot.webp":gk,"../../themes/frontier/assets/moments/gauge-sheet.svg":_k,"../../themes/frontier/assets/moments/paid.svg":vk,"../../themes/frontier/assets/moments/puff.svg":yk,"../../themes/frontier/assets/moments/telegram.svg":bk,"../../themes/frontier/assets/moments/watch.svg":xk,"../../themes/frontier/assets/moments/whistle.svg":Sk,"../../themes/frontier/assets/rivet-rail.svg":zS,"../../themes/frontier/assets/survey-map.webp":BS,"../../themes/frontier/assets/telegraph-key.svg":VS,"../../themes/frontier/assets/wanted-poster.webp":HS,"../../themes/frontier/assets/wood.webp":US,"../../themes/harvest/assets/crop-grown.svg":sC,"../../themes/harvest/assets/crop-harvested.svg":cC,"../../themes/harvest/assets/crop-seed.svg":lC,"../../themes/harvest/assets/crop-sprout.svg":uC,"../../themes/harvest/assets/empty-field.svg":dC,"../../themes/harvest/assets/fields.webp":fC,"../../themes/harvest/assets/mark.svg":pC,"../../themes/harvest/assets/moments/bale.svg":Ck,"../../themes/harvest/assets/moments/basket.svg":wk,"../../themes/harvest/assets/moments/cart.svg":Tk,"../../themes/harvest/assets/moments/gate.svg":Ek,"../../themes/harvest/assets/moments/moon.svg":Dk,"../../themes/harvest/assets/moments/splash.webp":Ok,"../../themes/harvest/assets/moments/sprout-sheet.svg":kk,"../../themes/harvest/assets/moments/storm.svg":Ak,"../../themes/harvest/assets/moments/sun.svg":jk,"../../themes/harvest/assets/portrait.svg":mC,"../../themes/harvest/assets/watering-can.svg":hC,"../../themes/harvest/assets/wood-panel.svg":gC,"../../themes/harvest/assets/wood-sign.svg":_C,"../../themes/overworld/assets/chest-open.svg":TC,"../../themes/overworld/assets/chest.svg":EC,"../../themes/overworld/assets/dungeon-map.webp":DC,"../../themes/overworld/assets/empty-room.webp":OC,"../../themes/overworld/assets/gem.svg":kC,"../../themes/overworld/assets/heart-empty.svg":AC,"../../themes/overworld/assets/heart.svg":jC,"../../themes/overworld/assets/key.svg":MC,"../../themes/overworld/assets/locked-door.svg":NC,"../../themes/overworld/assets/mark.svg":PC,"../../themes/overworld/assets/moments/brazier-lit.svg":Mk,"../../themes/overworld/assets/moments/brazier-out.svg":Nk,"../../themes/overworld/assets/moments/campfire.svg":Pk,"../../themes/overworld/assets/moments/chest-open.svg":Fk,"../../themes/overworld/assets/moments/door-open.svg":Ik,"../../themes/overworld/assets/moments/key-raised.svg":Lk,"../../themes/overworld/assets/moments/map-sheet.webp":Rk,"../../themes/overworld/assets/moments/step.svg":zk,"../../themes/overworld/assets/moments/title.webp":Bk,"../../themes/overworld/assets/overworld.webp":FC,"../../themes/overworld/assets/sage-cave.webp":IC,"../../themes/overworld/assets/sage.webp":LC,"../../themes/overworld/assets/stone-wall.svg":RC,"../../themes/plain/assets/mark-dark.svg":Vk,"../../themes/plain/assets/mark-light.svg":Hk,"../../themes/realm/assets/broken-road.svg":KC,"../../themes/realm/assets/capital.svg":qC,"../../themes/realm/assets/d20.svg":JC,"../../themes/realm/assets/dungeon-map.webp":YC,"../../themes/realm/assets/iron-band.svg":XC,"../../themes/realm/assets/ledger.svg":ZC,"../../themes/realm/assets/mark.svg":QC,"../../themes/realm/assets/moments/broken-blade.svg":Uk,"../../themes/realm/assets/moments/campfire.svg":Wk,"../../themes/realm/assets/moments/candle.svg":Gk,"../../themes/realm/assets/moments/ledger-quill.svg":Kk,"../../themes/realm/assets/moments/open-road.svg":qk,"../../themes/realm/assets/moments/scroll.svg":Jk,"../../themes/realm/assets/moments/tray.webp":Yk,"../../themes/realm/assets/rest.svg":$C,"../../themes/realm/assets/rule.svg":ew,"../../themes/realm/assets/vellum.webp":tw,"../../themes/realm/assets/war-map.webp":nw,"../../themes/realm/assets/wax-seal.svg":rw,"../../themes/sprawl/assets/black-ice.svg":Yw,"../../themes/sprawl/assets/dead-drop.webp":Xw,"../../themes/sprawl/assets/jack-in.webp":Zw,"../../themes/sprawl/assets/mark.svg":Qw,"../../themes/sprawl/assets/moments/boot-sheet.webp":Xk,"../../themes/sprawl/assets/moments/cipher-block.svg":Zk,"../../themes/sprawl/assets/moments/gig-closed.svg":Qk,"../../themes/sprawl/assets/moments/ice-breached.svg":$k,"../../themes/sprawl/assets/moments/ice-cracked.svg":eA,"../../themes/sprawl/assets/moments/ice-tripped.svg":tA,"../../themes/sprawl/assets/moments/payload.svg":nA,"../../themes/sprawl/assets/moments/run-over.svg":rA,"../../themes/sprawl/assets/moments/shard-sheet.svg":iA,"../../themes/sprawl/assets/net-map.svg":$w,"../../themes/sprawl/assets/netrunner.svg":eT,"../../themes/sprawl/assets/skyline.webp":tT,"../../themes/starship/assets/computer.svg":oT,"../../themes/starship/assets/empty-sector.webp":sT,"../../themes/starship/assets/lightspeed.svg":cT,"../../themes/starship/assets/mark.svg":lT,"../../themes/starship/assets/moments/all-clear.svg":aA,"../../themes/starship/assets/moments/docking.svg":oA,"../../themes/starship/assets/moments/mission.svg":sA,"../../themes/starship/assets/moments/nominal.svg":cA,"../../themes/starship/assets/moments/objective.svg":lA,"../../themes/starship/assets/moments/pip.svg":uA,"../../themes/starship/assets/moments/red-alert.svg":dA,"../../themes/starship/assets/moments/sensor-sheet.svg":fA,"../../themes/starship/assets/moments/warp.webp":pA,"../../themes/starship/assets/nebula.webp":uT,"../../themes/starship/assets/star-chart.svg":dT,"../../themes/starship/assets/starfield.svg":fT});function hA(e,t){let n=t?e.assets[t]:void 0;return n?mA[`../../themes/${e.name}/${n}`]??null:null}var gA={fade:()=>[{opacity:0},{opacity:1}],rise:e=>[{opacity:0,transform:`translateY(${14*e}px)`},{opacity:1,transform:`translateY(0)`}],drop:e=>[{opacity:0,transform:`translateY(${-20*e}px)`},{opacity:1,transform:`translateY(${3*e}px)`,offset:.7},{opacity:1,transform:`translateY(0)`}],pop:e=>[{opacity:0,transform:`scale(${1-.25*e})`},{opacity:1,transform:`scale(${1+.05*e})`,offset:.65},{opacity:1,transform:`scale(1)`}],slide:e=>[{opacity:0,transform:`translateX(${-28*e}px)`},{opacity:1,transform:`translateX(0)`}],stamp:e=>[{opacity:0,transform:`scale(${1+.7*e}) rotate(${-10*e}deg)`},{opacity:1,transform:`scale(${1-.06*e}) rotate(${-1*e}deg)`,offset:.6},{opacity:1,transform:`scale(1) rotate(0deg)`}],sweep:e=>[{opacity:0,transform:`translateX(${44*e}px) skewX(${-8*e}deg)`},{opacity:1,transform:`translateX(0) skewX(0deg)`}],grow:e=>[{opacity:0,transform:`scaleY(${1-.7*e})`},{opacity:1,transform:`scaleY(1)`}]};function _A(e,t){return e===`off`?null:e===`full`?{s:1,ms:t}:{s:.35,ms:Math.round(t*.6)}}function vA(e,t,n,r=320){let i=_A(n,r);return!e||!t||!i||typeof e.animate!=`function`?null:e.animate(gA[t](i.s),{duration:i.ms,easing:`cubic-bezier(0.2, 0.8, 0.2, 1)`,fill:`backwards`})}function yA(e,t,n=200){let r=_A(t,n);return!e||!r||typeof e.animate!=`function`?null:e.animate([{opacity:1,transform:`translateY(0)`},{opacity:0,transform:`translateY(${-6*r.s}px)`}],{duration:r.ms,easing:`ease-in`,fill:`forwards`})}var bA=[`item-done`,`build-passed`,`build-failed`,`blocker-cleared`,`pr-merged`,`sprint-ended`],xA={"item-done":`Done`,"build-passed":`Build passed`,"build-failed":`Build failed`,"blocker-cleared":`Blocker cleared`,"pr-merged":`Merged`,"sprint-ended":`Sprint ended`},SA=e=>e?.tips?.label??`Tip`,CA=6e3,wA=3e3,TA=1800,EA=5e3,DA=e=>e.moments??{};function OA(e=300){let[t,n]=(0,v.useState)(e<=0);return(0,v.useEffect)(()=>{if(e<=0)return;let t=setTimeout(()=>n(!0),e);return()=>clearTimeout(t)},[e]),t}function kA(){let[e,t]=(0,v.useState)(()=>typeof document<`u`&&document.hidden);return(0,v.useEffect)(()=>{let e=()=>{t(document.hidden),document.hidden?document.documentElement.dataset.pageHidden=``:delete document.documentElement.dataset.pageHidden;for(let e of document.getAnimations?.()??[])(e.effect?.target)?.closest?.(`[data-moments]`)&&(document.hidden?e.pause():e.playState===`paused`&&e.play())};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e}function AA(e,t,n=!0){let r=kA(),i=(0,v.useRef)(t);i.current=t,(0,v.useEffect)(()=>{if(!n||r)return;let t=setInterval(()=>i.current(),e);return()=>clearInterval(t)},[e,n,r])}function jA({theme:e,art:t,className:n,loop:r,face:i=null}){let a=hA(e,t.art);if(!a)return null;let o=`frames`in t?t.frames:1;return o>1?(0,q.jsxs)(`span`,{className:`m-art m-sheet ${n??``}`,style:{width:t.width,height:t.height,"--m-frames":o},"aria-hidden":`true`,children:[(0,q.jsx)(`img`,{className:r===`frames`?`m-loop--frames`:void 0,src:a,alt:``,width:t.width*o,height:t.height,decoding:`async`}),i!==null&&(0,q.jsx)(`span`,{className:`m-face`,children:i})]}):r||i!==null?(0,q.jsxs)(`span`,{className:`m-art m-hold ${n??``}`,"aria-hidden":`true`,children:[(0,q.jsx)(`img`,{className:r?`m-loop--${r}`:void 0,src:a,alt:``,width:t.width,height:t.height,decoding:`async`}),i!==null&&(0,q.jsx)(`span`,{className:`m-face`,children:i})]}):(0,q.jsx)(`img`,{className:`m-art ${n??``}`,src:a,alt:``,width:t.width,height:t.height,decoding:`async`,"aria-hidden":`true`})}function MA({tip:e,label:t}){let n=lw[e.topic];return(0,q.jsxs)(`p`,{className:`loader-tip`,"data-tip":e.id,children:[(0,q.jsx)(`span`,{className:`loader-tip__label`,children:t}),` `,(0,q.jsx)(`span`,{className:`loader-tip__text`,children:e.text}),` `,(0,q.jsxs)(`a`,{href:uw(n),target:`_blank`,rel:`noopener noreferrer`,"data-tip-more":``,children:[`Read more`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` about `,n.title,` in the docs (opens in a new tab)`]})]})]})}function NA(e){let[t,n]=(0,v.useState)(()=>e?XO():null);return(0,v.useEffect)(()=>{e&&!t&&n(XO())},[e,t]),AA(CA,()=>n(XO()),e),e?t:null}function PA(e){let[t,n]=(0,v.useState)(0);return AA(wA,()=>n(e=>e+1),!!(e&&e.length>1)),e&&e.length?e[t%e.length]:null}function FA({message:e,detail:t=null,size:n=`view`,live:r=!0,immediate:i=!1}){let a=OA(i?0:300),o=JS(),s=QS(),c=Lm(),{Loading:l}=ST(),[u]=nk(),d=DA(o),f=PA($S(o,s)?d.loader?.flavour:void 0),p=NA(u&&n===`view`&&a),m=t?`${e} ${t}`:e;return a?n===`inline`?(0,q.jsxs)(`div`,{className:`loader loader--inline`,"data-moments":``,"data-level":c,"data-loading":``,children:[d.loader&&(0,q.jsx)(IA,{theme:o,m:d}),(0,q.jsx)(`p`,{className:`note`,...r?{role:`status`}:{},children:m})]}):d.loader?(0,q.jsxs)(`div`,{className:`loader loader--${n} loader--themed`,"data-moments":``,"data-level":c,"data-loader":o.name,"data-loading":``,children:[(0,q.jsxs)(`div`,{className:`loader__stage`,"aria-hidden":`true`,children:[(0,q.jsx)(jA,{theme:o,art:d.loader.art,className:`loader__art`,loop:d.loader.loop}),(0,q.jsx)(IA,{theme:o,m:d})]}),(0,q.jsx)(`p`,{className:`loader__progress`,...r?{role:`status`}:{},children:m}),f&&n===`view`&&(0,q.jsx)(`p`,{className:`loader__flavour`,"aria-hidden":`true`,children:f}),p&&(0,q.jsx)(MA,{tip:p,label:SA(d)})]}):(0,q.jsxs)(`div`,{className:`loader loader--${n} loader--skin`,"data-moments":``,"data-level":c,"data-loading":``,children:[(0,q.jsx)(l,{message:m}),p&&(0,q.jsx)(MA,{tip:p,label:SA(d)})]}):(0,q.jsx)(`div`,{className:`loader loader--${n} loader--pending`,"aria-hidden":`true`,"data-loading":``})}function IA({theme:e,m:t}){let n=t.loader?.track,r=n?hA(e,n.art):null;return!n||!r?null:(0,q.jsx)(`span`,{className:`loader__track m-track--${n.motif}`,"aria-hidden":`true`,style:{"--m-count":n.count},children:Array.from({length:n.count},(e,t)=>(0,q.jsx)(`img`,{src:r,alt:``,width:n.size,height:n.size,style:{"--m-i":t}},t))})}function LA(e,t){if(!e.face||!t)return null;let n=e.face.value===`sprint-day`?t.day:t.done;return String(Math.min(e.face.max??1/0,n))}var RA=e=>e?{"data-sprint-day":e.day,"data-sprint-days":e.days,"data-items-done":e.done,"data-dossier":e.dossier}:{},zA=!1;function BA({ready:e,detail:t=null,data:n=null,preview:r=!1,onDone:i}){let a=JS(),o=Lm(),s=DA(a),[c]=(0,v.useState)(()=>{if(r)return!0;let e=zA;return zA=!0,!e}),l=OA(r?0:300),[u,d]=(0,v.useState)(!1),f=(0,v.useRef)(null),[p]=nk(),m=c&&!u&&!!s.splash&&o!==`off`&&(r||!e),h=NA(p&&l&&m),g=(0,v.useCallback)(()=>{d(!0),i?.()},[i]);return(0,v.useEffect)(()=>{if(!m||r)return;let e=setTimeout(g,TA);return()=>clearTimeout(e)},[m,r,g]),(0,v.useEffect)(()=>{if(!m)return;let e=()=>g();return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[m,g]),(0,v.useLayoutEffect)(()=>{m&&l&&vA(f.current?.querySelector(`.splash__art`)??null,s.splash?.motif,o,520)},[m,l,s.splash?.motif,o]),!m||!l||!s.splash?null:(0,q.jsx)(`div`,{className:`splash`,"data-moments":``,"data-level":o,"data-splash":a.name,...RA(n),ref:f,onPointerDown:g,children:(0,q.jsxs)(`div`,{className:`splash__inner`,children:[(0,q.jsx)(jA,{theme:a,art:s.splash.art,className:`splash__art`,loop:o===`full`?s.splash.loop:void 0,face:LA(s.splash,n)}),(0,q.jsxs)(`p`,{className:`splash__name`,"aria-hidden":`true`,children:[(0,q.jsx)(`span`,{className:`wordmark`,children:`toil`}),` `,(0,q.jsx)(`span`,{className:`splash__ui`,children:`UI`})]}),(0,q.jsx)(`p`,{className:`splash__line`,"aria-hidden":`true`,children:s.splash.line}),(0,q.jsx)(`p`,{className:`splash__progress`,role:`status`,children:r?`Preview of the launch splash. Press any key or click to close it.`:`Starting Toil UI. ${t??`Reading the dossiers…`}`}),h&&(0,q.jsx)(MA,{tip:h,label:SA(s)})]})})}function VA(e,t,n,{onMount:r=!0,ms:i=320}={}){let a=Lm(),o=(0,v.useRef)(!0);(0,v.useLayoutEffect)(()=>{let n=o.current;o.current=!1,(!n||r)&&vA(e.current,t,a,i)},[n])}var HA=(0,v.createContext)({play:()=>void 0}),UA=()=>(0,v.useContext)(HA);function WA({children:e}){let[t,n]=(0,v.useState)([]),r=(0,v.useRef)(0),i=Lm(),a=kA(),o=(0,v.useRef)(i);o.current=i;let s=(0,v.useCallback)(e=>{o.current!==`off`&&e.length&&n(t=>[...t,...e.map(e=>({id:r.current++,moment:e}))].slice(0,6))},[]),c=(0,v.useMemo)(()=>({play:s}),[s]),l=!a&&i!==`off`?t[0]:void 0,u=(0,v.useCallback)(()=>n(e=>e.slice(1)),[]);return(0,v.useEffect)(()=>{i===`off`&&n([])},[i]),(0,q.jsxs)(HA,{value:c,children:[e,l&&(0,q.jsx)(GA,{moment:l.moment,level:i,onDone:u},l.id)]})}function GA({moment:e,level:t,onDone:n}){let r=JS(),i=QS(),a=DA(r),o=a.events?.[e.kind],s=(0,v.useRef)(null),c=e.kind===`sprint-ended`,l=xA[e.kind],u=$S(r,i)?c?a.recap?.label??o?.label:o?.label:void 0;return(0,v.useLayoutEffect)(()=>{if(!o){n();return}let e=c?360:300,r=c?240:200,i=c?EA:900-e-r;vA(s.current,o.motif,t,e),vA(s.current?.querySelector(`.moment__art`)??null,o.motif===`stamp`?`stamp`:`pop`,t,e+80);let a=null,l=setTimeout(()=>{a=yA(s.current,t,r),a?a.onfinish=n:n()},e+i);return()=>{clearTimeout(l),a?.cancel()}},[]),o?(0,q.jsxs)(`div`,{className:`moment moment--${e.kind}${c?` moment--recap`:``}`,ref:s,"data-moments":``,"data-moment":e.kind,"data-level":t,"aria-hidden":`true`,children:[(0,q.jsx)(jA,{theme:r,art:o,className:`moment__art`}),(0,q.jsxs)(`div`,{className:`moment__words`,children:[(0,q.jsxs)(`p`,{className:`moment__label`,children:[(0,q.jsx)(`strong`,{children:u&&u.toLowerCase()!==l.toLowerCase()?`${u} (${l})`:l}),e.count>1?(0,q.jsxs)(`span`,{className:`moment__count`,children:[` ×`,e.count]}):null]}),(0,q.jsx)(`p`,{className:`moment__text`,children:e.text}),c&&e.figures&&(0,q.jsx)(`ul`,{className:`moment__figures`,children:e.figures.map(e=>(0,q.jsx)(`li`,{children:e},e))})]})]}):null}var KA=new EventTarget;function qA(e){KA.dispatchEvent(new CustomEvent(`command`,{detail:e}))}function JA(e){let t=(0,v.useRef)(e);(0,v.useEffect)(()=>{t.current=e}),(0,v.useEffect)(()=>{let e=e=>t.current(e.detail);return KA.addEventListener(`command`,e),()=>KA.removeEventListener(`command`,e)},[])}var YA=()=>typeof crypto<`u`&&`randomUUID`in crypto?crypto.randomUUID():`chat-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`,XA=6e4,ZA=e=>String(Math.max(1,Math.round(e/1e3))),QA=e=>e.parts.map(e=>e.text).join(`
33
33
 
34
- `),QA=e=>e.model?`${e.label} (${e.model})`:e.label,$A=`(max-width: 599px)`;function ej(e){let t=nC();return oE($A)?t(`ask.placeholder.short`):t(`ask.placeholder`,{name:e})}function tj(e,t,n){if(e.error&&!e.stopped)return null;if(e.done)return{text:t(e.stopped?`status.stopped`:`status.done`,{seconds:XA(e.ms??0)}),tool:null,elapsed:null};let r=e.answer?.activity,i=`${Math.max(0,Math.floor((n-e.started)/1e3))} s`;return r?.phase===`tool`?{text:t(r.source===`live`?`status.live`:r.source===`registry`?`status.registry`:`status.cache`),tool:r.tool??null,elapsed:i}:r?.phase===`writing`||e.answer&&e.answer.parts.length>0?{text:t(`status.writing`),tool:null,elapsed:i}:{text:t(`loading.answer`),tool:null,elapsed:i}}function nj(){let{analyses:e,dossier:t}=J(),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),o=(0,v.useRef)(!0),s=()=>{e&&e.list(t.name).then(e=>{o.current&&(r(e),a(null))},e=>o.current&&a(`The analyses didn't load: ${e instanceof Error?e.message:String(e)}`))};return(0,v.useEffect)(()=>(o.current=!0,s(),()=>{o.current=!1}),[e]),{list:e?n:[],error:i,refresh:s}}function rj(){let{agent:e,dossier:t,analyses:n,now:r}=J(),i=nj(),a=qS(),o=ZS(),s={theme:a.name,voice:$S(a,o)},[c,l]=(0,v.useState)([]),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(null),[g,_]=(0,v.useState)(null),y=(0,v.useRef)(0),b=(0,v.useRef)(JA()),x=(0,v.useRef)(null),S=c.filter(e=>e.kind===`turn`),C=S.some(e=>!e.done);(0,v.useEffect)(()=>()=>x.current?.abort(),[]);let w=(e,t)=>l(n=>n.map(n=>n.kind===`turn`&&n.id===e?{...n,...t}:n)),T=()=>{e.adapters&&e.adapters().then(p,()=>p(null))},E=async(a,o=a)=>{if(C||!a.trim())return;let c=y.current++,d={id:b.current,turn:S.length+1},f=S.flatMap(e=>e.done&&!e.error&&e.answer?.parts.length?[{prompt:e.prompt,answer:ZA(e.answer).slice(0,PT+1),by:e.answer.by}]:[]).slice(-8),p={...u?{adapter:u}:{},...f.length?{history:f}:{}},m=new AbortController;x.current=m;let g=Date.now();l(e=>[...e,{kind:`turn`,id:c,prompt:o,answer:null,error:null,done:!1,started:g,...a===`analyze`?{analyze:!0}:{}}]);try{let o=null;if(e.stream)for await(let n of e.stream(t.name,a,m.signal,s,d,p)){if(m.signal.aborted)return;o=n,w(c,{answer:n})}else o=await e.ask(t.name,a,s,d,p),w(c,{answer:o});if(!m.signal.aborted){if(w(c,{done:!0,ms:Date.now()-g}),a===`analyze`&&o&&o.parts.length){if(n?.record&&!o.analysis){let e=await n.record(t.name,o,{startedAt:new Date(g).toISOString(),at:new Date().toISOString(),items:t.items,now:r}).catch(()=>null);e&&w(c,{answer:{...o,analysis:e}})}i.refresh()}o?.session&&h(o.session)}}catch(e){if(m.signal.aborted)return;let t=e?.usage;w(c,{answer:null,error:`The agent couldn't answer: ${e instanceof Error?e.message:String(e)}`,done:!0,ms:Date.now()-g,...t?{usage:t}:{}})}},D=()=>{let e=S.find(e=>!e.done);x.current?.abort(),e&&w(e.id,{done:!0,stopped:!0,ms:Date.now()-e.started,...e.answer?{answer:{...e.answer,activity:void 0}}:{}})},O=(e,t)=>{e!==u&&(d(e),l(e=>e.length?[...e,{kind:`switch`,id:y.current++,label:t}]:e))},k=uO(),A=(0,v.useRef)(!1);(0,v.useEffect)(()=>{let e=m?.stale??null;e&&!A.current&&k?.report({key:`chat:${b.current}:${m.renewals}`,state:`stale`,notable:`stale`,agent:`The chat`,item:null,itemTitle:null,why:e.text,dossier:t.name,href:bg(t.name),mine:!0},`fresh`),A.current=e!==null},[m]);let j=()=>{e.session&&S.length&&e.session(b.current).then(e=>e&&h(e),()=>void 0)},M=S.length>0;return(0,v.useEffect)(()=>{if(!M||!e.session)return;let t=setInterval(j,YA);return()=>clearInterval(t)},[M,e]),{entries:c,turns:S,busy:C,ask:E,stop:D,adapter:u,adapters:f,refreshAdapters:T,switchTo:O,session:m,checkSession:j,renew:async()=>{if(!e.renew)return`This agent keeps no sessions, so there is nothing to renew.`;if(C)return`It is answering a question now, and a renew never interrupts one.`;_(null);try{return h(await e.renew(b.current,t.name)),l(e=>[...e,{kind:`renew`,id:y.current++}]),null}catch(e){let t=`The chat couldn't be renewed: ${e instanceof Error?e.message:String(e)}`;return _(t),t}},renewProblem:g,history:i}}var ij=(0,v.createContext)(null),aj=()=>(0,v.useContext)(ij);function oj({children:e}){let t=rj();return(0,q.jsx)(ij,{value:t,children:e})}function sj(){let{dossier:e}=J(),t=nC(),n=ej(e.name),r=aj(),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(!1);if((0,v.useEffect)(()=>{let e=()=>s(!1);return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),!r)throw Error(`The Ask bar needs the ChatScope the App puts around a dossier's pages.`);let c=r,l=c.turns[c.turns.length-1],u=()=>{s(!0),c.refreshAdapters(),c.checkSession()},d=e=>{if(e.preventDefault(),u(),!i.trim())return;let t=i;a(``),c.ask(t)},f=()=>{u(),c.ask(RT,`Analyze`)},p=(0,v.useRef)(null);return qA(e=>{e.kind===`ask`?p.current?.focus():e.kind===`analyze`&&!c.busy?f():e.kind===`agent`&&c.switchTo(e.name,e.label)}),(0,q.jsxs)(`section`,{className:`ask-bar`,"aria-label":`Ask about ${e.name}`,children:[(0,q.jsxs)(`form`,{className:`ask-bar__form`,onSubmit:d,children:[(0,q.jsx)(Yp,{className:`field-text ask-bar__field`,value:i,onChange:a,"aria-label":`Your question`,children:(0,q.jsx)(jo,{ref:p,placeholder:n,onClick:u,"data-ask-bar":``})}),(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,children:`Ask`}),(0,q.jsx)(W,{className:`btn`,onPress:f,isDisabled:c.busy,"data-analyze":``,children:`Analyze`})]}),c.session?.stale&&!o&&(0,q.jsx)(SD,{stale:c.session.stale,className:`ask-bar__stale`}),l&&!o&&(0,q.jsxs)(`p`,{className:`ask-bar__resume note`,children:[c.turns.length,` `,c.turns.length===1?`question`:`questions`,` in this chat`,l.done?``:`, ${tj(l,t,Date.now())?.text??``}`,`.`,` `,(0,q.jsx)(W,{className:`btn btn--small`,onPress:u,"data-ask-resume":``,children:`Open the conversation`})]}),(0,q.jsx)(Of,{className:`ask-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:o,onOpenChange:s,children:(0,q.jsx)(Ef,{className:`ask-modal`,children:(0,q.jsx)(cj,{chat:c,text:i,setText:a})})})]})}function cj({chat:e,text:t,setText:n}){let{agent:r,dossier:i}=J(),{health:a}=fg(),{EmptyState:o,ChatMessage:s}=xT(),c=nC(),l=ej(i.name),[u,d]=(0,v.useState)(new Set),[f,p]=(0,v.useState)(()=>Date.now()),m=(0,v.useRef)(null),{entries:h,turns:g,busy:_}=e,y=g[g.length-1],b=r.starters(i.name);(0,v.useEffect)(()=>{m.current?.scrollIntoView?.({block:`nearest`})},[h]),(0,v.useEffect)(()=>{if(!_)return;p(Date.now());let e=setInterval(()=>p(Date.now()),1e3);return()=>clearInterval(e)},[_]);let x=r=>{r.preventDefault();let i=t;n(``),e.ask(i)},S=e.adapters?.options??[],C=S.find(t=>t.name===(e.adapter??e.adapters?.chosen)),w=C?QA(C):r.label??`the agent chosen in Settings`,T=g.flatMap(e=>e.done&&(e.answer?.usage??e.usage)?[e.answer?.usage??e.usage]:[]),E=y?tj(y,c,f):null,D=e=>{let t=S.find(t=>t.name===e.adapter);return e.by===`scripted`?`a scripted preview, not a model`:t?e.model?`${t.label} (${e.model})`:t.label:e.by};return(0,q.jsxs)(uf,{className:`ask ask-focus`,"aria-labelledby":`ask`,children:[(0,q.jsxs)(`div`,{className:`ask-strip`,children:[(0,q.jsxs)(`div`,{className:`ask-strip__text`,children:[(0,q.jsxs)(ja,{slot:`title`,id:`ask`,children:[`Ask about `,i.name]}),(0,q.jsxs)(`p`,{className:`ask-strip__context note`,children:[(0,q.jsxs)(`span`,{children:[`Dossier `,i.name]}),(0,q.jsx)(`span`,{children:a?`${a.sprint.name}, day ${a.days.gone} of ${a.days.total}`:`No sprint running`}),(0,q.jsxs)(`span`,{children:[`Answered by`,` `,r.adapters?(0,q.jsx)(lj,{label:w,list:e.adapters,current:e.adapter,onPick:e.switchTo}):(0,q.jsx)(`strong`,{children:w})]})]})]}),(0,q.jsx)(uj,{agentLabel:w}),e.session?.stale&&!e.session.stale.restart&&r.renew&&(0,q.jsx)(W,{className:`btn btn--small`,onPress:()=>void e.renew(),isDisabled:_,"data-chat-renew":``,children:`Renew`}),(0,q.jsx)(W,{slot:`close`,className:`btn btn--small`,"data-ask-close":``,children:`Close`})]}),(0,q.jsxs)(`div`,{className:`ask-scroll`,"data-scroller":``,tabIndex:0,role:`region`,"aria-label":`The conversation`,children:[(0,q.jsx)(`p`,{className:`note`,children:c(`ask.note`)}),e.session?.stale&&(0,q.jsx)(SD,{stale:e.session.stale}),e.session?.stale?.restart&&(0,q.jsx)(`p`,{className:`note any-break`,children:e.session.stale.restart}),e.session?.stale&&_&&(0,q.jsx)(`p`,{className:`note`,children:`Renew waits for this answer: it never interrupts one.`}),e.renewProblem&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:e.renewProblem}),(0,q.jsxs)(`div`,{className:`log`,role:`log`,"aria-live":`polite`,"aria-busy":_,"aria-label":`Conversation`,children:[h.length===0&&(r.notice?(0,q.jsx)(`p`,{className:`note agent-notice`,children:r.notice}):(0,q.jsx)(o,{message:c(`ask.welcome`,{name:i.name}),children:(0,q.jsx)(Rw,{})})),h.map(e=>e.kind===`renew`?(0,q.jsx)(`p`,{className:`ask-switch note`,children:`Renewed on today's instructions. The conversation above stays, and the next question carries a summary of it.`},`r${e.id}`):e.kind===`switch`?(0,q.jsxs)(`p`,{className:`ask-switch note`,children:[`Switched to `,e.label,` for this chat. The next question carries a summary of the conversation so far.`]},`s${e.id}`):(0,q.jsxs)(`div`,{className:`turn`,children:[(0,q.jsx)(s,{from:`you`,children:(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`span`,{className:`sr-only`,children:`You asked: `}),e.prompt]})}),e.error?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:e.error}),e.usage&&(0,q.jsx)(vD,{usage:e.usage})]}):(0,q.jsxs)(s,{from:`agent`,children:[e.answer&&e.answer.parts.length>0?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h3`,{children:e.answer.prompt}),e.done&&e.answer.warnings&&e.answer.warnings.length>0&&(0,q.jsx)(`div`,{className:`answer-checks`,"aria-label":`Checks on this answer`,children:e.answer.warnings.map((e,t)=>(0,q.jsx)(`p`,{className:`failure`,children:e},t))}),e.analyze?(0,q.jsx)(FO,{parts:e.answer.parts,done:e.done}):e.answer.parts.map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(WT,{text:e.text,chips:!0})},t)),e.done&&(0,q.jsxs)(`p`,{className:`by`,children:[e.stopped?`Stopped before the end. `:`Cites ${e.answer.citations.length} ${e.answer.citations.length===1?`item`:`items`}.${e.answer.unverified&&e.answer.unverified.length>0?` Names ${e.answer.unverified.length} its tools never returned.`:``} `,`Answered by: `,D(e.answer),e.ms===void 0?``:`, in ${XA(e.ms)} s`,`.`,e.answer.carried?` It was given a summary of the ${e.answer.carried} earlier ${e.answer.carried===1?`turn`:`turns`}.`:``,e.answer.analysis&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(`a`,{href:Og(i.name,e.answer.analysis),"data-analysis-kept":``,children:`Kept in Analyses`}),`.`]})]}),e.done&&e.answer.usage&&(0,q.jsx)(vD,{usage:e.answer.usage})]}):e.stopped?(0,q.jsx)(`p`,{className:`note`,children:`Stopped before any answer arrived.`}):(0,q.jsx)(PA,{size:`inline`,message:c(`loading.answer`),live:!1}),e.done&&!e.stopped&&e.answer?.proposals.filter(e=>!u.has(e.id)).map(e=>(0,q.jsx)(AE,{proposal:e,onDismiss:()=>d(t=>new Set(t).add(e.id))},e.id))]})]},e.id)),(0,q.jsx)(qE,{prompts:g.filter(e=>!e.analyze).map(e=>e.prompt)}),(0,q.jsx)(`div`,{ref:m})]})]}),(0,q.jsxs)(`div`,{className:`ask-foot`,children:[E&&(0,q.jsxs)(`div`,{className:`ask-status`,children:[(0,q.jsxs)(`p`,{role:`status`,className:`ask-status__line`,"data-ask-status":``,children:[E.text,E.tool&&(0,q.jsxs)(q.Fragment,{children:[`: `,(0,q.jsx)(`code`,{children:E.tool})]}),E.elapsed&&(0,q.jsxs)(`span`,{"aria-hidden":`true`,className:`ask-status__time`,children:[` · `,E.elapsed]})]}),_&&(0,q.jsx)(W,{className:`btn btn--small`,onPress:e.stop,"data-ask-stop":``,children:`Stop`})]}),(0,q.jsx)(yD,{usages:T}),b.length>0&&(g.length===0?(0,q.jsx)(`div`,{className:`starters`,role:`group`,"aria-label":`Starter questions`,children:b.map(t=>(0,q.jsx)(W,{className:`starter`,onPress:()=>void e.ask(t.id,t.label),isDisabled:_,children:t.label},t.id))}):(0,q.jsxs)(Xd,{children:[(0,q.jsx)(W,{className:`btn btn--small ask-suggest`,isDisabled:_,"data-ask-suggestions":``,children:`Suggestions`}),(0,q.jsx)(Xu,{className:`popover menu-popover`,placement:`top start`,offset:6,children:(0,q.jsx)(Qd,{className:`menu`,"aria-label":`Suggested questions`,onAction:t=>void e.ask(String(t),b.find(e=>e.id===t)?.label??String(t)),children:b.map(e=>(0,q.jsx)(af,{id:e.id,className:`menu-item`,children:e.label},e.id))})})]})),(0,q.jsxs)(`form`,{className:`ask-form`,onSubmit:x,children:[(0,q.jsxs)(Yp,{className:`field-text`,value:t,onChange:n,isDisabled:_,autoFocus:!0,children:[(0,q.jsx)(va,{children:`Your question`}),(0,q.jsx)(jo,{placeholder:l})]}),(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,isDisabled:_||!t.trim(),children:`Ask`}),(0,q.jsx)(W,{className:`btn`,onPress:()=>void e.ask(RT,`Analyze`),isDisabled:_,children:`Analyze`})]})]})]})}function lj({label:e,list:t,current:n,onPick:r}){return(0,q.jsxs)(lf,{children:[(0,q.jsxs)(W,{className:`btn btn--small agent-switch`,"data-agent-switch":``,children:[e,(0,q.jsx)(`span`,{"aria-hidden":`true`,children:` ▾`}),(0,q.jsx)(`span`,{className:`sr-only`,children:`, change the agent for this chat`})]}),(0,q.jsx)(Xu,{className:`popover agent-switch__popover`,placement:`bottom start`,offset:6,children:(0,q.jsx)(uf,{className:`agent-switch__dialog`,"aria-labelledby":`agent-switch-title`,children:({close:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(ja,{slot:`title`,id:`agent-switch-title`,className:`ask-info__title`,children:`Agent for this chat`}),t?(0,q.jsx)(`ul`,{className:`agent-picks`,children:t.options.map(i=>{let a=(n??t.chosen)===i.name;return(0,q.jsxs)(`li`,{className:`agent-pick`,children:[(0,q.jsxs)(W,{className:`agent-pick__button`,isDisabled:!i.ready,"aria-current":a?!0:void 0,onPress:()=>{r(i.name===t.chosen?null:i.name,QA(i)),e()},children:[(0,q.jsx)(`strong`,{children:i.label}),(0,q.jsxs)(`span`,{className:`note`,children:[i.name===`scripted`?`Canned answers, no model`:i.model?`Model ${i.model}`:`Its CLI's default model`,i.name===t.chosen&&i.name!==`scripted`?`, the default from Settings`:``]}),(0,q.jsx)(`span`,{className:i.ready?`agent-pick__ready`:`agent-missing`,children:a?`Answering`:i.ready?`Ready`:`Unavailable`})]}),!i.ready&&(0,q.jsxs)(`p`,{className:`note agent-pick__why`,children:[i.problem,i.fix?` ${i.fix}`:``,i.action&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(`a`,{href:`#/settings/agent`,onClick:e,children:i.action===`install`?`Install ${i.label}`:`Fix ${i.label}`})]})]})]},i.name)})}):(0,q.jsx)(`p`,{className:`note`,children:`Reading the agents…`}),(0,q.jsx)(`p`,{className:`note`,children:`Switching holds for this chat, from its next question. The default stays under Settings, Agent.`})]})})})]})}function uj({agentLabel:e}){let t=qS(),n=$S(t,ZS())?`Answers are written in ${t.label}'s voice, or in your own custom voice if you saved one. A voice changes their phrasing only: citations, figures and proposals stay exact.`:t.voice?`Themed agent voice is off, so answers are in plain wording, whatever the theme.`:`${t.label} has no voice of its own, so answers are in plain wording.`;return(0,q.jsxs)(lf,{children:[(0,q.jsxs)(W,{className:`btn info-button`,"data-ask-info":``,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`info-button__mark`,children:`i`}),(0,q.jsx)(`span`,{className:`sr-only`,children:`About these answers`})]}),(0,q.jsx)(Xu,{className:`popover ask-info`,placement:`bottom end`,offset:6,children:(0,q.jsxs)(uf,{className:`ask-info__dialog`,"aria-labelledby":`ask-info-title`,children:[(0,q.jsx)(ja,{slot:`title`,id:`ask-info-title`,className:`ask-info__title`,children:`About these answers`}),(0,q.jsx)(`p`,{children:n}),(0,q.jsxs)(`p`,{children:[`Answered by `,e??`the agent chosen in Settings`,`.`]}),(0,q.jsx)(`p`,{children:`The agent only reads: its tools can't change a ticket, and anything it suggests comes back as a proposal for you to apply.`}),(0,q.jsxs)(`p`,{children:[`Change the voice under `,(0,q.jsx)(`a`,{href:`#/settings/toil`,children:`Settings, General`}),`, and add your own instructions or voice under `,(0,q.jsx)(`a`,{href:`#/settings/agent`,children:`Settings, Agent`}),`.`]}),(0,q.jsx)(Iw,{entries:cw.answers.glossary})]})})]})}function dj({label:e,value:t,options:n,onChange:r}){return(0,q.jsxs)(Bp,{className:`choice`,selectedKey:t,onSelectionChange:e=>e!==null&&r(String(e)),children:[(0,q.jsx)(va,{children:e}),(0,q.jsxs)(W,{className:`btn choice-button`,children:[(0,q.jsx)(Wp,{children:()=>n.find(e=>e.id===t)?.label??t}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`▾`})]}),(0,q.jsx)(Xu,{className:`popover`,children:(0,q.jsx)(Xc,{className:`menu`,children:n.map(e=>(0,q.jsx)(el,{id:e.id,className:`menu-item`,children:e.label},e.id))})})]})}function fj(e){let t=[];for(let n of e){let e=t.find(e=>e.command===n.command);e?e.count++:t.push({command:n.command,count:1})}return t}function pj({calls:e,alerts:t=!0}){if(!e.length)return null;let n=fj(e),r=t?e.filter(e=>!e.ok):[];return(0,q.jsxs)(q.Fragment,{children:[r.map((e,t)=>(0,q.jsxs)(`p`,{role:`alert`,className:`failure`,children:[(0,q.jsxs)(`code`,{children:[`toil `,e.command]}),` failed: `,e.error]},t)),(0,q.jsxs)(`details`,{className:`fed-by`,children:[(0,q.jsxs)(`summary`,{children:[`Fed by`,` `,n.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`, `,(0,q.jsxs)(`code`,{children:[`toil `,e.command]}),e.count>1&&` ×${e.count}`]},e.command))]}),(0,q.jsx)(`ul`,{className:`plain calls`,children:e.map((e,t)=>(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`code`,{className:`call`,children:[`execute(`,JSON.stringify(e.command),`, `,JSON.stringify(e.input),`)`]}),!e.ok&&(0,q.jsx)(`span`,{className:`failure`,children:` (failed)`})]},t))})]})]})}function mj({id:e,title:t,calls:n,children:r,alerts:i=!0}){let{Panel:a}=xT();return(0,q.jsx)(Q,{as:`section`,className:`panel`,"aria-labelledby":e,children:(0,q.jsxs)(a,{id:e,children:[(0,q.jsx)(`h2`,{id:e,children:t}),r,(0,q.jsx)(pj,{calls:n,alerts:i})]})})}var hj={pass:`✓`,thin:`!`,fail:`✕`},gj={pass:`Passes`,thin:`Thin`,fail:`Fails`},_j={ready:`✓`,thin:`!`,blocked:`✕`};function vj({verdict:e}){return(0,q.jsxs)(`span`,{className:`verdict verdict--${e}`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,children:_j[e]}),` `,tv[e]]})}function yj({readiness:e}){return(0,q.jsx)(`ul`,{className:`rows readiness-rows`,children:e.rows.map(e=>(0,q.jsxs)(`li`,{className:`readiness-row readiness-row--${e.state}`,children:[(0,q.jsx)(`span`,{className:`readiness-mark`,"aria-hidden":`true`,children:hj[e.state]}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:e.label}),` `,(0,q.jsx)(`span`,{className:`readiness-state`,children:gj[e.state]}),`: `,(0,q.jsx)(WT,{text:e.reason}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`Source: `,(0,q.jsx)(`code`,{children:e.source})]})]})]},e.check))})}function bj({readiness:e}){return e.why.length?(0,q.jsx)(`ul`,{className:`why-not`,children:e.why.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`strong`,{children:[e.label,`:`]}),` `,(0,q.jsx)(WT,{text:e.reason})]},e.check))}):(0,q.jsx)(`span`,{className:`field`,children:`Every check passes.`})}var xj={ready:`Every check passes: an agent can start on it.`,thin:`Something is missing. A person can still decide to start it on its own, but the Command Center never slates it.`,blocked:`It can't be worked on as it is, so it is never started.`};function Sj({item:e}){let{dossier:t,byId:n,execute:r}=J(),i=t.readiness,[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),l=Bv({item:e,settings:i,byId:n,...a?{live:a.result}:{}}),u=e.statusCategory===`DONE`?null:Tv(e);return(0,q.jsxs)(Q,{as:`section`,className:`panel readiness-panel`,"aria-labelledby":`readiness`,children:[(0,q.jsx)(`h2`,{id:`readiness`,children:`Ready for an agent?`}),(0,q.jsxs)(`p`,{className:`readiness-verdict`,children:[(0,q.jsx)(vj,{verdict:l.verdict}),` `,xj[l.verdict]]}),(0,q.jsx)(yj,{readiness:l}),u&&r&&(0,q.jsxs)(`p`,{className:`readiness-live`,children:[(0,q.jsx)(W,{className:`btn btn--small`,onPress:async()=>{if(!r||!u)return;c(!0);let n=await r(u.command,{dossier:t.name,...u.input},oS);o({result:Ov(e,u.command,n.ok?n.data:null,n.ok?void 0:`${n.error.message}${n.error.fix?` ${n.error.fix}`:``}`),at:new Date().toISOString()}),c(!1)},isDisabled:s,children:s?`Reading the workflow…`:a?`Read the workflow again`:`Check the workflow live`}),` `,(0,q.jsx)(`span`,{className:`field`,"aria-live":`polite`,children:a?`Read live ${Y(a.at)} with toil ${u.command}.`:`One read-only call, toil ${u.command}, settles the done state.`})]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Worked out from the cached record`,a?` and one live read`:``,`, with no model call. The checks and their settings (fields.acceptanceCriteria, readiness.minWords, readiness.templates in the `,e.source.area,` section) are in Toil UI's README.`]}),i.notes.map((e,t)=>(0,q.jsx)(`p`,{role:`note`,className:`failure`,children:e},t))]})}function Cj({message:e,action:t,help:n}){let{EmptyState:r}=xT();return(0,q.jsx)(r,{message:e,children:(0,q.jsxs)(`p`,{className:`empty-action`,"data-empty-action":``,children:[t,n&&(0,q.jsx)(Fw,{topic:n})]})})}function wj({href:e,children:t,edit:n=!1}){return(0,q.jsxs)(`a`,{className:`btn btn--small empty-action__link`,href:e,children:[n&&(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`empty-action__pencil`,children:`✎`}),t]})}function Tj({onPress:e,children:t,disabled:n=!1}){return(0,q.jsx)(W,{className:`btn btn--small`,onPress:e,isDisabled:n,children:t})}function Ej({sync:e,children:t}){return e?(0,q.jsx)(Tj,{onPress:e,children:`Sync now`}):(0,q.jsx)(q.Fragment,{children:t})}function Dj({dossier:e,sync:t}){return(0,q.jsx)(Ej,{sync:t,children:(0,q.jsx)(wj,{edit:!0,href:Mg(e,`sources`),children:`Check the dossier's sources`})})}var Oj=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function kj(e){let t=2166136261;for(let n of e.map(e=>`${e.id}@${e.updated??``}@${e.status??``}`).join(`
35
- `))t^=n.charCodeAt(0),t=Math.imul(t,16777619)>>>0;return t.toString(16).padStart(8,`0`)}var Aj=[{id:`open`,label:`Not done`},{id:`done`,label:`Done`},{id:`all`,label:`All`}],jj=[{header:`Item`,label:`Item`,rowHeader:!0,cell:e=>(0,q.jsx)(HT,{id:e.item.id,withTitle:!0})},{header:`Verdict`,label:`Verdict`,cell:e=>(0,q.jsx)(vj,{verdict:e.readiness.verdict})},{header:`Why not ready`,label:`Why not ready`,cell:e=>(0,q.jsx)(bj,{readiness:e.readiness})},{header:`Assignee`,label:`Assignee`,cell:e=>yg(e.item.assignee)},{header:`Status`,label:`Status`,cell:e=>`${e.item.status??`None`} (${Ig[e.item.statusCategory]})`}];function Mj(){let{dossier:e,now:t,startReady:n}=J(),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),s=e.readiness,c=(0,v.useMemo)(()=>{let t=Vv(e.items,s);return e.items.map((e,n)=>({item:e,readiness:t[n]}))},[e,s]),[l,u]=(0,v.useState)(`all`),[d,f]=(0,v.useState)(`open`),[p,m]=(0,v.useState)(`all`),[h,g]=(0,v.useState)(`all`),[_,y]=(0,v.useState)(`all`),b=c.filter(e=>e.item.statusCategory!==`DONE`),x=Hv(b.map(e=>e.readiness)),S=b.filter(e=>e.readiness.verdict===`ready`),C={id:kj(S.map(e=>e.item)),items:S.map(e=>e.item.id)},w=e=>e.typeName??e.type,T=e=>e.assignee?yg(e.assignee):``,E=[...new Set(c.map(e=>w(e.item)))].sort(),D=[...new Set(c.map(e=>T(e.item)).filter(Boolean))].sort(),O=[...new Set(c.map(e=>e.item.source.area))].sort(),k=c.filter(e=>(d===`all`||d===`done`==(e.item.statusCategory===`DONE`))&&(l===`all`||e.readiness.verdict===l)&&(p===`all`||w(e.item)===p)&&(h===`all`||(h===`none`?!e.item.assignee:T(e.item)===h))&&(_===`all`||e.item.source.area===_)),A=[...e.calls.dossier,...e.calls.work];return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`p`,{className:`eyebrow`,children:(0,q.jsx)(`a`,{href:bg(e.name),children:e.name})}),(0,q.jsx)(`h1`,{tabIndex:-1,children:`Command Center`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`Every work item in `,e.name,`, each with its readiness verdict and, where it isn't ready, why, from the records read `,Y(t),`. `,(0,q.jsx)(Fw,{topic:`readiness`})]}),s.notes.map((e,t)=>(0,q.jsx)(`p`,{role:`note`,className:`failure`,children:e},t))]}),(0,q.jsx)(QT,{as:`ul`,min:`sm`,className:`team-strip readiness-tally`,"aria-label":`Open items by verdict`,children:nv.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(XT,{gap:`xs`,className:`team-tile`,children:[(0,q.jsx)(`h2`,{className:`readiness-tally__head`,children:(0,q.jsx)(vj,{verdict:e})}),(0,q.jsx)(`p`,{className:`team-figure`,children:x[e]}),(0,q.jsx)(`p`,{className:`note`,children:e===`ready`?`Every check passes.`:e===`thin`?`Missing acceptance criteria, description or another check a person can waive.`:`Done already, blocked by an open item, or outside the dossier.`})]})},e))}),(0,q.jsxs)(Q,{as:`section`,className:`panel readiness-slate`,"aria-labelledby":`slate`,children:[(0,q.jsx)(`h2`,{id:`slate`,children:`Start every ready item`}),(0,q.jsx)(`p`,{children:S.length?`${Oj(S.length,`item is`,`items are`)} ready and would be slated, in the dossier's order (plan ${C.id}).`:`No open item is ready, so nothing would be slated. The list below says what each one is missing.`}),S.length>0&&(0,q.jsx)(`ul`,{className:`plain cites`,"aria-label":`Slated items`,children:S.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(HT,{id:e.item.id,withTitle:!0})},e.item.id))}),(0,q.jsxs)(ZT,{className:`readiness-start`,children:[(0,q.jsxs)(W,{className:`btn`,isDisabled:!n||S.length===0||a,onPress:async()=>{if(n){o(!0);try{i({ok:!0,text:await n(C)})}catch(e){i({ok:!1,text:e instanceof Error?e.message:String(e)})}finally{o(!1)}}},"aria-describedby":`slate-note`,children:[`Start `,Oj(S.length,`ready item`)]}),(0,q.jsx)(`p`,{id:`slate-note`,className:`note`,children:n?`Assigns each item above to an agent in implement mode, as listed: proposals wait for you, and nothing leaves this machine until you apply one.`:`This view has no agent assignments, so it shows the plan it would start.`})]}),(0,q.jsx)(`p`,{className:r&&!r.ok?`failure`:`note`,role:`status`,children:r?.text??``})]}),(0,q.jsxs)(mj,{id:`cc-items`,title:`Items`,calls:A,children:[(0,q.jsxs)(ZT,{className:`readiness-filters`,role:`group`,"aria-label":`Filter the items`,children:[(0,q.jsx)(dj,{label:`Verdict`,value:l,onChange:e=>u(e),options:[{id:`all`,label:`All`},...nv.map(e=>({id:e,label:tv[e]}))]}),(0,q.jsx)(dj,{label:`Status`,value:d,onChange:f,options:Aj}),(0,q.jsx)(dj,{label:`Type`,value:p,onChange:m,options:[{id:`all`,label:`All`},...E.map(e=>({id:e,label:e}))]}),(0,q.jsx)(dj,{label:`Assignee`,value:h,onChange:g,options:[{id:`all`,label:`Anyone`},{id:`none`,label:`Unassigned`},...D.map(e=>({id:e,label:e}))]}),O.length>1&&(0,q.jsx)(dj,{label:`Source`,value:_,onChange:y,options:[{id:`all`,label:`All`},...O.map(e=>({id:e,label:`${mg(e)} (${e})`}))]})]}),(0,q.jsxs)(`p`,{className:`note`,"aria-live":`polite`,children:[`Showing `,Oj(k.length,`item`),` of `,c.length,`.`]}),k.length?(0,q.jsx)(tE,{label:`Items and their readiness`,caption:`${e.name}'s items and their readiness`,columns:jj,rows:k,rowKey:e=>e.item.id,wide:!0}):(0,q.jsx)(Cj,{message:`No item matches these filters.`,action:(0,q.jsx)(Tj,{onPress:()=>{u(`all`),f(`all`),m(`all`),g(`all`),y(`all`)},children:`Show every item`})})]})]})}function Nj(e){let{Avatar:t}=xT();return(0,q.jsx)(t,{...e})}function Pj({category:e,status:t}){let n=Ig[e];return(0,q.jsxs)(`span`,{className:`chip chip--${e.toLowerCase()}`,children:[t??n,t&&t.toLowerCase()!==n.toLowerCase()&&(0,q.jsxs)(`span`,{className:`chip-cat`,children:[` · `,n]})]})}var Fj={blocked:`M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM3.8 12.2l8.4-8.4`,"failing-build":`M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM5.5 5.5l5 5m0-5-5 5`,aging:`M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM8 4.5V8l2.5 1.5`,"deployed-not-closed":`M8 13V3m-4 4 4-4 4 4M3 14h10`,carried:`M3 9a5 5 0 0 1 9-3m0-3v3H9M13 7v6H3`,"pr-no-build":`M5 3v10M5 3a1.5 1.5 0 1 0 0 .01M11 13V7a2 2 0 0 0-2-2H7m0 0 1.5-1.5M7 5l1.5 1.5`,stale:`M4 2h8M4 14h8M5 2c0 4 6 4 6 6s-6 2-6 6M11 2c0 4-6 4-6 6s6 2 6 6`,blocking:`M5.5 2h5L14 5.5v5L10.5 14h-5L2 10.5v-5ZM5 8h6`,"built-not-deployed":`M2.5 5 8 2l5.5 3v6L8 14l-5.5-3ZM2.5 5 8 8l5.5-3M8 8v6`,unestimated:`M6 6a2 2 0 1 1 3 1.7c-.6.4-1 .8-1 1.5V10M8 12.5v.5`,added:`M8 3v10M3 8h10`};function Ij({insights:e,max:t=3,compact:n=!1}){if(!e.length)return null;let r=e.slice(0,t),i=e.slice(t);return(0,q.jsxs)(`ul`,{className:`insight-chips${n?` insight-chips--compact`:``}`,"aria-label":`Insights`,children:[r.map(e=>n?(0,q.jsxs)(`li`,{className:`insight insight--icon insight--w${e.weight}`,title:rg[e.code],children:[(0,q.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,"aria-hidden":`true`,focusable:`false`,children:(0,q.jsx)(`path`,{d:Fj[e.code]})}),(0,q.jsx)(`span`,{className:`insight-word`,children:rg[e.code]})]},e.code):(0,q.jsx)(`li`,{className:`insight insight--w${e.weight}`,children:rg[e.code]},e.code)),i.length>0&&(0,q.jsxs)(`li`,{className:`insight insight--more`,...n?{title:i.map(e=>rg[e.code]).join(`, `)}:{},children:[`+`,i.length,` more`]})]})}function Lj({of:e}){let t=tC(),n=e.outcome===`passed`||e.outcome===`failed`?t(e.outcome,e.outcome):null;return(0,q.jsxs)(`span`,{className:`outcome outcome--${e.outcome}`,children:[n&&n!==e.outcome&&(0,q.jsxs)(`span`,{className:`outcome__roll`,children:[n,`: `]}),e.state]})}function Rj(e,t,n=[]){return e.filter(e=>e.type!==`EPIC`&&e.type!==`OTHER`).map(e=>{let r=t.filter(t=>t.items.includes(e.id)),i=r.filter(e=>e.kind===`pull-request`),a=r.filter(e=>e.kind===`build`),o=[],s=e.statusCategory===`DONE`;return!s&&$h(e.id,t)?.outcome===`failed`&&o.push(`failing-build`),s&&i.length===0&&o.push(`done-without-change`),!s&&i.length>0&&i.every(e=>e.outcome===`merged`)&&o.push(`merged-not-done`),{item:e,changes:i,builds:a,deployedTo:n.filter(t=>t.items.includes(e.id)),flags:o}})}var zj={"failing-build":`Latest build failed`,"done-without-change":`Done with no linked change`,"merged-not-done":`All changes merged, item still open`},Bj=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Vj(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Hj(e){return`nodeType`in e}function Uj(e){return e?Vj(e)?e:Hj(e)?e.ownerDocument?.defaultView??window:window:window}function Wj(e){let{Document:t}=Uj(e);return e instanceof t}function Gj(e){return!Vj(e)&&e instanceof Uj(e).HTMLElement}function Kj(e){return e instanceof Uj(e).SVGElement}function qj(e){return e?Vj(e)?e.document:Hj(e)?Wj(e)?e:Gj(e)||Kj(e)?e.ownerDocument:document:document:document}var Jj=Bj?v.useLayoutEffect:v.useEffect;function Yj(e){let t=(0,v.useRef)(e);return Jj(()=>{t.current=e}),(0,v.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Xj(){let e=(0,v.useRef)(null);return[(0,v.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,v.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function Zj(e,t){t===void 0&&(t=[e]);let n=(0,v.useRef)(e);return Jj(()=>{n.current!==e&&(n.current=e)},t),n}function Qj(e,t){let n=(0,v.useRef)();return(0,v.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function $j(e){let t=Yj(e),n=(0,v.useRef)(null);return[n,(0,v.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function eM(e){let t=(0,v.useRef)();return(0,v.useEffect)(()=>{t.current=e},[e]),t.current}var tM={};function nM(e,t){return(0,v.useMemo)(()=>{if(t)return t;let n=tM[e]==null?0:tM[e]+1;return tM[e]=n,e+`-`+n},[e,t])}function rM(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var iM=rM(1),aM=rM(-1);function oM(e){return`clientX`in e&&`clientY`in e}function sM(e){if(!e)return!1;let{KeyboardEvent:t}=Uj(e.target);return t&&e instanceof t}function cM(e){if(!e)return!1;let{TouchEvent:t}=Uj(e.target);return t&&e instanceof t}function lM(e){if(cM(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return oM(e)?{x:e.clientX,y:e.clientY}:null}var uM=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[uM.Translate.toString(e),uM.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),dM=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function fM(e){return e.matches(dM)?e:e.querySelector(dM)}var pM={display:`none`};function mM(e){let{id:t,value:n}=e;return v.createElement(`div`,{id:t,style:pM},n)}function hM(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return v.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function gM(){let[e,t]=(0,v.useState)(``);return{announce:(0,v.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var _M=(0,v.createContext)(null);function vM(e){let t=(0,v.useContext)(_M);(0,v.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function yM(){let[e]=(0,v.useState)(()=>new Set),t=(0,v.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,v.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var bM={draggable:`
34
+ `),$A=e=>e.model?`${e.label} (${e.model})`:e.label,ej=`(max-width: 599px)`;function tj(e){let t=rC();return sE(ej)?t(`ask.placeholder.short`):t(`ask.placeholder`,{name:e})}function nj(e,t,n){if(e.error&&!e.stopped)return null;if(e.done)return{text:t(e.stopped?`status.stopped`:`status.done`,{seconds:ZA(e.ms??0)}),tool:null,elapsed:null};let r=e.answer?.activity,i=`${Math.max(0,Math.floor((n-e.started)/1e3))} s`;return r?.phase===`tool`?{text:t(r.source===`live`?`status.live`:r.source===`registry`?`status.registry`:`status.cache`),tool:r.tool??null,elapsed:i}:r?.phase===`writing`||e.answer&&e.answer.parts.length>0?{text:t(`status.writing`),tool:null,elapsed:i}:{text:t(`loading.answer`),tool:null,elapsed:i}}function rj(){let{analyses:e,dossier:t}=J(),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),o=(0,v.useRef)(!0),s=()=>{e&&e.list(t.name).then(e=>{o.current&&(r(e),a(null))},e=>o.current&&a(`The analyses didn't load: ${e instanceof Error?e.message:String(e)}`))};return(0,v.useEffect)(()=>(o.current=!0,s(),()=>{o.current=!1}),[e]),{list:e?n:[],error:i,refresh:s}}function ij(){let{agent:e,dossier:t,analyses:n,now:r}=J(),i=rj(),a=JS(),o=QS(),s={theme:a.name,voice:eC(a,o)},[c,l]=(0,v.useState)([]),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(null),[g,_]=(0,v.useState)(null),y=(0,v.useRef)(0),b=(0,v.useRef)(YA()),x=(0,v.useRef)(null),S=c.filter(e=>e.kind===`turn`),C=S.some(e=>!e.done);(0,v.useEffect)(()=>()=>x.current?.abort(),[]);let w=(e,t)=>l(n=>n.map(n=>n.kind===`turn`&&n.id===e?{...n,...t}:n)),T=()=>{e.adapters&&e.adapters().then(p,()=>p(null))},E=async(a,o=a)=>{if(C||!a.trim())return;let c=y.current++,d={id:b.current,turn:S.length+1},f=S.flatMap(e=>e.done&&!e.error&&e.answer?.parts.length?[{prompt:e.prompt,answer:QA(e.answer).slice(0,FT+1),by:e.answer.by}]:[]).slice(-8),p={...u?{adapter:u}:{},...f.length?{history:f}:{}},m=new AbortController;x.current=m;let g=Date.now();l(e=>[...e,{kind:`turn`,id:c,prompt:o,answer:null,error:null,done:!1,started:g,...a===`analyze`?{analyze:!0}:{}}]);try{let o=null;if(e.stream)for await(let n of e.stream(t.name,a,m.signal,s,d,p)){if(m.signal.aborted)return;o=n,w(c,{answer:n})}else o=await e.ask(t.name,a,s,d,p),w(c,{answer:o});if(!m.signal.aborted){if(w(c,{done:!0,ms:Date.now()-g}),a===`analyze`&&o&&o.parts.length){if(n?.record&&!o.analysis){let e=await n.record(t.name,o,{startedAt:new Date(g).toISOString(),at:new Date().toISOString(),items:t.items,now:r}).catch(()=>null);e&&w(c,{answer:{...o,analysis:e}})}i.refresh()}o?.session&&h(o.session)}}catch(e){if(m.signal.aborted)return;let t=e?.usage;w(c,{answer:null,error:`The agent couldn't answer: ${e instanceof Error?e.message:String(e)}`,done:!0,ms:Date.now()-g,...t?{usage:t}:{}})}},D=()=>{let e=S.find(e=>!e.done);x.current?.abort(),e&&w(e.id,{done:!0,stopped:!0,ms:Date.now()-e.started,...e.answer?{answer:{...e.answer,activity:void 0}}:{}})},O=(e,t)=>{e!==u&&(d(e),l(e=>e.length?[...e,{kind:`switch`,id:y.current++,label:t}]:e))},k=dO(),A=(0,v.useRef)(!1);(0,v.useEffect)(()=>{let e=m?.stale??null;e&&!A.current&&k?.report({key:`chat:${b.current}:${m.renewals}`,state:`stale`,notable:`stale`,agent:`The chat`,item:null,itemTitle:null,why:e.text,dossier:t.name,href:bg(t.name),mine:!0},`fresh`),A.current=e!==null},[m]);let j=()=>{e.session&&S.length&&e.session(b.current).then(e=>e&&h(e),()=>void 0)},M=S.length>0;return(0,v.useEffect)(()=>{if(!M||!e.session)return;let t=setInterval(j,XA);return()=>clearInterval(t)},[M,e]),{entries:c,turns:S,busy:C,ask:E,stop:D,adapter:u,adapters:f,refreshAdapters:T,switchTo:O,session:m,checkSession:j,renew:async()=>{if(!e.renew)return`This agent keeps no sessions, so there is nothing to renew.`;if(C)return`It is answering a question now, and a renew never interrupts one.`;_(null);try{return h(await e.renew(b.current,t.name)),l(e=>[...e,{kind:`renew`,id:y.current++}]),null}catch(e){let t=`The chat couldn't be renewed: ${e instanceof Error?e.message:String(e)}`;return _(t),t}},renewProblem:g,history:i}}var aj=(0,v.createContext)(null),oj=()=>(0,v.useContext)(aj);function sj({children:e}){let t=ij();return(0,q.jsx)(aj,{value:t,children:e})}function cj(){let{dossier:e}=J(),t=rC(),n=tj(e.name),r=oj(),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(!1);if((0,v.useEffect)(()=>{let e=()=>s(!1);return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),!r)throw Error(`The Ask bar needs the ChatScope the App puts around a dossier's pages.`);let c=r,l=c.turns[c.turns.length-1],u=()=>{s(!0),c.refreshAdapters(),c.checkSession()},d=e=>{if(e.preventDefault(),u(),!i.trim())return;let t=i;a(``),c.ask(t)},f=()=>{u(),c.ask(zT,`Analyze`)},p=(0,v.useRef)(null);return JA(e=>{e.kind===`ask`?p.current?.focus():e.kind===`analyze`&&!c.busy?f():e.kind===`agent`&&c.switchTo(e.name,e.label)}),(0,q.jsxs)(`section`,{className:`ask-bar`,"aria-label":`Ask about ${e.name}`,children:[(0,q.jsxs)(`form`,{className:`ask-bar__form`,onSubmit:d,children:[(0,q.jsx)(Yp,{className:`field-text ask-bar__field`,value:i,onChange:a,"aria-label":`Your question`,children:(0,q.jsx)(jo,{ref:p,placeholder:n,onClick:u,"data-ask-bar":``})}),(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,children:`Ask`}),(0,q.jsx)(W,{className:`btn`,onPress:f,isDisabled:c.busy,"data-analyze":``,children:`Analyze`})]}),c.session?.stale&&!o&&(0,q.jsx)(CD,{stale:c.session.stale,className:`ask-bar__stale`}),l&&!o&&(0,q.jsxs)(`p`,{className:`ask-bar__resume note`,children:[c.turns.length,` `,c.turns.length===1?`question`:`questions`,` in this chat`,l.done?``:`, ${nj(l,t,Date.now())?.text??``}`,`.`,` `,(0,q.jsx)(W,{className:`btn btn--small`,onPress:u,"data-ask-resume":``,children:`Open the conversation`})]}),(0,q.jsx)(Of,{className:`ask-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:o,onOpenChange:s,children:(0,q.jsx)(Ef,{className:`ask-modal`,children:(0,q.jsx)(lj,{chat:c,text:i,setText:a})})})]})}function lj({chat:e,text:t,setText:n}){let{agent:r,dossier:i}=J(),{health:a}=fg(),{EmptyState:o,ChatMessage:s}=ST(),c=rC(),l=tj(i.name),[u,d]=(0,v.useState)(new Set),[f,p]=(0,v.useState)(()=>Date.now()),m=(0,v.useRef)(null),{entries:h,turns:g,busy:_}=e,y=g[g.length-1],b=r.starters(i.name);(0,v.useEffect)(()=>{m.current?.scrollIntoView?.({block:`nearest`})},[h]),(0,v.useEffect)(()=>{if(!_)return;p(Date.now());let e=setInterval(()=>p(Date.now()),1e3);return()=>clearInterval(e)},[_]);let x=r=>{r.preventDefault();let i=t;n(``),e.ask(i)},S=e.adapters?.options??[],C=S.find(t=>t.name===(e.adapter??e.adapters?.chosen)),w=C?$A(C):r.label??`the agent chosen in Settings`,T=g.flatMap(e=>e.done&&(e.answer?.usage??e.usage)?[e.answer?.usage??e.usage]:[]),E=y?nj(y,c,f):null,D=e=>{let t=S.find(t=>t.name===e.adapter);return e.by===`scripted`?`a scripted preview, not a model`:t?e.model?`${t.label} (${e.model})`:t.label:e.by};return(0,q.jsxs)(uf,{className:`ask ask-focus`,"aria-labelledby":`ask`,children:[(0,q.jsxs)(`div`,{className:`ask-strip`,children:[(0,q.jsxs)(`div`,{className:`ask-strip__text`,children:[(0,q.jsxs)(ja,{slot:`title`,id:`ask`,children:[`Ask about `,i.name]}),(0,q.jsxs)(`p`,{className:`ask-strip__context note`,children:[(0,q.jsxs)(`span`,{children:[`Dossier `,i.name]}),(0,q.jsx)(`span`,{children:a?`${a.sprint.name}, day ${a.days.gone} of ${a.days.total}`:`No sprint running`}),(0,q.jsxs)(`span`,{children:[`Answered by`,` `,r.adapters?(0,q.jsx)(uj,{label:w,list:e.adapters,current:e.adapter,onPick:e.switchTo}):(0,q.jsx)(`strong`,{children:w})]})]})]}),(0,q.jsx)(dj,{agentLabel:w}),e.session?.stale&&!e.session.stale.restart&&r.renew&&(0,q.jsx)(W,{className:`btn btn--small`,onPress:()=>void e.renew(),isDisabled:_,"data-chat-renew":``,children:`Renew`}),(0,q.jsx)(W,{slot:`close`,className:`btn btn--small`,"data-ask-close":``,children:`Close`})]}),(0,q.jsxs)(`div`,{className:`ask-scroll`,"data-scroller":``,tabIndex:0,role:`region`,"aria-label":`The conversation`,children:[(0,q.jsx)(`p`,{className:`note`,children:c(`ask.note`)}),e.session?.stale&&(0,q.jsx)(CD,{stale:e.session.stale}),e.session?.stale?.restart&&(0,q.jsx)(`p`,{className:`note any-break`,children:e.session.stale.restart}),e.session?.stale&&_&&(0,q.jsx)(`p`,{className:`note`,children:`Renew waits for this answer: it never interrupts one.`}),e.renewProblem&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:e.renewProblem}),(0,q.jsxs)(`div`,{className:`log`,role:`log`,"aria-live":`polite`,"aria-busy":_,"aria-label":`Conversation`,children:[h.length===0&&(r.notice?(0,q.jsx)(`p`,{className:`note agent-notice`,children:r.notice}):(0,q.jsx)(o,{message:c(`ask.welcome`,{name:i.name}),children:(0,q.jsx)(zw,{})})),h.map(e=>e.kind===`renew`?(0,q.jsx)(`p`,{className:`ask-switch note`,children:`Renewed on today's instructions. The conversation above stays, and the next question carries a summary of it.`},`r${e.id}`):e.kind===`switch`?(0,q.jsxs)(`p`,{className:`ask-switch note`,children:[`Switched to `,e.label,` for this chat. The next question carries a summary of the conversation so far.`]},`s${e.id}`):(0,q.jsxs)(`div`,{className:`turn`,children:[(0,q.jsx)(s,{from:`you`,children:(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`span`,{className:`sr-only`,children:`You asked: `}),e.prompt]})}),e.error?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:e.error}),e.usage&&(0,q.jsx)(yD,{usage:e.usage})]}):(0,q.jsxs)(s,{from:`agent`,children:[e.answer&&e.answer.parts.length>0?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h3`,{children:e.answer.prompt}),e.done&&e.answer.warnings&&e.answer.warnings.length>0&&(0,q.jsx)(`div`,{className:`answer-checks`,"aria-label":`Checks on this answer`,children:e.answer.warnings.map((e,t)=>(0,q.jsx)(`p`,{className:`failure`,children:e},t))}),e.analyze?(0,q.jsx)(IO,{parts:e.answer.parts,done:e.done}):e.answer.parts.map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(GT,{text:e.text,chips:!0})},t)),e.done&&(0,q.jsxs)(`p`,{className:`by`,children:[e.stopped?`Stopped before the end. `:`Cites ${e.answer.citations.length} ${e.answer.citations.length===1?`item`:`items`}.${e.answer.unverified&&e.answer.unverified.length>0?` Names ${e.answer.unverified.length} its tools never returned.`:``} `,`Answered by: `,D(e.answer),e.ms===void 0?``:`, in ${ZA(e.ms)} s`,`.`,e.answer.carried?` It was given a summary of the ${e.answer.carried} earlier ${e.answer.carried===1?`turn`:`turns`}.`:``,e.answer.analysis&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(`a`,{href:Og(i.name,e.answer.analysis),"data-analysis-kept":``,children:`Kept in Analyses`}),`.`]})]}),e.done&&e.answer.usage&&(0,q.jsx)(yD,{usage:e.answer.usage})]}):e.stopped?(0,q.jsx)(`p`,{className:`note`,children:`Stopped before any answer arrived.`}):(0,q.jsx)(FA,{size:`inline`,message:c(`loading.answer`),live:!1}),e.done&&!e.stopped&&e.answer?.proposals.filter(e=>!u.has(e.id)).map(e=>(0,q.jsx)(jE,{proposal:e,onDismiss:()=>d(t=>new Set(t).add(e.id))},e.id))]})]},e.id)),(0,q.jsx)(JE,{prompts:g.filter(e=>!e.analyze).map(e=>e.prompt)}),(0,q.jsx)(`div`,{ref:m})]})]}),(0,q.jsxs)(`div`,{className:`ask-foot`,children:[E&&(0,q.jsxs)(`div`,{className:`ask-status`,children:[(0,q.jsxs)(`p`,{role:`status`,className:`ask-status__line`,"data-ask-status":``,children:[E.text,E.tool&&(0,q.jsxs)(q.Fragment,{children:[`: `,(0,q.jsx)(`code`,{children:E.tool})]}),E.elapsed&&(0,q.jsxs)(`span`,{"aria-hidden":`true`,className:`ask-status__time`,children:[` · `,E.elapsed]})]}),_&&(0,q.jsx)(W,{className:`btn btn--small`,onPress:e.stop,"data-ask-stop":``,children:`Stop`})]}),(0,q.jsx)(bD,{usages:T}),b.length>0&&(g.length===0?(0,q.jsx)(`div`,{className:`starters`,role:`group`,"aria-label":`Starter questions`,children:b.map(t=>(0,q.jsx)(W,{className:`starter`,onPress:()=>void e.ask(t.id,t.label),isDisabled:_,children:t.label},t.id))}):(0,q.jsxs)(Xd,{children:[(0,q.jsx)(W,{className:`btn btn--small ask-suggest`,isDisabled:_,"data-ask-suggestions":``,children:`Suggestions`}),(0,q.jsx)(Xu,{className:`popover menu-popover`,placement:`top start`,offset:6,children:(0,q.jsx)(Qd,{className:`menu`,"aria-label":`Suggested questions`,onAction:t=>void e.ask(String(t),b.find(e=>e.id===t)?.label??String(t)),children:b.map(e=>(0,q.jsx)(af,{id:e.id,className:`menu-item`,children:e.label},e.id))})})]})),(0,q.jsxs)(`form`,{className:`ask-form`,onSubmit:x,children:[(0,q.jsxs)(Yp,{className:`field-text`,value:t,onChange:n,isDisabled:_,autoFocus:!0,children:[(0,q.jsx)(va,{children:`Your question`}),(0,q.jsx)(jo,{placeholder:l})]}),(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,isDisabled:_||!t.trim(),children:`Ask`}),(0,q.jsx)(W,{className:`btn`,onPress:()=>void e.ask(zT,`Analyze`),isDisabled:_,children:`Analyze`})]})]})]})}function uj({label:e,list:t,current:n,onPick:r}){return(0,q.jsxs)(lf,{children:[(0,q.jsxs)(W,{className:`btn btn--small agent-switch`,"data-agent-switch":``,children:[e,(0,q.jsx)(`span`,{"aria-hidden":`true`,children:` ▾`}),(0,q.jsx)(`span`,{className:`sr-only`,children:`, change the agent for this chat`})]}),(0,q.jsx)(Xu,{className:`popover agent-switch__popover`,placement:`bottom start`,offset:6,children:(0,q.jsx)(uf,{className:`agent-switch__dialog`,"aria-labelledby":`agent-switch-title`,children:({close:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(ja,{slot:`title`,id:`agent-switch-title`,className:`ask-info__title`,children:`Agent for this chat`}),t?(0,q.jsx)(`ul`,{className:`agent-picks`,children:t.options.map(i=>{let a=(n??t.chosen)===i.name;return(0,q.jsxs)(`li`,{className:`agent-pick`,children:[(0,q.jsxs)(W,{className:`agent-pick__button`,isDisabled:!i.ready,"aria-current":a?!0:void 0,onPress:()=>{r(i.name===t.chosen?null:i.name,$A(i)),e()},children:[(0,q.jsx)(`strong`,{children:i.label}),(0,q.jsxs)(`span`,{className:`note`,children:[i.name===`scripted`?`Canned answers, no model`:i.model?`Model ${i.model}`:`Its CLI's default model`,i.name===t.chosen&&i.name!==`scripted`?`, the default from Settings`:``]}),(0,q.jsx)(`span`,{className:i.ready?`agent-pick__ready`:`agent-missing`,children:a?`Answering`:i.ready?`Ready`:`Unavailable`})]}),!i.ready&&(0,q.jsxs)(`p`,{className:`note agent-pick__why`,children:[i.problem,i.fix?` ${i.fix}`:``,i.action&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(`a`,{href:`#/settings/agent`,onClick:e,children:i.action===`install`?`Install ${i.label}`:`Fix ${i.label}`})]})]})]},i.name)})}):(0,q.jsx)(`p`,{className:`note`,children:`Reading the agents…`}),(0,q.jsx)(`p`,{className:`note`,children:`Switching holds for this chat, from its next question. The default stays under Settings, Agent.`})]})})})]})}function dj({agentLabel:e}){let t=JS(),n=eC(t,QS())?`Answers are written in ${t.label}'s voice, or in your own custom voice if you saved one. A voice changes their phrasing only: citations, figures and proposals stay exact.`:t.voice?`Themed agent voice is off, so answers are in plain wording, whatever the theme.`:`${t.label} has no voice of its own, so answers are in plain wording.`;return(0,q.jsxs)(lf,{children:[(0,q.jsxs)(W,{className:`btn info-button`,"data-ask-info":``,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`info-button__mark`,children:`i`}),(0,q.jsx)(`span`,{className:`sr-only`,children:`About these answers`})]}),(0,q.jsx)(Xu,{className:`popover ask-info`,placement:`bottom end`,offset:6,children:(0,q.jsxs)(uf,{className:`ask-info__dialog`,"aria-labelledby":`ask-info-title`,children:[(0,q.jsx)(ja,{slot:`title`,id:`ask-info-title`,className:`ask-info__title`,children:`About these answers`}),(0,q.jsx)(`p`,{children:n}),(0,q.jsxs)(`p`,{children:[`Answered by `,e??`the agent chosen in Settings`,`.`]}),(0,q.jsx)(`p`,{children:`The agent only reads: its tools can't change a ticket, and anything it suggests comes back as a proposal for you to apply.`}),(0,q.jsxs)(`p`,{children:[`Change the voice under `,(0,q.jsx)(`a`,{href:`#/settings/toil`,children:`Settings, General`}),`, and add your own instructions or voice under `,(0,q.jsx)(`a`,{href:`#/settings/agent`,children:`Settings, Agent`}),`.`]}),(0,q.jsx)(Lw,{entries:lw.answers.glossary})]})})]})}function fj({label:e,value:t,options:n,onChange:r}){return(0,q.jsxs)(Bp,{className:`choice`,selectedKey:t,onSelectionChange:e=>e!==null&&r(String(e)),children:[(0,q.jsx)(va,{children:e}),(0,q.jsxs)(W,{className:`btn choice-button`,children:[(0,q.jsx)(Wp,{children:()=>n.find(e=>e.id===t)?.label??t}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`▾`})]}),(0,q.jsx)(Xu,{className:`popover`,children:(0,q.jsx)(Xc,{className:`menu`,children:n.map(e=>(0,q.jsx)(el,{id:e.id,className:`menu-item`,children:e.label},e.id))})})]})}function pj(e){let t=[];for(let n of e){let e=t.find(e=>e.command===n.command);e?e.count++:t.push({command:n.command,count:1})}return t}function mj({calls:e,alerts:t=!0}){if(!e.length)return null;let n=pj(e),r=t?e.filter(e=>!e.ok):[];return(0,q.jsxs)(q.Fragment,{children:[r.map((e,t)=>(0,q.jsxs)(`p`,{role:`alert`,className:`failure`,children:[(0,q.jsxs)(`code`,{children:[`toil `,e.command]}),` failed: `,e.error]},t)),(0,q.jsxs)(`details`,{className:`fed-by`,children:[(0,q.jsxs)(`summary`,{children:[`Fed by`,` `,n.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`, `,(0,q.jsxs)(`code`,{children:[`toil `,e.command]}),e.count>1&&` ×${e.count}`]},e.command))]}),(0,q.jsx)(`ul`,{className:`plain calls`,children:e.map((e,t)=>(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`code`,{className:`call`,children:[`execute(`,JSON.stringify(e.command),`, `,JSON.stringify(e.input),`)`]}),!e.ok&&(0,q.jsx)(`span`,{className:`failure`,children:` (failed)`})]},t))})]})]})}function hj({id:e,title:t,calls:n,children:r,alerts:i=!0}){let{Panel:a}=ST();return(0,q.jsx)(Q,{as:`section`,className:`panel`,"aria-labelledby":e,children:(0,q.jsxs)(a,{id:e,children:[(0,q.jsx)(`h2`,{id:e,children:t}),r,(0,q.jsx)(mj,{calls:n,alerts:i})]})})}var gj={pass:`✓`,thin:`!`,fail:`✕`},_j={pass:`Passes`,thin:`Thin`,fail:`Fails`},vj={ready:`✓`,thin:`!`,blocked:`✕`};function yj({verdict:e}){return(0,q.jsxs)(`span`,{className:`verdict verdict--${e}`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,children:vj[e]}),` `,tv[e]]})}function bj({readiness:e}){return(0,q.jsx)(`ul`,{className:`rows readiness-rows`,children:e.rows.map(e=>(0,q.jsxs)(`li`,{className:`readiness-row readiness-row--${e.state}`,children:[(0,q.jsx)(`span`,{className:`readiness-mark`,"aria-hidden":`true`,children:gj[e.state]}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:e.label}),` `,(0,q.jsx)(`span`,{className:`readiness-state`,children:_j[e.state]}),`: `,(0,q.jsx)(GT,{text:e.reason}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`Source: `,(0,q.jsx)(`code`,{children:e.source})]})]})]},e.check))})}function xj({readiness:e}){return e.why.length?(0,q.jsx)(`ul`,{className:`why-not`,children:e.why.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`strong`,{children:[e.label,`:`]}),` `,(0,q.jsx)(GT,{text:e.reason})]},e.check))}):(0,q.jsx)(`span`,{className:`field`,children:`Every check passes.`})}var Sj={ready:`Every check passes: an agent can start on it.`,thin:`Something is missing. A person can still decide to start it on its own, but the Command Center never slates it.`,blocked:`It can't be worked on as it is, so it is never started.`};function Cj({item:e}){let{dossier:t,byId:n,execute:r}=J(),i=t.readiness,[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),l=Bv({item:e,settings:i,byId:n,...a?{live:a.result}:{}}),u=e.statusCategory===`DONE`?null:Tv(e);return(0,q.jsxs)(Q,{as:`section`,className:`panel readiness-panel`,"aria-labelledby":`readiness`,children:[(0,q.jsx)(`h2`,{id:`readiness`,children:`Ready for an agent?`}),(0,q.jsxs)(`p`,{className:`readiness-verdict`,children:[(0,q.jsx)(yj,{verdict:l.verdict}),` `,Sj[l.verdict]]}),(0,q.jsx)(bj,{readiness:l}),u&&r&&(0,q.jsxs)(`p`,{className:`readiness-live`,children:[(0,q.jsx)(W,{className:`btn btn--small`,onPress:async()=>{if(!r||!u)return;c(!0);let n=await r(u.command,{dossier:t.name,...u.input},oS);o({result:Ov(e,u.command,n.ok?n.data:null,n.ok?void 0:`${n.error.message}${n.error.fix?` ${n.error.fix}`:``}`),at:new Date().toISOString()}),c(!1)},isDisabled:s,children:s?`Reading the workflow…`:a?`Read the workflow again`:`Check the workflow live`}),` `,(0,q.jsx)(`span`,{className:`field`,"aria-live":`polite`,children:a?`Read live ${Y(a.at)} with toil ${u.command}.`:`One read-only call, toil ${u.command}, settles the done state.`})]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Worked out from the cached record`,a?` and one live read`:``,`, with no model call. The checks and their settings (fields.acceptanceCriteria, readiness.minWords, readiness.templates in the `,e.source.area,` section) are in Toil UI's README.`]}),i.notes.map((e,t)=>(0,q.jsx)(`p`,{role:`note`,className:`failure`,children:e},t))]})}function wj({message:e,action:t,help:n}){let{EmptyState:r}=ST();return(0,q.jsx)(r,{message:e,children:(0,q.jsxs)(`p`,{className:`empty-action`,"data-empty-action":``,children:[t,n&&(0,q.jsx)(Iw,{topic:n})]})})}function Tj({href:e,children:t,edit:n=!1}){return(0,q.jsxs)(`a`,{className:`btn btn--small empty-action__link`,href:e,children:[n&&(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`empty-action__pencil`,children:`✎`}),t]})}function Ej({onPress:e,children:t,disabled:n=!1}){return(0,q.jsx)(W,{className:`btn btn--small`,onPress:e,isDisabled:n,children:t})}function Dj({sync:e,children:t}){return e?(0,q.jsx)(Ej,{onPress:e,children:`Sync now`}):(0,q.jsx)(q.Fragment,{children:t})}function Oj({dossier:e,sync:t}){return(0,q.jsx)(Dj,{sync:t,children:(0,q.jsx)(Tj,{edit:!0,href:Mg(e,`sources`),children:`Check the dossier's sources`})})}var kj=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function Aj(e){let t=2166136261;for(let n of e.map(e=>`${e.id}@${e.updated??``}@${e.status??``}`).join(`
35
+ `))t^=n.charCodeAt(0),t=Math.imul(t,16777619)>>>0;return t.toString(16).padStart(8,`0`)}var jj=[{id:`open`,label:`Not done`},{id:`done`,label:`Done`},{id:`all`,label:`All`}],Mj=[{header:`Item`,label:`Item`,rowHeader:!0,cell:e=>(0,q.jsx)(UT,{id:e.item.id,withTitle:!0})},{header:`Verdict`,label:`Verdict`,cell:e=>(0,q.jsx)(yj,{verdict:e.readiness.verdict})},{header:`Why not ready`,label:`Why not ready`,cell:e=>(0,q.jsx)(xj,{readiness:e.readiness})},{header:`Assignee`,label:`Assignee`,cell:e=>yg(e.item.assignee)},{header:`Status`,label:`Status`,cell:e=>`${e.item.status??`None`} (${Ig[e.item.statusCategory]})`}];function Nj(){let{dossier:e,now:t,startReady:n}=J(),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),s=e.readiness,c=(0,v.useMemo)(()=>{let t=Vv(e.items,s);return e.items.map((e,n)=>({item:e,readiness:t[n]}))},[e,s]),[l,u]=(0,v.useState)(`all`),[d,f]=(0,v.useState)(`open`),[p,m]=(0,v.useState)(`all`),[h,g]=(0,v.useState)(`all`),[_,y]=(0,v.useState)(`all`),b=c.filter(e=>e.item.statusCategory!==`DONE`),x=Hv(b.map(e=>e.readiness)),S=b.filter(e=>e.readiness.verdict===`ready`),C={id:Aj(S.map(e=>e.item)),items:S.map(e=>e.item.id)},w=e=>e.typeName??e.type,T=e=>e.assignee?yg(e.assignee):``,E=[...new Set(c.map(e=>w(e.item)))].sort(),D=[...new Set(c.map(e=>T(e.item)).filter(Boolean))].sort(),O=[...new Set(c.map(e=>e.item.source.area))].sort(),k=c.filter(e=>(d===`all`||d===`done`==(e.item.statusCategory===`DONE`))&&(l===`all`||e.readiness.verdict===l)&&(p===`all`||w(e.item)===p)&&(h===`all`||(h===`none`?!e.item.assignee:T(e.item)===h))&&(_===`all`||e.item.source.area===_)),A=[...e.calls.dossier,...e.calls.work];return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`p`,{className:`eyebrow`,children:(0,q.jsx)(`a`,{href:bg(e.name),children:e.name})}),(0,q.jsx)(`h1`,{tabIndex:-1,children:`Command Center`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`Every work item in `,e.name,`, each with its readiness verdict and, where it isn't ready, why, from the records read `,Y(t),`. `,(0,q.jsx)(Iw,{topic:`readiness`})]}),s.notes.map((e,t)=>(0,q.jsx)(`p`,{role:`note`,className:`failure`,children:e},t))]}),(0,q.jsx)($T,{as:`ul`,min:`sm`,className:`team-strip readiness-tally`,"aria-label":`Open items by verdict`,children:nv.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(ZT,{gap:`xs`,className:`team-tile`,children:[(0,q.jsx)(`h2`,{className:`readiness-tally__head`,children:(0,q.jsx)(yj,{verdict:e})}),(0,q.jsx)(`p`,{className:`team-figure`,children:x[e]}),(0,q.jsx)(`p`,{className:`note`,children:e===`ready`?`Every check passes.`:e===`thin`?`Missing acceptance criteria, description or another check a person can waive.`:`Done already, blocked by an open item, or outside the dossier.`})]})},e))}),(0,q.jsxs)(Q,{as:`section`,className:`panel readiness-slate`,"aria-labelledby":`slate`,children:[(0,q.jsx)(`h2`,{id:`slate`,children:`Start every ready item`}),(0,q.jsx)(`p`,{children:S.length?`${kj(S.length,`item is`,`items are`)} ready and would be slated, in the dossier's order (plan ${C.id}).`:`No open item is ready, so nothing would be slated. The list below says what each one is missing.`}),S.length>0&&(0,q.jsx)(`ul`,{className:`plain cites`,"aria-label":`Slated items`,children:S.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(UT,{id:e.item.id,withTitle:!0})},e.item.id))}),(0,q.jsxs)(QT,{className:`readiness-start`,children:[(0,q.jsxs)(W,{className:`btn`,isDisabled:!n||S.length===0||a,onPress:async()=>{if(n){o(!0);try{i({ok:!0,text:await n(C)})}catch(e){i({ok:!1,text:e instanceof Error?e.message:String(e)})}finally{o(!1)}}},"aria-describedby":`slate-note`,children:[`Start `,kj(S.length,`ready item`)]}),(0,q.jsx)(`p`,{id:`slate-note`,className:`note`,children:n?`Assigns each item above to an agent in implement mode, as listed: proposals wait for you, and nothing leaves this machine until you apply one.`:`This view has no agent assignments, so it shows the plan it would start.`})]}),(0,q.jsx)(`p`,{className:r&&!r.ok?`failure`:`note`,role:`status`,children:r?.text??``})]}),(0,q.jsxs)(hj,{id:`cc-items`,title:`Items`,calls:A,children:[(0,q.jsxs)(QT,{className:`readiness-filters`,role:`group`,"aria-label":`Filter the items`,children:[(0,q.jsx)(fj,{label:`Verdict`,value:l,onChange:e=>u(e),options:[{id:`all`,label:`All`},...nv.map(e=>({id:e,label:tv[e]}))]}),(0,q.jsx)(fj,{label:`Status`,value:d,onChange:f,options:jj}),(0,q.jsx)(fj,{label:`Type`,value:p,onChange:m,options:[{id:`all`,label:`All`},...E.map(e=>({id:e,label:e}))]}),(0,q.jsx)(fj,{label:`Assignee`,value:h,onChange:g,options:[{id:`all`,label:`Anyone`},{id:`none`,label:`Unassigned`},...D.map(e=>({id:e,label:e}))]}),O.length>1&&(0,q.jsx)(fj,{label:`Source`,value:_,onChange:y,options:[{id:`all`,label:`All`},...O.map(e=>({id:e,label:`${mg(e)} (${e})`}))]})]}),(0,q.jsxs)(`p`,{className:`note`,"aria-live":`polite`,children:[`Showing `,kj(k.length,`item`),` of `,c.length,`.`]}),k.length?(0,q.jsx)(nE,{label:`Items and their readiness`,caption:`${e.name}'s items and their readiness`,columns:Mj,rows:k,rowKey:e=>e.item.id,wide:!0}):(0,q.jsx)(wj,{message:`No item matches these filters.`,action:(0,q.jsx)(Ej,{onPress:()=>{u(`all`),f(`all`),m(`all`),g(`all`),y(`all`)},children:`Show every item`})})]})]})}function Pj(e){let{Avatar:t}=ST();return(0,q.jsx)(t,{...e})}function Fj({category:e,status:t}){let n=Ig[e];return(0,q.jsxs)(`span`,{className:`chip chip--${e.toLowerCase()}`,children:[t??n,t&&t.toLowerCase()!==n.toLowerCase()&&(0,q.jsxs)(`span`,{className:`chip-cat`,children:[` · `,n]})]})}var Ij={blocked:`M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM3.8 12.2l8.4-8.4`,"failing-build":`M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM5.5 5.5l5 5m0-5-5 5`,aging:`M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM8 4.5V8l2.5 1.5`,"deployed-not-closed":`M8 13V3m-4 4 4-4 4 4M3 14h10`,carried:`M3 9a5 5 0 0 1 9-3m0-3v3H9M13 7v6H3`,"pr-no-build":`M5 3v10M5 3a1.5 1.5 0 1 0 0 .01M11 13V7a2 2 0 0 0-2-2H7m0 0 1.5-1.5M7 5l1.5 1.5`,stale:`M4 2h8M4 14h8M5 2c0 4 6 4 6 6s-6 2-6 6M11 2c0 4-6 4-6 6s6 2 6 6`,blocking:`M5.5 2h5L14 5.5v5L10.5 14h-5L2 10.5v-5ZM5 8h6`,"built-not-deployed":`M2.5 5 8 2l5.5 3v6L8 14l-5.5-3ZM2.5 5 8 8l5.5-3M8 8v6`,unestimated:`M6 6a2 2 0 1 1 3 1.7c-.6.4-1 .8-1 1.5V10M8 12.5v.5`,added:`M8 3v10M3 8h10`};function Lj({insights:e,max:t=3,compact:n=!1}){if(!e.length)return null;let r=e.slice(0,t),i=e.slice(t);return(0,q.jsxs)(`ul`,{className:`insight-chips${n?` insight-chips--compact`:``}`,"aria-label":`Insights`,children:[r.map(e=>n?(0,q.jsxs)(`li`,{className:`insight insight--icon insight--w${e.weight}`,title:rg[e.code],children:[(0,q.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,"aria-hidden":`true`,focusable:`false`,children:(0,q.jsx)(`path`,{d:Ij[e.code]})}),(0,q.jsx)(`span`,{className:`insight-word`,children:rg[e.code]})]},e.code):(0,q.jsx)(`li`,{className:`insight insight--w${e.weight}`,children:rg[e.code]},e.code)),i.length>0&&(0,q.jsxs)(`li`,{className:`insight insight--more`,...n?{title:i.map(e=>rg[e.code]).join(`, `)}:{},children:[`+`,i.length,` more`]})]})}function Rj({of:e}){let t=nC(),n=e.outcome===`passed`||e.outcome===`failed`?t(e.outcome,e.outcome):null;return(0,q.jsxs)(`span`,{className:`outcome outcome--${e.outcome}`,children:[n&&n!==e.outcome&&(0,q.jsxs)(`span`,{className:`outcome__roll`,children:[n,`: `]}),e.state]})}function zj(e,t,n=[]){return e.filter(e=>e.type!==`EPIC`&&e.type!==`OTHER`).map(e=>{let r=t.filter(t=>t.items.includes(e.id)),i=r.filter(e=>e.kind===`pull-request`),a=r.filter(e=>e.kind===`build`),o=[],s=e.statusCategory===`DONE`;return!s&&$h(e.id,t)?.outcome===`failed`&&o.push(`failing-build`),s&&i.length===0&&o.push(`done-without-change`),!s&&i.length>0&&i.every(e=>e.outcome===`merged`)&&o.push(`merged-not-done`),{item:e,changes:i,builds:a,deployedTo:n.filter(t=>t.items.includes(e.id)),flags:o}})}var Bj={"failing-build":`Latest build failed`,"done-without-change":`Done with no linked change`,"merged-not-done":`All changes merged, item still open`},Vj=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Hj(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Uj(e){return`nodeType`in e}function Wj(e){return e?Hj(e)?e:Uj(e)?e.ownerDocument?.defaultView??window:window:window}function Gj(e){let{Document:t}=Wj(e);return e instanceof t}function Kj(e){return!Hj(e)&&e instanceof Wj(e).HTMLElement}function qj(e){return e instanceof Wj(e).SVGElement}function Jj(e){return e?Hj(e)?e.document:Uj(e)?Gj(e)?e:Kj(e)||qj(e)?e.ownerDocument:document:document:document}var Yj=Vj?v.useLayoutEffect:v.useEffect;function Xj(e){let t=(0,v.useRef)(e);return Yj(()=>{t.current=e}),(0,v.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Zj(){let e=(0,v.useRef)(null);return[(0,v.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,v.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function Qj(e,t){t===void 0&&(t=[e]);let n=(0,v.useRef)(e);return Yj(()=>{n.current!==e&&(n.current=e)},t),n}function $j(e,t){let n=(0,v.useRef)();return(0,v.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function eM(e){let t=Xj(e),n=(0,v.useRef)(null);return[n,(0,v.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function tM(e){let t=(0,v.useRef)();return(0,v.useEffect)(()=>{t.current=e},[e]),t.current}var nM={};function rM(e,t){return(0,v.useMemo)(()=>{if(t)return t;let n=nM[e]==null?0:nM[e]+1;return nM[e]=n,e+`-`+n},[e,t])}function iM(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var aM=iM(1),oM=iM(-1);function sM(e){return`clientX`in e&&`clientY`in e}function cM(e){if(!e)return!1;let{KeyboardEvent:t}=Wj(e.target);return t&&e instanceof t}function lM(e){if(!e)return!1;let{TouchEvent:t}=Wj(e.target);return t&&e instanceof t}function uM(e){if(lM(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return sM(e)?{x:e.clientX,y:e.clientY}:null}var dM=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[dM.Translate.toString(e),dM.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),fM=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function pM(e){return e.matches(fM)?e:e.querySelector(fM)}var mM={display:`none`};function hM(e){let{id:t,value:n}=e;return v.createElement(`div`,{id:t,style:mM},n)}function gM(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return v.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function _M(){let[e,t]=(0,v.useState)(``);return{announce:(0,v.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var vM=(0,v.createContext)(null);function yM(e){let t=(0,v.useContext)(vM);(0,v.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function bM(){let[e]=(0,v.useState)(()=>new Set),t=(0,v.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,v.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var xM={draggable:`
36
36
  To pick up a draggable item, press the space bar.
37
37
  While dragging, use the arrow keys to move the item.
38
38
  Press space again to drop the item in its new position, or press escape to cancel.
39
- `},xM={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function SM(e){let{announcements:t=xM,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=bM}=e,{announce:a,announcement:o}=gM(),s=nM(`DndLiveRegion`),[c,l]=(0,v.useState)(!1);if((0,v.useEffect)(()=>{l(!0)},[]),vM((0,v.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=v.createElement(v.Fragment,null,v.createElement(mM,{id:r,value:i.draggable}),v.createElement(hM,{id:s,announcement:o}));return n?(0,si.createPortal)(u,n):u}var CM;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(CM||={});function wM(){}function TM(e,t){return(0,v.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function EM(){var e=[...arguments];return(0,v.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var DM=Object.freeze({x:0,y:0});function OM(e,t){let n=lM(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function kM(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function AM(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function jM(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var MM=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=jM(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(kM)};function NM(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function PM(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:DM}function FM(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var IM=FM(1);function LM(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function RM(e,t,n){let r=LM(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var zM={ignoreTransform:!1};function BM(e,t){t===void 0&&(t=zM);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Uj(e).getComputedStyle(e);t&&(n=RM(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function VM(e){return BM(e,{ignoreTransform:!0})}function HM(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function UM(e,t){return t===void 0&&(t=Uj(e).getComputedStyle(e)),t.position===`fixed`}function WM(e,t){t===void 0&&(t=Uj(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function GM(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Wj(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Gj(i)||Kj(i)||n.includes(i))return n;let a=Uj(e).getComputedStyle(i);return i!==e&&WM(i,a)&&n.push(i),UM(i,a)?n:r(i.parentNode)}return e?r(e):n}function KM(e){let[t]=GM(e,1);return t??null}function qM(e){return!Bj||!e?null:Vj(e)?e:Hj(e)?Wj(e)||e===qj(e).scrollingElement?window:Gj(e)?e:null:null}function JM(e){return Vj(e)?e.scrollX:e.scrollLeft}function YM(e){return Vj(e)?e.scrollY:e.scrollTop}function XM(e){return{x:JM(e),y:YM(e)}}var ZM;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(ZM||={});function QM(e){return!Bj||!e?!1:e===document.scrollingElement}function $M(e){let t={x:0,y:0},n=QM(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var eN={x:.2,y:.2};function tN(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=eN);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=$M(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=ZM.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=ZM.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=ZM.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=ZM.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function nN(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function rN(e){return e.reduce((e,t)=>iM(e,XM(t)),DM)}function iN(e){return e.reduce((e,t)=>e+JM(t),0)}function aN(e){return e.reduce((e,t)=>e+YM(t),0)}function oN(e,t){if(t===void 0&&(t=BM),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);KM(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var sN=[[`x`,[`left`,`right`],iN],[`y`,[`top`,`bottom`],aN]],cN=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=GM(t),r=rN(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of sN)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},lN=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function uN(e){let{EventTarget:t}=Uj(e);return e instanceof t?e:qj(e)}function dN(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var fN;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(fN||={});function pN(e){e.preventDefault()}function mN(e){e.stopPropagation()}var hN;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(hN||={});var gN={start:[hN.Space,hN.Enter],cancel:[hN.Esc],end:[hN.Space,hN.Enter,hN.Tab]},_N=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case hN.Right:return{...n,x:n.x+25};case hN.Left:return{...n,x:n.x-25};case hN.Down:return{...n,y:n.y+25};case hN.Up:return{...n,y:n.y-25}}},vN=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new lN(qj(t)),this.windowListeners=new lN(Uj(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(fN.Resize,this.handleCancel),this.windowListeners.add(fN.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(fN.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&oN(n),t(DM)}handleKeyDown(e){if(sM(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=gN,coordinateGetter:a=_N,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:DM;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=aM(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=$M(n),p=nN(n),m={x:Math.min(i===hN.Right?p.right-p.width/2:p.right,Math.max(i===hN.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===hN.Down?p.bottom-p.height/2:p.bottom,Math.max(i===hN.Down?p.top:p.top+p.height/2,u.y))},h=i===hN.Right&&!s||i===hN.Left&&!c,g=i===hN.Down&&!l||i===hN.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===hN.Right&&e<=d.x||i===hN.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===hN.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===hN.Down&&e<=d.y||i===hN.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===hN.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,iM(aM(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};vN.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=gN,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function yN(e){return!!(e&&`distance`in e)}function bN(e){return!!(e&&`delay`in e)}var xN=class{constructor(e,t,n){n===void 0&&(n=uN(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=qj(i),this.documentListeners=new lN(this.document),this.listeners=new lN(n),this.windowListeners=new lN(Uj(i)),this.initialCoordinates=lM(r)??DM,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(fN.Resize,this.handleCancel),this.windowListeners.add(fN.DragStart,pN),this.windowListeners.add(fN.VisibilityChange,this.handleCancel),this.windowListeners.add(fN.ContextMenu,pN),this.documentListeners.add(fN.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(bN(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(yN(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(fN.Click,mN,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(fN.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=lM(e)??DM,s=aM(n,o);if(!t&&a){if(yN(a)){if(a.tolerance!=null&&dN(s,a.tolerance))return this.handleCancel();if(dN(s,a.distance))return this.handleStart()}if(bN(a)&&dN(s,a.tolerance))return this.handleCancel();this.handlePending(a,s)}else e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===hN.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},SN={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},CN=class extends xN{constructor(e){let{event:t}=e,n=qj(t.target);super(e,SN,n)}};CN.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var wN={move:{name:`mousemove`},end:{name:`mouseup`}},TN;(function(e){e[e.RightClick=2]=`RightClick`})(TN||={});var EN=class extends xN{constructor(e){super(e,wN,qj(e.event.target))}};EN.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==TN.RightClick&&(r?.({event:n}),!0)}}];var DN={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},ON=class extends xN{constructor(e){super(e,DN)}static setup(){return window.addEventListener(DN.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(DN.move.name,e)};function e(){}}};ON.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var kN;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(kN||={});var AN;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(AN||={});function jN(e){let{acceleration:t,activator:n=kN.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=AN.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=NN({delta:d,disabled:!a}),[m,h]=Xj(),g=(0,v.useRef)({x:0,y:0}),_=(0,v.useRef)({x:0,y:0}),y=(0,v.useMemo)(()=>{switch(n){case kN.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case kN.DraggableRect:return i}},[n,i,c]),b=(0,v.useRef)(null),x=(0,v.useCallback)(()=>{let e=b.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),S=(0,v.useMemo)(()=>s===AN.TreeOrder?[...l].reverse():l,[s,l]);(0,v.useEffect)(()=>{if(!a||!l.length||!y)h();else{for(let e of S){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=tN(e,i,y,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),b.current=e,m(x,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()}},[t,x,r,h,a,o,JSON.stringify(y),JSON.stringify(p),m,l,S,u,JSON.stringify(f)])}var MN={x:{[ZM.Backward]:!1,[ZM.Forward]:!1},y:{[ZM.Backward]:!1,[ZM.Forward]:!1}};function NN(e){let{delta:t,disabled:n}=e,r=eM(t);return Qj(e=>{if(n||!r||!e)return MN;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[ZM.Backward]:e.x[ZM.Backward]||i.x===-1,[ZM.Forward]:e.x[ZM.Forward]||i.x===1},y:{[ZM.Backward]:e.y[ZM.Backward]||i.y===-1,[ZM.Forward]:e.y[ZM.Forward]||i.y===1}}},[n,t,r])}function PN(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return Qj(e=>t==null?null:r??e??null,[r,t])}function FN(e,t){return(0,v.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var IN;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(IN||={});var LN;(function(e){e.Optimized=`optimized`})(LN||={});var RN=new Map;function zN(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,v.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,v.useRef)(e),d=g(),f=Zj(d),p=(0,v.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,v.useRef)(null),h=Qj(t=>{if(d&&!n)return RN;if(!t||t===RN||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new cN(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,v.useEffect)(()=>{u.current=e},[e]),(0,v.useEffect)(()=>{d||p()},[n,d]),(0,v.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,v.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case IN.Always:return!1;case IN.BeforeDragging:return n;default:return!n}}}function BN(e,t){return Qj(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function VN(e,t){return BN(e,t)}function HN(e){let{callback:t,disabled:n}=e,r=Yj(t),i=(0,v.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,v.useEffect)(()=>()=>i?.disconnect(),[i]),i}function UN(e){let{callback:t,disabled:n}=e,r=Yj(t),i=(0,v.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,v.useEffect)(()=>()=>i?.disconnect(),[i]),i}function WN(e){return new cN(BM(e),e)}function GN(e,t,n){t===void 0&&(t=WN);let[r,i]=(0,v.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=HN({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=UN({callback:a});return Jj(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function KN(e){return PM(e,BN(e))}var qN=[];function JN(e){let t=(0,v.useRef)(e),n=Qj(n=>e?n&&n!==qN&&e&&t.current&&e.parentNode===t.current.parentNode?n:GM(e):qN,[e]);return(0,v.useEffect)(()=>{t.current=e},[e]),n}function YN(e){let[t,n]=(0,v.useState)(null),r=(0,v.useRef)(e),i=(0,v.useCallback)(e=>{let t=qM(e.target);t&&n(e=>e?(e.set(t,XM(t)),new Map(e)):null)},[]);return(0,v.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=qM(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,XM(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{qM(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,v.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>iM(e,t),DM):rN(e):DM,[e,t])}function XN(e,t){t===void 0&&(t=[]);let n=(0,v.useRef)(null);return(0,v.useEffect)(()=>{n.current=null},t),(0,v.useEffect)(()=>{let t=e!==DM;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?aM(e,n.current):DM}function ZN(e){(0,v.useEffect)(()=>{if(!Bj)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function QN(e,t){return(0,v.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function $N(e){return(0,v.useMemo)(()=>e?HM(e):null,[e])}var eP=[];function tP(e,t){t===void 0&&(t=BM);let[n]=e,r=$N(n?Uj(n):null),[i,a]=(0,v.useState)(eP);function o(){a(()=>e.length?e.map(e=>QM(e)?r:new cN(t(e),e)):eP)}let s=UN({callback:o});return Jj(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function nP(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Gj(t)?t:e}function rP(e){let{measure:t}=e,[n,r]=(0,v.useState)(null),i=UN({callback:(0,v.useCallback)(e=>{for(let{target:n}of e)if(Gj(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=$j((0,v.useCallback)(e=>{let n=nP(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,v.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var iP=[{sensor:CN,options:{}},{sensor:vN,options:{}}],aP={current:{}},oP={draggable:{measure:VM},droppable:{measure:VM,strategy:IN.WhileDragging,frequency:LN.Optimized},dragOverlay:{measure:BM}},sP=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},cP={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new sP,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:wM},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:oP,measureDroppableContainers:wM,windowRect:null,measuringScheduled:!1},lP={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:wM,draggableNodes:new Map,over:null,measureDroppableContainers:wM},uP=(0,v.createContext)(lP),dP=(0,v.createContext)(cP);function fP(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new sP}}}function pP(e,t){switch(t.type){case CM.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case CM.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case CM.DragEnd:case CM.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case CM.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new sP(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case CM.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new sP(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case CM.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new sP(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function mP(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,v.useContext)(uP),a=eM(r),o=eM(n?.id);return(0,v.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!sM(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=fM(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function hP(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function gP(e){return(0,v.useMemo)(()=>({draggable:{...oP.draggable,...e?.draggable},droppable:{...oP.droppable,...e?.droppable},dragOverlay:{...oP.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function _P(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,v.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;Jj(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=PM(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=KM(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var vP=(0,v.createContext)({...DM,scaleX:1,scaleY:1}),yP;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(yP||={});var bP=(0,v.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=iP,collisionDetection:o=MM,measuring:s,modifiers:c,...l}=e,[u,d]=(0,v.useReducer)(pP,void 0,fP),[f,p]=yM(),[m,h]=(0,v.useState)(yP.Uninitialized),g=m===yP.Initialized,{draggable:{active:_,nodes:y,translate:b},droppable:{containers:x}}=u,S=_==null?null:y.get(_),C=(0,v.useRef)({initial:null,translated:null}),w=(0,v.useMemo)(()=>_==null?null:{id:_,data:S?.data??aP,rect:C},[_,S]),T=(0,v.useRef)(null),[E,D]=(0,v.useState)(null),[O,k]=(0,v.useState)(null),A=Zj(l,Object.values(l)),j=nM(`DndDescribedBy`,t),M=(0,v.useMemo)(()=>x.getEnabled(),[x]),ee=gP(s),{droppableRects:te,measureDroppableContainers:ne,measuringScheduled:re}=zN(M,{dragging:g,dependencies:[b.x,b.y],config:ee.droppable}),N=PN(y,_),ie=(0,v.useMemo)(()=>O?lM(O):null,[O]),ae=H(),oe=VN(N,ee.draggable.measure);_P({activeNode:_==null?null:y.get(_),config:ae.layoutShiftCompensation,initialRect:oe,measure:ee.draggable.measure});let se=GN(N,ee.draggable.measure,oe),P=GN(N?N.parentElement:null),ce=(0,v.useRef)({activatorEvent:null,active:null,activeNode:N,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:x,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),F=x.getNodeFor(ce.current.over?.id),le=rP({measure:ee.dragOverlay.measure}),ue=le.nodeRef.current??N,de=g?le.rect??se:null,fe=!!(le.nodeRef.current&&le.rect),pe=KN(fe?null:se),me=$N(ue?Uj(ue):null),I=JN(g?F??N:null),L=tP(I),he=hP(c,{transform:{x:b.x-pe.x,y:b.y-pe.y,scaleX:1,scaleY:1},activatorEvent:O,active:w,activeNodeRect:se,containerNodeRect:P,draggingNodeRect:de,over:ce.current.over,overlayNodeRect:le.rect,scrollableAncestors:I,scrollableAncestorRects:L,windowRect:me}),ge=ie?iM(ie,b):null,R=YN(I),_e=XN(R),ve=XN(R,[se]),z=iM(he,_e),ye=de?IM(de,he):null,be=w&&ye?o({active:w,collisionRect:ye,droppableRects:te,droppableContainers:M,pointerCoordinates:ge}):null,xe=AM(be,`id`),[Se,Ce]=(0,v.useState)(null),we=NM(fe?he:iM(he,ve),Se?.rect??null,se),Te=(0,v.useRef)(null),Ee=(0,v.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(T.current==null)return;let i=y.get(T.current);if(!i)return;let a=e.nativeEvent,o=new n({active:T.current,activeNode:i,event:a,options:r,context:ce,onAbort(e){if(!y.get(e))return;let{onDragAbort:t}=A.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!y.get(e))return;let{onDragPending:i}=A.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=T.current;if(t==null)return;let n=y.get(t);if(!n)return;let{onDragStart:r}=A.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:C}};(0,si.unstable_batchedUpdates)(()=>{r?.(i),h(yP.Initializing),d({type:CM.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),D(Te.current),k(a)})},onMove(e){d({type:CM.DragMove,coordinates:e})},onEnd:s(CM.DragEnd),onCancel:s(CM.DragCancel)});Te.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ce.current,o=null;if(t&&i){let{cancelDrop:s}=A.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===CM.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=CM.DragCancel)}T.current=null,(0,si.unstable_batchedUpdates)(()=>{d({type:e}),h(yP.Uninitialized),Ce(null),D(null),k(null),Te.current=null;let t=e===CM.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=A.current[t];e?.(o),f({type:t,event:o})}})}}},[y]),De=FN(a,(0,v.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=y.get(r);if(T.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},T.current=r,Ee(n,t))},[y,Ee]));ZN(a),Jj(()=>{se&&m===yP.Initializing&&h(yP.Initialized)},[se,m]),(0,v.useEffect)(()=>{let{onDragMove:e}=A.current,{active:t,activatorEvent:n,collisions:r,over:i}=ce.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:z.x,y:z.y},over:i};(0,si.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[z.x,z.y]),(0,v.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ce.current;if(!e||T.current==null||!t||!i)return;let{onDragOver:a}=A.current,o=r.get(xe),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,si.unstable_batchedUpdates)(()=>{Ce(s),a?.(c),f({type:`onDragOver`,event:c})})},[xe]),Jj(()=>{ce.current={activatorEvent:O,active:w,activeNode:N,collisionRect:ye,collisions:be,droppableRects:te,draggableNodes:y,draggingNode:ue,draggingNodeRect:de,droppableContainers:x,over:Se,scrollableAncestors:I,scrollAdjustedTranslate:z},C.current={initial:de,translated:ye}},[w,N,be,ye,y,ue,de,te,x,Se,I,z]),jN({...ae,delta:b,draggingRect:ye,pointerCoordinates:ge,scrollableAncestors:I,scrollableAncestorRects:L});let B=(0,v.useMemo)(()=>({active:w,activeNode:N,activeNodeRect:se,activatorEvent:O,collisions:be,containerNodeRect:P,dragOverlay:le,draggableNodes:y,droppableContainers:x,droppableRects:te,over:Se,measureDroppableContainers:ne,scrollableAncestors:I,scrollableAncestorRects:L,measuringConfiguration:ee,measuringScheduled:re,windowRect:me}),[w,N,se,O,be,P,le,y,x,te,Se,ne,I,L,ee,re,me]),V=(0,v.useMemo)(()=>({activatorEvent:O,activators:De,active:w,activeNodeRect:se,ariaDescribedById:{draggable:j},dispatch:d,draggableNodes:y,over:Se,measureDroppableContainers:ne}),[O,De,w,se,d,j,y,Se,ne]);return v.createElement(_M.Provider,{value:p},v.createElement(uP.Provider,{value:V},v.createElement(dP.Provider,{value:B},v.createElement(vP.Provider,{value:we},i)),v.createElement(mP,{disabled:n?.restoreFocus===!1})),v.createElement(SM,{...n,hiddenTextDescribedById:j}));function H(){let e=E?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),xP=(0,v.createContext)(null),SP=`button`,CP=`Draggable`;function wP(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=nM(CP),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,v.useContext)(uP),{role:p=SP,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,v.useContext)(g?vP:xP),[y,b]=$j(),[x,S]=$j(),C=QN(o,t),w=Zj(n);return Jj(()=>(d.set(t,{id:t,key:a,node:y,activatorNode:x,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,v.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===SP?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:C,node:y,over:f,setNodeRef:b,setActivatorNodeRef:S,transform:_}}function TP(){return(0,v.useContext)(dP)}var EP=`Droppable`,DP={timeout:25};function OP(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=nM(EP),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,v.useContext)(uP),u=(0,v.useRef)({disabled:n}),d=(0,v.useRef)(!1),f=(0,v.useRef)(null),p=(0,v.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...DP,...i},_=Zj(h??r),y=UN({callback:(0,v.useCallback)(()=>{d.current?(p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)):d.current=!0},[g]),disabled:m||!o}),[b,x]=$j((0,v.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),d.current=!1),e&&y.observe(e))},[y])),S=Zj(t);return(0,v.useEffect)(()=>{y&&b.current&&(y.disconnect(),d.current=!1,y.observe(b.current))},[b,y]),(0,v.useEffect)(()=>(s({type:CM.RegisterDroppable,element:{id:r,key:a,disabled:n,node:b,rect:f,data:S}}),()=>s({type:CM.UnregisterDroppable,key:a,id:r})),[r]),(0,v.useEffect)(()=>{n!==u.current.disabled&&(s({type:CM.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:b,over:c,setNodeRef:x}}function kP(e){let{animation:t,children:n}=e,[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),s=eM(n);return!n&&!r&&s&&i(s),Jj(()=>{if(!a)return;let e=r?.key,n=r?.props.id;e==null||n==null?i(null):Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),v.createElement(v.Fragment,null,n,r?(0,v.cloneElement)(r,{ref:o}):null)}var AP={x:0,y:0,scaleX:1,scaleY:1};function jP(e){let{children:t}=e;return v.createElement(uP.Provider,{value:lP},v.createElement(vP.Provider,{value:AP},t))}var MP={position:`fixed`,touchAction:`none`},NP=e=>sM(e)?`transform 250ms ease`:void 0,PP=(0,v.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=NP}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...MP,width:s.width,height:s.height,top:s.top,left:s.left,transform:uM.Transform.toString(d),transformOrigin:i&&r?OM(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return v.createElement(n,{className:o,style:f,ref:t},a)}),FP={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:uM.Transform.toString(t)},{transform:uM.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function IP(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return Yj((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=nP(a);if(!c)return;let{transform:l}=Uj(a).getComputedStyle(a),u=LM(l);if(!u)return;let d=typeof t==`function`?t:LP(t);return oN(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function LP(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...FP,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var RP=0;function zP(e){return(0,v.useMemo)(()=>{if(e!=null)return RP++,RP},[e])}var BP=v.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:y,scrollableAncestors:b,scrollableAncestorRects:x,windowRect:S}=TP(),C=(0,v.useContext)(vP),w=zP(d?.id),T=hP(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:b,scrollableAncestorRects:x,transform:C,windowRect:S}),E=BN(f),D=IP({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:y}),O=E?g.setRef:void 0;return v.createElement(jP,null,v.createElement(kP,{animation:D},d&&w?v.createElement(PP,{key:w,id:d.id,ref:O,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:E,style:{zIndex:l,...i},transform:T},n):null))}),VP=(e,t)=>`${bg(e)}/assignment/${encodeURIComponent(t)}`,HP=e=>e.state===`working`||e.state===`queued`&&e.waiting===`slot`,UP=2e3;function WP(e){let{assignments:t}=J(),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(0),c=(0,v.useCallback)(()=>s(e=>e+1),[]);(0,v.useEffect)(()=>{if(!t||t.disabled)return;let n=!0;return t.list(e).then(e=>{n&&(r(e),a(null))},e=>n&&a(e instanceof Error?e.message:String(e))),()=>{n=!1}},[t,e,o]);let l=n?.assignments.some(HP)??!1;return(0,v.useEffect)(()=>{if(!l)return;let e=setInterval(c,UP);return()=>clearInterval(e)},[l,c]),{list:n,error:i,reload:c}}function GP({a:e}){let t=e.state===`queued`&&e.waiting===`start`?`Queued, waiting for Start`:OD[e.state];return(0,q.jsx)(`span`,{className:`assign-state assign-state--${e.state}`,children:t})}function KP(e){if(!e.usage)return`usage not reported yet`;if(!e.usage.records.length)return`${JE[e.usage.adapter]} reported no usage`;let t=lD(tD(e.usage.records),e.usage.adapter).slice(0,2);return`${e.usage.sample?`sample figures: `:``}${t.join(`, `)}`}function qP({a:e,now:t}){let n=e.proposals.filter(e=>e.status===`pending`).length;return(0,q.jsx)(Q,{className:`assign-card`,children:(0,q.jsxs)(XT,{gap:`xs`,children:[(0,q.jsxs)(ZT,{className:`assign-card__top`,children:[(0,q.jsx)(GP,{a:e}),(0,q.jsx)(`span`,{className:`assign-mode`,children:DD[e.mode].label})]}),(0,q.jsxs)(`p`,{className:`assign-card__item`,children:[(0,q.jsx)(HT,{id:e.item}),` `,(0,q.jsx)(`span`,{className:`assign-card__title`,children:e.itemTitle})]}),(0,q.jsxs)(`p`,{className:`note`,children:[e.adapter?ED[e.adapter]:`No adapter chosen yet`,` · `,AD(e.ranMs??kD(e,t)),` · `,KP(e)]}),e.state===`needs-you`&&(0,q.jsx)(`p`,{className:`assign-needs`,children:[n?`${n} ${n===1?`proposal`:`proposals`} to review`:``,e.questions.length?`${e.questions.length} ${e.questions.length===1?`question`:`questions`}`:``,e.stop?.reason===`injection`?`stopped on a possible injection`:``].filter(Boolean).join(`, `)}),e.stop&&e.state===`failed`&&(0,q.jsx)(`p`,{className:`assign-stop`,children:e.stop.message}),e.stale&&(0,q.jsx)(SD,{stale:e.stale}),e.renewedBy&&(0,q.jsxs)(`p`,{className:`note`,children:[`Renewed as `,(0,q.jsx)(`a`,{href:VP(e.dossier,e.renewedBy),children:`a fresh assignment`}),`.`]}),(0,q.jsx)(`p`,{children:(0,q.jsxs)(`a`,{href:VP(e.dossier,e.id),children:[`Open the assignment`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` on `,e.item]})]})})]})})}function JP({item:e,list:t,start:n,close:r,onDone:i}){let{assignments:a,dossier:o}=J(),s=t.adapters.filter(e=>!e.problem),[c,l]=(0,v.useState)(n?.adapter??s.find(e=>e.name===t.preferred)?.name??s[0]?.name??null),[u,d]=(0,v.useState)(n?.mode??`refine`),[f,p]=(0,v.useState)(t.repos[0]?.name??null),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(null),y=t.adapters.find(e=>e.name===c),b=u===`implement`?y?.implement??(t.repos.length?null:`${o.name} lists no repository with a local path, so implement mode has nothing to clone. Add one with toil dossiers add-repo ${o.name} <folder>.`):null,x=a&&!a.disabled&&c!==null&&!y?.problem&&!b&&!m&&(u!==`implement`||f!==null);return(0,q.jsxs)(`form`,{className:`assign-form`,onSubmit:async t=>{if(t.preventDefault(),x&&a&&c){h(!0),_(null);try{i(n?await a.start(n.id,c):await a.assign({dossier:o.name,item:e.id,mode:u,adapter:c,...u===`implement`&&f?{repo:f}:{}})),r()}catch(e){_(e instanceof Error?e.message:String(e))}finally{h(!1)}}},noValidate:!0,children:[(0,q.jsx)(ja,{slot:`title`,level:2,id:`assign-title`,children:n?`Start the assignment`:`Assign to an agent`}),(0,q.jsxs)(`p`,{className:`note`,children:[(0,q.jsx)(HT,{id:e.id}),` `,e.title]}),(0,q.jsxs)(Bf,{className:`agent-adapters`,value:c??``,onChange:e=>l(e),children:[(0,q.jsx)(va,{children:`Adapter`}),t.adapters.map(e=>(0,q.jsxs)(Vf,{value:e.name,className:`agent-choice`,isDisabled:e.problem!==null,children:[(0,q.jsx)(`strong`,{children:e.label}),(0,q.jsx)(`span`,{className:e.problem?`agent-missing`:`note`,children:e.problem??(e.implement?`Refine and investigate.`:`Refine, investigate and implement.`)})]},e.name))]}),n?(0,q.jsxs)(`p`,{children:[`Mode: `,(0,q.jsx)(`strong`,{children:DD[n.mode].label}),`, as the tracker asked (`,n.trigger,`). `,DD[n.mode].does]}):(0,q.jsxs)(Bf,{className:`agent-adapters`,value:u,onChange:e=>d(e),children:[(0,q.jsxs)(`div`,{className:`edit-head`,children:[(0,q.jsx)(va,{className:`agent-label`,children:`Mode`}),(0,q.jsx)(Fw,{topic:`assignments`})]}),TD.map(e=>(0,q.jsxs)(Vf,{value:e,className:`agent-choice`,children:[(0,q.jsx)(`strong`,{children:DD[e].label}),(0,q.jsxs)(`span`,{className:`note`,children:[DD[e].does,` `,DD[e].changes]})]},e))]}),u===`implement`&&t.repos.length>0&&(0,q.jsxs)(Bf,{className:`agent-adapters`,value:f??``,onChange:p,children:[(0,q.jsx)(va,{children:`Repository to clone`}),t.repos.map(e=>(0,q.jsxs)(Vf,{value:e.name,className:`agent-choice`,children:[(0,q.jsx)(`strong`,{children:e.name}),(0,q.jsx)(`span`,{className:`note any-break`,children:e.path})]},e.name))]}),b&&(0,q.jsx)(`p`,{className:`failure`,children:b}),(0,q.jsxs)(`p`,{className:`note`,children:[`It runs on your adapter's own subscription, `,t.settings.concurrent===1?`one assignment at a time`:`${t.settings.concurrent} assignments at a time`,`, for up to `,t.settings.timeLimitMinutes,` minutes, within your usage caps. Nothing it proposes leaves this machine until you apply it, and applying runs toil's own command through its write gate.`]}),t.settings.problem&&(0,q.jsx)(`p`,{className:`failure`,children:t.settings.problem}),a?.disabled&&(0,q.jsx)(`p`,{className:`failure`,children:a.disabled}),g&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:g}),(0,q.jsxs)(`div`,{className:`assign-actions`,children:[(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,isDisabled:!x,children:m?`Assigning…`:n?`Start`:`Assign`}),(0,q.jsx)(W,{className:`btn`,onPress:r,children:`Cancel`})]})]})}function YP({item:e,start:t,isOpen:n,onOpenChange:r,onDone:i}){let a=n===void 0?{}:{isOpen:n,...r?{onOpenChange:r}:{}},o=i??(e=>void(window.location.hash=VP(e.dossier,e.id)));return(0,q.jsx)(Of,{className:`feedback-overlay`,"data-backdrop":``,isDismissable:!0,...a,children:(0,q.jsx)(Ef,{className:`feedback-modal`,children:(0,q.jsx)(uf,{className:`feedback-dialog`,"aria-labelledby":`assign-title`,children:({close:n})=>(0,q.jsx)(XP,{item:e,...t?{start:t}:{},close:n,onDone:o})})})})}function XP({item:e,start:t,close:n,onDone:r}){let{assignments:i,dossier:a}=J(),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null);return(0,v.useEffect)(()=>{if(!i)return void l(`This view has no agent assignments.`);if(i.disabled)return void l(i.disabled);let e=!0;return i.list(a.name).then(t=>e&&s(t),t=>e&&l(t instanceof Error?t.message:String(t))),()=>{e=!1}},[i,a.name]),o?(0,q.jsx)(JP,{item:e,list:o,...t?{start:t}:{},close:n,onDone:r}):(0,q.jsxs)(`div`,{className:`assign-form`,children:[(0,q.jsx)(ja,{slot:`title`,level:2,id:`assign-title`,children:`Assign to an agent`}),(0,q.jsx)(`p`,{className:c?`failure`:`note`,children:c??`Reading the adapters on this machine…`}),(0,q.jsx)(`div`,{className:`assign-actions`,children:(0,q.jsx)(W,{className:`btn`,onPress:n,children:`Close`})})]})}function ZP({item:e}){let{assignments:t}=J();return t?(0,q.jsxs)(lf,{children:[(0,q.jsxs)(W,{className:`btn`,"data-assign-open":``,children:[`Assign to agent`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,e.id]})]}),(0,q.jsx)(YP,{item:e})]}):null}function QP({a:e,onStarted:t}){let[n,r]=(0,v.useState)(!1);return(0,q.jsxs)(`li`,{className:`assign-inbox__row`,children:[(0,q.jsxs)(ZT,{children:[(0,q.jsxs)(`span`,{children:[(0,q.jsx)(HT,{id:e.item}),` `,e.itemTitle,`: `,(0,q.jsx)(`strong`,{children:DD[e.mode].label.toLowerCase()}),`, asked for by the tracker's `,e.trigger,`.`]}),(0,q.jsxs)(W,{className:`btn btn--accent btn--small`,onPress:()=>r(!0),"data-inbox-start":``,children:[`Start`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,e.item]}),`…`]})]}),(0,q.jsx)(YP,{item:{id:e.item,title:e.itemTitle},start:e,isOpen:n,onOpenChange:r,onDone:t})]})}function $P({list:e,onSaved:t}){let{assignments:n}=J(),[r,i]=(0,v.useState)(String(e.settings.concurrent||1)),[a,o]=(0,v.useState)(String(e.settings.timeLimitMinutes)),[s,c]=(0,v.useState)(null),l=(0,v.useId)();return n?.saveSettings?(0,q.jsxs)(`details`,{className:`assign-limits`,children:[(0,q.jsx)(`summary`,{children:`Limits`}),(0,q.jsxs)(`form`,{className:`assign-limits__form`,onSubmit:async e=>{e.preventDefault();try{await n.saveSettings({concurrent:Number(r),timeLimitMinutes:Number(a)}),c(`Saved. The next assignment runs on these limits.`),t()}catch(e){c(e instanceof Error?e.message:String(e))}},"aria-describedby":l,children:[(0,q.jsxs)(Yp,{className:`field-text`,value:r,onChange:i,inputMode:`numeric`,children:[(0,q.jsx)(va,{children:`Assignments at once (1 to 3)`}),(0,q.jsx)(jo,{})]}),(0,q.jsxs)(Yp,{className:`field-text`,value:a,onChange:o,inputMode:`numeric`,children:[(0,q.jsx)(va,{children:`Minutes each (1 to 240)`}),(0,q.jsx)(jo,{})]}),(0,q.jsx)(W,{type:`submit`,className:`btn`,children:`Save the limits`}),(0,q.jsx)(`p`,{id:l,className:`note`,role:`status`,children:s??`Usage caps are under Settings, Agent usage: an assignment is one chat there.`}),!s&&(0,q.jsx)(zw,{href:`#/settings/agent-usage/caps`,label:`Edit the usage caps`})]})]}):null}function eF({list:e,onDone:t}){let{assignments:n,dossier:r}=J(),i=aj(),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null);if(!n)return null;let p=[...i?.session?.stale?[{key:`chat`,label:`The chat about ${r.name}: ${i.session.stale.text}`,skip:i.session.stale.restart??(i.busy?`It is answering a question now, and a renew never interrupts one.`:null),run:async()=>{let e=await i.renew();if(e)throw Error(e)}}]:[],...e.assignments.filter(e=>e.stale).map(e=>({key:e.id,label:`${DD[e.mode].label} ${e.item} on ${e.adapter?ED[e.adapter]:`no adapter`}, ${OD[e.state].toLowerCase()}: ${e.stale.text}`,skip:jD(e),run:()=>n.renew(e.id)}))];if(!p.length&&!a)return null;let m=d??p,h=m.filter(e=>!e.skip),g=async()=>{c(!0);let e=[];for(let t of h)try{await t.run(),e.push(`Renewed: ${t.label}`)}catch(n){e.push(`Not renewed: ${t.label}. ${n instanceof Error?n.message:String(n)}`)}u(e),c(!1),t()};return(0,q.jsxs)(q.Fragment,{children:[p.length>0&&(0,q.jsxs)(ZT,{children:[(0,q.jsx)(W,{className:`btn`,onPress:()=>(u(null),f(p),o(!0)),"data-renew-all":``,children:`Renew all stale…`}),(0,q.jsxs)(`span`,{className:`note`,children:[(0,q.jsx)(xD,{}),` `,p.length===1?`One session started`:`${p.length} sessions started`,` on instructions that have changed since.`]})]}),(0,q.jsx)(Of,{className:`feedback-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:a,onOpenChange:o,children:(0,q.jsx)(Ef,{className:`feedback-modal`,children:(0,q.jsx)(uf,{className:`feedback-dialog`,"aria-labelledby":`renew-title`,children:({close:e})=>(0,q.jsxs)(`div`,{className:`assign-form`,children:[(0,q.jsx)(ja,{slot:`title`,level:2,id:`renew-title`,children:`Renew stale sessions`}),(0,q.jsxs)(`p`,{className:`note`,children:[`Each renews as a fresh session on today's instructions, with what the old one left as context. The old one stays readable. Renew never interrupts a turn, and skips any session waiting on you. `,(0,q.jsx)(Fw,{topic:`stale`})]}),(0,q.jsx)(`ul`,{className:`rows renew-list`,children:m.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`strong`,{children:e.skip?`Skipped`:`Renews`}),`: `,e.label,e.skip&&(0,q.jsxs)(`span`,{className:`note`,children:[` `,e.skip]})]},e.key))}),l&&(0,q.jsx)(`ul`,{className:`rows`,role:`status`,"aria-label":`What was renewed`,children:l.map((e,t)=>(0,q.jsx)(`li`,{children:e},t))}),(0,q.jsxs)(`div`,{className:`assign-actions`,children:[!l&&(0,q.jsx)(W,{className:`btn btn--accent`,onPress:()=>void g(),isDisabled:s||!h.length,"data-renew-confirm":``,children:s?`Renewing…`:h.length?`Renew ${h.length}`:`Nothing to renew`}),(0,q.jsx)(W,{className:`btn`,onPress:e,children:l?`Close`:`Cancel`})]})]})})})})]})}function tF({item:e}){let{dossier:t,now:n,assignments:r}=J(),{list:i,error:a}=WP(t.name);if(!r)return null;let o=i?.assignments.filter(t=>t.item===e.id)??[];return(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`item-agents`,children:[(0,q.jsx)(`h2`,{id:`item-agents`,children:`Agents`}),(0,q.jsxs)(ZT,{children:[(0,q.jsx)(ZP,{item:e}),(0,q.jsx)(`span`,{className:`note`,children:`Refine, investigate or implement it with Claude, Copilot or Codex. Its proposals wait for you.`})]}),a&&(0,q.jsx)(`p`,{className:`failure`,children:a}),o.length>0&&(0,q.jsx)(QT,{min:`sm`,className:`assign-lane`,"aria-label":`Assignments on ${e.id}`,children:o.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(qP,{a:e,now:n})},e.id))})]})}function nF(e,t){let n=[e,ED[e].toLowerCase()];return t.find(e=>e.kind===`agent`&&(n.some(t=>e.name.toLowerCase().includes(t))||Object.values(e.ids).some(e=>n.includes(e.toLowerCase()))))??null}function rF({people:e}){let{dossier:t,now:n,assignments:r}=J(),{list:i}=WP(t.name);if(!r||!i)return null;let a=[...new Set(i.assignments.flatMap(e=>e.adapter?[e.adapter]:[]))].sort();return(0,q.jsxs)(`section`,{className:`people-section`,"aria-labelledby":`agent-assignments`,children:[(0,q.jsx)(`h2`,{id:`agent-assignments`,children:`Agents' assignments`}),(0,q.jsx)(`p`,{className:`note`,children:`What each agent was assigned from Toil UI, as a teammate's plate: its own runs, not the pull requests above.`}),a.length?(0,q.jsx)(QT,{min:`md`,className:`people-cards`,children:a.map(t=>{let r=nF(t,e),a=i.assignments.filter(e=>e.adapter===t);return(0,q.jsx)(`li`,{children:(0,q.jsx)(Q,{className:`assign-agent`,children:(0,q.jsxs)(XT,{gap:`xs`,children:[(0,q.jsx)(`h3`,{children:r?`${r.name} (${ED[t]})`:ED[t]}),(0,q.jsx)(`p`,{className:`note`,children:iF.map(e=>[e,a.filter(t=>t.state===e).length]).filter(([,e])=>e).map(([e,t])=>`${t} ${OD[e].toLowerCase()}`).join(`, `)}),a.some(e=>e.stale)&&(0,q.jsxs)(`p`,{className:`note`,"data-stale":``,children:[(0,q.jsx)(xD,{}),` `,a.filter(e=>e.stale).length,` started on instructions that have changed since.`]}),(0,q.jsx)(`ul`,{className:`rows`,children:a.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(GP,{a:e}),` `,e.stale&&(0,q.jsx)(xD,{}),` `,(0,q.jsx)(`a`,{href:VP(e.dossier,e.id),children:DD[e.mode].label}),` `,(0,q.jsx)(HT,{id:e.item}),` `,(0,q.jsx)(`span`,{className:`note`,children:AD(e.ranMs??kD(e,n))})]},e.id))})]})})},t)})}):(0,q.jsx)(Cj,{message:`Nothing has been assigned to an agent in ${t.name} yet.`,action:(0,q.jsx)(wj,{href:Tg(t.name),children:`Assign from the board`}),help:`assignments`})]})}var iF=[`working`,`needs-you`,`queued`,`done`,`failed`],aF=[`TODO`,`IN_PROGRESS`,`DONE`];function oF(e){let t=e.filter(jh);return(t.some(e=>e.statusCategory===`UNKNOWN`)?[...aF,`UNKNOWN`]:aF).map(e=>({category:e,items:t.filter(t=>t.statusCategory===e)}))}var sF=e=>e.source.area.split(`-`)[0];function cF(e,t,n){let r=n.filter(n=>sF(n)===sF(e)&&n.source.connection===e.source.connection&&n.statusCategory===t&&n.status),i=r.filter(t=>t.typeName===e.typeName),a=new Map;for(let e of i.length?i:r)a.set(e.status,(a.get(e.status)??0)+1);return[...a.entries()].sort((e,t)=>t[1]-e[1])[0]?.[0]??null}function lF(e,t,n,r){if(t===e.statusCategory||t===`UNKNOWN`)return null;let i=hg(e),a=Ig[t],o=cF(e,t,n),s={id:`board:${e.id}:${t}`,from:`board`,item:e.id,title:`Move ${i} to ${a}`,reason:`Dragged on the board from ${Ig[e.statusCategory]} (${e.status??`no status`}).`},c=sF(e);if(c===`github`)return{...s,command:null,input:null,note:`toil has no command that sets a GitHub Projects status yet. Change ${i}'s Status field on the project board${e.url?`: ${e.url}`:``}.`};let l={text:`List the transitions the workflow offers:`,command:`jira issue transitions`,input:{dossier:r,key:e.source.key}},u={text:`List the states the work item type has:`,command:`${e.source.area} work-item states`,input:{dossier:r,type:e.typeName??`User Story`}};if(e.source.area===`ado-cloud`)return o?{...s,command:`ado-cloud work-item update`,input:{dossier:r,id:Number(e.source.key),field:[`System.State=${o}`]},note:null}:{...s,command:null,input:null,note:`No ${a} item in this dossier shows which state to use.`,hint:u};if(!o){let e=c===`jira`?l:u;return{...s,command:null,input:null,note:`No ${a} item in this dossier shows which status to use.`,hint:e}}return c===`jira`?{...s,command:`jira issue transition`,input:{dossier:r,key:e.source.key,transition:o},note:`"${o}" is the status other ${a} items use; the workflow may name the transition differently.`,hint:l}:c===`ado`?{...s,command:`ado work-item transition`,input:{dossier:r,id:Number(e.source.key),state:o},note:null}:{...s,command:null,input:null,note:`toil has no status change for ${e.source.area} items.`}}var uF={palette:{keys:[`Mod`,`K`],where:`Anywhere`,what:`Open the command palette: jump to a dossier, a tab, an item in any dossier or a setting, or run Sync, Analyze and Ask`},shortcuts:{keys:[`?`],where:`Anywhere but a text field`,what:`Show these shortcuts`},paletteMove:{keys:[`↑`],or:[[`↓`]],where:`In the command palette`,what:`Move between results`},paletteRun:{keys:[`Enter`],where:`In the command palette`,what:`Open or run the highlighted result`},close:{keys:[`Escape`],where:`In a dialog, menu or palette`,what:`Close it, and go back to where you were`},cardMenu:{keys:[`M`],or:[[`Menu`]],where:`On a board card`,what:`Open the card's menu: open it, move it or assign it to an agent`},cardPickUp:{keys:[`Space`],or:[[`Enter`]],where:`On a board card`,what:`Pick the card up, or put it down to propose the move`},cardMove:{keys:[`←`],or:[[`→`]],where:`On a board card you picked up`,what:`Move it to the previous or next column`},cardCancel:{keys:[`Escape`],where:`On a board card you picked up`,what:`Put it back where it was`},editSave:{keys:[`Enter`],where:`Editing a dossier's name or description`,what:`Save it`},editCancel:{keys:[`Escape`],where:`Editing a dossier's name or description`,what:`Leave it as it was`},wipeCancel:{keys:[`Escape`],where:`Asked whether to wipe the cache`,what:`Keep the cache`}},dF=()=>typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),fF=(e,t=dF())=>e===`Mod`?t?`⌘`:`Ctrl`:e;function pF(e){let t=uF[e],n=e=>({Mod:dF()?`Meta`:`Control`,Menu:`ContextMenu`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`})[e]??e;return[t.keys,...t.or??[]].map(e=>e.map(n).join(`+`)).join(` `)}var mF={Space:` `,Menu:`ContextMenu`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`};function hF(e,t){let n=uF[e].keys,r=n.includes(`Mod`),i=n.filter(e=>e!==`Mod`);if(i.length!==1||t.altKey||(r?!(dF()?t.metaKey:t.ctrlKey):t.ctrlKey||t.metaKey))return!1;let a=mF[i[0]]??i[0];return a.length===1?t.key.toLowerCase()===a.toLowerCase():t.key===a}function gF(e){return e instanceof Element&&!!e.closest(`input, textarea, select, [contenteditable=""], [contenteditable="true"]`)}var _F=e=>Ig[e],vF=class extends CN{static activators=[{eventName:`onPointerDown`,handler:(...e)=>e[0].nativeEvent.pointerType!==`touch`&&CN.activators[0].handler(...e)}]},yF={delay:250,tolerance:8},bF=10;function xF(e,t){return t?t===e.statusCategory?{ok:!1,text:`Already in ${_F(t)}: nothing to propose`}:t===`UNKNOWN`?{ok:!1,text:`Unknown is no status to move to`}:{ok:!0,text:`Drop to propose: ${_F(t)}`}:{ok:!1,text:`Not over a column`}}var SF=(e,t)=>cg(sg(e,t))?` card--attention`:``;function CF({item:e,ids:t}){let{insights:n}=fg(),{dossier:r}=J(),{Card:i}=xT(),a=hg(e),o=sg(e,n);return(0,q.jsxs)(i,{item:e,children:[(0,q.jsxs)(`div`,{className:`card-top`,children:[t?(0,q.jsx)(`a`,{id:`${t}-key`,href:xg(r.name,e.id),className:`item-link card-key`,draggable:!1,children:(0,q.jsx)(`span`,{className:`key`,children:a})}):(0,q.jsx)(`span`,{className:`card-key`,children:(0,q.jsx)(`span`,{className:`key`,children:a})}),cg(o)&&(0,q.jsxs)(`span`,{className:`card-flag`,title:`Needs attention`,children:[(0,q.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,"aria-hidden":`true`,focusable:`false`,children:(0,q.jsx)(`path`,{d:`M4 14V2.5M4 3h7.5l-1.8 2.8L11.5 8.5H4`})}),(0,q.jsx)(`span`,{className:`sr-only`,children:`Needs attention`})]}),(0,q.jsx)(Pj,{category:e.statusCategory,status:e.status})]}),(0,q.jsx)(`p`,{id:t&&`${t}-title`,className:`card-title`,children:e.title}),(0,q.jsxs)(`div`,{className:`card-foot`,children:[(0,q.jsxs)(`span`,{className:`who`,children:[(0,q.jsx)(Nj,{person:e.assignee}),` `,yg(e.assignee)]}),(0,q.jsxs)(`span`,{className:`card-meta`,children:[(0,q.jsx)(Ij,{insights:o,compact:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[(0,q.jsx)(`span`,{className:`source`,children:mg(e.source.area)}),` · `,Lg(e)]})]})]})]})}function wF({item:e}){let{over:t}=TP(),{insights:n}=fg(),r=xF(e,t?.id??null);return(0,q.jsxs)(`div`,{className:`card card--${e.statusCategory.toLowerCase()}${SF(e,n)} card--overlay`,"data-drag-overlay":!0,"aria-hidden":`true`,children:[(0,q.jsx)(`div`,{className:`card-grip`,children:(0,q.jsx)(CF,{item:e})}),(0,q.jsx)(`p`,{className:`drop-verdict${r.ok?``:` drop-verdict--no`}`,"data-drop-verdict":!0,children:r.text})]})}function TF({item:e,move:t,onUndo:n,onShow:r}){let i=hg(e);return(0,q.jsxs)(`li`,{className:`card-ghost`,"data-proposed-ghost":!0,"aria-label":`Proposed move, not applied: ${i} ${e.title}`,children:[(0,q.jsx)(`p`,{className:`card-ghost__kind`,children:`Proposed move, not applied`}),(0,q.jsxs)(`p`,{className:`card-ghost__title`,children:[(0,q.jsx)(`span`,{className:`key`,children:i}),` `,e.title]}),(0,q.jsxs)(`p`,{className:`note`,children:[`From `,_F(e.statusCategory),`. It stays there until someone applies the move with toil.`]}),(0,q.jsxs)(`div`,{className:`card-ghost__actions`,children:[(0,q.jsx)(W,{className:`btn btn--quiet`,onPress:n,"aria-label":`Undo the proposed move of ${i}`,children:`Undo`}),(0,q.jsx)(W,{className:`btn`,onPress:r,"aria-label":`How to apply the move of ${i} to ${_F(t.to)}`,children:`How to apply`})]})]})}var EF=(e,t)=>(n,{active:r,context:{collisionRect:i,droppableRects:a,over:o}})=>{let s={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[n.code];if(!s||!i)return;n.preventDefault();let c=e.indexOf(o?.id??t(r)),l=e[Math.min(e.length-1,Math.max(0,c+s))],u=l?a.get(l):void 0;if(u)return{x:u.left+Math.max(0,(u.width-i.width)/2),y:u.top+48}};function DF({item:e,others:t,onMove:n,menuOpen:r,setMenuOpen:i}){let{dossier:a,assignments:o}=J(),{insights:s}=fg(),{attributes:c,listeners:l,setNodeRef:u,setActivatorNodeRef:d,isDragging:f}=wP({id:e.id,attributes:{role:`group`,roleDescription:`draggable card`}}),[p,m]=(0,v.useState)(!1),h=(0,v.useRef)(null),g=(0,v.useId)(),_=hg(e),y=xg(a.name,e.id),b=e=>{h.current=e,d(e)},x=e=>{e.target===e.currentTarget&&!f&&hF(`cardMenu`,e)?(e.preventDefault(),i(!0)):l?.onKeyDown?.(e)},S=e=>{e.target.closest(`a`)||f||(e.preventDefault(),i(!0))},C=e=>{e.button!==0||e.target.closest(`a, button`)||(window.location.hash=y)},w=e=>{i(e),e||requestAnimationFrame(()=>document.activeElement===document.body&&h.current?.focus())},T=e=>{w(!1),e===`open`?window.location.hash=y:e===`assign`?m(!0):n(e)};return(0,q.jsxs)(`li`,{ref:u,className:`card card--${e.statusCategory.toLowerCase()}${SF(e,s)}${f?` card--dragging`:``}`,children:[(0,q.jsx)(`div`,{ref:b,className:`card-grip`,"data-item":e.id,...c,...l,"aria-labelledby":`${g}-key ${g}-title`,"aria-keyshortcuts":pF(`cardMenu`),onKeyDown:x,onContextMenu:S,onClick:C,children:(0,q.jsx)(CF,{item:e,ids:g})}),(0,q.jsx)(Xu,{triggerRef:h,isOpen:r,onOpenChange:w,placement:`bottom start`,className:`popover`,children:(0,q.jsxs)(Qd,{className:`menu`,"aria-label":`${_} ${e.title}`,autoFocus:`first`,onAction:T,children:[(0,q.jsx)(af,{id:`open`,className:`menu-item`,children:`Open`}),(0,q.jsxs)(nf,{children:[(0,q.jsx)(ys,{className:`menu-header`,children:`Move to`}),t.map(e=>(0,q.jsx)(af,{id:e,className:`menu-item`,children:_F(e)},e))]}),o?(0,q.jsx)(af,{id:`assign`,className:`menu-item`,children:`Assign to an agent…`}):null]})}),o&&(0,q.jsx)(YP,{item:e,isOpen:p,onOpenChange:m})]})}function OF({category:e,items:t,all:n,onMove:r,menuFor:i,setMenuFor:a,ghosts:o,onUndo:s,onShow:c}){let{setNodeRef:l,isOver:u,active:d}=OP({id:e}),{byId:f}=J(),p=nC(),m=`col-${e}`,h=d?f.get(String(d.id)):void 0,g=u&&h?xF(h,e).ok?` column--over`:` column--refused`:``;return(0,q.jsxs)(`section`,{ref:l,className:`column column--${e.toLowerCase()}${g}`,"aria-labelledby":m,children:[(0,q.jsxs)(`h3`,{id:m,children:[_F(e),` `,(0,q.jsx)(`span`,{className:`count`,children:t.length})]}),t.length||o.length?(0,q.jsxs)(`ul`,{className:`cards`,children:[o.map(e=>(0,q.jsx)(TF,{item:e.item,move:e.move,onUndo:()=>s(e.move),onShow:()=>c(e.move)},e.move.proposal.id)),t.map(t=>(0,q.jsx)(DF,{item:t,others:n.filter(t=>t!==e&&t!==`UNKNOWN`),onMove:e=>r(t,e),menuOpen:i===t.id,setMenuOpen:e=>a(e?t.id:null)},t.id))]}):null,t.length?null:(0,q.jsx)(`p`,{className:`note`,children:p(`empty.column`)})]})}function kF({items:e}){let{dossier:t,byId:n}=J(),[r,i]=(0,v.useState)([]),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),d=(0,v.useRef)(null),f=(0,v.useRef)(null),p=oF(e),m=p.map(e=>e.category),h=EM(TM(vF,{activationConstraint:{distance:6}}),TM(ON,{activationConstraint:yF}),TM(vN,{coordinateGetter:EF(m,e=>n.get(String(e))?.statusCategory)})),g=e=>{let t=n.get(String(e));return t?hg(t):String(e)},_=(e,n)=>{let r=lF(e,n,t.items,t.name);r?(i(e=>[{proposal:r,to:n},...e.filter(e=>e.proposal.id!==r.id&&e.proposal.item!==r.item)]),o(`Proposed: ${r.title}. Nothing has changed in ${t.name}'s tracker.`)):o(`${hg(e)} is already in ${_F(n)}. Nothing proposed.`)},y=e=>i(t=>t.filter(t=>t.proposal.id!==e.proposal.id)),b=e=>{y(e),o(`Took back the proposed move of ${g(e.proposal.item)}. Nothing proposed.`),requestAnimationFrame(()=>d.current?.querySelector(`.card-grip[data-item="${CSS.escape(e.proposal.item)}"]`)?.focus())},x=e=>{let t=f.current?.querySelector(`[data-proposal="${CSS.escape(e.proposal.id)}"]`);t?.scrollIntoView?.({block:`center`}),t?.focus({preventScroll:!0})};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`note`,children:`One column per status category, across every tracker, each card with its own status word. Drag a card to another column, or open its menu with a right-click, a long press or M, to propose a move: nothing changes until someone applies it with toil.`}),(0,q.jsxs)(bP,{sensors:h,onDragStart:e=>u(n.get(String(e.active.id))??null),onDragCancel:()=>u(null),onDragEnd:e=>{u(null);let t=n.get(String(e.active.id));t&&(`touches`in e.activatorEvent&&Math.hypot(e.delta.x,e.delta.y)<bF?c(t.id):e.over&&_(t,e.over.id))},accessibility:{announcements:{onDragStart:({active:e})=>`Picked up ${g(e.id)}. Moving it proposes a change; nothing is changed.`,onDragOver:({active:e,over:t})=>t?`${g(e.id)} is over ${_F(t.id)}.`:`${g(e.id)} is not over a column.`,onDragEnd:({active:e,over:t})=>{if(!t)return`Dropped ${g(e.id)} outside the columns. Nothing proposed.`;let r=n.get(String(e.id))?.statusCategory===t.id;return`Dropped ${g(e.id)} on ${_F(t.id)}${r?`, where it already is. Nothing proposed.`:`.`}`},onDragCancel:({active:e})=>`Stopped dragging ${g(e.id)}. Nothing proposed.`},screenReaderInstructions:{draggable:`To pick up the card, press Space or Enter. Use the arrow keys to move it to the next or previous column, then press Space or Enter to propose the move, or Escape to cancel. Press M or the Menu key for its menu.`}},children:[(0,q.jsx)(`div`,{ref:d,className:`board`,style:{gridTemplateColumns:`repeat(${p.length}, minmax(15rem, 1fr))`},children:p.map(e=>(0,q.jsx)(OF,{category:e.category,items:e.items,all:m,onMove:_,menuFor:s,setMenuFor:c,ghosts:r.flatMap(t=>{let r=t.to===e.category?n.get(t.proposal.item):void 0;return r?[{item:r,move:t}]:[]}),onUndo:b,onShow:x},e.category))}),(0,si.createPortal)((0,q.jsx)(BP,{dropAnimation:null,children:l?(0,q.jsx)(wF,{item:l}):null}),document.body)]}),(0,q.jsx)(`p`,{className:`sr-only`,role:`status`,children:a}),r.length>0&&(0,q.jsxs)(`div`,{ref:f,className:`proposals`,"aria-label":`Proposed moves`,role:`group`,children:[(0,q.jsx)(`h3`,{children:`Proposed moves`}),r.map(e=>(0,q.jsx)(`div`,{"data-proposal":e.proposal.id,className:`proposal-slot`,tabIndex:-1,children:(0,q.jsx)(AE,{proposal:e.proposal,onDismiss:()=>y(e)})},e.proposal.id))]})]})}function AF({open:e}={}){return(0,q.jsx)(`div`,{className:`tab-panels`,children:e?(0,q.jsx)(NF,{id:e}):(0,q.jsx)(jF,{})})}function jF(){let e=aj(),t=e?.turns.find(e=>e.analyze&&!e.done),n=e?.history,r=n?.list??null,i=tC(),{dossier:a}=J();return(0,q.jsxs)(Q,{as:`section`,className:`panel analyses`,"aria-labelledby":`analyses-title`,children:[(0,q.jsx)(`h2`,{id:`analyses-title`,children:i(`analyses`,`Analyses`)}),(0,q.jsxs)(`p`,{className:`note`,children:[`Every Analyze kept for `,a.name,`, newest first. `,(0,q.jsx)(Fw,{topic:`analyses`})]}),e&&(r===null||r.length>0||t)&&(0,q.jsxs)(`p`,{className:`analyses__actions`,children:[(0,q.jsx)(W,{className:`btn`,onPress:()=>void e.ask(`analyze`,`Analyze`),isDisabled:e.busy,"data-analyze-tab":``,children:`Analyze now`}),t&&(0,q.jsx)(`span`,{className:`note`,children:` An analysis is being written now; it joins the list when its answer is whole.`})]}),n?.error&&(0,q.jsx)(`p`,{className:`failure`,children:n.error}),r===null?!n?.error&&(0,q.jsx)(PA,{size:`panel`,message:`Reading the analyses…`}):r.length?(0,q.jsx)(`ol`,{className:`analyses__list`,"aria-label":`Analyses, newest first`,children:r.map(e=>(0,q.jsx)(MF,{a:e},e.id))}):t?null:(0,q.jsx)(Cj,{message:`No analysis kept for this dossier yet.`,action:e?(0,q.jsx)(Tj,{onPress:()=>void e.ask(RT,`Analyze`),disabled:e.busy,children:`Analyze now`}):(0,q.jsx)(wj,{href:bg(a.name),children:`Open the Overview`})})]})}function MF({a:e}){let{dossier:t}=J();return(0,q.jsxs)(`li`,{className:`analysis`,"data-analysis":e.id,children:[(0,q.jsxs)(`p`,{className:`note analysis__meta`,children:[(0,q.jsx)(`time`,{dateTime:e.at,children:Y(e.at)}),`, by `,NO(e),`. Cites `,e.citations.length,` `,e.citations.length===1?`item`:`items`,e.unverified?`, ${e.unverified} its tools never returned`:``,`.`]}),(0,q.jsx)(`p`,{className:`analysis__rec`,children:e.recommendation?(0,q.jsx)(WT,{text:e.recommendation,chips:!0}):(0,q.jsx)(`span`,{className:`note`,children:`This answer had no Recommendation line; open it to read it as it came.`})}),e.changes.previous&&!kO(e.changes)?(0,q.jsxs)(`details`,{className:`analysis__changes`,children:[(0,q.jsx)(`summary`,{children:LO(e.changes)}),(0,q.jsx)(zO,{changes:e.changes})]}):(0,q.jsx)(`p`,{className:`note analysis__changes`,children:LO(e.changes)}),(0,q.jsx)(`p`,{className:`analysis__open`,children:(0,q.jsxs)(`a`,{href:Og(t.name,e.id),children:[`Open`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` the analysis of `,Y(e.at)]})]})})]})}function NF({id:e}){let{analyses:t,dossier:n}=J(),[r,i]=(0,v.useState)(void 0),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(new Set);(0,v.useEffect)(()=>{let r=!0;return i(void 0),t?(t.get(n.name,e).then(e=>r&&i(e),e=>r&&o(`The analysis didn't load: ${e instanceof Error?e.message:String(e)}`)),()=>{r=!1}):void i(null)},[t,n.name,e]);let l=(0,q.jsx)(`p`,{className:`analysis-open__back`,children:(0,q.jsx)(`a`,{href:Dg(n.name),children:`All analyses`})});if(a||r===null)return(0,q.jsxs)(Q,{as:`section`,className:`panel analyses`,"aria-labelledby":`analysis-title`,children:[l,(0,q.jsx)(`h2`,{id:`analysis-title`,children:`Analysis not found`}),(0,q.jsx)(`p`,{className:a?`failure`:void 0,children:a??`${n.name} has no analysis by that id: it may have passed the cache's retention period, or the cache was wiped.`})]});if(!r)return(0,q.jsx)(`p`,{className:`note`,children:`Reading the analysis…`});let{record:u,changes:d}=r;return(0,q.jsxs)(Q,{as:`section`,className:`panel analyses analysis-open`,"aria-labelledby":`analysis-title`,children:[l,(0,q.jsxs)(`h2`,{id:`analysis-title`,children:[`Analysis of `,Y(u.at)]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Asked `,Y(u.startedAt),`, answered by `,NO(u),`. Cites `,u.citations.length,` `,u.citations.length===1?`item`:`items`,`.`]}),u.warnings.length>0&&(0,q.jsx)(`div`,{className:`answer-checks`,"aria-label":`Checks on this answer`,children:u.warnings.map((e,t)=>(0,q.jsx)(`p`,{className:`failure`,children:e},t))}),(0,q.jsx)(FO,{parts:u.parts,level:3}),u.proposals.length>0&&(0,q.jsxs)(`section`,{"aria-labelledby":`analysis-proposals`,children:[(0,q.jsx)(`h3`,{id:`analysis-proposals`,children:`Suggested changes`}),u.proposals.filter(e=>!s.has(e.id)).map(e=>(0,q.jsx)(AE,{proposal:e,onDismiss:()=>c(t=>new Set(t).add(e.id))},e.id))]}),(0,q.jsxs)(`section`,{"aria-labelledby":`analysis-changes`,children:[(0,q.jsx)(`h3`,{id:`analysis-changes`,children:`What changed since the one before`}),(0,q.jsx)(zO,{changes:d})]}),u.usage&&(0,q.jsx)(vD,{usage:u.usage})]})}function PF(e){let t=new Map;for(let n of e.items)for(let r of sg(n,e)){if(r.code!==`blocked`)continue;let e=/\[\[([^\]]+)\]\]/.exec(r.text)?.[1];e&&t.set(e,[...t.get(e)??[],n.id])}return t}function FF(e,t,n=new Set){for(let r of e.get(t)??[])n.has(r)||FF(e,r,n.add(r));return n}function IF(e){let t=new Set([...e.values()].flat());return[...e.entries()].sort((n,r)=>FF(e,r[0]).size-FF(e,n[0]).size||Number(t.has(n[0]))-Number(t.has(r[0]))||n[0].localeCompare(r[0]))}function LF(e){let t=new Map(e.map(e=>[e.id,e])),n=new Map;for(let t of e)for(let e of t.links){let[r,i]=e.direction===`outward`?[t.id,e.target]:[e.target,t.id],[a,o]=e.type===`relates`&&r>i?[i,r]:[r,i],s=`${e.type}:${a}->${o}`;(!n.get(s)||e.direction===`outward`)&&n.set(s,{id:s,type:e.type,source:a,target:o,name:e.name})}let r=[];for(let t of e)t.links.length&&!r.includes(t.id)&&r.push(t.id);for(let e of n.values())for(let t of[e.source,e.target])r.includes(t)||r.push(t);let i=[...n.values()].filter(e=>e.type===`blocks`),a=new Map(r.map(e=>[e,0])),o=!1;for(let e=0;;e++){let t=!1;for(let e of i){let n=a.get(e.source)+1;n>a.get(e.target)&&(a.set(e.target,n),t=!0)}if(!t)break;if(e>=r.length){o=!0;break}}let s=e=>t.has(e)&&t.get(e).statusCategory!==`DONE`,c=new Map;return{nodes:r.map(e=>{let n=a.get(e),r=c.get(n)??0;return c.set(n,r+1),{id:e,known:t.has(e),rank:n,row:r,done:t.get(e)?.statusCategory===`DONE`,blocked:s(e)&&i.some(t=>t.target===e&&s(t.source)),blocking:s(e)&&i.some(t=>t.source===e&&s(t.target))}}),edges:[...n.values()],cycle:o}}var RF={blocks:`blocks`,relates:`relates to`,duplicates:`duplicates`,implements:`implements`,other:`is linked to`},zF=864e5,BF=e=>e?Date.parse(e):NaN,VF=e=>Number.isFinite(e),HF=e=>new Date(e).toISOString(),UF=e=>e?.estimate?.unit===`points`?e.estimate.value:null;function WF(e){if(e.statusCategory!==`DONE`)return null;let t=BF(Nh(e));if(VF(t))return{at:t,estimated:!1};let n=BF(e.resolved);if(VF(n))return{at:n,estimated:!1};let r=BF(e.updated);return VF(r)?{at:r,estimated:!0}:null}function GF(e,t){let n=[...e.history?.transitions??[]].sort((e,t)=>e.at<t.at?-1:+(e.at>t.at)),r=[],i=null;for(let e of n){let t=BF(e.at);VF(t)&&(e.toCategory===`IN_PROGRESS`&&i===null?i=t:e.toCategory!==`IN_PROGRESS`&&i!==null&&(r.push([i,t]),i=null))}if(i!==null&&r.push([i,t]),r.length||e.statusCategory===`TODO`||e.statusCategory===`UNKNOWN`)return{spans:r,estimated:!1};let a=BF(e.created);return VF(a)?{spans:[[a,t]],estimated:!0}:{spans:[],estimated:!0}}function KF(e,t){let n=e;for(let[e,r]of t)n=n.flatMap(([t,n])=>r<=t||e>=n?[[t,n]]:[...e>t?[[t,e]]:[],...r<n?[[r,n]]:[]]);return n.filter(([e,t])=>t>e)}function qF(e){let t=[];for(let[n,r]of[...e].sort((e,t)=>e[0]-t[0])){let e=t.at(-1);e&&n<=e[1]?e[1]=Math.max(e[1],r):t.push([n,r])}return t}function JF(e,t){if(!e.size)return null;let n=e=>UF(t.byId.get(e))??0,r=[...e.keys(),...[...e.values()].flat()].some(e=>n(e)>0),i=e=>r?n(e):1,a=new Map,o=(t,n)=>{if(a.has(t))return a.get(t);let r=[],s=-1;for(let a of e.get(t)??[]){if(n.has(a))continue;let e=o(a,new Set(n).add(a)),t=e.reduce((e,t)=>e+i(t),0);(t>s||t===s&&e.length>r.length)&&([r,s]=[e,t])}let c=[t,...r];return a.set(t,c),c},s=new Set([...e.values()].flat()),c=IF(e).map(([e])=>e),l=c.filter(e=>!s.has(e)),u=[],d=-1;for(let e of l.length?l:c){let t=o(e,new Set([e])),n=t.reduce((e,t)=>e+i(t),0);(n>d||n===d&&t.length>u.length)&&([u,d]=[t,n])}return{ids:u,points:u.reduce((e,t)=>e+n(t),0),byCount:!r}}function YF(e,t,n){let r=t.filter(t=>t.kind===`pull-request`&&t.items.includes(e.id)&&t.outcome===`open`),i=[];for(let e of r){let r=t.filter(t=>t.kind===`build`&&t.builds===e.id&&VF(BF(t.at))).sort((e,t)=>e.at<t.at?-1:1),a=null;for(let e of r)a=e.outcome===`failed`?a??e:null;if(a)i.push({kind:`checks`,start:a.at,end:HF(n),estimated:!1,by:a.id});else if(!r.length&&e.change?.checks===`FAILING`){let t=BF(e.change.checksAt),r=BF(e.change.updated??e.change.created);VF(t)?i.push({kind:`checks`,start:HF(t),end:HF(n),estimated:!1,by:e.id}):VF(r)&&i.push({kind:`checks`,start:HF(r),end:HF(n),estimated:!0,by:e.id})}}return i}function XF(e){let{prepared:t,health:n}=e,r=BF(e.now),i=LF(t.items),a=new Map(i.nodes.map(e=>[e.id,e.rank])),o=e=>t.byId.has(e)&&t.byId.get(e).statusCategory!==`DONE`,s=i.edges.filter(e=>e.type===`blocks`&&t.byId.has(e.source)&&t.byId.has(e.target)&&e.source!==e.target&&(o(e.source)||o(e.target))),c=JF(PF(t),t),l=new Set(c?.ids??[]),u=new Set((c?.ids??[]).slice(1).map((e,t)=>`${c.ids[t]}->${e}`)),d=[];for(let e of s)for(let t of[e.source,e.target])d.includes(t)||d.push(t);let f=new Map(t.items.map((e,t)=>[e.id,t]));d.sort((e,t)=>(a.get(e)??0)-(a.get(t)??0)||(f.get(e)??0)-(f.get(t)??0));let p=d.map(n=>{let i=t.byId.get(n),o=WF(i),c=o?.at??r,u=[],d=GF(i,c);d.spans.length&&u.push(d.estimated?`In progress from when it was created (estimated): its history records no move into In progress`:`In progress from its transitions`),o?.estimated&&u.push(`Finished at its last update (estimated): no move into Done recorded`);let f=[];for(let e of s.filter(e=>e.target===n)){let n=t.byId.get(e.source),a=Math.max(BF(i.created),BF(n.created)),o=WF(n)?.at??r,s=[VF(a)?a:NaN,Math.min(o,c)];!VF(s[0])||s[1]<=s[0]||f.push({kind:`blocked`,start:HF(s[0]),end:HF(s[1]),estimated:!0,by:e.source})}f.length&&u.push(`Blocked from when both items existed (estimated): links carry no date`);let p=qF(f.map(e=>[BF(e.start),BF(e.end)])),m=KF(d.spans,p).map(e=>({kind:`progress`,start:HF(e[0]),end:HF(e[1]),estimated:d.estimated,by:null})),h=YF(i,t.changes,c);h.length&&u.push(h.some(e=>e.estimated)?`Checks failing since the pull request last changed (estimated)`:`Checks failing since the first of the latest failed builds`);let g=i.statusCategory===`TODO`?Bv({item:i,settings:e.readiness,byId:t.byId}).verdict:null;return{id:n,rank:a.get(n)??0,done:i.statusCategory===`DONE`,points:UF(i),segments:[...p.map(e=>({kind:`blocked`,start:HF(e[0]),end:HF(e[1]),estimated:!0,by:null})),...m].sort((e,t)=>e.start<t.start?-1:1),blocked:f,checks:h,evidence:u,onChain:l.has(n),ready:g}}),m=s.map(e=>({from:e.source,to:e.target,live:o(e.source)&&o(e.target),onChain:u.has(`${e.source}->${e.target}`)})),h,g;if(n?.sprint.start&&n.sprint.end)h=BF(n.sprint.start),g=Math.max(BF(n.sprint.end),r);else{let e=p.flatMap(e=>[...e.segments,...e.checks].map(e=>BF(e.start))).filter(VF);h=e.length?Math.min(...e):r-14*zF,g=r+2*zF}return{start:HF(h),end:HF(g),now:HF(r),sprint:n?.sprint.name??null,bars:p,arrows:m,chain:c,cycle:i.cycle}}function ZF(e){let t=new Set(e.chain?.ids??[]),n=(e.chain?.ids??[]).map(t=>e.bars.find(e=>e.id===t)).filter(e=>e!==void 0);return{...e,bars:n,arrows:e.arrows.filter(e=>e.onChain&&t.has(e.from)&&t.has(e.to))}}var QF=864e5,$F=e=>Date.parse(e),eI=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function tI(){let{dossier:e,now:t}=J(),{health:n,insights:r}=fg();return(0,v.useMemo)(()=>XF({prepared:r,health:n,readiness:e.readiness,now:t}),[r,n,e.readiness,t])}function nI(e){let t=(0,v.useRef)(null),[n,r]=(0,v.useState)(960);return(0,v.useEffect)(()=>{let e=t.current?.parentElement;if(!e||typeof ResizeObserver!=`function`)return;let n=()=>r(Math.round(e.clientWidth)||960);n();let i=new ResizeObserver(n);return i.observe(e),()=>i.disconnect()},[]),{ref:t,width:Math.max(e,n),narrow:n<560}}var rI={label:220,row:36,bar:14,top:26,right:16},iI=5,aI=4,oI={label:170,row:24,bar:10,top:16,right:12};function sI(e){return`${e.estimated?`about `:``}${vg(e.start)} to ${vg(e.end)}`}function cI(e,t,n){let r=[`${n(e.id)}${e.points===null?``:`, ${eI(e.points,`point`)}`}${e.done?`, done`:``}`];for(let t of e.segments.filter(e=>e.kind===`progress`))r.push(`in progress ${sI(t)}`);for(let t of e.blocked)r.push(`blocked by ${n(t.by)} ${sI(t)}`);for(let t of e.checks)r.push(`checks failing since ${t.estimated?`about `:``}${vg(t.start)}`);let i=t.arrows.filter(t=>t.to===e.id).map(e=>n(e.from));return i.length&&r.push(`waits on ${i.join(`, `)}`),e.onChain&&r.push(`on the critical chain`),r.join(`; `)}function lI({g:e,compact:t=!1}){let{byId:n}=J(),{ref:r,width:i,narrow:a}=nI(t?560:680),o={...t?oI:rI,...a?{label:150}:{}},s=(0,v.useId)().replace(/[^\w-]/g,``),c=`gantt-hatch-${s}`,l=`gantt-head-${s}`,u=`gantt-head-chain-${s}`,d=$F(e.start),f=$F(e.end),p=i-o.label-o.right,m=e=>o.label+p*(Math.min(Math.max(e,d),f)-d)/Math.max(1,f-d),h=o.top+e.bars.length*o.row+(t?4:18),g=new Map(e.bars.map((e,t)=>[e.id,o.top+t*o.row+o.row/2])),_=e=>{let t=n.get(e);return t?hg(t):e},y=e=>{let t=n.get(e);return t?`${hg(t)} ${t.title}`:e},b=Math.max(1,Math.round((f-d)/QF)),x=Math.max(1,Math.ceil(b/Math.max(1,Math.floor(p/64)))),S=[];for(let e=Math.ceil(d/QF)*QF;e<=f;e+=x*QF)S.push(e);let C=m($F(e.now)),w=e.chain,T=`Blocker timeline${e.sprint?` for ${e.sprint}`:``}: ${eI(e.bars.length,`item`)} and ${eI(e.arrows.length,`waits-on arrow`)}.${w?` Critical chain: ${w.ids.map(_).join(` blocks `)}${w.byCount?``:`, ${eI(w.points,`point`)}`}.`:``} The table lists every bar and arrow.`,E=Math.floor((o.label-24)/7),D=(e,t)=>e.length>t?`${e.slice(0,Math.max(1,t-1))}…`:e,O=t=>{let n=e.bars.find(e=>e.id===t)?.segments.map(e=>$F(e.end)).sort((e,t)=>t-e)[0];return m(n??$F(e.now))},k=new Map([...new Set(e.arrows.map(e=>e.from))].map((e,t)=>[e,t%iI]));return(0,q.jsx)(`div`,{ref:r,className:`gantt-measure`,children:(0,q.jsxs)(`svg`,{className:`gantt`,width:i,height:h,viewBox:`0 0 ${i} ${h}`,role:`img`,"aria-label":T,"data-gantt":t?`compact`:`full`,children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsxs)(`pattern`,{id:c,patternUnits:`userSpaceOnUse`,width:`6`,height:`6`,patternTransform:`rotate(45)`,children:[(0,q.jsx)(`rect`,{className:`gantt-hatch-bg`,width:`6`,height:`6`}),(0,q.jsx)(`line`,{className:`gantt-hatch-line`,x1:`1.5`,y1:`0`,x2:`1.5`,y2:`6`})]}),(0,q.jsx)(`marker`,{id:l,viewBox:`0 0 8 8`,refX:`7`,refY:`4`,markerWidth:`7`,markerHeight:`7`,orient:`auto-start-reverse`,children:(0,q.jsx)(`path`,{className:`gantt-head`,d:`M0,0 L8,4 L0,8 z`})}),(0,q.jsx)(`marker`,{id:u,viewBox:`0 0 8 8`,refX:`7`,refY:`4`,markerWidth:`6`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,q.jsx)(`path`,{className:`gantt-head gantt-head--chain`,d:`M0,0 L8,4 L0,8 z`})})]}),S.map(e=>(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`line`,{className:`gantt-grid`,x1:m(e),x2:m(e),y1:o.top-4,y2:h-(t?2:16)}),!t&&(0,q.jsx)(`text`,{className:`gantt-axis`,x:m(e)+3,y:o.top-10,children:vg(new Date(e).toISOString()).replace(/ \d{4}$/,``)})]},e)),e.bars.map((t,r)=>{let a=o.top+r*o.row,s=a+o.row/2,l=s-o.bar/2,u=n.get(t.id);return(0,q.jsxs)(`g`,{className:`gantt-row${t.onChain?` gantt-row--chain`:``}`,children:[(0,q.jsx)(`title`,{children:cI(t,e,y)}),t.onChain&&(0,q.jsx)(`rect`,{className:`gantt-band`,x:0,y:a+1,width:i,height:o.row-2}),t.onChain&&(0,q.jsx)(`path`,{className:`gantt-diamond`,d:`M8,${s-5} L13,${s} L8,${s+5} L3,${s} z`}),(0,q.jsxs)(`text`,{className:`gantt-key`,x:18,y:s+4,children:[_(t.id),(0,q.jsx)(`tspan`,{className:`gantt-title`,dx:6,children:D(u?.title??``,Math.max(4,E-_(t.id).length))})]}),t.segments.map((e,t)=>{let n=m($F(e.start)),r=m($F(e.end)),i=Math.max(3,r-n-2);return e.kind===`blocked`?(0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--blocked`,x:n,y:l,width:i,height:o.bar,rx:3,fill:`url(#${c})`},t):(0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--progress`,x:n,y:l,width:i,height:o.bar,rx:3},t)}),t.checks.map((e,t)=>{let n=m($F(e.start));return(0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--checks`,x:n,y:l+o.bar+3,width:Math.max(3,m($F(e.end))-n),height:4,rx:2},`c${t}`)}),!t.segments.length&&!t.done&&(0,q.jsx)(`text`,{className:`gantt-none`,x:o.label+4,y:s+4,children:`Not started`}),t.done&&(0,q.jsx)(`path`,{className:`gantt-done`,d:`M${O(t.id)+4},${s} l3,3 l6,-7`})]},t.id)}),e.arrows.map(e=>{let t=g.get(e.from),n=g.get(e.to);if(t===void 0||n===void 0)return null;let r=O(e.from)+2,a=n>t?1:-1,s=Math.min(i-4,r+12+(k.get(e.from)??0)*8),c=n-a*(o.bar/2+3);return(0,q.jsx)(`path`,{className:`gantt-arrow${e.onChain?` gantt-arrow--chain`:``}${e.live?``:` gantt-arrow--over`}`,d:`M${r},${t} H${s} V${c}`,markerEnd:`url(#${e.onChain?u:l})`},`${e.from}->${e.to}`)}),(0,q.jsx)(`line`,{className:`gantt-today`,x1:C,x2:C,y1:t?2:o.top-4,y2:t?h:h-2}),(0,q.jsx)(`text`,{className:`gantt-today-label`,x:C>i-60?C-4:C+4,y:t?11:h-4,textAnchor:C>i-60?`end`:`start`,children:`Today`})]})})}function uI({g:e}){let t=(0,v.useId)().replace(/[^\w-]/g,``),n=e=>(0,q.jsxs)(`svg`,{className:`gantt-swatch`,width:`28`,height:`14`,viewBox:`0 0 28 14`,"aria-hidden":`true`,children:[(0,q.jsx)(`defs`,{children:(0,q.jsxs)(`pattern`,{id:`lh-${t}`,patternUnits:`userSpaceOnUse`,width:`6`,height:`6`,patternTransform:`rotate(45)`,children:[(0,q.jsx)(`rect`,{className:`gantt-hatch-bg`,width:`6`,height:`6`}),(0,q.jsx)(`line`,{className:`gantt-hatch-line`,x1:`1.5`,y1:`0`,x2:`1.5`,y2:`6`})]})}),e]});return(0,q.jsxs)(`ul`,{className:`gantt-legend`,"aria-label":`Key`,children:[(0,q.jsxs)(`li`,{children:[n((0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--progress`,x:`1`,y:`2`,width:`26`,height:`10`,rx:`3`})),` In progress`]}),(0,q.jsxs)(`li`,{children:[n((0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--blocked`,x:`1`,y:`2`,width:`26`,height:`10`,rx:`3`,fill:`url(#lh-${t})`})),` Blocked`]}),(0,q.jsxs)(`li`,{children:[n((0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--checks`,x:`1`,y:`5`,width:`26`,height:`4`,rx:`2`})),` Checks failing`]}),(0,q.jsxs)(`li`,{children:[n((0,q.jsx)(`path`,{className:`gantt-arrow`,d:`M2,7 H24`})),` Waits on (points at the item that waits)`]}),e.chain&&(0,q.jsxs)(`li`,{children:[n((0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{className:`gantt-diamond`,d:`M6,2 L11,7 L6,12 L1,7 z`}),(0,q.jsx)(`path`,{className:`gantt-arrow gantt-arrow--chain`,d:`M14,7 H27`})]})),` Critical chain`]}),(0,q.jsxs)(`li`,{children:[n((0,q.jsx)(`line`,{className:`gantt-today`,x1:`14`,x2:`14`,y1:`0`,y2:`14`})),` Today`]})]})}function dI({list:e,by:t}){return e.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.map((e,n)=>(0,q.jsxs)(`li`,{children:[e.kind===`checks`?`Since ${e.estimated?`about `:``}${vg(e.start)}`:sI(e),t&&e.by&&(0,q.jsxs)(q.Fragment,{children:[` `,`by `,(0,q.jsx)(HT,{id:e.by})]}),e.estimated&&(0,q.jsx)(`span`,{className:`field`,children:` (estimated)`})]},n))}):(0,q.jsx)(`span`,{className:`note`,children:`None`})}function fI({g:e}){let{byId:t}=J();return(0,q.jsx)(tE,{label:`Every bar and arrow`,caption:`Every bar and waits-on arrow in the blocker timeline`,columns:[{header:`Item`,label:`Item`,rowHeader:!0,cell:e=>(0,q.jsx)(HT,{id:e.id,withTitle:!0})},{header:`Status`,label:`Status`,cell:e=>{let n=t.get(e.id);return`${n.status??Ig[n.statusCategory]}${e.points===null?``:`, ${eI(e.points,`point`)}`}`}},{header:`In progress`,label:`In progress`,cell:e=>(0,q.jsx)(dI,{list:e.segments.filter(e=>e.kind===`progress`)})},{header:`Blocked`,label:`Blocked`,cell:e=>(0,q.jsx)(dI,{list:e.blocked,by:!0})},{header:`Checks failing`,label:`Checks failing`,cell:e=>(0,q.jsx)(dI,{list:e.checks})},{header:`Waits on`,label:`Waits on`,cell:t=>{let n=e.arrows.filter(e=>e.to===t.id);return n.length?(0,q.jsx)(`ul`,{className:`plain`,children:n.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(HT,{id:e.from}),e.live?``:`, done`,e.onChain?`, critical chain`:``]},e.from))}):(0,q.jsx)(`span`,{className:`note`,children:`Nothing`})}},{header:`Critical chain`,label:`Critical chain`,cell:e=>e.onChain?`Yes`:`No`},{header:`Ready to start`,label:`Ready to start`,cell:e=>e.ready?tv[e.ready]:(0,q.jsx)(`span`,{className:`note`,children:`Started`})}],rows:e.bars,rowKey:e=>e.id,wide:!0})}function pI({g:e}){let t=e.chain;return t?(0,q.jsxs)(`p`,{className:`gantt-chain`,children:[(0,q.jsx)(`strong`,{children:`Critical chain:`}),` `,t.ids.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&` blocks `,(0,q.jsx)(HT,{id:e})]},e)),`, `,t.byCount?`${eI(t.ids.length,`item`)} (no item on a chain has points, so the longest)`:`${eI(t.points,`point`)} in ${eI(t.ids.length,`item`)}`,`.`]}):null}function mI(){let e=tI();return e.bars.length?(0,q.jsxs)(`div`,{className:`gantt-panel`,children:[(0,q.jsx)(pI,{g:e}),(0,q.jsx)(uI,{g:e}),(0,q.jsx)(`p`,{className:`note gantt-cue`,children:`Scroll the timeline sideways for the whole sprint, or read the table under it.`}),(0,q.jsx)(eE,{label:`The timeline drawing`,hint:`Scroll sideways for the whole sprint.`,className:`gantt-scroll`,children:(0,q.jsx)(lI,{g:e})}),(0,q.jsxs)(`p`,{className:`note`,children:[e.sprint?`The timeline is ${e.sprint}, ${vg(e.start)} to ${vg(e.end)}.`:`No current sprint, so the timeline spans the items’ own dates.`,` Blocked time is estimated: links carry no date in Jira, Azure DevOps or GitHub, so a block is drawn from when both items existed. Time in progress comes from each item’s transitions, and is estimated from its creation where none were recorded. Failing checks come from its open pull requests’ builds and checks.`]}),e.cycle&&(0,q.jsx)(`p`,{className:`failure`,children:`These blocks links form a loop, so the order of the rows is approximate.`}),(0,q.jsx)(`h3`,{children:`Every bar and arrow`}),(0,q.jsx)(fI,{g:e})]}):(0,q.jsx)(`p`,{className:`note`,children:`Nothing in this dossier blocks anything that is still open.`})}function hI(){let{dossier:e}=J(),t=tI(),n=(0,v.useMemo)(()=>{let e=ZF(t),n=e.bars.slice(0,aI),r=new Set(n.map(e=>e.id));return{...e,bars:n,arrows:e.arrows.filter(e=>r.has(e.from)&&r.has(e.to))}},[t]);if(!n.bars.length)return(0,q.jsx)(`p`,{className:`note`,children:`Nothing open is blocked by anything open.`});let r=n.chain,i=r.ids.length-n.bars.length;return(0,q.jsxs)(`div`,{className:`gantt-compact`,children:[(0,q.jsx)(eE,{label:`The critical chain on the sprint's timeline`,hint:`Scroll sideways for the whole sprint.`,className:`gantt-scroll`,children:(0,q.jsx)(lI,{g:n,compact:!0})}),(0,q.jsxs)(`p`,{className:`note`,children:[`Critical chain: `,eI(r.ids.length,`item`),r.byCount?``:`, ${eI(r.points,`point`)}`,i>0?`; the first ${n.bars.length} shown`:``,`. `,(0,q.jsx)(`a`,{href:Eg(e.name),children:`Every blocker, and the table, on Dependencies`})]})]})}var gI=560,_I={left:34,right:12,top:14,bottom:26},vI=e=>Math.round(e*10)/10;function yI({caption:e,head:t,rows:n}){return(0,q.jsxs)(`details`,{className:`figures`,children:[(0,q.jsx)(`summary`,{children:`Show the figures`}),(0,q.jsx)(tE,{label:e,caption:e,rows:n.map((e,t)=>({i:t,cells:e})),rowKey:e=>String(e.i),columns:t.map((e,t)=>({header:e,label:e,rowHeader:t===0,cell:e=>e.cells[t]}))})]})}function bI({label:e,height:t,children:n}){let r=(0,v.useId)(),i=`chart-fill-${r.replace(/[^\w-]/g,``)}`;return(0,q.jsxs)(`svg`,{className:`chart`,viewBox:`0 0 ${gI} ${t}`,role:`img`,"aria-labelledby":r,preserveAspectRatio:`xMidYMid meet`,style:{"--chart-fill":`url(#${i})`},children:[(0,q.jsx)(`title`,{id:r,children:e}),(0,q.jsx)(`defs`,{children:(0,q.jsxs)(`linearGradient`,{id:i,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,q.jsx)(`stop`,{offset:`0`,className:`chart-stop chart-stop--top`}),(0,q.jsx)(`stop`,{offset:`1`,className:`chart-stop chart-stop--bottom`})]})}),n]})}var xI=e=>{let t=e<=5?1:e<=12?2:e<=30?5:10;return Array.from({length:Math.floor(e/t)+1},(e,n)=>n*t)};function SI({b:e,sprint:t}){let n=e.days.length+e.ahead,r=Math.max(1,...e.days.map(e=>e.scope)),i=e=>_I.left+(gI-_I.left-_I.right)*(e+1)/Math.max(1,n),a=e=>220-_I.bottom-(220-_I.top-_I.bottom)*e/r,o=_I.left,s=[`${o},${a(e.days[0]?.scope??0)}`,...e.days.map((e,t)=>`${i(t)},${a(e.scope)}`)].join(` `),c=[`${o},${a(0)}`,...e.days.map((e,t)=>`${i(t)},${a(e.done)}`)].join(` `),l=e.days.at(-1),u=`${c} ${i(e.days.length-1)},${a(0)} ${o},${a(0)}`,d=l?`${t} burn-up: ${l.done} of ${l.scope} points done after ${e.days.length} days, with ${e.ahead} days to go.${e.days[0]&&l.scope>e.days[0].scope?` Scope grew from ${e.days[0].scope} to ${l.scope} points.`:``}`:`${t} burn-up: no days yet.`;return(0,q.jsxs)(`figure`,{className:`chart-figure`,children:[(0,q.jsxs)(bI,{label:d,height:220,children:[xI(r).map(e=>(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`line`,{className:`grid`,x1:_I.left,x2:gI-_I.right,y1:a(e),y2:a(e)}),(0,q.jsx)(`text`,{className:`axis`,x:_I.left-6,y:a(e)+4,textAnchor:`end`,children:e})]},e)),(0,q.jsx)(`line`,{className:`today`,x1:i(e.days.length-1),x2:i(e.days.length-1),y1:_I.top,y2:220-_I.bottom}),(0,q.jsx)(`polygon`,{className:`area`,points:u}),(0,q.jsx)(`polyline`,{className:`line line--scope`,points:s,pathLength:1}),(0,q.jsx)(`polyline`,{className:`line line--done`,points:c,pathLength:1}),(0,q.jsx)(`text`,{className:`axis`,x:o,y:212,children:`Start`}),(0,q.jsx)(`text`,{className:`axis`,x:i(e.days.length-1),y:212,textAnchor:`middle`,children:`Today`}),(0,q.jsx)(`text`,{className:`axis`,x:gI-_I.right,y:212,textAnchor:`end`,children:`End`})]}),(0,q.jsxs)(`figcaption`,{className:`legend`,children:[(0,q.jsx)(`span`,{className:`key-swatch key-swatch--done`,"aria-hidden":`true`}),` Done points `,(0,q.jsx)(`span`,{className:`key-swatch key-swatch--scope`,"aria-hidden":`true`}),` Scope`,e.unplaced.length>0&&(0,q.jsxs)(`span`,{className:`note`,children:[` `,e.unplaced.length,` done items have no recorded finish and aren't drawn.`]})]}),(0,q.jsx)(yI,{caption:`${t} burn-up by day`,head:[`Day`,`Scope (points)`,`Done (points)`],rows:e.days.map(e=>[vg(e.at),e.scope,e.done])})]})}function CI({weeks:e,noun:t=`items finished`}){let n=Math.max(1,...e.map(e=>e.items.length)),r=(gI-_I.left-_I.right)/e.length,i=Math.min(48,r*.6),a=e=>74-56*e/n,o=`Throughput: ${e.reduce((e,t)=>e+t.items.length,0)} ${t} in ${e.length} weeks, ${e.map(e=>e.items.length).join(`, `)} by week, oldest first. The last week is still running.`;return(0,q.jsxs)(`figure`,{className:`chart-figure`,children:[(0,q.jsxs)(bI,{label:o,height:96,children:[(0,q.jsx)(`line`,{className:`grid`,x1:_I.left,x2:gI-_I.right,y1:a(0),y2:a(0)}),e.map((e,t)=>{let n=_I.left+r*t+r/2;return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`rect`,{className:`bar${e.partial?` bar--partial`:``}`,x:n-i/2,y:a(e.items.length),width:i,height:Math.max(0,a(0)-a(e.items.length)),rx:3}),(0,q.jsx)(`text`,{className:`axis axis--value`,x:n,y:a(e.items.length)-5,textAnchor:`middle`,children:e.items.length}),(0,q.jsx)(`text`,{className:`axis`,x:n,y:90,textAnchor:`middle`,children:vg(e.start).replace(/ \d{4}$/,``)})]},e.start)})]}),(0,q.jsx)(yI,{caption:`${t[0].toUpperCase()}${t.slice(1)} per week`,head:[`Week of`,t===`items finished`?`Finished`:`Count`],rows:e.map(e=>[`${vg(e.start)}${e.partial?` (so far)`:``}`,e.items.length])})]})}function wI({points:e,p85:t}){let n=e.map(e=>Date.parse(e.end)),r=Math.min(...n),i=Math.max(...n),a=Math.max(1,i-r),o=Math.max(1,...e.map(e=>e.days),t??0),s=e=>_I.left+10+(gI-_I.left-_I.right-20)*(e-r)/a,c=e=>200-_I.bottom-(200-_I.top-_I.bottom)*e/(o*1.1),l=`Cycle time: ${e.length} finished items, from ${vI(Math.min(...e.map(e=>e.days)))} to ${vI(o)} days.${t===null?``:` 85% finished within ${vI(t)} days.`}`;return(0,q.jsxs)(`figure`,{className:`chart-figure`,children:[(0,q.jsxs)(bI,{label:l,height:200,children:[xI(Math.ceil(o)).map(e=>(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`line`,{className:`grid`,x1:_I.left,x2:gI-_I.right,y1:c(e),y2:c(e)}),(0,q.jsx)(`text`,{className:`axis`,x:_I.left-6,y:c(e)+4,textAnchor:`end`,children:e})]},e)),t!==null&&(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`line`,{className:`p85`,x1:_I.left,x2:gI-_I.right,y1:c(t),y2:c(t)}),(0,q.jsxs)(`text`,{className:`axis axis--p85`,x:gI-_I.right,y:c(t)-5,textAnchor:`end`,children:[`85% within `,vI(t),` days`]})]}),e.map(e=>(0,q.jsx)(`circle`,{className:`dot`,cx:s(Date.parse(e.end)),cy:c(e.days),r:6},e.id)),(0,q.jsx)(`text`,{className:`axis`,x:_I.left,y:192,children:vg(new Date(r).toISOString())}),(0,q.jsx)(`text`,{className:`axis`,x:gI-_I.right,y:192,textAnchor:`end`,children:vg(new Date(i).toISOString())})]}),(0,q.jsx)(yI,{caption:`Cycle time per finished item`,head:[`Item`,`Finished`,`Cycle time`],rows:e.map(e=>[e.label,vg(e.end),`${vI(e.days)} days`])})]})}function TI({days:e}){let t=e.reduce((e,t)=>e+t.calls,0),n=e.reduce((e,t)=>!e||t.calls>e.calls?t:e,null),r=`Calls per day: ${t} calls in ${e.length} days${n&&n.calls>0?`, the most on ${vg(n.day)} with ${n.calls}`:``}.`;return(0,q.jsx)(DI,{days:e,value:e=>e.calls,label:r,max:String,figures:(0,q.jsx)(yI,{caption:`Calls per day, UTC`,head:[`Day`,`Calls`,`Failed`],rows:e.map(e=>[vg(e.day),e.calls,e.failed])})})}function EI({days:e,compact:t}){let n=e.reduce((e,t)=>e+t.tokens,0),r=e.reduce((e,t)=>!e||t.tokens>e.tokens?t:e,null),i=`Tokens per day: ${t(n)} tokens in ${e.length} days${r&&r.tokens>0?`, the most on ${vg(r.day)} with ${t(r.tokens)}`:``}.`;return(0,q.jsx)(DI,{days:e,value:e=>e.tokens,label:i,max:t,figures:(0,q.jsx)(yI,{caption:`Tokens per day, UTC`,head:[`Day`,`Tokens`],rows:e.map(e=>[vg(e.day),e.tokens.toLocaleString(`en-US`)])})})}function DI({days:e,value:t,label:n,max:r,figures:i}){let a=Math.max(1,...e.map(t)),o=(gI-_I.left-_I.right)/Math.max(1,e.length),s=Math.max(2,Math.min(32,o*.7)),c=e=>88-70*e/a,l=Math.max(1,Math.ceil(e.length/6));return(0,q.jsxs)(`figure`,{className:`chart-figure`,children:[(0,q.jsxs)(bI,{label:n,height:110,children:[(0,q.jsx)(`line`,{className:`grid`,x1:_I.left,x2:gI-_I.right,y1:c(0),y2:c(0)}),(0,q.jsx)(`text`,{className:`axis`,x:_I.left-6,y:c(a)+4,textAnchor:`end`,children:r(a)}),e.map((n,r)=>{let i=_I.left+o*r+o/2;return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`rect`,{className:`bar`,x:i-s/2,y:c(t(n)),width:s,height:Math.max(0,c(0)-c(t(n))),rx:2}),(r%l===0||r===e.length-1)&&(0,q.jsx)(`text`,{className:`axis${r!==e.length-1&&r/l%2==1?` axis--minor`:``}`,x:i,y:106,textAnchor:`middle`,children:vg(n.day).replace(/ \d{4}$/,``)})]},n.day)})]}),i]})}function OI({values:e,kind:t=`line`,against:n,mark:r}){let i=[...e,...n??[],r??0],a=Math.max(1,...i),o=e=>30-28*e/a,s=(e,t)=>t<=1?60:120*e/(t-1),c=e=>e.map((t,n)=>`${s(n,e.length).toFixed(1)},${o(t).toFixed(1)}`).join(` `),l=120/Math.max(1,e.length);return(0,q.jsxs)(`svg`,{className:`spark spark--${t}`,viewBox:`0 0 120 32`,preserveAspectRatio:`none`,"aria-hidden":`true`,focusable:`false`,children:[r!=null&&(0,q.jsx)(`line`,{className:`spark__mark`,x1:0,x2:120,y1:o(r),y2:o(r)}),n&&n.length>0&&(0,q.jsx)(`polyline`,{className:`spark__against`,points:c(n)}),t===`bars`?e.map((e,t)=>(0,q.jsx)(`rect`,{className:`spark__bar`,x:l*t+l*.15,y:o(e),width:l*.7,height:Math.max(1,30-o(e)),rx:1},t)):e.length>0&&(0,q.jsx)(`polyline`,{className:`spark__line`,points:c(e)})]})}var kI=864e5,AI=e=>e.estimate?.unit===`points`?e.estimate.value:0;function jI(e,t){let n=Date.parse(e.sprint.start),r=Date.parse(e.sprint.end),i=Math.min(Date.parse(t),r),a=[],o=e.items.filter(e=>e.statusCategory===`DONE`&&AI(e)>0&&!Nh(e)).map(e=>e.id);for(let t=Math.floor(n/kI)*kI+kI-1;t-kI+1<=i;t+=kI){let n=new Date(Math.min(t,i)).toISOString(),r=0,o=0;for(let t of e.items){let i=e.entries.get(t.id);(i.kind!==`added`||i.at!==null&&i.at<=n)&&(r+=AI(t));let a=t.statusCategory===`DONE`?Nh(t):null;a&&a<=n&&(o+=AI(t))}a.push({at:n,scope:r,done:o})}let s=Date.parse(a.at(-1)?.at??new Date(i).toISOString());return{days:a,ahead:Math.max(0,Math.ceil((r-s)/kI)),unplaced:o}}var MI={blockers:100,builds:90,scope:80,review:70,aging:60,readiness:50},NI=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,PI=e=>[...new Set(e)],FI=e=>Math.round(e*10)/10;function II(e,t){return{kind:e,...t,tickets:t.tickets.slice(0,3),weight:MI[e]+Math.min(t.count,9)}}function LI(e){let t=PF(e);if(!t.size)return null;let n=PI([...t.values()].flat()),r=IF(t),[i,a]=r[0],o=FF(t,i).size;return II(`blockers`,{title:`${NI(n.length,`item`)} blocked`,detail:r.slice(0,2).map(([e,t])=>`[[${e}]] blocks ${t.map(e=>`[[${e}]]`).join(`, `)}`).join(`; `).concat(r.length>2?`; and ${NI(r.length-2,`more blocker`)}.`:`.`),tickets:PI([i,...a,...r.slice(1).flatMap(([e,t])=>[e,...t])]),count:PI([...t.keys(),...n]).length,action:`Unblock [[${i}]] first: ${NI(o,`item`)} ${o===1?`waits`:`wait`} on it${o>a.length?`, directly or down a chain`:``}.`,evidence:`the items' blocks links`,tab:`dependencies`})}function RI(e){let t=e.items.filter(t=>sg(t,e).some(e=>e.code===`failing-build`)).map(e=>e.id);return t.length?II(`builds`,{title:`${NI(t.length,`build`)} failing`,detail:`The latest build for ${t.slice(0,3).map(e=>`[[${e}]]`).join(`, `)}${t.length>3?` and ${t.length-3} more`:``} failed.`,tickets:t,count:t.length,action:`Fix the failing build on [[${t[0]}]].`,evidence:`each item's latest build`,tab:`board`}):null}function zI(e){if(!e||e.remaining.points<=0)return null;let t=Math.max(0,e.days.total-e.days.gone),n=e.days.gone>0?e.done.points/e.days.gone:0;if(e.days.gone===0||n*t>=e.remaining.points)return null;let r=e.items.filter(e=>e.statusCategory===`TODO`).sort((e,t)=>(t.estimate?.value??0)-(e.estimate?.value??0));return II(`scope`,{title:`${NI(e.remaining.points,`point`)} left, ${NI(t,`day`)} to go`,detail:`At ${FI(n)} points a day so far, ${e.sprint.name} finishes about ${FI(n*t)} of the ${e.remaining.points} points left.${r.length?` Not started: ${r.slice(0,3).map(e=>`[[${e.id}]]`).join(`, `)}.`:``}`,tickets:r.map(e=>e.id),count:r.length,action:r.length?`Re-plan ${e.sprint.name}: agree what to drop, starting with [[${r[0].id}]].`:`Re-plan ${e.sprint.name}: the work in progress won't all finish at this pace.`,evidence:`${e.sprint.name}'s points done and left, over its working days`,tab:`board`})}function BI(e,t,n){let r=h_(e,t.byId,n).filter(e=>e.wait.on===`review`&&(e.wait.days??0)>=2||e.flags.some(e=>e.flag===`failing-checks`));if(!r.length)return null;let i=r[0];return II(`review`,{title:`${NI(r.length,`pull request`)} waiting`,detail:r.slice(0,2).map(e=>`[[${e.change.id}]] waits on ${e.wait.on===`review`?`review`:`its checks`}${e.wait.days===null?``:` after ${o_(e.wait.days)}`}`).join(`; `).concat(r.length>2?`; and ${r.length-2} more.`:`.`),tickets:r.map(e=>e.change.id),count:r.length,action:`Get [[${i.change.id}]] ${i.wait.on===`review`?`reviewed`:`its checks passing`}: it has waited ${i.wait.days===null?`longest`:o_(i.wait.days)}.`,evidence:`each open pull request's reviews and checks, against 2 working days`,tab:`prs`})}function VI(e){let t=e.items.flatMap(t=>{let n=sg(t,e),r=n.find(e=>e.code===`aging`)??n.find(e=>e.code===`stale`);return r?[{id:t.id,aging:r.code===`aging`,days:e.ages.get(t.id)??0}]:[]});if(!t.length)return null;t.sort((e,t)=>Number(t.aging)-Number(e.aging)||t.days-e.days);let n=t.filter(e=>e.aging),r=t.filter(e=>!e.aging),i=t[0],a=e=>`${e.slice(0,3).map(e=>`[[${e.id}]]`).join(`, `)}${e.length>3?` and ${e.length-3} more`:``}`,o=[n.length&&e.p85?`${a(n)} ${n.length===1?`has`:`have`} been in progress longer than 85% of finished items took (${NI(FI(e.p85.days),`day`)})`:``,r.length?`${a(r)} had no update for over ${NI(5,`day`)}`:``].filter(Boolean);return II(`aging`,{title:[n.length?`${NI(n.length,`item`)} aging`:``,r.length?`${n.length?r.length:NI(r.length,`item`)} gone quiet`:``].filter(Boolean).join(`, `),detail:`${o.join(`; `)}.`,tickets:t.map(e=>e.id),count:t.length,action:i.aging?`Check in on [[${i.id}]]: in progress ${FI(i.days)} days, longer than most work takes here.`:`Check in on [[${i.id}]]: it has had no update for over ${NI(5,`day`)}.`,evidence:n.length?`history.transitions, against the dossier's cycle times`:`each item's last update`,tab:`board`})}function HI(e){let t=(e.health?.items??e.items).filter(e=>e.statusCategory===`TODO`&&jh(e)).map(t=>Bv({item:t,settings:e.readiness,byId:e.prepared.byId})).filter(e=>e.verdict!==`ready`);if(!t.length)return null;let n=t.filter(e=>e.verdict===`blocked`),r=n[0]??t[0];return II(`readiness`,{title:`${NI(t.length,`item`)} not ready to start`,detail:`${t.slice(0,3).map(e=>`[[${e.id}]] (${e.why[0]?.label.toLowerCase()??e.verdict})`).join(`, `)}${t.length>3?` and ${t.length-3} more`:``}.`,tickets:[...n,...t.filter(e=>e.verdict!==`blocked`)].map(e=>e.id),count:t.length,action:`Firm up [[${r.id}]] before anyone picks it up: ${r.why[0]?.reason??`it isn't ready`}.`,evidence:`the readiness gate's checks, on the cached records`,tab:`board`})}function UI(e){let{prepared:t}=e,n=[LI(t),RI(t),zI(e.health),BI(e.pullRequests,t,e.now),VI(t),HI(e)].filter(e=>e!==null);n.sort((e,t)=>t.weight-e.weight);let r=n.slice(0,3),i=e.pullRequests.filter(e=>e.state===`OPEN`||e.state===`DRAFT`).length,a=`Worked out by code, with no agent call, from ${NI(e.items.length,`work item`)} (their blockers, builds, ages and readiness), ${NI(i,`open pull request`)}${e.health?` and ${e.health.sprint.name}'s pace`:``}.`;return{headline:r[0]?.action??`Keep going: nothing is blocked, failing, waiting on review or aging, and the work not started is ready.`,issues:r,derivedFrom:a}}var WI=e=>Math.round(e*10)/10,GI=e=>`${WI(e)} ${WI(e)===1?`day`:`days`}`;function KI({list:e,what:t}){return e.length?(0,q.jsxs)(`div`,{className:`unknowns`,children:[(0,q.jsxs)(`p`,{className:`note`,children:[e.length,` `,e.length===1?`item has`:`items have`,` no `,t,` the data can show:`]}),(0,q.jsx)(`ul`,{className:`plain`,children:e.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(HT,{id:e.id}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`Unknown: `,e.reason,`.`]})]},e.id))})]}):null}function qI(){let{now:e,dossier:t,sync:n}=J(),{health:r}=fg(),i=nC();return r?(0,q.jsx)(SI,{b:jI(r,e),sprint:r.sprint.name}):(0,q.jsx)(Cj,{message:i(`empty.burnup`),action:(0,q.jsx)(Dj,{dossier:t.name,sync:n})})}function JI(){let{dossier:e,now:t}=J(),n=Bh(e.items,t),r=n.weeks.reduce((e,t)=>e+t.items.length,0),i=n.weeks.filter(e=>!e.partial),a=i.length?i.reduce((e,t)=>e+t.items.length,0)/i.length:0;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`big-figure`,children:[(0,q.jsx)(`span`,{className:`big-number`,children:WI(a)}),` items a week`,(0,q.jsxs)(`span`,{className:`note`,children:[` over the last `,i.length,` full weeks; `,r,` finished in `,n.weeks.length,` weeks.`]})]}),(0,q.jsx)(CI,{weeks:n.weeks}),(0,q.jsx)(`p`,{className:`note`,children:`Counted in the week of each item's last move into Done, from its history.`}),(0,q.jsx)(KI,{list:n.unknown,what:`finish date`})]})}function YI(){let{dossier:e,byId:t}=J(),{insights:n}=fg(),r=Fh(e.items),i=r.known.map(e=>{let n=t.get(e.id);return{id:e.id,label:`${mg(n.source.area)} ${hg(n)}`,end:e.end,days:e.days}});return(0,q.jsxs)(q.Fragment,{children:[i.length?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`big-figure`,children:[n.p85?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`big-number`,children:WI(n.p85.days)}),` days for `,85,`% of items`]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`big-number`,children:i.length}),` `,i.length===1?`item`:`items`,` timed`]}),(0,q.jsx)(`span`,{className:`note`,children:` From the first move into In progress to the last into Done.`})]}),(0,q.jsx)(wI,{points:i,p85:n.p85?.days??null}),!n.p85&&(0,q.jsxs)(`p`,{className:`note`,children:[`Fewer than `,3,` cycle times, so no percentile yet, and nothing is flagged as aging.`]})]}):(0,q.jsx)(`p`,{children:`No finished item here has a cycle time the data can show.`}),(0,q.jsx)(KI,{list:r.unknown,what:`cycle time`})]})}function XI(){let{dossier:e,now:t,byId:n}=J(),{insights:r}=fg(),i=Rh(e.items,t),a=Math.max(1,...i.known.map(e=>e.days),r.p85?.days??0);return(0,q.jsxs)(q.Fragment,{children:[i.known.length?(0,q.jsx)(`ul`,{className:`aging`,children:i.known.map(e=>{let t=n.get(e.id),i=r.p85!==null&&e.days>r.p85.days;return(0,q.jsxs)(`li`,{className:i?`aging--over`:void 0,children:[(0,q.jsxs)(`div`,{className:`aging-row`,children:[(0,q.jsx)(HT,{id:e.id,withTitle:!0}),(0,q.jsxs)(`span`,{className:`aging-days`,children:[GI(e.days),i&&(0,q.jsxs)(`span`,{className:`flag`,children:[` past p`,85]})]})]}),(0,q.jsxs)(`div`,{className:`aging-bar`,"aria-hidden":`true`,children:[(0,q.jsx)(`span`,{style:{width:`${100*e.days/a}%`}}),r.p85&&(0,q.jsx)(`i`,{style:{left:`${100*r.p85.days/a}%`}})]}),(0,q.jsxs)(`p`,{className:`evidence`,children:[(0,q.jsx)(Nj,{person:t.assignee}),` `,t.status,`, in progress since `,Y(e.since),`. Source: `,(0,q.jsx)(`code`,{children:`history.transitions`})]})]},e.id)})}):(0,q.jsx)(`p`,{children:`Nothing in progress has a recorded start.`}),r.p85&&(0,q.jsxs)(`p`,{className:`note`,children:[`The marker on each bar is p`,85,` of this dossier's cycle times, `,GI(r.p85.days),`.`]}),(0,q.jsx)(KI,{list:i.unknown,what:`start`})]})}var ZI=e=>`${e} ${e===1?`point`:`points`}`;function QI({h:e}){let t=tC(),n=e.done.points+e.remaining.points,r=t=>e.items.filter(n=>e.entries.get(n.id)?.kind===t);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`note`,children:[vg(e.sprint.start),` to `,vg(e.sprint.end),`, working days only.`]}),(0,q.jsxs)(`ul`,{className:`stats`,"aria-label":`Sprint figures`,children:[(0,q.jsx)($I,{label:t(`pointsDone`,`Done`),value:`${e.done.points} of ${n}`,note:`points, ${e.done.count} items`}),(0,q.jsx)($I,{label:`Planned`,value:String(e.planned.points),note:`points, ${e.planned.count} items`}),(0,q.jsx)($I,{label:`Added mid-sprint`,value:String(e.added.points),note:`points, ${e.added.count} items`}),(0,q.jsx)($I,{label:`Carried over`,value:String(e.carried.points),note:`points, ${e.carried.count} items`})]}),(0,q.jsx)(`div`,{className:`meter`,role:`img`,"aria-label":`${e.done.points} of ${n} points done`,children:(0,q.jsx)(`span`,{style:{width:`${n?100*e.done.points/n:0}%`}})}),(0,q.jsx)(qI,{}),e.otherUnits.length>0&&(0,q.jsxs)(`p`,{className:`note`,children:[`Points totals leave out items estimated in other units:`,` `,e.otherUnits.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`, `,(0,q.jsx)(HT,{id:e})]},e)),`.`]}),(0,q.jsx)(`h3`,{children:`At risk`}),e.risks.length?(0,q.jsx)(`ul`,{className:`rows`,children:e.risks.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(HT,{id:e.id,withTitle:!0}),(0,q.jsx)(`ul`,{className:`reasons`,children:e.reasons.map((e,t)=>(0,q.jsx)(`li`,{children:(0,q.jsx)(WT,{text:ng(e)})},t))})]},e.id))}):(0,q.jsx)(`p`,{children:`Nothing.`}),[`added`,`carried`].map(t=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h3`,{children:t===`added`?`Added after the sprint started`:`Carried over`}),r(t).length?(0,q.jsx)(`ul`,{className:`rows`,children:r(t).map(t=>{let n=e.entries.get(t.id);return(0,q.jsxs)(`li`,{children:[(0,q.jsx)(HT,{id:t.id,withTitle:!0}),(0,q.jsxs)(`p`,{className:`evidence`,children:[n.from?`From ${n.from}`:`Added`,n.at?` on ${Y(n.at)}`:``,`, `,ZI(t.estimate?.unit===`points`?t.estimate.value:0),t.estimate?``:` (no estimate)`,`. Source: `,(0,q.jsx)(`code`,{children:n.evidence})]})]},t.id)})}):(0,q.jsx)(`p`,{children:`None.`})]},t))]})}function $I({label:e,value:t,note:n}){return(0,q.jsxs)(`li`,{className:`stat`,children:[(0,q.jsx)(`span`,{className:`stat-label`,children:e}),(0,q.jsx)(`span`,{className:`stat-value`,children:t}),(0,q.jsx)(`span`,{className:`stat-note`,children:n})]})}var eL=e=>Math.round(e*10)/10,tL={board:`Board`,dependencies:`Dependencies`,prs:`Pull requests`};function nL(){let{dossier:e,now:t}=J(),{health:n,insights:r}=fg(),i=(0,v.useMemo)(()=>UI({items:e.items,pullRequests:e.pullRequests??[],prepared:r,health:n,readiness:e.readiness,now:t}),[e,t,n,r]),a=aj()?.history.list?.[0]??null,o=a?a.at>=t||a.at.slice(0,10)===t.slice(0,10):!1,s=a?.recommendation&&o?a:null;return(0,q.jsxs)(`div`,{className:`overview`,children:[(0,q.jsxs)(Q,{as:`section`,className:`panel overview-rec`,"aria-labelledby":`rec-title`,"data-rec-source":s?`analysis`:`code`,children:[(0,q.jsxs)(`div`,{className:`overview-head`,children:[(0,q.jsxs)(`h2`,{id:`rec-title`,className:`overview-label`,children:[`Recommendation `,(0,q.jsx)(Fw,{topic:`recommendation`})]}),(0,q.jsx)(`p`,{className:`note overview-rec__how`,children:s?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`overview-rec__source`,children:`From the latest Analyze`}),`, `,(0,q.jsx)(`time`,{dateTime:s.at,children:Y(s.at)}),`, by `,NO(s),`.`,` `,(0,q.jsx)(`a`,{href:Og(e.name,s.id),"data-rec-analysis":``,children:`Open the analysis`})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`overview-rec__source`,children:`Worked out by code`}),i.derivedFrom.replace(/^Worked out by code/,``),a?(0,q.jsxs)(q.Fragment,{children:[` `,`The latest Analyze, `,(0,q.jsx)(`time`,{dateTime:a.at,children:Y(a.at)}),`, `,o?`had no recommendation line`:`is older than the data`,`:`,` `,(0,q.jsx)(`a`,{href:Og(e.name,a.id),"data-rec-analysis":``,children:`open it`}),`.`]}):` No Analyze kept for this dossier yet.`]})})]}),(0,q.jsx)(`p`,{className:`overview-rec__headline${s?` overview-rec__headline--analysis`:``}`,children:s?(0,q.jsx)(WT,{text:s.recommendation,chips:!0}):(0,q.jsx)(WT,{text:i.headline})})]}),(0,q.jsxs)(`section`,{className:`overview-issues`,"aria-labelledby":`issues-title`,children:[(0,q.jsx)(`h2`,{id:`issues-title`,className:`overview-label`,children:`Key issues`}),i.issues.length?(0,q.jsx)(`ol`,{className:`issue-cards`,children:i.issues.map(e=>(0,q.jsx)(iL,{issue:e},e.kind))}):(0,q.jsx)(`p`,{className:`note`,children:`No issue stands out: nothing is blocked, failing, waiting on review or aging.`})]}),(0,q.jsx)(oL,{}),(0,q.jsx)(sL,{})]})}function rL(e,t){return t===`prs`?Sg(e):t===`dependencies`?Eg(e):Tg(e)}function iL({issue:e}){let{dossier:t}=J(),n=e.count-e.tickets.length;return(0,q.jsxs)(`li`,{className:`issue-card`,"data-card":``,children:[(0,q.jsx)(`h3`,{className:`issue-card__title issue-card__title--${e.kind}`,children:e.title}),(0,q.jsx)(`p`,{className:`issue-card__detail`,children:(0,q.jsx)(WT,{text:e.detail})}),(0,q.jsx)(`ul`,{className:`ticket-chips`,"aria-label":`Tickets: ${e.title}`,children:e.tickets.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(qT,{id:e})},e))}),(0,q.jsx)(`p`,{className:`issue-card__foot note`,children:(0,q.jsxs)(`a`,{href:rL(t.name,e.tab),children:[n>0?`${n} more on `:`Open `,tL[e.tab]]})})]})}function aL({id:e,label:t,value:n,unit:r,spark:i,title:a,children:o}){return(0,q.jsx)(`li`,{className:`metric`,children:(0,q.jsxs)(lf,{children:[(0,q.jsxs)(W,{className:`metric__button`,"data-metric":e,children:[(0,q.jsx)(`span`,{className:`metric__label`,children:t}),` `,(0,q.jsxs)(`span`,{className:`metric__figure`,children:[(0,q.jsx)(`span`,{className:`metric__value`,children:n}),` `,(0,q.jsx)(`span`,{className:`metric__unit`,children:r})]}),(0,q.jsx)(`span`,{className:`sr-only`,children:`, show the full chart`}),i]}),(0,q.jsx)(Of,{className:`feedback-overlay`,"data-backdrop":``,isDismissable:!0,children:(0,q.jsx)(Ef,{className:`feedback-modal chart-modal`,children:(0,q.jsx)(uf,{className:`feedback-dialog chart-dialog`,children:({close:e})=>(0,q.jsxs)(`div`,{className:`chart-dialog__body`,children:[(0,q.jsxs)(`div`,{className:`chart-dialog__head`,children:[(0,q.jsx)(ja,{slot:`title`,children:a}),(0,q.jsx)(W,{className:`btn btn--small`,onPress:e,"data-chart-close":``,children:`Close`})]}),o]})})})})]})})}function oL(){let{dossier:e,now:t,byId:n,sync:r}=J(),{health:i,insights:a}=fg(),o=nC(),{Panel:s}=xT(),{b:c,t:l,cycles:u,ages:d,queue:f}=(0,v.useMemo)(()=>({b:i?jI(i,t):null,t:Bh(e.items,t),cycles:Fh(e.items).known.sort((e,t)=>e.end<t.end?-1:1),ages:Rh(e.items,t).known,queue:h_(e.pullRequests??[],n,t).filter(e=>e.wait.on!==`draft`)}),[i,e,t,n]),p=c?.days.at(-1),m=l.weeks.filter(e=>!e.partial),h=m.length?m.reduce((e,t)=>e+t.items.length,0)/m.length:0,g=f.map(e=>e.wait.days??0),_=g.length?Math.max(...g):0;return(0,q.jsxs)(`section`,{className:`overview-metrics`,"aria-labelledby":`metrics-title`,children:[(0,q.jsx)(`h2`,{id:`metrics-title`,className:`sr-only`,children:`Metrics`}),(0,q.jsxs)(`ul`,{className:`metric-strip`,children:[(0,q.jsx)(aL,{id:`burnup`,label:`Burn-up`,value:p?`${p.done} of ${p.scope}`:`No sprint`,unit:p?`points`:``,spark:(0,q.jsx)(OI,{values:c?.days.map(e=>e.done)??[],against:c?.days.map(e=>e.scope)??[]}),title:i?`${i.sprint.name}: day ${i.days.gone} of ${i.days.total}`:`Sprint`,children:i?(0,q.jsx)(`div`,{className:`chart-dialog__sprint`,children:(0,q.jsx)(s,{id:`sprint`,children:(0,q.jsx)(QI,{h:i})})}):(0,q.jsx)(Cj,{message:o(`empty.sprint`),action:(0,q.jsx)(Dj,{dossier:e.name,sync:r})})}),(0,q.jsx)(aL,{id:`throughput`,label:`Throughput`,value:String(eL(h)),unit:`a week`,spark:(0,q.jsx)(OI,{kind:`bars`,values:l.weeks.map(e=>e.items.length)}),title:`Throughput`,children:(0,q.jsx)(JI,{})}),(0,q.jsx)(aL,{id:`cycle`,label:`Cycle time`,value:a.p85?`${eL(a.p85.days)}`:String(u.length),unit:a.p85?`days, 85% within`:u.length===1?`item timed`:`items timed`,spark:(0,q.jsx)(OI,{values:u.map(e=>e.days),mark:a.p85?.days??null}),title:`Cycle time`,children:(0,q.jsx)(YI,{})}),(0,q.jsxs)(aL,{id:`aging`,label:`Aging WIP`,value:String(d.length),unit:d.length?`in progress, oldest ${eL(d[0].days)} d`:`in progress`,spark:(0,q.jsx)(OI,{kind:`bars`,values:d.map(e=>e.days),mark:a.p85?.days??null}),title:`Aging work in progress`,children:[(0,q.jsx)(`p`,{className:`note`,children:o(`aging.note`)}),(0,q.jsx)(XI,{})]}),(0,q.jsxs)(aL,{id:`pr-wait`,label:`PR wait`,value:f.length?String(eL(_)):`0`,unit:f.length?`working days, ${f.length} open`:`open`,spark:(0,q.jsx)(OI,{kind:`bars`,values:g}),title:`Pull requests waiting`,children:[f.length?(0,q.jsx)(`ul`,{className:`rows`,children:f.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{change:e.change,withTitle:!0}),(0,q.jsxs)(`p`,{className:`evidence`,children:[`Waits on `,s_[e.wait.on].toLowerCase(),e.wait.days===null?``:` for ${o_(e.wait.days)}`,`: `,e.wait.why,`.`]})]},e.change.id))}):(0,q.jsx)(`p`,{children:`No pull request is open, apart from drafts.`}),(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`a`,{href:Sg(e.name),children:`The Pull requests tab`}),` has the whole queue, its flags and its flow.`]})]})]})]})}function sL(){let{dossier:e}=J();return(0,q.jsxs)(`section`,{className:`overview-blockers`,"aria-labelledby":`blockers-title`,children:[(0,q.jsxs)(`div`,{className:`overview-head`,children:[(0,q.jsx)(`h2`,{id:`blockers-title`,className:`overview-label`,children:`Blockers`}),(0,q.jsx)(`a`,{className:`note`,href:Eg(e.name),children:`All dependencies`})]}),(0,q.jsx)(hI,{})]})}var cL=(0,v.lazy)(()=>Zm(()=>import(`./Graph-BG4Q-CNd.js`).then(e=>({default:e.Graph})),__vite__mapDeps([6,7]),import.meta.url)),lL=e=>e.slice(e.lastIndexOf(`#`));function uL({change:e}){let t=e.kind===`pull-request`?`${lL(e.id)} ${e.title}`:e.title;return e.url?(0,q.jsx)(`a`,{href:e.url,children:t}):(0,q.jsx)(`span`,{children:t})}function dL({ids:e}){return e.length?(0,q.jsx)(`span`,{className:`cites`,children:e.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`, `,(0,q.jsx)(HT,{id:e})]},e))}):(0,q.jsx)(`span`,{className:`note`,children:`No work item named`})}function fL(e){return[{header:`Work item`,label:`Work item`,rowHeader:!0,cell:e=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(HT,{id:e.item.id,withTitle:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,Lg(e.item)]})]})},{header:`Status`,label:`Status`,cell:e=>(0,q.jsxs)(q.Fragment,{children:[e.item.status,e.item.status?.toLowerCase()!==Ig[e.item.statusCategory].toLowerCase()&&(0,q.jsxs)(`span`,{className:`field`,children:[` (`,Ig[e.item.statusCategory],`)`]})]})},{header:`Pull requests`,label:`Pull requests`,cell:e=>e.changes.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.changes.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(uL,{change:e}),` `,(0,q.jsx)(Lj,{of:e})]},e.id))}):`None linked`},{header:`Builds`,label:`Builds`,cell:t=>t.changes.length?(0,q.jsx)(`ul`,{className:`plain`,children:t.changes.map(t=>{let n=e.filter(e=>e.builds===t.id).sort((e,t)=>e.at<t.at?1:-1)[0];return(0,q.jsx)(`li`,{children:n?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(uL,{change:n}),` `,(0,q.jsx)(Lj,{of:n})]}):(0,q.jsxs)(`span`,{className:`note`,children:[`No build for `,lL(t.id)]})},t.id)})}):`None`},{header:`Deployed to`,label:`Deployed to`,cell:e=>e.deployedTo.length?e.deployedTo.map(e=>e.environment).join(`, `):`Not deployed`},{header:`Check`,label:`Check`,cell:e=>e.flags.length?(0,q.jsx)(`ul`,{className:`plain flags`,children:e.flags.map(e=>(0,q.jsx)(`li`,{children:zj[e]},e))}):`No gaps`}]}function pL(e){let{dossier:t,now:n}=J();return(0,v.useMemo)(()=>{if(!e)return null;let r=Y_({dossier:t.name,entries:t.people??[],wipLimit:t.wipLimit??null,items:t.items,changes:t.pullRequests??[],now:n}),i=Q_(r,e);return{name:i?.who.name??null,items:i?$_(r,e,t.items,t.people??[]):[]}},[e,t,n])}function mL({tab:e=`overview`,person:t,analysis:n}={}){let{health:r}=fg();return vL(r),e===`board`?(0,q.jsx)(hL,{...t?{person:t}:{}}):e===`dependencies`?(0,q.jsx)(gL,{}):e===`analyses`?(0,q.jsx)(AF,{...n?{open:n}:{}}):(0,q.jsx)(nL,{})}function hL({person:e}){let{dossier:t}=J(),n=pL(e),r=tC(),i=nC(),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1),{health:l,insights:u}=fg(),d=l?.items??t.items,f=lg(d,u),p=n?d.filter(e=>n.items.includes(e)):d,m=s?p.filter(e=>f.includes(e)):p,h=Rj(d,t.changes,t.deployments),g=a?h.filter(e=>e.flags.length):h,_=t.changes.filter(e=>e.kind===`build`),y=[...t.calls.work,...t.calls.prs,...t.calls.builds,...t.calls.deployments];return(0,q.jsxs)(`div`,{className:`tab-panels`,children:[(0,q.jsxs)(mj,{id:`board`,title:r(`board`,l?`${l.sprint.name} board`:`Board`),calls:t.calls.work,alerts:!1,children:[n&&(0,q.jsx)(_L,{name:n.name,shown:p.length,all:n.items.length}),(0,q.jsxs)(`div`,{className:`board-tools`,children:[(0,q.jsxs)(Eo,{className:`check`,isSelected:s,onChange:c,"data-attention-only":``,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:s?`✓`:``}),`Needs attention only (`,f.length,`)`]}),(0,q.jsxs)(`p`,{className:`note`,children:[`A flagged card needs action now or a look: it is blocked, its build fails, it is aging or stale, and the like. `,(0,q.jsx)(Fw,{topic:`insights`})]})]}),(0,q.jsx)(kF,{items:m})]}),(0,q.jsxs)(mj,{id:`trace`,title:`Stories, pull requests, builds and deployments`,calls:y,alerts:!1,children:[(0,q.jsx)(`p`,{className:`note`,children:i(`trace.note`)}),(0,q.jsxs)(Eo,{className:`check`,isSelected:a,onChange:o,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:a?`✓`:``}),`Only items with something to check`]}),(0,q.jsx)(tE,{className:`trace`,label:`Work items and their delivery`,wide:!0,rows:g,rowKey:e=>e.item.id,columns:fL(_)})]}),(0,q.jsxs)(`div`,{className:`panel-grid`,children:[(0,q.jsx)(mj,{id:`builds`,title:r(`builds`,`Builds`),calls:t.calls.builds,children:_.length?(0,q.jsx)(`ul`,{className:`rows`,children:_.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(uL,{change:e}),` `,(0,q.jsx)(Lj,{of:e}),(0,q.jsxs)(`p`,{className:`evidence`,children:[`For pull request `,e.builds?lL(e.builds):`none`,`, `,Y(e.at),`.`]})]},e.id))}):(0,q.jsx)(Cj,{message:i(`empty.builds`),action:(0,q.jsx)(wj,{edit:!0,href:Mg(t.name,`sources`),children:`Link a pipeline`}),help:`dossier-setup`})}),(0,q.jsx)(mj,{id:`deployments`,title:`Deployments`,calls:t.calls.deployments,children:t.deployments.length?(0,q.jsx)(`ul`,{className:`rows`,children:t.deployments.map(e=>(0,q.jsx)(yL,{d:e},e.id))}):(0,q.jsx)(Cj,{message:i(`empty.deployments`),action:(0,q.jsx)(wj,{edit:!0,href:Mg(t.name,`sources`),children:`Add an environment`}),help:`dossier-setup`})})]})]})}function gL(){let{dossier:e}=J(),t=tC(),n=nC();return(0,q.jsxs)(`div`,{className:`tab-panels`,children:[(0,q.jsx)(mj,{id:`gantt`,title:`Blocker timeline`,calls:[...e.calls.work,...e.calls.prs,...e.calls.builds],alerts:!1,children:(0,q.jsx)(mI,{})}),(0,q.jsx)(mj,{id:`graph`,title:t(`dependencies`,`Dependencies`),calls:e.calls.work,alerts:!1,children:(0,q.jsx)(v.Suspense,{fallback:(0,q.jsx)(PA,{size:`panel`,message:n(`loading.graph`)}),children:(0,q.jsx)(cL,{})})})]})}function _L({name:e,shown:t,all:n}){let{dossier:r}=J(),i=(0,v.useRef)(null);(0,v.useEffect)(()=>{(i.current?.closest(`section`)??i.current)?.scrollIntoView?.({block:`start`})},[]);let a=e=>`${e} ${e===1?`item`:`items`}`;return(0,q.jsxs)(`p`,{id:`board-filter`,ref:i,className:`board-filter`,tabIndex:-1,children:[e===null?(0,q.jsx)(q.Fragment,{children:`The People view's link named nobody this dossier's data shows, so no items are shown. `}):(0,q.jsxs)(q.Fragment,{children:[`Showing `,e,`'s items: `,a(t),` on this board`,n>t?`, of ${a(n)} assigned to them in all`:``,`.`,` `]}),(0,q.jsx)(`a`,{href:Tg(r.name),children:`Show everyone's`}),` · `,(0,q.jsx)(`a`,{href:Cg(r.name),children:`Back to People`})]})}function vL(e){let t=e&&e.days.total>1?Math.min(1,Math.max(0,(e.days.gone-1)/(e.days.total-1))):null;(0,v.useEffect)(()=>{if(t===null)return;let e=document.documentElement;return e.style.setProperty(`--sprint-progress`,t.toFixed(3)),()=>{e.style.removeProperty(`--sprint-progress`)}},[t])}function yL({d:e}){let t=e.url?(0,q.jsx)(`a`,{href:e.url,children:e.name}):(0,q.jsx)(`span`,{children:e.name});return(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`h3`,{className:`env`,children:e.environment}),(0,q.jsxs)(`p`,{children:[t,` `,(0,q.jsx)(`span`,{className:`outcome outcome--${e.outcome}`,children:e.state})]}),(0,q.jsxs)(`p`,{className:`evidence`,children:[e.version?`${e.version}, `:``,`commit `,(0,q.jsx)(`code`,{children:e.commit}),`.`,` `,e.unknownCommit?(0,q.jsx)(`span`,{className:`failure`,children:`No listed pull request merged as this commit.`}):(0,q.jsxs)(q.Fragment,{children:[`Includes `,e.includes.length,` merged pull `,e.includes.length===1?`request`:`requests`,e.items.length?(0,q.jsxs)(q.Fragment,{children:[`, for `,(0,q.jsx)(dL,{ids:e.items})]}):`, none for this sprint`,`.`]})]})]})}var bL=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function xL({sources:e,dossier:t}){let n=t?(0,q.jsx)(zw,{href:Mg(t,`sources`),label:`Edit ${t}'s sources`}):null;return e.length?(0,q.jsxs)(`div`,{className:`source-badges`,children:[(0,q.jsx)(`ul`,{className:`badges`,"aria-label":`Sources`,children:e.map(e=>(0,q.jsxs)(`li`,{className:`badge`,title:e.connection?`${mg(e.area)}, connection ${e.connection}`:`${mg(e.area)}, your default connection`,children:[mg(e.area),e.connection&&(0,q.jsxs)(`span`,{className:`sr-only`,children:[`, connection `,e.connection]})]},e.area))}),n]}):(0,q.jsxs)(`p`,{className:`note`,children:[`No sources linked yet. `,n]})}function SL({preview:e,sprint:t=!0}){let n=e.sprint;return(0,q.jsxs)(`ul`,{className:`count-strip`,"aria-label":`Counts`,children:[t&&n&&(0,q.jsx)(CL,{value:String(n.daysLeft),label:`${n.daysLeft===1?`day`:`days`} left`}),(0,q.jsx)(CL,{value:String(e.inProgress),label:`in progress`}),(0,q.jsx)(CL,{value:String(e.blocked),label:`blocked`,tone:e.blocked?`warn`:void 0}),(0,q.jsx)(CL,{value:String(e.awaitingReview),label:e.awaitingReview===1?`PR waits on review`:`PRs wait on review`})]})}function CL({value:e,label:t,tone:n}){return(0,q.jsxs)(`li`,{className:`count${n?` count--${n}`:``}`,children:[(0,q.jsx)(`span`,{className:`count__value`,children:e}),` `,(0,q.jsx)(`span`,{className:`count__label`,children:t})]})}function wL({sprint:e}){let t=e.burn,n=Math.max(1,...t.map(e=>e.scope)),r=Math.max(1,t.length-1+e.ahead),i=e=>100*e/r,a=e=>28-26*e/n,o=e=>t.map((t,n)=>`${i(n).toFixed(1)},${a(e(t)).toFixed(1)}`).join(` `);return(0,q.jsx)(`svg`,{className:`mini-burnup`,viewBox:`0 0 100 30`,preserveAspectRatio:`none`,role:`img`,"aria-label":`Burn-up: ${e.done} of ${e.scope} points done`,children:t.length>1&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`polyline`,{className:`mini-burnup__scope`,points:o(e=>e.scope),vectorEffect:`non-scaling-stroke`}),(0,q.jsx)(`polyline`,{className:`mini-burnup__done`,points:o(e=>e.done),vectorEffect:`non-scaling-stroke`})]})})}function TL({sprint:e}){return(0,q.jsxs)(`p`,{className:`sprint-line`,children:[(0,q.jsx)(`span`,{className:`sprint-line__name`,children:e.name}),` `,(0,q.jsxs)(`span`,{className:`note`,children:[bL(e.daysLeft,`working day`),` left of `,e.daysTotal,`, `,e.done,` of `,bL(e.scope,`point`),` done`]})]})}function EL({field:e,dossier:t,value:n,config:r,onSaved:i,children:a}){let[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(n??``),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(null),m=(0,v.useRef)(null),h=(0,v.useRef)(null),g=(0,v.useRef)(!1),_=(0,v.useId)(),y=e===`name`?`Rename ${t}`:n?`Edit ${t}'s description`:`Add a description to ${t}`;(0,v.useEffect)(()=>{o?m.current?.select():g.current&&(g.current=!1,h.current?.focus())},[o]);let b=()=>{g.current=!0,s(!1),p(null)},x=async()=>{if(!r||u)return;let a=c.trim();if(a===(n??``))return b();d(!0),p(null);try{let n=await r.run(`dossiers describe`,{dossier:t,[e]:a});if(!n.ok){p({message:n.error.message,fix:n.error.fix??null});return}let o=n.data;g.current=e===`description`,s(!1),i({name:o.name,description:o.description??null,renamed:o.renamed?{from:o.renamed.from,to:o.renamed.to}:null})}catch(e){p({message:e instanceof Error?e.message:String(e),fix:null})}finally{d(!1)}};return!o||!r||r.disabled?(0,q.jsxs)(`span`,{className:`editable editable--${e}`,children:[a,r&&!r.disabled&&(0,q.jsx)(`button`,{ref:h,type:`button`,className:`btn btn--small edit-pencil`,"data-edit":``,"aria-label":y,title:y,onClick:()=>{l(n??``),s(!0)},children:(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`✎`})})]}):(0,q.jsxs)(`span`,{className:`editable editable--${e} editable--open`,children:[(0,q.jsx)(`label`,{className:`sr-only`,htmlFor:_,children:e===`name`?`New name for ${t}`:`Description of ${t}`}),(0,q.jsx)(`input`,{ref:m,id:_,className:`edit-field`,value:c,disabled:u,maxLength:e===`name`?64:300,spellCheck:e===`description`,autoComplete:`off`,"aria-describedby":`${_}-hint${f?` ${_}-error`:``}`,"aria-invalid":f?!0:void 0,onChange:e=>l(e.target.value),onKeyDown:e=>{hF(`editSave`,e)?(e.preventDefault(),x()):hF(`editCancel`,e)&&(e.preventDefault(),e.stopPropagation(),l(n??``),b())}}),(0,q.jsx)(`span`,{id:`${_}-hint`,className:`edit-hint note`,children:u?`Saving through toil dossiers describe…`:e===`name`?`Enter renames it with toil dossiers describe; Escape cancels. Lowercase letters, digits and hyphens.`:`Enter saves it with toil dossiers describe; Escape cancels.`}),f&&(0,q.jsxs)(`span`,{id:`${_}-error`,role:`alert`,className:`edit-error failure`,children:[f.message,f.fix&&(0,q.jsxs)(`span`,{className:`note`,children:[` Fix: `,f.fix]})]})]})}var DL={"needs-you":`Needs you`,working:`Working`,stale:`Stale`,earlier:`Earlier`},OL=e=>e.state===`queued`&&e.waiting===`start`;function kL(e){return e.state===`needs-you`?`needs-you`:e.state===`working`||e.state===`queued`?`working`:e.stale&&!e.renewedBy?`stale`:`earlier`}function AL(){let{dossier:e}=J(),{list:t}=WP(e.name);return{needsYou:t?.assignments.filter(e=>e.state===`needs-you`).length??0}}function jL({a:e,now:t}){let n=e.proposals.filter(e=>e.status===`pending`).length,r=[n?`${n} ${n===1?`proposal`:`proposals`} to review`:``,e.questions.length?`${e.questions.length} ${e.questions.length===1?`question`:`questions`}`:``].filter(Boolean).join(`, `);return(0,q.jsxs)(`li`,{className:`agent-card`,"data-card":``,children:[(0,q.jsxs)(`p`,{className:`agent-card__top`,children:[(0,q.jsx)(GP,{a:e}),` `,(0,q.jsx)(`span`,{className:`assign-mode`,children:DD[e.mode].label})]}),(0,q.jsxs)(`p`,{className:`agent-card__item`,children:[(0,q.jsx)(HT,{id:e.item}),` `,(0,q.jsx)(`span`,{className:`agent-card__title`,children:e.itemTitle})]}),(0,q.jsxs)(`p`,{className:`note`,children:[e.state===`needs-you`&&r?`${r}. `:``,e.state===`failed`&&e.stop?`${e.stop.message} `:``,e.adapter?ED[e.adapter]:`No adapter yet`,` · `,AD(e.ranMs??kD(e,t))]}),e.stale&&(0,q.jsx)(SD,{stale:e.stale}),e.renewedBy&&(0,q.jsxs)(`p`,{className:`note`,children:[`Renewed as `,(0,q.jsx)(`a`,{href:VP(e.dossier,e.renewedBy),children:`a fresh assignment`}),`.`]}),(0,q.jsxs)(`a`,{className:`agent-card__open`,href:VP(e.dossier,e.id),children:[`Open`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` the assignment on `,e.item]})]})]})}function ML(e){return e.filter(e=>e.analyze).reverse()}function NL(){let{dossier:e}=J(),t=aj(),n=ML(t?.turns??[]).find(e=>!e.done),r=(t?.history.list??[]).slice(0,3);return(0,q.jsxs)(`section`,{className:`agents-side__analyses`,"aria-labelledby":`recent-analyses`,children:[(0,q.jsx)(`h3`,{id:`recent-analyses`,children:`Recent analyses`}),t?.history.error&&(0,q.jsx)(`p`,{className:`failure`,children:t.history.error}),n&&(0,q.jsx)(`p`,{className:`note analysis-line`,children:`Analyze is answering now.`}),r.length?(0,q.jsx)(`ul`,{className:`plain`,children:r.map(t=>(0,q.jsx)(`li`,{className:`analysis-line`,children:(0,q.jsxs)(`a`,{href:Og(e.name,t.id),children:[(0,q.jsx)(`span`,{className:`note`,children:Y(t.at)}),(0,q.jsx)(`span`,{className:`sr-only`,children:`, `}),` `,(0,q.jsx)(`span`,{children:t.recommendation?PL(t.recommendation):`No recommendation line.`})]})},t.id))}):!n&&(0,q.jsx)(`p`,{className:`note`,children:`None yet.`}),(0,q.jsx)(`a`,{href:Dg(e.name),children:`All analyses`})]})}function PL(e){let t=e.replace(/\[\[([^\]]+)\]\]/g,(e,t)=>t.slice(t.indexOf(`:`)+1)).replace(/\s+/g,` `).trim(),n=/^(.{1,140}?[.!?])(\s|$)/.exec(t)?.[1]??t.slice(0,140);return n.length<t.length&&!/[.!?]$/.test(n)?`${n}…`:n}function FL(){let{dossier:e,now:t,assignments:n}=J(),{list:r,error:i,reload:a}=WP(e.name),o=r?.assignments.filter(OL)??[],s=r?.assignments.filter(e=>!OL(e))??[],c=[`needs-you`,`working`,`stale`,`earlier`].map(e=>({g:e,items:s.filter(t=>kL(t)===e)}));return(0,q.jsxs)(`section`,{className:`agents-sidebar`,"aria-labelledby":`agents`,children:[(0,q.jsx)(`h2`,{id:`agents`,children:`Agents`}),r&&(0,q.jsxs)(`p`,{className:`note`,children:[r.settings.concurrent===1?`One runs at a time`:`${r.settings.concurrent} run at a time`,`, for up to `,r.settings.timeLimitMinutes,` minutes each.`]}),!n&&(0,q.jsx)(`p`,{className:`note`,children:`Assigning work to an agent isn't available here.`}),n?.disabled&&(0,q.jsx)(`p`,{className:`note`,children:n.disabled}),i&&(0,q.jsx)(`p`,{className:`failure`,children:i}),r?.settings.problem&&(0,q.jsx)(`p`,{className:`failure`,children:r.settings.problem}),o.length>0&&(0,q.jsxs)(`section`,{className:`assign-inbox`,"aria-labelledby":`agent-inbox`,children:[(0,q.jsx)(`h3`,{id:`agent-inbox`,children:`Agent inbox`}),(0,q.jsx)(`p`,{className:`note`,children:`The tracker asks for an agent on these. Nothing runs until you press Start.`}),(0,q.jsx)(`ul`,{className:`rows`,children:o.map(e=>(0,q.jsx)(QP,{a:e,onStarted:a},e.id))})]}),r&&!s.length&&(0,q.jsxs)(`p`,{className:`note`,children:[`Nothing assigned yet. `,(0,q.jsx)(`a`,{href:Tg(e.name),children:`Assign from the board`})]}),c.map(({g:e,items:n})=>n.length===0?null:e===`earlier`?(0,q.jsxs)(`details`,{className:`agents-group agents-group--earlier`,children:[(0,q.jsxs)(`summary`,{children:[DL[e],` (`,n.length,`)`]}),(0,q.jsx)(`ul`,{className:`agent-cards`,children:n.map(e=>(0,q.jsx)(jL,{a:e,now:t},e.id))})]},e):(0,q.jsxs)(`section`,{className:`agents-group agents-group--${e}`,"aria-labelledby":`agents-${e}`,children:[(0,q.jsxs)(`h3`,{id:`agents-${e}`,children:[DL[e],` `,(0,q.jsx)(`span`,{className:`count`,children:n.length})]}),(0,q.jsx)(`ul`,{className:`agent-cards`,children:n.map(e=>(0,q.jsx)(jL,{a:e,now:t},e.id))})]},e)),r&&(0,q.jsx)(eF,{list:r,onDone:a}),r&&(0,q.jsx)($P,{list:r,onSaved:a}),(0,q.jsx)(NL,{})]})}var IL=[{id:`overview`,label:`Overview`,href:bg},{id:`board`,label:`Board`,href:e=>Tg(e)},{id:`dependencies`,label:`Dependencies`,href:Eg},{id:`prs`,label:`Pull requests`,href:Sg},{id:`people`,label:`People`,href:Cg},{id:`worklog`,label:`Worklog`,href:e=>kg(e)},{id:`analyses`,label:`Analyses`,href:Dg}],LL=`(min-width: 1200px)`;function RL({tab:e,heading:t,dossiers:n,boardView:r,children:i}){let{dossier:a,config:o,described:s}=J(),{health:c,insights:l}=fg(),u=tC(),d=oE(LL),f=EA(qS()),p=(0,v.useRef)(null),m=(0,v.useRef)(null);BA(p,f.entrance,a.name,{ms:420}),BA(m,f.tabs,`${e??``}:${r??``}`,{onMount:!1,ms:260});let h=(0,v.useMemo)(()=>lg(c?.items??a.items,l).length,[c,a,l]),g=(0,q.jsx)(EL,{field:`name`,dossier:a.name,value:a.name,config:o??null,onSaved:s??(()=>void 0),children:a.name}),_=IL.map(e=>({id:e.id,href:e.href(a.name),label:e.label,...e.id===`board`?{count:{n:h,label:h===1?`item needs attention`:`items need attention`}}:{}}));return(0,q.jsxs)(`div`,{className:`dossier-shell`,"data-wide-sidebar":d||void 0,ref:p,children:[(0,q.jsxs)(`div`,{className:`dossier-bar`,children:[(0,q.jsxs)(`div`,{className:`dossier-bar__id`,children:[(0,q.jsxs)(`div`,{className:`dossier-bar__line`,children:[t?(0,q.jsx)(`h1`,{tabIndex:-1,className:`dossier-bar__name`,children:g}):(0,q.jsx)(`p`,{className:`dossier-bar__name`,children:g}),(0,q.jsx)(BL,{current:a.name,dossiers:n}),c&&(0,q.jsx)(`span`,{className:`sprint-chip`,children:u(`sprint`,`${c.sprint.name}: day ${c.days.gone} of ${c.days.total}`)})]}),(0,q.jsxs)(`div`,{className:`dossier-bar__about`,children:[(0,q.jsx)(`p`,{className:`dossier-bar__desc`,children:(0,q.jsx)(EL,{field:`description`,dossier:a.name,value:a.description,config:o??null,onSaved:s??(()=>void 0),children:a.description?(0,q.jsx)(`span`,{className:`dossier-bar__desc-text`,title:a.description,"data-truncate":``,children:a.description}):(0,q.jsx)(`span`,{className:`note`,children:`No description`})})}),(0,q.jsx)(xL,{sources:a.sources,dossier:a.name})]})]}),(0,q.jsx)(sj,{})]}),(0,q.jsxs)(`div`,{className:`dossier-tabs-row`,children:[(0,q.jsx)(eE,{label:`Dossier views`,className:`dossier-tabs`,children:(0,q.jsx)(`nav`,{"aria-label":`${a.name} views`,children:(0,q.jsx)(`ul`,{children:_.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(`a`,{href:t.href,"aria-current":t.id===e?`page`:void 0,"data-tab":t.id,children:[t.label,t.count&&t.count.n>0&&(0,q.jsxs)(`span`,{className:`tab-count`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,children:t.count.n}),(0,q.jsxs)(`span`,{className:`sr-only`,children:[`, `,t.count.n,` `,t.count.label]})]})]})},t.id))})})}),!d&&(0,q.jsx)(VL,{})]}),e===`board`&&r&&(0,q.jsxs)(`nav`,{className:`board-views`,"aria-label":`Board views`,children:[(0,q.jsx)(`a`,{href:Tg(a.name),"aria-current":r===`board`?`page`:void 0,children:`Board`}),(0,q.jsx)(`a`,{href:wg(a.name),"aria-current":r===`readiness`?`page`:void 0,children:`Readiness (Command Center)`})]}),(0,q.jsx)(zL,{}),(0,q.jsxs)(`div`,{className:`dossier-body`,children:[(0,q.jsx)(`div`,{className:`dossier-main`,ref:m,children:i}),d&&(0,q.jsx)(`aside`,{className:`agents-side`,"aria-labelledby":`agents`,children:(0,q.jsx)(`div`,{className:`agents-side__scroll`,children:(0,q.jsx)(FL,{})})})]})]})}function zL(){let{byId:e,assignments:t}=J(),[n,r]=(0,v.useState)(null);qA(e=>{e.kind===`assign`&&r(e.id)});let i=n?e.get(n):void 0;return!t||!i?null:(0,q.jsx)(YP,{item:i,isOpen:!0,onOpenChange:e=>!e&&r(null)})}function BL({current:e,dossiers:t}){let n=(t??[]).filter(t=>t!==e);return(0,q.jsxs)(Xd,{children:[(0,q.jsxs)(W,{className:`btn btn--small dossier-switch`,"aria-label":`Switch dossier, on ${e}`,"data-dossier-switch":``,children:[`Switch `,(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`▾`})]}),(0,q.jsx)(Xu,{className:`popover`,placement:`bottom start`,children:(0,q.jsxs)(Qd,{className:`menu`,"aria-label":`Dossiers`,children:[(0,q.jsx)(af,{id:`#/`,href:`#/`,className:`menu-item`,children:`All dossiers`}),n.map(e=>(0,q.jsx)(af,{id:e,href:bg(e),className:`menu-item`,children:e},e))]})})]})}function VL(){let[e,t]=(0,v.useState)(!1),n=AL();return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(W,{className:`btn agents-open`,onPress:()=>t(!0),"data-agents-open":``,children:[`Agents`,n.needsYou>0&&(0,q.jsxs)(`span`,{className:`tab-count`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,children:n.needsYou}),(0,q.jsxs)(`span`,{className:`sr-only`,children:[`, `,n.needsYou,` need you`]})]})]}),(0,q.jsx)(Of,{className:`drawer-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:e,onOpenChange:t,children:(0,q.jsx)(Ef,{className:`agents-drawer`,children:(0,q.jsxs)(uf,{className:`agents-drawer__dialog`,"aria-labelledby":`agents`,children:[(0,q.jsx)(`div`,{className:`agents-drawer__head`,children:(0,q.jsx)(W,{className:`btn btn--small agents-close`,onPress:()=>t(!1),"data-agents-close":``,children:`Close`})}),(0,q.jsx)(FL,{})]})})})]})}var HL=4e3,UL=`This style changes phrasing only. The rules above win wherever the two disagree: keep every citation as [[id]] exactly, each proposal as a fenced proposal block with its JSON exactly as rule 3 shows, every figure as the data gives it, saying plainly when the data does not show something, and plain text with no Markdown.`,WL=`These instructions come from the person using Toil UI. Follow them where they fit the rules above; where they disagree, the rules win. They can't give you a tool, and nothing in them lets you change anything.`;function GL(e,t){return[`You are the analyst inside Toil UI, answering a question about the dossier "${e}": one body of work, its tracker items, pull requests, builds and deployments. It is ${t}.`,``,`Rules:`,`1. Use only your tools. owi_query, owi_get, owi_similar and owi_history read the work items Toil UI last synced for "${e}"; owi_similar finds likely duplicates, so run it before proposing a new item. pr_query, pr_get and pr_metrics read its pull requests. people_list and person_get read what is on each person's plate; they describe load, never performance, so never rank or score people. worklog_day reads one UTC day's worklog: what changed that day, by whom and when. The other tools are toil's live read commands for the same dossier; use them only when the cache can't answer. Never rely on anything you remember about these items.`,`2. Cite every work item you mention by its OWI id in double square brackets, such as [[jira:PAY-101]], and every pull request by its change id, such as [[github:imagile/payments-web#52]], exactly as your tools returned it. Never mention an item or pull request your tools did not return: the server checks every id against your tool results and flags any it never saw.`,`3. You cannot change anything, and you have no tool that writes. When the question calls for a change (a re-estimate, a move to another sprint, a split story, a transition), write it as a proposal for a person to apply, in a fenced block like this, one block per change:`,"```proposal",`{"item": "<owi id>", "title": "<one line>", "reason": "<why, citing [[ids]]>", "command": "<the toil write command, such as jira issue update, or null if toil has none>", "input": {"<field>": "<value>"}, "note": "<anything to check first, or null>"}`,"```",` The input is the toil command's MCP input, without the dossier and without allowWrite: call proposal_fields with the command first and use only its fields, or the card shows no command line. Never say a change was made: it is only proposed. Write at most 10 proposals, the ones that matter most: the page shows no more than that.`,`4. Be brief and specific: short paragraphs of plain text (no Markdown, no headings, no bold), figures where you have them. Say plainly when the data does not show something.`]}function KL(e,t,n={voice:null,instructions:null}){let r=GL(e,t),i=n.voice?.trim(),a=n.instructions?.trim();return i&&r.push(``,`Style:`,i,``,UL),a&&r.push(``,`Instructions from the person asking:`,a,``,WL),r.join(`
40
- `)}var qL=new Map([Hm,Rm,Bm,Gm,Um,Wm,zm,Vm].map(e=>[e.name,e]));function JL(e,t){let n=e?qL.get(e.theme):void 0;return{voice:e?.voice===!0&&n?.voice!==void 0?t.voice??n.voice:null,instructions:t.instructions}}var YL=`0.1.0-alpha.1`,XL=e=>e.padEnd(40,`0`),ZL=e=>Date.parse(e),QL=(e,t,n,r)=>({ok:!0,data:t,error:null,meta:{command:e,durationMs:233,version:YL,context:{connection:{value:n,source:`dossier`},inputs:Object.fromEntries(Object.entries(r).map(([e,t])=>[e,{value:t,source:`dossier`}]))}}}),$L=(e,t)=>t?`${e}\n\n${t}`:e,eR=`Co-Authored-By: Claude <you@example.com>`,tR=`https://bitbucket.imagile.dev`,nR=(e,t,n=`NORMAL`)=>({name:e,id:e.length*101,displayName:t,active:!0,slug:e,type:n,...n===`NORMAL`?{emailAddress:`you@example.com`}:{}}),rR={slug:`payments-core`,name:`payments-core`,project:{key:`PAY`,name:`Payments`}},iR=nR(`jsmith`,`J. Smith`),aR=nR(`achen`,`A. Chen`),oR=nR(`svc-renovate`,`Renovate`,`SERVICE`),sR=e=>({id:e.id,version:2,title:e.title,...e.description?{description:e.description}:{},state:e.state,open:e.state===`OPEN`,closed:e.state!==`OPEN`,draft:!1,createdDate:ZL(e.created),updatedDate:ZL(e.updated??e.closed??e.created),...e.closed?{closedDate:ZL(e.closed)}:{},fromRef:{id:`refs/heads/${e.branch}`,displayId:e.branch,latestCommit:XL(e.head),repository:rR},toRef:{id:`refs/heads/master`,displayId:`master`,latestCommit:XL(`f00d000`),repository:rR},locked:!1,author:{user:e.author,role:`AUTHOR`,approved:!1,status:`UNAPPROVED`},reviewers:(e.reviewers??[]).map(e=>({user:e.user,role:`REVIEWER`,approved:e.status===`APPROVED`,status:e.status})),participants:[],properties:{...e.state===`OPEN`?{mergeResult:{outcome:e.outcome??`CLEAN`,current:!0}}:{},...e.merge?{mergeCommit:{displayId:e.merge,id:XL(e.merge)}}:{},commentCount:0},links:{self:[{href:`${tR}/projects/PAY/repos/payments-core/pull-requests/${e.id}`}]}}),cR=e=>({...sR(e),included:{reviews:(e.activities??[]).map((t,n)=>({id:e.id*100+n,createdDate:ZL(t.at),user:t.user,action:t.action})),checks:(e.builds??[]).map((t,n)=>({state:t.state,key:`payments-core-PR-${e.id}`,name:`payments-core » PR-${e.id} #${n+1}`,url:`https://jenkins.imagile.dev/job/payments-core/job/PR-${e.id}/${n+1}/`,dateAdded:ZL(t.at)})),commits:(e.commits??[e.title]).map((t,n)=>({id:XL(`${e.head.slice(0,5)}${n}`),displayId:`${e.head.slice(0,5)}${n}`,message:t,author:{name:e.author.displayName,emailAddress:`you@example.com`},authorTimestamp:ZL(e.created)})),files:Array.from({length:e.files??1},(t,n)=>({contentId:XL(`c${e.id}${n}`),path:{toString:`src/main/java/payments/File${n}.java`},type:`MODIFY`}))}}),lR=[{id:311,title:`PAY-101 Tokenise PANs in the edge proxy`,description:`First slice of Card payments v2 (PAY-100).`,state:`OPEN`,author:iR,branch:`feature/PAY-101-tokenise`,head:`e91a4c2`,created:`2026-10-12T15:30:00.000Z`,updated:`2026-10-12T17:00:00.000Z`,reviewers:[{user:aR,status:`NEEDS_WORK`}],activities:[{user:aR,action:`REVIEWED`,at:`2026-10-12T17:00:00.000Z`}],builds:[{state:`FAILED`,at:`2026-10-12T15:35:00.000Z`},{state:`FAILED`,at:`2026-10-12T16:05:00.000Z`}],files:6},{id:305,title:`PAY-104 Round refund totals half-up`,state:`OPEN`,author:aR,branch:`bugfix/PAY-104-rounding`,head:`3c5d7e1`,created:`2026-10-07T10:15:00.000Z`,reviewers:[{user:iR,status:`UNAPPROVED`}],outcome:`CONFLICTED`,builds:[{state:`SUCCESSFUL`,at:`2026-10-07T10:40:00.000Z`}],files:2},{id:298,title:`PAY-105 Show the last four digits on receipts`,state:`MERGED`,author:iR,branch:`feature/PAY-105-last-four`,head:`8a6b2f0`,created:`2026-10-08T09:00:00.000Z`,closed:`2026-10-09T14:50:00.000Z`,merge:`4e1d2a9`,reviewers:[{user:aR,status:`APPROVED`}],activities:[{user:aR,action:`REVIEWED`,at:`2026-10-08T16:00:00.000Z`},{user:aR,action:`APPROVED`,at:`2026-10-09T11:00:00.000Z`}],builds:[{state:`SUCCESSFUL`,at:`2026-10-09T14:20:00.000Z`}],files:4},{id:296,title:`PAY-106 Register the tokeniser with the gateway`,state:`MERGED`,author:iR,branch:`feature/PAY-106-gateway`,head:`2d9e8b4`,created:`2026-10-06T13:00:00.000Z`,closed:`2026-10-07T11:40:00.000Z`,merge:`7b3c9d2`,reviewers:[{user:aR,status:`APPROVED`}],activities:[{user:aR,action:`APPROVED`,at:`2026-10-07T09:30:00.000Z`}],builds:[{state:`SUCCESSFUL`,at:`2026-10-07T11:10:00.000Z`}],files:3},{id:290,title:`Bump the HTTP client to 5.3`,state:`MERGED`,author:oR,branch:`renovate/http-client-5.x`,head:`0f4e6a3`,created:`2026-09-29T09:00:00.000Z`,closed:`2026-09-30T10:00:00.000Z`,merge:`1a2b3c4`,reviewers:[{user:aR,status:`APPROVED`}],activities:[{user:aR,action:`APPROVED`,at:`2026-09-30T09:15:00.000Z`}],builds:[{state:`SUCCESSFUL`,at:`2026-09-30T09:30:00.000Z`}],files:1}],uR=lR.map(sR),dR=Object.fromEntries(lR.map(e=>[e.id,cR(e)])),fR=`https://ado.imagile.dev/DefaultCollection`,pR=(e,t)=>({displayName:t,uniqueName:`IMAGILE\\${e}`,id:`abc12345-0000-0000-0000-0000000000${e.length}0`,descriptor:`win.${e}`}),mR=pR(`dokafor`,`D. Okafor`),hR=pR(`jpark`,`J. Park`),gR={id:`abc12345-0000-0000-0000-000000000500`,name:`settlement`,url:`${fR}/Payments/_apis/git/repositories/settlement`,webUrl:`${fR}/Payments/_git/settlement`,project:{name:`Payments`}},_R=e=>({repository:gR,pullRequestId:e.id,codeReviewId:e.id,status:e.status,createdBy:mR,creationDate:e.created,...e.closed?{closedDate:e.closed}:{},title:e.title,description:e.description,sourceRefName:`refs/heads/${e.branch}`,targetRefName:`refs/heads/main`,mergeStatus:`succeeded`,isDraft:!1,lastMergeSourceCommit:{commitId:XL(e.head)},...e.merge?{lastMergeCommit:{commitId:XL(e.merge)}}:{},reviewers:[{...hR,vote:e.vote,isRequired:!0,hasDeclined:!1,isFlagged:!1}],url:`${gR.url}/pullRequests/${e.id}`}),vR=e=>({..._R(e),included:{reviews:e.votes.map((t,n)=>({id:e.id*10+n,publishedDate:t.at,lastUpdatedDate:t.at,isDeleted:!1,status:`closed`,comments:[{id:1,author:hR,content:`J. Park voted ${t.value}`,publishedDate:t.at,commentType:`system`}],properties:{CodeReviewThreadType:{$type:`System.String`,$value:`VoteUpdate`},CodeReviewVoteResult:{$type:`System.String`,$value:String(t.value)}}})),checks:e.statuses.map((e,t)=>({id:t+1,state:e.state,description:`settlement-ci ${e.state}`,context:{name:`settlement-ci`,genre:`continuous-integration`},creationDate:e.at,updatedDate:e.at,iterationId:1})),commits:e.commits.map((t,n)=>({commitId:XL(`${e.head.slice(0,5)}${n}`),comment:t,author:{name:mR.displayName,email:`you@example.com`,date:e.created}})),files:Array.from({length:e.files},(t,n)=>({changeTrackingId:n+1,changeId:n+1,item:{objectId:XL(`f${e.id}${n}`),path:`/src/Settlement/File${n}.cs`},changeType:`edit`}))}}),yR=[{id:87,title:`Write the daily settlement CSV`,description:`For #2302. One file per merchant, written at 02:00 UTC.`,status:`active`,branch:`feature/2302-settlement-csv`,head:`87ab3e2`,created:`2026-10-12T09:20:00Z`,vote:-5,votes:[{value:-5,at:`2026-10-12T14:00:00Z`}],statuses:[{state:`pending`,at:`2026-10-13T07:55:00Z`}],commits:[`Write the settlement CSV`],files:5},{id:84,title:`Schedule the settlement export job`,description:`Task #2305.`,status:`completed`,branch:`feature/2305-schedule`,head:`84cd1f9`,created:`2026-10-07T16:00:00Z`,closed:`2026-10-08T12:30:00Z`,merge:`c84e5f0`,vote:10,votes:[{value:10,at:`2026-10-08T10:00:00Z`}],statuses:[{state:`succeeded`,at:`2026-10-08T12:10:00Z`}],commits:[`Schedule the export at 02:00 UTC`],files:2},{id:80,title:`Settlement job skeleton`,description:`The empty job and its pipeline.`,status:`completed`,branch:`feature/skeleton`,head:`80ef2a1`,created:`2026-09-29T10:00:00Z`,closed:`2026-10-01T11:00:00Z`,merge:`b80a1d2`,vote:10,votes:[{value:10,at:`2026-09-30T15:00:00Z`}],statuses:[{state:`succeeded`,at:`2026-10-01T10:30:00Z`}],commits:[$L(`Add the settlement job skeleton`,eR),`Add its pipeline`],files:9}],bR=yR.map(_R),xR=Object.fromEntries(yR.map(e=>[e.id,vR(e)])),SR=`https://ghe.imagile.dev`,CR=`${SR}/api/v3`,wR=(e,t,n=`User`)=>({login:e,id:t,avatar_url:`${SR}/avatars/u/${t}`,type:n}),TR=wR(`ada-dev`,11),ER=wR(`bo-web`,12),DR=wR(`dependabot[bot]`,49699333,`Bot`),OR={full_name:`imagile/payments-web`,name:`payments-web`,owner:{login:`imagile`}},kR=e=>({url:`${CR}/repos/imagile/payments-web/pulls/${e.number}`,id:7e3+e.number,number:e.number,state:e.merged?`closed`:`open`,locked:!1,title:e.title,user:e.user,body:e.body,draft:e.draft??!1,html_url:`${SR}/imagile/payments-web/pull/${e.number}`,created_at:e.created,updated_at:e.updated??e.merged??e.created,closed_at:e.merged??null,merged_at:e.merged??null,merge_commit_sha:XL(e.merge),requested_reviewers:e.requested??[],requested_teams:[],labels:[],head:{label:`imagile:${e.branch}`,ref:e.branch,sha:XL(e.head),repo:OR},base:{label:`imagile:main`,ref:`main`,sha:XL(`0a0a0a0`),repo:OR}}),AR=e=>({...kR(e),merged:!!e.merged,mergeable:e.merged?null:e.mergeable===void 0||e.mergeable,mergeable_state:e.merged?`unknown`:`clean`,comments:0,review_comments:0,commits:e.commits.length,additions:e.files.reduce((e,t)=>e+t.additions,0),deletions:e.files.reduce((e,t)=>e+t.deletions,0),changed_files:e.files.length,included:{reviews:(e.reviews??[]).map((t,n)=>({id:9e4+e.number*10+n,user:t.user,body:``,state:t.state,submitted_at:t.at,commit_id:XL(e.head),author_association:`MEMBER`})),checks:e.checks.map((t,n)=>({id:8e3+e.number*10+n,name:t.name,head_sha:XL(e.head),status:t.conclusion===null?`in_progress`:`completed`,conclusion:t.conclusion,html_url:`${SR}/imagile/payments-web/actions/runs/${8e3+e.number*10+n}/job/${8001+e.number*10+n}`,started_at:t.at,completed_at:t.conclusion===null?null:t.at,app:{slug:`github-actions`,name:`GitHub Actions`}})),commits:e.commits.map((t,n)=>({sha:XL(`${e.head.slice(0,5)}${n}`),commit:{message:t,author:{name:e.user.login,email:`you@example.com`,date:e.created}},author:e.user})),files:e.files.map(e=>({filename:e.path,status:`modified`,additions:e.additions,deletions:e.deletions,changes:e.additions+e.deletions}))}}),jR=[{number:53,title:`Keep focus in the card form on Safari`,body:`Fixes #43.`,user:ER,branch:`fix/43-safari-focus`,draft:!0,head:`53d0e12`,created:`2026-10-12T13:00:00Z`,updated:`2026-10-12T13:25:00Z`,merge:`53f9a00`,checks:[{name:`test`,conclusion:`success`,at:`2026-10-12T13:15:00Z`},{name:`e2e-safari`,conclusion:`failure`,at:`2026-10-12T13:25:00Z`}],commits:[`Keep focus in the expiry field`],files:[{path:`src/checkout/card-form.tsx`,additions:18,deletions:6}]},{number:52,title:`Saved-card picker`,body:`Closes #42. Part of #41.`,user:ER,branch:`feature/saved-cards`,head:`52c4b88`,created:`2026-10-11T10:00:00Z`,updated:`2026-10-11T10:28:00Z`,merge:`52e7d00`,requested:[TR],checks:[{name:`test`,conclusion:`success`,at:`2026-10-11T10:20:00Z`},{name:`e2e-safari`,conclusion:`success`,at:`2026-10-11T10:28:00Z`}],commits:[`Add the saved-card picker`,`Show the expiry beside each card`],files:[{path:`src/checkout/saved-cards.tsx`,additions:210,deletions:4},{path:`src/checkout/saved-cards.test.tsx`,additions:96,deletions:0},{path:`src/checkout/card-form.tsx`,additions:12,deletions:3}]},{number:51,title:`Retry the address lookup once`,body:`The lookup service times out under load; retry once after 300 ms.`,user:TR,branch:`claude/address-retry`,head:`51a7f30`,created:`2026-10-08T09:00:00Z`,updated:`2026-10-09T08:10:00Z`,merge:`51b0c00`,checks:[{name:`test`,conclusion:`failure`,at:`2026-10-09T08:10:00Z`}],commits:[$L(`Retry the address lookup once`,eR)],files:[{path:`src/address/lookup.ts`,additions:31,deletions:5},{path:`src/address/lookup.test.ts`,additions:40,deletions:0}]},{number:50,title:`Use the order currency on receipts`,body:`Closes #44.`,user:TR,branch:`fix/44-receipt-currency`,head:`50b1c77`,created:`2026-10-12T14:30:00Z`,merged:`2026-10-12T15:55:00Z`,merge:`5a7e3f1`,reviews:[{user:ER,state:`APPROVED`,at:`2026-10-12T15:20:00Z`}],checks:[{name:`test`,conclusion:`success`,at:`2026-10-12T15:40:00Z`}],commits:[`Format receipts in the order currency`],files:[{path:`src/receipt/total.tsx`,additions:9,deletions:4}]},{number:49,title:`Bump vite from 7.1.2 to 7.1.5`,body:`Bumps vite from 7.1.2 to 7.1.5.`,user:DR,branch:`dependabot/npm_and_yarn/vite-7.1.5`,head:`49c2d11`,created:`2026-10-03T06:00:00Z`,merged:`2026-10-05T09:30:00Z`,merge:`49e0a00`,reviews:[{user:TR,state:`APPROVED`,at:`2026-10-05T09:10:00Z`}],checks:[{name:`test`,conclusion:`success`,at:`2026-10-03T06:20:00Z`}],commits:[`Bump vite from 7.1.2 to 7.1.5`],files:[{path:`package.json`,additions:1,deletions:1},{path:`package-lock.json`,additions:12,deletions:12}]},{number:48,title:`Order summary panel`,body:`From the checkout refresh designs.`,user:TR,branch:`feature/order-summary`,head:`48a9e66`,created:`2026-10-01T09:00:00Z`,merged:`2026-10-02T10:00:00Z`,merge:`1c9b8e4`,reviews:[{user:ER,state:`CHANGES_REQUESTED`,at:`2026-10-01T14:00:00Z`},{user:ER,state:`APPROVED`,at:`2026-10-02T09:00:00Z`}],checks:[{name:`test`,conclusion:`success`,at:`2026-10-01T09:20:00Z`}],commits:[`Add the order summary panel`,`Round the subtotal as the designs show`],files:[{path:`src/checkout/summary.tsx`,additions:140,deletions:2},{path:`src/checkout/card-form.tsx`,additions:6,deletions:1}]}],MR=jR.map(kR),NR=Object.fromEntries(jR.map(e=>[e.number,AR(e)]));btoa(`# Who reviews what
39
+ `},SM={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function CM(e){let{announcements:t=SM,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=xM}=e,{announce:a,announcement:o}=_M(),s=rM(`DndLiveRegion`),[c,l]=(0,v.useState)(!1);if((0,v.useEffect)(()=>{l(!0)},[]),yM((0,v.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=v.createElement(v.Fragment,null,v.createElement(hM,{id:r,value:i.draggable}),v.createElement(gM,{id:s,announcement:o}));return n?(0,si.createPortal)(u,n):u}var wM;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(wM||={});function TM(){}function EM(e,t){return(0,v.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function DM(){var e=[...arguments];return(0,v.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var OM=Object.freeze({x:0,y:0});function kM(e,t){let n=uM(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function AM(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function jM(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function MM(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var NM=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=MM(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(AM)};function PM(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function FM(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:OM}function IM(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var LM=IM(1);function RM(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function zM(e,t,n){let r=RM(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var BM={ignoreTransform:!1};function VM(e,t){t===void 0&&(t=BM);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Wj(e).getComputedStyle(e);t&&(n=zM(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function HM(e){return VM(e,{ignoreTransform:!0})}function UM(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function WM(e,t){return t===void 0&&(t=Wj(e).getComputedStyle(e)),t.position===`fixed`}function GM(e,t){t===void 0&&(t=Wj(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function KM(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Gj(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Kj(i)||qj(i)||n.includes(i))return n;let a=Wj(e).getComputedStyle(i);return i!==e&&GM(i,a)&&n.push(i),WM(i,a)?n:r(i.parentNode)}return e?r(e):n}function qM(e){let[t]=KM(e,1);return t??null}function JM(e){return!Vj||!e?null:Hj(e)?e:Uj(e)?Gj(e)||e===Jj(e).scrollingElement?window:Kj(e)?e:null:null}function YM(e){return Hj(e)?e.scrollX:e.scrollLeft}function XM(e){return Hj(e)?e.scrollY:e.scrollTop}function ZM(e){return{x:YM(e),y:XM(e)}}var QM;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(QM||={});function $M(e){return!Vj||!e?!1:e===document.scrollingElement}function eN(e){let t={x:0,y:0},n=$M(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var tN={x:.2,y:.2};function nN(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=tN);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=eN(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=QM.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=QM.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=QM.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=QM.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function rN(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function iN(e){return e.reduce((e,t)=>aM(e,ZM(t)),OM)}function aN(e){return e.reduce((e,t)=>e+YM(t),0)}function oN(e){return e.reduce((e,t)=>e+XM(t),0)}function sN(e,t){if(t===void 0&&(t=VM),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);qM(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var cN=[[`x`,[`left`,`right`],aN],[`y`,[`top`,`bottom`],oN]],lN=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=KM(t),r=iN(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of cN)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},uN=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function dN(e){let{EventTarget:t}=Wj(e);return e instanceof t?e:Jj(e)}function fN(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var pN;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(pN||={});function mN(e){e.preventDefault()}function hN(e){e.stopPropagation()}var gN;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(gN||={});var _N={start:[gN.Space,gN.Enter],cancel:[gN.Esc],end:[gN.Space,gN.Enter,gN.Tab]},vN=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case gN.Right:return{...n,x:n.x+25};case gN.Left:return{...n,x:n.x-25};case gN.Down:return{...n,y:n.y+25};case gN.Up:return{...n,y:n.y-25}}},yN=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new uN(Jj(t)),this.windowListeners=new uN(Wj(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pN.Resize,this.handleCancel),this.windowListeners.add(pN.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(pN.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&sN(n),t(OM)}handleKeyDown(e){if(cM(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=_N,coordinateGetter:a=vN,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:OM;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=oM(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=eN(n),p=rN(n),m={x:Math.min(i===gN.Right?p.right-p.width/2:p.right,Math.max(i===gN.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===gN.Down?p.bottom-p.height/2:p.bottom,Math.max(i===gN.Down?p.top:p.top+p.height/2,u.y))},h=i===gN.Right&&!s||i===gN.Left&&!c,g=i===gN.Down&&!l||i===gN.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===gN.Right&&e<=d.x||i===gN.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===gN.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===gN.Down&&e<=d.y||i===gN.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===gN.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,aM(oM(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};yN.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=_N,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function bN(e){return!!(e&&`distance`in e)}function xN(e){return!!(e&&`delay`in e)}var SN=class{constructor(e,t,n){n===void 0&&(n=dN(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Jj(i),this.documentListeners=new uN(this.document),this.listeners=new uN(n),this.windowListeners=new uN(Wj(i)),this.initialCoordinates=uM(r)??OM,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(pN.Resize,this.handleCancel),this.windowListeners.add(pN.DragStart,mN),this.windowListeners.add(pN.VisibilityChange,this.handleCancel),this.windowListeners.add(pN.ContextMenu,mN),this.documentListeners.add(pN.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(xN(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(bN(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(pN.Click,hN,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pN.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=uM(e)??OM,s=oM(n,o);if(!t&&a){if(bN(a)){if(a.tolerance!=null&&fN(s,a.tolerance))return this.handleCancel();if(fN(s,a.distance))return this.handleStart()}if(xN(a)&&fN(s,a.tolerance))return this.handleCancel();this.handlePending(a,s)}else e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===gN.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},CN={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},wN=class extends SN{constructor(e){let{event:t}=e,n=Jj(t.target);super(e,CN,n)}};wN.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var TN={move:{name:`mousemove`},end:{name:`mouseup`}},EN;(function(e){e[e.RightClick=2]=`RightClick`})(EN||={});var DN=class extends SN{constructor(e){super(e,TN,Jj(e.event.target))}};DN.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==EN.RightClick&&(r?.({event:n}),!0)}}];var ON={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},kN=class extends SN{constructor(e){super(e,ON)}static setup(){return window.addEventListener(ON.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ON.move.name,e)};function e(){}}};kN.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var AN;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(AN||={});var jN;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(jN||={});function MN(e){let{acceleration:t,activator:n=AN.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=jN.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=PN({delta:d,disabled:!a}),[m,h]=Zj(),g=(0,v.useRef)({x:0,y:0}),_=(0,v.useRef)({x:0,y:0}),y=(0,v.useMemo)(()=>{switch(n){case AN.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case AN.DraggableRect:return i}},[n,i,c]),b=(0,v.useRef)(null),x=(0,v.useCallback)(()=>{let e=b.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),S=(0,v.useMemo)(()=>s===jN.TreeOrder?[...l].reverse():l,[s,l]);(0,v.useEffect)(()=>{if(!a||!l.length||!y)h();else{for(let e of S){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=nN(e,i,y,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),b.current=e,m(x,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()}},[t,x,r,h,a,o,JSON.stringify(y),JSON.stringify(p),m,l,S,u,JSON.stringify(f)])}var NN={x:{[QM.Backward]:!1,[QM.Forward]:!1},y:{[QM.Backward]:!1,[QM.Forward]:!1}};function PN(e){let{delta:t,disabled:n}=e,r=tM(t);return $j(e=>{if(n||!r||!e)return NN;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[QM.Backward]:e.x[QM.Backward]||i.x===-1,[QM.Forward]:e.x[QM.Forward]||i.x===1},y:{[QM.Backward]:e.y[QM.Backward]||i.y===-1,[QM.Forward]:e.y[QM.Forward]||i.y===1}}},[n,t,r])}function FN(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return $j(e=>t==null?null:r??e??null,[r,t])}function IN(e,t){return(0,v.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var LN;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(LN||={});var RN;(function(e){e.Optimized=`optimized`})(RN||={});var zN=new Map;function BN(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,v.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,v.useRef)(e),d=g(),f=Qj(d),p=(0,v.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,v.useRef)(null),h=$j(t=>{if(d&&!n)return zN;if(!t||t===zN||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new lN(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,v.useEffect)(()=>{u.current=e},[e]),(0,v.useEffect)(()=>{d||p()},[n,d]),(0,v.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,v.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case LN.Always:return!1;case LN.BeforeDragging:return n;default:return!n}}}function VN(e,t){return $j(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function HN(e,t){return VN(e,t)}function UN(e){let{callback:t,disabled:n}=e,r=Xj(t),i=(0,v.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,v.useEffect)(()=>()=>i?.disconnect(),[i]),i}function WN(e){let{callback:t,disabled:n}=e,r=Xj(t),i=(0,v.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,v.useEffect)(()=>()=>i?.disconnect(),[i]),i}function GN(e){return new lN(VM(e),e)}function KN(e,t,n){t===void 0&&(t=GN);let[r,i]=(0,v.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=UN({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=WN({callback:a});return Yj(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function qN(e){return FM(e,VN(e))}var JN=[];function YN(e){let t=(0,v.useRef)(e),n=$j(n=>e?n&&n!==JN&&e&&t.current&&e.parentNode===t.current.parentNode?n:KM(e):JN,[e]);return(0,v.useEffect)(()=>{t.current=e},[e]),n}function XN(e){let[t,n]=(0,v.useState)(null),r=(0,v.useRef)(e),i=(0,v.useCallback)(e=>{let t=JM(e.target);t&&n(e=>e?(e.set(t,ZM(t)),new Map(e)):null)},[]);return(0,v.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=JM(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,ZM(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{JM(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,v.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>aM(e,t),OM):iN(e):OM,[e,t])}function ZN(e,t){t===void 0&&(t=[]);let n=(0,v.useRef)(null);return(0,v.useEffect)(()=>{n.current=null},t),(0,v.useEffect)(()=>{let t=e!==OM;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?oM(e,n.current):OM}function QN(e){(0,v.useEffect)(()=>{if(!Vj)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function $N(e,t){return(0,v.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function eP(e){return(0,v.useMemo)(()=>e?UM(e):null,[e])}var tP=[];function nP(e,t){t===void 0&&(t=VM);let[n]=e,r=eP(n?Wj(n):null),[i,a]=(0,v.useState)(tP);function o(){a(()=>e.length?e.map(e=>$M(e)?r:new lN(t(e),e)):tP)}let s=WN({callback:o});return Yj(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function rP(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Kj(t)?t:e}function iP(e){let{measure:t}=e,[n,r]=(0,v.useState)(null),i=WN({callback:(0,v.useCallback)(e=>{for(let{target:n}of e)if(Kj(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=eM((0,v.useCallback)(e=>{let n=rP(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,v.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var aP=[{sensor:wN,options:{}},{sensor:yN,options:{}}],oP={current:{}},sP={draggable:{measure:HM},droppable:{measure:HM,strategy:LN.WhileDragging,frequency:RN.Optimized},dragOverlay:{measure:VM}},cP=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},lP={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new cP,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:TM},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:sP,measureDroppableContainers:TM,windowRect:null,measuringScheduled:!1},uP={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:TM,draggableNodes:new Map,over:null,measureDroppableContainers:TM},dP=(0,v.createContext)(uP),fP=(0,v.createContext)(lP);function pP(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new cP}}}function mP(e,t){switch(t.type){case wM.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case wM.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case wM.DragEnd:case wM.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case wM.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new cP(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case wM.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new cP(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case wM.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new cP(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function hP(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,v.useContext)(dP),a=tM(r),o=tM(n?.id);return(0,v.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!cM(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=pM(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function gP(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function _P(e){return(0,v.useMemo)(()=>({draggable:{...sP.draggable,...e?.draggable},droppable:{...sP.droppable,...e?.droppable},dragOverlay:{...sP.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function vP(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,v.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;Yj(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=FM(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=qM(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var yP=(0,v.createContext)({...OM,scaleX:1,scaleY:1}),bP;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})(bP||={});var xP=(0,v.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=aP,collisionDetection:o=NM,measuring:s,modifiers:c,...l}=e,[u,d]=(0,v.useReducer)(mP,void 0,pP),[f,p]=bM(),[m,h]=(0,v.useState)(bP.Uninitialized),g=m===bP.Initialized,{draggable:{active:_,nodes:y,translate:b},droppable:{containers:x}}=u,S=_==null?null:y.get(_),C=(0,v.useRef)({initial:null,translated:null}),w=(0,v.useMemo)(()=>_==null?null:{id:_,data:S?.data??oP,rect:C},[_,S]),T=(0,v.useRef)(null),[E,D]=(0,v.useState)(null),[O,k]=(0,v.useState)(null),A=Qj(l,Object.values(l)),j=rM(`DndDescribedBy`,t),M=(0,v.useMemo)(()=>x.getEnabled(),[x]),ee=_P(s),{droppableRects:te,measureDroppableContainers:ne,measuringScheduled:re}=BN(M,{dragging:g,dependencies:[b.x,b.y],config:ee.droppable}),N=FN(y,_),ie=(0,v.useMemo)(()=>O?uM(O):null,[O]),ae=H(),oe=HN(N,ee.draggable.measure);vP({activeNode:_==null?null:y.get(_),config:ae.layoutShiftCompensation,initialRect:oe,measure:ee.draggable.measure});let se=KN(N,ee.draggable.measure,oe),P=KN(N?N.parentElement:null),ce=(0,v.useRef)({activatorEvent:null,active:null,activeNode:N,collisionRect:null,collisions:null,droppableRects:te,draggableNodes:y,draggingNode:null,draggingNodeRect:null,droppableContainers:x,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),F=x.getNodeFor(ce.current.over?.id),le=iP({measure:ee.dragOverlay.measure}),ue=le.nodeRef.current??N,de=g?le.rect??se:null,fe=!!(le.nodeRef.current&&le.rect),pe=qN(fe?null:se),me=eP(ue?Wj(ue):null),I=YN(g?F??N:null),L=nP(I),he=gP(c,{transform:{x:b.x-pe.x,y:b.y-pe.y,scaleX:1,scaleY:1},activatorEvent:O,active:w,activeNodeRect:se,containerNodeRect:P,draggingNodeRect:de,over:ce.current.over,overlayNodeRect:le.rect,scrollableAncestors:I,scrollableAncestorRects:L,windowRect:me}),ge=ie?aM(ie,b):null,R=XN(I),_e=ZN(R),ve=ZN(R,[se]),z=aM(he,_e),ye=de?LM(de,he):null,be=w&&ye?o({active:w,collisionRect:ye,droppableRects:te,droppableContainers:M,pointerCoordinates:ge}):null,xe=jM(be,`id`),[Se,Ce]=(0,v.useState)(null),we=PM(fe?he:aM(he,ve),Se?.rect??null,se),Te=(0,v.useRef)(null),Ee=(0,v.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(T.current==null)return;let i=y.get(T.current);if(!i)return;let a=e.nativeEvent,o=new n({active:T.current,activeNode:i,event:a,options:r,context:ce,onAbort(e){if(!y.get(e))return;let{onDragAbort:t}=A.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!y.get(e))return;let{onDragPending:i}=A.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=T.current;if(t==null)return;let n=y.get(t);if(!n)return;let{onDragStart:r}=A.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:C}};(0,si.unstable_batchedUpdates)(()=>{r?.(i),h(bP.Initializing),d({type:wM.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),D(Te.current),k(a)})},onMove(e){d({type:wM.DragMove,coordinates:e})},onEnd:s(wM.DragEnd),onCancel:s(wM.DragCancel)});Te.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ce.current,o=null;if(t&&i){let{cancelDrop:s}=A.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===wM.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=wM.DragCancel)}T.current=null,(0,si.unstable_batchedUpdates)(()=>{d({type:e}),h(bP.Uninitialized),Ce(null),D(null),k(null),Te.current=null;let t=e===wM.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=A.current[t];e?.(o),f({type:t,event:o})}})}}},[y]),De=IN(a,(0,v.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=y.get(r);if(T.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},T.current=r,Ee(n,t))},[y,Ee]));QN(a),Yj(()=>{se&&m===bP.Initializing&&h(bP.Initialized)},[se,m]),(0,v.useEffect)(()=>{let{onDragMove:e}=A.current,{active:t,activatorEvent:n,collisions:r,over:i}=ce.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:z.x,y:z.y},over:i};(0,si.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[z.x,z.y]),(0,v.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ce.current;if(!e||T.current==null||!t||!i)return;let{onDragOver:a}=A.current,o=r.get(xe),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,si.unstable_batchedUpdates)(()=>{Ce(s),a?.(c),f({type:`onDragOver`,event:c})})},[xe]),Yj(()=>{ce.current={activatorEvent:O,active:w,activeNode:N,collisionRect:ye,collisions:be,droppableRects:te,draggableNodes:y,draggingNode:ue,draggingNodeRect:de,droppableContainers:x,over:Se,scrollableAncestors:I,scrollAdjustedTranslate:z},C.current={initial:de,translated:ye}},[w,N,be,ye,y,ue,de,te,x,Se,I,z]),MN({...ae,delta:b,draggingRect:ye,pointerCoordinates:ge,scrollableAncestors:I,scrollableAncestorRects:L});let B=(0,v.useMemo)(()=>({active:w,activeNode:N,activeNodeRect:se,activatorEvent:O,collisions:be,containerNodeRect:P,dragOverlay:le,draggableNodes:y,droppableContainers:x,droppableRects:te,over:Se,measureDroppableContainers:ne,scrollableAncestors:I,scrollableAncestorRects:L,measuringConfiguration:ee,measuringScheduled:re,windowRect:me}),[w,N,se,O,be,P,le,y,x,te,Se,ne,I,L,ee,re,me]),V=(0,v.useMemo)(()=>({activatorEvent:O,activators:De,active:w,activeNodeRect:se,ariaDescribedById:{draggable:j},dispatch:d,draggableNodes:y,over:Se,measureDroppableContainers:ne}),[O,De,w,se,d,j,y,Se,ne]);return v.createElement(vM.Provider,{value:p},v.createElement(dP.Provider,{value:V},v.createElement(fP.Provider,{value:B},v.createElement(yP.Provider,{value:we},i)),v.createElement(hP,{disabled:n?.restoreFocus===!1})),v.createElement(CM,{...n,hiddenTextDescribedById:j}));function H(){let e=E?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),SP=(0,v.createContext)(null),CP=`button`,wP=`Draggable`;function TP(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=rM(wP),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,v.useContext)(dP),{role:p=CP,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,v.useContext)(g?yP:SP),[y,b]=eM(),[x,S]=eM(),C=$N(o,t),w=Qj(n);return Yj(()=>(d.set(t,{id:t,key:a,node:y,activatorNode:x,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,v.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===CP?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:C,node:y,over:f,setNodeRef:b,setActivatorNodeRef:S,transform:_}}function EP(){return(0,v.useContext)(fP)}var DP=`Droppable`,OP={timeout:25};function kP(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=rM(DP),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,v.useContext)(dP),u=(0,v.useRef)({disabled:n}),d=(0,v.useRef)(!1),f=(0,v.useRef)(null),p=(0,v.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...OP,...i},_=Qj(h??r),y=WN({callback:(0,v.useCallback)(()=>{d.current?(p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)):d.current=!0},[g]),disabled:m||!o}),[b,x]=eM((0,v.useCallback)((e,t)=>{y&&(t&&(y.unobserve(t),d.current=!1),e&&y.observe(e))},[y])),S=Qj(t);return(0,v.useEffect)(()=>{y&&b.current&&(y.disconnect(),d.current=!1,y.observe(b.current))},[b,y]),(0,v.useEffect)(()=>(s({type:wM.RegisterDroppable,element:{id:r,key:a,disabled:n,node:b,rect:f,data:S}}),()=>s({type:wM.UnregisterDroppable,key:a,id:r})),[r]),(0,v.useEffect)(()=>{n!==u.current.disabled&&(s({type:wM.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:b,over:c,setNodeRef:x}}function AP(e){let{animation:t,children:n}=e,[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),s=tM(n);return!n&&!r&&s&&i(s),Yj(()=>{if(!a)return;let e=r?.key,n=r?.props.id;e==null||n==null?i(null):Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),v.createElement(v.Fragment,null,n,r?(0,v.cloneElement)(r,{ref:o}):null)}var jP={x:0,y:0,scaleX:1,scaleY:1};function MP(e){let{children:t}=e;return v.createElement(dP.Provider,{value:uP},v.createElement(yP.Provider,{value:jP},t))}var NP={position:`fixed`,touchAction:`none`},PP=e=>cM(e)?`transform 250ms ease`:void 0,FP=(0,v.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=PP}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...NP,width:s.width,height:s.height,top:s.top,left:s.left,transform:dM.Transform.toString(d),transformOrigin:i&&r?kM(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return v.createElement(n,{className:o,style:f,ref:t},a)}),IP={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:dM.Transform.toString(t)},{transform:dM.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function LP(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return Xj((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=rP(a);if(!c)return;let{transform:l}=Wj(a).getComputedStyle(a),u=RM(l);if(!u)return;let d=typeof t==`function`?t:RP(t);return sN(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function RP(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...IP,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var zP=0;function BP(e){return(0,v.useMemo)(()=>{if(e!=null)return zP++,zP},[e])}var VP=v.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:y,scrollableAncestors:b,scrollableAncestorRects:x,windowRect:S}=EP(),C=(0,v.useContext)(yP),w=BP(d?.id),T=gP(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:b,scrollableAncestorRects:x,transform:C,windowRect:S}),E=VN(f),D=LP({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:y}),O=E?g.setRef:void 0;return v.createElement(MP,null,v.createElement(AP,{animation:D},d&&w?v.createElement(FP,{key:w,id:d.id,ref:O,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:E,style:{zIndex:l,...i},transform:T},n):null))}),HP=(e,t)=>`${bg(e)}/assignment/${encodeURIComponent(t)}`,UP=e=>e.state===`working`||e.state===`queued`&&e.waiting===`slot`,WP=2e3;function GP(e){let{assignments:t}=J(),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(0),c=(0,v.useCallback)(()=>s(e=>e+1),[]);(0,v.useEffect)(()=>{if(!t||t.disabled)return;let n=!0;return t.list(e).then(e=>{n&&(r(e),a(null))},e=>n&&a(e instanceof Error?e.message:String(e))),()=>{n=!1}},[t,e,o]);let l=n?.assignments.some(UP)??!1;return(0,v.useEffect)(()=>{if(!l)return;let e=setInterval(c,WP);return()=>clearInterval(e)},[l,c]),{list:n,error:i,reload:c}}function KP({a:e}){let t=e.state===`queued`&&e.waiting===`start`?`Queued, waiting for Start`:kD[e.state];return(0,q.jsx)(`span`,{className:`assign-state assign-state--${e.state}`,children:t})}function qP(e){if(!e.usage)return`usage not reported yet`;if(!e.usage.records.length)return`${YE[e.usage.adapter]} reported no usage`;let t=uD(nD(e.usage.records),e.usage.adapter).slice(0,2);return`${e.usage.sample?`sample figures: `:``}${t.join(`, `)}`}function JP({a:e,now:t}){let n=e.proposals.filter(e=>e.status===`pending`).length;return(0,q.jsx)(Q,{className:`assign-card`,children:(0,q.jsxs)(ZT,{gap:`xs`,children:[(0,q.jsxs)(QT,{className:`assign-card__top`,children:[(0,q.jsx)(KP,{a:e}),(0,q.jsx)(`span`,{className:`assign-mode`,children:OD[e.mode].label})]}),(0,q.jsxs)(`p`,{className:`assign-card__item`,children:[(0,q.jsx)(UT,{id:e.item}),` `,(0,q.jsx)(`span`,{className:`assign-card__title`,children:e.itemTitle})]}),(0,q.jsxs)(`p`,{className:`note`,children:[e.adapter?DD[e.adapter]:`No adapter chosen yet`,` · `,jD(e.ranMs??AD(e,t)),` · `,qP(e)]}),e.state===`needs-you`&&(0,q.jsx)(`p`,{className:`assign-needs`,children:[n?`${n} ${n===1?`proposal`:`proposals`} to review`:``,e.questions.length?`${e.questions.length} ${e.questions.length===1?`question`:`questions`}`:``,e.stop?.reason===`injection`?`stopped on a possible injection`:``].filter(Boolean).join(`, `)}),e.stop&&e.state===`failed`&&(0,q.jsx)(`p`,{className:`assign-stop`,children:e.stop.message}),e.stale&&(0,q.jsx)(CD,{stale:e.stale}),e.renewedBy&&(0,q.jsxs)(`p`,{className:`note`,children:[`Renewed as `,(0,q.jsx)(`a`,{href:HP(e.dossier,e.renewedBy),children:`a fresh assignment`}),`.`]}),(0,q.jsx)(`p`,{children:(0,q.jsxs)(`a`,{href:HP(e.dossier,e.id),children:[`Open the assignment`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` on `,e.item]})]})})]})})}function YP({item:e,list:t,start:n,close:r,onDone:i}){let{assignments:a,dossier:o}=J(),s=t.adapters.filter(e=>!e.problem),[c,l]=(0,v.useState)(n?.adapter??s.find(e=>e.name===t.preferred)?.name??s[0]?.name??null),[u,d]=(0,v.useState)(n?.mode??`refine`),[f,p]=(0,v.useState)(t.repos[0]?.name??null),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(null),y=t.adapters.find(e=>e.name===c),b=u===`implement`?y?.implement??(t.repos.length?null:`${o.name} lists no repository with a local path, so implement mode has nothing to clone. Add one with toil dossiers add-repo ${o.name} <folder>.`):null,x=a&&!a.disabled&&c!==null&&!y?.problem&&!b&&!m&&(u!==`implement`||f!==null);return(0,q.jsxs)(`form`,{className:`assign-form`,onSubmit:async t=>{if(t.preventDefault(),x&&a&&c){h(!0),_(null);try{i(n?await a.start(n.id,c):await a.assign({dossier:o.name,item:e.id,mode:u,adapter:c,...u===`implement`&&f?{repo:f}:{}})),r()}catch(e){_(e instanceof Error?e.message:String(e))}finally{h(!1)}}},noValidate:!0,children:[(0,q.jsx)(ja,{slot:`title`,level:2,id:`assign-title`,children:n?`Start the assignment`:`Assign to an agent`}),(0,q.jsxs)(`p`,{className:`note`,children:[(0,q.jsx)(UT,{id:e.id}),` `,e.title]}),(0,q.jsxs)(Bf,{className:`agent-adapters`,value:c??``,onChange:e=>l(e),children:[(0,q.jsx)(va,{children:`Adapter`}),t.adapters.map(e=>(0,q.jsxs)(Vf,{value:e.name,className:`agent-choice`,isDisabled:e.problem!==null,children:[(0,q.jsx)(`strong`,{children:e.label}),(0,q.jsx)(`span`,{className:e.problem?`agent-missing`:`note`,children:e.problem??(e.implement?`Refine and investigate.`:`Refine, investigate and implement.`)})]},e.name))]}),n?(0,q.jsxs)(`p`,{children:[`Mode: `,(0,q.jsx)(`strong`,{children:OD[n.mode].label}),`, as the tracker asked (`,n.trigger,`). `,OD[n.mode].does]}):(0,q.jsxs)(Bf,{className:`agent-adapters`,value:u,onChange:e=>d(e),children:[(0,q.jsxs)(`div`,{className:`edit-head`,children:[(0,q.jsx)(va,{className:`agent-label`,children:`Mode`}),(0,q.jsx)(Iw,{topic:`assignments`})]}),ED.map(e=>(0,q.jsxs)(Vf,{value:e,className:`agent-choice`,children:[(0,q.jsx)(`strong`,{children:OD[e].label}),(0,q.jsxs)(`span`,{className:`note`,children:[OD[e].does,` `,OD[e].changes]})]},e))]}),u===`implement`&&t.repos.length>0&&(0,q.jsxs)(Bf,{className:`agent-adapters`,value:f??``,onChange:p,children:[(0,q.jsx)(va,{children:`Repository to clone`}),t.repos.map(e=>(0,q.jsxs)(Vf,{value:e.name,className:`agent-choice`,children:[(0,q.jsx)(`strong`,{children:e.name}),(0,q.jsx)(`span`,{className:`note any-break`,children:e.path})]},e.name))]}),b&&(0,q.jsx)(`p`,{className:`failure`,children:b}),(0,q.jsxs)(`p`,{className:`note`,children:[`It runs on your adapter's own subscription, `,t.settings.concurrent===1?`one assignment at a time`:`${t.settings.concurrent} assignments at a time`,`, for up to `,t.settings.timeLimitMinutes,` minutes, within your usage caps. Nothing it proposes leaves this machine until you apply it, and applying runs toil's own command through its write gate.`]}),t.settings.problem&&(0,q.jsx)(`p`,{className:`failure`,children:t.settings.problem}),a?.disabled&&(0,q.jsx)(`p`,{className:`failure`,children:a.disabled}),g&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:g}),(0,q.jsxs)(`div`,{className:`assign-actions`,children:[(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,isDisabled:!x,children:m?`Assigning…`:n?`Start`:`Assign`}),(0,q.jsx)(W,{className:`btn`,onPress:r,children:`Cancel`})]})]})}function XP({item:e,start:t,isOpen:n,onOpenChange:r,onDone:i}){let a=n===void 0?{}:{isOpen:n,...r?{onOpenChange:r}:{}},o=i??(e=>void(window.location.hash=HP(e.dossier,e.id)));return(0,q.jsx)(Of,{className:`feedback-overlay`,"data-backdrop":``,isDismissable:!0,...a,children:(0,q.jsx)(Ef,{className:`feedback-modal`,children:(0,q.jsx)(uf,{className:`feedback-dialog`,"aria-labelledby":`assign-title`,children:({close:n})=>(0,q.jsx)(ZP,{item:e,...t?{start:t}:{},close:n,onDone:o})})})})}function ZP({item:e,start:t,close:n,onDone:r}){let{assignments:i,dossier:a}=J(),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null);return(0,v.useEffect)(()=>{if(!i)return void l(`This view has no agent assignments.`);if(i.disabled)return void l(i.disabled);let e=!0;return i.list(a.name).then(t=>e&&s(t),t=>e&&l(t instanceof Error?t.message:String(t))),()=>{e=!1}},[i,a.name]),o?(0,q.jsx)(YP,{item:e,list:o,...t?{start:t}:{},close:n,onDone:r}):(0,q.jsxs)(`div`,{className:`assign-form`,children:[(0,q.jsx)(ja,{slot:`title`,level:2,id:`assign-title`,children:`Assign to an agent`}),(0,q.jsx)(`p`,{className:c?`failure`:`note`,children:c??`Reading the adapters on this machine…`}),(0,q.jsx)(`div`,{className:`assign-actions`,children:(0,q.jsx)(W,{className:`btn`,onPress:n,children:`Close`})})]})}function QP({item:e}){let{assignments:t}=J();return t?(0,q.jsxs)(lf,{children:[(0,q.jsxs)(W,{className:`btn`,"data-assign-open":``,children:[`Assign to agent`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,e.id]})]}),(0,q.jsx)(XP,{item:e})]}):null}function $P({a:e,onStarted:t}){let[n,r]=(0,v.useState)(!1);return(0,q.jsxs)(`li`,{className:`assign-inbox__row`,children:[(0,q.jsxs)(QT,{children:[(0,q.jsxs)(`span`,{children:[(0,q.jsx)(UT,{id:e.item}),` `,e.itemTitle,`: `,(0,q.jsx)(`strong`,{children:OD[e.mode].label.toLowerCase()}),`, asked for by the tracker's `,e.trigger,`.`]}),(0,q.jsxs)(W,{className:`btn btn--accent btn--small`,onPress:()=>r(!0),"data-inbox-start":``,children:[`Start`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,e.item]}),`…`]})]}),(0,q.jsx)(XP,{item:{id:e.item,title:e.itemTitle},start:e,isOpen:n,onOpenChange:r,onDone:t})]})}function eF({list:e,onSaved:t}){let{assignments:n}=J(),[r,i]=(0,v.useState)(String(e.settings.concurrent||1)),[a,o]=(0,v.useState)(String(e.settings.timeLimitMinutes)),[s,c]=(0,v.useState)(null),l=(0,v.useId)();return n?.saveSettings?(0,q.jsxs)(`details`,{className:`assign-limits`,children:[(0,q.jsx)(`summary`,{children:`Limits`}),(0,q.jsxs)(`form`,{className:`assign-limits__form`,onSubmit:async e=>{e.preventDefault();try{await n.saveSettings({concurrent:Number(r),timeLimitMinutes:Number(a)}),c(`Saved. The next assignment runs on these limits.`),t()}catch(e){c(e instanceof Error?e.message:String(e))}},"aria-describedby":l,children:[(0,q.jsxs)(Yp,{className:`field-text`,value:r,onChange:i,inputMode:`numeric`,children:[(0,q.jsx)(va,{children:`Assignments at once (1 to 3)`}),(0,q.jsx)(jo,{})]}),(0,q.jsxs)(Yp,{className:`field-text`,value:a,onChange:o,inputMode:`numeric`,children:[(0,q.jsx)(va,{children:`Minutes each (1 to 240)`}),(0,q.jsx)(jo,{})]}),(0,q.jsx)(W,{type:`submit`,className:`btn`,children:`Save the limits`}),(0,q.jsx)(`p`,{id:l,className:`note`,role:`status`,children:s??`Usage caps are under Settings, Agent usage: an assignment is one chat there.`}),!s&&(0,q.jsx)(Bw,{href:`#/settings/agent-usage/caps`,label:`Edit the usage caps`})]})]}):null}function tF({list:e,onDone:t}){let{assignments:n,dossier:r}=J(),i=oj(),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null);if(!n)return null;let p=[...i?.session?.stale?[{key:`chat`,label:`The chat about ${r.name}: ${i.session.stale.text}`,skip:i.session.stale.restart??(i.busy?`It is answering a question now, and a renew never interrupts one.`:null),run:async()=>{let e=await i.renew();if(e)throw Error(e)}}]:[],...e.assignments.filter(e=>e.stale).map(e=>({key:e.id,label:`${OD[e.mode].label} ${e.item} on ${e.adapter?DD[e.adapter]:`no adapter`}, ${kD[e.state].toLowerCase()}: ${e.stale.text}`,skip:MD(e),run:()=>n.renew(e.id)}))];if(!p.length&&!a)return null;let m=d??p,h=m.filter(e=>!e.skip),g=async()=>{c(!0);let e=[];for(let t of h)try{await t.run(),e.push(`Renewed: ${t.label}`)}catch(n){e.push(`Not renewed: ${t.label}. ${n instanceof Error?n.message:String(n)}`)}u(e),c(!1),t()};return(0,q.jsxs)(q.Fragment,{children:[p.length>0&&(0,q.jsxs)(QT,{children:[(0,q.jsx)(W,{className:`btn`,onPress:()=>(u(null),f(p),o(!0)),"data-renew-all":``,children:`Renew all stale…`}),(0,q.jsxs)(`span`,{className:`note`,children:[(0,q.jsx)(SD,{}),` `,p.length===1?`One session started`:`${p.length} sessions started`,` on instructions that have changed since.`]})]}),(0,q.jsx)(Of,{className:`feedback-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:a,onOpenChange:o,children:(0,q.jsx)(Ef,{className:`feedback-modal`,children:(0,q.jsx)(uf,{className:`feedback-dialog`,"aria-labelledby":`renew-title`,children:({close:e})=>(0,q.jsxs)(`div`,{className:`assign-form`,children:[(0,q.jsx)(ja,{slot:`title`,level:2,id:`renew-title`,children:`Renew stale sessions`}),(0,q.jsxs)(`p`,{className:`note`,children:[`Each renews as a fresh session on today's instructions, with what the old one left as context. The old one stays readable. Renew never interrupts a turn, and skips any session waiting on you. `,(0,q.jsx)(Iw,{topic:`stale`})]}),(0,q.jsx)(`ul`,{className:`rows renew-list`,children:m.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`strong`,{children:e.skip?`Skipped`:`Renews`}),`: `,e.label,e.skip&&(0,q.jsxs)(`span`,{className:`note`,children:[` `,e.skip]})]},e.key))}),l&&(0,q.jsx)(`ul`,{className:`rows`,role:`status`,"aria-label":`What was renewed`,children:l.map((e,t)=>(0,q.jsx)(`li`,{children:e},t))}),(0,q.jsxs)(`div`,{className:`assign-actions`,children:[!l&&(0,q.jsx)(W,{className:`btn btn--accent`,onPress:()=>void g(),isDisabled:s||!h.length,"data-renew-confirm":``,children:s?`Renewing…`:h.length?`Renew ${h.length}`:`Nothing to renew`}),(0,q.jsx)(W,{className:`btn`,onPress:e,children:l?`Close`:`Cancel`})]})]})})})})]})}function nF({item:e}){let{dossier:t,now:n,assignments:r}=J(),{list:i,error:a}=GP(t.name);if(!r)return null;let o=i?.assignments.filter(t=>t.item===e.id)??[];return(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`item-agents`,children:[(0,q.jsx)(`h2`,{id:`item-agents`,children:`Agents`}),(0,q.jsxs)(QT,{children:[(0,q.jsx)(QP,{item:e}),(0,q.jsx)(`span`,{className:`note`,children:`Refine, investigate or implement it with Claude, Copilot or Codex. Its proposals wait for you.`})]}),a&&(0,q.jsx)(`p`,{className:`failure`,children:a}),o.length>0&&(0,q.jsx)($T,{min:`sm`,className:`assign-lane`,"aria-label":`Assignments on ${e.id}`,children:o.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(JP,{a:e,now:n})},e.id))})]})}function rF(e,t){let n=[e,DD[e].toLowerCase()];return t.find(e=>e.kind===`agent`&&(n.some(t=>e.name.toLowerCase().includes(t))||Object.values(e.ids).some(e=>n.includes(e.toLowerCase()))))??null}function iF({people:e}){let{dossier:t,now:n,assignments:r}=J(),{list:i}=GP(t.name);if(!r||!i)return null;let a=[...new Set(i.assignments.flatMap(e=>e.adapter?[e.adapter]:[]))].sort();return(0,q.jsxs)(`section`,{className:`people-section`,"aria-labelledby":`agent-assignments`,children:[(0,q.jsx)(`h2`,{id:`agent-assignments`,children:`Agents' assignments`}),(0,q.jsx)(`p`,{className:`note`,children:`What each agent was assigned from Toil UI, as a teammate's plate: its own runs, not the pull requests above.`}),a.length?(0,q.jsx)($T,{min:`md`,className:`people-cards`,children:a.map(t=>{let r=rF(t,e),a=i.assignments.filter(e=>e.adapter===t);return(0,q.jsx)(`li`,{children:(0,q.jsx)(Q,{className:`assign-agent`,children:(0,q.jsxs)(ZT,{gap:`xs`,children:[(0,q.jsx)(`h3`,{children:r?`${r.name} (${DD[t]})`:DD[t]}),(0,q.jsx)(`p`,{className:`note`,children:aF.map(e=>[e,a.filter(t=>t.state===e).length]).filter(([,e])=>e).map(([e,t])=>`${t} ${kD[e].toLowerCase()}`).join(`, `)}),a.some(e=>e.stale)&&(0,q.jsxs)(`p`,{className:`note`,"data-stale":``,children:[(0,q.jsx)(SD,{}),` `,a.filter(e=>e.stale).length,` started on instructions that have changed since.`]}),(0,q.jsx)(`ul`,{className:`rows`,children:a.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(KP,{a:e}),` `,e.stale&&(0,q.jsx)(SD,{}),` `,(0,q.jsx)(`a`,{href:HP(e.dossier,e.id),children:OD[e.mode].label}),` `,(0,q.jsx)(UT,{id:e.item}),` `,(0,q.jsx)(`span`,{className:`note`,children:jD(e.ranMs??AD(e,n))})]},e.id))})]})})},t)})}):(0,q.jsx)(wj,{message:`Nothing has been assigned to an agent in ${t.name} yet.`,action:(0,q.jsx)(Tj,{href:Tg(t.name),children:`Assign from the board`}),help:`assignments`})]})}var aF=[`working`,`needs-you`,`queued`,`done`,`failed`],oF=[`TODO`,`IN_PROGRESS`,`DONE`];function sF(e){let t=e.filter(jh);return(t.some(e=>e.statusCategory===`UNKNOWN`)?[...oF,`UNKNOWN`]:oF).map(e=>({category:e,items:t.filter(t=>t.statusCategory===e)}))}var cF=e=>e.source.area.split(`-`)[0];function lF(e,t,n){let r=n.filter(n=>cF(n)===cF(e)&&n.source.connection===e.source.connection&&n.statusCategory===t&&n.status),i=r.filter(t=>t.typeName===e.typeName),a=new Map;for(let e of i.length?i:r)a.set(e.status,(a.get(e.status)??0)+1);return[...a.entries()].sort((e,t)=>t[1]-e[1])[0]?.[0]??null}function uF(e,t,n,r){if(t===e.statusCategory||t===`UNKNOWN`)return null;let i=hg(e),a=Ig[t],o=lF(e,t,n),s={id:`board:${e.id}:${t}`,from:`board`,item:e.id,title:`Move ${i} to ${a}`,reason:`Dragged on the board from ${Ig[e.statusCategory]} (${e.status??`no status`}).`},c=cF(e);if(c===`github`)return{...s,command:null,input:null,note:`toil has no command that sets a GitHub Projects status yet. Change ${i}'s Status field on the project board${e.url?`: ${e.url}`:``}.`};let l={text:`List the transitions the workflow offers:`,command:`jira issue transitions`,input:{dossier:r,key:e.source.key}},u={text:`List the states the work item type has:`,command:`${e.source.area} work-item states`,input:{dossier:r,type:e.typeName??`User Story`}};if(e.source.area===`ado-cloud`)return o?{...s,command:`ado-cloud work-item update`,input:{dossier:r,id:Number(e.source.key),field:[`System.State=${o}`]},note:null}:{...s,command:null,input:null,note:`No ${a} item in this dossier shows which state to use.`,hint:u};if(!o){let e=c===`jira`?l:u;return{...s,command:null,input:null,note:`No ${a} item in this dossier shows which status to use.`,hint:e}}return c===`jira`?{...s,command:`jira issue transition`,input:{dossier:r,key:e.source.key,transition:o},note:`"${o}" is the status other ${a} items use; the workflow may name the transition differently.`,hint:l}:c===`ado`?{...s,command:`ado work-item transition`,input:{dossier:r,id:Number(e.source.key),state:o},note:null}:{...s,command:null,input:null,note:`toil has no status change for ${e.source.area} items.`}}var dF={palette:{keys:[`Mod`,`K`],where:`Anywhere`,what:`Open the command palette: jump to a dossier, a tab, an item in any dossier or a setting, or run Sync, Analyze and Ask`},shortcuts:{keys:[`?`],where:`Anywhere but a text field`,what:`Show these shortcuts`},paletteMove:{keys:[`↑`],or:[[`↓`]],where:`In the command palette`,what:`Move between results`},paletteRun:{keys:[`Enter`],where:`In the command palette`,what:`Open or run the highlighted result`},close:{keys:[`Escape`],where:`In a dialog, menu or palette`,what:`Close it, and go back to where you were`},cardMenu:{keys:[`M`],or:[[`Menu`]],where:`On a board card`,what:`Open the card's menu: open it, move it or assign it to an agent`},cardPickUp:{keys:[`Space`],or:[[`Enter`]],where:`On a board card`,what:`Pick the card up, or put it down to propose the move`},cardMove:{keys:[`←`],or:[[`→`]],where:`On a board card you picked up`,what:`Move it to the previous or next column`},cardCancel:{keys:[`Escape`],where:`On a board card you picked up`,what:`Put it back where it was`},editSave:{keys:[`Enter`],where:`Editing a dossier's name or description`,what:`Save it`},editCancel:{keys:[`Escape`],where:`Editing a dossier's name or description`,what:`Leave it as it was`},wipeCancel:{keys:[`Escape`],where:`Asked whether to wipe the cache`,what:`Keep the cache`}},fF=()=>typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),pF=(e,t=fF())=>e===`Mod`?t?`⌘`:`Ctrl`:e;function mF(e){let t=dF[e],n=e=>({Mod:fF()?`Meta`:`Control`,Menu:`ContextMenu`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`})[e]??e;return[t.keys,...t.or??[]].map(e=>e.map(n).join(`+`)).join(` `)}var hF={Space:` `,Menu:`ContextMenu`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`};function gF(e,t){let n=dF[e].keys,r=n.includes(`Mod`),i=n.filter(e=>e!==`Mod`);if(i.length!==1||t.altKey||(r?!(fF()?t.metaKey:t.ctrlKey):t.ctrlKey||t.metaKey))return!1;let a=hF[i[0]]??i[0];return a.length===1?t.key.toLowerCase()===a.toLowerCase():t.key===a}function _F(e){return e instanceof Element&&!!e.closest(`input, textarea, select, [contenteditable=""], [contenteditable="true"]`)}var vF=e=>Ig[e],yF=class extends wN{static activators=[{eventName:`onPointerDown`,handler:(...e)=>e[0].nativeEvent.pointerType!==`touch`&&wN.activators[0].handler(...e)}]},bF={delay:250,tolerance:8},xF=10;function SF(e,t){return t?t===e.statusCategory?{ok:!1,text:`Already in ${vF(t)}: nothing to propose`}:t===`UNKNOWN`?{ok:!1,text:`Unknown is no status to move to`}:{ok:!0,text:`Drop to propose: ${vF(t)}`}:{ok:!1,text:`Not over a column`}}var CF=(e,t)=>cg(sg(e,t))?` card--attention`:``;function wF({item:e,ids:t}){let{insights:n}=fg(),{dossier:r}=J(),{Card:i}=ST(),a=hg(e),o=sg(e,n);return(0,q.jsxs)(i,{item:e,children:[(0,q.jsxs)(`div`,{className:`card-top`,children:[t?(0,q.jsx)(`a`,{id:`${t}-key`,href:xg(r.name,e.id),className:`item-link card-key`,draggable:!1,children:(0,q.jsx)(`span`,{className:`key`,children:a})}):(0,q.jsx)(`span`,{className:`card-key`,children:(0,q.jsx)(`span`,{className:`key`,children:a})}),cg(o)&&(0,q.jsxs)(`span`,{className:`card-flag`,title:`Needs attention`,children:[(0,q.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`14`,height:`14`,"aria-hidden":`true`,focusable:`false`,children:(0,q.jsx)(`path`,{d:`M4 14V2.5M4 3h7.5l-1.8 2.8L11.5 8.5H4`})}),(0,q.jsx)(`span`,{className:`sr-only`,children:`Needs attention`})]}),(0,q.jsx)(Fj,{category:e.statusCategory,status:e.status})]}),(0,q.jsx)(`p`,{id:t&&`${t}-title`,className:`card-title`,children:e.title}),(0,q.jsxs)(`div`,{className:`card-foot`,children:[(0,q.jsxs)(`span`,{className:`who`,children:[(0,q.jsx)(Pj,{person:e.assignee}),` `,yg(e.assignee)]}),(0,q.jsxs)(`span`,{className:`card-meta`,children:[(0,q.jsx)(Lj,{insights:o,compact:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[(0,q.jsx)(`span`,{className:`source`,children:mg(e.source.area)}),` · `,Lg(e)]})]})]})]})}function TF({item:e}){let{over:t}=EP(),{insights:n}=fg(),r=SF(e,t?.id??null);return(0,q.jsxs)(`div`,{className:`card card--${e.statusCategory.toLowerCase()}${CF(e,n)} card--overlay`,"data-drag-overlay":!0,"aria-hidden":`true`,children:[(0,q.jsx)(`div`,{className:`card-grip`,children:(0,q.jsx)(wF,{item:e})}),(0,q.jsx)(`p`,{className:`drop-verdict${r.ok?``:` drop-verdict--no`}`,"data-drop-verdict":!0,children:r.text})]})}function EF({item:e,move:t,onUndo:n,onShow:r}){let i=hg(e);return(0,q.jsxs)(`li`,{className:`card-ghost`,"data-proposed-ghost":!0,"aria-label":`Proposed move, not applied: ${i} ${e.title}`,children:[(0,q.jsx)(`p`,{className:`card-ghost__kind`,children:`Proposed move, not applied`}),(0,q.jsxs)(`p`,{className:`card-ghost__title`,children:[(0,q.jsx)(`span`,{className:`key`,children:i}),` `,e.title]}),(0,q.jsxs)(`p`,{className:`note`,children:[`From `,vF(e.statusCategory),`. It stays there until someone applies the move with toil.`]}),(0,q.jsxs)(`div`,{className:`card-ghost__actions`,children:[(0,q.jsx)(W,{className:`btn btn--quiet`,onPress:n,"aria-label":`Undo the proposed move of ${i}`,children:`Undo`}),(0,q.jsx)(W,{className:`btn`,onPress:r,"aria-label":`How to apply the move of ${i} to ${vF(t.to)}`,children:`How to apply`})]})]})}var DF=(e,t)=>(n,{active:r,context:{collisionRect:i,droppableRects:a,over:o}})=>{let s={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[n.code];if(!s||!i)return;n.preventDefault();let c=e.indexOf(o?.id??t(r)),l=e[Math.min(e.length-1,Math.max(0,c+s))],u=l?a.get(l):void 0;if(u)return{x:u.left+Math.max(0,(u.width-i.width)/2),y:u.top+48}};function OF({item:e,others:t,onMove:n,menuOpen:r,setMenuOpen:i}){let{dossier:a,assignments:o}=J(),{insights:s}=fg(),{attributes:c,listeners:l,setNodeRef:u,setActivatorNodeRef:d,isDragging:f}=TP({id:e.id,attributes:{role:`group`,roleDescription:`draggable card`}}),[p,m]=(0,v.useState)(!1),h=(0,v.useRef)(null),g=(0,v.useId)(),_=hg(e),y=xg(a.name,e.id),b=e=>{h.current=e,d(e)},x=e=>{e.target===e.currentTarget&&!f&&gF(`cardMenu`,e)?(e.preventDefault(),i(!0)):l?.onKeyDown?.(e)},S=e=>{e.target.closest(`a`)||f||(e.preventDefault(),i(!0))},C=e=>{e.button!==0||e.target.closest(`a, button`)||(window.location.hash=y)},w=e=>{i(e),e||requestAnimationFrame(()=>document.activeElement===document.body&&h.current?.focus())},T=e=>{w(!1),e===`open`?window.location.hash=y:e===`assign`?m(!0):n(e)};return(0,q.jsxs)(`li`,{ref:u,className:`card card--${e.statusCategory.toLowerCase()}${CF(e,s)}${f?` card--dragging`:``}`,children:[(0,q.jsx)(`div`,{ref:b,className:`card-grip`,"data-item":e.id,...c,...l,"aria-labelledby":`${g}-key ${g}-title`,"aria-keyshortcuts":mF(`cardMenu`),onKeyDown:x,onContextMenu:S,onClick:C,children:(0,q.jsx)(wF,{item:e,ids:g})}),(0,q.jsx)(Xu,{triggerRef:h,isOpen:r,onOpenChange:w,placement:`bottom start`,className:`popover`,children:(0,q.jsxs)(Qd,{className:`menu`,"aria-label":`${_} ${e.title}`,autoFocus:`first`,onAction:T,children:[(0,q.jsx)(af,{id:`open`,className:`menu-item`,children:`Open`}),(0,q.jsxs)(nf,{children:[(0,q.jsx)(ys,{className:`menu-header`,children:`Move to`}),t.map(e=>(0,q.jsx)(af,{id:e,className:`menu-item`,children:vF(e)},e))]}),o?(0,q.jsx)(af,{id:`assign`,className:`menu-item`,children:`Assign to an agent…`}):null]})}),o&&(0,q.jsx)(XP,{item:e,isOpen:p,onOpenChange:m})]})}function kF({category:e,items:t,all:n,onMove:r,menuFor:i,setMenuFor:a,ghosts:o,onUndo:s,onShow:c}){let{setNodeRef:l,isOver:u,active:d}=kP({id:e}),{byId:f}=J(),p=rC(),m=`col-${e}`,h=d?f.get(String(d.id)):void 0,g=u&&h?SF(h,e).ok?` column--over`:` column--refused`:``;return(0,q.jsxs)(`section`,{ref:l,className:`column column--${e.toLowerCase()}${g}`,"aria-labelledby":m,children:[(0,q.jsxs)(`h3`,{id:m,children:[vF(e),` `,(0,q.jsx)(`span`,{className:`count`,children:t.length})]}),t.length||o.length?(0,q.jsxs)(`ul`,{className:`cards`,children:[o.map(e=>(0,q.jsx)(EF,{item:e.item,move:e.move,onUndo:()=>s(e.move),onShow:()=>c(e.move)},e.move.proposal.id)),t.map(t=>(0,q.jsx)(OF,{item:t,others:n.filter(t=>t!==e&&t!==`UNKNOWN`),onMove:e=>r(t,e),menuOpen:i===t.id,setMenuOpen:e=>a(e?t.id:null)},t.id))]}):null,t.length?null:(0,q.jsx)(`p`,{className:`note`,children:p(`empty.column`)})]})}function AF({items:e}){let{dossier:t,byId:n}=J(),[r,i]=(0,v.useState)([]),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),d=(0,v.useRef)(null),f=(0,v.useRef)(null),p=sF(e),m=p.map(e=>e.category),h=DM(EM(yF,{activationConstraint:{distance:6}}),EM(kN,{activationConstraint:bF}),EM(yN,{coordinateGetter:DF(m,e=>n.get(String(e))?.statusCategory)})),g=e=>{let t=n.get(String(e));return t?hg(t):String(e)},_=(e,n)=>{let r=uF(e,n,t.items,t.name);r?(i(e=>[{proposal:r,to:n},...e.filter(e=>e.proposal.id!==r.id&&e.proposal.item!==r.item)]),o(`Proposed: ${r.title}. Nothing has changed in ${t.name}'s tracker.`)):o(`${hg(e)} is already in ${vF(n)}. Nothing proposed.`)},y=e=>i(t=>t.filter(t=>t.proposal.id!==e.proposal.id)),b=e=>{y(e),o(`Took back the proposed move of ${g(e.proposal.item)}. Nothing proposed.`),requestAnimationFrame(()=>d.current?.querySelector(`.card-grip[data-item="${CSS.escape(e.proposal.item)}"]`)?.focus())},x=e=>{let t=f.current?.querySelector(`[data-proposal="${CSS.escape(e.proposal.id)}"]`);t?.scrollIntoView?.({block:`center`}),t?.focus({preventScroll:!0})};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`note`,children:`One column per status category, across every tracker, each card with its own status word. Drag a card to another column, or open its menu with a right-click, a long press or M, to propose a move: nothing changes until someone applies it with toil.`}),(0,q.jsxs)(xP,{sensors:h,onDragStart:e=>u(n.get(String(e.active.id))??null),onDragCancel:()=>u(null),onDragEnd:e=>{u(null);let t=n.get(String(e.active.id));t&&(`touches`in e.activatorEvent&&Math.hypot(e.delta.x,e.delta.y)<xF?c(t.id):e.over&&_(t,e.over.id))},accessibility:{announcements:{onDragStart:({active:e})=>`Picked up ${g(e.id)}. Moving it proposes a change; nothing is changed.`,onDragOver:({active:e,over:t})=>t?`${g(e.id)} is over ${vF(t.id)}.`:`${g(e.id)} is not over a column.`,onDragEnd:({active:e,over:t})=>{if(!t)return`Dropped ${g(e.id)} outside the columns. Nothing proposed.`;let r=n.get(String(e.id))?.statusCategory===t.id;return`Dropped ${g(e.id)} on ${vF(t.id)}${r?`, where it already is. Nothing proposed.`:`.`}`},onDragCancel:({active:e})=>`Stopped dragging ${g(e.id)}. Nothing proposed.`},screenReaderInstructions:{draggable:`To pick up the card, press Space or Enter. Use the arrow keys to move it to the next or previous column, then press Space or Enter to propose the move, or Escape to cancel. Press M or the Menu key for its menu.`}},children:[(0,q.jsx)(`div`,{ref:d,className:`board`,style:{gridTemplateColumns:`repeat(${p.length}, minmax(15rem, 1fr))`},children:p.map(e=>(0,q.jsx)(kF,{category:e.category,items:e.items,all:m,onMove:_,menuFor:s,setMenuFor:c,ghosts:r.flatMap(t=>{let r=t.to===e.category?n.get(t.proposal.item):void 0;return r?[{item:r,move:t}]:[]}),onUndo:b,onShow:x},e.category))}),(0,si.createPortal)((0,q.jsx)(VP,{dropAnimation:null,children:l?(0,q.jsx)(TF,{item:l}):null}),document.body)]}),(0,q.jsx)(`p`,{className:`sr-only`,role:`status`,children:a}),r.length>0&&(0,q.jsxs)(`div`,{ref:f,className:`proposals`,"aria-label":`Proposed moves`,role:`group`,children:[(0,q.jsx)(`h3`,{children:`Proposed moves`}),r.map(e=>(0,q.jsx)(`div`,{"data-proposal":e.proposal.id,className:`proposal-slot`,tabIndex:-1,children:(0,q.jsx)(jE,{proposal:e.proposal,onDismiss:()=>y(e)})},e.proposal.id))]})]})}function jF({open:e}={}){return(0,q.jsx)(`div`,{className:`tab-panels`,children:e?(0,q.jsx)(PF,{id:e}):(0,q.jsx)(MF,{})})}function MF(){let e=oj(),t=e?.turns.find(e=>e.analyze&&!e.done),n=e?.history,r=n?.list??null,i=nC(),{dossier:a}=J();return(0,q.jsxs)(Q,{as:`section`,className:`panel analyses`,"aria-labelledby":`analyses-title`,children:[(0,q.jsx)(`h2`,{id:`analyses-title`,children:i(`analyses`,`Analyses`)}),(0,q.jsxs)(`p`,{className:`note`,children:[`Every Analyze kept for `,a.name,`, newest first. `,(0,q.jsx)(Iw,{topic:`analyses`})]}),e&&(r===null||r.length>0||t)&&(0,q.jsxs)(`p`,{className:`analyses__actions`,children:[(0,q.jsx)(W,{className:`btn`,onPress:()=>void e.ask(`analyze`,`Analyze`),isDisabled:e.busy,"data-analyze-tab":``,children:`Analyze now`}),t&&(0,q.jsx)(`span`,{className:`note`,children:` An analysis is being written now; it joins the list when its answer is whole.`})]}),n?.error&&(0,q.jsx)(`p`,{className:`failure`,children:n.error}),r===null?!n?.error&&(0,q.jsx)(FA,{size:`panel`,message:`Reading the analyses…`}):r.length?(0,q.jsx)(`ol`,{className:`analyses__list`,"aria-label":`Analyses, newest first`,children:r.map(e=>(0,q.jsx)(NF,{a:e},e.id))}):t?null:(0,q.jsx)(wj,{message:`No analysis kept for this dossier yet.`,action:e?(0,q.jsx)(Ej,{onPress:()=>void e.ask(zT,`Analyze`),disabled:e.busy,children:`Analyze now`}):(0,q.jsx)(Tj,{href:bg(a.name),children:`Open the Overview`})})]})}function NF({a:e}){let{dossier:t}=J();return(0,q.jsxs)(`li`,{className:`analysis`,"data-analysis":e.id,children:[(0,q.jsxs)(`p`,{className:`note analysis__meta`,children:[(0,q.jsx)(`time`,{dateTime:e.at,children:Y(e.at)}),`, by `,PO(e),`. Cites `,e.citations.length,` `,e.citations.length===1?`item`:`items`,e.unverified?`, ${e.unverified} its tools never returned`:``,`.`]}),(0,q.jsx)(`p`,{className:`analysis__rec`,children:e.recommendation?(0,q.jsx)(GT,{text:e.recommendation,chips:!0}):(0,q.jsx)(`span`,{className:`note`,children:`This answer had no Recommendation line; open it to read it as it came.`})}),e.changes.previous&&!AO(e.changes)?(0,q.jsxs)(`details`,{className:`analysis__changes`,children:[(0,q.jsx)(`summary`,{children:RO(e.changes)}),(0,q.jsx)(BO,{changes:e.changes})]}):(0,q.jsx)(`p`,{className:`note analysis__changes`,children:RO(e.changes)}),(0,q.jsx)(`p`,{className:`analysis__open`,children:(0,q.jsxs)(`a`,{href:Og(t.name,e.id),children:[`Open`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` the analysis of `,Y(e.at)]})]})})]})}function PF({id:e}){let{analyses:t,dossier:n}=J(),[r,i]=(0,v.useState)(void 0),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(new Set);(0,v.useEffect)(()=>{let r=!0;return i(void 0),t?(t.get(n.name,e).then(e=>r&&i(e),e=>r&&o(`The analysis didn't load: ${e instanceof Error?e.message:String(e)}`)),()=>{r=!1}):void i(null)},[t,n.name,e]);let l=(0,q.jsx)(`p`,{className:`analysis-open__back`,children:(0,q.jsx)(`a`,{href:Dg(n.name),children:`All analyses`})});if(a||r===null)return(0,q.jsxs)(Q,{as:`section`,className:`panel analyses`,"aria-labelledby":`analysis-title`,children:[l,(0,q.jsx)(`h2`,{id:`analysis-title`,children:`Analysis not found`}),(0,q.jsx)(`p`,{className:a?`failure`:void 0,children:a??`${n.name} has no analysis by that id: it may have passed the cache's retention period, or the cache was wiped.`})]});if(!r)return(0,q.jsx)(`p`,{className:`note`,children:`Reading the analysis…`});let{record:u,changes:d}=r;return(0,q.jsxs)(Q,{as:`section`,className:`panel analyses analysis-open`,"aria-labelledby":`analysis-title`,children:[l,(0,q.jsxs)(`h2`,{id:`analysis-title`,children:[`Analysis of `,Y(u.at)]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Asked `,Y(u.startedAt),`, answered by `,PO(u),`. Cites `,u.citations.length,` `,u.citations.length===1?`item`:`items`,`.`]}),u.warnings.length>0&&(0,q.jsx)(`div`,{className:`answer-checks`,"aria-label":`Checks on this answer`,children:u.warnings.map((e,t)=>(0,q.jsx)(`p`,{className:`failure`,children:e},t))}),(0,q.jsx)(IO,{parts:u.parts,level:3}),u.proposals.length>0&&(0,q.jsxs)(`section`,{"aria-labelledby":`analysis-proposals`,children:[(0,q.jsx)(`h3`,{id:`analysis-proposals`,children:`Suggested changes`}),u.proposals.filter(e=>!s.has(e.id)).map(e=>(0,q.jsx)(jE,{proposal:e,onDismiss:()=>c(t=>new Set(t).add(e.id))},e.id))]}),(0,q.jsxs)(`section`,{"aria-labelledby":`analysis-changes`,children:[(0,q.jsx)(`h3`,{id:`analysis-changes`,children:`What changed since the one before`}),(0,q.jsx)(BO,{changes:d})]}),u.usage&&(0,q.jsx)(yD,{usage:u.usage})]})}function FF(e){let t=new Map;for(let n of e.items)for(let r of sg(n,e)){if(r.code!==`blocked`)continue;let e=/\[\[([^\]]+)\]\]/.exec(r.text)?.[1];e&&t.set(e,[...t.get(e)??[],n.id])}return t}function IF(e,t,n=new Set){for(let r of e.get(t)??[])n.has(r)||IF(e,r,n.add(r));return n}function LF(e){let t=new Set([...e.values()].flat());return[...e.entries()].sort((n,r)=>IF(e,r[0]).size-IF(e,n[0]).size||Number(t.has(n[0]))-Number(t.has(r[0]))||n[0].localeCompare(r[0]))}function RF(e){let t=new Map(e.map(e=>[e.id,e])),n=new Map;for(let t of e)for(let e of t.links){let[r,i]=e.direction===`outward`?[t.id,e.target]:[e.target,t.id],[a,o]=e.type===`relates`&&r>i?[i,r]:[r,i],s=`${e.type}:${a}->${o}`;(!n.get(s)||e.direction===`outward`)&&n.set(s,{id:s,type:e.type,source:a,target:o,name:e.name})}let r=[];for(let t of e)t.links.length&&!r.includes(t.id)&&r.push(t.id);for(let e of n.values())for(let t of[e.source,e.target])r.includes(t)||r.push(t);let i=[...n.values()].filter(e=>e.type===`blocks`),a=new Map(r.map(e=>[e,0])),o=!1;for(let e=0;;e++){let t=!1;for(let e of i){let n=a.get(e.source)+1;n>a.get(e.target)&&(a.set(e.target,n),t=!0)}if(!t)break;if(e>=r.length){o=!0;break}}let s=e=>t.has(e)&&t.get(e).statusCategory!==`DONE`,c=new Map;return{nodes:r.map(e=>{let n=a.get(e),r=c.get(n)??0;return c.set(n,r+1),{id:e,known:t.has(e),rank:n,row:r,done:t.get(e)?.statusCategory===`DONE`,blocked:s(e)&&i.some(t=>t.target===e&&s(t.source)),blocking:s(e)&&i.some(t=>t.source===e&&s(t.target))}}),edges:[...n.values()],cycle:o}}var zF={blocks:`blocks`,relates:`relates to`,duplicates:`duplicates`,implements:`implements`,other:`is linked to`},BF=864e5,VF=e=>e?Date.parse(e):NaN,HF=e=>Number.isFinite(e),UF=e=>new Date(e).toISOString(),WF=e=>e?.estimate?.unit===`points`?e.estimate.value:null;function GF(e){if(e.statusCategory!==`DONE`)return null;let t=VF(Nh(e));if(HF(t))return{at:t,estimated:!1};let n=VF(e.resolved);if(HF(n))return{at:n,estimated:!1};let r=VF(e.updated);return HF(r)?{at:r,estimated:!0}:null}function KF(e,t){let n=[...e.history?.transitions??[]].sort((e,t)=>e.at<t.at?-1:+(e.at>t.at)),r=[],i=null;for(let e of n){let t=VF(e.at);HF(t)&&(e.toCategory===`IN_PROGRESS`&&i===null?i=t:e.toCategory!==`IN_PROGRESS`&&i!==null&&(r.push([i,t]),i=null))}if(i!==null&&r.push([i,t]),r.length||e.statusCategory===`TODO`||e.statusCategory===`UNKNOWN`)return{spans:r,estimated:!1};let a=VF(e.created);return HF(a)?{spans:[[a,t]],estimated:!0}:{spans:[],estimated:!0}}function qF(e,t){let n=e;for(let[e,r]of t)n=n.flatMap(([t,n])=>r<=t||e>=n?[[t,n]]:[...e>t?[[t,e]]:[],...r<n?[[r,n]]:[]]);return n.filter(([e,t])=>t>e)}function JF(e){let t=[];for(let[n,r]of[...e].sort((e,t)=>e[0]-t[0])){let e=t.at(-1);e&&n<=e[1]?e[1]=Math.max(e[1],r):t.push([n,r])}return t}function YF(e,t){if(!e.size)return null;let n=e=>WF(t.byId.get(e))??0,r=[...e.keys(),...[...e.values()].flat()].some(e=>n(e)>0),i=e=>r?n(e):1,a=new Map,o=(t,n)=>{if(a.has(t))return a.get(t);let r=[],s=-1;for(let a of e.get(t)??[]){if(n.has(a))continue;let e=o(a,new Set(n).add(a)),t=e.reduce((e,t)=>e+i(t),0);(t>s||t===s&&e.length>r.length)&&([r,s]=[e,t])}let c=[t,...r];return a.set(t,c),c},s=new Set([...e.values()].flat()),c=LF(e).map(([e])=>e),l=c.filter(e=>!s.has(e)),u=[],d=-1;for(let e of l.length?l:c){let t=o(e,new Set([e])),n=t.reduce((e,t)=>e+i(t),0);(n>d||n===d&&t.length>u.length)&&([u,d]=[t,n])}return{ids:u,points:u.reduce((e,t)=>e+n(t),0),byCount:!r}}function XF(e,t,n){let r=t.filter(t=>t.kind===`pull-request`&&t.items.includes(e.id)&&t.outcome===`open`),i=[];for(let e of r){let r=t.filter(t=>t.kind===`build`&&t.builds===e.id&&HF(VF(t.at))).sort((e,t)=>e.at<t.at?-1:1),a=null;for(let e of r)a=e.outcome===`failed`?a??e:null;if(a)i.push({kind:`checks`,start:a.at,end:UF(n),estimated:!1,by:a.id});else if(!r.length&&e.change?.checks===`FAILING`){let t=VF(e.change.checksAt),r=VF(e.change.updated??e.change.created);HF(t)?i.push({kind:`checks`,start:UF(t),end:UF(n),estimated:!1,by:e.id}):HF(r)&&i.push({kind:`checks`,start:UF(r),end:UF(n),estimated:!0,by:e.id})}}return i}function ZF(e){let{prepared:t,health:n}=e,r=VF(e.now),i=RF(t.items),a=new Map(i.nodes.map(e=>[e.id,e.rank])),o=e=>t.byId.has(e)&&t.byId.get(e).statusCategory!==`DONE`,s=i.edges.filter(e=>e.type===`blocks`&&t.byId.has(e.source)&&t.byId.has(e.target)&&e.source!==e.target&&(o(e.source)||o(e.target))),c=YF(FF(t),t),l=new Set(c?.ids??[]),u=new Set((c?.ids??[]).slice(1).map((e,t)=>`${c.ids[t]}->${e}`)),d=[];for(let e of s)for(let t of[e.source,e.target])d.includes(t)||d.push(t);let f=new Map(t.items.map((e,t)=>[e.id,t]));d.sort((e,t)=>(a.get(e)??0)-(a.get(t)??0)||(f.get(e)??0)-(f.get(t)??0));let p=d.map(n=>{let i=t.byId.get(n),o=GF(i),c=o?.at??r,u=[],d=KF(i,c);d.spans.length&&u.push(d.estimated?`In progress from when it was created (estimated): its history records no move into In progress`:`In progress from its transitions`),o?.estimated&&u.push(`Finished at its last update (estimated): no move into Done recorded`);let f=[];for(let e of s.filter(e=>e.target===n)){let n=t.byId.get(e.source),a=Math.max(VF(i.created),VF(n.created)),o=GF(n)?.at??r,s=[HF(a)?a:NaN,Math.min(o,c)];!HF(s[0])||s[1]<=s[0]||f.push({kind:`blocked`,start:UF(s[0]),end:UF(s[1]),estimated:!0,by:e.source})}f.length&&u.push(`Blocked from when both items existed (estimated): links carry no date`);let p=JF(f.map(e=>[VF(e.start),VF(e.end)])),m=qF(d.spans,p).map(e=>({kind:`progress`,start:UF(e[0]),end:UF(e[1]),estimated:d.estimated,by:null})),h=XF(i,t.changes,c);h.length&&u.push(h.some(e=>e.estimated)?`Checks failing since the pull request last changed (estimated)`:`Checks failing since the first of the latest failed builds`);let g=i.statusCategory===`TODO`?Bv({item:i,settings:e.readiness,byId:t.byId}).verdict:null;return{id:n,rank:a.get(n)??0,done:i.statusCategory===`DONE`,points:WF(i),segments:[...p.map(e=>({kind:`blocked`,start:UF(e[0]),end:UF(e[1]),estimated:!0,by:null})),...m].sort((e,t)=>e.start<t.start?-1:1),blocked:f,checks:h,evidence:u,onChain:l.has(n),ready:g}}),m=s.map(e=>({from:e.source,to:e.target,live:o(e.source)&&o(e.target),onChain:u.has(`${e.source}->${e.target}`)})),h,g;if(n?.sprint.start&&n.sprint.end)h=VF(n.sprint.start),g=Math.max(VF(n.sprint.end),r);else{let e=p.flatMap(e=>[...e.segments,...e.checks].map(e=>VF(e.start))).filter(HF);h=e.length?Math.min(...e):r-14*BF,g=r+2*BF}return{start:UF(h),end:UF(g),now:UF(r),sprint:n?.sprint.name??null,bars:p,arrows:m,chain:c,cycle:i.cycle}}function QF(e){let t=new Set(e.chain?.ids??[]),n=(e.chain?.ids??[]).map(t=>e.bars.find(e=>e.id===t)).filter(e=>e!==void 0);return{...e,bars:n,arrows:e.arrows.filter(e=>e.onChain&&t.has(e.from)&&t.has(e.to))}}var $F=864e5,eI=e=>Date.parse(e),tI=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function nI(){let{dossier:e,now:t}=J(),{health:n,insights:r}=fg();return(0,v.useMemo)(()=>ZF({prepared:r,health:n,readiness:e.readiness,now:t}),[r,n,e.readiness,t])}function rI(e){let t=(0,v.useRef)(null),[n,r]=(0,v.useState)(960);return(0,v.useEffect)(()=>{let e=t.current?.parentElement;if(!e||typeof ResizeObserver!=`function`)return;let n=()=>r(Math.round(e.clientWidth)||960);n();let i=new ResizeObserver(n);return i.observe(e),()=>i.disconnect()},[]),{ref:t,width:Math.max(e,n),narrow:n<560}}var iI={label:220,row:36,bar:14,top:26,right:16},aI=5,oI=4,sI={label:170,row:24,bar:10,top:16,right:12};function cI(e){return`${e.estimated?`about `:``}${vg(e.start)} to ${vg(e.end)}`}function lI(e,t,n){let r=[`${n(e.id)}${e.points===null?``:`, ${tI(e.points,`point`)}`}${e.done?`, done`:``}`];for(let t of e.segments.filter(e=>e.kind===`progress`))r.push(`in progress ${cI(t)}`);for(let t of e.blocked)r.push(`blocked by ${n(t.by)} ${cI(t)}`);for(let t of e.checks)r.push(`checks failing since ${t.estimated?`about `:``}${vg(t.start)}`);let i=t.arrows.filter(t=>t.to===e.id).map(e=>n(e.from));return i.length&&r.push(`waits on ${i.join(`, `)}`),e.onChain&&r.push(`on the critical chain`),r.join(`; `)}function uI({g:e,compact:t=!1}){let{byId:n}=J(),{ref:r,width:i,narrow:a}=rI(t?560:680),o={...t?sI:iI,...a?{label:150}:{}},s=(0,v.useId)().replace(/[^\w-]/g,``),c=`gantt-hatch-${s}`,l=`gantt-head-${s}`,u=`gantt-head-chain-${s}`,d=eI(e.start),f=eI(e.end),p=i-o.label-o.right,m=e=>o.label+p*(Math.min(Math.max(e,d),f)-d)/Math.max(1,f-d),h=o.top+e.bars.length*o.row+(t?4:18),g=new Map(e.bars.map((e,t)=>[e.id,o.top+t*o.row+o.row/2])),_=e=>{let t=n.get(e);return t?hg(t):e},y=e=>{let t=n.get(e);return t?`${hg(t)} ${t.title}`:e},b=Math.max(1,Math.round((f-d)/$F)),x=Math.max(1,Math.ceil(b/Math.max(1,Math.floor(p/64)))),S=[];for(let e=Math.ceil(d/$F)*$F;e<=f;e+=x*$F)S.push(e);let C=m(eI(e.now)),w=e.chain,T=`Blocker timeline${e.sprint?` for ${e.sprint}`:``}: ${tI(e.bars.length,`item`)} and ${tI(e.arrows.length,`waits-on arrow`)}.${w?` Critical chain: ${w.ids.map(_).join(` blocks `)}${w.byCount?``:`, ${tI(w.points,`point`)}`}.`:``} The table lists every bar and arrow.`,E=Math.floor((o.label-24)/7),D=(e,t)=>e.length>t?`${e.slice(0,Math.max(1,t-1))}…`:e,O=t=>{let n=e.bars.find(e=>e.id===t)?.segments.map(e=>eI(e.end)).sort((e,t)=>t-e)[0];return m(n??eI(e.now))},k=new Map([...new Set(e.arrows.map(e=>e.from))].map((e,t)=>[e,t%aI]));return(0,q.jsx)(`div`,{ref:r,className:`gantt-measure`,children:(0,q.jsxs)(`svg`,{className:`gantt`,width:i,height:h,viewBox:`0 0 ${i} ${h}`,role:`img`,"aria-label":T,"data-gantt":t?`compact`:`full`,children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsxs)(`pattern`,{id:c,patternUnits:`userSpaceOnUse`,width:`6`,height:`6`,patternTransform:`rotate(45)`,children:[(0,q.jsx)(`rect`,{className:`gantt-hatch-bg`,width:`6`,height:`6`}),(0,q.jsx)(`line`,{className:`gantt-hatch-line`,x1:`1.5`,y1:`0`,x2:`1.5`,y2:`6`})]}),(0,q.jsx)(`marker`,{id:l,viewBox:`0 0 8 8`,refX:`7`,refY:`4`,markerWidth:`7`,markerHeight:`7`,orient:`auto-start-reverse`,children:(0,q.jsx)(`path`,{className:`gantt-head`,d:`M0,0 L8,4 L0,8 z`})}),(0,q.jsx)(`marker`,{id:u,viewBox:`0 0 8 8`,refX:`7`,refY:`4`,markerWidth:`6`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,q.jsx)(`path`,{className:`gantt-head gantt-head--chain`,d:`M0,0 L8,4 L0,8 z`})})]}),S.map(e=>(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`line`,{className:`gantt-grid`,x1:m(e),x2:m(e),y1:o.top-4,y2:h-(t?2:16)}),!t&&(0,q.jsx)(`text`,{className:`gantt-axis`,x:m(e)+3,y:o.top-10,children:vg(new Date(e).toISOString()).replace(/ \d{4}$/,``)})]},e)),e.bars.map((t,r)=>{let a=o.top+r*o.row,s=a+o.row/2,l=s-o.bar/2,u=n.get(t.id);return(0,q.jsxs)(`g`,{className:`gantt-row${t.onChain?` gantt-row--chain`:``}`,children:[(0,q.jsx)(`title`,{children:lI(t,e,y)}),t.onChain&&(0,q.jsx)(`rect`,{className:`gantt-band`,x:0,y:a+1,width:i,height:o.row-2}),t.onChain&&(0,q.jsx)(`path`,{className:`gantt-diamond`,d:`M8,${s-5} L13,${s} L8,${s+5} L3,${s} z`}),(0,q.jsxs)(`text`,{className:`gantt-key`,x:18,y:s+4,children:[_(t.id),(0,q.jsx)(`tspan`,{className:`gantt-title`,dx:6,children:D(u?.title??``,Math.max(4,E-_(t.id).length))})]}),t.segments.map((e,t)=>{let n=m(eI(e.start)),r=m(eI(e.end)),i=Math.max(3,r-n-2);return e.kind===`blocked`?(0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--blocked`,x:n,y:l,width:i,height:o.bar,rx:3,fill:`url(#${c})`},t):(0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--progress`,x:n,y:l,width:i,height:o.bar,rx:3},t)}),t.checks.map((e,t)=>{let n=m(eI(e.start));return(0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--checks`,x:n,y:l+o.bar+3,width:Math.max(3,m(eI(e.end))-n),height:4,rx:2},`c${t}`)}),!t.segments.length&&!t.done&&(0,q.jsx)(`text`,{className:`gantt-none`,x:o.label+4,y:s+4,children:`Not started`}),t.done&&(0,q.jsx)(`path`,{className:`gantt-done`,d:`M${O(t.id)+4},${s} l3,3 l6,-7`})]},t.id)}),e.arrows.map(e=>{let t=g.get(e.from),n=g.get(e.to);if(t===void 0||n===void 0)return null;let r=O(e.from)+2,a=n>t?1:-1,s=Math.min(i-4,r+12+(k.get(e.from)??0)*8),c=n-a*(o.bar/2+3);return(0,q.jsx)(`path`,{className:`gantt-arrow${e.onChain?` gantt-arrow--chain`:``}${e.live?``:` gantt-arrow--over`}`,d:`M${r},${t} H${s} V${c}`,markerEnd:`url(#${e.onChain?u:l})`},`${e.from}->${e.to}`)}),(0,q.jsx)(`line`,{className:`gantt-today`,x1:C,x2:C,y1:t?2:o.top-4,y2:t?h:h-2}),(0,q.jsx)(`text`,{className:`gantt-today-label`,x:C>i-60?C-4:C+4,y:t?11:h-4,textAnchor:C>i-60?`end`:`start`,children:`Today`})]})})}function dI({g:e}){let t=(0,v.useId)().replace(/[^\w-]/g,``),n=e=>(0,q.jsxs)(`svg`,{className:`gantt-swatch`,width:`28`,height:`14`,viewBox:`0 0 28 14`,"aria-hidden":`true`,children:[(0,q.jsx)(`defs`,{children:(0,q.jsxs)(`pattern`,{id:`lh-${t}`,patternUnits:`userSpaceOnUse`,width:`6`,height:`6`,patternTransform:`rotate(45)`,children:[(0,q.jsx)(`rect`,{className:`gantt-hatch-bg`,width:`6`,height:`6`}),(0,q.jsx)(`line`,{className:`gantt-hatch-line`,x1:`1.5`,y1:`0`,x2:`1.5`,y2:`6`})]})}),e]});return(0,q.jsxs)(`ul`,{className:`gantt-legend`,"aria-label":`Key`,children:[(0,q.jsxs)(`li`,{children:[n((0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--progress`,x:`1`,y:`2`,width:`26`,height:`10`,rx:`3`})),` In progress`]}),(0,q.jsxs)(`li`,{children:[n((0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--blocked`,x:`1`,y:`2`,width:`26`,height:`10`,rx:`3`,fill:`url(#lh-${t})`})),` Blocked`]}),(0,q.jsxs)(`li`,{children:[n((0,q.jsx)(`rect`,{className:`gantt-seg gantt-seg--checks`,x:`1`,y:`5`,width:`26`,height:`4`,rx:`2`})),` Checks failing`]}),(0,q.jsxs)(`li`,{children:[n((0,q.jsx)(`path`,{className:`gantt-arrow`,d:`M2,7 H24`})),` Waits on (points at the item that waits)`]}),e.chain&&(0,q.jsxs)(`li`,{children:[n((0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{className:`gantt-diamond`,d:`M6,2 L11,7 L6,12 L1,7 z`}),(0,q.jsx)(`path`,{className:`gantt-arrow gantt-arrow--chain`,d:`M14,7 H27`})]})),` Critical chain`]}),(0,q.jsxs)(`li`,{children:[n((0,q.jsx)(`line`,{className:`gantt-today`,x1:`14`,x2:`14`,y1:`0`,y2:`14`})),` Today`]})]})}function fI({list:e,by:t}){return e.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.map((e,n)=>(0,q.jsxs)(`li`,{children:[e.kind===`checks`?`Since ${e.estimated?`about `:``}${vg(e.start)}`:cI(e),t&&e.by&&(0,q.jsxs)(q.Fragment,{children:[` `,`by `,(0,q.jsx)(UT,{id:e.by})]}),e.estimated&&(0,q.jsx)(`span`,{className:`field`,children:` (estimated)`})]},n))}):(0,q.jsx)(`span`,{className:`note`,children:`None`})}function pI({g:e}){let{byId:t}=J();return(0,q.jsx)(nE,{label:`Every bar and arrow`,caption:`Every bar and waits-on arrow in the blocker timeline`,columns:[{header:`Item`,label:`Item`,rowHeader:!0,cell:e=>(0,q.jsx)(UT,{id:e.id,withTitle:!0})},{header:`Status`,label:`Status`,cell:e=>{let n=t.get(e.id);return`${n.status??Ig[n.statusCategory]}${e.points===null?``:`, ${tI(e.points,`point`)}`}`}},{header:`In progress`,label:`In progress`,cell:e=>(0,q.jsx)(fI,{list:e.segments.filter(e=>e.kind===`progress`)})},{header:`Blocked`,label:`Blocked`,cell:e=>(0,q.jsx)(fI,{list:e.blocked,by:!0})},{header:`Checks failing`,label:`Checks failing`,cell:e=>(0,q.jsx)(fI,{list:e.checks})},{header:`Waits on`,label:`Waits on`,cell:t=>{let n=e.arrows.filter(e=>e.to===t.id);return n.length?(0,q.jsx)(`ul`,{className:`plain`,children:n.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{id:e.from}),e.live?``:`, done`,e.onChain?`, critical chain`:``]},e.from))}):(0,q.jsx)(`span`,{className:`note`,children:`Nothing`})}},{header:`Critical chain`,label:`Critical chain`,cell:e=>e.onChain?`Yes`:`No`},{header:`Ready to start`,label:`Ready to start`,cell:e=>e.ready?tv[e.ready]:(0,q.jsx)(`span`,{className:`note`,children:`Started`})}],rows:e.bars,rowKey:e=>e.id,wide:!0})}function mI({g:e}){let t=e.chain;return t?(0,q.jsxs)(`p`,{className:`gantt-chain`,children:[(0,q.jsx)(`strong`,{children:`Critical chain:`}),` `,t.ids.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&` blocks `,(0,q.jsx)(UT,{id:e})]},e)),`, `,t.byCount?`${tI(t.ids.length,`item`)} (no item on a chain has points, so the longest)`:`${tI(t.points,`point`)} in ${tI(t.ids.length,`item`)}`,`.`]}):null}function hI(){let e=nI();return e.bars.length?(0,q.jsxs)(`div`,{className:`gantt-panel`,children:[(0,q.jsx)(mI,{g:e}),(0,q.jsx)(dI,{g:e}),(0,q.jsx)(`p`,{className:`note gantt-cue`,children:`Scroll the timeline sideways for the whole sprint, or read the table under it.`}),(0,q.jsx)(tE,{label:`The timeline drawing`,hint:`Scroll sideways for the whole sprint.`,className:`gantt-scroll`,children:(0,q.jsx)(uI,{g:e})}),(0,q.jsxs)(`p`,{className:`note`,children:[e.sprint?`The timeline is ${e.sprint}, ${vg(e.start)} to ${vg(e.end)}.`:`No current sprint, so the timeline spans the items’ own dates.`,` Blocked time is estimated: links carry no date in Jira, Azure DevOps or GitHub, so a block is drawn from when both items existed. Time in progress comes from each item’s transitions, and is estimated from its creation where none were recorded. Failing checks come from its open pull requests’ builds and checks.`]}),e.cycle&&(0,q.jsx)(`p`,{className:`failure`,children:`These blocks links form a loop, so the order of the rows is approximate.`}),(0,q.jsx)(`h3`,{children:`Every bar and arrow`}),(0,q.jsx)(pI,{g:e})]}):(0,q.jsx)(`p`,{className:`note`,children:`Nothing in this dossier blocks anything that is still open.`})}function gI(){let{dossier:e}=J(),t=nI(),n=(0,v.useMemo)(()=>{let e=QF(t),n=e.bars.slice(0,oI),r=new Set(n.map(e=>e.id));return{...e,bars:n,arrows:e.arrows.filter(e=>r.has(e.from)&&r.has(e.to))}},[t]);if(!n.bars.length)return(0,q.jsx)(`p`,{className:`note`,children:`Nothing open is blocked by anything open.`});let r=n.chain,i=r.ids.length-n.bars.length;return(0,q.jsxs)(`div`,{className:`gantt-compact`,children:[(0,q.jsx)(tE,{label:`The critical chain on the sprint's timeline`,hint:`Scroll sideways for the whole sprint.`,className:`gantt-scroll`,children:(0,q.jsx)(uI,{g:n,compact:!0})}),(0,q.jsxs)(`p`,{className:`note`,children:[`Critical chain: `,tI(r.ids.length,`item`),r.byCount?``:`, ${tI(r.points,`point`)}`,i>0?`; the first ${n.bars.length} shown`:``,`. `,(0,q.jsx)(`a`,{href:Eg(e.name),children:`Every blocker, and the table, on Dependencies`})]})]})}var _I=560,vI={left:34,right:12,top:14,bottom:26},yI=e=>Math.round(e*10)/10;function bI({caption:e,head:t,rows:n}){return(0,q.jsxs)(`details`,{className:`figures`,children:[(0,q.jsx)(`summary`,{children:`Show the figures`}),(0,q.jsx)(nE,{label:e,caption:e,rows:n.map((e,t)=>({i:t,cells:e})),rowKey:e=>String(e.i),columns:t.map((e,t)=>({header:e,label:e,rowHeader:t===0,cell:e=>e.cells[t]}))})]})}function xI({label:e,height:t,children:n}){let r=(0,v.useId)(),i=`chart-fill-${r.replace(/[^\w-]/g,``)}`;return(0,q.jsxs)(`svg`,{className:`chart`,viewBox:`0 0 ${_I} ${t}`,role:`img`,"aria-labelledby":r,preserveAspectRatio:`xMidYMid meet`,style:{"--chart-fill":`url(#${i})`},children:[(0,q.jsx)(`title`,{id:r,children:e}),(0,q.jsx)(`defs`,{children:(0,q.jsxs)(`linearGradient`,{id:i,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,q.jsx)(`stop`,{offset:`0`,className:`chart-stop chart-stop--top`}),(0,q.jsx)(`stop`,{offset:`1`,className:`chart-stop chart-stop--bottom`})]})}),n]})}var SI=e=>{let t=e<=5?1:e<=12?2:e<=30?5:10;return Array.from({length:Math.floor(e/t)+1},(e,n)=>n*t)};function CI({b:e,sprint:t}){let n=e.days.length+e.ahead,r=Math.max(1,...e.days.map(e=>e.scope)),i=e=>vI.left+(_I-vI.left-vI.right)*(e+1)/Math.max(1,n),a=e=>220-vI.bottom-(220-vI.top-vI.bottom)*e/r,o=vI.left,s=[`${o},${a(e.days[0]?.scope??0)}`,...e.days.map((e,t)=>`${i(t)},${a(e.scope)}`)].join(` `),c=[`${o},${a(0)}`,...e.days.map((e,t)=>`${i(t)},${a(e.done)}`)].join(` `),l=e.days.at(-1),u=`${c} ${i(e.days.length-1)},${a(0)} ${o},${a(0)}`,d=l?`${t} burn-up: ${l.done} of ${l.scope} points done after ${e.days.length} days, with ${e.ahead} days to go.${e.days[0]&&l.scope>e.days[0].scope?` Scope grew from ${e.days[0].scope} to ${l.scope} points.`:``}`:`${t} burn-up: no days yet.`;return(0,q.jsxs)(`figure`,{className:`chart-figure`,children:[(0,q.jsxs)(xI,{label:d,height:220,children:[SI(r).map(e=>(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`line`,{className:`grid`,x1:vI.left,x2:_I-vI.right,y1:a(e),y2:a(e)}),(0,q.jsx)(`text`,{className:`axis`,x:vI.left-6,y:a(e)+4,textAnchor:`end`,children:e})]},e)),(0,q.jsx)(`line`,{className:`today`,x1:i(e.days.length-1),x2:i(e.days.length-1),y1:vI.top,y2:220-vI.bottom}),(0,q.jsx)(`polygon`,{className:`area`,points:u}),(0,q.jsx)(`polyline`,{className:`line line--scope`,points:s,pathLength:1}),(0,q.jsx)(`polyline`,{className:`line line--done`,points:c,pathLength:1}),(0,q.jsx)(`text`,{className:`axis`,x:o,y:212,children:`Start`}),(0,q.jsx)(`text`,{className:`axis`,x:i(e.days.length-1),y:212,textAnchor:`middle`,children:`Today`}),(0,q.jsx)(`text`,{className:`axis`,x:_I-vI.right,y:212,textAnchor:`end`,children:`End`})]}),(0,q.jsxs)(`figcaption`,{className:`legend`,children:[(0,q.jsx)(`span`,{className:`key-swatch key-swatch--done`,"aria-hidden":`true`}),` Done points `,(0,q.jsx)(`span`,{className:`key-swatch key-swatch--scope`,"aria-hidden":`true`}),` Scope`,e.unplaced.length>0&&(0,q.jsxs)(`span`,{className:`note`,children:[` `,e.unplaced.length,` done items have no recorded finish and aren't drawn.`]})]}),(0,q.jsx)(bI,{caption:`${t} burn-up by day`,head:[`Day`,`Scope (points)`,`Done (points)`],rows:e.days.map(e=>[vg(e.at),e.scope,e.done])})]})}function wI({weeks:e,noun:t=`items finished`}){let n=Math.max(1,...e.map(e=>e.items.length)),r=(_I-vI.left-vI.right)/e.length,i=Math.min(48,r*.6),a=e=>74-56*e/n,o=`Throughput: ${e.reduce((e,t)=>e+t.items.length,0)} ${t} in ${e.length} weeks, ${e.map(e=>e.items.length).join(`, `)} by week, oldest first. The last week is still running.`;return(0,q.jsxs)(`figure`,{className:`chart-figure`,children:[(0,q.jsxs)(xI,{label:o,height:96,children:[(0,q.jsx)(`line`,{className:`grid`,x1:vI.left,x2:_I-vI.right,y1:a(0),y2:a(0)}),e.map((e,t)=>{let n=vI.left+r*t+r/2;return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`rect`,{className:`bar${e.partial?` bar--partial`:``}`,x:n-i/2,y:a(e.items.length),width:i,height:Math.max(0,a(0)-a(e.items.length)),rx:3}),(0,q.jsx)(`text`,{className:`axis axis--value`,x:n,y:a(e.items.length)-5,textAnchor:`middle`,children:e.items.length}),(0,q.jsx)(`text`,{className:`axis`,x:n,y:90,textAnchor:`middle`,children:vg(e.start).replace(/ \d{4}$/,``)})]},e.start)})]}),(0,q.jsx)(bI,{caption:`${t[0].toUpperCase()}${t.slice(1)} per week`,head:[`Week of`,t===`items finished`?`Finished`:`Count`],rows:e.map(e=>[`${vg(e.start)}${e.partial?` (so far)`:``}`,e.items.length])})]})}function TI({points:e,p85:t}){let n=e.map(e=>Date.parse(e.end)),r=Math.min(...n),i=Math.max(...n),a=Math.max(1,i-r),o=Math.max(1,...e.map(e=>e.days),t??0),s=e=>vI.left+10+(_I-vI.left-vI.right-20)*(e-r)/a,c=e=>200-vI.bottom-(200-vI.top-vI.bottom)*e/(o*1.1),l=`Cycle time: ${e.length} finished items, from ${yI(Math.min(...e.map(e=>e.days)))} to ${yI(o)} days.${t===null?``:` 85% finished within ${yI(t)} days.`}`;return(0,q.jsxs)(`figure`,{className:`chart-figure`,children:[(0,q.jsxs)(xI,{label:l,height:200,children:[SI(Math.ceil(o)).map(e=>(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`line`,{className:`grid`,x1:vI.left,x2:_I-vI.right,y1:c(e),y2:c(e)}),(0,q.jsx)(`text`,{className:`axis`,x:vI.left-6,y:c(e)+4,textAnchor:`end`,children:e})]},e)),t!==null&&(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`line`,{className:`p85`,x1:vI.left,x2:_I-vI.right,y1:c(t),y2:c(t)}),(0,q.jsxs)(`text`,{className:`axis axis--p85`,x:_I-vI.right,y:c(t)-5,textAnchor:`end`,children:[`85% within `,yI(t),` days`]})]}),e.map(e=>(0,q.jsx)(`circle`,{className:`dot`,cx:s(Date.parse(e.end)),cy:c(e.days),r:6},e.id)),(0,q.jsx)(`text`,{className:`axis`,x:vI.left,y:192,children:vg(new Date(r).toISOString())}),(0,q.jsx)(`text`,{className:`axis`,x:_I-vI.right,y:192,textAnchor:`end`,children:vg(new Date(i).toISOString())})]}),(0,q.jsx)(bI,{caption:`Cycle time per finished item`,head:[`Item`,`Finished`,`Cycle time`],rows:e.map(e=>[e.label,vg(e.end),`${yI(e.days)} days`])})]})}function EI({days:e}){let t=e.reduce((e,t)=>e+t.calls,0),n=e.reduce((e,t)=>!e||t.calls>e.calls?t:e,null),r=`Calls per day: ${t} calls in ${e.length} days${n&&n.calls>0?`, the most on ${vg(n.day)} with ${n.calls}`:``}.`;return(0,q.jsx)(OI,{days:e,value:e=>e.calls,label:r,max:String,figures:(0,q.jsx)(bI,{caption:`Calls per day, UTC`,head:[`Day`,`Calls`,`Failed`],rows:e.map(e=>[vg(e.day),e.calls,e.failed])})})}function DI({days:e,compact:t}){let n=e.reduce((e,t)=>e+t.tokens,0),r=e.reduce((e,t)=>!e||t.tokens>e.tokens?t:e,null),i=`Tokens per day: ${t(n)} tokens in ${e.length} days${r&&r.tokens>0?`, the most on ${vg(r.day)} with ${t(r.tokens)}`:``}.`;return(0,q.jsx)(OI,{days:e,value:e=>e.tokens,label:i,max:t,figures:(0,q.jsx)(bI,{caption:`Tokens per day, UTC`,head:[`Day`,`Tokens`],rows:e.map(e=>[vg(e.day),e.tokens.toLocaleString(`en-US`)])})})}function OI({days:e,value:t,label:n,max:r,figures:i}){let a=Math.max(1,...e.map(t)),o=(_I-vI.left-vI.right)/Math.max(1,e.length),s=Math.max(2,Math.min(32,o*.7)),c=e=>88-70*e/a,l=Math.max(1,Math.ceil(e.length/6));return(0,q.jsxs)(`figure`,{className:`chart-figure`,children:[(0,q.jsxs)(xI,{label:n,height:110,children:[(0,q.jsx)(`line`,{className:`grid`,x1:vI.left,x2:_I-vI.right,y1:c(0),y2:c(0)}),(0,q.jsx)(`text`,{className:`axis`,x:vI.left-6,y:c(a)+4,textAnchor:`end`,children:r(a)}),e.map((n,r)=>{let i=vI.left+o*r+o/2;return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`rect`,{className:`bar`,x:i-s/2,y:c(t(n)),width:s,height:Math.max(0,c(0)-c(t(n))),rx:2}),(r%l===0||r===e.length-1)&&(0,q.jsx)(`text`,{className:`axis${r!==e.length-1&&r/l%2==1?` axis--minor`:``}`,x:i,y:106,textAnchor:`middle`,children:vg(n.day).replace(/ \d{4}$/,``)})]},n.day)})]}),i]})}function kI({values:e,kind:t=`line`,against:n,mark:r}){let i=[...e,...n??[],r??0],a=Math.max(1,...i),o=e=>30-28*e/a,s=(e,t)=>t<=1?60:120*e/(t-1),c=e=>e.map((t,n)=>`${s(n,e.length).toFixed(1)},${o(t).toFixed(1)}`).join(` `),l=120/Math.max(1,e.length);return(0,q.jsxs)(`svg`,{className:`spark spark--${t}`,viewBox:`0 0 120 32`,preserveAspectRatio:`none`,"aria-hidden":`true`,focusable:`false`,children:[r!=null&&(0,q.jsx)(`line`,{className:`spark__mark`,x1:0,x2:120,y1:o(r),y2:o(r)}),n&&n.length>0&&(0,q.jsx)(`polyline`,{className:`spark__against`,points:c(n)}),t===`bars`?e.map((e,t)=>(0,q.jsx)(`rect`,{className:`spark__bar`,x:l*t+l*.15,y:o(e),width:l*.7,height:Math.max(1,30-o(e)),rx:1},t)):e.length>0&&(0,q.jsx)(`polyline`,{className:`spark__line`,points:c(e)})]})}var AI=864e5,jI=e=>e.estimate?.unit===`points`?e.estimate.value:0;function MI(e,t){let n=Date.parse(e.sprint.start),r=Date.parse(e.sprint.end),i=Math.min(Date.parse(t),r),a=[],o=e.items.filter(e=>e.statusCategory===`DONE`&&jI(e)>0&&!Nh(e)).map(e=>e.id);for(let t=Math.floor(n/AI)*AI+AI-1;t-AI+1<=i;t+=AI){let n=new Date(Math.min(t,i)).toISOString(),r=0,o=0;for(let t of e.items){let i=e.entries.get(t.id);(i.kind!==`added`||i.at!==null&&i.at<=n)&&(r+=jI(t));let a=t.statusCategory===`DONE`?Nh(t):null;a&&a<=n&&(o+=jI(t))}a.push({at:n,scope:r,done:o})}let s=Date.parse(a.at(-1)?.at??new Date(i).toISOString());return{days:a,ahead:Math.max(0,Math.ceil((r-s)/AI)),unplaced:o}}var NI={blockers:100,builds:90,scope:80,review:70,aging:60,readiness:50},PI=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,FI=e=>[...new Set(e)],II=e=>Math.round(e*10)/10;function LI(e,t){return{kind:e,...t,tickets:t.tickets.slice(0,3),weight:NI[e]+Math.min(t.count,9)}}function RI(e){let t=FF(e);if(!t.size)return null;let n=FI([...t.values()].flat()),r=LF(t),[i,a]=r[0],o=IF(t,i).size;return LI(`blockers`,{title:`${PI(n.length,`item`)} blocked`,detail:r.slice(0,2).map(([e,t])=>`[[${e}]] blocks ${t.map(e=>`[[${e}]]`).join(`, `)}`).join(`; `).concat(r.length>2?`; and ${PI(r.length-2,`more blocker`)}.`:`.`),tickets:FI([i,...a,...r.slice(1).flatMap(([e,t])=>[e,...t])]),count:FI([...t.keys(),...n]).length,action:`Unblock [[${i}]] first: ${PI(o,`item`)} ${o===1?`waits`:`wait`} on it${o>a.length?`, directly or down a chain`:``}.`,evidence:`the items' blocks links`,tab:`dependencies`})}function zI(e){let t=e.items.filter(t=>sg(t,e).some(e=>e.code===`failing-build`)).map(e=>e.id);return t.length?LI(`builds`,{title:`${PI(t.length,`build`)} failing`,detail:`The latest build for ${t.slice(0,3).map(e=>`[[${e}]]`).join(`, `)}${t.length>3?` and ${t.length-3} more`:``} failed.`,tickets:t,count:t.length,action:`Fix the failing build on [[${t[0]}]].`,evidence:`each item's latest build`,tab:`board`}):null}function BI(e){if(!e||e.remaining.points<=0)return null;let t=Math.max(0,e.days.total-e.days.gone),n=e.days.gone>0?e.done.points/e.days.gone:0;if(e.days.gone===0||n*t>=e.remaining.points)return null;let r=e.items.filter(e=>e.statusCategory===`TODO`).sort((e,t)=>(t.estimate?.value??0)-(e.estimate?.value??0));return LI(`scope`,{title:`${PI(e.remaining.points,`point`)} left, ${PI(t,`day`)} to go`,detail:`At ${II(n)} points a day so far, ${e.sprint.name} finishes about ${II(n*t)} of the ${e.remaining.points} points left.${r.length?` Not started: ${r.slice(0,3).map(e=>`[[${e.id}]]`).join(`, `)}.`:``}`,tickets:r.map(e=>e.id),count:r.length,action:r.length?`Re-plan ${e.sprint.name}: agree what to drop, starting with [[${r[0].id}]].`:`Re-plan ${e.sprint.name}: the work in progress won't all finish at this pace.`,evidence:`${e.sprint.name}'s points done and left, over its working days`,tab:`board`})}function VI(e,t,n){let r=h_(e,t.byId,n).filter(e=>e.wait.on===`review`&&(e.wait.days??0)>=2||e.flags.some(e=>e.flag===`failing-checks`));if(!r.length)return null;let i=r[0];return LI(`review`,{title:`${PI(r.length,`pull request`)} waiting`,detail:r.slice(0,2).map(e=>`[[${e.change.id}]] waits on ${e.wait.on===`review`?`review`:`its checks`}${e.wait.days===null?``:` after ${o_(e.wait.days)}`}`).join(`; `).concat(r.length>2?`; and ${r.length-2} more.`:`.`),tickets:r.map(e=>e.change.id),count:r.length,action:`Get [[${i.change.id}]] ${i.wait.on===`review`?`reviewed`:`its checks passing`}: it has waited ${i.wait.days===null?`longest`:o_(i.wait.days)}.`,evidence:`each open pull request's reviews and checks, against 2 working days`,tab:`prs`})}function HI(e){let t=e.items.flatMap(t=>{let n=sg(t,e),r=n.find(e=>e.code===`aging`)??n.find(e=>e.code===`stale`);return r?[{id:t.id,aging:r.code===`aging`,days:e.ages.get(t.id)??0}]:[]});if(!t.length)return null;t.sort((e,t)=>Number(t.aging)-Number(e.aging)||t.days-e.days);let n=t.filter(e=>e.aging),r=t.filter(e=>!e.aging),i=t[0],a=e=>`${e.slice(0,3).map(e=>`[[${e.id}]]`).join(`, `)}${e.length>3?` and ${e.length-3} more`:``}`,o=[n.length&&e.p85?`${a(n)} ${n.length===1?`has`:`have`} been in progress longer than 85% of finished items took (${PI(II(e.p85.days),`day`)})`:``,r.length?`${a(r)} had no update for over ${PI(5,`day`)}`:``].filter(Boolean);return LI(`aging`,{title:[n.length?`${PI(n.length,`item`)} aging`:``,r.length?`${n.length?r.length:PI(r.length,`item`)} gone quiet`:``].filter(Boolean).join(`, `),detail:`${o.join(`; `)}.`,tickets:t.map(e=>e.id),count:t.length,action:i.aging?`Check in on [[${i.id}]]: in progress ${II(i.days)} days, longer than most work takes here.`:`Check in on [[${i.id}]]: it has had no update for over ${PI(5,`day`)}.`,evidence:n.length?`history.transitions, against the dossier's cycle times`:`each item's last update`,tab:`board`})}function UI(e){let t=(e.health?.items??e.items).filter(e=>e.statusCategory===`TODO`&&jh(e)).map(t=>Bv({item:t,settings:e.readiness,byId:e.prepared.byId})).filter(e=>e.verdict!==`ready`);if(!t.length)return null;let n=t.filter(e=>e.verdict===`blocked`),r=n[0]??t[0];return LI(`readiness`,{title:`${PI(t.length,`item`)} not ready to start`,detail:`${t.slice(0,3).map(e=>`[[${e.id}]] (${e.why[0]?.label.toLowerCase()??e.verdict})`).join(`, `)}${t.length>3?` and ${t.length-3} more`:``}.`,tickets:[...n,...t.filter(e=>e.verdict!==`blocked`)].map(e=>e.id),count:t.length,action:`Firm up [[${r.id}]] before anyone picks it up: ${r.why[0]?.reason??`it isn't ready`}.`,evidence:`the readiness gate's checks, on the cached records`,tab:`board`})}function WI(e){let{prepared:t}=e,n=[RI(t),zI(t),BI(e.health),VI(e.pullRequests,t,e.now),HI(t),UI(e)].filter(e=>e!==null);n.sort((e,t)=>t.weight-e.weight);let r=n.slice(0,3),i=e.pullRequests.filter(e=>e.state===`OPEN`||e.state===`DRAFT`).length,a=`Worked out by code, with no agent call, from ${PI(e.items.length,`work item`)} (their blockers, builds, ages and readiness), ${PI(i,`open pull request`)}${e.health?` and ${e.health.sprint.name}'s pace`:``}.`;return{headline:r[0]?.action??`Keep going: nothing is blocked, failing, waiting on review or aging, and the work not started is ready.`,issues:r,derivedFrom:a}}var GI=e=>Math.round(e*10)/10,KI=e=>`${GI(e)} ${GI(e)===1?`day`:`days`}`;function qI({list:e,what:t}){return e.length?(0,q.jsxs)(`div`,{className:`unknowns`,children:[(0,q.jsxs)(`p`,{className:`note`,children:[e.length,` `,e.length===1?`item has`:`items have`,` no `,t,` the data can show:`]}),(0,q.jsx)(`ul`,{className:`plain`,children:e.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{id:e.id}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`Unknown: `,e.reason,`.`]})]},e.id))})]}):null}function JI(){let{now:e,dossier:t,sync:n}=J(),{health:r}=fg(),i=rC();return r?(0,q.jsx)(CI,{b:MI(r,e),sprint:r.sprint.name}):(0,q.jsx)(wj,{message:i(`empty.burnup`),action:(0,q.jsx)(Oj,{dossier:t.name,sync:n})})}function YI(){let{dossier:e,now:t}=J(),n=Bh(e.items,t),r=n.weeks.reduce((e,t)=>e+t.items.length,0),i=n.weeks.filter(e=>!e.partial),a=i.length?i.reduce((e,t)=>e+t.items.length,0)/i.length:0;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`big-figure`,children:[(0,q.jsx)(`span`,{className:`big-number`,children:GI(a)}),` items a week`,(0,q.jsxs)(`span`,{className:`note`,children:[` over the last `,i.length,` full weeks; `,r,` finished in `,n.weeks.length,` weeks.`]})]}),(0,q.jsx)(wI,{weeks:n.weeks}),(0,q.jsx)(`p`,{className:`note`,children:`Counted in the week of each item's last move into Done, from its history.`}),(0,q.jsx)(qI,{list:n.unknown,what:`finish date`})]})}function XI(){let{dossier:e,byId:t}=J(),{insights:n}=fg(),r=Fh(e.items),i=r.known.map(e=>{let n=t.get(e.id);return{id:e.id,label:`${mg(n.source.area)} ${hg(n)}`,end:e.end,days:e.days}});return(0,q.jsxs)(q.Fragment,{children:[i.length?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`big-figure`,children:[n.p85?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`big-number`,children:GI(n.p85.days)}),` days for `,85,`% of items`]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`big-number`,children:i.length}),` `,i.length===1?`item`:`items`,` timed`]}),(0,q.jsx)(`span`,{className:`note`,children:` From the first move into In progress to the last into Done.`})]}),(0,q.jsx)(TI,{points:i,p85:n.p85?.days??null}),!n.p85&&(0,q.jsxs)(`p`,{className:`note`,children:[`Fewer than `,3,` cycle times, so no percentile yet, and nothing is flagged as aging.`]})]}):(0,q.jsx)(`p`,{children:`No finished item here has a cycle time the data can show.`}),(0,q.jsx)(qI,{list:r.unknown,what:`cycle time`})]})}function ZI(){let{dossier:e,now:t,byId:n}=J(),{insights:r}=fg(),i=Rh(e.items,t),a=Math.max(1,...i.known.map(e=>e.days),r.p85?.days??0);return(0,q.jsxs)(q.Fragment,{children:[i.known.length?(0,q.jsx)(`ul`,{className:`aging`,children:i.known.map(e=>{let t=n.get(e.id),i=r.p85!==null&&e.days>r.p85.days;return(0,q.jsxs)(`li`,{className:i?`aging--over`:void 0,children:[(0,q.jsxs)(`div`,{className:`aging-row`,children:[(0,q.jsx)(UT,{id:e.id,withTitle:!0}),(0,q.jsxs)(`span`,{className:`aging-days`,children:[KI(e.days),i&&(0,q.jsxs)(`span`,{className:`flag`,children:[` past p`,85]})]})]}),(0,q.jsxs)(`div`,{className:`aging-bar`,"aria-hidden":`true`,children:[(0,q.jsx)(`span`,{style:{width:`${100*e.days/a}%`}}),r.p85&&(0,q.jsx)(`i`,{style:{left:`${100*r.p85.days/a}%`}})]}),(0,q.jsxs)(`p`,{className:`evidence`,children:[(0,q.jsx)(Pj,{person:t.assignee}),` `,t.status,`, in progress since `,Y(e.since),`. Source: `,(0,q.jsx)(`code`,{children:`history.transitions`})]})]},e.id)})}):(0,q.jsx)(`p`,{children:`Nothing in progress has a recorded start.`}),r.p85&&(0,q.jsxs)(`p`,{className:`note`,children:[`The marker on each bar is p`,85,` of this dossier's cycle times, `,KI(r.p85.days),`.`]}),(0,q.jsx)(qI,{list:i.unknown,what:`start`})]})}var QI=e=>`${e} ${e===1?`point`:`points`}`;function $I({h:e}){let t=nC(),n=e.done.points+e.remaining.points,r=t=>e.items.filter(n=>e.entries.get(n.id)?.kind===t);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`note`,children:[vg(e.sprint.start),` to `,vg(e.sprint.end),`, working days only.`]}),(0,q.jsxs)(`ul`,{className:`stats`,"aria-label":`Sprint figures`,children:[(0,q.jsx)(eL,{label:t(`pointsDone`,`Done`),value:`${e.done.points} of ${n}`,note:`points, ${e.done.count} items`}),(0,q.jsx)(eL,{label:`Planned`,value:String(e.planned.points),note:`points, ${e.planned.count} items`}),(0,q.jsx)(eL,{label:`Added mid-sprint`,value:String(e.added.points),note:`points, ${e.added.count} items`}),(0,q.jsx)(eL,{label:`Carried over`,value:String(e.carried.points),note:`points, ${e.carried.count} items`})]}),(0,q.jsx)(`div`,{className:`meter`,role:`img`,"aria-label":`${e.done.points} of ${n} points done`,children:(0,q.jsx)(`span`,{style:{width:`${n?100*e.done.points/n:0}%`}})}),(0,q.jsx)(JI,{}),e.otherUnits.length>0&&(0,q.jsxs)(`p`,{className:`note`,children:[`Points totals leave out items estimated in other units:`,` `,e.otherUnits.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`, `,(0,q.jsx)(UT,{id:e})]},e)),`.`]}),(0,q.jsx)(`h3`,{children:`At risk`}),e.risks.length?(0,q.jsx)(`ul`,{className:`rows`,children:e.risks.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{id:e.id,withTitle:!0}),(0,q.jsx)(`ul`,{className:`reasons`,children:e.reasons.map((e,t)=>(0,q.jsx)(`li`,{children:(0,q.jsx)(GT,{text:ng(e)})},t))})]},e.id))}):(0,q.jsx)(`p`,{children:`Nothing.`}),[`added`,`carried`].map(t=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h3`,{children:t===`added`?`Added after the sprint started`:`Carried over`}),r(t).length?(0,q.jsx)(`ul`,{className:`rows`,children:r(t).map(t=>{let n=e.entries.get(t.id);return(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{id:t.id,withTitle:!0}),(0,q.jsxs)(`p`,{className:`evidence`,children:[n.from?`From ${n.from}`:`Added`,n.at?` on ${Y(n.at)}`:``,`, `,QI(t.estimate?.unit===`points`?t.estimate.value:0),t.estimate?``:` (no estimate)`,`. Source: `,(0,q.jsx)(`code`,{children:n.evidence})]})]},t.id)})}):(0,q.jsx)(`p`,{children:`None.`})]},t))]})}function eL({label:e,value:t,note:n}){return(0,q.jsxs)(`li`,{className:`stat`,children:[(0,q.jsx)(`span`,{className:`stat-label`,children:e}),(0,q.jsx)(`span`,{className:`stat-value`,children:t}),(0,q.jsx)(`span`,{className:`stat-note`,children:n})]})}var tL=e=>Math.round(e*10)/10,nL={board:`Board`,dependencies:`Dependencies`,prs:`Pull requests`};function rL(){let{dossier:e,now:t}=J(),{health:n,insights:r}=fg(),i=(0,v.useMemo)(()=>WI({items:e.items,pullRequests:e.pullRequests??[],prepared:r,health:n,readiness:e.readiness,now:t}),[e,t,n,r]),a=oj()?.history.list?.[0]??null,o=a?a.at>=t||a.at.slice(0,10)===t.slice(0,10):!1,s=a?.recommendation&&o?a:null;return(0,q.jsxs)(`div`,{className:`overview`,children:[(0,q.jsxs)(Q,{as:`section`,className:`panel overview-rec`,"aria-labelledby":`rec-title`,"data-rec-source":s?`analysis`:`code`,children:[(0,q.jsxs)(`div`,{className:`overview-head`,children:[(0,q.jsxs)(`h2`,{id:`rec-title`,className:`overview-label`,children:[`Recommendation `,(0,q.jsx)(Iw,{topic:`recommendation`})]}),(0,q.jsx)(`p`,{className:`note overview-rec__how`,children:s?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`overview-rec__source`,children:`From the latest Analyze`}),`, `,(0,q.jsx)(`time`,{dateTime:s.at,children:Y(s.at)}),`, by `,PO(s),`.`,` `,(0,q.jsx)(`a`,{href:Og(e.name,s.id),"data-rec-analysis":``,children:`Open the analysis`})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`overview-rec__source`,children:`Worked out by code`}),i.derivedFrom.replace(/^Worked out by code/,``),a?(0,q.jsxs)(q.Fragment,{children:[` `,`The latest Analyze, `,(0,q.jsx)(`time`,{dateTime:a.at,children:Y(a.at)}),`, `,o?`had no recommendation line`:`is older than the data`,`:`,` `,(0,q.jsx)(`a`,{href:Og(e.name,a.id),"data-rec-analysis":``,children:`open it`}),`.`]}):` No Analyze kept for this dossier yet.`]})})]}),(0,q.jsx)(`p`,{className:`overview-rec__headline${s?` overview-rec__headline--analysis`:``}`,children:s?(0,q.jsx)(GT,{text:s.recommendation,chips:!0}):(0,q.jsx)(GT,{text:i.headline})})]}),(0,q.jsxs)(`section`,{className:`overview-issues`,"aria-labelledby":`issues-title`,children:[(0,q.jsx)(`h2`,{id:`issues-title`,className:`overview-label`,children:`Key issues`}),i.issues.length?(0,q.jsx)(`ol`,{className:`issue-cards`,children:i.issues.map(e=>(0,q.jsx)(aL,{issue:e},e.kind))}):(0,q.jsx)(`p`,{className:`note`,children:`No issue stands out: nothing is blocked, failing, waiting on review or aging.`})]}),(0,q.jsx)(sL,{}),(0,q.jsx)(cL,{})]})}function iL(e,t){return t===`prs`?Sg(e):t===`dependencies`?Eg(e):Tg(e)}function aL({issue:e}){let{dossier:t}=J(),n=e.count-e.tickets.length;return(0,q.jsxs)(`li`,{className:`issue-card`,"data-card":``,children:[(0,q.jsx)(`h3`,{className:`issue-card__title issue-card__title--${e.kind}`,children:e.title}),(0,q.jsx)(`p`,{className:`issue-card__detail`,children:(0,q.jsx)(GT,{text:e.detail})}),(0,q.jsx)(`ul`,{className:`ticket-chips`,"aria-label":`Tickets: ${e.title}`,children:e.tickets.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(JT,{id:e})},e))}),(0,q.jsx)(`p`,{className:`issue-card__foot note`,children:(0,q.jsxs)(`a`,{href:iL(t.name,e.tab),children:[n>0?`${n} more on `:`Open `,nL[e.tab]]})})]})}function oL({id:e,label:t,value:n,unit:r,spark:i,title:a,children:o}){return(0,q.jsx)(`li`,{className:`metric`,children:(0,q.jsxs)(lf,{children:[(0,q.jsxs)(W,{className:`metric__button`,"data-metric":e,children:[(0,q.jsx)(`span`,{className:`metric__label`,children:t}),` `,(0,q.jsxs)(`span`,{className:`metric__figure`,children:[(0,q.jsx)(`span`,{className:`metric__value`,children:n}),` `,(0,q.jsx)(`span`,{className:`metric__unit`,children:r})]}),(0,q.jsx)(`span`,{className:`sr-only`,children:`, show the full chart`}),i]}),(0,q.jsx)(Of,{className:`feedback-overlay`,"data-backdrop":``,isDismissable:!0,children:(0,q.jsx)(Ef,{className:`feedback-modal chart-modal`,children:(0,q.jsx)(uf,{className:`feedback-dialog chart-dialog`,children:({close:e})=>(0,q.jsxs)(`div`,{className:`chart-dialog__body`,children:[(0,q.jsxs)(`div`,{className:`chart-dialog__head`,children:[(0,q.jsx)(ja,{slot:`title`,children:a}),(0,q.jsx)(W,{className:`btn btn--small`,onPress:e,"data-chart-close":``,children:`Close`})]}),o]})})})})]})})}function sL(){let{dossier:e,now:t,byId:n,sync:r}=J(),{health:i,insights:a}=fg(),o=rC(),{Panel:s}=ST(),{b:c,t:l,cycles:u,ages:d,queue:f}=(0,v.useMemo)(()=>({b:i?MI(i,t):null,t:Bh(e.items,t),cycles:Fh(e.items).known.sort((e,t)=>e.end<t.end?-1:1),ages:Rh(e.items,t).known,queue:h_(e.pullRequests??[],n,t).filter(e=>e.wait.on!==`draft`)}),[i,e,t,n]),p=c?.days.at(-1),m=l.weeks.filter(e=>!e.partial),h=m.length?m.reduce((e,t)=>e+t.items.length,0)/m.length:0,g=f.map(e=>e.wait.days??0),_=g.length?Math.max(...g):0;return(0,q.jsxs)(`section`,{className:`overview-metrics`,"aria-labelledby":`metrics-title`,children:[(0,q.jsx)(`h2`,{id:`metrics-title`,className:`sr-only`,children:`Metrics`}),(0,q.jsxs)(`ul`,{className:`metric-strip`,children:[(0,q.jsx)(oL,{id:`burnup`,label:`Burn-up`,value:p?`${p.done} of ${p.scope}`:`No sprint`,unit:p?`points`:``,spark:(0,q.jsx)(kI,{values:c?.days.map(e=>e.done)??[],against:c?.days.map(e=>e.scope)??[]}),title:i?`${i.sprint.name}: day ${i.days.gone} of ${i.days.total}`:`Sprint`,children:i?(0,q.jsx)(`div`,{className:`chart-dialog__sprint`,children:(0,q.jsx)(s,{id:`sprint`,children:(0,q.jsx)($I,{h:i})})}):(0,q.jsx)(wj,{message:o(`empty.sprint`),action:(0,q.jsx)(Oj,{dossier:e.name,sync:r})})}),(0,q.jsx)(oL,{id:`throughput`,label:`Throughput`,value:String(tL(h)),unit:`a week`,spark:(0,q.jsx)(kI,{kind:`bars`,values:l.weeks.map(e=>e.items.length)}),title:`Throughput`,children:(0,q.jsx)(YI,{})}),(0,q.jsx)(oL,{id:`cycle`,label:`Cycle time`,value:a.p85?`${tL(a.p85.days)}`:String(u.length),unit:a.p85?`days, 85% within`:u.length===1?`item timed`:`items timed`,spark:(0,q.jsx)(kI,{values:u.map(e=>e.days),mark:a.p85?.days??null}),title:`Cycle time`,children:(0,q.jsx)(XI,{})}),(0,q.jsxs)(oL,{id:`aging`,label:`Aging WIP`,value:String(d.length),unit:d.length?`in progress, oldest ${tL(d[0].days)} d`:`in progress`,spark:(0,q.jsx)(kI,{kind:`bars`,values:d.map(e=>e.days),mark:a.p85?.days??null}),title:`Aging work in progress`,children:[(0,q.jsx)(`p`,{className:`note`,children:o(`aging.note`)}),(0,q.jsx)(ZI,{})]}),(0,q.jsxs)(oL,{id:`pr-wait`,label:`PR wait`,value:f.length?String(tL(_)):`0`,unit:f.length?`working days, ${f.length} open`:`open`,spark:(0,q.jsx)(kI,{kind:`bars`,values:g}),title:`Pull requests waiting`,children:[f.length?(0,q.jsx)(`ul`,{className:`rows`,children:f.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(WT,{change:e.change,withTitle:!0}),(0,q.jsxs)(`p`,{className:`evidence`,children:[`Waits on `,s_[e.wait.on].toLowerCase(),e.wait.days===null?``:` for ${o_(e.wait.days)}`,`: `,e.wait.why,`.`]})]},e.change.id))}):(0,q.jsx)(`p`,{children:`No pull request is open, apart from drafts.`}),(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`a`,{href:Sg(e.name),children:`The Pull requests tab`}),` has the whole queue, its flags and its flow.`]})]})]})]})}function cL(){let{dossier:e}=J();return(0,q.jsxs)(`section`,{className:`overview-blockers`,"aria-labelledby":`blockers-title`,children:[(0,q.jsxs)(`div`,{className:`overview-head`,children:[(0,q.jsx)(`h2`,{id:`blockers-title`,className:`overview-label`,children:`Blockers`}),(0,q.jsx)(`a`,{className:`note`,href:Eg(e.name),children:`All dependencies`})]}),(0,q.jsx)(gI,{})]})}var lL=(0,v.lazy)(()=>Zm(()=>import(`./Graph-CS6dQALI.js`).then(e=>({default:e.Graph})),__vite__mapDeps([6,7]),import.meta.url)),uL=e=>e.slice(e.lastIndexOf(`#`));function dL({change:e}){let t=e.kind===`pull-request`?`${uL(e.id)} ${e.title}`:e.title;return e.url?(0,q.jsx)(`a`,{href:e.url,children:t}):(0,q.jsx)(`span`,{children:t})}function fL({ids:e}){return e.length?(0,q.jsx)(`span`,{className:`cites`,children:e.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`, `,(0,q.jsx)(UT,{id:e})]},e))}):(0,q.jsx)(`span`,{className:`note`,children:`No work item named`})}function pL(e){return[{header:`Work item`,label:`Work item`,rowHeader:!0,cell:e=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(UT,{id:e.item.id,withTitle:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,Lg(e.item)]})]})},{header:`Status`,label:`Status`,cell:e=>(0,q.jsxs)(q.Fragment,{children:[e.item.status,e.item.status?.toLowerCase()!==Ig[e.item.statusCategory].toLowerCase()&&(0,q.jsxs)(`span`,{className:`field`,children:[` (`,Ig[e.item.statusCategory],`)`]})]})},{header:`Pull requests`,label:`Pull requests`,cell:e=>e.changes.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.changes.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(dL,{change:e}),` `,(0,q.jsx)(Rj,{of:e})]},e.id))}):`None linked`},{header:`Builds`,label:`Builds`,cell:t=>t.changes.length?(0,q.jsx)(`ul`,{className:`plain`,children:t.changes.map(t=>{let n=e.filter(e=>e.builds===t.id).sort((e,t)=>e.at<t.at?1:-1)[0];return(0,q.jsx)(`li`,{children:n?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(dL,{change:n}),` `,(0,q.jsx)(Rj,{of:n})]}):(0,q.jsxs)(`span`,{className:`note`,children:[`No build for `,uL(t.id)]})},t.id)})}):`None`},{header:`Deployed to`,label:`Deployed to`,cell:e=>e.deployedTo.length?e.deployedTo.map(e=>e.environment).join(`, `):`Not deployed`},{header:`Check`,label:`Check`,cell:e=>e.flags.length?(0,q.jsx)(`ul`,{className:`plain flags`,children:e.flags.map(e=>(0,q.jsx)(`li`,{children:Bj[e]},e))}):`No gaps`}]}function mL(e){let{dossier:t,now:n}=J();return(0,v.useMemo)(()=>{if(!e)return null;let r=Y_({dossier:t.name,entries:t.people??[],wipLimit:t.wipLimit??null,items:t.items,changes:t.pullRequests??[],now:n}),i=Q_(r,e);return{name:i?.who.name??null,items:i?$_(r,e,t.items,t.people??[]):[]}},[e,t,n])}function hL({tab:e=`overview`,person:t,analysis:n}={}){let{health:r}=fg();return yL(r),e===`board`?(0,q.jsx)(gL,{...t?{person:t}:{}}):e===`dependencies`?(0,q.jsx)(_L,{}):e===`analyses`?(0,q.jsx)(jF,{...n?{open:n}:{}}):(0,q.jsx)(rL,{})}function gL({person:e}){let{dossier:t}=J(),n=mL(e),r=nC(),i=rC(),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1),{health:l,insights:u}=fg(),d=l?.items??t.items,f=lg(d,u),p=n?d.filter(e=>n.items.includes(e)):d,m=s?p.filter(e=>f.includes(e)):p,h=zj(d,t.changes,t.deployments),g=a?h.filter(e=>e.flags.length):h,_=t.changes.filter(e=>e.kind===`build`),y=[...t.calls.work,...t.calls.prs,...t.calls.builds,...t.calls.deployments];return(0,q.jsxs)(`div`,{className:`tab-panels`,children:[(0,q.jsxs)(hj,{id:`board`,title:r(`board`,l?`${l.sprint.name} board`:`Board`),calls:t.calls.work,alerts:!1,children:[n&&(0,q.jsx)(vL,{name:n.name,shown:p.length,all:n.items.length}),(0,q.jsxs)(`div`,{className:`board-tools`,children:[(0,q.jsxs)(Eo,{className:`check`,isSelected:s,onChange:c,"data-attention-only":``,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:s?`✓`:``}),`Needs attention only (`,f.length,`)`]}),(0,q.jsxs)(`p`,{className:`note`,children:[`A flagged card needs action now or a look: it is blocked, its build fails, it is aging or stale, and the like. `,(0,q.jsx)(Iw,{topic:`insights`})]})]}),(0,q.jsx)(AF,{items:m})]}),(0,q.jsxs)(hj,{id:`trace`,title:`Stories, pull requests, builds and deployments`,calls:y,alerts:!1,children:[(0,q.jsx)(`p`,{className:`note`,children:i(`trace.note`)}),(0,q.jsxs)(Eo,{className:`check`,isSelected:a,onChange:o,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:a?`✓`:``}),`Only items with something to check`]}),(0,q.jsx)(nE,{className:`trace`,label:`Work items and their delivery`,wide:!0,rows:g,rowKey:e=>e.item.id,columns:pL(_)})]}),(0,q.jsxs)(`div`,{className:`panel-grid`,children:[(0,q.jsx)(hj,{id:`builds`,title:r(`builds`,`Builds`),calls:t.calls.builds,children:_.length?(0,q.jsx)(`ul`,{className:`rows`,children:_.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(dL,{change:e}),` `,(0,q.jsx)(Rj,{of:e}),(0,q.jsxs)(`p`,{className:`evidence`,children:[`For pull request `,e.builds?uL(e.builds):`none`,`, `,Y(e.at),`.`]})]},e.id))}):(0,q.jsx)(wj,{message:i(`empty.builds`),action:(0,q.jsx)(Tj,{edit:!0,href:Mg(t.name,`sources`),children:`Link a pipeline`}),help:`dossier-setup`})}),(0,q.jsx)(hj,{id:`deployments`,title:`Deployments`,calls:t.calls.deployments,children:t.deployments.length?(0,q.jsx)(`ul`,{className:`rows`,children:t.deployments.map(e=>(0,q.jsx)(bL,{d:e},e.id))}):(0,q.jsx)(wj,{message:i(`empty.deployments`),action:(0,q.jsx)(Tj,{edit:!0,href:Mg(t.name,`sources`),children:`Add an environment`}),help:`dossier-setup`})})]})]})}function _L(){let{dossier:e}=J(),t=nC(),n=rC();return(0,q.jsxs)(`div`,{className:`tab-panels`,children:[(0,q.jsx)(hj,{id:`gantt`,title:`Blocker timeline`,calls:[...e.calls.work,...e.calls.prs,...e.calls.builds],alerts:!1,children:(0,q.jsx)(hI,{})}),(0,q.jsx)(hj,{id:`graph`,title:t(`dependencies`,`Dependencies`),calls:e.calls.work,alerts:!1,children:(0,q.jsx)(v.Suspense,{fallback:(0,q.jsx)(FA,{size:`panel`,message:n(`loading.graph`)}),children:(0,q.jsx)(lL,{})})})]})}function vL({name:e,shown:t,all:n}){let{dossier:r}=J(),i=(0,v.useRef)(null);(0,v.useEffect)(()=>{(i.current?.closest(`section`)??i.current)?.scrollIntoView?.({block:`start`})},[]);let a=e=>`${e} ${e===1?`item`:`items`}`;return(0,q.jsxs)(`p`,{id:`board-filter`,ref:i,className:`board-filter`,tabIndex:-1,children:[e===null?(0,q.jsx)(q.Fragment,{children:`The People view's link named nobody this dossier's data shows, so no items are shown. `}):(0,q.jsxs)(q.Fragment,{children:[`Showing `,e,`'s items: `,a(t),` on this board`,n>t?`, of ${a(n)} assigned to them in all`:``,`.`,` `]}),(0,q.jsx)(`a`,{href:Tg(r.name),children:`Show everyone's`}),` · `,(0,q.jsx)(`a`,{href:Cg(r.name),children:`Back to People`})]})}function yL(e){let t=e&&e.days.total>1?Math.min(1,Math.max(0,(e.days.gone-1)/(e.days.total-1))):null;(0,v.useEffect)(()=>{if(t===null)return;let e=document.documentElement;return e.style.setProperty(`--sprint-progress`,t.toFixed(3)),()=>{e.style.removeProperty(`--sprint-progress`)}},[t])}function bL({d:e}){let t=e.url?(0,q.jsx)(`a`,{href:e.url,children:e.name}):(0,q.jsx)(`span`,{children:e.name});return(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`h3`,{className:`env`,children:e.environment}),(0,q.jsxs)(`p`,{children:[t,` `,(0,q.jsx)(`span`,{className:`outcome outcome--${e.outcome}`,children:e.state})]}),(0,q.jsxs)(`p`,{className:`evidence`,children:[e.version?`${e.version}, `:``,`commit `,(0,q.jsx)(`code`,{children:e.commit}),`.`,` `,e.unknownCommit?(0,q.jsx)(`span`,{className:`failure`,children:`No listed pull request merged as this commit.`}):(0,q.jsxs)(q.Fragment,{children:[`Includes `,e.includes.length,` merged pull `,e.includes.length===1?`request`:`requests`,e.items.length?(0,q.jsxs)(q.Fragment,{children:[`, for `,(0,q.jsx)(fL,{ids:e.items})]}):`, none for this sprint`,`.`]})]})]})}var xL=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function SL({sources:e,dossier:t}){let n=t?(0,q.jsx)(Bw,{href:Mg(t,`sources`),label:`Edit ${t}'s sources`}):null;return e.length?(0,q.jsxs)(`div`,{className:`source-badges`,children:[(0,q.jsx)(`ul`,{className:`badges`,"aria-label":`Sources`,children:e.map(e=>(0,q.jsxs)(`li`,{className:`badge`,title:e.connection?`${mg(e.area)}, connection ${e.connection}`:`${mg(e.area)}, your default connection`,children:[mg(e.area),e.connection&&(0,q.jsxs)(`span`,{className:`sr-only`,children:[`, connection `,e.connection]})]},e.area))}),n]}):(0,q.jsxs)(`p`,{className:`note`,children:[`No sources linked yet. `,n]})}function CL({preview:e,sprint:t=!0}){let n=e.sprint;return(0,q.jsxs)(`ul`,{className:`count-strip`,"aria-label":`Counts`,children:[t&&n&&(0,q.jsx)(wL,{value:String(n.daysLeft),label:`${n.daysLeft===1?`day`:`days`} left`}),(0,q.jsx)(wL,{value:String(e.inProgress),label:`in progress`}),(0,q.jsx)(wL,{value:String(e.blocked),label:`blocked`,tone:e.blocked?`warn`:void 0}),(0,q.jsx)(wL,{value:String(e.awaitingReview),label:e.awaitingReview===1?`PR waits on review`:`PRs wait on review`})]})}function wL({value:e,label:t,tone:n}){return(0,q.jsxs)(`li`,{className:`count${n?` count--${n}`:``}`,children:[(0,q.jsx)(`span`,{className:`count__value`,children:e}),` `,(0,q.jsx)(`span`,{className:`count__label`,children:t})]})}function TL({sprint:e}){let t=e.burn,n=Math.max(1,...t.map(e=>e.scope)),r=Math.max(1,t.length-1+e.ahead),i=e=>100*e/r,a=e=>28-26*e/n,o=e=>t.map((t,n)=>`${i(n).toFixed(1)},${a(e(t)).toFixed(1)}`).join(` `);return(0,q.jsx)(`svg`,{className:`mini-burnup`,viewBox:`0 0 100 30`,preserveAspectRatio:`none`,role:`img`,"aria-label":`Burn-up: ${e.done} of ${e.scope} points done`,children:t.length>1&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`polyline`,{className:`mini-burnup__scope`,points:o(e=>e.scope),vectorEffect:`non-scaling-stroke`}),(0,q.jsx)(`polyline`,{className:`mini-burnup__done`,points:o(e=>e.done),vectorEffect:`non-scaling-stroke`})]})})}function EL({sprint:e}){return(0,q.jsxs)(`p`,{className:`sprint-line`,children:[(0,q.jsx)(`span`,{className:`sprint-line__name`,children:e.name}),` `,(0,q.jsxs)(`span`,{className:`note`,children:[xL(e.daysLeft,`working day`),` left of `,e.daysTotal,`, `,e.done,` of `,xL(e.scope,`point`),` done`]})]})}function DL({field:e,dossier:t,value:n,config:r,onSaved:i,children:a}){let[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(n??``),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(null),m=(0,v.useRef)(null),h=(0,v.useRef)(null),g=(0,v.useRef)(!1),_=(0,v.useId)(),y=e===`name`?`Rename ${t}`:n?`Edit ${t}'s description`:`Add a description to ${t}`;(0,v.useEffect)(()=>{o?m.current?.select():g.current&&(g.current=!1,h.current?.focus())},[o]);let b=()=>{g.current=!0,s(!1),p(null)},x=async()=>{if(!r||u)return;let a=c.trim();if(a===(n??``))return b();d(!0),p(null);try{let n=await r.run(`dossiers describe`,{dossier:t,[e]:a});if(!n.ok){p({message:n.error.message,fix:n.error.fix??null});return}let o=n.data;g.current=e===`description`,s(!1),i({name:o.name,description:o.description??null,renamed:o.renamed?{from:o.renamed.from,to:o.renamed.to}:null})}catch(e){p({message:e instanceof Error?e.message:String(e),fix:null})}finally{d(!1)}};return!o||!r||r.disabled?(0,q.jsxs)(`span`,{className:`editable editable--${e}`,children:[a,r&&!r.disabled&&(0,q.jsx)(`button`,{ref:h,type:`button`,className:`btn btn--small edit-pencil`,"data-edit":``,"aria-label":y,title:y,onClick:()=>{l(n??``),s(!0)},children:(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`✎`})})]}):(0,q.jsxs)(`span`,{className:`editable editable--${e} editable--open`,children:[(0,q.jsx)(`label`,{className:`sr-only`,htmlFor:_,children:e===`name`?`New name for ${t}`:`Description of ${t}`}),(0,q.jsx)(`input`,{ref:m,id:_,className:`edit-field`,value:c,disabled:u,maxLength:e===`name`?64:300,spellCheck:e===`description`,autoComplete:`off`,"aria-describedby":`${_}-hint${f?` ${_}-error`:``}`,"aria-invalid":f?!0:void 0,onChange:e=>l(e.target.value),onKeyDown:e=>{gF(`editSave`,e)?(e.preventDefault(),x()):gF(`editCancel`,e)&&(e.preventDefault(),e.stopPropagation(),l(n??``),b())}}),(0,q.jsx)(`span`,{id:`${_}-hint`,className:`edit-hint note`,children:u?`Saving through toil dossiers describe…`:e===`name`?`Enter renames it with toil dossiers describe; Escape cancels. Lowercase letters, digits and hyphens.`:`Enter saves it with toil dossiers describe; Escape cancels.`}),f&&(0,q.jsxs)(`span`,{id:`${_}-error`,role:`alert`,className:`edit-error failure`,children:[f.message,f.fix&&(0,q.jsxs)(`span`,{className:`note`,children:[` Fix: `,f.fix]})]})]})}var OL={"needs-you":`Needs you`,working:`Working`,stale:`Stale`,earlier:`Earlier`},kL=e=>e.state===`queued`&&e.waiting===`start`;function AL(e){return e.state===`needs-you`?`needs-you`:e.state===`working`||e.state===`queued`?`working`:e.stale&&!e.renewedBy?`stale`:`earlier`}function jL(){let{dossier:e}=J(),{list:t}=GP(e.name);return{needsYou:t?.assignments.filter(e=>e.state===`needs-you`).length??0}}function ML({a:e,now:t}){let n=e.proposals.filter(e=>e.status===`pending`).length,r=[n?`${n} ${n===1?`proposal`:`proposals`} to review`:``,e.questions.length?`${e.questions.length} ${e.questions.length===1?`question`:`questions`}`:``].filter(Boolean).join(`, `);return(0,q.jsxs)(`li`,{className:`agent-card`,"data-card":``,children:[(0,q.jsxs)(`p`,{className:`agent-card__top`,children:[(0,q.jsx)(KP,{a:e}),` `,(0,q.jsx)(`span`,{className:`assign-mode`,children:OD[e.mode].label})]}),(0,q.jsxs)(`p`,{className:`agent-card__item`,children:[(0,q.jsx)(UT,{id:e.item}),` `,(0,q.jsx)(`span`,{className:`agent-card__title`,children:e.itemTitle})]}),(0,q.jsxs)(`p`,{className:`note`,children:[e.state===`needs-you`&&r?`${r}. `:``,e.state===`failed`&&e.stop?`${e.stop.message} `:``,e.adapter?DD[e.adapter]:`No adapter yet`,` · `,jD(e.ranMs??AD(e,t))]}),e.stale&&(0,q.jsx)(CD,{stale:e.stale}),e.renewedBy&&(0,q.jsxs)(`p`,{className:`note`,children:[`Renewed as `,(0,q.jsx)(`a`,{href:HP(e.dossier,e.renewedBy),children:`a fresh assignment`}),`.`]}),(0,q.jsxs)(`a`,{className:`agent-card__open`,href:HP(e.dossier,e.id),children:[`Open`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` the assignment on `,e.item]})]})]})}function NL(e){return e.filter(e=>e.analyze).reverse()}function PL(){let{dossier:e}=J(),t=oj(),n=NL(t?.turns??[]).find(e=>!e.done),r=(t?.history.list??[]).slice(0,3);return(0,q.jsxs)(`section`,{className:`agents-side__analyses`,"aria-labelledby":`recent-analyses`,children:[(0,q.jsx)(`h3`,{id:`recent-analyses`,children:`Recent analyses`}),t?.history.error&&(0,q.jsx)(`p`,{className:`failure`,children:t.history.error}),n&&(0,q.jsx)(`p`,{className:`note analysis-line`,children:`Analyze is answering now.`}),r.length?(0,q.jsx)(`ul`,{className:`plain`,children:r.map(t=>(0,q.jsx)(`li`,{className:`analysis-line`,children:(0,q.jsxs)(`a`,{href:Og(e.name,t.id),children:[(0,q.jsx)(`span`,{className:`note`,children:Y(t.at)}),(0,q.jsx)(`span`,{className:`sr-only`,children:`, `}),` `,(0,q.jsx)(`span`,{children:t.recommendation?FL(t.recommendation):`No recommendation line.`})]})},t.id))}):!n&&(0,q.jsx)(`p`,{className:`note`,children:`None yet.`}),(0,q.jsx)(`a`,{href:Dg(e.name),children:`All analyses`})]})}function FL(e){let t=e.replace(/\[\[([^\]]+)\]\]/g,(e,t)=>t.slice(t.indexOf(`:`)+1)).replace(/\s+/g,` `).trim(),n=/^(.{1,140}?[.!?])(\s|$)/.exec(t)?.[1]??t.slice(0,140);return n.length<t.length&&!/[.!?]$/.test(n)?`${n}…`:n}function IL(){let{dossier:e,now:t,assignments:n}=J(),{list:r,error:i,reload:a}=GP(e.name),o=r?.assignments.filter(kL)??[],s=r?.assignments.filter(e=>!kL(e))??[],c=[`needs-you`,`working`,`stale`,`earlier`].map(e=>({g:e,items:s.filter(t=>AL(t)===e)}));return(0,q.jsxs)(`section`,{className:`agents-sidebar`,"aria-labelledby":`agents`,children:[(0,q.jsx)(`h2`,{id:`agents`,children:`Agents`}),r&&(0,q.jsxs)(`p`,{className:`note`,children:[r.settings.concurrent===1?`One runs at a time`:`${r.settings.concurrent} run at a time`,`, for up to `,r.settings.timeLimitMinutes,` minutes each.`]}),!n&&(0,q.jsx)(`p`,{className:`note`,children:`Assigning work to an agent isn't available here.`}),n?.disabled&&(0,q.jsx)(`p`,{className:`note`,children:n.disabled}),i&&(0,q.jsx)(`p`,{className:`failure`,children:i}),r?.settings.problem&&(0,q.jsx)(`p`,{className:`failure`,children:r.settings.problem}),o.length>0&&(0,q.jsxs)(`section`,{className:`assign-inbox`,"aria-labelledby":`agent-inbox`,children:[(0,q.jsx)(`h3`,{id:`agent-inbox`,children:`Agent inbox`}),(0,q.jsx)(`p`,{className:`note`,children:`The tracker asks for an agent on these. Nothing runs until you press Start.`}),(0,q.jsx)(`ul`,{className:`rows`,children:o.map(e=>(0,q.jsx)($P,{a:e,onStarted:a},e.id))})]}),r&&!s.length&&(0,q.jsxs)(`p`,{className:`note`,children:[`Nothing assigned yet. `,(0,q.jsx)(`a`,{href:Tg(e.name),children:`Assign from the board`})]}),c.map(({g:e,items:n})=>n.length===0?null:e===`earlier`?(0,q.jsxs)(`details`,{className:`agents-group agents-group--earlier`,children:[(0,q.jsxs)(`summary`,{children:[OL[e],` (`,n.length,`)`]}),(0,q.jsx)(`ul`,{className:`agent-cards`,children:n.map(e=>(0,q.jsx)(ML,{a:e,now:t},e.id))})]},e):(0,q.jsxs)(`section`,{className:`agents-group agents-group--${e}`,"aria-labelledby":`agents-${e}`,children:[(0,q.jsxs)(`h3`,{id:`agents-${e}`,children:[OL[e],` `,(0,q.jsx)(`span`,{className:`count`,children:n.length})]}),(0,q.jsx)(`ul`,{className:`agent-cards`,children:n.map(e=>(0,q.jsx)(ML,{a:e,now:t},e.id))})]},e)),r&&(0,q.jsx)(tF,{list:r,onDone:a}),r&&(0,q.jsx)(eF,{list:r,onSaved:a}),(0,q.jsx)(PL,{})]})}var LL=[{id:`overview`,label:`Overview`,href:bg},{id:`board`,label:`Board`,href:e=>Tg(e)},{id:`dependencies`,label:`Dependencies`,href:Eg},{id:`prs`,label:`Pull requests`,href:Sg},{id:`people`,label:`People`,href:Cg},{id:`worklog`,label:`Worklog`,href:e=>kg(e)},{id:`analyses`,label:`Analyses`,href:Dg}],RL=`(min-width: 1200px)`;function zL({tab:e,heading:t,dossiers:n,boardView:r,children:i}){let{dossier:a,config:o,described:s}=J(),{health:c,insights:l}=fg(),u=nC(),d=sE(RL),f=DA(JS()),p=(0,v.useRef)(null),m=(0,v.useRef)(null);VA(p,f.entrance,a.name,{ms:420}),VA(m,f.tabs,`${e??``}:${r??``}`,{onMount:!1,ms:260});let h=(0,v.useMemo)(()=>lg(c?.items??a.items,l).length,[c,a,l]),g=(0,q.jsx)(DL,{field:`name`,dossier:a.name,value:a.name,config:o??null,onSaved:s??(()=>void 0),children:a.name}),_=LL.map(e=>({id:e.id,href:e.href(a.name),label:e.label,...e.id===`board`?{count:{n:h,label:h===1?`item needs attention`:`items need attention`}}:{}}));return(0,q.jsxs)(`div`,{className:`dossier-shell`,"data-wide-sidebar":d||void 0,ref:p,children:[(0,q.jsxs)(`div`,{className:`dossier-bar`,children:[(0,q.jsxs)(`div`,{className:`dossier-bar__id`,children:[(0,q.jsxs)(`div`,{className:`dossier-bar__line`,children:[t?(0,q.jsx)(`h1`,{tabIndex:-1,className:`dossier-bar__name`,children:g}):(0,q.jsx)(`p`,{className:`dossier-bar__name`,children:g}),(0,q.jsx)(VL,{current:a.name,dossiers:n}),c&&(0,q.jsx)(`span`,{className:`sprint-chip`,children:u(`sprint`,`${c.sprint.name}: day ${c.days.gone} of ${c.days.total}`)})]}),(0,q.jsxs)(`div`,{className:`dossier-bar__about`,children:[(0,q.jsx)(`p`,{className:`dossier-bar__desc`,children:(0,q.jsx)(DL,{field:`description`,dossier:a.name,value:a.description,config:o??null,onSaved:s??(()=>void 0),children:a.description?(0,q.jsx)(`span`,{className:`dossier-bar__desc-text`,title:a.description,"data-truncate":``,children:a.description}):(0,q.jsx)(`span`,{className:`note`,children:`No description`})})}),(0,q.jsx)(SL,{sources:a.sources,dossier:a.name})]})]}),(0,q.jsx)(cj,{})]}),(0,q.jsxs)(`div`,{className:`dossier-tabs-row`,children:[(0,q.jsx)(tE,{label:`Dossier views`,className:`dossier-tabs`,children:(0,q.jsx)(`nav`,{"aria-label":`${a.name} views`,children:(0,q.jsx)(`ul`,{children:_.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(`a`,{href:t.href,"aria-current":t.id===e?`page`:void 0,"data-tab":t.id,children:[t.label,t.count&&t.count.n>0&&(0,q.jsxs)(`span`,{className:`tab-count`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,children:t.count.n}),(0,q.jsxs)(`span`,{className:`sr-only`,children:[`, `,t.count.n,` `,t.count.label]})]})]})},t.id))})})}),!d&&(0,q.jsx)(HL,{})]}),e===`board`&&r&&(0,q.jsxs)(`nav`,{className:`board-views`,"aria-label":`Board views`,children:[(0,q.jsx)(`a`,{href:Tg(a.name),"aria-current":r===`board`?`page`:void 0,children:`Board`}),(0,q.jsx)(`a`,{href:wg(a.name),"aria-current":r===`readiness`?`page`:void 0,children:`Readiness (Command Center)`})]}),(0,q.jsx)(BL,{}),(0,q.jsxs)(`div`,{className:`dossier-body`,children:[(0,q.jsx)(`div`,{className:`dossier-main`,ref:m,children:i}),d&&(0,q.jsx)(`aside`,{className:`agents-side`,"aria-labelledby":`agents`,children:(0,q.jsx)(`div`,{className:`agents-side__scroll`,children:(0,q.jsx)(IL,{})})})]})]})}function BL(){let{byId:e,assignments:t}=J(),[n,r]=(0,v.useState)(null);JA(e=>{e.kind===`assign`&&r(e.id)});let i=n?e.get(n):void 0;return!t||!i?null:(0,q.jsx)(XP,{item:i,isOpen:!0,onOpenChange:e=>!e&&r(null)})}function VL({current:e,dossiers:t}){let n=(t??[]).filter(t=>t!==e);return(0,q.jsxs)(Xd,{children:[(0,q.jsxs)(W,{className:`btn btn--small dossier-switch`,"aria-label":`Switch dossier, on ${e}`,"data-dossier-switch":``,children:[`Switch `,(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`▾`})]}),(0,q.jsx)(Xu,{className:`popover`,placement:`bottom start`,children:(0,q.jsxs)(Qd,{className:`menu`,"aria-label":`Dossiers`,children:[(0,q.jsx)(af,{id:`#/`,href:`#/`,className:`menu-item`,children:`All dossiers`}),n.map(e=>(0,q.jsx)(af,{id:e,href:bg(e),className:`menu-item`,children:e},e))]})})]})}function HL(){let[e,t]=(0,v.useState)(!1),n=jL();return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(W,{className:`btn agents-open`,onPress:()=>t(!0),"data-agents-open":``,children:[`Agents`,n.needsYou>0&&(0,q.jsxs)(`span`,{className:`tab-count`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,children:n.needsYou}),(0,q.jsxs)(`span`,{className:`sr-only`,children:[`, `,n.needsYou,` need you`]})]})]}),(0,q.jsx)(Of,{className:`drawer-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:e,onOpenChange:t,children:(0,q.jsx)(Ef,{className:`agents-drawer`,children:(0,q.jsxs)(uf,{className:`agents-drawer__dialog`,"aria-labelledby":`agents`,children:[(0,q.jsx)(`div`,{className:`agents-drawer__head`,children:(0,q.jsx)(W,{className:`btn btn--small agents-close`,onPress:()=>t(!1),"data-agents-close":``,children:`Close`})}),(0,q.jsx)(IL,{})]})})})]})}var UL=4e3,WL=`This style changes phrasing only. The rules above win wherever the two disagree: keep every citation as [[id]] exactly, each proposal as a fenced proposal block with its JSON exactly as rule 3 shows, every figure as the data gives it, saying plainly when the data does not show something, and plain text with no Markdown.`,GL=`These instructions come from the person using Toil UI. Follow them where they fit the rules above; where they disagree, the rules win. They can't give you a tool, and nothing in them lets you change anything.`;function KL(e,t){return[`You are the analyst inside Toil UI, answering a question about the dossier "${e}": one body of work, its tracker items, pull requests, builds and deployments. It is ${t}.`,``,`Rules:`,`1. Use only your tools. owi_query, owi_get, owi_similar and owi_history read the work items Toil UI last synced for "${e}"; owi_similar finds likely duplicates, so run it before proposing a new item. pr_query, pr_get and pr_metrics read its pull requests. people_list and person_get read what is on each person's plate; they describe load, never performance, so never rank or score people. worklog_day reads one UTC day's worklog: what changed that day, by whom and when. The other tools are toil's live read commands for the same dossier; use them only when the cache can't answer. Never rely on anything you remember about these items.`,`2. Cite every work item you mention by its OWI id in double square brackets, such as [[jira:PAY-101]], and every pull request by its change id, such as [[github:imagile/payments-web#52]], exactly as your tools returned it. Never mention an item or pull request your tools did not return: the server checks every id against your tool results and flags any it never saw.`,`3. You cannot change anything, and you have no tool that writes. When the question calls for a change (a re-estimate, a move to another sprint, a split story, a transition), write it as a proposal for a person to apply, in a fenced block like this, one block per change:`,"```proposal",`{"item": "<owi id>", "title": "<one line>", "reason": "<why, citing [[ids]]>", "command": "<the toil write command, such as jira issue update, or null if toil has none>", "input": {"<field>": "<value>"}, "note": "<anything to check first, or null>"}`,"```",` The input is the toil command's MCP input, without the dossier and without allowWrite: call proposal_fields with the command first and use only its fields, or the card shows no command line. Never say a change was made: it is only proposed. Write at most 10 proposals, the ones that matter most: the page shows no more than that.`,`4. Be brief and specific: short paragraphs of plain text (no Markdown, no headings, no bold), figures where you have them. Say plainly when the data does not show something.`]}function qL(e,t,n={voice:null,instructions:null}){let r=KL(e,t),i=n.voice?.trim(),a=n.instructions?.trim();return i&&r.push(``,`Style:`,i,``,WL),a&&r.push(``,`Instructions from the person asking:`,a,``,GL),r.join(`
40
+ `)}var JL=new Map([Hm,Rm,Bm,Gm,Um,Wm,zm,Vm].map(e=>[e.name,e]));function YL(e,t){let n=e?JL.get(e.theme):void 0;return{voice:e?.voice===!0&&n?.voice!==void 0?t.voice??n.voice:null,instructions:t.instructions}}var XL=`0.1.0-alpha.1`,ZL=e=>e.padEnd(40,`0`),QL=e=>Date.parse(e),$L=(e,t,n,r)=>({ok:!0,data:t,error:null,meta:{command:e,durationMs:233,version:XL,context:{connection:{value:n,source:`dossier`},inputs:Object.fromEntries(Object.entries(r).map(([e,t])=>[e,{value:t,source:`dossier`}]))}}}),eR=(e,t)=>t?`${e}\n\n${t}`:e,tR=`Co-Authored-By: Claude <you@example.com>`,nR=`https://bitbucket.imagile.dev`,rR=(e,t,n=`NORMAL`)=>({name:e,id:e.length*101,displayName:t,active:!0,slug:e,type:n,...n===`NORMAL`?{emailAddress:`you@example.com`}:{}}),iR={slug:`payments-core`,name:`payments-core`,project:{key:`PAY`,name:`Payments`}},aR=rR(`jsmith`,`J. Smith`),oR=rR(`achen`,`A. Chen`),sR=rR(`svc-renovate`,`Renovate`,`SERVICE`),cR=e=>({id:e.id,version:2,title:e.title,...e.description?{description:e.description}:{},state:e.state,open:e.state===`OPEN`,closed:e.state!==`OPEN`,draft:!1,createdDate:QL(e.created),updatedDate:QL(e.updated??e.closed??e.created),...e.closed?{closedDate:QL(e.closed)}:{},fromRef:{id:`refs/heads/${e.branch}`,displayId:e.branch,latestCommit:ZL(e.head),repository:iR},toRef:{id:`refs/heads/master`,displayId:`master`,latestCommit:ZL(`f00d000`),repository:iR},locked:!1,author:{user:e.author,role:`AUTHOR`,approved:!1,status:`UNAPPROVED`},reviewers:(e.reviewers??[]).map(e=>({user:e.user,role:`REVIEWER`,approved:e.status===`APPROVED`,status:e.status})),participants:[],properties:{...e.state===`OPEN`?{mergeResult:{outcome:e.outcome??`CLEAN`,current:!0}}:{},...e.merge?{mergeCommit:{displayId:e.merge,id:ZL(e.merge)}}:{},commentCount:0},links:{self:[{href:`${nR}/projects/PAY/repos/payments-core/pull-requests/${e.id}`}]}}),lR=e=>({...cR(e),included:{reviews:(e.activities??[]).map((t,n)=>({id:e.id*100+n,createdDate:QL(t.at),user:t.user,action:t.action})),checks:(e.builds??[]).map((t,n)=>({state:t.state,key:`payments-core-PR-${e.id}`,name:`payments-core » PR-${e.id} #${n+1}`,url:`https://jenkins.imagile.dev/job/payments-core/job/PR-${e.id}/${n+1}/`,dateAdded:QL(t.at)})),commits:(e.commits??[e.title]).map((t,n)=>({id:ZL(`${e.head.slice(0,5)}${n}`),displayId:`${e.head.slice(0,5)}${n}`,message:t,author:{name:e.author.displayName,emailAddress:`you@example.com`},authorTimestamp:QL(e.created)})),files:Array.from({length:e.files??1},(t,n)=>({contentId:ZL(`c${e.id}${n}`),path:{toString:`src/main/java/payments/File${n}.java`},type:`MODIFY`}))}}),uR=[{id:311,title:`PAY-101 Tokenise PANs in the edge proxy`,description:`First slice of Card payments v2 (PAY-100).`,state:`OPEN`,author:aR,branch:`feature/PAY-101-tokenise`,head:`e91a4c2`,created:`2026-10-12T15:30:00.000Z`,updated:`2026-10-12T17:00:00.000Z`,reviewers:[{user:oR,status:`NEEDS_WORK`}],activities:[{user:oR,action:`REVIEWED`,at:`2026-10-12T17:00:00.000Z`}],builds:[{state:`FAILED`,at:`2026-10-12T15:35:00.000Z`},{state:`FAILED`,at:`2026-10-12T16:05:00.000Z`}],files:6},{id:305,title:`PAY-104 Round refund totals half-up`,state:`OPEN`,author:oR,branch:`bugfix/PAY-104-rounding`,head:`3c5d7e1`,created:`2026-10-07T10:15:00.000Z`,reviewers:[{user:aR,status:`UNAPPROVED`}],outcome:`CONFLICTED`,builds:[{state:`SUCCESSFUL`,at:`2026-10-07T10:40:00.000Z`}],files:2},{id:298,title:`PAY-105 Show the last four digits on receipts`,state:`MERGED`,author:aR,branch:`feature/PAY-105-last-four`,head:`8a6b2f0`,created:`2026-10-08T09:00:00.000Z`,closed:`2026-10-09T14:50:00.000Z`,merge:`4e1d2a9`,reviewers:[{user:oR,status:`APPROVED`}],activities:[{user:oR,action:`REVIEWED`,at:`2026-10-08T16:00:00.000Z`},{user:oR,action:`APPROVED`,at:`2026-10-09T11:00:00.000Z`}],builds:[{state:`SUCCESSFUL`,at:`2026-10-09T14:20:00.000Z`}],files:4},{id:296,title:`PAY-106 Register the tokeniser with the gateway`,state:`MERGED`,author:aR,branch:`feature/PAY-106-gateway`,head:`2d9e8b4`,created:`2026-10-06T13:00:00.000Z`,closed:`2026-10-07T11:40:00.000Z`,merge:`7b3c9d2`,reviewers:[{user:oR,status:`APPROVED`}],activities:[{user:oR,action:`APPROVED`,at:`2026-10-07T09:30:00.000Z`}],builds:[{state:`SUCCESSFUL`,at:`2026-10-07T11:10:00.000Z`}],files:3},{id:290,title:`Bump the HTTP client to 5.3`,state:`MERGED`,author:sR,branch:`renovate/http-client-5.x`,head:`0f4e6a3`,created:`2026-09-29T09:00:00.000Z`,closed:`2026-09-30T10:00:00.000Z`,merge:`1a2b3c4`,reviewers:[{user:oR,status:`APPROVED`}],activities:[{user:oR,action:`APPROVED`,at:`2026-09-30T09:15:00.000Z`}],builds:[{state:`SUCCESSFUL`,at:`2026-09-30T09:30:00.000Z`}],files:1}],dR=uR.map(cR),fR=Object.fromEntries(uR.map(e=>[e.id,lR(e)])),pR=`https://ado.imagile.dev/DefaultCollection`,mR=(e,t)=>({displayName:t,uniqueName:`IMAGILE\\${e}`,id:`abc12345-0000-0000-0000-0000000000${e.length}0`,descriptor:`win.${e}`}),hR=mR(`dokafor`,`D. Okafor`),gR=mR(`jpark`,`J. Park`),_R={id:`abc12345-0000-0000-0000-000000000500`,name:`settlement`,url:`${pR}/Payments/_apis/git/repositories/settlement`,webUrl:`${pR}/Payments/_git/settlement`,project:{name:`Payments`}},vR=e=>({repository:_R,pullRequestId:e.id,codeReviewId:e.id,status:e.status,createdBy:hR,creationDate:e.created,...e.closed?{closedDate:e.closed}:{},title:e.title,description:e.description,sourceRefName:`refs/heads/${e.branch}`,targetRefName:`refs/heads/main`,mergeStatus:`succeeded`,isDraft:!1,lastMergeSourceCommit:{commitId:ZL(e.head)},...e.merge?{lastMergeCommit:{commitId:ZL(e.merge)}}:{},reviewers:[{...gR,vote:e.vote,isRequired:!0,hasDeclined:!1,isFlagged:!1}],url:`${_R.url}/pullRequests/${e.id}`}),yR=e=>({...vR(e),included:{reviews:e.votes.map((t,n)=>({id:e.id*10+n,publishedDate:t.at,lastUpdatedDate:t.at,isDeleted:!1,status:`closed`,comments:[{id:1,author:gR,content:`J. Park voted ${t.value}`,publishedDate:t.at,commentType:`system`}],properties:{CodeReviewThreadType:{$type:`System.String`,$value:`VoteUpdate`},CodeReviewVoteResult:{$type:`System.String`,$value:String(t.value)}}})),checks:e.statuses.map((e,t)=>({id:t+1,state:e.state,description:`settlement-ci ${e.state}`,context:{name:`settlement-ci`,genre:`continuous-integration`},creationDate:e.at,updatedDate:e.at,iterationId:1})),commits:e.commits.map((t,n)=>({commitId:ZL(`${e.head.slice(0,5)}${n}`),comment:t,author:{name:hR.displayName,email:`you@example.com`,date:e.created}})),files:Array.from({length:e.files},(t,n)=>({changeTrackingId:n+1,changeId:n+1,item:{objectId:ZL(`f${e.id}${n}`),path:`/src/Settlement/File${n}.cs`},changeType:`edit`}))}}),bR=[{id:87,title:`Write the daily settlement CSV`,description:`For #2302. One file per merchant, written at 02:00 UTC.`,status:`active`,branch:`feature/2302-settlement-csv`,head:`87ab3e2`,created:`2026-10-12T09:20:00Z`,vote:-5,votes:[{value:-5,at:`2026-10-12T14:00:00Z`}],statuses:[{state:`pending`,at:`2026-10-13T07:55:00Z`}],commits:[`Write the settlement CSV`],files:5},{id:84,title:`Schedule the settlement export job`,description:`Task #2305.`,status:`completed`,branch:`feature/2305-schedule`,head:`84cd1f9`,created:`2026-10-07T16:00:00Z`,closed:`2026-10-08T12:30:00Z`,merge:`c84e5f0`,vote:10,votes:[{value:10,at:`2026-10-08T10:00:00Z`}],statuses:[{state:`succeeded`,at:`2026-10-08T12:10:00Z`}],commits:[`Schedule the export at 02:00 UTC`],files:2},{id:80,title:`Settlement job skeleton`,description:`The empty job and its pipeline.`,status:`completed`,branch:`feature/skeleton`,head:`80ef2a1`,created:`2026-09-29T10:00:00Z`,closed:`2026-10-01T11:00:00Z`,merge:`b80a1d2`,vote:10,votes:[{value:10,at:`2026-09-30T15:00:00Z`}],statuses:[{state:`succeeded`,at:`2026-10-01T10:30:00Z`}],commits:[eR(`Add the settlement job skeleton`,tR),`Add its pipeline`],files:9}],xR=bR.map(vR),SR=Object.fromEntries(bR.map(e=>[e.id,yR(e)])),CR=`https://ghe.imagile.dev`,wR=`${CR}/api/v3`,TR=(e,t,n=`User`)=>({login:e,id:t,avatar_url:`${CR}/avatars/u/${t}`,type:n}),ER=TR(`ada-dev`,11),DR=TR(`bo-web`,12),OR=TR(`dependabot[bot]`,49699333,`Bot`),kR={full_name:`imagile/payments-web`,name:`payments-web`,owner:{login:`imagile`}},AR=e=>({url:`${wR}/repos/imagile/payments-web/pulls/${e.number}`,id:7e3+e.number,number:e.number,state:e.merged?`closed`:`open`,locked:!1,title:e.title,user:e.user,body:e.body,draft:e.draft??!1,html_url:`${CR}/imagile/payments-web/pull/${e.number}`,created_at:e.created,updated_at:e.updated??e.merged??e.created,closed_at:e.merged??null,merged_at:e.merged??null,merge_commit_sha:ZL(e.merge),requested_reviewers:e.requested??[],requested_teams:[],labels:[],head:{label:`imagile:${e.branch}`,ref:e.branch,sha:ZL(e.head),repo:kR},base:{label:`imagile:main`,ref:`main`,sha:ZL(`0a0a0a0`),repo:kR}}),jR=e=>({...AR(e),merged:!!e.merged,mergeable:e.merged?null:e.mergeable===void 0||e.mergeable,mergeable_state:e.merged?`unknown`:`clean`,comments:0,review_comments:0,commits:e.commits.length,additions:e.files.reduce((e,t)=>e+t.additions,0),deletions:e.files.reduce((e,t)=>e+t.deletions,0),changed_files:e.files.length,included:{reviews:(e.reviews??[]).map((t,n)=>({id:9e4+e.number*10+n,user:t.user,body:``,state:t.state,submitted_at:t.at,commit_id:ZL(e.head),author_association:`MEMBER`})),checks:e.checks.map((t,n)=>({id:8e3+e.number*10+n,name:t.name,head_sha:ZL(e.head),status:t.conclusion===null?`in_progress`:`completed`,conclusion:t.conclusion,html_url:`${CR}/imagile/payments-web/actions/runs/${8e3+e.number*10+n}/job/${8001+e.number*10+n}`,started_at:t.at,completed_at:t.conclusion===null?null:t.at,app:{slug:`github-actions`,name:`GitHub Actions`}})),commits:e.commits.map((t,n)=>({sha:ZL(`${e.head.slice(0,5)}${n}`),commit:{message:t,author:{name:e.user.login,email:`you@example.com`,date:e.created}},author:e.user})),files:e.files.map(e=>({filename:e.path,status:`modified`,additions:e.additions,deletions:e.deletions,changes:e.additions+e.deletions}))}}),MR=[{number:53,title:`Keep focus in the card form on Safari`,body:`Fixes #43.`,user:DR,branch:`fix/43-safari-focus`,draft:!0,head:`53d0e12`,created:`2026-10-12T13:00:00Z`,updated:`2026-10-12T13:25:00Z`,merge:`53f9a00`,checks:[{name:`test`,conclusion:`success`,at:`2026-10-12T13:15:00Z`},{name:`e2e-safari`,conclusion:`failure`,at:`2026-10-12T13:25:00Z`}],commits:[`Keep focus in the expiry field`],files:[{path:`src/checkout/card-form.tsx`,additions:18,deletions:6}]},{number:52,title:`Saved-card picker`,body:`Closes #42. Part of #41.`,user:DR,branch:`feature/saved-cards`,head:`52c4b88`,created:`2026-10-11T10:00:00Z`,updated:`2026-10-11T10:28:00Z`,merge:`52e7d00`,requested:[ER],checks:[{name:`test`,conclusion:`success`,at:`2026-10-11T10:20:00Z`},{name:`e2e-safari`,conclusion:`success`,at:`2026-10-11T10:28:00Z`}],commits:[`Add the saved-card picker`,`Show the expiry beside each card`],files:[{path:`src/checkout/saved-cards.tsx`,additions:210,deletions:4},{path:`src/checkout/saved-cards.test.tsx`,additions:96,deletions:0},{path:`src/checkout/card-form.tsx`,additions:12,deletions:3}]},{number:51,title:`Retry the address lookup once`,body:`The lookup service times out under load; retry once after 300 ms.`,user:ER,branch:`claude/address-retry`,head:`51a7f30`,created:`2026-10-08T09:00:00Z`,updated:`2026-10-09T08:10:00Z`,merge:`51b0c00`,checks:[{name:`test`,conclusion:`failure`,at:`2026-10-09T08:10:00Z`}],commits:[eR(`Retry the address lookup once`,tR)],files:[{path:`src/address/lookup.ts`,additions:31,deletions:5},{path:`src/address/lookup.test.ts`,additions:40,deletions:0}]},{number:50,title:`Use the order currency on receipts`,body:`Closes #44.`,user:ER,branch:`fix/44-receipt-currency`,head:`50b1c77`,created:`2026-10-12T14:30:00Z`,merged:`2026-10-12T15:55:00Z`,merge:`5a7e3f1`,reviews:[{user:DR,state:`APPROVED`,at:`2026-10-12T15:20:00Z`}],checks:[{name:`test`,conclusion:`success`,at:`2026-10-12T15:40:00Z`}],commits:[`Format receipts in the order currency`],files:[{path:`src/receipt/total.tsx`,additions:9,deletions:4}]},{number:49,title:`Bump vite from 7.1.2 to 7.1.5`,body:`Bumps vite from 7.1.2 to 7.1.5.`,user:OR,branch:`dependabot/npm_and_yarn/vite-7.1.5`,head:`49c2d11`,created:`2026-10-03T06:00:00Z`,merged:`2026-10-05T09:30:00Z`,merge:`49e0a00`,reviews:[{user:ER,state:`APPROVED`,at:`2026-10-05T09:10:00Z`}],checks:[{name:`test`,conclusion:`success`,at:`2026-10-03T06:20:00Z`}],commits:[`Bump vite from 7.1.2 to 7.1.5`],files:[{path:`package.json`,additions:1,deletions:1},{path:`package-lock.json`,additions:12,deletions:12}]},{number:48,title:`Order summary panel`,body:`From the checkout refresh designs.`,user:ER,branch:`feature/order-summary`,head:`48a9e66`,created:`2026-10-01T09:00:00Z`,merged:`2026-10-02T10:00:00Z`,merge:`1c9b8e4`,reviews:[{user:DR,state:`CHANGES_REQUESTED`,at:`2026-10-01T14:00:00Z`},{user:DR,state:`APPROVED`,at:`2026-10-02T09:00:00Z`}],checks:[{name:`test`,conclusion:`success`,at:`2026-10-01T09:20:00Z`}],commits:[`Add the order summary panel`,`Round the subtotal as the designs show`],files:[{path:`src/checkout/summary.tsx`,additions:140,deletions:2},{path:`src/checkout/card-form.tsx`,additions:6,deletions:1}]}],NR=MR.map(AR),PR=Object.fromEntries(MR.map(e=>[e.number,jR(e)]));btoa(`# Who reviews what
41
41
  * @ada-dev
42
42
  src/checkout/ @bo-web
43
43
  src/address/ @bo-web @ada-dev
44
- `),XL(`c0de0e5`),`${SR}`;var PR=`https://bitbucket-cloud.imagile.dev`,FR=(e,t,n)=>({display_name:t,nickname:e,type:`user`,uuid:`{abc12345-0000-0000-0000-0000000000${n}0}`,account_id:`557058:abc12345-0000-0000-0000-0000000000${n}0`}),IR=FR(`bo-web`,`Bo W.`,1),LR=FR(`ada-dev`,`Ada D.`,2),RR={full_name:`imagile/checkout-sdk`,name:`checkout-sdk`,type:`repository`,uuid:`{abc12345-0000-0000-0000-000000000700}`},zR=e=>({type:`pullrequest`,id:e.id,title:e.title,description:e.description,summary:{type:`rendered`,raw:e.description,markup:`markdown`},state:e.state,draft:!1,author:e.author,source:{branch:{name:e.branch},commit:{hash:e.head.padEnd(12,`0`)},repository:RR},destination:{branch:{name:`main`},commit:{hash:`a0a0a0a0a0a0`},repository:RR},...e.merge?{merge_commit:{hash:e.merge.padEnd(12,`0`)}}:{merge_commit:null},comment_count:0,task_count:0,close_source_branch:!0,created_on:e.created,updated_on:e.updated,reviewers:e.reviewers.map(e=>e.user),participants:e.reviewers.map(t=>({type:`participant`,user:t.user,role:`REVIEWER`,approved:t.state===`approved`,state:t.state,participated_on:t.state?e.updated:null})),links:{html:{href:`${PR}/imagile/checkout-sdk/pull-requests/${e.id}`},self:{href:`${PR}/2.0/repositories/imagile/checkout-sdk/pullrequests/${e.id}`}}}),BR=e=>({...zR(e),included:{reviews:e.approvals.map(t=>({approval:{date:t.at,user:t.user,pullrequest:{id:e.id,type:`pullrequest`}},pull_request:{id:e.id,type:`pullrequest`}})),checks:e.statuses.map((t,n)=>({type:`commitstatus`,key:`checkout-sdk-ci-${n}`,name:`checkout-sdk CI`,state:t.state,url:`${PR}/imagile/checkout-sdk/pipelines/results/${e.id*10+n}`,created_on:t.at,updated_on:t.at})),commits:e.commits.map((t,n)=>({type:`commit`,hash:`${e.head}${n}`.padEnd(40,`0`),message:t,author:{type:`author`,raw:`${e.author.display_name} <you@example.com>`},date:e.created})),files:e.files.map(e=>({type:`diffstat`,status:`modified`,lines_added:e.added,lines_removed:e.removed,old:{path:e.path,type:`commit_file`},new:{path:e.path,type:`commit_file`}}))}}),VR=[{id:12,title:`Format receipt totals in the order currency`,description:`The SDK side of imagile/payments-web#44.`,state:`OPEN`,author:IR,branch:`copilot/receipt-currency`,head:`12ab3c4`,created:`2026-10-10T11:00:00.000000+00:00`,updated:`2026-10-10T11:25:00.000000+00:00`,reviewers:[{user:LR,state:null}],approvals:[],statuses:[{state:`SUCCESSFUL`,at:`2026-10-10T11:25:00.000000+00:00`}],commits:[`Format totals with Intl.NumberFormat`],files:[{path:`src/money.ts`,added:22,removed:7}]},{id:9,title:`Saved-card hooks`,description:`useSavedCards and useDefaultCard, for imagile/payments-web#42.`,state:`MERGED`,author:LR,branch:`feature/saved-card-hooks`,head:`09cd5e6`,merge:`9f1e2d3`,created:`2026-10-06T08:30:00.000000+00:00`,updated:`2026-10-07T12:00:00.000000+00:00`,reviewers:[{user:IR,state:`approved`}],approvals:[{user:IR,at:`2026-10-07T10:00:00.000000+00:00`}],statuses:[{state:`SUCCESSFUL`,at:`2026-10-06T08:50:00.000000+00:00`}],commits:[`Add useSavedCards`,`Add useDefaultCard`],files:[{path:`src/hooks/saved-cards.ts`,added:120,removed:0},{path:`src/hooks/saved-cards.test.ts`,added:64,removed:0}]}],HR=VR.map(zR),UR=Object.fromEntries(VR.map(e=>[e.id,BR(e)])),WR={project:`PAY`,repo:`payments-core`},GR={collection:`DefaultCollection`,project:`Payments`,repo:`settlement`},KR={owner:`imagile`,repo:`payments-web`},qR={workspace:`imagile`,repo:`checkout-sdk`};`${[QL(`bitbucket pr list`,uR,`corp-bitbucket`,WR),...Object.values(dR).map(e=>QL(`bitbucket pr get`,e,`corp-bitbucket`,WR)),QL(`ado pr list`,bR,`corp-ado`,GR),...Object.values(xR).map(e=>QL(`ado pr get`,e,`corp-ado`,GR)),QL(`github pr list`,MR,`github`,KR),...Object.values(NR).map(e=>QL(`github pr get`,e,`github`,KR)),QL(`bitbucket-cloud pr list`,HR,`bitbucket-cloud`,qR),...Object.values(UR).map(e=>QL(`bitbucket-cloud pr get`,e,`bitbucket-cloud`,qR))].map(e=>JSON.stringify(e)).join(`
45
- `)}`;var JR=e=>Date.parse(e),YR=e=>e.padEnd(40,`0`),XR=`https://jenkins.imagile.dev`,ZR=(e,t,n,r,i)=>({number:t,url:`${XR}/job/payments-core/job/PR-${e}/${t}/`,result:n,duration:n===null?0:i,timestamp:JR(r),building:n===null,displayName:`#${t}`,fullDisplayName:`payments-core » PR-${e} #${t}`,description:null,id:String(t),queueId:9e3+e*10+t}),QR={311:[ZR(311,2,`FAILURE`,`2026-10-12T16:05:00.000Z`,412e3),ZR(311,1,`FAILURE`,`2026-10-12T15:35:00.000Z`,398e3)],305:[ZR(305,1,`SUCCESS`,`2026-10-07T10:40:00.000Z`,455e3)],298:[ZR(298,3,`SUCCESS`,`2026-10-09T14:20:00.000Z`,441e3)],296:[ZR(296,1,`SUCCESS`,`2026-10-07T11:10:00.000Z`,43e4)],290:[ZR(290,1,`SUCCESS`,`2026-09-30T09:30:00.000Z`,42e4)]},$R=(e,t,n,r,i,a)=>({name:e,ready:`${r}/${i}`,desiredReplicas:i,readyReplicas:r,updatedReplicas:r,availableReplicas:r,unavailableReplicas:i-r,age:a,images:[{name:e,image:t}],strategy:`RollingUpdate`,labels:{"app.kubernetes.io/name":e,"app.kubernetes.io/version":n}}),ez=(e,t)=>({namespace:e,kind:`Deployment`,count:t.length,deployments:t}),tz={"payments-dev":ez(`payments-dev`,[$R(`payments-core`,`artifactory.imagile.dev/payments/payments-core:1.14.0-4e1d2a9`,`1.14.0`,2,2,`3d`)]),"payments-prod":ez(`payments-prod`,[$R(`payments-core`,`artifactory.imagile.dev/payments/payments-core:1.13.2-1a2b3c4`,`1.13.2`,3,3,`13d`)]),"checkout-staging":ez(`checkout-staging`,[$R(`payments-web`,`artifactory.imagile.dev/checkout/payments-web:2026.10.12-5a7e3f1`,`2026.10.12`,2,2,`18h`)]),"checkout-prod":ez(`checkout-prod`,[$R(`payments-web`,`artifactory.imagile.dev/checkout/payments-web:2026.10.02-1c9b8e4`,`2026.10.02`,4,4,`11d`)])},nz=`https://ado.imagile.dev/DefaultCollection`,rz={displayName:`D. Okafor`,uniqueName:`IMAGILE\\dokafor`,id:`abc12345-0000-0000-0000-000000000070`,descriptor:`win.dokafor`},iz=e=>({id:e.id,buildNumber:e.number,status:e.status,...e.result?{result:e.result}:{},queueTime:e.at,startTime:e.at,...e.status===`completed`?{finishTime:e.at}:{},sourceBranch:e.branch,sourceVersion:YR(e.commit),definition:{...e.definition,path:`\\`},project:{name:`Payments`},reason:e.pr?`pullRequest`:`individualCI`,...e.pr?{triggerInfo:{"pr.number":String(e.pr),"pr.sourceBranch":`refs/heads/feature/${e.pr}`}}:{},...e.environment?{templateParameters:{environment:e.environment}}:{},requestedFor:rz,_links:{web:{href:`${nz}/Payments/_build/results?buildId=${e.id}`}},url:`${nz}/Payments/_apis/build/Builds/${e.id}`}),az={id:12,name:`settlement-ci`},oz={id:13,name:`settlement-deploy`};iz({id:5530,definition:az,number:`20261013.1`,status:`inProgress`,branch:`refs/pull/87/merge`,commit:`87ab3e2`,at:`2026-10-13T07:55:00Z`,pr:87}),iz({id:5512,definition:az,number:`20261008.3`,status:`completed`,result:`succeeded`,branch:`refs/pull/84/merge`,commit:`84cd1f9`,at:`2026-10-08T12:10:00Z`,pr:84}),iz({id:5461,definition:az,number:`20261001.2`,status:`completed`,result:`succeeded`,branch:`refs/pull/80/merge`,commit:`80ef2a1`,at:`2026-10-01T10:30:00Z`,pr:80}),iz({id:5521,definition:oz,number:`20261008.1`,status:`completed`,result:`succeeded`,branch:`refs/heads/main`,commit:`c84e5f0`,at:`2026-10-08T14:00:00Z`,environment:`test`}),iz({id:5470,definition:oz,number:`20261002.1`,status:`completed`,result:`succeeded`,branch:`refs/heads/main`,commit:`b80a1d2`,at:`2026-10-02T16:00:00Z`,environment:`prod`}),iz({id:5466,definition:oz,number:`20261001.1`,status:`completed`,result:`succeeded`,branch:`refs/heads/main`,commit:`b80a1d2`,at:`2026-10-01T13:00:00Z`,environment:`test`});var sz=[{name:`card-payments`,description:`Card payments v2: tokenised cards at the edge. Jira, Bitbucket, Jenkins and OpenShift.`,env:`dev`,repos:[{name:`payments-core`,remotes:[`ssh://git@bitbucket.imagile.dev:7999/pay/payments-core.git`]}],jira:{connection:`corp-jira`,project:`PAY`,fields:{acceptanceCriteria:`customfield_10500`},readiness:{minWords:20}},bitbucket:{connection:`corp-bitbucket`,project:`PAY`,repo:`payments-core`},jenkins:{connection:`corp-jenkins`,jobs:[`payments-core`]},environments:{dev:{openshift:{connection:`ocp-nonprod`,namespace:`payments-dev`}},prod:{openshift:{connection:`ocp-prod`,namespace:`payments-prod`}}},people:[{name:`J. Smith`,ids:{jira:`jsmith`,bitbucket:`jsmith`}},{name:`A. Chen`,email:`you@example.com`,ids:{jira:`achen`}},{name:`R. Patel`,ids:{jira:`rpatel`}}],wipLimit:2},{name:`settlement`,description:`Daily settlement reports for finance. Azure DevOps Server: Boards, Repos and Pipelines.`,repos:[{name:`settlement`,remotes:[`https://ado.imagile.dev/DefaultCollection/Payments/_git/settlement`]}],ado:{connection:`corp-ado`,collection:`DefaultCollection`,project:`Payments`,repo:`settlement`,builds:[`settlement-ci`],deployments:[`settlement-deploy`]}},{name:`checkout-web`,description:`The checkout web front end and its SDK. GitHub Enterprise with Projects and Actions, Bitbucket Cloud for the SDK, deployed on OpenShift.`,env:`staging`,repos:[{name:`payments-web`,remotes:[`https://ghe.imagile.dev/imagile/payments-web.git`]},{name:`checkout-sdk`,remotes:[`https://bitbucket-cloud.imagile.dev/imagile/checkout-sdk.git`]}],github:{connection:`github`,owner:`imagile`,repo:`payments-web`,projects:[`7`],readiness:{minWords:10,templates:[[`## What`,`## Why`,`## Acceptance criteria`].join(`
46
- `)]}},"bitbucket-cloud":{connection:`bitbucket-cloud`,workspace:`imagile`,repo:`checkout-sdk`},environments:{staging:{openshift:{connection:`ocp-nonprod`,namespace:`checkout-staging`}},prod:{openshift:{connection:`ocp-prod`,namespace:`checkout-prod`}}},people:[{name:`Ada D.`,ids:{github:`ada-dev`,"bitbucket-cloud":`557058:abc12345-0000-0000-0000-000000000020`}},{name:`Bo W.`,ids:{github:`bo-web`}},{name:`Claude`,kind:`agent`,ids:{}}],wipLimit:2}],cz=`/home/you/.toil/dossiers`,lz=e=>`${cz}/${e}.json`,uz={jira:[`project`],bitbucket:[`project`,`repo`],"bitbucket-cloud":[`workspace`,`repo`],jenkins:[`instance`],ado:[`collection`,`organization`,`project`,`repo`],github:[`owner`,`repo`],openshift:[`instance`]},dz=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function fz(e){let{name:t,description:n,env:r,repos:i,environments:a,people:o,wipLimit:s,...c}=e,l=new Set([...Object.keys(c),...Object.values(a??{}).flatMap(e=>Object.keys(e))]),u={};for(let e of[...l].sort()){let t=(r===void 0?void 0:a?.[r]?.[e])??(dz(c[e])?c[e]:{}),n=Object.fromEntries((uz[e]??[]).flatMap(e=>typeof t[e]==`string`?[[e,t[e]]]:[]));u[e]={connection:typeof t.connection==`string`?{value:t.connection,source:`dossier`}:null,writes:!1,env:e===`openshift`?r??null:null,inputs:n}}return{name:t,source:`user`,file:lz(t),by:`input`,match:null,repo:null,adopted:!0,areas:u,dossier:{name:t,description:n,...r?{env:r}:{},repos:i,...c,...a?{environments:a}:{},...o?{people:o}:{},...s?{wipLimit:s}:{}},problems:[]}}function pz(){return{folder:null,places:{user:cz,listed:[],repo:null},dossiers:sz.map(e=>({name:e.name,description:e.description,source:`user`,file:lz(e.name),shadowedBy:null,problems:0})),broken:[]}}var mz=`0.1.0-alpha.1`,hz=`https://jira.imagile.dev`,gz=`https://ado.imagile.dev/DefaultCollection`,_z=`https://ghe.imagile.dev`,vz=`${_z}/api/v3`,yz=(e,t,n,r={})=>({ok:!0,data:t,error:null,meta:{command:e,durationMs:412,version:mz,context:{connection:{value:n,source:`default`,default:`named`},...Object.keys(r).length?{inputs:Object.fromEntries(Object.entries(r).map(([e,t])=>[e,{value:t,source:`dossier`}]))}:{}}}}),bz=(e,t)=>({self:`${hz}/rest/api/2/user?username=${e}`,name:e,key:e,displayName:t,active:!0}),xz=bz(`jsmith`,`J. Smith`),Sz=bz(`achen`,`A. Chen`),Cz=bz(`rpatel`,`R. Patel`),wz={todo:{name:`To Do`,id:`10000`,statusCategory:{id:2,key:`new`,name:`To Do`}},progress:{name:`In Progress`,id:`3`,statusCategory:{id:4,key:`indeterminate`,name:`In Progress`}},review:{name:`In Review`,id:`10100`,statusCategory:{id:4,key:`indeterminate`,name:`In Progress`}},done:{name:`Done`,id:`10001`,statusCategory:{id:3,key:`done`,name:`Done`}}},Tz={epic:{name:`Epic`,id:`10000`,subtask:!1},story:{name:`Story`,id:`10001`,subtask:!1},bug:{name:`Bug`,id:`1`,subtask:!1},subtask:{name:`Sub-task`,id:`10003`,subtask:!0}},Ez=(e,t,n,r)=>`com.atlassian.greenhopper.service.sprint.Sprint@6f3a${e}[id=${e},rapidViewId=7,state=${t},name=Sprint ${e},startDate=${n},endDate=${r},completeDate=${t===`CLOSED`?r:`<null>`},sequence=${e},goal=]`,Dz=Ez(40,`CLOSED`,`2026-09-07T09:00:00.000Z`,`2026-09-18T17:00:00.000Z`),Oz=Ez(41,`CLOSED`,`2026-09-21T09:00:00.000Z`,`2026-10-02T17:00:00.000Z`),kz=Ez(42,`ACTIVE`,`2026-10-05T09:00:00.000Z`,`2026-10-16T17:00:00.000Z`),Az=(e,t,n,r)=>({id:String(r),type:e===`Blocks`?{id:`10000`,name:`Blocks`,inward:`is blocked by`,outward:`blocks`}:{id:`10003`,name:`Relates`,inward:`relates to`,outward:`relates to`},[t===`outward`?`outwardIssue`:`inwardIssue`]:{key:n,fields:{}}}),jz=(e,t)=>({expand:`renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations`,id:String(20100+t),self:`${hz}/rest/api/2/issue/${20100+t}`,key:e.key,fields:{summary:e.summary,description:e.description??null,issuetype:{self:`${hz}/rest/api/2/issuetype/${Tz[e.type].id}`,...Tz[e.type]},status:{self:`${hz}/rest/api/2/status/${wz[e.status].id}`,...wz[e.status]},resolution:e.resolved?{self:`${hz}/rest/api/2/resolution/10000`,id:`10000`,name:`Done`}:null,resolutiondate:e.resolved??null,priority:{self:`${hz}/rest/api/2/priority/3`,name:e.priority??`Medium`,id:`3`},assignee:e.assignee??null,reporter:Cz,labels:e.labels??[`payments`],project:{self:`${hz}/rest/api/2/project/10200`,id:`10200`,key:`PAY`,name:`Payments`},created:e.created,updated:e.updated,duedate:null,timeoriginalestimate:null,issuelinks:e.links??[],subtasks:(e.subtasks??[]).map(e=>({key:e,fields:{}})),...e.parent?{parent:{key:e.parent,fields:{}}}:{},"Story Points":e.points??null,Sprint:e.sprints??null,"Epic Link":e.epic??null}}),Mz=[{key:`PAY-92`,type:`story`,summary:`Mask card numbers in the gateway logs`,status:`done`,assignee:xz,points:3,sprints:[Dz],created:`2026-09-01T09:00:00.000+0000`,updated:`2026-09-17T14:00:00.000+0000`,resolved:`2026-09-17T14:00:00.000+0000`},{key:`PAY-95`,type:`story`,summary:`Look up the card scheme from the BIN`,status:`done`,assignee:Sz,points:3,sprints:[Oz],created:`2026-09-08T11:00:00.000+0000`,updated:`2026-09-25T11:00:00.000+0000`,resolved:`2026-09-25T11:00:00.000+0000`},{key:`PAY-97`,type:`bug`,summary:`A double click charges twice`,status:`done`,assignee:xz,points:2,sprints:[Oz],created:`2026-09-16T08:20:00.000+0000`,updated:`2026-09-30T16:00:00.000+0000`,resolved:`2026-09-30T16:00:00.000+0000`,priority:`High`},{key:`PAY-98`,type:`story`,summary:`Decline codes in the merchant report`,status:`done`,assignee:Cz,points:5,sprints:[Oz],created:`2026-09-10T10:00:00.000+0000`,updated:`2026-10-02T15:00:00.000+0000`,resolved:`2026-10-02T15:00:00.000+0000`},{key:`PAY-100`,type:`epic`,summary:`Card payments v2`,status:`progress`,assignee:Cz,created:`2026-08-31T10:00:00.000+0000`,updated:`2026-10-09T11:00:00.000+0000`,description:`h2. Goal
47
- Store cards as tokens and charge them without the PAN leaving the edge.`},{key:`PAY-101`,type:`story`,summary:`Tokenise card numbers at the edge`,status:`progress`,assignee:xz,points:5,sprints:[kz],epic:`PAY-100`,subtasks:[`PAY-106`],links:[Az(`Blocks`,`outward`,`PAY-102`,30001)],created:`2026-09-14T09:30:00.000+0000`,updated:`2026-10-08T16:10:00.000+0000`,priority:`High`,description:`The gateway swaps the PAN for a token before anything is logged.
44
+ `),ZL(`c0de0e5`),`${CR}`;var FR=`https://bitbucket-cloud.imagile.dev`,IR=(e,t,n)=>({display_name:t,nickname:e,type:`user`,uuid:`{abc12345-0000-0000-0000-0000000000${n}0}`,account_id:`557058:abc12345-0000-0000-0000-0000000000${n}0`}),LR=IR(`bo-web`,`Bo W.`,1),RR=IR(`ada-dev`,`Ada D.`,2),zR={full_name:`imagile/checkout-sdk`,name:`checkout-sdk`,type:`repository`,uuid:`{abc12345-0000-0000-0000-000000000700}`},BR=e=>({type:`pullrequest`,id:e.id,title:e.title,description:e.description,summary:{type:`rendered`,raw:e.description,markup:`markdown`},state:e.state,draft:!1,author:e.author,source:{branch:{name:e.branch},commit:{hash:e.head.padEnd(12,`0`)},repository:zR},destination:{branch:{name:`main`},commit:{hash:`a0a0a0a0a0a0`},repository:zR},...e.merge?{merge_commit:{hash:e.merge.padEnd(12,`0`)}}:{merge_commit:null},comment_count:0,task_count:0,close_source_branch:!0,created_on:e.created,updated_on:e.updated,reviewers:e.reviewers.map(e=>e.user),participants:e.reviewers.map(t=>({type:`participant`,user:t.user,role:`REVIEWER`,approved:t.state===`approved`,state:t.state,participated_on:t.state?e.updated:null})),links:{html:{href:`${FR}/imagile/checkout-sdk/pull-requests/${e.id}`},self:{href:`${FR}/2.0/repositories/imagile/checkout-sdk/pullrequests/${e.id}`}}}),VR=e=>({...BR(e),included:{reviews:e.approvals.map(t=>({approval:{date:t.at,user:t.user,pullrequest:{id:e.id,type:`pullrequest`}},pull_request:{id:e.id,type:`pullrequest`}})),checks:e.statuses.map((t,n)=>({type:`commitstatus`,key:`checkout-sdk-ci-${n}`,name:`checkout-sdk CI`,state:t.state,url:`${FR}/imagile/checkout-sdk/pipelines/results/${e.id*10+n}`,created_on:t.at,updated_on:t.at})),commits:e.commits.map((t,n)=>({type:`commit`,hash:`${e.head}${n}`.padEnd(40,`0`),message:t,author:{type:`author`,raw:`${e.author.display_name} <you@example.com>`},date:e.created})),files:e.files.map(e=>({type:`diffstat`,status:`modified`,lines_added:e.added,lines_removed:e.removed,old:{path:e.path,type:`commit_file`},new:{path:e.path,type:`commit_file`}}))}}),HR=[{id:12,title:`Format receipt totals in the order currency`,description:`The SDK side of imagile/payments-web#44.`,state:`OPEN`,author:LR,branch:`copilot/receipt-currency`,head:`12ab3c4`,created:`2026-10-10T11:00:00.000000+00:00`,updated:`2026-10-10T11:25:00.000000+00:00`,reviewers:[{user:RR,state:null}],approvals:[],statuses:[{state:`SUCCESSFUL`,at:`2026-10-10T11:25:00.000000+00:00`}],commits:[`Format totals with Intl.NumberFormat`],files:[{path:`src/money.ts`,added:22,removed:7}]},{id:9,title:`Saved-card hooks`,description:`useSavedCards and useDefaultCard, for imagile/payments-web#42.`,state:`MERGED`,author:RR,branch:`feature/saved-card-hooks`,head:`09cd5e6`,merge:`9f1e2d3`,created:`2026-10-06T08:30:00.000000+00:00`,updated:`2026-10-07T12:00:00.000000+00:00`,reviewers:[{user:LR,state:`approved`}],approvals:[{user:LR,at:`2026-10-07T10:00:00.000000+00:00`}],statuses:[{state:`SUCCESSFUL`,at:`2026-10-06T08:50:00.000000+00:00`}],commits:[`Add useSavedCards`,`Add useDefaultCard`],files:[{path:`src/hooks/saved-cards.ts`,added:120,removed:0},{path:`src/hooks/saved-cards.test.ts`,added:64,removed:0}]}],UR=HR.map(BR),WR=Object.fromEntries(HR.map(e=>[e.id,VR(e)])),GR={project:`PAY`,repo:`payments-core`},KR={collection:`DefaultCollection`,project:`Payments`,repo:`settlement`},qR={owner:`imagile`,repo:`payments-web`},JR={workspace:`imagile`,repo:`checkout-sdk`};`${[$L(`bitbucket pr list`,dR,`corp-bitbucket`,GR),...Object.values(fR).map(e=>$L(`bitbucket pr get`,e,`corp-bitbucket`,GR)),$L(`ado pr list`,xR,`corp-ado`,KR),...Object.values(SR).map(e=>$L(`ado pr get`,e,`corp-ado`,KR)),$L(`github pr list`,NR,`github`,qR),...Object.values(PR).map(e=>$L(`github pr get`,e,`github`,qR)),$L(`bitbucket-cloud pr list`,UR,`bitbucket-cloud`,JR),...Object.values(WR).map(e=>$L(`bitbucket-cloud pr get`,e,`bitbucket-cloud`,JR))].map(e=>JSON.stringify(e)).join(`
45
+ `)}`;var YR=e=>Date.parse(e),XR=e=>e.padEnd(40,`0`),ZR=`https://jenkins.imagile.dev`,QR=(e,t,n,r,i)=>({number:t,url:`${ZR}/job/payments-core/job/PR-${e}/${t}/`,result:n,duration:n===null?0:i,timestamp:YR(r),building:n===null,displayName:`#${t}`,fullDisplayName:`payments-core » PR-${e} #${t}`,description:null,id:String(t),queueId:9e3+e*10+t}),$R={311:[QR(311,2,`FAILURE`,`2026-10-12T16:05:00.000Z`,412e3),QR(311,1,`FAILURE`,`2026-10-12T15:35:00.000Z`,398e3)],305:[QR(305,1,`SUCCESS`,`2026-10-07T10:40:00.000Z`,455e3)],298:[QR(298,3,`SUCCESS`,`2026-10-09T14:20:00.000Z`,441e3)],296:[QR(296,1,`SUCCESS`,`2026-10-07T11:10:00.000Z`,43e4)],290:[QR(290,1,`SUCCESS`,`2026-09-30T09:30:00.000Z`,42e4)]},ez=(e,t,n,r,i,a)=>({name:e,ready:`${r}/${i}`,desiredReplicas:i,readyReplicas:r,updatedReplicas:r,availableReplicas:r,unavailableReplicas:i-r,age:a,images:[{name:e,image:t}],strategy:`RollingUpdate`,labels:{"app.kubernetes.io/name":e,"app.kubernetes.io/version":n}}),tz=(e,t)=>({namespace:e,kind:`Deployment`,count:t.length,deployments:t}),nz={"payments-dev":tz(`payments-dev`,[ez(`payments-core`,`artifactory.imagile.dev/payments/payments-core:1.14.0-4e1d2a9`,`1.14.0`,2,2,`3d`)]),"payments-prod":tz(`payments-prod`,[ez(`payments-core`,`artifactory.imagile.dev/payments/payments-core:1.13.2-1a2b3c4`,`1.13.2`,3,3,`13d`)]),"checkout-staging":tz(`checkout-staging`,[ez(`payments-web`,`artifactory.imagile.dev/checkout/payments-web:2026.10.12-5a7e3f1`,`2026.10.12`,2,2,`18h`)]),"checkout-prod":tz(`checkout-prod`,[ez(`payments-web`,`artifactory.imagile.dev/checkout/payments-web:2026.10.02-1c9b8e4`,`2026.10.02`,4,4,`11d`)])},rz=`https://ado.imagile.dev/DefaultCollection`,iz={displayName:`D. Okafor`,uniqueName:`IMAGILE\\dokafor`,id:`abc12345-0000-0000-0000-000000000070`,descriptor:`win.dokafor`},az=e=>({id:e.id,buildNumber:e.number,status:e.status,...e.result?{result:e.result}:{},queueTime:e.at,startTime:e.at,...e.status===`completed`?{finishTime:e.at}:{},sourceBranch:e.branch,sourceVersion:XR(e.commit),definition:{...e.definition,path:`\\`},project:{name:`Payments`},reason:e.pr?`pullRequest`:`individualCI`,...e.pr?{triggerInfo:{"pr.number":String(e.pr),"pr.sourceBranch":`refs/heads/feature/${e.pr}`}}:{},...e.environment?{templateParameters:{environment:e.environment}}:{},requestedFor:iz,_links:{web:{href:`${rz}/Payments/_build/results?buildId=${e.id}`}},url:`${rz}/Payments/_apis/build/Builds/${e.id}`}),oz={id:12,name:`settlement-ci`},sz={id:13,name:`settlement-deploy`};az({id:5530,definition:oz,number:`20261013.1`,status:`inProgress`,branch:`refs/pull/87/merge`,commit:`87ab3e2`,at:`2026-10-13T07:55:00Z`,pr:87}),az({id:5512,definition:oz,number:`20261008.3`,status:`completed`,result:`succeeded`,branch:`refs/pull/84/merge`,commit:`84cd1f9`,at:`2026-10-08T12:10:00Z`,pr:84}),az({id:5461,definition:oz,number:`20261001.2`,status:`completed`,result:`succeeded`,branch:`refs/pull/80/merge`,commit:`80ef2a1`,at:`2026-10-01T10:30:00Z`,pr:80}),az({id:5521,definition:sz,number:`20261008.1`,status:`completed`,result:`succeeded`,branch:`refs/heads/main`,commit:`c84e5f0`,at:`2026-10-08T14:00:00Z`,environment:`test`}),az({id:5470,definition:sz,number:`20261002.1`,status:`completed`,result:`succeeded`,branch:`refs/heads/main`,commit:`b80a1d2`,at:`2026-10-02T16:00:00Z`,environment:`prod`}),az({id:5466,definition:sz,number:`20261001.1`,status:`completed`,result:`succeeded`,branch:`refs/heads/main`,commit:`b80a1d2`,at:`2026-10-01T13:00:00Z`,environment:`test`});var cz=[{name:`card-payments`,description:`Card payments v2: tokenised cards at the edge. Jira, Bitbucket, Jenkins and OpenShift.`,env:`dev`,repos:[{name:`payments-core`,remotes:[`ssh://git@bitbucket.imagile.dev:7999/pay/payments-core.git`]}],jira:{connection:`corp-jira`,project:`PAY`,fields:{acceptanceCriteria:`customfield_10500`},readiness:{minWords:20}},bitbucket:{connection:`corp-bitbucket`,project:`PAY`,repo:`payments-core`},jenkins:{connection:`corp-jenkins`,jobs:[`payments-core`]},environments:{dev:{openshift:{connection:`ocp-nonprod`,namespace:`payments-dev`}},prod:{openshift:{connection:`ocp-prod`,namespace:`payments-prod`}}},people:[{name:`J. Smith`,ids:{jira:`jsmith`,bitbucket:`jsmith`}},{name:`A. Chen`,email:`you@example.com`,ids:{jira:`achen`}},{name:`R. Patel`,ids:{jira:`rpatel`}}],wipLimit:2},{name:`settlement`,description:`Daily settlement reports for finance. Azure DevOps Server: Boards, Repos and Pipelines.`,repos:[{name:`settlement`,remotes:[`https://ado.imagile.dev/DefaultCollection/Payments/_git/settlement`]}],ado:{connection:`corp-ado`,collection:`DefaultCollection`,project:`Payments`,repo:`settlement`,builds:[`settlement-ci`],deployments:[`settlement-deploy`]}},{name:`checkout-web`,description:`The checkout web front end and its SDK. GitHub Enterprise with Projects and Actions, Bitbucket Cloud for the SDK, deployed on OpenShift.`,env:`staging`,repos:[{name:`payments-web`,remotes:[`https://ghe.imagile.dev/imagile/payments-web.git`]},{name:`checkout-sdk`,remotes:[`https://bitbucket-cloud.imagile.dev/imagile/checkout-sdk.git`]}],github:{connection:`github`,owner:`imagile`,repo:`payments-web`,projects:[`7`],readiness:{minWords:10,templates:[[`## What`,`## Why`,`## Acceptance criteria`].join(`
46
+ `)]}},"bitbucket-cloud":{connection:`bitbucket-cloud`,workspace:`imagile`,repo:`checkout-sdk`},environments:{staging:{openshift:{connection:`ocp-nonprod`,namespace:`checkout-staging`}},prod:{openshift:{connection:`ocp-prod`,namespace:`checkout-prod`}}},people:[{name:`Ada D.`,ids:{github:`ada-dev`,"bitbucket-cloud":`557058:abc12345-0000-0000-0000-000000000020`}},{name:`Bo W.`,ids:{github:`bo-web`}},{name:`Claude`,kind:`agent`,ids:{}}],wipLimit:2}],lz=`/home/you/.toil/dossiers`,uz=e=>`${lz}/${e}.json`,dz={jira:[`project`],"jira-cloud":[`project`],bitbucket:[`project`,`repo`],"bitbucket-cloud":[`workspace`,`repo`],jenkins:[`instance`],ado:[`collection`,`organization`,`project`,`repo`],github:[`owner`,`repo`],openshift:[`instance`]},fz=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function pz(e){let{name:t,description:n,env:r,repos:i,environments:a,people:o,wipLimit:s,...c}=e,l=new Set([...Object.keys(c),...Object.values(a??{}).flatMap(e=>Object.keys(e))]),u={};for(let e of[...l].sort()){let t=(r===void 0?void 0:a?.[r]?.[e])??(fz(c[e])?c[e]:{}),n=Object.fromEntries((dz[e]??[]).flatMap(e=>typeof t[e]==`string`?[[e,t[e]]]:[]));u[e]={connection:typeof t.connection==`string`?{value:t.connection,source:`dossier`}:null,writes:!1,env:e===`openshift`?r??null:null,inputs:n}}return{name:t,source:`user`,file:uz(t),by:`input`,match:null,repo:null,adopted:!0,areas:u,dossier:{name:t,description:n,...r?{env:r}:{},repos:i,...c,...a?{environments:a}:{},...o?{people:o}:{},...s?{wipLimit:s}:{}},problems:[]}}function mz(){return{folder:null,places:{user:lz,listed:[],repo:null},dossiers:cz.map(e=>({name:e.name,description:e.description,source:`user`,file:uz(e.name),shadowedBy:null,problems:0})),broken:[]}}var hz=`0.1.0-alpha.1`,gz=`https://jira.imagile.dev`,_z=`https://ado.imagile.dev/DefaultCollection`,vz=`https://ghe.imagile.dev`,yz=`${vz}/api/v3`,bz=(e,t,n,r={})=>({ok:!0,data:t,error:null,meta:{command:e,durationMs:412,version:hz,context:{connection:{value:n,source:`default`,default:`named`},...Object.keys(r).length?{inputs:Object.fromEntries(Object.entries(r).map(([e,t])=>[e,{value:t,source:`dossier`}]))}:{}}}}),xz=(e,t)=>({self:`${gz}/rest/api/2/user?username=${e}`,name:e,key:e,displayName:t,active:!0}),Sz=xz(`jsmith`,`J. Smith`),Cz=xz(`achen`,`A. Chen`),wz=xz(`rpatel`,`R. Patel`),Tz={todo:{name:`To Do`,id:`10000`,statusCategory:{id:2,key:`new`,name:`To Do`}},progress:{name:`In Progress`,id:`3`,statusCategory:{id:4,key:`indeterminate`,name:`In Progress`}},review:{name:`In Review`,id:`10100`,statusCategory:{id:4,key:`indeterminate`,name:`In Progress`}},done:{name:`Done`,id:`10001`,statusCategory:{id:3,key:`done`,name:`Done`}}},Ez={epic:{name:`Epic`,id:`10000`,subtask:!1},story:{name:`Story`,id:`10001`,subtask:!1},bug:{name:`Bug`,id:`1`,subtask:!1},subtask:{name:`Sub-task`,id:`10003`,subtask:!0}},Dz=(e,t,n,r)=>`com.atlassian.greenhopper.service.sprint.Sprint@6f3a${e}[id=${e},rapidViewId=7,state=${t},name=Sprint ${e},startDate=${n},endDate=${r},completeDate=${t===`CLOSED`?r:`<null>`},sequence=${e},goal=]`,Oz=Dz(40,`CLOSED`,`2026-09-07T09:00:00.000Z`,`2026-09-18T17:00:00.000Z`),kz=Dz(41,`CLOSED`,`2026-09-21T09:00:00.000Z`,`2026-10-02T17:00:00.000Z`),Az=Dz(42,`ACTIVE`,`2026-10-05T09:00:00.000Z`,`2026-10-16T17:00:00.000Z`),jz=(e,t,n,r)=>({id:String(r),type:e===`Blocks`?{id:`10000`,name:`Blocks`,inward:`is blocked by`,outward:`blocks`}:{id:`10003`,name:`Relates`,inward:`relates to`,outward:`relates to`},[t===`outward`?`outwardIssue`:`inwardIssue`]:{key:n,fields:{}}}),Mz=(e,t)=>({expand:`renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations`,id:String(20100+t),self:`${gz}/rest/api/2/issue/${20100+t}`,key:e.key,fields:{summary:e.summary,description:e.description??null,issuetype:{self:`${gz}/rest/api/2/issuetype/${Ez[e.type].id}`,...Ez[e.type]},status:{self:`${gz}/rest/api/2/status/${Tz[e.status].id}`,...Tz[e.status]},resolution:e.resolved?{self:`${gz}/rest/api/2/resolution/10000`,id:`10000`,name:`Done`}:null,resolutiondate:e.resolved??null,priority:{self:`${gz}/rest/api/2/priority/3`,name:e.priority??`Medium`,id:`3`},assignee:e.assignee??null,reporter:wz,labels:e.labels??[`payments`],project:{self:`${gz}/rest/api/2/project/10200`,id:`10200`,key:`PAY`,name:`Payments`},created:e.created,updated:e.updated,duedate:null,timeoriginalestimate:null,issuelinks:e.links??[],subtasks:(e.subtasks??[]).map(e=>({key:e,fields:{}})),...e.parent?{parent:{key:e.parent,fields:{}}}:{},"Story Points":e.points??null,Sprint:e.sprints??null,"Epic Link":e.epic??null}}),Nz=[{key:`PAY-92`,type:`story`,summary:`Mask card numbers in the gateway logs`,status:`done`,assignee:Sz,points:3,sprints:[Oz],created:`2026-09-01T09:00:00.000+0000`,updated:`2026-09-17T14:00:00.000+0000`,resolved:`2026-09-17T14:00:00.000+0000`},{key:`PAY-95`,type:`story`,summary:`Look up the card scheme from the BIN`,status:`done`,assignee:Cz,points:3,sprints:[kz],created:`2026-09-08T11:00:00.000+0000`,updated:`2026-09-25T11:00:00.000+0000`,resolved:`2026-09-25T11:00:00.000+0000`},{key:`PAY-97`,type:`bug`,summary:`A double click charges twice`,status:`done`,assignee:Sz,points:2,sprints:[kz],created:`2026-09-16T08:20:00.000+0000`,updated:`2026-09-30T16:00:00.000+0000`,resolved:`2026-09-30T16:00:00.000+0000`,priority:`High`},{key:`PAY-98`,type:`story`,summary:`Decline codes in the merchant report`,status:`done`,assignee:wz,points:5,sprints:[kz],created:`2026-09-10T10:00:00.000+0000`,updated:`2026-10-02T15:00:00.000+0000`,resolved:`2026-10-02T15:00:00.000+0000`},{key:`PAY-100`,type:`epic`,summary:`Card payments v2`,status:`progress`,assignee:wz,created:`2026-08-31T10:00:00.000+0000`,updated:`2026-10-09T11:00:00.000+0000`,description:`h2. Goal
47
+ Store cards as tokens and charge them without the PAN leaving the edge.`},{key:`PAY-101`,type:`story`,summary:`Tokenise card numbers at the edge`,status:`progress`,assignee:Sz,points:5,sprints:[Az],epic:`PAY-100`,subtasks:[`PAY-106`],links:[jz(`Blocks`,`outward`,`PAY-102`,30001)],created:`2026-09-14T09:30:00.000+0000`,updated:`2026-10-08T16:10:00.000+0000`,priority:`High`,description:`The gateway swaps the PAN for a token before anything is logged.
48
48
 
49
49
  * PAN never reaches the app tier
50
- * Token format agreed with the vault team`},{key:`PAY-102`,type:`story`,summary:`Store tokens in the vault`,status:`todo`,assignee:Sz,points:3,sprints:[kz],epic:`PAY-100`,links:[Az(`Blocks`,`inward`,`PAY-101`,30001),Az(`Blocks`,`outward`,`PAY-103`,30002)],created:`2026-09-14T09:35:00.000+0000`,updated:`2026-10-05T09:10:00.000+0000`},{key:`PAY-103`,type:`story`,summary:`Charge a stored token`,status:`todo`,points:8,sprints:[kz],epic:`PAY-100`,links:[Az(`Blocks`,`inward`,`PAY-102`,30002)],created:`2026-09-14T09:40:00.000+0000`,updated:`2026-10-05T09:10:00.000+0000`},{key:`PAY-104`,type:`bug`,summary:`Refund total rounds half-cents down`,status:`review`,assignee:Sz,points:2,sprints:[Oz,kz],created:`2026-09-22T13:00:00.000+0000`,updated:`2026-10-07T10:20:00.000+0000`,priority:`High`,labels:[`payments`,`refunds`]},{key:`PAY-105`,type:`story`,summary:`Show the last four digits on receipts`,status:`done`,assignee:xz,points:3,sprints:[kz],epic:`PAY-100`,created:`2026-09-15T08:00:00.000+0000`,updated:`2026-10-09T15:30:00.000+0000`,resolved:`2026-10-09T15:30:00.000+0000`},{key:`PAY-106`,type:`subtask`,summary:`Add the tokeniser to the gateway config`,status:`done`,assignee:xz,parent:`PAY-101`,sprints:[kz],created:`2026-10-05T10:00:00.000+0000`,updated:`2026-10-07T12:00:00.000+0000`,resolved:`2026-10-07T12:00:00.000+0000`},{key:`PAY-107`,type:`story`,summary:`Retry declined charges once`,status:`todo`,sprints:[kz],links:[Az(`Relates`,`outward`,`PAY-103`,30003)],created:`2026-10-08T13:45:00.000+0000`,updated:`2026-10-08T14:00:00.000+0000`}],Nz=(e,t,n,r)=>({id:String(e),author:t,created:n,items:r}),Pz=(e,t)=>({field:`status`,fieldtype:`jira`,from:wz[e].id,fromString:wz[e].name,to:wz[t].id,toString:wz[t].name}),Fz=(e,t)=>({field:`Sprint`,fieldtype:`custom`,from:null,fromString:e,to:null,toString:t}),Iz={"PAY-92":[Nz(40001,xz,`2026-09-09T10:00:00.000+0000`,[Pz(`todo`,`progress`)]),Nz(40002,xz,`2026-09-17T14:00:00.000+0000`,[Pz(`progress`,`done`)])],"PAY-95":[Nz(40011,Sz,`2026-09-22T10:00:00.000+0000`,[Pz(`todo`,`progress`)]),Nz(40012,Sz,`2026-09-24T15:00:00.000+0000`,[Pz(`progress`,`review`)]),Nz(40013,xz,`2026-09-25T11:00:00.000+0000`,[Pz(`review`,`done`)])],"PAY-97":[Nz(40021,xz,`2026-09-23T09:00:00.000+0000`,[Pz(`todo`,`progress`)]),Nz(40022,Sz,`2026-09-30T16:00:00.000+0000`,[Pz(`progress`,`done`)])],"PAY-98":[Nz(40031,Cz,`2026-09-21T14:00:00.000+0000`,[Pz(`todo`,`progress`)]),Nz(40032,Cz,`2026-10-01T10:00:00.000+0000`,[Pz(`progress`,`review`)]),Nz(40033,Sz,`2026-10-02T15:00:00.000+0000`,[Pz(`review`,`done`)])],"PAY-101":[Nz(40101,xz,`2026-10-06T09:15:00.000+0000`,[Pz(`todo`,`progress`)])],"PAY-104":[Nz(40201,Sz,`2026-09-29T10:00:00.000+0000`,[Pz(`todo`,`progress`)]),Nz(40202,Cz,`2026-10-05T09:05:00.000+0000`,[Fz(`Sprint 41`,`Sprint 41, Sprint 42`)]),Nz(40203,Sz,`2026-10-07T10:20:00.000+0000`,[Pz(`progress`,`review`)])],"PAY-105":[Nz(40301,xz,`2026-10-06T11:00:00.000+0000`,[Pz(`todo`,`progress`)]),Nz(40302,xz,`2026-10-08T17:00:00.000+0000`,[Pz(`progress`,`review`)]),Nz(40303,Sz,`2026-10-09T15:30:00.000+0000`,[Pz(`review`,`done`)])],"PAY-107":[Nz(40401,Cz,`2026-10-08T14:00:00.000+0000`,[Fz(``,`Sprint 42`)])]},Lz=(e,t)=>({displayName:t,url:`https://ado.imagile.dev/_apis/Identities/abc12345-0000-0000-0000-0000000000${e.length}0`,id:`abc12345-0000-0000-0000-0000000000${e.length}0`,uniqueName:`IMAGILE\\${e}`,descriptor:`win.abc12345${e}`}),Rz=Lz(`dokafor`,`D. Okafor`),zz=Lz(`mlind`,`M. Lind`),Bz=Lz(`knakamura`,`K. Nakamura`),Vz=(e,t)=>({rel:e,url:`${gz}/_apis/wit/workItems/${t}`,attributes:{isLocked:!1,name:e.split(`.`).pop()}}),Hz=e=>({id:e.id,rev:6,fields:{"System.AreaPath":`Payments\\Settlement`,"System.TeamProject":`Payments`,"System.IterationPath":e.iteration,"System.WorkItemType":e.type,"System.State":e.state,"System.Reason":e.reason,...e.assignee?{"System.AssignedTo":e.assignee}:{},"System.CreatedDate":e.created,"System.CreatedBy":Bz,"System.ChangedDate":e.changed,"System.ChangedBy":e.assignee??Bz,"System.Title":e.title,...e.description?{"System.Description":e.description}:{},"Microsoft.VSTS.Common.Priority":2,...e.points===void 0?{}:{"Microsoft.VSTS.Scheduling.StoryPoints":e.points},...e.hours===void 0?{}:{"Microsoft.VSTS.Scheduling.OriginalEstimate":e.hours},...e.teamPoints===void 0?{}:{"Custom.TeamPoints":e.teamPoints},...e.closed?{"Microsoft.VSTS.Common.ClosedDate":e.closed}:{},"System.Tags":e.tags??`settlement`},relations:e.relations??[],_links:{self:{href:`${gz}/_apis/wit/workItems/${e.id}`},html:{href:`${gz}/Payments/_workitems/edit/${e.id}`}},url:`${gz}/_apis/wit/workItems/${e.id}`}),Uz=`Payments\\Sprint 42`,Wz=[{id:2290,type:`User Story`,title:`Read settlement batches from the ledger`,state:`Closed`,reason:`Acceptance tests pass`,assignee:Rz,iteration:`Payments\\Sprint 40`,points:3,teamPoints:3,created:`2026-09-01T09:00:00Z`,changed:`2026-09-15T16:00:00Z`,closed:`2026-09-15T16:00:00Z`},{id:2294,type:`Bug`,title:`Batch totals ignore refunds`,state:`Closed`,reason:`Fixed and verified`,assignee:zz,iteration:`Payments\\Sprint 41`,points:2,teamPoints:2,created:`2026-09-14T13:00:00Z`,changed:`2026-09-26T11:30:00Z`,closed:`2026-09-26T11:30:00Z`},{id:2297,type:`User Story`,title:`Group settlements by merchant`,state:`Closed`,reason:`Acceptance tests pass`,assignee:Rz,iteration:`Payments\\Sprint 41`,points:5,teamPoints:5,created:`2026-09-15T10:00:00Z`,changed:`2026-10-01T15:00:00Z`,closed:`2026-10-01T15:00:00Z`},{id:2301,type:`Feature`,title:`Settlement reports`,state:`Active`,reason:`Implementation started`,assignee:Bz,iteration:`Payments`,relations:[Vz(`System.LinkTypes.Hierarchy-Forward`,2302),Vz(`System.LinkTypes.Hierarchy-Forward`,2303)],created:`2026-08-24T14:00:00Z`,changed:`2026-10-05T09:30:00Z`},{id:2302,type:`User Story`,title:`Export the daily settlement CSV`,state:`Active`,reason:`Implementation started`,assignee:Rz,iteration:Uz,points:5,teamPoints:5,relations:[Vz(`System.LinkTypes.Hierarchy-Reverse`,2301),Vz(`System.LinkTypes.Dependency-Forward`,2303),Vz(`System.LinkTypes.Hierarchy-Forward`,2305)],created:`2026-09-10T10:00:00Z`,changed:`2026-10-06T08:45:00Z`,description:`<div>One CSV per merchant, written at 02:00 UTC.</div>`},{id:2303,type:`User Story`,title:`Email the settlement report to finance`,state:`New`,reason:`New`,iteration:Uz,points:3,teamPoints:3,relations:[Vz(`System.LinkTypes.Hierarchy-Reverse`,2301),Vz(`System.LinkTypes.Dependency-Reverse`,2302)],created:`2026-09-10T10:05:00Z`,changed:`2026-10-05T09:30:00Z`},{id:2304,type:`Bug`,title:`Settlement totals are a day early in UTC-5`,state:`Active`,reason:`Approved`,assignee:zz,iteration:Uz,points:2,teamPoints:2,created:`2026-09-24T16:20:00Z`,changed:`2026-10-07T11:00:00Z`,tags:`settlement; timezones`},{id:2305,type:`Task`,title:`Schedule the export job`,state:`Closed`,reason:`Completed`,assignee:Rz,iteration:Uz,hours:4,relations:[Vz(`System.LinkTypes.Hierarchy-Reverse`,2302)],created:`2026-10-05T10:00:00Z`,changed:`2026-10-08T13:00:00Z`,closed:`2026-10-08T13:00:00Z`},{id:2306,type:`User Story`,title:`Reconcile chargebacks against settlements`,state:`New`,reason:`New`,iteration:Uz,points:5,created:`2026-10-02T09:00:00Z`,changed:`2026-10-09T10:15:00Z`},{id:2307,type:`Bug`,title:`Retire the legacy settlement endpoint`,state:`Removed`,reason:`Removed from the backlog`,iteration:Uz,points:1,created:`2026-09-01T09:00:00Z`,changed:`2026-10-07T09:00:00Z`,closed:`2026-10-07T09:00:00Z`}],Gz=(e,t,n,r,i,a)=>({id:e,rev:t,fields:{"System.WorkItemType":e===2304||e===2294?`Bug`:`User Story`,"System.State":i,"System.IterationPath":a,"System.ChangedDate":n,"System.ChangedBy":r},url:`${gz}/_apis/wit/workItems/${e}/revisions/${t}`}),Kz=`Payments\\Sprint 40`,qz=`Payments\\Sprint 41`,Jz={2290:[Gz(2290,1,`2026-09-01T09:00:00Z`,Bz,`New`,`Payments`),Gz(2290,2,`2026-09-04T15:00:00Z`,Bz,`New`,Kz),Gz(2290,3,`2026-09-08T10:00:00Z`,Rz,`Active`,Kz),Gz(2290,4,`2026-09-15T16:00:00Z`,Rz,`Closed`,Kz)],2294:[Gz(2294,1,`2026-09-14T13:00:00Z`,Bz,`New`,qz),Gz(2294,2,`2026-09-22T09:30:00Z`,zz,`Active`,qz),Gz(2294,3,`2026-09-26T11:30:00Z`,zz,`Closed`,qz)],2297:[Gz(2297,1,`2026-09-15T10:00:00Z`,Bz,`New`,qz),Gz(2297,2,`2026-09-23T09:00:00Z`,Rz,`Active`,qz),Gz(2297,3,`2026-10-01T15:00:00Z`,Rz,`Closed`,qz)],2302:[Gz(2302,1,`2026-09-10T10:00:00Z`,Bz,`New`,`Payments`),Gz(2302,2,`2026-09-30T15:00:00Z`,Bz,`New`,Uz),Gz(2302,3,`2026-10-06T08:45:00Z`,Rz,`Active`,Uz)],2304:[Gz(2304,1,`2026-09-24T16:20:00Z`,Bz,`New`,`Payments\\Sprint 41`),Gz(2304,2,`2026-09-28T09:00:00Z`,zz,`Active`,`Payments\\Sprint 41`),Gz(2304,3,`2026-10-05T08:30:00Z`,Bz,`Active`,Uz)],2306:[Gz(2306,1,`2026-10-02T09:00:00Z`,Bz,`New`,`Payments`),Gz(2306,2,`2026-10-09T10:15:00Z`,Bz,`New`,Uz)]},Yz=(e,t,n,r)=>({id:r,identifier:`abc12345-0000-0000-0000-0000000004${r}`,name:e,structureType:`iteration`,hasChildren:!1,path:`\\Payments\\Iteration\\${e}`,attributes:{startDate:t,finishDate:n},url:`${gz}/Payments/_apis/wit/classificationNodes/Iterations/${encodeURIComponent(e)}`}),Xz={id:40,identifier:`abc12345-0000-0000-0000-000000000400`,name:`Payments`,structureType:`iteration`,hasChildren:!0,path:`\\Payments\\Iteration`,children:[Yz(`Sprint 40`,`2026-09-07T00:00:00Z`,`2026-09-18T00:00:00Z`,40),Yz(`Sprint 41`,`2026-09-21T00:00:00Z`,`2026-10-02T00:00:00Z`,41),Yz(`Sprint 42`,`2026-10-05T00:00:00Z`,`2026-10-16T00:00:00Z`,42),Yz(`Sprint 43`,`2026-10-19T00:00:00Z`,`2026-10-30T00:00:00Z`,43)],url:`${gz}/Payments/_apis/wit/classificationNodes/Iterations`},Zz=(e,t)=>({login:e,id:t,avatar_url:`${_z}/avatars/u/${t}`,type:`User`}),Qz=Zz(`ada-dev`,11),$z=Zz(`bo-web`,12),eB={Feature:{id:3,name:`Feature`},Task:{id:1,name:`Task`},Bug:{id:2,name:`Bug`}},tB=`imagile/payments-web`,nB=e=>({id:9e3+e.number,number:e.number,title:e.title,state:e.state,state_reason:e.state===`closed`?`completed`:null,locked:!1,body:e.body,html_url:`${_z}/${tB}/issues/${e.number}`,repository_url:`${vz}/repos/${tB}`,user:Qz,labels:e.labels.map((e,t)=>({id:500+t,name:e,color:`d73a4a`,description:null})),assignees:e.assignee?[e.assignee]:[],type:{...eB[e.type],node_id:`IT_kwDOabc12345${e.type}`,description:null,color:`gray`},sub_issues_summary:{total:e.subs?.length??0,completed:0,percent_completed:0},parent_issue_url:e.parent?`${vz}/repos/${tB}/issues/${e.parent}`:null,created_at:e.created,updated_at:e.updated,closed_at:e.closed??null}),rB=[{number:36,title:`Pay button stays disabled after an error`,type:`Bug`,state:`closed`,assignee:$z,labels:[`bug`],created:`2026-09-21T10:00:00Z`,updated:`2026-09-24T17:00:00Z`,closed:`2026-09-24T17:00:00Z`,body:`After a declined card the Pay button never re-enables.`},{number:38,title:`Show card brand icons`,type:`Task`,state:`closed`,assignee:Qz,labels:[`checkout`,`ui`],created:`2026-09-21T10:30:00Z`,updated:`2026-10-01T12:00:00Z`,closed:`2026-10-01T12:00:00Z`,body:`Visa, Mastercard and Amex icons beside the card number field.`},{number:41,title:`Checkout accepts saved cards`,type:`Feature`,state:`open`,assignee:Qz,labels:[`checkout`],subs:[42],created:`2026-09-28T12:00:00Z`,updated:`2026-10-08T09:00:00Z`,body:`Customers pick a saved card at checkout instead of typing it again.
50
+ * Token format agreed with the vault team`},{key:`PAY-102`,type:`story`,summary:`Store tokens in the vault`,status:`todo`,assignee:Cz,points:3,sprints:[Az],epic:`PAY-100`,links:[jz(`Blocks`,`inward`,`PAY-101`,30001),jz(`Blocks`,`outward`,`PAY-103`,30002)],created:`2026-09-14T09:35:00.000+0000`,updated:`2026-10-05T09:10:00.000+0000`},{key:`PAY-103`,type:`story`,summary:`Charge a stored token`,status:`todo`,points:8,sprints:[Az],epic:`PAY-100`,links:[jz(`Blocks`,`inward`,`PAY-102`,30002)],created:`2026-09-14T09:40:00.000+0000`,updated:`2026-10-05T09:10:00.000+0000`},{key:`PAY-104`,type:`bug`,summary:`Refund total rounds half-cents down`,status:`review`,assignee:Cz,points:2,sprints:[kz,Az],created:`2026-09-22T13:00:00.000+0000`,updated:`2026-10-07T10:20:00.000+0000`,priority:`High`,labels:[`payments`,`refunds`]},{key:`PAY-105`,type:`story`,summary:`Show the last four digits on receipts`,status:`done`,assignee:Sz,points:3,sprints:[Az],epic:`PAY-100`,created:`2026-09-15T08:00:00.000+0000`,updated:`2026-10-09T15:30:00.000+0000`,resolved:`2026-10-09T15:30:00.000+0000`},{key:`PAY-106`,type:`subtask`,summary:`Add the tokeniser to the gateway config`,status:`done`,assignee:Sz,parent:`PAY-101`,sprints:[Az],created:`2026-10-05T10:00:00.000+0000`,updated:`2026-10-07T12:00:00.000+0000`,resolved:`2026-10-07T12:00:00.000+0000`},{key:`PAY-107`,type:`story`,summary:`Retry declined charges once`,status:`todo`,sprints:[Az],links:[jz(`Relates`,`outward`,`PAY-103`,30003)],created:`2026-10-08T13:45:00.000+0000`,updated:`2026-10-08T14:00:00.000+0000`}],Pz=(e,t,n,r)=>({id:String(e),author:t,created:n,items:r}),Fz=(e,t)=>({field:`status`,fieldtype:`jira`,from:Tz[e].id,fromString:Tz[e].name,to:Tz[t].id,toString:Tz[t].name}),Iz=(e,t)=>({field:`Sprint`,fieldtype:`custom`,from:null,fromString:e,to:null,toString:t}),Lz={"PAY-92":[Pz(40001,Sz,`2026-09-09T10:00:00.000+0000`,[Fz(`todo`,`progress`)]),Pz(40002,Sz,`2026-09-17T14:00:00.000+0000`,[Fz(`progress`,`done`)])],"PAY-95":[Pz(40011,Cz,`2026-09-22T10:00:00.000+0000`,[Fz(`todo`,`progress`)]),Pz(40012,Cz,`2026-09-24T15:00:00.000+0000`,[Fz(`progress`,`review`)]),Pz(40013,Sz,`2026-09-25T11:00:00.000+0000`,[Fz(`review`,`done`)])],"PAY-97":[Pz(40021,Sz,`2026-09-23T09:00:00.000+0000`,[Fz(`todo`,`progress`)]),Pz(40022,Cz,`2026-09-30T16:00:00.000+0000`,[Fz(`progress`,`done`)])],"PAY-98":[Pz(40031,wz,`2026-09-21T14:00:00.000+0000`,[Fz(`todo`,`progress`)]),Pz(40032,wz,`2026-10-01T10:00:00.000+0000`,[Fz(`progress`,`review`)]),Pz(40033,Cz,`2026-10-02T15:00:00.000+0000`,[Fz(`review`,`done`)])],"PAY-101":[Pz(40101,Sz,`2026-10-06T09:15:00.000+0000`,[Fz(`todo`,`progress`)])],"PAY-104":[Pz(40201,Cz,`2026-09-29T10:00:00.000+0000`,[Fz(`todo`,`progress`)]),Pz(40202,wz,`2026-10-05T09:05:00.000+0000`,[Iz(`Sprint 41`,`Sprint 41, Sprint 42`)]),Pz(40203,Cz,`2026-10-07T10:20:00.000+0000`,[Fz(`progress`,`review`)])],"PAY-105":[Pz(40301,Sz,`2026-10-06T11:00:00.000+0000`,[Fz(`todo`,`progress`)]),Pz(40302,Sz,`2026-10-08T17:00:00.000+0000`,[Fz(`progress`,`review`)]),Pz(40303,Cz,`2026-10-09T15:30:00.000+0000`,[Fz(`review`,`done`)])],"PAY-107":[Pz(40401,wz,`2026-10-08T14:00:00.000+0000`,[Iz(``,`Sprint 42`)])]},Rz=(e,t)=>({displayName:t,url:`https://ado.imagile.dev/_apis/Identities/abc12345-0000-0000-0000-0000000000${e.length}0`,id:`abc12345-0000-0000-0000-0000000000${e.length}0`,uniqueName:`IMAGILE\\${e}`,descriptor:`win.abc12345${e}`}),zz=Rz(`dokafor`,`D. Okafor`),Bz=Rz(`mlind`,`M. Lind`),Vz=Rz(`knakamura`,`K. Nakamura`),Hz=(e,t)=>({rel:e,url:`${_z}/_apis/wit/workItems/${t}`,attributes:{isLocked:!1,name:e.split(`.`).pop()}}),Uz=e=>({id:e.id,rev:6,fields:{"System.AreaPath":`Payments\\Settlement`,"System.TeamProject":`Payments`,"System.IterationPath":e.iteration,"System.WorkItemType":e.type,"System.State":e.state,"System.Reason":e.reason,...e.assignee?{"System.AssignedTo":e.assignee}:{},"System.CreatedDate":e.created,"System.CreatedBy":Vz,"System.ChangedDate":e.changed,"System.ChangedBy":e.assignee??Vz,"System.Title":e.title,...e.description?{"System.Description":e.description}:{},"Microsoft.VSTS.Common.Priority":2,...e.points===void 0?{}:{"Microsoft.VSTS.Scheduling.StoryPoints":e.points},...e.hours===void 0?{}:{"Microsoft.VSTS.Scheduling.OriginalEstimate":e.hours},...e.teamPoints===void 0?{}:{"Custom.TeamPoints":e.teamPoints},...e.closed?{"Microsoft.VSTS.Common.ClosedDate":e.closed}:{},"System.Tags":e.tags??`settlement`},relations:e.relations??[],_links:{self:{href:`${_z}/_apis/wit/workItems/${e.id}`},html:{href:`${_z}/Payments/_workitems/edit/${e.id}`}},url:`${_z}/_apis/wit/workItems/${e.id}`}),Wz=`Payments\\Sprint 42`,Gz=[{id:2290,type:`User Story`,title:`Read settlement batches from the ledger`,state:`Closed`,reason:`Acceptance tests pass`,assignee:zz,iteration:`Payments\\Sprint 40`,points:3,teamPoints:3,created:`2026-09-01T09:00:00Z`,changed:`2026-09-15T16:00:00Z`,closed:`2026-09-15T16:00:00Z`},{id:2294,type:`Bug`,title:`Batch totals ignore refunds`,state:`Closed`,reason:`Fixed and verified`,assignee:Bz,iteration:`Payments\\Sprint 41`,points:2,teamPoints:2,created:`2026-09-14T13:00:00Z`,changed:`2026-09-26T11:30:00Z`,closed:`2026-09-26T11:30:00Z`},{id:2297,type:`User Story`,title:`Group settlements by merchant`,state:`Closed`,reason:`Acceptance tests pass`,assignee:zz,iteration:`Payments\\Sprint 41`,points:5,teamPoints:5,created:`2026-09-15T10:00:00Z`,changed:`2026-10-01T15:00:00Z`,closed:`2026-10-01T15:00:00Z`},{id:2301,type:`Feature`,title:`Settlement reports`,state:`Active`,reason:`Implementation started`,assignee:Vz,iteration:`Payments`,relations:[Hz(`System.LinkTypes.Hierarchy-Forward`,2302),Hz(`System.LinkTypes.Hierarchy-Forward`,2303)],created:`2026-08-24T14:00:00Z`,changed:`2026-10-05T09:30:00Z`},{id:2302,type:`User Story`,title:`Export the daily settlement CSV`,state:`Active`,reason:`Implementation started`,assignee:zz,iteration:Wz,points:5,teamPoints:5,relations:[Hz(`System.LinkTypes.Hierarchy-Reverse`,2301),Hz(`System.LinkTypes.Dependency-Forward`,2303),Hz(`System.LinkTypes.Hierarchy-Forward`,2305)],created:`2026-09-10T10:00:00Z`,changed:`2026-10-06T08:45:00Z`,description:`<div>One CSV per merchant, written at 02:00 UTC.</div>`},{id:2303,type:`User Story`,title:`Email the settlement report to finance`,state:`New`,reason:`New`,iteration:Wz,points:3,teamPoints:3,relations:[Hz(`System.LinkTypes.Hierarchy-Reverse`,2301),Hz(`System.LinkTypes.Dependency-Reverse`,2302)],created:`2026-09-10T10:05:00Z`,changed:`2026-10-05T09:30:00Z`},{id:2304,type:`Bug`,title:`Settlement totals are a day early in UTC-5`,state:`Active`,reason:`Approved`,assignee:Bz,iteration:Wz,points:2,teamPoints:2,created:`2026-09-24T16:20:00Z`,changed:`2026-10-07T11:00:00Z`,tags:`settlement; timezones`},{id:2305,type:`Task`,title:`Schedule the export job`,state:`Closed`,reason:`Completed`,assignee:zz,iteration:Wz,hours:4,relations:[Hz(`System.LinkTypes.Hierarchy-Reverse`,2302)],created:`2026-10-05T10:00:00Z`,changed:`2026-10-08T13:00:00Z`,closed:`2026-10-08T13:00:00Z`},{id:2306,type:`User Story`,title:`Reconcile chargebacks against settlements`,state:`New`,reason:`New`,iteration:Wz,points:5,created:`2026-10-02T09:00:00Z`,changed:`2026-10-09T10:15:00Z`},{id:2307,type:`Bug`,title:`Retire the legacy settlement endpoint`,state:`Removed`,reason:`Removed from the backlog`,iteration:Wz,points:1,created:`2026-09-01T09:00:00Z`,changed:`2026-10-07T09:00:00Z`,closed:`2026-10-07T09:00:00Z`}],Kz=(e,t,n,r,i,a)=>({id:e,rev:t,fields:{"System.WorkItemType":e===2304||e===2294?`Bug`:`User Story`,"System.State":i,"System.IterationPath":a,"System.ChangedDate":n,"System.ChangedBy":r},url:`${_z}/_apis/wit/workItems/${e}/revisions/${t}`}),qz=`Payments\\Sprint 40`,Jz=`Payments\\Sprint 41`,Yz={2290:[Kz(2290,1,`2026-09-01T09:00:00Z`,Vz,`New`,`Payments`),Kz(2290,2,`2026-09-04T15:00:00Z`,Vz,`New`,qz),Kz(2290,3,`2026-09-08T10:00:00Z`,zz,`Active`,qz),Kz(2290,4,`2026-09-15T16:00:00Z`,zz,`Closed`,qz)],2294:[Kz(2294,1,`2026-09-14T13:00:00Z`,Vz,`New`,Jz),Kz(2294,2,`2026-09-22T09:30:00Z`,Bz,`Active`,Jz),Kz(2294,3,`2026-09-26T11:30:00Z`,Bz,`Closed`,Jz)],2297:[Kz(2297,1,`2026-09-15T10:00:00Z`,Vz,`New`,Jz),Kz(2297,2,`2026-09-23T09:00:00Z`,zz,`Active`,Jz),Kz(2297,3,`2026-10-01T15:00:00Z`,zz,`Closed`,Jz)],2302:[Kz(2302,1,`2026-09-10T10:00:00Z`,Vz,`New`,`Payments`),Kz(2302,2,`2026-09-30T15:00:00Z`,Vz,`New`,Wz),Kz(2302,3,`2026-10-06T08:45:00Z`,zz,`Active`,Wz)],2304:[Kz(2304,1,`2026-09-24T16:20:00Z`,Vz,`New`,`Payments\\Sprint 41`),Kz(2304,2,`2026-09-28T09:00:00Z`,Bz,`Active`,`Payments\\Sprint 41`),Kz(2304,3,`2026-10-05T08:30:00Z`,Vz,`Active`,Wz)],2306:[Kz(2306,1,`2026-10-02T09:00:00Z`,Vz,`New`,`Payments`),Kz(2306,2,`2026-10-09T10:15:00Z`,Vz,`New`,Wz)]},Xz=(e,t,n,r)=>({id:r,identifier:`abc12345-0000-0000-0000-0000000004${r}`,name:e,structureType:`iteration`,hasChildren:!1,path:`\\Payments\\Iteration\\${e}`,attributes:{startDate:t,finishDate:n},url:`${_z}/Payments/_apis/wit/classificationNodes/Iterations/${encodeURIComponent(e)}`}),Zz={id:40,identifier:`abc12345-0000-0000-0000-000000000400`,name:`Payments`,structureType:`iteration`,hasChildren:!0,path:`\\Payments\\Iteration`,children:[Xz(`Sprint 40`,`2026-09-07T00:00:00Z`,`2026-09-18T00:00:00Z`,40),Xz(`Sprint 41`,`2026-09-21T00:00:00Z`,`2026-10-02T00:00:00Z`,41),Xz(`Sprint 42`,`2026-10-05T00:00:00Z`,`2026-10-16T00:00:00Z`,42),Xz(`Sprint 43`,`2026-10-19T00:00:00Z`,`2026-10-30T00:00:00Z`,43)],url:`${_z}/Payments/_apis/wit/classificationNodes/Iterations`},Qz=(e,t)=>({login:e,id:t,avatar_url:`${vz}/avatars/u/${t}`,type:`User`}),$z=Qz(`ada-dev`,11),eB=Qz(`bo-web`,12),tB={Feature:{id:3,name:`Feature`},Task:{id:1,name:`Task`},Bug:{id:2,name:`Bug`}},nB=`imagile/payments-web`,rB=e=>({id:9e3+e.number,number:e.number,title:e.title,state:e.state,state_reason:e.state===`closed`?`completed`:null,locked:!1,body:e.body,html_url:`${vz}/${nB}/issues/${e.number}`,repository_url:`${yz}/repos/${nB}`,user:$z,labels:e.labels.map((e,t)=>({id:500+t,name:e,color:`d73a4a`,description:null})),assignees:e.assignee?[e.assignee]:[],type:{...tB[e.type],node_id:`IT_kwDOabc12345${e.type}`,description:null,color:`gray`},sub_issues_summary:{total:e.subs?.length??0,completed:0,percent_completed:0},parent_issue_url:e.parent?`${yz}/repos/${nB}/issues/${e.parent}`:null,created_at:e.created,updated_at:e.updated,closed_at:e.closed??null}),iB=[{number:36,title:`Pay button stays disabled after an error`,type:`Bug`,state:`closed`,assignee:eB,labels:[`bug`],created:`2026-09-21T10:00:00Z`,updated:`2026-09-24T17:00:00Z`,closed:`2026-09-24T17:00:00Z`,body:`After a declined card the Pay button never re-enables.`},{number:38,title:`Show card brand icons`,type:`Task`,state:`closed`,assignee:$z,labels:[`checkout`,`ui`],created:`2026-09-21T10:30:00Z`,updated:`2026-10-01T12:00:00Z`,closed:`2026-10-01T12:00:00Z`,body:`Visa, Mastercard and Amex icons beside the card number field.`},{number:41,title:`Checkout accepts saved cards`,type:`Feature`,state:`open`,assignee:$z,labels:[`checkout`],subs:[42],created:`2026-09-28T12:00:00Z`,updated:`2026-10-08T09:00:00Z`,body:`Customers pick a saved card at checkout instead of typing it again.
51
51
 
52
52
  - [ ] Card picker
53
- - [ ] 3-D Secure on saved cards`},{number:42,title:`Saved-card picker component`,type:`Task`,state:`open`,assignee:$z,labels:[`checkout`,`ui`],parent:41,created:`2026-09-28T12:10:00Z`,updated:`2026-10-09T14:00:00Z`,body:`A list of saved cards with the last four digits and expiry.`},{number:43,title:`Card form loses focus on Safari`,type:`Bug`,state:`open`,assignee:$z,labels:[`bug`,`safari`],created:`2026-10-07T08:30:00Z`,updated:`2026-10-07T08:45:00Z`,body:`Typing the expiry moves focus back to the card number field on Safari 18.`},{number:44,title:`Receipt page shows the wrong currency symbol`,type:`Bug`,state:`closed`,assignee:Qz,labels:[`bug`],created:`2026-10-01T10:00:00Z`,updated:`2026-10-12T16:00:00Z`,closed:`2026-10-12T16:00:00Z`,body:`EUR receipts show $.`},{number:45,title:`End-to-end test for 3-D Secure`,type:`Task`,state:`open`,labels:[`testing`],created:`2026-10-05T11:00:00Z`,updated:`2026-10-05T11:00:00Z`,body:`Cover the challenge flow with the issuer simulator.`}],iB={36:{status:`Done`,estimate:2,added:`2026-09-21T10:05:00Z`,sprint:41},38:{status:`Done`,estimate:3,added:`2026-09-21T10:35:00Z`,sprint:41},41:{status:`In Progress`,estimate:5,added:`2026-09-28T12:05:00Z`},42:{status:`In Review`,estimate:3,added:`2026-09-28T12:15:00Z`},43:{status:`Todo`,estimate:2,added:`2026-10-07T09:00:00Z`},44:{status:`Done`,estimate:1,added:`2026-10-01T10:05:00Z`},45:{status:`Todo`,added:`2026-10-05T11:05:00Z`}},aB={Todo:`f75ad846`,"In Progress":`47fc9ee4`,"In Review":`a1b2c3d4`,Done:`98236657`},oB=e=>{let t=iB[e.number];return{id:`PVTI_abc12345${e.number}`,type:`ISSUE`,isArchived:!1,createdAt:t.added,updatedAt:e.updated,content:{__typename:`Issue`,number:e.number,title:e.title,state:e.state.toUpperCase(),url:`${_z}/${tB}/issues/${e.number}`,updatedAt:e.updated,repository:{nameWithOwner:tB}},fieldValues:[{__typename:`ProjectV2ItemFieldTextValue`,text:e.title,field:{id:`PVTF_abc12345title`,name:`Title`}},{__typename:`ProjectV2ItemFieldSingleSelectValue`,name:t.status,optionId:aB[t.status],field:{id:`PVTSSF_abc12345`,name:`Status`}},...t.estimate===void 0?[]:[{__typename:`ProjectV2ItemFieldNumberValue`,number:t.estimate,field:{id:`PVTF_abc12345`,name:`Estimate`}}],t.sprint===41?{__typename:`ProjectV2ItemFieldIterationValue`,title:`Sprint 41`,iterationId:`b7e2a91c`,startDate:`2026-09-21`,duration:12,field:{id:`PVTIF_abc12345`,name:`Sprint`}}:{__typename:`ProjectV2ItemFieldIterationValue`,title:`Sprint 42`,iterationId:`cfc16e4d`,startDate:`2026-10-05`,duration:12,field:{id:`PVTIF_abc12345`,name:`Sprint`}}]}},sB=(e,t,n)=>[{id:7e3+e*10,node_id:`CE_kwDOabc1234570${e}`,event:`closed`,actor:t,created_at:n,state_reason:`completed`,commit_id:null}],cB=[{id:7001,node_id:`LE_kwDOabc123457001`,event:`labeled`,actor:Qz,created_at:`2026-10-01T10:01:00Z`,label:{name:`bug`,color:`d73a4a`}},{id:7002,node_id:`CE_kwDOabc123457002`,event:`closed`,actor:Qz,created_at:`2026-10-12T16:00:00Z`,state_reason:`completed`,commit_id:null}],lB={owner:`imagile`,repo:`payments-web`},uB=[yz(`jira issue get`,{issues:Mz.map(jz),errors:[]},`corp-jira`),...Object.entries(Iz).map(([e,t])=>({key:e,history:yz(`jira issue history`,t,`corp-jira`)})),yz(`ado work-item iterations`,Xz,`corp-ado`,{collection:`DefaultCollection`,project:`Payments`}),yz(`ado work-item get-many`,{count:Wz.length,value:Wz.map(Hz),missing:[]},`corp-ado`,{collection:`DefaultCollection`,project:`Payments`}),...Object.values(Jz).map(e=>yz(`ado work-item history`,e,`corp-ado`,{collection:`DefaultCollection`,project:`Payments`})),yz(`github issue get`,{issues:rB.map(e=>e.subs?{...nB(e),sub_issues:e.subs.map(e=>nB(rB.find(t=>t.number===e)))}:nB(e)),errors:[]},`github`,lB),{key:`36`,history:yz(`github issue history`,sB(36,$z,`2026-09-24T17:00:00Z`),`github`,lB)},{key:`38`,history:yz(`github issue history`,sB(38,Qz,`2026-10-01T12:00:00Z`),`github`,lB)},{key:`44`,history:yz(`github issue history`,cB,`github`,lB)},yz(`github project items`,rB.map(oB),`github`,{owner:`imagile`})];`${uB.map(e=>JSON.stringify(e)).join(`
54
- `)}`,`${JSON.stringify(yz(`jira issue history`,Iz[`PAY-104`],`corp-jira`),null,2)}`,`${JSON.stringify(uB.find(e=>e.meta?.command===`ado work-item get-many`),null,2)}`;var dB=uB,fB=e=>`history`in e,pB=e=>dB.find(t=>!fB(t)&&t.meta?.command===e).data,mB=e=>dB.filter(fB).filter(t=>t.history.meta?.command===e),hB=pB(`jira issue get`).issues,gB={"PAY-101":[`* The PAN is swapped for a token before the first log line`,`* A replayed token is refused`].join(`
53
+ - [ ] 3-D Secure on saved cards`},{number:42,title:`Saved-card picker component`,type:`Task`,state:`open`,assignee:eB,labels:[`checkout`,`ui`],parent:41,created:`2026-09-28T12:10:00Z`,updated:`2026-10-09T14:00:00Z`,body:`A list of saved cards with the last four digits and expiry.`},{number:43,title:`Card form loses focus on Safari`,type:`Bug`,state:`open`,assignee:eB,labels:[`bug`,`safari`],created:`2026-10-07T08:30:00Z`,updated:`2026-10-07T08:45:00Z`,body:`Typing the expiry moves focus back to the card number field on Safari 18.`},{number:44,title:`Receipt page shows the wrong currency symbol`,type:`Bug`,state:`closed`,assignee:$z,labels:[`bug`],created:`2026-10-01T10:00:00Z`,updated:`2026-10-12T16:00:00Z`,closed:`2026-10-12T16:00:00Z`,body:`EUR receipts show $.`},{number:45,title:`End-to-end test for 3-D Secure`,type:`Task`,state:`open`,labels:[`testing`],created:`2026-10-05T11:00:00Z`,updated:`2026-10-05T11:00:00Z`,body:`Cover the challenge flow with the issuer simulator.`}],aB={36:{status:`Done`,estimate:2,added:`2026-09-21T10:05:00Z`,sprint:41},38:{status:`Done`,estimate:3,added:`2026-09-21T10:35:00Z`,sprint:41},41:{status:`In Progress`,estimate:5,added:`2026-09-28T12:05:00Z`},42:{status:`In Review`,estimate:3,added:`2026-09-28T12:15:00Z`},43:{status:`Todo`,estimate:2,added:`2026-10-07T09:00:00Z`},44:{status:`Done`,estimate:1,added:`2026-10-01T10:05:00Z`},45:{status:`Todo`,added:`2026-10-05T11:05:00Z`}},oB={Todo:`f75ad846`,"In Progress":`47fc9ee4`,"In Review":`a1b2c3d4`,Done:`98236657`},sB=e=>{let t=aB[e.number];return{id:`PVTI_abc12345${e.number}`,type:`ISSUE`,isArchived:!1,createdAt:t.added,updatedAt:e.updated,content:{__typename:`Issue`,number:e.number,title:e.title,state:e.state.toUpperCase(),url:`${vz}/${nB}/issues/${e.number}`,updatedAt:e.updated,repository:{nameWithOwner:nB}},fieldValues:[{__typename:`ProjectV2ItemFieldTextValue`,text:e.title,field:{id:`PVTF_abc12345title`,name:`Title`}},{__typename:`ProjectV2ItemFieldSingleSelectValue`,name:t.status,optionId:oB[t.status],field:{id:`PVTSSF_abc12345`,name:`Status`}},...t.estimate===void 0?[]:[{__typename:`ProjectV2ItemFieldNumberValue`,number:t.estimate,field:{id:`PVTF_abc12345`,name:`Estimate`}}],t.sprint===41?{__typename:`ProjectV2ItemFieldIterationValue`,title:`Sprint 41`,iterationId:`b7e2a91c`,startDate:`2026-09-21`,duration:12,field:{id:`PVTIF_abc12345`,name:`Sprint`}}:{__typename:`ProjectV2ItemFieldIterationValue`,title:`Sprint 42`,iterationId:`cfc16e4d`,startDate:`2026-10-05`,duration:12,field:{id:`PVTIF_abc12345`,name:`Sprint`}}]}},cB=(e,t,n)=>[{id:7e3+e*10,node_id:`CE_kwDOabc1234570${e}`,event:`closed`,actor:t,created_at:n,state_reason:`completed`,commit_id:null}],lB=[{id:7001,node_id:`LE_kwDOabc123457001`,event:`labeled`,actor:$z,created_at:`2026-10-01T10:01:00Z`,label:{name:`bug`,color:`d73a4a`}},{id:7002,node_id:`CE_kwDOabc123457002`,event:`closed`,actor:$z,created_at:`2026-10-12T16:00:00Z`,state_reason:`completed`,commit_id:null}],uB={owner:`imagile`,repo:`payments-web`},dB=[bz(`jira issue get`,{issues:Nz.map(Mz),errors:[]},`corp-jira`),...Object.entries(Lz).map(([e,t])=>({key:e,history:bz(`jira issue history`,t,`corp-jira`)})),bz(`ado work-item iterations`,Zz,`corp-ado`,{collection:`DefaultCollection`,project:`Payments`}),bz(`ado work-item get-many`,{count:Gz.length,value:Gz.map(Uz),missing:[]},`corp-ado`,{collection:`DefaultCollection`,project:`Payments`}),...Object.values(Yz).map(e=>bz(`ado work-item history`,e,`corp-ado`,{collection:`DefaultCollection`,project:`Payments`})),bz(`github issue get`,{issues:iB.map(e=>e.subs?{...rB(e),sub_issues:e.subs.map(e=>rB(iB.find(t=>t.number===e)))}:rB(e)),errors:[]},`github`,uB),{key:`36`,history:bz(`github issue history`,cB(36,eB,`2026-09-24T17:00:00Z`),`github`,uB)},{key:`38`,history:bz(`github issue history`,cB(38,$z,`2026-10-01T12:00:00Z`),`github`,uB)},{key:`44`,history:bz(`github issue history`,lB,`github`,uB)},bz(`github project items`,iB.map(sB),`github`,{owner:`imagile`})];`${dB.map(e=>JSON.stringify(e)).join(`
54
+ `)}`,`${JSON.stringify(bz(`jira issue history`,Lz[`PAY-104`],`corp-jira`),null,2)}`,`${JSON.stringify(dB.find(e=>e.meta?.command===`ado work-item get-many`),null,2)}`;var fB=dB,pB=e=>`history`in e,mB=e=>fB.find(t=>!pB(t)&&t.meta?.command===e).data,hB=e=>fB.filter(pB).filter(t=>t.history.meta?.command===e),gB=mB(`jira issue get`).issues,_B={"PAY-101":[`* The PAN is swapped for a token before the first log line`,`* A replayed token is refused`].join(`
55
55
  `),"PAY-102":[`* A stored token charges once`,`* A second charge with the same idempotency key is refused`].join(`
56
- `)};hB.length,hB.map(e=>gB[e.key]?{...e,fields:{...e.fields,customfield_10500:gB[e.key]}}:e);var _B=hB.map(e=>e.key),vB={self:`https://jira.imagile.dev/rest/api/2/user?username=jsmith`,name:`jsmith`,key:`jsmith`,displayName:`J. Smith`,active:!0},yB=(e,t,n,r)=>({id:String(e),author:vB,created:t,items:[{field:`status`,fieldtype:`jira`,from:n[0],fromString:n[1],to:r[0],toString:r[1]}]}),bB={"PAY-106":[yB(40501,`2026-10-06T09:30:00.000+0000`,[`10000`,`To Do`],[`3`,`In Progress`]),yB(40502,`2026-10-07T12:00:00.000+0000`,[`3`,`In Progress`],[`10001`,`Done`])]},xB=Object.fromEntries(_B.map(e=>[e,mB(`jira issue history`).find(t=>t.key===e)?.history.data??bB[e]??[]]));pB(`ado work-item iterations`);var SB=pB(`ado work-item get-many`).value.map(e=>e.id),CB=`https://ado.imagile.dev/DefaultCollection`;`${CB}`,SB.map(e=>({id:e,url:`${CB}/_apis/wit/workItems/${e}`}));var wB=new Map(dB.filter(e=>!fB(e)&&e.meta?.command===`ado work-item history`).map(e=>[e.data[0].id,e.data])),TB=(e,t)=>({displayName:t,id:`abc12345-0000-0000-0000-0000000000${e.length}0`,uniqueName:`IMAGILE\\${e}`}),EB=TB(`knakamura`,`K. Nakamura`),DB=TB(`dokafor`,`D. Okafor`),OB=(e,t,n,r,i,a,o)=>({id:e,rev:t,fields:{"System.WorkItemType":i,"System.State":a,"System.IterationPath":o,"System.ChangedDate":n,"System.ChangedBy":r},url:`${CB}/_apis/wit/workItems/${e}/revisions/${t}`}),kB=`Payments`,AB=`Payments\\Sprint 42`,jB={2301:[OB(2301,1,`2026-08-24T14:00:00Z`,EB,`Feature`,`New`,kB),OB(2301,2,`2026-10-05T09:30:00Z`,EB,`Feature`,`Active`,kB)],2303:[OB(2303,1,`2026-09-10T10:05:00Z`,EB,`User Story`,`New`,kB),OB(2303,2,`2026-09-30T15:00:00Z`,EB,`User Story`,`New`,AB)],2305:[OB(2305,1,`2026-10-05T10:00:00Z`,DB,`Task`,`New`,AB),OB(2305,2,`2026-10-06T09:00:00Z`,DB,`Task`,`Active`,AB),OB(2305,3,`2026-10-08T13:00:00Z`,DB,`Task`,`Closed`,AB)],2307:[OB(2307,1,`2026-09-01T09:00:00Z`,EB,`Bug`,`New`,kB),OB(2307,2,`2026-09-30T15:00:00Z`,EB,`Bug`,`New`,AB),OB(2307,3,`2026-10-07T09:00:00Z`,EB,`Bug`,`Removed`,AB)]},MB=Object.fromEntries(SB.map(e=>[e,wB.get(e)??jB[e]])),NB=pB(`github project items`).map(e=>e.content.number);pB(`github issue get`);var PB=Object.fromEntries(NB.map(e=>[e,mB(`github issue history`).find(t=>t.key===String(e))?.history.data??[]])),FB=(e,t,n,r)=>({self:`https://jira.imagile.dev/rest/api/2/status/${t}`,name:e,id:t,statusCategory:{id:n===`new`?2:n===`done`?3:4,key:n,name:r}}),IB={progress:FB(`In Progress`,`3`,`indeterminate`,`In Progress`),review:FB(`In Review`,`10100`,`indeterminate`,`In Progress`),done:FB(`Done`,`10001`,`done`,`Done`),todo:FB(`To Do`,`10000`,`new`,`To Do`)},LB={"To Do":[{id:`11`,name:`Start Progress`,to:IB.progress}],"In Progress":[{id:`21`,name:`Submit for Review`,to:IB.review},{id:`31`,name:`Done`,to:IB.done},{id:`41`,name:`Stop Progress`,to:IB.todo}],"In Review":[{id:`31`,name:`Done`,to:IB.done},{id:`51`,name:`Back to In Progress`,to:IB.progress}]},RB=e=>String(e.fields?.status?.name??``),zB=Object.fromEntries(hB.filter(e=>RB(e)!==`Done`).map(e=>[e.key,LB[RB(e)]??[]])),BB=[{name:`New`,color:`b2b2b2`,category:`Proposed`},{name:`Active`,color:`007acc`,category:`InProgress`},{name:`Resolved`,color:`ff9d00`,category:`Resolved`},{name:`Closed`,color:`339933`,category:`Completed`},{name:`Removed`,color:`ffffff`,category:`Removed`}],VB={"User Story":BB,Bug:BB,Feature:BB},HB=`2026-10-13T08:00:00.000Z`,UB=`card-payments`,WB=`settlement`,GB=`checkout-web`,KB=(e,t,n)=>({dossier:e,area:t,...n?{env:n}:{}}),qB=(e,t,n,r)=>Object.entries(r).map(([r,i])=>({command:`${t} pr get`,input:{dossier:e,[n]:Number(r),include:_S},data:i,...KB(e,t)}));[pz(),...sz.map(e=>({command:`dossiers show`,input:{dossier:e.name},data:fz(e)})),(sS(`PAY`),{...KB(UB,`jira`)}),..._B.map(e=>({command:`jira issue history`,input:{dossier:UB,key:e},data:xB[e],...KB(UB,`jira`)})),...Object.entries(zB).map(([e,t])=>({command:`jira issue transitions`,input:{dossier:UB,key:e},data:t,...KB(UB,`jira`)})),{...KB(UB,`bitbucket`)},...qB(UB,`bitbucket`,`id`,dR),...Object.entries(QR).map(([e,t])=>({command:`jenkins pipeline runs`,input:{dossier:UB,name:`payments-core/PR-${e}`,limit:5},data:t,...KB(UB,`jenkins`)})),(tz[`payments-dev`],{...KB(UB,`openshift`,`dev`)}),(tz[`payments-prod`],{...KB(UB,`openshift`,`prod`)}),{...KB(WB,`ado`)},{...KB(WB,`ado`)},{...KB(WB,`ado`)},...SB.map(e=>({command:`ado work-item history`,input:{dossier:WB,id:e},data:MB[e],...KB(WB,`ado`)})),...Object.entries(VB).map(([e,t])=>({command:`ado work-item states`,input:{dossier:WB,type:e},data:t,...KB(WB,`ado`)})),{...KB(WB,`ado`)},...qB(WB,`ado`,`id`,xR),{...KB(WB,`ado`)},{...KB(WB,`ado`)},{...KB(GB,`github`)},{...KB(GB,`github`)},...NB.map(e=>({command:`github issue history`,input:{dossier:GB,number:e},data:PB[e],...KB(GB,`github`)})),{...KB(GB,`github`)},...qB(GB,`github`,`number`,NR),(yS[0],{...KB(GB,`github`)}),{...KB(GB,`bitbucket-cloud`)},...qB(GB,`bitbucket-cloud`,`id`,UR),(tz[`checkout-staging`],{...KB(GB,`openshift`,`staging`)}),(tz[`checkout-prod`],{...KB(GB,`openshift`,`prod`)})];function JB(e){let t=e.installed?`${e.package} ${e.version??``} is installed beside Toil UI`.replace(` `,` `):`${e.package} isn't installed beside Toil UI; Toil UI was tested with ${e.tested}`,n=e.cli.path?`It would start ${e.cli.path}`:`${e.cli.problem??`Its CLI was not found.`}${e.cli.fix?` ${e.cli.fix}`:``}`;return[`${t}.`,n.endsWith(`.`)?n:`${n}.`,...e.notes]}function YB({adapters:e,client:t,onInstalled:n}){let[r,i]=(0,v.useState)(null);return(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`agent-adapters`,children:[(0,q.jsx)(`h2`,{id:`agent-adapters`,children:`Adapters on this machine`}),(0,q.jsx)(`p`,{className:`note`,children:`Each adapter needs its SDK beside Toil UI and its own CLI on this machine. Install runs one npm command, shown to you first, at the version Toil UI was tested with.`}),(0,q.jsx)(`ul`,{className:`adapter-status`,children:e.map(e=>{let t=e.installed&&e.cli.path!==null;return(0,q.jsxs)(`li`,{className:`adapter-status__row`,"data-adapter":e.name,children:[(0,q.jsxs)(`div`,{className:`adapter-status__head`,children:[(0,q.jsx)(`strong`,{children:e.label}),(0,q.jsx)(`span`,{className:t?`agent-pick__ready`:`agent-missing`,children:t?`Ready`:e.installed?`Needs a fix`:`Not installed`})]}),JB(e).map((t,n)=>(0,q.jsx)(`p`,{className:n===1&&!e.cli.path?`agent-missing`:`note`,children:t},n)),!e.installed&&(0,q.jsx)(`div`,{className:`proposal-actions`,children:(0,q.jsxs)(W,{className:`btn btn--accent`,onPress:()=>i(e),"data-install":e.name,children:[`Install `,e.label]})})]},e.name)})}),r&&(0,q.jsx)(XB,{adapter:r,plan:r.install,client:t,onClose:()=>i(null),onInstalled:e=>{n?.(e)}})]})}function XB({adapter:e,plan:t,client:n,onClose:r,onInstalled:i}){let[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(`ready`),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(``),p=(0,v.useRef)(null),m=t.argv!==null&&n!==null,h=async()=>{if(!n)return;c(`running`),o([]),u(``);let r=new AbortController;p.current=r;try{let a=await n.install(e.name,t.command,e=>o(t=>[...t.slice(-400),e]),r.signal);c(`done`),u(`Installed ${e.package} ${a.version??``}, and Toil UI loaded it.${a.cli.path?` ${e.label} is ready.`:` ${a.cli.problem??``} ${a.cli.fix??``}`}`.replace(/\s+/g,` `).trim()),i(a)}catch(e){c(`failed`),u(e instanceof Error?e.message:String(e))}},g=async()=>{try{await navigator.clipboard.writeText(t.command),f(`Copied the command.`)}catch{f(`Copying was refused here; select the command above and copy it yourself.`)}};return(0,q.jsx)(Of,{className:`feedback-overlay`,"data-backdrop":``,isDismissable:s!==`running`,isOpen:!0,onOpenChange:e=>!e&&r(),children:(0,q.jsx)(Ef,{className:`feedback-modal`,children:(0,q.jsx)(uf,{className:`feedback-dialog`,"aria-labelledby":`install-title`,children:(0,q.jsxs)(`div`,{className:`feedback-body`,children:[(0,q.jsxs)(ja,{slot:`title`,id:`install-title`,children:[`Install `,e.label,`'s SDK`]}),(0,q.jsxs)(`p`,{children:[`Toil UI runs this one command, through the npm that came with your Node and with your own npm config, so your organization's registry and proxy apply. It installs `,e.package,` `,e.tested,`, the version Toil UI was tested with, beside Toil UI, runs no install scripts, and takes nothing published in the last 14 days.`]}),(0,q.jsx)(`pre`,{className:`install-command`,"data-scroller":``,tabIndex:0,role:`region`,"aria-label":`The command`,children:t.command}),t.folder&&(0,q.jsxs)(`p`,{className:`note`,children:[`It installs into `,t.folder,`.`]}),t.problem&&(0,q.jsxs)(`p`,{className:`failure`,children:[t.problem,` `,t.fix]}),!n&&(0,q.jsx)(`p`,{className:`config-off`,children:`This is the preview, so nothing is installed. Toil UI on your own machine runs this command when you press Install.`}),a.length>0&&(0,q.jsx)(`pre`,{className:`install-output`,"data-scroller":``,tabIndex:0,role:`log`,"aria-label":`npm's output`,children:a.join(`
57
- `)}),l&&(0,q.jsx)(`p`,{role:s===`failed`?`alert`:`status`,className:s===`failed`?`failure`:`note`,children:l}),(0,q.jsxs)(`div`,{className:`proposal-actions`,children:[m&&s!==`done`&&(0,q.jsx)(W,{className:`btn btn--accent`,onPress:()=>void h(),isDisabled:s===`running`,"data-install-run":``,children:s===`running`?`Installing…`:s===`failed`?`Try again`:`Install`}),(0,q.jsx)(W,{className:`btn`,onPress:()=>void g(),"data-install-copy":``,children:`Copy command`}),s===`running`?(0,q.jsx)(W,{className:`btn`,onPress:()=>p.current?.abort(),children:`Stop`}):(0,q.jsx)(W,{className:`btn`,slot:`close`,children:s===`done`?`Done`:`Cancel`}),(0,q.jsx)(`span`,{className:`note`,role:`status`,children:d})]})]})})})})}var ZB={claude:[`@anthropic-ai/claude-agent-sdk@0.3.289`,`zod@4.6.5`],copilot:[`@github/copilot-sdk@1.0.16`],codex:[`@openai/codex-sdk@0.160.0`]},QB=e=>new Date(Date.parse(e)-12096e5).toISOString().slice(0,10),$B=e=>ZB[e][0].slice(ZB[e][0].lastIndexOf(`@`)+1),eV=`/home/you/.npm-global`,tV=`npm install --global --prefix ${eV} --ignore-scripts --before=${QB(HB)} --no-audit --no-fund --omit=optional ${ZB.claude.join(` `)}`,nV=[{name:`claude`,label:`Claude`,package:`@anthropic-ai/claude-agent-sdk`,installed:!1,version:null,tested:$B(`claude`),cli:{path:`/home/you/.local/bin/claude`,problem:null,fix:null},endpoints:[`anthropic`,`bedrock`,`foundry`,`vertex`],model:`haiku`,install:{adapter:`claude`,kind:`global`,folder:eV,command:tV,argv:null,problem:null,fix:null},notes:[]},{name:`copilot`,label:`GitHub Copilot`,package:`@github/copilot-sdk`,installed:!0,version:$B(`copilot`),tested:$B(`copilot`),cli:{path:`C:\\Users\\you\\AppData\\Roaming\\npm\\node_modules\\@github\\copilot\\npm-loader.js`,problem:null,fix:null},endpoints:[],model:null,install:{adapter:`copilot`,kind:`global`,folder:eV,command:tV.replace(ZB.claude.join(` `),ZB.copilot.join(` `)),argv:null,problem:null,fix:null},notes:[`copilot.cmd on PATH is an npm shim the SDK can't start, so Toil UI starts the script it runs, C:\\Users\\you\\AppData\\Roaming\\npm\\node_modules\\@github\\copilot\\npm-loader.js, with Node.`]},{name:`codex`,label:`Codex`,package:`@openai/codex-sdk`,installed:!0,version:$B(`codex`),tested:$B(`codex`),cli:{path:`/usr/local/bin/codex`,problem:null,fix:null},endpoints:[],model:null,install:{adapter:`codex`,kind:`global`,folder:eV,command:tV.replace(ZB.claude.join(` `),ZB.codex.join(` `)),argv:null,problem:null,fix:null},notes:[]}],rV={anthropic:`Anthropic API`,bedrock:`Amazon Bedrock`,foundry:`Microsoft Foundry`,vertex:`Google Vertex AI`};function iV(e){return`${e.installed?`${e.package} is installed`:`${e.package} isn't installed`}; ${e.cli.path?`it would start ${e.cli.path}`:e.cli.problem??`its CLI was not found`}`.replace(/\.$/,``)}function aV({client:e,onChange:t,dossier:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let t=!0;return e.status().then(e=>{t&&(i(e),o(e.settings))},e=>t&&c(e instanceof Error?e.message:String(e))),()=>{t=!1}},[e]);let p=async n=>{if(n.preventDefault(),a){f(!0),u(``);try{let n=await e.save({...a,endpoint:a.adapter===`claude`?a.endpoint:null});i(n),o(n.settings),c(null),u(n.settings.adapter===`none`?`Saved: no agent answers.`:`Saved: ${n.adapters.find(e=>e.name===n.settings.adapter)?.label??n.settings.adapter} answers from the next question.`),t?.(n)}catch(e){c(e instanceof Error?e.message:String(e))}finally{f(!1)}}},m=r?.adapters.every(e=>!e.installed),h=async()=>{try{let t=await e.status();i(t)}catch(e){c(e instanceof Error?e.message:String(e))}},g=(e,t)=>e.adapter===t?e.model:e.models[t]??null,_=(e,t,n)=>{let r=n||null,i={...e.models};r?i[t]=r:delete i[t],o({...e,models:i,...e.adapter===t?{model:r}:{}})};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`agent-settings`,children:[(0,q.jsx)(`h2`,{id:`agent-settings`,children:`Agent`}),(0,q.jsx)(`p`,{className:`note`,children:`The agent reasons with the subscription you already have, through its own CLI on this machine. Toil UI never downloads one, stores no keys, and gives the agent read-only tools: anything it suggests changing comes back as a proposal for you to apply.`}),r?.problem&&(0,q.jsx)(`p`,{className:`failure`,children:r.problem}),s&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:s}),!r||!a?!s&&(0,q.jsx)(`p`,{className:`note`,children:`Reading the agent settings…`}):(0,q.jsxs)(`form`,{className:`agent-form`,onSubmit:p,children:[m&&(0,q.jsxs)(`p`,{className:`failure`,children:[`None of the three agent SDKs is installed beside Toil UI: `,r.adapters.map(e=>`${e.label} (${e.package})`).join(`, `),`. Press Install below for the one your organization approves, with its CLI on PATH, and choose it here.`]}),(0,q.jsxs)(Bf,{className:`agent-adapters`,value:a.adapter,onChange:e=>{let t=e;o({...a,adapter:t,model:t===`none`?null:a.models[t]??null,cliPath:t===`none`?null:a.cliPaths[t]??null})},children:[(0,q.jsx)(va,{children:`Adapter`}),(0,q.jsxs)(Vf,{value:`none`,className:`agent-choice`,children:[(0,q.jsx)(`strong`,{children:`None`}),(0,q.jsx)(`span`,{className:`note`,children:`The dashboards only; a chat answers only once it is switched to an adapter.`})]}),r.adapters.map(e=>(0,q.jsxs)(Vf,{value:e.name,className:`agent-choice`,children:[(0,q.jsx)(`strong`,{children:e.label}),(0,q.jsxs)(`span`,{className:e.installed&&e.cli.path?`note`:`agent-missing`,children:[iV(e),`.`]})]},e.name))]}),(0,q.jsxs)(`fieldset`,{className:`agent-models`,children:[(0,q.jsx)(`legend`,{children:`Models, each empty for its CLI's default`}),(0,q.jsx)(`p`,{className:`note`,children:`Each adapter runs with its own, whether it answers by default, in a chat switched to it, or on an assignment.`}),r.adapters.map(e=>(0,q.jsxs)(Yp,{className:`field-text`,value:g(a,e.name)??``,onChange:t=>_(a,e.name,t),children:[(0,q.jsxs)(va,{children:[e.label,`'s model`]}),(0,q.jsx)(jo,{spellCheck:!1,autoComplete:`off`})]},e.name))]}),a.adapter!==`none`&&(0,q.jsxs)(Yp,{className:`field-text`,value:a.cliPath??``,onChange:e=>o({...a,cliPath:e||null,cliPaths:{...a.cliPaths,[a.adapter]:e||void 0}}),children:[(0,q.jsxs)(va,{children:[r.adapters.find(e=>e.name===a.adapter)?.label??a.adapter,`'s CLI path (empty to use the one on PATH)`]}),(0,q.jsx)(jo,{spellCheck:!1,autoComplete:`off`})]}),a.adapter===`claude`&&(0,q.jsxs)(Bf,{className:`shells`,orientation:`horizontal`,value:a.endpoint??``,onChange:e=>o({...a,endpoint:e||null}),children:[(0,q.jsx)(va,{className:`agent-label`,children:`Endpoint`}),(0,q.jsx)(Vf,{value:``,className:`shell-choice`,children:`Claude Code's default`}),(r.adapters.find(e=>e.name===`claude`)?.endpoints??[]).map(e=>(0,q.jsx)(Vf,{value:e,className:`shell-choice`,children:rV[e]??e},e))]}),a.adapter===`claude`&&a.endpoint&&a.endpoint!==`anthropic`&&(0,q.jsx)(`p`,{className:`note`,children:`Claude Code reads that cloud's own region and credentials from its environment, as it does on its own; Toil UI sets only the switch.`}),(0,q.jsxs)(`div`,{className:`proposal-actions`,children:[(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,isDisabled:d,children:`Save`}),(0,q.jsx)(`span`,{className:`note`,role:`status`,children:l})]})]})]}),r&&(0,q.jsx)(YB,{adapters:r.adapters,client:e,onInstalled:()=>void h()}),r&&(0,q.jsx)(sV,{saved:r.settings,save:async t=>{if(!r)throw Error(`The agent settings have not loaded yet.`);let n=await e.save({...r.settings,...t});return i(n),o(e=>e?{...e,instructions:n.settings.instructions,voice:n.settings.voice}:n.settings),n.settings},dossier:n??null,prompt:t=>e.prompt(n,t)})]})}function oV(){return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`agent-settings`,children:[(0,q.jsx)(`h2`,{id:`agent-settings`,children:`Agent`}),(0,q.jsx)(`p`,{className:`note`,children:`The preview answers with a scripted agent. The local app answers with the one your organization approved: Claude (the Claude Agent SDK, on the Anthropic API, Bedrock, Foundry or Vertex), GitHub Copilot (the Copilot SDK) or Codex (the Codex SDK), each through its own CLI on your machine. You choose the adapter, each one's model and the CLI path here; no key is ever stored.`})]}),(0,q.jsx)(YB,{adapters:nV,client:null}),(0,q.jsx)(sV,{saved:{instructions:null,voice:null},dossier:`card-payments`,disabled:`This is the preview, so nothing is saved. Toil UI on your own machine keeps these in its data folder, in agent.json.`,prompt:async(e,t)=>KL(`card-payments`,HB,JL(e,t))})]})}function sV({saved:e,save:t,prompt:n,disabled:r,dossier:i}){let a=qS(),o=ZS(),s={theme:a.name,voice:$S(a,o)},[c,l]=(0,v.useState)(e.instructions??``),[u,d]=(0,v.useState)(e.voice??``),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(null),[y,b]=(0,v.useState)(null),x=(0,v.useId)(),S={instructions:c.trim()||null,voice:u.trim()||null},C=(e.instructions??``)!==c.trim()||(e.voice??``)!==u.trim(),w=(0,v.useRef)(!1);w.current=y!==null;let T=t?``:`${S.instructions??``}\u0000${S.voice??``}`;(0,v.useEffect)(()=>{if(!w.current)return;let e=!0;return n(s,S).then(t=>e&&b(t),()=>e&&b(null)),()=>{e=!1}},[s.theme,s.voice,T]);let E=e=>t=>{e(t),h(``)},D=async e=>{if(e.preventDefault(),t){p(!0),h(``);try{let e=await t(S);l(e.instructions??``),d(e.voice??``),_(null),h(`Saved: the next question uses them.`),y!==null&&b(await n(s,e))}catch(e){_(e instanceof Error?e.message:String(e))}finally{p(!1)}}},O=async()=>{if(y!==null)return b(null);try{b(await n(s,S)),_(null)}catch(e){_(e instanceof Error?e.message:String(e))}},k=s.voice?`Themed agent voice is on in ${a.label}, so a custom voice here replaces ${a.label}'s.`:a.voice?`Themed agent voice is off, so a custom voice is not used until you switch it on under Settings, General.`:`${a.label} has no voice, so a custom voice is not used in it. Pick a game theme to use one.`;return(0,q.jsxs)(Q,{as:`section`,className:`panel instructions`,"aria-labelledby":`agent-instructions`,children:[(0,q.jsx)(`h2`,{id:`agent-instructions`,children:`Instructions`}),(0,q.jsx)(`p`,{className:`note`,children:`Your own words for every answer. They come after toil's rules in the prompt, and the rules win where the two disagree: answers still cite their items, give figures as the data has them, and suggest changes only as proposals. Instructions can't widen what the agent can do, since its tools only read.`}),r&&(0,q.jsx)(`p`,{className:`config-off`,children:r}),g&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:g}),(0,q.jsxs)(`form`,{className:`agent-form`,onSubmit:D,children:[(0,q.jsx)(cV,{label:`General instructions`,hint:`For example: answer in British English, or lead with risks.`,value:c,onChange:E(l)}),(0,q.jsx)(cV,{label:`Custom voice`,hint:`Replaces the theme's voice while Themed agent voice is on. ${k}`,value:u,onChange:E(d)}),(0,q.jsxs)(`div`,{className:`proposal-actions`,children:[t&&(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,isDisabled:f||!C,children:`Save`}),(0,q.jsx)(W,{className:`btn`,onPress:()=>void O(),"aria-expanded":y!==null,"aria-controls":y===null?void 0:x,"data-full-prompt":``,children:y===null?`Show the full prompt`:`Hide the full prompt`}),(0,q.jsx)(`span`,{className:`note`,role:`status`,children:m})]})]}),y!==null&&(0,q.jsxs)(`div`,{className:`full-prompt`,children:[(0,q.jsx)(`p`,{className:`note`,children:t?`What the agent is sent now, in this theme, for a question about ${i??`a dossier`}${i?`, the first dossier toil lists`:``}.${C?` Your unsaved changes are not in it until you save.`:``}`:`What the agent would be sent in this theme, for the sample dossier ${i??`card-payments`}.`}),(0,q.jsx)(`pre`,{id:x,className:`full-prompt__text`,tabIndex:0,role:`region`,"aria-label":`The full prompt`,"data-scroller":``,children:y})]})]})}function cV({label:e,hint:t,value:n,onChange:r}){let i=(0,v.useId)();return(0,q.jsxs)(Yp,{className:`field-text field-text--area`,value:n,onChange:r,maxLength:HL,"aria-describedby":`${i}-hint ${i}-count`,children:[(0,q.jsx)(va,{children:e}),(0,q.jsx)(qp,{rows:4,spellCheck:!0}),(0,q.jsx)(`span`,{className:`note`,id:`${i}-hint`,children:t}),(0,q.jsxs)(`span`,{className:`note counter`,id:`${i}-count`,children:[n.length.toLocaleString(`en-GB`),` of `,HL.toLocaleString(`en-GB`),` characters`]})]})}var lV=[`connections list`,`connections test`,`dossiers list`,`dossiers show`,`dossiers check`,`audit stats`,`audit list`,`theme list`],uV=[`connections add`,`connections login`,`connections default`,`connections writes`,`connections remove`,`dossiers init`,`dossiers add-repo`,`dossiers link`,`dossiers field`,`dossiers person`,`dossiers wip-limit`,`dossiers onboard`,`dossiers describe`,`theme set`];[...lV,...uV];function dV(e){if(e.definedIn)return e.definedIn===`env`;let t=Object.values(e.values);return t.length>0&&t.every(e=>e===`env`||e===`ci`)}function fV(e){return`TOIL_CONN_${e.toUpperCase().replace(/-/g,`_`)}_`}function pV(e,t){let n=t.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1_$2`).toUpperCase();return`${fV(e)}${n}`}function mV(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)}function hV(e){return Array.from(e).length}var gV=(e,t,n=`${t}s`)=>`${e===1?`a`:e} ${e===1?t:n}`;function _V(e,t){if(e===``)return null;let n=(e.match(/\r\n|\r|\n/g)??[]).length,r=(e.match(/ /g)??[]).length,i=(e.match(/\t/g)??[]).length,a=hV(e.replace(/\r\n/g,`
58
- `));return n===a?gV(n,`${t} newline`):r===a?gV(r,`${t} space`):i===a?gV(i,`${t} tab`):gV(a,`${t} whitespace character`)}var vV=/\s/u,yV=[[`"`,`"`],[`'`,`'`],["`","`"],[`“`,`”`],[`‘`,`’`]],bV=/^(bearer|token)[ \t]+/i;function xV(e){let t=e,n=!1,r=yV.find(([e,n])=>t.length>e.length+n.length&&t.startsWith(e)&&t.endsWith(n));r&&(t=t.slice(r[0].length,t.length-r[1].length),n=!0);let i=bV.exec(t),a=i&&i[0].length<t.length?`${i[1]} `:null;return i&&a&&(t=t.slice(i[0].length)),{inner:t,quoted:n,prefix:a}}function SV(e,t){let n=e.trim();if(n===``)return t.empty===`keep`?{status:`empty`,empty:`keep`,message:`Kept the existing secret.`,fix:null}:t.empty===`skip`?{status:`empty`,empty:`skip`,message:`Nothing was entered, so none is stored.`,fix:null}:{status:`empty`,empty:`required`,message:`Nothing was entered, and this one is required.`,fix:`Paste or type the secret, then press Enter.${t.envVars?.length?` To define this connection with env vars instead, cancel and set ${t.envVars.join(`, `)}.`:``}`};let r=hV(n),i=e.slice(0,e.length-e.trimStart().length),a=e.slice(e.trimEnd().length),o=[_V(i,`leading`),_V(a,`trailing`)].filter(e=>e!==null),s=o.length?o.join(` and `):null,{inner:c,quoted:l,prefix:u}=xV(n),d=/[\r\n]/.test(c),f=!t.password&&[...c].some(e=>vV.test(e));if(d||f){let e=t.password?`password`:`token`;return{status:`refused`,message:d?`This has a line break in the middle, so the paste most likely took two lines. Nothing was stored.`:`This has ${c.includes(` `)?`a tab`:`a space`} in the middle, so the paste most likely took more than the token. Nothing was stored.`,fix:`Copy just the ${e}, on its own, and paste it again.`,length:r}}let p=l&&u?`the quotes and "${u}"`:l?`the quotes`:u?`"${u}"`:null,m=p?{without:c,withoutLength:hV(c),what:p,question:l&&u?`This is in quotes and starts with "${u}". Store it without them? [Y/n]`:l?`This is in quotes. Store it without them? [Y/n]`:`This starts with "${u}". Store it without that? [Y/n]`}:null;return{status:`ok`,value:n,length:r,removed:s,received:CV(r,s),wrapper:m}}function CV(e,t){return`Received ${e} character${e===1?``:`s`}${t?` (removed ${t})`:``}.`}function wV(e,t){return e.ok?{ok:!0,message:t,warnings:(e.meta.warnings??[]).map(e=>e.message)}:{ok:!1,message:e.error.message,fix:e.error.fix??null}}function TV(e){return{ok:!1,message:e instanceof Error?e.message:String(e),fix:null}}function EV({outcome:e}){return e?e.ok?(0,q.jsxs)(`div`,{role:`status`,className:`outcome-line outcome-line--ok`,children:[(0,q.jsx)(`p`,{children:e.message}),e.warnings.length>0&&(0,q.jsx)(`ul`,{className:`plain`,children:e.warnings.map((e,t)=>(0,q.jsx)(`li`,{className:`note`,children:e},t))})]}):(0,q.jsxs)(`div`,{role:`alert`,className:`outcome-line outcome-line--failed failure`,children:[(0,q.jsx)(`p`,{children:e.message}),e.fix&&(0,q.jsxs)(`p`,{className:`note`,children:[`Fix: `,e.fix]})]}):(0,q.jsx)(`div`,{role:`status`,className:`outcome-line`})}function DV(e,t=[]){return[`toil`,e,...t].join(` `)}function OV({title:e,explain:t,runs:n,submit:r,disabled:i,onSubmit:a,children:o,danger:s=!1,titleId:c}){let l=(0,v.useId)(),u=c??l,[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(null);return(0,q.jsxs)(`form`,{className:`change`,"aria-labelledby":c??`${u}-title`,onSubmit:async e=>{if(e.preventDefault(),!(i||d)){f(!0),m(null);try{m(await a())}catch(e){m(TV(e))}finally{f(!1)}}},noValidate:!0,children:[(0,q.jsx)(`h3`,{id:c??`${u}-title`,tabIndex:c?-1:void 0,children:e}),(0,q.jsx)(`p`,{className:`explain`,children:t}),o,(0,q.jsxs)(`p`,{className:`runs`,children:[`Runs `,(0,q.jsx)(`code`,{children:n})]}),(0,q.jsxs)(`div`,{className:`change-actions`,children:[(0,q.jsx)(`button`,{type:`submit`,className:`btn ${s?`btn--danger`:`btn--accent`}`,disabled:i!==null||d,"aria-describedby":i?`${u}-off`:void 0,children:d?`Running…`:r}),i&&(0,q.jsxs)(`span`,{id:`${u}-off`,className:`note`,children:[`Turned off: `,i]})]}),(0,q.jsx)(EV,{outcome:p})]})}function kV({label:e,value:t,onChange:n,hint:r,type:i=`text`,required:a=!1,autoComplete:o=`off`,placeholder:s}){let c=(0,v.useId)();return(0,q.jsxs)(`div`,{className:`field-row`,children:[(0,q.jsxs)(`label`,{htmlFor:c,children:[e,a&&(0,q.jsx)(`span`,{className:`req`,children:` (required)`})]}),(0,q.jsx)(`input`,{id:c,type:i,value:t,onChange:e=>n(e.target.value),"aria-describedby":r?`${c}-hint`:void 0,required:a,autoComplete:o,spellCheck:!1,placeholder:s}),r&&(0,q.jsx)(`p`,{id:`${c}-hint`,className:`note`,children:r})]})}function AV({label:e,value:t,onChange:n,hint:r,rows:i=3}){let a=(0,v.useId)();return(0,q.jsxs)(`div`,{className:`field-row`,children:[(0,q.jsx)(`label`,{htmlFor:a,children:e}),(0,q.jsx)(`textarea`,{id:a,rows:i,value:t,onChange:e=>n(e.target.value),"aria-describedby":r?`${a}-hint`:void 0,spellCheck:!1}),r&&(0,q.jsx)(`p`,{id:`${a}-hint`,className:`note`,children:r})]})}function jV({label:e,value:t,onChange:n,options:r,hint:i}){let a=(0,v.useId)();return(0,q.jsxs)(`div`,{className:`field-row`,children:[(0,q.jsx)(`label`,{htmlFor:a,children:e}),(0,q.jsx)(`select`,{id:a,value:t,onChange:e=>n(e.target.value),"aria-describedby":i?`${a}-hint`:void 0,children:r.map(e=>(0,q.jsx)(`option`,{value:e.value,children:e.label},e.value))}),i&&(0,q.jsx)(`p`,{id:`${a}-hint`,className:`note`,children:i})]})}function MV({label:e,checked:t,onChange:n,hint:r}){let i=(0,v.useId)();return(0,q.jsxs)(`div`,{className:`field-row field-row--check`,children:[(0,q.jsx)(`input`,{id:i,type:`checkbox`,checked:t,onChange:e=>n(e.target.checked),"aria-describedby":r?`${i}-hint`:void 0}),(0,q.jsx)(`label`,{htmlFor:i,children:e}),r&&(0,q.jsx)(`p`,{id:`${i}-hint`,className:`note`,children:r})]})}function NV(e){return e.status===`empty`?e.empty===`keep`?`Empty: the current secret is kept`:e.empty===`required`?`Empty: this one is required`:`Empty: none is stored`:e.status===`refused`?`${e.message} ${e.fix}`:`${e.length} character${e.length===1?``:`s`}${e.removed?` (removed ${e.removed})`:``}`}var PV=e=>e.status===`ok`&&e.wrapper?e.wrapper.question.replace(/ \[Y\/n\]$/,``):null;function FV(e,t,n){if(t.status===`refused`||t.status===`empty`&&t.empty===`required`)return{ok:!1,message:`${e}: ${t.message}`,fix:t.fix};let r=PV(t);return r&&!n?{ok:!1,message:`${e}: ${r}`,fix:`Choose Remove it or Keep it under ${e}, then save again.`}:null}function IV({label:e,value:t,onChange:n,rules:r,asking:i,kept:a,onKeep:o,hint:s}){let c=(0,v.useId)(),l=SV(t,r),u=PV(l);return(0,q.jsxs)(`div`,{className:`field-row`,children:[(0,q.jsxs)(`label`,{htmlFor:c,children:[e,r.empty===`required`&&(0,q.jsx)(`span`,{className:`req`,children:` (required)`})]}),(0,q.jsx)(`input`,{id:c,type:`password`,value:t,onChange:e=>n(e.target.value),onPaste:e=>{let t=e.clipboardData.getData(`text`);if(!/[\r\n]/.test(t))return;e.preventDefault();let r=e.currentTarget,i=r.selectionStart??r.value.length,a=r.selectionEnd??i;n(r.value.slice(0,i)+t+r.value.slice(a))},"aria-describedby":`${c}-count${s?` ${c}-hint`:``}`,required:r.empty===`required`,autoComplete:`new-password`,spellCheck:!1}),(0,q.jsx)(`p`,{id:`${c}-count`,className:`note${l.status===`refused`?` failure`:``}`,"aria-live":`polite`,children:NV(l)}),i&&u&&!a&&(0,q.jsxs)(`div`,{className:`secret-ask`,role:`group`,"aria-label":`${e}: ${u}`,children:[(0,q.jsx)(`p`,{children:u}),(0,q.jsxs)(`div`,{className:`change-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`btn btn--small`,onClick:()=>l.status===`ok`&&l.wrapper&&n(l.wrapper.without),children:`Remove it`}),(0,q.jsx)(`button`,{type:`button`,className:`btn btn--small btn--quiet`,onClick:o,children:`Keep it`})]})]}),s&&(0,q.jsx)(`p`,{id:`${c}-hint`,className:`note`,children:s})]})}var LV={env:`env var`,ci:`CI variable`,file:`config file`,store:`credential store`,defaults:`area defaults`};function RV(e){return e.ok?{ok:!0,data:e.data,warnings:(e.meta.warnings??[]).map(e=>e.message)}:{ok:!1,message:`${e.error.message}${e.error.fix?` ${e.error.fix}`:``}`}}function zV({config:e,at:t,toForm:n=!1}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),s=(0,v.useCallback)(async()=>{try{i(RV(await e.run(`connections list`,{})))}catch(e){i({ok:!1,message:e instanceof Error?e.message:String(e)})}},[e]);if((0,v.useEffect)(()=>{s(),e.areas().then(o,()=>o([]))},[e,s]),Bw(n?`conn-add`:t?`conn-${t}`:null,!!r),!r)return(0,q.jsx)(PA,{size:`panel`,message:`Reading your connections with toil connections list…`});if(!r.ok)return(0,q.jsx)(`div`,{role:`alert`,className:`failure`,children:(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`code`,{children:`toil connections list`}),` failed: `,r.message]})});let{data:c}=r;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`conn-list`,children:[(0,q.jsx)(`h2`,{id:`conn-list`,children:`Your connections`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`From `,(0,q.jsx)(`code`,{children:`toil connections list`}),`. Changes are written to `,(0,q.jsx)(iE,{value:c.configFile,what:`config file path`}),`. `,(0,q.jsx)(Fw,{topic:`connections`})]}),t&&!c.connections.some(e=>e.name===t)&&(0,q.jsxs)(`p`,{role:`status`,className:`failure`,children:[`toil has no connection named `,(0,q.jsx)(`code`,{children:t}),`. It may have been removed or renamed; add it again below.`]}),c.connections.length===0?(0,q.jsx)(`p`,{children:`toil has no connections yet. Add one below.`}):(0,q.jsx)(QT,{min:`lg`,className:`conn-cards`,children:c.connections.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsx)(BV,{connection:t,areas:a??[],config:e,configFile:c.configFile,onChanged:s})},t.name))})]}),(0,q.jsx)(GV,{areas:a,config:e,onChanged:s})]})}function BV({connection:e,areas:t,config:n,configFile:r,onChanged:i}){let[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=dV(e),f=`conn-${e.name}`,p=t.find(t=>t.name===e.area)?.connection.filter(e=>e.secret)??[],m=async()=>{u(!0),c(null);try{let t=await n.run(`connections test`,{name:e.name}),r=t.ok?t.data:null,i=r?r.live?`${e.name} answered ${r.request??`its check`}${r.authenticated?`, so its credential works.`:`, but that read needs no credential, so it shows only that the host answers.`}`:`toil has no live check for ${e.area} connections, so nothing was sent; the settings are complete and the secret was read.`:``;c(wV(t,i))}catch(e){c(TV(e))}finally{u(!1)}},h=e=>o(t=>t===e?null:e),g=async(e,t)=>{let n=wV(e,t);return n.ok&&await i(),n};return(0,q.jsxs)(Q,{className:`conn-card`,"aria-labelledby":f,children:[(0,q.jsxs)(`div`,{className:`conn-head`,children:[(0,q.jsx)(`h3`,{id:f,tabIndex:-1,children:(0,q.jsx)(`code`,{children:e.name})}),(0,q.jsxs)(`ul`,{className:`conn-tags`,"aria-label":`About this connection`,children:[(0,q.jsx)(`li`,{className:`tag`,children:e.area}),e.isDefault&&(0,q.jsxs)(`li`,{className:`tag tag--accent`,children:[e.area,`'s default`]}),(0,q.jsxs)(`li`,{className:`tag ${e.writes?`tag--warn`:``}`,children:[`Writes `,e.writes?`on`:`off`]}),d&&(0,q.jsx)(`li`,{className:`tag`,children:`Set by env vars`})]})]}),(0,q.jsxs)(`dl`,{className:`facts`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Host`}),(0,q.jsx)(`dd`,{children:e.host??`None set`})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Values from`}),(0,q.jsx)(`dd`,{children:Object.keys(e.values).length===0?`Nothing beyond its area`:Object.entries(e.values).map(([e,t])=>`${e}: ${LV[t]??t}`).join(`, `)})]})]}),d&&(0,q.jsxs)(`p`,{className:`note`,children:[`Made by env vars alone (`,(0,q.jsxs)(`code`,{children:[fV(e.name),`*`]}),`, or `,e.area,`'s own `,(0,q.jsxs)(`code`,{children:[`TOIL_`,e.area.toUpperCase().replace(/-/g,`_`),`_*`]}),` and CI variables), not by `,(0,q.jsx)(`code`,{children:r}),`. toil's commands can't change a variable, so this connection is read-only here: change the variables where they're set. Testing it changes nothing.`]}),(0,q.jsxs)(`div`,{className:`conn-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`btn`,onClick:m,disabled:l,"aria-describedby":`${f}-test`,children:l?`Testing…`:`Test`}),!d&&(0,q.jsxs)(q.Fragment,{children:[!e.isDefault&&(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":a==="default",onClick:()=>h(`default`),children:`Make default`}),(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":a===`writes`,onClick:()=>h(`writes`),children:e.writes?`Turn writes off`:`Turn writes on`}),p.length>0&&(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":a===`login`,onClick:()=>h(`login`),children:`Replace secret`}),(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":a===`remove`,onClick:()=>h(`remove`),children:`Remove`})]})]}),(0,q.jsxs)(`p`,{id:`${f}-test`,className:`note`,children:[`Test sends `,e.area,`'s one cheap authenticated read, as a real command would (`,(0,q.jsx)(`code`,{children:DV(`connections test`,[e.name])}),`), and changes nothing.`]}),(0,q.jsx)(EV,{outcome:s}),a==="default"&&(0,q.jsx)(OV,{title:`Make ${e.name} the ${e.area} default`,explain:`${e.area} commands use it when a call names no connection and its dossier names none. The previous default stays as it is, just no longer the default.`,runs:DV(`connections default`,[e.name]),submit:`Make default`,disabled:n.disabled,onSubmit:async()=>g(await n.run(`connections default`,{name:e.name}),`${e.name} is now the ${e.area} default.`)}),a===`writes`&&(0,q.jsx)(VV,{connection:e,config:n,after:g}),a===`login`&&(0,q.jsx)(HV,{connection:e,fields:p,config:n,after:g}),a===`remove`&&(0,q.jsx)(OV,{title:`Remove ${e.name}`,explain:`Takes ${e.name} out of ${r} and deletes its secrets from the OS credential store, unless another connection uses them. A dossier that names it then fails until it names another. This can't be undone here: adding it again means typing its secret again.`,runs:DV(`connections remove`,[e.name]),submit:`Remove ${e.name}`,danger:!0,disabled:n.disabled,onSubmit:async()=>g(await n.run(`connections remove`,{name:e.name}),`${e.name} was removed.`)})]})}function VV({connection:e,config:t,after:n}){let[r,i]=(0,v.useState)(``);return e.writes?(0,q.jsx)(OV,{title:`Turn writes off for ${e.name}`,explain:`Commands can no longer change anything in ${e.area} through ${e.name}, even with --allow-write. Reads carry on as before.`,runs:DV(`connections writes`,[e.name,`off`]),submit:`Turn writes off`,disabled:t.disabled,onSubmit:async()=>n(await t.run(`connections writes`,{name:e.name,state:`off`}),`Writes are off for ${e.name}.`)}):(0,q.jsx)(OV,{title:`Turn writes on for ${e.name}`,explain:(0,q.jsxs)(q.Fragment,{children:[`Writes let commands change data in `,e.area,` through `,e.name,` when a call also passes `,(0,q.jsx)(`code`,{children:`--allow-write`}),`. Toil UI itself never writes to `,e.area,`: its proposals are commands for you to run. toil asks you to type the connection's name to turn writes on, here as on the terminal, and turns them on only if it matches.`]}),runs:DV(`connections writes`,[e.name,`on`]),submit:`Turn writes on`,danger:!0,disabled:t.disabled,onSubmit:async()=>{let a=r;return i(``),n(await t.run(`connections writes`,{name:e.name,state:`on`},{answers:{"confirm-name":a}}),`Writes are on for ${e.name}.`)},children:(0,q.jsx)(kV,{label:`Type ${e.name} to turn them on`,value:r,onChange:i,required:!0})})}function HV({connection:e,fields:t,config:n,after:r}){let[i,a]=(0,v.useState)({}),o=UV(),s=t=>e.values[t.name]===`store`||e.values[t.name]===`file`,c=e=>({password:e.password,empty:s(e)?`keep`:`skip`});return(0,q.jsx)(OV,{title:`Replace ${e.name}'s secret`,explain:`Stores what you type in the OS credential store, reads it back to check, and only then points ${e.name} at it and deletes the old one. A field left empty keeps its secret as it is. Toil UI doesn't keep what you type: it goes to toil in one request, and the fields are cleared.`,runs:DV(`connections login`,[e.name]),submit:`Save to the credential store`,disabled:n.disabled,onSubmit:async()=>{let s=o.refusal(t.map(e=>[e.name,i[e.name]??``,c(e)]));if(s)return s;let l=Object.fromEntries(t.map(e=>[e.name,i[e.name]??``])),u=o.answers();return a({}),o.reset(),r(await n.run(`connections login`,{name:e.name},{secrets:l,answers:u}),`${e.name}'s secret was replaced in the credential store.`)},children:t.map(e=>(0,q.jsx)(IV,{label:`${e.name}${e.description?` (${e.description})`:``}`,value:i[e.name]??``,onChange:t=>{a(n=>({...n,[e.name]:t})),o.changed(e.name)},rules:c(e),asking:o.asking,kept:o.kept(e.name),onKeep:()=>o.keep(e.name)},e.name))})}function UV(){let[e,t]=(0,v.useState)({}),[n,r]=(0,v.useState)(!1);return{asking:n,kept:t=>e[t]===!0,keep:e=>t(t=>({...t,[e]:!0})),changed:e=>t(t=>t[e]?{...t,[e]:!1}:t),reset:()=>{t({}),r(!1)},refusal:t=>{for(let[n,i,a]of t){let t=FV(n,SV(i,a),e[n]===!0);if(t)return r(!0),t}return null},answers:()=>Object.fromEntries(Object.keys(e).filter(t=>e[t]).map(e=>[`unwrap:${e}`,`n`]))}}var WV=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function GV({areas:e,config:t,onChanged:n}){let r=(e??[]).filter(e=>e.connection.length>0);return e===null?null:r.length===0?(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`conn-add`,children:[(0,q.jsx)(`h2`,{id:`conn-add`,children:`Add a connection`}),(0,q.jsxs)(`p`,{children:[`The toil this server runs doesn't say what each area's connection holds, so the page can't ask for it. Add one with `,(0,q.jsx)(`code`,{children:`toil connections add`}),` in a terminal.`]})]}):(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`conn-add`,children:[(0,q.jsx)(`h2`,{id:`conn-add`,children:`Add a connection`}),(0,q.jsx)(KV,{areas:r,config:t,onAdded:n})]})}function KV({areas:e,config:t,onAdded:n,area:r,suggest:i,title:a=`A new connection`}){let o=e.filter(e=>e.connection.length>0&&(r===void 0||e.name===r)),[s,c]=(0,v.useState)(i?.name??``),[l,u]=(0,v.useState)(r??``),[d,f]=(0,v.useState)(i?.values??{}),[p,m]=(0,v.useState)({}),h=UV(),g=e=>({password:e.password,empty:e.required?`required`:`skip`,envVars:[`${pV(s||`<name>`,`area`)}=${_?.name??`<area>`}`,...y.map(e=>pV(s||`<name>`,e.name))]}),_=o.find(e=>e.name===l)??o[0],y=_?.connection??[],b=y.filter(e=>!e.secret),x=b.filter(e=>e.required),S=b.filter(e=>!e.required),C=y.filter(e=>e.secret),w=e=>`${e.name}${e.description?` (${e.description})`:``}`;if(!_)return(0,q.jsxs)(`p`,{className:`note`,children:[`The toil this server runs doesn't say what a `,r,` connection holds. Add one with `,(0,q.jsx)(`code`,{children:`toil connections add`}),` in a terminal.`]});let T=[`area ${_.name}`,...b.filter(e=>(d[e.name]??``)!==``).map(e=>`${e.name} ${d[e.name]}`),...C.filter(e=>(p[e.name]??``)!==``).map(e=>`${e.name} to the OS credential store`)].join(`, `);return(0,q.jsxs)(OV,{title:a,explain:(0,q.jsxs)(q.Fragment,{children:[`Asks for what `,(0,q.jsx)(`code`,{children:`toil connections add`}),` asks on a terminal. The settings go into your config file and each secret into the OS credential store, never the file. The first connection to an area becomes its default. Writes start off.`]}),runs:DV(`connections add`,[s||`<name>`,`--area`,_.name]),submit:`Save connection`,disabled:t.disabled,onSubmit:async()=>{if(!WV.test(s))return{ok:!1,message:`"${s}" isn't a valid connection name.`,fix:`Use lowercase letters, digits and single hyphens, starting with a letter, e.g. corp-jira.`};let e={confirm:`y`};for(let t of b)e[`setting:${t.name}`]=d[t.name]??``;let r=h.refusal(C.map(e=>[e.name,p[e.name]??``,g(e)]));if(r)return r;Object.assign(e,h.answers());let i=Object.fromEntries(C.map(e=>[e.name,p[e.name]??``]));m({}),h.reset();let a=wV(await t.run(`connections add`,{name:s,area:_.name},{answers:e,secrets:i}),`${s} was added.`);return a.ok&&(c(``),f({}),await n(s)),a},children:[(0,q.jsx)(kV,{label:`Name`,value:s,onChange:c,required:!0,hint:`Lowercase letters, digits and single hyphens, e.g. corp-jira.`}),r===void 0&&(0,q.jsx)(jV,{label:`Area`,value:_.name,onChange:e=>{u(e),f({}),m({}),h.reset()},options:o.map(e=>({value:e.name,label:e.name})),hint:_.description}),x.map(e=>(0,q.jsx)(kV,{label:w(e),value:d[e.name]??``,onChange:t=>f(n=>({...n,[e.name]:t})),required:!0,placeholder:e.default??void 0},e.name)),C.map(e=>(0,q.jsx)(IV,{label:`${w(e)}${e.password?`, a password`:``}`,value:p[e.name]??``,onChange:t=>{m(n=>({...n,[e.name]:t})),h.changed(e.name)},rules:g(e),asking:h.asking,kept:h.kept(e.name),onKeep:()=>h.keep(e.name),hint:`Goes to the OS credential store; never shown again, and never in the config file.`},e.name)),S.length>0&&(0,q.jsxs)(`details`,{className:`more`,children:[(0,q.jsxs)(`summary`,{children:[`Optional settings (`,S.length,`)`]}),S.map(e=>(0,q.jsx)(kV,{label:w(e),value:d[e.name]??``,onChange:t=>f(n=>({...n,[e.name]:t})),placeholder:e.default??void 0,hint:e.default?`Left empty, it stays ${e.default}.`:void 0},e.name))]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Saves: `,T,`.`]})]})}var qV={matched:`Ready`,default:`Ready (your default)`,created:`Added`,pinned:`Pinned in your copy`,missing:`No connection yet`,ambiguous:`Several fit: pick one`},JV=e=>`host`in e?`host ${e.host}`:`connection`in e?`connection ${e.connection}`:`your default`;function YV(e){return e.ok?{ok:!0,plan:e.data,warnings:(e.meta.warnings??[]).map(e=>e.message)}:{ok:!1,message:e.error.message,fix:e.error.fix??null}}function XV({config:e,areas:t,onChanged:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d={...r.trim()?{cwd:r.trim()}:{},...a.trim()?{dossier:a.trim()}:{}},f=async(t={})=>{u(!0);try{let n=YV(await e.run(`dossiers onboard`,{...d,plan:!0,...t}));return c(n),n}catch(e){let t={ok:!1,message:TV(e).message,fix:null};return c(t),t}finally{u(!1)}},p=e=>{e.preventDefault(),l||f()},m=[...d.dossier?[d.dossier]:[],...d.cwd?[`--cwd`,d.cwd]:[],`--plan`];return(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`repo-setup`,children:[(0,q.jsx)(`h2`,{id:`repo-setup`,children:`Set up this repo`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`For a repository with a dossier checked in, through `,(0,q.jsx)(`code`,{children:`toil dossiers onboard`}),`, which on a terminal asks for each missing connection itself. `,(0,q.jsx)(Fw,{topic:`repo-setup`})]}),(0,q.jsxs)(`form`,{className:`change`,"aria-labelledby":`repo-setup-form`,onSubmit:p,noValidate:!0,children:[(0,q.jsx)(`h3`,{id:`repo-setup-form`,children:`Check a repository`}),(0,q.jsx)(kV,{label:`Repository folder`,value:r,onChange:i,hint:`A folder in the clone. Left empty, the folder Toil UI was started in.`}),(0,q.jsx)(kV,{label:`Dossier`,value:a,onChange:o,hint:`Left empty, the one the folder resolves to.`}),(0,q.jsxs)(`p`,{className:`runs`,children:[`Runs `,(0,q.jsx)(`code`,{children:DV(`dossiers onboard`,m)}),`, which reads your config and dossiers and sends one test read per connection. It changes nothing.`]}),(0,q.jsx)(`div`,{className:`change-actions`,children:(0,q.jsx)(`button`,{type:`submit`,className:`btn btn--accent`,disabled:l,"aria-busy":l||void 0,children:l?`Checking…`:`Check this repo`})})]}),s&&!s.ok&&(0,q.jsx)(EV,{outcome:{ok:!1,message:s.message,fix:s.fix}}),s?.ok&&(0,q.jsx)(ZV,{loadedPlan:s,areas:t,config:e,rerun:f,onChanged:n})]})}function ZV({loadedPlan:e,areas:t,config:n,rerun:r,onChanged:i}){let{plan:a,warnings:o}=e,s=a.areas.filter(e=>e.connection!==null&&e.test?.ok).length,c=a.ok?{ok:!0,message:`${a.dossier.name} is set up: every area has a connection and read successfully.`,warnings:o}:{ok:!1,message:`${a.dossier.name}: ${s} of ${a.areas.length} area${a.areas.length===1?``:`s`} ready.`,fix:a.check.ok?null:`dossiers check found problems, listed below.`},l=a.areas.filter(e=>e.status===`missing`),u=a.areas.filter(e=>e.status===`ambiguous`);return(0,q.jsxs)(XT,{gap:`sm`,className:`shown`,children:[(0,q.jsxs)(`p`,{className:`note`,children:[(0,q.jsx)(iE,{value:a.dossier.file,what:`${a.dossier.name}'s file path`}),` (`,a.dossier.source,`)`,a.ownCopy&&(0,q.jsxs)(q.Fragment,{children:[`; your own copy, `,(0,q.jsx)(iE,{value:a.ownCopy,what:`your copy's file path`}),`, applies`]})]}),(0,q.jsx)(EV,{outcome:c}),(0,q.jsx)(tE,{label:`What ${a.dossier.name}'s areas use`,caption:`What ${a.dossier.name}'s areas use`,rows:a.areas,rowKey:e=>e.path,columns:[{header:`Area`,label:`Area`,rowHeader:!0,cell:e=>e.path},{header:`Selects`,label:`Selects`,cell:e=>(0,q.jsx)(`span`,{className:`any-break`,children:JV(e.selects)})},{header:`Status`,label:`Status`,cell:e=>(0,q.jsx)(`span`,{className:e.status===`missing`||e.status===`ambiguous`?`failure`:void 0,children:qV[e.status]})},{header:`Connection`,label:`Connection`,cell:e=>e.connection??(e.candidates?e.candidates.join(`, `):`–`)},{header:`Test read`,label:`Test read`,cell:e=>e.test===null?`–`:e.test.ok?(0,q.jsx)(`span`,{className:`any-break`,children:e.test.request??`settings and secret only`}):(0,q.jsx)(`span`,{className:`failure`,children:e.test.error?.message})}]}),a.check.problems.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h4`,{className:`shown-repos`,children:`dossiers check`}),(0,q.jsx)(`ul`,{className:`plain`,children:a.check.problems.map((e,t)=>(0,q.jsxs)(`li`,{className:e.level===`error`?`failure`:`note`,children:[e.level,`: `,(0,q.jsx)(`code`,{children:e.path}),` `,e.message]},t))})]}),l.map(e=>{let a=`host`in e.selects?e.selects.host:void 0;return(0,q.jsx)(KV,{areas:t,config:n,area:e.area,title:`Add a ${e.area} connection${a?` on ${a}`:``}`,suggest:{...e.suggest?.name?{name:e.suggest.name}:{},...e.suggest?.baseUrl?{values:{baseUrl:e.suggest.baseUrl}}:{}},onAdded:async()=>{await r(),await i()}},e.path)}),u.map(e=>(0,q.jsx)(QV,{area:e,dossier:a.dossier.name,config:n,pin:t=>r({pin:[`${e.area}=${t}`]})},e.path))]})}function QV({area:e,dossier:t,config:n,pin:r}){let i=e.candidates??[],[a,o]=(0,v.useState)(i[0]??``);return(0,q.jsx)(OV,{title:`Pick the ${e.area} connection for ${t}`,explain:`Several of your ${e.area} connections fit ${e.path}. The one you pick is pinned in your own copy of ${t} (~/.toil/dossiers), which then applies wherever the shared one does. Your copy is yours, so writes may follow its bindings.`,runs:DV(`dossiers onboard`,[t,`--plan`,`--pin`,`${e.area}=${a||`<connection>`}`]),submit:`Pin it`,disabled:n.disabled,onSubmit:async()=>{let t=await r(a);return t.ok?{ok:!0,message:`${a} is pinned for ${e.area}.`,warnings:t.warnings}:{ok:!1,message:t.message,fix:t.fix}},children:(0,q.jsx)(jV,{label:`Connection`,value:a,onChange:o,options:i.map(e=>({value:e,label:e}))})})}var $V=e=>e.ok?{ok:!0,value:e.data}:{ok:!1,message:`${e.error.message}${e.error.fix?` ${e.error.fix}`:``}`},eH={sources:`dossier-form-sources`,repos:`dossier-form-repos`,fields:`dossier-form-fields`,people:`dossier-form-people`,wip:`dossier-form-wip`};function tH({config:e,at:t,toForm:n=!1}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(t?.dossier??``);(0,v.useEffect)(()=>{t?.dossier&&u(t.dossier)},[t?.dossier]);let d=(0,v.useCallback)(async()=>{try{i($V(await e.run(`dossiers list`,{})))}catch(e){i({ok:!1,message:e instanceof Error?e.message:String(e)})}},[e]);(0,v.useEffect)(()=>{d(),e.areas().then(o,()=>o([])),e.run(`connections list`,{}).then(e=>e.ok&&c(e.data.connections),()=>{})},[e,d]);let f=!!(t&&r?.ok&&r.value.dossiers.some(e=>e.name===t.dossier));if(Bw(n?`dossier-change`:t?f?eH[t.section??``]??`dossier-change`:`dossier-change`:null,!!r),!r)return(0,q.jsx)(PA,{size:`panel`,message:`Reading your dossiers with toil dossiers list…`});if(!r.ok)return(0,q.jsx)(`div`,{role:`alert`,className:`failure`,children:(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`code`,{children:`toil dossiers list`}),` failed: `,r.message]})});let p=r.value.dossiers,m=p.find(e=>e.name===l)?.name??p[0]?.name??``;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(XV,{config:e,areas:a,onChanged:d}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`dossier-list`,children:[(0,q.jsx)(`h2`,{id:`dossier-list`,children:`Your dossiers`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`From `,(0,q.jsx)(`code`,{children:`toil dossiers list`}),`; yours are in `,(0,q.jsx)(iE,{value:r.value.places.user,what:`folder path`}),`. `,(0,q.jsx)(Fw,{topic:`dossier-list`})]}),p.length===0?(0,q.jsx)(`p`,{children:`toil sees no dossiers yet. Create one below.`}):(0,q.jsx)(QT,{min:`lg`,className:`conn-cards`,children:p.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsx)(nH,{dossier:t,config:e})},t.file))})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`dossier-change`,children:[(0,q.jsx)(`h2`,{id:`dossier-change`,tabIndex:-1,children:`Create or change a dossier`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`Each form runs one `,(0,q.jsx)(`code`,{children:`toil dossiers`}),` command. `,(0,q.jsx)(Fw,{topic:`dossier-setup`})]}),t&&r.ok&&!f&&(0,q.jsxs)(`p`,{role:`status`,className:`failure`,children:[`toil sees no dossier named `,(0,q.jsx)(`code`,{children:t.dossier}),`. It may have been removed or renamed; create it again below.`]}),(0,q.jsx)(iH,{config:e,onChanged:d}),p.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(jV,{label:`Dossier to change`,value:m,onChange:u,options:p.map(e=>({value:e.name,label:`${e.name} (${e.source})`})),hint:`The forms below change this one.`}),(0,q.jsx)(aH,{config:e,dossier:m}),(0,q.jsx)(oH,{config:e,dossier:m,areas:a,connections:s}),(0,q.jsx)(lH,{config:e,dossier:m,areas:a}),(0,q.jsx)(sH,{config:e,dossier:m,areas:a}),(0,q.jsx)(cH,{config:e,dossier:m})]})]})]})}function nH({dossier:e,config:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)([]),c=`dossier-card-${e.name}`;return(0,q.jsxs)(Q,{className:`conn-card`,"aria-labelledby":c,children:[(0,q.jsxs)(`div`,{className:`conn-head`,children:[(0,q.jsx)(`h3`,{id:c,children:(0,q.jsx)(`code`,{children:e.name})}),(0,q.jsxs)(`ul`,{className:`conn-tags`,"aria-label":`About this dossier`,children:[(0,q.jsx)(`li`,{className:`tag`,children:e.source}),e.problems>0&&(0,q.jsxs)(`li`,{className:`tag tag--warn`,children:[e.problems,` problem`,e.problems===1?``:`s`]})]})]}),e.description&&(0,q.jsx)(`p`,{children:e.description}),(0,q.jsxs)(`p`,{className:`note`,children:[(0,q.jsx)(iE,{value:e.file,what:`${e.name}'s file path`}),e.shadowedBy&&(0,q.jsxs)(q.Fragment,{children:[` (a dossier of the same name in `,e.shadowedBy,` takes precedence)`]})]}),(0,q.jsxs)(ZT,{className:`conn-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":n!==null,onClick:async()=>{if(n)return r(null);try{r($V(await t.run(`dossiers show`,{dossier:e.name})))}catch(e){r({ok:!1,message:e instanceof Error?e.message:String(e)})}},children:n?`Hide`:`Show`}),(0,q.jsx)(`button`,{type:`button`,className:`btn`,onClick:async()=>{a(null);try{let n=await t.run(`dossiers check`,{dossier:e.name}),r=n.ok?n.data:null;s(r?.problems??[]),a(r&&!r.ok?{ok:!1,message:`${e.name} has problems toil would refuse it for.`,fix:null}:wV(n,r?.problems.length?`${e.name} checks out, with ${r.problems.length} warning${r.problems.length===1?``:`s`}.`:`${e.name} checks out: no problems.`))}catch(e){a(TV(e))}},children:`Check`})]}),(0,q.jsx)(EV,{outcome:i}),o.length>0&&(0,q.jsx)(`ul`,{className:`plain`,children:o.map((e,t)=>(0,q.jsxs)(`li`,{className:e.level===`error`?`failure`:`note`,children:[e.level,`: `,(0,q.jsx)(`code`,{children:e.path}),` `,e.message]},t))}),n&&!n.ok&&(0,q.jsxs)(`p`,{role:`alert`,className:`failure`,children:[(0,q.jsxs)(`code`,{children:[`toil dossiers show `,e.name]}),` failed: `,n.message]}),n?.ok&&(0,q.jsx)(rH,{shown:n.value})]})}function rH({shown:e}){let t=Object.entries(e.areas),n=e.dossier.repos??[];return(0,q.jsxs)(XT,{className:`shown`,gap:`sm`,children:[(0,q.jsx)(tE,{label:`What ${e.name} gives each area`,caption:`What ${e.name} gives each area`,rows:t,rowKey:([e])=>e,columns:[{header:`Area`,label:`Area`,rowHeader:!0,cell:([e])=>e},{header:`Connection`,label:`Connection`,cell:([,e])=>e.error?(0,q.jsx)(`span`,{className:`failure`,children:e.error.message}):e.connection?`${e.connection.value} (${e.connection.source})`:`Your default`},{header:`Writes`,label:`Writes`,cell:([,e])=>e.writes===null?`–`:e.writes?`On`:`Off`},{header:`Inputs`,label:`Inputs`,cell:([,e])=>(0,q.jsxs)(q.Fragment,{children:[Object.entries(e.inputs).map(([e,t])=>`${e}=${t}`).join(`, `)||`None`,e.env&&(0,q.jsxs)(`span`,{className:`note`,children:[` (environment `,e.env,`)`]})]})}]}),(0,q.jsx)(`h4`,{className:`shown-repos`,children:`People`}),e.dossier.people?.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.dossier.people.map(e=>(0,q.jsxs)(`li`,{className:`any-break`,children:[e.name,e.kind===`agent`&&` (agent)`,(0,q.jsxs)(`span`,{className:`note`,children:[` `,Object.entries(e.ids??{}).map(([e,t])=>`${e} ${t}`).join(`, `)||`no identities yet`,e.email&&`; email ${e.email}`]})]},e.name))}):(0,q.jsx)(`p`,{className:`note`,children:`None yet.`}),(0,q.jsxs)(`p`,{className:`note`,children:[`Work-in-progress limit: `,e.dossier.wipLimit===void 0?`none set`:`${e.dossier.wipLimit} per person`,`.`]}),(0,q.jsx)(`h4`,{className:`shown-repos`,children:`Repositories`}),n.length?(0,q.jsx)(`ul`,{className:`plain`,children:n.map(e=>(0,q.jsxs)(`li`,{children:[e.name,e.remotes[0]&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(aE,{value:e.remotes[0],what:`${e.name}'s remote URL`})]})]},e.name))}):(0,q.jsx)(`p`,{className:`note`,children:`None yet.`})]})}function iH({config:e,onChanged:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``);return(0,q.jsxs)(OV,{title:`Create a dossier`,explain:`Makes an empty dossier for one body of work in your own folder (~/.toil/dossiers/<name>.json). Add its repositories and areas with the forms below. It refuses a name you already have.`,runs:DV(`dossiers init`,[n||`<name>`,...i?[`--description`,`…`]:[]]),submit:`Create dossier`,disabled:e.disabled,onSubmit:async()=>{let o=wV(await e.run(`dossiers init`,{name:n,...i?{description:i}:{}}),`${n} was created.`);return o.ok&&(r(``),a(``),await t()),o},children:[(0,q.jsx)(kV,{label:`Name`,value:n,onChange:r,required:!0,hint:`Lowercase letters, digits and single hyphens, e.g. payments.`}),(0,q.jsx)(kV,{label:`Description`,value:i,onChange:a,hint:`One line saying what the body of work is.`})]})}function aH({config:e,dossier:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(!1);return(0,q.jsxs)(OV,{titleId:`dossier-form-repos`,title:`Add a repository to ${t}`,explain:`Records a repository by its remote URL, or by a folder on this machine (its git root and origin remote). Any credential in a remote is left out of the file. toil then picks this dossier for calls made in that repository.`,runs:DV(`dossiers add-repo`,[t,n||`<folder|remote>`,...i?[`--name`,i]:[],...o?[`--replace`]:[]]),submit:`Add repository`,disabled:e.disabled,onSubmit:async()=>wV(await e.run(`dossiers add-repo`,{dossier:t,location:n,...i?{name:i}:{},...o?{replace:o}:{}}),`The repository was added to ${t}.`),children:[(0,q.jsx)(kV,{label:`Folder or remote URL`,value:n,onChange:r,required:!0,hint:(0,q.jsxs)(q.Fragment,{children:[`e.g. `,(0,q.jsx)(`span`,{className:`any-break`,children:`https://git.imagile.dev/pay/payments-api.git`})]})}),(0,q.jsx)(kV,{label:`Name in the dossier`,value:i,onChange:a,hint:`Defaults to the folder's or remote's last part.`}),(0,q.jsx)(MV,{label:`Replace a repository of that name`,checked:o,onChange:s})]})}function oH({config:e,dossier:t,areas:n,connections:r}){let[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(!1),m=n.map(e=>e.name),h=m.includes(i)?i:m.includes(`jira`)?`jira`:m[0]??``,g=r.filter(e=>e.area===h),_=[t,h,...o?[`--connection`,o]:[],...mV(c).flatMap(e=>[`--set`,e]),...mV(u).flatMap(e=>[`--add`,e]),...f?[`--replace`]:[]];return(0,q.jsxs)(OV,{titleId:`dossier-form-sources`,title:`Link an area to ${t}`,explain:`Attaches an area to the dossier: which of your connections its calls use (or your default), the keys it supplies to every call (project=PAY), and reference data lists (projects=FEES). toil refuses, from here, a link that would point the dossier at a connection with writes on: a person makes that one with toil dossiers link in a terminal.`,runs:DV(`dossiers link`,_),submit:`Link area`,disabled:e.disabled,onSubmit:async()=>wV(await e.run(`dossiers link`,{dossier:t,area:h,...o?{connection:o}:{},...mV(c).length?{set:mV(c)}:{},...mV(u).length?{add:mV(u)}:{},...f?{replace:f}:{}}),`${h} was linked to ${t}.`),children:[(0,q.jsx)(jV,{label:`Area`,value:h,onChange:e=>(a(e),s(``)),options:m.map(e=>({value:e,label:e}))}),(0,q.jsx)(jV,{label:`Connection`,value:o,onChange:s,options:[{value:``,label:`Your ${h} default`},...g.map(e=>({value:e.name,label:`${e.name}${e.writes?` (writes on)`:``}`}))]}),(0,q.jsx)(AV,{label:`Keys to set, one key=value per line`,value:c,onChange:l,hint:`The area's context inputs (project=PAY, owner=imagile) are applied to calls; any other key is kept as reference data.`}),(0,q.jsx)(AV,{label:`Values to add to lists, one key=value per line`,value:u,onChange:d,hint:`e.g. projects=FEES`}),(0,q.jsx)(MV,{label:`Replace values already set`,checked:f,onChange:p})]})}function sH({config:e,dossier:t,areas:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(`human`),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(!1),p=mV(a),m=[t,r?/\s/.test(r)?`"${r}"`:r:`<name>`,...p.flatMap(e=>[`--id`,e]),...s===`agent`?[`--kind`,`agent`]:[],...l?[`--email`,l]:[],...d?[`--replace`]:[]];return(0,q.jsxs)(OV,{titleId:`dossier-form-people`,title:`Add a person to ${t}`,explain:(0,q.jsxs)(q.Fragment,{children:[`Says who someone is in each system, so the People view gathers their work from all of them: one area=identity per line, the user name, login or email that system shows. An agent is a person of kind agent. Their email is only compared, to suggest which accounts are theirs. Removing a person or an identity is a delete, made in a terminal with `,(0,q.jsxs)(`code`,{children:[`toil dossiers person `,t,` <name> --remove`]}),`.`]}),runs:DV(`dossiers person`,m),submit:`Add person`,disabled:e.disabled,onSubmit:async()=>{let n=wV(await e.run(`dossiers person`,{dossier:t,name:r,...p.length?{id:p}:{},...s===`agent`?{kind:s}:{},...l?{email:l}:{},...d?{replace:d}:{}}),`${r} is in ${t}'s people.`);return n.ok&&(i(``),o(``),u(``)),n},children:[(0,q.jsx)(kV,{label:`Name`,value:r,onChange:i,required:!0,hint:`As the team writes it, e.g. Pat Example.`}),(0,q.jsx)(AV,{label:`Identities, one area=identity per line`,value:a,onChange:o,hint:(0,q.jsxs)(q.Fragment,{children:[`e.g. jira=pat and github=pat-ex. Areas: `,n.map(e=>e.name).join(`, `)||`the ones toil has`,`.`]})}),(0,q.jsx)(jV,{label:`Kind`,value:s,onChange:e=>c(e===`agent`?`agent`:`human`),options:[{value:`human`,label:`Person`},{value:`agent`,label:`Agent`}]}),(0,q.jsx)(kV,{label:`Email`,value:l,onChange:u,hint:`Optional, e.g. you@example.com. Compared only, to suggest matches.`}),(0,q.jsx)(MV,{label:`Replace an identity, kind or email already set`,checked:d,onChange:f})]})}function cH({config:e,dossier:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(!1),o=Number(n);return(0,q.jsxs)(OV,{titleId:`dossier-form-wip`,title:`Set ${t}'s work-in-progress limit`,explain:(0,q.jsxs)(q.Fragment,{children:[`How many items one person may have in progress at once, as the team agreed. The People view counts each person's work in progress against it, and names nobody else's. Clearing it is a delete, made in a terminal with `,(0,q.jsxs)(`code`,{children:[`toil dossiers wip-limit `,t,` --clear`]}),`.`]}),runs:DV(`dossiers wip-limit`,[t,n||`<limit>`,...i?[`--replace`]:[]]),submit:`Set limit`,disabled:e.disabled,onSubmit:async()=>!Number.isInteger(o)||o<1?{ok:!1,message:`The limit must be a whole number above 0.`,fix:`Type a number such as 3.`}:wV(await e.run(`dossiers wip-limit`,{dossier:t,limit:o,...i?{replace:i}:{}}),`${t}'s limit is ${o} per person.`),children:[(0,q.jsx)(kV,{label:`Limit`,value:n,onChange:r,required:!0,hint:`A whole number, e.g. 3.`}),(0,q.jsx)(MV,{label:`Replace a limit already set`,checked:i,onChange:a})]})}function lH({config:e,dossier:t,areas:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(!1),d=n.map(e=>e.name),f=d.includes(r)?r:d.includes(`jira`)?`jira`:d[0]??``;return(0,q.jsxs)(OV,{titleId:`dossier-form-fields`,title:`Name a field in ${t}`,explain:`Gives one of the area's fields a friendly name in this dossier (storyPoints for customfield_10002), so commands and Toil UI's work items use the name. The OWI fields estimate, priority, type, team and dueDate are pointed at a team's own field the same way.`,runs:DV(`dossiers field`,[t,f,a||`<alias>`,s||`<field-id>`,...l?[`--replace`]:[]]),submit:`Name field`,disabled:e.disabled,onSubmit:async()=>wV(await e.run(`dossiers field`,{dossier:t,area:f,alias:a,id:s,...l?{replace:l}:{}}),`${a} now names ${s} in ${t}.`),children:[(0,q.jsx)(jV,{label:`Area`,value:f,onChange:i,options:d.map(e=>({value:e,label:e}))}),(0,q.jsx)(kV,{label:`Alias`,value:a,onChange:o,required:!0,hint:`A camelCase name, e.g. storyPoints or estimate.`}),(0,q.jsx)(kV,{label:`Field id`,value:s,onChange:c,required:!0,hint:`The service's own id, e.g. customfield_10002.`}),(0,q.jsx)(MV,{label:`Point an existing alias at this field`,checked:l,onChange:u})]})}var uH=e=>e%1e3==0?`${e/1e3} s`:`${e} ms`;function dH({config:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null);if((0,v.useEffect)(()=>{e.run(`connections list`,{}).then(e=>{if(!e.ok)return c(e.error.message);n(e.data.configFile),i(e.meta.warnings?.find(e=>e.code===`BOUND_RELAXED`)?.message??null)},e=>c(e instanceof Error?e.message:String(e))),e.settings().then(o,e=>c(e instanceof Error?e.message:String(e)))},[e]),s)return(0,q.jsx)(`div`,{role:`alert`,className:`failure`,children:(0,q.jsxs)(`p`,{children:[`The settings didn't load: `,s]})});if(!t||!a)return(0,q.jsx)(PA,{size:`panel`,message:`Reading toil's settings…`});let l=a.timeout;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`lede`,children:[`Shown as toil reports them, with where each is set. `,(0,q.jsx)(Fw,{topic:`bounds`})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`bounds`,children:[(0,q.jsx)(`h2`,{id:`bounds`,children:`Bounds`}),(0,q.jsxs)(`dl`,{className:`fields`,children:[(0,q.jsx)(`dt`,{children:`The file workspace`}),(0,q.jsx)(`dd`,{children:r?`Relaxed: commands may read and write files anywhere you can, except toil's own files.`:`Held: commands read and write files only inside the workspace.`}),(0,q.jsx)(`dt`,{children:`Set in`}),(0,q.jsxs)(`dd`,{children:[(0,q.jsx)(iE,{value:t,what:`config file path`}),`, as `,(0,q.jsxs)(`code`,{children:[`"bounds": `,`{`,` "files": "unbounded" `,`}`]})]})]}),r&&(0,q.jsxs)(`p`,{className:`note`,children:[`toil says: `,r]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`timeout`,children:[(0,q.jsx)(`h2`,{id:`timeout`,children:`Time limit`}),(0,q.jsxs)(`dl`,{className:`fields`,children:[(0,q.jsx)(`dt`,{children:`Each command stops after`}),(0,q.jsxs)(`dd`,{children:[uH(l.effectiveMs),l.effectiveMs===l.defaultMs?`, toil's default`:``]}),(0,q.jsx)(`dt`,{children:`Set by`}),(0,q.jsxs)(`dd`,{children:[(0,q.jsx)(`code`,{children:l.variable}),l.value===null?`, which is not set`:`=${l.value}`,`, in the environment `,(0,q.jsx)(`code`,{children:`toil-ui`}),` was started from`]})]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Without the variable, a command that declares a longer limit (a scan, a report) gets its own. `,(0,q.jsx)(`code`,{children:`toil wait`}),` has its own `,(0,q.jsx)(`code`,{children:`--timeout`}),`, capped by `,(0,q.jsxs)(`code`,{children:[`"wait": `,`{`,` "maxTimeout" `,`}`]}),` in `,(0,q.jsx)(`code`,{children:t}),`. To change the limit, set `,l.variable,` and start `,(0,q.jsx)(`code`,{children:`toil-ui`}),` again.`]})]})]})}var fH={full:`Full`,subtle:`Subtle`,off:`Off`};function pH(){let[e,t]=ym(),n=Sm(),r=e===`reduced`,[i,a]=Im(),o=Lm(),[s,c]=tk();return(0,q.jsxs)(Q,{as:`section`,className:`panel motion-setting`,"aria-labelledby":`motion`,children:[(0,q.jsx)(`h2`,{id:`motion`,children:`Motion and effects`}),(0,q.jsxs)(`div`,{className:`theme-setting__row`,children:[(0,q.jsxs)(Eo,{className:`check`,isSelected:r,onChange:e=>t(e?`reduced`:`full`),children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:r?`✓`:``}),`Reduce motion and effects`]}),(0,q.jsx)(Fw,{topic:`motion`})]}),(0,q.jsx)(`p`,{className:`note`,children:r?`Nothing moves: no animations or particles. Saved in this browser only.`:n?`The themes' animations and particles are on, apart from any theme's particles switched off under Theme. Saved in this browser only.`:`Your system asks for reduced motion, so nothing moves whichever way this is set.`}),(0,q.jsxs)(`div`,{className:`theme-setting__row`,children:[(0,q.jsx)(dj,{label:`Theme motion`,value:i,onChange:e=>a(e),options:Am.map(e=>({id:e,label:fH[e]}))}),(0,q.jsx)(Fw,{topic:`theme-motion`})]}),o!==i&&(0,q.jsxs)(`p`,{className:`note`,id:`theme-motion-note`,children:[`Off for now: `,r?`Reduce motion and effects is ticked`:`your system asks for reduced motion`,`. `,fH[i],` is kept for when motion is back.`]}),(0,q.jsxs)(`div`,{className:`theme-setting__row`,children:[(0,q.jsxs)(Eo,{className:`check`,isSelected:s,onChange:c,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:s?`✓`:``}),`Toil tips on loading screens`]}),(0,q.jsx)(Fw,{topic:`tips`})]})]})}function mH(){let[e,t]=bw();return(0,q.jsxs)(Q,{as:`section`,className:`panel learning-setting`,"aria-labelledby":`learning`,children:[(0,q.jsx)(`h2`,{id:`learning`,children:`Learning content`}),(0,q.jsx)(`div`,{className:`theme-setting__row`,children:(0,q.jsxs)(Eo,{className:`check`,isSelected:e,onChange:t,"data-learning-setting":``,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:e?`✓`:``}),`Links to learning content`]})}),(0,q.jsx)(`p`,{className:`note`,children:e?`Help, the agent's chat and the (i) beside AI terms link to Context Overflow's glossary and modules. Saved in this browser only.`:`No links to Context Overflow anywhere. Saved in this browser only.`})]})}function hH(e){switch(e.kind){case`status`:return e.toCategory===`DONE`?`item-done`:null;case`build-passed`:case`build-recovered`:return`build-passed`;case`build-failed`:return`build-failed`;case`blocker-cleared`:return`blocker-cleared`;case`pr-merged`:return`pr-merged`;case`sprint-ended`:return`sprint-ended`;default:return null}}var gH={"sprint-ended":0,"build-failed":1,"blocker-cleared":2,"pr-merged":3,"item-done":4,"build-passed":5},_H=e=>`${e.label}${e.title&&!e.title.startsWith(`for [[`)?` ${e.title}`:``}`;function vH(e){let t=new Map;for(let n of e){let e=hH(n);e&&(t.has(e)||t.set(e,[]),t.get(e).push(n))}return[...t.entries()].sort((e,t)=>gH[e[0]]-gH[t[0]]).slice(0,3).map(([e,t])=>{let n=t[0];return e===`sprint-ended`?{kind:e,text:n.label,count:1,figures:n.text.replace(/^ended: /,``).split(`, `).filter(Boolean)}:{kind:e,text:t.length>1?`${_H(n)}, and ${t.length-1} more`:_H(n),count:t.length}})}var yH={"item-done":{kind:`item-done`,text:`PAY-102 Store tokens in the vault`,count:1},"build-passed":{kind:`build-passed`,text:`payments-web #52 build`,count:1},"build-failed":{kind:`build-failed`,text:`payments-web #49 build`,count:1},"blocker-cleared":{kind:`blocker-cleared`,text:`PAY-104 Retry failed captures`,count:1},"pr-merged":{kind:`pr-merged`,text:`payments-web #52 Vault-backed token store`,count:1},"sprint-ended":{kind:`sprint-ended`,text:`Sprint 42`,count:1,figures:[`8 of 11 items done`,`21 of 30 points done`,`2 carried over`]}},bH={dossier:`card-payments`,day:7,days:10,done:4};function xH(){let e=qS(),t=Lm(),n=HA(),r=EA(e),[i,a]=(0,v.useState)(null),o=yA.filter(e=>r.events?.[e]),s=t===`off`?[`splash`,...o]:[],c=e=>{e===`splash`||e===`loader`?a(e):n.play([yH[e]])};return(0,q.jsxs)(`div`,{className:`theme-setting__row moments-preview-block`,children:[(0,q.jsxs)(Xd,{children:[(0,q.jsxs)(W,{className:`btn btn--small`,"data-preview-menu":``,children:[`Preview the theme's moments `,(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`▾`})]}),(0,q.jsx)(Xu,{className:`popover menu-popover`,placement:`bottom start`,offset:6,children:(0,q.jsxs)(Qd,{className:`menu`,onAction:e=>c(String(e)),disabledKeys:s,children:[r.splash?(0,q.jsx)(af,{id:`splash`,className:`menu-item`,"data-preview":`splash`,children:`The launch splash`}):null,(0,q.jsx)(af,{id:`loader`,className:`menu-item`,"data-preview":`loader`,children:`A loading screen`}),o.map(e=>(0,q.jsx)(af,{id:e,className:`menu-item`,"data-preview":e,children:`Moment: ${bA[e]}`},e))]})})]}),(0,q.jsx)(Fw,{topic:`theme-motion`}),i===`splash`&&(0,q.jsx)(zA,{ready:!1,data:bH,preview:!0,onDone:()=>a(null)}),(0,q.jsx)(Of,{className:`moment-preview-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:i===`loader`,onOpenChange:e=>!e&&a(null),children:(0,q.jsx)(Ef,{className:`moment-preview-modal`,children:(0,q.jsxs)(uf,{className:`moment-preview`,"aria-labelledby":`moment-preview-title`,"data-moment-preview":``,children:[(0,q.jsx)(ja,{slot:`title`,id:`moment-preview-title`,className:`sr-only`,children:`Preview of a loading screen`}),(0,q.jsx)(PA,{immediate:!0,message:`Preview of a loading screen, reading card-payments…`,detail:`3 of 7 toil calls answered; reading toil jira issue search.`}),(0,q.jsx)(W,{className:`btn`,onPress:()=>a(null),"data-preview-close":``,children:`Close the preview`})]})})})]})}function SH(){let e=qS(),t=ZS(),n=e.lexicon===void 0,r=e.voice===void 0,i=e.ambient?.particles,[a,o]=Om(e.name),[s]=ym(),c=Sm();return(0,q.jsxs)(Q,{as:`section`,className:`panel theme-setting`,"aria-labelledby":`theme-setting`,children:[(0,q.jsx)(`h2`,{id:`theme-setting`,children:`Theme`}),(0,q.jsx)(dj,{label:`Theme`,value:e.name,onChange:t.setTheme,options:Qm.map(e=>({id:e.name,label:e.label}))}),(0,q.jsx)(`p`,{className:`note`,children:e.description}),(0,q.jsx)(`p`,{className:`note`,id:`theme-effects`,children:i?`Particles: ${i}, ${a?c?`on`:`off while motion is reduced`:`off`}.`:`Particles: none.`}),(0,q.jsxs)(`div`,{className:`theme-setting__row`,children:[(0,q.jsx)(CH,{label:`Themed wording`,on:t.wording&&!n,disabled:n,onChange:t.setWording,describedBy:`theme-none-note`}),(0,q.jsx)(Fw,{topic:`themed-wording`})]}),(0,q.jsxs)(`div`,{className:`theme-setting__row`,children:[(0,q.jsx)(CH,{label:`Themed agent voice`,on:t.voice&&!r,disabled:r,onChange:t.setVoice,describedBy:`theme-none-note`}),(0,q.jsx)(Fw,{topic:`themed-voice`})]}),i&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(CH,{label:`Particles and ambient effects`,on:a,disabled:!1,onChange:o,describedBy:`theme-particles-note`}),(0,q.jsx)(`p`,{className:`note`,id:`theme-particles-note`,children:c?`${e.label}'s ${i} behind the page. Off removes the particles entirely; other animations keep following Motion and effects. Kept for ${e.label} only, so each theme has its own.`:`${s===`reduced`?`Reduce motion and effects is ticked below`:`Your system asks for reduced motion`}, so no particles show whichever way this is set. It's kept for ${e.label} for when motion is back.`})]}),(0,q.jsx)(xH,{}),(n||r)&&(0,q.jsx)(`p`,{className:`note theme-setting__plain`,id:`theme-none-note`,children:n&&r?`${e.label} has no wording or voice of its own, so both are off while it's chosen. Pick a game theme to use them.`:`${e.label} has no ${n?`wording`:`voice`} of its own, so that box is off while it's chosen.`}),(0,q.jsx)(`p`,{className:`note`,children:`Saved in this browser only. To ask for a new theme, send a feature request from Feedback.`})]})}function CH({label:e,on:t,disabled:n,onChange:r,describedBy:i}){return(0,q.jsxs)(Eo,{className:`check`,isSelected:t,isDisabled:n,onChange:r,"aria-describedby":i,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:t?`✓`:``}),e]})}var wH={days:{by:[`day`]},commands:{by:[`command`],unused:!0},doors:{by:[`via`,`caller`]}},TH=e=>({command:e,outcome:`failed`,limit:10});function EH(e,t,n){let r=new Map(e.map(e=>[e.day??``,e])),i=[],a=Date.parse(`${n}T00:00:00Z`);for(let e=Date.parse(`${t.slice(0,10)}T00:00:00Z`);e<=a&&i.length<400;e+=864e5){let t=new Date(e).toISOString().slice(0,10),n=r.get(t);i.push({day:t,calls:n?.calls??0,failed:n?.failed??0})}return i}function DH(e,t){return e===`api`?t===`toil-ui`?`Toil UI`:t?`A program, ${t}`:`A program, unnamed`:e===`mcp`?`MCP`:e===`cli`?`The CLI`:e??`Unknown`}var OH=e=>e.filter(e=>e.failed>0).sort((e,t)=>t.failed-e.failed||t.calls-e.calls);function kH(e){let t=new Map;for(let n of e){let e=n.area??``;t.set(e,[...t.get(e)??[],n])}return[...t].sort((e,t)=>e[0]<t[0]?-1:1).map(([e,t])=>({area:e,commands:t}))}var AH=(e,t)=>t===0?`0%`:`${Math.round(e/t*100)}%`,jH=e=>e>=1e3?`${(e/1e3).toFixed(1)} s`:`${e} ms`,MH=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,NH=e=>e.ok?{ok:!0,data:e.data}:{ok:!1,message:`${e.error.message}${e.error.fix?` ${e.error.fix}`:``}`};async function PH(e,t,n){try{return NH(await e.run(t,n))}catch(e){return{ok:!1,message:e instanceof Error?e.message:String(e)}}}function FH({config:e,today:t=new Date().toISOString().slice(0,10)}){let[n,r]=(0,v.useState)(null);if((0,v.useEffect)(()=>{let t=!0,n=new Date().toISOString(),i=t=>PH(e,`audit stats`,{...t,until:n});return Promise.all([i(wH.days),i(wH.commands),i(wH.doors)]).then(([e,n,i])=>{t&&r({days:e,commands:n,doors:i})}),()=>{t=!1}},[e]),!n)return(0,q.jsx)(PA,{size:`panel`,message:`Reading toil's audit log with toil audit stats…`});let i=[n.days,n.commands,n.doors].find(e=>!e.ok);if(i||!n.days.ok||!n.commands.ok||!n.doors.ok)return(0,q.jsx)(`div`,{role:`alert`,className:`failure`,children:(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`code`,{children:`toil audit stats`}),` failed: `,i?.message]})});let a=n.days.data,o=n.commands.data,s=n.doors.data,c=o.totals,l=OH(o.groups).slice(0,8);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{as:`section`,className:`panel usage`,"aria-labelledby":`usage-totals`,children:[(0,q.jsx)(`h2`,{id:`usage-totals`,children:`Usage of toil`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`From `,(0,q.jsx)(`code`,{children:`toil audit stats`}),`, since `,vg(o.window.since),`, UTC. `,(0,q.jsx)(Fw,{topic:`audit`})]}),(0,q.jsxs)(`dl`,{className:`fields usage-totals`,children:[(0,q.jsx)(`dt`,{children:`Calls`}),(0,q.jsx)(`dd`,{children:c.calls}),(0,q.jsx)(`dt`,{children:`Failed`}),(0,q.jsxs)(`dd`,{children:[c.failed,` (`,AH(c.failed,c.calls),`)`]}),(0,q.jsx)(`dt`,{children:`Wrote`}),(0,q.jsxs)(`dd`,{children:[c.writes,` (`,AH(c.writes,c.calls),`)`]}),(0,q.jsx)(`dt`,{children:`Time per call`}),(0,q.jsxs)(`dd`,{children:[jH(c.durationMs.median),` median, `,jH(c.durationMs.p95),` at the 95th percentile`]})]}),c.calls===0&&(0,q.jsx)(`p`,{className:`note`,children:`No command has run in this window yet. Each call toil makes, from the CLI, MCP or Toil UI, adds a line.`}),(0,q.jsx)(TI,{days:EH(a.groups,a.window.since,a.window.until?new Date(Date.parse(a.window.until)-1).toISOString().slice(0,10):t)})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`usage-doors`,children:[(0,q.jsx)(`h2`,{id:`usage-doors`,children:`How toil was called`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`By front door: the CLI, MCP (an agent), or a program through toil's API, which Toil UI is. From `,(0,q.jsx)(`code`,{children:`toil audit stats --by via --by caller`}),`.`]}),(0,q.jsx)(tE,{label:`Calls by front door`,caption:`Calls by front door`,rows:s.groups,rowKey:e=>`${e.via}:${e.caller}`,columns:[{header:`Front door`,label:`Front door`,rowHeader:!0,cell:e=>DH(e.via,e.caller)},{header:`Calls`,label:`Calls`,cell:e=>`${e.calls} (${AH(e.calls,s.totals.calls)})`},{header:`Failed`,label:`Failed`,cell:e=>e.failed}]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`usage-top`,children:[(0,q.jsx)(`h2`,{id:`usage-top`,children:`Used most`}),(0,q.jsx)(tE,{label:`Commands used most`,caption:`The commands called most`,rows:o.groups.slice(0,10),rowKey:e=>e.command??``,columns:[{header:`Command`,label:`Command`,rowHeader:!0,cell:e=>(0,q.jsx)(`code`,{children:e.command})},{header:`Calls`,label:`Calls`,cell:e=>e.calls},{header:`Failed`,label:`Failed`,cell:e=>e.failed},{header:`Median`,label:`Median`,cell:e=>jH(e.durationMs.median)},{header:`Last`,label:`Last called`,cell:e=>Y(e.lastSeen)}]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`usage-failing`,children:[(0,q.jsx)(`h2`,{id:`usage-failing`,children:`Failed most`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`Each with its top error code and the fix that usually applies. `,(0,q.jsx)(Fw,{topic:`audit-failures`})]}),l.length===0?(0,q.jsx)(`p`,{children:`No command failed in this window.`}):(0,q.jsx)(`ul`,{className:`usage-failing`,children:l.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsx)(IH,{group:t,config:e})},t.command))})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`usage-unused`,children:[(0,q.jsx)(`h2`,{id:`usage-unused`,children:`Not used`}),(0,q.jsx)(LH,{unused:o.unused??[]})]})]})}function IH({group:e,config:t}){let[n,r]=(0,v.useState)(null),i=(0,v.useId)(),a=e.errors[0],o=async()=>{if(n!==null&&n!==`loading`)return r(null);r(`loading`),r(await PH(t,`audit list`,TH(e.command??``)))};return(0,q.jsxs)(Q,{className:`usage-fail`,children:[(0,q.jsx)(`h3`,{children:(0,q.jsx)(`code`,{children:e.command})}),(0,q.jsxs)(`p`,{children:[`Failed `,e.failed,` of `,MH(e.calls,`call`),a?(0,q.jsxs)(q.Fragment,{children:[`, most often with `,(0,q.jsx)(`code`,{children:a.code}),` (`,a.count,`)`]}):null,`.`]}),a?.fix&&(0,q.jsxs)(`p`,{className:`note`,children:[`Usual fix: `,a.fix]}),e.errors.length>1&&(0,q.jsxs)(`p`,{className:`note`,children:[`Also:`,` `,e.errors.slice(1).map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0?`, `:``,(0,q.jsx)(`code`,{children:e.code}),` (`,e.count,`)`]},e.code))]}),(0,q.jsxs)(`div`,{className:`conn-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":n!==null,"aria-controls":i,onClick:()=>void o(),"data-usage-lines":``,children:n===null?`Show recent failures`:`Hide recent failures`}),(0,q.jsxs)(`span`,{className:`runs`,children:[`runs `,(0,q.jsxs)(`code`,{children:[`toil audit list --command "`,e.command,`" --outcome failed --limit 10`]})]})]}),(0,q.jsxs)(`div`,{id:i,children:[n===`loading`&&(0,q.jsx)(PA,{size:`panel`,message:`Reading the audit log…`}),n!==null&&n!==`loading`&&!n.ok&&(0,q.jsxs)(`p`,{role:`alert`,className:`failure`,children:[(0,q.jsx)(`code`,{children:`toil audit list`}),` failed: `,n.message]}),n!==null&&n!==`loading`&&n.ok&&(0,q.jsx)(tE,{label:`Recent failures of ${e.command}`,caption:`Recent failures of ${e.command}, newest first`,rows:n.data,rowKey:e=>`${e.time}:${e.via}:${e.outcome}`,columns:[{header:`When`,label:`When`,rowHeader:!0,cell:e=>Y(e.time)},{header:`Error`,label:`Error`,cell:e=>(0,q.jsx)(`code`,{children:e.outcome})},{header:`From`,label:`From`,cell:e=>DH(e.via,e.caller)},{header:`Connection`,label:`Connection`,cell:e=>e.connection?(0,q.jsx)(`code`,{children:e.connection}):`none`},{header:`Took`,label:`Took`,cell:e=>jH(e.durationMs)}]})]})]})}function LH({unused:e}){if(e.length===0)return(0,q.jsx)(`p`,{children:`Every command toil has was called at least once in this window.`});let t=kH(e),n=e.filter(e=>!e.mcp).length;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`lede`,children:[MH(e.length,`command`),` had no call in this window, from `,(0,q.jsx)(`code`,{children:`toil audit stats --unused`}),`. A command no agent reaches for may need a clearer description or skill page.`,` `,n>0&&(0,q.jsxs)(q.Fragment,{children:[n===1?`One of them is`:`${n} of them are`,` never served over MCP, so only a person on the CLI can run `,n===1?`it`:`them`,`.`]})]}),(0,q.jsxs)(`details`,{className:`more`,children:[(0,q.jsx)(`summary`,{children:`Show them, by area`}),(0,q.jsx)(`dl`,{className:`usage-unused`,children:t.map(e=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:e.area===``?`toil's own`:e.area}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(`ul`,{children:e.commands.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`code`,{children:e.command}),!e.mcp&&(0,q.jsx)(`span`,{className:`runs`,children:` (CLI only)`})]},e.command))})})]},e.area))})]})]})}var RH=e=>e.tokens===void 0?`not reported`:oD(e.tokens),zH=e=>e===void 0?`not reported`:oD(e);function BH(e,t){if(t===`copilot`)return e.premiumRequests===void 0?`premium requests not reported`:`${mD(e.premiumRequests,`premium-requests`)}`;if(t)return uD(e,t).join(`; `);let n=[...e.costUsd[`sdk-estimate`]===void 0?[]:[`~${mD(e.costUsd[`sdk-estimate`],`usd`)} SDK estimate`],...e.costUsd[`your-rates`]===void 0?[]:[`~${mD(e.costUsd[`your-rates`],`usd`)} from your rates`]];return e.premiumRequests!==void 0&&n.push(mD(e.premiumRequests,`premium-requests`)),n.length?n.join(`; `):`no dollar figure`}function VH(e,t,n){let r=new Map(nD(e,rD).map(e=>[e.key,e.totals.tokens??0])),i=[];for(let e=Date.parse(`${t.slice(0,10)}T00:00:00Z`);e<=Date.parse(`${n}T00:00:00Z`)&&i.length<400;e+=864e5){let t=new Date(e).toISOString().slice(0,10);i.push({day:t,tokens:r.get(t)??0})}return i}function HH({api:e,landOn:t=null}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null);return(0,v.useEffect)(()=>{if(!e)return;let t=!0;return e.view().then(e=>t&&r(e),e=>t&&a(e instanceof Error?e.message:String(e))),()=>{t=!1}},[e]),Bw(t,n!==null||i!==null),e?i?(0,q.jsxs)(`p`,{role:`alert`,className:`failure`,children:[`Reading the model usage failed: `,i]}):n?(0,q.jsx)(UH,{view:n,api:e,onSaved:r}):(0,q.jsx)(PA,{size:`panel`,message:`Reading what the agent's models used…`}):(0,q.jsx)(`p`,{className:`failure`,children:`This app wasn't given the agent's usage, so there is nothing to show.`})}function UH({view:e,api:t,onSaved:n}){let r=e.records,i=(0,v.useMemo)(()=>tD(r),[r]),a=(0,v.useMemo)(()=>nD(r,e=>e.adapter),[r]),o=(0,v.useMemo)(()=>nD(r,iD),[r]),s=(0,v.useMemo)(()=>nD(r,e=>e.dossier),[r]),c=(0,v.useMemo)(()=>nD(r,e=>e.chatId).slice(0,10),[r]),l=(0,v.useMemo)(()=>{let e=new Map;for(let t of r)e.set(t.chatId,Math.max(e.get(t.chatId)??0,t.turn));return e},[r]),u=e.now.slice(0,10),d=()=>{let e=new Blob([_D(r)],{type:`text/csv;charset=utf-8`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`toil-ui-model-usage-${u}.csv`,document.body.append(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(t),1e3)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{as:`section`,className:`panel usage`,"aria-labelledby":`model-usage-totals`,children:[(0,q.jsx)(`h2`,{id:`model-usage-totals`,children:`Usage of the agent's models`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`What the Claude, Codex and Copilot SDKs reported each chat used, since `,vg(e.since),`, UTC. `,(0,q.jsx)(Fw,{topic:`model-usage`})]}),e.sample&&(0,q.jsx)(`p`,{className:`note`,children:`These are sample figures, made up for the preview. No model reported them.`}),e.retentionDays!==null&&e.retentionDays<30&&(0,q.jsxs)(`p`,{className:`note`,children:[`The cache keeps a record `,e.retentionDays,` days, so this window holds only the last `,e.retentionDays,`.`]}),(0,q.jsxs)(`dl`,{className:`fields usage-totals`,children:[(0,q.jsx)(`dt`,{children:`Tokens`}),(0,q.jsx)(`dd`,{children:RH(i)}),(0,q.jsx)(`dt`,{children:`In, out`}),(0,q.jsxs)(`dd`,{children:[zH(i.inputTokens),` in, `,zH(i.outputTokens),` out`]}),(0,q.jsx)(`dt`,{children:`Cache`}),(0,q.jsxs)(`dd`,{children:[zH(i.cachedInputTokens),` read, `,zH(i.cacheWriteTokens),` written`]}),(0,q.jsx)(`dt`,{children:`Dollars`}),(0,q.jsx)(`dd`,{children:BH({...i,premiumRequests:void 0},null)}),(0,q.jsx)(`dt`,{children:`Premium requests`}),(0,q.jsx)(`dd`,{children:i.premiumRequests===void 0?`none reported`:mD(i.premiumRequests,`premium-requests`)})]}),i.reports===0&&(0,q.jsx)(`p`,{className:`note`,children:`No chat has used a model in this window yet. Each answer the agent gives adds what its SDK reported.`}),(0,q.jsx)(EI,{days:VH(r,e.since,u),compact:oD}),(0,q.jsxs)(`div`,{className:`conn-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`btn`,onClick:d,disabled:i.reports===0,"data-usage-export":``,children:`Export as CSV`}),(0,q.jsx)(`span`,{className:`runs`,children:`one row per report, a figure the SDK didn't report left empty`})]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`model-usage-adapters`,children:[(0,q.jsx)(`h2`,{id:`model-usage-adapters`,children:`By adapter`}),(0,q.jsx)(tE,{label:`Usage by adapter`,caption:`Usage by adapter`,rows:a,rowKey:e=>e.key,columns:[{header:`Adapter`,label:`Adapter`,rowHeader:!0,cell:e=>JE[e.sample.adapter]},{header:`Tokens`,label:`Tokens`,cell:e=>RH(e.totals)},{header:`In / out`,label:`In / out`,cell:e=>`${zH(e.totals.inputTokens)} / ${zH(e.totals.outputTokens)}`},{header:`Cost`,label:`Cost`,cell:e=>BH(e.totals,e.sample.adapter)}]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`model-usage-models`,children:[(0,q.jsx)(`h2`,{id:`model-usage-models`,children:`By model`}),(0,q.jsx)(tE,{label:`Usage by model`,caption:`Usage by model and the adapter it ran on`,rows:o,rowKey:e=>e.key,columns:[{header:`Model`,label:`Model`,rowHeader:!0,cell:e=>(0,q.jsx)(`code`,{children:aD(e.sample)})},{header:`Adapter`,label:`Adapter`,cell:e=>JE[e.sample.adapter]},{header:`Tokens`,label:`Tokens`,cell:e=>RH(e.totals)},{header:`Cost`,label:`Cost`,cell:e=>BH(e.totals,e.sample.adapter)}]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`model-usage-dossiers`,children:[(0,q.jsx)(`h2`,{id:`model-usage-dossiers`,children:`By dossier`}),(0,q.jsx)(tE,{label:`Usage by dossier`,caption:`Usage by dossier`,rows:s,rowKey:e=>e.key,columns:[{header:`Dossier`,label:`Dossier`,rowHeader:!0,cell:e=>e.key},{header:`Tokens`,label:`Tokens`,cell:e=>RH(e.totals)},{header:`Cost`,label:`Cost`,cell:e=>BH(e.totals,null)}]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`model-usage-chats`,children:[(0,q.jsx)(`h2`,{id:`model-usage-chats`,children:`Chats that used the most`}),c.length===0?(0,q.jsx)(`p`,{children:`No chat in this window.`}):(0,q.jsx)(tE,{label:`The chats that used the most`,caption:`The ten chats that used the most tokens`,rows:c,rowKey:e=>e.key,columns:[{header:`Started`,label:`Started`,rowHeader:!0,cell:e=>Y(e.sample.at)},{header:`Dossier`,label:`Dossier`,cell:e=>e.sample.dossier},{header:`Model`,label:`Model`,cell:e=>`${JE[e.sample.adapter]}, ${aD(e.sample)}`},{header:`Questions`,label:`Questions`,cell:e=>l.get(e.key)??1},{header:`Tokens`,label:`Tokens`,cell:e=>RH(e.totals)},{header:`Cost`,label:`Cost`,cell:e=>BH(e.totals,e.sample.adapter)}]})]}),(0,q.jsx)(GH,{view:e,api:t,onSaved:n})]})}var WH=e=>Object.fromEntries(fD.map(t=>{let n=e.caps[t.key];return[t.key,n&&n!==`off`?{on:!0,unit:n.unit,limit:String(n.limit)}:{on:!1,unit:t.units[0],limit:``}]}));function GH({view:e,api:t,onSaved:n}){let[r,i]=(0,v.useState)(()=>WH(e.settings)),a=e.settings.codexRates,[o,s]=(0,v.useState)(()=>({input:a?String(a.inputPerMillion):``,cached:a?String(a.cachedInputPerMillion):``,output:a?String(a.outputPerMillion):``})),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(!1),m=e.sample?`This preview shows sample caps, so they can't be saved.`:null,h=e=>e.trim()!==``&&Number.isFinite(Number(e))?Number(e):e,g=async e=>{e.preventDefault(),l(null),d(``);let i=o.input.trim()||o.cached.trim()||o.output.trim(),a={caps:Object.fromEntries(fD.map(e=>[e.key,r[e.key].on?{unit:r[e.key].unit,limit:h(r[e.key].limit)}:`off`])),codexRates:i?{inputPerMillion:h(o.input),cachedInputPerMillion:h(o.cached),outputPerMillion:h(o.output)}:null};p(!0);try{n(await t.save(a)),d(`Saved. The next question is held to these caps.`)}catch(e){l(e instanceof Error?e.message:String(e))}finally{p(!1)}};return(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`model-usage-caps`,children:[(0,q.jsx)(`h2`,{id:`model-usage-caps`,tabIndex:-1,children:`Caps`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`Optional, and off until you turn one on. Codex reports usage when an answer ends, so its cap refuses the next question rather than stopping one partway. `,(0,q.jsx)(Fw,{topic:`caps`})]}),e.problem&&(0,q.jsxs)(`p`,{role:`alert`,className:`failure`,children:[e.problem,` Until the caps can be read, the agent answers nothing.`]}),m&&(0,q.jsx)(`p`,{className:`note`,children:m}),(0,q.jsxs)(`form`,{className:`caps-form`,onSubmit:e=>void g(e),children:[(0,q.jsxs)(`fieldset`,{className:`caps-grid`,disabled:!!m||f,children:[(0,q.jsx)(`legend`,{className:`sr-only`,children:`Caps per chat and per day`}),fD.map(e=>{let t=r[e.key],n=t=>i(n=>({...n,[e.key]:{...n[e.key],...t}})),a=`cap-${e.key.replace(`.`,`-`)}`;return(0,q.jsxs)(`div`,{className:`cap-row`,"data-cap":e.key,children:[(0,q.jsxs)(`label`,{className:`cap-on`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:t.on,onChange:e=>n({on:e.target.checked})}),JE[e.adapter],`, `,e.scope===`chat`?`per chat`:`per day (UTC)`]}),(0,q.jsxs)(`label`,{htmlFor:`${a}-limit`,className:`sr-only`,children:[JE[e.adapter],` `,e.scope===`chat`?`per-chat`:`per-day`,` limit`]}),(0,q.jsx)(`input`,{id:`${a}-limit`,className:`cap-limit`,inputMode:`decimal`,value:t.limit,disabled:!t.on,placeholder:t.on?`limit`:`off`,onChange:e=>n({limit:e.target.value})}),(0,q.jsxs)(`label`,{htmlFor:`${a}-unit`,className:`sr-only`,children:[JE[e.adapter],` `,e.scope===`chat`?`per-chat`:`per-day`,` unit`]}),(0,q.jsx)(`select`,{id:`${a}-unit`,value:t.unit,disabled:!t.on,onChange:e=>n({unit:e.target.value}),children:e.units.map(e=>(0,q.jsx)(`option`,{value:e,children:pD[e]},e))}),(0,q.jsx)(`code`,{className:`cap-key`,children:e.key})]},e.key)})]}),(0,q.jsxs)(`fieldset`,{className:`rates-grid`,disabled:!!m||f,children:[(0,q.jsx)(`legend`,{children:`Codex rates, in dollars per million tokens`}),(0,q.jsx)(`p`,{className:`note`,children:`The Codex SDK reports tokens and no dollar figure. With your rates, Toil UI computes one for each Codex answer from now on, labelled as computed from your rates. Leave all three empty for none.`}),[[`input`,`Input`],[`cached`,`Cached input`],[`output`,`Output`]].map(([e,t])=>(0,q.jsxs)(`label`,{className:`rate`,children:[t,(0,q.jsx)(`input`,{inputMode:`decimal`,value:o[e],onChange:t=>s(n=>({...n,[e]:t.target.value}))})]},e))]}),(0,q.jsxs)(`div`,{className:`conn-actions`,children:[(0,q.jsx)(`button`,{type:`submit`,className:`btn btn--accent`,disabled:!!m||f,children:`Save caps and rates`}),(0,q.jsx)(`span`,{className:`runs`,role:`status`,children:u})]}),c&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:c})]})]})}var KH=`#/settings/connections/+add`,qH=`#/settings/dossiers/+new`,JH=[{page:`connections`,label:`Connections`,about:`The connections toil uses: add, test, set the default, turn writes on or off, replace a secret, remove.`,topic:`connections`},{page:`dossiers`,label:`Dossiers`,about:`Set up a repository that has a dossier, create dossiers, and give them repositories, areas, field names, people and a work-in-progress limit.`,topic:`dossier-setup`},{page:`toil`,label:`General`,about:`How Toil UI looks, talks, moves, notifies and links out in this browser, and the settings toil has no command for.`,topic:`bounds`},{page:`usage`,label:`Usage`,about:`How toil is used on this machine: calls per day, the commands used and failing most, and the ones never called, from toil's local audit log.`,topic:`audit`},{page:`agent-usage`,label:`Agent usage`,about:`What the agent's models used in your chats, and optional caps that stop a runaway.`,topic:`model-usage`},{page:`agent`,label:`Agent`,about:`Which agent answers questions in the chat, and your own instructions for it.`,topic:`agent`}];function YH({page:e,at:t=[],config:n,agent:r,modelUsage:i=null}){let a=JH.find(t=>t.page===e),o=t[0]===`+add`||t[0]===`+new`,s=nC();return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`p`,{className:`eyebrow`,children:s(`settings.eyebrow`)}),(0,q.jsx)(`h1`,{tabIndex:-1,children:`toil's configuration`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`What `,(0,q.jsx)(`code`,{children:`toil connections`}),` and `,(0,q.jsx)(`code`,{children:`toil dossiers`}),` manage, through toil's own commands. `,(0,q.jsx)(Fw,{topic:`settings`})]})]}),(0,q.jsx)(`nav`,{className:`subnav`,"aria-label":`Settings pages`,children:(0,q.jsx)(`ul`,{children:JH.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsx)(`a`,{href:`#/settings/${t.page}`,"aria-current":t.page===e?`page`:void 0,children:t.label})},t.page))})}),n?.disabled&&e!==`agent`&&e!==`usage`&&e!==`agent-usage`&&(0,q.jsxs)(`p`,{className:`config-off`,children:[(0,q.jsx)(`strong`,{children:`Changes are turned off.`}),` `,n.disabled]}),(0,q.jsx)(`h2`,{className:`page-title`,children:a.label}),(0,q.jsxs)(`p`,{className:`lede`,children:[a.about,` `,(0,q.jsx)(Fw,{topic:a.topic})]}),e===`toil`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(SH,{}),(0,q.jsx)(pH,{}),(0,q.jsx)(vO,{}),(0,q.jsx)(mH,{})]}),e===`agent`?r?(0,q.jsx)(aV,{...r}):(0,q.jsx)(oV,{}):e===`agent-usage`?(0,q.jsx)(HH,{api:i,landOn:t[0]===`caps`?`model-usage-caps`:null}):n?e===`connections`?(0,q.jsx)(zV,{config:n,...o?{toForm:!0}:t[0]?{at:t[0]}:{}}):e===`dossiers`?(0,q.jsx)(tH,{config:n,...o?{toForm:!0}:t[0]?{at:{dossier:t[0],section:t[1]??null}}:{}}):e===`usage`?(0,q.jsx)(FH,{config:n}):(0,q.jsx)(dH,{config:n}):(0,q.jsx)(`p`,{className:`failure`,children:`This app wasn't given toil's config commands, so there is nothing to show.`})]})}var XH=`npx @imagile-dev/toil-ui --sample`,ZH=new Set(Object.entries(Kv).flatMap(([e,t])=>t.items.length?[e]:[]));function QH(e,t,n){return e===0||n&&t!==null&&Object.keys(t).length===0}function $H({dossiers:e,synced:t,config:n,onSync:r,lede:i}){let[a,o]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(!n)return;let e=!0;return n.run(`connections list`,{}).then(t=>{if(!e)return;if(!t.ok)return o({ok:!1,message:t.error?.message??`toil connections list failed.`});let n=t.data.connections??[];o({ok:!0,names:n.filter(e=>ZH.has(e.area)).map(e=>e.name)})},t=>e&&o({ok:!1,message:t instanceof Error?t.message:String(t)})),()=>{e=!1}},[n]);let s=a?.ok===!0&&a.names.length>0,c=t!==null&&Object.keys(t).length>0;return(0,q.jsxs)(`section`,{className:`first-run`,"aria-labelledby":`first-run`,"data-first-run":``,children:[(0,q.jsxs)(`div`,{className:`first-run__head`,children:[(0,q.jsx)(`h2`,{id:`first-run`,children:`Get started`}),(0,q.jsx)(Fw,{topic:`first-run`})]}),i&&(0,q.jsx)(`p`,{className:`note`,children:i}),(0,q.jsxs)(`div`,{className:`first-run__body`,children:[(0,q.jsxs)(`ol`,{className:`first-run__steps`,children:[(0,q.jsx)(eU,{n:1,title:`Connect a tracker`,topic:`connections`,done:s,detail:s?a.names.join(`, `):a?.ok===!1?`toil connections list failed: ${a.message}`:null,children:(0,q.jsx)(`a`,{className:`btn`,href:KH,"data-first-run-step":`connect`,children:`Add a connection`})}),(0,q.jsx)(eU,{n:2,title:`Create a dossier`,topic:`dossier-setup`,done:e>0,detail:null,children:(0,q.jsx)(`a`,{className:`btn`,href:qH,"data-first-run-step":`dossier`,children:`Create a dossier`})}),(0,q.jsx)(eU,{n:3,title:`Sync`,topic:`sync`,done:c,detail:r?null:`This Toil UI keeps no cache, so it has nothing to sync.`,children:r&&(0,q.jsx)(W,{className:`btn`,onPress:r,isDisabled:e===0,"data-first-run-step":`sync`,children:`Sync now`})})]}),(0,q.jsxs)(`section`,{className:`first-run__sample`,"aria-labelledby":`first-run-sample`,children:[(0,q.jsxs)(`div`,{className:`first-run__head`,children:[(0,q.jsx)(`h3`,{id:`first-run-sample`,children:`Try the sample data`}),(0,q.jsx)(Fw,{topic:`sample-data`})]}),(0,q.jsxs)(`p`,{className:`first-run__command`,children:[(0,q.jsx)(`code`,{children:XH}),` `,(0,q.jsx)(rE,{value:XH,what:`sample data command`})]})]})]})]})}function eU({n:e,title:t,topic:n,done:r,detail:i,children:a}){return(0,q.jsxs)(`li`,{className:`first-run__step${r?` first-run__step--done`:``}`,"data-done":r||void 0,children:[(0,q.jsx)(`span`,{className:`first-run__mark`,"aria-hidden":`true`,children:r?`✓`:e}),(0,q.jsxs)(`div`,{className:`first-run__what`,children:[(0,q.jsxs)(`div`,{className:`first-run__head`,children:[(0,q.jsx)(`h3`,{className:`first-run__title`,children:t}),(0,q.jsx)(Fw,{topic:n})]}),(0,q.jsxs)(`p`,{className:`first-run__state`,children:[(0,q.jsx)(`strong`,{children:r?`Done`:`Not done yet`}),i&&(0,q.jsx)(`span`,{className:`note`,children:i})]})]}),!r&&a&&(0,q.jsx)(`div`,{className:`first-run__action`,children:a})]})}var tU=`toil-ui:looked`;function nU(){try{let e=JSON.parse(window.localStorage.getItem(tU)??`{}`);return typeof e!=`object`||!e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`&&!Number.isNaN(Date.parse(e[1]))))}catch{return{}}}function rU(e){try{window.localStorage.setItem(tU,JSON.stringify(e))}catch{}}var iU=e=>nU()[e]??null;function aU(e){let t=nU();return e.filter(e=>t[e]).sort((e,n)=>t[e]<t[n]?1:-1)[0]??null}function oU(e,t=new Date().toISOString()){rU({...nU(),[e]:t})}function sU(e,t){let{[e]:n,...r}=nU();n!==void 0&&rU({...r,[t]:n})}var cU=e=>e.statusCategory===`DONE`;function lU(e,t){return!cU(e)&&e.links.some(e=>e.type===`blocks`&&e.direction===`inward`&&t.has(e.target)&&!cU(t.get(e.target)))}function uU(e,t,n){let r=new Map(e.items.map(e=>[e.id,e])),i=tg(e.items,e.changes,t),a=null;if(i){let e=jI(i,t);a={name:i.sprint.name,daysLeft:Math.max(0,i.days.total-i.days.gone),daysTotal:i.days.total,done:i.done.points,scope:i.done.points+i.remaining.points,burn:e.days.map(e=>({scope:e.scope,done:e.done})),ahead:e.ahead}}let o=e.pullRequests??[],s=e.items.filter(e=>e.statusCategory===`IN_PROGRESS`).length,c=e.items.filter(e=>lU(e,r)).length,l=o.filter(e=>e.state===`OPEN`&&c_(e,t).on===`review`).length,u=Y_({dossier:e.name,entries:e.people??[],wipLimit:e.wipLimit??null,items:e.items,changes:o,now:t}),d=[...u.people,...u.unmapped].map(e=>({key:e.who.key,name:e.who.name,kind:e.who.kind})),f=n===null?null:e.items.filter(e=>e.updated!==null&&e.updated>n).length+o.filter(e=>e.updated!==null&&e.updated>n).length;return{sprint:a,inProgress:s,blocked:c,awaitingReview:l,people:d,changedSince:f,motion:s+c+l}}function dU(e,t,n){if(e.length===1)return e[0];let r=aU(e);if(r)return r;if(!n)return null;let i=e.filter(e=>t.has(e)).sort((e,n)=>t.get(n).motion-t.get(e).motion);return i[0]&&t.get(i[0]).motion>0?i[0]:null}function fU({dossiers:e,calls:t,loaded:n,now:r,synced:i,config:a,onDescribed:o,onSync:s}){let c=nC(),l=new Map;for(let t of e){let e=n[t.name];e?.ok&&l.set(t.name,uU(e.value,r,iU(t.name)))}let u=dU(e.map(e=>e.name),l,e.every(e=>n[e.name]!==void 0)),d=u?[...e.filter(e=>e.name===u),...e.filter(e=>e.name!==u)]:e;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`h1`,{tabIndex:-1,children:`Dossiers`}),(0,q.jsxs)(`p`,{className:`lede`,children:[c(`dossiers.lede`),` `,(0,q.jsx)(Fw,{topic:`dossiers`})]})]}),QH(e.length,i,!!s)&&(0,q.jsx)($H,{dossiers:e.length,synced:i,config:a,onSync:s,...e.length===0?{lede:c(`empty.dossiers`)}:{}}),e.length===0?null:(0,q.jsx)(QT,{className:`dossiers`,min:`sm`,children:d.map(e=>(0,q.jsx)(`li`,{className:e.name===u?`dossiers__lead`:void 0,children:(0,q.jsx)(mU,{summary:e,loaded:n[e.name],preview:l.get(e.name)??null,synced:i?i[e.name]??null:void 0,lead:e.name===u,config:a,onDescribed:o})},e.name))}),(0,q.jsx)(pj,{calls:t})]})}var pU=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function mU({summary:e,loaded:t,preview:n,synced:r,lead:i,config:a,onDescribed:o}){let{Avatar:s}=xT(),c=`dossier-${e.name}`,l=n?.people.slice(0,6)??[],u=(n?.people.length??0)-l.length;return(0,q.jsxs)(Q,{className:`dossier-card${i?` dossier-card--lead`:``}`,"aria-labelledby":c,children:[(0,q.jsxs)(`div`,{className:`dossier-card__head`,children:[(0,q.jsx)(`h2`,{id:c,children:(0,q.jsx)(EL,{field:`name`,dossier:e.name,value:e.name,config:a,onSaved:o,children:(0,q.jsx)(`a`,{href:bg(e.name),children:e.name})})}),(0,q.jsx)(EL,{field:`description`,dossier:e.name,value:e.description,config:a,onSaved:o,children:e.description?(0,q.jsx)(`span`,{className:`dossier-card__desc`,children:e.description}):(0,q.jsx)(`span`,{className:`note`,children:`No description`})})]}),(0,q.jsx)(`div`,{className:`dossier-card__body`,children:t?t.ok?n?(0,q.jsxs)(q.Fragment,{children:[n.sprint?(0,q.jsxs)(`div`,{className:`dossier-card__sprint`,children:[(0,q.jsx)(TL,{sprint:n.sprint}),(0,q.jsx)(wL,{sprint:n.sprint})]}):(0,q.jsx)(`p`,{className:`note`,children:`No sprint running.`}),(0,q.jsx)(SL,{preview:n,sprint:!1}),l.length>0&&(0,q.jsxs)(`ul`,{className:`avatars`,"aria-label":`People: ${n.people.map(e=>e.name).join(`, `)}`,children:[l.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(s,{person:{id:e.key,name:e.name,email:null},labelled:!0})},e.key)),u>0&&(0,q.jsxs)(`li`,{className:`avatars__more`,"aria-hidden":`true`,children:[`+`,u]})]})]}):null:(0,q.jsxs)(`p`,{className:`note`,children:[`Its work couldn't be read: `,t.message]}):(0,q.jsx)(`p`,{className:`note`,role:`status`,children:`Reading what the last sync stored…`})}),(0,q.jsxs)(`div`,{className:`dossier-card__foot`,children:[(0,q.jsx)(xL,{sources:e.sources,dossier:e.name}),(0,q.jsxs)(`p`,{className:`note dossier-card__when`,children:[r===void 0?`Sample data.`:r===null?`Not synced yet.`:`Synced ${Y(r.at)}${r.status===`ok`?``:r.status===`partial`?`, some sources failed`:`, and it failed`}.`,n&&n.changedSince!==null&&(0,q.jsxs)(q.Fragment,{children:[` `,n.changedSince?`${pU(n.changedSince,`change`)} since you last looked.`:`Nothing changed since you last looked.`]})]})]})]})}var hU=`toil-ui:splash`,gU=e=>typeof e==`string`&&!Number.isNaN(Date.parse(e)),_U=e=>typeof e==`number`&&Number.isInteger(e)&&e>=0;function vU(){try{let e=JSON.parse(window.localStorage.getItem(hU)??`{}`);return typeof e!=`object`||!e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>{let t=e[1];return typeof t==`object`&&!!t&&gU(t.start)&&gU(t.end)&&_U(t.done)}))}catch{return{}}}function yU(e){try{window.localStorage.setItem(hU,JSON.stringify(e))}catch{}}function bU(e,t){let{[e]:n,...r}=vU();if(!t?.sprint.start||!t.sprint.end){n&&yU(r);return}let i={start:t.sprint.start,end:t.sprint.end,done:t.done.count};n&&n.start===i.start&&n.end===i.end&&n.done===i.done||yU({...r,[e]:i})}function xU(e,t){let{[e]:n,...r}=vU();n&&yU({...r,[t]:n})}function SU(e,t){let n=vU()[e],r=Date.parse(t);if(!n||Number.isNaN(r)||r<Date.parse(n.start)||r>=Date.parse(n.end))return null;let{gone:i,total:a}=Zh(n.start,n.end,t);return a<1?null:{dossier:e,day:Math.min(a,Math.max(1,i)),days:a,done:n.done}}var CU=new WeakMap;function wU(e,t){let n=CU.get(e);return n||CU.set(e,n=new Yx(e)),n.item(t,{limit:5})?.matches??[]}var TU={blocks:[`Blocks`,`Blocked by`],relates:[`Relates to`,`Relates to`],duplicates:[`Duplicates`,`Duplicated by`],implements:[`Implements`,`Implemented by`],other:[`Linked to`,`Linked from`]};function EU({id:e}){let{byId:t,dossier:n,now:r,sync:i}=J(),a=qS(),o=tC(),{insights:s}=fg(),c=t.get(e);if(!c)return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h1`,{tabIndex:-1,children:`No such item`}),(0,q.jsx)(Cj,{message:`The dossier has no item ${e}.`,action:(0,q.jsxs)(wj,{href:bg(n.name),children:[`Back to `,n.name]})})]});let l=n.changes.filter(t=>t.items.includes(e)),u=n.deployments.filter(t=>t.items.includes(e)),d=qh(c),f=mg(c.source.area),p=sg(c,s),m=Ph(c),h=Lh(c,r),g=e=>Math.round(e*10)/10,_=wU(n.items,e);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsxs)(`p`,{className:`eyebrow`,children:[f,` `,hg(c)]}),(0,q.jsx)(`h1`,{tabIndex:-1,children:c.title}),(0,q.jsxs)(`p`,{className:`item-meta`,children:[(0,q.jsx)(Pj,{category:c.statusCategory,status:c.status}),` `,(0,q.jsx)(Nj,{person:c.assignee}),` `,yg(c.assignee),c.url&&(0,q.jsxs)(q.Fragment,{children:[` · `,(0,q.jsxs)(`a`,{href:c.url,children:[`Open in `,f]})]})]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel insights-panel`,"aria-labelledby":`insights`,children:[(0,q.jsx)(`h2`,{id:`insights`,children:`Insights`}),p.length?(0,q.jsx)(`ul`,{className:`rows`,children:p.map(e=>(0,q.jsxs)(`li`,{className:`insight-row insight-row--w${e.weight}`,children:[(0,q.jsx)(`span`,{className:`insight insight--w${e.weight}`,children:rg[e.code]}),` `,(0,q.jsx)(WT,{text:e.text}),`.`,` `,(0,q.jsxs)(`span`,{className:`field`,children:[`Source: `,(0,q.jsx)(`code`,{children:e.evidence})]})]},e.code))}):(0,q.jsx)(`p`,{children:c.statusCategory===`DONE`?`Done: nothing to act on.`:`Nothing stands out.`}),(0,q.jsx)(`p`,{className:`note`,children:m?m.days===null?`Cycle time unknown: ${m.reason}.`:`Cycle time ${g(m.days)} days, from ${Y(m.start)} to ${Y(m.end)}.`:h?h.days===null?`Time in progress unknown: ${h.reason}.`:`In progress for ${g(h.days)} days, since ${Y(h.since)}.`:`Not started.`})]}),(0,q.jsx)(Sj,{item:c},c.id),(0,q.jsxs)(Q,{as:`section`,className:`panel duplicates-panel`,"aria-labelledby":`duplicates`,children:[(0,q.jsx)(`h2`,{id:`duplicates`,children:`Possible duplicates`}),_.length?(0,q.jsx)(`ul`,{className:`rows`,children:_.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(HT,{id:e.id,withTitle:!0}),` `,(0,q.jsxs)(`span`,{className:`score`,children:[Math.round(e.score*100),`% alike`]}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,e.why.summary.replace(/\.$/,``),`)`]})]},e.id))}):(0,q.jsxs)(`p`,{children:[`None in `,n.name,`: no item shares enough words with this one.`]}),(0,q.jsxs)(`p`,{className:`note`,children:[`By shared words in titles and bodies, title trigrams, labels, parent and links, as `,(0,q.jsx)(`code`,{children:`toil util owi similar`}),` scores them: not by meaning, so a duplicate written in other words isn't found.`]})]}),(0,q.jsx)(tF,{item:c}),(0,q.jsxs)(`div`,{className:`item-grid`,children:[(0,q.jsxs)(`section`,{"aria-labelledby":`fields`,children:[(0,q.jsxs)(`div`,{className:`edit-head`,children:[(0,q.jsx)(`h2`,{id:`fields`,children:`Fields`}),(0,q.jsx)(zw,{href:Mg(n.name,`fields`),label:`Edit ${n.name}'s field names`})]}),(0,q.jsxs)(`dl`,{className:`fields`,children:[(0,q.jsx)(`dt`,{children:`Source`}),(0,q.jsxs)(`dd`,{children:[f,`, connection `,(0,q.jsx)(`code`,{children:c.source.connection}),` `,(0,q.jsx)(zw,{href:jg(c.source.connection),label:`Edit the ${c.source.connection} connection`}),`, read with `,(0,q.jsxs)(`code`,{children:[`toil `,c.source.command]})]}),(0,q.jsx)(`dt`,{children:`Type`}),(0,q.jsx)(`dd`,{children:JT(c,a)}),(0,q.jsx)(`dt`,{children:`Status`}),(0,q.jsxs)(`dd`,{children:[c.status??`None`,` (`,Ig[c.statusCategory],`)`,c.resolution&&`, resolution ${c.resolution}`]}),(0,q.jsx)(`dt`,{children:`Estimate`}),(0,q.jsxs)(`dd`,{children:[Lg(c),c.estimate&&(0,q.jsxs)(q.Fragment,{children:[`, from `,(0,q.jsx)(`code`,{children:c.estimate.field})]})]}),(0,q.jsx)(`dt`,{children:`Assignee`}),(0,q.jsx)(`dd`,{children:yg(c.assignee)}),(0,q.jsx)(`dt`,{children:o(`priority`,`Priority`)}),(0,q.jsx)(`dd`,{children:c.priority??`None`}),(0,q.jsx)(`dt`,{children:`Sprint`}),(0,q.jsxs)(`dd`,{children:[c.iteration?c.iteration.path??c.iteration.name:`None`,c.iteration&&d.kind!==`planned`&&(0,q.jsxs)(q.Fragment,{children:[` `,`(`,d.kind===`added`?`added mid-sprint`:`carried over from ${d.from}`,`, source `,(0,q.jsx)(`code`,{children:d.evidence}),`)`]})]}),(0,q.jsx)(`dt`,{children:`Parent`}),(0,q.jsx)(`dd`,{children:c.parent?(0,q.jsx)(HT,{id:c.parent,withTitle:!0}):`None`}),(0,q.jsx)(`dt`,{children:`Labels`}),(0,q.jsx)(`dd`,{children:c.labels.length?c.labels.join(`, `):`None`}),(0,q.jsx)(`dt`,{children:`Created`}),(0,q.jsx)(`dd`,{children:c.created?Y(c.created):`Unknown`}),(0,q.jsx)(`dt`,{children:`Updated`}),(0,q.jsx)(`dd`,{children:c.updated?Y(c.updated):`Unknown`}),c.resolved&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`dt`,{children:`Resolved`}),(0,q.jsx)(`dd`,{children:Y(c.resolved)})]})]})]}),(0,q.jsxs)(`section`,{"aria-labelledby":`related`,children:[(0,q.jsx)(`h2`,{id:`related`,children:`Related work`}),c.children.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h3`,{children:`Children`}),(0,q.jsx)(`ul`,{className:`rows`,children:c.children.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(HT,{id:e,withTitle:!0})},e))})]}),(0,q.jsx)(`h3`,{children:`Links`}),c.links.length?(0,q.jsx)(`ul`,{className:`rows`,children:c.links.map((e,t)=>(0,q.jsxs)(`li`,{children:[TU[e.type][e.direction===`outward`?0:1],` `,(0,q.jsx)(HT,{id:e.target,withTitle:!0}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,e.name,`)`]})]},t))}):(0,q.jsx)(`p`,{children:`None.`}),(0,q.jsx)(`h3`,{children:`Pull requests and builds`}),l.length?(0,q.jsx)(`ul`,{className:`rows`,children:l.map(e=>(0,q.jsxs)(`li`,{children:[e.url?(0,q.jsx)(`a`,{href:e.url,children:e.title}):e.title,` `,(0,q.jsx)(Lj,{of:e}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,(0,q.jsxs)(`code`,{children:[`toil `,e.command]}),`)`]})]},e.id))}):(0,q.jsx)(`p`,{children:`None linked.`}),(0,q.jsx)(`h3`,{children:`Deployed to`}),u.length?(0,q.jsx)(`ul`,{className:`rows`,children:u.map(e=>(0,q.jsxs)(`li`,{children:[e.environment,`: `,e.name,`, commit `,(0,q.jsx)(`code`,{children:e.commit}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,(0,q.jsxs)(`code`,{children:[`toil `,e.command]}),`)`]})]},e.id))}):(0,q.jsx)(`p`,{children:`Not deployed anywhere the dossier names.`})]}),(0,q.jsxs)(`section`,{"aria-labelledby":`history`,children:[(0,q.jsx)(`h2`,{id:`history`,children:`History`}),c.history?c.history.transitions.length===0?(0,q.jsx)(`p`,{children:`No status changes recorded.`}):(0,q.jsx)(tE,{label:`${hg(c)}'s status changes`,rows:c.history.transitions.map((e,t)=>({...e,i:t})),rowKey:e=>String(e.i),columns:[{header:`When`,label:`When`,cell:e=>Y(e.at)},{header:`From`,label:`From`,cell:e=>e.from??`Created`},{header:`To`,label:`To`,cell:e=>e.to},{header:`By`,label:`By`,cell:e=>e.by?yg(e.by):`Unknown`}]}):(0,q.jsxs)(`p`,{children:[`No history synced for this item. `,i&&(0,q.jsx)(Tj,{onPress:i,children:`Sync now`})]}),c.unmapped.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h3`,{children:`Not mapped`}),(0,q.jsx)(`ul`,{className:`rows`,children:c.unmapped.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`code`,{children:e.field}),`: `,e.reason]},e.field))})]})]})]})]})}var DU=e=>e?Y(e):`not yet`;function OU({id:e}){let{dossier:t,assignments:n,now:r}=J(),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(0),g=(0,v.useCallback)(()=>h(e=>e+1),[]);(0,v.useEffect)(()=>{if(!n)return;let t=!0;return n.get(e).then(e=>t&&(a(e),s(null)),e=>t&&s(e instanceof Error?e.message:String(e))),()=>{t=!1}},[n,e,m]);let _=i?.state===`working`||i?.state===`queued`&&i.waiting===`slot`;if((0,v.useEffect)(()=>{if(!_)return;let e=setInterval(g,UP);return()=>clearInterval(e)},[_,g]),!n||o&&!i)return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h1`,{tabIndex:-1,children:`No such assignment`}),(0,q.jsx)(Cj,{message:o??`This view has no agent assignments.`,action:(0,q.jsxs)(wj,{href:bg(t.name),children:[`Back to `,t.name]})})]});if(!i)return(0,q.jsx)(`p`,{className:`note`,children:`Reading the assignment…`});let y=async(e,t)=>{d(!0),l(null);try{await t(),l(e)}catch(e){l(e instanceof Error?e.message:String(e))}finally{d(!1),g()}},b=i,x=b.state===`queued`&&b.waiting===`start`;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsxs)(`p`,{className:`eyebrow`,children:[(0,q.jsx)(`a`,{href:bg(b.dossier),children:b.dossier}),` · Agent assignment`]}),(0,q.jsxs)(`h1`,{tabIndex:-1,children:[DD[b.mode].label,`: `,b.itemTitle]}),(0,q.jsxs)(`p`,{className:`item-meta`,children:[(0,q.jsx)(GP,{a:b}),` `,(0,q.jsx)(HT,{id:b.item}),` · `,b.adapter?ED[b.adapter]:`no adapter chosen yet`,` `,(0,q.jsx)(zw,{href:Ng,label:`Edit the agent settings`}),` · `,b.origin===`tracker`?`queued by the tracker (${b.trigger})`:`assigned in Toil UI`]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Created `,DU(b.createdAt),`; started `,DU(b.startedAt),`; `,b.endedAt?`ended ${DU(b.endedAt)}`:`still going`,`; ran `,AD(b.ranMs??kD(b,r)),`; `,KP(b),`. `,DD[b.mode].changes]})]}),b.stop&&(0,q.jsxs)(`p`,{role:`note`,className:b.stop.reason===`injection`?`assign-warn`:`failure`,children:[b.stop.message,` `,b.stop.fix]}),b.stale&&(0,q.jsxs)(`div`,{className:`stale-block`,children:[(0,q.jsx)(SD,{stale:b.stale}),(0,q.jsx)(`p`,{className:`note`,children:jD(b)??`Renew starts it again as a fresh assignment on today's instructions, with what this run left as context. This one stays as it is.`})]}),b.renews&&(0,q.jsxs)(`p`,{className:`note`,children:[`This renews `,(0,q.jsx)(`a`,{href:VP(b.dossier,b.renews),children:`an earlier assignment`}),` on the same item, which started on older instructions; what it left was in this run's prompt.`]}),b.renewedBy&&(0,q.jsxs)(`p`,{className:`note`,children:[`Renewed as `,(0,q.jsx)(`a`,{href:VP(b.dossier,b.renewedBy),children:`a fresh assignment`}),` on today's instructions.`]}),(0,q.jsxs)(ZT,{className:`assign-actions`,children:[b.stale&&!jD(b)&&(0,q.jsx)(W,{className:`btn btn--accent`,onPress:()=>y(`Renewed.`,async()=>{let e=await n.renew(b.id);return window.location.hash=VP(e.dossier,e.id),e}),isDisabled:u,"data-renew":``,children:`Renew`}),x&&(0,q.jsx)(W,{className:`btn btn--accent`,onPress:()=>p(!0),isDisabled:u,children:`Start…`}),(b.state===`queued`||b.state===`working`)&&(0,q.jsx)(W,{className:`btn`,onPress:()=>y(b.state===`working`?`Stopping it.`:`Taken off the queue.`,()=>n.cancel(b.id)),isDisabled:u,children:b.state===`working`?`Stop`:`Take off the queue`}),b.state===`needs-you`&&(0,q.jsx)(W,{className:`btn`,onPress:()=>y(`Marked reviewed.`,()=>n.finish(b.id)),isDisabled:u,children:`Mark reviewed`}),(0,q.jsx)(`span`,{className:`note`,role:`status`,children:c??``})]}),x&&(0,q.jsx)(YP,{item:{id:b.item,title:b.itemTitle},start:b,isOpen:f,onOpenChange:p,onDone:g}),b.questions.length>0&&(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`assign-questions`,children:[(0,q.jsx)(`h2`,{id:`assign-questions`,children:`Questions for you`}),(0,q.jsx)(`ul`,{className:`rows`,children:b.questions.map((e,t)=>(0,q.jsx)(`li`,{children:e},t))}),(0,q.jsx)(`p`,{className:`note`,children:`Answer them on the item, then assign it again; or mark this reviewed.`})]}),b.report&&(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`assign-report`,children:[(0,q.jsx)(`h2`,{id:`assign-report`,children:b.mode===`investigate`?`Report`:`What the agent said`}),(b.report.warnings.length>0||b.report.unverified.length>0)&&(0,q.jsx)(`div`,{className:`answer-checks`,role:`note`,children:b.report.warnings.map((e,t)=>(0,q.jsx)(`p`,{children:e},t))}),b.report.parts.map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(WT,{text:e.text,chips:!0})},t)),b.usage&&(0,q.jsx)(vD,{usage:b.usage})]}),b.branch&&(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`assign-branch`,children:[(0,q.jsxs)(`h2`,{id:`assign-branch`,children:[`Branch `,b.branch.name]}),(0,q.jsxs)(`p`,{children:[`In a clone of `,b.branch.repo,` at `,(0,q.jsx)(iE,{value:b.branch.folder,what:`folder`}),`, `,b.branch.onBranch?`on ${b.branch.name}`:`not on ${b.branch.name}`,`, with `,b.branch.files.length===1?`one changed file`:`${b.branch.files.length} changed files`,`, staged and not committed.`]}),b.branch.files.length>0&&(0,q.jsx)(`ul`,{className:`rows`,children:b.branch.files.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`code`,{children:e.path}),` `,(0,q.jsx)(`span`,{className:`note`,children:e.status}),b.branch?.hidden?.includes(e.path)&&(0,q.jsx)(`span`,{className:`assign-stop`,children:` not in the diff below`})]},`${e.status}:${e.path}`))}),b.branch.diff&&(0,q.jsx)(eE,{label:`The staged diff`,children:(0,q.jsx)(`pre`,{className:`assign-diff`,children:(0,q.jsx)(`code`,{children:b.branch.diff})})})]}),b.proposals.length>0&&(0,q.jsxs)(`section`,{className:`proposals`,"aria-labelledby":`assign-proposals`,children:[(0,q.jsx)(`h2`,{id:`assign-proposals`,children:`Proposals`}),(0,q.jsx)(`p`,{className:`note`,children:`Each change the agent proposes, with what it would set. Apply runs its toil command through the write gate: the connection needs writes on, and this press is the call's allow-write. Nothing has changed until then.`}),b.proposals.map(e=>(0,q.jsx)(AU,{p:e,busy:u,onApply:()=>y(`Applied: ${e.title}.`,()=>n.apply(b.id,e.id)),onDismiss:()=>y(`Dismissed: ${e.title}.`,()=>n.dismiss(b.id,e.id))},e.id))]}),b.startedOn&&(0,q.jsxs)(`details`,{className:`assign-record`,children:[(0,q.jsx)(`summary`,{children:`What this run started on`}),(0,q.jsxs)(`dl`,{className:`fields`,children:[(0,q.jsx)(`dt`,{children:`toil`}),(0,q.jsx)(`dd`,{children:b.startedOn.toil}),(0,q.jsx)(`dt`,{children:`Toil UI`}),(0,q.jsx)(`dd`,{children:b.startedOn.toilUi}),(0,q.jsx)(`dt`,{children:`Adapter`}),(0,q.jsxs)(`dd`,{children:[ED[b.startedOn.adapter],`, `,b.startedOn.model??`the CLI's default model`]}),(0,q.jsx)(`dt`,{children:`Skills`}),(0,q.jsx)(`dd`,{children:b.startedOn.skills.length?b.startedOn.skills.join(`, `):`none: Toil UI gives an assigned agent its tools and prompt only`}),(0,q.jsx)(`dt`,{children:`Tools`}),(0,q.jsx)(`dd`,{className:`any-break`,children:b.startedOn.tools.join(`, `)}),(0,q.jsx)(`dt`,{children:`Dossier`}),(0,q.jsxs)(`dd`,{className:`any-break`,children:[b.startedOn.dossier.name,`, `,(0,q.jsx)(`code`,{children:b.startedOn.dossier.fingerprint??`unread`})]}),(0,q.jsx)(`dt`,{children:`Item`}),(0,q.jsxs)(`dd`,{className:`any-break`,children:[b.startedOn.item.id,`, updated `,b.startedOn.item.updated?Y(b.startedOn.item.updated):`at an unknown time`,`, `,(0,q.jsx)(`code`,{children:b.startedOn.item.fingerprint})]}),(0,q.jsx)(`dt`,{children:`Prompt`}),(0,q.jsx)(`dd`,{className:`any-break`,children:(0,q.jsx)(`code`,{children:b.startedOn.prompt})}),(0,q.jsx)(`dt`,{children:`Install fingerprint`}),(0,q.jsx)(`dd`,{className:`any-break`,children:b.startedOn.fingerprint?(0,q.jsxs)(q.Fragment,{children:[`toil `,b.startedOn.fingerprint.toil.version,` at `,b.startedOn.fingerprint.toil.commit?.slice(0,7)??`an unrecorded commit`,`, Toil UI `,b.startedOn.fingerprint.toilUi.version,` at `,b.startedOn.fingerprint.toilUi.commit?.slice(0,7)??`an unrecorded commit`,`; skills`,` `,Object.entries(b.startedOn.fingerprint.skills).map(([e,t])=>`${e} ${t.slice(0,12)}`).join(`, `)||`none`,`; dossier `,(0,q.jsx)(`code`,{children:b.startedOn.fingerprint.dossier?.slice(0,12)??`unread`}),`; prompts `,(0,q.jsx)(`code`,{children:b.startedOn.fingerprint.prompts.slice(0,12)})]}):`not recorded: this run started before Toil UI recorded one, so it is never called stale`})]}),(0,q.jsx)(`p`,{className:`note`,children:`Fingerprints are SHA-256 of what the run read, so a later look can tell whether the item, the dossier or the prompt has changed since.`})]}),(0,q.jsxs)(`details`,{className:`assign-transcript`,children:[(0,q.jsxs)(`summary`,{children:[`Transcript (`,b.transcript.length,` lines)`]}),(0,q.jsx)(`ol`,{className:`assign-lines`,children:b.transcript.map((e,t)=>(0,q.jsxs)(`li`,{className:`assign-line assign-line--${e.kind}`,children:[(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`span`,{className:`note`,children:Y(e.at)}),` `,(0,q.jsx)(`strong`,{children:e.title})]}),e.detail&&(0,q.jsx)(`pre`,{className:`assign-detail`,children:(0,q.jsx)(`code`,{children:e.detail})})]},t))})]})]})}var kU={pending:`Proposed change, not applied`,applied:`Applied`,failed:`Not applied: toil refused it`,dismissed:`Dismissed`};function AU({p:e,busy:t,onApply:n,onDismiss:r}){let i=e.status===`pending`||e.status===`failed`;return(0,q.jsxs)(AE,{proposal:e,kind:kU[e.status],actions:i?(0,q.jsxs)(q.Fragment,{children:[e.command&&e.input&&(0,q.jsxs)(W,{className:`btn btn--accent`,onPress:n,isDisabled:t,children:[`Apply`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,e.title]})]}),(0,q.jsxs)(W,{className:`btn btn--quiet`,onPress:r,isDisabled:t,children:[`Dismiss`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,e.title]})]})]}):null,children:[e.diff.length>0&&(0,q.jsx)(tE,{label:`What ${e.title} changes`,caption:`What it changes`,rows:e.diff,rowKey:e=>e.field,columns:[{header:`Field`,label:`Field`,rowHeader:!0,cell:e=>(0,q.jsx)(`code`,{children:e.field})},{header:`Now`,label:`Now`,cell:e=>e.before===null?(0,q.jsx)(`span`,{className:`note`,children:`not in the synced item`}):e.before===``?(0,q.jsx)(`span`,{className:`note`,children:`empty`}):(0,q.jsx)(`span`,{className:`assign-before`,children:e.before})},{header:`Proposed`,label:`Proposed`,cell:e=>(0,q.jsx)(`span`,{className:`assign-after`,children:e.after})}]}),e.outcome&&(0,q.jsxs)(`p`,{className:e.outcome.ok?`note`:`failure`,role:`status`,children:[Y(e.outcome.at),`: `,e.outcome.message]})]})}function jU(e,t){return async n=>{let r=await e.list(t),i=r.adapters.filter(e=>!e.problem&&!e.implement),a=i.find(e=>e.name===r.preferred)??i[0];if(!a)throw Error(`No adapter here can take implement mode (only Codex can, once its SDK and CLI are set up under Settings, Agent), so nothing was started.`);if(!r.repos.length)throw Error(`${t} lists no repository with a local path, so implement mode has nothing to work in; add one with toil dossiers add-repo ${t} <folder>. Nothing was started.`);if(r.repos.length>1)throw Error(`${t} lists ${r.repos.length} repositories with a local path (${r.repos.map(e=>e.name).join(`, `)}), and one plan can't say which each item needs; assign each item from its page instead. Nothing was started.`);let o=new Set(r.assignments.filter(e=>e.mode===`implement`&&(e.state===`queued`||e.state===`working`)).map(e=>e.item)),s=n.items.filter(e=>!o.has(e)),c=[],l=[];for(let n of s)try{await e.assign({dossier:t,item:n,mode:`implement`,adapter:a.name,repo:r.repos[0].name}),c.push(n)}catch(e){l.push(`${n}: ${e instanceof Error?e.message:String(e)}`)}let u=n.items.length-s.length,d=`Queued ${(e=>e===1?`one implement assignment`:`${e} implement assignments`)(c.length)} on ${a.label}${u?`, leaving ${u} already queued or working`:``}.`;if(l.length)throw Error(`${d} ${l.length===1?`One item`:`${l.length} items`} couldn't be queued: ${l.join(`; `)}`);return`${d} They run ${r.settings.concurrent===1?`one at a time`:`${r.settings.concurrent} at a time`}; follow them in the Agents sidebar.`}}function MU(e=[]){let t=[...e],n=0,r=e=>t.filter(t=>t.dossier===e);return{list:async e=>jO(r(e)),get:async(e,t)=>MO(r(e),t),record:async(e,i,{startedAt:a,at:o,items:s,now:c})=>{let l=`analysis-${Date.parse(o).toString(36)}-${(n++).toString(36)}`;t.push(OO(i,{id:l,dossier:e,startedAt:a,at:o,snapshot:DO(s,c)}));let u=r(e).sort((e,t)=>e.at.localeCompare(t.at));for(let e of u.slice(0,Math.max(0,u.length-100)))t.splice(t.indexOf(e),1);return l}}}function NU(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t}function PU(e,t){if(!e.length)throw Error(`A theme with alignments lists at least two values (test/theme-rules.ts).`);return e[NU(t)%e.length]}var FU=e=>Math.round(e*10)/10,IU=e=>`${FU(e)} ${FU(e)===1?`day`:`days`}`,LU=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,RU=e=>`${mg(e.area)} ${e.name&&e.name!==e.id?`${e.id} (${e.name})`:e.id}`;function zU(){let{dossier:e,now:t}=J(),n=tC(),r=VU(),i=(0,v.useMemo)(()=>Y_({dossier:e.name,entries:e.people??[],wipLimit:e.wipLimit??null,items:e.items,changes:e.pullRequests??[],now:t}),[e,t]),a=[...e.calls.dossier,...e.calls.work,...e.calls.prs],o=i.people.filter(e=>e.who.kind===`human`).length,s=i.people.length-o;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`p`,{className:`eyebrow`,children:(0,q.jsx)(`a`,{href:bg(e.name),children:e.name})}),(0,q.jsx)(`h1`,{tabIndex:-1,children:n(`people`,`People`)}),(0,q.jsxs)(`p`,{className:`lede`,children:[i.people.length?`${[o?LU(o,`person`,`people`):``,s?LU(s,`agent`):``].filter(Boolean).join(` and `)} from the dossier's people, and ${LU(i.unmapped.length,`account`)} it doesn't map.`:`This dossier lists nobody yet, so each account its data names has a card of its own (${i.unmapped.length}).`,` `,`Read `,Y(t),`; work in progress counts work items, not the epics and features that hold them. `,(0,q.jsx)(Fw,{topic:`people`})]}),!i.people.length&&(0,q.jsxs)(`p`,{className:`note`,children:[`Say who is who across systems in the dossier's people, from Settings, Dossiers, or with `,(0,q.jsxs)(`code`,{children:[`toil dossiers person `,e.name,` "Pat Example" --id jira=pat --id github=pat-ex`]}),`.`,` `,(0,q.jsx)(zw,{href:Mg(e.name,`people`),label:`Edit ${e.name}'s people`})]}),(e.peopleNotes??[]).map((e,t)=>(0,q.jsx)(`p`,{role:`note`,className:`failure`,children:e},t))]}),(0,q.jsx)(mj,{id:`team`,title:`Team`,calls:a,alerts:!1,children:(0,q.jsx)(BU,{view:i})}),i.people.length>0&&(0,q.jsxs)(`section`,{className:`people-section`,"aria-labelledby":`people-cards`,children:[(0,q.jsxs)(`div`,{className:`edit-head`,children:[(0,q.jsx)(`h2`,{id:`people-cards`,children:`People and agents`}),(0,q.jsx)(zw,{href:Mg(e.name,`people`),label:`Edit ${e.name}'s people`}),r&&(0,q.jsx)(Fw,{topic:`alignments`})]}),(0,q.jsx)(QT,{min:`md`,className:`people-cards`,children:i.people.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(HU,{card:e,limit:i.wipLimit})},e.who.key))})]}),(0,q.jsx)(rF,{people:e.people??[]}),(i.suggestions.length>0||i.ambiguous.length>0)&&(0,q.jsxs)(mj,{id:`matches`,title:`Possible matches`,calls:e.calls.dossier,alerts:!1,children:[(0,q.jsx)(`p`,{className:`note`,children:`Accounts that share an email with a person, or with an account in another system. Nothing is mapped until you approve it, and an email that fits more than one person suggests nothing.`}),i.suggestions.length>0&&(0,q.jsx)(`ul`,{className:`rows`,children:i.suggestions.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(WU,{suggestion:e})},`${e.name}:${e.input.id.join(`,`)}`))}),i.ambiguous.map((e,t)=>(0,q.jsx)(`p`,{className:`evidence`,children:e},t))]}),(0,q.jsxs)(`section`,{className:`people-section`,"aria-labelledby":`unmapped-cards`,children:[(0,q.jsx)(`h2`,{id:`unmapped-cards`,children:i.people.length?`Not in the dossier's people`:`Accounts in this dossier's data`}),(0,q.jsxs)(`p`,{className:`note`,children:[`Each account the data names that the dossier doesn't map to a person, with something on its plate.`,i.bots.length>0&&` ${LU(i.bots.length,`bot account`)} (${i.bots.map(e=>e.id).join(`, `)}) only wrote bots' pull requests and ${i.bots.length===1?`is`:`are`} left out.`]}),i.unnamedAgents.length>0&&(0,q.jsxs)(`p`,{className:`note`,children:[LU(i.unnamedAgents.length,`pull request`),` `,i.unnamedAgents.length===1?`was`:`were`,` written with an agent the dossier's people don't name (`,[...new Set(i.unnamedAgents.map(e=>e.authorKindSignal??`an agent account`))].join(`; `),`). Add the agent with `,(0,q.jsxs)(`code`,{children:[`toil dossiers person `,e.name,` "<name>" --kind agent`]}),` to give it a card.`]}),i.unmapped.length?(0,q.jsx)(QT,{min:`md`,className:`people-cards`,children:i.unmapped.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(HU,{card:e,limit:i.wipLimit})},e.who.key))}):(0,q.jsx)(Cj,{message:i.people.length?`Every account with work on its plate is mapped to someone.`:`This dossier's data names nobody with work on their plate.`,action:(0,q.jsx)(wj,{edit:!0,href:Mg(e.name,`people`),children:`Add a person`})})]})]})}function BU({view:e}){let{wip:t,reviewQueue:n,unassigned:r}=e.team,i=n[0];return(0,q.jsxs)(QT,{as:`ul`,min:`sm`,className:`team-strip`,children:[(0,q.jsx)(`li`,{children:(0,q.jsxs)(XT,{gap:`xs`,className:`team-tile`,children:[(0,q.jsx)(`h3`,{children:`Work in progress`}),(0,q.jsx)(`p`,{className:`team-figure`,children:t.total}),(0,q.jsxs)(`p`,{className:`note`,children:[t.limit===null?(0,q.jsx)(q.Fragment,{children:`No limit is set in the dossier.`}):t.over.length?(0,q.jsxs)(q.Fragment,{children:[`Limit `,t.limit,` per person. Over it: `,t.over.map(e=>`${e.name} (${e.count})`).join(`, `),`.`]}):(0,q.jsxs)(q.Fragment,{children:[`Limit `,t.limit,` per person. Nobody is over it.`]}),` `,(0,q.jsx)(zw,{href:Mg(e.dossier,`wip`),label:`Edit ${e.dossier}'s work-in-progress limit`})]})]})}),(0,q.jsx)(`li`,{children:(0,q.jsxs)(XT,{gap:`xs`,className:`team-tile`,children:[(0,q.jsx)(`h3`,{children:`Review queue`}),(0,q.jsx)(`p`,{className:`team-figure`,children:n.length}),(0,q.jsx)(`p`,{className:`note`,children:i?(0,q.jsxs)(q.Fragment,{children:[`Open pull requests waiting on a review. Longest: `,(0,q.jsx)(UT,{change:i.change}),`, `,i.wait.days===null?`for an unknown time`:o_(i.wait.days),`.`]}):`No open pull request waits on a review.`})]})}),(0,q.jsx)(`li`,{children:(0,q.jsxs)(XT,{gap:`xs`,className:`team-tile`,children:[(0,q.jsx)(`h3`,{children:`Unassigned this sprint`}),(0,q.jsx)(`p`,{className:`team-figure`,children:r?r.items.length:`–`}),r?r.items.length?(0,q.jsx)(`ul`,{className:`plain cites`,"aria-label":`Unassigned in ${r.sprint}`,children:r.items.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(HT,{id:e.id,withTitle:!0})},e.id))}):(0,q.jsxs)(`p`,{className:`note`,children:[`Everything in `,r.sprint,` that isn't done has someone on it.`]}):(0,q.jsx)(`p`,{className:`note`,children:`No sprint is current in this dossier's data.`})]})})]})}function VU(){let e=qS();return QS(e,ZS())?e.alignments:void 0}function HU({card:e,limit:t}){let{dossier:n}=J(),r=VU(),{who:i}=e,a=`who-${i.key.replace(/[^a-zA-Z0-9_-]/g,`-`)}`,o=i.identities.find(e=>e.name)??i.identities[0];return(0,q.jsx)(Q,{className:`person-card`,"aria-labelledby":a,children:(0,q.jsxs)(XT,{gap:`sm`,children:[(0,q.jsxs)(`div`,{className:`person-head`,children:[(0,q.jsx)(Nj,{person:{id:o?.id??i.name,name:i.name,email:i.email}}),(0,q.jsx)(`h3`,{id:a,children:i.name}),(0,q.jsxs)(`ul`,{className:`person-tags`,"aria-label":`About ${i.name}`,children:[i.kind===`agent`&&(0,q.jsx)(`li`,{className:`person-tag`,children:`Agent`}),!i.mapped&&(0,q.jsx)(`li`,{className:`person-tag`,children:`Not mapped`}),e.overLimit&&(0,q.jsxs)(`li`,{className:`person-tag person-tag--warn`,children:[`Over the limit: `,e.wipCount,` of `,t]}),r&&(0,q.jsxs)(`li`,{className:`person-tag person-tag--roll`,children:[r.label,`: `,PU(r.values,i.key)]})]})]}),(0,q.jsx)(`p`,{className:`note any-break`,children:i.identities.length?i.identities.map(RU).join(` · `):`No identities in the dossier yet.`}),(0,q.jsx)(`p`,{children:(0,q.jsxs)(`a`,{href:Tg(n.name,i.key),children:[i.name,`'s items on the board`]})}),(0,q.jsxs)(`h4`,{children:[`In progress `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,e.wipCount,t===null?``:` of ${t}`,`)`]})]}),e.wip.length?e.wip.map(e=>(0,q.jsxs)(`div`,{className:`person-group`,children:[(0,q.jsx)(`p`,{className:`person-status`,children:e.status}),(0,q.jsx)(`ul`,{className:`plain`,children:e.items.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(HT,{id:e.item.id,withTitle:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,e.days===null?`time in this status not recorded`:`for ${IU(e.days)}`]})]},e.item.id))})]},e.status)):(0,q.jsx)(`p`,{className:`note`,children:`Nothing in progress.`}),(0,q.jsx)(`h4`,{children:`Open pull requests`}),e.prs.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.prs.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{change:e.change,withTitle:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,s_[e.wait.on],`, `,e.wait.days===null?`for an unknown time`:o_(e.wait.days),e.withAgent&&`; written with ${e.withAgent}`]})]},e.change.id))}):(0,q.jsx)(`p`,{className:`note`,children:`None open.`}),(0,q.jsx)(`h4`,{children:`Reviews waiting on them`}),e.reviews.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.reviews.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{change:e.change,withTitle:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,e.days===null?`opened at an unknown time`:`open ${o_(e.days)}`]})]},e.change.id))}):(0,q.jsx)(`p`,{className:`note`,children:`None waiting.`}),(0,q.jsx)(`h4`,{children:`Blocked`}),e.blocked.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.blocked.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(HT,{id:e.item.id,withTitle:!0}),(0,q.jsx)(`span`,{className:`field`,children:` blocked by `}),e.by.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`, `,(0,q.jsx)(HT,{id:e.id}),e.item?(0,q.jsxs)(`span`,{className:`field`,children:[` (`,e.item.status??`not done`,`)`]}):(0,q.jsx)(`span`,{className:`field`,children:` (not in this dossier, so its status is unknown)`})]},e.id))]},e.item.id))}):(0,q.jsx)(`p`,{className:`note`,children:`Nothing blocked.`}),(0,q.jsxs)(`h4`,{children:[`Recent activity `,(0,q.jsxs)(`span`,{className:`field`,children:[`(last `,14,` days)`]})]}),e.activity.length?(0,q.jsxs)(`ul`,{className:`plain`,children:[e.activity.map((e,t)=>(0,q.jsx)(`li`,{children:(0,q.jsx)(UU,{a:e})},t)),e.moreActivity>0&&(0,q.jsxs)(`li`,{className:`note`,children:[`and `,e.moreActivity,` more`]})]}):(0,q.jsx)(`p`,{className:`note`,children:`Nothing recorded.`})]})})}function UU({a:e}){let t=(0,q.jsxs)(`span`,{className:`field`,children:[` `,e.at.slice(0,10)]});if(e.kind===`moved`)return(0,q.jsxs)(q.Fragment,{children:[`Moved `,(0,q.jsx)(HT,{id:e.item.id}),` `,e.from?`from ${e.from} `:``,`to `,e.to,t]});if(e.kind===`merged`)return(0,q.jsxs)(q.Fragment,{children:[`Their pull request merged: `,(0,q.jsx)(UT,{change:e.change}),t]});let n=e.state===`APPROVED`?`Approved`:e.state===`CHANGES_REQUESTED`?`Asked for changes on`:e.state===`DISMISSED`?`Had a review dismissed on`:`Commented on`;return(0,q.jsxs)(q.Fragment,{children:[n,` `,(0,q.jsx)(UT,{change:e.change}),t]})}function WU({suggestion:e}){let{config:t,refresh:n}=J(),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),s=(0,v.useId)(),c=t?t.disabled:`This view has no access to toil's config commands; run the command below in a terminal.`;return(0,q.jsxs)(XT,{gap:`xs`,children:[(0,q.jsx)(`p`,{children:e.person?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`strong`,{children:e.identities.map(RU).join(`, `)}),` `,e.identities.length===1?`has`:`have`,` `,e.person,`'s email (`,e.email,`): probably `,e.person,`.`]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`strong`,{children:e.identities.map(RU).join(` and `)}),` share the email `,e.email,`: probably one person, `,e.name,`.`]})}),(0,q.jsxs)(`p`,{className:`runs any-break`,children:[`Applies `,(0,q.jsx)(`code`,{children:Z_(e)})]}),(0,q.jsxs)(ZT,{children:[(0,q.jsx)(`button`,{type:`button`,className:`btn btn--accent`,onClick:async()=>{if(t&&!c){o(!0);try{let n=await t.run(e.command,e.input);i(wV(n,`Mapped in ${e.input.dossier}'s people. Reload the dossier to see the cards change.`))}catch(e){i(TV(e))}finally{o(!1)}}},disabled:c!==null||a||r?.ok===!0,"aria-describedby":c?s:void 0,children:a?`Running…`:e.person?`Map to ${e.person}`:`Add ${e.name}`}),c&&(0,q.jsxs)(`span`,{id:s,className:`note`,children:[`Turned off: `,c]})]}),(0,q.jsx)(EV,{outcome:r}),r?.ok&&n&&(0,q.jsx)(`p`,{children:(0,q.jsx)(`button`,{type:`button`,className:`btn`,onClick:n,children:`Reload the dossier`})})]})}var GU=e=>Math.round(e*10)/10,KU=[`ALL`,...__],qU=e=>e===null?`files not counted`:`${e} ${e===1?`file`:`files`}`,JU={HUMAN:`Person`,AGENT:`Agent`,BOT:`Bot`};function YU({change:e}){let t=e.authorKindSource==="default"?`no signal said otherwise`:`${e.authorKindSource}: ${e.authorKindSignal}`;return(0,q.jsxs)(`span`,{className:`kind kind--${e.authorKind.toLowerCase()}`,children:[`· `,JU[e.authorKind],` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,t,`)`]})]})}function XU({ids:e}){return e.length?(0,q.jsx)(`span`,{className:`cites`,children:e.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`, `,(0,q.jsx)(HT,{id:e})]},e))}):(0,q.jsx)(`span`,{className:`note`,children:`None`})}var ZU=[{header:`Pull request`,label:`Pull request`,rowHeader:!0,cell:e=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(UT,{change:e.change,withTitle:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,e.change.repo]})]})},{header:`Waiting on`,label:`Waiting on`,cell:e=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`strong`,{children:s_[e.wait.on]}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,e.wait.days===null?`for an unknown time`:`for ${o_(e.wait.days)}`,`: `,e.wait.why]})]})},{header:`Author`,label:`Author`,cell:e=>(0,q.jsxs)(q.Fragment,{children:[yg(e.change.author),` `,(0,q.jsx)(YU,{change:e.change})]})},{header:`Work items`,label:`Work items`,cell:e=>(0,q.jsx)(XU,{ids:e.items})},{header:`Size`,label:`Size`,cell:e=>e.size.bucket?(0,q.jsxs)(q.Fragment,{children:[e.size.bucket,` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,e.size.lines,` lines, `,qU(e.size.files),`)`]})]}):(0,q.jsx)(`span`,{className:`note`,children:e.size.files===null?`Unknown`:`${qU(e.size.files)}, lines not counted`})},{header:`Flags`,label:`Flags`,cell:e=>e.flags.length?(0,q.jsx)(`ul`,{className:`plain flags`,children:e.flags.map(e=>(0,q.jsx)(`li`,{children:f_[e.flag]},e.flag))}):`None`}],QU=(e,t)=>(0,q.jsxs)(q.Fragment,{children:[e.median===null?`No data`:t(e.median),(0,q.jsxs)(`span`,{className:`field`,children:[` `,`(n=`,e.n,e.unknown?`, ${e.unknown} unknown`:``,e.p85!==null&&e.n>1?`; 85% within ${t(e.p85)}`:``,`)`]})]});function $U(e){return[{name:`Pickup`,note:`opened to first review`,sample:e.pickup,unit:o_},{name:`Review`,note:`first review to approval`,sample:e.review,unit:o_},{name:`Merge`,note:`approval to merge`,sample:e.merge,unit:o_},{name:`Review rounds`,note:`per merged pull request`,sample:e.rounds,unit:e=>`${GU(e)} ${GU(e)===1?`round`:`rounds`}`}]}var eW=[{header:`Median`,label:`Median`,rowHeader:!0,cell:e=>(0,q.jsxs)(q.Fragment,{children:[e.name,` `,(0,q.jsx)(`span`,{className:`field`,children:e.note})]})},...KU.map(e=>({header:v_[e],label:v_[e],cell:t=>QU(t.sample[e],t.unit)}))];function tW(){let{dossier:e,byId:t,now:n,sync:r}=J(),i=e.pullRequests??[],a=h_(i,t,n),o=g_(i,t,n),s=b_(i,n),c=Object.fromEntries(Object.entries(e.codeowners??{}).map(([e,t])=>[e,C_(t.text)])),l=a.filter(e=>!e.change.reviewers.length),u=e.calls.prs;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`p`,{className:`eyebrow`,children:(0,q.jsx)(`a`,{href:bg(e.name),children:e.name})}),(0,q.jsx)(`h1`,{tabIndex:-1,children:`Pull requests`}),(0,q.jsxs)(`p`,{className:`lede`,children:[a.length,` open across `,new Set(i.map(e=>e.repo)).size,` `,new Set(i.map(e=>e.repo)).size===1?`repository`:`repositories`,`, `,i.length-a.length,` merged or closed. Read `,Y(n),`. `,(0,q.jsx)(Fw,{topic:`prs`})]}),(e.prNotes??[]).map((e,t)=>(0,q.jsx)(`p`,{role:`note`,className:`failure`,children:e},t))]}),(0,q.jsxs)(mj,{id:`queue`,title:`Waiting now`,calls:u,children:[(0,q.jsx)(`p`,{className:`note`,children:`Open pull requests, longest wait first, each with what it waits on and since when. Drafts come last. Waits count working days, Monday to Friday UTC.`}),a.length?(0,q.jsx)(tE,{className:`pr-queue`,label:`Open pull requests`,wide:!0,rows:a,rowKey:e=>e.change.id,columns:ZU}):(0,q.jsx)(Cj,{message:`No open pull requests for this dossier.`,action:(0,q.jsx)(Ej,{sync:r,children:(0,q.jsx)(wj,{edit:!0,href:Mg(e.name,`repos`),children:`Add a repository`})})})]}),(0,q.jsxs)(mj,{id:`flags`,title:`Flags`,calls:u,alerts:!1,children:[(0,q.jsxs)(`p`,{className:`note`,children:[`A first review waiting over `,2,` working days, checks failing for over `,24,` hours, a merge conflict, no linked work item, a work item done while its pull request is open, and a merged pull request whose item isn't done.`]}),o.length?(0,q.jsx)(`ul`,{className:`rows`,children:o.map(({change:e,hit:t})=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`strong`,{children:f_[t.flag]}),`: `,(0,q.jsx)(UT,{change:e,withTitle:!0}),(0,q.jsx)(`p`,{className:`evidence`,children:(0,q.jsx)(WT,{text:t.text})})]},`${e.id}:${t.flag}:${t.text}`))}):(0,q.jsx)(`p`,{children:`Nothing to flag.`})]}),(0,q.jsxs)(mj,{id:`flow`,title:`Flow`,calls:u,alerts:!1,children:[(0,q.jsxs)(`p`,{className:`note`,children:[`The `,s.throughput.ALL.length,` weeks from `,Y(s.from),`, split by who wrote each pull request. n is how many pull requests a figure rests on; unknown counts those whose record can't say (a host that keeps no review times, or reviews not read).`]}),(0,q.jsx)(tE,{className:`pr-metrics`,label:`Pull request flow by author kind`,rows:$U(s),rowKey:e=>e.name,columns:eW}),s.mergedUnreviewed.ALL>0&&(0,q.jsxs)(`p`,{className:`note`,children:[s.mergedUnreviewed.ALL,` merged `,s.mergedUnreviewed.ALL===1?`pull request has`:`pull requests have`,` no approval on record, so review and merge time leave `,s.mergedUnreviewed.ALL===1?`it`:`them`,` out (`,__.map(e=>`${v_[e]}: ${s.mergedUnreviewed[e]}`).join(`, `),`).`]}),(0,q.jsx)(`h3`,{children:`Merged per week`}),(0,q.jsx)(CI,{weeks:s.throughput.ALL,noun:`pull requests merged`}),(0,q.jsxs)(`p`,{className:`note`,children:[__.map(e=>`${v_[e]}: ${s.throughput[e].reduce((e,t)=>e+t.items.length,0)}`).join(`, `),`.`,s.unplacedMerges>0&&` ${s.unplacedMerges} merged ${s.unplacedMerges===1?`pull request has`:`pull requests have`} no merge time on record (Bitbucket Cloud keeps none) and ${s.unplacedMerges===1?`isn't`:`aren't`} counted in a week.`]}),(0,q.jsx)(`h3`,{children:`Size of pull requests opened`}),(0,q.jsx)(tE,{className:`pr-sizes`,label:`Pull request sizes by author kind`,rows:[...l_,`unknown`],rowKey:e=>e,columns:[{header:`Size`,label:`Size`,rowHeader:!0,cell:e=>e===`unknown`?(0,q.jsxs)(q.Fragment,{children:[`Unknown `,(0,q.jsx)(`span`,{className:`field`,children:`(lines not counted)`})]}):(0,q.jsxs)(q.Fragment,{children:[e,` `,(0,q.jsx)(`span`,{className:`field`,children:e===`XL`?`${u_.L+1}+ lines`:`up to ${u_[e]} lines`})]})},...KU.map(e=>({header:`${v_[e]} (n=${s.counts[e]})`,label:v_[e],cell:t=>s.sizes[e][t]}))]})]}),(0,q.jsxs)(mj,{id:`reviewers`,title:`Suggested reviewers`,calls:e.calls.owners??[],alerts:!1,children:[(0,q.jsx)(`p`,{className:`note`,children:`For open pull requests with nobody asked: the CODEOWNERS of the paths each changes, then who reviewed changes to the same files and folders. Each is a proposal; asking for a review is a write you apply.`}),(e.calls.owners??[]).length>0&&!Object.keys(e.codeowners??{}).length&&(0,q.jsx)(`p`,{className:`evidence`,children:`No CODEOWNERS file was found where GitHub looks for one (.github/, the repository root, docs/).`}),Object.entries(e.codeowners??{}).map(([e,t])=>(0,q.jsxs)(`p`,{className:`evidence`,children:[e,`: CODEOWNERS read from `,(0,q.jsx)(`code`,{children:t.path}),`.`]},e)),l.length?(0,q.jsx)(`ul`,{className:`rows`,children:l.map(({change:t})=>{let n=E_(t,i,c[t.repo]??null);return(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{change:t,withTitle:!0}),n.length?(0,q.jsx)(`ul`,{className:`plain proposals`,children:n.map(n=>(0,q.jsx)(`li`,{children:(0,q.jsx)(AE,{proposal:D_(t,n,e.name)})},n.id))}):(0,q.jsx)(`p`,{className:`note`,children:`No one to suggest: no CODEOWNERS rule and no earlier review covers its paths.`})]},t.id)})}):(0,q.jsx)(`p`,{children:`Every open pull request has a reviewer asked.`})]})]})}var nW=/^\d{4}-\d{2}-\d{2}$/;function rW(e){if(!e)return null;let t=Date.parse(e);return Number.isNaN(t)?null:new Date(t).toISOString().slice(0,10)}function iW(e){if(typeof e!=`string`||!nW.test(e))return!1;let t=Date.parse(`${e}T00:00:00Z`);return!Number.isNaN(t)&&new Date(t).toISOString().slice(0,10)===e}var aW=e=>e.slice(0,7);function oW(e,t){return new Date(Date.parse(`${e}T00:00:00Z`)+t*864e5).toISOString().slice(0,10)}function sW(e){let t=[];for(let n=`${e}-01`;aW(n)===e;n=oW(n,1))t.push(n);return t}function cW(e,t){let[n,r]=e.split(`-`).map(Number),i=n*12+(r-1)+t;return`${String(Math.floor(i/12)).padStart(4,`0`)}-${String(i%12+1).padStart(2,`0`)}`}var lW=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],uW=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dW=e=>String(e).padStart(2,`0`),fW=e=>new Date(`${e}T00:00:00Z`),pW=e=>{let t=new Date(e);return`${dW(t.getUTCHours())}:${dW(t.getUTCMinutes())}`},mW=e=>{let t=fW(e);return`${uW[t.getUTCDay()]} ${t.getUTCDate()} ${lW[t.getUTCMonth()]} ${t.getUTCFullYear()}`},hW=e=>{let t=fW(e);return`${t.getUTCDate()} ${lW[t.getUTCMonth()].slice(0,3)} ${t.getUTCFullYear()}`},gW=e=>{let t=fW(`${e}-01`);return`${lW[t.getUTCMonth()]} ${t.getUTCFullYear()}`},_W=e=>`${hW(rW(e))} ${pW(e)} UTC`;function vW(e){if(!e.observed)return``;let t=e.observed.previousSync,n=t?`; the one before ran ${rW(t)===rW(e.at)?`at ${pW(t)} UTC`:_W(t)}`:``;return`first seen by the sync at ${pW(e.at)} UTC${n}`}var yW={running:`still running`,finished:`finished`,failed:`failed`,stopped:`stopped before it finished`,capped:`stopped at its cap`};function bW(e){switch(e.state){case`applied`:return`applied: toil's audit log has the write at ${_W(e.at)} (${e.via})`;case`not-applied`:return`not applied: toil's audit log has no matching write`;case`no-command`:return`toil has no command for it, so nothing to apply`;case`unknown`:return`couldn't check toil's audit log: ${e.why}`}}var xW=[`done`,`progress`,`blocked`,`next`],SW={done:`Done`,progress:`In progress`,blocked:`Blocked`,next:`Next`},CW=(e,t)=>e===`done`?`Nothing done.`:e===`progress`?`Nothing in progress.`:e===`blocked`?`Nothing blocked.`:t?`Nothing assigned and not started in ${t}.`:`No current sprint to take it from.`;function wW(e){let t=oW(e,-1);for(;[0,6].includes(new Date(`${t}T00:00:00Z`).getUTCDay());)t=oW(t,-1);return t}var TW=e=>({from:wW(e),to:e}),EW=e=>[...e.team,...e.people.flatMap(e=>xW.flatMap(t=>e.lines[t]))];function DW(e,t){return t.at?e.from===e.to?`${pW(t.at)} UTC`:`${hW(rW(t.at))} ${pW(t.at)} UTC`:`as of the latest sync`}var OW=e=>e.from===e.to?hW(e.from):`${hW(e.from)} to ${hW(e.to)}`,kW=e=>e.asOf?`Review waits, the sprint and Next are as of the sync at ${hW(rW(e.asOf))} ${pW(e.asOf)} UTC.`:`Review waits, the sprint and Next come from a sync, and none has run yet, so there are none.`,AW=e=>`${e.name}${e.account&&e.account.id!==e.name?` (${e.account.area} ${e.account.id})`:e.account?` (${e.account.area})`:``}${e.kind===`agent`?` (agent)`:``}`,jW=e=>`Stand-up: ${e.dossier}, ${OW(e)}`,MW=e=>`Built by Toil UI from the worklog, ${OW(e)}, times in UTC: facts only, each linked to its source. ${kW(e)}`,NW=(e,t)=>`Write up the stand-up for ${e}${t===e?``:` to ${t}`}`;function PW(e,t){let n=new Set(EW(t).map(e=>e.fact)),r=new Set;for(let t of e.matchAll(/\bF(\d+)\b/g))n.has(`F${t[1]}`)&&r.add(`F${t[1]}`);return[...r]}var FW=e=>({ok:!1,message:e instanceof Error?e.message:String(e)}),IW=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function LW({api:e,from:t,to:n,ignored:r}){let{dossier:i,now:a}=J(),o=rW(a),s=t&&n?{from:t,to:n}:TW(o),[c,l]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(!e)return;let t=!0;return l(null),e.standup(i.name,s.from,s.to).then(e=>t&&l({ok:!0,value:e}),e=>t&&l(FW(e))),()=>{t=!1}},[e,i.name,s.from,s.to]);let u=(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsxs)(`p`,{className:`eyebrow`,children:[(0,q.jsx)(`a`,{href:bg(i.name),children:i.name}),` · `,(0,q.jsx)(`a`,{href:kg(i.name),children:`Worklog`})]}),(0,q.jsx)(`h1`,{tabIndex:-1,children:`Stand-up`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`The worklog's days, grouped by person into done, in progress, blocked and next, with the team's lines first. `,(0,q.jsx)(Fw,{topic:`standup`})]})]});return e?(0,q.jsxs)(q.Fragment,{children:[u,(0,q.jsxs)(`div`,{className:`standup`,children:[(0,q.jsxs)(mj,{id:`standup-range`,title:`Days`,calls:[],children:[r&&(0,q.jsxs)(`p`,{role:`status`,className:`note`,children:[`“`,r,`” isn't a day as yyyy-mm-dd, so this is since the last working day instead.`]}),(0,q.jsx)(RW,{from:s.from,to:s.to,today:o,explicit:!!(t&&n)},`${s.from}/${s.to}`)]}),c?c.ok?(0,q.jsx)(UW,{api:e,data:c.value,onRebuilt:e=>l({ok:!0,value:e})}):(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:c.message}):(0,q.jsx)(PA,{size:`panel`,message:`Folding the stand-up`})]})]}):(0,q.jsxs)(q.Fragment,{children:[u,(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:`This Toil UI keeps no worklog, so it has no stand-up to fold from one.`})]})}function RW({from:e,to:t,today:n,explicit:r}){let{dossier:i}=J(),[a,o]=(0,v.useState)(e),[s,c]=(0,v.useState)(t);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`note`,children:[r?`The days you picked.`:`Since the last working day, through today.`,` At most `,31,` days.`,r&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(`a`,{href:Ag(i.name),children:`Back to since the last working day`}),`.`]})]}),(0,q.jsxs)(so,{className:`standup-range`,onSubmit:e=>{e.preventDefault(),window.location.hash=Ag(i.name,{from:a,to:s})},children:[(0,q.jsxs)(Yp,{className:`field-text`,value:a,onChange:o,isRequired:!0,children:[(0,q.jsx)(va,{children:`From`}),(0,q.jsx)(jo,{type:`date`,max:n})]}),(0,q.jsxs)(Yp,{className:`field-text`,value:s,onChange:c,isRequired:!0,children:[(0,q.jsx)(va,{children:`To`}),(0,q.jsx)(jo,{type:`date`,max:n})]}),(0,q.jsx)(W,{type:`submit`,className:`btn`,isDisabled:!a||!s,children:`Show these days`})]})]})}function zW({line:e}){let{byId:t,prById:n,dossier:r}=J();return t.has(e.subject)||n?.has(e.subject)?(0,q.jsx)(HT,{id:e.subject,withTitle:!0}):e.subject.startsWith(`run:`)&&e.day?(0,q.jsx)(`a`,{href:kg(r.name,e.day),className:`item-link`,children:(0,q.jsx)(`span`,{className:`key`,children:e.label})}):e.url?(0,q.jsx)(`a`,{href:e.url,className:`item-link`,children:(0,q.jsx)(`span`,{className:`key`,children:e.label})}):(0,q.jsx)(`span`,{className:`item-link`,children:(0,q.jsx)(`span`,{className:`key`,children:e.label})})}function BW({report:e,line:t,highlight:n}){let{byId:r,prById:i}=J(),a=r.has(t.subject)||i?.has(t.subject)?null:t.title;return(0,q.jsxs)(`li`,{className:`worklog-line standup-line`,id:`fact-${t.fact}`,"data-cited":n||void 0,children:[(0,q.jsx)(`span`,{className:`standup-fact`,children:t.fact}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(zW,{line:t}),a&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(WT,{text:a})]}),`: `,(0,q.jsx)(WT,{text:t.text}),` `,(0,q.jsxs)(`span`,{className:`note`,children:[`(`,t.at?(0,q.jsx)(`time`,{dateTime:t.at,children:DW(e,t)}):DW(e,t),`)`]})]})]})}function VW({report:e,lines:t,none:n,cited:r}){return t.length?(0,q.jsx)(`ul`,{className:`rows worklog-lines`,children:t.map(t=>(0,q.jsx)(BW,{report:e,line:t,highlight:r.has(t.fact)},t.fact))}):(0,q.jsx)(`p`,{className:`note`,children:n})}function HW({report:e,group:t,cited:n}){let r=`standup-${t.key.replace(/[^A-Za-z0-9-]/g,`-`)}`,i=xW.reduce((e,n)=>e+t.lines[n].length,0);return(0,q.jsxs)(mj,{id:r,title:AW(t),calls:[],children:[!t.mapped&&t.key!==`none`&&(0,q.jsx)(`p`,{className:`note`,children:`Not in the dossier's people: an account the People view can map to someone.`}),i===0?(0,q.jsx)(`p`,{className:`note`,children:`Nothing recorded for these days.`}):(0,q.jsx)(`div`,{className:`standup-buckets`,children:xW.map(r=>(0,q.jsxs)(`section`,{className:`worklog-section`,children:[(0,q.jsx)(`h3`,{children:SW[r]}),(0,q.jsx)(VW,{report:e,lines:t.lines[r],none:CW(r,e.sprint),cited:n})]},r))})]})}function UW({api:e,data:t,onRebuilt:n}){let{report:r}=t,[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!1),c=async i=>{if(a(i),s(!1),i)try{let i=await e.standup(r.dossier,r.from,r.to);i.markdown!==t.markdown&&(n(i),s(!0))}catch{}},l=new Set(i?PW(i.parts.map(e=>e.text).join(`
59
- `),r):[]);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`section`,{className:`standup-summary`,"aria-labelledby":`standup-title`,children:[(0,q.jsx)(`h2`,{id:`standup-title`,children:jW(r)}),(0,q.jsx)(`p`,{className:`note`,children:MW(r)}),r.gaps.length>0&&(0,q.jsxs)(`section`,{className:`worklog-gaps`,"aria-labelledby":`standup-gaps`,children:[(0,q.jsx)(`h3`,{id:`standup-gaps`,children:`Coverage`}),(0,q.jsx)(`ul`,{children:r.gaps.map((e,t)=>(0,q.jsx)(`li`,{children:e},t))})]})]}),(0,q.jsx)(mj,{id:`standup-team`,title:`Team`,calls:[],children:(0,q.jsx)(VW,{report:r,lines:r.team,none:`No sprint, scope changes, or builds and deployments that broke or recovered.`,cited:l})}),r.people.length?r.people.map(e=>(0,q.jsx)(HW,{report:r,group:e,cited:l},e.key)):(0,q.jsx)(`p`,{className:`note`,children:`Nobody is in the dossier's people, and nobody did anything the worklog recorded on these days.`}),(0,q.jsx)(mj,{id:`standup-share`,title:`Copy, export and publish`,calls:[],children:(0,q.jsx)(GW,{api:e,data:t})}),(0,q.jsxs)(mj,{id:`standup-writeup`,title:`Write it up`,calls:[],children:[o&&(0,q.jsx)(`p`,{role:`status`,className:`note`,children:`A sync landed while the agent wrote, so the report above was built again from what the agent read, and its fact numbers match the write-up.`}),(0,q.jsx)(KW,{report:r,answer:i,onAnswer:e=>void c(e)})]})]})}function WW({value:e,label:t,what:n}){let[r,i]=(0,v.useState)(null),a=async()=>{try{await navigator.clipboard.writeText(e),i(!0)}catch{i(!1)}};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(W,{className:`btn`,onPress:()=>void a(),children:t}),(0,q.jsx)(`span`,{role:`status`,className:`sr-only`,children:r===null?``:r?`Copied the stand-up as ${n}.`:`This browser wouldn't copy; select the ${n} below instead.`}),r===!1&&(0,q.jsxs)(`span`,{className:`note`,children:[`This browser wouldn't copy; select the `,n,` below instead.`]})]})}function GW({api:e,data:t}){let{report:n}=t,[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),l=async t=>{t.preventDefault(),c(!0),o(null);try{o({ok:!0,value:await e.exportTo(n.dossier,{from:n.from,to:n.to},r)})}catch(e){o(FW(e))}finally{c(!1)}};return(0,q.jsxs)(`div`,{className:`worklog-page`,children:[(0,q.jsx)(`p`,{className:`note`,children:`Markdown suits Slack, Teams and a wiki page; plain text suits a chat that shows Markdown as it is typed. Both are the report as shown, line for line.`}),(0,q.jsxs)(`div`,{className:`worklog-actions`,children:[(0,q.jsx)(WW,{value:t.markdown,label:`Copy as Markdown`,what:`Markdown`}),(0,q.jsx)(WW,{value:t.text,label:`Copy as plain text`,what:`plain text`})]}),(0,q.jsxs)(`section`,{className:`worklog-section`,"aria-labelledby":`standup-export`,children:[(0,q.jsx)(`h3`,{id:`standup-export`,children:`Export and publish`}),(0,q.jsx)(`p`,{className:`note`,children:`Export writes the Markdown to a new file in a folder you name, through toil's own file service. Publishing it to Confluence or GitHub is then a proposal, for you to run through toil's write gate.`}),e.disabled?(0,q.jsx)(`p`,{className:`note`,children:e.disabled}):(0,q.jsxs)(so,{className:`worklog-export`,onSubmit:e=>void l(e),children:[(0,q.jsxs)(Yp,{className:`field-text`,value:r,onChange:i,isRequired:!0,children:[(0,q.jsx)(va,{children:`Folder, as a full path`}),(0,q.jsx)(jo,{autoComplete:`off`,spellCheck:!1})]}),(0,q.jsx)(W,{type:`submit`,className:`btn`,isDisabled:s||!r.trim(),children:`Export`})]}),a&&(a.ok?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{role:`status`,children:[`toil wrote `,IW(a.value.bytes,`byte`),` to `,(0,q.jsx)(iE,{value:a.value.path,what:`exported file's path`}),`.`]}),a.value.proposals.length?a.value.proposals.map(e=>(0,q.jsx)(AE,{proposal:e},e.id)):(0,q.jsx)(`p`,{className:`note`,children:`This dossier names no Confluence space and no GitHub repository, so there is nowhere to propose publishing it.`})]}):(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:a.message}))]}),(0,q.jsxs)(`details`,{className:`worklog-md`,children:[(0,q.jsx)(`summary`,{children:`The stand-up as Markdown`}),(0,q.jsx)(`pre`,{role:`region`,"aria-label":`The stand-up as Markdown`,tabIndex:0,children:(0,q.jsx)(`code`,{children:t.markdown})})]}),(0,q.jsxs)(`details`,{className:`worklog-md`,children:[(0,q.jsx)(`summary`,{children:`The stand-up as plain text`}),(0,q.jsx)(`pre`,{role:`region`,"aria-label":`The stand-up as plain text`,tabIndex:0,children:(0,q.jsx)(`code`,{children:t.text})})]})]})}function KW({report:e,answer:t,onAnswer:n}){let{agent:r,dossier:i}=J(),a=qS(),o=ZS(),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(null),d=new Map(EW(e).map(e=>[e.fact,e])),f=async()=>{c(!0),u(null),n(null);try{let t={id:typeof crypto<`u`&&`randomUUID`in crypto?crypto.randomUUID():`standup-${Date.now()}`,turn:1};n(await r.ask(i.name,NW(e.from,e.to),{theme:a.name,voice:$S(a,o)},t))}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(!1)}},p=t?PW(t.parts.map(e=>e.text).join(`
60
- `),e):[];return(0,q.jsxs)(`div`,{className:`worklog-page`,children:[(0,q.jsx)(`p`,{className:`note`,children:`Optional. The agent turns the facts above into a short narrative, in the theme's voice when that is on. It reads the same report, names the fact lines it used, and its usage counts like any chat's. The report above stays the record.`}),r.notice&&(0,q.jsx)(`p`,{className:`note agent-notice`,children:r.notice}),(0,q.jsxs)(`div`,{className:`worklog-actions`,children:[(0,q.jsx)(W,{className:`btn`,"data-standup-writeup":``,isDisabled:s,onPress:()=>void f(),children:t?`Write it up again`:`Write it up`}),s&&(0,q.jsx)(`span`,{role:`status`,children:`The agent is writing it up.`})]}),l&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:l}),t&&(0,q.jsxs)(`section`,{className:`standup-writeup`,"aria-labelledby":`standup-writeup-by`,children:[(0,q.jsxs)(`h3`,{id:`standup-writeup-by`,children:[`Written by the agent (`,t.by===`scripted`?`a scripted preview, not a model`:t.by,`), not by Toil UI`]}),t.warnings?.map((e,t)=>(0,q.jsx)(`p`,{className:`note`,children:e},t)),t.parts.map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(WT,{text:e.text,chips:!0})},t)),(0,q.jsxs)(`p`,{className:`note`,children:[p.length?`Rests on ${IW(p.length,`fact line`)} of the report, marked above: `:`Names none of the report's fact lines, so check it against the report before you use it.`,p.map((e,t)=>(0,q.jsxs)(`span`,{children:[t?`, `:``,(0,q.jsx)(W,{className:`btn btn--small`,"aria-label":`${e}: ${d.get(e)?.label??``} ${d.get(e)?.text??``}`,onPress:()=>document.getElementById(`fact-${e}`)?.scrollIntoView({block:`center`}),children:e})]},e)),p.length?`.`:``,t.unverified&&t.unverified.length>0?` It names ${IW(t.unverified.length,`id`)} its tools never returned.`:``]})]})]})}var qW=`This is sample data, so it keeps no notes and writes no files. Toil UI on your own machine keeps each page in its data folder and exports through toil.`,JW=e=>({ok:!1,message:e instanceof Error?e.message:String(e)}),YW=[[`Mon`,`Monday`],[`Tue`,`Tuesday`],[`Wed`,`Wednesday`],[`Thu`,`Thursday`],[`Fri`,`Friday`],[`Sat`,`Saturday`],[`Sun`,`Sunday`]],XW=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function ZW({api:e,day:t}){let{dossier:n}=J(),[r,i]=(0,v.useState)(t?aW(t):null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),l=a?.ok?a.value.today:null,u=t??l;(0,v.useEffect)(()=>{if(!e)return;let t=!0;return o(null),e.month(n.name,r??void 0).then(e=>t&&o({ok:!0,value:e}),e=>t&&o(JW(e))),()=>{t=!1}},[e,n.name,r]),(0,v.useEffect)(()=>{if(!e||!u)return;let t=!0;return c(null),e.day(n.name,u).then(e=>t&&c({ok:!0,value:e}),e=>t&&c(JW(e))),()=>{t=!1}},[e,n.name,u]);let d=(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`p`,{className:`eyebrow`,children:(0,q.jsx)(`a`,{href:bg(n.name),children:n.name})}),(0,q.jsx)(`h1`,{tabIndex:-1,children:`Worklog`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`One page a day of what happened, facts only. `,(0,q.jsx)(Fw,{topic:`worklog`})]}),e&&(0,q.jsx)(`p`,{children:(0,q.jsx)(`a`,{className:`btn`,href:Ag(n.name),"data-standup-link":``,children:`Stand-up since the last working day`})})]});return e?(0,q.jsxs)(q.Fragment,{children:[d,(0,q.jsxs)(`div`,{className:`worklog`,children:[(0,q.jsx)(mj,{id:`worklog-calendar`,title:a?.ok?gW(a.value.month):`Calendar`,calls:[],children:a?a.ok?(0,q.jsx)(QW,{data:a.value,selected:u,onMonth:i}):(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:a.message}):(0,q.jsx)(PA,{size:`panel`,message:`Reading the calendar`})}),(0,q.jsx)(mj,{id:`worklog-day`,title:u?mW(u):`The day`,calls:[],children:s?s.ok?(0,q.jsx)(rG,{api:e,data:s.value,today:l,onChange:e=>c({ok:!0,value:e})}):(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:s.message}):(0,q.jsx)(PA,{size:`panel`,message:`Folding the page`})})]})]}):(0,q.jsxs)(q.Fragment,{children:[d,(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:`This Toil UI keeps no worklog: it has no cache to fold one from.`})]})}function QW({data:e,selected:t,onMonth:n}){let{dossier:r}=J(),i=new Map(e.days.map(e=>[e.day,e])),a=sW(e.month),o=(new Date(`${a[0]}T00:00:00Z`).getUTCDay()+6)%7,s=[...Array(o).fill(null),...a];for(;s.length%7;)s.push(null);let c=Array.from({length:s.length/7},(e,t)=>s.slice(t*7,t*7+7)),l=e.first?aW(e.first):e.month,u=cW(e.month,-1),d=cW(e.month,1);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`calendar-nav`,children:[(0,q.jsx)(W,{className:`btn btn--small`,isDisabled:e.month<=l,onPress:()=>n(u),children:`Previous month`}),(0,q.jsx)(W,{className:`btn btn--small`,isDisabled:e.month>=aW(e.today),onPress:()=>n(d),children:`Next month`})]}),(0,q.jsxs)(`table`,{className:`calendar`,children:[(0,q.jsxs)(`caption`,{className:`sr-only`,children:[gW(e.month),`: `,XW(e.days.length,`day`),` with a page. Days are UTC.`]}),(0,q.jsx)(`thead`,{children:(0,q.jsx)(`tr`,{children:YW.map(([e,t])=>(0,q.jsx)(`th`,{scope:`col`,children:(0,q.jsx)(`abbr`,{title:t,children:e})},e))})}),(0,q.jsx)(`tbody`,{children:c.map((n,a)=>(0,q.jsx)(`tr`,{children:n.map((n,a)=>{if(!n)return(0,q.jsx)(`td`,{},a);let o=i.get(n),s=Number(n.slice(8));return o?(0,q.jsx)(`td`,{children:(0,q.jsxs)(`a`,{href:kg(r.name,n),className:`calendar__day`,"aria-current":n===t?`date`:void 0,"data-today":n===e.today||void 0,"data-quiet":o.lines===0||void 0,children:[(0,q.jsxs)(`span`,{className:`sr-only`,children:[mW(n),n===e.today?`, today`:``,`: `]}),(0,q.jsx)(`span`,{className:`calendar__n`,"aria-hidden":`true`,children:s}),(0,q.jsxs)(`span`,{className:`calendar__count`,children:[o.lines,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,o.lines===1?`line`:`lines`,o.gaps?`, ${XW(o.gaps,`coverage note`)}`:``]}),o.gaps>0&&(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`*`})]})]})},n):(0,q.jsxs)(`td`,{className:n>e.today?`calendar__future`:`calendar__empty`,"data-today":n===e.today||void 0,children:[(0,q.jsxs)(`span`,{className:`sr-only`,children:[mW(n),n===e.today?`, today`:``,`: `,n>e.today?`not yet`:`no page`]}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:s})]},n)})},a))})]}),(0,q.jsxs)(`p`,{className:`note`,children:[`A number under a day is how many lines its page has; a star means the page says what the cache can't vouch for. The cache keeps `,XW(e.retentionDays,`day`),` after each sync, and so do the pages.`]})]})}function $W({e}){let{byId:t,prById:n}=J();return t.has(e.subject)||n?.has(e.subject)?(0,q.jsx)(HT,{id:e.subject,withTitle:!0}):e.url?(0,q.jsx)(`a`,{href:e.url,className:`item-link`,children:(0,q.jsx)(`span`,{className:`key`,children:e.label})}):(0,q.jsx)(`span`,{className:`item-link`,children:(0,q.jsx)(`span`,{className:`key`,children:e.label})})}function eG({e}){let{byId:t,prById:n}=J(),r=t.has(e.subject)||n?.has(e.subject)?null:e.title;return(0,q.jsxs)(`li`,{className:`worklog-line`,children:[(0,q.jsx)(`time`,{dateTime:e.at,children:pW(e.at)}),` `,(0,q.jsxs)(`span`,{children:[(0,q.jsx)($W,{e}),r&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(WT,{text:r})]}),`: `,(0,q.jsx)(WT,{text:e.text}),e.by&&(0,q.jsxs)(`span`,{className:`by`,children:[`, by `,e.by]}),e.observed&&(0,q.jsxs)(`span`,{className:`note`,children:[` `,`(`,vW(e),`)`]})]})]})}function tG({title:e,events:t,none:n}){return(0,q.jsxs)(`section`,{className:`worklog-section`,children:[(0,q.jsx)(`h3`,{children:e}),t.length?(0,q.jsx)(`ul`,{className:`rows worklog-lines`,children:t.map(e=>(0,q.jsx)(eG,{e},e.key))}):(0,q.jsx)(`p`,{className:`note`,children:n})]})}function nG({line:e}){let{run:t}=e;return(0,q.jsxs)(`li`,{className:`worklog-line`,children:[(0,q.jsx)(`time`,{dateTime:t.startedAt,children:pW(t.startedAt)}),` `,(0,q.jsxs)(`span`,{children:[t.kind===`ask`?`Asked`:`Assigned`,` `,t.by,`: “`,t.prompt,`”, `,yW[t.outcome],t.finishedAt&&` at ${pW(t.finishedAt)}`,t.citations.length>0&&`, citing ${XW(t.citations.length,`item`)}${t.unverified.length?` (${t.unverified.length} unverified)`:``}`,t.error&&(0,q.jsxs)(`span`,{className:`failure`,children:[`: `,t.error]}),e.proposals.length>0&&(0,q.jsx)(`ul`,{className:`plain worklog-proposals`,children:e.proposals.map(e=>(0,q.jsxs)(`li`,{children:[`Proposal: `,(0,q.jsx)(WT,{text:e.proposal.title}),e.proposal.command&&(0,q.jsxs)(q.Fragment,{children:[` `,`(`,(0,q.jsxs)(`code`,{children:[`toil `,e.proposal.command]}),`)`]}),`, `,(0,q.jsx)(`span`,{className:e.applied.state===`applied`?void 0:`note`,children:bW(e.applied)})]},e.proposal.id))}),(0,q.jsxs)(`details`,{className:`worklog-transcript`,children:[(0,q.jsx)(`summary`,{children:`Transcript, written by the agent`}),t.answer?t.answer.split(/\n{2,}/).map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(WT,{text:e,chips:!0})},t)):(0,q.jsx)(`p`,{className:`note`,children:`No answer was recorded.`})]})]})]})}function rG({api:e,data:t,today:n,onChange:r}){let{page:i}=t,[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),l=async()=>{c(!0);try{let t=await e.rebuild(i.dossier,i.day);r(t),o(t.same===null?`Rebuilt from the cache. There was no page kept to compare it with.`:t.same?`Rebuilt from the cache: the same, line for line, as the page kept.`:`Rebuilt from the cache: it differs from the page kept, which now matches the cache again.`)}catch(e){o(`The rebuild failed: ${e instanceof Error?e.message:String(e)}`)}finally{c(!1)}};return(0,q.jsxs)(`div`,{className:`worklog-page`,children:[(0,q.jsxs)(`p`,{className:`note`,children:[`Built by Toil UI from its cache, facts only`,t.file?`, and kept at `:`. Sample data keeps no file.`,t.file&&(0,q.jsx)(iE,{value:t.file,what:`page's path`})]}),i.gaps.length>0&&(0,q.jsxs)(`section`,{className:`worklog-gaps`,"aria-labelledby":`gaps-${i.day}`,children:[(0,q.jsx)(`h3`,{id:`gaps-${i.day}`,children:`Coverage`}),(0,q.jsx)(`ul`,{children:i.gaps.map((e,t)=>(0,q.jsx)(`li`,{children:e},t))})]}),(0,q.jsx)(tG,{title:`Work items`,events:i.work,none:`No status changes, sprint changes or new blockers recorded.`}),(0,q.jsx)(tG,{title:`Pull requests`,events:i.prs,none:`No pull requests opened, reviewed, merged or declined.`}),(0,q.jsx)(tG,{title:`Builds and deployments`,events:i.delivery,none:`No builds or deployments failed or recovered.`}),(0,q.jsxs)(`section`,{className:`worklog-section`,children:[(0,q.jsx)(`h3`,{children:`Agent runs`}),i.agents.length?(0,q.jsx)(`ul`,{className:`rows worklog-lines`,children:i.agents.map(e=>(0,q.jsx)(nG,{line:e},e.run.id))}):(0,q.jsx)(`p`,{className:`note`,children:`No agent runs.`})]}),(0,q.jsx)(iG,{api:e,data:t,today:n,onChange:r}),(0,q.jsxs)(`section`,{className:`worklog-section`,children:[(0,q.jsx)(`h3`,{children:`Sources`}),i.sources.length?(0,q.jsx)(`ul`,{className:`plain`,children:i.sources.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`code`,{children:e.area}),`: `,e.syncs?`${XW(e.syncs,`sync`)} this day${e.failed?`, ${e.failed} failed`:``}, the last at ${pW(e.last)} UTC`:`no sync this day`]},e.area))}):(0,q.jsx)(`p`,{className:`note`,children:`No syncs recorded.`})]}),(0,q.jsxs)(`div`,{className:`worklog-actions`,children:[(0,q.jsx)(W,{className:`btn`,"data-worklog-rebuild":``,isDisabled:s,onPress:()=>void l(),children:`Rebuild this day`}),(0,q.jsx)(`a`,{className:`btn`,href:Ag(i.dossier,{from:i.day,to:i.day}),children:`Stand-up for this day`}),a&&(0,q.jsx)(`p`,{role:`status`,className:`note`,children:a})]}),(0,q.jsx)(aG,{api:e,dossier:i.dossier,day:i.day}),(0,q.jsxs)(`details`,{className:`worklog-md`,children:[(0,q.jsx)(`summary`,{children:`The page as Markdown`}),(0,q.jsx)(`pre`,{role:`region`,"aria-label":`The page as Markdown`,tabIndex:0,children:(0,q.jsx)(`code`,{children:t.markdown})})]})]})}function iG({api:e,data:t,today:n,onChange:r}){let{page:i}=t,[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(null),l=i.day===n,u=async t=>{t.preventDefault(),c(null);try{r(await e.addNote(i.dossier,a)),o(``)}catch(e){c(e instanceof Error?e.message:String(e))}};return(0,q.jsxs)(`section`,{className:`worklog-section`,children:[(0,q.jsx)(`h3`,{children:`Notes`}),i.notes.length?(0,q.jsx)(`ul`,{className:`rows worklog-lines`,children:i.notes.map(e=>(0,q.jsxs)(`li`,{className:`worklog-line`,children:[(0,q.jsx)(`time`,{dateTime:e.at,children:pW(e.at)}),` `,(0,q.jsxs)(`span`,{children:[(0,q.jsxs)(`span`,{className:`by`,children:[e.by,`:`]}),` `,e.text]})]},e.id))}):(0,q.jsx)(`p`,{className:`note`,children:`No notes.`}),l&&(e.disabled?(0,q.jsx)(`p`,{className:`note`,children:e.disabled}):(0,q.jsxs)(so,{className:`worklog-note`,onSubmit:e=>void u(e),children:[(0,q.jsxs)(Yp,{className:`field-text field-text--area`,value:a,onChange:o,maxLength:2e3,children:[(0,q.jsx)(va,{children:`Add a note to today's page`}),(0,q.jsx)(qp,{rows:2})]}),(0,q.jsx)(W,{type:`submit`,className:`btn`,isDisabled:!a.trim(),children:`Add the note`}),s&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:s})]}))]})}function aG({api:e,dossier:t,day:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(`day`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=async i=>{i.preventDefault(),u(!0),c(null);let o=a===`day`?{day:n}:{month:aW(n)};try{c({ok:!0,value:await e.exportTo(t,o,r)})}catch(e){c(JW(e))}finally{u(!1)}};return(0,q.jsxs)(`section`,{className:`worklog-section`,"aria-labelledby":`worklog-export`,children:[(0,q.jsx)(`h3`,{id:`worklog-export`,children:`Export and publish`}),(0,q.jsx)(`p`,{className:`note`,children:`Export writes the Markdown to a new file in a folder you name, through toil's own file service. Publishing it to Confluence or GitHub is then a proposal, for you to run through toil's write gate.`}),e.disabled?(0,q.jsx)(`p`,{className:`note`,children:e.disabled}):(0,q.jsxs)(so,{className:`worklog-export`,onSubmit:e=>void d(e),children:[(0,q.jsxs)(Bf,{className:`shells`,orientation:`horizontal`,value:a,onChange:e=>o(e),children:[(0,q.jsx)(va,{children:`Export`}),(0,q.jsx)(Vf,{value:`day`,className:`shell-choice`,children:`This day`}),(0,q.jsx)(Vf,{value:`month`,className:`shell-choice`,children:gW(aW(n))})]}),(0,q.jsxs)(Yp,{className:`field-text`,value:r,onChange:i,isRequired:!0,children:[(0,q.jsx)(va,{children:`Folder, as a full path`}),(0,q.jsx)(jo,{autoComplete:`off`,spellCheck:!1})]}),(0,q.jsx)(W,{type:`submit`,className:`btn`,isDisabled:l||!r.trim(),children:`Export`})]}),s&&(s.ok?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{role:`status`,children:[`toil wrote `,XW(s.value.bytes,`byte`),` to `,(0,q.jsx)(iE,{value:s.value.path,what:`exported file's path`}),`.`]}),s.value.proposals.length?s.value.proposals.map(e=>(0,q.jsx)(AE,{proposal:e},e.id)):(0,q.jsx)(`p`,{className:`note`,children:`This dossier names no Confluence space and no GitHub repository, so there is nowhere to propose publishing it.`})]}):(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:s.message}))]})}var oG=`https://imagile-dev.github.io/toil/about/feedback/`,sG=`This is sample data, so it sends nothing. Toil UI on your own machine sends through toil feedback, or use the form at ${oG}.`;function cG(e){if(!e?.ok)return null;let t=e.data;return typeof t?.disclaimer!=`string`||typeof t.report!=`object`||t.report===null||typeof t.sent!=`boolean`?null:t}function lG(e){let t=e.error;return t?/has no command "feedback"/.test(t.message)?`The toil this Toil UI runs (${e.meta.version}) has no feedback command; it needs a newer toil. Until then, use the form at ${oG}.`:`${t.message}${t.fix?` ${t.fix}`:``}`:`toil returned no report.`}var uG={kind:`bug`,title:``,body:``,email:``},dG=300;function fG({api:e}){return(0,q.jsxs)(lf,{children:[(0,q.jsx)(W,{className:`btn feedback-open`,children:`Feedback`}),(0,q.jsx)(pG,{api:e})]})}function pG({api:e,isOpen:t,onOpenChange:n}){let r=t===void 0?{}:{isOpen:t,...n?{onOpenChange:n}:{}};return(0,q.jsx)(Of,{className:`feedback-overlay`,"data-backdrop":``,isDismissable:!0,...r,children:(0,q.jsx)(Ef,{className:`feedback-modal`,children:(0,q.jsx)(uf,{className:`feedback-dialog`,"aria-labelledby":`feedback-title`,children:({close:t})=>(0,q.jsx)(mG,{api:e,close:t})})})})}function mG({api:e,close:t}){let[n,r]=(0,v.useState)(uG),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)({state:`idle`}),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(null),f=(0,v.useRef)(null),p=n.title.trim()!==``&&n.body.trim()!==``&&n.email.trim()!==``;(0,v.useEffect)(()=>{if(!p){s({state:`idle`});return}let t=new AbortController;s({state:`loading`});let r=setTimeout(()=>{e.preview(n,t.signal).then(e=>{if(t.signal.aborted)return;let n=cG(e);s(n?{state:`ready`,data:n}:{state:`problem`,message:lG(e)})},e=>!t.signal.aborted&&s({state:`problem`,message:e instanceof Error?e.message:String(e)}))},dG);return()=>{clearTimeout(r),t.abort()}},[e,n,p]),(0,v.useEffect)(()=>{u?.ok&&f.current?.focus()},[u]);let m=e=>{r(t=>({...t,...e})),a(!1),d(null)},h=o.state===`ready`?o.data:null,g=h!==null&&i&&!c&&e.disabled===null;return u?.ok?(0,q.jsxs)(`div`,{className:`feedback-body`,children:[(0,q.jsx)(ja,{slot:`title`,level:2,id:`feedback-title`,children:`Feedback sent`}),(0,q.jsx)(`p`,{ref:f,tabIndex:-1,role:`status`,children:u.message}),(0,q.jsx)(`p`,{className:`note`,children:`It becomes a public GitHub issue in imagile-dev/toil, and the email address you gave hears when it is filed and when it closes.`}),(0,q.jsx)(`div`,{className:`feedback-actions`,children:(0,q.jsx)(W,{className:`btn btn--accent`,onPress:t,children:`Close`})})]}):(0,q.jsxs)(`form`,{className:`feedback-body`,onSubmit:async t=>{if(t.preventDefault(),g){l(!0);try{let t=await e.send(n),r=cG(t);d(r?.sent?{ok:!0,message:r.message??`Sent.`}:{ok:!1,message:r?`toil sent nothing: the report was not approved.`:lG(t)})}catch(e){d({ok:!1,message:e instanceof Error?e.message:String(e)})}finally{l(!1)}}},noValidate:!0,children:[(0,q.jsx)(ja,{slot:`title`,level:2,id:`feedback-title`,children:`Send feedback to Imagile`}),(0,q.jsxs)(`p`,{className:`note`,children:[`A bug report or a feature request, sent through `,(0,q.jsx)(`code`,{children:`toil feedback`}),`. Only what you type below is sent, with toil's version and commit.`]}),(0,q.jsxs)(Bf,{className:`shells`,orientation:`horizontal`,value:n.kind,onChange:e=>m({kind:e}),children:[(0,q.jsx)(va,{className:`feedback-label`,children:`Kind`}),(0,q.jsx)(Vf,{value:`bug`,className:`shell-choice`,children:`Bug report`}),(0,q.jsx)(Vf,{value:`feature`,className:`shell-choice`,children:`Feature request`})]}),(0,q.jsxs)(Yp,{className:`field-text`,value:n.title,onChange:e=>m({title:e}),maxLength:120,isRequired:!0,children:[(0,q.jsx)(va,{className:`feedback-label`,children:`Title`}),(0,q.jsx)(jo,{autoComplete:`off`})]}),(0,q.jsxs)(Yp,{className:`field-text feedback-details`,value:n.body,onChange:e=>m({body:e}),maxLength:4e3,isRequired:!0,children:[(0,q.jsx)(va,{className:`feedback-label`,children:`Details`}),(0,q.jsx)(qp,{rows:5})]}),(0,q.jsxs)(Yp,{className:`field-text`,type:`email`,value:n.email,onChange:e=>m({email:e}),isRequired:!0,children:[(0,q.jsx)(va,{className:`feedback-label`,children:`Your email, kept private`}),(0,q.jsx)(jo,{autoComplete:`email`,spellCheck:!1})]}),(0,q.jsxs)(`section`,{className:`feedback-preview`,"aria-labelledby":`feedback-preview-title`,children:[(0,q.jsx)(`h3`,{id:`feedback-preview-title`,children:`Exactly what will be sent`}),(0,q.jsxs)(`div`,{"aria-live":`polite`,children:[o.state===`idle`&&(0,q.jsx)(`p`,{className:`note`,children:`Fill in the title, details and email to see the report.`}),o.state===`loading`&&(0,q.jsx)(`p`,{className:`note`,children:`Asking toil for the report…`}),o.state===`problem`&&(0,q.jsx)(`p`,{className:`failure`,children:o.message}),h&&(0,q.jsxs)(`p`,{className:`note`,children:[`To `,(0,q.jsx)(`code`,{children:h.endpoint}),`:`]})]}),h&&(0,q.jsx)(`pre`,{className:`feedback-report`,tabIndex:0,"aria-label":`The report, as toil would send it`,children:JSON.stringify(h.report,null,2)})]}),h&&(0,q.jsxs)(`div`,{className:`feedback-consent`,children:[(0,q.jsx)(`p`,{id:`feedback-disclaimer`,className:`feedback-disclaimer`,children:h.disclaimer}),(0,q.jsxs)(Eo,{className:`check`,isSelected:i,onChange:a,isRequired:!0,"aria-describedby":`feedback-disclaimer`,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:i?`✓`:``}),`I have removed company data from this report and agree to send it to Imagile LLC.`]})]}),e.disabled&&(0,q.jsxs)(`p`,{className:`config-off`,children:[(0,q.jsx)(`strong`,{children:`Sending is turned off.`}),` `,e.disabled]}),u&&!u.ok&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:u.message}),(0,q.jsxs)(`div`,{className:`feedback-actions`,children:[(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,isDisabled:!g,children:c?`Sending…`:`Send`}),(0,q.jsx)(W,{className:`btn`,onPress:t,children:`Cancel`})]})]})}function hG(e,t){let n={started:0,answered:0,reading:null},r=[];return async(i,a,o)=>{n.started++,r.push(i),t({...n,reading:i});try{return await e(i,a,o)}finally{n.answered++,r.splice(r.indexOf(i),1),t({...n,reading:r.at(-1)??i})}}}function gG(e){return!e||!e.started?null:`${e.answered} of ${e.started} toil ${e.started===1?`call`:`calls`} answered${e.reading&&e.answered<e.started?`; reading toil ${e.reading}`:``}.`}function _G(e){return e?`Syncing ${e.dossier??`the dossiers`}: ${e.dossiersDone} of ${e.dossiersTotal||`?`} dossiers, ${e.requests} requests, ${e.pages} pages${e.retries?`, ${e.retries} retries`:``}.`:null}var vG=/[\s\-_/.:#()]/;function yG(e,t){let n=t.indexOf(e);if(n>=0)return 100+e.length*10+(n===0?50:vG.test(t[n-1])?30:0)-Math.min(n,20);let r=0,i=0,a=-2;for(let n of e){let e=t.indexOf(n,i);if(e<0)return null;r+=1+(e===a+1?5:0)+(e===0||vG.test(t[e-1])?8:0),a=e,i=e+1}return r-Math.min(t.indexOf(e[0]),20)/4}function bG(e,t){let n=e.toLowerCase().split(/\s+/).filter(Boolean),r=t.toLowerCase(),i=0;for(let e of n){let t=yG(e,r);if(t===null)return null;i+=t}return i}function xG(e,t,n){return e.map((e,r)=>({entry:e,i:r,score:bG(t,n(e))})).filter(e=>e.score!==null).sort((e,t)=>t.score-e.score||e.i-t.i).map(({entry:e,score:t})=>({entry:e,score:t}))}var SG={commands:`Commands`,dossiers:`Dossiers`,tabs:`Tabs`,items:`Items`,analyses:`Analyses`,settings:`Settings`,themes:`Themes`},CG=[`commands`,`dossiers`,`tabs`,`items`,`analyses`,`settings`,`themes`],wG={commands:8,dossiers:8,tabs:10,items:20,analyses:8,settings:8,themes:8};function TG(e){let t=Math.max(1,Math.round(e/6e4));if(t<60)return`${t} minute${t===1?``:`s`}`;let n=Math.round(t/60);return n<48?`${n} hour${n===1?``:`s`}`:`${Math.round(n/24)} days`}function EG(e,t){if(!e)return null;let n=t-Date.parse(e.at);return e.status===`ok`?n>864e5?`cached ${TG(n)} ago`:null:`last sync ${e.status===`partial`?`partly failed`:`failed`}, cached ${TG(n)} ago`}function DG(e){let t=[],n=e.route.view===`dossiers`||e.route.view===`settings`?null:e.route.dossier,r=n?e.loaded[n]:void 0;if(e.onSync&&t.push({id:`cmd:sync`,group:`commands`,label:`Sync now`,detail:`Read every dossier through toil into the cache`,go:{run:e.onSync}}),n&&r?.ok){t.push({id:`cmd:ask`,group:`commands`,label:`Ask about ${n}`,detail:`Focus the Ask bar`,go:{command:{kind:`ask`}}}),t.push({id:`cmd:analyze`,group:`commands`,label:`Analyze ${n}`,detail:`The agent's pulse check of the dossier`,go:{command:{kind:`analyze`}}});let i=e.focused?r.value.items.find(t=>t.id===e.focused):void 0;i&&e.canAssign&&t.push({id:`cmd:assign`,group:`commands`,label:`Assign ${hg(i)} to an agent`,detail:i.title,go:{command:{kind:`assign`,id:i.id}}});for(let n of e.adapters?.options??[]){if(!n.ready)continue;let r=n.model?`${n.label} (${n.model})`:n.label;t.push({id:`cmd:agent:${n.name}`,group:`commands`,label:`Answer with ${r}`,detail:`For this chat, from its next question`,go:{command:{kind:`agent`,name:n.name===e.adapters.chosen?null:n.name,label:r}}})}}e.agentSettings&&t.push({id:`cmd:agent-default`,group:`commands`,label:`Choose the default agent`,detail:`Settings, Agent`,go:{href:`#/settings/agent`}}),t.push({id:`cmd:shortcuts`,group:`commands`,label:`Keyboard shortcuts`,detail:`Press ${uF.shortcuts.keys.join(``)} anywhere`,go:{run:e.openShortcuts}}),t.push({id:`dossier:*`,group:`dossiers`,label:`All dossiers`,go:{href:`#/`}});for(let n of e.dossiers)t.push({id:`dossier:${n}`,group:`dossiers`,label:n,go:{href:bg(n)}});for(let n of e.dossiers)for(let e of IL)t.push({id:`tab:${n}:${e.id}`,group:`tabs`,label:e.label,detail:n,text:`${e.label} ${n}`,go:{href:e.href(n)}});for(let n of e.dossiers){let r=e.loaded[n];if(!r?.ok)continue;let i=EG(e.synced?.[n],e.at);for(let e of r.value.items){let r=e.status??Ig[e.statusCategory];t.push({id:`item:${n}:${e.id}`,group:`items`,label:`${hg(e)} ${e.title}`,detail:[n,r,i].filter(Boolean).join(` · `),go:{href:xg(n,e.id)}})}}for(let n of e.dossiers)for(let r of e.analyses[n]??[])t.push({id:`analysis:${n}:${r.id}`,group:`analyses`,label:`Analysis of ${n}, ${Y(r.at)}`,...r.recommendation?{detail:r.recommendation}:{},text:`analysis ${n} ${Y(r.at)} ${r.recommendation??``}`,go:{href:Og(n,r.id)}});for(let e of JH)t.push({id:`settings:${e.page}`,group:`settings`,label:e.label,detail:`Settings`,text:`settings ${e.label}`,go:{href:`#/settings/${e.page}`}});for(let n of e.themes)t.push({id:`theme:${n.name}`,group:`themes`,label:`${n.label} theme`,...n.name===e.currentTheme?{detail:`The theme now`}:{},go:{run:()=>e.setTheme(n.name)}});return t}function OG(e,t,n){let r=t.trim();if(!r){let t=e.filter(e=>e.group!==`items`&&e.group!==`analyses`&&(e.group!==`tabs`||e.detail===n));return CG.map(e=>({group:e,entries:t.filter(t=>t.group===e)})).filter(e=>e.entries.length)}let i=xG(e,r,e=>e.text??e.label);return CG.map(e=>{let t=i.filter(t=>t.entry.group===e).slice(0,wG[e]);return{group:e,best:t[0]?.score??-1/0,entries:t.map(e=>e.entry)}}).filter(e=>e.entries.length).sort((e,t)=>t.best-e.best).map(({group:e,entries:t})=>({group:e,entries:t}))}var kG=e=>requestAnimationFrame(()=>requestAnimationFrame(e));function AG({isOpen:e,onOpenChange:t,agent:n,analysesApi:r,reading:i,...a}){let[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)({}),[f,p]=(0,v.useState)(0),m=a.dossiers.join(`
56
+ `)};gB.length,gB.map(e=>_B[e.key]?{...e,fields:{...e.fields,customfield_10500:_B[e.key]}}:e);var vB=gB.map(e=>e.key),yB={self:`https://jira.imagile.dev/rest/api/2/user?username=jsmith`,name:`jsmith`,key:`jsmith`,displayName:`J. Smith`,active:!0},bB=(e,t,n,r)=>({id:String(e),author:yB,created:t,items:[{field:`status`,fieldtype:`jira`,from:n[0],fromString:n[1],to:r[0],toString:r[1]}]}),xB={"PAY-106":[bB(40501,`2026-10-06T09:30:00.000+0000`,[`10000`,`To Do`],[`3`,`In Progress`]),bB(40502,`2026-10-07T12:00:00.000+0000`,[`3`,`In Progress`],[`10001`,`Done`])]},SB=Object.fromEntries(vB.map(e=>[e,hB(`jira issue history`).find(t=>t.key===e)?.history.data??xB[e]??[]]));mB(`ado work-item iterations`);var CB=mB(`ado work-item get-many`).value.map(e=>e.id),wB=`https://ado.imagile.dev/DefaultCollection`;`${wB}`,CB.map(e=>({id:e,url:`${wB}/_apis/wit/workItems/${e}`}));var TB=new Map(fB.filter(e=>!pB(e)&&e.meta?.command===`ado work-item history`).map(e=>[e.data[0].id,e.data])),EB=(e,t)=>({displayName:t,id:`abc12345-0000-0000-0000-0000000000${e.length}0`,uniqueName:`IMAGILE\\${e}`}),DB=EB(`knakamura`,`K. Nakamura`),OB=EB(`dokafor`,`D. Okafor`),kB=(e,t,n,r,i,a,o)=>({id:e,rev:t,fields:{"System.WorkItemType":i,"System.State":a,"System.IterationPath":o,"System.ChangedDate":n,"System.ChangedBy":r},url:`${wB}/_apis/wit/workItems/${e}/revisions/${t}`}),AB=`Payments`,jB=`Payments\\Sprint 42`,MB={2301:[kB(2301,1,`2026-08-24T14:00:00Z`,DB,`Feature`,`New`,AB),kB(2301,2,`2026-10-05T09:30:00Z`,DB,`Feature`,`Active`,AB)],2303:[kB(2303,1,`2026-09-10T10:05:00Z`,DB,`User Story`,`New`,AB),kB(2303,2,`2026-09-30T15:00:00Z`,DB,`User Story`,`New`,jB)],2305:[kB(2305,1,`2026-10-05T10:00:00Z`,OB,`Task`,`New`,jB),kB(2305,2,`2026-10-06T09:00:00Z`,OB,`Task`,`Active`,jB),kB(2305,3,`2026-10-08T13:00:00Z`,OB,`Task`,`Closed`,jB)],2307:[kB(2307,1,`2026-09-01T09:00:00Z`,DB,`Bug`,`New`,AB),kB(2307,2,`2026-09-30T15:00:00Z`,DB,`Bug`,`New`,jB),kB(2307,3,`2026-10-07T09:00:00Z`,DB,`Bug`,`Removed`,jB)]},NB=Object.fromEntries(CB.map(e=>[e,TB.get(e)??MB[e]])),PB=mB(`github project items`).map(e=>e.content.number);mB(`github issue get`);var FB=Object.fromEntries(PB.map(e=>[e,hB(`github issue history`).find(t=>t.key===String(e))?.history.data??[]])),IB=(e,t,n,r)=>({self:`https://jira.imagile.dev/rest/api/2/status/${t}`,name:e,id:t,statusCategory:{id:n===`new`?2:n===`done`?3:4,key:n,name:r}}),LB={progress:IB(`In Progress`,`3`,`indeterminate`,`In Progress`),review:IB(`In Review`,`10100`,`indeterminate`,`In Progress`),done:IB(`Done`,`10001`,`done`,`Done`),todo:IB(`To Do`,`10000`,`new`,`To Do`)},RB={"To Do":[{id:`11`,name:`Start Progress`,to:LB.progress}],"In Progress":[{id:`21`,name:`Submit for Review`,to:LB.review},{id:`31`,name:`Done`,to:LB.done},{id:`41`,name:`Stop Progress`,to:LB.todo}],"In Review":[{id:`31`,name:`Done`,to:LB.done},{id:`51`,name:`Back to In Progress`,to:LB.progress}]},zB=e=>String(e.fields?.status?.name??``),BB=Object.fromEntries(gB.filter(e=>zB(e)!==`Done`).map(e=>[e.key,RB[zB(e)]??[]])),VB=[{name:`New`,color:`b2b2b2`,category:`Proposed`},{name:`Active`,color:`007acc`,category:`InProgress`},{name:`Resolved`,color:`ff9d00`,category:`Resolved`},{name:`Closed`,color:`339933`,category:`Completed`},{name:`Removed`,color:`ffffff`,category:`Removed`}],HB={"User Story":VB,Bug:VB,Feature:VB},UB=`2026-10-13T08:00:00.000Z`,WB=`card-payments`,GB=`settlement`,KB=`checkout-web`,qB=(e,t,n)=>({dossier:e,area:t,...n?{env:n}:{}}),JB=(e,t,n,r)=>Object.entries(r).map(([r,i])=>({command:`${t} pr get`,input:{dossier:e,[n]:Number(r),include:vS},data:i,...qB(e,t)}));[mz(),...cz.map(e=>({command:`dossiers show`,input:{dossier:e.name},data:pz(e)})),(sS(`PAY`),{...qB(WB,`jira`)}),...vB.map(e=>({command:`jira issue history`,input:{dossier:WB,key:e},data:SB[e],...qB(WB,`jira`)})),...Object.entries(BB).map(([e,t])=>({command:`jira issue transitions`,input:{dossier:WB,key:e},data:t,...qB(WB,`jira`)})),{...qB(WB,`bitbucket`)},...JB(WB,`bitbucket`,`id`,fR),...Object.entries($R).map(([e,t])=>({command:`jenkins pipeline runs`,input:{dossier:WB,name:`payments-core/PR-${e}`,limit:5},data:t,...qB(WB,`jenkins`)})),(nz[`payments-dev`],{...qB(WB,`openshift`,`dev`)}),(nz[`payments-prod`],{...qB(WB,`openshift`,`prod`)}),{...qB(GB,`ado`)},{...qB(GB,`ado`)},{...qB(GB,`ado`)},...CB.map(e=>({command:`ado work-item history`,input:{dossier:GB,id:e},data:NB[e],...qB(GB,`ado`)})),...Object.entries(HB).map(([e,t])=>({command:`ado work-item states`,input:{dossier:GB,type:e},data:t,...qB(GB,`ado`)})),{...qB(GB,`ado`)},...JB(GB,`ado`,`id`,SR),{...qB(GB,`ado`)},{...qB(GB,`ado`)},{...qB(KB,`github`)},{...qB(KB,`github`)},...PB.map(e=>({command:`github issue history`,input:{dossier:KB,number:e},data:FB[e],...qB(KB,`github`)})),{...qB(KB,`github`)},...JB(KB,`github`,`number`,PR),(bS[0],{...qB(KB,`github`)}),{...qB(KB,`bitbucket-cloud`)},...JB(KB,`bitbucket-cloud`,`id`,WR),(nz[`checkout-staging`],{...qB(KB,`openshift`,`staging`)}),(nz[`checkout-prod`],{...qB(KB,`openshift`,`prod`)})];function YB(e){let t=e.installed?`${e.package} ${e.version??``} is installed beside Toil UI`.replace(` `,` `):`${e.package} isn't installed beside Toil UI; Toil UI was tested with ${e.tested}`,n=e.cli.path?`It would start ${e.cli.path}`:`${e.cli.problem??`Its CLI was not found.`}${e.cli.fix?` ${e.cli.fix}`:``}`;return[`${t}.`,n.endsWith(`.`)?n:`${n}.`,...e.notes]}function XB({adapters:e,client:t,onInstalled:n}){let[r,i]=(0,v.useState)(null);return(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`agent-adapters`,children:[(0,q.jsx)(`h2`,{id:`agent-adapters`,children:`Adapters on this machine`}),(0,q.jsx)(`p`,{className:`note`,children:`Each adapter needs its SDK beside Toil UI and its own CLI on this machine. Install runs one npm command, shown to you first, at the version Toil UI was tested with.`}),(0,q.jsx)(`ul`,{className:`adapter-status`,children:e.map(e=>{let t=e.installed&&e.cli.path!==null;return(0,q.jsxs)(`li`,{className:`adapter-status__row`,"data-adapter":e.name,children:[(0,q.jsxs)(`div`,{className:`adapter-status__head`,children:[(0,q.jsx)(`strong`,{children:e.label}),(0,q.jsx)(`span`,{className:t?`agent-pick__ready`:`agent-missing`,children:t?`Ready`:e.installed?`Needs a fix`:`Not installed`})]}),YB(e).map((t,n)=>(0,q.jsx)(`p`,{className:n===1&&!e.cli.path?`agent-missing`:`note`,children:t},n)),!e.installed&&(0,q.jsx)(`div`,{className:`proposal-actions`,children:(0,q.jsxs)(W,{className:`btn btn--accent`,onPress:()=>i(e),"data-install":e.name,children:[`Install `,e.label]})})]},e.name)})}),r&&(0,q.jsx)(ZB,{adapter:r,plan:r.install,client:t,onClose:()=>i(null),onInstalled:e=>{n?.(e)}})]})}function ZB({adapter:e,plan:t,client:n,onClose:r,onInstalled:i}){let[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(`ready`),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(``),p=(0,v.useRef)(null),m=t.argv!==null&&n!==null,h=async()=>{if(!n)return;c(`running`),o([]),u(``);let r=new AbortController;p.current=r;try{let a=await n.install(e.name,t.command,e=>o(t=>[...t.slice(-400),e]),r.signal);c(`done`),u(`Installed ${e.package} ${a.version??``}, and Toil UI loaded it.${a.cli.path?` ${e.label} is ready.`:` ${a.cli.problem??``} ${a.cli.fix??``}`}`.replace(/\s+/g,` `).trim()),i(a)}catch(e){c(`failed`),u(e instanceof Error?e.message:String(e))}},g=async()=>{try{await navigator.clipboard.writeText(t.command),f(`Copied the command.`)}catch{f(`Copying was refused here; select the command above and copy it yourself.`)}};return(0,q.jsx)(Of,{className:`feedback-overlay`,"data-backdrop":``,isDismissable:s!==`running`,isOpen:!0,onOpenChange:e=>!e&&r(),children:(0,q.jsx)(Ef,{className:`feedback-modal`,children:(0,q.jsx)(uf,{className:`feedback-dialog`,"aria-labelledby":`install-title`,children:(0,q.jsxs)(`div`,{className:`feedback-body`,children:[(0,q.jsxs)(ja,{slot:`title`,id:`install-title`,children:[`Install `,e.label,`'s SDK`]}),(0,q.jsxs)(`p`,{children:[`Toil UI runs this one command, through the npm that came with your Node and with your own npm config, so your organization's registry and proxy apply. It installs `,e.package,` `,e.tested,`, the version Toil UI was tested with, beside Toil UI, runs no install scripts, and takes nothing published in the last 14 days.`]}),(0,q.jsx)(`pre`,{className:`install-command`,"data-scroller":``,tabIndex:0,role:`region`,"aria-label":`The command`,children:t.command}),t.folder&&(0,q.jsxs)(`p`,{className:`note`,children:[`It installs into `,t.folder,`.`]}),t.problem&&(0,q.jsxs)(`p`,{className:`failure`,children:[t.problem,` `,t.fix]}),!n&&(0,q.jsx)(`p`,{className:`config-off`,children:`This is the preview, so nothing is installed. Toil UI on your own machine runs this command when you press Install.`}),a.length>0&&(0,q.jsx)(`pre`,{className:`install-output`,"data-scroller":``,tabIndex:0,role:`log`,"aria-label":`npm's output`,children:a.join(`
57
+ `)}),l&&(0,q.jsx)(`p`,{role:s===`failed`?`alert`:`status`,className:s===`failed`?`failure`:`note`,children:l}),(0,q.jsxs)(`div`,{className:`proposal-actions`,children:[m&&s!==`done`&&(0,q.jsx)(W,{className:`btn btn--accent`,onPress:()=>void h(),isDisabled:s===`running`,"data-install-run":``,children:s===`running`?`Installing…`:s===`failed`?`Try again`:`Install`}),(0,q.jsx)(W,{className:`btn`,onPress:()=>void g(),"data-install-copy":``,children:`Copy command`}),s===`running`?(0,q.jsx)(W,{className:`btn`,onPress:()=>p.current?.abort(),children:`Stop`}):(0,q.jsx)(W,{className:`btn`,slot:`close`,children:s===`done`?`Done`:`Cancel`}),(0,q.jsx)(`span`,{className:`note`,role:`status`,children:d})]})]})})})})}var QB={claude:[`@anthropic-ai/claude-agent-sdk@0.3.289`,`zod@4.6.5`],copilot:[`@github/copilot-sdk@1.0.16`],codex:[`@openai/codex-sdk@0.160.0`]},$B=e=>new Date(Date.parse(e)-12096e5).toISOString().slice(0,10),eV=e=>QB[e][0].slice(QB[e][0].lastIndexOf(`@`)+1),tV=`/home/you/.npm-global`,nV=`npm install --global --prefix ${tV} --ignore-scripts --before=${$B(UB)} --no-audit --no-fund --omit=optional ${QB.claude.join(` `)}`,rV=[{name:`claude`,label:`Claude`,package:`@anthropic-ai/claude-agent-sdk`,installed:!1,version:null,tested:eV(`claude`),cli:{path:`/home/you/.local/bin/claude`,problem:null,fix:null},endpoints:[`anthropic`,`bedrock`,`foundry`,`vertex`],model:`haiku`,install:{adapter:`claude`,kind:`global`,folder:tV,command:nV,argv:null,problem:null,fix:null},notes:[]},{name:`copilot`,label:`GitHub Copilot`,package:`@github/copilot-sdk`,installed:!0,version:eV(`copilot`),tested:eV(`copilot`),cli:{path:`C:\\Users\\you\\AppData\\Roaming\\npm\\node_modules\\@github\\copilot\\npm-loader.js`,problem:null,fix:null},endpoints:[],model:null,install:{adapter:`copilot`,kind:`global`,folder:tV,command:nV.replace(QB.claude.join(` `),QB.copilot.join(` `)),argv:null,problem:null,fix:null},notes:[`copilot.cmd on PATH is an npm shim the SDK can't start, so Toil UI starts the script it runs, C:\\Users\\you\\AppData\\Roaming\\npm\\node_modules\\@github\\copilot\\npm-loader.js, with Node.`]},{name:`codex`,label:`Codex`,package:`@openai/codex-sdk`,installed:!0,version:eV(`codex`),tested:eV(`codex`),cli:{path:`/usr/local/bin/codex`,problem:null,fix:null},endpoints:[],model:null,install:{adapter:`codex`,kind:`global`,folder:tV,command:nV.replace(QB.claude.join(` `),QB.codex.join(` `)),argv:null,problem:null,fix:null},notes:[]}],iV={anthropic:`Anthropic API`,bedrock:`Amazon Bedrock`,foundry:`Microsoft Foundry`,vertex:`Google Vertex AI`};function aV(e){return`${e.installed?`${e.package} is installed`:`${e.package} isn't installed`}; ${e.cli.path?`it would start ${e.cli.path}`:e.cli.problem??`its CLI was not found`}`.replace(/\.$/,``)}function oV({client:e,onChange:t,dossier:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let t=!0;return e.status().then(e=>{t&&(i(e),o(e.settings))},e=>t&&c(e instanceof Error?e.message:String(e))),()=>{t=!1}},[e]);let p=async n=>{if(n.preventDefault(),a){f(!0),u(``);try{let n=await e.save({...a,endpoint:a.adapter===`claude`?a.endpoint:null});i(n),o(n.settings),c(null),u(n.settings.adapter===`none`?`Saved: no agent answers.`:`Saved: ${n.adapters.find(e=>e.name===n.settings.adapter)?.label??n.settings.adapter} answers from the next question.`),t?.(n)}catch(e){c(e instanceof Error?e.message:String(e))}finally{f(!1)}}},m=r?.adapters.every(e=>!e.installed),h=async()=>{try{let t=await e.status();i(t)}catch(e){c(e instanceof Error?e.message:String(e))}},g=(e,t)=>e.adapter===t?e.model:e.models[t]??null,_=(e,t,n)=>{let r=n||null,i={...e.models};r?i[t]=r:delete i[t],o({...e,models:i,...e.adapter===t?{model:r}:{}})};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`agent-settings`,children:[(0,q.jsx)(`h2`,{id:`agent-settings`,children:`Agent`}),(0,q.jsx)(`p`,{className:`note`,children:`The agent reasons with the subscription you already have, through its own CLI on this machine. Toil UI never downloads one, stores no keys, and gives the agent read-only tools: anything it suggests changing comes back as a proposal for you to apply.`}),r?.problem&&(0,q.jsx)(`p`,{className:`failure`,children:r.problem}),s&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:s}),!r||!a?!s&&(0,q.jsx)(`p`,{className:`note`,children:`Reading the agent settings…`}):(0,q.jsxs)(`form`,{className:`agent-form`,onSubmit:p,children:[m&&(0,q.jsxs)(`p`,{className:`failure`,children:[`None of the three agent SDKs is installed beside Toil UI: `,r.adapters.map(e=>`${e.label} (${e.package})`).join(`, `),`. Press Install below for the one your organization approves, with its CLI on PATH, and choose it here.`]}),(0,q.jsxs)(Bf,{className:`agent-adapters`,value:a.adapter,onChange:e=>{let t=e;o({...a,adapter:t,model:t===`none`?null:a.models[t]??null,cliPath:t===`none`?null:a.cliPaths[t]??null})},children:[(0,q.jsx)(va,{children:`Adapter`}),(0,q.jsxs)(Vf,{value:`none`,className:`agent-choice`,children:[(0,q.jsx)(`strong`,{children:`None`}),(0,q.jsx)(`span`,{className:`note`,children:`The dashboards only; a chat answers only once it is switched to an adapter.`})]}),r.adapters.map(e=>(0,q.jsxs)(Vf,{value:e.name,className:`agent-choice`,children:[(0,q.jsx)(`strong`,{children:e.label}),(0,q.jsxs)(`span`,{className:e.installed&&e.cli.path?`note`:`agent-missing`,children:[aV(e),`.`]})]},e.name))]}),(0,q.jsxs)(`fieldset`,{className:`agent-models`,children:[(0,q.jsx)(`legend`,{children:`Models, each empty for its CLI's default`}),(0,q.jsx)(`p`,{className:`note`,children:`Each adapter runs with its own, whether it answers by default, in a chat switched to it, or on an assignment.`}),r.adapters.map(e=>(0,q.jsxs)(Yp,{className:`field-text`,value:g(a,e.name)??``,onChange:t=>_(a,e.name,t),children:[(0,q.jsxs)(va,{children:[e.label,`'s model`]}),(0,q.jsx)(jo,{spellCheck:!1,autoComplete:`off`})]},e.name))]}),a.adapter!==`none`&&(0,q.jsxs)(Yp,{className:`field-text`,value:a.cliPath??``,onChange:e=>o({...a,cliPath:e||null,cliPaths:{...a.cliPaths,[a.adapter]:e||void 0}}),children:[(0,q.jsxs)(va,{children:[r.adapters.find(e=>e.name===a.adapter)?.label??a.adapter,`'s CLI path (empty to use the one on PATH)`]}),(0,q.jsx)(jo,{spellCheck:!1,autoComplete:`off`})]}),a.adapter===`claude`&&(0,q.jsxs)(Bf,{className:`shells`,orientation:`horizontal`,value:a.endpoint??``,onChange:e=>o({...a,endpoint:e||null}),children:[(0,q.jsx)(va,{className:`agent-label`,children:`Endpoint`}),(0,q.jsx)(Vf,{value:``,className:`shell-choice`,children:`Claude Code's default`}),(r.adapters.find(e=>e.name===`claude`)?.endpoints??[]).map(e=>(0,q.jsx)(Vf,{value:e,className:`shell-choice`,children:iV[e]??e},e))]}),a.adapter===`claude`&&a.endpoint&&a.endpoint!==`anthropic`&&(0,q.jsx)(`p`,{className:`note`,children:`Claude Code reads that cloud's own region and credentials from its environment, as it does on its own; Toil UI sets only the switch.`}),(0,q.jsxs)(`div`,{className:`proposal-actions`,children:[(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,isDisabled:d,children:`Save`}),(0,q.jsx)(`span`,{className:`note`,role:`status`,children:l})]})]})]}),r&&(0,q.jsx)(XB,{adapters:r.adapters,client:e,onInstalled:()=>void h()}),r&&(0,q.jsx)(cV,{saved:r.settings,save:async t=>{if(!r)throw Error(`The agent settings have not loaded yet.`);let n=await e.save({...r.settings,...t});return i(n),o(e=>e?{...e,instructions:n.settings.instructions,voice:n.settings.voice}:n.settings),n.settings},dossier:n??null,prompt:t=>e.prompt(n,t)})]})}function sV(){return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`agent-settings`,children:[(0,q.jsx)(`h2`,{id:`agent-settings`,children:`Agent`}),(0,q.jsx)(`p`,{className:`note`,children:`The preview answers with a scripted agent. The local app answers with the one your organization approved: Claude (the Claude Agent SDK, on the Anthropic API, Bedrock, Foundry or Vertex), GitHub Copilot (the Copilot SDK) or Codex (the Codex SDK), each through its own CLI on your machine. You choose the adapter, each one's model and the CLI path here; no key is ever stored.`})]}),(0,q.jsx)(XB,{adapters:rV,client:null}),(0,q.jsx)(cV,{saved:{instructions:null,voice:null},dossier:`card-payments`,disabled:`This is the preview, so nothing is saved. Toil UI on your own machine keeps these in its data folder, in agent.json.`,prompt:async(e,t)=>qL(`card-payments`,UB,YL(e,t))})]})}function cV({saved:e,save:t,prompt:n,disabled:r,dossier:i}){let a=JS(),o=QS(),s={theme:a.name,voice:eC(a,o)},[c,l]=(0,v.useState)(e.instructions??``),[u,d]=(0,v.useState)(e.voice??``),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(null),[y,b]=(0,v.useState)(null),x=(0,v.useId)(),S={instructions:c.trim()||null,voice:u.trim()||null},C=(e.instructions??``)!==c.trim()||(e.voice??``)!==u.trim(),w=(0,v.useRef)(!1);w.current=y!==null;let T=t?``:`${S.instructions??``}\u0000${S.voice??``}`;(0,v.useEffect)(()=>{if(!w.current)return;let e=!0;return n(s,S).then(t=>e&&b(t),()=>e&&b(null)),()=>{e=!1}},[s.theme,s.voice,T]);let E=e=>t=>{e(t),h(``)},D=async e=>{if(e.preventDefault(),t){p(!0),h(``);try{let e=await t(S);l(e.instructions??``),d(e.voice??``),_(null),h(`Saved: the next question uses them.`),y!==null&&b(await n(s,e))}catch(e){_(e instanceof Error?e.message:String(e))}finally{p(!1)}}},O=async()=>{if(y!==null)return b(null);try{b(await n(s,S)),_(null)}catch(e){_(e instanceof Error?e.message:String(e))}},k=s.voice?`Themed agent voice is on in ${a.label}, so a custom voice here replaces ${a.label}'s.`:a.voice?`Themed agent voice is off, so a custom voice is not used until you switch it on under Settings, General.`:`${a.label} has no voice, so a custom voice is not used in it. Pick a game theme to use one.`;return(0,q.jsxs)(Q,{as:`section`,className:`panel instructions`,"aria-labelledby":`agent-instructions`,children:[(0,q.jsx)(`h2`,{id:`agent-instructions`,children:`Instructions`}),(0,q.jsx)(`p`,{className:`note`,children:`Your own words for every answer. They come after toil's rules in the prompt, and the rules win where the two disagree: answers still cite their items, give figures as the data has them, and suggest changes only as proposals. Instructions can't widen what the agent can do, since its tools only read.`}),r&&(0,q.jsx)(`p`,{className:`config-off`,children:r}),g&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:g}),(0,q.jsxs)(`form`,{className:`agent-form`,onSubmit:D,children:[(0,q.jsx)(lV,{label:`General instructions`,hint:`For example: answer in British English, or lead with risks.`,value:c,onChange:E(l)}),(0,q.jsx)(lV,{label:`Custom voice`,hint:`Replaces the theme's voice while Themed agent voice is on. ${k}`,value:u,onChange:E(d)}),(0,q.jsxs)(`div`,{className:`proposal-actions`,children:[t&&(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,isDisabled:f||!C,children:`Save`}),(0,q.jsx)(W,{className:`btn`,onPress:()=>void O(),"aria-expanded":y!==null,"aria-controls":y===null?void 0:x,"data-full-prompt":``,children:y===null?`Show the full prompt`:`Hide the full prompt`}),(0,q.jsx)(`span`,{className:`note`,role:`status`,children:m})]})]}),y!==null&&(0,q.jsxs)(`div`,{className:`full-prompt`,children:[(0,q.jsx)(`p`,{className:`note`,children:t?`What the agent is sent now, in this theme, for a question about ${i??`a dossier`}${i?`, the first dossier toil lists`:``}.${C?` Your unsaved changes are not in it until you save.`:``}`:`What the agent would be sent in this theme, for the sample dossier ${i??`card-payments`}.`}),(0,q.jsx)(`pre`,{id:x,className:`full-prompt__text`,tabIndex:0,role:`region`,"aria-label":`The full prompt`,"data-scroller":``,children:y})]})]})}function lV({label:e,hint:t,value:n,onChange:r}){let i=(0,v.useId)();return(0,q.jsxs)(Yp,{className:`field-text field-text--area`,value:n,onChange:r,maxLength:UL,"aria-describedby":`${i}-hint ${i}-count`,children:[(0,q.jsx)(va,{children:e}),(0,q.jsx)(qp,{rows:4,spellCheck:!0}),(0,q.jsx)(`span`,{className:`note`,id:`${i}-hint`,children:t}),(0,q.jsxs)(`span`,{className:`note counter`,id:`${i}-count`,children:[n.length.toLocaleString(`en-GB`),` of `,UL.toLocaleString(`en-GB`),` characters`]})]})}var uV=[`connections list`,`connections test`,`dossiers list`,`dossiers show`,`dossiers check`,`audit stats`,`audit list`,`theme list`],dV=[`connections add`,`connections login`,`connections default`,`connections writes`,`connections remove`,`dossiers init`,`dossiers add-repo`,`dossiers link`,`dossiers field`,`dossiers person`,`dossiers wip-limit`,`dossiers onboard`,`dossiers describe`,`theme set`];[...uV,...dV];function fV(e){if(e.definedIn)return e.definedIn===`env`;let t=Object.values(e.values);return t.length>0&&t.every(e=>e===`env`||e===`ci`)}function pV(e){return`TOIL_CONN_${e.toUpperCase().replace(/-/g,`_`)}_`}function mV(e,t){let n=t.replace(/([a-z0-9])([A-Z])/g,`$1_$2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1_$2`).toUpperCase();return`${pV(e)}${n}`}function hV(e){return e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)}function gV(e){return Array.from(e).length}var _V=(e,t,n=`${t}s`)=>`${e===1?`a`:e} ${e===1?t:n}`;function vV(e,t){if(e===``)return null;let n=(e.match(/\r\n|\r|\n/g)??[]).length,r=(e.match(/ /g)??[]).length,i=(e.match(/\t/g)??[]).length,a=gV(e.replace(/\r\n/g,`
58
+ `));return n===a?_V(n,`${t} newline`):r===a?_V(r,`${t} space`):i===a?_V(i,`${t} tab`):_V(a,`${t} whitespace character`)}var yV=/\s/u,bV=[[`"`,`"`],[`'`,`'`],["`","`"],[`“`,`”`],[`‘`,`’`]],xV=/^(bearer|token)[ \t]+/i;function SV(e){let t=e,n=!1,r=bV.find(([e,n])=>t.length>e.length+n.length&&t.startsWith(e)&&t.endsWith(n));r&&(t=t.slice(r[0].length,t.length-r[1].length),n=!0);let i=xV.exec(t),a=i&&i[0].length<t.length?`${i[1]} `:null;return i&&a&&(t=t.slice(i[0].length)),{inner:t,quoted:n,prefix:a}}function CV(e,t){let n=e.trim();if(n===``)return t.empty===`keep`?{status:`empty`,empty:`keep`,message:`Kept the existing secret.`,fix:null}:t.empty===`skip`?{status:`empty`,empty:`skip`,message:`Nothing was entered, so none is stored.`,fix:null}:{status:`empty`,empty:`required`,message:`Nothing was entered, and this one is required.`,fix:`Paste or type the secret, then press Enter.${t.envVars?.length?` To define this connection with env vars instead, cancel and set ${t.envVars.join(`, `)}.`:``}`};let r=gV(n),i=e.slice(0,e.length-e.trimStart().length),a=e.slice(e.trimEnd().length),o=[vV(i,`leading`),vV(a,`trailing`)].filter(e=>e!==null),s=o.length?o.join(` and `):null,{inner:c,quoted:l,prefix:u}=SV(n),d=/[\r\n]/.test(c),f=!t.password&&[...c].some(e=>yV.test(e));if(d||f){let e=t.password?`password`:`token`;return{status:`refused`,message:d?`This has a line break in the middle, so the paste most likely took two lines. Nothing was stored.`:`This has ${c.includes(` `)?`a tab`:`a space`} in the middle, so the paste most likely took more than the token. Nothing was stored.`,fix:`Copy just the ${e}, on its own, and paste it again.`,length:r}}let p=l&&u?`the quotes and "${u}"`:l?`the quotes`:u?`"${u}"`:null,m=p?{without:c,withoutLength:gV(c),what:p,question:l&&u?`This is in quotes and starts with "${u}". Store it without them? [Y/n]`:l?`This is in quotes. Store it without them? [Y/n]`:`This starts with "${u}". Store it without that? [Y/n]`}:null;return{status:`ok`,value:n,length:r,removed:s,received:wV(r,s),wrapper:m}}function wV(e,t){return`Received ${e} character${e===1?``:`s`}${t?` (removed ${t})`:``}.`}function TV(e,t){return e.ok?{ok:!0,message:t,warnings:(e.meta.warnings??[]).map(e=>e.message)}:{ok:!1,message:e.error.message,fix:e.error.fix??null}}function EV(e){return{ok:!1,message:e instanceof Error?e.message:String(e),fix:null}}function DV({outcome:e}){return e?e.ok?(0,q.jsxs)(`div`,{role:`status`,className:`outcome-line outcome-line--ok`,children:[(0,q.jsx)(`p`,{children:e.message}),e.warnings.length>0&&(0,q.jsx)(`ul`,{className:`plain`,children:e.warnings.map((e,t)=>(0,q.jsx)(`li`,{className:`note`,children:e},t))})]}):(0,q.jsxs)(`div`,{role:`alert`,className:`outcome-line outcome-line--failed failure`,children:[(0,q.jsx)(`p`,{children:e.message}),e.fix&&(0,q.jsxs)(`p`,{className:`note`,children:[`Fix: `,e.fix]})]}):(0,q.jsx)(`div`,{role:`status`,className:`outcome-line`})}function OV(e,t=[]){return[`toil`,e,...t].join(` `)}function kV({title:e,explain:t,runs:n,submit:r,disabled:i,onSubmit:a,children:o,danger:s=!1,titleId:c}){let l=(0,v.useId)(),u=c??l,[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(null);return(0,q.jsxs)(`form`,{className:`change`,"aria-labelledby":c??`${u}-title`,onSubmit:async e=>{if(e.preventDefault(),!(i||d)){f(!0),m(null);try{m(await a())}catch(e){m(EV(e))}finally{f(!1)}}},noValidate:!0,children:[(0,q.jsx)(`h3`,{id:c??`${u}-title`,tabIndex:c?-1:void 0,children:e}),(0,q.jsx)(`p`,{className:`explain`,children:t}),o,(0,q.jsxs)(`p`,{className:`runs`,children:[`Runs `,(0,q.jsx)(`code`,{children:n})]}),(0,q.jsxs)(`div`,{className:`change-actions`,children:[(0,q.jsx)(`button`,{type:`submit`,className:`btn ${s?`btn--danger`:`btn--accent`}`,disabled:i!==null||d,"aria-describedby":i?`${u}-off`:void 0,children:d?`Running…`:r}),i&&(0,q.jsxs)(`span`,{id:`${u}-off`,className:`note`,children:[`Turned off: `,i]})]}),(0,q.jsx)(DV,{outcome:p})]})}function AV({label:e,value:t,onChange:n,hint:r,type:i=`text`,required:a=!1,autoComplete:o=`off`,placeholder:s}){let c=(0,v.useId)();return(0,q.jsxs)(`div`,{className:`field-row`,children:[(0,q.jsxs)(`label`,{htmlFor:c,children:[e,a&&(0,q.jsx)(`span`,{className:`req`,children:` (required)`})]}),(0,q.jsx)(`input`,{id:c,type:i,value:t,onChange:e=>n(e.target.value),"aria-describedby":r?`${c}-hint`:void 0,required:a,autoComplete:o,spellCheck:!1,placeholder:s}),r&&(0,q.jsx)(`p`,{id:`${c}-hint`,className:`note`,children:r})]})}function jV({label:e,value:t,onChange:n,hint:r,rows:i=3}){let a=(0,v.useId)();return(0,q.jsxs)(`div`,{className:`field-row`,children:[(0,q.jsx)(`label`,{htmlFor:a,children:e}),(0,q.jsx)(`textarea`,{id:a,rows:i,value:t,onChange:e=>n(e.target.value),"aria-describedby":r?`${a}-hint`:void 0,spellCheck:!1}),r&&(0,q.jsx)(`p`,{id:`${a}-hint`,className:`note`,children:r})]})}function MV({label:e,value:t,onChange:n,options:r,hint:i}){let a=(0,v.useId)();return(0,q.jsxs)(`div`,{className:`field-row`,children:[(0,q.jsx)(`label`,{htmlFor:a,children:e}),(0,q.jsx)(`select`,{id:a,value:t,onChange:e=>n(e.target.value),"aria-describedby":i?`${a}-hint`:void 0,children:r.map(e=>(0,q.jsx)(`option`,{value:e.value,children:e.label},e.value))}),i&&(0,q.jsx)(`p`,{id:`${a}-hint`,className:`note`,children:i})]})}function NV({label:e,checked:t,onChange:n,hint:r}){let i=(0,v.useId)();return(0,q.jsxs)(`div`,{className:`field-row field-row--check`,children:[(0,q.jsx)(`input`,{id:i,type:`checkbox`,checked:t,onChange:e=>n(e.target.checked),"aria-describedby":r?`${i}-hint`:void 0}),(0,q.jsx)(`label`,{htmlFor:i,children:e}),r&&(0,q.jsx)(`p`,{id:`${i}-hint`,className:`note`,children:r})]})}function PV(e){return e.status===`empty`?e.empty===`keep`?`Empty: the current secret is kept`:e.empty===`required`?`Empty: this one is required`:`Empty: none is stored`:e.status===`refused`?`${e.message} ${e.fix}`:`${e.length} character${e.length===1?``:`s`}${e.removed?` (removed ${e.removed})`:``}`}var FV=e=>e.status===`ok`&&e.wrapper?e.wrapper.question.replace(/ \[Y\/n\]$/,``):null;function IV(e,t,n){if(t.status===`refused`||t.status===`empty`&&t.empty===`required`)return{ok:!1,message:`${e}: ${t.message}`,fix:t.fix};let r=FV(t);return r&&!n?{ok:!1,message:`${e}: ${r}`,fix:`Choose Remove it or Keep it under ${e}, then save again.`}:null}function LV({label:e,value:t,onChange:n,rules:r,asking:i,kept:a,onKeep:o,hint:s}){let c=(0,v.useId)(),l=CV(t,r),u=FV(l);return(0,q.jsxs)(`div`,{className:`field-row`,children:[(0,q.jsxs)(`label`,{htmlFor:c,children:[e,r.empty===`required`&&(0,q.jsx)(`span`,{className:`req`,children:` (required)`})]}),(0,q.jsx)(`input`,{id:c,type:`password`,value:t,onChange:e=>n(e.target.value),onPaste:e=>{let t=e.clipboardData.getData(`text`);if(!/[\r\n]/.test(t))return;e.preventDefault();let r=e.currentTarget,i=r.selectionStart??r.value.length,a=r.selectionEnd??i;n(r.value.slice(0,i)+t+r.value.slice(a))},"aria-describedby":`${c}-count${s?` ${c}-hint`:``}`,required:r.empty===`required`,autoComplete:`new-password`,spellCheck:!1}),(0,q.jsx)(`p`,{id:`${c}-count`,className:`note${l.status===`refused`?` failure`:``}`,"aria-live":`polite`,children:PV(l)}),i&&u&&!a&&(0,q.jsxs)(`div`,{className:`secret-ask`,role:`group`,"aria-label":`${e}: ${u}`,children:[(0,q.jsx)(`p`,{children:u}),(0,q.jsxs)(`div`,{className:`change-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`btn btn--small`,onClick:()=>l.status===`ok`&&l.wrapper&&n(l.wrapper.without),children:`Remove it`}),(0,q.jsx)(`button`,{type:`button`,className:`btn btn--small btn--quiet`,onClick:o,children:`Keep it`})]})]}),s&&(0,q.jsx)(`p`,{id:`${c}-hint`,className:`note`,children:s})]})}var RV={env:`env var`,ci:`CI variable`,file:`config file`,store:`credential store`,defaults:`area defaults`};function zV(e){return e.ok?{ok:!0,data:e.data,warnings:(e.meta.warnings??[]).map(e=>e.message)}:{ok:!1,message:`${e.error.message}${e.error.fix?` ${e.error.fix}`:``}`}}function BV({config:e,at:t,toForm:n=!1}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),s=(0,v.useCallback)(async()=>{try{i(zV(await e.run(`connections list`,{})))}catch(e){i({ok:!1,message:e instanceof Error?e.message:String(e)})}},[e]);if((0,v.useEffect)(()=>{s(),e.areas().then(o,()=>o([]))},[e,s]),Vw(n?`conn-add`:t?`conn-${t}`:null,!!r),!r)return(0,q.jsx)(FA,{size:`panel`,message:`Reading your connections with toil connections list…`});if(!r.ok)return(0,q.jsx)(`div`,{role:`alert`,className:`failure`,children:(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`code`,{children:`toil connections list`}),` failed: `,r.message]})});let{data:c}=r;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`conn-list`,children:[(0,q.jsx)(`h2`,{id:`conn-list`,children:`Your connections`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`From `,(0,q.jsx)(`code`,{children:`toil connections list`}),`. Changes are written to `,(0,q.jsx)(aE,{value:c.configFile,what:`config file path`}),`. `,(0,q.jsx)(Iw,{topic:`connections`})]}),t&&!c.connections.some(e=>e.name===t)&&(0,q.jsxs)(`p`,{role:`status`,className:`failure`,children:[`toil has no connection named `,(0,q.jsx)(`code`,{children:t}),`. It may have been removed or renamed; add it again below.`]}),c.connections.length===0?(0,q.jsx)(`p`,{children:`toil has no connections yet. Add one below.`}):(0,q.jsx)($T,{min:`lg`,className:`conn-cards`,children:c.connections.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsx)(VV,{connection:t,areas:a??[],config:e,configFile:c.configFile,onChanged:s})},t.name))})]}),(0,q.jsx)(KV,{areas:a,config:e,onChanged:s})]})}function VV({connection:e,areas:t,config:n,configFile:r,onChanged:i}){let[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=fV(e),f=`conn-${e.name}`,p=t.find(t=>t.name===e.area)?.connection.filter(e=>e.secret)??[],m=async()=>{u(!0),c(null);try{let t=await n.run(`connections test`,{name:e.name}),r=t.ok?t.data:null,i=r?r.live?`${e.name} answered ${r.request??`its check`}${r.authenticated?`, so its credential works.`:`, but that read needs no credential, so it shows only that the host answers.`}`:`toil has no live check for ${e.area} connections, so nothing was sent; the settings are complete and the secret was read.`:``;c(TV(t,i))}catch(e){c(EV(e))}finally{u(!1)}},h=e=>o(t=>t===e?null:e),g=async(e,t)=>{let n=TV(e,t);return n.ok&&await i(),n};return(0,q.jsxs)(Q,{className:`conn-card`,"aria-labelledby":f,children:[(0,q.jsxs)(`div`,{className:`conn-head`,children:[(0,q.jsx)(`h3`,{id:f,tabIndex:-1,children:(0,q.jsx)(`code`,{children:e.name})}),(0,q.jsxs)(`ul`,{className:`conn-tags`,"aria-label":`About this connection`,children:[(0,q.jsx)(`li`,{className:`tag`,children:e.area}),e.isDefault&&(0,q.jsxs)(`li`,{className:`tag tag--accent`,children:[e.area,`'s default`]}),(0,q.jsxs)(`li`,{className:`tag ${e.writes?`tag--warn`:``}`,children:[`Writes `,e.writes?`on`:`off`]}),d&&(0,q.jsx)(`li`,{className:`tag`,children:`Set by env vars`})]})]}),(0,q.jsxs)(`dl`,{className:`facts`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Host`}),(0,q.jsx)(`dd`,{children:e.host??`None set`})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:`Values from`}),(0,q.jsx)(`dd`,{children:Object.keys(e.values).length===0?`Nothing beyond its area`:Object.entries(e.values).map(([e,t])=>`${e}: ${RV[t]??t}`).join(`, `)})]})]}),d&&(0,q.jsxs)(`p`,{className:`note`,children:[`Made by env vars alone (`,(0,q.jsxs)(`code`,{children:[pV(e.name),`*`]}),`, or `,e.area,`'s own `,(0,q.jsxs)(`code`,{children:[`TOIL_`,e.area.toUpperCase().replace(/-/g,`_`),`_*`]}),` and CI variables), not by `,(0,q.jsx)(`code`,{children:r}),`. toil's commands can't change a variable, so this connection is read-only here: change the variables where they're set. Testing it changes nothing.`]}),(0,q.jsxs)(`div`,{className:`conn-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`btn`,onClick:m,disabled:l,"aria-describedby":`${f}-test`,children:l?`Testing…`:`Test`}),!d&&(0,q.jsxs)(q.Fragment,{children:[!e.isDefault&&(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":a==="default",onClick:()=>h(`default`),children:`Make default`}),(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":a===`writes`,onClick:()=>h(`writes`),children:e.writes?`Turn writes off`:`Turn writes on`}),p.length>0&&(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":a===`login`,onClick:()=>h(`login`),children:`Replace secret`}),(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":a===`remove`,onClick:()=>h(`remove`),children:`Remove`})]})]}),(0,q.jsxs)(`p`,{id:`${f}-test`,className:`note`,children:[`Test sends `,e.area,`'s one cheap authenticated read, as a real command would (`,(0,q.jsx)(`code`,{children:OV(`connections test`,[e.name])}),`), and changes nothing.`]}),(0,q.jsx)(DV,{outcome:s}),a==="default"&&(0,q.jsx)(kV,{title:`Make ${e.name} the ${e.area} default`,explain:`${e.area} commands use it when a call names no connection and its dossier names none. The previous default stays as it is, just no longer the default.`,runs:OV(`connections default`,[e.name]),submit:`Make default`,disabled:n.disabled,onSubmit:async()=>g(await n.run(`connections default`,{name:e.name}),`${e.name} is now the ${e.area} default.`)}),a===`writes`&&(0,q.jsx)(HV,{connection:e,config:n,after:g}),a===`login`&&(0,q.jsx)(UV,{connection:e,fields:p,config:n,after:g}),a===`remove`&&(0,q.jsx)(kV,{title:`Remove ${e.name}`,explain:`Takes ${e.name} out of ${r} and deletes its secrets from the OS credential store, unless another connection uses them. A dossier that names it then fails until it names another. This can't be undone here: adding it again means typing its secret again.`,runs:OV(`connections remove`,[e.name]),submit:`Remove ${e.name}`,danger:!0,disabled:n.disabled,onSubmit:async()=>g(await n.run(`connections remove`,{name:e.name}),`${e.name} was removed.`)})]})}function HV({connection:e,config:t,after:n}){let[r,i]=(0,v.useState)(``);return e.writes?(0,q.jsx)(kV,{title:`Turn writes off for ${e.name}`,explain:`Commands can no longer change anything in ${e.area} through ${e.name}, even with --allow-write. Reads carry on as before.`,runs:OV(`connections writes`,[e.name,`off`]),submit:`Turn writes off`,disabled:t.disabled,onSubmit:async()=>n(await t.run(`connections writes`,{name:e.name,state:`off`}),`Writes are off for ${e.name}.`)}):(0,q.jsx)(kV,{title:`Turn writes on for ${e.name}`,explain:(0,q.jsxs)(q.Fragment,{children:[`Writes let commands change data in `,e.area,` through `,e.name,` when a call also passes `,(0,q.jsx)(`code`,{children:`--allow-write`}),`. Toil UI itself never writes to `,e.area,`: its proposals are commands for you to run. toil asks you to type the connection's name to turn writes on, here as on the terminal, and turns them on only if it matches.`]}),runs:OV(`connections writes`,[e.name,`on`]),submit:`Turn writes on`,danger:!0,disabled:t.disabled,onSubmit:async()=>{let a=r;return i(``),n(await t.run(`connections writes`,{name:e.name,state:`on`},{answers:{"confirm-name":a}}),`Writes are on for ${e.name}.`)},children:(0,q.jsx)(AV,{label:`Type ${e.name} to turn them on`,value:r,onChange:i,required:!0})})}function UV({connection:e,fields:t,config:n,after:r}){let[i,a]=(0,v.useState)({}),o=WV(),s=t=>e.values[t.name]===`store`||e.values[t.name]===`file`,c=e=>({password:e.password,empty:s(e)?`keep`:`skip`});return(0,q.jsx)(kV,{title:`Replace ${e.name}'s secret`,explain:`Stores what you type in the OS credential store, reads it back to check, and only then points ${e.name} at it and deletes the old one. A field left empty keeps its secret as it is. Toil UI doesn't keep what you type: it goes to toil in one request, and the fields are cleared.`,runs:OV(`connections login`,[e.name]),submit:`Save to the credential store`,disabled:n.disabled,onSubmit:async()=>{let s=o.refusal(t.map(e=>[e.name,i[e.name]??``,c(e)]));if(s)return s;let l=Object.fromEntries(t.map(e=>[e.name,i[e.name]??``])),u=o.answers();return a({}),o.reset(),r(await n.run(`connections login`,{name:e.name},{secrets:l,answers:u}),`${e.name}'s secret was replaced in the credential store.`)},children:t.map(e=>(0,q.jsx)(LV,{label:`${e.name}${e.description?` (${e.description})`:``}`,value:i[e.name]??``,onChange:t=>{a(n=>({...n,[e.name]:t})),o.changed(e.name)},rules:c(e),asking:o.asking,kept:o.kept(e.name),onKeep:()=>o.keep(e.name)},e.name))})}function WV(){let[e,t]=(0,v.useState)({}),[n,r]=(0,v.useState)(!1);return{asking:n,kept:t=>e[t]===!0,keep:e=>t(t=>({...t,[e]:!0})),changed:e=>t(t=>t[e]?{...t,[e]:!1}:t),reset:()=>{t({}),r(!1)},refusal:t=>{for(let[n,i,a]of t){let t=IV(n,CV(i,a),e[n]===!0);if(t)return r(!0),t}return null},answers:()=>Object.fromEntries(Object.keys(e).filter(t=>e[t]).map(e=>[`unwrap:${e}`,`n`]))}}var GV=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;function KV({areas:e,config:t,onChanged:n}){let r=(e??[]).filter(e=>e.connection.length>0);return e===null?null:r.length===0?(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`conn-add`,children:[(0,q.jsx)(`h2`,{id:`conn-add`,children:`Add a connection`}),(0,q.jsxs)(`p`,{children:[`The toil this server runs doesn't say what each area's connection holds, so the page can't ask for it. Add one with `,(0,q.jsx)(`code`,{children:`toil connections add`}),` in a terminal.`]})]}):(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`conn-add`,children:[(0,q.jsx)(`h2`,{id:`conn-add`,children:`Add a connection`}),(0,q.jsx)(qV,{areas:r,config:t,onAdded:n})]})}function qV({areas:e,config:t,onAdded:n,area:r,suggest:i,title:a=`A new connection`}){let o=e.filter(e=>e.connection.length>0&&(r===void 0||e.name===r)),[s,c]=(0,v.useState)(i?.name??``),[l,u]=(0,v.useState)(r??``),[d,f]=(0,v.useState)(i?.values??{}),[p,m]=(0,v.useState)({}),h=WV(),g=e=>({password:e.password,empty:e.required?`required`:`skip`,envVars:[`${mV(s||`<name>`,`area`)}=${_?.name??`<area>`}`,...y.map(e=>mV(s||`<name>`,e.name))]}),_=o.find(e=>e.name===l)??o[0],y=_?.connection??[],b=y.filter(e=>!e.secret),x=b.filter(e=>e.required),S=b.filter(e=>!e.required),C=y.filter(e=>e.secret),w=e=>`${e.name}${e.description?` (${e.description})`:``}`;if(!_)return(0,q.jsxs)(`p`,{className:`note`,children:[`The toil this server runs doesn't say what a `,r,` connection holds. Add one with `,(0,q.jsx)(`code`,{children:`toil connections add`}),` in a terminal.`]});let T=[`area ${_.name}`,...b.filter(e=>(d[e.name]??``)!==``).map(e=>`${e.name} ${d[e.name]}`),...C.filter(e=>(p[e.name]??``)!==``).map(e=>`${e.name} to the OS credential store`)].join(`, `);return(0,q.jsxs)(kV,{title:a,explain:(0,q.jsxs)(q.Fragment,{children:[`Asks for what `,(0,q.jsx)(`code`,{children:`toil connections add`}),` asks on a terminal. The settings go into your config file and each secret into the OS credential store, never the file. The first connection to an area becomes its default. Writes start off.`]}),runs:OV(`connections add`,[s||`<name>`,`--area`,_.name]),submit:`Save connection`,disabled:t.disabled,onSubmit:async()=>{if(!GV.test(s))return{ok:!1,message:`"${s}" isn't a valid connection name.`,fix:`Use lowercase letters, digits and single hyphens, starting with a letter, e.g. corp-jira.`};let e={confirm:`y`};for(let t of b)e[`setting:${t.name}`]=d[t.name]??``;let r=h.refusal(C.map(e=>[e.name,p[e.name]??``,g(e)]));if(r)return r;Object.assign(e,h.answers());let i=Object.fromEntries(C.map(e=>[e.name,p[e.name]??``]));m({}),h.reset();let a=TV(await t.run(`connections add`,{name:s,area:_.name},{answers:e,secrets:i}),`${s} was added.`);return a.ok&&(c(``),f({}),await n(s)),a},children:[(0,q.jsx)(AV,{label:`Name`,value:s,onChange:c,required:!0,hint:`Lowercase letters, digits and single hyphens, e.g. corp-jira.`}),r===void 0&&(0,q.jsx)(MV,{label:`Area`,value:_.name,onChange:e=>{u(e),f({}),m({}),h.reset()},options:o.map(e=>({value:e.name,label:e.name})),hint:_.description}),x.map(e=>(0,q.jsx)(AV,{label:w(e),value:d[e.name]??``,onChange:t=>f(n=>({...n,[e.name]:t})),required:!0,placeholder:e.default??void 0},e.name)),C.map(e=>(0,q.jsx)(LV,{label:`${w(e)}${e.password?`, a password`:``}`,value:p[e.name]??``,onChange:t=>{m(n=>({...n,[e.name]:t})),h.changed(e.name)},rules:g(e),asking:h.asking,kept:h.kept(e.name),onKeep:()=>h.keep(e.name),hint:`Goes to the OS credential store; never shown again, and never in the config file.`},e.name)),S.length>0&&(0,q.jsxs)(`details`,{className:`more`,children:[(0,q.jsxs)(`summary`,{children:[`Optional settings (`,S.length,`)`]}),S.map(e=>(0,q.jsx)(AV,{label:w(e),value:d[e.name]??``,onChange:t=>f(n=>({...n,[e.name]:t})),placeholder:e.default??void 0,hint:e.default?`Left empty, it stays ${e.default}.`:void 0},e.name))]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Saves: `,T,`.`]})]})}var JV={matched:`Ready`,default:`Ready (your default)`,created:`Added`,pinned:`Pinned in your copy`,missing:`No connection yet`,ambiguous:`Several fit: pick one`},YV=e=>`host`in e?`host ${e.host}`:`connection`in e?`connection ${e.connection}`:`your default`;function XV(e){return e.ok?{ok:!0,plan:e.data,warnings:(e.meta.warnings??[]).map(e=>e.message)}:{ok:!1,message:e.error.message,fix:e.error.fix??null}}function ZV({config:e,areas:t,onChanged:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d={...r.trim()?{cwd:r.trim()}:{},...a.trim()?{dossier:a.trim()}:{}},f=async(t={})=>{u(!0);try{let n=XV(await e.run(`dossiers onboard`,{...d,plan:!0,...t}));return c(n),n}catch(e){let t={ok:!1,message:EV(e).message,fix:null};return c(t),t}finally{u(!1)}},p=e=>{e.preventDefault(),l||f()},m=[...d.dossier?[d.dossier]:[],...d.cwd?[`--cwd`,d.cwd]:[],`--plan`];return(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`repo-setup`,children:[(0,q.jsx)(`h2`,{id:`repo-setup`,children:`Set up this repo`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`For a repository with a dossier checked in, through `,(0,q.jsx)(`code`,{children:`toil dossiers onboard`}),`, which on a terminal asks for each missing connection itself. `,(0,q.jsx)(Iw,{topic:`repo-setup`})]}),(0,q.jsxs)(`form`,{className:`change`,"aria-labelledby":`repo-setup-form`,onSubmit:p,noValidate:!0,children:[(0,q.jsx)(`h3`,{id:`repo-setup-form`,children:`Check a repository`}),(0,q.jsx)(AV,{label:`Repository folder`,value:r,onChange:i,hint:`A folder in the clone. Left empty, the folder Toil UI was started in.`}),(0,q.jsx)(AV,{label:`Dossier`,value:a,onChange:o,hint:`Left empty, the one the folder resolves to.`}),(0,q.jsxs)(`p`,{className:`runs`,children:[`Runs `,(0,q.jsx)(`code`,{children:OV(`dossiers onboard`,m)}),`, which reads your config and dossiers and sends one test read per connection. It changes nothing.`]}),(0,q.jsx)(`div`,{className:`change-actions`,children:(0,q.jsx)(`button`,{type:`submit`,className:`btn btn--accent`,disabled:l,"aria-busy":l||void 0,children:l?`Checking…`:`Check this repo`})})]}),s&&!s.ok&&(0,q.jsx)(DV,{outcome:{ok:!1,message:s.message,fix:s.fix}}),s?.ok&&(0,q.jsx)(QV,{loadedPlan:s,areas:t,config:e,rerun:f,onChanged:n})]})}function QV({loadedPlan:e,areas:t,config:n,rerun:r,onChanged:i}){let{plan:a,warnings:o}=e,s=a.areas.filter(e=>e.connection!==null&&e.test?.ok).length,c=a.ok?{ok:!0,message:`${a.dossier.name} is set up: every area has a connection and read successfully.`,warnings:o}:{ok:!1,message:`${a.dossier.name}: ${s} of ${a.areas.length} area${a.areas.length===1?``:`s`} ready.`,fix:a.check.ok?null:`dossiers check found problems, listed below.`},l=a.areas.filter(e=>e.status===`missing`),u=a.areas.filter(e=>e.status===`ambiguous`);return(0,q.jsxs)(ZT,{gap:`sm`,className:`shown`,children:[(0,q.jsxs)(`p`,{className:`note`,children:[(0,q.jsx)(aE,{value:a.dossier.file,what:`${a.dossier.name}'s file path`}),` (`,a.dossier.source,`)`,a.ownCopy&&(0,q.jsxs)(q.Fragment,{children:[`; your own copy, `,(0,q.jsx)(aE,{value:a.ownCopy,what:`your copy's file path`}),`, applies`]})]}),(0,q.jsx)(DV,{outcome:c}),(0,q.jsx)(nE,{label:`What ${a.dossier.name}'s areas use`,caption:`What ${a.dossier.name}'s areas use`,rows:a.areas,rowKey:e=>e.path,columns:[{header:`Area`,label:`Area`,rowHeader:!0,cell:e=>e.path},{header:`Selects`,label:`Selects`,cell:e=>(0,q.jsx)(`span`,{className:`any-break`,children:YV(e.selects)})},{header:`Status`,label:`Status`,cell:e=>(0,q.jsx)(`span`,{className:e.status===`missing`||e.status===`ambiguous`?`failure`:void 0,children:JV[e.status]})},{header:`Connection`,label:`Connection`,cell:e=>e.connection??(e.candidates?e.candidates.join(`, `):`–`)},{header:`Test read`,label:`Test read`,cell:e=>e.test===null?`–`:e.test.ok?(0,q.jsx)(`span`,{className:`any-break`,children:e.test.request??`settings and secret only`}):(0,q.jsx)(`span`,{className:`failure`,children:e.test.error?.message})}]}),a.check.problems.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h4`,{className:`shown-repos`,children:`dossiers check`}),(0,q.jsx)(`ul`,{className:`plain`,children:a.check.problems.map((e,t)=>(0,q.jsxs)(`li`,{className:e.level===`error`?`failure`:`note`,children:[e.level,`: `,(0,q.jsx)(`code`,{children:e.path}),` `,e.message]},t))})]}),l.map(e=>{let a=`host`in e.selects?e.selects.host:void 0;return(0,q.jsx)(qV,{areas:t,config:n,area:e.area,title:`Add a ${e.area} connection${a?` on ${a}`:``}`,suggest:{...e.suggest?.name?{name:e.suggest.name}:{},...e.suggest?.baseUrl?{values:{baseUrl:e.suggest.baseUrl}}:{}},onAdded:async()=>{await r(),await i()}},e.path)}),u.map(e=>(0,q.jsx)($V,{area:e,dossier:a.dossier.name,config:n,pin:t=>r({pin:[`${e.area}=${t}`]})},e.path))]})}function $V({area:e,dossier:t,config:n,pin:r}){let i=e.candidates??[],[a,o]=(0,v.useState)(i[0]??``);return(0,q.jsx)(kV,{title:`Pick the ${e.area} connection for ${t}`,explain:`Several of your ${e.area} connections fit ${e.path}. The one you pick is pinned in your own copy of ${t} (~/.toil/dossiers), which then applies wherever the shared one does. Your copy is yours, so writes may follow its bindings.`,runs:OV(`dossiers onboard`,[t,`--plan`,`--pin`,`${e.area}=${a||`<connection>`}`]),submit:`Pin it`,disabled:n.disabled,onSubmit:async()=>{let t=await r(a);return t.ok?{ok:!0,message:`${a} is pinned for ${e.area}.`,warnings:t.warnings}:{ok:!1,message:t.message,fix:t.fix}},children:(0,q.jsx)(MV,{label:`Connection`,value:a,onChange:o,options:i.map(e=>({value:e,label:e}))})})}var eH=e=>e.ok?{ok:!0,value:e.data}:{ok:!1,message:`${e.error.message}${e.error.fix?` ${e.error.fix}`:``}`},tH={sources:`dossier-form-sources`,repos:`dossier-form-repos`,fields:`dossier-form-fields`,people:`dossier-form-people`,wip:`dossier-form-wip`};function nH({config:e,at:t,toForm:n=!1}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(t?.dossier??``);(0,v.useEffect)(()=>{t?.dossier&&u(t.dossier)},[t?.dossier]);let d=(0,v.useCallback)(async()=>{try{i(eH(await e.run(`dossiers list`,{})))}catch(e){i({ok:!1,message:e instanceof Error?e.message:String(e)})}},[e]);(0,v.useEffect)(()=>{d(),e.areas().then(o,()=>o([])),e.run(`connections list`,{}).then(e=>e.ok&&c(e.data.connections),()=>{})},[e,d]);let f=!!(t&&r?.ok&&r.value.dossiers.some(e=>e.name===t.dossier));if(Vw(n?`dossier-change`:t?f?tH[t.section??``]??`dossier-change`:`dossier-change`:null,!!r),!r)return(0,q.jsx)(FA,{size:`panel`,message:`Reading your dossiers with toil dossiers list…`});if(!r.ok)return(0,q.jsx)(`div`,{role:`alert`,className:`failure`,children:(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`code`,{children:`toil dossiers list`}),` failed: `,r.message]})});let p=r.value.dossiers,m=p.find(e=>e.name===l)?.name??p[0]?.name??``;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(ZV,{config:e,areas:a,onChanged:d}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`dossier-list`,children:[(0,q.jsx)(`h2`,{id:`dossier-list`,children:`Your dossiers`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`From `,(0,q.jsx)(`code`,{children:`toil dossiers list`}),`; yours are in `,(0,q.jsx)(aE,{value:r.value.places.user,what:`folder path`}),`. `,(0,q.jsx)(Iw,{topic:`dossier-list`})]}),p.length===0?(0,q.jsx)(`p`,{children:`toil sees no dossiers yet. Create one below.`}):(0,q.jsx)($T,{min:`lg`,className:`conn-cards`,children:p.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsx)(rH,{dossier:t,config:e})},t.file))})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`dossier-change`,children:[(0,q.jsx)(`h2`,{id:`dossier-change`,tabIndex:-1,children:`Create or change a dossier`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`Each form runs one `,(0,q.jsx)(`code`,{children:`toil dossiers`}),` command. `,(0,q.jsx)(Iw,{topic:`dossier-setup`})]}),t&&r.ok&&!f&&(0,q.jsxs)(`p`,{role:`status`,className:`failure`,children:[`toil sees no dossier named `,(0,q.jsx)(`code`,{children:t.dossier}),`. It may have been removed or renamed; create it again below.`]}),(0,q.jsx)(aH,{config:e,onChanged:d}),p.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(MV,{label:`Dossier to change`,value:m,onChange:u,options:p.map(e=>({value:e.name,label:`${e.name} (${e.source})`})),hint:`The forms below change this one.`}),(0,q.jsx)(oH,{config:e,dossier:m}),(0,q.jsx)(sH,{config:e,dossier:m,areas:a,connections:s}),(0,q.jsx)(uH,{config:e,dossier:m,areas:a}),(0,q.jsx)(cH,{config:e,dossier:m,areas:a}),(0,q.jsx)(lH,{config:e,dossier:m})]})]})]})}function rH({dossier:e,config:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)([]),c=`dossier-card-${e.name}`;return(0,q.jsxs)(Q,{className:`conn-card`,"aria-labelledby":c,children:[(0,q.jsxs)(`div`,{className:`conn-head`,children:[(0,q.jsx)(`h3`,{id:c,children:(0,q.jsx)(`code`,{children:e.name})}),(0,q.jsxs)(`ul`,{className:`conn-tags`,"aria-label":`About this dossier`,children:[(0,q.jsx)(`li`,{className:`tag`,children:e.source}),e.problems>0&&(0,q.jsxs)(`li`,{className:`tag tag--warn`,children:[e.problems,` problem`,e.problems===1?``:`s`]})]})]}),e.description&&(0,q.jsx)(`p`,{children:e.description}),(0,q.jsxs)(`p`,{className:`note`,children:[(0,q.jsx)(aE,{value:e.file,what:`${e.name}'s file path`}),e.shadowedBy&&(0,q.jsxs)(q.Fragment,{children:[` (a dossier of the same name in `,e.shadowedBy,` takes precedence)`]})]}),(0,q.jsxs)(QT,{className:`conn-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":n!==null,onClick:async()=>{if(n)return r(null);try{r(eH(await t.run(`dossiers show`,{dossier:e.name})))}catch(e){r({ok:!1,message:e instanceof Error?e.message:String(e)})}},children:n?`Hide`:`Show`}),(0,q.jsx)(`button`,{type:`button`,className:`btn`,onClick:async()=>{a(null);try{let n=await t.run(`dossiers check`,{dossier:e.name}),r=n.ok?n.data:null;s(r?.problems??[]),a(r&&!r.ok?{ok:!1,message:`${e.name} has problems toil would refuse it for.`,fix:null}:TV(n,r?.problems.length?`${e.name} checks out, with ${r.problems.length} warning${r.problems.length===1?``:`s`}.`:`${e.name} checks out: no problems.`))}catch(e){a(EV(e))}},children:`Check`})]}),(0,q.jsx)(DV,{outcome:i}),o.length>0&&(0,q.jsx)(`ul`,{className:`plain`,children:o.map((e,t)=>(0,q.jsxs)(`li`,{className:e.level===`error`?`failure`:`note`,children:[e.level,`: `,(0,q.jsx)(`code`,{children:e.path}),` `,e.message]},t))}),n&&!n.ok&&(0,q.jsxs)(`p`,{role:`alert`,className:`failure`,children:[(0,q.jsxs)(`code`,{children:[`toil dossiers show `,e.name]}),` failed: `,n.message]}),n?.ok&&(0,q.jsx)(iH,{shown:n.value})]})}function iH({shown:e}){let t=Object.entries(e.areas),n=e.dossier.repos??[];return(0,q.jsxs)(ZT,{className:`shown`,gap:`sm`,children:[(0,q.jsx)(nE,{label:`What ${e.name} gives each area`,caption:`What ${e.name} gives each area`,rows:t,rowKey:([e])=>e,columns:[{header:`Area`,label:`Area`,rowHeader:!0,cell:([e])=>e},{header:`Connection`,label:`Connection`,cell:([,e])=>e.error?(0,q.jsx)(`span`,{className:`failure`,children:e.error.message}):e.connection?`${e.connection.value} (${e.connection.source})`:`Your default`},{header:`Writes`,label:`Writes`,cell:([,e])=>e.writes===null?`–`:e.writes?`On`:`Off`},{header:`Inputs`,label:`Inputs`,cell:([,e])=>(0,q.jsxs)(q.Fragment,{children:[Object.entries(e.inputs).map(([e,t])=>`${e}=${t}`).join(`, `)||`None`,e.env&&(0,q.jsxs)(`span`,{className:`note`,children:[` (environment `,e.env,`)`]})]})}]}),(0,q.jsx)(`h4`,{className:`shown-repos`,children:`People`}),e.dossier.people?.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.dossier.people.map(e=>(0,q.jsxs)(`li`,{className:`any-break`,children:[e.name,e.kind===`agent`&&` (agent)`,(0,q.jsxs)(`span`,{className:`note`,children:[` `,Object.entries(e.ids??{}).map(([e,t])=>`${e} ${t}`).join(`, `)||`no identities yet`,e.email&&`; email ${e.email}`]})]},e.name))}):(0,q.jsx)(`p`,{className:`note`,children:`None yet.`}),(0,q.jsxs)(`p`,{className:`note`,children:[`Work-in-progress limit: `,e.dossier.wipLimit===void 0?`none set`:`${e.dossier.wipLimit} per person`,`.`]}),(0,q.jsx)(`h4`,{className:`shown-repos`,children:`Repositories`}),n.length?(0,q.jsx)(`ul`,{className:`plain`,children:n.map(e=>(0,q.jsxs)(`li`,{children:[e.name,e.remotes[0]&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(oE,{value:e.remotes[0],what:`${e.name}'s remote URL`})]})]},e.name))}):(0,q.jsx)(`p`,{className:`note`,children:`None yet.`})]})}function aH({config:e,onChanged:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``);return(0,q.jsxs)(kV,{title:`Create a dossier`,explain:`Makes an empty dossier for one body of work in your own folder (~/.toil/dossiers/<name>.json). Add its repositories and areas with the forms below. It refuses a name you already have.`,runs:OV(`dossiers init`,[n||`<name>`,...i?[`--description`,`…`]:[]]),submit:`Create dossier`,disabled:e.disabled,onSubmit:async()=>{let o=TV(await e.run(`dossiers init`,{name:n,...i?{description:i}:{}}),`${n} was created.`);return o.ok&&(r(``),a(``),await t()),o},children:[(0,q.jsx)(AV,{label:`Name`,value:n,onChange:r,required:!0,hint:`Lowercase letters, digits and single hyphens, e.g. payments.`}),(0,q.jsx)(AV,{label:`Description`,value:i,onChange:a,hint:`One line saying what the body of work is.`})]})}function oH({config:e,dossier:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(!1);return(0,q.jsxs)(kV,{titleId:`dossier-form-repos`,title:`Add a repository to ${t}`,explain:`Records a repository by its remote URL, or by a folder on this machine (its git root and origin remote). Any credential in a remote is left out of the file. toil then picks this dossier for calls made in that repository.`,runs:OV(`dossiers add-repo`,[t,n||`<folder|remote>`,...i?[`--name`,i]:[],...o?[`--replace`]:[]]),submit:`Add repository`,disabled:e.disabled,onSubmit:async()=>TV(await e.run(`dossiers add-repo`,{dossier:t,location:n,...i?{name:i}:{},...o?{replace:o}:{}}),`The repository was added to ${t}.`),children:[(0,q.jsx)(AV,{label:`Folder or remote URL`,value:n,onChange:r,required:!0,hint:(0,q.jsxs)(q.Fragment,{children:[`e.g. `,(0,q.jsx)(`span`,{className:`any-break`,children:`https://git.imagile.dev/pay/payments-api.git`})]})}),(0,q.jsx)(AV,{label:`Name in the dossier`,value:i,onChange:a,hint:`Defaults to the folder's or remote's last part.`}),(0,q.jsx)(NV,{label:`Replace a repository of that name`,checked:o,onChange:s})]})}function sH({config:e,dossier:t,areas:n,connections:r}){let[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(!1),m=n.map(e=>e.name),h=m.includes(i)?i:m.includes(`jira`)?`jira`:m[0]??``,g=r.filter(e=>e.area===h),_=[t,h,...o?[`--connection`,o]:[],...hV(c).flatMap(e=>[`--set`,e]),...hV(u).flatMap(e=>[`--add`,e]),...f?[`--replace`]:[]];return(0,q.jsxs)(kV,{titleId:`dossier-form-sources`,title:`Link an area to ${t}`,explain:`Attaches an area to the dossier: which of your connections its calls use (or your default), the keys it supplies to every call (project=PAY), and reference data lists (projects=FEES). toil refuses, from here, a link that would point the dossier at a connection with writes on: a person makes that one with toil dossiers link in a terminal.`,runs:OV(`dossiers link`,_),submit:`Link area`,disabled:e.disabled,onSubmit:async()=>TV(await e.run(`dossiers link`,{dossier:t,area:h,...o?{connection:o}:{},...hV(c).length?{set:hV(c)}:{},...hV(u).length?{add:hV(u)}:{},...f?{replace:f}:{}}),`${h} was linked to ${t}.`),children:[(0,q.jsx)(MV,{label:`Area`,value:h,onChange:e=>(a(e),s(``)),options:m.map(e=>({value:e,label:e}))}),(0,q.jsx)(MV,{label:`Connection`,value:o,onChange:s,options:[{value:``,label:`Your ${h} default`},...g.map(e=>({value:e.name,label:`${e.name}${e.writes?` (writes on)`:``}`}))]}),(0,q.jsx)(jV,{label:`Keys to set, one key=value per line`,value:c,onChange:l,hint:`The area's context inputs (project=PAY, owner=imagile) are applied to calls; any other key is kept as reference data.`}),(0,q.jsx)(jV,{label:`Values to add to lists, one key=value per line`,value:u,onChange:d,hint:`e.g. projects=FEES`}),(0,q.jsx)(NV,{label:`Replace values already set`,checked:f,onChange:p})]})}function cH({config:e,dossier:t,areas:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(`human`),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(!1),p=hV(a),m=[t,r?/\s/.test(r)?`"${r}"`:r:`<name>`,...p.flatMap(e=>[`--id`,e]),...s===`agent`?[`--kind`,`agent`]:[],...l?[`--email`,l]:[],...d?[`--replace`]:[]];return(0,q.jsxs)(kV,{titleId:`dossier-form-people`,title:`Add a person to ${t}`,explain:(0,q.jsxs)(q.Fragment,{children:[`Says who someone is in each system, so the People view gathers their work from all of them: one area=identity per line, the user name, login or email that system shows. An agent is a person of kind agent. Their email is only compared, to suggest which accounts are theirs. Removing a person or an identity is a delete, made in a terminal with `,(0,q.jsxs)(`code`,{children:[`toil dossiers person `,t,` <name> --remove`]}),`.`]}),runs:OV(`dossiers person`,m),submit:`Add person`,disabled:e.disabled,onSubmit:async()=>{let n=TV(await e.run(`dossiers person`,{dossier:t,name:r,...p.length?{id:p}:{},...s===`agent`?{kind:s}:{},...l?{email:l}:{},...d?{replace:d}:{}}),`${r} is in ${t}'s people.`);return n.ok&&(i(``),o(``),u(``)),n},children:[(0,q.jsx)(AV,{label:`Name`,value:r,onChange:i,required:!0,hint:`As the team writes it, e.g. Pat Example.`}),(0,q.jsx)(jV,{label:`Identities, one area=identity per line`,value:a,onChange:o,hint:(0,q.jsxs)(q.Fragment,{children:[`e.g. jira=pat and github=pat-ex. Areas: `,n.map(e=>e.name).join(`, `)||`the ones toil has`,`.`]})}),(0,q.jsx)(MV,{label:`Kind`,value:s,onChange:e=>c(e===`agent`?`agent`:`human`),options:[{value:`human`,label:`Person`},{value:`agent`,label:`Agent`}]}),(0,q.jsx)(AV,{label:`Email`,value:l,onChange:u,hint:`Optional, e.g. you@example.com. Compared only, to suggest matches.`}),(0,q.jsx)(NV,{label:`Replace an identity, kind or email already set`,checked:d,onChange:f})]})}function lH({config:e,dossier:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(!1),o=Number(n);return(0,q.jsxs)(kV,{titleId:`dossier-form-wip`,title:`Set ${t}'s work-in-progress limit`,explain:(0,q.jsxs)(q.Fragment,{children:[`How many items one person may have in progress at once, as the team agreed. The People view counts each person's work in progress against it, and names nobody else's. Clearing it is a delete, made in a terminal with `,(0,q.jsxs)(`code`,{children:[`toil dossiers wip-limit `,t,` --clear`]}),`.`]}),runs:OV(`dossiers wip-limit`,[t,n||`<limit>`,...i?[`--replace`]:[]]),submit:`Set limit`,disabled:e.disabled,onSubmit:async()=>!Number.isInteger(o)||o<1?{ok:!1,message:`The limit must be a whole number above 0.`,fix:`Type a number such as 3.`}:TV(await e.run(`dossiers wip-limit`,{dossier:t,limit:o,...i?{replace:i}:{}}),`${t}'s limit is ${o} per person.`),children:[(0,q.jsx)(AV,{label:`Limit`,value:n,onChange:r,required:!0,hint:`A whole number, e.g. 3.`}),(0,q.jsx)(NV,{label:`Replace a limit already set`,checked:i,onChange:a})]})}function uH({config:e,dossier:t,areas:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(!1),d=n.map(e=>e.name),f=d.includes(r)?r:d.includes(`jira`)?`jira`:d[0]??``;return(0,q.jsxs)(kV,{titleId:`dossier-form-fields`,title:`Name a field in ${t}`,explain:`Gives one of the area's fields a friendly name in this dossier (storyPoints for customfield_10002), so commands and Toil UI's work items use the name. The OWI fields estimate, priority, type, team and dueDate are pointed at a team's own field the same way.`,runs:OV(`dossiers field`,[t,f,a||`<alias>`,s||`<field-id>`,...l?[`--replace`]:[]]),submit:`Name field`,disabled:e.disabled,onSubmit:async()=>TV(await e.run(`dossiers field`,{dossier:t,area:f,alias:a,id:s,...l?{replace:l}:{}}),`${a} now names ${s} in ${t}.`),children:[(0,q.jsx)(MV,{label:`Area`,value:f,onChange:i,options:d.map(e=>({value:e,label:e}))}),(0,q.jsx)(AV,{label:`Alias`,value:a,onChange:o,required:!0,hint:`A camelCase name, e.g. storyPoints or estimate.`}),(0,q.jsx)(AV,{label:`Field id`,value:s,onChange:c,required:!0,hint:`The service's own id, e.g. customfield_10002.`}),(0,q.jsx)(NV,{label:`Point an existing alias at this field`,checked:l,onChange:u})]})}var dH=e=>e%1e3==0?`${e/1e3} s`:`${e} ms`;function fH({config:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null);if((0,v.useEffect)(()=>{e.run(`connections list`,{}).then(e=>{if(!e.ok)return c(e.error.message);n(e.data.configFile),i(e.meta.warnings?.find(e=>e.code===`BOUND_RELAXED`)?.message??null)},e=>c(e instanceof Error?e.message:String(e))),e.settings().then(o,e=>c(e instanceof Error?e.message:String(e)))},[e]),s)return(0,q.jsx)(`div`,{role:`alert`,className:`failure`,children:(0,q.jsxs)(`p`,{children:[`The settings didn't load: `,s]})});if(!t||!a)return(0,q.jsx)(FA,{size:`panel`,message:`Reading toil's settings…`});let l=a.timeout;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`lede`,children:[`Shown as toil reports them, with where each is set. `,(0,q.jsx)(Iw,{topic:`bounds`})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`bounds`,children:[(0,q.jsx)(`h2`,{id:`bounds`,children:`Bounds`}),(0,q.jsxs)(`dl`,{className:`fields`,children:[(0,q.jsx)(`dt`,{children:`The file workspace`}),(0,q.jsx)(`dd`,{children:r?`Relaxed: commands may read and write files anywhere you can, except toil's own files.`:`Held: commands read and write files only inside the workspace.`}),(0,q.jsx)(`dt`,{children:`Set in`}),(0,q.jsxs)(`dd`,{children:[(0,q.jsx)(aE,{value:t,what:`config file path`}),`, as `,(0,q.jsxs)(`code`,{children:[`"bounds": `,`{`,` "files": "unbounded" `,`}`]})]})]}),r&&(0,q.jsxs)(`p`,{className:`note`,children:[`toil says: `,r]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`timeout`,children:[(0,q.jsx)(`h2`,{id:`timeout`,children:`Time limit`}),(0,q.jsxs)(`dl`,{className:`fields`,children:[(0,q.jsx)(`dt`,{children:`Each command stops after`}),(0,q.jsxs)(`dd`,{children:[dH(l.effectiveMs),l.effectiveMs===l.defaultMs?`, toil's default`:``]}),(0,q.jsx)(`dt`,{children:`Set by`}),(0,q.jsxs)(`dd`,{children:[(0,q.jsx)(`code`,{children:l.variable}),l.value===null?`, which is not set`:`=${l.value}`,`, in the environment `,(0,q.jsx)(`code`,{children:`toil-ui`}),` was started from`]})]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Without the variable, a command that declares a longer limit (a scan, a report) gets its own. `,(0,q.jsx)(`code`,{children:`toil wait`}),` has its own `,(0,q.jsx)(`code`,{children:`--timeout`}),`, capped by `,(0,q.jsxs)(`code`,{children:[`"wait": `,`{`,` "maxTimeout" `,`}`]}),` in `,(0,q.jsx)(`code`,{children:t}),`. To change the limit, set `,l.variable,` and start `,(0,q.jsx)(`code`,{children:`toil-ui`}),` again.`]})]})]})}var pH={full:`Full`,subtle:`Subtle`,off:`Off`};function mH(){let[e,t]=ym(),n=Sm(),r=e===`reduced`,[i,a]=Im(),o=Lm(),[s,c]=nk();return(0,q.jsxs)(Q,{as:`section`,className:`panel motion-setting`,"aria-labelledby":`motion`,children:[(0,q.jsx)(`h2`,{id:`motion`,children:`Motion and effects`}),(0,q.jsxs)(`div`,{className:`theme-setting__row`,children:[(0,q.jsxs)(Eo,{className:`check`,isSelected:r,onChange:e=>t(e?`reduced`:`full`),children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:r?`✓`:``}),`Reduce motion and effects`]}),(0,q.jsx)(Iw,{topic:`motion`})]}),(0,q.jsx)(`p`,{className:`note`,children:r?`Nothing moves: no animations or particles. Saved in this browser only.`:n?`The themes' animations and particles are on, apart from any theme's particles switched off under Theme. Saved in this browser only.`:`Your system asks for reduced motion, so nothing moves whichever way this is set.`}),(0,q.jsxs)(`div`,{className:`theme-setting__row`,children:[(0,q.jsx)(fj,{label:`Theme motion`,value:i,onChange:e=>a(e),options:Am.map(e=>({id:e,label:pH[e]}))}),(0,q.jsx)(Iw,{topic:`theme-motion`})]}),o!==i&&(0,q.jsxs)(`p`,{className:`note`,id:`theme-motion-note`,children:[`Off for now: `,r?`Reduce motion and effects is ticked`:`your system asks for reduced motion`,`. `,pH[i],` is kept for when motion is back.`]}),(0,q.jsxs)(`div`,{className:`theme-setting__row`,children:[(0,q.jsxs)(Eo,{className:`check`,isSelected:s,onChange:c,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:s?`✓`:``}),`Toil tips on loading screens`]}),(0,q.jsx)(Iw,{topic:`tips`})]})]})}function hH(){let[e,t]=xw();return(0,q.jsxs)(Q,{as:`section`,className:`panel learning-setting`,"aria-labelledby":`learning`,children:[(0,q.jsx)(`h2`,{id:`learning`,children:`Learning content`}),(0,q.jsx)(`div`,{className:`theme-setting__row`,children:(0,q.jsxs)(Eo,{className:`check`,isSelected:e,onChange:t,"data-learning-setting":``,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:e?`✓`:``}),`Links to learning content`]})}),(0,q.jsx)(`p`,{className:`note`,children:e?`Help, the agent's chat and the (i) beside AI terms link to Context Overflow's glossary and modules. Saved in this browser only.`:`No links to Context Overflow anywhere. Saved in this browser only.`})]})}function gH(e){switch(e.kind){case`status`:return e.toCategory===`DONE`?`item-done`:null;case`build-passed`:case`build-recovered`:return`build-passed`;case`build-failed`:return`build-failed`;case`blocker-cleared`:return`blocker-cleared`;case`pr-merged`:return`pr-merged`;case`sprint-ended`:return`sprint-ended`;default:return null}}var _H={"sprint-ended":0,"build-failed":1,"blocker-cleared":2,"pr-merged":3,"item-done":4,"build-passed":5},vH=e=>`${e.label}${e.title&&!e.title.startsWith(`for [[`)?` ${e.title}`:``}`;function yH(e){let t=new Map;for(let n of e){let e=gH(n);e&&(t.has(e)||t.set(e,[]),t.get(e).push(n))}return[...t.entries()].sort((e,t)=>_H[e[0]]-_H[t[0]]).slice(0,3).map(([e,t])=>{let n=t[0];return e===`sprint-ended`?{kind:e,text:n.label,count:1,figures:n.text.replace(/^ended: /,``).split(`, `).filter(Boolean)}:{kind:e,text:t.length>1?`${vH(n)}, and ${t.length-1} more`:vH(n),count:t.length}})}var bH={"item-done":{kind:`item-done`,text:`PAY-102 Store tokens in the vault`,count:1},"build-passed":{kind:`build-passed`,text:`payments-web #52 build`,count:1},"build-failed":{kind:`build-failed`,text:`payments-web #49 build`,count:1},"blocker-cleared":{kind:`blocker-cleared`,text:`PAY-104 Retry failed captures`,count:1},"pr-merged":{kind:`pr-merged`,text:`payments-web #52 Vault-backed token store`,count:1},"sprint-ended":{kind:`sprint-ended`,text:`Sprint 42`,count:1,figures:[`8 of 11 items done`,`21 of 30 points done`,`2 carried over`]}},xH={dossier:`card-payments`,day:7,days:10,done:4};function SH(){let e=JS(),t=Lm(),n=UA(),r=DA(e),[i,a]=(0,v.useState)(null),o=bA.filter(e=>r.events?.[e]),s=t===`off`?[`splash`,...o]:[],c=e=>{e===`splash`||e===`loader`?a(e):n.play([bH[e]])};return(0,q.jsxs)(`div`,{className:`theme-setting__row moments-preview-block`,children:[(0,q.jsxs)(Xd,{children:[(0,q.jsxs)(W,{className:`btn btn--small`,"data-preview-menu":``,children:[`Preview the theme's moments `,(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`▾`})]}),(0,q.jsx)(Xu,{className:`popover menu-popover`,placement:`bottom start`,offset:6,children:(0,q.jsxs)(Qd,{className:`menu`,onAction:e=>c(String(e)),disabledKeys:s,children:[r.splash?(0,q.jsx)(af,{id:`splash`,className:`menu-item`,"data-preview":`splash`,children:`The launch splash`}):null,(0,q.jsx)(af,{id:`loader`,className:`menu-item`,"data-preview":`loader`,children:`A loading screen`}),o.map(e=>(0,q.jsx)(af,{id:e,className:`menu-item`,"data-preview":e,children:`Moment: ${xA[e]}`},e))]})})]}),(0,q.jsx)(Iw,{topic:`theme-motion`}),i===`splash`&&(0,q.jsx)(BA,{ready:!1,data:xH,preview:!0,onDone:()=>a(null)}),(0,q.jsx)(Of,{className:`moment-preview-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:i===`loader`,onOpenChange:e=>!e&&a(null),children:(0,q.jsx)(Ef,{className:`moment-preview-modal`,children:(0,q.jsxs)(uf,{className:`moment-preview`,"aria-labelledby":`moment-preview-title`,"data-moment-preview":``,children:[(0,q.jsx)(ja,{slot:`title`,id:`moment-preview-title`,className:`sr-only`,children:`Preview of a loading screen`}),(0,q.jsx)(FA,{immediate:!0,message:`Preview of a loading screen, reading card-payments…`,detail:`3 of 7 toil calls answered; reading toil jira issue search.`}),(0,q.jsx)(W,{className:`btn`,onPress:()=>a(null),"data-preview-close":``,children:`Close the preview`})]})})})]})}function CH(){let e=JS(),t=QS(),n=e.lexicon===void 0,r=e.voice===void 0,i=e.ambient?.particles,[a,o]=Om(e.name),[s]=ym(),c=Sm();return(0,q.jsxs)(Q,{as:`section`,className:`panel theme-setting`,"aria-labelledby":`theme-setting`,children:[(0,q.jsx)(`h2`,{id:`theme-setting`,children:`Theme`}),(0,q.jsx)(fj,{label:`Theme`,value:e.name,onChange:t.setTheme,options:Qm.map(e=>({id:e.name,label:e.label}))}),(0,q.jsx)(`p`,{className:`note`,children:e.description}),(0,q.jsx)(`p`,{className:`note`,id:`theme-effects`,children:i?`Particles: ${i}, ${a?c?`on`:`off while motion is reduced`:`off`}.`:`Particles: none.`}),(0,q.jsxs)(`div`,{className:`theme-setting__row`,children:[(0,q.jsx)(wH,{label:`Themed wording`,on:t.wording&&!n,disabled:n,onChange:t.setWording,describedBy:`theme-none-note`}),(0,q.jsx)(Iw,{topic:`themed-wording`})]}),(0,q.jsxs)(`div`,{className:`theme-setting__row`,children:[(0,q.jsx)(wH,{label:`Themed agent voice`,on:t.voice&&!r,disabled:r,onChange:t.setVoice,describedBy:`theme-none-note`}),(0,q.jsx)(Iw,{topic:`themed-voice`})]}),i&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(wH,{label:`Particles and ambient effects`,on:a,disabled:!1,onChange:o,describedBy:`theme-particles-note`}),(0,q.jsx)(`p`,{className:`note`,id:`theme-particles-note`,children:c?`${e.label}'s ${i} behind the page. Off removes the particles entirely; other animations keep following Motion and effects. Kept for ${e.label} only, so each theme has its own.`:`${s===`reduced`?`Reduce motion and effects is ticked below`:`Your system asks for reduced motion`}, so no particles show whichever way this is set. It's kept for ${e.label} for when motion is back.`})]}),(0,q.jsx)(SH,{}),(n||r)&&(0,q.jsx)(`p`,{className:`note theme-setting__plain`,id:`theme-none-note`,children:n&&r?`${e.label} has no wording or voice of its own, so both are off while it's chosen. Pick a game theme to use them.`:`${e.label} has no ${n?`wording`:`voice`} of its own, so that box is off while it's chosen.`}),(0,q.jsx)(`p`,{className:`note`,children:`Saved in this browser only. To ask for a new theme, send a feature request from Feedback.`})]})}function wH({label:e,on:t,disabled:n,onChange:r,describedBy:i}){return(0,q.jsxs)(Eo,{className:`check`,isSelected:t,isDisabled:n,onChange:r,"aria-describedby":i,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:t?`✓`:``}),e]})}var TH={days:{by:[`day`]},commands:{by:[`command`],unused:!0},doors:{by:[`via`,`caller`]}},EH=e=>({command:e,outcome:`failed`,limit:10});function DH(e,t,n){let r=new Map(e.map(e=>[e.day??``,e])),i=[],a=Date.parse(`${n}T00:00:00Z`);for(let e=Date.parse(`${t.slice(0,10)}T00:00:00Z`);e<=a&&i.length<400;e+=864e5){let t=new Date(e).toISOString().slice(0,10),n=r.get(t);i.push({day:t,calls:n?.calls??0,failed:n?.failed??0})}return i}function OH(e,t){return e===`api`?t===`toil-ui`?`Toil UI`:t?`A program, ${t}`:`A program, unnamed`:e===`mcp`?`MCP`:e===`cli`?`The CLI`:e??`Unknown`}var kH=e=>e.filter(e=>e.failed>0).sort((e,t)=>t.failed-e.failed||t.calls-e.calls);function AH(e){let t=new Map;for(let n of e){let e=n.area??``;t.set(e,[...t.get(e)??[],n])}return[...t].sort((e,t)=>e[0]<t[0]?-1:1).map(([e,t])=>({area:e,commands:t}))}var jH=(e,t)=>t===0?`0%`:`${Math.round(e/t*100)}%`,MH=e=>e>=1e3?`${(e/1e3).toFixed(1)} s`:`${e} ms`,NH=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,PH=e=>e.ok?{ok:!0,data:e.data}:{ok:!1,message:`${e.error.message}${e.error.fix?` ${e.error.fix}`:``}`};async function FH(e,t,n){try{return PH(await e.run(t,n))}catch(e){return{ok:!1,message:e instanceof Error?e.message:String(e)}}}function IH({config:e,today:t=new Date().toISOString().slice(0,10)}){let[n,r]=(0,v.useState)(null);if((0,v.useEffect)(()=>{let t=!0,n=new Date().toISOString(),i=t=>FH(e,`audit stats`,{...t,until:n});return Promise.all([i(TH.days),i(TH.commands),i(TH.doors)]).then(([e,n,i])=>{t&&r({days:e,commands:n,doors:i})}),()=>{t=!1}},[e]),!n)return(0,q.jsx)(FA,{size:`panel`,message:`Reading toil's audit log with toil audit stats…`});let i=[n.days,n.commands,n.doors].find(e=>!e.ok);if(i||!n.days.ok||!n.commands.ok||!n.doors.ok)return(0,q.jsx)(`div`,{role:`alert`,className:`failure`,children:(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`code`,{children:`toil audit stats`}),` failed: `,i?.message]})});let a=n.days.data,o=n.commands.data,s=n.doors.data,c=o.totals,l=kH(o.groups).slice(0,8);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{as:`section`,className:`panel usage`,"aria-labelledby":`usage-totals`,children:[(0,q.jsx)(`h2`,{id:`usage-totals`,children:`Usage of toil`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`From `,(0,q.jsx)(`code`,{children:`toil audit stats`}),`, since `,vg(o.window.since),`, UTC. `,(0,q.jsx)(Iw,{topic:`audit`})]}),(0,q.jsxs)(`dl`,{className:`fields usage-totals`,children:[(0,q.jsx)(`dt`,{children:`Calls`}),(0,q.jsx)(`dd`,{children:c.calls}),(0,q.jsx)(`dt`,{children:`Failed`}),(0,q.jsxs)(`dd`,{children:[c.failed,` (`,jH(c.failed,c.calls),`)`]}),(0,q.jsx)(`dt`,{children:`Wrote`}),(0,q.jsxs)(`dd`,{children:[c.writes,` (`,jH(c.writes,c.calls),`)`]}),(0,q.jsx)(`dt`,{children:`Time per call`}),(0,q.jsxs)(`dd`,{children:[MH(c.durationMs.median),` median, `,MH(c.durationMs.p95),` at the 95th percentile`]})]}),c.calls===0&&(0,q.jsx)(`p`,{className:`note`,children:`No command has run in this window yet. Each call toil makes, from the CLI, MCP or Toil UI, adds a line.`}),(0,q.jsx)(EI,{days:DH(a.groups,a.window.since,a.window.until?new Date(Date.parse(a.window.until)-1).toISOString().slice(0,10):t)})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`usage-doors`,children:[(0,q.jsx)(`h2`,{id:`usage-doors`,children:`How toil was called`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`By front door: the CLI, MCP (an agent), or a program through toil's API, which Toil UI is. From `,(0,q.jsx)(`code`,{children:`toil audit stats --by via --by caller`}),`.`]}),(0,q.jsx)(nE,{label:`Calls by front door`,caption:`Calls by front door`,rows:s.groups,rowKey:e=>`${e.via}:${e.caller}`,columns:[{header:`Front door`,label:`Front door`,rowHeader:!0,cell:e=>OH(e.via,e.caller)},{header:`Calls`,label:`Calls`,cell:e=>`${e.calls} (${jH(e.calls,s.totals.calls)})`},{header:`Failed`,label:`Failed`,cell:e=>e.failed}]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`usage-top`,children:[(0,q.jsx)(`h2`,{id:`usage-top`,children:`Used most`}),(0,q.jsx)(nE,{label:`Commands used most`,caption:`The commands called most`,rows:o.groups.slice(0,10),rowKey:e=>e.command??``,columns:[{header:`Command`,label:`Command`,rowHeader:!0,cell:e=>(0,q.jsx)(`code`,{children:e.command})},{header:`Calls`,label:`Calls`,cell:e=>e.calls},{header:`Failed`,label:`Failed`,cell:e=>e.failed},{header:`Median`,label:`Median`,cell:e=>MH(e.durationMs.median)},{header:`Last`,label:`Last called`,cell:e=>Y(e.lastSeen)}]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`usage-failing`,children:[(0,q.jsx)(`h2`,{id:`usage-failing`,children:`Failed most`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`Each with its top error code and the fix that usually applies. `,(0,q.jsx)(Iw,{topic:`audit-failures`})]}),l.length===0?(0,q.jsx)(`p`,{children:`No command failed in this window.`}):(0,q.jsx)(`ul`,{className:`usage-failing`,children:l.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsx)(LH,{group:t,config:e})},t.command))})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`usage-unused`,children:[(0,q.jsx)(`h2`,{id:`usage-unused`,children:`Not used`}),(0,q.jsx)(RH,{unused:o.unused??[]})]})]})}function LH({group:e,config:t}){let[n,r]=(0,v.useState)(null),i=(0,v.useId)(),a=e.errors[0],o=async()=>{if(n!==null&&n!==`loading`)return r(null);r(`loading`),r(await FH(t,`audit list`,EH(e.command??``)))};return(0,q.jsxs)(Q,{className:`usage-fail`,children:[(0,q.jsx)(`h3`,{children:(0,q.jsx)(`code`,{children:e.command})}),(0,q.jsxs)(`p`,{children:[`Failed `,e.failed,` of `,NH(e.calls,`call`),a?(0,q.jsxs)(q.Fragment,{children:[`, most often with `,(0,q.jsx)(`code`,{children:a.code}),` (`,a.count,`)`]}):null,`.`]}),a?.fix&&(0,q.jsxs)(`p`,{className:`note`,children:[`Usual fix: `,a.fix]}),e.errors.length>1&&(0,q.jsxs)(`p`,{className:`note`,children:[`Also:`,` `,e.errors.slice(1).map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0?`, `:``,(0,q.jsx)(`code`,{children:e.code}),` (`,e.count,`)`]},e.code))]}),(0,q.jsxs)(`div`,{className:`conn-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`btn`,"aria-expanded":n!==null,"aria-controls":i,onClick:()=>void o(),"data-usage-lines":``,children:n===null?`Show recent failures`:`Hide recent failures`}),(0,q.jsxs)(`span`,{className:`runs`,children:[`runs `,(0,q.jsxs)(`code`,{children:[`toil audit list --command "`,e.command,`" --outcome failed --limit 10`]})]})]}),(0,q.jsxs)(`div`,{id:i,children:[n===`loading`&&(0,q.jsx)(FA,{size:`panel`,message:`Reading the audit log…`}),n!==null&&n!==`loading`&&!n.ok&&(0,q.jsxs)(`p`,{role:`alert`,className:`failure`,children:[(0,q.jsx)(`code`,{children:`toil audit list`}),` failed: `,n.message]}),n!==null&&n!==`loading`&&n.ok&&(0,q.jsx)(nE,{label:`Recent failures of ${e.command}`,caption:`Recent failures of ${e.command}, newest first`,rows:n.data,rowKey:e=>`${e.time}:${e.via}:${e.outcome}`,columns:[{header:`When`,label:`When`,rowHeader:!0,cell:e=>Y(e.time)},{header:`Error`,label:`Error`,cell:e=>(0,q.jsx)(`code`,{children:e.outcome})},{header:`From`,label:`From`,cell:e=>OH(e.via,e.caller)},{header:`Connection`,label:`Connection`,cell:e=>e.connection?(0,q.jsx)(`code`,{children:e.connection}):`none`},{header:`Took`,label:`Took`,cell:e=>MH(e.durationMs)}]})]})]})}function RH({unused:e}){if(e.length===0)return(0,q.jsx)(`p`,{children:`Every command toil has was called at least once in this window.`});let t=AH(e),n=e.filter(e=>!e.mcp).length;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`lede`,children:[NH(e.length,`command`),` had no call in this window, from `,(0,q.jsx)(`code`,{children:`toil audit stats --unused`}),`. A command no agent reaches for may need a clearer description or skill page.`,` `,n>0&&(0,q.jsxs)(q.Fragment,{children:[n===1?`One of them is`:`${n} of them are`,` never served over MCP, so only a person on the CLI can run `,n===1?`it`:`them`,`.`]})]}),(0,q.jsxs)(`details`,{className:`more`,children:[(0,q.jsx)(`summary`,{children:`Show them, by area`}),(0,q.jsx)(`dl`,{className:`usage-unused`,children:t.map(e=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:e.area===``?`toil's own`:e.area}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(`ul`,{children:e.commands.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`code`,{children:e.command}),!e.mcp&&(0,q.jsx)(`span`,{className:`runs`,children:` (CLI only)`})]},e.command))})})]},e.area))})]})]})}var zH=e=>e.tokens===void 0?`not reported`:sD(e.tokens),BH=e=>e===void 0?`not reported`:sD(e);function VH(e,t){if(t===`copilot`)return e.premiumRequests===void 0?`premium requests not reported`:`${hD(e.premiumRequests,`premium-requests`)}`;if(t)return dD(e,t).join(`; `);let n=[...e.costUsd[`sdk-estimate`]===void 0?[]:[`~${hD(e.costUsd[`sdk-estimate`],`usd`)} SDK estimate`],...e.costUsd[`your-rates`]===void 0?[]:[`~${hD(e.costUsd[`your-rates`],`usd`)} from your rates`]];return e.premiumRequests!==void 0&&n.push(hD(e.premiumRequests,`premium-requests`)),n.length?n.join(`; `):`no dollar figure`}function HH(e,t,n){let r=new Map(rD(e,iD).map(e=>[e.key,e.totals.tokens??0])),i=[];for(let e=Date.parse(`${t.slice(0,10)}T00:00:00Z`);e<=Date.parse(`${n}T00:00:00Z`)&&i.length<400;e+=864e5){let t=new Date(e).toISOString().slice(0,10);i.push({day:t,tokens:r.get(t)??0})}return i}function UH({api:e,landOn:t=null}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null);return(0,v.useEffect)(()=>{if(!e)return;let t=!0;return e.view().then(e=>t&&r(e),e=>t&&a(e instanceof Error?e.message:String(e))),()=>{t=!1}},[e]),Vw(t,n!==null||i!==null),e?i?(0,q.jsxs)(`p`,{role:`alert`,className:`failure`,children:[`Reading the model usage failed: `,i]}):n?(0,q.jsx)(WH,{view:n,api:e,onSaved:r}):(0,q.jsx)(FA,{size:`panel`,message:`Reading what the agent's models used…`}):(0,q.jsx)(`p`,{className:`failure`,children:`This app wasn't given the agent's usage, so there is nothing to show.`})}function WH({view:e,api:t,onSaved:n}){let r=e.records,i=(0,v.useMemo)(()=>nD(r),[r]),a=(0,v.useMemo)(()=>rD(r,e=>e.adapter),[r]),o=(0,v.useMemo)(()=>rD(r,aD),[r]),s=(0,v.useMemo)(()=>rD(r,e=>e.dossier),[r]),c=(0,v.useMemo)(()=>rD(r,e=>e.chatId).slice(0,10),[r]),l=(0,v.useMemo)(()=>{let e=new Map;for(let t of r)e.set(t.chatId,Math.max(e.get(t.chatId)??0,t.turn));return e},[r]),u=e.now.slice(0,10),d=()=>{let e=new Blob([vD(r)],{type:`text/csv;charset=utf-8`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`toil-ui-model-usage-${u}.csv`,document.body.append(n),n.click(),n.remove(),setTimeout(()=>URL.revokeObjectURL(t),1e3)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{as:`section`,className:`panel usage`,"aria-labelledby":`model-usage-totals`,children:[(0,q.jsx)(`h2`,{id:`model-usage-totals`,children:`Usage of the agent's models`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`What the Claude, Codex and Copilot SDKs reported each chat used, since `,vg(e.since),`, UTC. `,(0,q.jsx)(Iw,{topic:`model-usage`})]}),e.sample&&(0,q.jsx)(`p`,{className:`note`,children:`These are sample figures, made up for the preview. No model reported them.`}),e.retentionDays!==null&&e.retentionDays<30&&(0,q.jsxs)(`p`,{className:`note`,children:[`The cache keeps a record `,e.retentionDays,` days, so this window holds only the last `,e.retentionDays,`.`]}),(0,q.jsxs)(`dl`,{className:`fields usage-totals`,children:[(0,q.jsx)(`dt`,{children:`Tokens`}),(0,q.jsx)(`dd`,{children:zH(i)}),(0,q.jsx)(`dt`,{children:`In, out`}),(0,q.jsxs)(`dd`,{children:[BH(i.inputTokens),` in, `,BH(i.outputTokens),` out`]}),(0,q.jsx)(`dt`,{children:`Cache`}),(0,q.jsxs)(`dd`,{children:[BH(i.cachedInputTokens),` read, `,BH(i.cacheWriteTokens),` written`]}),(0,q.jsx)(`dt`,{children:`Dollars`}),(0,q.jsx)(`dd`,{children:VH({...i,premiumRequests:void 0},null)}),(0,q.jsx)(`dt`,{children:`Premium requests`}),(0,q.jsx)(`dd`,{children:i.premiumRequests===void 0?`none reported`:hD(i.premiumRequests,`premium-requests`)})]}),i.reports===0&&(0,q.jsx)(`p`,{className:`note`,children:`No chat has used a model in this window yet. Each answer the agent gives adds what its SDK reported.`}),(0,q.jsx)(DI,{days:HH(r,e.since,u),compact:sD}),(0,q.jsxs)(`div`,{className:`conn-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`btn`,onClick:d,disabled:i.reports===0,"data-usage-export":``,children:`Export as CSV`}),(0,q.jsx)(`span`,{className:`runs`,children:`one row per report, a figure the SDK didn't report left empty`})]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`model-usage-adapters`,children:[(0,q.jsx)(`h2`,{id:`model-usage-adapters`,children:`By adapter`}),(0,q.jsx)(nE,{label:`Usage by adapter`,caption:`Usage by adapter`,rows:a,rowKey:e=>e.key,columns:[{header:`Adapter`,label:`Adapter`,rowHeader:!0,cell:e=>YE[e.sample.adapter]},{header:`Tokens`,label:`Tokens`,cell:e=>zH(e.totals)},{header:`In / out`,label:`In / out`,cell:e=>`${BH(e.totals.inputTokens)} / ${BH(e.totals.outputTokens)}`},{header:`Cost`,label:`Cost`,cell:e=>VH(e.totals,e.sample.adapter)}]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`model-usage-models`,children:[(0,q.jsx)(`h2`,{id:`model-usage-models`,children:`By model`}),(0,q.jsx)(nE,{label:`Usage by model`,caption:`Usage by model and the adapter it ran on`,rows:o,rowKey:e=>e.key,columns:[{header:`Model`,label:`Model`,rowHeader:!0,cell:e=>(0,q.jsx)(`code`,{children:oD(e.sample)})},{header:`Adapter`,label:`Adapter`,cell:e=>YE[e.sample.adapter]},{header:`Tokens`,label:`Tokens`,cell:e=>zH(e.totals)},{header:`Cost`,label:`Cost`,cell:e=>VH(e.totals,e.sample.adapter)}]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`model-usage-dossiers`,children:[(0,q.jsx)(`h2`,{id:`model-usage-dossiers`,children:`By dossier`}),(0,q.jsx)(nE,{label:`Usage by dossier`,caption:`Usage by dossier`,rows:s,rowKey:e=>e.key,columns:[{header:`Dossier`,label:`Dossier`,rowHeader:!0,cell:e=>e.key},{header:`Tokens`,label:`Tokens`,cell:e=>zH(e.totals)},{header:`Cost`,label:`Cost`,cell:e=>VH(e.totals,null)}]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`model-usage-chats`,children:[(0,q.jsx)(`h2`,{id:`model-usage-chats`,children:`Chats that used the most`}),c.length===0?(0,q.jsx)(`p`,{children:`No chat in this window.`}):(0,q.jsx)(nE,{label:`The chats that used the most`,caption:`The ten chats that used the most tokens`,rows:c,rowKey:e=>e.key,columns:[{header:`Started`,label:`Started`,rowHeader:!0,cell:e=>Y(e.sample.at)},{header:`Dossier`,label:`Dossier`,cell:e=>e.sample.dossier},{header:`Model`,label:`Model`,cell:e=>`${YE[e.sample.adapter]}, ${oD(e.sample)}`},{header:`Questions`,label:`Questions`,cell:e=>l.get(e.key)??1},{header:`Tokens`,label:`Tokens`,cell:e=>zH(e.totals)},{header:`Cost`,label:`Cost`,cell:e=>VH(e.totals,e.sample.adapter)}]})]}),(0,q.jsx)(KH,{view:e,api:t,onSaved:n})]})}var GH=e=>Object.fromEntries(pD.map(t=>{let n=e.caps[t.key];return[t.key,n&&n!==`off`?{on:!0,unit:n.unit,limit:String(n.limit)}:{on:!1,unit:t.units[0],limit:``}]}));function KH({view:e,api:t,onSaved:n}){let[r,i]=(0,v.useState)(()=>GH(e.settings)),a=e.settings.codexRates,[o,s]=(0,v.useState)(()=>({input:a?String(a.inputPerMillion):``,cached:a?String(a.cachedInputPerMillion):``,output:a?String(a.outputPerMillion):``})),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(!1),m=e.sample?`This preview shows sample caps, so they can't be saved.`:null,h=e=>e.trim()!==``&&Number.isFinite(Number(e))?Number(e):e,g=async e=>{e.preventDefault(),l(null),d(``);let i=o.input.trim()||o.cached.trim()||o.output.trim(),a={caps:Object.fromEntries(pD.map(e=>[e.key,r[e.key].on?{unit:r[e.key].unit,limit:h(r[e.key].limit)}:`off`])),codexRates:i?{inputPerMillion:h(o.input),cachedInputPerMillion:h(o.cached),outputPerMillion:h(o.output)}:null};p(!0);try{n(await t.save(a)),d(`Saved. The next question is held to these caps.`)}catch(e){l(e instanceof Error?e.message:String(e))}finally{p(!1)}};return(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`model-usage-caps`,children:[(0,q.jsx)(`h2`,{id:`model-usage-caps`,tabIndex:-1,children:`Caps`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`Optional, and off until you turn one on. Codex reports usage when an answer ends, so its cap refuses the next question rather than stopping one partway. `,(0,q.jsx)(Iw,{topic:`caps`})]}),e.problem&&(0,q.jsxs)(`p`,{role:`alert`,className:`failure`,children:[e.problem,` Until the caps can be read, the agent answers nothing.`]}),m&&(0,q.jsx)(`p`,{className:`note`,children:m}),(0,q.jsxs)(`form`,{className:`caps-form`,onSubmit:e=>void g(e),children:[(0,q.jsxs)(`fieldset`,{className:`caps-grid`,disabled:!!m||f,children:[(0,q.jsx)(`legend`,{className:`sr-only`,children:`Caps per chat and per day`}),pD.map(e=>{let t=r[e.key],n=t=>i(n=>({...n,[e.key]:{...n[e.key],...t}})),a=`cap-${e.key.replace(`.`,`-`)}`;return(0,q.jsxs)(`div`,{className:`cap-row`,"data-cap":e.key,children:[(0,q.jsxs)(`label`,{className:`cap-on`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:t.on,onChange:e=>n({on:e.target.checked})}),YE[e.adapter],`, `,e.scope===`chat`?`per chat`:`per day (UTC)`]}),(0,q.jsxs)(`label`,{htmlFor:`${a}-limit`,className:`sr-only`,children:[YE[e.adapter],` `,e.scope===`chat`?`per-chat`:`per-day`,` limit`]}),(0,q.jsx)(`input`,{id:`${a}-limit`,className:`cap-limit`,inputMode:`decimal`,value:t.limit,disabled:!t.on,placeholder:t.on?`limit`:`off`,onChange:e=>n({limit:e.target.value})}),(0,q.jsxs)(`label`,{htmlFor:`${a}-unit`,className:`sr-only`,children:[YE[e.adapter],` `,e.scope===`chat`?`per-chat`:`per-day`,` unit`]}),(0,q.jsx)(`select`,{id:`${a}-unit`,value:t.unit,disabled:!t.on,onChange:e=>n({unit:e.target.value}),children:e.units.map(e=>(0,q.jsx)(`option`,{value:e,children:mD[e]},e))}),(0,q.jsx)(`code`,{className:`cap-key`,children:e.key})]},e.key)})]}),(0,q.jsxs)(`fieldset`,{className:`rates-grid`,disabled:!!m||f,children:[(0,q.jsx)(`legend`,{children:`Codex rates, in dollars per million tokens`}),(0,q.jsx)(`p`,{className:`note`,children:`The Codex SDK reports tokens and no dollar figure. With your rates, Toil UI computes one for each Codex answer from now on, labelled as computed from your rates. Leave all three empty for none.`}),[[`input`,`Input`],[`cached`,`Cached input`],[`output`,`Output`]].map(([e,t])=>(0,q.jsxs)(`label`,{className:`rate`,children:[t,(0,q.jsx)(`input`,{inputMode:`decimal`,value:o[e],onChange:t=>s(n=>({...n,[e]:t.target.value}))})]},e))]}),(0,q.jsxs)(`div`,{className:`conn-actions`,children:[(0,q.jsx)(`button`,{type:`submit`,className:`btn btn--accent`,disabled:!!m||f,children:`Save caps and rates`}),(0,q.jsx)(`span`,{className:`runs`,role:`status`,children:u})]}),c&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:c})]})]})}var qH=`#/settings/connections/+add`,JH=`#/settings/dossiers/+new`,YH=[{page:`connections`,label:`Connections`,about:`The connections toil uses: add, test, set the default, turn writes on or off, replace a secret, remove.`,topic:`connections`},{page:`dossiers`,label:`Dossiers`,about:`Set up a repository that has a dossier, create dossiers, and give them repositories, areas, field names, people and a work-in-progress limit.`,topic:`dossier-setup`},{page:`toil`,label:`General`,about:`How Toil UI looks, talks, moves, notifies and links out in this browser, and the settings toil has no command for.`,topic:`bounds`},{page:`usage`,label:`Usage`,about:`How toil is used on this machine: calls per day, the commands used and failing most, and the ones never called, from toil's local audit log.`,topic:`audit`},{page:`agent-usage`,label:`Agent usage`,about:`What the agent's models used in your chats, and optional caps that stop a runaway.`,topic:`model-usage`},{page:`agent`,label:`Agent`,about:`Which agent answers questions in the chat, and your own instructions for it.`,topic:`agent`}];function XH({page:e,at:t=[],config:n,agent:r,modelUsage:i=null}){let a=YH.find(t=>t.page===e),o=t[0]===`+add`||t[0]===`+new`,s=rC();return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`p`,{className:`eyebrow`,children:s(`settings.eyebrow`)}),(0,q.jsx)(`h1`,{tabIndex:-1,children:`toil's configuration`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`What `,(0,q.jsx)(`code`,{children:`toil connections`}),` and `,(0,q.jsx)(`code`,{children:`toil dossiers`}),` manage, through toil's own commands. `,(0,q.jsx)(Iw,{topic:`settings`})]})]}),(0,q.jsx)(`nav`,{className:`subnav`,"aria-label":`Settings pages`,children:(0,q.jsx)(`ul`,{children:YH.map(t=>(0,q.jsx)(`li`,{children:(0,q.jsx)(`a`,{href:`#/settings/${t.page}`,"aria-current":t.page===e?`page`:void 0,children:t.label})},t.page))})}),n?.disabled&&e!==`agent`&&e!==`usage`&&e!==`agent-usage`&&(0,q.jsxs)(`p`,{className:`config-off`,children:[(0,q.jsx)(`strong`,{children:`Changes are turned off.`}),` `,n.disabled]}),(0,q.jsx)(`h2`,{className:`page-title`,children:a.label}),(0,q.jsxs)(`p`,{className:`lede`,children:[a.about,` `,(0,q.jsx)(Iw,{topic:a.topic})]}),e===`toil`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(CH,{}),(0,q.jsx)(mH,{}),(0,q.jsx)(yO,{}),(0,q.jsx)(hH,{})]}),e===`agent`?r?(0,q.jsx)(oV,{...r}):(0,q.jsx)(sV,{}):e===`agent-usage`?(0,q.jsx)(UH,{api:i,landOn:t[0]===`caps`?`model-usage-caps`:null}):n?e===`connections`?(0,q.jsx)(BV,{config:n,...o?{toForm:!0}:t[0]?{at:t[0]}:{}}):e===`dossiers`?(0,q.jsx)(nH,{config:n,...o?{toForm:!0}:t[0]?{at:{dossier:t[0],section:t[1]??null}}:{}}):e===`usage`?(0,q.jsx)(IH,{config:n}):(0,q.jsx)(fH,{config:n}):(0,q.jsx)(`p`,{className:`failure`,children:`This app wasn't given toil's config commands, so there is nothing to show.`})]})}var ZH=`npx @imagile-dev/toil-ui --sample`,QH=new Set(Object.entries(Kv).flatMap(([e,t])=>t.items.length?[e]:[]));function $H(e,t,n){return e===0||n&&t!==null&&Object.keys(t).length===0}function eU({dossiers:e,synced:t,config:n,onSync:r,lede:i}){let[a,o]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(!n)return;let e=!0;return n.run(`connections list`,{}).then(t=>{if(!e)return;if(!t.ok)return o({ok:!1,message:t.error?.message??`toil connections list failed.`});let n=t.data.connections??[];o({ok:!0,names:n.filter(e=>QH.has(e.area)).map(e=>e.name)})},t=>e&&o({ok:!1,message:t instanceof Error?t.message:String(t)})),()=>{e=!1}},[n]);let s=a?.ok===!0&&a.names.length>0,c=t!==null&&Object.keys(t).length>0;return(0,q.jsxs)(`section`,{className:`first-run`,"aria-labelledby":`first-run`,"data-first-run":``,children:[(0,q.jsxs)(`div`,{className:`first-run__head`,children:[(0,q.jsx)(`h2`,{id:`first-run`,children:`Get started`}),(0,q.jsx)(Iw,{topic:`first-run`})]}),i&&(0,q.jsx)(`p`,{className:`note`,children:i}),(0,q.jsxs)(`div`,{className:`first-run__body`,children:[(0,q.jsxs)(`ol`,{className:`first-run__steps`,children:[(0,q.jsx)(tU,{n:1,title:`Connect a tracker`,topic:`connections`,done:s,detail:s?a.names.join(`, `):a?.ok===!1?`toil connections list failed: ${a.message}`:null,children:(0,q.jsx)(`a`,{className:`btn`,href:qH,"data-first-run-step":`connect`,children:`Add a connection`})}),(0,q.jsx)(tU,{n:2,title:`Create a dossier`,topic:`dossier-setup`,done:e>0,detail:null,children:(0,q.jsx)(`a`,{className:`btn`,href:JH,"data-first-run-step":`dossier`,children:`Create a dossier`})}),(0,q.jsx)(tU,{n:3,title:`Sync`,topic:`sync`,done:c,detail:r?null:`This Toil UI keeps no cache, so it has nothing to sync.`,children:r&&(0,q.jsx)(W,{className:`btn`,onPress:r,isDisabled:e===0,"data-first-run-step":`sync`,children:`Sync now`})})]}),(0,q.jsxs)(`section`,{className:`first-run__sample`,"aria-labelledby":`first-run-sample`,children:[(0,q.jsxs)(`div`,{className:`first-run__head`,children:[(0,q.jsx)(`h3`,{id:`first-run-sample`,children:`Try the sample data`}),(0,q.jsx)(Iw,{topic:`sample-data`})]}),(0,q.jsxs)(`p`,{className:`first-run__command`,children:[(0,q.jsx)(`code`,{children:ZH}),` `,(0,q.jsx)(iE,{value:ZH,what:`sample data command`})]})]})]})]})}function tU({n:e,title:t,topic:n,done:r,detail:i,children:a}){return(0,q.jsxs)(`li`,{className:`first-run__step${r?` first-run__step--done`:``}`,"data-done":r||void 0,children:[(0,q.jsx)(`span`,{className:`first-run__mark`,"aria-hidden":`true`,children:r?`✓`:e}),(0,q.jsxs)(`div`,{className:`first-run__what`,children:[(0,q.jsxs)(`div`,{className:`first-run__head`,children:[(0,q.jsx)(`h3`,{className:`first-run__title`,children:t}),(0,q.jsx)(Iw,{topic:n})]}),(0,q.jsxs)(`p`,{className:`first-run__state`,children:[(0,q.jsx)(`strong`,{children:r?`Done`:`Not done yet`}),i&&(0,q.jsx)(`span`,{className:`note`,children:i})]})]}),!r&&a&&(0,q.jsx)(`div`,{className:`first-run__action`,children:a})]})}var nU=`toil-ui:looked`;function rU(){try{let e=JSON.parse(window.localStorage.getItem(nU)??`{}`);return typeof e!=`object`||!e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`&&!Number.isNaN(Date.parse(e[1]))))}catch{return{}}}function iU(e){try{window.localStorage.setItem(nU,JSON.stringify(e))}catch{}}var aU=e=>rU()[e]??null;function oU(e){let t=rU();return e.filter(e=>t[e]).sort((e,n)=>t[e]<t[n]?1:-1)[0]??null}function sU(e,t=new Date().toISOString()){iU({...rU(),[e]:t})}function cU(e,t){let{[e]:n,...r}=rU();n!==void 0&&iU({...r,[t]:n})}var lU=e=>e.statusCategory===`DONE`;function uU(e,t){return!lU(e)&&e.links.some(e=>e.type===`blocks`&&e.direction===`inward`&&t.has(e.target)&&!lU(t.get(e.target)))}function dU(e,t,n){let r=new Map(e.items.map(e=>[e.id,e])),i=tg(e.items,e.changes,t),a=null;if(i){let e=MI(i,t);a={name:i.sprint.name,daysLeft:Math.max(0,i.days.total-i.days.gone),daysTotal:i.days.total,done:i.done.points,scope:i.done.points+i.remaining.points,burn:e.days.map(e=>({scope:e.scope,done:e.done})),ahead:e.ahead}}let o=e.pullRequests??[],s=e.items.filter(e=>e.statusCategory===`IN_PROGRESS`).length,c=e.items.filter(e=>uU(e,r)).length,l=o.filter(e=>e.state===`OPEN`&&c_(e,t).on===`review`).length,u=Y_({dossier:e.name,entries:e.people??[],wipLimit:e.wipLimit??null,items:e.items,changes:o,now:t}),d=[...u.people,...u.unmapped].map(e=>({key:e.who.key,name:e.who.name,kind:e.who.kind})),f=n===null?null:e.items.filter(e=>e.updated!==null&&e.updated>n).length+o.filter(e=>e.updated!==null&&e.updated>n).length;return{sprint:a,inProgress:s,blocked:c,awaitingReview:l,people:d,changedSince:f,motion:s+c+l}}function fU(e,t,n){if(e.length===1)return e[0];let r=oU(e);if(r)return r;if(!n)return null;let i=e.filter(e=>t.has(e)).sort((e,n)=>t.get(n).motion-t.get(e).motion);return i[0]&&t.get(i[0]).motion>0?i[0]:null}function pU({dossiers:e,calls:t,loaded:n,now:r,synced:i,config:a,onDescribed:o,onSync:s}){let c=rC(),l=new Map;for(let t of e){let e=n[t.name];e?.ok&&l.set(t.name,dU(e.value,r,aU(t.name)))}let u=fU(e.map(e=>e.name),l,e.every(e=>n[e.name]!==void 0)),d=u?[...e.filter(e=>e.name===u),...e.filter(e=>e.name!==u)]:e;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`h1`,{tabIndex:-1,children:`Dossiers`}),(0,q.jsxs)(`p`,{className:`lede`,children:[c(`dossiers.lede`),` `,(0,q.jsx)(Iw,{topic:`dossiers`})]})]}),$H(e.length,i,!!s)&&(0,q.jsx)(eU,{dossiers:e.length,synced:i,config:a,onSync:s,...e.length===0?{lede:c(`empty.dossiers`)}:{}}),e.length===0?null:(0,q.jsx)($T,{className:`dossiers`,min:`sm`,children:d.map(e=>(0,q.jsx)(`li`,{className:e.name===u?`dossiers__lead`:void 0,children:(0,q.jsx)(hU,{summary:e,loaded:n[e.name],preview:l.get(e.name)??null,synced:i?i[e.name]??null:void 0,lead:e.name===u,config:a,onDescribed:o})},e.name))}),(0,q.jsx)(mj,{calls:t})]})}var mU=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function hU({summary:e,loaded:t,preview:n,synced:r,lead:i,config:a,onDescribed:o}){let{Avatar:s}=ST(),c=`dossier-${e.name}`,l=n?.people.slice(0,6)??[],u=(n?.people.length??0)-l.length;return(0,q.jsxs)(Q,{className:`dossier-card${i?` dossier-card--lead`:``}`,"aria-labelledby":c,children:[(0,q.jsxs)(`div`,{className:`dossier-card__head`,children:[(0,q.jsx)(`h2`,{id:c,children:(0,q.jsx)(DL,{field:`name`,dossier:e.name,value:e.name,config:a,onSaved:o,children:(0,q.jsx)(`a`,{href:bg(e.name),children:e.name})})}),(0,q.jsx)(DL,{field:`description`,dossier:e.name,value:e.description,config:a,onSaved:o,children:e.description?(0,q.jsx)(`span`,{className:`dossier-card__desc`,children:e.description}):(0,q.jsx)(`span`,{className:`note`,children:`No description`})})]}),(0,q.jsx)(`div`,{className:`dossier-card__body`,children:t?t.ok?n?(0,q.jsxs)(q.Fragment,{children:[n.sprint?(0,q.jsxs)(`div`,{className:`dossier-card__sprint`,children:[(0,q.jsx)(EL,{sprint:n.sprint}),(0,q.jsx)(TL,{sprint:n.sprint})]}):(0,q.jsx)(`p`,{className:`note`,children:`No sprint running.`}),(0,q.jsx)(CL,{preview:n,sprint:!1}),l.length>0&&(0,q.jsxs)(`ul`,{className:`avatars`,"aria-label":`People: ${n.people.map(e=>e.name).join(`, `)}`,children:[l.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(s,{person:{id:e.key,name:e.name,email:null},labelled:!0})},e.key)),u>0&&(0,q.jsxs)(`li`,{className:`avatars__more`,"aria-hidden":`true`,children:[`+`,u]})]})]}):null:(0,q.jsxs)(`p`,{className:`note`,children:[`Its work couldn't be read: `,t.message]}):(0,q.jsx)(`p`,{className:`note`,role:`status`,children:`Reading what the last sync stored…`})}),(0,q.jsxs)(`div`,{className:`dossier-card__foot`,children:[(0,q.jsx)(SL,{sources:e.sources,dossier:e.name}),(0,q.jsxs)(`p`,{className:`note dossier-card__when`,children:[r===void 0?`Sample data.`:r===null?`Not synced yet.`:`Synced ${Y(r.at)}${r.status===`ok`?``:r.status===`partial`?`, some sources failed`:`, and it failed`}.`,n&&n.changedSince!==null&&(0,q.jsxs)(q.Fragment,{children:[` `,n.changedSince?`${mU(n.changedSince,`change`)} since you last looked.`:`Nothing changed since you last looked.`]})]})]})]})}var gU=`toil-ui:splash`,_U=e=>typeof e==`string`&&!Number.isNaN(Date.parse(e)),vU=e=>typeof e==`number`&&Number.isInteger(e)&&e>=0;function yU(){try{let e=JSON.parse(window.localStorage.getItem(gU)??`{}`);return typeof e!=`object`||!e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>{let t=e[1];return typeof t==`object`&&!!t&&_U(t.start)&&_U(t.end)&&vU(t.done)}))}catch{return{}}}function bU(e){try{window.localStorage.setItem(gU,JSON.stringify(e))}catch{}}function xU(e,t){let{[e]:n,...r}=yU();if(!t?.sprint.start||!t.sprint.end){n&&bU(r);return}let i={start:t.sprint.start,end:t.sprint.end,done:t.done.count};n&&n.start===i.start&&n.end===i.end&&n.done===i.done||bU({...r,[e]:i})}function SU(e,t){let{[e]:n,...r}=yU();n&&bU({...r,[t]:n})}function CU(e,t){let n=yU()[e],r=Date.parse(t);if(!n||Number.isNaN(r)||r<Date.parse(n.start)||r>=Date.parse(n.end))return null;let{gone:i,total:a}=Zh(n.start,n.end,t);return a<1?null:{dossier:e,day:Math.min(a,Math.max(1,i)),days:a,done:n.done}}var wU=new WeakMap;function TU(e,t){let n=wU.get(e);return n||wU.set(e,n=new Yx(e)),n.item(t,{limit:5})?.matches??[]}var EU={blocks:[`Blocks`,`Blocked by`],relates:[`Relates to`,`Relates to`],duplicates:[`Duplicates`,`Duplicated by`],implements:[`Implements`,`Implemented by`],other:[`Linked to`,`Linked from`]};function DU({id:e}){let{byId:t,dossier:n,now:r,sync:i}=J(),a=JS(),o=nC(),{insights:s}=fg(),c=t.get(e);if(!c)return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h1`,{tabIndex:-1,children:`No such item`}),(0,q.jsx)(wj,{message:`The dossier has no item ${e}.`,action:(0,q.jsxs)(Tj,{href:bg(n.name),children:[`Back to `,n.name]})})]});let l=n.changes.filter(t=>t.items.includes(e)),u=n.deployments.filter(t=>t.items.includes(e)),d=qh(c),f=mg(c.source.area),p=sg(c,s),m=Ph(c),h=Lh(c,r),g=e=>Math.round(e*10)/10,_=TU(n.items,e);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsxs)(`p`,{className:`eyebrow`,children:[f,` `,hg(c)]}),(0,q.jsx)(`h1`,{tabIndex:-1,children:c.title}),(0,q.jsxs)(`p`,{className:`item-meta`,children:[(0,q.jsx)(Fj,{category:c.statusCategory,status:c.status}),` `,(0,q.jsx)(Pj,{person:c.assignee}),` `,yg(c.assignee),c.url&&(0,q.jsxs)(q.Fragment,{children:[` · `,(0,q.jsxs)(`a`,{href:c.url,children:[`Open in `,f]})]})]})]}),(0,q.jsxs)(Q,{as:`section`,className:`panel insights-panel`,"aria-labelledby":`insights`,children:[(0,q.jsx)(`h2`,{id:`insights`,children:`Insights`}),p.length?(0,q.jsx)(`ul`,{className:`rows`,children:p.map(e=>(0,q.jsxs)(`li`,{className:`insight-row insight-row--w${e.weight}`,children:[(0,q.jsx)(`span`,{className:`insight insight--w${e.weight}`,children:rg[e.code]}),` `,(0,q.jsx)(GT,{text:e.text}),`.`,` `,(0,q.jsxs)(`span`,{className:`field`,children:[`Source: `,(0,q.jsx)(`code`,{children:e.evidence})]})]},e.code))}):(0,q.jsx)(`p`,{children:c.statusCategory===`DONE`?`Done: nothing to act on.`:`Nothing stands out.`}),(0,q.jsx)(`p`,{className:`note`,children:m?m.days===null?`Cycle time unknown: ${m.reason}.`:`Cycle time ${g(m.days)} days, from ${Y(m.start)} to ${Y(m.end)}.`:h?h.days===null?`Time in progress unknown: ${h.reason}.`:`In progress for ${g(h.days)} days, since ${Y(h.since)}.`:`Not started.`})]}),(0,q.jsx)(Cj,{item:c},c.id),(0,q.jsxs)(Q,{as:`section`,className:`panel duplicates-panel`,"aria-labelledby":`duplicates`,children:[(0,q.jsx)(`h2`,{id:`duplicates`,children:`Possible duplicates`}),_.length?(0,q.jsx)(`ul`,{className:`rows`,children:_.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{id:e.id,withTitle:!0}),` `,(0,q.jsxs)(`span`,{className:`score`,children:[Math.round(e.score*100),`% alike`]}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,e.why.summary.replace(/\.$/,``),`)`]})]},e.id))}):(0,q.jsxs)(`p`,{children:[`None in `,n.name,`: no item shares enough words with this one.`]}),(0,q.jsxs)(`p`,{className:`note`,children:[`By shared words in titles and bodies, title trigrams, labels, parent and links, as `,(0,q.jsx)(`code`,{children:`toil util owi similar`}),` scores them: not by meaning, so a duplicate written in other words isn't found.`]})]}),(0,q.jsx)(nF,{item:c}),(0,q.jsxs)(`div`,{className:`item-grid`,children:[(0,q.jsxs)(`section`,{"aria-labelledby":`fields`,children:[(0,q.jsxs)(`div`,{className:`edit-head`,children:[(0,q.jsx)(`h2`,{id:`fields`,children:`Fields`}),(0,q.jsx)(Bw,{href:Mg(n.name,`fields`),label:`Edit ${n.name}'s field names`})]}),(0,q.jsxs)(`dl`,{className:`fields`,children:[(0,q.jsx)(`dt`,{children:`Source`}),(0,q.jsxs)(`dd`,{children:[f,`, connection `,(0,q.jsx)(`code`,{children:c.source.connection}),` `,(0,q.jsx)(Bw,{href:jg(c.source.connection),label:`Edit the ${c.source.connection} connection`}),`, read with `,(0,q.jsxs)(`code`,{children:[`toil `,c.source.command]})]}),(0,q.jsx)(`dt`,{children:`Type`}),(0,q.jsx)(`dd`,{children:YT(c,a)}),(0,q.jsx)(`dt`,{children:`Status`}),(0,q.jsxs)(`dd`,{children:[c.status??`None`,` (`,Ig[c.statusCategory],`)`,c.resolution&&`, resolution ${c.resolution}`]}),(0,q.jsx)(`dt`,{children:`Estimate`}),(0,q.jsxs)(`dd`,{children:[Lg(c),c.estimate&&(0,q.jsxs)(q.Fragment,{children:[`, from `,(0,q.jsx)(`code`,{children:c.estimate.field})]})]}),(0,q.jsx)(`dt`,{children:`Assignee`}),(0,q.jsx)(`dd`,{children:yg(c.assignee)}),(0,q.jsx)(`dt`,{children:o(`priority`,`Priority`)}),(0,q.jsx)(`dd`,{children:c.priority??`None`}),(0,q.jsx)(`dt`,{children:`Sprint`}),(0,q.jsxs)(`dd`,{children:[c.iteration?c.iteration.path??c.iteration.name:`None`,c.iteration&&d.kind!==`planned`&&(0,q.jsxs)(q.Fragment,{children:[` `,`(`,d.kind===`added`?`added mid-sprint`:`carried over from ${d.from}`,`, source `,(0,q.jsx)(`code`,{children:d.evidence}),`)`]})]}),(0,q.jsx)(`dt`,{children:`Parent`}),(0,q.jsx)(`dd`,{children:c.parent?(0,q.jsx)(UT,{id:c.parent,withTitle:!0}):`None`}),(0,q.jsx)(`dt`,{children:`Labels`}),(0,q.jsx)(`dd`,{children:c.labels.length?c.labels.join(`, `):`None`}),(0,q.jsx)(`dt`,{children:`Created`}),(0,q.jsx)(`dd`,{children:c.created?Y(c.created):`Unknown`}),(0,q.jsx)(`dt`,{children:`Updated`}),(0,q.jsx)(`dd`,{children:c.updated?Y(c.updated):`Unknown`}),c.resolved&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`dt`,{children:`Resolved`}),(0,q.jsx)(`dd`,{children:Y(c.resolved)})]})]})]}),(0,q.jsxs)(`section`,{"aria-labelledby":`related`,children:[(0,q.jsx)(`h2`,{id:`related`,children:`Related work`}),c.children.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h3`,{children:`Children`}),(0,q.jsx)(`ul`,{className:`rows`,children:c.children.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(UT,{id:e,withTitle:!0})},e))})]}),(0,q.jsx)(`h3`,{children:`Links`}),c.links.length?(0,q.jsx)(`ul`,{className:`rows`,children:c.links.map((e,t)=>(0,q.jsxs)(`li`,{children:[EU[e.type][e.direction===`outward`?0:1],` `,(0,q.jsx)(UT,{id:e.target,withTitle:!0}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,e.name,`)`]})]},t))}):(0,q.jsx)(`p`,{children:`None.`}),(0,q.jsx)(`h3`,{children:`Pull requests and builds`}),l.length?(0,q.jsx)(`ul`,{className:`rows`,children:l.map(e=>(0,q.jsxs)(`li`,{children:[e.url?(0,q.jsx)(`a`,{href:e.url,children:e.title}):e.title,` `,(0,q.jsx)(Rj,{of:e}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,(0,q.jsxs)(`code`,{children:[`toil `,e.command]}),`)`]})]},e.id))}):(0,q.jsx)(`p`,{children:`None linked.`}),(0,q.jsx)(`h3`,{children:`Deployed to`}),u.length?(0,q.jsx)(`ul`,{className:`rows`,children:u.map(e=>(0,q.jsxs)(`li`,{children:[e.environment,`: `,e.name,`, commit `,(0,q.jsx)(`code`,{children:e.commit}),` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,(0,q.jsxs)(`code`,{children:[`toil `,e.command]}),`)`]})]},e.id))}):(0,q.jsx)(`p`,{children:`Not deployed anywhere the dossier names.`})]}),(0,q.jsxs)(`section`,{"aria-labelledby":`history`,children:[(0,q.jsx)(`h2`,{id:`history`,children:`History`}),c.history?c.history.transitions.length===0?(0,q.jsx)(`p`,{children:`No status changes recorded.`}):(0,q.jsx)(nE,{label:`${hg(c)}'s status changes`,rows:c.history.transitions.map((e,t)=>({...e,i:t})),rowKey:e=>String(e.i),columns:[{header:`When`,label:`When`,cell:e=>Y(e.at)},{header:`From`,label:`From`,cell:e=>e.from??`Created`},{header:`To`,label:`To`,cell:e=>e.to},{header:`By`,label:`By`,cell:e=>e.by?yg(e.by):`Unknown`}]}):(0,q.jsxs)(`p`,{children:[`No history synced for this item. `,i&&(0,q.jsx)(Ej,{onPress:i,children:`Sync now`})]}),c.unmapped.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h3`,{children:`Not mapped`}),(0,q.jsx)(`ul`,{className:`rows`,children:c.unmapped.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`code`,{children:e.field}),`: `,e.reason]},e.field))})]})]})]})]})}var OU=e=>e?Y(e):`not yet`;function kU({id:e}){let{dossier:t,assignments:n,now:r}=J(),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)(0),g=(0,v.useCallback)(()=>h(e=>e+1),[]);(0,v.useEffect)(()=>{if(!n)return;let t=!0;return n.get(e).then(e=>t&&(a(e),s(null)),e=>t&&s(e instanceof Error?e.message:String(e))),()=>{t=!1}},[n,e,m]);let _=i?.state===`working`||i?.state===`queued`&&i.waiting===`slot`;if((0,v.useEffect)(()=>{if(!_)return;let e=setInterval(g,WP);return()=>clearInterval(e)},[_,g]),!n||o&&!i)return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`h1`,{tabIndex:-1,children:`No such assignment`}),(0,q.jsx)(wj,{message:o??`This view has no agent assignments.`,action:(0,q.jsxs)(Tj,{href:bg(t.name),children:[`Back to `,t.name]})})]});if(!i)return(0,q.jsx)(`p`,{className:`note`,children:`Reading the assignment…`});let y=async(e,t)=>{d(!0),l(null);try{await t(),l(e)}catch(e){l(e instanceof Error?e.message:String(e))}finally{d(!1),g()}},b=i,x=b.state===`queued`&&b.waiting===`start`;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsxs)(`p`,{className:`eyebrow`,children:[(0,q.jsx)(`a`,{href:bg(b.dossier),children:b.dossier}),` · Agent assignment`]}),(0,q.jsxs)(`h1`,{tabIndex:-1,children:[OD[b.mode].label,`: `,b.itemTitle]}),(0,q.jsxs)(`p`,{className:`item-meta`,children:[(0,q.jsx)(KP,{a:b}),` `,(0,q.jsx)(UT,{id:b.item}),` · `,b.adapter?DD[b.adapter]:`no adapter chosen yet`,` `,(0,q.jsx)(Bw,{href:Ng,label:`Edit the agent settings`}),` · `,b.origin===`tracker`?`queued by the tracker (${b.trigger})`:`assigned in Toil UI`]}),(0,q.jsxs)(`p`,{className:`note`,children:[`Created `,OU(b.createdAt),`; started `,OU(b.startedAt),`; `,b.endedAt?`ended ${OU(b.endedAt)}`:`still going`,`; ran `,jD(b.ranMs??AD(b,r)),`; `,qP(b),`. `,OD[b.mode].changes]})]}),b.stop&&(0,q.jsxs)(`p`,{role:`note`,className:b.stop.reason===`injection`?`assign-warn`:`failure`,children:[b.stop.message,` `,b.stop.fix]}),b.stale&&(0,q.jsxs)(`div`,{className:`stale-block`,children:[(0,q.jsx)(CD,{stale:b.stale}),(0,q.jsx)(`p`,{className:`note`,children:MD(b)??`Renew starts it again as a fresh assignment on today's instructions, with what this run left as context. This one stays as it is.`})]}),b.renews&&(0,q.jsxs)(`p`,{className:`note`,children:[`This renews `,(0,q.jsx)(`a`,{href:HP(b.dossier,b.renews),children:`an earlier assignment`}),` on the same item, which started on older instructions; what it left was in this run's prompt.`]}),b.renewedBy&&(0,q.jsxs)(`p`,{className:`note`,children:[`Renewed as `,(0,q.jsx)(`a`,{href:HP(b.dossier,b.renewedBy),children:`a fresh assignment`}),` on today's instructions.`]}),(0,q.jsxs)(QT,{className:`assign-actions`,children:[b.stale&&!MD(b)&&(0,q.jsx)(W,{className:`btn btn--accent`,onPress:()=>y(`Renewed.`,async()=>{let e=await n.renew(b.id);return window.location.hash=HP(e.dossier,e.id),e}),isDisabled:u,"data-renew":``,children:`Renew`}),x&&(0,q.jsx)(W,{className:`btn btn--accent`,onPress:()=>p(!0),isDisabled:u,children:`Start…`}),(b.state===`queued`||b.state===`working`)&&(0,q.jsx)(W,{className:`btn`,onPress:()=>y(b.state===`working`?`Stopping it.`:`Taken off the queue.`,()=>n.cancel(b.id)),isDisabled:u,children:b.state===`working`?`Stop`:`Take off the queue`}),b.state===`needs-you`&&(0,q.jsx)(W,{className:`btn`,onPress:()=>y(`Marked reviewed.`,()=>n.finish(b.id)),isDisabled:u,children:`Mark reviewed`}),(0,q.jsx)(`span`,{className:`note`,role:`status`,children:c??``})]}),x&&(0,q.jsx)(XP,{item:{id:b.item,title:b.itemTitle},start:b,isOpen:f,onOpenChange:p,onDone:g}),b.questions.length>0&&(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`assign-questions`,children:[(0,q.jsx)(`h2`,{id:`assign-questions`,children:`Questions for you`}),(0,q.jsx)(`ul`,{className:`rows`,children:b.questions.map((e,t)=>(0,q.jsx)(`li`,{children:e},t))}),(0,q.jsx)(`p`,{className:`note`,children:`Answer them on the item, then assign it again; or mark this reviewed.`})]}),b.report&&(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`assign-report`,children:[(0,q.jsx)(`h2`,{id:`assign-report`,children:b.mode===`investigate`?`Report`:`What the agent said`}),(b.report.warnings.length>0||b.report.unverified.length>0)&&(0,q.jsx)(`div`,{className:`answer-checks`,role:`note`,children:b.report.warnings.map((e,t)=>(0,q.jsx)(`p`,{children:e},t))}),b.report.parts.map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(GT,{text:e.text,chips:!0})},t)),b.usage&&(0,q.jsx)(yD,{usage:b.usage})]}),b.branch&&(0,q.jsxs)(Q,{as:`section`,className:`panel`,"aria-labelledby":`assign-branch`,children:[(0,q.jsxs)(`h2`,{id:`assign-branch`,children:[`Branch `,b.branch.name]}),(0,q.jsxs)(`p`,{children:[`In a clone of `,b.branch.repo,` at `,(0,q.jsx)(aE,{value:b.branch.folder,what:`folder`}),`, `,b.branch.onBranch?`on ${b.branch.name}`:`not on ${b.branch.name}`,`, with `,b.branch.files.length===1?`one changed file`:`${b.branch.files.length} changed files`,`, staged and not committed.`]}),b.branch.files.length>0&&(0,q.jsx)(`ul`,{className:`rows`,children:b.branch.files.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`code`,{children:e.path}),` `,(0,q.jsx)(`span`,{className:`note`,children:e.status}),b.branch?.hidden?.includes(e.path)&&(0,q.jsx)(`span`,{className:`assign-stop`,children:` not in the diff below`})]},`${e.status}:${e.path}`))}),b.branch.diff&&(0,q.jsx)(tE,{label:`The staged diff`,children:(0,q.jsx)(`pre`,{className:`assign-diff`,children:(0,q.jsx)(`code`,{children:b.branch.diff})})})]}),b.proposals.length>0&&(0,q.jsxs)(`section`,{className:`proposals`,"aria-labelledby":`assign-proposals`,children:[(0,q.jsx)(`h2`,{id:`assign-proposals`,children:`Proposals`}),(0,q.jsx)(`p`,{className:`note`,children:`Each change the agent proposes, with what it would set. Apply runs its toil command through the write gate: the connection needs writes on, and this press is the call's allow-write. Nothing has changed until then.`}),b.proposals.map(e=>(0,q.jsx)(jU,{p:e,busy:u,onApply:()=>y(`Applied: ${e.title}.`,()=>n.apply(b.id,e.id)),onDismiss:()=>y(`Dismissed: ${e.title}.`,()=>n.dismiss(b.id,e.id))},e.id))]}),b.startedOn&&(0,q.jsxs)(`details`,{className:`assign-record`,children:[(0,q.jsx)(`summary`,{children:`What this run started on`}),(0,q.jsxs)(`dl`,{className:`fields`,children:[(0,q.jsx)(`dt`,{children:`toil`}),(0,q.jsx)(`dd`,{children:b.startedOn.toil}),(0,q.jsx)(`dt`,{children:`Toil UI`}),(0,q.jsx)(`dd`,{children:b.startedOn.toilUi}),(0,q.jsx)(`dt`,{children:`Adapter`}),(0,q.jsxs)(`dd`,{children:[DD[b.startedOn.adapter],`, `,b.startedOn.model??`the CLI's default model`]}),(0,q.jsx)(`dt`,{children:`Skills`}),(0,q.jsx)(`dd`,{children:b.startedOn.skills.length?b.startedOn.skills.join(`, `):`none: Toil UI gives an assigned agent its tools and prompt only`}),(0,q.jsx)(`dt`,{children:`Tools`}),(0,q.jsx)(`dd`,{className:`any-break`,children:b.startedOn.tools.join(`, `)}),(0,q.jsx)(`dt`,{children:`Dossier`}),(0,q.jsxs)(`dd`,{className:`any-break`,children:[b.startedOn.dossier.name,`, `,(0,q.jsx)(`code`,{children:b.startedOn.dossier.fingerprint??`unread`})]}),(0,q.jsx)(`dt`,{children:`Item`}),(0,q.jsxs)(`dd`,{className:`any-break`,children:[b.startedOn.item.id,`, updated `,b.startedOn.item.updated?Y(b.startedOn.item.updated):`at an unknown time`,`, `,(0,q.jsx)(`code`,{children:b.startedOn.item.fingerprint})]}),(0,q.jsx)(`dt`,{children:`Prompt`}),(0,q.jsx)(`dd`,{className:`any-break`,children:(0,q.jsx)(`code`,{children:b.startedOn.prompt})}),(0,q.jsx)(`dt`,{children:`Install fingerprint`}),(0,q.jsx)(`dd`,{className:`any-break`,children:b.startedOn.fingerprint?(0,q.jsxs)(q.Fragment,{children:[`toil `,b.startedOn.fingerprint.toil.version,` at `,b.startedOn.fingerprint.toil.commit?.slice(0,7)??`an unrecorded commit`,`, Toil UI `,b.startedOn.fingerprint.toilUi.version,` at `,b.startedOn.fingerprint.toilUi.commit?.slice(0,7)??`an unrecorded commit`,`; skills`,` `,Object.entries(b.startedOn.fingerprint.skills).map(([e,t])=>`${e} ${t.slice(0,12)}`).join(`, `)||`none`,`; dossier `,(0,q.jsx)(`code`,{children:b.startedOn.fingerprint.dossier?.slice(0,12)??`unread`}),`; prompts `,(0,q.jsx)(`code`,{children:b.startedOn.fingerprint.prompts.slice(0,12)})]}):`not recorded: this run started before Toil UI recorded one, so it is never called stale`})]}),(0,q.jsx)(`p`,{className:`note`,children:`Fingerprints are SHA-256 of what the run read, so a later look can tell whether the item, the dossier or the prompt has changed since.`})]}),(0,q.jsxs)(`details`,{className:`assign-transcript`,children:[(0,q.jsxs)(`summary`,{children:[`Transcript (`,b.transcript.length,` lines)`]}),(0,q.jsx)(`ol`,{className:`assign-lines`,children:b.transcript.map((e,t)=>(0,q.jsxs)(`li`,{className:`assign-line assign-line--${e.kind}`,children:[(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`span`,{className:`note`,children:Y(e.at)}),` `,(0,q.jsx)(`strong`,{children:e.title})]}),e.detail&&(0,q.jsx)(`pre`,{className:`assign-detail`,children:(0,q.jsx)(`code`,{children:e.detail})})]},t))})]})]})}var AU={pending:`Proposed change, not applied`,applied:`Applied`,failed:`Not applied: toil refused it`,dismissed:`Dismissed`};function jU({p:e,busy:t,onApply:n,onDismiss:r}){let i=e.status===`pending`||e.status===`failed`;return(0,q.jsxs)(jE,{proposal:e,kind:AU[e.status],actions:i?(0,q.jsxs)(q.Fragment,{children:[e.command&&e.input&&(0,q.jsxs)(W,{className:`btn btn--accent`,onPress:n,isDisabled:t,children:[`Apply`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,e.title]})]}),(0,q.jsxs)(W,{className:`btn btn--quiet`,onPress:r,isDisabled:t,children:[`Dismiss`,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,e.title]})]})]}):null,children:[e.diff.length>0&&(0,q.jsx)(nE,{label:`What ${e.title} changes`,caption:`What it changes`,rows:e.diff,rowKey:e=>e.field,columns:[{header:`Field`,label:`Field`,rowHeader:!0,cell:e=>(0,q.jsx)(`code`,{children:e.field})},{header:`Now`,label:`Now`,cell:e=>e.before===null?(0,q.jsx)(`span`,{className:`note`,children:`not in the synced item`}):e.before===``?(0,q.jsx)(`span`,{className:`note`,children:`empty`}):(0,q.jsx)(`span`,{className:`assign-before`,children:e.before})},{header:`Proposed`,label:`Proposed`,cell:e=>(0,q.jsx)(`span`,{className:`assign-after`,children:e.after})}]}),e.outcome&&(0,q.jsxs)(`p`,{className:e.outcome.ok?`note`:`failure`,role:`status`,children:[Y(e.outcome.at),`: `,e.outcome.message]})]})}function MU(e,t){return async n=>{let r=await e.list(t),i=r.adapters.filter(e=>!e.problem&&!e.implement),a=i.find(e=>e.name===r.preferred)??i[0];if(!a)throw Error(`No adapter here can take implement mode (only Codex can, once its SDK and CLI are set up under Settings, Agent), so nothing was started.`);if(!r.repos.length)throw Error(`${t} lists no repository with a local path, so implement mode has nothing to work in; add one with toil dossiers add-repo ${t} <folder>. Nothing was started.`);if(r.repos.length>1)throw Error(`${t} lists ${r.repos.length} repositories with a local path (${r.repos.map(e=>e.name).join(`, `)}), and one plan can't say which each item needs; assign each item from its page instead. Nothing was started.`);let o=new Set(r.assignments.filter(e=>e.mode===`implement`&&(e.state===`queued`||e.state===`working`)).map(e=>e.item)),s=n.items.filter(e=>!o.has(e)),c=[],l=[];for(let n of s)try{await e.assign({dossier:t,item:n,mode:`implement`,adapter:a.name,repo:r.repos[0].name}),c.push(n)}catch(e){l.push(`${n}: ${e instanceof Error?e.message:String(e)}`)}let u=n.items.length-s.length,d=`Queued ${(e=>e===1?`one implement assignment`:`${e} implement assignments`)(c.length)} on ${a.label}${u?`, leaving ${u} already queued or working`:``}.`;if(l.length)throw Error(`${d} ${l.length===1?`One item`:`${l.length} items`} couldn't be queued: ${l.join(`; `)}`);return`${d} They run ${r.settings.concurrent===1?`one at a time`:`${r.settings.concurrent} at a time`}; follow them in the Agents sidebar.`}}function NU(e=[]){let t=[...e],n=0,r=e=>t.filter(t=>t.dossier===e);return{list:async e=>MO(r(e)),get:async(e,t)=>NO(r(e),t),record:async(e,i,{startedAt:a,at:o,items:s,now:c})=>{let l=`analysis-${Date.parse(o).toString(36)}-${(n++).toString(36)}`;t.push(kO(i,{id:l,dossier:e,startedAt:a,at:o,snapshot:OO(s,c)}));let u=r(e).sort((e,t)=>e.at.localeCompare(t.at));for(let e of u.slice(0,Math.max(0,u.length-100)))t.splice(t.indexOf(e),1);return l}}}function PU(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t}function FU(e,t){if(!e.length)throw Error(`A theme with alignments lists at least two values (test/theme-rules.ts).`);return e[PU(t)%e.length]}var IU=e=>Math.round(e*10)/10,LU=e=>`${IU(e)} ${IU(e)===1?`day`:`days`}`,RU=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`,zU=e=>`${mg(e.area)} ${e.name&&e.name!==e.id?`${e.id} (${e.name})`:e.id}`;function BU(){let{dossier:e,now:t}=J(),n=nC(),r=HU(),i=(0,v.useMemo)(()=>Y_({dossier:e.name,entries:e.people??[],wipLimit:e.wipLimit??null,items:e.items,changes:e.pullRequests??[],now:t}),[e,t]),a=[...e.calls.dossier,...e.calls.work,...e.calls.prs],o=i.people.filter(e=>e.who.kind===`human`).length,s=i.people.length-o;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`p`,{className:`eyebrow`,children:(0,q.jsx)(`a`,{href:bg(e.name),children:e.name})}),(0,q.jsx)(`h1`,{tabIndex:-1,children:n(`people`,`People`)}),(0,q.jsxs)(`p`,{className:`lede`,children:[i.people.length?`${[o?RU(o,`person`,`people`):``,s?RU(s,`agent`):``].filter(Boolean).join(` and `)} from the dossier's people, and ${RU(i.unmapped.length,`account`)} it doesn't map.`:`This dossier lists nobody yet, so each account its data names has a card of its own (${i.unmapped.length}).`,` `,`Read `,Y(t),`; work in progress counts work items, not the epics and features that hold them. `,(0,q.jsx)(Iw,{topic:`people`})]}),!i.people.length&&(0,q.jsxs)(`p`,{className:`note`,children:[`Say who is who across systems in the dossier's people, from Settings, Dossiers, or with `,(0,q.jsxs)(`code`,{children:[`toil dossiers person `,e.name,` "Pat Example" --id jira=pat --id github=pat-ex`]}),`.`,` `,(0,q.jsx)(Bw,{href:Mg(e.name,`people`),label:`Edit ${e.name}'s people`})]}),(e.peopleNotes??[]).map((e,t)=>(0,q.jsx)(`p`,{role:`note`,className:`failure`,children:e},t))]}),(0,q.jsx)(hj,{id:`team`,title:`Team`,calls:a,alerts:!1,children:(0,q.jsx)(VU,{view:i})}),i.people.length>0&&(0,q.jsxs)(`section`,{className:`people-section`,"aria-labelledby":`people-cards`,children:[(0,q.jsxs)(`div`,{className:`edit-head`,children:[(0,q.jsx)(`h2`,{id:`people-cards`,children:`People and agents`}),(0,q.jsx)(Bw,{href:Mg(e.name,`people`),label:`Edit ${e.name}'s people`}),r&&(0,q.jsx)(Iw,{topic:`alignments`})]}),(0,q.jsx)($T,{min:`md`,className:`people-cards`,children:i.people.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(UU,{card:e,limit:i.wipLimit})},e.who.key))})]}),(0,q.jsx)(iF,{people:e.people??[]}),(i.suggestions.length>0||i.ambiguous.length>0)&&(0,q.jsxs)(hj,{id:`matches`,title:`Possible matches`,calls:e.calls.dossier,alerts:!1,children:[(0,q.jsx)(`p`,{className:`note`,children:`Accounts that share an email with a person, or with an account in another system. Nothing is mapped until you approve it, and an email that fits more than one person suggests nothing.`}),i.suggestions.length>0&&(0,q.jsx)(`ul`,{className:`rows`,children:i.suggestions.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(GU,{suggestion:e})},`${e.name}:${e.input.id.join(`,`)}`))}),i.ambiguous.map((e,t)=>(0,q.jsx)(`p`,{className:`evidence`,children:e},t))]}),(0,q.jsxs)(`section`,{className:`people-section`,"aria-labelledby":`unmapped-cards`,children:[(0,q.jsx)(`h2`,{id:`unmapped-cards`,children:i.people.length?`Not in the dossier's people`:`Accounts in this dossier's data`}),(0,q.jsxs)(`p`,{className:`note`,children:[`Each account the data names that the dossier doesn't map to a person, with something on its plate.`,i.bots.length>0&&` ${RU(i.bots.length,`bot account`)} (${i.bots.map(e=>e.id).join(`, `)}) only wrote bots' pull requests and ${i.bots.length===1?`is`:`are`} left out.`]}),i.unnamedAgents.length>0&&(0,q.jsxs)(`p`,{className:`note`,children:[RU(i.unnamedAgents.length,`pull request`),` `,i.unnamedAgents.length===1?`was`:`were`,` written with an agent the dossier's people don't name (`,[...new Set(i.unnamedAgents.map(e=>e.authorKindSignal??`an agent account`))].join(`; `),`). Add the agent with `,(0,q.jsxs)(`code`,{children:[`toil dossiers person `,e.name,` "<name>" --kind agent`]}),` to give it a card.`]}),i.unmapped.length?(0,q.jsx)($T,{min:`md`,className:`people-cards`,children:i.unmapped.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(UU,{card:e,limit:i.wipLimit})},e.who.key))}):(0,q.jsx)(wj,{message:i.people.length?`Every account with work on its plate is mapped to someone.`:`This dossier's data names nobody with work on their plate.`,action:(0,q.jsx)(Tj,{edit:!0,href:Mg(e.name,`people`),children:`Add a person`})})]})]})}function VU({view:e}){let{wip:t,reviewQueue:n,unassigned:r}=e.team,i=n[0];return(0,q.jsxs)($T,{as:`ul`,min:`sm`,className:`team-strip`,children:[(0,q.jsx)(`li`,{children:(0,q.jsxs)(ZT,{gap:`xs`,className:`team-tile`,children:[(0,q.jsx)(`h3`,{children:`Work in progress`}),(0,q.jsx)(`p`,{className:`team-figure`,children:t.total}),(0,q.jsxs)(`p`,{className:`note`,children:[t.limit===null?(0,q.jsx)(q.Fragment,{children:`No limit is set in the dossier.`}):t.over.length?(0,q.jsxs)(q.Fragment,{children:[`Limit `,t.limit,` per person. Over it: `,t.over.map(e=>`${e.name} (${e.count})`).join(`, `),`.`]}):(0,q.jsxs)(q.Fragment,{children:[`Limit `,t.limit,` per person. Nobody is over it.`]}),` `,(0,q.jsx)(Bw,{href:Mg(e.dossier,`wip`),label:`Edit ${e.dossier}'s work-in-progress limit`})]})]})}),(0,q.jsx)(`li`,{children:(0,q.jsxs)(ZT,{gap:`xs`,className:`team-tile`,children:[(0,q.jsx)(`h3`,{children:`Review queue`}),(0,q.jsx)(`p`,{className:`team-figure`,children:n.length}),(0,q.jsx)(`p`,{className:`note`,children:i?(0,q.jsxs)(q.Fragment,{children:[`Open pull requests waiting on a review. Longest: `,(0,q.jsx)(WT,{change:i.change}),`, `,i.wait.days===null?`for an unknown time`:o_(i.wait.days),`.`]}):`No open pull request waits on a review.`})]})}),(0,q.jsx)(`li`,{children:(0,q.jsxs)(ZT,{gap:`xs`,className:`team-tile`,children:[(0,q.jsx)(`h3`,{children:`Unassigned this sprint`}),(0,q.jsx)(`p`,{className:`team-figure`,children:r?r.items.length:`–`}),r?r.items.length?(0,q.jsx)(`ul`,{className:`plain cites`,"aria-label":`Unassigned in ${r.sprint}`,children:r.items.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(UT,{id:e.id,withTitle:!0})},e.id))}):(0,q.jsxs)(`p`,{className:`note`,children:[`Everything in `,r.sprint,` that isn't done has someone on it.`]}):(0,q.jsx)(`p`,{className:`note`,children:`No sprint is current in this dossier's data.`})]})})]})}function HU(){let e=JS();return $S(e,QS())?e.alignments:void 0}function UU({card:e,limit:t}){let{dossier:n}=J(),r=HU(),{who:i}=e,a=`who-${i.key.replace(/[^a-zA-Z0-9_-]/g,`-`)}`,o=i.identities.find(e=>e.name)??i.identities[0];return(0,q.jsx)(Q,{className:`person-card`,"aria-labelledby":a,children:(0,q.jsxs)(ZT,{gap:`sm`,children:[(0,q.jsxs)(`div`,{className:`person-head`,children:[(0,q.jsx)(Pj,{person:{id:o?.id??i.name,name:i.name,email:i.email}}),(0,q.jsx)(`h3`,{id:a,children:i.name}),(0,q.jsxs)(`ul`,{className:`person-tags`,"aria-label":`About ${i.name}`,children:[i.kind===`agent`&&(0,q.jsx)(`li`,{className:`person-tag`,children:`Agent`}),!i.mapped&&(0,q.jsx)(`li`,{className:`person-tag`,children:`Not mapped`}),e.overLimit&&(0,q.jsxs)(`li`,{className:`person-tag person-tag--warn`,children:[`Over the limit: `,e.wipCount,` of `,t]}),r&&(0,q.jsxs)(`li`,{className:`person-tag person-tag--roll`,children:[r.label,`: `,FU(r.values,i.key)]})]})]}),(0,q.jsx)(`p`,{className:`note any-break`,children:i.identities.length?i.identities.map(zU).join(` · `):`No identities in the dossier yet.`}),(0,q.jsx)(`p`,{children:(0,q.jsxs)(`a`,{href:Tg(n.name,i.key),children:[i.name,`'s items on the board`]})}),(0,q.jsxs)(`h4`,{children:[`In progress `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,e.wipCount,t===null?``:` of ${t}`,`)`]})]}),e.wip.length?e.wip.map(e=>(0,q.jsxs)(`div`,{className:`person-group`,children:[(0,q.jsx)(`p`,{className:`person-status`,children:e.status}),(0,q.jsx)(`ul`,{className:`plain`,children:e.items.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{id:e.item.id,withTitle:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,e.days===null?`time in this status not recorded`:`for ${LU(e.days)}`]})]},e.item.id))})]},e.status)):(0,q.jsx)(`p`,{className:`note`,children:`Nothing in progress.`}),(0,q.jsx)(`h4`,{children:`Open pull requests`}),e.prs.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.prs.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(WT,{change:e.change,withTitle:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,s_[e.wait.on],`, `,e.wait.days===null?`for an unknown time`:o_(e.wait.days),e.withAgent&&`; written with ${e.withAgent}`]})]},e.change.id))}):(0,q.jsx)(`p`,{className:`note`,children:`None open.`}),(0,q.jsx)(`h4`,{children:`Reviews waiting on them`}),e.reviews.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.reviews.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(WT,{change:e.change,withTitle:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,e.days===null?`opened at an unknown time`:`open ${o_(e.days)}`]})]},e.change.id))}):(0,q.jsx)(`p`,{className:`note`,children:`None waiting.`}),(0,q.jsx)(`h4`,{children:`Blocked`}),e.blocked.length?(0,q.jsx)(`ul`,{className:`plain`,children:e.blocked.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(UT,{id:e.item.id,withTitle:!0}),(0,q.jsx)(`span`,{className:`field`,children:` blocked by `}),e.by.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`, `,(0,q.jsx)(UT,{id:e.id}),e.item?(0,q.jsxs)(`span`,{className:`field`,children:[` (`,e.item.status??`not done`,`)`]}):(0,q.jsx)(`span`,{className:`field`,children:` (not in this dossier, so its status is unknown)`})]},e.id))]},e.item.id))}):(0,q.jsx)(`p`,{className:`note`,children:`Nothing blocked.`}),(0,q.jsxs)(`h4`,{children:[`Recent activity `,(0,q.jsxs)(`span`,{className:`field`,children:[`(last `,14,` days)`]})]}),e.activity.length?(0,q.jsxs)(`ul`,{className:`plain`,children:[e.activity.map((e,t)=>(0,q.jsx)(`li`,{children:(0,q.jsx)(WU,{a:e})},t)),e.moreActivity>0&&(0,q.jsxs)(`li`,{className:`note`,children:[`and `,e.moreActivity,` more`]})]}):(0,q.jsx)(`p`,{className:`note`,children:`Nothing recorded.`})]})})}function WU({a:e}){let t=(0,q.jsxs)(`span`,{className:`field`,children:[` `,e.at.slice(0,10)]});if(e.kind===`moved`)return(0,q.jsxs)(q.Fragment,{children:[`Moved `,(0,q.jsx)(UT,{id:e.item.id}),` `,e.from?`from ${e.from} `:``,`to `,e.to,t]});if(e.kind===`merged`)return(0,q.jsxs)(q.Fragment,{children:[`Their pull request merged: `,(0,q.jsx)(WT,{change:e.change}),t]});let n=e.state===`APPROVED`?`Approved`:e.state===`CHANGES_REQUESTED`?`Asked for changes on`:e.state===`DISMISSED`?`Had a review dismissed on`:`Commented on`;return(0,q.jsxs)(q.Fragment,{children:[n,` `,(0,q.jsx)(WT,{change:e.change}),t]})}function GU({suggestion:e}){let{config:t,refresh:n}=J(),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),s=(0,v.useId)(),c=t?t.disabled:`This view has no access to toil's config commands; run the command below in a terminal.`;return(0,q.jsxs)(ZT,{gap:`xs`,children:[(0,q.jsx)(`p`,{children:e.person?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`strong`,{children:e.identities.map(zU).join(`, `)}),` `,e.identities.length===1?`has`:`have`,` `,e.person,`'s email (`,e.email,`): probably `,e.person,`.`]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`strong`,{children:e.identities.map(zU).join(` and `)}),` share the email `,e.email,`: probably one person, `,e.name,`.`]})}),(0,q.jsxs)(`p`,{className:`runs any-break`,children:[`Applies `,(0,q.jsx)(`code`,{children:Z_(e)})]}),(0,q.jsxs)(QT,{children:[(0,q.jsx)(`button`,{type:`button`,className:`btn btn--accent`,onClick:async()=>{if(t&&!c){o(!0);try{let n=await t.run(e.command,e.input);i(TV(n,`Mapped in ${e.input.dossier}'s people. Reload the dossier to see the cards change.`))}catch(e){i(EV(e))}finally{o(!1)}}},disabled:c!==null||a||r?.ok===!0,"aria-describedby":c?s:void 0,children:a?`Running…`:e.person?`Map to ${e.person}`:`Add ${e.name}`}),c&&(0,q.jsxs)(`span`,{id:s,className:`note`,children:[`Turned off: `,c]})]}),(0,q.jsx)(DV,{outcome:r}),r?.ok&&n&&(0,q.jsx)(`p`,{children:(0,q.jsx)(`button`,{type:`button`,className:`btn`,onClick:n,children:`Reload the dossier`})})]})}var KU=e=>Math.round(e*10)/10,qU=[`ALL`,...__],JU=e=>e===null?`files not counted`:`${e} ${e===1?`file`:`files`}`,YU={HUMAN:`Person`,AGENT:`Agent`,BOT:`Bot`};function XU({change:e}){let t=e.authorKindSource==="default"?`no signal said otherwise`:`${e.authorKindSource}: ${e.authorKindSignal}`;return(0,q.jsxs)(`span`,{className:`kind kind--${e.authorKind.toLowerCase()}`,children:[`· `,YU[e.authorKind],` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,t,`)`]})]})}function ZU({ids:e}){return e.length?(0,q.jsx)(`span`,{className:`cites`,children:e.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`, `,(0,q.jsx)(UT,{id:e})]},e))}):(0,q.jsx)(`span`,{className:`note`,children:`None`})}var QU=[{header:`Pull request`,label:`Pull request`,rowHeader:!0,cell:e=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(WT,{change:e.change,withTitle:!0}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,e.change.repo]})]})},{header:`Waiting on`,label:`Waiting on`,cell:e=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`strong`,{children:s_[e.wait.on]}),(0,q.jsxs)(`span`,{className:`field`,children:[` `,e.wait.days===null?`for an unknown time`:`for ${o_(e.wait.days)}`,`: `,e.wait.why]})]})},{header:`Author`,label:`Author`,cell:e=>(0,q.jsxs)(q.Fragment,{children:[yg(e.change.author),` `,(0,q.jsx)(XU,{change:e.change})]})},{header:`Work items`,label:`Work items`,cell:e=>(0,q.jsx)(ZU,{ids:e.items})},{header:`Size`,label:`Size`,cell:e=>e.size.bucket?(0,q.jsxs)(q.Fragment,{children:[e.size.bucket,` `,(0,q.jsxs)(`span`,{className:`field`,children:[`(`,e.size.lines,` lines, `,JU(e.size.files),`)`]})]}):(0,q.jsx)(`span`,{className:`note`,children:e.size.files===null?`Unknown`:`${JU(e.size.files)}, lines not counted`})},{header:`Flags`,label:`Flags`,cell:e=>e.flags.length?(0,q.jsx)(`ul`,{className:`plain flags`,children:e.flags.map(e=>(0,q.jsx)(`li`,{children:f_[e.flag]},e.flag))}):`None`}],$U=(e,t)=>(0,q.jsxs)(q.Fragment,{children:[e.median===null?`No data`:t(e.median),(0,q.jsxs)(`span`,{className:`field`,children:[` `,`(n=`,e.n,e.unknown?`, ${e.unknown} unknown`:``,e.p85!==null&&e.n>1?`; 85% within ${t(e.p85)}`:``,`)`]})]});function eW(e){return[{name:`Pickup`,note:`opened to first review`,sample:e.pickup,unit:o_},{name:`Review`,note:`first review to approval`,sample:e.review,unit:o_},{name:`Merge`,note:`approval to merge`,sample:e.merge,unit:o_},{name:`Review rounds`,note:`per merged pull request`,sample:e.rounds,unit:e=>`${KU(e)} ${KU(e)===1?`round`:`rounds`}`}]}var tW=[{header:`Median`,label:`Median`,rowHeader:!0,cell:e=>(0,q.jsxs)(q.Fragment,{children:[e.name,` `,(0,q.jsx)(`span`,{className:`field`,children:e.note})]})},...qU.map(e=>({header:v_[e],label:v_[e],cell:t=>$U(t.sample[e],t.unit)}))];function nW(){let{dossier:e,byId:t,now:n,sync:r}=J(),i=e.pullRequests??[],a=h_(i,t,n),o=g_(i,t,n),s=b_(i,n),c=Object.fromEntries(Object.entries(e.codeowners??{}).map(([e,t])=>[e,C_(t.text)])),l=a.filter(e=>!e.change.reviewers.length),u=e.calls.prs;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`p`,{className:`eyebrow`,children:(0,q.jsx)(`a`,{href:bg(e.name),children:e.name})}),(0,q.jsx)(`h1`,{tabIndex:-1,children:`Pull requests`}),(0,q.jsxs)(`p`,{className:`lede`,children:[a.length,` open across `,new Set(i.map(e=>e.repo)).size,` `,new Set(i.map(e=>e.repo)).size===1?`repository`:`repositories`,`, `,i.length-a.length,` merged or closed. Read `,Y(n),`. `,(0,q.jsx)(Iw,{topic:`prs`})]}),(e.prNotes??[]).map((e,t)=>(0,q.jsx)(`p`,{role:`note`,className:`failure`,children:e},t))]}),(0,q.jsxs)(hj,{id:`queue`,title:`Waiting now`,calls:u,children:[(0,q.jsx)(`p`,{className:`note`,children:`Open pull requests, longest wait first, each with what it waits on and since when. Drafts come last. Waits count working days, Monday to Friday UTC.`}),a.length?(0,q.jsx)(nE,{className:`pr-queue`,label:`Open pull requests`,wide:!0,rows:a,rowKey:e=>e.change.id,columns:QU}):(0,q.jsx)(wj,{message:`No open pull requests for this dossier.`,action:(0,q.jsx)(Dj,{sync:r,children:(0,q.jsx)(Tj,{edit:!0,href:Mg(e.name,`repos`),children:`Add a repository`})})})]}),(0,q.jsxs)(hj,{id:`flags`,title:`Flags`,calls:u,alerts:!1,children:[(0,q.jsxs)(`p`,{className:`note`,children:[`A first review waiting over `,2,` working days, checks failing for over `,24,` hours, a merge conflict, no linked work item, a work item done while its pull request is open, and a merged pull request whose item isn't done.`]}),o.length?(0,q.jsx)(`ul`,{className:`rows`,children:o.map(({change:e,hit:t})=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`strong`,{children:f_[t.flag]}),`: `,(0,q.jsx)(WT,{change:e,withTitle:!0}),(0,q.jsx)(`p`,{className:`evidence`,children:(0,q.jsx)(GT,{text:t.text})})]},`${e.id}:${t.flag}:${t.text}`))}):(0,q.jsx)(`p`,{children:`Nothing to flag.`})]}),(0,q.jsxs)(hj,{id:`flow`,title:`Flow`,calls:u,alerts:!1,children:[(0,q.jsxs)(`p`,{className:`note`,children:[`The `,s.throughput.ALL.length,` weeks from `,Y(s.from),`, split by who wrote each pull request. n is how many pull requests a figure rests on; unknown counts those whose record can't say (a host that keeps no review times, or reviews not read).`]}),(0,q.jsx)(nE,{className:`pr-metrics`,label:`Pull request flow by author kind`,rows:eW(s),rowKey:e=>e.name,columns:tW}),s.mergedUnreviewed.ALL>0&&(0,q.jsxs)(`p`,{className:`note`,children:[s.mergedUnreviewed.ALL,` merged `,s.mergedUnreviewed.ALL===1?`pull request has`:`pull requests have`,` no approval on record, so review and merge time leave `,s.mergedUnreviewed.ALL===1?`it`:`them`,` out (`,__.map(e=>`${v_[e]}: ${s.mergedUnreviewed[e]}`).join(`, `),`).`]}),(0,q.jsx)(`h3`,{children:`Merged per week`}),(0,q.jsx)(wI,{weeks:s.throughput.ALL,noun:`pull requests merged`}),(0,q.jsxs)(`p`,{className:`note`,children:[__.map(e=>`${v_[e]}: ${s.throughput[e].reduce((e,t)=>e+t.items.length,0)}`).join(`, `),`.`,s.unplacedMerges>0&&` ${s.unplacedMerges} merged ${s.unplacedMerges===1?`pull request has`:`pull requests have`} no merge time on record (Bitbucket Cloud keeps none) and ${s.unplacedMerges===1?`isn't`:`aren't`} counted in a week.`]}),(0,q.jsx)(`h3`,{children:`Size of pull requests opened`}),(0,q.jsx)(nE,{className:`pr-sizes`,label:`Pull request sizes by author kind`,rows:[...l_,`unknown`],rowKey:e=>e,columns:[{header:`Size`,label:`Size`,rowHeader:!0,cell:e=>e===`unknown`?(0,q.jsxs)(q.Fragment,{children:[`Unknown `,(0,q.jsx)(`span`,{className:`field`,children:`(lines not counted)`})]}):(0,q.jsxs)(q.Fragment,{children:[e,` `,(0,q.jsx)(`span`,{className:`field`,children:e===`XL`?`${u_.L+1}+ lines`:`up to ${u_[e]} lines`})]})},...qU.map(e=>({header:`${v_[e]} (n=${s.counts[e]})`,label:v_[e],cell:t=>s.sizes[e][t]}))]})]}),(0,q.jsxs)(hj,{id:`reviewers`,title:`Suggested reviewers`,calls:e.calls.owners??[],alerts:!1,children:[(0,q.jsx)(`p`,{className:`note`,children:`For open pull requests with nobody asked: the CODEOWNERS of the paths each changes, then who reviewed changes to the same files and folders. Each is a proposal; asking for a review is a write you apply.`}),(e.calls.owners??[]).length>0&&!Object.keys(e.codeowners??{}).length&&(0,q.jsx)(`p`,{className:`evidence`,children:`No CODEOWNERS file was found where GitHub looks for one (.github/, the repository root, docs/).`}),Object.entries(e.codeowners??{}).map(([e,t])=>(0,q.jsxs)(`p`,{className:`evidence`,children:[e,`: CODEOWNERS read from `,(0,q.jsx)(`code`,{children:t.path}),`.`]},e)),l.length?(0,q.jsx)(`ul`,{className:`rows`,children:l.map(({change:t})=>{let n=E_(t,i,c[t.repo]??null);return(0,q.jsxs)(`li`,{children:[(0,q.jsx)(WT,{change:t,withTitle:!0}),n.length?(0,q.jsx)(`ul`,{className:`plain proposals`,children:n.map(n=>(0,q.jsx)(`li`,{children:(0,q.jsx)(jE,{proposal:D_(t,n,e.name)})},n.id))}):(0,q.jsx)(`p`,{className:`note`,children:`No one to suggest: no CODEOWNERS rule and no earlier review covers its paths.`})]},t.id)})}):(0,q.jsx)(`p`,{children:`Every open pull request has a reviewer asked.`})]})]})}var rW=/^\d{4}-\d{2}-\d{2}$/;function iW(e){if(!e)return null;let t=Date.parse(e);return Number.isNaN(t)?null:new Date(t).toISOString().slice(0,10)}function aW(e){if(typeof e!=`string`||!rW.test(e))return!1;let t=Date.parse(`${e}T00:00:00Z`);return!Number.isNaN(t)&&new Date(t).toISOString().slice(0,10)===e}var oW=e=>e.slice(0,7);function sW(e,t){return new Date(Date.parse(`${e}T00:00:00Z`)+t*864e5).toISOString().slice(0,10)}function cW(e){let t=[];for(let n=`${e}-01`;oW(n)===e;n=sW(n,1))t.push(n);return t}function lW(e,t){let[n,r]=e.split(`-`).map(Number),i=n*12+(r-1)+t;return`${String(Math.floor(i/12)).padStart(4,`0`)}-${String(i%12+1).padStart(2,`0`)}`}var uW=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],dW=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],fW=e=>String(e).padStart(2,`0`),pW=e=>new Date(`${e}T00:00:00Z`),mW=e=>{let t=new Date(e);return`${fW(t.getUTCHours())}:${fW(t.getUTCMinutes())}`},hW=e=>{let t=pW(e);return`${dW[t.getUTCDay()]} ${t.getUTCDate()} ${uW[t.getUTCMonth()]} ${t.getUTCFullYear()}`},gW=e=>{let t=pW(e);return`${t.getUTCDate()} ${uW[t.getUTCMonth()].slice(0,3)} ${t.getUTCFullYear()}`},_W=e=>{let t=pW(`${e}-01`);return`${uW[t.getUTCMonth()]} ${t.getUTCFullYear()}`},vW=e=>`${gW(iW(e))} ${mW(e)} UTC`;function yW(e){if(!e.observed)return``;let t=e.observed.previousSync,n=t?`; the one before ran ${iW(t)===iW(e.at)?`at ${mW(t)} UTC`:vW(t)}`:``;return`first seen by the sync at ${mW(e.at)} UTC${n}`}var bW={running:`still running`,finished:`finished`,failed:`failed`,stopped:`stopped before it finished`,capped:`stopped at its cap`};function xW(e){switch(e.state){case`applied`:return`applied: toil's audit log has the write at ${vW(e.at)} (${e.via})`;case`not-applied`:return`not applied: toil's audit log has no matching write`;case`no-command`:return`toil has no command for it, so nothing to apply`;case`unknown`:return`couldn't check toil's audit log: ${e.why}`}}var SW=[`done`,`progress`,`blocked`,`next`],CW={done:`Done`,progress:`In progress`,blocked:`Blocked`,next:`Next`},wW=(e,t)=>e===`done`?`Nothing done.`:e===`progress`?`Nothing in progress.`:e===`blocked`?`Nothing blocked.`:t?`Nothing assigned and not started in ${t}.`:`No current sprint to take it from.`;function TW(e){let t=sW(e,-1);for(;[0,6].includes(new Date(`${t}T00:00:00Z`).getUTCDay());)t=sW(t,-1);return t}var EW=e=>({from:TW(e),to:e}),DW=e=>[...e.team,...e.people.flatMap(e=>SW.flatMap(t=>e.lines[t]))];function OW(e,t){return t.at?e.from===e.to?`${mW(t.at)} UTC`:`${gW(iW(t.at))} ${mW(t.at)} UTC`:`as of the latest sync`}var kW=e=>e.from===e.to?gW(e.from):`${gW(e.from)} to ${gW(e.to)}`,AW=e=>e.asOf?`Review waits, the sprint and Next are as of the sync at ${gW(iW(e.asOf))} ${mW(e.asOf)} UTC.`:`Review waits, the sprint and Next come from a sync, and none has run yet, so there are none.`,jW=e=>`${e.name}${e.account&&e.account.id!==e.name?` (${e.account.area} ${e.account.id})`:e.account?` (${e.account.area})`:``}${e.kind===`agent`?` (agent)`:``}`,MW=e=>`Stand-up: ${e.dossier}, ${kW(e)}`,NW=e=>`Built by Toil UI from the worklog, ${kW(e)}, times in UTC: facts only, each linked to its source. ${AW(e)}`,PW=(e,t)=>`Write up the stand-up for ${e}${t===e?``:` to ${t}`}`;function FW(e,t){let n=new Set(DW(t).map(e=>e.fact)),r=new Set;for(let t of e.matchAll(/\bF(\d+)\b/g))n.has(`F${t[1]}`)&&r.add(`F${t[1]}`);return[...r]}var IW=e=>({ok:!1,message:e instanceof Error?e.message:String(e)}),LW=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function RW({api:e,from:t,to:n,ignored:r}){let{dossier:i,now:a}=J(),o=iW(a),s=t&&n?{from:t,to:n}:EW(o),[c,l]=(0,v.useState)(null);(0,v.useEffect)(()=>{if(!e)return;let t=!0;return l(null),e.standup(i.name,s.from,s.to).then(e=>t&&l({ok:!0,value:e}),e=>t&&l(IW(e))),()=>{t=!1}},[e,i.name,s.from,s.to]);let u=(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsxs)(`p`,{className:`eyebrow`,children:[(0,q.jsx)(`a`,{href:bg(i.name),children:i.name}),` · `,(0,q.jsx)(`a`,{href:kg(i.name),children:`Worklog`})]}),(0,q.jsx)(`h1`,{tabIndex:-1,children:`Stand-up`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`The worklog's days, grouped by person into done, in progress, blocked and next, with the team's lines first. `,(0,q.jsx)(Iw,{topic:`standup`})]})]});return e?(0,q.jsxs)(q.Fragment,{children:[u,(0,q.jsxs)(`div`,{className:`standup`,children:[(0,q.jsxs)(hj,{id:`standup-range`,title:`Days`,calls:[],children:[r&&(0,q.jsxs)(`p`,{role:`status`,className:`note`,children:[`“`,r,`” isn't a day as yyyy-mm-dd, so this is since the last working day instead.`]}),(0,q.jsx)(zW,{from:s.from,to:s.to,today:o,explicit:!!(t&&n)},`${s.from}/${s.to}`)]}),c?c.ok?(0,q.jsx)(WW,{api:e,data:c.value,onRebuilt:e=>l({ok:!0,value:e})}):(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:c.message}):(0,q.jsx)(FA,{size:`panel`,message:`Folding the stand-up`})]})]}):(0,q.jsxs)(q.Fragment,{children:[u,(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:`This Toil UI keeps no worklog, so it has no stand-up to fold from one.`})]})}function zW({from:e,to:t,today:n,explicit:r}){let{dossier:i}=J(),[a,o]=(0,v.useState)(e),[s,c]=(0,v.useState)(t);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`note`,children:[r?`The days you picked.`:`Since the last working day, through today.`,` At most `,31,` days.`,r&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(`a`,{href:Ag(i.name),children:`Back to since the last working day`}),`.`]})]}),(0,q.jsxs)(so,{className:`standup-range`,onSubmit:e=>{e.preventDefault(),window.location.hash=Ag(i.name,{from:a,to:s})},children:[(0,q.jsxs)(Yp,{className:`field-text`,value:a,onChange:o,isRequired:!0,children:[(0,q.jsx)(va,{children:`From`}),(0,q.jsx)(jo,{type:`date`,max:n})]}),(0,q.jsxs)(Yp,{className:`field-text`,value:s,onChange:c,isRequired:!0,children:[(0,q.jsx)(va,{children:`To`}),(0,q.jsx)(jo,{type:`date`,max:n})]}),(0,q.jsx)(W,{type:`submit`,className:`btn`,isDisabled:!a||!s,children:`Show these days`})]})]})}function BW({line:e}){let{byId:t,prById:n,dossier:r}=J();return t.has(e.subject)||n?.has(e.subject)?(0,q.jsx)(UT,{id:e.subject,withTitle:!0}):e.subject.startsWith(`run:`)&&e.day?(0,q.jsx)(`a`,{href:kg(r.name,e.day),className:`item-link`,children:(0,q.jsx)(`span`,{className:`key`,children:e.label})}):e.url?(0,q.jsx)(`a`,{href:e.url,className:`item-link`,children:(0,q.jsx)(`span`,{className:`key`,children:e.label})}):(0,q.jsx)(`span`,{className:`item-link`,children:(0,q.jsx)(`span`,{className:`key`,children:e.label})})}function VW({report:e,line:t,highlight:n}){let{byId:r,prById:i}=J(),a=r.has(t.subject)||i?.has(t.subject)?null:t.title;return(0,q.jsxs)(`li`,{className:`worklog-line standup-line`,id:`fact-${t.fact}`,"data-cited":n||void 0,children:[(0,q.jsx)(`span`,{className:`standup-fact`,children:t.fact}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(BW,{line:t}),a&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(GT,{text:a})]}),`: `,(0,q.jsx)(GT,{text:t.text}),` `,(0,q.jsxs)(`span`,{className:`note`,children:[`(`,t.at?(0,q.jsx)(`time`,{dateTime:t.at,children:OW(e,t)}):OW(e,t),`)`]})]})]})}function HW({report:e,lines:t,none:n,cited:r}){return t.length?(0,q.jsx)(`ul`,{className:`rows worklog-lines`,children:t.map(t=>(0,q.jsx)(VW,{report:e,line:t,highlight:r.has(t.fact)},t.fact))}):(0,q.jsx)(`p`,{className:`note`,children:n})}function UW({report:e,group:t,cited:n}){let r=`standup-${t.key.replace(/[^A-Za-z0-9-]/g,`-`)}`,i=SW.reduce((e,n)=>e+t.lines[n].length,0);return(0,q.jsxs)(hj,{id:r,title:jW(t),calls:[],children:[!t.mapped&&t.key!==`none`&&(0,q.jsx)(`p`,{className:`note`,children:`Not in the dossier's people: an account the People view can map to someone.`}),i===0?(0,q.jsx)(`p`,{className:`note`,children:`Nothing recorded for these days.`}):(0,q.jsx)(`div`,{className:`standup-buckets`,children:SW.map(r=>(0,q.jsxs)(`section`,{className:`worklog-section`,children:[(0,q.jsx)(`h3`,{children:CW[r]}),(0,q.jsx)(HW,{report:e,lines:t.lines[r],none:wW(r,e.sprint),cited:n})]},r))})]})}function WW({api:e,data:t,onRebuilt:n}){let{report:r}=t,[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!1),c=async i=>{if(a(i),s(!1),i)try{let i=await e.standup(r.dossier,r.from,r.to);i.markdown!==t.markdown&&(n(i),s(!0))}catch{}},l=new Set(i?FW(i.parts.map(e=>e.text).join(`
59
+ `),r):[]);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`section`,{className:`standup-summary`,"aria-labelledby":`standup-title`,children:[(0,q.jsx)(`h2`,{id:`standup-title`,children:MW(r)}),(0,q.jsx)(`p`,{className:`note`,children:NW(r)}),r.gaps.length>0&&(0,q.jsxs)(`section`,{className:`worklog-gaps`,"aria-labelledby":`standup-gaps`,children:[(0,q.jsx)(`h3`,{id:`standup-gaps`,children:`Coverage`}),(0,q.jsx)(`ul`,{children:r.gaps.map((e,t)=>(0,q.jsx)(`li`,{children:e},t))})]})]}),(0,q.jsx)(hj,{id:`standup-team`,title:`Team`,calls:[],children:(0,q.jsx)(HW,{report:r,lines:r.team,none:`No sprint, scope changes, or builds and deployments that broke or recovered.`,cited:l})}),r.people.length?r.people.map(e=>(0,q.jsx)(UW,{report:r,group:e,cited:l},e.key)):(0,q.jsx)(`p`,{className:`note`,children:`Nobody is in the dossier's people, and nobody did anything the worklog recorded on these days.`}),(0,q.jsx)(hj,{id:`standup-share`,title:`Copy, export and publish`,calls:[],children:(0,q.jsx)(KW,{api:e,data:t})}),(0,q.jsxs)(hj,{id:`standup-writeup`,title:`Write it up`,calls:[],children:[o&&(0,q.jsx)(`p`,{role:`status`,className:`note`,children:`A sync landed while the agent wrote, so the report above was built again from what the agent read, and its fact numbers match the write-up.`}),(0,q.jsx)(qW,{report:r,answer:i,onAnswer:e=>void c(e)})]})]})}function GW({value:e,label:t,what:n}){let[r,i]=(0,v.useState)(null),a=async()=>{try{await navigator.clipboard.writeText(e),i(!0)}catch{i(!1)}};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(W,{className:`btn`,onPress:()=>void a(),children:t}),(0,q.jsx)(`span`,{role:`status`,className:`sr-only`,children:r===null?``:r?`Copied the stand-up as ${n}.`:`This browser wouldn't copy; select the ${n} below instead.`}),r===!1&&(0,q.jsxs)(`span`,{className:`note`,children:[`This browser wouldn't copy; select the `,n,` below instead.`]})]})}function KW({api:e,data:t}){let{report:n}=t,[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),l=async t=>{t.preventDefault(),c(!0),o(null);try{o({ok:!0,value:await e.exportTo(n.dossier,{from:n.from,to:n.to},r)})}catch(e){o(IW(e))}finally{c(!1)}};return(0,q.jsxs)(`div`,{className:`worklog-page`,children:[(0,q.jsx)(`p`,{className:`note`,children:`Markdown suits Slack, Teams and a wiki page; plain text suits a chat that shows Markdown as it is typed. Both are the report as shown, line for line.`}),(0,q.jsxs)(`div`,{className:`worklog-actions`,children:[(0,q.jsx)(GW,{value:t.markdown,label:`Copy as Markdown`,what:`Markdown`}),(0,q.jsx)(GW,{value:t.text,label:`Copy as plain text`,what:`plain text`})]}),(0,q.jsxs)(`section`,{className:`worklog-section`,"aria-labelledby":`standup-export`,children:[(0,q.jsx)(`h3`,{id:`standup-export`,children:`Export and publish`}),(0,q.jsx)(`p`,{className:`note`,children:`Export writes the Markdown to a new file in a folder you name, through toil's own file service. Publishing it to Confluence or GitHub is then a proposal, for you to run through toil's write gate.`}),e.disabled?(0,q.jsx)(`p`,{className:`note`,children:e.disabled}):(0,q.jsxs)(so,{className:`worklog-export`,onSubmit:e=>void l(e),children:[(0,q.jsxs)(Yp,{className:`field-text`,value:r,onChange:i,isRequired:!0,children:[(0,q.jsx)(va,{children:`Folder, as a full path`}),(0,q.jsx)(jo,{autoComplete:`off`,spellCheck:!1})]}),(0,q.jsx)(W,{type:`submit`,className:`btn`,isDisabled:s||!r.trim(),children:`Export`})]}),a&&(a.ok?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{role:`status`,children:[`toil wrote `,LW(a.value.bytes,`byte`),` to `,(0,q.jsx)(aE,{value:a.value.path,what:`exported file's path`}),`.`]}),a.value.proposals.length?a.value.proposals.map(e=>(0,q.jsx)(jE,{proposal:e},e.id)):(0,q.jsx)(`p`,{className:`note`,children:`This dossier names no Confluence space and no GitHub repository, so there is nowhere to propose publishing it.`})]}):(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:a.message}))]}),(0,q.jsxs)(`details`,{className:`worklog-md`,children:[(0,q.jsx)(`summary`,{children:`The stand-up as Markdown`}),(0,q.jsx)(`pre`,{role:`region`,"aria-label":`The stand-up as Markdown`,tabIndex:0,children:(0,q.jsx)(`code`,{children:t.markdown})})]}),(0,q.jsxs)(`details`,{className:`worklog-md`,children:[(0,q.jsx)(`summary`,{children:`The stand-up as plain text`}),(0,q.jsx)(`pre`,{role:`region`,"aria-label":`The stand-up as plain text`,tabIndex:0,children:(0,q.jsx)(`code`,{children:t.text})})]})]})}function qW({report:e,answer:t,onAnswer:n}){let{agent:r,dossier:i}=J(),a=JS(),o=QS(),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(null),d=new Map(DW(e).map(e=>[e.fact,e])),f=async()=>{c(!0),u(null),n(null);try{let t={id:typeof crypto<`u`&&`randomUUID`in crypto?crypto.randomUUID():`standup-${Date.now()}`,turn:1};n(await r.ask(i.name,PW(e.from,e.to),{theme:a.name,voice:eC(a,o)},t))}catch(e){u(e instanceof Error?e.message:String(e))}finally{c(!1)}},p=t?FW(t.parts.map(e=>e.text).join(`
60
+ `),e):[];return(0,q.jsxs)(`div`,{className:`worklog-page`,children:[(0,q.jsx)(`p`,{className:`note`,children:`Optional. The agent turns the facts above into a short narrative, in the theme's voice when that is on. It reads the same report, names the fact lines it used, and its usage counts like any chat's. The report above stays the record.`}),r.notice&&(0,q.jsx)(`p`,{className:`note agent-notice`,children:r.notice}),(0,q.jsxs)(`div`,{className:`worklog-actions`,children:[(0,q.jsx)(W,{className:`btn`,"data-standup-writeup":``,isDisabled:s,onPress:()=>void f(),children:t?`Write it up again`:`Write it up`}),s&&(0,q.jsx)(`span`,{role:`status`,children:`The agent is writing it up.`})]}),l&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:l}),t&&(0,q.jsxs)(`section`,{className:`standup-writeup`,"aria-labelledby":`standup-writeup-by`,children:[(0,q.jsxs)(`h3`,{id:`standup-writeup-by`,children:[`Written by the agent (`,t.by===`scripted`?`a scripted preview, not a model`:t.by,`), not by Toil UI`]}),t.warnings?.map((e,t)=>(0,q.jsx)(`p`,{className:`note`,children:e},t)),t.parts.map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(GT,{text:e.text,chips:!0})},t)),(0,q.jsxs)(`p`,{className:`note`,children:[p.length?`Rests on ${LW(p.length,`fact line`)} of the report, marked above: `:`Names none of the report's fact lines, so check it against the report before you use it.`,p.map((e,t)=>(0,q.jsxs)(`span`,{children:[t?`, `:``,(0,q.jsx)(W,{className:`btn btn--small`,"aria-label":`${e}: ${d.get(e)?.label??``} ${d.get(e)?.text??``}`,onPress:()=>document.getElementById(`fact-${e}`)?.scrollIntoView({block:`center`}),children:e})]},e)),p.length?`.`:``,t.unverified&&t.unverified.length>0?` It names ${LW(t.unverified.length,`id`)} its tools never returned.`:``]})]})]})}var JW=`This is sample data, so it keeps no notes and writes no files. Toil UI on your own machine keeps each page in its data folder and exports through toil.`,YW=e=>({ok:!1,message:e instanceof Error?e.message:String(e)}),XW=[[`Mon`,`Monday`],[`Tue`,`Tuesday`],[`Wed`,`Wednesday`],[`Thu`,`Thursday`],[`Fri`,`Friday`],[`Sat`,`Saturday`],[`Sun`,`Sunday`]],ZW=(e,t,n=`${t}s`)=>`${e} ${e===1?t:n}`;function QW({api:e,day:t}){let{dossier:n}=J(),[r,i]=(0,v.useState)(t?oW(t):null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),l=a?.ok?a.value.today:null,u=t??l;(0,v.useEffect)(()=>{if(!e)return;let t=!0;return o(null),e.month(n.name,r??void 0).then(e=>t&&o({ok:!0,value:e}),e=>t&&o(YW(e))),()=>{t=!1}},[e,n.name,r]),(0,v.useEffect)(()=>{if(!e||!u)return;let t=!0;return c(null),e.day(n.name,u).then(e=>t&&c({ok:!0,value:e}),e=>t&&c(YW(e))),()=>{t=!1}},[e,n.name,u]);let d=(0,q.jsxs)(`div`,{className:`view-head`,children:[(0,q.jsx)(`p`,{className:`eyebrow`,children:(0,q.jsx)(`a`,{href:bg(n.name),children:n.name})}),(0,q.jsx)(`h1`,{tabIndex:-1,children:`Worklog`}),(0,q.jsxs)(`p`,{className:`lede`,children:[`One page a day of what happened, facts only. `,(0,q.jsx)(Iw,{topic:`worklog`})]}),e&&(0,q.jsx)(`p`,{children:(0,q.jsx)(`a`,{className:`btn`,href:Ag(n.name),"data-standup-link":``,children:`Stand-up since the last working day`})})]});return e?(0,q.jsxs)(q.Fragment,{children:[d,(0,q.jsxs)(`div`,{className:`worklog`,children:[(0,q.jsx)(hj,{id:`worklog-calendar`,title:a?.ok?_W(a.value.month):`Calendar`,calls:[],children:a?a.ok?(0,q.jsx)($W,{data:a.value,selected:u,onMonth:i}):(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:a.message}):(0,q.jsx)(FA,{size:`panel`,message:`Reading the calendar`})}),(0,q.jsx)(hj,{id:`worklog-day`,title:u?hW(u):`The day`,calls:[],children:s?s.ok?(0,q.jsx)(iG,{api:e,data:s.value,today:l,onChange:e=>c({ok:!0,value:e})}):(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:s.message}):(0,q.jsx)(FA,{size:`panel`,message:`Folding the page`})})]})]}):(0,q.jsxs)(q.Fragment,{children:[d,(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:`This Toil UI keeps no worklog: it has no cache to fold one from.`})]})}function $W({data:e,selected:t,onMonth:n}){let{dossier:r}=J(),i=new Map(e.days.map(e=>[e.day,e])),a=cW(e.month),o=(new Date(`${a[0]}T00:00:00Z`).getUTCDay()+6)%7,s=[...Array(o).fill(null),...a];for(;s.length%7;)s.push(null);let c=Array.from({length:s.length/7},(e,t)=>s.slice(t*7,t*7+7)),l=e.first?oW(e.first):e.month,u=lW(e.month,-1),d=lW(e.month,1);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`calendar-nav`,children:[(0,q.jsx)(W,{className:`btn btn--small`,isDisabled:e.month<=l,onPress:()=>n(u),children:`Previous month`}),(0,q.jsx)(W,{className:`btn btn--small`,isDisabled:e.month>=oW(e.today),onPress:()=>n(d),children:`Next month`})]}),(0,q.jsxs)(`table`,{className:`calendar`,children:[(0,q.jsxs)(`caption`,{className:`sr-only`,children:[_W(e.month),`: `,ZW(e.days.length,`day`),` with a page. Days are UTC.`]}),(0,q.jsx)(`thead`,{children:(0,q.jsx)(`tr`,{children:XW.map(([e,t])=>(0,q.jsx)(`th`,{scope:`col`,children:(0,q.jsx)(`abbr`,{title:t,children:e})},e))})}),(0,q.jsx)(`tbody`,{children:c.map((n,a)=>(0,q.jsx)(`tr`,{children:n.map((n,a)=>{if(!n)return(0,q.jsx)(`td`,{},a);let o=i.get(n),s=Number(n.slice(8));return o?(0,q.jsx)(`td`,{children:(0,q.jsxs)(`a`,{href:kg(r.name,n),className:`calendar__day`,"aria-current":n===t?`date`:void 0,"data-today":n===e.today||void 0,"data-quiet":o.lines===0||void 0,children:[(0,q.jsxs)(`span`,{className:`sr-only`,children:[hW(n),n===e.today?`, today`:``,`: `]}),(0,q.jsx)(`span`,{className:`calendar__n`,"aria-hidden":`true`,children:s}),(0,q.jsxs)(`span`,{className:`calendar__count`,children:[o.lines,(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,o.lines===1?`line`:`lines`,o.gaps?`, ${ZW(o.gaps,`coverage note`)}`:``]}),o.gaps>0&&(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`*`})]})]})},n):(0,q.jsxs)(`td`,{className:n>e.today?`calendar__future`:`calendar__empty`,"data-today":n===e.today||void 0,children:[(0,q.jsxs)(`span`,{className:`sr-only`,children:[hW(n),n===e.today?`, today`:``,`: `,n>e.today?`not yet`:`no page`]}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:s})]},n)})},a))})]}),(0,q.jsxs)(`p`,{className:`note`,children:[`A number under a day is how many lines its page has; a star means the page says what the cache can't vouch for. The cache keeps `,ZW(e.retentionDays,`day`),` after each sync, and so do the pages.`]})]})}function eG({e}){let{byId:t,prById:n}=J();return t.has(e.subject)||n?.has(e.subject)?(0,q.jsx)(UT,{id:e.subject,withTitle:!0}):e.url?(0,q.jsx)(`a`,{href:e.url,className:`item-link`,children:(0,q.jsx)(`span`,{className:`key`,children:e.label})}):(0,q.jsx)(`span`,{className:`item-link`,children:(0,q.jsx)(`span`,{className:`key`,children:e.label})})}function tG({e}){let{byId:t,prById:n}=J(),r=t.has(e.subject)||n?.has(e.subject)?null:e.title;return(0,q.jsxs)(`li`,{className:`worklog-line`,children:[(0,q.jsx)(`time`,{dateTime:e.at,children:mW(e.at)}),` `,(0,q.jsxs)(`span`,{children:[(0,q.jsx)(eG,{e}),r&&(0,q.jsxs)(q.Fragment,{children:[` `,(0,q.jsx)(GT,{text:r})]}),`: `,(0,q.jsx)(GT,{text:e.text}),e.by&&(0,q.jsxs)(`span`,{className:`by`,children:[`, by `,e.by]}),e.observed&&(0,q.jsxs)(`span`,{className:`note`,children:[` `,`(`,yW(e),`)`]})]})]})}function nG({title:e,events:t,none:n}){return(0,q.jsxs)(`section`,{className:`worklog-section`,children:[(0,q.jsx)(`h3`,{children:e}),t.length?(0,q.jsx)(`ul`,{className:`rows worklog-lines`,children:t.map(e=>(0,q.jsx)(tG,{e},e.key))}):(0,q.jsx)(`p`,{className:`note`,children:n})]})}function rG({line:e}){let{run:t}=e;return(0,q.jsxs)(`li`,{className:`worklog-line`,children:[(0,q.jsx)(`time`,{dateTime:t.startedAt,children:mW(t.startedAt)}),` `,(0,q.jsxs)(`span`,{children:[t.kind===`ask`?`Asked`:`Assigned`,` `,t.by,`: “`,t.prompt,`”, `,bW[t.outcome],t.finishedAt&&` at ${mW(t.finishedAt)}`,t.citations.length>0&&`, citing ${ZW(t.citations.length,`item`)}${t.unverified.length?` (${t.unverified.length} unverified)`:``}`,t.error&&(0,q.jsxs)(`span`,{className:`failure`,children:[`: `,t.error]}),e.proposals.length>0&&(0,q.jsx)(`ul`,{className:`plain worklog-proposals`,children:e.proposals.map(e=>(0,q.jsxs)(`li`,{children:[`Proposal: `,(0,q.jsx)(GT,{text:e.proposal.title}),e.proposal.command&&(0,q.jsxs)(q.Fragment,{children:[` `,`(`,(0,q.jsxs)(`code`,{children:[`toil `,e.proposal.command]}),`)`]}),`, `,(0,q.jsx)(`span`,{className:e.applied.state===`applied`?void 0:`note`,children:xW(e.applied)})]},e.proposal.id))}),(0,q.jsxs)(`details`,{className:`worklog-transcript`,children:[(0,q.jsx)(`summary`,{children:`Transcript, written by the agent`}),t.answer?t.answer.split(/\n{2,}/).map((e,t)=>(0,q.jsx)(`p`,{children:(0,q.jsx)(GT,{text:e,chips:!0})},t)):(0,q.jsx)(`p`,{className:`note`,children:`No answer was recorded.`})]})]})]})}function iG({api:e,data:t,today:n,onChange:r}){let{page:i}=t,[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),l=async()=>{c(!0);try{let t=await e.rebuild(i.dossier,i.day);r(t),o(t.same===null?`Rebuilt from the cache. There was no page kept to compare it with.`:t.same?`Rebuilt from the cache: the same, line for line, as the page kept.`:`Rebuilt from the cache: it differs from the page kept, which now matches the cache again.`)}catch(e){o(`The rebuild failed: ${e instanceof Error?e.message:String(e)}`)}finally{c(!1)}};return(0,q.jsxs)(`div`,{className:`worklog-page`,children:[(0,q.jsxs)(`p`,{className:`note`,children:[`Built by Toil UI from its cache, facts only`,t.file?`, and kept at `:`. Sample data keeps no file.`,t.file&&(0,q.jsx)(aE,{value:t.file,what:`page's path`})]}),i.gaps.length>0&&(0,q.jsxs)(`section`,{className:`worklog-gaps`,"aria-labelledby":`gaps-${i.day}`,children:[(0,q.jsx)(`h3`,{id:`gaps-${i.day}`,children:`Coverage`}),(0,q.jsx)(`ul`,{children:i.gaps.map((e,t)=>(0,q.jsx)(`li`,{children:e},t))})]}),(0,q.jsx)(nG,{title:`Work items`,events:i.work,none:`No status changes, sprint changes or new blockers recorded.`}),(0,q.jsx)(nG,{title:`Pull requests`,events:i.prs,none:`No pull requests opened, reviewed, merged or declined.`}),(0,q.jsx)(nG,{title:`Builds and deployments`,events:i.delivery,none:`No builds or deployments failed or recovered.`}),(0,q.jsxs)(`section`,{className:`worklog-section`,children:[(0,q.jsx)(`h3`,{children:`Agent runs`}),i.agents.length?(0,q.jsx)(`ul`,{className:`rows worklog-lines`,children:i.agents.map(e=>(0,q.jsx)(rG,{line:e},e.run.id))}):(0,q.jsx)(`p`,{className:`note`,children:`No agent runs.`})]}),(0,q.jsx)(aG,{api:e,data:t,today:n,onChange:r}),(0,q.jsxs)(`section`,{className:`worklog-section`,children:[(0,q.jsx)(`h3`,{children:`Sources`}),i.sources.length?(0,q.jsx)(`ul`,{className:`plain`,children:i.sources.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`code`,{children:e.area}),`: `,e.syncs?`${ZW(e.syncs,`sync`)} this day${e.failed?`, ${e.failed} failed`:``}, the last at ${mW(e.last)} UTC`:`no sync this day`]},e.area))}):(0,q.jsx)(`p`,{className:`note`,children:`No syncs recorded.`})]}),(0,q.jsxs)(`div`,{className:`worklog-actions`,children:[(0,q.jsx)(W,{className:`btn`,"data-worklog-rebuild":``,isDisabled:s,onPress:()=>void l(),children:`Rebuild this day`}),(0,q.jsx)(`a`,{className:`btn`,href:Ag(i.dossier,{from:i.day,to:i.day}),children:`Stand-up for this day`}),a&&(0,q.jsx)(`p`,{role:`status`,className:`note`,children:a})]}),(0,q.jsx)(oG,{api:e,dossier:i.dossier,day:i.day}),(0,q.jsxs)(`details`,{className:`worklog-md`,children:[(0,q.jsx)(`summary`,{children:`The page as Markdown`}),(0,q.jsx)(`pre`,{role:`region`,"aria-label":`The page as Markdown`,tabIndex:0,children:(0,q.jsx)(`code`,{children:t.markdown})})]})]})}function aG({api:e,data:t,today:n,onChange:r}){let{page:i}=t,[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(null),l=i.day===n,u=async t=>{t.preventDefault(),c(null);try{r(await e.addNote(i.dossier,a)),o(``)}catch(e){c(e instanceof Error?e.message:String(e))}};return(0,q.jsxs)(`section`,{className:`worklog-section`,children:[(0,q.jsx)(`h3`,{children:`Notes`}),i.notes.length?(0,q.jsx)(`ul`,{className:`rows worklog-lines`,children:i.notes.map(e=>(0,q.jsxs)(`li`,{className:`worklog-line`,children:[(0,q.jsx)(`time`,{dateTime:e.at,children:mW(e.at)}),` `,(0,q.jsxs)(`span`,{children:[(0,q.jsxs)(`span`,{className:`by`,children:[e.by,`:`]}),` `,e.text]})]},e.id))}):(0,q.jsx)(`p`,{className:`note`,children:`No notes.`}),l&&(e.disabled?(0,q.jsx)(`p`,{className:`note`,children:e.disabled}):(0,q.jsxs)(so,{className:`worklog-note`,onSubmit:e=>void u(e),children:[(0,q.jsxs)(Yp,{className:`field-text field-text--area`,value:a,onChange:o,maxLength:2e3,children:[(0,q.jsx)(va,{children:`Add a note to today's page`}),(0,q.jsx)(qp,{rows:2})]}),(0,q.jsx)(W,{type:`submit`,className:`btn`,isDisabled:!a.trim(),children:`Add the note`}),s&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:s})]}))]})}function oG({api:e,dossier:t,day:n}){let[r,i]=(0,v.useState)(``),[a,o]=(0,v.useState)(`day`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),d=async i=>{i.preventDefault(),u(!0),c(null);let o=a===`day`?{day:n}:{month:oW(n)};try{c({ok:!0,value:await e.exportTo(t,o,r)})}catch(e){c(YW(e))}finally{u(!1)}};return(0,q.jsxs)(`section`,{className:`worklog-section`,"aria-labelledby":`worklog-export`,children:[(0,q.jsx)(`h3`,{id:`worklog-export`,children:`Export and publish`}),(0,q.jsx)(`p`,{className:`note`,children:`Export writes the Markdown to a new file in a folder you name, through toil's own file service. Publishing it to Confluence or GitHub is then a proposal, for you to run through toil's write gate.`}),e.disabled?(0,q.jsx)(`p`,{className:`note`,children:e.disabled}):(0,q.jsxs)(so,{className:`worklog-export`,onSubmit:e=>void d(e),children:[(0,q.jsxs)(Bf,{className:`shells`,orientation:`horizontal`,value:a,onChange:e=>o(e),children:[(0,q.jsx)(va,{children:`Export`}),(0,q.jsx)(Vf,{value:`day`,className:`shell-choice`,children:`This day`}),(0,q.jsx)(Vf,{value:`month`,className:`shell-choice`,children:_W(oW(n))})]}),(0,q.jsxs)(Yp,{className:`field-text`,value:r,onChange:i,isRequired:!0,children:[(0,q.jsx)(va,{children:`Folder, as a full path`}),(0,q.jsx)(jo,{autoComplete:`off`,spellCheck:!1})]}),(0,q.jsx)(W,{type:`submit`,className:`btn`,isDisabled:l||!r.trim(),children:`Export`})]}),s&&(s.ok?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{role:`status`,children:[`toil wrote `,ZW(s.value.bytes,`byte`),` to `,(0,q.jsx)(aE,{value:s.value.path,what:`exported file's path`}),`.`]}),s.value.proposals.length?s.value.proposals.map(e=>(0,q.jsx)(jE,{proposal:e},e.id)):(0,q.jsx)(`p`,{className:`note`,children:`This dossier names no Confluence space and no GitHub repository, so there is nowhere to propose publishing it.`})]}):(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:s.message}))]})}var sG=`https://imagile-dev.github.io/toil/about/feedback/`,cG=`This is sample data, so it sends nothing. Toil UI on your own machine sends through toil feedback, or use the form at ${sG}.`;function lG(e){if(!e?.ok)return null;let t=e.data;return typeof t?.disclaimer!=`string`||typeof t.report!=`object`||t.report===null||typeof t.sent!=`boolean`?null:t}function uG(e){let t=e.error;return t?/has no command "feedback"/.test(t.message)?`The toil this Toil UI runs (${e.meta.version}) has no feedback command; it needs a newer toil. Until then, use the form at ${sG}.`:`${t.message}${t.fix?` ${t.fix}`:``}`:`toil returned no report.`}var dG={kind:`bug`,title:``,body:``,email:``},fG=300;function pG({api:e}){return(0,q.jsxs)(lf,{children:[(0,q.jsx)(W,{className:`btn feedback-open`,children:`Feedback`}),(0,q.jsx)(mG,{api:e})]})}function mG({api:e,isOpen:t,onOpenChange:n}){let r=t===void 0?{}:{isOpen:t,...n?{onOpenChange:n}:{}};return(0,q.jsx)(Of,{className:`feedback-overlay`,"data-backdrop":``,isDismissable:!0,...r,children:(0,q.jsx)(Ef,{className:`feedback-modal`,children:(0,q.jsx)(uf,{className:`feedback-dialog`,"aria-labelledby":`feedback-title`,children:({close:t})=>(0,q.jsx)(hG,{api:e,close:t})})})})}function hG({api:e,close:t}){let[n,r]=(0,v.useState)(dG),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)({state:`idle`}),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(null),f=(0,v.useRef)(null),p=n.title.trim()!==``&&n.body.trim()!==``&&n.email.trim()!==``;(0,v.useEffect)(()=>{if(!p){s({state:`idle`});return}let t=new AbortController;s({state:`loading`});let r=setTimeout(()=>{e.preview(n,t.signal).then(e=>{if(t.signal.aborted)return;let n=lG(e);s(n?{state:`ready`,data:n}:{state:`problem`,message:uG(e)})},e=>!t.signal.aborted&&s({state:`problem`,message:e instanceof Error?e.message:String(e)}))},fG);return()=>{clearTimeout(r),t.abort()}},[e,n,p]),(0,v.useEffect)(()=>{u?.ok&&f.current?.focus()},[u]);let m=e=>{r(t=>({...t,...e})),a(!1),d(null)},h=o.state===`ready`?o.data:null,g=h!==null&&i&&!c&&e.disabled===null;return u?.ok?(0,q.jsxs)(`div`,{className:`feedback-body`,children:[(0,q.jsx)(ja,{slot:`title`,level:2,id:`feedback-title`,children:`Feedback sent`}),(0,q.jsx)(`p`,{ref:f,tabIndex:-1,role:`status`,children:u.message}),(0,q.jsx)(`p`,{className:`note`,children:`It becomes a public GitHub issue in imagile-dev/toil, and the email address you gave hears when it is filed and when it closes.`}),(0,q.jsx)(`div`,{className:`feedback-actions`,children:(0,q.jsx)(W,{className:`btn btn--accent`,onPress:t,children:`Close`})})]}):(0,q.jsxs)(`form`,{className:`feedback-body`,onSubmit:async t=>{if(t.preventDefault(),g){l(!0);try{let t=await e.send(n),r=lG(t);d(r?.sent?{ok:!0,message:r.message??`Sent.`}:{ok:!1,message:r?`toil sent nothing: the report was not approved.`:uG(t)})}catch(e){d({ok:!1,message:e instanceof Error?e.message:String(e)})}finally{l(!1)}}},noValidate:!0,children:[(0,q.jsx)(ja,{slot:`title`,level:2,id:`feedback-title`,children:`Send feedback to Imagile`}),(0,q.jsxs)(`p`,{className:`note`,children:[`A bug report or a feature request, sent through `,(0,q.jsx)(`code`,{children:`toil feedback`}),`. Only what you type below is sent, with toil's version and commit.`]}),(0,q.jsxs)(Bf,{className:`shells`,orientation:`horizontal`,value:n.kind,onChange:e=>m({kind:e}),children:[(0,q.jsx)(va,{className:`feedback-label`,children:`Kind`}),(0,q.jsx)(Vf,{value:`bug`,className:`shell-choice`,children:`Bug report`}),(0,q.jsx)(Vf,{value:`feature`,className:`shell-choice`,children:`Feature request`})]}),(0,q.jsxs)(Yp,{className:`field-text`,value:n.title,onChange:e=>m({title:e}),maxLength:120,isRequired:!0,children:[(0,q.jsx)(va,{className:`feedback-label`,children:`Title`}),(0,q.jsx)(jo,{autoComplete:`off`})]}),(0,q.jsxs)(Yp,{className:`field-text feedback-details`,value:n.body,onChange:e=>m({body:e}),maxLength:4e3,isRequired:!0,children:[(0,q.jsx)(va,{className:`feedback-label`,children:`Details`}),(0,q.jsx)(qp,{rows:5})]}),(0,q.jsxs)(Yp,{className:`field-text`,type:`email`,value:n.email,onChange:e=>m({email:e}),isRequired:!0,children:[(0,q.jsx)(va,{className:`feedback-label`,children:`Your email, kept private`}),(0,q.jsx)(jo,{autoComplete:`email`,spellCheck:!1})]}),(0,q.jsxs)(`section`,{className:`feedback-preview`,"aria-labelledby":`feedback-preview-title`,children:[(0,q.jsx)(`h3`,{id:`feedback-preview-title`,children:`Exactly what will be sent`}),(0,q.jsxs)(`div`,{"aria-live":`polite`,children:[o.state===`idle`&&(0,q.jsx)(`p`,{className:`note`,children:`Fill in the title, details and email to see the report.`}),o.state===`loading`&&(0,q.jsx)(`p`,{className:`note`,children:`Asking toil for the report…`}),o.state===`problem`&&(0,q.jsx)(`p`,{className:`failure`,children:o.message}),h&&(0,q.jsxs)(`p`,{className:`note`,children:[`To `,(0,q.jsx)(`code`,{children:h.endpoint}),`:`]})]}),h&&(0,q.jsx)(`pre`,{className:`feedback-report`,tabIndex:0,"aria-label":`The report, as toil would send it`,children:JSON.stringify(h.report,null,2)})]}),h&&(0,q.jsxs)(`div`,{className:`feedback-consent`,children:[(0,q.jsx)(`p`,{id:`feedback-disclaimer`,className:`feedback-disclaimer`,children:h.disclaimer}),(0,q.jsxs)(Eo,{className:`check`,isSelected:i,onChange:a,isRequired:!0,"aria-describedby":`feedback-disclaimer`,children:[(0,q.jsx)(`span`,{className:`box`,"aria-hidden":`true`,children:i?`✓`:``}),`I have removed company data from this report and agree to send it to Imagile LLC.`]})]}),e.disabled&&(0,q.jsxs)(`p`,{className:`config-off`,children:[(0,q.jsx)(`strong`,{children:`Sending is turned off.`}),` `,e.disabled]}),u&&!u.ok&&(0,q.jsx)(`p`,{role:`alert`,className:`failure`,children:u.message}),(0,q.jsxs)(`div`,{className:`feedback-actions`,children:[(0,q.jsx)(W,{type:`submit`,className:`btn btn--accent`,isDisabled:!g,children:c?`Sending…`:`Send`}),(0,q.jsx)(W,{className:`btn`,onPress:t,children:`Cancel`})]})]})}function gG(e,t){let n={started:0,answered:0,reading:null},r=[];return async(i,a,o)=>{n.started++,r.push(i),t({...n,reading:i});try{return await e(i,a,o)}finally{n.answered++,r.splice(r.indexOf(i),1),t({...n,reading:r.at(-1)??i})}}}function _G(e){return!e||!e.started?null:`${e.answered} of ${e.started} toil ${e.started===1?`call`:`calls`} answered${e.reading&&e.answered<e.started?`; reading toil ${e.reading}`:``}.`}function vG(e){return e?`Syncing ${e.dossier??`the dossiers`}: ${e.dossiersDone} of ${e.dossiersTotal||`?`} dossiers, ${e.requests} requests, ${e.pages} pages${e.retries?`, ${e.retries} retries`:``}.`:null}var yG=/[\s\-_/.:#()]/;function bG(e,t){let n=t.indexOf(e);if(n>=0)return 100+e.length*10+(n===0?50:yG.test(t[n-1])?30:0)-Math.min(n,20);let r=0,i=0,a=-2;for(let n of e){let e=t.indexOf(n,i);if(e<0)return null;r+=1+(e===a+1?5:0)+(e===0||yG.test(t[e-1])?8:0),a=e,i=e+1}return r-Math.min(t.indexOf(e[0]),20)/4}function xG(e,t){let n=e.toLowerCase().split(/\s+/).filter(Boolean),r=t.toLowerCase(),i=0;for(let e of n){let t=bG(e,r);if(t===null)return null;i+=t}return i}function SG(e,t,n){return e.map((e,r)=>({entry:e,i:r,score:xG(t,n(e))})).filter(e=>e.score!==null).sort((e,t)=>t.score-e.score||e.i-t.i).map(({entry:e,score:t})=>({entry:e,score:t}))}var CG={commands:`Commands`,dossiers:`Dossiers`,tabs:`Tabs`,items:`Items`,analyses:`Analyses`,settings:`Settings`,themes:`Themes`},wG=[`commands`,`dossiers`,`tabs`,`items`,`analyses`,`settings`,`themes`],TG={commands:8,dossiers:8,tabs:10,items:20,analyses:8,settings:8,themes:8};function EG(e){let t=Math.max(1,Math.round(e/6e4));if(t<60)return`${t} minute${t===1?``:`s`}`;let n=Math.round(t/60);return n<48?`${n} hour${n===1?``:`s`}`:`${Math.round(n/24)} days`}function DG(e,t){if(!e)return null;let n=t-Date.parse(e.at);return e.status===`ok`?n>864e5?`cached ${EG(n)} ago`:null:`last sync ${e.status===`partial`?`partly failed`:`failed`}, cached ${EG(n)} ago`}function OG(e){let t=[],n=e.route.view===`dossiers`||e.route.view===`settings`?null:e.route.dossier,r=n?e.loaded[n]:void 0;if(e.onSync&&t.push({id:`cmd:sync`,group:`commands`,label:`Sync now`,detail:`Read every dossier through toil into the cache`,go:{run:e.onSync}}),n&&r?.ok){t.push({id:`cmd:ask`,group:`commands`,label:`Ask about ${n}`,detail:`Focus the Ask bar`,go:{command:{kind:`ask`}}}),t.push({id:`cmd:analyze`,group:`commands`,label:`Analyze ${n}`,detail:`The agent's pulse check of the dossier`,go:{command:{kind:`analyze`}}});let i=e.focused?r.value.items.find(t=>t.id===e.focused):void 0;i&&e.canAssign&&t.push({id:`cmd:assign`,group:`commands`,label:`Assign ${hg(i)} to an agent`,detail:i.title,go:{command:{kind:`assign`,id:i.id}}});for(let n of e.adapters?.options??[]){if(!n.ready)continue;let r=n.model?`${n.label} (${n.model})`:n.label;t.push({id:`cmd:agent:${n.name}`,group:`commands`,label:`Answer with ${r}`,detail:`For this chat, from its next question`,go:{command:{kind:`agent`,name:n.name===e.adapters.chosen?null:n.name,label:r}}})}}e.agentSettings&&t.push({id:`cmd:agent-default`,group:`commands`,label:`Choose the default agent`,detail:`Settings, Agent`,go:{href:`#/settings/agent`}}),t.push({id:`cmd:shortcuts`,group:`commands`,label:`Keyboard shortcuts`,detail:`Press ${dF.shortcuts.keys.join(``)} anywhere`,go:{run:e.openShortcuts}}),t.push({id:`dossier:*`,group:`dossiers`,label:`All dossiers`,go:{href:`#/`}});for(let n of e.dossiers)t.push({id:`dossier:${n}`,group:`dossiers`,label:n,go:{href:bg(n)}});for(let n of e.dossiers)for(let e of LL)t.push({id:`tab:${n}:${e.id}`,group:`tabs`,label:e.label,detail:n,text:`${e.label} ${n}`,go:{href:e.href(n)}});for(let n of e.dossiers){let r=e.loaded[n];if(!r?.ok)continue;let i=DG(e.synced?.[n],e.at);for(let e of r.value.items){let r=e.status??Ig[e.statusCategory];t.push({id:`item:${n}:${e.id}`,group:`items`,label:`${hg(e)} ${e.title}`,detail:[n,r,i].filter(Boolean).join(` · `),go:{href:xg(n,e.id)}})}}for(let n of e.dossiers)for(let r of e.analyses[n]??[])t.push({id:`analysis:${n}:${r.id}`,group:`analyses`,label:`Analysis of ${n}, ${Y(r.at)}`,...r.recommendation?{detail:r.recommendation}:{},text:`analysis ${n} ${Y(r.at)} ${r.recommendation??``}`,go:{href:Og(n,r.id)}});for(let e of YH)t.push({id:`settings:${e.page}`,group:`settings`,label:e.label,detail:`Settings`,text:`settings ${e.label}`,go:{href:`#/settings/${e.page}`}});for(let n of e.themes)t.push({id:`theme:${n.name}`,group:`themes`,label:`${n.label} theme`,...n.name===e.currentTheme?{detail:`The theme now`}:{},go:{run:()=>e.setTheme(n.name)}});return t}function kG(e,t,n){let r=t.trim();if(!r){let t=e.filter(e=>e.group!==`items`&&e.group!==`analyses`&&(e.group!==`tabs`||e.detail===n));return wG.map(e=>({group:e,entries:t.filter(t=>t.group===e)})).filter(e=>e.entries.length)}let i=SG(e,r,e=>e.text??e.label);return wG.map(e=>{let t=i.filter(t=>t.entry.group===e).slice(0,TG[e]);return{group:e,best:t[0]?.score??-1/0,entries:t.map(e=>e.entry)}}).filter(e=>e.entries.length).sort((e,t)=>t.best-e.best).map(({group:e,entries:t})=>({group:e,entries:t}))}var AG=e=>requestAnimationFrame(()=>requestAnimationFrame(e));function jG({isOpen:e,onOpenChange:t,agent:n,analysesApi:r,reading:i,...a}){let[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)({}),[f,p]=(0,v.useState)(0),m=a.dossiers.join(`
61
61
  `),h=a.route.view===`dossiers`||a.route.view===`settings`?null:a.route.dossier;(0,v.useEffect)(()=>{if(!e)return;let t=!0;p(Date.now()),n.adapters&&h&&n.adapters().then(e=>t&&l(e),()=>t&&l(null));for(let e of m?m.split(`
62
- `):[])r.list(e).then(n=>t&&d(t=>({...t,[e]:n})),()=>void 0);return()=>{t=!1}},[e,n,r,m,h]);let g=e?DG({...a,analyses:u,adapters:c,at:f}):[],_=OG(g,o,h),y=new Map(g.map(e=>[e.id,e])),b=e=>{let n=y.get(e);if(t(!1),!n)return;let r=n.go;kG(()=>{`href`in r?window.location.hash=r.href:`command`in r?KA(r.command):r.run()})};return(0,v.useEffect)(()=>{e||s(``)},[e]),(0,q.jsx)(Of,{className:`palette-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:e,onOpenChange:t,children:(0,q.jsx)(Ef,{className:`palette-modal`,children:(0,q.jsxs)(uf,{className:`palette`,"aria-label":`Command palette`,"data-palette":``,children:[(0,q.jsxs)(hr,{inputValue:o,onInputChange:s,children:[(0,q.jsx)(Ap,{className:`palette__search`,"aria-label":`Jump to or run`,autoFocus:!0,children:(0,q.jsx)(jo,{className:`palette__input`,placeholder:`Jump to a dossier, tab, item or setting, or run a command`,"data-palette-input":``})}),(0,q.jsx)(`p`,{className:`palette__status note`,role:`status`,children:i>0?`Reading ${i} more ${i===1?`dossier`:`dossiers`} from the cache for the item search…`:o.trim()?``:`Type a key or a title to search the items of every dossier.`}),(0,q.jsx)(Qd,{className:`palette__list`,"aria-label":`Results`,onAction:e=>b(String(e)),renderEmptyState:()=>(0,q.jsxs)(`p`,{className:`palette__empty`,children:[`Nothing matches “`,o.trim(),`”.`]}),children:_.map(e=>(0,q.jsxs)(nf,{id:e.group,className:`palette__group`,children:[(0,q.jsx)(ys,{className:`menu-header`,children:SG[e.group]}),e.entries.map(e=>(0,q.jsxs)(af,{id:e.id,textValue:e.label,className:`menu-item palette__item`,"data-palette-item":e.group,children:[(0,q.jsx)(`span`,{className:`palette__label`,children:e.label}),e.detail&&(0,q.jsx)(`span`,{className:`palette__detail`,children:e.detail})]},e.id))]},e.group))})]}),(0,q.jsxs)(`p`,{className:`palette__foot note`,children:[(0,q.jsx)(`kbd`,{children:`↑`}),` `,(0,q.jsx)(`kbd`,{children:`↓`}),` to move, `,(0,q.jsx)(`kbd`,{children:`Enter`}),` to open, `,(0,q.jsx)(`kbd`,{children:`Escape`}),` to close. `,(0,q.jsx)(Fw,{topic:`palette`})]})]})})})}function jG({isOpen:e,onOpenChange:t}){let n=new Map;for(let e of Object.values(uF))n.set(e.where,[...n.get(e.where)??[],e]);let r=e=>e.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`+`,(0,q.jsx)(`kbd`,{children:fF(e)})]},e));return(0,q.jsx)(Of,{className:`palette-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:e,onOpenChange:t,children:(0,q.jsx)(Ef,{className:`palette-modal shortcuts-modal`,children:(0,q.jsx)(uf,{className:`shortcuts`,"aria-labelledby":`shortcuts-title`,"data-shortcuts":``,children:({close:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`shortcuts__head`,children:[(0,q.jsx)(ja,{slot:`title`,id:`shortcuts-title`,children:`Keyboard shortcuts`}),(0,q.jsx)(W,{className:`btn btn--small`,onPress:e,"data-shortcuts-close":``,children:`Close`})]}),[...n].map(([e,t])=>(0,q.jsxs)(`section`,{className:`shortcuts__group`,"aria-label":e,children:[(0,q.jsx)(`h3`,{children:e}),(0,q.jsx)(`dl`,{children:t.map(e=>(0,q.jsxs)(`div`,{className:`shortcuts__row`,children:[(0,q.jsxs)(`dt`,{children:[r(e.keys),(e.or??[]).map(e=>(0,q.jsxs)(`span`,{children:[` or `,r(e)]},e.join(`+`)))]}),(0,q.jsx)(`dd`,{children:e.what})]},e.what))})]},e))]})})})})}var MG=`#/settings/toil`;function NG({history:e=BD}){let t=(0,v.useSyncExternalStore)(e.subscribe,e.get,e.get),[n,r]=(0,v.useState)(!1),i=LD(t);return(0,q.jsxs)(lf,{isOpen:n,onOpenChange:r,children:[(0,q.jsxs)(W,{className:`btn bell`,"data-bell":``,"aria-label":i?`Notifications, ${i} unread`:`Notifications`,children:[(0,q.jsxs)(`svg`,{className:`bell__icon`,viewBox:`0 0 24 24`,width:`20`,height:`20`,"aria-hidden":`true`,focusable:`false`,children:[(0,q.jsx)(`path`,{d:`M12 3a6 6 0 0 0-6 6v3.6L4.3 15.4A1 1 0 0 0 5.2 17h13.6a1 1 0 0 0 .9-1.6L18 12.6V9a6 6 0 0 0-6-6Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinejoin:`round`}),(0,q.jsx)(`path`,{d:`M9.5 19.5a2.6 2.6 0 0 0 5 0`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),i>0&&(0,q.jsx)(`span`,{className:`bell__count`,"aria-hidden":`true`,children:i})]}),(0,q.jsx)(Xu,{className:`popover bell-popover`,placement:`bottom end`,offset:6,children:(0,q.jsxs)(uf,{className:`bell-dialog`,"aria-labelledby":`bell-title`,"data-bell-list":``,children:[(0,q.jsxs)(`div`,{className:`bell-dialog__head`,children:[(0,q.jsx)(ja,{slot:`title`,id:`bell-title`,level:2,children:`Notifications`}),(0,q.jsx)(Fw,{topic:`notification-history`}),(0,q.jsx)(W,{className:`btn btn--small`,onPress:()=>e.markAllRead(),isDisabled:i===0,"data-bell-read":``,children:`Mark all read`})]}),t.entries.length?(0,q.jsx)(`ol`,{className:`bell-list`,"aria-label":`The last 50, newest first`,children:t.entries.map(e=>{let n=e.seq>t.read;return(0,q.jsxs)(`li`,{className:n?`bell-entry bell-entry--unread`:`bell-entry`,"data-kind":e.kind,children:[(0,q.jsxs)(`a`,{href:e.href,onClick:()=>r(!1),children:[n&&(0,q.jsx)(`span`,{className:`sr-only`,children:`Unread: `}),(0,q.jsx)(`strong`,{children:e.title}),(0,q.jsx)(`span`,{className:`bell-entry__line`,children:e.line})]}),(0,q.jsx)(`span`,{className:`note`,children:Y(e.at)})]},e.seq)})}):(0,q.jsxs)(`p`,{className:`bell-empty`,children:[`Nothing yet.`,` `,(0,q.jsx)(`a`,{href:MG,onClick:()=>r(!1),"data-empty-action":``,children:`Choose what notifies`})]})]})})]})}var PG=(0,v.lazy)(()=>Zm(()=>import(`./PowershellMan-24GyLAoI.js`).then(e=>({default:e.PowershellMan})),__vite__mapDeps([8,9]),import.meta.url)),FG=`#/powershell-man`;function IG(e){let t=e.replace(/^#\/?/,``).split(`/`);if(t[0]===`settings`){let e=t[1]===`dossiers`||t[1]===`toil`||t[1]===`usage`||t[1]===`agent-usage`||t[1]===`agent`?t[1]:`connections`,n=t.slice(2).filter(Boolean).map(e=>{try{return decodeURIComponent(e)}catch{return e}});return n.length?{view:`settings`,page:e,at:n}:{view:`settings`,page:e}}if(t[0]===`dossier`&&t[1]){let e=decodeURIComponent(t[1]);if(t[2]===`item`&&t[3])return{view:`item`,dossier:e,id:decodeURIComponent(t.slice(3).join(`/`))};if(t[2]===`assignment`&&t[3])return{view:`assignment`,dossier:e,id:decodeURIComponent(t[3])};if(t[2]===`prs`)return{view:`prs`,dossier:e};if(t[2]===`people`)return{view:`people`,dossier:e};if(t[2]===`command-center`)return{view:`command-center`,dossier:e};if(t[2]===`board`)return t[3]?{view:`dashboard`,dossier:e,tab:`board`,person:decodeURIComponent(t.slice(3).join(`/`))}:{view:`dashboard`,dossier:e,tab:`board`};if(t[2]===`analyses`&&t[3])return{view:`dashboard`,dossier:e,tab:`analyses`,analysis:decodeURIComponent(t.slice(3).join(`/`))};if(t[2]===`dependencies`||t[2]===`analyses`)return{view:`dashboard`,dossier:e,tab:t[2]};if(t[2]===`worklog`&&t[3]===`standup`){let[n,r]=[t[4],t[5]].map(e=>e?decodeURIComponent(e):void 0),i=[n,r].filter(e=>e!==void 0&&e!==``&&!iW(e));return i.length||!n&&r?{view:`standup`,dossier:e,from:null,to:null,ignored:i.join(`, `)||r}:{view:`standup`,dossier:e,from:n??null,to:r||n||null}}return t[2]===`worklog`?{view:`worklog`,dossier:e,day:iW(t[3])?t[3]:null}:{view:`dashboard`,dossier:e}}return{view:`dossiers`}}function LG(e){switch(e.view){case`dashboard`:return e.tab??`overview`;case`prs`:return`prs`;case`people`:return`people`;case`worklog`:case`standup`:return`worklog`;case`command-center`:case`item`:return`board`;default:return null}}function RG(){let[e,t]=(0,v.useState)(()=>IG(window.location.hash));return(0,v.useEffect)(()=>{let e=()=>{if(window.location.hash===FG)return;let e=IG(window.location.hash);t(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),e}function zG(){let[e,t]=(0,v.useState)(()=>window.location.hash===FG),n=(0,v.useRef)(`#/`),r=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let e=()=>t(window.location.hash===FG);return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),(0,v.useEffect)(()=>{if(e)return()=>{r.current?.focus(),r.current=null}},[e]),{open:e,show:(0,v.useCallback)(()=>{e||(n.current=window.location.hash&&window.location.hash!==FG?window.location.hash:`#/`,r.current=document.activeElement instanceof HTMLElement?document.activeElement:null,window.location.hash=FG)},[e]),close:(0,v.useCallback)(()=>{window.location.hash===FG?window.location.hash=n.current:t(!1)},[])}}var BG=e=>({ok:!1,message:e instanceof Error?e.message:String(e)});function VG({execute:e,agent:t,config:n,themeSetting:r,now:i,preview:a,agentSettings:o,feedback:s,modelUsage:c,worklog:l,startReady:u,assignments:d,analyses:f,synced:p,afterDescribe:m,serverStatus:h,onSync:g,syncing:_,news:y,versions:b}){let[x]=(0,v.useState)(()=>MU()),S=f??x,C=RG(),w=zG(),T=(0,v.useRef)(``),E=(0,v.useRef)(0);(0,v.useEffect)(()=>{let e=e=>{if(w.open||e.repeat||e.isComposing||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||gF(e.target)||e.target instanceof Element&&e.target.closest(`[role="dialog"]`)){T.current=``;return}if(e.key.length!==1||!/[a-z]/i.test(e.key))return;let t=Date.now();t-E.current>1400&&(T.current=``),E.current=t,T.current=(T.current+e.key.toLowerCase()).slice(-10),T.current===`powershell`&&(T.current=``,e.preventDefault(),w.show())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[w.open,w.show]);let{mine:D,mark:O}=fO(),k=(0,v.useMemo)(()=>d?dO(d,O):void 0,[d,O]),[A,j]=(0,v.useState)(null),[M,ee]=(0,v.useState)({}),[te,ne]=(0,v.useState)({}),re=NT(r??null),N=ah(re.theme),ie=(0,v.useRef)(null),ae=(0,v.useRef)(null),oe=(0,v.useCallback)(e=>{ae.current=e,e?.querySelector(`button`)?.focus()},[]),se=(0,v.useRef)(!0),P=C.view===`dossiers`||C.view===`settings`?null:C.dossier,[ce,F]=(0,v.useState)({open:!1,focused:null}),[le,ue]=(0,v.useState)(!1),de=Mw(b),[fe,pe]=(0,v.useState)(null),me=()=>{pe({shown:de.shown,fresh:de.fresh.length>0}),de.seen()},I=()=>{let e=document.activeElement?.closest(`[data-item]`)?.getAttribute(`data-item`)??null;F({open:!0,focused:e??(C.view===`item`?C.id:null)})},L=(0,v.useRef)(I);(0,v.useEffect)(()=>{L.current=I}),(0,v.useEffect)(()=>{let e=e=>{w.open||e.target instanceof Element&&e.target.closest(`[data-powershell-man]`)||(hF(`palette`,e)?(e.preventDefault(),F(e=>e.open?{...e,open:!1}:e),document.querySelector(`[data-palette]`)||L.current()):hF(`shortcuts`,e)&&!gF(e.target)&&(e.preventDefault(),ue(!0)))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[w.open]),(0,v.useEffect)(()=>{C.view===`settings`&&j(null)},[C.view]),(0,v.useEffect)(()=>{if(C.view===`settings`&&!ce.open||A)return;let t=!0;return TS(e).then(e=>t&&j({ok:!0,value:e}),e=>t&&j(BG(e))),()=>{t=!1}},[C.view,A,e,ce.open]);let he=A?.ok?A.value.dossiers.map(e=>e.name):[],ge=(C.view===`dossiers`||ce.open?he:[]).find(e=>!M[e]);(0,v.useEffect)(()=>{if(!ge)return;let t=!0;return wS(e,ge).then(e=>t&&ee(t=>({...t,[ge]:{ok:!0,value:e}})),e=>t&&ee(t=>({...t,[ge]:BG(e)}))),()=>{t=!1}},[ge,e]);let R=C.view===`dashboard`&&P&&M[P]?.ok?P:null;(0,v.useEffect)(()=>{R&&oU(R)},[R]);let _e=P?M[P]:void 0;(0,v.useEffect)(()=>{!a&&P&&_e?.ok&&bU(P,tg(_e.value.items,_e.value.changes,i))},[a,P,_e,i]);let[ve]=(0,v.useState)(()=>!a&&P?SU(P,i):null),z=e=>{if(m?.(),!e.renamed){j(t=>t?.ok?{ok:!0,value:{...t.value,dossiers:t.value.dossiers.map(t=>t.name===e.name?{...t,description:e.description}:t)}}:t),ee(t=>{let n=t[e.name];return n?.ok?{...t,[e.name]:{ok:!0,value:{...n.value,description:e.description}}}:t});return}let{from:t,to:n}=e.renamed;if(sU(t,n),xU(t,n),j(null),ee(({[t]:e,...n})=>n),P===t){let e=window.location.hash.replace(/^#\/dossier\/[^/]+/,``);window.location.hash=`${bg(n)}${e}`}};(0,v.useEffect)(()=>{if(!P||M[P])return;let t=!0;return wS(hG(e,e=>t&&ne(t=>({...t,[P]:e}))),P).then(e=>t&&ee(t=>({...t,[P]:{ok:!0,value:e}})),e=>t&&ee(t=>({...t,[P]:BG(e)}))),()=>{t=!1}},[P,M,e]);let ye=JSON.stringify(C),be=(0,v.useRef)(!1),xe=C.view===`settings`&&!!C.at;(0,v.useEffect)(()=>{se.current?se.current=!1:be.current=!xe},[ye,xe]),(0,v.useEffect)(()=>{if(w.open)return;let e=be.current?ie.current?.querySelector(`#board-filter`)??ie.current?.querySelector(`h1`):null;e&&(be.current=!1,e.focus())});let Se=e=>{e.preventDefault(),ie.current?.querySelector(`h1`)?.focus()},Ce=vT(N.name);Lm();let we=C.view===`settings`||(C.view===`dossiers`?A!==null:!!(P&&M[P])),Te=C.view===`dossiers`||!P?`Reading the dossiers with toil dossiers list.`:gG(te[P]),Ee=(e,t)=>WS(N.lexicon,QS(N,re),e,t),De=[{href:`#/`,label:`Dossiers`,current:C.view===`dossiers`},{href:`#/settings`,label:`Settings`,current:C.view===`settings`}],B=(0,v.useRef)(null),V=oE(UG),H=WG(B,!V,De.map(e=>e.label).join(`|`)),Oe=V||H,ke=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(dj,{label:`Theme`,value:N.name,onChange:re.setTheme,options:Qm.map(e=>({id:e.name,label:e.label}))}),Object.keys(N.schemes).length>1&&(0,q.jsx)(dj,{label:`Appearance`,value:re.scheme,onChange:e=>re.setScheme(e),options:[{id:`system`,label:`System`},{id:`light`,label:`Light`},{id:`dark`,label:`Dark`}]})]}),Ae=e=>(0,q.jsx)(Lw,{href:fw(C.view,C.view===`settings`?C.page:void 0),fresh:de.fresh.length>0,onWhatsNew:()=>{if(!e)return me();e(),requestAnimationFrame(()=>requestAnimationFrame(me))}}),je=P?M[P]:void 0,Me=e=>(0,q.jsxs)(`div`,{role:`alert`,className:`failure`,children:[(0,q.jsx)(`h1`,{tabIndex:-1,children:`The data didn't load`}),(0,q.jsx)(`p`,{children:e})]}),Ne;if(C.view===`settings`)Ne=(0,q.jsx)(YH,{page:C.page,...C.at?{at:C.at}:{},config:n??null,modelUsage:c??null,...o?{agent:o}:{}});else if(C.view===`dossiers`)Ne=A?A.ok?(0,q.jsx)(fU,{dossiers:A.value.dossiers,calls:A.value.calls,loaded:M,now:i,synced:p??(a?null:{}),config:n??null,onDescribed:z,onSync:g}):Me(A.message):(0,q.jsx)(PA,{message:Ee(`loading.dossiers`),detail:`Reading them with toil dossiers list.`});else if(!je)Ne=(0,q.jsx)(PA,{message:Ee(`loading.dossier`,{name:C.dossier}),detail:gG(te[C.dossier])});else if(!je.ok)Ne=Me(je.message);else{let r={...g?{sync:g}:{},dossier:je.value,byId:new Map(je.value.items.map(e=>[e.id,e])),prById:new Map((je.value.pullRequests??[]).map(e=>[e.id,e])),agent:t,now:i,execute:e,analyses:S,...n?{config:n}:{},...k?{assignments:k}:{},...u?{startReady:u}:k&&!k.disabled?{startReady:jU(k,C.dossier)}:{},refresh:()=>ee(({[C.dossier]:e,...t})=>t),described:z};Ne=(0,q.jsx)(ug,{value:r,children:(0,q.jsx)(oj,{children:(0,q.jsx)(RL,{tab:LG(C),heading:C.view===`dashboard`,dossiers:A?.ok?A.value.dossiers.map(e=>e.name):null,...C.view===`command-center`?{boardView:`readiness`}:C.view===`dashboard`&&C.tab===`board`?{boardView:`board`}:{},children:C.view===`item`?(0,q.jsx)(EU,{id:C.id}):C.view===`assignment`?(0,q.jsx)(OU,{id:C.id}):C.view===`prs`?(0,q.jsx)(tW,{}):C.view===`people`?(0,q.jsx)(zU,{}):C.view===`worklog`?(0,q.jsx)(ZW,{api:l??null,day:C.day}):C.view===`standup`?(0,q.jsx)(LW,{api:l??null,from:C.from,to:C.to,...C.ignored?{ignored:C.ignored}:{}}):C.view===`command-center`?(0,q.jsx)(Mj,{}):(0,q.jsx)(mL,{...C.tab?{tab:C.tab}:{},...C.person?{person:C.person}:{},...C.analysis?{analysis:C.analysis}:{}})})},C.dossier)})}return(0,q.jsx)(pO,{assignments:k,dossier:P,mine:D,children:(0,q.jsx)(KS,{value:N,children:(0,q.jsx)(XS,{value:re,children:(0,q.jsx)(bT,{value:Ce,children:(0,q.jsxs)(UA,{children:[(0,q.jsx)(HG,{css:Qm.map(ih).join(`
63
- `)}),(0,q.jsx)(Oh,{theme:N.name}),(0,q.jsx)(zA,{ready:we,detail:Te,data:ve}),(0,q.jsx)(JG,{news:y??null,dossier:P}),(0,q.jsx)(`a`,{className:`skip`,href:`#main`,onClick:Se,inert:w.open,"aria-hidden":w.open||void 0,children:`Skip to content`}),(0,q.jsxs)(`header`,{inert:w.open,"aria-hidden":w.open||void 0,children:[a&&(0,q.jsxs)(`p`,{className:`banner`,role:`note`,children:[(0,q.jsx)(`strong`,{children:`Toil UI beta, on sample data.`}),` Nothing here connects to a tracker.`]}),(0,q.jsx)(`div`,{className:`top`,"data-one-row":``,ref:B,children:(0,q.jsxs)(Ce.Header,{children:[(0,q.jsx)(`a`,{className:`brand`,href:`#/`,children:(0,q.jsxs)(`span`,{className:`brand-name`,children:[(0,q.jsx)(`span`,{className:`wordmark`,children:`toil`}),` `,(0,q.jsx)(`span`,{className:`sticker`,children:(0,q.jsx)(`span`,{className:`sticker__face`,children:`UI`})})]})}),Oe?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(NG,{}),(0,q.jsx)(KG,{suspended:w.open,links:De,feedback:s,controls:ke,help:Ae,fresh:de.fresh.length>0,onPalette:I,onShortcuts:()=>ue(!0)})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`nav`,{"aria-label":`Views`,children:(0,q.jsx)(GG,{links:De})}),(0,q.jsxs)(`div`,{className:`settings`,children:[(0,q.jsx)(NG,{}),Ae(),s&&!w.open&&(0,q.jsx)(fG,{api:s}),ke]})]})]})}),(0,q.jsx)(wD,{load:h}),(0,q.jsx)(mO,{}),(0,q.jsxs)(`p`,{className:`sync`,children:[a?`Sample data`:`Data`,` read `,Y(i),` through toil, read-only.`]})]}),(0,q.jsxs)(`main`,{id:`main`,ref:ie,"data-view":C.view,inert:w.open,"aria-hidden":w.open||void 0,children:[_?.running&&(0,q.jsx)(PA,{size:`panel`,message:_G(_),live:!1}),re.saveError&&(0,q.jsx)(`p`,{className:`notice`,role:`alert`,children:re.saveError}),Ne]}),(0,q.jsx)(AG,{isOpen:ce.open&&!w.open,onOpenChange:e=>F(t=>({...t,open:e})),agent:t,analysesApi:S,reading:ce.open?he.filter(e=>!M[e]).length:0,route:C,dossiers:he,loaded:M,synced:p,themes:Qm.map(e=>({name:e.name,label:e.label})),currentTheme:N.name,setTheme:re.setTheme,onSync:g,focused:ce.focused,canAssign:!(!k||k.disabled),agentSettings:!!o,openShortcuts:()=>ue(!0)}),(0,q.jsx)(jG,{isOpen:le&&!w.open,onOpenChange:ue}),(0,q.jsx)(Nw,{shown:fe?.shown??[],fresh:fe?.fresh??!1,isOpen:fe!==null&&!w.open,onOpenChange:e=>!e&&pe(null)}),w.open&&(0,q.jsx)(v.Suspense,{fallback:null,children:(0,q.jsx)(`div`,{className:`pm-dialog`,ref:oe,role:`dialog`,"aria-modal":`true`,"aria-label":`Powershell Man`,tabIndex:-1,"data-powershell-man":!0,onKeyDown:e=>{if(![`Tab`].includes(e.key))return;let t=[...ae.current?.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`)??[]].filter(e=>!e.hasAttribute(`disabled`)),n=t[0],r=t.at(-1);!n||!r?(e.preventDefault(),ae.current?.focus()):e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())},children:(0,q.jsx)(PG,{onClose:w.close})})})]})})})})})}function HG({css:e}){let t=typeof CSSStyleSheet<`u`&&`replaceSync`in CSSStyleSheet.prototype&&`adoptedStyleSheets`in document;return(0,v.useInsertionEffect)(()=>{if(!t)return;let n=new CSSStyleSheet;return n.replaceSync(e),document.adoptedStyleSheets=[...document.adoptedStyleSheets,n],()=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(e=>e!==n)}},[e,t]),t?null:(0,q.jsx)(`style`,{children:e})}var UG=`(max-width: 1023px)`;function WG(e,t,n){let[r,i]=(0,v.useState)(null);return(0,v.useLayoutEffect)(()=>{let a=()=>{if(r!==null){(r.links!==n||window.innerWidth>r.width)&&i(null);return}let a=e.current;if(!t||!a)return;let o=[...a.querySelectorAll(`.brand, nav, .settings`)],s=[...a.querySelectorAll(`nav li`)],c=e=>{let t=e.map(e=>e.getBoundingClientRect()).filter(e=>e.height>0);return t.some(e=>t.some(t=>e.top>=t.bottom))};(c(o)||c(s))&&i({width:window.innerWidth,links:n})};return a(),window.addEventListener(`resize`,a),()=>window.removeEventListener(`resize`,a)},[e,t,n,r]),r!==null&&r.links===n}function GG({links:e,onFollow:t}){return(0,q.jsx)(`ul`,{children:e.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(`a`,{href:e.href,"aria-current":e.current?`page`:void 0,onClick:t,children:e.label})},e.href))})}function KG({suspended:e,links:t,feedback:n,controls:r,help:i,fresh:a,onPalette:o,onShortcuts:s}){let[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),f=t.find(e=>e.current)?.label;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(lf,{isOpen:c&&!e,onOpenChange:l,children:[(0,q.jsxs)(W,{className:`btn menu-button`,"data-menu-button":``,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`menu-button__icon`,children:`☰`}),`Menu`,a&&(0,q.jsx)(Pw,{})]}),(0,q.jsx)(Xu,{className:`popover nav-menu`,placement:`bottom end`,offset:6,children:(0,q.jsxs)(uf,{className:`nav-menu__dialog`,"aria-label":f?`Menu, on ${f}`:`Menu`,children:[(0,q.jsx)(`nav`,{"aria-label":`Views`,children:(0,q.jsx)(GG,{links:t,onFollow:()=>l(!1)})}),(0,q.jsxs)(`div`,{className:`nav-menu__settings`,children:[(0,q.jsx)(W,{className:`btn`,onPress:()=>{l(!1),requestAnimationFrame(()=>requestAnimationFrame(o))},"data-palette-open":``,children:`Search and commands`}),(0,q.jsx)(W,{className:`btn`,onPress:()=>{l(!1),s()},children:`Keyboard shortcuts`}),i(()=>l(!1)),n&&(0,q.jsx)(W,{className:`btn feedback-open`,onPress:()=>{l(!1),d(!0)},children:`Feedback`}),r]})]})})]}),n&&(0,q.jsx)(pG,{api:n,isOpen:u&&!e,onOpenChange:d})]})}var qG=new Set;function JG({news:e,dossier:t}){let n=HA();return(0,v.useEffect)(()=>{if(!e||qG.has(e.id))return;qG.add(e.id);let r=e.byDossier.filter(e=>!t||e.dossier===t).flatMap(e=>e.events);n.play(vH(r))},[e,t,n]),null}var YG=`X-Toil-UI-Session`,XG=`X-Toil-UI-CSRF`,ZG=class extends Error{usage;constructor(e,t){super(e),this.usage=t}};async function QG(e,t){try{let t=await e.json();if(t.error?.message)return new ZG(`${t.error.message}${t.error.fix?` ${t.error.fix}`:``}`,t.error.usage)}catch{}return Error(`${t} failed: the server answered ${e.status}.`)}async function $G(e=`./`,t=window.location,n=window.history){let r=new URLSearchParams(t.search).get(`token`);if(!r)throw Error(`This page needs the URL toil-ui printed when it started, which carries the launch token. A reloaded page forgets its session, so open that URL again.`);let i=await fetch(`${e}api/session`,{method:`POST`,credentials:`omit`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:r})}),a=new URLSearchParams(t.search);a.delete(`token`);let o=a.toString();if(n.replaceState(null,``,`${t.pathname}${o?`?${o}`:``}${t.hash}`),!i.ok)throw await QG(i,`Signing in`);return await i.json()}var eK=(e,t,n,r={})=>fetch(`${e}${n}`,{method:r.body===void 0?`GET`:`POST`,credentials:`omit`,headers:{[YG]:t.session,...r.body===void 0?{}:{"Content-Type":`application/json`,[XG]:t.csrf}},...r.body===void 0?{}:{body:JSON.stringify(r.body)},signal:r.signal}),tK=e=>typeof e==`object`&&!!e&&`ok`in e&&`meta`in e;function nK(e,t=`./`){return async(n,r={},i={})=>{let a=await eK(t,e,`api/execute`,{body:{command:n,input:r},signal:i.signal}),o;try{o=await a.clone().json()}catch{o=void 0}if(tK(o))return o;throw await QG(a,`toil ${n}`)}}function rK(e,t=`./`){let n=async(e,t)=>{if(!e.ok)throw await QG(e,t);return await e.json()};return{status:async()=>n(await eK(t,e,`api/sync`),`Reading the sync status`),start:async r=>n(await eK(t,e,`api/sync`,{body:r===void 0?{}:{dossier:r}}),`Starting the sync`),wipe:async()=>n(await eK(t,e,`api/cache/wipe`,{body:{confirm:`wipe`}}),`Wiping the cache`)}}function iK(e,t=`./`){let n=async n=>{let r=await eK(t,e,n);if(!r.ok)throw await QG(r,n);return await r.json()};return{disabled:null,areas:()=>n(`api/config/areas`),settings:()=>n(`api/config/settings`),async run(n,r,i={}){let a=await eK(t,e,`api/config`,{body:{command:n,input:r,...i}}),o;try{o=await a.clone().json()}catch{o=void 0}if(tK(o))return o;throw await QG(a,`toil ${n}`)}}}function aK(e,t=`./`){let n=async(n,r,i)=>{let a=await eK(t,e,`api/feedback`,{body:{fields:n,...r?{consent:!0}:{}},...i?{signal:i}:{}}),o;try{o=await a.clone().json()}catch{o=void 0}if(tK(o))return o;throw await QG(a,`toil feedback`)};return{disabled:e.sample?sG:null,preview:(e,t)=>n(e,!1,t),send:e=>n(e,!0)}}var oK={claude:`Claude, through the Claude Agent SDK`,copilot:`GitHub Copilot, through the Copilot SDK`,codex:`Codex, through the Codex SDK`,scripted:FT,none:`nobody yet: no agent is set up`};async function sK(e,t,n=`./`){let r=new Map;for(let i of t){let t=await eK(n,e,`api/agent/starters?dossier=${encodeURIComponent(i)}`);r.set(i,t.ok?await t.json():[])}return{...e.agent===`none`?{notice:`${IT} ${LT}`}:{},label:oK[e.agent]??e.agent,starters:e=>r.get(e)??[],async adapters(){let t=await eK(n,e,`api/agent/adapters`);if(!t.ok)throw await QG(t,`Reading the agents`);return await t.json()},async ask(t,r,i,a,o){let s=await eK(n,e,`api/agent/ask`,{body:{dossier:t,prompt:r,...i,...a?{chat:a}:{},...lK(o)}});if(!s.ok)throw await QG(s,`The question`);return await s.json()},async*stream(t,r,i,a,o,s){let c=await eK(n,e,`api/agent/ask`,{body:{dossier:t,prompt:r,stream:!0,...a,...o?{chat:o}:{},...lK(s)},...i?{signal:i}:{}});if(!c.ok)throw await QG(c,`The question`);/^application\/x-ndjson/.test(c.headers.get(`content-type`)??``)?yield*uK(c):yield await c.json()},async session(t){let r=await eK(n,e,`api/agent/session?chat=${encodeURIComponent(t)}`);if(!r.ok)throw await QG(r,`Reading the chat's session`);return await r.json()},async renew(t,r){let i=await eK(n,e,`api/agent/renew`,{body:{chat:t,dossier:r}});if(!i.ok)throw await QG(i,`Renewing the chat`);return await i.json()}}}async function cK(e,t=`./`){let n=await eK(t,e,`api/fingerprint`);if(!n.ok)throw await QG(n,`Reading the server's version`);return await n.json()}var lK=e=>({...e?.adapter?{adapter:e.adapter}:{},...e?.history?.length?{history:e.history}:{}});async function*uK(e){if(!e.body)throw Error(`The answer arrived with no body.`);let t=e.body.getReader(),n=new TextDecoder,r=``,i=!1,a=e=>{let t=JSON.parse(e);if(t.error)throw new ZG(`${t.error.message??`The agent failed.`}${t.error.fix?` ${t.error.fix}`:``}`,t.error.usage);return t.done&&(i=!0),t.answer??null};for(;;){let{value:e,done:i}=await t.read();e&&(r+=n.decode(e,{stream:!0}));let o;for(;(o=r.indexOf(`
64
- `))>=0;){let e=r.slice(0,o).trim();if(r=r.slice(o+1),!e)continue;let t=a(e);t&&(yield t)}if(i)break}if(r.trim()){let e=a(r.trim());e&&(yield e)}if(!i)throw Error(`The answer stopped partway: the connection to Toil UI closed.`)}async function dK(e,t){if(!e.body)throw Error(`The install answered with no body.`);let n=e.body.getReader(),r=new TextDecoder,i=``,a=null,o=e=>{let n=JSON.parse(e);if(n.error)throw Error(`${n.error.message??`The install failed.`}${n.error.fix?` ${n.error.fix}`:``}`);typeof n.line==`string`&&t(n.line),n.done&&n.status&&(a=n.status)};for(;;){let{value:e,done:t}=await n.read();e&&(i+=r.decode(e,{stream:!0}));let a;for(;(a=i.indexOf(`
65
- `))>=0;){let e=i.slice(0,a).trim();i=i.slice(a+1),e&&o(e)}if(t)break}if(i.trim()&&o(i.trim()),!a)throw Error(`The install stopped partway: the connection to Toil UI closed.`);return a}function fK(e,t=`./`){let n=async(e,t)=>{if(!e.ok)throw await QG(e,t);return await e.json()};return{status:async()=>n(await eK(t,e,`api/agent/settings`),`Reading the agent settings`),save:async r=>n(await eK(t,e,`api/agent/settings`,{body:r}),`Saving the agent settings`),async prompt(n,r){let i=await eK(t,e,`api/agent/prompt?${new URLSearchParams({...n?{dossier:n}:{},theme:r.theme,voice:r.voice?`on`:`off`})}`);if(!i.ok)throw await QG(i,`Reading the full prompt`);return(await i.json()).prompt},async installPlan(n){let r=await eK(t,e,`api/agent/install?adapter=${encodeURIComponent(n)}`);if(!r.ok)throw await QG(r,`Reading the install command`);return await r.json()},async install(n,r,i,a){let o=await eK(t,e,`api/agent/install`,{body:{adapter:n,command:r},...a?{signal:a}:{}});if(!o.ok)throw await QG(o,`The install`);return dK(o,i)}}}function pK(e,t=`./`){let n=async(e,t)=>{if(!e.ok)throw await QG(e,t);return await e.json()},r=e=>new URLSearchParams(Object.entries(e).filter(e=>e[1]!==void 0)).toString();return{disabled:e.sample?qW:null,month:async(i,a)=>n(await eK(t,e,`api/worklog/month?${r({dossier:i,month:a})}`),`Reading the worklog`),day:async(i,a)=>n(await eK(t,e,`api/worklog/day?${r({dossier:i,day:a})}`),`Reading the page`),rebuild:async(r,i)=>n(await eK(t,e,`api/worklog/rebuild`,{body:{dossier:r,day:i}}),`Rebuilding the page`),addNote:async(r,i)=>n(await eK(t,e,`api/worklog/note`,{body:{dossier:r,text:i}}),`Adding the note`),exportTo:async(r,i,a)=>n(await eK(t,e,`api/worklog/export`,{body:{dossier:r,...i,folder:a}}),`The export`),standup:async(i,a,o)=>n(await eK(t,e,`api/worklog/standup?${r({dossier:i,from:a,to:o})}`),`Building the stand-up`)}}function mK(e,t=`./`){let n=async(e,t)=>{if(!e.ok)throw await QG(e,t);return await e.json()};return{view:async()=>n(await eK(t,e,`api/usage`),`Reading the model usage`),save:async r=>n(await eK(t,e,`api/usage/settings`,{body:r}),`Saving the caps`)}}function hK(e,t=`./`){let n=e=>new URLSearchParams(e).toString();return{list:async r=>{let i=await eK(t,e,`api/analyses?${n({dossier:r})}`);if(!i.ok)throw await QG(i,`Reading the analyses`);return await i.json()},get:async(r,i)=>{let a=await eK(t,e,`api/analyses/one?${n({dossier:r,id:i})}`);if(a.status===404)return null;if(!a.ok)throw await QG(a,`Reading the analysis`);return await a.json()}}}var gK=1e3;function _K(e){let t=(e?.dossiers??[]).map(e=>e.lastSyncAt).sort();return t.length?t[t.length-1]:null}function vK(e){let t=e.job.finishedAt??new Date().toISOString(),n=`sync:${t}`;if(e.job.error)return{id:n,at:t,kind:`sync-failed`,title:`The sync stopped`,line:e.job.error,href:`#/`};let r=e.dossiers.flatMap(e=>e.sources.filter(e=>e.status===`failed`).map(t=>({dossier:e.name,area:t.area}))),i=e.dossiers.filter(e=>e.status===`failed`&&!e.sources.some(e=>e.status===`failed`)).map(e=>e.name);if(r.length||i.length){let e=[...r.map(e=>`${e.dossier}: ${mg(e.area)}`),...i.map(e=>`${e}: the dossier`)],a=r[0]?.dossier??i[0];return{id:n,at:t,kind:`sync-failed`,title:`Sync finished; ${e.length} ${e.length===1?`source`:`sources`} failed`,line:e.join(`, `),href:bg(a)}}let a=e.dossiers.length;return{id:n,at:t,kind:`sync`,title:`Sync finished`,line:`${a} ${a===1?`dossier`:`dossiers`} up to date`,href:`#/`}}function yK({dossier:e}){let t=e.sources.filter(e=>e.status===`failed`);return(0,q.jsxs)(`li`,{className:`sync-dossier`,children:[(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`strong`,{children:e.name}),` `,(0,q.jsxs)(`span`,{className:`sync-when`,children:[`synced `,Y(e.lastSyncAt)]})]}),e.status===`failed`&&t.length===0&&(0,q.jsxs)(`p`,{className:`sync-bad`,children:[`The latest sync couldn't read this dossier: `,e.error]}),e.sources.length>0&&(0,q.jsx)(`ul`,{className:`sync-sources`,"aria-label":`${e.name} sources`,children:e.sources.map(e=>(0,q.jsx)(`li`,{className:e.status===`failed`?`sync-bad`:void 0,children:e.status===`ok`?(0,q.jsxs)(q.Fragment,{children:[mg(e.area),` `,(0,q.jsxs)(`span`,{className:`sync-area`,children:[`(`,e.area,`)`]}),`: up to date`]}):(0,q.jsxs)(q.Fragment,{children:[mg(e.area),` `,(0,q.jsxs)(`span`,{className:`sync-area`,children:[`(`,e.area,`)`]}),`: failed `,Y(e.lastAttemptAt),`. `,e.error,` `,e.fix,` `,(0,q.jsx)(`strong`,{children:e.stale&&e.lastSuccessAt?`Showing the last good copy, from ${Y(e.lastSuccessAt)}.`:`Nothing synced from it yet.`})]})},e.area))})]})}function bK({client:e,onChange:t,onStatus:n,pollMs:r=gK,request:i=0}){let[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(``),p=(0,v.useRef)(!1),m=(0,v.useRef)(null),h=(0,v.useRef)(null),g=(0,v.useCallback)(e=>{if(o(e),c(null),n?.(e),p.current&&!e.job.running){let n=e.dossiers.flatMap(e=>e.sources).filter(e=>e.status===`failed`).length;f(e.job.error?`The sync stopped: ${e.job.error}`:n?`Sync finished; ${n} source${n===1?``:`s`} failed.`:`Sync finished.`),BD.add([vK(e)]),t(e)}p.current=e.job.running},[t,n]),_=e=>c(e instanceof Error?e.message:String(e));(0,v.useEffect)(()=>{e.status().then(g,_)},[e,g]);let y=a?.job.running===!0;(0,v.useEffect)(()=>{if(!y)return;let t=setInterval(()=>e.status().then(g,_),r);return()=>clearInterval(t)},[y,e,g,r]),(0,v.useEffect)(()=>{l&&m.current?.focus()},[l]);let b=()=>{f(`Sync started.`),p.current=!0,e.start().then(g,_)},x=()=>{u(!1),h.current?.focus()},S=()=>{e.wipe().then(e=>{u(!1),g(e),f(`The cache is wiped. Nothing synced is left on this machine.`),t(e),h.current?.focus()},_)},C=e=>{hF(`wipeCancel`,e)&&x()},w=(0,v.useRef)(i);(0,v.useEffect)(()=>{i!==w.current&&a&&(w.current=i,y||b())});let T=a?.job,E=_K(a);return(0,q.jsx)(`aside`,{className:`sync-panel`,"aria-labelledby":`sync-heading`,children:(0,q.jsxs)(`div`,{className:`sync-inner`,children:[(0,q.jsxs)(`div`,{className:`sync-head`,children:[(0,q.jsx)(`h2`,{id:`sync-heading`,children:`Sync`}),(0,q.jsx)(`p`,{className:`sync-when`,children:a?E?`Last synced ${Y(E)}. Kept ${a.retentionDays} days.`:`Nothing synced yet: press Sync now to read your dossiers through toil.`:`Reading the cache…`}),(0,q.jsxs)(`div`,{className:`sync-actions`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:b,disabled:!a||y,children:y?`Syncing…`:`Sync now`}),(0,q.jsx)(`button`,{type:`button`,ref:h,onClick:()=>u(!0),disabled:!a||y,"aria-expanded":l,"aria-controls":`sync-confirm`,children:`Wipe the cache…`})]})]}),(0,q.jsx)(`p`,{role:`status`,className:`sync-live`,children:y&&T?`Syncing ${T.dossier??`the dossiers`}: ${T.dossiersDone} of ${T.dossiersTotal||`?`} dossiers, ${T.requests} requests, ${T.pages} pages${T.retries?`, ${T.retries} retries`:``}. ${T.messages[T.messages.length-1]??``}`:d}),y&&T&&T.dossiersTotal>0&&(0,q.jsx)(`progress`,{className:`sync-progress`,max:T.dossiersTotal,value:T.dossiersDone,"aria-label":`Dossiers synced`}),s&&(0,q.jsx)(`p`,{role:`alert`,className:`sync-bad`,children:s}),T&&!y&&T.error&&(0,q.jsxs)(`p`,{className:`sync-bad`,children:[`The last sync stopped: `,T.error]}),l&&(0,q.jsxs)(`div`,{className:`sync-confirm`,id:`sync-confirm`,role:`group`,"aria-labelledby":`sync-confirm-text`,onKeyDown:C,children:[(0,q.jsx)(`p`,{id:`sync-confirm-text`,children:`Delete everything Toil UI synced to this machine? The dashboards will be empty until the next sync, which fetches everything again. Your trackers are not touched.`}),(0,q.jsxs)(`div`,{className:`sync-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`sync-danger`,onClick:S,children:`Wipe it`}),(0,q.jsx)(`button`,{type:`button`,ref:m,onClick:x,children:`Cancel`})]})]}),a&&a.dossiers.length>0&&(0,q.jsx)(`ul`,{className:`sync-dossiers`,"aria-label":`Dossiers in the cache`,children:a.dossiers.map(e=>(0,q.jsx)(yK,{dossier:e},e.name))})]})})}var xK=`X-Toil-UI-Session`,SK=`X-Toil-UI-CSRF`;async function CK(e,t){try{let t=await e.json();if(t.error?.message)return new ZG(`${t.error.message}${t.error.fix?` ${t.error.fix}`:``}`,t.error.usage)}catch{}return Error(`${t} failed: the server answered ${e.status}.`)}var wK=`This Toil UI assigns nothing: start toil-ui with its cache to assign items to an agent.`;function TK(e,t=`./`){let n=async(n,r,i)=>{let a=await fetch(`${t}api/${n}`,{method:i===void 0?`GET`:`POST`,credentials:`omit`,headers:{[xK]:e.session,...i===void 0?{}:{"Content-Type":`application/json`,[SK]:e.csrf}},...i===void 0?{}:{body:JSON.stringify(i)}});if(!a.ok)throw await CK(a,r);return await a.json()};return{disabled:e.assignments?null:wK,list:(e,t)=>n(`assignments?dossier=${encodeURIComponent(e)}${t?.inbox===!1?`&inbox=0`:``}`,`Reading the assignments`),get:e=>n(`assignments/one?id=${encodeURIComponent(e)}`,`Reading the assignment`),assign:e=>n(`assignments`,`Assigning the item`,e),start:(e,t)=>n(`assignments/start`,`Starting the assignment`,{id:e,...t?{adapter:t}:{}}),cancel:e=>n(`assignments/cancel`,`Stopping the assignment`,{id:e}),apply:(e,t)=>n(`assignments/apply`,`Applying the proposal`,{id:e,proposal:t}),dismiss:(e,t)=>n(`assignments/dismiss`,`Dismissing the proposal`,{id:e,proposal:t}),finish:e=>n(`assignments/finish`,`Marking it reviewed`,{id:e}),renew:e=>n(`assignments/renew`,`Renewing the assignment`,{id:e}),async events(n,r,i){let a=await fetch(`${t}api/assignments/events?since=${n}`,{credentials:`omit`,headers:{[xK]:e.session},signal:i});if(!a.ok||!a.body)throw await CK(a,`Reading the assignment events`);let o=a.body.getReader(),s=new TextDecoder,c=``;for(;;){let{value:e,done:t}=await o.read();e&&(c+=s.decode(e,{stream:!0}));let n;for(;(n=c.indexOf(`
66
- `))>=0;){let e=c.slice(0,n).trim();c=c.slice(n+1),e&&r(JSON.parse(e))}if(t){let e=(c+s.decode()).trim();e&&r(JSON.parse(e));return}}},...e.sample?{}:{saveSettings:e=>n(`assignments/settings`,`Saving the limits`,{concurrent:e.concurrent,timeLimitMinutes:e.timeLimitMinutes})}}}var EK=e=>Object.fromEntries((e?.dossiers??[]).map(e=>[e.name,{at:e.lastSyncAt,status:e.status}])),DK=(0,lm.createRoot)(document.getElementById(`root`));function OK({session:e,execute:t,agent:n,names:r,status:i}){let[a,o]=(0,v.useState)(()=>_K(i)),[s,c]=(0,v.useState)(()=>EK(i)),[l,u]=(0,v.useState)(n),[d]=(0,v.useState)(()=>e.agentSettings?fK(e):null),f=(0,v.useCallback)(t=>{sK({...e,agent:t.kind},r).then(e=>{u(e),m(e=>e+1)})},[e,r]),[p,m]=(0,v.useState)(0),[h]=(0,v.useState)(()=>e.sync?rK(e):null),[g]=(0,v.useState)(()=>iK(e)),[_]=(0,v.useState)(()=>aK(e)),[y]=(0,v.useState)(()=>pK(e)),[b]=(0,v.useState)(()=>hK(e)),[x]=(0,v.useState)(()=>mK(e)),[S]=(0,v.useState)(()=>TK(e)),[C]=(0,v.useState)(()=>()=>cK(e)),[w,T]=(0,v.useState)(null),[E,D]=(0,v.useState)(null),O=(0,v.useCallback)(e=>T(e.job.running?e.job:null),[]),[k,A]=(0,v.useState)(0),j=(0,v.useCallback)(()=>A(e=>e+1),[]),M=(0,v.useCallback)(e=>{o(_K(e)),c(EK(e)),e.job.finishedAt&&e.job.news?.length&&D({id:e.job.finishedAt,byDossier:e.job.news}),m(e=>e+1)},[]);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(VG,{syncing:w,news:E,serverStatus:C,execute:t,agent:l,config:g,...e.sample?{}:{themeSetting:g},feedback:_,modelUsage:x,assignments:S,worklog:y,analyses:b,...e.sync?{synced:s,onSync:j,afterDescribe:()=>void h?.status().then(e=>c(EK(e)),()=>void 0)}:{},now:a??e.now,preview:e.sample,versions:{ui:e.version,toil:e.toil.version},...d?{agentSettings:{client:d,onChange:f,...r[0]?{dossier:r[0]}:{}}}:{}},p),h&&(0,q.jsx)(bK,{client:h,onChange:M,onStatus:O,request:k})]})}async function kK(){let e=await $G(),t=nK(e),n=await t(`dossiers list`,{},oS),r=n.ok?(n.data.dossiers??[]).map(e=>String(e.name)):[],i=await sK(e,r),a=e.sync?await rK(e).status().catch(()=>null):null;DK.render((0,q.jsx)(v.StrictMode,{children:(0,q.jsx)(OK,{session:e,execute:t,agent:i,names:r,status:a})}))}kK().catch(e=>{DK.render((0,q.jsx)(`main`,{id:`main`,children:(0,q.jsxs)(`div`,{role:`alert`,className:`failure`,children:[(0,q.jsx)(`h1`,{children:`Toil UI couldn't start`}),(0,q.jsx)(`p`,{children:e instanceof Error?e.message:String(e)})]})}))});export{Dj as a,nC as c,oi as d,m as f,c as h,Cj as i,J as l,o as m,LF as n,HT as o,u as p,Pj as r,tC as s,RF as t,Dh as u};
62
+ `):[])r.list(e).then(n=>t&&d(t=>({...t,[e]:n})),()=>void 0);return()=>{t=!1}},[e,n,r,m,h]);let g=e?OG({...a,analyses:u,adapters:c,at:f}):[],_=kG(g,o,h),y=new Map(g.map(e=>[e.id,e])),b=e=>{let n=y.get(e);if(t(!1),!n)return;let r=n.go;AG(()=>{`href`in r?window.location.hash=r.href:`command`in r?qA(r.command):r.run()})};return(0,v.useEffect)(()=>{e||s(``)},[e]),(0,q.jsx)(Of,{className:`palette-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:e,onOpenChange:t,children:(0,q.jsx)(Ef,{className:`palette-modal`,children:(0,q.jsxs)(uf,{className:`palette`,"aria-label":`Command palette`,"data-palette":``,children:[(0,q.jsxs)(hr,{inputValue:o,onInputChange:s,children:[(0,q.jsx)(Ap,{className:`palette__search`,"aria-label":`Jump to or run`,autoFocus:!0,children:(0,q.jsx)(jo,{className:`palette__input`,placeholder:`Jump to a dossier, tab, item or setting, or run a command`,"data-palette-input":``})}),(0,q.jsx)(`p`,{className:`palette__status note`,role:`status`,children:i>0?`Reading ${i} more ${i===1?`dossier`:`dossiers`} from the cache for the item search…`:o.trim()?``:`Type a key or a title to search the items of every dossier.`}),(0,q.jsx)(Qd,{className:`palette__list`,"aria-label":`Results`,onAction:e=>b(String(e)),renderEmptyState:()=>(0,q.jsxs)(`p`,{className:`palette__empty`,children:[`Nothing matches “`,o.trim(),`”.`]}),children:_.map(e=>(0,q.jsxs)(nf,{id:e.group,className:`palette__group`,children:[(0,q.jsx)(ys,{className:`menu-header`,children:CG[e.group]}),e.entries.map(e=>(0,q.jsxs)(af,{id:e.id,textValue:e.label,className:`menu-item palette__item`,"data-palette-item":e.group,children:[(0,q.jsx)(`span`,{className:`palette__label`,children:e.label}),e.detail&&(0,q.jsx)(`span`,{className:`palette__detail`,children:e.detail})]},e.id))]},e.group))})]}),(0,q.jsxs)(`p`,{className:`palette__foot note`,children:[(0,q.jsx)(`kbd`,{children:`↑`}),` `,(0,q.jsx)(`kbd`,{children:`↓`}),` to move, `,(0,q.jsx)(`kbd`,{children:`Enter`}),` to open, `,(0,q.jsx)(`kbd`,{children:`Escape`}),` to close. `,(0,q.jsx)(Iw,{topic:`palette`})]})]})})})}function MG({isOpen:e,onOpenChange:t}){let n=new Map;for(let e of Object.values(dF))n.set(e.where,[...n.get(e.where)??[],e]);let r=e=>e.map((e,t)=>(0,q.jsxs)(`span`,{children:[t>0&&`+`,(0,q.jsx)(`kbd`,{children:pF(e)})]},e));return(0,q.jsx)(Of,{className:`palette-overlay`,"data-backdrop":``,isDismissable:!0,isOpen:e,onOpenChange:t,children:(0,q.jsx)(Ef,{className:`palette-modal shortcuts-modal`,children:(0,q.jsx)(uf,{className:`shortcuts`,"aria-labelledby":`shortcuts-title`,"data-shortcuts":``,children:({close:e})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`shortcuts__head`,children:[(0,q.jsx)(ja,{slot:`title`,id:`shortcuts-title`,children:`Keyboard shortcuts`}),(0,q.jsx)(W,{className:`btn btn--small`,onPress:e,"data-shortcuts-close":``,children:`Close`})]}),[...n].map(([e,t])=>(0,q.jsxs)(`section`,{className:`shortcuts__group`,"aria-label":e,children:[(0,q.jsx)(`h3`,{children:e}),(0,q.jsx)(`dl`,{children:t.map(e=>(0,q.jsxs)(`div`,{className:`shortcuts__row`,children:[(0,q.jsxs)(`dt`,{children:[r(e.keys),(e.or??[]).map(e=>(0,q.jsxs)(`span`,{children:[` or `,r(e)]},e.join(`+`)))]}),(0,q.jsx)(`dd`,{children:e.what})]},e.what))})]},e))]})})})})}var NG=`#/settings/toil`;function PG({history:e=VD}){let t=(0,v.useSyncExternalStore)(e.subscribe,e.get,e.get),[n,r]=(0,v.useState)(!1),i=RD(t);return(0,q.jsxs)(lf,{isOpen:n,onOpenChange:r,children:[(0,q.jsxs)(W,{className:`btn bell`,"data-bell":``,"aria-label":i?`Notifications, ${i} unread`:`Notifications`,children:[(0,q.jsxs)(`svg`,{className:`bell__icon`,viewBox:`0 0 24 24`,width:`20`,height:`20`,"aria-hidden":`true`,focusable:`false`,children:[(0,q.jsx)(`path`,{d:`M12 3a6 6 0 0 0-6 6v3.6L4.3 15.4A1 1 0 0 0 5.2 17h13.6a1 1 0 0 0 .9-1.6L18 12.6V9a6 6 0 0 0-6-6Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinejoin:`round`}),(0,q.jsx)(`path`,{d:`M9.5 19.5a2.6 2.6 0 0 0 5 0`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`})]}),i>0&&(0,q.jsx)(`span`,{className:`bell__count`,"aria-hidden":`true`,children:i})]}),(0,q.jsx)(Xu,{className:`popover bell-popover`,placement:`bottom end`,offset:6,children:(0,q.jsxs)(uf,{className:`bell-dialog`,"aria-labelledby":`bell-title`,"data-bell-list":``,children:[(0,q.jsxs)(`div`,{className:`bell-dialog__head`,children:[(0,q.jsx)(ja,{slot:`title`,id:`bell-title`,level:2,children:`Notifications`}),(0,q.jsx)(Iw,{topic:`notification-history`}),(0,q.jsx)(W,{className:`btn btn--small`,onPress:()=>e.markAllRead(),isDisabled:i===0,"data-bell-read":``,children:`Mark all read`})]}),t.entries.length?(0,q.jsx)(`ol`,{className:`bell-list`,"aria-label":`The last 50, newest first`,children:t.entries.map(e=>{let n=e.seq>t.read;return(0,q.jsxs)(`li`,{className:n?`bell-entry bell-entry--unread`:`bell-entry`,"data-kind":e.kind,children:[(0,q.jsxs)(`a`,{href:e.href,onClick:()=>r(!1),children:[n&&(0,q.jsx)(`span`,{className:`sr-only`,children:`Unread: `}),(0,q.jsx)(`strong`,{children:e.title}),(0,q.jsx)(`span`,{className:`bell-entry__line`,children:e.line})]}),(0,q.jsx)(`span`,{className:`note`,children:Y(e.at)})]},e.seq)})}):(0,q.jsxs)(`p`,{className:`bell-empty`,children:[`Nothing yet.`,` `,(0,q.jsx)(`a`,{href:NG,onClick:()=>r(!1),"data-empty-action":``,children:`Choose what notifies`})]})]})})]})}var FG=(0,v.lazy)(()=>Zm(()=>import(`./PowershellMan-rG0kojOi.js`).then(e=>({default:e.PowershellMan})),__vite__mapDeps([8,9]),import.meta.url)),IG=`#/powershell-man`;function LG(e){let t=e.replace(/^#\/?/,``).split(`/`);if(t[0]===`settings`){let e=t[1]===`dossiers`||t[1]===`toil`||t[1]===`usage`||t[1]===`agent-usage`||t[1]===`agent`?t[1]:`connections`,n=t.slice(2).filter(Boolean).map(e=>{try{return decodeURIComponent(e)}catch{return e}});return n.length?{view:`settings`,page:e,at:n}:{view:`settings`,page:e}}if(t[0]===`dossier`&&t[1]){let e=decodeURIComponent(t[1]);if(t[2]===`item`&&t[3])return{view:`item`,dossier:e,id:decodeURIComponent(t.slice(3).join(`/`))};if(t[2]===`assignment`&&t[3])return{view:`assignment`,dossier:e,id:decodeURIComponent(t[3])};if(t[2]===`prs`)return{view:`prs`,dossier:e};if(t[2]===`people`)return{view:`people`,dossier:e};if(t[2]===`command-center`)return{view:`command-center`,dossier:e};if(t[2]===`board`)return t[3]?{view:`dashboard`,dossier:e,tab:`board`,person:decodeURIComponent(t.slice(3).join(`/`))}:{view:`dashboard`,dossier:e,tab:`board`};if(t[2]===`analyses`&&t[3])return{view:`dashboard`,dossier:e,tab:`analyses`,analysis:decodeURIComponent(t.slice(3).join(`/`))};if(t[2]===`dependencies`||t[2]===`analyses`)return{view:`dashboard`,dossier:e,tab:t[2]};if(t[2]===`worklog`&&t[3]===`standup`){let[n,r]=[t[4],t[5]].map(e=>e?decodeURIComponent(e):void 0),i=[n,r].filter(e=>e!==void 0&&e!==``&&!aW(e));return i.length||!n&&r?{view:`standup`,dossier:e,from:null,to:null,ignored:i.join(`, `)||r}:{view:`standup`,dossier:e,from:n??null,to:r||n||null}}return t[2]===`worklog`?{view:`worklog`,dossier:e,day:aW(t[3])?t[3]:null}:{view:`dashboard`,dossier:e}}return{view:`dossiers`}}function RG(e){switch(e.view){case`dashboard`:return e.tab??`overview`;case`prs`:return`prs`;case`people`:return`people`;case`worklog`:case`standup`:return`worklog`;case`command-center`:case`item`:return`board`;default:return null}}function zG(){let[e,t]=(0,v.useState)(()=>LG(window.location.hash));return(0,v.useEffect)(()=>{let e=()=>{if(window.location.hash===IG)return;let e=LG(window.location.hash);t(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),e}function BG(){let[e,t]=(0,v.useState)(()=>window.location.hash===IG),n=(0,v.useRef)(`#/`),r=(0,v.useRef)(null);return(0,v.useEffect)(()=>{let e=()=>t(window.location.hash===IG);return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]),(0,v.useEffect)(()=>{if(e)return()=>{r.current?.focus(),r.current=null}},[e]),{open:e,show:(0,v.useCallback)(()=>{e||(n.current=window.location.hash&&window.location.hash!==IG?window.location.hash:`#/`,r.current=document.activeElement instanceof HTMLElement?document.activeElement:null,window.location.hash=IG)},[e]),close:(0,v.useCallback)(()=>{window.location.hash===IG?window.location.hash=n.current:t(!1)},[])}}var VG=e=>({ok:!1,message:e instanceof Error?e.message:String(e)});function HG({execute:e,agent:t,config:n,themeSetting:r,now:i,preview:a,agentSettings:o,feedback:s,modelUsage:c,worklog:l,startReady:u,assignments:d,analyses:f,synced:p,afterDescribe:m,serverStatus:h,onSync:g,syncing:_,news:y,versions:b}){let[x]=(0,v.useState)(()=>NU()),S=f??x,C=zG(),w=BG(),T=(0,v.useRef)(``),E=(0,v.useRef)(0);(0,v.useEffect)(()=>{let e=e=>{if(w.open||e.repeat||e.isComposing||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||_F(e.target)||e.target instanceof Element&&e.target.closest(`[role="dialog"]`)){T.current=``;return}if(e.key.length!==1||!/[a-z]/i.test(e.key))return;let t=Date.now();t-E.current>1400&&(T.current=``),E.current=t,T.current=(T.current+e.key.toLowerCase()).slice(-10),T.current===`powershell`&&(T.current=``,e.preventDefault(),w.show())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[w.open,w.show]);let{mine:D,mark:O}=pO(),k=(0,v.useMemo)(()=>d?fO(d,O):void 0,[d,O]),[A,j]=(0,v.useState)(null),[M,ee]=(0,v.useState)({}),[te,ne]=(0,v.useState)({}),re=PT(r??null),N=ah(re.theme),ie=(0,v.useRef)(null),ae=(0,v.useRef)(null),oe=(0,v.useCallback)(e=>{ae.current=e,e?.querySelector(`button`)?.focus()},[]),se=(0,v.useRef)(!0),P=C.view===`dossiers`||C.view===`settings`?null:C.dossier,[ce,F]=(0,v.useState)({open:!1,focused:null}),[le,ue]=(0,v.useState)(!1),de=Nw(b),[fe,pe]=(0,v.useState)(null),me=()=>{pe({shown:de.shown,fresh:de.fresh.length>0}),de.seen()},I=()=>{let e=document.activeElement?.closest(`[data-item]`)?.getAttribute(`data-item`)??null;F({open:!0,focused:e??(C.view===`item`?C.id:null)})},L=(0,v.useRef)(I);(0,v.useEffect)(()=>{L.current=I}),(0,v.useEffect)(()=>{let e=e=>{w.open||e.target instanceof Element&&e.target.closest(`[data-powershell-man]`)||(gF(`palette`,e)?(e.preventDefault(),F(e=>e.open?{...e,open:!1}:e),document.querySelector(`[data-palette]`)||L.current()):gF(`shortcuts`,e)&&!_F(e.target)&&(e.preventDefault(),ue(!0)))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[w.open]),(0,v.useEffect)(()=>{C.view===`settings`&&j(null)},[C.view]),(0,v.useEffect)(()=>{if(C.view===`settings`&&!ce.open||A)return;let t=!0;return ES(e).then(e=>t&&j({ok:!0,value:e}),e=>t&&j(VG(e))),()=>{t=!1}},[C.view,A,e,ce.open]);let he=A?.ok?A.value.dossiers.map(e=>e.name):[],ge=(C.view===`dossiers`||ce.open?he:[]).find(e=>!M[e]);(0,v.useEffect)(()=>{if(!ge)return;let t=!0;return TS(e,ge).then(e=>t&&ee(t=>({...t,[ge]:{ok:!0,value:e}})),e=>t&&ee(t=>({...t,[ge]:VG(e)}))),()=>{t=!1}},[ge,e]);let R=C.view===`dashboard`&&P&&M[P]?.ok?P:null;(0,v.useEffect)(()=>{R&&sU(R)},[R]);let _e=P?M[P]:void 0;(0,v.useEffect)(()=>{!a&&P&&_e?.ok&&xU(P,tg(_e.value.items,_e.value.changes,i))},[a,P,_e,i]);let[ve]=(0,v.useState)(()=>!a&&P?CU(P,i):null),z=e=>{if(m?.(),!e.renamed){j(t=>t?.ok?{ok:!0,value:{...t.value,dossiers:t.value.dossiers.map(t=>t.name===e.name?{...t,description:e.description}:t)}}:t),ee(t=>{let n=t[e.name];return n?.ok?{...t,[e.name]:{ok:!0,value:{...n.value,description:e.description}}}:t});return}let{from:t,to:n}=e.renamed;if(cU(t,n),SU(t,n),j(null),ee(({[t]:e,...n})=>n),P===t){let e=window.location.hash.replace(/^#\/dossier\/[^/]+/,``);window.location.hash=`${bg(n)}${e}`}};(0,v.useEffect)(()=>{if(!P||M[P])return;let t=!0;return TS(gG(e,e=>t&&ne(t=>({...t,[P]:e}))),P).then(e=>t&&ee(t=>({...t,[P]:{ok:!0,value:e}})),e=>t&&ee(t=>({...t,[P]:VG(e)}))),()=>{t=!1}},[P,M,e]);let ye=JSON.stringify(C),be=(0,v.useRef)(!1),xe=C.view===`settings`&&!!C.at;(0,v.useEffect)(()=>{se.current?se.current=!1:be.current=!xe},[ye,xe]),(0,v.useEffect)(()=>{if(w.open)return;let e=be.current?ie.current?.querySelector(`#board-filter`)??ie.current?.querySelector(`h1`):null;e&&(be.current=!1,e.focus())});let Se=e=>{e.preventDefault(),ie.current?.querySelector(`h1`)?.focus()},Ce=yT(N.name);Lm();let we=C.view===`settings`||(C.view===`dossiers`?A!==null:!!(P&&M[P])),Te=C.view===`dossiers`||!P?`Reading the dossiers with toil dossiers list.`:_G(te[P]),Ee=(e,t)=>GS(N.lexicon,$S(N,re),e,t),De=[{href:`#/`,label:`Dossiers`,current:C.view===`dossiers`},{href:`#/settings`,label:`Settings`,current:C.view===`settings`}],B=(0,v.useRef)(null),V=sE(WG),H=GG(B,!V,De.map(e=>e.label).join(`|`)),Oe=V||H,ke=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(fj,{label:`Theme`,value:N.name,onChange:re.setTheme,options:Qm.map(e=>({id:e.name,label:e.label}))}),Object.keys(N.schemes).length>1&&(0,q.jsx)(fj,{label:`Appearance`,value:re.scheme,onChange:e=>re.setScheme(e),options:[{id:`system`,label:`System`},{id:`light`,label:`Light`},{id:`dark`,label:`Dark`}]})]}),Ae=e=>(0,q.jsx)(Rw,{href:pw(C.view,C.view===`settings`?C.page:void 0),fresh:de.fresh.length>0,onWhatsNew:()=>{if(!e)return me();e(),requestAnimationFrame(()=>requestAnimationFrame(me))}}),je=P?M[P]:void 0,Me=e=>(0,q.jsxs)(`div`,{role:`alert`,className:`failure`,children:[(0,q.jsx)(`h1`,{tabIndex:-1,children:`The data didn't load`}),(0,q.jsx)(`p`,{children:e})]}),Ne;if(C.view===`settings`)Ne=(0,q.jsx)(XH,{page:C.page,...C.at?{at:C.at}:{},config:n??null,modelUsage:c??null,...o?{agent:o}:{}});else if(C.view===`dossiers`)Ne=A?A.ok?(0,q.jsx)(pU,{dossiers:A.value.dossiers,calls:A.value.calls,loaded:M,now:i,synced:p??(a?null:{}),config:n??null,onDescribed:z,onSync:g}):Me(A.message):(0,q.jsx)(FA,{message:Ee(`loading.dossiers`),detail:`Reading them with toil dossiers list.`});else if(!je)Ne=(0,q.jsx)(FA,{message:Ee(`loading.dossier`,{name:C.dossier}),detail:_G(te[C.dossier])});else if(!je.ok)Ne=Me(je.message);else{let r={...g?{sync:g}:{},dossier:je.value,byId:new Map(je.value.items.map(e=>[e.id,e])),prById:new Map((je.value.pullRequests??[]).map(e=>[e.id,e])),agent:t,now:i,execute:e,analyses:S,...n?{config:n}:{},...k?{assignments:k}:{},...u?{startReady:u}:k&&!k.disabled?{startReady:MU(k,C.dossier)}:{},refresh:()=>ee(({[C.dossier]:e,...t})=>t),described:z};Ne=(0,q.jsx)(ug,{value:r,children:(0,q.jsx)(sj,{children:(0,q.jsx)(zL,{tab:RG(C),heading:C.view===`dashboard`,dossiers:A?.ok?A.value.dossiers.map(e=>e.name):null,...C.view===`command-center`?{boardView:`readiness`}:C.view===`dashboard`&&C.tab===`board`?{boardView:`board`}:{},children:C.view===`item`?(0,q.jsx)(DU,{id:C.id}):C.view===`assignment`?(0,q.jsx)(kU,{id:C.id}):C.view===`prs`?(0,q.jsx)(nW,{}):C.view===`people`?(0,q.jsx)(BU,{}):C.view===`worklog`?(0,q.jsx)(QW,{api:l??null,day:C.day}):C.view===`standup`?(0,q.jsx)(RW,{api:l??null,from:C.from,to:C.to,...C.ignored?{ignored:C.ignored}:{}}):C.view===`command-center`?(0,q.jsx)(Nj,{}):(0,q.jsx)(hL,{...C.tab?{tab:C.tab}:{},...C.person?{person:C.person}:{},...C.analysis?{analysis:C.analysis}:{}})})},C.dossier)})}return(0,q.jsx)(mO,{assignments:k,dossier:P,mine:D,children:(0,q.jsx)(qS,{value:N,children:(0,q.jsx)(ZS,{value:re,children:(0,q.jsx)(xT,{value:Ce,children:(0,q.jsxs)(WA,{children:[(0,q.jsx)(UG,{css:Qm.map(ih).join(`
63
+ `)}),(0,q.jsx)(Oh,{theme:N.name}),(0,q.jsx)(BA,{ready:we,detail:Te,data:ve}),(0,q.jsx)(YG,{news:y??null,dossier:P}),(0,q.jsx)(`a`,{className:`skip`,href:`#main`,onClick:Se,inert:w.open,"aria-hidden":w.open||void 0,children:`Skip to content`}),(0,q.jsxs)(`header`,{inert:w.open,"aria-hidden":w.open||void 0,children:[a&&(0,q.jsxs)(`p`,{className:`banner`,role:`note`,children:[(0,q.jsx)(`strong`,{children:`Toil UI beta, on sample data.`}),` Nothing here connects to a tracker.`]}),(0,q.jsx)(`div`,{className:`top`,"data-one-row":``,ref:B,children:(0,q.jsxs)(Ce.Header,{children:[(0,q.jsx)(`a`,{className:`brand`,href:`#/`,children:(0,q.jsxs)(`span`,{className:`brand-name`,children:[(0,q.jsx)(`span`,{className:`wordmark`,children:`toil`}),` `,(0,q.jsx)(`span`,{className:`sticker`,children:(0,q.jsx)(`span`,{className:`sticker__face`,children:`UI`})})]})}),Oe?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(PG,{}),(0,q.jsx)(qG,{suspended:w.open,links:De,feedback:s,controls:ke,help:Ae,fresh:de.fresh.length>0,onPalette:I,onShortcuts:()=>ue(!0)})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`nav`,{"aria-label":`Views`,children:(0,q.jsx)(KG,{links:De})}),(0,q.jsxs)(`div`,{className:`settings`,children:[(0,q.jsx)(PG,{}),Ae(),s&&!w.open&&(0,q.jsx)(pG,{api:s}),ke]})]})]})}),(0,q.jsx)(TD,{load:h}),(0,q.jsx)(hO,{}),(0,q.jsxs)(`p`,{className:`sync`,children:[a?`Sample data`:`Data`,` read `,Y(i),` through toil, read-only.`]})]}),(0,q.jsxs)(`main`,{id:`main`,ref:ie,"data-view":C.view,inert:w.open,"aria-hidden":w.open||void 0,children:[_?.running&&(0,q.jsx)(FA,{size:`panel`,message:vG(_),live:!1}),re.saveError&&(0,q.jsx)(`p`,{className:`notice`,role:`alert`,children:re.saveError}),Ne]}),(0,q.jsx)(jG,{isOpen:ce.open&&!w.open,onOpenChange:e=>F(t=>({...t,open:e})),agent:t,analysesApi:S,reading:ce.open?he.filter(e=>!M[e]).length:0,route:C,dossiers:he,loaded:M,synced:p,themes:Qm.map(e=>({name:e.name,label:e.label})),currentTheme:N.name,setTheme:re.setTheme,onSync:g,focused:ce.focused,canAssign:!(!k||k.disabled),agentSettings:!!o,openShortcuts:()=>ue(!0)}),(0,q.jsx)(MG,{isOpen:le&&!w.open,onOpenChange:ue}),(0,q.jsx)(Pw,{shown:fe?.shown??[],fresh:fe?.fresh??!1,isOpen:fe!==null&&!w.open,onOpenChange:e=>!e&&pe(null)}),w.open&&(0,q.jsx)(v.Suspense,{fallback:null,children:(0,q.jsx)(`div`,{className:`pm-dialog`,ref:oe,role:`dialog`,"aria-modal":`true`,"aria-label":`Powershell Man`,tabIndex:-1,"data-powershell-man":!0,onKeyDown:e=>{if(![`Tab`].includes(e.key))return;let t=[...ae.current?.querySelectorAll(`button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`)??[]].filter(e=>!e.hasAttribute(`disabled`)),n=t[0],r=t.at(-1);!n||!r?(e.preventDefault(),ae.current?.focus()):e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())},children:(0,q.jsx)(FG,{onClose:w.close})})})]})})})})})}function UG({css:e}){let t=typeof CSSStyleSheet<`u`&&`replaceSync`in CSSStyleSheet.prototype&&`adoptedStyleSheets`in document;return(0,v.useInsertionEffect)(()=>{if(!t)return;let n=new CSSStyleSheet;return n.replaceSync(e),document.adoptedStyleSheets=[...document.adoptedStyleSheets,n],()=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(e=>e!==n)}},[e,t]),t?null:(0,q.jsx)(`style`,{children:e})}var WG=`(max-width: 1023px)`;function GG(e,t,n){let[r,i]=(0,v.useState)(null);return(0,v.useLayoutEffect)(()=>{let a=()=>{if(r!==null){(r.links!==n||window.innerWidth>r.width)&&i(null);return}let a=e.current;if(!t||!a)return;let o=[...a.querySelectorAll(`.brand, nav, .settings`)],s=[...a.querySelectorAll(`nav li`)],c=e=>{let t=e.map(e=>e.getBoundingClientRect()).filter(e=>e.height>0);return t.some(e=>t.some(t=>e.top>=t.bottom))};(c(o)||c(s))&&i({width:window.innerWidth,links:n})};return a(),window.addEventListener(`resize`,a),()=>window.removeEventListener(`resize`,a)},[e,t,n,r]),r!==null&&r.links===n}function KG({links:e,onFollow:t}){return(0,q.jsx)(`ul`,{children:e.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(`a`,{href:e.href,"aria-current":e.current?`page`:void 0,onClick:t,children:e.label})},e.href))})}function qG({suspended:e,links:t,feedback:n,controls:r,help:i,fresh:a,onPalette:o,onShortcuts:s}){let[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),f=t.find(e=>e.current)?.label;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(lf,{isOpen:c&&!e,onOpenChange:l,children:[(0,q.jsxs)(W,{className:`btn menu-button`,"data-menu-button":``,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`menu-button__icon`,children:`☰`}),`Menu`,a&&(0,q.jsx)(Fw,{})]}),(0,q.jsx)(Xu,{className:`popover nav-menu`,placement:`bottom end`,offset:6,children:(0,q.jsxs)(uf,{className:`nav-menu__dialog`,"aria-label":f?`Menu, on ${f}`:`Menu`,children:[(0,q.jsx)(`nav`,{"aria-label":`Views`,children:(0,q.jsx)(KG,{links:t,onFollow:()=>l(!1)})}),(0,q.jsxs)(`div`,{className:`nav-menu__settings`,children:[(0,q.jsx)(W,{className:`btn`,onPress:()=>{l(!1),requestAnimationFrame(()=>requestAnimationFrame(o))},"data-palette-open":``,children:`Search and commands`}),(0,q.jsx)(W,{className:`btn`,onPress:()=>{l(!1),s()},children:`Keyboard shortcuts`}),i(()=>l(!1)),n&&(0,q.jsx)(W,{className:`btn feedback-open`,onPress:()=>{l(!1),d(!0)},children:`Feedback`}),r]})]})})]}),n&&(0,q.jsx)(mG,{api:n,isOpen:u&&!e,onOpenChange:d})]})}var JG=new Set;function YG({news:e,dossier:t}){let n=UA();return(0,v.useEffect)(()=>{if(!e||JG.has(e.id))return;JG.add(e.id);let r=e.byDossier.filter(e=>!t||e.dossier===t).flatMap(e=>e.events);n.play(yH(r))},[e,t,n]),null}var XG=`X-Toil-UI-Session`,ZG=`X-Toil-UI-CSRF`,QG=class extends Error{usage;constructor(e,t){super(e),this.usage=t}};async function $G(e,t){try{let t=await e.json();if(t.error?.message)return new QG(`${t.error.message}${t.error.fix?` ${t.error.fix}`:``}`,t.error.usage)}catch{}return Error(`${t} failed: the server answered ${e.status}.`)}async function eK(e=`./`,t=window.location,n=window.history){let r=new URLSearchParams(t.search).get(`token`);if(!r)throw Error(`This page needs the URL toil-ui printed when it started, which carries the launch token. A reloaded page forgets its session, so open that URL again.`);let i=await fetch(`${e}api/session`,{method:`POST`,credentials:`omit`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:r})}),a=new URLSearchParams(t.search);a.delete(`token`);let o=a.toString();if(n.replaceState(null,``,`${t.pathname}${o?`?${o}`:``}${t.hash}`),!i.ok)throw await $G(i,`Signing in`);return await i.json()}var tK=(e,t,n,r={})=>fetch(`${e}${n}`,{method:r.body===void 0?`GET`:`POST`,credentials:`omit`,headers:{[XG]:t.session,...r.body===void 0?{}:{"Content-Type":`application/json`,[ZG]:t.csrf}},...r.body===void 0?{}:{body:JSON.stringify(r.body)},signal:r.signal}),nK=e=>typeof e==`object`&&!!e&&`ok`in e&&`meta`in e;function rK(e,t=`./`){return async(n,r={},i={})=>{let a=await tK(t,e,`api/execute`,{body:{command:n,input:r},signal:i.signal}),o;try{o=await a.clone().json()}catch{o=void 0}if(nK(o))return o;throw await $G(a,`toil ${n}`)}}function iK(e,t=`./`){let n=async(e,t)=>{if(!e.ok)throw await $G(e,t);return await e.json()};return{status:async()=>n(await tK(t,e,`api/sync`),`Reading the sync status`),start:async r=>n(await tK(t,e,`api/sync`,{body:r===void 0?{}:{dossier:r}}),`Starting the sync`),wipe:async()=>n(await tK(t,e,`api/cache/wipe`,{body:{confirm:`wipe`}}),`Wiping the cache`)}}function aK(e,t=`./`){let n=async n=>{let r=await tK(t,e,n);if(!r.ok)throw await $G(r,n);return await r.json()};return{disabled:null,areas:()=>n(`api/config/areas`),settings:()=>n(`api/config/settings`),async run(n,r,i={}){let a=await tK(t,e,`api/config`,{body:{command:n,input:r,...i}}),o;try{o=await a.clone().json()}catch{o=void 0}if(nK(o))return o;throw await $G(a,`toil ${n}`)}}}function oK(e,t=`./`){let n=async(n,r,i)=>{let a=await tK(t,e,`api/feedback`,{body:{fields:n,...r?{consent:!0}:{}},...i?{signal:i}:{}}),o;try{o=await a.clone().json()}catch{o=void 0}if(nK(o))return o;throw await $G(a,`toil feedback`)};return{disabled:e.sample?cG:null,preview:(e,t)=>n(e,!1,t),send:e=>n(e,!0)}}var sK={claude:`Claude, through the Claude Agent SDK`,copilot:`GitHub Copilot, through the Copilot SDK`,codex:`Codex, through the Codex SDK`,scripted:IT,none:`nobody yet: no agent is set up`};async function cK(e,t,n=`./`){let r=new Map;for(let i of t){let t=await tK(n,e,`api/agent/starters?dossier=${encodeURIComponent(i)}`);r.set(i,t.ok?await t.json():[])}return{...e.agent===`none`?{notice:`${LT} ${RT}`}:{},label:sK[e.agent]??e.agent,starters:e=>r.get(e)??[],async adapters(){let t=await tK(n,e,`api/agent/adapters`);if(!t.ok)throw await $G(t,`Reading the agents`);return await t.json()},async ask(t,r,i,a,o){let s=await tK(n,e,`api/agent/ask`,{body:{dossier:t,prompt:r,...i,...a?{chat:a}:{},...uK(o)}});if(!s.ok)throw await $G(s,`The question`);return await s.json()},async*stream(t,r,i,a,o,s){let c=await tK(n,e,`api/agent/ask`,{body:{dossier:t,prompt:r,stream:!0,...a,...o?{chat:o}:{},...uK(s)},...i?{signal:i}:{}});if(!c.ok)throw await $G(c,`The question`);/^application\/x-ndjson/.test(c.headers.get(`content-type`)??``)?yield*dK(c):yield await c.json()},async session(t){let r=await tK(n,e,`api/agent/session?chat=${encodeURIComponent(t)}`);if(!r.ok)throw await $G(r,`Reading the chat's session`);return await r.json()},async renew(t,r){let i=await tK(n,e,`api/agent/renew`,{body:{chat:t,dossier:r}});if(!i.ok)throw await $G(i,`Renewing the chat`);return await i.json()}}}async function lK(e,t=`./`){let n=await tK(t,e,`api/fingerprint`);if(!n.ok)throw await $G(n,`Reading the server's version`);return await n.json()}var uK=e=>({...e?.adapter?{adapter:e.adapter}:{},...e?.history?.length?{history:e.history}:{}});async function*dK(e){if(!e.body)throw Error(`The answer arrived with no body.`);let t=e.body.getReader(),n=new TextDecoder,r=``,i=!1,a=e=>{let t=JSON.parse(e);if(t.error)throw new QG(`${t.error.message??`The agent failed.`}${t.error.fix?` ${t.error.fix}`:``}`,t.error.usage);return t.done&&(i=!0),t.answer??null};for(;;){let{value:e,done:i}=await t.read();e&&(r+=n.decode(e,{stream:!0}));let o;for(;(o=r.indexOf(`
64
+ `))>=0;){let e=r.slice(0,o).trim();if(r=r.slice(o+1),!e)continue;let t=a(e);t&&(yield t)}if(i)break}if(r.trim()){let e=a(r.trim());e&&(yield e)}if(!i)throw Error(`The answer stopped partway: the connection to Toil UI closed.`)}async function fK(e,t){if(!e.body)throw Error(`The install answered with no body.`);let n=e.body.getReader(),r=new TextDecoder,i=``,a=null,o=e=>{let n=JSON.parse(e);if(n.error)throw Error(`${n.error.message??`The install failed.`}${n.error.fix?` ${n.error.fix}`:``}`);typeof n.line==`string`&&t(n.line),n.done&&n.status&&(a=n.status)};for(;;){let{value:e,done:t}=await n.read();e&&(i+=r.decode(e,{stream:!0}));let a;for(;(a=i.indexOf(`
65
+ `))>=0;){let e=i.slice(0,a).trim();i=i.slice(a+1),e&&o(e)}if(t)break}if(i.trim()&&o(i.trim()),!a)throw Error(`The install stopped partway: the connection to Toil UI closed.`);return a}function pK(e,t=`./`){let n=async(e,t)=>{if(!e.ok)throw await $G(e,t);return await e.json()};return{status:async()=>n(await tK(t,e,`api/agent/settings`),`Reading the agent settings`),save:async r=>n(await tK(t,e,`api/agent/settings`,{body:r}),`Saving the agent settings`),async prompt(n,r){let i=await tK(t,e,`api/agent/prompt?${new URLSearchParams({...n?{dossier:n}:{},theme:r.theme,voice:r.voice?`on`:`off`})}`);if(!i.ok)throw await $G(i,`Reading the full prompt`);return(await i.json()).prompt},async installPlan(n){let r=await tK(t,e,`api/agent/install?adapter=${encodeURIComponent(n)}`);if(!r.ok)throw await $G(r,`Reading the install command`);return await r.json()},async install(n,r,i,a){let o=await tK(t,e,`api/agent/install`,{body:{adapter:n,command:r},...a?{signal:a}:{}});if(!o.ok)throw await $G(o,`The install`);return fK(o,i)}}}function mK(e,t=`./`){let n=async(e,t)=>{if(!e.ok)throw await $G(e,t);return await e.json()},r=e=>new URLSearchParams(Object.entries(e).filter(e=>e[1]!==void 0)).toString();return{disabled:e.sample?JW:null,month:async(i,a)=>n(await tK(t,e,`api/worklog/month?${r({dossier:i,month:a})}`),`Reading the worklog`),day:async(i,a)=>n(await tK(t,e,`api/worklog/day?${r({dossier:i,day:a})}`),`Reading the page`),rebuild:async(r,i)=>n(await tK(t,e,`api/worklog/rebuild`,{body:{dossier:r,day:i}}),`Rebuilding the page`),addNote:async(r,i)=>n(await tK(t,e,`api/worklog/note`,{body:{dossier:r,text:i}}),`Adding the note`),exportTo:async(r,i,a)=>n(await tK(t,e,`api/worklog/export`,{body:{dossier:r,...i,folder:a}}),`The export`),standup:async(i,a,o)=>n(await tK(t,e,`api/worklog/standup?${r({dossier:i,from:a,to:o})}`),`Building the stand-up`)}}function hK(e,t=`./`){let n=async(e,t)=>{if(!e.ok)throw await $G(e,t);return await e.json()};return{view:async()=>n(await tK(t,e,`api/usage`),`Reading the model usage`),save:async r=>n(await tK(t,e,`api/usage/settings`,{body:r}),`Saving the caps`)}}function gK(e,t=`./`){let n=e=>new URLSearchParams(e).toString();return{list:async r=>{let i=await tK(t,e,`api/analyses?${n({dossier:r})}`);if(!i.ok)throw await $G(i,`Reading the analyses`);return await i.json()},get:async(r,i)=>{let a=await tK(t,e,`api/analyses/one?${n({dossier:r,id:i})}`);if(a.status===404)return null;if(!a.ok)throw await $G(a,`Reading the analysis`);return await a.json()}}}var _K=1e3;function vK(e){let t=(e?.dossiers??[]).map(e=>e.lastSyncAt).sort();return t.length?t[t.length-1]:null}function yK(e){let t=e.job.finishedAt??new Date().toISOString(),n=`sync:${t}`;if(e.job.error)return{id:n,at:t,kind:`sync-failed`,title:`The sync stopped`,line:e.job.error,href:`#/`};let r=e.dossiers.flatMap(e=>e.sources.filter(e=>e.status===`failed`).map(t=>({dossier:e.name,area:t.area}))),i=e.dossiers.filter(e=>e.status===`failed`&&!e.sources.some(e=>e.status===`failed`)).map(e=>e.name);if(r.length||i.length){let e=[...r.map(e=>`${e.dossier}: ${mg(e.area)}`),...i.map(e=>`${e}: the dossier`)],a=r[0]?.dossier??i[0];return{id:n,at:t,kind:`sync-failed`,title:`Sync finished; ${e.length} ${e.length===1?`source`:`sources`} failed`,line:e.join(`, `),href:bg(a)}}let a=e.dossiers.length;return{id:n,at:t,kind:`sync`,title:`Sync finished`,line:`${a} ${a===1?`dossier`:`dossiers`} up to date`,href:`#/`}}function bK({dossier:e}){let t=e.sources.filter(e=>e.status===`failed`);return(0,q.jsxs)(`li`,{className:`sync-dossier`,children:[(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`strong`,{children:e.name}),` `,(0,q.jsxs)(`span`,{className:`sync-when`,children:[`synced `,Y(e.lastSyncAt)]})]}),e.status===`failed`&&t.length===0&&(0,q.jsxs)(`p`,{className:`sync-bad`,children:[`The latest sync couldn't read this dossier: `,e.error]}),e.sources.length>0&&(0,q.jsx)(`ul`,{className:`sync-sources`,"aria-label":`${e.name} sources`,children:e.sources.map(e=>(0,q.jsx)(`li`,{className:e.status===`failed`?`sync-bad`:void 0,children:e.status===`ok`?(0,q.jsxs)(q.Fragment,{children:[mg(e.area),` `,(0,q.jsxs)(`span`,{className:`sync-area`,children:[`(`,e.area,`)`]}),`: up to date`]}):(0,q.jsxs)(q.Fragment,{children:[mg(e.area),` `,(0,q.jsxs)(`span`,{className:`sync-area`,children:[`(`,e.area,`)`]}),`: failed `,Y(e.lastAttemptAt),`. `,e.error,` `,e.fix,` `,(0,q.jsx)(`strong`,{children:e.stale&&e.lastSuccessAt?`Showing the last good copy, from ${Y(e.lastSuccessAt)}.`:`Nothing synced from it yet.`})]})},e.area))})]})}function xK({client:e,onChange:t,onStatus:n,pollMs:r=_K,request:i=0}){let[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)(``),p=(0,v.useRef)(!1),m=(0,v.useRef)(null),h=(0,v.useRef)(null),g=(0,v.useCallback)(e=>{if(o(e),c(null),n?.(e),p.current&&!e.job.running){let n=e.dossiers.flatMap(e=>e.sources).filter(e=>e.status===`failed`).length;f(e.job.error?`The sync stopped: ${e.job.error}`:n?`Sync finished; ${n} source${n===1?``:`s`} failed.`:`Sync finished.`),VD.add([yK(e)]),t(e)}p.current=e.job.running},[t,n]),_=e=>c(e instanceof Error?e.message:String(e));(0,v.useEffect)(()=>{e.status().then(g,_)},[e,g]);let y=a?.job.running===!0;(0,v.useEffect)(()=>{if(!y)return;let t=setInterval(()=>e.status().then(g,_),r);return()=>clearInterval(t)},[y,e,g,r]),(0,v.useEffect)(()=>{l&&m.current?.focus()},[l]);let b=()=>{f(`Sync started.`),p.current=!0,e.start().then(g,_)},x=()=>{u(!1),h.current?.focus()},S=()=>{e.wipe().then(e=>{u(!1),g(e),f(`The cache is wiped. Nothing synced is left on this machine.`),t(e),h.current?.focus()},_)},C=e=>{gF(`wipeCancel`,e)&&x()},w=(0,v.useRef)(i);(0,v.useEffect)(()=>{i!==w.current&&a&&(w.current=i,y||b())});let T=a?.job,E=vK(a);return(0,q.jsx)(`aside`,{className:`sync-panel`,"aria-labelledby":`sync-heading`,children:(0,q.jsxs)(`div`,{className:`sync-inner`,children:[(0,q.jsxs)(`div`,{className:`sync-head`,children:[(0,q.jsx)(`h2`,{id:`sync-heading`,children:`Sync`}),(0,q.jsx)(`p`,{className:`sync-when`,children:a?E?`Last synced ${Y(E)}. Kept ${a.retentionDays} days.`:`Nothing synced yet: press Sync now to read your dossiers through toil.`:`Reading the cache…`}),(0,q.jsxs)(`div`,{className:`sync-actions`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:b,disabled:!a||y,children:y?`Syncing…`:`Sync now`}),(0,q.jsx)(`button`,{type:`button`,ref:h,onClick:()=>u(!0),disabled:!a||y,"aria-expanded":l,"aria-controls":`sync-confirm`,children:`Wipe the cache…`})]})]}),(0,q.jsx)(`p`,{role:`status`,className:`sync-live`,children:y&&T?`Syncing ${T.dossier??`the dossiers`}: ${T.dossiersDone} of ${T.dossiersTotal||`?`} dossiers, ${T.requests} requests, ${T.pages} pages${T.retries?`, ${T.retries} retries`:``}. ${T.messages[T.messages.length-1]??``}`:d}),y&&T&&T.dossiersTotal>0&&(0,q.jsx)(`progress`,{className:`sync-progress`,max:T.dossiersTotal,value:T.dossiersDone,"aria-label":`Dossiers synced`}),s&&(0,q.jsx)(`p`,{role:`alert`,className:`sync-bad`,children:s}),T&&!y&&T.error&&(0,q.jsxs)(`p`,{className:`sync-bad`,children:[`The last sync stopped: `,T.error]}),l&&(0,q.jsxs)(`div`,{className:`sync-confirm`,id:`sync-confirm`,role:`group`,"aria-labelledby":`sync-confirm-text`,onKeyDown:C,children:[(0,q.jsx)(`p`,{id:`sync-confirm-text`,children:`Delete everything Toil UI synced to this machine? The dashboards will be empty until the next sync, which fetches everything again. Your trackers are not touched.`}),(0,q.jsxs)(`div`,{className:`sync-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`sync-danger`,onClick:S,children:`Wipe it`}),(0,q.jsx)(`button`,{type:`button`,ref:m,onClick:x,children:`Cancel`})]})]}),a&&a.dossiers.length>0&&(0,q.jsx)(`ul`,{className:`sync-dossiers`,"aria-label":`Dossiers in the cache`,children:a.dossiers.map(e=>(0,q.jsx)(bK,{dossier:e},e.name))})]})})}var SK=`X-Toil-UI-Session`,CK=`X-Toil-UI-CSRF`;async function wK(e,t){try{let t=await e.json();if(t.error?.message)return new QG(`${t.error.message}${t.error.fix?` ${t.error.fix}`:``}`,t.error.usage)}catch{}return Error(`${t} failed: the server answered ${e.status}.`)}var TK=`This Toil UI assigns nothing: start toil-ui with its cache to assign items to an agent.`;function EK(e,t=`./`){let n=async(n,r,i)=>{let a=await fetch(`${t}api/${n}`,{method:i===void 0?`GET`:`POST`,credentials:`omit`,headers:{[SK]:e.session,...i===void 0?{}:{"Content-Type":`application/json`,[CK]:e.csrf}},...i===void 0?{}:{body:JSON.stringify(i)}});if(!a.ok)throw await wK(a,r);return await a.json()};return{disabled:e.assignments?null:TK,list:(e,t)=>n(`assignments?dossier=${encodeURIComponent(e)}${t?.inbox===!1?`&inbox=0`:``}`,`Reading the assignments`),get:e=>n(`assignments/one?id=${encodeURIComponent(e)}`,`Reading the assignment`),assign:e=>n(`assignments`,`Assigning the item`,e),start:(e,t)=>n(`assignments/start`,`Starting the assignment`,{id:e,...t?{adapter:t}:{}}),cancel:e=>n(`assignments/cancel`,`Stopping the assignment`,{id:e}),apply:(e,t)=>n(`assignments/apply`,`Applying the proposal`,{id:e,proposal:t}),dismiss:(e,t)=>n(`assignments/dismiss`,`Dismissing the proposal`,{id:e,proposal:t}),finish:e=>n(`assignments/finish`,`Marking it reviewed`,{id:e}),renew:e=>n(`assignments/renew`,`Renewing the assignment`,{id:e}),async events(n,r,i){let a=await fetch(`${t}api/assignments/events?since=${n}`,{credentials:`omit`,headers:{[SK]:e.session},signal:i});if(!a.ok||!a.body)throw await wK(a,`Reading the assignment events`);let o=a.body.getReader(),s=new TextDecoder,c=``;for(;;){let{value:e,done:t}=await o.read();e&&(c+=s.decode(e,{stream:!0}));let n;for(;(n=c.indexOf(`
66
+ `))>=0;){let e=c.slice(0,n).trim();c=c.slice(n+1),e&&r(JSON.parse(e))}if(t){let e=(c+s.decode()).trim();e&&r(JSON.parse(e));return}}},...e.sample?{}:{saveSettings:e=>n(`assignments/settings`,`Saving the limits`,{concurrent:e.concurrent,timeLimitMinutes:e.timeLimitMinutes})}}}var DK=e=>Object.fromEntries((e?.dossiers??[]).map(e=>[e.name,{at:e.lastSyncAt,status:e.status}])),OK=(0,lm.createRoot)(document.getElementById(`root`));function kK({session:e,execute:t,agent:n,names:r,status:i}){let[a,o]=(0,v.useState)(()=>vK(i)),[s,c]=(0,v.useState)(()=>DK(i)),[l,u]=(0,v.useState)(n),[d]=(0,v.useState)(()=>e.agentSettings?pK(e):null),f=(0,v.useCallback)(t=>{cK({...e,agent:t.kind},r).then(e=>{u(e),m(e=>e+1)})},[e,r]),[p,m]=(0,v.useState)(0),[h]=(0,v.useState)(()=>e.sync?iK(e):null),[g]=(0,v.useState)(()=>aK(e)),[_]=(0,v.useState)(()=>oK(e)),[y]=(0,v.useState)(()=>mK(e)),[b]=(0,v.useState)(()=>gK(e)),[x]=(0,v.useState)(()=>hK(e)),[S]=(0,v.useState)(()=>EK(e)),[C]=(0,v.useState)(()=>()=>lK(e)),[w,T]=(0,v.useState)(null),[E,D]=(0,v.useState)(null),O=(0,v.useCallback)(e=>T(e.job.running?e.job:null),[]),[k,A]=(0,v.useState)(0),j=(0,v.useCallback)(()=>A(e=>e+1),[]),M=(0,v.useCallback)(e=>{o(vK(e)),c(DK(e)),e.job.finishedAt&&e.job.news?.length&&D({id:e.job.finishedAt,byDossier:e.job.news}),m(e=>e+1)},[]);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(HG,{syncing:w,news:E,serverStatus:C,execute:t,agent:l,config:g,...e.sample?{}:{themeSetting:g},feedback:_,modelUsage:x,assignments:S,worklog:y,analyses:b,...e.sync?{synced:s,onSync:j,afterDescribe:()=>void h?.status().then(e=>c(DK(e)),()=>void 0)}:{},now:a??e.now,preview:e.sample,versions:{ui:e.version,toil:e.toil.version},...d?{agentSettings:{client:d,onChange:f,...r[0]?{dossier:r[0]}:{}}}:{}},p),h&&(0,q.jsx)(xK,{client:h,onChange:M,onStatus:O,request:k})]})}async function AK(){let e=await eK(),t=rK(e),n=await t(`dossiers list`,{},oS),r=n.ok?(n.data.dossiers??[]).map(e=>String(e.name)):[],i=await cK(e,r),a=e.sync?await iK(e).status().catch(()=>null):null;OK.render((0,q.jsx)(v.StrictMode,{children:(0,q.jsx)(kK,{session:e,execute:t,agent:i,names:r,status:a})}))}AK().catch(e=>{OK.render((0,q.jsx)(`main`,{id:`main`,children:(0,q.jsxs)(`div`,{role:`alert`,className:`failure`,children:[(0,q.jsx)(`h1`,{children:`Toil UI couldn't start`}),(0,q.jsx)(`p`,{children:e instanceof Error?e.message:String(e)})]})}))});export{Oj as a,rC as c,oi as d,m as f,c as h,wj as i,J as l,o as m,RF as n,UT as o,u as p,Fj as r,nC as s,zF as t,Dh as u};