@@ -1,24 +1,24 @@
const _ _vite _ _mapDeps = ( i , m = _ _vite _ _mapDeps , d = ( m . f || ( m . f = [ "assets/HarnessPage.js" , "assets/HarnessPage.css" ] ) ) ) => i . map ( i => d [ i ] ) ;
var e = Object . defineProperty , t = ( t , n ) => { let r = { } ; for ( var i in t ) e ( r , i , { get : t [ i ] , enumerable : ! 0 } ) ; return n || e ( r , Symbol . toStringTag , { value : ` Module ` } ) , r } ; ( 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 ) } } ) ( ) ; function n ( e ) { let t = Object . create ( null ) ; for ( let n of e . split ( ` , ` ) ) t [ n ] = 1 ; return e => e in t } var r = { } , i = [ ] , a = ( ) => { } , o = ( ) => ! 1 , s = e => e . charCodeAt ( 0 ) === 111 && e . charCodeAt ( 1 ) === 110 && ( e . charCodeAt ( 2 ) > 122 || e . charCodeAt ( 2 ) < 97 ) , c = e => e . startsWith ( ` onUpdate: ` ) , l = Object . assign , u = ( e , t ) => { let n = e . indexOf ( t ) ; n > - 1 && e . splice ( n , 1 ) } , d = Object . prototype . hasOwnProperty , f = ( e , t ) => d . call ( e , t ) , p = Array . isArray , m = e => w ( e ) === ` [object Map] ` , h = e => w ( e ) === ` [object Set] ` , g = e => w ( e ) === ` [object Date] ` , _ = e => w ( e ) === ` [object RegExp] ` , v = e => typeof e == ` function ` , y = e => typeof e == ` string ` , b = e => typeof e == ` symbol ` , x = e => typeof e == ` object ` && ! ! e , S = e => ( x ( e ) || v ( e ) ) && v ( e . then ) && v ( e . catch ) , C = Object . prototype . toString , w = e => C . call ( e ) , T = e => w ( e ) . slice ( 8 , - 1 ) , E = e => w ( e ) === ` [object Object] ` , D = e => y ( e ) && e !== ` NaN ` && e [ 0 ] !== ` - ` && ` ` + parseInt ( e , 10 ) === e , O = n ( ` ,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted ` ) , ee = e => { let t = Object . create ( null ) ; return ( n => t [ n ] || ( t [ n ] = e ( n ) ) ) } , te = /-\w/g , ne = ee ( e => e . replace ( te , e => e . slice ( 1 ) . toUpperCase ( ) ) ) , re = /\B([A-Z])/g , ie = ee ( e => e . replace ( re , ` - $ 1 ` ) . toLowerCase ( ) ) , ae = ee ( e => e . charAt ( 0 ) . toUpperCase ( ) + e . slice ( 1 ) ) , oe = ee ( e => e ? ` on ${ ae ( e ) } ` : ` ` ) , k = ( e , t ) => ! Object . is ( e , t ) , se = ( e , ... t ) => { for ( let n = 0 ; n < e . length ; n ++ ) e [ n ] ( ... t ) } , ce = ( e , t , n , r = ! 1 ) => { Object . defineProperty ( e , t , { configurable : ! 0 , enumerable : ! 1 , writable : r , value : n } ) } , le = e => { let t = parseFloat ( e ) ; return isNaN ( t ) ? e : t } , ue = e => { let t = y ( e ) ? Number ( e ) : NaN ; return isNaN ( t ) ? e : t } , de , fe = ( ) => de || = typeof globalThis < ` u ` ? globalThis : typeof self < ` u ` ? self : typeof window < ` u ` ? window : typeof global < ` u ` ? global : { } , pe = n ( ` Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol ` ) ; function me ( e ) { if ( p ( e ) ) { let t = { } ; for ( let n = 0 ; n < e . length ; n ++ ) { let r = e [ n ] , i = y ( r ) ? ve ( r ) : me ( r ) ; if ( i ) for ( let e in i ) t [ e ] = i [ e ] } return t } if ( y ( e ) || x ( e ) ) return e } var he = /;(?![^(]*\))/g , ge = /:([^]+)/ , _e = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g ; function ve ( e ) { let t = { } ; return e . replace ( _e , e => e . startsWith ( ` /* ` ) ? ` ` : e ) . split ( he ) . forEach ( e => { if ( e ) { let n = e . split ( ge ) ; n . length > 1 && ( t [ n [ 0 ] . trim ( ) ] = n [ 1 ] . trim ( ) ) } } ) , t } function A ( e ) { let t = ` ` ; if ( y ( e ) ) t = e ; else if ( p ( e ) ) for ( let n = 0 ; n < e . length ; n ++ ) { let r = A ( e [ n ] ) ; r && ( t += r + ` ` ) } else if ( x ( e ) ) for ( let n in e ) e [ n ] && ( t += n + ` ` ) ; return t . trim ( ) } function ye ( e ) { if ( ! e ) return null ; let { class : t , style : n } = e ; return t && ! y ( t ) && ( e . class = A ( t ) ) , n && ( e . style = me ( n ) ) , e } var be = ` itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly ` , xe = n ( be ) ; be + ` ` ; function Se ( e ) { return ! ! e || e === ` ` } function Ce ( e , t , n ) { if ( e . length !== t . length ) return ! 1 ; let r = ! 0 ; for ( let i = 0 ; r && i < e . length ; i ++ ) r = De ( e [ i ] , t [ i ] , n ) ; return r } function we ( e , t , n ) { if ( e . size !== t . size ) return ! 1 ; let r = Array . from ( t ) , i = new Uint8Array ( r . length ) ; for ( let t of e ) { let e = - 1 ; for ( let a = 0 ; a < r . length ; a ++ ) if ( ! i [ a ] && De ( t , r [ a ] , n ) ) { e = a ; break } if ( e < 0 ) return ! 1 ; i [ e ] = 1 } return ! 0 } function Te ( e , t , n ) { let r = m ( e ) , i = m ( t ) ; if ( r || i || ( r = h ( e ) , i = h ( t ) , r || i ) ) return r && i ? we ( e , t , n ) : ! 1 ; if ( Object . keys ( e ) . length !== Object . keys ( t ) . length ) return ! 1 ; for ( let r in e ) { let i = e . hasOwnProperty ( r ) , a = t . hasOwnProperty ( r ) ; if ( i && ! a || ! i && a || ! De ( e [ r ] , t [ r ] , n ) ) return ! 1 } return String ( e ) === String ( t ) } function Ee ( e , t , n , r ) { n || = [ new Map , new Map ] ; let [ i , a ] = n ; if ( i . has ( e ) || a . has ( t ) ) return i . get ( e ) === t && a . get ( t ) === e ; i . set ( e , t ) , a . set ( t , e ) ; let o = r ( e , t , n ) ; return i . delete ( e ) , a . delete ( t ) , o } function De ( e , t , n ) { if ( e === t ) return ! 0 ; let r = g ( e ) , i = g ( t ) ; return r || i ? r && i ? e . getTime ( ) === t . getTime ( ) : ! 1 : ( r = b ( e ) , i = b ( t ) , r || i ? e === t : ( r = p ( e ) , i = p ( t ) , r || i ? r && i ? Ee ( e , t , n , Ce ) : ! 1 : ( r = x ( e ) , i = x ( t ) , r || i ? ! r || ! i ? ! 1 : Ee ( e , t , n , Te ) : String ( e ) === String ( t ) ) ) ) } function Oe ( e , t ) { return e . findIndex ( e => De ( e , t ) ) } var ke = e => ! ! ( e && e . _ _v _isRef === ! 0 ) , j = e => y ( e ) ? e : e == null ? ` ` : p ( e ) || x ( e ) && ( e . toString === C || ! v ( e . toString ) ) ? ke ( e ) ? j ( e . value ) : JSON . stringify ( e , Ae , 2 ) : String ( e ) , Ae = ( e , t ) => ke ( t ) ? Ae ( e , t . value ) : m ( t ) ? { [ ` Map( ${ t . size } ) ` ] : [ ... t . entries ( ) ] . reduce ( ( e , [ t , n ] , r ) => ( e [ je ( t , r ) + ` => ` ] = n , e ) , { } ) } : h ( t ) ? { [ ` Set( ${ t . size } ) ` ] : [ ... t . values ( ) ] . map ( e => je ( e ) ) } : b ( t ) ? je ( t ) : x ( t ) && ! p ( t ) && ! E ( t ) ? String ( t ) : t , je = ( e , t = ` ` ) => b ( e ) ? ` Symbol( ${ e . description ? ? t } ) ` : e ; function Me ( e ) { return e == null ? ` initial ` : typeof
Line truncated
var e = Object . defineProperty , t = ( t , n ) => { let r = { } ; for ( var i in t ) e ( r , i , { get : t [ i ] , enumerable : ! 0 } ) ; return n || e ( r , Symbol . toStringTag , { value : ` Module ` } ) , r } ; ( 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 ) } } ) ( ) ; function n ( e ) { let t = Object . create ( null ) ; for ( let n of e . split ( ` , ` ) ) t [ n ] = 1 ; return e => e in t } var r = { } , i = [ ] , a = ( ) => { } , o = ( ) => ! 1 , s = e => e . charCodeAt ( 0 ) === 111 && e . charCodeAt ( 1 ) === 110 && ( e . charCodeAt ( 2 ) > 122 || e . charCodeAt ( 2 ) < 97 ) , c = e => e . startsWith ( ` onUpdate: ` ) , l = Object . assign , u = ( e , t ) => { let n = e . indexOf ( t ) ; n > - 1 && e . splice ( n , 1 ) } , d = Object . prototype . hasOwnProperty , f = ( e , t ) => d . call ( e , t ) , p = Array . isArray , m = e => w ( e ) === ` [object Map] ` , h = e => w ( e ) === ` [object Set] ` , g = e => w ( e ) === ` [object Date] ` , _ = e => w ( e ) === ` [object RegExp] ` , v = e => typeof e == ` function ` , y = e => typeof e == ` string ` , b = e => typeof e == ` symbol ` , x = e => typeof e == ` object ` && ! ! e , S = e => ( x ( e ) || v ( e ) ) && v ( e . then ) && v ( e . catch ) , C = Object . prototype . toString , w = e => C . call ( e ) , T = e => w ( e ) . slice ( 8 , - 1 ) , E = e => w ( e ) === ` [object Object] ` , D = e => y ( e ) && e !== ` NaN ` && e [ 0 ] !== ` - ` && ` ` + parseInt ( e , 10 ) === e , O = n ( ` ,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted ` ) , ee = e => { let t = Object . create ( null ) ; return ( n => t [ n ] || ( t [ n ] = e ( n ) ) ) } , te = /-\w/g , ne = ee ( e => e . replace ( te , e => e . slice ( 1 ) . toUpperCase ( ) ) ) , re = /\B([A-Z])/g , ie = ee ( e => e . replace ( re , ` - $ 1 ` ) . toLowerCase ( ) ) , ae = ee ( e => e . charAt ( 0 ) . toUpperCase ( ) + e . slice ( 1 ) ) , oe = ee ( e => e ? ` on ${ ae ( e ) } ` : ` ` ) , k = ( e , t ) => ! Object . is ( e , t ) , se = ( e , ... t ) => { for ( let n = 0 ; n < e . length ; n ++ ) e [ n ] ( ... t ) } , ce = ( e , t , n , r = ! 1 ) => { Object . defineProperty ( e , t , { configurable : ! 0 , enumerable : ! 1 , writable : r , value : n } ) } , le = e => { let t = parseFloat ( e ) ; return isNaN ( t ) ? e : t } , ue = e => { let t = y ( e ) ? Number ( e ) : NaN ; return isNaN ( t ) ? e : t } , de , fe = ( ) => de || = typeof globalThis < ` u ` ? globalThis : typeof self < ` u ` ? self : typeof window < ` u ` ? window : typeof global < ` u ` ? global : { } , pe = n ( ` Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol ` ) ; function me ( e ) { if ( p ( e ) ) { let t = { } ; for ( let n = 0 ; n < e . length ; n ++ ) { let r = e [ n ] , i = y ( r ) ? ve ( r ) : me ( r ) ; if ( i ) for ( let e in i ) t [ e ] = i [ e ] } return t } if ( y ( e ) || x ( e ) ) return e } var he = /;(?![^(]*\))/g , ge = /:([^]+)/ , _e = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g ; function ve ( e ) { let t = { } ; return e . replace ( _e , e => e . startsWith ( ` /* ` ) ? ` ` : e ) . split ( he ) . forEach ( e => { if ( e ) { let n = e . split ( ge ) ; n . length > 1 && ( t [ n [ 0 ] . trim ( ) ] = n [ 1 ] . trim ( ) ) } } ) , t } function A ( e ) { let t = ` ` ; if ( y ( e ) ) t = e ; else if ( p ( e ) ) for ( let n = 0 ; n < e . length ; n ++ ) { let r = A ( e [ n ] ) ; r && ( t += r + ` ` ) } else if ( x ( e ) ) for ( let n in e ) e [ n ] && ( t += n + ` ` ) ; return t . trim ( ) } function ye ( e ) { if ( ! e ) return null ; let { class : t , style : n } = e ; return t && ! y ( t ) && ( e . class = A ( t ) ) , n && ( e . style = me ( n ) ) , e } var be = ` itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly ` , xe = n ( be ) ; be + ` ` ; function Se ( e ) { return ! ! e || e === ` ` } function Ce ( e , t , n ) { if ( e . length !== t . length ) return ! 1 ; let r = ! 0 ; for ( let i = 0 ; r && i < e . length ; i ++ ) r = De ( e [ i ] , t [ i ] , n ) ; return r } function we ( e , t , n ) { if ( e . size !== t . size ) return ! 1 ; let r = Array . from ( t ) , i = new Uint8Array ( r . length ) ; for ( let t of e ) { let e = - 1 ; for ( let a = 0 ; a < r . length ; a ++ ) if ( ! i [ a ] && De ( t , r [ a ] , n ) ) { e = a ; break } if ( e < 0 ) return ! 1 ; i [ e ] = 1 } return ! 0 } function Te ( e , t , n ) { let r = m ( e ) , i = m ( t ) ; if ( r || i || ( r = h ( e ) , i = h ( t ) , r || i ) ) return r && i ? we ( e , t , n ) : ! 1 ; if ( Object . keys ( e ) . length !== Object . keys ( t ) . length ) return ! 1 ; for ( let r in e ) { let i = e . hasOwnProperty ( r ) , a = t . hasOwnProperty ( r ) ; if ( i && ! a || ! i && a || ! De ( e [ r ] , t [ r ] , n ) ) return ! 1 } return String ( e ) === String ( t ) } function Ee ( e , t , n , r ) { n || = [ new Map , new Map ] ; let [ i , a ] = n ; if ( i . has ( e ) || a . has ( t ) ) return i . get ( e ) === t && a . get ( t ) === e ; i . set ( e , t ) , a . set ( t , e ) ; let o = r ( e , t , n ) ; return i . delete ( e ) , a . delete ( t ) , o } function De ( e , t , n ) { if ( e === t ) return ! 0 ; let r = g ( e ) , i = g ( t ) ; return r || i ? r && i ? e . getTime ( ) === t . getTime ( ) : ! 1 : ( r = b ( e ) , i = b ( t ) , r || i ? e === t : ( r = p ( e ) , i = p ( t ) , r || i ? r && i ? Ee ( e , t , n , Ce ) : ! 1 : ( r = x ( e ) , i = x ( t ) , r || i ? ! r || ! i ? ! 1 : Ee ( e , t , n , Te ) : String ( e ) === String ( t ) ) ) ) } function Oe ( e , t ) { return e . findIndex ( e => De ( e , t ) ) } var ke = e => ! ! ( e && e . _ _v _isRef === ! 0 ) , j = e => y ( e ) ? e : e == null ? ` ` : p ( e ) || x ( e ) && ( e . toString === C || ! v ( e . toString ) ) ? ke ( e ) ? j ( e . value ) : JSON . stringify ( e , Ae , 2 ) : String ( e ) , Ae = ( e , t ) => ke ( t ) ? Ae ( e , t . value ) : m ( t ) ? { [ ` Map( ${ t . size } ) ` ] : [ ... t . entries ( ) ] . reduce ( ( e , [ t , n ] , r ) => ( e [ je ( t , r ) + ` => ` ] = n , e ) , { } ) } : h ( t ) ? { [ ` Set( ${ t . size } ) ` ] : [ ... t . values ( ) ] . map ( e => je ( e ) ) } : b ( t ) ? je ( t ) : x ( t ) && ! p ( t ) && ! E ( t ) ? String ( t ) : t , je = ( e , t = ` ` ) => b ( e ) ? ` Symbol( ${ e . description ? ? t } ) ` : e ; function Me ( e ) { return e == null ? ` initial ` : typeof
Line truncated
` &&(e.tagName=== ` PRE ` ||e.tagName=== ` TEXTAREA ` )&&(n=n.slice(1));let{textContent:r}=e;r!==n&&r!==n.replace(/ \r \n | \r /g, `
` )&&(pi(e,0)||ri(),e.textContent=t.children)}if(d){if(_||b||!o||f&48){let t=e.tagName.includes( ` - ` ),i=e.namespaceURI.includes( ` svg ` )? ` svg ` :e.namespaceURI.includes( ` MathML ` )? ` mathml ` :void 0;for(let a in d)if(_&&(a.endsWith( ` value ` )||a=== ` indeterminate ` )||s(a)&&!O(a)||a[0]=== ` . ` ||t&&!O(a)||u&&u.includes(a)){if(ui(e,a,d[a]))continue;r(e,a,null,d[a],i,n)}}else if(d.onClick)r(e, ` onClick ` ,null,d.onClick,void 0,n);else if(f&4&& $ t(d.style))for(let e in d.style)d.style[e]}let x;(x=d&&d.onVnodeBeforeMount)&&us(x,n,t),h&&lr(t,null,n, ` beforeMount ` ),((x=d&&d.onVnodeMounted)||h||l)&&Ho(()=>{x&&us(x,n,t),l&&g.enter(e),h&&lr(t,null,n, ` mounted ` )},i)}return e.nextSibling},m=(e,t,r,o,s,c,u)=>{u||=!!t.dynamicChildren;let d=t.children,p=d.length,m=!1;for(let t=0;t<p;t++){let h=u?d[t]:d[t]=ss(d[t]),g=h.type===Wo;e?(g&&!u&&t+1<p&&ss(d[t+1]).type===Wo&&(l(i(e.data.slice(h.children.length)),r,a(e)),e.data=h.children),e=f(e,h,o,s,c,u)):g&&!h.children?l(h.el=i( ` ` ),r):(m||(m=!0,pi(r,1)||ri()),n(null,h,r,null,o,s,oi(r),c))}return e},h=(e,t,n,r,i,s)=>{let{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);let d=o(e),f=m(a(e),t,d,n,r,i,s);return f&&si(f)&&f.data=== ` ] ` ?a(t.anchor=f):(ri(),l(t.anchor=u( ` ] ` ),d,f),f)},g=(e,t,r,i,s,l)=>{if(hi(e,t)||ri(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)c(n);else break}}let u=a(e),d=o(e);return c(e),n(null,t,d,u,r,i,oi(d),s),r&&(r.vnode.el=t.el,eo(r,t.el)),u},_=(e,t= ` [ ` ,n= ` ] ` )=>{let r=0;for(;e;)if(e=a(e),e&&si(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName=== ` TEMPLATE ` ;return[d,f]}var li=new Set([ ` src ` , ` srcset ` , ` href ` , ` poster ` ]);function ui(e,t,n){return li.has(t)?e.getAttribute(t)===(n==null?null: ` $ { n } ` ):!1}var di= ` data - allow - mismatch ` ,fi={0: ` text ` ,1: ` children ` ,2: ` class ` ,3: ` style ` ,4: ` attribute ` };function pi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(di);)e=e.parentElement;return mi(e&&e.getAttribute(di),t)}function mi(e,t){if(e==null)return!1;if(e=== ` ` )return!0;{let n=e.split( ` , ` );return t===0&&n.includes( ` children ` )?!0:n.includes(fi[t])}}function hi(e,t){return pi(e.parentElement,1)||gi(e)||_i(t)}function gi(e){return e.nodeType===1&&mi(e.getAttribute(di),1)}function _i({props:e}){let t=e&&e[di];return typeof t== ` string ` &&mi(t,1)}var vi=fe().requestIdleCallback||(e=>setTimeout(e,1)),yi=fe().cancelIdleCallback||(e=>clearTimeout(e)),bi=(e=1e4)=>t=>{let n=vi(t,{timeout:e});return()=>yi(n)};function xi(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t<a||r>0&&r<a)&&(n>0&&n<o||i>0&&i<o)}var Si=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(xi(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},Ci=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener( ` change ` ,t,{once:!0}),()=>n.removeEventListener( ` change ` ,t)}},wi=(e=[])=>(t,n)=>{y(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function Ti(e,t){if(si(e)&&e.data=== ` [ ` ){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(si(r)){if(r.data=== ` ] ` ){if(--n===0)break}else r.data=== ` [ ` &&n++}r=r.nextSibling}}else t(e)}var Ei=e=>!!e.type.__asyncLoader;function Di(e){v(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]=== ` Module ` )&&(t=t.default),u=t,t)))};return I({name: ` AsyncComponentWrapper ` ,__asyncLoader:p,__asyncHydrate(e,t,n){let r=e.isConnected,i=!1;(t.bu||=[]).push(()=>i=!0);let o=()=>{i||!e.parentNode||r&&!e.isConnected||n()},s=a?()=>{let n=a(o,t=>Ti(e,t));n&&(t.bum||=[]).push(n)}:o;u?s():p().then(()=>!t.isUnmounted&&s())},get __asyncResolved(){return u},setup(){let e=ms;if(Xr(e),u)return()=>Oi(u,e);let t=t=>{l=null,Rn(t,e,13,!r)};if(s&&e.suspense||xs)return p().then(t=>()=>Oi(t,e)).catch(e=>(t(e),()=>r?W(r,{error:e}):null));let a=M(!1),c=M(),d=M(!!i),f,m;return Gi(()=>{f!=null&&clearTimeout(f),m!=null&&clearTimeout(m)}),i&&(m=setTimeout(()=>{e.isUnmounted||(d.value=!1)},i)),o!=null&&(f=setTimeout(()=>{if(!e.isUnmounted&&!a.value&&!c.value){let e=Error( ` Async component timed out after $ { o } ms . ` );t(e),c.value=e}},o)),p().then(()=>{e.isUnmounted||(a.value=!0,e.parent&&ki(e.parent.vnode)&&e.parent.update())}).catch(n=>{if(e.isUnmounted){l=null;return}t(n),c.value=n}),()=>{if(a.value&&u)return Oi(u,e);if(c.value&&r)return W(r,{error:c.value});if(n&&!d
Line truncated
` ))),e[Sl]=yl(i);let a=r||i.props&&i.props.type=== ` number ` ;Bc(e,t? ` change ` : ` input ` ,t=>{t.target.composing||e[Sl](wl(e.value,n,a))}),(n||a)&&Bc(e, ` change ` ,()=>{e.value=wl(e.value,n,a)}),t||(Bc(e, ` compositionstart ` ,bl),Bc(e, ` compositionend ` ,xl),Bc(e, ` change ` ,xl))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t?? ` ` ,a=e[Cl];delete e[Cl],a!==void 0&&(e.type=== ` text ` ||e.type=== ` textarea ` )&&e.value!==a?e[Sl](wl(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Sl]=yl(o),e.composing)return;let s=(a||e.type=== ` number ` )&&!/^0 \d /.test(e.value)?le(e.value):e.value,c=t?? ` ` ;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!== ` range ` &&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},El={deep:!0,created(e,t,n){e[Sl]=yl(n),Bc(e, ` change ` ,()=>{let t=e._modelValue,n=jl(e),r=e.checked,i=e[Sl];if(p(t)){let e=Oe(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(h(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Ml(e,r))})},mounted:Dl,beforeUpdate(e,t,n){e[Sl]=yl(n),Dl(e,t,n)}};function Dl(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(p(t))i=Oe(t,r.props.value)>-1;else if(h(t))i=t.has(r.props.value);else{if(t===n)return;i=De(t,Ml(e,!0))}e.checked!==i&&(e.checked=i)}var Ol={created(e,{value:t},n){e.checked=De(t,n.props.value),e[Sl]=yl(n),Bc(e, ` change ` ,()=>{e[Sl](jl(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Sl]=yl(r),t!==n&&(e.checked=De(t,r.props.value))}},kl={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Bc(e, ` change ` ,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?le(jl(e)):jl(e)),r=e.multiple,i=r?h(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?p(i)?t.slice():t:i];try{e[Sl](i)}finally{qn(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[Sl]=yl(r)},mounted(e,{value:t}){Al(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Sl]=yl(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!yee(t,n[1],n[0]))&&Al(e,t)}};function yee(e,t,n){if(!n||p(e))return De(e,t);if(h(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function Al(e,t){let n=e.multiple,r=p(t);if(!n||r||h(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=jl(a);if(n){if(r){let e=typeof o;a.selected=e=== ` string ` ||e=== ` number ` ?t.some(e=>String(e)===String(o)):Oe(t,o)>-1}else a.selected=t.has(o)}else if(De(jl(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function jl(e){return ` _value ` in e?e._value:e.value}function Ml(e,t){let n=t? ` _trueValue ` : ` _falseValue ` ;return n in e?e[n]:t}var Nl={created(e,t,n){Fl(e,t,n,null, ` created ` )},mounted(e,t,n){Fl(e,t,n,null, ` mounted ` )},beforeUpdate(e,t,n,r){Fl(e,t,n,r, ` beforeUpdate ` )},updated(e,t,n,r){Fl(e,t,n,r, ` updated ` )}};function Pl(e,t){switch(e){case ` SELECT ` :return kl;case ` TEXTAREA ` :return Tl;default:switch(t){case ` checkbox ` :return El;case ` radio ` :return Ol;default:return Tl}}}function Fl(e,t,n,r,i){let a=Pl(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function bee(){Tl.getSSRProps=({value:e})=>({value:e}),Ol.getSSRProps=({value:e},t)=>{if(t.props&&De(t.props.value,e))return{checked:!0}},El.getSSRProps=({value:e},t)=>{if(p(e)){if(t.props&&Oe(e,t.props.value)>-1)return{checked:!0}}else if(h(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Nl.getSSRProps=(e,t)=>{if(typeof t.type!= ` string ` )return;let n=Pl(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var xee=[ ` ctrl ` , ` shift ` , ` alt ` , ` meta ` ],See={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=> ` button ` in e&&e.button!==0,middle:e=> ` button ` in e&&e.button!==1,right:e=> ` button ` in e&&e.button!==2,exact:(e,t)=>xee.some(n=>e[ ` $ { n } Key ` ]&&!t.includes(n))},Il=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join( ` . ` );return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=See[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},Cee={esc: ` escape ` ,space: ` ` ,up: ` arrow - up ` ,left: ` arrow - left ` ,right: ` arrow - right ` ,down: ` arrow - down ` ,delete: ` backspace ` },Ll=(e,t)=>{let n=e._withKeys||={},r=t.join( ` . ` );return n[r]||(n[r]=(n=>{if(!( ` key ` in n))return;let r=ie(n.key);if(t.some(e=>e===r||Cee[e]===r))return e(n)}))},Rl=l({patchProp:Qc},Qs),zl,Bl=!1;function Vl(){return zl||=xo(Rl)}function Hl(){return zl=Bl?zl:So(Rl),Bl=!0,zl}var Ul=((...e)=>{Vl().render(...e)}),Wl=((...e)=>{Hl().hydrate(...e)}),Gl=((...e)=>{let t=Vl().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Jl(e);if(!r)return;let i=t._component;!v(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent= ` ` );let a=n(r,!1,ql(r));return r instanceof Element&&(r.removeAttribute( ` v - cloak ` ),r.setAttribute( ` data - v - app ` , ` ` )),a},
Line truncated
` )[0].slice(0,200)}catch{}return ` $ { e . status } $ { e . statusText } ` }var jp;function Mp(e){jp=e}var Np=class extends Error{status;constructor(e,t){super(e),this.name= ` ApiError ` ,this.status=t}};function Pp(e){let t=e instanceof Np?e.status:void 0,n=e instanceof Error&&e.message?e.message: ` Action failed ` ;return t===401?{kind: ` session - expired ` ,message:n}:t!==void 0&&t>=400&&t<500?{kind: ` refused ` ,message:n}:{kind: ` broken ` ,message:n}}async function Fp(e,t){let n=await fetch(e,t);if(jp?.(n.status===401),!n.ok)throw new Np(await Ap(n),n.status);return n}async function Ip(e,t={}){let{method:n= ` GET ` ,body:r,timeoutMs:i=Op,parse:a=!0}=t,o={Accept: ` application / json ` },s={method:n,headers:o,signal:AbortSignal.timeout(i)};n!== ` GET ` &&(o[ ` Content - Type ` ]= ` application / json ` ,o[ ` X - Archie - CSRF ` ]= ` 1 ` ),r!==void 0&&(s.body=JSON.stringify(r));let c=await Fp(e,s);return a?await c.json():void 0}var X={health:()=>Ip( ` / health / detailed ` ),services:()=>Ip( ` / api / services ` ),policies:()=>Ip( ` / api / access / policies ` ),putPolicy:e=>Ip( ` / api / access / policies ` ,{method: ` PUT ` ,body:e}),deletePolicy:e=>Ip( ` / api / access / policies ` ,{method: ` DELETE ` ,body:e,parse:!1}),orgs:()=>Ip( ` / api / orgs ` ),orgCreate:e=>Ip( ` / api / orgs ` ,{method: ` POST ` ,body:e}),org:e=>Ip( ` / api / orgs / $ { encodeURIComponent ( e ) } ` ),orgWorkspaces:e=>Ip( ` / api / orgs / $ { encodeURIComponent ( e ) } / workspaces ` ),createOrgWorkspace:(e,t)=>Ip( ` / api / orgs / $ { encodeURIComponent ( e ) } / workspaces ` ,{method: ` POST ` ,body:t}),orgMembers:e=>Ip( ` / api / orgs / $ { encodeURIComponent ( e ) } / members ` ),setOrgMember:(e,t,n)=>Ip( ` / api / orgs / $ { encodeURIComponent ( e ) } / members / $ { encodeURIComponent ( t ) } ` ,{method: ` PUT ` ,body:n}),removeOrgMember:(e,t,n)=>Ip( ` / api / orgs / $ { encodeURIComponent ( e ) } / members / $ { encodeURIComponent ( t ) } ` +kp({workspace:n}),{method: ` DELETE ` ,parse:!1}),assignOrgAgent:(e,t)=>Ip( ` / api / orgs / $ { encodeURIComponent ( e ) } / agents / $ { encodeURIComponent ( t ) } ` ,{method: ` PUT ` }),summary:()=>Ip( ` / api / summary ` ),tasks:()=>Ip( ` / api / tasks ` ),taskPage:async e=>{let t=await Fp( ` / api / tasks ` +kp(e),{headers:{Accept: ` application / json ` },signal:AbortSignal.timeout(Op)});return{tasks:await t.json(),next:t.headers.get( ` X - Next - Cursor ` )}},taskMeta:()=>Ip( ` / api / task - meta ` ),task:e=>Ip( ` / api / tasks / $ { encodeURIComponent ( e ) } ` ),taskAttempts:e=>Ip( ` / api / tasks / $ { encodeURIComponent ( e ) } / attempts ` ),taskChanges:(e,t)=>Ip( ` / api / tasks / $ { encodeURIComponent ( e ) } / changes ` +kp(t)),taskDebug:(e,t)=>Ip( ` / api / tasks / $ { encodeURIComponent ( e ) } / debug ` +kp(t)),taskAction:(e,t,n)=>Ip( ` / api / tasks / $ { encodeURIComponent ( e ) } / action ` ,{method: ` POST ` ,body:{action:t,...n}}),setup:()=>Ip( ` / api / setup ` ),capabilities:()=>Ip( ` / api / capabilities ` ),workflows:()=>Ip( ` / api / workflows ` ),workflowEnabled:(e,t)=>Ip( ` / api / workflows / $ { encodeURIComponent ( e ) } / enabled ` ,{method: ` PUT ` ,body:{enabled:t},parse:!1}),workRequest:e=>Ip( ` / api / work - requests ` ,{method: ` POST ` ,body:e}),skills:()=>Ip( ` / api / skills ` ),channels:()=>Ip( ` / api / channels ` ),curators:()=>Ip( ` / api / curators ` ),channelReload:e=>Ip( ` / api / channels / $ { encodeURIComponent ( e ) } / reload ` ,{method: ` POST ` ,body:{}}),config:()=>Ip( ` / api / config ` ),logs:e=>Ip( ` / api / logs ` +kp(e)),taskLogs:(e,t)=>Ip( ` / api / tasks / $ { encodeURIComponent ( e ) } / logs ` +kp(t)),taskLogDownloadURL:(e,t)=> ` / api / tasks / $ { encodeURIComponent ( e ) } / logs / download ` +(t==null? ` ` : ` ? attempt = $ { t } ` ),version:()=>Ip( ` / api / version ` ),updateSnapshot:()=>Ip( ` / api / chat / update ` ),updateInstall:e=>Ip( ` / api / chat / update / install ` ,{method: ` POST ` ,body:{snapshot:e},timeoutMs:9e5}),captures:e=>Ip( ` / api / captures ` +kp({limit:e})),eventTypes:()=>Ip( ` / api / event - types ` ),eventTypeCreate:e=>Ip( ` / api / event - types ` ,{method: ` POST ` ,body:e}),eventTypeUpdate:(e,t)=>Ip( ` / api / event - types / $ { encodeURIComponent ( e ) } ` ,{method: ` PUT ` ,body:t}),eventTypeDelete:e=>Ip( ` / api / event - types / $ { encodeURIComponent ( e ) } ` ,{method: ` DELETE ` ,parse:!1}),mappings:()=>Ip( ` / api / mappings ` ),mappingCreate:e=>Ip( ` / api / mappings ` ,{method: ` POST ` ,body:e}),mappingUpdate:(e,t)=>Ip( ` / api / mappings / $ { encodeURIComponent ( e ) } ` ,{method: ` PATCH ` ,body:t}),mappingDelete:e=>Ip( ` / api / mappings / $ { encodeURIComponent ( e ) } ` ,{method: ` DELETE ` ,parse:!1}),mappingPreview:(e,t)=>Ip( ` / api / mappings / preview ` ,{method: ` POST ` ,body:{capture_id:e,fields:t}}),bindings:()=>Ip( ` / api / bindings ` ),dispatches:(e,t)=>Ip( ` / api / $ { e } / $ { encodeURIComponent ( t ) } / dispatches ` ),bindingCreate:e=>Ip( ` / api / bindings ` ,{method: ` POST ` ,body:e}),bindingUpdate:(e,t)=>Ip( ` / api / bindings / $ { encodeURIComponent ( e ) } ` ,{method: ` PATCH ` ,body:t}),bindingDelete:e=>Ip( ` / api / bindings / $ { encodeURIComponent ( e ) } ` ,{method: ` DELETE ` ,parse:!1}),bindingApprove:e=>Ip( ` / api / bindings / $ { encodeURIComponent ( e ) } / approve ` ,{method: ` POST ` }),bindingPause:e=>Ip( ` / api / bindings / $ { encodeURIComponent ( e ) } / pause ` ,{method: ` POST ` }),bindingResume:e=>Ip( ` / api / bindings / $ { encodeURIComponent ( e ) } / resume ` ,{method: ` POST ` }),harnessBindings:()=>Ip( ` / api / harness / bindings ` ),sources:()=>Ip( ` / api / sources ` ),sourceCreate:e=>Ip( ` / api / sources ` ,{method: ` POST ` ,body:{path:e}}),sourceSigning:(e,t)=>Ip( ` / api / sources / $ { encodeURIComponent ( e ) } / signing ` ,{method: ` POST ` ,body:{signed:t}}),sourceApproveUnsigned:e=>Ip( ` / api / sources / $ { encodeURIComponent ( e ) } / a Line truncated
` )&&(pi(e,0)||ri(),e.textContent=t.children)}if(d){if(_||b||!o||f&48){let t=e.tagName.includes( ` - ` ),i=e.namespaceURI.includes( ` svg ` )? ` svg ` :e.namespaceURI.includes( ` MathML ` )? ` mathml ` :void 0;for(let a in d)if(_&&(a.endsWith( ` value ` )||a=== ` indeterminate ` )||s(a)&&!O(a)||a[0]=== ` . ` ||t&&!O(a)||u&&u.includes(a)){if(ui(e,a,d[a]))continue;r(e,a,null,d[a],i,n)}}else if(d.onClick)r(e, ` onClick ` ,null,d.onClick,void 0,n);else if(f&4&& $ t(d.style))for(let e in d.style)d.style[e]}let x;(x=d&&d.onVnodeBeforeMount)&&ds(x,n,t),h&&lr(t,null,n, ` beforeMount ` ),((x=d&&d.onVnodeMounted)||h||l)&&Uo(()=>{x&&ds(x,n,t),l&&g.enter(e),h&&lr(t,null,n, ` mounted ` )},i)}return e.nextSibling},m=(e,t,r,o,s,c,u)=>{u||=!!t.dynamicChildren;let d=t.children,p=d.length,m=!1;for(let t=0;t<p;t++){let h=u?d[t]:d[t]=cs(d[t]),g=h.type===Go;e?(g&&!u&&t+1<p&&cs(d[t+1]).type===Go&&(l(i(e.data.slice(h.children.length)),r,a(e)),e.data=h.children),e=f(e,h,o,s,c,u)):g&&!h.children?l(h.el=i( ` ` ),r):(m||(m=!0,pi(r,1)||ri()),n(null,h,r,null,o,s,oi(r),c))}return e},h=(e,t,n,r,i,s)=>{let{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);let d=o(e),f=m(a(e),t,d,n,r,i,s);return f&&si(f)&&f.data=== ` ] ` ?a(t.anchor=f):(ri(),l(t.anchor=u( ` ] ` ),d,f),f)},g=(e,t,r,i,s,l)=>{if(hi(e,t)||ri(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)c(n);else break}}let u=a(e),d=o(e);return c(e),n(null,t,d,u,r,i,oi(d),s),r&&(r.vnode.el=t.el,to(r,t.el)),u},_=(e,t= ` [ ` ,n= ` ] ` )=>{let r=0;for(;e;)if(e=a(e),e&&si(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName=== ` TEMPLATE ` ;return[d,f]}var li=new Set([ ` src ` , ` srcset ` , ` href ` , ` poster ` ]);function ui(e,t,n){return li.has(t)?e.getAttribute(t)===(n==null?null: ` $ { n } ` ):!1}var di= ` data - allow - mismatch ` ,fi={0: ` text ` ,1: ` children ` ,2: ` class ` ,3: ` style ` ,4: ` attribute ` };function pi(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(di);)e=e.parentElement;return mi(e&&e.getAttribute(di),t)}function mi(e,t){if(e==null)return!1;if(e=== ` ` )return!0;{let n=e.split( ` , ` );return t===0&&n.includes( ` children ` )?!0:n.includes(fi[t])}}function hi(e,t){return pi(e.parentElement,1)||gi(e)||_i(t)}function gi(e){return e.nodeType===1&&mi(e.getAttribute(di),1)}function _i({props:e}){let t=e&&e[di];return typeof t== ` string ` &&mi(t,1)}var vi=fe().requestIdleCallback||(e=>setTimeout(e,1)),yi=fe().cancelIdleCallback||(e=>clearTimeout(e)),bi=(e=1e4)=>t=>{let n=vi(t,{timeout:e});return()=>yi(n)};function xi(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t<a||r>0&&r<a)&&(n>0&&n<o||i>0&&i<o)}var Si=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(xi(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},Ci=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener( ` change ` ,t,{once:!0}),()=>n.removeEventListener( ` change ` ,t)}},wi=(e=[])=>(t,n)=>{y(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function Ti(e,t){if(si(e)&&e.data=== ` [ ` ){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(si(r)){if(r.data=== ` ] ` ){if(--n===0)break}else r.data=== ` [ ` &&n++}r=r.nextSibling}}else t(e)}var Ei=e=>!!e.type.__asyncLoader;function Di(e){v(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]=== ` Module ` )&&(t=t.default),u=t,t)))};return I({name: ` AsyncComponentWrapper ` ,__asyncLoader:p,__asyncHydrate(e,t,n){let r=e.isConnected,i=!1;(t.bu||=[]).push(()=>i=!0);let o=()=>{i||!e.parentNode||r&&!e.isConnected||n()},s=a?()=>{let n=a(o,t=>Ti(e,t));n&&(t.bum||=[]).push(n)}:o;u?s():p().then(()=>!t.isUnmounted&&s())},get __asyncResolved(){return u},setup(){let e=hs;if(Xr(e),u)return()=>Oi(u,e);let t=t=>{l=null,Rn(t,e,13,!r)};if(s&&e.suspense||Ss)return p().then(t=>()=>Oi(t,e)).catch(e=>(t(e),()=>r?W(r,{error:e}):null));let a=M(!1),c=M(),d=M(!!i),f,m;return Gi(()=>{f!=null&&clearTimeout(f),m!=null&&clearTimeout(m)}),i&&(m=setTimeout(()=>{e.isUnmounted||(d.value=!1)},i)),o!=null&&(f=setTimeout(()=>{if(!e.isUnmounted&&!a.value&&!c.value){let e=Error( ` Async component timed out after $ { o } ms . ` );t(e),c.value=e}},o)),p().then(()=>{e.isUnmounted||(a.value=!0,e.parent&&ki(e.parent.vnode)&&e.parent.update())}).catch(n=>{if(e.isUnmounted){l=null;return}t(n),c.value=n}),()=>{if(a.value&&u)return Oi(u,e);if(c.value&&r)return W(r,{error:c.value});if(n&&!d
Line truncated
` ))),e[Cl]=bl(i);let a=r||i.props&&i.props.type=== ` number ` ;Vc(e,t? ` change ` : ` input ` ,t=>{t.target.composing||e[Cl](Tl(e.value,n,a))}),(n||a)&&Vc(e, ` change ` ,()=>{e.value=Tl(e.value,n,a)}),t||(Vc(e, ` compositionstart ` ,xl),Vc(e, ` compositionend ` ,Sl),Vc(e, ` change ` ,Sl))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t?? ` ` ,a=e[wl];delete e[wl],a!==void 0&&(e.type=== ` text ` ||e.type=== ` textarea ` )&&e.value!==a?e[Cl](Tl(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Cl]=bl(o),e.composing)return;let s=(a||e.type=== ` number ` )&&!/^0 \d /.test(e.value)?le(e.value):e.value,c=t?? ` ` ;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!== ` range ` &&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Dl={deep:!0,created(e,t,n){e[Cl]=bl(n),Vc(e, ` change ` ,()=>{let t=e._modelValue,n=Ml(e),r=e.checked,i=e[Cl];if(p(t)){let e=Oe(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(h(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Nl(e,r))})},mounted:Ol,beforeUpdate(e,t,n){e[Cl]=bl(n),Ol(e,t,n)}};function Ol(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(p(t))i=Oe(t,r.props.value)>-1;else if(h(t))i=t.has(r.props.value);else{if(t===n)return;i=De(t,Nl(e,!0))}e.checked!==i&&(e.checked=i)}var kl={created(e,{value:t},n){e.checked=De(t,n.props.value),e[Cl]=bl(n),Vc(e, ` change ` ,()=>{e[Cl](Ml(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Cl]=bl(r),t!==n&&(e.checked=De(t,r.props.value))}},Al={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Vc(e, ` change ` ,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?le(Ml(e)):Ml(e)),r=e.multiple,i=r?h(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?p(i)?t.slice():t:i];try{e[Cl](i)}finally{qn(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[Cl]=bl(r)},mounted(e,{value:t}){jl(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Cl]=bl(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!vee(t,n[1],n[0]))&&jl(e,t)}};function vee(e,t,n){if(!n||p(e))return De(e,t);if(h(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function jl(e,t){let n=e.multiple,r=p(t);if(!n||r||h(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=Ml(a);if(n){if(r){let e=typeof o;a.selected=e=== ` string ` ||e=== ` number ` ?t.some(e=>String(e)===String(o)):Oe(t,o)>-1}else a.selected=t.has(o)}else if(De(Ml(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ml(e){return ` _value ` in e?e._value:e.value}function Nl(e,t){let n=t? ` _trueValue ` : ` _falseValue ` ;return n in e?e[n]:t}var Pl={created(e,t,n){Il(e,t,n,null, ` created ` )},mounted(e,t,n){Il(e,t,n,null, ` mounted ` )},beforeUpdate(e,t,n,r){Il(e,t,n,r, ` beforeUpdate ` )},updated(e,t,n,r){Il(e,t,n,r, ` updated ` )}};function Fl(e,t){switch(e){case ` SELECT ` :return Al;case ` TEXTAREA ` :return El;default:switch(t){case ` checkbox ` :return Dl;case ` radio ` :return kl;default:return El}}}function Il(e,t,n,r,i){let a=Fl(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function yee(){El.getSSRProps=({value:e})=>({value:e}),kl.getSSRProps=({value:e},t)=>{if(t.props&&De(t.props.value,e))return{checked:!0}},Dl.getSSRProps=({value:e},t)=>{if(p(e)){if(t.props&&Oe(e,t.props.value)>-1)return{checked:!0}}else if(h(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Pl.getSSRProps=(e,t)=>{if(typeof t.type!= ` string ` )return;let n=Fl(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var bee=[ ` ctrl ` , ` shift ` , ` alt ` , ` meta ` ],xee={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=> ` button ` in e&&e.button!==0,middle:e=> ` button ` in e&&e.button!==1,right:e=> ` button ` in e&&e.button!==2,exact:(e,t)=>bee.some(n=>e[ ` $ { n } Key ` ]&&!t.includes(n))},Ll=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join( ` . ` );return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=xee[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},See={esc: ` escape ` ,space: ` ` ,up: ` arrow - up ` ,left: ` arrow - left ` ,right: ` arrow - right ` ,down: ` arrow - down ` ,delete: ` backspace ` },Rl=(e,t)=>{let n=e._withKeys||={},r=t.join( ` . ` );return n[r]||(n[r]=(n=>{if(!( ` key ` in n))return;let r=ie(n.key);if(t.some(e=>e===r||See[e]===r))return e(n)}))},zl=l({patchProp: $ c}, $ s),Bl,Vl=!1;function Hl(){return Bl||=So(zl)}function Ul(){return Bl=Vl?Bl:Co(zl),Vl=!0,Bl}var Wl=((...e)=>{Hl().render(...e)}),Gl=((...e)=>{Ul().hydrate(...e)}),Kl=((...e)=>{let t=Hl().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Yl(e);if(!r)return;let i=t._component;!v(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent= ` ` );let a=n(r,!1,Jl(r));return r instanceof Element&&(r.removeAttribute( ` v - cloak ` ),r.setAttribute( ` data - v - app ` , ` ` )),a},
Line truncated
` )[0].slice(0,200)}catch{}return ` $ { e . status } $ { e . statusText } ` }var Mp;function Np(e){Mp=e}var Pp=class extends Error{status;constructor(e,t){super(e),this.name= ` ApiError ` ,this.status=t}};function Fp(e){let t=e instanceof Pp?e.status:void 0,n=e instanceof Error&&e.message?e.message: ` Action failed ` ;return t===401?{kind: ` session - expired ` ,message:n}:t!==void 0&&t>=400&&t<500?{kind: ` refused ` ,message:n}:{kind: ` broken ` ,message:n}}async function Ip(e,t){let n=await fetch(e,t);if(Mp?.(n.status===401),!n.ok)throw new Pp(await jp(n),n.status);return n}async function Lp(e,t={}){let{method:n= ` GET ` ,body:r,timeoutMs:i=kp,parse:a=!0}=t,o={Accept: ` application / json ` },s={method:n,headers:o,signal:AbortSignal.timeout(i)};n!== ` GET ` &&(o[ ` Content - Type ` ]= ` application / json ` ,o[ ` X - Archie - CSRF ` ]= ` 1 ` ),r!==void 0&&(s.body=JSON.stringify(r));let c=await Ip(e,s);return a?await c.json():void 0}var X={health:()=>Lp( ` / health / detailed ` ),services:()=>Lp( ` / api / services ` ),policies:()=>Lp( ` / api / access / policies ` ),putPolicy:e=>Lp( ` / api / access / policies ` ,{method: ` PUT ` ,body:e}),deletePolicy:e=>Lp( ` / api / access / policies ` ,{method: ` DELETE ` ,body:e,parse:!1}),orgs:()=>Lp( ` / api / orgs ` ),orgCreate:e=>Lp( ` / api / orgs ` ,{method: ` POST ` ,body:e}),org:e=>Lp( ` / api / orgs / $ { encodeURIComponent ( e ) } ` ),orgWorkspaces:e=>Lp( ` / api / orgs / $ { encodeURIComponent ( e ) } / workspaces ` ),createOrgWorkspace:(e,t)=>Lp( ` / api / orgs / $ { encodeURIComponent ( e ) } / workspaces ` ,{method: ` POST ` ,body:t}),orgMembers:e=>Lp( ` / api / orgs / $ { encodeURIComponent ( e ) } / members ` ),setOrgMember:(e,t,n)=>Lp( ` / api / orgs / $ { encodeURIComponent ( e ) } / members / $ { encodeURIComponent ( t ) } ` ,{method: ` PUT ` ,body:n}),removeOrgMember:(e,t,n)=>Lp( ` / api / orgs / $ { encodeURIComponent ( e ) } / members / $ { encodeURIComponent ( t ) } ` +Ap({workspace:n}),{method: ` DELETE ` ,parse:!1}),assignOrgAgent:(e,t)=>Lp( ` / api / orgs / $ { encodeURIComponent ( e ) } / agents / $ { encodeURIComponent ( t ) } ` ,{method: ` PUT ` }),summary:()=>Lp( ` / api / summary ` ),tasks:()=>Lp( ` / api / tasks ` ),taskPage:async e=>{let t=await Ip( ` / api / tasks ` +Ap(e),{headers:{Accept: ` application / json ` },signal:AbortSignal.timeout(kp)});return{tasks:await t.json(),next:t.headers.get( ` X - Next - Cursor ` )}},taskMeta:()=>Lp( ` / api / task - meta ` ),task:e=>Lp( ` / api / tasks / $ { encodeURIComponent ( e ) } ` ),taskAttempts:e=>Lp( ` / api / tasks / $ { encodeURIComponent ( e ) } / attempts ` ),taskChanges:(e,t)=>Lp( ` / api / tasks / $ { encodeURIComponent ( e ) } / changes ` +Ap(t)),taskDebug:(e,t)=>Lp( ` / api / tasks / $ { encodeURIComponent ( e ) } / debug ` +Ap(t)),taskAction:(e,t,n)=>Lp( ` / api / tasks / $ { encodeURIComponent ( e ) } / action ` ,{method: ` POST ` ,body:{action:t,...n}}),setup:()=>Lp( ` / api / setup ` ),capabilities:()=>Lp( ` / api / capabilities ` ),workflows:()=>Lp( ` / api / workflows ` ),workflowEnabled:(e,t)=>Lp( ` / api / workflows / $ { encodeURIComponent ( e ) } / enabled ` ,{method: ` PUT ` ,body:{enabled:t},parse:!1}),workRequest:e=>Lp( ` / api / work - requests ` ,{method: ` POST ` ,body:e}),skills:()=>Lp( ` / api / skills ` ),channels:()=>Lp( ` / api / channels ` ),curators:()=>Lp( ` / api / curators ` ),channelReload:e=>Lp( ` / api / channels / $ { encodeURIComponent ( e ) } / reload ` ,{method: ` POST ` ,body:{}}),config:()=>Lp( ` / api / config ` ),logs:e=>Lp( ` / api / logs ` +Ap(e)),taskLogs:(e,t)=>Lp( ` / api / tasks / $ { encodeURIComponent ( e ) } / logs ` +Ap(t)),taskLogDownloadURL:(e,t)=> ` / api / tasks / $ { encodeURIComponent ( e ) } / logs / download ` +(t==null? ` ` : ` ? attempt = $ { t } ` ),version:()=>Lp( ` / api / version ` ),updateSnapshot:()=>Lp( ` / api / chat / update ` ),updateInstall:e=>Lp( ` / api / chat / update / install ` ,{method: ` POST ` ,body:{snapshot:e},timeoutMs:9e5}),captures:e=>Lp( ` / api / captures ` +Ap({limit:e})),eventTypes:()=>Lp( ` / api / event - types ` ),eventTypeCreate:e=>Lp( ` / api / event - types ` ,{method: ` POST ` ,body:e}),eventTypeUpdate:(e,t)=>Lp( ` / api / event - types / $ { encodeURIComponent ( e ) } ` ,{method: ` PUT ` ,body:t}),eventTypeDelete:e=>Lp( ` / api / event - types / $ { encodeURIComponent ( e ) } ` ,{method: ` DELETE ` ,parse:!1}),mappings:()=>Lp( ` / api / mappings ` ),mappingCreate:e=>Lp( ` / api / mappings ` ,{method: ` POST ` ,body:e}),mappingUpdate:(e,t)=>Lp( ` / api / mappings / $ { encodeURIComponent ( e ) } ` ,{method: ` PATCH ` ,body:t}),mappingDelete:e=>Lp( ` / api / mappings / $ { encodeURIComponent ( e ) } ` ,{method: ` DELETE ` ,parse:!1}),mappingPreview:(e,t)=>Lp( ` / api / mappings / preview ` ,{method: ` POST ` ,body:{capture_id:e,fields:t}}),bindings:()=>Lp( ` / api / bindings ` ),dispatches:(e,t)=>Lp( ` / api / $ { e } / $ { encodeURIComponent ( t ) } / dispatches ` ),bindingCreate:e=>Lp( ` / api / bindings ` ,{method: ` POST ` ,body:e}),bindingUpdate:(e,t)=>Lp( ` / api / bindings / $ { encodeURIComponent ( e ) } ` ,{method: ` PATCH ` ,body:t}),bindingDelete:e=>Lp( ` / api / bindings / $ { encodeURIComponent ( e ) } ` ,{method: ` DELETE ` ,parse:!1}),bindingApprove:e=>Lp( ` / api / bindings / $ { encodeURIComponent ( e ) } / approve ` ,{method: ` POST ` }),bindingPause:e=>Lp( ` / api / bindings / $ { encodeURIComponent ( e ) } / pause ` ,{method: ` POST ` }),bindingResume:e=>Lp( ` / api / bindings / $ { encodeURIComponent ( e ) } / resume ` ,{method: ` POST ` }),harnessBindings:()=>Lp( ` / api / harness / bindings ` ),sources:()=>Lp( ` / api / sources ` ),sourceCreate:e=>Lp( ` / api / sources ` ,{method: ` POST ` ,body:{path:e}}),sourceSigning:(e,t)=>Lp( ` / api / sources / $ { encodeURIComponent ( e ) } / signing ` ,{method: ` POST ` ,body:{signed:t}}),sourceApproveUnsigned:e=>Lp( ` / api / sources / $ { encodeURIComponent ( e ) } / a Line truncated
` );u=r.pop()|| ` ` ;for(let e of r){let t=e.split( `
` ).find(e=>e.startsWith( ` data : ` ));if(!t)continue;let n=JSON.parse(t.slice(6));if(n.session_id&&(Qp.value=n.session_id),n.type=== ` delta ` &&(o+=n.text,rm.value=rm.value?{...rm.value,text:o}:null),(n.type=== ` tool ` ||n.type=== ` navigate ` )&&(a=[...a,n],rm.value=rm.value?{...rm.value,tools:a}:null),n.type=== ` done ` &&(s=!0,o||=n.text|| ` ` ),n.type=== ` error ` )throw Error(n.text)}if(t)break}if(!s)throw Error( ` chat stream ended before completion ` ); $ p.value=[... $ p.value,{from: ` assistant ` ,text:o,tool_calls:a}],rm.value=null,tm.value= ` Ready ` ,await vm()}catch(e){let t=e;t.name=== ` AbortError ` &&!c?(rm.value={text: ` Turn stopped . ` ,tools:a,isError:!1,turn:r,isRetry:i},tm.value= ` Stopped ` ):(rm.value={text: ` Unable to complete that turn : $ { t . message || t } ` ,tools:a,isError:!0,turn:r?qp(r):void 0,isRetry:i},tm.value= ` Error — retry available ` )}finally{clearTimeout(l),gm=null,nm.value=!1}}function Nee(){tm.value= ` Stopping … ` ,Qp.value&&X.chatCancel(Qp.value).catch(()=>{}),_m()}function Pee(){Vi(()=>{vm().catch(e=>{tm.value=e.message|| ` Chat unavailable ` })}),Gi(()=>{_m()})}var Fee=[ ` aria - label ` , ` title ` , ` aria - expanded ` , ` aria - controls ` ],Iee=I({__name: ` ChatFab ` ,props:{open:{type:Boolean}},emits:[ ` toggle ` ],setup(e,{emit:t}){let n=t;function r(e){return Y( ` col - start - 1 row - start - 1 grid place - items - center transition - [ opacity , transform ] duration - [ 140 ms ] ` ,e? ` opacity - 100 ` : ` - rotate - 45 scale - [ 0.7 ] opacity - 0 ` )}return(t,i)=>(B(),V( ` button ` ,{type: ` button ` ,class: ` relative z - 10 grid size - 14 cursor - pointer place - items - center rounded - full border border - border - strong bg - secondary text - primary shadow - [ var ( -- shadow - md ) ] transition - transform duration - [ 140 ms ] hover : - translate - y - px focus - visible : outline - 2 focus - visible : outline - offset - 2 focus - visible : outline - primary active : translate - y - 0 ` ,"aria-label":e.open? ` Close chat ` : ` Chat with Archie ` ,title:e.open? ` Close chat ` : ` Chat with Archie ` ,"aria-expanded":e.open,"aria-controls":N(Yp),onClick:i[0]||=e=>n( ` toggle ` )},[U( ` span ` ,{"aria-hidden": ` true ` ,class:A(r(!e.open))},[W(N(_d),{size:22})],2),U( ` span ` ,{"aria-hidden": ` true ` ,class:A(r(e.open))},[W(N(qd),{size:22})],2)],8,Fee))}});function wm(e){return typeof e== ` string ` ? ` '${e}' ` :new Ree().serialize(e)}var Lee= ` _ - , ; : ! ? . '"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Tm=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Lee.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Em(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&Tm[n]?Tm[n]:n+128,s=a<128&&Tm[a]?Tm[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var Ree=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?Em(e,t):n===`number`&&r===`number`?e-t:Em(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`' $ { e } ' ` ;case ` bigint ` :return ` $ { e } n ` ;case ` object ` :return this. $ object(e);case ` function ` :return this. $ function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!== ` [ object Object ] ` )return this.serializeBuiltInType(t.length<10? ` unknown : $ { t } ` :t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0? ` ` :n.name;if(r!== ` ` &&globalThis[r]===n)return this.serializeBuiltInType(r,e);if( ` toJSON ` in e&&typeof e.toJSON== ` function ` ){let t=e.toJSON();return r+(typeof t== ` object ` &&t?this. $ object(t): ` ( $ { this . serialize ( t ) } ) ` )}let i=Object.keys(e).sort(Em),a= ` $ { r } { ` ;for(let t=0;t<i.length;t++){let n=i[t];a+= ` $ { n } : $ { this . serialize ( e [ n ] ) } ` ,t<i.length-1&&(a+= ` , ` )}return a+ ` } ` }serializeBuiltInType(e,t){let n=this[ ` $ ` +e];if(n)return n.call(this,t);if(typeof t.entries== ` function ` )return this.serializeObjectEntries(e,t.entries());throw Error( ` Cannot serialize $ { e } ` )}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r= ` $ { e } { ` ;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+= ` $ { this . serialize ( t , ! 0 ) } : $ { this . serialize ( i ) } ` ,e<n.length-1&&(r+= ` , ` )}return r+ ` } ` } $ object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e, ` # $ { this . # e . size } ` ),t=this.serializeObject(e),this.#e.set(e,t)),t} $ function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)=== ` [ native code ] } ` ? ` $ { e . name || ` ` } ( ) [ native ] ` : ` $ { e . name } ( $ { e . length } ) $ { t . replace ( /\s*\n\s*/g , ` ` ) } ` } $ Array(e){let t= ` [ ` ;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+= ` , ` );return t+ ` ] ` } $ Date(e){try{return ` Date ( $ { e . toISOString ( ) } ) ` }catch{return ` Date ( null ) ` }} $ ArrayBuffer(e){return ` ArrayBuffer [ $ { new Uint8Array ( e ) . join ( ` , ` ) } ] ` } $ Set(e){return ` Set$ { this . $Array ( Array . from ( e ) . sort ( ( e , t ) => this . compare ( e , t ) ) ) } ` } $ Map(e){return this.serializeObjectEntries( ` Map ` ,e.entries())}}for(let t of[ ` Error ` , ` RegExp ` , ` URL ` ])e.prototype[ ` $ ` +t]=function(e){return ` $ { t } ( $ { e } ) ` };for(let t of[ ` Int8Array ` , ` Uint8Array ` , ` Uint8ClampedArray ` , ` Int16Array ` , ` Uint16Array ` , ` Int32Array ` , ` Uint32Array ` , ` Float32Array ` , ` Float Line truncated
` ).find(e=>e.startsWith( ` data : ` ));if(!t)continue;let n=JSON.parse(t.slice(6));if(n.session_id&&( $ p.value=n.session_id),n.type=== ` delta ` &&(o+=n.text,im.value=im.value?{...im.value,text:o}:null),(n.type=== ` tool ` ||n.type=== ` navigate ` )&&(a=[...a,n],im.value=im.value?{...im.value,tools:a}:null),n.type=== ` done ` &&(s=!0,o||=n.text|| ` ` ),n.type=== ` error ` )throw Error(n.text)}if(t)break}if(!s)throw Error( ` chat stream ended before completion ` );em.value=[...em.value,{from: ` assistant ` ,text:o,tool_calls:a}],im.value=null,nm.value= ` Ready ` ,await ym()}catch(e){let t=e;t.name=== ` AbortError ` &&!c?(im.value={text: ` Turn stopped . ` ,tools:a,isError:!1,turn:r,isRetry:i},nm.value= ` Stopped ` ):(im.value={text: ` Unable to complete that turn : $ { t . message || t } ` ,tools:a,isError:!0,turn:r?Jp(r):void 0,isRetry:i},nm.value= ` Error — retry available ` )}finally{clearTimeout(l),_m=null,rm.value=!1}}function Mee(){nm.value= ` Stopping … ` , $ p.value&&X.chatCancel( $ p.value).catch(()=>{}),vm()}function Nee(){Vi(()=>{ym().catch(e=>{nm.value=e.message|| ` Chat unavailable ` })}),Gi(()=>{vm()})}var Pee=[ ` aria - label ` , ` title ` , ` aria - expanded ` , ` aria - controls ` ],Fee=I({__name: ` ChatFab ` ,props:{open:{type:Boolean}},emits:[ ` toggle ` ],setup(e,{emit:t}){let n=t;function r(e){return Y( ` col - start - 1 row - start - 1 grid place - items - center transition - [ opacity , transform ] duration - [ 140 ms ] ` ,e? ` opacity - 100 ` : ` - rotate - 45 scale - [ 0.7 ] opacity - 0 ` )}return(t,i)=>(B(),V( ` button ` ,{type: ` button ` ,class: ` relative z - 10 grid size - 14 cursor - pointer place - items - center rounded - full border border - border - strong bg - secondary text - primary shadow - [ var ( -- shadow - md ) ] transition - transform duration - [ 140 ms ] hover : - translate - y - px focus - visible : outline - 2 focus - visible : outline - offset - 2 focus - visible : outline - primary active : translate - y - 0 ` ,"aria-label":e.open? ` Close chat ` : ` Chat with Archie ` ,title:e.open? ` Close chat ` : ` Chat with Archie ` ,"aria-expanded":e.open,"aria-controls":N(Xp),onClick:i[0]||=e=>n( ` toggle ` )},[U( ` span ` ,{"aria-hidden": ` true ` ,class:A(r(!e.open))},[W(N(vd),{size:22})],2),U( ` span ` ,{"aria-hidden": ` true ` ,class:A(r(e.open))},[W(N(Jd),{size:22})],2)],8,Pee))}});function Tm(e){return typeof e== ` string ` ? ` '${e}' ` :new Lee().serialize(e)}var Iee= ` _ - , ; : ! ? . '"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,Em=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[Iee.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Dm(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&Em[n]?Em[n]:n+128,s=a<128&&Em[a]?Em[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var Lee=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?Dm(e,t):n===`number`&&r===`number`?e-t:Dm(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`' $ { e } ' ` ;case ` bigint ` :return ` $ { e } n ` ;case ` object ` :return this. $ object(e);case ` function ` :return this. $ function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!== ` [ object Object ] ` )return this.serializeBuiltInType(t.length<10? ` unknown : $ { t } ` :t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0? ` ` :n.name;if(r!== ` ` &&globalThis[r]===n)return this.serializeBuiltInType(r,e);if( ` toJSON ` in e&&typeof e.toJSON== ` function ` ){let t=e.toJSON();return r+(typeof t== ` object ` &&t?this. $ object(t): ` ( $ { this . serialize ( t ) } ) ` )}let i=Object.keys(e).sort(Dm),a= ` $ { r } { ` ;for(let t=0;t<i.length;t++){let n=i[t];a+= ` $ { n } : $ { this . serialize ( e [ n ] ) } ` ,t<i.length-1&&(a+= ` , ` )}return a+ ` } ` }serializeBuiltInType(e,t){let n=this[ ` $ ` +e];if(n)return n.call(this,t);if(typeof t.entries== ` function ` )return this.serializeObjectEntries(e,t.entries());throw Error( ` Cannot serialize $ { e } ` )}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r= ` $ { e } { ` ;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+= ` $ { this . serialize ( t , ! 0 ) } : $ { this . serialize ( i ) } ` ,e<n.length-1&&(r+= ` , ` )}return r+ ` } ` } $ object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e, ` # $ { this . # e . size } ` ),t=this.serializeObject(e),this.#e.set(e,t)),t} $ function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)=== ` [ native code ] } ` ? ` $ { e . name || ` ` } ( ) [ native ] ` : ` $ { e . name } ( $ { e . length } ) $ { t . replace ( /\s*\n\s*/g , ` ` ) } ` } $ Array(e){let t= ` [ ` ;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+= ` , ` );return t+ ` ] ` } $ Date(e){try{return ` Date ( $ { e . toISOString ( ) } ) ` }catch{return ` Date ( null ) ` }} $ ArrayBuffer(e){return ` ArrayBuffer [ $ { new Uint8Array ( e ) . join ( ` , ` ) } ] ` } $ Set(e){return ` Set$ { this . $Array ( Array . from ( e ) . sort ( ( e , t ) => this . compare ( e , t ) ) ) } ` } $ Map(e){return this.serializeObjectEntries( ` Map ` ,e.entries())}}for(let t of[ ` Error ` , ` RegExp ` , ` URL ` ])e.prototype[ ` $ ` +t]=function(e){return ` $ { t } ( $ { e } ) ` };for(let t of[ ` Int8Array ` , ` Uint8Array ` , ` Uint8ClampedArray ` , ` Int16Array ` , ` Uint16Array ` , ` Int32Array ` , ` Uint32Array ` , ` Float32Array ` , ` Float Line truncated
` )].join( `
` ))}return()=>i.value||r.value||o.value?Fs(t.default({present:o.value})[0],{ref:e=>{let t=Xm(e);return t?.hasAttribute===void 0||(t?.hasAttribute( ` data - reka - popper - content - wrapper ` )?a.value=t.firstElementChild:a.value=t),t}}):null}}),mg=I({name: ` PrimitiveSlot ` ,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=fh(n.default()),r=e.findIndex(e=>e.type!==Go);if(r===-1)return e;let i=e[r];delete i.props?.ref;let a=i.props?q(t,i.props):t,o=as({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),hg=[ ` area ` , ` img ` , ` input ` ],gg=I({name: ` Primitive ` ,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default: ` div ` }},setup(e,{attrs:t,slots:n}){let r=e.asChild? ` template ` :e.as;return typeof r== ` string ` &&hg.includes(r)?()=>Fs(r,t):r=== ` template ` ?()=>Fs(mg,t,{default:n.default}):()=>Fs(e.as,t,{default:n.default})}});function _g(){let e=M();return{primitiveElement:e,currentElement:J(()=>[ ` # text ` , ` # comment ` ].includes(e.value?. $ el.nodeName)?e.value?. $ el.nextElementSibling:Xm(e))}}var[vg,yg]=jm( ` CollapsibleRoot ` ),bg=I({__name: ` CollapsibleRoot ` ,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[ ` update : open ` ],setup(e,{expose:t,emit:n}){let r=e,i=dh(r, ` open ` ,n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),{disabled:a,unmountOnHide:o}=vn(r);return yg({contentId: ` ` ,disabled:a,open:i,unmountOnHide:o,onOpenToggle:()=>{a.value||(i.value=!i.value)}}),t({open:i}),Z(),(e,t)=>(B(),H(N(gg),{as:e.as,"as-child":r.asChild,"data-state":N(i)? ` open ` : ` closed ` ,"data-disabled":N(a)? ` ` :void 0},{default:P(()=>[R(e. $ slots, ` default ` ,{open:N(i)})]),_:3},8,[ ` as ` , ` as - child ` , ` data - state ` , ` data - disabled ` ]))}}),xg=I({inheritAttrs:!1,__name: ` CollapsibleContent ` ,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[ ` contentFound ` ],setup(e,{emit:t}){let n=e,r=t,i=vg();i.contentId||=rg(void 0, ` reka - collapsible - content ` );let a=M(),{forwardRef:o,currentElement:s}=Z(),c=M(0),l=M(0),u=J(()=>i.open.value),d=M(u.value),f=M();F(()=>[u.value,a.value?.present],async()=>{await qn();let e=s.value;if(!e)return;f.value=f.value||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration= ` 0 s ` ,e.style.animationName= ` none ` ;let t=e.getBoundingClientRect();l.value=t.height,c.value=t.width,d.value||(e.style.transitionDuration=f.value.transitionDuration,e.style.animationName=f.value.animationName)},{immediate:!0});let p=J(()=>d.value&&i.open.value);return Vi(()=>{requestAnimationFrame(()=>{d.value=!1})}),Zm(s, ` beforematch ` ,e=>{requestAnimationFrame(()=>{i.onOpenToggle(),r( ` contentFound ` )})}),(e,t)=>(B(),H(N(pg),{ref_key: ` presentRef ` ,ref:a,present:e.forceMount||N(i).open.value,"force-mount":!0},{default:P(({present:t})=>[W(N(gg),q(e. $ attrs,{id:N(i).contentId,ref:N(o),"as-child":n.asChild,as:e.as,hidden:t?void 0:N(i).unmountOnHide.value? ` ` : ` until - found ` ,"data-state":p.value?void 0:N(i).open.value? ` open ` : ` closed ` ,"data-disabled":N(i).disabled?.value? ` ` :void 0,style:{"--reka-collapsible-content-height": ` $ { l . value } px ` ,"--reka-collapsible-content-width": ` $ { c . value } px ` }}),{default:P(()=>[!N(i).unmountOnHide.value||t?R(e. $ slots, ` default ` ,{key:0}):K( ` v - if ` ,!0)]),_:2},1040,[ ` id ` , ` as - child ` , ` as ` , ` hidden ` , ` data - state ` , ` data - disabled ` , ` style ` ])]),_:3},8,[ ` present ` ]))}}),Sg=I({__name: ` CollapsibleTrigger ` ,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default: ` button ` }},setup(e){let t=e;Z();let n=vg();return(e,r)=>(B(),H(N(gg),{type:e.as=== ` button ` ? ` button ` :void 0,as:e.as,"as-child":t.asChild,"aria-controls":N(n).contentId,"aria-expanded":N(n).open.value,"data-state":N(n).open.value? ` open ` : ` closed ` ,"data-disabled":N(n).disabled?.value? ` ` :void 0,disabled:N(n).disabled?.value,onClick:N(n).onOpenToggle},{default:P(()=>[R(e. $ slots, ` default ` )]),_:3},8,[ ` type ` , ` as ` , ` as - child ` , ` aria - controls ` , ` aria - expanded ` , ` data - state ` , ` data - disabled ` , ` disabled ` , ` onClick ` ]))}});function Cg({type:e,defaultValue:t,modelValue:n}){let r=n||t;return n!==void 0||t!==void 0?Array.isArray(r)? ` multiple ` : ` single ` :e?? ` single ` }function wg({type:e,defaultValue:t,modelValue:n}){return e||Cg({type:e,defaultValue:t,modelValue:n})}function Tg({type:e,defaultValue:t}){return t===void 0?e=== ` single ` ?void 0:[]:t}function Eg(e,t){let n=J(()=>wg(e)),r=dh(e, ` modelValue ` ,t,{defaultValue:Tg(e),passive:e.modelValue===void 0,deep:!0});function i(e){if(n.value=== ` single ` )r.value=Dm(e,r.value)?void 0:e;else{let t=Array.isArray(r.value)?[...r.value||[]]:[r.value].filter(Boolean);if(Fm(t,e)){let n=t.findIndex(t=>Dm(t,e));t.splice(n,1)}else t.push(e);r.value=t}}return{modelValue:r,changeModelValue:i,isSingle:J(()=>n.value=== ` single ` )}}var[Dg,Og]=jm( ` AccordionRoot ` ),kg=I({__name: ` AccordionRoot ` ,props:{collapsible:{type:Boolean,required:!
Line truncated
` ))}return()=>i.value||r.value||o.value?Is(t.default({present:o.value})[0],{ref:e=>{let t=Qm(e);return t?.hasAttribute===void 0||(t?.hasAttribute( ` data - reka - popper - content - wrapper ` )?a.value=t.firstElementChild:a.value=t),t}}):null}}),gg=I({name: ` PrimitiveSlot ` ,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=mh(n.default()),r=e.findIndex(e=>e.type!==Ko);if(r===-1)return e;let i=e[r];delete i.props?.ref;let a=i.props?q(t,i.props):t,o=os({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),_g=[ ` area ` , ` img ` , ` input ` ],vg=I({name: ` Primitive ` ,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default: ` div ` }},setup(e,{attrs:t,slots:n}){let r=e.asChild? ` template ` :e.as;return typeof r== ` string ` &&_g.includes(r)?()=>Is(r,t):r=== ` template ` ?()=>Is(gg,t,{default:n.default}):()=>Is(e.as,t,{default:n.default})}});function yg(){let e=M();return{primitiveElement:e,currentElement:J(()=>[ ` # text ` , ` # comment ` ].includes(e.value?. $ el.nodeName)?e.value?. $ el.nextElementSibling:Qm(e))}}var[bg,xg]=Mm( ` CollapsibleRoot ` ),Sg=I({__name: ` CollapsibleRoot ` ,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[ ` update : open ` ],setup(e,{expose:t,emit:n}){let r=e,i=ph(r, ` open ` ,n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),{disabled:a,unmountOnHide:o}=vn(r);return xg({contentId: ` ` ,disabled:a,open:i,unmountOnHide:o,onOpenToggle:()=>{a.value||(i.value=!i.value)}}),t({open:i}),Z(),(e,t)=>(B(),H(N(vg),{as:e.as,"as-child":r.asChild,"data-state":N(i)? ` open ` : ` closed ` ,"data-disabled":N(a)? ` ` :void 0},{default:P(()=>[R(e. $ slots, ` default ` ,{open:N(i)})]),_:3},8,[ ` as ` , ` as - child ` , ` data - state ` , ` data - disabled ` ]))}}),Cg=I({inheritAttrs:!1,__name: ` CollapsibleContent ` ,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[ ` contentFound ` ],setup(e,{emit:t}){let n=e,r=t,i=bg();i.contentId||=ag(void 0, ` reka - collapsible - content ` );let a=M(),{forwardRef:o,currentElement:s}=Z(),c=M(0),l=M(0),u=J(()=>i.open.value),d=M(u.value),f=M();F(()=>[u.value,a.value?.present],async()=>{await qn();let e=s.value;if(!e)return;f.value=f.value||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration= ` 0 s ` ,e.style.animationName= ` none ` ;let t=e.getBoundingClientRect();l.value=t.height,c.value=t.width,d.value||(e.style.transitionDuration=f.value.transitionDuration,e.style.animationName=f.value.animationName)},{immediate:!0});let p=J(()=>d.value&&i.open.value);return Vi(()=>{requestAnimationFrame(()=>{d.value=!1})}), $ m(s, ` beforematch ` ,e=>{requestAnimationFrame(()=>{i.onOpenToggle(),r( ` contentFound ` )})}),(e,t)=>(B(),H(N(hg),{ref_key: ` presentRef ` ,ref:a,present:e.forceMount||N(i).open.value,"force-mount":!0},{default:P(({present:t})=>[W(N(vg),q(e. $ attrs,{id:N(i).contentId,ref:N(o),"as-child":n.asChild,as:e.as,hidden:t?void 0:N(i).unmountOnHide.value? ` ` : ` until - found ` ,"data-state":p.value?void 0:N(i).open.value? ` open ` : ` closed ` ,"data-disabled":N(i).disabled?.value? ` ` :void 0,style:{"--reka-collapsible-content-height": ` $ { l . value } px ` ,"--reka-collapsible-content-width": ` $ { c . value } px ` }}),{default:P(()=>[!N(i).unmountOnHide.value||t?R(e. $ slots, ` default ` ,{key:0}):K( ` v - if ` ,!0)]),_:2},1040,[ ` id ` , ` as - child ` , ` as ` , ` hidden ` , ` data - state ` , ` data - disabled ` , ` style ` ])]),_:3},8,[ ` present ` ]))}}),wg=I({__name: ` CollapsibleTrigger ` ,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default: ` button ` }},setup(e){let t=e;Z();let n=bg();return(e,r)=>(B(),H(N(vg),{type:e.as=== ` button ` ? ` button ` :void 0,as:e.as,"as-child":t.asChild,"aria-controls":N(n).contentId,"aria-expanded":N(n).open.value,"data-state":N(n).open.value? ` open ` : ` closed ` ,"data-disabled":N(n).disabled?.value? ` ` :void 0,disabled:N(n).disabled?.value,onClick:N(n).onOpenToggle},{default:P(()=>[R(e. $ slots, ` default ` )]),_:3},8,[ ` type ` , ` as ` , ` as - child ` , ` aria - controls ` , ` aria - expanded ` , ` data - state ` , ` data - disabled ` , ` disabled ` , ` onClick ` ]))}});function Tg({type:e,defaultValue:t,modelValue:n}){let r=n||t;return n!==void 0||t!==void 0?Array.isArray(r)? ` multiple ` : ` single ` :e?? ` single ` }function Eg({type:e,defaultValue:t,modelValue:n}){return e||Tg({type:e,defaultValue:t,modelValue:n})}function Dg({type:e,defaultValue:t}){return t===void 0?e=== ` single ` ?void 0:[]:t}function Og(e,t){let n=J(()=>Eg(e)),r=ph(e, ` modelValue ` ,t,{defaultValue:Dg(e),passive:e.modelValue===void 0,deep:!0});function i(e){if(n.value=== ` single ` )r.value=Om(e,r.value)?void 0:e;else{let t=Array.isArray(r.value)?[...r.value||[]]:[r.value].filter(Boolean);if(Im(t,e)){let n=t.findIndex(t=>Om(t,e));t.splice(n,1)}else t.push(e);r.value=t}}return{modelValue:r,changeModelValue:i,isSingle:J(()=>n.value=== ` single ` )}}var[kg,Ag]=Mm( ` AccordionRoot ` ),jg=I({__name: ` AccordionRoot ` ,props:{collapsible:{type:Boolean,required:!
Line truncated
- a positive number
- less than the value passed to \ ` max \` (or ${ sS } if no \` max \` prop is set)
- less than the value passed to \ ` max \` (or ${ lS } if no \` max \` prop is set)
- \ ` null \` or \` undefined \` if the progress is indeterminate.
Defaulting to \ ` null \` . ` ) , null ) } function fS ( e ) { return uS ( e ) && ! Number . isNaN ( e ) && e > 0 ? e : ( console . error ( ` Invalid prop \` max \` of value \` ${ e } \` supplied to \` ProgressRoot \` . Only numbers greater than 0 are valid max values. Defaulting to \` ${ sS } \` . ` ) , sS ) } var pS = I ( { _ _name : ` ProgressRoot ` , props : { modelValue : { type : [ Number , null ] , required : ! 1 } , max : { type : Number , required : ! 1 , default : sS } , getValueLabel : { type : Function , required : ! 1 , default : ( e , t ) => uS ( e ) ? ` ${ Math . round ( e / t * sS ) } % ` : void 0 } , getValueText : { type : Function , required : ! 1 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , emits : [ ` update:modelValue ` , ` update:max ` ] , setup ( e , { emit : t } ) { let n = e , r = t ; Z ( ) ; let i = dh ( n , ` modelValue ` , r , { passive : n . modelValue === void 0 } ) , a = dh ( n , ` max ` , r , { passive : n . max === void 0 } ) ; F ( ( ) => i . value , async e => { let t = dS ( e , n . max ) ; t !== e && ( await qn ( ) , i . value = t ) } , { immediate : ! 0 } ) , F ( ( ) => n . max , e => { let t = fS ( n . max ) ; t !== e && ( a . value = t ) } , { immediate : ! 0 } ) ; let o = J ( ( ) => Pm ( i . value ) ? ` indeterminate ` : i . value === a . value ? ` complete ` : ` loading ` ) ; return lS ( { modelValue : i , max : a , progressState : o } ) , ( e , t ) => ( B ( ) , H ( N ( gg ) , { "as-child" : e . asChild , as : e . as , "aria-valuemax" : N ( a ) , "aria-valuemin" : 0 , "aria-valuenow" : uS ( N ( i ) ) ? N ( i ) : void 0 , "aria-valuetext" : e . getValueText ? . ( N ( i ) , N ( a ) ) , "aria-label" : e . getValueLabel ( N ( i ) , N ( a ) ) , role : ` progressbar ` , "data-state" : o . value , "data-value" : N ( i ) ? ? void 0 , "data-max" : N ( a ) } , { default : P ( ( ) => [ R ( e . $slots , ` default ` , { modelValue : N ( i ) } ) ] ) , _ : 3 } , 8 , [ ` as-child ` , ` as ` , ` aria-valuemax ` , ` aria-valuenow ` , ` aria-valuetext ` , ` aria-label ` , ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , mS = I ( { _ _name : ` ProgressIndicator ` , props : { asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , setup ( e ) { let t = e , n = cS ( ) ; return Z ( ) , ( e , r ) => ( B ( ) , H ( N ( gg ) , q ( t , { "data-state" : N ( n ) . progressState . value , "data-value" : N ( n ) . modelValue ? . value ? ? void 0 , "data-max" : N ( n ) . max . value } ) , { default : P ( ( ) => [ R ( e . $slots , ` default ` ) ] ) , _ : 3 } , 16 , [ ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , hS = ` radio.select ` ; function gS ( e , t , n ) { Nm ( hS , n , { originalEvent : e , value : t } ) } var _S = I ( { inheritAttrs : ! 1 , _ _name : ` Radio ` , props : { id : { type : String , required : ! 1 } , value : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , checked : { type : Boolean , required : ! 1 , default : void 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 , default : ` button ` } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 } } , emits : [ ` update:checked ` , ` select ` ] , setup ( e , { emit : t } ) { let n = e , r = t , i = dh ( n , ` checked ` , r , { passive : n . checked === void 0 } ) , { value : a } = vn ( n ) , { forwardRef : o , currentElement : s } = Z ( ) , c = Fh ( s ) , l = Rh ( ) , u = J ( ( ) => n . id && s . value ? document . querySelector ( ` [for=" ${ n . id } "] ` ) ? . innerText : void 0 ) ; function d ( e ) { n . disabled || gS ( e , n . value , e => { r ( ` select ` , e ) , ! e ? . defaultPrevented && ( i . value = ! 0 , c . value && e . stopPropagation ( ) ) } ) } return ( e , t ) => ( B ( ) , V ( z , null , [ W ( N ( gg ) , q ( { id : e . id , ref : N ( o ) , role : ` radio ` , type : e . as === ` button ` ? ` button ` : void 0 , as : e . as , "aria-checked" : N ( i ) ? ? ! 1 , "aria-label" : u . value , "as-child" : e . asChild , disabled : e . disabled ? ` ` : void 0 , "data-state" : N ( i ) ? ` checked ` : ` unchecked ` , "data-disabled" : e . disabled ? ` ` : void 0 , value : N ( a ) , required : e . required , name : e . name } , { ... N ( l ) , ... e . $attrs } , { onClick : Il ( d , [ ` stop ` ] ) } ) , { default : P ( ( ) => [ R ( e . $slots , ` default ` , { checked : N ( i ) } ) ] ) , _ : 3 } , 16 , [ ` id ` , ` type ` , ` as ` , ` aria-checked ` , ` aria-label ` , ` as-child ` , ` disabled ` , ` data-state ` , ` data-disabled ` , ` value ` , ` required ` , ` name ` ] ) , N ( c ) && e . name ? ( B ( ) , H ( N ( G _ ) , q ( { key : 0 , type : ` radio ` , tabindex : ` -1 ` , value : N ( a ) , checked : ! ! N ( i ) , name : e . name , disabled : e . disabled , required : e . required } , N ( l ) ) , null , 16 , [ ` value ` , ` checked ` , ` name ` , ` disabled ` , ` required ` ] ) ) : K ( ` v-if ` , ! 0 ) ] , 64 ) ) } } ) , [ vS , yS ] = jm ( ` RadioGroupRoot ` ) , bS = I ( { _ _name : ` RadioGroupRoot ` , props : { modelValue : { type : null , required : ! 1 } , defaultValue : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , orientation : { type : String , required : ! 1 , default : void 0 } , dir : { type : String , required : ! 1 } , loop : { type : Boolean , required : ! 1 , default : ! 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 , default : ! 1 } } , emits : [ ` update:modelValue ` ] , setup ( e , { emit : t } ) { let n = e , r = t , { forwardRef : i , currentElement : a } = Z ( ) , o = dh ( n , ` modelValue ` , r , { defaultValue : n . defaultValue , passive : n . modelValue === void 0 } ) , { disabled : s , loop : c , orientation : l , name : u , required : d , dir : f } = vn ( n ) , p = Ah ( f ) , m = Fh ( a ) ; return yS ( { modelValue : o , changeModelValue : e => { o . value = e } , disabled : s , loop : c , orientation : l , name : u ? . value , required : d } ) , ( e , t ) => ( B ( ) , H ( N ( Db ) , { "as-child" : ` ` , orientation : N ( l ) , dir : N ( p ) , loop : N ( c ) } , { default : P ( ( ) => [ W ( N ( gg ) , { ref : N ( i ) , role : ` radiogroup ` , "data-disabled" : N ( s ) ? ` ` : void 0 , "as-child" : e . asChild , as : e . as , "aria-orientation" : N ( l ) , "aria-required" : N ( d ) , dir : N ( p ) } , { default : P ( ( ) => [ R ( e . $slots , ` default ` , { modelValue : N ( o ) } ) , N ( m ) && N ( u ) ? ( B ( ) , H ( N ( G _ ) , { key : 0 , required : N ( d ) , disabled : N ( s ) , value : N ( o ) , name : N ( u ) } , null , 8 , [ ` required ` , ` disabled ` , ` value ` , ` name ` ] ) ) : K ( ` v-if ` , ! 0 ) ] ) , _ : 3 } , 8 , [ ` data-disabled ` , ` as-child ` , ` as ` , ` aria-orientation ` , ` aria-required ` , ` dir ` ] ) ] ) , _ : 3 } , 8 , [ ` orientation ` , ` dir ` , ` loop ` ] ) ) } } ) , [ Xee , xS ] = jm ( ` RadioGroupItem ` ) , SS = I ( { inheritAttrs : ! 1 , _ _name : ` RadioGroupItem ` , props : { id : { type : String , required : ! 1 } , value : { type : nu Line truncated
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:V T(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>V T(e))}),null)};for(let e=0;e<n.length;e++){let c=n[e];if(c.startsWith(" ` ` ` " ) ) { o ( ) , s ( ) , a ? ( t . push ( { kind : ` pre ` , code : a . join ( `
` )}),a=null):a=[];continue}if(a){a.push(c);continue}let l=H T(c),u=e+1<n.length?H T(n[e+1]):null;if(l&&u&&O te(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=H T(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>V T(e)),rows:r.map(e=>e.map(e=>V T(e)))});continue}if(!c.trim()){o(),s();continue}let d=c.match(/^(#{1,3}) \s +(.+) $ /);if(d){o(),s(),t.push({kind: ` h$ { d [ 1 ] . length } ` ,inline:V T(d[2])});continue}let f=c.match(/^ \s *[-*] \s +(.+) $ /),p=c.match(/^ \s * \d +[.)] \s +(.+) $ /);if(f||p){o();let e=p? ` ol ` : ` ul ` ;(!i||i.tag!==e)&&(s(),i={tag:e,items:[]}),i.items.push((f||p)[1]);continue}if(c.startsWith( ` > ` )){o(),s(),t.push({kind: ` blockquote ` ,inline:V T(c.replace(/^> \s ?/, ` ` ))});continue}r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function HT(e){let t=String(e|| ` ` ).trim();if(!t.includes( ` | ` ))return null;let n=t.replace(/^ \| /, ` ` ).replace(/ \| $ /, ` ` ).split( ` | ` ).map(e=>e.trim());return n.length>1&&n.every(e=>e!== ` ` )?n:null}function Ote(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var kte={class: ` [ overflow - wrap : anywhere ] ` },Ate={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },jte={class: ` font - mono text - [ 0.85 em ] ` },Mte={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },Nte={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Pte={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Fte={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },Ite={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },Lte={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },Rte={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },zte={key:8,class: ` mb - 2.5 last : mb - 0 ` },Bte=I({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=J(()=>Dte(t.text));return(e,t)=>(B(),V( ` div ` ,kte,[(B(!0),V(z,null,L(n.value,(e,t)=>(B(),V(z,{key:t},[e.kind=== ` pre ` ?(B(),V( ` pre ` ,Ate,[U( ` code ` ,jte,j(e.code),1)])):e.kind=== ` table ` ?(B(),V( ` table ` ,Mte,[U( ` thead ` ,null,[U( ` tr ` ,null,[(B(!0),V(z,null,L(e.head,(e,t)=>(B(),V( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[W(BT,{inline:e},null,8,[ ` inline ` ])]))),128))])]),U( ` tbody ` ,null,[(B(!0),V(z,null,L(e.rows,(e,t)=>(B(),V( ` tr ` ,{key:t},[(B(!0),V(z,null,L(e,(e,t)=>(B(),V( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[W(BT,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(B(),V( ` blockquote ` ,Nte,[W(BT,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(B(),V( ` h1 ` ,Pte,[W(BT,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(B(),V( ` h2 ` ,Fte,[W(BT,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(B(),V( ` h3 ` ,Ite,[W(BT,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(B(),V( ` ul ` ,Lte,[(B(!0),V(z,null,L(e.items,(e,t)=>(B(),V( ` li ` ,{key:t},[W(BT,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(B(),V( ` ol ` ,Rte,[(B(!0),V(z,null,L(e.items,(e,t)=>(B(),V( ` li ` ,{key:t},[W(BT,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(B(),V( ` p ` ,zte,[W(BT,{inline:e.inline},null,8,[ ` inline ` ])])):K( ` ` ,!0)],64))),128))]))}}),Vte={class: ` truncate ` },Hte=I({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=Qi( ` RouterLink ` );return B(),H(r,{to:e.path,title: ` Go to $ { e . label || e . path } ` ,class: ` inline - flex max - w - full items - center gap - 1.5 rounded - full border border - primary / 45 bg - primary - soft px - 2.5 py - 1 text - xs font - semibold text - link transition - colors hover : border - primary hover : bg - primary / 15 focus - visible : outline - 2 focus - visible : outline - offset - 2 focus - visible : outline - primary ` },{default:P(()=>[W(N(Gu),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),U( ` span ` ,Vte,j(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),Ute={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },Wte={class: ` font - semibold text - foreground ` },Gte={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },Kte=I({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=J(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=J(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=J(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=J(()=>t.tool.summary||t.tool.Summary||t.tool.text||t.tool.err||t.tool.Err||(t.streaming?i.value? ` failed ` : ` running … ` : ` done ` ));return(t,o)=>e.tool.path?(B(),H(Hte,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(B(),V( ` div ` ,Ute,[W(N(Kd),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),U( ` span ` ,Wte,j(n.value),1),r.value?(B(),V( ` code ` ,Gte,j(r.value),1)):K( ` ` ,!0),U( ` span ` ,{class:A(N(Y)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},j(a.value),3)]))}}),qte={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },Jte={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },Yte={key:3,class: ` whitespace - pre - wrap ` },UT=I({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(B(),V( ` div ` ,{class:A([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[U( ` div ` ,{class:A(N(Y)( ` max - w - [ min ( 78 ch , 86 % ) ] rounded - [ 0.85 rem ] px - 4 py - 3 leading - normal [ overflow - wrap : anywhere ] ` ,e.assistant? ` bg - muted ` : ` bg - primary / 15 ` ))},[e.assistant&&e.tools.length?(B(),V( ` div ` ,qte,[(B(!0),V(z,null,L(e.tools,(t,n)=>(B(),H(Kte,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):K( ` ` ,!0),e.media.length?(B(),V( ` div ` ,Jte,[(B(!0),V(z,null,L(e.media,(e,t)=>(B(),H(yte,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):K( ` ` ,!0),e.assistant?(B(),H(Bte,{key:2,text:e.text},null,8,[ ` text ` ])):(B(),V( ` div ` ,Yte,j(e.text),1)),R(t. $ slots, ` default ` )],2)],2))}}),Xte={class: ` w - full self - center justify - self - center py - 6 text - center ` },Zte={class: ` grid gap - 2 ` },Qte=[ ` onC Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>jA? ` $ { n . slice ( 0 , jA ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var NA=[ ` title ` ],PA=I({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=J(()=>iA(n.event)),a=J(()=>MA(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=J(()=>n.event.at?fk(n.event.at): ` — ` );return(e,t)=>(B(),H(N(OA),{class:A(i.value>0? ` cursor - pointer ` : ` ` ),role:i.value>0? ` link ` :void 0,tabindex:i.value>0?0:void 0,title:i.value>0? ` Open task details ` :void 0,onClick:o,onKeydown:[Ll(Il(o,[ ` prevent ` ]),[ ` enter ` ]),Ll(Il(o,[ ` prevent ` ]),[ ` space ` ])]},{default:P(()=>[W(N( $ ),{class: ` font - medium ` },{default:P(()=>[G(j(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),W(N( $ ),{class: ` font - mono ` },{default:P(()=>[G(j(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),W(N( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:P(()=>[U( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},j(a.value.text),9,NA)]),_:1}),W(N( $ ),null,{default:P(()=>[G(j(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),FA=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function IA(e){return(Number(e?.task_id)||0)>0}function LA(e,t){return t=== ` tasks ` ?IA(e):t!== ` system ` ||!IA(e)}function RA(e,t){return e.filter(e=>LA(e,t))}function zA(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function BA(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function VA(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=BA(MA(n).text,r),a=t[t.length-1];if(a&&a.key===i){a.count+=1,a.events.push(n);continue}t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var HA={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },UA={class: ` max - h - [ 28 rem ] overflow - y - auto ` },WA=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],GA=[ ` title ` ],KA=I({__name: ` LiveActivityCard ` ,setup(e){let t=iE(),{activity:n,streamKind:r,streamState:i}=Au(mO()),a=M( ` all ` ),o=J(()=>RA(n.value,a.value)),s=J(()=>zA(o.value.length,a.value)),c=Jt(new Set),l=J(()=>VA(o.value));function u(e){c.has(e)?c.delete(e):c.add(e)}function d(e){return c.has(e.key)}function f(e){return MA(e.representative)}function p(e){return e.representative.at?fk(e.representative.at): ` — ` }function m(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(B(),H(N(ak),null,{default:P(()=>[W(N(uk),null,{default:P(()=>[W(N(dk),null,{default:P(()=>[...t[1]||=[G( ` Live activity ` ,-1)]]),_:1}),W(N(ok),{class: ` flex items - center gap - 2 ` },{default:P(()=>[W(N(wA),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:N(FA)},null,8,[ ` modelValue ` , ` options ` ]),W(N(nk),{variant:N(r)},{default:P(()=>[G(j(N(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),W(N(sk),null,{default:P(()=>[U( ` div ` ,HA,[U( ` div ` ,UA,[W(N(EA),null,{default:P(()=>[W(N(AA),{class: ` sticky top - 0 z - 10 bg - card ` },{default:P(()=>[W(N(OA),null,{default:P(()=>[W(N(kA),null,{default:P(()=>[...t[2]||=[G( ` Event ` ,-1)]]),_:1}),W(N(kA),null,{default:P(()=>[...t[3]||=[G( ` Task ` ,-1)]]),_:1}),W(N(kA),null,{default:P(()=>[...t[4]||=[G( ` Detail ` ,-1)]]),_:1}),W(N(kA),null,{default:P(()=>[...t[5]||=[G( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),W(N(DA),null,{default:P(()=>[o.value.length?K( ` ` ,!0):(B(),H(N(OA),{key:0},{default:P(()=>[W(N( $ ),{colspan: ` 4 ` },{default:P(()=>[W(N(JO),null,{default:P(()=>[W(N(ZO),null,{default:P(()=>[W(N(ek),null,{default:P(()=>[G(j(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(B(!0),V(z,{key:1},L(l.value,e=>(B(),V(z,{key:e.key},[e.count===1?(B(),H(PA,{key:0,event:e.representative,onOpen:m},null,8,[ ` event ` ])):(B(),V(z,{key:1},[W(N(OA),{class:A(e.taskID>0? ` cursor - pointer ` : ` ` ),role:e.taskID>0? ` link ` :void 0,tabindex:e.taskID>0?0:void 0,title:e.taskID>0? ` Open task details ` :void 0,onClick:t=>e.taskID>0&&m(e.taskID),onKeydown:[Ll(Il(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),Ll(Il(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:P(()=>[W(N( $ ),{class: ` font - medium ` },{default:P(()=>[U( ` button ` ,{type: ` button ` ,class: ` inline - flex items - center gap - 1 rounded hover : opacity - 80 ` ,"aria-expanded":d(e),"aria-label": ` $ { d ( e ) ? ` Hide ` : ` Show ` } $ { e . count } $ { e . label } events ` ,onClick:Il(t=>u(e.key),[ ` stop ` ])},[d(e)?(B(),H(N(Qu),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(B(),H(N( $ u),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),G( ` ` +j(e.label)+ ` ` ,1),W(N(nk),{variant: ` idle ` },{default:P(()=>[G( ` × ` +j(e.count),1)]),_:2},1024)],8,WA)]),_:2},1024),W(N( $ ),{class: ` font - mono ` },{default:P(()=>[G(j(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),W(N( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:P(()=>[U( ` span ` ,{class: ` block truncate ` ,title:f(e).truncated?f(e).full:void 0},j(f(e).text),9,GA)]),_:2},1024),W(N( $ ),null,{default:P(()=>[G(j(p(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),d(e)?(B(!0),V(z,{key:0},L(e.events,(t,n)=>(B(),H(PA,{key: ` $ { e . key } : $ { n } ` ,event:t,onO
Line truncated
` )){let e=n.indexOf( ` : ` );if(e<=0)continue;let r=n.slice(0,e).trim();r&&(t[r]=n.slice(e+1).trim())}return t}function pM(e,t){if(!e.event_type)return{label: ` Unidentified ` ,identified:!1};let n=t.find(t=>t.id===e.event_type);return{label:n?n.name: ` Deleted type ` ,identified:!0}}function mM(e,t){if(!e)return ` No event type ` ;let n=t.find(t=>t.id===e);return n? ` $ { n . source } / $ { n . name } ` : ` Deleted type ` }function hM(e){let t=[...(e.headers||[]).map(e=> ` $ { e . name } = $ { e . value } ` ),...(e.payload||[]).map(e=>e.op=== ` present ` ? ` $ { e . path } present ` : ` $ { e . path } = $ { e . value ? ? ` ` } ` )];return t.length?t.join( ` · ` ): ` any event ` }function gM(e){return{headers:(e.headers||[]).filter(e=>e.name.trim()!== ` ` ).map(e=>({name:e.name.trim(),value:e.value})),payload:(e.payload||[]).filter(e=>e.path.trim()!== ` ` ).map(e=>e.op=== ` present ` ?{path:e.path.trim(),op:e.op}:{path:e.path.trim(),op:e.op,value:e.value?? ` ` })}}var _M=M([]),vM=M([]),yM=M(!0),bM=M(null),xM=M(null),SM=M(!1),CM=M(null);async function wM(){try{let e=await X.eventTypes();yM.value=e.enabled!==!1,_M.value=e.event_types||[],vM.value=e.proposals||[],bM.value=null}catch(e){bM.value=e.message||String(e)}}function TM(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function EM(e){CM.value=null,xM.value=e}function DM(e){let t=FM.value.find(t=>String(t.id)===e.sample_id);EM({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:TM(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function OM(e= ` ` ){EM({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function kM(e){EM({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:TM(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function AM(){xM.value=null}async function jM(){let e=xM.value;if(e){SM.value=!0;try{if(e.mode=== ` edit ` &&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:gM(e.rule)});else{let t=e.mode=== ` paste ` ?fM(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:gM(e.rule),example:{headers:t,body:e.body}})}xM.value=null,await wM()}catch(e){CM.value=e.message||String(e)}finally{SM.value=!1}}}var MM=M(null);async function NM(){let e=MM.value;if(MM.value=null,e)try{await X.eventTypeDelete(e.id),await wM()}catch(e){bM.value=e.message||String(e)}}var PM=100,FM=M([]),IM=M(!0),LM=M(null),RM=M(!0),zM=M(null);async function BM(){try{let e=await X.captures(PM);IM.value=e.enabled!==!1,FM.value=e.captures||[],LM.value=null}catch(e){LM.value=e.message||String(e)}finally{RM.value=!1}}function VM(e){let t=FM.value.find(t=>t.id===e);return t&&(zM.value=t),!!t}function HM(){FM.value.length&&(zM.value=FM.value[0])}function UM(){hO( ` captures ` ,()=>{BM(),wM()})}var WM={key:0,class: ` text - xs text - fg - muted ` },GM={key:1,class: ` flex flex - col gap - 1 text - xs ` },KM={key:1},qM={key:2,class: ` text - xs text - fg - muted ` },JM=I({__name: ` DispatchLinks ` ,props:{kind:{},id:{}},setup(e){let t=e,n=M([]),r=M(!1);F(()=>[t.kind,t.id],async()=>{r.value=!1;try{n.value=await X.dispatches(t.kind,t.id)}catch{n.value=[],r.value=!0}},{immediate:!0});let i=e=>({path: ` / events ` ,query:{tab: ` inspector ` ,capture:e}});return(e,a)=>{let o=Qi( ` RouterLink ` );return r.value?(B(),V( ` p ` ,WM, ` Dispatches unavailable . ` )):n.value.length?(B(),V( ` ul ` ,GM,[(B(!0),V(z,null,L(n.value,e=>(B(),V( ` li ` ,{key:e.binding_id+e.capture_id,class: ` flex flex - wrap items - center gap - x - 2 font - mono text - fg - muted ` },[t.kind=== ` bindings ` ?K( ` ` ,!0):(B(),H(o,{key:0,to:{path: ` / events ` ,query:{tab: ` bindings ` }},class: ` hover : text - foreground ` },{default:P(()=>[G( ` binding ` +j(e.binding_id.slice(0,8))+ ` v ` +j(e.binding_version),1)]),_:2},1024)),t.kind=== ` captures ` ?K( ` ` ,!0):(B(),H(o,{key:1,to:i(e.capture_id),class: ` hover : text - foreground ` },{default:P(()=>[G( ` capture ` +j(e.capture_id.slice(0,8)),1)]),_:2},1032,[ ` to ` ])),t.kind=== ` tasks ` ?K( ` ` ,!0):(B(),V(z,{key:2},[e.task_id?(B(),H(o,{key:0,to: ` / tasks / $ { e . task _id } ` ,class: ` text - foreground hover : underline ` },{default:P(()=>[G( ` task # ` +j(e.task_id),1)]),_:2},1032,[ ` to ` ])):(B(),V( ` span ` ,KM,j(e.reason|| ` claimed , no task recorded ` ),1))],64)),U( ` span ` ,null,j(N(fk)(e.dispatched_at)),1)]))),128))])):t.kind=== ` tasks ` ?K( ` ` ,!0):(B(),V( ` p ` ,qM, ` No dispatches yet . ` ))}}}),YM=I({__name: ` Spinner ` ,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,n)=>(B(),H(N(pd),{role: ` status ` ,"aria-label": ` Loading ` ,class:A(N(Y)( ` size - 4 animate - spin ` ,t.class))},null,8,[ ` class ` ]))}});function XM(e,t){return t?e.filter(e=>e.event_type_id===t):[]}function ZM(e){return(e?.repository?? ` required ` )!== ` none ` }function QM(e,t){return e.filter(e=>t=== ` any ` ||e.type=== ` any ` ||e.type===t)}function $ M(e,t){switch(t){case ` string ` :return e;case ` number ` :return e.trim()!== ` ` &&!Number.isNaN(Number(e))?Number(e):e;case ` bool ` :return e=== ` true ` ||e!== ` false ` &&e;default:try{return JSON.parse(e)}catch{return e}}}var eN={pending_approval: ` pending approval ` ,armed: ` armed ` ,paused: ` paused ` },tN={pending_approval: ` warn ` ,armed: ` ok ` ,paused: ` idle ` };function nN(e)
Line truncated
Defaulting to \ ` null \` . ` ) , null ) } function mS ( e ) { return fS ( e ) && ! Number . isNaN ( e ) && e > 0 ? e : ( console . error ( ` Invalid prop \` max \` of value \` ${ e } \` supplied to \` ProgressRoot \` . Only numbers greater than 0 are valid max values. Defaulting to \` ${ lS } \` . ` ) , lS ) } var hS = I ( { _ _name : ` ProgressRoot ` , props : { modelValue : { type : [ Number , null ] , required : ! 1 } , max : { type : Number , required : ! 1 , default : lS } , getValueLabel : { type : Function , required : ! 1 , default : ( e , t ) => fS ( e ) ? ` ${ Math . round ( e / t * lS ) } % ` : void 0 } , getValueText : { type : Function , required : ! 1 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , emits : [ ` update:modelValue ` , ` update:max ` ] , setup ( e , { emit : t } ) { let n = e , r = t ; Z ( ) ; let i = ph ( n , ` modelValue ` , r , { passive : n . modelValue === void 0 } ) , a = ph ( n , ` max ` , r , { passive : n . max === void 0 } ) ; F ( ( ) => i . value , async e => { let t = pS ( e , n . max ) ; t !== e && ( await qn ( ) , i . value = t ) } , { immediate : ! 0 } ) , F ( ( ) => n . max , e => { let t = mS ( n . max ) ; t !== e && ( a . value = t ) } , { immediate : ! 0 } ) ; let o = J ( ( ) => Fm ( i . value ) ? ` indeterminate ` : i . value === a . value ? ` complete ` : ` loading ` ) ; return dS ( { modelValue : i , max : a , progressState : o } ) , ( e , t ) => ( B ( ) , H ( N ( vg ) , { "as-child" : e . asChild , as : e . as , "aria-valuemax" : N ( a ) , "aria-valuemin" : 0 , "aria-valuenow" : fS ( N ( i ) ) ? N ( i ) : void 0 , "aria-valuetext" : e . getValueText ? . ( N ( i ) , N ( a ) ) , "aria-label" : e . getValueLabel ( N ( i ) , N ( a ) ) , role : ` progressbar ` , "data-state" : o . value , "data-value" : N ( i ) ? ? void 0 , "data-max" : N ( a ) } , { default : P ( ( ) => [ R ( e . $slots , ` default ` , { modelValue : N ( i ) } ) ] ) , _ : 3 } , 8 , [ ` as-child ` , ` as ` , ` aria-valuemax ` , ` aria-valuenow ` , ` aria-valuetext ` , ` aria-label ` , ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , gS = I ( { _ _name : ` ProgressIndicator ` , props : { asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , setup ( e ) { let t = e , n = uS ( ) ; return Z ( ) , ( e , r ) => ( B ( ) , H ( N ( vg ) , q ( t , { "data-state" : N ( n ) . progressState . value , "data-value" : N ( n ) . modelValue ? . value ? ? void 0 , "data-max" : N ( n ) . max . value } ) , { default : P ( ( ) => [ R ( e . $slots , ` default ` ) ] ) , _ : 3 } , 16 , [ ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , _S = ` radio.select ` ; function vS ( e , t , n ) { Pm ( _S , n , { originalEvent : e , value : t } ) } var yS = I ( { inheritAttrs : ! 1 , _ _name : ` Radio ` , props : { id : { type : String , required : ! 1 } , value : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , checked : { type : Boolean , required : ! 1 , default : void 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 , default : ` button ` } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 } } , emits : [ ` update:checked ` , ` select ` ] , setup ( e , { emit : t } ) { let n = e , r = t , i = ph ( n , ` checked ` , r , { passive : n . checked === void 0 } ) , { value : a } = vn ( n ) , { forwardRef : o , currentElement : s } = Z ( ) , c = Lh ( s ) , l = Bh ( ) , u = J ( ( ) => n . id && s . value ? document . querySelector ( ` [for=" ${ n . id } "] ` ) ? . innerText : void 0 ) ; function d ( e ) { n . disabled || vS ( e , n . value , e => { r ( ` select ` , e ) , ! e ? . defaultPrevented && ( i . value = ! 0 , c . value && e . stopPropagation ( ) ) } ) } return ( e , t ) => ( B ( ) , V ( z , null , [ W ( N ( vg ) , q ( { id : e . id , ref : N ( o ) , role : ` radio ` , type : e . as === ` button ` ? ` button ` : void 0 , as : e . as , "aria-checked" : N ( i ) ? ? ! 1 , "aria-label" : u . value , "as-child" : e . asChild , disabled : e . disabled ? ` ` : void 0 , "data-state" : N ( i ) ? ` checked ` : ` unchecked ` , "data-disabled" : e . disabled ? ` ` : void 0 , value : N ( a ) , required : e . required , name : e . name } , { ... N ( l ) , ... e . $attrs } , { onClick : Ll ( d , [ ` stop ` ] ) } ) , { default : P ( ( ) => [ R ( e . $slots , ` default ` , { checked : N ( i ) } ) ] ) , _ : 3 } , 16 , [ ` id ` , ` type ` , ` as ` , ` aria-checked ` , ` aria-label ` , ` as-child ` , ` disabled ` , ` data-state ` , ` data-disabled ` , ` value ` , ` required ` , ` name ` ] ) , N ( c ) && e . name ? ( B ( ) , H ( N ( q _ ) , q ( { key : 0 , type : ` radio ` , tabindex : ` -1 ` , value : N ( a ) , checked : ! ! N ( i ) , name : e . name , disabled : e . disabled , required : e . required } , N ( l ) ) , null , 16 , [ ` value ` , ` checked ` , ` name ` , ` disabled ` , ` required ` ] ) ) : K ( ` v-if ` , ! 0 ) ] , 64 ) ) } } ) , [ bS , xS ] = Mm ( ` RadioGroupRoot ` ) , SS = I ( { _ _name : ` RadioGroupRoot ` , props : { modelValue : { type : null , required : ! 1 } , defaultValue : { type : null , required : ! 1 } , disabled : { type : Boolean , required : ! 1 , default : ! 1 } , orientation : { type : String , required : ! 1 , default : void 0 } , dir : { type : String , required : ! 1 } , loop : { type : Boolean , required : ! 1 , default : ! 0 } , asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } , name : { type : String , required : ! 1 } , required : { type : Boolean , required : ! 1 , default : ! 1 } } , emits : [ ` update:modelValue ` ] , setup ( e , { emit : t } ) { let n = e , r = t , { forwardRef : i , currentElement : a } = Z ( ) , o = ph ( n , ` modelValue ` , r , { defaultValue : n . defaultValue , passive : n . modelValue === void 0 } ) , { disabled : s , loop : c , orientation : l , name : u , required : d , dir : f } = vn ( n ) , p = Mh ( f ) , m = Lh ( a ) ; return xS ( { modelValue : o , changeModelValue : e => { o . value = e } , disabled : s , loop : c , orientation : l , name : u ? . value , required : d } ) , ( e , t ) => ( B ( ) , H ( N ( kb ) , { "as-child" : ` ` , orientation : N ( l ) , dir : N ( p ) , loop : N ( c ) } , { default : P ( ( ) => [ W ( N ( vg ) , { ref : N ( i ) , role : ` radiogroup ` , "data-disabled" : N ( s ) ? ` ` : void 0 , "as-child" : e . asChild , as : e . as , "aria-orientation" : N ( l ) , "aria-required" : N ( d ) , dir : N ( p ) } , { default : P ( ( ) => [ R ( e . $slots , ` default ` , { modelValue : N ( o ) } ) , N ( m ) && N ( u ) ? ( B ( ) , H ( N ( q _ ) , { key : 0 , required : N ( d ) , disabled : N ( s ) , value : N ( o ) , name : N ( u ) } , null , 8 , [ ` required ` , ` disabled ` , ` value ` , ` name ` ] ) ) : K ( ` v-if ` , ! 0 ) ] ) , _ : 3 } , 8 , [ ` data-disabled ` , ` as-child ` , ` as ` , ` aria-orientation ` , ` aria-required ` , ` dir ` ] ) ] ) , _ : 3 } , 8 , [ ` orientation ` , ` dir ` , ` loop ` ] ) ) } } ) , [ Jee , CS ] = Mm ( ` RadioGroupItem ` ) , wS = I ( { inheritAttrs : ! 1 , _ _name : ` RadioGroupItem ` , props : { id : { type : String , required : ! 1 } , value : { type : nu Line truncated
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:B T(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>B T(e))}),null)};for(let e=0;e<n.length;e++){let c=n[e];if(c.startsWith(" ` ` ` " ) ) { o ( ) , s ( ) , a ? ( t . push ( { kind : ` pre ` , code : a . join ( `
` )}),a=null):a=[];continue}if(a){a.push(c);continue}let l=V T(c),u=e+1<n.length?V T(n[e+1]):null;if(l&&u&&k te(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=V T(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>B T(e)),rows:r.map(e=>e.map(e=>B T(e)))});continue}if(!c.trim()){o(),s();continue}let d=c.match(/^(#{1,3}) \s +(.+) $ /);if(d){o(),s(),t.push({kind: ` h$ { d [ 1 ] . length } ` ,inline:B T(d[2])});continue}let f=c.match(/^ \s *[-*] \s +(.+) $ /),p=c.match(/^ \s * \d +[.)] \s +(.+) $ /);if(f||p){o();let e=p? ` ol ` : ` ul ` ;(!i||i.tag!==e)&&(s(),i={tag:e,items:[]}),i.items.push((f||p)[1]);continue}if(c.startsWith( ` > ` )){o(),s(),t.push({kind: ` blockquote ` ,inline:B T(c.replace(/^> \s ?/, ` ` ))});continue}r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function VT(e){let t=String(e|| ` ` ).trim();if(!t.includes( ` | ` ))return null;let n=t.replace(/^ \| /, ` ` ).replace(/ \| $ /, ` ` ).split( ` | ` ).map(e=>e.trim());return n.length>1&&n.every(e=>e!== ` ` )?n:null}function kte(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var Ate={class: ` [ overflow - wrap : anywhere ] ` },jte={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },Mte={class: ` font - mono text - [ 0.85 em ] ` },Nte={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },Pte={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Fte={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Ite={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },Lte={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },Rte={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },zte={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },Bte={key:8,class: ` mb - 2.5 last : mb - 0 ` },Vte=I({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=J(()=>Ote(t.text));return(e,t)=>(B(),V( ` div ` ,Ate,[(B(!0),V(z,null,L(n.value,(e,t)=>(B(),V(z,{key:t},[e.kind=== ` pre ` ?(B(),V( ` pre ` ,jte,[U( ` code ` ,Mte,j(e.code),1)])):e.kind=== ` table ` ?(B(),V( ` table ` ,Nte,[U( ` thead ` ,null,[U( ` tr ` ,null,[(B(!0),V(z,null,L(e.head,(e,t)=>(B(),V( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[W(zT,{inline:e},null,8,[ ` inline ` ])]))),128))])]),U( ` tbody ` ,null,[(B(!0),V(z,null,L(e.rows,(e,t)=>(B(),V( ` tr ` ,{key:t},[(B(!0),V(z,null,L(e,(e,t)=>(B(),V( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[W(zT,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(B(),V( ` blockquote ` ,Pte,[W(zT,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(B(),V( ` h1 ` ,Fte,[W(zT,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(B(),V( ` h2 ` ,Ite,[W(zT,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(B(),V( ` h3 ` ,Lte,[W(zT,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(B(),V( ` ul ` ,Rte,[(B(!0),V(z,null,L(e.items,(e,t)=>(B(),V( ` li ` ,{key:t},[W(zT,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(B(),V( ` ol ` ,zte,[(B(!0),V(z,null,L(e.items,(e,t)=>(B(),V( ` li ` ,{key:t},[W(zT,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(B(),V( ` p ` ,Bte,[W(zT,{inline:e.inline},null,8,[ ` inline ` ])])):K( ` ` ,!0)],64))),128))]))}}),Hte={class: ` truncate ` },Ute=I({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=Qi( ` RouterLink ` );return B(),H(r,{to:e.path,title: ` Go to $ { e . label || e . path } ` ,class: ` inline - flex max - w - full items - center gap - 1.5 rounded - full border border - primary / 45 bg - primary - soft px - 2.5 py - 1 text - xs font - semibold text - link transition - colors hover : border - primary hover : bg - primary / 15 focus - visible : outline - 2 focus - visible : outline - offset - 2 focus - visible : outline - primary ` },{default:P(()=>[W(N(Ku),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),U( ` span ` ,Hte,j(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),Wte={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },Gte={class: ` font - semibold text - foreground ` },Kte={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },qte=I({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=J(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=J(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=J(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=J(()=>t.tool.summary||t.tool.Summary||t.tool.text||t.tool.err||t.tool.Err||(t.streaming?i.value? ` failed ` : ` running … ` : ` done ` ));return(t,o)=>e.tool.path?(B(),H(Ute,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(B(),V( ` div ` ,Wte,[W(N(qd),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),U( ` span ` ,Gte,j(n.value),1),r.value?(B(),V( ` code ` ,Kte,j(r.value),1)):K( ` ` ,!0),U( ` span ` ,{class:A(N(Y)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},j(a.value),3)]))}}),Jte={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },Yte={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },Xte={key:3,class: ` whitespace - pre - wrap ` },HT=I({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(B(),V( ` div ` ,{class:A([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[U( ` div ` ,{class:A(N(Y)( ` max - w - [ min ( 78 ch , 86 % ) ] rounded - [ 0.85 rem ] px - 4 py - 3 leading - normal [ overflow - wrap : anywhere ] ` ,e.assistant? ` bg - muted ` : ` bg - primary / 15 ` ))},[e.assistant&&e.tools.length?(B(),V( ` div ` ,Jte,[(B(!0),V(z,null,L(e.tools,(t,n)=>(B(),H(qte,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):K( ` ` ,!0),e.media.length?(B(),V( ` div ` ,Yte,[(B(!0),V(z,null,L(e.media,(e,t)=>(B(),H(bte,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):K( ` ` ,!0),e.assistant?(B(),H(Vte,{key:2,text:e.text},null,8,[ ` text ` ])):(B(),V( ` div ` ,Xte,j(e.text),1)),R(t. $ slots, ` default ` )],2)],2))}}),Zte={class: ` w - full self - center justify - self - center py - 6 text - center ` },Qte={class: ` grid gap - 2 ` }, $ te=[ ` onC Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>jA? ` $ { n . slice ( 0 , jA ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var NA=[ ` title ` ],PA=I({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=J(()=>iA(n.event)),a=J(()=>MA(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=J(()=>n.event.at?fk(n.event.at): ` — ` );return(e,t)=>(B(),H(N(OA),{class:A(i.value>0? ` cursor - pointer ` : ` ` ),role:i.value>0? ` link ` :void 0,tabindex:i.value>0?0:void 0,title:i.value>0? ` Open task details ` :void 0,onClick:o,onKeydown:[Rl(Ll(o,[ ` prevent ` ]),[ ` enter ` ]),Rl(Ll(o,[ ` prevent ` ]),[ ` space ` ])]},{default:P(()=>[W(N( $ ),{class: ` font - medium ` },{default:P(()=>[G(j(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),W(N( $ ),{class: ` font - mono ` },{default:P(()=>[G(j(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),W(N( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:P(()=>[U( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},j(a.value.text),9,NA)]),_:1}),W(N( $ ),null,{default:P(()=>[G(j(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),FA=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function IA(e){return(Number(e?.task_id)||0)>0}function LA(e,t){return t=== ` tasks ` ?IA(e):t!== ` system ` ||!IA(e)}function RA(e,t){return e.filter(e=>LA(e,t))}function zA(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function BA(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function VA(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=BA(MA(n).text,r),a=t[t.length-1];if(a&&a.key===i){a.count+=1,a.events.push(n);continue}t.push({key:i,label:e,taskID:r,count:1,representative:n,events:[n]})}return t}var HA={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },UA={class: ` max - h - [ 28 rem ] overflow - y - auto ` },WA=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],GA=[ ` title ` ],KA=I({__name: ` LiveActivityCard ` ,setup(e){let t=rE(),{activity:n,streamKind:r,streamState:i}=ju(mO()),a=M( ` all ` ),o=J(()=>RA(n.value,a.value)),s=J(()=>zA(o.value.length,a.value)),c=Jt(new Set),l=J(()=>VA(o.value));function u(e){c.has(e)?c.delete(e):c.add(e)}function d(e){return c.has(e.key)}function f(e){return MA(e.representative)}function p(e){return e.representative.at?fk(e.representative.at): ` — ` }function m(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(B(),H(N(ak),null,{default:P(()=>[W(N(uk),null,{default:P(()=>[W(N(dk),null,{default:P(()=>[...t[1]||=[G( ` Live activity ` ,-1)]]),_:1}),W(N(ok),{class: ` flex items - center gap - 2 ` },{default:P(()=>[W(N(wA),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:N(FA)},null,8,[ ` modelValue ` , ` options ` ]),W(N(nk),{variant:N(r)},{default:P(()=>[G(j(N(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),W(N(sk),null,{default:P(()=>[U( ` div ` ,HA,[U( ` div ` ,UA,[W(N(EA),null,{default:P(()=>[W(N(AA),{class: ` sticky top - 0 z - 10 bg - card ` },{default:P(()=>[W(N(OA),null,{default:P(()=>[W(N(kA),null,{default:P(()=>[...t[2]||=[G( ` Event ` ,-1)]]),_:1}),W(N(kA),null,{default:P(()=>[...t[3]||=[G( ` Task ` ,-1)]]),_:1}),W(N(kA),null,{default:P(()=>[...t[4]||=[G( ` Detail ` ,-1)]]),_:1}),W(N(kA),null,{default:P(()=>[...t[5]||=[G( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),W(N(DA),null,{default:P(()=>[o.value.length?K( ` ` ,!0):(B(),H(N(OA),{key:0},{default:P(()=>[W(N( $ ),{colspan: ` 4 ` },{default:P(()=>[W(N(JO),null,{default:P(()=>[W(N(ZO),null,{default:P(()=>[W(N(ek),null,{default:P(()=>[G(j(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(B(!0),V(z,{key:1},L(l.value,e=>(B(),V(z,{key:e.key},[e.count===1?(B(),H(PA,{key:0,event:e.representative,onOpen:m},null,8,[ ` event ` ])):(B(),V(z,{key:1},[W(N(OA),{class:A(e.taskID>0? ` cursor - pointer ` : ` ` ),role:e.taskID>0? ` link ` :void 0,tabindex:e.taskID>0?0:void 0,title:e.taskID>0? ` Open task details ` :void 0,onClick:t=>e.taskID>0&&m(e.taskID),onKeydown:[Rl(Ll(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),Rl(Ll(t=>e.taskID>0&&m(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:P(()=>[W(N( $ ),{class: ` font - medium ` },{default:P(()=>[U( ` button ` ,{type: ` button ` ,class: ` inline - flex items - center gap - 1 rounded hover : opacity - 80 ` ,"aria-expanded":d(e),"aria-label": ` $ { d ( e ) ? ` Hide ` : ` Show ` } $ { e . count } $ { e . label } events ` ,onClick:Ll(t=>u(e.key),[ ` stop ` ])},[d(e)?(B(),H(N( $ u),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(B(),H(N(ed),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),G( ` ` +j(e.label)+ ` ` ,1),W(N(nk),{variant: ` idle ` },{default:P(()=>[G( ` × ` +j(e.count),1)]),_:2},1024)],8,WA)]),_:2},1024),W(N( $ ),{class: ` font - mono ` },{default:P(()=>[G(j(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),W(N( $ ),{class: ` w - [ 55 % ] max - w - 0 ` },{default:P(()=>[U( ` span ` ,{class: ` block truncate ` ,title:f(e).truncated?f(e).full:void 0},j(f(e).text),9,GA)]),_:2},1024),W(N( $ ),null,{default:P(()=>[G(j(p(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),d(e)?(B(!0),V(z,{key:0},L(e.events,(t,n)=>(B(),H(PA,{key: ` $ { e . key } : $ { n } ` ,event:t,onO
Line truncated
` )){let e=n.indexOf( ` : ` );if(e<=0)continue;let r=n.slice(0,e).trim();r&&(t[r]=n.slice(e+1).trim())}return t}function fM(e,t){if(!e.event_type)return{label: ` Unidentified ` ,identified:!1};let n=t.find(t=>t.id===e.event_type);return{label:n?n.name: ` Deleted type ` ,identified:!0}}function pM(e,t){if(!e)return ` No event type ` ;let n=t.find(t=>t.id===e);return n? ` $ { n . source } / $ { n . name } ` : ` Deleted type ` }function mM(e){let t=[...(e.headers||[]).map(e=> ` $ { e . name } = $ { e . value } ` ),...(e.payload||[]).map(e=>e.op=== ` present ` ? ` $ { e . path } present ` : ` $ { e . path } = $ { e . value ? ? ` ` } ` )];return t.length?t.join( ` · ` ): ` any event ` }function hM(e){return{headers:(e.headers||[]).filter(e=>e.name.trim()!== ` ` ).map(e=>({name:e.name.trim(),value:e.value})),payload:(e.payload||[]).filter(e=>e.path.trim()!== ` ` ).map(e=>e.op=== ` present ` ?{path:e.path.trim(),op:e.op}:{path:e.path.trim(),op:e.op,value:e.value?? ` ` })}}var gM=M([]),_M=M([]),vM=M(!0),yM=M(null),bM=M(null),xM=M(!1),SM=M(null);async function CM(){try{let e=await X.eventTypes();vM.value=e.enabled!==!1,gM.value=e.event_types||[],_M.value=e.proposals||[],yM.value=null}catch(e){yM.value=e.message||String(e)}}function wM(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function TM(e){SM.value=null,bM.value=e}function EM(e){let t=PM.value.find(t=>String(t.id)===e.sample_id);TM({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:wM(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function DM(e= ` ` ){TM({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function OM(e){TM({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:wM(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function kM(){bM.value=null}async function AM(){let e=bM.value;if(e){xM.value=!0;try{if(e.mode=== ` edit ` &&e.id)await X.eventTypeUpdate(e.id,{name:e.name,rule:hM(e.rule)});else{let t=e.mode=== ` paste ` ?dM(e.headersText):e.exampleHeaders;await X.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:hM(e.rule),example:{headers:t,body:e.body}})}bM.value=null,await CM()}catch(e){SM.value=e.message||String(e)}finally{xM.value=!1}}}var jM=M(null);async function MM(){let e=jM.value;if(jM.value=null,e)try{await X.eventTypeDelete(e.id),await CM()}catch(e){yM.value=e.message||String(e)}}var NM=100,PM=M([]),FM=M(!0),IM=M(null),LM=M(!0),RM=M(null);async function zM(){try{let e=await X.captures(NM);FM.value=e.enabled!==!1,PM.value=e.captures||[],IM.value=null}catch(e){IM.value=e.message||String(e)}finally{LM.value=!1}}function BM(e){let t=PM.value.find(t=>t.id===e);return t&&(RM.value=t),!!t}function VM(){PM.value.length&&(RM.value=PM.value[0])}function HM(){hO( ` captures ` ,()=>{zM(),CM()})}var UM={key:0,class: ` text - xs text - fg - muted ` },WM={key:1,class: ` flex flex - col gap - 1 text - xs ` },GM={key:1},KM={key:2,class: ` text - xs text - fg - muted ` },qM=I({__name: ` DispatchLinks ` ,props:{kind:{},id:{}},setup(e){let t=e,n=M([]),r=M(!1);F(()=>[t.kind,t.id],async()=>{r.value=!1;try{n.value=await X.dispatches(t.kind,t.id)}catch{n.value=[],r.value=!0}},{immediate:!0});let i=e=>({path: ` / events ` ,query:{tab: ` inspector ` ,capture:e}});return(e,a)=>{let o=Qi( ` RouterLink ` );return r.value?(B(),V( ` p ` ,UM, ` Dispatches unavailable . ` )):n.value.length?(B(),V( ` ul ` ,WM,[(B(!0),V(z,null,L(n.value,e=>(B(),V( ` li ` ,{key:e.binding_id+e.capture_id,class: ` flex flex - wrap items - center gap - x - 2 font - mono text - fg - muted ` },[t.kind=== ` bindings ` ?K( ` ` ,!0):(B(),H(o,{key:0,to:{path: ` / events ` ,query:{tab: ` bindings ` }},class: ` hover : text - foreground ` },{default:P(()=>[G( ` binding ` +j(e.binding_id.slice(0,8))+ ` v ` +j(e.binding_version),1)]),_:2},1024)),t.kind=== ` captures ` ?K( ` ` ,!0):(B(),H(o,{key:1,to:i(e.capture_id),class: ` hover : text - foreground ` },{default:P(()=>[G( ` capture ` +j(e.capture_id.slice(0,8)),1)]),_:2},1032,[ ` to ` ])),t.kind=== ` tasks ` ?K( ` ` ,!0):(B(),V(z,{key:2},[e.task_id?(B(),H(o,{key:0,to: ` / tasks / $ { e . task _id } ` ,class: ` text - foreground hover : underline ` },{default:P(()=>[G( ` task # ` +j(e.task_id),1)]),_:2},1032,[ ` to ` ])):(B(),V( ` span ` ,GM,j(e.reason|| ` claimed , no task recorded ` ),1))],64)),U( ` span ` ,null,j(N(fk)(e.dispatched_at)),1)]))),128))])):t.kind=== ` tasks ` ?K( ` ` ,!0):(B(),V( ` p ` ,KM, ` No dispatches yet . ` ))}}}),JM=I({__name: ` Spinner ` ,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,n)=>(B(),H(N(md),{role: ` status ` ,"aria-label": ` Loading ` ,class:A(N(Y)( ` size - 4 animate - spin ` ,t.class))},null,8,[ ` class ` ]))}});function YM(e,t){return t?e.filter(e=>e.event_type_id===t):[]}function XM(e){return(e?.repository?? ` required ` )!== ` none ` }function ZM(e,t){return e.filter(e=>t=== ` any ` ||e.type=== ` any ` ||e.type===t)}function QM(e,t){switch(t){case ` string ` :return e;case ` number ` :return e.trim()!== ` ` &&!Number.isNaN(Number(e))?Number(e):e;case ` bool ` :return e=== ` true ` ||e!== ` false ` &&e;default:try{return JSON.parse(e)}catch{return e}}}var $ M={pending_approval: ` pending approval ` ,armed: ` armed ` ,paused: ` paused ` },eN={pending_approval: ` warn ` ,armed: ` ok ` ,paused: ` idle ` };function tN(e)
Line truncated
` )}};CJ.defaultYaml={explicit:!1,version: ` 1.2 ` },CJ.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function wJ(e){if(/[ \x 00- \x 19 \s ,[ \] {}]/.test(e)){let t= ` Anchor must not contain whitespace or control characters : $ { JSON . stringify ( e ) } ` ;throw Error(t)}return!0}function TJ(e){let t=new Set;return gJ(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function EJ(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function DJ(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=TJ(e);let a=EJ(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(cJ(t.node)||uJ(t.node)))t.node.anchor=t.anchor;else{let t=Error( ` Failed to resolve repeated object ( this should not happen ) ` );throw t.source=e,t}}},sourceObjects:r}}function OJ(e,t,n,r){if(r&&typeof r== ` object ` ){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=OJ(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=OJ(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=OJ(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=OJ(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function kJ(e,t,n){if(Array.isArray(e))return e.map((e,t)=>kJ(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!fJ(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e== ` bigint ` &&!n?.keep?Number(e):e}var AJ=class{constructor(e){Object.defineProperty(this,rJ,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!aJ(e))throw TypeError( ` A document argument is required ` );let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n== ` number ` ?n:100},o=kJ(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?OJ(i,{"":o}, ` ` ,o):o}},jJ=class extends AJ{constructor(e){super(Zq),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error( ` Alias nodes cannot have tags ` )}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError( ` Alias resolution is disabled ` );let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],gJ(e,{Node:(e,t)=>{(iJ(t)||fJ(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(kJ(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError( ` This should not happen : Alias anchor was not resolved ? ` );if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=MJ(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError( ` Excessive alias count indicates a resource exhaustion attack ` )}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e= ` Unresolved alias ( the anchor must be set before the alias ) : $ { this . source } ` ;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r= ` * $ { this . source } ` ;if(e){if(wJ(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e= ` Unresolved alias ( the anchor must be set before the alias ) : $ { this . source } ` ;throw Error(e)}if(e.implicitKey)return ` $ { r } ` }return r}};function MJ(e,t,n){if(iJ(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(uJ(t)){let r=0;for(let i of t.items){let t=MJ(e,i,n);t>r&&(r=t)}return r}if(sJ(t)){let r=MJ(e,t.key,n),i=MJ(e,t.value,n);return Math.max(r,i)}return 1}var NJ=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,PJ=class extends AJ{constructor(e){super(tJ),this.value=e}toJSON(e,t){return t?.keep?this.value:kJ(this.value,e,t)}toString(){return String(this.value)}};PJ.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,PJ.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,PJ.PLAIN= ` PLAIN ` ,PJ.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,PJ.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var FJ= ` tag : yaml . org , 2002 : ` ;function IJ(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error( ` Tag $ { t } not found ` );return r}return n.find(t=>t.identify?.(e)&&!t.format)}function LJ(e,t,n){if(aJ(e)&&(e=e.contents),dJ(e))return e;if(sJ(e)){let t=n.schema[ $ q].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt< ` u ` &&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e== ` object ` ){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new jJ(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=FJ+t.slice(2));let l=IJ(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new PJ(e);return c&&(c.node=t),t
Line truncated
` )?HJ(n,t):n.includes( `
` )? `
@@ -123,12 +123,12 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
` ,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case ` newline ` :if(this.onKeyLine=!1,t.value){let n= ` end ` in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type=== ` comment ` ?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case ` space ` :case ` comment ` :if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){IZ(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!== ` seq - item - ind ` ,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case ` newline ` :n.push(r);break;case ` space ` :break;case ` comment ` :i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case ` anchor ` :case ` tag ` :r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case ` explicit - key - ind ` :!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case ` map - value - ind ` :if(t.explicitKey){if(!t.sep){if(jZ(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=FZ(t.start);this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(jZ(t.sep, ` map - value - ind ` ))this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(NZ(t.key)&&!jZ(t.sep, ` newline ` )){let e=FZ(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken)}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):jZ(t.sep, ` map - value - ind ` )?this.stack.push({type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type=== ` block - seq ` ){if(!t.explicitKey&&t.sep&&!jZ(t.sep, ` newline ` )){yield*this.pop({type: ` error ` ,offset:this.offset,message: ` Unexpected block - seq - ind on same line with key ` ,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case ` newline ` :if(t.value){let n= ` end ` in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type=== ` comment ` ?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case ` space ` :case ` comment ` :if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){IZ(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case ` anchor ` :case ` tag ` :if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case ` seq - item - ind ` :if(this.indent!==e.indent)break;t.value||jZ(t.start, ` seq - item - ind ` )?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type=== ` flow - error - end ` ){let e;do yield*this.pop(),e=this.peek(1);while(e?.type=== ` flow - collection ` )}else if(e.end.length===0){switch(this.type){case ` comma ` :case ` explicit - key - ind ` :!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case ` map - value - ind ` :!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case ` space ` :case ` comment ` :case ` newline ` :case ` anchor ` :case ` tag ` :!t||t.value?e.ite
Line truncated
` )+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf( `
` ,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return this.flowScalar(this.type);case ` block - scalar - header ` :return{type: ` block - scalar ` ,offset:this.offset,indent:this.indent,props:[this.sourceToken],source: ` ` };case ` flow - map - start ` :case ` flow - seq - start ` :return{type: ` flow - collection ` ,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case ` seq - item - ind ` :return{type: ` block - seq ` ,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case ` explicit - key - ind ` :{this.onKeyLine=!0;let t=FZ(PZ(e));return t.push(this.sourceToken),{type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case ` map - value - ind ` :{this.onKeyLine=!0;let t=FZ(PZ(e));return{type: ` block - map ` ,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!== ` comment ` ||this.indent<=t?!1:e.every(e=>e.type=== ` newline ` ||e.type=== ` space ` )}*documentEnd(e){this.type!== ` doc - mode ` &&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type=== ` newline ` &&(yield*this.pop()))}*lineEnd(e){switch(this.type){case ` comma ` :case ` doc - start ` :case ` doc - end ` :case ` flow - seq - end ` :case ` flow - map - end ` :case ` map - value - ind ` :yield*this.pop(),yield*this.step();break;case ` newline ` :this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type=== ` newline ` &&(yield*this.pop())}}};function zZ(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new AZ||null,prettyErrors:t}}function BZ(e,t={}){let{lineCounter:n,prettyErrors:r}=zZ(t),i=new RZ(n?.addNewLine),a=new gZ(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!== ` silent ` ){o.errors.push(new MX(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(PX(e,n)),o.warnings.forEach(PX(e,n))),o}function VZ(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=BZ(e,n);if(!i)return null;if(i.warnings.forEach(e=>uY(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!== ` silent ` )throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function HZ(e,t,n){let r=null;if(typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n== ` string ` &&(n=n.length),typeof n== ` number ` ){let e=Math.round(n);n=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=n??t??{};if(!e)return}return aJ(e)&&!r?e.toString(n):new kX(e,r,n).toString(n)}function UZ(e,t){let n=new Map;for(let e of t)n.set(e.name,[...n.get(e.name)??[],e]);return{edges:e.edges,nodes:e.nodes.map(e=>{let{stage:t,occurrence:r}=e.data,i=t===void 0?void 0:n.get(t)?.[r??0];return i?{...e,data:{...e.data,run:i}}:e})}}function WZ(e,t){let n=e=>e.path&&e.path.length>=2?Number(e.path[1]):-1,r=e.nodes.find(e=>JSON.stringify(e.data.path)===JSON.stringify(t))?.data,i=r?.resume??r?.stage;if(!r||!i)return null;let a=Math.max(-1,...e.nodes.filter(e=>e.data.run).map(e=>n(e.data))),o=n(r);if(o<0||o>a)return null;let s=e.nodes.filter(e=>e.data.path?.length===2).sort((e,t)=>n(e.data)-n(t.data)).map(e=>e.data.resume??e.data.stage?? ` ` ),c=e=>!!e&&s.filter(t=>t===e).length>1;return c(i)||o>0&&c(s[o-1])?{label: ` Add an id to resume here ` ,from:i,blocked:!0}:{label:o===a? ` Resume from here ` : ` Re - run from here ` ,from:i}}var GZ=140,KZ=280,qZ={"agent.run": ` Agent ` ,"command.run": ` Run commands ` ,"repo.prepare": ` Prepare worktree ` ,"repo.commit": ` Commit ` ,"repo.open-pr": ` Open pull request ` ,"gate.repository": ` Repository gate ` ,"gate.diff-size": ` Diff size gate ` ,"gate.diff-rules": ` Diff rules gate ` ,"forge.comment": ` Comment ` ,"forge.close-issue": ` Close issue ` ,"human.approve": ` Human approval ` ,"workflow.call": ` Call workflow ` ,"workflow.handoff": ` Hand off ` ,"workflow.finish": ` Finish ` ,"review.pr": ` Review pull request ` ,"review.start-round": ` Start review round ` ,"review.reply": ` Reply to review ` };function JZ(e){return qZ[e]??e}var YZ=/ \{ \{ \s *steps \. ([A-Za-z0-9_-]+) \. [^}]* \} \} /g;function XZ(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function ZZ(e,t){let n=e=>typeof t[e]== ` string ` ?t[e]: ` ` ;switch(e){case ` agent . run ` :return[n( ` role ` )|| ` builder ` ,t.read_only? ` read - only ` :n( ` gate ` )? ` gated : $ { n ( ` gate ` ) } ` : ` ` ].filter(Boolean).join( ` · ` );case ` repo . commit ` :return[n( ` message ` ),t.push? ` push ` : ` ` ].filter(Boolean).join( ` · ` );case ` workflow . call ` :case ` workflow . handoff ` :return n( ` workflow ` );case ` workflow . finish ` :return n( ` status ` )|| ` completed ` ;case ` human . approve ` :return n( ` then ` )? ` then $ { n ( ` then ` ) } ` : ` ` ;case ` gate . repository ` :return n( ` expect ` )=== ` test - failure ` ? ` tests must fail ` :t.repair? ` repair if red ` : ` ` }return ` ` }function QZ(e){for(let t of[ ` mission ` , ` message ` , ` body ` , ` plan ` , ` detail ` ]){let n=e[t];if(typeof n== ` string ` &&n.trim())return n.replace(/ \{ \{ \s *([^}]+?) \s * \} \} /g, ` ‹ $1 › ` ).split( `
` ).find(e=>e.trim())?.trim()}}function $ Z(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(YZ)].map(e=>e[1]))]}function eQ(e){let t=BZ(e).toJS(),n=XZ(t)&&Array.isArray(t.steps)?t.steps:[],r=[],i=[],a=new Map,o=[],s= ` start ` ;r.push({id:s,type: ` step ` ,position:{x:0,y:0},data:{kind: ` start ` ,key: ` start ` ,title: ` Starts when ` ,type: ` ` ,detail: ` ` }});let c=[s],l=1,u=new Map,d=e=>{let t=u.get(e)??0;return u.set(e,t+1),t},f=(e,t,n,i,s,c,l)=>{let u=XZ(e)?e:{},f=typeof u.type== ` string ` ?u.type: ` ` ,p=XZ(u.settings)?u.settings:{},m=typeof u.id== ` string ` ?u.id: ` ` ,h= ` step - $ { t } ` ,g=s? ` $ { s } / $ { m || f } ` :m||f;r.push({id:h,type: ` step ` ,position:{x:n,y:i},data:{kind: ` step ` ,key:m||t,title:m||JZ(f),type:f,detail:ZZ(f,p),summary:QZ(p),when:typeof u.when== ` string ` ?u.when:void 0,retry:XZ(u.retry)&&typeof u.retry.attempts== ` number ` ?u.retry.attempts:void 0,continues:u.on_failure=== ` continue ` ,branch:s,path:l,stage:g,occurrence:d(g),...c?{resume:c}:{}}}),m&&a.set(m,h);for(let e of $ Z(u.settings,u.when))o.push({from:e,to:h});return h},p=(e,t,n)=>{e.forEach((r,a)=>i.push({id: ` flow - $ { r } - $ { t } ` ,source:r,target:t,kind: ` flow ` ,insertAfter:a===e.length-1?n:void 0}))};for(let[e,t]of n.entries()){if(XZ(t)&&XZ(t.parallel)){let n=Object.entries(t.parallel),r=typeof t.id== ` string ` ?t.id: ` parallel ` ,i=[],a=0;n.forEach(([t,o],s)=>{let u=(s-(n.length-1)/2)*KZ,d=c,m=c;(Array.isArray(o)?o:[]).forEach((i,o)=>{let c=f(i, ` $ { e + 1 } - $ { t } - $ { o + 1 } ` ,u,(l+o)*GZ,t,r,[ ` steps ` ,e, ` parallel ` ,t,o]);p(d,c,d===m&&s===n.length-1?e-1:void 0),d=[c],a=Math.max(a,o+1)}),i.push(...d)}),c=i,l+=Math.max(a,1);continue}let n=f(t,String(e+1),0,l*GZ,void 0,void 0,[ ` steps ` ,e]);p(c,n,e-1),c=[n],l++}r.push({id: ` add - end ` ,type: ` add ` ,position:{x:104,y:l*GZ-24},data:{kind: ` step ` ,key: ` add ` ,title: ` ` ,type: ` ` ,detail: ` ` }}),p(c, ` add - end ` );for(let{from:e,to:t}of o){let n=a.get(e);n&&(i.some(e=>e.kind=== ` flow ` &&e.source===n&&e.target===t)||i.push({id: ` data - $ { n } - $ { t } ` ,source:n,target:t,kind: ` data ` ,label:e,offset:24+14*i.filter(e=>e.kind=== ` data ` ).length,sourceHandle: ` data - out ` ,targetHandle: ` data - in ` }))}return{nodes:r,edges:i}}var tQ={agent:Ju,command:Fd,repo:ud,gate:Md,forge:vd,human:Hd,review:cd,workflow:Gd},nQ={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function rQ(e){return tQ[e.split( ` . ` )[0]]??Gd}function iQ(e){return Object.keys(nQ).map(t=>({title:nQ[t],icon:tQ[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function aQ(e,t){let n=BZ(e).getIn(t,!0);if(oJ(n))return n.toJSON()}function oQ(e,t,n){let r=BZ(e);return r.setIn(t,r.createNode(fQ(n))),r.toString()}function sQ(e,t,n){let r=BZ(e),i=r.get( ` steps ` ,!0);if(lJ(i)||(r.set( ` steps ` ,r.createNode([])),i=r.get( ` steps ` ,!0)),!lJ(i))return{source:e,path:[]};let a=Math.min(Math.max(t+1,0),i.items.length);return i.items.splice(a,0,r.createNode({type:n})),{source:r.toString(),path:[ ` steps ` ,a]}}function cQ(e,t){let n=BZ(e),r=n.getIn(t.slice(0,-1),!0),i=t.at(-1);if(!lJ(r)||typeof i!= ` number ` )return{source:e,path:t};let a=n.createNode(n.getIn(t));return oJ(a)&&a.delete( ` id ` ),r.items.splice(i+1,0,a),{source:n.toString(),path:[...t.slice(0,-1),i+1]}}function lQ(e,t){let n=BZ(e);n.deleteIn(t);let r=t.slice(0,-1);if(r.length>2){let e=n.getIn(r,!0);lJ(e)&&e.items.length===0&&n.deleteIn(r)}return n.toString()}function uQ(e,t,n){let r=BZ(e),i=r.getIn(t.slice(0,-1),!0),a=t.at(-1);if(!lJ(i)||typeof a!= ` number ` )return{source:e,path:t};let o=a+n;if(o<0||o>=i.items.length)return{source:e,path:t};let[s]=i.items.splice(a,1);return i.items.splice(o,0,s),{source:r.toString(),path:[...t.slice(0,-1),o]}}function dQ(e,t){let n=BZ(e).toJS(),r=Array.isArray(n?.steps)?n.steps:[],i=typeof t[1]== ` number ` ?t[1]:r.length,a=[],o=e=>{if(typeof e!= ` object ` ||!e)return;let t=e;if(typeof t.id== ` string ` &&a.push(t.id),typeof t.parallel== ` object ` &&t.parallel!==null)for(let e of Object.values(t.parallel))Array.isArray(e)&&e.forEach(o)};if(r.slice(0,i).forEach(o),t.length===5){let e=r[i]?.parallel?.[t[3]];Array.isArray(e)&&e.slice(0,t[4]).forEach(o)}return a}function fQ(e){if(Array.isArray(e))return e.map(fQ);if(typeof e!= ` object ` ||!e)return e;let t={};for(let[n,r]of Object.entries(e)){if(r===void 0||r=== ` ` ||r===null)continue;let e=fQ(r);(typeof e!= ` object ` ||!e||Array.isArray(e)||Object.keys(e).length!==0)&&(t[n]=e)}return t}function pQ(e,t){let n=BZ(e).get(t,!0);return n&&typeof n== ` object ` && ` toJSON ` in n?n.toJSON():BZ(e).get(t)}function mQ(e,t,n){let r=BZ(e),i=fQ({[t]:n})[t];return i===void 0?r.delete(t):r.set(t,r.createNode(i)),r.toString()}function hQ(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function gQ(e,t=[]){let n=BZ(e),r=n.errors[0];if(r)return{ok:!1,message:AQ(r.message),line:r.linePos?.[0]?.line};let i=n.toJS();if(!jQ(i))return{ok:!1,message: ` A workflow is a mapping with an id and steps . ` };let a=typeof i.id== ` string ` ?i.id.trim(): ` ` ;if(!a)return{ok:!1,message: ` workflow id is required ` };le
Line truncated
` ).find(e=>e.trim())?.trim()}}function $ Z(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(YZ)].map(e=>e[1]))]}function eQ(e){let t=BZ(e).toJS(),n=XZ(t)&&Array.isArray(t.steps)?t.steps:[],r=[],i=[],a=new Map,o=[],s= ` start ` ;r.push({id:s,type: ` step ` ,position:{x:0,y:0},data:{kind: ` start ` ,key: ` start ` ,title: ` Starts when ` ,type: ` ` ,detail: ` ` }});let c=[s],l=1,u=new Map,d=e=>{let t=u.get(e)??0;return u.set(e,t+1),t},f=(e,t,n,i,s,c,l)=>{let u=XZ(e)?e:{},f=typeof u.type== ` string ` ?u.type: ` ` ,p=XZ(u.settings)?u.settings:{},m=typeof u.id== ` string ` ?u.id: ` ` ,h= ` step - $ { t } ` ,g=s? ` $ { s } / $ { m || f } ` :m||f;r.push({id:h,type: ` step ` ,position:{x:n,y:i},data:{kind: ` step ` ,key:m||t,title:m||JZ(f),type:f,detail:ZZ(f,p),summary:QZ(p),when:typeof u.when== ` string ` ?u.when:void 0,retry:XZ(u.retry)&&typeof u.retry.attempts== ` number ` ?u.retry.attempts:void 0,continues:u.on_failure=== ` continue ` ,branch:s,path:l,stage:g,occurrence:d(g),...c?{resume:c}:{}}}),m&&a.set(m,h);for(let e of $ Z(u.settings,u.when))o.push({from:e,to:h});return h},p=(e,t,n)=>{e.forEach((r,a)=>i.push({id: ` flow - $ { r } - $ { t } ` ,source:r,target:t,kind: ` flow ` ,insertAfter:a===e.length-1?n:void 0}))};for(let[e,t]of n.entries()){if(XZ(t)&&XZ(t.parallel)){let n=Object.entries(t.parallel),r=typeof t.id== ` string ` ?t.id: ` parallel ` ,i=[],a=0;n.forEach(([t,o],s)=>{let u=(s-(n.length-1)/2)*KZ,d=c,m=c;(Array.isArray(o)?o:[]).forEach((i,o)=>{let c=f(i, ` $ { e + 1 } - $ { t } - $ { o + 1 } ` ,u,(l+o)*GZ,t,r,[ ` steps ` ,e, ` parallel ` ,t,o]);p(d,c,d===m&&s===n.length-1?e-1:void 0),d=[c],a=Math.max(a,o+1)}),i.push(...d)}),c=i,l+=Math.max(a,1);continue}let n=f(t,String(e+1),0,l*GZ,void 0,void 0,[ ` steps ` ,e]);p(c,n,e-1),c=[n],l++}r.push({id: ` add - end ` ,type: ` add ` ,position:{x:104,y:l*GZ-24},data:{kind: ` step ` ,key: ` add ` ,title: ` ` ,type: ` ` ,detail: ` ` }}),p(c, ` add - end ` );for(let{from:e,to:t}of o){let n=a.get(e);n&&(i.some(e=>e.kind=== ` flow ` &&e.source===n&&e.target===t)||i.push({id: ` data - $ { n } - $ { t } ` ,source:n,target:t,kind: ` data ` ,label:e,offset:24+14*i.filter(e=>e.kind=== ` data ` ).length,sourceHandle: ` data - out ` ,targetHandle: ` data - in ` }))}return{nodes:r,edges:i}}var tQ={agent:Yu,command:Id,repo:dd,gate:Nd,forge:yd,human:Ud,review:ld,workflow:Kd},nQ={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function rQ(e){return tQ[e.split( ` . ` )[0]]??Kd}function iQ(e){return Object.keys(nQ).map(t=>({title:nQ[t],icon:tQ[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function aQ(e,t){let n=BZ(e).getIn(t,!0);if(oJ(n))return n.toJSON()}function oQ(e,t,n){let r=BZ(e);return r.setIn(t,r.createNode(fQ(n))),r.toString()}function sQ(e,t,n){let r=BZ(e),i=r.get( ` steps ` ,!0);if(lJ(i)||(r.set( ` steps ` ,r.createNode([])),i=r.get( ` steps ` ,!0)),!lJ(i))return{source:e,path:[]};let a=Math.min(Math.max(t+1,0),i.items.length);return i.items.splice(a,0,r.createNode({type:n})),{source:r.toString(),path:[ ` steps ` ,a]}}function cQ(e,t){let n=BZ(e),r=n.getIn(t.slice(0,-1),!0),i=t.at(-1);if(!lJ(r)||typeof i!= ` number ` )return{source:e,path:t};let a=n.createNode(n.getIn(t));return oJ(a)&&a.delete( ` id ` ),r.items.splice(i+1,0,a),{source:n.toString(),path:[...t.slice(0,-1),i+1]}}function lQ(e,t){let n=BZ(e);n.deleteIn(t);let r=t.slice(0,-1);if(r.length>2){let e=n.getIn(r,!0);lJ(e)&&e.items.length===0&&n.deleteIn(r)}return n.toString()}function uQ(e,t,n){let r=BZ(e),i=r.getIn(t.slice(0,-1),!0),a=t.at(-1);if(!lJ(i)||typeof a!= ` number ` )return{source:e,path:t};let o=a+n;if(o<0||o>=i.items.length)return{source:e,path:t};let[s]=i.items.splice(a,1);return i.items.splice(o,0,s),{source:r.toString(),path:[...t.slice(0,-1),o]}}function dQ(e,t){let n=BZ(e).toJS(),r=Array.isArray(n?.steps)?n.steps:[],i=typeof t[1]== ` number ` ?t[1]:r.length,a=[],o=e=>{if(typeof e!= ` object ` ||!e)return;let t=e;if(typeof t.id== ` string ` &&a.push(t.id),typeof t.parallel== ` object ` &&t.parallel!==null)for(let e of Object.values(t.parallel))Array.isArray(e)&&e.forEach(o)};if(r.slice(0,i).forEach(o),t.length===5){let e=r[i]?.parallel?.[t[3]];Array.isArray(e)&&e.slice(0,t[4]).forEach(o)}return a}function fQ(e){if(Array.isArray(e))return e.map(fQ);if(typeof e!= ` object ` ||!e)return e;let t={};for(let[n,r]of Object.entries(e)){if(r===void 0||r=== ` ` ||r===null)continue;let e=fQ(r);(typeof e!= ` object ` ||!e||Array.isArray(e)||Object.keys(e).length!==0)&&(t[n]=e)}return t}function pQ(e,t){let n=BZ(e).get(t,!0);return n&&typeof n== ` object ` && ` toJSON ` in n?n.toJSON():BZ(e).get(t)}function mQ(e,t,n){let r=BZ(e),i=fQ({[t]:n})[t];return i===void 0?r.delete(t):r.set(t,r.createNode(i)),r.toString()}function hQ(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function gQ(e,t=[]){let n=BZ(e),r=n.errors[0];if(r)return{ok:!1,message:AQ(r.message),line:r.linePos?.[0]?.line};let i=n.toJS();if(!jQ(i))return{ok:!1,message: ` A workflow is a mapping with an id and steps . ` };let a=typeof i.id== ` string ` ?i.id.trim(): ` ` ;if(!a)return{ok:!1,message: ` workflow id is required ` };le
Line truncated
` ).map((e,t)=>({number:t+1,text:e,tokens:EQ(e)}))}var wQ=/^( \s *)(- \s +)?/,TQ=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function EQ(e){let{code:t,comment:n}=DQ(e),r=OQ(t);return n&&r.push({text:n,kind: ` comment ` }),r}function DQ(e){let t= ` ` ;for(let n=0;n<e.length;n++){let r=e[n];if(t){r===t&&(t= ` ` );continue}if(r=== ` "`||r===`'`){t=r;continue}if(r===`#`&&(n===0||/\s/.test(e[n-1]??``)))return{code:e.slice(0,n),comment:e.slice(n)}}return{code:e,comment:``}}function OQ(e){if(!e)return[];let t=[],n=wQ.exec(e);n?.[1]&&t.push({text:n[1],kind:`plain`}),n?.[2]&&t.push({text:n[2],kind:`punct`});let r=e.slice(n?.[0].length??0);if(!r)return t;let i=TQ.exec(r);return i?(t.push({text:i[1]??``,kind:`key`}),t.push({text:i[2]??`:`,kind:`punct`}),i[3]&&t.push({text:i[3],kind:`plain`}),[...t,...kQ(i[4]??``)]):[...t,...kQ(r)]}function kQ(e){if(!e)return[];let t=/^(" [ ^ "]*" ? | '[^' ] * ' ? ) ( [ \ s \ S ] * ) $ / . exec ( e ) ; if ( ! t ) return [ { text : e , kind : ` plain ` } ] ; let n = [ { text : t [ 1 ] ? ? ` ` , kind : ` string ` } ] ; return t [ 2 ] && n . push ( { text : t [ 2 ] , kind : ` plain ` } ) , n } function AQ ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function jQ(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function MQ(e){return typeof e== ` string ` &&e.trim()!== ` ` }var NQ={class: ` flex h - full w - [ 24 rem ] flex - col border - l border - border bg - card shadow - xl ` },PQ={class: ` flex items - center gap - 2.5 border - b border - border px - 4 py - 3 ` },FQ={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },IQ={class: ` min - w - 0 flex - 1 ` },LQ=[ ` value ` , ` placeholder ` ],RQ={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },zQ={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },BQ={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },VQ={key:1,class: ` space - y - 1.5 ` },HQ=[ ` title ` ],UQ=[ ` value ` ],WQ=[ ` value ` ],GQ={key:3,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },KQ=[ ` onClick ` ],qQ=[ ` onClick ` ],JQ={key:2,class: ` divide - y divide - border rounded - md border border - border ` },YQ=[ ` title ` ],XQ=[ ` value ` , ` onChange ` ],ZQ=[ ` value ` ],QQ=[ ` value ` , ` onInput ` ], $ Q=[ ` value ` , ` onFocus ` , ` onInput ` ],e $ =[ ` title ` ],t $ ={key:0,class: ` text - xs text - danger ` },n $ ={class: ` space - y - 2 ` },r $ ={class: ` divide - y divide - border rounded - md border border - border ` },i $ ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },a $ =[ ` value ` ],o $ ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },s $ =[ ` value ` ],c $ ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },l $ =[ ` value ` ],u $ ={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },d $ ={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` },f $ =I({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=J(()=>aQ(n.yaml,n.path)??{}),a=J(()=>typeof i.value.type== ` string ` ?i.value.type: ` ` ),o=J(()=>n.vocabulary.find(e=>e.name===a.value)),s=J(()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),c=J(()=>dQ(n.yaml,n.path)),l=J(()=>o.value?.settings&&i.value.settings?xQ(i.value.settings,o.value.settings, ` settings ` ): ` ` ),u=[ ` mission ` , ` workflow ` , ` message ` , ` body ` , ` plan ` , ` then ` , ` status ` , ` detail ` , ` run ` , ` rules ` ],d=/mission|body|detail|plan|rules/;function f(e,t){return t.type=== ` string ` ?t.enum? ` select ` :d.test(e)? ` text ` : ` line ` :t.type=== ` boolean ` ? ` boolean ` :t.type=== ` integer ` ||t.type=== ` number ` ? ` number ` :t.type=== ` array ` &&t.items?.type=== ` string ` ? ` lines ` : ` yaml ` }let p=J(()=>{let e=Object.entries(o.value?.settings?.properties??{}).map(([e,t])=>({key:e,schema:t,kind:f(e,t)})),t=e.filter(e=>u.includes(e.key)&&e.kind!== ` boolean ` ).sort((e,t)=>u.indexOf(e.key)-u.indexOf(t.key))[0],n=e.filter(e=>e!==t);return{lead:t,compact:n.filter(e=>[ ` select ` , ` line ` , ` number ` , ` boolean ` ].includes(e.kind)),long:n.filter(e=>[ ` text ` , ` lines ` , ` yaml ` ].includes(e.kind))}});function m(e){let{id:t,type:i,...a}=e;r( ` update : yaml ` ,oQ(n.yaml,n.path,{id:t,type:i,...a}))}function h(e,t){m({...i.value,[e]:t})}function g(e){h( ` retry ` ,{...i.value.retry,...e})}function _(e,t){m({...i.value,settings:{...s.value,[e]:t}})}let v=M(null);function y(e,t){let n=v.value??p.value.lead?.key;if(!n)return;let r=typeof s.value[n]== ` string ` ?s.value[n]: ` ` ,i= ` { { steps . $ { e } . $ { t } } } ` ;_(n,r? ` $ { r . trimEnd ( ) } $ { i } ` :i)}let b=M({});function x(e,t){try{_(e,t.trim()?VZ(t):void 0),b.value={...b.value,[e]: ` ` }}catch(t){b.value={...b.value,[e]:String(t.message).split( `
` )[0]}}}let S=e=>e===void 0? ` ` :HZ(e).trimEnd(),C=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),w=e=>typeof s.value[e]== ` string ` ?s.value[e]: ` ` ;return(e,t)=>(B(),V( ` aside ` ,NQ,[U( ` header ` ,PQ,[U( ` span ` ,FQ,[(B(),H(ea(N(rQ)(a.value)),{class: ` size - 4 ` }))]),U( ` div ` ,IQ,[U( ` input ` ,{value:i.value.id?? ` ` ,class: ` w - full truncate bg - transparent text - sm font - medium outline - none placeholder : text - fg - subtle focus : underline ` ,placeholder:N(JZ)(a.value),"aria-label": ` Step id ` ,onInput:t[0]||=e=>h( ` id ` ,e.target.value)},null,40,LQ),U( ` div ` ,RQ,j(a.value),1)]),W(N(Q),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:t[1]||=e=>r( ` close ` )},{default:P(()=>[W(N(q d))]),_:1})]),U( ` div ` ,zQ,[l.value?(B(),V( ` p ` ,BQ,j(l.value),1)):K( ` ` ,!0),p.value.lead?(B(),V( ` section ` ,VQ,[U( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:p.value.lead.schema.description},[G(j(C(p.value.lead.key,p.value.lead.schema))+ ` ` ,1),p.value.lead.schema.description?(B(),H(N(i d),{key:0,class: ` size - 3 text - fg - subtle ` })):K( ` ` ,!0)],8,HQ),p.value.lead.kind=== ` select ` ?(B(),V( ` select ` ,{key:0,class: ` h - 9 w - full rounded - md border border - input bg - background px - 2 ` ,value:w(p.value.lead.key),onChange:t[2]||=e=>_(p.value.lead.key,e.target.value||void 0)},[t[13]||=U( ` option ` ,{value: ` ` }, ` Default ` ,-1),(B(!0),V(z,null,L(p.value.lead.schema.enum,e=>(B(),V( ` option ` ,{key:e,value:e},j(e),9,WQ))),128))],40,UQ)):p.value.lead.kind=== ` text ` ?(B(),H(N(Z w),{key:1,"model-value":w(p.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:t[3]||=e=>v.value=p.value.lead.key,"onUpdate:modelValue":t[4]||=e=>_(p.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(B(),H(N(SD),{key:2,"model-value":w(p.value.lead.key),onFocus:t[5]||=e=>v.value=p.value.lead.key,"onUpdate:modelValue":t[6]||=e=>_(p.value.lead.key,String(e))},null,8,[ ` model - value ` ])),c.value.length&&p.value.lead.kind!== ` select ` ?(B(),V( ` div ` ,GQ,[t[14]||=U( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(B(!0),V(z,null,L(c.value,e=>(B(),V(z,{key:e},[U( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>y(e, ` summary ` )},j(e),9,KQ),U( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>y(e, ` result ` )},j(e)+ ` . result ` ,9,qQ)],64))),128))])):K( ` ` ,!0)])):K( ` ` ,!0),p.value.compact.length?(B(),V( ` section ` ,JQ,[(B(!0),V(z,null,L(p.value.compact,e=>(B(),V( ` div ` ,{key:e.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[U( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:e.schema.description},[G(j(C(e.key,e.schema))+ ` ` ,1),e.schema.description?(B(),H(N(i d),{key:0,class: ` size - 3 text - fg - subtle ` })):K( ` ` ,!0)],8,YQ),e.kind=== ` boolean ` ?(B(),H(N(qD),{key:0,"model-value":s.value[e.key]===!0,"onUpdate:modelValue":t=>_(e.key,t||void 0)},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):e.kind=== ` select ` ?(B(),V( ` select ` ,{key:1,class: ` h - 7 max - w - 40 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:w(e.key),onChange:t=>_(e.key,t.target.value||void 0)},[t[15]||=U( ` option ` ,{value: ` ` }, ` Default ` ,-1),(B(!0),V(z,null,L(e.schema.enum,e=>(B(),V( ` option ` ,{key:e,value:e},j(e),9,ZQ))),128))],40,XQ)):e.kind=== ` number ` ?(B(),V( ` input ` ,{key:2,type: ` number ` ,class: ` h - 7 w - 24 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:s.value[e.key]?? ` ` ,onInput:t=>_(e.key,t.target.value=== ` ` ?void 0:Number(t.target.value))},null,40,QQ)):(B(),V( ` input ` ,{key:3,class: ` h - 7 w - 40 rounded - md border border - input bg - background px - 2 text - [ 13 px ] ` ,value:w(e.key),onFocus:t=>v.value=e.key,onInput:t=>_(e.key,t.target.value)},null,40, $ Q))]))),128))])):K( ` ` ,!0),(B(!0),V(z,null,L(p.value.long,e=>(B(),V( ` section ` ,{key:e.key,class: ` space - y - 1.5 ` },[U( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:e.schema.description},[G(j(C(e.key,e.schema))+ ` ` ,1),e.schema.description?(B(),H(N(i d),{key:0,class: ` size - 3 text - fg - subtle ` })):K( ` ` ,!0)],8,e $ ),e.kind=== ` text ` ?(B(),H(N(Z w),{key:0,"model-value":w(e.key),class: ` min - h - 20 text - [ 13 px ] ` ,onFocus:t=>v.value=e.key,"onUpdate:modelValue":t=>_(e.key,String(t))},null,8,[ ` model - value ` , ` onFocus ` , ` onUpdate : modelValue ` ])):e.kind=== ` lines ` ?(B(),H(N(Z w),{key:1,"model-value":Array.isArray(s.value[e.key])?s.value[e.key].join( `
` )[0]}}}let S=e=>e===void 0? ` ` :HZ(e).trimEnd(),C=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),w=e=>typeof s.value[e]== ` string ` ?s.value[e]: ` ` ;return(e,t)=>(B(),V( ` aside ` ,NQ,[U( ` header ` ,PQ,[U( ` span ` ,FQ,[(B(),H(ea(N(rQ)(a.value)),{class: ` size - 4 ` }))]),U( ` div ` ,IQ,[U( ` input ` ,{value:i.value.id?? ` ` ,class: ` w - full truncate bg - transparent text - sm font - medium outline - none placeholder : text - fg - subtle focus : underline ` ,placeholder:N(JZ)(a.value),"aria-label": ` Step id ` ,onInput:t[0]||=e=>h( ` id ` ,e.target.value)},null,40,LQ),U( ` div ` ,RQ,j(a.value),1)]),W(N(Q),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:t[1]||=e=>r( ` close ` )},{default:P(()=>[W(N(J d))]),_:1})]),U( ` div ` ,zQ,[l.value?(B(),V( ` p ` ,BQ,j(l.value),1)):K( ` ` ,!0),p.value.lead?(B(),V( ` section ` ,VQ,[U( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:p.value.lead.schema.description},[G(j(C(p.value.lead.key,p.value.lead.schema))+ ` ` ,1),p.value.lead.schema.description?(B(),H(N(a d),{key:0,class: ` size - 3 text - fg - subtle ` })):K( ` ` ,!0)],8,HQ),p.value.lead.kind=== ` select ` ?(B(),V( ` select ` ,{key:0,class: ` h - 9 w - full rounded - md border border - input bg - background px - 2 ` ,value:w(p.value.lead.key),onChange:t[2]||=e=>_(p.value.lead.key,e.target.value||void 0)},[t[13]||=U( ` option ` ,{value: ` ` }, ` Default ` ,-1),(B(!0),V(z,null,L(p.value.lead.schema.enum,e=>(B(),V( ` option ` ,{key:e,value:e},j(e),9,WQ))),128))],40,UQ)):p.value.lead.kind=== ` text ` ?(B(),H(N( $ w),{key:1,"model-value":w(p.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:t[3]||=e=>v.value=p.value.lead.key,"onUpdate:modelValue":t[4]||=e=>_(p.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(B(),H(N(SD),{key:2,"model-value":w(p.value.lead.key),onFocus:t[5]||=e=>v.value=p.value.lead.key,"onUpdate:modelValue":t[6]||=e=>_(p.value.lead.key,String(e))},null,8,[ ` model - value ` ])),c.value.length&&p.value.lead.kind!== ` select ` ?(B(),V( ` div ` ,GQ,[t[14]||=U( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(B(!0),V(z,null,L(c.value,e=>(B(),V(z,{key:e},[U( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>y(e, ` summary ` )},j(e),9,KQ),U( ` button ` ,{type: ` button ` ,class: ` rounded - full border border - border px - 2 py - 0.5 font - mono text - [ 11 px ] hover : border - primary hover : text - primary ` ,onClick:t=>y(e, ` result ` )},j(e)+ ` . result ` ,9,qQ)],64))),128))])):K( ` ` ,!0)])):K( ` ` ,!0),p.value.compact.length?(B(),V( ` section ` ,JQ,[(B(!0),V(z,null,L(p.value.compact,e=>(B(),V( ` div ` ,{key:e.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[U( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:e.schema.description},[G(j(C(e.key,e.schema))+ ` ` ,1),e.schema.description?(B(),H(N(a d),{key:0,class: ` size - 3 text - fg - subtle ` })):K( ` ` ,!0)],8,YQ),e.kind=== ` boolean ` ?(B(),H(N(qD),{key:0,"model-value":s.value[e.key]===!0,"onUpdate:modelValue":t=>_(e.key,t||void 0)},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):e.kind=== ` select ` ?(B(),V( ` select ` ,{key:1,class: ` h - 7 max - w - 40 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:w(e.key),onChange:t=>_(e.key,t.target.value||void 0)},[t[15]||=U( ` option ` ,{value: ` ` }, ` Default ` ,-1),(B(!0),V(z,null,L(e.schema.enum,e=>(B(),V( ` option ` ,{key:e,value:e},j(e),9,ZQ))),128))],40,XQ)):e.kind=== ` number ` ?(B(),V( ` input ` ,{key:2,type: ` number ` ,class: ` h - 7 w - 24 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:s.value[e.key]?? ` ` ,onInput:t=>_(e.key,t.target.value=== ` ` ?void 0:Number(t.target.value))},null,40,QQ)):(B(),V( ` input ` ,{key:3,class: ` h - 7 w - 40 rounded - md border border - input bg - background px - 2 text - [ 13 px ] ` ,value:w(e.key),onFocus:t=>v.value=e.key,onInput:t=>_(e.key,t.target.value)},null,40, $ Q))]))),128))])):K( ` ` ,!0),(B(!0),V(z,null,L(p.value.long,e=>(B(),V( ` section ` ,{key:e.key,class: ` space - y - 1.5 ` },[U( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:e.schema.description},[G(j(C(e.key,e.schema))+ ` ` ,1),e.schema.description?(B(),H(N(a d),{key:0,class: ` size - 3 text - fg - subtle ` })):K( ` ` ,!0)],8,e $ ),e.kind=== ` text ` ?(B(),H(N( $ w),{key:0,"model-value":w(e.key),class: ` min - h - 20 text - [ 13 px ] ` ,onFocus:t=>v.value=e.key,"onUpdate:modelValue":t=>_(e.key,String(t))},null,8,[ ` model - value ` , ` onFocus ` , ` onUpdate : modelValue ` ])):e.kind=== ` lines ` ?(B(),H(N( $ w),{key:1,"model-value":Array.isArray(s.value[e.key])?s.value[e.key].join( `
` ): ` ` ,class: ` min - h - 16 font - mono text - xs ` ,placeholder: ` One per line ` ,"onUpdate:modelValue":t=>_(e.key,String(t).split( `
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(B(),V(z,{key:2},[W(N(Zw),{"model-value":S(s.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>x(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),b.value[e.key]?(B(),V( ` span ` ,t $ ,j(b.value[e.key]),1)):K( ` ` ,!0)],64))]))),128)),U( ` section ` ,n $ ,[t[21]||=U( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),U( ` div ` ,r $ ,[U( ` label ` ,i $ ,[t[16]||=U( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),U( ` input ` ,{class: ` h - 7 w - 48 rounded - md border border - input bg - background px - 2 font - mono text - xs ` ,placeholder: ` always ` ,value:i.value.when?? ` ` ,onInput:t[7]||=e=>h( ` when ` ,e.target.value)},null,40,a $ )]),U( ` label ` ,o $ ,[t[18]||=U( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),U( ` select ` ,{class: ` h - 7 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:i.value.on_failure?? ` ` ,onChange:t[8]||=e=>h( ` on _failure ` ,e.target.value||void 0)},[...t[17]||=[U( ` option ` ,{value: ` ` }, ` Park the task ` ,-1),U( ` option ` ,{value: ` continue ` }, ` Continue ` ,-1)]],40,s $ )]),U( ` label ` ,c $ ,[t[19]||=U( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),U( ` input ` ,{type: ` number ` ,min: ` 1 ` ,max: ` 10 ` ,placeholder: ` 1 ` ,class: ` h - 7 w - 20 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:i.value.retry?.attempts?? ` ` ,onInput:t[9]||=e=>g({attempts:e.target.value=== ` ` ?void 0:Number(e.target.value)})},null,40,l $ )]),U( ` label ` ,u $ ,[t[20]||=U( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),W(N(FD),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":t[10]||=e=>g({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),U( ` footer ` ,d $ ,[W(N(Q),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:t[11]||=e=>r( ` remove ` )},{default:P(()=>[W(N(Ld)),t[22]||=G( ` Delete step ` ,-1)]),_:1}),W(N(Q),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:t[12]||=e=>r( ` close ` )},{default:P(()=>[...t[23]||=[G( ` Done ` ,-1)]]),_:1})])]))}}),p $ = ` repository _path ` ;function m $ (e,t,n){let r=[];for(let[n,i]of e){let e=t[n];e?.from=== ` path ` &&e.path.trim()&&r.push({name:n,path:e.path.trim(),type:i.type?? ` string ` ,required:i.required===!0})}return n.trim()&&r.push({name:p $ ,path:n.trim(),type: ` string ` ,required:!0}),r}function h $ (e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function g $ (e,t,n){let r=[];for(let[i,a]of e){let e=t[i],o=a.type?? ` string ` ;if(!(e&&(e.from=== ` path ` ?e.path.trim():e.value!== ` ` ))){a.required&&r.push( ` $ { i } is required ` );continue}if(e.from=== ` path ` ){let e=n?.failures?.find(e=>e.field_name===i);e&&r.push( ` $ { i } : $ { e . reason } ` );continue}let s=h $ ( $ M(e.value,o));o!== ` any ` &&s!==o&&r.push( ` $ { i } is $ { o } , but $ { JSON . stringify ( e . value ) } is not ` )}return n?.failures?.some(e=>e.field_name=== ` repository _path ` )&&r.push( ` the repository path does not resolve ` ),r}function _ $ (e,t){let n={};for(let[r,i]of e){let e=t[r];e?.from=== ` path ` &&e.path.trim()?n[r]={param:r}:e?.from=== ` value ` &&e.value!== ` ` &&(n[r]={value: $ M(e.value,i.type?? ` string ` )})}return n}function v $ (e,t){let n=e=>t.find(t=>t.name===e)?.path?? ` ` ,r={};for(let[t,i]of Object.entries(e.inputs??{}))r[t]=i.param?{from: ` path ` ,path:n(i.param),value: ` ` }:{from: ` value ` ,path: ` ` ,value:typeof i.value== ` string ` ?i.value:JSON.stringify(i.value)};return{rows:r,repositoryPath:n(e.repo_param)}}function y $ (e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...y $ (e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...y $ (n,r)]}):[]}function b $ (e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function x $ (e){try{let t=JSON.parse(e.headers?? ` { } ` );return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,Array.isArray(t)?t.join( ` , ` ):String(t)]))}catch{return{}}}function S $ (e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var C $ ={class: ` flex h - full flex - col ` },w $ ={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },T $ ={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },E $ ={key:0,class: ` flex flex - 1 items - center justify - center ` },D $ ={class: ` space - y - 1.5 ` },O $ =[ ` disabled ` ],k $ =[ ` value ` ],A $ ={key:1,class: ` space - y - 1.5 ` },j $ =[ ` value ` ],M $ =[ ` title ` ],N $ ={class: ` space - y - 1.5 ` },P $ ={id: ` bind - paths ` },F $ =[ ` value ` ],I $ ={class: ` divide - y divide - border rounded - md border border - border ` },L $ ={class: ` flex items - center gap - 1.5 text - xs ` },R $ ={class: ` font - mono ` },z $ ={class: ` text - fg - subtle ` },B $ ={key:0,class: ` text - danger ` ,title: ` Required ` },V $ =[ ` title ` , ` aria - label ` , ` onClick ` ],H $ =[ ` onUpdate : modelValue ` , ` aria - label ` ],U $ =[ ` onUpdate : modelValue ` , ` aria - label ` ],W $ ={key:2,class: ` text - xs text - danger ` },G $ =[ ` title ` ],K $ ={key:0,class: ` space - y - 1 px - 3 py - 2 ` },q $ ={key:0,class: ` text - xs text - danger ` },J $ ={key:1,class: ` truncate font - mono text - xs text - success ` },Y $ ={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },X $ ={class: ` space - y - 2 ` },Z $ ={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },Q $ ={key:1,class: ` tex Line truncated
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(B(),V(z,{key:2},[W(N( $ w),{"model-value":S(s.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>x(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),b.value[e.key]?(B(),V( ` span ` ,t $ ,j(b.value[e.key]),1)):K( ` ` ,!0)],64))]))),128)),U( ` section ` ,n $ ,[t[21]||=U( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),U( ` div ` ,r $ ,[U( ` label ` ,i $ ,[t[16]||=U( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),U( ` input ` ,{class: ` h - 7 w - 48 rounded - md border border - input bg - background px - 2 font - mono text - xs ` ,placeholder: ` always ` ,value:i.value.when?? ` ` ,onInput:t[7]||=e=>h( ` when ` ,e.target.value)},null,40,a $ )]),U( ` label ` ,o $ ,[t[18]||=U( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),U( ` select ` ,{class: ` h - 7 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:i.value.on_failure?? ` ` ,onChange:t[8]||=e=>h( ` on _failure ` ,e.target.value||void 0)},[...t[17]||=[U( ` option ` ,{value: ` ` }, ` Park the task ` ,-1),U( ` option ` ,{value: ` continue ` }, ` Continue ` ,-1)]],40,s $ )]),U( ` label ` ,c $ ,[t[19]||=U( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),U( ` input ` ,{type: ` number ` ,min: ` 1 ` ,max: ` 10 ` ,placeholder: ` 1 ` ,class: ` h - 7 w - 20 rounded - md border border - input bg - background px - 2 text - right text - [ 13 px ] ` ,value:i.value.retry?.attempts?? ` ` ,onInput:t[9]||=e=>g({attempts:e.target.value=== ` ` ?void 0:Number(e.target.value)})},null,40,l $ )]),U( ` label ` ,u $ ,[t[20]||=U( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),W(N(FD),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":t[10]||=e=>g({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),U( ` footer ` ,d $ ,[W(N(Q),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:t[11]||=e=>r( ` remove ` )},{default:P(()=>[W(N(Rd)),t[22]||=G( ` Delete step ` ,-1)]),_:1}),W(N(Q),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:t[12]||=e=>r( ` close ` )},{default:P(()=>[...t[23]||=[G( ` Done ` ,-1)]]),_:1})])]))}}),p $ = ` repository _path ` ;function m $ (e,t,n){let r=[];for(let[n,i]of e){let e=t[n];e?.from=== ` path ` &&e.path.trim()&&r.push({name:n,path:e.path.trim(),type:i.type?? ` string ` ,required:i.required===!0})}return n.trim()&&r.push({name:p $ ,path:n.trim(),type: ` string ` ,required:!0}),r}function h $ (e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function g $ (e,t,n){let r=[];for(let[i,a]of e){let e=t[i],o=a.type?? ` string ` ;if(!(e&&(e.from=== ` path ` ?e.path.trim():e.value!== ` ` ))){a.required&&r.push( ` $ { i } is required ` );continue}if(e.from=== ` path ` ){let e=n?.failures?.find(e=>e.field_name===i);e&&r.push( ` $ { i } : $ { e . reason } ` );continue}let s=h $ (QM(e.value,o));o!== ` any ` &&s!==o&&r.push( ` $ { i } is $ { o } , but $ { JSON . stringify ( e . value ) } is not ` )}return n?.failures?.some(e=>e.field_name=== ` repository _path ` )&&r.push( ` the repository path does not resolve ` ),r}function _ $ (e,t){let n={};for(let[r,i]of e){let e=t[r];e?.from=== ` path ` &&e.path.trim()?n[r]={param:r}:e?.from=== ` value ` &&e.value!== ` ` &&(n[r]={value:QM(e.value,i.type?? ` string ` )})}return n}function v $ (e,t){let n=e=>t.find(t=>t.name===e)?.path?? ` ` ,r={};for(let[t,i]of Object.entries(e.inputs??{}))r[t]=i.param?{from: ` path ` ,path:n(i.param),value: ` ` }:{from: ` value ` ,path: ` ` ,value:typeof i.value== ` string ` ?i.value:JSON.stringify(i.value)};return{rows:r,repositoryPath:n(e.repo_param)}}function y $ (e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...y $ (e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...y $ (n,r)]}):[]}function b $ (e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function x $ (e){try{let t=JSON.parse(e.headers?? ` { } ` );return Object.fromEntries(Object.entries(t).map(([e,t])=>[e,Array.isArray(t)?t.join( ` , ` ):String(t)]))}catch{return{}}}function S $ (e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var C $ ={class: ` flex h - full flex - col ` },w $ ={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },T $ ={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },E $ ={key:0,class: ` flex flex - 1 items - center justify - center ` },D $ ={class: ` space - y - 1.5 ` },O $ =[ ` disabled ` ],k $ =[ ` value ` ],A $ ={key:1,class: ` space - y - 1.5 ` },j $ =[ ` value ` ],M $ =[ ` title ` ],N $ ={class: ` space - y - 1.5 ` },P $ ={id: ` bind - paths ` },F $ =[ ` value ` ],I $ ={class: ` divide - y divide - border rounded - md border border - border ` },L $ ={class: ` flex items - center gap - 1.5 text - xs ` },R $ ={class: ` font - mono ` },z $ ={class: ` text - fg - subtle ` },B $ ={key:0,class: ` text - danger ` ,title: ` Required ` },V $ =[ ` title ` , ` aria - label ` , ` onClick ` ],H $ =[ ` onUpdate : modelValue ` , ` aria - label ` ],U $ =[ ` onUpdate : modelValue ` , ` aria - label ` ],W $ ={key:2,class: ` text - xs text - danger ` },G $ =[ ` title ` ],K $ ={key:0,class: ` space - y - 1 px - 3 py - 2 ` },q $ ={key:0,class: ` text - xs text - danger ` },J $ ={key:1,class: ` truncate font - mono text - xs text - success ` },Y $ ={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },X $ ={class: ` space - y - 2 ` },Z $ ={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },Q $ ={key:1,class: ` tex Line truncated
` ).replace( `
` , `
@@ -153,4 +153,4 @@ Edge: ${e}
Source : $ { t }
Target : $ { n } ` ,EDGE_ORPHANED:e=> ` Edge was orphaned ( suddenly missing source or target ) and has been removed
Edge : $ { e } ` ,EDGE_NOT_FOUND:e=> ` Edge not found
Edge : $ { e } ` ,USEVUEFLOW_OPTIONS:()=> ` The options parameter is deprecated and will be removed in the next major version . Please use the id parameter instead ` },A7=class extends Error{constructor(e,...t){super(k7[e]?.call(k7,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function j7(e){return ` clientX ` in e}function dre(e){return ` sourceEvent ` in e}function M7(e,t){let n=j7(e),r,i;return n?(r=e.clientX,i=e.clientY): ` touches ` in e&&e.touches.length>0?(r=e.touches[0].clientX,i=e.touches[0].clientY): ` changedTouches ` in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(r=0,i=0),{x:r-(t?.left??0),y:i-(t?.top??0)}}var N7=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function fre(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function P7(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var pre=()=>!0;function F7(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function mre(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())H5(i,V5(e))>0&&r.push(e);return r}var hre=250;function gre(e,t,n,r){let i=[],a=1/0,o=mre(e,n,t+hre);for(let n of o){let o=[...n.handleBounds?.source??[],...n.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=E7(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type=== ` source ` ? ` target ` : ` source ` ;return i.find(t=>t.type===e)??i[0]}return i[0]}function I7(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=pre},u,d,f,p){let m=a=== ` target ` ,h=t?o.querySelector( ` . $ { s } - flow _ _handle [ data - id = "${c}-${t?.nodeId}-${t?.id}-${t?.type}" ] ` ):null,{x:g,y:_}=M7(e),v=o.elementFromPoint(g,_),y=v?.classList.contains( ` $ { s } - flow _ _handle ` )?v:h,b={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){let e=L7(void 0,y),t=y.getAttribute( ` data - nodeid ` ),a=y.getAttribute( ` data - handleid ` ),o=y.classList.contains( ` connectable ` ),s=y.classList.contains( ` connectableend ` );if(!t||!e)return b;let c={source:m?t:r,sourceHandle:m?a:i,target:m?r:t,targetHandle:m?i:a};b.connection=c,b.isValid=o&&s&&(n===A5.Strict?m&&e=== ` source ` ||!m&&e=== ` target ` :t!==r||a!==i)&&l(c,{nodes:d,edges:u,sourceNode:f(c.source),targetNode:f(c.target)}),b.toHandle=R7(t,e,a,p,n,!0)}return b}function L7(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function _re(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function vre(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function R7(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===A5.Strict?o.handleBounds?.[t]:[...o.handleBounds?.source??[],...o.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...E7(o,c,c.position,!0)}:c}var z7={[D5.Left]:D5.Right,[D5.Right]:D5.Left,[D5.Top]:D5.Bottom,[D5.Bottom]:D5.Top},yre=[ ` production ` , ` prod ` ];function B7(e,...t){V7()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function V7(){return!yre.includes( ` production ` )}function H7(e,t,n,r,i){let a=t.querySelectorAll( ` . vue - flow _ _handle . $ { e } ` );return a?.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute( ` data - handleid ` ),type:e,nodeId:i,position:t.getAttribute( ` data - handlepos ` ),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...U5(t)}}):null}function U7(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),qn(()=>{o.blur()})):n([e])}function W7(e){return N(e)!==void 0}function bre(e,t,n,r){if(!e||!e.source||!e.target)return n(new A7(O7.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=q5(e)?e:{...e,id: $ 5(e)},i=Z5(i,void 0,r),! $ ne(i,t)&&i}function xre(e,t,n,r,i){if(!t.source||!t.target)return i(new A7(O7.EDGE_INVALID,e.id)),!1;if(!n)return i(new A7(O7.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r? $ 5(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function G7(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!J5(o)){n(new A7(O7.NODE_INVALID,o?.id));continue}let s=Xne(o,t(o.id),o.parentNode);o.parentNode&&(r[o.parentNode]=!0),i[a]=s}for(let e of i){let a=t(e.parentNode)||i.find(t=>t.id===e.parentNode);e.parentNode&&!a&&n(new A7(O7.NODE_MISSING_PARENT,e.id,e.parentNode)),(e.parentNode||r[e.id])&&(r[e.id]&&(e.isParent=!0),a&&(a.isParent=!0))}return i}function K7(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o= ` $ { i } - $ { e } ` ;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o= ` $ { i } - $ { e } - $ { a } ` ;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function q7(e,t,n){e.clear();for(let t of n){let{source:n,target:r,sourceHandle:i=null,targetHandle:a=null}=t,o={edgeId:t.id,source:n,target:r,sourceHandle:i,targetHandle:a},s= ` $ { n } - $ { i } -- $ { r } - $ { a } ` ;K7( ` sourc Line truncated
Edge : $ { e } ` ,USEVUEFLOW_OPTIONS:()=> ` The options parameter is deprecated and will be removed in the next major version . Please use the id parameter instead ` },A7=class extends Error{constructor(e,...t){super(k7[e]?.call(k7,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function j7(e){return ` clientX ` in e}function dre(e){return ` sourceEvent ` in e}function M7(e,t){let n=j7(e),r,i;return n?(r=e.clientX,i=e.clientY): ` touches ` in e&&e.touches.length>0?(r=e.touches[0].clientX,i=e.touches[0].clientY): ` changedTouches ` in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(r=0,i=0),{x:r-(t?.left??0),y:i-(t?.top??0)}}var N7=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function fre(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function P7(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var pre=()=>!0;function F7(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function mre(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())H5(i,V5(e))>0&&r.push(e);return r}var hre=250;function gre(e,t,n,r){let i=[],a=1/0,o=mre(e,n,t+hre);for(let n of o){let o=[...n.handleBounds?.source??[],...n.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=E7(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type=== ` source ` ? ` target ` : ` source ` ;return i.find(t=>t.type===e)??i[0]}return i[0]}function I7(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=pre},u,d,f,p){let m=a=== ` target ` ,h=t?o.querySelector( ` . $ { s } - flow _ _handle [ data - id = "${c}-${t?.nodeId}-${t?.id}-${t?.type}" ] ` ):null,{x:g,y:_}=M7(e),v=o.elementFromPoint(g,_),y=v?.classList.contains( ` $ { s } - flow _ _handle ` )?v:h,b={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){let e=L7(void 0,y),t=y.getAttribute( ` data - nodeid ` ),a=y.getAttribute( ` data - handleid ` ),o=y.classList.contains( ` connectable ` ),s=y.classList.contains( ` connectableend ` );if(!t||!e)return b;let c={source:m?t:r,sourceHandle:m?a:i,target:m?r:t,targetHandle:m?i:a};b.connection=c,b.isValid=o&&s&&(n===A5.Strict?m&&e=== ` source ` ||!m&&e=== ` target ` :t!==r||a!==i)&&l(c,{nodes:d,edges:u,sourceNode:f(c.source),targetNode:f(c.target)}),b.toHandle=R7(t,e,a,p,n,!0)}return b}function L7(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function _re(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function vre(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function R7(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===A5.Strict?o.handleBounds?.[t]:[...o.handleBounds?.source??[],...o.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...E7(o,c,c.position,!0)}:c}var z7={[D5.Left]:D5.Right,[D5.Right]:D5.Left,[D5.Top]:D5.Bottom,[D5.Bottom]:D5.Top},yre=[ ` production ` , ` prod ` ];function B7(e,...t){V7()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function V7(){return!yre.includes( ` production ` )}function H7(e,t,n,r,i){let a=t.querySelectorAll( ` . vue - flow _ _handle . $ { e } ` );return a?.length?Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute( ` data - handleid ` ),type:e,nodeId:i,position:t.getAttribute( ` data - handlepos ` ),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...U5(t)}}):null}function U7(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),qn(()=>{o.blur()})):n([e])}function W7(e){return N(e)!==void 0}function bre(e,t,n,r){if(!e||!e.source||!e.target)return n(new A7(O7.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=q5(e)?e:{...e,id: $ 5(e)},i=Z5(i,void 0,r),! $ ne(i,t)&&i}function xre(e,t,n,r,i){if(!t.source||!t.target)return i(new A7(O7.EDGE_INVALID,e.id)),!1;if(!n)return i(new A7(O7.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r? $ 5(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function G7(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!J5(o)){n(new A7(O7.NODE_INVALID,o?.id));continue}let s=Xne(o,t(o.id),o.parentNode);o.parentNode&&(r[o.parentNode]=!0),i[a]=s}for(let e of i){let a=t(e.parentNode)||i.find(t=>t.id===e.parentNode);e.parentNode&&!a&&n(new A7(O7.NODE_MISSING_PARENT,e.id,e.parentNode)),(e.parentNode||r[e.id])&&(r[e.id]&&(e.isParent=!0),a&&(a.isParent=!0))}return i}function K7(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o= ` $ { i } - $ { e } ` ;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o= ` $ { i } - $ { e } - $ { a } ` ;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function q7(e,t,n){e.clear();for(let t of n){let{source:n,target:r,sourceHandle:i=null,targetHandle:a=null}=t,o={edgeId:t.id,source:n,target:r,sourceHandle:i,targetHandle:a},s= ` $ { n } - $ { i } -- $ { r } - $ { a } ` ;K7( ` sourc Line truncated