codeassembly-guidance 0.0.0 → 0.2.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/.meta/changelog.json +1320 -0
- package/CHANGELOG.md +315 -0
- package/LICENSE +7 -0
- package/README.md +195 -1
- package/bin/codeassembly-validate-preferences.js +18 -0
- package/content/_partials/README.md +192 -0
- package/content/_partials/code-descriptions.md +4 -0
- package/content/_partials/code-style.md +7 -0
- package/content/_partials/comment-discipline.md +89 -0
- package/content/_partials/concision.md +3 -0
- package/content/_partials/diff-audit-checklist.md +9 -0
- package/content/_partials/file-access.md +4 -0
- package/content/_partials/live-repo-writes.md +13 -0
- package/content/_partials/plain-speech-calibration.md +70 -0
- package/content/_partials/plain-speech.md +13 -0
- package/content/_partials/prose-line-breaks.md +3 -0
- package/content/_partials/record-marker.md +1 -0
- package/content/_partials/reduced-object-relative.md +28 -0
- package/content/_partials/shell-commands.md +3 -0
- package/content/_partials/target-file-set-resolution.md +22 -0
- package/content/_partials/technical-recommendations.md +6 -0
- package/content/_partials/test-structure-audit-checklist.md +7 -0
- package/content/_partials/ticket-assessment-baseline.md +12 -0
- package/content/_partials/ticket-assessment.md +202 -0
- package/content/_partials/work-type-choice.md +13 -0
- package/content/codeassembly-content.yaml +59 -0
- package/content/collections/all.md +11 -0
- package/content/collections/atlassian.md +17 -0
- package/content/collections/recommended.md +41 -0
- package/content/collections/triage.md +13 -0
- package/content/collections/williamthorsen.md +26 -0
- package/content/guidance/README.md +22 -0
- package/content/guidance/_harnesses/claude/CLAUDE.md +6 -0
- package/content/guidance/_harnesses/rovo/AGENTS.md +5 -0
- package/content/guidance/_harnesses/rovo/codeassembly-guidance.md +4 -0
- package/content/guidance/rulebooks/accessibility-conventions.md +38 -0
- package/content/guidance/rulebooks/cli-conventions.md +192 -0
- package/content/guidance/rulebooks/codeassembly-content-specification.md +184 -0
- package/content/guidance/rulebooks/command-output-conventions.md +14 -0
- package/content/guidance/rulebooks/commit-conventions.md +72 -0
- package/content/guidance/rulebooks/generated-content-policy.md +10 -0
- package/content/guidance/rulebooks/live-worktree-policy.md +19 -0
- package/content/guidance/rulebooks/readme-conventions.md +74 -0
- package/content/guidance/rulebooks/shared-data-conventions.md +14 -0
- package/content/guidance/rulebooks/shell-conventions.md +273 -0
- package/content/guidance/rulebooks/ui-copy-conventions.md +34 -0
- package/content/guidance/rulebooks/williamthorsen-code-layout-preferences.md +102 -0
- package/content/guidance/rulebooks/williamthorsen-collaboration-preferences.md +60 -0
- package/content/guidance/rulebooks/williamthorsen-comment-preferences.md +30 -0
- package/content/guidance/rulebooks/williamthorsen-subagent-model-preferences.md +15 -0
- package/content/guidance/rulebooks/williamthorsen-ticketing-preferences.md +22 -0
- package/content/guidance/rulebooks/williamthorsen-tooling-preferences.md +36 -0
- package/content/guidance/rulebooks/williamthorsen-typescript-preferences.md +90 -0
- package/content/guidance/rulebooks/williamthorsen-workflow-preferences.md +58 -0
- package/content/guidance/rulebooks/williamthorsen-writing-preferences.md +80 -0
- package/content/guidance/shared/AGENTS.md +51 -0
- package/content/scripts/README.md +44 -0
- package/content/scripts/check-branch-currency.mjs +11 -0
- package/content/scripts/check-prose.mjs +171 -0
- package/content/scripts/describe-change.mjs +165 -0
- package/content/scripts/get-ticket-id.sh +131 -0
- package/content/scripts/manage-jira-ticket.mjs +214 -0
- package/content/scripts/resolve-frontmatter.sh +540 -0
- package/content/scripts/resolve-review-run.mjs +12 -0
- package/content/scripts/select-lede-exemplars.mjs +208 -0
- package/content/scripts/validate-preferences.mjs +146 -0
- package/content/skills/_data/action-items.md +83 -0
- package/content/skills/_data/artifact-conventions.md +1001 -0
- package/content/skills/_data/bitbucket-pr-access.md +89 -0
- package/content/skills/_data/branch-currency.md +36 -0
- package/content/skills/_data/branch-format.md +34 -0
- package/content/skills/_data/change-record.md +163 -0
- package/content/skills/_data/complexity-classification.md +58 -0
- package/content/skills/_data/concision.md +23 -0
- package/content/skills/_data/deployed-file-provenance.md +46 -0
- package/content/skills/_data/design-priorities.md +76 -0
- package/content/skills/_data/gh-body-file.md +30 -0
- package/content/skills/_data/git-commands.md +39 -0
- package/content/skills/_data/naming-conventions.md +50 -0
- package/content/skills/_data/pr-resolution.md +25 -0
- package/content/skills/_data/pr-source-resolution.md +36 -0
- package/content/skills/_data/project-stage.md +32 -0
- package/content/skills/_data/recommendation-gradient.md +92 -0
- package/content/skills/_data/scope-and-deferral.md +83 -0
- package/content/skills/_data/spike-conventions.md +89 -0
- package/content/skills/_data/ticket-evaluation.md +13 -0
- package/content/skills/_data/ticket-id-extraction.md +43 -0
- package/content/skills/_data/ticket-source-resolution.md +180 -0
- package/content/skills/_data/title-templates.md +632 -0
- package/content/skills/_data/title-voice.md +17 -0
- package/content/skills/_data/work-types.json +168 -0
- package/content/skills/_partials/acceptance-criteria-scaffold.md +15 -0
- package/content/skills/_partials/action-items.md +22 -0
- package/content/skills/_partials/bitbucket-delete-both-refusal.md +3 -0
- package/content/skills/_partials/commit-title-rendering.md +14 -0
- package/content/skills/_partials/gh-body-file.md +22 -0
- package/content/skills/_partials/jira-task-list-flattening.md +1 -0
- package/content/skills/_partials/nested-list-indent.md +9 -0
- package/content/skills/_partials/next-steps-after-plan.md +99 -0
- package/content/skills/_partials/next-steps-after-review.md +350 -0
- package/content/skills/_partials/option-format.md +85 -0
- package/content/skills/_partials/plan-template.md +97 -0
- package/content/skills/_partials/split-launch-prompts.md +5 -0
- package/content/skills/_partials/split-ticket-compose.md +5 -0
- package/content/skills/_partials/split-ticket-create.md +3 -0
- package/content/skills/_partials/ticket-and-plan-completeness.md +33 -0
- package/content/skills/_partials/ticket-concision.md +18 -0
- package/content/skills/_partials/ticket-criteria-conventions.md +7 -0
- package/content/skills/_partials/ticket-placement.md +14 -0
- package/content/skills/_partials/ticket-skeleton-tiers.md +6 -0
- package/content/skills/_partials/ticket-skeleton.md +13 -0
- package/content/skills/add-change-record/SKILL.md +136 -0
- package/content/skills/add-test-ids/SKILL.md +51 -0
- package/content/skills/align-ticket-with-implementation/SKILL.md +115 -0
- package/content/skills/anti-patterns/SKILL.md +57 -0
- package/content/skills/assess-ticket/SKILL.md +46 -0
- package/content/skills/assess-ticket/next-steps-after-assessment.md +98 -0
- package/content/skills/assess-usability/SKILL.md +96 -0
- package/content/skills/brainstorming/SKILL.md +107 -0
- package/content/skills/capture-event/SKILL.md +108 -0
- package/content/skills/capture-event/capture-event.mjs +216 -0
- package/content/skills/capture-feedback/SKILL.md +71 -0
- package/content/skills/capture-lede-decision/SKILL.md +163 -0
- package/content/skills/capture-lede-decision/capture-lede-decision.mjs +231 -0
- package/content/skills/classify-complexity/SKILL.md +92 -0
- package/content/skills/collaborate/SKILL.md +86 -0
- package/content/skills/condense-branch/SKILL.md +83 -0
- package/content/skills/create-bitbucket-pr/SKILL.md +87 -0
- package/content/skills/create-commit/SKILL.md +65 -0
- package/content/skills/create-devlog/SKILL.md +108 -0
- package/content/skills/create-gh-pr/SKILL.md +121 -0
- package/content/skills/create-pr/SKILL.md +150 -0
- package/content/skills/create-ticket/SKILL.md +395 -0
- package/content/skills/create-ticket/resolve-ticket-target.mjs +143 -0
- package/content/skills/derive-session-context/derive-session-context.mjs +149 -0
- package/content/skills/design-and-plan/SKILL.md +197 -0
- package/content/skills/development-workflows/SKILL.md +41 -0
- package/content/skills/get-ticket-id/SKILL.md +67 -0
- package/content/skills/groom-backlog/SKILL.md +247 -0
- package/content/skills/groom-backlog/groom-backlog.mjs +108 -0
- package/content/skills/implement-plan/SKILL.md +168 -0
- package/content/skills/index-prototypes/SKILL.md +200 -0
- package/content/skills/index-prototypes/index-prototypes.mjs +388 -0
- package/content/skills/kb-add/SKILL.md +157 -0
- package/content/skills/kb-add/kb-add.mjs +216 -0
- package/content/skills/kb-curate/SKILL.md +119 -0
- package/content/skills/kb-curate/kb-curate.mjs +213 -0
- package/content/skills/kb-edit/SKILL.md +128 -0
- package/content/skills/kb-edit/kb-edit.mjs +219 -0
- package/content/skills/kb-retrieve/SKILL.md +100 -0
- package/content/skills/kb-retrieve/kb-retrieve.mjs +207 -0
- package/content/skills/kb-retrieve-events/SKILL.md +98 -0
- package/content/skills/kb-retrieve-events/kb-retrieve-events.mjs +207 -0
- package/content/skills/kb-update-events/SKILL.md +77 -0
- package/content/skills/kb-update-events/kb-update-events.mjs +215 -0
- package/content/skills/merge-bb-pr/SKILL.md +136 -0
- package/content/skills/merge-gh-pr/SKILL.md +167 -0
- package/content/skills/merge-gh-pr/merge-gh-pr.mjs +10 -0
- package/content/skills/merge-pr/SKILL.md +368 -0
- package/content/skills/migrate-feedback-memories/SKILL.md +137 -0
- package/content/skills/migrate-feedback-memories/feedback-memories.mjs +161 -0
- package/content/skills/people-report/SKILL.md +208 -0
- package/content/skills/plan/SKILL.md +87 -0
- package/content/skills/prepare-prototype-brief/SKILL.md +178 -0
- package/content/skills/pull-from-backlog/SKILL.md +83 -0
- package/content/skills/pull-from-backlog/pull-from-backlog.mjs +209 -0
- package/content/skills/refine-plan/SKILL.md +263 -0
- package/content/skills/refine-prototype/SKILL.md +113 -0
- package/content/skills/respond-to-review/SKILL.md +292 -0
- package/content/skills/review-bb-pr/SKILL.md +161 -0
- package/content/skills/review-branch/SKILL.md +303 -0
- package/content/skills/review-criteria/SKILL.md +141 -0
- package/content/skills/review-gh-pr/SKILL.md +155 -0
- package/content/skills/review-gh-pr/select-pr-ticket.mjs +8 -0
- package/content/skills/review-permissions/SKILL.md +39 -0
- package/content/skills/review-pr/SKILL.md +123 -0
- package/content/skills/revise-comments/SKILL.md +148 -0
- package/content/skills/revise-prose/SKILL.md +197 -0
- package/content/skills/revise-prose/revise-prose.mjs +229 -0
- package/content/skills/save-artifact/SKILL.md +71 -0
- package/content/skills/save-plan/SKILL.md +55 -0
- package/content/skills/software-engineering/SKILL.md +74 -0
- package/content/skills/streamline-guidance/SKILL.md +174 -0
- package/content/skills/streamline-guidance/streamline-guidance.mjs +211 -0
- package/content/skills/summarize-change/SKILL.md +317 -0
- package/content/skills/summarize-chat/SKILL.md +100 -0
- package/content/skills/systematic-debugging/SKILL.md +308 -0
- package/content/skills/systematic-debugging/condition-based-waiting-example.ts +160 -0
- package/content/skills/systematic-debugging/condition-based-waiting.md +122 -0
- package/content/skills/systematic-debugging/defense-in-depth.md +130 -0
- package/content/skills/systematic-debugging/find-polluter.sh +68 -0
- package/content/skills/systematic-debugging/root-cause-tracing.md +185 -0
- package/content/skills/systematic-debugging/test-academic.md +16 -0
- package/content/skills/systematic-debugging/test-pressure-1.md +67 -0
- package/content/skills/systematic-debugging/test-pressure-2.md +77 -0
- package/content/skills/systematic-debugging/test-pressure-3.md +77 -0
- package/content/skills/testing-conventions/SKILL.md +235 -0
- package/content/skills/triage-spike-findings/SKILL.md +113 -0
- package/content/skills/triage-spike-findings/triage-spike-findings.mjs +71 -0
- package/content/skills/typescript-testing-conventions/SKILL.md +178 -0
- package/content/skills/update-jira-ticket/SKILL.md +257 -0
- package/content/skills/update-jira-ticket/update-jira-ticket.mjs +9 -0
- package/content/skills/update-project-guidance/SKILL.md +300 -0
- package/content/skills/upgrade-dependencies/SKILL.md +139 -0
- package/content/skills/wrap-up/SKILL.md +431 -0
- package/content/subagents/_data/claude.yaml +25 -0
- package/content/subagents/_data/rovo.yaml +41 -0
- package/content/subagents/canary.md +12 -0
- package/content/subagents/disposition-challenger.md +78 -0
- package/content/subagents/entry-drafter.md +191 -0
- package/content/subagents/handoff-reviewer.md +75 -0
- package/content/subagents/plan-reviewer.md +184 -0
- package/content/subagents/plan-reviser.md +88 -0
- package/content/subagents/prose-reviser.md +132 -0
- package/content/subagents/ticket-assessor.md +142 -0
- package/content/subagents/usability-assessor.md +157 -0
- package/package.json +74 -2
- package/schemas/preferences.v1.json +321 -0
- package/schemas/work-types.v1.json +142 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { createRequire as __cjsCreateRequire } from 'node:module';
|
|
2
|
+
const require = __cjsCreateRequire(import.meta.url);
|
|
3
|
+
var pa=Object.create;var rs=Object.defineProperty;var ga=Object.getOwnPropertyDescriptor;var ya=Object.getOwnPropertyNames;var ba=Object.getPrototypeOf,Sa=Object.prototype.hasOwnProperty;var a=(s,e)=>rs(s,"name",{value:e,configurable:!0}),Ze=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+s+'" is not supported')});var y=(s,e)=>()=>{try{return e||s((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var wa=(s,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ya(e))!Sa.call(s,i)&&i!==t&&rs(s,i,{get:()=>e[i],enumerable:!(n=ga(e,i))||n.enumerable});return s};var va=(s,e,t)=>(t=s!=null?pa(ba(s)):{},wa(e||!s||!s.__esModule?rs(t,"default",{value:s,enumerable:!0}):t,s));var O=y(I=>{"use strict";var us=Symbol.for("yaml.alias"),ai=Symbol.for("yaml.document"),et=Symbol.for("yaml.map"),li=Symbol.for("yaml.pair"),fs=Symbol.for("yaml.scalar"),tt=Symbol.for("yaml.seq"),K=Symbol.for("yaml.node.type"),Da=a(s=>!!s&&typeof s=="object"&&s[K]===us,"isAlias"),ja=a(s=>!!s&&typeof s=="object"&&s[K]===ai,"isDocument"),Ra=a(s=>!!s&&typeof s=="object"&&s[K]===et,"isMap"),Ba=a(s=>!!s&&typeof s=="object"&&s[K]===li,"isPair"),ci=a(s=>!!s&&typeof s=="object"&&s[K]===fs,"isScalar"),Fa=a(s=>!!s&&typeof s=="object"&&s[K]===tt,"isSeq");function ui(s){if(s&&typeof s=="object")switch(s[K]){case et:case tt:return!0}return!1}a(ui,"isCollection");function Ka(s){if(s&&typeof s=="object")switch(s[K]){case us:case et:case fs:case tt:return!0}return!1}a(Ka,"isNode");var Ua=a(s=>(ci(s)||ui(s))&&!!s.anchor,"hasAnchor");I.ALIAS=us;I.DOC=ai;I.MAP=et;I.NODE_TYPE=K;I.PAIR=li;I.SCALAR=fs;I.SEQ=tt;I.hasAnchor=Ua;I.isAlias=Da;I.isCollection=ui;I.isDocument=ja;I.isMap=Ra;I.isNode=Ka;I.isPair=Ba;I.isScalar=ci;I.isSeq=Fa});var Ne=y(ds=>{"use strict";var P=O(),$=Symbol("break visit"),fi=Symbol("skip children"),B=Symbol("remove node");function st(s,e){let t=di(e);P.isDocument(s)?ce(null,s.contents,t,Object.freeze([s]))===B&&(s.contents=null):ce(null,s,t,Object.freeze([]))}a(st,"visit");st.BREAK=$;st.SKIP=fi;st.REMOVE=B;function ce(s,e,t,n){let i=hi(s,e,t,n);if(P.isNode(i)||P.isPair(i))return mi(s,n,i),ce(s,i,t,n);if(typeof i!="symbol"){if(P.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=ce(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===$)return $;o===B&&(e.items.splice(r,1),r-=1)}}}else if(P.isPair(e)){n=Object.freeze(n.concat(e));let r=ce("key",e.key,t,n);if(r===$)return $;r===B&&(e.key=null);let o=ce("value",e.value,t,n);if(o===$)return $;o===B&&(e.value=null)}}return i}a(ce,"visit_");async function nt(s,e){let t=di(e);P.isDocument(s)?await ue(null,s.contents,t,Object.freeze([s]))===B&&(s.contents=null):await ue(null,s,t,Object.freeze([]))}a(nt,"visitAsync");nt.BREAK=$;nt.SKIP=fi;nt.REMOVE=B;async function ue(s,e,t,n){let i=await hi(s,e,t,n);if(P.isNode(i)||P.isPair(i))return mi(s,n,i),ue(s,i,t,n);if(typeof i!="symbol"){if(P.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await ue(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===$)return $;o===B&&(e.items.splice(r,1),r-=1)}}}else if(P.isPair(e)){n=Object.freeze(n.concat(e));let r=await ue("key",e.key,t,n);if(r===$)return $;r===B&&(e.key=null);let o=await ue("value",e.value,t,n);if(o===$)return $;o===B&&(e.value=null)}}return i}a(ue,"visitAsync_");function di(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}a(di,"initVisitor");function hi(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(P.isMap(e))return t.Map?.(s,e,n);if(P.isSeq(e))return t.Seq?.(s,e,n);if(P.isPair(e))return t.Pair?.(s,e,n);if(P.isScalar(e))return t.Scalar?.(s,e,n);if(P.isAlias(e))return t.Alias?.(s,e,n)}a(hi,"callVisitor");function mi(s,e,t){let n=e[e.length-1];if(P.isCollection(n))n.items[s]=t;else if(P.isPair(n))s==="key"?n.key=t:n.value=t;else if(P.isDocument(n))n.contents=t;else{let i=P.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}a(mi,"replaceNode");ds.visit=st;ds.visitAsync=nt});var hs=y(gi=>{"use strict";var pi=O(),Ya=Ne(),xa={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ja=a(s=>s.replace(/[!,[\]{}]/g,e=>xa[e]),"escapeTagName"),Ae=class s{static{a(this,"Directives")}constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Ja(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&pi.isNode(e.contents)){let r={};Ya.visit(e.contents,(o,l)=>{pi.isNode(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
4
|
+
`)}};Ae.defaultYaml={explicit:!1,version:"1.2"};Ae.defaultTags={"!!":"tag:yaml.org,2002:"};gi.Directives=Ae});var it=y(Ee=>{"use strict";var yi=O(),Va=Ne();function Wa(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}a(Wa,"anchorIsValid");function bi(s){let e=new Set;return Va.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}a(bi,"anchorNames");function Si(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}a(Si,"findNewAnchor");function Ga(s,e){let t=[],n=new Map,i=null;return{onAnchor:a(r=>{t.push(r),i??(i=bi(s));let o=Si(e,i);return i.add(o),o},"onAnchor"),setAnchors:a(()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(yi.isScalar(o.node)||yi.isCollection(o.node)))o.node.anchor=o.anchor;else{let l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},"setAnchors"),sourceObjects:n}}a(Ga,"createNodeAnchors");Ee.anchorIsValid=Wa;Ee.anchorNames=bi;Ee.createNodeAnchors=Ga;Ee.findNewAnchor=Si});var ms=y(wi=>{"use strict";function Oe(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],l=Oe(s,n,String(i),o);l===void 0?delete n[i]:l!==o&&(n[i]=l)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=Oe(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=Oe(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=Oe(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}a(Oe,"applyReviver");wi.applyReviver=Oe});var x=y(ki=>{"use strict";var Ha=O();function vi(s,e,t){if(Array.isArray(s))return s.map((n,i)=>vi(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!Ha.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}a(vi,"toJS");ki.toJS=vi});var rt=y(Ai=>{"use strict";var Qa=ms(),Ni=O(),Xa=x(),ps=class{static{a(this,"NodeBase")}constructor(e){Object.defineProperty(this,Ni.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!Ni.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Xa.toJS(this,"",o);if(typeof i=="function")for(let{count:c,res:u}of o.anchors.values())i(u,c);return typeof r=="function"?Qa.applyReviver(r,{"":l},"",l):l}};Ai.NodeBase=ps});var qe=y(Ei=>{"use strict";var za=it(),Za=Ne(),fe=O(),el=rt(),tl=x(),gs=class extends el.NodeBase{static{a(this,"Alias")}constructor(e){super(fe.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Za.visit(e,{Node:a((r,o)=>{(fe.isAlias(o)||fe.hasAnchor(o))&&n.push(o)},"Node")}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}if(i&&t){let{anchors:r,doc:o,maxAliasCount:l}=t,c=r.get(i);if(c||(tl.toJS(i,null,t),c=r.get(i)),c?.res===void 0){let u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(l>=0&&(c.count+=1,c.aliasCount===0&&(c.aliasCount=ot(o,i,r)),c.count*c.aliasCount>l)){let u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}}return i}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(i)}return t.anchors.get(n).res}toString(e,t,n){let i=`*${this.source}`;if(e){if(za.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}};function ot(s,e,t){if(fe.isAlias(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(fe.isCollection(e)){let n=0;for(let i of e.items){let r=ot(s,i,t);r>n&&(n=r)}return n}else if(fe.isPair(e)){let n=ot(s,e.key,t),i=ot(s,e.value,t);return Math.max(n,i)}return 1}a(ot,"getAliasCount");Ei.Alias=gs});var L=y(ys=>{"use strict";var sl=O(),nl=rt(),il=x(),rl=a(s=>!s||typeof s!="function"&&typeof s!="object","isScalarValue"),J=class extends nl.NodeBase{static{a(this,"Scalar")}constructor(e){super(sl.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:il.toJS(this.value,e,t)}toString(){return String(this.value)}};J.BLOCK_FOLDED="BLOCK_FOLDED";J.BLOCK_LITERAL="BLOCK_LITERAL";J.PLAIN="PLAIN";J.QUOTE_DOUBLE="QUOTE_DOUBLE";J.QUOTE_SINGLE="QUOTE_SINGLE";ys.Scalar=J;ys.isScalarValue=rl});var Te=y(qi=>{"use strict";var ol=qe(),ee=O(),Oi=L(),al="tag:yaml.org,2002:";function ll(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}a(ll,"findTagObject");function cl(s,e,t){if(ee.isDocument(s)&&(s=s.contents),ee.isNode(s))return s;if(ee.isPair(s)){let f=t.schema[ee.MAP].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=t,c;if(n&&s&&typeof s=="object"){if(c=l.get(s),c)return c.anchor??(c.anchor=i(s)),new ol.Alias(c.anchor);c={anchor:null,node:null},l.set(s,c)}e?.startsWith("!!")&&(e=al+e.slice(2));let u=ll(s,e,o.tags);if(!u){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new Oi.Scalar(s);return c&&(c.node=f),f}u=s instanceof Map?o[ee.MAP]:Symbol.iterator in Object(s)?o[ee.SEQ]:o[ee.MAP]}r&&(r(u),delete t.onTagObj);let m=u?.createNode?u.createNode(t.schema,s,t):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(t.schema,s,t):new Oi.Scalar(s);return e?m.tag=e:u.default||(m.tag=u.tag),c&&(c.node=m),m}a(cl,"createNode");qi.createNode=cl});var lt=y(at=>{"use strict";var ul=Te(),F=O(),fl=rt();function bs(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return ul.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:a(()=>{throw new Error("This should not happen, please report a bug.")},"onAnchor"),schema:s,sourceObjects:new Map})}a(bs,"collectionFromPath");var Ti=a(s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,"isEmptyPath"),Ss=class extends fl.NodeBase{static{a(this,"Collection")}constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>F.isNode(n)||F.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ti(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(F.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,bs(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(F.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&F.isScalar(r)?r.value:r:F.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!F.isPair(t))return!1;let n=t.value;return n==null||e&&F.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return F.isCollection(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(F.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,bs(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};at.Collection=Ss;at.collectionFromPath=bs;at.isEmptyPath=Ti});var Le=y(ct=>{"use strict";var dl=a(s=>s.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function ws(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}a(ws,"indentComment");var hl=a((s,e,t)=>s.endsWith(`
|
|
5
|
+
`)?ws(t,e):t.includes(`
|
|
6
|
+
`)?`
|
|
7
|
+
`+ws(t,e):(s.endsWith(" ")?"":" ")+t,"lineComment");ct.indentComment=ws;ct.lineComment=hl;ct.stringifyComment=dl});var Ci=y(Ce=>{"use strict";var ml="flow",vs="block",ut="quoted";function pl(s,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:l}={}){if(!i||i<0)return s;i<r&&(r=0);let c=Math.max(1+r,1+i-e.length);if(s.length<=c)return s;let u=[],m={},f=i-e.length;typeof n=="number"&&(n>i-Math.max(2,r)?u.push(0):f=i-n);let d,g,b=!1,h=-1,p=-1,w=-1;t===vs&&(h=Li(s,h,e.length),h!==-1&&(f=h+c));for(let k;k=s[h+=1];){if(t===ut&&k==="\\"){switch(p=h,s[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}w=h}if(k===`
|
|
8
|
+
`)t===vs&&(h=Li(s,h,e.length)),f=h+e.length+c,d=void 0;else{if(k===" "&&g&&g!==" "&&g!==`
|
|
9
|
+
`&&g!==" "){let N=s[h+1];N&&N!==" "&&N!==`
|
|
10
|
+
`&&N!==" "&&(d=h)}if(h>=f)if(d)u.push(d),f=d+c,d=void 0;else if(t===ut){for(;g===" "||g===" ";)g=k,k=s[h+=1],b=!0;let N=h>w+1?h-2:p-1;if(m[N])return s;u.push(N),m[N]=!0,f=N+c,d=void 0}else b=!0}g=k}if(b&&l&&l(),u.length===0)return s;o&&o();let v=s.slice(0,u[0]);for(let k=0;k<u.length;++k){let N=u[k],A=u[k+1]||s.length;N===0?v=`
|
|
11
|
+
${e}${s.slice(0,A)}`:(t===ut&&m[N]&&(v+=`${s[N]}\\`),v+=`
|
|
12
|
+
${e}${s.slice(N+1,A)}`)}return v}a(pl,"foldFlowLines");function Li(s,e,t){let n=e,i=e+1,r=s[i];for(;r===" "||r===" ";)if(e<i+t)r=s[++e];else{do r=s[++e];while(r&&r!==`
|
|
13
|
+
`);n=e,i=e+1,r=s[i]}return n}a(Li,"consumeMoreIndentedLines");Ce.FOLD_BLOCK=vs;Ce.FOLD_FLOW=ml;Ce.FOLD_QUOTED=ut;Ce.foldFlowLines=pl});var Pe=y(Mi=>{"use strict";var j=L(),V=Ci(),dt=a((s,e)=>({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),"getFoldOptions"),ht=a(s=>/^(%|---|\.\.\.)/m.test(s),"containsDocumentMarker");function gl(s,e,t){if(!e||e<0)return!1;let n=e-t,i=s.length;if(i<=n)return!1;for(let r=0,o=0;r<i;++r)if(s[r]===`
|
|
14
|
+
`){if(r-o>n)return!0;if(o=r+1,i-o<=n)return!1}return!0}a(gl,"lineLengthOverLimit");function Me(s,e){let t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(ht(s)?" ":""),o="",l=0;for(let c=0,u=t[c];u;u=t[++c])if(u===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(o+=t.slice(l,c)+"\\ ",c+=1,l=c,u="\\"),u==="\\")switch(t[c+1]){case"u":{o+=t.slice(l,c);let m=t.substr(c+2,4);switch(m){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:m.substr(0,2)==="00"?o+="\\x"+m.substr(2):o+=t.substr(c,6)}c+=5,l=c+1}break;case"n":if(n||t[c+2]==='"'||t.length<i)c+=1;else{for(o+=t.slice(l,c)+`
|
|
15
|
+
|
|
16
|
+
`;t[c+2]==="\\"&&t[c+3]==="n"&&t[c+4]!=='"';)o+=`
|
|
17
|
+
`,c+=2;o+=r,t[c+2]===" "&&(o+="\\"),c+=1,l=c+1}break;default:c+=1}return o=l?o+t.slice(l):t,n?o:V.foldFlowLines(o,r,V.FOLD_QUOTED,dt(e,!1))}a(Me,"doubleQuotedString");function ks(s,e){if(e.options.singleQuote===!1||e.implicitKey&&s.includes(`
|
|
18
|
+
`)||/[ \t]\n|\n[ \t]/.test(s))return Me(s,e);let t=e.indent||(ht(s)?" ":""),n="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
19
|
+
${t}`)+"'";return e.implicitKey?n:V.foldFlowLines(n,t,V.FOLD_FLOW,dt(e,!1))}a(ks,"singleQuotedString");function de(s,e){let{singleQuote:t}=e.options,n;if(t===!1)n=Me;else{let i=s.includes('"'),r=s.includes("'");i&&!r?n=ks:r&&!i?n=Me:n=t?ks:Me}return n(s,e)}a(de,"quotedString");var Ns;try{Ns=new RegExp(`(^|(?<!
|
|
20
|
+
))
|
|
21
|
+
+(?!
|
|
22
|
+
|$)`,"g")}catch{Ns=/\n+(?!\n|$)/g}function ft({comment:s,type:e,value:t},n,i,r){let{blockQuote:o,commentString:l,lineWidth:c}=n.options;if(!o||/\n[\t ]+$/.test(t))return de(t,n);let u=n.indent||(n.forceBlockIndent||ht(t)?" ":""),m=o==="literal"?!0:o==="folded"||e===j.Scalar.BLOCK_FOLDED?!1:e===j.Scalar.BLOCK_LITERAL?!0:!gl(t,c,u.length);if(!t)return m?`|
|
|
23
|
+
`:`>
|
|
24
|
+
`;let f,d;for(d=t.length;d>0;--d){let A=t[d-1];if(A!==`
|
|
25
|
+
`&&A!==" "&&A!==" ")break}let g=t.substring(d),b=g.indexOf(`
|
|
26
|
+
`);b===-1?f="-":t===g||b!==g.length-1?(f="+",r&&r()):f="",g&&(t=t.slice(0,-g.length),g[g.length-1]===`
|
|
27
|
+
`&&(g=g.slice(0,-1)),g=g.replace(Ns,`$&${u}`));let h=!1,p,w=-1;for(p=0;p<t.length;++p){let A=t[p];if(A===" ")h=!0;else if(A===`
|
|
28
|
+
`)w=p;else break}let v=t.substring(0,w<p?w+1:p);v&&(t=t.substring(v.length),v=v.replace(/\n+/g,`$&${u}`));let N=(h?u?"2":"1":"")+f;if(s&&(N+=" "+l(s.replace(/ ?[\r\n]+/g," ")),i&&i()),!m){let A=t.replace(/\n+/g,`
|
|
29
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`),E=!1,T=dt(n,!0);o!=="folded"&&e!==j.Scalar.BLOCK_FOLDED&&(T.onOverflow=()=>{E=!0});let S=V.foldFlowLines(`${v}${A}${g}`,u,V.FOLD_BLOCK,T);if(!E)return`>${N}
|
|
30
|
+
${u}${S}`}return t=t.replace(/\n+/g,`$&${u}`),`|${N}
|
|
31
|
+
${u}${v}${t}${g}`}a(ft,"blockString");function yl(s,e,t,n){let{type:i,value:r}=s,{actualString:o,implicitKey:l,indent:c,indentStep:u,inFlow:m}=e;if(l&&r.includes(`
|
|
32
|
+
`)||m&&/[[\]{},]/.test(r))return de(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return l||m||!r.includes(`
|
|
33
|
+
`)?de(r,e):ft(s,e,t,n);if(!l&&!m&&i!==j.Scalar.PLAIN&&r.includes(`
|
|
34
|
+
`))return ft(s,e,t,n);if(ht(r)){if(c==="")return e.forceBlockIndent=!0,ft(s,e,t,n);if(l&&c===u)return de(r,e)}let f=r.replace(/\n+/g,`$&
|
|
35
|
+
${c}`);if(o){let d=a(h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(f),"test"),{compat:g,tags:b}=e.doc.schema;if(b.some(d)||g?.some(d))return de(r,e)}return l?f:V.foldFlowLines(f,c,V.FOLD_FLOW,dt(e,!1))}a(yl,"plainString");function bl(s,e,t,n){let{implicitKey:i,inFlow:r}=e,o=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)}),{type:l}=s;l!==j.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(l=j.Scalar.QUOTE_DOUBLE);let c=a(m=>{switch(m){case j.Scalar.BLOCK_FOLDED:case j.Scalar.BLOCK_LITERAL:return i||r?de(o.value,e):ft(o,e,t,n);case j.Scalar.QUOTE_DOUBLE:return Me(o.value,e);case j.Scalar.QUOTE_SINGLE:return ks(o.value,e);case j.Scalar.PLAIN:return yl(o,e,t,n);default:return null}},"_stringify"),u=c(l);if(u===null){let{defaultKeyType:m,defaultStringType:f}=e.options,d=i&&m||f;if(u=c(d),u===null)throw new Error(`Unsupported default string type ${d}`)}return u}a(bl,"stringifyString");Mi.stringifyString=bl});var Ie=y(As=>{"use strict";var Sl=it(),W=O(),wl=Le(),vl=Pe();function kl(s,e){let t=Object.assign({blockQuote:!0,commentString:wl.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},s.schema.toStringOptions,e),n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}a(kl,"createStringifyContext");function Nl(s,e){if(e.tag){let i=s.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,n;if(W.isScalar(e)){n=e.value;let i=s.filter(r=>r.identify?.(n));if(i.length>1){let r=i.filter(o=>o.test);r.length>0&&(i=r)}t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else n=e,t=s.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return t}a(Nl,"getTagObject");function Al(s,e,{anchors:t,doc:n}){if(!n.directives)return"";let i=[],r=(W.isScalar(s)||W.isCollection(s))&&s.anchor;r&&Sl.anchorIsValid(r)&&(t.add(r),i.push(`&${r}`));let o=s.tag??(e.default?null:e.tag);return o&&i.push(n.directives.tagString(o)),i.join(" ")}a(Al,"stringifyProps");function El(s,e,t,n){if(W.isPair(s))return s.toString(e,t,n);if(W.isAlias(s)){if(e.doc.directives)return s.toString(e);if(e.resolvedAliases?.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let i,r=W.isNode(s)?s:e.doc.createNode(s,{onTagObj:a(c=>i=c,"onTagObj")});i??(i=Nl(e.doc.schema.tags,r));let o=Al(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let l=typeof i.stringify=="function"?i.stringify(r,e,t,n):W.isScalar(r)?vl.stringifyString(r,e,t,n):r.toString(e,t,n);return o?W.isScalar(r)||l[0]==="{"||l[0]==="["?`${o} ${l}`:`${o}
|
|
36
|
+
${e.indent}${l}`:l}a(El,"stringify");As.createStringifyContext=kl;As.stringify=El});var _i=y($i=>{"use strict";var U=O(),Pi=L(),Ii=Ie(),$e=Le();function Ol({key:s,value:e},t,n,i){let{allNullValues:r,doc:o,indent:l,indentStep:c,options:{commentString:u,indentSeq:m,simpleKeys:f}}=t,d=U.isNode(s)&&s.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(U.isCollection(s)||!U.isNode(s)&&typeof s=="object"){let T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let g=!f&&(!s||d&&e==null&&!t.inFlow||U.isCollection(s)||(U.isScalar(s)?s.type===Pi.Scalar.BLOCK_FOLDED||s.type===Pi.Scalar.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!g&&(f||!r),indent:l+c});let b=!1,h=!1,p=Ii.stringify(s,t,()=>b=!0,()=>h=!0);if(!g&&!t.inFlow&&p.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(t.inFlow){if(r||e==null)return b&&n&&n(),p===""?"?":g?`? ${p}`:p}else if(r&&!f||e==null&&g)return p=`? ${p}`,d&&!b?p+=$e.lineComment(p,t.indent,u(d)):h&&i&&i(),p;b&&(d=null),g?(d&&(p+=$e.lineComment(p,t.indent,u(d))),p=`? ${p}
|
|
37
|
+
${l}:`):(p=`${p}:`,d&&(p+=$e.lineComment(p,t.indent,u(d))));let w,v,k;U.isNode(e)?(w=!!e.spaceBefore,v=e.commentBefore,k=e.comment):(w=!1,v=null,k=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!g&&!d&&U.isScalar(e)&&(t.indentAtStart=p.length+1),h=!1,!m&&c.length>=2&&!t.inFlow&&!g&&U.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let N=!1,A=Ii.stringify(e,t,()=>N=!0,()=>h=!0),E=" ";if(d||w||v){if(E=w?`
|
|
38
|
+
`:"",v){let T=u(v);E+=`
|
|
39
|
+
${$e.indentComment(T,t.indent)}`}A===""&&!t.inFlow?E===`
|
|
40
|
+
`&&k&&(E=`
|
|
41
|
+
|
|
42
|
+
`):E+=`
|
|
43
|
+
${t.indent}`}else if(!g&&U.isCollection(e)){let T=A[0],S=A.indexOf(`
|
|
44
|
+
`),C=S!==-1,Y=t.inFlow??e.flow??e.items.length===0;if(C||!Y){let le=!1;if(C&&(T==="&"||T==="!")){let M=A.indexOf(" ");T==="&"&&M!==-1&&M<S&&A[M+1]==="!"&&(M=A.indexOf(" ",M+1)),(M===-1||S<M)&&(le=!0)}le||(E=`
|
|
45
|
+
${t.indent}`)}}else(A===""||A[0]===`
|
|
46
|
+
`)&&(E="");return p+=E+A,t.inFlow?N&&n&&n():k&&!N?p+=$e.lineComment(p,t.indent,u(k)):h&&i&&i(),p}a(Ol,"stringifyPair");$i.stringifyPair=Ol});var Os=y(Es=>{"use strict";var Di=Ze("process");function ql(s,...e){s==="debug"&&console.log(...e)}a(ql,"debug");function Tl(s,e){(s==="debug"||s==="warn")&&(typeof Di.emitWarning=="function"?Di.emitWarning(e):console.warn(e))}a(Tl,"warn");Es.debug=ql;Es.warn=Tl});var bt=y(yt=>{"use strict";var gt=O(),ji=L(),mt="<<",pt={identify:a(s=>s===mt||typeof s=="symbol"&&s.description===mt,"identify"),default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:a(()=>Object.assign(new ji.Scalar(Symbol(mt)),{addToJSMap:Ri}),"resolve"),stringify:a(()=>mt,"stringify")},Ll=a((s,e)=>(pt.identify(e)||gt.isScalar(e)&&(!e.type||e.type===ji.Scalar.PLAIN)&&pt.identify(e.value))&&s?.doc.schema.tags.some(t=>t.tag===pt.tag&&t.default),"isMergeKey");function Ri(s,e,t){let n=Bi(s,t);if(gt.isSeq(n))for(let i of n.items)qs(s,e,i);else if(Array.isArray(n))for(let i of n)qs(s,e,i);else qs(s,e,n)}a(Ri,"addMergeToJSMap");function qs(s,e,t){let n=Bi(s,t);if(!gt.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,s,Map);for(let[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}a(qs,"mergeValue");function Bi(s,e){return s&>.isAlias(e)?e.resolve(s.doc,s):e}a(Bi,"resolveAliasValue");yt.addMergeToJSMap=Ri;yt.isMergeKey=Ll;yt.merge=pt});var Ls=y(Ui=>{"use strict";var Cl=Os(),Fi=bt(),Ml=Ie(),Ki=O(),Ts=x();function Pl(s,e,{key:t,value:n}){if(Ki.isNode(t)&&t.addToJSMap)t.addToJSMap(s,e,n);else if(Fi.isMergeKey(s,t))Fi.addMergeToJSMap(s,e,n);else{let i=Ts.toJS(t,"",s);if(e instanceof Map)e.set(i,Ts.toJS(n,i,s));else if(e instanceof Set)e.add(i);else{let r=Il(t,i,s),o=Ts.toJS(n,r,s);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}a(Pl,"addPairToJSMap");function Il(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Ki.isNode(s)&&t?.doc){let n=Ml.createStringifyContext(t.doc,{});n.anchors=new Set;for(let r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),Cl.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}a(Il,"stringifyKey");Ui.addPairToJSMap=Pl});var G=y(Cs=>{"use strict";var Yi=Te(),$l=_i(),_l=Ls(),St=O();function Dl(s,e,t){let n=Yi.createNode(s,void 0,t),i=Yi.createNode(e,void 0,t);return new wt(n,i)}a(Dl,"createPair");var wt=class s{static{a(this,"Pair")}constructor(e,t=null){Object.defineProperty(this,St.NODE_TYPE,{value:St.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return St.isNode(t)&&(t=t.clone(e)),St.isNode(n)&&(n=n.clone(e)),new s(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return _l.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?$l.stringifyPair(this,e,t,n):JSON.stringify(this)}};Cs.Pair=wt;Cs.createPair=Dl});var Ms=y(Ji=>{"use strict";var te=O(),xi=Ie(),vt=Le();function jl(s,e,t){return(e.inFlow??s.flow?Bl:Rl)(s,e,t)}a(jl,"stringifyCollection");function Rl({comment:s,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){let{indent:c,options:{commentString:u}}=t,m=Object.assign({},t,{indent:r,type:null}),f=!1,d=[];for(let b=0;b<e.length;++b){let h=e[b],p=null;if(te.isNode(h))!f&&h.spaceBefore&&d.push(""),kt(t,d,h.commentBefore,f),h.comment&&(p=h.comment);else if(te.isPair(h)){let v=te.isNode(h.key)?h.key:null;v&&(!f&&v.spaceBefore&&d.push(""),kt(t,d,v.commentBefore,f))}f=!1;let w=xi.stringify(h,m,()=>p=null,()=>f=!0);p&&(w+=vt.lineComment(w,r,u(p))),f&&p&&(f=!1),d.push(n+w)}let g;if(d.length===0)g=i.start+i.end;else{g=d[0];for(let b=1;b<d.length;++b){let h=d[b];g+=h?`
|
|
47
|
+
${c}${h}`:`
|
|
48
|
+
`}}return s?(g+=`
|
|
49
|
+
`+vt.indentComment(u(s),c),l&&l()):f&&o&&o(),g}a(Rl,"stringifyBlockCollection");function Bl({items:s},e,{flowChars:t,itemIndent:n}){let{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:l}}=e;n+=r;let c=Object.assign({},e,{indent:n,inFlow:!0,type:null}),u=!1,m=0,f=[];for(let b=0;b<s.length;++b){let h=s[b],p=null;if(te.isNode(h))h.spaceBefore&&f.push(""),kt(e,f,h.commentBefore,!1),h.comment&&(p=h.comment);else if(te.isPair(h)){let v=te.isNode(h.key)?h.key:null;v&&(v.spaceBefore&&f.push(""),kt(e,f,v.commentBefore,!1),v.comment&&(u=!0));let k=te.isNode(h.value)?h.value:null;k?(k.comment&&(p=k.comment),k.commentBefore&&(u=!0)):h.value==null&&v?.comment&&(p=v.comment)}p&&(u=!0);let w=xi.stringify(h,c,()=>p=null);u||(u=f.length>m||w.includes(`
|
|
50
|
+
`)),b<s.length-1?w+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(u||(u=f.reduce((v,k)=>v+k.length+2,2)+(w.length+2)>e.options.lineWidth)),u&&(w+=",")),p&&(w+=vt.lineComment(w,n,l(p))),f.push(w),m=f.length}let{start:d,end:g}=t;if(f.length===0)return d+g;if(!u){let b=f.reduce((h,p)=>h+p.length+2,2);u=e.options.lineWidth>0&&b>e.options.lineWidth}if(u){let b=d;for(let h of f)b+=h?`
|
|
51
|
+
${r}${i}${h}`:`
|
|
52
|
+
`;return`${b}
|
|
53
|
+
${i}${g}`}else return`${d}${o}${f.join(" ")}${o}${g}`}a(Bl,"stringifyFlowCollection");function kt({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let r=vt.indentComment(e(n),s);t.push(r.trimStart())}}a(kt,"addCommentBefore");Ji.stringifyCollection=jl});var Q=y(Is=>{"use strict";var Fl=Ms(),Kl=Ls(),Ul=lt(),H=O(),Nt=G(),Yl=L();function _e(s,e){let t=H.isScalar(e)?e.value:e;for(let n of s)if(H.isPair(n)&&(n.key===e||n.key===t||H.isScalar(n.key)&&n.key.value===t))return n}a(_e,"findPair");var Ps=class extends Ul.Collection{static{a(this,"YAMLMap")}static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(H.MAP,e),this.items=[]}static from(e,t,n){let{keepUndefined:i,replacer:r}=n,o=new this(e),l=a((c,u)=>{if(typeof r=="function")u=r.call(t,c,u);else if(Array.isArray(r)&&!r.includes(c))return;(u!==void 0||i)&&o.items.push(Nt.createPair(c,u,n))},"add");if(t instanceof Map)for(let[c,u]of t)l(c,u);else if(t&&typeof t=="object")for(let c of Object.keys(t))l(c,t[c]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;H.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Nt.Pair(e,e?.value):n=new Nt.Pair(e.key,e.value);let i=_e(this.items,n.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);H.isScalar(i.value)&&Yl.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(r){let o=this.items.findIndex(l=>r(n,l)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let t=_e(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let i=_e(this.items,e)?.value;return(!t&&H.isScalar(i)?i.value:i)??void 0}has(e){return!!_e(this.items,e)}set(e,t){this.add(new Nt.Pair(e,t),!0)}toJSON(e,t,n){let i=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let r of this.items)Kl.addPairToJSMap(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!H.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Fl.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}};Is.YAMLMap=Ps;Is.findPair=_e});var he=y(Wi=>{"use strict";var xl=O(),Vi=Q(),Jl={collection:"map",default:!0,nodeClass:Vi.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(s,e){return xl.isMap(s)||e("Expected a mapping for this tag"),s},createNode:a((s,e,t)=>Vi.YAMLMap.from(s,e,t),"createNode")};Wi.map=Jl});var X=y(Gi=>{"use strict";var Vl=Te(),Wl=Ms(),Gl=lt(),Et=O(),Hl=L(),Ql=x(),$s=class extends Gl.Collection{static{a(this,"YAMLSeq")}static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Et.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=At(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let n=At(e);if(typeof n!="number")return;let i=this.items[n];return!t&&Et.isScalar(i)?i.value:i}has(e){let t=At(e);return typeof t=="number"&&t<this.items.length}set(e,t){let n=At(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];Et.isScalar(i)&&Hl.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let i=0;for(let r of this.items)n.push(Ql.toJS(r,String(i++),t));return n}toString(e,t,n){return e?Wl.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let l of t){if(typeof i=="function"){let c=t instanceof Set?l:String(o++);l=i.call(t,c,l)}r.items.push(Vl.createNode(l,void 0,n))}}return r}};function At(s){let e=Et.isScalar(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}a(At,"asItemIndex");Gi.YAMLSeq=$s});var me=y(Qi=>{"use strict";var Xl=O(),Hi=X(),zl={collection:"seq",default:!0,nodeClass:Hi.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(s,e){return Xl.isSeq(s)||e("Expected a sequence for this tag"),s},createNode:a((s,e,t)=>Hi.YAMLSeq.from(s,e,t),"createNode")};Qi.seq=zl});var De=y(Xi=>{"use strict";var Zl=Pe(),ec={identify:a(s=>typeof s=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:a(s=>s,"resolve"),stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),Zl.stringifyString(s,e,t,n)}};Xi.string=ec});var Ot=y(er=>{"use strict";var zi=L(),Zi={identify:a(s=>s==null,"identify"),createNode:a(()=>new zi.Scalar(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:a(()=>new zi.Scalar(null),"resolve"),stringify:a(({source:s},e)=>typeof s=="string"&&Zi.test.test(s)?s:e.options.nullStr,"stringify")};er.nullTag=Zi});var _s=y(sr=>{"use strict";var tc=L(),tr={identify:a(s=>typeof s=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:a(s=>new tc.Scalar(s[0]==="t"||s[0]==="T"),"resolve"),stringify({source:s,value:e},t){if(s&&tr.test.test(s)){let n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};sr.boolTag=tr});var pe=y(nr=>{"use strict";function sc({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(n,-0)?"-0":JSON.stringify(n);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(r)&&!r.includes("e")){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let l=e-(r.length-o-1);for(;l-- >0;)r+="0"}return r}a(sc,"stringifyNumber");nr.stringifyNumber=sc});var js=y(qt=>{"use strict";var nc=L(),Ds=pe(),ic={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:a(s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:Ds.stringifyNumber},rc={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:a(s=>parseFloat(s),"resolve"),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():Ds.stringifyNumber(s)}},oc={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){let e=new nc.Scalar(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:Ds.stringifyNumber};qt.float=oc;qt.floatExp=rc;qt.floatNaN=ic});var Bs=y(Lt=>{"use strict";var ir=pe(),Tt=a(s=>typeof s=="bigint"||Number.isInteger(s),"intIdentify"),Rs=a((s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t),"intResolve");function rr(s,e,t){let{value:n}=s;return Tt(n)&&n>=0?t+n.toString(e):ir.stringifyNumber(s)}a(rr,"intStringify");var ac={identify:a(s=>Tt(s)&&s>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:a((s,e,t)=>Rs(s,2,8,t),"resolve"),stringify:a(s=>rr(s,8,"0o"),"stringify")},lc={identify:Tt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:a((s,e,t)=>Rs(s,0,10,t),"resolve"),stringify:ir.stringifyNumber},cc={identify:a(s=>Tt(s)&&s>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:a((s,e,t)=>Rs(s,2,16,t),"resolve"),stringify:a(s=>rr(s,16,"0x"),"stringify")};Lt.int=lc;Lt.intHex=cc;Lt.intOct=ac});var ar=y(or=>{"use strict";var uc=he(),fc=Ot(),dc=me(),hc=De(),mc=_s(),Fs=js(),Ks=Bs(),pc=[uc.map,dc.seq,hc.string,fc.nullTag,mc.boolTag,Ks.intOct,Ks.int,Ks.intHex,Fs.floatNaN,Fs.floatExp,Fs.float];or.schema=pc});var ur=y(cr=>{"use strict";var gc=L(),yc=he(),bc=me();function lr(s){return typeof s=="bigint"||Number.isInteger(s)}a(lr,"intIdentify");var Ct=a(({value:s})=>JSON.stringify(s),"stringifyJSON"),Sc=[{identify:a(s=>typeof s=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:a(s=>s,"resolve"),stringify:Ct},{identify:a(s=>s==null,"identify"),createNode:a(()=>new gc.Scalar(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:a(()=>null,"resolve"),stringify:Ct},{identify:a(s=>typeof s=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:a(s=>s==="true","resolve"),stringify:Ct},{identify:lr,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:a((s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),"resolve"),stringify:a(({value:s})=>lr(s)?s.toString():JSON.stringify(s),"stringify")},{identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:a(s=>parseFloat(s),"resolve"),stringify:Ct}],wc={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},vc=[yc.map,bc.seq].concat(Sc,wc);cr.schema=vc});var Ys=y(fr=>{"use strict";var je=Ze("buffer"),Us=L(),kc=Pe(),Nc={identify:a(s=>s instanceof Uint8Array,"identify"),default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof je.Buffer=="function")return je.Buffer.from(s,"base64");if(typeof atob=="function"){let t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},n,i,r){if(!t)return"";let o=t,l;if(typeof je.Buffer=="function")l=o instanceof je.Buffer?o.toString("base64"):je.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let u=0;u<o.length;++u)c+=String.fromCharCode(o[u]);l=btoa(c)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=Us.Scalar.BLOCK_LITERAL),e!==Us.Scalar.QUOTE_DOUBLE){let c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),u=Math.ceil(l.length/c),m=new Array(u);for(let f=0,d=0;f<u;++f,d+=c)m[f]=l.substr(d,c);l=m.join(e===Us.Scalar.BLOCK_LITERAL?`
|
|
54
|
+
`:" ")}return kc.stringifyString({comment:s,type:e,value:l},n,i,r)}};fr.binary=Nc});var It=y(Pt=>{"use strict";var Mt=O(),xs=G(),Ac=L(),Ec=X();function dr(s,e){if(Mt.isSeq(s))for(let t=0;t<s.items.length;++t){let n=s.items[t];if(!Mt.isPair(n)){if(Mt.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new xs.Pair(new Ac.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
|
|
55
|
+
${i.key.commentBefore}`:n.commentBefore),n.comment){let r=i.value??i.key;r.comment=r.comment?`${n.comment}
|
|
56
|
+
${r.comment}`:n.comment}n=i}s.items[t]=Mt.isPair(n)?n:new xs.Pair(n)}}else e("Expected a sequence for this tag");return s}a(dr,"resolvePairs");function hr(s,e,t){let{replacer:n}=t,i=new Ec.YAMLSeq(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(r++),o));let l,c;if(Array.isArray(o))if(o.length===2)l=o[0],c=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let u=Object.keys(o);if(u.length===1)l=u[0],c=o[l];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else l=o;i.items.push(xs.createPair(l,c,t))}return i}a(hr,"createPairs");var Oc={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:dr,createNode:hr};Pt.createPairs=hr;Pt.pairs=Oc;Pt.resolvePairs=dr});var Ws=y(Vs=>{"use strict";var mr=O(),Js=x(),Re=Q(),qc=X(),pr=It(),se=class s extends qc.YAMLSeq{static{a(this,"YAMLOMap")}constructor(){super(),this.add=Re.YAMLMap.prototype.add.bind(this),this.delete=Re.YAMLMap.prototype.delete.bind(this),this.get=Re.YAMLMap.prototype.get.bind(this),this.has=Re.YAMLMap.prototype.has.bind(this),this.set=Re.YAMLMap.prototype.set.bind(this),this.tag=s.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let i of this.items){let r,o;if(mr.isPair(i)?(r=Js.toJS(i.key,"",t),o=Js.toJS(i.value,r,t)):r=Js.toJS(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){let i=pr.createPairs(e,t,n),r=new this;return r.items=i.items,r}};se.tag="tag:yaml.org,2002:omap";var Tc={collection:"seq",identify:a(s=>s instanceof Map,"identify"),nodeClass:se,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=pr.resolvePairs(s,e),n=[];for(let{key:i}of t.items)mr.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new se,t)},createNode:a((s,e,t)=>se.from(s,e,t),"createNode")};Vs.YAMLOMap=se;Vs.omap=Tc});var wr=y(Gs=>{"use strict";var gr=L();function yr({value:s,source:e},t){return e&&(s?br:Sr).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}a(yr,"boolStringify");var br={identify:a(s=>s===!0,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:a(()=>new gr.Scalar(!0),"resolve"),stringify:yr},Sr={identify:a(s=>s===!1,"identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:a(()=>new gr.Scalar(!1),"resolve"),stringify:yr};Gs.falseTag=Sr;Gs.trueTag=br});var vr=y($t=>{"use strict";var Lc=L(),Hs=pe(),Cc={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:a(s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:Hs.stringifyNumber},Mc={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:a(s=>parseFloat(s.replace(/_/g,"")),"resolve"),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():Hs.stringifyNumber(s)}},Pc={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let e=new Lc.Scalar(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){let n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:Hs.stringifyNumber};$t.float=Pc;$t.floatExp=Mc;$t.floatNaN=Cc});var Nr=y(Fe=>{"use strict";var kr=pe(),Be=a(s=>typeof s=="bigint"||Number.isInteger(s),"intIdentify");function _t(s,e,t,{intAsBigInt:n}){let i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let o=BigInt(s);return i==="-"?BigInt(-1)*o:o}let r=parseInt(s,t);return i==="-"?-1*r:r}a(_t,"intResolve");function Qs(s,e,t){let{value:n}=s;if(Be(n)){let i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return kr.stringifyNumber(s)}a(Qs,"intStringify");var Ic={identify:Be,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:a((s,e,t)=>_t(s,2,2,t),"resolve"),stringify:a(s=>Qs(s,2,"0b"),"stringify")},$c={identify:Be,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:a((s,e,t)=>_t(s,1,8,t),"resolve"),stringify:a(s=>Qs(s,8,"0"),"stringify")},_c={identify:Be,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:a((s,e,t)=>_t(s,0,10,t),"resolve"),stringify:kr.stringifyNumber},Dc={identify:Be,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:a((s,e,t)=>_t(s,2,16,t),"resolve"),stringify:a(s=>Qs(s,16,"0x"),"stringify")};Fe.int=_c;Fe.intBin=Ic;Fe.intHex=Dc;Fe.intOct=$c});var zs=y(Xs=>{"use strict";var Rt=O(),Dt=G(),jt=Q(),ne=class s extends jt.YAMLMap{static{a(this,"YAMLSet")}constructor(e){super(e),this.tag=s.tag}add(e){let t;Rt.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Dt.Pair(e.key,null):t=new Dt.Pair(e,null),jt.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let n=jt.findPair(this.items,e);return!t&&Rt.isPair(n)?Rt.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=jt.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Dt.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(Dt.createPair(o,null,n));return r}};ne.tag="tag:yaml.org,2002:set";var jc={collection:"map",identify:a(s=>s instanceof Set,"identify"),nodeClass:ne,default:!1,tag:"tag:yaml.org,2002:set",createNode:a((s,e,t)=>ne.from(s,e,t),"createNode"),resolve(s,e){if(Rt.isMap(s)){if(s.hasAllNullValues(!0))return Object.assign(new ne,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};Xs.YAMLSet=ne;Xs.set=jc});var en=y(Bt=>{"use strict";var Rc=pe();function Zs(s,e){let t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=a(o=>e?BigInt(o):Number(o),"num"),r=n.replace(/_/g,"").split(":").reduce((o,l)=>o*i(60)+i(l),i(0));return t==="-"?i(-1)*r:r}a(Zs,"parseSexagesimal");function Ar(s){let{value:e}=s,t=a(o=>o,"num");if(typeof e=="bigint")t=a(o=>BigInt(o),"num");else if(isNaN(e)||!isFinite(e))return Rc.stringifyNumber(s);let n="";e<0&&(n="-",e*=t(-1));let i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}a(Ar,"stringifySexagesimal");var Bc={identify:a(s=>typeof s=="bigint"||Number.isInteger(s),"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:a((s,e,{intAsBigInt:t})=>Zs(s,t),"resolve"),stringify:Ar},Fc={identify:a(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:a(s=>Zs(s,!1),"resolve"),stringify:Ar},Er={identify:a(s=>s instanceof Date,"identify"),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(s){let e=s.match(Er.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,i,r,o,l]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,u=Date.UTC(t,n-1,i,r||0,o||0,l||0,c),m=e[8];if(m&&m!=="Z"){let f=Zs(m,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:a(({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??"","stringify")};Bt.floatTime=Fc;Bt.intTime=Bc;Bt.timestamp=Er});var Tr=y(qr=>{"use strict";var Kc=he(),Uc=Ot(),Yc=me(),xc=De(),Jc=Ys(),Or=wr(),tn=vr(),Ft=Nr(),Vc=bt(),Wc=Ws(),Gc=It(),Hc=zs(),sn=en(),Qc=[Kc.map,Yc.seq,xc.string,Uc.nullTag,Or.trueTag,Or.falseTag,Ft.intBin,Ft.intOct,Ft.int,Ft.intHex,tn.floatNaN,tn.floatExp,tn.float,Jc.binary,Vc.merge,Wc.omap,Gc.pairs,Hc.set,sn.intTime,sn.floatTime,sn.timestamp];qr.schema=Qc});var Rr=y(on=>{"use strict";var Pr=he(),Xc=Ot(),Ir=me(),zc=De(),Zc=_s(),nn=js(),rn=Bs(),eu=ar(),tu=ur(),$r=Ys(),Ke=bt(),_r=Ws(),Dr=It(),Lr=Tr(),jr=zs(),Kt=en(),Cr=new Map([["core",eu.schema],["failsafe",[Pr.map,Ir.seq,zc.string]],["json",tu.schema],["yaml11",Lr.schema],["yaml-1.1",Lr.schema]]),Mr={binary:$r.binary,bool:Zc.boolTag,float:nn.float,floatExp:nn.floatExp,floatNaN:nn.floatNaN,floatTime:Kt.floatTime,int:rn.int,intHex:rn.intHex,intOct:rn.intOct,intTime:Kt.intTime,map:Pr.map,merge:Ke.merge,null:Xc.nullTag,omap:_r.omap,pairs:Dr.pairs,seq:Ir.seq,set:jr.set,timestamp:Kt.timestamp},su={"tag:yaml.org,2002:binary":$r.binary,"tag:yaml.org,2002:merge":Ke.merge,"tag:yaml.org,2002:omap":_r.omap,"tag:yaml.org,2002:pairs":Dr.pairs,"tag:yaml.org,2002:set":jr.set,"tag:yaml.org,2002:timestamp":Kt.timestamp};function nu(s,e,t){let n=Cr.get(e);if(n&&!s)return t&&!n.includes(Ke.merge)?n.concat(Ke.merge):n.slice();let i=n;if(!i)if(Array.isArray(s))i=[];else{let r=Array.from(Cr.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(s))for(let r of s)i=i.concat(r);else typeof s=="function"&&(i=s(i.slice()));return t&&(i=i.concat(Ke.merge)),i.reduce((r,o)=>{let l=typeof o=="string"?Mr[o]:o;if(!l){let c=JSON.stringify(o),u=Object.keys(Mr).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return r.includes(l)||r.push(l),r},[])}a(nu,"getTags");on.coreKnownTags=su;on.getTags=nu});var cn=y(Br=>{"use strict";var an=O(),iu=he(),ru=me(),ou=De(),Ut=Rr(),au=a((s,e)=>s.key<e.key?-1:s.key>e.key?1:0,"sortMapEntriesByKey"),ln=class s{static{a(this,"Schema")}constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:l}){this.compat=Array.isArray(e)?Ut.getTags(e,"compat"):e?Ut.getTags(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?Ut.coreKnownTags:{},this.tags=Ut.getTags(t,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,an.MAP,{value:iu.map}),Object.defineProperty(this,an.SCALAR,{value:ou.string}),Object.defineProperty(this,an.SEQ,{value:ru.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?au:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Br.Schema=ln});var Kr=y(Fr=>{"use strict";var lu=O(),un=Ie(),Ue=Le();function cu(s,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&s.directives){let c=s.directives.toString(s);c?(t.push(c),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");let i=un.createStringifyContext(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");let c=r(s.commentBefore);t.unshift(Ue.indentComment(c,""))}let o=!1,l=null;if(s.contents){if(lu.isNode(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){let m=r(s.contents.commentBefore);t.push(Ue.indentComment(m,""))}i.forceBlockIndent=!!s.comment,l=s.contents.comment}let c=l?void 0:()=>o=!0,u=un.stringify(s.contents,i,()=>l=null,c);l&&(u+=Ue.lineComment(u,"",r(l))),(u[0]==="|"||u[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${u}`:t.push(u)}else t.push(un.stringify(s.contents,i));if(s.directives?.docEnd)if(s.comment){let c=r(s.comment);c.includes(`
|
|
57
|
+
`)?(t.push("..."),t.push(Ue.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=s.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||l)&&t[t.length-1]!==""&&t.push(""),t.push(Ue.indentComment(r(c),"")))}return t.join(`
|
|
58
|
+
`)+`
|
|
59
|
+
`}a(cu,"stringifyDocument");Fr.stringifyDocument=cu});var Ye=y(Ur=>{"use strict";var uu=qe(),ge=lt(),D=O(),fu=G(),du=x(),hu=cn(),mu=Kr(),fn=it(),pu=ms(),gu=Te(),dn=hs(),hn=class s{static{a(this,"Document")}constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,D.NODE_TYPE,{value:D.DOC});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);let r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new dn.Directives({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(s.prototype,{[D.NODE_TYPE]:{value:D.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=D.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ye(this.contents)&&this.contents.add(e)}addIn(e,t){ye(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=fn.anchorNames(this);e.anchor=!t||n.has(t)?fn.findNewAnchor(t||"a",n):t}return new uu.Alias(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){let p=a(v=>typeof v=="number"||v instanceof String||v instanceof Number,"keyToStr"),w=t.filter(p).map(String);w.length>0&&(t=t.concat(w)),i=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:l,keepUndefined:c,onTagObj:u,tag:m}=n??{},{onAnchor:f,setAnchors:d,sourceObjects:g}=fn.createNodeAnchors(this,o||"a"),b={aliasDuplicateObjects:r??!0,keepUndefined:c??!1,onAnchor:f,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:g},h=gu.createNode(e,m,b);return l&&D.isCollection(h)&&(h.flow=!0),d(),h}createPair(e,t,n={}){let i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new fu.Pair(i,r)}delete(e){return ye(this.contents)?this.contents.delete(e):!1}deleteIn(e){return ge.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):ye(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return D.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return ge.isEmptyPath(e)?!t&&D.isScalar(this.contents)?this.contents.value:this.contents:D.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return D.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return ge.isEmptyPath(e)?this.contents!==void 0:D.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=ge.collectionFromPath(this.schema,[e],t):ye(this.contents)&&this.contents.set(e,t)}setIn(e,t){ge.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=ge.collectionFromPath(this.schema,Array.from(e),t):ye(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new dn.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new dn.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new hu.Schema(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){let l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},c=du.toJS(this.contents,t??"",l);if(typeof r=="function")for(let{count:u,res:m}of l.anchors.values())r(m,u);return typeof o=="function"?pu.applyReviver(o,{"":c},"",c):c}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return mu.stringifyDocument(this,e)}};function ye(s){if(D.isCollection(s))return!0;throw new Error("Expected a YAML collection as document contents")}a(ye,"assertCollection");Ur.Document=hn});var Ve=y(Je=>{"use strict";var xe=class extends Error{static{a(this,"YAMLError")}constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}},mn=class extends xe{static{a(this,"YAMLParseError")}constructor(e,t,n){super("YAMLParseError",e,t,n)}},pn=class extends xe{static{a(this,"YAMLWarning")}constructor(e,t,n){super("YAMLWarning",e,t,n)}},yu=a((s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(l=>e.linePos(l));let{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,o=s.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let l=Math.min(r-39,o.length-79);o="\u2026"+o.substring(l),r-=l-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(o.substring(0,r))){let l=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`\u2026
|
|
60
|
+
`),o=l+o}if(/[^ ]/.test(o)){let l=1,c=t.linePos[1];c?.line===n&&c.col>i&&(l=Math.max(1,Math.min(c.col-i,80-r)));let u=" ".repeat(r)+"^".repeat(l);t.message+=`:
|
|
61
|
+
|
|
62
|
+
${o}
|
|
63
|
+
${u}
|
|
64
|
+
`}},"prettifyError");Je.YAMLError=xe;Je.YAMLParseError=mn;Je.YAMLWarning=pn;Je.prettifyError=yu});var We=y(Yr=>{"use strict";function bu(s,{flow:e,indicator:t,next:n,offset:i,onError:r,parentIndent:o,startOnNewline:l}){let c=!1,u=l,m=l,f="",d="",g=!1,b=!1,h=null,p=null,w=null,v=null,k=null,N=null,A=null;for(let S of s)switch(b&&(S.type!=="space"&&S.type!=="newline"&&S.type!=="comma"&&r(S.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),b=!1),h&&(u&&S.type!=="comment"&&S.type!=="newline"&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),S.type){case"space":!e&&(t!=="doc-start"||n?.type!=="flow-collection")&&S.source.includes(" ")&&(h=S),m=!0;break;case"comment":{m||r(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=S.source.substring(1)||" ";f?f+=d+C:f=C,d="",u=!1;break}case"newline":u?f?f+=S.source:(!N||t!=="seq-item-ind")&&(c=!0):d+=S.source,u=!0,g=!0,(p||w)&&(v=S),m=!0;break;case"anchor":p&&r(S,"MULTIPLE_ANCHORS","A node can have at most one anchor"),S.source.endsWith(":")&&r(S.offset+S.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),p=S,A??(A=S.offset),u=!1,m=!1,b=!0;break;case"tag":{w&&r(S,"MULTIPLE_TAGS","A node can have at most one tag"),w=S,A??(A=S.offset),u=!1,m=!1,b=!0;break}case t:(p||w)&&r(S,"BAD_PROP_ORDER",`Anchors and tags must be after the ${S.source} indicator`),N&&r(S,"UNEXPECTED_TOKEN",`Unexpected ${S.source} in ${e??"collection"}`),N=S,u=t==="seq-item-ind"||t==="explicit-key-ind",m=!1;break;case"comma":if(e){k&&r(S,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),k=S,u=!1,m=!1;break}default:r(S,"UNEXPECTED_TOKEN",`Unexpected ${S.type} token`),u=!1,m=!1}let E=s[s.length-1],T=E?E.offset+E.source.length:i;return b&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(u&&h.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:k,found:N,spaceBefore:c,comment:f,hasNewline:g,anchor:p,tag:w,newlineAfterProp:v,end:T,start:A??T}}a(bu,"resolveProps");Yr.resolveProps=bu});var Yt=y(xr=>{"use strict";function gn(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
|
|
65
|
+
`))return!0;if(s.end){for(let e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of s.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(gn(e.key)||gn(e.value))return!0}return!1;default:return!0}}a(gn,"containsNewline");xr.containsNewline=gn});var yn=y(Jr=>{"use strict";var Su=Yt();function wu(s,e,t){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&Su.containsNewline(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}a(wu,"flowIndentCheck");Jr.flowIndentCheck=wu});var bn=y(Wr=>{"use strict";var Vr=O();function vu(s,e,t){let{uniqueKeys:n}=s.options;if(n===!1)return!1;let i=typeof n=="function"?n:(r,o)=>r===o||Vr.isScalar(r)&&Vr.isScalar(o)&&r.value===o.value;return e.some(r=>i(r.key,t))}a(vu,"mapIncludes");Wr.mapIncludes=vu});var Zr=y(zr=>{"use strict";var Gr=G(),ku=Q(),Hr=We(),Nu=Yt(),Qr=yn(),Au=bn(),Xr="All mapping items must start at the same column";function Eu({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??ku.YAMLMap,l=new o(t.schema);t.atRoot&&(t.atRoot=!1);let c=n.offset,u=null;for(let m of n.items){let{start:f,key:d,sep:g,value:b}=m,h=Hr.resolveProps(f,{indicator:"explicit-key-ind",next:d??g?.[0],offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0}),p=!h.found;if(p){if(d&&(d.type==="block-seq"?i(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&i(c,"BAD_INDENT",Xr)),!h.anchor&&!h.tag&&!g){u=h.end,h.comment&&(l.comment?l.comment+=`
|
|
66
|
+
`+h.comment:l.comment=h.comment);continue}(h.newlineAfterProp||Nu.containsNewline(d))&&i(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==n.indent&&i(c,"BAD_INDENT",Xr);t.atKey=!0;let w=h.end,v=d?s(t,d,h,i):e(t,w,f,null,h,i);t.schema.compat&&Qr.flowIndentCheck(n.indent,d,i),t.atKey=!1,Au.mapIncludes(t,l.items,v)&&i(w,"DUPLICATE_KEY","Map keys must be unique");let k=Hr.resolveProps(g??[],{indicator:"map-value-ind",next:b,offset:v.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||d.type==="block-scalar"});if(c=k.end,k.found){p&&(b?.type==="block-map"&&!k.hasNewline&&i(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<k.found.offset-1024&&i(v.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let N=b?s(t,b,k,i):e(t,c,g,null,k,i);t.schema.compat&&Qr.flowIndentCheck(n.indent,b,i),c=N.range[2];let A=new Gr.Pair(v,N);t.options.keepSourceTokens&&(A.srcToken=m),l.items.push(A)}else{p&&i(v.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),k.comment&&(v.comment?v.comment+=`
|
|
67
|
+
`+k.comment:v.comment=k.comment);let N=new Gr.Pair(v);t.options.keepSourceTokens&&(N.srcToken=m),l.items.push(N)}}return u&&u<c&&i(u,"IMPOSSIBLE","Map comment with trailing content"),l.range=[n.offset,c,u??c],l}a(Eu,"resolveBlockMap");zr.resolveBlockMap=Eu});var to=y(eo=>{"use strict";var Ou=X(),qu=We(),Tu=yn();function Lu({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??Ou.YAMLSeq,l=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let c=n.offset,u=null;for(let{start:m,value:f}of n.items){let d=qu.resolveProps(m,{indicator:"seq-item-ind",next:f,offset:c,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f?.type==="block-seq"?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(c,"MISSING_CHAR","Sequence item without - indicator");else{u=d.end,d.comment&&(l.comment=d.comment);continue}let g=f?s(t,f,d,i):e(t,d.end,m,null,d,i);t.schema.compat&&Tu.flowIndentCheck(n.indent,f,i),c=g.range[2],l.items.push(g)}return l.range=[n.offset,c,u??c],l}a(Lu,"resolveBlockSeq");eo.resolveBlockSeq=Lu});var be=y(so=>{"use strict";function Cu(s,e,t,n){let i="";if(s){let r=!1,o="";for(let l of s){let{source:c,type:u}=l;switch(u){case"space":r=!0;break;case"comment":{t&&!r&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let m=c.substring(1)||" ";i?i+=o+m:i=m,o="";break}case"newline":i&&(o+=c),r=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=c.length}}return{comment:i,offset:e}}a(Cu,"resolveEnd");so.resolveEnd=Cu});var oo=y(ro=>{"use strict";var Mu=O(),Pu=G(),no=Q(),Iu=X(),$u=be(),io=We(),_u=Yt(),Du=bn(),Sn="Block collections are not allowed within flow collections",wn=a(s=>s&&(s.type==="block-map"||s.type==="block-seq"),"isBlock");function ju({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=n.start.source==="{",l=o?"flow map":"flow sequence",c=r?.nodeClass??(o?no.YAMLMap:Iu.YAMLSeq),u=new c(t.schema);u.flow=!0;let m=t.atRoot;m&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=n.offset+n.start.source.length;for(let p=0;p<n.items.length;++p){let w=n.items[p],{start:v,key:k,sep:N,value:A}=w,E=io.resolveProps(v,{flow:l,indicator:"explicit-key-ind",next:k??N?.[0],offset:f,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!N&&!A){p===0&&E.comma?i(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):p<n.items.length-1&&i(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),E.comment&&(u.comment?u.comment+=`
|
|
68
|
+
`+E.comment:u.comment=E.comment),f=E.end;continue}!o&&t.options.strict&&_u.containsNewline(k)&&i(k,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(p===0)E.comma&&i(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(E.comma||i(E.start,"MISSING_CHAR",`Missing , between ${l} items`),E.comment){let T="";e:for(let S of v)switch(S.type){case"comma":case"space":break;case"comment":T=S.source.substring(1);break e;default:break e}if(T){let S=u.items[u.items.length-1];Mu.isPair(S)&&(S=S.value??S.key),S.comment?S.comment+=`
|
|
69
|
+
`+T:S.comment=T,E.comment=E.comment.substring(T.length+1)}}if(!o&&!N&&!E.found){let T=A?s(t,A,E,i):e(t,E.end,N,null,E,i);u.items.push(T),f=T.range[2],wn(A)&&i(T.range,"BLOCK_IN_FLOW",Sn)}else{t.atKey=!0;let T=E.end,S=k?s(t,k,E,i):e(t,T,v,null,E,i);wn(k)&&i(S.range,"BLOCK_IN_FLOW",Sn),t.atKey=!1;let C=io.resolveProps(N??[],{flow:l,indicator:"map-value-ind",next:A,offset:S.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(C.found){if(!o&&!E.found&&t.options.strict){if(N)for(let M of N){if(M===C.found)break;if(M.type==="newline"){i(M,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<C.found.offset-1024&&i(C.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else A&&("source"in A&&A.source?.[0]===":"?i(A,"MISSING_CHAR",`Missing space after : in ${l}`):i(C.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let Y=A?s(t,A,C,i):C.found?e(t,C.end,N,null,C,i):null;Y?wn(A)&&i(Y.range,"BLOCK_IN_FLOW",Sn):C.comment&&(S.comment?S.comment+=`
|
|
70
|
+
`+C.comment:S.comment=C.comment);let le=new Pu.Pair(S,Y);if(t.options.keepSourceTokens&&(le.srcToken=w),o){let M=u;Du.mapIncludes(t,M.items,S)&&i(T,"DUPLICATE_KEY","Map keys must be unique"),M.items.push(le)}else{let M=new no.YAMLMap(t.schema);M.flow=!0,M.items.push(le);let Qn=(Y??S).range;M.range=[S.range[0],Qn[1],Qn[2]],u.items.push(M)}f=Y?Y.range[2]:C.end}}let d=o?"}":"]",[g,...b]=n.end,h=f;if(g?.source===d)h=g.offset+g.source.length;else{let p=l[0].toUpperCase()+l.substring(1),w=m?`${p} must end with a ${d}`:`${p} in block collection must be sufficiently indented and end with a ${d}`;i(f,m?"MISSING_CHAR":"BAD_INDENT",w),g&&g.source.length!==1&&b.unshift(g)}if(b.length>0){let p=$u.resolveEnd(b,h,t.options.strict,i);p.comment&&(u.comment?u.comment+=`
|
|
71
|
+
`+p.comment:u.comment=p.comment),u.range=[n.offset,h,p.offset]}else u.range=[n.offset,h,h];return u}a(ju,"resolveFlowCollection");ro.resolveFlowCollection=ju});var lo=y(ao=>{"use strict";var Ru=O(),Bu=L(),Fu=Q(),Ku=X(),Uu=Zr(),Yu=to(),xu=oo();function vn(s,e,t,n,i,r){let o=t.type==="block-map"?Uu.resolveBlockMap(s,e,t,n,r):t.type==="block-seq"?Yu.resolveBlockSeq(s,e,t,n,r):xu.resolveFlowCollection(s,e,t,n,r),l=o.constructor;return i==="!"||i===l.tagName?(o.tag=l.tagName,o):(i&&(o.tag=i),o)}a(vn,"resolveCollection");function Ju(s,e,t,n,i){let r=n.tag,o=r?e.directives.tagName(r.source,d=>i(r,"TAG_RESOLVE_FAILED",d)):null;if(t.type==="block-seq"){let{anchor:d,newlineAfterProp:g}=n,b=d&&r?d.offset>r.offset?d:r:d??r;b&&(!g||g.offset<b.offset)&&i(b,"MISSING_CHAR","Missing newline after block sequence props")}let l=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===Fu.YAMLMap.tagName&&l==="map"||o===Ku.YAMLSeq.tagName&&l==="seq")return vn(s,e,t,i,o);let c=e.schema.tags.find(d=>d.tag===o&&d.collection===l);if(!c){let d=e.schema.knownTags[o];if(d?.collection===l)e.schema.tags.push(Object.assign({},d,{default:!1})),c=d;else return d?i(r,"BAD_COLLECTION_TYPE",`${d.tag} used for ${l} collection, but expects ${d.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),vn(s,e,t,i,o)}let u=vn(s,e,t,i,o,c),m=c.resolve?.(u,d=>i(r,"TAG_RESOLVE_FAILED",d),e.options)??u,f=Ru.isNode(m)?m:new Bu.Scalar(m);return f.range=u.range,f.tag=o,c?.format&&(f.format=c.format),f}a(Ju,"composeCollection");ao.composeCollection=Ju});var Nn=y(co=>{"use strict";var kn=L();function Vu(s,e,t){let n=e.offset,i=Wu(e,s.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let r=i.mode===">"?kn.Scalar.BLOCK_FOLDED:kn.Scalar.BLOCK_LITERAL,o=e.source?Gu(e.source):[],l=o.length;for(let h=o.length-1;h>=0;--h){let p=o[h][1];if(p===""||p==="\r")l=h;else break}if(l===0){let h=i.chomp==="+"&&o.length>0?`
|
|
72
|
+
`.repeat(Math.max(1,o.length-1)):"",p=n+i.length;return e.source&&(p+=e.source.length),{value:h,type:r,comment:i.comment,range:[n,p,p]}}let c=e.indent+i.indent,u=e.offset+i.length,m=0;for(let h=0;h<l;++h){let[p,w]=o[h];if(w===""||w==="\r")i.indent===0&&p.length>c&&(c=p.length);else{p.length<c&&t(u+p.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(c=p.length),m=h,c===0&&!s.atRoot&&t(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=p.length+w.length+1}for(let h=o.length-1;h>=l;--h)o[h][0].length>c&&(l=h+1);let f="",d="",g=!1;for(let h=0;h<m;++h)f+=o[h][0].slice(c)+`
|
|
73
|
+
`;for(let h=m;h<l;++h){let[p,w]=o[h];u+=p.length+w.length+1;let v=w[w.length-1]==="\r";if(v&&(w=w.slice(0,-1)),w&&p.length<c){let N=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(u-w.length-(v?2:1),"BAD_INDENT",N),p=""}r===kn.Scalar.BLOCK_LITERAL?(f+=d+p.slice(c)+w,d=`
|
|
74
|
+
`):p.length>c||w[0]===" "?(d===" "?d=`
|
|
75
|
+
`:!g&&d===`
|
|
76
|
+
`&&(d=`
|
|
77
|
+
|
|
78
|
+
`),f+=d+p.slice(c)+w,d=`
|
|
79
|
+
`,g=!0):w===""?d===`
|
|
80
|
+
`?f+=`
|
|
81
|
+
`:d=`
|
|
82
|
+
`:(f+=d+w,d=" ",g=!1)}switch(i.chomp){case"-":break;case"+":for(let h=l;h<o.length;++h)f+=`
|
|
83
|
+
`+o[h][0].slice(c);f[f.length-1]!==`
|
|
84
|
+
`&&(f+=`
|
|
85
|
+
`);break;default:f+=`
|
|
86
|
+
`}let b=n+i.length+e.source.length;return{value:f,type:r,comment:i.comment,range:[n,b,b]}}a(Vu,"resolveBlockScalar");function Wu({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],r=i[0],o=0,l="",c=-1;for(let d=1;d<i.length;++d){let g=i[d];if(!l&&(g==="-"||g==="+"))l=g;else{let b=Number(g);!o&&b?o=b:c===-1&&(c=s+d)}}c!==-1&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=!1,m="",f=i.length;for(let d=1;d<e.length;++d){let g=e[d];switch(g.type){case"space":u=!0;case"newline":f+=g.source.length;break;case"comment":t&&!u&&n(g,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=g.source.length,m=g.source.substring(1);break;case"error":n(g,"UNEXPECTED_TOKEN",g.message),f+=g.source.length;break;default:{let b=`Unexpected token in block scalar header: ${g.type}`;n(g,"UNEXPECTED_TOKEN",b);let h=g.source;h&&typeof h=="string"&&(f+=h.length)}}}return{mode:r,indent:o,chomp:l,comment:m,length:f}}a(Wu,"parseBlockScalarHeader");function Gu(s){let e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),r=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}a(Gu,"splitLines");co.resolveBlockScalar=Vu});var En=y(fo=>{"use strict";var An=L(),Hu=be();function Qu(s,e,t){let{offset:n,type:i,source:r,end:o}=s,l,c,u=a((d,g,b)=>t(n+d,g,b),"_onError");switch(i){case"scalar":l=An.Scalar.PLAIN,c=Xu(r,u);break;case"single-quoted-scalar":l=An.Scalar.QUOTE_SINGLE,c=zu(r,u);break;case"double-quoted-scalar":l=An.Scalar.QUOTE_DOUBLE,c=Zu(r,u);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}let m=n+r.length,f=Hu.resolveEnd(o,m,e,t);return{value:c,type:l,comment:f.comment,range:[n,m,f.offset]}}a(Qu,"resolveFlowScalar");function Xu(s,e){let t="";switch(s[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),uo(s)}a(Xu,"plainValue");function zu(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),uo(s.slice(1,-1)).replace(/''/g,"'")}a(zu,"singleQuotedValue");function uo(s){let e=/(.*?)\r?\n/sy,t=e.exec(s);if(!t)return s;let n,i;try{n=new RegExp("(?<![ ])[ ]+$"),i=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{n=/[ \t]+$/,i=/^[ \t]+|[ \t]+$/g}let r=t[1].replace(n,""),o=" ",l=e.lastIndex;for(;t=e.exec(s);){let u=t[1].replace(i,"");u===""?o===`
|
|
87
|
+
`?r+=o:o=`
|
|
88
|
+
`:(r+=o+u,o=" "),l=e.lastIndex}let c=/[ \t]*(.*)/sy;return c.lastIndex=l,t=c.exec(s),r+o+(t?.[1]??"")}a(uo,"unfoldLines");function Zu(s,e){let t="";for(let n=1;n<s.length-1;++n){let i=s[n];if(!(i==="\r"&&s[n+1]===`
|
|
89
|
+
`))if(i===`
|
|
90
|
+
`){let{fold:r,offset:o}=ef(s,n);t+=r,n=o}else if(i==="\\"){let r=s[++n],o=tf[r];if(o)t+=o;else if(r===`
|
|
91
|
+
`)for(r=s[n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="\r"&&s[n+1]===`
|
|
92
|
+
`)for(r=s[++n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="x"||r==="u"||r==="U"){let l=r==="x"?2:r==="u"?4:8;t+=sf(s,n+1,l,e),n+=l}else{let l=s.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),t+=l}}else if(i===" "||i===" "){let r=n,o=s[n+1];for(;o===" "||o===" ";)o=s[++n+1];o!==`
|
|
93
|
+
`&&!(o==="\r"&&s[n+2]===`
|
|
94
|
+
`)&&(t+=n>r?s.slice(r,n+1):i)}else t+=i}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}a(Zu,"doubleQuotedValue");function ef(s,e){let t="",n=s[e+1];for(;(n===" "||n===" "||n===`
|
|
95
|
+
`||n==="\r")&&!(n==="\r"&&s[e+2]!==`
|
|
96
|
+
`);)n===`
|
|
97
|
+
`&&(t+=`
|
|
98
|
+
`),e+=1,n=s[e+1];return t||(t=" "),{fold:t,offset:e}}a(ef,"foldNewline");var tf={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
99
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function sf(s,e,t,n){let i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(o)}catch{let l=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}}a(sf,"parseCharCode");fo.resolveFlowScalar=Qu});var po=y(mo=>{"use strict";var ie=O(),ho=L(),nf=Nn(),rf=En();function of(s,e,t,n){let{value:i,type:r,comment:o,range:l}=e.type==="block-scalar"?nf.resolveBlockScalar(s,e,n):rf.resolveFlowScalar(e,s.options.strict,n),c=t?s.directives.tagName(t.source,f=>n(t,"TAG_RESOLVE_FAILED",f)):null,u;s.options.stringKeys&&s.atKey?u=s.schema[ie.SCALAR]:c?u=af(s.schema,i,c,t,n):e.type==="scalar"?u=lf(s,i,e,n):u=s.schema[ie.SCALAR];let m;try{let f=u.resolve(i,d=>n(t??e,"TAG_RESOLVE_FAILED",d),s.options);m=ie.isScalar(f)?f:new ho.Scalar(f)}catch(f){let d=f instanceof Error?f.message:String(f);n(t??e,"TAG_RESOLVE_FAILED",d),m=new ho.Scalar(i)}return m.range=l,m.source=i,r&&(m.type=r),c&&(m.tag=c),u.format&&(m.format=u.format),o&&(m.comment=o),m}a(of,"composeScalar");function af(s,e,t,n,i){if(t==="!")return s[ie.SCALAR];let r=[];for(let l of s.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)r.push(l);else return l;for(let l of r)if(l.test?.test(e))return l;let o=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[ie.SCALAR])}a(af,"findScalarTagByName");function lf({atKey:s,directives:e,schema:t},n,i,r){let o=t.tags.find(l=>(l.default===!0||s&&l.default==="key")&&l.test?.test(n))||t[ie.SCALAR];if(t.compat){let l=t.compat.find(c=>c.default&&c.test?.test(n))??t[ie.SCALAR];if(o.tag!==l.tag){let c=e.tagString(o.tag),u=e.tagString(l.tag),m=`Value may be parsed as either ${c} or ${u}`;r(i,"TAG_RESOLVE_FAILED",m,!0)}}return o}a(lf,"findScalarTagByTest");mo.composeScalar=of});var yo=y(go=>{"use strict";function cf(s,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];i?.type==="space";)s+=i.source.length,i=e[++n];break}}return s}a(cf,"emptyScalarPosition");go.emptyScalarPosition=cf});var wo=y(qn=>{"use strict";var uf=qe(),ff=O(),df=lo(),bo=po(),hf=be(),mf=yo(),pf={composeNode:So,composeEmptyNode:On};function So(s,e,t,n){let i=s.atKey,{spaceBefore:r,comment:o,anchor:l,tag:c}=t,u,m=!0;switch(e.type){case"alias":u=gf(s,e,n),(l||c)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":u=bo.composeScalar(s,e,c,n),l&&(u.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=df.composeCollection(pf,s,e,t,n),l&&(u.anchor=l.source.substring(1))}catch(f){let d=f instanceof Error?f.message:String(f);n(e,"RESOURCE_EXHAUSTION",d)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",f),m=!1}}return u??(u=On(s,e.offset,void 0,null,t,n)),l&&u.anchor===""&&n(l,"BAD_ALIAS","Anchor cannot be an empty string"),i&&s.options.stringKeys&&(!ff.isScalar(u)||typeof u.value!="string"||u.tag&&u.tag!=="tag:yaml.org,2002:str")&&n(c??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(u.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?u.comment=o:u.commentBefore=o),s.options.keepSourceTokens&&m&&(u.srcToken=e),u}a(So,"composeNode");function On(s,e,t,n,{spaceBefore:i,comment:r,anchor:o,tag:l,end:c},u){let m={type:"scalar",offset:mf.emptyScalarPosition(e,t,n),indent:-1,source:""},f=bo.composeScalar(s,m,l,u);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&u(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),r&&(f.comment=r,f.range[2]=c),f}a(On,"composeEmptyNode");function gf({options:s},{offset:e,source:t,end:n},i){let r=new uf.Alias(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,l=hf.resolveEnd(n,o,s.strict,i);return r.range=[e,o,l.offset],l.comment&&(r.comment=l.comment),r}a(gf,"composeAlias");qn.composeEmptyNode=On;qn.composeNode=So});var No=y(ko=>{"use strict";var yf=Ye(),vo=wo(),bf=be(),Sf=We();function wf(s,e,{offset:t,start:n,value:i,end:r},o){let l=Object.assign({_directives:e},s),c=new yf.Document(void 0,l),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},m=Sf.resolveProps(n,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});m.found&&(c.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!m.hasNewline&&o(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=i?vo.composeNode(u,i,m,o):vo.composeEmptyNode(u,m.end,n,null,m,o);let f=c.contents.range[2],d=bf.resolveEnd(r,f,!1,o);return d.comment&&(c.comment=d.comment),c.range=[t,f,d.offset],c}a(wf,"composeDoc");ko.composeDoc=wf});var Ln=y(Oo=>{"use strict";var vf=Ze("process"),kf=hs(),Nf=Ye(),Ge=Ve(),Ao=O(),Af=No(),Ef=be();function He(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];let{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}a(He,"getErrorPos");function Eo(s){let e="",t=!1,n=!1;for(let i=0;i<s.length;++i){let r=s[i];switch(r[0]){case"#":e+=(e===""?"":n?`
|
|
100
|
+
|
|
101
|
+
`:`
|
|
102
|
+
`)+(r.substring(1)||" "),t=!0,n=!1;break;case"%":s[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}a(Eo,"parsePrelude");var Tn=class{static{a(this,"Composer")}constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,i,r)=>{let o=He(t);r?this.warnings.push(new Ge.YAMLWarning(o,n,i)):this.errors.push(new Ge.YAMLParseError(o,n,i))},this.directives=new kf.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:i}=Eo(this.prelude);if(n){let r=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
103
|
+
${n}`:n;else if(i||e.directives.docStart||!r)e.commentBefore=n;else if(Ao.isCollection(r)&&!r.flow&&r.items.length>0){let o=r.items[0];Ao.isPair(o)&&(o=o.key);let l=o.commentBefore;o.commentBefore=l?`${n}
|
|
104
|
+
${l}`:n}else{let o=r.commentBefore;r.commentBefore=o?`${n}
|
|
105
|
+
${o}`:n}}if(t){for(let r=0;r<this.errors.length;++r)e.errors.push(this.errors[r]);for(let r=0;r<this.warnings.length;++r)e.warnings.push(this.warnings[r])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Eo(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(t,n)}*next(e){switch(vf.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{let r=He(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=Af.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new Ge.YAMLParseError(He(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new Ge.YAMLParseError(He(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let t=Ef.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
|
|
106
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new Ge.YAMLParseError(He(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new Nf.Document(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}};Oo.Composer=Tn});var Lo=y(xt=>{"use strict";var Of=Nn(),qf=En(),Tf=Ve(),qo=Pe();function Lf(s,e=!0,t){if(s){let n=a((i,r,o)=>{let l=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(l,r,o);else throw new Tf.YAMLParseError([l,l+1],r,o)},"_onError");switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return qf.resolveFlowScalar(s,e,n);case"block-scalar":return Of.resolveBlockScalar({options:{strict:e}},s,n)}}return null}a(Lf,"resolveAsScalar");function Cf(s,e){let{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,l=qo.stringifyString({type:o,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),c=e.end??[{type:"newline",offset:-1,indent:n,source:`
|
|
107
|
+
`}];switch(l[0]){case"|":case">":{let u=l.indexOf(`
|
|
108
|
+
`),m=l.substring(0,u),f=l.substring(u+1)+`
|
|
109
|
+
`,d=[{type:"block-scalar-header",offset:r,indent:n,source:m}];return To(d,c)||d.push({type:"newline",offset:-1,indent:n,source:`
|
|
110
|
+
`}),{type:"block-scalar",offset:r,indent:n,props:d,source:f}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:l,end:c};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:l,end:c};default:return{type:"scalar",offset:r,indent:n,source:l,end:c}}}a(Cf,"createScalarToken");function Mf(s,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=t,l="indent"in s?s.indent:null;if(n&&typeof l=="number"&&(l+=2),!o)switch(s.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let u=s.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let c=qo.stringifyString({type:o,value:e},{implicitKey:i||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Pf(s,c);break;case'"':Cn(s,c,"double-quoted-scalar");break;case"'":Cn(s,c,"single-quoted-scalar");break;default:Cn(s,c,"scalar")}}a(Mf,"setScalarValue");function Pf(s,e){let t=e.indexOf(`
|
|
111
|
+
`),n=e.substring(0,t),i=e.substring(t+1)+`
|
|
112
|
+
`;if(s.type==="block-scalar"){let r=s.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=n,s.source=i}else{let{offset:r}=s,o="indent"in s?s.indent:-1,l=[{type:"block-scalar-header",offset:r,indent:o,source:n}];To(l,"end"in s?s.end:void 0)||l.push({type:"newline",offset:-1,indent:o,source:`
|
|
113
|
+
`});for(let c of Object.keys(s))c!=="type"&&c!=="offset"&&delete s[c];Object.assign(s,{type:"block-scalar",indent:o,props:l,source:i})}}a(Pf,"setBlockScalarValue");function To(s,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}a(To,"addEndtoBlockProps");function Cn(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{let n=s.props.slice(1),i=e.length;s.props[0].type==="block-scalar-header"&&(i-=s.props[0].source.length);for(let r of n)r.offset+=i;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
|
|
114
|
+
`};delete s.items,Object.assign(s,{type:t,source:e,end:[i]});break}default:{let n="indent"in s?s.indent:-1,i="end"in s&&Array.isArray(s.end)?s.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:n,source:e,end:i})}}}a(Cn,"setFlowScalarValue");xt.createScalarToken=Cf;xt.resolveAsScalar=Lf;xt.setScalarValue=Mf});var Mo=y(Co=>{"use strict";var If=a(s=>"type"in s?Vt(s):Jt(s),"stringify");function Vt(s){switch(s.type){case"block-scalar":{let e="";for(let t of s.props)e+=Vt(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(let t of s.items)e+=Jt(t);return e}case"flow-collection":{let e=s.start.source;for(let t of s.items)e+=Jt(t);for(let t of s.end)e+=t.source;return e}case"document":{let e=Jt(s);if(s.end)for(let t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(let t of s.end)e+=t.source;return e}}}a(Vt,"stringifyToken");function Jt({start:s,key:e,sep:t,value:n}){let i="";for(let r of s)i+=r.source;if(e&&(i+=Vt(e)),t)for(let r of t)i+=r.source;return n&&(i+=Vt(n)),i}a(Jt,"stringifyItem");Co.stringify=If});var _o=y($o=>{"use strict";var Mn=Symbol("break visit"),$f=Symbol("skip children"),Po=Symbol("remove item");function re(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),Io(Object.freeze([]),s,e)}a(re,"visit");re.BREAK=Mn;re.SKIP=$f;re.REMOVE=Po;re.itemAtPath=(s,e)=>{let t=s;for(let[n,i]of e){let r=t?.[n];if(r&&"items"in r)t=r.items[i];else return}return t};re.parentCollection=(s,e)=>{let t=re.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],i=t?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function Io(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(let i of["key","value"]){let r=e[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){let l=Io(Object.freeze(s.concat([[i,o]])),r.items[o],t);if(typeof l=="number")o=l-1;else{if(l===Mn)return Mn;l===Po&&(r.items.splice(o,1),o-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,s))}}return typeof n=="function"?n(e,s):n}a(Io,"_visit");$o.visit=re});var Wt=y(_=>{"use strict";var Pn=Lo(),_f=Mo(),Df=_o(),In="\uFEFF",$n="",_n="",Dn="",jf=a(s=>!!s&&"items"in s,"isCollection"),Rf=a(s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar"),"isScalar");function Bf(s){switch(s){case In:return"<BOM>";case $n:return"<DOC>";case _n:return"<FLOW_END>";case Dn:return"<SCALAR>";default:return JSON.stringify(s)}}a(Bf,"prettyToken");function Ff(s){switch(s){case In:return"byte-order-mark";case $n:return"doc-mode";case _n:return"flow-error-end";case Dn:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
115
|
+
`:case`\r
|
|
116
|
+
`: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(s[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}a(Ff,"tokenType");_.createScalarToken=Pn.createScalarToken;_.resolveAsScalar=Pn.resolveAsScalar;_.setScalarValue=Pn.setScalarValue;_.stringify=_f.stringify;_.visit=Df.visit;_.BOM=In;_.DOCUMENT=$n;_.FLOW_END=_n;_.SCALAR=Dn;_.isCollection=jf;_.isScalar=Rf;_.prettyToken=Bf;_.tokenType=Ff});var Bn=y(jo=>{"use strict";var Qe=Wt();function R(s){switch(s){case void 0:case" ":case`
|
|
117
|
+
`:case"\r":case" ":return!0;default:return!1}}a(R,"isEmpty");var Do=new Set("0123456789ABCDEFabcdef"),Kf=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Gt=new Set(",[]{}"),Uf=new Set(` ,[]{}
|
|
118
|
+
\r `),jn=a(s=>!s||Uf.has(s),"isNotAnchorChar"),Rn=class{static{a(this,"Lexer")}constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
119
|
+
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
120
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){let i=this.buffer[n+e+1];if(i===`
|
|
121
|
+
`||!i&&!this.atEnd)return e+n+1}return t===`
|
|
122
|
+
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&R(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
123
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Qe.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){let r=e[n-1];if(r===" "||r===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let r=e[t-1];if(r===" "||r===" ")t-=1;else break}let i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Qe.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let t=this.peek(3);if((t==="---"||t==="...")&&R(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!R(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&R(t)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(jn),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&R(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Qe.FLOW_END,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.length-r),"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(jn),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||R(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),i=n.indexOf(`
|
|
124
|
+
`,this.pos);if(i!==-1){for(;i!==-1;){let r=this.continueScalar(i+1);if(r===-1)break;i=n.indexOf(`
|
|
125
|
+
`,r)}i!==-1&&(t=i-(n[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>R(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case" ":t+=1;break;case`
|
|
126
|
+
`:e=r,t=0;break;case"\r":{let o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
127
|
+
`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
|
|
128
|
+
`,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
|
|
129
|
+
`;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let r=e-1,o=this.buffer[r];o==="\r"&&(o=this.buffer[--r]);let l=r;for(;o===" ";)o=this.buffer[--r];if(o===`
|
|
130
|
+
`&&r>=this.pos&&r+1+t>l)e=r;else break}while(!0);return yield Qe.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let r=this.buffer[n+1];if(R(r)||e&&Gt.has(r))break;t=n}else if(R(i)){let r=this.buffer[n+1];if(i==="\r"&&(r===`
|
|
131
|
+
`?(n+=1,i=`
|
|
132
|
+
`,r=this.buffer[n+1]):t=n),r==="#"||e&&Gt.has(r))break;if(i===`
|
|
133
|
+
`){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Gt.has(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Qe.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(jn),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(R(n)||t&&Gt.has(n)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!R(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Kf.has(t))t=this.buffer[++e];else if(t==="%"&&Do.has(this.buffer[e+1])&&Do.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
134
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
135
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};jo.Lexer=Rn});var Kn=y(Ro=>{"use strict";var Fn=class{static{a(this,"LineCounter")}constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}};Ro.LineCounter=Fn});var Yn=y(Yo=>{"use strict";var Yf=Ze("process"),Bo=Wt(),xf=Bn();function z(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}a(z,"includesToken");function Fo(s){for(let e=0;e<s.length;++e)switch(s[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}a(Fo,"findNonEmptyIndex");function Uo(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}a(Uo,"isFlowToken");function Ht(s){switch(s.type){case"document":return s.start;case"block-map":{let e=s.items[s.items.length-1];return e.sep??e.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}a(Ht,"getPrevProps");function Se(s){if(s.length===0)return[];let e=s.length;e:for(;--e>=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;s[++e]?.type==="space";);return s.splice(e,s.length)}a(Se,"getFirstKeyStartProps");function Qt(s,e){if(e.length<1e5)Array.prototype.push.apply(s,e);else for(let t=0;t<e.length;++t)s.push(e[t])}a(Qt,"arrayPushArray");function Ko(s){if(s.start.type==="flow-seq-start")for(let e of s.items)e.sep&&!e.value&&!z(e.start,"explicit-key-ind")&&!z(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Uo(e.value)?e.value.end?Qt(e.value.end,e.sep):e.value.end=e.sep:Qt(e.start,e.sep),delete e.sep)}a(Ko,"fixFlowSeqItems");var Un=class{static{a(this,"Parser")}constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new xf.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,Yf.env.LOG_TOKENS&&console.log("|",Bo.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Bo.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Ko(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Fo(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.start}),t.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 e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{Fo(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let t=Ht(this.peek(2)),n=Se(t),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let t=this.source.indexOf(`
|
|
136
|
+
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
137
|
+
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Qt(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",r=[];if(i&&t.sep&&!t.value){let o=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":o.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(z(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(Uo(t.key)&&!z(t.sep,"newline")){let o=Se(t.start),l=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:l,sep:c}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(z(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Se(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):z(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!z(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Qt(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||z(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=Ht(n),r=Se(i);Ko(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
138
|
+
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
139
|
+
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let t=Ht(e),n=Se(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Ht(e),n=Se(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Yo.Parser=Un});var Go=y(ze=>{"use strict";var xo=Ln(),Jf=Ye(),Xe=Ve(),Vf=Os(),Wf=O(),Gf=Kn(),Jo=Yn();function Vo(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new Gf.LineCounter||null,prettyErrors:e}}a(Vo,"parseOptions");function Hf(s,e={}){let{lineCounter:t,prettyErrors:n}=Vo(e),i=new Jo.Parser(t?.addNewLine),r=new xo.Composer(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(let l of o)l.errors.forEach(Xe.prettifyError(s,t)),l.warnings.forEach(Xe.prettifyError(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}a(Hf,"parseAllDocuments");function Wo(s,e={}){let{lineCounter:t,prettyErrors:n}=Vo(e),i=new Jo.Parser(t?.addNewLine),r=new xo.Composer(e),o=null;for(let l of r.compose(i.parse(s),!0,s.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new Xe.YAMLParseError(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(Xe.prettifyError(s,t)),o.warnings.forEach(Xe.prettifyError(s,t))),o}a(Wo,"parseDocument");function Qf(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=Wo(s,t);if(!i)return null;if(i.warnings.forEach(r=>Vf.warn(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}a(Qf,"parse");function Xf(s,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(s===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return Wf.isDocument(s)&&!n?s.toString(t):new Jf.Document(s,n,t).toString(t)}a(Xf,"stringify");ze.parse=Qf;ze.parseAllDocuments=Hf;ze.parseDocument=Wo;ze.stringify=Xf});var Qo=y(q=>{"use strict";var zf=Ln(),Zf=Ye(),ed=cn(),xn=Ve(),td=qe(),Z=O(),sd=G(),nd=L(),id=Q(),rd=X(),od=Wt(),ad=Bn(),ld=Kn(),cd=Yn(),Xt=Go(),Ho=Ne();q.Composer=zf.Composer;q.Document=Zf.Document;q.Schema=ed.Schema;q.YAMLError=xn.YAMLError;q.YAMLParseError=xn.YAMLParseError;q.YAMLWarning=xn.YAMLWarning;q.Alias=td.Alias;q.isAlias=Z.isAlias;q.isCollection=Z.isCollection;q.isDocument=Z.isDocument;q.isMap=Z.isMap;q.isNode=Z.isNode;q.isPair=Z.isPair;q.isScalar=Z.isScalar;q.isSeq=Z.isSeq;q.Pair=sd.Pair;q.Scalar=nd.Scalar;q.YAMLMap=id.YAMLMap;q.YAMLSeq=rd.YAMLSeq;q.CST=od;q.Lexer=ad.Lexer;q.LineCounter=ld.LineCounter;q.Parser=cd.Parser;q.parse=Xt.parse;q.parseAllDocuments=Xt.parseAllDocuments;q.parseDocument=Xt.parseDocument;q.stringify=Xt.stringify;q.visit=Ho.visit;q.visitAsync=Ho.visitAsync});import ve from"node:process";function Xn(s){return s instanceof Error||Object.prototype.toString.call(s)==="[object Error]"}a(Xn,"isError");function ke(s){try{return Xn(s)&&typeof s.message=="string"&&s.message!==""?s.message:String(s)}catch{return"[unstringifiable value]"}}a(ke,"describeError");import{realpathSync as zn}from"node:fs";import Zn from"node:process";import{fileURLToPath as ka}from"node:url";function ei(s,e){let t=Zn.argv[1];if(t===void 0)return!1;try{return zn(ka(s))===zn(t)}catch(n){return Zn.stderr.write(`${e}: warning: could not determine entry point: ${ke(n)}
|
|
140
|
+
`),!0}}a(ei,"isEntryPoint");import Na from"node:process";var ti=120;function si(s=Na.stdout){return s.isTTY!==!0?ti:s.columns??ti}a(si,"resolveTerminalWidth");async function ni(s){let e=[];for await(let t of s){if(!Buffer.isBuffer(t))throw new TypeError("readAll: expected Buffer chunks (stream must be in binary mode)");e.push(t)}return Buffer.concat(e).toString("utf8")}a(ni,"readAll");import{readFile as Oa,unlink as qa,writeFile as Ta}from"node:fs/promises";import{basename as La,dirname as Ca,join as Ma}from"node:path";function os(s,e){return ii(s)&&s.code===e}a(os,"isErrorCode");function as(s){return os(s,"ENOENT")}a(as,"isEnoent");function ls(s){return os(s,"ENOENT")||os(s,"ENOTDIR")}a(ls,"isMissingFile");function cs(s){return ii(s)&&!Array.isArray(s)}a(cs,"isRecord");function ii(s){return typeof s=="object"&&s!==null}a(ii,"isObject");function ri(s,e){let t=`](${e})`,n=s.split(`
|
|
141
|
+
`),i=[],r=!1;for(let o of n){if(Aa(o)&&o.includes(t)){r=!0;continue}i.push(o)}return r?{content:Ea(i).join(`
|
|
142
|
+
`),removed:!0}:{content:s,removed:!1}}a(ri,"removeMemoryIndexEntry");function Aa(s){return/^\s*[-*] /.test(s)}a(Aa,"isListItem");function Ea(s){let e=[],t=0;for(;t<s.length;){let n=s[t];if(n===void 0)break;if(!n.startsWith("## ")){e.push(n),t+=1;continue}let i=t+1;for(;i<s.length&&!/^#{1,2} /.test(s[i]??"");)i+=1;let r=s.slice(t+1,i);r.some(o=>o.trim()!=="")&&e.push(n,...r),t=i}return e}a(Ea,"dropEmptySections");async function oi(s){let e=await Pa(s.paths),t=await Ia(s.paths);return{ok:!0,results:s.paths.map(i=>{let r=e.get(i)??!1,o=t.get(i)??!1,l=_a(r,o);return{path:i,deleted:r,indexUpdated:o,...l!==void 0&&{note:l}}})}}a(oi,"deleteMemories");async function Pa(s){let e=new Map;for(let t of s)try{await qa(t),e.set(t,!0)}catch(n){if(as(n)){e.set(t,!1);continue}throw n}return e}a(Pa,"deleteFiles");async function Ia(s){let e=new Map;for(let[t,n]of $a(s)){let i;try{i=await Oa(t,"utf8")}catch(o){if(as(o)){for(let l of n)e.set(l,!1);continue}throw o}let r=!1;for(let o of n){let l=ri(i,La(o));i=l.content,e.set(o,l.removed),r||=l.removed}r&&await Ta(t,i,"utf8")}return e}a(Ia,"reconcileIndexes");function $a(s){return Map.groupBy(s,e=>Ma(Ca(e),"MEMORY.md"))}a($a,"groupByIndex");function _a(s,e){if(!s&&!e)return"file already absent and did not match any MEMORY.md line";if(!s)return"file already absent";if(!e)return"did not match any MEMORY.md line"}a(_a,"noteFor");import{readdir as sa,readFile as pd}from"node:fs/promises";import{hostname as gd}from"node:os";import{basename as yd,join as Vn}from"node:path";var zt=va(Qo(),1);function Xo(s){return ud(s)&&!Array.isArray(s)}a(Xo,"isRecord");function ud(s){return typeof s=="object"&&s!==null}a(ud,"isObject");function zo(s){let e=(0,zt.parseDocument)(s,{schema:"core"}),t=e.errors[0]?.message;if(t!==void 0)return{fields:{},error:t};let n=e.toJS();return{fields:Xo(n)?n:{}}}a(zo,"parseFrontmatterFields");var Zo="---";function Jn(s){let e=s.split(`
|
|
143
|
+
`);if(e[0]!==Zo)return{fields:{},body:s,bodyStartLine:1,error:"the note does not contain a frontmatter block"};let t=e.findIndex((c,u)=>u>0&&c===Zo);if(t===-1)return{fields:{},body:s,bodyStartLine:1,error:"the note does not contain a frontmatter block"};let n=e.slice(1,t).join(`
|
|
144
|
+
`),i=e.slice(t+1).join(`
|
|
145
|
+
`),r=t+2,{fields:o,error:l}=zo(n);return{fields:o,body:i,bodyStartLine:r,...l!==void 0&&{error:l}}}a(Jn,"readNoteContent");import{basename as fd}from"node:path";function Zt(s,e){return s!==null?fd(s):e}a(Zt,"deriveLabel");import{stat as dd}from"node:fs/promises";import{join as hd}from"node:path";async function es(s,e=md){let t=s.split("-"),n=t[0]===""?1:0;return ea({isDirectory:e,segments:t,prefix:"/",index:n})}a(es,"resolveRepoPath");async function ea(s){let{isDirectory:e,segments:t,prefix:n,index:i}=s;if(i===t.length)return n;for(let r=i+1;r<=t.length;r++){let o=hd(n,t.slice(i,r).join("-"));if(!await e(o))continue;let l=await ea({isDirectory:e,segments:t,prefix:o,index:r});if(l!==null)return l}return null}a(ea,"searchSegments");async function md(s){try{return(await dd(s)).isDirectory()}catch{return!1}}a(md,"directoryExists");async function ta(s){if(s.memoryStores.includes(s.requested))return{ok:!0,memoryStore:s.requested};let e=s.resolveRepo??es,t=[];for(let i of s.memoryStores)Zt(await e(i),i)===s.requested&&t.push(i);let[n]=t;return n===void 0?{ok:!1,error:"no-such-memory-store",message:`"${s.requested}" does not name a memory store under ${s.projectsRoot}`}:t.length>1?{ok:!1,error:"ambiguous-memory-store",message:`"${s.requested}" names ${t.length} memory stores (${t.join(", ")}); pass one by its directory name`}:{ok:!0,memoryStore:n}}a(ta,"resolveMemoryStore");async function ts(s){let e=s.machine??gd(),t;try{t=(await sa(s.projectsRoot,{withFileTypes:!0})).filter(o=>o.isDirectory()).map(o=>o.name)}catch(r){if(ls(r))return{ok:!1,error:"no-projects-root",message:`projects root ${s.projectsRoot} does not exist`};throw r}if(t=t.toSorted(),s.memoryStore!==void 0){let r=await ta({requested:s.memoryStore,memoryStores:t,projectsRoot:s.projectsRoot});if(!r.ok)return r;t=[r.memoryStore]}let n=[],i=[];for(let r of t){let o=Vn(s.projectsRoot,r,"memory"),l=await bd(o),c=Vn(o,"MEMORY.md"),u=l.length>0?await es(r):null;for(let m of l){let f=Vn(o,m),d=await Sd({path:f,memoryStore:r,repoPath:u,machine:e,memoryIndexPath:c});d.kind==="feedback"?n.push(d.memory):d.kind==="unreadable"&&i.push({path:f,reason:d.reason})}}return{ok:!0,machine:e,projectsRoot:s.projectsRoot,memories:n,skipped:i}}a(ts,"enumerateFeedbackMemories");async function bd(s){let e;try{e=await sa(s)}catch(t){if(ls(t))return[];throw t}return e.filter(t=>t.endsWith(".md")&&t!=="MEMORY.md").toSorted()}a(bd,"listMemoryFiles");async function Sd(s){let e=await pd(s.path,"utf8"),t=Jn(e);return t.error!==void 0?wd(e)?{kind:"unreadable",reason:t.error}:{kind:"other"}:vd(t.fields)!=="feedback"?{kind:"other"}:{kind:"feedback",memory:{path:s.path,memoryStore:s.memoryStore,repoPath:s.repoPath,machine:s.machine,slug:yd(s.path,".md"),name:Wn(t.fields,"name"),description:Wn(t.fields,"description"),originSessionId:kd(t.fields),body:t.body,memoryIndexPath:s.memoryIndexPath}}}a(Sd,"readMemory");function wd(s){let e=s.split(`
|
|
146
|
+
`);return e[0]==="---"&&e.slice(1).includes("---")}a(wd,"hasFrontmatterFence");function vd(s){let e=s.metadata;return cs(e)&&typeof e.type=="string"?e.type:typeof s.type=="string"?s.type:null}a(vd,"effectiveType");function Wn(s,e){let t=s[e];return typeof t=="string"?t:null}a(Wn,"stringField");function kd(s){let e=s.metadata;return cs(e)&&typeof e.originSessionId=="string"?e.originSessionId:Wn(s,"originSessionId")}a(kd,"originSessionId");var Nd=/^[\u{20}-\u{7E}]*$/u,Ad=new RegExp("^[\\p{Emoji_Presentation}--\\p{Regional_Indicator}]$","v"),Ed=2;function ia(s){let e=Od(s),t=e.flatMap(([n,i])=>qd(n,i));if(t.length>0)throw new TypeError(`Glyph set is invalid.
|
|
147
|
+
${t.map(n=>`- ${n}`).join(`
|
|
148
|
+
`)}`);return{plain:na(e.map(([n,{plain:i}])=>[n,{text:i,width:i.length}])),rich:na(e.map(([n,{rich:i}])=>[n,{text:i,width:Ed}]))}}a(ia,"defineGlyphSet");function Od(s){return Object.entries(s)}a(Od,"listVariantEntries");function qd(s,e){let t=[],n=JSON.stringify(s);if(!Ad.test(e.rich)){let i=JSON.stringify(e.rich);t.push(`${n}: rich glyph ${i} is not a single Emoji_Presentation code point outside the regional indicators.`)}if(!Nd.test(e.plain)){let i=JSON.stringify(e.plain);t.push(`${n}: plain glyph ${i} is not printable ASCII (U+0020 to U+007E).`)}return t}a(qd,"listViolations");function na(s){return Object.fromEntries(s)}a(na,"toGlyphRecord");var Gn=ia({blocked:{plain:"BLOCK",rich:"\u{1F6AB}"},failed:{plain:"FAIL",rich:"\u274C"},info:{plain:"INFO",rich:"\u{1F535}"},passed:{plain:"PASS",rich:"\u2705"},skipped:{plain:"SKIP",rich:"\u23E9"},warning:{plain:"WARN",rich:"\u{1F7E0}"}});var oa="\u{1F4E6}",we=" ",Hn=" ".repeat(3),Td=new Intl.Segmenter(void 0,{granularity:"grapheme"});function aa(s,e){let t=e.verbose??!1,n=Md(s.skipped,t);if(s.projects.length===0)return n===""?"No feedback memories found.":`No feedback memories found.
|
|
149
|
+
${n}`;let i=t?Cd(s.projects,e.width):Ld(s.projects),r=n===""?ra(s):`${ra(s)}
|
|
150
|
+
${n}`;return`${i}
|
|
151
|
+
|
|
152
|
+
${r}`}a(aa,"reportSummary");function Ld(s){let e=s.map(o=>({project:`${oa} ${o.label}`,count:String(o.count),modified:Pd(o.lastModified)})),t=Math.max(7,...e.map(o=>o.project.length)),n=Math.max(8,...e.map(o=>o.count.length)),i=`${"Project".padEnd(t)}${we}${"Memories".padEnd(n)}${we}Last modified`,r=e.map(o=>`${o.project.padEnd(t)}${we}${o.count.padEnd(n)}${we}${o.modified}`);return[i,...r].join(`
|
|
153
|
+
`)}a(Ld,"tableBody");function Cd(s,e){return s.map(t=>{let n=Math.max(0,...t.memories.map(l=>l.slug.length)),i=e-Hn.length-n-we.length,r=t.memories.map(l=>`${Hn}${l.slug.padEnd(n)}${we}${Id(l.description??"",i)}`.trimEnd());return[`${oa} ${t.label}: ${t.count} ${ns(t.count,"memory","memories")}`,...r].join(`
|
|
154
|
+
`)}).join(`
|
|
155
|
+
|
|
156
|
+
`)}a(Cd,"verboseBody");function ra(s){let e=`${s.total} feedback ${ns(s.total,"memory","memories")}`,t=`${s.projects.length} ${ns(s.projects.length,"project","projects")}`;return`${e} across ${t}`}a(ra,"totalLine");function Md(s,e){if(s.length===0)return"";let t=`${Gn.plain.warning.text} ${s.length} ${ns(s.length,"file","files")} skipped (unreadable)`;return e?[`${t}:`,...s.map(n=>`${Hn}${n.path}`)].join(`
|
|
157
|
+
`):t}a(Md,"skippedFooter");function Pd(s){let e=new Date(s);return`${`${e.getUTCFullYear()}-${ss(e.getUTCMonth()+1)}-${ss(e.getUTCDate())}`} ${ss(e.getUTCHours())}:${ss(e.getUTCMinutes())} UTC`}a(Pd,"formatMtimeUtc");function ss(s){return String(s).padStart(2,"0")}a(ss,"pad2");function Id(s,e){if(e<=0)return"";let t=Array.from(Td.segment(s),n=>n.segment);return t.length<=e?s:`${t.slice(0,e-1).join("")}\u2026`}a(Id,"truncate");function ns(s,e,t){return s===1?e:t}a(ns,"pluralize");import{homedir as $d}from"node:os";import{join as la}from"node:path";function ca(s){let e=s.env?.CLAUDE_CONFIG_DIR,t=e!==void 0&&e!==""?e:la(s.home??$d(),".claude");return la(t,"projects")}a(ca,"resolveProjectsRoot");import{stat as _d}from"node:fs/promises";async function ua(s){let e=await ts({projectsRoot:s.projectsRoot,...s.memoryStore!==void 0&&{memoryStore:s.memoryStore},...s.machine!==void 0&&{machine:s.machine}});if(!e.ok)return e;let t=[];for(let[n,i]of Dd(e.memories))t.push({memoryStore:n,label:Zt(i[0]?.repoPath??null,n),repoPath:i[0]?.repoPath??null,count:i.length,lastModified:await jd(i),memories:i.map(r=>({slug:r.slug,description:r.description}))});return t.sort((n,i)=>n.label.localeCompare(i.label,void 0,{sensitivity:"base"})),{ok:!0,machine:e.machine,projectsRoot:e.projectsRoot,projects:t,total:e.memories.length,skipped:e.skipped}}a(ua,"summarizeFeedbackMemories");function Dd(s){return Map.groupBy(s,e=>e.memoryStore)}a(Dd,"groupByMemoryStore");async function jd(s){let e=0;for(let t of s){let{mtimeMs:n}=await _d(t.path);n>e&&(e=n)}return new Date(e).toISOString()}a(jd,"newestMtime");var ae="--memory-store";async function Rd(){try{let s=await Bd({argv:ve.argv.slice(2),stdin:ve.stdin,env:ve.env}),e=s.render==="text"?s.value:JSON.stringify(s.value,null,2);ve.stdout.write(`${e}
|
|
158
|
+
`)}catch(s){let e=ke(s);ve.stderr.write(`feedback-memories: ${e}
|
|
159
|
+
`),ve.exit(1)}}a(Rd,"main");ei(import.meta.url,"feedback-memories")&&await Rd();async function Bd(s){let[e,...t]=s.argv;if(e&&["--help","-h","help"].includes(e))return fa(Yd());if(e==="list"){let n=Kd(t);if(!n.ok)return oe(is(n.message));let i=await ua({projectsRoot:da(s),...n.memoryStore!==void 0&&{memoryStore:n.memoryStore},...s.machine!==void 0&&{machine:s.machine}});return i.ok?fa(aa(i,{verbose:n.verbose,width:s.columns??si()})):oe(i)}if(e==="enumerate"){let n=Fd(t);return n.ok?oe(await ts({projectsRoot:da(s),...n.memoryStore!==void 0&&{memoryStore:n.memoryStore},...s.machine!==void 0&&{machine:s.machine}})):oe(is(n.message))}if(e==="delete"){if(t.length>0)return oe(is(`delete takes memory paths on stdin, not arguments; got: ${t.join(" ")}`));let n=Ud(await ni(s.stdin));return oe(await oi({paths:n}))}return oe(is(e===void 0?"a subcommand is required: list, enumerate, or delete (see --help)":`unknown subcommand: ${e}`))}a(Bd,"runFeedbackMemories");function oe(s){return{render:"json",value:s}}a(oe,"json");function fa(s){return{render:"text",value:s}}a(fa,"text");function da(s){return ca({...s.home!==void 0&&{home:s.home},...s.env!==void 0&&{env:s.env}})}a(da,"projectsRootFor");function ha(s,e){let t=s[e];if(t===ae){let i=s[e+1];return i===void 0||i.startsWith("--")?{error:`${ae} requires a memory-store name`}:{memoryStore:i,consumed:2}}let n=`${ae}=`;if(t!==void 0&&t.startsWith(n)){let i=t.slice(n.length);return i.length===0?{error:`${ae} requires a memory-store name`}:{memoryStore:i,consumed:1}}return null}a(ha,"matchMemoryStoreFlag");function Fd(s){let e;for(let t=0;t<s.length;t++){let n=ha(s,t);if(n===null)return{ok:!1,message:ma(`enumerate accepts only ${ae} <name>`,s[t])};if("error"in n)return{ok:!1,message:n.error};e=n.memoryStore,t+=n.consumed-1}return e===void 0?{ok:!0}:{ok:!0,memoryStore:e}}a(Fd,"parseEnumerateArgs");function Kd(s){let e,t=!1;for(let n=0;n<s.length;n++){if(s[n]==="--verbose"){t=!0;continue}let i=ha(s,n);if(i===null)return{ok:!1,message:ma(`list accepts only ${ae} <name> and --verbose`,s[n])};if("error"in i)return{ok:!1,message:i.error};e=i.memoryStore,n+=i.consumed-1}return e===void 0?{ok:!0,verbose:t}:{ok:!0,memoryStore:e,verbose:t}}a(Kd,"parseListArgs");function ma(s,e){return e==="--store"||e!==void 0&&e.startsWith("--store=")?`--store selects a KB store; this helper takes ${ae} <name>`:`${s}; got: ${e}`}a(ma,"rejectArg");function Ud(s){return s.split(`
|
|
160
|
+
`).map(e=>e.trim()).filter(e=>e.length>0)}a(Ud,"parsePaths");function is(s){return{ok:!1,error:"invalid-args",message:s}}a(is,"invalidArgs");function Yd(){return["feedback-memories: Inspect this machine's feedback memories","","Usage:"," feedback-memories list [--memory-store <name>] [--verbose]"," feedback-memories enumerate [--memory-store <name>]"," feedback-memories delete < paths-on-stdin"," feedback-memories --help","","Verbs:"," list Show feedback-memory counts per project with the newest memory's modification time."," --verbose additionally lists each memory and its description."," enumerate Print every feedback memory as JSON (consumed by the migrate-feedback-memories skill)."," delete Remove the newline-separated memory paths piped on stdin and reconcile each MEMORY.md.","","Options:"," --memory-store <name> Scope to one memory store. <name> is either the store directory name, as shown"," in enumerate's `memoryStore` field (e.g. -Users-me-repos-app), or the project"," label that list prints (e.g. app)."," --verbose (list) List each memory with its description."," -h, --help Show this help."].join(`
|
|
161
|
+
`)}a(Yd,"usage");export{Bd as runFeedbackMemories};
|