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,214 @@
|
|
|
1
|
+
import { createRequire as __cjsCreateRequire } from 'node:module';
|
|
2
|
+
const require = __cjsCreateRequire(import.meta.url);
|
|
3
|
+
var bl=Object.create;var Ns=Object.defineProperty;var kl=Object.getOwnPropertyDescriptor;var wl=Object.getOwnPropertyNames;var Sl=Object.getPrototypeOf,vl=Object.prototype.hasOwnProperty;var o=(s,e)=>Ns(s,"name",{value:e,configurable:!0}),yt=(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 b=(s,e)=>()=>{try{return e||s((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var Al=(s,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of wl(e))!vl.call(s,r)&&r!==t&&Ns(s,r,{get:()=>e[r],enumerable:!(n=kl(e,r))||n.enumerable});return s};var Tl=(s,e,t)=>(t=s!=null?bl(Sl(s)):{},Al(e||!s||!s.__esModule?Ns(t,"default",{value:s,enumerable:!0}):t,s));var N=b(_=>{"use strict";var Es=Symbol.for("yaml.alias"),Fr=Symbol.for("yaml.document"),kt=Symbol.for("yaml.map"),Kr=Symbol.for("yaml.pair"),Ls=Symbol.for("yaml.scalar"),wt=Symbol.for("yaml.seq"),G=Symbol.for("yaml.node.type"),xl=o(s=>!!s&&typeof s=="object"&&s[G]===Es,"isAlias"),Nl=o(s=>!!s&&typeof s=="object"&&s[G]===Fr,"isDocument"),El=o(s=>!!s&&typeof s=="object"&&s[G]===kt,"isMap"),Ll=o(s=>!!s&&typeof s=="object"&&s[G]===Kr,"isPair"),Ur=o(s=>!!s&&typeof s=="object"&&s[G]===Ls,"isScalar"),Ol=o(s=>!!s&&typeof s=="object"&&s[G]===wt,"isSeq");function Yr(s){if(s&&typeof s=="object")switch(s[G]){case kt:case wt:return!0}return!1}o(Yr,"isCollection");function ql(s){if(s&&typeof s=="object")switch(s[G]){case Es:case kt:case Ls:case wt:return!0}return!1}o(ql,"isNode");var Pl=o(s=>(Ur(s)||Yr(s))&&!!s.anchor,"hasAnchor");_.ALIAS=Es;_.DOC=Fr;_.MAP=kt;_.NODE_TYPE=G;_.PAIR=Kr;_.SCALAR=Ls;_.SEQ=wt;_.hasAnchor=Pl;_.isAlias=xl;_.isCollection=Yr;_.isDocument=Nl;_.isMap=El;_.isNode=ql;_.isPair=Ll;_.isScalar=Ur;_.isSeq=Ol});var _e=b(Os=>{"use strict";var I=N(),j=Symbol("break visit"),Jr=Symbol("skip children"),V=Symbol("remove node");function St(s,e){let t=Vr(e);I.isDocument(s)?Se(null,s.contents,t,Object.freeze([s]))===V&&(s.contents=null):Se(null,s,t,Object.freeze([]))}o(St,"visit");St.BREAK=j;St.SKIP=Jr;St.REMOVE=V;function Se(s,e,t,n){let r=zr(s,e,t,n);if(I.isNode(r)||I.isPair(r))return Wr(s,n,r),Se(s,r,t,n);if(typeof r!="symbol"){if(I.isCollection(e)){n=Object.freeze(n.concat(e));for(let i=0;i<e.items.length;++i){let a=Se(i,e.items[i],t,n);if(typeof a=="number")i=a-1;else{if(a===j)return j;a===V&&(e.items.splice(i,1),i-=1)}}}else if(I.isPair(e)){n=Object.freeze(n.concat(e));let i=Se("key",e.key,t,n);if(i===j)return j;i===V&&(e.key=null);let a=Se("value",e.value,t,n);if(a===j)return j;a===V&&(e.value=null)}}return r}o(Se,"visit_");async function vt(s,e){let t=Vr(e);I.isDocument(s)?await ve(null,s.contents,t,Object.freeze([s]))===V&&(s.contents=null):await ve(null,s,t,Object.freeze([]))}o(vt,"visitAsync");vt.BREAK=j;vt.SKIP=Jr;vt.REMOVE=V;async function ve(s,e,t,n){let r=await zr(s,e,t,n);if(I.isNode(r)||I.isPair(r))return Wr(s,n,r),ve(s,r,t,n);if(typeof r!="symbol"){if(I.isCollection(e)){n=Object.freeze(n.concat(e));for(let i=0;i<e.items.length;++i){let a=await ve(i,e.items[i],t,n);if(typeof a=="number")i=a-1;else{if(a===j)return j;a===V&&(e.items.splice(i,1),i-=1)}}}else if(I.isPair(e)){n=Object.freeze(n.concat(e));let i=await ve("key",e.key,t,n);if(i===j)return j;i===V&&(e.key=null);let a=await ve("value",e.value,t,n);if(a===j)return j;a===V&&(e.value=null)}}return r}o(ve,"visitAsync_");function Vr(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}o(Vr,"initVisitor");function zr(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(I.isMap(e))return t.Map?.(s,e,n);if(I.isSeq(e))return t.Seq?.(s,e,n);if(I.isPair(e))return t.Pair?.(s,e,n);if(I.isScalar(e))return t.Scalar?.(s,e,n);if(I.isAlias(e))return t.Alias?.(s,e,n)}o(zr,"callVisitor");function Wr(s,e,t){let n=e[e.length-1];if(I.isCollection(n))n.items[s]=t;else if(I.isPair(n))s==="key"?n.key=t:n.value=t;else if(I.isDocument(n))n.contents=t;else{let r=I.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${r} parent`)}}o(Wr,"replaceNode");Os.visit=St;Os.visitAsync=vt});var qs=b(Qr=>{"use strict";var Gr=N(),Cl=_e(),$l={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Il=o(s=>s.replace(/[!,[\]{}]/g,e=>$l[e]),"escapeTagName"),Re=class s{static{o(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]+/),r=n.shift();switch(r){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[i,a]=n;return this.tags[i]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[i]=n;if(i==="1.1"||i==="1.2")return this.yaml.version=i,!0;{let a=/^\d+\.\d+$/.test(i);return t(6,`Unsupported YAML version ${i}`,a),!1}}default:return t(0,`Unknown directive ${r}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let a=e.slice(2,-1);return a==="!"||a==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),a)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(a){return t(String(a)),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+Il(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),r;if(e&&n.length>0&&Gr.isNode(e.contents)){let i={};Cl.visit(e.contents,(a,l)=>{Gr.isNode(l)&&l.tag&&(i[l.tag]=!0)}),r=Object.keys(i)}else r=[];for(let[i,a]of n)i==="!!"&&a==="tag:yaml.org,2002:"||(!e||r.some(l=>l.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
4
|
+
`)}};Re.defaultYaml={explicit:!1,version:"1.2"};Re.defaultTags={"!!":"tag:yaml.org,2002:"};Qr.Directives=Re});var At=b(Me=>{"use strict";var Hr=N(),_l=_e();function Rl(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}o(Rl,"anchorIsValid");function Zr(s){let e=new Set;return _l.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}o(Zr,"anchorNames");function Xr(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}o(Xr,"findNewAnchor");function Ml(s,e){let t=[],n=new Map,r=null;return{onAnchor:o(i=>{t.push(i),r??(r=Zr(s));let a=Xr(e,r);return r.add(a),a},"onAnchor"),setAnchors:o(()=>{for(let i of t){let a=n.get(i);if(typeof a=="object"&&a.anchor&&(Hr.isScalar(a.node)||Hr.isCollection(a.node)))a.node.anchor=a.anchor;else{let l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=i,l}}},"setAnchors"),sourceObjects:n}}o(Ml,"createNodeAnchors");Me.anchorIsValid=Rl;Me.anchorNames=Zr;Me.createNodeAnchors=Ml;Me.findNewAnchor=Xr});var Ps=b(ei=>{"use strict";function je(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let r=0,i=n.length;r<i;++r){let a=n[r],l=je(s,n,String(r),a);l===void 0?delete n[r]:l!==a&&(n[r]=l)}else if(n instanceof Map)for(let r of Array.from(n.keys())){let i=n.get(r),a=je(s,n,r,i);a===void 0?n.delete(r):a!==i&&n.set(r,a)}else if(n instanceof Set)for(let r of Array.from(n)){let i=je(s,n,r,r);i===void 0?n.delete(r):i!==r&&(n.delete(r),n.add(i))}else for(let[r,i]of Object.entries(n)){let a=je(s,n,r,i);a===void 0?delete n[r]:a!==i&&(n[r]=a)}return s.call(e,t,n)}o(je,"applyReviver");ei.applyReviver=je});var X=b(si=>{"use strict";var jl=N();function ti(s,e,t){if(Array.isArray(s))return s.map((n,r)=>ti(n,String(r),t));if(s&&typeof s.toJSON=="function"){if(!t||!jl.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=i=>{n.res=i,delete t.onCreate};let r=s.toJSON(e,t);return t.onCreate&&t.onCreate(r),r}return typeof s=="bigint"&&!t?.keep?Number(s):s}o(ti,"toJS");si.toJS=ti});var Tt=b(ri=>{"use strict";var Dl=Ps(),ni=N(),Bl=X(),Cs=class{static{o(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:r,reviver:i}={}){if(!ni.isDocument(e))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Bl.toJS(this,"",a);if(typeof r=="function")for(let{count:c,res:u}of a.anchors.values())r(u,c);return typeof i=="function"?Dl.applyReviver(i,{"":l},"",l):l}};ri.NodeBase=Cs});var De=b(ii=>{"use strict";var Fl=At(),Kl=_e(),Ae=N(),Ul=Tt(),Yl=X(),$s=class extends Ul.NodeBase{static{o(this,"Alias")}constructor(e){super(Ae.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=[],Kl.visit(e,{Node:o((i,a)=>{(Ae.isAlias(a)||Ae.hasAnchor(a))&&n.push(a)},"Node")}),t&&(t.aliasResolveCache=n));let r;for(let i of n){if(i===this)break;i.anchor===this.source&&(r=i)}if(r&&t){let{anchors:i,doc:a,maxAliasCount:l}=t,c=i.get(r);if(c||(Yl.toJS(r,null,t),c=i.get(r)),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=xt(a,r,i)),c.count*c.aliasCount>l)){let u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(r)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(Fl.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(e.implicitKey)return`${r} `}return r}};function xt(s,e,t){if(Ae.isAlias(e)){let n=e.resolve(s),r=t&&n&&t.get(n);return r?r.count*r.aliasCount:0}else if(Ae.isCollection(e)){let n=0;for(let r of e.items){let i=xt(s,r,t);i>n&&(n=i)}return n}else if(Ae.isPair(e)){let n=xt(s,e.key,t),r=xt(s,e.value,t);return Math.max(n,r)}return 1}o(xt,"getAliasCount");ii.Alias=$s});var P=b(Is=>{"use strict";var Jl=N(),Vl=Tt(),zl=X(),Wl=o(s=>!s||typeof s!="function"&&typeof s!="object","isScalarValue"),ee=class extends Vl.NodeBase{static{o(this,"Scalar")}constructor(e){super(Jl.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:zl.toJS(this.value,e,t)}toString(){return String(this.value)}};ee.BLOCK_FOLDED="BLOCK_FOLDED";ee.BLOCK_LITERAL="BLOCK_LITERAL";ee.PLAIN="PLAIN";ee.QUOTE_DOUBLE="QUOTE_DOUBLE";ee.QUOTE_SINGLE="QUOTE_SINGLE";Is.Scalar=ee;Is.isScalarValue=Wl});var Be=b(oi=>{"use strict";var Gl=De(),fe=N(),ai=P(),Ql="tag:yaml.org,2002:";function Hl(s,e,t){if(e){let n=t.filter(i=>i.tag===e),r=n.find(i=>!i.format)??n[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return t.find(n=>n.identify?.(s)&&!n.format)}o(Hl,"findTagObject");function Zl(s,e,t){if(fe.isDocument(s)&&(s=s.contents),fe.isNode(s))return s;if(fe.isPair(s)){let f=t.schema[fe.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:r,onTagObj:i,schema:a,sourceObjects:l}=t,c;if(n&&s&&typeof s=="object"){if(c=l.get(s),c)return c.anchor??(c.anchor=r(s)),new Gl.Alias(c.anchor);c={anchor:null,node:null},l.set(s,c)}e?.startsWith("!!")&&(e=Ql+e.slice(2));let u=Hl(s,e,a.tags);if(!u){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new ai.Scalar(s);return c&&(c.node=f),f}u=s instanceof Map?a[fe.MAP]:Symbol.iterator in Object(s)?a[fe.SEQ]:a[fe.MAP]}i&&(i(u),delete t.onTagObj);let p=u?.createNode?u.createNode(t.schema,s,t):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(t.schema,s,t):new ai.Scalar(s);return e?p.tag=e:u.default||(p.tag=u.tag),c&&(c.node=p),p}o(Zl,"createNode");oi.createNode=Zl});var Et=b(Nt=>{"use strict";var Xl=Be(),z=N(),ec=Tt();function _s(s,e,t){let n=t;for(let r=e.length-1;r>=0;--r){let i=e[r];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){let a=[];a[i]=n,n=a}else n=new Map([[i,n]])}return Xl.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:o(()=>{throw new Error("This should not happen, please report a bug.")},"onAnchor"),schema:s,sourceObjects:new Map})}o(_s,"collectionFromPath");var li=o(s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,"isEmptyPath"),Rs=class extends ec.NodeBase{static{o(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=>z.isNode(n)||z.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(li(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(z.isCollection(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,_s(this.schema,r,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(z.isCollection(r))return r.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&z.isScalar(i)?i.value:i:z.isCollection(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!z.isPair(t))return!1;let n=t.value;return n==null||e&&z.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 r=this.get(t,!0);return z.isCollection(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let i=this.get(n,!0);if(z.isCollection(i))i.setIn(r,t);else if(i===void 0&&this.schema)this.set(n,_s(this.schema,r,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}};Nt.Collection=Rs;Nt.collectionFromPath=_s;Nt.isEmptyPath=li});var Fe=b(Lt=>{"use strict";var tc=o(s=>s.replace(/^(?!$)(?: $)?/gm,"#"),"stringifyComment");function Ms(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}o(Ms,"indentComment");var sc=o((s,e,t)=>s.endsWith(`
|
|
5
|
+
`)?Ms(t,e):t.includes(`
|
|
6
|
+
`)?`
|
|
7
|
+
`+Ms(t,e):(s.endsWith(" ")?"":" ")+t,"lineComment");Lt.indentComment=Ms;Lt.lineComment=sc;Lt.stringifyComment=tc});var ui=b(Ke=>{"use strict";var nc="flow",js="block",Ot="quoted";function rc(s,e,t="flow",{indentAtStart:n,lineWidth:r=80,minContentWidth:i=20,onFold:a,onOverflow:l}={}){if(!r||r<0)return s;r<i&&(i=0);let c=Math.max(1+i,1+r-e.length);if(s.length<=c)return s;let u=[],p={},f=r-e.length;typeof n=="number"&&(n>r-Math.max(2,i)?u.push(0):f=r-n);let h,g,y=!1,d=-1,m=-1,k=-1;t===js&&(d=ci(s,d,e.length),d!==-1&&(f=d+c));for(let v;v=s[d+=1];){if(t===Ot&&v==="\\"){switch(m=d,s[d+1]){case"x":d+=3;break;case"u":d+=5;break;case"U":d+=9;break;default:d+=1}k=d}if(v===`
|
|
8
|
+
`)t===js&&(d=ci(s,d,e.length)),f=d+e.length+c,h=void 0;else{if(v===" "&&g&&g!==" "&&g!==`
|
|
9
|
+
`&&g!==" "){let A=s[d+1];A&&A!==" "&&A!==`
|
|
10
|
+
`&&A!==" "&&(h=d)}if(d>=f)if(h)u.push(h),f=h+c,h=void 0;else if(t===Ot){for(;g===" "||g===" ";)g=v,v=s[d+=1],y=!0;let A=d>k+1?d-2:m-1;if(p[A])return s;u.push(A),p[A]=!0,f=A+c,h=void 0}else y=!0}g=v}if(y&&l&&l(),u.length===0)return s;a&&a();let w=s.slice(0,u[0]);for(let v=0;v<u.length;++v){let A=u[v],x=u[v+1]||s.length;A===0?w=`
|
|
11
|
+
${e}${s.slice(0,x)}`:(t===Ot&&p[A]&&(w+=`${s[A]}\\`),w+=`
|
|
12
|
+
${e}${s.slice(A+1,x)}`)}return w}o(rc,"foldFlowLines");function ci(s,e,t){let n=e,r=e+1,i=s[r];for(;i===" "||i===" ";)if(e<r+t)i=s[++e];else{do i=s[++e];while(i&&i!==`
|
|
13
|
+
`);n=e,r=e+1,i=s[r]}return n}o(ci,"consumeMoreIndentedLines");Ke.FOLD_BLOCK=js;Ke.FOLD_FLOW=nc;Ke.FOLD_QUOTED=Ot;Ke.foldFlowLines=rc});var Ye=b(fi=>{"use strict";var K=P(),te=ui(),Pt=o((s,e)=>({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),"getFoldOptions"),Ct=o(s=>/^(%|---|\.\.\.)/m.test(s),"containsDocumentMarker");function ic(s,e,t){if(!e||e<0)return!1;let n=e-t,r=s.length;if(r<=n)return!1;for(let i=0,a=0;i<r;++i)if(s[i]===`
|
|
14
|
+
`){if(i-a>n)return!0;if(a=i+1,r-a<=n)return!1}return!0}o(ic,"lineLengthOverLimit");function Ue(s,e){let t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:n}=e,r=e.options.doubleQuotedMinMultiLineLength,i=e.indent||(Ct(s)?" ":""),a="",l=0;for(let c=0,u=t[c];u;u=t[++c])if(u===" "&&t[c+1]==="\\"&&t[c+2]==="n"&&(a+=t.slice(l,c)+"\\ ",c+=1,l=c,u="\\"),u==="\\")switch(t[c+1]){case"u":{a+=t.slice(l,c);let p=t.substr(c+2,4);switch(p){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:p.substr(0,2)==="00"?a+="\\x"+p.substr(2):a+=t.substr(c,6)}c+=5,l=c+1}break;case"n":if(n||t[c+2]==='"'||t.length<r)c+=1;else{for(a+=t.slice(l,c)+`
|
|
15
|
+
|
|
16
|
+
`;t[c+2]==="\\"&&t[c+3]==="n"&&t[c+4]!=='"';)a+=`
|
|
17
|
+
`,c+=2;a+=i,t[c+2]===" "&&(a+="\\"),c+=1,l=c+1}break;default:c+=1}return a=l?a+t.slice(l):t,n?a:te.foldFlowLines(a,i,te.FOLD_QUOTED,Pt(e,!1))}o(Ue,"doubleQuotedString");function Ds(s,e){if(e.options.singleQuote===!1||e.implicitKey&&s.includes(`
|
|
18
|
+
`)||/[ \t]\n|\n[ \t]/.test(s))return Ue(s,e);let t=e.indent||(Ct(s)?" ":""),n="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
19
|
+
${t}`)+"'";return e.implicitKey?n:te.foldFlowLines(n,t,te.FOLD_FLOW,Pt(e,!1))}o(Ds,"singleQuotedString");function Te(s,e){let{singleQuote:t}=e.options,n;if(t===!1)n=Ue;else{let r=s.includes('"'),i=s.includes("'");r&&!i?n=Ds:i&&!r?n=Ue:n=t?Ds:Ue}return n(s,e)}o(Te,"quotedString");var Bs;try{Bs=new RegExp(`(^|(?<!
|
|
20
|
+
))
|
|
21
|
+
+(?!
|
|
22
|
+
|$)`,"g")}catch{Bs=/\n+(?!\n|$)/g}function qt({comment:s,type:e,value:t},n,r,i){let{blockQuote:a,commentString:l,lineWidth:c}=n.options;if(!a||/\n[\t ]+$/.test(t))return Te(t,n);let u=n.indent||(n.forceBlockIndent||Ct(t)?" ":""),p=a==="literal"?!0:a==="folded"||e===K.Scalar.BLOCK_FOLDED?!1:e===K.Scalar.BLOCK_LITERAL?!0:!ic(t,c,u.length);if(!t)return p?`|
|
|
23
|
+
`:`>
|
|
24
|
+
`;let f,h;for(h=t.length;h>0;--h){let x=t[h-1];if(x!==`
|
|
25
|
+
`&&x!==" "&&x!==" ")break}let g=t.substring(h),y=g.indexOf(`
|
|
26
|
+
`);y===-1?f="-":t===g||y!==g.length-1?(f="+",i&&i()):f="",g&&(t=t.slice(0,-g.length),g[g.length-1]===`
|
|
27
|
+
`&&(g=g.slice(0,-1)),g=g.replace(Bs,`$&${u}`));let d=!1,m,k=-1;for(m=0;m<t.length;++m){let x=t[m];if(x===" ")d=!0;else if(x===`
|
|
28
|
+
`)k=m;else break}let w=t.substring(0,k<m?k+1:m);w&&(t=t.substring(w.length),w=w.replace(/\n+/g,`$&${u}`));let A=(d?u?"2":"1":"")+f;if(s&&(A+=" "+l(s.replace(/ ?[\r\n]+/g," ")),r&&r()),!p){let x=t.replace(/\n+/g,`
|
|
29
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`),T=!1,E=Pt(n,!0);a!=="folded"&&e!==K.Scalar.BLOCK_FOLDED&&(E.onOverflow=()=>{T=!0});let S=te.foldFlowLines(`${w}${x}${g}`,u,te.FOLD_BLOCK,E);if(!T)return`>${A}
|
|
30
|
+
${u}${S}`}return t=t.replace(/\n+/g,`$&${u}`),`|${A}
|
|
31
|
+
${u}${w}${t}${g}`}o(qt,"blockString");function ac(s,e,t,n){let{type:r,value:i}=s,{actualString:a,implicitKey:l,indent:c,indentStep:u,inFlow:p}=e;if(l&&i.includes(`
|
|
32
|
+
`)||p&&/[[\]{},]/.test(i))return Te(i,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return l||p||!i.includes(`
|
|
33
|
+
`)?Te(i,e):qt(s,e,t,n);if(!l&&!p&&r!==K.Scalar.PLAIN&&i.includes(`
|
|
34
|
+
`))return qt(s,e,t,n);if(Ct(i)){if(c==="")return e.forceBlockIndent=!0,qt(s,e,t,n);if(l&&c===u)return Te(i,e)}let f=i.replace(/\n+/g,`$&
|
|
35
|
+
${c}`);if(a){let h=o(d=>d.default&&d.tag!=="tag:yaml.org,2002:str"&&d.test?.test(f),"test"),{compat:g,tags:y}=e.doc.schema;if(y.some(h)||g?.some(h))return Te(i,e)}return l?f:te.foldFlowLines(f,c,te.FOLD_FLOW,Pt(e,!1))}o(ac,"plainString");function oc(s,e,t,n){let{implicitKey:r,inFlow:i}=e,a=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)}),{type:l}=s;l!==K.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(l=K.Scalar.QUOTE_DOUBLE);let c=o(p=>{switch(p){case K.Scalar.BLOCK_FOLDED:case K.Scalar.BLOCK_LITERAL:return r||i?Te(a.value,e):qt(a,e,t,n);case K.Scalar.QUOTE_DOUBLE:return Ue(a.value,e);case K.Scalar.QUOTE_SINGLE:return Ds(a.value,e);case K.Scalar.PLAIN:return ac(a,e,t,n);default:return null}},"_stringify"),u=c(l);if(u===null){let{defaultKeyType:p,defaultStringType:f}=e.options,h=r&&p||f;if(u=c(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}o(oc,"stringifyString");fi.stringifyString=oc});var Je=b(Fs=>{"use strict";var lc=At(),se=N(),cc=Fe(),uc=Ye();function fc(s,e){let t=Object.assign({blockQuote:!0,commentString:cc.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}}o(fc,"createStringifyContext");function hc(s,e){if(e.tag){let r=s.filter(i=>i.tag===e.tag);if(r.length>0)return r.find(i=>i.format===e.format)??r[0]}let t,n;if(se.isScalar(e)){n=e.value;let r=s.filter(i=>i.identify?.(n));if(r.length>1){let i=r.filter(a=>a.test);i.length>0&&(r=i)}t=r.find(i=>i.format===e.format)??r.find(i=>!i.format)}else n=e,t=s.find(r=>r.nodeClass&&n instanceof r.nodeClass);if(!t){let r=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${r} value`)}return t}o(hc,"getTagObject");function pc(s,e,{anchors:t,doc:n}){if(!n.directives)return"";let r=[],i=(se.isScalar(s)||se.isCollection(s))&&s.anchor;i&&lc.anchorIsValid(i)&&(t.add(i),r.push(`&${i}`));let a=s.tag??(e.default?null:e.tag);return a&&r.push(n.directives.tagString(a)),r.join(" ")}o(pc,"stringifyProps");function dc(s,e,t,n){if(se.isPair(s))return s.toString(e,t,n);if(se.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 r,i=se.isNode(s)?s:e.doc.createNode(s,{onTagObj:o(c=>r=c,"onTagObj")});r??(r=hc(e.doc.schema.tags,i));let a=pc(i,r,e);a.length>0&&(e.indentAtStart=(e.indentAtStart??0)+a.length+1);let l=typeof r.stringify=="function"?r.stringify(i,e,t,n):se.isScalar(i)?uc.stringifyString(i,e,t,n):i.toString(e,t,n);return a?se.isScalar(i)||l[0]==="{"||l[0]==="["?`${a} ${l}`:`${a}
|
|
36
|
+
${e.indent}${l}`:l}o(dc,"stringify");Fs.createStringifyContext=fc;Fs.stringify=dc});var gi=b(di=>{"use strict";var Q=N(),hi=P(),pi=Je(),Ve=Fe();function gc({key:s,value:e},t,n,r){let{allNullValues:i,doc:a,indent:l,indentStep:c,options:{commentString:u,indentSeq:p,simpleKeys:f}}=t,h=Q.isNode(s)&&s.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Q.isCollection(s)||!Q.isNode(s)&&typeof s=="object"){let E="With simple keys, collection cannot be used as a key value";throw new Error(E)}}let g=!f&&(!s||h&&e==null&&!t.inFlow||Q.isCollection(s)||(Q.isScalar(s)?s.type===hi.Scalar.BLOCK_FOLDED||s.type===hi.Scalar.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!g&&(f||!i),indent:l+c});let y=!1,d=!1,m=pi.stringify(s,t,()=>y=!0,()=>d=!0);if(!g&&!t.inFlow&&m.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(i||e==null)return y&&n&&n(),m===""?"?":g?`? ${m}`:m}else if(i&&!f||e==null&&g)return m=`? ${m}`,h&&!y?m+=Ve.lineComment(m,t.indent,u(h)):d&&r&&r(),m;y&&(h=null),g?(h&&(m+=Ve.lineComment(m,t.indent,u(h))),m=`? ${m}
|
|
37
|
+
${l}:`):(m=`${m}:`,h&&(m+=Ve.lineComment(m,t.indent,u(h))));let k,w,v;Q.isNode(e)?(k=!!e.spaceBefore,w=e.commentBefore,v=e.comment):(k=!1,w=null,v=null,e&&typeof e=="object"&&(e=a.createNode(e))),t.implicitKey=!1,!g&&!h&&Q.isScalar(e)&&(t.indentAtStart=m.length+1),d=!1,!p&&c.length>=2&&!t.inFlow&&!g&&Q.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let A=!1,x=pi.stringify(e,t,()=>A=!0,()=>d=!0),T=" ";if(h||k||w){if(T=k?`
|
|
38
|
+
`:"",w){let E=u(w);T+=`
|
|
39
|
+
${Ve.indentComment(E,t.indent)}`}x===""&&!t.inFlow?T===`
|
|
40
|
+
`&&v&&(T=`
|
|
41
|
+
|
|
42
|
+
`):T+=`
|
|
43
|
+
${t.indent}`}else if(!g&&Q.isCollection(e)){let E=x[0],S=x.indexOf(`
|
|
44
|
+
`),C=S!==-1,Z=t.inFlow??e.flow??e.items.length===0;if(C||!Z){let we=!1;if(C&&(E==="&"||E==="!")){let $=x.indexOf(" ");E==="&"&&$!==-1&&$<S&&x[$+1]==="!"&&($=x.indexOf(" ",$+1)),($===-1||S<$)&&(we=!0)}we||(T=`
|
|
45
|
+
${t.indent}`)}}else(x===""||x[0]===`
|
|
46
|
+
`)&&(T="");return m+=T+x,t.inFlow?A&&n&&n():v&&!A?m+=Ve.lineComment(m,t.indent,u(v)):d&&r&&r(),m}o(gc,"stringifyPair");di.stringifyPair=gc});var Us=b(Ks=>{"use strict";var mi=yt("process");function mc(s,...e){s==="debug"&&console.log(...e)}o(mc,"debug");function yc(s,e){(s==="debug"||s==="warn")&&(typeof mi.emitWarning=="function"?mi.emitWarning(e):console.warn(e))}o(yc,"warn");Ks.debug=mc;Ks.warn=yc});var Mt=b(Rt=>{"use strict";var _t=N(),yi=P(),$t="<<",It={identify:o(s=>s===$t||typeof s=="symbol"&&s.description===$t,"identify"),default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:o(()=>Object.assign(new yi.Scalar(Symbol($t)),{addToJSMap:bi}),"resolve"),stringify:o(()=>$t,"stringify")},bc=o((s,e)=>(It.identify(e)||_t.isScalar(e)&&(!e.type||e.type===yi.Scalar.PLAIN)&&It.identify(e.value))&&s?.doc.schema.tags.some(t=>t.tag===It.tag&&t.default),"isMergeKey");function bi(s,e,t){let n=ki(s,t);if(_t.isSeq(n))for(let r of n.items)Ys(s,e,r);else if(Array.isArray(n))for(let r of n)Ys(s,e,r);else Ys(s,e,n)}o(bi,"addMergeToJSMap");function Ys(s,e,t){let n=ki(s,t);if(!_t.isMap(n))throw new Error("Merge sources must be maps or map aliases");let r=n.toJSON(null,s,Map);for(let[i,a]of r)e instanceof Map?e.has(i)||e.set(i,a):e instanceof Set?e.add(i):Object.prototype.hasOwnProperty.call(e,i)||Object.defineProperty(e,i,{value:a,writable:!0,enumerable:!0,configurable:!0});return e}o(Ys,"mergeValue");function ki(s,e){return s&&_t.isAlias(e)?e.resolve(s.doc,s):e}o(ki,"resolveAliasValue");Rt.addMergeToJSMap=bi;Rt.isMergeKey=bc;Rt.merge=It});var Vs=b(vi=>{"use strict";var kc=Us(),wi=Mt(),wc=Je(),Si=N(),Js=X();function Sc(s,e,{key:t,value:n}){if(Si.isNode(t)&&t.addToJSMap)t.addToJSMap(s,e,n);else if(wi.isMergeKey(s,t))wi.addMergeToJSMap(s,e,n);else{let r=Js.toJS(t,"",s);if(e instanceof Map)e.set(r,Js.toJS(n,r,s));else if(e instanceof Set)e.add(r);else{let i=vc(t,r,s),a=Js.toJS(n,i,s);i in e?Object.defineProperty(e,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):e[i]=a}}return e}o(Sc,"addPairToJSMap");function vc(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Si.isNode(s)&&t?.doc){let n=wc.createStringifyContext(t.doc,{});n.anchors=new Set;for(let i of t.anchors.keys())n.anchors.add(i.anchor);n.inFlow=!0,n.inStringifyKey=!0;let r=s.toString(n);if(!t.mapKeyWarned){let i=JSON.stringify(r);i.length>40&&(i=i.substring(0,36)+'..."'),kc.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return r}return JSON.stringify(e)}o(vc,"stringifyKey");vi.addPairToJSMap=Sc});var ne=b(zs=>{"use strict";var Ai=Be(),Ac=gi(),Tc=Vs(),jt=N();function xc(s,e,t){let n=Ai.createNode(s,void 0,t),r=Ai.createNode(e,void 0,t);return new Dt(n,r)}o(xc,"createPair");var Dt=class s{static{o(this,"Pair")}constructor(e,t=null){Object.defineProperty(this,jt.NODE_TYPE,{value:jt.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return jt.isNode(t)&&(t=t.clone(e)),jt.isNode(n)&&(n=n.clone(e)),new s(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return Tc.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?Ac.stringifyPair(this,e,t,n):JSON.stringify(this)}};zs.Pair=Dt;zs.createPair=xc});var Ws=b(xi=>{"use strict";var he=N(),Ti=Je(),Bt=Fe();function Nc(s,e,t){return(e.inFlow??s.flow?Lc:Ec)(s,e,t)}o(Nc,"stringifyCollection");function Ec({comment:s,items:e},t,{blockItemPrefix:n,flowChars:r,itemIndent:i,onChompKeep:a,onComment:l}){let{indent:c,options:{commentString:u}}=t,p=Object.assign({},t,{indent:i,type:null}),f=!1,h=[];for(let y=0;y<e.length;++y){let d=e[y],m=null;if(he.isNode(d))!f&&d.spaceBefore&&h.push(""),Ft(t,h,d.commentBefore,f),d.comment&&(m=d.comment);else if(he.isPair(d)){let w=he.isNode(d.key)?d.key:null;w&&(!f&&w.spaceBefore&&h.push(""),Ft(t,h,w.commentBefore,f))}f=!1;let k=Ti.stringify(d,p,()=>m=null,()=>f=!0);m&&(k+=Bt.lineComment(k,i,u(m))),f&&m&&(f=!1),h.push(n+k)}let g;if(h.length===0)g=r.start+r.end;else{g=h[0];for(let y=1;y<h.length;++y){let d=h[y];g+=d?`
|
|
47
|
+
${c}${d}`:`
|
|
48
|
+
`}}return s?(g+=`
|
|
49
|
+
`+Bt.indentComment(u(s),c),l&&l()):f&&a&&a(),g}o(Ec,"stringifyBlockCollection");function Lc({items:s},e,{flowChars:t,itemIndent:n}){let{indent:r,indentStep:i,flowCollectionPadding:a,options:{commentString:l}}=e;n+=i;let c=Object.assign({},e,{indent:n,inFlow:!0,type:null}),u=!1,p=0,f=[];for(let y=0;y<s.length;++y){let d=s[y],m=null;if(he.isNode(d))d.spaceBefore&&f.push(""),Ft(e,f,d.commentBefore,!1),d.comment&&(m=d.comment);else if(he.isPair(d)){let w=he.isNode(d.key)?d.key:null;w&&(w.spaceBefore&&f.push(""),Ft(e,f,w.commentBefore,!1),w.comment&&(u=!0));let v=he.isNode(d.value)?d.value:null;v?(v.comment&&(m=v.comment),v.commentBefore&&(u=!0)):d.value==null&&w?.comment&&(m=w.comment)}m&&(u=!0);let k=Ti.stringify(d,c,()=>m=null);u||(u=f.length>p||k.includes(`
|
|
50
|
+
`)),y<s.length-1?k+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(u||(u=f.reduce((w,v)=>w+v.length+2,2)+(k.length+2)>e.options.lineWidth)),u&&(k+=",")),m&&(k+=Bt.lineComment(k,n,l(m))),f.push(k),p=f.length}let{start:h,end:g}=t;if(f.length===0)return h+g;if(!u){let y=f.reduce((d,m)=>d+m.length+2,2);u=e.options.lineWidth>0&&y>e.options.lineWidth}if(u){let y=h;for(let d of f)y+=d?`
|
|
51
|
+
${i}${r}${d}`:`
|
|
52
|
+
`;return`${y}
|
|
53
|
+
${r}${g}`}else return`${h}${a}${f.join(" ")}${a}${g}`}o(Lc,"stringifyFlowCollection");function Ft({indent:s,options:{commentString:e}},t,n,r){if(n&&r&&(n=n.replace(/^\n+/,"")),n){let i=Bt.indentComment(e(n),s);t.push(i.trimStart())}}o(Ft,"addCommentBefore");xi.stringifyCollection=Nc});var ie=b(Qs=>{"use strict";var Oc=Ws(),qc=Vs(),Pc=Et(),re=N(),Kt=ne(),Cc=P();function ze(s,e){let t=re.isScalar(e)?e.value:e;for(let n of s)if(re.isPair(n)&&(n.key===e||n.key===t||re.isScalar(n.key)&&n.key.value===t))return n}o(ze,"findPair");var Gs=class extends Pc.Collection{static{o(this,"YAMLMap")}static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(re.MAP,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),l=o((c,u)=>{if(typeof i=="function")u=i.call(t,c,u);else if(Array.isArray(i)&&!i.includes(c))return;(u!==void 0||r)&&a.items.push(Kt.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"&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;re.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Kt.Pair(e,e?.value):n=new Kt.Pair(e.key,e.value);let r=ze(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw new Error(`Key ${n.key} already set`);re.isScalar(r.value)&&Cc.isScalarValue(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let a=this.items.findIndex(l=>i(n,l)<0);a===-1?this.items.push(n):this.items.splice(a,0,n)}else this.items.push(n)}delete(e){let t=ze(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let r=ze(this.items,e)?.value;return(!t&&re.isScalar(r)?r.value:r)??void 0}has(e){return!!ze(this.items,e)}set(e,t){this.add(new Kt.Pair(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let i of this.items)qc.addPairToJSMap(t,r,i);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let r of this.items)if(!re.isPair(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Oc.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}};Qs.YAMLMap=Gs;Qs.findPair=ze});var xe=b(Ei=>{"use strict";var $c=N(),Ni=ie(),Ic={collection:"map",default:!0,nodeClass:Ni.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(s,e){return $c.isMap(s)||e("Expected a mapping for this tag"),s},createNode:o((s,e,t)=>Ni.YAMLMap.from(s,e,t),"createNode")};Ei.map=Ic});var ae=b(Li=>{"use strict";var _c=Be(),Rc=Ws(),Mc=Et(),Yt=N(),jc=P(),Dc=X(),Hs=class extends Mc.Collection{static{o(this,"YAMLSeq")}static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Yt.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Ut(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let n=Ut(e);if(typeof n!="number")return;let r=this.items[n];return!t&&Yt.isScalar(r)?r.value:r}has(e){let t=Ut(e);return typeof t=="number"&&t<this.items.length}set(e,t){let n=Ut(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let r=this.items[n];Yt.isScalar(r)&&jc.isScalarValue(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let i of this.items)n.push(Dc.toJS(i,String(r++),t));return n}toString(e,t,n){return e?Rc.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let a=0;for(let l of t){if(typeof r=="function"){let c=t instanceof Set?l:String(a++);l=r.call(t,c,l)}i.items.push(_c.createNode(l,void 0,n))}}return i}};function Ut(s){let e=Yt.isScalar(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}o(Ut,"asItemIndex");Li.YAMLSeq=Hs});var Ne=b(qi=>{"use strict";var Bc=N(),Oi=ae(),Fc={collection:"seq",default:!0,nodeClass:Oi.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(s,e){return Bc.isSeq(s)||e("Expected a sequence for this tag"),s},createNode:o((s,e,t)=>Oi.YAMLSeq.from(s,e,t),"createNode")};qi.seq=Fc});var We=b(Pi=>{"use strict";var Kc=Ye(),Uc={identify:o(s=>typeof s=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:o(s=>s,"resolve"),stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),Kc.stringifyString(s,e,t,n)}};Pi.string=Uc});var Jt=b(Ii=>{"use strict";var Ci=P(),$i={identify:o(s=>s==null,"identify"),createNode:o(()=>new Ci.Scalar(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:o(()=>new Ci.Scalar(null),"resolve"),stringify:o(({source:s},e)=>typeof s=="string"&&$i.test.test(s)?s:e.options.nullStr,"stringify")};Ii.nullTag=$i});var Zs=b(Ri=>{"use strict";var Yc=P(),_i={identify:o(s=>typeof s=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:o(s=>new Yc.Scalar(s[0]==="t"||s[0]==="T"),"resolve"),stringify({source:s,value:e},t){if(s&&_i.test.test(s)){let n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};Ri.boolTag=_i});var Ee=b(Mi=>{"use strict";function Jc({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);let r=typeof n=="number"?n:Number(n);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^-?\d/.test(i)&&!i.includes("e")){let a=i.indexOf(".");a<0&&(a=i.length,i+=".");let l=e-(i.length-a-1);for(;l-- >0;)i+="0"}return i}o(Jc,"stringifyNumber");Mi.stringifyNumber=Jc});var en=b(Vt=>{"use strict";var Vc=P(),Xs=Ee(),zc={identify:o(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:o(s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:Xs.stringifyNumber},Wc={identify:o(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:o(s=>parseFloat(s),"resolve"),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():Xs.stringifyNumber(s)}},Gc={identify:o(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 Vc.Scalar(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:Xs.stringifyNumber};Vt.float=Gc;Vt.floatExp=Wc;Vt.floatNaN=zc});var sn=b(Wt=>{"use strict";var ji=Ee(),zt=o(s=>typeof s=="bigint"||Number.isInteger(s),"intIdentify"),tn=o((s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t),"intResolve");function Di(s,e,t){let{value:n}=s;return zt(n)&&n>=0?t+n.toString(e):ji.stringifyNumber(s)}o(Di,"intStringify");var Qc={identify:o(s=>zt(s)&&s>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:o((s,e,t)=>tn(s,2,8,t),"resolve"),stringify:o(s=>Di(s,8,"0o"),"stringify")},Hc={identify:zt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:o((s,e,t)=>tn(s,0,10,t),"resolve"),stringify:ji.stringifyNumber},Zc={identify:o(s=>zt(s)&&s>=0,"identify"),default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:o((s,e,t)=>tn(s,2,16,t),"resolve"),stringify:o(s=>Di(s,16,"0x"),"stringify")};Wt.int=Hc;Wt.intHex=Zc;Wt.intOct=Qc});var Fi=b(Bi=>{"use strict";var Xc=xe(),eu=Jt(),tu=Ne(),su=We(),nu=Zs(),nn=en(),rn=sn(),ru=[Xc.map,tu.seq,su.string,eu.nullTag,nu.boolTag,rn.intOct,rn.int,rn.intHex,nn.floatNaN,nn.floatExp,nn.float];Bi.schema=ru});var Yi=b(Ui=>{"use strict";var iu=P(),au=xe(),ou=Ne();function Ki(s){return typeof s=="bigint"||Number.isInteger(s)}o(Ki,"intIdentify");var Gt=o(({value:s})=>JSON.stringify(s),"stringifyJSON"),lu=[{identify:o(s=>typeof s=="string","identify"),default:!0,tag:"tag:yaml.org,2002:str",resolve:o(s=>s,"resolve"),stringify:Gt},{identify:o(s=>s==null,"identify"),createNode:o(()=>new iu.Scalar(null),"createNode"),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:o(()=>null,"resolve"),stringify:Gt},{identify:o(s=>typeof s=="boolean","identify"),default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:o(s=>s==="true","resolve"),stringify:Gt},{identify:Ki,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:o((s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),"resolve"),stringify:o(({value:s})=>Ki(s)?s.toString():JSON.stringify(s),"stringify")},{identify:o(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:o(s=>parseFloat(s),"resolve"),stringify:Gt}],cu={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},uu=[au.map,ou.seq].concat(lu,cu);Ui.schema=uu});var on=b(Ji=>{"use strict";var Ge=yt("buffer"),an=P(),fu=Ye(),hu={identify:o(s=>s instanceof Uint8Array,"identify"),default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof Ge.Buffer=="function")return Ge.Buffer.from(s,"base64");if(typeof atob=="function"){let t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let r=0;r<t.length;++r)n[r]=t.charCodeAt(r);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,r,i){if(!t)return"";let a=t,l;if(typeof Ge.Buffer=="function")l=a instanceof Ge.Buffer?a.toString("base64"):Ge.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let c="";for(let u=0;u<a.length;++u)c+=String.fromCharCode(a[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=an.Scalar.BLOCK_LITERAL),e!==an.Scalar.QUOTE_DOUBLE){let c=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),u=Math.ceil(l.length/c),p=new Array(u);for(let f=0,h=0;f<u;++f,h+=c)p[f]=l.substr(h,c);l=p.join(e===an.Scalar.BLOCK_LITERAL?`
|
|
54
|
+
`:" ")}return fu.stringifyString({comment:s,type:e,value:l},n,r,i)}};Ji.binary=hu});var Zt=b(Ht=>{"use strict";var Qt=N(),ln=ne(),pu=P(),du=ae();function Vi(s,e){if(Qt.isSeq(s))for(let t=0;t<s.items.length;++t){let n=s.items[t];if(!Qt.isPair(n)){if(Qt.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let r=n.items[0]||new ln.Pair(new pu.Scalar(null));if(n.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${n.commentBefore}
|
|
55
|
+
${r.key.commentBefore}`:n.commentBefore),n.comment){let i=r.value??r.key;i.comment=i.comment?`${n.comment}
|
|
56
|
+
${i.comment}`:n.comment}n=r}s.items[t]=Qt.isPair(n)?n:new ln.Pair(n)}}else e("Expected a sequence for this tag");return s}o(Vi,"resolvePairs");function zi(s,e,t){let{replacer:n}=t,r=new du.YAMLSeq(s);r.tag="tag:yaml.org,2002:pairs";let i=0;if(e&&Symbol.iterator in Object(e))for(let a of e){typeof n=="function"&&(a=n.call(e,String(i++),a));let l,c;if(Array.isArray(a))if(a.length===2)l=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let u=Object.keys(a);if(u.length===1)l=u[0],c=a[l];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else l=a;r.items.push(ln.createPair(l,c,t))}return r}o(zi,"createPairs");var gu={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Vi,createNode:zi};Ht.createPairs=zi;Ht.pairs=gu;Ht.resolvePairs=Vi});var fn=b(un=>{"use strict";var Wi=N(),cn=X(),Qe=ie(),mu=ae(),Gi=Zt(),pe=class s extends mu.YAMLSeq{static{o(this,"YAMLOMap")}constructor(){super(),this.add=Qe.YAMLMap.prototype.add.bind(this),this.delete=Qe.YAMLMap.prototype.delete.bind(this),this.get=Qe.YAMLMap.prototype.get.bind(this),this.has=Qe.YAMLMap.prototype.has.bind(this),this.set=Qe.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 r of this.items){let i,a;if(Wi.isPair(r)?(i=cn.toJS(r.key,"",t),a=cn.toJS(r.value,i,t)):i=cn.toJS(r,"",t),n.has(i))throw new Error("Ordered maps must not include duplicate keys");n.set(i,a)}return n}static from(e,t,n){let r=Gi.createPairs(e,t,n),i=new this;return i.items=r.items,i}};pe.tag="tag:yaml.org,2002:omap";var yu={collection:"seq",identify:o(s=>s instanceof Map,"identify"),nodeClass:pe,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=Gi.resolvePairs(s,e),n=[];for(let{key:r}of t.items)Wi.isScalar(r)&&(n.includes(r.value)?e(`Ordered maps must not include duplicate keys: ${r.value}`):n.push(r.value));return Object.assign(new pe,t)},createNode:o((s,e,t)=>pe.from(s,e,t),"createNode")};un.YAMLOMap=pe;un.omap=yu});var ea=b(hn=>{"use strict";var Qi=P();function Hi({value:s,source:e},t){return e&&(s?Zi:Xi).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}o(Hi,"boolStringify");var Zi={identify:o(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:o(()=>new Qi.Scalar(!0),"resolve"),stringify:Hi},Xi={identify:o(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:o(()=>new Qi.Scalar(!1),"resolve"),stringify:Hi};hn.falseTag=Xi;hn.trueTag=Zi});var ta=b(Xt=>{"use strict";var bu=P(),pn=Ee(),ku={identify:o(s=>typeof s=="number","identify"),default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:o(s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,"resolve"),stringify:pn.stringifyNumber},wu={identify:o(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:o(s=>parseFloat(s.replace(/_/g,"")),"resolve"),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():pn.stringifyNumber(s)}},Su={identify:o(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 bu.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:pn.stringifyNumber};Xt.float=Su;Xt.floatExp=wu;Xt.floatNaN=ku});var na=b(Ze=>{"use strict";var sa=Ee(),He=o(s=>typeof s=="bigint"||Number.isInteger(s),"intIdentify");function es(s,e,t,{intAsBigInt:n}){let r=s[0];if((r==="-"||r==="+")&&(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 a=BigInt(s);return r==="-"?BigInt(-1)*a:a}let i=parseInt(s,t);return r==="-"?-1*i:i}o(es,"intResolve");function dn(s,e,t){let{value:n}=s;if(He(n)){let r=n.toString(e);return n<0?"-"+t+r.substr(1):t+r}return sa.stringifyNumber(s)}o(dn,"intStringify");var vu={identify:He,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:o((s,e,t)=>es(s,2,2,t),"resolve"),stringify:o(s=>dn(s,2,"0b"),"stringify")},Au={identify:He,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:o((s,e,t)=>es(s,1,8,t),"resolve"),stringify:o(s=>dn(s,8,"0"),"stringify")},Tu={identify:He,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:o((s,e,t)=>es(s,0,10,t),"resolve"),stringify:sa.stringifyNumber},xu={identify:He,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:o((s,e,t)=>es(s,2,16,t),"resolve"),stringify:o(s=>dn(s,16,"0x"),"stringify")};Ze.int=Tu;Ze.intBin=vu;Ze.intHex=xu;Ze.intOct=Au});var mn=b(gn=>{"use strict";var ns=N(),ts=ne(),ss=ie(),de=class s extends ss.YAMLMap{static{o(this,"YAMLSet")}constructor(e){super(e),this.tag=s.tag}add(e){let t;ns.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new ts.Pair(e.key,null):t=new ts.Pair(e,null),ss.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let n=ss.findPair(this.items,e);return!t&&ns.isPair(n)?ns.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=ss.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new ts.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:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let a of t)typeof r=="function"&&(a=r.call(t,a,a)),i.items.push(ts.createPair(a,null,n));return i}};de.tag="tag:yaml.org,2002:set";var Nu={collection:"map",identify:o(s=>s instanceof Set,"identify"),nodeClass:de,default:!1,tag:"tag:yaml.org,2002:set",createNode:o((s,e,t)=>de.from(s,e,t),"createNode"),resolve(s,e){if(ns.isMap(s)){if(s.hasAllNullValues(!0))return Object.assign(new de,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};gn.YAMLSet=de;gn.set=Nu});var bn=b(rs=>{"use strict";var Eu=Ee();function yn(s,e){let t=s[0],n=t==="-"||t==="+"?s.substring(1):s,r=o(a=>e?BigInt(a):Number(a),"num"),i=n.replace(/_/g,"").split(":").reduce((a,l)=>a*r(60)+r(l),r(0));return t==="-"?r(-1)*i:i}o(yn,"parseSexagesimal");function ra(s){let{value:e}=s,t=o(a=>a,"num");if(typeof e=="bigint")t=o(a=>BigInt(a),"num");else if(isNaN(e)||!isFinite(e))return Eu.stringifyNumber(s);let n="";e<0&&(n="-",e*=t(-1));let r=t(60),i=[e%r];return e<60?i.unshift(0):(e=(e-i[0])/r,i.unshift(e%r),e>=60&&(e=(e-i[0])/r,i.unshift(e))),n+i.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}o(ra,"stringifySexagesimal");var Lu={identify:o(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:o((s,e,{intAsBigInt:t})=>yn(s,t),"resolve"),stringify:ra},Ou={identify:o(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:o(s=>yn(s,!1),"resolve"),stringify:ra},ia={identify:o(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(ia.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,r,i,a,l]=e.map(Number),c=e[7]?Number((e[7]+"00").substr(1,3)):0,u=Date.UTC(t,n-1,r,i||0,a||0,l||0,c),p=e[8];if(p&&p!=="Z"){let f=yn(p,!1);Math.abs(f)<30&&(f*=60),u-=6e4*f}return new Date(u)},stringify:o(({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??"","stringify")};rs.floatTime=Ou;rs.intTime=Lu;rs.timestamp=ia});var la=b(oa=>{"use strict";var qu=xe(),Pu=Jt(),Cu=Ne(),$u=We(),Iu=on(),aa=ea(),kn=ta(),is=na(),_u=Mt(),Ru=fn(),Mu=Zt(),ju=mn(),wn=bn(),Du=[qu.map,Cu.seq,$u.string,Pu.nullTag,aa.trueTag,aa.falseTag,is.intBin,is.intOct,is.int,is.intHex,kn.floatNaN,kn.floatExp,kn.float,Iu.binary,_u.merge,Ru.omap,Mu.pairs,ju.set,wn.intTime,wn.floatTime,wn.timestamp];oa.schema=Du});var ba=b(An=>{"use strict";var ha=xe(),Bu=Jt(),pa=Ne(),Fu=We(),Ku=Zs(),Sn=en(),vn=sn(),Uu=Fi(),Yu=Yi(),da=on(),Xe=Mt(),ga=fn(),ma=Zt(),ca=la(),ya=mn(),as=bn(),ua=new Map([["core",Uu.schema],["failsafe",[ha.map,pa.seq,Fu.string]],["json",Yu.schema],["yaml11",ca.schema],["yaml-1.1",ca.schema]]),fa={binary:da.binary,bool:Ku.boolTag,float:Sn.float,floatExp:Sn.floatExp,floatNaN:Sn.floatNaN,floatTime:as.floatTime,int:vn.int,intHex:vn.intHex,intOct:vn.intOct,intTime:as.intTime,map:ha.map,merge:Xe.merge,null:Bu.nullTag,omap:ga.omap,pairs:ma.pairs,seq:pa.seq,set:ya.set,timestamp:as.timestamp},Ju={"tag:yaml.org,2002:binary":da.binary,"tag:yaml.org,2002:merge":Xe.merge,"tag:yaml.org,2002:omap":ga.omap,"tag:yaml.org,2002:pairs":ma.pairs,"tag:yaml.org,2002:set":ya.set,"tag:yaml.org,2002:timestamp":as.timestamp};function Vu(s,e,t){let n=ua.get(e);if(n&&!s)return t&&!n.includes(Xe.merge)?n.concat(Xe.merge):n.slice();let r=n;if(!r)if(Array.isArray(s))r=[];else{let i=Array.from(ua.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(s))for(let i of s)r=r.concat(i);else typeof s=="function"&&(r=s(r.slice()));return t&&(r=r.concat(Xe.merge)),r.reduce((i,a)=>{let l=typeof a=="string"?fa[a]:a;if(!l){let c=JSON.stringify(a),u=Object.keys(fa).map(p=>JSON.stringify(p)).join(", ");throw new Error(`Unknown custom tag ${c}; use one of ${u}`)}return i.includes(l)||i.push(l),i},[])}o(Vu,"getTags");An.coreKnownTags=Ju;An.getTags=Vu});var Nn=b(ka=>{"use strict";var Tn=N(),zu=xe(),Wu=Ne(),Gu=We(),os=ba(),Qu=o((s,e)=>s.key<e.key?-1:s.key>e.key?1:0,"sortMapEntriesByKey"),xn=class s{static{o(this,"Schema")}constructor({compat:e,customTags:t,merge:n,resolveKnownTags:r,schema:i,sortMapEntries:a,toStringDefaults:l}){this.compat=Array.isArray(e)?os.getTags(e,"compat"):e?os.getTags(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=r?os.coreKnownTags:{},this.tags=os.getTags(t,this.name,n),this.toStringOptions=l??null,Object.defineProperty(this,Tn.MAP,{value:zu.map}),Object.defineProperty(this,Tn.SCALAR,{value:Gu.string}),Object.defineProperty(this,Tn.SEQ,{value:Wu.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?Qu:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};ka.Schema=xn});var Sa=b(wa=>{"use strict";var Hu=N(),En=Je(),et=Fe();function Zu(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 r=En.createStringifyContext(s,e),{commentString:i}=r.options;if(s.commentBefore){t.length!==1&&t.unshift("");let c=i(s.commentBefore);t.unshift(et.indentComment(c,""))}let a=!1,l=null;if(s.contents){if(Hu.isNode(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){let p=i(s.contents.commentBefore);t.push(et.indentComment(p,""))}r.forceBlockIndent=!!s.comment,l=s.contents.comment}let c=l?void 0:()=>a=!0,u=En.stringify(s.contents,r,()=>l=null,c);l&&(u+=et.lineComment(u,"",i(l))),(u[0]==="|"||u[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${u}`:t.push(u)}else t.push(En.stringify(s.contents,r));if(s.directives?.docEnd)if(s.comment){let c=i(s.comment);c.includes(`
|
|
57
|
+
`)?(t.push("..."),t.push(et.indentComment(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=s.comment;c&&a&&(c=c.replace(/^\n+/,"")),c&&((!a||l)&&t[t.length-1]!==""&&t.push(""),t.push(et.indentComment(i(c),"")))}return t.join(`
|
|
58
|
+
`)+`
|
|
59
|
+
`}o(Zu,"stringifyDocument");wa.stringifyDocument=Zu});var tt=b(va=>{"use strict";var Xu=De(),Le=Et(),B=N(),ef=ne(),tf=X(),sf=Nn(),nf=Sa(),Ln=At(),rf=Ps(),af=Be(),On=qs(),qn=class s{static{o(this,"Document")}constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,B.NODE_TYPE,{value:B.DOC});let r=null;typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t,t=void 0);let i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=i;let{version:a}=i;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new On.Directives({version:a}),this.setSchema(a,n),this.contents=e===void 0?null:this.createNode(e,r,n)}clone(){let e=Object.create(s.prototype,{[B.NODE_TYPE]:{value:B.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=B.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Oe(this.contents)&&this.contents.add(e)}addIn(e,t){Oe(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=Ln.anchorNames(this);e.anchor=!t||n.has(t)?Ln.findNewAnchor(t||"a",n):t}return new Xu.Alias(e.anchor)}createNode(e,t,n){let r;if(typeof t=="function")e=t.call({"":e},"",e),r=t;else if(Array.isArray(t)){let m=o(w=>typeof w=="number"||w instanceof String||w instanceof Number,"keyToStr"),k=t.filter(m).map(String);k.length>0&&(t=t.concat(k)),r=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:i,anchorPrefix:a,flow:l,keepUndefined:c,onTagObj:u,tag:p}=n??{},{onAnchor:f,setAnchors:h,sourceObjects:g}=Ln.createNodeAnchors(this,a||"a"),y={aliasDuplicateObjects:i??!0,keepUndefined:c??!1,onAnchor:f,onTagObj:u,replacer:r,schema:this.schema,sourceObjects:g},d=af.createNode(e,p,y);return l&&B.isCollection(d)&&(d.flow=!0),h(),d}createPair(e,t,n={}){let r=this.createNode(e,null,n),i=this.createNode(t,null,n);return new ef.Pair(r,i)}delete(e){return Oe(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Le.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Oe(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return B.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Le.isEmptyPath(e)?!t&&B.isScalar(this.contents)?this.contents.value:this.contents:B.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return B.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Le.isEmptyPath(e)?this.contents!==void 0:B.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Le.collectionFromPath(this.schema,[e],t):Oe(this.contents)&&this.contents.set(e,t)}setIn(e,t){Le.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=Le.collectionFromPath(this.schema,Array.from(e),t):Oe(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 On.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 On.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let r=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new sf.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:r,onAnchor:i,reviver:a}={}){let l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},c=tf.toJS(this.contents,t??"",l);if(typeof i=="function")for(let{count:u,res:p}of l.anchors.values())i(p,u);return typeof a=="function"?rf.applyReviver(a,{"":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 nf.stringifyDocument(this,e)}};function Oe(s){if(B.isCollection(s))return!0;throw new Error("Expected a YAML collection as document contents")}o(Oe,"assertCollection");va.Document=qn});var rt=b(nt=>{"use strict";var st=class extends Error{static{o(this,"YAMLError")}constructor(e,t,n,r){super(),this.name=e,this.code=n,this.message=r,this.pos=t}},Pn=class extends st{static{o(this,"YAMLParseError")}constructor(e,t,n){super("YAMLParseError",e,t,n)}},Cn=class extends st{static{o(this,"YAMLWarning")}constructor(e,t,n){super("YAMLWarning",e,t,n)}},of=o((s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(l=>e.linePos(l));let{line:n,col:r}=t.linePos[0];t.message+=` at line ${n}, column ${r}`;let i=r-1,a=s.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&a.length>80){let l=Math.min(i-39,a.length-79);a="\u2026"+a.substring(l),i-=l-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),n>1&&/^ *$/.test(a.substring(0,i))){let l=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`\u2026
|
|
60
|
+
`),a=l+a}if(/[^ ]/.test(a)){let l=1,c=t.linePos[1];c?.line===n&&c.col>r&&(l=Math.max(1,Math.min(c.col-r,80-i)));let u=" ".repeat(i)+"^".repeat(l);t.message+=`:
|
|
61
|
+
|
|
62
|
+
${a}
|
|
63
|
+
${u}
|
|
64
|
+
`}},"prettifyError");nt.YAMLError=st;nt.YAMLParseError=Pn;nt.YAMLWarning=Cn;nt.prettifyError=of});var it=b(Aa=>{"use strict";function lf(s,{flow:e,indicator:t,next:n,offset:r,onError:i,parentIndent:a,startOnNewline:l}){let c=!1,u=l,p=l,f="",h="",g=!1,y=!1,d=null,m=null,k=null,w=null,v=null,A=null,x=null;for(let S of s)switch(y&&(S.type!=="space"&&S.type!=="newline"&&S.type!=="comma"&&i(S.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),d&&(u&&S.type!=="comment"&&S.type!=="newline"&&i(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),d=null),S.type){case"space":!e&&(t!=="doc-start"||n?.type!=="flow-collection")&&S.source.includes(" ")&&(d=S),p=!0;break;case"comment":{p||i(S,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let C=S.source.substring(1)||" ";f?f+=h+C:f=C,h="",u=!1;break}case"newline":u?f?f+=S.source:(!A||t!=="seq-item-ind")&&(c=!0):h+=S.source,u=!0,g=!0,(m||k)&&(w=S),p=!0;break;case"anchor":m&&i(S,"MULTIPLE_ANCHORS","A node can have at most one anchor"),S.source.endsWith(":")&&i(S.offset+S.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=S,x??(x=S.offset),u=!1,p=!1,y=!0;break;case"tag":{k&&i(S,"MULTIPLE_TAGS","A node can have at most one tag"),k=S,x??(x=S.offset),u=!1,p=!1,y=!0;break}case t:(m||k)&&i(S,"BAD_PROP_ORDER",`Anchors and tags must be after the ${S.source} indicator`),A&&i(S,"UNEXPECTED_TOKEN",`Unexpected ${S.source} in ${e??"collection"}`),A=S,u=t==="seq-item-ind"||t==="explicit-key-ind",p=!1;break;case"comma":if(e){v&&i(S,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),v=S,u=!1,p=!1;break}default:i(S,"UNEXPECTED_TOKEN",`Unexpected ${S.type} token`),u=!1,p=!1}let T=s[s.length-1],E=T?T.offset+T.source.length:r;return y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),d&&(u&&d.indent<=a||n?.type==="block-map"||n?.type==="block-seq")&&i(d,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:v,found:A,spaceBefore:c,comment:f,hasNewline:g,anchor:m,tag:k,newlineAfterProp:w,end:E,start:x??E}}o(lf,"resolveProps");Aa.resolveProps=lf});var ls=b(Ta=>{"use strict";function $n(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($n(e.key)||$n(e.value))return!0}return!1;default:return!0}}o($n,"containsNewline");Ta.containsNewline=$n});var In=b(xa=>{"use strict";var cf=ls();function uf(s,e,t){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&cf.containsNewline(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}o(uf,"flowIndentCheck");xa.flowIndentCheck=uf});var _n=b(Ea=>{"use strict";var Na=N();function ff(s,e,t){let{uniqueKeys:n}=s.options;if(n===!1)return!1;let r=typeof n=="function"?n:(i,a)=>i===a||Na.isScalar(i)&&Na.isScalar(a)&&i.value===a.value;return e.some(i=>r(i.key,t))}o(ff,"mapIncludes");Ea.mapIncludes=ff});var $a=b(Ca=>{"use strict";var La=ne(),hf=ie(),Oa=it(),pf=ls(),qa=In(),df=_n(),Pa="All mapping items must start at the same column";function gf({composeNode:s,composeEmptyNode:e},t,n,r,i){let a=i?.nodeClass??hf.YAMLMap,l=new a(t.schema);t.atRoot&&(t.atRoot=!1);let c=n.offset,u=null;for(let p of n.items){let{start:f,key:h,sep:g,value:y}=p,d=Oa.resolveProps(f,{indicator:"explicit-key-ind",next:h??g?.[0],offset:c,onError:r,parentIndent:n.indent,startOnNewline:!0}),m=!d.found;if(m){if(h&&(h.type==="block-seq"?r(c,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in h&&h.indent!==n.indent&&r(c,"BAD_INDENT",Pa)),!d.anchor&&!d.tag&&!g){u=d.end,d.comment&&(l.comment?l.comment+=`
|
|
66
|
+
`+d.comment:l.comment=d.comment);continue}(d.newlineAfterProp||pf.containsNewline(h))&&r(h??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else d.found?.indent!==n.indent&&r(c,"BAD_INDENT",Pa);t.atKey=!0;let k=d.end,w=h?s(t,h,d,r):e(t,k,f,null,d,r);t.schema.compat&&qa.flowIndentCheck(n.indent,h,r),t.atKey=!1,df.mapIncludes(t,l.items,w)&&r(k,"DUPLICATE_KEY","Map keys must be unique");let v=Oa.resolveProps(g??[],{indicator:"map-value-ind",next:y,offset:w.range[2],onError:r,parentIndent:n.indent,startOnNewline:!h||h.type==="block-scalar"});if(c=v.end,v.found){m&&(y?.type==="block-map"&&!v.hasNewline&&r(c,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&d.start<v.found.offset-1024&&r(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let A=y?s(t,y,v,r):e(t,c,g,null,v,r);t.schema.compat&&qa.flowIndentCheck(n.indent,y,r),c=A.range[2];let x=new La.Pair(w,A);t.options.keepSourceTokens&&(x.srcToken=p),l.items.push(x)}else{m&&r(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),v.comment&&(w.comment?w.comment+=`
|
|
67
|
+
`+v.comment:w.comment=v.comment);let A=new La.Pair(w);t.options.keepSourceTokens&&(A.srcToken=p),l.items.push(A)}}return u&&u<c&&r(u,"IMPOSSIBLE","Map comment with trailing content"),l.range=[n.offset,c,u??c],l}o(gf,"resolveBlockMap");Ca.resolveBlockMap=gf});var _a=b(Ia=>{"use strict";var mf=ae(),yf=it(),bf=In();function kf({composeNode:s,composeEmptyNode:e},t,n,r,i){let a=i?.nodeClass??mf.YAMLSeq,l=new a(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let c=n.offset,u=null;for(let{start:p,value:f}of n.items){let h=yf.resolveProps(p,{indicator:"seq-item-ind",next:f,offset:c,onError:r,parentIndent:n.indent,startOnNewline:!0});if(!h.found)if(h.anchor||h.tag||f)f?.type==="block-seq"?r(h.end,"BAD_INDENT","All sequence items must start at the same column"):r(c,"MISSING_CHAR","Sequence item without - indicator");else{u=h.end,h.comment&&(l.comment=h.comment);continue}let g=f?s(t,f,h,r):e(t,h.end,p,null,h,r);t.schema.compat&&bf.flowIndentCheck(n.indent,f,r),c=g.range[2],l.items.push(g)}return l.range=[n.offset,c,u??c],l}o(kf,"resolveBlockSeq");Ia.resolveBlockSeq=kf});var qe=b(Ra=>{"use strict";function wf(s,e,t,n){let r="";if(s){let i=!1,a="";for(let l of s){let{source:c,type:u}=l;switch(u){case"space":i=!0;break;case"comment":{t&&!i&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let p=c.substring(1)||" ";r?r+=a+p:r=p,a="";break}case"newline":r&&(a+=c),i=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=c.length}}return{comment:r,offset:e}}o(wf,"resolveEnd");Ra.resolveEnd=wf});var Ba=b(Da=>{"use strict";var Sf=N(),vf=ne(),Ma=ie(),Af=ae(),Tf=qe(),ja=it(),xf=ls(),Nf=_n(),Rn="Block collections are not allowed within flow collections",Mn=o(s=>s&&(s.type==="block-map"||s.type==="block-seq"),"isBlock");function Ef({composeNode:s,composeEmptyNode:e},t,n,r,i){let a=n.start.source==="{",l=a?"flow map":"flow sequence",c=i?.nodeClass??(a?Ma.YAMLMap:Af.YAMLSeq),u=new c(t.schema);u.flow=!0;let p=t.atRoot;p&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=n.offset+n.start.source.length;for(let m=0;m<n.items.length;++m){let k=n.items[m],{start:w,key:v,sep:A,value:x}=k,T=ja.resolveProps(w,{flow:l,indicator:"explicit-key-ind",next:v??A?.[0],offset:f,onError:r,parentIndent:n.indent,startOnNewline:!1});if(!T.found){if(!T.anchor&&!T.tag&&!A&&!x){m===0&&T.comma?r(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):m<n.items.length-1&&r(T.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),T.comment&&(u.comment?u.comment+=`
|
|
68
|
+
`+T.comment:u.comment=T.comment),f=T.end;continue}!a&&t.options.strict&&xf.containsNewline(v)&&r(v,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)T.comma&&r(T.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(T.comma||r(T.start,"MISSING_CHAR",`Missing , between ${l} items`),T.comment){let E="";e:for(let S of w)switch(S.type){case"comma":case"space":break;case"comment":E=S.source.substring(1);break e;default:break e}if(E){let S=u.items[u.items.length-1];Sf.isPair(S)&&(S=S.value??S.key),S.comment?S.comment+=`
|
|
69
|
+
`+E:S.comment=E,T.comment=T.comment.substring(E.length+1)}}if(!a&&!A&&!T.found){let E=x?s(t,x,T,r):e(t,T.end,A,null,T,r);u.items.push(E),f=E.range[2],Mn(x)&&r(E.range,"BLOCK_IN_FLOW",Rn)}else{t.atKey=!0;let E=T.end,S=v?s(t,v,T,r):e(t,E,w,null,T,r);Mn(v)&&r(S.range,"BLOCK_IN_FLOW",Rn),t.atKey=!1;let C=ja.resolveProps(A??[],{flow:l,indicator:"map-value-ind",next:x,offset:S.range[2],onError:r,parentIndent:n.indent,startOnNewline:!1});if(C.found){if(!a&&!T.found&&t.options.strict){if(A)for(let $ of A){if($===C.found)break;if($.type==="newline"){r($,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}T.start<C.found.offset-1024&&r(C.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else x&&("source"in x&&x.source?.[0]===":"?r(x,"MISSING_CHAR",`Missing space after : in ${l}`):r(C.start,"MISSING_CHAR",`Missing , or : between ${l} items`));let Z=x?s(t,x,C,r):C.found?e(t,C.end,A,null,C,r):null;Z?Mn(x)&&r(Z.range,"BLOCK_IN_FLOW",Rn):C.comment&&(S.comment?S.comment+=`
|
|
70
|
+
`+C.comment:S.comment=C.comment);let we=new vf.Pair(S,Z);if(t.options.keepSourceTokens&&(we.srcToken=k),a){let $=u;Nf.mapIncludes(t,$.items,S)&&r(E,"DUPLICATE_KEY","Map keys must be unique"),$.items.push(we)}else{let $=new Ma.YAMLMap(t.schema);$.flow=!0,$.items.push(we);let Dr=(Z??S).range;$.range=[S.range[0],Dr[1],Dr[2]],u.items.push($)}f=Z?Z.range[2]:C.end}}let h=a?"}":"]",[g,...y]=n.end,d=f;if(g?.source===h)d=g.offset+g.source.length;else{let m=l[0].toUpperCase()+l.substring(1),k=p?`${m} must end with a ${h}`:`${m} in block collection must be sufficiently indented and end with a ${h}`;r(f,p?"MISSING_CHAR":"BAD_INDENT",k),g&&g.source.length!==1&&y.unshift(g)}if(y.length>0){let m=Tf.resolveEnd(y,d,t.options.strict,r);m.comment&&(u.comment?u.comment+=`
|
|
71
|
+
`+m.comment:u.comment=m.comment),u.range=[n.offset,d,m.offset]}else u.range=[n.offset,d,d];return u}o(Ef,"resolveFlowCollection");Da.resolveFlowCollection=Ef});var Ka=b(Fa=>{"use strict";var Lf=N(),Of=P(),qf=ie(),Pf=ae(),Cf=$a(),$f=_a(),If=Ba();function jn(s,e,t,n,r,i){let a=t.type==="block-map"?Cf.resolveBlockMap(s,e,t,n,i):t.type==="block-seq"?$f.resolveBlockSeq(s,e,t,n,i):If.resolveFlowCollection(s,e,t,n,i),l=a.constructor;return r==="!"||r===l.tagName?(a.tag=l.tagName,a):(r&&(a.tag=r),a)}o(jn,"resolveCollection");function _f(s,e,t,n,r){let i=n.tag,a=i?e.directives.tagName(i.source,h=>r(i,"TAG_RESOLVE_FAILED",h)):null;if(t.type==="block-seq"){let{anchor:h,newlineAfterProp:g}=n,y=h&&i?h.offset>i.offset?h:i:h??i;y&&(!g||g.offset<y.offset)&&r(y,"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(!i||!a||a==="!"||a===qf.YAMLMap.tagName&&l==="map"||a===Pf.YAMLSeq.tagName&&l==="seq")return jn(s,e,t,r,a);let c=e.schema.tags.find(h=>h.tag===a&&h.collection===l);if(!c){let h=e.schema.knownTags[a];if(h?.collection===l)e.schema.tags.push(Object.assign({},h,{default:!1})),c=h;else return h?r(i,"BAD_COLLECTION_TYPE",`${h.tag} used for ${l} collection, but expects ${h.collection??"scalar"}`,!0):r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),jn(s,e,t,r,a)}let u=jn(s,e,t,r,a,c),p=c.resolve?.(u,h=>r(i,"TAG_RESOLVE_FAILED",h),e.options)??u,f=Lf.isNode(p)?p:new Of.Scalar(p);return f.range=u.range,f.tag=a,c?.format&&(f.format=c.format),f}o(_f,"composeCollection");Fa.composeCollection=_f});var Bn=b(Ua=>{"use strict";var Dn=P();function Rf(s,e,t){let n=e.offset,r=Mf(e,s.options.strict,t);if(!r)return{value:"",type:null,comment:"",range:[n,n,n]};let i=r.mode===">"?Dn.Scalar.BLOCK_FOLDED:Dn.Scalar.BLOCK_LITERAL,a=e.source?jf(e.source):[],l=a.length;for(let d=a.length-1;d>=0;--d){let m=a[d][1];if(m===""||m==="\r")l=d;else break}if(l===0){let d=r.chomp==="+"&&a.length>0?`
|
|
72
|
+
`.repeat(Math.max(1,a.length-1)):"",m=n+r.length;return e.source&&(m+=e.source.length),{value:d,type:i,comment:r.comment,range:[n,m,m]}}let c=e.indent+r.indent,u=e.offset+r.length,p=0;for(let d=0;d<l;++d){let[m,k]=a[d];if(k===""||k==="\r")r.indent===0&&m.length>c&&(c=m.length);else{m.length<c&&t(u+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(c=m.length),p=d,c===0&&!s.atRoot&&t(u,"BAD_INDENT","Block scalar values in collections must be indented");break}u+=m.length+k.length+1}for(let d=a.length-1;d>=l;--d)a[d][0].length>c&&(l=d+1);let f="",h="",g=!1;for(let d=0;d<p;++d)f+=a[d][0].slice(c)+`
|
|
73
|
+
`;for(let d=p;d<l;++d){let[m,k]=a[d];u+=m.length+k.length+1;let w=k[k.length-1]==="\r";if(w&&(k=k.slice(0,-1)),k&&m.length<c){let A=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;t(u-k.length-(w?2:1),"BAD_INDENT",A),m=""}i===Dn.Scalar.BLOCK_LITERAL?(f+=h+m.slice(c)+k,h=`
|
|
74
|
+
`):m.length>c||k[0]===" "?(h===" "?h=`
|
|
75
|
+
`:!g&&h===`
|
|
76
|
+
`&&(h=`
|
|
77
|
+
|
|
78
|
+
`),f+=h+m.slice(c)+k,h=`
|
|
79
|
+
`,g=!0):k===""?h===`
|
|
80
|
+
`?f+=`
|
|
81
|
+
`:h=`
|
|
82
|
+
`:(f+=h+k,h=" ",g=!1)}switch(r.chomp){case"-":break;case"+":for(let d=l;d<a.length;++d)f+=`
|
|
83
|
+
`+a[d][0].slice(c);f[f.length-1]!==`
|
|
84
|
+
`&&(f+=`
|
|
85
|
+
`);break;default:f+=`
|
|
86
|
+
`}let y=n+r.length+e.source.length;return{value:f,type:i,comment:r.comment,range:[n,y,y]}}o(Rf,"resolveBlockScalar");function Mf({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:r}=e[0],i=r[0],a=0,l="",c=-1;for(let h=1;h<r.length;++h){let g=r[h];if(!l&&(g==="-"||g==="+"))l=g;else{let y=Number(g);!a&&y?a=y:c===-1&&(c=s+h)}}c!==-1&&n(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let u=!1,p="",f=r.length;for(let h=1;h<e.length;++h){let g=e[h];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,p=g.source.substring(1);break;case"error":n(g,"UNEXPECTED_TOKEN",g.message),f+=g.source.length;break;default:{let y=`Unexpected token in block scalar header: ${g.type}`;n(g,"UNEXPECTED_TOKEN",y);let d=g.source;d&&typeof d=="string"&&(f+=d.length)}}}return{mode:i,indent:a,chomp:l,comment:p,length:f}}o(Mf,"parseBlockScalarHeader");function jf(s){let e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),i=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let a=1;a<e.length;a+=2)i.push([e[a],e[a+1]]);return i}o(jf,"splitLines");Ua.resolveBlockScalar=Rf});var Kn=b(Ja=>{"use strict";var Fn=P(),Df=qe();function Bf(s,e,t){let{offset:n,type:r,source:i,end:a}=s,l,c,u=o((h,g,y)=>t(n+h,g,y),"_onError");switch(r){case"scalar":l=Fn.Scalar.PLAIN,c=Ff(i,u);break;case"single-quoted-scalar":l=Fn.Scalar.QUOTE_SINGLE,c=Kf(i,u);break;case"double-quoted-scalar":l=Fn.Scalar.QUOTE_DOUBLE,c=Uf(i,u);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}let p=n+i.length,f=Df.resolveEnd(a,p,e,t);return{value:c,type:l,comment:f.comment,range:[n,p,f.offset]}}o(Bf,"resolveFlowScalar");function Ff(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}`),Ya(s)}o(Ff,"plainValue");function Kf(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),Ya(s.slice(1,-1)).replace(/''/g,"'")}o(Kf,"singleQuotedValue");function Ya(s){let e=/(.*?)\r?\n/sy,t=e.exec(s);if(!t)return s;let n,r;try{n=new RegExp("(?<![ ])[ ]+$"),r=new RegExp("^[ ]+|(?<![ ])[ ]+$","g")}catch{n=/[ \t]+$/,r=/^[ \t]+|[ \t]+$/g}let i=t[1].replace(n,""),a=" ",l=e.lastIndex;for(;t=e.exec(s);){let u=t[1].replace(r,"");u===""?a===`
|
|
87
|
+
`?i+=a:a=`
|
|
88
|
+
`:(i+=a+u,a=" "),l=e.lastIndex}let c=/[ \t]*(.*)/sy;return c.lastIndex=l,t=c.exec(s),i+a+(t?.[1]??"")}o(Ya,"unfoldLines");function Uf(s,e){let t="";for(let n=1;n<s.length-1;++n){let r=s[n];if(!(r==="\r"&&s[n+1]===`
|
|
89
|
+
`))if(r===`
|
|
90
|
+
`){let{fold:i,offset:a}=Yf(s,n);t+=i,n=a}else if(r==="\\"){let i=s[++n],a=Jf[i];if(a)t+=a;else if(i===`
|
|
91
|
+
`)for(i=s[n+1];i===" "||i===" ";)i=s[++n+1];else if(i==="\r"&&s[n+1]===`
|
|
92
|
+
`)for(i=s[++n+1];i===" "||i===" ";)i=s[++n+1];else if(i==="x"||i==="u"||i==="U"){let l=i==="x"?2:i==="u"?4:8;t+=Vf(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(r===" "||r===" "){let i=n,a=s[n+1];for(;a===" "||a===" ";)a=s[++n+1];a!==`
|
|
93
|
+
`&&!(a==="\r"&&s[n+2]===`
|
|
94
|
+
`)&&(t+=n>i?s.slice(i,n+1):r)}else t+=r}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}o(Uf,"doubleQuotedValue");function Yf(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}}o(Yf,"foldNewline");var Jf={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 Vf(s,e,t,n){let r=s.substr(e,t),a=r.length===t&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(a)}catch{let l=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}}o(Vf,"parseCharCode");Ja.resolveFlowScalar=Bf});var Wa=b(za=>{"use strict";var ge=N(),Va=P(),zf=Bn(),Wf=Kn();function Gf(s,e,t,n){let{value:r,type:i,comment:a,range:l}=e.type==="block-scalar"?zf.resolveBlockScalar(s,e,n):Wf.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[ge.SCALAR]:c?u=Qf(s.schema,r,c,t,n):e.type==="scalar"?u=Hf(s,r,e,n):u=s.schema[ge.SCALAR];let p;try{let f=u.resolve(r,h=>n(t??e,"TAG_RESOLVE_FAILED",h),s.options);p=ge.isScalar(f)?f:new Va.Scalar(f)}catch(f){let h=f instanceof Error?f.message:String(f);n(t??e,"TAG_RESOLVE_FAILED",h),p=new Va.Scalar(r)}return p.range=l,p.source=r,i&&(p.type=i),c&&(p.tag=c),u.format&&(p.format=u.format),a&&(p.comment=a),p}o(Gf,"composeScalar");function Qf(s,e,t,n,r){if(t==="!")return s[ge.SCALAR];let i=[];for(let l of s.tags)if(!l.collection&&l.tag===t)if(l.default&&l.test)i.push(l);else return l;for(let l of i)if(l.test?.test(e))return l;let a=s.knownTags[t];return a&&!a.collection?(s.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(r(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[ge.SCALAR])}o(Qf,"findScalarTagByName");function Hf({atKey:s,directives:e,schema:t},n,r,i){let a=t.tags.find(l=>(l.default===!0||s&&l.default==="key")&&l.test?.test(n))||t[ge.SCALAR];if(t.compat){let l=t.compat.find(c=>c.default&&c.test?.test(n))??t[ge.SCALAR];if(a.tag!==l.tag){let c=e.tagString(a.tag),u=e.tagString(l.tag),p=`Value may be parsed as either ${c} or ${u}`;i(r,"TAG_RESOLVE_FAILED",p,!0)}}return a}o(Hf,"findScalarTagByTest");za.composeScalar=Gf});var Qa=b(Ga=>{"use strict";function Zf(s,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let r=e[n];switch(r.type){case"space":case"comment":case"newline":s-=r.source.length;continue}for(r=e[++n];r?.type==="space";)s+=r.source.length,r=e[++n];break}}return s}o(Zf,"emptyScalarPosition");Ga.emptyScalarPosition=Zf});var Xa=b(Yn=>{"use strict";var Xf=De(),eh=N(),th=Ka(),Ha=Wa(),sh=qe(),nh=Qa(),rh={composeNode:Za,composeEmptyNode:Un};function Za(s,e,t,n){let r=s.atKey,{spaceBefore:i,comment:a,anchor:l,tag:c}=t,u,p=!0;switch(e.type){case"alias":u=ih(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=Ha.composeScalar(s,e,c,n),l&&(u.anchor=l.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{u=th.composeCollection(rh,s,e,t,n),l&&(u.anchor=l.source.substring(1))}catch(f){let h=f instanceof Error?f.message:String(f);n(e,"RESOURCE_EXHAUSTION",h)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",f),p=!1}}return u??(u=Un(s,e.offset,void 0,null,t,n)),l&&u.anchor===""&&n(l,"BAD_ALIAS","Anchor cannot be an empty string"),r&&s.options.stringKeys&&(!eh.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"),i&&(u.spaceBefore=!0),a&&(e.type==="scalar"&&e.source===""?u.comment=a:u.commentBefore=a),s.options.keepSourceTokens&&p&&(u.srcToken=e),u}o(Za,"composeNode");function Un(s,e,t,n,{spaceBefore:r,comment:i,anchor:a,tag:l,end:c},u){let p={type:"scalar",offset:nh.emptyScalarPosition(e,t,n),indent:-1,source:""},f=Ha.composeScalar(s,p,l,u);return a&&(f.anchor=a.source.substring(1),f.anchor===""&&u(a,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=c),f}o(Un,"composeEmptyNode");function ih({options:s},{offset:e,source:t,end:n},r){let i=new Xf.Alias(t.substring(1));i.source===""&&r(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&r(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=e+t.length,l=sh.resolveEnd(n,a,s.strict,r);return i.range=[e,a,l.offset],l.comment&&(i.comment=l.comment),i}o(ih,"composeAlias");Yn.composeEmptyNode=Un;Yn.composeNode=Za});var so=b(to=>{"use strict";var ah=tt(),eo=Xa(),oh=qe(),lh=it();function ch(s,e,{offset:t,start:n,value:r,end:i},a){let l=Object.assign({_directives:e},s),c=new ah.Document(void 0,l),u={atKey:!1,atRoot:!0,directives:c.directives,options:c.options,schema:c.schema},p=lh.resolveProps(n,{indicator:"doc-start",next:r??i?.[0],offset:t,onError:a,parentIndent:0,startOnNewline:!0});p.found&&(c.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!p.hasNewline&&a(p.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),c.contents=r?eo.composeNode(u,r,p,a):eo.composeEmptyNode(u,p.end,n,null,p,a);let f=c.contents.range[2],h=oh.resolveEnd(i,f,!1,a);return h.comment&&(c.comment=h.comment),c.range=[t,f,h.offset],c}o(ch,"composeDoc");to.composeDoc=ch});var Vn=b(io=>{"use strict";var uh=yt("process"),fh=qs(),hh=tt(),at=rt(),no=N(),ph=so(),dh=qe();function ot(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)]}o(ot,"getErrorPos");function ro(s){let e="",t=!1,n=!1;for(let r=0;r<s.length;++r){let i=s[r];switch(i[0]){case"#":e+=(e===""?"":n?`
|
|
100
|
+
|
|
101
|
+
`:`
|
|
102
|
+
`)+(i.substring(1)||" "),t=!0,n=!1;break;case"%":s[r+1]?.[0]!=="#"&&(r+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}o(ro,"parsePrelude");var Jn=class{static{o(this,"Composer")}constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,r,i)=>{let a=ot(t);i?this.warnings.push(new at.YAMLWarning(a,n,r)):this.errors.push(new at.YAMLParseError(a,n,r))},this.directives=new fh.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:r}=ro(this.prelude);if(n){let i=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
103
|
+
${n}`:n;else if(r||e.directives.docStart||!i)e.commentBefore=n;else if(no.isCollection(i)&&!i.flow&&i.items.length>0){let a=i.items[0];no.isPair(a)&&(a=a.key);let l=a.commentBefore;a.commentBefore=l?`${n}
|
|
104
|
+
${l}`:n}else{let a=i.commentBefore;i.commentBefore=a?`${n}
|
|
105
|
+
${a}`:n}}if(t){for(let i=0;i<this.errors.length;++i)e.errors.push(this.errors[i]);for(let i=0;i<this.warnings.length;++i)e.warnings.push(this.warnings[i])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:ro(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let r of e)yield*this.next(r);yield*this.end(t,n)}*next(e){switch(uh.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,n,r)=>{let i=ot(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",n,r)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=ph.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 at.YAMLParseError(ot(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 at.YAMLParseError(ot(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let t=dh.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 at.YAMLParseError(ot(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),r=new hh.Document(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}};io.Composer=Jn});var lo=b(cs=>{"use strict";var gh=Bn(),mh=Kn(),yh=rt(),ao=Ye();function bh(s,e=!0,t){if(s){let n=o((r,i,a)=>{let l=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(t)t(l,i,a);else throw new yh.YAMLParseError([l,l+1],i,a)},"_onError");switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return mh.resolveFlowScalar(s,e,n);case"block-scalar":return gh.resolveBlockScalar({options:{strict:e}},s,n)}}return null}o(bh,"resolveAsScalar");function kh(s,e){let{implicitKey:t=!1,indent:n,inFlow:r=!1,offset:i=-1,type:a="PLAIN"}=e,l=ao.stringifyString({type:a,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:r,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
|
+
`),p=l.substring(0,u),f=l.substring(u+1)+`
|
|
109
|
+
`,h=[{type:"block-scalar-header",offset:i,indent:n,source:p}];return oo(h,c)||h.push({type:"newline",offset:-1,indent:n,source:`
|
|
110
|
+
`}),{type:"block-scalar",offset:i,indent:n,props:h,source:f}}case'"':return{type:"double-quoted-scalar",offset:i,indent:n,source:l,end:c};case"'":return{type:"single-quoted-scalar",offset:i,indent:n,source:l,end:c};default:return{type:"scalar",offset:i,indent:n,source:l,end:c}}}o(kh,"createScalarToken");function wh(s,e,t={}){let{afterKey:n=!1,implicitKey:r=!1,inFlow:i=!1,type:a}=t,l="indent"in s?s.indent:null;if(n&&typeof l=="number"&&(l+=2),!a)switch(s.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let u=s.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let c=ao.stringifyString({type:a,value:e},{implicitKey:r||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(c[0]){case"|":case">":Sh(s,c);break;case'"':zn(s,c,"double-quoted-scalar");break;case"'":zn(s,c,"single-quoted-scalar");break;default:zn(s,c,"scalar")}}o(wh,"setScalarValue");function Sh(s,e){let t=e.indexOf(`
|
|
111
|
+
`),n=e.substring(0,t),r=e.substring(t+1)+`
|
|
112
|
+
`;if(s.type==="block-scalar"){let i=s.props[0];if(i.type!=="block-scalar-header")throw new Error("Invalid block scalar header");i.source=n,s.source=r}else{let{offset:i}=s,a="indent"in s?s.indent:-1,l=[{type:"block-scalar-header",offset:i,indent:a,source:n}];oo(l,"end"in s?s.end:void 0)||l.push({type:"newline",offset:-1,indent:a,source:`
|
|
113
|
+
`});for(let c of Object.keys(s))c!=="type"&&c!=="offset"&&delete s[c];Object.assign(s,{type:"block-scalar",indent:a,props:l,source:r})}}o(Sh,"setBlockScalarValue");function oo(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}o(oo,"addEndtoBlockProps");function zn(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),r=e.length;s.props[0].type==="block-scalar-header"&&(r-=s.props[0].source.length);for(let i of n)i.offset+=r;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let r={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
|
|
114
|
+
`};delete s.items,Object.assign(s,{type:t,source:e,end:[r]});break}default:{let n="indent"in s?s.indent:-1,r="end"in s&&Array.isArray(s.end)?s.end.filter(i=>i.type==="space"||i.type==="comment"||i.type==="newline"):[];for(let i of Object.keys(s))i!=="type"&&i!=="offset"&&delete s[i];Object.assign(s,{type:t,indent:n,source:e,end:r})}}}o(zn,"setFlowScalarValue");cs.createScalarToken=kh;cs.resolveAsScalar=bh;cs.setScalarValue=wh});var uo=b(co=>{"use strict";var vh=o(s=>"type"in s?fs(s):us(s),"stringify");function fs(s){switch(s.type){case"block-scalar":{let e="";for(let t of s.props)e+=fs(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(let t of s.items)e+=us(t);return e}case"flow-collection":{let e=s.start.source;for(let t of s.items)e+=us(t);for(let t of s.end)e+=t.source;return e}case"document":{let e=us(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}}}o(fs,"stringifyToken");function us({start:s,key:e,sep:t,value:n}){let r="";for(let i of s)r+=i.source;if(e&&(r+=fs(e)),t)for(let i of t)r+=i.source;return n&&(r+=fs(n)),r}o(us,"stringifyItem");co.stringify=vh});var go=b(po=>{"use strict";var Wn=Symbol("break visit"),Ah=Symbol("skip children"),fo=Symbol("remove item");function me(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),ho(Object.freeze([]),s,e)}o(me,"visit");me.BREAK=Wn;me.SKIP=Ah;me.REMOVE=fo;me.itemAtPath=(s,e)=>{let t=s;for(let[n,r]of e){let i=t?.[n];if(i&&"items"in i)t=i.items[r];else return}return t};me.parentCollection=(s,e)=>{let t=me.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],r=t?.[n];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function ho(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(let r of["key","value"]){let i=e[r];if(i&&"items"in i){for(let a=0;a<i.items.length;++a){let l=ho(Object.freeze(s.concat([[r,a]])),i.items[a],t);if(typeof l=="number")a=l-1;else{if(l===Wn)return Wn;l===fo&&(i.items.splice(a,1),a-=1)}}typeof n=="function"&&r==="key"&&(n=n(e,s))}}return typeof n=="function"?n(e,s):n}o(ho,"_visit");po.visit=me});var hs=b(D=>{"use strict";var Gn=lo(),Th=uo(),xh=go(),Qn="\uFEFF",Hn="",Zn="",Xn="",Nh=o(s=>!!s&&"items"in s,"isCollection"),Eh=o(s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar"),"isScalar");function Lh(s){switch(s){case Qn:return"<BOM>";case Hn:return"<DOC>";case Zn:return"<FLOW_END>";case Xn:return"<SCALAR>";default:return JSON.stringify(s)}}o(Lh,"prettyToken");function Oh(s){switch(s){case Qn:return"byte-order-mark";case Hn:return"doc-mode";case Zn:return"flow-error-end";case Xn: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}o(Oh,"tokenType");D.createScalarToken=Gn.createScalarToken;D.resolveAsScalar=Gn.resolveAsScalar;D.setScalarValue=Gn.setScalarValue;D.stringify=Th.stringify;D.visit=xh.visit;D.BOM=Qn;D.DOCUMENT=Hn;D.FLOW_END=Zn;D.SCALAR=Xn;D.isCollection=Nh;D.isScalar=Eh;D.prettyToken=Lh;D.tokenType=Oh});var sr=b(yo=>{"use strict";var lt=hs();function U(s){switch(s){case void 0:case" ":case`
|
|
117
|
+
`:case"\r":case" ":return!0;default:return!1}}o(U,"isEmpty");var mo=new Set("0123456789ABCDEFabcdef"),qh=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ps=new Set(",[]{}"),Ph=new Set(` ,[]{}
|
|
118
|
+
\r `),er=o(s=>!s||Ph.has(s),"isNotAnchorChar"),tr=class{static{o(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 r=this.buffer[n+e+1];if(r===`
|
|
121
|
+
`||!r&&!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==="...")&&U(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]===lt.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){let i=e[n-1];if(i===" "||i===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let i=e[t-1];if(i===" "||i===" ")t-=1;else break}let r=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield lt.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==="...")&&U(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&&!U(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===":")&&U(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(er),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&r[0]!=="#"||n===0&&(r.startsWith("---")||r.startsWith("..."))&&U(r[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield lt.FLOW_END,yield*this.parseLineStart();let i=0;for(;r[i]===",";)i+=yield*this.pushCount(1),i+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(i+=yield*this.pushIndicators(),r[i]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(er),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||U(a)||a===",")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 i=0;for(;this.buffer[t-1-i]==="\\";)i+=1;if(i%2===0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),r=n.indexOf(`
|
|
124
|
+
`,this.pos);if(r!==-1){for(;r!==-1;){let i=this.continueScalar(r+1);if(i===-1)break;r=n.indexOf(`
|
|
125
|
+
`,i)}r!==-1&&(t=r-(n[r-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>U(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let i=this.pos;n=this.buffer[i];++i)switch(n){case" ":t+=1;break;case`
|
|
126
|
+
`:e=i,t=0;break;case"\r":{let a=this.buffer[i+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
|
|
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 i=this.continueScalar(e+1);if(i===-1)break;e=this.buffer.indexOf(`
|
|
128
|
+
`,i)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let r=e+1;for(n=this.buffer[r];n===" ";)n=this.buffer[++r];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
|
|
129
|
+
`;)n=this.buffer[++r];e=r-1}else if(!this.blockScalarKeep)do{let i=e-1,a=this.buffer[i];a==="\r"&&(a=this.buffer[--i]);let l=i;for(;a===" ";)a=this.buffer[--i];if(a===`
|
|
130
|
+
`&&i>=this.pos&&i+1+t>l)e=i;else break}while(!0);return yield lt.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,r;for(;r=this.buffer[++n];)if(r===":"){let i=this.buffer[n+1];if(U(i)||e&&ps.has(i))break;t=n}else if(U(r)){let i=this.buffer[n+1];if(r==="\r"&&(i===`
|
|
131
|
+
`?(n+=1,r=`
|
|
132
|
+
`,i=this.buffer[n+1]):t=n),i==="#"||e&&ps.has(i))break;if(r===`
|
|
133
|
+
`){let a=this.continueScalar(n+1);if(a===-1)break;n=Math.max(n,a-2)}}else{if(e&&ps.has(r))break;t=n}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield lt.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(er),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(U(n)||t&&ps.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(;!U(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(qh.has(t))t=this.buffer[++e];else if(t==="%"&&mo.has(this.buffer[e+1])&&mo.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 r=t-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=t),r}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};yo.Lexer=tr});var rr=b(bo=>{"use strict";var nr=class{static{o(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 i=t+n>>1;this.lineStarts[i]<e?t=i+1:n=i}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let r=this.lineStarts[t-1];return{line:t,col:e-r+1}}}};bo.LineCounter=nr});var ar=b(Ao=>{"use strict";var Ch=yt("process"),ko=hs(),$h=sr();function oe(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}o(oe,"includesToken");function wo(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}o(wo,"findNonEmptyIndex");function vo(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}o(vo,"isFlowToken");function ds(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[]}}o(ds,"getPrevProps");function Pe(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)}o(Pe,"getFirstKeyStartProps");function gs(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])}o(gs,"arrayPushArray");function So(s){if(s.start.type==="flow-seq-start")for(let e of s.items)e.sep&&!e.value&&!oe(e.start,"explicit-key-ind")&&!oe(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,vo(e.value)?e.value.end?gs(e.value.end,e.sep):e.value.end=e.sep:gs(e.start,e.sep),delete e.sep)}o(So,"fixFlowSeqItems");var ir=class{static{o(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 $h.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,Ch.env.LOG_TOKENS&&console.log("|",ko.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=ko.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"&&So(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let r=n.items[n.items.length-1];if(r.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=t;else{Object.assign(r,{key:t,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=n.items[n.items.length-1];r.value?n.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{let r=n.items[n.items.length-1];!r||r.value?n.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{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 r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&wo(r.start)===-1&&(t.indent===0||r.start.every(i=>i.type!=="comment"||i.indent<t.indent))&&(n.type==="document"?n.end=r.start:n.items.push({start:r.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":{wo(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=ds(this.peek(2)),n=Pe(t),r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];let i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}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 r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){gs(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",i=[];if(r&&t.sep&&!t.value){let a=[];for(let l=0;l<t.sep.length;++l){let c=t.sep[l];switch(c.type){case"newline":a.push(l);break;case"space":break;case"comment":c.indent>e.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(i=t.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(oe(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(vo(t.key)&&!oe(t.sep,"newline")){let a=Pe(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:a,key:l,sep:c}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(oe(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let a=Pe(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):oe(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 a=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:a,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(a):(Object.assign(t,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(e);if(a){if(a.type==="block-seq"){if(!t.explicitKey&&t.sep&&!oe(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(a);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 r=e.items[e.items.length-2]?.value?.end;if(Array.isArray(r)){gs(r,t.start),r.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||oe(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 r=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,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 r=ds(n),i=Pe(r);So(e);let a=e.end.splice(1,e.end.length);a.push(this.sourceToken);let l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:a}]};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=ds(e),n=Pe(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=ds(e),n=Pe(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())}}};Ao.Parser=ir});var Lo=b(ut=>{"use strict";var To=Vn(),Ih=tt(),ct=rt(),_h=Us(),Rh=N(),Mh=rr(),xo=ar();function No(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new Mh.LineCounter||null,prettyErrors:e}}o(No,"parseOptions");function jh(s,e={}){let{lineCounter:t,prettyErrors:n}=No(e),r=new xo.Parser(t?.addNewLine),i=new To.Composer(e),a=Array.from(i.compose(r.parse(s)));if(n&&t)for(let l of a)l.errors.forEach(ct.prettifyError(s,t)),l.warnings.forEach(ct.prettifyError(s,t));return a.length>0?a:Object.assign([],{empty:!0},i.streamInfo())}o(jh,"parseAllDocuments");function Eo(s,e={}){let{lineCounter:t,prettyErrors:n}=No(e),r=new xo.Parser(t?.addNewLine),i=new To.Composer(e),a=null;for(let l of i.compose(r.parse(s),!0,s.length))if(!a)a=l;else if(a.options.logLevel!=="silent"){a.errors.push(new ct.YAMLParseError(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(a.errors.forEach(ct.prettifyError(s,t)),a.warnings.forEach(ct.prettifyError(s,t))),a}o(Eo,"parseDocument");function Dh(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let r=Eo(s,t);if(!r)return null;if(r.warnings.forEach(i=>_h.warn(r.options.logLevel,i)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:n},t))}o(Dh,"parse");function Bh(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 r=Math.round(t);t=r<1?void 0:r>8?{indent:8}:{indent:r}}if(s===void 0){let{keepUndefined:r}=t??e??{};if(!r)return}return Rh.isDocument(s)&&!n?s.toString(t):new Ih.Document(s,n,t).toString(t)}o(Bh,"stringify");ut.parse=Dh;ut.parseAllDocuments=jh;ut.parseDocument=Eo;ut.stringify=Bh});var qo=b(O=>{"use strict";var Fh=Vn(),Kh=tt(),Uh=Nn(),or=rt(),Yh=De(),le=N(),Jh=ne(),Vh=P(),zh=ie(),Wh=ae(),Gh=hs(),Qh=sr(),Hh=rr(),Zh=ar(),ms=Lo(),Oo=_e();O.Composer=Fh.Composer;O.Document=Kh.Document;O.Schema=Uh.Schema;O.YAMLError=or.YAMLError;O.YAMLParseError=or.YAMLParseError;O.YAMLWarning=or.YAMLWarning;O.Alias=Yh.Alias;O.isAlias=le.isAlias;O.isCollection=le.isCollection;O.isDocument=le.isDocument;O.isMap=le.isMap;O.isNode=le.isNode;O.isPair=le.isPair;O.isScalar=le.isScalar;O.isSeq=le.isSeq;O.Pair=Jh.Pair;O.Scalar=Vh.Scalar;O.YAMLMap=zh.YAMLMap;O.YAMLSeq=Wh.YAMLSeq;O.CST=Gh;O.Lexer=Qh.Lexer;O.LineCounter=Hh.LineCounter;O.Parser=Zh.Parser;O.parse=ms.parse;O.parseAllDocuments=ms.parseAllDocuments;O.parseDocument=ms.parseDocument;O.stringify=ms.stringify;O.visit=Oo.visit;O.visitAsync=Oo.visitAsync});import{execFile as ud}from"node:child_process";import{mkdtemp as fd,readFile as hd,rm as pd,stat as dd,writeFile as dl}from"node:fs/promises";import{tmpdir as gd}from"node:os";import Mr from"node:path";import F from"node:process";import{promisify as md}from"node:util";function Br(s){return s instanceof Error||Object.prototype.toString.call(s)==="[object Error]"}o(Br,"isError");function ue(s){try{return Br(s)&&typeof s.message=="string"&&s.message!==""?s.message:String(s)}catch{return"[unstringifiable value]"}}o(ue,"describeError");import{readFile as Xh}from"node:fs/promises";import{homedir as ep}from"node:os";import cr from"node:path";import tp from"node:process";function bt(s,e){let t=new Error(`${s}: ${ue(e)}`,{cause:e});return typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(t,bt),t}o(bt,"chainError");var $o=Tl(qo(),1);function lr(s,e){return Co(s)&&s.code===e}o(lr,"isErrorCode");function ft(s){return lr(s,"ENOENT")}o(ft,"isEnoent");function Po(s){return lr(s,"ENOENT")||lr(s,"ENOTDIR")}o(Po,"isMissingFile");function R(s){return Co(s)&&!Array.isArray(s)}o(R,"isRecord");function Co(s){return typeof s=="object"&&s!==null}o(Co,"isObject");async function Io(s){let e=s.home??ep(),t=cr.join(s.cwd,".agents","preferences.yaml"),n=cr.join(e,".agents","preferences.yaml"),r=await ur(t),i=await ur(n),a=sp(i?.value,r?.value),l=np(a),c={...r!==null&&{project:t},...i!==null&&{global:n}};return{preferences:l,sources:c}}o(Io,"readPreferences");async function fr(s){let e=await ur(cr.join(s,".agents","preferences.yaml"));return R(e?.value)?e.value:{}}o(fr,"readProjectPreferences");async function ur(s){let e;try{e=await Xh(s,"utf8")}catch(n){if(ft(n))return null;throw n}let t;try{t=(0,$o.parse)(e)}catch(n){throw bt(`${s}: malformed YAML`,n)}return{value:t??{}}}o(ur,"readOptionalYaml");function sp(s,e){let t={};if(R(s))for(let[n,r]of Object.entries(s))t[n]=r;if(R(e))for(let[n,r]of Object.entries(e))t[n]=r;return t}o(sp,"mergeTopLevel");function np(s){let e={},t=s.scm??s.platform;if(t!==void 0&&(s.scm===void 0&&tp.stderr.write(`preferences: the top-level 'platform' key is deprecated; rename it to 'scm'.
|
|
140
|
+
`),e.scm=rp(t)),s.project!==void 0){let n=Ce(s.project,"project"),r={};n.slug!==void 0&&(r.slug=ce(n.slug,"project.slug")),n.ticket_ref_prefix!==void 0&&(r.ticket_ref_prefix=ce(n.ticket_ref_prefix,"project.ticket_ref_prefix")),e.project=r}if(s.repository!==void 0){let n=Ce(s.repository,"repository"),r={};if(n.slug!==void 0&&(r.slug=ce(n.slug,"repository.slug")),n.default_remote!==void 0){let i=Ce(n.default_remote,"repository.default_remote"),a={};i.name!==void 0&&(a.name=ce(i.name,"repository.default_remote.name")),i.default_branch!==void 0&&(a.default_branch=ce(i.default_branch,"repository.default_remote.default_branch")),r.default_remote=a}e.repository=r}if(s.artifacts!==void 0){let n=Ce(s.artifacts,"artifacts"),r={};if(n.base_dir!==void 0&&(r.base_dir=ce(n.base_dir,"artifacts.base_dir")),n.paths!==void 0){let i=Ce(n.paths,"artifacts.paths"),a={};for(let[l,c]of Object.entries(i))a[l]=ce(c,`artifacts.paths.${l}`);r.paths=a}e.artifacts=r}if(s.ticket!==void 0){let n=Ce(s.ticket,"ticket"),r={};n.base_url!==void 0&&(r.base_url=ce(n.base_url,"ticket.base_url")),e.ticket=r}return e}o(np,"projectPreferences");function rp(s){if(s==="github"||s==="bitbucket")return s;throw new Error(`preferences: 'scm' must be "github" or "bitbucket" (got ${hr(s)})`)}o(rp,"expectScm");function ce(s,e){if(typeof s=="string")return s;throw new Error(`preferences: '${e}' must be a string (got ${hr(s)})`)}o(ce,"expectString");function Ce(s,e){if(R(s))return s;throw new Error(`preferences: '${e}' must be an object (got ${hr(s)})`)}o(Ce,"expectRecord");function hr(s){if(typeof s=="string")return JSON.stringify(s);try{return JSON.stringify(s)}catch{return String(s)}}o(hr,"formatValue");import{realpathSync as _o}from"node:fs";import Ro from"node:process";import{fileURLToPath as ip}from"node:url";function Mo(s,e){let t=Ro.argv[1];if(t===void 0)return!1;try{return _o(ip(s))===_o(t)}catch(n){return Ro.stderr.write(`${e}: warning: could not determine entry point: ${ue(n)}
|
|
141
|
+
`),!0}}o(Mo,"isEntryPoint");function jo(s,e){let t=[],n=[];for(let r=0;r<s.length;r+=1){let i=s[r];if(i===void 0)continue;if(!i.startsWith("--")){t.push(i);continue}let a=ap(i,e);if(a===null)throw new Error(`unknown flag: ${i}`);let{spec:l,inlineValue:c}=a;if(!l.takesValue){if(c!==null)throw new Error(`--${l.name} does not take a value`);n.push({name:l.name,value:null});continue}if(c!==null){n.push({name:l.name,value:c});continue}let u=s[r+1]??null;if(u===null||u.startsWith("--"))throw new Error(`--${l.name} requires a value`);n.push({name:l.name,value:u}),r+=1}return{positionals:t,flags:n}}o(jo,"scanFlags");function Do(s){let e={};for(let{name:t,value:n}of s)n!==null&&(e[t]=n);return e}o(Do,"valueFlagMap");function ap(s,e){for(let t of e)for(let n of[t.name,...t.aliases??[]]){let r=`--${n}`;if(s===r)return{spec:t,inlineValue:null};if(s.startsWith(`${r}=`))return{spec:t,inlineValue:s.slice(r.length+1)}}return null}o(ap,"matchFlag");import{readFile as op}from"node:fs/promises";import lp from"node:path";var pr={markers:{breaking:{emoji:"\u{1F6A8}",label:"Breaking"}},tiers:["public","internal","process"],types:[{aliases:["feature"],breakingPolicy:"optional",description:"A change that gives consumers a new capability or extends an existing one.",emoji:"\u{1F389}",key:"feat",label:"Features",tier:"public",trackerLabel:"feature"},{aliases:[],breakingPolicy:"optional",description:"A change that removes a capability or surface on which consumers depend.",emoji:"\u{1FAA6}",key:"drop",label:"Removed",tier:"public",trackerLabel:"removal"},{aliases:[],breakingPolicy:"forbidden",description:"A change that marks a capability or surface for removal while the capability or surface keeps working.",emoji:"\u{1F5D1}\uFE0F",key:"deprecate",label:"Deprecated",tier:"public",trackerLabel:"deprecation"},{aliases:["bugfix"],breakingPolicy:"optional",description:"A change that corrects behavior that consumers meet and that differs from what was intended.",emoji:"\u{1F41B}",key:"fix",label:"Bug fixes",tier:"public",trackerLabel:"fix"},{aliases:["security"],breakingPolicy:"optional",description:"A change that closes a vulnerability or hardens a consumer-facing surface against attack.",emoji:"\u{1F512}",key:"sec",label:"Security",tier:"public",trackerLabel:"security"},{aliases:["performance"],breakingPolicy:"optional",description:"A change that reduces the time, memory, or other resources that consumer-facing work uses, without changing its result.",emoji:"\u26A1",key:"perf",label:"Performance",tier:"public",trackerLabel:"performance"},{aliases:["utility"],breakingPolicy:"forbidden",description:"A change that adds, extends, or repairs a capability that consumers do not use directly, such as a helper or an internal module.",emoji:"\u{1F3D7}\uFE0F",key:"internal",label:"Internal features",tier:"internal",trackerLabel:"internal"},{aliases:[],breakingPolicy:"forbidden",description:"A change that restructures existing code without changing its behavior.",emoji:"\u267B\uFE0F",key:"refactor",label:"Refactoring",tier:"internal",trackerLabel:"refactoring"},{aliases:["test"],breakingPolicy:"forbidden",description:"A change confined to tests, test fixtures, or test helpers, including one that unblocks a build or a type check.",emoji:"\u{1F9EA}",key:"tests",label:"Tests",tier:"internal",trackerLabel:"tests"},{aliases:[],breakingPolicy:"forbidden",description:"A change to the tools used to develop the project: build, lint, formatting, and release configuration, and development scripts.",emoji:"\u2699\uFE0F",key:"tooling",label:"Tooling",tier:"process",trackerLabel:"tooling"},{aliases:[],breakingPolicy:"forbidden",description:"A change to continuous-integration workflows and their configuration.",emoji:"\u{1F477}",key:"ci",label:"CI",tier:"process",trackerLabel:"ci"},{aliases:["dep"],breakingPolicy:"forbidden",description:"A change that adds, removes, or upgrades a dependency, including its lockfile and version-catalog entries.",emoji:"\u{1F4E6}",key:"deps",label:"Dependencies",tier:"process",trackerLabel:"dependencies"},{aliases:[],breakingPolicy:"forbidden",description:"A change to guidance on working in the repository itself, such as its `AGENTS.md` or a repo-local skill, or to the repository's agent configuration.",emoji:"\u{1F916}",key:"ai",label:"Agentic support",tier:"process",trackerLabel:"ai"},{aliases:["doc"],breakingPolicy:"forbidden",description:"A change to documentation for human readers, such as a README, a guide, or a code comment.",emoji:"\u{1F4DA}",key:"docs",label:"Documentation",tier:"process",trackerLabel:"documentation"},{aliases:[],breakingPolicy:"forbidden",description:"A change to formatting alone, such as whitespace or line wrapping, that leaves the content unchanged.",emoji:"\u{1F3A8}",excludedFromChangelog:!0,key:"fmt",label:"Formatting",tier:"process",trackerLabel:"formatting"}],version:"1.3.0"};function Bo(s=pr){return{...s,types:s.types.map(({trackerLabel:e,...t})=>t)}}o(Bo,"buildWorkTypesDocument");async function Fo(s){let e=await up(s);if(e===null)return null;let t=[];for(let r of e.types)!R(r)||typeof r.key!="string"||typeof r.tier!="string"||t.push({workType:{key:r.key,tier:r.tier},aliases:cp(r.aliases)});let n=new Map;for(let{workType:r,aliases:i}of t)for(let a of i)n.set(a,r);for(let{workType:r}of t)n.set(r.key,r);return n}o(Fo,"loadWorkTypes");function Ko(s,e){let t=s.endsWith("!"),n=e.get(t?s.slice(0,-1):s);return n===void 0?null:{workType:n,breaking:t}}o(Ko,"resolveWorkType");function Uo(s){return!R(s)||!Array.isArray(s.types)?null:{markers:s.markers,tiers:s.tiers,types:s.types}}o(Uo,"parseTaxonomy");function cp(s){return Array.isArray(s)?s.filter(e=>typeof e=="string"):[]}o(cp,"readAliases");async function up(s){return s===void 0?Uo(Bo()):await fp(s)}o(up,"readTaxonomy");async function fp(s){let e;try{e=await op(lp.join(s,"work-types.json"),"utf8")}catch(n){if(Po(n))return null;throw n}let t;try{t=JSON.parse(e)}catch{return null}return Uo(t)}o(fp,"readTaxonomyFile");import Jo from"node:process";import{execFile as hp,execFileSync as pp}from"node:child_process";import{promisify as dp}from"node:util";var Yo={findCurrentBranch:mp,findRemoteUrl:yp,findTopLevel:bp,listRemotes:kp},dr=dp(hp);function gp(s){let e=R(s)?s.stderr:void 0;return typeof e=="string"&&e.trim()!==""?e.trim():s instanceof Error?s.message:String(s)}o(gp,"describeGitFailure");async function mp(s){let{stdout:e}=await dr("git",["-C",s,"branch","--show-current"]);return e.trim()}o(mp,"findCurrentBranch");async function yp(s,e){let{stdout:t}=await dr("git",["-C",s,"remote","get-url",e]),n=t.trim();return n===""?void 0:n}o(yp,"findRemoteUrl");function bp(s){try{let t=pp("git",["-C",s,"rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","pipe"]}).trim();return t===""?{failure:"git returned an empty working-tree root"}:{root:t}}catch(e){return{failure:gp(e)}}}o(bp,"findTopLevel");async function kp(s){let{stdout:e}=await dr("git",["-C",s,"remote"]);return e.split(`
|
|
142
|
+
`).map(t=>t.trim()).filter(t=>t!=="")}o(kp,"listRemotes");function gr(s={}){let{cwd:e}=s;if(e!=null&&e!=="")return e;let t=s.startDir??Jo.cwd(),n=(s.git??Yo).findTopLevel(t);return"root"in n?n.root:(Jo.stderr.write(`resolve-project-root: git could not resolve the repository root (${n.failure}); anchoring at ${t}. Repo-relative paths may be wrong if the working directory changed.
|
|
143
|
+
`),t)}o(gr,"resolveProjectRoot");function wp(s,e){let t=mr(e),n=Sp(s);return{activeSite:n,match:n===t,targetSite:t}}o(wp,"compareSites");function mr(s){let e=s.trim(),t=e.includes("://")?e:`https://${e}`,n;try{n=new URL(t).hostname}catch(r){throw new Error(`not a URL or a host: '${s}'`,{cause:r})}if(n==="")throw new Error(`not a URL or a host: '${s}'`);return n.toLowerCase()}o(mr,"normalizeSite");function Sp(s){let e=/^\s*Site:\s*(\S+)\s*$/m.exec(s)?.[1];if(e===void 0)return null;try{return mr(e)}catch{return null}}o(Sp,"parseActiveSite");async function yr(s,e){let t=mr(s),n=await e(["jira","auth","status"]);return n.exitCode!==0?{activeSite:null,match:!1,targetSite:t}:wp(n.stdout,t)}o(yr,"readSiteCheck");function Sr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}o(Sr,"L");var be=Sr();function Zo(s){be=s}o(Zo,"G");var gt={exec:o(()=>null,"exec")};function L(s,e=""){let t=typeof s=="string"?s:s.source,n={replace:o((r,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(M.caret,"$1"),t=t.replace(r,a),n},"replace"),getRegex:o(()=>new RegExp(t,e),"getRegex")};return n}o(L,"d");var vp=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),M={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:o(s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:o(s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:o(s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:o(s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:o(s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),"headingBeginRegex"),htmlBeginRegex:o(s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},Ap=/^(?:[ \t]*(?:\n|$))+/,Tp=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,xp=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,mt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Np=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,vr=/(?:[*+-]|\d{1,9}[.)])/,Xo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,el=L(Xo).replace(/bull/g,vr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ep=L(Xo).replace(/bull/g,vr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ar=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Lp=/^[^\n]+/,Tr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Op=L(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Tr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qp=L(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,vr).getRegex(),Ss="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Pp=L("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",xr).replace("tag",Ss).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),tl=L(Ar).replace("hr",mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ss).getRegex(),Cp=L(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",tl).getRegex(),Nr={blockquote:Cp,code:Tp,def:Op,fences:xp,heading:Np,hr:mt,html:Pp,lheading:el,list:qp,newline:Ap,paragraph:tl,table:gt,text:Lp},Vo=L("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ss).getRegex(),$p={...Nr,lheading:Ep,table:Vo,paragraph:L(Ar).replace("hr",mt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ss).getRegex()},Ip={...Nr,html:L(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:gt,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:L(Ar).replace("hr",mt).replace("heading",` *#{1,6} *[^
|
|
144
|
+
]`).replace("lheading",el).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_p=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Rp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,sl=/^( {2,}|\\)\n(?!\s*$)/,Mp=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vs=/[\p{P}\p{S}]/u,Er=/[\s\p{P}\p{S}]/u,nl=/[^\s\p{P}\p{S}]/u,jp=L(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Er).getRegex(),rl=/(?!~)[\p{P}\p{S}]/u,Dp=/(?!~)[\s\p{P}\p{S}]/u,Bp=/(?:[^\s\p{P}\p{S}]|~)/u,Fp=L(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",vp?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),il=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Kp=L(il,"u").replace(/punct/g,vs).getRegex(),Up=L(il,"u").replace(/punct/g,rl).getRegex(),al="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Yp=L(al,"gu").replace(/notPunctSpace/g,nl).replace(/punctSpace/g,Er).replace(/punct/g,vs).getRegex(),Jp=L(al,"gu").replace(/notPunctSpace/g,Bp).replace(/punctSpace/g,Dp).replace(/punct/g,rl).getRegex(),Vp=L("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,nl).replace(/punctSpace/g,Er).replace(/punct/g,vs).getRegex(),zp=L(/\\(punct)/,"gu").replace(/punct/g,vs).getRegex(),Wp=L(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Gp=L(xr).replace("(?:-->|$)","-->").getRegex(),Qp=L("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Gp).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Hp=L(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",bs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ol=L(/^!?\[(label)\]\[(ref)\]/).replace("label",bs).replace("ref",Tr).getRegex(),ll=L(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tr).getRegex(),Zp=L("reflink|nolink(?!\\()","g").replace("reflink",ol).replace("nolink",ll).getRegex(),zo=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Lr={_backpedal:gt,anyPunctuation:zp,autolink:Wp,blockSkip:Fp,br:sl,code:Rp,del:gt,emStrongLDelim:Kp,emStrongRDelimAst:Yp,emStrongRDelimUnd:Vp,escape:_p,link:Hp,nolink:ll,punctuation:jp,reflink:ol,reflinkSearch:Zp,tag:Qp,text:Mp,url:gt},Xp={...Lr,link:L(/^!?\[(label)\]\((.*?)\)/).replace("label",bs).getRegex(),reflink:L(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bs).getRegex()},br={...Lr,emStrongRDelimAst:Jp,emStrongLDelim:Up,url:L(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",zo).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:L(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",zo).getRegex()},ed={...br,br:L(sl).replace("{2,}","*").getRegex(),text:L(br.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ys={normal:Nr,gfm:$p,pedantic:Ip},ht={normal:Lr,gfm:br,breaks:ed,pedantic:Xp},td={"&":"&","<":"<",">":">",'"':""","'":"'"},Wo=o(s=>td[s],"ge");function W(s,e){if(e){if(M.escapeTest.test(s))return s.replace(M.escapeReplace,Wo)}else if(M.escapeTestNoEncode.test(s))return s.replace(M.escapeReplaceNoEncode,Wo);return s}o(W,"w");function Go(s){try{s=encodeURI(s).replace(M.percentDecode,"%")}catch{return null}return s}o(Go,"J");function Qo(s,e){let t=s.replace(M.findPipe,(i,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),n=t.split(M.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(M.slashPipe,"|");return n}o(Qo,"V");function pt(s,e,t){let n=s.length;if(n===0)return"";let r=0;for(;r<n;){let i=s.charAt(n-r-1);if(i===e&&!t)r++;else if(i!==e&&t)r++;else break}return s.slice(0,n-r)}o(pt,"z");function sd(s,e){if(s.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<s.length;n++)if(s[n]==="\\")n++;else if(s[n]===e[0])t++;else if(s[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}o(sd,"fe");function Ho(s,e,t,n,r){let i=e.href,a=e.title||null,l=s[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;let c={type:s[0].charAt(0)==="!"?"image":"link",raw:t,href:i,title:a,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,c}o(Ho,"me");function nd(s,e,t){let n=s.match(t.other.indentCodeCompensation);if(n===null)return e;let r=n[1];return e.split(`
|
|
145
|
+
`).map(i=>{let a=i.match(t.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=r.length?i.slice(r.length):i}).join(`
|
|
146
|
+
`)}o(nd,"Ye");var ks=class{static{o(this,"y")}options;rules;lexer;constructor(s){this.options=s||be}space(s){let e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(s){let e=this.rules.block.code.exec(s);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:pt(t,`
|
|
147
|
+
`)}}}fences(s){let e=this.rules.block.fences.exec(s);if(e){let t=e[0],n=nd(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(s){let e=this.rules.block.heading.exec(s);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let n=pt(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(s){let e=this.rules.block.hr.exec(s);if(e)return{type:"hr",raw:pt(e[0],`
|
|
148
|
+
`)}}blockquote(s){let e=this.rules.block.blockquote.exec(s);if(e){let t=pt(e[0],`
|
|
149
|
+
`).split(`
|
|
150
|
+
`),n="",r="",i=[];for(;t.length>0;){let a=!1,l=[],c;for(c=0;c<t.length;c++)if(this.rules.other.blockquoteStart.test(t[c]))l.push(t[c]),a=!0;else if(!a)l.push(t[c]);else break;t=t.slice(c);let u=l.join(`
|
|
151
|
+
`),p=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
152
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
153
|
+
${u}`:u,r=r?`${r}
|
|
154
|
+
${p}`:p;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,i,!0),this.lexer.state.top=f,t.length===0)break;let h=i.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let g=h,y=g.raw+`
|
|
155
|
+
`+t.join(`
|
|
156
|
+
`),d=this.blockquote(y);i[i.length-1]=d,n=n.substring(0,n.length-g.raw.length)+d.raw,r=r.substring(0,r.length-g.text.length)+d.text;break}else if(h?.type==="list"){let g=h,y=g.raw+`
|
|
157
|
+
`+t.join(`
|
|
158
|
+
`),d=this.list(y);i[i.length-1]=d,n=n.substring(0,n.length-h.raw.length)+d.raw,r=r.substring(0,r.length-g.raw.length)+d.raw,t=y.substring(i.at(-1).raw.length).split(`
|
|
159
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(s){let e=this.rules.block.list.exec(s);if(e){let t=e[1].trim(),n=t.length>1,r={type:"list",raw:"",ordered:n,start:n?+t.slice(0,-1):"",loose:!1,items:[]};t=n?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=n?t:"[*+-]");let i=this.rules.other.listItemRegex(t),a=!1;for(;s;){let c=!1,u="",p="";if(!(e=i.exec(s))||this.rules.block.hr.test(s))break;u=e[0],s=s.substring(u.length);let f=e[2].split(`
|
|
160
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,k=>" ".repeat(3*k.length)),h=s.split(`
|
|
161
|
+
`,1)[0],g=!f.trim(),y=0;if(this.options.pedantic?(y=2,p=f.trimStart()):g?y=e[1].length+1:(y=e[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,p=f.slice(y),y+=e[1].length),g&&this.rules.other.blankLine.test(h)&&(u+=h+`
|
|
162
|
+
`,s=s.substring(h.length+1),c=!0),!c){let k=this.rules.other.nextBulletRegex(y),w=this.rules.other.hrRegex(y),v=this.rules.other.fencesBeginRegex(y),A=this.rules.other.headingBeginRegex(y),x=this.rules.other.htmlBeginRegex(y);for(;s;){let T=s.split(`
|
|
163
|
+
`,1)[0],E;if(h=T,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),E=h):E=h.replace(this.rules.other.tabCharGlobal," "),v.test(h)||A.test(h)||x.test(h)||k.test(h)||w.test(h))break;if(E.search(this.rules.other.nonSpaceChar)>=y||!h.trim())p+=`
|
|
164
|
+
`+E.slice(y);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(f)||A.test(f)||w.test(f))break;p+=`
|
|
165
|
+
`+h}!g&&!h.trim()&&(g=!0),u+=T+`
|
|
166
|
+
`,s=s.substring(T.length+1),f=E.slice(y)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0));let d=null,m;this.options.gfm&&(d=this.rules.other.listIsTask.exec(p),d&&(m=d[0]!=="[ ] ",p=p.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:u,task:!!d,checked:m,loose:!1,text:p,tokens:[]}),r.raw+=u}let l=r.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c=0;c<r.items.length;c++)if(this.lexer.state.top=!1,r.items[c].tokens=this.lexer.blockTokens(r.items[c].text,[]),!r.loose){let u=r.items[c].tokens.filter(f=>f.type==="space"),p=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));r.loose=p}if(r.loose)for(let c=0;c<r.items.length;c++)r.items[c].loose=!0;return r}}html(s){let e=this.rules.block.html.exec(s);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(s){let e=this.rules.block.def.exec(s);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:n,title:r}}}table(s){let e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=Qo(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
167
|
+
`):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(t.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<t.length;a++)i.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:i.align[a]});for(let a of r)i.rows.push(Qo(a,i.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(s){let e=this.rules.block.lheading.exec(s);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(s){let e=this.rules.block.paragraph.exec(s);if(e){let t=e[1].charAt(e[1].length-1)===`
|
|
168
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(s){let e=this.rules.block.text.exec(s);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(s){let e=this.rules.inline.escape.exec(s);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(s){let e=this.rules.inline.tag.exec(s);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(s){let e=this.rules.inline.link.exec(s);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let i=pt(t.slice(0,-1),"\\");if((t.length-i.length)%2===0)return}else{let i=sd(e[2],"()");if(i===-2)return;if(i>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],r=i[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),Ho(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(s,e){let t;if((t=this.rules.inline.reflink.exec(s))||(t=this.rules.inline.nolink.exec(s))){let n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[n.toLowerCase()];if(!r){let i=t[0].charAt(0);return{type:"text",raw:i,text:i}}return Ho(t,r,t[0],this.lexer,this.rules)}}emStrong(s,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(s);if(!(!n||n[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!t||this.rules.inline.punctuation.exec(t))){let r=[...n[0]].length-1,i,a,l=r,c=0,u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,e=e.slice(-1*s.length+r);(n=u.exec(e))!=null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(a=[...i].length,n[3]||n[4]){l+=a;continue}else if((n[5]||n[6])&&r%3&&!((r+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let p=[...n[0]][0].length,f=s.slice(0,r+n.index+p+a);if(Math.min(r,a)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(s){let e=this.rules.inline.code.exec(s);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(s){let e=this.rules.inline.br.exec(s);if(e)return{type:"br",raw:e[0]}}del(s){let e=this.rules.inline.del.exec(s);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(s){let e=this.rules.inline.autolink.exec(s);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(s){let e;if(e=this.rules.inline.url.exec(s)){let t,n;if(e[2]==="@")t=e[0],n="mailto:"+t;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);t=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(s){let e=this.rules.inline.text.exec(s);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Y=class kr{static{o(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||be,this.options.tokenizer=this.options.tokenizer||new ks,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:M,block:ys.normal,inline:ht.normal};this.options.pedantic?(t.block=ys.pedantic,t.inline=ht.pedantic):this.options.gfm&&(t.block=ys.gfm,this.options.breaks?t.inline=ht.breaks:t.inline=ht.gfm),this.tokenizer.rules=t}static get rules(){return{block:ys,inline:ht}}static lex(e,t){return new kr(t).lex(e)}static lexInline(e,t){return new kr(t).inlineTokens(e)}lex(e){e=e.replace(M.carriageReturn,`
|
|
169
|
+
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(M.tabCharGlobal," ").replace(M.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(a=>(r=a.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let a=t.at(-1);r.raw.length===1&&a!==void 0?a.raw+=`
|
|
170
|
+
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
171
|
+
`)?"":`
|
|
172
|
+
`)+r.raw,a.text+=`
|
|
173
|
+
`+r.text,this.inlineQueue.at(-1).src=a.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
174
|
+
`)?"":`
|
|
175
|
+
`)+r.raw,a.text+=`
|
|
176
|
+
`+r.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let a=1/0,l=e.slice(1),c;this.options.extensions.startBlock.forEach(u=>{c=u.call({lexer:this},l),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(i=e.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
177
|
+
`)?"":`
|
|
178
|
+
`)+r.raw,a.text+=`
|
|
179
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
180
|
+
`)?"":`
|
|
181
|
+
`)+r.raw,a.text+=`
|
|
182
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r);continue}if(e){let a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+"["+"a".repeat(r[0].length-i-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,l="";for(;e;){a||(l=""),a=!1;let c;if(this.options.extensions?.inline?.some(p=>(c=p.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);let p=t.at(-1);c.type==="text"&&p?.type==="text"?(p.raw+=c.raw,p.text+=c.text):t.push(c);continue}if(c=this.tokenizer.emStrong(e,n,l)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.del(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),t.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),t.push(c);continue}let u=e;if(this.options.extensions?.startInline){let p=1/0,f=e.slice(1),h;this.options.extensions.startInline.forEach(g=>{h=g.call({lexer:this},f),typeof h=="number"&&h>=0&&(p=Math.min(p,h))}),p<1/0&&p>=0&&(u=e.substring(0,p+1))}if(c=this.tokenizer.inlineText(u)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(l=c.raw.slice(-1)),a=!0;let p=t.at(-1);p?.type==="text"?(p.raw+=c.raw,p.text+=c.text):t.push(c);continue}if(e){let p="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return t}},ws=class{static{o(this,"P")}options;parser;constructor(s){this.options=s||be}space(s){return""}code({text:s,lang:e,escaped:t}){let n=(e||"").match(M.notSpaceStart)?.[0],r=s.replace(M.endingNewline,"")+`
|
|
183
|
+
`;return n?'<pre><code class="language-'+W(n)+'">'+(t?r:W(r,!0))+`</code></pre>
|
|
184
|
+
`:"<pre><code>"+(t?r:W(r,!0))+`</code></pre>
|
|
185
|
+
`}blockquote({tokens:s}){return`<blockquote>
|
|
186
|
+
${this.parser.parse(s)}</blockquote>
|
|
187
|
+
`}html({text:s}){return s}def(s){return""}heading({tokens:s,depth:e}){return`<h${e}>${this.parser.parseInline(s)}</h${e}>
|
|
188
|
+
`}hr(s){return`<hr>
|
|
189
|
+
`}list(s){let e=s.ordered,t=s.start,n="";for(let a=0;a<s.items.length;a++){let l=s.items[a];n+=this.listitem(l)}let r=e?"ol":"ul",i=e&&t!==1?' start="'+t+'"':"";return"<"+r+i+`>
|
|
190
|
+
`+n+"</"+r+`>
|
|
191
|
+
`}listitem(s){let e="";if(s.task){let t=this.checkbox({checked:!!s.checked});s.loose?s.tokens[0]?.type==="paragraph"?(s.tokens[0].text=t+" "+s.tokens[0].text,s.tokens[0].tokens&&s.tokens[0].tokens.length>0&&s.tokens[0].tokens[0].type==="text"&&(s.tokens[0].tokens[0].text=t+" "+W(s.tokens[0].tokens[0].text),s.tokens[0].tokens[0].escaped=!0)):s.tokens.unshift({type:"text",raw:t+" ",text:t+" ",escaped:!0}):e+=t+" "}return e+=this.parser.parse(s.tokens,!!s.loose),`<li>${e}</li>
|
|
192
|
+
`}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
|
|
193
|
+
`}table(s){let e="",t="";for(let r=0;r<s.header.length;r++)t+=this.tablecell(s.header[r]);e+=this.tablerow({text:t});let n="";for(let r=0;r<s.rows.length;r++){let i=s.rows[r];t="";for(let a=0;a<i.length;a++)t+=this.tablecell(i[a]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
194
|
+
<thead>
|
|
195
|
+
`+e+`</thead>
|
|
196
|
+
`+n+`</table>
|
|
197
|
+
`}tablerow({text:s}){return`<tr>
|
|
198
|
+
${s}</tr>
|
|
199
|
+
`}tablecell(s){let e=this.parser.parseInline(s.tokens),t=s.header?"th":"td";return(s.align?`<${t} align="${s.align}">`:`<${t}>`)+e+`</${t}>
|
|
200
|
+
`}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${W(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:e,tokens:t}){let n=this.parser.parseInline(t),r=Go(s);if(r===null)return n;s=r;let i='<a href="'+s+'"';return e&&(i+=' title="'+W(e)+'"'),i+=">"+n+"</a>",i}image({href:s,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));let r=Go(s);if(r===null)return W(t);s=r;let i=`<img src="${s}" alt="${t}"`;return e&&(i+=` title="${W(e)}"`),i+=">",i}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:W(s.text)}},Or=class{static{o(this,"$")}strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}},J=class wr{static{o(this,"l")}options;renderer;textRenderer;constructor(e){this.options=e||be,this.options.renderer=this.options.renderer||new ws,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Or}static parse(e,t){return new wr(t).parse(e)}static parseInline(e,t){return new wr(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let l=i,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=c||"";continue}}let a=i;switch(a.type){case"space":{n+=this.renderer.space(a);continue}case"hr":{n+=this.renderer.hr(a);continue}case"heading":{n+=this.renderer.heading(a);continue}case"code":{n+=this.renderer.code(a);continue}case"table":{n+=this.renderer.table(a);continue}case"blockquote":{n+=this.renderer.blockquote(a);continue}case"list":{n+=this.renderer.list(a);continue}case"html":{n+=this.renderer.html(a);continue}case"def":{n+=this.renderer.def(a);continue}case"paragraph":{n+=this.renderer.paragraph(a);continue}case"text":{let l=a,c=this.renderer.text(l);for(;r+1<e.length&&e[r+1].type==="text";)l=e[++r],c+=`
|
|
201
|
+
`+this.renderer.text(l);t?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,t=this.renderer){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=l||"";continue}}let a=i;switch(a.type){case"escape":{n+=t.text(a);break}case"html":{n+=t.html(a);break}case"link":{n+=t.link(a);break}case"image":{n+=t.image(a);break}case"strong":{n+=t.strong(a);break}case"em":{n+=t.em(a);break}case"codespan":{n+=t.codespan(a);break}case"br":{n+=t.br(a);break}case"del":{n+=t.del(a);break}case"text":{n+=t.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},dt=class{static{o(this,"S")}options;block;constructor(s){this.options=s||be}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(){return this.block?Y.lex:Y.lexInline}provideParser(){return this.block?J.parse:J.parseInline}},rd=class{static{o(this,"B")}defaults=Sr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=J;Renderer=ws;TextRenderer=Or;Lexer=Y;Tokenizer=ks;Hooks=dt;constructor(...s){this.use(...s)}walkTokens(s,e){let t=[];for(let n of s)switch(t=t.concat(e.call(this,n)),n.type){case"table":{let r=n;for(let i of r.header)t=t.concat(this.walkTokens(i.tokens,e));for(let i of r.rows)for(let a of i)t=t.concat(this.walkTokens(a.tokens,e));break}case"list":{let r=n;t=t.concat(this.walkTokens(r.items,e));break}default:{let r=n;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(i=>{let a=r[i].flat(1/0);t=t.concat(this.walkTokens(a,e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...s){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=e.renderers[r.name];i?e.renderers[r.name]=function(...a){let l=r.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[r.level];i?i.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),n.extensions=e),t.renderer){let r=this.defaults.renderer||new ws(this.defaults);for(let i in t.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=t.renderer[a],c=r[a];r[a]=(...u)=>{let p=l.apply(r,u);return p===!1&&(p=c.apply(r,u)),p||""}}n.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new ks(this.defaults);for(let i in t.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=t.tokenizer[a],c=r[a];r[a]=(...u)=>{let p=l.apply(r,u);return p===!1&&(p=c.apply(r,u)),p}}n.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new dt;for(let i in t.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=t.hooks[a],c=r[a];dt.passThroughHooks.has(i)?r[a]=u=>{if(this.defaults.async&&dt.passThroughHooksRespectAsync.has(i))return(async()=>{let f=await l.call(r,u);return c.call(r,f)})();let p=l.call(r,u);return c.call(r,p)}:r[a]=(...u)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(r,u);return f===!1&&(f=await c.apply(r,u)),f})();let p=l.apply(r,u);return p===!1&&(p=c.apply(r,u)),p}}n.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,i=t.walkTokens;n.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),r&&(l=l.concat(r.call(this,a))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,e){return Y.lex(s,e??this.defaults)}parser(s,e){return J.parse(s,e??this.defaults)}parseMarkdown(s){return(e,t)=>{let n={...t},r={...this.defaults,...n},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&n.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=s),r.async)return(async()=>{let a=r.hooks?await r.hooks.preprocess(e):e,l=await(r.hooks?await r.hooks.provideLexer():s?Y.lex:Y.lexInline)(a,r),c=r.hooks?await r.hooks.processAllTokens(l):l;r.walkTokens&&await Promise.all(this.walkTokens(c,r.walkTokens));let u=await(r.hooks?await r.hooks.provideParser():s?J.parse:J.parseInline)(c,r);return r.hooks?await r.hooks.postprocess(u):u})().catch(i);try{r.hooks&&(e=r.hooks.preprocess(e));let a=(r.hooks?r.hooks.provideLexer():s?Y.lex:Y.lexInline)(e,r);r.hooks&&(a=r.hooks.processAllTokens(a)),r.walkTokens&&this.walkTokens(a,r.walkTokens);let l=(r.hooks?r.hooks.provideParser():s?J.parse:J.parseInline)(a,r);return r.hooks&&(l=r.hooks.postprocess(l)),l}catch(a){return i(a)}}}onError(s,e){return t=>{if(t.message+=`
|
|
202
|
+
Please report this to https://github.com/markedjs/marked.`,s){let n="<p>An error occurred:</p><pre>"+W(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},ye=new rd;function q(s,e){return ye.parse(s,e)}o(q,"k");q.options=q.setOptions=function(s){return ye.setOptions(s),q.defaults=ye.defaults,Zo(q.defaults),q};q.getDefaults=Sr;q.defaults=be;q.use=function(...s){return ye.use(...s),q.defaults=ye.defaults,Zo(q.defaults),q};q.walkTokens=function(s,e){return ye.walkTokens(s,e)};q.parseInline=ye.parseInline;q.Parser=J;q.parser=J.parse;q.Renderer=ws;q.TextRenderer=Or;q.Lexer=Y;q.lexer=Y.lex;q.Tokenizer=ks;q.Hooks=dt;q.parse=q;var rb=q.options,ib=q.setOptions,ab=q.use,ob=q.walkTokens,lb=q.parseInline;var cb=J.parse,ub=Y.lex;var As=o(()=>globalThis.crypto.randomUUID(),"generateLocalId");function id(s){let e=s.trim().match(/^<adf>([\s\S]*?)<\/adf>$/i);if(!e)return null;let t=e[1].trim();if(t.length===0)throw new Error("<adf> tag content is empty \u2014 expected a JSON object or array");let n;try{n=JSON.parse(t)}catch{throw new Error(`Invalid JSON in <adf> tag: ${t}`)}if(Array.isArray(n))return n.map((i,a)=>{if(typeof i!="object"||i===null||Array.isArray(i))throw new Error(`ADF node must be a JSON object or array of objects (item ${a} is not an object)`);let l=i;if(typeof l.type!="string"||l.type.length===0)throw new Error('ADF node must have a "type" string property');return l});if(typeof n!="object"||n===null)throw new Error(`ADF node must be a JSON object or array, got: ${JSON.stringify(n)}`);let r=n;if(typeof r.type!="string"||r.type.length===0)throw new Error('ADF node must have a "type" string property');return r}o(id,"parseAdfTag");function ul(s){let e=q.lexer(s);return{version:1,type:"doc",content:Ts(e)}}o(ul,"markdownToAdf");function Ts(s){return s?s.map(e=>{switch(e.type){case"paragraph":return qr(e.tokens);case"heading":return{type:"heading",attrs:{level:e.depth},content:H(e.tokens)};case"list":return e.items.every(n=>n.task)&&e.items.some(n=>n.task)?{type:"taskList",attrs:{localId:As()},content:e.items.map(n=>Cr(n))}:{type:e.ordered?"orderedList":"bulletList",...e.ordered?{attrs:{order:e.start||1}}:{},content:e.items.map(n=>Pr(n))};case"code":return{type:"codeBlock",attrs:{language:e.lang||"text"},content:[{type:"text",text:e.text}]};case"blockquote":return{type:"blockquote",content:Ts(e.tokens)};case"hr":return{type:"rule"};case"table":return ad(e);case"html":{let n=id(e.raw);return n||null}default:return null}}).filter(Boolean).flat():[]}o(Ts,"tokensToAdf");function cl(s){return{type:"mediaSingle",attrs:{layout:"center"},content:[{type:"media",attrs:{type:"external",url:s.href,alt:s.text||""}}]}}o(cl,"createMediaNode");function ad(s){let e=s.header.map(r=>({type:"tableHeader",content:qr(r.tokens)})),t=s.rows.map(r=>({type:"tableRow",content:r.map(i=>{let a=qr(i.tokens);return a.length===0&&a.push({type:"paragraph",content:[{type:"text",text:" "}]}),{type:"tableCell",content:a}})})),n=[];return e.length&&n.push({type:"tableRow",content:e}),{type:"table",content:n.concat(t)}}o(ad,"processTable");function qr(s){if(!s)return[];if(s.length===1&&s[0]?.type==="image")return[cl(s[0])];let e=[],t=[];for(let n=0;n<s.length;n++){let r=s[n];r?.type==="image"?(t.length&&(e.push({type:"paragraph",content:H(t)}),t=[]),e.push(cl(r))):t.push(r)}return t.length&&e.push({type:"paragraph",content:H(t)}),e}o(qr,"processParagraph");function Pr(s){let e=[],t=[];return(s.tokens||[]).forEach(n=>{if(n.type==="text"||n.type==="em"||n.type==="strong"||n.type==="del"||n.type==="link"||n.type==="codespan")t.push(n);else if(t.length&&(e.push({type:"paragraph",content:H(t)}),t=[]),n.type==="list")n.items.every(i=>i.task)&&n.items.some(i=>i.task)?e.push({type:"taskList",attrs:{localId:As()},content:n.items.map(i=>Cr(i))}):e.push({type:n.ordered?"orderedList":"bulletList",...n.ordered?{attrs:{order:n.start||1}}:{},content:n.items.map(i=>Pr(i))});else{let r=Ts([n]);r.length&&e.push(...r)}}),t.length&&e.push({type:"paragraph",content:H(t)}),{type:"listItem",content:e}}o(Pr,"processListItem");function Cr(s){let e=[],t=[];return(s.tokens||[]).forEach(n=>{if(n.type==="text"||n.type==="em"||n.type==="strong"||n.type==="del"||n.type==="link"||n.type==="codespan")t.push(n);else if(t.length&&(e.push(...H(t)),t=[]),n.type==="list")n.items.every(i=>i.task)&&n.items.some(i=>i.task)?e.push({type:"taskList",attrs:{localId:As()},content:n.items.map(i=>Cr(i))}):e.push({type:n.ordered?"orderedList":"bulletList",...n.ordered?{attrs:{order:n.start||1}}:{},content:n.items.map(i=>Pr(i))});else{let r=Ts([n]);r.length&&e.push(...r)}}),t.length&&e.push(...H(t)),{type:"taskItem",attrs:{localId:As(),state:s.checked?"DONE":"TODO"},content:e}}o(Cr,"processTaskItem");function ke(s){return s.tokens?.length===1&&s.tokens[0]&&"text"in s.tokens[0]?ke(s.tokens[0]):"text"in s?s.text.replace(/\n$/,"").replace(/\n/g," ").replace(/\s+/g," "):""}o(ke,"getSafeText");function $e(s,e={}){s.type==="em"&&!e.em&&(e.em={type:"em"}),s.type==="strong"&&!e.strong&&(e.strong={type:"strong"}),s.type==="del"&&!e.strike&&(e.strike={type:"strike"}),s.type==="link"&&(e.link={type:"link",attrs:{href:s.href}}),s.type==="codespan"&&!e.code&&(e.code={type:"code"});let t=s.tokens?.[0],n=s.tokens?.length??0;if(t&&n===1)return $e(t,e);let r=Object.values(e);return e.code?r.filter(i=>i.type==="link"||i.type==="code"):r}o($e,"getMarks");function H(s){return s?s.flatMap(e=>{switch(e.type){case"text":return e.tokens?H(e.tokens):[{type:"text",text:ke(e),...e.tokens?{content:H(e.tokens)}:{}}];case"em":return(e.tokens??[]).map(t=>({type:"text",text:ke(t),marks:$e(t,{em:{type:"em"}})}));case"strong":return(e.tokens??[]).map(t=>({type:"text",text:ke(t),marks:$e(t,{strong:{type:"strong"}})}));case"del":return(e.tokens??[]).map(t=>({type:"text",text:ke(t),marks:$e(t,{strike:{type:"strike"}})}));case"link":return[{type:"text",text:ke(e),marks:$e(e)}];case"codespan":return[{type:"text",text:ke(e),marks:$e(e)}];case"escape":return[{type:"text",text:e.text}];case"br":return[{type:"hardBreak"}];default:return[]}}).filter(e=>!(e.type==="text"&&!e.text)):[]}o(H,"inlineToAdf");function $r(s){return ul(s)}o($r,"convertMarkdownToAdf");async function fl(s,e){let t=[],n=!1;if(s.parent!==void 0){let l=await e(["jira","workitem","view",s.parent]);l.exitCode!==0&&(n=!0,t.push(`parent ${s.parent} rejected by acli (exit ${l.exitCode}); creating without it: ${l.stderr.trim()}`))}let r=["jira","workitem","create","--project",s.projectKey,"--type",s.issueType,"--summary",s.summary,"--description-file",s.adfPath,"--json"];s.parent!==void 0&&!n&&r.push("--parent",s.parent);let i=await e(r);if(i.exitCode!==0)return t.push(`acli jira workitem create exited ${i.exitCode}; check Jira before creating again: ${i.stderr.trim()}`),{diagnostics:t,ok:!1,result:{key:null,parentSkipped:n,rawOutput:i.stdout}};let a=od(i.stdout);return a===null&&t.push("could not read a key from the acli create output; read it from rawOutput and do not create again"),{diagnostics:t,ok:a!==null,result:{key:a,parentSkipped:n,rawOutput:i.stdout}}}o(fl,"createWorkItem");function od(s){let e;try{e=JSON.parse(s)}catch{return null}return R(e)&&typeof e.key=="string"&&e.key!==""?e.key:null}o(od,"parseKey");function hl(s){let e=_r(_r(s,"integrations"),"jira","integrations."),t=_r(s,"project"),n={},r=e.issue_types;if(r!=null){if(!R(r))throw new Error("preferences: 'integrations.jira.issue_types' must be an object");for(let[i,a]of Object.entries(r))n[i]=Ir(a,`integrations.jira.issue_types.${i}`)??""}return{issueTypes:n,projectKey:Ir(e.project_key,"integrations.jira.project_key"),ticketRefPrefix:Ir(t.ticket_ref_prefix,"project.ticket_ref_prefix")}}o(hl,"readJiraPreferences");function pl(s,e,t){let n=Ko(s,t);if(n===null)throw new Error(`unknown work type '${s}'`);let r=Rr(e.projectKey)??ld(e.ticketRefPrefix);return r===void 0?{fallback:"no-project-key",warning:"Jira work item not created: neither integrations.jira.project_key nor project.ticket_ref_prefix is set."}:{issueType:cd(n.workType.key,e.issueTypes,t),projectKey:r}}o(pl,"resolveTarget");function ld(s){return Rr(s?.replace(/[^\dA-Za-z]+$/,""))}o(ld,"deriveKeyFromPrefix");function Rr(s){return s===void 0||s===""?void 0:s}o(Rr,"nonEmpty");function Ir(s,e){if(s!=null){if(typeof s!="string")throw new TypeError(`preferences: '${e}' must be a string`);return s}}o(Ir,"readString");function _r(s,e,t=""){let n=s[e];if(n==null)return{};if(!R(n))throw new Error(`preferences: '${t}${e}' must be an object`);return n}o(_r,"readSection");function cd(s,e,t){for(let[n,r]of Object.entries(e))if(n!=="default"&&t.get(n)?.key===s&&r!=="")return r;return Rr(e.default)??"Task"}o(cd,"resolveIssueType");var yd=md(ud),bd=`usage:
|
|
203
|
+
manage-jira-ticket check-site --target <url-or-host>
|
|
204
|
+
manage-jira-ticket resolve-target --work-type <type>
|
|
205
|
+
manage-jira-ticket convert-body --body-file <md> --out <path>
|
|
206
|
+
manage-jira-ticket create --summary <text> --body-file <md> --work-type <type> [--parent <key>]`;async function kd(){try{let[s,...e]=F.argv.slice(2);switch(s){case"check-site":await Sd(e);break;case"convert-body":await vd(e);break;case"create":await Ad(e);break;case"resolve-target":await Td(e);break;default:throw new Error(s===void 0?"missing subcommand":`unknown subcommand '${s}'`)}}catch(s){F.stderr.write(`manage-jira-ticket: ${ue(s)}
|
|
207
|
+
${bd}
|
|
208
|
+
`),F.exit(1)}}o(kd,"main");Mo(import.meta.url,"manage-jira-ticket")&&await kd();function gl(s){let e=`acli jira auth switch --site ${s.targetSite}`;return s.activeSite===null?`could not read acli's active site; the ticket is on ${s.targetSite}. Sign in, then run \`${e}\`.`:`acli's active site is ${s.activeSite}, but the ticket is on ${s.targetSite}. Run \`${e}\`.`}o(gl,"describeSiteMismatch");function xs(s,e,t){let{flags:n,positionals:r}=jo(s,e);if(r.length>0)throw new Error(`unexpected argument: ${r.join(" ")}`);let i=Do(n);for(let a of t)if(i[a]===void 0||i[a]==="")throw new Error(`--${a} is required`);return i}o(xs,"parseValues");async function ml(s){try{let e=await dd(s);if(e.isFile()&&e.size>0)return await hd(s,"utf8")}catch(e){if(!ft(e))throw e}throw new Error(`Body file missing or empty: ${s}`)}o(ml,"readBody");async function yl(s,e){let t=await Fo();if(t===null)throw new Error("the work-type taxonomy could not be read");return pl(s,hl(e),t)}o(yl,"readTarget");async function wd(s){let e=(await Io({cwd:s})).preferences.ticket?.base_url;return e===""?void 0:e}o(wd,"readTicketBaseUrl");async function jr(s){try{let{stderr:e,stdout:t}=await yd("acli",s,{maxBuffer:16777216});return{exitCode:0,stderr:e,stdout:t}}catch(e){if(ft(e))throw new Error("acli is not installed or not on PATH",{cause:e});if(R(e)&&typeof e.code=="number"&&typeof e.stderr=="string"&&typeof e.stdout=="string")return{exitCode:e.code,stderr:e.stderr,stdout:e.stdout};throw e}}o(jr,"runAcli");async function Sd(s){let e=xs(s,[{name:"target",takesValue:!0}],["target"]),t=await yr(e.target??"",jr);Ie(t),!t.match&&(F.stderr.write(`manage-jira-ticket: ${gl(t)}
|
|
209
|
+
`),F.exitCode=1)}o(Sd,"runCheckSite");async function vd(s){let e=xs(s,[{name:"body-file",takesValue:!0},{name:"out",takesValue:!0}],["body-file","out"]),t=Mr.resolve(e.out??""),n=$r(await ml(e["body-file"]??""));await dl(t,`${JSON.stringify(n)}
|
|
210
|
+
`),Ie({adfPath:t})}o(vd,"runConvertBody");async function Ad(s){let e=xs(s,[{name:"body-file",takesValue:!0},{name:"parent",takesValue:!0},{name:"summary",takesValue:!0},{name:"work-type",takesValue:!0}],["body-file","summary","work-type"]),t=await ml(e["body-file"]??""),n=gr(),r=await yl(e["work-type"]??"",await fr(n));"fallback"in r&&(Ie(r),F.stderr.write(`manage-jira-ticket: ${r.warning}
|
|
211
|
+
`),F.exit(1));let i=await wd(n),a=null;if(i!==void 0){let c=await yr(i,jr);if(!c.match){let u=`Jira work item not created: ${gl(c)}`;Ie({activeSite:c.activeSite,fallback:c.activeSite===null?"site-unreadable":"wrong-site",targetSite:c.targetSite,warning:u}),F.stderr.write(`manage-jira-ticket: ${u}
|
|
212
|
+
`),F.exit(1)}a=c.activeSite}let l=await fd(Mr.join(gd(),"manage-jira-ticket-"));try{let c=Mr.join(l,"description.json");await dl(c,JSON.stringify($r(t)));let u=e.parent===""?void 0:e.parent,p=await fl({...r,adfPath:c,parent:u,summary:e.summary??""},jr);for(let f of p.diagnostics)F.stderr.write(`manage-jira-ticket: ${f}
|
|
213
|
+
`);Ie({...p.result,activeSite:a}),p.ok||(F.exitCode=1)}finally{await pd(l,{force:!0,recursive:!0})}}o(Ad,"runCreate");async function Td(s){let e=xs(s,[{name:"work-type",takesValue:!0}],["work-type"]);Ie(await yl(e["work-type"]??"",await fr(gr())))}o(Td,"runResolveTarget");function Ie(s){F.stdout.write(`${JSON.stringify(s,null,2)}
|
|
214
|
+
`)}o(Ie,"writeJson");
|