@signetai/connector-pi 0.141.0 → 0.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extension-bundle.d.ts +1 -1
- package/dist/extension-bundle.d.ts.map +1 -1
- package/dist/index.js +148 -148
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -20990,77 +20990,77 @@ var CODE_EXTS2 = new Set([
|
|
|
20990
20990
|
var SKIP_FILES2 = new Set([".DS_Store", "Thumbs.db", ".gitkeep", "node_modules", ".git", ".env", ".env.local"]);
|
|
20991
20991
|
|
|
20992
20992
|
// src/extension-bundle.ts
|
|
20993
|
-
var EXTENSION_BUNDLE = `var
|
|
20994
|
-
\`)}}q.defaultYaml={explicit:!1,version:"1.2"},q.defaultTags={"!!":"tag:yaml.org,2002:"},Z.Directives=q}),p6=w((Z)=>{var X=u(),z=
|
|
20993
|
+
var EXTENSION_BUNDLE = `var A4=Object.defineProperty;var M4=(Z)=>Z;function D4(Z,X){this[Z]=M4.bind(null,X)}var h6=(Z,X)=>{for(var z in X)A4(Z,z,{get:X[z],enumerable:!0,configurable:!0,set:D4.bind(X,z)})};import{existsSync as BJ,readFileSync as UJ}from"node:fs";import{join as GJ}from"node:path";import{createRequire as L4}from"node:module";import{dirname as s4,join as kJ}from"node:path";import{fileURLToPath as a4}from"node:url";import{createRequire as uz}from"node:module";import{homedir as u6,platform as tz}from"node:os";import{basename as uJ,dirname as dJ,resolve as qZ}from"node:path";import{existsSync as iZ,readFileSync as Z5,readdirSync as iJ,realpathSync as nJ,statSync as oJ}from"node:fs";import{dirname as aJ,join as X5}from"node:path";import{existsSync as X$,mkdirSync as tJ,readFileSync as z$,rmSync as eJ,writeFileSync as ZY}from"node:fs";import{homedir as AZ}from"node:os";import{dirname as $Y,join as MZ,resolve as $$}from"node:path";import{homedir as D$}from"node:os";var{create:O4,getPrototypeOf:F4,defineProperty:x5,getOwnPropertyNames:N4}=Object,K4=Object.prototype.hasOwnProperty;function j4(Z){return this[Z]}var R4,S4,n5=(Z,X,z)=>{var W=Z!=null&&typeof Z==="object";if(W){var Y=X?R4??=new WeakMap:S4??=new WeakMap,q=Y.get(Z);if(q)return q}z=Z!=null?O4(F4(Z)):{};let B=X||!Z||!Z.__esModule?x5(z,"default",{value:Z,enumerable:!0}):z;for(let U of N4(Z))if(!K4.call(B,U))x5(B,U,{get:j4.bind(Z,U),enumerable:!0});if(W)Y.set(Z,B);return B},w=(Z,X)=>()=>(X||Z((X={exports:{}}).exports,X),X.exports),nZ=L4(import.meta.url),u=w((Z)=>{var X=Symbol.for("yaml.alias"),z=Symbol.for("yaml.document"),W=Symbol.for("yaml.map"),Y=Symbol.for("yaml.pair"),q=Symbol.for("yaml.scalar"),B=Symbol.for("yaml.seq"),U=Symbol.for("yaml.node.type"),G=(D)=>!!D&&typeof D==="object"&&D[U]===X,H=(D)=>!!D&&typeof D==="object"&&D[U]===z,_=(D)=>!!D&&typeof D==="object"&&D[U]===W,$=(D)=>!!D&&typeof D==="object"&&D[U]===Y,Q=(D)=>!!D&&typeof D==="object"&&D[U]===q,J=(D)=>!!D&&typeof D==="object"&&D[U]===B;function V(D){if(D&&typeof D==="object")switch(D[U]){case W:case B:return!0}return!1}function A(D){if(D&&typeof D==="object")switch(D[U]){case X:case W:case q:case B:return!0}return!1}var M=(D)=>(Q(D)||V(D))&&!!D.anchor;Z.ALIAS=X,Z.DOC=z,Z.MAP=W,Z.NODE_TYPE=U,Z.PAIR=Y,Z.SCALAR=q,Z.SEQ=B,Z.hasAnchor=M,Z.isAlias=G,Z.isCollection=V,Z.isDocument=H,Z.isMap=_,Z.isNode=A,Z.isPair=$,Z.isScalar=Q,Z.isSeq=J}),oZ=w((Z)=>{var X=u(),z=Symbol("break visit"),W=Symbol("skip children"),Y=Symbol("remove node");function q(Q,J){let V=H(J);if(X.isDocument(Q)){if(B(null,Q.contents,V,Object.freeze([Q]))===Y)Q.contents=null}else B(null,Q,V,Object.freeze([]))}q.BREAK=z,q.SKIP=W,q.REMOVE=Y;function B(Q,J,V,A){let M=_(Q,J,V,A);if(X.isNode(M)||X.isPair(M))return $(Q,A,M),B(Q,M,V,A);if(typeof M!=="symbol"){if(X.isCollection(J)){A=Object.freeze(A.concat(J));for(let D=0;D<J.items.length;++D){let L=B(D,J.items[D],V,A);if(typeof L==="number")D=L-1;else if(L===z)return z;else if(L===Y)J.items.splice(D,1),D-=1}}else if(X.isPair(J)){A=Object.freeze(A.concat(J));let D=B("key",J.key,V,A);if(D===z)return z;else if(D===Y)J.key=null;let L=B("value",J.value,V,A);if(L===z)return z;else if(L===Y)J.value=null}}return M}async function U(Q,J){let V=H(J);if(X.isDocument(Q)){if(await G(null,Q.contents,V,Object.freeze([Q]))===Y)Q.contents=null}else await G(null,Q,V,Object.freeze([]))}U.BREAK=z,U.SKIP=W,U.REMOVE=Y;async function G(Q,J,V,A){let M=await _(Q,J,V,A);if(X.isNode(M)||X.isPair(M))return $(Q,A,M),G(Q,M,V,A);if(typeof M!=="symbol"){if(X.isCollection(J)){A=Object.freeze(A.concat(J));for(let D=0;D<J.items.length;++D){let L=await G(D,J.items[D],V,A);if(typeof L==="number")D=L-1;else if(L===z)return z;else if(L===Y)J.items.splice(D,1),D-=1}}else if(X.isPair(J)){A=Object.freeze(A.concat(J));let D=await G("key",J.key,V,A);if(D===z)return z;else if(D===Y)J.key=null;let L=await G("value",J.value,V,A);if(L===z)return z;else if(L===Y)J.value=null}}return M}function H(Q){if(typeof Q==="object"&&(Q.Collection||Q.Node||Q.Value))return Object.assign({Alias:Q.Node,Map:Q.Node,Scalar:Q.Node,Seq:Q.Node},Q.Value&&{Map:Q.Value,Scalar:Q.Value,Seq:Q.Value},Q.Collection&&{Map:Q.Collection,Seq:Q.Collection},Q);return Q}function _(Q,J,V,A){if(typeof V==="function")return V(Q,J,A);if(X.isMap(J))return V.Map?.(Q,J,A);if(X.isSeq(J))return V.Seq?.(Q,J,A);if(X.isPair(J))return V.Pair?.(Q,J,A);if(X.isScalar(J))return V.Scalar?.(Q,J,A);if(X.isAlias(J))return V.Alias?.(Q,J,A);return}function $(Q,J,V){let A=J[J.length-1];if(X.isCollection(A))A.items[Q]=V;else if(X.isPair(A))if(Q==="key")A.key=V;else A.value=V;else if(X.isDocument(A))A.contents=V;else{let M=X.isAlias(A)?"alias":"scalar";throw Error(\`Cannot replace node with \${M} parent\`)}}Z.visit=q,Z.visitAsync=U}),o5=w((Z)=>{var X=u(),z=oZ(),W={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Y=(B)=>B.replace(/[!,[\\]{}]/g,(U)=>W[U]);class q{constructor(B,U){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},q.defaultYaml,B),this.tags=Object.assign({},q.defaultTags,U)}clone(){let B=new q(this.yaml,this.tags);return B.docStart=this.docStart,B}atDocument(){let B=new q(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:q.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},q.defaultTags);break}return B}add(B,U){if(this.atNextDocument)this.yaml={explicit:q.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},q.defaultTags),this.atNextDocument=!1;let G=B.trim().split(/[ \\t]+/),H=G.shift();switch(H){case"%TAG":{if(G.length!==2){if(U(0,"%TAG directive should contain exactly two parts"),G.length<2)return!1}let[_,$]=G;return this.tags[_]=$,!0}case"%YAML":{if(this.yaml.explicit=!0,G.length!==1)return U(0,"%YAML directive should contain exactly one part"),!1;let[_]=G;if(_==="1.1"||_==="1.2")return this.yaml.version=_,!0;else{let $=/^\\d+\\.\\d+$/.test(_);return U(6,\`Unsupported YAML version \${_}\`,$),!1}}default:return U(0,\`Unknown directive \${H}\`,!0),!1}}tagName(B,U){if(B==="!")return"!";if(B[0]!=="!")return U(\`Not a valid tag: \${B}\`),null;if(B[1]==="<"){let $=B.slice(2,-1);if($==="!"||$==="!!")return U(\`Verbatim tags aren't resolved, so \${B} is invalid.\`),null;if(B[B.length-1]!==">")U("Verbatim tags must end with a >");return $}let[,G,H]=B.match(/^(.*!)([^!]*)$/s);if(!H)U(\`The \${B} tag has no suffix\`);let _=this.tags[G];if(_)try{return _+decodeURIComponent(H)}catch($){return U(String($)),null}if(G==="!")return B;return U(\`Could not resolve tag: \${B}\`),null}tagString(B){for(let[U,G]of Object.entries(this.tags))if(B.startsWith(G))return U+Y(B.substring(G.length));return B[0]==="!"?B:\`!<\${B}>\`}toString(B){let U=this.yaml.explicit?[\`%YAML \${this.yaml.version||"1.2"}\`]:[],G=Object.entries(this.tags),H;if(B&&G.length>0&&X.isNode(B.contents)){let _={};z.visit(B.contents,($,Q)=>{if(X.isNode(Q)&&Q.tag)_[Q.tag]=!0}),H=Object.keys(_)}else H=[];for(let[_,$]of G){if(_==="!!"&&$==="tag:yaml.org,2002:")continue;if(!B||H.some((Q)=>Q.startsWith($)))U.push(\`%TAG \${_} \${$}\`)}return U.join(\`
|
|
20994
|
+
\`)}}q.defaultYaml={explicit:!1,version:"1.2"},q.defaultTags={"!!":"tag:yaml.org,2002:"},Z.Directives=q}),p6=w((Z)=>{var X=u(),z=oZ();function W(U){if(/[\\x00-\\x19\\s,[\\]{}]/.test(U)){let H=\`Anchor must not contain whitespace or control characters: \${JSON.stringify(U)}\`;throw Error(H)}return!0}function Y(U){let G=new Set;return z.visit(U,{Value(H,_){if(_.anchor)G.add(_.anchor)}}),G}function q(U,G){for(let H=1;;++H){let _=\`\${U}\${H}\`;if(!G.has(_))return _}}function B(U,G){let H=[],_=new Map,$=null;return{onAnchor:(Q)=>{H.push(Q),$??($=Y(U));let J=q(G,$);return $.add(J),J},setAnchors:()=>{for(let Q of H){let J=_.get(Q);if(typeof J==="object"&&J.anchor&&(X.isScalar(J.node)||X.isCollection(J.node)))J.node.anchor=J.anchor;else{let V=Error("Failed to resolve repeated object (this should not happen)");throw V.source=Q,V}}},sourceObjects:_}}Z.anchorIsValid=W,Z.anchorNames=Y,Z.createNodeAnchors=B,Z.findNewAnchor=q}),s5=w((Z)=>{function X(z,W,Y,q){if(q&&typeof q==="object")if(Array.isArray(q))for(let B=0,U=q.length;B<U;++B){let G=q[B],H=X(z,q,String(B),G);if(H===void 0)delete q[B];else if(H!==G)q[B]=H}else if(q instanceof Map)for(let B of Array.from(q.keys())){let U=q.get(B),G=X(z,q,B,U);if(G===void 0)q.delete(B);else if(G!==U)q.set(B,G)}else if(q instanceof Set)for(let B of Array.from(q)){let U=X(z,q,B,B);if(U===void 0)q.delete(B);else if(U!==B)q.delete(B),q.add(U)}else for(let[B,U]of Object.entries(q)){let G=X(z,q,B,U);if(G===void 0)delete q[B];else if(G!==U)q[B]=G}return z.call(W,Y,q)}Z.applyReviver=X}),k8=w((Z)=>{var X=u();function z(W,Y,q){if(Array.isArray(W))return W.map((B,U)=>z(B,String(U),q));if(W&&typeof W.toJSON==="function"){if(!q||!X.hasAnchor(W))return W.toJSON(Y,q);let B={aliasCount:0,count:1,res:void 0};q.anchors.set(W,B),q.onCreate=(G)=>{B.res=G,delete q.onCreate};let U=W.toJSON(Y,q);if(q.onCreate)q.onCreate(U);return U}if(typeof W==="bigint"&&!q?.keep)return Number(W);return W}Z.toJS=z}),l6=w((Z)=>{var X=s5(),z=u(),W=k8();class Y{constructor(q){Object.defineProperty(this,z.NODE_TYPE,{value:q})}clone(){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)q.range=this.range.slice();return q}toJS(q,{mapAsMap:B,maxAliasCount:U,onAnchor:G,reviver:H}={}){if(!z.isDocument(q))throw TypeError("A document argument is required");let _={anchors:new Map,doc:q,keep:!0,mapAsMap:B===!0,mapKeyWarned:!1,maxAliasCount:typeof U==="number"?U:100},$=W.toJS(this,"",_);if(typeof G==="function")for(let{count:Q,res:J}of _.anchors.values())G(J,Q);return typeof H==="function"?X.applyReviver(H,{"":$},"",$):$}}Z.NodeBase=Y}),sZ=w((Z)=>{var X=p6(),z=oZ(),W=u(),Y=l6(),q=k8();class B extends Y.NodeBase{constructor(G){super(W.ALIAS);this.source=G,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(G,H){let _;if(H?.aliasResolveCache)_=H.aliasResolveCache;else if(_=[],z.visit(G,{Node:(Q,J)=>{if(W.isAlias(J)||W.hasAnchor(J))_.push(J)}}),H)H.aliasResolveCache=_;let $=void 0;for(let Q of _){if(Q===this)break;if(Q.anchor===this.source)$=Q}return $}toJSON(G,H){if(!H)return{source:this.source};let{anchors:_,doc:$,maxAliasCount:Q}=H,J=this.resolve($,H);if(!J){let A=\`Unresolved alias (the anchor must be set before the alias): \${this.source}\`;throw ReferenceError(A)}let V=_.get(J);if(!V)q.toJS(J,null,H),V=_.get(J);if(V?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(Q>=0){if(V.count+=1,V.aliasCount===0)V.aliasCount=U($,J,_);if(V.count*V.aliasCount>Q)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return V.res}toString(G,H,_){let $=\`*\${this.source}\`;if(G){if(X.anchorIsValid(this.source),G.options.verifyAliasOrder&&!G.anchors.has(this.source)){let Q=\`Unresolved alias (the anchor must be set before the alias): \${this.source}\`;throw Error(Q)}if(G.implicitKey)return\`\${$} \`}return $}}function U(G,H,_){if(W.isAlias(H)){let $=H.resolve(G),Q=_&&$&&_.get($);return Q?Q.count*Q.aliasCount:0}else if(W.isCollection(H)){let $=0;for(let Q of H.items){let J=U(G,Q,_);if(J>$)$=J}return $}else if(W.isPair(H)){let $=U(G,H.key,_),Q=U(G,H.value,_);return Math.max($,Q)}return 1}Z.Alias=B}),q0=w((Z)=>{var X=u(),z=l6(),W=k8(),Y=(B)=>!B||typeof B!=="function"&&typeof B!=="object";class q extends z.NodeBase{constructor(B){super(X.SCALAR);this.value=B}toJSON(B,U){return U?.keep?this.value:W.toJS(this.value,B,U)}toString(){return String(this.value)}}q.BLOCK_FOLDED="BLOCK_FOLDED",q.BLOCK_LITERAL="BLOCK_LITERAL",q.PLAIN="PLAIN",q.QUOTE_DOUBLE="QUOTE_DOUBLE",q.QUOTE_SINGLE="QUOTE_SINGLE",Z.Scalar=q,Z.isScalarValue=Y}),aZ=w((Z)=>{var X=sZ(),z=u(),W=q0(),Y="tag:yaml.org,2002:";function q(U,G,H){if(G){let _=H.filter((Q)=>Q.tag===G),$=_.find((Q)=>!Q.format)??_[0];if(!$)throw Error(\`Tag \${G} not found\`);return $}return H.find((_)=>_.identify?.(U)&&!_.format)}function B(U,G,H){if(z.isDocument(U))U=U.contents;if(z.isNode(U))return U;if(z.isPair(U)){let L=H.schema[z.MAP].createNode?.(H.schema,null,H);return L.items.push(U),L}if(U instanceof String||U instanceof Number||U instanceof Boolean||typeof BigInt<"u"&&U instanceof BigInt)U=U.valueOf();let{aliasDuplicateObjects:_,onAnchor:$,onTagObj:Q,schema:J,sourceObjects:V}=H,A=void 0;if(_&&U&&typeof U==="object")if(A=V.get(U),A)return A.anchor??(A.anchor=$(U)),new X.Alias(A.anchor);else A={anchor:null,node:null},V.set(U,A);if(G?.startsWith("!!"))G=Y+G.slice(2);let M=q(U,G,J.tags);if(!M){if(U&&typeof U.toJSON==="function")U=U.toJSON();if(!U||typeof U!=="object"){let L=new W.Scalar(U);if(A)A.node=L;return L}M=U instanceof Map?J[z.MAP]:(Symbol.iterator in Object(U))?J[z.SEQ]:J[z.MAP]}if(Q)Q(M),delete H.onTagObj;let D=M?.createNode?M.createNode(H.schema,U,H):typeof M?.nodeClass?.from==="function"?M.nodeClass.from(H.schema,U,H):new W.Scalar(U);if(G)D.tag=G;else if(!M.default)D.tag=M.tag;if(A)A.node=D;return D}Z.createNode=B}),i6=w((Z)=>{var X=aZ(),z=u(),W=l6();function Y(U,G,H){let _=H;for(let $=G.length-1;$>=0;--$){let Q=G[$];if(typeof Q==="number"&&Number.isInteger(Q)&&Q>=0){let J=[];J[Q]=_,_=J}else _=new Map([[Q,_]])}return X.createNode(_,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:U,sourceObjects:new Map})}var q=(U)=>U==null||typeof U==="object"&&!!U[Symbol.iterator]().next().done;class B extends W.NodeBase{constructor(U,G){super(U);Object.defineProperty(this,"schema",{value:G,configurable:!0,enumerable:!1,writable:!0})}clone(U){let G=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(U)G.schema=U;if(G.items=G.items.map((H)=>z.isNode(H)||z.isPair(H)?H.clone(U):H),this.range)G.range=this.range.slice();return G}addIn(U,G){if(q(U))this.add(G);else{let[H,..._]=U,$=this.get(H,!0);if(z.isCollection($))$.addIn(_,G);else if($===void 0&&this.schema)this.set(H,Y(this.schema,_,G));else throw Error(\`Expected YAML collection at \${H}. Remaining path: \${_}\`)}}deleteIn(U){let[G,...H]=U;if(H.length===0)return this.delete(G);let _=this.get(G,!0);if(z.isCollection(_))return _.deleteIn(H);else throw Error(\`Expected YAML collection at \${G}. Remaining path: \${H}\`)}getIn(U,G){let[H,..._]=U,$=this.get(H,!0);if(_.length===0)return!G&&z.isScalar($)?$.value:$;else return z.isCollection($)?$.getIn(_,G):void 0}hasAllNullValues(U){return this.items.every((G)=>{if(!z.isPair(G))return!1;let H=G.value;return H==null||U&&z.isScalar(H)&&H.value==null&&!H.commentBefore&&!H.comment&&!H.tag})}hasIn(U){let[G,...H]=U;if(H.length===0)return this.has(G);let _=this.get(G,!0);return z.isCollection(_)?_.hasIn(H):!1}setIn(U,G){let[H,..._]=U;if(_.length===0)this.set(H,G);else{let $=this.get(H,!0);if(z.isCollection($))$.setIn(_,G);else if($===void 0&&this.schema)this.set(H,Y(this.schema,_,G));else throw Error(\`Expected YAML collection at \${H}. Remaining path: \${_}\`)}}}Z.Collection=B,Z.collectionFromPath=Y,Z.isEmptyPath=q}),rZ=w((Z)=>{var X=(Y)=>Y.replace(/^(?!$)(?: $)?/gm,"#");function z(Y,q){if(/^\\n+$/.test(Y))return Y.substring(1);return q?Y.replace(/^(?! *$)/gm,q):Y}var W=(Y,q,B)=>Y.endsWith(\`
|
|
20995
20995
|
\`)?z(B,q):B.includes(\`
|
|
20996
20996
|
\`)?\`
|
|
20997
|
-
\`+z(B,q):(
|
|
20998
|
-
\`){if(G===z)N=q(B,N,U.length);D=N+U.length+
|
|
20997
|
+
\`+z(B,q):(Y.endsWith(" ")?"":" ")+B;Z.indentComment=z,Z.lineComment=W,Z.stringifyComment=X}),C4=w((Z)=>{var X="flow",z="block",W="quoted";function Y(B,U,G="flow",{indentAtStart:H,lineWidth:_=80,minContentWidth:$=20,onFold:Q,onOverflow:J}={}){if(!_||_<0)return B;if(_<$)$=0;let V=Math.max(1+$,1+_-U.length);if(B.length<=V)return B;let A=[],M={},D=_-U.length;if(typeof H==="number")if(H>_-Math.max(2,$))A.push(0);else D=_-H;let L=void 0,F=void 0,j=!1,N=-1,K=-1,E=-1;if(G===z){if(N=q(B,N,U.length),N!==-1)D=N+V}for(let P;P=B[N+=1];){if(G===W&&P==="\\\\"){switch(K=N,B[N+1]){case"x":N+=3;break;case"u":N+=5;break;case"U":N+=9;break;default:N+=1}E=N}if(P===\`
|
|
20998
|
+
\`){if(G===z)N=q(B,N,U.length);D=N+U.length+V,L=void 0}else{if(P===" "&&F&&F!==" "&&F!==\`
|
|
20999
20999
|
\`&&F!=="\\t"){let C=B[N+1];if(C&&C!==" "&&C!==\`
|
|
21000
|
-
\`&&C!=="\\t")L=N}if(N>=D)if(L)A.push(L),D=L+
|
|
21000
|
+
\`&&C!=="\\t")L=N}if(N>=D)if(L)A.push(L),D=L+V,L=void 0;else if(G===W){while(F===" "||F==="\\t")F=P,P=B[N+=1],j=!0;let C=N>E+1?N-2:K-1;if(M[C])return B;A.push(C),M[C]=!0,D=C+V,L=void 0}else j=!0}F=P}if(j&&J)J();if(A.length===0)return B;if(Q)Q();let T=B.slice(0,A[0]);for(let P=0;P<A.length;++P){let C=A[P],k=A[P+1]||B.length;if(C===0)T=\`
|
|
21001
21001
|
\${U}\${B.slice(0,k)}\`;else{if(G===W&&M[C])T+=\`\${B[C]}\\\\\`;T+=\`
|
|
21002
21002
|
\${U}\${B.slice(C+1,k)}\`}}return T}function q(B,U,G){let H=U,_=U+1,$=B[_];while($===" "||$==="\\t")if(U<_+G)$=B[++U];else{do $=B[++U];while($&&$!==\`
|
|
21003
|
-
\`);H=U,_=U+1,$=B[_]}return H}Z.FOLD_BLOCK=z,Z.FOLD_FLOW=X,Z.FOLD_QUOTED=W,Z.foldFlowLines=
|
|
21004
|
-
\`){if(L-F>M)return!0;if(F=L+1,D-F<=M)return!1}return!0}function B(J,
|
|
21003
|
+
\`);H=U,_=U+1,$=B[_]}return H}Z.FOLD_BLOCK=z,Z.FOLD_FLOW=X,Z.FOLD_QUOTED=W,Z.foldFlowLines=Y}),tZ=w((Z)=>{var X=q0(),z=C4(),W=(J,V)=>({indentAtStart:V?J.indent.length:J.indentAtStart,lineWidth:J.options.lineWidth,minContentWidth:J.options.minContentWidth}),Y=(J)=>/^(%|---|\\.\\.\\.)/m.test(J);function q(J,V,A){if(!V||V<0)return!1;let M=V-A,D=J.length;if(D<=M)return!1;for(let L=0,F=0;L<D;++L)if(J[L]===\`
|
|
21004
|
+
\`){if(L-F>M)return!0;if(F=L+1,D-F<=M)return!1}return!0}function B(J,V){let A=JSON.stringify(J);if(V.options.doubleQuotedAsJSON)return A;let{implicitKey:M}=V,D=V.options.doubleQuotedMinMultiLineLength,L=V.indent||(Y(J)?" ":""),F="",j=0;for(let N=0,K=A[N];K;K=A[++N]){if(K===" "&&A[N+1]==="\\\\"&&A[N+2]==="n")F+=A.slice(j,N)+"\\\\ ",N+=1,j=N,K="\\\\";if(K==="\\\\")switch(A[N+1]){case"u":{F+=A.slice(j,N);let E=A.substr(N+2,4);switch(E){case"0000":F+="\\\\0";break;case"0007":F+="\\\\a";break;case"000b":F+="\\\\v";break;case"001b":F+="\\\\e";break;case"0085":F+="\\\\N";break;case"00a0":F+="\\\\_";break;case"2028":F+="\\\\L";break;case"2029":F+="\\\\P";break;default:if(E.substr(0,2)==="00")F+="\\\\x"+E.substr(2);else F+=A.substr(N,6)}N+=5,j=N+1}break;case"n":if(M||A[N+2]==='"'||A.length<D)N+=1;else{F+=A.slice(j,N)+\`
|
|
21005
21005
|
|
|
21006
21006
|
\`;while(A[N+2]==="\\\\"&&A[N+3]==="n"&&A[N+4]!=='"')F+=\`
|
|
21007
|
-
\`,N+=2;if(F+=L,A[N+2]===" ")F+="\\\\";N+=1,j=N+1}break;default:N+=1}}return F=j?F+A.slice(j):A,M?F:z.foldFlowLines(F,L,z.FOLD_QUOTED,W(
|
|
21008
|
-
\`)||/[ \\t]\\n|\\n[ \\t]/.test(J))return B(J,
|
|
21009
|
-
\${A}\`)+"'";return
|
|
21007
|
+
\`,N+=2;if(F+=L,A[N+2]===" ")F+="\\\\";N+=1,j=N+1}break;default:N+=1}}return F=j?F+A.slice(j):A,M?F:z.foldFlowLines(F,L,z.FOLD_QUOTED,W(V,!1))}function U(J,V){if(V.options.singleQuote===!1||V.implicitKey&&J.includes(\`
|
|
21008
|
+
\`)||/[ \\t]\\n|\\n[ \\t]/.test(J))return B(J,V);let A=V.indent||(Y(J)?" ":""),M="'"+J.replace(/'/g,"''").replace(/\\n+/g,\`$&
|
|
21009
|
+
\${A}\`)+"'";return V.implicitKey?M:z.foldFlowLines(M,A,z.FOLD_FLOW,W(V,!1))}function G(J,V){let{singleQuote:A}=V.options,M;if(A===!1)M=B;else{let D=J.includes('"'),L=J.includes("'");if(D&&!L)M=U;else if(L&&!D)M=B;else M=A?U:B}return M(J,V)}var H;try{H=new RegExp(\`(^|(?<!
|
|
21010
21010
|
))
|
|
21011
21011
|
+(?!
|
|
21012
|
-
|$)\`,"g")}catch{H=/\\n+(?!\\n|$)/g}function _({comment:J,type:
|
|
21012
|
+
|$)\`,"g")}catch{H=/\\n+(?!\\n|$)/g}function _({comment:J,type:V,value:A},M,D,L){let{blockQuote:F,commentString:j,lineWidth:N}=M.options;if(!F||/\\n[\\t ]+$/.test(A))return G(A,M);let K=M.indent||(M.forceBlockIndent||Y(A)?" ":""),E=F==="literal"?!0:F==="folded"||V===X.Scalar.BLOCK_FOLDED?!1:V===X.Scalar.BLOCK_LITERAL?!0:!q(A,N,K.length);if(!A)return E?\`|
|
|
21013
21013
|
\`:\`>
|
|
21014
21014
|
\`;let T,P;for(P=A.length;P>0;--P){let f=A[P-1];if(f!==\`
|
|
21015
21015
|
\`&&f!=="\\t"&&f!==" ")break}let C=A.substring(P),k=C.indexOf(\`
|
|
21016
21016
|
\`);if(k===-1)T="-";else if(A===C||k!==C.length-1){if(T="+",L)L()}else T="";if(C){if(A=A.slice(0,-C.length),C[C.length-1]===\`
|
|
21017
21017
|
\`)C=C.slice(0,-1);C=C.replace(H,\`$&\${K}\`)}let b=!1,l,U0=-1;for(l=0;l<A.length;++l){let f=A[l];if(f===" ")b=!0;else if(f===\`
|
|
21018
21018
|
\`)U0=l;else break}let Q0=A.substring(0,U0<l?U0+1:l);if(Q0)A=A.substring(Q0.length),Q0=Q0.replace(/\\n+/g,\`$&\${K}\`);let G0=(b?K?"2":"1":"")+T;if(J){if(G0+=" "+j(J.replace(/ ?[\\r\\n]+/g," ")),D)D()}if(!E){let f=A.replace(/\\n+/g,\`
|
|
21019
|
-
$&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").replace(/\\n+/g,\`$&\${K}\`),K0=!1,X0=W(M,!0);if(F!=="folded"&&
|
|
21019
|
+
$&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").replace(/\\n+/g,\`$&\${K}\`),K0=!1,X0=W(M,!0);if(F!=="folded"&&V!==X.Scalar.BLOCK_FOLDED)X0.onOverflow=()=>{K0=!0};let j0=z.foldFlowLines(\`\${Q0}\${f}\${C}\`,K,z.FOLD_BLOCK,X0);if(!K0)return\`>\${G0}
|
|
21020
21020
|
\${K}\${j0}\`}return A=A.replace(/\\n+/g,\`$&\${K}\`),\`|\${G0}
|
|
21021
|
-
\${K}\${Q0}\${A}\${C}\`}function $(J,
|
|
21022
|
-
\`)||E&&/[[\\]{},]/.test(L))return G(L,
|
|
21023
|
-
\`)?G(L,
|
|
21024
|
-
\`))return _(J,
|
|
21025
|
-
\${N}\`);if(F){let P=(b)=>b.default&&b.tag!=="tag:yaml.org,2002:str"&&b.test?.test(T),{compat:C,tags:k}=
|
|
21026
|
-
\${_.indent}\${M}\`}Z.createStringifyContext=q,Z.stringify=G}),
|
|
21027
|
-
\${J}:\`}else if(K=\`\${K}:\`,L)K+=
|
|
21021
|
+
\${K}\${Q0}\${A}\${C}\`}function $(J,V,A,M){let{type:D,value:L}=J,{actualString:F,implicitKey:j,indent:N,indentStep:K,inFlow:E}=V;if(j&&L.includes(\`
|
|
21022
|
+
\`)||E&&/[[\\]{},]/.test(L))return G(L,V);if(/^[\\n\\t ,[\\]{}#&*!|>'"%@\`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(L))return j||E||!L.includes(\`
|
|
21023
|
+
\`)?G(L,V):_(J,V,A,M);if(!j&&!E&&D!==X.Scalar.PLAIN&&L.includes(\`
|
|
21024
|
+
\`))return _(J,V,A,M);if(Y(L)){if(N==="")return V.forceBlockIndent=!0,_(J,V,A,M);else if(j&&N===K)return G(L,V)}let T=L.replace(/\\n+/g,\`$&
|
|
21025
|
+
\${N}\`);if(F){let P=(b)=>b.default&&b.tag!=="tag:yaml.org,2002:str"&&b.test?.test(T),{compat:C,tags:k}=V.doc.schema;if(k.some(P)||C?.some(P))return G(L,V)}return j?T:z.foldFlowLines(T,N,z.FOLD_FLOW,W(V,!1))}function Q(J,V,A,M){let{implicitKey:D,inFlow:L}=V,F=typeof J.value==="string"?J:Object.assign({},J,{value:String(J.value)}),{type:j}=J;if(j!==X.Scalar.QUOTE_DOUBLE){if(/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(F.value))j=X.Scalar.QUOTE_DOUBLE}let N=(E)=>{switch(E){case X.Scalar.BLOCK_FOLDED:case X.Scalar.BLOCK_LITERAL:return D||L?G(F.value,V):_(F,V,A,M);case X.Scalar.QUOTE_DOUBLE:return B(F.value,V);case X.Scalar.QUOTE_SINGLE:return U(F.value,V);case X.Scalar.PLAIN:return $(F,V,A,M);default:return null}},K=N(j);if(K===null){let{defaultKeyType:E,defaultStringType:T}=V.options,P=D&&E||T;if(K=N(P),K===null)throw Error(\`Unsupported default string type \${P}\`)}return K}Z.stringifyString=Q}),eZ=w((Z)=>{var X=p6(),z=u(),W=rZ(),Y=tZ();function q(H,_){let $=Object.assign({blockQuote:!0,commentString:W.stringifyComment,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},H.schema.toStringOptions,_),Q;switch($.collectionStyle){case"block":Q=!1;break;case"flow":Q=!0;break;default:Q=null}return{anchors:new Set,doc:H,flowCollectionPadding:$.flowCollectionPadding?" ":"",indent:"",indentStep:typeof $.indent==="number"?" ".repeat($.indent):" ",inFlow:Q,options:$}}function B(H,_){if(_.tag){let J=H.filter((V)=>V.tag===_.tag);if(J.length>0)return J.find((V)=>V.format===_.format)??J[0]}let $=void 0,Q;if(z.isScalar(_)){Q=_.value;let J=H.filter((V)=>V.identify?.(Q));if(J.length>1){let V=J.filter((A)=>A.test);if(V.length>0)J=V}$=J.find((V)=>V.format===_.format)??J.find((V)=>!V.format)}else Q=_,$=H.find((J)=>J.nodeClass&&Q instanceof J.nodeClass);if(!$){let J=Q?.constructor?.name??(Q===null?"null":typeof Q);throw Error(\`Tag not resolved for \${J} value\`)}return $}function U(H,_,{anchors:$,doc:Q}){if(!Q.directives)return"";let J=[],V=(z.isScalar(H)||z.isCollection(H))&&H.anchor;if(V&&X.anchorIsValid(V))$.add(V),J.push(\`&\${V}\`);let A=H.tag??(_.default?null:_.tag);if(A)J.push(Q.directives.tagString(A));return J.join(" ")}function G(H,_,$,Q){if(z.isPair(H))return H.toString(_,$,Q);if(z.isAlias(H)){if(_.doc.directives)return H.toString(_);if(_.resolvedAliases?.has(H))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(_.resolvedAliases)_.resolvedAliases.add(H);else _.resolvedAliases=new Set([H]);H=H.resolve(_.doc)}}let J=void 0,V=z.isNode(H)?H:_.doc.createNode(H,{onTagObj:(D)=>J=D});J??(J=B(_.doc.schema.tags,V));let A=U(V,J,_);if(A.length>0)_.indentAtStart=(_.indentAtStart??0)+A.length+1;let M=typeof J.stringify==="function"?J.stringify(V,_,$,Q):z.isScalar(V)?Y.stringifyString(V,_,$,Q):V.toString(_,$,Q);if(!A)return M;return z.isScalar(V)||M[0]==="{"||M[0]==="["?\`\${A} \${M}\`:\`\${A}
|
|
21026
|
+
\${_.indent}\${M}\`}Z.createStringifyContext=q,Z.stringify=G}),E4=w((Z)=>{var X=u(),z=q0(),W=eZ(),Y=rZ();function q({key:B,value:U},G,H,_){let{allNullValues:$,doc:Q,indent:J,indentStep:V,options:{commentString:A,indentSeq:M,simpleKeys:D}}=G,L=X.isNode(B)&&B.comment||null;if(D){if(L)throw Error("With simple keys, key nodes cannot have comments");if(X.isCollection(B)||!X.isNode(B)&&typeof B==="object")throw Error("With simple keys, collection cannot be used as a key value")}let F=!D&&(!B||L&&U==null&&!G.inFlow||X.isCollection(B)||(X.isScalar(B)?B.type===z.Scalar.BLOCK_FOLDED||B.type===z.Scalar.BLOCK_LITERAL:typeof B==="object"));G=Object.assign({},G,{allNullValues:!1,implicitKey:!F&&(D||!$),indent:J+V});let j=!1,N=!1,K=W.stringify(B,G,()=>j=!0,()=>N=!0);if(!F&&!G.inFlow&&K.length>1024){if(D)throw Error("With simple keys, single line scalar must not span more than 1024 characters");F=!0}if(G.inFlow){if($||U==null){if(j&&H)H();return K===""?"?":F?\`? \${K}\`:K}}else if($&&!D||U==null&&F){if(K=\`? \${K}\`,L&&!j)K+=Y.lineComment(K,G.indent,A(L));else if(N&&_)_();return K}if(j)L=null;if(F){if(L)K+=Y.lineComment(K,G.indent,A(L));K=\`? \${K}
|
|
21027
|
+
\${J}:\`}else if(K=\`\${K}:\`,L)K+=Y.lineComment(K,G.indent,A(L));let E,T,P;if(X.isNode(U))E=!!U.spaceBefore,T=U.commentBefore,P=U.comment;else if(E=!1,T=null,P=null,U&&typeof U==="object")U=Q.createNode(U);if(G.implicitKey=!1,!F&&!L&&X.isScalar(U))G.indentAtStart=K.length+1;if(N=!1,!M&&V.length>=2&&!G.inFlow&&!F&&X.isSeq(U)&&!U.flow&&!U.tag&&!U.anchor)G.indent=G.indent.substring(2);let C=!1,k=W.stringify(U,G,()=>C=!0,()=>N=!0),b=" ";if(L||E||T){if(b=E?\`
|
|
21028
21028
|
\`:"",T){let l=A(T);b+=\`
|
|
21029
|
-
\${
|
|
21029
|
+
\${Y.indentComment(l,G.indent)}\`}if(k===""&&!G.inFlow){if(b===\`
|
|
21030
21030
|
\`&&P)b=\`
|
|
21031
21031
|
|
|
21032
21032
|
\`}else b+=\`
|
|
21033
21033
|
\${G.indent}\`}else if(!F&&X.isCollection(U)){let l=k[0],U0=k.indexOf(\`
|
|
21034
21034
|
\`),Q0=U0!==-1,l0=G.inFlow??U.flow??U.items.length===0;if(Q0||!l0){let G0=!1;if(Q0&&(l==="&"||l==="!")){let f=k.indexOf(" ");if(l==="&"&&f!==-1&&f<U0&&k[f+1]==="!")f=k.indexOf(" ",f+1);if(f===-1||U0<f)G0=!0}if(!G0)b=\`
|
|
21035
21035
|
\${G.indent}\`}}else if(k===""||k[0]===\`
|
|
21036
|
-
\`)b="";if(K+=b+k,G.inFlow){if(C&&H)H()}else if(P&&!C)K+=
|
|
21036
|
+
\`)b="";if(K+=b+k,G.inFlow){if(C&&H)H()}else if(P&&!C)K+=Y.lineComment(K,G.indent,A(P));else if(N&&_)_();return K}Z.stringifyPair=q}),a5=w((Z)=>{var X=nZ("process");function z(Y,...q){if(Y==="debug")console.log(...q)}function W(Y,q){if(Y==="debug"||Y==="warn")if(typeof X.emitWarning==="function")X.emitWarning(q);else console.warn(q)}Z.debug=z,Z.warn=W}),n6=w((Z)=>{var X=u(),z=q0(),W="<<",Y={identify:(G)=>G===W||typeof G==="symbol"&&G.description===W,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new z.Scalar(Symbol(W)),{addToJSMap:B}),stringify:()=>W},q=(G,H)=>(Y.identify(H)||X.isScalar(H)&&(!H.type||H.type===z.Scalar.PLAIN)&&Y.identify(H.value))&&G?.doc.schema.tags.some((_)=>_.tag===Y.tag&&_.default);function B(G,H,_){if(_=G&&X.isAlias(_)?_.resolve(G.doc):_,X.isSeq(_))for(let $ of _.items)U(G,H,$);else if(Array.isArray(_))for(let $ of _)U(G,H,$);else U(G,H,_)}function U(G,H,_){let $=G&&X.isAlias(_)?_.resolve(G.doc):_;if(!X.isMap($))throw Error("Merge sources must be maps or map aliases");let Q=$.toJSON(null,G,Map);for(let[J,V]of Q)if(H instanceof Map){if(!H.has(J))H.set(J,V)}else if(H instanceof Set)H.add(J);else if(!Object.prototype.hasOwnProperty.call(H,J))Object.defineProperty(H,J,{value:V,writable:!0,enumerable:!0,configurable:!0});return H}Z.addMergeToJSMap=B,Z.isMergeKey=q,Z.merge=Y}),r5=w((Z)=>{var X=a5(),z=n6(),W=eZ(),Y=u(),q=k8();function B(G,H,{key:_,value:$}){if(Y.isNode(_)&&_.addToJSMap)_.addToJSMap(G,H,$);else if(z.isMergeKey(G,_))z.addMergeToJSMap(G,H,$);else{let Q=q.toJS(_,"",G);if(H instanceof Map)H.set(Q,q.toJS($,Q,G));else if(H instanceof Set)H.add(Q);else{let J=U(_,Q,G),V=q.toJS($,J,G);if(J in H)Object.defineProperty(H,J,{value:V,writable:!0,enumerable:!0,configurable:!0});else H[J]=V}}return H}function U(G,H,_){if(H===null)return"";if(typeof H!=="object")return String(H);if(Y.isNode(G)&&_?.doc){let $=W.createStringifyContext(_.doc,{});$.anchors=new Set;for(let J of _.anchors.keys())$.anchors.add(J.anchor);$.inFlow=!0,$.inStringifyKey=!0;let Q=G.toString($);if(!_.mapKeyWarned){let J=JSON.stringify(Q);if(J.length>40)J=J.substring(0,36)+'..."';X.warn(_.doc.options.logLevel,\`Keys with collection values will be stringified due to JS Object restrictions: \${J}. Set mapAsMap: true to use object keys.\`),_.mapKeyWarned=!0}return Q}return JSON.stringify(H)}Z.addPairToJSMap=B}),b8=w((Z)=>{var X=aZ(),z=E4(),W=r5(),Y=u();function q(U,G,H){let _=X.createNode(U,void 0,H),$=X.createNode(G,void 0,H);return new B(_,$)}class B{constructor(U,G=null){Object.defineProperty(this,Y.NODE_TYPE,{value:Y.PAIR}),this.key=U,this.value=G}clone(U){let{key:G,value:H}=this;if(Y.isNode(G))G=G.clone(U);if(Y.isNode(H))H=H.clone(U);return new B(G,H)}toJSON(U,G){let H=G?.mapAsMap?new Map:{};return W.addPairToJSMap(G,H,this)}toString(U,G,H){return U?.doc?z.stringifyPair(this,U,G,H):JSON.stringify(this)}}Z.Pair=B,Z.createPair=q}),t5=w((Z)=>{var X=u(),z=eZ(),W=rZ();function Y(G,H,_){return(H.inFlow??G.flow?B:q)(G,H,_)}function q({comment:G,items:H},_,{blockItemPrefix:$,flowChars:Q,itemIndent:J,onChompKeep:V,onComment:A}){let{indent:M,options:{commentString:D}}=_,L=Object.assign({},_,{indent:J,type:null}),F=!1,j=[];for(let K=0;K<H.length;++K){let E=H[K],T=null;if(X.isNode(E)){if(!F&&E.spaceBefore)j.push("");if(U(_,j,E.commentBefore,F),E.comment)T=E.comment}else if(X.isPair(E)){let C=X.isNode(E.key)?E.key:null;if(C){if(!F&&C.spaceBefore)j.push("");U(_,j,C.commentBefore,F)}}F=!1;let P=z.stringify(E,L,()=>T=null,()=>F=!0);if(T)P+=W.lineComment(P,J,D(T));if(F&&T)F=!1;j.push($+P)}let N;if(j.length===0)N=Q.start+Q.end;else{N=j[0];for(let K=1;K<j.length;++K){let E=j[K];N+=E?\`
|
|
21037
21037
|
\${M}\${E}\`:\`
|
|
21038
21038
|
\`}}if(G){if(N+=\`
|
|
21039
|
-
\`+W.indentComment(D(G),M),A)A()}else if(F&&
|
|
21039
|
+
\`+W.indentComment(D(G),M),A)A()}else if(F&&V)V();return N}function B({items:G},H,{flowChars:_,itemIndent:$}){let{indent:Q,indentStep:J,flowCollectionPadding:V,options:{commentString:A}}=H;$+=J;let M=Object.assign({},H,{indent:$,inFlow:!0,type:null}),D=!1,L=0,F=[];for(let K=0;K<G.length;++K){let E=G[K],T=null;if(X.isNode(E)){if(E.spaceBefore)F.push("");if(U(H,F,E.commentBefore,!1),E.comment)T=E.comment}else if(X.isPair(E)){let C=X.isNode(E.key)?E.key:null;if(C){if(C.spaceBefore)F.push("");if(U(H,F,C.commentBefore,!1),C.comment)D=!0}let k=X.isNode(E.value)?E.value:null;if(k){if(k.comment)T=k.comment;if(k.commentBefore)D=!0}else if(E.value==null&&C?.comment)T=C.comment}if(T)D=!0;let P=z.stringify(E,M,()=>T=null);if(D||(D=F.length>L||P.includes(\`
|
|
21040
21040
|
\`)),K<G.length-1)P+=",";else if(H.options.trailingComma){if(H.options.lineWidth>0)D||(D=F.reduce((C,k)=>C+k.length+2,2)+(P.length+2)>H.options.lineWidth);if(D)P+=","}if(T)P+=W.lineComment(P,$,A(T));F.push(P),L=F.length}let{start:j,end:N}=_;if(F.length===0)return j+N;else{if(!D){let K=F.reduce((E,T)=>E+T.length+2,2);D=H.options.lineWidth>0&&K>H.options.lineWidth}if(D){let K=j;for(let E of F)K+=E?\`
|
|
21041
21041
|
\${J}\${Q}\${E}\`:\`
|
|
21042
21042
|
\`;return\`\${K}
|
|
21043
|
-
\${Q}\${N}\`}else return\`\${j}\${
|
|
21044
|
-
\`:" ")}return W.stringifyString({comment:q,type:B,value:Q},G,H,_)}};Z.binary=
|
|
21043
|
+
\${Q}\${N}\`}else return\`\${j}\${V}\${F.join(" ")}\${V}\${N}\`}}function U({indent:G,options:{commentString:H}},_,$,Q){if($&&Q)$=$.replace(/^\\n+/,"");if($){let J=W.indentComment(H($),G);_.push(J.trimStart())}}Z.stringifyCollection=Y}),f8=w((Z)=>{var X=t5(),z=r5(),W=i6(),Y=u(),q=b8(),B=q0();function U(H,_){let $=Y.isScalar(_)?_.value:_;for(let Q of H)if(Y.isPair(Q)){if(Q.key===_||Q.key===$)return Q;if(Y.isScalar(Q.key)&&Q.key.value===$)return Q}return}class G extends W.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(H){super(Y.MAP,H);this.items=[]}static from(H,_,$){let{keepUndefined:Q,replacer:J}=$,V=new this(H),A=(M,D)=>{if(typeof J==="function")D=J.call(_,M,D);else if(Array.isArray(J)&&!J.includes(M))return;if(D!==void 0||Q)V.items.push(q.createPair(M,D,$))};if(_ instanceof Map)for(let[M,D]of _)A(M,D);else if(_&&typeof _==="object")for(let M of Object.keys(_))A(M,_[M]);if(typeof H.sortMapEntries==="function")V.items.sort(H.sortMapEntries);return V}add(H,_){let $;if(Y.isPair(H))$=H;else if(!H||typeof H!=="object"||!("key"in H))$=new q.Pair(H,H?.value);else $=new q.Pair(H.key,H.value);let Q=U(this.items,$.key),J=this.schema?.sortMapEntries;if(Q){if(!_)throw Error(\`Key \${$.key} already set\`);if(Y.isScalar(Q.value)&&B.isScalarValue($.value))Q.value.value=$.value;else Q.value=$.value}else if(J){let V=this.items.findIndex((A)=>J($,A)<0);if(V===-1)this.items.push($);else this.items.splice(V,0,$)}else this.items.push($)}delete(H){let _=U(this.items,H);if(!_)return!1;return this.items.splice(this.items.indexOf(_),1).length>0}get(H,_){let Q=U(this.items,H)?.value;return(!_&&Y.isScalar(Q)?Q.value:Q)??void 0}has(H){return!!U(this.items,H)}set(H,_){this.add(new q.Pair(H,_),!0)}toJSON(H,_,$){let Q=$?new $:_?.mapAsMap?new Map:{};if(_?.onCreate)_.onCreate(Q);for(let J of this.items)z.addPairToJSMap(_,Q,J);return Q}toString(H,_,$){if(!H)return JSON.stringify(this);for(let Q of this.items)if(!Y.isPair(Q))throw Error(\`Map items must all be pairs; found \${JSON.stringify(Q)} instead\`);if(!H.allNullValues&&this.hasAllNullValues(!1))H=Object.assign({},H,{allNullValues:!0});return X.stringifyCollection(this,H,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:H.indent||"",onChompKeep:$,onComment:_})}}Z.YAMLMap=G,Z.findPair=U}),DZ=w((Z)=>{var X=u(),z=f8(),W={collection:"map",default:!0,nodeClass:z.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(Y,q){if(!X.isMap(Y))q("Expected a mapping for this tag");return Y},createNode:(Y,q,B)=>z.YAMLMap.from(Y,q,B)};Z.map=W}),x8=w((Z)=>{var X=aZ(),z=t5(),W=i6(),Y=u(),q=q0(),B=k8();class U extends W.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(H){super(Y.SEQ,H);this.items=[]}add(H){this.items.push(H)}delete(H){let _=G(H);if(typeof _!=="number")return!1;return this.items.splice(_,1).length>0}get(H,_){let $=G(H);if(typeof $!=="number")return;let Q=this.items[$];return!_&&Y.isScalar(Q)?Q.value:Q}has(H){let _=G(H);return typeof _==="number"&&_<this.items.length}set(H,_){let $=G(H);if(typeof $!=="number")throw Error(\`Expected a valid index, not \${H}.\`);let Q=this.items[$];if(Y.isScalar(Q)&&q.isScalarValue(_))Q.value=_;else this.items[$]=_}toJSON(H,_){let $=[];if(_?.onCreate)_.onCreate($);let Q=0;for(let J of this.items)$.push(B.toJS(J,String(Q++),_));return $}toString(H,_,$){if(!H)return JSON.stringify(this);return z.stringifyCollection(this,H,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(H.indent||"")+" ",onChompKeep:$,onComment:_})}static from(H,_,$){let{replacer:Q}=$,J=new this(H);if(_&&Symbol.iterator in Object(_)){let V=0;for(let A of _){if(typeof Q==="function"){let M=_ instanceof Set?A:String(V++);A=Q.call(_,M,A)}J.items.push(X.createNode(A,void 0,$))}}return J}}function G(H){let _=Y.isScalar(H)?H.value:H;if(_&&typeof _==="string")_=Number(_);return typeof _==="number"&&Number.isInteger(_)&&_>=0?_:null}Z.YAMLSeq=U}),LZ=w((Z)=>{var X=u(),z=x8(),W={collection:"seq",default:!0,nodeClass:z.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(Y,q){if(!X.isSeq(Y))q("Expected a sequence for this tag");return Y},createNode:(Y,q,B)=>z.YAMLSeq.from(Y,q,B)};Z.seq=W}),Z6=w((Z)=>{var X=tZ(),z={identify:(W)=>typeof W==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(W)=>W,stringify(W,Y,q,B){return Y=Object.assign({actualString:!0},Y),X.stringifyString(W,Y,q,B)}};Z.string=z}),o6=w((Z)=>{var X=q0(),z={identify:(W)=>W==null,createNode:()=>new X.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new X.Scalar(null),stringify:({source:W},Y)=>typeof W==="string"&&z.test.test(W)?W:Y.options.nullStr};Z.nullTag=z}),e5=w((Z)=>{var X=q0(),z={identify:(W)=>typeof W==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:(W)=>new X.Scalar(W[0]==="t"||W[0]==="T"),stringify({source:W,value:Y},q){if(W&&z.test.test(W)){let B=W[0]==="t"||W[0]==="T";if(Y===B)return W}return Y?q.options.trueStr:q.options.falseStr}};Z.boolTag=z}),OZ=w((Z)=>{function X({format:z,minFractionDigits:W,tag:Y,value:q}){if(typeof q==="bigint")return String(q);let B=typeof q==="number"?q:Number(q);if(!isFinite(B))return isNaN(B)?".nan":B<0?"-.inf":".inf";let U=Object.is(q,-0)?"-0":JSON.stringify(q);if(!z&&W&&(!Y||Y==="tag:yaml.org,2002:float")&&/^\\d/.test(U)){let G=U.indexOf(".");if(G<0)G=U.length,U+=".";let H=W-(U.length-G-1);while(H-- >0)U+="0"}return U}Z.stringifyNumber=X}),Z7=w((Z)=>{var X=q0(),z=OZ(),W={identify:(B)=>typeof B==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,resolve:(B)=>B.slice(-3).toLowerCase()==="nan"?NaN:B[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:z.stringifyNumber},Y={identify:(B)=>typeof B==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:(B)=>parseFloat(B),stringify(B){let U=Number(B.value);return isFinite(U)?U.toExponential():z.stringifyNumber(B)}},q={identify:(B)=>typeof B==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,resolve(B){let U=new X.Scalar(parseFloat(B)),G=B.indexOf(".");if(G!==-1&&B[B.length-1]==="0")U.minFractionDigits=B.length-G-1;return U},stringify:z.stringifyNumber};Z.float=q,Z.floatExp=Y,Z.floatNaN=W}),X7=w((Z)=>{var X=OZ(),z=(G)=>typeof G==="bigint"||Number.isInteger(G),W=(G,H,_,{intAsBigInt:$})=>$?BigInt(G):parseInt(G.substring(H),_);function Y(G,H,_){let{value:$}=G;if(z($)&&$>=0)return _+$.toString(H);return X.stringifyNumber(G)}var q={identify:(G)=>z(G)&&G>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(G,H,_)=>W(G,2,8,_),stringify:(G)=>Y(G,8,"0o")},B={identify:z,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(G,H,_)=>W(G,0,10,_),stringify:X.stringifyNumber},U={identify:(G)=>z(G)&&G>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(G,H,_)=>W(G,2,16,_),stringify:(G)=>Y(G,16,"0x")};Z.int=B,Z.intHex=U,Z.intOct=q}),I4=w((Z)=>{var X=DZ(),z=o6(),W=LZ(),Y=Z6(),q=e5(),B=Z7(),U=X7(),G=[X.map,W.seq,Y.string,z.nullTag,q.boolTag,U.intOct,U.int,U.intHex,B.floatNaN,B.floatExp,B.float];Z.schema=G}),T4=w((Z)=>{var X=q0(),z=DZ(),W=LZ();function Y(H){return typeof H==="bigint"||Number.isInteger(H)}var q=({value:H})=>JSON.stringify(H),B=[{identify:(H)=>typeof H==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:(H)=>H,stringify:q},{identify:(H)=>H==null,createNode:()=>new X.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:q},{identify:(H)=>typeof H==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:(H)=>H==="true",stringify:q},{identify:Y,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(H,_,{intAsBigInt:$})=>$?BigInt(H):parseInt(H,10),stringify:({value:H})=>Y(H)?H.toString():JSON.stringify(H)},{identify:(H)=>typeof H==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:(H)=>parseFloat(H),stringify:q}],U={default:!0,tag:"",test:/^/,resolve(H,_){return _(\`Unresolved plain scalar \${JSON.stringify(H)}\`),H}},G=[z.map,W.seq].concat(B,U);Z.schema=G}),z7=w((Z)=>{var X=nZ("buffer"),z=q0(),W=tZ(),Y={identify:(q)=>q instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(q,B){if(typeof X.Buffer==="function")return X.Buffer.from(q,"base64");else if(typeof atob==="function"){let U=atob(q.replace(/[\\n\\r]/g,"")),G=new Uint8Array(U.length);for(let H=0;H<U.length;++H)G[H]=U.charCodeAt(H);return G}else return B("This environment does not support reading binary tags; either Buffer or atob is required"),q},stringify({comment:q,type:B,value:U},G,H,_){if(!U)return"";let $=U,Q;if(typeof X.Buffer==="function")Q=$ instanceof X.Buffer?$.toString("base64"):X.Buffer.from($.buffer).toString("base64");else if(typeof btoa==="function"){let J="";for(let V=0;V<$.length;++V)J+=String.fromCharCode($[V]);Q=btoa(J)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(B??(B=z.Scalar.BLOCK_LITERAL),B!==z.Scalar.QUOTE_DOUBLE){let J=Math.max(G.options.lineWidth-G.indent.length,G.options.minContentWidth),V=Math.ceil(Q.length/J),A=Array(V);for(let M=0,D=0;M<V;++M,D+=J)A[M]=Q.substr(D,J);Q=A.join(B===z.Scalar.BLOCK_LITERAL?\`
|
|
21044
|
+
\`:" ")}return W.stringifyString({comment:q,type:B,value:Q},G,H,_)}};Z.binary=Y}),s6=w((Z)=>{var X=u(),z=b8(),W=q0(),Y=x8();function q(G,H){if(X.isSeq(G))for(let _=0;_<G.items.length;++_){let $=G.items[_];if(X.isPair($))continue;else if(X.isMap($)){if($.items.length>1)H("Each pair must have its own sequence indicator");let Q=$.items[0]||new z.Pair(new W.Scalar(null));if($.commentBefore)Q.key.commentBefore=Q.key.commentBefore?\`\${$.commentBefore}
|
|
21045
21045
|
\${Q.key.commentBefore}\`:$.commentBefore;if($.comment){let J=Q.value??Q.key;J.comment=J.comment?\`\${$.comment}
|
|
21046
|
-
\${J.comment}\`:$.comment}$=Q}G.items[_]=X.isPair($)?$:new z.Pair($)}else H("Expected a sequence for this tag");return G}function B(G,H,_){let{replacer:$}=_,Q=new V.YAMLSeq(G);Q.tag="tag:yaml.org,2002:pairs";let J=0;if(H&&Symbol.iterator in Object(H))for(let Y of H){if(typeof $==="function")Y=$.call(H,String(J++),Y);let A,M;if(Array.isArray(Y))if(Y.length===2)A=Y[0],M=Y[1];else throw TypeError(\`Expected [key, value] tuple: \${Y}\`);else if(Y&&Y instanceof Object){let D=Object.keys(Y);if(D.length===1)A=D[0],M=Y[A];else throw TypeError(\`Expected tuple with one key, not \${D.length} keys\`)}else A=Y;Q.items.push(z.createPair(A,M,_))}return Q}var U={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:q,createNode:B};Z.createPairs=B,Z.pairs=U,Z.resolvePairs=q}),Z7=w((Z)=>{var X=u(),z=w8(),W=b8(),V=f8(),q=s6();class B extends V.YAMLSeq{constructor(){super();this.add=W.YAMLMap.prototype.add.bind(this),this.delete=W.YAMLMap.prototype.delete.bind(this),this.get=W.YAMLMap.prototype.get.bind(this),this.has=W.YAMLMap.prototype.has.bind(this),this.set=W.YAMLMap.prototype.set.bind(this),this.tag=B.tag}toJSON(G,H){if(!H)return super.toJSON(G);let _=new Map;if(H?.onCreate)H.onCreate(_);for(let $ of this.items){let Q,J;if(X.isPair($))Q=z.toJS($.key,"",H),J=z.toJS($.value,Q,H);else Q=z.toJS($,"",H);if(_.has(Q))throw Error("Ordered maps must not include duplicate keys");_.set(Q,J)}return _}static from(G,H,_){let $=q.createPairs(G,H,_),Q=new this;return Q.items=$.items,Q}}B.tag="tag:yaml.org,2002:omap";var U={collection:"seq",identify:(G)=>G instanceof Map,nodeClass:B,default:!1,tag:"tag:yaml.org,2002:omap",resolve(G,H){let _=q.resolvePairs(G,H),$=[];for(let{key:Q}of _.items)if(X.isScalar(Q))if($.includes(Q.value))H(\`Ordered maps must not include duplicate keys: \${Q.value}\`);else $.push(Q.value);return Object.assign(new B,_)},createNode:(G,H,_)=>B.from(G,H,_)};Z.YAMLOMap=B,Z.omap=U}),C4=w((Z)=>{var X=q0();function z({value:q,source:B},U){if(B&&(q?W:V).test.test(B))return B;return q?U.options.trueStr:U.options.falseStr}var W={identify:(q)=>q===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new X.Scalar(!0),stringify:z},V={identify:(q)=>q===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new X.Scalar(!1),stringify:z};Z.falseTag=V,Z.trueTag=W}),E4=w((Z)=>{var X=q0(),z=LZ(),W={identify:(B)=>typeof B==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,resolve:(B)=>B.slice(-3).toLowerCase()==="nan"?NaN:B[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:z.stringifyNumber},V={identify:(B)=>typeof B==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(B)=>parseFloat(B.replace(/_/g,"")),stringify(B){let U=Number(B.value);return isFinite(U)?U.toExponential():z.stringifyNumber(B)}},q={identify:(B)=>typeof B==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,resolve(B){let U=new X.Scalar(parseFloat(B.replace(/_/g,""))),G=B.indexOf(".");if(G!==-1){let H=B.substring(G+1).replace(/_/g,"");if(H[H.length-1]==="0")U.minFractionDigits=H.length}return U},stringify:z.stringifyNumber};Z.float=q,Z.floatExp=V,Z.floatNaN=W}),I4=w((Z)=>{var X=LZ(),z=(H)=>typeof H==="bigint"||Number.isInteger(H);function W(H,_,$,{intAsBigInt:Q}){let J=H[0];if(J==="-"||J==="+")_+=1;if(H=H.substring(_).replace(/_/g,""),Q){switch($){case 2:H=\`0b\${H}\`;break;case 8:H=\`0o\${H}\`;break;case 16:H=\`0x\${H}\`;break}let A=BigInt(H);return J==="-"?BigInt(-1)*A:A}let Y=parseInt(H,$);return J==="-"?-1*Y:Y}function V(H,_,$){let{value:Q}=H;if(z(Q)){let J=Q.toString(_);return Q<0?"-"+$+J.substr(1):$+J}return X.stringifyNumber(H)}var q={identify:z,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(H,_,$)=>W(H,2,2,$),stringify:(H)=>V(H,2,"0b")},B={identify:z,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(H,_,$)=>W(H,1,8,$),stringify:(H)=>V(H,8,"0")},U={identify:z,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(H,_,$)=>W(H,0,10,$),stringify:X.stringifyNumber},G={identify:z,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(H,_,$)=>W(H,2,16,$),stringify:(H)=>V(H,16,"0x")};Z.int=U,Z.intBin=q,Z.intHex=G,Z.intOct=B}),X7=w((Z)=>{var X=u(),z=k8(),W=b8();class V extends W.YAMLMap{constructor(B){super(B);this.tag=V.tag}add(B){let U;if(X.isPair(B))U=B;else if(B&&typeof B==="object"&&"key"in B&&"value"in B&&B.value===null)U=new z.Pair(B.key,null);else U=new z.Pair(B,null);if(!W.findPair(this.items,U.key))this.items.push(U)}get(B,U){let G=W.findPair(this.items,B);return!U&&X.isPair(G)?X.isScalar(G.key)?G.key.value:G.key:G}set(B,U){if(typeof U!=="boolean")throw Error(\`Expected boolean value for set(key, value) in a YAML set, not \${typeof U}\`);let G=W.findPair(this.items,B);if(G&&!U)this.items.splice(this.items.indexOf(G),1);else if(!G&&U)this.items.push(new z.Pair(B))}toJSON(B,U){return super.toJSON(B,U,Set)}toString(B,U,G){if(!B)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},B,{allNullValues:!0}),U,G);else throw Error("Set items must all have null values")}static from(B,U,G){let{replacer:H}=G,_=new this(B);if(U&&Symbol.iterator in Object(U))for(let $ of U){if(typeof H==="function")$=H.call(U,$,$);_.items.push(z.createPair($,null,G))}return _}}V.tag="tag:yaml.org,2002:set";var q={collection:"map",identify:(B)=>B instanceof Set,nodeClass:V,default:!1,tag:"tag:yaml.org,2002:set",createNode:(B,U,G)=>V.from(B,U,G),resolve(B,U){if(X.isMap(B))if(B.hasAllNullValues(!0))return Object.assign(new V,B);else U("Set items must all have null values");else U("Expected a mapping for this tag");return B}};Z.YAMLSet=V,Z.set=q}),z7=w((Z)=>{var X=LZ();function z(U,G){let H=U[0],_=H==="-"||H==="+"?U.substring(1):U,$=(J)=>G?BigInt(J):Number(J),Q=_.replace(/_/g,"").split(":").reduce((J,Y)=>J*$(60)+$(Y),$(0));return H==="-"?$(-1)*Q:Q}function W(U){let{value:G}=U,H=(J)=>J;if(typeof G==="bigint")H=(J)=>BigInt(J);else if(isNaN(G)||!isFinite(G))return X.stringifyNumber(U);let _="";if(G<0)_="-",G*=H(-1);let $=H(60),Q=[G%$];if(G<60)Q.unshift(0);else if(G=(G-Q[0])/$,Q.unshift(G%$),G>=60)G=(G-Q[0])/$,Q.unshift(G);return _+Q.map((J)=>String(J).padStart(2,"0")).join(":").replace(/000000\\d*$/,"")}var V={identify:(U)=>typeof U==="bigint"||Number.isInteger(U),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(U,G,{intAsBigInt:H})=>z(U,H),stringify:W},q={identify:(U)=>typeof U==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,resolve:(U)=>z(U,!1),stringify:W},B={identify:(U)=>U instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\\\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(U){let G=U.match(B.test);if(!G)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,H,_,$,Q,J,Y]=G.map(Number),A=G[7]?Number((G[7]+"00").substr(1,3)):0,M=Date.UTC(H,_-1,$,Q||0,J||0,Y||0,A),D=G[8];if(D&&D!=="Z"){let L=z(D,!1);if(Math.abs(L)<30)L*=60;M-=60000*L}return new Date(M)},stringify:({value:U})=>U?.toISOString().replace(/(T00:00:00)?\\.000Z$/,"")??""};Z.floatTime=q,Z.intTime=V,Z.timestamp=B}),T4=w((Z)=>{var X=MZ(),z=o6(),W=DZ(),V=tZ(),q=e5(),B=C4(),U=E4(),G=I4(),H=n6(),_=Z7(),$=s6(),Q=X7(),J=z7(),Y=[X.map,W.seq,V.string,z.nullTag,B.trueTag,B.falseTag,G.intBin,G.intOct,G.int,G.intHex,U.floatNaN,U.floatExp,U.float,q.binary,H.merge,_.omap,$.pairs,Q.set,J.intTime,J.floatTime,J.timestamp];Z.schema=Y}),P4=w((Z)=>{var X=MZ(),z=o6(),W=DZ(),V=tZ(),q=a5(),B=r5(),U=t5(),G=R4(),H=S4(),_=e5(),$=n6(),Q=Z7(),J=s6(),Y=T4(),A=X7(),M=z7(),D=new Map([["core",G.schema],["failsafe",[X.map,W.seq,V.string]],["json",H.schema],["yaml11",Y.schema],["yaml-1.1",Y.schema]]),L={binary:_.binary,bool:q.boolTag,float:B.float,floatExp:B.floatExp,floatNaN:B.floatNaN,floatTime:M.floatTime,int:U.int,intHex:U.intHex,intOct:U.intOct,intTime:M.intTime,map:X.map,merge:$.merge,null:z.nullTag,omap:Q.omap,pairs:J.pairs,seq:W.seq,set:A.set,timestamp:M.timestamp},F={"tag:yaml.org,2002:binary":_.binary,"tag:yaml.org,2002:merge":$.merge,"tag:yaml.org,2002:omap":Q.omap,"tag:yaml.org,2002:pairs":J.pairs,"tag:yaml.org,2002:set":A.set,"tag:yaml.org,2002:timestamp":M.timestamp};function j(N,K,E){let T=D.get(K);if(T&&!N)return E&&!T.includes($.merge)?T.concat($.merge):T.slice();let P=T;if(!P)if(Array.isArray(N))P=[];else{let C=Array.from(D.keys()).filter((k)=>k!=="yaml11").map((k)=>JSON.stringify(k)).join(", ");throw Error(\`Unknown schema "\${K}"; use one of \${C} or define customTags array\`)}if(Array.isArray(N))for(let C of N)P=P.concat(C);else if(typeof N==="function")P=N(P.slice());if(E)P=P.concat($.merge);return P.reduce((C,k)=>{let b=typeof k==="string"?L[k]:k;if(!b){let l=JSON.stringify(k),U0=Object.keys(L).map((Q0)=>JSON.stringify(Q0)).join(", ");throw Error(\`Unknown custom tag \${l}; use one of \${U0}\`)}if(!C.includes(b))C.push(b);return C},[])}Z.coreKnownTags=F,Z.getTags=j}),$7=w((Z)=>{var X=u(),z=MZ(),W=DZ(),V=tZ(),q=P4(),B=(G,H)=>G.key<H.key?-1:G.key>H.key?1:0;class U{constructor({compat:G,customTags:H,merge:_,resolveKnownTags:$,schema:Q,sortMapEntries:J,toStringDefaults:Y}){this.compat=Array.isArray(G)?q.getTags(G,"compat"):G?q.getTags(null,G):null,this.name=typeof Q==="string"&&Q||"core",this.knownTags=$?q.coreKnownTags:{},this.tags=q.getTags(H,this.name,_),this.toStringOptions=Y??null,Object.defineProperty(this,X.MAP,{value:z.map}),Object.defineProperty(this,X.SCALAR,{value:V.string}),Object.defineProperty(this,X.SEQ,{value:W.seq}),this.sortMapEntries=typeof J==="function"?J:J===!0?B:null}clone(){let G=Object.create(U.prototype,Object.getOwnPropertyDescriptors(this));return G.tags=this.tags.slice(),G}}Z.Schema=U}),w4=w((Z)=>{var X=u(),z=rZ(),W=sZ();function V(q,B){let U=[],G=B.directives===!0;if(B.directives!==!1&&q.directives){let J=q.directives.toString(q);if(J)U.push(J),G=!0;else if(q.directives.docStart)G=!0}if(G)U.push("---");let H=z.createStringifyContext(q,B),{commentString:_}=H.options;if(q.commentBefore){if(U.length!==1)U.unshift("");let J=_(q.commentBefore);U.unshift(W.indentComment(J,""))}let $=!1,Q=null;if(q.contents){if(X.isNode(q.contents)){if(q.contents.spaceBefore&&G)U.push("");if(q.contents.commentBefore){let A=_(q.contents.commentBefore);U.push(W.indentComment(A,""))}H.forceBlockIndent=!!q.comment,Q=q.contents.comment}let J=Q?void 0:()=>$=!0,Y=z.stringify(q.contents,H,()=>Q=null,J);if(Q)Y+=W.lineComment(Y,"",_(Q));if((Y[0]==="|"||Y[0]===">")&&U[U.length-1]==="---")U[U.length-1]=\`--- \${Y}\`;else U.push(Y)}else U.push(z.stringify(q.contents,H));if(q.directives?.docEnd)if(q.comment){let J=_(q.comment);if(J.includes(\`
|
|
21046
|
+
\${J.comment}\`:$.comment}$=Q}G.items[_]=X.isPair($)?$:new z.Pair($)}else H("Expected a sequence for this tag");return G}function B(G,H,_){let{replacer:$}=_,Q=new Y.YAMLSeq(G);Q.tag="tag:yaml.org,2002:pairs";let J=0;if(H&&Symbol.iterator in Object(H))for(let V of H){if(typeof $==="function")V=$.call(H,String(J++),V);let A,M;if(Array.isArray(V))if(V.length===2)A=V[0],M=V[1];else throw TypeError(\`Expected [key, value] tuple: \${V}\`);else if(V&&V instanceof Object){let D=Object.keys(V);if(D.length===1)A=D[0],M=V[A];else throw TypeError(\`Expected tuple with one key, not \${D.length} keys\`)}else A=V;Q.items.push(z.createPair(A,M,_))}return Q}var U={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:q,createNode:B};Z.createPairs=B,Z.pairs=U,Z.resolvePairs=q}),$7=w((Z)=>{var X=u(),z=k8(),W=f8(),Y=x8(),q=s6();class B extends Y.YAMLSeq{constructor(){super();this.add=W.YAMLMap.prototype.add.bind(this),this.delete=W.YAMLMap.prototype.delete.bind(this),this.get=W.YAMLMap.prototype.get.bind(this),this.has=W.YAMLMap.prototype.has.bind(this),this.set=W.YAMLMap.prototype.set.bind(this),this.tag=B.tag}toJSON(G,H){if(!H)return super.toJSON(G);let _=new Map;if(H?.onCreate)H.onCreate(_);for(let $ of this.items){let Q,J;if(X.isPair($))Q=z.toJS($.key,"",H),J=z.toJS($.value,Q,H);else Q=z.toJS($,"",H);if(_.has(Q))throw Error("Ordered maps must not include duplicate keys");_.set(Q,J)}return _}static from(G,H,_){let $=q.createPairs(G,H,_),Q=new this;return Q.items=$.items,Q}}B.tag="tag:yaml.org,2002:omap";var U={collection:"seq",identify:(G)=>G instanceof Map,nodeClass:B,default:!1,tag:"tag:yaml.org,2002:omap",resolve(G,H){let _=q.resolvePairs(G,H),$=[];for(let{key:Q}of _.items)if(X.isScalar(Q))if($.includes(Q.value))H(\`Ordered maps must not include duplicate keys: \${Q.value}\`);else $.push(Q.value);return Object.assign(new B,_)},createNode:(G,H,_)=>B.from(G,H,_)};Z.YAMLOMap=B,Z.omap=U}),P4=w((Z)=>{var X=q0();function z({value:q,source:B},U){if(B&&(q?W:Y).test.test(B))return B;return q?U.options.trueStr:U.options.falseStr}var W={identify:(q)=>q===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new X.Scalar(!0),stringify:z},Y={identify:(q)=>q===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new X.Scalar(!1),stringify:z};Z.falseTag=Y,Z.trueTag=W}),w4=w((Z)=>{var X=q0(),z=OZ(),W={identify:(B)=>typeof B==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,resolve:(B)=>B.slice(-3).toLowerCase()==="nan"?NaN:B[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:z.stringifyNumber},Y={identify:(B)=>typeof B==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:(B)=>parseFloat(B.replace(/_/g,"")),stringify(B){let U=Number(B.value);return isFinite(U)?U.toExponential():z.stringifyNumber(B)}},q={identify:(B)=>typeof B==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,resolve(B){let U=new X.Scalar(parseFloat(B.replace(/_/g,""))),G=B.indexOf(".");if(G!==-1){let H=B.substring(G+1).replace(/_/g,"");if(H[H.length-1]==="0")U.minFractionDigits=H.length}return U},stringify:z.stringifyNumber};Z.float=q,Z.floatExp=Y,Z.floatNaN=W}),k4=w((Z)=>{var X=OZ(),z=(H)=>typeof H==="bigint"||Number.isInteger(H);function W(H,_,$,{intAsBigInt:Q}){let J=H[0];if(J==="-"||J==="+")_+=1;if(H=H.substring(_).replace(/_/g,""),Q){switch($){case 2:H=\`0b\${H}\`;break;case 8:H=\`0o\${H}\`;break;case 16:H=\`0x\${H}\`;break}let A=BigInt(H);return J==="-"?BigInt(-1)*A:A}let V=parseInt(H,$);return J==="-"?-1*V:V}function Y(H,_,$){let{value:Q}=H;if(z(Q)){let J=Q.toString(_);return Q<0?"-"+$+J.substr(1):$+J}return X.stringifyNumber(H)}var q={identify:z,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(H,_,$)=>W(H,2,2,$),stringify:(H)=>Y(H,2,"0b")},B={identify:z,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(H,_,$)=>W(H,1,8,$),stringify:(H)=>Y(H,8,"0")},U={identify:z,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(H,_,$)=>W(H,0,10,$),stringify:X.stringifyNumber},G={identify:z,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(H,_,$)=>W(H,2,16,$),stringify:(H)=>Y(H,16,"0x")};Z.int=U,Z.intBin=q,Z.intHex=G,Z.intOct=B}),Q7=w((Z)=>{var X=u(),z=b8(),W=f8();class Y extends W.YAMLMap{constructor(B){super(B);this.tag=Y.tag}add(B){let U;if(X.isPair(B))U=B;else if(B&&typeof B==="object"&&"key"in B&&"value"in B&&B.value===null)U=new z.Pair(B.key,null);else U=new z.Pair(B,null);if(!W.findPair(this.items,U.key))this.items.push(U)}get(B,U){let G=W.findPair(this.items,B);return!U&&X.isPair(G)?X.isScalar(G.key)?G.key.value:G.key:G}set(B,U){if(typeof U!=="boolean")throw Error(\`Expected boolean value for set(key, value) in a YAML set, not \${typeof U}\`);let G=W.findPair(this.items,B);if(G&&!U)this.items.splice(this.items.indexOf(G),1);else if(!G&&U)this.items.push(new z.Pair(B))}toJSON(B,U){return super.toJSON(B,U,Set)}toString(B,U,G){if(!B)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},B,{allNullValues:!0}),U,G);else throw Error("Set items must all have null values")}static from(B,U,G){let{replacer:H}=G,_=new this(B);if(U&&Symbol.iterator in Object(U))for(let $ of U){if(typeof H==="function")$=H.call(U,$,$);_.items.push(z.createPair($,null,G))}return _}}Y.tag="tag:yaml.org,2002:set";var q={collection:"map",identify:(B)=>B instanceof Set,nodeClass:Y,default:!1,tag:"tag:yaml.org,2002:set",createNode:(B,U,G)=>Y.from(B,U,G),resolve(B,U){if(X.isMap(B))if(B.hasAllNullValues(!0))return Object.assign(new Y,B);else U("Set items must all have null values");else U("Expected a mapping for this tag");return B}};Z.YAMLSet=Y,Z.set=q}),W7=w((Z)=>{var X=OZ();function z(U,G){let H=U[0],_=H==="-"||H==="+"?U.substring(1):U,$=(J)=>G?BigInt(J):Number(J),Q=_.replace(/_/g,"").split(":").reduce((J,V)=>J*$(60)+$(V),$(0));return H==="-"?$(-1)*Q:Q}function W(U){let{value:G}=U,H=(J)=>J;if(typeof G==="bigint")H=(J)=>BigInt(J);else if(isNaN(G)||!isFinite(G))return X.stringifyNumber(U);let _="";if(G<0)_="-",G*=H(-1);let $=H(60),Q=[G%$];if(G<60)Q.unshift(0);else if(G=(G-Q[0])/$,Q.unshift(G%$),G>=60)G=(G-Q[0])/$,Q.unshift(G);return _+Q.map((J)=>String(J).padStart(2,"0")).join(":").replace(/000000\\d*$/,"")}var Y={identify:(U)=>typeof U==="bigint"||Number.isInteger(U),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(U,G,{intAsBigInt:H})=>z(U,H),stringify:W},q={identify:(U)=>typeof U==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,resolve:(U)=>z(U,!1),stringify:W},B={identify:(U)=>U instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\\\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(U){let G=U.match(B.test);if(!G)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,H,_,$,Q,J,V]=G.map(Number),A=G[7]?Number((G[7]+"00").substr(1,3)):0,M=Date.UTC(H,_-1,$,Q||0,J||0,V||0,A),D=G[8];if(D&&D!=="Z"){let L=z(D,!1);if(Math.abs(L)<30)L*=60;M-=60000*L}return new Date(M)},stringify:({value:U})=>U?.toISOString().replace(/(T00:00:00)?\\.000Z$/,"")??""};Z.floatTime=q,Z.intTime=Y,Z.timestamp=B}),b4=w((Z)=>{var X=DZ(),z=o6(),W=LZ(),Y=Z6(),q=z7(),B=P4(),U=w4(),G=k4(),H=n6(),_=$7(),$=s6(),Q=Q7(),J=W7(),V=[X.map,W.seq,Y.string,z.nullTag,B.trueTag,B.falseTag,G.intBin,G.intOct,G.int,G.intHex,U.floatNaN,U.floatExp,U.float,q.binary,H.merge,_.omap,$.pairs,Q.set,J.intTime,J.floatTime,J.timestamp];Z.schema=V}),f4=w((Z)=>{var X=DZ(),z=o6(),W=LZ(),Y=Z6(),q=e5(),B=Z7(),U=X7(),G=I4(),H=T4(),_=z7(),$=n6(),Q=$7(),J=s6(),V=b4(),A=Q7(),M=W7(),D=new Map([["core",G.schema],["failsafe",[X.map,W.seq,Y.string]],["json",H.schema],["yaml11",V.schema],["yaml-1.1",V.schema]]),L={binary:_.binary,bool:q.boolTag,float:B.float,floatExp:B.floatExp,floatNaN:B.floatNaN,floatTime:M.floatTime,int:U.int,intHex:U.intHex,intOct:U.intOct,intTime:M.intTime,map:X.map,merge:$.merge,null:z.nullTag,omap:Q.omap,pairs:J.pairs,seq:W.seq,set:A.set,timestamp:M.timestamp},F={"tag:yaml.org,2002:binary":_.binary,"tag:yaml.org,2002:merge":$.merge,"tag:yaml.org,2002:omap":Q.omap,"tag:yaml.org,2002:pairs":J.pairs,"tag:yaml.org,2002:set":A.set,"tag:yaml.org,2002:timestamp":M.timestamp};function j(N,K,E){let T=D.get(K);if(T&&!N)return E&&!T.includes($.merge)?T.concat($.merge):T.slice();let P=T;if(!P)if(Array.isArray(N))P=[];else{let C=Array.from(D.keys()).filter((k)=>k!=="yaml11").map((k)=>JSON.stringify(k)).join(", ");throw Error(\`Unknown schema "\${K}"; use one of \${C} or define customTags array\`)}if(Array.isArray(N))for(let C of N)P=P.concat(C);else if(typeof N==="function")P=N(P.slice());if(E)P=P.concat($.merge);return P.reduce((C,k)=>{let b=typeof k==="string"?L[k]:k;if(!b){let l=JSON.stringify(k),U0=Object.keys(L).map((Q0)=>JSON.stringify(Q0)).join(", ");throw Error(\`Unknown custom tag \${l}; use one of \${U0}\`)}if(!C.includes(b))C.push(b);return C},[])}Z.coreKnownTags=F,Z.getTags=j}),H7=w((Z)=>{var X=u(),z=DZ(),W=LZ(),Y=Z6(),q=f4(),B=(G,H)=>G.key<H.key?-1:G.key>H.key?1:0;class U{constructor({compat:G,customTags:H,merge:_,resolveKnownTags:$,schema:Q,sortMapEntries:J,toStringDefaults:V}){this.compat=Array.isArray(G)?q.getTags(G,"compat"):G?q.getTags(null,G):null,this.name=typeof Q==="string"&&Q||"core",this.knownTags=$?q.coreKnownTags:{},this.tags=q.getTags(H,this.name,_),this.toStringOptions=V??null,Object.defineProperty(this,X.MAP,{value:z.map}),Object.defineProperty(this,X.SCALAR,{value:Y.string}),Object.defineProperty(this,X.SEQ,{value:W.seq}),this.sortMapEntries=typeof J==="function"?J:J===!0?B:null}clone(){let G=Object.create(U.prototype,Object.getOwnPropertyDescriptors(this));return G.tags=this.tags.slice(),G}}Z.Schema=U}),x4=w((Z)=>{var X=u(),z=eZ(),W=rZ();function Y(q,B){let U=[],G=B.directives===!0;if(B.directives!==!1&&q.directives){let J=q.directives.toString(q);if(J)U.push(J),G=!0;else if(q.directives.docStart)G=!0}if(G)U.push("---");let H=z.createStringifyContext(q,B),{commentString:_}=H.options;if(q.commentBefore){if(U.length!==1)U.unshift("");let J=_(q.commentBefore);U.unshift(W.indentComment(J,""))}let $=!1,Q=null;if(q.contents){if(X.isNode(q.contents)){if(q.contents.spaceBefore&&G)U.push("");if(q.contents.commentBefore){let A=_(q.contents.commentBefore);U.push(W.indentComment(A,""))}H.forceBlockIndent=!!q.comment,Q=q.contents.comment}let J=Q?void 0:()=>$=!0,V=z.stringify(q.contents,H,()=>Q=null,J);if(Q)V+=W.lineComment(V,"",_(Q));if((V[0]==="|"||V[0]===">")&&U[U.length-1]==="---")U[U.length-1]=\`--- \${V}\`;else U.push(V)}else U.push(z.stringify(q.contents,H));if(q.directives?.docEnd)if(q.comment){let J=_(q.comment);if(J.includes(\`
|
|
21047
21047
|
\`))U.push("..."),U.push(W.indentComment(J,""));else U.push(\`... \${J}\`)}else U.push("...");else{let J=q.comment;if(J&&$)J=J.replace(/^\\n+/,"");if(J){if((!$||Q)&&U[U.length-1]!=="")U.push("");U.push(W.indentComment(_(J),""))}}return U.join(\`
|
|
21048
21048
|
\`)+\`
|
|
21049
|
-
\`}Z.stringifyDocument=
|
|
21050
|
-
\`;$=Q+$}if(/[^ ]/.test($)){let Q=1,J=U.linePos[1];if(J?.line===G&&J.col>H)Q=Math.max(1,Math.min(J.col-H,80-_));let
|
|
21049
|
+
\`}Z.stringifyDocument=Y}),X6=w((Z)=>{var X=sZ(),z=i6(),W=u(),Y=b8(),q=k8(),B=H7(),U=x4(),G=p6(),H=s5(),_=aZ(),$=o5();class Q{constructor(V,A,M){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,W.NODE_TYPE,{value:W.DOC});let D=null;if(typeof A==="function"||Array.isArray(A))D=A;else if(M===void 0&&A)M=A,A=void 0;let L=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},M);this.options=L;let{version:F}=L;if(M?._directives){if(this.directives=M._directives.atDocument(),this.directives.yaml.explicit)F=this.directives.yaml.version}else this.directives=new $.Directives({version:F});this.setSchema(F,M),this.contents=V===void 0?null:this.createNode(V,D,M)}clone(){let V=Object.create(Q.prototype,{[W.NODE_TYPE]:{value:W.DOC}});if(V.commentBefore=this.commentBefore,V.comment=this.comment,V.errors=this.errors.slice(),V.warnings=this.warnings.slice(),V.options=Object.assign({},this.options),this.directives)V.directives=this.directives.clone();if(V.schema=this.schema.clone(),V.contents=W.isNode(this.contents)?this.contents.clone(V.schema):this.contents,this.range)V.range=this.range.slice();return V}add(V){if(J(this.contents))this.contents.add(V)}addIn(V,A){if(J(this.contents))this.contents.addIn(V,A)}createAlias(V,A){if(!V.anchor){let M=G.anchorNames(this);V.anchor=!A||M.has(A)?G.findNewAnchor(A||"a",M):A}return new X.Alias(V.anchor)}createNode(V,A,M){let D=void 0;if(typeof A==="function")V=A.call({"":V},"",V),D=A;else if(Array.isArray(A)){let l=(Q0)=>typeof Q0==="number"||Q0 instanceof String||Q0 instanceof Number,U0=A.filter(l).map(String);if(U0.length>0)A=A.concat(U0);D=A}else if(M===void 0&&A)M=A,A=void 0;let{aliasDuplicateObjects:L,anchorPrefix:F,flow:j,keepUndefined:N,onTagObj:K,tag:E}=M??{},{onAnchor:T,setAnchors:P,sourceObjects:C}=G.createNodeAnchors(this,F||"a"),k={aliasDuplicateObjects:L??!0,keepUndefined:N??!1,onAnchor:T,onTagObj:K,replacer:D,schema:this.schema,sourceObjects:C},b=_.createNode(V,E,k);if(j&&W.isCollection(b))b.flow=!0;return P(),b}createPair(V,A,M={}){let D=this.createNode(V,null,M),L=this.createNode(A,null,M);return new Y.Pair(D,L)}delete(V){return J(this.contents)?this.contents.delete(V):!1}deleteIn(V){if(z.isEmptyPath(V)){if(this.contents==null)return!1;return this.contents=null,!0}return J(this.contents)?this.contents.deleteIn(V):!1}get(V,A){return W.isCollection(this.contents)?this.contents.get(V,A):void 0}getIn(V,A){if(z.isEmptyPath(V))return!A&&W.isScalar(this.contents)?this.contents.value:this.contents;return W.isCollection(this.contents)?this.contents.getIn(V,A):void 0}has(V){return W.isCollection(this.contents)?this.contents.has(V):!1}hasIn(V){if(z.isEmptyPath(V))return this.contents!==void 0;return W.isCollection(this.contents)?this.contents.hasIn(V):!1}set(V,A){if(this.contents==null)this.contents=z.collectionFromPath(this.schema,[V],A);else if(J(this.contents))this.contents.set(V,A)}setIn(V,A){if(z.isEmptyPath(V))this.contents=A;else if(this.contents==null)this.contents=z.collectionFromPath(this.schema,Array.from(V),A);else if(J(this.contents))this.contents.setIn(V,A)}setSchema(V,A={}){if(typeof V==="number")V=String(V);let M;switch(V){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new $.Directives({version:"1.1"});M={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=V;else this.directives=new $.Directives({version:V});M={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;M=null;break;default:{let D=JSON.stringify(V);throw Error(\`Expected '1.1', '1.2' or null as first argument, but found: \${D}\`)}}if(A.schema instanceof Object)this.schema=A.schema;else if(M)this.schema=new B.Schema(Object.assign(M,A));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:V,jsonArg:A,mapAsMap:M,maxAliasCount:D,onAnchor:L,reviver:F}={}){let j={anchors:new Map,doc:this,keep:!V,mapAsMap:M===!0,mapKeyWarned:!1,maxAliasCount:typeof D==="number"?D:100},N=q.toJS(this.contents,A??"",j);if(typeof L==="function")for(let{count:K,res:E}of j.anchors.values())L(E,K);return typeof F==="function"?H.applyReviver(F,{"":N},"",N):N}toJSON(V,A){return this.toJS({json:!0,jsonArg:V,mapAsMap:!1,onAnchor:A})}toString(V={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in V&&(!Number.isInteger(V.indent)||Number(V.indent)<=0)){let A=JSON.stringify(V.indent);throw Error(\`"indent" option must be a positive integer, not \${A}\`)}return U.stringifyDocument(this,V)}}function J(V){if(W.isCollection(V))return!0;throw Error("Expected a YAML collection as document contents")}Z.Document=Q}),z6=w((Z)=>{class X extends Error{constructor(q,B,U,G){super();this.name=q,this.code=U,this.message=G,this.pos=B}}class z extends X{constructor(q,B,U){super("YAMLParseError",q,B,U)}}class W extends X{constructor(q,B,U){super("YAMLWarning",q,B,U)}}var Y=(q,B)=>(U)=>{if(U.pos[0]===-1)return;U.linePos=U.pos.map((Q)=>B.linePos(Q));let{line:G,col:H}=U.linePos[0];U.message+=\` at line \${G}, column \${H}\`;let _=H-1,$=q.substring(B.lineStarts[G-1],B.lineStarts[G]).replace(/[\\n\\r]+$/,"");if(_>=60&&$.length>80){let Q=Math.min(_-39,$.length-79);$="…"+$.substring(Q),_-=Q-1}if($.length>80)$=$.substring(0,79)+"…";if(G>1&&/^ *$/.test($.substring(0,_))){let Q=q.substring(B.lineStarts[G-2],B.lineStarts[G-1]);if(Q.length>80)Q=Q.substring(0,79)+\`…
|
|
21050
|
+
\`;$=Q+$}if(/[^ ]/.test($)){let Q=1,J=U.linePos[1];if(J?.line===G&&J.col>H)Q=Math.max(1,Math.min(J.col-H,80-_));let V=" ".repeat(_)+"^".repeat(Q);U.message+=\`:
|
|
21051
21051
|
|
|
21052
21052
|
\${$}
|
|
21053
|
-
\${
|
|
21054
|
-
\`}};Z.YAMLError=X,Z.YAMLParseError=z,Z.YAMLWarning=W,Z.prettifyError=
|
|
21055
|
-
\`))return!0;if(z.end){for(let W of z.end)if(W.type==="newline")return!0}return!1;case"flow-collection":for(let W of z.items){for(let
|
|
21056
|
-
\`+T.comment;else M.comment=T.comment;continue}if(T.newlineAfterProp||
|
|
21057
|
-
\`+b.comment;else k.comment=b.comment;let l=new X.Pair(k);if($.options.keepSourceTokens)l.srcToken=F;M.items.push(l)}}if(L&&L<D)J(L,"IMPOSSIBLE","Map comment with trailing content");return M.range=[Q.offset,D,L??D],M}Z.resolveBlockMap=G}),
|
|
21058
|
-
\`+f.comment;else N.comment=f.comment;E=f.end;continue}if(!L&&
|
|
21059
|
-
\`+K0;else X0.comment=K0;f.comment=f.comment.substring(K0.length+1)}}}if(!L&&!l0&&!f.found){let K0=G0?Q(
|
|
21060
|
-
\`+j0.comment;else X0.comment=j0.comment;let
|
|
21061
|
-
\`+b.comment;else N.comment=b.comment;N.range=[A.offset,k,b.offset]}else N.range=[A.offset,k,k];return N}Z.resolveFlowCollection=$}),
|
|
21062
|
-
\`.repeat(Math.max(1,$.length-1)):"",N=G+H.length;if(B.source)N+=B.source.length;return{value:j,type:_,comment:H.comment,range:[G,N,N]}}let J=B.indent+H.indent,
|
|
21063
|
-
\`;for(let j=A;j<Q;++j){let[N,K]=$[j];
|
|
21053
|
+
\${V}
|
|
21054
|
+
\`}};Z.YAMLError=X,Z.YAMLParseError=z,Z.YAMLWarning=W,Z.prettifyError=Y}),$6=w((Z)=>{function X(z,{flow:W,indicator:Y,next:q,offset:B,onError:U,parentIndent:G,startOnNewline:H}){let _=!1,$=H,Q=H,J="",V="",A=!1,M=!1,D=null,L=null,F=null,j=null,N=null,K=null,E=null;for(let C of z){if(M){if(C.type!=="space"&&C.type!=="newline"&&C.type!=="comma")U(C.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");M=!1}if(D){if($&&C.type!=="comment"&&C.type!=="newline")U(D,"TAB_AS_INDENT","Tabs are not allowed as indentation");D=null}switch(C.type){case"space":if(!W&&(Y!=="doc-start"||q?.type!=="flow-collection")&&C.source.includes("\\t"))D=C;Q=!0;break;case"comment":{if(!Q)U(C,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let k=C.source.substring(1)||" ";if(!J)J=k;else J+=V+k;V="",$=!1;break}case"newline":if($){if(J)J+=C.source;else if(!K||Y!=="seq-item-ind")_=!0}else V+=C.source;if($=!0,A=!0,L||F)j=C;Q=!0;break;case"anchor":if(L)U(C,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(C.source.endsWith(":"))U(C.offset+C.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);L=C,E??(E=C.offset),$=!1,Q=!1,M=!0;break;case"tag":{if(F)U(C,"MULTIPLE_TAGS","A node can have at most one tag");F=C,E??(E=C.offset),$=!1,Q=!1,M=!0;break}case Y:if(L||F)U(C,"BAD_PROP_ORDER",\`Anchors and tags must be after the \${C.source} indicator\`);if(K)U(C,"UNEXPECTED_TOKEN",\`Unexpected \${C.source} in \${W??"collection"}\`);K=C,$=Y==="seq-item-ind"||Y==="explicit-key-ind",Q=!1;break;case"comma":if(W){if(N)U(C,"UNEXPECTED_TOKEN",\`Unexpected , in \${W}\`);N=C,$=!1,Q=!1;break}default:U(C,"UNEXPECTED_TOKEN",\`Unexpected \${C.type} token\`),$=!1,Q=!1}}let T=z[z.length-1],P=T?T.offset+T.source.length:B;if(M&&q&&q.type!=="space"&&q.type!=="newline"&&q.type!=="comma"&&(q.type!=="scalar"||q.source!==""))U(q.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(D&&($&&D.indent<=G||q?.type==="block-map"||q?.type==="block-seq"))U(D,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:N,found:K,spaceBefore:_,comment:J,hasNewline:A,anchor:L,tag:F,newlineAfterProp:j,end:P,start:E??P}}Z.resolveProps=X}),a6=w((Z)=>{function X(z){if(!z)return null;switch(z.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(z.source.includes(\`
|
|
21055
|
+
\`))return!0;if(z.end){for(let W of z.end)if(W.type==="newline")return!0}return!1;case"flow-collection":for(let W of z.items){for(let Y of W.start)if(Y.type==="newline")return!0;if(W.sep){for(let Y of W.sep)if(Y.type==="newline")return!0}if(X(W.key)||X(W.value))return!0}return!1;default:return!0}}Z.containsNewline=X}),J7=w((Z)=>{var X=a6();function z(W,Y,q){if(Y?.type==="flow-collection"){let B=Y.end[0];if(B.indent===W&&(B.source==="]"||B.source==="}")&&X.containsNewline(Y))q(B,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Z.flowIndentCheck=z}),Y7=w((Z)=>{var X=u();function z(W,Y,q){let{uniqueKeys:B}=W.options;if(B===!1)return!1;let U=typeof B==="function"?B:(G,H)=>G===H||X.isScalar(G)&&X.isScalar(H)&&G.value===H.value;return Y.some((G)=>U(G.key,q))}Z.mapIncludes=z}),g4=w((Z)=>{var X=b8(),z=f8(),W=$6(),Y=a6(),q=J7(),B=Y7(),U="All mapping items must start at the same column";function G({composeNode:H,composeEmptyNode:_},$,Q,J,V){let M=new(V?.nodeClass??z.YAMLMap)($.schema);if($.atRoot)$.atRoot=!1;let D=Q.offset,L=null;for(let F of Q.items){let{start:j,key:N,sep:K,value:E}=F,T=W.resolveProps(j,{indicator:"explicit-key-ind",next:N??K?.[0],offset:D,onError:J,parentIndent:Q.indent,startOnNewline:!0}),P=!T.found;if(P){if(N){if(N.type==="block-seq")J(D,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in N&&N.indent!==Q.indent)J(D,"BAD_INDENT",U)}if(!T.anchor&&!T.tag&&!K){if(L=T.end,T.comment)if(M.comment)M.comment+=\`
|
|
21056
|
+
\`+T.comment;else M.comment=T.comment;continue}if(T.newlineAfterProp||Y.containsNewline(N))J(N??j[j.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(T.found?.indent!==Q.indent)J(D,"BAD_INDENT",U);$.atKey=!0;let C=T.end,k=N?H($,N,T,J):_($,C,j,null,T,J);if($.schema.compat)q.flowIndentCheck(Q.indent,N,J);if($.atKey=!1,B.mapIncludes($,M.items,k))J(C,"DUPLICATE_KEY","Map keys must be unique");let b=W.resolveProps(K??[],{indicator:"map-value-ind",next:E,offset:k.range[2],onError:J,parentIndent:Q.indent,startOnNewline:!N||N.type==="block-scalar"});if(D=b.end,b.found){if(P){if(E?.type==="block-map"&&!b.hasNewline)J(D,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if($.options.strict&&T.start<b.found.offset-1024)J(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let l=E?H($,E,b,J):_($,D,K,null,b,J);if($.schema.compat)q.flowIndentCheck(Q.indent,E,J);D=l.range[2];let U0=new X.Pair(k,l);if($.options.keepSourceTokens)U0.srcToken=F;M.items.push(U0)}else{if(P)J(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(b.comment)if(k.comment)k.comment+=\`
|
|
21057
|
+
\`+b.comment;else k.comment=b.comment;let l=new X.Pair(k);if($.options.keepSourceTokens)l.srcToken=F;M.items.push(l)}}if(L&&L<D)J(L,"IMPOSSIBLE","Map comment with trailing content");return M.range=[Q.offset,D,L??D],M}Z.resolveBlockMap=G}),h4=w((Z)=>{var X=x8(),z=$6(),W=J7();function Y({composeNode:q,composeEmptyNode:B},U,G,H,_){let Q=new(_?.nodeClass??X.YAMLSeq)(U.schema);if(U.atRoot)U.atRoot=!1;if(U.atKey)U.atKey=!1;let J=G.offset,V=null;for(let{start:A,value:M}of G.items){let D=z.resolveProps(A,{indicator:"seq-item-ind",next:M,offset:J,onError:H,parentIndent:G.indent,startOnNewline:!0});if(!D.found)if(D.anchor||D.tag||M)if(M?.type==="block-seq")H(D.end,"BAD_INDENT","All sequence items must start at the same column");else H(J,"MISSING_CHAR","Sequence item without - indicator");else{if(V=D.end,D.comment)Q.comment=D.comment;continue}let L=M?q(U,M,D,H):B(U,D.end,A,null,D,H);if(U.schema.compat)W.flowIndentCheck(G.indent,M,H);J=L.range[2],Q.items.push(L)}return Q.range=[G.offset,J,V??J],Q}Z.resolveBlockSeq=Y}),FZ=w((Z)=>{function X(z,W,Y,q){let B="";if(z){let U=!1,G="";for(let H of z){let{source:_,type:$}=H;switch($){case"space":U=!0;break;case"comment":{if(Y&&!U)q(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let Q=_.substring(1)||" ";if(!B)B=Q;else B+=G+Q;G="";break}case"newline":if(B)G+=_;U=!0;break;default:q(H,"UNEXPECTED_TOKEN",\`Unexpected \${$} at node end\`)}W+=_.length}}return{comment:B,offset:W}}Z.resolveEnd=X}),v4=w((Z)=>{var X=u(),z=b8(),W=f8(),Y=x8(),q=FZ(),B=$6(),U=a6(),G=Y7(),H="Block collections are not allowed within flow collections",_=(Q)=>Q&&(Q.type==="block-map"||Q.type==="block-seq");function $({composeNode:Q,composeEmptyNode:J},V,A,M,D){let L=A.start.source==="{",F=L?"flow map":"flow sequence",N=new(D?.nodeClass??(L?W.YAMLMap:Y.YAMLSeq))(V.schema);N.flow=!0;let K=V.atRoot;if(K)V.atRoot=!1;if(V.atKey)V.atKey=!1;let E=A.offset+A.start.source.length;for(let b=0;b<A.items.length;++b){let l=A.items[b],{start:U0,key:Q0,sep:l0,value:G0}=l,f=B.resolveProps(U0,{flow:F,indicator:"explicit-key-ind",next:Q0??l0?.[0],offset:E,onError:M,parentIndent:A.indent,startOnNewline:!1});if(!f.found){if(!f.anchor&&!f.tag&&!l0&&!G0){if(b===0&&f.comma)M(f.comma,"UNEXPECTED_TOKEN",\`Unexpected , in \${F}\`);else if(b<A.items.length-1)M(f.start,"UNEXPECTED_TOKEN",\`Unexpected empty item in \${F}\`);if(f.comment)if(N.comment)N.comment+=\`
|
|
21058
|
+
\`+f.comment;else N.comment=f.comment;E=f.end;continue}if(!L&&V.options.strict&&U.containsNewline(Q0))M(Q0,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(b===0){if(f.comma)M(f.comma,"UNEXPECTED_TOKEN",\`Unexpected , in \${F}\`)}else{if(!f.comma)M(f.start,"MISSING_CHAR",\`Missing , between \${F} items\`);if(f.comment){let K0="";Z:for(let X0 of U0)switch(X0.type){case"comma":case"space":break;case"comment":K0=X0.source.substring(1);break Z;default:break Z}if(K0){let X0=N.items[N.items.length-1];if(X.isPair(X0))X0=X0.value??X0.key;if(X0.comment)X0.comment+=\`
|
|
21059
|
+
\`+K0;else X0.comment=K0;f.comment=f.comment.substring(K0.length+1)}}}if(!L&&!l0&&!f.found){let K0=G0?Q(V,G0,f,M):J(V,f.end,l0,null,f,M);if(N.items.push(K0),E=K0.range[2],_(G0))M(K0.range,"BLOCK_IN_FLOW",H)}else{V.atKey=!0;let K0=f.end,X0=Q0?Q(V,Q0,f,M):J(V,K0,U0,null,f,M);if(_(Q0))M(X0.range,"BLOCK_IN_FLOW",H);V.atKey=!1;let j0=B.resolveProps(l0??[],{flow:F,indicator:"map-value-ind",next:G0,offset:X0.range[2],onError:M,parentIndent:A.indent,startOnNewline:!1});if(j0.found){if(!L&&!f.found&&V.options.strict){if(l0)for(let i0 of l0){if(i0===j0.found)break;if(i0.type==="newline"){M(i0,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(f.start<j0.found.offset-1024)M(j0.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(G0)if("source"in G0&&G0.source?.[0]===":")M(G0,"MISSING_CHAR",\`Missing space after : in \${F}\`);else M(j0.start,"MISSING_CHAR",\`Missing , or : between \${F} items\`);let l8=G0?Q(V,G0,j0,M):j0.found?J(V,j0.end,l0,null,j0,M):null;if(l8){if(_(G0))M(l8.range,"BLOCK_IN_FLOW",H)}else if(j0.comment)if(X0.comment)X0.comment+=\`
|
|
21060
|
+
\`+j0.comment;else X0.comment=j0.comment;let g6=new z.Pair(X0,l8);if(V.options.keepSourceTokens)g6.srcToken=l;if(L){let i0=N;if(G.mapIncludes(V,i0.items,X0))M(K0,"DUPLICATE_KEY","Map keys must be unique");i0.items.push(g6)}else{let i0=new W.YAMLMap(V.schema);i0.flow=!0,i0.items.push(g6);let f5=(l8??X0).range;i0.range=[X0.range[0],f5[1],f5[2]],N.items.push(i0)}E=l8?l8.range[2]:j0.end}}let T=L?"}":"]",[P,...C]=A.end,k=E;if(P?.source===T)k=P.offset+P.source.length;else{let b=F[0].toUpperCase()+F.substring(1),l=K?\`\${b} must end with a \${T}\`:\`\${b} in block collection must be sufficiently indented and end with a \${T}\`;if(M(E,K?"MISSING_CHAR":"BAD_INDENT",l),P&&P.source.length!==1)C.unshift(P)}if(C.length>0){let b=q.resolveEnd(C,k,V.options.strict,M);if(b.comment)if(N.comment)N.comment+=\`
|
|
21061
|
+
\`+b.comment;else N.comment=b.comment;N.range=[A.offset,k,b.offset]}else N.range=[A.offset,k,k];return N}Z.resolveFlowCollection=$}),y4=w((Z)=>{var X=u(),z=q0(),W=f8(),Y=x8(),q=g4(),B=h4(),U=v4();function G(_,$,Q,J,V,A){let M=Q.type==="block-map"?q.resolveBlockMap(_,$,Q,J,A):Q.type==="block-seq"?B.resolveBlockSeq(_,$,Q,J,A):U.resolveFlowCollection(_,$,Q,J,A),D=M.constructor;if(V==="!"||V===D.tagName)return M.tag=D.tagName,M;if(V)M.tag=V;return M}function H(_,$,Q,J,V){let A=J.tag,M=!A?null:$.directives.tagName(A.source,(K)=>V(A,"TAG_RESOLVE_FAILED",K));if(Q.type==="block-seq"){let{anchor:K,newlineAfterProp:E}=J,T=K&&A?K.offset>A.offset?K:A:K??A;if(T&&(!E||E.offset<T.offset))V(T,"MISSING_CHAR","Missing newline after block sequence props")}let D=Q.type==="block-map"?"map":Q.type==="block-seq"?"seq":Q.start.source==="{"?"map":"seq";if(!A||!M||M==="!"||M===W.YAMLMap.tagName&&D==="map"||M===Y.YAMLSeq.tagName&&D==="seq")return G(_,$,Q,V,M);let L=$.schema.tags.find((K)=>K.tag===M&&K.collection===D);if(!L){let K=$.schema.knownTags[M];if(K?.collection===D)$.schema.tags.push(Object.assign({},K,{default:!1})),L=K;else{if(K)V(A,"BAD_COLLECTION_TYPE",\`\${K.tag} used for \${D} collection, but expects \${K.collection??"scalar"}\`,!0);else V(A,"TAG_RESOLVE_FAILED",\`Unresolved tag: \${M}\`,!0);return G(_,$,Q,V,M)}}let F=G(_,$,Q,V,M,L),j=L.resolve?.(F,(K)=>V(A,"TAG_RESOLVE_FAILED",K),$.options)??F,N=X.isNode(j)?j:new z.Scalar(j);if(N.range=F.range,N.tag=M,L?.format)N.format=L.format;return N}Z.composeCollection=H}),V7=w((Z)=>{var X=q0();function z(q,B,U){let G=B.offset,H=W(B,q.options.strict,U);if(!H)return{value:"",type:null,comment:"",range:[G,G,G]};let _=H.mode===">"?X.Scalar.BLOCK_FOLDED:X.Scalar.BLOCK_LITERAL,$=B.source?Y(B.source):[],Q=$.length;for(let j=$.length-1;j>=0;--j){let N=$[j][1];if(N===""||N==="\\r")Q=j;else break}if(Q===0){let j=H.chomp==="+"&&$.length>0?\`
|
|
21062
|
+
\`.repeat(Math.max(1,$.length-1)):"",N=G+H.length;if(B.source)N+=B.source.length;return{value:j,type:_,comment:H.comment,range:[G,N,N]}}let J=B.indent+H.indent,V=B.offset+H.length,A=0;for(let j=0;j<Q;++j){let[N,K]=$[j];if(K===""||K==="\\r"){if(H.indent===0&&N.length>J)J=N.length}else{if(N.length<J)U(V+N.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(H.indent===0)J=N.length;if(A=j,J===0&&!q.atRoot)U(V,"BAD_INDENT","Block scalar values in collections must be indented");break}V+=N.length+K.length+1}for(let j=$.length-1;j>=Q;--j)if($[j][0].length>J)Q=j+1;let M="",D="",L=!1;for(let j=0;j<A;++j)M+=$[j][0].slice(J)+\`
|
|
21063
|
+
\`;for(let j=A;j<Q;++j){let[N,K]=$[j];V+=N.length+K.length+1;let E=K[K.length-1]==="\\r";if(E)K=K.slice(0,-1);if(K&&N.length<J){let P=\`Block scalar lines must not be less indented than their \${H.indent?"explicit indentation indicator":"first line"}\`;U(V-K.length-(E?2:1),"BAD_INDENT",P),N=""}if(_===X.Scalar.BLOCK_LITERAL)M+=D+N.slice(J)+K,D=\`
|
|
21064
21064
|
\`;else if(N.length>J||K[0]==="\\t"){if(D===" ")D=\`
|
|
21065
21065
|
\`;else if(!L&&D===\`
|
|
21066
21066
|
\`)D=\`
|
|
@@ -21073,67 +21073,67 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21073
21073
|
\`+$[j][0].slice(J);if(M[M.length-1]!==\`
|
|
21074
21074
|
\`)M+=\`
|
|
21075
21075
|
\`;break;default:M+=\`
|
|
21076
|
-
\`}let F=G+H.length+B.source.length;return{value:M,type:_,comment:H.comment,range:[G,F,F]}}function W({offset:q,props:B},U,G){if(B[0].type!=="block-scalar-header")return G(B[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:H}=B[0],_=H[0],$=0,Q="",J=-1;for(let D=1;D<H.length;++D){let L=H[D];if(!Q&&(L==="-"||L==="+"))Q=L;else{let F=Number(L);if(!$&&F)$=F;else if(J===-1)J=q+D}}if(J!==-1)G(J,"UNEXPECTED_TOKEN",\`Block scalar header includes extra characters: \${H}\`);let
|
|
21076
|
+
\`}let F=G+H.length+B.source.length;return{value:M,type:_,comment:H.comment,range:[G,F,F]}}function W({offset:q,props:B},U,G){if(B[0].type!=="block-scalar-header")return G(B[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:H}=B[0],_=H[0],$=0,Q="",J=-1;for(let D=1;D<H.length;++D){let L=H[D];if(!Q&&(L==="-"||L==="+"))Q=L;else{let F=Number(L);if(!$&&F)$=F;else if(J===-1)J=q+D}}if(J!==-1)G(J,"UNEXPECTED_TOKEN",\`Block scalar header includes extra characters: \${H}\`);let V=!1,A="",M=H.length;for(let D=1;D<B.length;++D){let L=B[D];switch(L.type){case"space":V=!0;case"newline":M+=L.source.length;break;case"comment":if(U&&!V)G(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");M+=L.source.length,A=L.source.substring(1);break;case"error":G(L,"UNEXPECTED_TOKEN",L.message),M+=L.source.length;break;default:{let F=\`Unexpected token in block scalar header: \${L.type}\`;G(L,"UNEXPECTED_TOKEN",F);let j=L.source;if(j&&typeof j==="string")M+=j.length}}}return{mode:_,indent:$,chomp:Q,comment:A,length:M}}function Y(q){let B=q.split(/\\n( *)/),U=B[0],G=U.match(/^( *)/),_=[G?.[1]?[G[1],U.slice(G[1].length)]:["",U]];for(let $=1;$<B.length;$+=2)_.push([B[$],B[$+1]]);return _}Z.resolveBlockScalar=z}),_7=w((Z)=>{var X=q0(),z=FZ();function W($,Q,J){let{offset:V,type:A,source:M,end:D}=$,L,F,j=(E,T,P)=>J(V+E,T,P);switch(A){case"scalar":L=X.Scalar.PLAIN,F=Y(M,j);break;case"single-quoted-scalar":L=X.Scalar.QUOTE_SINGLE,F=q(M,j);break;case"double-quoted-scalar":L=X.Scalar.QUOTE_DOUBLE,F=U(M,j);break;default:return J($,"UNEXPECTED_TOKEN",\`Expected a flow scalar value, but found: \${A}\`),{value:"",type:null,comment:"",range:[V,V+M.length,V+M.length]}}let N=V+M.length,K=z.resolveEnd(D,N,Q,J);return{value:F,type:L,comment:K.comment,range:[V,N,K.offset]}}function Y($,Q){let J="";switch($[0]){case"\\t":J="a tab character";break;case",":J="flow indicator character ,";break;case"%":J="directive indicator character %";break;case"|":case">":{J=\`block scalar indicator \${$[0]}\`;break}case"@":case"\`":{J=\`reserved character \${$[0]}\`;break}}if(J)Q(0,"BAD_SCALAR_START",\`Plain value cannot start with \${J}\`);return B($)}function q($,Q){if($[$.length-1]!=="'"||$.length===1)Q($.length,"MISSING_CHAR","Missing closing 'quote");return B($.slice(1,-1)).replace(/''/g,"'")}function B($){let Q,J;try{Q=new RegExp(\`(.*?)(?<![ ])[ ]*\\r?
|
|
21077
21077
|
\`,"sy"),J=new RegExp(\`[ ]*(.*?)(?:(?<![ ])[ ]*)?\\r?
|
|
21078
|
-
\`,"sy")}catch{Q=/(.*?)[ \\t]*\\r?\\n/sy,J=/[ \\t]*(.*?)[ \\t]*\\r?\\n/sy}let
|
|
21078
|
+
\`,"sy")}catch{Q=/(.*?)[ \\t]*\\r?\\n/sy,J=/[ \\t]*(.*?)[ \\t]*\\r?\\n/sy}let V=Q.exec($);if(!V)return $;let A=V[1],M=" ",D=Q.lastIndex;J.lastIndex=D;while(V=J.exec($)){if(V[1]==="")if(M===\`
|
|
21079
21079
|
\`)A+=M;else M=\`
|
|
21080
|
-
\`;else A+=M+
|
|
21080
|
+
\`;else A+=M+V[1],M=" ";D=J.lastIndex}let L=/[ \\t]*(.*)/sy;return L.lastIndex=D,V=L.exec($),A+M+(V?.[1]??"")}function U($,Q){let J="";for(let V=1;V<$.length-1;++V){let A=$[V];if(A==="\\r"&&$[V+1]===\`
|
|
21081
21081
|
\`)continue;if(A===\`
|
|
21082
|
-
\`){let{fold:M,offset:D}=G($,
|
|
21083
|
-
\`){M=$[
|
|
21084
|
-
\`){M=$[++
|
|
21085
|
-
\`&&!(D==="\\r"&&$[
|
|
21086
|
-
\`))J+=
|
|
21087
|
-
\`||
|
|
21088
|
-
\`)break;if(
|
|
21082
|
+
\`){let{fold:M,offset:D}=G($,V);J+=M,V=D}else if(A==="\\\\"){let M=$[++V],D=H[M];if(D)J+=D;else if(M===\`
|
|
21083
|
+
\`){M=$[V+1];while(M===" "||M==="\\t")M=$[++V+1]}else if(M==="\\r"&&$[V+1]===\`
|
|
21084
|
+
\`){M=$[++V+1];while(M===" "||M==="\\t")M=$[++V+1]}else if(M==="x"||M==="u"||M==="U"){let L={x:2,u:4,U:8}[M];J+=_($,V+1,L,Q),V+=L}else{let L=$.substr(V-1,2);Q(V-1,"BAD_DQ_ESCAPE",\`Invalid escape sequence \${L}\`),J+=L}}else if(A===" "||A==="\\t"){let M=V,D=$[V+1];while(D===" "||D==="\\t")D=$[++V+1];if(D!==\`
|
|
21085
|
+
\`&&!(D==="\\r"&&$[V+2]===\`
|
|
21086
|
+
\`))J+=V>M?$.slice(M,V+1):A}else J+=A}if($[$.length-1]!=='"'||$.length===1)Q($.length,"MISSING_CHAR",'Missing closing "quote');return J}function G($,Q){let J="",V=$[Q+1];while(V===" "||V==="\\t"||V===\`
|
|
21087
|
+
\`||V==="\\r"){if(V==="\\r"&&$[Q+2]!==\`
|
|
21088
|
+
\`)break;if(V===\`
|
|
21089
21089
|
\`)J+=\`
|
|
21090
|
-
\`;Q+=1,
|
|
21091
|
-
\`,r:"\\r",t:"\\t",v:"\\v",N:"
",_:" ",L:"\\u2028",P:"\\u2029"," ":" ",'"':'"',"/":"/","\\\\":"\\\\","\\t":"\\t"};function _($,Q,J,
|
|
21090
|
+
\`;Q+=1,V=$[Q+1]}if(!J)J=" ";return{fold:J,offset:Q}}var H={"0":"\\x00",a:"\\x07",b:"\\b",e:"\\x1B",f:"\\f",n:\`
|
|
21091
|
+
\`,r:"\\r",t:"\\t",v:"\\v",N:"
",_:" ",L:"\\u2028",P:"\\u2029"," ":" ",'"':'"',"/":"/","\\\\":"\\\\","\\t":"\\t"};function _($,Q,J,V){let A=$.substr(Q,J),D=A.length===J&&/^[0-9a-fA-F]+$/.test(A)?parseInt(A,16):NaN;if(isNaN(D)){let L=$.substr(Q-2,J+2);return V(Q-2,"BAD_DQ_ESCAPE",\`Invalid escape sequence \${L}\`),L}return String.fromCodePoint(D)}Z.resolveFlowScalar=W}),m4=w((Z)=>{var X=u(),z=q0(),W=V7(),Y=_7();function q(G,H,_,$){let{value:Q,type:J,comment:V,range:A}=H.type==="block-scalar"?W.resolveBlockScalar(G,H,$):Y.resolveFlowScalar(H,G.options.strict,$),M=_?G.directives.tagName(_.source,(F)=>$(_,"TAG_RESOLVE_FAILED",F)):null,D;if(G.options.stringKeys&&G.atKey)D=G.schema[X.SCALAR];else if(M)D=B(G.schema,Q,M,_,$);else if(H.type==="scalar")D=U(G,Q,H,$);else D=G.schema[X.SCALAR];let L;try{let F=D.resolve(Q,(j)=>$(_??H,"TAG_RESOLVE_FAILED",j),G.options);L=X.isScalar(F)?F:new z.Scalar(F)}catch(F){let j=F instanceof Error?F.message:String(F);$(_??H,"TAG_RESOLVE_FAILED",j),L=new z.Scalar(Q)}if(L.range=A,L.source=Q,J)L.type=J;if(M)L.tag=M;if(D.format)L.format=D.format;if(V)L.comment=V;return L}function B(G,H,_,$,Q){if(_==="!")return G[X.SCALAR];let J=[];for(let A of G.tags)if(!A.collection&&A.tag===_)if(A.default&&A.test)J.push(A);else return A;for(let A of J)if(A.test?.test(H))return A;let V=G.knownTags[_];if(V&&!V.collection)return G.tags.push(Object.assign({},V,{default:!1,test:void 0})),V;return Q($,"TAG_RESOLVE_FAILED",\`Unresolved tag: \${_}\`,_!=="tag:yaml.org,2002:str"),G[X.SCALAR]}function U({atKey:G,directives:H,schema:_},$,Q,J){let V=_.tags.find((A)=>(A.default===!0||G&&A.default==="key")&&A.test?.test($))||_[X.SCALAR];if(_.compat){let A=_.compat.find((M)=>M.default&&M.test?.test($))??_[X.SCALAR];if(V.tag!==A.tag){let M=H.tagString(V.tag),D=H.tagString(A.tag),L=\`Value may be parsed as either \${M} or \${D}\`;J(Q,"TAG_RESOLVE_FAILED",L,!0)}}return V}Z.composeScalar=q}),u4=w((Z)=>{function X(z,W,Y){if(W){Y??(Y=W.length);for(let q=Y-1;q>=0;--q){let B=W[q];switch(B.type){case"space":case"comment":case"newline":z-=B.source.length;continue}B=W[++q];while(B?.type==="space")z+=B.source.length,B=W[++q];break}}return z}Z.emptyScalarPosition=X}),d4=w((Z)=>{var X=sZ(),z=u(),W=y4(),Y=m4(),q=FZ(),B=u4(),U={composeNode:G,composeEmptyNode:H};function G($,Q,J,V){let A=$.atKey,{spaceBefore:M,comment:D,anchor:L,tag:F}=J,j,N=!0;switch(Q.type){case"alias":if(j=_($,Q,V),L||F)V(Q,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(j=Y.composeScalar($,Q,F,V),L)j.anchor=L.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(j=W.composeCollection(U,$,Q,J,V),L)j.anchor=L.source.substring(1)}catch(K){let E=K instanceof Error?K.message:String(K);V(Q,"RESOURCE_EXHAUSTION",E)}break;default:{let K=Q.type==="error"?Q.message:\`Unsupported token (type: \${Q.type})\`;V(Q,"UNEXPECTED_TOKEN",K),N=!1}}if(j??(j=H($,Q.offset,void 0,null,J,V)),L&&j.anchor==="")V(L,"BAD_ALIAS","Anchor cannot be an empty string");if(A&&$.options.stringKeys&&(!z.isScalar(j)||typeof j.value!=="string"||j.tag&&j.tag!=="tag:yaml.org,2002:str"))V(F??Q,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(M)j.spaceBefore=!0;if(D)if(Q.type==="scalar"&&Q.source==="")j.comment=D;else j.commentBefore=D;if($.options.keepSourceTokens&&N)j.srcToken=Q;return j}function H($,Q,J,V,{spaceBefore:A,comment:M,anchor:D,tag:L,end:F},j){let N={type:"scalar",offset:B.emptyScalarPosition(Q,J,V),indent:-1,source:""},K=Y.composeScalar($,N,L,j);if(D){if(K.anchor=D.source.substring(1),K.anchor==="")j(D,"BAD_ALIAS","Anchor cannot be an empty string")}if(A)K.spaceBefore=!0;if(M)K.comment=M,K.range[2]=F;return K}function _({options:$},{offset:Q,source:J,end:V},A){let M=new X.Alias(J.substring(1));if(M.source==="")A(Q,"BAD_ALIAS","Alias cannot be an empty string");if(M.source.endsWith(":"))A(Q+J.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let D=Q+J.length,L=q.resolveEnd(V,D,$.strict,A);if(M.range=[Q,D,L.offset],L.comment)M.comment=L.comment;return M}Z.composeEmptyNode=H,Z.composeNode=G}),c4=w((Z)=>{var X=X6(),z=d4(),W=FZ(),Y=$6();function q(B,U,{offset:G,start:H,value:_,end:$},Q){let J=Object.assign({_directives:U},B),V=new X.Document(void 0,J),A={atKey:!1,atRoot:!0,directives:V.directives,options:V.options,schema:V.schema},M=Y.resolveProps(H,{indicator:"doc-start",next:_??$?.[0],offset:G,onError:Q,parentIndent:0,startOnNewline:!0});if(M.found){if(V.directives.docStart=!0,_&&(_.type==="block-map"||_.type==="block-seq")&&!M.hasNewline)Q(M.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}V.contents=_?z.composeNode(A,_,M,Q):z.composeEmptyNode(A,M.end,H,null,M,Q);let D=V.contents.range[2],L=W.resolveEnd($,D,!1,Q);if(L.comment)V.comment=L.comment;return V.range=[G,D,L.offset],V}Z.composeDoc=q}),B7=w((Z)=>{var X=nZ("process"),z=o5(),W=X6(),Y=z6(),q=u(),B=c4(),U=FZ();function G($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:Q,source:J}=$;return[Q,Q+(typeof J==="string"?J.length:1)]}function H($){let Q="",J=!1,V=!1;for(let A=0;A<$.length;++A){let M=$[A];switch(M[0]){case"#":Q+=(Q===""?"":V?\`
|
|
21092
21092
|
|
|
21093
21093
|
\`:\`
|
|
21094
|
-
\`)+(M.substring(1)||" "),J=!0,
|
|
21095
|
-
\${J}\`:J;else if(
|
|
21094
|
+
\`)+(M.substring(1)||" "),J=!0,V=!1;break;case"%":if($[A+1]?.[0]!=="#")A+=1;J=!1;break;default:if(!J)V=!0;J=!1}}return{comment:Q,afterEmptyLine:V}}class _{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(Q,J,V,A)=>{let M=G(Q);if(A)this.warnings.push(new Y.YAMLWarning(M,J,V));else this.errors.push(new Y.YAMLParseError(M,J,V))},this.directives=new z.Directives({version:$.version||"1.2"}),this.options=$}decorate($,Q){let{comment:J,afterEmptyLine:V}=H(this.prelude);if(J){let A=$.contents;if(Q)$.comment=$.comment?\`\${$.comment}
|
|
21095
|
+
\${J}\`:J;else if(V||$.directives.docStart||!A)$.commentBefore=J;else if(q.isCollection(A)&&!A.flow&&A.items.length>0){let M=A.items[0];if(q.isPair(M))M=M.key;let D=M.commentBefore;M.commentBefore=D?\`\${J}
|
|
21096
21096
|
\${D}\`:J}else{let M=A.commentBefore;A.commentBefore=M?\`\${J}
|
|
21097
|
-
\${M}\`:J}}if(Q)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:H(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,Q=!1,J=-1){for(let
|
|
21098
|
-
\${Q.comment}\`:Q.comment}this.doc.range[2]=Q.offset;break}default:this.errors.push(new
|
|
21097
|
+
\${M}\`:J}}if(Q)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:H(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,Q=!1,J=-1){for(let V of $)yield*this.next(V);yield*this.end(Q,J)}*next($){if(X.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(Q,J,V)=>{let A=G($);A[0]+=Q,this.onError(A,"BAD_DIRECTIVE",J,V)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let Q=B.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!Q.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(Q,!1),this.doc)yield this.doc;this.doc=Q,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let Q=$.source?\`\${$.message}: \${JSON.stringify($.source)}\`:$.message,J=new Y.YAMLParseError(G($),"UNEXPECTED_TOKEN",Q);if(this.atDirectives||!this.doc)this.errors.push(J);else this.doc.errors.push(J);break}case"doc-end":{if(!this.doc){this.errors.push(new Y.YAMLParseError(G($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let Q=U.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),Q.comment){let J=this.doc.comment;this.doc.comment=J?\`\${J}
|
|
21098
|
+
\${Q.comment}\`:Q.comment}this.doc.range[2]=Q.offset;break}default:this.errors.push(new Y.YAMLParseError(G($),"UNEXPECTED_TOKEN",\`Unsupported token \${$.type}\`))}}*end($=!1,Q=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let J=Object.assign({_directives:this.directives},this.options),V=new W.Document(void 0,J);if(this.atDirectives)this.onError(Q,"MISSING_CHAR","Missing directives-end indicator line");V.range=[0,Q,Q],this.decorate(V,!1),yield V}}}Z.Composer=_}),p4=w((Z)=>{var X=V7(),z=_7(),W=z6(),Y=tZ();function q($,Q=!0,J){if($){let V=(A,M,D)=>{let L=typeof A==="number"?A:Array.isArray(A)?A[0]:A.offset;if(J)J(L,M,D);else throw new W.YAMLParseError([L,L+1],M,D)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return z.resolveFlowScalar($,Q,V);case"block-scalar":return X.resolveBlockScalar({options:{strict:Q}},$,V)}}return null}function B($,Q){let{implicitKey:J=!1,indent:V,inFlow:A=!1,offset:M=-1,type:D="PLAIN"}=Q,L=Y.stringifyString({type:D,value:$},{implicitKey:J,indent:V>0?" ".repeat(V):"",inFlow:A,options:{blockQuote:!0,lineWidth:-1}}),F=Q.end??[{type:"newline",offset:-1,indent:V,source:\`
|
|
21099
21099
|
\`}];switch(L[0]){case"|":case">":{let j=L.indexOf(\`
|
|
21100
21100
|
\`),N=L.substring(0,j),K=L.substring(j+1)+\`
|
|
21101
|
-
\`,E=[{type:"block-scalar-header",offset:M,indent:
|
|
21102
|
-
\`});return{type:"block-scalar",offset:M,indent:
|
|
21103
|
-
\`),
|
|
21104
|
-
\`;if($.type==="block-scalar"){let M=$.props[0];if(M.type!=="block-scalar-header")throw Error("Invalid block scalar header");M.source=
|
|
21105
|
-
\`});for(let F of Object.keys($))if(F!=="type"&&F!=="offset")delete $[F];Object.assign($,{type:"block-scalar",indent:D,props:L,source:A})}}function H($,Q){if(Q)for(let J of Q)switch(J.type){case"space":case"comment":$.push(J);break;case"newline":return $.push(J),!0}return!1}function _($,Q,J){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=J,$.source=Q;break;case"block-scalar":{let
|
|
21106
|
-
\`};delete $.items,Object.assign($,{type:J,source:Q,end:[A]});break}default:{let
|
|
21101
|
+
\`,E=[{type:"block-scalar-header",offset:M,indent:V,source:N}];if(!H(E,F))E.push({type:"newline",offset:-1,indent:V,source:\`
|
|
21102
|
+
\`});return{type:"block-scalar",offset:M,indent:V,props:E,source:K}}case'"':return{type:"double-quoted-scalar",offset:M,indent:V,source:L,end:F};case"'":return{type:"single-quoted-scalar",offset:M,indent:V,source:L,end:F};default:return{type:"scalar",offset:M,indent:V,source:L,end:F}}}function U($,Q,J={}){let{afterKey:V=!1,implicitKey:A=!1,inFlow:M=!1,type:D}=J,L="indent"in $?$.indent:null;if(V&&typeof L==="number")L+=2;if(!D)switch($.type){case"single-quoted-scalar":D="QUOTE_SINGLE";break;case"double-quoted-scalar":D="QUOTE_DOUBLE";break;case"block-scalar":{let j=$.props[0];if(j.type!=="block-scalar-header")throw Error("Invalid block scalar header");D=j.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:D="PLAIN"}let F=Y.stringifyString({type:D,value:Q},{implicitKey:A||L===null,indent:L!==null&&L>0?" ".repeat(L):"",inFlow:M,options:{blockQuote:!0,lineWidth:-1}});switch(F[0]){case"|":case">":G($,F);break;case'"':_($,F,"double-quoted-scalar");break;case"'":_($,F,"single-quoted-scalar");break;default:_($,F,"scalar")}}function G($,Q){let J=Q.indexOf(\`
|
|
21103
|
+
\`),V=Q.substring(0,J),A=Q.substring(J+1)+\`
|
|
21104
|
+
\`;if($.type==="block-scalar"){let M=$.props[0];if(M.type!=="block-scalar-header")throw Error("Invalid block scalar header");M.source=V,$.source=A}else{let{offset:M}=$,D="indent"in $?$.indent:-1,L=[{type:"block-scalar-header",offset:M,indent:D,source:V}];if(!H(L,"end"in $?$.end:void 0))L.push({type:"newline",offset:-1,indent:D,source:\`
|
|
21105
|
+
\`});for(let F of Object.keys($))if(F!=="type"&&F!=="offset")delete $[F];Object.assign($,{type:"block-scalar",indent:D,props:L,source:A})}}function H($,Q){if(Q)for(let J of Q)switch(J.type){case"space":case"comment":$.push(J);break;case"newline":return $.push(J),!0}return!1}function _($,Q,J){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=J,$.source=Q;break;case"block-scalar":{let V=$.props.slice(1),A=Q.length;if($.props[0].type==="block-scalar-header")A-=$.props[0].source.length;for(let M of V)M.offset+=A;delete $.props,Object.assign($,{type:J,source:Q,end:V});break}case"block-map":case"block-seq":{let A={type:"newline",offset:$.offset+Q.length,indent:$.indent,source:\`
|
|
21106
|
+
\`};delete $.items,Object.assign($,{type:J,source:Q,end:[A]});break}default:{let V="indent"in $?$.indent:-1,A="end"in $&&Array.isArray($.end)?$.end.filter((M)=>M.type==="space"||M.type==="comment"||M.type==="newline"):[];for(let M of Object.keys($))if(M!=="type"&&M!=="offset")delete $[M];Object.assign($,{type:J,indent:V,source:Q,end:A})}}}Z.createScalarToken=B,Z.resolveAsScalar=q,Z.setScalarValue=U}),l4=w((Z)=>{var X=(Y)=>("type"in Y)?z(Y):W(Y);function z(Y){switch(Y.type){case"block-scalar":{let q="";for(let B of Y.props)q+=z(B);return q+Y.source}case"block-map":case"block-seq":{let q="";for(let B of Y.items)q+=W(B);return q}case"flow-collection":{let q=Y.start.source;for(let B of Y.items)q+=W(B);for(let B of Y.end)q+=B.source;return q}case"document":{let q=W(Y);if(Y.end)for(let B of Y.end)q+=B.source;return q}default:{let q=Y.source;if("end"in Y&&Y.end)for(let B of Y.end)q+=B.source;return q}}}function W({start:Y,key:q,sep:B,value:U}){let G="";for(let H of Y)G+=H.source;if(q)G+=z(q);if(B)for(let H of B)G+=H.source;if(U)G+=z(U);return G}Z.stringify=X}),i4=w((Z)=>{var X=Symbol("break visit"),z=Symbol("skip children"),W=Symbol("remove item");function Y(B,U){if("type"in B&&B.type==="document")B={start:B.start,value:B.value};q(Object.freeze([]),B,U)}Y.BREAK=X,Y.SKIP=z,Y.REMOVE=W,Y.itemAtPath=(B,U)=>{let G=B;for(let[H,_]of U){let $=G?.[H];if($&&"items"in $)G=$.items[_];else return}return G},Y.parentCollection=(B,U)=>{let G=Y.itemAtPath(B,U.slice(0,-1)),H=U[U.length-1][0],_=G?.[H];if(_&&"items"in _)return _;throw Error("Parent collection not found")};function q(B,U,G){let H=G(U,B);if(typeof H==="symbol")return H;for(let _ of["key","value"]){let $=U[_];if($&&"items"in $){for(let Q=0;Q<$.items.length;++Q){let J=q(Object.freeze(B.concat([[_,Q]])),$.items[Q],G);if(typeof J==="number")Q=J-1;else if(J===X)return X;else if(J===W)$.items.splice(Q,1),Q-=1}if(typeof H==="function"&&_==="key")H=H(U,B)}}return typeof H==="function"?H(U,B):H}Z.visit=Y}),r6=w((Z)=>{var X=p4(),z=l4(),W=i4(),Y="\\uFEFF",q="\\x02",B="\\x18",U="\\x1F",G=(Q)=>!!Q&&("items"in Q),H=(Q)=>!!Q&&(Q.type==="scalar"||Q.type==="single-quoted-scalar"||Q.type==="double-quoted-scalar"||Q.type==="block-scalar");function _(Q){switch(Q){case Y:return"<BOM>";case q:return"<DOC>";case B:return"<FLOW_END>";case U:return"<SCALAR>";default:return JSON.stringify(Q)}}function $(Q){switch(Q){case Y:return"byte-order-mark";case q:return"doc-mode";case B:return"flow-error-end";case U:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case\`
|
|
21107
21107
|
\`:case\`\\r
|
|
21108
|
-
\`: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(Q[0]){case" ":case"\\t":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}Z.createScalarToken=X.createScalarToken,Z.resolveAsScalar=X.resolveAsScalar,Z.setScalarValue=X.setScalarValue,Z.stringify=z.stringify,Z.visit=W.visit,Z.BOM=
|
|
21109
|
-
\`:case"\\r":case"\\t":return!0;default:return!1}}var W=new Set("0123456789ABCDEFabcdef"),
|
|
21108
|
+
\`: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(Q[0]){case" ":case"\\t":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}Z.createScalarToken=X.createScalarToken,Z.resolveAsScalar=X.resolveAsScalar,Z.setScalarValue=X.setScalarValue,Z.stringify=z.stringify,Z.visit=W.visit,Z.BOM=Y,Z.DOCUMENT=q,Z.FLOW_END=B,Z.SCALAR=U,Z.isCollection=G,Z.isScalar=H,Z.prettyToken=_,Z.tokenType=$}),U7=w((Z)=>{var X=r6();function z(H){switch(H){case void 0:case" ":case\`
|
|
21109
|
+
\`:case"\\r":case"\\t":return!0;default:return!1}}var W=new Set("0123456789ABCDEFabcdef"),Y=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),q=new Set(",[]{}"),B=new Set(\` ,[]{}
|
|
21110
21110
|
\\r \`),U=(H)=>!H||B.has(H);class G{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(H,_=!1){if(H){if(typeof H!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+H:H,this.lineEndPos=null}this.atEnd=!_;let $=this.next??"stream";while($&&(_||this.hasChars(1)))$=yield*this.parseNext($)}atLineEnd(){let H=this.pos,_=this.buffer[H];while(_===" "||_==="\\t")_=this.buffer[++H];if(!_||_==="#"||_===\`
|
|
21111
21111
|
\`)return!0;if(_==="\\r")return this.buffer[H+1]===\`
|
|
21112
21112
|
\`;return!1}charAt(H){return this.buffer[this.pos+H]}continueScalar(H){let _=this.buffer[H];if(this.indentNext>0){let $=0;while(_===" ")_=this.buffer[++$+H];if(_==="\\r"){let Q=this.buffer[$+H+1];if(Q===\`
|
|
21113
21113
|
\`||!Q&&!this.atEnd)return H+$+1}return _===\`
|
|
21114
21114
|
\`||$>=this.indentNext||!_&&!this.atEnd?H+$:-1}if(_==="-"||_==="."){let $=this.buffer.substr(H,3);if(($==="---"||$==="...")&&z(this.buffer[H+3]))return-1}return H}getLine(){let H=this.lineEndPos;if(typeof H!=="number"||H!==-1&&H<this.pos)H=this.buffer.indexOf(\`
|
|
21115
|
-
\`,this.pos),this.lineEndPos=H;if(H===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[H-1]==="\\r")H-=1;return this.buffer.substring(this.pos,H)}hasChars(H){return this.pos+H<=this.buffer.length}setNext(H){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=H,null}peek(H){return this.buffer.substr(this.pos,H)}*parseNext(H){switch(H){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 H=this.getLine();if(H===null)return this.setNext("stream");if(H[0]===X.BOM)yield*this.pushCount(1),H=H.substring(1);if(H[0]==="%"){let _=H.length,$=H.indexOf("#");while($!==-1){let J=H[$-1];if(J===" "||J==="\\t"){_=$-1;break}else $=H.indexOf("#",$+1)}while(!0){let J=H[_-1];if(J===" "||J==="\\t")_-=1;else break}let Q=(yield*this.pushCount(_))+(yield*this.pushSpaces(!0));return yield*this.pushCount(H.length-Q),this.pushNewline(),"stream"}if(this.atLineEnd()){let _=yield*this.pushSpaces(!0);return yield*this.pushCount(H.length-_),yield*this.pushNewline(),"stream"}return yield X.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let H=this.charAt(0);if(!H&&!this.atEnd)return this.setNext("line-start");if(H==="-"||H==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let _=this.peek(3);if((_==="---"||_==="...")&&z(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,_==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!z(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[H,_]=this.peek(2);if(!_&&!this.atEnd)return this.setNext("block-start");if((H==="-"||H==="?"||H===":")&&z(_)){let $=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=$,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let H=this.getLine();if(H===null)return this.setNext("doc");let _=yield*this.pushIndicators();switch(H[_]){case"#":yield*this.pushCount(H.length-_);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(U),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return _+=yield*this.parseBlockScalarHeader(),_+=yield*this.pushSpaces(!0),yield*this.pushCount(H.length-_),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let H,_,$=-1;do{if(H=yield*this.pushNewline(),H>0)_=yield*this.pushSpaces(!1),this.indentValue=$=_;else _=0;_+=yield*this.pushSpaces(!0)}while(H+_>0);let Q=this.getLine();if(Q===null)return this.setNext("flow");if($!==-1&&$<this.indentNext&&Q[0]!=="#"||$===0&&(Q.startsWith("---")||Q.startsWith("..."))&&z(Q[3])){if(!($===this.indentNext-1&&this.flowLevel===1&&(Q[0]==="]"||Q[0]==="}")))return this.flowLevel=0,yield X.FLOW_END,yield*this.parseLineStart()}let J=0;while(Q[J]===",")J+=yield*this.pushCount(1),J+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(J+=yield*this.pushIndicators(),Q[J]){case void 0:return"flow";case"#":return yield*this.pushCount(Q.length-J),"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-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(U),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let
|
|
21115
|
+
\`,this.pos),this.lineEndPos=H;if(H===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[H-1]==="\\r")H-=1;return this.buffer.substring(this.pos,H)}hasChars(H){return this.pos+H<=this.buffer.length}setNext(H){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=H,null}peek(H){return this.buffer.substr(this.pos,H)}*parseNext(H){switch(H){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 H=this.getLine();if(H===null)return this.setNext("stream");if(H[0]===X.BOM)yield*this.pushCount(1),H=H.substring(1);if(H[0]==="%"){let _=H.length,$=H.indexOf("#");while($!==-1){let J=H[$-1];if(J===" "||J==="\\t"){_=$-1;break}else $=H.indexOf("#",$+1)}while(!0){let J=H[_-1];if(J===" "||J==="\\t")_-=1;else break}let Q=(yield*this.pushCount(_))+(yield*this.pushSpaces(!0));return yield*this.pushCount(H.length-Q),this.pushNewline(),"stream"}if(this.atLineEnd()){let _=yield*this.pushSpaces(!0);return yield*this.pushCount(H.length-_),yield*this.pushNewline(),"stream"}return yield X.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let H=this.charAt(0);if(!H&&!this.atEnd)return this.setNext("line-start");if(H==="-"||H==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let _=this.peek(3);if((_==="---"||_==="...")&&z(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,_==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!z(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[H,_]=this.peek(2);if(!_&&!this.atEnd)return this.setNext("block-start");if((H==="-"||H==="?"||H===":")&&z(_)){let $=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=$,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let H=this.getLine();if(H===null)return this.setNext("doc");let _=yield*this.pushIndicators();switch(H[_]){case"#":yield*this.pushCount(H.length-_);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(U),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return _+=yield*this.parseBlockScalarHeader(),_+=yield*this.pushSpaces(!0),yield*this.pushCount(H.length-_),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let H,_,$=-1;do{if(H=yield*this.pushNewline(),H>0)_=yield*this.pushSpaces(!1),this.indentValue=$=_;else _=0;_+=yield*this.pushSpaces(!0)}while(H+_>0);let Q=this.getLine();if(Q===null)return this.setNext("flow");if($!==-1&&$<this.indentNext&&Q[0]!=="#"||$===0&&(Q.startsWith("---")||Q.startsWith("..."))&&z(Q[3])){if(!($===this.indentNext-1&&this.flowLevel===1&&(Q[0]==="]"||Q[0]==="}")))return this.flowLevel=0,yield X.FLOW_END,yield*this.parseLineStart()}let J=0;while(Q[J]===",")J+=yield*this.pushCount(1),J+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(J+=yield*this.pushIndicators(),Q[J]){case void 0:return"flow";case"#":return yield*this.pushCount(Q.length-J),"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-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(U),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let V=this.charAt(1);if(this.flowKey||z(V)||V===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let H=this.charAt(0),_=this.buffer.indexOf(H,this.pos+1);if(H==="'")while(_!==-1&&this.buffer[_+1]==="'")_=this.buffer.indexOf("'",_+2);else while(_!==-1){let J=0;while(this.buffer[_-1-J]==="\\\\")J+=1;if(J%2===0)break;_=this.buffer.indexOf('"',_+1)}let $=this.buffer.substring(0,_),Q=$.indexOf(\`
|
|
21116
21116
|
\`,this.pos);if(Q!==-1){while(Q!==-1){let J=this.continueScalar(Q+1);if(J===-1)break;Q=$.indexOf(\`
|
|
21117
21117
|
\`,J)}if(Q!==-1)_=Q-($[Q-1]==="\\r"?2:1)}if(_===-1){if(!this.atEnd)return this.setNext("quoted-scalar");_=this.buffer.length}return yield*this.pushToIndex(_+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let H=this.pos;while(!0){let _=this.buffer[++H];if(_==="+")this.blockScalarKeep=!0;else if(_>"0"&&_<="9")this.blockScalarIndent=Number(_)-1;else if(_!=="-")break}return yield*this.pushUntil((_)=>z(_)||_==="#")}*parseBlockScalar(){let H=this.pos-1,_=0,$;Z:for(let J=this.pos;$=this.buffer[J];++J)switch($){case" ":_+=1;break;case\`
|
|
21118
|
-
\`:H=J,_=0;break;case"\\r":{let
|
|
21118
|
+
\`:H=J,_=0;break;case"\\r":{let V=this.buffer[J+1];if(!V&&!this.atEnd)return this.setNext("block-scalar");if(V===\`
|
|
21119
21119
|
\`)break}default:break Z}if(!$&&!this.atEnd)return this.setNext("block-scalar");if(_>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=_;else this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let J=this.continueScalar(H+1);if(J===-1)break;H=this.buffer.indexOf(\`
|
|
21120
21120
|
\`,J)}while(H!==-1);if(H===-1){if(!this.atEnd)return this.setNext("block-scalar");H=this.buffer.length}}let Q=H+1;$=this.buffer[Q];while($===" ")$=this.buffer[++Q];if($==="\\t"){while($==="\\t"||$===" "||$==="\\r"||$===\`
|
|
21121
|
-
\`)$=this.buffer[++Q];H=Q-1}else if(!this.blockScalarKeep)do{let J=H-1,
|
|
21121
|
+
\`)$=this.buffer[++Q];H=Q-1}else if(!this.blockScalarKeep)do{let J=H-1,V=this.buffer[J];if(V==="\\r")V=this.buffer[--J];let A=J;while(V===" ")V=this.buffer[--J];if(V===\`
|
|
21122
21122
|
\`&&J>=this.pos&&J+1+_>A)H=J;else break}while(!0);return yield X.SCALAR,yield*this.pushToIndex(H+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let H=this.flowLevel>0,_=this.pos-1,$=this.pos-1,Q;while(Q=this.buffer[++$])if(Q===":"){let J=this.buffer[$+1];if(z(J)||H&&q.has(J))break;_=$}else if(z(Q)){let J=this.buffer[$+1];if(Q==="\\r")if(J===\`
|
|
21123
21123
|
\`)$+=1,Q=\`
|
|
21124
21124
|
\`,J=this.buffer[$+1];else _=$;if(J==="#"||H&&q.has(J))break;if(Q===\`
|
|
21125
|
-
\`){let
|
|
21125
|
+
\`){let V=this.continueScalar($+1);if(V===-1)break;$=Math.max($,V-2)}}else{if(H&&q.has(Q))break;_=$}if(!Q&&!this.atEnd)return this.setNext("plain-scalar");return yield X.SCALAR,yield*this.pushToIndex(_+1,!0),H?"flow":"doc"}*pushCount(H){if(H>0)return yield this.buffer.substr(this.pos,H),this.pos+=H,H;return 0}*pushToIndex(H,_){let $=this.buffer.slice(this.pos,H);if($)return yield $,this.pos+=$.length,$.length;else if(_)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(U))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let H=this.flowLevel>0,_=this.charAt(1);if(z(_)||H&&q.has(_)){if(!H)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let H=this.pos+2,_=this.buffer[H];while(!z(_)&&_!==">")_=this.buffer[++H];return yield*this.pushToIndex(_===">"?H+1:H,!1)}else{let H=this.pos+1,_=this.buffer[H];while(_)if(Y.has(_))_=this.buffer[++H];else if(_==="%"&&W.has(this.buffer[H+1])&&W.has(this.buffer[H+2]))_=this.buffer[H+=3];else break;return yield*this.pushToIndex(H,!1)}}*pushNewline(){let H=this.buffer[this.pos];if(H===\`
|
|
21126
21126
|
\`)return yield*this.pushCount(1);else if(H==="\\r"&&this.charAt(1)===\`
|
|
21127
|
-
\`)return yield*this.pushCount(2);else return 0}*pushSpaces(H){let _=this.pos-1,$;do $=this.buffer[++_];while($===" "||H&&$==="\\t");let Q=_-this.pos;if(Q>0)yield this.buffer.substr(this.pos,Q),this.pos=_;return Q}*pushUntil(H){let _=this.pos,$=this.buffer[_];while(!H($))$=this.buffer[++_];return yield*this.pushToIndex(_,!1)}}Z.Lexer=G}),
|
|
21127
|
+
\`)return yield*this.pushCount(2);else return 0}*pushSpaces(H){let _=this.pos-1,$;do $=this.buffer[++_];while($===" "||H&&$==="\\t");let Q=_-this.pos;if(Q>0)yield this.buffer.substr(this.pos,Q),this.pos=_;return Q}*pushUntil(H){let _=this.pos,$=this.buffer[_];while(!H($))$=this.buffer[++_];return yield*this.pushToIndex(_,!1)}}Z.Lexer=G}),G7=w((Z)=>{class X{constructor(){this.lineStarts=[],this.addNewLine=(z)=>this.lineStarts.push(z),this.linePos=(z)=>{let W=0,Y=this.lineStarts.length;while(W<Y){let B=W+Y>>1;if(this.lineStarts[B]<z)W=B+1;else Y=B}if(this.lineStarts[W]===z)return{line:W+1,col:1};if(W===0)return{line:0,col:z};let q=this.lineStarts[W-1];return{line:W,col:z-q+1}}}}Z.LineCounter=X}),q7=w((Z)=>{var X=nZ("process"),z=r6(),W=U7();function Y($,Q){for(let J=0;J<$.length;++J)if($[J].type===Q)return!0;return!1}function q($){for(let Q=0;Q<$.length;++Q)switch($[Q].type){case"space":case"comment":case"newline":break;default:return Q}return-1}function B($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function U($){switch($.type){case"document":return $.start;case"block-map":{let Q=$.items[$.items.length-1];return Q.sep??Q.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function G($){if($.length===0)return[];let Q=$.length;Z:while(--Q>=0)switch($[Q].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break Z}while($[++Q]?.type==="space");return $.splice(Q,$.length)}function H($){if($.start.type==="flow-seq-start"){for(let Q of $.items)if(Q.sep&&!Q.value&&!Y(Q.start,"explicit-key-ind")&&!Y(Q.sep,"map-value-ind")){if(Q.key)Q.value=Q.key;if(delete Q.key,B(Q.value))if(Q.value.end)Array.prototype.push.apply(Q.value.end,Q.sep);else Q.value.end=Q.sep;else Array.prototype.push.apply(Q.start,Q.sep);delete Q.sep}}}class _{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new W.Lexer,this.onNewLine=$}*parse($,Q=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let J of this.lexer.lex($,Q))yield*this.next(J);if(!Q)yield*this.end()}*next($){if(this.source=$,X.env.LOG_TOKENS)console.log("|",z.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let Q=z.tokenType($);if(!Q){let J=\`Not a YAML token: \${$}\`;yield*this.pop({type:"error",offset:this.offset,message:J,source:$}),this.offset+=$.length}else if(Q==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=Q,yield*this.step(),Q){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let Q=$??this.stack.pop();if(!Q)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield Q;else{let J=this.peek(1);if(Q.type==="block-scalar")Q.indent="indent"in J?J.indent:0;else if(Q.type==="flow-collection"&&J.type==="document")Q.indent=0;if(Q.type==="flow-collection")H(Q);switch(J.type){case"document":J.value=Q;break;case"block-scalar":J.props.push(Q);break;case"block-map":{let V=J.items[J.items.length-1];if(V.value){J.items.push({start:[],key:Q,sep:[]}),this.onKeyLine=!0;return}else if(V.sep)V.value=Q;else{Object.assign(V,{key:Q,sep:[]}),this.onKeyLine=!V.explicitKey;return}break}case"block-seq":{let V=J.items[J.items.length-1];if(V.value)J.items.push({start:[],value:Q});else V.value=Q;break}case"flow-collection":{let V=J.items[J.items.length-1];if(!V||V.value)J.items.push({start:[],key:Q,sep:[]});else if(V.sep)V.value=Q;else Object.assign(V,{key:Q,sep:[]});return}default:yield*this.pop(),yield*this.pop(Q)}if((J.type==="document"||J.type==="block-map"||J.type==="block-seq")&&(Q.type==="block-map"||Q.type==="block-seq")){let V=Q.items[Q.items.length-1];if(V&&!V.sep&&!V.value&&V.start.length>0&&q(V.start)===-1&&(Q.indent===0||V.start.every((A)=>A.type!=="comment"||A.indent<Q.indent))){if(J.type==="document")J.end=V.start;else J.items.push({start:V.start});Q.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:\`Unexpected \${this.type} token in YAML stream\`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(q($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let Q=this.startBlockValue($);if(Q)this.stack.push(Q);else yield{type:"error",offset:this.offset,message:\`Unexpected \${this.type} token in YAML document\`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let Q=U(this.peek(2)),J=G(Q),V;if($.end)V=$.end,V.push(this.sourceToken),delete $.end;else V=[this.sourceToken];let A={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:J,key:$,sep:V}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=A}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let Q=this.source.indexOf(\`
|
|
21128
21128
|
\`)+1;while(Q!==0)this.onNewLine(this.offset+Q),Q=this.source.indexOf(\`
|
|
21129
|
-
\`,Q)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let Q=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,Q.value){let J="end"in Q.value?Q.value.end:void 0;if((Array.isArray(J)?J[J.length-1]:void 0)?.type==="comment")J?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(Q.sep)Q.sep.push(this.sourceToken);else Q.start.push(this.sourceToken);return;case"space":case"comment":if(Q.value)$.items.push({start:[this.sourceToken]});else if(Q.sep)Q.sep.push(this.sourceToken);else{if(this.atIndentedComment(Q.start,$.indent)){let
|
|
21129
|
+
\`,Q)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let Q=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,Q.value){let J="end"in Q.value?Q.value.end:void 0;if((Array.isArray(J)?J[J.length-1]:void 0)?.type==="comment")J?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(Q.sep)Q.sep.push(this.sourceToken);else Q.start.push(this.sourceToken);return;case"space":case"comment":if(Q.value)$.items.push({start:[this.sourceToken]});else if(Q.sep)Q.sep.push(this.sourceToken);else{if(this.atIndentedComment(Q.start,$.indent)){let V=$.items[$.items.length-2]?.value?.end;if(Array.isArray(V)){Array.prototype.push.apply(V,Q.start),V.push(this.sourceToken),$.items.pop();return}}Q.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let J=!this.onKeyLine&&this.indent===$.indent,V=J&&(Q.sep||Q.explicitKey)&&this.type!=="seq-item-ind",A=[];if(V&&Q.sep&&!Q.value){let M=[];for(let D=0;D<Q.sep.length;++D){let L=Q.sep[D];switch(L.type){case"newline":M.push(D);break;case"space":break;case"comment":if(L.indent>$.indent)M.length=0;break;default:M.length=0}}if(M.length>=2)A=Q.sep.splice(M[1])}switch(this.type){case"anchor":case"tag":if(V||Q.value)A.push(this.sourceToken),$.items.push({start:A}),this.onKeyLine=!0;else if(Q.sep)Q.sep.push(this.sourceToken);else Q.start.push(this.sourceToken);return;case"explicit-key-ind":if(!Q.sep&&!Q.explicitKey)Q.start.push(this.sourceToken),Q.explicitKey=!0;else if(V||Q.value)A.push(this.sourceToken),$.items.push({start:A,explicitKey:!0});else 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(Q.explicitKey)if(!Q.sep)if(Y(Q.start,"newline"))Object.assign(Q,{key:null,sep:[this.sourceToken]});else{let M=G(Q.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:M,key:null,sep:[this.sourceToken]}]})}else if(Q.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Y(Q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:A,key:null,sep:[this.sourceToken]}]});else if(B(Q.key)&&!Y(Q.sep,"newline")){let M=G(Q.start),D=Q.key,L=Q.sep;L.push(this.sourceToken),delete Q.key,delete Q.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:M,key:D,sep:L}]})}else if(A.length>0)Q.sep=Q.sep.concat(A,this.sourceToken);else Q.sep.push(this.sourceToken);else if(!Q.sep)Object.assign(Q,{key:null,sep:[this.sourceToken]});else if(Q.value||V)$.items.push({start:A,key:null,sep:[this.sourceToken]});else if(Y(Q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else Q.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let M=this.flowScalar(this.type);if(V||Q.value)$.items.push({start:A,key:M,sep:[]}),this.onKeyLine=!0;else if(Q.sep)this.stack.push(M);else Object.assign(Q,{key:M,sep:[]}),this.onKeyLine=!0;return}default:{let M=this.startBlockValue($);if(M){if(M.type==="block-seq"){if(!Q.explicitKey&&Q.sep&&!Y(Q.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 if(J)$.items.push({start:A});this.stack.push(M);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let Q=$.items[$.items.length-1];switch(this.type){case"newline":if(Q.value){let J="end"in Q.value?Q.value.end:void 0;if((Array.isArray(J)?J[J.length-1]:void 0)?.type==="comment")J?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else Q.start.push(this.sourceToken);return;case"space":case"comment":if(Q.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(Q.start,$.indent)){let V=$.items[$.items.length-2]?.value?.end;if(Array.isArray(V)){Array.prototype.push.apply(V,Q.start),V.push(this.sourceToken),$.items.pop();return}}Q.start.push(this.sourceToken)}return;case"anchor":case"tag":if(Q.value||this.indent<=$.indent)break;Q.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(Q.value||Y(Q.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else Q.start.push(this.sourceToken);return}if(this.indent>$.indent){let J=this.startBlockValue($);if(J){this.stack.push(J);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let Q=$.items[$.items.length-1];if(this.type==="flow-error-end"){let J;do yield*this.pop(),J=this.peek(1);while(J?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!Q||Q.sep)$.items.push({start:[this.sourceToken]});else Q.start.push(this.sourceToken);return;case"map-value-ind":if(!Q||Q.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Q.sep)Q.sep.push(this.sourceToken);else Object.assign(Q,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!Q||Q.value)$.items.push({start:[this.sourceToken]});else if(Q.sep)Q.sep.push(this.sourceToken);else Q.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let V=this.flowScalar(this.type);if(!Q||Q.value)$.items.push({start:[],key:V,sep:[]});else if(Q.sep)this.stack.push(V);else Object.assign(Q,{key:V,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let J=this.startBlockValue($);if(J)this.stack.push(J);else yield*this.pop(),yield*this.step()}else{let J=this.peek(2);if(J.type==="block-map"&&(this.type==="map-value-ind"&&J.indent===$.indent||this.type==="newline"&&!J.items[J.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&J.type!=="flow-collection"){let V=U(J),A=G(V);H($);let M=$.end.splice(1,$.end.length);M.push(this.sourceToken);let D={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:A,key:$,sep:M}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=D}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let Q=this.source.indexOf(\`
|
|
21130
21130
|
\`)+1;while(Q!==0)this.onNewLine(this.offset+Q),Q=this.source.indexOf(\`
|
|
21131
|
-
\`,Q)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){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 Q=U($),J=G(Q);return J.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:J,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Q=U($),J=G(Q);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:J,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,Q){if(this.type!=="comment")return!1;if(this.indent<=Q)return!1;return $.every((J)=>J.type==="newline"||J.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){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;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}Z.Parser=_}),
|
|
21131
|
+
\`,Q)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){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 Q=U($),J=G(Q);return J.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:J,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let Q=U($),J=G(Q);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:J,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,Q){if(this.type!=="comment")return!1;if(this.indent<=Q)return!1;return $.every((J)=>J.type==="newline"||J.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){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;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}Z.Parser=_}),n4=w((Z)=>{var X=B7(),z=X6(),W=z6(),Y=a5(),q=u(),B=G7(),U=q7();function G(J){let V=J.prettyErrors!==!1;return{lineCounter:J.lineCounter||V&&new B.LineCounter||null,prettyErrors:V}}function H(J,V={}){let{lineCounter:A,prettyErrors:M}=G(V),D=new U.Parser(A?.addNewLine),L=new X.Composer(V),F=Array.from(L.compose(D.parse(J)));if(M&&A)for(let j of F)j.errors.forEach(W.prettifyError(J,A)),j.warnings.forEach(W.prettifyError(J,A));if(F.length>0)return F;return Object.assign([],{empty:!0},L.streamInfo())}function _(J,V={}){let{lineCounter:A,prettyErrors:M}=G(V),D=new U.Parser(A?.addNewLine),L=new X.Composer(V),F=null;for(let j of L.compose(D.parse(J),!0,J.length))if(!F)F=j;else if(F.options.logLevel!=="silent"){F.errors.push(new W.YAMLParseError(j.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(M&&A)F.errors.forEach(W.prettifyError(J,A)),F.warnings.forEach(W.prettifyError(J,A));return F}function $(J,V,A){let M=void 0;if(typeof V==="function")M=V;else if(A===void 0&&V&&typeof V==="object")A=V;let D=_(J,A);if(!D)return null;if(D.warnings.forEach((L)=>Y.warn(D.options.logLevel,L)),D.errors.length>0)if(D.options.logLevel!=="silent")throw D.errors[0];else D.errors=[];return D.toJS(Object.assign({reviver:M},A))}function Q(J,V,A){let M=null;if(typeof V==="function"||Array.isArray(V))M=V;else if(A===void 0&&V)A=V;if(typeof A==="string")A=A.length;if(typeof A==="number"){let D=Math.round(A);A=D<1?void 0:D>8?{indent:8}:{indent:D}}if(J===void 0){let{keepUndefined:D}=A??V??{};if(!D)return}if(q.isDocument(J)&&!M)return J.toString(A);return new z.Document(J,M,A).toString(A)}Z.parse=$,Z.parseAllDocuments=H,Z.parseDocument=_,Z.stringify=Q}),A7=w((Z)=>{var X=B7(),z=X6(),W=H7(),Y=z6(),q=sZ(),B=u(),U=b8(),G=q0(),H=f8(),_=x8(),$=r6(),Q=U7(),J=G7(),V=q7(),A=n4(),M=oZ();Z.Composer=X.Composer,Z.Document=z.Document,Z.Schema=W.Schema,Z.YAMLError=Y.YAMLError,Z.YAMLParseError=Y.YAMLParseError,Z.YAMLWarning=Y.YAMLWarning,Z.Alias=q.Alias,Z.isAlias=B.isAlias,Z.isCollection=B.isCollection,Z.isDocument=B.isDocument,Z.isMap=B.isMap,Z.isNode=B.isNode,Z.isPair=B.isPair,Z.isScalar=B.isScalar,Z.isSeq=B.isSeq,Z.Pair=U.Pair,Z.Scalar=G.Scalar,Z.YAMLMap=H.YAMLMap,Z.YAMLSeq=_.YAMLSeq,Z.CST=$,Z.Lexer=Q.Lexer,Z.LineCounter=J.LineCounter,Z.Parser=V.Parser,Z.parse=A.parse,Z.parseAllDocuments=A.parseAllDocuments,Z.parseDocument=A.parseDocument,Z.stringify=A.stringify,Z.visit=M.visit,Z.visitAsync=M.visitAsync});var M7=["none","acpx","llama-cpp","ollama","claude-code","codex","opencode","anthropic","openrouter","openai-compatible","command"],o4=M7.filter((Z)=>Z!=="command");var TJ=new Set(M7),PJ=new Set(o4);var D7="unicode61";function r4(Z){return Z.replace(/\\s+/g," ").trim().toLowerCase()}function L7(Z){Z.exec(\`
|
|
21132
21132
|
CREATE VIRTUAL TABLE IF NOT EXISTS memories_fts USING fts5(
|
|
21133
21133
|
content,
|
|
21134
21134
|
content='memories',
|
|
21135
21135
|
content_rowid='rowid',
|
|
21136
|
-
tokenize='\${
|
|
21136
|
+
tokenize='\${D7}'
|
|
21137
21137
|
);
|
|
21138
21138
|
\`),Z.exec(\`
|
|
21139
21139
|
CREATE TRIGGER IF NOT EXISTS memories_ai AFTER INSERT ON memories BEGIN
|
|
@@ -21148,7 +21148,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21148
21148
|
INSERT INTO memories_fts(memories_fts, rowid, content) VALUES('delete', old.rowid, old.content);
|
|
21149
21149
|
INSERT INTO memories_fts(rowid, content) VALUES (new.rowid, new.content);
|
|
21150
21150
|
END;
|
|
21151
|
-
\`)}function
|
|
21151
|
+
\`)}function t4(Z){Z.exec("DROP TRIGGER IF EXISTS memories_ai"),Z.exec("DROP TRIGGER IF EXISTS memories_ad"),Z.exec("DROP TRIGGER IF EXISTS memories_au"),Z.exec("DROP TABLE IF EXISTS memories_fts"),L7(Z),Z.exec("INSERT INTO memories_fts(rowid, content) SELECT rowid, content FROM memories")}function e4(Z){let X=Z.prepare("SELECT sql FROM sqlite_master WHERE name = 'memories_fts' AND type = 'table'").get();return typeof X?.sql==="string"?X.sql:null}function Z9(Z){if(Z===null)return!1;let X=r4(Z);if(X.includes("porter unicode61"))return!0;return!X.includes(\`tokenize='\${D7}'\`)}function X9(Z){Z.exec(\`
|
|
21152
21152
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
21153
21153
|
version INTEGER PRIMARY KEY,
|
|
21154
21154
|
applied_at TEXT NOT NULL,
|
|
@@ -21230,7 +21230,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21230
21230
|
CREATE VIRTUAL TABLE IF NOT EXISTS vec_embeddings USING vec0(
|
|
21231
21231
|
embedding FLOAT[768]
|
|
21232
21232
|
);
|
|
21233
|
-
\`)}catch{}
|
|
21233
|
+
\`)}catch{}L7(Z)}function z9(Z,X,z){return Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((Y)=>Y.name===z)}function R0(Z,X,z,W){if(!z9(Z,X,z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function $9(Z){R0(Z,"memories","content_hash","TEXT"),R0(Z,"memories","normalized_content","TEXT"),R0(Z,"memories","is_deleted","INTEGER DEFAULT 0"),R0(Z,"memories","deleted_at","TEXT"),R0(Z,"memories","extraction_status","TEXT DEFAULT 'none'"),R0(Z,"memories","embedding_model","TEXT"),R0(Z,"memories","extraction_model","TEXT"),R0(Z,"memories","update_count","INTEGER DEFAULT 0"),R0(Z,"memories","who","TEXT"),R0(Z,"memories","why","TEXT"),R0(Z,"memories","project","TEXT"),R0(Z,"memories","pinned","INTEGER DEFAULT 0"),R0(Z,"memories","importance","REAL DEFAULT 0.5"),R0(Z,"memories","last_accessed","TEXT"),R0(Z,"memories","access_count","INTEGER DEFAULT 0"),Z.exec(\`
|
|
21234
21234
|
CREATE TABLE IF NOT EXISTS memory_history (
|
|
21235
21235
|
id TEXT PRIMARY KEY,
|
|
21236
21236
|
memory_id TEXT NOT NULL,
|
|
@@ -21317,7 +21317,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21317
21317
|
ON relations(target_entity_id);
|
|
21318
21318
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity
|
|
21319
21319
|
ON memory_entity_mentions(entity_id);
|
|
21320
|
-
\`)}function
|
|
21320
|
+
\`)}function g5(Z,X,z,W){if(Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))return!1;return Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`),!0}function Q9(Z){g5(Z,"memories","why","TEXT"),g5(Z,"memories","project","TEXT"),Z.exec("DROP INDEX IF EXISTS idx_memories_content_hash"),Z.exec(\`
|
|
21321
21321
|
UPDATE memories
|
|
21322
21322
|
SET content_hash = NULL
|
|
21323
21323
|
WHERE content_hash IS NOT NULL
|
|
@@ -21338,7 +21338,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21338
21338
|
CREATE UNIQUE INDEX IF NOT EXISTS idx_memories_content_hash_unique
|
|
21339
21339
|
ON memories(content_hash)
|
|
21340
21340
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
21341
|
-
\`)}function
|
|
21341
|
+
\`)}function W9(Z,X,z){return Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((Y)=>Y.name===z)}function v6(Z,X,z,W){if(!W9(Z,X,z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function H9(Z){v6(Z,"memory_history","actor_type","TEXT"),v6(Z,"memory_history","session_id","TEXT"),v6(Z,"memory_history","request_id","TEXT"),Z.exec(\`
|
|
21342
21342
|
CREATE INDEX IF NOT EXISTS idx_memories_deleted_at
|
|
21343
21343
|
ON memories(deleted_at)
|
|
21344
21344
|
WHERE is_deleted = 1;
|
|
@@ -21353,9 +21353,9 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21353
21353
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_failed_at
|
|
21354
21354
|
ON memory_jobs(failed_at)
|
|
21355
21355
|
WHERE status = 'dead';
|
|
21356
|
-
\`)}function
|
|
21356
|
+
\`)}function J9(Z,X,z){return Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((Y)=>Y.name===z)}function J8(Z,X,z,W){if(!J9(Z,X,z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function Y9(Z){J8(Z,"entities","canonical_name","TEXT"),J8(Z,"entities","mentions","INTEGER DEFAULT 0"),J8(Z,"entities","embedding","BLOB"),J8(Z,"relations","mentions","INTEGER DEFAULT 1"),J8(Z,"relations","confidence","REAL DEFAULT 0.5"),J8(Z,"relations","updated_at","TEXT"),J8(Z,"memory_entity_mentions","mention_text","TEXT"),J8(Z,"memory_entity_mentions","confidence","REAL"),J8(Z,"memory_entity_mentions","created_at","TEXT"),Z.exec("CREATE INDEX IF NOT EXISTS idx_entities_canonical_name ON entities(canonical_name)"),Z.exec("CREATE INDEX IF NOT EXISTS idx_relations_composite ON relations(source_entity_id, relation_type)")}function h5(Z,X,z){return Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((Y)=>Y.name===z)}function V9(Z){if(!h5(Z,"memories","idempotency_key"))Z.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");if(Z.exec(\`CREATE UNIQUE INDEX IF NOT EXISTS idx_memories_idempotency_key
|
|
21357
21357
|
ON memories(idempotency_key)
|
|
21358
|
-
WHERE idempotency_key IS NOT NULL\`),!
|
|
21358
|
+
WHERE idempotency_key IS NOT NULL\`),!h5(Z,"memories","runtime_path"))Z.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT")}function _9(Z,X,z){return Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((Y)=>Y.name===z)}function B9(Z){if(Z.exec(\`
|
|
21359
21359
|
CREATE TABLE IF NOT EXISTS documents (
|
|
21360
21360
|
id TEXT PRIMARY KEY,
|
|
21361
21361
|
source_url TEXT,
|
|
@@ -21399,7 +21399,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21399
21399
|
updated_at TEXT NOT NULL
|
|
21400
21400
|
)
|
|
21401
21401
|
\`),Z.exec(\`CREATE INDEX IF NOT EXISTS idx_connectors_provider
|
|
21402
|
-
ON connectors(provider)\`),!
|
|
21402
|
+
ON connectors(provider)\`),!_9(Z,"memory_jobs","document_id"))Z.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT")}function U9(Z){if(Z.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all().length===0)return;Z.exec(\`
|
|
21403
21403
|
DELETE FROM embeddings
|
|
21404
21404
|
WHERE rowid NOT IN (
|
|
21405
21405
|
SELECT MIN(rowid) FROM embeddings
|
|
@@ -21408,7 +21408,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21408
21408
|
\`),Z.exec("DROP INDEX IF EXISTS idx_embeddings_hash"),Z.exec(\`
|
|
21409
21409
|
CREATE UNIQUE INDEX IF NOT EXISTS idx_embeddings_content_hash_unique
|
|
21410
21410
|
ON embeddings(content_hash)
|
|
21411
|
-
\`)}function
|
|
21411
|
+
\`)}function G9(Z){Z.exec(\`
|
|
21412
21412
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
21413
21413
|
id TEXT PRIMARY KEY,
|
|
21414
21414
|
session_key TEXT,
|
|
@@ -21424,7 +21424,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21424
21424
|
error TEXT
|
|
21425
21425
|
)
|
|
21426
21426
|
\`),Z.exec(\`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
21427
|
-
ON summary_jobs(status)\`)}function
|
|
21427
|
+
ON summary_jobs(status)\`)}function q9(Z){Z.exec(\`
|
|
21428
21428
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
21429
21429
|
id INTEGER PRIMARY KEY,
|
|
21430
21430
|
dimensions INTEGER NOT NULL,
|
|
@@ -21432,7 +21432,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21432
21432
|
payload TEXT NOT NULL,
|
|
21433
21433
|
created_at TEXT NOT NULL
|
|
21434
21434
|
)
|
|
21435
|
-
\`)}function
|
|
21435
|
+
\`)}function A9(Z){Z.exec(\`
|
|
21436
21436
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
21437
21437
|
id TEXT PRIMARY KEY,
|
|
21438
21438
|
session_key TEXT NOT NULL,
|
|
@@ -21449,7 +21449,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21449
21449
|
ON session_scores(project, created_at);
|
|
21450
21450
|
CREATE INDEX IF NOT EXISTS idx_session_scores_session
|
|
21451
21451
|
ON session_scores(session_key);
|
|
21452
|
-
\`)}function
|
|
21452
|
+
\`)}function M9(Z){Z.exec(\`
|
|
21453
21453
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
21454
21454
|
id TEXT PRIMARY KEY,
|
|
21455
21455
|
name TEXT NOT NULL,
|
|
@@ -21481,7 +21481,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21481
21481
|
ON task_runs(task_id);
|
|
21482
21482
|
CREATE INDEX IF NOT EXISTS idx_task_runs_status
|
|
21483
21483
|
ON task_runs(status);
|
|
21484
|
-
\`)}function
|
|
21484
|
+
\`)}function v5(Z,X,z,W){if(!Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function D9(Z){Z.exec(\`
|
|
21485
21485
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
21486
21486
|
id TEXT PRIMARY KEY,
|
|
21487
21487
|
source_path TEXT NOT NULL,
|
|
@@ -21502,7 +21502,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21502
21502
|
ON ingestion_jobs(file_hash);
|
|
21503
21503
|
CREATE INDEX IF NOT EXISTS idx_ingestion_jobs_source_path
|
|
21504
21504
|
ON ingestion_jobs(source_path);
|
|
21505
|
-
\`),
|
|
21505
|
+
\`),v5(Z,"memories","source_path","TEXT"),v5(Z,"memories","source_section","TEXT")}function L9(Z){Z.exec(\`
|
|
21506
21506
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
21507
21507
|
id TEXT PRIMARY KEY,
|
|
21508
21508
|
event TEXT NOT NULL,
|
|
@@ -21518,7 +21518,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21518
21518
|
ON telemetry_events(timestamp);
|
|
21519
21519
|
CREATE INDEX IF NOT EXISTS idx_telemetry_events_unsent
|
|
21520
21520
|
ON telemetry_events(sent_to_posthog) WHERE sent_to_posthog = 0;
|
|
21521
|
-
\`)}function
|
|
21521
|
+
\`)}function y5(Z,X,z,W){if(!Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function O9(Z){Z.exec(\`
|
|
21522
21522
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
21523
21523
|
id TEXT PRIMARY KEY,
|
|
21524
21524
|
session_key TEXT NOT NULL,
|
|
@@ -21540,7 +21540,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21540
21540
|
ON session_memories(session_key);
|
|
21541
21541
|
CREATE INDEX IF NOT EXISTS idx_session_memories_memory
|
|
21542
21542
|
ON session_memories(memory_id);
|
|
21543
|
-
\`),
|
|
21543
|
+
\`),y5(Z,"session_scores","confidence","REAL"),y5(Z,"session_scores","continuity_reasoning","TEXT")}function F9(Z){Z.exec(\`
|
|
21544
21544
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
21545
21545
|
id TEXT PRIMARY KEY,
|
|
21546
21546
|
session_key TEXT NOT NULL,
|
|
@@ -21559,8 +21559,8 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21559
21559
|
ON session_checkpoints(session_key, created_at DESC);
|
|
21560
21560
|
CREATE INDEX IF NOT EXISTS idx_checkpoints_project
|
|
21561
21561
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
21562
|
-
\`)}function
|
|
21563
|
-
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)\`)}function
|
|
21562
|
+
\`)}function N9(Z){let X=Z.prepare("PRAGMA table_info(scheduled_tasks)").all(),z=new Set(X.flatMap((W)=>typeof W.name==="string"?[W.name]:[]));if(!z.has("skill_name"))Z.exec("ALTER TABLE scheduled_tasks ADD COLUMN skill_name TEXT");if(!z.has("skill_mode"))Z.exec(\`ALTER TABLE scheduled_tasks ADD COLUMN skill_mode TEXT
|
|
21563
|
+
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)\`)}function K9(Z){if(Z.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get())return;Z.exec(\`
|
|
21564
21564
|
CREATE TABLE skill_meta (
|
|
21565
21565
|
entity_id TEXT PRIMARY KEY REFERENCES entities(id),
|
|
21566
21566
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -21586,7 +21586,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21586
21586
|
|
|
21587
21587
|
CREATE INDEX idx_skill_meta_agent ON skill_meta(agent_id);
|
|
21588
21588
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
21589
|
-
\`)}function
|
|
21589
|
+
\`)}function j9(Z){let X=Z.prepare("PRAGMA table_info(entities)").all();if(!new Set(X.flatMap((W)=>typeof W.name==="string"?[W.name]:[])).has("agent_id"))Z.exec("ALTER TABLE entities ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");Z.exec("CREATE INDEX IF NOT EXISTS idx_entities_agent ON entities(agent_id)"),Z.exec(\`
|
|
21590
21590
|
CREATE TABLE IF NOT EXISTS entity_aspects (
|
|
21591
21591
|
id TEXT PRIMARY KEY,
|
|
21592
21592
|
entity_id TEXT NOT NULL REFERENCES entities(id) ON DELETE CASCADE,
|
|
@@ -21653,13 +21653,13 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21653
21653
|
CREATE INDEX IF NOT EXISTS idx_task_meta_agent ON task_meta(agent_id);
|
|
21654
21654
|
CREATE INDEX IF NOT EXISTS idx_task_meta_status ON task_meta(status);
|
|
21655
21655
|
CREATE INDEX IF NOT EXISTS idx_task_meta_retention ON task_meta(retention_until);
|
|
21656
|
-
\`)}function
|
|
21656
|
+
\`)}function pZ(Z,X,z,W){if(!Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function R9(Z){pZ(Z,"session_memories","entity_slot","INTEGER"),pZ(Z,"session_memories","aspect_slot","INTEGER"),pZ(Z,"session_memories","is_constraint","INTEGER NOT NULL DEFAULT 0"),pZ(Z,"session_memories","structural_density","INTEGER")}function S9(Z){let X=Z.prepare("PRAGMA table_info(session_checkpoints)").all(),z=new Set(X.flatMap((W)=>typeof W.name==="string"?[W.name]:[]));if(!z.has("focal_entity_ids"))Z.exec("ALTER TABLE session_checkpoints ADD COLUMN focal_entity_ids TEXT");if(!z.has("focal_entity_names"))Z.exec("ALTER TABLE session_checkpoints ADD COLUMN focal_entity_names TEXT");if(!z.has("active_aspect_ids"))Z.exec("ALTER TABLE session_checkpoints ADD COLUMN active_aspect_ids TEXT");if(!z.has("surfaced_constraint_count"))Z.exec("ALTER TABLE session_checkpoints ADD COLUMN surfaced_constraint_count INTEGER");if(!z.has("traversal_memory_count"))Z.exec("ALTER TABLE session_checkpoints ADD COLUMN traversal_memory_count INTEGER")}function m5(Z,X,z,W){if(!Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function C9(Z){m5(Z,"entities","pinned","INTEGER NOT NULL DEFAULT 0"),m5(Z,"entities","pinned_at","TEXT"),Z.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)")}function E9(Z){}function I9(Z){}function u5(Z,X,z,W){if(!Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function T9(Z){u5(Z,"session_memories","agent_relevance_score","REAL"),u5(Z,"session_memories","agent_feedback_count","INTEGER DEFAULT 0")}function P9(Z){}function w9(Z){Z.exec(\`
|
|
21657
21657
|
UPDATE entities
|
|
21658
21658
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
21659
21659
|
LOWER(TRIM(name)),
|
|
21660
21660
|
' ', ' '), ' ', ' '), ' ', ' ')
|
|
21661
21661
|
WHERE canonical_name IS NULL
|
|
21662
|
-
\`)}function
|
|
21662
|
+
\`)}function k9(Z){Z.exec(\`
|
|
21663
21663
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
21664
21664
|
archive_id TEXT PRIMARY KEY,
|
|
21665
21665
|
memory_id TEXT NOT NULL,
|
|
@@ -21693,7 +21693,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21693
21693
|
CREATE INDEX IF NOT EXISTS idx_cold_project ON memories_cold(project);
|
|
21694
21694
|
CREATE INDEX IF NOT EXISTS idx_cold_archived_at ON memories_cold(archived_at);
|
|
21695
21695
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
21696
|
-
\`)}function
|
|
21696
|
+
\`)}function b9(Z){Z.exec(\`
|
|
21697
21697
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
21698
21698
|
id TEXT PRIMARY KEY,
|
|
21699
21699
|
project TEXT,
|
|
@@ -21735,7 +21735,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21735
21735
|
CREATE UNIQUE INDEX IF NOT EXISTS idx_summaries_session_depth
|
|
21736
21736
|
ON session_summaries(session_key, depth)
|
|
21737
21737
|
WHERE session_key IS NOT NULL;
|
|
21738
|
-
\`)}function
|
|
21738
|
+
\`)}function f9(Z){Z.exec(\`
|
|
21739
21739
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
21740
21740
|
id TEXT PRIMARY KEY,
|
|
21741
21741
|
memory_id TEXT,
|
|
@@ -21773,11 +21773,11 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21773
21773
|
ON memory_jobs(completed_at);
|
|
21774
21774
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_failed_at
|
|
21775
21775
|
ON memory_jobs(failed_at);
|
|
21776
|
-
\`)}function
|
|
21776
|
+
\`)}function x9(Z){if(!Z.prepare("PRAGMA table_info(entity_dependencies)").all().some((W)=>W.name==="reason"))Z.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");if(!Z.prepare("PRAGMA table_info(entities)").all().some((W)=>W.name==="last_synthesized_at"))Z.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT")}function g9(Z){let X=Z.prepare("PRAGMA table_info(embeddings)").all();if(X.length===0)return;if(!X.some((z)=>z.name==="vector"))Z.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB")}function h9(Z){if(!Z.prepare("PRAGMA table_info(memories)").all().some((z)=>z.name==="scope"))Z.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");Z.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL")}function v9(Z){Z.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique"),Z.exec(\`
|
|
21777
21777
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
21778
21778
|
ON memories(content_hash, COALESCE(scope, '__NULL__'))
|
|
21779
21779
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
21780
|
-
\`)}function
|
|
21780
|
+
\`)}function y9(Z){Z.exec(\`
|
|
21781
21781
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
21782
21782
|
name, canonical_name,
|
|
21783
21783
|
content='entities', content_rowid='rowid'
|
|
@@ -21802,7 +21802,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21802
21802
|
INSERT INTO entities_fts(rowid, name, canonical_name)
|
|
21803
21803
|
VALUES (new.rowid, new.name, new.canonical_name);
|
|
21804
21804
|
END
|
|
21805
|
-
\`)}function
|
|
21805
|
+
\`)}function m9(Z){if(!Z.prepare("PRAGMA table_info(entity_dependencies)").all().some((z)=>z.name==="confidence"))Z.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7")}function u9(Z){if(Z.exec(\`
|
|
21806
21806
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
21807
21807
|
id TEXT PRIMARY KEY,
|
|
21808
21808
|
agent_id TEXT NOT NULL,
|
|
@@ -21812,7 +21812,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21812
21812
|
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
21813
21813
|
updated_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
21814
21814
|
)
|
|
21815
|
-
\`),Z.exec("CREATE INDEX IF NOT EXISTS idx_entity_communities_agent ON entity_communities(agent_id)"),!Z.prepare("PRAGMA table_info(entities)").all().some((z)=>z.name==="community_id"))Z.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)")}function
|
|
21815
|
+
\`),Z.exec("CREATE INDEX IF NOT EXISTS idx_entity_communities_agent ON entity_communities(agent_id)"),!Z.prepare("PRAGMA table_info(entities)").all().some((z)=>z.name==="community_id"))Z.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)")}function d9(Z){Z.exec(\`
|
|
21816
21816
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
21817
21817
|
id TEXT PRIMARY KEY,
|
|
21818
21818
|
memory_id TEXT NOT NULL REFERENCES memories(id) ON DELETE CASCADE,
|
|
@@ -21843,7 +21843,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21843
21843
|
INSERT INTO memory_hints_fts(rowid, hint)
|
|
21844
21844
|
VALUES (new.rowid, new.hint);
|
|
21845
21845
|
END
|
|
21846
|
-
\`)}function
|
|
21846
|
+
\`)}function c9(Z){Z.exec(\`
|
|
21847
21847
|
DELETE FROM entity_dependencies
|
|
21848
21848
|
WHERE id NOT IN (
|
|
21849
21849
|
SELECT MIN(id) FROM entity_dependencies
|
|
@@ -21857,7 +21857,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21857
21857
|
source_entity_id, target_entity_id,
|
|
21858
21858
|
dependency_type, agent_id
|
|
21859
21859
|
)
|
|
21860
|
-
\`)}function
|
|
21860
|
+
\`)}function p9(Z){Z.exec(\`
|
|
21861
21861
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
21862
21862
|
session_key TEXT PRIMARY KEY,
|
|
21863
21863
|
content TEXT NOT NULL,
|
|
@@ -21871,7 +21871,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21871
21871
|
ON session_transcripts(project);
|
|
21872
21872
|
CREATE INDEX IF NOT EXISTS idx_st_created
|
|
21873
21873
|
ON session_transcripts(created_at);
|
|
21874
|
-
\`)}function
|
|
21874
|
+
\`)}function l9(Z,X,z,W){if(!Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function i9(Z){l9(Z,"session_memories","path_json","TEXT"),Z.exec(\`
|
|
21875
21875
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
21876
21876
|
id TEXT PRIMARY KEY,
|
|
21877
21877
|
agent_id TEXT NOT NULL,
|
|
@@ -21936,7 +21936,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
21936
21936
|
created_at TEXT NOT NULL,
|
|
21937
21937
|
PRIMARY KEY (agent_id, session_key)
|
|
21938
21938
|
);
|
|
21939
|
-
\`)}function q8(Z,X,z,W){if(Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))return;Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function
|
|
21939
|
+
\`)}function q8(Z,X,z,W){if(Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))return;Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function n9(Z){q8(Z,"session_memories","entity_slot","INTEGER"),q8(Z,"session_memories","aspect_slot","INTEGER"),q8(Z,"session_memories","is_constraint","INTEGER NOT NULL DEFAULT 0"),q8(Z,"session_memories","structural_density","INTEGER"),q8(Z,"session_memories","predictor_rank","INTEGER"),q8(Z,"session_memories","agent_relevance_score","REAL"),q8(Z,"session_memories","agent_feedback_count","INTEGER DEFAULT 0"),q8(Z,"session_memories","path_json","TEXT");let W=Z.prepare("PRAGMA table_info(session_memories)").all().some((Y)=>Y.name==="agent_id")?"COALESCE(NULLIF(agent_id, ''), 'default')":"'default'";Z.exec(\`
|
|
21940
21940
|
CREATE TABLE IF NOT EXISTS session_memories_new (
|
|
21941
21941
|
id TEXT PRIMARY KEY,
|
|
21942
21942
|
session_key TEXT NOT NULL,
|
|
@@ -22004,7 +22004,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22004
22004
|
ON session_memories(memory_id);
|
|
22005
22005
|
CREATE INDEX IF NOT EXISTS idx_session_memories_agent_session
|
|
22006
22006
|
ON session_memories(agent_id, session_key);
|
|
22007
|
-
\`)}function
|
|
22007
|
+
\`)}function d5(Z,X,z,W){if(Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))return;Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function o9(Z){Z.exec(\`
|
|
22008
22008
|
CREATE TABLE IF NOT EXISTS agents (
|
|
22009
22009
|
id TEXT PRIMARY KEY,
|
|
22010
22010
|
name TEXT,
|
|
@@ -22014,12 +22014,12 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22014
22014
|
updated_at TEXT NOT NULL
|
|
22015
22015
|
);
|
|
22016
22016
|
\`);let X=new Date().toISOString();Z.prepare(\`INSERT OR IGNORE INTO agents (id, name, read_policy, created_at, updated_at)
|
|
22017
|
-
VALUES ('default', 'default', 'shared', ?, ?)\`).run(X,X),
|
|
22017
|
+
VALUES ('default', 'default', 'shared', ?, ?)\`).run(X,X),d5(Z,"memories","agent_id","TEXT DEFAULT 'default'"),d5(Z,"memories","visibility","TEXT DEFAULT 'global'"),Z.exec(\`
|
|
22018
22018
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_id
|
|
22019
22019
|
ON memories(agent_id);
|
|
22020
22020
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_visibility
|
|
22021
22021
|
ON memories(agent_id, visibility);
|
|
22022
|
-
\`)}function
|
|
22022
|
+
\`)}function y6(Z,X,z,W){if(Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))return;Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function s9(Z){y6(Z,"session_summaries","source_type","TEXT"),y6(Z,"session_summaries","source_ref","TEXT"),y6(Z,"session_summaries","meta_json","TEXT"),Z.exec(\`
|
|
22023
22023
|
UPDATE session_summaries
|
|
22024
22024
|
SET source_type = CASE
|
|
22025
22025
|
WHEN source_type IS NOT NULL THEN source_type
|
|
@@ -22033,7 +22033,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22033
22033
|
ON session_summaries(source_type);
|
|
22034
22034
|
CREATE INDEX IF NOT EXISTS idx_summaries_source_ref
|
|
22035
22035
|
ON session_summaries(source_ref);
|
|
22036
|
-
\`)}function
|
|
22036
|
+
\`)}function m6(Z,X,z,W){if(Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))return;Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function a9(Z){m6(Z,"session_transcripts","updated_at","TEXT"),m6(Z,"summary_jobs","agent_id","TEXT NOT NULL DEFAULT 'default'"),m6(Z,"session_scores","agent_id","TEXT NOT NULL DEFAULT 'default'"),Z.exec(\`
|
|
22037
22037
|
UPDATE session_transcripts
|
|
22038
22038
|
SET updated_at = COALESCE(updated_at, created_at)
|
|
22039
22039
|
WHERE updated_at IS NULL;
|
|
@@ -22092,7 +22092,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22092
22092
|
|
|
22093
22093
|
CREATE INDEX IF NOT EXISTS idx_memory_md_heads_lease
|
|
22094
22094
|
ON memory_md_heads(lease_expires_at);
|
|
22095
|
-
\`)}function
|
|
22095
|
+
\`)}function r9(Z){Z.exec(\`
|
|
22096
22096
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
22097
22097
|
|
|
22098
22098
|
CREATE TEMP TABLE IF NOT EXISTS session_summary_duplicate_map AS
|
|
@@ -22150,7 +22150,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22150
22150
|
ON session_summaries(agent_id, session_key, depth)
|
|
22151
22151
|
WHERE session_key IS NOT NULL
|
|
22152
22152
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
22153
|
-
\`)}function
|
|
22153
|
+
\`)}function t9(Z){Z.exec(\`
|
|
22154
22154
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
22155
22155
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
22156
22156
|
DROP TRIGGER IF EXISTS session_transcripts_fts_au;
|
|
@@ -22245,7 +22245,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22245
22245
|
ON session_summaries(agent_id, session_key, depth)
|
|
22246
22246
|
WHERE session_key IS NOT NULL
|
|
22247
22247
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
22248
|
-
\`)}function
|
|
22248
|
+
\`)}function e9(Z){Z.exec(\`
|
|
22249
22249
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
22250
22250
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
22251
22251
|
thread_key TEXT NOT NULL,
|
|
@@ -22360,7 +22360,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22360
22360
|
sample = excluded.sample,
|
|
22361
22361
|
updated_at = excluded.updated_at
|
|
22362
22362
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
22363
|
-
\`)}function
|
|
22363
|
+
\`)}function Zz(Z){Z.exec(\`
|
|
22364
22364
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
22365
22365
|
session_key TEXT NOT NULL,
|
|
22366
22366
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -22368,10 +22368,10 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22368
22368
|
last_extract_at TEXT NOT NULL,
|
|
22369
22369
|
PRIMARY KEY (session_key, agent_id)
|
|
22370
22370
|
);
|
|
22371
|
-
\`)}function
|
|
22371
|
+
\`)}function Xz(Z,X){return Z.prepare(\`SELECT name
|
|
22372
22372
|
FROM sqlite_master
|
|
22373
22373
|
WHERE type = 'table' AND name = ?
|
|
22374
|
-
LIMIT 1\`).get(X)!==void 0}function
|
|
22374
|
+
LIMIT 1\`).get(X)!==void 0}function zz(Z){if(Z.exec(\`
|
|
22375
22375
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
22376
22376
|
id TEXT PRIMARY KEY,
|
|
22377
22377
|
dependency_id TEXT NOT NULL,
|
|
@@ -22393,7 +22393,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22393
22393
|
ON entity_dependency_history(agent_id);
|
|
22394
22394
|
CREATE INDEX IF NOT EXISTS idx_entity_dependency_history_created
|
|
22395
22395
|
ON entity_dependency_history(created_at DESC);
|
|
22396
|
-
\`),!
|
|
22396
|
+
\`),!Xz(Z,"entity_dependencies"))return;Z.exec("DROP TRIGGER IF EXISTS trg_entity_dependencies_related_to_reason_insert"),Z.exec("DROP TRIGGER IF EXISTS trg_entity_dependencies_related_to_reason_update"),Z.exec("DROP TRIGGER IF EXISTS trg_entity_dependencies_audit_insert"),Z.exec("DROP TRIGGER IF EXISTS trg_entity_dependencies_audit_update"),Z.exec("DROP TRIGGER IF EXISTS trg_entity_dependencies_audit_delete"),Z.exec(\`
|
|
22397
22397
|
CREATE TRIGGER trg_entity_dependencies_related_to_reason_insert
|
|
22398
22398
|
BEFORE INSERT ON entity_dependencies
|
|
22399
22399
|
FOR EACH ROW
|
|
@@ -22518,7 +22518,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22518
22518
|
SET reason = 'legacy-unattributed related_to edge'
|
|
22519
22519
|
WHERE dependency_type = 'related_to'
|
|
22520
22520
|
AND (reason IS NULL OR length(trim(reason)) = 0)
|
|
22521
|
-
\`)}function
|
|
22521
|
+
\`)}function UZ(Z,X,z,W){if(Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))return;Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function $z(Z){UZ(Z,"summary_jobs","session_id","TEXT"),UZ(Z,"summary_jobs","trigger","TEXT NOT NULL DEFAULT 'session_end'"),UZ(Z,"summary_jobs","captured_at","TEXT"),UZ(Z,"summary_jobs","started_at","TEXT"),UZ(Z,"summary_jobs","ended_at","TEXT"),Z.exec(\`
|
|
22522
22522
|
UPDATE summary_jobs
|
|
22523
22523
|
SET
|
|
22524
22524
|
session_id = COALESCE(session_id, session_key, id),
|
|
@@ -22596,7 +22596,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22596
22596
|
\`),Z.exec(\`
|
|
22597
22597
|
INSERT INTO memory_artifacts_fts(memory_artifacts_fts)
|
|
22598
22598
|
VALUES ('rebuild');
|
|
22599
|
-
\`)}function
|
|
22599
|
+
\`)}function Qz(Z){Z.exec(\`
|
|
22600
22600
|
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
22601
22601
|
id TEXT PRIMARY KEY,
|
|
22602
22602
|
server_id TEXT NOT NULL,
|
|
@@ -22610,7 +22610,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22610
22610
|
);
|
|
22611
22611
|
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
22612
22612
|
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
22613
|
-
\`)}function
|
|
22613
|
+
\`)}function Wz(Z){Z.exec(\`
|
|
22614
22614
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
22615
22615
|
id TEXT PRIMARY KEY,
|
|
22616
22616
|
skill_name TEXT NOT NULL,
|
|
@@ -22623,7 +22623,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22623
22623
|
);
|
|
22624
22624
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_name ON skill_invocations(skill_name, created_at);
|
|
22625
22625
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
22626
|
-
\`)}function
|
|
22626
|
+
\`)}function Hz(Z){Z.exec(\`
|
|
22627
22627
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
22628
22628
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
22629
22629
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -22651,7 +22651,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22651
22651
|
|
|
22652
22652
|
CREATE INDEX IF NOT EXISTS idx_task_scope_hints_agent
|
|
22653
22653
|
ON task_scope_hints(agent_id, updated_at);
|
|
22654
|
-
\`)}function
|
|
22654
|
+
\`)}function Jz(Z){Z.exec(\`
|
|
22655
22655
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
22656
22656
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
22657
22657
|
tokens_since_last_pass INTEGER NOT NULL DEFAULT 0,
|
|
@@ -22681,7 +22681,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22681
22681
|
\`),Z.exec(\`
|
|
22682
22682
|
CREATE INDEX IF NOT EXISTS idx_dreaming_passes_agent
|
|
22683
22683
|
ON dreaming_passes (agent_id, created_at DESC);
|
|
22684
|
-
\`)}function
|
|
22684
|
+
\`)}function Yz(Z){let X=Z.prepare("PRAGMA table_info(memories)").all(),z=new Set(X.map((W)=>W.name).filter((W)=>typeof W==="string"));if(!z.has("agent_id"))Z.exec("ALTER TABLE memories ADD COLUMN agent_id TEXT DEFAULT 'default'");if(!z.has("scope"))Z.exec("ALTER TABLE memories ADD COLUMN scope TEXT")}function Vz(Z){Yz(Z),Z.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique"),Z.exec(\`
|
|
22685
22685
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
22686
22686
|
ON memories(
|
|
22687
22687
|
content_hash,
|
|
@@ -22689,24 +22689,24 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22689
22689
|
COALESCE(scope, '__NULL__')
|
|
22690
22690
|
)
|
|
22691
22691
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
22692
|
-
\`)}function
|
|
22692
|
+
\`)}function _z(Z){let X=e4(Z);if(X!==null&&!Z9(X))return;t4(Z)}function Bz(Z){Z.exec(\`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
22693
22693
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)\`),Z.exec(\`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
22694
22694
|
ON entities(entity_type, mentions)
|
|
22695
|
-
WHERE entity_type = 'extracted'\`)}function
|
|
22695
|
+
WHERE entity_type = 'extracted'\`)}function Uz(Z){if(!Z.prepare("PRAGMA table_info(entity_attributes)").all().some((z)=>z.name==="claim_key"))Z.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");Z.exec(\`CREATE INDEX IF NOT EXISTS idx_entity_attributes_claim_key
|
|
22696
22696
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
22697
|
-
WHERE claim_key IS NOT NULL\`)}function
|
|
22697
|
+
WHERE claim_key IS NOT NULL\`)}function Gz(Z){if(!Z.prepare("PRAGMA table_info(entity_attributes)").all().some((z)=>z.name==="group_key"))Z.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");Z.exec(\`CREATE INDEX IF NOT EXISTS idx_entity_attributes_group_key
|
|
22698
22698
|
ON entity_attributes(agent_id, aspect_id, group_key, status)
|
|
22699
22699
|
WHERE group_key IS NOT NULL\`),Z.exec(\`CREATE INDEX IF NOT EXISTS idx_entity_attributes_group_claim
|
|
22700
22700
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
22701
|
-
WHERE claim_key IS NOT NULL\`)}function
|
|
22701
|
+
WHERE claim_key IS NOT NULL\`)}function qz(Z){if(Z.prepare("PRAGMA table_info(memory_artifacts)").all().some((z)=>z.name==="source_mtime_ms"))return;Z.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL")}function Az(Z){let X=Z.prepare("PRAGMA table_info(memory_artifacts)").all(),z=new Set(X.map((W)=>W.name));if(!z.has("is_deleted"))Z.exec("ALTER TABLE memory_artifacts ADD COLUMN is_deleted INTEGER NOT NULL DEFAULT 0");if(!z.has("deleted_at"))Z.exec("ALTER TABLE memory_artifacts ADD COLUMN deleted_at TEXT");Z.exec(\`
|
|
22702
22702
|
CREATE INDEX IF NOT EXISTS idx_memory_artifacts_agent_deleted
|
|
22703
22703
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
22704
|
-
\`)}function
|
|
22704
|
+
\`)}function Mz(Z){Z.exec("DROP TRIGGER IF EXISTS memories_au"),Z.exec(\`
|
|
22705
22705
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
22706
22706
|
INSERT INTO memories_fts(memories_fts, rowid, content) VALUES('delete', old.rowid, old.content);
|
|
22707
22707
|
INSERT INTO memories_fts(rowid, content) VALUES (new.rowid, new.content);
|
|
22708
22708
|
END;
|
|
22709
|
-
\`)}function
|
|
22709
|
+
\`)}function Dz(Z,X,z){return Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((Y)=>Y.name===z)}function lZ(Z,X,z,W){if(!Dz(Z,X,z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function Lz(Z){for(let X of["entities","entity_communities","entity_attributes","entity_dependencies"])lZ(Z,X,"source_id","TEXT"),lZ(Z,X,"source_kind","TEXT"),lZ(Z,X,"source_path","TEXT"),lZ(Z,X,"source_root","TEXT");Z.exec("CREATE INDEX IF NOT EXISTS idx_entities_source ON entities(agent_id, source_id, source_path)"),Z.exec("CREATE INDEX IF NOT EXISTS idx_entity_communities_source ON entity_communities(agent_id, source_id, source_path)"),Z.exec("CREATE INDEX IF NOT EXISTS idx_entity_attributes_source ON entity_attributes(agent_id, source_id, source_path)"),Z.exec("CREATE INDEX IF NOT EXISTS idx_entity_dependencies_source_origin ON entity_dependencies(agent_id, source_id, source_path)")}function Oz(Z,X){return Z.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = ?").get(X)?.name===X}function Fz(Z,X,z){return Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((Y)=>Y.name===z)}function Nz(Z){if(!Oz(Z,"embeddings"))return;if(!Fz(Z,"embeddings","agent_id"))Z.exec("ALTER TABLE embeddings ADD COLUMN agent_id TEXT");Z.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)")}function Kz(Z){Z.exec(\`
|
|
22710
22710
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
22711
22711
|
id TEXT PRIMARY KEY,
|
|
22712
22712
|
created_at TEXT NOT NULL,
|
|
@@ -22735,7 +22735,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22735
22735
|
ON memory_search_telemetry(route, created_at DESC);
|
|
22736
22736
|
CREATE INDEX IF NOT EXISTS idx_memory_search_telemetry_no_hits
|
|
22737
22737
|
ON memory_search_telemetry(no_hits, created_at DESC);
|
|
22738
|
-
\`)}function
|
|
22738
|
+
\`)}function jz(Z,X,z){return Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((Y)=>Y.name===z)}function c5(Z,X,z,W){if(!jz(Z,X,z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function Rz(Z){Z.exec(\`
|
|
22739
22739
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
22740
22740
|
id TEXT PRIMARY KEY,
|
|
22741
22741
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -22770,7 +22770,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22770
22770
|
|
|
22771
22771
|
CREATE INDEX IF NOT EXISTS idx_ontology_proposals_source
|
|
22772
22772
|
ON ontology_proposals(agent_id, source_kind, source_id);
|
|
22773
|
-
\`);for(let X of["entity_attributes","entity_dependencies"])
|
|
22773
|
+
\`);for(let X of["entity_attributes","entity_dependencies"])c5(Z,X,"proposal_id","TEXT"),c5(Z,X,"proposal_evidence","TEXT NOT NULL DEFAULT '[]'"),Z.exec(\`CREATE INDEX IF NOT EXISTS idx_\${X}_proposal ON \${X}(agent_id, proposal_id)\`)}function Sz(Z){Z.exec(\`
|
|
22774
22774
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
22775
22775
|
id TEXT PRIMARY KEY,
|
|
22776
22776
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -22794,7 +22794,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22794
22794
|
CREATE UNIQUE INDEX IF NOT EXISTS idx_daily_reflections_agent_content_key
|
|
22795
22795
|
ON daily_reflections(agent_id, date, content_key)
|
|
22796
22796
|
WHERE content_key IS NOT NULL;
|
|
22797
|
-
\`)}function
|
|
22797
|
+
\`)}function Cz(Z){let X=Z.prepare("PRAGMA table_info(daily_reflections)").all();if(!new Set(X.flatMap((W)=>typeof W.name==="string"?[W.name]:[])).has("content_key"))Z.exec("ALTER TABLE daily_reflections ADD COLUMN content_key TEXT");Z.exec(\`
|
|
22798
22798
|
DROP INDEX IF EXISTS idx_daily_reflections_agent_date;
|
|
22799
22799
|
DROP INDEX IF EXISTS idx_daily_reflections_agent_content_key;
|
|
22800
22800
|
|
|
@@ -22807,11 +22807,11 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22807
22807
|
CREATE UNIQUE INDEX IF NOT EXISTS idx_daily_reflections_agent_content_key
|
|
22808
22808
|
ON daily_reflections(agent_id, date, content_key)
|
|
22809
22809
|
WHERE content_key IS NOT NULL;
|
|
22810
|
-
\`)}function
|
|
22810
|
+
\`)}function Ez(Z,X,z){return Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((Y)=>Y.name===z)}function h0(Z,X,z,W){if(!Ez(Z,X,z))Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function Iz(Z){Z.exec(\`
|
|
22811
22811
|
UPDATE entity_attributes
|
|
22812
22812
|
SET version_root_id = id
|
|
22813
22813
|
WHERE version_root_id IS NULL
|
|
22814
|
-
\`)}function
|
|
22814
|
+
\`)}function Tz(Z){for(let X of["entities","entity_aspects","entity_dependencies"])h0(Z,X,"status","TEXT NOT NULL DEFAULT 'active'"),h0(Z,X,"archived_at","TEXT"),h0(Z,X,"archived_by","TEXT"),h0(Z,X,"archive_reason","TEXT");for(let X of["entities","entity_aspects"])h0(Z,X,"proposal_id","TEXT"),h0(Z,X,"proposal_evidence","TEXT NOT NULL DEFAULT '[]'");h0(Z,"entity_attributes","version","INTEGER NOT NULL DEFAULT 1"),h0(Z,"entity_attributes","version_root_id","TEXT"),h0(Z,"entity_attributes","previous_attribute_id","TEXT"),h0(Z,"entity_attributes","archived_at","TEXT"),h0(Z,"entity_attributes","archived_by","TEXT"),h0(Z,"entity_attributes","archive_reason","TEXT"),Iz(Z),Z.exec(\`
|
|
22815
22815
|
CREATE INDEX IF NOT EXISTS idx_entities_status
|
|
22816
22816
|
ON entities(agent_id, status, updated_at DESC);
|
|
22817
22817
|
CREATE INDEX IF NOT EXISTS idx_entity_aspects_status
|
|
@@ -22826,7 +22826,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22826
22826
|
ON entities(agent_id, proposal_id);
|
|
22827
22827
|
CREATE INDEX IF NOT EXISTS idx_entity_aspects_proposal
|
|
22828
22828
|
ON entity_aspects(agent_id, proposal_id);
|
|
22829
|
-
\`)}function
|
|
22829
|
+
\`)}function Pz(Z){Z.exec(\`
|
|
22830
22830
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
22831
22831
|
id TEXT PRIMARY KEY,
|
|
22832
22832
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -22865,7 +22865,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22865
22865
|
ON epistemic_assertions(agent_id, source_kind, source_id);
|
|
22866
22866
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_claim
|
|
22867
22867
|
ON epistemic_assertions(agent_id, claim_attribute_id);
|
|
22868
|
-
\`)}function
|
|
22868
|
+
\`)}function wz(Z){let X=Z.prepare("PRAGMA table_info(memories)").all(),z=new Set(X.map((W)=>W.name).filter((W)=>typeof W==="string"));if(!z.has("agent_id"))Z.exec("ALTER TABLE memories ADD COLUMN agent_id TEXT DEFAULT 'default'");if(!z.has("visibility"))Z.exec("ALTER TABLE memories ADD COLUMN visibility TEXT DEFAULT 'global'");if(!z.has("scope"))Z.exec("ALTER TABLE memories ADD COLUMN scope TEXT");if(!z.has("idempotency_key"))Z.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");if(!z.has("runtime_path"))Z.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT")}function kz(Z){wz(Z),Z.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key"),Z.exec(\`
|
|
22869
22869
|
CREATE UNIQUE INDEX idx_memories_idempotency_key
|
|
22870
22870
|
ON memories(
|
|
22871
22871
|
idempotency_key,
|
|
@@ -22874,7 +22874,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22874
22874
|
COALESCE(scope, '__NULL__')
|
|
22875
22875
|
)
|
|
22876
22876
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
22877
|
-
\`)}function
|
|
22877
|
+
\`)}function bz(Z){Z.exec(\`
|
|
22878
22878
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
22879
22879
|
session_key TEXT NOT NULL,
|
|
22880
22880
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -22906,7 +22906,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22906
22906
|
ON session_recall_events(session_key, agent_id, context_epoch, created_at DESC);
|
|
22907
22907
|
CREATE INDEX IF NOT EXISTS idx_session_recall_events_item
|
|
22908
22908
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
22909
|
-
\`)}function
|
|
22909
|
+
\`)}function fz(Z){Z.exec(\`
|
|
22910
22910
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
22911
22911
|
aggregate_memory_id TEXT NOT NULL,
|
|
22912
22912
|
source_memory_id TEXT NOT NULL,
|
|
@@ -22916,12 +22916,12 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22916
22916
|
);
|
|
22917
22917
|
CREATE INDEX IF NOT EXISTS idx_aggregate_memory_sources_agent
|
|
22918
22918
|
ON aggregate_memory_sources(agent_id, aggregate_memory_id);
|
|
22919
|
-
\`)}function
|
|
22919
|
+
\`)}function GZ(Z,X,z,W){if(Z.prepare(\`PRAGMA table_info(\${X})\`).all().some((q)=>q.name===z))return;Z.exec(\`ALTER TABLE \${X} ADD COLUMN \${z} \${W}\`)}function xz(Z){GZ(Z,"memory_artifacts","source_id","TEXT"),GZ(Z,"memory_artifacts","source_root","TEXT"),GZ(Z,"memory_artifacts","source_external_id","TEXT"),GZ(Z,"memory_artifacts","source_parent_path","TEXT"),GZ(Z,"memory_artifacts","source_meta_json","TEXT"),Z.exec(\`
|
|
22920
22920
|
CREATE INDEX IF NOT EXISTS idx_memory_artifacts_agent_source
|
|
22921
22921
|
ON memory_artifacts(agent_id, source_id, source_external_id);
|
|
22922
22922
|
CREATE INDEX IF NOT EXISTS idx_memory_artifacts_agent_source_root
|
|
22923
22923
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
22924
|
-
\`)}function
|
|
22924
|
+
\`)}function gz(Z){Z.exec(\`
|
|
22925
22925
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
22926
22926
|
id TEXT PRIMARY KEY,
|
|
22927
22927
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -22941,7 +22941,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22941
22941
|
ON temporal_edges(agent_id, facet, start_at, end_at);
|
|
22942
22942
|
CREATE INDEX IF NOT EXISTS idx_temporal_edges_agent_subject
|
|
22943
22943
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
22944
|
-
\`)}function
|
|
22944
|
+
\`)}function hz(Z){Z.exec(\`
|
|
22945
22945
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
22946
22946
|
id TEXT PRIMARY KEY,
|
|
22947
22947
|
entity_id TEXT NOT NULL REFERENCES entities(id) ON DELETE CASCADE,
|
|
@@ -22962,7 +22962,7 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22962
22962
|
ON entity_aliases(agent_id, entity_id, status);
|
|
22963
22963
|
CREATE INDEX IF NOT EXISTS idx_entity_aliases_lookup
|
|
22964
22964
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
22965
|
-
\`)}function
|
|
22965
|
+
\`)}function vz(Z){Z.exec(\`
|
|
22966
22966
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
22967
22967
|
id TEXT PRIMARY KEY,
|
|
22968
22968
|
prefix TEXT NOT NULL UNIQUE,
|
|
@@ -22987,25 +22987,25 @@ $&\`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,"$1$2").re
|
|
|
22987
22987
|
ON api_keys(revoked_at, expires_at);
|
|
22988
22988
|
CREATE INDEX IF NOT EXISTS idx_api_keys_connector
|
|
22989
22989
|
ON api_keys(connector, harness);
|
|
22990
|
-
\`)}var d5=[{version:1,name:"baseline",up:r4,artifacts:{tables:["memories","conversations","embeddings"]}},{version:2,name:"pipeline-v2",up:e4,artifacts:{tables:["memory_history","memory_jobs","entities","relations","memory_entity_mentions"]}},{version:3,name:"unique-content-hash",up:Z9},{version:4,name:"history-actor-and-retention",up:z9,artifacts:{columns:[{table:"memory_history",column:"actor_type"}]}},{version:5,name:"graph-extended",up:Q9,artifacts:{columns:[{table:"entities",column:"canonical_name"}]}},{version:6,name:"idempotency-key",up:W9,artifacts:{columns:[{table:"memories",column:"idempotency_key"}]}},{version:7,name:"documents-and-connectors",up:J9,artifacts:{tables:["documents","document_memories","connectors"]}},{version:8,name:"embeddings-unique-hash",up:Y9},{version:9,name:"summary-jobs",up:V9,artifacts:{tables:["summary_jobs"]}},{version:10,name:"umap-cache",up:_9,artifacts:{tables:["umap_cache"]}},{version:11,name:"session-scores",up:B9,artifacts:{tables:["session_scores"]}},{version:12,name:"scheduled-tasks",up:U9,artifacts:{tables:["scheduled_tasks","task_runs"]}},{version:13,name:"ingestion-tracking",up:G9,artifacts:{tables:["ingestion_jobs"],columns:[{table:"memories",column:"source_path"},{table:"memories",column:"source_section"}]}},{version:14,name:"telemetry",up:q9,artifacts:{tables:["telemetry_events"]}},{version:15,name:"session-memories",up:A9,artifacts:{tables:["session_memories"],columns:[{table:"session_scores",column:"confidence"},{table:"session_scores",column:"continuity_reasoning"}]}},{version:16,name:"session-checkpoints",up:M9,artifacts:{tables:["session_checkpoints"]}},{version:17,name:"task-skills",up:D9,artifacts:{columns:[{table:"scheduled_tasks",column:"skill_name"}]}},{version:18,name:"skill-meta",up:L9,artifacts:{tables:["skill_meta"]}},{version:19,name:"knowledge-structure",up:O9,artifacts:{tables:["entity_aspects","entity_attributes","entity_dependencies","task_meta"],columns:[{table:"entities",column:"agent_id"}]}},{version:20,name:"session-structural-columns",up:F9,artifacts:{columns:[{table:"session_memories",column:"entity_slot"},{table:"session_memories",column:"aspect_slot"},{table:"session_memories",column:"is_constraint"},{table:"session_memories",column:"structural_density"}]}},{version:21,name:"checkpoint-structural",up:N9,artifacts:{columns:[{table:"session_checkpoints",column:"focal_entity_ids"}]}},{version:22,name:"entity-pinning",up:K9,artifacts:{columns:[{table:"entities",column:"pinned"},{table:"entities",column:"pinned_at"}]}},{version:23,name:"retired-scorer-gap",up:j9},{version:24,name:"retired-scorer-gap",up:R9},{version:25,name:"agent-feedback",up:S9,artifacts:{columns:[{table:"session_memories",column:"agent_relevance_score"}]}},{version:26,name:"retired-scorer-gap",up:C9},{version:27,name:"backfill-canonical-names",up:E9},{version:28,name:"lossless-retention",up:I9},{version:29,name:"session-summary-dag",up:T9},{version:30,name:"nullable-memory-job-memory-id",up:P9},{version:31,name:"dependency-reason",up:w9,artifacts:{columns:[{table:"entity_dependencies",column:"reason"},{table:"entities",column:"last_synthesized_at"}]}},{version:32,name:"embeddings-vector-column",up:k9,artifacts:{columns:[{table:"embeddings",column:"vector",optional:!0}]}},{version:33,name:"scope",up:b9,artifacts:{columns:[{table:"memories",column:"scope"}]}},{version:34,name:"scope-aware-dedup",up:f9},{version:35,name:"entity-fts",up:x9},{version:36,name:"dependency-confidence",up:g9,artifacts:{columns:[{table:"entity_dependencies",column:"confidence"}]}},{version:37,name:"entity-communities",up:h9,artifacts:{tables:["entity_communities"],columns:[{table:"entities",column:"community_id"}]}},{version:38,name:"memory-hints",up:v9,artifacts:{tables:["memory_hints"]}},{version:39,name:"dedup-entity-dependencies",up:y9},{version:40,name:"session-transcripts",up:m9,artifacts:{tables:["session_transcripts"]}},{version:41,name:"path-feedback",up:d9,artifacts:{tables:["path_feedback_events","path_feedback_stats","entity_retrieval_stats","entity_cooccurrence","path_feedback_sessions"],columns:[{table:"session_memories",column:"path_json"}]}},{version:42,name:"session-memories-agent-id",up:c9,artifacts:{columns:[{table:"session_memories",column:"agent_id"}]}},{version:43,name:"agents-table",up:p9,artifacts:{tables:["agents"],columns:[{table:"memories",column:"agent_id"},{table:"memories",column:"visibility"}]}},{version:44,name:"memory-md-temporal-head",up:l9,artifacts:{columns:[{table:"session_summaries",column:"source_type"},{table:"session_summaries",column:"source_ref"},{table:"session_summaries",column:"meta_json"}]}},{version:45,name:"lossless-working-memory-hardening",up:i9,artifacts:{tables:["session_transcripts_fts","memory_md_heads"],columns:[{table:"session_transcripts",column:"updated_at"},{table:"summary_jobs",column:"agent_id"},{table:"session_scores",column:"agent_id"}]}},{version:46,name:"session-summary-uniqueness",up:n9},{version:47,name:"agent-scoped-temporal-uniqueness",up:o9},{version:48,name:"thread-heads",up:s9,artifacts:{tables:["memory_thread_heads"]}},{version:49,name:"session-extract-cursors",up:a9,artifacts:{tables:["session_extract_cursors"]}},{version:50,name:"related-to-audit",up:t9,artifacts:{tables:["entity_dependency_history"]}},{version:51,name:"memory-md-rolling-window-lineage",up:e9,artifacts:{tables:["memory_artifacts","memory_artifact_tombstones","memory_artifacts_fts"],columns:[{table:"summary_jobs",column:"session_id"},{table:"summary_jobs",column:"trigger"},{table:"summary_jobs",column:"captured_at"},{table:"summary_jobs",column:"started_at"},{table:"summary_jobs",column:"ended_at"}]}},{version:52,name:"mcp-invocations",up:Zz,artifacts:{tables:["mcp_invocations"]}},{version:53,name:"skill-invocations",up:Xz,artifacts:{tables:["skill_invocations"]}},{version:54,name:"task-agent-scope",up:zz,artifacts:{tables:["task_scope_hints"]}},{version:55,name:"dreaming-state",up:$z,artifacts:{tables:["dreaming_state","dreaming_passes"]}},{version:56,name:"agent-scoped-content-hash",up:Wz},{version:57,name:"memories-fts-tokenizer-repair",up:Hz},{version:58,name:"knowledge-graph-indices",up:Jz},{version:59,name:"entity-attribute-claim-key",up:Yz,artifacts:{columns:[{table:"entity_attributes",column:"claim_key"}]}},{version:60,name:"entity-attribute-group-key",up:Vz,artifacts:{columns:[{table:"entity_attributes",column:"group_key"}]}},{version:61,name:"memory-artifact-source-mtime",up:_z,artifacts:{columns:[{table:"memory_artifacts",column:"source_mtime_ms"}]}},{version:62,name:"memory-artifact-soft-delete",up:Bz,artifacts:{columns:[{table:"memory_artifacts",column:"is_deleted"},{table:"memory_artifacts",column:"deleted_at"}]}},{version:63,name:"content-only-memories-fts-update",up:Uz},{version:64,name:"source-graph-provenance",up:qz,artifacts:{columns:[{table:"entities",column:"source_path"},{table:"entity_communities",column:"source_path"},{table:"entity_attributes",column:"source_path"},{table:"entity_dependencies",column:"source_path"}]}},{version:65,name:"source-embedding-agent-scope",up:Dz,artifacts:{columns:[{table:"embeddings",column:"agent_id",optional:!0}]}},{version:66,name:"memory-search-telemetry",up:Lz,artifacts:{tables:["memory_search_telemetry"]}},{version:67,name:"ontology-proposals",up:Fz,artifacts:{tables:["ontology_proposals"],columns:[{table:"entity_attributes",column:"proposal_id"},{table:"entity_attributes",column:"proposal_evidence"},{table:"entity_dependencies",column:"proposal_id"},{table:"entity_dependencies",column:"proposal_evidence"}]}},{version:68,name:"daily-reflections",up:Nz,artifacts:{tables:["daily_reflections"]}},{version:69,name:"daily-reflections-multiple-insights",up:Kz,artifacts:{tables:["daily_reflections"]}},{version:70,name:"ontology-control-plane-state",up:Sz,artifacts:{columns:[{table:"entities",column:"status"},{table:"entity_aspects",column:"status"},{table:"entity_attributes",column:"version"},{table:"entity_attributes",column:"version_root_id"},{table:"entity_attributes",column:"previous_attribute_id"},{table:"entity_dependencies",column:"status"}]}},{version:71,name:"epistemic-assertions",up:Cz,artifacts:{tables:["epistemic_assertions"]}},{version:72,name:"agent-scoped-idempotency-key",up:Iz,artifacts:{columns:[{table:"memories",column:"idempotency_key"},{table:"memories",column:"runtime_path"}]}},{version:73,name:"recall-context-dedupe",up:Tz,artifacts:{tables:["session_context_epochs","session_recall_events"]}},{version:74,name:"aggregate-memory-links",up:Pz,artifacts:{tables:["aggregate_memory_sources"]}},{version:75,name:"memory-artifact-source-provenance",up:wz,artifacts:{columns:[{table:"memory_artifacts",column:"source_id"},{table:"memory_artifacts",column:"source_root"},{table:"memory_artifacts",column:"source_external_id"},{table:"memory_artifacts",column:"source_parent_path"},{table:"memory_artifacts",column:"source_meta_json"}]}},{version:76,name:"temporal-edges",up:kz,artifacts:{tables:["temporal_edges"]}},{version:77,name:"entity-aliases",up:bz,artifacts:{tables:["entity_aliases"]}},{version:78,name:"api-keys",up:fz,artifacts:{tables:["api_keys"]}}];var TJ=d5[d5.length-1]?.version??0;var xz=i4(import.meta.url),PJ=l4(xz);var wJ=p5(U7(),1);var gz=p5(U7(),1);function hz(Z){try{let X=gz.default.parse(Z);return typeof X==="object"&&X!==null?X:{}}catch{return{}}}var yz=null;try{yz=vz(import.meta.url)("@signet/native")}catch{}function P8(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function t6(Z){return Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0))}function mz(Z){if(typeof Z==="string"){let X=Z.split(",").map((z)=>z.trim()).filter((z)=>z.length>0).join(",");return X.length>0?X:void 0}if(Array.isArray(Z)){let X=Z.map((z)=>z.trim()).filter((z)=>z.length>0).join(",");return X.length>0?X:void 0}return}function uz(Z){return{primary:Z.filter((X)=>X.supplementary!==!0),supporting:Z.filter((X)=>X.supplementary===!0)}}function dz(Z,X){if(!P8(Z))return{totalReturned:X,hasSupplementary:!1,noHits:X===0};let z=typeof Z.totalReturned==="number"?Z.totalReturned:X,W=Z.hasSupplementary===!0,V="noHits"in Z?Z.noHits===!0:z===0,q=P8(Z.dedupe)?{enabled:Z.dedupe.enabled===!0,contextEpoch:typeof Z.dedupe.contextEpoch==="number"?Z.dedupe.contextEpoch:void 0,suppressed:typeof Z.dedupe.suppressed==="number"?Z.dedupe.suppressed:0,repeatedReturned:typeof Z.dedupe.repeatedReturned==="number"?Z.dedupe.repeatedReturned:0}:void 0,B=P8(Z.temporal)?Z.temporal:void 0;return{totalReturned:z,hasSupplementary:W,noHits:V,...q?{dedupe:q}:{},...B?{temporal:B}:{}}}function FZ(Z){let X=P8(Z)?Z:{},W=(Array.isArray(X.results)?X.results:Array.isArray(X.memories)?X.memories:[]).filter(P8);return{query:typeof X.query==="string"?X.query:void 0,method:typeof X.method==="string"?X.method:void 0,rows:W,meta:dz(X.meta,W.length),message:typeof X.message==="string"?X.message:void 0}}function cz(Z){return typeof Z==="string"&&Z.length>0?Z.slice(0,10):"unknown"}function m6(Z,X){let z=typeof Z.score==="number"?\`[\${(Z.score*100).toFixed(0)}%] \`:"",W=typeof Z.source==="string"?Z.source:"unknown",V=typeof Z.type==="string"?Z.type:"memory",q=typeof Z.who==="string"&&Z.who.length>0?\`, by \${Z.who}\`:"",B=cz(Z.created_at),U=typeof Z.id==="string"&&Z.id.length>0?\`id: \${Z.id}; \`:"";return\`\${X?.includeIndex?\`\${X.includeIndex}. \`:"- "}\${z}\${U}\${Z.content??""} (\${V}, \${W}, \${B}\${q})\`}function pz(Z){if(Z.temporal_facet==="session")return"Sessions";if(Z.temporal_facet==="source")return"Source Activity";if(Z.temporal_facet==="occurred"||Z.temporal_facet==="observed"||Z.temporal_facet==="valid")return"Events";return"Memories Captured"}function lz(Z){let X=new Date(Z);if(Number.isNaN(X.getTime()))return Z.slice(0,10);return X.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric",timeZone:"UTC"})}function iz(Z,X){let z=[lz(X.start)],W=new Map;for(let V of Z){let q=pz(V);W.set(q,[...W.get(q)??[],V])}for(let V of["Sessions","Source Activity","Events","Memories Captured"]){let q=W.get(V);if(!q||q.length===0)continue;z.push("",V,...q.map((B)=>m6(B)))}return z.join(\`
|
|
22991
|
-
\`)}function
|
|
22992
|
-
\`)}function e6(Z,X={}){return t6({query:Z,keywordQuery:X.keywordQuery??X.keyword_query,limit:X.limit,project:X.project,type:X.type,tags:X.tags,who:X.who,pinned:X.pinned===!0?!0:void 0,importance_min:X.importance_min,since:X.since,until:X.until,time:X.time,expand:X.expand===!0?!0:void 0,agentId:X.agentId,sessionKey:X.sessionKey,includeRecalled:X.includeRecalled===!0?!0:void 0,scope:X.scope,sourceOnly:X.sourceOnly===!0?!0:void 0,aggregate:X.aggregate===!0?!0:void 0,aggregateBudget:X.aggregateBudget??X.aggregate_budget,saveAggregate:X.saveAggregate===!1||X.save_aggregate===!1?!1:X.saveAggregate===!0||X.save_aggregate===!0?!0:void 0})}function
|
|
22993
|
-
[truncated]\`;z.push(\`## \${
|
|
22990
|
+
\`)}var p5=[{version:1,name:"baseline",up:X9,artifacts:{tables:["memories","conversations","embeddings"]}},{version:2,name:"pipeline-v2",up:$9,artifacts:{tables:["memory_history","memory_jobs","entities","relations","memory_entity_mentions"]}},{version:3,name:"unique-content-hash",up:Q9},{version:4,name:"history-actor-and-retention",up:H9,artifacts:{columns:[{table:"memory_history",column:"actor_type"}]}},{version:5,name:"graph-extended",up:Y9,artifacts:{columns:[{table:"entities",column:"canonical_name"}]}},{version:6,name:"idempotency-key",up:V9,artifacts:{columns:[{table:"memories",column:"idempotency_key"}]}},{version:7,name:"documents-and-connectors",up:B9,artifacts:{tables:["documents","document_memories","connectors"]}},{version:8,name:"embeddings-unique-hash",up:U9},{version:9,name:"summary-jobs",up:G9,artifacts:{tables:["summary_jobs"]}},{version:10,name:"umap-cache",up:q9,artifacts:{tables:["umap_cache"]}},{version:11,name:"session-scores",up:A9,artifacts:{tables:["session_scores"]}},{version:12,name:"scheduled-tasks",up:M9,artifacts:{tables:["scheduled_tasks","task_runs"]}},{version:13,name:"ingestion-tracking",up:D9,artifacts:{tables:["ingestion_jobs"],columns:[{table:"memories",column:"source_path"},{table:"memories",column:"source_section"}]}},{version:14,name:"telemetry",up:L9,artifacts:{tables:["telemetry_events"]}},{version:15,name:"session-memories",up:O9,artifacts:{tables:["session_memories"],columns:[{table:"session_scores",column:"confidence"},{table:"session_scores",column:"continuity_reasoning"}]}},{version:16,name:"session-checkpoints",up:F9,artifacts:{tables:["session_checkpoints"]}},{version:17,name:"task-skills",up:N9,artifacts:{columns:[{table:"scheduled_tasks",column:"skill_name"}]}},{version:18,name:"skill-meta",up:K9,artifacts:{tables:["skill_meta"]}},{version:19,name:"knowledge-structure",up:j9,artifacts:{tables:["entity_aspects","entity_attributes","entity_dependencies","task_meta"],columns:[{table:"entities",column:"agent_id"}]}},{version:20,name:"session-structural-columns",up:R9,artifacts:{columns:[{table:"session_memories",column:"entity_slot"},{table:"session_memories",column:"aspect_slot"},{table:"session_memories",column:"is_constraint"},{table:"session_memories",column:"structural_density"}]}},{version:21,name:"checkpoint-structural",up:S9,artifacts:{columns:[{table:"session_checkpoints",column:"focal_entity_ids"}]}},{version:22,name:"entity-pinning",up:C9,artifacts:{columns:[{table:"entities",column:"pinned"},{table:"entities",column:"pinned_at"}]}},{version:23,name:"retired-scorer-gap",up:E9},{version:24,name:"retired-scorer-gap",up:I9},{version:25,name:"agent-feedback",up:T9,artifacts:{columns:[{table:"session_memories",column:"agent_relevance_score"}]}},{version:26,name:"retired-scorer-gap",up:P9},{version:27,name:"backfill-canonical-names",up:w9},{version:28,name:"lossless-retention",up:k9},{version:29,name:"session-summary-dag",up:b9},{version:30,name:"nullable-memory-job-memory-id",up:f9},{version:31,name:"dependency-reason",up:x9,artifacts:{columns:[{table:"entity_dependencies",column:"reason"},{table:"entities",column:"last_synthesized_at"}]}},{version:32,name:"embeddings-vector-column",up:g9,artifacts:{columns:[{table:"embeddings",column:"vector",optional:!0}]}},{version:33,name:"scope",up:h9,artifacts:{columns:[{table:"memories",column:"scope"}]}},{version:34,name:"scope-aware-dedup",up:v9},{version:35,name:"entity-fts",up:y9},{version:36,name:"dependency-confidence",up:m9,artifacts:{columns:[{table:"entity_dependencies",column:"confidence"}]}},{version:37,name:"entity-communities",up:u9,artifacts:{tables:["entity_communities"],columns:[{table:"entities",column:"community_id"}]}},{version:38,name:"memory-hints",up:d9,artifacts:{tables:["memory_hints"]}},{version:39,name:"dedup-entity-dependencies",up:c9},{version:40,name:"session-transcripts",up:p9,artifacts:{tables:["session_transcripts"]}},{version:41,name:"path-feedback",up:i9,artifacts:{tables:["path_feedback_events","path_feedback_stats","entity_retrieval_stats","entity_cooccurrence","path_feedback_sessions"],columns:[{table:"session_memories",column:"path_json"}]}},{version:42,name:"session-memories-agent-id",up:n9,artifacts:{columns:[{table:"session_memories",column:"agent_id"}]}},{version:43,name:"agents-table",up:o9,artifacts:{tables:["agents"],columns:[{table:"memories",column:"agent_id"},{table:"memories",column:"visibility"}]}},{version:44,name:"memory-md-temporal-head",up:s9,artifacts:{columns:[{table:"session_summaries",column:"source_type"},{table:"session_summaries",column:"source_ref"},{table:"session_summaries",column:"meta_json"}]}},{version:45,name:"lossless-working-memory-hardening",up:a9,artifacts:{tables:["session_transcripts_fts","memory_md_heads"],columns:[{table:"session_transcripts",column:"updated_at"},{table:"summary_jobs",column:"agent_id"},{table:"session_scores",column:"agent_id"}]}},{version:46,name:"session-summary-uniqueness",up:r9},{version:47,name:"agent-scoped-temporal-uniqueness",up:t9},{version:48,name:"thread-heads",up:e9,artifacts:{tables:["memory_thread_heads"]}},{version:49,name:"session-extract-cursors",up:Zz,artifacts:{tables:["session_extract_cursors"]}},{version:50,name:"related-to-audit",up:zz,artifacts:{tables:["entity_dependency_history"]}},{version:51,name:"memory-md-rolling-window-lineage",up:$z,artifacts:{tables:["memory_artifacts","memory_artifact_tombstones","memory_artifacts_fts"],columns:[{table:"summary_jobs",column:"session_id"},{table:"summary_jobs",column:"trigger"},{table:"summary_jobs",column:"captured_at"},{table:"summary_jobs",column:"started_at"},{table:"summary_jobs",column:"ended_at"}]}},{version:52,name:"mcp-invocations",up:Qz,artifacts:{tables:["mcp_invocations"]}},{version:53,name:"skill-invocations",up:Wz,artifacts:{tables:["skill_invocations"]}},{version:54,name:"task-agent-scope",up:Hz,artifacts:{tables:["task_scope_hints"]}},{version:55,name:"dreaming-state",up:Jz,artifacts:{tables:["dreaming_state","dreaming_passes"]}},{version:56,name:"agent-scoped-content-hash",up:Vz},{version:57,name:"memories-fts-tokenizer-repair",up:_z},{version:58,name:"knowledge-graph-indices",up:Bz},{version:59,name:"entity-attribute-claim-key",up:Uz,artifacts:{columns:[{table:"entity_attributes",column:"claim_key"}]}},{version:60,name:"entity-attribute-group-key",up:Gz,artifacts:{columns:[{table:"entity_attributes",column:"group_key"}]}},{version:61,name:"memory-artifact-source-mtime",up:qz,artifacts:{columns:[{table:"memory_artifacts",column:"source_mtime_ms"}]}},{version:62,name:"memory-artifact-soft-delete",up:Az,artifacts:{columns:[{table:"memory_artifacts",column:"is_deleted"},{table:"memory_artifacts",column:"deleted_at"}]}},{version:63,name:"content-only-memories-fts-update",up:Mz},{version:64,name:"source-graph-provenance",up:Lz,artifacts:{columns:[{table:"entities",column:"source_path"},{table:"entity_communities",column:"source_path"},{table:"entity_attributes",column:"source_path"},{table:"entity_dependencies",column:"source_path"}]}},{version:65,name:"source-embedding-agent-scope",up:Nz,artifacts:{columns:[{table:"embeddings",column:"agent_id",optional:!0}]}},{version:66,name:"memory-search-telemetry",up:Kz,artifacts:{tables:["memory_search_telemetry"]}},{version:67,name:"ontology-proposals",up:Rz,artifacts:{tables:["ontology_proposals"],columns:[{table:"entity_attributes",column:"proposal_id"},{table:"entity_attributes",column:"proposal_evidence"},{table:"entity_dependencies",column:"proposal_id"},{table:"entity_dependencies",column:"proposal_evidence"}]}},{version:68,name:"daily-reflections",up:Sz,artifacts:{tables:["daily_reflections"]}},{version:69,name:"daily-reflections-multiple-insights",up:Cz,artifacts:{tables:["daily_reflections"]}},{version:70,name:"ontology-control-plane-state",up:Tz,artifacts:{columns:[{table:"entities",column:"status"},{table:"entity_aspects",column:"status"},{table:"entity_attributes",column:"version"},{table:"entity_attributes",column:"version_root_id"},{table:"entity_attributes",column:"previous_attribute_id"},{table:"entity_dependencies",column:"status"}]}},{version:71,name:"epistemic-assertions",up:Pz,artifacts:{tables:["epistemic_assertions"]}},{version:72,name:"agent-scoped-idempotency-key",up:kz,artifacts:{columns:[{table:"memories",column:"idempotency_key"},{table:"memories",column:"runtime_path"}]}},{version:73,name:"recall-context-dedupe",up:bz,artifacts:{tables:["session_context_epochs","session_recall_events"]}},{version:74,name:"aggregate-memory-links",up:fz,artifacts:{tables:["aggregate_memory_sources"]}},{version:75,name:"memory-artifact-source-provenance",up:xz,artifacts:{columns:[{table:"memory_artifacts",column:"source_id"},{table:"memory_artifacts",column:"source_root"},{table:"memory_artifacts",column:"source_external_id"},{table:"memory_artifacts",column:"source_parent_path"},{table:"memory_artifacts",column:"source_meta_json"}]}},{version:76,name:"temporal-edges",up:gz,artifacts:{tables:["temporal_edges"]}},{version:77,name:"entity-aliases",up:hz,artifacts:{tables:["entity_aliases"]}},{version:78,name:"api-keys",up:vz,artifacts:{tables:["api_keys"]}}];var fJ=p5[p5.length-1]?.version??0;var yz=a4(import.meta.url),xJ=s4(yz);var gJ=n5(A7(),1);var mz=n5(A7(),1);function O7(Z){try{let X=mz.default.parse(Z);return typeof X==="object"&&X!==null?X:{}}catch{return{}}}var dz=null;try{dz=uz(import.meta.url)("@signet/native")}catch{}function w8(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function t6(Z){return Object.fromEntries(Object.entries(Z).filter(([,X])=>X!==void 0))}function cz(Z){if(typeof Z==="string"){let X=Z.split(",").map((z)=>z.trim()).filter((z)=>z.length>0).join(",");return X.length>0?X:void 0}if(Array.isArray(Z)){let X=Z.map((z)=>z.trim()).filter((z)=>z.length>0).join(",");return X.length>0?X:void 0}return}function pz(Z){return{primary:Z.filter((X)=>X.supplementary!==!0),supporting:Z.filter((X)=>X.supplementary===!0)}}function lz(Z,X){if(!w8(Z))return{totalReturned:X,hasSupplementary:!1,noHits:X===0};let z=typeof Z.totalReturned==="number"?Z.totalReturned:X,W=Z.hasSupplementary===!0,Y="noHits"in Z?Z.noHits===!0:z===0,q=w8(Z.dedupe)?{enabled:Z.dedupe.enabled===!0,contextEpoch:typeof Z.dedupe.contextEpoch==="number"?Z.dedupe.contextEpoch:void 0,suppressed:typeof Z.dedupe.suppressed==="number"?Z.dedupe.suppressed:0,repeatedReturned:typeof Z.dedupe.repeatedReturned==="number"?Z.dedupe.repeatedReturned:0}:void 0,B=w8(Z.temporal)?Z.temporal:void 0;return{totalReturned:z,hasSupplementary:W,noHits:Y,...q?{dedupe:q}:{},...B?{temporal:B}:{}}}function NZ(Z){let X=w8(Z)?Z:{},W=(Array.isArray(X.results)?X.results:Array.isArray(X.memories)?X.memories:[]).filter(w8);return{query:typeof X.query==="string"?X.query:void 0,method:typeof X.method==="string"?X.method:void 0,rows:W,meta:lz(X.meta,W.length),message:typeof X.message==="string"?X.message:void 0}}function iz(Z){return typeof Z==="string"&&Z.length>0?Z.slice(0,10):"unknown"}function d6(Z,X){let z=typeof Z.score==="number"?\`[\${(Z.score*100).toFixed(0)}%] \`:"",W=typeof Z.source==="string"?Z.source:"unknown",Y=typeof Z.type==="string"?Z.type:"memory",q=typeof Z.who==="string"&&Z.who.length>0?\`, by \${Z.who}\`:"",B=iz(Z.created_at),U=typeof Z.id==="string"&&Z.id.length>0?\`id: \${Z.id}; \`:"";return\`\${X?.includeIndex?\`\${X.includeIndex}. \`:"- "}\${z}\${U}\${Z.content??""} (\${Y}, \${W}, \${B}\${q})\`}function nz(Z){if(Z.temporal_facet==="session")return"Sessions";if(Z.temporal_facet==="source")return"Source Activity";if(Z.temporal_facet==="occurred"||Z.temporal_facet==="observed"||Z.temporal_facet==="valid")return"Events";return"Memories Captured"}function oz(Z){let X=new Date(Z);if(Number.isNaN(X.getTime()))return Z.slice(0,10);return X.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric",timeZone:"UTC"})}function sz(Z,X){let z=[oz(X.start)],W=new Map;for(let Y of Z){let q=nz(Y);W.set(q,[...W.get(q)??[],Y])}for(let Y of["Sessions","Source Activity","Events","Memories Captured"]){let q=W.get(Y);if(!q||q.length===0)continue;z.push("",Y,...q.map((B)=>d6(B)))}return z.join(\`
|
|
22991
|
+
\`)}function Q6(Z){if(typeof Z!=="object"||Z===null||Array.isArray(Z))return typeof Z==="string"?Z:JSON.stringify(Z,null,2);let z=NZ(Z);if(z.message&&z.rows.length===0)return z.message;if(z.meta.noHits||z.rows.length===0)return"No matching memories found.";let{primary:W,supporting:Y}=pz(z.rows);if(z.meta.temporal?.mode==="timeline")return sz(W,z.meta.temporal);let q=z.meta.totalReturned===1?"memory":"memories",B=[\`Found \${z.meta.totalReturned} \${q}\${z.method?\` (\${z.method})\`:""}.\`];if(W.length>0)B.push("","Primary matches:",...W.map((U)=>d6(U)));if(Y.length>0)B.push("","Supporting context:",...Y.map((U)=>d6(U)));return B.join(\`
|
|
22992
|
+
\`)}function e6(Z,X={}){return t6({query:Z,keywordQuery:X.keywordQuery??X.keyword_query,limit:X.limit,project:X.project,type:X.type,tags:X.tags,who:X.who,pinned:X.pinned===!0?!0:void 0,importance_min:X.importance_min,since:X.since,until:X.until,time:X.time,expand:X.expand===!0?!0:void 0,agentId:X.agentId,sessionKey:X.sessionKey,includeRecalled:X.includeRecalled===!0?!0:void 0,scope:X.scope,sourceOnly:X.sourceOnly===!0?!0:void 0,aggregate:X.aggregate===!0?!0:void 0,aggregateBudget:X.aggregateBudget??X.aggregate_budget,saveAggregate:X.saveAggregate===!1||X.save_aggregate===!1?!1:X.saveAggregate===!0||X.save_aggregate===!0?!0:void 0})}function az(Z){if(!w8(Z))return Z;let X=Z.aspects;if(!Array.isArray(X))return Z;return{...Z,aspects:X.map((z)=>{if(!w8(z))return z;if(typeof z.entityName==="string"&&Array.isArray(z.attributes))return z;if(typeof z.entity==="string"&&typeof z.aspect==="string"&&typeof z.value==="string")return{entityName:z.entity,aspect:z.aspect,attributes:[t6({content:z.value,groupKey:typeof z.groupKey==="string"?z.groupKey:void 0,claimKey:typeof z.claimKey==="string"?z.claimKey:void 0,confidence:typeof z.confidence==="number"?z.confidence:void 0,importance:typeof z.importance==="number"?z.importance:void 0})]};return z})}}function F7(Z,X={}){return t6({content:Z,type:X.type,importance:X.importance,tags:cz(X.tags),who:X.who,pinned:X.pinned===!0?!0:void 0,sourceType:X.sourceType,sourceId:X.sourceId,sourcePath:X.sourcePath,createdAt:X.createdAt,occurredAt:X.occurredAt,observedAt:X.observedAt,validFrom:X.validFrom,validUntil:X.validUntil,sourceCreatedAt:X.sourceCreatedAt,hints:X.hints,transcript:X.transcript,structured:az(X.structured),agentId:X.agentId,visibility:X.visibility,mode:X.mode,idempotencyKey:X.idempotencyKey,runtimePath:X.runtimePath,harness:X.harness,source:X.source})}var rz="signetai";var vJ=["memory/memories.db","memory/memories.db-wal","memory/memories.db-shm","memory/memories.db-journal",\`\${rz}/\`];var cJ=Z$(),ez=["issues","pulls","discussions","docs"];var pJ=new Set(ez);function Z$(){switch(tz()){case"darwin":return qZ(u6(),"Library","Application Support","discord");case"win32":return qZ(process.env.APPDATA||qZ(u6(),"AppData","Roaming"),"discord");default:return qZ(process.env.XDG_CONFIG_HOME||qZ(u6(),".config"),"discord")}}function N7(Z,X){let z=Z[X];if(typeof z!=="string")return null;let W=z.trim();return W.length>0?W:null}function Q$(Z){let X=Z.trim();if(X==="~")return AZ();if(X.startsWith("~/"))return MZ(AZ(),X.slice(2));if(X.startsWith("~"))return MZ(AZ(),X.slice(1));return X}function z5(Z){return $$(Q$(Z))}function W$(Z){let X=N7(Z,"XDG_CONFIG_HOME");return X?z5(X):MZ(AZ(),".config")}function H$(Z=process.env){return MZ(W$(Z),"signet","pi.json")}function J$(Z=process.env){let X=H$(Z);if(!X$(X))return null;try{let z=JSON.parse(z$(X,"utf-8"));if(typeof z!=="object"||z===null)return null;let W=Reflect.get(z,"agentDir");return typeof W==="string"&&W.trim().length>0?z5(W):null}catch{return null}}function K7(Z=process.env){let X=N7(Z,"PI_CODING_AGENT_DIR");if(X)return z5(X);return J$(Z)??MZ(AZ(),".pi","agent")}var Y$=["managed","passthrough","off"],j7={agents:{path:"AGENTS.md",description:"Operational rules and behavioral settings",optional:!1},soul:{path:"SOUL.md",description:"Persona, character, and security settings",optional:!1},identity:{path:"IDENTITY.md",description:"Agent name, creature type, and vibe",optional:!1},user:{path:"USER.md",description:"User profile and preferences",optional:!1},heartbeat:{path:"HEARTBEAT.md",description:"Heartbeat prompt used only for heartbeat/background check sessions",optional:!0,context:"session",session:"heartbeat"},memory:{path:"MEMORY.md",description:"Memory index and summary",optional:!0},tools:{path:"TOOLS.md",description:"Tool preferences and notes",optional:!0},bootstrap:{path:"BOOTSTRAP.md",description:"Setup ritual (typically deleted after first run)",optional:!0,context:"session",session:"bootstrap"},dreaming:{path:"DREAMING.md",description:"Dreaming/reflection prompt used only for dreaming sessions",optional:!0,context:"session",session:"dreaming"}},V$={minimal:{name:"minimal",description:"AGENTS.md only for normal startup, plus DREAMING.md for dreaming sessions.",startup:[{path:"AGENTS.md",role:"operating_instructions",budget:12000}],special:[{path:"DREAMING.md",kind:"dreaming",role:"dreaming_prompt",budget:4000}]},hermes:{name:"hermes",description:"Hermes-style SOUL.md primary identity with project-context discovery handled by Hermes.",startup:[{path:"SOUL.md",role:"primary_identity",budget:4000},{path:"AGENTS.md",role:"project_context",budget:12000}],special:[{path:"DREAMING.md",kind:"dreaming",role:"dreaming_prompt",budget:4000}]},openclaw:{name:"openclaw",description:"OpenClaw-style rich identity stack for character-forward agents.",startup:[{path:"AGENTS.md",role:"operating_instructions",budget:12000},{path:"SOUL.md",role:"persona",budget:4000},{path:"IDENTITY.md",role:"agent_identity",budget:2000},{path:"USER.md",role:"user_profile",budget:6000},{path:"MEMORY.md",role:"working_memory",budget:1e4}],special:[{path:"HEARTBEAT.md",kind:"heartbeat",role:"heartbeat_prompt",budget:4000},{path:"DREAMING.md",kind:"dreaming",role:"dreaming_prompt",budget:4000},{path:"BOOTSTRAP.md",kind:"bootstrap",role:"bootstrap_prompt",budget:4000}]},custom:{name:"custom",description:"User-selected startup files and explicit order.",startup:[{path:"AGENTS.md",role:"operating_instructions",budget:12000}],special:[{path:"DREAMING.md",kind:"dreaming",role:"dreaming_prompt",budget:4000}]}},QY=Object.entries(j7).filter(([,Z])=>!Z.optional).map(([Z])=>Z),WY=Object.entries(j7).filter(([,Z])=>Z.optional).map(([Z])=>Z);var c6=[{file:"AGENTS.md",header:"Agent Instructions",budget:12000},{file:"SOUL.md",header:"Soul",budget:4000},{file:"IDENTITY.md",header:"Identity",budget:2000},{file:"USER.md",header:"About Your User",budget:6000},{file:"MEMORY.md",header:"Working Memory",budget:1e4}],_$={"AGENTS.md":"Agent Instructions","SOUL.md":"Soul","IDENTITY.md":"Identity","USER.md":"About Your User","MEMORY.md":"Working Memory"};function l5(Z){let X=Z.trim();if(!X)return!1;if(X.startsWith("/")||X.startsWith("~"))return!1;return!X.split(/[\\\\/]/).includes("..")}function P8(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)?Z:{}}function i5(Z){return typeof Z==="string"&&Y$.includes(Z)}function R7(Z){let X=P8(Z),z=P8(X.capabilities),W=P8(z.identity);if(i5(W.mode))return W.mode;let Y=P8(X.identity);if(i5(Y.mode))return Y.mode;if(Y.enabled===!1)return"off";return"managed"}function B$(Z){let X=X5(Z,"agent.yaml");if(!iZ(X))return"managed";try{return R7(O7(Z5(X,"utf-8")))}catch{return"managed"}}function S7(Z){return Z!=="off"}function U$(Z){if(typeof Z==="string")return l5(Z)?{path:Z}:null;let X=P8(Z),z=typeof X.path==="string"?X.path.trim():"";if(!l5(z))return null;if(X.enabled===!1)return null;let W=typeof X.role==="string"?X.role:void 0,Y=typeof X.budget==="number"?X.budget:Number.parseInt(String(X.budget??""),10),q=Number.isFinite(Y)&&Y>0?Math.floor(Y):void 0;return{path:z,role:W,budget:q}}function G$(Z){if(!Array.isArray(Z))return[];return Z.map(U$).filter((X)=>X!==null)}function q$(Z,X){let z=Z.split(/[\\\\/]/).pop()??Z;return _$[z]??X??z.replace(/\\.md$/i,"")}function A$(Z){let X=X5(Z,"agent.yaml");if(!iZ(X))return c6.map(({file:z,budget:W})=>({path:z,budget:W}));try{let z=O7(Z5(X,"utf-8"));if(!S7(R7(z)))return[];let W=P8(z.identity),Y=P8(W.startup),q=G$(Y.load);if(q.length>0)return q;let B=typeof W.preset==="string"?W.preset:"",U=V$[B];if(U)return U.startup}catch{}return c6.map(({file:z,budget:W})=>({path:z,budget:W}))}var M$="[signet: daemon offline — running with static identity]";function C7(Z,X=M$){if(!iZ(Z))return null;if(!S7(B$(Z)))return null;let z=[];for(let W of A$(Z)){let Y=X5(Z,W.path);if(!iZ(Y))continue;try{let q=Z5(Y,"utf-8").trim();if(!q)continue;let B=W.budget??c6.find((G)=>G.file===W.path)?.budget??4000,U=q.length<=B?q:\`\${q.slice(0,B)}
|
|
22993
|
+
[truncated]\`;z.push(\`## \${q$(W.path,W.role)}
|
|
22994
22994
|
|
|
22995
22995
|
\${U}\`)}catch{}}if(z.length===0)return null;return\`\${X}
|
|
22996
22996
|
|
|
22997
22997
|
\${z.join(\`
|
|
22998
22998
|
|
|
22999
|
-
\`)}\`}var
|
|
23000
|
-
\`)}function
|
|
23001
|
-
\`).map((X)=>X.trim()).filter((X)=>X.length>0)}function N$(Z){return p(Z?.cwd)??p(Z?.project)??p(Z?.workspace)}function Q6(Z,X=new Set){if(!Z||!G$(Z))return{loaded:!1,sessionId:void 0,project:void 0,transcript:void 0};try{let{header:z,entries:W}=O$(F$(Z));return{loaded:!0,sessionId:p(z?.id),project:N$(z),transcript:$6(W,X)}}catch{return{loaded:!1,sessionId:void 0,project:void 0,transcript:void 0}}}function K$(){return n0("SIGNET_API_KEY")??n0("SIGNET_TOKEN")}function j$(Z){let X={"Content-Type":"application/json","x-signet-runtime-path":Z.runtimePath,"x-signet-actor":Z.actorName,"x-signet-actor-type":"harness"},z=K$();if(z)X.Authorization=\`Bearer \${z}\`;return X}function E7(Z){if(typeof Z!=="object"||Z===null)return"";let X=Reflect.get(Z,"name");return typeof X==="string"?X:""}function S7(Z){let X=E7(Z);if(X==="AbortError"||X==="TimeoutError")return!0;return(typeof Z==="object"&&Z!==null?Reflect.get(Z,"code"):void 0)==="ABORT_ERR"}async function C7(Z,X,z,W={}){let{method:V="POST",body:q,timeout:B=z.defaultTimeout}=W;try{let U={method:V,headers:j$(z),signal:AbortSignal.timeout(B)};if(q!==void 0)U.body=JSON.stringify(q);let G=await fetch(\`\${Z}\${X}\`,U);if(!G.ok)return console.warn(\`[\${z.logPrefix}] \${V} \${X} failed: \${G.status}\`),{ok:!1,reason:"http",status:G.status};try{let H=await G.text();try{return{ok:!0,data:JSON.parse(H)}}catch{return console.warn(\`[\${z.logPrefix}] \${V} \${X} returned invalid JSON (\${H.length} chars\${H.length===0?", empty body":""})\`),{ok:!1,reason:"invalid-json",status:G.status}}}catch(H){if(S7(H))return console.warn(\`[\${z.logPrefix}] \${V} \${X} body read timed out after \${B}ms\`),{ok:!1,reason:"timeout"};return console.warn(\`[\${z.logPrefix}] \${V} \${X} body read failed:\`,E7(H)||H),{ok:!1,reason:"body-read"}}}catch(U){if(S7(U))return console.warn(\`[\${z.logPrefix}] \${V} \${X} timed out after \${B}ms\`),{ok:!1,reason:"timeout"};return console.warn(\`[\${z.logPrefix}] \${V} \${X} error:\`,U),{ok:!1,reason:"offline"}}}function X5(Z,X){return{async post(z,W,V=X.defaultTimeout){let q=await C7(Z,z,X,{method:"POST",body:W,timeout:V});if(!q.ok)return null;return q.data},postResult(z,W,V=X.defaultTimeout){return C7(Z,z,X,{method:"POST",body:W,timeout:V})}}}import{homedir as R$}from"node:os";import{join as S$}from"node:path";function z5(Z){let X=n0("SIGNET_PATH")??S$(R$(),".agents");return K7(X)??""}function C$(Z){let X=Z.sessionManager.getBranch();if(Array.isArray(X)&&X.length>0)return X;let z=Z.sessionManager.getEntries();return Array.isArray(z)?z:[]}function T0(Z){let X=Z.sessionManager.getHeader(),z=p(Z.sessionManager.getSessionId())??p(X?.id),W=p(Z.sessionManager.getSessionFile()),V=p(Z.cwd)??p(X?.cwd)??p(X?.project)??p(X?.workspace);return{sessionId:z,sessionFile:W,project:V}}async function KZ(Z,X){return await Z.client.post("/api/hooks/session-end",{harness:Z.config.harness,runtimePath:Z.config.runtimePath,reason:X.reason,sessionKey:X.sessionId,sessionId:X.sessionId,agentId:X.agentId,cwd:X.project,...X.transcript?{transcript:X.transcript}:{}},Z.config.writeTimeout)!==null}async function l8(Z){for(let X of Z.state.getPendingSessionEnds()){if(Z.state.sessionAlreadyEnded(X.sessionId)){Z.state.clearPendingSessionEnd(X.sessionId);continue}let z=Q6(X.sessionFile,Z.config.excludedCustomTypes);if(!z.loaded){await KZ(Z,{sessionId:X.sessionId,agentId:X.agentId,transcript:void 0,reason:X.reason,project:void 0});continue}if(!await KZ(Z,{sessionId:z.sessionId??X.sessionId,agentId:X.agentId,transcript:z.transcript,reason:X.reason,project:z.project}))continue;Z.state.markSessionEnded(X.sessionId),Z.state.clearPendingSessionData(X.sessionId),Z.state.clearPendingSessionEnd(X.sessionId)}}async function M8(Z,X){await l8(Z);let z=T0(X);Z.state.setActiveSession(z.sessionId,z.sessionFile),Z.state.clearSessionEnded(z.sessionId);let W=await Z.client.postResult("/api/hooks/session-start",{harness:Z.config.harness,project:z.project,agentId:Z.agentId,sessionKey:z.sessionId,runtimePath:Z.config.runtimePath},Z.config.sessionStartTimeout()),V=W.ok?W.data.inject??W.data.recentContext??"":Z.config.staticFallback(W.reason==="timeout"?"timeout":"offline");Z.state.setSessionContext(V),Z.state.setPendingSessionContext(z.sessionId,V)}async function i8(Z,X){await l8(Z);let z=T0(X);if(!z.sessionId)return;if(z.sessionId===Z.state.getActiveSessionId()&&z.sessionFile===Z.state.getActiveSessionFile())return;await M8(Z,X)}async function W6(Z,X,z){await l8(Z);let W=T0(X);if(Z.state.sessionAlreadyEnded(W.sessionId))return;if(!await KZ(Z,{sessionId:W.sessionId,agentId:Z.agentId,transcript:$6(C$(X),Z.config.excludedCustomTypes),reason:z,project:W.project}))return;Z.state.markSessionEnded(W.sessionId),Z.state.clearPendingSessionData(W.sessionId)}async function jZ(Z,X,z){let W=p(X.previousSessionFile)??Z.state.getActiveSessionFile(),V=Q6(W,Z.config.excludedCustomTypes),q=V.sessionId??Z.state.getActiveSessionId();if(Z.state.sessionAlreadyEnded(q))return;if(!V.loaded){if(q)await KZ(Z,{sessionId:q,agentId:Z.agentId,transcript:void 0,reason:z,project:void 0});if(q&&W)Z.state.queuePendingSessionEnd(q,W,Z.agentId,z);return}if(!await KZ(Z,{sessionId:q,agentId:Z.agentId,transcript:V.transcript,reason:z,project:V.project})){if(q&&W)Z.state.queuePendingSessionEnd(q,W,Z.agentId,z);return}Z.state.markSessionEnded(q),Z.state.clearPendingSessionData(q)}async function RZ(Z,X,z){await l8(Z);let W=p(z);if(!W)return;await i8(Z,X);let V=T0(X);if(!V.sessionId)return;let q=await Z.client.post("/api/hooks/user-prompt-submit",{harness:Z.config.harness,project:V.project,agentId:Z.agentId,sessionKey:V.sessionId,userMessage:W,runtimePath:Z.config.runtimePath},Z.config.promptSubmitTimeout);if(!q)return;if(q.sessionKnown===!1)await M8(Z,X);let B=p(q.inject);if(B)Z.state.queuePendingRecall(V.sessionId,B)}var $5=64,I7=4,T7=128;function Q5(Z){return Z.replace(/<\\/signet-memory>/gi,"<\\\\/signet-memory>")}function H6(Z,X){if(Z.size<X)return;let z=Z.keys().next().value;if(z!==void 0)Z.delete(z)}class J6{pendingSessionContext=new Map;pendingRecall=new Map;pendingSessionEnds=new Map;endedSessions=new Map;activeSessionId;activeSessionFile;sessionContext="";setActiveSession(Z,X){this.activeSessionId=Z,this.activeSessionFile=X}getActiveSessionId(){return this.activeSessionId}getActiveSessionFile(){return this.activeSessionFile}setSessionContext(Z){this.sessionContext=Z}getSessionContext(){return this.sessionContext}markSessionEnded(Z){if(!Z)return;if(!this.endedSessions.has(Z))H6(this.endedSessions,T7);this.endedSessions.set(Z,Date.now())}clearSessionEnded(Z){if(!Z)return;this.endedSessions.delete(Z)}sessionAlreadyEnded(Z){if(!Z)return!1;return this.endedSessions.has(Z)}setPendingSessionContext(Z,X){if(!Z)return;let z=p(X);if(z){this.pendingSessionContext.set(Z,z);return}this.pendingSessionContext.delete(Z)}clearPendingSessionContext(Z){if(!Z)return;this.pendingSessionContext.delete(Z)}queuePendingRecall(Z,X){if(!this.pendingRecall.has(Z))H6(this.pendingRecall,$5);let z=this.pendingRecall.get(Z)??[];z.push(X);while(z.length>I7)z.shift();this.pendingRecall.set(Z,z)}clearPendingRecall(Z){if(!Z)return;this.pendingRecall.delete(Z)}clearPendingSessionData(Z){if(!Z)return;this.pendingSessionContext.delete(Z),this.pendingRecall.delete(Z),this.pendingSessionEnds.delete(Z)}hasPendingRecall(Z){if(!Z)return!1;let X=this.pendingRecall.get(Z);return Array.isArray(X)&&X.length>0}consumePendingRecall(Z){if(!Z)return;let X=this.pendingRecall.get(Z);if(!X||X.length===0)return;let z=X.shift();if(X.length===0)this.pendingRecall.delete(Z);return p(z)}queuePendingSessionEnd(Z,X,z,W){if(!this.pendingSessionEnds.has(Z))H6(this.pendingSessionEnds,$5);this.pendingSessionEnds.set(Z,{sessionId:Z,sessionFile:X,agentId:z,reason:W})}clearPendingSessionEnd(Z){if(!Z)return;this.pendingSessionEnds.delete(Z)}getPendingSessionEnds(){return Array.from(this.pendingSessionEnds.values())}}var L0={};x6(L0,{IsUndefined:()=>J0,IsUint8Array:()=>V8,IsSymbol:()=>V5,IsString:()=>a,IsRegExp:()=>CZ,IsObject:()=>i,IsNumber:()=>P0,IsNull:()=>Y5,IsIterator:()=>J5,IsFunction:()=>H5,IsDate:()=>x8,IsBoolean:()=>Y8,IsBigInt:()=>SZ,IsAsyncIterator:()=>W5,IsArray:()=>H0,HasPropertyKey:()=>Y6});function Y6(Z,X){return X in Z}function W5(Z){return i(Z)&&!H0(Z)&&!V8(Z)&&Symbol.asyncIterator in Z}function H0(Z){return Array.isArray(Z)}function SZ(Z){return typeof Z==="bigint"}function Y8(Z){return typeof Z==="boolean"}function x8(Z){return Z instanceof globalThis.Date}function H5(Z){return typeof Z==="function"}function J5(Z){return i(Z)&&!H0(Z)&&!V8(Z)&&Symbol.iterator in Z}function Y5(Z){return Z===null}function P0(Z){return typeof Z==="number"}function i(Z){return typeof Z==="object"&&Z!==null}function CZ(Z){return Z instanceof globalThis.RegExp}function a(Z){return typeof Z==="string"}function V5(Z){return typeof Z==="symbol"}function V8(Z){return Z instanceof globalThis.Uint8Array}function J0(Z){return Z===void 0}function E$(Z){return Z.map((X)=>V6(X))}function I$(Z){return new Date(Z.getTime())}function T$(Z){return new Uint8Array(Z)}function P$(Z){return new RegExp(Z.source,Z.flags)}function w$(Z){let X={};for(let z of Object.getOwnPropertyNames(Z))X[z]=V6(Z[z]);for(let z of Object.getOwnPropertySymbols(Z))X[z]=V6(Z[z]);return X}function V6(Z){return H0(Z)?E$(Z):x8(Z)?I$(Z):V8(Z)?T$(Z):CZ(Z)?P$(Z):i(Z)?w$(Z):Z}function e(Z){return V6(Z)}function n8(Z,X){return X===void 0?e(Z):e({...X,...Z})}function P7(Z){return Z!==null&&typeof Z==="object"}function w7(Z){return globalThis.Array.isArray(Z)&&!globalThis.ArrayBuffer.isView(Z)}function k7(Z){return Z===void 0}function b7(Z){return typeof Z==="number"}var _6;(function(Z){Z.InstanceMode="default",Z.ExactOptionalPropertyTypes=!1,Z.AllowArrayObject=!1,Z.AllowNaN=!1,Z.AllowNullVoid=!1;function X(B,U){return Z.ExactOptionalPropertyTypes?U in B:B[U]!==void 0}Z.IsExactOptionalProperty=X;function z(B){let U=P7(B);return Z.AllowArrayObject?U:U&&!w7(B)}Z.IsObjectLike=z;function W(B){return z(B)&&!(B instanceof Date)&&!(B instanceof Uint8Array)}Z.IsRecordLike=W;function V(B){return Z.AllowNaN?b7(B):Number.isFinite(B)}Z.IsNumberLike=V;function q(B){let U=k7(B);return Z.AllowNullVoid?U||B===null:U}Z.IsVoidLike=q})(_6||(_6={}));function k$(Z){return globalThis.Object.freeze(Z).map((X)=>EZ(X))}function b$(Z){return Z}function f$(Z){return Z}function x$(Z){return Z}function g$(Z){let X={};for(let z of Object.getOwnPropertyNames(Z))X[z]=EZ(Z[z]);for(let z of Object.getOwnPropertySymbols(Z))X[z]=EZ(Z[z]);return globalThis.Object.freeze(X)}function EZ(Z){return H0(Z)?k$(Z):x8(Z)?b$(Z):V8(Z)?f$(Z):CZ(Z)?x$(Z):i(Z)?g$(Z):Z}function R(Z,X){let z=X!==void 0?{...X,...Z}:Z;switch(_6.InstanceMode){case"freeze":return EZ(z);case"clone":return e(z);default:return z}}class M0 extends Error{constructor(Z){super(Z)}}var V0=Symbol.for("TypeBox.Transform"),o0=Symbol.for("TypeBox.Readonly"),D0=Symbol.for("TypeBox.Optional"),v0=Symbol.for("TypeBox.Hint"),I=Symbol.for("TypeBox.Kind");function o8(Z){return i(Z)&&Z[o0]==="Readonly"}function S0(Z){return i(Z)&&Z[D0]==="Optional"}function _5(Z){return g(Z,"Any")}function B5(Z){return g(Z,"Argument")}function s0(Z){return g(Z,"Array")}function g8(Z){return g(Z,"AsyncIterator")}function h8(Z){return g(Z,"BigInt")}function _8(Z){return g(Z,"Boolean")}function a0(Z){return g(Z,"Computed")}function r0(Z){return g(Z,"Constructor")}function h$(Z){return g(Z,"Date")}function t0(Z){return g(Z,"Function")}function e0(Z){return g(Z,"Integer")}function z0(Z){return g(Z,"Intersect")}function v8(Z){return g(Z,"Iterator")}function g(Z,X){return i(Z)&&I in Z&&Z[I]===X}function B6(Z){return Y8(Z)||P0(Z)||a(Z)}function w0(Z){return g(Z,"Literal")}function k0(Z){return g(Z,"MappedKey")}function Z0(Z){return g(Z,"MappedResult")}function D8(Z){return g(Z,"Never")}function v$(Z){return g(Z,"Not")}function IZ(Z){return g(Z,"Null")}function Z8(Z){return g(Z,"Number")}function Y0(Z){return g(Z,"Object")}function y8(Z){return g(Z,"Promise")}function m8(Z){return g(Z,"Record")}function W0(Z){return g(Z,"Ref")}function U5(Z){return g(Z,"RegExp")}function B8(Z){return g(Z,"String")}function TZ(Z){return g(Z,"Symbol")}function b0(Z){return g(Z,"TemplateLiteral")}function y$(Z){return g(Z,"This")}function L8(Z){return i(Z)&&V0 in Z}function f0(Z){return g(Z,"Tuple")}function PZ(Z){return g(Z,"Undefined")}function v(Z){return g(Z,"Union")}function m$(Z){return g(Z,"Uint8Array")}function u$(Z){return g(Z,"Unknown")}function d$(Z){return g(Z,"Unsafe")}function c$(Z){return g(Z,"Void")}function p$(Z){return i(Z)&&I in Z&&a(Z[I])}function x0(Z){return _5(Z)||B5(Z)||s0(Z)||_8(Z)||h8(Z)||g8(Z)||a0(Z)||r0(Z)||h$(Z)||t0(Z)||e0(Z)||z0(Z)||v8(Z)||w0(Z)||k0(Z)||Z0(Z)||D8(Z)||v$(Z)||IZ(Z)||Z8(Z)||Y0(Z)||y8(Z)||m8(Z)||W0(Z)||U5(Z)||B8(Z)||TZ(Z)||b0(Z)||y$(Z)||f0(Z)||PZ(Z)||v(Z)||m$(Z)||u$(Z)||d$(Z)||c$(Z)||p$(Z)}var O={};x6(O,{TypeGuardUnknownTypeError:()=>f7,IsVoid:()=>NX,IsUnsafe:()=>FX,IsUnknown:()=>OX,IsUnionLiteral:()=>e$,IsUnion:()=>A5,IsUndefined:()=>DX,IsUint8Array:()=>LX,IsTuple:()=>MX,IsTransform:()=>AX,IsThis:()=>qX,IsTemplateLiteral:()=>GX,IsSymbol:()=>UX,IsString:()=>BX,IsSchema:()=>A0,IsRegExp:()=>_X,IsRef:()=>VX,IsRecursive:()=>t$,IsRecord:()=>YX,IsReadonly:()=>o$,IsProperties:()=>U6,IsPromise:()=>JX,IsOptional:()=>s$,IsObject:()=>HX,IsNumber:()=>WX,IsNull:()=>QX,IsNot:()=>$X,IsNever:()=>zX,IsMappedResult:()=>XX,IsMappedKey:()=>ZX,IsLiteralValue:()=>e7,IsLiteralString:()=>r7,IsLiteralNumber:()=>t7,IsLiteralBoolean:()=>r$,IsLiteral:()=>kZ,IsKindOf:()=>x,IsKind:()=>KX,IsIterator:()=>a7,IsIntersect:()=>s7,IsInteger:()=>o7,IsImport:()=>a$,IsFunction:()=>n7,IsDate:()=>i7,IsConstructor:()=>l7,IsComputed:()=>p7,IsBoolean:()=>c7,IsBigInt:()=>d7,IsAsyncIterator:()=>u7,IsArray:()=>m7,IsArgument:()=>y7,IsAny:()=>v7});class f7 extends M0{}var l$=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function x7(Z){try{return new RegExp(Z),!0}catch{return!1}}function G5(Z){if(!a(Z))return!1;for(let X=0;X<Z.length;X++){let z=Z.charCodeAt(X);if(z>=7&&z<=13||z===27||z===127)return!1}return!0}function g7(Z){return q5(Z)||A0(Z)}function wZ(Z){return J0(Z)||SZ(Z)}function r(Z){return J0(Z)||P0(Z)}function q5(Z){return J0(Z)||Y8(Z)}function n(Z){return J0(Z)||a(Z)}function i$(Z){return J0(Z)||a(Z)&&G5(Z)&&x7(Z)}function n$(Z){return J0(Z)||a(Z)&&G5(Z)}function h7(Z){return J0(Z)||A0(Z)}function o$(Z){return i(Z)&&Z[o0]==="Readonly"}function s$(Z){return i(Z)&&Z[D0]==="Optional"}function v7(Z){return x(Z,"Any")&&n(Z.$id)}function y7(Z){return x(Z,"Argument")&&P0(Z.index)}function m7(Z){return x(Z,"Array")&&Z.type==="array"&&n(Z.$id)&&A0(Z.items)&&r(Z.minItems)&&r(Z.maxItems)&&q5(Z.uniqueItems)&&h7(Z.contains)&&r(Z.minContains)&&r(Z.maxContains)}function u7(Z){return x(Z,"AsyncIterator")&&Z.type==="AsyncIterator"&&n(Z.$id)&&A0(Z.items)}function d7(Z){return x(Z,"BigInt")&&Z.type==="bigint"&&n(Z.$id)&&wZ(Z.exclusiveMaximum)&&wZ(Z.exclusiveMinimum)&&wZ(Z.maximum)&&wZ(Z.minimum)&&wZ(Z.multipleOf)}function c7(Z){return x(Z,"Boolean")&&Z.type==="boolean"&&n(Z.$id)}function p7(Z){return x(Z,"Computed")&&a(Z.target)&&H0(Z.parameters)&&Z.parameters.every((X)=>A0(X))}function l7(Z){return x(Z,"Constructor")&&Z.type==="Constructor"&&n(Z.$id)&&H0(Z.parameters)&&Z.parameters.every((X)=>A0(X))&&A0(Z.returns)}function i7(Z){return x(Z,"Date")&&Z.type==="Date"&&n(Z.$id)&&r(Z.exclusiveMaximumTimestamp)&&r(Z.exclusiveMinimumTimestamp)&&r(Z.maximumTimestamp)&&r(Z.minimumTimestamp)&&r(Z.multipleOfTimestamp)}function n7(Z){return x(Z,"Function")&&Z.type==="Function"&&n(Z.$id)&&H0(Z.parameters)&&Z.parameters.every((X)=>A0(X))&&A0(Z.returns)}function a$(Z){return x(Z,"Import")&&Y6(Z,"$defs")&&i(Z.$defs)&&U6(Z.$defs)&&Y6(Z,"$ref")&&a(Z.$ref)&&Z.$ref in Z.$defs}function o7(Z){return x(Z,"Integer")&&Z.type==="integer"&&n(Z.$id)&&r(Z.exclusiveMaximum)&&r(Z.exclusiveMinimum)&&r(Z.maximum)&&r(Z.minimum)&&r(Z.multipleOf)}function U6(Z){return i(Z)&&Object.entries(Z).every(([X,z])=>G5(X)&&A0(z))}function s7(Z){return x(Z,"Intersect")&&(a(Z.type)&&Z.type!=="object"?!1:!0)&&H0(Z.allOf)&&Z.allOf.every((X)=>A0(X)&&!AX(X))&&n(Z.type)&&(q5(Z.unevaluatedProperties)||h7(Z.unevaluatedProperties))&&n(Z.$id)}function a7(Z){return x(Z,"Iterator")&&Z.type==="Iterator"&&n(Z.$id)&&A0(Z.items)}function x(Z,X){return i(Z)&&I in Z&&Z[I]===X}function r7(Z){return kZ(Z)&&a(Z.const)}function t7(Z){return kZ(Z)&&P0(Z.const)}function r$(Z){return kZ(Z)&&Y8(Z.const)}function kZ(Z){return x(Z,"Literal")&&n(Z.$id)&&e7(Z.const)}function e7(Z){return Y8(Z)||P0(Z)||a(Z)}function ZX(Z){return x(Z,"MappedKey")&&H0(Z.keys)&&Z.keys.every((X)=>P0(X)||a(X))}function XX(Z){return x(Z,"MappedResult")&&U6(Z.properties)}function zX(Z){return x(Z,"Never")&&i(Z.not)&&Object.getOwnPropertyNames(Z.not).length===0}function $X(Z){return x(Z,"Not")&&A0(Z.not)}function QX(Z){return x(Z,"Null")&&Z.type==="null"&&n(Z.$id)}function WX(Z){return x(Z,"Number")&&Z.type==="number"&&n(Z.$id)&&r(Z.exclusiveMaximum)&&r(Z.exclusiveMinimum)&&r(Z.maximum)&&r(Z.minimum)&&r(Z.multipleOf)}function HX(Z){return x(Z,"Object")&&Z.type==="object"&&n(Z.$id)&&U6(Z.properties)&&g7(Z.additionalProperties)&&r(Z.minProperties)&&r(Z.maxProperties)}function JX(Z){return x(Z,"Promise")&&Z.type==="Promise"&&n(Z.$id)&&A0(Z.item)}function YX(Z){return x(Z,"Record")&&Z.type==="object"&&n(Z.$id)&&g7(Z.additionalProperties)&&i(Z.patternProperties)&&((X)=>{let z=Object.getOwnPropertyNames(X.patternProperties);return z.length===1&&x7(z[0])&&i(X.patternProperties)&&A0(X.patternProperties[z[0]])})(Z)}function t$(Z){return i(Z)&&v0 in Z&&Z[v0]==="Recursive"}function VX(Z){return x(Z,"Ref")&&n(Z.$id)&&a(Z.$ref)}function _X(Z){return x(Z,"RegExp")&&n(Z.$id)&&a(Z.source)&&a(Z.flags)&&r(Z.maxLength)&&r(Z.minLength)}function BX(Z){return x(Z,"String")&&Z.type==="string"&&n(Z.$id)&&r(Z.minLength)&&r(Z.maxLength)&&i$(Z.pattern)&&n$(Z.format)}function UX(Z){return x(Z,"Symbol")&&Z.type==="symbol"&&n(Z.$id)}function GX(Z){return x(Z,"TemplateLiteral")&&Z.type==="string"&&a(Z.pattern)&&Z.pattern[0]==="^"&&Z.pattern[Z.pattern.length-1]==="$"}function qX(Z){return x(Z,"This")&&n(Z.$id)&&a(Z.$ref)}function AX(Z){return i(Z)&&V0 in Z}function MX(Z){return x(Z,"Tuple")&&Z.type==="array"&&n(Z.$id)&&P0(Z.minItems)&&P0(Z.maxItems)&&Z.minItems===Z.maxItems&&(J0(Z.items)&&J0(Z.additionalItems)&&Z.minItems===0||H0(Z.items)&&Z.items.every((X)=>A0(X)))}function DX(Z){return x(Z,"Undefined")&&Z.type==="undefined"&&n(Z.$id)}function e$(Z){return A5(Z)&&Z.anyOf.every((X)=>r7(X)||t7(X))}function A5(Z){return x(Z,"Union")&&n(Z.$id)&&i(Z)&&H0(Z.anyOf)&&Z.anyOf.every((X)=>A0(X))}function LX(Z){return x(Z,"Uint8Array")&&Z.type==="Uint8Array"&&n(Z.$id)&&r(Z.minByteLength)&&r(Z.maxByteLength)}function OX(Z){return x(Z,"Unknown")&&n(Z.$id)}function FX(Z){return x(Z,"Unsafe")}function NX(Z){return x(Z,"Void")&&Z.type==="void"&&n(Z.$id)}function KX(Z){return i(Z)&&I in Z&&a(Z[I])&&!l$.includes(Z[I])}function A0(Z){return i(Z)&&(v7(Z)||y7(Z)||m7(Z)||c7(Z)||d7(Z)||u7(Z)||p7(Z)||l7(Z)||i7(Z)||n7(Z)||o7(Z)||s7(Z)||a7(Z)||kZ(Z)||ZX(Z)||XX(Z)||zX(Z)||$X(Z)||QX(Z)||WX(Z)||HX(Z)||JX(Z)||YX(Z)||VX(Z)||_X(Z)||BX(Z)||UX(Z)||GX(Z)||qX(Z)||MX(Z)||DX(Z)||A5(Z)||LX(Z)||OX(Z)||FX(Z)||NX(Z)||KX(Z))}var jX="(true|false)",G6="(0|[1-9][0-9]*)",RX="(.*)";var O8="^(0|[1-9][0-9]*)$",F8="^(.*)$",SX="^(?!.*)$";function CX(Z,X){return Z.includes(X)}function EX(Z){return[...new Set(Z)]}function ZQ(Z,X){return Z.filter((z)=>X.includes(z))}function XQ(Z,X){return Z.reduce((z,W)=>{return ZQ(z,W)},X)}function IX(Z){return Z.length===1?Z[0]:Z.length>1?XQ(Z.slice(1),Z[0]):[]}function TX(Z){let X=[];for(let z of Z)X.push(...z);return X}function N8(Z){return R({[I]:"Any"},Z)}function s8(Z,X){return R({[I]:"Array",type:"array",items:Z},X)}function PX(Z){return R({[I]:"Argument",index:Z})}function a8(Z,X){return R({[I]:"AsyncIterator",type:"AsyncIterator",items:Z},X)}function t(Z,X,z){return R({[I]:"Computed",target:Z,parameters:X},z)}function zQ(Z,X){let{[X]:z,...W}=Z;return W}function $0(Z,X){return X.reduce((z,W)=>zQ(z,W),Z)}function y(Z){return R({[I]:"Never",not:{}},Z)}function m(Z){return R({[I]:"MappedResult",properties:Z})}function r8(Z,X,z){return R({[I]:"Constructor",type:"Constructor",parameters:Z,returns:X},z)}function Q8(Z,X,z){return R({[I]:"Function",type:"Function",parameters:Z,returns:X},z)}function bZ(Z,X){return R({[I]:"Union",anyOf:Z},X)}function $Q(Z){return Z.some((X)=>S0(X))}function wX(Z){return Z.map((X)=>S0(X)?QQ(X):X)}function QQ(Z){return $0(Z,[D0])}function WQ(Z,X){return $Q(Z)?O0(bZ(wX(Z),X)):bZ(wX(Z),X)}function W8(Z,X){return Z.length===1?R(Z[0],X):Z.length===0?y(X):WQ(Z,X)}function c(Z,X){return Z.length===0?y(X):Z.length===1?R(Z[0],X):bZ(Z,X)}class M5 extends M0{}function HQ(Z){return Z.replace(/\\\\\\$/g,"$").replace(/\\\\\\*/g,"*").replace(/\\\\\\^/g,"^").replace(/\\\\\\|/g,"|").replace(/\\\\\\(/g,"(").replace(/\\\\\\)/g,")")}function D5(Z,X,z){return Z[X]===z&&Z.charCodeAt(X-1)!==92}function G8(Z,X){return D5(Z,X,"(")}function fZ(Z,X){return D5(Z,X,")")}function kX(Z,X){return D5(Z,X,"|")}function JQ(Z){if(!(G8(Z,0)&&fZ(Z,Z.length-1)))return!1;let X=0;for(let z=0;z<Z.length;z++){if(G8(Z,z))X+=1;if(fZ(Z,z))X-=1;if(X===0&&z!==Z.length-1)return!1}return!0}function YQ(Z){return Z.slice(1,Z.length-1)}function VQ(Z){let X=0;for(let z=0;z<Z.length;z++){if(G8(Z,z))X+=1;if(fZ(Z,z))X-=1;if(kX(Z,z)&&X===0)return!0}return!1}function _Q(Z){for(let X=0;X<Z.length;X++)if(G8(Z,X))return!0;return!1}function BQ(Z){let[X,z]=[0,0],W=[];for(let q=0;q<Z.length;q++){if(G8(Z,q))X+=1;if(fZ(Z,q))X-=1;if(kX(Z,q)&&X===0){let B=Z.slice(z,q);if(B.length>0)W.push(t8(B));z=q+1}}let V=Z.slice(z);if(V.length>0)W.push(t8(V));if(W.length===0)return{type:"const",const:""};if(W.length===1)return W[0];return{type:"or",expr:W}}function UQ(Z){function X(V,q){if(!G8(V,q))throw new M5("TemplateLiteralParser: Index must point to open parens");let B=0;for(let U=q;U<V.length;U++){if(G8(V,U))B+=1;if(fZ(V,U))B-=1;if(B===0)return[q,U]}throw new M5("TemplateLiteralParser: Unclosed group parens in expression")}function z(V,q){for(let B=q;B<V.length;B++)if(G8(V,B))return[q,B];return[q,V.length]}let W=[];for(let V=0;V<Z.length;V++)if(G8(Z,V)){let[q,B]=X(Z,V),U=Z.slice(q,B+1);W.push(t8(U)),V=B}else{let[q,B]=z(Z,V),U=Z.slice(q,B);if(U.length>0)W.push(t8(U));V=B-1}return W.length===0?{type:"const",const:""}:W.length===1?W[0]:{type:"and",expr:W}}function t8(Z){return JQ(Z)?t8(YQ(Z)):VQ(Z)?BQ(Z):_Q(Z)?UQ(Z):{type:"const",const:HQ(Z)}}function e8(Z){return t8(Z.slice(1,Z.length-1))}class bX extends M0{}function GQ(Z){return Z.type==="or"&&Z.expr.length===2&&Z.expr[0].type==="const"&&Z.expr[0].const==="0"&&Z.expr[1].type==="const"&&Z.expr[1].const==="[1-9][0-9]*"}function qQ(Z){return Z.type==="or"&&Z.expr.length===2&&Z.expr[0].type==="const"&&Z.expr[0].const==="true"&&Z.expr[1].type==="const"&&Z.expr[1].const==="false"}function AQ(Z){return Z.type==="const"&&Z.const===".*"}function u8(Z){return GQ(Z)||AQ(Z)?!1:qQ(Z)?!0:Z.type==="and"?Z.expr.every((X)=>u8(X)):Z.type==="or"?Z.expr.every((X)=>u8(X)):Z.type==="const"?!0:(()=>{throw new bX("Unknown expression type")})()}function fX(Z){let X=e8(Z.pattern);return u8(X)}class xX extends M0{}function*gX(Z){if(Z.length===1)return yield*Z[0];for(let X of Z[0])for(let z of gX(Z.slice(1)))yield\`\${X}\${z}\`}function*MQ(Z){return yield*gX(Z.expr.map((X)=>[...xZ(X)]))}function*DQ(Z){for(let X of Z.expr)yield*xZ(X)}function*LQ(Z){return yield Z.const}function*xZ(Z){return Z.type==="and"?yield*MQ(Z):Z.type==="or"?yield*DQ(Z):Z.type==="const"?yield*LQ(Z):(()=>{throw new xX("Unknown expression")})()}function q6(Z){let X=e8(Z.pattern);return u8(X)?[...xZ(X)]:[]}function d(Z,X){return R({[I]:"Literal",const:Z,type:typeof Z},X)}function A6(Z){return R({[I]:"Boolean",type:"boolean"},Z)}function ZZ(Z){return R({[I]:"BigInt",type:"bigint"},Z)}function y0(Z){return R({[I]:"Number",type:"number"},Z)}function X8(Z){return R({[I]:"String",type:"string"},Z)}function*OQ(Z){let X=Z.trim().replace(/"|'/g,"");return X==="boolean"?yield A6():X==="number"?yield y0():X==="bigint"?yield ZZ():X==="string"?yield X8():yield(()=>{let z=X.split("|").map((W)=>d(W.trim()));return z.length===0?y():z.length===1?z[0]:W8(z)})()}function*FQ(Z){if(Z[1]!=="{"){let X=d("$"),z=L5(Z.slice(1));return yield*[X,...z]}for(let X=2;X<Z.length;X++)if(Z[X]==="}"){let z=OQ(Z.slice(2,X)),W=L5(Z.slice(X+1));return yield*[...z,...W]}yield d(Z)}function*L5(Z){for(let X=0;X<Z.length;X++)if(Z[X]==="$"){let z=d(Z.slice(0,X)),W=FQ(Z.slice(X));return yield*[z,...W]}yield d(Z)}function hX(Z){return[...L5(Z)]}class vX extends M0{}function NQ(Z){return Z.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")}function yX(Z,X){return b0(Z)?Z.pattern.slice(1,Z.pattern.length-1):v(Z)?\`(\${Z.anyOf.map((z)=>yX(z,X)).join("|")})\`:Z8(Z)?\`\${X}\${G6}\`:e0(Z)?\`\${X}\${G6}\`:h8(Z)?\`\${X}\${G6}\`:B8(Z)?\`\${X}\${RX}\`:w0(Z)?\`\${X}\${NQ(Z.const.toString())}\`:_8(Z)?\`\${X}\${jX}\`:(()=>{throw new vX(\`Unexpected Kind '\${Z[I]}'\`)})()}function O5(Z){return\`^\${Z.map((X)=>yX(X,"")).join("")}$\`}function d8(Z){let z=q6(Z).map((W)=>d(W));return W8(z)}function M6(Z,X){let z=a(Z)?O5(hX(Z)):O5(Z);return R({[I]:"TemplateLiteral",type:"string",pattern:z},X)}function KQ(Z){return q6(Z).map((z)=>z.toString())}function jQ(Z){let X=[];for(let z of Z)X.push(...C0(z));return X}function RQ(Z){return[Z.toString()]}function C0(Z){return[...new Set(b0(Z)?KQ(Z):v(Z)?jQ(Z.anyOf):w0(Z)?RQ(Z.const):Z8(Z)?["[number]"]:e0(Z)?["[number]"]:[])]}function SQ(Z,X,z){let W={};for(let V of Object.getOwnPropertyNames(X))W[V]=K8(Z,C0(X[V]),z);return W}function CQ(Z,X,z){return SQ(Z,X.properties,z)}function mX(Z,X,z){let W=CQ(Z,X,z);return m(W)}function dX(Z,X){return Z.map((z)=>cX(z,X))}function EQ(Z){return Z.filter((X)=>!D8(X))}function IQ(Z,X){return D6(EQ(dX(Z,X)))}function TQ(Z){return Z.some((X)=>D8(X))?[]:Z}function PQ(Z,X){return W8(TQ(dX(Z,X)))}function wQ(Z,X){return X in Z?Z[X]:X==="[number]"?W8(Z):y()}function kQ(Z,X){return X==="[number]"?Z:y()}function bQ(Z,X){return X in Z?Z[X]:y()}function cX(Z,X){return z0(Z)?IQ(Z.allOf,X):v(Z)?PQ(Z.anyOf,X):f0(Z)?wQ(Z.items??[],X):s0(Z)?kQ(Z.items,X):Y0(Z)?bQ(Z.properties,X):y()}function F5(Z,X){return X.map((z)=>cX(Z,z))}function uX(Z,X){return W8(F5(Z,X))}function K8(Z,X,z){if(W0(Z)||W0(X)){if(!x0(Z)||!x0(X))throw new M0("Index types using Ref parameters require both Type and Key to be of TSchema");return t("Index",[Z,X])}if(Z0(X))return mX(Z,X,z);if(k0(X))return pX(Z,X,z);return R(x0(X)?uX(Z,C0(X)):uX(Z,X),z)}function fQ(Z,X,z){return{[X]:K8(Z,[X],e(z))}}function xQ(Z,X,z){return X.reduce((W,V)=>{return{...W,...fQ(Z,V,z)}},{})}function gQ(Z,X,z){return xQ(Z,X.keys,z)}function pX(Z,X,z){let W=gQ(Z,X,z);return m(W)}function XZ(Z,X){return R({[I]:"Iterator",type:"Iterator",items:Z},X)}function hQ(Z){return globalThis.Object.keys(Z).filter((X)=>!S0(Z[X]))}function vQ(Z,X){let z=hQ(Z),W=z.length>0?{[I]:"Object",type:"object",required:z,properties:Z}:{[I]:"Object",type:"object",properties:Z};return R(W,X)}var o=vQ;function L6(Z,X){return R({[I]:"Promise",type:"Promise",item:Z},X)}function yQ(Z){return R($0(Z,[o0]))}function mQ(Z){return R({...Z,[o0]:"Readonly"})}function uQ(Z,X){return X===!1?yQ(Z):mQ(Z)}function E0(Z,X){let z=X??!0;return Z0(Z)?lX(Z,z):uQ(Z,z)}function dQ(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=E0(Z[W],X);return z}function cQ(Z,X){return dQ(Z.properties,X)}function lX(Z,X){let z=cQ(Z,X);return m(z)}function m0(Z,X){return R(Z.length>0?{[I]:"Tuple",type:"array",items:Z,additionalItems:!1,minItems:Z.length,maxItems:Z.length}:{[I]:"Tuple",type:"array",minItems:Z.length,maxItems:Z.length},X)}function iX(Z,X){return Z in X?u0(Z,X[Z]):m(X)}function pQ(Z){return{[Z]:d(Z)}}function lQ(Z){let X={};for(let z of Z)X[z]=d(z);return X}function iQ(Z,X){return CX(X,Z)?pQ(Z):lQ(X)}function nQ(Z,X){let z=iQ(Z,X);return iX(Z,z)}function gZ(Z,X){return X.map((z)=>u0(Z,z))}function oQ(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(X))z[W]=u0(Z,X[W]);return z}function u0(Z,X){let z={...X};return S0(X)?O0(u0(Z,$0(X,[D0]))):o8(X)?E0(u0(Z,$0(X,[o0]))):Z0(X)?iX(Z,X.properties):k0(X)?nQ(Z,X.keys):r0(X)?r8(gZ(Z,X.parameters),u0(Z,X.returns),z):t0(X)?Q8(gZ(Z,X.parameters),u0(Z,X.returns),z):g8(X)?a8(u0(Z,X.items),z):v8(X)?XZ(u0(Z,X.items),z):z0(X)?F0(gZ(Z,X.allOf),z):v(X)?c(gZ(Z,X.anyOf),z):f0(X)?m0(gZ(Z,X.items??[]),z):Y0(X)?o(oQ(Z,X.properties),z):s0(X)?s8(u0(Z,X.items),z):y8(X)?L6(u0(Z,X.item),z):X}function sQ(Z,X){let z={};for(let W of Z)z[W]=u0(W,X);return z}function nX(Z,X,z){let W=x0(Z)?C0(Z):Z,V=X({[I]:"MappedKey",keys:W}),q=sQ(W,V);return o(q,z)}function aQ(Z){return R($0(Z,[D0]))}function rQ(Z){return R({...Z,[D0]:"Optional"})}function tQ(Z,X){return X===!1?aQ(Z):rQ(Z)}function O0(Z,X){let z=X??!0;return Z0(Z)?oX(Z,z):tQ(Z,z)}function eQ(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=O0(Z[W],X);return z}function Z1(Z,X){return eQ(Z.properties,X)}function oX(Z,X){let z=Z1(Z,X);return m(z)}function hZ(Z,X={}){let z=Z.every((V)=>Y0(V)),W=x0(X.unevaluatedProperties)?{unevaluatedProperties:X.unevaluatedProperties}:{};return R(X.unevaluatedProperties===!1||x0(X.unevaluatedProperties)||z?{...W,[I]:"Intersect",type:"object",allOf:Z}:{...W,[I]:"Intersect",allOf:Z},X)}function X1(Z){return Z.every((X)=>S0(X))}function z1(Z){return $0(Z,[D0])}function sX(Z){return Z.map((X)=>S0(X)?z1(X):X)}function $1(Z,X){return X1(Z)?O0(hZ(sX(Z),X)):hZ(sX(Z),X)}function D6(Z,X={}){if(Z.length===1)return R(Z[0],X);if(Z.length===0)return y(X);if(Z.some((z)=>L8(z)))throw Error("Cannot intersect transform types");return $1(Z,X)}function F0(Z,X){if(Z.length===1)return R(Z[0],X);if(Z.length===0)return y(X);if(Z.some((z)=>L8(z)))throw Error("Cannot intersect transform types");return hZ(Z,X)}function H8(...Z){let[X,z]=typeof Z[0]==="string"?[Z[0],Z[1]]:[Z[0].$id,Z[1]];if(typeof X!=="string")throw new M0("Ref: $ref must be a string");return R({[I]:"Ref",$ref:X},z)}function Q1(Z,X){return t("Awaited",[t(Z,X)])}function W1(Z){return t("Awaited",[H8(Z)])}function H1(Z){return F0(aX(Z))}function J1(Z){return c(aX(Z))}function Y1(Z){return zZ(Z)}function aX(Z){return Z.map((X)=>zZ(X))}function zZ(Z,X){return R(a0(Z)?Q1(Z.target,Z.parameters):z0(Z)?H1(Z.allOf):v(Z)?J1(Z.anyOf):y8(Z)?Y1(Z.item):W0(Z)?W1(Z.$ref):Z,X)}function rX(Z){let X=[];for(let z of Z)X.push(vZ(z));return X}function V1(Z){let X=rX(Z);return TX(X)}function _1(Z){let X=rX(Z);return IX(X)}function B1(Z){return Z.map((X,z)=>z.toString())}function U1(Z){return["[number]"]}function G1(Z){return globalThis.Object.getOwnPropertyNames(Z)}function q1(Z){if(!A1)return[];return globalThis.Object.getOwnPropertyNames(Z).map((z)=>{return z[0]==="^"&&z[z.length-1]==="$"?z.slice(1,z.length-1):z})}function vZ(Z){return z0(Z)?V1(Z.allOf):v(Z)?_1(Z.anyOf):f0(Z)?B1(Z.items??[]):s0(Z)?U1(Z.items):Y0(Z)?G1(Z.properties):m8(Z)?q1(Z.patternProperties):[]}var A1=!1;function M1(Z,X){return t("KeyOf",[t(Z,X)])}function D1(Z){return t("KeyOf",[H8(Z)])}function L1(Z,X){let z=vZ(Z),W=O1(z),V=W8(W);return R(V,X)}function O1(Z){return Z.map((X)=>X==="[number]"?y0():d(X))}function $Z(Z,X){return a0(Z)?M1(Z.target,Z.parameters):W0(Z)?D1(Z.$ref):Z0(Z)?tX(Z,X):L1(Z,X)}function F1(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=$Z(Z[W],e(X));return z}function N1(Z,X){return F1(Z.properties,X)}function tX(Z,X){let z=N1(Z,X);return m(z)}function K1(Z){let X=[];for(let z of Z)X.push(...vZ(z));return EX(X)}function j1(Z){return Z.filter((X)=>!D8(X))}function R1(Z,X){let z=[];for(let W of Z)z.push(...F5(W,[X]));return j1(z)}function S1(Z,X){let z={};for(let W of X)z[W]=D6(R1(Z,W));return z}function eX(Z,X){let z=K1(Z),W=S1(Z,z);return o(W,X)}function O6(Z){return R({[I]:"Date",type:"Date"},Z)}function F6(Z){return R({[I]:"Null",type:"null"},Z)}function N6(Z){return R({[I]:"Symbol",type:"symbol"},Z)}function K6(Z){return R({[I]:"Undefined",type:"undefined"},Z)}function j6(Z){return R({[I]:"Uint8Array",type:"Uint8Array"},Z)}function j8(Z){return R({[I]:"Unknown"},Z)}function C1(Z){return Z.map((X)=>N5(X,!1))}function E1(Z){let X={};for(let z of globalThis.Object.getOwnPropertyNames(Z))X[z]=E0(N5(Z[z],!1));return X}function R6(Z,X){return X===!0?Z:E0(Z)}function N5(Z,X){return W5(Z)?R6(N8(),X):J5(Z)?R6(N8(),X):H0(Z)?E0(m0(C1(Z))):V8(Z)?j6():x8(Z)?O6():i(Z)?R6(o(E1(Z)),X):H5(Z)?R6(Q8([],j8()),X):J0(Z)?K6():Y5(Z)?F6():V5(Z)?N6():SZ(Z)?ZZ():P0(Z)?d(Z):Y8(Z)?d(Z):a(Z)?d(Z):o({})}function Z2(Z,X){return R(N5(Z,!0),X)}function X2(Z,X){return r0(Z)?m0(Z.parameters,X):y(X)}function z2(Z,X){if(J0(Z))throw Error("Enum undefined or empty");let z=globalThis.Object.getOwnPropertyNames(Z).filter((q)=>isNaN(q)).map((q)=>Z[q]),V=[...new Set(z)].map((q)=>d(q));return c(V,{...X,[v0]:"Enum"})}class J2 extends M0{}var S;(function(Z){Z[Z.Union=0]="Union",Z[Z.True=1]="True",Z[Z.False=2]="False"})(S||(S={}));function d0(Z){return Z===S.False?Z:S.True}function QZ(Z){throw new J2(Z)}function _0(Z){return O.IsNever(Z)||O.IsIntersect(Z)||O.IsUnion(Z)||O.IsUnknown(Z)||O.IsAny(Z)}function B0(Z,X){return O.IsNever(X)?_2(Z,X):O.IsIntersect(X)?S6(Z,X):O.IsUnion(X)?C5(Z,X):O.IsUnknown(X)?q2(Z,X):O.IsAny(X)?S5(Z,X):QZ("StructuralRight")}function S5(Z,X){return S.True}function I1(Z,X){return O.IsIntersect(X)?S6(Z,X):O.IsUnion(X)&&X.anyOf.some((z)=>O.IsAny(z)||O.IsUnknown(z))?S.True:O.IsUnion(X)?S.Union:O.IsUnknown(X)?S.True:O.IsAny(X)?S.True:S.Union}function T1(Z,X){return O.IsUnknown(Z)?S.False:O.IsAny(Z)?S.Union:O.IsNever(Z)?S.True:S.False}function P1(Z,X){return O.IsObject(X)&&C6(X)?S.True:_0(X)?B0(Z,X):!O.IsArray(X)?S.False:d0(s(Z.items,X.items))}function w1(Z,X){return _0(X)?B0(Z,X):!O.IsAsyncIterator(X)?S.False:d0(s(Z.items,X.items))}function k1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsBigInt(X)?S.True:S.False}function Y2(Z,X){return O.IsLiteralBoolean(Z)?S.True:O.IsBoolean(Z)?S.True:S.False}function b1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsBoolean(X)?S.True:S.False}function f1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):!O.IsConstructor(X)?S.False:Z.parameters.length>X.parameters.length?S.False:!Z.parameters.every((z,W)=>d0(s(X.parameters[W],z))===S.True)?S.False:d0(s(Z.returns,X.returns))}function x1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsDate(X)?S.True:S.False}function g1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):!O.IsFunction(X)?S.False:Z.parameters.length>X.parameters.length?S.False:!Z.parameters.every((z,W)=>d0(s(X.parameters[W],z))===S.True)?S.False:d0(s(Z.returns,X.returns))}function V2(Z,X){return O.IsLiteral(Z)&&L0.IsNumber(Z.const)?S.True:O.IsNumber(Z)||O.IsInteger(Z)?S.True:S.False}function h1(Z,X){return O.IsInteger(X)||O.IsNumber(X)?S.True:_0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):S.False}function S6(Z,X){return X.allOf.every((z)=>s(Z,z)===S.True)?S.True:S.False}function v1(Z,X){return Z.allOf.some((z)=>s(z,X)===S.True)?S.True:S.False}function y1(Z,X){return _0(X)?B0(Z,X):!O.IsIterator(X)?S.False:d0(s(Z.items,X.items))}function m1(Z,X){return O.IsLiteral(X)&&X.const===Z.const?S.True:_0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsString(X)?G2(Z,X):O.IsNumber(X)?B2(Z,X):O.IsInteger(X)?V2(Z,X):O.IsBoolean(X)?Y2(Z,X):S.False}function _2(Z,X){return S.False}function u1(Z,X){return S.True}function $2(Z){let[X,z]=[Z,0];while(!0){if(!O.IsNot(X))break;X=X.not,z+=1}return z%2===0?X:j8()}function d1(Z,X){return O.IsNot(Z)?s($2(Z),X):O.IsNot(X)?s(Z,$2(X)):QZ("Invalid fallthrough for Not")}function c1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsNull(X)?S.True:S.False}function B2(Z,X){return O.IsLiteralNumber(Z)?S.True:O.IsNumber(Z)||O.IsInteger(Z)?S.True:S.False}function p1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsInteger(X)||O.IsNumber(X)?S.True:S.False}function I0(Z,X){return Object.getOwnPropertyNames(Z.properties).length===X}function Q2(Z){return C6(Z)}function W2(Z){return I0(Z,0)||I0(Z,1)&&"description"in Z.properties&&O.IsUnion(Z.properties.description)&&Z.properties.description.anyOf.length===2&&(O.IsString(Z.properties.description.anyOf[0])&&O.IsUndefined(Z.properties.description.anyOf[1])||O.IsString(Z.properties.description.anyOf[1])&&O.IsUndefined(Z.properties.description.anyOf[0]))}function K5(Z){return I0(Z,0)}function H2(Z){return I0(Z,0)}function l1(Z){return I0(Z,0)}function i1(Z){return I0(Z,0)}function n1(Z){return C6(Z)}function o1(Z){let X=y0();return I0(Z,0)||I0(Z,1)&&"length"in Z.properties&&d0(s(Z.properties.length,X))===S.True}function s1(Z){return I0(Z,0)}function C6(Z){let X=y0();return I0(Z,0)||I0(Z,1)&&"length"in Z.properties&&d0(s(Z.properties.length,X))===S.True}function a1(Z){let X=Q8([N8()],N8());return I0(Z,0)||I0(Z,1)&&"then"in Z.properties&&d0(s(Z.properties.then,X))===S.True}function U2(Z,X){return s(Z,X)===S.False?S.False:O.IsOptional(Z)&&!O.IsOptional(X)?S.False:S.True}function N0(Z,X){return O.IsUnknown(Z)?S.False:O.IsAny(Z)?S.Union:O.IsNever(Z)||O.IsLiteralString(Z)&&Q2(X)||O.IsLiteralNumber(Z)&&K5(X)||O.IsLiteralBoolean(Z)&&H2(X)||O.IsSymbol(Z)&&W2(X)||O.IsBigInt(Z)&&l1(X)||O.IsString(Z)&&Q2(X)||O.IsSymbol(Z)&&W2(X)||O.IsNumber(Z)&&K5(X)||O.IsInteger(Z)&&K5(X)||O.IsBoolean(Z)&&H2(X)||O.IsUint8Array(Z)&&n1(X)||O.IsDate(Z)&&i1(X)||O.IsConstructor(Z)&&s1(X)||O.IsFunction(Z)&&o1(X)?S.True:O.IsRecord(Z)&&O.IsString(j5(Z))?(()=>{return X[v0]==="Record"?S.True:S.False})():O.IsRecord(Z)&&O.IsNumber(j5(Z))?(()=>{return I0(X,0)?S.True:S.False})():S.False}function r1(Z,X){return _0(X)?B0(Z,X):O.IsRecord(X)?c0(Z,X):!O.IsObject(X)?S.False:(()=>{for(let z of Object.getOwnPropertyNames(X.properties)){if(!(z in Z.properties)&&!O.IsOptional(X.properties[z]))return S.False;if(O.IsOptional(X.properties[z]))return S.True;if(U2(Z.properties[z],X.properties[z])===S.False)return S.False}return S.True})()}function t1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)&&a1(X)?S.True:!O.IsPromise(X)?S.False:d0(s(Z.item,X.item))}function j5(Z){return O8 in Z.patternProperties?y0():(F8 in Z.patternProperties)?X8():QZ("Unknown record key pattern")}function R5(Z){return O8 in Z.patternProperties?Z.patternProperties[O8]:(F8 in Z.patternProperties)?Z.patternProperties[F8]:QZ("Unable to get record value schema")}function c0(Z,X){let[z,W]=[j5(X),R5(X)];return O.IsLiteralString(Z)&&O.IsNumber(z)&&d0(s(Z,W))===S.True?S.True:O.IsUint8Array(Z)&&O.IsNumber(z)?s(Z,W):O.IsString(Z)&&O.IsNumber(z)?s(Z,W):O.IsArray(Z)&&O.IsNumber(z)?s(Z,W):O.IsObject(Z)?(()=>{for(let V of Object.getOwnPropertyNames(Z.properties))if(U2(W,Z.properties[V])===S.False)return S.False;return S.True})():S.False}function e1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):!O.IsRecord(X)?S.False:s(R5(Z),R5(X))}function ZW(Z,X){let z=O.IsRegExp(Z)?X8():Z,W=O.IsRegExp(X)?X8():X;return s(z,W)}function G2(Z,X){return O.IsLiteral(Z)&&L0.IsString(Z.const)?S.True:O.IsString(Z)?S.True:S.False}function XW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsString(X)?S.True:S.False}function zW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsSymbol(X)?S.True:S.False}function $W(Z,X){return O.IsTemplateLiteral(Z)?s(d8(Z),X):O.IsTemplateLiteral(X)?s(Z,d8(X)):QZ("Invalid fallthrough for TemplateLiteral")}function QW(Z,X){return O.IsArray(X)&&Z.items!==void 0&&Z.items.every((z)=>s(z,X.items)===S.True)}function WW(Z,X){return O.IsNever(Z)?S.True:O.IsUnknown(Z)?S.False:O.IsAny(Z)?S.Union:S.False}function HW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)&&C6(X)?S.True:O.IsArray(X)&&QW(Z,X)?S.True:!O.IsTuple(X)?S.False:L0.IsUndefined(Z.items)&&!L0.IsUndefined(X.items)||!L0.IsUndefined(Z.items)&&L0.IsUndefined(X.items)?S.False:L0.IsUndefined(Z.items)&&!L0.IsUndefined(X.items)?S.True:Z.items.every((z,W)=>s(z,X.items[W])===S.True)?S.True:S.False}function JW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsUint8Array(X)?S.True:S.False}function YW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsVoid(X)?BW(Z,X):O.IsUndefined(X)?S.True:S.False}function C5(Z,X){return X.anyOf.some((z)=>s(Z,z)===S.True)?S.True:S.False}function VW(Z,X){return Z.anyOf.every((z)=>s(z,X)===S.True)?S.True:S.False}function q2(Z,X){return S.True}function _W(Z,X){return O.IsNever(X)?_2(Z,X):O.IsIntersect(X)?S6(Z,X):O.IsUnion(X)?C5(Z,X):O.IsAny(X)?S5(Z,X):O.IsString(X)?G2(Z,X):O.IsNumber(X)?B2(Z,X):O.IsInteger(X)?V2(Z,X):O.IsBoolean(X)?Y2(Z,X):O.IsArray(X)?T1(Z,X):O.IsTuple(X)?WW(Z,X):O.IsObject(X)?N0(Z,X):O.IsUnknown(X)?S.True:S.False}function BW(Z,X){return O.IsUndefined(Z)?S.True:O.IsUndefined(Z)?S.True:S.False}function UW(Z,X){return O.IsIntersect(X)?S6(Z,X):O.IsUnion(X)?C5(Z,X):O.IsUnknown(X)?q2(Z,X):O.IsAny(X)?S5(Z,X):O.IsObject(X)?N0(Z,X):O.IsVoid(X)?S.True:S.False}function s(Z,X){return O.IsTemplateLiteral(Z)||O.IsTemplateLiteral(X)?$W(Z,X):O.IsRegExp(Z)||O.IsRegExp(X)?ZW(Z,X):O.IsNot(Z)||O.IsNot(X)?d1(Z,X):O.IsAny(Z)?I1(Z,X):O.IsArray(Z)?P1(Z,X):O.IsBigInt(Z)?k1(Z,X):O.IsBoolean(Z)?b1(Z,X):O.IsAsyncIterator(Z)?w1(Z,X):O.IsConstructor(Z)?f1(Z,X):O.IsDate(Z)?x1(Z,X):O.IsFunction(Z)?g1(Z,X):O.IsInteger(Z)?h1(Z,X):O.IsIntersect(Z)?v1(Z,X):O.IsIterator(Z)?y1(Z,X):O.IsLiteral(Z)?m1(Z,X):O.IsNever(Z)?u1(Z,X):O.IsNull(Z)?c1(Z,X):O.IsNumber(Z)?p1(Z,X):O.IsObject(Z)?r1(Z,X):O.IsRecord(Z)?e1(Z,X):O.IsString(Z)?XW(Z,X):O.IsSymbol(Z)?zW(Z,X):O.IsTuple(Z)?HW(Z,X):O.IsPromise(Z)?t1(Z,X):O.IsUint8Array(Z)?JW(Z,X):O.IsUndefined(Z)?YW(Z,X):O.IsUnion(Z)?VW(Z,X):O.IsUnknown(Z)?_W(Z,X):O.IsVoid(Z)?UW(Z,X):QZ(\`Unknown left type operand '\${Z[I]}'\`)}function R8(Z,X){return s(Z,X)}function GW(Z,X,z,W,V){let q={};for(let B of globalThis.Object.getOwnPropertyNames(Z))q[B]=WZ(Z[B],X,z,W,e(V));return q}function qW(Z,X,z,W,V){return GW(Z.properties,X,z,W,V)}function A2(Z,X,z,W,V){let q=qW(Z,X,z,W,V);return m(q)}function AW(Z,X,z,W){let V=R8(Z,X);return V===S.Union?c([z,W]):V===S.True?z:W}function WZ(Z,X,z,W,V){return Z0(Z)?A2(Z,X,z,W,V):k0(Z)?R(M2(Z,X,z,W,V)):R(AW(Z,X,z,W),V)}function MW(Z,X,z,W,V){return{[Z]:WZ(d(Z),X,z,W,e(V))}}function DW(Z,X,z,W,V){return Z.reduce((q,B)=>{return{...q,...MW(B,X,z,W,V)}},{})}function LW(Z,X,z,W,V){return DW(Z.keys,X,z,W,V)}function M2(Z,X,z,W,V){let q=LW(Z,X,z,W,V);return m(q)}function D2(Z,X){return HZ(d8(Z),X)}function OW(Z,X){let z=Z.filter((W)=>R8(W,X)===S.False);return z.length===1?z[0]:c(z)}function HZ(Z,X,z={}){if(b0(Z))return R(D2(Z,X),z);if(Z0(Z))return R(L2(Z,X),z);return R(v(Z)?OW(Z.anyOf,X):R8(Z,X)!==S.False?y():Z,z)}function FW(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=HZ(Z[W],X);return z}function NW(Z,X){return FW(Z.properties,X)}function L2(Z,X){let z=NW(Z,X);return m(z)}function O2(Z,X){return JZ(d8(Z),X)}function KW(Z,X){let z=Z.filter((W)=>R8(W,X)!==S.False);return z.length===1?z[0]:c(z)}function JZ(Z,X,z){if(b0(Z))return R(O2(Z,X),z);if(Z0(Z))return R(F2(Z,X),z);return R(v(Z)?KW(Z.anyOf,X):R8(Z,X)!==S.False?Z:y(),z)}function jW(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=JZ(Z[W],X);return z}function RW(Z,X){return jW(Z.properties,X)}function F2(Z,X){let z=RW(Z,X);return m(z)}function N2(Z,X){return r0(Z)?R(Z.returns,X):y(X)}function E6(Z){return E0(O0(Z))}function c8(Z,X,z){return R({[I]:"Record",type:"object",patternProperties:{[Z]:X}},z)}function E5(Z,X,z){let W={};for(let V of Z)W[V]=X;return o(W,{...z,[v0]:"Record"})}function SW(Z,X,z){return fX(Z)?E5(C0(Z),X,z):c8(Z.pattern,X,z)}function CW(Z,X,z){return E5(C0(c(Z)),X,z)}function EW(Z,X,z){return E5([Z.toString()],X,z)}function IW(Z,X,z){return c8(Z.source,X,z)}function TW(Z,X,z){let W=J0(Z.pattern)?F8:Z.pattern;return c8(W,X,z)}function PW(Z,X,z){return c8(F8,X,z)}function wW(Z,X,z){return c8(SX,X,z)}function kW(Z,X,z){return o({true:X,false:X},z)}function bW(Z,X,z){return c8(O8,X,z)}function fW(Z,X,z){return c8(O8,X,z)}function I6(Z,X,z={}){return v(Z)?CW(Z.anyOf,X,z):b0(Z)?SW(Z,X,z):w0(Z)?EW(Z.const,X,z):_8(Z)?kW(Z,X,z):e0(Z)?bW(Z,X,z):Z8(Z)?fW(Z,X,z):U5(Z)?IW(Z,X,z):B8(Z)?TW(Z,X,z):_5(Z)?PW(Z,X,z):D8(Z)?wW(Z,X,z):y(z)}function T6(Z){return globalThis.Object.getOwnPropertyNames(Z.patternProperties)[0]}function K2(Z){let X=T6(Z);return X===F8?X8():X===O8?y0():X8({pattern:X})}function P6(Z){return Z.patternProperties[T6(Z)]}function xW(Z,X){return X.parameters=yZ(Z,X.parameters),X.returns=z8(Z,X.returns),X}function gW(Z,X){return X.parameters=yZ(Z,X.parameters),X.returns=z8(Z,X.returns),X}function hW(Z,X){return X.allOf=yZ(Z,X.allOf),X}function vW(Z,X){return X.anyOf=yZ(Z,X.anyOf),X}function yW(Z,X){if(J0(X.items))return X;return X.items=yZ(Z,X.items),X}function mW(Z,X){return X.items=z8(Z,X.items),X}function uW(Z,X){return X.items=z8(Z,X.items),X}function dW(Z,X){return X.items=z8(Z,X.items),X}function cW(Z,X){return X.item=z8(Z,X.item),X}function pW(Z,X){let z=oW(Z,X.properties);return{...X,...o(z)}}function lW(Z,X){let z=z8(Z,K2(X)),W=z8(Z,P6(X)),V=I6(z,W);return{...X,...V}}function iW(Z,X){return X.index in Z?Z[X.index]:j8()}function nW(Z,X){let z=o8(X),W=S0(X),V=z8(Z,X);return z&&W?E6(V):z&&!W?E0(V):!z&&W?O0(V):V}function oW(Z,X){return globalThis.Object.getOwnPropertyNames(X).reduce((z,W)=>{return{...z,[W]:nW(Z,X[W])}},{})}function yZ(Z,X){return X.map((z)=>z8(Z,z))}function z8(Z,X){return r0(X)?xW(Z,X):t0(X)?gW(Z,X):z0(X)?hW(Z,X):v(X)?vW(Z,X):f0(X)?yW(Z,X):s0(X)?mW(Z,X):g8(X)?uW(Z,X):v8(X)?dW(Z,X):y8(X)?cW(Z,X):Y0(X)?pW(Z,X):m8(X)?lW(Z,X):B5(X)?iW(Z,X):X}function j2(Z,X){return z8(X,n8(Z))}function R2(Z){return R({[I]:"Integer",type:"integer"},Z)}function sW(Z,X,z){return{[Z]:$8(d(Z),X,e(z))}}function aW(Z,X,z){return Z.reduce((V,q)=>{return{...V,...sW(q,X,z)}},{})}function rW(Z,X,z){return aW(Z.keys,X,z)}function S2(Z,X,z){let W=rW(Z,X,z);return m(W)}function tW(Z){let[X,z]=[Z.slice(0,1),Z.slice(1)];return[X.toLowerCase(),z].join("")}function eW(Z){let[X,z]=[Z.slice(0,1),Z.slice(1)];return[X.toUpperCase(),z].join("")}function ZH(Z){return Z.toUpperCase()}function XH(Z){return Z.toLowerCase()}function zH(Z,X,z){let W=e8(Z.pattern);if(!u8(W))return{...Z,pattern:C2(Z.pattern,X)};let B=[...xZ(W)].map((H)=>d(H)),U=E2(B,X),G=c(U);return M6([G],z)}function C2(Z,X){return typeof Z==="string"?X==="Uncapitalize"?tW(Z):X==="Capitalize"?eW(Z):X==="Uppercase"?ZH(Z):X==="Lowercase"?XH(Z):Z:Z.toString()}function E2(Z,X){return Z.map((z)=>$8(z,X))}function $8(Z,X,z={}){return k0(Z)?S2(Z,X,z):b0(Z)?zH(Z,X,z):v(Z)?c(E2(Z.anyOf,X),z):w0(Z)?d(C2(Z.const,X),z):R(Z,z)}function I2(Z,X={}){return $8(Z,"Capitalize",X)}function T2(Z,X={}){return $8(Z,"Lowercase",X)}function P2(Z,X={}){return $8(Z,"Uncapitalize",X)}function w2(Z,X={}){return $8(Z,"Uppercase",X)}function $H(Z,X,z){let W={};for(let V of globalThis.Object.getOwnPropertyNames(Z))W[V]=S8(Z[V],X,e(z));return W}function QH(Z,X,z){return $H(Z.properties,X,z)}function k2(Z,X,z){let W=QH(Z,X,z);return m(W)}function WH(Z,X){return Z.map((z)=>I5(z,X))}function HH(Z,X){return Z.map((z)=>I5(z,X))}function JH(Z,X){let{[X]:z,...W}=Z;return W}function YH(Z,X){return X.reduce((z,W)=>JH(z,W),Z)}function VH(Z,X,z){let W=$0(Z,[V0,"$id","required","properties"]),V=YH(z,X);return o(V,W)}function _H(Z){let X=Z.reduce((z,W)=>B6(W)?[...z,d(W)]:z,[]);return c(X)}function I5(Z,X){return z0(Z)?F0(WH(Z.allOf,X)):v(Z)?c(HH(Z.anyOf,X)):Y0(Z)?VH(Z,X,Z.properties):o({})}function S8(Z,X,z){let W=H0(X)?_H(X):X,V=x0(X)?C0(X):X,q=W0(Z),B=W0(X);return Z0(Z)?k2(Z,V,z):k0(X)?b2(Z,X,z):q&&B?t("Omit",[Z,W],z):!q&&B?t("Omit",[Z,W],z):q&&!B?t("Omit",[Z,W],z):R({...I5(Z,V),...z})}function BH(Z,X,z){return{[X]:S8(Z,[X],e(z))}}function UH(Z,X,z){return X.reduce((W,V)=>{return{...W,...BH(Z,V,z)}},{})}function GH(Z,X,z){return UH(Z,X.keys,z)}function b2(Z,X,z){let W=GH(Z,X,z);return m(W)}function qH(Z,X,z){let W={};for(let V of globalThis.Object.getOwnPropertyNames(Z))W[V]=C8(Z[V],X,e(z));return W}function AH(Z,X,z){return qH(Z.properties,X,z)}function f2(Z,X,z){let W=AH(Z,X,z);return m(W)}function MH(Z,X){return Z.map((z)=>T5(z,X))}function DH(Z,X){return Z.map((z)=>T5(z,X))}function LH(Z,X){let z={};for(let W of X)if(W in Z)z[W]=Z[W];return z}function OH(Z,X,z){let W=$0(Z,[V0,"$id","required","properties"]),V=LH(z,X);return o(V,W)}function FH(Z){let X=Z.reduce((z,W)=>B6(W)?[...z,d(W)]:z,[]);return c(X)}function T5(Z,X){return z0(Z)?F0(MH(Z.allOf,X)):v(Z)?c(DH(Z.anyOf,X)):Y0(Z)?OH(Z,X,Z.properties):o({})}function C8(Z,X,z){let W=H0(X)?FH(X):X,V=x0(X)?C0(X):X,q=W0(Z),B=W0(X);return Z0(Z)?f2(Z,V,z):k0(X)?x2(Z,X,z):q&&B?t("Pick",[Z,W],z):!q&&B?t("Pick",[Z,W],z):q&&!B?t("Pick",[Z,W],z):R({...T5(Z,V),...z})}function NH(Z,X,z){return{[X]:C8(Z,[X],e(z))}}function KH(Z,X,z){return X.reduce((W,V)=>{return{...W,...NH(Z,V,z)}},{})}function jH(Z,X,z){return KH(Z,X.keys,z)}function x2(Z,X,z){let W=jH(Z,X,z);return m(W)}function RH(Z,X){return t("Partial",[t(Z,X)])}function SH(Z){return t("Partial",[H8(Z)])}function CH(Z){let X={};for(let z of globalThis.Object.getOwnPropertyNames(Z))X[z]=O0(Z[z]);return X}function EH(Z,X){let z=$0(Z,[V0,"$id","required","properties"]),W=CH(X);return o(W,z)}function g2(Z){return Z.map((X)=>h2(X))}function h2(Z){return a0(Z)?RH(Z.target,Z.parameters):W0(Z)?SH(Z.$ref):z0(Z)?F0(g2(Z.allOf)):v(Z)?c(g2(Z.anyOf)):Y0(Z)?EH(Z,Z.properties):h8(Z)?Z:_8(Z)?Z:e0(Z)?Z:w0(Z)?Z:IZ(Z)?Z:Z8(Z)?Z:B8(Z)?Z:TZ(Z)?Z:PZ(Z)?Z:o({})}function YZ(Z,X){if(Z0(Z))return v2(Z,X);else return R({...h2(Z),...X})}function IH(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=YZ(Z[W],e(X));return z}function TH(Z,X){return IH(Z.properties,X)}function v2(Z,X){let z=TH(Z,X);return m(z)}function PH(Z,X){return t("Required",[t(Z,X)])}function wH(Z){return t("Required",[H8(Z)])}function kH(Z){let X={};for(let z of globalThis.Object.getOwnPropertyNames(Z))X[z]=$0(Z[z],[D0]);return X}function bH(Z,X){let z=$0(Z,[V0,"$id","required","properties"]),W=kH(X);return o(W,z)}function y2(Z){return Z.map((X)=>m2(X))}function m2(Z){return a0(Z)?PH(Z.target,Z.parameters):W0(Z)?wH(Z.$ref):z0(Z)?F0(y2(Z.allOf)):v(Z)?c(y2(Z.anyOf)):Y0(Z)?bH(Z,Z.properties):h8(Z)?Z:_8(Z)?Z:e0(Z)?Z:w0(Z)?Z:IZ(Z)?Z:Z8(Z)?Z:B8(Z)?Z:TZ(Z)?Z:PZ(Z)?Z:o({})}function VZ(Z,X){if(Z0(Z))return u2(Z,X);else return R({...m2(Z),...X})}function fH(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=VZ(Z[W],X);return z}function xH(Z,X){return fH(Z.properties,X)}function u2(Z,X){let z=xH(Z,X);return m(z)}function gH(Z,X){return X.map((z)=>{return W0(z)?P5(Z,z.$ref):g0(Z,z)})}function P5(Z,X){return X in Z?W0(Z[X])?P5(Z,Z[X].$ref):g0(Z,Z[X]):y()}function hH(Z){return zZ(Z[0])}function vH(Z){return K8(Z[0],Z[1])}function yH(Z){return $Z(Z[0])}function mH(Z){return YZ(Z[0])}function uH(Z){return S8(Z[0],Z[1])}function dH(Z){return C8(Z[0],Z[1])}function cH(Z){return VZ(Z[0])}function pH(Z,X,z){let W=gH(Z,z);return X==="Awaited"?hH(W):X==="Index"?vH(W):X==="KeyOf"?yH(W):X==="Partial"?mH(W):X==="Omit"?uH(W):X==="Pick"?dH(W):X==="Required"?cH(W):y()}function lH(Z,X){return s8(g0(Z,X))}function iH(Z,X){return a8(g0(Z,X))}function nH(Z,X,z){return r8(mZ(Z,X),g0(Z,z))}function oH(Z,X,z){return Q8(mZ(Z,X),g0(Z,z))}function sH(Z,X){return F0(mZ(Z,X))}function aH(Z,X){return XZ(g0(Z,X))}function rH(Z,X){return o(globalThis.Object.keys(X).reduce((z,W)=>{return{...z,[W]:g0(Z,X[W])}},{}))}function tH(Z,X){let[z,W]=[g0(Z,P6(X)),T6(X)],V=n8(X);return V.patternProperties[W]=z,V}function eH(Z,X){return W0(X)?{...P5(Z,X.$ref),[V0]:X[V0]}:X}function ZJ(Z,X){return m0(mZ(Z,X))}function XJ(Z,X){return c(mZ(Z,X))}function mZ(Z,X){return X.map((z)=>g0(Z,z))}function g0(Z,X){return S0(X)?R(g0(Z,$0(X,[D0])),X):o8(X)?R(g0(Z,$0(X,[o0])),X):L8(X)?R(eH(Z,X),X):s0(X)?R(lH(Z,X.items),X):g8(X)?R(iH(Z,X.items),X):a0(X)?R(pH(Z,X.target,X.parameters)):r0(X)?R(nH(Z,X.parameters,X.returns),X):t0(X)?R(oH(Z,X.parameters,X.returns),X):z0(X)?R(sH(Z,X.allOf),X):v8(X)?R(aH(Z,X.items),X):Y0(X)?R(rH(Z,X.properties),X):m8(X)?R(tH(Z,X)):f0(X)?R(ZJ(Z,X.items||[]),X):v(X)?R(XJ(Z,X.anyOf),X):X}function zJ(Z,X){return X in Z?g0(Z,Z[X]):y()}function d2(Z){return globalThis.Object.getOwnPropertyNames(Z).reduce((X,z)=>{return{...X,[z]:zJ(Z,z)}},{})}class c2{constructor(Z){let X=d2(Z),z=this.WithIdentifiers(X);this.$defs=z}Import(Z,X){let z={...this.$defs,[Z]:R(this.$defs[Z],X)};return R({[I]:"Import",$defs:z,$ref:Z})}WithIdentifiers(Z){return globalThis.Object.getOwnPropertyNames(Z).reduce((X,z)=>{return{...X,[z]:{...Z[z],$id:z}}},{})}}function p2(Z){return new c2(Z)}function l2(Z,X){return R({[I]:"Not",not:Z},X)}function i2(Z,X){return t0(Z)?m0(Z.parameters,X):y()}var $J=0;function n2(Z,X={}){if(J0(X.$id))X.$id=\`T\${$J++}\`;let z=n8(Z({[I]:"This",$ref:\`\${X.$id}\`}));return z.$id=X.$id,R({[v0]:"Recursive",...z},X)}function o2(Z,X){let z=a(Z)?new globalThis.RegExp(Z):Z;return R({[I]:"RegExp",type:"RegExp",source:z.source,flags:z.flags},X)}function QJ(Z){return z0(Z)?Z.allOf:v(Z)?Z.anyOf:f0(Z)?Z.items??[]:[]}function s2(Z){return QJ(Z)}function a2(Z,X){return t0(Z)?R(Z.returns,X):y(X)}class r2{constructor(Z){this.schema=Z}Decode(Z){return new t2(this.schema,Z)}}class t2{constructor(Z,X){this.schema=Z,this.decode=X}EncodeTransform(Z,X){let V={Encode:(q)=>X[V0].Encode(Z(q)),Decode:(q)=>this.decode(X[V0].Decode(q))};return{...X,[V0]:V}}EncodeSchema(Z,X){let z={Decode:this.decode,Encode:Z};return{...X,[V0]:z}}Encode(Z){return L8(this.schema)?this.EncodeTransform(Z,this.schema):this.EncodeSchema(Z,this.schema)}}function e2(Z){return new r2(Z)}function Z4(Z={}){return R({[I]:Z[I]??"Unsafe"},Z)}function X4(Z){return R({[I]:"Void",type:"void"},Z)}var w5={};x6(w5,{Void:()=>X4,Uppercase:()=>w2,Unsafe:()=>Z4,Unknown:()=>j8,Union:()=>c,Undefined:()=>K6,Uncapitalize:()=>P2,Uint8Array:()=>j6,Tuple:()=>m0,Transform:()=>e2,TemplateLiteral:()=>M6,Symbol:()=>N6,String:()=>X8,ReturnType:()=>a2,Rest:()=>s2,Required:()=>VZ,RegExp:()=>o2,Ref:()=>H8,Recursive:()=>n2,Record:()=>I6,ReadonlyOptional:()=>E6,Readonly:()=>E0,Promise:()=>L6,Pick:()=>C8,Partial:()=>YZ,Parameters:()=>i2,Optional:()=>O0,Omit:()=>S8,Object:()=>o,Number:()=>y0,Null:()=>F6,Not:()=>l2,Never:()=>y,Module:()=>p2,Mapped:()=>nX,Lowercase:()=>T2,Literal:()=>d,KeyOf:()=>$Z,Iterator:()=>XZ,Intersect:()=>F0,Integer:()=>R2,Instantiate:()=>j2,InstanceType:()=>N2,Index:()=>K8,Function:()=>Q8,Extract:()=>JZ,Extends:()=>WZ,Exclude:()=>HZ,Enum:()=>z2,Date:()=>O6,ConstructorParameters:()=>X2,Constructor:()=>r8,Const:()=>Z2,Composite:()=>eX,Capitalize:()=>I2,Boolean:()=>A6,BigInt:()=>ZZ,Awaited:()=>zZ,AsyncIterator:()=>a8,Array:()=>s8,Argument:()=>PX,Any:()=>N8});var h=w5;var z4="http://127.0.0.1:3850",_Z="pi",E8="plugin",p0=5000,uZ=1e4,$4=5000,w6="signet-pi-hidden-recall",k6="signet-pi-session-context";function Q4(Z){return X5(Z,{logPrefix:"signet-pi",actorName:"pi-extension",runtimePath:E8,defaultTimeout:p0})}var WJ=new Set([w6,k6]),W4={harness:_Z,runtimePath:E8,writeTimeout:uZ,promptSubmitTimeout:$4,excludedCustomTypes:WJ,sessionStartTimeout:()=>p0,staticFallback:z5};function H4(Z,X){return{role:"custom",customType:Z,display:!1,content:\`<signet-memory source="auto-recall">
|
|
23002
|
-
\${
|
|
23003
|
-
</signet-memory>\`,timestamp:Date.now()}}class
|
|
23004
|
-
\`),"success");try{let G=await fetch(\`\${X}/api/memory/stats\`,{signal:AbortSignal.timeout(p0)});if(G.ok){let H=await G.json();
|
|
22999
|
+
\`)}\`}var JY=D$();function A8(Z){return typeof Z==="object"&&Z!==null}function KZ(Z){let X=Reflect.get(globalThis,"process");if(!A8(X))return;let z=Reflect.get(X,"env");if(!A8(z))return;let W=Reflect.get(z,Z);return typeof W==="string"?W:void 0}function p(Z){if(typeof Z!=="string")return;let X=Z.trim();return X.length>0?X:void 0}function n0(Z){return p(KZ(Z))}import{existsSync as L$,readFileSync as O$}from"node:fs";function E7(Z){return Z.replace(/\\s*\\r?\\n\\s*/g," ").trim()}function F$(Z){switch(Z){case"assistant":return"Assistant";case"system":return"System";case"custom":return"Custom";case"tool":case"toolResult":case"bashExecution":case"pythonExecution":return"Tool";default:return"User"}}function N$(Z){if(typeof Z==="string"){let z=E7(Z);return z.length>0?z:void 0}if(!Array.isArray(Z))return;let X=[];for(let z of Z){if(!A8(z))continue;let W=p(z.text)??p(z.input_text)??p(z.content);if(!W)continue;X.push(E7(W))}if(X.length===0)return;return X.join(" ")}function I7(Z,X){let z=N$(X);if(!z)return;return\`\${F$(Z)}: \${z}\`}function K$(Z,X){if(!A8(Z)||typeof Z.type!=="string")return;if(Z.type==="custom_message"){if(typeof Z.customType==="string"&&X.has(Z.customType))return;return I7("custom",Z.content)}if(Z.type!=="message")return;if(!A8(Z.message))return;let z=p(Z.message.role),W=Reflect.get(Z.message,"content")??Reflect.get(Z.message,"parts");return I7(z,W)}function W6(Z,X=new Set){let z=[];for(let W of Z){let Y=K$(W,X);if(!Y)continue;z.push(Y)}if(z.length===0)return;return z.join(\`
|
|
23000
|
+
\`)}function j$(Z){try{return JSON.parse(Z)}catch{return}}function R$(Z){let X,z=[];for(let W of Z){let Y=j$(W);if(!A8(Y)||typeof Y.type!=="string")continue;if(Y.type==="session"){X=Y;continue}z.push(Y)}return{header:X,entries:z}}function S$(Z){return O$(Z,"utf-8").split(\`
|
|
23001
|
+
\`).map((X)=>X.trim()).filter((X)=>X.length>0)}function C$(Z){return p(Z?.cwd)??p(Z?.project)??p(Z?.workspace)}function H6(Z,X=new Set){if(!Z||!L$(Z))return{loaded:!1,sessionId:void 0,project:void 0,transcript:void 0};try{let{header:z,entries:W}=R$(S$(Z));return{loaded:!0,sessionId:p(z?.id),project:C$(z),transcript:W6(W,X)}}catch{return{loaded:!1,sessionId:void 0,project:void 0,transcript:void 0}}}function E$(){return n0("SIGNET_API_KEY")??n0("SIGNET_TOKEN")}function I$(Z){let X={"Content-Type":"application/json","x-signet-runtime-path":Z.runtimePath,"x-signet-actor":Z.actorName,"x-signet-actor-type":"harness"},z=E$();if(z)X.Authorization=\`Bearer \${z}\`;return X}function w7(Z){if(typeof Z!=="object"||Z===null)return"";let X=Reflect.get(Z,"name");return typeof X==="string"?X:""}function T7(Z){let X=w7(Z);if(X==="AbortError"||X==="TimeoutError")return!0;return(typeof Z==="object"&&Z!==null?Reflect.get(Z,"code"):void 0)==="ABORT_ERR"}async function P7(Z,X,z,W={}){let{method:Y="POST",body:q,timeout:B=z.defaultTimeout}=W;try{let U={method:Y,headers:I$(z),signal:AbortSignal.timeout(B)};if(q!==void 0)U.body=JSON.stringify(q);let G=await fetch(\`\${Z}\${X}\`,U);if(!G.ok)return console.warn(\`[\${z.logPrefix}] \${Y} \${X} failed: \${G.status}\`),{ok:!1,reason:"http",status:G.status};try{let H=await G.text();try{return{ok:!0,data:JSON.parse(H)}}catch{return console.warn(\`[\${z.logPrefix}] \${Y} \${X} returned invalid JSON (\${H.length} chars\${H.length===0?", empty body":""})\`),{ok:!1,reason:"invalid-json",status:G.status}}}catch(H){if(T7(H))return console.warn(\`[\${z.logPrefix}] \${Y} \${X} body read timed out after \${B}ms\`),{ok:!1,reason:"timeout"};return console.warn(\`[\${z.logPrefix}] \${Y} \${X} body read failed:\`,w7(H)||H),{ok:!1,reason:"body-read"}}}catch(U){if(T7(U))return console.warn(\`[\${z.logPrefix}] \${Y} \${X} timed out after \${B}ms\`),{ok:!1,reason:"timeout"};return console.warn(\`[\${z.logPrefix}] \${Y} \${X} error:\`,U),{ok:!1,reason:"offline"}}}function $5(Z,X){return{async post(z,W,Y=X.defaultTimeout){let q=await P7(Z,z,X,{method:"POST",body:W,timeout:Y});if(!q.ok)return null;return q.data},postResult(z,W,Y=X.defaultTimeout){return P7(Z,z,X,{method:"POST",body:W,timeout:Y})}}}import{homedir as T$}from"node:os";import{join as P$}from"node:path";function Q5(Z){let X=n0("SIGNET_PATH")??P$(T$(),".agents");return C7(X)??""}function w$(Z){let X=Z.sessionManager.getBranch();if(Array.isArray(X)&&X.length>0)return X;let z=Z.sessionManager.getEntries();return Array.isArray(z)?z:[]}function T0(Z){let X=Z.sessionManager.getHeader(),z=p(Z.sessionManager.getSessionId())??p(X?.id),W=p(Z.sessionManager.getSessionFile()),Y=p(Z.cwd)??p(X?.cwd)??p(X?.project)??p(X?.workspace);return{sessionId:z,sessionFile:W,project:Y}}async function jZ(Z,X){return await Z.client.post("/api/hooks/session-end",{harness:Z.config.harness,runtimePath:Z.config.runtimePath,reason:X.reason,sessionKey:X.sessionId,sessionId:X.sessionId,agentId:X.agentId,cwd:X.project,...X.transcript?{transcript:X.transcript}:{}},Z.config.writeTimeout)!==null}async function i8(Z){for(let X of Z.state.getPendingSessionEnds()){if(Z.state.sessionAlreadyEnded(X.sessionId)){Z.state.clearPendingSessionEnd(X.sessionId);continue}let z=H6(X.sessionFile,Z.config.excludedCustomTypes);if(!z.loaded){await jZ(Z,{sessionId:X.sessionId,agentId:X.agentId,transcript:void 0,reason:X.reason,project:void 0});continue}if(!await jZ(Z,{sessionId:z.sessionId??X.sessionId,agentId:X.agentId,transcript:z.transcript,reason:X.reason,project:z.project}))continue;Z.state.markSessionEnded(X.sessionId),Z.state.clearPendingSessionData(X.sessionId),Z.state.clearPendingSessionEnd(X.sessionId)}}async function M8(Z,X){await i8(Z);let z=T0(X);Z.state.setActiveSession(z.sessionId,z.sessionFile),Z.state.clearSessionEnded(z.sessionId);let W=await Z.client.postResult("/api/hooks/session-start",{harness:Z.config.harness,project:z.project,agentId:Z.agentId,sessionKey:z.sessionId,runtimePath:Z.config.runtimePath},Z.config.sessionStartTimeout()),Y=W.ok?W.data.inject??W.data.recentContext??"":Z.config.staticFallback(W.reason==="timeout"?"timeout":"offline");Z.state.setSessionContext(Y),Z.state.setPendingSessionContext(z.sessionId,Y)}async function n8(Z,X){await i8(Z);let z=T0(X);if(!z.sessionId)return;if(z.sessionId===Z.state.getActiveSessionId()&&z.sessionFile===Z.state.getActiveSessionFile())return;await M8(Z,X)}async function J6(Z,X,z){await i8(Z);let W=T0(X);if(Z.state.sessionAlreadyEnded(W.sessionId))return;if(!await jZ(Z,{sessionId:W.sessionId,agentId:Z.agentId,transcript:W6(w$(X),Z.config.excludedCustomTypes),reason:z,project:W.project}))return;Z.state.markSessionEnded(W.sessionId),Z.state.clearPendingSessionData(W.sessionId)}async function RZ(Z,X,z){let W=p(X.previousSessionFile)??Z.state.getActiveSessionFile(),Y=H6(W,Z.config.excludedCustomTypes),q=Y.sessionId??Z.state.getActiveSessionId();if(Z.state.sessionAlreadyEnded(q))return;if(!Y.loaded){if(q)await jZ(Z,{sessionId:q,agentId:Z.agentId,transcript:void 0,reason:z,project:void 0});if(q&&W)Z.state.queuePendingSessionEnd(q,W,Z.agentId,z);return}if(!await jZ(Z,{sessionId:q,agentId:Z.agentId,transcript:Y.transcript,reason:z,project:Y.project})){if(q&&W)Z.state.queuePendingSessionEnd(q,W,Z.agentId,z);return}Z.state.markSessionEnded(q),Z.state.clearPendingSessionData(q)}async function SZ(Z,X,z){await i8(Z);let W=p(z);if(!W)return;await n8(Z,X);let Y=T0(X);if(!Y.sessionId)return;let q=await Z.client.post("/api/hooks/user-prompt-submit",{harness:Z.config.harness,project:Y.project,agentId:Z.agentId,sessionKey:Y.sessionId,userMessage:W,runtimePath:Z.config.runtimePath},Z.config.promptSubmitTimeout);if(!q)return;if(q.sessionKnown===!1)await M8(Z,X);let B=p(q.inject);if(B)Z.state.queuePendingRecall(Y.sessionId,B)}var W5=64,k7=4,b7=128;function H5(Z){return Z.replace(/<\\/signet-memory>/gi,"<\\\\/signet-memory>")}function Y6(Z,X){if(Z.size<X)return;let z=Z.keys().next().value;if(z!==void 0)Z.delete(z)}class V6{pendingSessionContext=new Map;pendingRecall=new Map;pendingSessionEnds=new Map;endedSessions=new Map;activeSessionId;activeSessionFile;sessionContext="";setActiveSession(Z,X){this.activeSessionId=Z,this.activeSessionFile=X}getActiveSessionId(){return this.activeSessionId}getActiveSessionFile(){return this.activeSessionFile}setSessionContext(Z){this.sessionContext=Z}getSessionContext(){return this.sessionContext}markSessionEnded(Z){if(!Z)return;if(!this.endedSessions.has(Z))Y6(this.endedSessions,b7);this.endedSessions.set(Z,Date.now())}clearSessionEnded(Z){if(!Z)return;this.endedSessions.delete(Z)}sessionAlreadyEnded(Z){if(!Z)return!1;return this.endedSessions.has(Z)}setPendingSessionContext(Z,X){if(!Z)return;let z=p(X);if(z){this.pendingSessionContext.set(Z,z);return}this.pendingSessionContext.delete(Z)}clearPendingSessionContext(Z){if(!Z)return;this.pendingSessionContext.delete(Z)}queuePendingRecall(Z,X){if(!this.pendingRecall.has(Z))Y6(this.pendingRecall,W5);let z=this.pendingRecall.get(Z)??[];z.push(X);while(z.length>k7)z.shift();this.pendingRecall.set(Z,z)}clearPendingRecall(Z){if(!Z)return;this.pendingRecall.delete(Z)}clearPendingSessionData(Z){if(!Z)return;this.pendingSessionContext.delete(Z),this.pendingRecall.delete(Z),this.pendingSessionEnds.delete(Z)}hasPendingRecall(Z){if(!Z)return!1;let X=this.pendingRecall.get(Z);return Array.isArray(X)&&X.length>0}consumePendingRecall(Z){if(!Z)return;let X=this.pendingRecall.get(Z);if(!X||X.length===0)return;let z=X.shift();if(X.length===0)this.pendingRecall.delete(Z);return p(z)}queuePendingSessionEnd(Z,X,z,W){if(!this.pendingSessionEnds.has(Z))Y6(this.pendingSessionEnds,W5);this.pendingSessionEnds.set(Z,{sessionId:Z,sessionFile:X,agentId:z,reason:W})}clearPendingSessionEnd(Z){if(!Z)return;this.pendingSessionEnds.delete(Z)}getPendingSessionEnds(){return Array.from(this.pendingSessionEnds.values())}}var L0={};h6(L0,{IsUndefined:()=>J0,IsUint8Array:()=>V8,IsSymbol:()=>B5,IsString:()=>a,IsRegExp:()=>EZ,IsObject:()=>i,IsNumber:()=>P0,IsNull:()=>_5,IsIterator:()=>V5,IsFunction:()=>Y5,IsDate:()=>g8,IsBoolean:()=>Y8,IsBigInt:()=>CZ,IsAsyncIterator:()=>J5,IsArray:()=>H0,HasPropertyKey:()=>_6});function _6(Z,X){return X in Z}function J5(Z){return i(Z)&&!H0(Z)&&!V8(Z)&&Symbol.asyncIterator in Z}function H0(Z){return Array.isArray(Z)}function CZ(Z){return typeof Z==="bigint"}function Y8(Z){return typeof Z==="boolean"}function g8(Z){return Z instanceof globalThis.Date}function Y5(Z){return typeof Z==="function"}function V5(Z){return i(Z)&&!H0(Z)&&!V8(Z)&&Symbol.iterator in Z}function _5(Z){return Z===null}function P0(Z){return typeof Z==="number"}function i(Z){return typeof Z==="object"&&Z!==null}function EZ(Z){return Z instanceof globalThis.RegExp}function a(Z){return typeof Z==="string"}function B5(Z){return typeof Z==="symbol"}function V8(Z){return Z instanceof globalThis.Uint8Array}function J0(Z){return Z===void 0}function k$(Z){return Z.map((X)=>B6(X))}function b$(Z){return new Date(Z.getTime())}function f$(Z){return new Uint8Array(Z)}function x$(Z){return new RegExp(Z.source,Z.flags)}function g$(Z){let X={};for(let z of Object.getOwnPropertyNames(Z))X[z]=B6(Z[z]);for(let z of Object.getOwnPropertySymbols(Z))X[z]=B6(Z[z]);return X}function B6(Z){return H0(Z)?k$(Z):g8(Z)?b$(Z):V8(Z)?f$(Z):EZ(Z)?x$(Z):i(Z)?g$(Z):Z}function e(Z){return B6(Z)}function o8(Z,X){return X===void 0?e(Z):e({...X,...Z})}function f7(Z){return Z!==null&&typeof Z==="object"}function x7(Z){return globalThis.Array.isArray(Z)&&!globalThis.ArrayBuffer.isView(Z)}function g7(Z){return Z===void 0}function h7(Z){return typeof Z==="number"}var U6;(function(Z){Z.InstanceMode="default",Z.ExactOptionalPropertyTypes=!1,Z.AllowArrayObject=!1,Z.AllowNaN=!1,Z.AllowNullVoid=!1;function X(B,U){return Z.ExactOptionalPropertyTypes?U in B:B[U]!==void 0}Z.IsExactOptionalProperty=X;function z(B){let U=f7(B);return Z.AllowArrayObject?U:U&&!x7(B)}Z.IsObjectLike=z;function W(B){return z(B)&&!(B instanceof Date)&&!(B instanceof Uint8Array)}Z.IsRecordLike=W;function Y(B){return Z.AllowNaN?h7(B):Number.isFinite(B)}Z.IsNumberLike=Y;function q(B){let U=g7(B);return Z.AllowNullVoid?U||B===null:U}Z.IsVoidLike=q})(U6||(U6={}));function h$(Z){return globalThis.Object.freeze(Z).map((X)=>IZ(X))}function v$(Z){return Z}function y$(Z){return Z}function m$(Z){return Z}function u$(Z){let X={};for(let z of Object.getOwnPropertyNames(Z))X[z]=IZ(Z[z]);for(let z of Object.getOwnPropertySymbols(Z))X[z]=IZ(Z[z]);return globalThis.Object.freeze(X)}function IZ(Z){return H0(Z)?h$(Z):g8(Z)?v$(Z):V8(Z)?y$(Z):EZ(Z)?m$(Z):i(Z)?u$(Z):Z}function R(Z,X){let z=X!==void 0?{...X,...Z}:Z;switch(U6.InstanceMode){case"freeze":return IZ(z);case"clone":return e(z);default:return z}}class M0 extends Error{constructor(Z){super(Z)}}var V0=Symbol.for("TypeBox.Transform"),o0=Symbol.for("TypeBox.Readonly"),D0=Symbol.for("TypeBox.Optional"),v0=Symbol.for("TypeBox.Hint"),I=Symbol.for("TypeBox.Kind");function s8(Z){return i(Z)&&Z[o0]==="Readonly"}function S0(Z){return i(Z)&&Z[D0]==="Optional"}function U5(Z){return g(Z,"Any")}function G5(Z){return g(Z,"Argument")}function s0(Z){return g(Z,"Array")}function h8(Z){return g(Z,"AsyncIterator")}function v8(Z){return g(Z,"BigInt")}function _8(Z){return g(Z,"Boolean")}function a0(Z){return g(Z,"Computed")}function r0(Z){return g(Z,"Constructor")}function d$(Z){return g(Z,"Date")}function t0(Z){return g(Z,"Function")}function e0(Z){return g(Z,"Integer")}function z0(Z){return g(Z,"Intersect")}function y8(Z){return g(Z,"Iterator")}function g(Z,X){return i(Z)&&I in Z&&Z[I]===X}function G6(Z){return Y8(Z)||P0(Z)||a(Z)}function w0(Z){return g(Z,"Literal")}function k0(Z){return g(Z,"MappedKey")}function Z0(Z){return g(Z,"MappedResult")}function D8(Z){return g(Z,"Never")}function c$(Z){return g(Z,"Not")}function TZ(Z){return g(Z,"Null")}function Z8(Z){return g(Z,"Number")}function Y0(Z){return g(Z,"Object")}function m8(Z){return g(Z,"Promise")}function u8(Z){return g(Z,"Record")}function W0(Z){return g(Z,"Ref")}function q5(Z){return g(Z,"RegExp")}function B8(Z){return g(Z,"String")}function PZ(Z){return g(Z,"Symbol")}function b0(Z){return g(Z,"TemplateLiteral")}function p$(Z){return g(Z,"This")}function L8(Z){return i(Z)&&V0 in Z}function f0(Z){return g(Z,"Tuple")}function wZ(Z){return g(Z,"Undefined")}function v(Z){return g(Z,"Union")}function l$(Z){return g(Z,"Uint8Array")}function i$(Z){return g(Z,"Unknown")}function n$(Z){return g(Z,"Unsafe")}function o$(Z){return g(Z,"Void")}function s$(Z){return i(Z)&&I in Z&&a(Z[I])}function x0(Z){return U5(Z)||G5(Z)||s0(Z)||_8(Z)||v8(Z)||h8(Z)||a0(Z)||r0(Z)||d$(Z)||t0(Z)||e0(Z)||z0(Z)||y8(Z)||w0(Z)||k0(Z)||Z0(Z)||D8(Z)||c$(Z)||TZ(Z)||Z8(Z)||Y0(Z)||m8(Z)||u8(Z)||W0(Z)||q5(Z)||B8(Z)||PZ(Z)||b0(Z)||p$(Z)||f0(Z)||wZ(Z)||v(Z)||l$(Z)||i$(Z)||n$(Z)||o$(Z)||s$(Z)}var O={};h6(O,{TypeGuardUnknownTypeError:()=>v7,IsVoid:()=>SX,IsUnsafe:()=>RX,IsUnknown:()=>jX,IsUnionLiteral:()=>QQ,IsUnion:()=>D5,IsUndefined:()=>NX,IsUint8Array:()=>KX,IsTuple:()=>FX,IsTransform:()=>OX,IsThis:()=>LX,IsTemplateLiteral:()=>DX,IsSymbol:()=>MX,IsString:()=>AX,IsSchema:()=>A0,IsRegExp:()=>qX,IsRef:()=>GX,IsRecursive:()=>$Q,IsRecord:()=>UX,IsReadonly:()=>e$,IsProperties:()=>q6,IsPromise:()=>BX,IsOptional:()=>ZQ,IsObject:()=>_X,IsNumber:()=>VX,IsNull:()=>YX,IsNot:()=>JX,IsNever:()=>HX,IsMappedResult:()=>WX,IsMappedKey:()=>QX,IsLiteralValue:()=>$X,IsLiteralString:()=>XX,IsLiteralNumber:()=>zX,IsLiteralBoolean:()=>zQ,IsLiteral:()=>bZ,IsKindOf:()=>x,IsKind:()=>CX,IsIterator:()=>ZX,IsIntersect:()=>e7,IsInteger:()=>t7,IsImport:()=>XQ,IsFunction:()=>r7,IsDate:()=>a7,IsConstructor:()=>s7,IsComputed:()=>o7,IsBoolean:()=>n7,IsBigInt:()=>i7,IsAsyncIterator:()=>l7,IsArray:()=>p7,IsArgument:()=>c7,IsAny:()=>d7});class v7 extends M0{}var a$=["Argument","Any","Array","AsyncIterator","BigInt","Boolean","Computed","Constructor","Date","Enum","Function","Integer","Intersect","Iterator","Literal","MappedKey","MappedResult","Not","Null","Number","Object","Promise","Record","Ref","RegExp","String","Symbol","TemplateLiteral","This","Tuple","Undefined","Union","Uint8Array","Unknown","Void"];function y7(Z){try{return new RegExp(Z),!0}catch{return!1}}function A5(Z){if(!a(Z))return!1;for(let X=0;X<Z.length;X++){let z=Z.charCodeAt(X);if(z>=7&&z<=13||z===27||z===127)return!1}return!0}function m7(Z){return M5(Z)||A0(Z)}function kZ(Z){return J0(Z)||CZ(Z)}function r(Z){return J0(Z)||P0(Z)}function M5(Z){return J0(Z)||Y8(Z)}function n(Z){return J0(Z)||a(Z)}function r$(Z){return J0(Z)||a(Z)&&A5(Z)&&y7(Z)}function t$(Z){return J0(Z)||a(Z)&&A5(Z)}function u7(Z){return J0(Z)||A0(Z)}function e$(Z){return i(Z)&&Z[o0]==="Readonly"}function ZQ(Z){return i(Z)&&Z[D0]==="Optional"}function d7(Z){return x(Z,"Any")&&n(Z.$id)}function c7(Z){return x(Z,"Argument")&&P0(Z.index)}function p7(Z){return x(Z,"Array")&&Z.type==="array"&&n(Z.$id)&&A0(Z.items)&&r(Z.minItems)&&r(Z.maxItems)&&M5(Z.uniqueItems)&&u7(Z.contains)&&r(Z.minContains)&&r(Z.maxContains)}function l7(Z){return x(Z,"AsyncIterator")&&Z.type==="AsyncIterator"&&n(Z.$id)&&A0(Z.items)}function i7(Z){return x(Z,"BigInt")&&Z.type==="bigint"&&n(Z.$id)&&kZ(Z.exclusiveMaximum)&&kZ(Z.exclusiveMinimum)&&kZ(Z.maximum)&&kZ(Z.minimum)&&kZ(Z.multipleOf)}function n7(Z){return x(Z,"Boolean")&&Z.type==="boolean"&&n(Z.$id)}function o7(Z){return x(Z,"Computed")&&a(Z.target)&&H0(Z.parameters)&&Z.parameters.every((X)=>A0(X))}function s7(Z){return x(Z,"Constructor")&&Z.type==="Constructor"&&n(Z.$id)&&H0(Z.parameters)&&Z.parameters.every((X)=>A0(X))&&A0(Z.returns)}function a7(Z){return x(Z,"Date")&&Z.type==="Date"&&n(Z.$id)&&r(Z.exclusiveMaximumTimestamp)&&r(Z.exclusiveMinimumTimestamp)&&r(Z.maximumTimestamp)&&r(Z.minimumTimestamp)&&r(Z.multipleOfTimestamp)}function r7(Z){return x(Z,"Function")&&Z.type==="Function"&&n(Z.$id)&&H0(Z.parameters)&&Z.parameters.every((X)=>A0(X))&&A0(Z.returns)}function XQ(Z){return x(Z,"Import")&&_6(Z,"$defs")&&i(Z.$defs)&&q6(Z.$defs)&&_6(Z,"$ref")&&a(Z.$ref)&&Z.$ref in Z.$defs}function t7(Z){return x(Z,"Integer")&&Z.type==="integer"&&n(Z.$id)&&r(Z.exclusiveMaximum)&&r(Z.exclusiveMinimum)&&r(Z.maximum)&&r(Z.minimum)&&r(Z.multipleOf)}function q6(Z){return i(Z)&&Object.entries(Z).every(([X,z])=>A5(X)&&A0(z))}function e7(Z){return x(Z,"Intersect")&&(a(Z.type)&&Z.type!=="object"?!1:!0)&&H0(Z.allOf)&&Z.allOf.every((X)=>A0(X)&&!OX(X))&&n(Z.type)&&(M5(Z.unevaluatedProperties)||u7(Z.unevaluatedProperties))&&n(Z.$id)}function ZX(Z){return x(Z,"Iterator")&&Z.type==="Iterator"&&n(Z.$id)&&A0(Z.items)}function x(Z,X){return i(Z)&&I in Z&&Z[I]===X}function XX(Z){return bZ(Z)&&a(Z.const)}function zX(Z){return bZ(Z)&&P0(Z.const)}function zQ(Z){return bZ(Z)&&Y8(Z.const)}function bZ(Z){return x(Z,"Literal")&&n(Z.$id)&&$X(Z.const)}function $X(Z){return Y8(Z)||P0(Z)||a(Z)}function QX(Z){return x(Z,"MappedKey")&&H0(Z.keys)&&Z.keys.every((X)=>P0(X)||a(X))}function WX(Z){return x(Z,"MappedResult")&&q6(Z.properties)}function HX(Z){return x(Z,"Never")&&i(Z.not)&&Object.getOwnPropertyNames(Z.not).length===0}function JX(Z){return x(Z,"Not")&&A0(Z.not)}function YX(Z){return x(Z,"Null")&&Z.type==="null"&&n(Z.$id)}function VX(Z){return x(Z,"Number")&&Z.type==="number"&&n(Z.$id)&&r(Z.exclusiveMaximum)&&r(Z.exclusiveMinimum)&&r(Z.maximum)&&r(Z.minimum)&&r(Z.multipleOf)}function _X(Z){return x(Z,"Object")&&Z.type==="object"&&n(Z.$id)&&q6(Z.properties)&&m7(Z.additionalProperties)&&r(Z.minProperties)&&r(Z.maxProperties)}function BX(Z){return x(Z,"Promise")&&Z.type==="Promise"&&n(Z.$id)&&A0(Z.item)}function UX(Z){return x(Z,"Record")&&Z.type==="object"&&n(Z.$id)&&m7(Z.additionalProperties)&&i(Z.patternProperties)&&((X)=>{let z=Object.getOwnPropertyNames(X.patternProperties);return z.length===1&&y7(z[0])&&i(X.patternProperties)&&A0(X.patternProperties[z[0]])})(Z)}function $Q(Z){return i(Z)&&v0 in Z&&Z[v0]==="Recursive"}function GX(Z){return x(Z,"Ref")&&n(Z.$id)&&a(Z.$ref)}function qX(Z){return x(Z,"RegExp")&&n(Z.$id)&&a(Z.source)&&a(Z.flags)&&r(Z.maxLength)&&r(Z.minLength)}function AX(Z){return x(Z,"String")&&Z.type==="string"&&n(Z.$id)&&r(Z.minLength)&&r(Z.maxLength)&&r$(Z.pattern)&&t$(Z.format)}function MX(Z){return x(Z,"Symbol")&&Z.type==="symbol"&&n(Z.$id)}function DX(Z){return x(Z,"TemplateLiteral")&&Z.type==="string"&&a(Z.pattern)&&Z.pattern[0]==="^"&&Z.pattern[Z.pattern.length-1]==="$"}function LX(Z){return x(Z,"This")&&n(Z.$id)&&a(Z.$ref)}function OX(Z){return i(Z)&&V0 in Z}function FX(Z){return x(Z,"Tuple")&&Z.type==="array"&&n(Z.$id)&&P0(Z.minItems)&&P0(Z.maxItems)&&Z.minItems===Z.maxItems&&(J0(Z.items)&&J0(Z.additionalItems)&&Z.minItems===0||H0(Z.items)&&Z.items.every((X)=>A0(X)))}function NX(Z){return x(Z,"Undefined")&&Z.type==="undefined"&&n(Z.$id)}function QQ(Z){return D5(Z)&&Z.anyOf.every((X)=>XX(X)||zX(X))}function D5(Z){return x(Z,"Union")&&n(Z.$id)&&i(Z)&&H0(Z.anyOf)&&Z.anyOf.every((X)=>A0(X))}function KX(Z){return x(Z,"Uint8Array")&&Z.type==="Uint8Array"&&n(Z.$id)&&r(Z.minByteLength)&&r(Z.maxByteLength)}function jX(Z){return x(Z,"Unknown")&&n(Z.$id)}function RX(Z){return x(Z,"Unsafe")}function SX(Z){return x(Z,"Void")&&Z.type==="void"&&n(Z.$id)}function CX(Z){return i(Z)&&I in Z&&a(Z[I])&&!a$.includes(Z[I])}function A0(Z){return i(Z)&&(d7(Z)||c7(Z)||p7(Z)||n7(Z)||i7(Z)||l7(Z)||o7(Z)||s7(Z)||a7(Z)||r7(Z)||t7(Z)||e7(Z)||ZX(Z)||bZ(Z)||QX(Z)||WX(Z)||HX(Z)||JX(Z)||YX(Z)||VX(Z)||_X(Z)||BX(Z)||UX(Z)||GX(Z)||qX(Z)||AX(Z)||MX(Z)||DX(Z)||LX(Z)||FX(Z)||NX(Z)||D5(Z)||KX(Z)||jX(Z)||RX(Z)||SX(Z)||CX(Z))}var EX="(true|false)",A6="(0|[1-9][0-9]*)",IX="(.*)";var O8="^(0|[1-9][0-9]*)$",F8="^(.*)$",TX="^(?!.*)$";function PX(Z,X){return Z.includes(X)}function wX(Z){return[...new Set(Z)]}function WQ(Z,X){return Z.filter((z)=>X.includes(z))}function HQ(Z,X){return Z.reduce((z,W)=>{return WQ(z,W)},X)}function kX(Z){return Z.length===1?Z[0]:Z.length>1?HQ(Z.slice(1),Z[0]):[]}function bX(Z){let X=[];for(let z of Z)X.push(...z);return X}function N8(Z){return R({[I]:"Any"},Z)}function a8(Z,X){return R({[I]:"Array",type:"array",items:Z},X)}function fX(Z){return R({[I]:"Argument",index:Z})}function r8(Z,X){return R({[I]:"AsyncIterator",type:"AsyncIterator",items:Z},X)}function t(Z,X,z){return R({[I]:"Computed",target:Z,parameters:X},z)}function JQ(Z,X){let{[X]:z,...W}=Z;return W}function $0(Z,X){return X.reduce((z,W)=>JQ(z,W),Z)}function y(Z){return R({[I]:"Never",not:{}},Z)}function m(Z){return R({[I]:"MappedResult",properties:Z})}function t8(Z,X,z){return R({[I]:"Constructor",type:"Constructor",parameters:Z,returns:X},z)}function Q8(Z,X,z){return R({[I]:"Function",type:"Function",parameters:Z,returns:X},z)}function fZ(Z,X){return R({[I]:"Union",anyOf:Z},X)}function YQ(Z){return Z.some((X)=>S0(X))}function xX(Z){return Z.map((X)=>S0(X)?VQ(X):X)}function VQ(Z){return $0(Z,[D0])}function _Q(Z,X){return YQ(Z)?O0(fZ(xX(Z),X)):fZ(xX(Z),X)}function W8(Z,X){return Z.length===1?R(Z[0],X):Z.length===0?y(X):_Q(Z,X)}function c(Z,X){return Z.length===0?y(X):Z.length===1?R(Z[0],X):fZ(Z,X)}class L5 extends M0{}function BQ(Z){return Z.replace(/\\\\\\$/g,"$").replace(/\\\\\\*/g,"*").replace(/\\\\\\^/g,"^").replace(/\\\\\\|/g,"|").replace(/\\\\\\(/g,"(").replace(/\\\\\\)/g,")")}function O5(Z,X,z){return Z[X]===z&&Z.charCodeAt(X-1)!==92}function G8(Z,X){return O5(Z,X,"(")}function xZ(Z,X){return O5(Z,X,")")}function gX(Z,X){return O5(Z,X,"|")}function UQ(Z){if(!(G8(Z,0)&&xZ(Z,Z.length-1)))return!1;let X=0;for(let z=0;z<Z.length;z++){if(G8(Z,z))X+=1;if(xZ(Z,z))X-=1;if(X===0&&z!==Z.length-1)return!1}return!0}function GQ(Z){return Z.slice(1,Z.length-1)}function qQ(Z){let X=0;for(let z=0;z<Z.length;z++){if(G8(Z,z))X+=1;if(xZ(Z,z))X-=1;if(gX(Z,z)&&X===0)return!0}return!1}function AQ(Z){for(let X=0;X<Z.length;X++)if(G8(Z,X))return!0;return!1}function MQ(Z){let[X,z]=[0,0],W=[];for(let q=0;q<Z.length;q++){if(G8(Z,q))X+=1;if(xZ(Z,q))X-=1;if(gX(Z,q)&&X===0){let B=Z.slice(z,q);if(B.length>0)W.push(e8(B));z=q+1}}let Y=Z.slice(z);if(Y.length>0)W.push(e8(Y));if(W.length===0)return{type:"const",const:""};if(W.length===1)return W[0];return{type:"or",expr:W}}function DQ(Z){function X(Y,q){if(!G8(Y,q))throw new L5("TemplateLiteralParser: Index must point to open parens");let B=0;for(let U=q;U<Y.length;U++){if(G8(Y,U))B+=1;if(xZ(Y,U))B-=1;if(B===0)return[q,U]}throw new L5("TemplateLiteralParser: Unclosed group parens in expression")}function z(Y,q){for(let B=q;B<Y.length;B++)if(G8(Y,B))return[q,B];return[q,Y.length]}let W=[];for(let Y=0;Y<Z.length;Y++)if(G8(Z,Y)){let[q,B]=X(Z,Y),U=Z.slice(q,B+1);W.push(e8(U)),Y=B}else{let[q,B]=z(Z,Y),U=Z.slice(q,B);if(U.length>0)W.push(e8(U));Y=B-1}return W.length===0?{type:"const",const:""}:W.length===1?W[0]:{type:"and",expr:W}}function e8(Z){return UQ(Z)?e8(GQ(Z)):qQ(Z)?MQ(Z):AQ(Z)?DQ(Z):{type:"const",const:BQ(Z)}}function ZZ(Z){return e8(Z.slice(1,Z.length-1))}class hX extends M0{}function LQ(Z){return Z.type==="or"&&Z.expr.length===2&&Z.expr[0].type==="const"&&Z.expr[0].const==="0"&&Z.expr[1].type==="const"&&Z.expr[1].const==="[1-9][0-9]*"}function OQ(Z){return Z.type==="or"&&Z.expr.length===2&&Z.expr[0].type==="const"&&Z.expr[0].const==="true"&&Z.expr[1].type==="const"&&Z.expr[1].const==="false"}function FQ(Z){return Z.type==="const"&&Z.const===".*"}function d8(Z){return LQ(Z)||FQ(Z)?!1:OQ(Z)?!0:Z.type==="and"?Z.expr.every((X)=>d8(X)):Z.type==="or"?Z.expr.every((X)=>d8(X)):Z.type==="const"?!0:(()=>{throw new hX("Unknown expression type")})()}function vX(Z){let X=ZZ(Z.pattern);return d8(X)}class yX extends M0{}function*mX(Z){if(Z.length===1)return yield*Z[0];for(let X of Z[0])for(let z of mX(Z.slice(1)))yield\`\${X}\${z}\`}function*NQ(Z){return yield*mX(Z.expr.map((X)=>[...gZ(X)]))}function*KQ(Z){for(let X of Z.expr)yield*gZ(X)}function*jQ(Z){return yield Z.const}function*gZ(Z){return Z.type==="and"?yield*NQ(Z):Z.type==="or"?yield*KQ(Z):Z.type==="const"?yield*jQ(Z):(()=>{throw new yX("Unknown expression")})()}function M6(Z){let X=ZZ(Z.pattern);return d8(X)?[...gZ(X)]:[]}function d(Z,X){return R({[I]:"Literal",const:Z,type:typeof Z},X)}function D6(Z){return R({[I]:"Boolean",type:"boolean"},Z)}function XZ(Z){return R({[I]:"BigInt",type:"bigint"},Z)}function y0(Z){return R({[I]:"Number",type:"number"},Z)}function X8(Z){return R({[I]:"String",type:"string"},Z)}function*RQ(Z){let X=Z.trim().replace(/"|'/g,"");return X==="boolean"?yield D6():X==="number"?yield y0():X==="bigint"?yield XZ():X==="string"?yield X8():yield(()=>{let z=X.split("|").map((W)=>d(W.trim()));return z.length===0?y():z.length===1?z[0]:W8(z)})()}function*SQ(Z){if(Z[1]!=="{"){let X=d("$"),z=F5(Z.slice(1));return yield*[X,...z]}for(let X=2;X<Z.length;X++)if(Z[X]==="}"){let z=RQ(Z.slice(2,X)),W=F5(Z.slice(X+1));return yield*[...z,...W]}yield d(Z)}function*F5(Z){for(let X=0;X<Z.length;X++)if(Z[X]==="$"){let z=d(Z.slice(0,X)),W=SQ(Z.slice(X));return yield*[z,...W]}yield d(Z)}function uX(Z){return[...F5(Z)]}class dX extends M0{}function CQ(Z){return Z.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")}function cX(Z,X){return b0(Z)?Z.pattern.slice(1,Z.pattern.length-1):v(Z)?\`(\${Z.anyOf.map((z)=>cX(z,X)).join("|")})\`:Z8(Z)?\`\${X}\${A6}\`:e0(Z)?\`\${X}\${A6}\`:v8(Z)?\`\${X}\${A6}\`:B8(Z)?\`\${X}\${IX}\`:w0(Z)?\`\${X}\${CQ(Z.const.toString())}\`:_8(Z)?\`\${X}\${EX}\`:(()=>{throw new dX(\`Unexpected Kind '\${Z[I]}'\`)})()}function N5(Z){return\`^\${Z.map((X)=>cX(X,"")).join("")}$\`}function c8(Z){let z=M6(Z).map((W)=>d(W));return W8(z)}function L6(Z,X){let z=a(Z)?N5(uX(Z)):N5(Z);return R({[I]:"TemplateLiteral",type:"string",pattern:z},X)}function EQ(Z){return M6(Z).map((z)=>z.toString())}function IQ(Z){let X=[];for(let z of Z)X.push(...C0(z));return X}function TQ(Z){return[Z.toString()]}function C0(Z){return[...new Set(b0(Z)?EQ(Z):v(Z)?IQ(Z.anyOf):w0(Z)?TQ(Z.const):Z8(Z)?["[number]"]:e0(Z)?["[number]"]:[])]}function PQ(Z,X,z){let W={};for(let Y of Object.getOwnPropertyNames(X))W[Y]=K8(Z,C0(X[Y]),z);return W}function wQ(Z,X,z){return PQ(Z,X.properties,z)}function pX(Z,X,z){let W=wQ(Z,X,z);return m(W)}function iX(Z,X){return Z.map((z)=>nX(z,X))}function kQ(Z){return Z.filter((X)=>!D8(X))}function bQ(Z,X){return O6(kQ(iX(Z,X)))}function fQ(Z){return Z.some((X)=>D8(X))?[]:Z}function xQ(Z,X){return W8(fQ(iX(Z,X)))}function gQ(Z,X){return X in Z?Z[X]:X==="[number]"?W8(Z):y()}function hQ(Z,X){return X==="[number]"?Z:y()}function vQ(Z,X){return X in Z?Z[X]:y()}function nX(Z,X){return z0(Z)?bQ(Z.allOf,X):v(Z)?xQ(Z.anyOf,X):f0(Z)?gQ(Z.items??[],X):s0(Z)?hQ(Z.items,X):Y0(Z)?vQ(Z.properties,X):y()}function K5(Z,X){return X.map((z)=>nX(Z,z))}function lX(Z,X){return W8(K5(Z,X))}function K8(Z,X,z){if(W0(Z)||W0(X)){if(!x0(Z)||!x0(X))throw new M0("Index types using Ref parameters require both Type and Key to be of TSchema");return t("Index",[Z,X])}if(Z0(X))return pX(Z,X,z);if(k0(X))return oX(Z,X,z);return R(x0(X)?lX(Z,C0(X)):lX(Z,X),z)}function yQ(Z,X,z){return{[X]:K8(Z,[X],e(z))}}function mQ(Z,X,z){return X.reduce((W,Y)=>{return{...W,...yQ(Z,Y,z)}},{})}function uQ(Z,X,z){return mQ(Z,X.keys,z)}function oX(Z,X,z){let W=uQ(Z,X,z);return m(W)}function zZ(Z,X){return R({[I]:"Iterator",type:"Iterator",items:Z},X)}function dQ(Z){return globalThis.Object.keys(Z).filter((X)=>!S0(Z[X]))}function cQ(Z,X){let z=dQ(Z),W=z.length>0?{[I]:"Object",type:"object",required:z,properties:Z}:{[I]:"Object",type:"object",properties:Z};return R(W,X)}var o=cQ;function F6(Z,X){return R({[I]:"Promise",type:"Promise",item:Z},X)}function pQ(Z){return R($0(Z,[o0]))}function lQ(Z){return R({...Z,[o0]:"Readonly"})}function iQ(Z,X){return X===!1?pQ(Z):lQ(Z)}function E0(Z,X){let z=X??!0;return Z0(Z)?sX(Z,z):iQ(Z,z)}function nQ(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=E0(Z[W],X);return z}function oQ(Z,X){return nQ(Z.properties,X)}function sX(Z,X){let z=oQ(Z,X);return m(z)}function m0(Z,X){return R(Z.length>0?{[I]:"Tuple",type:"array",items:Z,additionalItems:!1,minItems:Z.length,maxItems:Z.length}:{[I]:"Tuple",type:"array",minItems:Z.length,maxItems:Z.length},X)}function aX(Z,X){return Z in X?u0(Z,X[Z]):m(X)}function sQ(Z){return{[Z]:d(Z)}}function aQ(Z){let X={};for(let z of Z)X[z]=d(z);return X}function rQ(Z,X){return PX(X,Z)?sQ(Z):aQ(X)}function tQ(Z,X){let z=rQ(Z,X);return aX(Z,z)}function hZ(Z,X){return X.map((z)=>u0(Z,z))}function eQ(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(X))z[W]=u0(Z,X[W]);return z}function u0(Z,X){let z={...X};return S0(X)?O0(u0(Z,$0(X,[D0]))):s8(X)?E0(u0(Z,$0(X,[o0]))):Z0(X)?aX(Z,X.properties):k0(X)?tQ(Z,X.keys):r0(X)?t8(hZ(Z,X.parameters),u0(Z,X.returns),z):t0(X)?Q8(hZ(Z,X.parameters),u0(Z,X.returns),z):h8(X)?r8(u0(Z,X.items),z):y8(X)?zZ(u0(Z,X.items),z):z0(X)?F0(hZ(Z,X.allOf),z):v(X)?c(hZ(Z,X.anyOf),z):f0(X)?m0(hZ(Z,X.items??[]),z):Y0(X)?o(eQ(Z,X.properties),z):s0(X)?a8(u0(Z,X.items),z):m8(X)?F6(u0(Z,X.item),z):X}function Z1(Z,X){let z={};for(let W of Z)z[W]=u0(W,X);return z}function rX(Z,X,z){let W=x0(Z)?C0(Z):Z,Y=X({[I]:"MappedKey",keys:W}),q=Z1(W,Y);return o(q,z)}function X1(Z){return R($0(Z,[D0]))}function z1(Z){return R({...Z,[D0]:"Optional"})}function $1(Z,X){return X===!1?X1(Z):z1(Z)}function O0(Z,X){let z=X??!0;return Z0(Z)?tX(Z,z):$1(Z,z)}function Q1(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=O0(Z[W],X);return z}function W1(Z,X){return Q1(Z.properties,X)}function tX(Z,X){let z=W1(Z,X);return m(z)}function vZ(Z,X={}){let z=Z.every((Y)=>Y0(Y)),W=x0(X.unevaluatedProperties)?{unevaluatedProperties:X.unevaluatedProperties}:{};return R(X.unevaluatedProperties===!1||x0(X.unevaluatedProperties)||z?{...W,[I]:"Intersect",type:"object",allOf:Z}:{...W,[I]:"Intersect",allOf:Z},X)}function H1(Z){return Z.every((X)=>S0(X))}function J1(Z){return $0(Z,[D0])}function eX(Z){return Z.map((X)=>S0(X)?J1(X):X)}function Y1(Z,X){return H1(Z)?O0(vZ(eX(Z),X)):vZ(eX(Z),X)}function O6(Z,X={}){if(Z.length===1)return R(Z[0],X);if(Z.length===0)return y(X);if(Z.some((z)=>L8(z)))throw Error("Cannot intersect transform types");return Y1(Z,X)}function F0(Z,X){if(Z.length===1)return R(Z[0],X);if(Z.length===0)return y(X);if(Z.some((z)=>L8(z)))throw Error("Cannot intersect transform types");return vZ(Z,X)}function H8(...Z){let[X,z]=typeof Z[0]==="string"?[Z[0],Z[1]]:[Z[0].$id,Z[1]];if(typeof X!=="string")throw new M0("Ref: $ref must be a string");return R({[I]:"Ref",$ref:X},z)}function V1(Z,X){return t("Awaited",[t(Z,X)])}function _1(Z){return t("Awaited",[H8(Z)])}function B1(Z){return F0(Z2(Z))}function U1(Z){return c(Z2(Z))}function G1(Z){return $Z(Z)}function Z2(Z){return Z.map((X)=>$Z(X))}function $Z(Z,X){return R(a0(Z)?V1(Z.target,Z.parameters):z0(Z)?B1(Z.allOf):v(Z)?U1(Z.anyOf):m8(Z)?G1(Z.item):W0(Z)?_1(Z.$ref):Z,X)}function X2(Z){let X=[];for(let z of Z)X.push(yZ(z));return X}function q1(Z){let X=X2(Z);return bX(X)}function A1(Z){let X=X2(Z);return kX(X)}function M1(Z){return Z.map((X,z)=>z.toString())}function D1(Z){return["[number]"]}function L1(Z){return globalThis.Object.getOwnPropertyNames(Z)}function O1(Z){if(!F1)return[];return globalThis.Object.getOwnPropertyNames(Z).map((z)=>{return z[0]==="^"&&z[z.length-1]==="$"?z.slice(1,z.length-1):z})}function yZ(Z){return z0(Z)?q1(Z.allOf):v(Z)?A1(Z.anyOf):f0(Z)?M1(Z.items??[]):s0(Z)?D1(Z.items):Y0(Z)?L1(Z.properties):u8(Z)?O1(Z.patternProperties):[]}var F1=!1;function N1(Z,X){return t("KeyOf",[t(Z,X)])}function K1(Z){return t("KeyOf",[H8(Z)])}function j1(Z,X){let z=yZ(Z),W=R1(z),Y=W8(W);return R(Y,X)}function R1(Z){return Z.map((X)=>X==="[number]"?y0():d(X))}function QZ(Z,X){return a0(Z)?N1(Z.target,Z.parameters):W0(Z)?K1(Z.$ref):Z0(Z)?z2(Z,X):j1(Z,X)}function S1(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=QZ(Z[W],e(X));return z}function C1(Z,X){return S1(Z.properties,X)}function z2(Z,X){let z=C1(Z,X);return m(z)}function E1(Z){let X=[];for(let z of Z)X.push(...yZ(z));return wX(X)}function I1(Z){return Z.filter((X)=>!D8(X))}function T1(Z,X){let z=[];for(let W of Z)z.push(...K5(W,[X]));return I1(z)}function P1(Z,X){let z={};for(let W of X)z[W]=O6(T1(Z,W));return z}function $2(Z,X){let z=E1(Z),W=P1(Z,z);return o(W,X)}function N6(Z){return R({[I]:"Date",type:"Date"},Z)}function K6(Z){return R({[I]:"Null",type:"null"},Z)}function j6(Z){return R({[I]:"Symbol",type:"symbol"},Z)}function R6(Z){return R({[I]:"Undefined",type:"undefined"},Z)}function S6(Z){return R({[I]:"Uint8Array",type:"Uint8Array"},Z)}function j8(Z){return R({[I]:"Unknown"},Z)}function w1(Z){return Z.map((X)=>j5(X,!1))}function k1(Z){let X={};for(let z of globalThis.Object.getOwnPropertyNames(Z))X[z]=E0(j5(Z[z],!1));return X}function C6(Z,X){return X===!0?Z:E0(Z)}function j5(Z,X){return J5(Z)?C6(N8(),X):V5(Z)?C6(N8(),X):H0(Z)?E0(m0(w1(Z))):V8(Z)?S6():g8(Z)?N6():i(Z)?C6(o(k1(Z)),X):Y5(Z)?C6(Q8([],j8()),X):J0(Z)?R6():_5(Z)?K6():B5(Z)?j6():CZ(Z)?XZ():P0(Z)?d(Z):Y8(Z)?d(Z):a(Z)?d(Z):o({})}function Q2(Z,X){return R(j5(Z,!0),X)}function W2(Z,X){return r0(Z)?m0(Z.parameters,X):y(X)}function H2(Z,X){if(J0(Z))throw Error("Enum undefined or empty");let z=globalThis.Object.getOwnPropertyNames(Z).filter((q)=>isNaN(q)).map((q)=>Z[q]),Y=[...new Set(z)].map((q)=>d(q));return c(Y,{...X,[v0]:"Enum"})}class B2 extends M0{}var S;(function(Z){Z[Z.Union=0]="Union",Z[Z.True=1]="True",Z[Z.False=2]="False"})(S||(S={}));function d0(Z){return Z===S.False?Z:S.True}function WZ(Z){throw new B2(Z)}function _0(Z){return O.IsNever(Z)||O.IsIntersect(Z)||O.IsUnion(Z)||O.IsUnknown(Z)||O.IsAny(Z)}function B0(Z,X){return O.IsNever(X)?q2(Z,X):O.IsIntersect(X)?E6(Z,X):O.IsUnion(X)?I5(Z,X):O.IsUnknown(X)?L2(Z,X):O.IsAny(X)?E5(Z,X):WZ("StructuralRight")}function E5(Z,X){return S.True}function b1(Z,X){return O.IsIntersect(X)?E6(Z,X):O.IsUnion(X)&&X.anyOf.some((z)=>O.IsAny(z)||O.IsUnknown(z))?S.True:O.IsUnion(X)?S.Union:O.IsUnknown(X)?S.True:O.IsAny(X)?S.True:S.Union}function f1(Z,X){return O.IsUnknown(Z)?S.False:O.IsAny(Z)?S.Union:O.IsNever(Z)?S.True:S.False}function x1(Z,X){return O.IsObject(X)&&I6(X)?S.True:_0(X)?B0(Z,X):!O.IsArray(X)?S.False:d0(s(Z.items,X.items))}function g1(Z,X){return _0(X)?B0(Z,X):!O.IsAsyncIterator(X)?S.False:d0(s(Z.items,X.items))}function h1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsBigInt(X)?S.True:S.False}function U2(Z,X){return O.IsLiteralBoolean(Z)?S.True:O.IsBoolean(Z)?S.True:S.False}function v1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsBoolean(X)?S.True:S.False}function y1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):!O.IsConstructor(X)?S.False:Z.parameters.length>X.parameters.length?S.False:!Z.parameters.every((z,W)=>d0(s(X.parameters[W],z))===S.True)?S.False:d0(s(Z.returns,X.returns))}function m1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsDate(X)?S.True:S.False}function u1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):!O.IsFunction(X)?S.False:Z.parameters.length>X.parameters.length?S.False:!Z.parameters.every((z,W)=>d0(s(X.parameters[W],z))===S.True)?S.False:d0(s(Z.returns,X.returns))}function G2(Z,X){return O.IsLiteral(Z)&&L0.IsNumber(Z.const)?S.True:O.IsNumber(Z)||O.IsInteger(Z)?S.True:S.False}function d1(Z,X){return O.IsInteger(X)||O.IsNumber(X)?S.True:_0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):S.False}function E6(Z,X){return X.allOf.every((z)=>s(Z,z)===S.True)?S.True:S.False}function c1(Z,X){return Z.allOf.some((z)=>s(z,X)===S.True)?S.True:S.False}function p1(Z,X){return _0(X)?B0(Z,X):!O.IsIterator(X)?S.False:d0(s(Z.items,X.items))}function l1(Z,X){return O.IsLiteral(X)&&X.const===Z.const?S.True:_0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsString(X)?D2(Z,X):O.IsNumber(X)?A2(Z,X):O.IsInteger(X)?G2(Z,X):O.IsBoolean(X)?U2(Z,X):S.False}function q2(Z,X){return S.False}function i1(Z,X){return S.True}function J2(Z){let[X,z]=[Z,0];while(!0){if(!O.IsNot(X))break;X=X.not,z+=1}return z%2===0?X:j8()}function n1(Z,X){return O.IsNot(Z)?s(J2(Z),X):O.IsNot(X)?s(Z,J2(X)):WZ("Invalid fallthrough for Not")}function o1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsNull(X)?S.True:S.False}function A2(Z,X){return O.IsLiteralNumber(Z)?S.True:O.IsNumber(Z)||O.IsInteger(Z)?S.True:S.False}function s1(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsInteger(X)||O.IsNumber(X)?S.True:S.False}function I0(Z,X){return Object.getOwnPropertyNames(Z.properties).length===X}function Y2(Z){return I6(Z)}function V2(Z){return I0(Z,0)||I0(Z,1)&&"description"in Z.properties&&O.IsUnion(Z.properties.description)&&Z.properties.description.anyOf.length===2&&(O.IsString(Z.properties.description.anyOf[0])&&O.IsUndefined(Z.properties.description.anyOf[1])||O.IsString(Z.properties.description.anyOf[1])&&O.IsUndefined(Z.properties.description.anyOf[0]))}function R5(Z){return I0(Z,0)}function _2(Z){return I0(Z,0)}function a1(Z){return I0(Z,0)}function r1(Z){return I0(Z,0)}function t1(Z){return I6(Z)}function e1(Z){let X=y0();return I0(Z,0)||I0(Z,1)&&"length"in Z.properties&&d0(s(Z.properties.length,X))===S.True}function ZW(Z){return I0(Z,0)}function I6(Z){let X=y0();return I0(Z,0)||I0(Z,1)&&"length"in Z.properties&&d0(s(Z.properties.length,X))===S.True}function XW(Z){let X=Q8([N8()],N8());return I0(Z,0)||I0(Z,1)&&"then"in Z.properties&&d0(s(Z.properties.then,X))===S.True}function M2(Z,X){return s(Z,X)===S.False?S.False:O.IsOptional(Z)&&!O.IsOptional(X)?S.False:S.True}function N0(Z,X){return O.IsUnknown(Z)?S.False:O.IsAny(Z)?S.Union:O.IsNever(Z)||O.IsLiteralString(Z)&&Y2(X)||O.IsLiteralNumber(Z)&&R5(X)||O.IsLiteralBoolean(Z)&&_2(X)||O.IsSymbol(Z)&&V2(X)||O.IsBigInt(Z)&&a1(X)||O.IsString(Z)&&Y2(X)||O.IsSymbol(Z)&&V2(X)||O.IsNumber(Z)&&R5(X)||O.IsInteger(Z)&&R5(X)||O.IsBoolean(Z)&&_2(X)||O.IsUint8Array(Z)&&t1(X)||O.IsDate(Z)&&r1(X)||O.IsConstructor(Z)&&ZW(X)||O.IsFunction(Z)&&e1(X)?S.True:O.IsRecord(Z)&&O.IsString(S5(Z))?(()=>{return X[v0]==="Record"?S.True:S.False})():O.IsRecord(Z)&&O.IsNumber(S5(Z))?(()=>{return I0(X,0)?S.True:S.False})():S.False}function zW(Z,X){return _0(X)?B0(Z,X):O.IsRecord(X)?c0(Z,X):!O.IsObject(X)?S.False:(()=>{for(let z of Object.getOwnPropertyNames(X.properties)){if(!(z in Z.properties)&&!O.IsOptional(X.properties[z]))return S.False;if(O.IsOptional(X.properties[z]))return S.True;if(M2(Z.properties[z],X.properties[z])===S.False)return S.False}return S.True})()}function $W(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)&&XW(X)?S.True:!O.IsPromise(X)?S.False:d0(s(Z.item,X.item))}function S5(Z){return O8 in Z.patternProperties?y0():(F8 in Z.patternProperties)?X8():WZ("Unknown record key pattern")}function C5(Z){return O8 in Z.patternProperties?Z.patternProperties[O8]:(F8 in Z.patternProperties)?Z.patternProperties[F8]:WZ("Unable to get record value schema")}function c0(Z,X){let[z,W]=[S5(X),C5(X)];return O.IsLiteralString(Z)&&O.IsNumber(z)&&d0(s(Z,W))===S.True?S.True:O.IsUint8Array(Z)&&O.IsNumber(z)?s(Z,W):O.IsString(Z)&&O.IsNumber(z)?s(Z,W):O.IsArray(Z)&&O.IsNumber(z)?s(Z,W):O.IsObject(Z)?(()=>{for(let Y of Object.getOwnPropertyNames(Z.properties))if(M2(W,Z.properties[Y])===S.False)return S.False;return S.True})():S.False}function QW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):!O.IsRecord(X)?S.False:s(C5(Z),C5(X))}function WW(Z,X){let z=O.IsRegExp(Z)?X8():Z,W=O.IsRegExp(X)?X8():X;return s(z,W)}function D2(Z,X){return O.IsLiteral(Z)&&L0.IsString(Z.const)?S.True:O.IsString(Z)?S.True:S.False}function HW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsString(X)?S.True:S.False}function JW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsSymbol(X)?S.True:S.False}function YW(Z,X){return O.IsTemplateLiteral(Z)?s(c8(Z),X):O.IsTemplateLiteral(X)?s(Z,c8(X)):WZ("Invalid fallthrough for TemplateLiteral")}function VW(Z,X){return O.IsArray(X)&&Z.items!==void 0&&Z.items.every((z)=>s(z,X.items)===S.True)}function _W(Z,X){return O.IsNever(Z)?S.True:O.IsUnknown(Z)?S.False:O.IsAny(Z)?S.Union:S.False}function BW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)&&I6(X)?S.True:O.IsArray(X)&&VW(Z,X)?S.True:!O.IsTuple(X)?S.False:L0.IsUndefined(Z.items)&&!L0.IsUndefined(X.items)||!L0.IsUndefined(Z.items)&&L0.IsUndefined(X.items)?S.False:L0.IsUndefined(Z.items)&&!L0.IsUndefined(X.items)?S.True:Z.items.every((z,W)=>s(z,X.items[W])===S.True)?S.True:S.False}function UW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsUint8Array(X)?S.True:S.False}function GW(Z,X){return _0(X)?B0(Z,X):O.IsObject(X)?N0(Z,X):O.IsRecord(X)?c0(Z,X):O.IsVoid(X)?MW(Z,X):O.IsUndefined(X)?S.True:S.False}function I5(Z,X){return X.anyOf.some((z)=>s(Z,z)===S.True)?S.True:S.False}function qW(Z,X){return Z.anyOf.every((z)=>s(z,X)===S.True)?S.True:S.False}function L2(Z,X){return S.True}function AW(Z,X){return O.IsNever(X)?q2(Z,X):O.IsIntersect(X)?E6(Z,X):O.IsUnion(X)?I5(Z,X):O.IsAny(X)?E5(Z,X):O.IsString(X)?D2(Z,X):O.IsNumber(X)?A2(Z,X):O.IsInteger(X)?G2(Z,X):O.IsBoolean(X)?U2(Z,X):O.IsArray(X)?f1(Z,X):O.IsTuple(X)?_W(Z,X):O.IsObject(X)?N0(Z,X):O.IsUnknown(X)?S.True:S.False}function MW(Z,X){return O.IsUndefined(Z)?S.True:O.IsUndefined(Z)?S.True:S.False}function DW(Z,X){return O.IsIntersect(X)?E6(Z,X):O.IsUnion(X)?I5(Z,X):O.IsUnknown(X)?L2(Z,X):O.IsAny(X)?E5(Z,X):O.IsObject(X)?N0(Z,X):O.IsVoid(X)?S.True:S.False}function s(Z,X){return O.IsTemplateLiteral(Z)||O.IsTemplateLiteral(X)?YW(Z,X):O.IsRegExp(Z)||O.IsRegExp(X)?WW(Z,X):O.IsNot(Z)||O.IsNot(X)?n1(Z,X):O.IsAny(Z)?b1(Z,X):O.IsArray(Z)?x1(Z,X):O.IsBigInt(Z)?h1(Z,X):O.IsBoolean(Z)?v1(Z,X):O.IsAsyncIterator(Z)?g1(Z,X):O.IsConstructor(Z)?y1(Z,X):O.IsDate(Z)?m1(Z,X):O.IsFunction(Z)?u1(Z,X):O.IsInteger(Z)?d1(Z,X):O.IsIntersect(Z)?c1(Z,X):O.IsIterator(Z)?p1(Z,X):O.IsLiteral(Z)?l1(Z,X):O.IsNever(Z)?i1(Z,X):O.IsNull(Z)?o1(Z,X):O.IsNumber(Z)?s1(Z,X):O.IsObject(Z)?zW(Z,X):O.IsRecord(Z)?QW(Z,X):O.IsString(Z)?HW(Z,X):O.IsSymbol(Z)?JW(Z,X):O.IsTuple(Z)?BW(Z,X):O.IsPromise(Z)?$W(Z,X):O.IsUint8Array(Z)?UW(Z,X):O.IsUndefined(Z)?GW(Z,X):O.IsUnion(Z)?qW(Z,X):O.IsUnknown(Z)?AW(Z,X):O.IsVoid(Z)?DW(Z,X):WZ(\`Unknown left type operand '\${Z[I]}'\`)}function R8(Z,X){return s(Z,X)}function LW(Z,X,z,W,Y){let q={};for(let B of globalThis.Object.getOwnPropertyNames(Z))q[B]=HZ(Z[B],X,z,W,e(Y));return q}function OW(Z,X,z,W,Y){return LW(Z.properties,X,z,W,Y)}function O2(Z,X,z,W,Y){let q=OW(Z,X,z,W,Y);return m(q)}function FW(Z,X,z,W){let Y=R8(Z,X);return Y===S.Union?c([z,W]):Y===S.True?z:W}function HZ(Z,X,z,W,Y){return Z0(Z)?O2(Z,X,z,W,Y):k0(Z)?R(F2(Z,X,z,W,Y)):R(FW(Z,X,z,W),Y)}function NW(Z,X,z,W,Y){return{[Z]:HZ(d(Z),X,z,W,e(Y))}}function KW(Z,X,z,W,Y){return Z.reduce((q,B)=>{return{...q,...NW(B,X,z,W,Y)}},{})}function jW(Z,X,z,W,Y){return KW(Z.keys,X,z,W,Y)}function F2(Z,X,z,W,Y){let q=jW(Z,X,z,W,Y);return m(q)}function N2(Z,X){return JZ(c8(Z),X)}function RW(Z,X){let z=Z.filter((W)=>R8(W,X)===S.False);return z.length===1?z[0]:c(z)}function JZ(Z,X,z={}){if(b0(Z))return R(N2(Z,X),z);if(Z0(Z))return R(K2(Z,X),z);return R(v(Z)?RW(Z.anyOf,X):R8(Z,X)!==S.False?y():Z,z)}function SW(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=JZ(Z[W],X);return z}function CW(Z,X){return SW(Z.properties,X)}function K2(Z,X){let z=CW(Z,X);return m(z)}function j2(Z,X){return YZ(c8(Z),X)}function EW(Z,X){let z=Z.filter((W)=>R8(W,X)!==S.False);return z.length===1?z[0]:c(z)}function YZ(Z,X,z){if(b0(Z))return R(j2(Z,X),z);if(Z0(Z))return R(R2(Z,X),z);return R(v(Z)?EW(Z.anyOf,X):R8(Z,X)!==S.False?Z:y(),z)}function IW(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=YZ(Z[W],X);return z}function TW(Z,X){return IW(Z.properties,X)}function R2(Z,X){let z=TW(Z,X);return m(z)}function S2(Z,X){return r0(Z)?R(Z.returns,X):y(X)}function T6(Z){return E0(O0(Z))}function p8(Z,X,z){return R({[I]:"Record",type:"object",patternProperties:{[Z]:X}},z)}function T5(Z,X,z){let W={};for(let Y of Z)W[Y]=X;return o(W,{...z,[v0]:"Record"})}function PW(Z,X,z){return vX(Z)?T5(C0(Z),X,z):p8(Z.pattern,X,z)}function wW(Z,X,z){return T5(C0(c(Z)),X,z)}function kW(Z,X,z){return T5([Z.toString()],X,z)}function bW(Z,X,z){return p8(Z.source,X,z)}function fW(Z,X,z){let W=J0(Z.pattern)?F8:Z.pattern;return p8(W,X,z)}function xW(Z,X,z){return p8(F8,X,z)}function gW(Z,X,z){return p8(TX,X,z)}function hW(Z,X,z){return o({true:X,false:X},z)}function vW(Z,X,z){return p8(O8,X,z)}function yW(Z,X,z){return p8(O8,X,z)}function P6(Z,X,z={}){return v(Z)?wW(Z.anyOf,X,z):b0(Z)?PW(Z,X,z):w0(Z)?kW(Z.const,X,z):_8(Z)?hW(Z,X,z):e0(Z)?vW(Z,X,z):Z8(Z)?yW(Z,X,z):q5(Z)?bW(Z,X,z):B8(Z)?fW(Z,X,z):U5(Z)?xW(Z,X,z):D8(Z)?gW(Z,X,z):y(z)}function w6(Z){return globalThis.Object.getOwnPropertyNames(Z.patternProperties)[0]}function C2(Z){let X=w6(Z);return X===F8?X8():X===O8?y0():X8({pattern:X})}function k6(Z){return Z.patternProperties[w6(Z)]}function mW(Z,X){return X.parameters=mZ(Z,X.parameters),X.returns=z8(Z,X.returns),X}function uW(Z,X){return X.parameters=mZ(Z,X.parameters),X.returns=z8(Z,X.returns),X}function dW(Z,X){return X.allOf=mZ(Z,X.allOf),X}function cW(Z,X){return X.anyOf=mZ(Z,X.anyOf),X}function pW(Z,X){if(J0(X.items))return X;return X.items=mZ(Z,X.items),X}function lW(Z,X){return X.items=z8(Z,X.items),X}function iW(Z,X){return X.items=z8(Z,X.items),X}function nW(Z,X){return X.items=z8(Z,X.items),X}function oW(Z,X){return X.item=z8(Z,X.item),X}function sW(Z,X){let z=eW(Z,X.properties);return{...X,...o(z)}}function aW(Z,X){let z=z8(Z,C2(X)),W=z8(Z,k6(X)),Y=P6(z,W);return{...X,...Y}}function rW(Z,X){return X.index in Z?Z[X.index]:j8()}function tW(Z,X){let z=s8(X),W=S0(X),Y=z8(Z,X);return z&&W?T6(Y):z&&!W?E0(Y):!z&&W?O0(Y):Y}function eW(Z,X){return globalThis.Object.getOwnPropertyNames(X).reduce((z,W)=>{return{...z,[W]:tW(Z,X[W])}},{})}function mZ(Z,X){return X.map((z)=>z8(Z,z))}function z8(Z,X){return r0(X)?mW(Z,X):t0(X)?uW(Z,X):z0(X)?dW(Z,X):v(X)?cW(Z,X):f0(X)?pW(Z,X):s0(X)?lW(Z,X):h8(X)?iW(Z,X):y8(X)?nW(Z,X):m8(X)?oW(Z,X):Y0(X)?sW(Z,X):u8(X)?aW(Z,X):G5(X)?rW(Z,X):X}function E2(Z,X){return z8(X,o8(Z))}function I2(Z){return R({[I]:"Integer",type:"integer"},Z)}function ZH(Z,X,z){return{[Z]:$8(d(Z),X,e(z))}}function XH(Z,X,z){return Z.reduce((Y,q)=>{return{...Y,...ZH(q,X,z)}},{})}function zH(Z,X,z){return XH(Z.keys,X,z)}function T2(Z,X,z){let W=zH(Z,X,z);return m(W)}function $H(Z){let[X,z]=[Z.slice(0,1),Z.slice(1)];return[X.toLowerCase(),z].join("")}function QH(Z){let[X,z]=[Z.slice(0,1),Z.slice(1)];return[X.toUpperCase(),z].join("")}function WH(Z){return Z.toUpperCase()}function HH(Z){return Z.toLowerCase()}function JH(Z,X,z){let W=ZZ(Z.pattern);if(!d8(W))return{...Z,pattern:P2(Z.pattern,X)};let B=[...gZ(W)].map((H)=>d(H)),U=w2(B,X),G=c(U);return L6([G],z)}function P2(Z,X){return typeof Z==="string"?X==="Uncapitalize"?$H(Z):X==="Capitalize"?QH(Z):X==="Uppercase"?WH(Z):X==="Lowercase"?HH(Z):Z:Z.toString()}function w2(Z,X){return Z.map((z)=>$8(z,X))}function $8(Z,X,z={}){return k0(Z)?T2(Z,X,z):b0(Z)?JH(Z,X,z):v(Z)?c(w2(Z.anyOf,X),z):w0(Z)?d(P2(Z.const,X),z):R(Z,z)}function k2(Z,X={}){return $8(Z,"Capitalize",X)}function b2(Z,X={}){return $8(Z,"Lowercase",X)}function f2(Z,X={}){return $8(Z,"Uncapitalize",X)}function x2(Z,X={}){return $8(Z,"Uppercase",X)}function YH(Z,X,z){let W={};for(let Y of globalThis.Object.getOwnPropertyNames(Z))W[Y]=S8(Z[Y],X,e(z));return W}function VH(Z,X,z){return YH(Z.properties,X,z)}function g2(Z,X,z){let W=VH(Z,X,z);return m(W)}function _H(Z,X){return Z.map((z)=>P5(z,X))}function BH(Z,X){return Z.map((z)=>P5(z,X))}function UH(Z,X){let{[X]:z,...W}=Z;return W}function GH(Z,X){return X.reduce((z,W)=>UH(z,W),Z)}function qH(Z,X,z){let W=$0(Z,[V0,"$id","required","properties"]),Y=GH(z,X);return o(Y,W)}function AH(Z){let X=Z.reduce((z,W)=>G6(W)?[...z,d(W)]:z,[]);return c(X)}function P5(Z,X){return z0(Z)?F0(_H(Z.allOf,X)):v(Z)?c(BH(Z.anyOf,X)):Y0(Z)?qH(Z,X,Z.properties):o({})}function S8(Z,X,z){let W=H0(X)?AH(X):X,Y=x0(X)?C0(X):X,q=W0(Z),B=W0(X);return Z0(Z)?g2(Z,Y,z):k0(X)?h2(Z,X,z):q&&B?t("Omit",[Z,W],z):!q&&B?t("Omit",[Z,W],z):q&&!B?t("Omit",[Z,W],z):R({...P5(Z,Y),...z})}function MH(Z,X,z){return{[X]:S8(Z,[X],e(z))}}function DH(Z,X,z){return X.reduce((W,Y)=>{return{...W,...MH(Z,Y,z)}},{})}function LH(Z,X,z){return DH(Z,X.keys,z)}function h2(Z,X,z){let W=LH(Z,X,z);return m(W)}function OH(Z,X,z){let W={};for(let Y of globalThis.Object.getOwnPropertyNames(Z))W[Y]=C8(Z[Y],X,e(z));return W}function FH(Z,X,z){return OH(Z.properties,X,z)}function v2(Z,X,z){let W=FH(Z,X,z);return m(W)}function NH(Z,X){return Z.map((z)=>w5(z,X))}function KH(Z,X){return Z.map((z)=>w5(z,X))}function jH(Z,X){let z={};for(let W of X)if(W in Z)z[W]=Z[W];return z}function RH(Z,X,z){let W=$0(Z,[V0,"$id","required","properties"]),Y=jH(z,X);return o(Y,W)}function SH(Z){let X=Z.reduce((z,W)=>G6(W)?[...z,d(W)]:z,[]);return c(X)}function w5(Z,X){return z0(Z)?F0(NH(Z.allOf,X)):v(Z)?c(KH(Z.anyOf,X)):Y0(Z)?RH(Z,X,Z.properties):o({})}function C8(Z,X,z){let W=H0(X)?SH(X):X,Y=x0(X)?C0(X):X,q=W0(Z),B=W0(X);return Z0(Z)?v2(Z,Y,z):k0(X)?y2(Z,X,z):q&&B?t("Pick",[Z,W],z):!q&&B?t("Pick",[Z,W],z):q&&!B?t("Pick",[Z,W],z):R({...w5(Z,Y),...z})}function CH(Z,X,z){return{[X]:C8(Z,[X],e(z))}}function EH(Z,X,z){return X.reduce((W,Y)=>{return{...W,...CH(Z,Y,z)}},{})}function IH(Z,X,z){return EH(Z,X.keys,z)}function y2(Z,X,z){let W=IH(Z,X,z);return m(W)}function TH(Z,X){return t("Partial",[t(Z,X)])}function PH(Z){return t("Partial",[H8(Z)])}function wH(Z){let X={};for(let z of globalThis.Object.getOwnPropertyNames(Z))X[z]=O0(Z[z]);return X}function kH(Z,X){let z=$0(Z,[V0,"$id","required","properties"]),W=wH(X);return o(W,z)}function m2(Z){return Z.map((X)=>u2(X))}function u2(Z){return a0(Z)?TH(Z.target,Z.parameters):W0(Z)?PH(Z.$ref):z0(Z)?F0(m2(Z.allOf)):v(Z)?c(m2(Z.anyOf)):Y0(Z)?kH(Z,Z.properties):v8(Z)?Z:_8(Z)?Z:e0(Z)?Z:w0(Z)?Z:TZ(Z)?Z:Z8(Z)?Z:B8(Z)?Z:PZ(Z)?Z:wZ(Z)?Z:o({})}function VZ(Z,X){if(Z0(Z))return d2(Z,X);else return R({...u2(Z),...X})}function bH(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=VZ(Z[W],e(X));return z}function fH(Z,X){return bH(Z.properties,X)}function d2(Z,X){let z=fH(Z,X);return m(z)}function xH(Z,X){return t("Required",[t(Z,X)])}function gH(Z){return t("Required",[H8(Z)])}function hH(Z){let X={};for(let z of globalThis.Object.getOwnPropertyNames(Z))X[z]=$0(Z[z],[D0]);return X}function vH(Z,X){let z=$0(Z,[V0,"$id","required","properties"]),W=hH(X);return o(W,z)}function c2(Z){return Z.map((X)=>p2(X))}function p2(Z){return a0(Z)?xH(Z.target,Z.parameters):W0(Z)?gH(Z.$ref):z0(Z)?F0(c2(Z.allOf)):v(Z)?c(c2(Z.anyOf)):Y0(Z)?vH(Z,Z.properties):v8(Z)?Z:_8(Z)?Z:e0(Z)?Z:w0(Z)?Z:TZ(Z)?Z:Z8(Z)?Z:B8(Z)?Z:PZ(Z)?Z:wZ(Z)?Z:o({})}function _Z(Z,X){if(Z0(Z))return l2(Z,X);else return R({...p2(Z),...X})}function yH(Z,X){let z={};for(let W of globalThis.Object.getOwnPropertyNames(Z))z[W]=_Z(Z[W],X);return z}function mH(Z,X){return yH(Z.properties,X)}function l2(Z,X){let z=mH(Z,X);return m(z)}function uH(Z,X){return X.map((z)=>{return W0(z)?k5(Z,z.$ref):g0(Z,z)})}function k5(Z,X){return X in Z?W0(Z[X])?k5(Z,Z[X].$ref):g0(Z,Z[X]):y()}function dH(Z){return $Z(Z[0])}function cH(Z){return K8(Z[0],Z[1])}function pH(Z){return QZ(Z[0])}function lH(Z){return VZ(Z[0])}function iH(Z){return S8(Z[0],Z[1])}function nH(Z){return C8(Z[0],Z[1])}function oH(Z){return _Z(Z[0])}function sH(Z,X,z){let W=uH(Z,z);return X==="Awaited"?dH(W):X==="Index"?cH(W):X==="KeyOf"?pH(W):X==="Partial"?lH(W):X==="Omit"?iH(W):X==="Pick"?nH(W):X==="Required"?oH(W):y()}function aH(Z,X){return a8(g0(Z,X))}function rH(Z,X){return r8(g0(Z,X))}function tH(Z,X,z){return t8(uZ(Z,X),g0(Z,z))}function eH(Z,X,z){return Q8(uZ(Z,X),g0(Z,z))}function ZJ(Z,X){return F0(uZ(Z,X))}function XJ(Z,X){return zZ(g0(Z,X))}function zJ(Z,X){return o(globalThis.Object.keys(X).reduce((z,W)=>{return{...z,[W]:g0(Z,X[W])}},{}))}function $J(Z,X){let[z,W]=[g0(Z,k6(X)),w6(X)],Y=o8(X);return Y.patternProperties[W]=z,Y}function QJ(Z,X){return W0(X)?{...k5(Z,X.$ref),[V0]:X[V0]}:X}function WJ(Z,X){return m0(uZ(Z,X))}function HJ(Z,X){return c(uZ(Z,X))}function uZ(Z,X){return X.map((z)=>g0(Z,z))}function g0(Z,X){return S0(X)?R(g0(Z,$0(X,[D0])),X):s8(X)?R(g0(Z,$0(X,[o0])),X):L8(X)?R(QJ(Z,X),X):s0(X)?R(aH(Z,X.items),X):h8(X)?R(rH(Z,X.items),X):a0(X)?R(sH(Z,X.target,X.parameters)):r0(X)?R(tH(Z,X.parameters,X.returns),X):t0(X)?R(eH(Z,X.parameters,X.returns),X):z0(X)?R(ZJ(Z,X.allOf),X):y8(X)?R(XJ(Z,X.items),X):Y0(X)?R(zJ(Z,X.properties),X):u8(X)?R($J(Z,X)):f0(X)?R(WJ(Z,X.items||[]),X):v(X)?R(HJ(Z,X.anyOf),X):X}function JJ(Z,X){return X in Z?g0(Z,Z[X]):y()}function i2(Z){return globalThis.Object.getOwnPropertyNames(Z).reduce((X,z)=>{return{...X,[z]:JJ(Z,z)}},{})}class n2{constructor(Z){let X=i2(Z),z=this.WithIdentifiers(X);this.$defs=z}Import(Z,X){let z={...this.$defs,[Z]:R(this.$defs[Z],X)};return R({[I]:"Import",$defs:z,$ref:Z})}WithIdentifiers(Z){return globalThis.Object.getOwnPropertyNames(Z).reduce((X,z)=>{return{...X,[z]:{...Z[z],$id:z}}},{})}}function o2(Z){return new n2(Z)}function s2(Z,X){return R({[I]:"Not",not:Z},X)}function a2(Z,X){return t0(Z)?m0(Z.parameters,X):y()}var YJ=0;function r2(Z,X={}){if(J0(X.$id))X.$id=\`T\${YJ++}\`;let z=o8(Z({[I]:"This",$ref:\`\${X.$id}\`}));return z.$id=X.$id,R({[v0]:"Recursive",...z},X)}function t2(Z,X){let z=a(Z)?new globalThis.RegExp(Z):Z;return R({[I]:"RegExp",type:"RegExp",source:z.source,flags:z.flags},X)}function VJ(Z){return z0(Z)?Z.allOf:v(Z)?Z.anyOf:f0(Z)?Z.items??[]:[]}function e2(Z){return VJ(Z)}function Z4(Z,X){return t0(Z)?R(Z.returns,X):y(X)}class X4{constructor(Z){this.schema=Z}Decode(Z){return new z4(this.schema,Z)}}class z4{constructor(Z,X){this.schema=Z,this.decode=X}EncodeTransform(Z,X){let Y={Encode:(q)=>X[V0].Encode(Z(q)),Decode:(q)=>this.decode(X[V0].Decode(q))};return{...X,[V0]:Y}}EncodeSchema(Z,X){let z={Decode:this.decode,Encode:Z};return{...X,[V0]:z}}Encode(Z){return L8(this.schema)?this.EncodeTransform(Z,this.schema):this.EncodeSchema(Z,this.schema)}}function $4(Z){return new X4(Z)}function Q4(Z={}){return R({[I]:Z[I]??"Unsafe"},Z)}function W4(Z){return R({[I]:"Void",type:"void"},Z)}var b5={};h6(b5,{Void:()=>W4,Uppercase:()=>x2,Unsafe:()=>Q4,Unknown:()=>j8,Union:()=>c,Undefined:()=>R6,Uncapitalize:()=>f2,Uint8Array:()=>S6,Tuple:()=>m0,Transform:()=>$4,TemplateLiteral:()=>L6,Symbol:()=>j6,String:()=>X8,ReturnType:()=>Z4,Rest:()=>e2,Required:()=>_Z,RegExp:()=>t2,Ref:()=>H8,Recursive:()=>r2,Record:()=>P6,ReadonlyOptional:()=>T6,Readonly:()=>E0,Promise:()=>F6,Pick:()=>C8,Partial:()=>VZ,Parameters:()=>a2,Optional:()=>O0,Omit:()=>S8,Object:()=>o,Number:()=>y0,Null:()=>K6,Not:()=>s2,Never:()=>y,Module:()=>o2,Mapped:()=>rX,Lowercase:()=>b2,Literal:()=>d,KeyOf:()=>QZ,Iterator:()=>zZ,Intersect:()=>F0,Integer:()=>I2,Instantiate:()=>E2,InstanceType:()=>S2,Index:()=>K8,Function:()=>Q8,Extract:()=>YZ,Extends:()=>HZ,Exclude:()=>JZ,Enum:()=>H2,Date:()=>N6,ConstructorParameters:()=>W2,Constructor:()=>t8,Const:()=>Q2,Composite:()=>$2,Capitalize:()=>k2,Boolean:()=>D6,BigInt:()=>XZ,Awaited:()=>$Z,AsyncIterator:()=>r8,Array:()=>a8,Argument:()=>fX,Any:()=>N8});var h=b5;var H4="http://127.0.0.1:3850",BZ="pi",E8="plugin",p0=5000,dZ=1e4,J4=5000,b6="signet-pi-hidden-recall",f6="signet-pi-session-context";function Y4(Z){return $5(Z,{logPrefix:"signet-pi",actorName:"pi-extension",runtimePath:E8,defaultTimeout:p0})}var _J=new Set([b6,f6]),V4={harness:BZ,runtimePath:E8,writeTimeout:dZ,promptSubmitTimeout:J4,excludedCustomTypes:_J,sessionStartTimeout:()=>p0,staticFallback:Q5};function _4(Z,X){return{role:"custom",customType:Z,display:!1,content:\`<signet-memory source="auto-recall">
|
|
23002
|
+
\${H5(X)}
|
|
23003
|
+
</signet-memory>\`,timestamp:Date.now()}}class B4 extends V6{consumeHiddenInjectMessages(Z){if(!Z)return[];let X=[],z=p(this.pendingSessionContext.get(Z));if(z)X.push(_4(f6,z));this.pendingSessionContext.delete(Z);let W=this.consumePendingRecall(Z);if(W)X.push(_4(b6,W));return X}}function U4(){return new B4}function qJ(){let Z=GJ(K7(),"extensions","signet.json");if(!BJ(Z))return null;try{let X=UJ(Z,"utf-8"),z=JSON.parse(X);if(typeof z!=="object"||z===null)return null;return z}catch{return null}}function AJ(){let Z=qJ(),X=KZ("SIGNET_ENABLED"),z=Z?.enabled;return{enabled:X!==void 0?X!=="false":z!==void 0?z:!0}}var MJ=AJ(),T8={lastRecall:null,memoryCount:0};function DJ(){return n0("SIGNET_API_KEY")??n0("SIGNET_TOKEN")}function cZ(Z={}){let X=DJ();return X?{...Z,Authorization:\`Bearer \${X}\`}:Z}async function I8(Z){try{return(await fetch(\`\${Z}/health\`,{method:"GET",headers:cZ({Accept:"application/json"}),signal:AbortSignal.timeout(p0)})).ok}catch{return!1}}async function G4(Z,X,z={}){let{limit:W=10,agentId:Y,sessionKey:q,includeRecalled:B,scope:U,aggregate:G,aggregateBudget:H,saveAggregate:_}=z,$=await fetch(\`\${Z}/api/memory/recall\`,{method:"POST",headers:cZ({"Content-Type":"application/json"}),body:JSON.stringify(e6(X,{limit:W,agentId:Y,sessionKey:q,includeRecalled:B,scope:U,aggregate:G,aggregateBudget:H,saveAggregate:_})),signal:AbortSignal.timeout(G?Math.max(p0*6,30000):p0)});if(!$.ok){let Q=await $.text();throw Error(\`Recall failed: \${Q}\`)}return await $.json()}async function q4(Z,X,z={}){let{critical:W=!1,tags:Y=[],agentId:q}=z,B=await fetch(\`\${Z}/api/hooks/remember\`,{method:"POST",headers:cZ({"Content-Type":"application/json"}),body:JSON.stringify(F7(X,{harness:BZ,pinned:W,tags:Y,agentId:q,source:"pi-extension",runtimePath:E8})),signal:AbortSignal.timeout(dZ)});if(!B.ok){let U=await B.text();throw Error(\`Remember failed: \${U}\`)}}async function LJ(Z,X,z={}){let{limit:W=10,agentId:Y,sessionKey:q,includeRecalled:B,project:U}=z,G=await fetch(\`\${Z}/api/memory/recall\`,{method:"POST",headers:cZ({"Content-Type":"application/json"}),body:JSON.stringify({...e6(X,{limit:W,agentId:Y,sessionKey:q,includeRecalled:B,project:U}),sourceOnly:!0}),signal:AbortSignal.timeout(p0)});if(!G.ok){let H=await G.text();throw Error(\`Source search failed: \${H}\`)}return await G.json()}async function OJ(Z,X,z={}){let W=await fetch(\`\${Z}/api/sessions/search\`,{method:"POST",headers:cZ({"Content-Type":"application/json"}),body:JSON.stringify({query:X,sessionKey:z.sessionKey,currentSessionKey:z.currentSessionKey,agentId:z.agentId,project:z.project,limit:z.limit}),signal:AbortSignal.timeout(p0)});if(!W.ok){let Y=await W.text();throw Error(\`Session search failed: \${Y}\`)}return await W.json()}function x6(Z){let X=T8.lastRecall?\`signet:\${T8.memoryCount} memories\`:"signet:ready";Z.ui.setStatus("signet",Z.ui.theme.fg("accent",X))}function FJ(Z,X,z){Z.on("session_start",async(W,Y)=>{if(await I8(z))Y.ui.notify("SignetAI memory connected","info"),x6(Y);else Y.ui.notify("SignetAI daemon not running. Memory features disabled.","warning"),Y.ui.notify("Install: curl -fsSL https://signetai.sh/install.sh | bash && signet setup","info");await M8(X,Y)}),Z.on("session_switch",async(W,Y)=>{await RZ(X,W,W.type),await M8(X,Y)}),Z.on("session_fork",async(W,Y)=>{await RZ(X,W,W.type),await M8(X,Y)}),Z.on("session_shutdown",async(W,Y)=>{Y.ui.setStatus("signet",void 0),await J6(X,Y,"session_shutdown")})}function NJ(Z,X){Z.on("input",async(z,W)=>{let Y=T0(W);X.state.clearPendingRecall(Y.sessionId),await SZ(X,W,z.text)}),Z.on("before_agent_start",async(z,W)=>{await n8(X,W);let Y=T0(W);if(!Y.sessionId)return;if(X.state.hasPendingRecall(Y.sessionId))return;await SZ(X,W,z.prompt)})}function KJ(Z,X){Z.on("context",async(z,W)=>{let Y=T0(W),q=X.state.consumeHiddenInjectMessages(Y.sessionId);if(q.length===0)return;return{messages:[...z.messages,...q]}})}function jJ(Z,X){Z.on("session_before_compact",async(z,W)=>{await n8(X,W);let Y=T0(W);await X.client.post("/api/hooks/pre-compaction",{harness:BZ,sessionKey:Y.sessionId,messageCount:Array.isArray(z.preparation?.messagesToSummarize)?z.preparation.messagesToSummarize.length:void 0,runtimePath:E8},p0);return}),Z.on("session_compact",async(z,W)=>{let Y=p(z.compactionEntry?.summary);if(!Y)return;let q=T0(W);await X.client.post("/api/hooks/compaction-complete",{harness:BZ,summary:Y,project:q.project,sessionKey:q.sessionId,agentId:X.agentId,runtimePath:E8},dZ)})}function RJ(Z){let X=Z.trim(),z=!1,W=[];if(X.startsWith("critical:"))z=!0,X=X.slice(9).trim();let Y=X.match(/^\\[([^\\]]+)\\]:\\s*/);if(Y)W.push(...Y[1].split(",").map((q)=>q.trim())),X=X.slice(Y[0].length);return{content:X,critical:z,tags:W}}function SJ(Z,X,z){Z.registerCommand("recall",{description:"Search SignetAI memories",handler:async(W,Y)=>{if(!W?.trim()){Y.ui.notify("Usage: /recall <query>","warning");return}if(!await I8(X)){Y.ui.notify("Signet daemon not running. Run: signet daemon start","error");return}Y.ui.notify(\`Recalling: "\${W}"...\`,"info");try{let B=await G4(X,W,{limit:5,agentId:z}),U=NZ(B);if(U.rows.length===0){Y.ui.notify("No relevant memories found","info");return}T8.lastRecall=new Date().toISOString(),T8.memoryCount=U.rows.length,x6(Y),Y.ui.notify(Q6(B),"success")}catch(B){let U=B instanceof Error?B.message:String(B);Y.ui.notify(\`Recall failed: \${U}\`,"error")}}}),Z.registerCommand("remember",{description:"Save a memory to SignetAI",handler:async(W,Y)=>{if(!W?.trim()){Y.ui.notify("Usage: /remember <content>","warning");return}if(!await I8(X)){Y.ui.notify("Signet daemon not running. Run: signet daemon start","error");return}let{content:B,critical:U,tags:G}=RJ(W);try{await q4(X,B,{critical:U,tags:G,agentId:z});let H=U?" (pinned)":"";Y.ui.notify(\`Memory saved\${H}: "\${B.substring(0,50)}..."\`,"success")}catch(H){let _=H instanceof Error?H.message:String(H);Y.ui.notify(\`Remember failed: \${_}\`,"error")}}}),Z.registerCommand("signet-status",{description:"Check SignetAI daemon status",handler:async(W,Y)=>{let q=await I8(X),B=Y.sessionManager.getSessionId();if(q){let U=[\`Signet daemon is running on \${X}\`];if(B)U.push(\`Session: \${B}\`);Y.ui.notify(U.join(\`
|
|
23004
|
+
\`),"success");try{let G=await fetch(\`\${X}/api/memory/stats\`,{signal:AbortSignal.timeout(p0)});if(G.ok){let H=await G.json();Y.ui.notify(\`Memory stats: \${JSON.stringify(H)}\`,"info")}}catch{}}else Y.ui.notify(\`Signet daemon not responding.
|
|
23005
23005
|
Install: curl -fsSL https://signetai.sh/install.sh | bash && signet setup
|
|
23006
|
-
Start: signet daemon start\`,"error")}}),Z.registerTool({name:"signet_recall",label:"Signet Recall",description:"Search SignetAI persistent memory for relevant context from previous sessions. Use aggregate=true for multi-query synthesis that consolidates scattered memories into a single summary.",promptSnippet:"Search past memories when user asks about previous decisions, preferences, or project context",promptGuidelines:["Use aggregate=true when the user asks a broad question that likely spans many memories (e.g. 'who is X', 'what happened with Y', 'summarize the history of Z')","Use aggregate=false (default) for targeted lookups of specific facts or single memories","Aggregate recall takes longer (3-5s) but produces higher-quality synthesized answers for complex queries"],parameters:h.Object({query:h.String({description:"Search query to find relevant memories"}),limit:h.Optional(h.Number({description:"Maximum number of memories to return (default: 5)",default:5})),aggregate:h.Optional(h.Boolean({description:"Enable aggregate recall: runs multiple follow-up queries and synthesizes a consolidated answer. Use for broad questions spanning many memories. (default: false)",default:!1})),aggregateBudget:h.Optional(h.String({description:"Aggregate synthesis budget: 'small', 'medium', or 'large'. Controls depth of multi-query recall and synthesis. (default: medium)"}))}),async execute(W,
|
|
23006
|
+
Start: signet daemon start\`,"error")}}),Z.registerTool({name:"signet_recall",label:"Signet Recall",description:"Search SignetAI persistent memory for relevant context from previous sessions. Use aggregate=true for multi-query synthesis that consolidates scattered memories into a single summary.",promptSnippet:"Search past memories when user asks about previous decisions, preferences, or project context",promptGuidelines:["Use aggregate=true when the user asks a broad question that likely spans many memories (e.g. 'who is X', 'what happened with Y', 'summarize the history of Z')","Use aggregate=false (default) for targeted lookups of specific facts or single memories","Aggregate recall takes longer (3-5s) but produces higher-quality synthesized answers for complex queries"],parameters:h.Object({query:h.String({description:"Search query to find relevant memories"}),limit:h.Optional(h.Number({description:"Maximum number of memories to return (default: 5)",default:5})),aggregate:h.Optional(h.Boolean({description:"Enable aggregate recall: runs multiple follow-up queries and synthesizes a consolidated answer. Use for broad questions spanning many memories. (default: false)",default:!1})),aggregateBudget:h.Optional(h.String({description:"Aggregate synthesis budget: 'small', 'medium', or 'large'. Controls depth of multi-query recall and synthesis. (default: medium)"}))}),async execute(W,Y,q,B,U){if(!await I8(X))return{content:[{type:"text",text:"Signet daemon not running. Memories unavailable."}],details:{error:"daemon_offline"}};try{let H=String(Y.query||""),_=typeof Y.limit==="number"?Y.limit:5,$=Y.aggregate===!0,Q=typeof Y.aggregateBudget==="string"&&["small","medium","large"].includes(Y.aggregateBudget)?Y.aggregateBudget:void 0,J=await G4(X,H,{limit:_,agentId:z,aggregate:$,aggregateBudget:Q}),V=NZ(J);if($&&J.aggregate){let A=J.results??V.rows;if(A.length===0)return{content:[{type:"text",text:"No relevant memories found for this query."}],details:{memoriesFound:0}};T8.lastRecall=new Date().toISOString(),T8.memoryCount=A.length,x6(U);let M=[\`[Aggregate Recall] Query: \${H}\`];for(let D of A)if(typeof D.content==="string")M.push(D.content);return{content:[{type:"text",text:M.join(\`
|
|
23007
23007
|
|
|
23008
|
-
\`)}],details:{memoriesFound:A.length,memories:A,aggregate:J.aggregate,meta:
|
|
23008
|
+
\`)}],details:{memoriesFound:A.length,memories:A,aggregate:J.aggregate,meta:V.meta}}}if(V.rows.length===0)return{content:[{type:"text",text:"No relevant memories found for this query."}],details:{memoriesFound:0}};return T8.lastRecall=new Date().toISOString(),T8.memoryCount=V.rows.length,x6(U),{content:[{type:"text",text:Q6(J)}],details:{memoriesFound:V.rows.length,memories:V.rows,meta:V.meta}}}catch(H){let _=H instanceof Error?H.message:String(H);return{content:[{type:"text",text:\`Error recalling memories: \${_}\`}],details:{error:_},isError:!0}}}}),Z.registerTool({name:"signet_source_search",label:"Signet Source Search",description:"Search Signet source-backed artifacts such as Codex native memory, Obsidian, imported docs, and transcripts.",promptSnippet:"Search source-backed artifacts when the answer should come from imported files, notes, docs, transcripts, or other provenance-backed sources rather than ordinary saved memories",promptGuidelines:["Use this when the user asks about source-backed documents, notes, imported files, or provenance-specific context","Keep source search separate from ordinary memory recall; prefer signet_recall for preferences, decisions, and remembered facts"],parameters:h.Object({query:h.String({description:"Natural-language source search query"}),limit:h.Optional(h.Number({description:"Maximum number of source results to return (default: 10)",default:10})),project:h.Optional(h.String({description:"Optional project path filter"})),includeRecalled:h.Optional(h.Boolean({description:"Include rows already recalled in this context",default:!1}))}),async execute(W,Y,q,B,U){if(!await I8(X))return{content:[{type:"text",text:"Signet daemon not running. Source search unavailable."}],details:{error:"daemon_offline"}};try{let H=T0(U),_=String(Y.query||""),$=typeof Y.limit==="number"?Y.limit:10,Q=typeof Y.project==="string"?Y.project:void 0,J=await LJ(X,_,{limit:$,agentId:z,sessionKey:p(H.sessionId),includeRecalled:Y.includeRecalled===!0,project:Q}),V=NZ(J);if(V.rows.length===0)return{content:[{type:"text",text:"No relevant source artifacts found for this query."}],details:{sourcesFound:0}};return{content:[{type:"text",text:Q6(J)}],details:{sourcesFound:V.rows.length,sources:V.rows,meta:V.meta}}}catch(H){let _=H instanceof Error?H.message:String(H);return{content:[{type:"text",text:\`Error searching sources: \${_}\`}],details:{error:_},isError:!0}}}}),Z.registerTool({name:"signet_session_search",label:"Signet Session Search",description:"Search active or completed Signet session transcripts. This is transcript-only and separate from memory recall.",promptSnippet:"Search Signet session transcripts when prior conversation evidence matters; keep transcript lookup separate from memory recall",promptGuidelines:["Use this when the user asks what happened in a prior session, wants transcript evidence, or needs exact conversational context","Prefer signet_recall for durable remembered facts and signet_source_search for source-backed artifacts"],parameters:h.Object({query:h.String({description:"Natural language or keyword query"}),sessionKey:h.Optional(h.String({description:"Specific transcript session key to search"})),currentSessionKey:h.Optional(h.String({description:"Current session key; sub-agent lineage may resolve this to the parent session"})),agentId:h.Optional(h.String({description:"Agent scope; defaults to the configured SIGNET_AGENT_ID when set"})),project:h.Optional(h.String({description:"Optional project path filter"})),limit:h.Optional(h.Number({description:"Max results to return (default 10, max 20)",default:10}))}),async execute(W,Y,q,B,U){if(!await I8(X))return{content:[{type:"text",text:"Signet daemon not running. Session search unavailable."}],details:{error:"daemon_offline"}};try{let H=String(Y.query||""),_=await OJ(X,H,{sessionKey:typeof Y.sessionKey==="string"?Y.sessionKey:void 0,currentSessionKey:typeof Y.currentSessionKey==="string"?Y.currentSessionKey:void 0,agentId:typeof Y.agentId==="string"?Y.agentId:z,project:typeof Y.project==="string"?Y.project:void 0,limit:typeof Y.limit==="number"?Y.limit:void 0});return{content:[{type:"text",text:JSON.stringify(_,null,2)}],details:{result:_}}}catch(H){let _=H instanceof Error?H.message:String(H);return{content:[{type:"text",text:\`Error searching sessions: \${_}\`}],details:{error:_},isError:!0}}}}),Z.registerTool({name:"signet_remember",label:"Signet Remember",description:"Save important information to SignetAI persistent memory for future sessions",promptSnippet:"Save critical decisions, user preferences, or key facts that should persist across sessions",promptGuidelines:["Use this tool when the user explicitly asks to remember something","Save key decisions made during the conversation that would be useful context later","Store user preferences about coding style, tools, or workflows","Mark critical information with critical=true to prevent decay"],parameters:h.Object({content:h.String({description:"The content to remember"}),critical:h.Optional(h.Boolean({description:"If true, memory will never decay and is always prioritized",default:!1})),tags:h.Optional(h.Array(h.String(),{description:"Tags to categorize this memory for better search"}))}),async execute(W,Y,q,B,U){if(!await I8(X))return{content:[{type:"text",text:"Signet daemon not running. Cannot save memory."}],details:{error:"daemon_offline"}};try{let H=String(Y.content||""),_=Boolean(Y.critical),$=Array.isArray(Y.tags)?Y.tags.filter((J)=>typeof J==="string"):[];return await q4(X,H,{critical:_,tags:$,agentId:z}),{content:[{type:"text",text:\`Memory saved\${_?" (pinned/critical)":""} successfully.\`}],details:{saved:!0,content:H}}}catch(H){let _=H instanceof Error?H.message:String(H);return{content:[{type:"text",text:\`Error saving memory: \${_}\`}],details:{error:_},isError:!0}}}})}var CJ=(Z)=>{if(!MJ.enabled)return;let X=n0("SIGNET_DAEMON_URL")??H4,z=n0("SIGNET_AGENT_ID");if(KZ("SIGNET_BYPASS")!=="1"){let W={agentId:z,client:Y4(X),state:U4(),config:V4};FJ(Z,W,X),NJ(Z,W),KJ(Z,W),jJ(Z,W)}SJ(Z,X,z)},SL=CJ;export{LJ as searchSourceArtifacts,OJ as searchSessions,q4 as rememberContent,G4 as recallMemories,RJ as parseRememberArgs,AJ as loadConfig,SL as default};
|
|
23009
23009
|
`;
|
|
23010
23010
|
|
|
23011
23011
|
// src/index.ts
|