@@ -1,70 +1,70 @@
const _ _vite _ _mapDeps = ( i , m = _ _vite _ _mapDeps , d = ( m . f || ( m . f = [ "assets/AgentProfilesPage.js" , "assets/PageHeader.js" , "assets/HistoryLink.js" , "assets/CredentialBindingsPage.js" , "assets/PlaybooksPage.js" , "assets/HarnessPage.js" , "assets/HarnessPage.css" ] ) ) ) => i . map ( i => d [ i ] ) ;
import { $ as e , $n as t , $t as n , A as r , An as i , Ar as a , At as o , B as s , Bn as c , Bt as l , Cn as u , Cr as d , Ct as f , D as p , Dn as m , Dr as h , Dt as g , En as _ , Er as v , Et as y , F as b , Fn as x , Ft as S , G as C , Gn as w , Gt as T , H as ee , Hn as E , Ht as te , I as D , In as ne , It as O , J as re , Jn as ie , Jt as ae , K as oe , Kn as se , Kt as ce , L as le , Ln as ue , Lt as de , M as fe , Mn as pe , Mr as me , Mt as he , N as ge , Nn as _e , Nt as ve , O as ye , On as be , Or as k , Ot as xe , P as Se , Pn as Ce , Pt as we , Q as Te , Qn as Ee , Qt as De , R as Oe , Rn as ke , Rt as Ae , S as je , Sn as Me , Sr as Ne , St as Pe , T as Fe , Tn as Ie , Tr as A , Tt as Le , U as Re , Un as ze , Ut as Be , V as Ve , Vn as He , Vt as Ue , W as We , Wn as j , Wt as Ge , X as Ke , Xn as qe , Xt as Je , Y as Ye , Yn as Xe , Yt as Ze , Z as Qe , Zn as $e , Zt as M , _ as et , _n as N , _r as tt , _t as P , a as nt , an as F , ar as rt , at as it , b as at , bn as ot , br as st , bt as ct , cn as lt , cr as ut , ct as dt , dn as I , dr as ft , dt as pt , en as mt , er as ht , et as gt , f as _t , fn as vt , fr as yt , ft as bt , gn as xt , gr as St , gt as L , h as Ct , hn as wt , hr as R , ht as z , i as B , in as Tt , ir as Et , it as Dt , j as Ot , jn as kt , jr as V , jt as At , k as jt , kn as Mt , kr as Nt , kt as Pt , ln as Ft , lr as It , lt as Lt , mn as Rt , mr as zt , mt as H , n as Bt , nn as Vt , nr as Ht , nt as Ut , on as Wt , or as Gt , ot as Kt , pn as qt , pr as Jt , pt as U , q as Yt , qn as Xt , qt as Zt , r as Qt , rn as $t , rr as en , rt as W , sn as tn , sr as nn , st as rn , t as an , tn as on , tr as sn , tt as cn , un as ln , ur as un , ut as dn , v as fn , vn as G , vr as pn , vt as mn , wn as hn , wr as gn , wt as K , x as q , xn as _n , xr as vn , xt as yn , y as bn , yn as xn , yr as Sn , yt as Cn , z as wn , zn as J , zt as Tn } from "./PageHeader.js" ; import { C as En , S as Dn , T as On , _ as kn , a as An , b as jn , c as Mn , d as Nn , f as Pn , g as Fn , h as In , i as Ln , l as Rn , m as zn , n as Bn , o as Vn , p as Hn , r as Un , s as Wn , t as Gn , u as Kn , v as Y , w as qn , x as Jn , y as Yn } from "./HistoryLink.js" ; var Xn = Object . defineProperty , Zn = ( e , t ) => { let n = { } ; for ( var r in e ) Xn ( n , r , { get : e [ r ] , enumerable : ! 0 } ) ; return t || Xn ( n , Symbol . toStringTag , { value : ` Module ` } ) , n } ; ( function ( ) { let e = document . createElement ( ` link ` ) . relList ; if ( e && e . supports && e . supports ( ` modulepreload ` ) ) return ; for ( let e of document . querySelectorAll ( ` link[rel="modulepreload"] ` ) ) n ( e ) ; new MutationObserver ( e => { for ( let t of e ) if ( t . type === ` childList ` ) for ( let e of t . addedNodes ) e . tagName === ` LINK ` && e . rel === ` modulepreload ` && n ( e ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function t ( e ) { let t = { } ; return e . integrity && ( t . integrity = e . integrity ) , e . referrerPolicy && ( t . referrerPolicy = e . referrerPolicy ) , t . credentials = e . crossOrigin === ` use-credentials ` ? ` include ` : e . crossOrigin === ` anonymous ` ? ` omit ` : ` same-origin ` , t } function n ( e ) { if ( e . ep ) return ; e . ep = ! 0 ; let n = t ( e ) ; fetch ( e . href , n ) } } ) ( ) ; var Qn = Zn ( { BaseTransition : ( ) => Te , BaseTransitionPropsValidators : ( ) => e , Comment : ( ) => gt , DeprecationTypes : ( ) => null , EffectScope : ( ) => Xe , ErrorCodes : ( ) => cn , ErrorTypeStrings : ( ) => Ut , Fragment : ( ) => W , KeepAlive : ( ) => Dt , ReactiveEffect : ( ) => qe , Static : ( ) => it , Suspense : ( ) => Kt , Teleport : ( ) => rn , Text : ( ) => dt , TrackOpTypes : ( ) => $e , Transition : ( ) => ye , TransitionGroup : ( ) => jt , TriggerOpTypes : ( ) => Ee , VueElement : ( ) => r , assertNumber : ( ) => Lt , callWithAsyncErrorHandling : ( ) => dn , callWithErrorHandling : ( ) => pt , camelize : ( ) => v , capitalize : ( ) => h , cloneVNode : ( ) => bt , compatUtils : ( ) => null , compile : ( ) => $n , computed : ( ) => U , createApp : ( ) => Ot , createBlock : ( ) => z , createCommentVNode : ( ) => L , createElementBlock : ( ) => P , createElementVNode : ( ) => H , createHydrationRenderer : ( ) => mn , createPropsRestProxy : ( ) => Cn , createRenderer : ( ) => ct , createSSRApp : ( ) => fe , createSlots : ( ) => yn , createStaticVNode : ( ) => Pe , createTextVNode : ( ) => f , createVNode : ( ) => K , customRef : ( ) => t , defineAsyncComponent : ( ) => Le , defineComponent : ( ) => y , defineCustomElement : ( ) => ge , defineEmits : ( ) => g , defineExpose : ( ) => xe , defineModel : ( ) => Pt , defineOptions : ( ) => o , defineProps : ( ) => At , defineSSRCustomElement : ( ) => Se , defineSlots : ( ) => he , devtools : ( ) => ve , effect : ( ) => ht , effectScope : ( ) => sn , getCurrentInstance : ( ) => we , getCurrentScope : ( ) => Ht , getCurrentWatcher : ( ) => en , getTransitionRawChildren : ( ) => S , guardReactiveProps : ( ) => O , h : ( ) => de , handleError : ( ) => Ae , hasInjectionContext : ( ) => Tn , hydrate : ( ) => b , hydrateOnIdle : ( ) => l , hydrateOnInteraction : ( ) => Ue , hydrateOnMediaQuery : ( ) => te , hydrateOnVisible : ( ) => Be , initCustomFormatter : ( ) => Ge , initDirectivesForSSR : ( ) => D , inject : ( ) => T , isMemoSame : ( ) => ce , isProxy : ( ) => Et , isReactive : ( ) => rt , isReadonly : ( ) => Gt , isRef : ( ) => nn , isRuntimeOnly : ( ) => Zt , isShallow : ( ) => ut , isVNode : ( ) => ae , markRaw : ( ) => It , mergeDefaults : ( ) => Ze , mergeModels : ( ) => Je , mergeProps : ( ) => M , nextTick : ( ) => De , nodeOps : ( ) => le , normalizeClass : ( ) => k , normalizeProps : ( ) => Nt , normalizeStyle : ( ) => a , onActivated : ( ) => n , onBeforeMount : ( ) => mt , onBeforeUnmount : ( ) => on , onBeforeUpdate : ( ) => Vt , onDeactivated : ( ) => $t , onErrorCaptured : ( ) => Tt , onMounted : ( ) => F , onRenderTracked : ( ) => Wt , onRenderTriggered : ( ) => tn , onScopeDispose : ( ) => un , onServerPrefetch : ( ) => lt , onUnmounted : ( ) => Ft , onUpdated : ( ) => ln , onWatcherCleanup : ( ) => ft , openBlock : ( ) => I , patchProp : ( ) => Oe , popScopeId : ( ) => vt , provide : ( ) => qt , proxyRefs : ( ) => yt , pushScopeId : ( ) => Rt , queuePostFlushCb : ( ) => wt , reactive : ( ) => Jt , readonly : ( ) => zt , ref : ( ) => R , registerRuntimeCompiler : ( ) => xt , render : ( ) => wn , renderList : ( ) => N , renderSlot : ( ) => G , resolveCom Line truncated
import { $ as e , $n as t , $t as n , A as r , An as i , Ar as a , At as o , B as s , Bn as c , Bt as l , Cn as u , Cr as d , Ct as f , D as p , Dn as m , Dr as h , Dt as g , En as _ , Er as v , Et as y , F as b , Fn as x , Ft as S , G as C , Gn as w , Gt as T , H as ee , Hn as te , Ht as ne , I as E , In as re , It as D , J as ie , Jn as ae , Jt as oe , K as se , Kn as ce , Kt as le , L as ue , Ln as de , Lt as fe , M as pe , Mn as me , Mr as he , Mt as ge , N as _e , Nn as ve , Nt as ye , O as be , On as xe , Or as O , Ot as Se , P as Ce , Pn as we , Pt as Te , Q as Ee , Qn as De , Qt as Oe , R as ke , Rn as Ae , Rt as je , S as Me , Sn as Ne , Sr as Pe , St as Fe , T as Ie , Tn as Le , Tr as k , Tt as Re , U as ze , Un as Be , Ut as Ve , V as He , Vn as Ue , Vt as We , W as Ge , Wn as A , Wt as Ke , X as qe , Xn as Je , Xt as Ye , Y as Xe , Yn as Ze , Yt as Qe , Z as $e , Zn as et , Zt as j , _ as tt , _n as M , _r as nt , _t as N , a as rt , an as P , ar as it , at , b as ot , bn as st , br as ct , bt as lt , cn as ut , cr as dt , ct as ft , dn as F , dr as pt , dt as mt , en as ht , er as gt , et as _t , f as vt , fn as yt , fr as bt , ft as xt , gn as St , gr as Ct , gt as I , h as wt , hn as Tt , hr as L , ht as R , i as z , in as Et , ir as Dt , it as Ot , j as kt , jn as At , jr as B , jt , k as Mt , kn as Nt , kr as Pt , kt as Ft , ln as It , lr as Lt , lt as Rt , mn as zt , mr as Bt , mt as V , n as Vt , nn as Ht , nr as Ut , nt as Wt , on as Gt , or as Kt , ot as qt , pn as Jt , pr as Yt , pt as H , q as Xt , qn as Zt , qt as Qt , r as $t , rn as en , rr as tn , rt as U , sn as nn , sr as rn , st as an , t as on , tn as sn , tr as cn , tt as ln , un , ur as dn , ut as fn , v as pn , vn as W , vr as mn , vt as hn , wn as gn , wr as _n , wt as G , x as K , xn as vn , xr as yn , xt as bn , y as xn , yn as Sn , yr as Cn , yt as wn , z as Tn , zn as q , zt as En } from "./PageHeader.js" ; import { C as Dn , S as On , T as kn , _ as An , a as jn , b as Mn , c as Nn , d as Pn , f as Fn , g as In , h as Ln , i as Rn , l as zn , m as Bn , n as Vn , o as Hn , p as Un , r as Wn , s as Gn , t as Kn , u as qn , v as J , w as Jn , x as Yn , y as Xn } from "./HistoryLink.js" ; var Zn = Object . defineProperty , Qn = ( e , t ) => { let n = { } ; for ( var r in e ) Zn ( n , r , { get : e [ r ] , enumerable : ! 0 } ) ; return t || Zn ( n , Symbol . toStringTag , { value : ` Module ` } ) , n } ; ( function ( ) { let e = document . createElement ( ` link ` ) . relList ; if ( e && e . supports && e . supports ( ` modulepreload ` ) ) return ; for ( let e of document . querySelectorAll ( ` link[rel="modulepreload"] ` ) ) n ( e ) ; new MutationObserver ( e => { for ( let t of e ) if ( t . type === ` childList ` ) for ( let e of t . addedNodes ) e . tagName === ` LINK ` && e . rel === ` modulepreload ` && n ( e ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function t ( e ) { let t = { } ; return e . integrity && ( t . integrity = e . integrity ) , e . referrerPolicy && ( t . referrerPolicy = e . referrerPolicy ) , t . credentials = e . crossOrigin === ` use-credentials ` ? ` include ` : e . crossOrigin === ` anonymous ` ? ` omit ` : ` same-origin ` , t } function n ( e ) { if ( e . ep ) return ; e . ep = ! 0 ; let n = t ( e ) ; fetch ( e . href , n ) } } ) ( ) ; var $n = Qn ( { BaseTransition : ( ) => Ee , BaseTransitionPropsValidators : ( ) => e , Comment : ( ) => _t , DeprecationTypes : ( ) => null , EffectScope : ( ) => Ze , ErrorCodes : ( ) => ln , ErrorTypeStrings : ( ) => Wt , Fragment : ( ) => U , KeepAlive : ( ) => Ot , ReactiveEffect : ( ) => Je , Static : ( ) => at , Suspense : ( ) => qt , Teleport : ( ) => an , Text : ( ) => ft , TrackOpTypes : ( ) => et , Transition : ( ) => be , TransitionGroup : ( ) => Mt , TriggerOpTypes : ( ) => De , VueElement : ( ) => r , assertNumber : ( ) => Rt , callWithAsyncErrorHandling : ( ) => fn , callWithErrorHandling : ( ) => mt , camelize : ( ) => v , capitalize : ( ) => h , cloneVNode : ( ) => xt , compatUtils : ( ) => null , compile : ( ) => er , computed : ( ) => H , createApp : ( ) => kt , createBlock : ( ) => R , createCommentVNode : ( ) => I , createElementBlock : ( ) => N , createElementVNode : ( ) => V , createHydrationRenderer : ( ) => hn , createPropsRestProxy : ( ) => wn , createRenderer : ( ) => lt , createSSRApp : ( ) => pe , createSlots : ( ) => bn , createStaticVNode : ( ) => Fe , createTextVNode : ( ) => f , createVNode : ( ) => G , customRef : ( ) => t , defineAsyncComponent : ( ) => Re , defineComponent : ( ) => y , defineCustomElement : ( ) => _e , defineEmits : ( ) => g , defineExpose : ( ) => Se , defineModel : ( ) => Ft , defineOptions : ( ) => o , defineProps : ( ) => jt , defineSSRCustomElement : ( ) => Ce , defineSlots : ( ) => ge , devtools : ( ) => ye , effect : ( ) => gt , effectScope : ( ) => cn , getCurrentInstance : ( ) => Te , getCurrentScope : ( ) => Ut , getCurrentWatcher : ( ) => tn , getTransitionRawChildren : ( ) => S , guardReactiveProps : ( ) => D , h : ( ) => fe , handleError : ( ) => je , hasInjectionContext : ( ) => En , hydrate : ( ) => b , hydrateOnIdle : ( ) => l , hydrateOnInteraction : ( ) => We , hydrateOnMediaQuery : ( ) => ne , hydrateOnVisible : ( ) => Ve , initCustomFormatter : ( ) => Ke , initDirectivesForSSR : ( ) => E , inject : ( ) => T , isMemoSame : ( ) => le , isProxy : ( ) => Dt , isReactive : ( ) => it , isReadonly : ( ) => Kt , isRef : ( ) => rn , isRuntimeOnly : ( ) => Qt , isShallow : ( ) => dt , isVNode : ( ) => oe , markRaw : ( ) => Lt , mergeDefaults : ( ) => Qe , mergeModels : ( ) => Ye , mergeProps : ( ) => j , nextTick : ( ) => Oe , nodeOps : ( ) => ue , normalizeClass : ( ) => O , normalizeProps : ( ) => Pt , normalizeStyle : ( ) => a , onActivated : ( ) => n , onBeforeMount : ( ) => ht , onBeforeUnmount : ( ) => sn , onBeforeUpdate : ( ) => Ht , onDeactivated : ( ) => en , onErrorCaptured : ( ) => Et , onMounted : ( ) => P , onRenderTracked : ( ) => Gt , onRenderTriggered : ( ) => nn , onScopeDispose : ( ) => dn , onServerPrefetch : ( ) => ut , onUnmounted : ( ) => It , onUpdated : ( ) => un , onWatcherCleanup : ( ) => pt , openBlock : ( ) => F , patchProp : ( ) => ke , popScopeId : ( ) => yt , provide : ( ) => Jt , proxyRefs : ( ) => bt , pushScopeId : ( ) => zt , queuePostFlushCb : ( ) => Tt , reactive : ( ) => Yt , readonly : ( ) => Bt , ref : ( ) => L , registerRuntimeCompiler : ( ) => St , render : ( ) => Tn , renderList : ( ) => M , renderSlot : ( ) => W , resolveComponent : ( ) => Sn , res Line truncated
` );d=n.pop()|| ` ` ;for(let e of n){let t=e.split( `
` ).find(e=>e.startsWith( ` data : ` ));if(!t)continue;let n=JSON.parse(t.slice(6));if(n.session_id&&(Si.value=n.session_id),n.type=== ` delta ` &&(o+=n.text,Di.value=Di.value?{...Di.value,text:o}:null),(n.type=== ` tool ` ||n.type=== ` navigate ` )&&(a=[...a,n],Di.value=Di.value?{...Di.value,tools:a}:null),n.type=== ` ask ` &&n.ask&&(clearTimeout(l),Di.value=Di.value?{...Di.value,ask:n.ask}: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 ` );Ci.value=[...Ci.value,{from: ` assistant ` ,text:o,tool_calls:a}],Di.value=null,Ti.value= ` Ready ` ,await Hi()}catch(e){let t=e;t.name=== ` AbortError ` &&!c?(Di.value={text: ` Turn stopped . ` ,tools:a,isError:!1,turn:r,isRetry:i},Ti.value= ` Stopped ` ):(Di.value={text: ` Unable to complete that turn : $ { t . message || t } ` ,tools:a,isError:!0,turn:r?hi(r):void 0,isRetry:i},Ti.value= ` Error — retry available ` )}finally{clearTimeout(l),yi=null,Bi=null,Ei.value=!1}}function ta(){Ti.value= ` Stopping … ` ,Si.value&&q.chatCancel(Si.value).catch(()=>{}),Vi()}function na(){F(()=>{Hi().catch(e=>{Ti.value=e.message|| ` Chat unavailable ` })}),Ft(()=>{Vi()})}async function ra(e){let t=new Uint8Array(await e.arrayBuffer()),n= ` ` ;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));await ea({textOverride: ` 🎤 Voice message ` ,voice:{data:btoa(n),mime_type:e.type|| ` audio / webm ` }})}var ia=[ ` aria - label ` , ` title ` , ` aria - expanded ` , ` aria - controls ` ],aa=y({__name: ` ChatFab ` ,props:{open:{type:Boolean}},emits:[ ` toggle ` ],setup(e,{emit:t}){let n=t;function r(e){return p( ` 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)=>(I(),P( ` 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":A(_i),onClick:i[0]||=e=>n( ` toggle ` )},[H( ` span ` ,{"aria-hidden": ` true ` ,class:k(r(!e.open))},[K(A(kr),{size:22})],2),H( ` span ` ,{"aria-hidden": ` true ` ,class:k(r(e.open))},[K(A(ai),{size:22})],2)],8,ia))}});function oa(e){return typeof e== ` string ` ? ` '${e}' ` :new ua().serialize(e)}var sa= ` _ - , ; : ! ? . '"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,ca=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[sa.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function la(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&&ca[n]?ca[n]:n+128,s=a<128&&ca[a]?ca[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 ua=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?la(e,t):n===`number`&&r===`number`?e-t:la(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(la),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 . $Arr Line truncated
` ).find(e=>e.startsWith( ` data : ` ));if(!t)continue;let n=JSON.parse(t.slice(6));if(n.session_id&&(Ci.value=n.session_id),n.type=== ` delta ` &&(o+=n.text,Oi.value=Oi.value?{...Oi.value,text:o}:null),(n.type=== ` tool ` ||n.type=== ` navigate ` )&&(a=[...a,n],Oi.value=Oi.value?{...Oi.value,tools:a}:null),n.type=== ` ask ` &&n.ask&&(clearTimeout(l),Oi.value=Oi.value?{...Oi.value,ask:n.ask}: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 ` );wi.value=[...wi.value,{from: ` assistant ` ,text:o,tool_calls:a}],Oi.value=null,Ei.value= ` Ready ` ,await Ui()}catch(e){let t=e;t.name=== ` AbortError ` &&!c?(Oi.value={text: ` Turn stopped . ` ,tools:a,isError:!1,turn:r,isRetry:i},Ei.value= ` Stopped ` ):(Oi.value={text: ` Unable to complete that turn : $ { t . message || t } ` ,tools:a,isError:!0,turn:r?gi(r):void 0,isRetry:i},Ei.value= ` Error — retry available ` )}finally{clearTimeout(l),bi=null,Vi=null,Di.value=!1}}function na(){Ei.value= ` Stopping … ` ,Ci.value&&K.chatCancel(Ci.value).catch(()=>{}),Hi()}function ra(){P(()=>{Ui().catch(e=>{Ei.value=e.message|| ` Chat unavailable ` })}),It(()=>{Hi()})}async function ia(e){let t=new Uint8Array(await e.arrayBuffer()),n= ` ` ;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));await ta({textOverride: ` 🎤 Voice message ` ,voice:{data:btoa(n),mime_type:e.type|| ` audio / webm ` }})}var aa=[ ` aria - label ` , ` title ` , ` aria - expanded ` , ` aria - controls ` ],oa=y({__name: ` ChatFab ` ,props:{open:{type:Boolean}},emits:[ ` toggle ` ],setup(e,{emit:t}){let n=t;function r(e){return p( ` 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)=>(F(),N( ` 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":k(vi),onClick:i[0]||=e=>n( ` toggle ` )},[V( ` span ` ,{"aria-hidden": ` true ` ,class:O(r(!e.open))},[G(k(Ar),{size:22})],2),V( ` span ` ,{"aria-hidden": ` true ` ,class:O(r(e.open))},[G(k(oi),{size:22})],2)],8,aa))}});function sa(e){return typeof e== ` string ` ? ` '${e}' ` :new da().serialize(e)}var ca= ` _ - , ; : ! ? . '"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,la=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[ca.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function ua(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&&la[n]?la[n]:n+128,s=a<128&&la[a]?la[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 da=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?ua(e,t):n===`number`&&r===`number`?e-t:ua(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(ua),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 . $Arr Line truncated
` )].join( `
` ))}return()=>i.value||r.value||o.value?de(t.default({present:o.value})[0],{ref:e=>{let t=Ha(e);return t?.hasAttribute===void 0||(t?.hasAttribute( ` data - reka - popper - content - wrapper ` )?a.value=t.firstElementChild:a.value=t),t}}):null}});function ss(){let e=R();return{primitiveElement:e,currentElement:U(()=>[ ` # text ` , ` # comment ` ].includes(e.value?. $ el.nodeName)?e.value?. $ el.nextElementSibling:Ha(e))}}var[cs,ls]=ha( ` CollapsibleRoot ` ),us=y({__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=ro(r, ` open ` ,n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),{disabled:a,unmountOnHide:o}=Ne(r);return ls({contentId: ` ` ,disabled:a,open:i,unmountOnHide:o,onOpenToggle:()=>{a.value||(i.value=!i.value)}}),t({open:i}),X(),(e,t)=>(I(),z(A(et),{as:e.as,"as-child":r.asChild,"data-state":A(i)? ` open ` : ` closed ` ,"data-disabled":A(a)? ` ` :void 0},{default:j(()=>[G(e. $ slots, ` default ` ,{open:A(i)})]),_:3},8,[ ` as ` , ` as - child ` , ` data - state ` , ` data - disabled ` ]))}}),ds=y({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=cs();i.contentId||=Xo(void 0, ` reka - collapsible - content ` );let a=R(),{forwardRef:o,currentElement:s}=X(),c=R(0),l=R(0),u=U(()=>i.open.value),d=R(u.value),f=R();J(()=>[u.value,a.value?.present],async()=>{await De();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=U(()=>d.value&&i.open.value);return F(()=>{requestAnimationFrame(()=>{d.value=!1})}),Ua(s, ` beforematch ` ,e=>{requestAnimationFrame(()=>{i.onOpenToggle(),r( ` contentFound ` )})}),(e,t)=>(I(),z(A(os),{ref_key: ` presentRef ` ,ref:a,present:e.forceMount||A(i).open.value,"force-mount":!0},{default:j(({present:t})=>[K(A(et),M(e. $ attrs,{id:A(i).contentId,ref:A(o),"as-child":n.asChild,as:e.as,hidden:t?void 0:A(i).unmountOnHide.value? ` ` : ` until - found ` ,"data-state":p.value?void 0:A(i).open.value? ` open ` : ` closed ` ,"data-disabled":A(i).disabled?.value? ` ` :void 0,style:{"--reka-collapsible-content-height": ` $ { l . value } px ` ,"--reka-collapsible-content-width": ` $ { c . value } px ` }}),{default:j(()=>[!A(i).unmountOnHide.value||t?G(e. $ slots, ` default ` ,{key:0}):L( ` v - if ` ,!0)]),_:2},1040,[ ` id ` , ` as - child ` , ` as ` , ` hidden ` , ` data - state ` , ` data - disabled ` , ` style ` ])]),_:3},8,[ ` present ` ]))}}),fs=y({__name: ` CollapsibleTrigger ` ,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default: ` button ` }},setup(e){let t=e;X();let n=cs();return(e,r)=>(I(),z(A(et),{type:e.as=== ` button ` ? ` button ` :void 0,as:e.as,"as-child":t.asChild,"aria-controls":A(n).contentId,"aria-expanded":A(n).open.value,"data-state":A(n).open.value? ` open ` : ` closed ` ,"data-disabled":A(n).disabled?.value? ` ` :void 0,disabled:A(n).disabled?.value,onClick:A(n).onOpenToggle},{default:j(()=>[G(e. $ slots, ` default ` )]),_:3},8,[ ` type ` , ` as ` , ` as - child ` , ` aria - controls ` , ` aria - expanded ` , ` data - state ` , ` data - disabled ` , ` disabled ` , ` onClick ` ]))}});function ps({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 ms({type:e,defaultValue:t,modelValue:n}){return e||ps({type:e,defaultValue:t,modelValue:n})}function hs({type:e,defaultValue:t}){return t===void 0?e=== ` single ` ?void 0:[]:t}function gs(e,t){let n=U(()=>ms(e)),r=ro(e, ` modelValue ` ,t,{defaultValue:hs(e),passive:e.modelValue===void 0,deep:!0});function i(e){if(n.value=== ` single ` )r.value=da(e,r.value)?void 0:e;else{let t=Array.isArray(r.value)?[...r.value||[]]:[r.value].filter(Boolean);if(ya(t,e)){let n=t.findIndex(t=>da(t,e));t.splice(n,1)}else t.push(e);r.value=t}}return{modelValue:r,changeModelValue:i,isSingle:U(()=>n.value=== ` single ` )}}var[_s,vs]=ha( ` AccordionRoot ` ),ys=y({__name: ` AccordionRoot ` ,props:{collapsible:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default: ` vertical ` },unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:[ ` update : modelValue ` ],setup(e,{emit:t}){let n=e,r=t,{dir:i,disabled:a,unmountOnHide:o}=Ne(n),s=Co(i),{modelValue:c,changeModelValue:l,isSingle:u}=gs(n,r),{forwardRef:d,currentElement:f}=X();return vs({disabled:a,direction:s,orientation:n.orientation,parentElement:f,isSingle
Line truncated
` ))}return()=>i.value||r.value||o.value?fe(t.default({present:o.value})[0],{ref:e=>{let t=Ua(e);return t?.hasAttribute===void 0||(t?.hasAttribute( ` data - reka - popper - content - wrapper ` )?a.value=t.firstElementChild:a.value=t),t}}):null}});function cs(){let e=L();return{primitiveElement:e,currentElement:H(()=>[ ` # text ` , ` # comment ` ].includes(e.value?. $ el.nodeName)?e.value?. $ el.nextElementSibling:Ua(e))}}var[ls,us]=ga( ` CollapsibleRoot ` ),ds=y({__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=io(r, ` open ` ,n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),{disabled:a,unmountOnHide:o}=Pe(r);return us({contentId: ` ` ,disabled:a,open:i,unmountOnHide:o,onOpenToggle:()=>{a.value||(i.value=!i.value)}}),t({open:i}),Y(),(e,t)=>(F(),R(k(tt),{as:e.as,"as-child":r.asChild,"data-state":k(i)? ` open ` : ` closed ` ,"data-disabled":k(a)? ` ` :void 0},{default:A(()=>[W(e. $ slots, ` default ` ,{open:k(i)})]),_:3},8,[ ` as ` , ` as - child ` , ` data - state ` , ` data - disabled ` ]))}}),fs=y({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=ls();i.contentId||=Zo(void 0, ` reka - collapsible - content ` );let a=L(),{forwardRef:o,currentElement:s}=Y(),c=L(0),l=L(0),u=H(()=>i.open.value),d=L(u.value),f=L();q(()=>[u.value,a.value?.present],async()=>{await Oe();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=H(()=>d.value&&i.open.value);return P(()=>{requestAnimationFrame(()=>{d.value=!1})}),Wa(s, ` beforematch ` ,e=>{requestAnimationFrame(()=>{i.onOpenToggle(),r( ` contentFound ` )})}),(e,t)=>(F(),R(k(ss),{ref_key: ` presentRef ` ,ref:a,present:e.forceMount||k(i).open.value,"force-mount":!0},{default:A(({present:t})=>[G(k(tt),j(e. $ attrs,{id:k(i).contentId,ref:k(o),"as-child":n.asChild,as:e.as,hidden:t?void 0:k(i).unmountOnHide.value? ` ` : ` until - found ` ,"data-state":p.value?void 0:k(i).open.value? ` open ` : ` closed ` ,"data-disabled":k(i).disabled?.value? ` ` :void 0,style:{"--reka-collapsible-content-height": ` $ { l . value } px ` ,"--reka-collapsible-content-width": ` $ { c . value } px ` }}),{default:A(()=>[!k(i).unmountOnHide.value||t?W(e. $ slots, ` default ` ,{key:0}):I( ` v - if ` ,!0)]),_:2},1040,[ ` id ` , ` as - child ` , ` as ` , ` hidden ` , ` data - state ` , ` data - disabled ` , ` style ` ])]),_:3},8,[ ` present ` ]))}}),ps=y({__name: ` CollapsibleTrigger ` ,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default: ` button ` }},setup(e){let t=e;Y();let n=ls();return(e,r)=>(F(),R(k(tt),{type:e.as=== ` button ` ? ` button ` :void 0,as:e.as,"as-child":t.asChild,"aria-controls":k(n).contentId,"aria-expanded":k(n).open.value,"data-state":k(n).open.value? ` open ` : ` closed ` ,"data-disabled":k(n).disabled?.value? ` ` :void 0,disabled:k(n).disabled?.value,onClick:k(n).onOpenToggle},{default:A(()=>[W(e. $ slots, ` default ` )]),_:3},8,[ ` type ` , ` as ` , ` as - child ` , ` aria - controls ` , ` aria - expanded ` , ` data - state ` , ` data - disabled ` , ` disabled ` , ` onClick ` ]))}});function ms({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 hs({type:e,defaultValue:t,modelValue:n}){return e||ms({type:e,defaultValue:t,modelValue:n})}function gs({type:e,defaultValue:t}){return t===void 0?e=== ` single ` ?void 0:[]:t}function _s(e,t){let n=H(()=>hs(e)),r=io(e, ` modelValue ` ,t,{defaultValue:gs(e),passive:e.modelValue===void 0,deep:!0});function i(e){if(n.value=== ` single ` )r.value=fa(e,r.value)?void 0:e;else{let t=Array.isArray(r.value)?[...r.value||[]]:[r.value].filter(Boolean);if(ba(t,e)){let n=t.findIndex(t=>fa(t,e));t.splice(n,1)}else t.push(e);r.value=t}}return{modelValue:r,changeModelValue:i,isSingle:H(()=>n.value=== ` single ` )}}var[vs,ys]=ga( ` AccordionRoot ` ),bs=y({__name: ` AccordionRoot ` ,props:{collapsible:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default: ` vertical ` },unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:[ ` update : modelValue ` ],setup(e,{emit:t}){let n=e,r=t,{dir:i,disabled:a,unmountOnHide:o}=Pe(n),s=wo(i),{modelValue:c,changeModelValue:l,isSingle:u}=_s(n,r),{forwardRef:d,currentElement:f}=Y();return ys({disabled:a,direction:s,orientation:n.orientation,parentElement:f,isSingle
Line truncated
- a positive number
- less than the value passed to \ ` max \` (or ${ ep } if no \` max \` prop is set)
- less than the value passed to \ ` max \` (or ${ tp } if no \` max \` prop is set)
- \ ` null \` or \` undefined \` if the progress is indeterminate.
Defaulting to \ ` null \` . ` ) , null ) } function ap ( e ) { return rp ( 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 \` ${ ep } \` . ` ) , ep ) } var op = y ( { _ _name : ` ProgressRoot ` , props : { modelValue : { type : [ Number , null ] , required : ! 1 } , max : { type : Number , required : ! 1 , default : ep } , getValueLabel : { type : Function , required : ! 1 , default : ( e , t ) => rp ( e ) ? ` ${ Math . round ( e / t * ep ) } % ` : 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 ; X ( ) ; let i = ro ( n , ` modelValue ` , r , { passive : n . modelValue === void 0 } ) , a = ro ( n , ` max ` , r , { passive : n . max === void 0 } ) ; J ( ( ) => i . value , async e => { let t = ip ( e , n . max ) ; t !== e && ( await De ( ) , i . value = t ) } , { immediate : ! 0 } ) , J ( ( ) => n . max , e => { let t = ap ( n . max ) ; t !== e && ( a . value = t ) } , { immediate : ! 0 } ) ; let o = U ( ( ) => va ( i . value ) ? ` indeterminate ` : i . value === a . value ? ` complete ` : ` loading ` ) ; return np ( { modelValue : i , max : a , progressState : o } ) , ( e , t ) => ( I ( ) , z ( A ( et ) , { "as-child" : e . asChild , as : e . as , "aria-valuemax" : A ( a ) , "aria-valuemin" : 0 , "aria-valuenow" : rp ( A ( i ) ) ? A ( i ) : void 0 , "aria-valuetext" : e . getValueText ? . ( A ( i ) , A ( a ) ) , "aria-label" : e . getValueLabel ( A ( i ) , A ( a ) ) , role : ` progressbar ` , "data-state" : o . value , "data-value" : A ( i ) ? ? void 0 , "data-max" : A ( a ) } , { default : j ( ( ) => [ G ( e . $slots , ` default ` , { modelValue : A ( i ) } ) ] ) , _ : 3 } , 8 , [ ` as-child ` , ` as ` , ` aria-valuemax ` , ` aria-valuenow ` , ` aria-valuetext ` , ` aria-label ` , ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , sp = y ( { _ _name : ` ProgressIndicator ` , props : { asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , setup ( e ) { let t = e , n = tp ( ) ; return X ( ) , ( e , r ) => ( I ( ) , z ( A ( et ) , M ( t , { "data-state" : A ( n ) . progressState . value , "data-value" : A ( n ) . modelValue ? . value ? ? void 0 , "data-max" : A ( n ) . max . value } ) , { default : j ( ( ) => [ G ( e . $slots , ` default ` ) ] ) , _ : 3 } , 16 , [ ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , cp = ` radio.select ` ; function lp ( e , t , n ) { _a ( cp , n , { originalEvent : e , value : t } ) } var up = y ( { 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 = ro ( n , ` checked ` , r , { passive : n . checked === void 0 } ) , { value : a } = Ne ( n ) , { forwardRef : o , currentElement : s } = X ( ) , c = Oo ( s ) , l = jo ( ) , u = U ( ( ) => n . id && s . value ? document . querySelector ( ` [for=" ${ n . id } "] ` ) ? . innerText : void 0 ) ; function d ( e ) { n . disabled || lp ( e , n . value , e => { r ( ` select ` , e ) , ! e ? . defaultPrevented && ( i . value = ! 0 , c . value && e . stopPropagation ( ) ) } ) } return ( e , t ) => ( I ( ) , P ( W , null , [ K ( A ( et ) , M ( { id : e . id , ref : A ( o ) , role : ` radio ` , type : e . as === ` button ` ? ` button ` : void 0 , as : e . as , "aria-checked" : A ( i ) ? ? ! 1 , "aria-label" : u . value , "as-child" : e . asChild , disabled : e . disabled ? ` ` : void 0 , "data-state" : A ( i ) ? ` checked ` : ` unchecked ` , "data-disabled" : e . disabled ? ` ` : void 0 , value : A ( a ) , required : e . required , name : e . name } , { ... A ( l ) , ... e . $attrs } , { onClick : Qe ( d , [ ` stop ` ] ) } ) , { default : j ( ( ) => [ G ( e . $slots , ` default ` , { checked : A ( i ) } ) ] ) , _ : 3 } , 16 , [ ` id ` , ` type ` , ` as ` , ` aria-checked ` , ` aria-label ` , ` as-child ` , ` disabled ` , ` data-state ` , ` data-disabled ` , ` value ` , ` required ` , ` name ` ] ) , A ( c ) && e . name ? ( I ( ) , z ( A ( Fc ) , M ( { key : 0 , type : ` radio ` , tabindex : ` -1 ` , value : A ( a ) , checked : ! ! A ( i ) , name : e . name , disabled : e . disabled , required : e . required } , A ( l ) ) , null , 16 , [ ` value ` , ` checked ` , ` name ` , ` disabled ` , ` required ` ] ) ) : L ( ` v-if ` , ! 0 ) ] , 64 ) ) } } ) , [ dp , fp ] = ha ( ` RadioGroupRoot ` ) , pp = y ( { _ _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 } = X ( ) , o = ro ( n , ` modelValue ` , r , { defaultValue : n . defaultValue , passive : n . modelValue === void 0 } ) , { disabled : s , loop : c , orientation : l , name : u , required : d , dir : f } = Ne ( n ) , p = Co ( f ) , m = Oo ( a ) ; return fp ( { modelValue : o , changeModelValue : e => { o . value = e } , disabled : s , loop : c , orientation : l , name : u ? . value , required : d } ) , ( e , t ) => ( I ( ) , z ( A ( _d ) , { "as-child" : ` ` , orientation : A ( l ) , dir : A ( p ) , loop : A ( c ) } , { default : j ( ( ) => [ K ( A ( et ) , { ref : A ( i ) , role : ` radiogroup ` , "data-disabled" : A ( s ) ? ` ` : void 0 , "as-child" : e . asChild , as : e . as , "aria-orientation" : A ( l ) , "aria-required" : A ( d ) , dir : A ( p ) } , { default : j ( ( ) => [ G ( e . $slots , ` default ` , { modelValue : A ( o ) } ) , A ( m ) && A ( u ) ? ( I ( ) , z ( A ( Fc ) , { key : 0 , required : A ( d ) , disabled : A ( s ) , value : A ( o ) , name : A ( u ) } , null , 8 , [ ` required ` , ` disabled ` , ` value ` , ` name ` ] ) ) : L ( ` v-if ` , ! 0 ) ] ) , _ : 3 } , 8 , [ ` data-disabled ` , ` as-child ` , ` as ` , ` aria-orientation ` , ` aria-required ` , ` dir ` ] ) ] ) , _ : 3 } , 8 , [ ` orientation ` , ` dir ` , ` loop ` ] ) ) } } ) , [ mp , hp ] = ha ( ` RadioGroupItem ` ) , gp = y ( { inheritAttrs : ! 1 , _ _name : ` RadioGroupItem ` , props : { id : { type : String , required : ! 1 } , value : { type : nul Line truncated
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:V g(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>V g(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=U g(c),u=e+1<n.length?U g(n[e+1]):null;if(l&&u&&W g(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=U g(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>V g(e)),rows:r.map(e=>e.map(e=>V g(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 g(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 g(c.replace(/^> \s ?/, ` ` ))});continue}r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function Ug(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 Wg(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var Gg={class: ` [ overflow - wrap : anywhere ] ` },Kg={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },qg={class: ` font - mono text - [ 0.85 em ] ` },Jg={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },Yg={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Xg={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Zg={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` },Qg={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` }, $ g={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },e_={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },t_={key:8,class: ` mb - 2.5 last : mb - 0 ` },n_=y({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=U(()=>Hg(t.text));return(e,t)=>(I(),P( ` div ` ,Gg,[(I(!0),P(W,null,N(n.value,(e,t)=>(I(),P(W,{key:t},[e.kind=== ` pre ` ?(I(),P( ` pre ` ,Kg,[H( ` code ` ,qg,V(e.code),1)])):e.kind=== ` table ` ?(I(),P( ` table ` ,Jg,[H( ` thead ` ,null,[H( ` tr ` ,null,[(I(!0),P(W,null,N(e.head,(e,t)=>(I(),P( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[K(zg,{inline:e},null,8,[ ` inline ` ])]))),128))])]),H( ` tbody ` ,null,[(I(!0),P(W,null,N(e.rows,(e,t)=>(I(),P( ` tr ` ,{key:t},[(I(!0),P(W,null,N(e,(e,t)=>(I(),P( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[K(zg,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(I(),P( ` blockquote ` ,Yg,[K(zg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(I(),P( ` h1 ` ,Xg,[K(zg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(I(),P( ` h2 ` ,Zg,[K(zg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(I(),P( ` h3 ` ,Qg,[K(zg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(I(),P( ` ul ` , $ g,[(I(!0),P(W,null,N(e.items,(e,t)=>(I(),P( ` li ` ,{key:t},[K(zg,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(I(),P( ` ol ` ,e_,[(I(!0),P(W,null,N(e.items,(e,t)=>(I(),P( ` li ` ,{key:t},[K(zg,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(I(),P( ` p ` ,t_,[K(zg,{inline:e.inline},null,8,[ ` inline ` ])])):L( ` ` ,!0)],64))),128))]))}}),r_={class: ` truncate ` },i_=y({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=xn( ` RouterLink ` );return I(),z(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:j(()=>[K(A(rr),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),H( ` span ` ,r_,V(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),a_={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },o_={class: ` font - semibold text - foreground ` },s_={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },c_=y({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=U(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=U(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=U(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=U(()=>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?(I(),z(i_,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(I(),P( ` div ` ,a_,[K(A(ii),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),H( ` span ` ,o_,V(n.value),1),r.value?(I(),P( ` code ` ,s_,V(r.value),1)):L( ` ` ,!0),H( ` span ` ,{class:k(A(p)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},V(a.value),3)]))}}),l_={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },u_={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },d_={key:3,class: ` whitespace - pre - wrap ` },f_=y({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(I(),P( ` div ` ,{class:k([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[H( ` div ` ,{class:k(A(p)( ` 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?(I(),P( ` div ` ,l_,[(I(!0),P(W,null,N(e.tools,(t,n)=>(I(),z(c_,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):L( ` ` ,!0),e.media.length?(I(),P( ` div ` ,u_,[(I(!0),P(W,null,N(e.media,(e,t)=>(I(),z(Mg,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):L( ` ` ,!0),e.assistant?(I(),z(n_,{key:2,text:e.text},null,8,[ ` text ` ])):(I(),P( ` div ` ,d_,V(e.text),1)),G(t. $ slots, ` default ` )],2)],2))}}),p_={class: ` text - sm ` },m_={class: ` font - medium ` },h_={key:0,class: ` mt - 1 text - fg - muted ` },g_={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },__=y({__name: ` ChatCh Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>_S? ` $ { n . slice ( 0 , _S ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var yS=[ ` title ` ],bS=y({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=U(()=>Gx(n.event)),a=U(()=>vS(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=U(()=>n.event.at? $ b(n.event.at): ` — ` );return(e,t)=>(I(),z(A(hS),{class:k(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:[Ke(Qe(o,[ ` prevent ` ]),[ ` enter ` ]),Ke(Qe(o,[ ` prevent ` ]),[ ` space ` ])]},{default:j(()=>[K(A(Z),{class: ` font - medium ` },{default:j(()=>[f(V(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),K(A(Z),{class: ` font - mono ` },{default:j(()=>[f(V(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),K(A(Z),{class: ` w - [ 55 % ] max - w - 0 ` },{default:j(()=>[H( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},V(a.value.text),9,yS)]),_:1}),K(A(Z),null,{default:j(()=>[f(V(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),xS=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function SS(e){return(Number(e?.task_id)||0)>0}function CS(e,t){return t=== ` tasks ` ?SS(e):t!== ` system ` ||!SS(e)}function wS(e,t){return e.filter(e=>CS(e,t))}function TS(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function ES(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function DS(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=ES(vS(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 OS={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },kS={class: ` max - h - [ 28 rem ] overflow - y - auto ` },AS=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],jS=[ ` title ` ],MS=y({__name: ` LiveActivityCard ` ,setup(e){let t=nv(),{activity:n,streamKind:r,streamState:i}=On(kn()),a=R( ` all ` ),o=U(()=>wS(n.value,a.value)),s=U(()=>TS(o.value.length,a.value)),c=Jt(new Set),l=U(()=>DS(o.value));function u(e){c.has(e)?c.delete(e):c.add(e)}function d(e){return c.has(e.key)}function p(e){return vS(e.representative)}function m(e){return e.representative.at? $ b(e.representative.at): ` — ` }function h(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(I(),z(A(Kb),null,{default:j(()=>[K(A(Zb),null,{default:j(()=>[K(A(Qb),null,{default:j(()=>[...t[1]||=[f( ` Live activity ` ,-1)]]),_:1}),K(A(qb),{class: ` flex items - center gap - 2 ` },{default:j(()=>[K(A(dS),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:A(xS)},null,8,[ ` modelValue ` , ` options ` ]),K(A(Bt),{variant:A(r)},{default:j(()=>[f(V(A(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),K(A(Jb),null,{default:j(()=>[H( ` div ` ,OS,[H( ` div ` ,kS,[K(A(pS),null,{default:j(()=>[K(A(gS),{class: ` sticky top - 0 z - 10 bg - card ` },{default:j(()=>[K(A(hS),null,{default:j(()=>[K(A(Q),null,{default:j(()=>[...t[2]||=[f( ` Event ` ,-1)]]),_:1}),K(A(Q),null,{default:j(()=>[...t[3]||=[f( ` Task ` ,-1)]]),_:1}),K(A(Q),null,{default:j(()=>[...t[4]||=[f( ` Detail ` ,-1)]]),_:1}),K(A(Q),null,{default:j(()=>[...t[5]||=[f( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),K(A(mS),null,{default:j(()=>[o.value.length?L( ` ` ,!0):(I(),z(A(hS),{key:0},{default:j(()=>[K(A(Z),{colspan: ` 4 ` },{default:j(()=>[K(A(Lb),null,{default:j(()=>[K(A(Bb),null,{default:j(()=>[K(A(Ub),null,{default:j(()=>[f(V(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(I(!0),P(W,{key:1},N(l.value,e=>(I(),P(W,{key:e.key},[e.count===1?(I(),z(bS,{key:0,event:e.representative,onOpen:h},null,8,[ ` event ` ])):(I(),P(W,{key:1},[K(A(hS),{class:k(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&&h(e.taskID),onKeydown:[Ke(Qe(t=>e.taskID>0&&h(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),Ke(Qe(t=>e.taskID>0&&h(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:j(()=>[K(A(Z),{class: ` font - medium ` },{default:j(()=>[H( ` 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:Qe(t=>u(e.key),[ ` stop ` ])},[d(e)?(I(),z(A(ur),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(I(),z(A(dr),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),f( ` ` +V(e.label)+ ` ` ,1),K(A(Bt),{variant: ` idle ` },{default:j(()=>[f( ` × ` +V(e.count),1)]),_:2},1024)],8,AS)]),_:2},1024),K(A(Z),{class: ` font - mono ` },{default:j(()=>[f(V(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),K(A(Z),{class: ` w - [ 55 % ] max - w - 0 ` },{default:j(()=>[H( ` span ` ,{class: ` block truncate ` ,title:p(e).truncated?p(e).full:void 0},V(p(e).text),9,jS)]),_:2},1024),K(A(Z),null,{default:j(()=>[f(V(m(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),d(e)?(I(!0),P(W,{key:0},N(e.events,(t,n)=>(I(),z(bS,{key: ` $ { e . key } : $ { n } ` ,event:t,onOpen:
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 QC(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 $ C(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 ew(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 tw(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 nw=R([]),rw=R([]),iw=R(!0),aw=R(null),ow=R(null),sw=R(!1),cw=R(null);async function lw(){try{let e=await q.eventTypes();iw.value=e.enabled!==!1,nw.value=e.event_types||[],rw.value=e.proposals||[],aw.value=null}catch(e){aw.value=e.message||String(e)}}function uw(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function dw(e){cw.value=null,ow.value=e}function fw(e){let t=bw.value.find(t=>String(t.id)===e.sample_id);dw({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:uw(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function pw(e= ` ` ){dw({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function mw(e){dw({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:uw(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function hw(){ow.value=null}async function gw(){let e=ow.value;if(e){sw.value=!0;try{if(e.mode=== ` edit ` &&e.id)await q.eventTypeUpdate(e.id,{name:e.name,rule:tw(e.rule)});else{let t=e.mode=== ` paste ` ?ZC(e.headersText):e.exampleHeaders;await q.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:tw(e.rule),example:{headers:t,body:e.body}})}ow.value=null,await lw()}catch(e){cw.value=e.message||String(e)}finally{sw.value=!1}}}var _w=R(null);async function vw(){let e=_w.value;if(_w.value=null,e)try{await q.eventTypeDelete(e.id),await lw()}catch(e){aw.value=e.message||String(e)}}var yw=100,bw=R([]),xw=R(!0),Sw=R(null),Cw=R(!0),ww=R(null);async function Tw(){try{let e=await q.captures(yw);xw.value=e.enabled!==!1,bw.value=e.captures||[],Sw.value=null}catch(e){Sw.value=e.message||String(e)}finally{Cw.value=!1}}function Ew(e){let t=bw.value.find(t=>t.id===e);return t&&(ww.value=t),!!t}function Dw(){bw.value.length&&(ww.value=bw.value[0])}function Ow(){Fn( ` captures ` ,()=>{Tw(),lw()})}var kw={key:0,class: ` text - xs text - fg - muted ` },Aw={key:1,class: ` flex flex - col gap - 1 text - xs ` },jw={key:1},Mw={key:2,class: ` text - xs text - fg - muted ` },Nw=y({__name: ` DispatchLinks ` ,props:{kind:{},id:{}},setup(e){let t=e,n=R([]),r=R(!1);J(()=>[t.kind,t.id],async()=>{r.value=!1;try{n.value=await q.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=xn( ` RouterLink ` );return r.value?(I(),P( ` p ` ,kw, ` Dispatches unavailable . ` )):n.value.length?(I(),P( ` ul ` ,Aw,[(I(!0),P(W,null,N(n.value,e=>(I(),P( ` 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 ` ?L( ` ` ,!0):(I(),z(o,{key:0,to:{path: ` / events ` ,query:{tab: ` bindings ` }},class: ` hover : text - foreground ` },{default:j(()=>[f( ` binding ` +V(e.binding_id.slice(0,8))+ ` v ` +V(e.binding_version),1)]),_:2},1024)),t.kind=== ` captures ` ?L( ` ` ,!0):(I(),z(o,{key:1,to:i(e.capture_id),class: ` hover : text - foreground ` },{default:j(()=>[f( ` capture ` +V(e.capture_id.slice(0,8)),1)]),_:2},1032,[ ` to ` ])),t.kind=== ` tasks ` ?L( ` ` ,!0):(I(),P(W,{key:2},[e.task_id?(I(),z(o,{key:0,to: ` / tasks / $ { e . task _id } ` ,class: ` text - foreground hover : underline ` },{default:j(()=>[f( ` task # ` +V(e.task_id),1)]),_:2},1032,[ ` to ` ])):(I(),P( ` span ` ,jw,V(e.reason|| ` claimed , no task recorded ` ),1))],64)),H( ` span ` ,null,V(A( $ b)(e.dispatched_at)),1)]))),128))])):t.kind=== ` tasks ` ?L( ` ` ,!0):(I(),P( ` p ` ,Mw, ` No dispatches yet . ` ))}}}),Pw=y({__name: ` Spinner ` ,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,n)=>(I(),z(A(Tr),{role: ` status ` ,"aria-label": ` Loading ` ,class:k(A(p)( ` size - 4 animate - spin ` ,t.class))},null,8,[ ` class ` ]))}});function Fw(e,t){return t?e.filter(e=>e.event_type_id===t):[]}function Iw(e){return(e?.repository?? ` required ` )!== ` none ` }function Lw(e,t){return e.filter(e=>t=== ` any ` ||e.type=== ` any ` ||e.type===t)}function Rw(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 zw={pending_approval: ` pending approval ` ,armed: ` armed ` ,paused: ` paused ` },Bw={pending_approval: ` warn ` ,armed: ` ok ` ,paused: ` idle ` };function Vw(e)
Line truncated
` )}};Qz.defaultYaml={explicit:!1,version: ` 1.2 ` },Qz.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function $ z(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 eB(e){let t=new Set;return Gz(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function tB(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function nB(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=eB(e);let a=tB(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(Lz(t.node)||zz(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 rB(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=rB(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=rB(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=rB(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=rB(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function iB(e,t,n){if(Array.isArray(e))return e.map((e,t)=>iB(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!Vz(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 aB=class{constructor(e){Object.defineProperty(this,Mz,{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(!Pz(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=iB(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?rB(i,{"":o}, ` ` ,o):o}},oB=class extends aB{constructor(e){super(Ez),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=[],Gz(e,{Node:(e,t)=>{(Nz(t)||Vz(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||=(iB(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=sB(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( $ z(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 sB(e,t,n){if(Nz(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(zz(t)){let r=0;for(let i of t.items){let t=sB(e,i,n);t>r&&(r=t)}return r}if(Iz(t)){let r=sB(e,t.key,n),i=sB(e,t.value,n);return Math.max(r,i)}return 1}var cB=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,lB=class extends aB{constructor(e){super(Az),this.value=e}toJSON(e,t){return t?.keep?this.value:iB(this.value,e,t)}toString(){return String(this.value)}};lB.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,lB.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,lB.PLAIN= ` PLAIN ` ,lB.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,lB.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var uB= ` tag : yaml . org , 2002 : ` ;function dB(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 fB(e,t,n){if(Pz(e)&&(e=e.contents),Bz(e))return e;if(Iz(e)){let t=n.schema[Oz].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 oB(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=uB+t.slice(2));let l=dB(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new lB(e);return c&&(c.node=t),t
Line truncated
` )?_ B(n,t):n.includes( `
Defaulting to \ ` null \` . ` ) , null ) } function op ( e ) { return ip ( 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 \` ${ tp } \` . ` ) , tp ) } var sp = y ( { _ _name : ` ProgressRoot ` , props : { modelValue : { type : [ Number , null ] , required : ! 1 } , max : { type : Number , required : ! 1 , default : tp } , getValueLabel : { type : Function , required : ! 1 , default : ( e , t ) => ip ( e ) ? ` ${ Math . round ( e / t * tp ) } % ` : 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 ; Y ( ) ; let i = io ( n , ` modelValue ` , r , { passive : n . modelValue === void 0 } ) , a = io ( n , ` max ` , r , { passive : n . max === void 0 } ) ; q ( ( ) => i . value , async e => { let t = ap ( e , n . max ) ; t !== e && ( await Oe ( ) , i . value = t ) } , { immediate : ! 0 } ) , q ( ( ) => n . max , e => { let t = op ( n . max ) ; t !== e && ( a . value = t ) } , { immediate : ! 0 } ) ; let o = H ( ( ) => ya ( i . value ) ? ` indeterminate ` : i . value === a . value ? ` complete ` : ` loading ` ) ; return rp ( { modelValue : i , max : a , progressState : o } ) , ( e , t ) => ( F ( ) , R ( k ( tt ) , { "as-child" : e . asChild , as : e . as , "aria-valuemax" : k ( a ) , "aria-valuemin" : 0 , "aria-valuenow" : ip ( k ( i ) ) ? k ( i ) : void 0 , "aria-valuetext" : e . getValueText ? . ( k ( i ) , k ( a ) ) , "aria-label" : e . getValueLabel ( k ( i ) , k ( a ) ) , role : ` progressbar ` , "data-state" : o . value , "data-value" : k ( i ) ? ? void 0 , "data-max" : k ( a ) } , { default : A ( ( ) => [ W ( e . $slots , ` default ` , { modelValue : k ( i ) } ) ] ) , _ : 3 } , 8 , [ ` as-child ` , ` as ` , ` aria-valuemax ` , ` aria-valuenow ` , ` aria-valuetext ` , ` aria-label ` , ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , cp = y ( { _ _name : ` ProgressIndicator ` , props : { asChild : { type : Boolean , required : ! 1 } , as : { type : null , required : ! 1 } } , setup ( e ) { let t = e , n = np ( ) ; return Y ( ) , ( e , r ) => ( F ( ) , R ( k ( tt ) , j ( t , { "data-state" : k ( n ) . progressState . value , "data-value" : k ( n ) . modelValue ? . value ? ? void 0 , "data-max" : k ( n ) . max . value } ) , { default : A ( ( ) => [ W ( e . $slots , ` default ` ) ] ) , _ : 3 } , 16 , [ ` data-state ` , ` data-value ` , ` data-max ` ] ) ) } } ) , lp = ` radio.select ` ; function up ( e , t , n ) { va ( lp , n , { originalEvent : e , value : t } ) } var dp = y ( { 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 = io ( n , ` checked ` , r , { passive : n . checked === void 0 } ) , { value : a } = Pe ( n ) , { forwardRef : o , currentElement : s } = Y ( ) , c = ko ( s ) , l = Mo ( ) , u = H ( ( ) => n . id && s . value ? document . querySelector ( ` [for=" ${ n . id } "] ` ) ? . innerText : void 0 ) ; function d ( e ) { n . disabled || up ( e , n . value , e => { r ( ` select ` , e ) , ! e ? . defaultPrevented && ( i . value = ! 0 , c . value && e . stopPropagation ( ) ) } ) } return ( e , t ) => ( F ( ) , N ( U , null , [ G ( k ( tt ) , j ( { id : e . id , ref : k ( o ) , role : ` radio ` , type : e . as === ` button ` ? ` button ` : void 0 , as : e . as , "aria-checked" : k ( i ) ? ? ! 1 , "aria-label" : u . value , "as-child" : e . asChild , disabled : e . disabled ? ` ` : void 0 , "data-state" : k ( i ) ? ` checked ` : ` unchecked ` , "data-disabled" : e . disabled ? ` ` : void 0 , value : k ( a ) , required : e . required , name : e . name } , { ... k ( l ) , ... e . $attrs } , { onClick : $e ( d , [ ` stop ` ] ) } ) , { default : A ( ( ) => [ W ( e . $slots , ` default ` , { checked : k ( i ) } ) ] ) , _ : 3 } , 16 , [ ` id ` , ` type ` , ` as ` , ` aria-checked ` , ` aria-label ` , ` as-child ` , ` disabled ` , ` data-state ` , ` data-disabled ` , ` value ` , ` required ` , ` name ` ] ) , k ( c ) && e . name ? ( F ( ) , R ( k ( Ic ) , j ( { key : 0 , type : ` radio ` , tabindex : ` -1 ` , value : k ( a ) , checked : ! ! k ( i ) , name : e . name , disabled : e . disabled , required : e . required } , k ( l ) ) , null , 16 , [ ` value ` , ` checked ` , ` name ` , ` disabled ` , ` required ` ] ) ) : I ( ` v-if ` , ! 0 ) ] , 64 ) ) } } ) , [ fp , pp ] = ga ( ` RadioGroupRoot ` ) , mp = y ( { _ _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 } = Y ( ) , o = io ( n , ` modelValue ` , r , { defaultValue : n . defaultValue , passive : n . modelValue === void 0 } ) , { disabled : s , loop : c , orientation : l , name : u , required : d , dir : f } = Pe ( n ) , p = wo ( f ) , m = ko ( a ) ; return pp ( { modelValue : o , changeModelValue : e => { o . value = e } , disabled : s , loop : c , orientation : l , name : u ? . value , required : d } ) , ( e , t ) => ( F ( ) , R ( k ( vd ) , { "as-child" : ` ` , orientation : k ( l ) , dir : k ( p ) , loop : k ( c ) } , { default : A ( ( ) => [ G ( k ( tt ) , { ref : k ( i ) , role : ` radiogroup ` , "data-disabled" : k ( s ) ? ` ` : void 0 , "as-child" : e . asChild , as : e . as , "aria-orientation" : k ( l ) , "aria-required" : k ( d ) , dir : k ( p ) } , { default : A ( ( ) => [ W ( e . $slots , ` default ` , { modelValue : k ( o ) } ) , k ( m ) && k ( u ) ? ( F ( ) , R ( k ( Ic ) , { key : 0 , required : k ( d ) , disabled : k ( s ) , value : k ( o ) , name : k ( u ) } , null , 8 , [ ` required ` , ` disabled ` , ` value ` , ` name ` ] ) ) : I ( ` v-if ` , ! 0 ) ] ) , _ : 3 } , 8 , [ ` data-disabled ` , ` as-child ` , ` as ` , ` aria-orientation ` , ` aria-required ` , ` dir ` ] ) ] ) , _ : 3 } , 8 , [ ` orientation ` , ` dir ` , ` loop ` ] ) ) } } ) , [ hp , gp ] = ga ( ` RadioGroupItem ` ) , _p = y ( { inheritAttrs : ! 1 , _ _name : ` RadioGroupItem ` , props : { id : { type : String , required : ! 1 } , value : { type : nul Line truncated
` ),r=[],i=null,a=null,o=()=>{r.length&&(t.push({kind: ` p ` ,inline:H g(r.join( ` ` ))}),r=[])},s=()=>{i&&=(t.push({kind:i.tag,items:i.items.map(e=>H g(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=W g(c),u=e+1<n.length?W g(n[e+1]):null;if(l&&u&&G g(u)&&l.length===u.length){o(),s();let r=[];for(e+=2;e<n.length;e++){let t=W g(n[e]);if(!t||t.length!==l.length){e--;break}r.push(t)}t.push({kind: ` table ` ,head:l.map(e=>H g(e)),rows:r.map(e=>e.map(e=>H g(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:H g(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:H g(c.replace(/^> \s ?/, ` ` ))});continue}r.push(c)}return o(),s(),a&&t.push({kind: ` pre ` ,code:a.join( `
` )}),t}function Wg(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 Gg(e){return e.every(e=>/^:?-{3,}:? $ /.test(e))}var Kg={class: ` [ overflow - wrap : anywhere ] ` },qg={key:0,class: ` my - 2 overflow - auto rounded - md border border - border bg - background / 60 p - 3 ` },Jg={class: ` font - mono text - [ 0.85 em ] ` },Yg={key:1,class: ` my - 3 w - full border - collapse text - [ 0.92 em ] ` },Xg={key:2,class: ` my - 2 border - l - [ 3 px ] border - primary pl - 3 text - fg - muted ` },Zg={key:3,class: ` mt - 1 mb - 2 text - xl leading - tight font - semibold tracking - [ - 0.02 em ] ` },Qg={key:4,class: ` mt - 1 mb - 2 text - lg leading - tight font - semibold tracking - [ - 0.02 em ] ` }, $ g={key:5,class: ` mt - 1 mb - 2 text - base leading - tight font - semibold tracking - [ - 0.02 em ] ` },e_={key:6,class: ` my - 2.5 flex list - disc flex - col gap - 1 pl - 5 ` },t_={key:7,class: ` my - 2.5 flex list - decimal flex - col gap - 1 pl - 5 ` },n_={key:8,class: ` mb - 2.5 last : mb - 0 ` },r_=y({__name: ` ChatMarkdown ` ,props:{text:{}},setup(e){let t=e,n=H(()=>Ug(t.text));return(e,t)=>(F(),N( ` div ` ,Kg,[(F(!0),N(U,null,M(n.value,(e,t)=>(F(),N(U,{key:t},[e.kind=== ` pre ` ?(F(),N( ` pre ` ,qg,[V( ` code ` ,Jg,B(e.code),1)])):e.kind=== ` table ` ?(F(),N( ` table ` ,Yg,[V( ` thead ` ,null,[V( ` tr ` ,null,[(F(!0),N(U,null,M(e.head,(e,t)=>(F(),N( ` th ` ,{key:t,class: ` border border - border bg - muted px - 2 py - 1.5 text - left font - semibold ` },[G(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))])]),V( ` tbody ` ,null,[(F(!0),N(U,null,M(e.rows,(e,t)=>(F(),N( ` tr ` ,{key:t},[(F(!0),N(U,null,M(e,(e,t)=>(F(),N( ` td ` ,{key:t,class: ` border border - border px - 2 py - 1.5 text - left ` },[G(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))]))),128))])])):e.kind=== ` blockquote ` ?(F(),N( ` blockquote ` ,Xg,[G(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h1 ` ?(F(),N( ` h1 ` ,Zg,[G(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h2 ` ?(F(),N( ` h2 ` ,Qg,[G(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` h3 ` ?(F(),N( ` h3 ` , $ g,[G(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):e.kind=== ` ul ` ?(F(),N( ` ul ` ,e_,[(F(!0),N(U,null,M(e.items,(e,t)=>(F(),N( ` li ` ,{key:t},[G(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` ol ` ?(F(),N( ` ol ` ,t_,[(F(!0),N(U,null,M(e.items,(e,t)=>(F(),N( ` li ` ,{key:t},[G(Bg,{inline:e},null,8,[ ` inline ` ])]))),128))])):e.kind=== ` p ` ?(F(),N( ` p ` ,n_,[G(Bg,{inline:e.inline},null,8,[ ` inline ` ])])):I( ` ` ,!0)],64))),128))]))}}),i_={class: ` truncate ` },a_=y({__name: ` ChatNavChip ` ,props:{path:{},label:{}},setup(e){return(t,n)=>{let r=Sn( ` RouterLink ` );return F(),R(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:A(()=>[G(k(ir),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 ` }),V( ` span ` ,i_,B(e.label||e.path),1)]),_:1},8,[ ` to ` , ` title ` ])}}}),o_={key:1,class: ` flex items - baseline gap - 1.5 [ overflow - wrap : anywhere ] ` },s_={class: ` font - semibold text - foreground ` },c_={key:0,class: ` font - mono text - [ 0.95 em ] text - fg - subtle ` },l_=y({__name: ` ChatToolCall ` ,props:{tool:{},streaming:{type:Boolean}},setup(e){let t=e,n=H(()=>t.tool.name||t.tool.Name||t.tool.tool|| ` tool ` ),r=H(()=>t.tool.parameters||t.tool.Parameters|| ` ` ),i=H(()=>!!(t.tool.err||t.tool.Err||t.tool.failed)),a=H(()=>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?(F(),R(a_,{key:0,path:e.tool.path,label:e.tool.label},null,8,[ ` path ` , ` label ` ])):(F(),N( ` div ` ,o_,[G(k(ai),{"aria-hidden": ` true ` ,class: ` size - 3.5 shrink - 0 self - center text - fg - subtle ` }),V( ` span ` ,s_,B(n.value),1),r.value?(F(),N( ` code ` ,c_,B(r.value),1)):I( ` ` ,!0),V( ` span ` ,{class:O(k(p)( ` text - fg - muted ` ,i.value&& ` text - danger ` ))},B(a.value),3)]))}}),u_={key:0,class: ` mb - 2 grid gap - 0.5 text - xs ` },d_={key:1,class: ` mb - 2 flex flex - wrap gap - 1.5 ` },f_={key:3,class: ` whitespace - pre - wrap ` },p_=y({__name: ` ChatBubble ` ,props:{text:{},tools:{default:()=>[]},media:{default:()=>[]},assistant:{type:Boolean,default:!1},streaming:{type:Boolean,default:!1}},setup(e){return(t,n)=>(F(),N( ` div ` ,{class:O([ ` flex ` ,e.assistant? ` justify - start ` : ` justify - end ` ])},[V( ` div ` ,{class:O(k(p)( ` 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?(F(),N( ` div ` ,u_,[(F(!0),N(U,null,M(e.tools,(t,n)=>(F(),R(l_,{key:n,tool:t,streaming:e.streaming},null,8,[ ` tool ` , ` streaming ` ]))),128))])):I( ` ` ,!0),e.media.length?(F(),N( ` div ` ,d_,[(F(!0),N(U,null,M(e.media,(e,t)=>(F(),R(Ng,{key:t,attachment:e},null,8,[ ` attachment ` ]))),128))])):I( ` ` ,!0),e.assistant?(F(),R(r_,{key:2,text:e.text},null,8,[ ` text ` ])):(F(),N( ` div ` ,f_,B(e.text),1)),W(t. $ slots, ` default ` )],2)],2))}}),m_={class: ` text - sm ` },h_={class: ` font - medium ` },g_={key:0,class: ` mt - 1 text - fg - muted ` },__={key:1,class: ` mt - 2 flex flex - wrap gap - 2 ` },v_=y({__name: ` ChatCh Line truncated
` ).map(e=>e.trim()).find(Boolean)|| ` ` ,r=n.length>CS? ` $ { n . slice ( 0 , CS ) . trimEnd ( ) } … ` :n;return{text:r,full:t,truncated:r!==t}}var TS=[ ` title ` ],ES=y({__name: ` ActivityRow ` ,props:{event:{}},emits:[ ` open ` ],setup(e,{emit:t}){let n=e,r=t,i=H(()=>Zx(n.event)),a=H(()=>wS(n.event));function o(){i.value>0&&r( ` open ` ,i.value)}let s=H(()=>n.event.at? $ b(n.event.at): ` — ` );return(e,t)=>(F(),R(k(xS),{class:O(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:[qe( $ e(o,[ ` prevent ` ]),[ ` enter ` ]),qe( $ e(o,[ ` prevent ` ]),[ ` space ` ])]},{default:A(()=>[G(k(Z),{class: ` font - medium ` },{default:A(()=>[f(B(n.event.kind||n.event.type|| ` event ` ),1)]),_:1}),G(k(Z),{class: ` font - mono ` },{default:A(()=>[f(B(i.value>0? ` # $ { i . value } ` : ` — ` ),1)]),_:1}),G(k(Z),{class: ` w - [ 55 % ] max - w - 0 ` },{default:A(()=>[V( ` span ` ,{class: ` block truncate ` ,title:a.value.truncated?a.value.full:void 0},B(a.value.text),9,TS)]),_:1}),G(k(Z),null,{default:A(()=>[f(B(s.value),1)]),_:1})]),_:1},8,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onKeydown ` ]))}}),DS=[{value: ` all ` ,label: ` All ` },{value: ` tasks ` ,label: ` Tasks ` },{value: ` system ` ,label: ` System ` }];function OS(e){return(Number(e?.task_id)||0)>0}function kS(e,t){return t=== ` tasks ` ?OS(e):t!== ` system ` ||!OS(e)}function AS(e,t){return e.filter(e=>kS(e,t))}function jS(e,t){return e>0? ` ` :t=== ` all ` ? ` Waiting for activity ` :t=== ` tasks ` ? ` No task events yet ` : ` No system events yet ` }function MS(e,t){return ` $ { e } : $ { t ? ? 0 } ` }function NS(e){let t=[];for(let n of e){let e=n.kind||n.type|| ` event ` ,r=Number(n.task_id)||0,i=MS(wS(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 PS={role: ` region ` ,"aria-label": ` Live activity ` ,"aria-live": ` polite ` },FS={class: ` max - h - [ 28 rem ] overflow - y - auto ` },IS=[ ` aria - expanded ` , ` aria - label ` , ` onClick ` ],LS=[ ` title ` ],RS=y({__name: ` LiveActivityCard ` ,setup(e){let t=rv(),{activity:n,streamKind:r,streamState:i}=kn(An()),a=L( ` all ` ),o=H(()=>AS(n.value,a.value)),s=H(()=>jS(o.value.length,a.value)),c=Yt(new Set),l=H(()=>NS(o.value));function u(e){c.has(e)?c.delete(e):c.add(e)}function d(e){return c.has(e.key)}function p(e){return wS(e.representative)}function m(e){return e.representative.at? $ b(e.representative.at): ` — ` }function h(e){t.push( ` / tasks ? task = $ { encodeURIComponent ( e ) } ` )}return(e,t)=>(F(),R(k(Kb),null,{default:A(()=>[G(k(Zb),null,{default:A(()=>[G(k(Qb),null,{default:A(()=>[...t[1]||=[f( ` Live activity ` ,-1)]]),_:1}),G(k(qb),{class: ` flex items - center gap - 2 ` },{default:A(()=>[G(k(_S),{modelValue:a.value,"onUpdate:modelValue":t[0]||=e=>a.value=e,label: ` Filter activity ` ,options:k(DS)},null,8,[ ` modelValue ` , ` options ` ]),G(k(Vt),{variant:k(r)},{default:A(()=>[f(B(k(i)),1)]),_:1},8,[ ` variant ` ])]),_:1})]),_:1}),G(k(Jb),null,{default:A(()=>[V( ` div ` ,PS,[V( ` div ` ,FS,[G(k(yS),null,{default:A(()=>[G(k(SS),{class: ` sticky top - 0 z - 10 bg - card ` },{default:A(()=>[G(k(xS),null,{default:A(()=>[G(k(Q),null,{default:A(()=>[...t[2]||=[f( ` Event ` ,-1)]]),_:1}),G(k(Q),null,{default:A(()=>[...t[3]||=[f( ` Task ` ,-1)]]),_:1}),G(k(Q),null,{default:A(()=>[...t[4]||=[f( ` Detail ` ,-1)]]),_:1}),G(k(Q),null,{default:A(()=>[...t[5]||=[f( ` When ` ,-1)]]),_:1})]),_:1})]),_:1}),G(k(bS),null,{default:A(()=>[o.value.length?I( ` ` ,!0):(F(),R(k(xS),{key:0},{default:A(()=>[G(k(Z),{colspan: ` 4 ` },{default:A(()=>[G(k(Lb),null,{default:A(()=>[G(k(Bb),null,{default:A(()=>[G(k(Ub),null,{default:A(()=>[f(B(s.value),1)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})),o.value.length?(F(!0),N(U,{key:1},M(l.value,e=>(F(),N(U,{key:e.key},[e.count===1?(F(),R(ES,{key:0,event:e.representative,onOpen:h},null,8,[ ` event ` ])):(F(),N(U,{key:1},[G(k(xS),{class:O(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&&h(e.taskID),onKeydown:[qe( $ e(t=>e.taskID>0&&h(e.taskID),[ ` prevent ` ]),[ ` enter ` ]),qe( $ e(t=>e.taskID>0&&h(e.taskID),[ ` prevent ` ]),[ ` space ` ])]},{default:A(()=>[G(k(Z),{class: ` font - medium ` },{default:A(()=>[V( ` 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: $ e(t=>u(e.key),[ ` stop ` ])},[d(e)?(F(),R(k(dr),{key:0,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })):(F(),R(k(fr),{key:1,class: ` size - 3.5 shrink - 0 text - fg - subtle ` })),f( ` ` +B(e.label)+ ` ` ,1),G(k(Vt),{variant: ` idle ` },{default:A(()=>[f( ` × ` +B(e.count),1)]),_:2},1024)],8,IS)]),_:2},1024),G(k(Z),{class: ` font - mono ` },{default:A(()=>[f(B(e.taskID>0? ` # $ { e . taskID } ` : ` — ` ),1)]),_:2},1024),G(k(Z),{class: ` w - [ 55 % ] max - w - 0 ` },{default:A(()=>[V( ` span ` ,{class: ` block truncate ` ,title:p(e).truncated?p(e).full:void 0},B(p(e).text),9,LS)]),_:2},1024),G(k(Z),null,{default:A(()=>[f(B(m(e)),1)]),_:2},1024)]),_:2},1032,[ ` class ` , ` role ` , ` tabindex ` , ` title ` , ` onClick ` , ` onKeydown ` ]),d(e)?(F(!0),N(U,{key:0},M(e.events,(t,n)=>(F(),R(ES,{key: ` $ { e . key } : $ { n } ` ,event:t,onOpen:
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 iw(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 aw(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 ow(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 sw(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 cw=L([]),lw=L([]),uw=L(!0),dw=L(null),fw=L(null),pw=L(!1),mw=L(null);async function hw(){try{let e=await K.eventTypes();uw.value=e.enabled!==!1,cw.value=e.event_types||[],lw.value=e.proposals||[],dw.value=null}catch(e){dw.value=e.message||String(e)}}function gw(e){return{headers:(e.headers||[]).map(e=>({...e})),payload:(e.payload||[]).map(e=>({...e}))}}function _w(e){mw.value=null,fw.value=e}function vw(e){let t=Ew.value.find(t=>String(t.id)===e.sample_id);_w({mode: ` proposal ` ,id:null,source:e.source,name: ` ` ,rule:gw(e.rule),headersText: ` ` ,body:t?.body|| ` ` ,exampleHeaders:e.headers||{}})}function yw(e= ` ` ){_w({mode: ` paste ` ,id:null,source:e,name: ` ` ,rule:{headers:[],payload:[]},headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function bw(e){_w({mode: ` edit ` ,id:e.id,source:e.source,name:e.name,rule:gw(e.rule),headersText: ` ` ,body: ` ` ,exampleHeaders:{}})}function xw(){fw.value=null}async function Sw(){let e=fw.value;if(e){pw.value=!0;try{if(e.mode=== ` edit ` &&e.id)await K.eventTypeUpdate(e.id,{name:e.name,rule:sw(e.rule)});else{let t=e.mode=== ` paste ` ?rw(e.headersText):e.exampleHeaders;await K.eventTypeCreate({source:e.source,name:e.name,rule:e.mode=== ` paste ` ?void 0:sw(e.rule),example:{headers:t,body:e.body}})}fw.value=null,await hw()}catch(e){mw.value=e.message||String(e)}finally{pw.value=!1}}}var Cw=L(null);async function ww(){let e=Cw.value;if(Cw.value=null,e)try{await K.eventTypeDelete(e.id),await hw()}catch(e){dw.value=e.message||String(e)}}var Tw=100,Ew=L([]),Dw=L(!0),Ow=L(null),kw=L(!0),Aw=L(null);async function jw(){try{let e=await K.captures(Tw);Dw.value=e.enabled!==!1,Ew.value=e.captures||[],Ow.value=null}catch(e){Ow.value=e.message||String(e)}finally{kw.value=!1}}function Mw(e){let t=Ew.value.find(t=>t.id===e);return t&&(Aw.value=t),!!t}function Nw(){Ew.value.length&&(Aw.value=Ew.value[0])}function Pw(){In( ` captures ` ,()=>{jw(),hw()})}var Fw={key:0,class: ` text - xs text - fg - muted ` },Iw={key:1,class: ` flex flex - col gap - 1 text - xs ` },Lw={key:1},Rw={key:2,class: ` text - xs text - fg - muted ` },zw=y({__name: ` DispatchLinks ` ,props:{kind:{},id:{}},setup(e){let t=e,n=L([]),r=L(!1);q(()=>[t.kind,t.id],async()=>{r.value=!1;try{n.value=await K.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=Sn( ` RouterLink ` );return r.value?(F(),N( ` p ` ,Fw, ` Dispatches unavailable . ` )):n.value.length?(F(),N( ` ul ` ,Iw,[(F(!0),N(U,null,M(n.value,e=>(F(),N( ` 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 ` ?I( ` ` ,!0):(F(),R(o,{key:0,to:{path: ` / events ` ,query:{tab: ` bindings ` }},class: ` hover : text - foreground ` },{default:A(()=>[f( ` binding ` +B(e.binding_id.slice(0,8))+ ` v ` +B(e.binding_version),1)]),_:2},1024)),t.kind=== ` captures ` ?I( ` ` ,!0):(F(),R(o,{key:1,to:i(e.capture_id),class: ` hover : text - foreground ` },{default:A(()=>[f( ` capture ` +B(e.capture_id.slice(0,8)),1)]),_:2},1032,[ ` to ` ])),t.kind=== ` tasks ` ?I( ` ` ,!0):(F(),N(U,{key:2},[e.task_id?(F(),R(o,{key:0,to: ` / tasks / $ { e . task _id } ` ,class: ` text - foreground hover : underline ` },{default:A(()=>[f( ` task # ` +B(e.task_id),1)]),_:2},1032,[ ` to ` ])):(F(),N( ` span ` ,Lw,B(e.reason|| ` claimed , no task recorded ` ),1))],64)),V( ` span ` ,null,B(k( $ b)(e.dispatched_at)),1)]))),128))])):t.kind=== ` tasks ` ?I( ` ` ,!0):(F(),N( ` p ` ,Rw, ` No dispatches yet . ` ))}}}),Bw=y({__name: ` Spinner ` ,props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){let t=e;return(e,n)=>(F(),R(k(Er),{role: ` status ` ,"aria-label": ` Loading ` ,class:O(k(p)( ` size - 4 animate - spin ` ,t.class))},null,8,[ ` class ` ]))}});function Vw(e,t){return t?e.filter(e=>e.event_type_id===t):[]}function Hw(e){return(e?.repository?? ` required ` )!== ` none ` }function Uw(e,t){return e.filter(e=>t=== ` any ` ||e.type=== ` any ` ||e.type===t)}function Ww(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 Gw={pending_approval: ` pending approval ` ,armed: ` armed ` ,paused: ` paused ` },Kw={pending_approval: ` warn ` ,armed: ` ok ` ,paused: ` idle ` };function qw(e)
Line truncated
` )}};iB.defaultYaml={explicit:!1,version: ` 1.2 ` },iB.defaultTags={"!!": ` tag : yaml . org , 2002 : ` };function aB(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 oB(e){let t=new Set;return Zz(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function sB(e,t){for(let n=1;;++n){let r= ` $ { e } $ { n } ` ;if(!t.has(r))return r}}function cB(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=oB(e);let a=sB(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t== ` object ` &&t.anchor&&(Uz(t.node)||Gz(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 lB(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=lB(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=lB(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=lB(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=lB(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function uB(e,t,n){if(Array.isArray(e))return e.map((e,t)=>uB(e,String(t),n));if(e&&typeof e.toJSON== ` function ` ){if(!n||!qz(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 dB=class{constructor(e){Object.defineProperty(this,Rz,{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(!Bz(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=uB(this, ` ` ,a);if(typeof r== ` function ` )for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i== ` function ` ?lB(i,{"":o}, ` ` ,o):o}},fB=class extends dB{constructor(e){super(Mz),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=[],Zz(e,{Node:(e,t)=>{(zz(t)||qz(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||=(uB(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=pB(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(aB(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 pB(e,t,n){if(zz(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Gz(t)){let r=0;for(let i of t.items){let t=pB(e,i,n);t>r&&(r=t)}return r}if(Hz(t)){let r=pB(e,t.key,n),i=pB(e,t.value,n);return Math.max(r,i)}return 1}var mB=e=>!e||typeof e!= ` function ` &&typeof e!= ` object ` ,hB=class extends dB{constructor(e){super(Iz),this.value=e}toJSON(e,t){return t?.keep?this.value:uB(this.value,e,t)}toString(){return String(this.value)}};hB.BLOCK_FOLDED= ` BLOCK _FOLDED ` ,hB.BLOCK_LITERAL= ` BLOCK _LITERAL ` ,hB.PLAIN= ` PLAIN ` ,hB.QUOTE_DOUBLE= ` QUOTE _DOUBLE ` ,hB.QUOTE_SINGLE= ` QUOTE _SINGLE ` ;var gB= ` tag : yaml . org , 2002 : ` ;function _B(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 vB(e,t,n){if(Bz(e)&&(e=e.contents),Kz(e))return e;if(Hz(e)){let t=n.schema[Pz].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 fB(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith( ` ! ! ` )&&(t=gB+t.slice(2));let l=_B(e,t,o.tags);if(!l){if(e&&typeof e.toJSON== ` function ` &&(e=e.toJSON()),!e||typeof e!= ` object ` ){let t=new hB(e);return c&&(c.node=t),t
Line truncated
` )?C B(n,t):n.includes( `
` )? `
` +_ B(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,y B= ` flow ` ,b B= ` block ` ,x B= ` quoted ` ;function S B(e,t,n= ` flow ` ,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r== ` number ` &&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n=== ` block ` &&(h=C B(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n=== ` quoted ` &&r=== ` \ \ ` ){switch(g=h,e[h+1]){case ` x ` :h+=3;break;case ` u ` :h+=5;break;case ` U ` :h+=9;break;default:h+=1}_=h}if(r=== `
` )n=== ` block ` &&(h=C B(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` +C B(n,t):(e.endsWith( ` ` )? ` ` : ` ` )+n,T B= ` flow ` ,E B= ` block ` ,D B= ` quoted ` ;function O B(e,t,n= ` flow ` ,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r== ` number ` &&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n=== ` block ` &&(h=k B(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n=== ` quoted ` &&r=== ` \ \ ` ){switch(g=h,e[h+1]){case ` x ` :h+=3;break;case ` u ` :h+=5;break;case ` U ` :h+=9;break;default:h+=1}_=h}if(r=== `
` )n=== ` block ` &&(h=k B(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r=== ` ` &&p&&p!== ` ` &&p!== `
` &&p!== ` ` ){let t=e[h+1];t&&t!== ` ` &&t!== `
` &&t!== ` ` &&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n=== ` quoted ` ){for(;p=== ` ` ||p=== ` ` ;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v= ` \ n$ { t } $ { e . slice ( 0 , a ) } ` :(n=== ` quoted ` &&u[i]&&(v+= ` $ { e [ i ] } \ \ ` ),v+= ` \ n$ { t } $ { e . slice ( i + 1 , a ) } ` )}return v}function C B(e,t,n){let r=t,i=t+1,a=e[i];for(;a=== ` ` ||a=== ` ` ;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!== `
` );r=t,i=t+1,a=e[i]}return r}var w B=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),T B=e=>/^(%|---| \. \. \. )/m.test(e);function E B(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]=== `
` ){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function D B(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(T B(e)? ` ` : ` ` ),o= ` ` ,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t=== ` ` &&n[e+1]=== ` \ \ ` &&n[e+2]=== ` n ` &&(o+=n.slice(s,e)+ ` \ \ ` ,e+=1,s=e,t= ` \ \ ` ),t=== ` \ \ ` )switch(n[e+1]){case ` u ` :{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case ` 0000 ` :o+= ` \ \ 0 ` ;break;case ` 0007 ` :o+= ` \ \ a ` ;break;case ` 000 b ` :o+= ` \ \ v ` ;break;case ` 001 b ` :o+= ` \ \ e ` ;break;case ` 0085 ` :o+= ` \ \ N ` ;break;case ` 00 a0 ` :o+= ` \ \ _ ` ;break;case ` 2028 ` :o+= ` \ \ L ` ;break;case ` 2029 ` :o+= ` \ \ P ` ;break;default:t.substr(0,2)=== ` 00 ` ?o+= ` \ \ x ` +t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case ` n ` :if(r||n[e+2]=== ` " ` ||n.length<i)e+=1;else{for(o+=n.slice(s,e)+ `
` &&t!== ` ` &&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n=== ` quoted ` ){for(;p=== ` ` ||p=== ` ` ;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v= ` \ n$ { t } $ { e . slice ( 0 , a ) } ` :(n=== ` quoted ` &&u[i]&&(v+= ` $ { e [ i ] } \ \ ` ),v+= ` \ n$ { t } $ { e . slice ( i + 1 , a ) } ` )}return v}function k B(e,t,n){let r=t,i=t+1,a=e[i];for(;a=== ` ` ||a=== ` ` ;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!== `
` );r=t,i=t+1,a=e[i]}return r}var A B=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),j B=e=>/^(%|---| \. \. \. )/m.test(e);function M B(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]=== `
` ){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function N B(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(j B(e)? ` ` : ` ` ),o= ` ` ,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t=== ` ` &&n[e+1]=== ` \ \ ` &&n[e+2]=== ` n ` &&(o+=n.slice(s,e)+ ` \ \ ` ,e+=1,s=e,t= ` \ \ ` ),t=== ` \ \ ` )switch(n[e+1]){case ` u ` :{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case ` 0000 ` :o+= ` \ \ 0 ` ;break;case ` 0007 ` :o+= ` \ \ a ` ;break;case ` 000 b ` :o+= ` \ \ v ` ;break;case ` 001 b ` :o+= ` \ \ e ` ;break;case ` 0085 ` :o+= ` \ \ N ` ;break;case ` 00 a0 ` :o+= ` \ \ _ ` ;break;case ` 2028 ` :o+= ` \ \ L ` ;break;case ` 2029 ` :o+= ` \ \ P ` ;break;default:t.substr(0,2)=== ` 00 ` ?o+= ` \ \ x ` +t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case ` n ` :if(r||n[e+2]=== ` " ` ||n.length<i)e+=1;else{for(o+=n.slice(s,e)+ `
` ;n[e+2]=== ` \ \ ` &&n[e+3]=== ` n ` &&n[e+4]!== ` " ` ;)o+= `
` ,e+=2;o+=a,n[e+2]=== ` ` &&(o+= ` \ \ ` ),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:S B(o,a,x B,w B(t,!1))}function O B(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return D B(e,t);let n=t.indent||(T B(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : SB ( r , n , yB , wB ( t , ! 1 ) ) } function kB ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = DB ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? OB : i && ! t ? DB : n ? OB : DB } return r ( e , t ) } var AB ; try { AB = RegExp ( ` (^|(?<!
` ,e+=2;o+=a,n[e+2]=== ` ` &&(o+= ` \ \ ` ),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:O B(o,a,D B,A B(t,!1))}function P B(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes( `
` )||/[ \t ] \n | \n [ \t ]/.test(e))return N B(e,t);let n=t.indent||(j B(e)? ` ` : ` ` ),r= ` '`+e.replace(/' / g , ` '' ` ) . replace ( /\n+/g , ` $ & \n ${ n } ` ) + ` ' ` ; return t . implicitKey ? r : OB ( r , n , TB , AB ( t , ! 1 ) ) } function FB ( e , t ) { let { singleQuote : n } = t . options , r ; if ( n === ! 1 ) r = NB ; else { let t = e . includes ( ` " ` ) , i = e . includes ( ` ' ` ) ; r = t && ! i ? PB : i && ! t ? NB : n ? PB : NB } return r ( e , t ) } var IB ; try { IB = RegExp ( ` (^|(?<!
) )
+ ( ? !
| $ ) ` , ` g ` )}catch{A B=/ \n +(?! \n | $ )/g}function j B({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/ \n [ \t ]+ $ /.test(n))return k B(n,r);let l=r.indent||(r.forceBlockIndent||T B(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===l B.BLOCK_FOLDED?!1:t===l B.BLOCK_LITERAL||!E B(n,c,l.length);if(!n)return u? ` |
| $ ) ` , ` g ` )}catch{I B=/ \n +(?! \n | $ )/g}function L B({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/ \n [ \t ]+ $ /.test(n))return F B(n,r);let l=r.indent||(r.forceBlockIndent||j B(n)? ` ` : ` ` ),u=o=== ` literal ` ?!0:o=== ` folded ` ||t===h B.BLOCK_FOLDED?!1:t===h B.BLOCK_LITERAL||!M B(n,c,l.length);if(!n)return u? ` |
` : ` >
` ;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!== `
` &&e!== ` ` &&e!== ` ` )break}let p=n.substring(f),m=p.indexOf( `
` );m===-1?d= ` - ` :n===p||m!==p.length-1?(d= ` + ` ,a&&a()):d= ` ` ,p&&=(n=n.slice(0,-p.length),p[p.length-1]=== `
` &&(p=p.slice(0,-1)),p.replace(A B, ` $ & $ { l } ` ));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e=== ` ` )h=!0;else if(e=== `
` &&(p=p.slice(0,-1)),p.replace(I B, ` $ & $ { l } ` ));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e=== ` ` )h=!0;else if(e=== `
` )_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/ \n +/g, ` $ & $ { l } ` ));let y=(h?l? ` 2 ` : ` 1 ` : ` ` )+d;if(e&&(y+= ` ` +s(e.replace(/ ?[ \r \n ]+/g, ` ` )),i&&i()),!u){let e=n.replace(/ \n +/g, `
$ & ` ).replace(/(?:^| \n )([ \t ].*)(?:([ \n \t ]*) \n (?![ \n \t ]))?/g, ` $1$2 ` ).replace(/ \n +/g, ` $ & $ { l } ` ),i=!1,a=w B(r,!0);o!== ` folded ` &&t!==l B.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=S B( ` $ { v } $ { e } $ { p } ` ,l,b B,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function M B(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes( `
` )||u&&/[[ \] {},]/.test(a))return k B(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?k B(a,t):j B(e,t,n,r);if(!s&&!u&&i!==l B.PLAIN&&a.includes( `
` ))return j B(e,t,n,r);if(T B(a)){if(c=== ` ` )return t.forceBlockIndent=!0,j B(e,t,n,r);if(s&&c===l)return k B(a,t)}let d=a.replace(/ \n +/g, ` $ & \ n$ { c } ` );if(o){let e=e=>e.default&&e.tag!== ` tag : yaml . org , 2002 : str ` &&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return k B(a,t)}return s?d:S B(d,c,y B,w B(t,!1))}function N B(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value== ` string ` ?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==l B.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=l B.QUOTE_DOUBLE);let c=e=>{switch(e){case l B.BLOCK_FOLDED:case l B.BLOCK_LITERAL:return i||a?k B(o.value,t):j B(o,t,n,r);case l B.QUOTE_DOUBLE:return D B(o.value,t);case l B.QUOTE_SINGLE:return O B(o.value,t);case l B.PLAIN:return M B(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error( ` Unsupported default string type $ { r } ` )}return l}function P B(e,t){let n=Object.assign({blockQuote:!0,commentString:g B,defaultKeyType:null,defaultStringType: ` PLAIN ` ,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr: ` false ` ,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr: ` null ` ,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr: ` true ` ,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case ` block ` :r=!1;break;case ` flow ` :r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding? ` ` : ` ` ,indent: ` ` ,indentStep:typeof n.indent== ` number ` ? ` ` .repeat(n.indent): ` ` ,inFlow:r,options:n}}function F B(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(L z(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null? ` null ` :typeof r);throw Error( ` Tag not resolved for $ { e } value ` )}return n}function I B(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(L z(e)||z z(e))&&e.anchor;a&& $ z (a)&&(n.add(a),i.push(` & $ { a } ` ));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join( ` ` )}function L B(e,t,n,r){if(I z(e))return e.toString(t,n,r);if(N z(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError( ` Cannot stringify circular structure without alias nodes ` );t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=B z(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=F B(t.doc.schema.tags,a);let o=I B(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify== ` function ` ?i.stringify(a,t,n,r):L z(a)?N B(a,t,n,r):a.toString(t,n,r);return o?L z(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function R B({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=B z(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(z z(e)||!B z(e)&&typeof e== ` object ` )throw Error( ` With simple keys , collection cannot be used as a key value ` )}let p=!d&&(!e||f&&t==null&&!n.inFlow||z z(e)||(L z(e)?e.type===l B.BLOCK_FOLDED||e.type===l B.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=L B(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error( ` With simple keys , single line scalar must not span more than 1024 characters ` );p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g=== ` ` ? ` ? ` :p? ` ? $ { g } ` :g}else if(a&&!d||t==null&&p)return g= ` ? $ { g } ` ,f&&!m?g+=v B(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=v B(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=v B(g,n.indent,l(f))));let _,v,y;B z(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t== ` object ` &&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&L z(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&R z(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=L B(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { _B ( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
$ & ` ).replace(/(?:^| \n )([ \t ].*)(?:([ \n \t ]*) \n (?![ \n \t ]))?/g, ` $1$2 ` ).replace(/ \n +/g, ` $ & $ { l } ` ),i=!1,a=A B(r,!0);o!== ` folded ` &&t!==h B.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=O B( ` $ { v } $ { e } $ { p } ` ,l,E B,a);if(!i)return ` > $ { y } \ n$ { l } $ { s } ` }return n=n.replace(/ \n +/g, ` $ & $ { l } ` ), ` | $ { y } \ n$ { l } $ { v } $ { n } $ { p } ` }function R B(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes( `
` )||u&&/[[ \] {},]/.test(a))return F B(a,t);if(/^[ \n \t ,[ \] {}#&*!|>'"%@ ` ] | ^ [ ? - ] $ | ^ [ ? - ] [ \ t ] | [ \ n : ] [ \ t ] | [ \ t ] \ n | [ \ n \ t ] # | [ \ n \ t : ] $ / . test ( a ) ) return s || u || ! a . includes ( `
` )?F B(a,t):L B(e,t,n,r);if(!s&&!u&&i!==h B.PLAIN&&a.includes( `
` ))return L B(e,t,n,r);if(j B(a)){if(c=== ` ` )return t.forceBlockIndent=!0,L B(e,t,n,r);if(s&&c===l)return F B(a,t)}let d=a.replace(/ \n +/g, ` $ & \ n$ { c } ` );if(o){let e=e=>e.default&&e.tag!== ` tag : yaml . org , 2002 : str ` &&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return F B(a,t)}return s?d:O B(d,c,T B,A B(t,!1))}function z B(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value== ` string ` ?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==h B.QUOTE_DOUBLE&&/[ \x 00- \x 08 \x 0b- \x 1f \x 7f- \x 9f \u {D800}- \u {DFFF}]/u.test(o.value)&&(s=h B.QUOTE_DOUBLE);let c=e=>{switch(e){case h B.BLOCK_FOLDED:case h B.BLOCK_LITERAL:return i||a?F B(o.value,t):L B(o,t,n,r);case h B.QUOTE_DOUBLE:return N B(o.value,t);case h B.QUOTE_SINGLE:return P B(o.value,t);case h B.PLAIN:return R B(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error( ` Unsupported default string type $ { r } ` )}return l}function B B(e,t){let n=Object.assign({blockQuote:!0,commentString:S B,defaultKeyType:null,defaultStringType: ` PLAIN ` ,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr: ` false ` ,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr: ` null ` ,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr: ` true ` ,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case ` block ` :r=!1;break;case ` flow ` :r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding? ` ` : ` ` ,indent: ` ` ,indentStep:typeof n.indent== ` number ` ? ` ` .repeat(n.indent): ` ` ,inFlow:r,options:n}}function V B(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(U z(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null? ` null ` :typeof r);throw Error( ` Tag not resolved for $ { e } value ` )}return n}function H B(e,t,{anchors:n,doc:r}){if(!r.directives)return ` ` ;let i=[],a=(U z(e)||G z(e))&&e.anchor;a&&aB (a)&&(n.add(a),i.push( ` & $ { a } ` ));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join( ` ` )}function U B(e,t,n,r){if(H z(e))return e.toString(t,n,r);if(z z(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError( ` Cannot stringify circular structure without alias nodes ` );t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=K z(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=V B(t.doc.schema.tags,a);let o=H B(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify== ` function ` ?i.stringify(a,t,n,r):U z(a)?z B(a,t,n,r):a.toString(t,n,r);return o?U z(a)||s[0]=== ` { ` ||s[0]=== ` [ ` ? ` $ { o } $ { s } ` : ` $ { o } \ n$ { t . indent } $ { s } ` :s}function W B({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=K z(e)&&e.comment||null;if(d){if(f)throw Error( ` With simple keys , key nodes cannot have comments ` );if(G z(e)||!K z(e)&&typeof e== ` object ` )throw Error( ` With simple keys , collection cannot be used as a key value ` )}let p=!d&&(!e||f&&t==null&&!n.inFlow||G z(e)||(U z(e)?e.type===h B.BLOCK_FOLDED||e.type===h B.BLOCK_LITERAL:typeof e== ` object ` ));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=U B(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error( ` With simple keys , single line scalar must not span more than 1024 characters ` );p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g=== ` ` ? ` ? ` :p? ` ? $ { g } ` :g}else if(a&&!d||t==null&&p)return g= ` ? $ { g } ` ,f&&!m?g+=w B(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=w B(g,n.indent,l(f))),g= ` ? $ { g } \ n$ { s } : ` ):(g= ` $ { g } : ` ,f&&(g+=w B(g,n.indent,l(f))));let _,v,y;K z(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t== ` object ` &&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&U z(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&W z(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=U B(t,n,()=>b=!0,()=>h=!0),S= ` ` ;if(f||_||v){if(S=_? `
` : ` ` ,v){let e=l(v);S+= ` \ n$ { CB ( e , n . indent ) } ` }x=== ` ` &&!n.inFlow?S=== `
` &&y&&(S= `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&z z(t)){let e=x[0],r=x.indexOf( `
` ):S+= ` \ n$ { n . indent } ` }else if(!p&&G z(t)){let e=x[0],r=x.indexOf( `
` ),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e=== ` & ` ||e=== ` ! ` )){let n=x.indexOf( ` ` );e=== ` & ` &&n!==-1&&n<r&&x[n+1]=== ` ! ` &&(n=x.indexOf( ` ` ,n+1)),(n===-1||r<n)&&(t=!0)}t||(S= ` \ n$ { n . indent } ` )}}else(x=== ` ` ||x[0]=== `
` )&&(S= ` ` );return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=v B(g,n.indent,l(y)):h&&i&&i(),g}function z B(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var B B= ` << ` ,V B={identify:e=>e===B B||typeof e== ` symbol ` &&e.description===B B,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new l B(Symbol(B B)),{addToJSMap:U B}),stringify:()=>B B},H B=(e,t)=>(V B.identify(t)||L z(t)&&(!t.type||t.type===l B.PLAIN)&&V B.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===V B.tag&&e.default);function U B(e,t,n){let r=G B(e,n);if(R z(r))for(let n of r.items)W B(e,t,n);else if(Array.isArray(r))for(let n of r)W B(e,t,n);else W B(e,t,r)}function W B(e,t,n){let r=G B(e,n);if(!F z(r))throw Error( ` Merge sources must be maps or map aliases ` );let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function G B(e,t){return e&&N z(t)?t.resolve(e.doc,e):t}function K B(e,t,{key:n,value:r}){if(B z(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(H B(e,n))U B(e,t,r);else{let i=i B(n, ` ` ,e);if(t instanceof Map)t.set(i,i B(r,i,e));else if(t instanceof Set)t.add(i);else{let a=q B(n,i,e),o=i B(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function q B(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(B z(e)&&n?.doc){let t=P B(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+ ` ... " ` ),z B(n.doc.options.logLevel, ` Keys with collection values will be stringified due to JS Object restrictions : $ { e } . Set mapAsMap : true to use object keys . ` ),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function JB (e,t,n){return new YB(f B(e,void 0,n),f B(t,void 0,n))}var YB =class e{constructor(e,t=null){Object.defineProperty(this,M z,{value:k z}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return B z(n)&&(n=n.clone(t)),B z(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return K B(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?R B(this,e,t,n):JSON.stringify(this)}};function XB (e,t,n){return(t.inFlow??e.flow?QB:ZB )(e,t,n)}function ZB ({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(B z(i))!d&&i.spaceBefore&&f.push( ` ` ), $ B (n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(I z(i)){let e=B z(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(` ` ), $ B (n,f,e.commentBefore,d))}d=!1;let s=L B(i,u,()=>o=null,()=>d=!0);o&&(s+=v B(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?` \ n$ { c } $ { t } ` : `
` )&&(S= ` ` );return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=w B(g,n.indent,l(y)):h&&i&&i(),g}function G B(e,t){(e=== ` debug ` ||e=== ` warn ` )&&console.warn(t)}var K B= ` << ` ,q B={identify:e=>e===K B||typeof e== ` symbol ` &&e.description===K B,default: ` key ` ,tag: ` tag : yaml . org , 2002 : merge ` ,test:/^<< $ /,resolve:()=>Object.assign(new h B(Symbol(K B)),{addToJSMap:Y B}),stringify:()=>K B},J B=(e,t)=>(q B.identify(t)||U z(t)&&(!t.type||t.type===h B.PLAIN)&&q B.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===q B.tag&&e.default);function Y B(e,t,n){let r=Z B(e,n);if(W z(r))for(let n of r.items)X B(e,t,n);else if(Array.isArray(r))for(let n of r)X B(e,t,n);else X B(e,t,r)}function X B(e,t,n){let r=Z B(e,n);if(!V z(r))throw Error( ` Merge sources must be maps or map aliases ` );let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function Z B(e,t){return e&&z z(t)?t.resolve(e.doc,e):t}function Q B(e,t,{key:n,value:r}){if(K z(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(J B(e,n))Y B(e,t,r);else{let i=u B(n, ` ` ,e);if(t instanceof Map)t.set(i,u B(r,i,e));else if(t instanceof Set)t.add(i);else{let a= $ B(n,i,e),o=u B(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function $ B(e,t,n){if(t===null)return ` ` ;if(typeof t!= ` object ` )return String(t);if(K z(e)&&n?.doc){let t=B B(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+ ` ... " ` ),G B(n.doc.options.logLevel, ` Keys with collection values will be stringified due to JS Object restrictions : $ { e } . Set mapAsMap : true to use object keys . ` ),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function eV (e,t,n){return new tV(v B(e,void 0,n),v B(t,void 0,n))}var tV =class e{constructor(e,t=null){Object.defineProperty(this,R z,{value:F z}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return K z(n)&&(n=n.clone(t)),K z(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return Q B(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?W B(this,e,t,n):JSON.stringify(this)}};function nV (e,t,n){return(t.inFlow??e.flow?iV:rV )(e,t,n)}function rV ({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(K z(i))!d&&i.spaceBefore&&f.push( ` ` ),aV (n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(H z(i)){let e=K z(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push( ` ` ),aV (n,f,e.commentBefore,d))}d=!1;let s=U B(i,u,()=>o=null,()=>d=!0);o&&(s+=w B(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t? ` \ n$ { c } $ { t } ` : `
` }}return e?(p+= `
` +_ B(l(e),c),s&&s()):d&&o&&o(),p}function QB ({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(B z(i))i.spaceBefore&&d.push( ` ` ), $ B (t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(I z(i)){let e=B z(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(` ` ), $ B (t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=B z(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=L B(i,c,()=>a=null);l||=d.length>u||o.includes(`
` ),n<e.length-1?o+= ` , ` :t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+= ` , ` )),a&&(o+=v B(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t? ` \ n$ { a } $ { i } $ { t } ` : `
` ;return ` $ { e } \ n$ { i } $ { p } ` }return ` $ { f } $ { o } $ { d . join ( ` ` ) } $ { o } $ { p } ` }function $ B({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=_B(t(r),e);n.push(i.trimStart())}}function eV(e,t){let n=Lz(t)?t.value:t;for(let r of e)if(Iz(r)&&(r.key===t||r.key===n||Lz(r.key)&&r.key.value===n))return r}var tV=class extends hB{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(Oz,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i== ` function ` )o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(JB(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t== ` object ` )for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries== ` function ` &&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=Iz(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new YB(e,e?.value):new YB(e.key,e.value);let r=eV(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );Lz(r.value)&&cB(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=eV(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=eV(this.items,e)?.value;return(!t&&Lz(n)?n.value:n)??void 0}has(e){return!!eV(this.items,e)}set(e,t){this.add(new YB(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)KB(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Iz(e))throw Error( ` Map items must all be pairs ; found $ { JSON . stringify ( e ) } instead ` );return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),XB(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},nV={collection: ` map ` ,default:!0,nodeClass:tV,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return Fz(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>tV.from(e,t,n)},rV=class extends hB{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(jz,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=iV(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=iV(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&Lz(r)?r.value:r}has(e){let t=iV(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=iV(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];Lz(r)&&cB(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(iB(e,String(r++),t));return n}toString(e,t,n){return e?XB(this,e,{blockItemPrefix: ` - ` ,flowChars:{start: ` [ ` ,end: ` ] ` },itemIndent:(e.indent|| ` ` )+ ` ` ,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r== ` function ` ){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(fB(a,void 0,n))}}return i}};function iV(e){let t=Lz(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var aV={collection: ` seq ` ,default:!0,nodeClass:rV,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return Rz(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>rV.from(e,t,n)},oV={identify:e=>typeof e== ` string ` ,default:!0,tag: ` tag : yaml . org , 2002 : str ` ,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),NB(e,t,n,r)}},sV={identify:e=>e==null,createNode:()=>new lB(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new lB(null),stringify:({source:e},t)=>typeof e== ` string ` &&sV.test.test(e)?e:t.options.nullStr},cV={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new lB(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&cV.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function lV({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r== ` bigint ` )return String(r);let i=typeof r== ` number ` ?r:Number(r);if(!isFinite(i))return isNaN(i)? ` . nan ` :i<0? ` - . inf ` : ` . inf ` ;let a=Object.is(r,-0)? ` - 0 ` :JSON.stringify(r);if(!e&&t&&(!n||n=== ` tag : yaml . org , 2002 : float ` )&&/^-? \d /.test(a)&&!a.includes( ` e ` )){let e=a.indexOf( ` . ` );e<0&&(e=a.length,a+= ` . ` );let n=t-(a.length-e-1);for(;n-->0;)a+= ` 0 ` }return a}var uV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:lV},dV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?: \. [0-9]+|[0-9]+(?: \. [0-9]*)?)[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e),string
Line truncated
` : ` ` )}return NB({comment:e,type:t,value:s},r,i,a)}};function TV(e,t){if(Rz(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Iz(r)){if(Fz(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new YB(new lB(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore? ` $ { r . commentBefore } \ n$ { e . key . commentBefore } ` :r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment? ` $ { r . comment } \ n$ { t . comment } ` :r.comment}r=e}e.items[n]=Iz(r)?r:new YB(r)}}else t( ` Expected a sequence for this tag ` );return e}function EV(e,t,n){let{replacer:r}=n,i=new rV(e);i.tag= ` tag : yaml . org , 2002 : pairs ` ;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r== ` function ` &&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError( ` Expected [ key , value ] tuple : $ { e } ` )}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError( ` Expected tuple with one key , not $ { t . length } keys ` )}else o=e;i.items.push(JB(o,s,n))}return i}var DV={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:TV,createNode:EV},OV=class e extends rV{constructor(){super(),this.add=tV.prototype.add.bind(this),this.delete=tV.prototype.delete.bind(this),this.get=tV.prototype.get.bind(this),this.has=tV.prototype.has.bind(this),this.set=tV.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(Iz(e)?(r=iB(e.key, ` ` ,t),i=iB(e.value,r,t)):r=iB(e, ` ` ,t),n.has(r))throw Error( ` Ordered maps must not include duplicate keys ` );n.set(r,i)}return n}static from(e,t,n){let r=EV(e,t,n),i=new this;return i.items=r.items,i}};OV.tag= ` tag : yaml . org , 2002 : omap ` ;var kV={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:OV,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=TV(e,t),r=[];for(let{key:e}of n.items)Lz(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new OV,n)},createNode:(e,t,n)=>OV.from(e,t,n)};function AV({value:e,source:t},n){return t&&(e?jV:MV).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var jV={identify:e=>e===!0,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON) $ /,resolve:()=>new lB(!0),stringify:AV},MV={identify:e=>e===!1,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF) $ /,resolve:()=>new lB(!1),stringify:AV},NV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:lV},PV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?:[0-9][0-9_]*)?(?: \. [0-9_]*)?[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e.replace(/_/g, ` ` )),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():lV(e)}},FV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^[-+]?(?:[0-9][0-9_]*)? \. [0-9_]* $ /,resolve(e){let t=new lB(parseFloat(e.replace(/_/g, ` ` ))),n=e.indexOf( ` . ` );if(n!==-1){let r=e.substring(n+1).replace(/_/g, ` ` );r[r.length-1]=== ` 0 ` &&(t.minFractionDigits=r.length)}return t},stringify:lV},IV=e=>typeof e== ` bigint ` ||Number.isInteger(e);function LV(e,t,n,{intAsBigInt:r}){let i=e[0];if((i=== ` - ` ||i=== ` + ` )&&(t+=1),e=e.substring(t).replace(/_/g, ` ` ),r){switch(n){case 2:e= ` 0 b$ { e } ` ;break;case 8:e= ` 0 o$ { e } ` ;break;case 16:e= ` 0 x$ { e } ` }let t=BigInt(e);return i=== ` - ` ?BigInt(-1)*t:t}let a=parseInt(e,n);return i=== ` - ` ?-1*a:a}function RV(e,t,n){let{value:r}=e;if(IV(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return lV(e)}var zV={identify:IV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>LV(e,2,2,n),stringify:e=>RV(e,2, ` 0 b ` )},BV={identify:IV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>LV(e,1,8,n),stringify:e=>RV(e,8, ` 0 ` )},VV={identify:IV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>LV(e,0,10,n),stringify:lV},HV={identify:IV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>LV(e,2,16,n),stringify:e=>RV(e,16, ` 0 x ` )},UV=class e extends tV{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Iz(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new YB(e.key,null):new YB(e,null),eV(this.items,t.key)||this.items.push(t)}get(e,t){let n=eV(this.items,e);return!t&&Iz(n)?Lz(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!= ` boolean ` )throw Error( ` Expected boolean value for set ( key , value ) in a YAML set , not $ { typeof t } ` );let n=eV(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new YB(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return s
Line truncated
` )?(n.push( ` ... ` ),n.push(_ B(t, ` ` ))):n.push( ` ... $ { t } ` )}else n.push( ` ... ` )}else{let t=e.comment;t&&o&&(t=t.replace(/^ \n +/, ` ` )),t&&((!o||s)&&n[n.length-1]!== ` ` &&n.push( ` ` ),n.push(_ B(a(t), ` ` )))}return n.join( `
` +C B(l(e),c),s&&s()):d&&o&&o(),p}function iV ({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(K z(i))i.spaceBefore&&d.push( ` ` ),aV (t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(H z(i)){let e=K z(i.key)?i.key:null;e&&(e.spaceBefore&&d.push( ` ` ),aV (t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=K z(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=U B(i,c,()=>a=null);l||=d.length>u||o.includes( `
` ),n<e.length-1?o+= ` , ` :t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+= ` , ` )),a&&(o+=w B(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t? ` \ n$ { a } $ { i } $ { t } ` : `
` ;return ` $ { e } \ n$ { i } $ { p } ` }return ` $ { f } $ { o } $ { d . join ( ` ` ) } $ { o } $ { p } ` }function aV({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^ \n +/, ` ` )),r){let i=CB(t(r),e);n.push(i.trimStart())}}function oV(e,t){let n=Uz(t)?t.value:t;for(let r of e)if(Hz(r)&&(r.key===t||r.key===n||Uz(r.key)&&r.key.value===n))return r}var sV=class extends xB{static get tagName(){return ` tag : yaml . org , 2002 : map ` }constructor(e){super(Pz,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i== ` function ` )o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(eV(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t== ` object ` )for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries== ` function ` &&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=Hz(e)?e:!e||typeof e!= ` object ` ||!( ` key ` in e)?new tV(e,e?.value):new tV(e.key,e.value);let r=oV(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error( ` Key $ { n . key } already set ` );Uz(r.value)&&mB(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=oV(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=oV(this.items,e)?.value;return(!t&&Uz(n)?n.value:n)??void 0}has(e){return!!oV(this.items,e)}set(e,t){this.add(new tV(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)QB(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!Hz(e))throw Error( ` Map items must all be pairs ; found $ { JSON . stringify ( e ) } instead ` );return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),nV(this,e,{blockItemPrefix: ` ` ,flowChars:{start: ` { ` ,end: ` } ` },itemIndent:e.indent|| ` ` ,onChompKeep:n,onComment:t})}},cV={collection: ` map ` ,default:!0,nodeClass:sV,tag: ` tag : yaml . org , 2002 : map ` ,resolve(e,t){return Vz(e)||t( ` Expected a mapping for this tag ` ),e},createNode:(e,t,n)=>sV.from(e,t,n)},lV=class extends xB{static get tagName(){return ` tag : yaml . org , 2002 : seq ` }constructor(e){super(Lz,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=uV(e);return typeof t== ` number ` &&this.items.splice(t,1).length>0}get(e,t){let n=uV(e);if(typeof n!= ` number ` )return;let r=this.items[n];return!t&&Uz(r)?r.value:r}has(e){let t=uV(e);return typeof t== ` number ` &&t<this.items.length}set(e,t){let n=uV(e);if(typeof n!= ` number ` )throw Error( ` Expected a valid index , not $ { e } . ` );let r=this.items[n];Uz(r)&&mB(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(uB(e,String(r++),t));return n}toString(e,t,n){return e?nV(this,e,{blockItemPrefix: ` - ` ,flowChars:{start: ` [ ` ,end: ` ] ` },itemIndent:(e.indent|| ` ` )+ ` ` ,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r== ` function ` ){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(vB(a,void 0,n))}}return i}};function uV(e){let t=Uz(e)?e.value:e;return t&&typeof t== ` string ` &&(t=Number(t)),typeof t== ` number ` &&Number.isInteger(t)&&t>=0?t:null}var dV={collection: ` seq ` ,default:!0,nodeClass:lV,tag: ` tag : yaml . org , 2002 : seq ` ,resolve(e,t){return Wz(e)||t( ` Expected a sequence for this tag ` ),e},createNode:(e,t,n)=>lV.from(e,t,n)},fV={identify:e=>typeof e== ` string ` ,default:!0,tag: ` tag : yaml . org , 2002 : str ` ,resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),zB(e,t,n,r)}},pV={identify:e=>e==null,createNode:()=>new hB(null),default:!0,tag: ` tag : yaml . org , 2002 : null ` ,test:/^(?:~|[Nn]ull|NULL)? $ /,resolve:()=>new hB(null),stringify:({source:e},t)=>typeof e== ` string ` &&pV.test.test(e)?e:t.options.nullStr},mV={identify:e=>typeof e== ` boolean ` ,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE) $ /,resolve:e=>new hB(e[0]=== ` t ` ||e[0]=== ` T ` ),stringify({source:e,value:t},n){return e&&mV.test.test(e)&&t===(e[0]=== ` t ` ||e[0]=== ` T ` )?e:t?n.options.trueStr:n.options.falseStr}};function hV({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r== ` bigint ` )return String(r);let i=typeof r== ` number ` ?r:Number(r);if(!isFinite(i))return isNaN(i)? ` . nan ` :i<0? ` - . inf ` : ` . inf ` ;let a=Object.is(r,-0)? ` - 0 ` :JSON.stringify(r);if(!e&&t&&(!n||n=== ` tag : yaml . org , 2002 : float ` )&&/^-? \d /.test(a)&&!a.includes( ` e ` )){let e=a.indexOf( ` . ` );e<0&&(e=a.length,a+= ` . ` );let n=t-(a.length-e-1);for(;n-->0;)a+= ` 0 ` }return a}var gV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:hV},_V={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?: \. [0-9]+|[0-9]+(?: \. [0-9]*)?)[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e),string
Line truncated
` : ` ` )}return zB({comment:e,type:t,value:s},r,i,a)}};function jV(e,t){if(Wz(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Hz(r)){if(Vz(r)){r.items.length>1&&t( ` Each pair must have its own sequence indicator ` );let e=r.items[0]||new tV(new hB(null));if(r.commentBefore&&(e.key.commentBefore=e.key.commentBefore? ` $ { r . commentBefore } \ n$ { e . key . commentBefore } ` :r.commentBefore),r.comment){let t=e.value??e.key;t.comment=t.comment? ` $ { r . comment } \ n$ { t . comment } ` :r.comment}r=e}e.items[n]=Hz(r)?r:new tV(r)}}else t( ` Expected a sequence for this tag ` );return e}function MV(e,t,n){let{replacer:r}=n,i=new lV(e);i.tag= ` tag : yaml . org , 2002 : pairs ` ;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r== ` function ` &&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError( ` Expected [ key , value ] tuple : $ { e } ` )}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError( ` Expected tuple with one key , not $ { t . length } keys ` )}else o=e;i.items.push(eV(o,s,n))}return i}var NV={collection: ` seq ` ,default:!1,tag: ` tag : yaml . org , 2002 : pairs ` ,resolve:jV,createNode:MV},PV=class e extends lV{constructor(){super(),this.add=sV.prototype.add.bind(this),this.delete=sV.prototype.delete.bind(this),this.get=sV.prototype.get.bind(this),this.has=sV.prototype.has.bind(this),this.set=sV.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(Hz(e)?(r=uB(e.key, ` ` ,t),i=uB(e.value,r,t)):r=uB(e, ` ` ,t),n.has(r))throw Error( ` Ordered maps must not include duplicate keys ` );n.set(r,i)}return n}static from(e,t,n){let r=MV(e,t,n),i=new this;return i.items=r.items,i}};PV.tag= ` tag : yaml . org , 2002 : omap ` ;var FV={collection: ` seq ` ,identify:e=>e instanceof Map,nodeClass:PV,default:!1,tag: ` tag : yaml . org , 2002 : omap ` ,resolve(e,t){let n=jV(e,t),r=[];for(let{key:e}of n.items)Uz(e)&&(r.includes(e.value)?t( ` Ordered maps must not include duplicate keys : $ { e . value } ` ):r.push(e.value));return Object.assign(new PV,n)},createNode:(e,t,n)=>PV.from(e,t,n)};function IV({value:e,source:t},n){return t&&(e?LV:RV).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var LV={identify:e=>e===!0,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON) $ /,resolve:()=>new hB(!0),stringify:IV},RV={identify:e=>e===!1,default:!0,tag: ` tag : yaml . org , 2002 : bool ` ,test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF) $ /,resolve:()=>new hB(!1),stringify:IV},zV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^(?:[-+]? \. (?:inf|Inf|INF)| \. nan| \. NaN| \. NAN) $ /,resolve:e=>e.slice(-3).toLowerCase()=== ` nan ` ?NaN:e[0]=== ` - ` ?-1/0:1/0,stringify:hV},BV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,format: ` EXP ` ,test:/^[-+]?(?:[0-9][0-9_]*)?(?: \. [0-9_]*)?[eE][-+]?[0-9]+ $ /,resolve:e=>parseFloat(e.replace(/_/g, ` ` )),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():hV(e)}},VV={identify:e=>typeof e== ` number ` ,default:!0,tag: ` tag : yaml . org , 2002 : float ` ,test:/^[-+]?(?:[0-9][0-9_]*)? \. [0-9_]* $ /,resolve(e){let t=new hB(parseFloat(e.replace(/_/g, ` ` ))),n=e.indexOf( ` . ` );if(n!==-1){let r=e.substring(n+1).replace(/_/g, ` ` );r[r.length-1]=== ` 0 ` &&(t.minFractionDigits=r.length)}return t},stringify:hV},HV=e=>typeof e== ` bigint ` ||Number.isInteger(e);function UV(e,t,n,{intAsBigInt:r}){let i=e[0];if((i=== ` - ` ||i=== ` + ` )&&(t+=1),e=e.substring(t).replace(/_/g, ` ` ),r){switch(n){case 2:e= ` 0 b$ { e } ` ;break;case 8:e= ` 0 o$ { e } ` ;break;case 16:e= ` 0 x$ { e } ` }let t=BigInt(e);return i=== ` - ` ?BigInt(-1)*t:t}let a=parseInt(e,n);return i=== ` - ` ?-1*a:a}function WV(e,t,n){let{value:r}=e;if(HV(r)){let e=r.toString(t);return r<0? ` - ` +n+e.substr(1):n+e}return hV(e)}var GV={identify:HV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` BIN ` ,test:/^[-+]?0b[0-1_]+ $ /,resolve:(e,t,n)=>UV(e,2,2,n),stringify:e=>WV(e,2, ` 0 b ` )},KV={identify:HV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` OCT ` ,test:/^[-+]?0[0-7_]+ $ /,resolve:(e,t,n)=>UV(e,1,8,n),stringify:e=>WV(e,8, ` 0 ` )},qV={identify:HV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,test:/^[-+]?[0-9][0-9_]* $ /,resolve:(e,t,n)=>UV(e,0,10,n),stringify:hV},JV={identify:HV,default:!0,tag: ` tag : yaml . org , 2002 : int ` ,format: ` HEX ` ,test:/^[-+]?0x[0-9a-fA-F_]+ $ /,resolve:(e,t,n)=>UV(e,2,16,n),stringify:e=>WV(e,16, ` 0 x ` )},YV=class e extends sV{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=Hz(e)?e:e&&typeof e== ` object ` && ` key ` in e&& ` value ` in e&&e.value===null?new tV(e.key,null):new tV(e,null),oV(this.items,t.key)||this.items.push(t)}get(e,t){let n=oV(this.items,e);return!t&&Hz(n)?Uz(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!= ` boolean ` )throw Error( ` Expected boolean value for set ( key , value ) in a YAML set , not $ { typeof t } ` );let n=oV(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new tV(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return s
Line truncated
` )?(n.push( ` ... ` ),n.push(C B(t, ` ` ))):n.push( ` ... $ { t } ` )}else n.push( ` ... ` )}else{let t=e.comment;t&&o&&(t=t.replace(/^ \n +/, ` ` )),t&&((!o||s)&&n[n.length-1]!== ` ` &&n.push( ` ` ),n.push(C B(a(t), ` ` )))}return n.join( `
` )+ `
` }var i H=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,M z,{value:D z});let r=null;typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel: ` warn ` ,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version: ` 1.2 ` },n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Qz ({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[M z]:{value:D z}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=B z(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){a H(this.contents)&&this.contents.add(e)}addIn(e,t){a H(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=e B(this);e.anchor=!t||n.has(t)?t B(t|| ` a ` ,n):t}return new o B(e.anchor)}createNode(e,t,n){let r;if(typeof t== ` function ` )e=t.call({"":e}, ` ` ,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e== ` number ` ||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=n B(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=f B(e,l,p);return o&&z z(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new YB (this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return a H(this.contents)?this.contents.delete(e):!1}deleteIn(e){return m B(e)?this.contents!=null&&(this.contents=null,!0):a H(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return z z(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return m B(e)?!t&&L z(this.contents)?this.contents.value:this.contents:z z(this.contents)?this.contents.getIn(e,t):void 0}has(e){return z z(this.contents)?this.contents.has(e):!1}hasIn(e){return m B(e)?this.contents!==void 0:z z(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=p B(this.schema,[e],t):a H(this.contents)&&this.contents.set(e,t)}setIn(e,t){m B(e)?this.contents=t:this.contents==null?this.contents=p B(this.schema,Array.from(e),t):a H(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e== ` number ` &&(e=String(e));let n;switch(e){case ` 1.1 ` :this.directives?this.directives.yaml.version= ` 1.1 ` :this.directives=new Qz ({version: ` 1.1 ` }),n={resolveKnownTags:!1,schema: ` yaml - 1.1 ` };break;case ` 1.2 ` :case ` next ` :this.directives?this.directives.yaml.version=e:this.directives=new Qz ({version:e}),n={resolveKnownTags:!0,schema: ` core ` };break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error( ` Expected '1.1' , '1.2' or null as first argument , but found : $ { t } ` )}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new n H(Object.assign(n,t));else throw Error( ` With a null YAML version , the { schema : Schema } option is required ` )}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r== ` number ` ?r:100},s=i B(this.contents,t?? ` ` ,o);if(typeof i== ` function ` )for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a== ` function ` ?r B(a,{"":s}, ` ` ,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error( ` Document with errors cannot be stringified ` );if( ` indent ` in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error( ` "indent" option must be a positive integer , not $ { t } ` )}return r H(this,e)}};function a H(e){if(z z(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var o H=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},s H=class extends o H{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},c H=class extends o H{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},l H=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+= ` at line $ { r } , column $ { i } ` ;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[ \n \r ]+ $ /, ` ` );if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o= ` … ` +o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+ ` … ` ),r>1&&/^ * $ /.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+ ` …
` ),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s= ` ` .repeat(a)+ ` ^ ` .repeat(e);n.message+= ` : \ n \ n$ { o } \ n$ { s } \ n ` }};function u H(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d= ` ` ,f= ` ` ,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!== ` space ` &&i.type!== ` newline ` &&i.type!== ` comma ` &&a(i.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),!1),h&&=(l&&i.type!== ` comment ` &&i.type!== ` newline ` &&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),null),i.type){case ` space ` :!t&&(n!== ` doc - start ` ||r?.type!== ` flow - collection ` )&&i.source.includes( ` ` )&&(h=i),u=!0;break;case ` comment ` :{u||a(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let e=i.source.substring(1)|| ` ` ;d?d+=f+e:d=e,f= ` ` ,l=!1;break}case ` newline ` :l?d?d+=i.source:(!b||n!== ` seq - item - ind ` )&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case ` anchor ` :g&&a(i, ` MULTIPLE _ANCHORS ` , ` A node can have at most one anchor ` ),i.source.endsWith( ` : ` )&&a(i.offset+i.source.length-1, ` BAD _ALIAS ` , ` Anchor ending in : is ambiguous ` ,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case ` tag ` :_&&a(i, ` MULTIPLE _TAGS ` , ` A node can have at most one tag ` ),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i, ` BAD _PROP _ORDER ` , ` Anchors and tags must be after the $ { i . source } indicator ` ),b&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . source } in $ { t ? ? ` collection ` } ` ),b=i,l=n=== ` seq - item - ind ` ||n=== ` explicit - key - ind ` ,u=!1;break;case ` comma ` :if(t){y&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { t } ` ),y=i,l=!1,u=!1;break}default:a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . type } token ` ),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!== ` space ` &&r.type!== ` newline ` &&r.type!== ` comma ` &&(r.type!== ` scalar ` ||r.source!== ` ` )&&a(r.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),h&&(l&&h.indent<=o||r?.type=== ` block - map ` ||r?.type=== ` block - seq ` )&&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function d H(e){if(!e)return null;switch(e.type){case ` alias ` :case ` scalar ` :case ` double - quoted - scalar ` :case ` single - quoted - scalar ` :if(e.source.includes( `
` ))return!0;if(e.end){for(let t of e.end)if(t.type=== ` newline ` )return!0}return!1;case ` flow - collection ` :for(let t of e.items){for(let e of t.start)if(e.type=== ` newline ` )return!0;if(t.sep){for(let e of t.sep)if(e.type=== ` newline ` )return!0}if(d H(t.key)||d H(t.value))return!0}return!1;default:return!0}}function f H(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&d H(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function p H(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||L z(e)&&L z(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var m H= ` All mapping items must start at the same column ` ;function h H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??t V)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=u H(l,{indicator: ` explicit - key - ind ` ,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type=== ` block - seq ` ?i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` A block sequence may not be used as an implicit map key ` ): ` indent ` in u&&u.indent!==r.indent&&i(s, ` BAD _INDENT ` ,m H)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||d H(u))&&i(u??l[l.length-1], ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys need to be on a single line ` )}else p.found?.indent!==r.indent&&i(s, ` BAD _INDENT ` ,m H);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&f H(r.indent,u,i),n.atKey=!1,p H(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=u H(d??[],{indicator: ` map - value - ind ` ,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type=== ` block - scalar ` });if(s=_.end,_.found){m&&(f?.type=== ` block - map ` &&!_.hasNewline&&i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` Nested mappings are not allowed in compact mappings ` ),n.options.strict&&p.start<_.found.offset-1024&&i(g.range, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit block mapping key ` ));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&f H(r.indent,f,i),s=c.range[2];let l=new YB (g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range, ` MISSING _CHAR ` , ` Implicit map keys need to be followed by map values ` ),_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let e=new YB (g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c, ` IMPOSSIBLE ` , ` Map comment with trailing content ` ),o.range=[r.offset,s,c??s],o}function g H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??r V)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=u H(a,{indicator: ` seq - item - ind ` ,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type=== ` block - seq ` ?i(u.end, ` BAD _INDENT ` , ` All sequence items must start at the same column ` ):i(s, ` MISSING _CHAR ` , ` Sequence item without - indicator ` );else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&f H(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function _ H(e,t,n,r){let i= ` ` ;if(e){let a=!1,o= ` ` ;for(let s of e){let{source:e,type:c}=s;switch(c){case ` space ` :a=!0;break;case ` comment ` :{n&&!a&&r(s, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let t=e.substring(1)|| ` ` ;i?i+=o+t:i=t,o= ` ` ;break}case ` newline ` :i&&(o+=e),a=!0;break;default:r(s, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { c } at node end ` )}t+=e.length}}return{comment:i,offset:t}}var v H= ` Block collections are not allowed within flow collections ` ,y H=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function b H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?t V:r V))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=u H(d,{flow:s,indicator: ` explicit - key - ind ` ,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` ):a<r.items.length-1&&i(h.start, ` UNEXPECTED _TOKEN ` , ` Unexpected empty item in $ { s } ` ),h.comment&&(c.comment?c.comment+= `
` +h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&d H(f)&&i(f, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` )}if(a===0)h.comma&&i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` );else if(h.comma||i(h.start, ` MISSING _CHAR ` , ` Missing , between $ { s } items ` ),h.comment){let e= ` ` ;loop:for(let t of d)switch(t.type){case ` comma ` :case ` space ` :break;case ` comment ` :e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];I z(t)&&(t=t.value??t.key),t.comment?t.comment+= `
` +e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],y H(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,v H)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);y H(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,v H),n.atKey=!1;let _=u H(p??[],{flow:s,indicator: ` map - value - ind ` ,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type=== ` newline ` ){i(e, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` );break}}h.start<_.found.offset-1024&&i(_.found, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit flow sequence key ` )}}else m&&( ` source ` in m&&m.source?.[0]=== ` : ` ?i(m, ` MISSING _CHAR ` , ` Missing space after : in $ { s } ` ):i(_.start, ` MISSING _CHAR ` , ` Missing , or : between $ { s } items ` ));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?y H(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,v H):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new YB (g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;p H(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new t V(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o? ` } ` : ` ] ` ,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l? ` $ { e } must end with a $ { d } ` : ` $ { e } in block collection must be sufficiently indented and end with a $ { d } ` ;i(u,l? ` MISSING _CHAR ` : ` BAD _INDENT ` ,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=_ H(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+= `
` +e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function x H(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?h H(e,t,n,r,a):n.type=== ` block - seq ` ?g H(e,t,n,r,a):b H(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function S H(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e)):null;if(n.type=== ` block - seq ` ){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n, ` MISSING _CHAR ` , ` Missing newline after block sequence props ` )}let s=n.type=== ` block - map ` ? ` map ` :n.type=== ` block - seq ` ? ` seq ` :n.start.source=== ` { ` ? ` map ` : ` seq ` ;if(!a||!o||o=== ` ! ` ||o===t V.tagName&&s=== ` map ` ||o===r V.tagName&&s=== ` seq ` )return x H(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a, ` BAD _COLLECTION _TYPE ` , ` $ { r . tag } used for $ { s } collection , but expects $ { r . collection ? ? ` scalar ` } ` ,!0):i(a, ` TAG _RESOLVE _FAILED ` , ` Unresolved tag : $ { o } ` ,!0),x H(e,t,n,i,o)}let l=x H(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=B z(u)?u:new l B(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function C H(e,t,n){let r=t.offset,i=w H(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?l B.BLOCK_FOLDED:l B.BLOCK_LITERAL,o=t.source?T H(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t=== ` ` ||t=== ` \ r ` )s=e;else break}if(s===0){let e=i.chomp=== ` + ` &&o.length>0? `
` }var u H=class e{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,R z,{value:N z});let r=null;typeof t== ` function ` ||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel: ` warn ` ,prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version: ` 1.2 ` },n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new iB ({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let t=Object.create(e.prototype,{[R z]:{value:N z}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=K z(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(e){d H(this.contents)&&this.contents.add(e)}addIn(e,t){d H(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=o B(this);e.anchor=!t||n.has(t)?s B(t|| ` a ` ,n):t}return new f B(e.anchor)}createNode(e,t,n){let r;if(typeof t== ` function ` )e=t.call({"":e}, ` ` ,e),r=t;else if(Array.isArray(t)){let e=t.filter(e=>typeof e== ` number ` ||e instanceof String||e instanceof Number).map(String);e.length>0&&(t=t.concat(e)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:o,keepUndefined:s,onTagObj:c,tag:l}=n??{},{onAnchor:u,setAnchors:d,sourceObjects:f}=c B(this,a|| ` a ` ),p={aliasDuplicateObjects:i??!0,keepUndefined:s??!1,onAnchor:u,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},m=v B(e,l,p);return o&&G z(m)&&(m.flow=!0),d(),m}createPair(e,t,n={}){return new tV (this.createNode(e,null,n),this.createNode(t,null,n))}delete(e){return d H(this.contents)?this.contents.delete(e):!1}deleteIn(e){return b B(e)?this.contents!=null&&(this.contents=null,!0):d H(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return G z(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return b B(e)?!t&&U z(this.contents)?this.contents.value:this.contents:G z(this.contents)?this.contents.getIn(e,t):void 0}has(e){return G z(this.contents)?this.contents.has(e):!1}hasIn(e){return b B(e)?this.contents!==void 0:G z(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=y B(this.schema,[e],t):d H(this.contents)&&this.contents.set(e,t)}setIn(e,t){b B(e)?this.contents=t:this.contents==null?this.contents=y B(this.schema,Array.from(e),t):d H(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e== ` number ` &&(e=String(e));let n;switch(e){case ` 1.1 ` :this.directives?this.directives.yaml.version= ` 1.1 ` :this.directives=new iB ({version: ` 1.1 ` }),n={resolveKnownTags:!1,schema: ` yaml - 1.1 ` };break;case ` 1.2 ` :case ` next ` :this.directives?this.directives.yaml.version=e:this.directives=new iB ({version:e}),n={resolveKnownTags:!0,schema: ` core ` };break;case null:this.directives&&delete this.directives,n=null;break;default:{let t=JSON.stringify(e);throw Error( ` Expected '1.1' , '1.2' or null as first argument , but found : $ { t } ` )}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new c H(Object.assign(n,t));else throw Error( ` With a null YAML version , the { schema : Schema } option is required ` )}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:a}={}){let o={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r== ` number ` ?r:100},s=u B(this.contents,t?? ` ` ,o);if(typeof i== ` function ` )for(let{count:e,res:t}of o.anchors.values())i(t,e);return typeof a== ` function ` ?l B(a,{"":s}, ` ` ,s):s}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw Error( ` Document with errors cannot be stringified ` );if( ` indent ` in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw Error( ` "indent" option must be a positive integer , not $ { t } ` )}return l H(this,e)}};function d H(e){if(G z(e))return!0;throw Error( ` Expected a YAML collection as document contents ` )}var f H=class extends Error{constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},p H=class extends f H{constructor(e,t,n){super( ` YAMLParseError ` ,e,t,n)}},m H=class extends f H{constructor(e,t,n){super( ` YAMLWarning ` ,e,t,n)}},h H=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(e=>t.linePos(e));let{line:r,col:i}=n.linePos[0];n.message+= ` at line $ { r } , column $ { i } ` ;let a=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[ \n \r ]+ $ /, ` ` );if(a>=60&&o.length>80){let e=Math.min(a-39,o.length-79);o= ` … ` +o.substring(e),a-=e-1}if(o.length>80&&(o=o.substring(0,79)+ ` … ` ),r>1&&/^ * $ /.test(o.substring(0,a))){let n=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);n.length>80&&(n=n.substring(0,79)+ ` …
` ),o=n+o}if(/[^ ]/.test(o)){let e=1,t=n.linePos[1];t?.line===r&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));let s= ` ` .repeat(a)+ ` ^ ` .repeat(e);n.message+= ` : \ n \ n$ { o } \ n$ { s } \ n ` }};function g H(e,{flow:t,indicator:n,next:r,offset:i,onError:a,parentIndent:o,startOnNewline:s}){let c=!1,l=s,u=s,d= ` ` ,f= ` ` ,p=!1,m=!1,h=null,g=null,_=null,v=null,y=null,b=null,x=null;for(let i of e)switch(m&&=(i.type!== ` space ` &&i.type!== ` newline ` &&i.type!== ` comma ` &&a(i.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),!1),h&&=(l&&i.type!== ` comment ` &&i.type!== ` newline ` &&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),null),i.type){case ` space ` :!t&&(n!== ` doc - start ` ||r?.type!== ` flow - collection ` )&&i.source.includes( ` ` )&&(h=i),u=!0;break;case ` comment ` :{u||a(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let e=i.source.substring(1)|| ` ` ;d?d+=f+e:d=e,f= ` ` ,l=!1;break}case ` newline ` :l?d?d+=i.source:(!b||n!== ` seq - item - ind ` )&&(c=!0):f+=i.source,l=!0,p=!0,(g||_)&&(v=i),u=!0;break;case ` anchor ` :g&&a(i, ` MULTIPLE _ANCHORS ` , ` A node can have at most one anchor ` ),i.source.endsWith( ` : ` )&&a(i.offset+i.source.length-1, ` BAD _ALIAS ` , ` Anchor ending in : is ambiguous ` ,!0),g=i,x??=i.offset,l=!1,u=!1,m=!0;break;case ` tag ` :_&&a(i, ` MULTIPLE _TAGS ` , ` A node can have at most one tag ` ),_=i,x??=i.offset,l=!1,u=!1,m=!0;break;case n:(g||_)&&a(i, ` BAD _PROP _ORDER ` , ` Anchors and tags must be after the $ { i . source } indicator ` ),b&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . source } in $ { t ? ? ` collection ` } ` ),b=i,l=n=== ` seq - item - ind ` ||n=== ` explicit - key - ind ` ,u=!1;break;case ` comma ` :if(t){y&&a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { t } ` ),y=i,l=!1,u=!1;break}default:a(i, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { i . type } token ` ),l=!1,u=!1}let S=e[e.length-1],C=S?S.offset+S.source.length:i;return m&&r&&r.type!== ` space ` &&r.type!== ` newline ` &&r.type!== ` comma ` &&(r.type!== ` scalar ` ||r.source!== ` ` )&&a(r.offset, ` MISSING _CHAR ` , ` Tags and anchors must be separated from the next token by white space ` ),h&&(l&&h.indent<=o||r?.type=== ` block - map ` ||r?.type=== ` block - seq ` )&&a(h, ` TAB _AS _INDENT ` , ` Tabs are not allowed as indentation ` ),{comma:y,found:b,spaceBefore:c,comment:d,hasNewline:p,anchor:g,tag:_,newlineAfterProp:v,end:C,start:x??C}}function _ H(e){if(!e)return null;switch(e.type){case ` alias ` :case ` scalar ` :case ` double - quoted - scalar ` :case ` single - quoted - scalar ` :if(e.source.includes( `
` ))return!0;if(e.end){for(let t of e.end)if(t.type=== ` newline ` )return!0}return!1;case ` flow - collection ` :for(let t of e.items){for(let e of t.start)if(e.type=== ` newline ` )return!0;if(t.sep){for(let e of t.sep)if(e.type=== ` newline ` )return!0}if(_ H(t.key)||_ H(t.value))return!0}return!1;default:return!0}}function v H(e,t,n){if(t?.type=== ` flow - collection ` ){let r=t.end[0];r.indent===e&&(r.source=== ` ] ` ||r.source=== ` } ` )&&_ H(t)&&n(r, ` BAD _INDENT ` , ` Flow end indicator should be more indented than parent ` ,!0)}}function y H(e,t,n){let{uniqueKeys:r}=e.options;if(r===!1)return!1;let i=typeof r== ` function ` ?r:(e,t)=>e===t||U z(e)&&U z(t)&&e.value===t.value;return t.some(e=>i(e.key,n))}var b H= ` All mapping items must start at the same column ` ;function x H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??s V)(n.schema);n.atRoot&&=!1;let s=r.offset,c=null;for(let a of r.items){let{start:l,key:u,sep:d,value:f}=a,p=g H(l,{indicator: ` explicit - key - ind ` ,next:u??d?.[0],offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0}),m=!p.found;if(m){if(u&&(u.type=== ` block - seq ` ?i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` A block sequence may not be used as an implicit map key ` ): ` indent ` in u&&u.indent!==r.indent&&i(s, ` BAD _INDENT ` ,b H)),!p.anchor&&!p.tag&&!d){c=p.end,p.comment&&(o.comment?o.comment+= `
` +p.comment:o.comment=p.comment);continue}(p.newlineAfterProp||_ H(u))&&i(u??l[l.length-1], ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys need to be on a single line ` )}else p.found?.indent!==r.indent&&i(s, ` BAD _INDENT ` ,b H);n.atKey=!0;let h=p.end,g=u?e(n,u,p,i):t(n,h,l,null,p,i);n.schema.compat&&v H(r.indent,u,i),n.atKey=!1,y H(n,o.items,g)&&i(h, ` DUPLICATE _KEY ` , ` Map keys must be unique ` );let _=g H(d??[],{indicator: ` map - value - ind ` ,next:f,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!u||u.type=== ` block - scalar ` });if(s=_.end,_.found){m&&(f?.type=== ` block - map ` &&!_.hasNewline&&i(s, ` BLOCK _AS _IMPLICIT _KEY ` , ` Nested mappings are not allowed in compact mappings ` ),n.options.strict&&p.start<_.found.offset-1024&&i(g.range, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit block mapping key ` ));let c=f?e(n,f,_,i):t(n,s,d,null,_,i);n.schema.compat&&v H(r.indent,f,i),s=c.range[2];let l=new tV (g,c);n.options.keepSourceTokens&&(l.srcToken=a),o.items.push(l)}else{m&&i(g.range, ` MISSING _CHAR ` , ` Implicit map keys need to be followed by map values ` ),_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let e=new tV (g);n.options.keepSourceTokens&&(e.srcToken=a),o.items.push(e)}}return c&&c<s&&i(c, ` IMPOSSIBLE ` , ` Map comment with trailing content ` ),o.range=[r.offset,s,c??s],o}function S H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=new((a?.nodeClass)??l V)(n.schema);n.atRoot&&=!1,n.atKey&&=!1;let s=r.offset,c=null;for(let{start:a,value:l}of r.items){let u=g H(a,{indicator: ` seq - item - ind ` ,next:l,offset:s,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!u.found){if(u.anchor||u.tag||l)l?.type=== ` block - seq ` ?i(u.end, ` BAD _INDENT ` , ` All sequence items must start at the same column ` ):i(s, ` MISSING _CHAR ` , ` Sequence item without - indicator ` );else{c=u.end,u.comment&&(o.comment=u.comment);continue}}let d=l?e(n,l,u,i):t(n,u.end,a,null,u,i);n.schema.compat&&v H(r.indent,l,i),s=d.range[2],o.items.push(d)}return o.range=[r.offset,s,c??s],o}function C H(e,t,n,r){let i= ` ` ;if(e){let a=!1,o= ` ` ;for(let s of e){let{source:e,type:c}=s;switch(c){case ` space ` :a=!0;break;case ` comment ` :{n&&!a&&r(s, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` );let t=e.substring(1)|| ` ` ;i?i+=o+t:i=t,o= ` ` ;break}case ` newline ` :i&&(o+=e),a=!0;break;default:r(s, ` UNEXPECTED _TOKEN ` , ` Unexpected $ { c } at node end ` )}t+=e.length}}return{comment:i,offset:t}}var w H= ` Block collections are not allowed within flow collections ` ,T H=e=>e&&(e.type=== ` block - map ` ||e.type=== ` block - seq ` );function E H({composeNode:e,composeEmptyNode:t},n,r,i,a){let o=r.start.source=== ` { ` ,s=o? ` flow map ` : ` flow sequence ` ,c=new((a?.nodeClass)??(o?s V:l V))(n.schema);c.flow=!0;let l=n.atRoot;l&&(n.atRoot=!1),n.atKey&&=!1;let u=r.offset+r.start.source.length;for(let a=0;a<r.items.length;++a){let l=r.items[a],{start:d,key:f,sep:p,value:m}=l,h=g H(d,{flow:s,indicator: ` explicit - key - ind ` ,next:f??p?.[0],offset:u,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!h.found){if(!h.anchor&&!h.tag&&!p&&!m){a===0&&h.comma?i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` ):a<r.items.length-1&&i(h.start, ` UNEXPECTED _TOKEN ` , ` Unexpected empty item in $ { s } ` ),h.comment&&(c.comment?c.comment+= `
` +h.comment:c.comment=h.comment),u=h.end;continue}!o&&n.options.strict&&_ H(f)&&i(f, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` )}if(a===0)h.comma&&i(h.comma, ` UNEXPECTED _TOKEN ` , ` Unexpected , in $ { s } ` );else if(h.comma||i(h.start, ` MISSING _CHAR ` , ` Missing , between $ { s } items ` ),h.comment){let e= ` ` ;loop:for(let t of d)switch(t.type){case ` comma ` :case ` space ` :break;case ` comment ` :e=t.source.substring(1);break loop;default:break loop}if(e){let t=c.items[c.items.length-1];H z(t)&&(t=t.value??t.key),t.comment?t.comment+= `
` +e:t.comment=e,h.comment=h.comment.substring(e.length+1)}}if(!o&&!p&&!h.found){let r=m?e(n,m,h,i):t(n,h.end,p,null,h,i);c.items.push(r),u=r.range[2],T H(m)&&i(r.range, ` BLOCK _IN _FLOW ` ,w H)}else{n.atKey=!0;let a=h.end,g=f?e(n,f,h,i):t(n,a,d,null,h,i);T H(f)&&i(g.range, ` BLOCK _IN _FLOW ` ,w H),n.atKey=!1;let _=g H(p??[],{flow:s,indicator: ` map - value - ind ` ,next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(_.found){if(!o&&!h.found&&n.options.strict){if(p)for(let e of p){if(e===_.found)break;if(e.type=== ` newline ` ){i(e, ` MULTILINE _IMPLICIT _KEY ` , ` Implicit keys of flow sequence pairs need to be on a single line ` );break}}h.start<_.found.offset-1024&&i(_.found, ` KEY _OVER _1024 _CHARS ` , ` The : indicator must be at most 1024 chars after the start of an implicit flow sequence key ` )}}else m&&( ` source ` in m&&m.source?.[0]=== ` : ` ?i(m, ` MISSING _CHAR ` , ` Missing space after : in $ { s } ` ):i(_.start, ` MISSING _CHAR ` , ` Missing , or : between $ { s } items ` ));let v=m?e(n,m,_,i):_.found?t(n,_.end,p,null,_,i):null;v?T H(m)&&i(v.range, ` BLOCK _IN _FLOW ` ,w H):_.comment&&(g.comment?g.comment+= `
` +_.comment:g.comment=_.comment);let y=new tV (g,v);if(n.options.keepSourceTokens&&(y.srcToken=l),o){let e=c;y H(n,e.items,g)&&i(a, ` DUPLICATE _KEY ` , ` Map keys must be unique ` ),e.items.push(y)}else{let e=new s V(n.schema);e.flow=!0,e.items.push(y);let t=(v??g).range;e.range=[g.range[0],t[1],t[2]],c.items.push(e)}u=v?v.range[2]:_.end}}let d=o? ` } ` : ` ] ` ,[f,...p]=r.end,m=u;if(f?.source===d)m=f.offset+f.source.length;else{let e=s[0].toUpperCase()+s.substring(1),t=l? ` $ { e } must end with a $ { d } ` : ` $ { e } in block collection must be sufficiently indented and end with a $ { d } ` ;i(u,l? ` MISSING _CHAR ` : ` BAD _INDENT ` ,t),f&&f.source.length!==1&&p.unshift(f)}if(p.length>0){let e=C H(p,m,n.options.strict,i);e.comment&&(c.comment?c.comment+= `
` +e.comment:c.comment=e.comment),c.range=[r.offset,m,e.offset]}else c.range=[r.offset,m,m];return c}function D H(e,t,n,r,i,a){let o=n.type=== ` block - map ` ?x H(e,t,n,r,a):n.type=== ` block - seq ` ?S H(e,t,n,r,a):E H(e,t,n,r,a),s=o.constructor;return i=== ` ! ` ||i===s.tagName?(o.tag=s.tagName,o):(i&&(o.tag=i),o)}function O H(e,t,n,r,i){let a=r.tag,o=a?t.directives.tagName(a.source,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e)):null;if(n.type=== ` block - seq ` ){let{anchor:e,newlineAfterProp:t}=r,n=e&&a?e.offset>a.offset?e:a:e??a;n&&(!t||t.offset<n.offset)&&i(n, ` MISSING _CHAR ` , ` Missing newline after block sequence props ` )}let s=n.type=== ` block - map ` ? ` map ` :n.type=== ` block - seq ` ? ` seq ` :n.start.source=== ` { ` ? ` map ` : ` seq ` ;if(!a||!o||o=== ` ! ` ||o===s V.tagName&&s=== ` map ` ||o===l V.tagName&&s=== ` seq ` )return D H(e,t,n,i,o);let c=t.schema.tags.find(e=>e.tag===o&&e.collection===s);if(!c){let r=t.schema.knownTags[o];if(r?.collection===s)t.schema.tags.push(Object.assign({},r,{default:!1})),c=r;else return r?i(a, ` BAD _COLLECTION _TYPE ` , ` $ { r . tag } used for $ { s } collection , but expects $ { r . collection ? ? ` scalar ` } ` ,!0):i(a, ` TAG _RESOLVE _FAILED ` , ` Unresolved tag : $ { o } ` ,!0),D H(e,t,n,i,o)}let l=D H(e,t,n,i,o,c),u=c.resolve?.(l,e=>i(a, ` TAG _RESOLVE _FAILED ` ,e),t.options)??l,d=K z(u)?u:new h B(u);return d.range=l.range,d.tag=o,c?.format&&(d.format=c.format),d}function k H(e,t,n){let r=t.offset,i=A H(t,e.options.strict,n);if(!i)return{value: ` ` ,type:null,comment: ` ` ,range:[r,r,r]};let a=i.mode=== ` > ` ?h B.BLOCK_FOLDED:h B.BLOCK_LITERAL,o=t.source?j H(t.source):[],s=o.length;for(let e=o.length-1;e>=0;--e){let t=o[e][1];if(t=== ` ` ||t=== ` \ r ` )s=e;else break}if(s===0){let e=i.chomp=== ` + ` &&o.length>0? `
` .repeat(Math.max(1,o.length-1)): ` ` ,n=r+i.length;return t.source&&(n+=t.source.length),{value:e,type:a,comment:i.comment,range:[r,n,n]}}let c=t.indent+i.indent,l=t.offset+i.length,u=0;for(let t=0;t<s;++t){let[r,a]=o[t];if(a=== ` ` ||a=== ` \ r ` )i.indent===0&&r.length>c&&(c=r.length);else{r.length<c&&n(l+r.length, ` MISSING _CHAR ` , ` Block scalars with more - indented leading empty lines must use an explicit indentation indicator ` ),i.indent===0&&(c=r.length),u=t,c===0&&!e.atRoot&&n(l, ` BAD _INDENT ` , ` Block scalar values in collections must be indented ` );break}l+=r.length+a.length+1}for(let e=o.length-1;e>=s;--e)o[e][0].length>c&&(s=e+1);let d= ` ` ,f= ` ` ,p=!1;for(let e=0;e<u;++e)d+=o[e][0].slice(c)+ `
` ;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]=== ` \ r ` ;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e= ` Block scalar lines must not be less indented than their $ { i . indent ? ` explicit indentation indicator ` : ` first line ` } ` ;n(l-r.length-(s?2:1), ` BAD _INDENT ` ,e),t= ` ` }a===l B.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f= `
` ;for(let e=u;e<s;++e){let[t,r]=o[e];l+=t.length+r.length+1;let s=r[r.length-1]=== ` \ r ` ;if(s&&(r=r.slice(0,-1)),r&&t.length<c){let e= ` Block scalar lines must not be less indented than their $ { i . indent ? ` explicit indentation indicator ` : ` first line ` } ` ;n(l-r.length-(s?2:1), ` BAD _INDENT ` ,e),t= ` ` }a===h B.BLOCK_LITERAL?(d+=f+t.slice(c)+r,f= `
` ):t.length>c||r[0]=== ` ` ?(f=== ` ` ?f= `
` :!p&&f=== `
` &&(f= `
@@ -77,59 +77,59 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
` +o[e][0].slice(c);d[d.length-1]!== `
` &&(d+= `
` );break;default:d+= `
` }let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function w H({offset:e,props:t},n,r){if(t[0].type!== ` block - scalar - header ` )return r(t[0], ` IMPOSSIBLE ` , ` Block scalar header not found ` ),null;let{source:i}=t[0],a=i[0],o=0,s= ` ` ,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n=== ` - ` ||n=== ` + ` ))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c, ` UNEXPECTED _TOKEN ` , ` Block scalar header includes extra characters : $ { i } ` );let l=!1,u= ` ` ,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case ` space ` :l=!0;case ` newline ` :d+=i.source.length;break;case ` comment ` :n&&!l&&r(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` ),d+=i.source.length,u=i.source.substring(1);break;case ` error ` :r(i, ` UNEXPECTED _TOKEN ` ,i.message),d+=i.source.length;break;default:{r(i, ` UNEXPECTED _TOKEN ` , ` Unexpected token in block scalar header : $ { i . type } ` );let e=i.source;e&&typeof e== ` string ` &&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function T H(e){let t=e.split(/ \n ( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[ ` ` ,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function E H(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case ` scalar ` :s=l B.PLAIN,c=D H(a,l);break;case ` single - quoted - scalar ` :s=l B.QUOTE_SINGLE,c=O H(a,l);break;case ` double - quoted - scalar ` :s=l B.QUOTE_DOUBLE,c=A H(a,l);break;default:return n(e, ` UNEXPECTED _TOKEN ` , ` Expected a flow scalar value , but found : $ { i } ` ),{value: ` ` ,type:null,comment: ` ` ,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=_ H(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function D H(e,t){let n= ` ` ;switch(e[0]){case ` ` :n= ` a tab character ` ;break;case ` , ` :n= ` flow indicator character , ` ;break;case ` % ` :n= ` directive indicator character % ` ;break;case ` | ` :case ` > ` :n= ` block scalar indicator $ { e [ 0 ] } ` ;break;case ` @ ` :case" ` " : n = ` reserved character ${ e [ 0 ] } ` } return n && t ( 0 , ` BAD_SCALAR_START ` , ` Plain value cannot start with ${ n } ` ) , kH ( e ) } function OH ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , kH ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function kH ( e ) { let t = / ( . * ? ) \ r ? \ n / s y , n = t . e x e c ( e ) ; i f ( ! n ) r e t u r n e ; l e t r , i ; t r y { r = R e g E x p ( ` ( ? < ! [ ] ) [ ] + $ ` ) , i = R e g E x p ( ` ^ [ ] + | ( ? < ! [ ] ) [ ] + $ ` , ` g ` ) } c a t c h { r = / [ \ t ] + $ / , i = / ^ [ \ t ] + | [ \ t ] + $ / g } l e t a = n [ 1 ] . r e p l a c e ( r , ` ` ) , o = ` ` , s = t . l a s t I n d e x ; f o r ( ; n = t . e x e c ( e ) ; ) { l e t e = n [ 1 ] . r e p l a c e ( i , ` ` ) ; e = = = ` ` ? o = = = `
` }let m=r+i.length+t.source.length;return{value:d,type:a,comment:i.comment,range:[r,m,m]}}function A H({offset:e,props:t},n,r){if(t[0].type!== ` block - scalar - header ` )return r(t[0], ` IMPOSSIBLE ` , ` Block scalar header not found ` ),null;let{source:i}=t[0],a=i[0],o=0,s= ` ` ,c=-1;for(let t=1;t<i.length;++t){let n=i[t];if(!s&&(n=== ` - ` ||n=== ` + ` ))s=n;else{let r=Number(n);!o&&r?o=r:c===-1&&(c=e+t)}}c!==-1&&r(c, ` UNEXPECTED _TOKEN ` , ` Block scalar header includes extra characters : $ { i } ` );let l=!1,u= ` ` ,d=i.length;for(let e=1;e<t.length;++e){let i=t[e];switch(i.type){case ` space ` :l=!0;case ` newline ` :d+=i.source.length;break;case ` comment ` :n&&!l&&r(i, ` MISSING _CHAR ` , ` Comments must be separated from other tokens by white space characters ` ),d+=i.source.length,u=i.source.substring(1);break;case ` error ` :r(i, ` UNEXPECTED _TOKEN ` ,i.message),d+=i.source.length;break;default:{r(i, ` UNEXPECTED _TOKEN ` , ` Unexpected token in block scalar header : $ { i . type } ` );let e=i.source;e&&typeof e== ` string ` &&(d+=e.length)}}}return{mode:a,indent:o,chomp:s,comment:u,length:d}}function j H(e){let t=e.split(/ \n ( *)/),n=t[0],r=n.match(/^( *)/),i=[r?.[1]?[r[1],n.slice(r[1].length)]:[ ` ` ,n]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}function M H(e,t,n){let{offset:r,type:i,source:a,end:o}=e,s,c,l=(e,t,i)=>n(r+e,t,i);switch(i){case ` scalar ` :s=h B.PLAIN,c=N H(a,l);break;case ` single - quoted - scalar ` :s=h B.QUOTE_SINGLE,c=P H(a,l);break;case ` double - quoted - scalar ` :s=h B.QUOTE_DOUBLE,c=I H(a,l);break;default:return n(e, ` UNEXPECTED _TOKEN ` , ` Expected a flow scalar value , but found : $ { i } ` ),{value: ` ` ,type:null,comment: ` ` ,range:[r,r+a.length,r+a.length]}}let u=r+a.length,d=C H(o,u,t,n);return{value:c,type:s,comment:d.comment,range:[r,u,d.offset]}}function N H(e,t){let n= ` ` ;switch(e[0]){case ` ` :n= ` a tab character ` ;break;case ` , ` :n= ` flow indicator character , ` ;break;case ` % ` :n= ` directive indicator character % ` ;break;case ` | ` :case ` > ` :n= ` block scalar indicator $ { e [ 0 ] } ` ;break;case ` @ ` :case" ` " : n = ` reserved character ${ e [ 0 ] } ` } return n && t ( 0 , ` BAD_SCALAR_START ` , ` Plain value cannot start with ${ n } ` ) , FH ( e ) } function PH ( e , t ) { return ( e [ e . length - 1 ] !== ` ' ` || e . length === 1 ) && t ( e . length , ` MISSING_CHAR ` , ` Missing closing 'quote ` ) , FH ( e . slice ( 1 , - 1 ) ) . replace ( /''/g , ` ' ` ) } function FH ( e ) { let t = / ( . * ? ) \ r ? \ n / s y , n = t . e x e c ( e ) ; i f ( ! n ) r e t u r n e ; l e t r , i ; t r y { r = R e g E x p ( ` ( ? < ! [ ] ) [ ] + $ ` ) , i = R e g E x p ( ` ^ [ ] + | ( ? < ! [ ] ) [ ] + $ ` , ` g ` ) } c a t c h { r = / [ \ t ] + $ / , i = / ^ [ \ t ] + | [ \ t ] + $ / g } l e t a = n [ 1 ] . r e p l a c e ( r , ` ` ) , o = ` ` , s = t . l a s t I n d e x ; f o r ( ; n = t . e x e c ( e ) ; ) { l e t e = n [ 1 ] . r e p l a c e ( i , ` ` ) ; e = = = ` ` ? o = = = `
` ?a+=o:o= `
` :(a+=o+e,o= ` ` ),s=t.lastIndex}let c=/[ \t ]*(.*)/sy;return c.lastIndex=s,n=c.exec(e),a+o+(n?.[1]?? ` ` )}function A H(e,t){let n= ` ` ;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!== ` \ r ` ||e[r+1]!== `
` :(a+=o+e,o= ` ` ),s=t.lastIndex}let c=/[ \t ]*(.*)/sy;return c.lastIndex=s,n=c.exec(e),a+o+(n?.[1]?? ` ` )}function I H(e,t){let n= ` ` ;for(let r=1;r<e.length-1;++r){let i=e[r];if(i!== ` \ r ` ||e[r+1]!== `
` ){if(i=== `
` ){let{fold:t,offset:i}=j H(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=M H[i];if(a)n+=a;else if(i=== `
` ){let{fold:t,offset:i}=L H(e,r);n+=t,r=i}else if(i=== ` \ \ ` ){let i=e[++r],a=R H[i];if(a)n+=a;else if(i=== `
` )for(i=e[r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` \ r ` &&e[r+1]=== `
` )for(i=e[++r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` x ` ||i=== ` u ` ||i=== ` U ` ){let a=i=== ` x ` ?2:i=== ` u ` ?4:8;n+=N H(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1, ` BAD _DQ _ESCAPE ` , ` Invalid escape sequence $ { i } ` ),n+=i}}else if(i=== ` ` ||i=== ` ` ){let t=r,a=e[r+1];for(;a=== ` ` ||a=== ` ` ;)a=e[++r+1];a!== `
` )for(i=e[++r+1];i=== ` ` ||i=== ` ` ;)i=e[++r+1];else if(i=== ` x ` ||i=== ` u ` ||i=== ` U ` ){let a=i=== ` x ` ?2:i=== ` u ` ?4:8;n+=z H(e,r+1,a,t),r+=a}else{let i=e.substr(r-1,2);t(r-1, ` BAD _DQ _ESCAPE ` , ` Invalid escape sequence $ { i } ` ),n+=i}}else if(i=== ` ` ||i=== ` ` ){let t=r,a=e[r+1];for(;a=== ` ` ||a=== ` ` ;)a=e[++r+1];a!== `
` &&(a!== ` \ r ` ||e[r+2]!== `
` )&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!== ` "`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing " quote ` ),n}function j H(e,t){let n= ` ` ,r=e[t+1];for(;(r=== ` ` ||r=== ` ` ||r=== `
` )&&(n+=r>t?e.slice(t,r+1):i)}else n+=i}}return(e[e.length-1]!== ` "`||e.length===1)&&t(e.length,`MISSING_CHAR`,`Missing closing " quote ` ),n}function L H(e,t){let n= ` ` ,r=e[t+1];for(;(r=== ` ` ||r=== ` ` ||r=== `
` ||r=== ` \ r ` )&&(r!== ` \ r ` ||e[t+2]=== `
` );)r=== `
` &&(n+= `
` ),t+=1,r=e[t+1];return n||= ` ` ,{fold:n,offset:t}}var M H={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function NH ( e , t , n , r ) { let i = e . substr ( t , n ) , a = i . length === n && /^[0-9a-fA-F]+$/ . test ( i ) ? parseInt ( i , 16 ) : NaN ; try { return String . fromCodePoint ( a ) } catch { let i = e . substr ( t - 2 , n + 2 ) ; return r ( t - 2 , ` BAD_DQ_ESCAPE ` , ` Invalid escape sequence ${ i } ` ) , i } } function PH ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? CH ( e , t , r ) : EH ( t , e . options . strict , r ) , c = n ? e . directives . tagName ( n . source , e => r ( n , ` TAG_RESOLVE_FAILED ` , e ) ) : null , l ; l = e . options . stringKeys && e . atKey ? e . schema [ Az ] : c ? FH ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? IH ( e , i , t , r ) : e . schema [ Az ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = Lz ( a ) ? a : new lB ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new lB ( i ) } return u . range = s , u . source = i , a && ( u . type = a ) , c && ( u . tag = c ) , l . format && ( u . format = l . format ) , o && ( u . comment = o ) , u } function FH ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ Az ] ; let a = [ ] ; for ( let t of e . tags ) if ( ! t . collection && t . tag === n ) { if ( t . default && t . test ) a . push ( t ) ; else return t } for ( let e of a ) if ( e . test ? . test ( t ) ) return e ; let o = e . knownTags [ n ] ; return o && ! o . collection ? ( e . tags . push ( Object . assign ( { } , o , { default : ! 1 , test : void 0 } ) ) , o ) : ( i ( r , ` TAG_RESOLVE_FAILED ` , ` Unresolved tag: ${ n } ` , n !== ` tag:yaml.org,2002:str ` ) , e [ Az ] ) } function IH ( { atKey : e , directives : t , schema : n } , r , i , a ) { let o = n . tags . find ( t => ( t . default === ! 0 || e && t . default === ` key ` ) && t . test ? . test ( r ) ) || n [ Az ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ Az ] ; o . tag !== e . tag && a ( i , ` TAG_RESOLVE_FAILED ` , ` Value may be parsed as either ${ t . tagString ( o . tag ) } or ${ t . tagString ( e . tag ) } ` , ! 0 ) } return o } function LH ( e , t , n ) { if ( t ) { n ? ? = t . length ; for ( let r = n - 1 ; r >= 0 ; -- r ) { let n = t [ r ] ; switch ( n . type ) { case ` space ` : case ` comment ` : case ` newline ` : e -= n . source . length ; continue } for ( n = t [ ++ r ] ; n ? . type === ` space ` ; ) e += n . source . length , n = t [ ++ r ] ; break } } return e } var RH = { composeNode : zH , composeEmptyNode : BH } ; function zH ( e , t , n , r ) { let i = e . atKey , { spaceBefore : a , comment : o , anchor : s , tag : c } = n , l , u = ! 0 ; switch ( t . type ) { case ` alias ` : l = VH ( e , t , r ) , ( s || c ) && r ( t , ` ALIAS_PROPS ` , ` An alias node must not specify any properties ` ) ; break ; case ` scalar ` : case ` single-quoted-scalar ` : case ` double-quoted-scalar ` : case ` block-scalar ` : l = PH ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = SH ( RH , e , t , n , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) } catch ( e ) { r ( t , ` RESOURCE_EXHAUSTION ` , e instanceof Error ? e . message : String ( e ) ) } break ; default : r ( t , ` UNEXPECTED_TOKEN ` , t . type === ` error ` ? t . message : ` Unsupported token (type: ${ t . type } ) ` ) , u = ! 1 } return l ? ? = BH ( e , t . offset , void 0 , null , n , r ) , s && l . anchor === ` ` && r ( s , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) , i && e . options . stringKeys && ( ! Lz ( l ) || typeof l . value != ` string ` || l . tag && l . tag !== ` tag:yaml.org,2002:str ` ) && r ( c ? ? t , ` NON_STRING_KEY ` , ` With stringKeys, all keys must be strings ` ) , a && ( l . spaceBefore = ! 0 ) , o && ( t . type === ` scalar ` && t . source === ` ` ? l . comment = o : l . commentBefore = o ) , e . options . keepSourceTokens && u && ( l . srcToken = t ) , l } function BH ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = PH ( e , { type : ` scalar ` , offset : LH ( t , n , r ) , indent : - 1 , source : ` ` } , s , l ) ; return o && ( u . anchor = o . source . substring ( 1 ) , u . anchor === ` ` && l ( o , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) ) , i && ( u . spaceBefore = ! 0 ) , a && ( u . comment = a , u . range [ 2 ] = c ) , u } function VH ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new oB ( n . substring ( 1 ) ) ; a . source === ` ` && i ( t , ` BAD_ALIAS ` , ` Alias cannot be an empty string ` ) , a . source . endsWith ( ` : ` ) && i ( t + n . length - 1 , ` BAD_ALIAS ` , ` Alias ending in : is ambiguous ` , ! 0 ) ; let o = t + n . length , s = _H ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function HH ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new iH ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = uH ( r , { indicator : ` doc-start ` , next : i ? ? a ? . [ 0 ] , offset : n , onError : o , parentIndent : 0 , startOnNewline : ! 0 } ) ; l . found && ( s . directives . docStart = ! 0 , i && ( i . type === ` block-map ` || i . type === ` block-seq ` ) && ! l . hasNewline && o ( l . end , ` MISSING_CHAR ` , ` Block collection cannot start on same line with directives-end marker ` ) ) , s . contents = i ? zH ( c , i , l , o ) : BH ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = _H ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function UH ( e ) { if ( typeof e == ` number ` ) return [ e , e + 1 ] ; if ( Array . isArray ( e ) ) return e . length === 2 ? e : [ e [ 0 ] , e [ 1 ] ] ; let { offset : t , source : n } = e ; return [ t , t + ( typeof n == ` string ` ? n . length : 1 ) ] } function WH ( e ) { let t = ` ` , n = ! 1 , r = ! 1 ; for ( let i = 0 ; i < e . length ; ++ i ) { let a = e [ i ] ; switch ( a [ 0 ] ) { case ` # ` : t += ( t === ` ` ? ` ` : r ? `
` ),t+=1,r=e[t+1];return n||= ` ` ,{fold:n,offset:t}}var R H={0: ` \ 0 ` ,a: ` \ x07 ` ,b: ` \ b ` ,e: ` \ x1B ` ,f: ` \ f ` ,n: `
` ,r: ` \ r ` ,t: ` ` ,v: ` \ v ` ,N: `
` ,_: ` \ xA0 ` ,L: ` \u2028 ` ,P: ` \u2029 ` ," ": ` ` ,'"': ` "`," / ":`/`," \ \ ":`\\`," " : ` ` } ; function zH ( e , t , n , r ) { let i = e . substr ( t , n ) , a = i . length === n && /^[0-9a-fA-F]+$/ . test ( i ) ? parseInt ( i , 16 ) : NaN ; try { return String . fromCodePoint ( a ) } catch { let i = e . substr ( t - 2 , n + 2 ) ; return r ( t - 2 , ` BAD_DQ_ESCAPE ` , ` Invalid escape sequence ${ i } ` ) , i } } function BH ( e , t , n , r ) { let { value : i , type : a , comment : o , range : s } = t . type === ` block-scalar ` ? kH ( e , t , r ) : MH ( t , e . options . strict , r ) , c = n ? e . directives . tagName ( n . source , e => r ( n , ` TAG_RESOLVE_FAILED ` , e ) ) : null , l ; l = e . options . stringKeys && e . atKey ? e . schema [ Iz ] : c ? VH ( e . schema , i , c , n , r ) : t . type === ` scalar ` ? HH ( e , i , t , r ) : e . schema [ Iz ] ; let u ; try { let a = l . resolve ( i , e => r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , e ) , e . options ) ; u = Uz ( a ) ? a : new hB ( a ) } catch ( e ) { let a = e instanceof Error ? e . message : String ( e ) ; r ( n ? ? t , ` TAG_RESOLVE_FAILED ` , a ) , u = new hB ( i ) } return u . range = s , u . source = i , a && ( u . type = a ) , c && ( u . tag = c ) , l . format && ( u . format = l . format ) , o && ( u . comment = o ) , u } function VH ( e , t , n , r , i ) { if ( n === ` ! ` ) return e [ Iz ] ; let a = [ ] ; for ( let t of e . tags ) if ( ! t . collection && t . tag === n ) { if ( t . default && t . test ) a . push ( t ) ; else return t } for ( let e of a ) if ( e . test ? . test ( t ) ) return e ; let o = e . knownTags [ n ] ; return o && ! o . collection ? ( e . tags . push ( Object . assign ( { } , o , { default : ! 1 , test : void 0 } ) ) , o ) : ( i ( r , ` TAG_RESOLVE_FAILED ` , ` Unresolved tag: ${ n } ` , n !== ` tag:yaml.org,2002:str ` ) , e [ Iz ] ) } function HH ( { atKey : e , directives : t , schema : n } , r , i , a ) { let o = n . tags . find ( t => ( t . default === ! 0 || e && t . default === ` key ` ) && t . test ? . test ( r ) ) || n [ Iz ] ; if ( n . compat ) { let e = n . compat . find ( e => e . default && e . test ? . test ( r ) ) ? ? n [ Iz ] ; o . tag !== e . tag && a ( i , ` TAG_RESOLVE_FAILED ` , ` Value may be parsed as either ${ t . tagString ( o . tag ) } or ${ t . tagString ( e . tag ) } ` , ! 0 ) } return o } function UH ( e , t , n ) { if ( t ) { n ? ? = t . length ; for ( let r = n - 1 ; r >= 0 ; -- r ) { let n = t [ r ] ; switch ( n . type ) { case ` space ` : case ` comment ` : case ` newline ` : e -= n . source . length ; continue } for ( n = t [ ++ r ] ; n ? . type === ` space ` ; ) e += n . source . length , n = t [ ++ r ] ; break } } return e } var WH = { composeNode : GH , composeEmptyNode : KH } ; function GH ( e , t , n , r ) { let i = e . atKey , { spaceBefore : a , comment : o , anchor : s , tag : c } = n , l , u = ! 0 ; switch ( t . type ) { case ` alias ` : l = qH ( e , t , r ) , ( s || c ) && r ( t , ` ALIAS_PROPS ` , ` An alias node must not specify any properties ` ) ; break ; case ` scalar ` : case ` single-quoted-scalar ` : case ` double-quoted-scalar ` : case ` block-scalar ` : l = BH ( e , t , c , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) ; break ; case ` block-map ` : case ` block-seq ` : case ` flow-collection ` : try { l = OH ( WH , e , t , n , r ) , s && ( l . anchor = s . source . substring ( 1 ) ) } catch ( e ) { r ( t , ` RESOURCE_EXHAUSTION ` , e instanceof Error ? e . message : String ( e ) ) } break ; default : r ( t , ` UNEXPECTED_TOKEN ` , t . type === ` error ` ? t . message : ` Unsupported token (type: ${ t . type } ) ` ) , u = ! 1 } return l ? ? = KH ( e , t . offset , void 0 , null , n , r ) , s && l . anchor === ` ` && r ( s , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) , i && e . options . stringKeys && ( ! Uz ( l ) || typeof l . value != ` string ` || l . tag && l . tag !== ` tag:yaml.org,2002:str ` ) && r ( c ? ? t , ` NON_STRING_KEY ` , ` With stringKeys, all keys must be strings ` ) , a && ( l . spaceBefore = ! 0 ) , o && ( t . type === ` scalar ` && t . source === ` ` ? l . comment = o : l . commentBefore = o ) , e . options . keepSourceTokens && u && ( l . srcToken = t ) , l } function KH ( e , t , n , r , { spaceBefore : i , comment : a , anchor : o , tag : s , end : c } , l ) { let u = BH ( e , { type : ` scalar ` , offset : UH ( t , n , r ) , indent : - 1 , source : ` ` } , s , l ) ; return o && ( u . anchor = o . source . substring ( 1 ) , u . anchor === ` ` && l ( o , ` BAD_ALIAS ` , ` Anchor cannot be an empty string ` ) ) , i && ( u . spaceBefore = ! 0 ) , a && ( u . comment = a , u . range [ 2 ] = c ) , u } function qH ( { options : e } , { offset : t , source : n , end : r } , i ) { let a = new fB ( n . substring ( 1 ) ) ; a . source === ` ` && i ( t , ` BAD_ALIAS ` , ` Alias cannot be an empty string ` ) , a . source . endsWith ( ` : ` ) && i ( t + n . length - 1 , ` BAD_ALIAS ` , ` Alias ending in : is ambiguous ` , ! 0 ) ; let o = t + n . length , s = CH ( r , o , e . strict , i ) ; return a . range = [ t , o , s . offset ] , s . comment && ( a . comment = s . comment ) , a } function JH ( e , t , { offset : n , start : r , value : i , end : a } , o ) { let s = new uH ( void 0 , Object . assign ( { _directives : t } , e ) ) , c = { atKey : ! 1 , atRoot : ! 0 , directives : s . directives , options : s . options , schema : s . schema } , l = gH ( r , { indicator : ` doc-start ` , next : i ? ? a ? . [ 0 ] , offset : n , onError : o , parentIndent : 0 , startOnNewline : ! 0 } ) ; l . found && ( s . directives . docStart = ! 0 , i && ( i . type === ` block-map ` || i . type === ` block-seq ` ) && ! l . hasNewline && o ( l . end , ` MISSING_CHAR ` , ` Block collection cannot start on same line with directives-end marker ` ) ) , s . contents = i ? GH ( c , i , l , o ) : KH ( c , l . end , r , null , l , o ) ; let u = s . contents . range [ 2 ] , d = CH ( a , u , ! 1 , o ) ; return d . comment && ( s . comment = d . comment ) , s . range = [ n , u , d . offset ] , s } function YH ( e ) { if ( typeof e == ` number ` ) return [ e , e + 1 ] ; if ( Array . isArray ( e ) ) return e . length === 2 ? e : [ e [ 0 ] , e [ 1 ] ] ; let { offset : t , source : n } = e ; return [ t , t + ( typeof n == ` string ` ? n . length : 1 ) ] } function XH ( e ) { let t = ` ` , n = ! 1 , r = ! 1 ; for ( let i = 0 ; i < e . length ; ++ i ) { let a = e [ i ] ; switch ( a [ 0 ] ) { case ` # ` : t += ( t === ` ` ? ` ` : r ? `
` : `
` )+(a.substring(1)|| ` ` ),n=!0,r=!1;break;case ` % ` :e[i+1]?.[0]!== ` # ` &&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var G H=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=U H(e);r?this.warnings.push(new c H(i,t,n)):this.errors.push(new s H(i,t,n))},this.directives=new Qz ({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=W H(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment? ` $ { e . comment } \ n$ { n } ` :n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(z z(i)&&!i.flow&&i.items.length>0){let e=i.items[0];I z(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t? ` $ { n } \ n$ { t } ` :n}else{let e=i.commentBefore;i.commentBefore=e? ` $ { n } \ n$ { e } ` :n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:W H(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case ` directive ` :this.directives.add(e.source,(t,n,r)=>{let i=U H(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=H H(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e, ` MISSING _CHAR ` , ` Missing directives - end / doc - start indicator line ` ),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case ` byte - order - mark ` :case ` space ` :break;case ` comment ` :case ` newline ` :this.prelude.push(e.source);break;case ` error ` :{let t=e.source? ` $ { e . message } : $ { JSON . stringify ( e . source ) } ` :e.message,n=new s H(U H(e), ` UNEXPECTED _TOKEN ` ,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case ` doc - end ` :{if(!this.doc){this.errors.push(new s H(U H(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=_ H(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e? ` $ { e } \ n$ { t . comment } ` :t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new s H(U H(e), ` UNEXPECTED _TOKEN ` , ` Unsupported token $ { e . type } ` ))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new i H(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t, ` MISSING _CHAR ` , ` Missing directives - end indicator line ` ),e.range=[0,t,t],this.decorate(e,!1),yield e}}},K H=Symbol( ` break visit ` ),q H=Symbol( ` skip children ` ),JH =Symbol( ` remove item ` );function YH (e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),XH (Object.freeze([]),e,t)}YH .BREAK=K H,YH .SKIP=qH,YH .REMOVE=JH,YH .itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&& ` items ` in t)n=t.items[r];else return}return n},YH .parentCollection=(e,t)=>{let n=YH .itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&& ` items ` in i)return i;throw Error( ` Parent collection not found ` )};function XH (e,t,n){let r=n(t,e);if(typeof r== ` symbol ` )return r;for(let i of[ ` key ` , ` value ` ]){let a=t[i];if(a&& ` items ` in a){for(let t=0;t<a.items.length;++t){let r=XH (Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===K H)return K H;else r===JH &&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function ZH (e){switch(e){case ` ` :return ` byte - order - mark ` ;case ` ` :return ` doc - mode ` ;case ` ` :return ` flow - error - end ` ;case ` ` :return ` scalar ` ;case ` -- - ` :return ` doc - start ` ;case ` ... ` :return ` doc - end ` ;case ` ` :case `
` )+(a.substring(1)|| ` ` ),n=!0,r=!1;break;case ` % ` :e[i+1]?.[0]!== ` # ` &&(i+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}var Z H=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,n,r)=>{let i=Y H(e);r?this.warnings.push(new m H(i,t,n)):this.errors.push(new p H(i,t,n))},this.directives=new iB ({version:e.version|| ` 1.2 ` }),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=X H(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment? ` $ { e . comment } \ n$ { n } ` :n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(G z(i)&&!i.flow&&i.items.length>0){let e=i.items[0];H z(e)&&(e=e.key);let t=e.commentBefore;e.commentBefore=t? ` $ { n } \ n$ { t } ` :n}else{let e=i.commentBefore;i.commentBefore=e? ` $ { n } \ n$ { e } ` :n}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:X H(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let t of e)yield*this.next(t);yield*this.end(t,n)}*next(e){switch(e.type){case ` directive ` :this.directives.add(e.source,(t,n,r)=>{let i=Y H(e);i[0]+=t,this.onError(i, ` BAD _DIRECTIVE ` ,n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case ` document ` :{let t=J H(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e, ` MISSING _CHAR ` , ` Missing directives - end / doc - start indicator line ` ),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case ` byte - order - mark ` :case ` space ` :break;case ` comment ` :case ` newline ` :this.prelude.push(e.source);break;case ` error ` :{let t=e.source? ` $ { e . message } : $ { JSON . stringify ( e . source ) } ` :e.message,n=new p H(Y H(e), ` UNEXPECTED _TOKEN ` ,t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case ` doc - end ` :{if(!this.doc){this.errors.push(new p H(Y H(e), ` UNEXPECTED _TOKEN ` , ` Unexpected doc - end without preceding document ` ));break}this.doc.directives.docEnd=!0;let t=C H(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let e=this.doc.comment;this.doc.comment=e? ` $ { e } \ n$ { t . comment } ` :t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new p H(Y H(e), ` UNEXPECTED _TOKEN ` , ` Unsupported token $ { e . type } ` ))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let e=new u H(void 0,Object.assign({_directives:this.directives},this.options));this.atDirectives&&this.onError(t, ` MISSING _CHAR ` , ` Missing directives - end indicator line ` ),e.range=[0,t,t],this.decorate(e,!1),yield e}}},Q H=Symbol( ` break visit ` ), $ H=Symbol( ` skip children ` ),eU =Symbol( ` remove item ` );function tU (e,t){ ` type ` in e&&e.type=== ` document ` &&(e={start:e.start,value:e.value}),nU (Object.freeze([]),e,t)}tU .BREAK=Q H,tU .SKIP= $ H,tU .REMOVE=eU,tU .itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&` items ` in t)n=t.items[r];else return}return n},tU .parentCollection=(e,t)=>{let n=tU .itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&& ` items ` in i)return i;throw Error( ` Parent collection not found ` )};function nU (e,t,n){let r=n(t,e);if(typeof r== ` symbol ` )return r;for(let i of[ ` key ` , ` value ` ]){let a=t[i];if(a&& ` items ` in a){for(let t=0;t<a.items.length;++t){let r=nU (Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r== ` number ` )t=r-1;else if(r===Q H)return Q H;else r===eU &&(a.items.splice(t,1),--t)}typeof r== ` function ` &&i=== ` key ` &&(r=r(t,e))}}return typeof r== ` function ` ?r(t,e):r}function rU (e){switch(e){case ` ` :return ` byte - order - mark ` ;case ` ` :return ` doc - mode ` ;case ` ` :return ` flow - error - end ` ;case ` ` :return ` scalar ` ;case ` -- - ` :return ` doc - start ` ;case ` ... ` :return ` doc - end ` ;case ` ` :case `
` :case ` \ r
` :return ` newline ` ;case ` - ` :return ` seq - item - ind ` ;case ` ? ` :return ` explicit - key - ind ` ;case ` : ` :return ` map - value - ind ` ;case ` { ` :return ` flow - map - start ` ;case ` } ` :return ` flow - map - end ` ;case ` [ ` :return ` flow - seq - start ` ;case ` ] ` :return ` flow - seq - end ` ;case ` , ` :return ` comma ` }switch(e[0]){case ` ` :case ` ` :return ` space ` ;case ` # ` :return ` comment ` ;case ` % ` :return ` directive - line ` ;case ` * ` :return ` alias ` ;case ` & ` :return ` anchor ` ;case ` ! ` :return ` tag ` ;case ` ' ` :return ` single - quoted - scalar ` ;case ` " ` :return ` double - quoted - scalar ` ;case ` | ` :case ` > ` :return ` block - scalar - header ` }return null}function QH (e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var $ H =new Set(` 0123456789 ABCDEFabcdef ` ),e U=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , t U = n e w S e t ( ` , [ ] { } ` ) , n U = n e w S e t ( ` , [ ] { }
\ r ` ),r U=e=>!e||n U.has(e),i U=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer= ` ` ,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!= ` string ` )throw TypeError( ` source is not a string ` );this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next?? ` stream ` ;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t=== ` ` ||t=== ` ` ;)t=this.buffer[++e];return!t||t=== ` # ` ||t=== `
` :return ` newline ` ;case ` - ` :return ` seq - item - ind ` ;case ` ? ` :return ` explicit - key - ind ` ;case ` : ` :return ` map - value - ind ` ;case ` { ` :return ` flow - map - start ` ;case ` } ` :return ` flow - map - end ` ;case ` [ ` :return ` flow - seq - start ` ;case ` ] ` :return ` flow - seq - end ` ;case ` , ` :return ` comma ` }switch(e[0]){case ` ` :case ` ` :return ` space ` ;case ` # ` :return ` comment ` ;case ` % ` :return ` directive - line ` ;case ` * ` :return ` alias ` ;case ` & ` :return ` anchor ` ;case ` ! ` :return ` tag ` ;case ` ' ` :return ` single - quoted - scalar ` ;case ` " ` :return ` double - quoted - scalar ` ;case ` | ` :case ` > ` :return ` block - scalar - header ` }return null}function iU (e){switch(e){case void 0:case ` ` :case `
` :case ` \ r ` :case ` ` :return!0;default:return!1}}var aU =new Set( ` 0123456789 ABCDEFabcdef ` ),o U=new Set( ` 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - # ; / ? : @ & = + $ _ . ! ~ * ' ( ) ` ) , s U = n e w S e t ( ` , [ ] { } ` ) , c U = n e w S e t ( ` , [ ] { }
\ r ` ),l U=e=>!e||c U.has(e),u U=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer= ` ` ,this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!= ` string ` )throw TypeError( ` source is not a string ` );this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next?? ` stream ` ;for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t=== ` ` ||t=== ` ` ;)t=this.buffer[++e];return!t||t=== ` # ` ||t=== `
` ||t=== ` \ r ` &&this.buffer[e+1]=== `
` }charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t=== ` ` ;)t=this.buffer[++n+e];if(t=== ` \ r ` ){let t=this.buffer[n+e+1];if(t=== `
` ||!t&&!this.atEnd)return e+n+1}return t=== `
` ||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t=== ` - ` ||t=== ` . ` ){let t=this.buffer.substr(e,3);if((t=== ` -- - ` ||t=== ` ... ` )&&QH (this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!= ` number ` ||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf( `
` ,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]=== ` \ r ` &&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case ` stream ` :return yield*this.parseStream();case ` line - start ` :return yield*this.parseLineStart();case ` block - start ` :return yield*this.parseBlockStart();case ` doc ` :return yield*this.parseDocument();case ` flow ` :return yield*this.parseFlowCollection();case ` quoted - scalar ` :return yield*this.parseQuotedScalar();case ` block - scalar ` :return yield*this.parseBlockScalar();case ` plain - scalar ` :return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext( ` stream ` );if(e[0]=== ` ` &&(yield*this.pushCount(1),e=e.substring(1)),e[0]=== ` % ` ){let t=e.length,n=e.indexOf( ` # ` );for(;n!==-1;){let r=e[n-1];if(r=== ` ` ||r=== ` ` ){t=n-1;break}n=e.indexOf( ` # ` ,n+1)}for(;;){let n=e[t-1];if(n=== ` ` ||n=== ` ` )--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(), ` stream ` }if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(), ` stream ` }return yield ` ` ,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext( ` line - start ` );if(e=== ` - ` ||e=== ` . ` ){if(!this.atEnd&&!this.hasChars(4))return this.setNext( ` line - start ` );let e=this.peek(3);if((e=== ` -- - ` ||e=== ` ... ` )&&QH (this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e=== ` -- - ` ? ` doc ` : ` stream ` }return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!QH (this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext( ` block - start ` );if((e=== ` - ` ||e=== ` ? ` ||e=== ` : ` )&&QH (t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e, ` block - start ` }return ` doc ` }*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext( ` doc ` );let t=yield*this.pushIndicators();switch(e[t]){case ` # ` :yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case ` { ` :case ` [ ` :return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1, ` flow ` ;case ` } ` :case ` ] ` :return yield*this.pushCount(1), ` doc ` ;case ` * ` :return yield*this.pushUntil(r U), ` doc ` ;case ` "`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&QH (r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield` `,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(r U),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||QH (e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`' ` )for(;t!==-1&&this.buffer[t+1]=== ` '`;)t=this.buffer.indexOf(`' ` ,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]=== ` \ \ ` ;)e+=1;if(e%2==0)break;t=this.buffer.indexOf( ` " ` ,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf( `
` ||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t=== ` - ` ||t=== ` . ` ){let t=this.buffer.substr(e,3);if((t=== ` -- - ` ||t=== ` ... ` )&&iU (this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!= ` number ` ||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf( `
` ,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]=== ` \ r ` &&--e,this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case ` stream ` :return yield*this.parseStream();case ` line - start ` :return yield*this.parseLineStart();case ` block - start ` :return yield*this.parseBlockStart();case ` doc ` :return yield*this.parseDocument();case ` flow ` :return yield*this.parseFlowCollection();case ` quoted - scalar ` :return yield*this.parseQuotedScalar();case ` block - scalar ` :return yield*this.parseBlockScalar();case ` plain - scalar ` :return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext( ` stream ` );if(e[0]=== ` ` &&(yield*this.pushCount(1),e=e.substring(1)),e[0]=== ` % ` ){let t=e.length,n=e.indexOf( ` # ` );for(;n!==-1;){let r=e[n-1];if(r=== ` ` ||r=== ` ` ){t=n-1;break}n=e.indexOf( ` # ` ,n+1)}for(;;){let n=e[t-1];if(n=== ` ` ||n=== ` ` )--t;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(), ` stream ` }if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(), ` stream ` }return yield ` ` ,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext( ` line - start ` );if(e=== ` - ` ||e=== ` . ` ){if(!this.atEnd&&!this.hasChars(4))return this.setNext( ` line - start ` );let e=this.peek(3);if((e=== ` -- - ` ||e=== ` ... ` )&&iU (this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,e=== ` -- - ` ? ` doc ` : ` stream ` }return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!iU (this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext( ` block - start ` );if((e=== ` - ` ||e=== ` ? ` ||e=== ` : ` )&&iU (t)){let e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e, ` block - start ` }return ` doc ` }*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext( ` doc ` );let t=yield*this.pushIndicators();switch(e[t]){case ` # ` :yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case ` { ` :case ` [ ` :return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1, ` flow ` ;case ` } ` :case ` ] ` :return yield*this.pushCount(1), ` doc ` ;case ` * ` :return yield*this.pushUntil(l U), ` doc ` ;case ` "`:case`'`:return yield*this.parseQuotedScalar();case`|`:case`>`:return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext(`flow`);if((n!==-1&&n<this.indentNext&&r[0]!==`#`||n===0&&(r.startsWith(`---`)||r.startsWith(`...`))&&iU (r[3]))&&(n!==this.indentNext-1||this.flowLevel!==1||r[0]!==`]`&&r[0]!==`}`))return this.flowLevel=0,yield` `,yield*this.parseLineStart();let i=0;for(;r[i]===`,`;)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return`flow`;case`#`:return yield*this.pushCount(r.length-i),`flow`;case`{`:case`[`:return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,`flow`;case`}`:case`]`:return yield*this.pushCount(1),this.flowKey=!0,--this.flowLevel,this.flowLevel?`flow`:`doc`;case`*`:return yield*this.pushUntil(l U),`flow`;case`" ` :case ` '`:return this.flowKey=!0,yield*this.parseQuotedScalar();case`:`:{let e=this.charAt(1);if(this.flowKey||iU (e)||e===`,`)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),`flow`}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e===`' ` )for(;t!==-1&&this.buffer[t+1]=== ` '`;)t=this.buffer.indexOf(`' ` ,t+2);else for(;t!==-1;){let e=0;for(;this.buffer[t-1-e]=== ` \ \ ` ;)e+=1;if(e%2==0)break;t=this.buffer.indexOf( ` " ` ,t+1)}let n=this.buffer.substring(0,t),r=n.indexOf( `
` ,this.pos);if(r!==-1){for(;r!==-1;){let e=this.continueScalar(r+1);if(e===-1)break;r=n.indexOf( `
` ,e)}r!==-1&&(t=r-(n[r-1]=== ` \ r ` ?2:1))}if(t===-1){if(!this.atEnd)return this.setNext( ` quoted - scalar ` );t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel? ` flow ` : ` doc ` }*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t=== ` + ` )this.blockScalarKeep=!0;else if(t> ` 0 ` &&t<= ` 9 ` )this.blockScalarIndent=Number(t)-1;else if(t!== ` - ` )break}return yield*this.pushUntil(e=>QH (e)||e=== ` # ` )}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case ` ` :t+=1;break;case `
` ,e)}r!==-1&&(t=r-(n[r-1]=== ` \ r ` ?2:1))}if(t===-1){if(!this.atEnd)return this.setNext( ` quoted - scalar ` );t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel? ` flow ` : ` doc ` }*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t=== ` + ` )this.blockScalarKeep=!0;else if(t> ` 0 ` &&t<= ` 9 ` )this.blockScalarIndent=Number(t)-1;else if(t!== ` - ` )break}return yield*this.pushUntil(e=>iU (e)||e=== ` # ` )}*parseBlockScalar(){let e=this.pos-1,t=0,n;loop:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case ` ` :t+=1;break;case `
` :e=r,t=0;break;case ` \ r ` :{let e=this.buffer[r+1];if(!e&&!this.atEnd)return this.setNext( ` block - scalar ` );if(e=== `
` )break}default:break loop}if(!n&&!this.atEnd)return this.setNext( ` block - scalar ` );if(t>=this.indentNext){this.indentNext=this.blockScalarIndent===-1?t:this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf( `
` ,t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext( ` block - scalar ` );e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n=== ` ` ;)n=this.buffer[++r];if(n=== ` ` ){for(;n=== ` ` ||n=== ` ` ||n=== ` \ r ` ||n=== `
` ;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let n=e-1,r=this.buffer[n];r=== ` \ r ` &&(r=this.buffer[--n]);let i=n;for(;r=== ` ` ;)r=this.buffer[--n];if(r=== `
` &&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield ` ` ,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r=== ` : ` ){let r=this.buffer[n+1];if(QH (r)||e&&t U.has(r))break;t=n}else if(QH (r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` &&n>=this.pos&&n+1+t>i)e=n;else break}while(1);return yield ` ` ,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r=== ` : ` ){let r=this.buffer[n+1];if(iU (r)||e&&s U.has(r))break;t=n}else if(iU (r)){let i=this.buffer[n+1];if(r=== ` \ r ` &&(i=== `
` ?(n+=1,r= `
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&t U.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&t U.has(r))break;t=n}return!r&&!this.atEnd?this.setNext( ` plain - scalar ` ):(yield ` ` ,yield*this.pushToIndex(t+1,!0),e? ` flow ` : ` doc ` )}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield ` ` ),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case ` ! ` :e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case ` & ` :e+=yield*this.pushUntil(r U),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(QH (n)||t&&t U.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)=== ` < ` ){let e=this.pos+2,t=this.buffer[e];for(;!QH (t)&&t!== ` > ` ;)t=this.buffer[++e];return yield*this.pushToIndex(t=== ` > ` ?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(e U.has(t))t=this.buffer[++e];else if(t=== ` % ` && $ H .has(this.buffer[e+1])&&$ H .has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
` ,i=this.buffer[n+1]):t=n),i=== ` # ` ||e&&s U.has(i))break;if(r=== `
` ){let e=this.continueScalar(n+1);if(e===-1)break;n=Math.max(n,e-2)}}else{if(e&&s U.has(r))break;t=n}return!r&&!this.atEnd?this.setNext( ` plain - scalar ` ):(yield ` ` ,yield*this.pushToIndex(t+1,!0),e? ` flow ` : ` doc ` )}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield ` ` ),0)}*pushIndicators(){let e=0;loop:for(;;){switch(this.charAt(0)){case ` ! ` :e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue loop;case ` & ` :e+=yield*this.pushUntil(l U),e+=yield*this.pushSpaces(!0);continue loop;case ` - ` :case ` ? ` :case ` : ` :{let t=this.flowLevel>0,n=this.charAt(1);if(iU (n)||t&&s U.has(n)){t?this.flowKey&&=!1:this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue loop}}}break loop}return e}*pushTag(){if(this.charAt(1)=== ` < ` ){let e=this.pos+2,t=this.buffer[e];for(;!iU (t)&&t!== ` > ` ;)t=this.buffer[++e];return yield*this.pushToIndex(t=== ` > ` ?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(o U.has(t))t=this.buffer[++e];else if(t=== ` % ` &&aU .has(this.buffer[e+1])&&aU .has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e=== `
` ?yield*this.pushCount(1):e=== ` \ r ` &&this.charAt(1)=== `
` ?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n=== ` ` ||e&&n=== ` ` );let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},aU=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function oU(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function sU(e){for(let t=0;t<e.length;++t)switch(e[t].type){case ` space ` :case ` comment ` :case ` newline ` :break;default:return t}return-1}function cU(e){switch(e?.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :case ` flow - collection ` :return!0;default:return!1}}function lU(e){switch(e.type){case ` document ` :return e.start;case ` block - map ` :{let t=e.items[e.items.length-1];return t.sep??t.start}case ` block - seq ` :return e.items[e.items.length-1].start;default:return[]}}function uU(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case ` doc - start ` :case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :case ` newline ` :break loop}for(;e[++t]?.type=== ` space ` ;);return e.splice(t,e.length)}function dU(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function fU(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!oU(t.start, ` explicit - key - ind ` )&&!oU(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,cU(t.value)?t.value.end?dU(t.value.end,t.sep):t.value.end=t.sep:dU(t.start,t.sep),delete t.sep)}var pU=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source= ` ` ,this.type= ` ` ,this.lexer=new iU,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ZH(e);if(!t){let t= ` Not a YAML token : $ { e } ` ;yield*this.pop({type: ` error ` ,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t=== ` scalar ` )this.atNewLine=!1,this.atScalar=!0,this.type= ` scalar ` ;else{switch(this.type=t,yield*this.step(),t){case ` newline ` :this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case ` space ` :this.atNewLine&&e[0]=== ` ` &&(this.indent+=e.length);break;case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :this.atNewLine&&(this.indent+=e.length);break;case ` doc - mode ` :case ` flow - error - end ` :return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type=== ` doc - end ` &&e?.type!== ` doc - end ` ){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type: ` doc - end ` ,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case ` document ` :return yield*this.document(e);case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return yield*this.scalar(e);case ` block - scalar ` :return yield*this.blockScalar(e);case ` block - map ` :return yield*this.blockMap(e);case ` block - seq ` :return yield*this.blockSequence(e);case ` flow - collection ` :return yield*this.flowCollection(e);case ` doc - end ` :return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type: ` error ` ,offset:this.offset,source: ` ` ,message: ` Tried to pop an empty stack ` };else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type=== ` block - scalar ` ?t.indent= ` indent ` in e?e.indent:0:t.type=== ` flow - collection ` &&e.type=== ` document ` &&(t.indent=0),t.type=== ` flow - collection ` &&fU(t),e.type){case ` document ` :e.value=t;break;case ` block - scalar ` :e.props.push(t);break;case ` block - map ` :{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case ` block - seq ` :{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case ` flow - collection ` :{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type=== ` document ` ||e.type=== ` block - map ` ||e.type=== ` block - seq ` )&&(t.type=== ` block - map ` ||t.type=== ` block - seq ` )){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&sU(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!== ` comment ` ||e.i
Line truncated
` ?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n=== ` ` ||e&&n=== ` ` );let r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}},dU=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};function fU(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function pU(e){for(let t=0;t<e.length;++t)switch(e[t].type){case ` space ` :case ` comment ` :case ` newline ` :break;default:return t}return-1}function mU(e){switch(e?.type){case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :case ` flow - collection ` :return!0;default:return!1}}function hU(e){switch(e.type){case ` document ` :return e.start;case ` block - map ` :{let t=e.items[e.items.length-1];return t.sep??t.start}case ` block - seq ` :return e.items[e.items.length-1].start;default:return[]}}function gU(e){if(e.length===0)return[];let t=e.length;loop:for(;--t>=0;)switch(e[t].type){case ` doc - start ` :case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :case ` newline ` :break loop}for(;e[++t]?.type=== ` space ` ;);return e.splice(t,e.length)}function _U(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function vU(e){if(e.start.type=== ` flow - seq - start ` )for(let t of e.items)t.sep&&!t.value&&!fU(t.start, ` explicit - key - ind ` )&&!fU(t.sep, ` map - value - ind ` )&&(t.key&&(t.value=t.key),delete t.key,mU(t.value)?t.value.end?_U(t.value.end,t.sep):t.value.end=t.sep:_U(t.start,t.sep),delete t.sep)}var yU=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source= ` ` ,this.type= ` ` ,this.lexer=new uU,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=rU(e);if(!t){let t= ` Not a YAML token : $ { e } ` ;yield*this.pop({type: ` error ` ,offset:this.offset,message:t,source:e}),this.offset+=e.length}else if(t=== ` scalar ` )this.atNewLine=!1,this.atScalar=!0,this.type= ` scalar ` ;else{switch(this.type=t,yield*this.step(),t){case ` newline ` :this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case ` space ` :this.atNewLine&&e[0]=== ` ` &&(this.indent+=e.length);break;case ` explicit - key - ind ` :case ` map - value - ind ` :case ` seq - item - ind ` :this.atNewLine&&(this.indent+=e.length);break;case ` doc - mode ` :case ` flow - error - end ` :return;default:this.atNewLine=!1}this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type=== ` doc - end ` &&e?.type!== ` doc - end ` ){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type: ` doc - end ` ,offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case ` document ` :return yield*this.document(e);case ` alias ` :case ` scalar ` :case ` single - quoted - scalar ` :case ` double - quoted - scalar ` :return yield*this.scalar(e);case ` block - scalar ` :return yield*this.blockScalar(e);case ` block - map ` :return yield*this.blockMap(e);case ` block - seq ` :return yield*this.blockSequence(e);case ` flow - collection ` :return yield*this.flowCollection(e);case ` doc - end ` :return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type: ` error ` ,offset:this.offset,source: ` ` ,message: ` Tried to pop an empty stack ` };else if(this.stack.length===0)yield t;else{let e=this.peek(1);switch(t.type=== ` block - scalar ` ?t.indent= ` indent ` in e?e.indent:0:t.type=== ` flow - collection ` &&e.type=== ` document ` &&(t.indent=0),t.type=== ` flow - collection ` &&vU(t),e.type){case ` document ` :e.value=t;break;case ` block - scalar ` :e.props.push(t);break;case ` block - map ` :{let n=e.items[e.items.length-1];if(n.value){e.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case ` block - seq ` :{let n=e.items[e.items.length-1];n.value?e.items.push({start:[],value:t}):n.value=t;break}case ` flow - collection ` :{let n=e.items[e.items.length-1];!n||n.value?e.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((e.type=== ` document ` ||e.type=== ` block - map ` ||e.type=== ` block - seq ` )&&(t.type=== ` block - map ` ||t.type=== ` block - seq ` )){let n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&pU(n.start)===-1&&(t.indent===0||n.start.every(e=>e.type!== ` comment ` ||e.i
Line truncated
` )+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf( `
` ,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)){dU(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(oU(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=uU(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(oU(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(cU(t.key)&&!oU(t.sep, ` newline ` )){let e=uU(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]}):oU(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&&!oU(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)){dU(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||oU(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
` ,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)){_U(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(fU(t.start, ` newline ` ))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=gU(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(fU(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(mU(t.key)&&!fU(t.sep, ` newline ` )){let e=gU(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]}):fU(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&&!fU(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)){_U(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||fU(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=u U(l U(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=u U(l U(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 m U(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new a U||null,prettyErrors:t}}function h U(e,t={}){let{lineCounter:n,prettyErrors:r}=m U(t),i=new p U(n?.addNewLine),a=new G H(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 s H(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(l H(e,n)),o.warnings.forEach(l H(e,n))),o}function g U(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=h U(e,n);if(!i)return null;if(i.warnings.forEach(e=>z B(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 _ U(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 P z(e)&&!r?e.toString(n):new i H(e,r,n).toString(n)}function v U(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 y U(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 b U=140,x U=280,S U={"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 C U(e){return S U[e]??e}var w U=/ \{ \{ \s *steps \. ([A-Za-z0-9_-]+) \. [^}]* \} \} /g;function T U(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function E U(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 D U(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 OU(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(wU)].map(e=>e[1]))]}function kU(e){let t=hU(e).toJS(),n=TU(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=TU(e)?e:{},f=typeof u.type== ` string ` ?u.type: ` ` ,p=TU(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||CU(f),type:f,detail:EU(f,p),summary:DU(p),when:typeof u.when== ` string ` ?u.when:void 0,retry:TU(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 OU(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(TU(t)&&TU(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)*xU,d=c,m=c;(Array.isArray(o)?o:[]).forEach((i,o)=>{let c=f(i, ` $ { e + 1 } - $ { t } - $ { o + 1 } ` ,u,(l+o)*bU,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*bU,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*bU-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 AU={agent:or,command:qr,repo:Sr,gate:Wr,forge:Ar,human:ei,review:br,workflow:ri},jU={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function MU(e){return AU[e.split( ` . ` )[0]]??ri}function NU(e){return Object.keys(jU).map(t=>({title:jU[t],icon:AU[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function PU(e,t){let n=hU(e).getIn(t,!0);if(Fz(n))return n.toJSON()}function FU(e,t,n){let r=hU(e);return r.setIn(t,r.createNode(VU(n))),r.toString()}function IU(e,t,n){let r=hU(e),i=r.get( ` steps ` ,!0);if(Rz(i)||(r.set( ` steps ` ,r.createNode([])),i=r.get( ` steps ` ,!0)),!Rz(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 LU(e,t){let n=hU(e),r=n.getIn(t.slice(0,-1),!0),i=t.at(-1);if(!Rz(r)||typeof i!= ` number ` )return{source:e,path:t};let a=n.createNode(n.getIn(t));return Fz(a)&&a.delete( ` id ` ),r.items.splice(i+1,0,a),{source:n.toString(),path:[...t.slice(0,-1),i+1]}}function RU(e,t){let n=hU(e);n.deleteIn(t);let r=t.slice(0,-1);if(r.length>2){let e=n.getIn(r,!0);Rz(e)&&e.items.length===0&&n.deleteIn(r)}return n.toString()}function zU(e,t,n){let r=hU(e),i=r.getIn(t.slice(0,-1),!0),a=t.at(-1);if(!Rz(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 BU(e,t){let n=hU(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 VU(e){if(Array.isArray(e))return e.map(VU);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=VU(r);(typeof e!= ` object ` ||!e||Array.isArray(e)||Object.keys(e).length!==0)&&(t[n]=e)}return t}function HU(e,t){let n=hU(e).get(t,!0);return n&&typeof n== ` object ` && ` toJSON ` in n?n.toJSON():hU(e).get(t)}function UU(e,t,n){let r=hU(e),i=VU({[t]:n})[t];return i===void 0?r.delete(t):r.set(t,r.createNode(i)),r.toString()}function WU(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function GU(e,t=[]){let n=hU(e),r=n.errors[0];if(r)return{ok:!1,message:aW(r.message),line:r.linePos?.[0]?.line};let i=n.toJS();if(!oW(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:t W(e)}))}var $ U =/^(\s *)(- \s +)?/,e W=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function t W(e){let{code:t,comment:n}=n W(e),r=r W(t);return n&&r.push({text:n,kind: ` comment ` }),r}function n W(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 r W(e){if(!e)return[];let t=[],n=$U .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=e W.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,...i W(i[4]??``)]):[...t,...i W(r)]}function i W(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 aW ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function o W(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function s W(e){return typeof e== ` string ` &&e.trim()!== ` ` }var c W={class: ` flex h - full w - [ 24 rem ] flex - col border - l border - border bg - card shadow - xl ` },l W={class: ` flex items - center gap - 2.5 border - b border - border px - 4 py - 3 ` },u W={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },d W={class: ` min - w - 0 flex - 1 ` },f W=[ ` value ` , ` placeholder ` ],p W={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },m W={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },h W={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },g W={key:1,class: ` space - y - 1.5 ` },_ W=[ ` title ` ],v W=[ ` value ` ],y W=[ ` value ` ],b W={key:3,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },x W=[ ` onClick ` ],S W=[ ` onClick ` ],C W={key:2,class: ` divide - y divide - border rounded - md border border - border ` },w W=[ ` title ` ],T W=[ ` value ` , ` onChange ` ],E W=[ ` value ` ],D W=[ ` value ` , ` onInput ` ],O W=[ ` value ` , ` onFocus ` , ` onInput ` ],k W=[ ` title ` ],A W={key:0,class: ` text - xs text - danger ` },j W={class: ` space - y - 2 ` },M W={class: ` divide - y divide - border rounded - md border border - border ` },N W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },P W=[ ` value ` ],F W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },I W=[ ` value ` ],L W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },R W=[ ` value ` ],z W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },B W={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` },V W=y({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=U (()=>P U(n.yaml,n.path)??{}),a=U (()=>typeof i.value.type== ` string ` ?i.value.type: ` ` ),o=U (()=>n.vocabulary.find(e=>e.name===a.value)),s=U (()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),c=U (()=>B U(n.yaml,n.path)),l=U (()=>o.value?.settings&&i.value.settings?XU (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 p(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 m=U (()=>{let e=Object.entries(o.value?.settings?.properties??{}).map(([e,t])=>({key:e,schema:t,kind:p(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 h(e){let{id:t,type:i,...a}=e;r( ` update : yaml ` ,F U(n.yaml,n.path,{id:t,type:i,...a}))}function g(e,t){h({...i.value,[e]:t})}function _(e){g( ` retry ` ,{...i.value.retry,...e})}function v(e,t){h({...i.value,settings:{...s.value,[e]:t}})}let y=R (null);function b(e,t){let n=y.value??m.value.lead?.key;if(!n)return;let r=typeof s.value[n]== ` string ` ?s.value[n]: ` ` ,i= ` { { steps . $ { e } . $ { t } } } ` ;v(n,r? ` $ { r . trimEnd ( ) } $ { i } ` :i)}let x=R ({});function S(e,t){try{v(e,t.trim()?g U(t):void 0),x.value={...x.value,[e]: ` ` }}catch(t){x.value={...x.value,[e]:String(t.message).split( `
` )[0]}}}let C=e=>e===void 0? ` ` :_ U(e).trimEnd(),w=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),T=e=>typeof s.value[e]== ` string ` ?s.value[e]: ` ` ;return(e,t)=>(I (),P ( ` aside ` ,c W,[H ( ` header ` ,l W,[H ( ` span ` ,u W,[(I (),z(_n(A(M U)(a.value)),{class: ` size - 4 ` }))]),H ( ` div ` ,d W,[H ( ` input ` ,{value:i.value.id?? ` ` ,class: ` w - full truncate bg - transparent text - sm font - medium outline - none placeholder : text - fg - subtle focus : underline ` ,placeholder:A(C U)(a.value),"aria-label": ` Step id ` ,onInput:t[0]||=e=>g( ` id ` ,e.target.value)},null,40,f W),H ( ` div ` ,p W,V (a.value),1)]),K(A(B ),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:t[1]||=e=>r( ` close ` )},{default:j (()=>[K(A(a i))]),_:1})]),H ( ` div ` ,m W,[l.value?(I (),P ( ` p ` ,h W,V (l.value),1)):L ( ` ` ,!0),m.value.lead?(I (),P ( ` section ` ,g W,[H ( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:m.value.lead.schema.description},[f(V (w(m.value.lead.key,m.value.lead.schema))+ ` ` ,1),m.value.lead.schema.description?(I (),z(A(g r),{key:0,class: ` size - 3 text - fg - subtle ` })):L ( ` ` ,!0)],8,_ W),m.value.lead.kind=== ` select ` ?(I (),P ( ` select ` ,{key:0,class: ` h - 9 w - full rounded - md border border - input bg - background px - 2 ` ,value:T(m.value.lead.key),onChange:t[2]||=e=>v(m.value.lead.key,e.target.value||void 0)},[t[13]||=H ( ` option ` ,{value: ` ` }, ` Default ` ,-1),(I (!0),P(W ,null,N (m.value.lead.schema.enum,e=>(I (),P ( ` option ` ,{key:e,value:e},V (e),9,y W))),128))],40,v W)):m.value.lead.kind=== ` text ` ?(I (),z(A(p h),{key:1,"model-value":T(m.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:t[3]||=e=>y.value=m.value.lead.key,"onUpdate:modelValue":t[4]||=e=>v(m.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(I (),z(A(Y ),{key:2,"model-value":T(m.value.lead.key),onFocus:t[5]||=e=>y.value=m.value.lead.key,"onUpdate:modelValue":t[6]||=e=>v(m.value.lead.key,String(e))},null,8,[ ` model - value ` ])),c.value.length&&m.value.lead.kind!== ` select ` ?(I (),P ( ` div ` ,b W,[t[14]||=H ( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(I (!0),P(W ,null,N (c.value,e=>(I (),P(W ,{key:e},[H ( ` 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=>b(e, ` summary ` )},V (e),9,x W),H ( ` 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=>b(e, ` result ` )},V (e)+ ` . result ` ,9,S W)],64))),128))])):L ( ` ` ,!0)])):L ( ` ` ,!0),m.value.compact.length?(I (),P ( ` section ` ,C W,[(I (!0),P(W ,null,N (m.value.compact,e=>(I (),P ( ` div ` ,{key:e.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[H ( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:e.schema.description},[f(V (w(e.key,e.schema))+ ` ` ,1),e.schema.description?(I (),z(A(g r),{key:0,class: ` size - 3 text - fg - subtle ` })):L ( ` ` ,!0)],8,w W),e.kind=== ` boolean ` ?(I (),z(A (sb),{key:0,"model-value":s.value[e.key]===!0,"onUpdate:modelValue":t=>v(e.key,t||void 0)},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):e.kind=== ` select ` ?(I (),P ( ` select ` ,{key:1,class: ` h - 7 max - w - 40 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:T(e.key),onChange:t=>v(e.key,t.target.value||void 0)},[t[15]||=H ( ` option ` ,{value: ` ` }, ` Default ` ,-1),(I (!0),P(W ,null,N (e.schema.enum,e=>(I (),P ( ` option ` ,{key:e,value:e},V (e),9,E W))),128))],40,T W)):e.kind=== ` number ` ?(I (),P ( ` 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=>v(e.key,t.target.value=== ` ` ?void 0:Number(t.target.value))},null,40,D W)):(I (),P ( ` input ` ,{key:3,class: ` h - 7 w - 40 rounded - md border border - input bg - background px - 2 text - [ 13 px ] ` ,value:T(e.key),onFocus:t=>y.value=e.key,onInput:t=>v(e.key,t.target.value)},null,40,O W))]))),128))])):L ( ` ` ,!0),(I (!0),P(W ,null,N (m.value.long,e=>(I (),P ( ` section ` ,{key:e.key,class: ` space - y - 1.5 ` },[H ( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:e.schema.description},[f(V (w(e.key,e.schema))+ ` ` ,1),e.schema.description?(I (),z(A(g r),{key:0,class: ` size - 3 text - fg - subtle ` })):L ( ` ` ,!0)],8,k W),e.kind=== ` text ` ?(I (),z(A(p h),{key:0,"model-value":T(e.key),class: ` min - h - 20 text - [ 13 px ] ` ,onFocus:t=>y.value=e.key,"onUpdate:modelValue":t=>v(e.key,String(t))},null,8,[ ` model - value ` , ` onFocus ` , ` onUpdate : modelValue ` ])):e.kind=== ` lines ` ?(I (),z(A(p h),{key:1,"model-value":Array.isArray(s.value[e.key])?s.value[e.key].join( `
` ,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=g U(h U(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=g U(h U(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 b U(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new d U||null,prettyErrors:t}}function x U(e,t={}){let{lineCounter:n,prettyErrors:r}=b U(t),i=new y U(n?.addNewLine),a=new Z H(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 p H(t.range.slice(0,2), ` MULTIPLE _DOCS ` , ` Source contains multiple documents ; please use YAML . parseAllDocuments ( ) ` ));break}return r&&n&&(o.errors.forEach(h H(e,n)),o.warnings.forEach(h H(e,n))),o}function S U(e,t,n){let r;typeof t== ` function ` ?r=t:n===void 0&&t&&typeof t== ` object ` &&(n=t);let i=x U(e,n);if(!i)return null;if(i.warnings.forEach(e=>G B(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 C U(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 B z(e)&&!r?e.toString(n):new u H(e,r,n).toString(n)}function w U(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 T U(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 E U=140,D U=280,O U={"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 k U(e){return O U[e]??e}var A U=/ \{ \{ \s *steps \. ([A-Za-z0-9_-]+) \. [^}]* \} \} /g;function j U(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function M U(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 N U(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 PU(e,t){let n=JSON.stringify(e??{})+ ` ` +(typeof t== ` string ` ? ` { { $ { t . replace ( /^!/ , ` ` ) } } } ` : ` ` );return[...new Set([...n.matchAll(AU)].map(e=>e[1]))]}function FU(e){let t=xU(e).toJS(),n=jU(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=jU(e)?e:{},f=typeof u.type== ` string ` ?u.type: ` ` ,p=jU(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||kU(f),type:f,detail:MU(f,p),summary:NU(p),when:typeof u.when== ` string ` ?u.when:void 0,retry:jU(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 PU(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(jU(t)&&jU(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)*DU,d=c,m=c;(Array.isArray(o)?o:[]).forEach((i,o)=>{let c=f(i, ` $ { e + 1 } - $ { t } - $ { o + 1 } ` ,u,(l+o)*EU,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*EU,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*EU-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 IU={agent:sr,command:Jr,repo:Cr,gate:Gr,forge:jr,human:ti,review:xr,workflow:ii},LU={agent: ` Agents ` ,command: ` Commands ` ,repo: ` Repository ` ,gate: ` Checks ` ,forge: ` Issues and PRs ` ,human: ` People ` ,review: ` Review ` ,workflow: ` Flow ` };function RU(e){return IU[e.split( ` . ` )[0]]??ii}function zU(e){return Object.keys(LU).map(t=>({title:LU[t],icon:IU[t],types:e.filter(e=>e.split( ` . ` )[0]===t)})).filter(e=>e.types.length)}function BU(e,t){let n=xU(e).getIn(t,!0);if(Vz(n))return n.toJSON()}function VU(e,t,n){let r=xU(e);return r.setIn(t,r.createNode(qU(n))),r.toString()}function HU(e,t,n){let r=xU(e),i=r.get( ` steps ` ,!0);if(Wz(i)||(r.set( ` steps ` ,r.createNode([])),i=r.get( ` steps ` ,!0)),!Wz(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 UU(e,t){let n=xU(e),r=n.getIn(t.slice(0,-1),!0),i=t.at(-1);if(!Wz(r)||typeof i!= ` number ` )return{source:e,path:t};let a=n.createNode(n.getIn(t));return Vz(a)&&a.delete( ` id ` ),r.items.splice(i+1,0,a),{source:n.toString(),path:[...t.slice(0,-1),i+1]}}function WU(e,t){let n=xU(e);n.deleteIn(t);let r=t.slice(0,-1);if(r.length>2){let e=n.getIn(r,!0);Wz(e)&&e.items.length===0&&n.deleteIn(r)}return n.toString()}function GU(e,t,n){let r=xU(e),i=r.getIn(t.slice(0,-1),!0),a=t.at(-1);if(!Wz(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 KU(e,t){let n=xU(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 qU(e){if(Array.isArray(e))return e.map(qU);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=qU(r);(typeof e!= ` object ` ||!e||Array.isArray(e)||Object.keys(e).length!==0)&&(t[n]=e)}return t}function JU(e,t){let n=xU(e).get(t,!0);return n&&typeof n== ` object ` && ` toJSON ` in n?n.toJSON():xU(e).get(t)}function YU(e,t,n){let r=xU(e),i=qU({[t]:n})[t];return i===void 0?r.delete(t):r.set(t,r.createNode(i)),r.toString()}function XU(e){return e.ok? ` Valid ` :e.line? ` Line $ { e . line } : $ { e . message } ` :e.message}function ZU(e,t=[]){let n=xU(e),r=n.errors[0];if(r)return{ok:!1,message:dW(r.message),line:r.linePos?.[0]?.line};let i=n.toJS();if(!fW(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:s W(e)}))}var aW =/^( \s *)(- \s +)?/,o W=/^([^:# \s ][^:#]*?)(:)( \s *)(.*) $ /;function s W(e){let{code:t,comment:n}=c W(e),r=l W(t);return n&&r.push({text:n,kind: ` comment ` }),r}function c W(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 l W(e){if(!e)return[];let t=[],n=aW .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=o W.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,...u W(i[4]??``)]):[...t,...u W(r)]}function u W(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 dW ( e ) { return e . split ( `
` )[0]?.trim()|| ` invalid YAML ` }function f W(e){return typeof e== ` object ` &&!!e&&!Array.isArray(e)}function p W(e){return typeof e== ` string ` &&e.trim()!== ` ` }var m W={class: ` flex h - full w - [ 24 rem ] flex - col border - l border - border bg - card shadow - xl ` },h W={class: ` flex items - center gap - 2.5 border - b border - border px - 4 py - 3 ` },g W={class: ` flex size - 8 shrink - 0 items - center justify - center rounded - md bg - secondary text - primary ` },_ W={class: ` min - w - 0 flex - 1 ` },v W=[ ` value ` , ` placeholder ` ],y W={class: ` truncate font - mono text - [ 11 px ] text - fg - subtle ` },b W={class: ` flex - 1 space - y - 5 overflow - y - auto px - 4 py - 4 ` },x W={key:0,class: ` rounded - md bg - danger / 10 px - 2.5 py - 1.5 text - xs text - danger ` ,role: ` alert ` },S W={key:1,class: ` space - y - 1.5 ` },C W=[ ` title ` ],w W=[ ` value ` ],T W=[ ` value ` ],E W={key:3,class: ` flex flex - wrap items - center gap - 1 pt - 0.5 ` },D W=[ ` onClick ` ],O W=[ ` onClick ` ],k W={key:2,class: ` divide - y divide - border rounded - md border border - border ` },A W=[ ` title ` ],j W=[ ` value ` , ` onChange ` ],M W=[ ` value ` ],N W=[ ` value ` , ` onInput ` ],P W=[ ` value ` , ` onFocus ` , ` onInput ` ],F W=[ ` title ` ],I W={key:0,class: ` text - xs text - danger ` },L W={class: ` space - y - 2 ` },R W={class: ` divide - y divide - border rounded - md border border - border ` },z W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },B W=[ ` value ` ],V W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },H W=[ ` value ` ],U W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },W W=[ ` value ` ],G W={class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },K W={class: ` flex items - center border - t border - border px - 4 py - 2.5 ` },q W=y({__name: ` StepEditor ` ,props:{yaml:{},path:{},vocabulary:{}},emits:[ ` update : yaml ` , ` close ` , ` remove ` ],setup(e,{emit:t}){let n=e,r=t,i=H (()=>B U(n.yaml,n.path)??{}),a=H (()=>typeof i.value.type== ` string ` ?i.value.type: ` ` ),o=H (()=>n.vocabulary.find(e=>e.name===a.value)),s=H (()=>typeof i.value.settings== ` object ` &&i.value.settings!==null?i.value.settings:{}),c=H (()=>K U(n.yaml,n.path)),l=H (()=>o.value?.settings&&i.value.settings?nW (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 p(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 m=H (()=>{let e=Object.entries(o.value?.settings?.properties??{}).map(([e,t])=>({key:e,schema:t,kind:p(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 h(e){let{id:t,type:i,...a}=e;r( ` update : yaml ` ,V U(n.yaml,n.path,{id:t,type:i,...a}))}function g(e,t){h({...i.value,[e]:t})}function _(e){g( ` retry ` ,{...i.value.retry,...e})}function v(e,t){h({...i.value,settings:{...s.value,[e]:t}})}let y=L (null);function b(e,t){let n=y.value??m.value.lead?.key;if(!n)return;let r=typeof s.value[n]== ` string ` ?s.value[n]: ` ` ,i= ` { { steps . $ { e } . $ { t } } } ` ;v(n,r? ` $ { r . trimEnd ( ) } $ { i } ` :i)}let x=L ({});function S(e,t){try{v(e,t.trim()?S U(t):void 0),x.value={...x.value,[e]: ` ` }}catch(t){x.value={...x.value,[e]:String(t.message).split( `
` )[0]}}}let C=e=>e===void 0? ` ` :C U(e).trimEnd(),w=(e,t)=>t.title??e.replaceAll( ` _ ` , ` ` ).replace(/^./,e=>e.toUpperCase()),T=e=>typeof s.value[e]== ` string ` ?s.value[e]: ` ` ;return(e,t)=>(F (),N ( ` aside ` ,m W,[V ( ` header ` ,h W,[V ( ` span ` ,g W,[(F (),R(vn(k(R U)(a.value)),{class: ` size - 4 ` }))]),V ( ` div ` ,_ W,[V ( ` input ` ,{value:i.value.id?? ` ` ,class: ` w - full truncate bg - transparent text - sm font - medium outline - none placeholder : text - fg - subtle focus : underline ` ,placeholder:k(k U)(a.value),"aria-label": ` Step id ` ,onInput:t[0]||=e=>g( ` id ` ,e.target.value)},null,40,v W),V ( ` div ` ,y W,B (a.value),1)]),G(k(z ),{type: ` button ` ,variant: ` ghost ` ,size: ` icon - sm ` ,"aria-label": ` Close ` ,onClick:t[1]||=e=>r( ` close ` )},{default:A (()=>[G(k(o i))]),_:1})]),V ( ` div ` ,b W,[l.value?(F (),N ( ` p ` ,x W,B (l.value),1)):I ( ` ` ,!0),m.value.lead?(F (),N ( ` section ` ,S W,[V ( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:m.value.lead.schema.description},[f(B (w(m.value.lead.key,m.value.lead.schema))+ ` ` ,1),m.value.lead.schema.description?(F (),R(k(_ r),{key:0,class: ` size - 3 text - fg - subtle ` })):I ( ` ` ,!0)],8,C W),m.value.lead.kind=== ` select ` ?(F (),N ( ` select ` ,{key:0,class: ` h - 9 w - full rounded - md border border - input bg - background px - 2 ` ,value:T(m.value.lead.key),onChange:t[2]||=e=>v(m.value.lead.key,e.target.value||void 0)},[t[13]||=V ( ` option ` ,{value: ` ` }, ` Default ` ,-1),(F (!0),N(U ,null,M (m.value.lead.schema.enum,e=>(F (),N ( ` option ` ,{key:e,value:e},B (e),9,T W))),128))],40,w W)):m.value.lead.kind=== ` text ` ?(F (),R(k(m h),{key:1,"model-value":T(m.value.lead.key),class: ` min - h - 40 text - [ 13 px ] leading - relaxed ` ,onFocus:t[3]||=e=>y.value=m.value.lead.key,"onUpdate:modelValue":t[4]||=e=>v(m.value.lead.key,String(e))},null,8,[ ` model - value ` ])):(F (),R(k(J ),{key:2,"model-value":T(m.value.lead.key),onFocus:t[5]||=e=>y.value=m.value.lead.key,"onUpdate:modelValue":t[6]||=e=>v(m.value.lead.key,String(e))},null,8,[ ` model - value ` ])),c.value.length&&m.value.lead.kind!== ` select ` ?(F (),N ( ` div ` ,E W,[t[14]||=V ( ` span ` ,{class: ` text - [ 11 px ] text - fg - subtle ` }, ` Insert ` ,-1),(F (!0),N(U ,null,M (c.value,e=>(F (),N(U ,{key:e},[V ( ` 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=>b(e, ` summary ` )},B (e),9,D W),V ( ` 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=>b(e, ` result ` )},B (e)+ ` . result ` ,9,O W)],64))),128))])):I ( ` ` ,!0)])):I ( ` ` ,!0),m.value.compact.length?(F (),N ( ` section ` ,k W,[(F (!0),N(U ,null,M (m.value.compact,e=>(F (),N ( ` div ` ,{key:e.key,class: ` flex min - h - 10 items - center gap - 3 px - 3 py - 1.5 ` },[V ( ` span ` ,{class: ` flex flex - 1 items - center gap - 1 text - [ 13 px ] ` ,title:e.schema.description},[f(B (w(e.key,e.schema))+ ` ` ,1),e.schema.description?(F (),R(k(_ r),{key:0,class: ` size - 3 text - fg - subtle ` })):I ( ` ` ,!0)],8,A W),e.kind=== ` boolean ` ?(F (),R(k (sb),{key:0,"model-value":s.value[e.key]===!0,"onUpdate:modelValue":t=>v(e.key,t||void 0)},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):e.kind=== ` select ` ?(F (),N ( ` select ` ,{key:1,class: ` h - 7 max - w - 40 rounded - md border border - input bg - background px - 1.5 text - [ 13 px ] ` ,value:T(e.key),onChange:t=>v(e.key,t.target.value||void 0)},[t[15]||=V ( ` option ` ,{value: ` ` }, ` Default ` ,-1),(F (!0),N(U ,null,M (e.schema.enum,e=>(F (),N ( ` option ` ,{key:e,value:e},B (e),9,M W))),128))],40,j W)):e.kind=== ` number ` ?(F (),N ( ` 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=>v(e.key,t.target.value=== ` ` ?void 0:Number(t.target.value))},null,40,N W)):(F (),N ( ` input ` ,{key:3,class: ` h - 7 w - 40 rounded - md border border - input bg - background px - 2 text - [ 13 px ] ` ,value:T(e.key),onFocus:t=>y.value=e.key,onInput:t=>v(e.key,t.target.value)},null,40,P W))]))),128))])):I ( ` ` ,!0),(F (!0),N(U ,null,M (m.value.long,e=>(F (),N ( ` section ` ,{key:e.key,class: ` space - y - 1.5 ` },[V ( ` div ` ,{class: ` flex items - center gap - 1 text - xs font - medium text - muted - foreground ` ,title:e.schema.description},[f(B (w(e.key,e.schema))+ ` ` ,1),e.schema.description?(F (),R(k(_ r),{key:0,class: ` size - 3 text - fg - subtle ` })):I ( ` ` ,!0)],8,F W),e.kind=== ` text ` ?(F (),R(k(m h),{key:0,"model-value":T(e.key),class: ` min - h - 20 text - [ 13 px ] ` ,onFocus:t=>y.value=e.key,"onUpdate:modelValue":t=>v(e.key,String(t))},null,8,[ ` model - value ` , ` onFocus ` , ` onUpdate : modelValue ` ])):e.kind=== ` lines ` ?(F (),R(k(m h),{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=>v(e.key,String(t).split( `
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(I(),P(W,{key:2},[K(A(ph),{"model-value":C(s.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>S(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),x.value[e.key]?(I(),P( ` span ` ,AW,V(x.value[e.key]),1)):L( ` ` ,!0)],64))]))),128)),H( ` section ` ,jW,[t[21]||=H( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),H( ` div ` ,MW,[H( ` label ` ,NW,[t[16]||=H( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),H( ` 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=>g( ` when ` ,e.target.value)},null,40,PW)]),H( ` label ` ,FW,[t[18]||=H( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),H( ` 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=>g( ` on _failure ` ,e.target.value||void 0)},[...t[17]||=[H( ` option ` ,{value: ` ` }, ` Park the task ` ,-1),H( ` option ` ,{value: ` continue ` }, ` Continue ` ,-1)]],40,IW)]),H( ` label ` ,LW,[t[19]||=H( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),H( ` 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=>_({attempts:e.target.value=== ` ` ?void 0:Number(e.target.value)})},null,40,RW)]),H( ` label ` ,zW,[t[20]||=H( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),K(A(Yy),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":t[10]||=e=>_({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),H( ` footer ` ,BW,[K(A(B),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:t[11]||=e=>r( ` remove ` )},{default:j(()=>[K(A(Yr)),t[22]||=f( ` Delete step ` ,-1)]),_:1}),K(A(B),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:t[12]||=e=>r( ` close ` )},{default:j(()=>[...t[23]||=[f( ` Done ` ,-1)]]),_:1})])]))}}),HW= ` repository _path ` ;function UW(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:HW,path:n.trim(),type: ` string ` ,required:!0}),r}function WW(e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function GW(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=WW(Rw(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 KW(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:Rw(e.value,i.type?? ` string ` )})}return n}function qW(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 JW(e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...JW(e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...JW(n,r)]}):[]}function YW(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function XW(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 ZW(e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var QW={class: ` flex h - full flex - col ` }, $ W={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },eG={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },tG={key:0,class: ` flex flex - 1 items - center justify - center ` },nG={class: ` space - y - 1.5 ` },rG=[ ` disabled ` ],iG=[ ` value ` ],aG={key:1,class: ` space - y - 1.5 ` },oG=[ ` value ` ],sG=[ ` title ` ],cG={class: ` space - y - 1.5 ` },lG={id: ` bind - paths ` },uG=[ ` value ` ],dG={class: ` divide - y divide - border rounded - md border border - border ` },fG={class: ` flex items - center gap - 1.5 text - xs ` },pG={class: ` font - mono ` },mG={class: ` text - fg - subtle ` },hG={key:0,class: ` text - danger ` ,title: ` Required ` },gG=[ ` title ` , ` aria - label ` , ` onClick ` ],_G=[ ` onUpdate : modelValue ` , ` aria - label ` ],vG=[ ` onUpdate : modelValue ` , ` aria - label ` ],yG={key:2,class: ` text - xs text - danger ` },bG=[ ` title ` ],xG={key:0,class: ` space - y - 1 px - 3 py - 2 ` },SG={key:0,class: ` text - xs text - danger ` },CG={key:1,class: ` truncate font - mono text - xs text - success ` },wG={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },TG={class: ` space - y - 2 ` },EG={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },DG={key:1,class: ` tex Line truncated
` ).filter(Boolean))},null,8,[ ` model - value ` , ` onUpdate : modelValue ` ])):(F(),N(U,{key:2},[G(k(mh),{"model-value":C(s.value[e.key]),class: ` min - h - 24 font - mono text - xs ` ,placeholder: ` YAML ` ,onChange:t=>S(e.key,t.target.value)},null,8,[ ` model - value ` , ` onChange ` ]),x.value[e.key]?(F(),N( ` span ` ,IW,B(x.value[e.key]),1)):I( ` ` ,!0)],64))]))),128)),V( ` section ` ,LW,[t[21]||=V( ` div ` ,{class: ` text - xs font - medium text - muted - foreground ` }, ` Flow ` ,-1),V( ` div ` ,RW,[V( ` label ` ,zW,[t[16]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Run only when ` ,-1),V( ` 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=>g( ` when ` ,e.target.value)},null,40,BW)]),V( ` label ` ,VW,[t[18]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` If it fails ` ,-1),V( ` 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=>g( ` on _failure ` ,e.target.value||void 0)},[...t[17]||=[V( ` option ` ,{value: ` ` }, ` Park the task ` ,-1),V( ` option ` ,{value: ` continue ` }, ` Continue ` ,-1)]],40,HW)]),V( ` label ` ,UW,[t[19]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Attempts ` ,-1),V( ` 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=>_({attempts:e.target.value=== ` ` ?void 0:Number(e.target.value)})},null,40,WW)]),V( ` label ` ,GW,[t[20]||=V( ` span ` ,{class: ` flex - 1 text - [ 13 px ] ` }, ` Retry backoff ` ,-1),G(k(Xy),{"model-value":i.value.retry?.backoff?? ` ` ,units:[ ` s ` , ` m ` , ` h ` ],"onUpdate:modelValue":t[10]||=e=>_({backoff:e||void 0})},null,8,[ ` model - value ` ])])])])]),V( ` footer ` ,KW,[G(k(z),{type: ` button ` ,variant: ` ghost ` ,size: ` sm ` ,class: ` text - danger ` ,onClick:t[11]||=e=>r( ` remove ` )},{default:A(()=>[G(k(Xr)),t[22]||=f( ` Delete step ` ,-1)]),_:1}),G(k(z),{type: ` button ` ,size: ` sm ` ,class: ` ml - auto ` ,onClick:t[12]||=e=>r( ` close ` )},{default:A(()=>[...t[23]||=[f( ` Done ` ,-1)]]),_:1})])]))}}),JW= ` repository _path ` ;function YW(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:JW,path:n.trim(),type: ` string ` ,required:!0}),r}function XW(e){return Array.isArray(e)? ` array ` :e===null? ` null ` :typeof e== ` boolean ` ? ` bool ` :typeof e== ` object ` ? ` object ` :typeof e}function ZW(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=XW(Ww(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 QW(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:Ww(e.value,i.type?? ` string ` )})}return n}function $ W(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 eG(e,t= ` ` ){return Array.isArray(e)?e.slice(0,3).flatMap((e,n)=>{let r= ` $ { t } [ $ { n } ] ` ;return[r,...eG(e,r)]}):e&&typeof e== ` object ` ?Object.entries(e).flatMap(([e,n])=>{let r=t? ` $ { t } . $ { e } ` :e;return[r,...eG(n,r)]}):[]}function tG(e){try{return e?.body?JSON.parse(e.body):null}catch{return null}}function nG(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 rG(e){let t=typeof e== ` string ` ?e:JSON.stringify(e);return t.length>80? ` $ { t . slice ( 0 , 80 ) } … ` :t}var iG={class: ` flex h - full flex - col ` },aG={class: ` flex items - center gap - 2 border - b border - border px - 4 py - 3 ` },oG={class: ` min - w - 0 flex - 1 truncate text - sm font - medium ` },sG={key:0,class: ` flex flex - 1 items - center justify - center ` },cG={class: ` space - y - 1.5 ` },lG=[ ` disabled ` ],uG=[ ` value ` ],dG={key:1,class: ` space - y - 1.5 ` },fG=[ ` value ` ],pG=[ ` title ` ],mG={class: ` space - y - 1.5 ` },hG={id: ` bind - paths ` },gG=[ ` value ` ],_G={class: ` divide - y divide - border rounded - md border border - border ` },vG={class: ` flex items - center gap - 1.5 text - xs ` },yG={class: ` font - mono ` },bG={class: ` text - fg - subtle ` },xG={key:0,class: ` text - danger ` ,title: ` Required ` },SG=[ ` title ` , ` aria - label ` , ` onClick ` ],CG=[ ` onUpdate : modelValue ` , ` aria - label ` ],wG=[ ` onUpdate : modelValue ` , ` aria - label ` ],TG={key:2,class: ` text - xs text - danger ` },EG=[ ` title ` ],DG={key:0,class: ` space - y - 1 px - 3 py - 2 ` },OG={key:0,class: ` text - xs text - danger ` },kG={key:1,class: ` truncate font - mono text - xs text - success ` },AG={key:1,class: ` px - 3 py - 2 text - xs text - fg - subtle ` },jG={class: ` space - y - 2 ` },MG={key:0,role: ` alert ` ,class: ` text - xs text - danger ` },NG={key:1,class: ` tex Line truncated
` ).replace( `
` , `
+ ` ).split( `
` ).map(e=>e.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();r||n.add(e.toLowerCase());let a=i.every((e,t)=>n.has(e)&&Array.from(n.values())[t]===i[t]);return r&&n.delete(e.toLowerCase()),a}function b $ (e,t){return n=>{if(!n.code&&!n.key)return!1;let r=x $ (n.code,e);return Array.isArray(e)?e.some(e=>y $ (n[r],e,t,n.type=== ` keyup ` )):y $ (n[r],e,t,n.type=== ` keyup ` )}}function x $ (e,t){return t.includes(e)? ` code ` : ` key ` }function S $ (e,t){let n=U(()=>d(t?.target)??g $ ),r=pn(d(e)===!0),i=!1,a=new Set,o=c(d(e));J(()=>d(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),mq([ ` blur ` , ` contextmenu ` ],s),gq((...e)=>o(...e),e=>{let n=d(t?.actInsideInputWithModifier)??!0,a=d(t?.preventDefault)??!1;if(i=v $ (e),(!i||i&&!n)&&_ $ (e))return;let o=e.composedPath?.call(e)?.[0]||e.target,s=o?.nodeName=== ` BUTTON ` ||o?.nodeName=== ` A ` ;!a&&(i||!s)&&e.preventDefault(),r.value=!0},{eventName: ` keydown ` ,target:n}),gq((...e)=>o(...e),e=>{let n=d(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&_ $ (e))return;i=!1,r.value=!1}},{eventName: ` keyup ` ,target:n});function s(){i=!1,a.clear(),r.value=d(e)===!0}function c(e){return e===null?(s(),()=>!1):typeof e== ` boolean ` ?(s(),r.value=e,()=>!1):Array.isArray(e)||typeof e== ` string ` ?b $ (e,a):e}return r}var C $ = ` vue - flow _ _node - desc ` ,w $ = ` vue - flow _ _edge - desc ` ,T $ = ` vue - flow _ _aria - live ` ,E $ =[ ` Enter ` , ` ` , ` Escape ` ],D $ ={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function O $ (e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function k $ (e,t){let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)}function A $ (e){return{width:e.offsetWidth,height:e.offsetHeight}}function j $ (e,t=0,n=1){return Math.min(Math.max(e,t),n)}function M $ (e,t){return{x:j $ (e.x,t[0][0],t[1][0]),y:j $ (e.y,t[0][1],t[1][1])}}function N $ (e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function P $ (e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function F $ (e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!P $ (e)}function I $ (e){return F $ (e)&& ` computedPosition ` in e}function L $ (e){return!Number.isNaN(e)&&Number.isFinite(e)}function R $ (e){return L $ (e.width)&&L $ (e.height)&&L $ (e.x)&&L $ (e.y)}function z $ (e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:It({width:0,height:0}),computedPosition:It({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:t0(e.data)?e.data:{},events:It(t0(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function B $ (e,t,n){let r={id:e.id.toString(),type:e.type??t?.type?? ` default ` ,source:e.source.toString(),target:e.target.toString(),sourceHandle:e.sourceHandle?.toString(),targetHandle:e.targetHandle?.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:t0(e.data)?e.data:{},events:It(t0(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function V $ (e,t,n,r){let i=typeof e== ` string ` ?e:e.id,a=new Set,o=r=== ` source ` ? ` target ` : ` source ` ;for(let e of n)e[o]===i&&a.add(e[r]);return t.filter(e=>a.has(e.id))}function H $ (...e){if(e.length===3){let[t,n,r]=e;return V $ (t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>P $ (e)&&e.source===r).map(e=>n.find(t=>F $ (t)&&t.id===e.target))}function U $ (...e){if(e.length===3){let[t,n,r]=e;return V $ (t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>P $ (e)&&e.target===r).map(e=>n.find(t=>F $ (t)&&t.id===e.source))}function W $ ({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function G $ (e,t){return t.some(t=>P $ (t)&&t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle))}function K $ ({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function q $ ({x:e,y:t},{x:n,y:r,zoom:i},a=!1,o=[1,1]){let s={x:(e-n)/i,y:(t-r)/i};return a?R1(s,o):s}function J $ (e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function Y $ ({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function X $ ({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function Z $ (e){let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0};for(let n=0;n<e.length;n++){let r=e[n];t=J $ (t,Y $ ({...r.computedPosition,...r.dimensions}))}return X $ (t)}function Q $ (e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={...q $ (t,n),width:t.width/n.zoom,height:t.height/n.zoom},o=[];for(let t of e){let{dimensions:e,selectable:n=!0,hidden:s=!1}=t,c=
Line truncated
` ).map(e=>e.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();r||n.add(e.toLowerCase());let a=i.every((e,t)=>n.has(e)&&Array.from(n.values())[t]===i[t]);return r&&n.delete(e.toLowerCase()),a}function E $ (e,t){return n=>{if(!n.code&&!n.key)return!1;let r=D $ (n.code,e);return Array.isArray(e)?e.some(e=>T $ (n[r],e,t,n.type=== ` keyup ` )):T $ (n[r],e,t,n.type=== ` keyup ` )}}function D $ (e,t){return t.includes(e)? ` code ` : ` key ` }function O $ (e,t){let n=H(()=>d(t?.target)??S $ ),r=mn(d(e)===!0),i=!1,a=new Set,o=c(d(e));q(()=>d(e),(e,t)=>{typeof t== ` boolean ` &&typeof e!= ` boolean ` &&s(),o=c(e)},{immediate:!0}),bq([ ` blur ` , ` contextmenu ` ],s),Sq((...e)=>o(...e),e=>{let n=d(t?.actInsideInputWithModifier)??!0,a=d(t?.preventDefault)??!1;if(i=w $ (e),(!i||i&&!n)&&C $ (e))return;let o=e.composedPath?.call(e)?.[0]||e.target,s=o?.nodeName=== ` BUTTON ` ||o?.nodeName=== ` A ` ;!a&&(i||!s)&&e.preventDefault(),r.value=!0},{eventName: ` keydown ` ,target:n}),Sq((...e)=>o(...e),e=>{let n=d(t?.actInsideInputWithModifier)??!0;if(r.value){if((!i||i&&!n)&&C $ (e))return;i=!1,r.value=!1}},{eventName: ` keyup ` ,target:n});function s(){i=!1,a.clear(),r.value=d(e)===!0}function c(e){return e===null?(s(),()=>!1):typeof e== ` boolean ` ?(s(),r.value=e,()=>!1):Array.isArray(e)||typeof e== ` string ` ?E $ (e,a):e}return r}var k $ = ` vue - flow _ _node - desc ` ,A $ = ` vue - flow _ _edge - desc ` ,j $ = ` vue - flow _ _aria - live ` ,M $ =[ ` Enter ` , ` ` , ` Escape ` ],N $ ={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function P $ (e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function F $ (e,t){let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)}function I $ (e){return{width:e.offsetWidth,height:e.offsetHeight}}function L $ (e,t=0,n=1){return Math.min(Math.max(e,t),n)}function R $ (e,t){return{x:L $ (e.x,t[0][0],t[1][0]),y:L $ (e.y,t[0][1],t[1][1])}}function z $ (e){let t=e.getRootNode();return ` elementFromPoint ` in t?t:window.document}function B $ (e){return e&&typeof e== ` object ` && ` id ` in e&& ` source ` in e&& ` target ` in e}function V $ (e){return e&&typeof e== ` object ` && ` id ` in e&& ` position ` in e&&!B $ (e)}function H $ (e){return V $ (e)&& ` computedPosition ` in e}function U $ (e){return!Number.isNaN(e)&&Number.isFinite(e)}function W $ (e){return U $ (e.width)&&U $ (e.height)&&U $ (e.x)&&U $ (e.y)}function G $ (e,t,n){let r={id:e.id.toString(),type:e.type?? ` default ` ,dimensions:Lt({width:0,height:0}),computedPosition:Lt({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:s0(e.data)?e.data:{},events:Lt(s0(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function K $ (e,t,n){let r={id:e.id.toString(),type:e.type??t?.type?? ` default ` ,source:e.source.toString(),target:e.target.toString(),sourceHandle:e.sourceHandle?.toString(),targetHandle:e.targetHandle?.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:s0(e.data)?e.data:{},events:Lt(s0(e.events)?e.events:{}),label:e.label?? ` ` ,interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??r,e,{id:e.id.toString()})}function q $ (e,t,n,r){let i=typeof e== ` string ` ?e:e.id,a=new Set,o=r=== ` source ` ? ` target ` : ` source ` ;for(let e of n)e[o]===i&&a.add(e[r]);return t.filter(e=>a.has(e.id))}function J $ (...e){if(e.length===3){let[t,n,r]=e;return q $ (t,n,r, ` target ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>B $ (e)&&e.source===r).map(e=>n.find(t=>V $ (t)&&t.id===e.target))}function Y $ (...e){if(e.length===3){let[t,n,r]=e;return q $ (t,n,r, ` source ` )}let[t,n]=e,r=typeof t== ` string ` ?t:t.id;return n.filter(e=>B $ (e)&&e.target===r).map(e=>n.find(t=>V $ (t)&&t.id===e.source))}function X $ ({source:e,sourceHandle:t,target:n,targetHandle:r}){return ` vueflow _ _edge - $ { e } $ { t ? ? ` ` } - $ { n } $ { r ? ? ` ` } ` }function Z $ (e,t){return t.some(t=>B $ (t)&&t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle))}function Q $ ({x:e,y:t},{x:n,y:r,zoom:i}){return{x:e*i+n,y:t*i+r}}function $ $ ({x:e,y:t},{x:n,y:r,zoom:i},a=!1,o=[1,1]){let s={x:(e-n)/i,y:(t-r)/i};return a?W1(s,o):s}function e1(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function t1({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function n1({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function r1(e){let t={x:1/0,y:1/0,x2:-1/0,y2:-1/0};for(let n=0;n<e.length;n++){let r=e[n];t=e1(t,t1({...r.computedPosition,...r.dimensions}))}return n1(t)}function i1(e,t,n={x:0,y:0,zoom:1},r=!1,i=!1){let a={... $ $ (t,n),width:t.width/n.zoom,height:t.height/n.zoom},o=[];for(let t of e){let{dimensions:e,selectable:n=!0,hidden:s=!1}=t,c=
Line truncated
Node : $ { e } ` ,NODE_NOT_FOUND:e=> ` Node not found
Node : $ { e } ` ,NODE_MISSING_PARENT:(e,t)=> ` Node is missing a parent
Node : $ { e }
@@ -149,4 +149,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 ` },M1=class extends Error{constructor(e,...t){super(j1[e]?.call(j1,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function N1(e){return ` clientX ` in e}function P1(e){return ` sourceEvent ` in e}function F1(e,t){let n=N1(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 I1=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function L1(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function R1(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var z1=()=>!0;function B1(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function V1(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())k $ (i,O $ (e))>0&&r.push(e);return r}var H1=250;function U1(e,t,n,r){let i=[],a=1/0,o=V1(e,n,t+H1);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}=E1(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 W1(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=z1},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:_}=F1(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=G1(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===d $ .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=J1(t,e,a,p,n,!0)}return b}function G1(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function K1(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function q1(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function J1(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===d $ .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,...E1(o,c,c.position,!0)}:c}var Y1={[c $ .Left]:c $ .Right,[c $ .Right]:c $ .Left,[c $ .Top]:c $ .Bottom,[c $ .Bottom]:c $ .Top},X1=[ ` production ` , ` prod ` ];function Z1(e,...t){Q1()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function Q1(){return!X1.includes( ` production ` )}function $ 1(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,...A $ (t)}}):null}function e0(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),De(()=>{o.blur()})):n([e])}function t0(e){return A(e)!==void 0}function n0(e,t,n,r){if(!e||!e.source||!e.target)return n(new M1(A1.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=P $ (e)?e:{...e,id:W $ (e)},i=B $ (i,void 0,r),!G $ (i,t)&&i}function r0(e,t,n,r,i){if(!t.source||!t.target)return i(new M1(A1.EDGE_INVALID,e.id)),!1;if(!n)return i(new M1(A1.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?W $ (t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function i0(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!F $ (o)){n(new M1(A1.NODE_INVALID,o?.id));continue}let s=z $ (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 M1(A1.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 a0(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 o0(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 } ` ;a0( ` source ` ,o, ` $ { r } - $ { a } -- 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 ` },R1=class extends Error{constructor(e,...t){super(L1[e]?.call(L1,...t)),this.name= ` VueFlowError ` ,this.code=e,this.args=t}};function z1(e){return ` clientX ` in e}function B1(e){return ` sourceEvent ` in e}function V1(e,t){let n=z1(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 H1=()=>typeof navigator< ` u ` &&(navigator==null?void 0:navigator.userAgent)?.indexOf( ` Mac ` )>=0;function U1(e){return{width:e.dimensions?.width??e.width??0,height:e.dimensions?.height??e.height??0}}function W1(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}var G1=()=>!0;function K1(e){e?.classList.remove( ` valid ` , ` connecting ` , ` vue - flow _ _handle - valid ` , ` vue - flow _ _handle - connecting ` )}function q1(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())F $ (i,P $ (e))>0&&r.push(e);return r}var J1=250;function Y1(e,t,n,r){let i=[],a=1/0,o=q1(e,n,t+J1);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}=M1(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 X1(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=G1},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:_}=V1(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=Z1(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===_ $ .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=e0(t,e,a,p,n,!0)}return b}function Z1(e,t){return e||(t?.classList.contains( ` target ` )? ` target ` :t?.classList.contains( ` source ` )? ` source ` :null)}function Q1(e,t){let n=null;return t?n= ` valid ` :e&&!t&&(n= ` invalid ` ),n}function $ 1(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function e0(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===_ $ .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,...M1(o,c,c.position,!0)}:c}var t0={[m $ .Left]:m $ .Right,[m $ .Right]:m $ .Left,[m $ .Top]:m $ .Bottom,[m $ .Bottom]:m $ .Top},n0=[ ` production ` , ` prod ` ];function r0(e,...t){i0()&&console.warn( ` [ Vue Flow ] : $ { e } ` ,...t)}function i0(){return!n0.includes( ` production ` )}function a0(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,...I $ (t)}}):null}function o0(e,t,n,r,i,a=!1,o){i.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),Oe(()=>{o.blur()})):n([e])}function s0(e){return k(e)!==void 0}function c0(e,t,n,r){if(!e||!e.source||!e.target)return n(new R1(I1.EDGE_INVALID,e?.id?? ` [ ID UNKNOWN ] ` )),!1;let i;return i=B $ (e)?e:{...e,id:X $ (e)},i=K $ (i,void 0,r),!Z $ (i,t)&&i}function l0(e,t,n,r,i){if(!t.source||!t.target)return i(new R1(I1.EDGE_INVALID,e.id)),!1;if(!n)return i(new R1(I1.EDGE_NOT_FOUND,e.id)),!1;let{id:a,...o}=e;return{...o,id:r?X $ (t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function u0(e,t,n){let r={},i=[];for(let a=0;a<e.length;++a){let o=e[a];if(!V $ (o)){n(new R1(I1.NODE_INVALID,o?.id));continue}let s=G $ (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 R1(I1.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 d0(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 f0(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 } ` ;d0( ` source ` ,o, ` $ { r } - $ { a } -- Line truncated